diff --git a/.gitignore b/.gitignore index f37d1102..3b8b9b33 100644 --- a/.gitignore +++ b/.gitignore @@ -39,7 +39,7 @@ modules.builtin /tags /TAGS /linux -/vmlinux* +/vmlinux /vmlinuz /System.map /Module.markers diff --git a/Documentation/devicetree/bindings/clock/fixed-factor-clock.txt b/Documentation/devicetree/bindings/clock/fixed-factor-clock.txt new file mode 100644 index 00000000..5757f9ab --- /dev/null +++ b/Documentation/devicetree/bindings/clock/fixed-factor-clock.txt @@ -0,0 +1,24 @@ +Binding for simple fixed factor rate clock sources. + +This binding uses the common clock binding[1]. + +[1] Documentation/devicetree/bindings/clock/clock-bindings.txt + +Required properties: +- compatible : shall be "fixed-factor-clock". +- #clock-cells : from common clock binding; shall be set to 0. +- clock-div: fixed divider. +- clock-mult: fixed multiplier. +- clocks: parent clock. + +Optional properties: +- clock-output-names : From common clock binding. + +Example: + clock { + compatible = "fixed-factor-clock"; + clocks = <&parentclk>; + #clock-cells = <0>; + div = <2>; + mult = <1>; + }; diff --git a/Documentation/devicetree/bindings/gpio/snps-dwapb-gpio.txt b/Documentation/devicetree/bindings/gpio/snps-dwapb-gpio.txt new file mode 100644 index 00000000..73adf37b --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/snps-dwapb-gpio.txt @@ -0,0 +1,57 @@ +* Synopsys DesignWare APB GPIO controller + +Required properties: +- compatible : Should be "snps,dw-apb-gpio" +- reg : Address and length of the register set for the device + +The GPIO controller has a configurable number of banks, each of which are +represented as child nodes with the following properties: + +Required properties: +- compatible : "snps,dw-apb-gpio-bank" +- gpio-controller : Marks the device node as a gpio controller. +- #gpio-cells : Should be two. The first cell is the pin number and + the second cell is used to specify optional parameters (currently + unused). +- reg : The integer bank index of the bank, a single cell. +- nr-gpio : The number of pins in the bank, a single cell. + +Optional properties: +- interrupt-controller : The first bank may be configured to be an interrupt +controller. +- #interrupt-cells : Specifies the number of cells needed to encode an +interrupt. Shall be set to 2. The first cell defines the interrupt number, +the second encodes the triger flags encoded as described in +Documentation/devicetree/bindings/interrupts.txt +- interrupt-parent : The parent interrupt controller. +- interrupts : The interrupts to the parent controller raised when GPIOs +generate the interrupts. + +Example: + +gpio: gpio@20000 { + compatible = "snps,dw-apb-gpio"; + reg = <0x20000 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + + banka: gpio-controller@0 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + #gpio-cells = <2>; + nr-gpio = <8>; + reg = <0>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&vic1>; + interrupts = <0 1 2 3 4 5 6 7>; + }; + + bankb: gpio-controller@1 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + #gpio-cells = <2>; + nr-gpio = <8>; + reg = <1>; + }; +}; diff --git a/Documentation/devicetree/bindings/watchdog/dw_wdt.txt b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt new file mode 100644 index 00000000..08e16f68 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt @@ -0,0 +1,21 @@ +Synopsys Designware Watchdog Timer + +Required Properties: + +- compatible : Should contain "snps,dw-wdt" +- reg : Base address and size of the watchdog timer registers. +- clocks : phandle + clock-specifier for the clock that drives the + watchdog timer. + +Optional Properties: + +- interrupts : The interrupt used for the watchdog timeout warning. + +Example: + + watchdog0: wd@ffd02000 { + compatible = "snps,dw-wdt"; + reg = <0xffd02000 0x1000>; + interrupts = <0 171 4>; + clocks = <&per_base_clk>; + }; diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt index 43cff704..25240fc3 100644 --- a/Documentation/driver-model/devres.txt +++ b/Documentation/driver-model/devres.txt @@ -266,7 +266,8 @@ IOMAP devm_ioremap() devm_ioremap_nocache() devm_iounmap() - devm_request_and_ioremap() : checks resource, requests region, ioremaps + devm_ioremap_resource() : checks resource, requests memory region, ioremaps + devm_request_and_ioremap() : obsoleted by devm_ioremap_resource() pcim_iomap() pcim_iounmap() pcim_iomap_table() : array of mapped addresses indexed by BAR diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index f48e0c6b..3cf60849 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking @@ -64,6 +64,7 @@ prototypes: int (*atomic_open)(struct inode *, struct dentry *, struct file *, unsigned open_flag, umode_t create_mode, int *opened); + int (*dentry_open)(struct dentry *, struct file *, const struct cred *); locking rules: all may block @@ -91,6 +92,7 @@ removexattr: yes fiemap: no update_time: no atomic_open: yes +dentry_open: no Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on victim. diff --git a/Documentation/filesystems/overlayfs.txt b/Documentation/filesystems/overlayfs.txt new file mode 100644 index 00000000..00dbab06 --- /dev/null +++ b/Documentation/filesystems/overlayfs.txt @@ -0,0 +1,199 @@ +Written by: Neil Brown + +Overlay Filesystem +================== + +This document describes a prototype for a new approach to providing +overlay-filesystem functionality in Linux (sometimes referred to as +union-filesystems). An overlay-filesystem tries to present a +filesystem which is the result over overlaying one filesystem on top +of the other. + +The result will inevitably fail to look exactly like a normal +filesystem for various technical reasons. The expectation is that +many use cases will be able to ignore these differences. + +This approach is 'hybrid' because the objects that appear in the +filesystem do not all appear to belong to that filesystem. In many +cases an object accessed in the union will be indistinguishable +from accessing the corresponding object from the original filesystem. +This is most obvious from the 'st_dev' field returned by stat(2). + +While directories will report an st_dev from the overlay-filesystem, +all non-directory objects will report an st_dev from the lower or +upper filesystem that is providing the object. Similarly st_ino will +only be unique when combined with st_dev, and both of these can change +over the lifetime of a non-directory object. Many applications and +tools ignore these values and will not be affected. + +Upper and Lower +--------------- + +An overlay filesystem combines two filesystems - an 'upper' filesystem +and a 'lower' filesystem. When a name exists in both filesystems, the +object in the 'upper' filesystem is visible while the object in the +'lower' filesystem is either hidden or, in the case of directories, +merged with the 'upper' object. + +It would be more correct to refer to an upper and lower 'directory +tree' rather than 'filesystem' as it is quite possible for both +directory trees to be in the same filesystem and there is no +requirement that the root of a filesystem be given for either upper or +lower. + +The lower filesystem can be any filesystem supported by Linux and does +not need to be writable. The lower filesystem can even be another +overlayfs. The upper filesystem will normally be writable and if it +is it must support the creation of trusted.* extended attributes, and +must provide valid d_type in readdir responses, at least for symbolic +links - so NFS is not suitable. + +A read-only overlay of two read-only filesystems may use any +filesystem type. + +Directories +----------- + +Overlaying mainly involves directories. If a given name appears in both +upper and lower filesystems and refers to a non-directory in either, +then the lower object is hidden - the name refers only to the upper +object. + +Where both upper and lower objects are directories, a merged directory +is formed. + +At mount time, the two directories given as mount options are combined +into a merged directory: + + mount -t overlayfs overlayfs -olowerdir=/lower,upperdir=/upper /overlay + +Then whenever a lookup is requested in such a merged directory, the +lookup is performed in each actual directory and the combined result +is cached in the dentry belonging to the overlay filesystem. If both +actual lookups find directories, both are stored and a merged +directory is created, otherwise only one is stored: the upper if it +exists, else the lower. + +Only the lists of names from directories are merged. Other content +such as metadata and extended attributes are reported for the upper +directory only. These attributes of the lower directory are hidden. + +whiteouts and opaque directories +-------------------------------- + +In order to support rm and rmdir without changing the lower +filesystem, an overlay filesystem needs to record in the upper filesystem +that files have been removed. This is done using whiteouts and opaque +directories (non-directories are always opaque). + +The overlay filesystem uses extended attributes with a +"trusted.overlay." prefix to record these details. + +A whiteout is created as a symbolic link with target +"(overlay-whiteout)" and with xattr "trusted.overlay.whiteout" set to "y". +When a whiteout is found in the upper level of a merged directory, any +matching name in the lower level is ignored, and the whiteout itself +is also hidden. + +A directory is made opaque by setting the xattr "trusted.overlay.opaque" +to "y". Where the upper filesystem contains an opaque directory, any +directory in the lower filesystem with the same name is ignored. + +readdir +------- + +When a 'readdir' request is made on a merged directory, the upper and +lower directories are each read and the name lists merged in the +obvious way (upper is read first, then lower - entries that already +exist are not re-added). This merged name list is cached in the +'struct file' and so remains as long as the file is kept open. If the +directory is opened and read by two processes at the same time, they +will each have separate caches. A seekdir to the start of the +directory (offset 0) followed by a readdir will cause the cache to be +discarded and rebuilt. + +This means that changes to the merged directory do not appear while a +directory is being read. This is unlikely to be noticed by many +programs. + +seek offsets are assigned sequentially when the directories are read. +Thus if + - read part of a directory + - remember an offset, and close the directory + - re-open the directory some time later + - seek to the remembered offset + +there may be little correlation between the old and new locations in +the list of filenames, particularly if anything has changed in the +directory. + +Readdir on directories that are not merged is simply handled by the +underlying directory (upper or lower). + + +Non-directories +--------------- + +Objects that are not directories (files, symlinks, device-special +files etc.) are presented either from the upper or lower filesystem as +appropriate. When a file in the lower filesystem is accessed in a way +the requires write-access, such as opening for write access, changing +some metadata etc., the file is first copied from the lower filesystem +to the upper filesystem (copy_up). Note that creating a hard-link +also requires copy_up, though of course creation of a symlink does +not. + +The copy_up may turn out to be unnecessary, for example if the file is +opened for read-write but the data is not modified. + +The copy_up process first makes sure that the containing directory +exists in the upper filesystem - creating it and any parents as +necessary. It then creates the object with the same metadata (owner, +mode, mtime, symlink-target etc.) and then if the object is a file, the +data is copied from the lower to the upper filesystem. Finally any +extended attributes are copied up. + +Once the copy_up is complete, the overlay filesystem simply +provides direct access to the newly created file in the upper +filesystem - future operations on the file are barely noticed by the +overlay filesystem (though an operation on the name of the file such as +rename or unlink will of course be noticed and handled). + + +Non-standard behavior +--------------------- + +The copy_up operation essentially creates a new, identical file and +moves it over to the old name. The new file may be on a different +filesystem, so both st_dev and st_ino of the file may change. + +Any open files referring to this inode will access the old data and +metadata. Similarly any file locks obtained before copy_up will not +apply to the copied up file. + +On a file opened with O_RDONLY fchmod(2), fchown(2), futimesat(2) and +fsetxattr(2) will fail with EROFS. + +If a file with multiple hard links is copied up, then this will +"break" the link. Changes will not be propagated to other names +referring to the same inode. + +Symlinks in /proc/PID/ and /proc/PID/fd which point to a non-directory +object in overlayfs will not contain valid absolute paths, only +relative paths leading up to the filesystem's root. This will be +fixed in the future. + +Some operations are not atomic, for example a crash during copy_up or +rename will leave the filesystem in an inconsistent state. This will +be addressed in the future. + +Changes to underlying filesystems +--------------------------------- + +Offline changes, when the overlay is not mounted, are allowed to either +the upper or the lower trees. + +Changes to the underlying filesystems while part of a mounted overlay +filesystem are not allowed. If the underlying filesystem is changed, +the behavior of the overlay is undefined, though it will not result in +a crash or deadlock. diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index e3869098..c2f7ecac 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt @@ -362,6 +362,7 @@ struct inode_operations { int (*atomic_open)(struct inode *, struct dentry *, struct file *, unsigned open_flag, umode_t create_mode, int *opened); + int (*dentry_open)(struct dentry *, struct file *, const struct cred *); }; Again, all methods are called without any locks being held, unless @@ -681,6 +682,12 @@ struct address_space_operations { but instead uses bmap to find out where the blocks in the file are and uses those addresses directly. + dentry_open: this is an alternative to f_op->open(), the difference is that + this method may open a file not necessarily originating from the same + filesystem as the one i_op->open() was called on. It may be + useful for stacking filesystems which want to allow native I/O directly + on underlying files. + invalidatepage: If a page has PagePrivate set, then invalidatepage will be called when part or all of the page is to be removed diff --git a/MAINTAINERS b/MAINTAINERS index 3b955649..c2165f6d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5666,6 +5666,13 @@ F: drivers/scsi/osd/ F: include/scsi/osd_* F: fs/exofs/ +OVERLAYFS FILESYSTEM +M: Miklos Szeredi +L: linux-fsdevel@vger.kernel.org +S: Supported +F: fs/overlayfs/* +F: Documentation/filesystems/overlayfs.txt + P54 WIRELESS DRIVER M: Christian Lamparter L: linux-wireless@vger.kernel.org diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 1ce6f420..c329a1b7 100755 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -17,6 +17,7 @@ config ARM select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER select HARDIRQS_SW_RESEND + select HAVE_AOUT select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL select HAVE_ARCH_KGDB select HAVE_ARCH_SECCOMP_FILTER @@ -528,11 +529,17 @@ config ARCH_IXP4XX config ARCH_BERLIN bool "Marvell Berlin Multimedia SoC" - select CPU_V7 + select ARCH_HAS_CPUFREQ + select ARCH_HAS_OPP + select ARCH_REQUIRE_GPIOLIB select ARM_GIC - select MIGHT_HAVE_CACHE_L2X0 select CLKDEV_LOOKUP + select COMMON_CLK + select CPU_V7 select GENERIC_CLOCKEVENTS + select GENERIC_GPIO + select HAVE_SMP + select MIGHT_HAVE_CACHE_L2X0 select DW_APB_TIMER select SPARSE_IRQ select USE_OF @@ -1450,6 +1457,17 @@ config ARM_ERRATA_782773 page table walk happens just after updating the existing with setting page table in L1 data cache. +config ARM_ERRATA_814220 + bool "ARM errata: Cache maintenance by set/way operations can execute out of order" + depends on CPU_V7 + help + This option enables the fix for erratum 814220 which affecting + Cortex-A7 MPCore r0p2, r0p3, r0p4 and r0p5. The cache maintenance by set/way operation + between different levels can execute out of order. So there will be issues + when L2 flush to L3 complete before L1 flush to L2. Then L2 will contain dirty data + which is not flushed to L3. + This fix is to add dsb between different cache levels. It will make sure + the flush of previous level finish before next level start. endmenu source "arch/arm/common/Kconfig" diff --git a/arch/arm/Makefile b/arch/arm/Makefile index c7b1c7b5..474c7dd4 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -21,6 +21,7 @@ endif OBJCOPYFLAGS :=-O binary -R .comment -S GZFLAGS :=-9 #KBUILD_CFLAGS +=-pipe +LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) # Never generate .eh_frame KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) @@ -263,6 +264,7 @@ core-y += $(machdirs) $(platdirs) drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/ libs-y := arch/arm/lib/ $(libs-y) +libs-y += $(LIBGCC) # Default target when executing plain make ifeq ($(CONFIG_XIP_KERNEL),y) diff --git a/arch/arm/boot/.gitignore b/arch/arm/boot/.gitignore index 16e4e35d..4fee6b75 100644 --- a/arch/arm/boot/.gitignore +++ b/arch/arm/boot/.gitignore @@ -2,5 +2,5 @@ Image zImage* xipImage bootpImage -uImage* +uImage *.dtb diff --git a/arch/arm/boot/compressed/atags_to_fdt.c b/arch/arm/boot/compressed/atags_to_fdt.c index aabc02a6..166a536f 100644 --- a/arch/arm/boot/compressed/atags_to_fdt.c +++ b/arch/arm/boot/compressed/atags_to_fdt.c @@ -15,15 +15,6 @@ static int node_offset(void *fdt, const char *node_path) return offset; } -static int setprop(void *fdt, const char *node_path, const char *property, - uint32_t *val_array, int size) -{ - int offset = node_offset(fdt, node_path); - if (offset < 0) - return offset; - return fdt_setprop(fdt, offset, property, val_array, size); -} - static int setprop_string(void *fdt, const char *node_path, const char *property, const char *string) { @@ -95,8 +86,6 @@ static void merge_fdt_bootargs(void *fdt, const char *fdt_cmdline) int atags_to_fdt(void *atag_list, void *fdt, int total_space) { struct tag *atag = atag_list; - uint32_t mem_reg_property[2 * NR_BANKS]; - int memcount = 0; int ret; /* make sure we've got an aligned pointer */ @@ -132,13 +121,6 @@ int atags_to_fdt(void *atag_list, void *fdt, int total_space) else setprop_string(fdt, "/chosen", "bootargs", atag->u.cmdline.cmdline); - } else if (atag->hdr.tag == ATAG_MEM) { - if (memcount >= sizeof(mem_reg_property)/4) - continue; - if (!atag->u.mem.size) - continue; - mem_reg_property[memcount++] = cpu_to_fdt32(atag->u.mem.start); - mem_reg_property[memcount++] = cpu_to_fdt32(atag->u.mem.size); } else if (atag->hdr.tag == ATAG_INITRD2) { uint32_t initrd_start, initrd_size; initrd_start = atag->u.initrd.start; @@ -150,8 +132,5 @@ int atags_to_fdt(void *atag_list, void *fdt, int total_space) } } - if (memcount) - setprop(fdt, "/memory", "reg", mem_reg_property, 4*memcount); - return fdt_pack(fdt); } diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index fe4d9c3a..84fa0935 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -176,7 +176,7 @@ not_angel: #ifdef CONFIG_AUTO_ZRELADDR @ determine final kernel image address mov r4, pc - and r4, r4, #0xf8000000 + and r4, r4, #0xff000000 add r4, r4, #TEXT_OFFSET #else ldr r4, =zreladdr @@ -689,6 +689,12 @@ __armv4_mmu_cache_on: __armv7_mmu_cache_on: mov r12, lr +#ifdef CONFIG_BERLIN2CDP +@ @ CA7 Core - Set ACTLR.SMP bit before enabling MMU/Caches + mrc p15, 0, r0, c1, c0, 1 @ Read CP15 ACTLR + orr r0, r0, #1 << 6 @ Set ACTLR.SMP bit + mcr p15, 0, r0, c1, c0, 1 @ Write CP15 ACTLR +#endif #ifdef CONFIG_MMU mrc p15, 0, r11, c0, c1, 4 @ read ID_MMFR0 tst r11, #0xf @ VMSA @@ -1079,6 +1085,9 @@ hierarchical: beq finished @ if loc is 0, then no need to clean mov r10, #0 @ start clean at cache level 0 loop1: +#ifdef CONFIG_ARM_ERRATA_814220 + mcr p15, 0, r10, c7, c10, 4 @ DSB +#endif add r2, r10, r10, lsr #1 @ work out 3x current cache level mov r1, r0, lsr r2 @ extract cache type bits from clidr and r1, r1, #7 @ mask of the bits for current cache only diff --git a/arch/arm/boot/dts/berlin2cd-amp-dongle.dts b/arch/arm/boot/dts/berlin2cd-amp-dongle.dts new file mode 100644 index 00000000..a59b905f --- /dev/null +++ b/arch/arm/boot/dts/berlin2cd-amp-dongle.dts @@ -0,0 +1,157 @@ +/* + * MARVELL BERLIN2CT Dongle board device tree source + * + * Copyright (c) 2013 Marvell International Ltd. + * http://www.marvell.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +/dts-v1/; +/include/ "berlin2cd-common.dtsi" + +/ { + model = "MARVELL BG2CD Dongle board based on BERLIN2CD"; + compatible = "marvell,berlin2cd-dongle", "marvell,berlin2cd"; + + memory { + name = "memory"; + device_type = "memory"; + linux,usable-memory = <0x00600000 0x13200000>; + }; + + soc { + usb@F7ED0000 { + status = "disabled"; + }; + + amp { + compatible = "mrvl,berlin-amp"; + interrupts = <0 19 4 0 0 4 0 1 4 0 25 4 0 2 4>; + cec{ + compatible = "mrvl,berlin-cec"; + interrupt-parent = <&sm_ictl>; + interrupts = <16>; + }; + }; + + shm@29000000 { + compatible = "mrvl,berlin-shm"; + reg = <0x13800000 0x0C000000>, <0x1F800000 0x00800000>; + }; + + gpio0: apbgpio@F7E80400 { + compatible = "snps,dw-apb-gpio"; + dev_name = "gpio_soc_0"; + reg = <0xF7E80400 0x400>; + #address-cells = <1>; + #size-cells = <0>; + + banka: gpio-controller@0 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + reg = <0>; + #gpio-cells = <2>; + nr-gpio = <8>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&apb_ictl>; + interrupts = <0>; + }; + }; + + gpio1: apbgpio@F7E80800 { + compatible = "snps,dw-apb-gpio"; + dev_name = "gpio_soc_1"; + reg = <0xF7E80800 0x400>; + #address-cells = <1>; + #size-cells = <0>; + + bankb: gpio-controller@1 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + reg = <0>; + #gpio-cells = <2>; + nr-gpio = <8>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&apb_ictl>; + interrupts = <1>; + }; + }; + + gpio2: apbgpio@F7E80C00 { + compatible = "snps,dw-apb-gpio"; + dev_name = "gpio_soc_2"; + reg = <0xF7E80C00 0x400>; + #address-cells = <1>; + #size-cells = <0>; + + bankc: gpio-controller@2 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + reg = <0>; + #gpio-cells = <2>; + nr-gpio = <8>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&apb_ictl>; + interrupts = <2>; + }; + }; + + gpio3: apbgpio@F7E81000 { + compatible = "snps,dw-apb-gpio"; + dev_name = "gpio_soc_3"; + reg = <0xF7E81000 0x400>; + #address-cells = <1>; + #size-cells = <0>; + + bankd: gpio-controller@3 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + reg = <0>; + #gpio-cells = <2>; + nr-gpio = <8>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&apb_ictl>; + interrupts = <3>; + }; + }; + + gpio4: apbgpio@F7FCC000 { + compatible = "snps,dw-apb-gpio"; + dev_name = "gpio_sm_0"; + reg = <0xF7FCC000 0x400>; + #address-cells = <1>; + #size-cells = <0>; + + banke: gpio-controller@4 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + reg = <0>; + #gpio-cells = <2>; + nr-gpio = <8>; + }; + }; + + gpio5: apbgpio@F7FC5000 { + compatible = "snps,dw-apb-gpio"; + dev_name = "gpio_sm_1"; + reg = <0xF7FC5000 0x400>; + #address-cells = <1>; + #size-cells = <0>; + + bankf: gpio-controller@5 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + reg = <0>; + #gpio-cells = <2>; + nr-gpio = <8>; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/berlin2cd-common.dtsi b/arch/arm/boot/dts/berlin2cd-common.dtsi new file mode 100644 index 00000000..776bbc23 --- /dev/null +++ b/arch/arm/boot/dts/berlin2cd-common.dtsi @@ -0,0 +1,239 @@ +/* + * MARVELL BERLIN2CD SoC device tree source + * + * Author: Jisheng Zhang + * Copyright (c) 2013 Marvell International Ltd. + * http://www.marvell.com + * + * MARVELL BERLIN2CD SoC device nodes are listed in this file. + * BERLIN2CD based board files can include this file and provide + * values for board specfic bindings. + * + * Note: This file does not include device nodes for all the controllers in + * BERLIN2CD SoC. As device tree coverage for BERLIN2CD increases, + * additional nodes can be added to this file. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +/include/ "skeleton.dtsi" + +/ { + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a9"; + reg = <0>; + next-level-cache = <&L2>; + }; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + soc { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + interrupt-parent = <&gic>; + ranges; + + gic:interrupt-controller@F7AD1000 { + compatible = "arm,cortex-a9-gic"; + #interrupt-cells = <3>; + interrupt-controller; + reg = <0xF7AD1000 0x1000>, <0xF7AD0100 0x100>; + }; + + L2: cache-controller@F7AC0000 { + compatible = "arm,pl310-cache"; + reg = <0xF7AC0000 0x1000>; + arm,prefetch-ctrl = <0x70000007>; + arm,pwr-ctrl = <0x3>; + }; + + pmu { + compatible = "arm,cortex-a9-pmu"; + interrupts = <0 30 4 0 31 4>; + }; + + timer@F7AD0600 { + compatible = "arm,cortex-a9-twd-timer"; + reg = <0xF7AD0600 0x20>; + interrupts = <1 13 0x304>; + }; + + ethernet@F7B90000 { + compatible = "mrvl,fastethernet"; + reg = <0xF7B90000 0x10000>; + interrupts = <0 24 4>; + }; + + usb@F7ED0000 { + compatible = "mrvl,berlin-ehci"; + reg = <0xF7ED0000 0x10000>; + interrupts = <0 11 4>; + phy-base = <0xF7B74000>; + reset-bit = <23>; + pwr-gpio = <8>; + }; + + usb@F7EE0000 { + compatible = "mrvl,berlin-ehci"; + reg = <0xF7EE0000 0x10000>; + interrupts = <0 12 4>; + phy-base = <0xF7B78000>; + reset-bit = <24>; + pwr-gpio = <5>; + }; + + sdhci@F7AB0000 { + compatible = "mrvl,berlin-sdhci"; + reg = <0xF7AB0000 0x200>; + interrupts = <0 17 4>; + mrvl,no-hispd; + mrvl,card-wired; + mrvl,host-off-card-on; + }; + + apb_ictl: interrupt-controller@F7E83000 { + compatible = "snps,dw-apb-ictl"; + interrupts = <0 3 4>; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0xF7E83000 0x30>; + ictl-nr-irqs = <32>; + }; + + sm_ictl: interrupt-controller@F7FCE000 { + compatible = "snps,dw-apb-ictl"; + interrupts = <0 15 4>; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0xF7FCE000 0x30>; + ictl-nr-irqs = <32>; + }; + + timer0: apbtimer@F7E82C00 { + compatible = "berlin,apb-timer"; + interrupt-parent = <&apb_ictl>; + interrupts = <8>; + clock-freq = <75000000>; + reg = <0xF7E82C00 0x14>; + }; + + timer1: apbtimer@F7E82C8C { + compatible = "berlin,apb-timer"; + clock-freq = <75000000>; + reg = <0xF7E82C8C 0x14>; + }; + + uart0: uart@F7FC9000 { + compatible = "snps,dw-apb-uart"; + reg = <0xF7FC9000 0x100>; + interrupt-parent = <&sm_ictl>; + interrupts = <8>; + clock-frequency = <25000000>; + reg-shift = <2>; + }; + + uart1: uart@F7FCA000 { + compatible = "snps,dw-apb-uart"; + reg = <0xF7FCA000 0x100>; + interrupt-parent = <&sm_ictl>; + interrupts = <9>; + clock-frequency = <25000000>; + reg-shift = <2>; + }; + + gpio@F7E80400 { + compatible = "berlin,apb-gpio"; + interrupt-parent = <&apb_ictl>; + interrupts = <0 1 2 3>; + }; + + gpio@F7FCC000 { + compatible = "berlin,sm-gpio"; + interrupt-parent = <&sm_ictl>; + interrupts = <11 4>; + }; + + i2c0: i2c@0 { + compatible = "snps,designware-i2c"; + interrupt-parent = <&apb_ictl>; + reg = <0xF7E81400 0x100>; + interrupts = <16>; + }; + + i2c1: i2c@1 { + compatible = "snps,designware-i2c"; + interrupt-parent = <&apb_ictl>; + reg = <0xF7E81800 0x100>; + interrupts = <17 18 19 20 21 22 23 24 25 26 27 28>; + }; + + i2c2: i2c@2 { + compatible = "snps,designware-i2c"; + interrupt-parent = <&sm_ictl>; + reg = <0XF7FC7000 0x100>; + interrupts = <6>; + }; + + i2c3: i2c@3 { + compatible = "snps,designware-i2c"; + interrupt-parent = <&sm_ictl>; + reg = <0xF7FC8000 0x100>; + interrupts = <7>; + }; + + pmic{ + compatible = "mrvl,berlin-pmic"; + regulators { + vmmc_reg_sdio1: vmmc_sd { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "VMMC_SD"; + gpio-type = "soc"; + pwr-gpio = <7>; + }; + vqmmc_reg_sdio1: vqmmc_sd { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-name = "VQMMC_SD"; + gpio-type = "soc"; + pwr-gpio = <22>; + }; + }; + }; + + nfc@F7F00000 { + compatible = "mrvl,berlin-nfc"; + reg = <0xF7F00000 0x10000>, <0xF7D70000 0x10000>; + interrupts = <0 18 4>; + mrvl,nfc-dma; + mrvl,nfc-naked-cmd; + mrvl,nfc-arbi; + }; + + pwm@F7F20000 { + compatible = "mrvl,berlin-pwm"; + reg = <0xF7F20000 0x40>; + }; + + tsen@F7FCD000 { + compatible = "mrvl,berlin-tsen-adc33"; + reg = <0xF7FCD000 0x100>; + }; + + wdt@F7E82000 { + compatible = "mrvl,berlin-wdt"; + reg = <0xF7E82000 0x10000>; + }; + }; +}; diff --git a/arch/arm/boot/dts/berlin2cd-pe-dongle.dts b/arch/arm/boot/dts/berlin2cd-pe-dongle.dts new file mode 100644 index 00000000..79f126a3 --- /dev/null +++ b/arch/arm/boot/dts/berlin2cd-pe-dongle.dts @@ -0,0 +1,59 @@ +/* + * MARVELL BERLIN2CT Dongle board device tree source + * + * Copyright (c) 2013 Marvell International Ltd. + * http://www.marvell.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +/dts-v1/; +/include/ "berlin2cd-common.dtsi" + +/ { + model = "MARVELL BG2CD Dongle board based on BERLIN2CD"; + compatible = "marvell,berlin2cd-dongle", "marvell,berlin2cd"; + + memory { + name = "memory"; + device_type = "memory"; + linux,usable-memory = <0x01000000 0x11000000>; + }; + + soc { + usb@F7ED0000 { + status = "disabled"; + }; + + i2c@F7E81400 { + compatible = "berlin,apb-twsi"; + interrupt-parent = <&apb_ictl>; + interrupts = <17 18 19 20 21 22 23 24 25 26 27 28 16>; + }; + + i2c@F7FC7000 { + compatible = "berlin,sm-twsi"; + interrupt-parent = <&sm_ictl>; + interrupts = <6 7>; + }; + + pe { + compatible = "mrvl,berlin-pe"; + interrupts = <0 19 4 0 0 4 0 1 4 0 25 4 0 2 4>; + cec { + compatible = "mrvl,berlin-cec"; + interrupt-parent = <&sm_ictl>; + interrupts = <16>; + }; + }; + + shm@29000000 { + compatible = "mrvl,berlin-shm"; + reg = <0x12000000 0x0C000000>, <0x1E000000 0x02000000>; + }; + + }; + +}; diff --git a/arch/arm/boot/dts/berlin2cdp-a0-dongle.dts b/arch/arm/boot/dts/berlin2cdp-a0-dongle.dts new file mode 100644 index 00000000..2e68a3e8 --- /dev/null +++ b/arch/arm/boot/dts/berlin2cdp-a0-dongle.dts @@ -0,0 +1,57 @@ +/* + * MARVELL BERLIN2CDP Dongle board device tree source + * + * Copyright (c) 2013 Marvell International Ltd. + * http://www.marvell.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +/dts-v1/; +/include/ "berlin2cdp-a0.dtsi" + +/ { + model = "MARVELL BG2CDP Dongle board based on BERLIN2CDP-A0"; + compatible = "marvell,berlin2cdp-dongle", "marvell,berlin2cdp", "marvell,berlin"; + + cpus { + cpu@0 { + cpu0-supply = <&vcpu>; + }; + }; + + memory { + name = "memory"; + device_type = "memory"; + reg = <0x01100000 0x13F00000>; + }; + + soc { + shm@29000000 { + compatible = "mrvl,berlin-shm"; + reg = <0x15000000 0x0A600000>, <0x1F600000 0x00900000>; + }; + + i2c@0 { + pg868 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "marvell,pg86x"; + reg = <0x19>; + vcpu:BK1_TV@0 { + regulator-name = "vcpu"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1350000>; + regulator-always-on; + regulator-boot-on; + }; + }; + }; + + tsen@F7FCD000 { + pwr-gpio = <&banka 2 0>; + }; + }; +}; diff --git a/arch/arm/boot/dts/berlin2cdp-a0-hendrix.dts b/arch/arm/boot/dts/berlin2cdp-a0-hendrix.dts new file mode 100644 index 00000000..b302c2ad --- /dev/null +++ b/arch/arm/boot/dts/berlin2cdp-a0-hendrix.dts @@ -0,0 +1,57 @@ +/* + * Google Hendrix BG2CDP A0 board device tree source + * + * Copyright (c) 2013 Marvell International Ltd. + * http://www.marvell.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +/dts-v1/; +/include/ "berlin2cdp-a0.dtsi" + +/ { + model = "Google Hendrix BG2CDP A0 board based on BERLIN2CDP-A0"; + compatible = "marvell,berlin2cdp-hendrix", "marvell,berlin2cdp", "marvell,berlin"; + + cpus { + cpu@0 { + cpu0-supply = <&vcpu>; + }; + }; + + memory { + name = "memory"; + device_type = "memory"; + reg = <0x01100000 0x0DD00000>; + }; + + soc { + shm@29000000 { + compatible = "mrvl,berlin-shm"; + reg = <0x0EE00000 0x01000000>, <0x0FE00000 0x00100000>; + }; + + i2c@0 { + pg868 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "marvell,pg86x"; + reg = <0x19>; + vcpu:BK1_TV@0 { + regulator-name = "vcpu"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1350000>; + regulator-always-on; + regulator-boot-on; + }; + }; + }; + + tsen@F7FCD000 { + pwr-gpio = <&banka 10 0>; + }; + }; +}; diff --git a/arch/arm/boot/dts/berlin2cdp-a0.dtsi b/arch/arm/boot/dts/berlin2cdp-a0.dtsi new file mode 100644 index 00000000..ca67ebe5 --- /dev/null +++ b/arch/arm/boot/dts/berlin2cdp-a0.dtsi @@ -0,0 +1,445 @@ +/* + * MARVELL BERLIN2CDP SoC device tree source + * + * Author: Jisheng Zhang + * Copyright (c) 2013 Marvell International Ltd. + * http://www.marvell.com + * + * MARVELL BERLIN2CDP SoC device nodes are listed in this file. + * BERLIN2CDP based board files can include this file and provide + * values for board specfic bindings. + * + * Note: This file does not include device nodes for all the controllers in + * BERLIN2CDP SoC. As device tree coverage for BERLIN2CDP increases, + * additional nodes can be added to this file. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +/include/ "skeleton.dtsi" + +/ { + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a7"; + reg = <0>; + operating-points = < + /* kHz uV */ + 1000000 1200000 + 800000 1200000 + 600000 1200000 + >; + clock-latency = <100000>; + clocks = <&cpuclk>; + + }; + cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a7"; + reg = <1>; + }; + }; + + chosen { + bootargs = "console=ttyS0,115200 root=/dev/nfs nfsroot=10.37.116.100:/home/jszhang/_install,vers=3 ip=::::bg2-cdp::dhcp macaddr=00:78:73:AB:38:CF mtdparts=mv_nand:1M(block0)ro,8M(bootloader),7M(fts)ro,16M(kernel),60M(recovery),80M(backupsys)ro,16M(factory_store),400M(rootfs),32M(localstorage),300M(cache),1024M(userdata)"; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + osc: osc { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <25000000>; + }; + + cpupll: cpupll { + compatible = "marvell,berlin2cdp-pll"; + clocks = <&osc>; + #clock-cells = <0>; + reg = <0xF7920070 0x14>, <0xF7EA0614 4>; + bypass-shift = /bits/ 8 <2>; + }; + + syspll: syspll { + compatible = "marvell,berlin2cdp-pll"; + clocks = <&osc>; + #clock-cells = <0>; + reg = <0xF7EA0200 0x14>, <0xF7EA0614 4>; + bypass-shift = /bits/ 8 <0>; + }; + + cpuclk: cpuclk { + compatible = "fixed-factor-clock"; + clocks = <&cpupll>; + #clock-cells = <0>; + clock-div = <1>; + clock-mult = <1>; + set-rate-parent; + }; + + cfgclk: cfgclk { + compatible = "marvell,berlin-clk"; + clocks = <&syspll>; + #clock-cells = <0>; + reg = <0xF7EA0620 4>; + }; + + perifclk: perifclk { + compatible = "marvell,berlin-clk"; + clocks = <&syspll>; + #clock-cells = <0>; + reg = <0xF7EA0644 4>; + }; + + nfceccclk: nfceccclk { + compatible = "marvell,berlin-clk"; + clocks = <&syspll>; + #clock-cells = <0>; + reg = <0xF7EA0658 4>; + }; + + sd0clk: sd0clk { + compatible = "marvell,berlin-clk"; + clocks = <&syspll>; + #clock-cells = <0>; + reg = <0xF7EA065C 4>; + }; + }; + + soc { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + interrupt-parent = <&gic>; + ranges; + + sw_generic1 { + compatible = "marvell,berlin-sw_generic1"; + reg = <0xF7EA001C 4>; + }; + + timer { + compatible = "arm,armv7-timer"; + interrupts = <1 13 0xf08>, + <1 14 0xf08>, + <1 11 0xf08>, + <1 10 0xf08>; + clock-frequency = <25000000>; + }; + + gic:interrupt-controller@F7901000 { + compatible = "arm,cortex-a15-gic"; + #interrupt-cells = <3>; + interrupt-controller; + reg = <0xF7901000 0x1000>, <0xF7902000 0x1000>; + }; + + pmu { + compatible = "arm,cortex-a7-pmu"; + interrupts = <0 23 4 0 24 4>; + }; + + usb@F7EE0000 { + compatible = "mrvl,berlin-ehci"; + reg = <0xF7ED0000 0x10000>; + interrupts = <0 11 4>; + phy-base = <0xF7B74000>; + }; + + sdhci@F7AB0800 { + compatible = "mrvl,berlin-sdhci"; + reg = <0xF7AB0800 0x200>; + interrupts = <0 15 4>; + clocks = <&sd0clk>; + mrvl,no-hispd; + mrvl,card-wired; + mrvl,host-off-card-on; + }; + + sdhci@F7AB0000 { + compatible = "mrvl,berlin-sdhci"; + reg = <0xF7AB0000 0x200>; + interrupts = <0 13 4>; + clocks = <&nfceccclk>; + mrvl,card-wired; + mrvl,8bit-data; + }; + + apb_ictl: interrupt-controller@F7E83800 { + compatible = "snps,dw-apb-ictl"; + interrupts = <0 8 4>; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0xF7E83800 0x30>; + ictl-nr-irqs = <32>; + }; + + sm_ictl: interrupt-controller@F7FCE000 { + compatible = "snps,dw-apb-ictl"; + interrupts = <0 17 4>; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0xF7FCE000 0x30>; + ictl-nr-irqs = <32>; + }; + + timer0: apbtimer@F7E82C00 { + compatible = "berlin,apb-timer"; + interrupt-parent = <&apb_ictl>; + interrupts = <8>; + clock-freq = <100000000>; + reg = <0xF7E82C00 0x14>; + }; + + timer1: apbtimer@F7E82C8C { + compatible = "berlin,apb-timer"; + clock-freq = <100000000>; + reg = <0xF7E82C8C 0x14>; + }; + + uart0: uart@F7FC9000 { + compatible = "snps,dw-apb-uart"; + reg = <0xF7FC9000 0x100>; + interrupt-parent = <&sm_ictl>; + interrupts = <8>; + clock-frequency = <25000000>; + reg-shift = <2>; + }; + + uart1: uart@F7FCA000 { + compatible = "snps,dw-apb-uart"; + reg = <0xF7FCA000 0x100>; + interrupt-parent = <&sm_ictl>; + interrupts = <9>; + clock-frequency = <25000000>; + reg-shift = <2>; + }; + + gpio0: apbgpio@F7E80400 { + compatible = "snps,dw-apb-gpio"; + dev_name = "gpio_soc_0"; + reg = <0xF7E80400 0x400>; + #address-cells = <1>; + #size-cells = <0>; + + banka: gpio-controller@0 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + reg = <0>; + #gpio-cells = <2>; + nr-gpio = <32>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&apb_ictl>; + interrupts = <0>; + }; + }; + + gpio1: apbgpio@F7E80800 { + compatible = "snps,dw-apb-gpio"; + dev_name = "gpio_soc_1"; + reg = <0xF7E80800 0x400>; + #address-cells = <1>; + #size-cells = <0>; + + bankb: gpio-controller@1 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + reg = <0>; + #gpio-cells = <2>; + nr-gpio = <32>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&apb_ictl>; + interrupts = <1>; + }; + }; + + gpio2: apbgpio@F7E80C00 { + compatible = "snps,dw-apb-gpio"; + dev_name = "gpio_soc_2"; + reg = <0xF7E80C00 0x400>; + #address-cells = <1>; + #size-cells = <0>; + + bankc: gpio-controller@2 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + reg = <0>; + #gpio-cells = <2>; + nr-gpio = <32>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&apb_ictl>; + interrupts = <2>; + }; + }; + + gpio3: apbgpio@F7E81000 { + compatible = "snps,dw-apb-gpio"; + dev_name = "gpio_soc_3"; + reg = <0xF7E81000 0x400>; + #address-cells = <1>; + #size-cells = <0>; + + bankd: gpio-controller@3 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + reg = <0>; + #gpio-cells = <2>; + nr-gpio = <32>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&apb_ictl>; + interrupts = <3>; + }; + }; + + gpio4: apbgpio@F7FCC000 { + compatible = "snps,dw-apb-gpio"; + dev_name = "gpio_sm_0"; + reg = <0xF7FCC000 0x400>; + #address-cells = <1>; + #size-cells = <0>; + + banke: gpio-controller@4 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + reg = <0>; + #gpio-cells = <2>; + nr-gpio = <32>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&sm_ictl>; + interrupts = <11>; + }; + }; + + gpio5: apbgpio@F7FC5000 { + compatible = "snps,dw-apb-gpio"; + dev_name = "gpio_sm_1"; + reg = <0xF7FC5000 0x400>; + #address-cells = <1>; + #size-cells = <0>; + + bankf: gpio-controller@5 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + reg = <0>; + #gpio-cells = <2>; + nr-gpio = <32>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&sm_ictl>; + interrupts = <4>; + }; + }; + + i2c0: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,designware-i2c"; + interrupt-parent = <&apb_ictl>; + clocks = <&cfgclk>; + reg = <0xF7E81400 0x100>; + interrupts = <4>; + }; + + i2c1: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,designware-i2c"; + interrupt-parent = <&apb_ictl>; + clocks = <&cfgclk>; + reg = <0xF7E81800 0x100>; + interrupts = <5>; + }; + + i2c2: i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,designware-i2c"; + interrupt-parent = <&sm_ictl>; + clocks = <&osc>; + reg = <0XF7FC7000 0x100>; + interrupts = <6>; + }; + + i2c3: i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,designware-i2c"; + interrupt-parent = <&sm_ictl>; + clocks = <&osc>; + reg = <0xF7FC8000 0x100>; + interrupts = <7>; + }; + + watchdog@0xF7FC2000 { + compatible = "snps,dw-wdt"; + reg = <0xF7FC2000 0x100>; + interrupt-parent = <&sm_ictl>; + interrupts = <1>; + clocks = <&osc>; + snps,rpl = <0x2>; + }; + + opp { + compatible = "marvell,berlin2cdp-opp"; + reg = <0x1010020 4>; + }; + + + amp{ + compatible = "mrvl,berlin-amp"; + interrupts = <0 35 4 0 33 4 0 34 4 0 25 4 0 29 4>; + cec{ + compatible = "mrvl,berlin-cec"; + interrupt-parent = <&sm_ictl>; + interrupts = <16>; + }; + + chip_version{ + compatible = "mrvl,berlin-chip-ext"; + revision = <0xA0>; + }; + + avio_channel{ + compatible = "mrvl,berlin-avio"; + num = <0x4>; + }; + }; + + nfc@F7F00000 { + compatible = "mrvl,berlin-nfc"; + reg = <0xF7F00000 0x10000>, <0xF7D70000 0x10000>; + interrupts = <0 5 4>; + mrvl,nfc-dma; + mrvl,nfc-naked-cmd; + mrvl,nfc-arbi; + }; + + pwm@F7F20000 { + compatible = "mrvl,berlin-pwm"; + reg = <0xF7F20000 0x40>; + }; + + tsen@F7FCD000 { + compatible = "mrvl,berlin2cdp-tsen-adc33"; + reg = <0xF7FCD014 4>, + <0xF7FCD01C 4>, + <0xF7FCD070 4>, + <0xF7FCD024 4>, + <0xF7FCD028 4>; + }; + }; +}; diff --git a/arch/arm/boot/dts/berlin2cdp-amp-dongle.dts b/arch/arm/boot/dts/berlin2cdp-amp-dongle.dts new file mode 100644 index 00000000..4439b8a8 --- /dev/null +++ b/arch/arm/boot/dts/berlin2cdp-amp-dongle.dts @@ -0,0 +1,42 @@ +/* + * MARVELL BERLIN2CDP Dongle board device tree source + * + * Copyright (c) 2013 Marvell International Ltd. + * http://www.marvell.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +/dts-v1/; +/include/ "berlin2cdp.dtsi" + +/ { + model = "MARVELL BG2CDP Dongle board based on BERLIN2CDP"; + compatible = "marvell,berlin2cdp-dongle", "marvell,berlin2cdp", "marvell,berlin"; + + cpus { + cpu@0 { + cpu0-supply = <&vcpu>; + }; + }; + + soc { + i2c@0 { + pg868 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "marvell,pg86x"; + reg = <0x19>; + vcpu:BK1_TV@0 { + regulator-name = "vcpu"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1350000>; + regulator-always-on; + regulator-boot-on; + }; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/berlin2cdp.dtsi b/arch/arm/boot/dts/berlin2cdp.dtsi new file mode 100644 index 00000000..9c8c0d00 --- /dev/null +++ b/arch/arm/boot/dts/berlin2cdp.dtsi @@ -0,0 +1,446 @@ +/* + * MARVELL BERLIN2CDP SoC device tree source + * + * Author: Jisheng Zhang + * Copyright (c) 2013 Marvell International Ltd. + * http://www.marvell.com + * + * MARVELL BERLIN2CDP SoC device nodes are listed in this file. + * BERLIN2CDP based board files can include this file and provide + * values for board specfic bindings. + * + * Note: This file does not include device nodes for all the controllers in + * BERLIN2CDP SoC. As device tree coverage for BERLIN2CDP increases, + * additional nodes can be added to this file. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +/include/ "skeleton.dtsi" + +/ { + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a7"; + reg = <0>; + operating-points = < + /* kHz uV */ + 1000000 1200000 + 800000 1200000 + 600000 1200000 + >; + clock-latency = <100000>; + clocks = <&cpuclk>; + + }; + cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a7"; + reg = <1>; + }; + }; + + memory { + name = "memory"; + device_type = "memory"; + reg = <0x01100000 0x13f00000>; + }; + + chosen { + bootargs = "console=ttyS0,115200 root=/dev/nfs nfsroot=10.37.116.100:/home/jszhang/_install,vers=3 ip=::::bg2-cdp::dhcp macaddr=00:78:73:AB:38:CF mtdparts=mv_nand:1M(block0)ro,8M(bootloader),7M(fts)ro,16M(kernel),60M(recovery),80M(backupsys)ro,16M(factory_store),400M(rootfs),32M(localstorage),300M(cache),1024M(userdata)"; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + osc: osc { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <25000000>; + }; + + cpupll: cpupll { + compatible = "marvell,berlin2cdp-pll"; + clocks = <&osc>; + #clock-cells = <0>; + reg = <0xF7920070 0x14>, <0xF7EA0634 4>; + bypass-shift = /bits/ 8 <2>; + }; + + syspll: syspll { + compatible = "marvell,berlin2cdp-pll"; + clocks = <&osc>; + #clock-cells = <0>; + reg = <0xF7EA0200 0x14>, <0xF7EA0634 4>; + bypass-shift = /bits/ 8 <0>; + }; + + cpuclk: cpuclk { + compatible = "fixed-factor-clock"; + clocks = <&cpupll>; + #clock-cells = <0>; + clock-div = <1>; + clock-mult = <1>; + set-rate-parent; + }; + + cfgclk: cfgclk { + compatible = "marvell,berlin-clk"; + clocks = <&syspll>; + #clock-cells = <0>; + reg = <0xF7EA0640 4>; + }; + + perifclk: perifclk { + compatible = "marvell,berlin-clk"; + clocks = <&syspll>; + #clock-cells = <0>; + reg = <0xF7EA0670 4>; + }; + + nfceccclk: nfceccclk { + compatible = "marvell,berlin-clk"; + clocks = <&syspll>; + #clock-cells = <0>; + reg = <0xF7EA0688 4>; + }; + + sd0clk: sd0clk { + compatible = "marvell,berlin-clk"; + clocks = <&syspll>; + #clock-cells = <0>; + reg = <0xF7EA068C 4>; + }; + }; + + soc { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + interrupt-parent = <&gic>; + ranges; + + sw_generic1 { + compatible = "marvell,berlin-sw_generic1"; + reg = <0xF7EA001C 4>; + }; + + timer { + compatible = "arm,armv7-timer"; + interrupts = <1 13 0xf08>, + <1 14 0xf08>, + <1 11 0xf08>, + <1 10 0xf08>; + clock-frequency = <25000000>; + }; + + gic:interrupt-controller@F7901000 { + compatible = "arm,cortex-a15-gic"; + #interrupt-cells = <3>; + interrupt-controller; + reg = <0xF7901000 0x1000>, <0xF7902000 0x1000>; + }; + + pmu { + compatible = "arm,cortex-a7-pmu"; + interrupts = <0 23 4 0 24 4>; + }; + + ethernet@F7B90000 { + compatible = "mrvl,fastethernet"; + reg = <0xF7B90000 0x10000>; + interrupts = <0 16 4>; + }; + + usb@F7EE0000 { + compatible = "mrvl,berlin-ehci"; + reg = <0xF7ED0000 0x10000>; + interrupts = <0 11 4>; + phy-base = <0xF7B74000>; + }; + + sdhci@F7AB0800 { + compatible = "mrvl,berlin-sdhci"; + reg = <0xF7AB0800 0x200>; + interrupts = <0 15 4>; + clocks = <&sd0clk>; + mrvl,no-hispd; + mrvl,card-wired; + mrvl,host-off-card-on; + }; + + sdhci@F7AB0000 { + compatible = "mrvl,berlin-sdhci"; + reg = <0xF7AB0000 0x200>; + interrupts = <0 13 4>; + clocks = <&nfceccclk>; + mrvl,card-wired; + mrvl,8bit-data; + }; + + apb_ictl: interrupt-controller@F7E83800 { + compatible = "snps,dw-apb-ictl"; + interrupts = <0 8 4>; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0xF7E83800 0x30>; + ictl-nr-irqs = <32>; + }; + + sm_ictl: interrupt-controller@F7FCE000 { + compatible = "snps,dw-apb-ictl"; + interrupts = <0 17 4>; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0xF7FCE000 0x30>; + ictl-nr-irqs = <32>; + }; + + timer0: apbtimer@F7E82C00 { + compatible = "berlin,apb-timer"; + interrupt-parent = <&apb_ictl>; + interrupts = <8>; + clock-freq = <100000000>; + reg = <0xF7E82C00 0x14>; + }; + + timer1: apbtimer@F7E82C8C { + compatible = "berlin,apb-timer"; + clock-freq = <100000000>; + reg = <0xF7E82C8C 0x14>; + }; + + uart0: uart@F7FC9000 { + compatible = "snps,dw-apb-uart"; + reg = <0xF7FC9000 0x100>; + interrupt-parent = <&sm_ictl>; + interrupts = <8>; + clock-frequency = <25000000>; + reg-shift = <2>; + }; + + uart1: uart@F7FCA000 { + compatible = "snps,dw-apb-uart"; + reg = <0xF7FCA000 0x100>; + interrupt-parent = <&sm_ictl>; + interrupts = <9>; + clock-frequency = <25000000>; + reg-shift = <2>; + }; + + gpio0: apbgpio@F7E80400 { + compatible = "snps,dw-apb-gpio"; + dev_name = "gpio_soc_0"; + reg = <0xF7E80400 0x400>; + #address-cells = <1>; + #size-cells = <0>; + + banka: gpio-controller@0 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + reg = <0>; + #gpio-cells = <2>; + nr-gpio = <32>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&apb_ictl>; + interrupts = <0>; + }; + }; + + gpio1: apbgpio@F7E80800 { + compatible = "snps,dw-apb-gpio"; + dev_name = "gpio_soc_1"; + reg = <0xF7E80800 0x400>; + #address-cells = <1>; + #size-cells = <0>; + + bankb: gpio-controller@1 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + reg = <0>; + #gpio-cells = <2>; + nr-gpio = <32>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&apb_ictl>; + interrupts = <1>; + }; + }; + + gpio2: apbgpio@F7E80C00 { + compatible = "snps,dw-apb-gpio"; + dev_name = "gpio_soc_2"; + reg = <0xF7E80C00 0x400>; + #address-cells = <1>; + #size-cells = <0>; + + bankc: gpio-controller@2 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + reg = <0>; + #gpio-cells = <2>; + nr-gpio = <32>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&apb_ictl>; + interrupts = <2>; + }; + }; + + gpio3: apbgpio@F7E81000 { + compatible = "snps,dw-apb-gpio"; + dev_name = "gpio_soc_3"; + reg = <0xF7E81000 0x400>; + #address-cells = <1>; + #size-cells = <0>; + + bankd: gpio-controller@3 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + reg = <0>; + #gpio-cells = <2>; + nr-gpio = <32>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&apb_ictl>; + interrupts = <3>; + }; + }; + + gpio4: apbgpio@F7FCC000 { + compatible = "snps,dw-apb-gpio"; + dev_name = "gpio_sm_0"; + reg = <0xF7FCC000 0x400>; + #address-cells = <1>; + #size-cells = <0>; + + banke: gpio-controller@4 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + reg = <0>; + #gpio-cells = <2>; + nr-gpio = <32>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&sm_ictl>; + interrupts = <11>; + }; + }; + + gpio5: apbgpio@F7FC5000 { + compatible = "snps,dw-apb-gpio"; + dev_name = "gpio_sm_1"; + reg = <0xF7FC5000 0x400>; + #address-cells = <1>; + #size-cells = <0>; + + bankf: gpio-controller@5 { + compatible = "snps,dw-apb-gpio-bank"; + gpio-controller; + reg = <0>; + #gpio-cells = <2>; + nr-gpio = <32>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&sm_ictl>; + interrupts = <4>; + }; + }; + + i2c0: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,designware-i2c"; + interrupt-parent = <&apb_ictl>; + clocks = <&cfgclk>; + reg = <0xF7E81400 0x100>; + interrupts = <4>; + }; + + i2c1: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,designware-i2c"; + interrupt-parent = <&apb_ictl>; + clocks = <&cfgclk>; + reg = <0xF7E81800 0x100>; + interrupts = <5>; + }; + + i2c2: i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,designware-i2c"; + interrupt-parent = <&sm_ictl>; + clocks = <&osc>; + reg = <0XF7FC7000 0x100>; + interrupts = <6>; + }; + + i2c3: i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,designware-i2c"; + interrupt-parent = <&sm_ictl>; + clocks = <&osc>; + reg = <0xF7FC8000 0x100>; + interrupts = <7>; + }; + + watchdog@0xF7FC2000 { + compatible = "snps,dw-wdt"; + reg = <0xF7FC2000 0x100>; + interrupt-parent = <&sm_ictl>; + interrupts = <1>; + clocks = <&osc>; + snps,rpl = <0x2>; + }; + + opp { + compatible = "marvell,berlin2cdp-opp"; + }; + + + amp{ + compatible = "mrvl,berlin-amp"; + interrupts = <0 35 4 0 33 4 0 34 4 0 25 4 0 29 4>; + cec{ + compatible = "mrvl,berlin-cec"; + interrupt-parent = <&sm_ictl>; + interrupts = <16>; + }; + }; + + shm@29000000 { + compatible = "mrvl,berlin-shm"; + reg = <0x15000000 0x0A600000>, <0x1F600000 0x00900000>; + }; + + nfc@F7F00000 { + compatible = "mrvl,berlin-nfc"; + reg = <0xF7F00000 0x10000>, <0xF7D70000 0x10000>; + interrupts = <0 5 4>; + mrvl,nfc-dma; + mrvl,nfc-naked-cmd; + mrvl,nfc-arbi; + }; + + tsen@F7FCD000 { + compatible = "mrvl,berlin2cdp-tsen-adc33"; + reg = <0xF7FCD014 4>, + <0xF7FCD01C 4>, + <0xF7FCD070 4>, + <0xF7FCD024 4>, + <0xF7FCD028 4>; + }; + }; +}; diff --git a/arch/arm/configs/berlin2cd_amp_defconfig b/arch/arm/configs/berlin2cd_amp_defconfig new file mode 100644 index 00000000..1ae61463 --- /dev/null +++ b/arch/arm/configs/berlin2cd_amp_defconfig @@ -0,0 +1,2178 @@ +# +# Automatically generated file; DO NOT EDIT. +# Linux/arm 3.8.13 Kernel Configuration +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_VECTORS_BASE=0xffff0000 +# CONFIG_ARM_PATCH_PHYS_VIRT is not set +CONFIG_PHYS_OFFSET=0x01000000 +CONFIG_GENERIC_BUG=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_HAVE_IRQ_WORK=y +CONFIG_IRQ_WORK=y +CONFIG_BUILDTIME_EXTABLE_SORT=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_XZ=y +CONFIG_HAVE_KERNEL_LZO=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_LZMA is not set +# CONFIG_KERNEL_XZ is not set +CONFIG_KERNEL_LZO=y +CONFIG_DEFAULT_HOSTNAME="(none)" +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +# CONFIG_FHANDLE is not set +# CONFIG_AUDIT is not set +CONFIG_HAVE_GENERIC_HARDIRQS=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_SPARSE_IRQ=y +CONFIG_KTIME_SCALAR=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y + +# +# Timers subsystem +# +# CONFIG_NO_HZ is not set +# CONFIG_HIGH_RES_TIMERS is not set + +# +# CPU/Task time and stats accounting +# +CONFIG_TICK_CPU_ACCOUNTING=y +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set + +# +# RCU Subsystem +# +CONFIG_TINY_PREEMPT_RCU=y +CONFIG_PREEMPT_RCU=y +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_RCU_BOOST is not set +# CONFIG_IKCONFIG is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_CGROUPS=y +# CONFIG_CGROUP_DEBUG is not set +# CONFIG_CGROUP_FREEZER is not set +# CONFIG_CGROUP_DEVICE is not set +# CONFIG_CPUSETS is not set +CONFIG_CGROUP_CPUACCT=y +# CONFIG_RESOURCE_COUNTERS is not set +# CONFIG_CGROUP_PERF is not set +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +# CONFIG_CFS_BANDWIDTH is not set +# CONFIG_RT_GROUP_SCHED is not set +# CONFIG_BLK_CGROUP is not set +# CONFIG_CHECKPOINT_RESTORE is not set +# CONFIG_NAMESPACES is not set +# CONFIG_SCHED_AUTOGROUP is not set +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +# CONFIG_RD_XZ is not set +# CONFIG_RD_LZO is not set +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_EXPERT=y +CONFIG_HAVE_UID16=y +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +# CONFIG_BASE_FULL is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_EMBEDDED=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +CONFIG_VM_EVENT_COUNTERS=y +# CONFIG_SLUB_DEBUG is not set +CONFIG_COMPAT_BRK=y +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_SLOB is not set +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_JUMP_LABEL=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DMA_CONTIGUOUS=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_HW_BREAKPOINT=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_CLONE_BACKWARDS=y + +# +# GCOV-based kernel profiling +# +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=1 +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_MODULE_SIG is not set +CONFIG_BLOCK=y +CONFIG_LBDAF=y +CONFIG_BLK_DEV_BSG=y +# CONFIG_BLK_DEV_BSGLIB is not set +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +CONFIG_LDM_PARTITION=y +# CONFIG_LDM_DEBUG is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +CONFIG_UNINLINE_SPIN_UNLOCK=y +# CONFIG_FREEZER is not set + +# +# System Type +# +CONFIG_MMU=y +# CONFIG_ARCH_MULTIPLATFORM is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_BCM2835 is not set +# CONFIG_ARCH_CNS3XXX is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_SIRF is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_MXS is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP4XX is not set +CONFIG_ARCH_BERLIN=y +# CONFIG_ARCH_DOVE is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_LPC32XX is not set +# CONFIG_ARCH_TEGRA is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_MSM is not set +# CONFIG_ARCH_SHMOBILE is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C24XX is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_S5P64X0 is not set +# CONFIG_ARCH_S5PC100 is not set +# CONFIG_ARCH_S5PV210 is not set +# CONFIG_ARCH_EXYNOS is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_U300 is not set +# CONFIG_ARCH_U8500 is not set +# CONFIG_ARCH_NOMADIK is not set +# CONFIG_PLAT_SPEAR is not set +# CONFIG_ARCH_DAVINCI is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VT8500_SINGLE is not set + +# +# Marvell Berlin SoCs Support +# +CONFIG_ARCH_BERLIN2=y +CONFIG_BERLIN2CD=y +# CONFIG_BERLIN2CDP is not set +# CONFIG_BERLIN2Q is not set + +# +# BERLIN2 features +# +CONFIG_BERLIN_ASIC=y + +# +# BERLIN modules +# +CONFIG_BERLIN_SHM=y +CONFIG_BERLIN_CC=y +# CONFIG_BERLIN_GPIO is not set +# CONFIG_BERLIN_I2C is not set +CONFIG_BERLIN_GPU=m +CONFIG_BERLIN_GPU3D=m +# CONFIG_BERLIN_PE is not set +CONFIG_BERLIN_PXA3XX_NFC=y +CONFIG_BERLIN_NAND_RANDOMIZER=y +CONFIG_BERLIN_SDIO_WLAN_8787=m +CONFIG_BERLIN_SDIO_WLAN_8797=m +# CONFIG_BERLIN_FASTLOGO is not set +# CONFIG_GPIO_PCA953X is not set +# CONFIG_ARCH_VT8500 is not set + +# +# Processor Type +# +CONFIG_CPU_V7=y +CONFIG_CPU_32v6K=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +# CONFIG_ARM_LPAE is not set +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set +CONFIG_ARM_THUMB=y +CONFIG_ARM_THUMBEE=y +# CONFIG_ARM_VIRT_EXT is not set +CONFIG_SWP_EMULATE=y +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_OUTER_CACHE=y +CONFIG_OUTER_CACHE_SYNC=y +CONFIG_MIGHT_HAVE_CACHE_L2X0=y +CONFIG_CACHE_L2X0=y +CONFIG_CACHE_PL310=y +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_DMA_MEM_BUFFERABLE=y +CONFIG_ARM_NR_BANKS=8 +CONFIG_MULTI_IRQ_HANDLER=y +# CONFIG_ARM_ERRATA_430973 is not set +# CONFIG_ARM_ERRATA_458693 is not set +# CONFIG_ARM_ERRATA_460075 is not set +# CONFIG_PL310_ERRATA_588369 is not set +# CONFIG_ARM_ERRATA_720789 is not set +# CONFIG_PL310_ERRATA_727915 is not set +# CONFIG_ARM_ERRATA_743622 is not set +# CONFIG_ARM_ERRATA_751472 is not set +# CONFIG_PL310_ERRATA_753970 is not set +CONFIG_ARM_ERRATA_754322=y +# CONFIG_PL310_ERRATA_769419 is not set +CONFIG_ARM_ERRATA_775420=y +CONFIG_ARM_GIC=y + +# +# Bus support +# +# CONFIG_PCI_SYSCALL is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_ARM_ARCH_TIMER is not set +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_ARCH_NR_GPIO=0 +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_PREEMPT_COUNT=y +CONFIG_HZ=100 +# CONFIG_THUMB2_KERNEL is not set +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +CONFIG_HAVE_ARCH_PFN_VALID=y +# CONFIG_HIGHMEM is not set +CONFIG_HW_PERF_EVENTS=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_COMPACTION is not set +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_CROSS_MEMORY_ATTACH=y +CONFIG_NEED_PER_CPU_KM=y +# CONFIG_CLEANCACHE is not set +CONFIG_FORCE_MAX_ZONEORDER=11 +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UACCESS_WITH_MEMCPY is not set +# CONFIG_SECCOMP is not set +# CONFIG_CC_STACKPROTECTOR is not set +# CONFIG_XEN is not set + +# +# Boot options +# +CONFIG_USE_OF=y +CONFIG_ATAGS=y +# CONFIG_DEPRECATED_PARAM_STRUCT is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y +# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set +CONFIG_CMDLINE="macaddr=00:50:43:01:1E:3D console=ttyS0,115200 root=/dev/nfs nfsroot=10.37.116.100:/home/jszhang/static_bb,v3 ip=dhcp pxa3xx_nand.use_cache_program=0 mtdparts=mv_nand:2G(test)" +CONFIG_CMDLINE_FROM_BOOTLOADER=y +# CONFIG_CMDLINE_EXTEND is not set +# CONFIG_CMDLINE_FORCE is not set +# CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set +# CONFIG_CRASH_DUMP is not set +# CONFIG_AUTO_ZRELADDR is not set + +# +# CPU Power Management +# +# CONFIG_CPU_IDLE is not set +# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_NEON=y + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_HAVE_AOUT=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set +CONFIG_COREDUMP=y + +# +# Power management options +# +# CONFIG_SUSPEND is not set +CONFIG_PM_RUNTIME=y +CONFIG_PM=y +# CONFIG_PM_DEBUG is not set +# CONFIG_APM_EMULATION is not set +CONFIG_PM_CLK=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +# CONFIG_ARM_CPU_SUSPEND is not set +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_DIAG is not set +CONFIG_UNIX=y +# CONFIG_UNIX_DIAG is not set +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE_DEMUX is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +CONFIG_INET_TUNNEL=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +CONFIG_TCP_CONG_ADVANCED=y +# CONFIG_TCP_CONG_BIC is not set +CONFIG_TCP_CONG_CUBIC=y +# CONFIG_TCP_CONG_WESTWOOD is not set +# CONFIG_TCP_CONG_HTCP is not set +# CONFIG_TCP_CONG_HSTCP is not set +# CONFIG_TCP_CONG_HYBLA is not set +# CONFIG_TCP_CONG_VEGAS is not set +# CONFIG_TCP_CONG_SCALABLE is not set +# CONFIG_TCP_CONG_LP is not set +# CONFIG_TCP_CONG_VENO is not set +# CONFIG_TCP_CONG_YEAH is not set +# CONFIG_TCP_CONG_ILLINOIS is not set +CONFIG_DEFAULT_CUBIC=y +# CONFIG_DEFAULT_RENO is not set +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=y +# CONFIG_IPV6_PRIVACY is not set +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_IPV6_OPTIMISTIC_DAD=y +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_IPV6_MIP6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +CONFIG_INET6_TUNNEL=y +CONFIG_INET6_XFRM_MODE_TRANSPORT=y +CONFIG_INET6_XFRM_MODE_TUNNEL=y +CONFIG_INET6_XFRM_MODE_BEET=y +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_IPV6_SIT=y +# CONFIG_IPV6_SIT_6RD is not set +CONFIG_IPV6_NDISC_NODETYPE=y +CONFIG_IPV6_TUNNEL=y +# CONFIG_IPV6_GRE is not set +CONFIG_IPV6_MULTIPLE_TABLES=y +# CONFIG_IPV6_SUBTREES is not set +# CONFIG_IPV6_MROUTE is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_NETFILTER_ADVANCED=y + +# +# Core Netfilter Configuration +# +# CONFIG_NETFILTER_NETLINK_ACCT is not set +# CONFIG_NETFILTER_NETLINK_QUEUE is not set +# CONFIG_NETFILTER_NETLINK_LOG is not set +CONFIG_NF_CONNTRACK=y +# CONFIG_NF_CONNTRACK_MARK is not set +CONFIG_NF_CONNTRACK_PROCFS=y +# CONFIG_NF_CONNTRACK_EVENTS is not set +# CONFIG_NF_CONNTRACK_TIMEOUT is not set +# CONFIG_NF_CONNTRACK_TIMESTAMP is not set +# CONFIG_NF_CT_PROTO_DCCP is not set +# CONFIG_NF_CT_PROTO_SCTP is not set +# CONFIG_NF_CT_PROTO_UDPLITE is not set +# CONFIG_NF_CONNTRACK_AMANDA is not set +# CONFIG_NF_CONNTRACK_FTP is not set +# CONFIG_NF_CONNTRACK_H323 is not set +# CONFIG_NF_CONNTRACK_IRC is not set +# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set +# CONFIG_NF_CONNTRACK_SNMP is not set +# CONFIG_NF_CONNTRACK_PPTP is not set +# CONFIG_NF_CONNTRACK_SANE is not set +# CONFIG_NF_CONNTRACK_SIP is not set +# CONFIG_NF_CONNTRACK_TFTP is not set +# CONFIG_NF_CT_NETLINK is not set +# CONFIG_NF_CT_NETLINK_TIMEOUT is not set +CONFIG_NETFILTER_TPROXY=y +CONFIG_NETFILTER_XTABLES=y + +# +# Xtables combined modules +# +# CONFIG_NETFILTER_XT_MARK is not set +# CONFIG_NETFILTER_XT_CONNMARK is not set + +# +# Xtables targets +# +# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set +# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set +# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set +# CONFIG_NETFILTER_XT_TARGET_DSCP is not set +# CONFIG_NETFILTER_XT_TARGET_HL is not set +# CONFIG_NETFILTER_XT_TARGET_HMARK is not set +# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set +# CONFIG_NETFILTER_XT_TARGET_LOG is not set +# CONFIG_NETFILTER_XT_TARGET_MARK is not set +# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set +# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set +# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set +# CONFIG_NETFILTER_XT_TARGET_TEE is not set +# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set +# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set +# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set + +# +# Xtables matches +# +# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set +# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set +# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set +# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set +# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set +# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set +# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set +# CONFIG_NETFILTER_XT_MATCH_CPU is not set +# CONFIG_NETFILTER_XT_MATCH_DCCP is not set +# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set +# CONFIG_NETFILTER_XT_MATCH_DSCP is not set +# CONFIG_NETFILTER_XT_MATCH_ECN is not set +# CONFIG_NETFILTER_XT_MATCH_ESP is not set +# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set +# CONFIG_NETFILTER_XT_MATCH_HELPER is not set +# CONFIG_NETFILTER_XT_MATCH_HL is not set +# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set +# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set +# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set +# CONFIG_NETFILTER_XT_MATCH_MAC is not set +# CONFIG_NETFILTER_XT_MATCH_MARK is not set +# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set +# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set +# CONFIG_NETFILTER_XT_MATCH_OWNER is not set +# CONFIG_NETFILTER_XT_MATCH_POLICY is not set +# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set +# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set +# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set +# CONFIG_NETFILTER_XT_MATCH_REALM is not set +# CONFIG_NETFILTER_XT_MATCH_RECENT is not set +# CONFIG_NETFILTER_XT_MATCH_SCTP is not set +CONFIG_NETFILTER_XT_MATCH_SOCKET=y +CONFIG_NETFILTER_XT_MATCH_STATE=y +# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set +# CONFIG_NETFILTER_XT_MATCH_STRING is not set +# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set +# CONFIG_NETFILTER_XT_MATCH_TIME is not set +# CONFIG_NETFILTER_XT_MATCH_U32 is not set +# CONFIG_IP_VS is not set + +# +# IP: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV4=y +CONFIG_NF_CONNTRACK_IPV4=y +CONFIG_NF_CONNTRACK_PROC_COMPAT=y +# CONFIG_IP_NF_QUEUE is not set +CONFIG_IP_NF_IPTABLES=y +# CONFIG_IP_NF_MATCH_AH is not set +# CONFIG_IP_NF_MATCH_ECN is not set +# CONFIG_IP_NF_MATCH_RPFILTER is not set +# CONFIG_IP_NF_MATCH_TTL is not set +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=y +# CONFIG_IP_NF_TARGET_ULOG is not set +# CONFIG_NF_NAT_IPV4 is not set +CONFIG_IP_NF_MANGLE=y +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set +# CONFIG_IP_NF_TARGET_ECN is not set +# CONFIG_IP_NF_TARGET_TTL is not set +# CONFIG_IP_NF_RAW is not set +# CONFIG_IP_NF_ARPTABLES is not set + +# +# IPv6: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV6=y +# CONFIG_NF_CONNTRACK_IPV6 is not set +CONFIG_IP6_NF_IPTABLES=y +# CONFIG_IP6_NF_MATCH_AH is not set +# CONFIG_IP6_NF_MATCH_EUI64 is not set +# CONFIG_IP6_NF_MATCH_FRAG is not set +# CONFIG_IP6_NF_MATCH_OPTS is not set +# CONFIG_IP6_NF_MATCH_HL is not set +# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set +# CONFIG_IP6_NF_MATCH_MH is not set +# CONFIG_IP6_NF_MATCH_RPFILTER is not set +# CONFIG_IP6_NF_MATCH_RT is not set +# CONFIG_IP6_NF_FILTER is not set +# CONFIG_IP6_NF_MANGLE is not set +# CONFIG_IP6_NF_RAW is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_L2TP is not set +# CONFIG_BRIDGE is not set +CONFIG_HAVE_NET_DSA=y +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +# CONFIG_NET_SCHED is not set +# CONFIG_DCB is not set +CONFIG_DNS_RESOLVER=y +# CONFIG_BATMAN_ADV is not set +# CONFIG_OPENVSWITCH is not set +# CONFIG_NETPRIO_CGROUP is not set +CONFIG_BQL=y +# CONFIG_BPF_JIT is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +CONFIG_BT=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=y + +# +# Bluetooth device drivers +# +# CONFIG_BT_HCIBTUSB is not set +# CONFIG_BT_HCIBTSDIO is not set +# CONFIG_BT_HCIUART is not set +# CONFIG_BT_HCIBCM203X is not set +# CONFIG_BT_HCIBPA10X is not set +# CONFIG_BT_HCIBFUSB is not set +# CONFIG_BT_HCIVHCI is not set +CONFIG_BT_MRVL=m +# CONFIG_BT_MRVL_SDIO is not set +# CONFIG_AF_RXRPC is not set +CONFIG_FIB_RULES=y +CONFIG_WIRELESS=y +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_WEXT_SPY=y +CONFIG_WEXT_PRIV=y +CONFIG_CFG80211=y +# CONFIG_NL80211_TESTMODE is not set +# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_CFG80211_REG_DEBUG is not set +# CONFIG_CFG80211_CERTIFICATION_ONUS is not set +CONFIG_CFG80211_DEFAULT_PS=y +# CONFIG_CFG80211_INTERNAL_REGDB is not set +CONFIG_CFG80211_WEXT=y +# CONFIG_LIB80211 is not set +# CONFIG_MAC80211 is not set +# CONFIG_WIMAX is not set +CONFIG_RFKILL=y +# CONFIG_RFKILL_INPUT is not set +# CONFIG_RFKILL_GPIO is not set +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set +# CONFIG_NFC is not set +CONFIG_HAVE_BPF_JIT=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="/sbin/mdev" +# CONFIG_DEVTMPFS is not set +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_FIRMWARE_IN_KERNEL is not set +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_GENERIC_CPU_DEVICES is not set +# CONFIG_DMA_SHARED_BUFFER is not set +# CONFIG_CMA is not set + +# +# Bus devices +# +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_TESTS is not set +# CONFIG_MTD_REDBOOT_PARTS is not set +CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_AFS_PARTS is not set +CONFIG_MTD_OF_PARTS=y +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_SM_FTL is not set +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +# CONFIG_MTD_DOCG3 is not set +CONFIG_MTD_NAND_ECC=y +# CONFIG_MTD_NAND_ECC_SMC is not set +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_ECC_BCH is not set +# CONFIG_MTD_SM_COMMON is not set +# CONFIG_MTD_NAND_MUSEUM_IDS is not set +# CONFIG_MTD_NAND_DENALI is not set +# CONFIG_MTD_NAND_GPIO is not set +CONFIG_MTD_NAND_IDS=y +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_DOCG4 is not set +# CONFIG_MTD_NAND_NANDSIM is not set +# CONFIG_MTD_NAND_PLATFORM is not set +# CONFIG_MTD_ALAUDA is not set +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR flash memory drivers +# +# CONFIG_MTD_LPDDR is not set +# CONFIG_MTD_UBI is not set +CONFIG_DTC=y +CONFIG_OF=y + +# +# Device Tree and Open Firmware support +# +# CONFIG_PROC_DEVICETREE is not set +# CONFIG_OF_SELFTEST is not set +CONFIG_OF_FLATTREE=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_IRQ=y +CONFIG_OF_DEVICE=y +CONFIG_OF_I2C=y +CONFIG_OF_NET=y +CONFIG_OF_MTD=y +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_DRBD is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=1 +CONFIG_BLK_DEV_RAM_SIZE=32768 +# CONFIG_BLK_DEV_XIP is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_MG_DISK is not set +# CONFIG_BLK_DEV_RBD is not set + +# +# Misc devices +# +# CONFIG_SENSORS_LIS3LV02D is not set +# CONFIG_AD525X_DPOT is not set +# CONFIG_ATMEL_PWM is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_APDS9802ALS is not set +# CONFIG_ISL29003 is not set +# CONFIG_ISL29020 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_SENSORS_BH1780 is not set +# CONFIG_SENSORS_BH1770 is not set +# CONFIG_SENSORS_APDS990X is not set +# CONFIG_HMC6352 is not set +# CONFIG_DS1682 is not set +# CONFIG_BMP085_I2C is not set +# CONFIG_USB_SWITCH_FSA9480 is not set +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +# CONFIG_EEPROM_AT24 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +# CONFIG_EEPROM_93CX6 is not set + +# +# Texas Instruments shared transport line discipline +# +# CONFIG_TI_ST is not set +# CONFIG_SENSORS_LIS3_I2C is not set + +# +# Altera FPGA firmware download module +# +# CONFIG_ALTERA_STAPL is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_SCSI_PROC_FS is not set + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +CONFIG_CHR_DEV_SG=y +# CONFIG_CHR_DEV_SCH is not set +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +CONFIG_SCSI_SCAN_ASYNC=y + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +# CONFIG_SCSI_LOWLEVEL is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +# CONFIG_ATA is not set +# CONFIG_MD is not set +# CONFIG_TARGET_CORE is not set +CONFIG_NETDEVICES=y +CONFIG_NET_CORE=y +# CONFIG_BONDING is not set +# CONFIG_DUMMY is not set +# CONFIG_EQUALIZER is not set +CONFIG_MII=y +# CONFIG_NET_TEAM is not set +# CONFIG_MACVLAN is not set +# CONFIG_VXLAN is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +CONFIG_TUN=y +# CONFIG_VETH is not set + +# +# CAIF transport drivers +# + +# +# Distributed Switch Architecture drivers +# +# CONFIG_NET_DSA_MV88E6XXX is not set +# CONFIG_NET_DSA_MV88E6060 is not set +# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set +# CONFIG_NET_DSA_MV88E6131 is not set +# CONFIG_NET_DSA_MV88E6123_61_65 is not set +CONFIG_ETHERNET=y +# CONFIG_NET_CADENCE is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_CALXEDA_XGMAC is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_DM9000 is not set +# CONFIG_DNET is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +CONFIG_NET_VENDOR_MARVELL=y +# CONFIG_MVMDIO is not set +CONFIG_BERLIN_FASTETH=y +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_ETHOC is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_WIZNET is not set +# CONFIG_PHYLIB is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +CONFIG_USB_RTL8150=y +# CONFIG_USB_USBNET is not set +# CONFIG_USB_HSO is not set +# CONFIG_USB_IPHETH is not set +CONFIG_WLAN=y +# CONFIG_USB_ZD1201 is not set +# CONFIG_USB_NET_RNDIS_WLAN is not set +# CONFIG_ATH_CARDS is not set +# CONFIG_BRCMFMAC is not set +# CONFIG_HOSTAP is not set +# CONFIG_LIBERTAS is not set +# CONFIG_WL_TI is not set +# CONFIG_MWIFIEX is not set + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# +# CONFIG_WAN is not set +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=y +# CONFIG_INPUT_POLLDEV is not set +# CONFIG_INPUT_SPARSEKMAP is not set +# CONFIG_INPUT_MATRIXKMAP is not set + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_JOYSTICK=y +# CONFIG_JOYSTICK_ANALOG is not set +# CONFIG_JOYSTICK_A3D is not set +# CONFIG_JOYSTICK_ADI is not set +# CONFIG_JOYSTICK_COBRA is not set +# CONFIG_JOYSTICK_GF2K is not set +# CONFIG_JOYSTICK_GRIP is not set +# CONFIG_JOYSTICK_GRIP_MP is not set +# CONFIG_JOYSTICK_GUILLEMOT is not set +# CONFIG_JOYSTICK_INTERACT is not set +# CONFIG_JOYSTICK_SIDEWINDER is not set +# CONFIG_JOYSTICK_TMDC is not set +# CONFIG_JOYSTICK_IFORCE is not set +# CONFIG_JOYSTICK_WARRIOR is not set +# CONFIG_JOYSTICK_MAGELLAN is not set +# CONFIG_JOYSTICK_SPACEORB is not set +# CONFIG_JOYSTICK_SPACEBALL is not set +# CONFIG_JOYSTICK_STINGER is not set +# CONFIG_JOYSTICK_TWIDJOY is not set +# CONFIG_JOYSTICK_ZHENHUA is not set +# CONFIG_JOYSTICK_AS5011 is not set +# CONFIG_JOYSTICK_JOYDUMP is not set +CONFIG_JOYSTICK_XPAD=y +CONFIG_JOYSTICK_XPAD_FF=y +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_AD714X is not set +# CONFIG_INPUT_BMA150 is not set +# CONFIG_INPUT_MMA8450 is not set +# CONFIG_INPUT_MPU3050 is not set +# CONFIG_INPUT_GP2A is not set +# CONFIG_INPUT_GPIO_TILT_POLLED is not set +# CONFIG_INPUT_ATI_REMOTE2 is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +# CONFIG_INPUT_KXTJ9 is not set +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +CONFIG_INPUT_UINPUT=y +# CONFIG_INPUT_PCF8574 is not set +# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set +# CONFIG_INPUT_ADXL34X is not set +# CONFIG_INPUT_CMA3000 is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +# CONFIG_VT is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set +# CONFIG_TRACE_SINK is not set +# CONFIG_DEVKMEM is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_DW=y +# CONFIG_SERIAL_8250_EM is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_OF_PLATFORM is not set +# CONFIG_SERIAL_SCCNXP is not set +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +# CONFIG_SERIAL_XILINX_PS_UART is not set +# CONFIG_SERIAL_ARC is not set +# CONFIG_TTY_PRINTK is not set +# CONFIG_HVC_DCC is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_COMPAT=y +CONFIG_I2C_CHARDEV=y +# CONFIG_I2C_MUX is not set +CONFIG_I2C_HELPER_AUTO=y + +# +# I2C Hardware Bus support +# + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_CBUS_GPIO is not set +CONFIG_I2C_DESIGNWARE_CORE=y +CONFIG_I2C_DESIGNWARE_PLATFORM=y +# CONFIG_I2C_GPIO is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_PXA_PCI is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_DIOLAN_U2C is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_SPI is not set +# CONFIG_HSI is not set + +# +# PPS support +# +# CONFIG_PPS is not set + +# +# PPS generators support +# + +# +# PTP clock support +# +# CONFIG_PTP_1588_CLOCK is not set + +# +# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. +# +# CONFIG_PTP_1588_CLOCK_PCH is not set +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIOLIB=y +CONFIG_OF_GPIO=y +# CONFIG_DEBUG_GPIO is not set +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_GENERIC=y + +# +# Memory mapped GPIO drivers: +# +# CONFIG_GPIO_GENERIC_PLATFORM is not set +CONFIG_GPIO_DWAPB=y +# CONFIG_GPIO_EM is not set +# CONFIG_GPIO_TS5500 is not set + +# +# I2C GPIO expanders: +# +# CONFIG_GPIO_MAX7300 is not set +# CONFIG_GPIO_MAX732X is not set +# CONFIG_GPIO_PCF857X is not set +# CONFIG_GPIO_SX150X is not set +# CONFIG_GPIO_ADP5588 is not set +# CONFIG_GPIO_ADNP is not set + +# +# PCI GPIO expanders: +# + +# +# SPI GPIO expanders: +# +# CONFIG_GPIO_MCP23S08 is not set + +# +# AC97 GPIO expanders: +# + +# +# MODULbus GPIO expanders: +# + +# +# USB GPIO expanders: +# +# CONFIG_W1 is not set +# CONFIG_POWER_SUPPLY is not set +# CONFIG_POWER_AVS is not set +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Native drivers +# +# CONFIG_SENSORS_AD7414 is not set +# CONFIG_SENSORS_AD7418 is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1029 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM9240 is not set +# CONFIG_SENSORS_ADT7410 is not set +# CONFIG_SENSORS_ADT7411 is not set +# CONFIG_SENSORS_ADT7462 is not set +# CONFIG_SENSORS_ADT7470 is not set +# CONFIG_SENSORS_ADT7475 is not set +# CONFIG_SENSORS_ASC7621 is not set +# CONFIG_SENSORS_ATXP1 is not set +# CONFIG_SENSORS_DS620 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_F71805F is not set +# CONFIG_SENSORS_F71882FG is not set +# CONFIG_SENSORS_F75375S is not set +# CONFIG_SENSORS_G760A is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_GPIO_FAN is not set +# CONFIG_SENSORS_HIH6130 is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_JC42 is not set +# CONFIG_SENSORS_LINEAGE is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM73 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_LM92 is not set +# CONFIG_SENSORS_LM93 is not set +# CONFIG_SENSORS_LTC4151 is not set +# CONFIG_SENSORS_LTC4215 is not set +# CONFIG_SENSORS_LTC4245 is not set +# CONFIG_SENSORS_LTC4261 is not set +# CONFIG_SENSORS_LM95241 is not set +# CONFIG_SENSORS_LM95245 is not set +# CONFIG_SENSORS_MAX16065 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_MAX1668 is not set +# CONFIG_SENSORS_MAX197 is not set +# CONFIG_SENSORS_MAX6639 is not set +# CONFIG_SENSORS_MAX6642 is not set +# CONFIG_SENSORS_MAX6650 is not set +# CONFIG_SENSORS_MCP3021 is not set +# CONFIG_SENSORS_NTC_THERMISTOR is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_PC87427 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_PMBUS is not set +# CONFIG_SENSORS_SHT15 is not set +# CONFIG_SENSORS_SHT21 is not set +# CONFIG_SENSORS_SMM665 is not set +# CONFIG_SENSORS_DME1737 is not set +# CONFIG_SENSORS_EMC1403 is not set +# CONFIG_SENSORS_EMC2103 is not set +# CONFIG_SENSORS_EMC6W201 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47M192 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SCH56XX_COMMON is not set +# CONFIG_SENSORS_ADS1015 is not set +# CONFIG_SENSORS_ADS7828 is not set +# CONFIG_SENSORS_AMC6821 is not set +# CONFIG_SENSORS_INA2XX is not set +# CONFIG_SENSORS_THMC50 is not set +# CONFIG_SENSORS_TMP102 is not set +# CONFIG_SENSORS_TMP401 is not set +# CONFIG_SENSORS_TMP421 is not set +CONFIG_SENSORS_TSEN_ADC33=y +# CONFIG_SENSORS_VT1211 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83791D is not set +# CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83793 is not set +# CONFIG_SENSORS_W83795 is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83L786NG is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +# CONFIG_THERMAL is not set +# CONFIG_WATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +# CONFIG_SSB is not set +CONFIG_BCMA_POSSIBLE=y + +# +# Broadcom specific AMBA +# +# CONFIG_BCMA is not set + +# +# Multifunction device drivers +# +# CONFIG_MFD_CORE is not set +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_88PM800 is not set +# CONFIG_MFD_88PM805 is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_ASIC3 is not set +# CONFIG_MFD_TI_AM335X_TSCADC is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_HTC_I2CPLD is not set +# CONFIG_MFD_LM3533 is not set +# CONFIG_TPS6105X is not set +# CONFIG_TPS65010 is not set +# CONFIG_TPS6507X is not set +# CONFIG_MFD_TPS65217 is not set +# CONFIG_MFD_TPS6586X is not set +# CONFIG_MFD_TPS65910 is not set +# CONFIG_MFD_TPS65912_I2C is not set +# CONFIG_MFD_TPS80031 is not set +# CONFIG_TWL4030_CORE is not set +# CONFIG_TWL6040_CORE is not set +# CONFIG_MFD_STMPE is not set +# CONFIG_MFD_TC3589X is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_SMSC is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_MFD_DA9052_I2C is not set +# CONFIG_MFD_DA9055 is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_LP8788 is not set +# CONFIG_MFD_MAX77686 is not set +# CONFIG_MFD_MAX77693 is not set +# CONFIG_MFD_MAX8907 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_MAX8997 is not set +# CONFIG_MFD_MAX8998 is not set +# CONFIG_MFD_SEC_CORE is not set +# CONFIG_MFD_ARIZONA_I2C is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X_I2C is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_WM8994 is not set +# CONFIG_MFD_PCF50633 is not set +# CONFIG_MFD_MC13XXX_I2C is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_MFD_WL1273_CORE is not set +# CONFIG_MFD_TPS65090 is not set +# CONFIG_MFD_AAT2870_CORE is not set +# CONFIG_MFD_RC5T583 is not set +# CONFIG_MFD_SYSCON is not set +# CONFIG_MFD_PALMAS is not set +# CONFIG_MFD_VIPERBOARD is not set +# CONFIG_MFD_RETU is not set +# CONFIG_MFD_AS3711 is not set +# CONFIG_REGULATOR is not set +# CONFIG_MEDIA_SUPPORT is not set + +# +# Graphics support +# +# CONFIG_DRM is not set +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +# CONFIG_FB is not set +# CONFIG_EXYNOS_VIDEO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set +# CONFIG_SOUND is not set + +# +# HID support +# +CONFIG_HID=y +CONFIG_HIDRAW=y +CONFIG_UHID=y +CONFIG_HID_GENERIC=y + +# +# Special HID drivers +# +# CONFIG_HID_A4TECH is not set +# CONFIG_HID_ACRUX is not set +# CONFIG_HID_APPLE is not set +# CONFIG_HID_AUREAL is not set +# CONFIG_HID_BELKIN is not set +# CONFIG_HID_CHERRY is not set +# CONFIG_HID_CHICONY is not set +# CONFIG_HID_CYPRESS is not set +# CONFIG_HID_DRAGONRISE is not set +# CONFIG_HID_EMS_FF is not set +# CONFIG_HID_ELECOM is not set +# CONFIG_HID_EZKEY is not set +# CONFIG_HID_HOLTEK is not set +# CONFIG_HID_KEYTOUCH is not set +# CONFIG_HID_KYE is not set +# CONFIG_HID_UCLOGIC is not set +# CONFIG_HID_WALTOP is not set +# CONFIG_HID_GYRATION is not set +# CONFIG_HID_ICADE is not set +# CONFIG_HID_TWINHAN is not set +# CONFIG_HID_KENSINGTON is not set +# CONFIG_HID_LCPOWER is not set +# CONFIG_HID_LENOVO_TPKBD is not set +CONFIG_HID_LOGITECH=y +CONFIG_HID_LOGITECH_DJ=y +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_LOGIWHEELS_FF=y +# CONFIG_HID_MAGICMOUSE is not set +# CONFIG_HID_MICROSOFT is not set +# CONFIG_HID_MONTEREY is not set +# CONFIG_HID_MULTITOUCH is not set +# CONFIG_HID_NTRIG is not set +# CONFIG_HID_ORTEK is not set +# CONFIG_HID_PANTHERLORD is not set +# CONFIG_HID_PETALYNX is not set +# CONFIG_HID_PICOLCD is not set +# CONFIG_HID_PRIMAX is not set +# CONFIG_HID_PS3REMOTE is not set +# CONFIG_HID_ROCCAT is not set +# CONFIG_HID_SAITEK is not set +# CONFIG_HID_SAMSUNG is not set +# CONFIG_HID_SONY is not set +# CONFIG_HID_SPEEDLINK is not set +# CONFIG_HID_SUNPLUS is not set +# CONFIG_HID_GREENASIA is not set +# CONFIG_HID_SMARTJOYPLUS is not set +# CONFIG_HID_TIVO is not set +# CONFIG_HID_TOPSEED is not set +# CONFIG_HID_THRUSTMASTER is not set +# CONFIG_HID_ZEROPLUS is not set +# CONFIG_HID_ZYDACRON is not set +# CONFIG_HID_SENSOR_HUB is not set + +# +# USB HID support +# +CONFIG_USB_HID=y +CONFIG_HID_PID=y +CONFIG_USB_HIDDEV=y + +# +# I2C HID support +# +# CONFIG_I2C_HID is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set +CONFIG_USB_ARCH_HAS_EHCI=y +# CONFIG_USB_ARCH_HAS_XHCI is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_COMMON=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y + +# +# Miscellaneous USB options +# +CONFIG_USB_DYNAMIC_MINORS=y +CONFIG_USB_SUSPEND=y +# CONFIG_USB_OTG is not set +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +# CONFIG_USB_MON is not set +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_EHCI_TT_NEWSCHED=y +CONFIG_USB_EHCI_BERLIN=y +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_EHCI_HCD_PLATFORM is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_CHIPIDEA is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_WDM is not set +# CONFIG_USB_TMC is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_REALTEK is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +# CONFIG_USB_STORAGE_ENE_UB6250 is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB port drivers +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set +# CONFIG_USB_TEST is not set +# CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_YUREX is not set +# CONFIG_USB_EZUSB_FX2 is not set + +# +# USB Physical Layer drivers +# +# CONFIG_USB_ISP1301 is not set +# CONFIG_USB_RCAR_PHY is not set +# CONFIG_USB_GADGET is not set + +# +# OTG and related infrastructure +# +# CONFIG_USB_GPIO_VBUS is not set +# CONFIG_USB_ULPI is not set +# CONFIG_NOP_USB_XCEIV is not set +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +# CONFIG_MMC_UNSAFE_RESUME is not set +# CONFIG_MMC_CLKGATE is not set + +# +# MMC/SD/SDIO Card Drivers +# +# CONFIG_MMC_BLOCK is not set +# CONFIG_SDIO_UART is not set +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_IO_ACCESSORS=y +CONFIG_MMC_SDHCI_PLTFM=y +# CONFIG_MMC_SDHCI_PXAV3 is not set +# CONFIG_MMC_SDHCI_PXAV2 is not set +CONFIG_MMC_SDHCI_MV=y +# CONFIG_MMC_DW is not set +# CONFIG_MMC_VUB300 is not set +# CONFIG_MMC_USHC is not set +# CONFIG_MEMSTICK is not set +# CONFIG_NEW_LEDS is not set +# CONFIG_ACCESSIBILITY is not set +# CONFIG_EDAC is not set +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set + +# +# Virtio drivers +# +# CONFIG_VIRTIO_MMIO is not set + +# +# Microsoft Hyper-V guest support +# +# CONFIG_STAGING is not set +CONFIG_CLKDEV_LOOKUP=y + +# +# Hardware Spinlock drivers +# +CONFIG_DW_APB_TIMER=y +# CONFIG_IOMMU_SUPPORT is not set + +# +# Remoteproc drivers (EXPERIMENTAL) +# +# CONFIG_STE_MODEM_RPROC is not set + +# +# Rpmsg drivers (EXPERIMENTAL) +# +# CONFIG_VIRT_DRIVERS is not set +# CONFIG_PM_DEVFREQ is not set +# CONFIG_EXTCON is not set +# CONFIG_MEMORY is not set +# CONFIG_IIO is not set +# CONFIG_PWM is not set +# CONFIG_IPACK_BUS is not set + +# +# File systems +# +CONFIG_DCACHE_WORD_ACCESS=y +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +CONFIG_EXT4_FS=y +CONFIG_EXT4_USE_FOR_EXT23=y +# CONFIG_EXT4_FS_POSIX_ACL is not set +# CONFIG_EXT4_FS_SECURITY is not set +# CONFIG_EXT4_DEBUG is not set +CONFIG_JBD2=y +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_BTRFS_FS is not set +# CONFIG_NILFS2_FS is not set +# CONFIG_FS_POSIX_ACL is not set +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +# CONFIG_DNOTIFY is not set +CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set +# CONFIG_QUOTA is not set +# CONFIG_QUOTACTL is not set +# CONFIG_AUTOFS4_FS is not set +CONFIG_FUSE_FS=y +CONFIG_CUSE=y + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +CONFIG_NTFS_FS=y +# CONFIG_NTFS_DEBUG is not set +# CONFIG_NTFS_RW is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +# CONFIG_PROC_PAGE_MONITOR is not set +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_TMPFS_XATTR is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_ECRYPT_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_YAFFS_FS=y +CONFIG_YAFFS_YAFFS1=y +# CONFIG_YAFFS_9BYTE_TAGS is not set +# CONFIG_YAFFS_DOES_ECC is not set +CONFIG_YAFFS_YAFFS2=y +CONFIG_YAFFS_AUTO_YAFFS2=y +CONFIG_YAFFS_DISABLE_TAGS_ECC=y +# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set +# CONFIG_YAFFS_EMPTY_LOST_AND_FOUND is not set +# CONFIG_YAFFS_DISABLE_BLOCK_REFRESHING is not set +# CONFIG_YAFFS_DISABLE_BACKGROUND is not set +CONFIG_YAFFS_XATTR=y +# CONFIG_JFFS2_FS is not set +# CONFIG_LOGFS is not set +# CONFIG_CRAMFS is not set +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_XATTR is not set +CONFIG_SQUASHFS_ZLIB=y +# CONFIG_SQUASHFS_LZO is not set +# CONFIG_SQUASHFS_XZ is not set +# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set +CONFIG_SQUASHFS_EMBEDDED=y +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX6FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_PSTORE is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +# CONFIG_F2FS_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +# CONFIG_NFS_V2 is not set +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_SWAP is not set +CONFIG_ROOT_NFS=y +# CONFIG_NFSD is not set +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +# CONFIG_SUNRPC_DEBUG is not set +# CONFIG_CEPH_FS is not set +CONFIG_CIFS=y +# CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_UPCALL is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_DEBUG is not set +# CONFIG_CIFS_DFS_UPCALL is not set +# CONFIG_CIFS_SMB2 is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_MAC_ROMAN is not set +# CONFIG_NLS_MAC_CELTIC is not set +# CONFIG_NLS_MAC_CENTEURO is not set +# CONFIG_NLS_MAC_CROATIAN is not set +# CONFIG_NLS_MAC_CYRILLIC is not set +# CONFIG_NLS_MAC_GAELIC is not set +# CONFIG_NLS_MAC_GREEK is not set +# CONFIG_NLS_MAC_ICELAND is not set +# CONFIG_NLS_MAC_INUIT is not set +# CONFIG_NLS_MAC_ROMANIAN is not set +# CONFIG_NLS_MAC_TURKISH is not set +CONFIG_NLS_UTF8=y + +# +# Kernel hacking +# +CONFIG_PRINTK_TIME=y +CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +CONFIG_MAGIC_SYSRQ=y +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_READABLE_ASM is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_SECTION_MISMATCH is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +# CONFIG_LOCKUP_DETECTOR is not set +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +CONFIG_DETECT_HUNG_TASK=y +CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +# CONFIG_SCHED_DEBUG is not set +# CONFIG_SCHEDSTATS is not set +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_SLUB_STATS is not set +CONFIG_HAVE_DEBUG_KMEMLEAK=y +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_PROVE_RCU_DELAY is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_ATOMIC_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set +CONFIG_FRAME_POINTER=y +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_RCU_TRACE is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_NOTIFIER_ERROR_INJECTION is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_LATENCYTOP is not set +# CONFIG_DEBUG_PAGEALLOC is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_TRACE_CLOCK=y +CONFIG_RING_BUFFER=y +CONFIG_RING_BUFFER_ALLOW_SWAP=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_RBTREE_TEST is not set +# CONFIG_INTERVAL_TREE_TEST is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_TEST_KSTRTOX is not set +# CONFIG_STRICT_DEVMEM is not set +# CONFIG_ARM_UNWIND is not set +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_LL is not set +CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" +# CONFIG_PID_IN_CONTEXTIDR is not set + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_ENCRYPTED_KEYS is not set +# CONFIG_KEYS_DEBUG_PROC_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +# CONFIG_CRYPTO_USER is not set +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_NULL is not set +CONFIG_CRYPTO_WORKQUEUE=y +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_GHASH is not set +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA1_ARM is not set +CONFIG_CRYPTO_SHA256=y +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_AES_ARM is not set +# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_TWOFISH=y +CONFIG_CRYPTO_TWOFISH_COMMON=y + +# +# Compression +# +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_ZLIB is not set +# CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_USER_API_HASH is not set +# CONFIG_CRYPTO_USER_API_SKCIPHER is not set +# CONFIG_CRYPTO_HW is not set +# CONFIG_ASYMMETRIC_KEY_TYPE is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_IO=y +CONFIG_PERCPU_RWSEM=y +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +# CONFIG_CRC_T10DIF is not set +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +# CONFIG_CRC32_SELFTEST is not set +CONFIG_CRC32_SLICEBY8=y +# CONFIG_CRC32_SLICEBY4 is not set +# CONFIG_CRC32_SARWATE is not set +# CONFIG_CRC32_BIT is not set +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +# CONFIG_CRC8 is not set +CONFIG_ZLIB_INFLATE=y +# CONFIG_XZ_DEC is not set +# CONFIG_XZ_DEC_BCJ is not set +CONFIG_DECOMPRESS_GZIP=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_DQL=y +CONFIG_NLATTR=y +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +# CONFIG_AVERAGE is not set +# CONFIG_CORDIC is not set +# CONFIG_DDR is not set diff --git a/arch/arm/configs/berlin2cdp_defconfig b/arch/arm/configs/berlin2cdp_defconfig new file mode 100644 index 00000000..ebd35b97 --- /dev/null +++ b/arch/arm/configs/berlin2cdp_defconfig @@ -0,0 +1,1766 @@ +# +# Automatically generated file; DO NOT EDIT. +# Linux/arm 3.8.13 Kernel Configuration +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_VECTORS_BASE=0xffff0000 +# CONFIG_ARM_PATCH_PHYS_VIRT is not set +CONFIG_PHYS_OFFSET=0x01000000 +CONFIG_GENERIC_BUG=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_HAVE_IRQ_WORK=y +CONFIG_IRQ_WORK=y +CONFIG_BUILDTIME_EXTABLE_SORT=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_XZ=y +CONFIG_HAVE_KERNEL_LZO=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_LZMA is not set +# CONFIG_KERNEL_XZ is not set +CONFIG_KERNEL_LZO=y +CONFIG_DEFAULT_HOSTNAME="(none)" +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +# CONFIG_FHANDLE is not set +# CONFIG_AUDIT is not set +CONFIG_HAVE_GENERIC_HARDIRQS=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_IRQ_DOMAIN=y +CONFIG_SPARSE_IRQ=y +CONFIG_KTIME_SCALAR=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y + +# +# Timers subsystem +# +# CONFIG_NO_HZ is not set +# CONFIG_HIGH_RES_TIMERS is not set + +# +# CPU/Task time and stats accounting +# +CONFIG_TICK_CPU_ACCOUNTING=y +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set + +# +# RCU Subsystem +# +CONFIG_TREE_PREEMPT_RCU=y +CONFIG_PREEMPT_RCU=y +CONFIG_RCU_FANOUT=32 +CONFIG_RCU_FANOUT_LEAF=16 +# CONFIG_RCU_FANOUT_EXACT is not set +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_RCU_BOOST is not set +# CONFIG_RCU_NOCB_CPU is not set +# CONFIG_IKCONFIG is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_CGROUPS=y +# CONFIG_CGROUP_DEBUG is not set +# CONFIG_CGROUP_FREEZER is not set +# CONFIG_CGROUP_DEVICE is not set +# CONFIG_CPUSETS is not set +CONFIG_CGROUP_CPUACCT=y +# CONFIG_RESOURCE_COUNTERS is not set +# CONFIG_CGROUP_PERF is not set +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +# CONFIG_CFS_BANDWIDTH is not set +# CONFIG_RT_GROUP_SCHED is not set +# CONFIG_BLK_CGROUP is not set +# CONFIG_CHECKPOINT_RESTORE is not set +# CONFIG_NAMESPACES is not set +# CONFIG_SCHED_AUTOGROUP is not set +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +# CONFIG_RD_XZ is not set +# CONFIG_RD_LZO is not set +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_EXPERT=y +CONFIG_HAVE_UID16=y +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +# CONFIG_BASE_FULL is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_EMBEDDED=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +CONFIG_VM_EVENT_COUNTERS=y +# CONFIG_SLUB_DEBUG is not set +CONFIG_COMPAT_BRK=y +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_SLOB is not set +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_JUMP_LABEL=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DMA_CONTIGUOUS=y +CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_HW_BREAKPOINT=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_CLONE_BACKWARDS=y + +# +# GCOV-based kernel profiling +# +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=1 +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_MODULE_SIG is not set +CONFIG_STOP_MACHINE=y +CONFIG_BLOCK=y +CONFIG_LBDAF=y +CONFIG_BLK_DEV_BSG=y +# CONFIG_BLK_DEV_BSGLIB is not set +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +CONFIG_LDM_PARTITION=y +# CONFIG_LDM_DEBUG is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +CONFIG_UNINLINE_SPIN_UNLOCK=y +CONFIG_MUTEX_SPIN_ON_OWNER=y +# CONFIG_FREEZER is not set + +# +# System Type +# +CONFIG_MMU=y +# CONFIG_ARCH_MULTIPLATFORM is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_BCM2835 is not set +# CONFIG_ARCH_CNS3XXX is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_SIRF is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_MXS is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP4XX is not set +CONFIG_ARCH_BERLIN=y +# CONFIG_ARCH_DOVE is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_LPC32XX is not set +# CONFIG_ARCH_TEGRA is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_MSM is not set +# CONFIG_ARCH_SHMOBILE is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C24XX is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_S5P64X0 is not set +# CONFIG_ARCH_S5PC100 is not set +# CONFIG_ARCH_S5PV210 is not set +# CONFIG_ARCH_EXYNOS is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_U300 is not set +# CONFIG_ARCH_U8500 is not set +# CONFIG_ARCH_NOMADIK is not set +# CONFIG_PLAT_SPEAR is not set +# CONFIG_ARCH_DAVINCI is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VT8500_SINGLE is not set + +# +# Marvell Berlin SoCs Support +# +CONFIG_ARCH_BERLIN2=y +# CONFIG_BERLIN2CD is not set +CONFIG_BERLIN2CDP=y +# CONFIG_BERLIN2Q is not set + +# +# BERLIN2 features +# +CONFIG_BERLIN_ASIC=y + +# +# BERLIN modules +# +CONFIG_BERLIN_SHM=y +CONFIG_BERLIN_CC=y +CONFIG_BERLIN_GPIO=y +CONFIG_BERLIN_I2C=y +CONFIG_BERLIN_GPU=m +CONFIG_BERLIN_GPU3D=m +CONFIG_BERLIN_PE=m +CONFIG_BERLIN_PXA3XX_NFC=y +CONFIG_BERLIN_NAND_RANDOMIZER=y +# CONFIG_BERLIN_NAND_READ_RETRY is not set +# CONFIG_BERLIN_SDIO_WLAN_8787 is not set +# CONFIG_BERLIN_SDIO_WLAN_8797 is not set +CONFIG_BERLIN_SDIO_WLAN_8801=m +# CONFIG_BERLIN_FASTLOGO is not set +# CONFIG_ARCH_VT8500 is not set + +# +# Processor Type +# +CONFIG_CPU_V7=y +CONFIG_CPU_32v6K=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +# CONFIG_ARM_LPAE is not set +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set +CONFIG_ARM_THUMB=y +CONFIG_ARM_THUMBEE=y +# CONFIG_ARM_VIRT_EXT is not set +CONFIG_SWP_EMULATE=y +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_MIGHT_HAVE_CACHE_L2X0=y +# CONFIG_CACHE_L2X0 is not set +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_DMA_MEM_BUFFERABLE=y +CONFIG_ARM_NR_BANKS=8 +CONFIG_MULTI_IRQ_HANDLER=y +# CONFIG_ARM_ERRATA_430973 is not set +# CONFIG_ARM_ERRATA_458693 is not set +# CONFIG_ARM_ERRATA_460075 is not set +# CONFIG_ARM_ERRATA_742230 is not set +# CONFIG_ARM_ERRATA_742231 is not set +# CONFIG_ARM_ERRATA_720789 is not set +# CONFIG_ARM_ERRATA_743622 is not set +# CONFIG_ARM_ERRATA_751472 is not set +CONFIG_ARM_ERRATA_754322=y +# CONFIG_ARM_ERRATA_754327 is not set +CONFIG_ARM_ERRATA_764369=y +# CONFIG_ARM_ERRATA_775420 is not set +CONFIG_ARM_GIC=y + +# +# Bus support +# +# CONFIG_PCI_SYSCALL is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_HAVE_SMP=y +CONFIG_SMP=y +CONFIG_SMP_ON_UP=y +CONFIG_ARM_CPU_TOPOLOGY=y +# CONFIG_SCHED_MC is not set +# CONFIG_SCHED_SMT is not set +CONFIG_HAVE_ARM_SCU=y +# CONFIG_ARM_ARCH_TIMER is not set +CONFIG_HAVE_ARM_TWD=y +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_NR_CPUS=4 +# CONFIG_HOTPLUG_CPU is not set +CONFIG_LOCAL_TIMERS=y +CONFIG_ARCH_NR_GPIO=0 +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_PREEMPT_COUNT=y +CONFIG_HZ=100 +# CONFIG_THUMB2_KERNEL is not set +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +CONFIG_HAVE_ARCH_PFN_VALID=y +# CONFIG_HIGHMEM is not set +CONFIG_HW_PERF_EVENTS=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_COMPACTION is not set +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_CROSS_MEMORY_ATTACH=y +# CONFIG_CLEANCACHE is not set +CONFIG_FORCE_MAX_ZONEORDER=11 +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UACCESS_WITH_MEMCPY is not set +# CONFIG_SECCOMP is not set +# CONFIG_CC_STACKPROTECTOR is not set +# CONFIG_XEN is not set + +# +# Boot options +# +CONFIG_USE_OF=y +CONFIG_ATAGS=y +# CONFIG_DEPRECATED_PARAM_STRUCT is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y +# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set +CONFIG_CMDLINE="macaddr=00:50:43:01:1E:3D console=ttyS0,115200 root=/dev/nfs nfsroot=10.37.116.100:/home/jszhang/static_bb,v3 ip=dhcp pxa3xx_nand.use_cache_program=0 mtdparts=mv_nand:2G(test)" +CONFIG_CMDLINE_FROM_BOOTLOADER=y +# CONFIG_CMDLINE_EXTEND is not set +# CONFIG_CMDLINE_FORCE is not set +# CONFIG_XIP_KERNEL is not set +# CONFIG_CRASH_DUMP is not set +# CONFIG_AUTO_ZRELADDR is not set + +# +# CPU Power Management +# +# CONFIG_CPU_IDLE is not set +# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_NEON=y + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_HAVE_AOUT=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set +CONFIG_COREDUMP=y + +# +# Power management options +# +# CONFIG_SUSPEND is not set +CONFIG_PM_RUNTIME=y +CONFIG_PM=y +# CONFIG_PM_DEBUG is not set +# CONFIG_APM_EMULATION is not set +CONFIG_PM_CLK=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +# CONFIG_ARM_CPU_SUSPEND is not set +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_DIAG is not set +CONFIG_UNIX=y +# CONFIG_UNIX_DIAG is not set +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE_DEMUX is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +CONFIG_INET_TUNNEL=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +CONFIG_TCP_CONG_ADVANCED=y +# CONFIG_TCP_CONG_BIC is not set +CONFIG_TCP_CONG_CUBIC=y +# CONFIG_TCP_CONG_WESTWOOD is not set +# CONFIG_TCP_CONG_HTCP is not set +# CONFIG_TCP_CONG_HSTCP is not set +# CONFIG_TCP_CONG_HYBLA is not set +# CONFIG_TCP_CONG_VEGAS is not set +# CONFIG_TCP_CONG_SCALABLE is not set +# CONFIG_TCP_CONG_LP is not set +# CONFIG_TCP_CONG_VENO is not set +# CONFIG_TCP_CONG_YEAH is not set +# CONFIG_TCP_CONG_ILLINOIS is not set +CONFIG_DEFAULT_CUBIC=y +# CONFIG_DEFAULT_RENO is not set +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=y +# CONFIG_IPV6_PRIVACY is not set +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_IPV6_OPTIMISTIC_DAD=y +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_IPV6_MIP6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +CONFIG_INET6_TUNNEL=y +CONFIG_INET6_XFRM_MODE_TRANSPORT=y +CONFIG_INET6_XFRM_MODE_TUNNEL=y +CONFIG_INET6_XFRM_MODE_BEET=y +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_IPV6_SIT=y +# CONFIG_IPV6_SIT_6RD is not set +CONFIG_IPV6_NDISC_NODETYPE=y +CONFIG_IPV6_TUNNEL=y +# CONFIG_IPV6_GRE is not set +CONFIG_IPV6_MULTIPLE_TABLES=y +# CONFIG_IPV6_SUBTREES is not set +# CONFIG_IPV6_MROUTE is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_NETFILTER_ADVANCED=y + +# +# Core Netfilter Configuration +# +# CONFIG_NETFILTER_NETLINK_ACCT is not set +# CONFIG_NETFILTER_NETLINK_QUEUE is not set +# CONFIG_NETFILTER_NETLINK_LOG is not set +CONFIG_NF_CONNTRACK=y +# CONFIG_NF_CONNTRACK_MARK is not set +CONFIG_NF_CONNTRACK_PROCFS=y +# CONFIG_NF_CONNTRACK_EVENTS is not set +# CONFIG_NF_CONNTRACK_TIMEOUT is not set +# CONFIG_NF_CONNTRACK_TIMESTAMP is not set +# CONFIG_NF_CT_PROTO_DCCP is not set +# CONFIG_NF_CT_PROTO_SCTP is not set +# CONFIG_NF_CT_PROTO_UDPLITE is not set +# CONFIG_NF_CONNTRACK_AMANDA is not set +# CONFIG_NF_CONNTRACK_FTP is not set +# CONFIG_NF_CONNTRACK_H323 is not set +# CONFIG_NF_CONNTRACK_IRC is not set +# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set +# CONFIG_NF_CONNTRACK_SNMP is not set +# CONFIG_NF_CONNTRACK_PPTP is not set +# CONFIG_NF_CONNTRACK_SANE is not set +# CONFIG_NF_CONNTRACK_SIP is not set +# CONFIG_NF_CONNTRACK_TFTP is not set +# CONFIG_NF_CT_NETLINK is not set +# CONFIG_NF_CT_NETLINK_TIMEOUT is not set +CONFIG_NETFILTER_TPROXY=y +CONFIG_NETFILTER_XTABLES=y + +# +# Xtables combined modules +# +# CONFIG_NETFILTER_XT_MARK is not set +# CONFIG_NETFILTER_XT_CONNMARK is not set + +# +# Xtables targets +# +# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set +# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set +# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set +# CONFIG_NETFILTER_XT_TARGET_DSCP is not set +# CONFIG_NETFILTER_XT_TARGET_HL is not set +# CONFIG_NETFILTER_XT_TARGET_HMARK is not set +# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set +# CONFIG_NETFILTER_XT_TARGET_LOG is not set +# CONFIG_NETFILTER_XT_TARGET_MARK is not set +# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set +# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set +# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set +# CONFIG_NETFILTER_XT_TARGET_TEE is not set +# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set +# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set +# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set + +# +# Xtables matches +# +# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set +# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set +# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set +# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set +# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set +# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set +# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set +# CONFIG_NETFILTER_XT_MATCH_CPU is not set +# CONFIG_NETFILTER_XT_MATCH_DCCP is not set +# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set +# CONFIG_NETFILTER_XT_MATCH_DSCP is not set +# CONFIG_NETFILTER_XT_MATCH_ECN is not set +# CONFIG_NETFILTER_XT_MATCH_ESP is not set +# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set +# CONFIG_NETFILTER_XT_MATCH_HELPER is not set +# CONFIG_NETFILTER_XT_MATCH_HL is not set +# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set +# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set +# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set +# CONFIG_NETFILTER_XT_MATCH_MAC is not set +# CONFIG_NETFILTER_XT_MATCH_MARK is not set +# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set +# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set +# CONFIG_NETFILTER_XT_MATCH_OWNER is not set +# CONFIG_NETFILTER_XT_MATCH_POLICY is not set +# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set +# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set +# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set +# CONFIG_NETFILTER_XT_MATCH_REALM is not set +# CONFIG_NETFILTER_XT_MATCH_RECENT is not set +# CONFIG_NETFILTER_XT_MATCH_SCTP is not set +CONFIG_NETFILTER_XT_MATCH_SOCKET=y +CONFIG_NETFILTER_XT_MATCH_STATE=y +# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set +# CONFIG_NETFILTER_XT_MATCH_STRING is not set +# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set +# CONFIG_NETFILTER_XT_MATCH_TIME is not set +# CONFIG_NETFILTER_XT_MATCH_U32 is not set +# CONFIG_IP_VS is not set + +# +# IP: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV4=y +CONFIG_NF_CONNTRACK_IPV4=y +CONFIG_NF_CONNTRACK_PROC_COMPAT=y +# CONFIG_IP_NF_QUEUE is not set +CONFIG_IP_NF_IPTABLES=y +# CONFIG_IP_NF_MATCH_AH is not set +# CONFIG_IP_NF_MATCH_ECN is not set +# CONFIG_IP_NF_MATCH_RPFILTER is not set +# CONFIG_IP_NF_MATCH_TTL is not set +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=y +# CONFIG_IP_NF_TARGET_ULOG is not set +# CONFIG_NF_NAT_IPV4 is not set +CONFIG_IP_NF_MANGLE=y +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set +# CONFIG_IP_NF_TARGET_ECN is not set +# CONFIG_IP_NF_TARGET_TTL is not set +# CONFIG_IP_NF_RAW is not set +# CONFIG_IP_NF_ARPTABLES is not set + +# +# IPv6: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV6=y +# CONFIG_NF_CONNTRACK_IPV6 is not set +CONFIG_IP6_NF_IPTABLES=y +# CONFIG_IP6_NF_MATCH_AH is not set +# CONFIG_IP6_NF_MATCH_EUI64 is not set +# CONFIG_IP6_NF_MATCH_FRAG is not set +# CONFIG_IP6_NF_MATCH_OPTS is not set +# CONFIG_IP6_NF_MATCH_HL is not set +# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set +# CONFIG_IP6_NF_MATCH_MH is not set +# CONFIG_IP6_NF_MATCH_RPFILTER is not set +# CONFIG_IP6_NF_MATCH_RT is not set +# CONFIG_IP6_NF_FILTER is not set +# CONFIG_IP6_NF_MANGLE is not set +# CONFIG_IP6_NF_RAW is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_L2TP is not set +# CONFIG_BRIDGE is not set +CONFIG_HAVE_NET_DSA=y +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +# CONFIG_NET_SCHED is not set +# CONFIG_DCB is not set +CONFIG_DNS_RESOLVER=y +# CONFIG_BATMAN_ADV is not set +# CONFIG_OPENVSWITCH is not set +CONFIG_RPS=y +CONFIG_RFS_ACCEL=y +CONFIG_XPS=y +# CONFIG_NETPRIO_CGROUP is not set +CONFIG_BQL=y +# CONFIG_BPF_JIT is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +CONFIG_BT=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=y + +# +# Bluetooth device drivers +# +# CONFIG_BT_HCIBTSDIO is not set +# CONFIG_BT_HCIUART is not set +# CONFIG_BT_HCIVHCI is not set +CONFIG_BT_MRVL=m +# CONFIG_BT_MRVL_SDIO is not set +# CONFIG_AF_RXRPC is not set +CONFIG_FIB_RULES=y +CONFIG_WIRELESS=y +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_WEXT_SPY=y +CONFIG_WEXT_PRIV=y +CONFIG_CFG80211=y +# CONFIG_NL80211_TESTMODE is not set +# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_CFG80211_REG_DEBUG is not set +# CONFIG_CFG80211_CERTIFICATION_ONUS is not set +CONFIG_CFG80211_DEFAULT_PS=y +# CONFIG_CFG80211_INTERNAL_REGDB is not set +CONFIG_CFG80211_WEXT=y +# CONFIG_LIB80211 is not set +# CONFIG_MAC80211 is not set +# CONFIG_WIMAX is not set +CONFIG_RFKILL=y +# CONFIG_RFKILL_INPUT is not set +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set +# CONFIG_NFC is not set +CONFIG_HAVE_BPF_JIT=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="/sbin/mdev" +# CONFIG_DEVTMPFS is not set +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_FIRMWARE_IN_KERNEL is not set +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_GENERIC_CPU_DEVICES is not set +# CONFIG_DMA_SHARED_BUFFER is not set +# CONFIG_CMA is not set + +# +# Bus devices +# +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_TESTS is not set +# CONFIG_MTD_REDBOOT_PARTS is not set +CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_AFS_PARTS is not set +CONFIG_MTD_OF_PARTS=y +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_SM_FTL is not set +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +# CONFIG_MTD_DOCG3 is not set +CONFIG_MTD_NAND_ECC=y +# CONFIG_MTD_NAND_ECC_SMC is not set +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_ECC_BCH is not set +# CONFIG_MTD_SM_COMMON is not set +# CONFIG_MTD_NAND_MUSEUM_IDS is not set +# CONFIG_MTD_NAND_DENALI is not set +CONFIG_MTD_NAND_IDS=y +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_DOCG4 is not set +# CONFIG_MTD_NAND_NANDSIM is not set +# CONFIG_MTD_NAND_PLATFORM is not set +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR flash memory drivers +# +# CONFIG_MTD_LPDDR is not set +# CONFIG_MTD_UBI is not set +CONFIG_DTC=y +CONFIG_OF=y + +# +# Device Tree and Open Firmware support +# +# CONFIG_PROC_DEVICETREE is not set +# CONFIG_OF_SELFTEST is not set +CONFIG_OF_FLATTREE=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_IRQ=y +CONFIG_OF_DEVICE=y +CONFIG_OF_NET=y +CONFIG_OF_MTD=y +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_DRBD is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=1 +CONFIG_BLK_DEV_RAM_SIZE=32768 +# CONFIG_BLK_DEV_XIP is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_BLK_DEV_RBD is not set + +# +# Misc devices +# +# CONFIG_SENSORS_LIS3LV02D is not set +# CONFIG_ATMEL_PWM is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +# CONFIG_EEPROM_93CX6 is not set + +# +# Texas Instruments shared transport line discipline +# + +# +# Altera FPGA firmware download module +# + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_SCSI_PROC_FS is not set + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +CONFIG_CHR_DEV_SG=y +# CONFIG_CHR_DEV_SCH is not set +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +CONFIG_SCSI_SCAN_ASYNC=y + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +# CONFIG_SCSI_LOWLEVEL is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +# CONFIG_ATA is not set +# CONFIG_MD is not set +# CONFIG_TARGET_CORE is not set +CONFIG_NETDEVICES=y +CONFIG_NET_CORE=y +# CONFIG_BONDING is not set +# CONFIG_DUMMY is not set +# CONFIG_EQUALIZER is not set +CONFIG_MII=y +# CONFIG_NET_TEAM is not set +# CONFIG_MACVLAN is not set +# CONFIG_VXLAN is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +CONFIG_TUN=y +# CONFIG_VETH is not set + +# +# CAIF transport drivers +# + +# +# Distributed Switch Architecture drivers +# +# CONFIG_NET_DSA_MV88E6XXX is not set +# CONFIG_NET_DSA_MV88E6060 is not set +# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set +# CONFIG_NET_DSA_MV88E6131 is not set +# CONFIG_NET_DSA_MV88E6123_61_65 is not set +CONFIG_ETHERNET=y +# CONFIG_NET_CADENCE is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_CALXEDA_XGMAC is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_DM9000 is not set +# CONFIG_DNET is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +CONFIG_NET_VENDOR_MARVELL=y +# CONFIG_MVMDIO is not set +CONFIG_BERLIN_FASTETH=y +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_ETHOC is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_WIZNET is not set +# CONFIG_PHYLIB is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +CONFIG_WLAN=y +# CONFIG_ATH_CARDS is not set +# CONFIG_BRCMFMAC is not set +# CONFIG_HOSTAP is not set +# CONFIG_LIBERTAS is not set +# CONFIG_WL_TI is not set +# CONFIG_MWIFIEX is not set + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# +# CONFIG_WAN is not set +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=y +# CONFIG_INPUT_POLLDEV is not set +# CONFIG_INPUT_SPARSEKMAP is not set +# CONFIG_INPUT_MATRIXKMAP is not set + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_JOYSTICK=y +# CONFIG_JOYSTICK_ANALOG is not set +# CONFIG_JOYSTICK_A3D is not set +# CONFIG_JOYSTICK_ADI is not set +# CONFIG_JOYSTICK_COBRA is not set +# CONFIG_JOYSTICK_GF2K is not set +# CONFIG_JOYSTICK_GRIP is not set +# CONFIG_JOYSTICK_GRIP_MP is not set +# CONFIG_JOYSTICK_GUILLEMOT is not set +# CONFIG_JOYSTICK_INTERACT is not set +# CONFIG_JOYSTICK_SIDEWINDER is not set +# CONFIG_JOYSTICK_TMDC is not set +# CONFIG_JOYSTICK_IFORCE is not set +# CONFIG_JOYSTICK_WARRIOR is not set +# CONFIG_JOYSTICK_MAGELLAN is not set +# CONFIG_JOYSTICK_SPACEORB is not set +# CONFIG_JOYSTICK_SPACEBALL is not set +# CONFIG_JOYSTICK_STINGER is not set +# CONFIG_JOYSTICK_TWIDJOY is not set +# CONFIG_JOYSTICK_ZHENHUA is not set +# CONFIG_JOYSTICK_JOYDUMP is not set +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_AD714X is not set +CONFIG_INPUT_UINPUT=y +# CONFIG_INPUT_ADXL34X is not set +# CONFIG_INPUT_CMA3000 is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +# CONFIG_VT is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set +# CONFIG_TRACE_SINK is not set +# CONFIG_DEVKMEM is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_DW=y +# CONFIG_SERIAL_8250_EM is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_OF_PLATFORM is not set +# CONFIG_SERIAL_SCCNXP is not set +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +# CONFIG_SERIAL_XILINX_PS_UART is not set +# CONFIG_SERIAL_ARC is not set +# CONFIG_TTY_PRINTK is not set +# CONFIG_HVC_DCC is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_I2C is not set +# CONFIG_SPI is not set +# CONFIG_HSI is not set + +# +# PPS support +# +# CONFIG_PPS is not set + +# +# PPS generators support +# + +# +# PTP clock support +# +# CONFIG_PTP_1588_CLOCK is not set + +# +# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. +# +# CONFIG_PTP_1588_CLOCK_PCH is not set +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y +# CONFIG_W1 is not set +# CONFIG_POWER_SUPPLY is not set +# CONFIG_POWER_AVS is not set +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Native drivers +# +# CONFIG_SENSORS_F71805F is not set +# CONFIG_SENSORS_F71882FG is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_MAX197 is not set +# CONFIG_SENSORS_NTC_THERMISTOR is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_PC87427 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SCH56XX_COMMON is not set +CONFIG_SENSORS_TSEN_ADC33=y +# CONFIG_SENSORS_VT1211 is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +# CONFIG_THERMAL is not set +# CONFIG_WATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +# CONFIG_SSB is not set +CONFIG_BCMA_POSSIBLE=y + +# +# Broadcom specific AMBA +# +# CONFIG_BCMA is not set + +# +# Multifunction device drivers +# +# CONFIG_MFD_CORE is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_TI_AM335X_TSCADC is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_MFD_SYSCON is not set +# CONFIG_REGULATOR is not set +# CONFIG_MEDIA_SUPPORT is not set + +# +# Graphics support +# +# CONFIG_DRM is not set +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +# CONFIG_FB is not set +# CONFIG_EXYNOS_VIDEO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set +# CONFIG_SOUND is not set + +# +# HID support +# +CONFIG_HID=y +CONFIG_HIDRAW=y +CONFIG_UHID=y +CONFIG_HID_GENERIC=y + +# +# Special HID drivers +# +# CONFIG_HID_APPLE is not set +# CONFIG_HID_ELECOM is not set +# CONFIG_HID_ICADE is not set +# CONFIG_HID_MAGICMOUSE is not set +# CONFIG_HID_PS3REMOTE is not set +# CONFIG_HID_TIVO is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB_ARCH_HAS_EHCI is not set +# CONFIG_USB_ARCH_HAS_XHCI is not set +# CONFIG_USB_SUPPORT is not set +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +# CONFIG_MMC_UNSAFE_RESUME is not set +# CONFIG_MMC_CLKGATE is not set + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_MINORS=8 +CONFIG_MMC_BLOCK_BOUNCE=y +# CONFIG_SDIO_UART is not set +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_IO_ACCESSORS=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_PXAV3=y +# CONFIG_MMC_SDHCI_PXAV2 is not set +CONFIG_MMC_SDHCI_MV=y +# CONFIG_MMC_DW is not set +# CONFIG_MEMSTICK is not set +# CONFIG_NEW_LEDS is not set +# CONFIG_ACCESSIBILITY is not set +# CONFIG_EDAC is not set +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set + +# +# Virtio drivers +# +# CONFIG_VIRTIO_MMIO is not set + +# +# Microsoft Hyper-V guest support +# +# CONFIG_STAGING is not set +CONFIG_CLKDEV_LOOKUP=y + +# +# Hardware Spinlock drivers +# +CONFIG_DW_APB_TIMER=y +# CONFIG_IOMMU_SUPPORT is not set + +# +# Remoteproc drivers (EXPERIMENTAL) +# +# CONFIG_STE_MODEM_RPROC is not set + +# +# Rpmsg drivers (EXPERIMENTAL) +# +# CONFIG_VIRT_DRIVERS is not set +# CONFIG_PM_DEVFREQ is not set +# CONFIG_EXTCON is not set +# CONFIG_MEMORY is not set +# CONFIG_IIO is not set +# CONFIG_PWM is not set +# CONFIG_IPACK_BUS is not set + +# +# File systems +# +CONFIG_DCACHE_WORD_ACCESS=y +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +CONFIG_EXT4_FS=y +CONFIG_EXT4_USE_FOR_EXT23=y +# CONFIG_EXT4_FS_POSIX_ACL is not set +# CONFIG_EXT4_FS_SECURITY is not set +# CONFIG_EXT4_DEBUG is not set +CONFIG_JBD2=y +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_BTRFS_FS is not set +# CONFIG_NILFS2_FS is not set +# CONFIG_FS_POSIX_ACL is not set +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +# CONFIG_DNOTIFY is not set +CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set +# CONFIG_QUOTA is not set +# CONFIG_QUOTACTL is not set +# CONFIG_AUTOFS4_FS is not set +CONFIG_FUSE_FS=y +CONFIG_CUSE=y + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +CONFIG_NTFS_FS=y +# CONFIG_NTFS_DEBUG is not set +# CONFIG_NTFS_RW is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +# CONFIG_PROC_PAGE_MONITOR is not set +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_TMPFS_XATTR is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_ECRYPT_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_YAFFS_FS=y +CONFIG_YAFFS_YAFFS1=y +# CONFIG_YAFFS_9BYTE_TAGS is not set +# CONFIG_YAFFS_DOES_ECC is not set +CONFIG_YAFFS_YAFFS2=y +CONFIG_YAFFS_AUTO_YAFFS2=y +CONFIG_YAFFS_DISABLE_TAGS_ECC=y +# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set +# CONFIG_YAFFS_EMPTY_LOST_AND_FOUND is not set +# CONFIG_YAFFS_DISABLE_BLOCK_REFRESHING is not set +# CONFIG_YAFFS_DISABLE_BACKGROUND is not set +CONFIG_YAFFS_XATTR=y +# CONFIG_JFFS2_FS is not set +# CONFIG_LOGFS is not set +# CONFIG_CRAMFS is not set +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_XATTR is not set +CONFIG_SQUASHFS_ZLIB=y +# CONFIG_SQUASHFS_LZO is not set +# CONFIG_SQUASHFS_XZ is not set +# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set +CONFIG_SQUASHFS_EMBEDDED=y +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX6FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_PSTORE is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +# CONFIG_F2FS_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +# CONFIG_NFS_V2 is not set +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_SWAP is not set +CONFIG_ROOT_NFS=y +# CONFIG_NFSD is not set +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +# CONFIG_SUNRPC_DEBUG is not set +# CONFIG_CEPH_FS is not set +CONFIG_CIFS=y +# CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_UPCALL is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_DEBUG is not set +# CONFIG_CIFS_DFS_UPCALL is not set +# CONFIG_CIFS_SMB2 is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_MAC_ROMAN is not set +# CONFIG_NLS_MAC_CELTIC is not set +# CONFIG_NLS_MAC_CENTEURO is not set +# CONFIG_NLS_MAC_CROATIAN is not set +# CONFIG_NLS_MAC_CYRILLIC is not set +# CONFIG_NLS_MAC_GAELIC is not set +# CONFIG_NLS_MAC_GREEK is not set +# CONFIG_NLS_MAC_ICELAND is not set +# CONFIG_NLS_MAC_INUIT is not set +# CONFIG_NLS_MAC_ROMANIAN is not set +# CONFIG_NLS_MAC_TURKISH is not set +CONFIG_NLS_UTF8=y + +# +# Kernel hacking +# +CONFIG_PRINTK_TIME=y +CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +CONFIG_MAGIC_SYSRQ=y +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_READABLE_ASM is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_SECTION_MISMATCH is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +# CONFIG_LOCKUP_DETECTOR is not set +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +CONFIG_DETECT_HUNG_TASK=y +CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +# CONFIG_SCHED_DEBUG is not set +# CONFIG_SCHEDSTATS is not set +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_SLUB_STATS is not set +CONFIG_HAVE_DEBUG_KMEMLEAK=y +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_PROVE_RCU_DELAY is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_ATOMIC_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set +CONFIG_FRAME_POINTER=y +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +CONFIG_RCU_CPU_STALL_TIMEOUT=21 +CONFIG_RCU_CPU_STALL_VERBOSE=y +# CONFIG_RCU_CPU_STALL_INFO is not set +# CONFIG_RCU_TRACE is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_DEBUG_PER_CPU_MAPS is not set +# CONFIG_NOTIFIER_ERROR_INJECTION is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_DEBUG_PAGEALLOC is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_TRACE_CLOCK=y +CONFIG_RING_BUFFER=y +CONFIG_RING_BUFFER_ALLOW_SWAP=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_RBTREE_TEST is not set +# CONFIG_INTERVAL_TREE_TEST is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_TEST_KSTRTOX is not set +# CONFIG_STRICT_DEVMEM is not set +# CONFIG_ARM_UNWIND is not set +CONFIG_DEBUG_USER=y +CONFIG_DEBUG_LL=y +CONFIG_DEBUG_BERLIN_UART=y +# CONFIG_DEBUG_LL_UART_NONE is not set +# CONFIG_DEBUG_ICEDCC is not set +# CONFIG_DEBUG_SEMIHOSTING is not set +CONFIG_DEBUG_LL_INCLUDE="debug/berlin.S" +CONFIG_EARLY_PRINTK=y +# CONFIG_PID_IN_CONTEXTIDR is not set + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_ENCRYPTED_KEYS is not set +# CONFIG_KEYS_DEBUG_PROC_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +# CONFIG_CRYPTO_USER is not set +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_PCRYPT is not set +CONFIG_CRYPTO_WORKQUEUE=y +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_GHASH is not set +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA1_ARM is not set +CONFIG_CRYPTO_SHA256=y +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_AES_ARM is not set +# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_TWOFISH=y +CONFIG_CRYPTO_TWOFISH_COMMON=y + +# +# Compression +# +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_ZLIB is not set +# CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_USER_API_HASH is not set +# CONFIG_CRYPTO_USER_API_SKCIPHER is not set +# CONFIG_CRYPTO_HW is not set +# CONFIG_ASYMMETRIC_KEY_TYPE is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_IO=y +CONFIG_PERCPU_RWSEM=y +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +# CONFIG_CRC_T10DIF is not set +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +# CONFIG_CRC32_SELFTEST is not set +CONFIG_CRC32_SLICEBY8=y +# CONFIG_CRC32_SLICEBY4 is not set +# CONFIG_CRC32_SARWATE is not set +# CONFIG_CRC32_BIT is not set +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +# CONFIG_CRC8 is not set +CONFIG_ZLIB_INFLATE=y +# CONFIG_XZ_DEC is not set +# CONFIG_XZ_DEC_BCJ is not set +CONFIG_DECOMPRESS_GZIP=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_CPU_RMAP=y +CONFIG_DQL=y +CONFIG_NLATTR=y +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +# CONFIG_AVERAGE is not set +# CONFIG_CORDIC is not set +# CONFIG_DDR is not set diff --git a/arch/arm/configs/chorizo_defconfig b/arch/arm/configs/chorizo_defconfig new file mode 100644 index 00000000..d7618a54 --- /dev/null +++ b/arch/arm/configs/chorizo_defconfig @@ -0,0 +1,2125 @@ +# +# Automatically generated file; DO NOT EDIT. +# Linux/arm 3.8.13 Kernel Configuration +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_ARCH_HAS_CPUFREQ=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_VECTORS_BASE=0xffff0000 +# CONFIG_ARM_PATCH_PHYS_VIRT is not set +CONFIG_PHYS_OFFSET=0x01100000 +CONFIG_GENERIC_BUG=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_HAVE_IRQ_WORK=y +CONFIG_IRQ_WORK=y +CONFIG_BUILDTIME_EXTABLE_SORT=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_XZ=y +CONFIG_HAVE_KERNEL_LZO=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_LZMA is not set +CONFIG_KERNEL_XZ=y +# CONFIG_KERNEL_LZO is not set +CONFIG_DEFAULT_HOSTNAME="(none)" +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +# CONFIG_FHANDLE is not set +# CONFIG_AUDIT is not set +CONFIG_HAVE_GENERIC_HARDIRQS=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_SPARSE_IRQ=y +CONFIG_KTIME_SCALAR=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y + +# +# Timers subsystem +# +# CONFIG_NO_HZ is not set +# CONFIG_HIGH_RES_TIMERS is not set + +# +# CPU/Task time and stats accounting +# +CONFIG_TICK_CPU_ACCOUNTING=y +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set + +# +# RCU Subsystem +# +CONFIG_TREE_PREEMPT_RCU=y +CONFIG_PREEMPT_RCU=y +CONFIG_RCU_FANOUT=32 +CONFIG_RCU_FANOUT_LEAF=16 +# CONFIG_RCU_FANOUT_EXACT is not set +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_RCU_BOOST is not set +# CONFIG_RCU_NOCB_CPU is not set +# CONFIG_IKCONFIG is not set +CONFIG_LOG_BUF_SHIFT=17 +CONFIG_CGROUPS=y +# CONFIG_CGROUP_DEBUG is not set +# CONFIG_CGROUP_FREEZER is not set +# CONFIG_CGROUP_DEVICE is not set +# CONFIG_CPUSETS is not set +CONFIG_CGROUP_CPUACCT=y +# CONFIG_RESOURCE_COUNTERS is not set +# CONFIG_CGROUP_PERF is not set +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +# CONFIG_CFS_BANDWIDTH is not set +# CONFIG_RT_GROUP_SCHED is not set +# CONFIG_BLK_CGROUP is not set +# CONFIG_CHECKPOINT_RESTORE is not set +CONFIG_NAMESPACES=y +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_USER_NS is not set +CONFIG_PID_NS=y +CONFIG_NET_NS=y +CONFIG_UIDGID_CONVERTED=y +# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set +# CONFIG_SCHED_AUTOGROUP is not set +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +CONFIG_RD_XZ=y +# CONFIG_RD_LZO is not set +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_EXPERT=y +CONFIG_HAVE_UID16=y +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +# CONFIG_BASE_FULL is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_EMBEDDED=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +CONFIG_VM_EVENT_COUNTERS=y +# CONFIG_SLUB_DEBUG is not set +CONFIG_COMPAT_BRK=y +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_SLOB is not set +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +CONFIG_HAVE_OPROFILE=y +CONFIG_JUMP_LABEL=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DMA_CONTIGUOUS=y +CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_HW_BREAKPOINT=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_SECCOMP_FILTER=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_CLONE_BACKWARDS=y + +# +# GCOV-based kernel profiling +# +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=1 +# CONFIG_MODULES is not set +CONFIG_BLOCK=y +CONFIG_LBDAF=y +CONFIG_BLK_DEV_BSG=y +# CONFIG_BLK_DEV_BSGLIB is not set +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +CONFIG_LDM_PARTITION=y +# CONFIG_LDM_DEBUG is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +CONFIG_UNINLINE_SPIN_UNLOCK=y +CONFIG_MUTEX_SPIN_ON_OWNER=y +# CONFIG_FREEZER is not set + +# +# System Type +# +CONFIG_MMU=y +# CONFIG_ARCH_MULTIPLATFORM is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_BCM2835 is not set +# CONFIG_ARCH_CNS3XXX is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_SIRF is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_MXS is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP4XX is not set +CONFIG_ARCH_BERLIN=y +# CONFIG_ARCH_DOVE is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_LPC32XX is not set +# CONFIG_ARCH_TEGRA is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_MSM is not set +# CONFIG_ARCH_SHMOBILE is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C24XX is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_S5P64X0 is not set +# CONFIG_ARCH_S5PC100 is not set +# CONFIG_ARCH_S5PV210 is not set +# CONFIG_ARCH_EXYNOS is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_U300 is not set +# CONFIG_ARCH_U8500 is not set +# CONFIG_ARCH_NOMADIK is not set +# CONFIG_PLAT_SPEAR is not set +# CONFIG_ARCH_DAVINCI is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VT8500_SINGLE is not set + +# +# Marvell Berlin SoCs Support +# +CONFIG_ARCH_BERLIN2=y +# CONFIG_BERLIN2CD is not set +# CONFIG_BERLIN2Q is not set +CONFIG_BERLIN2CDP=y + +# +# BERLIN2 features +# +CONFIG_BERLIN_ASIC=y + +# +# BERLIN modules +# +CONFIG_BERLIN_SHM=y +CONFIG_BERLIN_CC=y +# CONFIG_BERLIN_GPIO is not set +# CONFIG_BERLIN_I2C is not set +# CONFIG_BERLIN_GPU is not set +CONFIG_BERLIN_GPU3D=y +# CONFIG_BERLIN_PE is not set +CONFIG_BERLIN_AMP=y +CONFIG_BERLIN_TZDD=y +CONFIG_BERLIN_TZDD_CB=y +CONFIG_BERLIN_PXA3XX_NFC=y +CONFIG_BERLIN_NAND_RANDOMIZER=y +# CONFIG_BERLIN_NAND_READ_RETRY is not set +# CONFIG_BERLIN_SDIO_WLAN_8787 is not set +# CONFIG_BERLIN_SDIO_WLAN_8797 is not set +# CONFIG_BERLIN_SDIO_WLAN_8801 is not set +CONFIG_BERLIN_SDIO_WLAN_8887=y +CONFIG_BERLIN_SDIO_BT_8887_CHAR_DRV=y +CONFIG_BERLIN_FASTLOGO=y +CONFIG_BERLIN_PWM=y +# CONFIG_GPIO_PCA953X is not set +# CONFIG_ARCH_VT8500 is not set + +# +# Processor Type +# +CONFIG_CPU_V7=y +CONFIG_CPU_32v6K=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +# CONFIG_ARM_LPAE is not set +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set +CONFIG_ARM_THUMB=y +CONFIG_ARM_THUMBEE=y +# CONFIG_ARM_VIRT_EXT is not set +CONFIG_SWP_EMULATE=y +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_MIGHT_HAVE_CACHE_L2X0=y +# CONFIG_CACHE_L2X0 is not set +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_DMA_MEM_BUFFERABLE=y +CONFIG_ARM_NR_BANKS=8 +CONFIG_MULTI_IRQ_HANDLER=y +# CONFIG_ARM_ERRATA_430973 is not set +# CONFIG_ARM_ERRATA_458693 is not set +# CONFIG_ARM_ERRATA_460075 is not set +# CONFIG_ARM_ERRATA_742230 is not set +# CONFIG_ARM_ERRATA_742231 is not set +# CONFIG_ARM_ERRATA_720789 is not set +# CONFIG_ARM_ERRATA_743622 is not set +# CONFIG_ARM_ERRATA_751472 is not set +# CONFIG_ARM_ERRATA_754322 is not set +# CONFIG_ARM_ERRATA_754327 is not set +# CONFIG_ARM_ERRATA_764369 is not set +# CONFIG_ARM_ERRATA_775420 is not set +# CONFIG_ARM_ERRATA_782773 is not set +CONFIG_ARM_ERRATA_814220=y +CONFIG_ARM_GIC=y + +# +# Bus support +# +# CONFIG_PCI_SYSCALL is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_HAVE_SMP=y +CONFIG_SMP=y +CONFIG_SMP_ON_UP=y +CONFIG_ARM_CPU_TOPOLOGY=y +# CONFIG_SCHED_MC is not set +# CONFIG_SCHED_SMT is not set +CONFIG_HAVE_ARM_SCU=y +CONFIG_ARM_ARCH_TIMER=y +CONFIG_HAVE_ARM_TWD=y +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_NR_CPUS=2 +# CONFIG_HOTPLUG_CPU is not set +CONFIG_LOCAL_TIMERS=y +CONFIG_ARCH_NR_GPIO=0 +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_PREEMPT_COUNT=y +CONFIG_HZ=100 +# CONFIG_THUMB2_KERNEL is not set +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +CONFIG_HAVE_ARCH_PFN_VALID=y +# CONFIG_HIGHMEM is not set +CONFIG_HW_PERF_EVENTS=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_COMPACTION is not set +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_CROSS_MEMORY_ATTACH=y +# CONFIG_CLEANCACHE is not set +CONFIG_FORCE_MAX_ZONEORDER=11 +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UACCESS_WITH_MEMCPY is not set +CONFIG_SECCOMP=y +# CONFIG_CC_STACKPROTECTOR is not set +# CONFIG_XEN is not set + +# +# Boot options +# +CONFIG_USE_OF=y +CONFIG_ATAGS=y +# CONFIG_DEPRECATED_PARAM_STRUCT is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y +# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set +CONFIG_CMDLINE="macaddr=00:50:43:01:1E:3D console=ttyS0,115200 root=/dev/nfs nfsroot=10.37.116.100:/home/jszhang/static_bb,v3 ip=dhcp pxa3xx_nand.use_cache_program=0 mtdparts=mv_nand:2G(test)" +CONFIG_CMDLINE_FROM_BOOTLOADER=y +# CONFIG_CMDLINE_EXTEND is not set +# CONFIG_CMDLINE_FORCE is not set +# CONFIG_XIP_KERNEL is not set +# CONFIG_CRASH_DUMP is not set +# CONFIG_AUTO_ZRELADDR is not set + +# +# CPU Power Management +# + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +CONFIG_CPU_FREQ_GOV_COMMON=y +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set +CONFIG_GENERIC_CPUFREQ_CPU0=y + +# +# ARM CPU frequency scaling drivers +# +# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set +# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set +# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set +# CONFIG_CPU_IDLE is not set +# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_NEON=y + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_HAVE_AOUT=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set +CONFIG_COREDUMP=y + +# +# Power management options +# +# CONFIG_SUSPEND is not set +# CONFIG_PM_RUNTIME is not set +CONFIG_ARCH_HAS_OPP=y +CONFIG_PM_OPP=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +# CONFIG_ARM_CPU_SUSPEND is not set +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_DIAG is not set +CONFIG_UNIX=y +# CONFIG_UNIX_DIAG is not set +# CONFIG_XFRM_USER is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE_DEMUX is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=y +CONFIG_IPV6_PRIVACY=y +# CONFIG_IPV6_ROUTER_PREF is not set +# CONFIG_IPV6_OPTIMISTIC_DAD is not set +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_IPV6_MIP6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET6_XFRM_MODE_TUNNEL is not set +# CONFIG_INET6_XFRM_MODE_BEET is not set +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +# CONFIG_IPV6_SIT is not set +# CONFIG_IPV6_TUNNEL is not set +# CONFIG_IPV6_GRE is not set +# CONFIG_IPV6_MULTIPLE_TABLES is not set +# CONFIG_IPV6_MROUTE is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +# CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_L2TP is not set +# CONFIG_BRIDGE is not set +CONFIG_HAVE_NET_DSA=y +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +# CONFIG_NET_SCHED is not set +# CONFIG_DCB is not set +# CONFIG_DNS_RESOLVER is not set +# CONFIG_BATMAN_ADV is not set +# CONFIG_OPENVSWITCH is not set +CONFIG_RPS=y +CONFIG_RFS_ACCEL=y +CONFIG_XPS=y +# CONFIG_NETPRIO_CGROUP is not set +CONFIG_BQL=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set +CONFIG_WIRELESS=y +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_WEXT_SPY=y +CONFIG_WEXT_PRIV=y +CONFIG_CFG80211=y +# CONFIG_NL80211_TESTMODE is not set +# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_CFG80211_REG_DEBUG is not set +# CONFIG_CFG80211_CERTIFICATION_ONUS is not set +CONFIG_CFG80211_DEFAULT_PS=y +CONFIG_CFG80211_INTERNAL_REGDB=y +CONFIG_CFG80211_WEXT=y +# CONFIG_LIB80211 is not set +# CONFIG_MAC80211 is not set +# CONFIG_WIMAX is not set +CONFIG_RFKILL=y +# CONFIG_RFKILL_INPUT is not set +# CONFIG_RFKILL_REGULATOR is not set +# CONFIG_RFKILL_GPIO is not set +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set +# CONFIG_NFC is not set +CONFIG_HAVE_BPF_JIT=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="/sbin/mdev" +# CONFIG_DEVTMPFS is not set +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_FIRMWARE_IN_KERNEL is not set +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_GENERIC_CPU_DEVICES is not set +# CONFIG_DMA_SHARED_BUFFER is not set +# CONFIG_CMA is not set + +# +# Bus devices +# +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_REDBOOT_PARTS is not set +CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_AFS_PARTS is not set +# CONFIG_MTD_OF_PARTS is not set +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_SM_FTL is not set +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +# CONFIG_MTD_DOCG3 is not set +CONFIG_MTD_NAND_ECC=y +# CONFIG_MTD_NAND_ECC_SMC is not set +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_ECC_BCH is not set +# CONFIG_MTD_SM_COMMON is not set +# CONFIG_MTD_NAND_MUSEUM_IDS is not set +# CONFIG_MTD_NAND_DENALI is not set +# CONFIG_MTD_NAND_GPIO is not set +CONFIG_MTD_NAND_IDS=y +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_DOCG4 is not set +# CONFIG_MTD_NAND_NANDSIM is not set +# CONFIG_MTD_NAND_PLATFORM is not set +# CONFIG_MTD_ALAUDA is not set +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR flash memory drivers +# +# CONFIG_MTD_LPDDR is not set +# CONFIG_MTD_UBI is not set +CONFIG_DTC=y +CONFIG_OF=y + +# +# Device Tree and Open Firmware support +# +# CONFIG_PROC_DEVICETREE is not set +# CONFIG_OF_SELFTEST is not set +CONFIG_OF_FLATTREE=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_IRQ=y +CONFIG_OF_DEVICE=y +CONFIG_OF_I2C=y +CONFIG_OF_NET=y +CONFIG_OF_MDIO=y +CONFIG_OF_MTD=y +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_DRBD is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=1 +CONFIG_BLK_DEV_RAM_SIZE=32768 +# CONFIG_BLK_DEV_XIP is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_MG_DISK is not set +# CONFIG_BLK_DEV_RBD is not set + +# +# Misc devices +# +# CONFIG_SENSORS_LIS3LV02D is not set +# CONFIG_AD525X_DPOT is not set +# CONFIG_ATMEL_PWM is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_APDS9802ALS is not set +# CONFIG_ISL29003 is not set +# CONFIG_ISL29020 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_SENSORS_BH1780 is not set +# CONFIG_SENSORS_BH1770 is not set +# CONFIG_SENSORS_APDS990X is not set +# CONFIG_HMC6352 is not set +# CONFIG_DS1682 is not set +# CONFIG_BMP085_I2C is not set +# CONFIG_USB_SWITCH_FSA9480 is not set +CONFIG_FLASH_TS=y +CONFIG_FLASH_TS_PARTITION="fts" +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +# CONFIG_EEPROM_AT24 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +# CONFIG_EEPROM_93CX6 is not set + +# +# Texas Instruments shared transport line discipline +# +# CONFIG_TI_ST is not set +# CONFIG_SENSORS_LIS3_I2C is not set + +# +# Altera FPGA firmware download module +# +# CONFIG_ALTERA_STAPL is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_SCSI_PROC_FS is not set + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +CONFIG_CHR_DEV_SG=y +# CONFIG_CHR_DEV_SCH is not set +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +CONFIG_SCSI_SCAN_ASYNC=y + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +# CONFIG_SCSI_LOWLEVEL is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +# CONFIG_ATA is not set +# CONFIG_MD is not set +# CONFIG_TARGET_CORE is not set +CONFIG_NETDEVICES=y +CONFIG_NET_CORE=y +# CONFIG_BONDING is not set +# CONFIG_DUMMY is not set +# CONFIG_EQUALIZER is not set +CONFIG_MII=y +# CONFIG_NET_TEAM is not set +# CONFIG_MACVLAN is not set +# CONFIG_VXLAN is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_TUN is not set +# CONFIG_VETH is not set + +# +# CAIF transport drivers +# + +# +# Distributed Switch Architecture drivers +# +# CONFIG_NET_DSA_MV88E6XXX is not set +# CONFIG_NET_DSA_MV88E6060 is not set +# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set +# CONFIG_NET_DSA_MV88E6131 is not set +# CONFIG_NET_DSA_MV88E6123_61_65 is not set +CONFIG_ETHERNET=y +# CONFIG_NET_CADENCE is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_CALXEDA_XGMAC is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_DM9000 is not set +# CONFIG_DNET is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +CONFIG_NET_VENDOR_MARVELL=y +# CONFIG_MVMDIO is not set +CONFIG_BERLIN_FASTETH=y +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_ETHOC is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_AT803X_PHY is not set +# CONFIG_AMD_PHY is not set +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_BROADCOM_PHY is not set +# CONFIG_BCM87XX_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_REALTEK_PHY is not set +# CONFIG_NATIONAL_PHY is not set +# CONFIG_STE10XP is not set +# CONFIG_LSI_ET1011C_PHY is not set +# CONFIG_MICREL_PHY is not set +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set +# CONFIG_MDIO_BUS_MUX_GPIO is not set +# CONFIG_MDIO_BUS_MUX_MMIOREG is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +CONFIG_USB_USBNET=y +CONFIG_USB_NET_AX8817X=y +CONFIG_USB_NET_CDCETHER=y +# CONFIG_USB_NET_CDC_EEM is not set +# CONFIG_USB_NET_CDC_NCM is not set +# CONFIG_USB_NET_CDC_MBIM is not set +# CONFIG_USB_NET_DM9601 is not set +# CONFIG_USB_NET_SMSC75XX is not set +# CONFIG_USB_NET_SMSC95XX is not set +# CONFIG_USB_NET_GL620A is not set +# CONFIG_USB_NET_NET1080 is not set +# CONFIG_USB_NET_PLUSB is not set +# CONFIG_USB_NET_MCS7830 is not set +# CONFIG_USB_NET_RNDIS_HOST is not set +# CONFIG_USB_NET_CDC_SUBSET is not set +# CONFIG_USB_NET_ZAURUS is not set +# CONFIG_USB_NET_CX82310_ETH is not set +# CONFIG_USB_NET_KALMIA is not set +# CONFIG_USB_NET_QMI_WWAN is not set +# CONFIG_USB_HSO is not set +# CONFIG_USB_NET_INT51X1 is not set +# CONFIG_USB_IPHETH is not set +# CONFIG_USB_SIERRA_NET is not set +# CONFIG_USB_VL600 is not set +CONFIG_WLAN=y +# CONFIG_USB_ZD1201 is not set +# CONFIG_USB_NET_RNDIS_WLAN is not set +# CONFIG_ATH_CARDS is not set +# CONFIG_BRCMFMAC is not set +# CONFIG_HOSTAP is not set +# CONFIG_LIBERTAS is not set +# CONFIG_WL_TI is not set +# CONFIG_MWIFIEX is not set + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# +# CONFIG_WAN is not set +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=y +# CONFIG_INPUT_POLLDEV is not set +# CONFIG_INPUT_SPARSEKMAP is not set +# CONFIG_INPUT_MATRIXKMAP is not set + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_AD714X is not set +# CONFIG_INPUT_BMA150 is not set +# CONFIG_INPUT_MMA8450 is not set +# CONFIG_INPUT_MPU3050 is not set +# CONFIG_INPUT_GP2A is not set +# CONFIG_INPUT_GPIO_TILT_POLLED is not set +# CONFIG_INPUT_ATI_REMOTE2 is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +# CONFIG_INPUT_KXTJ9 is not set +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +CONFIG_INPUT_UINPUT=y +# CONFIG_INPUT_PCF8574 is not set +# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set +# CONFIG_INPUT_ADXL34X is not set +# CONFIG_INPUT_CMA3000 is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +# CONFIG_VT is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set +# CONFIG_TRACE_SINK is not set +# CONFIG_DEVKMEM is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_DW=y +# CONFIG_SERIAL_8250_EM is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_OF_PLATFORM is not set +# CONFIG_SERIAL_SCCNXP is not set +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +# CONFIG_SERIAL_XILINX_PS_UART is not set +# CONFIG_SERIAL_ARC is not set +# CONFIG_TTY_PRINTK is not set +# CONFIG_HVC_DCC is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +# CONFIG_I2C_MUX is not set +CONFIG_I2C_HELPER_AUTO=y + +# +# I2C Hardware Bus support +# + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_CBUS_GPIO is not set +CONFIG_I2C_DESIGNWARE_CORE=y +CONFIG_I2C_DESIGNWARE_PLATFORM=y +# CONFIG_I2C_GPIO is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_PXA_PCI is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_DIOLAN_U2C is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_SPI is not set +# CONFIG_HSI is not set + +# +# PPS support +# +# CONFIG_PPS is not set + +# +# PPS generators support +# + +# +# PTP clock support +# +# CONFIG_PTP_1588_CLOCK is not set + +# +# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. +# +# CONFIG_PTP_1588_CLOCK_PCH is not set +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIOLIB=y +CONFIG_OF_GPIO=y +# CONFIG_DEBUG_GPIO is not set +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_GENERIC=y + +# +# Memory mapped GPIO drivers: +# +# CONFIG_GPIO_GENERIC_PLATFORM is not set +CONFIG_GPIO_DWAPB=y +# CONFIG_GPIO_EM is not set +# CONFIG_GPIO_TS5500 is not set + +# +# I2C GPIO expanders: +# +# CONFIG_GPIO_MAX7300 is not set +# CONFIG_GPIO_MAX732X is not set +# CONFIG_GPIO_PCF857X is not set +# CONFIG_GPIO_SX150X is not set +# CONFIG_GPIO_ADP5588 is not set +# CONFIG_GPIO_ADNP is not set + +# +# PCI GPIO expanders: +# + +# +# SPI GPIO expanders: +# +# CONFIG_GPIO_MCP23S08 is not set + +# +# AC97 GPIO expanders: +# + +# +# MODULbus GPIO expanders: +# + +# +# USB GPIO expanders: +# +# CONFIG_W1 is not set +# CONFIG_POWER_SUPPLY is not set +# CONFIG_POWER_AVS is not set +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Native drivers +# +# CONFIG_SENSORS_AD7414 is not set +# CONFIG_SENSORS_AD7418 is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1029 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM9240 is not set +# CONFIG_SENSORS_ADT7410 is not set +# CONFIG_SENSORS_ADT7411 is not set +# CONFIG_SENSORS_ADT7462 is not set +# CONFIG_SENSORS_ADT7470 is not set +# CONFIG_SENSORS_ADT7475 is not set +# CONFIG_SENSORS_ASC7621 is not set +# CONFIG_SENSORS_ATXP1 is not set +# CONFIG_SENSORS_DS620 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_F71805F is not set +# CONFIG_SENSORS_F71882FG is not set +# CONFIG_SENSORS_F75375S is not set +# CONFIG_SENSORS_G760A is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_GPIO_FAN is not set +# CONFIG_SENSORS_HIH6130 is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_JC42 is not set +# CONFIG_SENSORS_LINEAGE is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM73 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_LM92 is not set +# CONFIG_SENSORS_LM93 is not set +# CONFIG_SENSORS_LTC4151 is not set +# CONFIG_SENSORS_LTC4215 is not set +# CONFIG_SENSORS_LTC4245 is not set +# CONFIG_SENSORS_LTC4261 is not set +# CONFIG_SENSORS_LM95241 is not set +# CONFIG_SENSORS_LM95245 is not set +# CONFIG_SENSORS_MAX16065 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_MAX1668 is not set +# CONFIG_SENSORS_MAX197 is not set +# CONFIG_SENSORS_MAX6639 is not set +# CONFIG_SENSORS_MAX6642 is not set +# CONFIG_SENSORS_MAX6650 is not set +# CONFIG_SENSORS_MCP3021 is not set +# CONFIG_SENSORS_MV88DE3100 is not set +# CONFIG_SENSORS_NTC_THERMISTOR is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_PC87427 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_PMBUS is not set +# CONFIG_SENSORS_SHT15 is not set +# CONFIG_SENSORS_SHT21 is not set +# CONFIG_SENSORS_SMM665 is not set +# CONFIG_SENSORS_DME1737 is not set +# CONFIG_SENSORS_EMC1403 is not set +# CONFIG_SENSORS_EMC2103 is not set +# CONFIG_SENSORS_EMC6W201 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47M192 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SCH56XX_COMMON is not set +# CONFIG_SENSORS_SCH5627 is not set +# CONFIG_SENSORS_SCH5636 is not set +# CONFIG_SENSORS_ADS1015 is not set +# CONFIG_SENSORS_ADS7828 is not set +# CONFIG_SENSORS_AMC6821 is not set +# CONFIG_SENSORS_INA2XX is not set +# CONFIG_SENSORS_THMC50 is not set +# CONFIG_SENSORS_TMP102 is not set +# CONFIG_SENSORS_TMP401 is not set +# CONFIG_SENSORS_TMP421 is not set +CONFIG_SENSORS_TSEN_ADC33=y +# CONFIG_SENSORS_VT1211 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83791D is not set +# CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83793 is not set +# CONFIG_SENSORS_W83795 is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83L786NG is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +# CONFIG_THERMAL is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_CORE is not set +CONFIG_WATCHDOG_NOWAYOUT=y + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +CONFIG_DW_WATCHDOG=y +# CONFIG_MPCORE_WATCHDOG is not set +# CONFIG_MAX63XX_WATCHDOG is not set +# CONFIG_MV88DE3100_WDT is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +# CONFIG_SSB is not set +CONFIG_BCMA_POSSIBLE=y + +# +# Broadcom specific AMBA +# +# CONFIG_BCMA is not set + +# +# Multifunction device drivers +# +# CONFIG_MFD_CORE is not set +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_88PM800 is not set +# CONFIG_MFD_88PM805 is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_ASIC3 is not set +# CONFIG_MFD_TI_AM335X_TSCADC is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_HTC_I2CPLD is not set +# CONFIG_MFD_LM3533 is not set +# CONFIG_TPS6105X is not set +# CONFIG_TPS65010 is not set +# CONFIG_TPS6507X is not set +# CONFIG_MFD_TPS65217 is not set +# CONFIG_MFD_TPS6586X is not set +# CONFIG_MFD_TPS65910 is not set +# CONFIG_MFD_TPS65912_I2C is not set +# CONFIG_MFD_TPS80031 is not set +# CONFIG_TWL4030_CORE is not set +# CONFIG_TWL6040_CORE is not set +# CONFIG_MFD_STMPE is not set +# CONFIG_MFD_TC3589X is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_SMSC is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_MFD_DA9052_I2C is not set +# CONFIG_MFD_DA9055 is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_LP8788 is not set +# CONFIG_MFD_MAX77686 is not set +# CONFIG_MFD_MAX77693 is not set +# CONFIG_MFD_MAX8907 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_MAX8997 is not set +# CONFIG_MFD_MAX8998 is not set +# CONFIG_MFD_SEC_CORE is not set +# CONFIG_MFD_ARIZONA_I2C is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X_I2C is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_WM8994 is not set +# CONFIG_MFD_PCF50633 is not set +# CONFIG_MFD_MC13XXX_I2C is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_MFD_WL1273_CORE is not set +# CONFIG_MFD_TPS65090 is not set +# CONFIG_MFD_AAT2870_CORE is not set +# CONFIG_MFD_RC5T583 is not set +# CONFIG_MFD_SYSCON is not set +# CONFIG_MFD_PALMAS is not set +# CONFIG_MFD_VIPERBOARD is not set +# CONFIG_MFD_RETU is not set +# CONFIG_MFD_AS3711 is not set +CONFIG_REGULATOR=y +# CONFIG_REGULATOR_DEBUG is not set +# CONFIG_REGULATOR_DUMMY is not set +# CONFIG_REGULATOR_FIXED_VOLTAGE is not set +# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set +# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set +# CONFIG_REGULATOR_GPIO is not set +# CONFIG_REGULATOR_AD5398 is not set +# CONFIG_REGULATOR_FAN53555 is not set +# CONFIG_REGULATOR_ISL6271A is not set +CONFIG_REGULATOR_88PG86X=y +# CONFIG_REGULATOR_MAX1586 is not set +# CONFIG_REGULATOR_MAX8649 is not set +# CONFIG_REGULATOR_MAX8660 is not set +# CONFIG_REGULATOR_MAX8952 is not set +# CONFIG_REGULATOR_MAX8973 is not set +# CONFIG_REGULATOR_LP3971 is not set +# CONFIG_REGULATOR_LP3972 is not set +# CONFIG_REGULATOR_LP872X is not set +# CONFIG_REGULATOR_TPS51632 is not set +# CONFIG_REGULATOR_TPS62360 is not set +# CONFIG_REGULATOR_TPS65023 is not set +# CONFIG_REGULATOR_TPS6507X is not set +# CONFIG_MEDIA_SUPPORT is not set + +# +# Graphics support +# +# CONFIG_DRM is not set +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +# CONFIG_FB is not set +# CONFIG_EXYNOS_VIDEO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set +# CONFIG_SOUND is not set + +# +# HID support +# +# CONFIG_HID is not set + +# +# USB HID support +# +# CONFIG_USB_HID is not set +# CONFIG_HID_PID is not set + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set + +# +# I2C HID support +# +# CONFIG_I2C_HID is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set +CONFIG_USB_ARCH_HAS_EHCI=y +# CONFIG_USB_ARCH_HAS_XHCI is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_COMMON=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y + +# +# Miscellaneous USB options +# +CONFIG_USB_DYNAMIC_MINORS=y +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +# CONFIG_USB_MON is not set +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_EHCI_TT_NEWSCHED=y +CONFIG_USB_EHCI_BERLIN=y +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_EHCI_HCD_PLATFORM is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_CHIPIDEA is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_WDM is not set +# CONFIG_USB_TMC is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_REALTEK is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +# CONFIG_USB_STORAGE_ENE_UB6250 is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB port drivers +# +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_CONSOLE=y +# CONFIG_USB_SERIAL_GENERIC is not set +# CONFIG_USB_SERIAL_AIRCABLE is not set +# CONFIG_USB_SERIAL_ARK3116 is not set +# CONFIG_USB_SERIAL_BELKIN is not set +# CONFIG_USB_SERIAL_CH341 is not set +# CONFIG_USB_SERIAL_WHITEHEAT is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +# CONFIG_USB_SERIAL_CP210X is not set +# CONFIG_USB_SERIAL_CYPRESS_M8 is not set +# CONFIG_USB_SERIAL_EMPEG is not set +CONFIG_USB_SERIAL_FTDI_SIO=y +# CONFIG_USB_SERIAL_FUNSOFT is not set +# CONFIG_USB_SERIAL_VISOR is not set +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_F81232 is not set +# CONFIG_USB_SERIAL_GARMIN is not set +# CONFIG_USB_SERIAL_IPW is not set +# CONFIG_USB_SERIAL_IUU is not set +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +# CONFIG_USB_SERIAL_KEYSPAN is not set +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +# CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_METRO is not set +# CONFIG_USB_SERIAL_MOS7720 is not set +# CONFIG_USB_SERIAL_MOS7840 is not set +# CONFIG_USB_SERIAL_MOTOROLA is not set +# CONFIG_USB_SERIAL_NAVMAN is not set +# CONFIG_USB_SERIAL_PL2303 is not set +# CONFIG_USB_SERIAL_OTI6858 is not set +# CONFIG_USB_SERIAL_QCAUX is not set +# CONFIG_USB_SERIAL_QUALCOMM is not set +# CONFIG_USB_SERIAL_SPCP8X5 is not set +# CONFIG_USB_SERIAL_HP4X is not set +# CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_SIEMENS_MPI is not set +# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set +# CONFIG_USB_SERIAL_SYMBOL is not set +# CONFIG_USB_SERIAL_TI is not set +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OPTION is not set +# CONFIG_USB_SERIAL_OMNINET is not set +# CONFIG_USB_SERIAL_OPTICON is not set +# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set +# CONFIG_USB_SERIAL_ZIO is not set +# CONFIG_USB_SERIAL_ZTE is not set +# CONFIG_USB_SERIAL_SSU100 is not set +# CONFIG_USB_SERIAL_QT2 is not set +# CONFIG_USB_SERIAL_DEBUG is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set +# CONFIG_USB_TEST is not set +# CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_YUREX is not set +CONFIG_USB_EZUSB_FX2=y + +# +# USB Physical Layer drivers +# +# CONFIG_USB_ISP1301 is not set +# CONFIG_USB_RCAR_PHY is not set +# CONFIG_USB_GADGET is not set + +# +# OTG and related infrastructure +# +# CONFIG_USB_GPIO_VBUS is not set +# CONFIG_USB_ULPI is not set +# CONFIG_NOP_USB_XCEIV is not set +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +# CONFIG_MMC_UNSAFE_RESUME is not set +# CONFIG_MMC_CLKGATE is not set + +# +# MMC/SD/SDIO Card Drivers +# +# CONFIG_MMC_BLOCK is not set +# CONFIG_SDIO_UART is not set +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_IO_ACCESSORS=y +CONFIG_MMC_SDHCI_PLTFM=y +# CONFIG_MMC_SDHCI_PXAV3 is not set +# CONFIG_MMC_SDHCI_PXAV2 is not set +CONFIG_MMC_SDHCI_MV=y +# CONFIG_MMC_DW is not set +# CONFIG_MMC_VUB300 is not set +# CONFIG_MMC_USHC is not set +# CONFIG_MEMSTICK is not set +# CONFIG_NEW_LEDS is not set +# CONFIG_ACCESSIBILITY is not set +# CONFIG_EDAC is not set +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set + +# +# Virtio drivers +# +# CONFIG_VIRTIO_MMIO is not set + +# +# Microsoft Hyper-V guest support +# +CONFIG_STAGING=y +# CONFIG_USBIP_CORE is not set +# CONFIG_PRISM2_USB is not set +# CONFIG_ECHO is not set +# CONFIG_ASUS_OLED is not set +# CONFIG_R8712U is not set +# CONFIG_RTS5139 is not set +# CONFIG_TRANZPORT is not set +# CONFIG_USB_SERIAL_QUATECH2 is not set +# CONFIG_ZSMALLOC is not set +# CONFIG_BCM_WIMAX is not set +# CONFIG_FT1000 is not set + +# +# Speakup console speech +# +# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set +# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set +# CONFIG_STAGING_MEDIA is not set + +# +# Android +# +CONFIG_ANDROID=y +# CONFIG_ANDROID_BINDER_IPC is not set +CONFIG_ASHMEM=y +CONFIG_ANDROID_LOGGER=y +# CONFIG_ANDROID_TIMED_OUTPUT is not set +# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set +# CONFIG_USB_WPAN_HCD is not set +# CONFIG_WIMAX_GDM72XX is not set +# CONFIG_CSR_WIFI is not set +# CONFIG_CED1401 is not set +# CONFIG_DGRP is not set +CONFIG_CLKDEV_LOOKUP=y +CONFIG_HAVE_CLK_PREPARE=y +CONFIG_COMMON_CLK=y + +# +# Common Clock Framework +# +# CONFIG_COMMON_CLK_DEBUG is not set + +# +# Hardware Spinlock drivers +# +CONFIG_DW_APB_TIMER=y +# CONFIG_IOMMU_SUPPORT is not set + +# +# Remoteproc drivers (EXPERIMENTAL) +# +# CONFIG_STE_MODEM_RPROC is not set + +# +# Rpmsg drivers (EXPERIMENTAL) +# +# CONFIG_VIRT_DRIVERS is not set +# CONFIG_PM_DEVFREQ is not set +# CONFIG_EXTCON is not set +# CONFIG_MEMORY is not set +# CONFIG_IIO is not set +# CONFIG_PWM is not set +# CONFIG_IPACK_BUS is not set + +# +# File systems +# +CONFIG_DCACHE_WORD_ACCESS=y +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +# CONFIG_EXT4_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_BTRFS_FS is not set +# CONFIG_NILFS2_FS is not set +# CONFIG_FS_POSIX_ACL is not set +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +# CONFIG_DNOTIFY is not set +CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set +# CONFIG_QUOTA is not set +# CONFIG_QUOTACTL is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set +CONFIG_OVERLAYFS_FS=y + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_TMPFS_XATTR is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_ECRYPT_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_YAFFS_FS=y +CONFIG_YAFFS_YAFFS1=y +# CONFIG_YAFFS_9BYTE_TAGS is not set +# CONFIG_YAFFS_DOES_ECC is not set +CONFIG_YAFFS_YAFFS2=y +CONFIG_YAFFS_AUTO_YAFFS2=y +CONFIG_YAFFS_DISABLE_TAGS_ECC=y +# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set +# CONFIG_YAFFS_EMPTY_LOST_AND_FOUND is not set +# CONFIG_YAFFS_DISABLE_BLOCK_REFRESHING is not set +# CONFIG_YAFFS_DISABLE_BACKGROUND is not set +CONFIG_YAFFS_XATTR=y +# CONFIG_JFFS2_FS is not set +# CONFIG_LOGFS is not set +# CONFIG_CRAMFS is not set +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_XATTR is not set +CONFIG_SQUASHFS_ZLIB=y +# CONFIG_SQUASHFS_LZO is not set +CONFIG_SQUASHFS_XZ=y +# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set +CONFIG_SQUASHFS_EMBEDDED=y +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX6FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_PSTORE is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +# CONFIG_F2FS_FS is not set +# CONFIG_NETWORK_FILESYSTEMS is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_MAC_ROMAN is not set +# CONFIG_NLS_MAC_CELTIC is not set +# CONFIG_NLS_MAC_CENTEURO is not set +# CONFIG_NLS_MAC_CROATIAN is not set +# CONFIG_NLS_MAC_CYRILLIC is not set +# CONFIG_NLS_MAC_GAELIC is not set +# CONFIG_NLS_MAC_GREEK is not set +# CONFIG_NLS_MAC_ICELAND is not set +# CONFIG_NLS_MAC_INUIT is not set +# CONFIG_NLS_MAC_ROMANIAN is not set +# CONFIG_NLS_MAC_TURKISH is not set +CONFIG_NLS_UTF8=y + +# +# Kernel hacking +# +CONFIG_PRINTK_TIME=y +CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +CONFIG_MAGIC_SYSRQ=y +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_READABLE_ASM is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_SECTION_MISMATCH is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +# CONFIG_LOCKUP_DETECTOR is not set +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +CONFIG_DETECT_HUNG_TASK=y +CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +# CONFIG_SCHED_DEBUG is not set +# CONFIG_SCHEDSTATS is not set +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_SLUB_STATS is not set +CONFIG_HAVE_DEBUG_KMEMLEAK=y +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_PROVE_RCU_DELAY is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_ATOMIC_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set +CONFIG_FRAME_POINTER=y +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +CONFIG_RCU_CPU_STALL_TIMEOUT=21 +CONFIG_RCU_CPU_STALL_VERBOSE=y +# CONFIG_RCU_CPU_STALL_INFO is not set +# CONFIG_RCU_TRACE is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_DEBUG_PER_CPU_MAPS is not set +# CONFIG_NOTIFIER_ERROR_INJECTION is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_DEBUG_PAGEALLOC is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_TRACE_CLOCK=y +CONFIG_RING_BUFFER=y +CONFIG_RING_BUFFER_ALLOW_SWAP=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_TEST_KSTRTOX is not set +# CONFIG_STRICT_DEVMEM is not set +# CONFIG_ARM_UNWIND is not set +CONFIG_DEBUG_USER=y +CONFIG_DEBUG_LL=y +CONFIG_DEBUG_BERLIN_UART=y +# CONFIG_DEBUG_LL_UART_NONE is not set +# CONFIG_DEBUG_ICEDCC is not set +# CONFIG_DEBUG_SEMIHOSTING is not set +CONFIG_DEBUG_LL_INCLUDE="debug/berlin.S" +CONFIG_EARLY_PRINTK=y +# CONFIG_PID_IN_CONTEXTIDR is not set + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_ENCRYPTED_KEYS is not set +# CONFIG_KEYS_DEBUG_PROC_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +# CONFIG_CRYPTO_USER is not set +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_PCRYPT is not set +CONFIG_CRYPTO_WORKQUEUE=y +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_GHASH is not set +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA1_ARM is not set +CONFIG_CRYPTO_SHA256=y +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_AES_ARM is not set +# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_TWOFISH=y +CONFIG_CRYPTO_TWOFISH_COMMON=y + +# +# Compression +# +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_ZLIB is not set +# CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_USER_API_HASH is not set +# CONFIG_CRYPTO_USER_API_SKCIPHER is not set +# CONFIG_CRYPTO_HW is not set +# CONFIG_ASYMMETRIC_KEY_TYPE is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_IO=y +CONFIG_PERCPU_RWSEM=y +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +# CONFIG_CRC_T10DIF is not set +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +# CONFIG_CRC32_SELFTEST is not set +CONFIG_CRC32_SLICEBY8=y +# CONFIG_CRC32_SLICEBY4 is not set +# CONFIG_CRC32_SARWATE is not set +# CONFIG_CRC32_BIT is not set +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +# CONFIG_CRC8 is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_XZ_DEC=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_BCJ=y +# CONFIG_XZ_DEC_TEST is not set +CONFIG_DECOMPRESS_GZIP=y +CONFIG_DECOMPRESS_XZ=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_CPU_RMAP=y +CONFIG_DQL=y +CONFIG_NLATTR=y +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +# CONFIG_AVERAGE is not set +# CONFIG_CORDIC is not set +# CONFIG_DDR is not set diff --git a/arch/arm/configs/eureka_basic_defconfig b/arch/arm/configs/eureka_basic_defconfig index 9bdb233d..fb3d7150 100644 --- a/arch/arm/configs/eureka_basic_defconfig +++ b/arch/arm/configs/eureka_basic_defconfig @@ -22,29 +22,27 @@ CONFIG_EMBEDDED=y CONFIG_PROFILING=y CONFIG_OPROFILE=y CONFIG_JUMP_LABEL=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y CONFIG_PARTITION_ADVANCED=y CONFIG_LDM_PARTITION=y CONFIG_ARCH_BERLIN=y +CONFIG_BERLIN2CD=y CONFIG_BERLIN_GPIO=y -CONFIG_BERLIN_GPU=y -CONFIG_BERLIN_GPU3D=y # CONFIG_BERLIN_GPUMEM_FROM_SHM is not set -CONFIG_BERLIN_GPUMEM_SIZE=0x8000000 -CONFIG_BERLIN_PE=y +# CONFIG_BERLIN_AMP is not set +# CONFIG_BERLIN_TZDD is not set CONFIG_BERLIN_PXA3XX_NFC=y CONFIG_BERLIN_NAND_RANDOMIZER=y -CONFIG_BERLIN_SDIO_WLAN_8787=m +CONFIG_BERLIN_SDIO_WLAN_8787=y +# CONFIG_BERLIN_SDIO_BT_8887_CHAR_DRV is not set CONFIG_BERLIN_FASTLOGO=y CONFIG_ARM_THUMBEE=y CONFIG_SWP_EMULATE=y -CONFIG_ARM_ERRATA_754322=y CONFIG_ARM_ERRATA_782773=y CONFIG_PREEMPT=y CONFIG_AEABI=y # CONFIG_OABI_COMPAT is not set # CONFIG_COMPACTION is not set +CONFIG_SECCOMP=y CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ARM_APPENDED_DTB=y @@ -65,13 +63,13 @@ CONFIG_IP_MULTICAST=y # CONFIG_INET_XFRM_MODE_BEET is not set # CONFIG_INET_LRO is not set # CONFIG_INET_DIAG is not set -CONFIG_IPV6=y CONFIG_IPV6_PRIVACY=y # CONFIG_INET6_XFRM_MODE_TRANSPORT is not set # CONFIG_INET6_XFRM_MODE_TUNNEL is not set # CONFIG_INET6_XFRM_MODE_BEET is not set # CONFIG_IPV6_SIT is not set -CONFIG_CFG80211=m +CONFIG_CFG80211=y +CONFIG_CFG80211_INTERNAL_REGDB=y CONFIG_CFG80211_WEXT=y CONFIG_RFKILL=y CONFIG_UEVENT_HELPER_PATH="/sbin/mdev" @@ -128,8 +126,7 @@ CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_DW=y # CONFIG_HW_RANDOM is not set -CONFIG_HWMON=m -CONFIG_SENSORS_MV88DE3100=m +CONFIG_SENSORS_MV88DE3100=y CONFIG_WATCHDOG=y CONFIG_MV88DE3100_WDT=y # CONFIG_HID is not set @@ -157,10 +154,9 @@ CONFIG_ANDROID_LOGGER=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_EXT2_FS=y # CONFIG_DNOTIFY is not set -CONFIG_FUSE_FS=m +CONFIG_FUSE_FS=y CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y -CONFIG_PROC_PAGE_MONITOR is not set CONFIG_TMPFS=y CONFIG_YAFFS_FS=y CONFIG_YAFFS_DISABLE_TAGS_ECC=y @@ -171,6 +167,7 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y CONFIG_PRINTK_TIME=y +CONFIG_MAGIC_SYSRQ=y CONFIG_DETECT_HUNG_TASK=y # CONFIG_SCHED_DEBUG is not set CONFIG_TIMER_STATS=y diff --git a/arch/arm/configs/eureka_basic_yaffs2_defconfig b/arch/arm/configs/eureka_basic_yaffs2_defconfig index 40f61161..0fd72c30 100644 --- a/arch/arm/configs/eureka_basic_yaffs2_defconfig +++ b/arch/arm/configs/eureka_basic_yaffs2_defconfig @@ -22,29 +22,27 @@ CONFIG_EMBEDDED=y CONFIG_PROFILING=y CONFIG_OPROFILE=y CONFIG_JUMP_LABEL=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y CONFIG_PARTITION_ADVANCED=y CONFIG_LDM_PARTITION=y CONFIG_ARCH_BERLIN=y +CONFIG_BERLIN2CD=y CONFIG_BERLIN_GPIO=y -CONFIG_BERLIN_GPU=y -CONFIG_BERLIN_GPU3D=y # CONFIG_BERLIN_GPUMEM_FROM_SHM is not set -CONFIG_BERLIN_GPUMEM_SIZE=0x8000000 -CONFIG_BERLIN_PE=y +# CONFIG_BERLIN_AMP is not set +# CONFIG_BERLIN_TZDD is not set CONFIG_BERLIN_PXA3XX_NFC=y CONFIG_BERLIN_NAND_RANDOMIZER=y -CONFIG_BERLIN_SDIO_WLAN_8787=m +CONFIG_BERLIN_SDIO_WLAN_8787=y +# CONFIG_BERLIN_SDIO_BT_8887_CHAR_DRV is not set CONFIG_BERLIN_FASTLOGO=y CONFIG_ARM_THUMBEE=y CONFIG_SWP_EMULATE=y -CONFIG_ARM_ERRATA_754322=y CONFIG_ARM_ERRATA_782773=y CONFIG_PREEMPT=y CONFIG_AEABI=y # CONFIG_OABI_COMPAT is not set # CONFIG_COMPACTION is not set +CONFIG_SECCOMP=y CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ARM_APPENDED_DTB=y @@ -65,13 +63,13 @@ CONFIG_IP_MULTICAST=y # CONFIG_INET_XFRM_MODE_BEET is not set # CONFIG_INET_LRO is not set # CONFIG_INET_DIAG is not set -CONFIG_IPV6=y CONFIG_IPV6_PRIVACY=y # CONFIG_INET6_XFRM_MODE_TRANSPORT is not set # CONFIG_INET6_XFRM_MODE_TUNNEL is not set # CONFIG_INET6_XFRM_MODE_BEET is not set # CONFIG_IPV6_SIT is not set -CONFIG_CFG80211=m +CONFIG_CFG80211=y +CONFIG_CFG80211_INTERNAL_REGDB=y CONFIG_CFG80211_WEXT=y CONFIG_RFKILL=y CONFIG_UEVENT_HELPER_PATH="/sbin/mdev" @@ -128,8 +126,7 @@ CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_DW=y # CONFIG_HW_RANDOM is not set -CONFIG_HWMON=m -CONFIG_SENSORS_MV88DE3100=m +CONFIG_SENSORS_MV88DE3100=y CONFIG_WATCHDOG=y CONFIG_MV88DE3100_WDT=y # CONFIG_HID is not set @@ -157,10 +154,9 @@ CONFIG_ANDROID_LOGGER=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_EXT2_FS=y # CONFIG_DNOTIFY is not set -CONFIG_FUSE_FS=m +CONFIG_FUSE_FS=y CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y -CONFIG_PROC_PAGE_MONITOR is not set CONFIG_TMPFS=y CONFIG_YAFFS_FS=y CONFIG_YAFFS_DISABLE_TAGS_ECC=y @@ -171,6 +167,7 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y CONFIG_PRINTK_TIME=y +CONFIG_MAGIC_SYSRQ=y CONFIG_DETECT_HUNG_TASK=y # CONFIG_SCHED_DEBUG is not set CONFIG_TIMER_STATS=y diff --git a/arch/arm/configs/eureka_fb-devel_defconfig b/arch/arm/configs/eureka_fb-devel_defconfig index f9d609ac..65540b35 100644 --- a/arch/arm/configs/eureka_fb-devel_defconfig +++ b/arch/arm/configs/eureka_fb-devel_defconfig @@ -22,29 +22,27 @@ CONFIG_EMBEDDED=y CONFIG_PROFILING=y CONFIG_OPROFILE=y CONFIG_JUMP_LABEL=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y CONFIG_PARTITION_ADVANCED=y CONFIG_LDM_PARTITION=y CONFIG_ARCH_BERLIN=y +CONFIG_BERLIN2CD=y CONFIG_BERLIN_GPIO=y -CONFIG_BERLIN_GPU=y -CONFIG_BERLIN_GPU3D=y # CONFIG_BERLIN_GPUMEM_FROM_SHM is not set -CONFIG_BERLIN_GPUMEM_SIZE=0x8000000 -CONFIG_BERLIN_PE=y +# CONFIG_BERLIN_AMP is not set +# CONFIG_BERLIN_TZDD is not set CONFIG_BERLIN_PXA3XX_NFC=y CONFIG_BERLIN_NAND_RANDOMIZER=y -CONFIG_BERLIN_SDIO_WLAN_8787=m -CONFIG_BERLIN_FBDEV=y +CONFIG_BERLIN_SDIO_WLAN_8787=y +# CONFIG_BERLIN_SDIO_BT_8887_CHAR_DRV is not set +CONFIG_BERLIN_FB=y CONFIG_ARM_THUMBEE=y CONFIG_SWP_EMULATE=y -CONFIG_ARM_ERRATA_754322=y CONFIG_ARM_ERRATA_782773=y CONFIG_PREEMPT=y CONFIG_AEABI=y # CONFIG_OABI_COMPAT is not set # CONFIG_COMPACTION is not set +CONFIG_SECCOMP=y CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ARM_APPENDED_DTB=y @@ -65,13 +63,13 @@ CONFIG_IP_MULTICAST=y # CONFIG_INET_XFRM_MODE_BEET is not set # CONFIG_INET_LRO is not set # CONFIG_INET_DIAG is not set -CONFIG_IPV6=y CONFIG_IPV6_PRIVACY=y # CONFIG_INET6_XFRM_MODE_TRANSPORT is not set # CONFIG_INET6_XFRM_MODE_TUNNEL is not set # CONFIG_INET6_XFRM_MODE_BEET is not set # CONFIG_IPV6_SIT is not set -CONFIG_CFG80211=m +CONFIG_CFG80211=y +CONFIG_CFG80211_INTERNAL_REGDB=y CONFIG_CFG80211_WEXT=y CONFIG_RFKILL=y CONFIG_UEVENT_HELPER_PATH="/sbin/mdev" @@ -128,8 +126,7 @@ CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_DW=y # CONFIG_HW_RANDOM is not set -CONFIG_HWMON=m -CONFIG_SENSORS_MV88DE3100=m +CONFIG_SENSORS_MV88DE3100=y CONFIG_WATCHDOG=y CONFIG_MV88DE3100_WDT=y CONFIG_FB=y @@ -158,10 +155,9 @@ CONFIG_ANDROID_LOGGER=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_EXT2_FS=y # CONFIG_DNOTIFY is not set -CONFIG_FUSE_FS=m +CONFIG_FUSE_FS=y CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y -CONFIG_PROC_PAGE_MONITOR is not set CONFIG_TMPFS=y CONFIG_YAFFS_FS=y CONFIG_YAFFS_DISABLE_TAGS_ECC=y @@ -172,6 +168,7 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y CONFIG_PRINTK_TIME=y +CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_FS=y CONFIG_DETECT_HUNG_TASK=y # CONFIG_SCHED_DEBUG is not set diff --git a/arch/arm/configs/eureka_rootpart_defconfig b/arch/arm/configs/eureka_rootpart_defconfig index abaab17e..14f21796 100644 --- a/arch/arm/configs/eureka_rootpart_defconfig +++ b/arch/arm/configs/eureka_rootpart_defconfig @@ -22,29 +22,27 @@ CONFIG_EMBEDDED=y CONFIG_PROFILING=y CONFIG_OPROFILE=y CONFIG_JUMP_LABEL=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y CONFIG_PARTITION_ADVANCED=y CONFIG_LDM_PARTITION=y CONFIG_ARCH_BERLIN=y +CONFIG_BERLIN2CD=y CONFIG_BERLIN_GPIO=y -CONFIG_BERLIN_GPU=y -CONFIG_BERLIN_GPU3D=y # CONFIG_BERLIN_GPUMEM_FROM_SHM is not set -CONFIG_BERLIN_GPUMEM_SIZE=0x8000000 -CONFIG_BERLIN_PE=y +# CONFIG_BERLIN_AMP is not set +# CONFIG_BERLIN_TZDD is not set CONFIG_BERLIN_PXA3XX_NFC=y CONFIG_BERLIN_NAND_RANDOMIZER=y -CONFIG_BERLIN_SDIO_WLAN_8787=m +CONFIG_BERLIN_SDIO_WLAN_8787=y +# CONFIG_BERLIN_SDIO_BT_8887_CHAR_DRV is not set CONFIG_BERLIN_FASTLOGO=y CONFIG_ARM_THUMBEE=y CONFIG_SWP_EMULATE=y -CONFIG_ARM_ERRATA_754322=y CONFIG_ARM_ERRATA_782773=y CONFIG_PREEMPT=y CONFIG_AEABI=y # CONFIG_OABI_COMPAT is not set # CONFIG_COMPACTION is not set +CONFIG_SECCOMP=y CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ARM_APPENDED_DTB=y @@ -65,13 +63,13 @@ CONFIG_IP_MULTICAST=y # CONFIG_INET_XFRM_MODE_BEET is not set # CONFIG_INET_LRO is not set # CONFIG_INET_DIAG is not set -CONFIG_IPV6=y CONFIG_IPV6_PRIVACY=y # CONFIG_INET6_XFRM_MODE_TRANSPORT is not set # CONFIG_INET6_XFRM_MODE_TUNNEL is not set # CONFIG_INET6_XFRM_MODE_BEET is not set # CONFIG_IPV6_SIT is not set -CONFIG_CFG80211=m +CONFIG_CFG80211=y +CONFIG_CFG80211_INTERNAL_REGDB=y CONFIG_CFG80211_WEXT=y CONFIG_RFKILL=y CONFIG_UEVENT_HELPER_PATH="/sbin/mdev" @@ -128,8 +126,7 @@ CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_DW=y # CONFIG_HW_RANDOM is not set -CONFIG_HWMON=m -CONFIG_SENSORS_MV88DE3100=m +CONFIG_SENSORS_MV88DE3100=y CONFIG_WATCHDOG=y CONFIG_MV88DE3100_WDT=y # CONFIG_HID is not set @@ -157,10 +154,9 @@ CONFIG_ANDROID_LOGGER=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_EXT2_FS=y # CONFIG_DNOTIFY is not set -CONFIG_FUSE_FS=m +CONFIG_FUSE_FS=y CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y -CONFIG_PROC_PAGE_MONITOR is not set CONFIG_TMPFS=y CONFIG_YAFFS_FS=y CONFIG_YAFFS_DISABLE_TAGS_ECC=y @@ -171,6 +167,7 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y CONFIG_PRINTK_TIME=y +CONFIG_MAGIC_SYSRQ=y CONFIG_DETECT_HUNG_TASK=y # CONFIG_SCHED_DEBUG is not set CONFIG_TIMER_STATS=y diff --git a/arch/arm/configs/eureka_stock_audio_defconfig b/arch/arm/configs/eureka_stock_audio_defconfig new file mode 100644 index 00000000..623797fd --- /dev/null +++ b/arch/arm/configs/eureka_stock_audio_defconfig @@ -0,0 +1,178 @@ +# CONFIG_ARM_PATCH_PHYS_VIRT is not set +CONFIG_PHYS_OFFSET=0x0600000 +CONFIG_EXPERIMENTAL=y +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_KERNEL_LZO=y +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_CGROUPS=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_CGROUP_SCHED=y +CONFIG_NAMESPACES=y +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_SYSCTL_SYSCALL=y +# CONFIG_BASE_FULL is not set +CONFIG_EMBEDDED=y +# CONFIG_SLUB_DEBUG is not set +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +CONFIG_JUMP_LABEL=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_LDM_PARTITION=y +CONFIG_ARCH_BERLIN=y +CONFIG_BERLIN2CD=y +# CONFIG_BERLIN_I2C is not set +# CONFIG_BERLIN_PE is not set +CONFIG_BERLIN_PXA3XX_NFC=y +CONFIG_BERLIN_NAND_RANDOMIZER=y +CONFIG_BERLIN_SDIO_WLAN_8787=y +CONFIG_ARM_THUMBEE=y +CONFIG_SWP_EMULATE=y +CONFIG_PREEMPT=y +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +# CONFIG_COMPACTION is not set +CONFIG_SECCOMP=y +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +CONFIG_CMDLINE="init=/init console=ttyS0,115200 mtdblock.ro_fspart=rootfs ro" +CONFIG_CMDLINE_EXTEND=y +CONFIG_VFP=y +CONFIG_NEON=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +# CONFIG_SUSPEND is not set +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +CONFIG_CFG80211=y +CONFIG_CFG80211_INTERNAL_REGDB=y +CONFIG_CFG80211_WEXT=y +CONFIG_RFKILL=y +CONFIG_UEVENT_HELPER_PATH="/sbin/mdev" +# CONFIG_FIRMWARE_IN_KERNEL is not set +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_OF_PARTS is not set +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_NAND=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=1 +CONFIG_BLK_DEV_RAM_SIZE=32768 +CONFIG_FLASH_TS=y +CONFIG_SCSI=y +# CONFIG_SCSI_PROC_FS is not set +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_SG=y +CONFIG_SCSI_MULTI_LUN=y +CONFIG_SCSI_SCAN_ASYNC=y +# CONFIG_SCSI_LOWLEVEL is not set +CONFIG_NETDEVICES=y +# CONFIG_NET_CADENCE is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +CONFIG_BERLIN_FASTETH=y +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_USB_RTL8150=y +CONFIG_INPUT_FF_MEMLESS=y +# CONFIG_INPUT_MOUSEDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_MISC=y +CONFIG_INPUT_UINPUT=y +# CONFIG_SERIO is not set +# CONFIG_VT is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_DEVKMEM is not set +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_DW=y +# CONFIG_HW_RANDOM is not set +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_DESIGNWARE_PLATFORM=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_DWAPB=y +CONFIG_SENSORS_MV88DE3100=y +CONFIG_WATCHDOG=y +CONFIG_MV88DE3100_WDT=y +# CONFIG_HID is not set +# CONFIG_USB_HID is not set +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_DYNAMIC_MINORS=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_BERLIN=y +CONFIG_USB_STORAGE=y +CONFIG_MMC=y +# CONFIG_MMC_BLOCK is not set +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_MV=y +CONFIG_STAGING=y +CONFIG_ANDROID=y +CONFIG_ASHMEM=y +CONFIG_ANDROID_LOGGER=y +# CONFIG_ANDROID_TIMED_OUTPUT is not set +# CONFIG_IOMMU_SUPPORT is not set +# CONFIG_DNOTIFY is not set +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +# CONFIG_PROC_PAGE_MONITOR is not set +CONFIG_TMPFS=y +CONFIG_YAFFS_FS=y +CONFIG_YAFFS_DISABLE_TAGS_ECC=y +CONFIG_SQUASHFS=y +CONFIG_SQUASHFS_EMBEDDED=y +# CONFIG_NETWORK_FILESYSTEMS is not set +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_UTF8=y +CONFIG_PRINTK_TIME=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_DETECT_HUNG_TASK=y +# CONFIG_SCHED_DEBUG is not set +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_FTRACE is not set +# CONFIG_ARM_UNWIND is not set +CONFIG_DEBUG_USER=y +CONFIG_KEYS=y +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_SHA256=y +CONFIG_CRYPTO_ARC4=y +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_TWOFISH=y +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_HW is not set +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +CONFIG_CRC_ITU_T=y diff --git a/arch/arm/configs/eureka_stock_defconfig b/arch/arm/configs/eureka_stock_defconfig index 5b7c8858..f01f2216 100644 --- a/arch/arm/configs/eureka_stock_defconfig +++ b/arch/arm/configs/eureka_stock_defconfig @@ -14,7 +14,6 @@ CONFIG_NAMESPACES=y # CONFIG_IPC_NS is not set CONFIG_BLK_DEV_INITRD=y CONFIG_SYSCTL_SYSCALL=y -CONFIG_SECCOMP_FILTER=y # CONFIG_BASE_FULL is not set CONFIG_EMBEDDED=y # CONFIG_SLUB_DEBUG is not set @@ -24,20 +23,23 @@ CONFIG_JUMP_LABEL=y CONFIG_PARTITION_ADVANCED=y CONFIG_LDM_PARTITION=y CONFIG_ARCH_BERLIN=y +CONFIG_BERLIN2CD=y CONFIG_BERLIN_GPIO=y +# CONFIG_BERLIN_AMP is not set +# CONFIG_BERLIN_TZDD is not set CONFIG_BERLIN_PXA3XX_NFC=y CONFIG_BERLIN_NAND_RANDOMIZER=y CONFIG_BERLIN_SDIO_WLAN_8787=y +# CONFIG_BERLIN_SDIO_BT_8887_CHAR_DRV is not set CONFIG_BERLIN_FASTLOGO=y -CONFIG_BERLIN_PWM=y CONFIG_ARM_THUMBEE=y CONFIG_SWP_EMULATE=y -CONFIG_ARM_ERRATA_754322=y CONFIG_ARM_ERRATA_782773=y CONFIG_PREEMPT=y CONFIG_AEABI=y # CONFIG_OABI_COMPAT is not set # CONFIG_COMPACTION is not set +CONFIG_SECCOMP=y CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ARM_APPENDED_DTB=y @@ -46,10 +48,8 @@ CONFIG_CMDLINE="init=/init console=ttyS0,115200 mtdblock.ro_fspart=rootfs ro" CONFIG_CMDLINE_EXTEND=y CONFIG_VFP=y CONFIG_NEON=y -CONFIG_SECCOMP=y # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set # CONFIG_SUSPEND is not set -# CONFIG_HAVE_AOUT is not set CONFIG_NET=y CONFIG_PACKET=y CONFIG_UNIX=y @@ -60,15 +60,14 @@ CONFIG_IP_MULTICAST=y # CONFIG_INET_XFRM_MODE_BEET is not set # CONFIG_INET_LRO is not set # CONFIG_INET_DIAG is not set -CONFIG_IPV6=y CONFIG_IPV6_PRIVACY=y # CONFIG_INET6_XFRM_MODE_TRANSPORT is not set # CONFIG_INET6_XFRM_MODE_TUNNEL is not set # CONFIG_INET6_XFRM_MODE_BEET is not set # CONFIG_IPV6_SIT is not set CONFIG_CFG80211=y -CONFIG_CFG80211_WEXT=y CONFIG_CFG80211_INTERNAL_REGDB=y +CONFIG_CFG80211_WEXT=y CONFIG_RFKILL=y CONFIG_UEVENT_HELPER_PATH="/sbin/mdev" # CONFIG_FIRMWARE_IN_KERNEL is not set @@ -152,15 +151,12 @@ CONFIG_ANDROID_LOGGER=y # CONFIG_DNOTIFY is not set CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y -CONFIG_PROC_PAGE_MONITOR is not set CONFIG_TMPFS=y CONFIG_YAFFS_FS=y CONFIG_YAFFS_DISABLE_TAGS_ECC=y CONFIG_SQUASHFS=y CONFIG_SQUASHFS_EMBEDDED=y -CONFIG_NETWORK_FILESYSTEMS=y -CONFIG_CIFS=y -CONFIG_CIFS_SMB2=y +# CONFIG_NETWORK_FILESYSTEMS is not set CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y diff --git a/arch/arm/configs/eureka_stock_yaffs2_defconfig b/arch/arm/configs/eureka_stock_yaffs2_defconfig index 8bb60648..d36a6590 100644 --- a/arch/arm/configs/eureka_stock_yaffs2_defconfig +++ b/arch/arm/configs/eureka_stock_yaffs2_defconfig @@ -14,7 +14,6 @@ CONFIG_NAMESPACES=y # CONFIG_IPC_NS is not set CONFIG_BLK_DEV_INITRD=y CONFIG_SYSCTL_SYSCALL=y -CONFIG_SECCOMP_FILTER=y # CONFIG_BASE_FULL is not set CONFIG_EMBEDDED=y # CONFIG_SLUB_DEBUG is not set @@ -24,20 +23,23 @@ CONFIG_JUMP_LABEL=y CONFIG_PARTITION_ADVANCED=y CONFIG_LDM_PARTITION=y CONFIG_ARCH_BERLIN=y +CONFIG_BERLIN2CD=y CONFIG_BERLIN_GPIO=y +# CONFIG_BERLIN_AMP is not set +# CONFIG_BERLIN_TZDD is not set CONFIG_BERLIN_PXA3XX_NFC=y CONFIG_BERLIN_NAND_RANDOMIZER=y CONFIG_BERLIN_SDIO_WLAN_8787=y +# CONFIG_BERLIN_SDIO_BT_8887_CHAR_DRV is not set CONFIG_BERLIN_FASTLOGO=y -CONFIG_BERLIN_PWM=y CONFIG_ARM_THUMBEE=y CONFIG_SWP_EMULATE=y -CONFIG_ARM_ERRATA_754322=y CONFIG_ARM_ERRATA_782773=y CONFIG_PREEMPT=y CONFIG_AEABI=y # CONFIG_OABI_COMPAT is not set # CONFIG_COMPACTION is not set +CONFIG_SECCOMP=y CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ARM_APPENDED_DTB=y @@ -46,10 +48,8 @@ CONFIG_CMDLINE="init=/init console=ttyS0,115200 ro" CONFIG_CMDLINE_EXTEND=y CONFIG_VFP=y CONFIG_NEON=y -CONFIG_SECCOMP=y # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set # CONFIG_SUSPEND is not set -# CONFIG_HAVE_AOUT is not set CONFIG_NET=y CONFIG_PACKET=y CONFIG_UNIX=y @@ -60,15 +60,14 @@ CONFIG_IP_MULTICAST=y # CONFIG_INET_XFRM_MODE_BEET is not set # CONFIG_INET_LRO is not set # CONFIG_INET_DIAG is not set -CONFIG_IPV6=y CONFIG_IPV6_PRIVACY=y # CONFIG_INET6_XFRM_MODE_TRANSPORT is not set # CONFIG_INET6_XFRM_MODE_TUNNEL is not set # CONFIG_INET6_XFRM_MODE_BEET is not set # CONFIG_IPV6_SIT is not set CONFIG_CFG80211=y -CONFIG_CFG80211_WEXT=y CONFIG_CFG80211_INTERNAL_REGDB=y +CONFIG_CFG80211_WEXT=y CONFIG_RFKILL=y CONFIG_UEVENT_HELPER_PATH="/sbin/mdev" # CONFIG_FIRMWARE_IN_KERNEL is not set @@ -152,15 +151,12 @@ CONFIG_ANDROID_LOGGER=y # CONFIG_DNOTIFY is not set CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y -CONFIG_PROC_PAGE_MONITOR is not set CONFIG_TMPFS=y CONFIG_YAFFS_FS=y CONFIG_YAFFS_DISABLE_TAGS_ECC=y CONFIG_SQUASHFS=y CONFIG_SQUASHFS_EMBEDDED=y -CONFIG_NETWORK_FILESYSTEMS=y -CONFIG_CIFS=y -CONFIG_CIFS_SMB2=y +# CONFIG_NETWORK_FILESYSTEMS is not set CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y diff --git a/arch/arm/configs/mv88de3100_ax_bg2cd_eureka_evt_defconfig b/arch/arm/configs/mv88de3100_ax_bg2cd_eureka_evt_defconfig index caee5e64..f0e24b15 100644 --- a/arch/arm/configs/mv88de3100_ax_bg2cd_eureka_evt_defconfig +++ b/arch/arm/configs/mv88de3100_ax_bg2cd_eureka_evt_defconfig @@ -293,10 +293,10 @@ CONFIG_BERLIN_GPU3D=m CONFIG_BERLIN_PE=m CONFIG_BERLIN_PXA3XX_NFC=y CONFIG_BERLIN_NAND_RANDOMIZER=y -#CONFIG_BERLIN_SDIO_WLAN_8787 is not set -CONFIG_BERLIN_SDIO_WLAN_8801=m +CONFIG_BERLIN_NAND_READ_RETRY=y +CONFIG_BERLIN_SDIO_WLAN_8787=m # CONFIG_ARCH_VT8500 is not set -CONFIG_BERLIN_FASTLOGO=y +CONFIG_BERLIN_FASTLOGO=n # # Processor Type diff --git a/arch/arm/configs/mv88de3100_ax_bg2cd_eureka_evt_mlc_defconfig b/arch/arm/configs/mv88de3100_ax_bg2cd_eureka_evt_mlc_defconfig new file mode 100644 index 00000000..9cc36724 --- /dev/null +++ b/arch/arm/configs/mv88de3100_ax_bg2cd_eureka_evt_mlc_defconfig @@ -0,0 +1,1927 @@ +# +# Automatically generated file; DO NOT EDIT. +# Linux/arm 3.8.13 Kernel Configuration +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_VECTORS_BASE=0xffff0000 +# CONFIG_ARM_PATCH_PHYS_VIRT is not set +CONFIG_PHYS_OFFSET=0x01000000 +CONFIG_GENERIC_BUG=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_HAVE_IRQ_WORK=y +CONFIG_IRQ_WORK=y +CONFIG_BUILDTIME_EXTABLE_SORT=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_XZ=y +CONFIG_HAVE_KERNEL_LZO=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_LZMA is not set +# CONFIG_KERNEL_XZ is not set +CONFIG_KERNEL_LZO=y +CONFIG_DEFAULT_HOSTNAME="(none)" +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +# CONFIG_FHANDLE is not set +# CONFIG_AUDIT is not set +CONFIG_HAVE_GENERIC_HARDIRQS=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_IRQ_DOMAIN=y +CONFIG_SPARSE_IRQ=y +CONFIG_KTIME_SCALAR=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y + +# +# Timers subsystem +# +# CONFIG_NO_HZ is not set +# CONFIG_HIGH_RES_TIMERS is not set + +# +# CPU/Task time and stats accounting +# +CONFIG_TICK_CPU_ACCOUNTING=y +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set + +# +# RCU Subsystem +# +CONFIG_TINY_PREEMPT_RCU=y +CONFIG_PREEMPT_RCU=y +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_RCU_BOOST is not set +# CONFIG_IKCONFIG is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_CGROUPS=y +# CONFIG_CGROUP_DEBUG is not set +# CONFIG_CGROUP_FREEZER is not set +# CONFIG_CGROUP_DEVICE is not set +# CONFIG_CPUSETS is not set +CONFIG_CGROUP_CPUACCT=y +# CONFIG_RESOURCE_COUNTERS is not set +# CONFIG_CGROUP_PERF is not set +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +# CONFIG_CFS_BANDWIDTH is not set +# CONFIG_RT_GROUP_SCHED is not set +# CONFIG_BLK_CGROUP is not set +# CONFIG_CHECKPOINT_RESTORE is not set +# CONFIG_NAMESPACES is not set +# CONFIG_SCHED_AUTOGROUP is not set +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +# CONFIG_RD_XZ is not set +# CONFIG_RD_LZO is not set +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_EXPERT=y +CONFIG_HAVE_UID16=y +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +# CONFIG_BASE_FULL is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_EMBEDDED=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +CONFIG_VM_EVENT_COUNTERS=y +# CONFIG_SLUB_DEBUG is not set +CONFIG_COMPAT_BRK=y +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_SLOB is not set +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_JUMP_LABEL=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DMA_CONTIGUOUS=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_HW_BREAKPOINT=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_CLONE_BACKWARDS=y + +# +# GCOV-based kernel profiling +# +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=1 +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_MODULE_SIG is not set +CONFIG_BLOCK=y +CONFIG_LBDAF=y +CONFIG_BLK_DEV_BSG=y +# CONFIG_BLK_DEV_BSGLIB is not set +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +CONFIG_LDM_PARTITION=y +# CONFIG_LDM_DEBUG is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +CONFIG_UNINLINE_SPIN_UNLOCK=y +# CONFIG_FREEZER is not set + +# +# System Type +# +CONFIG_MMU=y +# CONFIG_ARCH_MULTIPLATFORM is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_BCM2835 is not set +# CONFIG_ARCH_CNS3XXX is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_SIRF is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_MXS is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP4XX is not set +CONFIG_ARCH_BERLIN=y +# CONFIG_ARCH_DOVE is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_LPC32XX is not set +# CONFIG_ARCH_TEGRA is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_MSM is not set +# CONFIG_ARCH_SHMOBILE is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C24XX is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_S5P64X0 is not set +# CONFIG_ARCH_S5PC100 is not set +# CONFIG_ARCH_S5PV210 is not set +# CONFIG_ARCH_EXYNOS is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_U300 is not set +# CONFIG_ARCH_U8500 is not set +# CONFIG_ARCH_NOMADIK is not set +# CONFIG_PLAT_SPEAR is not set +# CONFIG_ARCH_DAVINCI is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VT8500_SINGLE is not set + +# +# Marvell Berlin SoCs Support +# +CONFIG_ARCH_BERLIN2=y +CONFIG_BERLIN2CD=y + +# +# BERLIN modules +# +CONFIG_BERLIN_SHM=y +CONFIG_BERLIN_CC=y +CONFIG_BERLIN_GPIO=y +CONFIG_BERLIN_I2C=y +CONFIG_BERLIN_GPU=m +CONFIG_BERLIN_GPU3D=m +CONFIG_BERLIN_PE=m +CONFIG_BERLIN_PXA3XX_NFC=y +CONFIG_BERLIN_NAND_RANDOMIZER=y +# CONFIG_BERLIN_NAND_READ_RETRY is not set +CONFIG_BERLIN_SDIO_WLAN_8787=m +CONFIG_BERLIN_SDIO_WLAN_8797=m +CONFIG_BERLIN_FASTLOGO=y +# CONFIG_ARCH_VT8500 is not set + +# +# Processor Type +# +CONFIG_CPU_V7=y +CONFIG_CPU_32v6K=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +# CONFIG_ARM_LPAE is not set +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set +CONFIG_ARM_THUMB=y +CONFIG_ARM_THUMBEE=y +# CONFIG_ARM_VIRT_EXT is not set +CONFIG_SWP_EMULATE=y +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_OUTER_CACHE=y +CONFIG_OUTER_CACHE_SYNC=y +CONFIG_MIGHT_HAVE_CACHE_L2X0=y +CONFIG_CACHE_L2X0=y +CONFIG_CACHE_PL310=y +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_DMA_MEM_BUFFERABLE=y +CONFIG_ARM_NR_BANKS=8 +CONFIG_MULTI_IRQ_HANDLER=y +# CONFIG_ARM_ERRATA_430973 is not set +# CONFIG_ARM_ERRATA_458693 is not set +# CONFIG_ARM_ERRATA_460075 is not set +# CONFIG_PL310_ERRATA_588369 is not set +# CONFIG_ARM_ERRATA_720789 is not set +# CONFIG_PL310_ERRATA_727915 is not set +# CONFIG_ARM_ERRATA_743622 is not set +# CONFIG_ARM_ERRATA_751472 is not set +# CONFIG_PL310_ERRATA_753970 is not set +# CONFIG_ARM_ERRATA_754322 is not set +# CONFIG_PL310_ERRATA_769419 is not set +# CONFIG_ARM_ERRATA_775420 is not set +CONFIG_ARM_GIC=y + +# +# Bus support +# +# CONFIG_PCI_SYSCALL is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_ARM_ARCH_TIMER is not set +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_ARCH_NR_GPIO=0 +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_PREEMPT_COUNT=y +CONFIG_HZ=100 +# CONFIG_THUMB2_KERNEL is not set +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +CONFIG_HAVE_ARCH_PFN_VALID=y +# CONFIG_HIGHMEM is not set +CONFIG_HW_PERF_EVENTS=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_COMPACTION is not set +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_CROSS_MEMORY_ATTACH=y +CONFIG_NEED_PER_CPU_KM=y +# CONFIG_CLEANCACHE is not set +CONFIG_FORCE_MAX_ZONEORDER=11 +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UACCESS_WITH_MEMCPY is not set +# CONFIG_SECCOMP is not set +# CONFIG_CC_STACKPROTECTOR is not set +# CONFIG_XEN is not set + +# +# Boot options +# +CONFIG_USE_OF=y +CONFIG_ATAGS=y +# CONFIG_DEPRECATED_PARAM_STRUCT is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y +# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set +CONFIG_CMDLINE="macaddr=00:50:43:01:1E:3D console=ttyS0,115200 root=/dev/nfs nfsroot=10.37.116.100:/home/jszhang/static_bb,v3 ip=dhcp pxa3xx_nand.use_cache_program=0 mtdparts=mv_nand:2G(test)" +CONFIG_CMDLINE_FROM_BOOTLOADER=y +# CONFIG_CMDLINE_EXTEND is not set +# CONFIG_CMDLINE_FORCE is not set +# CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set +# CONFIG_CRASH_DUMP is not set +# CONFIG_AUTO_ZRELADDR is not set + +# +# CPU Power Management +# +# CONFIG_CPU_IDLE is not set +# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_NEON=y + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_HAVE_AOUT=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set +CONFIG_COREDUMP=y + +# +# Power management options +# +# CONFIG_SUSPEND is not set +CONFIG_PM_RUNTIME=y +CONFIG_PM=y +# CONFIG_PM_DEBUG is not set +# CONFIG_APM_EMULATION is not set +CONFIG_PM_CLK=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +# CONFIG_ARM_CPU_SUSPEND is not set +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_DIAG is not set +CONFIG_UNIX=y +# CONFIG_UNIX_DIAG is not set +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE_DEMUX is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +CONFIG_INET_TUNNEL=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +CONFIG_TCP_CONG_ADVANCED=y +# CONFIG_TCP_CONG_BIC is not set +CONFIG_TCP_CONG_CUBIC=y +# CONFIG_TCP_CONG_WESTWOOD is not set +# CONFIG_TCP_CONG_HTCP is not set +# CONFIG_TCP_CONG_HSTCP is not set +# CONFIG_TCP_CONG_HYBLA is not set +# CONFIG_TCP_CONG_VEGAS is not set +# CONFIG_TCP_CONG_SCALABLE is not set +# CONFIG_TCP_CONG_LP is not set +# CONFIG_TCP_CONG_VENO is not set +# CONFIG_TCP_CONG_YEAH is not set +# CONFIG_TCP_CONG_ILLINOIS is not set +CONFIG_DEFAULT_CUBIC=y +# CONFIG_DEFAULT_RENO is not set +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=y +# CONFIG_IPV6_PRIVACY is not set +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_IPV6_OPTIMISTIC_DAD=y +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_IPV6_MIP6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +CONFIG_INET6_TUNNEL=y +CONFIG_INET6_XFRM_MODE_TRANSPORT=y +CONFIG_INET6_XFRM_MODE_TUNNEL=y +CONFIG_INET6_XFRM_MODE_BEET=y +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_IPV6_SIT=y +# CONFIG_IPV6_SIT_6RD is not set +CONFIG_IPV6_NDISC_NODETYPE=y +CONFIG_IPV6_TUNNEL=y +# CONFIG_IPV6_GRE is not set +CONFIG_IPV6_MULTIPLE_TABLES=y +# CONFIG_IPV6_SUBTREES is not set +# CONFIG_IPV6_MROUTE is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_NETFILTER_ADVANCED=y + +# +# Core Netfilter Configuration +# +# CONFIG_NETFILTER_NETLINK_ACCT is not set +# CONFIG_NETFILTER_NETLINK_QUEUE is not set +# CONFIG_NETFILTER_NETLINK_LOG is not set +CONFIG_NF_CONNTRACK=y +# CONFIG_NF_CONNTRACK_MARK is not set +CONFIG_NF_CONNTRACK_PROCFS=y +# CONFIG_NF_CONNTRACK_EVENTS is not set +# CONFIG_NF_CONNTRACK_TIMEOUT is not set +# CONFIG_NF_CONNTRACK_TIMESTAMP is not set +# CONFIG_NF_CT_PROTO_DCCP is not set +# CONFIG_NF_CT_PROTO_SCTP is not set +# CONFIG_NF_CT_PROTO_UDPLITE is not set +# CONFIG_NF_CONNTRACK_AMANDA is not set +# CONFIG_NF_CONNTRACK_FTP is not set +# CONFIG_NF_CONNTRACK_H323 is not set +# CONFIG_NF_CONNTRACK_IRC is not set +# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set +# CONFIG_NF_CONNTRACK_SNMP is not set +# CONFIG_NF_CONNTRACK_PPTP is not set +# CONFIG_NF_CONNTRACK_SANE is not set +# CONFIG_NF_CONNTRACK_SIP is not set +# CONFIG_NF_CONNTRACK_TFTP is not set +# CONFIG_NF_CT_NETLINK is not set +# CONFIG_NF_CT_NETLINK_TIMEOUT is not set +CONFIG_NETFILTER_TPROXY=y +CONFIG_NETFILTER_XTABLES=y + +# +# Xtables combined modules +# +# CONFIG_NETFILTER_XT_MARK is not set +# CONFIG_NETFILTER_XT_CONNMARK is not set + +# +# Xtables targets +# +# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set +# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set +# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set +# CONFIG_NETFILTER_XT_TARGET_DSCP is not set +# CONFIG_NETFILTER_XT_TARGET_HL is not set +# CONFIG_NETFILTER_XT_TARGET_HMARK is not set +# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set +# CONFIG_NETFILTER_XT_TARGET_LOG is not set +# CONFIG_NETFILTER_XT_TARGET_MARK is not set +# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set +# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set +# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set +# CONFIG_NETFILTER_XT_TARGET_TEE is not set +# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set +# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set +# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set + +# +# Xtables matches +# +# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set +# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set +# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set +# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set +# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set +# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set +# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set +# CONFIG_NETFILTER_XT_MATCH_CPU is not set +# CONFIG_NETFILTER_XT_MATCH_DCCP is not set +# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set +# CONFIG_NETFILTER_XT_MATCH_DSCP is not set +# CONFIG_NETFILTER_XT_MATCH_ECN is not set +# CONFIG_NETFILTER_XT_MATCH_ESP is not set +# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set +# CONFIG_NETFILTER_XT_MATCH_HELPER is not set +# CONFIG_NETFILTER_XT_MATCH_HL is not set +# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set +# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set +# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set +# CONFIG_NETFILTER_XT_MATCH_MAC is not set +# CONFIG_NETFILTER_XT_MATCH_MARK is not set +# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set +# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set +# CONFIG_NETFILTER_XT_MATCH_OWNER is not set +# CONFIG_NETFILTER_XT_MATCH_POLICY is not set +# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set +# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set +# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set +# CONFIG_NETFILTER_XT_MATCH_REALM is not set +# CONFIG_NETFILTER_XT_MATCH_RECENT is not set +# CONFIG_NETFILTER_XT_MATCH_SCTP is not set +CONFIG_NETFILTER_XT_MATCH_SOCKET=y +CONFIG_NETFILTER_XT_MATCH_STATE=y +# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set +# CONFIG_NETFILTER_XT_MATCH_STRING is not set +# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set +# CONFIG_NETFILTER_XT_MATCH_TIME is not set +# CONFIG_NETFILTER_XT_MATCH_U32 is not set +# CONFIG_IP_VS is not set + +# +# IP: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV4=y +CONFIG_NF_CONNTRACK_IPV4=y +CONFIG_NF_CONNTRACK_PROC_COMPAT=y +# CONFIG_IP_NF_QUEUE is not set +CONFIG_IP_NF_IPTABLES=y +# CONFIG_IP_NF_MATCH_AH is not set +# CONFIG_IP_NF_MATCH_ECN is not set +# CONFIG_IP_NF_MATCH_RPFILTER is not set +# CONFIG_IP_NF_MATCH_TTL is not set +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=y +# CONFIG_IP_NF_TARGET_ULOG is not set +# CONFIG_NF_NAT_IPV4 is not set +CONFIG_IP_NF_MANGLE=y +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set +# CONFIG_IP_NF_TARGET_ECN is not set +# CONFIG_IP_NF_TARGET_TTL is not set +# CONFIG_IP_NF_RAW is not set +# CONFIG_IP_NF_ARPTABLES is not set + +# +# IPv6: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV6=y +# CONFIG_NF_CONNTRACK_IPV6 is not set +CONFIG_IP6_NF_IPTABLES=y +# CONFIG_IP6_NF_MATCH_AH is not set +# CONFIG_IP6_NF_MATCH_EUI64 is not set +# CONFIG_IP6_NF_MATCH_FRAG is not set +# CONFIG_IP6_NF_MATCH_OPTS is not set +# CONFIG_IP6_NF_MATCH_HL is not set +# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set +# CONFIG_IP6_NF_MATCH_MH is not set +# CONFIG_IP6_NF_MATCH_RPFILTER is not set +# CONFIG_IP6_NF_MATCH_RT is not set +# CONFIG_IP6_NF_FILTER is not set +# CONFIG_IP6_NF_MANGLE is not set +# CONFIG_IP6_NF_RAW is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_L2TP is not set +# CONFIG_BRIDGE is not set +CONFIG_HAVE_NET_DSA=y +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +# CONFIG_NET_SCHED is not set +# CONFIG_DCB is not set +CONFIG_DNS_RESOLVER=y +# CONFIG_BATMAN_ADV is not set +# CONFIG_OPENVSWITCH is not set +# CONFIG_NETPRIO_CGROUP is not set +CONFIG_BQL=y +# CONFIG_BPF_JIT is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +CONFIG_BT=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=y + +# +# Bluetooth device drivers +# +# CONFIG_BT_HCIBTUSB is not set +# CONFIG_BT_HCIBTSDIO is not set +# CONFIG_BT_HCIUART is not set +# CONFIG_BT_HCIBCM203X is not set +# CONFIG_BT_HCIBPA10X is not set +# CONFIG_BT_HCIBFUSB is not set +# CONFIG_BT_HCIVHCI is not set +CONFIG_BT_MRVL=m +# CONFIG_BT_MRVL_SDIO is not set +# CONFIG_AF_RXRPC is not set +CONFIG_FIB_RULES=y +CONFIG_WIRELESS=y +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_WEXT_SPY=y +CONFIG_WEXT_PRIV=y +CONFIG_CFG80211=y +# CONFIG_NL80211_TESTMODE is not set +# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_CFG80211_REG_DEBUG is not set +# CONFIG_CFG80211_CERTIFICATION_ONUS is not set +CONFIG_CFG80211_DEFAULT_PS=y +CONFIG_CFG80211_INTERNAL_REGDB=y +CONFIG_CFG80211_WEXT=y +# CONFIG_LIB80211 is not set +# CONFIG_MAC80211 is not set +# CONFIG_WIMAX is not set +CONFIG_RFKILL=y +# CONFIG_RFKILL_INPUT is not set +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set +# CONFIG_NFC is not set +CONFIG_HAVE_BPF_JIT=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="/sbin/mdev" +# CONFIG_DEVTMPFS is not set +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_FIRMWARE_IN_KERNEL is not set +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_GENERIC_CPU_DEVICES is not set +# CONFIG_DMA_SHARED_BUFFER is not set +# CONFIG_CMA is not set + +# +# Bus devices +# +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_TESTS is not set +# CONFIG_MTD_REDBOOT_PARTS is not set +CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_AFS_PARTS is not set +CONFIG_MTD_OF_PARTS=y +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_SM_FTL is not set +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +# CONFIG_MTD_DOCG3 is not set +CONFIG_MTD_NAND_ECC=y +# CONFIG_MTD_NAND_ECC_SMC is not set +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_ECC_BCH is not set +# CONFIG_MTD_SM_COMMON is not set +# CONFIG_MTD_NAND_MUSEUM_IDS is not set +# CONFIG_MTD_NAND_DENALI is not set +CONFIG_MTD_NAND_IDS=y +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_DOCG4 is not set +# CONFIG_MTD_NAND_NANDSIM is not set +# CONFIG_MTD_NAND_PLATFORM is not set +# CONFIG_MTD_ALAUDA is not set +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR flash memory drivers +# +# CONFIG_MTD_LPDDR is not set +# CONFIG_MTD_UBI is not set +CONFIG_DTC=y +CONFIG_OF=y + +# +# Device Tree and Open Firmware support +# +# CONFIG_PROC_DEVICETREE is not set +# CONFIG_OF_SELFTEST is not set +CONFIG_OF_FLATTREE=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_IRQ=y +CONFIG_OF_DEVICE=y +CONFIG_OF_NET=y +CONFIG_OF_MTD=y +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_DRBD is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=1 +CONFIG_BLK_DEV_RAM_SIZE=32768 +# CONFIG_BLK_DEV_XIP is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_BLK_DEV_RBD is not set + +# +# Misc devices +# +# CONFIG_SENSORS_LIS3LV02D is not set +# CONFIG_ATMEL_PWM is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +# CONFIG_EEPROM_93CX6 is not set + +# +# Texas Instruments shared transport line discipline +# + +# +# Altera FPGA firmware download module +# + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_SCSI_PROC_FS is not set + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +CONFIG_CHR_DEV_SG=y +# CONFIG_CHR_DEV_SCH is not set +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +CONFIG_SCSI_SCAN_ASYNC=y + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +# CONFIG_SCSI_LOWLEVEL is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +# CONFIG_ATA is not set +# CONFIG_MD is not set +# CONFIG_TARGET_CORE is not set +CONFIG_NETDEVICES=y +CONFIG_NET_CORE=y +# CONFIG_BONDING is not set +# CONFIG_DUMMY is not set +# CONFIG_EQUALIZER is not set +CONFIG_MII=y +# CONFIG_NET_TEAM is not set +# CONFIG_MACVLAN is not set +# CONFIG_VXLAN is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +CONFIG_TUN=y +# CONFIG_VETH is not set + +# +# CAIF transport drivers +# + +# +# Distributed Switch Architecture drivers +# +# CONFIG_NET_DSA_MV88E6XXX is not set +# CONFIG_NET_DSA_MV88E6060 is not set +# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set +# CONFIG_NET_DSA_MV88E6131 is not set +# CONFIG_NET_DSA_MV88E6123_61_65 is not set +CONFIG_ETHERNET=y +# CONFIG_NET_CADENCE is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_CALXEDA_XGMAC is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_DM9000 is not set +# CONFIG_DNET is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +CONFIG_NET_VENDOR_MARVELL=y +# CONFIG_MVMDIO is not set +CONFIG_BERLIN_FASTETH=y +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_ETHOC is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_WIZNET is not set +# CONFIG_PHYLIB is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +CONFIG_USB_RTL8150=y +# CONFIG_USB_USBNET is not set +# CONFIG_USB_HSO is not set +# CONFIG_USB_IPHETH is not set +CONFIG_WLAN=y +# CONFIG_USB_ZD1201 is not set +# CONFIG_USB_NET_RNDIS_WLAN is not set +# CONFIG_ATH_CARDS is not set +# CONFIG_BRCMFMAC is not set +# CONFIG_HOSTAP is not set +# CONFIG_LIBERTAS is not set +# CONFIG_WL_TI is not set +# CONFIG_MWIFIEX is not set + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# +# CONFIG_WAN is not set +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=y +# CONFIG_INPUT_POLLDEV is not set +# CONFIG_INPUT_SPARSEKMAP is not set +# CONFIG_INPUT_MATRIXKMAP is not set + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_JOYSTICK=y +# CONFIG_JOYSTICK_ANALOG is not set +# CONFIG_JOYSTICK_A3D is not set +# CONFIG_JOYSTICK_ADI is not set +# CONFIG_JOYSTICK_COBRA is not set +# CONFIG_JOYSTICK_GF2K is not set +# CONFIG_JOYSTICK_GRIP is not set +# CONFIG_JOYSTICK_GRIP_MP is not set +# CONFIG_JOYSTICK_GUILLEMOT is not set +# CONFIG_JOYSTICK_INTERACT is not set +# CONFIG_JOYSTICK_SIDEWINDER is not set +# CONFIG_JOYSTICK_TMDC is not set +# CONFIG_JOYSTICK_IFORCE is not set +# CONFIG_JOYSTICK_WARRIOR is not set +# CONFIG_JOYSTICK_MAGELLAN is not set +# CONFIG_JOYSTICK_SPACEORB is not set +# CONFIG_JOYSTICK_SPACEBALL is not set +# CONFIG_JOYSTICK_STINGER is not set +# CONFIG_JOYSTICK_TWIDJOY is not set +# CONFIG_JOYSTICK_ZHENHUA is not set +# CONFIG_JOYSTICK_JOYDUMP is not set +CONFIG_JOYSTICK_XPAD=y +CONFIG_JOYSTICK_XPAD_FF=y +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_AD714X is not set +# CONFIG_INPUT_ATI_REMOTE2 is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +CONFIG_INPUT_UINPUT=y +# CONFIG_INPUT_ADXL34X is not set +# CONFIG_INPUT_CMA3000 is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +# CONFIG_VT is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set +# CONFIG_TRACE_SINK is not set +# CONFIG_DEVKMEM is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_DW=y +# CONFIG_SERIAL_8250_EM is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_OF_PLATFORM is not set +# CONFIG_SERIAL_SCCNXP is not set +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +# CONFIG_SERIAL_XILINX_PS_UART is not set +# CONFIG_SERIAL_ARC is not set +# CONFIG_TTY_PRINTK is not set +# CONFIG_HVC_DCC is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_I2C is not set +# CONFIG_SPI is not set +# CONFIG_HSI is not set + +# +# PPS support +# +# CONFIG_PPS is not set + +# +# PPS generators support +# + +# +# PTP clock support +# +# CONFIG_PTP_1588_CLOCK is not set + +# +# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. +# +# CONFIG_PTP_1588_CLOCK_PCH is not set +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y +# CONFIG_W1 is not set +# CONFIG_POWER_SUPPLY is not set +# CONFIG_POWER_AVS is not set +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Native drivers +# +# CONFIG_SENSORS_F71805F is not set +# CONFIG_SENSORS_F71882FG is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_MAX197 is not set +CONFIG_SENSORS_MV88DE3100=y +# CONFIG_SENSORS_NTC_THERMISTOR is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_PC87427 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SCH56XX_COMMON is not set +# CONFIG_SENSORS_TSEN_ADC33 is not set +# CONFIG_SENSORS_VT1211 is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +# CONFIG_THERMAL is not set +# CONFIG_WATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +# CONFIG_SSB is not set +CONFIG_BCMA_POSSIBLE=y + +# +# Broadcom specific AMBA +# +# CONFIG_BCMA is not set + +# +# Multifunction device drivers +# +# CONFIG_MFD_CORE is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_TI_AM335X_TSCADC is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_MFD_SYSCON is not set +# CONFIG_MFD_VIPERBOARD is not set +# CONFIG_REGULATOR is not set +# CONFIG_MEDIA_SUPPORT is not set + +# +# Graphics support +# +# CONFIG_DRM is not set +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +# CONFIG_FB is not set +# CONFIG_EXYNOS_VIDEO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set +# CONFIG_SOUND is not set + +# +# HID support +# +CONFIG_HID=y +CONFIG_HIDRAW=y +CONFIG_UHID=y +CONFIG_HID_GENERIC=y + +# +# Special HID drivers +# +# CONFIG_HID_A4TECH is not set +# CONFIG_HID_ACRUX is not set +# CONFIG_HID_APPLE is not set +# CONFIG_HID_AUREAL is not set +# CONFIG_HID_BELKIN is not set +# CONFIG_HID_CHERRY is not set +# CONFIG_HID_CHICONY is not set +# CONFIG_HID_CYPRESS is not set +# CONFIG_HID_DRAGONRISE is not set +# CONFIG_HID_EMS_FF is not set +# CONFIG_HID_ELECOM is not set +# CONFIG_HID_EZKEY is not set +# CONFIG_HID_HOLTEK is not set +# CONFIG_HID_KEYTOUCH is not set +# CONFIG_HID_KYE is not set +# CONFIG_HID_UCLOGIC is not set +# CONFIG_HID_WALTOP is not set +# CONFIG_HID_GYRATION is not set +# CONFIG_HID_ICADE is not set +# CONFIG_HID_TWINHAN is not set +# CONFIG_HID_KENSINGTON is not set +# CONFIG_HID_LCPOWER is not set +# CONFIG_HID_LENOVO_TPKBD is not set +CONFIG_HID_LOGITECH=y +CONFIG_HID_LOGITECH_DJ=y +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_LOGIWHEELS_FF=y +# CONFIG_HID_MAGICMOUSE is not set +# CONFIG_HID_MICROSOFT is not set +# CONFIG_HID_MONTEREY is not set +# CONFIG_HID_MULTITOUCH is not set +# CONFIG_HID_NTRIG is not set +# CONFIG_HID_ORTEK is not set +# CONFIG_HID_PANTHERLORD is not set +# CONFIG_HID_PETALYNX is not set +# CONFIG_HID_PICOLCD is not set +# CONFIG_HID_PRIMAX is not set +# CONFIG_HID_PS3REMOTE is not set +# CONFIG_HID_ROCCAT is not set +# CONFIG_HID_SAITEK is not set +# CONFIG_HID_SAMSUNG is not set +# CONFIG_HID_SONY is not set +# CONFIG_HID_SPEEDLINK is not set +# CONFIG_HID_SUNPLUS is not set +# CONFIG_HID_GREENASIA is not set +# CONFIG_HID_SMARTJOYPLUS is not set +# CONFIG_HID_TIVO is not set +# CONFIG_HID_TOPSEED is not set +# CONFIG_HID_THRUSTMASTER is not set +# CONFIG_HID_ZEROPLUS is not set +# CONFIG_HID_ZYDACRON is not set +# CONFIG_HID_SENSOR_HUB is not set + +# +# USB HID support +# +CONFIG_USB_HID=y +CONFIG_HID_PID=y +CONFIG_USB_HIDDEV=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +CONFIG_USB_ARCH_HAS_EHCI=y +# CONFIG_USB_ARCH_HAS_XHCI is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_COMMON=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y + +# +# Miscellaneous USB options +# +CONFIG_USB_DYNAMIC_MINORS=y +CONFIG_USB_SUSPEND=y +# CONFIG_USB_OTG is not set +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +# CONFIG_USB_MON is not set +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_EHCI_TT_NEWSCHED=y +CONFIG_USB_EHCI_BERLIN=y +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_EHCI_HCD_PLATFORM is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_CHIPIDEA is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_WDM is not set +# CONFIG_USB_TMC is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_REALTEK is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +# CONFIG_USB_STORAGE_ENE_UB6250 is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB port drivers +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set +# CONFIG_USB_TEST is not set +# CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_YUREX is not set +# CONFIG_USB_EZUSB_FX2 is not set + +# +# USB Physical Layer drivers +# +# CONFIG_USB_RCAR_PHY is not set +# CONFIG_USB_GADGET is not set + +# +# OTG and related infrastructure +# +# CONFIG_USB_ULPI is not set +# CONFIG_NOP_USB_XCEIV is not set +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +# CONFIG_MMC_UNSAFE_RESUME is not set +# CONFIG_MMC_CLKGATE is not set + +# +# MMC/SD/SDIO Card Drivers +# +# CONFIG_MMC_BLOCK is not set +# CONFIG_SDIO_UART is not set +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_IO_ACCESSORS=y +CONFIG_MMC_SDHCI_PLTFM=y +# CONFIG_MMC_SDHCI_PXAV3 is not set +# CONFIG_MMC_SDHCI_PXAV2 is not set +CONFIG_MMC_SDHCI_MV=y +# CONFIG_MMC_DW is not set +# CONFIG_MMC_VUB300 is not set +# CONFIG_MMC_USHC is not set +# CONFIG_MEMSTICK is not set +# CONFIG_NEW_LEDS is not set +# CONFIG_ACCESSIBILITY is not set +# CONFIG_EDAC is not set +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set + +# +# Virtio drivers +# +# CONFIG_VIRTIO_MMIO is not set + +# +# Microsoft Hyper-V guest support +# +# CONFIG_STAGING is not set +CONFIG_CLKDEV_LOOKUP=y + +# +# Hardware Spinlock drivers +# +CONFIG_DW_APB_TIMER=y +# CONFIG_IOMMU_SUPPORT is not set + +# +# Remoteproc drivers (EXPERIMENTAL) +# +# CONFIG_STE_MODEM_RPROC is not set + +# +# Rpmsg drivers (EXPERIMENTAL) +# +# CONFIG_VIRT_DRIVERS is not set +# CONFIG_PM_DEVFREQ is not set +# CONFIG_EXTCON is not set +# CONFIG_MEMORY is not set +# CONFIG_IIO is not set +# CONFIG_PWM is not set +# CONFIG_IPACK_BUS is not set + +# +# File systems +# +CONFIG_DCACHE_WORD_ACCESS=y +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +CONFIG_EXT4_FS=y +CONFIG_EXT4_USE_FOR_EXT23=y +# CONFIG_EXT4_FS_POSIX_ACL is not set +# CONFIG_EXT4_FS_SECURITY is not set +# CONFIG_EXT4_DEBUG is not set +CONFIG_JBD2=y +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_BTRFS_FS is not set +# CONFIG_NILFS2_FS is not set +# CONFIG_FS_POSIX_ACL is not set +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +# CONFIG_DNOTIFY is not set +CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set +# CONFIG_QUOTA is not set +# CONFIG_QUOTACTL is not set +# CONFIG_AUTOFS4_FS is not set +CONFIG_FUSE_FS=y +CONFIG_CUSE=y + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +CONFIG_NTFS_FS=y +# CONFIG_NTFS_DEBUG is not set +# CONFIG_NTFS_RW is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +# CONFIG_PROC_PAGE_MONITOR is not set +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_TMPFS_XATTR is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_ECRYPT_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_YAFFS_FS=y +CONFIG_YAFFS_YAFFS1=y +# CONFIG_YAFFS_9BYTE_TAGS is not set +# CONFIG_YAFFS_DOES_ECC is not set +CONFIG_YAFFS_YAFFS2=y +CONFIG_YAFFS_AUTO_YAFFS2=y +CONFIG_YAFFS_DISABLE_TAGS_ECC=y +# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set +# CONFIG_YAFFS_EMPTY_LOST_AND_FOUND is not set +# CONFIG_YAFFS_DISABLE_BLOCK_REFRESHING is not set +# CONFIG_YAFFS_DISABLE_BACKGROUND is not set +CONFIG_YAFFS_XATTR=y +# CONFIG_JFFS2_FS is not set +# CONFIG_LOGFS is not set +# CONFIG_CRAMFS is not set +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_XATTR is not set +CONFIG_SQUASHFS_ZLIB=y +# CONFIG_SQUASHFS_LZO is not set +# CONFIG_SQUASHFS_XZ is not set +# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set +CONFIG_SQUASHFS_EMBEDDED=y +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX6FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_PSTORE is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +# CONFIG_F2FS_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +# CONFIG_NFS_V2 is not set +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_SWAP is not set +CONFIG_ROOT_NFS=y +# CONFIG_NFSD is not set +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +# CONFIG_SUNRPC_DEBUG is not set +# CONFIG_CEPH_FS is not set +CONFIG_CIFS=y +# CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_UPCALL is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_DEBUG is not set +# CONFIG_CIFS_DFS_UPCALL is not set +# CONFIG_CIFS_SMB2 is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_MAC_ROMAN is not set +# CONFIG_NLS_MAC_CELTIC is not set +# CONFIG_NLS_MAC_CENTEURO is not set +# CONFIG_NLS_MAC_CROATIAN is not set +# CONFIG_NLS_MAC_CYRILLIC is not set +# CONFIG_NLS_MAC_GAELIC is not set +# CONFIG_NLS_MAC_GREEK is not set +# CONFIG_NLS_MAC_ICELAND is not set +# CONFIG_NLS_MAC_INUIT is not set +# CONFIG_NLS_MAC_ROMANIAN is not set +# CONFIG_NLS_MAC_TURKISH is not set +CONFIG_NLS_UTF8=y + +# +# Kernel hacking +# +CONFIG_PRINTK_TIME=y +CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +CONFIG_MAGIC_SYSRQ=y +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_READABLE_ASM is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_SECTION_MISMATCH is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +# CONFIG_LOCKUP_DETECTOR is not set +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +CONFIG_DETECT_HUNG_TASK=y +CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +# CONFIG_SCHED_DEBUG is not set +# CONFIG_SCHEDSTATS is not set +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_SLUB_STATS is not set +CONFIG_HAVE_DEBUG_KMEMLEAK=y +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_PROVE_RCU_DELAY is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_ATOMIC_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set +CONFIG_FRAME_POINTER=y +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_RCU_TRACE is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_NOTIFIER_ERROR_INJECTION is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_LATENCYTOP is not set +# CONFIG_DEBUG_PAGEALLOC is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_TRACE_CLOCK=y +CONFIG_RING_BUFFER=y +CONFIG_RING_BUFFER_ALLOW_SWAP=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_RBTREE_TEST is not set +# CONFIG_INTERVAL_TREE_TEST is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_TEST_KSTRTOX is not set +# CONFIG_STRICT_DEVMEM is not set +# CONFIG_ARM_UNWIND is not set +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_LL is not set +CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" +# CONFIG_PID_IN_CONTEXTIDR is not set + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_ENCRYPTED_KEYS is not set +# CONFIG_KEYS_DEBUG_PROC_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +# CONFIG_CRYPTO_USER is not set +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_NULL is not set +CONFIG_CRYPTO_WORKQUEUE=y +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_GHASH is not set +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA1_ARM is not set +CONFIG_CRYPTO_SHA256=y +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_AES_ARM is not set +# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_TWOFISH=y +CONFIG_CRYPTO_TWOFISH_COMMON=y + +# +# Compression +# +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_ZLIB is not set +# CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_USER_API_HASH is not set +# CONFIG_CRYPTO_USER_API_SKCIPHER is not set +# CONFIG_CRYPTO_HW is not set +# CONFIG_ASYMMETRIC_KEY_TYPE is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_IO=y +CONFIG_PERCPU_RWSEM=y +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +# CONFIG_CRC_T10DIF is not set +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +# CONFIG_CRC32_SELFTEST is not set +CONFIG_CRC32_SLICEBY8=y +# CONFIG_CRC32_SLICEBY4 is not set +# CONFIG_CRC32_SARWATE is not set +# CONFIG_CRC32_BIT is not set +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +# CONFIG_CRC8 is not set +CONFIG_ZLIB_INFLATE=y +# CONFIG_XZ_DEC is not set +# CONFIG_XZ_DEC_BCJ is not set +CONFIG_DECOMPRESS_GZIP=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_DQL=y +CONFIG_NLATTR=y +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +# CONFIG_AVERAGE is not set +# CONFIG_CORDIC is not set +# CONFIG_DDR is not set diff --git a/arch/arm/configs/pepperoni_defconfig b/arch/arm/configs/pepperoni_defconfig new file mode 100644 index 00000000..5292c22c --- /dev/null +++ b/arch/arm/configs/pepperoni_defconfig @@ -0,0 +1,2169 @@ +# +# Automatically generated file; DO NOT EDIT. +# Linux/arm 3.8.13 Kernel Configuration +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_ARCH_HAS_CPUFREQ=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_VECTORS_BASE=0xffff0000 +# CONFIG_ARM_PATCH_PHYS_VIRT is not set +CONFIG_PHYS_OFFSET=0x01100000 +CONFIG_GENERIC_BUG=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_HAVE_IRQ_WORK=y +CONFIG_IRQ_WORK=y +CONFIG_BUILDTIME_EXTABLE_SORT=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_XZ=y +CONFIG_HAVE_KERNEL_LZO=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_LZMA is not set +CONFIG_KERNEL_XZ=y +# CONFIG_KERNEL_LZO is not set +CONFIG_DEFAULT_HOSTNAME="(none)" +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +# CONFIG_FHANDLE is not set +# CONFIG_AUDIT is not set +CONFIG_HAVE_GENERIC_HARDIRQS=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_SPARSE_IRQ=y +CONFIG_KTIME_SCALAR=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y + +# +# Timers subsystem +# +# CONFIG_NO_HZ is not set +# CONFIG_HIGH_RES_TIMERS is not set + +# +# CPU/Task time and stats accounting +# +CONFIG_TICK_CPU_ACCOUNTING=y +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set + +# +# RCU Subsystem +# +CONFIG_TREE_PREEMPT_RCU=y +CONFIG_PREEMPT_RCU=y +CONFIG_RCU_FANOUT=32 +CONFIG_RCU_FANOUT_LEAF=16 +# CONFIG_RCU_FANOUT_EXACT is not set +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_RCU_BOOST is not set +# CONFIG_RCU_NOCB_CPU is not set +# CONFIG_IKCONFIG is not set +CONFIG_LOG_BUF_SHIFT=17 +CONFIG_CGROUPS=y +# CONFIG_CGROUP_DEBUG is not set +# CONFIG_CGROUP_FREEZER is not set +# CONFIG_CGROUP_DEVICE is not set +# CONFIG_CPUSETS is not set +CONFIG_CGROUP_CPUACCT=y +# CONFIG_RESOURCE_COUNTERS is not set +# CONFIG_CGROUP_PERF is not set +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +# CONFIG_CFS_BANDWIDTH is not set +# CONFIG_RT_GROUP_SCHED is not set +# CONFIG_BLK_CGROUP is not set +# CONFIG_CHECKPOINT_RESTORE is not set +CONFIG_NAMESPACES=y +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_USER_NS is not set +CONFIG_PID_NS=y +CONFIG_NET_NS=y +CONFIG_UIDGID_CONVERTED=y +# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set +# CONFIG_SCHED_AUTOGROUP is not set +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +CONFIG_RD_XZ=y +# CONFIG_RD_LZO is not set +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_EXPERT=y +CONFIG_HAVE_UID16=y +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +# CONFIG_BASE_FULL is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_EMBEDDED=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +CONFIG_VM_EVENT_COUNTERS=y +# CONFIG_SLUB_DEBUG is not set +CONFIG_COMPAT_BRK=y +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_SLOB is not set +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +CONFIG_HAVE_OPROFILE=y +CONFIG_JUMP_LABEL=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DMA_CONTIGUOUS=y +CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_HW_BREAKPOINT=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_SECCOMP_FILTER=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_CLONE_BACKWARDS=y + +# +# GCOV-based kernel profiling +# +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=1 +# CONFIG_MODULES is not set +CONFIG_BLOCK=y +CONFIG_LBDAF=y +CONFIG_BLK_DEV_BSG=y +# CONFIG_BLK_DEV_BSGLIB is not set +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +CONFIG_LDM_PARTITION=y +# CONFIG_LDM_DEBUG is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +CONFIG_UNINLINE_SPIN_UNLOCK=y +CONFIG_MUTEX_SPIN_ON_OWNER=y +# CONFIG_FREEZER is not set + +# +# System Type +# +CONFIG_MMU=y +# CONFIG_ARCH_MULTIPLATFORM is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_BCM2835 is not set +# CONFIG_ARCH_CNS3XXX is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_SIRF is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_MXS is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP4XX is not set +CONFIG_ARCH_BERLIN=y +# CONFIG_ARCH_DOVE is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_LPC32XX is not set +# CONFIG_ARCH_TEGRA is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_MSM is not set +# CONFIG_ARCH_SHMOBILE is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C24XX is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_S5P64X0 is not set +# CONFIG_ARCH_S5PC100 is not set +# CONFIG_ARCH_S5PV210 is not set +# CONFIG_ARCH_EXYNOS is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_U300 is not set +# CONFIG_ARCH_U8500 is not set +# CONFIG_ARCH_NOMADIK is not set +# CONFIG_PLAT_SPEAR is not set +# CONFIG_ARCH_DAVINCI is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VT8500_SINGLE is not set + +# +# Marvell Berlin SoCs Support +# +CONFIG_ARCH_BERLIN2=y +# CONFIG_BERLIN2CD is not set +# CONFIG_BERLIN2Q is not set +CONFIG_BERLIN2CDP=y + +# +# BERLIN2 features +# +CONFIG_BERLIN_ASIC=y + +# +# BERLIN modules +# +CONFIG_BERLIN_SHM=y +CONFIG_BERLIN_CC=y +# CONFIG_BERLIN_GPIO is not set +# CONFIG_BERLIN_I2C is not set +# CONFIG_BERLIN_GPU is not set +# CONFIG_BERLIN_GPU3D is not set +# CONFIG_BERLIN_PE is not set +# CONFIG_BERLIN_AMP is not set +CONFIG_BERLIN_TZDD=y +CONFIG_BERLIN_TZDD_CB=y +CONFIG_BERLIN_PXA3XX_NFC=y +CONFIG_BERLIN_NAND_RANDOMIZER=y +# CONFIG_BERLIN_NAND_READ_RETRY is not set +# CONFIG_BERLIN_SDIO_WLAN_8787 is not set +# CONFIG_BERLIN_SDIO_WLAN_8797 is not set +# CONFIG_BERLIN_SDIO_WLAN_8801 is not set +CONFIG_BERLIN_SDIO_WLAN_8887=y +CONFIG_BERLIN_SDIO_BT_8887_CHAR_DRV=y +# CONFIG_BERLIN_FASTLOGO is not set +CONFIG_BERLIN_PWM=y +# CONFIG_GPIO_PCA953X is not set +# CONFIG_ARCH_VT8500 is not set + +# +# Processor Type +# +CONFIG_CPU_V7=y +CONFIG_CPU_32v6K=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +# CONFIG_ARM_LPAE is not set +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set +CONFIG_ARM_THUMB=y +CONFIG_ARM_THUMBEE=y +# CONFIG_ARM_VIRT_EXT is not set +CONFIG_SWP_EMULATE=y +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_MIGHT_HAVE_CACHE_L2X0=y +# CONFIG_CACHE_L2X0 is not set +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_DMA_MEM_BUFFERABLE=y +CONFIG_ARM_NR_BANKS=8 +CONFIG_MULTI_IRQ_HANDLER=y +# CONFIG_ARM_ERRATA_430973 is not set +# CONFIG_ARM_ERRATA_458693 is not set +# CONFIG_ARM_ERRATA_460075 is not set +# CONFIG_ARM_ERRATA_742230 is not set +# CONFIG_ARM_ERRATA_742231 is not set +# CONFIG_ARM_ERRATA_720789 is not set +# CONFIG_ARM_ERRATA_743622 is not set +# CONFIG_ARM_ERRATA_751472 is not set +# CONFIG_ARM_ERRATA_754322 is not set +# CONFIG_ARM_ERRATA_754327 is not set +# CONFIG_ARM_ERRATA_764369 is not set +# CONFIG_ARM_ERRATA_775420 is not set +# CONFIG_ARM_ERRATA_782773 is not set +CONFIG_ARM_ERRATA_814220=y +CONFIG_ARM_GIC=y + +# +# Bus support +# +# CONFIG_PCI_SYSCALL is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_HAVE_SMP=y +CONFIG_SMP=y +CONFIG_SMP_ON_UP=y +CONFIG_ARM_CPU_TOPOLOGY=y +# CONFIG_SCHED_MC is not set +# CONFIG_SCHED_SMT is not set +CONFIG_HAVE_ARM_SCU=y +CONFIG_ARM_ARCH_TIMER=y +CONFIG_HAVE_ARM_TWD=y +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_NR_CPUS=2 +# CONFIG_HOTPLUG_CPU is not set +CONFIG_LOCAL_TIMERS=y +CONFIG_ARCH_NR_GPIO=0 +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_PREEMPT_COUNT=y +CONFIG_HZ=100 +# CONFIG_THUMB2_KERNEL is not set +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +CONFIG_HAVE_ARCH_PFN_VALID=y +# CONFIG_HIGHMEM is not set +CONFIG_HW_PERF_EVENTS=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_COMPACTION is not set +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_CROSS_MEMORY_ATTACH=y +# CONFIG_CLEANCACHE is not set +CONFIG_FORCE_MAX_ZONEORDER=11 +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UACCESS_WITH_MEMCPY is not set +CONFIG_SECCOMP=y +# CONFIG_CC_STACKPROTECTOR is not set +# CONFIG_XEN is not set + +# +# Boot options +# +CONFIG_USE_OF=y +CONFIG_ATAGS=y +# CONFIG_DEPRECATED_PARAM_STRUCT is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y +# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set +CONFIG_CMDLINE="macaddr=00:50:43:01:1E:3D console=ttyS0,115200 root=/dev/nfs nfsroot=10.37.116.100:/home/jszhang/static_bb,v3 ip=dhcp pxa3xx_nand.use_cache_program=0 mtdparts=mv_nand:2G(test)" +CONFIG_CMDLINE_FROM_BOOTLOADER=y +# CONFIG_CMDLINE_EXTEND is not set +# CONFIG_CMDLINE_FORCE is not set +# CONFIG_XIP_KERNEL is not set +# CONFIG_CRASH_DUMP is not set +# CONFIG_AUTO_ZRELADDR is not set + +# +# CPU Power Management +# + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +CONFIG_CPU_FREQ_GOV_COMMON=y +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set +CONFIG_GENERIC_CPUFREQ_CPU0=y + +# +# ARM CPU frequency scaling drivers +# +# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set +# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set +# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set +# CONFIG_CPU_IDLE is not set +# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_NEON=y + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_HAVE_AOUT=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set +CONFIG_COREDUMP=y + +# +# Power management options +# +# CONFIG_SUSPEND is not set +# CONFIG_PM_RUNTIME is not set +CONFIG_ARCH_HAS_OPP=y +CONFIG_PM_OPP=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +# CONFIG_ARM_CPU_SUSPEND is not set +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_DIAG is not set +CONFIG_UNIX=y +# CONFIG_UNIX_DIAG is not set +# CONFIG_XFRM_USER is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE_DEMUX is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=y +CONFIG_IPV6_PRIVACY=y +# CONFIG_IPV6_ROUTER_PREF is not set +# CONFIG_IPV6_OPTIMISTIC_DAD is not set +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_IPV6_MIP6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET6_XFRM_MODE_TUNNEL is not set +# CONFIG_INET6_XFRM_MODE_BEET is not set +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +# CONFIG_IPV6_SIT is not set +# CONFIG_IPV6_TUNNEL is not set +# CONFIG_IPV6_GRE is not set +# CONFIG_IPV6_MULTIPLE_TABLES is not set +# CONFIG_IPV6_MROUTE is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +# CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_L2TP is not set +# CONFIG_BRIDGE is not set +CONFIG_HAVE_NET_DSA=y +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +# CONFIG_NET_SCHED is not set +# CONFIG_DCB is not set +# CONFIG_DNS_RESOLVER is not set +# CONFIG_BATMAN_ADV is not set +# CONFIG_OPENVSWITCH is not set +CONFIG_RPS=y +CONFIG_RFS_ACCEL=y +CONFIG_XPS=y +# CONFIG_NETPRIO_CGROUP is not set +CONFIG_BQL=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set +CONFIG_WIRELESS=y +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_WEXT_SPY=y +CONFIG_WEXT_PRIV=y +CONFIG_CFG80211=y +# CONFIG_NL80211_TESTMODE is not set +# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_CFG80211_REG_DEBUG is not set +# CONFIG_CFG80211_CERTIFICATION_ONUS is not set +CONFIG_CFG80211_DEFAULT_PS=y +CONFIG_CFG80211_INTERNAL_REGDB=y +CONFIG_CFG80211_WEXT=y +# CONFIG_LIB80211 is not set +# CONFIG_MAC80211 is not set +# CONFIG_WIMAX is not set +CONFIG_RFKILL=y +# CONFIG_RFKILL_INPUT is not set +# CONFIG_RFKILL_REGULATOR is not set +# CONFIG_RFKILL_GPIO is not set +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set +# CONFIG_NFC is not set +CONFIG_HAVE_BPF_JIT=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="/sbin/mdev" +# CONFIG_DEVTMPFS is not set +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_FIRMWARE_IN_KERNEL is not set +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_GENERIC_CPU_DEVICES is not set +CONFIG_REGMAP=y +CONFIG_REGMAP_I2C=y +# CONFIG_DMA_SHARED_BUFFER is not set +# CONFIG_CMA is not set + +# +# Bus devices +# +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_REDBOOT_PARTS is not set +CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_AFS_PARTS is not set +# CONFIG_MTD_OF_PARTS is not set +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_SM_FTL is not set +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +# CONFIG_MTD_DOCG3 is not set +CONFIG_MTD_NAND_ECC=y +# CONFIG_MTD_NAND_ECC_SMC is not set +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_ECC_BCH is not set +# CONFIG_MTD_SM_COMMON is not set +# CONFIG_MTD_NAND_MUSEUM_IDS is not set +# CONFIG_MTD_NAND_DENALI is not set +# CONFIG_MTD_NAND_GPIO is not set +CONFIG_MTD_NAND_IDS=y +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_DOCG4 is not set +# CONFIG_MTD_NAND_NANDSIM is not set +# CONFIG_MTD_NAND_PLATFORM is not set +# CONFIG_MTD_ALAUDA is not set +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR flash memory drivers +# +# CONFIG_MTD_LPDDR is not set +# CONFIG_MTD_UBI is not set +CONFIG_DTC=y +CONFIG_OF=y + +# +# Device Tree and Open Firmware support +# +# CONFIG_PROC_DEVICETREE is not set +# CONFIG_OF_SELFTEST is not set +CONFIG_OF_FLATTREE=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_IRQ=y +CONFIG_OF_DEVICE=y +CONFIG_OF_I2C=y +CONFIG_OF_NET=y +CONFIG_OF_MDIO=y +CONFIG_OF_MTD=y +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_DRBD is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=1 +CONFIG_BLK_DEV_RAM_SIZE=32768 +# CONFIG_BLK_DEV_XIP is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_MG_DISK is not set +# CONFIG_BLK_DEV_RBD is not set + +# +# Misc devices +# +# CONFIG_SENSORS_LIS3LV02D is not set +# CONFIG_AD525X_DPOT is not set +# CONFIG_ATMEL_PWM is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_APDS9802ALS is not set +# CONFIG_ISL29003 is not set +# CONFIG_ISL29020 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_SENSORS_BH1780 is not set +# CONFIG_SENSORS_BH1770 is not set +# CONFIG_SENSORS_APDS990X is not set +# CONFIG_HMC6352 is not set +# CONFIG_DS1682 is not set +# CONFIG_BMP085_I2C is not set +# CONFIG_USB_SWITCH_FSA9480 is not set +CONFIG_FLASH_TS=y +CONFIG_FLASH_TS_PARTITION="fts" +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +# CONFIG_EEPROM_AT24 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +# CONFIG_EEPROM_93CX6 is not set + +# +# Texas Instruments shared transport line discipline +# +# CONFIG_TI_ST is not set +# CONFIG_SENSORS_LIS3_I2C is not set + +# +# Altera FPGA firmware download module +# +# CONFIG_ALTERA_STAPL is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_SCSI_PROC_FS is not set + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +CONFIG_CHR_DEV_SG=y +# CONFIG_CHR_DEV_SCH is not set +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +CONFIG_SCSI_SCAN_ASYNC=y + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +# CONFIG_SCSI_LOWLEVEL is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +# CONFIG_ATA is not set +# CONFIG_MD is not set +# CONFIG_TARGET_CORE is not set +CONFIG_NETDEVICES=y +CONFIG_NET_CORE=y +# CONFIG_BONDING is not set +# CONFIG_DUMMY is not set +# CONFIG_EQUALIZER is not set +CONFIG_MII=y +# CONFIG_NET_TEAM is not set +# CONFIG_MACVLAN is not set +# CONFIG_VXLAN is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_TUN is not set +# CONFIG_VETH is not set + +# +# CAIF transport drivers +# + +# +# Distributed Switch Architecture drivers +# +# CONFIG_NET_DSA_MV88E6XXX is not set +# CONFIG_NET_DSA_MV88E6060 is not set +# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set +# CONFIG_NET_DSA_MV88E6131 is not set +# CONFIG_NET_DSA_MV88E6123_61_65 is not set +CONFIG_ETHERNET=y +# CONFIG_NET_CADENCE is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_CALXEDA_XGMAC is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_DM9000 is not set +# CONFIG_DNET is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +CONFIG_NET_VENDOR_MARVELL=y +# CONFIG_MVMDIO is not set +CONFIG_BERLIN_FASTETH=y +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_ETHOC is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_AT803X_PHY is not set +# CONFIG_AMD_PHY is not set +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_BROADCOM_PHY is not set +# CONFIG_BCM87XX_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_REALTEK_PHY is not set +# CONFIG_NATIONAL_PHY is not set +# CONFIG_STE10XP is not set +# CONFIG_LSI_ET1011C_PHY is not set +# CONFIG_MICREL_PHY is not set +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set +# CONFIG_MDIO_BUS_MUX_GPIO is not set +# CONFIG_MDIO_BUS_MUX_MMIOREG is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +CONFIG_USB_USBNET=y +CONFIG_USB_NET_AX8817X=y +CONFIG_USB_NET_CDCETHER=y +# CONFIG_USB_NET_CDC_EEM is not set +# CONFIG_USB_NET_CDC_NCM is not set +# CONFIG_USB_NET_CDC_MBIM is not set +# CONFIG_USB_NET_DM9601 is not set +# CONFIG_USB_NET_SMSC75XX is not set +# CONFIG_USB_NET_SMSC95XX is not set +# CONFIG_USB_NET_GL620A is not set +# CONFIG_USB_NET_NET1080 is not set +# CONFIG_USB_NET_PLUSB is not set +# CONFIG_USB_NET_MCS7830 is not set +# CONFIG_USB_NET_RNDIS_HOST is not set +# CONFIG_USB_NET_CDC_SUBSET is not set +# CONFIG_USB_NET_ZAURUS is not set +# CONFIG_USB_NET_CX82310_ETH is not set +# CONFIG_USB_NET_KALMIA is not set +# CONFIG_USB_NET_QMI_WWAN is not set +# CONFIG_USB_HSO is not set +# CONFIG_USB_NET_INT51X1 is not set +# CONFIG_USB_IPHETH is not set +# CONFIG_USB_SIERRA_NET is not set +# CONFIG_USB_VL600 is not set +CONFIG_WLAN=y +# CONFIG_USB_ZD1201 is not set +# CONFIG_USB_NET_RNDIS_WLAN is not set +# CONFIG_ATH_CARDS is not set +# CONFIG_BRCMFMAC is not set +# CONFIG_HOSTAP is not set +# CONFIG_LIBERTAS is not set +# CONFIG_WL_TI is not set +# CONFIG_MWIFIEX is not set + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# +# CONFIG_WAN is not set +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=y +# CONFIG_INPUT_POLLDEV is not set +# CONFIG_INPUT_SPARSEKMAP is not set +# CONFIG_INPUT_MATRIXKMAP is not set + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_AD714X is not set +# CONFIG_INPUT_BMA150 is not set +# CONFIG_INPUT_MMA8450 is not set +# CONFIG_INPUT_MPU3050 is not set +# CONFIG_INPUT_GP2A is not set +# CONFIG_INPUT_GPIO_TILT_POLLED is not set +# CONFIG_INPUT_ATI_REMOTE2 is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +# CONFIG_INPUT_KXTJ9 is not set +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +CONFIG_INPUT_UINPUT=y +# CONFIG_INPUT_PCF8574 is not set +# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set +# CONFIG_INPUT_ADXL34X is not set +# CONFIG_INPUT_CMA3000 is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +# CONFIG_VT is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set +# CONFIG_TRACE_SINK is not set +# CONFIG_DEVKMEM is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_DW=y +# CONFIG_SERIAL_8250_EM is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_OF_PLATFORM is not set +# CONFIG_SERIAL_SCCNXP is not set +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +# CONFIG_SERIAL_XILINX_PS_UART is not set +# CONFIG_SERIAL_ARC is not set +# CONFIG_TTY_PRINTK is not set +# CONFIG_HVC_DCC is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +# CONFIG_I2C_MUX is not set +CONFIG_I2C_HELPER_AUTO=y + +# +# I2C Hardware Bus support +# + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_CBUS_GPIO is not set +CONFIG_I2C_DESIGNWARE_CORE=y +CONFIG_I2C_DESIGNWARE_PLATFORM=y +# CONFIG_I2C_GPIO is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_PXA_PCI is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_DIOLAN_U2C is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_SPI is not set +# CONFIG_HSI is not set + +# +# PPS support +# +# CONFIG_PPS is not set + +# +# PPS generators support +# + +# +# PTP clock support +# +# CONFIG_PTP_1588_CLOCK is not set + +# +# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. +# +# CONFIG_PTP_1588_CLOCK_PCH is not set +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIOLIB=y +CONFIG_OF_GPIO=y +# CONFIG_DEBUG_GPIO is not set +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_GENERIC=y + +# +# Memory mapped GPIO drivers: +# +# CONFIG_GPIO_GENERIC_PLATFORM is not set +CONFIG_GPIO_DWAPB=y +# CONFIG_GPIO_EM is not set +# CONFIG_GPIO_TS5500 is not set + +# +# I2C GPIO expanders: +# +# CONFIG_GPIO_MAX7300 is not set +# CONFIG_GPIO_MAX732X is not set +# CONFIG_GPIO_PCF857X is not set +# CONFIG_GPIO_SX150X is not set +# CONFIG_GPIO_ADP5588 is not set +# CONFIG_GPIO_ADNP is not set + +# +# PCI GPIO expanders: +# + +# +# SPI GPIO expanders: +# +# CONFIG_GPIO_MCP23S08 is not set + +# +# AC97 GPIO expanders: +# + +# +# MODULbus GPIO expanders: +# + +# +# USB GPIO expanders: +# +# CONFIG_W1 is not set +# CONFIG_POWER_SUPPLY is not set +# CONFIG_POWER_AVS is not set +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Native drivers +# +# CONFIG_SENSORS_AD7414 is not set +# CONFIG_SENSORS_AD7418 is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1029 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM9240 is not set +# CONFIG_SENSORS_ADT7410 is not set +# CONFIG_SENSORS_ADT7411 is not set +# CONFIG_SENSORS_ADT7462 is not set +# CONFIG_SENSORS_ADT7470 is not set +# CONFIG_SENSORS_ADT7475 is not set +# CONFIG_SENSORS_ASC7621 is not set +# CONFIG_SENSORS_ATXP1 is not set +# CONFIG_SENSORS_DS620 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_F71805F is not set +# CONFIG_SENSORS_F71882FG is not set +# CONFIG_SENSORS_F75375S is not set +# CONFIG_SENSORS_G760A is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_GPIO_FAN is not set +# CONFIG_SENSORS_HIH6130 is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_JC42 is not set +# CONFIG_SENSORS_LINEAGE is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM73 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_LM92 is not set +# CONFIG_SENSORS_LM93 is not set +# CONFIG_SENSORS_LTC4151 is not set +# CONFIG_SENSORS_LTC4215 is not set +# CONFIG_SENSORS_LTC4245 is not set +# CONFIG_SENSORS_LTC4261 is not set +# CONFIG_SENSORS_LM95241 is not set +# CONFIG_SENSORS_LM95245 is not set +# CONFIG_SENSORS_MAX16065 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_MAX1668 is not set +# CONFIG_SENSORS_MAX197 is not set +# CONFIG_SENSORS_MAX6639 is not set +# CONFIG_SENSORS_MAX6642 is not set +# CONFIG_SENSORS_MAX6650 is not set +# CONFIG_SENSORS_MCP3021 is not set +# CONFIG_SENSORS_MV88DE3100 is not set +# CONFIG_SENSORS_NTC_THERMISTOR is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_PC87427 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_PMBUS is not set +# CONFIG_SENSORS_SHT15 is not set +# CONFIG_SENSORS_SHT21 is not set +# CONFIG_SENSORS_SMM665 is not set +# CONFIG_SENSORS_DME1737 is not set +# CONFIG_SENSORS_EMC1403 is not set +# CONFIG_SENSORS_EMC2103 is not set +# CONFIG_SENSORS_EMC6W201 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47M192 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SCH56XX_COMMON is not set +# CONFIG_SENSORS_SCH5627 is not set +# CONFIG_SENSORS_SCH5636 is not set +# CONFIG_SENSORS_ADS1015 is not set +# CONFIG_SENSORS_ADS7828 is not set +# CONFIG_SENSORS_AMC6821 is not set +# CONFIG_SENSORS_INA2XX is not set +# CONFIG_SENSORS_THMC50 is not set +# CONFIG_SENSORS_TMP102 is not set +# CONFIG_SENSORS_TMP401 is not set +# CONFIG_SENSORS_TMP421 is not set +CONFIG_SENSORS_TSEN_ADC33=y +# CONFIG_SENSORS_VT1211 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83791D is not set +# CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83793 is not set +# CONFIG_SENSORS_W83795 is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83L786NG is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +# CONFIG_THERMAL is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_CORE is not set +CONFIG_WATCHDOG_NOWAYOUT=y + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +CONFIG_DW_WATCHDOG=y +# CONFIG_MPCORE_WATCHDOG is not set +# CONFIG_MAX63XX_WATCHDOG is not set +# CONFIG_MV88DE3100_WDT is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +# CONFIG_SSB is not set +CONFIG_BCMA_POSSIBLE=y + +# +# Broadcom specific AMBA +# +# CONFIG_BCMA is not set + +# +# Multifunction device drivers +# +# CONFIG_MFD_CORE is not set +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_88PM800 is not set +# CONFIG_MFD_88PM805 is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_ASIC3 is not set +# CONFIG_MFD_TI_AM335X_TSCADC is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_HTC_I2CPLD is not set +# CONFIG_MFD_LM3533 is not set +# CONFIG_TPS6105X is not set +# CONFIG_TPS65010 is not set +# CONFIG_TPS6507X is not set +# CONFIG_MFD_TPS65217 is not set +# CONFIG_MFD_TPS6586X is not set +# CONFIG_MFD_TPS65910 is not set +# CONFIG_MFD_TPS65912_I2C is not set +# CONFIG_MFD_TPS80031 is not set +# CONFIG_TWL4030_CORE is not set +# CONFIG_TWL6040_CORE is not set +# CONFIG_MFD_STMPE is not set +# CONFIG_MFD_TC3589X is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_SMSC is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_MFD_DA9052_I2C is not set +# CONFIG_MFD_DA9055 is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_LP8788 is not set +# CONFIG_MFD_MAX77686 is not set +# CONFIG_MFD_MAX77693 is not set +# CONFIG_MFD_MAX8907 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_MAX8997 is not set +# CONFIG_MFD_MAX8998 is not set +# CONFIG_MFD_SEC_CORE is not set +# CONFIG_MFD_ARIZONA_I2C is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X_I2C is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_WM8994 is not set +# CONFIG_MFD_PCF50633 is not set +# CONFIG_MFD_MC13XXX_I2C is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_MFD_WL1273_CORE is not set +# CONFIG_MFD_TPS65090 is not set +# CONFIG_MFD_AAT2870_CORE is not set +# CONFIG_MFD_RC5T583 is not set +# CONFIG_MFD_SYSCON is not set +# CONFIG_MFD_PALMAS is not set +# CONFIG_MFD_VIPERBOARD is not set +# CONFIG_MFD_RETU is not set +# CONFIG_MFD_AS3711 is not set +CONFIG_REGULATOR=y +# CONFIG_REGULATOR_DEBUG is not set +# CONFIG_REGULATOR_DUMMY is not set +# CONFIG_REGULATOR_FIXED_VOLTAGE is not set +# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set +# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set +# CONFIG_REGULATOR_GPIO is not set +# CONFIG_REGULATOR_AD5398 is not set +# CONFIG_REGULATOR_FAN53555 is not set +# CONFIG_REGULATOR_ISL6271A is not set +CONFIG_REGULATOR_88PG86X=y +# CONFIG_REGULATOR_MAX1586 is not set +# CONFIG_REGULATOR_MAX8649 is not set +# CONFIG_REGULATOR_MAX8660 is not set +# CONFIG_REGULATOR_MAX8952 is not set +# CONFIG_REGULATOR_MAX8973 is not set +# CONFIG_REGULATOR_LP3971 is not set +# CONFIG_REGULATOR_LP3972 is not set +# CONFIG_REGULATOR_LP872X is not set +# CONFIG_REGULATOR_TPS51632 is not set +# CONFIG_REGULATOR_TPS62360 is not set +# CONFIG_REGULATOR_TPS65023 is not set +# CONFIG_REGULATOR_TPS6507X is not set +# CONFIG_MEDIA_SUPPORT is not set + +# +# Graphics support +# +# CONFIG_DRM is not set +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +# CONFIG_FB is not set +# CONFIG_EXYNOS_VIDEO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set +CONFIG_SOUND=y +# CONFIG_SOUND_OSS_CORE is not set +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=y +CONFIG_SND_COMPRESS_OFFLOAD=y +CONFIG_SND_JACK=y +# CONFIG_SND_SEQUENCER is not set +# CONFIG_SND_MIXER_OSS is not set +# CONFIG_SND_PCM_OSS is not set +# CONFIG_SND_DYNAMIC_MINORS is not set +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +# CONFIG_SND_RAWMIDI_SEQ is not set +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +CONFIG_SND_DRIVERS=y +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_ALOOP is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set +CONFIG_SND_ARM=y +CONFIG_SND_USB=y +# CONFIG_SND_USB_AUDIO is not set +# CONFIG_SND_USB_UA101 is not set +# CONFIG_SND_USB_CAIAQ is not set +# CONFIG_SND_USB_6FIRE is not set +CONFIG_SND_SOC=y +# CONFIG_SND_DESIGNWARE_I2S is not set +CONFIG_SND_SOC_BERLIN=y +CONFIG_SND_SOC_I2C_AND_SPI=y +# CONFIG_SND_SOC_ALL_CODECS is not set +# CONFIG_SND_SIMPLE_CARD is not set +# CONFIG_SOUND_PRIME is not set + +# +# HID support +# +# CONFIG_HID is not set + +# +# USB HID support +# +# CONFIG_USB_HID is not set +# CONFIG_HID_PID is not set + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set + +# +# I2C HID support +# +# CONFIG_I2C_HID is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set +CONFIG_USB_ARCH_HAS_EHCI=y +# CONFIG_USB_ARCH_HAS_XHCI is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_COMMON=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y + +# +# Miscellaneous USB options +# +CONFIG_USB_DYNAMIC_MINORS=y +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +# CONFIG_USB_MON is not set +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_EHCI_TT_NEWSCHED=y +CONFIG_USB_EHCI_BERLIN=y +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_EHCI_HCD_PLATFORM is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_CHIPIDEA is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_WDM is not set +# CONFIG_USB_TMC is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_REALTEK is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +# CONFIG_USB_STORAGE_ENE_UB6250 is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB port drivers +# +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_CONSOLE=y +# CONFIG_USB_SERIAL_GENERIC is not set +# CONFIG_USB_SERIAL_AIRCABLE is not set +# CONFIG_USB_SERIAL_ARK3116 is not set +# CONFIG_USB_SERIAL_BELKIN is not set +# CONFIG_USB_SERIAL_CH341 is not set +# CONFIG_USB_SERIAL_WHITEHEAT is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +# CONFIG_USB_SERIAL_CP210X is not set +# CONFIG_USB_SERIAL_CYPRESS_M8 is not set +# CONFIG_USB_SERIAL_EMPEG is not set +CONFIG_USB_SERIAL_FTDI_SIO=y +# CONFIG_USB_SERIAL_FUNSOFT is not set +# CONFIG_USB_SERIAL_VISOR is not set +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_F81232 is not set +# CONFIG_USB_SERIAL_GARMIN is not set +# CONFIG_USB_SERIAL_IPW is not set +# CONFIG_USB_SERIAL_IUU is not set +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +# CONFIG_USB_SERIAL_KEYSPAN is not set +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +# CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_METRO is not set +# CONFIG_USB_SERIAL_MOS7720 is not set +# CONFIG_USB_SERIAL_MOS7840 is not set +# CONFIG_USB_SERIAL_MOTOROLA is not set +# CONFIG_USB_SERIAL_NAVMAN is not set +# CONFIG_USB_SERIAL_PL2303 is not set +# CONFIG_USB_SERIAL_OTI6858 is not set +# CONFIG_USB_SERIAL_QCAUX is not set +# CONFIG_USB_SERIAL_QUALCOMM is not set +# CONFIG_USB_SERIAL_SPCP8X5 is not set +# CONFIG_USB_SERIAL_HP4X is not set +# CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_SIEMENS_MPI is not set +# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set +# CONFIG_USB_SERIAL_SYMBOL is not set +# CONFIG_USB_SERIAL_TI is not set +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OPTION is not set +# CONFIG_USB_SERIAL_OMNINET is not set +# CONFIG_USB_SERIAL_OPTICON is not set +# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set +# CONFIG_USB_SERIAL_ZIO is not set +# CONFIG_USB_SERIAL_ZTE is not set +# CONFIG_USB_SERIAL_SSU100 is not set +# CONFIG_USB_SERIAL_QT2 is not set +# CONFIG_USB_SERIAL_DEBUG is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set +# CONFIG_USB_TEST is not set +# CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_YUREX is not set +CONFIG_USB_EZUSB_FX2=y + +# +# USB Physical Layer drivers +# +# CONFIG_USB_ISP1301 is not set +# CONFIG_USB_RCAR_PHY is not set +# CONFIG_USB_GADGET is not set + +# +# OTG and related infrastructure +# +# CONFIG_USB_GPIO_VBUS is not set +# CONFIG_USB_ULPI is not set +# CONFIG_NOP_USB_XCEIV is not set +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +# CONFIG_MMC_UNSAFE_RESUME is not set +# CONFIG_MMC_CLKGATE is not set + +# +# MMC/SD/SDIO Card Drivers +# +# CONFIG_MMC_BLOCK is not set +# CONFIG_SDIO_UART is not set +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_IO_ACCESSORS=y +CONFIG_MMC_SDHCI_PLTFM=y +# CONFIG_MMC_SDHCI_PXAV3 is not set +# CONFIG_MMC_SDHCI_PXAV2 is not set +CONFIG_MMC_SDHCI_MV=y +# CONFIG_MMC_DW is not set +# CONFIG_MMC_VUB300 is not set +# CONFIG_MMC_USHC is not set +# CONFIG_MEMSTICK is not set +# CONFIG_NEW_LEDS is not set +# CONFIG_ACCESSIBILITY is not set +# CONFIG_EDAC is not set +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set + +# +# Virtio drivers +# +# CONFIG_VIRTIO_MMIO is not set + +# +# Microsoft Hyper-V guest support +# +CONFIG_STAGING=y +# CONFIG_USBIP_CORE is not set +# CONFIG_PRISM2_USB is not set +# CONFIG_ECHO is not set +# CONFIG_ASUS_OLED is not set +# CONFIG_R8712U is not set +# CONFIG_RTS5139 is not set +# CONFIG_TRANZPORT is not set +# CONFIG_LINE6_USB is not set +# CONFIG_USB_SERIAL_QUATECH2 is not set +# CONFIG_ZSMALLOC is not set +# CONFIG_BCM_WIMAX is not set +# CONFIG_FT1000 is not set + +# +# Speakup console speech +# +# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set +# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set +# CONFIG_STAGING_MEDIA is not set + +# +# Android +# +CONFIG_ANDROID=y +# CONFIG_ANDROID_BINDER_IPC is not set +CONFIG_ASHMEM=y +CONFIG_ANDROID_LOGGER=y +# CONFIG_ANDROID_TIMED_OUTPUT is not set +# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set +# CONFIG_USB_WPAN_HCD is not set +# CONFIG_WIMAX_GDM72XX is not set +# CONFIG_CSR_WIFI is not set +# CONFIG_CED1401 is not set +# CONFIG_DGRP is not set +CONFIG_CLKDEV_LOOKUP=y +CONFIG_HAVE_CLK_PREPARE=y +CONFIG_COMMON_CLK=y + +# +# Common Clock Framework +# +# CONFIG_COMMON_CLK_DEBUG is not set + +# +# Hardware Spinlock drivers +# +CONFIG_DW_APB_TIMER=y +# CONFIG_IOMMU_SUPPORT is not set + +# +# Remoteproc drivers (EXPERIMENTAL) +# +# CONFIG_STE_MODEM_RPROC is not set + +# +# Rpmsg drivers (EXPERIMENTAL) +# +# CONFIG_VIRT_DRIVERS is not set +# CONFIG_PM_DEVFREQ is not set +# CONFIG_EXTCON is not set +# CONFIG_MEMORY is not set +# CONFIG_IIO is not set +# CONFIG_PWM is not set +# CONFIG_IPACK_BUS is not set + +# +# File systems +# +CONFIG_DCACHE_WORD_ACCESS=y +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +# CONFIG_EXT4_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_BTRFS_FS is not set +# CONFIG_NILFS2_FS is not set +# CONFIG_FS_POSIX_ACL is not set +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +# CONFIG_DNOTIFY is not set +CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set +# CONFIG_QUOTA is not set +# CONFIG_QUOTACTL is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set +CONFIG_OVERLAYFS_FS=y + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_TMPFS_XATTR is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_ECRYPT_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_YAFFS_FS=y +CONFIG_YAFFS_YAFFS1=y +# CONFIG_YAFFS_9BYTE_TAGS is not set +# CONFIG_YAFFS_DOES_ECC is not set +CONFIG_YAFFS_YAFFS2=y +CONFIG_YAFFS_AUTO_YAFFS2=y +CONFIG_YAFFS_DISABLE_TAGS_ECC=y +# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set +# CONFIG_YAFFS_EMPTY_LOST_AND_FOUND is not set +# CONFIG_YAFFS_DISABLE_BLOCK_REFRESHING is not set +# CONFIG_YAFFS_DISABLE_BACKGROUND is not set +CONFIG_YAFFS_XATTR=y +# CONFIG_JFFS2_FS is not set +# CONFIG_LOGFS is not set +# CONFIG_CRAMFS is not set +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_XATTR is not set +CONFIG_SQUASHFS_ZLIB=y +# CONFIG_SQUASHFS_LZO is not set +CONFIG_SQUASHFS_XZ=y +# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set +CONFIG_SQUASHFS_EMBEDDED=y +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX6FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_PSTORE is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +# CONFIG_F2FS_FS is not set +# CONFIG_NETWORK_FILESYSTEMS is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_MAC_ROMAN is not set +# CONFIG_NLS_MAC_CELTIC is not set +# CONFIG_NLS_MAC_CENTEURO is not set +# CONFIG_NLS_MAC_CROATIAN is not set +# CONFIG_NLS_MAC_CYRILLIC is not set +# CONFIG_NLS_MAC_GAELIC is not set +# CONFIG_NLS_MAC_GREEK is not set +# CONFIG_NLS_MAC_ICELAND is not set +# CONFIG_NLS_MAC_INUIT is not set +# CONFIG_NLS_MAC_ROMANIAN is not set +# CONFIG_NLS_MAC_TURKISH is not set +CONFIG_NLS_UTF8=y + +# +# Kernel hacking +# +CONFIG_PRINTK_TIME=y +CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +CONFIG_MAGIC_SYSRQ=y +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_READABLE_ASM is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_SECTION_MISMATCH is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +# CONFIG_LOCKUP_DETECTOR is not set +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +CONFIG_DETECT_HUNG_TASK=y +CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +# CONFIG_SCHED_DEBUG is not set +# CONFIG_SCHEDSTATS is not set +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_SLUB_STATS is not set +CONFIG_HAVE_DEBUG_KMEMLEAK=y +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_PROVE_RCU_DELAY is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_ATOMIC_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set +CONFIG_FRAME_POINTER=y +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +CONFIG_RCU_CPU_STALL_TIMEOUT=21 +CONFIG_RCU_CPU_STALL_VERBOSE=y +# CONFIG_RCU_CPU_STALL_INFO is not set +# CONFIG_RCU_TRACE is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_DEBUG_PER_CPU_MAPS is not set +# CONFIG_NOTIFIER_ERROR_INJECTION is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_DEBUG_PAGEALLOC is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_TRACE_CLOCK=y +CONFIG_RING_BUFFER=y +CONFIG_RING_BUFFER_ALLOW_SWAP=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_TEST_KSTRTOX is not set +# CONFIG_STRICT_DEVMEM is not set +# CONFIG_ARM_UNWIND is not set +CONFIG_DEBUG_USER=y +CONFIG_DEBUG_LL=y +CONFIG_DEBUG_BERLIN_UART=y +# CONFIG_DEBUG_LL_UART_NONE is not set +# CONFIG_DEBUG_ICEDCC is not set +# CONFIG_DEBUG_SEMIHOSTING is not set +CONFIG_DEBUG_LL_INCLUDE="debug/berlin.S" +CONFIG_EARLY_PRINTK=y +# CONFIG_PID_IN_CONTEXTIDR is not set + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_ENCRYPTED_KEYS is not set +# CONFIG_KEYS_DEBUG_PROC_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +# CONFIG_CRYPTO_USER is not set +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_PCRYPT is not set +CONFIG_CRYPTO_WORKQUEUE=y +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_GHASH is not set +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA1_ARM is not set +CONFIG_CRYPTO_SHA256=y +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_AES_ARM is not set +# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_TWOFISH=y +CONFIG_CRYPTO_TWOFISH_COMMON=y + +# +# Compression +# +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_ZLIB is not set +# CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_USER_API_HASH is not set +# CONFIG_CRYPTO_USER_API_SKCIPHER is not set +# CONFIG_CRYPTO_HW is not set +# CONFIG_ASYMMETRIC_KEY_TYPE is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_IO=y +CONFIG_PERCPU_RWSEM=y +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +# CONFIG_CRC_T10DIF is not set +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +# CONFIG_CRC32_SELFTEST is not set +CONFIG_CRC32_SLICEBY8=y +# CONFIG_CRC32_SLICEBY4 is not set +# CONFIG_CRC32_SARWATE is not set +# CONFIG_CRC32_BIT is not set +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +# CONFIG_CRC8 is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_XZ_DEC=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_BCJ=y +# CONFIG_XZ_DEC_TEST is not set +CONFIG_DECOMPRESS_GZIP=y +CONFIG_DECOMPRESS_XZ=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_CPU_RMAP=y +CONFIG_DQL=y +CONFIG_NLATTR=y +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +# CONFIG_AVERAGE is not set +# CONFIG_CORDIC is not set +# CONFIG_DDR is not set diff --git a/arch/arm/configs/salami_defconfig b/arch/arm/configs/salami_defconfig new file mode 100755 index 00000000..9868393c --- /dev/null +++ b/arch/arm/configs/salami_defconfig @@ -0,0 +1,2125 @@ +# +# Automatically generated file; DO NOT EDIT. +# Linux/arm 3.8.13 Kernel Configuration +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_ARCH_HAS_CPUFREQ=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_VECTORS_BASE=0xffff0000 +# CONFIG_ARM_PATCH_PHYS_VIRT is not set +CONFIG_PHYS_OFFSET=0x01100000 +CONFIG_GENERIC_BUG=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_HAVE_IRQ_WORK=y +CONFIG_IRQ_WORK=y +CONFIG_BUILDTIME_EXTABLE_SORT=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_XZ=y +CONFIG_HAVE_KERNEL_LZO=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_LZMA is not set +CONFIG_KERNEL_XZ=y +# CONFIG_KERNEL_LZO is not set +CONFIG_DEFAULT_HOSTNAME="(none)" +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +# CONFIG_FHANDLE is not set +# CONFIG_AUDIT is not set +CONFIG_HAVE_GENERIC_HARDIRQS=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_SPARSE_IRQ=y +CONFIG_KTIME_SCALAR=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y + +# +# Timers subsystem +# +# CONFIG_NO_HZ is not set +# CONFIG_HIGH_RES_TIMERS is not set + +# +# CPU/Task time and stats accounting +# +CONFIG_TICK_CPU_ACCOUNTING=y +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set + +# +# RCU Subsystem +# +CONFIG_TREE_PREEMPT_RCU=y +CONFIG_PREEMPT_RCU=y +CONFIG_RCU_FANOUT=32 +CONFIG_RCU_FANOUT_LEAF=16 +# CONFIG_RCU_FANOUT_EXACT is not set +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_RCU_BOOST is not set +# CONFIG_RCU_NOCB_CPU is not set +# CONFIG_IKCONFIG is not set +CONFIG_LOG_BUF_SHIFT=17 +CONFIG_CGROUPS=y +# CONFIG_CGROUP_DEBUG is not set +# CONFIG_CGROUP_FREEZER is not set +# CONFIG_CGROUP_DEVICE is not set +# CONFIG_CPUSETS is not set +CONFIG_CGROUP_CPUACCT=y +# CONFIG_RESOURCE_COUNTERS is not set +# CONFIG_CGROUP_PERF is not set +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +# CONFIG_CFS_BANDWIDTH is not set +# CONFIG_RT_GROUP_SCHED is not set +# CONFIG_BLK_CGROUP is not set +# CONFIG_CHECKPOINT_RESTORE is not set +CONFIG_NAMESPACES=y +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_USER_NS is not set +CONFIG_PID_NS=y +CONFIG_NET_NS=y +CONFIG_UIDGID_CONVERTED=y +# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set +# CONFIG_SCHED_AUTOGROUP is not set +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +CONFIG_RD_XZ=y +# CONFIG_RD_LZO is not set +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_EXPERT=y +CONFIG_HAVE_UID16=y +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +# CONFIG_BASE_FULL is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_EMBEDDED=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +CONFIG_VM_EVENT_COUNTERS=y +# CONFIG_SLUB_DEBUG is not set +CONFIG_COMPAT_BRK=y +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_SLOB is not set +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +CONFIG_HAVE_OPROFILE=y +CONFIG_JUMP_LABEL=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DMA_CONTIGUOUS=y +CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_HW_BREAKPOINT=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_SECCOMP_FILTER=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_CLONE_BACKWARDS=y + +# +# GCOV-based kernel profiling +# +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=1 +# CONFIG_MODULES is not set +CONFIG_BLOCK=y +CONFIG_LBDAF=y +CONFIG_BLK_DEV_BSG=y +# CONFIG_BLK_DEV_BSGLIB is not set +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +CONFIG_LDM_PARTITION=y +# CONFIG_LDM_DEBUG is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +CONFIG_UNINLINE_SPIN_UNLOCK=y +CONFIG_MUTEX_SPIN_ON_OWNER=y +# CONFIG_FREEZER is not set + +# +# System Type +# +CONFIG_MMU=y +# CONFIG_ARCH_MULTIPLATFORM is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_BCM2835 is not set +# CONFIG_ARCH_CNS3XXX is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_SIRF is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_MXS is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP4XX is not set +CONFIG_ARCH_BERLIN=y +# CONFIG_ARCH_DOVE is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_LPC32XX is not set +# CONFIG_ARCH_TEGRA is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_MSM is not set +# CONFIG_ARCH_SHMOBILE is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C24XX is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_S5P64X0 is not set +# CONFIG_ARCH_S5PC100 is not set +# CONFIG_ARCH_S5PV210 is not set +# CONFIG_ARCH_EXYNOS is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_U300 is not set +# CONFIG_ARCH_U8500 is not set +# CONFIG_ARCH_NOMADIK is not set +# CONFIG_PLAT_SPEAR is not set +# CONFIG_ARCH_DAVINCI is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VT8500_SINGLE is not set + +# +# Marvell Berlin SoCs Support +# +CONFIG_ARCH_BERLIN2=y +# CONFIG_BERLIN2CD is not set +# CONFIG_BERLIN2Q is not set +CONFIG_BERLIN2CDP=y + +# +# BERLIN2 features +# +CONFIG_BERLIN_ASIC=y + +# +# BERLIN modules +# +CONFIG_BERLIN_SHM=y +CONFIG_BERLIN_CC=y +# CONFIG_BERLIN_GPIO is not set +# CONFIG_BERLIN_I2C is not set +# CONFIG_BERLIN_GPU is not set +CONFIG_BERLIN_GPU3D=y +# CONFIG_BERLIN_PE is not set +CONFIG_BERLIN_AMP=y +CONFIG_BERLIN_TZDD=y +CONFIG_BERLIN_TZDD_CB=y +CONFIG_BERLIN_PXA3XX_NFC=y +CONFIG_BERLIN_NAND_RANDOMIZER=y +# CONFIG_BERLIN_NAND_READ_RETRY is not set +# CONFIG_BERLIN_SDIO_WLAN_8787 is not set +# CONFIG_BERLIN_SDIO_WLAN_8797 is not set +CONFIG_BERLIN_SDIO_WLAN_8801=y +# CONFIG_BERLIN_SDIO_WLAN_8887 is not set +# CONFIG_BERLIN_SDIO_BT_8887_CHAR_DRV is not set +CONFIG_BERLIN_FASTLOGO=y +CONFIG_BERLIN_PWM=y +# CONFIG_GPIO_PCA953X is not set +# CONFIG_ARCH_VT8500 is not set + +# +# Processor Type +# +CONFIG_CPU_V7=y +CONFIG_CPU_32v6K=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +# CONFIG_ARM_LPAE is not set +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set +CONFIG_ARM_THUMB=y +CONFIG_ARM_THUMBEE=y +# CONFIG_ARM_VIRT_EXT is not set +CONFIG_SWP_EMULATE=y +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_MIGHT_HAVE_CACHE_L2X0=y +# CONFIG_CACHE_L2X0 is not set +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_DMA_MEM_BUFFERABLE=y +CONFIG_ARM_NR_BANKS=8 +CONFIG_MULTI_IRQ_HANDLER=y +# CONFIG_ARM_ERRATA_430973 is not set +# CONFIG_ARM_ERRATA_458693 is not set +# CONFIG_ARM_ERRATA_460075 is not set +# CONFIG_ARM_ERRATA_742230 is not set +# CONFIG_ARM_ERRATA_742231 is not set +# CONFIG_ARM_ERRATA_720789 is not set +# CONFIG_ARM_ERRATA_743622 is not set +# CONFIG_ARM_ERRATA_751472 is not set +# CONFIG_ARM_ERRATA_754322 is not set +# CONFIG_ARM_ERRATA_754327 is not set +# CONFIG_ARM_ERRATA_764369 is not set +# CONFIG_ARM_ERRATA_775420 is not set +# CONFIG_ARM_ERRATA_782773 is not set +CONFIG_ARM_ERRATA_814220=y +CONFIG_ARM_GIC=y + +# +# Bus support +# +# CONFIG_PCI_SYSCALL is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_HAVE_SMP=y +CONFIG_SMP=y +CONFIG_SMP_ON_UP=y +CONFIG_ARM_CPU_TOPOLOGY=y +# CONFIG_SCHED_MC is not set +# CONFIG_SCHED_SMT is not set +CONFIG_HAVE_ARM_SCU=y +CONFIG_ARM_ARCH_TIMER=y +CONFIG_HAVE_ARM_TWD=y +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_NR_CPUS=2 +# CONFIG_HOTPLUG_CPU is not set +CONFIG_LOCAL_TIMERS=y +CONFIG_ARCH_NR_GPIO=0 +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_PREEMPT_COUNT=y +CONFIG_HZ=100 +# CONFIG_THUMB2_KERNEL is not set +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +CONFIG_HAVE_ARCH_PFN_VALID=y +# CONFIG_HIGHMEM is not set +CONFIG_HW_PERF_EVENTS=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_COMPACTION is not set +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_CROSS_MEMORY_ATTACH=y +# CONFIG_CLEANCACHE is not set +CONFIG_FORCE_MAX_ZONEORDER=11 +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UACCESS_WITH_MEMCPY is not set +CONFIG_SECCOMP=y +# CONFIG_CC_STACKPROTECTOR is not set +# CONFIG_XEN is not set + +# +# Boot options +# +CONFIG_USE_OF=y +CONFIG_ATAGS=y +# CONFIG_DEPRECATED_PARAM_STRUCT is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y +# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set +CONFIG_CMDLINE="macaddr=00:50:43:01:1E:3D console=ttyS0,115200 root=/dev/nfs nfsroot=10.37.116.100:/home/jszhang/static_bb,v3 ip=dhcp pxa3xx_nand.use_cache_program=0 mtdparts=mv_nand:2G(test)" +CONFIG_CMDLINE_FROM_BOOTLOADER=y +# CONFIG_CMDLINE_EXTEND is not set +# CONFIG_CMDLINE_FORCE is not set +# CONFIG_XIP_KERNEL is not set +# CONFIG_CRASH_DUMP is not set +# CONFIG_AUTO_ZRELADDR is not set + +# +# CPU Power Management +# + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +CONFIG_CPU_FREQ_GOV_COMMON=y +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set +CONFIG_GENERIC_CPUFREQ_CPU0=y + +# +# ARM CPU frequency scaling drivers +# +# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set +# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set +# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set +# CONFIG_CPU_IDLE is not set +# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_NEON=y + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_HAVE_AOUT=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set +CONFIG_COREDUMP=y + +# +# Power management options +# +# CONFIG_SUSPEND is not set +# CONFIG_PM_RUNTIME is not set +CONFIG_ARCH_HAS_OPP=y +CONFIG_PM_OPP=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +# CONFIG_ARM_CPU_SUSPEND is not set +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_DIAG is not set +CONFIG_UNIX=y +# CONFIG_UNIX_DIAG is not set +# CONFIG_XFRM_USER is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE_DEMUX is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=y +CONFIG_IPV6_PRIVACY=y +# CONFIG_IPV6_ROUTER_PREF is not set +# CONFIG_IPV6_OPTIMISTIC_DAD is not set +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_IPV6_MIP6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET6_XFRM_MODE_TUNNEL is not set +# CONFIG_INET6_XFRM_MODE_BEET is not set +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +# CONFIG_IPV6_SIT is not set +# CONFIG_IPV6_TUNNEL is not set +# CONFIG_IPV6_GRE is not set +# CONFIG_IPV6_MULTIPLE_TABLES is not set +# CONFIG_IPV6_MROUTE is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +# CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_L2TP is not set +# CONFIG_BRIDGE is not set +CONFIG_HAVE_NET_DSA=y +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +# CONFIG_NET_SCHED is not set +# CONFIG_DCB is not set +# CONFIG_DNS_RESOLVER is not set +# CONFIG_BATMAN_ADV is not set +# CONFIG_OPENVSWITCH is not set +CONFIG_RPS=y +CONFIG_RFS_ACCEL=y +CONFIG_XPS=y +# CONFIG_NETPRIO_CGROUP is not set +CONFIG_BQL=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set +CONFIG_WIRELESS=y +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_WEXT_SPY=y +CONFIG_WEXT_PRIV=y +CONFIG_CFG80211=y +# CONFIG_NL80211_TESTMODE is not set +# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_CFG80211_REG_DEBUG is not set +# CONFIG_CFG80211_CERTIFICATION_ONUS is not set +CONFIG_CFG80211_DEFAULT_PS=y +CONFIG_CFG80211_INTERNAL_REGDB=y +CONFIG_CFG80211_WEXT=y +# CONFIG_LIB80211 is not set +# CONFIG_MAC80211 is not set +# CONFIG_WIMAX is not set +CONFIG_RFKILL=y +# CONFIG_RFKILL_INPUT is not set +# CONFIG_RFKILL_REGULATOR is not set +# CONFIG_RFKILL_GPIO is not set +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set +# CONFIG_NFC is not set +CONFIG_HAVE_BPF_JIT=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="/sbin/mdev" +# CONFIG_DEVTMPFS is not set +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_FIRMWARE_IN_KERNEL is not set +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_GENERIC_CPU_DEVICES is not set +# CONFIG_DMA_SHARED_BUFFER is not set +# CONFIG_CMA is not set + +# +# Bus devices +# +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_REDBOOT_PARTS is not set +CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_AFS_PARTS is not set +# CONFIG_MTD_OF_PARTS is not set +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_SM_FTL is not set +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +# CONFIG_MTD_DOCG3 is not set +CONFIG_MTD_NAND_ECC=y +# CONFIG_MTD_NAND_ECC_SMC is not set +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_ECC_BCH is not set +# CONFIG_MTD_SM_COMMON is not set +# CONFIG_MTD_NAND_MUSEUM_IDS is not set +# CONFIG_MTD_NAND_DENALI is not set +# CONFIG_MTD_NAND_GPIO is not set +CONFIG_MTD_NAND_IDS=y +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_DOCG4 is not set +# CONFIG_MTD_NAND_NANDSIM is not set +# CONFIG_MTD_NAND_PLATFORM is not set +# CONFIG_MTD_ALAUDA is not set +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR flash memory drivers +# +# CONFIG_MTD_LPDDR is not set +# CONFIG_MTD_UBI is not set +CONFIG_DTC=y +CONFIG_OF=y + +# +# Device Tree and Open Firmware support +# +# CONFIG_PROC_DEVICETREE is not set +# CONFIG_OF_SELFTEST is not set +CONFIG_OF_FLATTREE=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_IRQ=y +CONFIG_OF_DEVICE=y +CONFIG_OF_I2C=y +CONFIG_OF_NET=y +CONFIG_OF_MDIO=y +CONFIG_OF_MTD=y +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_DRBD is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=1 +CONFIG_BLK_DEV_RAM_SIZE=32768 +# CONFIG_BLK_DEV_XIP is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_MG_DISK is not set +# CONFIG_BLK_DEV_RBD is not set + +# +# Misc devices +# +# CONFIG_SENSORS_LIS3LV02D is not set +# CONFIG_AD525X_DPOT is not set +# CONFIG_ATMEL_PWM is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_APDS9802ALS is not set +# CONFIG_ISL29003 is not set +# CONFIG_ISL29020 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_SENSORS_BH1780 is not set +# CONFIG_SENSORS_BH1770 is not set +# CONFIG_SENSORS_APDS990X is not set +# CONFIG_HMC6352 is not set +# CONFIG_DS1682 is not set +# CONFIG_BMP085_I2C is not set +# CONFIG_USB_SWITCH_FSA9480 is not set +CONFIG_FLASH_TS=y +CONFIG_FLASH_TS_PARTITION="fts" +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +# CONFIG_EEPROM_AT24 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +# CONFIG_EEPROM_93CX6 is not set + +# +# Texas Instruments shared transport line discipline +# +# CONFIG_TI_ST is not set +# CONFIG_SENSORS_LIS3_I2C is not set + +# +# Altera FPGA firmware download module +# +# CONFIG_ALTERA_STAPL is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_SCSI_PROC_FS is not set + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +CONFIG_CHR_DEV_SG=y +# CONFIG_CHR_DEV_SCH is not set +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +CONFIG_SCSI_SCAN_ASYNC=y + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +# CONFIG_SCSI_LOWLEVEL is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +# CONFIG_ATA is not set +# CONFIG_MD is not set +# CONFIG_TARGET_CORE is not set +CONFIG_NETDEVICES=y +CONFIG_NET_CORE=y +# CONFIG_BONDING is not set +# CONFIG_DUMMY is not set +# CONFIG_EQUALIZER is not set +CONFIG_MII=y +# CONFIG_NET_TEAM is not set +# CONFIG_MACVLAN is not set +# CONFIG_VXLAN is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_TUN is not set +# CONFIG_VETH is not set + +# +# CAIF transport drivers +# + +# +# Distributed Switch Architecture drivers +# +# CONFIG_NET_DSA_MV88E6XXX is not set +# CONFIG_NET_DSA_MV88E6060 is not set +# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set +# CONFIG_NET_DSA_MV88E6131 is not set +# CONFIG_NET_DSA_MV88E6123_61_65 is not set +CONFIG_ETHERNET=y +# CONFIG_NET_CADENCE is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_CALXEDA_XGMAC is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_DM9000 is not set +# CONFIG_DNET is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +CONFIG_NET_VENDOR_MARVELL=y +# CONFIG_MVMDIO is not set +CONFIG_BERLIN_FASTETH=y +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_ETHOC is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_AT803X_PHY is not set +# CONFIG_AMD_PHY is not set +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_BROADCOM_PHY is not set +# CONFIG_BCM87XX_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_REALTEK_PHY is not set +# CONFIG_NATIONAL_PHY is not set +# CONFIG_STE10XP is not set +# CONFIG_LSI_ET1011C_PHY is not set +# CONFIG_MICREL_PHY is not set +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set +# CONFIG_MDIO_BUS_MUX_GPIO is not set +# CONFIG_MDIO_BUS_MUX_MMIOREG is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +CONFIG_USB_USBNET=y +CONFIG_USB_NET_AX8817X=y +CONFIG_USB_NET_CDCETHER=y +# CONFIG_USB_NET_CDC_EEM is not set +# CONFIG_USB_NET_CDC_NCM is not set +# CONFIG_USB_NET_CDC_MBIM is not set +# CONFIG_USB_NET_DM9601 is not set +# CONFIG_USB_NET_SMSC75XX is not set +# CONFIG_USB_NET_SMSC95XX is not set +# CONFIG_USB_NET_GL620A is not set +# CONFIG_USB_NET_NET1080 is not set +# CONFIG_USB_NET_PLUSB is not set +# CONFIG_USB_NET_MCS7830 is not set +# CONFIG_USB_NET_RNDIS_HOST is not set +# CONFIG_USB_NET_CDC_SUBSET is not set +# CONFIG_USB_NET_ZAURUS is not set +# CONFIG_USB_NET_CX82310_ETH is not set +# CONFIG_USB_NET_KALMIA is not set +# CONFIG_USB_NET_QMI_WWAN is not set +# CONFIG_USB_HSO is not set +# CONFIG_USB_NET_INT51X1 is not set +# CONFIG_USB_IPHETH is not set +# CONFIG_USB_SIERRA_NET is not set +# CONFIG_USB_VL600 is not set +CONFIG_WLAN=y +# CONFIG_USB_ZD1201 is not set +# CONFIG_USB_NET_RNDIS_WLAN is not set +# CONFIG_ATH_CARDS is not set +# CONFIG_BRCMFMAC is not set +# CONFIG_HOSTAP is not set +# CONFIG_LIBERTAS is not set +# CONFIG_WL_TI is not set +# CONFIG_MWIFIEX is not set + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# +# CONFIG_WAN is not set +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=y +# CONFIG_INPUT_POLLDEV is not set +# CONFIG_INPUT_SPARSEKMAP is not set +# CONFIG_INPUT_MATRIXKMAP is not set + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_AD714X is not set +# CONFIG_INPUT_BMA150 is not set +# CONFIG_INPUT_MMA8450 is not set +# CONFIG_INPUT_MPU3050 is not set +# CONFIG_INPUT_GP2A is not set +# CONFIG_INPUT_GPIO_TILT_POLLED is not set +# CONFIG_INPUT_ATI_REMOTE2 is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +# CONFIG_INPUT_KXTJ9 is not set +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +CONFIG_INPUT_UINPUT=y +# CONFIG_INPUT_PCF8574 is not set +# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set +# CONFIG_INPUT_ADXL34X is not set +# CONFIG_INPUT_CMA3000 is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +# CONFIG_VT is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set +# CONFIG_TRACE_SINK is not set +# CONFIG_DEVKMEM is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_DW=y +# CONFIG_SERIAL_8250_EM is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_OF_PLATFORM is not set +# CONFIG_SERIAL_SCCNXP is not set +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +# CONFIG_SERIAL_XILINX_PS_UART is not set +# CONFIG_SERIAL_ARC is not set +# CONFIG_TTY_PRINTK is not set +# CONFIG_HVC_DCC is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +# CONFIG_I2C_MUX is not set +CONFIG_I2C_HELPER_AUTO=y + +# +# I2C Hardware Bus support +# + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_CBUS_GPIO is not set +CONFIG_I2C_DESIGNWARE_CORE=y +CONFIG_I2C_DESIGNWARE_PLATFORM=y +# CONFIG_I2C_GPIO is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_PXA_PCI is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_DIOLAN_U2C is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_SPI is not set +# CONFIG_HSI is not set + +# +# PPS support +# +# CONFIG_PPS is not set + +# +# PPS generators support +# + +# +# PTP clock support +# +# CONFIG_PTP_1588_CLOCK is not set + +# +# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. +# +# CONFIG_PTP_1588_CLOCK_PCH is not set +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIOLIB=y +CONFIG_OF_GPIO=y +# CONFIG_DEBUG_GPIO is not set +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_GENERIC=y + +# +# Memory mapped GPIO drivers: +# +# CONFIG_GPIO_GENERIC_PLATFORM is not set +CONFIG_GPIO_DWAPB=y +# CONFIG_GPIO_EM is not set +# CONFIG_GPIO_TS5500 is not set + +# +# I2C GPIO expanders: +# +# CONFIG_GPIO_MAX7300 is not set +# CONFIG_GPIO_MAX732X is not set +# CONFIG_GPIO_PCF857X is not set +# CONFIG_GPIO_SX150X is not set +# CONFIG_GPIO_ADP5588 is not set +# CONFIG_GPIO_ADNP is not set + +# +# PCI GPIO expanders: +# + +# +# SPI GPIO expanders: +# +# CONFIG_GPIO_MCP23S08 is not set + +# +# AC97 GPIO expanders: +# + +# +# MODULbus GPIO expanders: +# + +# +# USB GPIO expanders: +# +# CONFIG_W1 is not set +# CONFIG_POWER_SUPPLY is not set +# CONFIG_POWER_AVS is not set +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Native drivers +# +# CONFIG_SENSORS_AD7414 is not set +# CONFIG_SENSORS_AD7418 is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1029 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM9240 is not set +# CONFIG_SENSORS_ADT7410 is not set +# CONFIG_SENSORS_ADT7411 is not set +# CONFIG_SENSORS_ADT7462 is not set +# CONFIG_SENSORS_ADT7470 is not set +# CONFIG_SENSORS_ADT7475 is not set +# CONFIG_SENSORS_ASC7621 is not set +# CONFIG_SENSORS_ATXP1 is not set +# CONFIG_SENSORS_DS620 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_F71805F is not set +# CONFIG_SENSORS_F71882FG is not set +# CONFIG_SENSORS_F75375S is not set +# CONFIG_SENSORS_G760A is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_GPIO_FAN is not set +# CONFIG_SENSORS_HIH6130 is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_JC42 is not set +# CONFIG_SENSORS_LINEAGE is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM73 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_LM92 is not set +# CONFIG_SENSORS_LM93 is not set +# CONFIG_SENSORS_LTC4151 is not set +# CONFIG_SENSORS_LTC4215 is not set +# CONFIG_SENSORS_LTC4245 is not set +# CONFIG_SENSORS_LTC4261 is not set +# CONFIG_SENSORS_LM95241 is not set +# CONFIG_SENSORS_LM95245 is not set +# CONFIG_SENSORS_MAX16065 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_MAX1668 is not set +# CONFIG_SENSORS_MAX197 is not set +# CONFIG_SENSORS_MAX6639 is not set +# CONFIG_SENSORS_MAX6642 is not set +# CONFIG_SENSORS_MAX6650 is not set +# CONFIG_SENSORS_MCP3021 is not set +# CONFIG_SENSORS_MV88DE3100 is not set +# CONFIG_SENSORS_NTC_THERMISTOR is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_PC87427 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_PMBUS is not set +# CONFIG_SENSORS_SHT15 is not set +# CONFIG_SENSORS_SHT21 is not set +# CONFIG_SENSORS_SMM665 is not set +# CONFIG_SENSORS_DME1737 is not set +# CONFIG_SENSORS_EMC1403 is not set +# CONFIG_SENSORS_EMC2103 is not set +# CONFIG_SENSORS_EMC6W201 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47M192 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SCH56XX_COMMON is not set +# CONFIG_SENSORS_SCH5627 is not set +# CONFIG_SENSORS_SCH5636 is not set +# CONFIG_SENSORS_ADS1015 is not set +# CONFIG_SENSORS_ADS7828 is not set +# CONFIG_SENSORS_AMC6821 is not set +# CONFIG_SENSORS_INA2XX is not set +# CONFIG_SENSORS_THMC50 is not set +# CONFIG_SENSORS_TMP102 is not set +# CONFIG_SENSORS_TMP401 is not set +# CONFIG_SENSORS_TMP421 is not set +CONFIG_SENSORS_TSEN_ADC33=y +# CONFIG_SENSORS_VT1211 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83791D is not set +# CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83793 is not set +# CONFIG_SENSORS_W83795 is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83L786NG is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +# CONFIG_THERMAL is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_CORE is not set +CONFIG_WATCHDOG_NOWAYOUT=y + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +CONFIG_DW_WATCHDOG=y +# CONFIG_MPCORE_WATCHDOG is not set +# CONFIG_MAX63XX_WATCHDOG is not set +# CONFIG_MV88DE3100_WDT is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +# CONFIG_SSB is not set +CONFIG_BCMA_POSSIBLE=y + +# +# Broadcom specific AMBA +# +# CONFIG_BCMA is not set + +# +# Multifunction device drivers +# +# CONFIG_MFD_CORE is not set +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_88PM800 is not set +# CONFIG_MFD_88PM805 is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_ASIC3 is not set +# CONFIG_MFD_TI_AM335X_TSCADC is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_HTC_I2CPLD is not set +# CONFIG_MFD_LM3533 is not set +# CONFIG_TPS6105X is not set +# CONFIG_TPS65010 is not set +# CONFIG_TPS6507X is not set +# CONFIG_MFD_TPS65217 is not set +# CONFIG_MFD_TPS6586X is not set +# CONFIG_MFD_TPS65910 is not set +# CONFIG_MFD_TPS65912_I2C is not set +# CONFIG_MFD_TPS80031 is not set +# CONFIG_TWL4030_CORE is not set +# CONFIG_TWL6040_CORE is not set +# CONFIG_MFD_STMPE is not set +# CONFIG_MFD_TC3589X is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_SMSC is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_MFD_DA9052_I2C is not set +# CONFIG_MFD_DA9055 is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_LP8788 is not set +# CONFIG_MFD_MAX77686 is not set +# CONFIG_MFD_MAX77693 is not set +# CONFIG_MFD_MAX8907 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_MAX8997 is not set +# CONFIG_MFD_MAX8998 is not set +# CONFIG_MFD_SEC_CORE is not set +# CONFIG_MFD_ARIZONA_I2C is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X_I2C is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_WM8994 is not set +# CONFIG_MFD_PCF50633 is not set +# CONFIG_MFD_MC13XXX_I2C is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_MFD_WL1273_CORE is not set +# CONFIG_MFD_TPS65090 is not set +# CONFIG_MFD_AAT2870_CORE is not set +# CONFIG_MFD_RC5T583 is not set +# CONFIG_MFD_SYSCON is not set +# CONFIG_MFD_PALMAS is not set +# CONFIG_MFD_VIPERBOARD is not set +# CONFIG_MFD_RETU is not set +# CONFIG_MFD_AS3711 is not set +CONFIG_REGULATOR=y +# CONFIG_REGULATOR_DEBUG is not set +# CONFIG_REGULATOR_DUMMY is not set +# CONFIG_REGULATOR_FIXED_VOLTAGE is not set +# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set +# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set +# CONFIG_REGULATOR_GPIO is not set +# CONFIG_REGULATOR_AD5398 is not set +# CONFIG_REGULATOR_FAN53555 is not set +# CONFIG_REGULATOR_ISL6271A is not set +CONFIG_REGULATOR_88PG86X=y +# CONFIG_REGULATOR_MAX1586 is not set +# CONFIG_REGULATOR_MAX8649 is not set +# CONFIG_REGULATOR_MAX8660 is not set +# CONFIG_REGULATOR_MAX8952 is not set +# CONFIG_REGULATOR_MAX8973 is not set +# CONFIG_REGULATOR_LP3971 is not set +# CONFIG_REGULATOR_LP3972 is not set +# CONFIG_REGULATOR_LP872X is not set +# CONFIG_REGULATOR_TPS51632 is not set +# CONFIG_REGULATOR_TPS62360 is not set +# CONFIG_REGULATOR_TPS65023 is not set +# CONFIG_REGULATOR_TPS6507X is not set +# CONFIG_MEDIA_SUPPORT is not set + +# +# Graphics support +# +# CONFIG_DRM is not set +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +# CONFIG_FB is not set +# CONFIG_EXYNOS_VIDEO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set +# CONFIG_SOUND is not set + +# +# HID support +# +# CONFIG_HID is not set + +# +# USB HID support +# +# CONFIG_USB_HID is not set +# CONFIG_HID_PID is not set + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set + +# +# I2C HID support +# +# CONFIG_I2C_HID is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set +CONFIG_USB_ARCH_HAS_EHCI=y +# CONFIG_USB_ARCH_HAS_XHCI is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_COMMON=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y + +# +# Miscellaneous USB options +# +CONFIG_USB_DYNAMIC_MINORS=y +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +# CONFIG_USB_MON is not set +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_EHCI_TT_NEWSCHED=y +CONFIG_USB_EHCI_BERLIN=y +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_EHCI_HCD_PLATFORM is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_CHIPIDEA is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_WDM is not set +# CONFIG_USB_TMC is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_REALTEK is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +# CONFIG_USB_STORAGE_ENE_UB6250 is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB port drivers +# +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_CONSOLE=y +# CONFIG_USB_SERIAL_GENERIC is not set +# CONFIG_USB_SERIAL_AIRCABLE is not set +# CONFIG_USB_SERIAL_ARK3116 is not set +# CONFIG_USB_SERIAL_BELKIN is not set +# CONFIG_USB_SERIAL_CH341 is not set +# CONFIG_USB_SERIAL_WHITEHEAT is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +# CONFIG_USB_SERIAL_CP210X is not set +# CONFIG_USB_SERIAL_CYPRESS_M8 is not set +# CONFIG_USB_SERIAL_EMPEG is not set +CONFIG_USB_SERIAL_FTDI_SIO=y +# CONFIG_USB_SERIAL_FUNSOFT is not set +# CONFIG_USB_SERIAL_VISOR is not set +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_F81232 is not set +# CONFIG_USB_SERIAL_GARMIN is not set +# CONFIG_USB_SERIAL_IPW is not set +# CONFIG_USB_SERIAL_IUU is not set +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +# CONFIG_USB_SERIAL_KEYSPAN is not set +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +# CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_METRO is not set +# CONFIG_USB_SERIAL_MOS7720 is not set +# CONFIG_USB_SERIAL_MOS7840 is not set +# CONFIG_USB_SERIAL_MOTOROLA is not set +# CONFIG_USB_SERIAL_NAVMAN is not set +# CONFIG_USB_SERIAL_PL2303 is not set +# CONFIG_USB_SERIAL_OTI6858 is not set +# CONFIG_USB_SERIAL_QCAUX is not set +# CONFIG_USB_SERIAL_QUALCOMM is not set +# CONFIG_USB_SERIAL_SPCP8X5 is not set +# CONFIG_USB_SERIAL_HP4X is not set +# CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_SIEMENS_MPI is not set +# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set +# CONFIG_USB_SERIAL_SYMBOL is not set +# CONFIG_USB_SERIAL_TI is not set +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OPTION is not set +# CONFIG_USB_SERIAL_OMNINET is not set +# CONFIG_USB_SERIAL_OPTICON is not set +# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set +# CONFIG_USB_SERIAL_ZIO is not set +# CONFIG_USB_SERIAL_ZTE is not set +# CONFIG_USB_SERIAL_SSU100 is not set +# CONFIG_USB_SERIAL_QT2 is not set +# CONFIG_USB_SERIAL_DEBUG is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set +# CONFIG_USB_TEST is not set +# CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_YUREX is not set +CONFIG_USB_EZUSB_FX2=y + +# +# USB Physical Layer drivers +# +# CONFIG_USB_ISP1301 is not set +# CONFIG_USB_RCAR_PHY is not set +# CONFIG_USB_GADGET is not set + +# +# OTG and related infrastructure +# +# CONFIG_USB_GPIO_VBUS is not set +# CONFIG_USB_ULPI is not set +# CONFIG_NOP_USB_XCEIV is not set +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +# CONFIG_MMC_UNSAFE_RESUME is not set +# CONFIG_MMC_CLKGATE is not set + +# +# MMC/SD/SDIO Card Drivers +# +# CONFIG_MMC_BLOCK is not set +# CONFIG_SDIO_UART is not set +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_IO_ACCESSORS=y +CONFIG_MMC_SDHCI_PLTFM=y +# CONFIG_MMC_SDHCI_PXAV3 is not set +# CONFIG_MMC_SDHCI_PXAV2 is not set +CONFIG_MMC_SDHCI_MV=y +# CONFIG_MMC_DW is not set +# CONFIG_MMC_VUB300 is not set +# CONFIG_MMC_USHC is not set +# CONFIG_MEMSTICK is not set +# CONFIG_NEW_LEDS is not set +# CONFIG_ACCESSIBILITY is not set +# CONFIG_EDAC is not set +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set + +# +# Virtio drivers +# +# CONFIG_VIRTIO_MMIO is not set + +# +# Microsoft Hyper-V guest support +# +CONFIG_STAGING=y +# CONFIG_USBIP_CORE is not set +# CONFIG_PRISM2_USB is not set +# CONFIG_ECHO is not set +# CONFIG_ASUS_OLED is not set +# CONFIG_R8712U is not set +# CONFIG_RTS5139 is not set +# CONFIG_TRANZPORT is not set +# CONFIG_USB_SERIAL_QUATECH2 is not set +# CONFIG_ZSMALLOC is not set +# CONFIG_BCM_WIMAX is not set +# CONFIG_FT1000 is not set + +# +# Speakup console speech +# +# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set +# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set +# CONFIG_STAGING_MEDIA is not set + +# +# Android +# +CONFIG_ANDROID=y +# CONFIG_ANDROID_BINDER_IPC is not set +CONFIG_ASHMEM=y +CONFIG_ANDROID_LOGGER=y +# CONFIG_ANDROID_TIMED_OUTPUT is not set +# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set +# CONFIG_USB_WPAN_HCD is not set +# CONFIG_WIMAX_GDM72XX is not set +# CONFIG_CSR_WIFI is not set +# CONFIG_CED1401 is not set +# CONFIG_DGRP is not set +CONFIG_CLKDEV_LOOKUP=y +CONFIG_HAVE_CLK_PREPARE=y +CONFIG_COMMON_CLK=y + +# +# Common Clock Framework +# +# CONFIG_COMMON_CLK_DEBUG is not set + +# +# Hardware Spinlock drivers +# +CONFIG_DW_APB_TIMER=y +# CONFIG_IOMMU_SUPPORT is not set + +# +# Remoteproc drivers (EXPERIMENTAL) +# +# CONFIG_STE_MODEM_RPROC is not set + +# +# Rpmsg drivers (EXPERIMENTAL) +# +# CONFIG_VIRT_DRIVERS is not set +# CONFIG_PM_DEVFREQ is not set +# CONFIG_EXTCON is not set +# CONFIG_MEMORY is not set +# CONFIG_IIO is not set +# CONFIG_PWM is not set +# CONFIG_IPACK_BUS is not set + +# +# File systems +# +CONFIG_DCACHE_WORD_ACCESS=y +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +# CONFIG_EXT4_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_BTRFS_FS is not set +# CONFIG_NILFS2_FS is not set +# CONFIG_FS_POSIX_ACL is not set +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +# CONFIG_DNOTIFY is not set +CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set +# CONFIG_QUOTA is not set +# CONFIG_QUOTACTL is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set +CONFIG_OVERLAYFS_FS=y + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_TMPFS_XATTR is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_ECRYPT_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_YAFFS_FS=y +CONFIG_YAFFS_YAFFS1=y +# CONFIG_YAFFS_9BYTE_TAGS is not set +# CONFIG_YAFFS_DOES_ECC is not set +CONFIG_YAFFS_YAFFS2=y +CONFIG_YAFFS_AUTO_YAFFS2=y +CONFIG_YAFFS_DISABLE_TAGS_ECC=y +# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set +# CONFIG_YAFFS_EMPTY_LOST_AND_FOUND is not set +# CONFIG_YAFFS_DISABLE_BLOCK_REFRESHING is not set +# CONFIG_YAFFS_DISABLE_BACKGROUND is not set +CONFIG_YAFFS_XATTR=y +# CONFIG_JFFS2_FS is not set +# CONFIG_LOGFS is not set +# CONFIG_CRAMFS is not set +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_XATTR is not set +CONFIG_SQUASHFS_ZLIB=y +# CONFIG_SQUASHFS_LZO is not set +CONFIG_SQUASHFS_XZ=y +# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set +CONFIG_SQUASHFS_EMBEDDED=y +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX6FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_PSTORE is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +# CONFIG_F2FS_FS is not set +# CONFIG_NETWORK_FILESYSTEMS is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_MAC_ROMAN is not set +# CONFIG_NLS_MAC_CELTIC is not set +# CONFIG_NLS_MAC_CENTEURO is not set +# CONFIG_NLS_MAC_CROATIAN is not set +# CONFIG_NLS_MAC_CYRILLIC is not set +# CONFIG_NLS_MAC_GAELIC is not set +# CONFIG_NLS_MAC_GREEK is not set +# CONFIG_NLS_MAC_ICELAND is not set +# CONFIG_NLS_MAC_INUIT is not set +# CONFIG_NLS_MAC_ROMANIAN is not set +# CONFIG_NLS_MAC_TURKISH is not set +CONFIG_NLS_UTF8=y + +# +# Kernel hacking +# +CONFIG_PRINTK_TIME=y +CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +CONFIG_MAGIC_SYSRQ=y +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_READABLE_ASM is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_SECTION_MISMATCH is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +# CONFIG_LOCKUP_DETECTOR is not set +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +CONFIG_DETECT_HUNG_TASK=y +CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +# CONFIG_SCHED_DEBUG is not set +# CONFIG_SCHEDSTATS is not set +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_SLUB_STATS is not set +CONFIG_HAVE_DEBUG_KMEMLEAK=y +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_PROVE_RCU_DELAY is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_ATOMIC_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set +CONFIG_FRAME_POINTER=y +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +CONFIG_RCU_CPU_STALL_TIMEOUT=21 +CONFIG_RCU_CPU_STALL_VERBOSE=y +# CONFIG_RCU_CPU_STALL_INFO is not set +# CONFIG_RCU_TRACE is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_DEBUG_PER_CPU_MAPS is not set +# CONFIG_NOTIFIER_ERROR_INJECTION is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_DEBUG_PAGEALLOC is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_TRACE_CLOCK=y +CONFIG_RING_BUFFER=y +CONFIG_RING_BUFFER_ALLOW_SWAP=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_TEST_KSTRTOX is not set +# CONFIG_STRICT_DEVMEM is not set +# CONFIG_ARM_UNWIND is not set +CONFIG_DEBUG_USER=y +CONFIG_DEBUG_LL=y +CONFIG_DEBUG_BERLIN_UART=y +# CONFIG_DEBUG_LL_UART_NONE is not set +# CONFIG_DEBUG_ICEDCC is not set +# CONFIG_DEBUG_SEMIHOSTING is not set +CONFIG_DEBUG_LL_INCLUDE="debug/berlin.S" +CONFIG_EARLY_PRINTK=y +# CONFIG_PID_IN_CONTEXTIDR is not set + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_ENCRYPTED_KEYS is not set +# CONFIG_KEYS_DEBUG_PROC_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +# CONFIG_CRYPTO_USER is not set +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_PCRYPT is not set +CONFIG_CRYPTO_WORKQUEUE=y +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_GHASH is not set +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA1_ARM is not set +CONFIG_CRYPTO_SHA256=y +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_AES_ARM is not set +# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_TWOFISH=y +CONFIG_CRYPTO_TWOFISH_COMMON=y + +# +# Compression +# +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_ZLIB is not set +# CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_USER_API_HASH is not set +# CONFIG_CRYPTO_USER_API_SKCIPHER is not set +# CONFIG_CRYPTO_HW is not set +# CONFIG_ASYMMETRIC_KEY_TYPE is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_IO=y +CONFIG_PERCPU_RWSEM=y +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +# CONFIG_CRC_T10DIF is not set +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +# CONFIG_CRC32_SELFTEST is not set +CONFIG_CRC32_SLICEBY8=y +# CONFIG_CRC32_SLICEBY4 is not set +# CONFIG_CRC32_SARWATE is not set +# CONFIG_CRC32_BIT is not set +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +# CONFIG_CRC8 is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_XZ_DEC=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_BCJ=y +# CONFIG_XZ_DEC_TEST is not set +CONFIG_DECOMPRESS_GZIP=y +CONFIG_DECOMPRESS_XZ=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_CPU_RMAP=y +CONFIG_DQL=y +CONFIG_NLATTR=y +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +# CONFIG_AVERAGE is not set +# CONFIG_CORDIC is not set +# CONFIG_DDR is not set diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h index a59dcb5a..ad41ec24 100644 --- a/arch/arm/include/asm/cputype.h +++ b/arch/arm/include/asm/cputype.h @@ -64,6 +64,24 @@ extern unsigned int processor_id; #define read_cpuid_ext(reg) 0 #endif +#define ARM_CPU_IMP_ARM 0x41 +#define ARM_CPU_IMP_INTEL 0x69 + +#define ARM_CPU_PART_ARM1136 0xB360 +#define ARM_CPU_PART_ARM1156 0xB560 +#define ARM_CPU_PART_ARM1176 0xB760 +#define ARM_CPU_PART_ARM11MPCORE 0xB020 +#define ARM_CPU_PART_CORTEX_A8 0xC080 +#define ARM_CPU_PART_CORTEX_A9 0xC090 +#define ARM_CPU_PART_CORTEX_A5 0xC050 +#define ARM_CPU_PART_CORTEX_A15 0xC0F0 +#define ARM_CPU_PART_CORTEX_A7 0xC070 + +#define ARM_CPU_XSCALE_ARCH_MASK 0xe000 +#define ARM_CPU_XSCALE_ARCH_V1 0x2000 +#define ARM_CPU_XSCALE_ARCH_V2 0x4000 +#define ARM_CPU_XSCALE_ARCH_V3 0x6000 + /* * The CPU ID never changes at run time, so we might as well tell the * compiler that it's constant. Use this function to read the CPU ID @@ -74,6 +92,21 @@ static inline unsigned int __attribute_const__ read_cpuid_id(void) return read_cpuid(CPUID_ID); } +static inline unsigned int __attribute_const__ read_cpuid_implementor(void) +{ + return (read_cpuid_id() & 0xFF000000) >> 24; +} + +static inline unsigned int __attribute_const__ read_cpuid_part_number(void) +{ + return read_cpuid_id() & 0xFFF0; +} + +static inline unsigned int __attribute_const__ xscale_cpu_arch_version(void) +{ + return read_cpuid_part_number() & ARM_CPU_XSCALE_ARCH_MASK; +} + static inline unsigned int __attribute_const__ read_cpuid_cachetype(void) { return read_cpuid(CPUID_CACHETYPE); diff --git a/arch/arm/include/asm/hardirq.h b/arch/arm/include/asm/hardirq.h index 2740c2a2..0e516668 100644 --- a/arch/arm/include/asm/hardirq.h +++ b/arch/arm/include/asm/hardirq.h @@ -7,10 +7,12 @@ #define NR_IPI 6 +#define NR_IPI_MAX 16 + typedef struct { unsigned int __softirq_pending; #ifdef CONFIG_SMP - unsigned int ipi_irqs[NR_IPI]; + unsigned int ipi_irqs[NR_IPI_MAX]; #endif } ____cacheline_aligned irq_cpustat_t; diff --git a/arch/arm/include/asm/smp_scu.h b/arch/arm/include/asm/smp_scu.h index 86dff32a..18d16937 100644 --- a/arch/arm/include/asm/smp_scu.h +++ b/arch/arm/include/asm/smp_scu.h @@ -6,6 +6,23 @@ #define SCU_PM_POWEROFF 3 #ifndef __ASSEMBLER__ + +#include + +static inline bool scu_a9_has_base(void) +{ + return read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9; +} + +static inline unsigned long scu_a9_get_base(void) +{ + unsigned long pa; + + asm("mrc p15, 4, %0, c15, c0, 0" : "=r" (pa)); + + return pa; +} + unsigned int scu_get_core_count(void __iomem *); int scu_power_mode(void __iomem *, unsigned int); diff --git a/arch/arm/include/uapi/asm/setup.h b/arch/arm/include/uapi/asm/setup.h index 979ff401..b4d1bea2 100644 --- a/arch/arm/include/uapi/asm/setup.h +++ b/arch/arm/include/uapi/asm/setup.h @@ -16,7 +16,7 @@ #include -#define COMMAND_LINE_SIZE 1024 +#define COMMAND_LINE_SIZE 2048 /* The list ends with an ATAG_NONE node. */ #define ATAG_NONE 0x00000000 diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 78afca1e..c6dec5fc 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -39,7 +39,6 @@ #include #include #include -#include #ifdef CONFIG_CC_STACKPROTECTOR #include diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 58af91c2..fdd31fdb 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -584,12 +584,28 @@ asmlinkage void __exception_irq_entry do_IPI(int ipinr, struct pt_regs *regs) handle_IPI(ipinr, regs); } +#define IPI_USER (0xF) +static void (*_user_ipi_handler)(void *data); +static void *_user_ipi_data; +void register_user_ipi(void (*handler)(void *), void *data) +{ + _user_ipi_handler = handler; + _user_ipi_data = data; +} +EXPORT_SYMBOL(register_user_ipi); +void release_user_ipi(void) +{ + _user_ipi_handler = NULL; + _user_ipi_data = NULL; +} +EXPORT_SYMBOL(release_user_ipi); + void handle_IPI(int ipinr, struct pt_regs *regs) { unsigned int cpu = smp_processor_id(); struct pt_regs *old_regs = set_irq_regs(regs); - if (ipinr < NR_IPI) + if (ipinr < NR_IPI || ipinr == IPI_USER) __inc_irq_stat(cpu, ipi_irqs[ipinr]); switch (ipinr) { @@ -623,6 +639,13 @@ void handle_IPI(int ipinr, struct pt_regs *regs) ipi_cpu_stop(cpu); irq_exit(); break; + case IPI_USER: + if (_user_ipi_handler != NULL) { + irq_enter(); + _user_ipi_handler(_user_ipi_data); + irq_exit(); + } + break; default: printk(KERN_CRIT "CPU%u: Unknown IPI message 0x%x\n", diff --git a/arch/arm/mach-berlin/Kconfig b/arch/arm/mach-berlin/Kconfig index 07a4412e..17b4674a 100644 --- a/arch/arm/mach-berlin/Kconfig +++ b/arch/arm/mach-berlin/Kconfig @@ -7,6 +7,7 @@ choice config ARCH_BERLIN2 bool "BG2" + select ARCH_REQUIRE_GPIOLIB select USB_ARCH_HAS_EHCI if USB_SUPPORT help Support for Marvell Berlin Generation 2 SoCs, based on the @@ -15,18 +16,41 @@ endchoice choice prompt "Choose SoCs" - default BERLIN2CT + default BERLIN2CDP depends on ARCH_BERLIN2 help This option allows to select a SoC version. config BERLIN2CD bool "BG2 CD" + select ARM_ERRATA_754322 + select ARM_ERRATA_775420 help BG2 CD version +config BERLIN2Q + bool "BG2 Q" + select ARM_ERRATA_754322 + select ARM_ERRATA_764369 if SMP + help + BG2 Q version + +config BERLIN2CDP + bool "BG2 CDp Common" + help + BG2 CD+ version endchoice + +menu "BERLIN2 features" + +config BERLIN_ASIC + bool "Support ASIC Version" + default y + help + Berlin has FPGA and ASIC version. Say Y to support ASIC version. +endmenu + comment "BERLIN modules" config BERLIN_SHM @@ -55,16 +79,16 @@ config BERLIN_I2C Enable support fo I2C bus in Berlin SoC config BERLIN_GPU - tristate "SoC's 2d GPU support" - default m - help - 2D GPU support + tristate "SoC's 2d GPU support" + default m + help + 2D GPU support config BERLIN_GPU3D - tristate "SoC's 3d GPU support" - default m - help - 3D GPU support + tristate "SoC's 3d GPU support" + default m + help + 3D GPU support config BERLIN_GPUMEM_FROM_SHM bool "allocate GPU memory from SHM" @@ -74,10 +98,30 @@ config BERLIN_GPUMEM_FROM_SHM if reserve GPU MEM in Linux kernel, then set to n config BERLIN_PE - tristate "Support Presentation Engine" - default m - help - Enable support for Presentation Engine + tristate "Support Presentation Engine" + default m + help + Enable support for Presentation Engine + +config BERLIN_AMP + tristate "Support AMP" + default m + help + Enable support for AMP + +config BERLIN_TZDD + tristate "Support TrustZone" + select BERLIN_TZDD_CB + default m + help + Enable support for ARM TrustZone + +config BERLIN_TZDD_CB + tristate "Support TrustZone Callback" + depends on BERLIN_TZDD + default m + help + Enable support for TrustZone event callback config BERLIN_PXA3XX_NFC tristate "Support NAND Flash Controller (fork of pxa3xx_nand)" @@ -98,6 +142,16 @@ config BERLIN_NAND_RANDOMIZER For chips that don't build in HW randomizer, SW randomizer is needed. Say Y here if you have no idea +config BERLIN_NAND_READ_RETRY + bool "Support NAND read retry when ecc fail in read operation" + default y + depends on BERLIN_PXA3XX_NFC + help + To improve nand read ability of error correction. When ecc fail in read operation, + change the read cmd parameter of nand chip. Every kind of Nand chip's READ RETRY feature + diff from each other. If nand chip do not support READ RETRY, this feature will do nothing. + Now support only hynix nand chip read retry. + config BERLIN_SDIO_WLAN_8787 tristate "SDIO Wlan (IEEE802.11 A|B|G|N) driver for wlan8787 module" default n @@ -107,16 +161,67 @@ config BERLIN_SDIO_WLAN_8787 select WEXT_SPY help This is the wifi module for Berlin. Please try build it for module only. +config BERLIN_SDIO_WLAN_8797 + tristate "SDIO Wlan (IEEE802.11 A|B|G|N) driver for wlan8797 module" + default n + depends on MMC_SDHCI_MV + select WIRELESS_EXT + select WEXT_PRIV + select WEXT_SPY + help + This is the wifi module for Berlin. Please try build it for module only. config BERLIN_SDIO_WLAN_8801 - tristate "SDIO Wlan (IEEE802.11 A|B|G|N) driver for wlan8801 module" - default n - depends on MMC_SDHCI_MV - select WIRELESS_EXT - select WEXT_PRIV - select WEXT_SPY - help - This is the wifi module for Berlin. Please try build it for module only. + tristate "SDIO Wlan (IEEE802.11 A|B|G|N) driver for wlan8801 module" + default n + depends on MMC_SDHCI_MV + select WIRELESS_EXT + select WEXT_PRIV + select WEXT_SPY + help + This is the wifi module for Berlin. Please try build it for module only. + +config BERLIN_SDIO_WLAN_8887 + tristate "SDIO Wlan (IEEE802.11 A|B|G|N) driver for wlan8887 module" + default n + depends on MMC_SDHCI_MV + select WIRELESS_EXT + select WEXT_PRIV + select WEXT_SPY + help + This is the wifi module for Berlin. Please try build it for module only. + +config BERLIN_SDIO_BT_8887 + tristate "SDIO Bluetooth/BLE support for Marvell's 8887 SoC" + default m + depends on CONFIG_BT + depends on CONFIG_BT_RFCOMM + depends on CONFIG_BT_RFCOMM_TTY + depends on CONFIG_BT_BNEP + depends on CONFIG_BT_BNEP_MC_FILTER + depends on CONFIG_BT_BNEP_PROTO_FILTER + depends on CONFIG_BT_HIDP + depends on CONFIG_BT_MRVL + depends on CONFIG_HID + depends on CONFIG_HIDRAW + depends on CONFIG_UHID + depends on CONFIG_HID_GENERIC + help + This is defualt bluetooth module for Berlin based platform. + +config BERLIN_SDIO_BT_8887_CHAR_DRV + tristate "SDIO Bluetooth/BLE Bluedroid support for Marvell's 8887 SoC" + default m + depends on !CONFIG_BT + depends on !CONFIG_BT_RFCOMM + depends on !CONFIG_BT_RFCOMM_TTY + depends on !CONFIG_BT_BNEP + depends on !CONFIG_BT_BNEP_MC_FILTER + depends on !CONFIG_BT_BNEP_PROTO_FILTER + depends on !CONFIG_BT_HIDP + depends on !CONFIG_BT_MRVL + help + This is defualt bluetooth module for Berlin based platform using Bluedroid stack. config BERLIN_FASTLOGO tristate "Support fast logo" @@ -126,7 +231,7 @@ config BERLIN_FASTLOGO config BERLIN_PWM bool "Support PWM" - default n + default y help Enable support for PWM diff --git a/arch/arm/mach-berlin/Makefile b/arch/arm/mach-berlin/Makefile old mode 100644 new mode 100755 index 8a0f4097..4c0b567f --- a/arch/arm/mach-berlin/Makefile +++ b/arch/arm/mach-berlin/Makefile @@ -1,17 +1,40 @@ -obj-y := core.o irq.o time.o clock.o gpio.o wdt_reset.o mv88de31xx_android.o - +obj-y := irq.o time.o gpio.o wdt_reset.o mv88de31xx_android.o hal_dhub.o obj-$(CONFIG_BERLIN2CD) += berlin2cd-dt.o +obj-$(CONFIG_PM_OPP) += opp.o +obj-$(CONFIG_SMP) += platsmp.o headsmp.o + +obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o +obj-$(CONFIG_BERLIN_PXA3XX_NFC) += modules/nfc/ +ifeq ($(CONFIG_BERLIN_PE)y, y) +obj-$(CONFIG_BERLIN_SHM) += modules/shm_amp/ +obj-$(CONFIG_BERLIN_AMP) += modules/amp/ +obj-$(CONFIG_BERLIN_TZDD) += modules/tzdd/ +obj-$(CONFIG_BERLIN_TZDD_CB) += modules/tzdd_cb/ +obj-$(CONFIG_BERLIN_FASTLOGO) += modules/fastlogo/ +obj-$(CONFIG_BERLIN2CDP) += berlin.o +obj-$(CONFIG_BERLIN2CDP) += mv88de3006_bootinfo.o +else +obj-$(CONFIG_BERLIN2CD) += clock.o +obj-$(CONFIG_BERLIN2CD) += core.o obj-$(CONFIG_BERLIN_SHM) += modules/shm/ +obj-$(CONFIG_BERLIN_PE) += modules/pe/ +obj-$(CONFIG_BERLIN_FASTLOGO) += modules/fastlogo_bg2cd/ +endif obj-$(CONFIG_BERLIN_CC) += modules/cc/ obj-$(CONFIG_BERLIN_GPIO) += modules/gpio/ obj-$(CONFIG_BERLIN_PWM) += modules/pwm/ obj-$(CONFIG_BERLIN_I2C) += modules/i2c/ -obj-$(CONFIG_BERLIN_PXA3XX_NFC) += modules/nfc/ obj-$(CONFIG_BERLIN_SDIO_WLAN_8787) += modules/wlan_sd8787/ +obj-$(CONFIG_BERLIN_SDIO_WLAN_8797) += modules/wlan_sd8797/ obj-$(CONFIG_BERLIN_SDIO_WLAN_8801) += modules/wlan_sd8801/ +obj-$(CONFIG_BERLIN_SDIO_WLAN_8887) += modules/wlan_sd8887/ +obj-$(CONFIG_BERLIN_SDIO_BT_8887) += modules/bt_sd8887/ +obj-$(CONFIG_BERLIN_SDIO_BT_8887_CHAR_DRV) += modules/bt_sd8887/ #obj-$(CONFIG_BERLIN_PE) += modules/amp/ #obj-$(CONFIG_BERLIN_FASTLOGO) += modules/fastlogo/ obj-$(CONFIG_BERLIN_GPU) += modules/gpu/ obj-$(CONFIG_BERLIN_GPU3D) += modules/gpu3D/ -obj-$(CONFIG_BERLIN_PE) += modules/pe/ -obj-$(CONFIG_BERLIN_FASTLOGO) += modules/fastlogo/ + + + +ccflags-y += -I$(srctree)/arch/arm/mach-berlin/include/mach diff --git a/arch/arm/mach-berlin/berlin.c b/arch/arm/mach-berlin/berlin.c new file mode 100644 index 00000000..c9b047f1 --- /dev/null +++ b/arch/arm/mach-berlin/berlin.c @@ -0,0 +1,97 @@ +/* + * MARVELL BERLIN Flattened Device Tree enabled machine + * + * Author: Jisheng Zhang + * Copyright (c) 2013 Marvell Technology Group Ltd. + * http://www.marvell.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +#include +#include + +#include +#include +#include +#include + +#include "common.h" + +extern int board_rev; + +static struct map_desc berlin_io_desc[] __initdata = { + { + .virtual = 0xF7000000, + .pfn = __phys_to_pfn(0xF7000000), + .length = 0x00CC0000, + .type = MT_DEVICE + }, + { + .virtual = 0xF7CD0000, + .pfn = __phys_to_pfn(0xF7CD0000), + .length = 0x00330000, + .type = MT_DEVICE + }, +}; + +void __init mv88de3006_proc_bootinfo(int board_rev); +void __init mv88de31xx_android_fixup(char **from); +static void __init berlin_fixup(struct tag *not_used, + char **cmdline, struct meminfo *mi) +{ + /* Invoke android specific fixup handler */ + mv88de31xx_android_fixup( cmdline); +} + +static void __init berlin_map_io(void) +{ + iotable_init(berlin_io_desc, ARRAY_SIZE(berlin_io_desc)); +} + +static void __init berlin_init_early(void) +{ + l2x0_of_init(0x70c00000, 0xfeffffff); +} + +static void __init berlin_init(void) +{ + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); +} + +static void __init berlin_init_late(void) +{ +#ifdef CONFIG_BERLIN2CD + void __iomem *phy_base = ioremap(0xf7cc07d4, SZ_4); + if (!phy_base) { + printk(KERN_WARNING, "can't map 0xf7cc07d4\n"); + return; + } + int chip_rev = __raw_readl(IOMEM(phy_base)) >> 29; + iounmap(phy_base); + system_rev = (board_rev << 8) | chip_rev; +#elif CONFIG_BERLIN2CDP + mv88de3006_proc_bootinfo(board_rev); +#endif /* CONFIG_BERLIN2CDP */ +} + +static char const *berlin_dt_compat[] __initdata = { + "marvell,berlin", + NULL +}; + +DT_MACHINE_START(BERLIN_DT, "Marvell Berlin SoC (Flattened Device Tree)") + /* Maintainer: Jisheng Zhang */ + .map_io = berlin_map_io, + .smp = smp_ops(berlin_smp_ops), + .fixup = berlin_fixup, + .init_early = berlin_init_early, + .init_irq = berlin_init_irq, + .handle_irq = gic_handle_irq, + .timer = &apb_timer, + .init_machine = berlin_init, + .init_late = berlin_init_late, + .dt_compat = berlin_dt_compat, +MACHINE_END diff --git a/arch/arm/mach-berlin/clock.c b/arch/arm/mach-berlin/clock.c index 87f0828d..07bf13e6 100644 --- a/arch/arm/mach-berlin/clock.c +++ b/arch/arm/mach-berlin/clock.c @@ -147,8 +147,24 @@ static struct clk twd_clk = { .ops = &twd_clk_ops, }; +static unsigned long cfg_get_rate(struct clk *clk) +{ + unsigned long pll = get_pll(clk); + u32 divider = cfg_get_divider(); + return 1000000*pll/divider; +} + +static struct clkops cfg_clk_ops = { + .getrate = cfg_get_rate, +}; + +static struct clk cfg_clk = { + .ctl = RA_GBL_SYSPLLCTL, + .ctl1 = RA_GBL_SYSPLLCTL1, + .ops = &cfg_clk_ops, +}; + CLK(cpu0, RA_GBL_CPUPLLCTL, RA_GBL_CPUPLLCTL1); -CLK(cfg, RA_GBL_SYSPLLCTL, RA_GBL_SYSPLLCTL1); CLK(perif, RA_GBL_SYSPLLCTL, RA_GBL_SYSPLLCTL1); CLK(sdioxin, RA_GBL_SYSPLLCTL, RA_GBL_SYSPLLCTL1); CLK(sdio1xin, RA_GBL_SYSPLLCTL, RA_GBL_SYSPLLCTL1); @@ -172,7 +188,7 @@ void __init berlin_clk_init(void) { clkdev_add_table(clks, ARRAY_SIZE(clks)); } - +#if 0 int clk_enable(struct clk *clk) { return 0; @@ -183,7 +199,7 @@ void clk_disable(struct clk *clk) { } EXPORT_SYMBOL(clk_disable); - +#endif unsigned long clk_get_rate(struct clk *clk) { unsigned long rate; @@ -196,3 +212,4 @@ unsigned long clk_get_rate(struct clk *clk) return rate; } EXPORT_SYMBOL(clk_get_rate); + diff --git a/arch/arm/mach-berlin/clock.h b/arch/arm/mach-berlin/clock.h index 74588064..136602ec 100644 --- a/arch/arm/mach-berlin/clock.h +++ b/arch/arm/mach-berlin/clock.h @@ -48,4 +48,4 @@ static struct clk _name##_clk = { \ .dev_id = d, \ } -extern void __init berlin_clk_init(void); +void __init berlin_clk_init(void); diff --git a/arch/arm/mach-berlin/common.h b/arch/arm/mach-berlin/common.h index b4650f0e..7b110a6f 100644 --- a/arch/arm/mach-berlin/common.h +++ b/arch/arm/mach-berlin/common.h @@ -1,6 +1,27 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + struct sys_timer; extern struct sys_timer apb_timer; +extern struct smp_operations berlin_smp_ops; extern void __init berlin_init_irq(void); +extern void berlin_cpu_die(unsigned int cpu); +extern void __init berlin_clk_init(void); +#ifdef CONFIG_BERLIN2CD extern void __init berlin_map_io(void); extern void __init berlin2cd_reset(void); +#endif diff --git a/arch/arm/mach-berlin/core.c b/arch/arm/mach-berlin/core.c index 29b75bbf..35cdbd5a 100644 --- a/arch/arm/mach-berlin/core.c +++ b/arch/arm/mach-berlin/core.c @@ -44,9 +44,7 @@ static void arch_reset(char mode, const char *cmd) static void __init berlin_wdt_restart(void) { -#if (BERLIN_CHIP_VERSION == BERLIN_BG2CD_A0) arm_pm_restart = arch_reset; -#endif } void __init berlin2cd_reset(void) diff --git a/arch/arm/mach-berlin/gpio.c b/arch/arm/mach-berlin/gpio.c index b2f639b4..d97fabc0 100644 --- a/arch/arm/mach-berlin/gpio.c +++ b/arch/arm/mach-berlin/gpio.c @@ -106,21 +106,43 @@ int GPIO_PortWrite(int port, int value) int reg_ddr, reg_dr, gpio_port = port; int ddr, dr; +#if defined(CONFIG_BERLIN2Q) || defined(CONFIG_BERLIN2CDP) + if((port >= 0) && (port < 32)){ +#else if((port >= 0) && (port < 8)){ +#endif reg_ddr = APB_GPIO_INST0_BASE + APB_GPIO_SWPORTA_DDR; reg_dr = APB_GPIO_INST0_BASE + APB_GPIO_SWPORTA_DR; +#if defined(CONFIG_BERLIN2Q) || defined(CONFIG_BERLIN2CDP) + } else if ((port >= 32) && (port < 64)){ +#else } else if ((port >= 8) && (port < 16)){ +#endif reg_ddr = APB_GPIO_INST1_BASE + APB_GPIO_SWPORTA_DDR; reg_dr = APB_GPIO_INST1_BASE + APB_GPIO_SWPORTA_DR; +#if defined(CONFIG_BERLIN2Q) || defined(CONFIG_BERLIN2CDP) + port -= 32; + } else if ((port >= 64) && (port < 96)){ +#else port -= 8; } else if ((port >= 16) && (port < 24)){ +#endif reg_ddr = APB_GPIO_INST2_BASE + APB_GPIO_SWPORTA_DDR; reg_dr = APB_GPIO_INST2_BASE + APB_GPIO_SWPORTA_DR; +#if defined(CONFIG_BERLIN2Q) || defined(CONFIG_BERLIN2CDP) + port -= 64; + } else if ((port >= 96) && (port < 128)){ +#else port -= 16; } else if ((port >= 24) && (port < 32)){ +#endif reg_ddr = APB_GPIO_INST3_BASE + APB_GPIO_SWPORTA_DDR; reg_dr = APB_GPIO_INST3_BASE + APB_GPIO_SWPORTA_DR; +#if defined(CONFIG_BERLIN2Q) || defined(CONFIG_BERLIN2CDP) + port -= 96; +#else port -= 24; +#endif } else return -1; @@ -158,21 +180,43 @@ int GPIO_PortRead(int port, int *value) int reg_ddr, reg_ext, gpio_port = port; int ddr, ext; +#if defined(CONFIG_BERLIN2Q) || defined(CONFIG_BERLIN2CDP) + if((port >= 0) && (port < 32)){ +#else if((port >= 0) && (port < 8)){ +#endif reg_ddr = APB_GPIO_INST0_BASE + APB_GPIO_SWPORTA_DDR; reg_ext = APB_GPIO_INST0_BASE + APB_GPIO_EXT_PORTA; +#if defined(CONFIG_BERLIN2Q) || defined(CONFIG_BERLIN2CDP) + } else if ((port >= 32) && (port < 64)){ +#else } else if ((port >= 8) && (port < 16)){ +#endif reg_ddr = APB_GPIO_INST1_BASE + APB_GPIO_SWPORTA_DDR; reg_ext = APB_GPIO_INST1_BASE + APB_GPIO_EXT_PORTA; +#if defined(CONFIG_BERLIN2Q) || defined(CONFIG_BERLIN2CDP) + port -= 32; + } else if ((port >= 64) && (port < 96)){ +#else port -= 8; } else if ((port >= 16) && (port < 24)){ +#endif reg_ddr = APB_GPIO_INST2_BASE + APB_GPIO_SWPORTA_DDR; reg_ext = APB_GPIO_INST2_BASE + APB_GPIO_EXT_PORTA; +#if defined(CONFIG_BERLIN2Q) || defined(CONFIG_BERLIN2CDP) + port -= 64; + } else if ((port >= 96) && (port < 128)){ +#else port -= 16; } else if ((port >= 24) && (port < 32)){ +#endif reg_ddr = APB_GPIO_INST3_BASE + APB_GPIO_SWPORTA_DDR; reg_ext = APB_GPIO_INST3_BASE + APB_GPIO_EXT_PORTA; +#if defined(CONFIG_BERLIN2Q) || defined(CONFIG_BERLIN2CDP) + port -= 96; +#else port -= 24; +#endif } else return -1; @@ -207,12 +251,23 @@ int GPIO_PortSetInOut(int port, int in) int reg_ddr, reg_ctl, gpio_port = port; int ddr, ctl; +#if defined(CONFIG_BERLIN2CDP) + if((port >= 0) && (port < 32)){ +#else if((port >= 0) && (port < 8)){ +#endif reg_ddr = APB_GPIO_INST0_BASE + APB_GPIO_SWPORTA_DDR; reg_ctl = APB_GPIO_INST0_BASE + APB_GPIO_PORTA_CTL; +#if defined(CONFIG_BERLIN2CDP) + } else if ((port >= 32) && (port < 64)){ +#else } else if ((port >= 8) && (port < 16)){ +#endif reg_ddr = APB_GPIO_INST1_BASE + APB_GPIO_SWPORTA_DDR; reg_ctl = APB_GPIO_INST1_BASE + APB_GPIO_PORTA_CTL; +#if defined(CONFIG_BERLIN2CDP) + port -= 32; +#else port -= 8; } else if ((port >= 16) && (port < 24)){ reg_ddr = APB_GPIO_INST2_BASE + APB_GPIO_SWPORTA_DDR; @@ -222,16 +277,18 @@ int GPIO_PortSetInOut(int port, int in) reg_ddr = APB_GPIO_INST3_BASE + APB_GPIO_SWPORTA_DDR; reg_ctl = APB_GPIO_INST3_BASE + APB_GPIO_PORTA_CTL; port -= 24; +#endif } else return -1; GPIO_PortLock(gpio_port); +#if !defined(CONFIG_BERLIN2CDP) /* software mode */ GA_REG_WORD32_READ(reg_ctl, &ctl); ctl &= ~(1 << port); GA_REG_WORD32_WRITE(reg_ctl, ctl); - +#endif /* set port to output mode */ GA_REG_WORD32_READ(reg_ddr, &ddr); if (in) @@ -641,15 +698,27 @@ int SM_GPIO_PortWrite(int port, int value) int ddr, dr, ctl; int gpio_port = port; +#ifdef CONFIG_BERLIN2Q + if((port >= 0) && (port < 32)){ +#else if((port >= 0) && (port < 8)){ +#endif reg_ddr = SM_APB_GPIO_BASE + APB_GPIO_SWPORTA_DDR; reg_dr = SM_APB_GPIO_BASE + APB_GPIO_SWPORTA_DR; reg_ctl = SM_APB_GPIO_BASE + APB_GPIO_PORTA_CTL; +#ifdef CONFIG_BERLIN2Q + } else if ((port >= 32) && (port < 64)){ +#else } else if ((port >= 8) && (port < MAX_PORT)){ +#endif reg_ddr = SM_APB_GPIO1_BASE + APB_GPIO_SWPORTA_DDR; reg_dr = SM_APB_GPIO1_BASE + APB_GPIO_SWPORTA_DR; reg_ctl = SM_APB_GPIO1_BASE + APB_GPIO_PORTA_CTL; +#ifdef CONFIG_BERLIN2Q + port -= 32; +#else port -= 8; +#endif } else return -1; @@ -693,15 +762,27 @@ int SM_GPIO_PortRead(int port, int *value) int ddr, ext, ctl; int gpio_port = port; +#ifdef CONFIG_BERLIN2Q + if((port >= 0) && (port < 32)){ +#else if((port >= 0) && (port < 8)){ +#endif reg_ddr = SM_APB_GPIO_BASE + APB_GPIO_SWPORTA_DDR; reg_ext = SM_APB_GPIO_BASE + APB_GPIO_EXT_PORTA; reg_ctl = SM_APB_GPIO_BASE + APB_GPIO_PORTA_CTL; +#ifdef CONFIG_BERLIN2Q + } else if ((port >= 32) && (port < 64)){ +#else } else if ((port >= 8) && (port < MAX_PORT)){ +#endif reg_ddr = SM_APB_GPIO1_BASE + APB_GPIO_SWPORTA_DDR; reg_ext = SM_APB_GPIO1_BASE + APB_GPIO_EXT_PORTA; reg_ctl = SM_APB_GPIO1_BASE + APB_GPIO_PORTA_CTL; +#ifdef CONFIG_BERLIN2Q + port -= 32; +#else port -= 8; +#endif } else return -1; diff --git a/arch/arm/mach-berlin/modules/nfc/hal_dhub.c b/arch/arm/mach-berlin/hal_dhub.c similarity index 98% rename from arch/arm/mach-berlin/modules/nfc/hal_dhub.c rename to arch/arm/mach-berlin/hal_dhub.c index 8e1db7c3..fb00f214 100644 --- a/arch/arm/mach-berlin/modules/nfc/hal_dhub.c +++ b/arch/arm/mach-berlin/hal_dhub.c @@ -1599,24 +1599,4 @@ void dhub_channel_clear_seq(void *hdl, SIGN32 id, VIP_BCMBUF *pbcmbuf) /** ENDOFFILE: hal_dhub.c */ #include -EXPORT_SYMBOL(dhub2d_channel_cfg); -EXPORT_SYMBOL(dhub_channel_big_write_cmd); -EXPORT_SYMBOL(dhub_channel_write_cmd); -EXPORT_SYMBOL(semaphore_intr_enable); -EXPORT_SYMBOL(semaphore_cfg); -EXPORT_SYMBOL(dhub_semaphore); -EXPORT_SYMBOL(dhub_channel_cfg); -EXPORT_SYMBOL(dhub_channel_generate_cmd); -EXPORT_SYMBOL(dhub_channel_clear_done); -EXPORT_SYMBOL(dhub_channel_enable); -EXPORT_SYMBOL(dhub_channel_clear); -EXPORT_SYMBOL(dhub_hdl); -EXPORT_SYMBOL(semaphore_chk_full); -EXPORT_SYMBOL(semaphore_clr_full); -EXPORT_SYMBOL(semaphore_pop); -EXPORT_SYMBOL(BCM_SCHED_PushCmd); -EXPORT_SYMBOL(BCM_SCHED_GetEmptySts); -EXPORT_SYMBOL(hbo_queue_clear); -EXPORT_SYMBOL(hbo_queue_enable); -EXPORT_SYMBOL(hbo_queue_clear_done); -EXPORT_SYMBOL(dhub2d_hdl); + diff --git a/arch/arm/mach-berlin/headsmp.S b/arch/arm/mach-berlin/headsmp.S new file mode 100644 index 00000000..25fe3ddb --- /dev/null +++ b/arch/arm/mach-berlin/headsmp.S @@ -0,0 +1,88 @@ +/* + * Copyright (C) 2010 Marvell International Ltd. + * This file is based on arm vexpress platform + * + * Copyright (c) 2003 ARM Limited + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + + __CPUINIT + +/* The secondary kernel init calls v7_flush_dcache_all before it enables + * the L1; however, the L1 comes out of reset in an undefined state, so + * the clean + invalidate performed by v7_flush_dcache_all causes a bunch + * of cache lines with uninitialized data and uninitialized tags to get + * written out to memory, which does really unpleasant things to the main + * processor. We fix this by performing an invalidate, rather than a + * clean + invalidate, before jumping into the kernel. + * + * This funciton is cloned from arch/arm/mach-tegra/headsmp.S, and needs + * to be called for both secondary cores startup and primary core resume + * procedures. Ideally, it should be moved into arch/arm/mm/cache-v7.S. + */ +ENTRY(v7_invalidate_l1) + mov r0, #0 + mcr p15, 2, r0, c0, c0, 0 + mrc p15, 1, r0, c0, c0, 0 + + ldr r1, =0x7fff + and r2, r1, r0, lsr #13 + + ldr r1, =0x3ff + + and r3, r1, r0, lsr #3 @ NumWays - 1 + add r2, r2, #1 @ NumSets + + and r0, r0, #0x7 + add r0, r0, #4 @ SetShift + + clz r1, r3 @ WayShift + add r4, r3, #1 @ NumWays +1: sub r2, r2, #1 @ NumSets-- + mov r3, r4 @ Temp = NumWays +2: subs r3, r3, #1 @ Temp-- + mov r5, r3, lsl r1 + mov r6, r2, lsl r0 + orr r5, r5, r6 @ Reg = (Temp< +#include +#include + +#include +#include +#include + +static inline void cpu_enter_lowpower(void) +{ + unsigned int v; + + flush_cache_all(); + asm volatile( + " mcr p15, 0, %1, c7, c5, 0\n" + " mcr p15, 0, %1, c7, c10, 4\n" + /* + * Turn off coherency + */ + " mrc p15, 0, %0, c1, c0, 1\n" + " bic %0, %0, %3\n" + " mcr p15, 0, %0, c1, c0, 1\n" + " mrc p15, 0, %0, c1, c0, 0\n" + " bic %0, %0, %2\n" + " mcr p15, 0, %0, c1, c0, 0\n" + : "=&r" (v) + : "r" (0), "Ir" (CR_C), "Ir" (0x40) + : "cc"); +} + +static inline void cpu_leave_lowpower(void) +{ + unsigned int v; + + asm volatile( + " mrc p15, 0, %0, c1, c0, 0\n" + " orr %0, %0, %1\n" + " mcr p15, 0, %0, c1, c0, 0\n" + " mrc p15, 0, %0, c1, c0, 1\n" + " orr %0, %0, %2\n" + " mcr p15, 0, %0, c1, c0, 1\n" + : "=&r" (v) + : "Ir" (CR_C), "Ir" (0x40) + : "cc"); +} + +static inline void platform_do_lowpower(unsigned int cpu, int *spurious) +{ + /* + * there is no power-control hardware on this platform, so all + * we can do is put the core into WFI; this is safe as the calling + * code will have already disabled interrupts + */ + for (;;) { + wfi(); + + if (pen_release == cpu_logical_map(cpu)) { + /* + * OK, proper wakeup, we're done + */ + break; + } + + /* + * Getting here, means that we have come out of WFI without + * having been woken up - this shouldn't happen + * + * Just note it happening - when we're woken, we can report + * its occurrence. + */ + (*spurious)++; + } +} + +/* + * platform-specific code to shutdown a CPU + * + * Called with IRQs disabled + */ +void __ref berlin_cpu_die(unsigned int cpu) +{ + int spurious = 0; + + /* + * we're ready for shutdown now, so do it + */ + cpu_enter_lowpower(); + platform_do_lowpower(cpu, &spurious); + + /* + * bring this CPU back into the world of cache + * coherency, and then restore interrupts + */ + cpu_leave_lowpower(); + + if (spurious) + pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious); +} + diff --git a/arch/arm/mach-berlin/include/mach/api_dhub.h b/arch/arm/mach-berlin/include/mach/api_dhub.h new file mode 100644 index 00000000..7ffd650c --- /dev/null +++ b/arch/arm/mach-berlin/include/mach/api_dhub.h @@ -0,0 +1,791 @@ +/****************************************************************************************************** +* Copyright (C) 2007-2011 +* Copyright © 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +* +* $Log: vsys#comm#cmodel#hal#drv#api_dhub.h,v $ +* Revision 1.4 2007-10-30 10:58:43-07 chengjun +* Remove interrpt from HBO to semaphore. Map dHub channel 0 interrupt to semaphore channel 0. +* +* Revision 1.3 2007-10-24 21:41:17-07 kbhatt +* add structures to api_dhub.h +* +* Revision 1.2 2007-10-12 21:36:54-07 oussama +* adapted the env to use Alpha's Cmodel driver +* +* Revision 1.1 2007-08-29 20:27:01-07 lsha +* Initial revision. +* +* +* DESCRIPTION: +* OS independent layer for dHub/HBO/SemaHub APIs. +* +****************************************************************************************************/ + +#ifndef DHUB_API +#define DHUB_API " DHUB_API >>> " +/** DHUB_API + */ + +#include "ctypes.h" + +typedef struct HDL_semaphore { +UNSG32 ra; /*! Base address of $SemaHub !*/ +SIGN32 depth[32]; /*! Array of semaphore (virtual FIFO) depth !*/ +} HDL_semaphore; + +typedef struct HDL_hbo { +UNSG32 mem; /*! Base address of HBO SRAM !*/ +UNSG32 ra; /*! Base address of $HBO !*/ +HDL_semaphore fifoCtl; /*! Handle of HBO.FiFoCtl !*/ +UNSG32 base[32]; /*! Array of HBO queue base address !*/ +} HDL_hbo; + +typedef struct HDL_dhub { +UNSG32 ra; /*! Base address of $dHub !*/ +HDL_semaphore semaHub; /*! Handle of dHub.SemaHub !*/ +HDL_hbo hbo; /*! Handle of dHub.HBO !*/ +SIGN32 MTUb[16]; /*! Array of dHub channel MTU size bits !*/ +} HDL_dhub; + +typedef struct HDL_dhub2d { +UNSG32 ra; /*! Base address of $dHub2D !*/ +HDL_dhub dhub; /*! Handle of dHub2D.dHub !*/ +} HDL_dhub2d; + + +#ifdef __cplusplus + extern "C" + { +#endif + +/** SECTION - handle of local contexts + */ +extern UNSG32 sizeof_hdl_semaphore; /*! sizeof(HDL_semaphore) !*/ +extern UNSG32 sizeof_hdl_hbo; /*! sizeof(HDL_hbo) !*/ +extern UNSG32 sizeof_hdl_dhub; /*! sizeof(HDL_dhub) !*/ +extern UNSG32 sizeof_hdl_dhub2d; /*! sizeof(HDL_dhub2d) !*/ + +/** ENDOFSECTION + */ + + + +/** SECTION - API definitions for $SemaHub + */ +/******************************************************************************************** +* Function: semaphore_hdl +* Description: Initialize HDL_semaphore with a $SemaHub BIU instance. +*********************************************************************************************/ +void semaphore_hdl( + UNSG32 ra, /*! Base address of a BIU instance of $SemaHub !*/ + void *hdl /*! Handle to HDL_semaphore !*/ + ); + +/******************************************************************************************** +* Function: semaphore_cfg +* Description: Configurate a semaphore's depth & reset pointers. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 semaphore_cfg( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 depth, /*! Semaphore (virtual FIFO) depth !*/ + T64b cfgQ[] /*! Pass NULL to directly init SemaHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_intr_enable +* Description: Configurate interrupt enable bits of a semaphore. +*********************************************************************************************/ +void semaphore_intr_enable( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 empty, /*! Interrupt enable for CPU at condition 'empty' !*/ + SIGN32 full, /*! Interrupt enable for CPU at condition 'full' !*/ + SIGN32 almostEmpty, /*! Interrupt enable for CPU at condition 'almostEmpty' !*/ + SIGN32 almostFull, /*! Interrupt enable for CPU at condition 'almostFull' !*/ + SIGN32 cpu /*! CPU ID (0/1/2) !*/ + ); + +/******************************************************************************************** +* Function: semaphore_query +* Description: Query current status (counter & pointer) of a semaphore. +* Return: UNSG32 Current available unit level +*********************************************************************************************/ +UNSG32 semaphore_query( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 master, /*! 0/1 as procuder/consumer query !*/ + UNSG32 *ptr /*! Non-zero to receive semaphore r/w pointer !*/ + ); + +/******************************************************************************************** +* Function: semaphore_push +* Description: Producer semaphore push. +*********************************************************************************************/ +void semaphore_push( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 delta /*! Delta to push as a producer !*/ + ); + +/******************************************************************************************** +* Function: semaphore_push +* Description: Consumer semaphore pop. +*********************************************************************************************/ +void semaphore_pop( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 delta /*! Delta to pop as a consumer !*/ + ); + +/******************************************************************************************** +* Function: semaphore_chk_empty +* Description: Check 'empty' status of a semaphore (or all semaphores). +* Return: UNSG32 status bit of given semaphore, or +* status bits of all semaphores if id==-1 +*********************************************************************************************/ +UNSG32 semaphore_chk_empty( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub + -1 to return all 32b of the interrupt status + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_chk_full +* Description: Check 'full' status of a semaphore (or all semaphores). +* Return: UNSG32 status bit of given semaphore, or +* status bits of all semaphores if id==-1 +*********************************************************************************************/ +UNSG32 semaphore_chk_full( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub + -1 to return all 32b of the interrupt status + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_chk_almostEmpty +* Description: Check 'almostEmpty' status of a semaphore (or all semaphores). +* Return: UNSG32 status bit of given semaphore, or +* status bits of all semaphores if id==-1 +*********************************************************************************************/ +UNSG32 semaphore_chk_almostEmpty( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub + -1 to return all 32b of the interrupt status + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_chk_almostFull +* Description: Check 'almostFull' status of a semaphore (or all semaphores). +* Return: UNSG32 status bit of given semaphore, or +* status bits of all semaphores if id==-1 +*********************************************************************************************/ +UNSG32 semaphore_chk_almostFull( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub + -1 to return all 32b of the interrupt status + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_clr_empty +* Description: Clear 'empty' status of a semaphore. +*********************************************************************************************/ +void semaphore_clr_empty( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub !*/ + ); + +/******************************************************************************************** +* Function: semaphore_clr_full +* Description: Clear 'full' status of a semaphore. +*********************************************************************************************/ +void semaphore_clr_full( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub !*/ + ); + +/******************************************************************************************** +* Function: semaphore_clr_almostEmpty +* Description: Clear 'almostEmpty' status of a semaphore. +*********************************************************************************************/ +void semaphore_clr_almostEmpty( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub !*/ + ); + +/******************************************************************************************** +* Function: semaphore_clr_almostFull +* Description: Clear 'almostFull' status of a semaphore. +*********************************************************************************************/ +void semaphore_clr_almostFull( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub !*/ + ); +/** ENDOFSECTION + */ + + + +/** SECTION - API definitions for $HBO + */ +/******************************************************************************************** +* Function: hbo_hdl +* Description: Initialize HDL_hbo with a $HBO BIU instance. +*********************************************************************************************/ +void hbo_hdl( + UNSG32 mem, /*! Base address of HBO SRAM !*/ + UNSG32 ra, /*! Base address of a BIU instance of $HBO !*/ + void *hdl /*! Handle to HDL_hbo !*/ + ); + +/******************************************************************************************** +* Function: hbo_fifoCtl +* Description: Get HDL_semaphore pointer from a HBO instance. +* Return: void* Handle for HBO.FiFoCtl +*********************************************************************************************/ +void* hbo_fifoCtl(void *hdl /*! Handle to HDL_hbo !*/ + ); + +/******************************************************************************************** +* DEFINITION - convert HBO FIFO control to semaphore control +*********************************************************************************************/ +#define hbo_queue_intr_enable (hdl,id,empty,full,almostEmpty,almostFull,cpu) \ + semaphore_intr_enable (hbo_fifoCtl(hdl),id,empty,full,almostEmpty,almostFull,cpu) + +#define hbo_queue_query(hdl,id,master,ptr) \ + semaphore_query(hbo_fifoCtl(hdl),id,master,ptr) + +#define hbo_queue_push(hdl,id,delta) \ + semaphore_push(hbo_fifoCtl(hdl),id,delta) + +#define hbo_queue_pop(hdl,id,delta) \ + semaphore_pop(hbo_fifoCtl(hdl),id,delta) + +#define hbo_queue_chk_empty(hdl,id) \ + semaphore_chk_empty(hbo_fifoCtl(hdl),id) + +#define hbo_queue_chk_full(hdl,id) \ + semaphore_chk_full(hbo_fifoCtl(hdl),id) + +#define hbo_queue_chk_almostEmpty(hdl,id) \ + semaphore_chk_almostEmpty(hbo_fifoCtl(hdl),id) + +#define hbo_queue_chk_almostFull(hdl,id) \ + semaphore_chk_almostFull(hbo_fifoCtl(hdl),id) + +#define hbo_queue_clr_empty(hdl,id) \ + semaphore_clr_empty(hbo_fifoCtl(hdl),id) + +#define hbo_queue_clr_full(hdl,id) \ + semaphore_clr_full(hbo_fifoCtl(hdl),id) + +#define hbo_queue_clr_almostEmpty (hdl,id) \ + semaphore_clr_almostEmpty(hbo_fifoCtl(hdl),id) + +#define hbo_queue_clr_almostFull(hdl,id) \ + semaphore_clr_almostFull(hbo_fifoCtl(hdl),id) + +/******************************************************************************************** +* Function: hbo_queue_cfg +* Description: Configurate a FIFO's base, depth & reset pointers. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 hbo_queue_cfg( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id, /*! Queue ID in $HBO !*/ + UNSG32 base, /*! Channel FIFO base address (byte address) !*/ + SIGN32 depth, /*! Channel FIFO depth, in 64b word !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init HBO, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_enable +* Description: HBO FIFO enable/disable. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 hbo_queue_enable( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id, /*! Queue ID in $HBO !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init HBO, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_clear +* Description: Issue HBO FIFO clear (will NOT wait for finish). +*********************************************************************************************/ +void hbo_queue_clear( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id /*! Queue ID in $HBO !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_busy +* Description: Read HBO 'BUSY' status for all channel FIFOs. +* Return: UNSG32 'BUSY' status bits of all channels +*********************************************************************************************/ +UNSG32 hbo_queue_busy( + void *hdl /*! Handle to HDL_hbo !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_clear_done +* Description: Wait for a given channel or all channels to be cleared. +*********************************************************************************************/ +void hbo_queue_clear_done( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id /*! Queue ID in $HBO + -1 to wait for all channel clear done + !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_read +* Description: Read a number of 64b data & pop FIFO from HBO SRAM. +* Return: UNSG32 Number of 64b data being read (=n), or (when cfgQ==NULL) +* 0 if there're not sufficient data in FIFO +*********************************************************************************************/ +UNSG32 hbo_queue_read( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id, /*! Queue ID in $HBO !*/ + SIGN32 n, /*! Number 64b entries to read !*/ + T64b data[], /*! To receive read data !*/ + UNSG32 *ptr /*! Pass in current FIFO pointer (in 64b word), + & receive updated new pointer, + Pass NULL to read from HW + !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_write +* Description: Write a number of 64b data & push FIFO to HBO SRAM. +* Return: UNSG32 Number of (adr,pair) added to cfgQ, or (when cfgQ==NULL) +* 0 if there're not sufficient space in FIFO +*********************************************************************************************/ +UNSG32 hbo_queue_write( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id, /*! Queue ID in $HBO !*/ + SIGN32 n, /*! Number 64b entries to write !*/ + T64b data[], /*! Write data !*/ + T64b cfgQ[], /*! Pass NULL to directly update HBO, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + UNSG32 *ptr /*! Pass in current FIFO pointer (in 64b word), + & receive updated new pointer, + Pass NULL to read from HW + !*/ + ); +/** ENDOFSECTION +*/ + + + +/** SECTION - API definitions for $dHubReg +*/ +/******************************************************************************************** +* Function: dhub_hdl +* Description: Initialize HDL_dhub with a $dHub BIU instance. +*********************************************************************************************/ +void dhub_hdl( + UNSG32 mem, /*! Base address of dHub.HBO SRAM !*/ + UNSG32 ra, /*! Base address of a BIU instance of $dHub !*/ + void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_semaphore +* Description: Get HDL_semaphore pointer from a dHub instance. +* Return: void* Handle for dHub.SemaHub +*********************************************************************************************/ +void* dhub_semaphore( + void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_hbo +* Description: Get HDL_hbo pointer from a dHub instance. +* Return: void* Handle for dHub.HBO +*********************************************************************************************/ +void* dhub_hbo( void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_hbo_fifoCtl +* Description: Get HDL_semaphore pointer from the HBO of a dHub instance. +* Return: void* Handle for dHub.HBO.FiFoCtl +*********************************************************************************************/ +#define dhub_hbo_fifoCtl(hdl) (hbo_fifoCtl(dhub_hbo(hdl))) + +/******************************************************************************************** +* DEFINITION - convert from dHub channel ID to HBO FIFO ID & semaphore (interrupt) ID +*********************************************************************************************/ +// removed connection from HBO interrupt to semaphore +//#define dhub_id2intr(id) ((id)+1) +#define dhub_id2intr(id) ((id)) +#define dhub_id2hbo_cmdQ(id) ((id)*2) +#define dhub_id2hbo_data(id) ((id)*2+1) + +/******************************************************************************************** +* DEFINITION - convert dHub cmdQ/dataQ/channel-done interrupt control to HBO/semaphore control +*********************************************************************************************/ +//removed connection from HBO interrupt to semaphore +//#define dhub_hbo_intr_enable (hdl,id,empty,full,almostEmpty,almostFull,cpu) +// semaphore_intr_enable (dhub_semaphore(hdl),0,empty,full,almostEmpty,almostFull,cpu) + +#define dhub_channel_intr_enable (hdl,id,full,cpu) \ + semaphore_intr_enable (dhub_semaphore(hdl),dhub_id2intr(id),0,full,0,0,cpu) + +#define dhub_hbo_cmdQ_intr_enable (hdl,id,empty,almostEmpty,cpu) \ + hbo_queue_intr_enable (dhub_hbo(hdl),dhub_id2hbo_cmdQ(id),empty,0,almostEmpty,0,cpu) + +#define dhub_hbo_data_intr_enable (hdl,id,empty,full,almostEmpty,almostFull,cpu) \ + hbo_queue_intr_enable (dhub_hbo(hdl),dhub_id2hbo_data(id),empty,full,almostEmpty,almostFull,cpu) + +/******************************************************************************************** +* DEFINITION - convert dHub cmdQ opehdltions to HBO FIFO opehdltions +*********************************************************************************************/ +#define dhub_cmdQ_query (hdl,id,ptr) \ + hbo_queue_query (dhub_hbo(hdl),dhub_id2hbo_cmdQ(id),0,ptr) + +#define dhub_cmdQ_push (hdl,id,delta) \ + hbo_queue_push (dhub_hbo(hdl),dhub_id2hbo_cmdQ(id),delta) + +/******************************************************************************************** +* DEFINITION - convert dHub dataQ opehdltions to HBO FIFO opehdltions +*********************************************************************************************/ +#define dhub_data_query(hdl,id,master,ptr)\ + hbo_queue_query(dhub_hbo(hdl),dhub_id2hbo_data(id),master,ptr) + +#define dhub_data_push (hdl,id,delta) \ + hbo_queue_push (dhub_hbo(hdl),dhub_id2hbo_data(id),delta) + +#define dhub_data_pop (hdl,id,delta) \ + hbo_queue_pop (dhub_hbo(hdl),dhub_id2hbo_data(id),delta) + +/******************************************************************************************** +* Function: dhub_channel_cfg +* Description: Configurate a dHub channel. +* Return: UNSG32 Number of (adr,pair) added to cfgQ, or (when cfgQ==NULL) +* 0 if either cmdQ or dataQ in HBO is still busy +*********************************************************************************************/ +UNSG32 dhub_channel_cfg( + void *hdl, /*!Handle to HDL_dhub !*/ + SIGN32 id, /*!Channel ID in $dHubReg !*/ + UNSG32 baseCmd, /*!Channel FIFO base address (byte address) for cmdQ !*/ + UNSG32 baseData, /*!Channel FIFO base address (byte address) for dataQ !*/ + SIGN32 depthCmd, /*!Channel FIFO depth for cmdQ, in 64b word !*/ + SIGN32 depthData, /*!Channel FIFO depth for dataQ, in 64b word !*/ + SIGN32 mtu, /*!See 'dHubChannel.CFG.MTU', 0/1/2 for 8/32/128 bytes !*/ + SIGN32 QoS, /*!See 'dHubChannel.CFG.QoS' !*/ + SIGN32 selfLoop, /*!See 'dHubChannel.CFG.selfLoop' !*/ + SIGN32 enable, /*!0 to disable, 1 to enable !*/ + T64b cfgQ[] /*!Pass NULL to directly init dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_enable +* Description: dHub channel enable/disable. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 dhub_channel_enable( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id, /*! Channel ID in $dHubReg !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_clear +* Description: Issue dHub channel clear (will NOT wait for finish). +*********************************************************************************************/ +void dhub_channel_clear( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id /*! Channel ID in $dHubReg !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_flush +* Description: Issue dHub channel (H2M only) flush (will NOT wait for finish). +*********************************************************************************************/ +void dhub_channel_flush( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id /*! Channel ID in $dHubReg !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_busy +* Description: Read dHub 'BUSY' status for all channel FIFOs. +* Return: UNSG32 'BUSY' status bits of all channels +*********************************************************************************************/ +UNSG32 dhub_channel_busy( + void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_pending +* Description: Read dHub 'PENDING' status for all channel FIFOs. +* Return: UNSG32 'PENDING' status bits of all channels +*********************************************************************************************/ +UNSG32 dhub_channel_pending( + void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_clear_done +* Description: Wait for a given channel or all channels to be cleared or flushed. +*********************************************************************************************/ +void dhub_channel_clear_done( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id /*! Channel ID in $dHubReg + -1 to wait for all channel clear done + !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_write_cmd +* Description: Write a 64b command for a dHub channel. +* Return: UNSG32 Number of (adr,pair) added to cfgQ if success, or +* 0 if there're not sufficient space in FIFO +*********************************************************************************************/ +UNSG32 dhub_channel_write_cmd( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id, /*! Channel ID in $dHubReg !*/ + UNSG32 addr, /*! CMD: buffer address !*/ + SIGN32 size, /*! CMD: number of bytes to transfer !*/ + SIGN32 semOnMTU, /*! CMD: semaphore operation at CMD/MTU (0/1) !*/ + SIGN32 chkSemId, /*! CMD: non-zero to check semaphore !*/ + SIGN32 updSemId, /*! CMD: non-zero to update semaphore !*/ + SIGN32 interrupt, /*! CMD: raise interrupt at CMD finish !*/ + T64b cfgQ[], /*! Pass NULL to directly update dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + UNSG32 *ptr /*! Pass in current cmdQ pointer (in 64b word), + & receive updated new pointer, + Pass NULL to read from HW + !*/ + ); +/** ENDOFSECTION +*/ + +void dhub_channel_generate_cmd( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id, /*! Channel ID in $dHubReg !*/ + UNSG32 addr, /*! CMD: buffer address !*/ + SIGN32 size, /*! CMD: number of bytes to transfer !*/ + SIGN32 semOnMTU, /*! CMD: semaphore operation at CMD/MTU (0/1) !*/ + SIGN32 chkSemId, /*! CMD: non-zero to check semaphore !*/ + SIGN32 updSemId, /*! CMD: non-zero to update semaphore !*/ + SIGN32 interrupt, /*! CMD: raise interrupt at CMD finish !*/ + SIGN32 *pData + ); + +/******************************************************************************************** +* Function: dhub_channel_big_write_cmd +* Description: Write a sequence of 64b command for a dHub channel. +* Return: UNSG32 Number of (adr,pair) added to cfgQ if success, or +* 0 if there're not sufficient space in FIFO +*********************************************************************************************/ +UNSG32 dhub_channel_big_write_cmd( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id, /*! Channel ID in $dHubReg !*/ + UNSG32 addr, /*! CMD: buffer address !*/ + SIGN32 size, /*! CMD: number of bytes to transfer !*/ + SIGN32 semOnMTU, /*! CMD: semaphore operation at CMD/MTU (0/1) !*/ + SIGN32 chkSemId, /*! CMD: non-zero to check semaphore !*/ + SIGN32 updSemId, /*! CMD: non-zero to update semaphore !*/ + SIGN32 interrupt, /*! CMD: raise interrupt at CMD finish !*/ + T64b cfgQ[], /*! Pass NULL to directly update dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + UNSG32 *ptr /*! Pass in current cmdQ pointer (in 64b word), + & receive updated new pointer, + Pass NULL to read from HW + !*/ + ); + +/** SECTION - API definitions for $dHubReg2D +*/ +/******************************************************************************************** +* Function: dhub2d_hdl +* Description: Initialize HDL_dhub2d with a $dHub2D BIU instance. +*********************************************************************************************/ +void dhub2d_hdl( + UNSG32 mem, /*! Base address of dHub2D.dHub.HBO SRAM !*/ + UNSG32 ra, /*! Base address of a BIU instance of $dHub2D !*/ + void *hdl /*! Handle to HDL_dhub2d !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_cfg +* Description: Configurate a dHub2D channel. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 dhub2d_channel_cfg( + void *hdl, /*! Handle to HDL_dhub2d !*/ + SIGN32 id, /*! Channel ID in $dHubReg2D !*/ + UNSG32 addr, /*! CMD: 2D-buffer address !*/ + SIGN32 stride, /*! CMD: line stride size in bytes !*/ + SIGN32 width, /*! CMD: buffer width in bytes !*/ + SIGN32 height, /*! CMD: buffer height in lines !*/ + SIGN32 semLoop, /*! CMD: loop size (1~4) of semaphore operations !*/ + SIGN32 semOnMTU, /*! CMD: semaphore operation at CMD/MTU (0/1) !*/ + SIGN32 chkSemId[], /*! CMD: semaphore loop pattern - non-zero to check !*/ + SIGN32 updSemId[], /*! CMD: semaphore loop pattern - non-zero to update !*/ + SIGN32 interrupt, /*! CMD: raise interrupt at CMD finish !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init dHub2D, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_enable +* Description: dHub2D channel enable/disable. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 dhub2d_channel_enable( + void *hdl, /*! Handle to HDL_dhub2d !*/ + SIGN32 id, /*! Channel ID in $dHubReg2D !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init dHub2D, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_clear +* Description: Issue dHub2D channel clear (will NOT wait for finish). +*********************************************************************************************/ +void dhub2d_channel_clear( + void *hdl, /*! Handle to HDL_dhub2d !*/ + SIGN32 id /*! Channel ID in $dHubReg2D !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_busy +* Description: Read dHub2D 'BUSY' status for all channel FIFOs. +* Return: UNSG32 'BUSY' status bits of all channels +*********************************************************************************************/ +UNSG32 dhub2d_channel_busy( + void *hdl /*! Handle to HDL_dhub2d !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_clear_done +* Description: Wait for a given channel or all channels to be cleared. +*********************************************************************************************/ +void dhub2d_channel_clear_done( + void *hdl, /*! Handle to HDL_dhub2d !*/ + SIGN32 id /*! Channel ID in $dHubReg2D + -1 to wait for all channel clear done + !*/ + ); +/** ENDOFSECTION + */ + +typedef enum { + BCM_SCHED_Q0 = 0, + BCM_SCHED_Q1, + BCM_SCHED_Q2, + BCM_SCHED_Q3, + BCM_SCHED_Q4, + BCM_SCHED_Q5, + BCM_SCHED_Q6, + BCM_SCHED_Q7, + BCM_SCHED_Q8, + BCM_SCHED_Q9, + BCM_SCHED_Q10, + BCM_SCHED_Q11, + BCM_SCHED_Q12, + BCM_SCHED_Q13, + BCM_SCHED_Q14, + BCM_SCHED_Q15, + BCM_SCHED_Q16, + BCM_SCHED_Q17, + BCM_SCHED_Q18, +} ENUM_BCM_SCHED_QID; + +typedef enum { + BCM_SCHED_TRIG_CPCB0_VBI = 0, + BCM_SCHED_TRIG_CPCB1_VBI, + BCM_SCHED_TRIG_CPCB2_VBI, + BCM_SCHED_TRIG_CPCB0_VDE, + BCM_SCHED_TRIG_CPCB1_VDE, + BCM_SCHED_TRIG_CPCB2_VDE, + BCM_SCHED_TRIG_AUD_PRIM, + BCM_SCHED_TRIG_AUD_SEC, + BCM_SCHED_TRIG_AUD_HDMI, + BCM_SCHED_TRIG_AUD_SPDIF, + BCM_SCHED_TRIG_AUD_MIC, //0xA + BCM_SCHED_TRIG_VBI_VDE, + BCM_SCHED_TRIG_DVI_VDE, + BCM_SCHED_TRIG_SD_WRE, + BCM_SCHED_TRIG_SD_RDE, + BCM_SCHED_TRIG_SD_ERR, //0xF + BCM_SCHED_TRIG_NONE = 0x1f, + +} ENUM_BCM_SCHED_TRIG_EVENT; + +void BCM_SCHED_Open(void); +void BCM_SCHED_Close(void); +void BCM_SCHED_SetMux(UNSG32 QID, UNSG32 TrigEvent); +int BCM_SCHED_PushCmd(UNSG32 QID, UNSG32 *pCmd, UNSG32 *cfgQ); +void BCM_SCHED_GetEmptySts(UNSG32 QID, UNSG32 *EmptySts); + +void dhub2d_channel_clear_seq(void *hdl, SIGN32 id); +void dhub2d_channel_start_seq(void *hdl, SIGN32 id); + +#ifdef __cplusplus + } +#endif + + + +/** DHUB_API + */ +#endif + +/** ENDOFFILE: api_dhub.h + */ + diff --git a/arch/arm/mach-berlin/modules/nfc/avio.h b/arch/arm/mach-berlin/include/mach/avio.h similarity index 100% rename from arch/arm/mach-berlin/modules/nfc/avio.h rename to arch/arm/mach-berlin/include/mach/avio.h diff --git a/arch/arm/mach-berlin/modules/nfc/ctypes.h b/arch/arm/mach-berlin/include/mach/ctypes.h similarity index 100% rename from arch/arm/mach-berlin/modules/nfc/ctypes.h rename to arch/arm/mach-berlin/include/mach/ctypes.h diff --git a/arch/arm/mach-berlin/include/mach/dHub.h b/arch/arm/mach-berlin/include/mach/dHub.h new file mode 100644 index 00000000..57c75af9 --- /dev/null +++ b/arch/arm/mach-berlin/include/mach/dHub.h @@ -0,0 +1,4124 @@ +/********************************************************************************************************** +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +**********************************************************************************************************/ +#ifndef dHub_h +#define dHub_h (){} + + +#include "ctypes.h" + +#pragma pack(1) +#ifdef __cplusplus + extern "C" { +#endif + +#ifndef _DOCC_H_BITOPS_ +#define _DOCC_H_BITOPS_ (){} + +#define _bSETMASK_(b) ((b)<32 ? (1<<((b)&31)) : 0) +#define _NSETMASK_(msb,lsb) (_bSETMASK_((msb)+1)-_bSETMASK_(lsb)) +#define _bCLRMASK_(b) (~_bSETMASK_(b)) +#define _NCLRMASK_(msb,lsb) (~_NSETMASK_(msb,lsb)) +#define _BFGET_(r,msb,lsb) (_NSETMASK_((msb)-(lsb),0)&((r)>>(lsb))) +#define _BFSET_(r,msb,lsb,v) do{ (r)&=_NCLRMASK_(msb,lsb); (r)|=_NSETMASK_(msb,lsb)&((v)<<(lsb)); }while(0) + +#endif + + + +////// +/// +/// $INTERFACE SemaINTR (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 mask (W-) +/// %unsigned 1 empty 0x0 +/// ### +/// * Enable interrupt on 'empty' condition +/// ### +/// %unsigned 1 full 0x0 +/// ### +/// * Enable interrupt on 'full' condition +/// ### +/// %unsigned 1 almostEmpty 0x0 +/// ### +/// * Enable interrupt on 'almostEmpty' condition +/// ### +/// %unsigned 1 almostFull 0x0 +/// ### +/// * Enable interrupt on 'almostFull' condition +/// ### +/// %% 28 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 4b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaINTR +#define h_SemaINTR (){} + +#define RA_SemaINTR_mask 0x0000 + +#define BA_SemaINTR_mask_empty 0x0000 +#define B16SemaINTR_mask_empty 0x0000 +#define LSb32SemaINTR_mask_empty 0 +#define LSb16SemaINTR_mask_empty 0 +#define bSemaINTR_mask_empty 1 +#define MSK32SemaINTR_mask_empty 0x00000001 + +#define BA_SemaINTR_mask_full 0x0000 +#define B16SemaINTR_mask_full 0x0000 +#define LSb32SemaINTR_mask_full 1 +#define LSb16SemaINTR_mask_full 1 +#define bSemaINTR_mask_full 1 +#define MSK32SemaINTR_mask_full 0x00000002 + +#define BA_SemaINTR_mask_almostEmpty 0x0000 +#define B16SemaINTR_mask_almostEmpty 0x0000 +#define LSb32SemaINTR_mask_almostEmpty 2 +#define LSb16SemaINTR_mask_almostEmpty 2 +#define bSemaINTR_mask_almostEmpty 1 +#define MSK32SemaINTR_mask_almostEmpty 0x00000004 + +#define BA_SemaINTR_mask_almostFull 0x0000 +#define B16SemaINTR_mask_almostFull 0x0000 +#define LSb32SemaINTR_mask_almostFull 3 +#define LSb16SemaINTR_mask_almostFull 3 +#define bSemaINTR_mask_almostFull 1 +#define MSK32SemaINTR_mask_almostFull 0x00000008 +/////////////////////////////////////////////////////////// + +typedef struct SIE_SemaINTR { +/////////////////////////////////////////////////////////// +#define GET32SemaINTR_mask_empty(r32) _BFGET_(r32, 0, 0) +#define SET32SemaINTR_mask_empty(r32,v) _BFSET_(r32, 0, 0,v) +#define GET16SemaINTR_mask_empty(r16) _BFGET_(r16, 0, 0) +#define SET16SemaINTR_mask_empty(r16,v) _BFSET_(r16, 0, 0,v) + +#define GET32SemaINTR_mask_full(r32) _BFGET_(r32, 1, 1) +#define SET32SemaINTR_mask_full(r32,v) _BFSET_(r32, 1, 1,v) +#define GET16SemaINTR_mask_full(r16) _BFGET_(r16, 1, 1) +#define SET16SemaINTR_mask_full(r16,v) _BFSET_(r16, 1, 1,v) + +#define GET32SemaINTR_mask_almostEmpty(r32) _BFGET_(r32, 2, 2) +#define SET32SemaINTR_mask_almostEmpty(r32,v) _BFSET_(r32, 2, 2,v) +#define GET16SemaINTR_mask_almostEmpty(r16) _BFGET_(r16, 2, 2) +#define SET16SemaINTR_mask_almostEmpty(r16,v) _BFSET_(r16, 2, 2,v) + +#define GET32SemaINTR_mask_almostFull(r32) _BFGET_(r32, 3, 3) +#define SET32SemaINTR_mask_almostFull(r32,v) _BFSET_(r32, 3, 3,v) +#define GET16SemaINTR_mask_almostFull(r16) _BFGET_(r16, 3, 3) +#define SET16SemaINTR_mask_almostFull(r16,v) _BFSET_(r16, 3, 3,v) + +#define w32SemaINTR_mask {\ + UNSG32 umask_empty : 1;\ + UNSG32 umask_full : 1;\ + UNSG32 umask_almostEmpty : 1;\ + UNSG32 umask_almostFull : 1;\ + UNSG32 RSVDx0_b4 : 28;\ + } +union { UNSG32 u32SemaINTR_mask; + struct w32SemaINTR_mask; + }; +/////////////////////////////////////////////////////////// +} SIE_SemaINTR; + +typedef union T32SemaINTR_mask + { UNSG32 u32; + struct w32SemaINTR_mask; + } T32SemaINTR_mask; +/////////////////////////////////////////////////////////// + +typedef union TSemaINTR_mask + { UNSG32 u32[1]; + struct { + struct w32SemaINTR_mask; + }; + } TSemaINTR_mask; + +/////////////////////////////////////////////////////////// +SIGN32 SemaINTR_drvrd(SIE_SemaINTR *p, UNSG32 base, SIGN32 mem, SIGN32 tst); +SIGN32 SemaINTR_drvwr(SIE_SemaINTR *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); +void SemaINTR_reset(SIE_SemaINTR *p); +SIGN32 SemaINTR_cmp (SIE_SemaINTR *p, SIE_SemaINTR *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); +#define SemaINTR_check(p,pie,pfx,hLOG) SemaINTR_cmp(p,pie,pfx,(void*)(hLOG),0,0) +#define SemaINTR_print(p, pfx,hLOG) SemaINTR_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaINTR +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE Semaphore biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 16 DEPTH 0xF +/// ### +/// * Max level of semaphore +/// * Note: write this register will trigger counter reset +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00004 (P) +/// # 0x00004 INTR +/// $SemaINTR INTR REG [3] +/// ### +/// * Interrupt mask for 3 CPUs +/// ### +/// @ 0x00010 mask (W-) +/// %unsigned 1 full 0x0 +/// %unsigned 1 emp 0x0 +/// ### +/// * When full bit is set to one, to the producer, the semaphore will never be full, +/// * so that the producer will never be blocked. When emp bit is set to one, to the +/// * consumer, the semaphore will never be empty, so that the consumer will never be blocked. +/// * When the emp/full bit is set, the semaphore/FIFO pointer will be maintained, but the +/// * counter will be not correct anymore. +/// ### +/// %% 30 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 20B, bits: 30b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_Semaphore +#define h_Semaphore (){} + +#define RA_Semaphore_CFG 0x0000 + +#define BA_Semaphore_CFG_DEPTH 0x0000 +#define B16Semaphore_CFG_DEPTH 0x0000 +#define LSb32Semaphore_CFG_DEPTH 0 +#define LSb16Semaphore_CFG_DEPTH 0 +#define bSemaphore_CFG_DEPTH 16 +#define MSK32Semaphore_CFG_DEPTH 0x0000FFFF +/////////////////////////////////////////////////////////// +#define RA_Semaphore_INTR 0x0004 +/////////////////////////////////////////////////////////// +#define RA_Semaphore_mask 0x0010 + +#define BA_Semaphore_mask_full 0x0010 +#define B16Semaphore_mask_full 0x0010 +#define LSb32Semaphore_mask_full 0 +#define LSb16Semaphore_mask_full 0 +#define bSemaphore_mask_full 1 +#define MSK32Semaphore_mask_full 0x00000001 + +#define BA_Semaphore_mask_emp 0x0010 +#define B16Semaphore_mask_emp 0x0010 +#define LSb32Semaphore_mask_emp 1 +#define LSb16Semaphore_mask_emp 1 +#define bSemaphore_mask_emp 1 +#define MSK32Semaphore_mask_emp 0x00000002 +/////////////////////////////////////////////////////////// + +typedef struct SIE_Semaphore { +/////////////////////////////////////////////////////////// +#define GET32Semaphore_CFG_DEPTH(r32) _BFGET_(r32,15, 0) +#define SET32Semaphore_CFG_DEPTH(r32,v) _BFSET_(r32,15, 0,v) +#define GET16Semaphore_CFG_DEPTH(r16) _BFGET_(r16,15, 0) +#define SET16Semaphore_CFG_DEPTH(r16,v) _BFSET_(r16,15, 0,v) + +#define w32Semaphore_CFG {\ + UNSG32 uCFG_DEPTH : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } +union { UNSG32 u32Semaphore_CFG; + struct w32Semaphore_CFG; + }; +/////////////////////////////////////////////////////////// + SIE_SemaINTR ie_INTR[3]; +/////////////////////////////////////////////////////////// +#define GET32Semaphore_mask_full(r32) _BFGET_(r32, 0, 0) +#define SET32Semaphore_mask_full(r32,v) _BFSET_(r32, 0, 0,v) +#define GET16Semaphore_mask_full(r16) _BFGET_(r16, 0, 0) +#define SET16Semaphore_mask_full(r16,v) _BFSET_(r16, 0, 0,v) + +#define GET32Semaphore_mask_emp(r32) _BFGET_(r32, 1, 1) +#define SET32Semaphore_mask_emp(r32,v) _BFSET_(r32, 1, 1,v) +#define GET16Semaphore_mask_emp(r16) _BFGET_(r16, 1, 1) +#define SET16Semaphore_mask_emp(r16,v) _BFSET_(r16, 1, 1,v) + +#define w32Semaphore_mask {\ + UNSG32 umask_full : 1;\ + UNSG32 umask_emp : 1;\ + UNSG32 RSVDx10_b2 : 30;\ + } +union { UNSG32 u32Semaphore_mask; + struct w32Semaphore_mask; + }; +/////////////////////////////////////////////////////////// +} SIE_Semaphore; + +typedef union T32Semaphore_CFG + { UNSG32 u32; + struct w32Semaphore_CFG; + } T32Semaphore_CFG; +typedef union T32Semaphore_mask + { UNSG32 u32; + struct w32Semaphore_mask; + } T32Semaphore_mask; +/////////////////////////////////////////////////////////// + +typedef union TSemaphore_CFG + { UNSG32 u32[1]; + struct { + struct w32Semaphore_CFG; + }; + } TSemaphore_CFG; +typedef union TSemaphore_mask + { UNSG32 u32[1]; + struct { + struct w32Semaphore_mask; + }; + } TSemaphore_mask; + +/////////////////////////////////////////////////////////// +SIGN32 Semaphore_drvrd(SIE_Semaphore *p, UNSG32 base, SIGN32 mem, SIGN32 tst); +SIGN32 Semaphore_drvwr(SIE_Semaphore *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); +void Semaphore_reset(SIE_Semaphore *p); +SIGN32 Semaphore_cmp (SIE_Semaphore *p, SIE_Semaphore *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); +#define Semaphore_check(p,pie,pfx,hLOG) Semaphore_cmp(p,pie,pfx,(void*)(hLOG),0,0) +#define Semaphore_print(p, pfx,hLOG) Semaphore_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: Semaphore +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaQuery (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 RESP (R-) +/// %unsigned 16 CNT +/// ### +/// * Semaphore counter level +/// ### +/// %unsigned 16 PTR +/// ### +/// * Semaphore pointer: +/// * producer-wptr or consumer-rptr +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 32b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaQuery +#define h_SemaQuery (){} + + #define RA_SemaQuery_RESP 0x0000 + + #define BA_SemaQuery_RESP_CNT 0x0000 + #define B16SemaQuery_RESP_CNT 0x0000 + #define LSb32SemaQuery_RESP_CNT 0 + #define LSb16SemaQuery_RESP_CNT 0 + #define bSemaQuery_RESP_CNT 16 + #define MSK32SemaQuery_RESP_CNT 0x0000FFFF + + #define BA_SemaQuery_RESP_PTR 0x0002 + #define B16SemaQuery_RESP_PTR 0x0002 + #define LSb32SemaQuery_RESP_PTR 16 + #define LSb16SemaQuery_RESP_PTR 0 + #define bSemaQuery_RESP_PTR 16 + #define MSK32SemaQuery_RESP_PTR 0xFFFF0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaQuery { + /////////////////////////////////////////////////////////// + #define GET32SemaQuery_RESP_CNT(r32) _BFGET_(r32,15, 0) + #define SET32SemaQuery_RESP_CNT(r32,v) _BFSET_(r32,15, 0,v) + #define GET16SemaQuery_RESP_CNT(r16) _BFGET_(r16,15, 0) + #define SET16SemaQuery_RESP_CNT(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32SemaQuery_RESP_PTR(r32) _BFGET_(r32,31,16) + #define SET32SemaQuery_RESP_PTR(r32,v) _BFSET_(r32,31,16,v) + #define GET16SemaQuery_RESP_PTR(r16) _BFGET_(r16,15, 0) + #define SET16SemaQuery_RESP_PTR(r16,v) _BFSET_(r16,15, 0,v) + + #define w32SemaQuery_RESP {\ + UNSG32 uRESP_CNT : 16;\ + UNSG32 uRESP_PTR : 16;\ + } + union { UNSG32 u32SemaQuery_RESP; + struct w32SemaQuery_RESP; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaQuery; + + typedef union T32SemaQuery_RESP + { UNSG32 u32; + struct w32SemaQuery_RESP; + } T32SemaQuery_RESP; + /////////////////////////////////////////////////////////// + + typedef union TSemaQuery_RESP + { UNSG32 u32[1]; + struct { + struct w32SemaQuery_RESP; + }; + } TSemaQuery_RESP; + + /////////////////////////////////////////////////////////// + SIGN32 SemaQuery_drvrd(SIE_SemaQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaQuery_drvwr(SIE_SemaQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaQuery_reset(SIE_SemaQuery *p); + SIGN32 SemaQuery_cmp (SIE_SemaQuery *p, SIE_SemaQuery *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaQuery_check(p,pie,pfx,hLOG) SemaQuery_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaQuery_print(p, pfx,hLOG) SemaQuery_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaQuery +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaQueryMap (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 ADDR (P) +/// %unsigned 2 byte +/// %unsigned 5 ID +/// ### +/// * Semaphore cell index +/// ### +/// %unsigned 1 master +/// : producer 0x0 +/// : consumer 0x1 +/// ### +/// * Select which counter to read +/// ### +/// %% 24 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 8b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaQueryMap +#define h_SemaQueryMap (){} + +#define RA_SemaQueryMap_ADDR 0x0000 + +#define BA_SemaQueryMap_ADDR_byte 0x0000 +#define B16SemaQueryMap_ADDR_byte 0x0000 +#define LSb32SemaQueryMap_ADDR_byte 0 +#define LSb16SemaQueryMap_ADDR_byte 0 +#define bSemaQueryMap_ADDR_byte 2 +#define MSK32SemaQueryMap_ADDR_byte 0x00000003 + +#define BA_SemaQueryMap_ADDR_ID 0x0000 +#define B16SemaQueryMap_ADDR_ID 0x0000 +#define LSb32SemaQueryMap_ADDR_ID 2 +#define LSb16SemaQueryMap_ADDR_ID 2 +#define bSemaQueryMap_ADDR_ID 5 +#define MSK32SemaQueryMap_ADDR_ID 0x0000007C + +#define BA_SemaQueryMap_ADDR_master 0x0000 +#define B16SemaQueryMap_ADDR_master 0x0000 +#define LSb32SemaQueryMap_ADDR_master 7 +#define LSb16SemaQueryMap_ADDR_master 7 +#define bSemaQueryMap_ADDR_master 1 +#define MSK32SemaQueryMap_ADDR_master 0x00000080 +#define SemaQueryMap_ADDR_master_producer 0x0 +#define SemaQueryMap_ADDR_master_consumer 0x1 +/////////////////////////////////////////////////////////// + +typedef struct SIE_SemaQueryMap { +/////////////////////////////////////////////////////////// +#define GET32SemaQueryMap_ADDR_byte(r32) _BFGET_(r32, 1, 0) +#define SET32SemaQueryMap_ADDR_byte(r32,v) _BFSET_(r32, 1, 0,v) +#define GET16SemaQueryMap_ADDR_byte(r16) _BFGET_(r16, 1, 0) +#define SET16SemaQueryMap_ADDR_byte(r16,v) _BFSET_(r16, 1, 0,v) + +#define GET32SemaQueryMap_ADDR_ID(r32) _BFGET_(r32, 6, 2) +#define SET32SemaQueryMap_ADDR_ID(r32,v) _BFSET_(r32, 6, 2,v) +#define GET16SemaQueryMap_ADDR_ID(r16) _BFGET_(r16, 6, 2) +#define SET16SemaQueryMap_ADDR_ID(r16,v) _BFSET_(r16, 6, 2,v) + +#define GET32SemaQueryMap_ADDR_master(r32) _BFGET_(r32, 7, 7) +#define SET32SemaQueryMap_ADDR_master(r32,v) _BFSET_(r32, 7, 7,v) +#define GET16SemaQueryMap_ADDR_master(r16) _BFGET_(r16, 7, 7) +#define SET16SemaQueryMap_ADDR_master(r16,v) _BFSET_(r16, 7, 7,v) + +#define w32SemaQueryMap_ADDR {\ + UNSG32 uADDR_byte : 2;\ + UNSG32 uADDR_ID : 5;\ + UNSG32 uADDR_master : 1;\ + UNSG32 RSVDx0_b8 : 24;\ + } +union { UNSG32 u32SemaQueryMap_ADDR; + struct w32SemaQueryMap_ADDR; + }; +/////////////////////////////////////////////////////////// +} SIE_SemaQueryMap; + +typedef union T32SemaQueryMap_ADDR + { UNSG32 u32; + struct w32SemaQueryMap_ADDR; + } T32SemaQueryMap_ADDR; +/////////////////////////////////////////////////////////// + +typedef union TSemaQueryMap_ADDR + { UNSG32 u32[1]; + struct { + struct w32SemaQueryMap_ADDR; + }; + } TSemaQueryMap_ADDR; + +/////////////////////////////////////////////////////////// +SIGN32 SemaQueryMap_drvrd(SIE_SemaQueryMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); +SIGN32 SemaQueryMap_drvwr(SIE_SemaQueryMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); +void SemaQueryMap_reset(SIE_SemaQueryMap *p); +SIGN32 SemaQueryMap_cmp (SIE_SemaQueryMap *p, SIE_SemaQueryMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); +#define SemaQueryMap_check(p,pie,pfx,hLOG) SemaQueryMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) +#define SemaQueryMap_print(p, pfx,hLOG) SemaQueryMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaQueryMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaHub biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 Query (R-) +/// # 0x00000 counter +/// $SemaQuery counter MEM [64] +/// ### +/// * Access address as defined above +/// ### +/// @ 0x00100 ARR (P) +/// # 0x00100 cell +/// $Semaphore cell REG [32] +/// ### +/// * Up-to 32 semaphore cells +/// ### +/// @ 0x00380 PUSH (W-) +/// %unsigned 8 ID +/// %unsigned 8 delta +/// ### +/// * CPU increases PCounter by delta (0 as push 256) +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00384 POP (W-) +/// %unsigned 8 ID +/// %unsigned 8 delta +/// ### +/// * CPU decreases CCounter by delta (0 as pop 256) +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00388 empty (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'empty' status +/// ### +/// @ 0x0038C full (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'full' status +/// ### +/// @ 0x00390 almostEmpty (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'almostEmpty' status +/// ### +/// @ 0x00394 almostFull (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'almostFull' status +/// ### +/// @ 0x00398 (W-) +/// # # Stuffing bytes... +/// %% 832 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 1024B, bits: 1152b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaHub +#define h_SemaHub (){} + +#define RA_SemaHub_Query 0x0000 +#define RA_SemaHub_counter 0x0000 +/////////////////////////////////////////////////////////// +#define RA_SemaHub_ARR 0x0100 +#define RA_SemaHub_cell 0x0100 +/////////////////////////////////////////////////////////// +#define RA_SemaHub_PUSH 0x0380 + +#define BA_SemaHub_PUSH_ID 0x0380 +#define B16SemaHub_PUSH_ID 0x0380 +#define LSb32SemaHub_PUSH_ID 0 +#define LSb16SemaHub_PUSH_ID 0 +#define bSemaHub_PUSH_ID 8 +#define MSK32SemaHub_PUSH_ID 0x000000FF + +#define BA_SemaHub_PUSH_delta 0x0381 +#define B16SemaHub_PUSH_delta 0x0380 +#define LSb32SemaHub_PUSH_delta 8 +#define LSb16SemaHub_PUSH_delta 8 +#define bSemaHub_PUSH_delta 8 +#define MSK32SemaHub_PUSH_delta 0x0000FF00 +/////////////////////////////////////////////////////////// +#define RA_SemaHub_POP 0x0384 + +#define BA_SemaHub_POP_ID 0x0384 +#define B16SemaHub_POP_ID 0x0384 +#define LSb32SemaHub_POP_ID 0 +#define LSb16SemaHub_POP_ID 0 +#define bSemaHub_POP_ID 8 +#define MSK32SemaHub_POP_ID 0x000000FF + +#define BA_SemaHub_POP_delta 0x0385 +#define B16SemaHub_POP_delta 0x0384 +#define LSb32SemaHub_POP_delta 8 +#define LSb16SemaHub_POP_delta 8 +#define bSemaHub_POP_delta 8 +#define MSK32SemaHub_POP_delta 0x0000FF00 +/////////////////////////////////////////////////////////// +#define RA_SemaHub_empty 0x0388 + +#define BA_SemaHub_empty_ST_0i 0x0388 +#define B16SemaHub_empty_ST_0i 0x0388 +#define LSb32SemaHub_empty_ST_0i 0 +#define LSb16SemaHub_empty_ST_0i 0 +#define bSemaHub_empty_ST_0i 1 +#define MSK32SemaHub_empty_ST_0i 0x00000001 + +#define BA_SemaHub_empty_ST_1i 0x0388 +#define B16SemaHub_empty_ST_1i 0x0388 +#define LSb32SemaHub_empty_ST_1i 1 +#define LSb16SemaHub_empty_ST_1i 1 +#define bSemaHub_empty_ST_1i 1 +#define MSK32SemaHub_empty_ST_1i 0x00000002 + +#define BA_SemaHub_empty_ST_2i 0x0388 +#define B16SemaHub_empty_ST_2i 0x0388 +#define LSb32SemaHub_empty_ST_2i 2 +#define LSb16SemaHub_empty_ST_2i 2 +#define bSemaHub_empty_ST_2i 1 +#define MSK32SemaHub_empty_ST_2i 0x00000004 + +#define BA_SemaHub_empty_ST_3i 0x0388 +#define B16SemaHub_empty_ST_3i 0x0388 +#define LSb32SemaHub_empty_ST_3i 3 +#define LSb16SemaHub_empty_ST_3i 3 +#define bSemaHub_empty_ST_3i 1 +#define MSK32SemaHub_empty_ST_3i 0x00000008 + +#define BA_SemaHub_empty_ST_4i 0x0388 +#define B16SemaHub_empty_ST_4i 0x0388 +#define LSb32SemaHub_empty_ST_4i 4 +#define LSb16SemaHub_empty_ST_4i 4 +#define bSemaHub_empty_ST_4i 1 +#define MSK32SemaHub_empty_ST_4i 0x00000010 + +#define BA_SemaHub_empty_ST_5i 0x0388 +#define B16SemaHub_empty_ST_5i 0x0388 +#define LSb32SemaHub_empty_ST_5i 5 +#define LSb16SemaHub_empty_ST_5i 5 +#define bSemaHub_empty_ST_5i 1 +#define MSK32SemaHub_empty_ST_5i 0x00000020 + +#define BA_SemaHub_empty_ST_6i 0x0388 +#define B16SemaHub_empty_ST_6i 0x0388 +#define LSb32SemaHub_empty_ST_6i 6 +#define LSb16SemaHub_empty_ST_6i 6 +#define bSemaHub_empty_ST_6i 1 +#define MSK32SemaHub_empty_ST_6i 0x00000040 + +#define BA_SemaHub_empty_ST_7i 0x0388 +#define B16SemaHub_empty_ST_7i 0x0388 +#define LSb32SemaHub_empty_ST_7i 7 +#define LSb16SemaHub_empty_ST_7i 7 +#define bSemaHub_empty_ST_7i 1 +#define MSK32SemaHub_empty_ST_7i 0x00000080 + +#define BA_SemaHub_empty_ST_8i 0x0389 +#define B16SemaHub_empty_ST_8i 0x0388 +#define LSb32SemaHub_empty_ST_8i 8 +#define LSb16SemaHub_empty_ST_8i 8 +#define bSemaHub_empty_ST_8i 1 +#define MSK32SemaHub_empty_ST_8i 0x00000100 + +#define BA_SemaHub_empty_ST_9i 0x0389 +#define B16SemaHub_empty_ST_9i 0x0388 +#define LSb32SemaHub_empty_ST_9i 9 +#define LSb16SemaHub_empty_ST_9i 9 +#define bSemaHub_empty_ST_9i 1 +#define MSK32SemaHub_empty_ST_9i 0x00000200 + +#define BA_SemaHub_empty_ST_10i 0x0389 +#define B16SemaHub_empty_ST_10i 0x0388 +#define LSb32SemaHub_empty_ST_10i 10 +#define LSb16SemaHub_empty_ST_10i 10 +#define bSemaHub_empty_ST_10i 1 +#define MSK32SemaHub_empty_ST_10i 0x00000400 + +#define BA_SemaHub_empty_ST_11i 0x0389 +#define B16SemaHub_empty_ST_11i 0x0388 +#define LSb32SemaHub_empty_ST_11i 11 +#define LSb16SemaHub_empty_ST_11i 11 +#define bSemaHub_empty_ST_11i 1 +#define MSK32SemaHub_empty_ST_11i 0x00000800 + +#define BA_SemaHub_empty_ST_12i 0x0389 +#define B16SemaHub_empty_ST_12i 0x0388 +#define LSb32SemaHub_empty_ST_12i 12 +#define LSb16SemaHub_empty_ST_12i 12 +#define bSemaHub_empty_ST_12i 1 +#define MSK32SemaHub_empty_ST_12i 0x00001000 + +#define BA_SemaHub_empty_ST_13i 0x0389 +#define B16SemaHub_empty_ST_13i 0x0388 +#define LSb32SemaHub_empty_ST_13i 13 +#define LSb16SemaHub_empty_ST_13i 13 +#define bSemaHub_empty_ST_13i 1 +#define MSK32SemaHub_empty_ST_13i 0x00002000 + +#define BA_SemaHub_empty_ST_14i 0x0389 +#define B16SemaHub_empty_ST_14i 0x0388 +#define LSb32SemaHub_empty_ST_14i 14 +#define LSb16SemaHub_empty_ST_14i 14 +#define bSemaHub_empty_ST_14i 1 +#define MSK32SemaHub_empty_ST_14i 0x00004000 + +#define BA_SemaHub_empty_ST_15i 0x0389 +#define B16SemaHub_empty_ST_15i 0x0388 +#define LSb32SemaHub_empty_ST_15i 15 +#define LSb16SemaHub_empty_ST_15i 15 +#define bSemaHub_empty_ST_15i 1 +#define MSK32SemaHub_empty_ST_15i 0x00008000 + +#define BA_SemaHub_empty_ST_16i 0x038A +#define B16SemaHub_empty_ST_16i 0x038A +#define LSb32SemaHub_empty_ST_16i 16 +#define LSb16SemaHub_empty_ST_16i 0 +#define bSemaHub_empty_ST_16i 1 +#define MSK32SemaHub_empty_ST_16i 0x00010000 + +#define BA_SemaHub_empty_ST_17i 0x038A +#define B16SemaHub_empty_ST_17i 0x038A +#define LSb32SemaHub_empty_ST_17i 17 +#define LSb16SemaHub_empty_ST_17i 1 +#define bSemaHub_empty_ST_17i 1 +#define MSK32SemaHub_empty_ST_17i 0x00020000 + +#define BA_SemaHub_empty_ST_18i 0x038A +#define B16SemaHub_empty_ST_18i 0x038A +#define LSb32SemaHub_empty_ST_18i 18 +#define LSb16SemaHub_empty_ST_18i 2 +#define bSemaHub_empty_ST_18i 1 +#define MSK32SemaHub_empty_ST_18i 0x00040000 + +#define BA_SemaHub_empty_ST_19i 0x038A +#define B16SemaHub_empty_ST_19i 0x038A +#define LSb32SemaHub_empty_ST_19i 19 +#define LSb16SemaHub_empty_ST_19i 3 +#define bSemaHub_empty_ST_19i 1 +#define MSK32SemaHub_empty_ST_19i 0x00080000 + +#define BA_SemaHub_empty_ST_20i 0x038A +#define B16SemaHub_empty_ST_20i 0x038A +#define LSb32SemaHub_empty_ST_20i 20 +#define LSb16SemaHub_empty_ST_20i 4 +#define bSemaHub_empty_ST_20i 1 +#define MSK32SemaHub_empty_ST_20i 0x00100000 + +#define BA_SemaHub_empty_ST_21i 0x038A +#define B16SemaHub_empty_ST_21i 0x038A +#define LSb32SemaHub_empty_ST_21i 21 +#define LSb16SemaHub_empty_ST_21i 5 +#define bSemaHub_empty_ST_21i 1 +#define MSK32SemaHub_empty_ST_21i 0x00200000 + +#define BA_SemaHub_empty_ST_22i 0x038A +#define B16SemaHub_empty_ST_22i 0x038A +#define LSb32SemaHub_empty_ST_22i 22 +#define LSb16SemaHub_empty_ST_22i 6 +#define bSemaHub_empty_ST_22i 1 +#define MSK32SemaHub_empty_ST_22i 0x00400000 + +#define BA_SemaHub_empty_ST_23i 0x038A +#define B16SemaHub_empty_ST_23i 0x038A +#define LSb32SemaHub_empty_ST_23i 23 +#define LSb16SemaHub_empty_ST_23i 7 +#define bSemaHub_empty_ST_23i 1 +#define MSK32SemaHub_empty_ST_23i 0x00800000 + +#define BA_SemaHub_empty_ST_24i 0x038B +#define B16SemaHub_empty_ST_24i 0x038A +#define LSb32SemaHub_empty_ST_24i 24 +#define LSb16SemaHub_empty_ST_24i 8 +#define bSemaHub_empty_ST_24i 1 +#define MSK32SemaHub_empty_ST_24i 0x01000000 + +#define BA_SemaHub_empty_ST_25i 0x038B +#define B16SemaHub_empty_ST_25i 0x038A +#define LSb32SemaHub_empty_ST_25i 25 +#define LSb16SemaHub_empty_ST_25i 9 +#define bSemaHub_empty_ST_25i 1 +#define MSK32SemaHub_empty_ST_25i 0x02000000 + +#define BA_SemaHub_empty_ST_26i 0x038B +#define B16SemaHub_empty_ST_26i 0x038A +#define LSb32SemaHub_empty_ST_26i 26 +#define LSb16SemaHub_empty_ST_26i 10 +#define bSemaHub_empty_ST_26i 1 +#define MSK32SemaHub_empty_ST_26i 0x04000000 + +#define BA_SemaHub_empty_ST_27i 0x038B +#define B16SemaHub_empty_ST_27i 0x038A +#define LSb32SemaHub_empty_ST_27i 27 +#define LSb16SemaHub_empty_ST_27i 11 +#define bSemaHub_empty_ST_27i 1 +#define MSK32SemaHub_empty_ST_27i 0x08000000 + +#define BA_SemaHub_empty_ST_28i 0x038B +#define B16SemaHub_empty_ST_28i 0x038A +#define LSb32SemaHub_empty_ST_28i 28 +#define LSb16SemaHub_empty_ST_28i 12 +#define bSemaHub_empty_ST_28i 1 +#define MSK32SemaHub_empty_ST_28i 0x10000000 + +#define BA_SemaHub_empty_ST_29i 0x038B +#define B16SemaHub_empty_ST_29i 0x038A +#define LSb32SemaHub_empty_ST_29i 29 +#define LSb16SemaHub_empty_ST_29i 13 +#define bSemaHub_empty_ST_29i 1 +#define MSK32SemaHub_empty_ST_29i 0x20000000 + +#define BA_SemaHub_empty_ST_30i 0x038B +#define B16SemaHub_empty_ST_30i 0x038A +#define LSb32SemaHub_empty_ST_30i 30 +#define LSb16SemaHub_empty_ST_30i 14 +#define bSemaHub_empty_ST_30i 1 +#define MSK32SemaHub_empty_ST_30i 0x40000000 + +#define BA_SemaHub_empty_ST_31i 0x038B +#define B16SemaHub_empty_ST_31i 0x038A +#define LSb32SemaHub_empty_ST_31i 31 +#define LSb16SemaHub_empty_ST_31i 15 +#define bSemaHub_empty_ST_31i 1 +#define MSK32SemaHub_empty_ST_31i 0x80000000 +/////////////////////////////////////////////////////////// +#define RA_SemaHub_full 0x038C + +#define BA_SemaHub_full_ST_0i 0x038C +#define B16SemaHub_full_ST_0i 0x038C +#define LSb32SemaHub_full_ST_0i 0 +#define LSb16SemaHub_full_ST_0i 0 +#define bSemaHub_full_ST_0i 1 +#define MSK32SemaHub_full_ST_0i 0x00000001 + +#define BA_SemaHub_full_ST_1i 0x038C +#define B16SemaHub_full_ST_1i 0x038C +#define LSb32SemaHub_full_ST_1i 1 +#define LSb16SemaHub_full_ST_1i 1 +#define bSemaHub_full_ST_1i 1 +#define MSK32SemaHub_full_ST_1i 0x00000002 + +#define BA_SemaHub_full_ST_2i 0x038C +#define B16SemaHub_full_ST_2i 0x038C +#define LSb32SemaHub_full_ST_2i 2 +#define LSb16SemaHub_full_ST_2i 2 +#define bSemaHub_full_ST_2i 1 +#define MSK32SemaHub_full_ST_2i 0x00000004 + +#define BA_SemaHub_full_ST_3i 0x038C +#define B16SemaHub_full_ST_3i 0x038C +#define LSb32SemaHub_full_ST_3i 3 +#define LSb16SemaHub_full_ST_3i 3 +#define bSemaHub_full_ST_3i 1 +#define MSK32SemaHub_full_ST_3i 0x00000008 + +#define BA_SemaHub_full_ST_4i 0x038C +#define B16SemaHub_full_ST_4i 0x038C +#define LSb32SemaHub_full_ST_4i 4 +#define LSb16SemaHub_full_ST_4i 4 +#define bSemaHub_full_ST_4i 1 +#define MSK32SemaHub_full_ST_4i 0x00000010 + +#define BA_SemaHub_full_ST_5i 0x038C +#define B16SemaHub_full_ST_5i 0x038C +#define LSb32SemaHub_full_ST_5i 5 +#define LSb16SemaHub_full_ST_5i 5 +#define bSemaHub_full_ST_5i 1 +#define MSK32SemaHub_full_ST_5i 0x00000020 + +#define BA_SemaHub_full_ST_6i 0x038C +#define B16SemaHub_full_ST_6i 0x038C +#define LSb32SemaHub_full_ST_6i 6 +#define LSb16SemaHub_full_ST_6i 6 +#define bSemaHub_full_ST_6i 1 +#define MSK32SemaHub_full_ST_6i 0x00000040 + +#define BA_SemaHub_full_ST_7i 0x038C +#define B16SemaHub_full_ST_7i 0x038C +#define LSb32SemaHub_full_ST_7i 7 +#define LSb16SemaHub_full_ST_7i 7 +#define bSemaHub_full_ST_7i 1 +#define MSK32SemaHub_full_ST_7i 0x00000080 + +#define BA_SemaHub_full_ST_8i 0x038D +#define B16SemaHub_full_ST_8i 0x038C +#define LSb32SemaHub_full_ST_8i 8 +#define LSb16SemaHub_full_ST_8i 8 +#define bSemaHub_full_ST_8i 1 +#define MSK32SemaHub_full_ST_8i 0x00000100 + +#define BA_SemaHub_full_ST_9i 0x038D +#define B16SemaHub_full_ST_9i 0x038C +#define LSb32SemaHub_full_ST_9i 9 +#define LSb16SemaHub_full_ST_9i 9 +#define bSemaHub_full_ST_9i 1 +#define MSK32SemaHub_full_ST_9i 0x00000200 + +#define BA_SemaHub_full_ST_10i 0x038D +#define B16SemaHub_full_ST_10i 0x038C +#define LSb32SemaHub_full_ST_10i 10 +#define LSb16SemaHub_full_ST_10i 10 +#define bSemaHub_full_ST_10i 1 +#define MSK32SemaHub_full_ST_10i 0x00000400 + +#define BA_SemaHub_full_ST_11i 0x038D +#define B16SemaHub_full_ST_11i 0x038C +#define LSb32SemaHub_full_ST_11i 11 +#define LSb16SemaHub_full_ST_11i 11 +#define bSemaHub_full_ST_11i 1 +#define MSK32SemaHub_full_ST_11i 0x00000800 + +#define BA_SemaHub_full_ST_12i 0x038D +#define B16SemaHub_full_ST_12i 0x038C +#define LSb32SemaHub_full_ST_12i 12 +#define LSb16SemaHub_full_ST_12i 12 +#define bSemaHub_full_ST_12i 1 +#define MSK32SemaHub_full_ST_12i 0x00001000 + +#define BA_SemaHub_full_ST_13i 0x038D +#define B16SemaHub_full_ST_13i 0x038C +#define LSb32SemaHub_full_ST_13i 13 +#define LSb16SemaHub_full_ST_13i 13 +#define bSemaHub_full_ST_13i 1 +#define MSK32SemaHub_full_ST_13i 0x00002000 + +#define BA_SemaHub_full_ST_14i 0x038D +#define B16SemaHub_full_ST_14i 0x038C +#define LSb32SemaHub_full_ST_14i 14 +#define LSb16SemaHub_full_ST_14i 14 +#define bSemaHub_full_ST_14i 1 +#define MSK32SemaHub_full_ST_14i 0x00004000 + +#define BA_SemaHub_full_ST_15i 0x038D +#define B16SemaHub_full_ST_15i 0x038C +#define LSb32SemaHub_full_ST_15i 15 +#define LSb16SemaHub_full_ST_15i 15 +#define bSemaHub_full_ST_15i 1 +#define MSK32SemaHub_full_ST_15i 0x00008000 + +#define BA_SemaHub_full_ST_16i 0x038E +#define B16SemaHub_full_ST_16i 0x038E +#define LSb32SemaHub_full_ST_16i 16 +#define LSb16SemaHub_full_ST_16i 0 +#define bSemaHub_full_ST_16i 1 +#define MSK32SemaHub_full_ST_16i 0x00010000 + +#define BA_SemaHub_full_ST_17i 0x038E +#define B16SemaHub_full_ST_17i 0x038E +#define LSb32SemaHub_full_ST_17i 17 +#define LSb16SemaHub_full_ST_17i 1 +#define bSemaHub_full_ST_17i 1 +#define MSK32SemaHub_full_ST_17i 0x00020000 + +#define BA_SemaHub_full_ST_18i 0x038E +#define B16SemaHub_full_ST_18i 0x038E +#define LSb32SemaHub_full_ST_18i 18 +#define LSb16SemaHub_full_ST_18i 2 +#define bSemaHub_full_ST_18i 1 +#define MSK32SemaHub_full_ST_18i 0x00040000 + +#define BA_SemaHub_full_ST_19i 0x038E +#define B16SemaHub_full_ST_19i 0x038E +#define LSb32SemaHub_full_ST_19i 19 +#define LSb16SemaHub_full_ST_19i 3 +#define bSemaHub_full_ST_19i 1 +#define MSK32SemaHub_full_ST_19i 0x00080000 + +#define BA_SemaHub_full_ST_20i 0x038E +#define B16SemaHub_full_ST_20i 0x038E +#define LSb32SemaHub_full_ST_20i 20 +#define LSb16SemaHub_full_ST_20i 4 +#define bSemaHub_full_ST_20i 1 +#define MSK32SemaHub_full_ST_20i 0x00100000 + +#define BA_SemaHub_full_ST_21i 0x038E +#define B16SemaHub_full_ST_21i 0x038E +#define LSb32SemaHub_full_ST_21i 21 +#define LSb16SemaHub_full_ST_21i 5 +#define bSemaHub_full_ST_21i 1 +#define MSK32SemaHub_full_ST_21i 0x00200000 + +#define BA_SemaHub_full_ST_22i 0x038E +#define B16SemaHub_full_ST_22i 0x038E +#define LSb32SemaHub_full_ST_22i 22 +#define LSb16SemaHub_full_ST_22i 6 +#define bSemaHub_full_ST_22i 1 +#define MSK32SemaHub_full_ST_22i 0x00400000 + +#define BA_SemaHub_full_ST_23i 0x038E +#define B16SemaHub_full_ST_23i 0x038E +#define LSb32SemaHub_full_ST_23i 23 +#define LSb16SemaHub_full_ST_23i 7 +#define bSemaHub_full_ST_23i 1 +#define MSK32SemaHub_full_ST_23i 0x00800000 + +#define BA_SemaHub_full_ST_24i 0x038F +#define B16SemaHub_full_ST_24i 0x038E +#define LSb32SemaHub_full_ST_24i 24 +#define LSb16SemaHub_full_ST_24i 8 +#define bSemaHub_full_ST_24i 1 +#define MSK32SemaHub_full_ST_24i 0x01000000 + +#define BA_SemaHub_full_ST_25i 0x038F +#define B16SemaHub_full_ST_25i 0x038E +#define LSb32SemaHub_full_ST_25i 25 +#define LSb16SemaHub_full_ST_25i 9 +#define bSemaHub_full_ST_25i 1 +#define MSK32SemaHub_full_ST_25i 0x02000000 + +#define BA_SemaHub_full_ST_26i 0x038F +#define B16SemaHub_full_ST_26i 0x038E +#define LSb32SemaHub_full_ST_26i 26 +#define LSb16SemaHub_full_ST_26i 10 +#define bSemaHub_full_ST_26i 1 +#define MSK32SemaHub_full_ST_26i 0x04000000 + +#define BA_SemaHub_full_ST_27i 0x038F +#define B16SemaHub_full_ST_27i 0x038E +#define LSb32SemaHub_full_ST_27i 27 +#define LSb16SemaHub_full_ST_27i 11 +#define bSemaHub_full_ST_27i 1 +#define MSK32SemaHub_full_ST_27i 0x08000000 + +#define BA_SemaHub_full_ST_28i 0x038F +#define B16SemaHub_full_ST_28i 0x038E +#define LSb32SemaHub_full_ST_28i 28 +#define LSb16SemaHub_full_ST_28i 12 +#define bSemaHub_full_ST_28i 1 +#define MSK32SemaHub_full_ST_28i 0x10000000 + +#define BA_SemaHub_full_ST_29i 0x038F +#define B16SemaHub_full_ST_29i 0x038E +#define LSb32SemaHub_full_ST_29i 29 +#define LSb16SemaHub_full_ST_29i 13 +#define bSemaHub_full_ST_29i 1 +#define MSK32SemaHub_full_ST_29i 0x20000000 + +#define BA_SemaHub_full_ST_30i 0x038F +#define B16SemaHub_full_ST_30i 0x038E +#define LSb32SemaHub_full_ST_30i 30 +#define LSb16SemaHub_full_ST_30i 14 +#define bSemaHub_full_ST_30i 1 +#define MSK32SemaHub_full_ST_30i 0x40000000 + +#define BA_SemaHub_full_ST_31i 0x038F +#define B16SemaHub_full_ST_31i 0x038E +#define LSb32SemaHub_full_ST_31i 31 +#define LSb16SemaHub_full_ST_31i 15 +#define bSemaHub_full_ST_31i 1 +#define MSK32SemaHub_full_ST_31i 0x80000000 +/////////////////////////////////////////////////////////// +#define RA_SemaHub_almostEmpty 0x0390 + +#define BA_SemaHub_almostEmpty_ST_0i 0x0390 +#define B16SemaHub_almostEmpty_ST_0i 0x0390 +#define LSb32SemaHub_almostEmpty_ST_0i 0 +#define LSb16SemaHub_almostEmpty_ST_0i 0 +#define bSemaHub_almostEmpty_ST_0i 1 +#define MSK32SemaHub_almostEmpty_ST_0i 0x00000001 + +#define BA_SemaHub_almostEmpty_ST_1i 0x0390 +#define B16SemaHub_almostEmpty_ST_1i 0x0390 +#define LSb32SemaHub_almostEmpty_ST_1i 1 +#define LSb16SemaHub_almostEmpty_ST_1i 1 +#define bSemaHub_almostEmpty_ST_1i 1 +#define MSK32SemaHub_almostEmpty_ST_1i 0x00000002 + +#define BA_SemaHub_almostEmpty_ST_2i 0x0390 +#define B16SemaHub_almostEmpty_ST_2i 0x0390 +#define LSb32SemaHub_almostEmpty_ST_2i 2 +#define LSb16SemaHub_almostEmpty_ST_2i 2 +#define bSemaHub_almostEmpty_ST_2i 1 +#define MSK32SemaHub_almostEmpty_ST_2i 0x00000004 + +#define BA_SemaHub_almostEmpty_ST_3i 0x0390 +#define B16SemaHub_almostEmpty_ST_3i 0x0390 +#define LSb32SemaHub_almostEmpty_ST_3i 3 +#define LSb16SemaHub_almostEmpty_ST_3i 3 +#define bSemaHub_almostEmpty_ST_3i 1 +#define MSK32SemaHub_almostEmpty_ST_3i 0x00000008 + +#define BA_SemaHub_almostEmpty_ST_4i 0x0390 +#define B16SemaHub_almostEmpty_ST_4i 0x0390 +#define LSb32SemaHub_almostEmpty_ST_4i 4 +#define LSb16SemaHub_almostEmpty_ST_4i 4 +#define bSemaHub_almostEmpty_ST_4i 1 +#define MSK32SemaHub_almostEmpty_ST_4i 0x00000010 + +#define BA_SemaHub_almostEmpty_ST_5i 0x0390 +#define B16SemaHub_almostEmpty_ST_5i 0x0390 +#define LSb32SemaHub_almostEmpty_ST_5i 5 +#define LSb16SemaHub_almostEmpty_ST_5i 5 +#define bSemaHub_almostEmpty_ST_5i 1 +#define MSK32SemaHub_almostEmpty_ST_5i 0x00000020 + +#define BA_SemaHub_almostEmpty_ST_6i 0x0390 +#define B16SemaHub_almostEmpty_ST_6i 0x0390 +#define LSb32SemaHub_almostEmpty_ST_6i 6 +#define LSb16SemaHub_almostEmpty_ST_6i 6 +#define bSemaHub_almostEmpty_ST_6i 1 +#define MSK32SemaHub_almostEmpty_ST_6i 0x00000040 + +#define BA_SemaHub_almostEmpty_ST_7i 0x0390 +#define B16SemaHub_almostEmpty_ST_7i 0x0390 +#define LSb32SemaHub_almostEmpty_ST_7i 7 +#define LSb16SemaHub_almostEmpty_ST_7i 7 +#define bSemaHub_almostEmpty_ST_7i 1 +#define MSK32SemaHub_almostEmpty_ST_7i 0x00000080 + +#define BA_SemaHub_almostEmpty_ST_8i 0x0391 +#define B16SemaHub_almostEmpty_ST_8i 0x0390 +#define LSb32SemaHub_almostEmpty_ST_8i 8 +#define LSb16SemaHub_almostEmpty_ST_8i 8 +#define bSemaHub_almostEmpty_ST_8i 1 +#define MSK32SemaHub_almostEmpty_ST_8i 0x00000100 + +#define BA_SemaHub_almostEmpty_ST_9i 0x0391 +#define B16SemaHub_almostEmpty_ST_9i 0x0390 +#define LSb32SemaHub_almostEmpty_ST_9i 9 +#define LSb16SemaHub_almostEmpty_ST_9i 9 +#define bSemaHub_almostEmpty_ST_9i 1 +#define MSK32SemaHub_almostEmpty_ST_9i 0x00000200 + +#define BA_SemaHub_almostEmpty_ST_10i 0x0391 +#define B16SemaHub_almostEmpty_ST_10i 0x0390 +#define LSb32SemaHub_almostEmpty_ST_10i 10 +#define LSb16SemaHub_almostEmpty_ST_10i 10 +#define bSemaHub_almostEmpty_ST_10i 1 +#define MSK32SemaHub_almostEmpty_ST_10i 0x00000400 + +#define BA_SemaHub_almostEmpty_ST_11i 0x0391 +#define B16SemaHub_almostEmpty_ST_11i 0x0390 +#define LSb32SemaHub_almostEmpty_ST_11i 11 +#define LSb16SemaHub_almostEmpty_ST_11i 11 +#define bSemaHub_almostEmpty_ST_11i 1 +#define MSK32SemaHub_almostEmpty_ST_11i 0x00000800 + +#define BA_SemaHub_almostEmpty_ST_12i 0x0391 +#define B16SemaHub_almostEmpty_ST_12i 0x0390 +#define LSb32SemaHub_almostEmpty_ST_12i 12 +#define LSb16SemaHub_almostEmpty_ST_12i 12 +#define bSemaHub_almostEmpty_ST_12i 1 +#define MSK32SemaHub_almostEmpty_ST_12i 0x00001000 + +#define BA_SemaHub_almostEmpty_ST_13i 0x0391 +#define B16SemaHub_almostEmpty_ST_13i 0x0390 +#define LSb32SemaHub_almostEmpty_ST_13i 13 +#define LSb16SemaHub_almostEmpty_ST_13i 13 +#define bSemaHub_almostEmpty_ST_13i 1 +#define MSK32SemaHub_almostEmpty_ST_13i 0x00002000 + +#define BA_SemaHub_almostEmpty_ST_14i 0x0391 +#define B16SemaHub_almostEmpty_ST_14i 0x0390 +#define LSb32SemaHub_almostEmpty_ST_14i 14 +#define LSb16SemaHub_almostEmpty_ST_14i 14 +#define bSemaHub_almostEmpty_ST_14i 1 +#define MSK32SemaHub_almostEmpty_ST_14i 0x00004000 + +#define BA_SemaHub_almostEmpty_ST_15i 0x0391 +#define B16SemaHub_almostEmpty_ST_15i 0x0390 +#define LSb32SemaHub_almostEmpty_ST_15i 15 +#define LSb16SemaHub_almostEmpty_ST_15i 15 +#define bSemaHub_almostEmpty_ST_15i 1 +#define MSK32SemaHub_almostEmpty_ST_15i 0x00008000 + +#define BA_SemaHub_almostEmpty_ST_16i 0x0392 +#define B16SemaHub_almostEmpty_ST_16i 0x0392 +#define LSb32SemaHub_almostEmpty_ST_16i 16 +#define LSb16SemaHub_almostEmpty_ST_16i 0 +#define bSemaHub_almostEmpty_ST_16i 1 +#define MSK32SemaHub_almostEmpty_ST_16i 0x00010000 + +#define BA_SemaHub_almostEmpty_ST_17i 0x0392 +#define B16SemaHub_almostEmpty_ST_17i 0x0392 +#define LSb32SemaHub_almostEmpty_ST_17i 17 +#define LSb16SemaHub_almostEmpty_ST_17i 1 +#define bSemaHub_almostEmpty_ST_17i 1 +#define MSK32SemaHub_almostEmpty_ST_17i 0x00020000 + +#define BA_SemaHub_almostEmpty_ST_18i 0x0392 +#define B16SemaHub_almostEmpty_ST_18i 0x0392 +#define LSb32SemaHub_almostEmpty_ST_18i 18 +#define LSb16SemaHub_almostEmpty_ST_18i 2 +#define bSemaHub_almostEmpty_ST_18i 1 +#define MSK32SemaHub_almostEmpty_ST_18i 0x00040000 + +#define BA_SemaHub_almostEmpty_ST_19i 0x0392 +#define B16SemaHub_almostEmpty_ST_19i 0x0392 +#define LSb32SemaHub_almostEmpty_ST_19i 19 +#define LSb16SemaHub_almostEmpty_ST_19i 3 +#define bSemaHub_almostEmpty_ST_19i 1 +#define MSK32SemaHub_almostEmpty_ST_19i 0x00080000 + +#define BA_SemaHub_almostEmpty_ST_20i 0x0392 +#define B16SemaHub_almostEmpty_ST_20i 0x0392 +#define LSb32SemaHub_almostEmpty_ST_20i 20 +#define LSb16SemaHub_almostEmpty_ST_20i 4 +#define bSemaHub_almostEmpty_ST_20i 1 +#define MSK32SemaHub_almostEmpty_ST_20i 0x00100000 + +#define BA_SemaHub_almostEmpty_ST_21i 0x0392 +#define B16SemaHub_almostEmpty_ST_21i 0x0392 +#define LSb32SemaHub_almostEmpty_ST_21i 21 +#define LSb16SemaHub_almostEmpty_ST_21i 5 +#define bSemaHub_almostEmpty_ST_21i 1 +#define MSK32SemaHub_almostEmpty_ST_21i 0x00200000 + +#define BA_SemaHub_almostEmpty_ST_22i 0x0392 +#define B16SemaHub_almostEmpty_ST_22i 0x0392 +#define LSb32SemaHub_almostEmpty_ST_22i 22 +#define LSb16SemaHub_almostEmpty_ST_22i 6 +#define bSemaHub_almostEmpty_ST_22i 1 +#define MSK32SemaHub_almostEmpty_ST_22i 0x00400000 + +#define BA_SemaHub_almostEmpty_ST_23i 0x0392 +#define B16SemaHub_almostEmpty_ST_23i 0x0392 +#define LSb32SemaHub_almostEmpty_ST_23i 23 +#define LSb16SemaHub_almostEmpty_ST_23i 7 +#define bSemaHub_almostEmpty_ST_23i 1 +#define MSK32SemaHub_almostEmpty_ST_23i 0x00800000 + +#define BA_SemaHub_almostEmpty_ST_24i 0x0393 +#define B16SemaHub_almostEmpty_ST_24i 0x0392 +#define LSb32SemaHub_almostEmpty_ST_24i 24 +#define LSb16SemaHub_almostEmpty_ST_24i 8 +#define bSemaHub_almostEmpty_ST_24i 1 +#define MSK32SemaHub_almostEmpty_ST_24i 0x01000000 + +#define BA_SemaHub_almostEmpty_ST_25i 0x0393 +#define B16SemaHub_almostEmpty_ST_25i 0x0392 +#define LSb32SemaHub_almostEmpty_ST_25i 25 +#define LSb16SemaHub_almostEmpty_ST_25i 9 +#define bSemaHub_almostEmpty_ST_25i 1 +#define MSK32SemaHub_almostEmpty_ST_25i 0x02000000 + +#define BA_SemaHub_almostEmpty_ST_26i 0x0393 +#define B16SemaHub_almostEmpty_ST_26i 0x0392 +#define LSb32SemaHub_almostEmpty_ST_26i 26 +#define LSb16SemaHub_almostEmpty_ST_26i 10 +#define bSemaHub_almostEmpty_ST_26i 1 +#define MSK32SemaHub_almostEmpty_ST_26i 0x04000000 + +#define BA_SemaHub_almostEmpty_ST_27i 0x0393 +#define B16SemaHub_almostEmpty_ST_27i 0x0392 +#define LSb32SemaHub_almostEmpty_ST_27i 27 +#define LSb16SemaHub_almostEmpty_ST_27i 11 +#define bSemaHub_almostEmpty_ST_27i 1 +#define MSK32SemaHub_almostEmpty_ST_27i 0x08000000 + +#define BA_SemaHub_almostEmpty_ST_28i 0x0393 +#define B16SemaHub_almostEmpty_ST_28i 0x0392 +#define LSb32SemaHub_almostEmpty_ST_28i 28 +#define LSb16SemaHub_almostEmpty_ST_28i 12 +#define bSemaHub_almostEmpty_ST_28i 1 +#define MSK32SemaHub_almostEmpty_ST_28i 0x10000000 + +#define BA_SemaHub_almostEmpty_ST_29i 0x0393 +#define B16SemaHub_almostEmpty_ST_29i 0x0392 +#define LSb32SemaHub_almostEmpty_ST_29i 29 +#define LSb16SemaHub_almostEmpty_ST_29i 13 +#define bSemaHub_almostEmpty_ST_29i 1 +#define MSK32SemaHub_almostEmpty_ST_29i 0x20000000 + +#define BA_SemaHub_almostEmpty_ST_30i 0x0393 +#define B16SemaHub_almostEmpty_ST_30i 0x0392 +#define LSb32SemaHub_almostEmpty_ST_30i 30 +#define LSb16SemaHub_almostEmpty_ST_30i 14 +#define bSemaHub_almostEmpty_ST_30i 1 +#define MSK32SemaHub_almostEmpty_ST_30i 0x40000000 + +#define BA_SemaHub_almostEmpty_ST_31i 0x0393 +#define B16SemaHub_almostEmpty_ST_31i 0x0392 +#define LSb32SemaHub_almostEmpty_ST_31i 31 +#define LSb16SemaHub_almostEmpty_ST_31i 15 +#define bSemaHub_almostEmpty_ST_31i 1 +#define MSK32SemaHub_almostEmpty_ST_31i 0x80000000 +/////////////////////////////////////////////////////////// +#define RA_SemaHub_almostFull 0x0394 + +#define BA_SemaHub_almostFull_ST_0i 0x0394 +#define B16SemaHub_almostFull_ST_0i 0x0394 +#define LSb32SemaHub_almostFull_ST_0i 0 +#define LSb16SemaHub_almostFull_ST_0i 0 +#define bSemaHub_almostFull_ST_0i 1 +#define MSK32SemaHub_almostFull_ST_0i 0x00000001 + +#define BA_SemaHub_almostFull_ST_1i 0x0394 +#define B16SemaHub_almostFull_ST_1i 0x0394 +#define LSb32SemaHub_almostFull_ST_1i 1 +#define LSb16SemaHub_almostFull_ST_1i 1 +#define bSemaHub_almostFull_ST_1i 1 +#define MSK32SemaHub_almostFull_ST_1i 0x00000002 + +#define BA_SemaHub_almostFull_ST_2i 0x0394 +#define B16SemaHub_almostFull_ST_2i 0x0394 +#define LSb32SemaHub_almostFull_ST_2i 2 +#define LSb16SemaHub_almostFull_ST_2i 2 +#define bSemaHub_almostFull_ST_2i 1 +#define MSK32SemaHub_almostFull_ST_2i 0x00000004 + +#define BA_SemaHub_almostFull_ST_3i 0x0394 +#define B16SemaHub_almostFull_ST_3i 0x0394 +#define LSb32SemaHub_almostFull_ST_3i 3 +#define LSb16SemaHub_almostFull_ST_3i 3 +#define bSemaHub_almostFull_ST_3i 1 +#define MSK32SemaHub_almostFull_ST_3i 0x00000008 + +#define BA_SemaHub_almostFull_ST_4i 0x0394 +#define B16SemaHub_almostFull_ST_4i 0x0394 +#define LSb32SemaHub_almostFull_ST_4i 4 +#define LSb16SemaHub_almostFull_ST_4i 4 +#define bSemaHub_almostFull_ST_4i 1 +#define MSK32SemaHub_almostFull_ST_4i 0x00000010 + +#define BA_SemaHub_almostFull_ST_5i 0x0394 +#define B16SemaHub_almostFull_ST_5i 0x0394 +#define LSb32SemaHub_almostFull_ST_5i 5 +#define LSb16SemaHub_almostFull_ST_5i 5 +#define bSemaHub_almostFull_ST_5i 1 +#define MSK32SemaHub_almostFull_ST_5i 0x00000020 + +#define BA_SemaHub_almostFull_ST_6i 0x0394 +#define B16SemaHub_almostFull_ST_6i 0x0394 +#define LSb32SemaHub_almostFull_ST_6i 6 +#define LSb16SemaHub_almostFull_ST_6i 6 +#define bSemaHub_almostFull_ST_6i 1 +#define MSK32SemaHub_almostFull_ST_6i 0x00000040 + +#define BA_SemaHub_almostFull_ST_7i 0x0394 +#define B16SemaHub_almostFull_ST_7i 0x0394 +#define LSb32SemaHub_almostFull_ST_7i 7 +#define LSb16SemaHub_almostFull_ST_7i 7 +#define bSemaHub_almostFull_ST_7i 1 +#define MSK32SemaHub_almostFull_ST_7i 0x00000080 + +#define BA_SemaHub_almostFull_ST_8i 0x0395 +#define B16SemaHub_almostFull_ST_8i 0x0394 +#define LSb32SemaHub_almostFull_ST_8i 8 +#define LSb16SemaHub_almostFull_ST_8i 8 +#define bSemaHub_almostFull_ST_8i 1 +#define MSK32SemaHub_almostFull_ST_8i 0x00000100 + +#define BA_SemaHub_almostFull_ST_9i 0x0395 +#define B16SemaHub_almostFull_ST_9i 0x0394 +#define LSb32SemaHub_almostFull_ST_9i 9 +#define LSb16SemaHub_almostFull_ST_9i 9 +#define bSemaHub_almostFull_ST_9i 1 +#define MSK32SemaHub_almostFull_ST_9i 0x00000200 + +#define BA_SemaHub_almostFull_ST_10i 0x0395 +#define B16SemaHub_almostFull_ST_10i 0x0394 +#define LSb32SemaHub_almostFull_ST_10i 10 +#define LSb16SemaHub_almostFull_ST_10i 10 +#define bSemaHub_almostFull_ST_10i 1 +#define MSK32SemaHub_almostFull_ST_10i 0x00000400 + +#define BA_SemaHub_almostFull_ST_11i 0x0395 +#define B16SemaHub_almostFull_ST_11i 0x0394 +#define LSb32SemaHub_almostFull_ST_11i 11 +#define LSb16SemaHub_almostFull_ST_11i 11 +#define bSemaHub_almostFull_ST_11i 1 +#define MSK32SemaHub_almostFull_ST_11i 0x00000800 + +#define BA_SemaHub_almostFull_ST_12i 0x0395 +#define B16SemaHub_almostFull_ST_12i 0x0394 +#define LSb32SemaHub_almostFull_ST_12i 12 +#define LSb16SemaHub_almostFull_ST_12i 12 +#define bSemaHub_almostFull_ST_12i 1 +#define MSK32SemaHub_almostFull_ST_12i 0x00001000 + +#define BA_SemaHub_almostFull_ST_13i 0x0395 +#define B16SemaHub_almostFull_ST_13i 0x0394 +#define LSb32SemaHub_almostFull_ST_13i 13 +#define LSb16SemaHub_almostFull_ST_13i 13 +#define bSemaHub_almostFull_ST_13i 1 +#define MSK32SemaHub_almostFull_ST_13i 0x00002000 + +#define BA_SemaHub_almostFull_ST_14i 0x0395 +#define B16SemaHub_almostFull_ST_14i 0x0394 +#define LSb32SemaHub_almostFull_ST_14i 14 +#define LSb16SemaHub_almostFull_ST_14i 14 +#define bSemaHub_almostFull_ST_14i 1 +#define MSK32SemaHub_almostFull_ST_14i 0x00004000 + +#define BA_SemaHub_almostFull_ST_15i 0x0395 +#define B16SemaHub_almostFull_ST_15i 0x0394 +#define LSb32SemaHub_almostFull_ST_15i 15 +#define LSb16SemaHub_almostFull_ST_15i 15 +#define bSemaHub_almostFull_ST_15i 1 +#define MSK32SemaHub_almostFull_ST_15i 0x00008000 + +#define BA_SemaHub_almostFull_ST_16i 0x0396 +#define B16SemaHub_almostFull_ST_16i 0x0396 +#define LSb32SemaHub_almostFull_ST_16i 16 +#define LSb16SemaHub_almostFull_ST_16i 0 +#define bSemaHub_almostFull_ST_16i 1 +#define MSK32SemaHub_almostFull_ST_16i 0x00010000 + +#define BA_SemaHub_almostFull_ST_17i 0x0396 +#define B16SemaHub_almostFull_ST_17i 0x0396 +#define LSb32SemaHub_almostFull_ST_17i 17 +#define LSb16SemaHub_almostFull_ST_17i 1 +#define bSemaHub_almostFull_ST_17i 1 +#define MSK32SemaHub_almostFull_ST_17i 0x00020000 + +#define BA_SemaHub_almostFull_ST_18i 0x0396 +#define B16SemaHub_almostFull_ST_18i 0x0396 +#define LSb32SemaHub_almostFull_ST_18i 18 +#define LSb16SemaHub_almostFull_ST_18i 2 +#define bSemaHub_almostFull_ST_18i 1 +#define MSK32SemaHub_almostFull_ST_18i 0x00040000 + +#define BA_SemaHub_almostFull_ST_19i 0x0396 +#define B16SemaHub_almostFull_ST_19i 0x0396 +#define LSb32SemaHub_almostFull_ST_19i 19 +#define LSb16SemaHub_almostFull_ST_19i 3 +#define bSemaHub_almostFull_ST_19i 1 +#define MSK32SemaHub_almostFull_ST_19i 0x00080000 + +#define BA_SemaHub_almostFull_ST_20i 0x0396 +#define B16SemaHub_almostFull_ST_20i 0x0396 +#define LSb32SemaHub_almostFull_ST_20i 20 +#define LSb16SemaHub_almostFull_ST_20i 4 +#define bSemaHub_almostFull_ST_20i 1 +#define MSK32SemaHub_almostFull_ST_20i 0x00100000 + +#define BA_SemaHub_almostFull_ST_21i 0x0396 +#define B16SemaHub_almostFull_ST_21i 0x0396 +#define LSb32SemaHub_almostFull_ST_21i 21 +#define LSb16SemaHub_almostFull_ST_21i 5 +#define bSemaHub_almostFull_ST_21i 1 +#define MSK32SemaHub_almostFull_ST_21i 0x00200000 + +#define BA_SemaHub_almostFull_ST_22i 0x0396 +#define B16SemaHub_almostFull_ST_22i 0x0396 +#define LSb32SemaHub_almostFull_ST_22i 22 +#define LSb16SemaHub_almostFull_ST_22i 6 +#define bSemaHub_almostFull_ST_22i 1 +#define MSK32SemaHub_almostFull_ST_22i 0x00400000 + +#define BA_SemaHub_almostFull_ST_23i 0x0396 +#define B16SemaHub_almostFull_ST_23i 0x0396 +#define LSb32SemaHub_almostFull_ST_23i 23 +#define LSb16SemaHub_almostFull_ST_23i 7 +#define bSemaHub_almostFull_ST_23i 1 +#define MSK32SemaHub_almostFull_ST_23i 0x00800000 + +#define BA_SemaHub_almostFull_ST_24i 0x0397 +#define B16SemaHub_almostFull_ST_24i 0x0396 +#define LSb32SemaHub_almostFull_ST_24i 24 +#define LSb16SemaHub_almostFull_ST_24i 8 +#define bSemaHub_almostFull_ST_24i 1 +#define MSK32SemaHub_almostFull_ST_24i 0x01000000 + +#define BA_SemaHub_almostFull_ST_25i 0x0397 +#define B16SemaHub_almostFull_ST_25i 0x0396 +#define LSb32SemaHub_almostFull_ST_25i 25 +#define LSb16SemaHub_almostFull_ST_25i 9 +#define bSemaHub_almostFull_ST_25i 1 +#define MSK32SemaHub_almostFull_ST_25i 0x02000000 + +#define BA_SemaHub_almostFull_ST_26i 0x0397 +#define B16SemaHub_almostFull_ST_26i 0x0396 +#define LSb32SemaHub_almostFull_ST_26i 26 +#define LSb16SemaHub_almostFull_ST_26i 10 +#define bSemaHub_almostFull_ST_26i 1 +#define MSK32SemaHub_almostFull_ST_26i 0x04000000 + +#define BA_SemaHub_almostFull_ST_27i 0x0397 +#define B16SemaHub_almostFull_ST_27i 0x0396 +#define LSb32SemaHub_almostFull_ST_27i 27 +#define LSb16SemaHub_almostFull_ST_27i 11 +#define bSemaHub_almostFull_ST_27i 1 +#define MSK32SemaHub_almostFull_ST_27i 0x08000000 + +#define BA_SemaHub_almostFull_ST_28i 0x0397 +#define B16SemaHub_almostFull_ST_28i 0x0396 +#define LSb32SemaHub_almostFull_ST_28i 28 +#define LSb16SemaHub_almostFull_ST_28i 12 +#define bSemaHub_almostFull_ST_28i 1 +#define MSK32SemaHub_almostFull_ST_28i 0x10000000 + +#define BA_SemaHub_almostFull_ST_29i 0x0397 +#define B16SemaHub_almostFull_ST_29i 0x0396 +#define LSb32SemaHub_almostFull_ST_29i 29 +#define LSb16SemaHub_almostFull_ST_29i 13 +#define bSemaHub_almostFull_ST_29i 1 +#define MSK32SemaHub_almostFull_ST_29i 0x20000000 + +#define BA_SemaHub_almostFull_ST_30i 0x0397 +#define B16SemaHub_almostFull_ST_30i 0x0396 +#define LSb32SemaHub_almostFull_ST_30i 30 +#define LSb16SemaHub_almostFull_ST_30i 14 +#define bSemaHub_almostFull_ST_30i 1 +#define MSK32SemaHub_almostFull_ST_30i 0x40000000 + +#define BA_SemaHub_almostFull_ST_31i 0x0397 +#define B16SemaHub_almostFull_ST_31i 0x0396 +#define LSb32SemaHub_almostFull_ST_31i 31 +#define LSb16SemaHub_almostFull_ST_31i 15 +#define bSemaHub_almostFull_ST_31i 1 +#define MSK32SemaHub_almostFull_ST_31i 0x80000000 +/////////////////////////////////////////////////////////// + +typedef struct SIE_SemaHub { +/////////////////////////////////////////////////////////// + SIE_SemaQuery ie_counter[64]; +/////////////////////////////////////////////////////////// + SIE_Semaphore ie_cell[32]; +/////////////////////////////////////////////////////////// +#define GET32SemaHub_PUSH_ID(r32) _BFGET_(r32, 7, 0) +#define SET32SemaHub_PUSH_ID(r32,v) _BFSET_(r32, 7, 0,v) +#define GET16SemaHub_PUSH_ID(r16) _BFGET_(r16, 7, 0) +#define SET16SemaHub_PUSH_ID(r16,v) _BFSET_(r16, 7, 0,v) + +#define GET32SemaHub_PUSH_delta(r32) _BFGET_(r32,15, 8) +#define SET32SemaHub_PUSH_delta(r32,v) _BFSET_(r32,15, 8,v) +#define GET16SemaHub_PUSH_delta(r16) _BFGET_(r16,15, 8) +#define SET16SemaHub_PUSH_delta(r16,v) _BFSET_(r16,15, 8,v) + +#define w32SemaHub_PUSH {\ + UNSG32 uPUSH_ID : 8;\ + UNSG32 uPUSH_delta : 8;\ + UNSG32 RSVDx380_b16 : 16;\ + } +union { UNSG32 u32SemaHub_PUSH; + struct w32SemaHub_PUSH; + }; +/////////////////////////////////////////////////////////// +#define GET32SemaHub_POP_ID(r32) _BFGET_(r32, 7, 0) +#define SET32SemaHub_POP_ID(r32,v) _BFSET_(r32, 7, 0,v) +#define GET16SemaHub_POP_ID(r16) _BFGET_(r16, 7, 0) +#define SET16SemaHub_POP_ID(r16,v) _BFSET_(r16, 7, 0,v) + +#define GET32SemaHub_POP_delta(r32) _BFGET_(r32,15, 8) +#define SET32SemaHub_POP_delta(r32,v) _BFSET_(r32,15, 8,v) +#define GET16SemaHub_POP_delta(r16) _BFGET_(r16,15, 8) +#define SET16SemaHub_POP_delta(r16,v) _BFSET_(r16,15, 8,v) + +#define w32SemaHub_POP {\ + UNSG32 uPOP_ID : 8;\ + UNSG32 uPOP_delta : 8;\ + UNSG32 RSVDx384_b16 : 16;\ + } +union { UNSG32 u32SemaHub_POP; + struct w32SemaHub_POP; + }; +/////////////////////////////////////////////////////////// +#define GET32SemaHub_empty_ST_0i(r32) _BFGET_(r32, 0, 0) +#define SET32SemaHub_empty_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) +#define GET16SemaHub_empty_ST_0i(r16) _BFGET_(r16, 0, 0) +#define SET16SemaHub_empty_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + +#define GET32SemaHub_empty_ST_1i(r32) _BFGET_(r32, 1, 1) +#define SET32SemaHub_empty_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) +#define GET16SemaHub_empty_ST_1i(r16) _BFGET_(r16, 1, 1) +#define SET16SemaHub_empty_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + +#define GET32SemaHub_empty_ST_2i(r32) _BFGET_(r32, 2, 2) +#define SET32SemaHub_empty_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) +#define GET16SemaHub_empty_ST_2i(r16) _BFGET_(r16, 2, 2) +#define SET16SemaHub_empty_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + +#define GET32SemaHub_empty_ST_3i(r32) _BFGET_(r32, 3, 3) +#define SET32SemaHub_empty_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) +#define GET16SemaHub_empty_ST_3i(r16) _BFGET_(r16, 3, 3) +#define SET16SemaHub_empty_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + +#define GET32SemaHub_empty_ST_4i(r32) _BFGET_(r32, 4, 4) +#define SET32SemaHub_empty_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) +#define GET16SemaHub_empty_ST_4i(r16) _BFGET_(r16, 4, 4) +#define SET16SemaHub_empty_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + +#define GET32SemaHub_empty_ST_5i(r32) _BFGET_(r32, 5, 5) +#define SET32SemaHub_empty_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) +#define GET16SemaHub_empty_ST_5i(r16) _BFGET_(r16, 5, 5) +#define SET16SemaHub_empty_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + +#define GET32SemaHub_empty_ST_6i(r32) _BFGET_(r32, 6, 6) +#define SET32SemaHub_empty_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) +#define GET16SemaHub_empty_ST_6i(r16) _BFGET_(r16, 6, 6) +#define SET16SemaHub_empty_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + +#define GET32SemaHub_empty_ST_7i(r32) _BFGET_(r32, 7, 7) +#define SET32SemaHub_empty_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) +#define GET16SemaHub_empty_ST_7i(r16) _BFGET_(r16, 7, 7) +#define SET16SemaHub_empty_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + +#define GET32SemaHub_empty_ST_8i(r32) _BFGET_(r32, 8, 8) +#define SET32SemaHub_empty_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) +#define GET16SemaHub_empty_ST_8i(r16) _BFGET_(r16, 8, 8) +#define SET16SemaHub_empty_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + +#define GET32SemaHub_empty_ST_9i(r32) _BFGET_(r32, 9, 9) +#define SET32SemaHub_empty_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) +#define GET16SemaHub_empty_ST_9i(r16) _BFGET_(r16, 9, 9) +#define SET16SemaHub_empty_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + +#define GET32SemaHub_empty_ST_10i(r32) _BFGET_(r32,10,10) +#define SET32SemaHub_empty_ST_10i(r32,v) _BFSET_(r32,10,10,v) +#define GET16SemaHub_empty_ST_10i(r16) _BFGET_(r16,10,10) +#define SET16SemaHub_empty_ST_10i(r16,v) _BFSET_(r16,10,10,v) + +#define GET32SemaHub_empty_ST_11i(r32) _BFGET_(r32,11,11) +#define SET32SemaHub_empty_ST_11i(r32,v) _BFSET_(r32,11,11,v) +#define GET16SemaHub_empty_ST_11i(r16) _BFGET_(r16,11,11) +#define SET16SemaHub_empty_ST_11i(r16,v) _BFSET_(r16,11,11,v) + +#define GET32SemaHub_empty_ST_12i(r32) _BFGET_(r32,12,12) +#define SET32SemaHub_empty_ST_12i(r32,v) _BFSET_(r32,12,12,v) +#define GET16SemaHub_empty_ST_12i(r16) _BFGET_(r16,12,12) +#define SET16SemaHub_empty_ST_12i(r16,v) _BFSET_(r16,12,12,v) + +#define GET32SemaHub_empty_ST_13i(r32) _BFGET_(r32,13,13) +#define SET32SemaHub_empty_ST_13i(r32,v) _BFSET_(r32,13,13,v) +#define GET16SemaHub_empty_ST_13i(r16) _BFGET_(r16,13,13) +#define SET16SemaHub_empty_ST_13i(r16,v) _BFSET_(r16,13,13,v) + +#define GET32SemaHub_empty_ST_14i(r32) _BFGET_(r32,14,14) +#define SET32SemaHub_empty_ST_14i(r32,v) _BFSET_(r32,14,14,v) +#define GET16SemaHub_empty_ST_14i(r16) _BFGET_(r16,14,14) +#define SET16SemaHub_empty_ST_14i(r16,v) _BFSET_(r16,14,14,v) + +#define GET32SemaHub_empty_ST_15i(r32) _BFGET_(r32,15,15) +#define SET32SemaHub_empty_ST_15i(r32,v) _BFSET_(r32,15,15,v) +#define GET16SemaHub_empty_ST_15i(r16) _BFGET_(r16,15,15) +#define SET16SemaHub_empty_ST_15i(r16,v) _BFSET_(r16,15,15,v) + +#define GET32SemaHub_empty_ST_16i(r32) _BFGET_(r32,16,16) +#define SET32SemaHub_empty_ST_16i(r32,v) _BFSET_(r32,16,16,v) +#define GET16SemaHub_empty_ST_16i(r16) _BFGET_(r16, 0, 0) +#define SET16SemaHub_empty_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + +#define GET32SemaHub_empty_ST_17i(r32) _BFGET_(r32,17,17) +#define SET32SemaHub_empty_ST_17i(r32,v) _BFSET_(r32,17,17,v) +#define GET16SemaHub_empty_ST_17i(r16) _BFGET_(r16, 1, 1) +#define SET16SemaHub_empty_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + +#define GET32SemaHub_empty_ST_18i(r32) _BFGET_(r32,18,18) +#define SET32SemaHub_empty_ST_18i(r32,v) _BFSET_(r32,18,18,v) +#define GET16SemaHub_empty_ST_18i(r16) _BFGET_(r16, 2, 2) +#define SET16SemaHub_empty_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + +#define GET32SemaHub_empty_ST_19i(r32) _BFGET_(r32,19,19) +#define SET32SemaHub_empty_ST_19i(r32,v) _BFSET_(r32,19,19,v) +#define GET16SemaHub_empty_ST_19i(r16) _BFGET_(r16, 3, 3) +#define SET16SemaHub_empty_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + +#define GET32SemaHub_empty_ST_20i(r32) _BFGET_(r32,20,20) +#define SET32SemaHub_empty_ST_20i(r32,v) _BFSET_(r32,20,20,v) +#define GET16SemaHub_empty_ST_20i(r16) _BFGET_(r16, 4, 4) +#define SET16SemaHub_empty_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + +#define GET32SemaHub_empty_ST_21i(r32) _BFGET_(r32,21,21) +#define SET32SemaHub_empty_ST_21i(r32,v) _BFSET_(r32,21,21,v) +#define GET16SemaHub_empty_ST_21i(r16) _BFGET_(r16, 5, 5) +#define SET16SemaHub_empty_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + +#define GET32SemaHub_empty_ST_22i(r32) _BFGET_(r32,22,22) +#define SET32SemaHub_empty_ST_22i(r32,v) _BFSET_(r32,22,22,v) +#define GET16SemaHub_empty_ST_22i(r16) _BFGET_(r16, 6, 6) +#define SET16SemaHub_empty_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + +#define GET32SemaHub_empty_ST_23i(r32) _BFGET_(r32,23,23) +#define SET32SemaHub_empty_ST_23i(r32,v) _BFSET_(r32,23,23,v) +#define GET16SemaHub_empty_ST_23i(r16) _BFGET_(r16, 7, 7) +#define SET16SemaHub_empty_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + +#define GET32SemaHub_empty_ST_24i(r32) _BFGET_(r32,24,24) +#define SET32SemaHub_empty_ST_24i(r32,v) _BFSET_(r32,24,24,v) +#define GET16SemaHub_empty_ST_24i(r16) _BFGET_(r16, 8, 8) +#define SET16SemaHub_empty_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + +#define GET32SemaHub_empty_ST_25i(r32) _BFGET_(r32,25,25) +#define SET32SemaHub_empty_ST_25i(r32,v) _BFSET_(r32,25,25,v) +#define GET16SemaHub_empty_ST_25i(r16) _BFGET_(r16, 9, 9) +#define SET16SemaHub_empty_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + +#define GET32SemaHub_empty_ST_26i(r32) _BFGET_(r32,26,26) +#define SET32SemaHub_empty_ST_26i(r32,v) _BFSET_(r32,26,26,v) +#define GET16SemaHub_empty_ST_26i(r16) _BFGET_(r16,10,10) +#define SET16SemaHub_empty_ST_26i(r16,v) _BFSET_(r16,10,10,v) + +#define GET32SemaHub_empty_ST_27i(r32) _BFGET_(r32,27,27) +#define SET32SemaHub_empty_ST_27i(r32,v) _BFSET_(r32,27,27,v) +#define GET16SemaHub_empty_ST_27i(r16) _BFGET_(r16,11,11) +#define SET16SemaHub_empty_ST_27i(r16,v) _BFSET_(r16,11,11,v) + +#define GET32SemaHub_empty_ST_28i(r32) _BFGET_(r32,28,28) +#define SET32SemaHub_empty_ST_28i(r32,v) _BFSET_(r32,28,28,v) +#define GET16SemaHub_empty_ST_28i(r16) _BFGET_(r16,12,12) +#define SET16SemaHub_empty_ST_28i(r16,v) _BFSET_(r16,12,12,v) + +#define GET32SemaHub_empty_ST_29i(r32) _BFGET_(r32,29,29) +#define SET32SemaHub_empty_ST_29i(r32,v) _BFSET_(r32,29,29,v) +#define GET16SemaHub_empty_ST_29i(r16) _BFGET_(r16,13,13) +#define SET16SemaHub_empty_ST_29i(r16,v) _BFSET_(r16,13,13,v) + +#define GET32SemaHub_empty_ST_30i(r32) _BFGET_(r32,30,30) +#define SET32SemaHub_empty_ST_30i(r32,v) _BFSET_(r32,30,30,v) +#define GET16SemaHub_empty_ST_30i(r16) _BFGET_(r16,14,14) +#define SET16SemaHub_empty_ST_30i(r16,v) _BFSET_(r16,14,14,v) + +#define GET32SemaHub_empty_ST_31i(r32) _BFGET_(r32,31,31) +#define SET32SemaHub_empty_ST_31i(r32,v) _BFSET_(r32,31,31,v) +#define GET16SemaHub_empty_ST_31i(r16) _BFGET_(r16,15,15) +#define SET16SemaHub_empty_ST_31i(r16,v) _BFSET_(r16,15,15,v) + +#define w32SemaHub_empty {\ + UNSG32 uempty_ST_0i : 1;\ + UNSG32 uempty_ST_1i : 1;\ + UNSG32 uempty_ST_2i : 1;\ + UNSG32 uempty_ST_3i : 1;\ + UNSG32 uempty_ST_4i : 1;\ + UNSG32 uempty_ST_5i : 1;\ + UNSG32 uempty_ST_6i : 1;\ + UNSG32 uempty_ST_7i : 1;\ + UNSG32 uempty_ST_8i : 1;\ + UNSG32 uempty_ST_9i : 1;\ + UNSG32 uempty_ST_10i : 1;\ + UNSG32 uempty_ST_11i : 1;\ + UNSG32 uempty_ST_12i : 1;\ + UNSG32 uempty_ST_13i : 1;\ + UNSG32 uempty_ST_14i : 1;\ + UNSG32 uempty_ST_15i : 1;\ + UNSG32 uempty_ST_16i : 1;\ + UNSG32 uempty_ST_17i : 1;\ + UNSG32 uempty_ST_18i : 1;\ + UNSG32 uempty_ST_19i : 1;\ + UNSG32 uempty_ST_20i : 1;\ + UNSG32 uempty_ST_21i : 1;\ + UNSG32 uempty_ST_22i : 1;\ + UNSG32 uempty_ST_23i : 1;\ + UNSG32 uempty_ST_24i : 1;\ + UNSG32 uempty_ST_25i : 1;\ + UNSG32 uempty_ST_26i : 1;\ + UNSG32 uempty_ST_27i : 1;\ + UNSG32 uempty_ST_28i : 1;\ + UNSG32 uempty_ST_29i : 1;\ + UNSG32 uempty_ST_30i : 1;\ + UNSG32 uempty_ST_31i : 1;\ + } +union { UNSG32 u32SemaHub_empty; + struct w32SemaHub_empty; + }; +/////////////////////////////////////////////////////////// +#define GET32SemaHub_full_ST_0i(r32) _BFGET_(r32, 0, 0) +#define SET32SemaHub_full_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) +#define GET16SemaHub_full_ST_0i(r16) _BFGET_(r16, 0, 0) +#define SET16SemaHub_full_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + +#define GET32SemaHub_full_ST_1i(r32) _BFGET_(r32, 1, 1) +#define SET32SemaHub_full_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) +#define GET16SemaHub_full_ST_1i(r16) _BFGET_(r16, 1, 1) +#define SET16SemaHub_full_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + +#define GET32SemaHub_full_ST_2i(r32) _BFGET_(r32, 2, 2) +#define SET32SemaHub_full_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) +#define GET16SemaHub_full_ST_2i(r16) _BFGET_(r16, 2, 2) +#define SET16SemaHub_full_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + +#define GET32SemaHub_full_ST_3i(r32) _BFGET_(r32, 3, 3) +#define SET32SemaHub_full_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) +#define GET16SemaHub_full_ST_3i(r16) _BFGET_(r16, 3, 3) +#define SET16SemaHub_full_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + +#define GET32SemaHub_full_ST_4i(r32) _BFGET_(r32, 4, 4) +#define SET32SemaHub_full_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) +#define GET16SemaHub_full_ST_4i(r16) _BFGET_(r16, 4, 4) +#define SET16SemaHub_full_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + +#define GET32SemaHub_full_ST_5i(r32) _BFGET_(r32, 5, 5) +#define SET32SemaHub_full_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) +#define GET16SemaHub_full_ST_5i(r16) _BFGET_(r16, 5, 5) +#define SET16SemaHub_full_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + +#define GET32SemaHub_full_ST_6i(r32) _BFGET_(r32, 6, 6) +#define SET32SemaHub_full_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) +#define GET16SemaHub_full_ST_6i(r16) _BFGET_(r16, 6, 6) +#define SET16SemaHub_full_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + +#define GET32SemaHub_full_ST_7i(r32) _BFGET_(r32, 7, 7) +#define SET32SemaHub_full_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) +#define GET16SemaHub_full_ST_7i(r16) _BFGET_(r16, 7, 7) +#define SET16SemaHub_full_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + +#define GET32SemaHub_full_ST_8i(r32) _BFGET_(r32, 8, 8) +#define SET32SemaHub_full_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) +#define GET16SemaHub_full_ST_8i(r16) _BFGET_(r16, 8, 8) +#define SET16SemaHub_full_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + +#define GET32SemaHub_full_ST_9i(r32) _BFGET_(r32, 9, 9) +#define SET32SemaHub_full_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) +#define GET16SemaHub_full_ST_9i(r16) _BFGET_(r16, 9, 9) +#define SET16SemaHub_full_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + +#define GET32SemaHub_full_ST_10i(r32) _BFGET_(r32,10,10) +#define SET32SemaHub_full_ST_10i(r32,v) _BFSET_(r32,10,10,v) +#define GET16SemaHub_full_ST_10i(r16) _BFGET_(r16,10,10) +#define SET16SemaHub_full_ST_10i(r16,v) _BFSET_(r16,10,10,v) + +#define GET32SemaHub_full_ST_11i(r32) _BFGET_(r32,11,11) +#define SET32SemaHub_full_ST_11i(r32,v) _BFSET_(r32,11,11,v) +#define GET16SemaHub_full_ST_11i(r16) _BFGET_(r16,11,11) +#define SET16SemaHub_full_ST_11i(r16,v) _BFSET_(r16,11,11,v) + +#define GET32SemaHub_full_ST_12i(r32) _BFGET_(r32,12,12) +#define SET32SemaHub_full_ST_12i(r32,v) _BFSET_(r32,12,12,v) +#define GET16SemaHub_full_ST_12i(r16) _BFGET_(r16,12,12) +#define SET16SemaHub_full_ST_12i(r16,v) _BFSET_(r16,12,12,v) + +#define GET32SemaHub_full_ST_13i(r32) _BFGET_(r32,13,13) +#define SET32SemaHub_full_ST_13i(r32,v) _BFSET_(r32,13,13,v) +#define GET16SemaHub_full_ST_13i(r16) _BFGET_(r16,13,13) +#define SET16SemaHub_full_ST_13i(r16,v) _BFSET_(r16,13,13,v) + +#define GET32SemaHub_full_ST_14i(r32) _BFGET_(r32,14,14) +#define SET32SemaHub_full_ST_14i(r32,v) _BFSET_(r32,14,14,v) +#define GET16SemaHub_full_ST_14i(r16) _BFGET_(r16,14,14) +#define SET16SemaHub_full_ST_14i(r16,v) _BFSET_(r16,14,14,v) + +#define GET32SemaHub_full_ST_15i(r32) _BFGET_(r32,15,15) +#define SET32SemaHub_full_ST_15i(r32,v) _BFSET_(r32,15,15,v) +#define GET16SemaHub_full_ST_15i(r16) _BFGET_(r16,15,15) +#define SET16SemaHub_full_ST_15i(r16,v) _BFSET_(r16,15,15,v) + +#define GET32SemaHub_full_ST_16i(r32) _BFGET_(r32,16,16) +#define SET32SemaHub_full_ST_16i(r32,v) _BFSET_(r32,16,16,v) +#define GET16SemaHub_full_ST_16i(r16) _BFGET_(r16, 0, 0) +#define SET16SemaHub_full_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + +#define GET32SemaHub_full_ST_17i(r32) _BFGET_(r32,17,17) +#define SET32SemaHub_full_ST_17i(r32,v) _BFSET_(r32,17,17,v) +#define GET16SemaHub_full_ST_17i(r16) _BFGET_(r16, 1, 1) +#define SET16SemaHub_full_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + +#define GET32SemaHub_full_ST_18i(r32) _BFGET_(r32,18,18) +#define SET32SemaHub_full_ST_18i(r32,v) _BFSET_(r32,18,18,v) +#define GET16SemaHub_full_ST_18i(r16) _BFGET_(r16, 2, 2) +#define SET16SemaHub_full_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + +#define GET32SemaHub_full_ST_19i(r32) _BFGET_(r32,19,19) +#define SET32SemaHub_full_ST_19i(r32,v) _BFSET_(r32,19,19,v) +#define GET16SemaHub_full_ST_19i(r16) _BFGET_(r16, 3, 3) +#define SET16SemaHub_full_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + +#define GET32SemaHub_full_ST_20i(r32) _BFGET_(r32,20,20) +#define SET32SemaHub_full_ST_20i(r32,v) _BFSET_(r32,20,20,v) +#define GET16SemaHub_full_ST_20i(r16) _BFGET_(r16, 4, 4) +#define SET16SemaHub_full_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + +#define GET32SemaHub_full_ST_21i(r32) _BFGET_(r32,21,21) +#define SET32SemaHub_full_ST_21i(r32,v) _BFSET_(r32,21,21,v) +#define GET16SemaHub_full_ST_21i(r16) _BFGET_(r16, 5, 5) +#define SET16SemaHub_full_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + +#define GET32SemaHub_full_ST_22i(r32) _BFGET_(r32,22,22) +#define SET32SemaHub_full_ST_22i(r32,v) _BFSET_(r32,22,22,v) +#define GET16SemaHub_full_ST_22i(r16) _BFGET_(r16, 6, 6) +#define SET16SemaHub_full_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + +#define GET32SemaHub_full_ST_23i(r32) _BFGET_(r32,23,23) +#define SET32SemaHub_full_ST_23i(r32,v) _BFSET_(r32,23,23,v) +#define GET16SemaHub_full_ST_23i(r16) _BFGET_(r16, 7, 7) +#define SET16SemaHub_full_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + +#define GET32SemaHub_full_ST_24i(r32) _BFGET_(r32,24,24) +#define SET32SemaHub_full_ST_24i(r32,v) _BFSET_(r32,24,24,v) +#define GET16SemaHub_full_ST_24i(r16) _BFGET_(r16, 8, 8) +#define SET16SemaHub_full_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + +#define GET32SemaHub_full_ST_25i(r32) _BFGET_(r32,25,25) +#define SET32SemaHub_full_ST_25i(r32,v) _BFSET_(r32,25,25,v) +#define GET16SemaHub_full_ST_25i(r16) _BFGET_(r16, 9, 9) +#define SET16SemaHub_full_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + +#define GET32SemaHub_full_ST_26i(r32) _BFGET_(r32,26,26) +#define SET32SemaHub_full_ST_26i(r32,v) _BFSET_(r32,26,26,v) +#define GET16SemaHub_full_ST_26i(r16) _BFGET_(r16,10,10) +#define SET16SemaHub_full_ST_26i(r16,v) _BFSET_(r16,10,10,v) + +#define GET32SemaHub_full_ST_27i(r32) _BFGET_(r32,27,27) +#define SET32SemaHub_full_ST_27i(r32,v) _BFSET_(r32,27,27,v) +#define GET16SemaHub_full_ST_27i(r16) _BFGET_(r16,11,11) +#define SET16SemaHub_full_ST_27i(r16,v) _BFSET_(r16,11,11,v) + +#define GET32SemaHub_full_ST_28i(r32) _BFGET_(r32,28,28) +#define SET32SemaHub_full_ST_28i(r32,v) _BFSET_(r32,28,28,v) +#define GET16SemaHub_full_ST_28i(r16) _BFGET_(r16,12,12) +#define SET16SemaHub_full_ST_28i(r16,v) _BFSET_(r16,12,12,v) + +#define GET32SemaHub_full_ST_29i(r32) _BFGET_(r32,29,29) +#define SET32SemaHub_full_ST_29i(r32,v) _BFSET_(r32,29,29,v) +#define GET16SemaHub_full_ST_29i(r16) _BFGET_(r16,13,13) +#define SET16SemaHub_full_ST_29i(r16,v) _BFSET_(r16,13,13,v) + +#define GET32SemaHub_full_ST_30i(r32) _BFGET_(r32,30,30) +#define SET32SemaHub_full_ST_30i(r32,v) _BFSET_(r32,30,30,v) +#define GET16SemaHub_full_ST_30i(r16) _BFGET_(r16,14,14) +#define SET16SemaHub_full_ST_30i(r16,v) _BFSET_(r16,14,14,v) + +#define GET32SemaHub_full_ST_31i(r32) _BFGET_(r32,31,31) +#define SET32SemaHub_full_ST_31i(r32,v) _BFSET_(r32,31,31,v) +#define GET16SemaHub_full_ST_31i(r16) _BFGET_(r16,15,15) +#define SET16SemaHub_full_ST_31i(r16,v) _BFSET_(r16,15,15,v) + +#define w32SemaHub_full {\ + UNSG32 ufull_ST_0i : 1;\ + UNSG32 ufull_ST_1i : 1;\ + UNSG32 ufull_ST_2i : 1;\ + UNSG32 ufull_ST_3i : 1;\ + UNSG32 ufull_ST_4i : 1;\ + UNSG32 ufull_ST_5i : 1;\ + UNSG32 ufull_ST_6i : 1;\ + UNSG32 ufull_ST_7i : 1;\ + UNSG32 ufull_ST_8i : 1;\ + UNSG32 ufull_ST_9i : 1;\ + UNSG32 ufull_ST_10i : 1;\ + UNSG32 ufull_ST_11i : 1;\ + UNSG32 ufull_ST_12i : 1;\ + UNSG32 ufull_ST_13i : 1;\ + UNSG32 ufull_ST_14i : 1;\ + UNSG32 ufull_ST_15i : 1;\ + UNSG32 ufull_ST_16i : 1;\ + UNSG32 ufull_ST_17i : 1;\ + UNSG32 ufull_ST_18i : 1;\ + UNSG32 ufull_ST_19i : 1;\ + UNSG32 ufull_ST_20i : 1;\ + UNSG32 ufull_ST_21i : 1;\ + UNSG32 ufull_ST_22i : 1;\ + UNSG32 ufull_ST_23i : 1;\ + UNSG32 ufull_ST_24i : 1;\ + UNSG32 ufull_ST_25i : 1;\ + UNSG32 ufull_ST_26i : 1;\ + UNSG32 ufull_ST_27i : 1;\ + UNSG32 ufull_ST_28i : 1;\ + UNSG32 ufull_ST_29i : 1;\ + UNSG32 ufull_ST_30i : 1;\ + UNSG32 ufull_ST_31i : 1;\ + } +union { UNSG32 u32SemaHub_full; + struct w32SemaHub_full; + }; +/////////////////////////////////////////////////////////// +#define GET32SemaHub_almostEmpty_ST_0i(r32) _BFGET_(r32, 0, 0) +#define SET32SemaHub_almostEmpty_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) +#define GET16SemaHub_almostEmpty_ST_0i(r16) _BFGET_(r16, 0, 0) +#define SET16SemaHub_almostEmpty_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + +#define GET32SemaHub_almostEmpty_ST_1i(r32) _BFGET_(r32, 1, 1) +#define SET32SemaHub_almostEmpty_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) +#define GET16SemaHub_almostEmpty_ST_1i(r16) _BFGET_(r16, 1, 1) +#define SET16SemaHub_almostEmpty_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + +#define GET32SemaHub_almostEmpty_ST_2i(r32) _BFGET_(r32, 2, 2) +#define SET32SemaHub_almostEmpty_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) +#define GET16SemaHub_almostEmpty_ST_2i(r16) _BFGET_(r16, 2, 2) +#define SET16SemaHub_almostEmpty_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + +#define GET32SemaHub_almostEmpty_ST_3i(r32) _BFGET_(r32, 3, 3) +#define SET32SemaHub_almostEmpty_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) +#define GET16SemaHub_almostEmpty_ST_3i(r16) _BFGET_(r16, 3, 3) +#define SET16SemaHub_almostEmpty_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + +#define GET32SemaHub_almostEmpty_ST_4i(r32) _BFGET_(r32, 4, 4) +#define SET32SemaHub_almostEmpty_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) +#define GET16SemaHub_almostEmpty_ST_4i(r16) _BFGET_(r16, 4, 4) +#define SET16SemaHub_almostEmpty_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + +#define GET32SemaHub_almostEmpty_ST_5i(r32) _BFGET_(r32, 5, 5) +#define SET32SemaHub_almostEmpty_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) +#define GET16SemaHub_almostEmpty_ST_5i(r16) _BFGET_(r16, 5, 5) +#define SET16SemaHub_almostEmpty_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + +#define GET32SemaHub_almostEmpty_ST_6i(r32) _BFGET_(r32, 6, 6) +#define SET32SemaHub_almostEmpty_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) +#define GET16SemaHub_almostEmpty_ST_6i(r16) _BFGET_(r16, 6, 6) +#define SET16SemaHub_almostEmpty_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + +#define GET32SemaHub_almostEmpty_ST_7i(r32) _BFGET_(r32, 7, 7) +#define SET32SemaHub_almostEmpty_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) +#define GET16SemaHub_almostEmpty_ST_7i(r16) _BFGET_(r16, 7, 7) +#define SET16SemaHub_almostEmpty_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + +#define GET32SemaHub_almostEmpty_ST_8i(r32) _BFGET_(r32, 8, 8) +#define SET32SemaHub_almostEmpty_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) +#define GET16SemaHub_almostEmpty_ST_8i(r16) _BFGET_(r16, 8, 8) +#define SET16SemaHub_almostEmpty_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + +#define GET32SemaHub_almostEmpty_ST_9i(r32) _BFGET_(r32, 9, 9) +#define SET32SemaHub_almostEmpty_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) +#define GET16SemaHub_almostEmpty_ST_9i(r16) _BFGET_(r16, 9, 9) +#define SET16SemaHub_almostEmpty_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + +#define GET32SemaHub_almostEmpty_ST_10i(r32) _BFGET_(r32,10,10) +#define SET32SemaHub_almostEmpty_ST_10i(r32,v) _BFSET_(r32,10,10,v) +#define GET16SemaHub_almostEmpty_ST_10i(r16) _BFGET_(r16,10,10) +#define SET16SemaHub_almostEmpty_ST_10i(r16,v) _BFSET_(r16,10,10,v) + +#define GET32SemaHub_almostEmpty_ST_11i(r32) _BFGET_(r32,11,11) +#define SET32SemaHub_almostEmpty_ST_11i(r32,v) _BFSET_(r32,11,11,v) +#define GET16SemaHub_almostEmpty_ST_11i(r16) _BFGET_(r16,11,11) +#define SET16SemaHub_almostEmpty_ST_11i(r16,v) _BFSET_(r16,11,11,v) + +#define GET32SemaHub_almostEmpty_ST_12i(r32) _BFGET_(r32,12,12) +#define SET32SemaHub_almostEmpty_ST_12i(r32,v) _BFSET_(r32,12,12,v) +#define GET16SemaHub_almostEmpty_ST_12i(r16) _BFGET_(r16,12,12) +#define SET16SemaHub_almostEmpty_ST_12i(r16,v) _BFSET_(r16,12,12,v) + +#define GET32SemaHub_almostEmpty_ST_13i(r32) _BFGET_(r32,13,13) +#define SET32SemaHub_almostEmpty_ST_13i(r32,v) _BFSET_(r32,13,13,v) +#define GET16SemaHub_almostEmpty_ST_13i(r16) _BFGET_(r16,13,13) +#define SET16SemaHub_almostEmpty_ST_13i(r16,v) _BFSET_(r16,13,13,v) + +#define GET32SemaHub_almostEmpty_ST_14i(r32) _BFGET_(r32,14,14) +#define SET32SemaHub_almostEmpty_ST_14i(r32,v) _BFSET_(r32,14,14,v) +#define GET16SemaHub_almostEmpty_ST_14i(r16) _BFGET_(r16,14,14) +#define SET16SemaHub_almostEmpty_ST_14i(r16,v) _BFSET_(r16,14,14,v) + +#define GET32SemaHub_almostEmpty_ST_15i(r32) _BFGET_(r32,15,15) +#define SET32SemaHub_almostEmpty_ST_15i(r32,v) _BFSET_(r32,15,15,v) +#define GET16SemaHub_almostEmpty_ST_15i(r16) _BFGET_(r16,15,15) +#define SET16SemaHub_almostEmpty_ST_15i(r16,v) _BFSET_(r16,15,15,v) + +#define GET32SemaHub_almostEmpty_ST_16i(r32) _BFGET_(r32,16,16) +#define SET32SemaHub_almostEmpty_ST_16i(r32,v) _BFSET_(r32,16,16,v) +#define GET16SemaHub_almostEmpty_ST_16i(r16) _BFGET_(r16, 0, 0) +#define SET16SemaHub_almostEmpty_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + +#define GET32SemaHub_almostEmpty_ST_17i(r32) _BFGET_(r32,17,17) +#define SET32SemaHub_almostEmpty_ST_17i(r32,v) _BFSET_(r32,17,17,v) +#define GET16SemaHub_almostEmpty_ST_17i(r16) _BFGET_(r16, 1, 1) +#define SET16SemaHub_almostEmpty_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + +#define GET32SemaHub_almostEmpty_ST_18i(r32) _BFGET_(r32,18,18) +#define SET32SemaHub_almostEmpty_ST_18i(r32,v) _BFSET_(r32,18,18,v) +#define GET16SemaHub_almostEmpty_ST_18i(r16) _BFGET_(r16, 2, 2) +#define SET16SemaHub_almostEmpty_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + +#define GET32SemaHub_almostEmpty_ST_19i(r32) _BFGET_(r32,19,19) +#define SET32SemaHub_almostEmpty_ST_19i(r32,v) _BFSET_(r32,19,19,v) +#define GET16SemaHub_almostEmpty_ST_19i(r16) _BFGET_(r16, 3, 3) +#define SET16SemaHub_almostEmpty_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + +#define GET32SemaHub_almostEmpty_ST_20i(r32) _BFGET_(r32,20,20) +#define SET32SemaHub_almostEmpty_ST_20i(r32,v) _BFSET_(r32,20,20,v) +#define GET16SemaHub_almostEmpty_ST_20i(r16) _BFGET_(r16, 4, 4) +#define SET16SemaHub_almostEmpty_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + +#define GET32SemaHub_almostEmpty_ST_21i(r32) _BFGET_(r32,21,21) +#define SET32SemaHub_almostEmpty_ST_21i(r32,v) _BFSET_(r32,21,21,v) +#define GET16SemaHub_almostEmpty_ST_21i(r16) _BFGET_(r16, 5, 5) +#define SET16SemaHub_almostEmpty_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + +#define GET32SemaHub_almostEmpty_ST_22i(r32) _BFGET_(r32,22,22) +#define SET32SemaHub_almostEmpty_ST_22i(r32,v) _BFSET_(r32,22,22,v) +#define GET16SemaHub_almostEmpty_ST_22i(r16) _BFGET_(r16, 6, 6) +#define SET16SemaHub_almostEmpty_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + +#define GET32SemaHub_almostEmpty_ST_23i(r32) _BFGET_(r32,23,23) +#define SET32SemaHub_almostEmpty_ST_23i(r32,v) _BFSET_(r32,23,23,v) +#define GET16SemaHub_almostEmpty_ST_23i(r16) _BFGET_(r16, 7, 7) +#define SET16SemaHub_almostEmpty_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + +#define GET32SemaHub_almostEmpty_ST_24i(r32) _BFGET_(r32,24,24) +#define SET32SemaHub_almostEmpty_ST_24i(r32,v) _BFSET_(r32,24,24,v) +#define GET16SemaHub_almostEmpty_ST_24i(r16) _BFGET_(r16, 8, 8) +#define SET16SemaHub_almostEmpty_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + +#define GET32SemaHub_almostEmpty_ST_25i(r32) _BFGET_(r32,25,25) +#define SET32SemaHub_almostEmpty_ST_25i(r32,v) _BFSET_(r32,25,25,v) +#define GET16SemaHub_almostEmpty_ST_25i(r16) _BFGET_(r16, 9, 9) +#define SET16SemaHub_almostEmpty_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + +#define GET32SemaHub_almostEmpty_ST_26i(r32) _BFGET_(r32,26,26) +#define SET32SemaHub_almostEmpty_ST_26i(r32,v) _BFSET_(r32,26,26,v) +#define GET16SemaHub_almostEmpty_ST_26i(r16) _BFGET_(r16,10,10) +#define SET16SemaHub_almostEmpty_ST_26i(r16,v) _BFSET_(r16,10,10,v) + +#define GET32SemaHub_almostEmpty_ST_27i(r32) _BFGET_(r32,27,27) +#define SET32SemaHub_almostEmpty_ST_27i(r32,v) _BFSET_(r32,27,27,v) +#define GET16SemaHub_almostEmpty_ST_27i(r16) _BFGET_(r16,11,11) +#define SET16SemaHub_almostEmpty_ST_27i(r16,v) _BFSET_(r16,11,11,v) + +#define GET32SemaHub_almostEmpty_ST_28i(r32) _BFGET_(r32,28,28) +#define SET32SemaHub_almostEmpty_ST_28i(r32,v) _BFSET_(r32,28,28,v) +#define GET16SemaHub_almostEmpty_ST_28i(r16) _BFGET_(r16,12,12) +#define SET16SemaHub_almostEmpty_ST_28i(r16,v) _BFSET_(r16,12,12,v) + +#define GET32SemaHub_almostEmpty_ST_29i(r32) _BFGET_(r32,29,29) +#define SET32SemaHub_almostEmpty_ST_29i(r32,v) _BFSET_(r32,29,29,v) +#define GET16SemaHub_almostEmpty_ST_29i(r16) _BFGET_(r16,13,13) +#define SET16SemaHub_almostEmpty_ST_29i(r16,v) _BFSET_(r16,13,13,v) + +#define GET32SemaHub_almostEmpty_ST_30i(r32) _BFGET_(r32,30,30) +#define SET32SemaHub_almostEmpty_ST_30i(r32,v) _BFSET_(r32,30,30,v) +#define GET16SemaHub_almostEmpty_ST_30i(r16) _BFGET_(r16,14,14) +#define SET16SemaHub_almostEmpty_ST_30i(r16,v) _BFSET_(r16,14,14,v) + +#define GET32SemaHub_almostEmpty_ST_31i(r32) _BFGET_(r32,31,31) +#define SET32SemaHub_almostEmpty_ST_31i(r32,v) _BFSET_(r32,31,31,v) +#define GET16SemaHub_almostEmpty_ST_31i(r16) _BFGET_(r16,15,15) +#define SET16SemaHub_almostEmpty_ST_31i(r16,v) _BFSET_(r16,15,15,v) + +#define w32SemaHub_almostEmpty {\ + UNSG32 ualmostEmpty_ST_0i : 1;\ + UNSG32 ualmostEmpty_ST_1i : 1;\ + UNSG32 ualmostEmpty_ST_2i : 1;\ + UNSG32 ualmostEmpty_ST_3i : 1;\ + UNSG32 ualmostEmpty_ST_4i : 1;\ + UNSG32 ualmostEmpty_ST_5i : 1;\ + UNSG32 ualmostEmpty_ST_6i : 1;\ + UNSG32 ualmostEmpty_ST_7i : 1;\ + UNSG32 ualmostEmpty_ST_8i : 1;\ + UNSG32 ualmostEmpty_ST_9i : 1;\ + UNSG32 ualmostEmpty_ST_10i : 1;\ + UNSG32 ualmostEmpty_ST_11i : 1;\ + UNSG32 ualmostEmpty_ST_12i : 1;\ + UNSG32 ualmostEmpty_ST_13i : 1;\ + UNSG32 ualmostEmpty_ST_14i : 1;\ + UNSG32 ualmostEmpty_ST_15i : 1;\ + UNSG32 ualmostEmpty_ST_16i : 1;\ + UNSG32 ualmostEmpty_ST_17i : 1;\ + UNSG32 ualmostEmpty_ST_18i : 1;\ + UNSG32 ualmostEmpty_ST_19i : 1;\ + UNSG32 ualmostEmpty_ST_20i : 1;\ + UNSG32 ualmostEmpty_ST_21i : 1;\ + UNSG32 ualmostEmpty_ST_22i : 1;\ + UNSG32 ualmostEmpty_ST_23i : 1;\ + UNSG32 ualmostEmpty_ST_24i : 1;\ + UNSG32 ualmostEmpty_ST_25i : 1;\ + UNSG32 ualmostEmpty_ST_26i : 1;\ + UNSG32 ualmostEmpty_ST_27i : 1;\ + UNSG32 ualmostEmpty_ST_28i : 1;\ + UNSG32 ualmostEmpty_ST_29i : 1;\ + UNSG32 ualmostEmpty_ST_30i : 1;\ + UNSG32 ualmostEmpty_ST_31i : 1;\ + } +union { UNSG32 u32SemaHub_almostEmpty; + struct w32SemaHub_almostEmpty; + }; +/////////////////////////////////////////////////////////// +#define GET32SemaHub_almostFull_ST_0i(r32) _BFGET_(r32, 0, 0) +#define SET32SemaHub_almostFull_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) +#define GET16SemaHub_almostFull_ST_0i(r16) _BFGET_(r16, 0, 0) +#define SET16SemaHub_almostFull_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + +#define GET32SemaHub_almostFull_ST_1i(r32) _BFGET_(r32, 1, 1) +#define SET32SemaHub_almostFull_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) +#define GET16SemaHub_almostFull_ST_1i(r16) _BFGET_(r16, 1, 1) +#define SET16SemaHub_almostFull_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + +#define GET32SemaHub_almostFull_ST_2i(r32) _BFGET_(r32, 2, 2) +#define SET32SemaHub_almostFull_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) +#define GET16SemaHub_almostFull_ST_2i(r16) _BFGET_(r16, 2, 2) +#define SET16SemaHub_almostFull_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + +#define GET32SemaHub_almostFull_ST_3i(r32) _BFGET_(r32, 3, 3) +#define SET32SemaHub_almostFull_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) +#define GET16SemaHub_almostFull_ST_3i(r16) _BFGET_(r16, 3, 3) +#define SET16SemaHub_almostFull_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + +#define GET32SemaHub_almostFull_ST_4i(r32) _BFGET_(r32, 4, 4) +#define SET32SemaHub_almostFull_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) +#define GET16SemaHub_almostFull_ST_4i(r16) _BFGET_(r16, 4, 4) +#define SET16SemaHub_almostFull_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + +#define GET32SemaHub_almostFull_ST_5i(r32) _BFGET_(r32, 5, 5) +#define SET32SemaHub_almostFull_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) +#define GET16SemaHub_almostFull_ST_5i(r16) _BFGET_(r16, 5, 5) +#define SET16SemaHub_almostFull_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + +#define GET32SemaHub_almostFull_ST_6i(r32) _BFGET_(r32, 6, 6) +#define SET32SemaHub_almostFull_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) +#define GET16SemaHub_almostFull_ST_6i(r16) _BFGET_(r16, 6, 6) +#define SET16SemaHub_almostFull_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + +#define GET32SemaHub_almostFull_ST_7i(r32) _BFGET_(r32, 7, 7) +#define SET32SemaHub_almostFull_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) +#define GET16SemaHub_almostFull_ST_7i(r16) _BFGET_(r16, 7, 7) +#define SET16SemaHub_almostFull_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + +#define GET32SemaHub_almostFull_ST_8i(r32) _BFGET_(r32, 8, 8) +#define SET32SemaHub_almostFull_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) +#define GET16SemaHub_almostFull_ST_8i(r16) _BFGET_(r16, 8, 8) +#define SET16SemaHub_almostFull_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + +#define GET32SemaHub_almostFull_ST_9i(r32) _BFGET_(r32, 9, 9) +#define SET32SemaHub_almostFull_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) +#define GET16SemaHub_almostFull_ST_9i(r16) _BFGET_(r16, 9, 9) +#define SET16SemaHub_almostFull_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + +#define GET32SemaHub_almostFull_ST_10i(r32) _BFGET_(r32,10,10) +#define SET32SemaHub_almostFull_ST_10i(r32,v) _BFSET_(r32,10,10,v) +#define GET16SemaHub_almostFull_ST_10i(r16) _BFGET_(r16,10,10) +#define SET16SemaHub_almostFull_ST_10i(r16,v) _BFSET_(r16,10,10,v) + +#define GET32SemaHub_almostFull_ST_11i(r32) _BFGET_(r32,11,11) +#define SET32SemaHub_almostFull_ST_11i(r32,v) _BFSET_(r32,11,11,v) +#define GET16SemaHub_almostFull_ST_11i(r16) _BFGET_(r16,11,11) +#define SET16SemaHub_almostFull_ST_11i(r16,v) _BFSET_(r16,11,11,v) + +#define GET32SemaHub_almostFull_ST_12i(r32) _BFGET_(r32,12,12) +#define SET32SemaHub_almostFull_ST_12i(r32,v) _BFSET_(r32,12,12,v) +#define GET16SemaHub_almostFull_ST_12i(r16) _BFGET_(r16,12,12) +#define SET16SemaHub_almostFull_ST_12i(r16,v) _BFSET_(r16,12,12,v) + +#define GET32SemaHub_almostFull_ST_13i(r32) _BFGET_(r32,13,13) +#define SET32SemaHub_almostFull_ST_13i(r32,v) _BFSET_(r32,13,13,v) +#define GET16SemaHub_almostFull_ST_13i(r16) _BFGET_(r16,13,13) +#define SET16SemaHub_almostFull_ST_13i(r16,v) _BFSET_(r16,13,13,v) + +#define GET32SemaHub_almostFull_ST_14i(r32) _BFGET_(r32,14,14) +#define SET32SemaHub_almostFull_ST_14i(r32,v) _BFSET_(r32,14,14,v) +#define GET16SemaHub_almostFull_ST_14i(r16) _BFGET_(r16,14,14) +#define SET16SemaHub_almostFull_ST_14i(r16,v) _BFSET_(r16,14,14,v) + +#define GET32SemaHub_almostFull_ST_15i(r32) _BFGET_(r32,15,15) +#define SET32SemaHub_almostFull_ST_15i(r32,v) _BFSET_(r32,15,15,v) +#define GET16SemaHub_almostFull_ST_15i(r16) _BFGET_(r16,15,15) +#define SET16SemaHub_almostFull_ST_15i(r16,v) _BFSET_(r16,15,15,v) + +#define GET32SemaHub_almostFull_ST_16i(r32) _BFGET_(r32,16,16) +#define SET32SemaHub_almostFull_ST_16i(r32,v) _BFSET_(r32,16,16,v) +#define GET16SemaHub_almostFull_ST_16i(r16) _BFGET_(r16, 0, 0) +#define SET16SemaHub_almostFull_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + +#define GET32SemaHub_almostFull_ST_17i(r32) _BFGET_(r32,17,17) +#define SET32SemaHub_almostFull_ST_17i(r32,v) _BFSET_(r32,17,17,v) +#define GET16SemaHub_almostFull_ST_17i(r16) _BFGET_(r16, 1, 1) +#define SET16SemaHub_almostFull_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + +#define GET32SemaHub_almostFull_ST_18i(r32) _BFGET_(r32,18,18) +#define SET32SemaHub_almostFull_ST_18i(r32,v) _BFSET_(r32,18,18,v) +#define GET16SemaHub_almostFull_ST_18i(r16) _BFGET_(r16, 2, 2) +#define SET16SemaHub_almostFull_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + +#define GET32SemaHub_almostFull_ST_19i(r32) _BFGET_(r32,19,19) +#define SET32SemaHub_almostFull_ST_19i(r32,v) _BFSET_(r32,19,19,v) +#define GET16SemaHub_almostFull_ST_19i(r16) _BFGET_(r16, 3, 3) +#define SET16SemaHub_almostFull_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + +#define GET32SemaHub_almostFull_ST_20i(r32) _BFGET_(r32,20,20) +#define SET32SemaHub_almostFull_ST_20i(r32,v) _BFSET_(r32,20,20,v) +#define GET16SemaHub_almostFull_ST_20i(r16) _BFGET_(r16, 4, 4) +#define SET16SemaHub_almostFull_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + +#define GET32SemaHub_almostFull_ST_21i(r32) _BFGET_(r32,21,21) +#define SET32SemaHub_almostFull_ST_21i(r32,v) _BFSET_(r32,21,21,v) +#define GET16SemaHub_almostFull_ST_21i(r16) _BFGET_(r16, 5, 5) +#define SET16SemaHub_almostFull_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + +#define GET32SemaHub_almostFull_ST_22i(r32) _BFGET_(r32,22,22) +#define SET32SemaHub_almostFull_ST_22i(r32,v) _BFSET_(r32,22,22,v) +#define GET16SemaHub_almostFull_ST_22i(r16) _BFGET_(r16, 6, 6) +#define SET16SemaHub_almostFull_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + +#define GET32SemaHub_almostFull_ST_23i(r32) _BFGET_(r32,23,23) +#define SET32SemaHub_almostFull_ST_23i(r32,v) _BFSET_(r32,23,23,v) +#define GET16SemaHub_almostFull_ST_23i(r16) _BFGET_(r16, 7, 7) +#define SET16SemaHub_almostFull_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + +#define GET32SemaHub_almostFull_ST_24i(r32) _BFGET_(r32,24,24) +#define SET32SemaHub_almostFull_ST_24i(r32,v) _BFSET_(r32,24,24,v) +#define GET16SemaHub_almostFull_ST_24i(r16) _BFGET_(r16, 8, 8) +#define SET16SemaHub_almostFull_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + +#define GET32SemaHub_almostFull_ST_25i(r32) _BFGET_(r32,25,25) +#define SET32SemaHub_almostFull_ST_25i(r32,v) _BFSET_(r32,25,25,v) +#define GET16SemaHub_almostFull_ST_25i(r16) _BFGET_(r16, 9, 9) +#define SET16SemaHub_almostFull_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + +#define GET32SemaHub_almostFull_ST_26i(r32) _BFGET_(r32,26,26) +#define SET32SemaHub_almostFull_ST_26i(r32,v) _BFSET_(r32,26,26,v) +#define GET16SemaHub_almostFull_ST_26i(r16) _BFGET_(r16,10,10) +#define SET16SemaHub_almostFull_ST_26i(r16,v) _BFSET_(r16,10,10,v) + +#define GET32SemaHub_almostFull_ST_27i(r32) _BFGET_(r32,27,27) +#define SET32SemaHub_almostFull_ST_27i(r32,v) _BFSET_(r32,27,27,v) +#define GET16SemaHub_almostFull_ST_27i(r16) _BFGET_(r16,11,11) +#define SET16SemaHub_almostFull_ST_27i(r16,v) _BFSET_(r16,11,11,v) + +#define GET32SemaHub_almostFull_ST_28i(r32) _BFGET_(r32,28,28) +#define SET32SemaHub_almostFull_ST_28i(r32,v) _BFSET_(r32,28,28,v) +#define GET16SemaHub_almostFull_ST_28i(r16) _BFGET_(r16,12,12) +#define SET16SemaHub_almostFull_ST_28i(r16,v) _BFSET_(r16,12,12,v) + +#define GET32SemaHub_almostFull_ST_29i(r32) _BFGET_(r32,29,29) +#define SET32SemaHub_almostFull_ST_29i(r32,v) _BFSET_(r32,29,29,v) +#define GET16SemaHub_almostFull_ST_29i(r16) _BFGET_(r16,13,13) +#define SET16SemaHub_almostFull_ST_29i(r16,v) _BFSET_(r16,13,13,v) + +#define GET32SemaHub_almostFull_ST_30i(r32) _BFGET_(r32,30,30) +#define SET32SemaHub_almostFull_ST_30i(r32,v) _BFSET_(r32,30,30,v) +#define GET16SemaHub_almostFull_ST_30i(r16) _BFGET_(r16,14,14) +#define SET16SemaHub_almostFull_ST_30i(r16,v) _BFSET_(r16,14,14,v) + +#define GET32SemaHub_almostFull_ST_31i(r32) _BFGET_(r32,31,31) +#define SET32SemaHub_almostFull_ST_31i(r32,v) _BFSET_(r32,31,31,v) +#define GET16SemaHub_almostFull_ST_31i(r16) _BFGET_(r16,15,15) +#define SET16SemaHub_almostFull_ST_31i(r16,v) _BFSET_(r16,15,15,v) + +#define w32SemaHub_almostFull {\ + UNSG32 ualmostFull_ST_0i : 1;\ + UNSG32 ualmostFull_ST_1i : 1;\ + UNSG32 ualmostFull_ST_2i : 1;\ + UNSG32 ualmostFull_ST_3i : 1;\ + UNSG32 ualmostFull_ST_4i : 1;\ + UNSG32 ualmostFull_ST_5i : 1;\ + UNSG32 ualmostFull_ST_6i : 1;\ + UNSG32 ualmostFull_ST_7i : 1;\ + UNSG32 ualmostFull_ST_8i : 1;\ + UNSG32 ualmostFull_ST_9i : 1;\ + UNSG32 ualmostFull_ST_10i : 1;\ + UNSG32 ualmostFull_ST_11i : 1;\ + UNSG32 ualmostFull_ST_12i : 1;\ + UNSG32 ualmostFull_ST_13i : 1;\ + UNSG32 ualmostFull_ST_14i : 1;\ + UNSG32 ualmostFull_ST_15i : 1;\ + UNSG32 ualmostFull_ST_16i : 1;\ + UNSG32 ualmostFull_ST_17i : 1;\ + UNSG32 ualmostFull_ST_18i : 1;\ + UNSG32 ualmostFull_ST_19i : 1;\ + UNSG32 ualmostFull_ST_20i : 1;\ + UNSG32 ualmostFull_ST_21i : 1;\ + UNSG32 ualmostFull_ST_22i : 1;\ + UNSG32 ualmostFull_ST_23i : 1;\ + UNSG32 ualmostFull_ST_24i : 1;\ + UNSG32 ualmostFull_ST_25i : 1;\ + UNSG32 ualmostFull_ST_26i : 1;\ + UNSG32 ualmostFull_ST_27i : 1;\ + UNSG32 ualmostFull_ST_28i : 1;\ + UNSG32 ualmostFull_ST_29i : 1;\ + UNSG32 ualmostFull_ST_30i : 1;\ + UNSG32 ualmostFull_ST_31i : 1;\ + } +union { UNSG32 u32SemaHub_almostFull; + struct w32SemaHub_almostFull; + }; +/////////////////////////////////////////////////////////// + UNSG8 RSVDx398 [104]; +/////////////////////////////////////////////////////////// +} SIE_SemaHub; + +typedef union T32SemaHub_PUSH + { UNSG32 u32; + struct w32SemaHub_PUSH; + } T32SemaHub_PUSH; +typedef union T32SemaHub_POP + { UNSG32 u32; + struct w32SemaHub_POP; + } T32SemaHub_POP; +typedef union T32SemaHub_empty + { UNSG32 u32; + struct w32SemaHub_empty; + } T32SemaHub_empty; +typedef union T32SemaHub_full + { UNSG32 u32; + struct w32SemaHub_full; + } T32SemaHub_full; +typedef union T32SemaHub_almostEmpty + { UNSG32 u32; + struct w32SemaHub_almostEmpty; + } T32SemaHub_almostEmpty; +typedef union T32SemaHub_almostFull + { UNSG32 u32; + struct w32SemaHub_almostFull; + } T32SemaHub_almostFull; +/////////////////////////////////////////////////////////// + +typedef union TSemaHub_PUSH + { UNSG32 u32[1]; + struct { + struct w32SemaHub_PUSH; + }; + } TSemaHub_PUSH; +typedef union TSemaHub_POP + { UNSG32 u32[1]; + struct { + struct w32SemaHub_POP; + }; + } TSemaHub_POP; +typedef union TSemaHub_empty + { UNSG32 u32[1]; + struct { + struct w32SemaHub_empty; + }; + } TSemaHub_empty; +typedef union TSemaHub_full + { UNSG32 u32[1]; + struct { + struct w32SemaHub_full; + }; + } TSemaHub_full; +typedef union TSemaHub_almostEmpty + { UNSG32 u32[1]; + struct { + struct w32SemaHub_almostEmpty; + }; + } TSemaHub_almostEmpty; +typedef union TSemaHub_almostFull + { UNSG32 u32[1]; + struct { + struct w32SemaHub_almostFull; + }; + } TSemaHub_almostFull; + +/////////////////////////////////////////////////////////// +SIGN32 SemaHub_drvrd(SIE_SemaHub *p, UNSG32 base, SIGN32 mem, SIGN32 tst); +SIGN32 SemaHub_drvwr(SIE_SemaHub *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); +void SemaHub_reset(SIE_SemaHub *p); +SIGN32 SemaHub_cmp (SIE_SemaHub *p, SIE_SemaHub *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); +#define SemaHub_check(p,pie,pfx,hLOG) SemaHub_cmp(p,pie,pfx,(void*)(hLOG),0,0) +#define SemaHub_print(p, pfx,hLOG) SemaHub_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaHub +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE FiFo biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 20 BASE +/// ### +/// * Base address (byte-address) of a FIFO in the shared SRAM. A channel's read/write +/// * pointers will be added to this “BASE†to get exact location of shared SRAM. +/// * Note: aligned with base SRAM data bus. +/// * For example, if SRAM data is 64-bit, then base[2:0] should be 3'b0; +/// ### +/// %% 12 # Stuffing bits... +/// @ 0x00004 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to this register will enable this channel, or 0 to this register will disable this channel. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to clear FIFO pointers to 0. +/// * Note : +/// * CPU should make sure to disabled the channel (write 0 to START_EN register) +/// * before issue clear command, otherwise the clear request will be ignored. +/// * Do not restart the channel when clear operation is in process. +/// * HW will make sure there is no pending transactions before execute the clear operation. +/// * Associated semaphore cell needs reset separately by re-write “CFG_DEPTH†+/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C FLUSH (W-) +/// %unsigned 1 EN +/// ### +/// * No support for now +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 23b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_FiFo +#define h_FiFo (){} + +#define RA_FiFo_CFG 0x0000 + +#define BA_FiFo_CFG_BASE 0x0000 +#define B16FiFo_CFG_BASE 0x0000 +#define LSb32FiFo_CFG_BASE 0 +#define LSb16FiFo_CFG_BASE 0 +#define bFiFo_CFG_BASE 20 +#define MSK32FiFo_CFG_BASE 0x000FFFFF +/////////////////////////////////////////////////////////// +#define RA_FiFo_START 0x0004 + +#define BA_FiFo_START_EN 0x0004 +#define B16FiFo_START_EN 0x0004 +#define LSb32FiFo_START_EN 0 +#define LSb16FiFo_START_EN 0 +#define bFiFo_START_EN 1 +#define MSK32FiFo_START_EN 0x00000001 +/////////////////////////////////////////////////////////// +#define RA_FiFo_CLEAR 0x0008 + +#define BA_FiFo_CLEAR_EN 0x0008 +#define B16FiFo_CLEAR_EN 0x0008 +#define LSb32FiFo_CLEAR_EN 0 +#define LSb16FiFo_CLEAR_EN 0 +#define bFiFo_CLEAR_EN 1 +#define MSK32FiFo_CLEAR_EN 0x00000001 +/////////////////////////////////////////////////////////// +#define RA_FiFo_FLUSH 0x000C + +#define BA_FiFo_FLUSH_EN 0x000C +#define B16FiFo_FLUSH_EN 0x000C +#define LSb32FiFo_FLUSH_EN 0 +#define LSb16FiFo_FLUSH_EN 0 +#define bFiFo_FLUSH_EN 1 +#define MSK32FiFo_FLUSH_EN 0x00000001 +/////////////////////////////////////////////////////////// + +typedef struct SIE_FiFo { +/////////////////////////////////////////////////////////// +#define GET32FiFo_CFG_BASE(r32) _BFGET_(r32,19, 0) +#define SET32FiFo_CFG_BASE(r32,v) _BFSET_(r32,19, 0,v) + +#define w32FiFo_CFG {\ + UNSG32 uCFG_BASE : 20;\ + UNSG32 RSVDx0_b20 : 12;\ + } +union { UNSG32 u32FiFo_CFG; + struct w32FiFo_CFG; + }; +/////////////////////////////////////////////////////////// +#define GET32FiFo_START_EN(r32) _BFGET_(r32, 0, 0) +#define SET32FiFo_START_EN(r32,v) _BFSET_(r32, 0, 0,v) +#define GET16FiFo_START_EN(r16) _BFGET_(r16, 0, 0) +#define SET16FiFo_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + +#define w32FiFo_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } +union { UNSG32 u32FiFo_START; + struct w32FiFo_START; + }; +/////////////////////////////////////////////////////////// +#define GET32FiFo_CLEAR_EN(r32) _BFGET_(r32, 0, 0) +#define SET32FiFo_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) +#define GET16FiFo_CLEAR_EN(r16) _BFGET_(r16, 0, 0) +#define SET16FiFo_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + +#define w32FiFo_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } +union { UNSG32 u32FiFo_CLEAR; + struct w32FiFo_CLEAR; + }; +/////////////////////////////////////////////////////////// +#define GET32FiFo_FLUSH_EN(r32) _BFGET_(r32, 0, 0) +#define SET32FiFo_FLUSH_EN(r32,v) _BFSET_(r32, 0, 0,v) +#define GET16FiFo_FLUSH_EN(r16) _BFGET_(r16, 0, 0) +#define SET16FiFo_FLUSH_EN(r16,v) _BFSET_(r16, 0, 0,v) + +#define w32FiFo_FLUSH {\ + UNSG32 uFLUSH_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } +union { UNSG32 u32FiFo_FLUSH; + struct w32FiFo_FLUSH; + }; +/////////////////////////////////////////////////////////// +} SIE_FiFo; + +typedef union T32FiFo_CFG + { UNSG32 u32; + struct w32FiFo_CFG; + } T32FiFo_CFG; +typedef union T32FiFo_START + { UNSG32 u32; + struct w32FiFo_START; + } T32FiFo_START; +typedef union T32FiFo_CLEAR + { UNSG32 u32; + struct w32FiFo_CLEAR; + } T32FiFo_CLEAR; +typedef union T32FiFo_FLUSH + { UNSG32 u32; + struct w32FiFo_FLUSH; + } T32FiFo_FLUSH; +/////////////////////////////////////////////////////////// + +typedef union TFiFo_CFG + { UNSG32 u32[1]; + struct { + struct w32FiFo_CFG; + }; + } TFiFo_CFG; +typedef union TFiFo_START + { UNSG32 u32[1]; + struct { + struct w32FiFo_START; + }; + } TFiFo_START; +typedef union TFiFo_CLEAR + { UNSG32 u32[1]; + struct { + struct w32FiFo_CLEAR; + }; + } TFiFo_CLEAR; +typedef union TFiFo_FLUSH + { UNSG32 u32[1]; + struct { + struct w32FiFo_FLUSH; + }; + } TFiFo_FLUSH; + +/////////////////////////////////////////////////////////// +SIGN32 FiFo_drvrd(SIE_FiFo *p, UNSG32 base, SIGN32 mem, SIGN32 tst); +SIGN32 FiFo_drvwr(SIE_FiFo *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); +void FiFo_reset(SIE_FiFo *p); +SIGN32 FiFo_cmp (SIE_FiFo *p, SIE_FiFo *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); +#define FiFo_check(p,pie,pfx,hLOG) FiFo_cmp(p,pie,pfx,(void*)(hLOG),0,0) +#define FiFo_print(p, pfx,hLOG) FiFo_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: FiFo +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE HBO biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 FiFoCtl +/// $SemaHub FiFoCtl REG +/// @ 0x00400 ARR (P) +/// # 0x00400 FiFo +/// $FiFo FiFo REG [32] +/// ### +/// * Up-to 32 FIFO channels +/// * FiFo[N] is controlled by HBO.FiFoCtl.Channel[N] +/// ### +/// @ 0x00600 BUSY (R-) +/// %unsigned 32 ST +/// ### +/// * Per channel status +/// * Indicate the clear operation status. +/// * 1: clear is in process. +/// * 0 : clear is done. +/// ### +/// @ 0x00604 (W-) +/// # # Stuffing bytes... +/// %% 2016 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 1792B, bits: 1920b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_HBO +#define h_HBO (){} + +#define RA_HBO_FiFoCtl 0x0000 +/////////////////////////////////////////////////////////// +#define RA_HBO_ARR 0x0400 +#define RA_HBO_FiFo 0x0400 +/////////////////////////////////////////////////////////// +#define RA_HBO_BUSY 0x0600 + +#define BA_HBO_BUSY_ST 0x0600 +#define B16HBO_BUSY_ST 0x0600 +#define LSb32HBO_BUSY_ST 0 +#define LSb16HBO_BUSY_ST 0 +#define bHBO_BUSY_ST 32 +#define MSK32HBO_BUSY_ST 0xFFFFFFFF +/////////////////////////////////////////////////////////// + +typedef struct SIE_HBO { +/////////////////////////////////////////////////////////// + SIE_SemaHub ie_FiFoCtl; +/////////////////////////////////////////////////////////// + SIE_FiFo ie_FiFo[32]; +/////////////////////////////////////////////////////////// +#define GET32HBO_BUSY_ST(r32) _BFGET_(r32,31, 0) +#define SET32HBO_BUSY_ST(r32,v) _BFSET_(r32,31, 0,v) + +#define w32HBO_BUSY {\ + UNSG32 uBUSY_ST : 32;\ + } +union { UNSG32 u32HBO_BUSY; + struct w32HBO_BUSY; + }; +/////////////////////////////////////////////////////////// + UNSG8 RSVDx604 [252]; +/////////////////////////////////////////////////////////// +} SIE_HBO; + +typedef union T32HBO_BUSY + { UNSG32 u32; + struct w32HBO_BUSY; + } T32HBO_BUSY; +/////////////////////////////////////////////////////////// + +typedef union THBO_BUSY + { UNSG32 u32[1]; + struct { + struct w32HBO_BUSY; + }; + } THBO_BUSY; + +/////////////////////////////////////////////////////////// +SIGN32 HBO_drvrd(SIE_HBO *p, UNSG32 base, SIGN32 mem, SIGN32 tst); +SIGN32 HBO_drvwr(SIE_HBO *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); +void HBO_reset(SIE_HBO *p); +SIGN32 HBO_cmp (SIE_HBO *p, SIE_HBO *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); +#define HBO_check(p,pie,pfx,hLOG) HBO_cmp(p,pie,pfx,(void*)(hLOG),0,0) +#define HBO_print(p, pfx,hLOG) HBO_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: HBO +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE LLDesFmt biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 mem (P) +/// %unsigned 16 size +/// ### +/// * The size of one piece of scattered memory. +/// ### +/// %% 16 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 16b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_LLDesFmt +#define h_LLDesFmt (){} + +#define RA_LLDesFmt_mem 0x0000 + +#define BA_LLDesFmt_mem_size 0x0000 +#define B16LLDesFmt_mem_size 0x0000 +#define LSb32LLDesFmt_mem_size 0 +#define LSb16LLDesFmt_mem_size 0 +#define bLLDesFmt_mem_size 16 +#define MSK32LLDesFmt_mem_size 0x0000FFFF +/////////////////////////////////////////////////////////// + +typedef struct SIE_LLDesFmt { +/////////////////////////////////////////////////////////// +#define GET32LLDesFmt_mem_size(r32) _BFGET_(r32,15, 0) +#define SET32LLDesFmt_mem_size(r32,v) _BFSET_(r32,15, 0,v) +#define GET16LLDesFmt_mem_size(r16) _BFGET_(r16,15, 0) +#define SET16LLDesFmt_mem_size(r16,v) _BFSET_(r16,15, 0,v) + +#define w32LLDesFmt_mem {\ + UNSG32 umem_size : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } +union { UNSG32 u32LLDesFmt_mem; + struct w32LLDesFmt_mem; + }; +/////////////////////////////////////////////////////////// +} SIE_LLDesFmt; + +typedef union T32LLDesFmt_mem + { UNSG32 u32; + struct w32LLDesFmt_mem; + } T32LLDesFmt_mem; +/////////////////////////////////////////////////////////// + +typedef union TLLDesFmt_mem + { UNSG32 u32[1]; + struct { + struct w32LLDesFmt_mem; + }; + } TLLDesFmt_mem; + +/////////////////////////////////////////////////////////// +SIGN32 LLDesFmt_drvrd(SIE_LLDesFmt *p, UNSG32 base, SIGN32 mem, SIGN32 tst); +SIGN32 LLDesFmt_drvwr(SIE_LLDesFmt *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); +void LLDesFmt_reset(SIE_LLDesFmt *p); +SIGN32 LLDesFmt_cmp (SIE_LLDesFmt *p, SIE_LLDesFmt *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); +#define LLDesFmt_check(p,pie,pfx,hLOG) LLDesFmt_cmp(p,pie,pfx,(void*)(hLOG),0,0) +#define LLDesFmt_print(p, pfx,hLOG) LLDesFmt_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: LLDesFmt +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmdHDR (4,4) +/// ### +/// * 32-bit dHub command header +/// * [0:31] +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 DESC (W-) +/// %unsigned 16 size +/// ### +/// * amount of data to be transferred, in bytes or MTU. +/// * Size of 0 is forbidden. +/// ### +/// %unsigned 1 sizeMTU +/// ### +/// * 0: size given in bytes; +/// * 1: size given in MTU (see dHubChCtl.CFG.MTU for MTU size definition) +/// ### +/// %unsigned 1 semOpMTU +/// ### +/// * 0: semaphore operations applied on dHubCmd level +/// * 1: semaphore operations applied on MTU level +/// ### +/// %unsigned 5 chkSemId +/// ### +/// * ID of semaphore to check before cmd / MTU; +/// * 0 indicates semaphore check is disabled +/// ### +/// %unsigned 5 updSemId +/// ### +/// * ID of semaphore to update after cmd / MTU; +/// * 0 indicates semaphore update is disabled +/// ### +/// %unsigned 1 interrupt +/// ### +/// * 1: raise interrupt upon command finish +/// * end dHubCmdHDR +/// ### +/// %% 3 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 29b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmdHDR +#define h_dHubCmdHDR (){} + +#define RA_dHubCmdHDR_DESC 0x0000 + +#define BA_dHubCmdHDR_DESC_size 0x0000 +#define B16dHubCmdHDR_DESC_size 0x0000 +#define LSb32dHubCmdHDR_DESC_size 0 +#define LSb16dHubCmdHDR_DESC_size 0 +#define bdHubCmdHDR_DESC_size 16 +#define MSK32dHubCmdHDR_DESC_size 0x0000FFFF + +#define BA_dHubCmdHDR_DESC_sizeMTU 0x0002 +#define B16dHubCmdHDR_DESC_sizeMTU 0x0002 +#define LSb32dHubCmdHDR_DESC_sizeMTU 16 +#define LSb16dHubCmdHDR_DESC_sizeMTU 0 +#define bdHubCmdHDR_DESC_sizeMTU 1 +#define MSK32dHubCmdHDR_DESC_sizeMTU 0x00010000 + +#define BA_dHubCmdHDR_DESC_semOpMTU 0x0002 +#define B16dHubCmdHDR_DESC_semOpMTU 0x0002 +#define LSb32dHubCmdHDR_DESC_semOpMTU 17 +#define LSb16dHubCmdHDR_DESC_semOpMTU 1 +#define bdHubCmdHDR_DESC_semOpMTU 1 +#define MSK32dHubCmdHDR_DESC_semOpMTU 0x00020000 + +#define BA_dHubCmdHDR_DESC_chkSemId 0x0002 +#define B16dHubCmdHDR_DESC_chkSemId 0x0002 +#define LSb32dHubCmdHDR_DESC_chkSemId 18 +#define LSb16dHubCmdHDR_DESC_chkSemId 2 +#define bdHubCmdHDR_DESC_chkSemId 5 +#define MSK32dHubCmdHDR_DESC_chkSemId 0x007C0000 + +#define BA_dHubCmdHDR_DESC_updSemId 0x0002 +#define B16dHubCmdHDR_DESC_updSemId 0x0002 +#define LSb32dHubCmdHDR_DESC_updSemId 23 +#define LSb16dHubCmdHDR_DESC_updSemId 7 +#define bdHubCmdHDR_DESC_updSemId 5 +#define MSK32dHubCmdHDR_DESC_updSemId 0x0F800000 + +#define BA_dHubCmdHDR_DESC_interrupt 0x0003 +#define B16dHubCmdHDR_DESC_interrupt 0x0002 +#define LSb32dHubCmdHDR_DESC_interrupt 28 +#define LSb16dHubCmdHDR_DESC_interrupt 12 +#define bdHubCmdHDR_DESC_interrupt 1 +#define MSK32dHubCmdHDR_DESC_interrupt 0x10000000 +/////////////////////////////////////////////////////////// + +typedef struct SIE_dHubCmdHDR { +/////////////////////////////////////////////////////////// +#define GET32dHubCmdHDR_DESC_size(r32) _BFGET_(r32,15, 0) +#define SET32dHubCmdHDR_DESC_size(r32,v) _BFSET_(r32,15, 0,v) +#define GET16dHubCmdHDR_DESC_size(r16) _BFGET_(r16,15, 0) +#define SET16dHubCmdHDR_DESC_size(r16,v) _BFSET_(r16,15, 0,v) + +#define GET32dHubCmdHDR_DESC_sizeMTU(r32) _BFGET_(r32,16,16) +#define SET32dHubCmdHDR_DESC_sizeMTU(r32,v) _BFSET_(r32,16,16,v) +#define GET16dHubCmdHDR_DESC_sizeMTU(r16) _BFGET_(r16, 0, 0) +#define SET16dHubCmdHDR_DESC_sizeMTU(r16,v) _BFSET_(r16, 0, 0,v) + +#define GET32dHubCmdHDR_DESC_semOpMTU(r32) _BFGET_(r32,17,17) +#define SET32dHubCmdHDR_DESC_semOpMTU(r32,v) _BFSET_(r32,17,17,v) +#define GET16dHubCmdHDR_DESC_semOpMTU(r16) _BFGET_(r16, 1, 1) +#define SET16dHubCmdHDR_DESC_semOpMTU(r16,v) _BFSET_(r16, 1, 1,v) + +#define GET32dHubCmdHDR_DESC_chkSemId(r32) _BFGET_(r32,22,18) +#define SET32dHubCmdHDR_DESC_chkSemId(r32,v) _BFSET_(r32,22,18,v) +#define GET16dHubCmdHDR_DESC_chkSemId(r16) _BFGET_(r16, 6, 2) +#define SET16dHubCmdHDR_DESC_chkSemId(r16,v) _BFSET_(r16, 6, 2,v) + +#define GET32dHubCmdHDR_DESC_updSemId(r32) _BFGET_(r32,27,23) +#define SET32dHubCmdHDR_DESC_updSemId(r32,v) _BFSET_(r32,27,23,v) +#define GET16dHubCmdHDR_DESC_updSemId(r16) _BFGET_(r16,11, 7) +#define SET16dHubCmdHDR_DESC_updSemId(r16,v) _BFSET_(r16,11, 7,v) + +#define GET32dHubCmdHDR_DESC_interrupt(r32) _BFGET_(r32,28,28) +#define SET32dHubCmdHDR_DESC_interrupt(r32,v) _BFSET_(r32,28,28,v) +#define GET16dHubCmdHDR_DESC_interrupt(r16) _BFGET_(r16,12,12) +#define SET16dHubCmdHDR_DESC_interrupt(r16,v) _BFSET_(r16,12,12,v) + +#define w32dHubCmdHDR_DESC {\ + UNSG32 uDESC_size : 16;\ + UNSG32 uDESC_sizeMTU : 1;\ + UNSG32 uDESC_semOpMTU : 1;\ + UNSG32 uDESC_chkSemId : 5;\ + UNSG32 uDESC_updSemId : 5;\ + UNSG32 uDESC_interrupt : 1;\ + UNSG32 RSVDx0_b29 : 3;\ + } +union { UNSG32 u32dHubCmdHDR_DESC; + struct w32dHubCmdHDR_DESC; + }; +/////////////////////////////////////////////////////////// +} SIE_dHubCmdHDR; + +typedef union T32dHubCmdHDR_DESC + { UNSG32 u32; + struct w32dHubCmdHDR_DESC; + } T32dHubCmdHDR_DESC; +/////////////////////////////////////////////////////////// + +typedef union TdHubCmdHDR_DESC + { UNSG32 u32[1]; + struct { + struct w32dHubCmdHDR_DESC; + }; + } TdHubCmdHDR_DESC; + +/////////////////////////////////////////////////////////// +SIGN32 dHubCmdHDR_drvrd(SIE_dHubCmdHDR *p, UNSG32 base, SIGN32 mem, SIGN32 tst); +SIGN32 dHubCmdHDR_drvwr(SIE_dHubCmdHDR *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); +void dHubCmdHDR_reset(SIE_dHubCmdHDR *p); +SIGN32 dHubCmdHDR_cmp (SIE_dHubCmdHDR *p, SIE_dHubCmdHDR *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); +#define dHubCmdHDR_check(p,pie,pfx,hLOG) dHubCmdHDR_cmp(p,pie,pfx,(void*)(hLOG),0,0) +#define dHubCmdHDR_print(p, pfx,hLOG) dHubCmdHDR_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmdHDR +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmd biu (4,4) +/// ### +/// * 64-bit dHub command issued by read/write masters +/// * [0:31] +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 MEM (W-) +/// %unsigned 32 addr +/// ### +/// * DRAM data address, in bytes; not necessarily MTU aligned. +/// * [32:63] +/// ### +/// @ 0x00004 (P) +/// # 0x00004 HDR +/// $dHubCmdHDR HDR REG +/// ### +/// * end dHubCmd +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 8B, bits: 61b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmd +#define h_dHubCmd (){} + +#define RA_dHubCmd_MEM 0x0000 + +#define BA_dHubCmd_MEM_addr 0x0000 +#define B16dHubCmd_MEM_addr 0x0000 +#define LSb32dHubCmd_MEM_addr 0 +#define LSb16dHubCmd_MEM_addr 0 +#define bdHubCmd_MEM_addr 32 +#define MSK32dHubCmd_MEM_addr 0xFFFFFFFF +/////////////////////////////////////////////////////////// +#define RA_dHubCmd_HDR 0x0004 +/////////////////////////////////////////////////////////// + +typedef struct SIE_dHubCmd { +/////////////////////////////////////////////////////////// +#define GET32dHubCmd_MEM_addr(r32) _BFGET_(r32,31, 0) +#define SET32dHubCmd_MEM_addr(r32,v) _BFSET_(r32,31, 0,v) + +#define w32dHubCmd_MEM {\ + UNSG32 uMEM_addr : 32;\ + } +union { UNSG32 u32dHubCmd_MEM; + struct w32dHubCmd_MEM; + }; +/////////////////////////////////////////////////////////// + SIE_dHubCmdHDR ie_HDR; +/////////////////////////////////////////////////////////// +} SIE_dHubCmd; + +typedef union T32dHubCmd_MEM + { UNSG32 u32; + struct w32dHubCmd_MEM; + } T32dHubCmd_MEM; +/////////////////////////////////////////////////////////// + +typedef union TdHubCmd_MEM + { UNSG32 u32[1]; + struct { + struct w32dHubCmd_MEM; + }; + } TdHubCmd_MEM; + +/////////////////////////////////////////////////////////// +SIGN32 dHubCmd_drvrd(SIE_dHubCmd *p, UNSG32 base, SIGN32 mem, SIGN32 tst); +SIGN32 dHubCmd_drvwr(SIE_dHubCmd *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); +void dHubCmd_reset(SIE_dHubCmd *p); +SIGN32 dHubCmd_cmp (SIE_dHubCmd *p, SIE_dHubCmd *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); +#define dHubCmd_check(p,pie,pfx,hLOG) dHubCmd_cmp(p,pie,pfx,(void*)(hLOG),0,0) +#define dHubCmd_print(p, pfx,hLOG) dHubCmd_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmd +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubChannel biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 2 MTU +/// : 8byte 0x0 +/// : 32byte 0x1 +/// : 128byte 0x2 +/// : 1024byte 0x3 +/// ### +/// * Minimum transfer unit of the channel +/// ### +/// %unsigned 1 QoS +/// ### +/// * Write 1 to turn on QoS detection +/// ### +/// %unsigned 1 selfLoop +/// ### +/// * Write 1 to enable cmd looping support; 0 to turn off +/// ### +/// %unsigned 1 intrCtl 0x0 +/// : cmdDone 0x0 +/// : chIdle 0x1 +/// %% 27 # Stuffing bits... +/// @ 0x00004 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to enable the channel; 0 to pause the channel +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to reset the channel controller state +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C FLUSH (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to start the data flushing process. Invalid for read (M2H) channels +/// * end dHubChannel +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 8b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubChannel +#define h_dHubChannel (){} + +#define RA_dHubChannel_CFG 0x0000 + +#define BA_dHubChannel_CFG_MTU 0x0000 +#define B16dHubChannel_CFG_MTU 0x0000 +#define LSb32dHubChannel_CFG_MTU 0 +#define LSb16dHubChannel_CFG_MTU 0 +#define bdHubChannel_CFG_MTU 2 +#define MSK32dHubChannel_CFG_MTU 0x00000003 +#define dHubChannel_CFG_MTU_8byte 0x0 +#define dHubChannel_CFG_MTU_32byte 0x1 +#define dHubChannel_CFG_MTU_128byte 0x2 +#define dHubChannel_CFG_MTU_1024byte 0x3 + +#define BA_dHubChannel_CFG_QoS 0x0000 +#define B16dHubChannel_CFG_QoS 0x0000 +#define LSb32dHubChannel_CFG_QoS 2 +#define LSb16dHubChannel_CFG_QoS 2 +#define bdHubChannel_CFG_QoS 1 +#define MSK32dHubChannel_CFG_QoS 0x00000004 + +#define BA_dHubChannel_CFG_selfLoop 0x0000 +#define B16dHubChannel_CFG_selfLoop 0x0000 +#define LSb32dHubChannel_CFG_selfLoop 3 +#define LSb16dHubChannel_CFG_selfLoop 3 +#define bdHubChannel_CFG_selfLoop 1 +#define MSK32dHubChannel_CFG_selfLoop 0x00000008 + +#define BA_dHubChannel_CFG_intrCtl 0x0000 +#define B16dHubChannel_CFG_intrCtl 0x0000 +#define LSb32dHubChannel_CFG_intrCtl 4 +#define LSb16dHubChannel_CFG_intrCtl 4 +#define bdHubChannel_CFG_intrCtl 1 +#define MSK32dHubChannel_CFG_intrCtl 0x00000010 +#define dHubChannel_CFG_intrCtl_cmdDone 0x0 +#define dHubChannel_CFG_intrCtl_chIdle 0x1 +/////////////////////////////////////////////////////////// +#define RA_dHubChannel_START 0x0004 + +#define BA_dHubChannel_START_EN 0x0004 +#define B16dHubChannel_START_EN 0x0004 +#define LSb32dHubChannel_START_EN 0 +#define LSb16dHubChannel_START_EN 0 +#define bdHubChannel_START_EN 1 +#define MSK32dHubChannel_START_EN 0x00000001 +/////////////////////////////////////////////////////////// +#define RA_dHubChannel_CLEAR 0x0008 + +#define BA_dHubChannel_CLEAR_EN 0x0008 +#define B16dHubChannel_CLEAR_EN 0x0008 +#define LSb32dHubChannel_CLEAR_EN 0 +#define LSb16dHubChannel_CLEAR_EN 0 +#define bdHubChannel_CLEAR_EN 1 +#define MSK32dHubChannel_CLEAR_EN 0x00000001 +/////////////////////////////////////////////////////////// +#define RA_dHubChannel_FLUSH 0x000C + +#define BA_dHubChannel_FLUSH_EN 0x000C +#define B16dHubChannel_FLUSH_EN 0x000C +#define LSb32dHubChannel_FLUSH_EN 0 +#define LSb16dHubChannel_FLUSH_EN 0 +#define bdHubChannel_FLUSH_EN 1 +#define MSK32dHubChannel_FLUSH_EN 0x00000001 +/////////////////////////////////////////////////////////// + +typedef struct SIE_dHubChannel { +/////////////////////////////////////////////////////////// +#define GET32dHubChannel_CFG_MTU(r32) _BFGET_(r32, 1, 0) +#define SET32dHubChannel_CFG_MTU(r32,v) _BFSET_(r32, 1, 0,v) +#define GET16dHubChannel_CFG_MTU(r16) _BFGET_(r16, 1, 0) +#define SET16dHubChannel_CFG_MTU(r16,v) _BFSET_(r16, 1, 0,v) + +#define GET32dHubChannel_CFG_QoS(r32) _BFGET_(r32, 2, 2) +#define SET32dHubChannel_CFG_QoS(r32,v) _BFSET_(r32, 2, 2,v) +#define GET16dHubChannel_CFG_QoS(r16) _BFGET_(r16, 2, 2) +#define SET16dHubChannel_CFG_QoS(r16,v) _BFSET_(r16, 2, 2,v) + +#define GET32dHubChannel_CFG_selfLoop(r32) _BFGET_(r32, 3, 3) +#define SET32dHubChannel_CFG_selfLoop(r32,v) _BFSET_(r32, 3, 3,v) +#define GET16dHubChannel_CFG_selfLoop(r16) _BFGET_(r16, 3, 3) +#define SET16dHubChannel_CFG_selfLoop(r16,v) _BFSET_(r16, 3, 3,v) + +#define GET32dHubChannel_CFG_intrCtl(r32) _BFGET_(r32, 4, 4) +#define SET32dHubChannel_CFG_intrCtl(r32,v) _BFSET_(r32, 4, 4,v) +#define GET16dHubChannel_CFG_intrCtl(r16) _BFGET_(r16, 4, 4) +#define SET16dHubChannel_CFG_intrCtl(r16,v) _BFSET_(r16, 4, 4,v) + +#define w32dHubChannel_CFG {\ + UNSG32 uCFG_MTU : 2;\ + UNSG32 uCFG_QoS : 1;\ + UNSG32 uCFG_selfLoop : 1;\ + UNSG32 uCFG_intrCtl : 1;\ + UNSG32 RSVDx0_b5 : 27;\ + } +union { UNSG32 u32dHubChannel_CFG; + struct w32dHubChannel_CFG; + }; +/////////////////////////////////////////////////////////// +#define GET32dHubChannel_START_EN(r32) _BFGET_(r32, 0, 0) +#define SET32dHubChannel_START_EN(r32,v) _BFSET_(r32, 0, 0,v) +#define GET16dHubChannel_START_EN(r16) _BFGET_(r16, 0, 0) +#define SET16dHubChannel_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + +#define w32dHubChannel_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } +union { UNSG32 u32dHubChannel_START; + struct w32dHubChannel_START; + }; +/////////////////////////////////////////////////////////// +#define GET32dHubChannel_CLEAR_EN(r32) _BFGET_(r32, 0, 0) +#define SET32dHubChannel_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) +#define GET16dHubChannel_CLEAR_EN(r16) _BFGET_(r16, 0, 0) +#define SET16dHubChannel_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + +#define w32dHubChannel_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } +union { UNSG32 u32dHubChannel_CLEAR; + struct w32dHubChannel_CLEAR; + }; +/////////////////////////////////////////////////////////// +#define GET32dHubChannel_FLUSH_EN(r32) _BFGET_(r32, 0, 0) +#define SET32dHubChannel_FLUSH_EN(r32,v) _BFSET_(r32, 0, 0,v) +#define GET16dHubChannel_FLUSH_EN(r16) _BFGET_(r16, 0, 0) +#define SET16dHubChannel_FLUSH_EN(r16,v) _BFSET_(r16, 0, 0,v) + +#define w32dHubChannel_FLUSH {\ + UNSG32 uFLUSH_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } +union { UNSG32 u32dHubChannel_FLUSH; + struct w32dHubChannel_FLUSH; + }; +/////////////////////////////////////////////////////////// +} SIE_dHubChannel; + +typedef union T32dHubChannel_CFG + { UNSG32 u32; + struct w32dHubChannel_CFG; + } T32dHubChannel_CFG; +typedef union T32dHubChannel_START + { UNSG32 u32; + struct w32dHubChannel_START; + } T32dHubChannel_START; +typedef union T32dHubChannel_CLEAR + { UNSG32 u32; + struct w32dHubChannel_CLEAR; + } T32dHubChannel_CLEAR; +typedef union T32dHubChannel_FLUSH + { UNSG32 u32; + struct w32dHubChannel_FLUSH; + } T32dHubChannel_FLUSH; +/////////////////////////////////////////////////////////// + +typedef union TdHubChannel_CFG + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_CFG; + }; + } TdHubChannel_CFG; +typedef union TdHubChannel_START + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_START; + }; + } TdHubChannel_START; +typedef union TdHubChannel_CLEAR + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_CLEAR; + }; + } TdHubChannel_CLEAR; +typedef union TdHubChannel_FLUSH + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_FLUSH; + }; + } TdHubChannel_FLUSH; + +/////////////////////////////////////////////////////////// +SIGN32 dHubChannel_drvrd(SIE_dHubChannel *p, UNSG32 base, SIGN32 mem, SIGN32 tst); +SIGN32 dHubChannel_drvwr(SIE_dHubChannel *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); +void dHubChannel_reset(SIE_dHubChannel *p); +SIGN32 dHubChannel_cmp (SIE_dHubChannel *p, SIE_dHubChannel *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); +#define dHubChannel_check(p,pie,pfx,hLOG) dHubChannel_cmp(p,pie,pfx,(void*)(hLOG),0,0) +#define dHubChannel_print(p, pfx,hLOG) dHubChannel_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubChannel +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubReg biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 SemaHub +/// $SemaHub SemaHub REG +/// @ 0x00400 (P) +/// # 0x00400 HBO +/// $HBO HBO REG +/// ### +/// * For dHub channels (command/data queues), also provide (unused) FIFO service for external. +/// * Channel 2N is used for dHub.Channel[N] command. +/// * Channel 2N+1 is used for dHub.Channel[N] data. +/// ### +/// @ 0x00B00 ARR (P) +/// # 0x00B00 channelCtl +/// $dHubChannel channelCtl REG [16] +/// ### +/// * Up-to 16 channels +/// ### +/// @ 0x00C00 BUSY (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: no ongoing command is being processed, and no flushing is taking place +/// * 1: channel controller is busy +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C04 PENDING (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: Response queue is empty, meaning no outstanding AXI transactions +/// * 1: there exist some outstanding AXI transactions +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C08 busRstEn (RW-) +/// %unsigned 1 reg 0x0 +/// ### +/// * Write one to this register will trigger gate-keeper to take over the AXI bus. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00C0C busRstDone (R-) +/// %unsigned 1 reg 0x1 +/// ### +/// * After gate-keeper take over the AXI bus, it will assert this bit once there is no outstanding transactions on AXI bus. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00C10 flowCtl (P) +/// %unsigned 8 rAlpha 0x0 +/// %unsigned 8 wAlpha 0x0 + +/// %% 16 # Stuffing bits... +/// @ 0x00C14 axiCmdCol (P) +/// %unsigned 16 rCnt 0x0 +/// %unsigned 16 wCnt 0x0 + +/// @ 0x00C18 (W-) +/// # # Stuffing bytes... +/// %% 1856 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 3328B, bits: 3282b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubReg +#define h_dHubReg (){} + +#define RA_dHubReg_SemaHub 0x0000 +/////////////////////////////////////////////////////////// +#define RA_dHubReg_HBO 0x0400 +/////////////////////////////////////////////////////////// +#define RA_dHubReg_ARR 0x0B00 +#define RA_dHubReg_channelCtl 0x0B00 +/////////////////////////////////////////////////////////// +#define RA_dHubReg_BUSY 0x0C00 + +#define BA_dHubReg_BUSY_ST 0x0C00 +#define B16dHubReg_BUSY_ST 0x0C00 +#define LSb32dHubReg_BUSY_ST 0 +#define LSb16dHubReg_BUSY_ST 0 +#define bdHubReg_BUSY_ST 16 +#define MSK32dHubReg_BUSY_ST 0x0000FFFF +/////////////////////////////////////////////////////////// +#define RA_dHubReg_PENDING 0x0C04 + +#define BA_dHubReg_PENDING_ST 0x0C04 +#define B16dHubReg_PENDING_ST 0x0C04 +#define LSb32dHubReg_PENDING_ST 0 +#define LSb16dHubReg_PENDING_ST 0 +#define bdHubReg_PENDING_ST 16 +#define MSK32dHubReg_PENDING_ST 0x0000FFFF +/////////////////////////////////////////////////////////// +#define RA_dHubReg_busRstEn 0x0C08 + +#define BA_dHubReg_busRstEn_reg 0x0C08 +#define B16dHubReg_busRstEn_reg 0x0C08 +#define LSb32dHubReg_busRstEn_reg 0 +#define LSb16dHubReg_busRstEn_reg 0 +#define bdHubReg_busRstEn_reg 1 +#define MSK32dHubReg_busRstEn_reg 0x00000001 +/////////////////////////////////////////////////////////// +#define RA_dHubReg_busRstDone 0x0C0C + +#define BA_dHubReg_busRstDone_reg 0x0C0C +#define B16dHubReg_busRstDone_reg 0x0C0C +#define LSb32dHubReg_busRstDone_reg 0 +#define LSb16dHubReg_busRstDone_reg 0 +#define bdHubReg_busRstDone_reg 1 +#define MSK32dHubReg_busRstDone_reg 0x00000001 +/////////////////////////////////////////////////////////// +#define RA_dHubReg_flowCtl 0x0C10 + +#define BA_dHubReg_flowCtl_rAlpha 0x0C10 +#define B16dHubReg_flowCtl_rAlpha 0x0C10 +#define LSb32dHubReg_flowCtl_rAlpha 0 +#define LSb16dHubReg_flowCtl_rAlpha 0 +#define bdHubReg_flowCtl_rAlpha 8 +#define MSK32dHubReg_flowCtl_rAlpha 0x000000FF + +#define BA_dHubReg_flowCtl_wAlpha 0x0C11 +#define B16dHubReg_flowCtl_wAlpha 0x0C10 +#define LSb32dHubReg_flowCtl_wAlpha 8 +#define LSb16dHubReg_flowCtl_wAlpha 8 +#define bdHubReg_flowCtl_wAlpha 8 +#define MSK32dHubReg_flowCtl_wAlpha 0x0000FF00 +/////////////////////////////////////////////////////////// +#define RA_dHubReg_axiCmdCol 0x0C14 + +#define BA_dHubReg_axiCmdCol_rCnt 0x0C14 +#define B16dHubReg_axiCmdCol_rCnt 0x0C14 +#define LSb32dHubReg_axiCmdCol_rCnt 0 +#define LSb16dHubReg_axiCmdCol_rCnt 0 +#define bdHubReg_axiCmdCol_rCnt 16 +#define MSK32dHubReg_axiCmdCol_rCnt 0x0000FFFF + +#define BA_dHubReg_axiCmdCol_wCnt 0x0C16 +#define B16dHubReg_axiCmdCol_wCnt 0x0C16 +#define LSb32dHubReg_axiCmdCol_wCnt 16 +#define LSb16dHubReg_axiCmdCol_wCnt 0 +#define bdHubReg_axiCmdCol_wCnt 16 +#define MSK32dHubReg_axiCmdCol_wCnt 0xFFFF0000 +/////////////////////////////////////////////////////////// + +typedef struct SIE_dHubReg { +/////////////////////////////////////////////////////////// + SIE_SemaHub ie_SemaHub; +/////////////////////////////////////////////////////////// + SIE_HBO ie_HBO; +/////////////////////////////////////////////////////////// + SIE_dHubChannel ie_channelCtl[16]; +/////////////////////////////////////////////////////////// +#define GET32dHubReg_BUSY_ST(r32) _BFGET_(r32,15, 0) +#define SET32dHubReg_BUSY_ST(r32,v) _BFSET_(r32,15, 0,v) +#define GET16dHubReg_BUSY_ST(r16) _BFGET_(r16,15, 0) +#define SET16dHubReg_BUSY_ST(r16,v) _BFSET_(r16,15, 0,v) + +#define w32dHubReg_BUSY {\ + UNSG32 uBUSY_ST : 16;\ + UNSG32 RSVDxC00_b16 : 16;\ + } +union { UNSG32 u32dHubReg_BUSY; + struct w32dHubReg_BUSY; + }; +/////////////////////////////////////////////////////////// +#define GET32dHubReg_PENDING_ST(r32) _BFGET_(r32,15, 0) +#define SET32dHubReg_PENDING_ST(r32,v) _BFSET_(r32,15, 0,v) +#define GET16dHubReg_PENDING_ST(r16) _BFGET_(r16,15, 0) +#define SET16dHubReg_PENDING_ST(r16,v) _BFSET_(r16,15, 0,v) + +#define w32dHubReg_PENDING {\ + UNSG32 uPENDING_ST : 16;\ + UNSG32 RSVDxC04_b16 : 16;\ + } +union { UNSG32 u32dHubReg_PENDING; + struct w32dHubReg_PENDING; + }; +/////////////////////////////////////////////////////////// +#define GET32dHubReg_busRstEn_reg(r32) _BFGET_(r32, 0, 0) +#define SET32dHubReg_busRstEn_reg(r32,v) _BFSET_(r32, 0, 0,v) +#define GET16dHubReg_busRstEn_reg(r16) _BFGET_(r16, 0, 0) +#define SET16dHubReg_busRstEn_reg(r16,v) _BFSET_(r16, 0, 0,v) + +#define w32dHubReg_busRstEn {\ + UNSG32 ubusRstEn_reg : 1;\ + UNSG32 RSVDxC08_b1 : 31;\ + } +union { UNSG32 u32dHubReg_busRstEn; + struct w32dHubReg_busRstEn; + }; +/////////////////////////////////////////////////////////// +#define GET32dHubReg_busRstDone_reg(r32) _BFGET_(r32, 0, 0) +#define SET32dHubReg_busRstDone_reg(r32,v) _BFSET_(r32, 0, 0,v) +#define GET16dHubReg_busRstDone_reg(r16) _BFGET_(r16, 0, 0) +#define SET16dHubReg_busRstDone_reg(r16,v) _BFSET_(r16, 0, 0,v) + +#define w32dHubReg_busRstDone {\ + UNSG32 ubusRstDone_reg : 1;\ + UNSG32 RSVDxC0C_b1 : 31;\ + } +union { UNSG32 u32dHubReg_busRstDone; + struct w32dHubReg_busRstDone; + }; +/////////////////////////////////////////////////////////// +#define GET32dHubReg_flowCtl_rAlpha(r32) _BFGET_(r32, 7, 0) +#define SET32dHubReg_flowCtl_rAlpha(r32,v) _BFSET_(r32, 7, 0,v) +#define GET16dHubReg_flowCtl_rAlpha(r16) _BFGET_(r16, 7, 0) +#define SET16dHubReg_flowCtl_rAlpha(r16,v) _BFSET_(r16, 7, 0,v) + +#define GET32dHubReg_flowCtl_wAlpha(r32) _BFGET_(r32,15, 8) +#define SET32dHubReg_flowCtl_wAlpha(r32,v) _BFSET_(r32,15, 8,v) +#define GET16dHubReg_flowCtl_wAlpha(r16) _BFGET_(r16,15, 8) +#define SET16dHubReg_flowCtl_wAlpha(r16,v) _BFSET_(r16,15, 8,v) + +#define w32dHubReg_flowCtl {\ + UNSG32 uflowCtl_rAlpha : 8;\ + UNSG32 uflowCtl_wAlpha : 8;\ + UNSG32 RSVDxC10_b16 : 16;\ + } +union { UNSG32 u32dHubReg_flowCtl; + struct w32dHubReg_flowCtl; + }; +/////////////////////////////////////////////////////////// +#define GET32dHubReg_axiCmdCol_rCnt(r32) _BFGET_(r32,15, 0) +#define SET32dHubReg_axiCmdCol_rCnt(r32,v) _BFSET_(r32,15, 0,v) +#define GET16dHubReg_axiCmdCol_rCnt(r16) _BFGET_(r16,15, 0) +#define SET16dHubReg_axiCmdCol_rCnt(r16,v) _BFSET_(r16,15, 0,v) + +#define GET32dHubReg_axiCmdCol_wCnt(r32) _BFGET_(r32,31,16) +#define SET32dHubReg_axiCmdCol_wCnt(r32,v) _BFSET_(r32,31,16,v) +#define GET16dHubReg_axiCmdCol_wCnt(r16) _BFGET_(r16,15, 0) +#define SET16dHubReg_axiCmdCol_wCnt(r16,v) _BFSET_(r16,15, 0,v) + +#define w32dHubReg_axiCmdCol {\ + UNSG32 uaxiCmdCol_rCnt : 16;\ + UNSG32 uaxiCmdCol_wCnt : 16;\ + } +union { UNSG32 u32dHubReg_axiCmdCol; + struct w32dHubReg_axiCmdCol; + }; +/////////////////////////////////////////////////////////// + UNSG8 RSVDxC18 [232]; +/////////////////////////////////////////////////////////// +} SIE_dHubReg; + +typedef union T32dHubReg_BUSY + { UNSG32 u32; + struct w32dHubReg_BUSY; + } T32dHubReg_BUSY; +typedef union T32dHubReg_PENDING + { UNSG32 u32; + struct w32dHubReg_PENDING; + } T32dHubReg_PENDING; +typedef union T32dHubReg_busRstEn + { UNSG32 u32; + struct w32dHubReg_busRstEn; + } T32dHubReg_busRstEn; +typedef union T32dHubReg_busRstDone + { UNSG32 u32; + struct w32dHubReg_busRstDone; + } T32dHubReg_busRstDone; +typedef union T32dHubReg_flowCtl + { UNSG32 u32; + struct w32dHubReg_flowCtl; + } T32dHubReg_flowCtl; +typedef union T32dHubReg_axiCmdCol + { UNSG32 u32; + struct w32dHubReg_axiCmdCol; + } T32dHubReg_axiCmdCol; +/////////////////////////////////////////////////////////// + +typedef union TdHubReg_BUSY + { UNSG32 u32[1]; + struct { + struct w32dHubReg_BUSY; + }; + } TdHubReg_BUSY; +typedef union TdHubReg_PENDING + { UNSG32 u32[1]; + struct { + struct w32dHubReg_PENDING; + }; + } TdHubReg_PENDING; +typedef union TdHubReg_busRstEn + { UNSG32 u32[1]; + struct { + struct w32dHubReg_busRstEn; + }; + } TdHubReg_busRstEn; +typedef union TdHubReg_busRstDone + { UNSG32 u32[1]; + struct { + struct w32dHubReg_busRstDone; + }; + } TdHubReg_busRstDone; +typedef union TdHubReg_flowCtl + { UNSG32 u32[1]; + struct { + struct w32dHubReg_flowCtl; + }; + } TdHubReg_flowCtl; +typedef union TdHubReg_axiCmdCol + { UNSG32 u32[1]; + struct { + struct w32dHubReg_axiCmdCol; + }; + } TdHubReg_axiCmdCol; + +/////////////////////////////////////////////////////////// +SIGN32 dHubReg_drvrd(SIE_dHubReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst); +SIGN32 dHubReg_drvwr(SIE_dHubReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); +void dHubReg_reset(SIE_dHubReg *p); +SIGN32 dHubReg_cmp (SIE_dHubReg *p, SIE_dHubReg *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); +#define dHubReg_check(p,pie,pfx,hLOG) dHubReg_cmp(p,pie,pfx,(void*)(hLOG),0,0) +#define dHubReg_print(p, pfx,hLOG) dHubReg_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubReg +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmd2D biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 MEM (W-) +/// %unsigned 32 addr +/// ### +/// * DRAM data address of the 2D buffer, in bytes. +/// ### +/// @ 0x00004 DESC (W-) +/// %unsigned 16 stride +/// ### +/// * Line stride size in bytes +/// ### +/// %unsigned 13 numLine +/// ### +/// * Number of lines in buffer. Size of 0 is forbidden. +/// ### +/// %unsigned 2 hdrLoop +/// ### +/// * Size of line-loop for choosing dHubCmdHDR +/// * 0 is treated as 4 +/// ### +/// %unsigned 1 interrupt +/// ### +/// * 1: raise interrupt upon whole 2D command finish. +/// * 1: set the last 1D command interrupt bit. +/// * 0 : use the default 1D command interrupt bit. +/// ### +/// @ 0x00008 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to enable the channel; 0 to pause the channel +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to reset the 2D engine. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00010 (P) +/// # 0x00010 HDR +/// $dHubCmdHDR HDR REG [4] +/// ### +/// * Headers used in generating dHubCmd for each line in looping order, loop size (1,2,3,4) specified by DESC_hdrLoop +/// * end dHubCmd2D +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 32B, bits: 182b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmd2D +#define h_dHubCmd2D (){} + +#define RA_dHubCmd2D_MEM 0x0000 + +#define BA_dHubCmd2D_MEM_addr 0x0000 +#define B16dHubCmd2D_MEM_addr 0x0000 +#define LSb32dHubCmd2D_MEM_addr 0 +#define LSb16dHubCmd2D_MEM_addr 0 +#define bdHubCmd2D_MEM_addr 32 +#define MSK32dHubCmd2D_MEM_addr 0xFFFFFFFF +/////////////////////////////////////////////////////////// +#define RA_dHubCmd2D_DESC 0x0004 + +#define BA_dHubCmd2D_DESC_stride 0x0004 +#define B16dHubCmd2D_DESC_stride 0x0004 +#define LSb32dHubCmd2D_DESC_stride 0 +#define LSb16dHubCmd2D_DESC_stride 0 +#define bdHubCmd2D_DESC_stride 16 +#define MSK32dHubCmd2D_DESC_stride 0x0000FFFF + +#define BA_dHubCmd2D_DESC_numLine 0x0006 +#define B16dHubCmd2D_DESC_numLine 0x0006 +#define LSb32dHubCmd2D_DESC_numLine 16 +#define LSb16dHubCmd2D_DESC_numLine 0 +#define bdHubCmd2D_DESC_numLine 13 +#define MSK32dHubCmd2D_DESC_numLine 0x1FFF0000 + +#define BA_dHubCmd2D_DESC_hdrLoop 0x0007 +#define B16dHubCmd2D_DESC_hdrLoop 0x0006 +#define LSb32dHubCmd2D_DESC_hdrLoop 29 +#define LSb16dHubCmd2D_DESC_hdrLoop 13 +#define bdHubCmd2D_DESC_hdrLoop 2 +#define MSK32dHubCmd2D_DESC_hdrLoop 0x60000000 + +#define BA_dHubCmd2D_DESC_interrupt 0x0007 +#define B16dHubCmd2D_DESC_interrupt 0x0006 +#define LSb32dHubCmd2D_DESC_interrupt 31 +#define LSb16dHubCmd2D_DESC_interrupt 15 +#define bdHubCmd2D_DESC_interrupt 1 +#define MSK32dHubCmd2D_DESC_interrupt 0x80000000 +/////////////////////////////////////////////////////////// +#define RA_dHubCmd2D_START 0x0008 + +#define BA_dHubCmd2D_START_EN 0x0008 +#define B16dHubCmd2D_START_EN 0x0008 +#define LSb32dHubCmd2D_START_EN 0 +#define LSb16dHubCmd2D_START_EN 0 +#define bdHubCmd2D_START_EN 1 +#define MSK32dHubCmd2D_START_EN 0x00000001 +/////////////////////////////////////////////////////////// +#define RA_dHubCmd2D_CLEAR 0x000C + +#define BA_dHubCmd2D_CLEAR_EN 0x000C +#define B16dHubCmd2D_CLEAR_EN 0x000C +#define LSb32dHubCmd2D_CLEAR_EN 0 +#define LSb16dHubCmd2D_CLEAR_EN 0 +#define bdHubCmd2D_CLEAR_EN 1 +#define MSK32dHubCmd2D_CLEAR_EN 0x00000001 +/////////////////////////////////////////////////////////// +#define RA_dHubCmd2D_HDR 0x0010 +/////////////////////////////////////////////////////////// + +typedef struct SIE_dHubCmd2D { +/////////////////////////////////////////////////////////// +#define GET32dHubCmd2D_MEM_addr(r32) _BFGET_(r32,31, 0) +#define SET32dHubCmd2D_MEM_addr(r32,v) _BFSET_(r32,31, 0,v) + +#define w32dHubCmd2D_MEM {\ + UNSG32 uMEM_addr : 32;\ + } +union { UNSG32 u32dHubCmd2D_MEM; + struct w32dHubCmd2D_MEM; + }; +/////////////////////////////////////////////////////////// +#define GET32dHubCmd2D_DESC_stride(r32) _BFGET_(r32,15, 0) +#define SET32dHubCmd2D_DESC_stride(r32,v) _BFSET_(r32,15, 0,v) +#define GET16dHubCmd2D_DESC_stride(r16) _BFGET_(r16,15, 0) +#define SET16dHubCmd2D_DESC_stride(r16,v) _BFSET_(r16,15, 0,v) + +#define GET32dHubCmd2D_DESC_numLine(r32) _BFGET_(r32,28,16) +#define SET32dHubCmd2D_DESC_numLine(r32,v) _BFSET_(r32,28,16,v) +#define GET16dHubCmd2D_DESC_numLine(r16) _BFGET_(r16,12, 0) +#define SET16dHubCmd2D_DESC_numLine(r16,v) _BFSET_(r16,12, 0,v) + +#define GET32dHubCmd2D_DESC_hdrLoop(r32) _BFGET_(r32,30,29) +#define SET32dHubCmd2D_DESC_hdrLoop(r32,v) _BFSET_(r32,30,29,v) +#define GET16dHubCmd2D_DESC_hdrLoop(r16) _BFGET_(r16,14,13) +#define SET16dHubCmd2D_DESC_hdrLoop(r16,v) _BFSET_(r16,14,13,v) + +#define GET32dHubCmd2D_DESC_interrupt(r32) _BFGET_(r32,31,31) +#define SET32dHubCmd2D_DESC_interrupt(r32,v) _BFSET_(r32,31,31,v) +#define GET16dHubCmd2D_DESC_interrupt(r16) _BFGET_(r16,15,15) +#define SET16dHubCmd2D_DESC_interrupt(r16,v) _BFSET_(r16,15,15,v) + +#define w32dHubCmd2D_DESC {\ + UNSG32 uDESC_stride : 16;\ + UNSG32 uDESC_numLine : 13;\ + UNSG32 uDESC_hdrLoop : 2;\ + UNSG32 uDESC_interrupt : 1;\ + } +union { UNSG32 u32dHubCmd2D_DESC; + struct w32dHubCmd2D_DESC; + }; +/////////////////////////////////////////////////////////// +#define GET32dHubCmd2D_START_EN(r32) _BFGET_(r32, 0, 0) +#define SET32dHubCmd2D_START_EN(r32,v) _BFSET_(r32, 0, 0,v) +#define GET16dHubCmd2D_START_EN(r16) _BFGET_(r16, 0, 0) +#define SET16dHubCmd2D_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + +#define w32dHubCmd2D_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } +union { UNSG32 u32dHubCmd2D_START; + struct w32dHubCmd2D_START; + }; +/////////////////////////////////////////////////////////// +#define GET32dHubCmd2D_CLEAR_EN(r32) _BFGET_(r32, 0, 0) +#define SET32dHubCmd2D_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) +#define GET16dHubCmd2D_CLEAR_EN(r16) _BFGET_(r16, 0, 0) +#define SET16dHubCmd2D_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + +#define w32dHubCmd2D_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } +union { UNSG32 u32dHubCmd2D_CLEAR; + struct w32dHubCmd2D_CLEAR; + }; +/////////////////////////////////////////////////////////// + SIE_dHubCmdHDR ie_HDR[4]; +/////////////////////////////////////////////////////////// +} SIE_dHubCmd2D; + +typedef union T32dHubCmd2D_MEM + { UNSG32 u32; + struct w32dHubCmd2D_MEM; + } T32dHubCmd2D_MEM; +typedef union T32dHubCmd2D_DESC + { UNSG32 u32; + struct w32dHubCmd2D_DESC; + } T32dHubCmd2D_DESC; +typedef union T32dHubCmd2D_START + { UNSG32 u32; + struct w32dHubCmd2D_START; + } T32dHubCmd2D_START; +typedef union T32dHubCmd2D_CLEAR + { UNSG32 u32; + struct w32dHubCmd2D_CLEAR; + } T32dHubCmd2D_CLEAR; +/////////////////////////////////////////////////////////// + +typedef union TdHubCmd2D_MEM + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_MEM; + }; + } TdHubCmd2D_MEM; +typedef union TdHubCmd2D_DESC + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_DESC; + }; + } TdHubCmd2D_DESC; +typedef union TdHubCmd2D_START + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_START; + }; + } TdHubCmd2D_START; +typedef union TdHubCmd2D_CLEAR + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_CLEAR; + }; + } TdHubCmd2D_CLEAR; + +/////////////////////////////////////////////////////////// +SIGN32 dHubCmd2D_drvrd(SIE_dHubCmd2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst); +SIGN32 dHubCmd2D_drvwr(SIE_dHubCmd2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); +void dHubCmd2D_reset(SIE_dHubCmd2D *p); +SIGN32 dHubCmd2D_cmp (SIE_dHubCmd2D *p, SIE_dHubCmd2D *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); +#define dHubCmd2D_check(p,pie,pfx,hLOG) dHubCmd2D_cmp(p,pie,pfx,(void*)(hLOG),0,0) +#define dHubCmd2D_print(p, pfx,hLOG) dHubCmd2D_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmd2D +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubQuery (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 RESP (R-) +/// %unsigned 16 ST +/// ### +/// * Dhub channel state machine status. +/// ### +/// %% 16 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 16b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubQuery +#define h_dHubQuery (){} + +#define RA_dHubQuery_RESP 0x0000 + +#define BA_dHubQuery_RESP_ST 0x0000 +#define B16dHubQuery_RESP_ST 0x0000 +#define LSb32dHubQuery_RESP_ST 0 +#define LSb16dHubQuery_RESP_ST 0 +#define bdHubQuery_RESP_ST 16 +#define MSK32dHubQuery_RESP_ST 0x0000FFFF +/////////////////////////////////////////////////////////// + +typedef struct SIE_dHubQuery { +/////////////////////////////////////////////////////////// +#define GET32dHubQuery_RESP_ST(r32) _BFGET_(r32,15, 0) +#define SET32dHubQuery_RESP_ST(r32,v) _BFSET_(r32,15, 0,v) +#define GET16dHubQuery_RESP_ST(r16) _BFGET_(r16,15, 0) +#define SET16dHubQuery_RESP_ST(r16,v) _BFSET_(r16,15, 0,v) + +#define w32dHubQuery_RESP {\ + UNSG32 uRESP_ST : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } +union { UNSG32 u32dHubQuery_RESP; + struct w32dHubQuery_RESP; + }; +/////////////////////////////////////////////////////////// +} SIE_dHubQuery; + +typedef union T32dHubQuery_RESP + { UNSG32 u32; + struct w32dHubQuery_RESP; + } T32dHubQuery_RESP; +/////////////////////////////////////////////////////////// + +typedef union TdHubQuery_RESP + { UNSG32 u32[1]; + struct { + struct w32dHubQuery_RESP; + }; + } TdHubQuery_RESP; + +/////////////////////////////////////////////////////////// +SIGN32 dHubQuery_drvrd(SIE_dHubQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst); +SIGN32 dHubQuery_drvwr(SIE_dHubQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); +void dHubQuery_reset(SIE_dHubQuery *p); +SIGN32 dHubQuery_cmp (SIE_dHubQuery *p, SIE_dHubQuery *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); +#define dHubQuery_check(p,pie,pfx,hLOG) dHubQuery_cmp(p,pie,pfx,(void*)(hLOG),0,0) +#define dHubQuery_print(p, pfx,hLOG) dHubQuery_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubQuery +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubReg2D biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 dHub +/// $dHubReg dHub REG +/// @ 0x00D00 ARR (P) +/// # 0x00D00 Cmd2D +/// $dHubCmd2D Cmd2D REG [16] +/// ### +/// * Up-to 16 2D channels. +/// * 2D Channel[N] is connected to dHub.Channel[N] command queue, that is, dHub.HBO.Channel[2N] +/// * Note: Number of 2D channels could be less than dHub channels (rest of are 1D only) +/// ### +/// @ 0x00F00 BUSY (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: no ongoing command is being processed +/// * 1: channel controller is busy +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00F04 (W-) +/// # # Stuffing bytes... +/// %% 480 +/// @ 0x00F40 (P) +/// # 0x00F40 CH_ST +/// $dHubQuery CH_ST MEM [16] +/// ### +/// * end dHubReg2D +/// ### +/// @ 0x00F80 (W-) +/// # # Stuffing bytes... +/// %% 1024 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4096B, bits: 6242b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubReg2D +#define h_dHubReg2D (){} + + #define RA_dHubReg2D_dHub 0x0000 + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_ARR 0x0D00 + #define RA_dHubReg2D_Cmd2D 0x0D00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_BUSY 0x0F00 + + #define BA_dHubReg2D_BUSY_ST 0x0F00 + #define B16dHubReg2D_BUSY_ST 0x0F00 + #define LSb32dHubReg2D_BUSY_ST 0 + #define LSb16dHubReg2D_BUSY_ST 0 + #define bdHubReg2D_BUSY_ST 16 + #define MSK32dHubReg2D_BUSY_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_CH_ST 0x0F40 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubReg2D { + /////////////////////////////////////////////////////////// + SIE_dHubReg ie_dHub; + /////////////////////////////////////////////////////////// + SIE_dHubCmd2D ie_Cmd2D[16]; + /////////////////////////////////////////////////////////// + #define GET32dHubReg2D_BUSY_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg2D_BUSY_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg2D_BUSY_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg2D_BUSY_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg2D_BUSY {\ + UNSG32 uBUSY_ST : 16;\ + UNSG32 RSVDxF00_b16 : 16;\ + } + union { UNSG32 u32dHubReg2D_BUSY; + struct w32dHubReg2D_BUSY; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxF04 [60]; + /////////////////////////////////////////////////////////// + SIE_dHubQuery ie_CH_ST[16]; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxF80 [128]; + /////////////////////////////////////////////////////////// + } SIE_dHubReg2D; + + typedef union T32dHubReg2D_BUSY + { UNSG32 u32; + struct w32dHubReg2D_BUSY; + } T32dHubReg2D_BUSY; + /////////////////////////////////////////////////////////// + + typedef union TdHubReg2D_BUSY + { UNSG32 u32[1]; + struct { + struct w32dHubReg2D_BUSY; + }; + } TdHubReg2D_BUSY; + + /////////////////////////////////////////////////////////// + SIGN32 dHubReg2D_drvrd(SIE_dHubReg2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubReg2D_drvwr(SIE_dHubReg2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubReg2D_reset(SIE_dHubReg2D *p); + SIGN32 dHubReg2D_cmp (SIE_dHubReg2D *p, SIE_dHubReg2D *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubReg2D_check(p,pie,pfx,hLOG) dHubReg2D_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubReg2D_print(p, pfx,hLOG) dHubReg2D_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubReg2D +//////////////////////////////////////////////////////////// + + + +#ifdef __cplusplus + } +#endif +#pragma pack() + +#endif +////// +/// ENDOFFILE: dHub.h +//////////////////////////////////////////////////////////// + diff --git a/arch/arm/mach-berlin/include/mach/galois_platform.h b/arch/arm/mach-berlin/include/mach/galois_platform.h index a91c2b22..e48f49d9 100644 --- a/arch/arm/mach-berlin/include/mach/galois_platform.h +++ b/arch/arm/mach-berlin/include/mach/galois_platform.h @@ -1,3 +1,19 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + #ifndef __GALOIS_PLATFORM_H #define __GALOIS_PLATFORM_H @@ -5,6 +21,10 @@ #define MEMMAP_CHIP_CTRL_REG_BASE 0xF7EA0000 #define MEMMAP_SM_REG_BASE 0xF7F80000 +#ifdef CONFIG_BERLIN2CDP +#define MEMMAP_CA7_REG_BASE 0xF7920000 +#endif + #define APB_GPIO_INST0_BASE (MEMMAP_APBPERIF_REG_BASE + 0x0400) #define APB_GPIO_INST1_BASE (MEMMAP_APBPERIF_REG_BASE + 0x0800) #define APB_GPIO_INST2_BASE (MEMMAP_APBPERIF_REG_BASE + 0x0C00) diff --git a/arch/arm/mach-berlin/include/mach/timex.h b/arch/arm/mach-berlin/include/mach/timex.h index dd31a91c..2607290c 100644 --- a/arch/arm/mach-berlin/include/mach/timex.h +++ b/arch/arm/mach-berlin/include/mach/timex.h @@ -1,3 +1,19 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + /* * Alert: Not all timers of the SoC family run at a frequency of 75MHz, * but we should be fine as long as we make our timers an exact multiple of diff --git a/arch/arm/mach-berlin/include/mach/uncompress.h b/arch/arm/mach-berlin/include/mach/uncompress.h index 10e2d34f..c19bf8f2 100644 --- a/arch/arm/mach-berlin/include/mach/uncompress.h +++ b/arch/arm/mach-berlin/include/mach/uncompress.h @@ -1,3 +1,19 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + #define putc(c) #define flush() #define arch_decomp_setup() diff --git a/arch/arm/mach-berlin/irq.c b/arch/arm/mach-berlin/irq.c index 9a99e1bc..570db3c1 100644 --- a/arch/arm/mach-berlin/irq.c +++ b/arch/arm/mach-berlin/irq.c @@ -285,12 +285,15 @@ static int __init apb_ictl_init(struct device_node *node, struct device_node *pa static const struct of_device_id berlin_dt_irq_match[] = { { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, + { .compatible = "arm,cortex-a15-gic", .data = gic_of_init, }, { .compatible = "snps,dw-apb-ictl", .data = apb_ictl_init, }, {}, }; void __init berlin_init_irq(void) { +#ifndef CONFIG_BERLIN2CDP l2x0_of_init(0x70c00000, 0xfeffffff); +#endif of_irq_init(berlin_dt_irq_match); } diff --git a/arch/arm/mach-berlin/modules/amp/Makefile b/arch/arm/mach-berlin/modules/amp/Makefile new file mode 100644 index 00000000..9d975779 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/Makefile @@ -0,0 +1,55 @@ + +# __LINUX_KERNEL__ is used in OS-independent header files +MV_DEFINE := -DBERLIN -DSoC_Galois -D__LINUX_KERNEL__ -D__CODE_LINK__=0 -DCPUINDEX=0 +MV_DEFINE += -DBERLIN_B_0=0x1000 -DBERLIN_C_0=0x2000 -DBERLIN_BG2=0x3000 -DBERLIN_BG2_Z2=0x3010 -DBERLIN_BG2_A0=0x3020 -DBERLIN_BG2_CD=0x3030 -DBERLIN_BG2CDP=0x3040 -DBERLIN_BG2_CT=0x3050 -DBERLIN_BG2_Q=0x3060 -DBERLIN_BG2_DTV=0x3070 +MV_DEFINE += -DBERLIN_BG2CDP_A0_EXT=0xA0 + +# define BERLIN_CHIP_VERSION +ifeq ($(CONFIG_BERLIN2CT),y) + MV_DEFINE += -DBERLIN_CHIP_VERSION=BERLIN_BG2_CT +endif +ifeq ($(CONFIG_ARCH_BERLIN2),y) + MV_DEFINE += -DBERLIN_CHIP_VERSION=BERLIN_BG2_A0 +endif +ifeq ($(CONFIG_BERLIN2Q),y) + MV_DEFINE += -DBERLIN_CHIP_VERSION=BERLIN_BG2_Q +endif +ifeq ($(CONFIG_BERLIN2DTV),y) + MV_DEFINE += -DBERLIN_CHIP_VERSION=BERLIN_BG2_DTV +endif +ifeq ($(CONFIG_BERLIN2CD),y) + MV_DEFINE += -DBERLIN_CHIP_VERSION=BERLIN_BG2_CD +endif +ifeq ($(CONFIG_BERLIN2CDP),y) + MV_DEFINE += -DBERLIN_CHIP_VERSION=BERLIN_BG2CDP +endif + +HEADER_PATH += -I$(srctree)/arch/arm/mach-berlin/modules/cc + +# separate shm for PE/AMP +ifeq ($(CONFIG_BERLIN_PE), y) +HEADER_PATH += -I$(srctree)/arch/arm/mach-berlin/modules/shm +else +HEADER_PATH += -I$(srctree)/arch/arm/mach-berlin/modules/shm_amp +endif + +# use cdp header +ifeq ($(CONFIG_BERLIN2CDP),y) +HEADER_PATH += -I$(srctree)/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp +endif + +ifeq ($(CONFIG_BERLIN2CD),y) +HEADER_PATH += -I$(srctree)/arch/arm/mach-berlin/modules/amp/asinc/bg2cd +endif + +ccflags-y += $(MV_DEFINE) $(HEADER_PATH) + +ccflags-y += -DBERLIN_SINGLE_CPU + +ifeq ($(CONFIG_BERLIN_FASTLOGO),y) +ccflags-y += -DBERLIN_BOOTLOGO +ccflags-y += -DCONFIG_BERLIN_FASTLOGO +endif + +obj-$(CONFIG_BERLIN_AMP) += amp_core.o +amp_core-objs := amp_driver.o avio_dhub_drv.o vmeta_sched_driver.o amp_dev_snd.o diff --git a/arch/arm/mach-berlin/modules/amp/amp_dev_snd.c b/arch/arm/mach-berlin/modules/amp/amp_dev_snd.c new file mode 100644 index 00000000..c73d014f --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/amp_dev_snd.c @@ -0,0 +1,1051 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ********************************************************************************/ + +/******************************************************************************* + System head files +*/ +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/******************************************************************************* + Local head files +*/ +#include "galois_io.h" +#include "cinclude.h" +#include "zspWrapper.h" + +#include "api_avio_dhub.h" +#include "shm_api.h" +#include "cc_msgq.h" +#include "cc_error.h" + +#include "amp_driver.h" +#include "amp_memmap.h" + +#include "amp_dev_snd.h" + +/******************************************************************************* + Macro Defined + */ + +#define AOUT_IOCTL_START_CMD 0xbeef2001 +#define AIP_IOCTL_START_CMD 0xbeef2002 +#define AIP_IOCTL_STOP_CMD 0xbeef2003 +#define APP_IOCTL_INIT_CMD 0xbeef3001 +#define APP_IOCTL_START_CMD 0xbeef3002 + +#define ADSP_ZSPINT2Soc_IRQ0 0 + +#define AMP_DEVICE_TAG "[amp_snd] " + +#define snd_trace(...) printk(KERN_WARNING AMP_DEVICE_TAG __VA_ARGS__) +#define snd_error(...) printk(KERN_ERR AMP_DEVICE_TAG __VA_ARGS__) + +extern int berlin_chip_revision; + +static int snd_dev_open(struct inode *inode, struct file *filp); +static int snd_dev_release(struct inode *inode, struct file *filp); +static long snd_dev_ioctl_unlocked(struct file *filp, unsigned int cmd, + unsigned long arg); + +/******************************************************************************* + Module Variable +*/ +typedef struct snd_cntx { + int owner; + unsigned int user_count; +}; + +static int snd_irqs[IRQ_AMP_MAX]; + +INT32 pri_audio_chanId_Z1[4] = + { avioDhubChMap_ag_MA0_R_Z1, avioDhubChMap_ag_MA1_R_Z1, avioDhubChMap_ag_MA2_R_Z1, + avioDhubChMap_ag_MA3_R_Z1 +}; + +INT32 pri_audio_chanId_A0[4] = + { avioDhubChMap_ag_MA0_R_A0, avioDhubChMap_ag_MA1_R_A0, avioDhubChMap_ag_MA2_R_A0, + avioDhubChMap_ag_MA3_R_A0 +}; + +static int enable_trace; + +static AOUT_PATH_CMD_FIFO *p_ma_fifo; +static AOUT_PATH_CMD_FIFO *p_sa_fifo; +static AOUT_PATH_CMD_FIFO *p_spdif_fifo; +static AOUT_PATH_CMD_FIFO *p_hdmi_fifo; +static HWAPP_CMD_FIFO *p_app_fifo; +static AIP_DMA_CMD_FIFO *p_aip_fifo; + +static int aip_i2s_pair; + +static DEFINE_SPINLOCK(aout_spinlock); +static DEFINE_SPINLOCK(app_spinlock); +static DEFINE_SPINLOCK(aip_spinlock); + +static void amp_ma_do_tasklet(unsigned long); +//static void amp_aip_do_tasklet(unsigned long); +static void amp_hdmi_do_tasklet(unsigned long); +static void amp_app_do_tasklet(unsigned long); +static void amp_zsp_do_tasklet(unsigned long); +#ifndef BERLIN_BG2_CD +static void amp_spdif_do_tasklet(unsigned long); +static void amp_sa_do_tasklet(unsigned long); +static void amp_pg_dhub_done_tasklet(unsigned long); +#endif +static void amp_rle_do_err_tasklet(unsigned long); +static void amp_rle_do_done_tasklet(unsigned long); + +static void aout_resume_cmd(int path_id); +static void aip_resume_cmd(void); + +static DECLARE_TASKLET_DISABLED(amp_ma_tasklet, amp_ma_do_tasklet, 0); +//static DECLARE_TASKLET_DISABLED(amp_aip_tasklet, amp_aip_do_tasklet, 0); +static DECLARE_TASKLET_DISABLED(amp_hdmi_tasklet, amp_hdmi_do_tasklet, 0); +static DECLARE_TASKLET_DISABLED(amp_app_tasklet, amp_app_do_tasklet, 0); +static DECLARE_TASKLET_DISABLED(amp_zsp_tasklet, amp_zsp_do_tasklet, 0); +#ifndef BERLIN_BG2_CD +static DECLARE_TASKLET_DISABLED(amp_spdif_tasklet, amp_spdif_do_tasklet, 0); +static DECLARE_TASKLET_DISABLED(amp_sa_tasklet, amp_sa_do_tasklet, 0); +static DECLARE_TASKLET_DISABLED(amp_pg_done_tasklet, + amp_pg_dhub_done_tasklet, 0); +static DECLARE_TASKLET_DISABLED(amp_rle_err_tasklet, amp_rle_do_err_tasklet, 0); +static DECLARE_TASKLET_DISABLED(amp_rle_done_tasklet, + amp_rle_do_done_tasklet, 0); +#endif + +static void amp_ma_do_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0, }; + + msg.m_MsgID = 1 << avioDhubChMap_ag_MA0_R_auto; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_AUD, &msg); + +} + +#if (BERLIN_CHIP_VERSION != BERLIN_BG2_CD) +static void amp_sa_do_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0, }; + +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) + msg.m_MsgID = 1 << avioDhubChMap_ag_SA_R; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_AUD, &msg); +#endif +} + +static void amp_spdif_do_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0, }; + +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) + msg.m_MsgID = 1 << avioDhubChMap_ag_SPDIF_R; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_AUD, &msg); +#endif +} + +static void amp_aip_do_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0, }; +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) + msg.m_MsgID = 1 << avioDhubChMap_vip_MIC0_W; + + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_AIP, &msg); +#endif +} +#endif + +static void amp_hdmi_do_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0, }; + + msg.m_MsgID = 1 << avioDhubChMap_vpp_HDMI_R_auto; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_AUD, &msg); +} + +static void amp_app_do_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0, }; + + msg.m_MsgID = 1 << avioDhubSemMap_ag_app_intr2; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_HWAPP, &msg); +} + +static void amp_zsp_do_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0, }; + + msg.m_MsgID = 1 << ADSP_ZSPINT2Soc_IRQ0; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_ZSP, &msg); +} + +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) +static void amp_pg_dhub_done_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0, }; + + msg.m_MsgID = 1 << avioDhubChMap_ag_PG_ENG_W; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_RLE, &msg); +} + +static void amp_rle_do_err_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0, }; + + msg.m_MsgID = 1 << avioDhubSemMap_ag_spu_intr0; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_RLE, &msg); +} + +static void amp_rle_do_done_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0, }; + + msg.m_MsgID = 1 << avioDhubSemMap_ag_spu_intr1; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_RLE, &msg); +} +#endif + +//static DEFINE_SPINLOCK(vmeta_spinlock); + +static void *AoutFifoGetKernelRdDMAInfo(AOUT_PATH_CMD_FIFO * p_aout_cmd_fifo, + int pair) +{ + void *pHandle; + pHandle = + &(p_aout_cmd_fifo->aout_dma_info[pair] + [p_aout_cmd_fifo->kernel_rd_offset]); + return pHandle; +} + +static void AoutFifoKernelRdUpdate(AOUT_PATH_CMD_FIFO * p_aout_cmd_fifo, + int adv) +{ + p_aout_cmd_fifo->kernel_rd_offset += adv; + if (p_aout_cmd_fifo->kernel_rd_offset >= p_aout_cmd_fifo->size) + p_aout_cmd_fifo->kernel_rd_offset -= p_aout_cmd_fifo->size; +} + +static int AoutFifoCheckKernelFullness(AOUT_PATH_CMD_FIFO * p_aout_cmd_fifo) +{ + int full; + full = p_aout_cmd_fifo->wr_offset - p_aout_cmd_fifo->kernel_rd_offset; + if (full < 0) + full += p_aout_cmd_fifo->size; + return full; +} + +static void aout_start_cmd(int *aout_info) +{ + int *p = aout_info; + int i, chanId; + AOUT_DMA_INFO *p_dma_info; + + if (*p == MULTI_PATH) { + p_ma_fifo = + (AOUT_PATH_CMD_FIFO *) MV_SHM_GetNonCacheVirtAddr(*(p + 1)); + for (i = 0; i < 4; i++) { + p_dma_info = (AOUT_DMA_INFO *) + AoutFifoGetKernelRdDMAInfo(p_ma_fifo, i); + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) + chanId = pri_audio_chanId_Z1[i]; + else + chanId = pri_audio_chanId_A0[i]; + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, + p_dma_info->addr0, + p_dma_info->size0, 0, 0, 0, + i == 0 ? 1 : 0, 0, 0); + } + } else if (*p == LoRo_PATH) { +#if !defined (BERLIN_BG2_CD) +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) +#endif + { + p_sa_fifo = + (AOUT_PATH_CMD_FIFO *) MV_SHM_GetNonCacheVirtAddr(*(p + 1)); + p_dma_info = + (AOUT_DMA_INFO *) AoutFifoGetKernelRdDMAInfo(p_sa_fifo, 0); + chanId = avioDhubChMap_ag_SA_R; + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, + p_dma_info->addr0, p_dma_info->size0, 0, + 0, 0, 1, 0, 0); + } + +#endif + } else if (*p == SPDIF_PATH) { +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) /* Z1/Z2 */ + { + p_spdif_fifo = + (AOUT_PATH_CMD_FIFO *) MV_SHM_GetNonCacheVirtAddr(*(p + 1)); + p_dma_info = + (AOUT_DMA_INFO *) AoutFifoGetKernelRdDMAInfo(p_spdif_fifo, + 0); + chanId = avioDhubChMap_ag_SPDIF_R_Z1; + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, + p_dma_info->addr0, p_dma_info->size0, 0, + 0, 0, 1, 0, 0); + } +#endif + } else if (*p == HDMI_PATH) { + p_hdmi_fifo = + (AOUT_PATH_CMD_FIFO *) MV_SHM_GetNonCacheVirtAddr(*(p + 1)); + p_dma_info = + (AOUT_DMA_INFO *) AoutFifoGetKernelRdDMAInfo(p_hdmi_fifo, + 0); + chanId = avioDhubChMap_vpp_HDMI_R_auto; + dhub_channel_write_cmd(&VPP_dhubHandle.dhub, chanId, + p_dma_info->addr0, p_dma_info->size0, 0, + 0, 0, 1, 0, 0); + } +} + +static void aout_resume_cmd(int path_id) +{ + AOUT_DMA_INFO *p_dma_info; + unsigned int i, chanId; + + if (path_id == MULTI_PATH) { + if (!p_ma_fifo->fifo_underflow) + AoutFifoKernelRdUpdate(p_ma_fifo, 1); + + if (AoutFifoCheckKernelFullness(p_ma_fifo)) { + p_ma_fifo->fifo_underflow = 0; + for (i = 0; i < 4; i++) { + p_dma_info = (AOUT_DMA_INFO *) + AoutFifoGetKernelRdDMAInfo(p_ma_fifo, i); + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) + chanId = pri_audio_chanId_Z1[i]; + else + chanId = pri_audio_chanId_A0[i]; + dhub_channel_write_cmd(&AG_dhubHandle.dhub, + chanId, + p_dma_info->addr0, + p_dma_info->size0, 0, 0, + 0, + (p_dma_info->size1 == 0 + && i == 0) ? 1 : 0, 0, + 0); + if (p_dma_info->size1) + dhub_channel_write_cmd(&AG_dhubHandle. + dhub, chanId, + p_dma_info-> + addr1, + p_dma_info-> + size1, 0, 0, 0, + (i == 0) ? 1 : 0, + 0, 0); + } + } else { + p_ma_fifo->fifo_underflow = 1; + for (i = 0; i < 4; i++) { + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) + chanId = pri_audio_chanId_Z1[i]; + else + chanId = pri_audio_chanId_A0[i]; + dhub_channel_write_cmd(&AG_dhubHandle.dhub, + chanId, + p_ma_fifo->zero_buffer, + p_ma_fifo-> + zero_buffer_size, 0, 0, + 0, i == 0 ? 1 : 0, 0, 0); + } + } + } else if (path_id == LoRo_PATH) { +#ifndef BERLIN_BG2_CD + if (!p_sa_fifo->fifo_underflow) + AoutFifoKernelRdUpdate(p_sa_fifo, 1); + + if (AoutFifoCheckKernelFullness(p_sa_fifo)) { + p_sa_fifo->fifo_underflow = 0; + p_dma_info = (AOUT_DMA_INFO *) + AoutFifoGetKernelRdDMAInfo(p_sa_fifo, 0); + chanId = avioDhubChMap_ag_SA_R; + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, + p_dma_info->addr0, + p_dma_info->size0, 0, 0, 0, + p_dma_info->size1 ? 0 : 1, 0, 0); + if (p_dma_info->size1) + dhub_channel_write_cmd(&AG_dhubHandle.dhub, + chanId, + p_dma_info->addr1, + p_dma_info->size1, 0, 0, + 0, 1, 0, 0); + } else { + p_sa_fifo->fifo_underflow = 1; + chanId = avioDhubChMap_ag_SA_R; + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, + p_sa_fifo->zero_buffer, + p_sa_fifo->zero_buffer_size, 0, + 0, 0, 1, 0, 0); + } +#endif + } else if (path_id == SPDIF_PATH) { +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) /* Z1/Z2 */ + { + if (!p_spdif_fifo->fifo_underflow) + AoutFifoKernelRdUpdate(p_spdif_fifo, 1); + + if (AoutFifoCheckKernelFullness(p_spdif_fifo)) { + p_spdif_fifo->fifo_underflow = 0; + p_dma_info = (AOUT_DMA_INFO *) + AoutFifoGetKernelRdDMAInfo(p_spdif_fifo, 0); + chanId = avioDhubChMap_ag_SPDIF_R_Z1; + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, + p_dma_info->addr0, + p_dma_info->size0, 0, 0, 0, + p_dma_info->size1 ? 0 : 1, 0, 0); + if (p_dma_info->size1) + dhub_channel_write_cmd(&AG_dhubHandle.dhub, + chanId, + p_dma_info->addr1, + p_dma_info->size1, 0, 0, + 0, 1, 0, 0); + } else { + p_spdif_fifo->fifo_underflow = 1; + chanId = avioDhubChMap_ag_SPDIF_R_Z1; + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, + p_spdif_fifo->zero_buffer, + p_spdif_fifo->zero_buffer_size, + 0, 0, 0, 1, 0, 0); + } + } +#endif + } else if (path_id == HDMI_PATH) { + if (!p_hdmi_fifo->fifo_underflow) + AoutFifoKernelRdUpdate(p_hdmi_fifo, 1); + + if (AoutFifoCheckKernelFullness(p_hdmi_fifo)) { + p_hdmi_fifo->fifo_underflow = 0; + p_dma_info = (AOUT_DMA_INFO *) + AoutFifoGetKernelRdDMAInfo(p_hdmi_fifo, 0); + chanId = avioDhubChMap_vpp_HDMI_R_auto; + dhub_channel_write_cmd(&VPP_dhubHandle.dhub, chanId, + p_dma_info->addr0, + p_dma_info->size0, 0, 0, 0, + p_dma_info->size1 ? 0 : 1, 0, 0); + if (p_dma_info->size1) + dhub_channel_write_cmd(&VPP_dhubHandle.dhub, + chanId, + p_dma_info->addr1, + p_dma_info->size1, 0, 0, + 0, 1, 0, 0); + } else { + p_hdmi_fifo->fifo_underflow = 1; + chanId = avioDhubChMap_vpp_HDMI_R_auto; + dhub_channel_write_cmd(&VPP_dhubHandle.dhub, chanId, + p_hdmi_fifo->zero_buffer, + p_hdmi_fifo->zero_buffer_size, 0, + 0, 0, 1, 0, 0); + } + } +} + +static void *AIPFifoGetKernelPreRdDMAInfo(AIP_DMA_CMD_FIFO * p_aip_cmd_fifo, + int pair) +{ + void *pHandle; + int rd_offset = p_aip_cmd_fifo->kernel_pre_rd_offset; + pHandle = &(p_aip_cmd_fifo->aip_dma_cmd[pair][rd_offset]); + return pHandle; +} + +static void AIPFifoKernelPreRdUpdate(AIP_DMA_CMD_FIFO * p_aip_cmd_fifo, int adv) +{ + int tmp; + tmp = p_aip_cmd_fifo->kernel_pre_rd_offset + adv; + p_aip_cmd_fifo->kernel_pre_rd_offset = tmp >= p_aip_cmd_fifo->size ? + tmp - p_aip_cmd_fifo->size : tmp; +} + +static void AIPFifoKernelRdUpdate(AIP_DMA_CMD_FIFO * p_aip_cmd_fifo, int adv) +{ + int tmp; + tmp = p_aip_cmd_fifo->kernel_rd_offset + adv; + p_aip_cmd_fifo->kernel_rd_offset = tmp >= p_aip_cmd_fifo->size ? + tmp - p_aip_cmd_fifo->size : tmp; +} + +static int AIPFifoCheckKernelFullness(AIP_DMA_CMD_FIFO * p_aip_cmd_fifo) +{ + int full; + full = p_aip_cmd_fifo->wr_offset - p_aip_cmd_fifo->kernel_pre_rd_offset; + if (full < 0) + full += p_aip_cmd_fifo->size; + return full; +} + +static void aip_start_cmd(int *aip_info) +{ + int *p = aip_info; + int chanId, pair; + AIP_DMA_CMD *p_dma_cmd; + +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) + if (*p == 1) { + aip_i2s_pair = 1; + p_aip_fifo = + (AIP_DMA_CMD_FIFO *) MV_SHM_GetNonCacheVirtAddr(*(p + 1)); + p_dma_cmd = + (AIP_DMA_CMD *) AIPFifoGetKernelPreRdDMAInfo(p_aip_fifo, 0); + + chanId = avioDhubChMap_vip_MIC0_W; + dhub_channel_write_cmd(&VIP_dhubHandle.dhub, chanId, + p_dma_cmd->addr0, p_dma_cmd->size0, 0, 0, + 0, 1, 0, 0); + AIPFifoKernelPreRdUpdate(p_aip_fifo, 1); + + // push 2nd dHub command + p_dma_cmd = + (AIP_DMA_CMD *) AIPFifoGetKernelPreRdDMAInfo(p_aip_fifo, 0); + chanId = avioDhubChMap_vip_MIC0_W; + dhub_channel_write_cmd(&VIP_dhubHandle.dhub, chanId, + p_dma_cmd->addr0, p_dma_cmd->size0, 0, 0, + 0, 1, 0, 0); + AIPFifoKernelPreRdUpdate(p_aip_fifo, 1); + } else if (*p == 4) { + /* 4 I2S will be introduced since BG2 A0 */ + aip_i2s_pair = 4; + p_aip_fifo = + (AIP_DMA_CMD_FIFO *) MV_SHM_GetNonCacheVirtAddr(*(p + 1)); + for (pair = 0; pair < 4; pair++) { + p_dma_cmd = + (AIP_DMA_CMD *) + AIPFifoGetKernelPreRdDMAInfo(p_aip_fifo, pair); + chanId = avioDhubChMap_vip_MIC0_W + pair; + dhub_channel_write_cmd(&VIP_dhubHandle.dhub, chanId, + p_dma_cmd->addr0, + p_dma_cmd->size0, 0, 0, 0, 1, 0, + 0); + } + AIPFifoKernelPreRdUpdate(p_aip_fifo, 1); + + // push 2nd dHub command + for (pair = 0; pair < 4; pair++) { + p_dma_cmd = (AIP_DMA_CMD *) + AIPFifoGetKernelPreRdDMAInfo(p_aip_fifo, pair); + chanId = avioDhubChMap_vip_MIC0_W + pair; + dhub_channel_write_cmd(&VIP_dhubHandle.dhub, chanId, + p_dma_cmd->addr0, + p_dma_cmd->size0, 0, 0, 0, 1, 0, + 0); + } + AIPFifoKernelPreRdUpdate(p_aip_fifo, 1); + } +#endif +} + +static void aip_stop_cmd(void) +{ + return; +} + +static void aip_resume_cmd() +{ + AIP_DMA_CMD *p_dma_cmd; + unsigned int chanId; + int pair; + +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) + if (!p_aip_fifo->fifo_overflow) + AIPFifoKernelRdUpdate(p_aip_fifo, 1); + + if (AIPFifoCheckKernelFullness(p_aip_fifo)) { + p_aip_fifo->fifo_overflow = 0; + for (pair = 0; pair < aip_i2s_pair; pair++) { + p_dma_cmd = + (AIP_DMA_CMD *) + AIPFifoGetKernelPreRdDMAInfo(p_aip_fifo, pair); + chanId = avioDhubChMap_vip_MIC0_W + pair; + dhub_channel_write_cmd(&VIP_dhubHandle.dhub, chanId, + p_dma_cmd->addr0, + p_dma_cmd->size0, 0, 0, 0, + p_dma_cmd->addr1 ? 0 : 1, 0, 0); + if (p_dma_cmd->addr1) { + dhub_channel_write_cmd(&VIP_dhubHandle.dhub, + chanId, p_dma_cmd->addr1, + p_dma_cmd->size1, 0, 0, + 0, 1, 0, 0); + } + } + AIPFifoKernelPreRdUpdate(p_aip_fifo, 1); + } else { + p_aip_fifo->fifo_overflow = 1; + p_aip_fifo->fifo_overflow_cnt++; + for (pair = 0; pair < aip_i2s_pair; pair++) { + /* FIXME: + *chanid should be changed if 4 pair is supported + */ + chanId = avioDhubChMap_vip_MIC0_W + pair; + dhub_channel_write_cmd(&VIP_dhubHandle.dhub, chanId, + p_aip_fifo->overflow_buffer, + p_aip_fifo->overflow_buffer_size, + 0, 0, 0, 1, 0, 0); + } + } +#endif +} + +static int HwAPPFifoCheckKernelFullness(HWAPP_CMD_FIFO * p_app_cmd_fifo) +{ + int full; + full = p_app_cmd_fifo->wr_offset - p_app_cmd_fifo->kernel_rd_offset; + if (full < 0) + full += p_app_cmd_fifo->size; + return full; +} + +static void *HwAPPFifoGetKernelInCoefRdCmdBuf(HWAPP_CMD_FIFO * p_app_cmd_fifo) +{ + void *pHandle; + pHandle = + &(p_app_cmd_fifo->in_coef_cmd[p_app_cmd_fifo->kernel_rd_offset]); + return pHandle; +} + +static void *HwAPPFifoGetKernelOutCoefRdCmdBuf(HWAPP_CMD_FIFO * p_app_cmd_fifo) +{ + void *pHandle; + pHandle = + &(p_app_cmd_fifo->out_coef_cmd[p_app_cmd_fifo->kernel_rd_offset]); + return pHandle; +} + +static void *HwAPPFifoGetKernelInDataRdCmdBuf(HWAPP_CMD_FIFO * p_app_cmd_fifo) +{ + void *pHandle; + pHandle = + &(p_app_cmd_fifo->in_data_cmd[p_app_cmd_fifo->kernel_rd_offset]); + return pHandle; +} + +static void *HwAPPFifoGetKernelOutDataRdCmdBuf(HWAPP_CMD_FIFO * p_app_cmd_fifo) +{ + void *pHandle; + pHandle = + &(p_app_cmd_fifo->out_data_cmd[p_app_cmd_fifo->kernel_rd_offset]); + return pHandle; +} + +static void HwAPPFifoUpdateIdleFlag(HWAPP_CMD_FIFO * p_app_cmd_fifo, int flag) +{ + p_app_cmd_fifo->kernel_idle = flag; +} + +static void HwAPPFifoKernelRdUpdate(HWAPP_CMD_FIFO * p_app_cmd_fifo, int adv) +{ + p_app_cmd_fifo->kernel_rd_offset += adv; + if (p_app_cmd_fifo->kernel_rd_offset >= p_app_cmd_fifo->size) + p_app_cmd_fifo->kernel_rd_offset -= p_app_cmd_fifo->size; +} + +static void app_start_cmd(HWAPP_CMD_FIFO * p_app_cmd_fifo) +{ + APP_CMD_BUFFER *p_in_coef_cmd, *p_out_coef_cmd; + APP_CMD_BUFFER *p_in_data_cmd, *p_out_data_cmd; + unsigned int chanId, PA, cmdSize; + +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) /* Z1/Z2 */ + { + if (HwAPPFifoCheckKernelFullness(p_app_cmd_fifo)) { + HwAPPFifoUpdateIdleFlag(p_app_cmd_fifo, 0); + p_in_coef_cmd = (APP_CMD_BUFFER *) + HwAPPFifoGetKernelInCoefRdCmdBuf(p_app_cmd_fifo); + chanId = avioDhubChMap_ag_APPCMD_R_Z1; + if (p_in_coef_cmd->cmd_len) { + PA = p_in_coef_cmd->cmd_buffer_hw_base; + cmdSize = p_in_coef_cmd->cmd_len * sizeof(int); + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, PA, + cmdSize, 0, 0, 0, 0, 0, 0); + } + p_in_data_cmd = (APP_CMD_BUFFER *) + HwAPPFifoGetKernelInDataRdCmdBuf(p_app_cmd_fifo); + if (p_in_data_cmd->cmd_len) { + PA = p_in_data_cmd->cmd_buffer_hw_base; + cmdSize = p_in_data_cmd->cmd_len * sizeof(int); + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, PA, + cmdSize, 0, 0, 0, 0, 0, 0); + } + p_out_coef_cmd = (APP_CMD_BUFFER *) + HwAPPFifoGetKernelOutCoefRdCmdBuf(p_app_cmd_fifo); + chanId = avioDhubChMap_ag_APPCMD_R_Z1; + if (p_out_coef_cmd->cmd_len) { + PA = p_out_coef_cmd->cmd_buffer_hw_base; + cmdSize = p_out_coef_cmd->cmd_len * sizeof(int); + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, PA, + cmdSize, 0, 0, 0, 0, 0, 0); + } + p_out_data_cmd = (APP_CMD_BUFFER *) + HwAPPFifoGetKernelOutDataRdCmdBuf(p_app_cmd_fifo); + if (p_out_data_cmd->cmd_len) { + PA = p_out_data_cmd->cmd_buffer_hw_base; + cmdSize = p_out_data_cmd->cmd_len * sizeof(int); + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, PA, + cmdSize, 0, 0, 0, 0, 0, 0); + } + } else { + HwAPPFifoUpdateIdleFlag(p_app_cmd_fifo, 1); + } + } +#endif +} + +static void app_resume_cmd(HWAPP_CMD_FIFO * p_app_cmd_fifo) +{ +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) +#endif + { + HwAPPFifoKernelRdUpdate(p_app_cmd_fifo, 1); + app_start_cmd(p_app_cmd_fifo); + } +} +static irqreturn_t amp_devices_aout_isr(int irq, void *dev_id) +{ + int instat; + UNSG32 chanId; + HDL_semaphore *pSemHandle; + + pSemHandle = dhub_semaphore(&AG_dhubHandle.dhub); + instat = semaphore_chk_full(pSemHandle, -1); + + for (chanId = avioDhubChMap_ag_MA0_R_auto; chanId <= avioDhubChMap_ag_MA3_R_auto; + chanId++) { + if (bTST(instat, chanId)) { + semaphore_pop(pSemHandle, chanId, 1); + semaphore_clr_full(pSemHandle, chanId); + if (chanId == avioDhubChMap_ag_MA0_R_auto) { + aout_resume_cmd(MULTI_PATH); + tasklet_hi_schedule(&_ma_tasklet); + } + } + } + +#if !defined (BERLIN_BG2_CD) +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) +#if (BERLIN_CHIP_VERSION_EXT < BERLIN_BG2CDP_A0_EXT) /* CDP Z1/Z2 */ + { + chanId = avioDhubChMap_ag_SA_R; + if (bTST(instat, chanId)) { + semaphore_pop(pSemHandle, chanId, 1); + semaphore_clr_full(pSemHandle, chanId); + aout_resume_cmd(LoRo_PATH); + tasklet_hi_schedule(&_sa_tasklet); + } + + chanId = avioDhubChMap_ag_SPDIF_R; + if (bTST(instat, chanId)) { + semaphore_pop(pSemHandle, chanId, 1); + semaphore_clr_full(pSemHandle, chanId); + aout_resume_cmd(SPDIF_PATH); + tasklet_hi_schedule(&_spdif_tasklet); + } + } +#endif +#endif +#endif +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) +#endif + { + chanId = avioDhubSemMap_ag_app_intr2; + if (bTST(instat, chanId)) { + semaphore_pop(pSemHandle, chanId, 1); + semaphore_clr_full(pSemHandle, chanId); + app_resume_cmd(p_app_fifo); + tasklet_hi_schedule(&_app_tasklet); + } + } + +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) +#ifndef BERLIN_BG2_CD + chanId = avioDhubChMap_ag_PG_ENG_W; + if (bTST(instat, chanId)) { + semaphore_pop(pSemHandle, chanId, 1); + semaphore_clr_full(pSemHandle, chanId); + tasklet_hi_schedule(&_pg_done_tasklet); + } + + chanId = avioDhubSemMap_ag_spu_intr0; + if (bTST(instat, chanId)) { + semaphore_pop(pSemHandle, chanId, 1); + semaphore_clr_full(pSemHandle, chanId); + tasklet_hi_schedule(&_rle_err_tasklet); + } + + chanId = avioDhubSemMap_ag_spu_intr1; + if (bTST(instat, chanId)) { + semaphore_pop(pSemHandle, chanId, 1); + semaphore_clr_full(pSemHandle, chanId); + tasklet_hi_schedule(&_rle_done_tasklet); + } +#endif +#endif + return IRQ_HANDLED; +} + +static irqreturn_t amp_devices_zsp_isr(int irq, void *dev_id) +{ + UNSG32 addr, v_id; + T32ZspInt2Soc_status reg; + + addr = MEMMAP_ZSP_REG_BASE + RA_ZspRegs_Int2Soc + RA_ZspInt2Soc_status; + GA_REG_WORD32_READ(addr, &(reg.u32)); + + addr = MEMMAP_ZSP_REG_BASE + RA_ZspRegs_Int2Soc + RA_ZspInt2Soc_clear; + v_id = ADSP_ZSPINT2Soc_IRQ0; + if ((reg.u32) & (1 << v_id)) { + GA_REG_WORD32_WRITE(addr, v_id); + } + + tasklet_hi_schedule(&_zsp_tasklet); + + return IRQ_HANDLED; +} + +/******************************************************************************* + Module API + */ +int snd_dev_open(struct inode *inode, struct file *filp) +{ + unsigned int vec_num; + void *pHandle = &snd_dev.cdev; + int err = 0; + + /* initialize dhub */ +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) /* Z1/Z2 */ + { + DhubInitialization(CPUINDEX, VPP_DHUB_BASE, VPP_HBO_SRAM_BASE, + &VPP_dhubHandle, VPP_config, VPP_NUM_OF_CHANNELS_Z1); + DhubInitialization(CPUINDEX, AG_DHUB_BASE, AG_HBO_SRAM_BASE, + &AG_dhubHandle, AG_config, AG_NUM_OF_CHANNELS_Z1); + } + else /* A0 */ + { + DhubInitialization(CPUINDEX, VPP_DHUB_BASE, VPP_HBO_SRAM_BASE, + &VPP_dhubHandle, VPP_config_a0, VPP_NUM_OF_CHANNELS_A0); + DhubInitialization(CPUINDEX, AG_DHUB_BASE, AG_HBO_SRAM_BASE, + &AG_dhubHandle, AG_config_a0, AG_NUM_OF_CHANNELS_A0); + } +#else + { + DhubInitialization(CPUINDEX, VPP_DHUB_BASE, VPP_HBO_SRAM_BASE, + &VPP_dhubHandle, VPP_config, VPP_NUM_OF_CHANNELS); + DhubInitialization(CPUINDEX, AG_DHUB_BASE, AG_HBO_SRAM_BASE, + &AG_dhubHandle, AG_config, AG_NUM_OF_CHANNELS); + } +#endif +#if (BERLIN_CHIP_VERSION < BERLIN_BG2_DTV) +#if (BERLIN_CHIP_VERSION != BERLIN_BG2_CD) && (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) + + DhubInitialization(CPUINDEX, VIP_DHUB_BASE, VIP_HBO_SRAM_BASE, + &VIP_dhubHandle, VIP_config, VIP_NUM_OF_CHANNELS); +#endif +#endif + /* register and enable audio out ISR */ + vec_num = snd_irqs[IRQ_DHUBINTRAVIO1]; + err = + request_irq(vec_num, amp_devices_aout_isr, IRQF_DISABLED, + "amp_module_aout", pHandle); + if (unlikely(err < 0)) { + snd_error("vec_num:%5d, err:%8x\n", vec_num, err); + return err; + } + + snd_trace("snd_dev_open ok\n"); + + return 0; +} + +int snd_dev_release(struct inode *inode, struct file *filp) +{ + void *pHandle = &snd_dev.cdev; + + /* unregister audio out interrupt */ + free_irq(amp_irqs[IRQ_DHUBINTRAVIO1], pHandle); + + snd_trace("snd_dev_release ok\n"); + + return 0; +} + +long snd_dev_ioctl_unlocked(struct file *filp, unsigned int cmd, + unsigned long arg) +{ + int aout_info[2]; + int app_info[2]; + int aip_info[2]; + unsigned long aoutirq, appirq, aipirq; + + switch (cmd) { + + case AOUT_IOCTL_START_CMD: + if (copy_from_user + (aout_info, (void __user *)arg, 2 * sizeof(int))) + return -EFAULT; + spin_lock_irqsave(&aout_spinlock, aoutirq); + aout_start_cmd(aout_info); + spin_unlock_irqrestore(&aout_spinlock, aoutirq); + break; + + case AIP_IOCTL_START_CMD: + if (copy_from_user + (aip_info, (void __user *)arg, 2 * sizeof(int))) { + return -EFAULT; + } + spin_lock_irqsave(&aip_spinlock, aipirq); + aip_start_cmd(aip_info); + spin_unlock_irqrestore(&aip_spinlock, aipirq); + break; + + case AIP_IOCTL_STOP_CMD: + aip_stop_cmd(); + break; + + case APP_IOCTL_INIT_CMD: +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) +#endif + { + if (copy_from_user(app_info, (void __user *)arg, sizeof(int))) + return -EFAULT; + p_app_fifo = + (HWAPP_CMD_FIFO *) MV_SHM_GetCacheVirtAddr(*app_info); + } + break; + + case APP_IOCTL_START_CMD: +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) +#endif + { + spin_lock_irqsave(&app_spinlock, appirq); + app_start_cmd(p_app_fifo); + spin_unlock_irqrestore(&app_spinlock, appirq); + } + break; + default: + break; + } + + return 0; +} + +/******************************************************************************* + Module Register API + */ + +int snd_dev_init(struct amp_device_t *amp_dev, unsigned int user) +{ + struct device_node *np; + struct resource r; + +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) + np = of_find_compatible_node(NULL, NULL, "marvell,berlin-amp"); +#else //CD is using old driver + np = of_find_compatible_node(NULL, NULL, "mrvl,berlin-amp"); +#endif + if (!np) + return -ENODEV; + of_irq_to_resource(np, IRQ_DHUBINTRAVIO1, &r); + snd_irqs[IRQ_DHUBINTRAVIO1] = r.start; + of_node_put(np); + + tasklet_enable(&_ma_tasklet); +#if !defined (BERLIN_BG2_CD) +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) +#endif + { + tasklet_enable(&_sa_tasklet); + tasklet_enable(&_spdif_tasklet); + } +#endif + tasklet_enable(&_hdmi_tasklet); +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) +#endif + { + tasklet_enable(&_app_tasklet); + } +// tasklet_enable(&_aip_tasklet); + + return 0; +} + +int snd_dev_exit(struct amp_device_t *amp_dev, unsigned int user) +{ + tasklet_disable(&_ma_tasklet); +#if !defined (BERLIN_BG2_CD) +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) +#endif + { + tasklet_disable(&_sa_tasklet); + tasklet_disable(&_spdif_tasklet); + } +#endif + tasklet_disable(&_hdmi_tasklet); +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) +#endif + { + tasklet_disable(&_app_tasklet); + } +// tasklet_disable(&_aip_tasklet); + + return 0; +} + +static struct file_operations snd_ops = { + .open = snd_dev_open, + .release = snd_dev_release, + .unlocked_ioctl = snd_dev_ioctl_unlocked, + .owner = THIS_MODULE, +}; + +struct amp_device_t snd_dev = { + .dev_name = "amp_snd", + .minor = AMP_SND_MINOR, + .dev_init = snd_dev_init, + .dev_exit = snd_dev_exit, + .fops = &snd_ops, +}; diff --git a/arch/arm/mach-berlin/modules/amp/amp_dev_snd.h b/arch/arm/mach-berlin/modules/amp/amp_dev_snd.h new file mode 100644 index 00000000..13221946 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/amp_dev_snd.h @@ -0,0 +1,28 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ +#ifndef _AMP_DEV_SND_H_ +#define _AMP_DEV_SND_H_ + +/******************************************************************************* + System head files +*/ +extern struct amp_device_t snd_dev; + +int snd_dev_exit(struct amp_device_t *amp_dev, unsigned int user); + +int snd_dev_init(struct amp_device_t *amp_dev, unsigned int user); + +#endif //_AMP_DEV_SND_H_ diff --git a/arch/arm/mach-berlin/modules/amp/amp_driver.c b/arch/arm/mach-berlin/modules/amp/amp_driver.c new file mode 100644 index 00000000..d1412334 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/amp_driver.c @@ -0,0 +1,3919 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + +/******************************************************************************* + System head files + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/******************************************************************************* + Local head files + */ + +#include "galois_io.h" +#include "cinclude.h" +#include "zspWrapper.h" + +#include "api_avio_dhub.h" +#include "api_avif_dhub.h" +#include "avif_dhub_config.h" +#include "shm_api.h" +#include "cc_msgq.h" +#include "cc_error.h" + +#include "amp_driver.h" +#include "amp_memmap.h" +#include "vmeta_sched_driver.h" +#include "amp_dev_snd.h" + +#ifdef CONFIG_BERLIN_FASTLOGO +#include "../fastlogo/fastlogo_driver.h" +#endif +/******************************************************************************* + Module API defined + */ +// enable hrx intr hanlding +#define CONFIG_HRX_IOCTL_MSG 1 +// set 1 to enable message by ioctl +// set 0 to enable ICC message queue +#define CONFIG_VPP_IOCTL_MSG 1 +// when CONFIG_VPP_IOCTL_MSG is 1 +// set 1 to use internal message queue between isr and ioctl function +// set 0 to use no queue +#define CONFIG_VPP_ISR_MSGQ 1 + +// only enable when VPP use ioctl +#if CONFIG_VPP_IOCTL_MSG +// set 1 to enable message by ioctl +// set 0 to enable ICC message queue +#define CONFIG_VIP_IOCTL_MSG 1 +// when CONFIG_VIP_IOCTL_MSG is 1 +// set 1 to use internal message queue between isr and ioctl function +// set 0 to use no queue +#define CONFIG_VIP_ISR_MSGQ 1 +#endif + +#define CONFIG_VDEC_IRQ_CHECKER 1 + +#define AMP_DEVICE_NAME "ampcore" +#define AMP_DEVICE_TAG "[amp_driver] " +#define AMP_DEVICE_PATH ("/dev/" AMP_DEVICE_NAME) + +#define AMP_DEVICE_PROCFILE_STATUS "status" +#define AMP_DEVICE_PROCFILE_DETAIL "detail" + +#define VPP_CC_MSG_TYPE_VPP 0x00 +#define VPP_CC_MSG_TYPE_CEC 0x01 + +#define CONFIG_APP_IOCTL_MSG 1 + +#define ADSP_ZSPINT2Soc_IRQ0 0 + +#define VPP_IOCTL_VBI_DMA_CFGQ 0xbeef0001 +#define VPP_IOCTL_VBI_BCM_CFGQ 0xbeef0002 +#define VPP_IOCTL_VDE_BCM_CFGQ 0xbeef0003 +#define VPP_IOCTL_GET_MSG 0xbeef0004 +#define VPP_IOCTL_START_BCM_TRANSACTION 0xbeef0005 +#define VPP_IOCTL_BCM_SCHE_CMD 0xbeef0006 +#define VPP_IOCTL_INTR_MSG 0xbeef0007 +#define CEC_IOCTL_RX_MSG_BUF_MSG 0xbeef0008 + +#define VDEC_IOCTL_ENABLE_INT 0xbeef1001 +#define AOUT_IOCTL_START_CMD 0xbeef2001 +#define AIP_IOCTL_START_CMD 0xbeef2002 +#define AIP_IOCTL_STOP_CMD 0xbeef2003 +#define AIP_AVIF_IOCTL_START_CMD 0xbeef2004 +#define AIP_AVIF_IOCTL_STOP_CMD 0xbeef2005 +#define AIP_AVIF_IOCTL_SET_MODE 0xbeef2006 +#define APP_IOCTL_INIT_CMD 0xbeef3001 +#define APP_IOCTL_START_CMD 0xbeef3002 +#define APP_IOCTL_GET_MSG_CMD 0xbeef3003 + +#define VIP_IOCTL_GET_MSG 0xbeef4001 +#define VIP_IOCTL_VBI_BCM_CFGQ 0xbeef4002 +#define VIP_IOCTL_SD_WRE_CFGQ 0xbeef4003 +#define VIP_IOCTL_SD_RDE_CFGQ 0xbeef4004 +#define VIP_IOCTL_SEND_MSG 0xbeef4005 +#define VIP_IOCTL_VDE_BCM_CFGQ 0xbeef4006 +#define VIP_IOCTL_INTR_MSG 0xbeef4007 + +#define AVIF_IOCTL_GET_MSG 0xbeef6001 +#define AVIF_IOCTL_VBI_CFGQ 0xbeef6002 +#define AVIF_IOCTL_SD_WRE_CFGQ 0xbeef6003 +#define AVIF_IOCTL_SD_RDE_CFGQ 0xbeef6004 +#define AVIF_IOCTL_SEND_MSG 0xbeef6005 +#define AVIF_IOCTL_VDE_CFGQ 0xbeef6006 +#define AVIF_IOCTL_INTR_MSG 0xbeef6007 + +#define AVIF_HRX_IOCTL_GET_MSG 0xbeef6050 +#define AVIF_HRX_IOCTL_SEND_MSG 0xbeef6051 +#define AVIF_HRX_DESTROY_ISR_TASK 1 + +#define HDMIRX_IOCTL_GET_MSG 0xbeef5001 +#define HDMIRX_IOCTL_SEND_MSG 0xbeef5002 + +#define HRX_MSG_DESTROY_ISR_TASK 1 +//CEC MACRO +#define SM_APB_ICTL1_BASE 0xf7fce000 +#define SM_APB_GPIO0_BASE 0xf7fcc000 +#define SM_APB_GPIO1_BASE 0xf7fc5000 +#define APB_GPIO_PORTA_EOI 0x4c +#define APB_GPIO_INTSTATUS 0x40 +#define APB_ICTL_IRQ_STATUS_L 0x20 +#define BE_CEC_INTR_TX_SFT_FAIL 0x2008 // puneet +#define BE_CEC_INTR_TX_FAIL 0x200F +#define BE_CEC_INTR_TX_COMPLETE 0x0010 +#define BE_CEC_INTR_RX_COMPLETE 0x0020 +#define BE_CEC_INTR_RX_FAIL 0x00C0 +#define SOC_SM_CEC_BASE 0xF7FE1000 +#define CEC_INTR_STATUS0_REG_ADDR 0x0058 +#define CEC_INTR_STATUS1_REG_ADDR 0x0059 +#define CEC_INTR_ENABLE0_REG_ADDR 0x0048 +#define CEC_INTR_ENABLE1_REG_ADDR 0x0049 +#define CEC_RDY_ADDR 0x0008 +#define CEC_RX_BUF_READ_REG_ADDR 0x0068 +#define CEC_RX_EOM_READ_REG_ADDR 0x0069 +#define CEC_TOGGLE_FOR_READ_REG_ADDR 0x0004 +#define CEC_RX_RDY_ADDR 0x000c //01 +#define CEC_RX_FIFO_DPTR 0x0087 + +// HDMI RX Macros +#define SOC_VPP_BASE 0xf7f60000 + +#define HDMI_RX_BASE 0x3900 +#define HDMIRX_INTR_EN_0 HDMI_RX_BASE + 0x0160 +#define HDMIRX_INTR_EN_1 HDMI_RX_BASE + 0x0161 +#define HDMIRX_INTR_EN_2 HDMI_RX_BASE + 0x0162 +#define HDMIRX_INTR_EN_3 HDMI_RX_BASE + 0x0163 +#define HDMIRX_INTR_STATUS_0 HDMI_RX_BASE + 0x0164 +#define HDMIRX_INTR_STATUS_1 HDMI_RX_BASE + 0x0165 +#define HDMIRX_INTR_STATUS_2 HDMI_RX_BASE + 0x0166 +#define HDMIRX_INTR_STATUS_3 HDMI_RX_BASE + 0x0167 +#define HDMIRX_INTR_CLR_0 HDMI_RX_BASE + 0x0168 +#define HDMIRX_INTR_CLR_1 HDMI_RX_BASE + 0x0169 +#define HDMIRX_INTR_CLR_2 HDMI_RX_BASE + 0x016A +#define HDMIRX_INTR_CLR_3 HDMI_RX_BASE + 0x016B +#define HDMIRX_PHY_CAL_TRIG HDMI_RX_BASE + 0x0461 //new register +#define HDMIRX_PHY_PM_TRIG HDMI_RX_BASE + 0x0462 //new register + +#define HDMI_RX_INT_ACR_N 0x01 +#define HDMI_RX_INT_ACR_CTS 0x02 +#define HDMI_RX_INT_GCP_AVMUTE 0x04 +#define HDMI_RX_INT_GCP_COLOR_DEPTH 0x08 +#define HDMI_RX_INT_GCP_PHASE 0x10 +#define HDMI_RX_INT_ACP_PKT 0x20 +#define HDMI_RX_INT_ISRC1_PKT 0x40 +#define HDMI_RX_INT_ISRC2_PKT 0x80 +#define HDMI_RX_INT_ALL_INTR0 0xFF + +#define HDMI_RX_INT_GAMUT_PKT 0x01 +#define HDMI_RX_INT_VENDOR_PKT 0x02 +#define HDMI_RX_INT_AVI_INFO 0x04 +#define HDMI_RX_INT_SPD_INFO 0x08 +#define HDMI_RX_INT_AUD_INFO 0x10 +#define HDMI_RX_INT_MPEG_INFO 0x20 +#define HDMI_RX_INT_CHNL_STATUS 0x40 +#define HDMI_RX_INT_TMDS_MODE 0x80 +#define HDMI_RX_INT_ALL_INTR1 0xFF + +#define HDMI_RX_INT_AUTH_STARTED 0x01 +#define HDMI_RX_INT_AUTH_COMPLETE 0x02 +#define HDMI_RX_INT_VSYNC 0x04 // new +#define HDMI_RX_INT_VSI_STOP 0x10 // new +#define HDMI_RX_INT_SYNC_DET 0x20 +#define HDMI_RX_INT_VRES_CHG 0x40 +#define HDMI_RX_INT_HRES_CHG 0x80 +#define HDMI_RX_INT_ALL_INTR2 0xFF + +#define HDMI_RX_INT_5V_PWR 0x01 +#define HDMI_RX_INT_CLOCK_CHANGE 0x02 +#define HDMI_RX_INT_EDID 0x04 +#define HDMI_RX_INT_ALL_INTR3 0xFF + +#define HDMIRX_INTR_SYNC 0x01 +#define HDMIRX_INTR_HDCP 0x02 +#define HDMIRX_INTR_EDID 0x03 +#define HDMIRX_INTR_PKT 0x04 +#define HDMIRX_INTR_AVMUTE 0x05 +#define HDMIRX_INTR_TMDS 0x06 +#define HDMIRX_INTR_CHNL_STS 0x07 +#define HDMIRX_INTR_CLR_DEPTH 0x08 +#define HDMIRX_INTR_VSI_STOP 0x09 +#define HDMIRX_INTR_GMD_PKT 0x0A + +#ifdef BERLIN_BOOTLOGO +#define MEMMAP_AVIO_BCM_REG_BASE 0xF7B50000 +#define RA_AVIO_BCM_AUTOPUSH 0x0198 +#endif + + +#define SOC_AVIF_BASE 0xF7980000 +#define AVIF_HRX_BASE_OFFSET 0x800 +#define CPU_SS_MBASE_ADDR 0x960 + +#define CPU_INTR_MASK0_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x003D)<<2) +#define CPU_INTR_MASK1_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x0020)<<2) +#define CPU_INTR_MASK2_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x0021)<<2) +#define CPU_INTR_MASK3_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x0022)<<2) +#define CPU_INTR_MASK4_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x0023)<<2) + +#define CPU_INTR_MASK0_STATUS_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x003E)<<2) +#define CPU_INTR_MASK1_STATUS_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x0028)<<2) +#define CPU_INTR_MASK2_STATUS_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x0029)<<2) +#define CPU_INTR_MASK3_STATUS_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x002A)<<2) +#define CPU_INTR_MASK4_STATUS_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x002B)<<2) + +#define CPU_INTR_CLR0_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x004D)<<2) +#define CPU_INTR_CLR1_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x002C)<<2) +#define CPU_INTR_CLR2_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x002D)<<2) +#define CPU_INTR_CLR3_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x002E)<<2) +#define CPU_INTR_CLR4_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x002F)<<2) + +#define CPU_INTR_RAW_STATUS0_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x003C)<<2) +#define CPU_INTR_RAW_STATUS1_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x0024)<<2) +#define CPU_INTR_RAW_STATUS2_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x0025)<<2) +#define CPU_INTR_RAW_STATUS3_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x0026)<<2) +#define CPU_INTR_RAW_STATUS4_EXTREG_ADDR SOC_AVIF_BASE+((CPU_SS_MBASE_ADDR + 0x0027)<<2) +#define CPU_INTCPU_2_EXTCPU_MASK0INTR_ADDR SOC_AVIF_BASE+(CPU_SS_MBASE_ADDR + 0x0048)*4 +#define CPU_INTCPU_2_EXTCPU_INTR0_ADDR SOC_AVIF_BASE+(CPU_SS_MBASE_ADDR + 0x003F)*4 +#define CPU_INTCPU_2_EXTCPU_INTR1_ADDR SOC_AVIF_BASE+(CPU_SS_MBASE_ADDR + 0x0040)*4 +#define CPU_INTCPU_2_EXTCPU_INTR2_ADDR SOC_AVIF_BASE+(CPU_SS_MBASE_ADDR + 0x0041)*4 +#define CPU_INTCPU_2_EXTCPU_INTR3_ADDR SOC_AVIF_BASE+(CPU_SS_MBASE_ADDR + 0x0042)*4 +#define CPU_INTCPU_2_EXTCPU_INTR4_ADDR SOC_AVIF_BASE+(CPU_SS_MBASE_ADDR + 0x0043)*4 +#define CPU_INTCPU_2_EXTCPU_INTR5_ADDR SOC_AVIF_BASE+(CPU_SS_MBASE_ADDR + 0x0044)*4 +#define CPU_INTCPU_2_EXTCPU_INTR6_ADDR SOC_AVIF_BASE+(CPU_SS_MBASE_ADDR + 0x0045)*4 +#define CPU_INTCPU_2_EXTCPU_INTR7_ADDR SOC_AVIF_BASE+(CPU_SS_MBASE_ADDR + 0x0046)*4 + +//intr0 reg +#define AVIF_INTR_TIMER1 0x01 +#define AVIF_INTR_TIMER0 0x02 +#define AVIF_INTR_PIP_VDE 0x04 +#define AVIF_INTR_MAIN_VDE 0x08 +#define AVIF_INTR_VGA_SYNC_MON 0x10 +#define AVIF_INTR_VGA_DI 0x20 +#define AVIF_INTR_DELAYED_MAIN_VDE 0x40 +//intr1 reg +#define AVIF_INTR_DELAYED_PIP_VDE 0x20 + +#define AVIF_HRX_BASE 0x0C00 +#define AVIF_HRX_INTR_EN_0 SOC_AVIF_BASE+((AVIF_HRX_BASE + 0x0160)<<2) +#define AVIF_HRX_INTR_EN_1 SOC_AVIF_BASE+((AVIF_HRX_BASE + 0x0161)<<2) +#define AVIF_HRX_INTR_EN_2 SOC_AVIF_BASE+((AVIF_HRX_BASE + 0x0162)<<2) +#define AVIF_HRX_INTR_EN_3 SOC_AVIF_BASE+((AVIF_HRX_BASE + 0x0163)<<2) +#define AVIF_HRX_INTR_STATUS_0 SOC_AVIF_BASE+((AVIF_HRX_BASE + 0x0164)<<2) +#define AVIF_HRX_INTR_STATUS_1 SOC_AVIF_BASE+((AVIF_HRX_BASE + 0x0165)<<2) +#define AVIF_HRX_INTR_STATUS_2 SOC_AVIF_BASE+((AVIF_HRX_BASE + 0x0166)<<2) +#define AVIF_HRX_INTR_STATUS_3 SOC_AVIF_BASE+((AVIF_HRX_BASE + 0x0167)<<2) +#define AVIF_HRX_INTR_CLR_0 SOC_AVIF_BASE+((AVIF_HRX_BASE + 0x0168)<<2) +#define AVIF_HRX_INTR_CLR_1 SOC_AVIF_BASE+((AVIF_HRX_BASE + 0x0169)<<2) +#define AVIF_HRX_INTR_CLR_2 SOC_AVIF_BASE+((AVIF_HRX_BASE + 0x016A)<<2) +#define AVIF_HRX_INTR_CLR_3 SOC_AVIF_BASE+((AVIF_HRX_BASE + 0x016B)<<2) +#define AVIF_HRX_PHY_CAL_TRIG SOC_AVIF_BASE+((AVIF_HRX_BASE + 0x0461)<<2) //new register +#define AVIF_HRX_PHY_PM_TRIG SOC_AVIF_BASE+((AVIF_HRX_BASE + 0x0462)<<2) //new register + + + + +static int amp_driver_open(struct inode *inode, struct file *filp); +static int amp_driver_release(struct inode *inode, struct file *filp); +static long amp_driver_ioctl_unlocked(struct file *filp, unsigned int cmd, + unsigned long arg); + +/******************************************************************************* + Macro Defined + */ +#define ENABLE_DEBUG +#ifdef ENABLE_DEBUG +#define amp_debug(...) printk(KERN_DEBUG AMP_DEVICE_TAG __VA_ARGS__) +#else +#define amp_debug(...) +#endif + +#define amp_trace(...) printk(KERN_WARNING AMP_DEVICE_TAG __VA_ARGS__) +#define amp_error(...) printk(KERN_ERR AMP_DEVICE_TAG __VA_ARGS__) + +//#define VPP_DBG + +#define DEBUG_TIMER_VALUE (0xFFFFFFFF) + +/******************************************************************************* + Module Variable + */ + +#if CONFIG_VDEC_IRQ_CHECKER +static unsigned int vdec_int_cnt; +static unsigned int vdec_enable_int_cnt; +#endif + +int amp_irqs[IRQ_AMP_MAX]; + +int avioDhub_channel_num = 0x7; +int berlin_chip_revision = 0; + +int amp_major; +static struct cdev amp_dev; +static struct class *amp_dev_class; + +static struct file_operations amp_ops = { + .open = amp_driver_open, + .release = amp_driver_release, + .unlocked_ioctl = amp_driver_ioctl_unlocked, + .owner = THIS_MODULE, +}; + +typedef struct VPP_DMA_INFO_T { + UINT32 DmaAddr; + UINT32 DmaLen; + UINT32 cpcbID; +} VPP_DMA_INFO; + +typedef struct VPP_CEC_RX_MSG_BUF_T { + UINT8 buf[16]; + UINT8 len; +} VPP_CEC_RX_MSG_BUF; + +static VPP_DMA_INFO dma_info[3]; +static VPP_DMA_INFO vbi_bcm_info[3]; +static VPP_DMA_INFO vde_bcm_info[3]; +static unsigned int bcm_sche_cmd[6][2]; +static VPP_CEC_RX_MSG_BUF rx_buf; + +typedef struct VIP_DMA_INFO_T { + UINT32 DmaAddr; + UINT32 DmaLen; +} VIP_DMA_INFO; + +static VIP_DMA_INFO vip_dma_info; +static VIP_DMA_INFO vip_vbi_info; +static VIP_DMA_INFO vip_sd_wr_info; +static VIP_DMA_INFO vip_sd_rd_info; + +/////////////////////////////////////////NEW_ISR related +#define NEW_ISR +//This array stores all the VIP intrs enable/disable status +#define MAX_INTR_NUM 0x20 +static UINT32 vip_intr_status[MAX_INTR_NUM]; +static UINT32 vpp_intr_status[MAX_INTR_NUM]; + +typedef struct INTR_MSG_T { + UINT32 DhubSemMap; + UINT32 Enable; +} INTR_MSG; +/////////////////////////////////////////End of NEW_ISR + +static void amp_vip_do_tasklet(unsigned long); +DECLARE_TASKLET_DISABLED(amp_vip_tasklet, amp_vip_do_tasklet, 0); + +#define VIP_MSG_DESTROY_ISR_TASK 1 + + +#define AVIF_MSG_DESTROY_ISR_TASK 1 +typedef struct AVIF_DMA_INFO_T { + UINT32 DmaAddr; + UINT32 DmaLen; +} AVIF_DMA_INFO; + +static int IsPIPAudio; +//This array stores all the AVIF intrs enable/disable status +static UINT32 avif_intr_status[MAX_INTR_NUM]; +static void amp_avif_do_tasklet(unsigned long); +DECLARE_TASKLET_DISABLED(amp_avif_tasklet, amp_avif_do_tasklet, 0); + +static AOUT_PATH_CMD_FIFO *p_ma_fifo; +static AOUT_PATH_CMD_FIFO *p_sa_fifo; +static AOUT_PATH_CMD_FIFO *p_spdif_fifo; +static AOUT_PATH_CMD_FIFO *p_hdmi_fifo; +static HWAPP_CMD_FIFO *p_app_fifo; +static AIP_DMA_CMD_FIFO *p_aip_fifo = NULL; + +static int aip_i2s_pair; + +static struct proc_dir_entry *amp_driver_procdir; +static int vpp_cpcb0_vbi_int_cnt; +//static int vpp_cpcb2_vbi_int_cnt = 0; + +static DEFINE_SPINLOCK(bcm_spinlock); +static DEFINE_SPINLOCK(aout_spinlock); +static DEFINE_SPINLOCK(app_spinlock); +static DEFINE_SPINLOCK(aip_spinlock); +static DEFINE_SPINLOCK(msgQ_spinlock); + +static int dma_proc[3000]; + +static int dma_cnt; + +static void amp_vpp_do_tasklet(unsigned long); +static void amp_vpp_cec_do_tasklet(unsigned long); // cec tasklet added +static void amp_vdec_do_tasklet(unsigned long); + +static void amp_ma_do_tasklet(unsigned long); +//static void amp_aip_do_tasklet(unsigned long); +static void amp_hdmi_do_tasklet(unsigned long); +static void amp_app_do_tasklet(unsigned long); +static void amp_zsp_do_tasklet(unsigned long); +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) +static void amp_sa_do_tasklet(unsigned long); +static void amp_pg_dhub_done_tasklet(unsigned long); +static void amp_spdif_do_tasklet(unsigned long); +//static void amp_rle_do_err_tasklet(unsigned long); +//static void amp_rle_do_done_tasklet(unsigned long); +#endif +static void aout_resume_cmd(int path_id); +static void aip_resume_cmd(void); +static void amp_aip_avif_do_tasklet(unsigned long); +static void aip_avif_resume_cmd(void); + +static DECLARE_TASKLET_DISABLED(amp_vpp_tasklet, amp_vpp_do_tasklet, 0); +static DECLARE_TASKLET_DISABLED(amp_vpp_cec_tasklet, amp_vpp_cec_do_tasklet, 0); +static DECLARE_TASKLET_DISABLED(amp_vdec_tasklet, amp_vdec_do_tasklet, 0); +static DECLARE_TASKLET_DISABLED(amp_ma_tasklet, amp_ma_do_tasklet, 0); +//static DECLARE_TASKLET_DISABLED(amp_aip_tasklet, amp_aip_do_tasklet, 0); +static DECLARE_TASKLET_DISABLED(amp_hdmi_tasklet, amp_hdmi_do_tasklet, 0); +static DECLARE_TASKLET_DISABLED(amp_app_tasklet, amp_app_do_tasklet, 0); +static DECLARE_TASKLET_DISABLED(amp_zsp_tasklet, amp_zsp_do_tasklet, 0); +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) +static DECLARE_TASKLET_DISABLED(amp_aip_avif_tasklet, amp_aip_avif_do_tasklet, 0); +static DECLARE_TASKLET_DISABLED(amp_spdif_tasklet, amp_spdif_do_tasklet, 0); +static DECLARE_TASKLET_DISABLED(amp_sa_tasklet, amp_sa_do_tasklet, 0); +static DECLARE_TASKLET_DISABLED(amp_pg_done_tasklet, + amp_pg_dhub_done_tasklet, 0); +//static DECLARE_TASKLET_DISABLED(amp_rle_err_tasklet, amp_rle_do_err_tasklet, 0); +//static DECLARE_TASKLET_DISABLED(amp_rle_done_tasklet, amp_rle_do_done_tasklet, 0); +#endif + +#if CONFIG_VPP_IOCTL_MSG +static UINT vpp_intr_timestamp; +static DEFINE_SEMAPHORE(vpp_sem); +#endif + +#if CONFIG_VIP_IOCTL_MSG +static UINT vip_intr_timestamp; +static DEFINE_SEMAPHORE(vip_sem); +#endif + +#if CONFIG_VIP_IOCTL_MSG +static UINT hrx_intr_timestamp; +static DEFINE_SEMAPHORE(hrx_sem); +#endif + +static DEFINE_SEMAPHORE(avif_sem); +static DEFINE_SEMAPHORE(avif_hrx_sem); +#if defined (CONFIG_APP_IOCTL_MSG) +static UINT app_intr_timestamp; +static DEFINE_SEMAPHORE(app_sem); +#endif + +#if defined (CONFIG_VPP_ISR_MSGQ) || defined (CONFIG_APP_IOCTL_MSG) +struct amp_message_queue; +typedef struct amp_message_queue { + UINT q_length; + UINT rd_number; + UINT wr_number; + MV_CC_MSG_t *pMsg; + + HRESULT(*Add) (struct amp_message_queue * pMsgQ, MV_CC_MSG_t * pMsg); + HRESULT(*ReadTry) (struct amp_message_queue * pMsgQ, + MV_CC_MSG_t * pMsg); + HRESULT(*ReadFin) (struct amp_message_queue * pMsgQ); + HRESULT(*Destroy) (struct amp_message_queue * pMsgQ); + +} PEMsgQ_t; + +#if defined (CONFIG_VPP_ISR_MSGQ) +#define VPP_ISR_MSGQ_SIZE 8 + +static PEMsgQ_t hPEMsgQ; +#endif + +#if defined (CONFIG_APP_IOCTL_MSG) +#define APP_ISR_MSGQ_SIZE 16 + +static PEMsgQ_t hAPPMsgQ; +#endif + +static HRESULT PEMsgQ_Add(PEMsgQ_t * pMsgQ, MV_CC_MSG_t * pMsg) +{ + INT wr_offset; + + if (NULL == pMsgQ->pMsg || pMsg == NULL) + return S_FALSE; + + wr_offset = pMsgQ->wr_number - pMsgQ->rd_number; + + if (wr_offset == -1 || wr_offset == (pMsgQ->q_length - 2)) { + return S_FALSE; + } else { + memcpy((CHAR *) & pMsgQ->pMsg[pMsgQ->wr_number], (CHAR *) pMsg, + sizeof(MV_CC_MSG_t)); + pMsgQ->wr_number++; + pMsgQ->wr_number %= pMsgQ->q_length; + } + + return S_OK; +} + +static HRESULT PEMsgQ_ReadTry(PEMsgQ_t * pMsgQ, MV_CC_MSG_t * pMsg) +{ + INT rd_offset; + + if (NULL == pMsgQ->pMsg || pMsg == NULL) + return S_FALSE; + + rd_offset = pMsgQ->rd_number - pMsgQ->wr_number; + + if (rd_offset != 0) { + memcpy((CHAR *) pMsg, (CHAR *) & pMsgQ->pMsg[pMsgQ->rd_number], + sizeof(MV_CC_MSG_t)); + return S_OK; + } else { + amp_trace("VIP read message queue failed r: %d w: %d\n", pMsgQ->rd_number, pMsgQ->wr_number); + return S_FALSE; + } +} + +static HRESULT PEMsgQ_ReadFinish(PEMsgQ_t * pMsgQ) +{ + INT rd_offset; + + rd_offset = pMsgQ->rd_number - pMsgQ->wr_number; + + if (rd_offset != 0) { + pMsgQ->rd_number++; + pMsgQ->rd_number %= pMsgQ->q_length; + + return S_OK; + } else { + return S_FALSE; + } +} + +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) +#define MAX(a, b) ((a) > (b) ? (a) : (b)) + +static int PEMsgQ_Dequeue(PEMsgQ_t * pMsgQ, int cnt) +{ + INT fullness; + + if (cnt <= 0) + return -1; + + fullness = pMsgQ->wr_number - pMsgQ->rd_number; + if (fullness < 0) { + fullness += pMsgQ->q_length; + } + + cnt = MIN(fullness, cnt); + if (cnt) { + pMsgQ->rd_number += cnt; + if (pMsgQ->rd_number >= pMsgQ->q_length) + pMsgQ->rd_number -= pMsgQ->q_length; + } + return cnt; +} + +static int PEMsgQ_DequeueRead(PEMsgQ_t * pMsgQ, MV_CC_MSG_t * pMsg) +{ + INT fullness; + + if (NULL == pMsgQ->pMsg || pMsg == NULL) + return S_FALSE; + + fullness = pMsgQ->wr_number - pMsgQ->rd_number; + if (fullness < 0) { + fullness += pMsgQ->q_length; + } + + if (fullness) { + if (pMsg) + memcpy((void *)pMsg, + (void *)&pMsgQ->pMsg[pMsgQ->rd_number], + sizeof(MV_CC_MSG_t)); + + pMsgQ->rd_number++; + if (pMsgQ->rd_number >= pMsgQ->q_length) + pMsgQ->rd_number -= pMsgQ->q_length; + + return 1; + } + + return 0; +} + +static int PEMsgQ_Fullness(PEMsgQ_t * pMsgQ) +{ + INT fullness; + + fullness = pMsgQ->wr_number - pMsgQ->rd_number; + if (fullness < 0) { + fullness += pMsgQ->q_length; + } + + return fullness; +} + +static HRESULT PEMsgQ_Destroy(PEMsgQ_t * pMsgQ) +{ + if (pMsgQ == NULL) { + return E_FAIL; + } + + if (pMsgQ->pMsg) + kfree(pMsgQ->pMsg); + + return S_OK; +} + +static HRESULT PEMsgQ_Init(PEMsgQ_t * pPEMsgQ, UINT q_length) +{ + pPEMsgQ->q_length = q_length; + pPEMsgQ->rd_number = pPEMsgQ->wr_number = 0; + pPEMsgQ->pMsg = + (MV_CC_MSG_t *) kmalloc(sizeof(MV_CC_MSG_t) * q_length, GFP_ATOMIC); + + if (pPEMsgQ->pMsg == NULL) { + return E_OUTOFMEMORY; + } + + pPEMsgQ->Destroy = PEMsgQ_Destroy; + pPEMsgQ->Add = PEMsgQ_Add; + pPEMsgQ->ReadTry = PEMsgQ_ReadTry; + pPEMsgQ->ReadFin = PEMsgQ_ReadFinish; +// pPEMsgQ->Fullness = PEMsgQ_Fullness; + + return S_OK; +} + +#endif + +#if CONFIG_VIP_ISR_MSGQ +// MSGQ for VIP +#define VIP_ISR_MSGQ_SIZE 64 +static PEMsgQ_t hPEVIPMsgQ; +#endif +#define HDMIRX_ISR_MSGQ_SIZE 64 +static PEMsgQ_t hPEHRXMsgQ; + +static void amp_vip_do_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0 }; + + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_VIP, &msg); +} + +// MSGQ for AVIF +#define AVIF_ISR_MSGQ_SIZE 64 +#define AVIF_HRX_ISR_MSGQ_SIZE 64 +static PEMsgQ_t hPEAVIFMsgQ; +static PEMsgQ_t hPEAVIFHRXMsgQ; +static void amp_avif_do_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0 }; + + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_VIP, &msg); + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_AVIF, &msg); +} + +static void amp_vpp_do_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0 }; + UINT32 val; + + msg.m_MsgID = VPP_CC_MSG_TYPE_VPP; + + msg.m_Param1 = unused; + + GA_REG_WORD32_READ(0xf7e82C00 + 0x04 + 7 * 0x14, &val); + msg.m_Param2 = DEBUG_TIMER_VALUE - val; + + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_VPP, &msg); +} + +static void amp_vpp_cec_do_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0 }; + UINT32 val; + + msg.m_MsgID = VPP_CC_MSG_TYPE_CEC; + + msg.m_Param1 = unused; + + GA_REG_WORD32_READ(0xf7e82C00 + 0x04 + 7 * 0x14, &val); + msg.m_Param2 = DEBUG_TIMER_VALUE - val; + + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_VPP, &msg); +} + +static void amp_vdec_do_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0 }; + +#if CONFIG_VDEC_IRQ_CHECKER + msg.m_Param1 = vdec_int_cnt; +#endif + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_VDEC, &msg); +} + +static void MV_VPP_action(struct softirq_action *h) +{ + MV_CC_MSG_t msg = { 0, }; + + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_VPP, &msg); +// amp_trace("ISR conext irq:%d\n", vpp_cpcb0_vbi_int_cnt); +} + +static int vbi_bcm_cmd_fullcnt; +static int vde_bcm_cmd_fullcnt; + +static void start_vbi_bcm_transaction(int cpcbID) +{ + unsigned int bcm_sched_cmd[2]; + + if (vbi_bcm_info[cpcbID].DmaLen) { + dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), + avioDhubChMap_vpp_BCM_R_auto, + (INT) vbi_bcm_info[cpcbID].DmaAddr, + (INT) vbi_bcm_info[cpcbID].DmaLen * 8, + 0, 0, 0, 1, bcm_sched_cmd); + while (!BCM_SCHED_PushCmd(BCM_SCHED_Q12, bcm_sched_cmd, NULL)) { + vbi_bcm_cmd_fullcnt++; + } + } + /* invalid vbi_bcm_info */ + vbi_bcm_info[cpcbID].DmaLen = 0; +} + +static void start_vde_bcm_transaction(int cpcbID) +{ + unsigned int bcm_sched_cmd[2]; + + if (vde_bcm_info[cpcbID].DmaLen) { + dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), + avioDhubChMap_vpp_BCM_R_auto, + (INT) vde_bcm_info[cpcbID].DmaAddr, + (INT) vde_bcm_info[cpcbID].DmaLen * 8, + 0, 0, 0, 1, bcm_sched_cmd); + while (!BCM_SCHED_PushCmd(BCM_SCHED_Q12, bcm_sched_cmd, NULL)) { + vde_bcm_cmd_fullcnt++; + } + } + /* invalid vde_bcm_info */ + vde_bcm_info[cpcbID].DmaLen = 0; +} + +static void start_vbi_dma_transaction(int cpcbID) +{ + UINT32 cnt; + UINT32 *ptr; + + ptr = (UINT32 *) dma_info[cpcbID].DmaAddr; + for (cnt = 0; cnt < dma_info[cpcbID].DmaLen; cnt++) { + *((volatile int *)*(ptr + 1)) = *ptr; + ptr += 2; + } + /* invalid dma_info */ + dma_info[cpcbID].DmaLen = 0; +} + +static void send_bcm_sche_cmd(int q_id) +{ + if ((bcm_sche_cmd[q_id][0] != 0) && (bcm_sche_cmd[q_id][1] != 0)) + BCM_SCHED_PushCmd(q_id, bcm_sche_cmd[q_id], NULL); +} + +static void amp_ma_do_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0, }; + + msg.m_MsgID = 1 << avioDhubChMap_ag_MA0_R_auto; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_AUD, &msg); + +} + +static void amp_sa_do_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0, }; +#if (BERLIN_CHIP_VERSION != BERLIN_BG2_CD) && (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) + + msg.m_MsgID = 1 << avioDhubChMap_ag_SA_R; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_AUD, &msg); +#endif +} + +static void amp_spdif_do_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0, }; +#if (BERLIN_CHIP_VERSION != BERLIN_BG2_CD) && (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) + + msg.m_MsgID = 1 << avioDhubChMap_ag_SPDIF_R; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_AUD, &msg); +#endif +} + +static void amp_aip_do_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0, }; + +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) + msg.m_MsgID = 1 << avioDhubChMap_vip_MIC0_W; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_AIP, &msg); +#endif +} + +static void amp_aip_avif_do_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0, }; + if(IsPIPAudio) + msg.m_MsgID = 1 << avif_dhub_config_ChMap_avif_AUD_WR0_PIP; + else + msg.m_MsgID = 1 << avif_dhub_config_ChMap_avif_AUD_WR0_MAIN; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_AIP, &msg); +} + +static void amp_hdmi_do_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0, }; + + msg.m_MsgID = 1 << avioDhubChMap_vpp_HDMI_R_auto; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_AUD, &msg); +} + +static void amp_app_do_tasklet(unsigned long unused) +{ +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) +#endif + { + MV_CC_MSG_t msg = { 0, }; + + msg.m_MsgID = 1 << avioDhubSemMap_ag_app_intr2; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_HWAPP, &msg); + } +} + +static void amp_zsp_do_tasklet(unsigned long unused) +{ +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) +#endif + { + MV_CC_MSG_t msg = { 0, }; + + msg.m_MsgID = 1 << ADSP_ZSPINT2Soc_IRQ0; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_ZSP, &msg); + } +} + +#if (BERLIN_CHIP_VERSION != BERLIN_BG2_CD) && (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) +static void amp_pg_dhub_done_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0, }; + +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) + msg.m_MsgID = 1 << avioDhubChMap_ag_PG_ENG_W; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_RLE, &msg); +#endif +} + +static void amp_rle_do_err_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0, }; + +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) + msg.m_MsgID = 1 << avioDhubSemMap_ag_spu_intr0; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_RLE, &msg); +#endif +} + +static void amp_rle_do_done_tasklet(unsigned long unused) +{ + MV_CC_MSG_t msg = { 0, }; + +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) + msg.m_MsgID = 1 << avioDhubSemMap_ag_spu_intr1; + MV_CC_MsgQ_PostMsgByID(AMP_MODULE_MSG_ID_RLE, &msg); +#endif +} +#endif + +static irqreturn_t amp_devices_vpp_cec_isr(int irq, void *dev_id) +{ + UINT16 value = 0; + UINT16 reg = 0; + INT intr; + INT i; + INT dptr_len = 0; + HRESULT ret = S_OK; +#if CONFIG_VPP_IOCTL_MSG + GA_REG_WORD32_READ(0xf7e82C00 + 0x04 + 7 * 0x14, &vpp_intr_timestamp); + vpp_intr_timestamp = DEBUG_TIMER_VALUE - vpp_intr_timestamp; +#endif + + // Read CEC status register + GA_REG_BYTE_READ(SOC_SM_CEC_BASE + + (CEC_INTR_STATUS0_REG_ADDR << 2), &value); + reg = (UINT16) value; + GA_REG_BYTE_READ(SOC_SM_CEC_BASE + + (CEC_INTR_STATUS1_REG_ADDR << 2), &value); + reg |= ((UINT16) value << 8); + // Clear CEC interrupt + if (reg & BE_CEC_INTR_TX_FAIL) { + intr = BE_CEC_INTR_TX_FAIL; + GA_REG_BYTE_WRITE(SOC_SM_CEC_BASE + (CEC_RDY_ADDR << 2), 0x0); + GA_REG_BYTE_READ(SOC_SM_CEC_BASE + + (CEC_INTR_ENABLE0_REG_ADDR << 2), &value); + value &= ~(intr & 0x00ff); + GA_REG_BYTE_WRITE(SOC_SM_CEC_BASE + + (CEC_INTR_ENABLE0_REG_ADDR << 2), value); + } + if (reg & BE_CEC_INTR_TX_COMPLETE) { + intr = BE_CEC_INTR_TX_COMPLETE; + GA_REG_BYTE_READ(SOC_SM_CEC_BASE + + (CEC_INTR_ENABLE0_REG_ADDR << 2), &value); + value &= ~(intr & 0x00ff); + GA_REG_BYTE_WRITE(SOC_SM_CEC_BASE + + (CEC_INTR_ENABLE0_REG_ADDR << 2), value); + } + if (reg & BE_CEC_INTR_RX_FAIL) { + intr = BE_CEC_INTR_RX_FAIL; + GA_REG_BYTE_READ(SOC_SM_CEC_BASE + + (CEC_INTR_ENABLE0_REG_ADDR << 2), &value); + value &= ~(intr & 0x00ff); + GA_REG_BYTE_WRITE(SOC_SM_CEC_BASE + + (CEC_INTR_ENABLE0_REG_ADDR << 2), value); + } + if (reg & BE_CEC_INTR_RX_COMPLETE) { + intr = BE_CEC_INTR_RX_COMPLETE; + GA_REG_BYTE_READ(SOC_SM_CEC_BASE + + (CEC_INTR_ENABLE0_REG_ADDR << 2), &value); + value &= ~(intr & 0x00ff); + GA_REG_BYTE_WRITE(SOC_SM_CEC_BASE + + (CEC_INTR_ENABLE0_REG_ADDR << 2), value); + // read cec mesg from rx buffer + GA_REG_BYTE_READ(SOC_SM_CEC_BASE + (CEC_RX_FIFO_DPTR << 2), + &dptr_len); + rx_buf.len = dptr_len; + for (i = 0; i < dptr_len; i++) { + GA_REG_BYTE_READ(SOC_SM_CEC_BASE + + (CEC_RX_BUF_READ_REG_ADDR << 2), + &rx_buf.buf[i]); + GA_REG_BYTE_WRITE(SOC_SM_CEC_BASE + + (CEC_TOGGLE_FOR_READ_REG_ADDR << 2), + 0x01); + } + GA_REG_BYTE_WRITE(SOC_SM_CEC_BASE + (CEC_RX_RDY_ADDR << 2), + 0x00); + GA_REG_BYTE_WRITE(SOC_SM_CEC_BASE + (CEC_RX_RDY_ADDR << 2), + 0x01); + GA_REG_BYTE_READ(SOC_SM_CEC_BASE + + (CEC_INTR_ENABLE0_REG_ADDR << 2), &value); + value |= (intr & 0x00ff); + GA_REG_BYTE_WRITE(SOC_SM_CEC_BASE + + (CEC_INTR_ENABLE0_REG_ADDR << 2), value); + } + // schedule tasklet with intr status as param +#if CONFIG_VPP_IOCTL_MSG +#if CONFIG_VPP_ISR_MSGQ + { + MV_CC_MSG_t msg = + { VPP_CC_MSG_TYPE_CEC, reg, vpp_intr_timestamp }; + spin_lock(&msgQ_spinlock); + ret = PEMsgQ_Add(&hPEMsgQ, &msg); + spin_unlock(&msgQ_spinlock); + if (ret != S_OK) { + return IRQ_HANDLED; + } + + } +#else + vpp_instat = reg; +#endif + up(&vpp_sem); +#else + amp_vpp_cec_tasklet.data = reg; // bug fix puneet + tasklet_hi_schedule(&_vpp_cec_tasklet); +#endif + + //amp_vpp_cec_tasklet.data = reg; + //tasklet_hi_schedule(&_vpp_cec_tasklet); + return IRQ_HANDLED; +} + +#ifdef CONFIG_IRQ_LATENCY_PROFILE + +typedef struct amp_irq_profiler { + unsigned long long vppCPCB0_intr_curr; + unsigned long long vppCPCB0_intr_last; + unsigned long long vpp_task_sched_last; + unsigned long long vpp_isr_start; + + unsigned long long vpp_isr_end; + unsigned long vpp_isr_time_last; + + unsigned long vpp_isr_time_max; + unsigned long vpp_isr_instat_max; + + INT vpp_isr_last_instat; + +} amp_irq_profiler_t; + +static amp_irq_profiler_t amp_irq_profiler; + +#endif + +static atomic_t vpp_isr_msg_err_cnt = ATOMIC_INIT(0); +static atomic_t vip_isr_msg_err_cnt = ATOMIC_INIT(0); +static atomic_t avif_isr_msg_err_cnt = ATOMIC_INIT(0); + +static int isAmpReleased = 0; + +static irqreturn_t amp_devices_vpp_isr(int irq, void *dev_id) +{ + INT instat; + HDL_semaphore *pSemHandle; + INT vpp_intr = 0; + INT instat_used = 0; + HRESULT ret = S_OK; + /* disable interrupt */ +#if CONFIG_VPP_IOCTL_MSG + GA_REG_WORD32_READ(0xf7e82C00 + 0x04 + 7 * 0x14, &vpp_intr_timestamp); + vpp_intr_timestamp = DEBUG_TIMER_VALUE - vpp_intr_timestamp; +#endif + +#ifdef CONFIG_IRQ_LATENCY_PROFILE + amp_irq_profiler.vpp_isr_start = cpu_clock(smp_processor_id()); +#endif + + /* VPP interrupt handling */ + pSemHandle = dhub_semaphore(&VPP_dhubHandle.dhub); + instat = semaphore_chk_full(pSemHandle, -1); + + if (bTST(instat, avioDhubSemMap_vpp_vppCPCB0_intr) +#ifdef NEW_ISR + && (vpp_intr_status[avioDhubSemMap_vpp_vppCPCB0_intr]) +#endif + ) { +#ifdef NEW_ISR + vpp_intr |= bSETMASK(avioDhubSemMap_vpp_vppCPCB0_intr); +#else + vpp_intr = 1; +#endif + bSET(instat_used, avioDhubSemMap_vpp_vppCPCB0_intr); + +#ifdef CONFIG_IRQ_LATENCY_PROFILE + amp_irq_profiler.vppCPCB0_intr_curr = + cpu_clock(smp_processor_id()); +#endif + /* CPCB-0 interrupt */ + /* clear interrupt */ + semaphore_pop(pSemHandle, avioDhubSemMap_vpp_vppCPCB0_intr, 1); + semaphore_clr_full(pSemHandle, + avioDhubSemMap_vpp_vppCPCB0_intr); + + /* Clear the bits for CPCB0 VDE interrupt */ + if (bTST(instat, avioDhubSemMap_vpp_vppOUT4_intr)) { + semaphore_pop(pSemHandle, + avioDhubSemMap_vpp_vppOUT4_intr, 1); + semaphore_clr_full(pSemHandle, + avioDhubSemMap_vpp_vppOUT4_intr); + bCLR(instat, avioDhubSemMap_vpp_vppOUT4_intr); + } + + start_vbi_dma_transaction(0); + start_vbi_bcm_transaction(0); + send_bcm_sche_cmd(BCM_SCHED_Q0); + } + + if (bTST(instat, avioDhubSemMap_vpp_vppCPCB1_intr) +#ifdef NEW_ISR + && (vpp_intr_status[avioDhubSemMap_vpp_vppCPCB1_intr]) +#endif + ) { +#ifdef NEW_ISR + vpp_intr |= bSETMASK(avioDhubSemMap_vpp_vppCPCB1_intr); +#else + vpp_intr = 1; +#endif + bSET(instat_used, avioDhubSemMap_vpp_vppCPCB1_intr); + + /* CPCB-1 interrupt */ + /* clear interrupt */ + semaphore_pop(pSemHandle, avioDhubSemMap_vpp_vppCPCB1_intr, 1); + semaphore_clr_full(pSemHandle, + avioDhubSemMap_vpp_vppCPCB1_intr); + + /* Clear the bits for CPCB1 VDE interrupt */ + if (bTST(instat, avioDhubSemMap_vpp_vppOUT5_intr)) { + semaphore_pop(pSemHandle, + avioDhubSemMap_vpp_vppOUT5_intr, 1); + semaphore_clr_full(pSemHandle, + avioDhubSemMap_vpp_vppOUT5_intr); + bCLR(instat, avioDhubSemMap_vpp_vppOUT5_intr); + } + start_vbi_dma_transaction(1); + start_vbi_bcm_transaction(1); + send_bcm_sche_cmd(BCM_SCHED_Q1); + } + + if (bTST(instat, avioDhubSemMap_vpp_vppCPCB2_intr) +#ifdef NEW_ISR + && (vpp_intr_status[avioDhubSemMap_vpp_vppCPCB2_intr]) +#endif + ) { +#ifdef NEW_ISR + vpp_intr |= bSETMASK(avioDhubSemMap_vpp_vppCPCB2_intr); +#else + vpp_intr = 1; +#endif + bSET(instat_used, avioDhubSemMap_vpp_vppCPCB2_intr); + + /* CPCB-2 interrupt */ + /* clear interrupt */ + semaphore_pop(pSemHandle, avioDhubSemMap_vpp_vppCPCB2_intr, 1); + semaphore_clr_full(pSemHandle, + avioDhubSemMap_vpp_vppCPCB2_intr); + + /* Clear the bits for CPCB2 VDE interrupt */ + if (bTST(instat, avioDhubSemMap_vpp_vppOUT6_intr)) { + semaphore_pop(pSemHandle, + avioDhubSemMap_vpp_vppOUT6_intr, 1); + semaphore_clr_full(pSemHandle, + avioDhubSemMap_vpp_vppOUT6_intr); + bCLR(instat, avioDhubSemMap_vpp_vppOUT6_intr); + } + + start_vbi_dma_transaction(2); + start_vbi_bcm_transaction(2); + send_bcm_sche_cmd(BCM_SCHED_Q2); + } + + if (bTST(instat, avioDhubSemMap_vpp_vppOUT4_intr) +#ifdef NEW_ISR + && (vpp_intr_status[avioDhubSemMap_vpp_vppOUT4_intr]) +#endif + ) { +#ifdef NEW_ISR + vpp_intr |= bSETMASK(avioDhubSemMap_vpp_vppOUT4_intr); +#else + vpp_intr = 1; +#endif + bSET(instat_used, avioDhubSemMap_vpp_vppOUT4_intr); + + /* CPCB-0 VDE interrupt */ + /* clear interrupt */ + semaphore_pop(pSemHandle, avioDhubSemMap_vpp_vppOUT4_intr, 1); + semaphore_clr_full(pSemHandle, avioDhubSemMap_vpp_vppOUT4_intr); + + start_vde_bcm_transaction(0); + send_bcm_sche_cmd(BCM_SCHED_Q3); + } + + if (bTST(instat, avioDhubSemMap_vpp_vppOUT5_intr) +#ifdef NEW_ISR + && (vpp_intr_status[avioDhubSemMap_vpp_vppOUT5_intr]) +#endif + ) { +#ifdef NEW_ISR + vpp_intr |= bSETMASK(avioDhubSemMap_vpp_vppOUT5_intr); +#else + vpp_intr = 1; +#endif + bSET(instat_used, avioDhubSemMap_vpp_vppOUT5_intr); + + /* CPCB-1 VDE interrupt */ + /* clear interrupt */ + semaphore_pop(pSemHandle, avioDhubSemMap_vpp_vppOUT5_intr, 1); + semaphore_clr_full(pSemHandle, avioDhubSemMap_vpp_vppOUT5_intr); + + start_vde_bcm_transaction(1); + send_bcm_sche_cmd(BCM_SCHED_Q4); + } + + if (bTST(instat, avioDhubSemMap_vpp_vppOUT6_intr) +#ifdef NEW_ISR + && (vpp_intr_status[avioDhubSemMap_vpp_vppOUT6_intr]) +#endif + ) { +#ifdef NEW_ISR + vpp_intr |= bSETMASK(avioDhubSemMap_vpp_vppOUT6_intr); +#else + vpp_intr = 1; +#endif + bSET(instat_used, avioDhubSemMap_vpp_vppOUT6_intr); + + /* CPCB-2 VDE interrupt */ + /* clear interrupt */ + semaphore_pop(pSemHandle, avioDhubSemMap_vpp_vppOUT6_intr, 1); + semaphore_clr_full(pSemHandle, avioDhubSemMap_vpp_vppOUT6_intr); + + start_vde_bcm_transaction(2); + send_bcm_sche_cmd(BCM_SCHED_Q5); + } + + if (bTST(instat, avioDhubSemMap_vpp_vppOUT3_intr) +#ifdef NEW_ISR + && (vpp_intr_status[avioDhubSemMap_vpp_vppOUT3_intr]) +#endif + ) { +#ifdef NEW_ISR + vpp_intr |= bSETMASK(avioDhubSemMap_vpp_vppOUT3_intr); +#else + vpp_intr = 1; +#endif + bSET(instat_used, avioDhubSemMap_vpp_vppOUT3_intr); + + /* VOUT3 interrupt */ + /* clear interrupt */ + semaphore_pop(pSemHandle, avioDhubSemMap_vpp_vppOUT3_intr, 1); + semaphore_clr_full(pSemHandle, avioDhubSemMap_vpp_vppOUT3_intr); + } + +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) + if (bTST(instat, avioDhubSemMap_vpp_CH10_intr) +#ifdef NEW_ISR + && (vpp_intr_status[avioDhubSemMap_vpp_CH10_intr]) +#endif + ) { + bSET(instat_used, avioDhubSemMap_vpp_CH10_intr); + /* HDMI audio interrupt */ + /* clear interrupt */ + semaphore_pop(pSemHandle, avioDhubSemMap_vpp_CH10_intr, 1); + semaphore_clr_full(pSemHandle, avioDhubSemMap_vpp_CH10_intr); + aout_resume_cmd(HDMI_PATH); + tasklet_hi_schedule(&_hdmi_tasklet); + bCLR(instat, avioDhubSemMap_vpp_CH10_intr); + } +#else + if (bTST(instat, avioDhub_channel_num) +#ifdef NEW_ISR + && (vpp_intr_status[avioDhub_channel_num]) +#endif + ) { + bSET(instat_used, avioDhub_channel_num); + /* HDMI audio interrupt */ + /* clear interrupt */ + semaphore_pop(pSemHandle, avioDhub_channel_num, 1); + semaphore_clr_full(pSemHandle, avioDhub_channel_num); + + aout_resume_cmd(HDMI_PATH); + tasklet_hi_schedule(&_hdmi_tasklet); + bCLR(instat, avioDhub_channel_num); + } +#endif + + if (bTST(instat, avioDhubSemMap_vpp_vppOUT0_intr) +#ifdef NEW_ISR + && (vpp_intr_status[avioDhubSemMap_vpp_vppOUT0_intr]) +#endif + ) { +#ifdef NEW_ISR + vpp_intr |= bSETMASK(avioDhubSemMap_vpp_vppOUT0_intr); +#else + vpp_intr = 1; +#endif + bSET(instat_used, avioDhubSemMap_vpp_vppOUT0_intr); + + /* VOUT0 interrupt */ + /* clear interrupt */ + semaphore_pop(pSemHandle, avioDhubSemMap_vpp_vppOUT0_intr, 1); + semaphore_clr_full(pSemHandle, avioDhubSemMap_vpp_vppOUT0_intr); + } + + if (bTST(instat, avioDhubSemMap_vpp_vppOUT1_intr) +#ifdef NEW_ISR + && (vpp_intr_status[avioDhubSemMap_vpp_vppOUT1_intr]) +#endif + ) { +#ifdef NEW_ISR + vpp_intr |= bSETMASK(avioDhubSemMap_vpp_vppOUT1_intr); +#else + vpp_intr = 1; +#endif + bSET(instat_used, avioDhubSemMap_vpp_vppOUT1_intr); + + /* VOUT1 interrupt */ + /* clear interrupt */ + semaphore_pop(pSemHandle, avioDhubSemMap_vpp_vppOUT1_intr, 1); + semaphore_clr_full(pSemHandle, avioDhubSemMap_vpp_vppOUT1_intr); + } +#ifdef VPP_DBG +// amp_trace("ISR instat:%x\n", instat); +#endif + + if (vpp_intr) { +#if CONFIG_VPP_IOCTL_MSG + +#if CONFIG_VPP_ISR_MSGQ + MV_CC_MSG_t msg = { VPP_CC_MSG_TYPE_VPP, +#ifdef NEW_ISR + vpp_intr, +#else + instat, +#endif + vpp_intr_timestamp + }; + spin_lock(&msgQ_spinlock); + ret = PEMsgQ_Add(&hPEMsgQ, &msg); + spin_unlock(&msgQ_spinlock); + if (ret != S_OK) { + if (!atomic_read(&vpp_isr_msg_err_cnt)) { + amp_error + ("[vpp isr] MsgQ full\n"); + } + atomic_inc(&vpp_isr_msg_err_cnt); + return IRQ_HANDLED; + } +#else + vpp_instat = instat; +#endif + up(&vpp_sem); +#else + amp_vpp_tasklet.data = instat; + tasklet_hi_schedule(&_vpp_tasklet); +#endif + +#ifdef CONFIG_IRQ_LATENCY_PROFILE + + amp_irq_profiler.vpp_isr_end = cpu_clock(smp_processor_id()); + unsigned long isr_time = + amp_irq_profiler.vpp_isr_end - + amp_irq_profiler.vpp_isr_start; + int32_t jitter = 0; + isr_time /= 1000; + + if (bTST(instat, avioDhubSemMap_vpp_vppCPCB0_intr)) { + if (amp_irq_profiler.vppCPCB0_intr_last) { + jitter = + (int64_t) amp_irq_profiler. + vppCPCB0_intr_curr - + (int64_t) amp_irq_profiler. + vppCPCB0_intr_last; + + //nanosec_rem = do_div(interval, 1000000000); + // transform to us unit + jitter /= 1000; + jitter -= 16667; + } + amp_irq_profiler.vppCPCB0_intr_last = + amp_irq_profiler.vppCPCB0_intr_curr; + } + + if ((jitter > 670) || (jitter < -670) || (isr_time > 1000)) { + amp_trace + (" W/[vpp isr] jitter:%6d > +-670 us, instat:0x%x last_instat:" + "0x%0x max_instat:0x%0x, isr_time:%d us last:%d max:%d \n", + jitter, instat_used, + amp_irq_profiler.vpp_isr_last_instat, + amp_irq_profiler.vpp_isr_instat_max, isr_time, + amp_irq_profiler.vpp_isr_time_last, + amp_irq_profiler.vpp_isr_time_max); + } + + amp_irq_profiler.vpp_isr_last_instat = instat_used; + amp_irq_profiler.vpp_isr_time_last = isr_time; + + if (isr_time > amp_irq_profiler.vpp_isr_time_max) { + amp_irq_profiler.vpp_isr_time_max = isr_time; + amp_irq_profiler.vpp_isr_instat_max = instat_used; + } +#endif + } +#ifdef CONFIG_IRQ_LATENCY_PROFILE + else { + amp_irq_profiler.vpp_isr_end = cpu_clock(smp_processor_id()); + unsigned long isr_time = + amp_irq_profiler.vpp_isr_end - + amp_irq_profiler.vpp_isr_start; + isr_time /= 1000; + + if (isr_time > 1000) { + amp_trace("###isr_time:%d us instat:%x last:%x\n", + isr_time, vpp_intr, instat, + amp_irq_profiler.vpp_isr_last_instat); + } + + amp_irq_profiler.vpp_isr_time_last = isr_time; + } +#endif + + return IRQ_HANDLED; +} + +static void start_vip_vbi_bcm(void) +{ + unsigned int bcm_sched_cmd[2]; + + if (vip_vbi_info.DmaLen) { + dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), + avioDhubChMap_vpp_BCM_R_auto, + (INT) vip_vbi_info.DmaAddr, + (INT) vip_vbi_info.DmaLen * 8, 0, 0, + 0, 1, bcm_sched_cmd); + while (!BCM_SCHED_PushCmd(BCM_SCHED_Q12, bcm_sched_cmd, NULL)) ; + } + + /* invalid vbi_bcm_info */ + vip_vbi_info.DmaLen = 0; +} + +static void start_vip_dvi_bcm(void) +{ + unsigned int bcm_sched_cmd[2]; + + if (vip_dma_info.DmaLen) { + dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), + avioDhubChMap_vpp_BCM_R_auto, + (INT) vip_dma_info.DmaAddr, + (INT) vip_dma_info.DmaLen * 8, 0, 0, + 0, 1, bcm_sched_cmd); + while (!BCM_SCHED_PushCmd(BCM_SCHED_Q12, bcm_sched_cmd, NULL)) ; + } + /* invalid vbi_bcm_info */ + vip_dma_info.DmaLen = 0; +} + +static void start_vip_sd_wr_bcm(void) +{ + unsigned int bcm_sched_cmd[2]; + + if (vip_sd_wr_info.DmaLen) { + dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), + avioDhubChMap_vpp_BCM_R_auto, + (INT) vip_sd_wr_info.DmaAddr, + (INT) vip_sd_wr_info.DmaLen * 8, 0, 0, + 0, 1, bcm_sched_cmd); + while (!BCM_SCHED_PushCmd(BCM_SCHED_Q12, bcm_sched_cmd, NULL)) ; + } + /* invalid vbi_bcm_info */ + vip_sd_wr_info.DmaLen = 0; +} + +static void start_vip_sd_rd_bcm(void) +{ + unsigned int bcm_sched_cmd[2]; + + if (vip_sd_rd_info.DmaLen) { + dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), + avioDhubChMap_vpp_BCM_R_auto, + (INT) vip_sd_rd_info.DmaAddr, + (INT) vip_sd_rd_info.DmaLen * 8, 0, 0, + 0, 1, bcm_sched_cmd); + while (!BCM_SCHED_PushCmd(BCM_SCHED_Q12, bcm_sched_cmd, NULL)) ; + } + /* invalid vbi_bcm_info */ + vip_sd_rd_info.DmaLen = 0; +} + +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) +static irqreturn_t amp_devices_vip_isr(int irq, void *dev_id) +{ + INT instat; + HDL_semaphore *pSemHandle; + INT vip_intr = 0, hrx_intr = 0; + INT chanId; + UINT8 en2, en3, stat2, stat3, intr2, intr3, en0, en1, stat0, stat1, + intr0, intr1; + GA_REG_WORD32_READ(0xf7e82C00 + 0x04 + 7 * 0x14, &hrx_intr_timestamp); + hrx_intr_timestamp = DEBUG_TIMER_VALUE - hrx_intr_timestamp; + + /* VIP interrupt handling */ + pSemHandle = dhub_semaphore(&VIP_dhubHandle.dhub); + instat = semaphore_chk_full(pSemHandle, -1); + + if (bTST(instat, avioDhubSemMap_vip_wre_event_intr) +#ifdef NEW_ISR + && (vip_intr_status[avioDhubSemMap_vip_wre_event_intr]) +#endif + ) { + /* SD decoder write enable interrupt */ + semaphore_pop(pSemHandle, avioDhubSemMap_vip_wre_event_intr, 1); + semaphore_clr_full(pSemHandle, + avioDhubSemMap_vip_wre_event_intr); + +#ifdef NEW_ISR + vip_intr |= bSETMASK(avioDhubSemMap_vip_wre_event_intr); +#else + vip_intr = 1; +#endif + } + + if (bTST(instat, avioDhubSemMap_vip_dvi_vde_intr) +#ifdef NEW_ISR + && (vip_intr_status[avioDhubSemMap_vip_dvi_vde_intr]) +#endif + ) { + /* DVI VDE interrupt */ + semaphore_pop(pSemHandle, avioDhubSemMap_vip_dvi_vde_intr, 1); + semaphore_clr_full(pSemHandle, avioDhubSemMap_vip_dvi_vde_intr); + + start_vip_dvi_bcm(); +#ifdef NEW_ISR + vip_intr |= bSETMASK(avioDhubSemMap_vip_dvi_vde_intr); +#else + vip_intr = 1; +#endif + } + if (bTST(instat, avioDhubSemMap_vip_vbi_vde_intr) +#ifdef NEW_ISR + && (vip_intr_status[avioDhubSemMap_vip_vbi_vde_intr]) +#endif + ) { + /* VBI VDE interrupt */ + semaphore_pop(pSemHandle, avioDhubSemMap_vip_vbi_vde_intr, 1); + semaphore_clr_full(pSemHandle, avioDhubSemMap_vip_vbi_vde_intr); + + start_vip_vbi_bcm(); +#ifdef NEW_ISR + vip_intr |= bSETMASK(avioDhubSemMap_vip_vbi_vde_intr); +#else + vip_intr = 1; +#endif + } +#if CONFIG_HRX_IOCTL_MSG + if (bTST(instat, avioDhubSemMap_vip_hdmirx_intr)) { + + GA_REG_BYTE_READ(SOC_VPP_BASE + (HDMIRX_INTR_STATUS_2 << 2), + &stat2); + GA_REG_BYTE_READ(SOC_VPP_BASE + (HDMIRX_INTR_EN_2 << 2), &en2); + en2 = en2 & stat2; + + GA_REG_BYTE_READ(SOC_VPP_BASE + (HDMIRX_INTR_STATUS_3 << 2), + &stat3); + GA_REG_BYTE_READ(SOC_VPP_BASE + (HDMIRX_INTR_EN_3 << 2), &en3); + en3 = en3 & stat3; + GA_REG_BYTE_READ(SOC_VPP_BASE + (HDMIRX_INTR_STATUS_0 << 2), + &stat0); + GA_REG_BYTE_READ(SOC_VPP_BASE + (HDMIRX_INTR_EN_0 << 2), &en0); + en0 = en0 & stat0; + GA_REG_BYTE_READ(SOC_VPP_BASE + (HDMIRX_INTR_STATUS_1 << 2), + &stat1); + GA_REG_BYTE_READ(SOC_VPP_BASE + (HDMIRX_INTR_EN_1 << 2), &en1); + en1 = en1 & stat1; + hrx_intr = 0xff; + if ((en2 & (HDMI_RX_INT_VRES_CHG | HDMI_RX_INT_HRES_CHG)) || + (en3 & (HDMI_RX_INT_5V_PWR | HDMI_RX_INT_CLOCK_CHANGE))) { + hrx_intr = HDMIRX_INTR_SYNC; + GA_REG_BYTE_READ(SOC_VPP_BASE + (HDMIRX_INTR_EN_2 << 2), + &intr2); + GA_REG_BYTE_WRITE(SOC_VPP_BASE + + (HDMIRX_INTR_EN_2 << 2), + intr2 & ~(HDMI_RX_INT_SYNC_DET | + HDMI_RX_INT_VRES_CHG | + HDMI_RX_INT_HRES_CHG)); + GA_REG_BYTE_READ(SOC_VPP_BASE + (HDMIRX_INTR_EN_3 << 2), + &intr3); + GA_REG_BYTE_WRITE(SOC_VPP_BASE + + (HDMIRX_INTR_EN_3 << 2), + intr3 & ~(HDMI_RX_INT_5V_PWR | + HDMI_RX_INT_CLOCK_CHANGE)); + GA_REG_BYTE_WRITE(SOC_VPP_BASE + + (HDMIRX_INTR_EN_2 << 2), HDMI_RX_INT_AUTH_STARTED); + GA_REG_BYTE_WRITE(SOC_VPP_BASE + + (HDMIRX_INTR_EN_3 << 2), 0x0); + GA_REG_BYTE_WRITE(SOC_VPP_BASE + + (HDMIRX_INTR_EN_0 << 2), 0x0); + GA_REG_BYTE_WRITE(SOC_VPP_BASE + + (HDMIRX_INTR_EN_1 << 2), 0x0); + /* calibrate trigger */ + /* + GA_REG_BYTE_WRITE(SOC_VPP_BASE + (HDMIRX_PHY_CAL_TRIG << 2), 0x01); + GA_REG_BYTE_WRITE(SOC_VPP_BASE + (HDMIRX_PHY_CAL_TRIG << 2), 0x00); + */ + } else if (en0 & HDMI_RX_INT_GCP_AVMUTE) { + hrx_intr = HDMIRX_INTR_AVMUTE; + GA_REG_BYTE_READ(SOC_VPP_BASE + (HDMIRX_INTR_EN_0 << 2), + &intr0); + GA_REG_BYTE_WRITE(SOC_VPP_BASE + + (HDMIRX_INTR_EN_0 << 2), + intr0 & ~(HDMI_RX_INT_GCP_AVMUTE)); + } else if (en2 & HDMI_RX_INT_VSI_STOP) { + hrx_intr = HDMIRX_INTR_VSI_STOP; + GA_REG_BYTE_READ(SOC_VPP_BASE + (HDMIRX_INTR_EN_2 << 2), + &intr2); + GA_REG_BYTE_WRITE(SOC_VPP_BASE + + (HDMIRX_INTR_EN_2 << 2), + intr2 & ~(HDMI_RX_INT_VSI_STOP)); + } else if (en1 & + (HDMI_RX_INT_AVI_INFO | HDMI_RX_INT_VENDOR_PKT)) { + hrx_intr = HDMIRX_INTR_PKT; + GA_REG_BYTE_READ(SOC_VPP_BASE + (HDMIRX_INTR_EN_1 << 2), + &intr1); + GA_REG_BYTE_WRITE(SOC_VPP_BASE + + (HDMIRX_INTR_EN_1 << 2), + intr1 & ~(HDMI_RX_INT_AVI_INFO | + HDMI_RX_INT_VENDOR_PKT)); + } else if (en1 & HDMI_RX_INT_GAMUT_PKT) { + hrx_intr = HDMIRX_INTR_GMD_PKT; + GA_REG_BYTE_READ(SOC_VPP_BASE + (HDMIRX_INTR_EN_1 << 2), + &intr1); + GA_REG_BYTE_WRITE(SOC_VPP_BASE + + (HDMIRX_INTR_EN_1 << 2), + intr1 & ~(HDMI_RX_INT_GAMUT_PKT)); + } else if (en1 & + (HDMI_RX_INT_CHNL_STATUS | HDMI_RX_INT_AUD_INFO)) { + hrx_intr = HDMIRX_INTR_CHNL_STS; + GA_REG_BYTE_READ(SOC_VPP_BASE + (HDMIRX_INTR_EN_1 << 2), + &intr1); + GA_REG_BYTE_WRITE(SOC_VPP_BASE + + (HDMIRX_INTR_EN_1 << 2), + intr1 & ~(HDMI_RX_INT_CHNL_STATUS | + HDMI_RX_INT_AUD_INFO)); + } else if (en0 & HDMI_RX_INT_GCP_COLOR_DEPTH) { + hrx_intr = HDMIRX_INTR_CLR_DEPTH; + GA_REG_BYTE_READ(SOC_VPP_BASE + (HDMIRX_INTR_EN_0 << 2), + &intr0); + GA_REG_BYTE_WRITE(SOC_VPP_BASE + + (HDMIRX_INTR_EN_0 << 2), + intr0 & + ~(HDMI_RX_INT_GCP_COLOR_DEPTH)); + } + else if (en2 & (HDMI_RX_INT_AUTH_STARTED | HDMI_RX_INT_AUTH_COMPLETE)) { + hrx_intr = HDMIRX_INTR_HDCP; + //GA_REG_BYTE_READ(SOC_VPP_BASE + (HDMIRX_INTR_EN_2 <<2), &intr2); + //GA_REG_BYTE_WRITE(SOC_VPP_BASE + (HDMIRX_INTR_EN_2 <<2), intr2 & ~ (HDMI_RX_INT_AUTH_STARTED | HDMI_RX_INT_AUTH_COMPLETE)); + } + /* HDMI Rx interrupt */ + semaphore_pop(pSemHandle, avioDhubSemMap_vip_hdmirx_intr, 1); + semaphore_clr_full(pSemHandle, avioDhubSemMap_vip_hdmirx_intr); + if (hrx_intr != 0xff) { + /* process rx intr */ + MV_CC_MSG_t msg = { /*VPP_CC_MSG_TYPE_VPP */ 0, + hrx_intr, + hrx_intr_timestamp + }; + PEMsgQ_Add(&hPEHRXMsgQ, &msg); + up(&hrx_sem); + } + + } +#endif + + for (chanId = avioDhubChMap_vip_MIC0_W; + chanId <= avioDhubChMap_vip_MIC3_W; chanId++) { + if (bTST(instat, chanId)) { + semaphore_pop(pSemHandle, chanId, 1); + semaphore_clr_full(pSemHandle, chanId); + if (chanId == avioDhubChMap_vip_MIC0_W) { + spin_lock(&aip_spinlock); + aip_resume_cmd(); + spin_unlock(&aip_spinlock); + + tasklet_hi_schedule(&_aip_tasklet); + } + } + } + + if (vip_intr) { +#if CONFIG_VIP_IOCTL_MSG +#if CONFIG_VIP_ISR_MSGQ + MV_CC_MSG_t msg = { /*VPP_CC_MSG_TYPE_VPP */ 0, +#ifdef NEW_ISR + vip_intr, +#else + instat, +#endif + vip_intr_timestamp + }; + HRESULT ret = S_OK; + ret = PEMsgQ_Add(&hPEVIPMsgQ, &msg); + + if (ret != S_OK) { + if (!atomic_read(&vip_isr_msg_err_cnt)) { + amp_error("[VIP isr] MsgQ full\n"); + } + atomic_inc(&vip_isr_msg_err_cnt); + return IRQ_HANDLED; + } +#endif + up(&vip_sem); +#else + tasklet_hi_schedule(&_vip_tasklet); +#endif + } + + return IRQ_HANDLED; +} + +static irqreturn_t amp_devices_avif_isr(int irq, void *dev_id) +{ + HDL_semaphore *pSemHandle; + HRESULT rc = S_OK; + INT chanId; + INT channel; + INT instat, avif_intr = 0; + UINT8 enreg0, enreg1, enreg2, enreg3, enreg4; + UINT8 en0, en1, en2, en3; + UINT8 stat0, stat1, stat2, stat3; + UINT8 intr0, intr1,intr2, intr3; + UINT8 masksts0, masksts1, masksts2, masksts3, masksts4; + UINT8 decreg1, decreg2, regval; + UINT32 hdmi_port = 0; + UINT32 port_offset = 0; + UINT32 instat0 = 0, instat1 = 0; + INT hrx_intr = 0xff; + + GA_REG_BYTE_READ(CPU_INTR_MASK0_EXTREG_ADDR,&enreg0); + GA_REG_BYTE_READ(CPU_INTR_MASK0_STATUS_EXTREG_ADDR, &masksts0); + + GA_REG_BYTE_READ(CPU_INTR_MASK1_EXTREG_ADDR,&enreg1); + GA_REG_BYTE_READ(CPU_INTR_MASK1_STATUS_EXTREG_ADDR,&masksts1); + + GA_REG_BYTE_READ(CPU_INTR_MASK2_EXTREG_ADDR, &enreg2); + GA_REG_BYTE_READ(CPU_INTR_MASK2_STATUS_EXTREG_ADDR,&masksts2); + + GA_REG_BYTE_READ(CPU_INTR_MASK3_EXTREG_ADDR, &enreg3); + GA_REG_BYTE_READ(CPU_INTR_MASK3_STATUS_EXTREG_ADDR,&masksts3); + + GA_REG_BYTE_READ(CPU_INTR_MASK4_EXTREG_ADDR, &enreg4); + GA_REG_BYTE_READ(CPU_INTR_MASK4_STATUS_EXTREG_ADDR,&masksts4); + + instat0 = (masksts0 << 0) | (masksts1<<8) | (masksts2<<16) | (masksts3 <<24); + + GA_REG_BYTE_READ(CPU_INTCPU_2_EXTCPU_MASK0INTR_ADDR, ®val); + instat1 |= regval; + if(regval&0x1) + GA_REG_BYTE_WRITE(CPU_INTCPU_2_EXTCPU_INTR0_ADDR, 0x00); + if(regval&0x2) + GA_REG_BYTE_WRITE(CPU_INTCPU_2_EXTCPU_INTR1_ADDR, 0x00); + if(regval&0x4) + GA_REG_BYTE_WRITE(CPU_INTCPU_2_EXTCPU_INTR2_ADDR, 0x00); + if(regval&0x8) + GA_REG_BYTE_WRITE(CPU_INTCPU_2_EXTCPU_INTR3_ADDR, 0x00); + if(regval&0x10) + GA_REG_BYTE_WRITE(CPU_INTCPU_2_EXTCPU_INTR4_ADDR, 0x00); + if(regval&0x20) + GA_REG_BYTE_WRITE(CPU_INTCPU_2_EXTCPU_INTR5_ADDR, 0x00); + if(regval&0x40) + GA_REG_BYTE_WRITE(CPU_INTCPU_2_EXTCPU_INTR6_ADDR, 0x00); + if(regval&0x80) + GA_REG_BYTE_WRITE(CPU_INTCPU_2_EXTCPU_INTR7_ADDR, 0x00); + + //Clear interrupts + GA_REG_BYTE_WRITE(CPU_INTR_CLR0_EXTREG_ADDR, masksts0); + GA_REG_BYTE_WRITE(CPU_INTR_CLR1_EXTREG_ADDR, masksts1); + GA_REG_BYTE_WRITE(CPU_INTR_CLR2_EXTREG_ADDR, masksts2); + GA_REG_BYTE_WRITE(CPU_INTR_CLR3_EXTREG_ADDR, masksts3); + GA_REG_BYTE_WRITE(CPU_INTR_CLR4_EXTREG_ADDR, masksts4); + + /* DHUB Interrupt status */ + pSemHandle = dhub_semaphore(&AVIF_dhubHandle.dhub); + instat = semaphore_chk_full(pSemHandle, -1); + + if(masksts0 & (AVIF_INTR_PIP_VDE |AVIF_INTR_MAIN_VDE)) //VDE Interrupt + { + //VDE interrupt info to application + avif_intr = masksts0; + } + if (((masksts1 & 0x0F)&(~enreg1)) || ((masksts2 & 0x0F) & (~enreg2))) { + //Interrupt for which HDMI port + hdmi_port = (masksts1 & 0x0F) | (masksts2 & 0x0F); + + printk("HDMIRX interrupt from port %d\r\n", hdmi_port); + //hdmi_port = 0x01; // + if(hdmi_port == 0x01) + port_offset = 0x00; + else if(hdmi_port == 0x02) + port_offset = AVIF_HRX_BASE_OFFSET<<2; + else if(hdmi_port == 0x04) + port_offset = (2 * AVIF_HRX_BASE_OFFSET)<<2; + else + port_offset = (3 * AVIF_HRX_BASE_OFFSET)<<2; + + GA_REG_BYTE_READ(port_offset+AVIF_HRX_INTR_STATUS_2,&stat2); + GA_REG_BYTE_READ(port_offset+AVIF_HRX_INTR_EN_2, &en2); + en2 = en2 & stat2; + GA_REG_BYTE_READ(port_offset+AVIF_HRX_INTR_STATUS_3,&stat3); + GA_REG_BYTE_READ(port_offset+AVIF_HRX_INTR_EN_3, &en3); + en3 = en3 & stat3; + GA_REG_BYTE_READ(port_offset+AVIF_HRX_INTR_STATUS_0 ,&stat0); + GA_REG_BYTE_READ(port_offset+AVIF_HRX_INTR_EN_0, &en0); + en0 = en0 & stat0; + GA_REG_BYTE_READ(port_offset+AVIF_HRX_INTR_STATUS_1,&stat1); + GA_REG_BYTE_READ(port_offset+AVIF_HRX_INTR_EN_1, &en1); + en1 = en1 & stat1; + printk("enreg1 = 0x%x enreg2 = 0x%x masksts1 = 0x%x masksts2 = 0x%x en(0x%x 0x%x 0x%x 0x%x)\r\n", enreg1, enreg2, masksts1,masksts2,en0,en1,en2,en3); + hrx_intr = 0xff; + if ((en2 & (HDMI_RX_INT_VRES_CHG | HDMI_RX_INT_HRES_CHG)) || + (en3 & (HDMI_RX_INT_5V_PWR | HDMI_RX_INT_CLOCK_CHANGE))) { + hrx_intr = HDMIRX_INTR_SYNC; + GA_REG_BYTE_READ(port_offset+AVIF_HRX_INTR_EN_2,&intr2); + GA_REG_BYTE_WRITE(port_offset+AVIF_HRX_INTR_EN_2,intr2 & ~(HDMI_RX_INT_SYNC_DET | + HDMI_RX_INT_VRES_CHG |HDMI_RX_INT_HRES_CHG)); + GA_REG_BYTE_READ(port_offset+AVIF_HRX_INTR_EN_3,&intr3); + GA_REG_BYTE_WRITE(port_offset+AVIF_HRX_INTR_EN_3,intr3 & ~(HDMI_RX_INT_5V_PWR | + HDMI_RX_INT_CLOCK_CHANGE)); + GA_REG_BYTE_WRITE(port_offset+AVIF_HRX_INTR_EN_2, HDMI_RX_INT_AUTH_STARTED); + GA_REG_BYTE_WRITE(port_offset+AVIF_HRX_INTR_EN_3, 0x0); + GA_REG_BYTE_WRITE(port_offset+AVIF_HRX_INTR_EN_0, 0x0); + GA_REG_BYTE_WRITE(port_offset+AVIF_HRX_INTR_EN_1, 0x0); + + } else if (en0 & HDMI_RX_INT_GCP_AVMUTE) { + hrx_intr = HDMIRX_INTR_AVMUTE; + GA_REG_BYTE_READ(port_offset+AVIF_HRX_INTR_EN_0,&intr0); + GA_REG_BYTE_WRITE(port_offset+AVIF_HRX_INTR_EN_0, + intr0 & ~(HDMI_RX_INT_GCP_AVMUTE)); + } else if (en2 & HDMI_RX_INT_VSI_STOP) { + hrx_intr = HDMIRX_INTR_VSI_STOP; + GA_REG_BYTE_READ(port_offset+AVIF_HRX_INTR_EN_2,&intr2); + GA_REG_BYTE_WRITE(port_offset+AVIF_HRX_INTR_EN_2, + intr2 & ~(HDMI_RX_INT_VSI_STOP)); + } else if (en1 &(HDMI_RX_INT_AVI_INFO | HDMI_RX_INT_VENDOR_PKT)) { + hrx_intr = HDMIRX_INTR_PKT; + GA_REG_BYTE_READ(port_offset+AVIF_HRX_INTR_EN_1,&intr1); + GA_REG_BYTE_WRITE(port_offset+AVIF_HRX_INTR_EN_1, + intr1 & ~(HDMI_RX_INT_AVI_INFO |HDMI_RX_INT_VENDOR_PKT)); + } else if (en1 & HDMI_RX_INT_GAMUT_PKT) { + hrx_intr = HDMIRX_INTR_GMD_PKT; + GA_REG_BYTE_READ(port_offset+AVIF_HRX_INTR_EN_1 ,&intr1); + GA_REG_BYTE_WRITE(port_offset+AVIF_HRX_INTR_EN_1, + intr1 & ~(HDMI_RX_INT_GAMUT_PKT)); + } else if (en1 &(HDMI_RX_INT_CHNL_STATUS | HDMI_RX_INT_AUD_INFO)) { + hrx_intr = HDMIRX_INTR_CHNL_STS; + GA_REG_BYTE_READ(port_offset+AVIF_HRX_INTR_EN_1,&intr1); + GA_REG_BYTE_WRITE(port_offset+AVIF_HRX_INTR_EN_1, + intr1 & ~(HDMI_RX_INT_CHNL_STATUS |HDMI_RX_INT_AUD_INFO)); + } else if (en0 & HDMI_RX_INT_GCP_COLOR_DEPTH) { + hrx_intr = HDMIRX_INTR_CLR_DEPTH; + GA_REG_BYTE_READ(port_offset+AVIF_HRX_INTR_EN_0,&intr0); + GA_REG_BYTE_WRITE(port_offset+AVIF_HRX_INTR_EN_0, + intr0 &~(HDMI_RX_INT_GCP_COLOR_DEPTH)); + } + else if (en2 & (HDMI_RX_INT_AUTH_STARTED | HDMI_RX_INT_AUTH_COMPLETE)) { + hrx_intr = HDMIRX_INTR_HDCP; + } + } + if(IsPIPAudio) + channel = avif_dhub_config_ChMap_avif_AUD_WR0_PIP; + else + channel = avif_dhub_config_ChMap_avif_AUD_WR0_MAIN; + + //Audio DHUB INterrupt handling + for (chanId = channel;chanId <= (channel + 3); chanId++) { + if (bTST(instat, chanId)) { + semaphore_pop(pSemHandle, chanId, 1); + semaphore_clr_full(pSemHandle, chanId); + if (chanId == channel) { + aip_avif_resume_cmd(); + tasklet_hi_schedule(&_aip_avif_tasklet); + } + } + } + + /* HDMI Rx interrupt */ + if (hrx_intr != 0xff) { + printk("hrx_intr = 0x%x\r\n", hrx_intr); + //hrx_intr |= (hdmi_port << 24); //pass port info to the user driver + /* process rx intr */ + MV_CC_MSG_t msg = { /*VPP_CC_MSG_TYPE_VPP */ 0, + hrx_intr, //send port info also + hrx_intr_timestamp + }; + rc = PEMsgQ_Add(&hPEAVIFHRXMsgQ, &msg); + if (rc != S_OK) { + amp_error("[AVIF HRX isr] MsgQ full\n"); + return IRQ_HANDLED; + } + up(&avif_hrx_sem); + } + //Send VDE interrupt info to AVIF driver + if(instat0 || instat1) + { + MV_CC_MSG_t msg = + { /*VPP_CC_MSG_TYPE_VPP */ 0, + instat0, + instat1 + }; + rc = PEMsgQ_Add(&hPEAVIFMsgQ, &msg); + if (rc != S_OK) { + if (!atomic_read(&avif_isr_msg_err_cnt)) { + amp_error("[AVIF isr] MsgQ full\n"); + } + atomic_inc(&avif_isr_msg_err_cnt); + return IRQ_HANDLED; + } + up(&avif_sem); + } + return IRQ_HANDLED; +} +#endif + + + +static irqreturn_t amp_devices_vdec_isr(int irq, void *dev_id) +{ + /* disable interrupt */ + disable_irq_nosync(irq); + +#if CONFIG_VDEC_IRQ_CHECKER + vdec_int_cnt++; +#endif + + tasklet_hi_schedule(&_vdec_tasklet); + + return IRQ_HANDLED; +} + +static void *AoutFifoGetKernelRdDMAInfo(AOUT_PATH_CMD_FIFO * p_aout_cmd_fifo, + int pair) +{ + void *pHandle; + int rd_offset = p_aout_cmd_fifo->kernel_rd_offset; + if (rd_offset > 8 || rd_offset < 0) { + int i = 0, fifo_cmd_size = sizeof(AOUT_PATH_CMD_FIFO) >> 2; + int *temp = p_aout_cmd_fifo; + amp_trace("AOUT FIFO memory %p is corrupted! corrupted data :\n", + p_aout_cmd_fifo); + for (i = 0; i < fifo_cmd_size; i++) { + amp_trace("0x%x\n", *temp++); + } + rd_offset = 0; + } + pHandle = &(p_aout_cmd_fifo->aout_dma_info[pair][rd_offset]); + + return pHandle; +} + +static void +AoutFifoKernelRdUpdate(AOUT_PATH_CMD_FIFO * p_aout_cmd_fifo, int adv) +{ + p_aout_cmd_fifo->kernel_rd_offset += adv; + if (p_aout_cmd_fifo->kernel_rd_offset >= p_aout_cmd_fifo->size) + p_aout_cmd_fifo->kernel_rd_offset -= p_aout_cmd_fifo->size; +} + +static int AoutFifoCheckKernelFullness(AOUT_PATH_CMD_FIFO * p_aout_cmd_fifo) +{ + int full; + full = p_aout_cmd_fifo->wr_offset - p_aout_cmd_fifo->kernel_rd_offset; + if (full < 0) + full += p_aout_cmd_fifo->size; + return full; +} + +static void aout_start_cmd(int *aout_info, VOID *param) +{ + int *p = aout_info; + int i, chanId; + AOUT_DMA_INFO *p_dma_info; + + if (*p == MULTI_PATH) { + p_ma_fifo = (AOUT_PATH_CMD_FIFO *) param; + for (i = 0; i < 4; i++) { + p_dma_info = + (AOUT_DMA_INFO *) + AoutFifoGetKernelRdDMAInfo(p_ma_fifo, i); + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) + chanId = pri_audio_chanId_Z1[i]; + else + chanId = pri_audio_chanId_A0[i]; + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, + p_dma_info->addr0, + p_dma_info->size0, 0, 0, 0, + i == 0 ? 1 : 0, 0, 0); + } + } else if (*p == LoRo_PATH) { +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) + p_sa_fifo = (AOUT_PATH_CMD_FIFO *) param; + p_dma_info = + (AOUT_DMA_INFO *) AoutFifoGetKernelRdDMAInfo(p_sa_fifo, 0); + chanId = avioDhubChMap_ag_SA_R; + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, + p_dma_info->addr0, p_dma_info->size0, 0, + 0, 0, 1, 0, 0); +#endif + } else if (*p == SPDIF_PATH) { +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) + p_spdif_fifo = (AOUT_PATH_CMD_FIFO *) param; + p_dma_info = + (AOUT_DMA_INFO *) AoutFifoGetKernelRdDMAInfo(p_spdif_fifo, + 0); + chanId = avioDhubChMap_ag_SPDIF_R; + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, + p_dma_info->addr0, p_dma_info->size0, 0, + 0, 0, 1, 0, 0); +#endif + } else if (*p == HDMI_PATH) { + p_hdmi_fifo = (AOUT_PATH_CMD_FIFO *) param; + p_dma_info = + (AOUT_DMA_INFO *) AoutFifoGetKernelRdDMAInfo(p_hdmi_fifo, + 0); + chanId = avioDhubChMap_vpp_HDMI_R_auto; + dhub_channel_write_cmd(&VPP_dhubHandle.dhub, chanId, + p_dma_info->addr0, p_dma_info->size0, 0, + 0, 0, 1, 0, 0); + } +} + +static void aout_stop_cmd(int path_id) +{ + if (path_id == MULTI_PATH) { + p_ma_fifo = NULL; + } else if (path_id == LoRo_PATH) { + p_sa_fifo = NULL; + } else if (path_id == SPDIF_PATH) { + p_spdif_fifo = NULL; + } else if (path_id == HDMI_PATH) { + p_hdmi_fifo = NULL; + } +} + +static void aout_resume_cmd(int path_id) +{ + AOUT_DMA_INFO *p_dma_info; + unsigned int i, chanId; + + if (path_id == MULTI_PATH) { + if (!p_ma_fifo) return; + if (!p_ma_fifo->fifo_underflow) + AoutFifoKernelRdUpdate(p_ma_fifo, 1); + + if (AoutFifoCheckKernelFullness(p_ma_fifo)) { + p_ma_fifo->fifo_underflow = 0; + for (i = 0; i < 4; i++) { + p_dma_info = + (AOUT_DMA_INFO *) + AoutFifoGetKernelRdDMAInfo(p_ma_fifo, i); + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) + chanId = pri_audio_chanId_Z1[i]; + else + chanId = pri_audio_chanId_A0[i]; + dhub_channel_write_cmd(&AG_dhubHandle.dhub, + chanId, + p_dma_info->addr0, + p_dma_info->size0, 0, 0, + 0, + (p_dma_info->size1 == 0 + && i == 0) ? 1 : 0, 0, + 0); + if (p_dma_info->size1) + dhub_channel_write_cmd(&AG_dhubHandle. + dhub, chanId, + p_dma_info-> + addr1, + p_dma_info-> + size1, 0, 0, 0, + (i == 0) ? 1 : 0, + 0, 0); + } + } else { + p_ma_fifo->fifo_underflow = 1; + for (i = 0; i < 4; i++) { + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) + chanId = pri_audio_chanId_Z1[i]; + else + chanId = pri_audio_chanId_A0[i]; + dhub_channel_write_cmd(&AG_dhubHandle.dhub, + chanId, + p_ma_fifo->zero_buffer, + p_ma_fifo-> + zero_buffer_size, 0, 0, + 0, i == 0 ? 1 : 0, 0, 0); + } + } + } else if (path_id == LoRo_PATH) { +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) + if (!p_sa_fifo) return; + if (!p_sa_fifo->fifo_underflow) + AoutFifoKernelRdUpdate(p_sa_fifo, 1); + + if (AoutFifoCheckKernelFullness(p_sa_fifo)) { + p_sa_fifo->fifo_underflow = 0; + p_dma_info = + (AOUT_DMA_INFO *) + AoutFifoGetKernelRdDMAInfo(p_sa_fifo, 0); + chanId = avioDhubChMap_ag_SA_R; + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, + p_dma_info->addr0, + p_dma_info->size0, 0, 0, 0, + p_dma_info->size1 ? 0 : 1, 0, 0); + if (p_dma_info->size1) + dhub_channel_write_cmd(&AG_dhubHandle.dhub, + chanId, + p_dma_info->addr1, + p_dma_info->size1, 0, 0, + 0, 1, 0, 0); + } else { + p_sa_fifo->fifo_underflow = 1; + chanId = avioDhubChMap_ag_SA_R; + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, + p_sa_fifo->zero_buffer, + p_sa_fifo->zero_buffer_size, 0, + 0, 0, 1, 0, 0); + } +#endif + } else if (path_id == SPDIF_PATH) { +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) + if (!p_spdif_fifo) return; + if (!p_spdif_fifo->fifo_underflow) + AoutFifoKernelRdUpdate(p_spdif_fifo, 1); + + if (AoutFifoCheckKernelFullness(p_spdif_fifo)) { + p_spdif_fifo->fifo_underflow = 0; + p_dma_info = + (AOUT_DMA_INFO *) + AoutFifoGetKernelRdDMAInfo(p_spdif_fifo, 0); + chanId = avioDhubChMap_ag_SPDIF_R; + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, + p_dma_info->addr0, + p_dma_info->size0, 0, 0, 0, + p_dma_info->size1 ? 0 : 1, 0, 0); + if (p_dma_info->size1) + dhub_channel_write_cmd(&AG_dhubHandle.dhub, + chanId, + p_dma_info->addr1, + p_dma_info->size1, 0, 0, + 0, 1, 0, 0); + } else { + p_spdif_fifo->fifo_underflow = 1; + chanId = avioDhubChMap_ag_SPDIF_R; + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, + p_spdif_fifo->zero_buffer, + p_spdif_fifo->zero_buffer_size, + 0, 0, 0, 1, 0, 0); + } +#endif + } else if (path_id == HDMI_PATH) { + if (!p_hdmi_fifo) return; + if (!p_hdmi_fifo->fifo_underflow) + AoutFifoKernelRdUpdate(p_hdmi_fifo, 1); + + if (AoutFifoCheckKernelFullness(p_hdmi_fifo)) { + p_hdmi_fifo->fifo_underflow = 0; + p_dma_info = + (AOUT_DMA_INFO *) + AoutFifoGetKernelRdDMAInfo(p_hdmi_fifo, 0); + chanId = avioDhubChMap_vpp_HDMI_R_auto; + dhub_channel_write_cmd(&VPP_dhubHandle.dhub, chanId, + p_dma_info->addr0, + p_dma_info->size0, 0, 0, 0, + p_dma_info->size1 ? 0 : 1, 0, 0); + if (p_dma_info->size1) + dhub_channel_write_cmd(&VPP_dhubHandle.dhub, + chanId, + p_dma_info->addr1, + p_dma_info->size1, 0, 0, + 0, 1, 0, 0); + } else { + p_hdmi_fifo->fifo_underflow = 1; + chanId = avioDhubChMap_vpp_HDMI_R_auto; + dhub_channel_write_cmd(&VPP_dhubHandle.dhub, chanId, + p_hdmi_fifo->zero_buffer, + p_hdmi_fifo->zero_buffer_size, 0, + 0, 0, 1, 0, 0); + } + } +} + +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) +static void *AIPFifoGetKernelPreRdDMAInfo(AIP_DMA_CMD_FIFO * p_aip_cmd_fifo, + int pair) +{ + void *pHandle; + int rd_offset = p_aip_cmd_fifo->kernel_pre_rd_offset; + if (rd_offset > 8 || rd_offset < 0) { + int i = 0, fifo_cmd_size = sizeof(AIP_DMA_CMD_FIFO) >> 2; + int *temp = p_aip_cmd_fifo; + amp_trace("memory %p is corrupted! corrupted data :\n", p_aip_cmd_fifo); + for (i = 0; i < fifo_cmd_size; i++) { + amp_trace("0x%x\n", *temp++); + } + rd_offset = 0; + } + pHandle = &(p_aip_cmd_fifo->aip_dma_cmd[pair][rd_offset]); + return pHandle; +} + +static void AIPFifoKernelPreRdUpdate(AIP_DMA_CMD_FIFO * p_aip_cmd_fifo, int adv) +{ + int tmp; + tmp = p_aip_cmd_fifo->kernel_pre_rd_offset + adv; + p_aip_cmd_fifo->kernel_pre_rd_offset = tmp >= p_aip_cmd_fifo->size ? + tmp - p_aip_cmd_fifo->size : tmp; +} + +static void AIPFifoKernelRdUpdate(AIP_DMA_CMD_FIFO * p_aip_cmd_fifo, int adv) +{ + int tmp; + tmp = p_aip_cmd_fifo->kernel_rd_offset + adv; + p_aip_cmd_fifo->kernel_rd_offset = tmp >= p_aip_cmd_fifo->size ? + tmp - p_aip_cmd_fifo->size : tmp; +} + +static int AIPFifoCheckKernelFullness(AIP_DMA_CMD_FIFO * p_aip_cmd_fifo) +{ + int full; + full = p_aip_cmd_fifo->wr_offset - p_aip_cmd_fifo->kernel_pre_rd_offset; + if (full < 0) + full += p_aip_cmd_fifo->size; + return full; +} + +static void aip_start_cmd(int *aip_info, void *param) +{ + int *p = aip_info; + int chanId, pair; + AIP_DMA_CMD *p_dma_cmd; + + if (*p == 1) { + aip_i2s_pair = 1; + p_aip_fifo = (AIP_DMA_CMD_FIFO *) param; + p_dma_cmd = + (AIP_DMA_CMD *) AIPFifoGetKernelPreRdDMAInfo(p_aip_fifo, 0); + + chanId = avioDhubChMap_vip_MIC0_W; + dhub_channel_write_cmd(&VIP_dhubHandle.dhub, chanId, + p_dma_cmd->addr0, p_dma_cmd->size0, 0, 0, + 0, 1, 0, 0); + AIPFifoKernelPreRdUpdate(p_aip_fifo, 1); + + // push 2nd dHub command + p_dma_cmd = + (AIP_DMA_CMD *) AIPFifoGetKernelPreRdDMAInfo(p_aip_fifo, 0); + chanId = avioDhubChMap_vip_MIC0_W; + dhub_channel_write_cmd(&VIP_dhubHandle.dhub, chanId, + p_dma_cmd->addr0, p_dma_cmd->size0, 0, 0, + 0, 1, 0, 0); + AIPFifoKernelPreRdUpdate(p_aip_fifo, 1); + } else if (*p == 4) { + /* 4 I2S will be introduced since BG2 A0 */ + aip_i2s_pair = 4; + p_aip_fifo = (AIP_DMA_CMD_FIFO *) param; + for (pair = 0; pair < 4; pair++) { + p_dma_cmd = + (AIP_DMA_CMD *) + AIPFifoGetKernelPreRdDMAInfo(p_aip_fifo, pair); + chanId = avioDhubChMap_vip_MIC0_W + pair; + dhub_channel_write_cmd(&VIP_dhubHandle.dhub, chanId, + p_dma_cmd->addr0, + p_dma_cmd->size0, 0, 0, 0, 1, 0, + 0); + } + AIPFifoKernelPreRdUpdate(p_aip_fifo, 1); + + // push 2nd dHub command + for (pair = 0; pair < 4; pair++) { + p_dma_cmd = (AIP_DMA_CMD *) + AIPFifoGetKernelPreRdDMAInfo(p_aip_fifo, pair); + chanId = avioDhubChMap_vip_MIC0_W + pair; + dhub_channel_write_cmd(&VIP_dhubHandle.dhub, chanId, + p_dma_cmd->addr0, + p_dma_cmd->size0, 0, 0, 0, 1, 0, + 0); + } + AIPFifoKernelPreRdUpdate(p_aip_fifo, 1); + } +} + +static void aip_stop_cmd(void) +{ + p_aip_fifo = NULL; + + return; +} + +static void aip_resume_cmd() +{ + AIP_DMA_CMD *p_dma_cmd; + unsigned int chanId; + int pair; + + if (!p_aip_fifo) { + amp_trace("aip_resume_cmd:p_aip_fifo is NULL\n"); + return; + } + + if (!p_aip_fifo->fifo_overflow) + AIPFifoKernelRdUpdate(p_aip_fifo, 1); + + if (AIPFifoCheckKernelFullness(p_aip_fifo)) { + p_aip_fifo->fifo_overflow = 0; + for (pair = 0; pair < aip_i2s_pair; pair++) { + p_dma_cmd = + (AIP_DMA_CMD *) + AIPFifoGetKernelPreRdDMAInfo(p_aip_fifo, pair); + chanId = avioDhubChMap_vip_MIC0_W + pair; + dhub_channel_write_cmd(&VIP_dhubHandle.dhub, chanId, + p_dma_cmd->addr0, + p_dma_cmd->size0, 0, 0, 0, + p_dma_cmd->addr1 ? 0 : 1, 0, 0); + if (p_dma_cmd->addr1) { + dhub_channel_write_cmd(&VIP_dhubHandle.dhub, + chanId, p_dma_cmd->addr1, + p_dma_cmd->size1, 0, 0, + 0, 1, 0, 0); + } + } + AIPFifoKernelPreRdUpdate(p_aip_fifo, 1); + } else { + p_aip_fifo->fifo_overflow = 1; + p_aip_fifo->fifo_overflow_cnt++; + for (pair = 0; pair < aip_i2s_pair; pair++) { + /* FIXME: + *chanid should be changed if 4 pair is supported + */ + chanId = avioDhubChMap_vip_MIC0_W + pair; + dhub_channel_write_cmd(&VIP_dhubHandle.dhub, chanId, + p_aip_fifo->overflow_buffer, + p_aip_fifo->overflow_buffer_size, + 0, 0, 0, 1, 0, 0); + } + } +} + +static void aip_avif_start_cmd(int *aip_info, void *param) +{ + int *p = aip_info; + int chanId, pair; + int channel; + AIP_DMA_CMD *p_dma_cmd; + + printk("aip_avif_start_cmd: IsPIPAudio = %d\r\n", IsPIPAudio); + if(IsPIPAudio) + chanId = avif_dhub_config_ChMap_avif_AUD_WR0_PIP; + else + chanId = avif_dhub_config_ChMap_avif_AUD_WR0_MAIN; + + channel = chanId; + if (*p == 1) + { + aip_i2s_pair = 1; + p_aip_fifo = (AIP_DMA_CMD_FIFO *) param; + p_dma_cmd = + (AIP_DMA_CMD *) AIPFifoGetKernelPreRdDMAInfo(p_aip_fifo, 0); + + dhub_channel_write_cmd(&AVIF_dhubHandle.dhub, chanId, + p_dma_cmd->addr0, p_dma_cmd->size0, 0, 0, + 0, 1, 0, 0); + AIPFifoKernelPreRdUpdate(p_aip_fifo, 1); + + // push 2nd dHub command + p_dma_cmd = + (AIP_DMA_CMD *) AIPFifoGetKernelPreRdDMAInfo(p_aip_fifo, 0); + dhub_channel_write_cmd(&AVIF_dhubHandle.dhub, chanId, + p_dma_cmd->addr0, p_dma_cmd->size0, 0, 0, + 0, 1, 0, 0); + AIPFifoKernelPreRdUpdate(p_aip_fifo, 1); + } else if (*p == 4) { + /* 4 I2S will be introduced since BG2 A0 */ + aip_i2s_pair = 4; + p_aip_fifo = (AIP_DMA_CMD_FIFO *) param; + + for (pair = 0; pair < 4; pair++) { + p_dma_cmd = + (AIP_DMA_CMD *) + AIPFifoGetKernelPreRdDMAInfo(p_aip_fifo, pair); + chanId = channel + pair; + dhub_channel_write_cmd(&AVIF_dhubHandle.dhub, chanId, + p_dma_cmd->addr0, + p_dma_cmd->size0, 0, 0, 0, 1, 0, + 0); + } + AIPFifoKernelPreRdUpdate(p_aip_fifo, 1); + + // push 2nd dHub command + for (pair = 0; pair < 4; pair++) { + p_dma_cmd = (AIP_DMA_CMD *) + AIPFifoGetKernelPreRdDMAInfo(p_aip_fifo, pair); + chanId = channel + pair; + dhub_channel_write_cmd(&AVIF_dhubHandle.dhub, chanId, + p_dma_cmd->addr0, + p_dma_cmd->size0, 0, 0, 0, 1, 0, + 0); + } + AIPFifoKernelPreRdUpdate(p_aip_fifo, 1); + } +} + +static void aip_avif_stop_cmd(void) +{ + return; +} + +static void aip_avif_resume_cmd() +{ + AIP_DMA_CMD *p_dma_cmd; + unsigned int chanId, channel; + int pair; + + if (!p_aip_fifo->fifo_overflow) + AIPFifoKernelRdUpdate(p_aip_fifo, 1); + + if(IsPIPAudio) + channel = avif_dhub_config_ChMap_avif_AUD_WR0_PIP; + else + channel = avif_dhub_config_ChMap_avif_AUD_WR0_MAIN; + + if (AIPFifoCheckKernelFullness(p_aip_fifo)) + { + p_aip_fifo->fifo_overflow = 0; + for (pair = 0; pair < aip_i2s_pair; pair++) + { + p_dma_cmd = + (AIP_DMA_CMD *) + AIPFifoGetKernelPreRdDMAInfo(p_aip_fifo, pair); + chanId = channel + pair; + dhub_channel_write_cmd(&AVIF_dhubHandle.dhub, chanId, + p_dma_cmd->addr0, + p_dma_cmd->size0, 0, 0, 0, + p_dma_cmd->addr1 ? 0 : 1, 0, 0); + if (p_dma_cmd->addr1) { + dhub_channel_write_cmd(&AVIF_dhubHandle.dhub, + chanId, p_dma_cmd->addr1, + p_dma_cmd->size1, 0, 0, + 0, 1, 0, 0); + } + AIPFifoKernelPreRdUpdate(p_aip_fifo, 1); + } + }else { + p_aip_fifo->fifo_overflow = 1; + p_aip_fifo->fifo_overflow_cnt++; + for (pair = 0; pair < aip_i2s_pair; pair++) + { + /* FIXME; + *chanid should be changed if 4 pair is supported + */ + chanId = channel + pair; + dhub_channel_write_cmd(&AVIF_dhubHandle.dhub, chanId, + p_aip_fifo->overflow_buffer, + p_aip_fifo->overflow_buffer_size, + 0, 0, 0, 1, 0, 0); + } + } +} +#endif + +static int HwAPPFifoCheckKernelFullness(HWAPP_CMD_FIFO * p_app_cmd_fifo) +{ + int full; + full = p_app_cmd_fifo->wr_offset - p_app_cmd_fifo->kernel_rd_offset; + if (full < 0) + full += p_app_cmd_fifo->size; + return full; +} + +static void *HwAPPFifoGetKernelInCoefRdCmdBuf(HWAPP_CMD_FIFO * p_app_cmd_fifo) +{ + void *pHandle; + pHandle = + &(p_app_cmd_fifo->in_coef_cmd[p_app_cmd_fifo->kernel_rd_offset]); + return pHandle; +} + +static void *HwAPPFifoGetKernelOutCoefRdCmdBuf(HWAPP_CMD_FIFO * p_app_cmd_fifo) +{ + void *pHandle; + pHandle = + &(p_app_cmd_fifo->out_coef_cmd[p_app_cmd_fifo->kernel_rd_offset]); + return pHandle; +} + +static void *HwAPPFifoGetKernelInDataRdCmdBuf(HWAPP_CMD_FIFO * p_app_cmd_fifo) +{ + void *pHandle; + pHandle = + &(p_app_cmd_fifo->in_data_cmd[p_app_cmd_fifo->kernel_rd_offset]); + return pHandle; +} + +static void *HwAPPFifoGetKernelOutDataRdCmdBuf(HWAPP_CMD_FIFO * p_app_cmd_fifo) +{ + void *pHandle; + pHandle = + &(p_app_cmd_fifo->out_data_cmd[p_app_cmd_fifo->kernel_rd_offset]); + return pHandle; +} + +static void HwAPPFifoUpdateIdleFlag(HWAPP_CMD_FIFO * p_app_cmd_fifo, int flag) +{ + p_app_cmd_fifo->kernel_idle = flag; +} + +static void HwAPPFifoKernelRdUpdate(HWAPP_CMD_FIFO * p_app_cmd_fifo, int adv) +{ + p_app_cmd_fifo->kernel_rd_offset += adv; + if (p_app_cmd_fifo->kernel_rd_offset >= p_app_cmd_fifo->size) + p_app_cmd_fifo->kernel_rd_offset -= p_app_cmd_fifo->size; +} + +static void app_start_cmd(HWAPP_CMD_FIFO * p_app_cmd_fifo) +{ + APP_CMD_BUFFER *p_in_coef_cmd, *p_out_coef_cmd; + APP_CMD_BUFFER *p_in_data_cmd, *p_out_data_cmd; + unsigned int chanId, PA, cmdSize; + +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) /* Z1/Z2 */ + { + if (HwAPPFifoCheckKernelFullness(p_app_cmd_fifo)) { + HwAPPFifoUpdateIdleFlag(p_app_cmd_fifo, 0); + p_in_coef_cmd = + (APP_CMD_BUFFER *) + HwAPPFifoGetKernelInCoefRdCmdBuf(p_app_cmd_fifo); + chanId = avioDhubChMap_ag_APPCMD_R_Z1; + if (p_in_coef_cmd->cmd_len) { + PA = p_in_coef_cmd->cmd_buffer_hw_base; + cmdSize = p_in_coef_cmd->cmd_len * sizeof(int); + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, PA, + cmdSize, 0, 0, 0, 0, 0, 0); + } + p_in_data_cmd = + (APP_CMD_BUFFER *) + HwAPPFifoGetKernelInDataRdCmdBuf(p_app_cmd_fifo); + if (p_in_data_cmd->cmd_len) { + PA = p_in_data_cmd->cmd_buffer_hw_base; + cmdSize = p_in_data_cmd->cmd_len * sizeof(int); + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, PA, + cmdSize, 0, 0, 0, 0, 0, 0); + } + p_out_coef_cmd = + (APP_CMD_BUFFER *) + HwAPPFifoGetKernelOutCoefRdCmdBuf(p_app_cmd_fifo); + chanId = avioDhubChMap_ag_APPCMD_R_Z1; + if (p_out_coef_cmd->cmd_len) { + PA = p_out_coef_cmd->cmd_buffer_hw_base; + cmdSize = p_out_coef_cmd->cmd_len * sizeof(int); + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, PA, + cmdSize, 0, 0, 0, 0, 0, 0); + } + p_out_data_cmd = + (APP_CMD_BUFFER *) + HwAPPFifoGetKernelOutDataRdCmdBuf(p_app_cmd_fifo); + if (p_out_data_cmd->cmd_len) { + PA = p_out_data_cmd->cmd_buffer_hw_base; + cmdSize = p_out_data_cmd->cmd_len * sizeof(int); + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, PA, + cmdSize, 0, 0, 0, 0, 0, 0); + } + } else { + HwAPPFifoUpdateIdleFlag(p_app_cmd_fifo, 1); + } + } +#endif +} + +static void app_resume_cmd(HWAPP_CMD_FIFO * p_app_cmd_fifo) +{ + HwAPPFifoKernelRdUpdate(p_app_cmd_fifo, 1); + app_start_cmd(p_app_cmd_fifo); +} + +static irqreturn_t amp_devices_aout_isr(int irq, void *dev_id) +{ + int instat; + UNSG32 chanId; + HDL_semaphore *pSemHandle; + + pSemHandle = dhub_semaphore(&AG_dhubHandle.dhub); + instat = semaphore_chk_full(pSemHandle, -1); + + for (chanId = avioDhubChMap_ag_MA0_R_auto; chanId <= avioDhubChMap_ag_MA3_R_auto; + chanId++) { + if (bTST(instat, chanId)) { + semaphore_pop(pSemHandle, chanId, 1); + semaphore_clr_full(pSemHandle, chanId); + if (chanId == avioDhubChMap_ag_MA0_R_auto) { + aout_resume_cmd(MULTI_PATH); + tasklet_hi_schedule(&_ma_tasklet); + } + } + } + +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) + chanId = avioDhubChMap_ag_SA_R; + if (bTST(instat, chanId)) { + semaphore_pop(pSemHandle, chanId, 1); + semaphore_clr_full(pSemHandle, chanId); + aout_resume_cmd(LoRo_PATH); + tasklet_hi_schedule(&_sa_tasklet); + } +#endif + +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) + chanId = avioDhubChMap_ag_SPDIF_R; + if (bTST(instat, chanId)) { + semaphore_pop(pSemHandle, chanId, 1); + semaphore_clr_full(pSemHandle, chanId); + aout_resume_cmd(SPDIF_PATH); + tasklet_hi_schedule(&_spdif_tasklet); + } +#endif + +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) +#endif + { + chanId = avioDhubSemMap_ag_app_intr2; + if (bTST(instat, chanId)) { + semaphore_pop(pSemHandle, chanId, 1); + semaphore_clr_full(pSemHandle, chanId); + app_resume_cmd(p_app_fifo); +#if defined (CONFIG_APP_IOCTL_MSG) + MV_CC_MSG_t msg = { 0, 0, 0 }; + + msg.m_MsgID = 1 << avioDhubSemMap_ag_app_intr2; + PEMsgQ_Add(&hAPPMsgQ, &msg); + up(&app_sem); +#else + tasklet_hi_schedule(&_app_tasklet); +#endif + } + } + +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) + chanId = avioDhubChMap_ag_PG_ENG_W; + if (bTST(instat, chanId)) { + semaphore_pop(pSemHandle, chanId, 1); + semaphore_clr_full(pSemHandle, chanId); + tasklet_hi_schedule(&_pg_done_tasklet); + } + + chanId = avioDhubSemMap_ag_spu_intr0; + if (bTST(instat, chanId)) { + semaphore_pop(pSemHandle, chanId, 1); + semaphore_clr_full(pSemHandle, chanId); + tasklet_hi_schedule(&_rle_err_tasklet); + } + + chanId = avioDhubSemMap_ag_spu_intr1; + if (bTST(instat, chanId)) { + semaphore_pop(pSemHandle, chanId, 1); + semaphore_clr_full(pSemHandle, chanId); + tasklet_hi_schedule(&_rle_done_tasklet); + } +#endif + + return IRQ_HANDLED; +} + +static irqreturn_t amp_devices_zsp_isr(int irq, void *dev_id) +{ + UNSG32 addr, v_id; + T32ZspInt2Soc_status reg; + + addr = MEMMAP_ZSP_REG_BASE + RA_ZspRegs_Int2Soc + RA_ZspInt2Soc_status; + GA_REG_WORD32_READ(addr, &(reg.u32)); + + addr = MEMMAP_ZSP_REG_BASE + RA_ZspRegs_Int2Soc + RA_ZspInt2Soc_clear; + v_id = ADSP_ZSPINT2Soc_IRQ0; + if ((reg.u32) & (1 << v_id)) { + GA_REG_WORD32_WRITE(addr, v_id); + } + + tasklet_hi_schedule(&_zsp_tasklet); + + return IRQ_HANDLED; +} + +static int amp_device_init(unsigned int cpu_id, void *pHandle) +{ + unsigned int vec_num; + int err; + + vpp_cpcb0_vbi_int_cnt = 0; + + tasklet_enable(&_vpp_tasklet); + tasklet_enable(&_vpp_cec_tasklet); + tasklet_enable(&_vdec_tasklet); + tasklet_enable(&_vip_tasklet); + tasklet_enable(&_ma_tasklet); + tasklet_enable(&_hdmi_tasklet); +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) +#endif + { + tasklet_enable(&_app_tasklet); + tasklet_enable(&_zsp_tasklet); + } +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) + tasklet_enable(&_aip_tasklet); + tasklet_enable(&_spdif_tasklet); + tasklet_enable(&_sa_tasklet); + tasklet_enable(&_pg_done_tasklet); + tasklet_enable(&_aip_avif_tasklet); + tasklet_enable(&_rle_err_tasklet); + tasklet_enable(&_rle_done_tasklet); +#endif + +#if CONFIG_VPP_IOCTL_MSG + sema_init(&vpp_sem, 0); +#endif + +#if CONFIG_VPP_ISR_MSGQ + err = PEMsgQ_Init(&hPEMsgQ, VPP_ISR_MSGQ_SIZE); + if (unlikely(err != S_OK)) { + amp_trace("PEMsgQ_Init: falied, err:%8x\n", err); + return err; + } +#endif + + sema_init(&avif_sem, 0); + err = PEMsgQ_Init(&hPEAVIFMsgQ, AVIF_ISR_MSGQ_SIZE); + if (unlikely(err != S_OK)) { + amp_trace("PEAVIFMsgQ_Init: falied, err:%8x\n", err); + return err; + } + sema_init(&avif_hrx_sem, 0); + err = PEMsgQ_Init(&hPEAVIFHRXMsgQ, AVIF_HRX_ISR_MSGQ_SIZE); + if (unlikely(err != S_OK)) { + amp_trace("PEAVIFHRXMsgQ_Init: falied, err:%8x\n", err); + return err; + } + +#if CONFIG_VIP_IOCTL_MSG + sema_init(&vip_sem, 0); +#endif +#if CONFIG_VIP_ISR_MSGQ + err = PEMsgQ_Init(&hPEVIPMsgQ, VIP_ISR_MSGQ_SIZE); + if (unlikely(err != S_OK)) { + amp_trace("PEVIPMsgQ_Init: falied, err:%8x\n", err); + return err; + } +#endif + +#if CONFIG_HRX_IOCTL_MSG + sema_init(&hrx_sem, 0); + err = PEMsgQ_Init(&hPEHRXMsgQ, HDMIRX_ISR_MSGQ_SIZE); + if (unlikely(err != S_OK)) { + amp_trace("PEHRXMsgQ_Init: falied, err:%8x\n", err); + return err; + } +#endif + +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) +#endif + { +#if defined (CONFIG_APP_IOCTL_MSG) + sema_init(&app_sem, 0); + err = PEMsgQ_Init(&hAPPMsgQ, APP_ISR_MSGQ_SIZE); + if (unlikely(err != S_OK)) { + amp_trace("hAPPMsgQ init: failed, err:%8x\n", err); + return err; + } + +#endif +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + } +#endif + + amp_trace("amp_device_init ---ok"); + + return S_OK; +} + +static int amp_device_exit(unsigned int cpu_id, void *pHandle) +{ + int err = 0; + +#if CONFIG_VIP_ISR_MSGQ + err = PEMsgQ_Destroy(&hPEVIPMsgQ); + if (unlikely(err != S_OK)) { + amp_trace("vip MsgQ Destroy: falied, err:%8x\n", err); + return err; + } +#endif + + err = PEMsgQ_Destroy(&hPEAVIFMsgQ); + if (unlikely(err != S_OK)) { + amp_trace("avif MsgQ Destroy: falied, err:%8x\n", err); + return err; + } + err = PEMsgQ_Destroy(&hPEAVIFHRXMsgQ); + if (unlikely(err != S_OK)) { + amp_trace("AVIF hrx MsgQ Destroy: falied, err:%8x\n", err); + return err; + } + + +#if CONFIG_HRX_IOCTL_MSG + err = PEMsgQ_Destroy(&hPEHRXMsgQ); + if (unlikely(err != S_OK)) { + amp_trace("hrx MsgQ Destroy: falied, err:%8x\n", err); + return err; + } +#endif + +#if CONFIG_VPP_ISR_MSGQ + err = PEMsgQ_Destroy(&hPEMsgQ); + if (unlikely(err != S_OK)) { + amp_trace("vpp MsgQ Destroy: falied, err:%8x\n", err); + return err; + } +#endif +#if defined (CONFIG_APP_IOCTL_MSG) +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) +#endif + { + err = PEMsgQ_Destroy(&hAPPMsgQ); + if (unlikely(err != S_OK)) { + amp_trace("app MsgQ Destroy: failed, err:%8x\n", err); + return err; + } + } +#endif + + tasklet_disable(&_vpp_tasklet); + tasklet_disable(&_vpp_cec_tasklet); + tasklet_disable(&_vdec_tasklet); + tasklet_disable(&_vip_tasklet); + tasklet_disable(&_avif_tasklet); + tasklet_disable(&_ma_tasklet); + tasklet_disable(&_hdmi_tasklet); + +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) +#endif + { + tasklet_disable(&_app_tasklet); + tasklet_disable(&_zsp_tasklet); + } +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) + tasklet_disable(&_aip_tasklet); + tasklet_disable(&_sa_tasklet); + tasklet_disable(&_pg_done_tasklet); + tasklet_disable(&_spdif_tasklet); + tasklet_disable(&_aip_avif_tasklet); + tasklet_disable(&_rle_err_tasklet); + tasklet_disable(&_rle_done_tasklet); +#endif + + amp_trace("amp_device_exit ok"); + + return S_OK; +} + +/******************************************************************************* + Module API + */ + +static int amp_driver_open(struct inode *inode, struct file *filp) +{ + unsigned int vec_num; + void *pHandle = &_dev; + int err = 0; + +#ifdef CONFIG_BERLIN_FASTLOGO + printk(KERN_NOTICE "drv stop fastlogo\n"); + fastlogo_stop(); +#endif + +#ifdef CONFIG_BERLIN_BOOTLOGO +#if (BERLIN_CHIP_VERSION > BERLIN_BG2_A0) + GA_REG_WORD32_WRITE(MEMMAP_AVIO_BCM_REG_BASE + RA_AVIO_BCM_AUTOPUSH, 0x0); +#endif +#endif + + /* initialize dhub */ +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) /* Z1/Z2 */ + { + DhubInitialization(CPUINDEX, VPP_DHUB_BASE, VPP_HBO_SRAM_BASE, + &VPP_dhubHandle, VPP_config, VPP_NUM_OF_CHANNELS_Z1); + DhubInitialization(CPUINDEX, AG_DHUB_BASE, AG_HBO_SRAM_BASE, + &AG_dhubHandle, AG_config, AG_NUM_OF_CHANNELS_Z1); + } + else /* A0 */ + { + DhubInitialization(CPUINDEX, VPP_DHUB_BASE, VPP_HBO_SRAM_BASE, + &VPP_dhubHandle, VPP_config_a0, VPP_NUM_OF_CHANNELS_A0); + DhubInitialization(CPUINDEX, AG_DHUB_BASE, AG_HBO_SRAM_BASE, + &AG_dhubHandle, AG_config_a0, AG_NUM_OF_CHANNELS_A0); + } +#else + { + DhubInitialization(CPUINDEX, VPP_DHUB_BASE, VPP_HBO_SRAM_BASE, + &VPP_dhubHandle, VPP_config, VPP_NUM_OF_CHANNELS); + DhubInitialization(CPUINDEX, AG_DHUB_BASE, AG_HBO_SRAM_BASE, + &AG_dhubHandle, AG_config, AG_NUM_OF_CHANNELS); + } +#endif +#if (BERLIN_CHIP_VERSION != BERLIN_BG2_CD) && (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) + DhubInitialization(CPUINDEX, AVIF_DHUB_BASE, AVIF_HBO_SRAM_BASE, + &AVIF_dhubHandle, AVIF_config, AVIF_NUM_OF_CHANNELS); +#endif +#if (BERLIN_CHIP_VERSION < BERLIN_BG2_DTV) +#if (BERLIN_CHIP_VERSION != BERLIN_BG2_CD) && (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) + DhubInitialization(CPUINDEX, VIP_DHUB_BASE, VIP_HBO_SRAM_BASE, + &VIP_dhubHandle, VIP_config, VIP_NUM_OF_CHANNELS); +#endif +#endif + + /* register and enable cec interrupt */ + vec_num = amp_irqs[IRQ_SM_CEC]; + err = + request_irq(vec_num, amp_devices_vpp_cec_isr, IRQF_DISABLED, + "amp_module_vpp_cec", pHandle); + if (unlikely(err < 0)) { + amp_trace("vec_num:%5d, err:%8x\n", vec_num, err); + return err; + } + + /* register and enable VPP ISR */ + vec_num = amp_irqs[IRQ_DHUBINTRAVIO0]; + err = + request_irq(vec_num, amp_devices_vpp_isr, IRQF_DISABLED, + "amp_module_vpp", pHandle); + if (unlikely(err < 0)) { + amp_trace("vec_num:%5d, err:%8x\n", vec_num, err); + return err; + } + +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) + //vec_num = 0x4a; //0x2a + 0x20 + /* register and enable AVIF ISR */ + vec_num = amp_irqs[IRQ_DHUBINTRAVIIF0]; + err = + request_irq(vec_num, amp_devices_avif_isr, IRQF_DISABLED, + "amp_module_avif", pHandle); + if (unlikely(err < 0)) { + amp_trace("vec_num:%5d, err:%8x\n", vec_num, err); + return err; + } + + /* register and enable VIP ISR */ + vec_num = amp_irqs[IRQ_DHUBINTRAVIO2]; + err = + request_irq(vec_num, amp_devices_vip_isr, IRQF_DISABLED, + "amp_module_vip", pHandle); + if (unlikely(err < 0)) { + amp_trace("vec_num:%5d, err:%8x\n", vec_num, err); + return err; + } +#endif + + /* register and enable VDEC ISR */ + vec_num = amp_irqs[IRQ_DHUBINTRVPRO]; + /* + * when amp service is killed there may be pending interrupts + * do not enable VDEC interrupts automatically here unless requested by VDEC module + */ + irq_modify_status(vec_num, 0, IRQ_NOAUTOEN); + err = + request_irq(vec_num, amp_devices_vdec_isr, IRQF_DISABLED, + "amp_module_vdec", pHandle); + if (unlikely(err < 0)) { + amp_trace("vec_num:%5d, err:%8x\n", vec_num, err); + return err; + } + + /* register and enable audio out ISR */ + vec_num = amp_irqs[IRQ_DHUBINTRAVIO1]; + err = + request_irq(vec_num, amp_devices_aout_isr, IRQF_DISABLED, + "amp_module_aout", pHandle); + if (unlikely(err < 0)) { + amp_trace("vec_num:%5d, err:%8x\n", vec_num, err); + return err; + } + +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + if (berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) +#endif + { + /* register and enable ZSP ISR */ + vec_num = amp_irqs[IRQ_ZSPINT]; + err = + request_irq(vec_num, amp_devices_zsp_isr, IRQF_DISABLED, + "amp_module_zsp", pHandle); + if (unlikely(err < 0)) { + amp_trace("vec_num:%5d, err:%8x\n", vec_num, err); + return err; + } + } + + amp_trace("amp_driver_open ok\n"); + isAmpReleased = 0; + + return 0; +} + +#define VPP_BASE 0xf7f60000 +#define CPCB0_OO_LAY12 0x14EA //FF +#define CPCB0_OO_LAY34 0x14EB //FF +#define CPCB0_OO_LAY56 0x1E54 //FF +#define CPCB0_OO_LAY7 0x1E55 //07 + +#define CPCB1_OO_LAY12 0x16EA //FF +#define CPCB1_OO_LAY34 0x16EB //FF +#define CPCB1_OO_LAY56 0x1EBC //FF +#define CPCB1_OO_LAY7 0x1EBD //07 +static int amp_driver_release(struct inode *inode, struct file *filp) +{ + void *pHandle = &_dev; + unsigned int vec_num; + int err = 0; + unsigned long aoutirq; + + GA_REG_WORD32_WRITE(VPP_BASE + (CPCB0_OO_LAY12 << 2), 0x0); + GA_REG_WORD32_WRITE(VPP_BASE + (CPCB0_OO_LAY34 << 2), 0x0); + GA_REG_WORD32_WRITE(VPP_BASE + (CPCB0_OO_LAY56 << 2), 0x0); + GA_REG_WORD32_WRITE(VPP_BASE + (CPCB0_OO_LAY7 << 2), 0x0); + + GA_REG_WORD32_WRITE(VPP_BASE + (CPCB1_OO_LAY12 << 2), 0x0); + GA_REG_WORD32_WRITE(VPP_BASE + (CPCB1_OO_LAY34 << 2), 0x0); + GA_REG_WORD32_WRITE(VPP_BASE + (CPCB1_OO_LAY56 << 2), 0x0); + GA_REG_WORD32_WRITE(VPP_BASE + (CPCB1_OO_LAY7 << 2), 0x0); + + if(isAmpReleased) + return 0; + + /* unregister cec interrupt */ + free_irq(amp_irqs[IRQ_SM_CEC], pHandle); + /* unregister VPP interrupt */ + free_irq(amp_irqs[IRQ_DHUBINTRAVIO0], pHandle); +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) + /* unregister VIP interrupt */ + free_irq(amp_irqs[IRQ_DHUBINTRAVIO2], pHandle); +#endif + /* unregister VDEC interrupt */ + free_irq(amp_irqs[IRQ_DHUBINTRVPRO], pHandle); + /* unregister audio out interrupt */ + free_irq(amp_irqs[IRQ_DHUBINTRAVIO1], pHandle); + /* unregister ZSP interrupt */ + free_irq(amp_irqs[IRQ_ZSPINT], pHandle); +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) + /* unregister AVIF interrupt */ + free_irq(amp_irqs[IRQ_DHUBINTRAVIIF0], pHandle); +#endif + + /* Stop all commands */ + spin_lock_irqsave(&aout_spinlock, aoutirq); + aout_stop_cmd(MULTI_PATH); + aout_stop_cmd(LoRo_PATH); + aout_stop_cmd(SPDIF_PATH); + aout_stop_cmd(HDMI_PATH); + spin_unlock_irqrestore(&aout_spinlock, aoutirq); + + isAmpReleased = 1; + amp_trace("amp_driver_release ok\n"); + + return 0; +} + +static long +amp_driver_ioctl_unlocked(struct file *filp, unsigned int cmd, + unsigned long arg) +{ + VPP_DMA_INFO user_dma_info; + int bcmbuf_info[2]; + int aout_info[2]; + int app_info[2]; + int aip_info[2]; + unsigned long irqstat, aoutirq, appirq, aipirq; + unsigned int bcm_sche_cmd_info[3], q_id; + int shm_mem = 0; + PVOID param = NULL; + + switch (cmd) { + case VPP_IOCTL_BCM_SCHE_CMD: + if (copy_from_user + (bcm_sche_cmd_info, (void __user *)arg, + 3 * sizeof(unsigned int))) + return -EFAULT; + q_id = bcm_sche_cmd_info[2]; + if (q_id > BCM_SCHED_Q5) { + amp_trace("error BCM queue ID = %d\n", q_id); + return -EFAULT; + } + bcm_sche_cmd[q_id][0] = bcm_sche_cmd_info[0]; + bcm_sche_cmd[q_id][1] = bcm_sche_cmd_info[1]; + break; + + case VPP_IOCTL_VBI_DMA_CFGQ: + if (copy_from_user + (&user_dma_info, (void __user *)arg, sizeof(VPP_DMA_INFO))) + return -EFAULT; + + dma_info[user_dma_info.cpcbID].DmaAddr = + (UINT32) MV_SHM_GetCacheVirtAddr(user_dma_info.DmaAddr); + dma_info[user_dma_info.cpcbID].DmaLen = user_dma_info.DmaLen; + break; + + case VPP_IOCTL_VBI_BCM_CFGQ: + if (copy_from_user + (&user_dma_info, (void __user *)arg, sizeof(VPP_DMA_INFO))) + return -EFAULT; + + vbi_bcm_info[user_dma_info.cpcbID].DmaAddr = + (UINT32) MV_SHM_GetCachePhysAddr(user_dma_info.DmaAddr); + vbi_bcm_info[user_dma_info.cpcbID].DmaLen = + user_dma_info.DmaLen; + break; + + case VPP_IOCTL_VDE_BCM_CFGQ: + if (copy_from_user + (&user_dma_info, (void __user *)arg, sizeof(VPP_DMA_INFO))) + return -EFAULT; + + vde_bcm_info[user_dma_info.cpcbID].DmaAddr = + (UINT32) MV_SHM_GetCachePhysAddr(user_dma_info.DmaAddr); + vde_bcm_info[user_dma_info.cpcbID].DmaLen = + user_dma_info.DmaLen; + break; + + case VPP_IOCTL_GET_MSG: + { +#if CONFIG_VPP_IOCTL_MSG + MV_CC_MSG_t msg = { 0 }; + HRESULT rc = S_OK; + + rc = down_interruptible(&vpp_sem); + if (rc < 0) + return rc; + +#ifdef CONFIG_IRQ_LATENCY_PROFILE + amp_irq_profiler.vpp_task_sched_last = + cpu_clock(smp_processor_id()); +#endif +#if CONFIG_VPP_ISR_MSGQ + + // check fullness, clear message queue once. + // only send latest message to task. + if (PEMsgQ_Fullness(&hPEMsgQ) <= 0) { + //amp_trace(" E/[vpp isr task] message queue empty\n"); + return -EFAULT; + } + + PEMsgQ_DequeueRead(&hPEMsgQ, &msg); + + if (!atomic_read(&vpp_isr_msg_err_cnt)) { + // msgQ get full, if isr task can run here, reset msgQ + //fullness--; + //PEMsgQ_Dequeue(&hPEMsgQ, fullness); + atomic_set(&vpp_isr_msg_err_cnt, 0); + } +#else + msg.m_MsgID = VPP_CC_MSG_TYPE_VPP; + msg.m_Param1 = vpp_instat; + msg.m_Param2 = vpp_intr_timestamp; +#endif + if (copy_to_user + ((void __user *)arg, &msg, sizeof(MV_CC_MSG_t))) + return -EFAULT; + break; +#else + return -EFAULT; +#endif + } + case CEC_IOCTL_RX_MSG_BUF_MSG: // copy cec rx message to user space buffer + if (copy_to_user + ((void __user *)arg, &rx_buf, sizeof(VPP_CEC_RX_MSG_BUF))) + return -EFAULT; + + return S_OK; + break; + case VPP_IOCTL_START_BCM_TRANSACTION: + if (copy_from_user + (bcmbuf_info, (void __user *)arg, 2 * sizeof(int))) + return -EFAULT; + spin_lock_irqsave(&bcm_spinlock, irqstat); + dhub_channel_write_cmd(&(VPP_dhubHandle.dhub), + avioDhubChMap_vpp_BCM_R_auto, bcmbuf_info[0], + bcmbuf_info[1], 0, 0, 0, 1, 0, 0); + spin_unlock_irqrestore(&bcm_spinlock, irqstat); + break; + + case VPP_IOCTL_INTR_MSG: + //get VPP INTR MASK info + { + INTR_MSG vpp_intr_info = { 0, 0 }; + + if (copy_from_user + (&vpp_intr_info, (void __user *)arg, + sizeof(INTR_MSG))) + return -EFAULT; + + if (vpp_intr_info.DhubSemMap < MAX_INTR_NUM) + vpp_intr_status[vpp_intr_info.DhubSemMap] = + vpp_intr_info.Enable; + else + return -EFAULT; + + break; + } + case AVIF_IOCTL_GET_MSG: + { + MV_CC_MSG_t msg = { 0 }; + HRESULT rc = S_OK; + rc = down_interruptible(&avif_sem); + if (rc < 0) + return rc; + + rc = PEMsgQ_ReadTry(&hPEAVIFMsgQ, &msg); + if (unlikely(rc != S_OK)) { + amp_trace("AVIF read message queue failed\n"); + return -EFAULT; + } + PEMsgQ_ReadFinish(&hPEAVIFMsgQ); + if (!atomic_read(&avif_isr_msg_err_cnt)) { + atomic_set(&avif_isr_msg_err_cnt, 0); + } + if (copy_to_user + ((void __user *)arg, &msg, sizeof(MV_CC_MSG_t))) + return -EFAULT; + break; + } + case AVIF_IOCTL_VDE_CFGQ: + break; + case AVIF_IOCTL_VBI_CFGQ: + break; + case AVIF_IOCTL_SD_WRE_CFGQ: + break; + case AVIF_IOCTL_SD_RDE_CFGQ: + break; + case AVIF_IOCTL_SEND_MSG: + { + //get msg from AVIF + int avif_msg = 0; + if (copy_from_user(&avif_msg, (void __user *)arg, sizeof(int))) + return -EFAULT; + + if (avif_msg == AVIF_MSG_DESTROY_ISR_TASK) { + //force one more INT to AVIF to destroy ISR task + printk("Destroy ISR Task...\r\n"); + up(&avif_sem); + } + printk("Destroyed ISR Task...\r\n"); + break; + } + case AVIF_IOCTL_INTR_MSG: + { + //get AVIF INTR MASK info + INTR_MSG avif_intr_info = { 0, 0 }; + + if (copy_from_user(&avif_intr_info, (void __user *)arg, sizeof(INTR_MSG))) + return -EFAULT; + + if (avif_intr_info.DhubSemMapowner = THIS_MODULE; + dev->ops = fops; + return cdev_add(dev, MKDEV(major, minor), 1); +} + +int __init amp_drv_init(struct amp_device_t *amp_device) +{ + int res; + + /* Now setup cdevs. */ + res = + amp_driver_setup_cdev(&_device->cdev, amp_device->major, + amp_device->minor, amp_device->fops); + if (res) { + amp_error("amp_driver_setup_cdev failed.\n"); + res = -ENODEV; + goto err_add_device; + } + amp_trace("setup cdevs device minor [%d]\n", amp_device->minor); + + /* add PE devices to sysfs */ + amp_device->dev_class = class_create(THIS_MODULE, amp_device->dev_name); + if (IS_ERR(amp_device->dev_class)) { + amp_error("class_create failed.\n"); + res = -ENODEV; + goto err_add_device; + } + + device_create(amp_device->dev_class, NULL, + MKDEV(amp_device->major, amp_device->minor), NULL, + amp_device->dev_name); + amp_trace("create device sysfs [%s]\n", amp_device->dev_name); + + /* create hw device */ + if (amp_device->dev_init) { + res = amp_device->dev_init(amp_device, 0); + if (res != 0) { + amp_error("amp_int_init failed !!! res = 0x%08X\n", + res); + res = -ENODEV; + goto err_add_device; + } + } + /* create PE device proc file */ + amp_device->dev_procdir = proc_mkdir(amp_device->dev_name, NULL); + //amp_driver_procdir->owner = THIS_MODULE; + create_proc_read_entry(AMP_DEVICE_PROCFILE_STATUS, 0, + amp_device->dev_procdir, read_proc_status, NULL); + create_proc_read_entry(AMP_DEVICE_PROCFILE_DETAIL, 0, + amp_device->dev_procdir, read_proc_detail, NULL); + + return 0; + + err_add_device: + + if (amp_device->dev_procdir) { + remove_proc_entry(AMP_DEVICE_PROCFILE_DETAIL, + amp_device->dev_procdir); + remove_proc_entry(AMP_DEVICE_PROCFILE_STATUS, + amp_device->dev_procdir); + remove_proc_entry(amp_device->dev_name, NULL); + } + + if (amp_device->dev_class) { + device_destroy(amp_device->dev_class, + MKDEV(amp_device->major, amp_device->minor)); + class_destroy(amp_device->dev_class); + } + + cdev_del(&_device->cdev); + + return res; +} + +int __exit amp_drv_exit(struct amp_device_t *amp_device) +{ + int res; + + amp_trace("amp_drv_exit [%s] enter\n", amp_device->dev_name); + + /* destroy kernel API */ + if (amp_device->dev_exit) { + res = amp_device->dev_exit(amp_device, 0); + if (res != 0) + amp_error("dev_exit failed !!! res = 0x%08X\n", res); + } + + if (amp_device->dev_procdir) { + /* remove PE device proc file */ + remove_proc_entry(AMP_DEVICE_PROCFILE_DETAIL, + amp_device->dev_procdir); + remove_proc_entry(AMP_DEVICE_PROCFILE_STATUS, + amp_device->dev_procdir); + remove_proc_entry(amp_device->dev_name, NULL); + } + + if (amp_device->dev_class) { + /* del sysfs entries */ + device_destroy(amp_device->dev_class, + MKDEV(amp_device->major, amp_device->minor)); + amp_trace("delete device sysfs [%s]\n", amp_device->dev_name); + + class_destroy(amp_device->dev_class); + } + /* del cdev */ + cdev_del(&_device->cdev); + + return 0; +} + +struct amp_device_t legacy_pe_dev = { + .dev_name = AMP_DEVICE_NAME, + .minor = AMP_MINOR, + .dev_init = amp_device_init, + .dev_exit = amp_device_exit, + .fops = &_ops, +}; + +static int __init amp_module_init(void) +{ + int i, res; + dev_t pedev; + struct device_node *np, *iter; + struct resource r; + u32 chip_ext, channel_num; + +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) + np = of_find_compatible_node(NULL, NULL, "marvell,berlin-amp"); +#else //CD is using old driver + np = of_find_compatible_node(NULL, NULL, "mrvl,berlin-amp"); +#endif + if (!np) + return -ENODEV; + for (i = 0; i <= IRQ_DHUBINTRVPRO; i++) { + of_irq_to_resource(np, i, &r); + amp_irqs[i] = r.start; + } +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) + //TODO:get the interrupt number dynamically + amp_irqs[IRQ_DHUBINTRAVIIF0] = 0x4a; +#endif + + for_each_child_of_node(np, iter) { +#if !(defined(BERLIN_BG2_CD) || defined(BERLIN_BG2CDP)) + if (of_device_is_compatible(iter, "marvell,berlin-cec")) { +#else + if (of_device_is_compatible(iter, "mrvl,berlin-cec")) { +#endif + of_irq_to_resource(iter, 0, &r); + amp_irqs[IRQ_SM_CEC] = r.start; + } +#if defined (BERLIN_BG2CDP) + if (of_device_is_compatible(iter, "mrvl,berlin-chip-ext")) { + if (!of_property_read_u32(iter, "revision", &chip_ext)) + berlin_chip_revision = chip_ext; + } + + if (of_device_is_compatible(iter, "mrvl,berlin-avio")) { + if (!of_property_read_u32(iter, "num", &channel_num)) + avioDhub_channel_num = channel_num; + } +#endif + } + of_node_put(np); + + res = alloc_chrdev_region(&pedev, 0, AMP_MAX_DEVS, AMP_DEVICE_NAME); + amp_major = MAJOR(pedev); + if (res < 0) { + amp_error("alloc_chrdev_region() failed for amp\n"); + goto err_reg_device; + } + amp_trace("register cdev device major [%d]\n", amp_major); + + legacy_pe_dev.major = amp_major; + res = amp_drv_init(&legacy_pe_dev); + amp_dev = legacy_pe_dev.cdev; + + snd_dev.major = amp_major; + res = amp_drv_init(&snd_dev); + + res = vmeta_sched_driver_init(amp_major, AMP_VMETA_MINOR); + if (res != 0) + amp_error("vmeta_sched_driver_init failed !!! res = 0x%08X\n", + res); + amp_trace("amp_driver_init OK\n"); + + return 0; + err_reg_device: + amp_drv_exit(&legacy_pe_dev); + amp_drv_exit(&snd_dev); + vmeta_sched_driver_exit(); + + unregister_chrdev_region(MKDEV(amp_major, 0), AMP_MAX_DEVS); + + amp_trace("amp_driver_init failed !!! (%d)\n", res); + + return res; +} + +static void __exit amp_module_exit(void) +{ + amp_trace("amp_driver_exit 1\n"); + + amp_drv_exit(&legacy_pe_dev); + + amp_trace("amp_driver_exit 2\n"); + amp_drv_exit(&snd_dev); + amp_trace("amp_driver_exit 3\n"); + vmeta_sched_driver_exit(); + + unregister_chrdev_region(MKDEV(amp_major, 0), AMP_MAX_DEVS); + amp_trace("unregister cdev device major [%d]\n", amp_major); + amp_major = 0; + + amp_trace("amp_driver_exit OK\n"); +} + +module_init(amp_module_init); +module_exit(amp_module_exit); + +/******************************************************************************* + Module Descrption +*/ +MODULE_AUTHOR("marvell"); +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("pe module template"); diff --git a/arch/arm/mach-berlin/modules/amp/amp_driver.h b/arch/arm/mach-berlin/modules/amp/amp_driver.h new file mode 100644 index 00000000..7aab6bf5 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/amp_driver.h @@ -0,0 +1,193 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ********************************************************************************/ +#ifndef _AMP_DRIVER_H_ +#define _AMP_DRIVER_H_ + +// server id for ICC message queue +#define MV_GS_DMX_Serv (0x00060008) +#define MV_GS_VPP_Serv (0x00060009) +#define MV_GS_AUD_Serv (0x0006000a) +#define MV_GS_ZSP_Serv (0x0006000b) +#define MV_GS_VDEC_Serv (0x0006000c) +#define MV_GS_RLE_Serv (0x0006000d) +#define MV_GS_VIP_Serv (0x0006000e) +#define MV_GS_AIP_Serv (0x0006000f) +#define MV_GS_VDM_Serv (0x00060010) +#define MV_GS_AGENT_Serv (0x00060011) +#define MV_GS_HWAPP_Serv (0x00060012) +#define MV_GS_AVIF_Serv (0x00060013) + +#define MV_BERLIN_CPU0 0 +#define AMP_MODULE_MSG_ID_VPP MV_GS_VPP_Serv +#define AMP_MODULE_MSG_ID_VDEC MV_GS_VDEC_Serv +#define AMP_MODULE_MSG_ID_AUD MV_GS_AUD_Serv +#define AMP_MODULE_MSG_ID_ZSP MV_GS_ZSP_Serv +#define AMP_MODULE_MSG_ID_RLE MV_GS_RLE_Serv +#define AMP_MODULE_MSG_ID_VIP MV_GS_VIP_Serv +#define AMP_MODULE_MSG_ID_AIP MV_GS_AIP_Serv +#define AMP_MODULE_MSG_ID_HWAPP MV_GS_HWAPP_Serv +#define AMP_MODULE_MSG_ID_AVIF MV_GS_AVIF_Serv + +#if 0//(BERLIN_CHIP_VERSION >= BERLIN_BG2_Q) +enum { + IRQ_ZSPINT, + IRQ_DHUBINTRAVIO0, + IRQ_DHUBINTRAVIIF0, //interrupt number 42 + 32 + IRQ_DHUBINTRAVIO2, + IRQ_DHUBINTRVPRO, + IRQ_SM_CEC, + IRQ_AMP_MAX, +}; +#else +enum { + IRQ_ZSPINT, + IRQ_DHUBINTRAVIO0, + IRQ_DHUBINTRAVIO1, + IRQ_DHUBINTRAVIO2, + IRQ_DHUBINTRVPRO, + IRQ_SM_CEC, + IRQ_DHUBINTRAVIIF0, + IRQ_AMP_MAX, +}; +#endif +extern int amp_irqs[IRQ_AMP_MAX]; +#define AMP_MAX_DEVS 8 +#define AMP_MINOR 0 +#define AMP_VMETA_MINOR 1 +#define AMP_SND_MINOR 2 + +#define MAX_CHANNELS 8 +typedef enum { + MULTI_PATH = 0, + LoRo_PATH = 1, + SPDIF_PATH = 2, + HDMI_PATH = 3, + MAX_OUTPUT_AUDIO = 5, +} AUDIO_PATH; + +typedef enum { + MAIN_AUDIO = 0, + SECOND_AUDIO = 1, + EFFECT_AUDIO = 2, + EXT_IN_AUDIO = 10, + BOX_EFFECT_AUDIO = 11, + MAX_INTERACTIVE_AUDIOS = 8, + MAX_INPUT_AUDIO = 12, + AUDIO_INPUT_IRRELEVANT, + NOT_DEFINED_AUDIO, +} AUDIO_CHANNEL; + +extern INT32 pri_audio_chanId_Z1[4]; +extern INT32 pri_audio_chanId_A0[4]; + +typedef struct aout_dma_info_t { + UINT32 addr0; + UINT32 size0; + UINT32 addr1; + UINT32 size1; +} AOUT_DMA_INFO; + +typedef struct aout_path_cmd_fifo_t { + AOUT_DMA_INFO aout_dma_info[4][8]; + UINT32 update_pcm[8]; + UINT32 takeout_size[8]; + UINT32 size; + UINT32 wr_offset; + UINT32 rd_offset; + UINT32 kernel_rd_offset; + UINT32 zero_buffer; + UINT32 zero_buffer_size; + UINT32 fifo_underflow; +} AOUT_PATH_CMD_FIFO; + +typedef struct aip_dma_cmd_t { + UINT32 addr0; + UINT32 size0; + UINT32 addr1; + UINT32 size1; +} AIP_DMA_CMD; + +typedef struct aip_cmd_fifo_t { + AIP_DMA_CMD aip_dma_cmd[4][8]; + UINT32 update_pcm[8]; + UINT32 takein_size[8]; + UINT32 size; + UINT32 wr_offset; + UINT32 rd_offset; + UINT32 kernel_rd_offset; + UINT32 prev_fifo_overflow_cnt; + /* used by kernel */ + UINT32 kernel_pre_rd_offset; + UINT32 overflow_buffer; + UINT32 overflow_buffer_size; + UINT32 fifo_overflow; + UINT32 fifo_overflow_cnt; +} AIP_DMA_CMD_FIFO; + +typedef struct { + UINT uiShmOffset; /**< Not used by kernel */ + UINT *unaCmdBuf; + UINT *cmd_buffer_base; + UINT max_cmd_size; + UINT cmd_len; + UINT cmd_buffer_hw_base; + VOID *p_cmd_tag; +} APP_CMD_BUFFER; + +typedef struct { + UINT m_block_samps; + UINT m_fs; + UINT m_special_flags; +} HWAPP_DATA_DS; + +typedef struct { + HWAPP_DATA_DS m_stream_in_data[MAX_INPUT_AUDIO]; + HWAPP_DATA_DS m_path_out_data[MAX_OUTPUT_AUDIO]; +} HWAPP_EVENT_CTX; + +typedef struct { + UINT uiShmOffset; /**< Not used by kernel */ + APP_CMD_BUFFER in_coef_cmd[8]; + APP_CMD_BUFFER out_coef_cmd[8]; + APP_CMD_BUFFER in_data_cmd[8]; + APP_CMD_BUFFER out_data_cmd[8]; + UINT size; + UINT wr_offset; + UINT rd_offset; + UINT kernel_rd_offset; +/************** used by Kernel *****************/ + UINT kernel_idle; +} HWAPP_CMD_FIFO; + +struct amp_device_t; + +typedef struct amp_device_t { + unsigned char *dev_name; + struct cdev cdev; + struct class *dev_class; + struct file_operations *fops; + struct mutex mutex; + int major; + int minor; + struct proc_dir_entry *dev_procdir; + void *private_data; + + int (*dev_init) (struct amp_device_t *, unsigned int); + int (*dev_exit) (struct amp_device_t *, unsigned int); + +}; + +#endif //_PE_DRIVER_H_ diff --git a/arch/arm/mach-berlin/modules/amp/amp_memmap.h b/arch/arm/mach-berlin/modules/amp/amp_memmap.h new file mode 100644 index 00000000..78943fb3 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/amp_memmap.h @@ -0,0 +1,41 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + + +#ifndef _PE_MEMMAP_H_ +#define _PE_MEMMAP_H_ + +#define MEMMAP_VIP_DHUB_REG_BASE 0xF7AE0000 +#define MEMMAP_VIP_DHUB_REG_SIZE 0x20000 +#define MEMMAP_VIP_DHUB_REG_DEC_BIT 0x11 + +#define MEMMAP_AVIF_REG_BASE 0xF7980000 +#define MEMMAP_AVIF_REG_SIZE 0x80000 +#define MEMMAP_AVIF_REG_DEC_BIT 0x13 + +#define MEMMAP_ZSP_REG_BASE 0xF7C00000 +#define MEMMAP_ZSP_REG_SIZE 0x80000 +#define MEMMAP_ZSP_REG_DEC_BIT 0x13 + +#define MEMMAP_AG_DHUB_REG_BASE 0xF7D00000 +#define MEMMAP_AG_DHUB_REG_SIZE 0x20000 +#define MEMMAP_AG_DHUB_REG_DEC_BIT 0x11 + +#define MEMMAP_VPP_DHUB_REG_BASE 0xF7F40000 +#define MEMMAP_VPP_DHUB_REG_SIZE 0x20000 +#define MEMMAP_VPP_DHUB_REG_DEC_BIT 0x11 + +#endif //_PE_MEMMAP_H_ diff --git a/arch/arm/mach-berlin/modules/amp/api_avif_dhub.h b/arch/arm/mach-berlin/modules/amp/api_avif_dhub.h new file mode 100644 index 00000000..09e2346d --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/api_avif_dhub.h @@ -0,0 +1,87 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + +#ifndef __API_AVIF_DHUB_H__ +#define __API_AVIF_DHUB_H__ +#include "dHub.h" +#include "api_dhub.h" +#include "avif_dhub_config.h" +#include "api_avio_dhub.h" +//#include "avif_port.h" + +#define MEMMAP_AVIF_DHUB_REG_BASE (HIF_CPU_DHUB_BASE_OFF) + +#define AVIF_DHUB_BASE (MEMMAP_AVIF_DHUB_REG_BASE + RA_avif_dhub_config_dHub0) +#define AVIF_HBO_SRAM_BASE (MEMMAP_AVIF_DHUB_REG_BASE + RA_avif_dhub_config_tcm0) +#define AVIF_NUM_OF_CHANNELS (avif_dhub_config_ChMap_avif_AUD_RD0+1) + + +#define AVIF_DHUB_BANK0_START_ADDR (0) +#define AVIF_DHUB_BANK1_START_ADDR (1024*8) +#define AVIF_DHUB_BANK2_START_ADDR (1024*20) +#define AVIF_DHUB_BANK3_START_ADDR (1024*32) + +#if 0 +#define DHUB_BANK0_START_ADDR (8192*0) +#define DHUB_BANK1_START_ADDR (8192*1) +#define DHUB_BANK2_START_ADDR (8192*2) +#define DHUB_BANK3_START_ADDR (8192*3) +#define DHUB_BANK4_START_ADDR (8192*4) +#define DHUB_BANK5_START_ADDR (8192*5) +#endif + + +#if 0//def AVIF_BOOTCODE +#define HIF_CPU_MADDR_BASE_OFF 0x10000000 +#define HIF_CPU_ITCM_BASE_OFF 0x00000000 +#define HIF_CPU_DHUB_BASE_OFF 0x30000000 +#else +#define HIF_CPU_MADDR_BASE_OFF 0xF7980000 +#define HIF_CPU_ITCM_BASE_OFF 0xF7990000 +#define HIF_CPU_DHUB_BASE_OFF 0xF79A0000 +#endif +#if 0 +typedef struct _DHUB_channel_config { + SIGN32 chanId; + UNSG32 chanCmdBase; + UNSG32 chanDataBase; + SIGN32 chanCmdSize; + SIGN32 chanDataSize; + SIGN32 chanMtuSize; + SIGN32 chanQos; + SIGN32 chanSelfLoop; + SIGN32 chanEnable; +} DHUB_channel_config; +#endif +extern HDL_dhub2d AVIF_dhubHandle; +extern DHUB_channel_config AVIF_config[]; + +/****************************************************************************************************************** + * Function: DhubInitialization + * Description: Initialize DHUB . + * Parameter : cpuId ------------- cpu ID + * dHubBaseAddr ------------- dHub Base address. + * hboSramAddr ----- Sram Address for HBO. + * pdhubHandle ----- pointer to 2D dhubHandle + * dhub_config ----- configuration of AG + * numOfChans ----- number of channels + * Return: void +******************************************************************************************************************/ +//void DhubInitialization(SIGN32 cpuId, UNSG32 dHubBaseAddr, UNSG32 hboSramAddr, HDL_dhub2d *pdhubHandle, DHUB_channel_config *dhub_config,SIGN32 numOfChans); + +void DhubChannelClear(void *hdl, SIGN32 id, T64b cfgQ[]); + +#endif //__API_AVIF_DHUB_H__ diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/api_dhub.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/api_dhub.h new file mode 100644 index 00000000..7ffd650c --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/api_dhub.h @@ -0,0 +1,791 @@ +/****************************************************************************************************** +* Copyright (C) 2007-2011 +* Copyright © 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +* +* $Log: vsys#comm#cmodel#hal#drv#api_dhub.h,v $ +* Revision 1.4 2007-10-30 10:58:43-07 chengjun +* Remove interrpt from HBO to semaphore. Map dHub channel 0 interrupt to semaphore channel 0. +* +* Revision 1.3 2007-10-24 21:41:17-07 kbhatt +* add structures to api_dhub.h +* +* Revision 1.2 2007-10-12 21:36:54-07 oussama +* adapted the env to use Alpha's Cmodel driver +* +* Revision 1.1 2007-08-29 20:27:01-07 lsha +* Initial revision. +* +* +* DESCRIPTION: +* OS independent layer for dHub/HBO/SemaHub APIs. +* +****************************************************************************************************/ + +#ifndef DHUB_API +#define DHUB_API " DHUB_API >>> " +/** DHUB_API + */ + +#include "ctypes.h" + +typedef struct HDL_semaphore { +UNSG32 ra; /*! Base address of $SemaHub !*/ +SIGN32 depth[32]; /*! Array of semaphore (virtual FIFO) depth !*/ +} HDL_semaphore; + +typedef struct HDL_hbo { +UNSG32 mem; /*! Base address of HBO SRAM !*/ +UNSG32 ra; /*! Base address of $HBO !*/ +HDL_semaphore fifoCtl; /*! Handle of HBO.FiFoCtl !*/ +UNSG32 base[32]; /*! Array of HBO queue base address !*/ +} HDL_hbo; + +typedef struct HDL_dhub { +UNSG32 ra; /*! Base address of $dHub !*/ +HDL_semaphore semaHub; /*! Handle of dHub.SemaHub !*/ +HDL_hbo hbo; /*! Handle of dHub.HBO !*/ +SIGN32 MTUb[16]; /*! Array of dHub channel MTU size bits !*/ +} HDL_dhub; + +typedef struct HDL_dhub2d { +UNSG32 ra; /*! Base address of $dHub2D !*/ +HDL_dhub dhub; /*! Handle of dHub2D.dHub !*/ +} HDL_dhub2d; + + +#ifdef __cplusplus + extern "C" + { +#endif + +/** SECTION - handle of local contexts + */ +extern UNSG32 sizeof_hdl_semaphore; /*! sizeof(HDL_semaphore) !*/ +extern UNSG32 sizeof_hdl_hbo; /*! sizeof(HDL_hbo) !*/ +extern UNSG32 sizeof_hdl_dhub; /*! sizeof(HDL_dhub) !*/ +extern UNSG32 sizeof_hdl_dhub2d; /*! sizeof(HDL_dhub2d) !*/ + +/** ENDOFSECTION + */ + + + +/** SECTION - API definitions for $SemaHub + */ +/******************************************************************************************** +* Function: semaphore_hdl +* Description: Initialize HDL_semaphore with a $SemaHub BIU instance. +*********************************************************************************************/ +void semaphore_hdl( + UNSG32 ra, /*! Base address of a BIU instance of $SemaHub !*/ + void *hdl /*! Handle to HDL_semaphore !*/ + ); + +/******************************************************************************************** +* Function: semaphore_cfg +* Description: Configurate a semaphore's depth & reset pointers. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 semaphore_cfg( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 depth, /*! Semaphore (virtual FIFO) depth !*/ + T64b cfgQ[] /*! Pass NULL to directly init SemaHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_intr_enable +* Description: Configurate interrupt enable bits of a semaphore. +*********************************************************************************************/ +void semaphore_intr_enable( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 empty, /*! Interrupt enable for CPU at condition 'empty' !*/ + SIGN32 full, /*! Interrupt enable for CPU at condition 'full' !*/ + SIGN32 almostEmpty, /*! Interrupt enable for CPU at condition 'almostEmpty' !*/ + SIGN32 almostFull, /*! Interrupt enable for CPU at condition 'almostFull' !*/ + SIGN32 cpu /*! CPU ID (0/1/2) !*/ + ); + +/******************************************************************************************** +* Function: semaphore_query +* Description: Query current status (counter & pointer) of a semaphore. +* Return: UNSG32 Current available unit level +*********************************************************************************************/ +UNSG32 semaphore_query( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 master, /*! 0/1 as procuder/consumer query !*/ + UNSG32 *ptr /*! Non-zero to receive semaphore r/w pointer !*/ + ); + +/******************************************************************************************** +* Function: semaphore_push +* Description: Producer semaphore push. +*********************************************************************************************/ +void semaphore_push( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 delta /*! Delta to push as a producer !*/ + ); + +/******************************************************************************************** +* Function: semaphore_push +* Description: Consumer semaphore pop. +*********************************************************************************************/ +void semaphore_pop( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 delta /*! Delta to pop as a consumer !*/ + ); + +/******************************************************************************************** +* Function: semaphore_chk_empty +* Description: Check 'empty' status of a semaphore (or all semaphores). +* Return: UNSG32 status bit of given semaphore, or +* status bits of all semaphores if id==-1 +*********************************************************************************************/ +UNSG32 semaphore_chk_empty( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub + -1 to return all 32b of the interrupt status + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_chk_full +* Description: Check 'full' status of a semaphore (or all semaphores). +* Return: UNSG32 status bit of given semaphore, or +* status bits of all semaphores if id==-1 +*********************************************************************************************/ +UNSG32 semaphore_chk_full( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub + -1 to return all 32b of the interrupt status + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_chk_almostEmpty +* Description: Check 'almostEmpty' status of a semaphore (or all semaphores). +* Return: UNSG32 status bit of given semaphore, or +* status bits of all semaphores if id==-1 +*********************************************************************************************/ +UNSG32 semaphore_chk_almostEmpty( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub + -1 to return all 32b of the interrupt status + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_chk_almostFull +* Description: Check 'almostFull' status of a semaphore (or all semaphores). +* Return: UNSG32 status bit of given semaphore, or +* status bits of all semaphores if id==-1 +*********************************************************************************************/ +UNSG32 semaphore_chk_almostFull( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub + -1 to return all 32b of the interrupt status + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_clr_empty +* Description: Clear 'empty' status of a semaphore. +*********************************************************************************************/ +void semaphore_clr_empty( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub !*/ + ); + +/******************************************************************************************** +* Function: semaphore_clr_full +* Description: Clear 'full' status of a semaphore. +*********************************************************************************************/ +void semaphore_clr_full( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub !*/ + ); + +/******************************************************************************************** +* Function: semaphore_clr_almostEmpty +* Description: Clear 'almostEmpty' status of a semaphore. +*********************************************************************************************/ +void semaphore_clr_almostEmpty( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub !*/ + ); + +/******************************************************************************************** +* Function: semaphore_clr_almostFull +* Description: Clear 'almostFull' status of a semaphore. +*********************************************************************************************/ +void semaphore_clr_almostFull( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub !*/ + ); +/** ENDOFSECTION + */ + + + +/** SECTION - API definitions for $HBO + */ +/******************************************************************************************** +* Function: hbo_hdl +* Description: Initialize HDL_hbo with a $HBO BIU instance. +*********************************************************************************************/ +void hbo_hdl( + UNSG32 mem, /*! Base address of HBO SRAM !*/ + UNSG32 ra, /*! Base address of a BIU instance of $HBO !*/ + void *hdl /*! Handle to HDL_hbo !*/ + ); + +/******************************************************************************************** +* Function: hbo_fifoCtl +* Description: Get HDL_semaphore pointer from a HBO instance. +* Return: void* Handle for HBO.FiFoCtl +*********************************************************************************************/ +void* hbo_fifoCtl(void *hdl /*! Handle to HDL_hbo !*/ + ); + +/******************************************************************************************** +* DEFINITION - convert HBO FIFO control to semaphore control +*********************************************************************************************/ +#define hbo_queue_intr_enable (hdl,id,empty,full,almostEmpty,almostFull,cpu) \ + semaphore_intr_enable (hbo_fifoCtl(hdl),id,empty,full,almostEmpty,almostFull,cpu) + +#define hbo_queue_query(hdl,id,master,ptr) \ + semaphore_query(hbo_fifoCtl(hdl),id,master,ptr) + +#define hbo_queue_push(hdl,id,delta) \ + semaphore_push(hbo_fifoCtl(hdl),id,delta) + +#define hbo_queue_pop(hdl,id,delta) \ + semaphore_pop(hbo_fifoCtl(hdl),id,delta) + +#define hbo_queue_chk_empty(hdl,id) \ + semaphore_chk_empty(hbo_fifoCtl(hdl),id) + +#define hbo_queue_chk_full(hdl,id) \ + semaphore_chk_full(hbo_fifoCtl(hdl),id) + +#define hbo_queue_chk_almostEmpty(hdl,id) \ + semaphore_chk_almostEmpty(hbo_fifoCtl(hdl),id) + +#define hbo_queue_chk_almostFull(hdl,id) \ + semaphore_chk_almostFull(hbo_fifoCtl(hdl),id) + +#define hbo_queue_clr_empty(hdl,id) \ + semaphore_clr_empty(hbo_fifoCtl(hdl),id) + +#define hbo_queue_clr_full(hdl,id) \ + semaphore_clr_full(hbo_fifoCtl(hdl),id) + +#define hbo_queue_clr_almostEmpty (hdl,id) \ + semaphore_clr_almostEmpty(hbo_fifoCtl(hdl),id) + +#define hbo_queue_clr_almostFull(hdl,id) \ + semaphore_clr_almostFull(hbo_fifoCtl(hdl),id) + +/******************************************************************************************** +* Function: hbo_queue_cfg +* Description: Configurate a FIFO's base, depth & reset pointers. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 hbo_queue_cfg( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id, /*! Queue ID in $HBO !*/ + UNSG32 base, /*! Channel FIFO base address (byte address) !*/ + SIGN32 depth, /*! Channel FIFO depth, in 64b word !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init HBO, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_enable +* Description: HBO FIFO enable/disable. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 hbo_queue_enable( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id, /*! Queue ID in $HBO !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init HBO, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_clear +* Description: Issue HBO FIFO clear (will NOT wait for finish). +*********************************************************************************************/ +void hbo_queue_clear( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id /*! Queue ID in $HBO !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_busy +* Description: Read HBO 'BUSY' status for all channel FIFOs. +* Return: UNSG32 'BUSY' status bits of all channels +*********************************************************************************************/ +UNSG32 hbo_queue_busy( + void *hdl /*! Handle to HDL_hbo !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_clear_done +* Description: Wait for a given channel or all channels to be cleared. +*********************************************************************************************/ +void hbo_queue_clear_done( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id /*! Queue ID in $HBO + -1 to wait for all channel clear done + !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_read +* Description: Read a number of 64b data & pop FIFO from HBO SRAM. +* Return: UNSG32 Number of 64b data being read (=n), or (when cfgQ==NULL) +* 0 if there're not sufficient data in FIFO +*********************************************************************************************/ +UNSG32 hbo_queue_read( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id, /*! Queue ID in $HBO !*/ + SIGN32 n, /*! Number 64b entries to read !*/ + T64b data[], /*! To receive read data !*/ + UNSG32 *ptr /*! Pass in current FIFO pointer (in 64b word), + & receive updated new pointer, + Pass NULL to read from HW + !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_write +* Description: Write a number of 64b data & push FIFO to HBO SRAM. +* Return: UNSG32 Number of (adr,pair) added to cfgQ, or (when cfgQ==NULL) +* 0 if there're not sufficient space in FIFO +*********************************************************************************************/ +UNSG32 hbo_queue_write( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id, /*! Queue ID in $HBO !*/ + SIGN32 n, /*! Number 64b entries to write !*/ + T64b data[], /*! Write data !*/ + T64b cfgQ[], /*! Pass NULL to directly update HBO, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + UNSG32 *ptr /*! Pass in current FIFO pointer (in 64b word), + & receive updated new pointer, + Pass NULL to read from HW + !*/ + ); +/** ENDOFSECTION +*/ + + + +/** SECTION - API definitions for $dHubReg +*/ +/******************************************************************************************** +* Function: dhub_hdl +* Description: Initialize HDL_dhub with a $dHub BIU instance. +*********************************************************************************************/ +void dhub_hdl( + UNSG32 mem, /*! Base address of dHub.HBO SRAM !*/ + UNSG32 ra, /*! Base address of a BIU instance of $dHub !*/ + void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_semaphore +* Description: Get HDL_semaphore pointer from a dHub instance. +* Return: void* Handle for dHub.SemaHub +*********************************************************************************************/ +void* dhub_semaphore( + void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_hbo +* Description: Get HDL_hbo pointer from a dHub instance. +* Return: void* Handle for dHub.HBO +*********************************************************************************************/ +void* dhub_hbo( void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_hbo_fifoCtl +* Description: Get HDL_semaphore pointer from the HBO of a dHub instance. +* Return: void* Handle for dHub.HBO.FiFoCtl +*********************************************************************************************/ +#define dhub_hbo_fifoCtl(hdl) (hbo_fifoCtl(dhub_hbo(hdl))) + +/******************************************************************************************** +* DEFINITION - convert from dHub channel ID to HBO FIFO ID & semaphore (interrupt) ID +*********************************************************************************************/ +// removed connection from HBO interrupt to semaphore +//#define dhub_id2intr(id) ((id)+1) +#define dhub_id2intr(id) ((id)) +#define dhub_id2hbo_cmdQ(id) ((id)*2) +#define dhub_id2hbo_data(id) ((id)*2+1) + +/******************************************************************************************** +* DEFINITION - convert dHub cmdQ/dataQ/channel-done interrupt control to HBO/semaphore control +*********************************************************************************************/ +//removed connection from HBO interrupt to semaphore +//#define dhub_hbo_intr_enable (hdl,id,empty,full,almostEmpty,almostFull,cpu) +// semaphore_intr_enable (dhub_semaphore(hdl),0,empty,full,almostEmpty,almostFull,cpu) + +#define dhub_channel_intr_enable (hdl,id,full,cpu) \ + semaphore_intr_enable (dhub_semaphore(hdl),dhub_id2intr(id),0,full,0,0,cpu) + +#define dhub_hbo_cmdQ_intr_enable (hdl,id,empty,almostEmpty,cpu) \ + hbo_queue_intr_enable (dhub_hbo(hdl),dhub_id2hbo_cmdQ(id),empty,0,almostEmpty,0,cpu) + +#define dhub_hbo_data_intr_enable (hdl,id,empty,full,almostEmpty,almostFull,cpu) \ + hbo_queue_intr_enable (dhub_hbo(hdl),dhub_id2hbo_data(id),empty,full,almostEmpty,almostFull,cpu) + +/******************************************************************************************** +* DEFINITION - convert dHub cmdQ opehdltions to HBO FIFO opehdltions +*********************************************************************************************/ +#define dhub_cmdQ_query (hdl,id,ptr) \ + hbo_queue_query (dhub_hbo(hdl),dhub_id2hbo_cmdQ(id),0,ptr) + +#define dhub_cmdQ_push (hdl,id,delta) \ + hbo_queue_push (dhub_hbo(hdl),dhub_id2hbo_cmdQ(id),delta) + +/******************************************************************************************** +* DEFINITION - convert dHub dataQ opehdltions to HBO FIFO opehdltions +*********************************************************************************************/ +#define dhub_data_query(hdl,id,master,ptr)\ + hbo_queue_query(dhub_hbo(hdl),dhub_id2hbo_data(id),master,ptr) + +#define dhub_data_push (hdl,id,delta) \ + hbo_queue_push (dhub_hbo(hdl),dhub_id2hbo_data(id),delta) + +#define dhub_data_pop (hdl,id,delta) \ + hbo_queue_pop (dhub_hbo(hdl),dhub_id2hbo_data(id),delta) + +/******************************************************************************************** +* Function: dhub_channel_cfg +* Description: Configurate a dHub channel. +* Return: UNSG32 Number of (adr,pair) added to cfgQ, or (when cfgQ==NULL) +* 0 if either cmdQ or dataQ in HBO is still busy +*********************************************************************************************/ +UNSG32 dhub_channel_cfg( + void *hdl, /*!Handle to HDL_dhub !*/ + SIGN32 id, /*!Channel ID in $dHubReg !*/ + UNSG32 baseCmd, /*!Channel FIFO base address (byte address) for cmdQ !*/ + UNSG32 baseData, /*!Channel FIFO base address (byte address) for dataQ !*/ + SIGN32 depthCmd, /*!Channel FIFO depth for cmdQ, in 64b word !*/ + SIGN32 depthData, /*!Channel FIFO depth for dataQ, in 64b word !*/ + SIGN32 mtu, /*!See 'dHubChannel.CFG.MTU', 0/1/2 for 8/32/128 bytes !*/ + SIGN32 QoS, /*!See 'dHubChannel.CFG.QoS' !*/ + SIGN32 selfLoop, /*!See 'dHubChannel.CFG.selfLoop' !*/ + SIGN32 enable, /*!0 to disable, 1 to enable !*/ + T64b cfgQ[] /*!Pass NULL to directly init dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_enable +* Description: dHub channel enable/disable. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 dhub_channel_enable( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id, /*! Channel ID in $dHubReg !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_clear +* Description: Issue dHub channel clear (will NOT wait for finish). +*********************************************************************************************/ +void dhub_channel_clear( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id /*! Channel ID in $dHubReg !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_flush +* Description: Issue dHub channel (H2M only) flush (will NOT wait for finish). +*********************************************************************************************/ +void dhub_channel_flush( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id /*! Channel ID in $dHubReg !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_busy +* Description: Read dHub 'BUSY' status for all channel FIFOs. +* Return: UNSG32 'BUSY' status bits of all channels +*********************************************************************************************/ +UNSG32 dhub_channel_busy( + void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_pending +* Description: Read dHub 'PENDING' status for all channel FIFOs. +* Return: UNSG32 'PENDING' status bits of all channels +*********************************************************************************************/ +UNSG32 dhub_channel_pending( + void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_clear_done +* Description: Wait for a given channel or all channels to be cleared or flushed. +*********************************************************************************************/ +void dhub_channel_clear_done( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id /*! Channel ID in $dHubReg + -1 to wait for all channel clear done + !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_write_cmd +* Description: Write a 64b command for a dHub channel. +* Return: UNSG32 Number of (adr,pair) added to cfgQ if success, or +* 0 if there're not sufficient space in FIFO +*********************************************************************************************/ +UNSG32 dhub_channel_write_cmd( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id, /*! Channel ID in $dHubReg !*/ + UNSG32 addr, /*! CMD: buffer address !*/ + SIGN32 size, /*! CMD: number of bytes to transfer !*/ + SIGN32 semOnMTU, /*! CMD: semaphore operation at CMD/MTU (0/1) !*/ + SIGN32 chkSemId, /*! CMD: non-zero to check semaphore !*/ + SIGN32 updSemId, /*! CMD: non-zero to update semaphore !*/ + SIGN32 interrupt, /*! CMD: raise interrupt at CMD finish !*/ + T64b cfgQ[], /*! Pass NULL to directly update dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + UNSG32 *ptr /*! Pass in current cmdQ pointer (in 64b word), + & receive updated new pointer, + Pass NULL to read from HW + !*/ + ); +/** ENDOFSECTION +*/ + +void dhub_channel_generate_cmd( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id, /*! Channel ID in $dHubReg !*/ + UNSG32 addr, /*! CMD: buffer address !*/ + SIGN32 size, /*! CMD: number of bytes to transfer !*/ + SIGN32 semOnMTU, /*! CMD: semaphore operation at CMD/MTU (0/1) !*/ + SIGN32 chkSemId, /*! CMD: non-zero to check semaphore !*/ + SIGN32 updSemId, /*! CMD: non-zero to update semaphore !*/ + SIGN32 interrupt, /*! CMD: raise interrupt at CMD finish !*/ + SIGN32 *pData + ); + +/******************************************************************************************** +* Function: dhub_channel_big_write_cmd +* Description: Write a sequence of 64b command for a dHub channel. +* Return: UNSG32 Number of (adr,pair) added to cfgQ if success, or +* 0 if there're not sufficient space in FIFO +*********************************************************************************************/ +UNSG32 dhub_channel_big_write_cmd( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id, /*! Channel ID in $dHubReg !*/ + UNSG32 addr, /*! CMD: buffer address !*/ + SIGN32 size, /*! CMD: number of bytes to transfer !*/ + SIGN32 semOnMTU, /*! CMD: semaphore operation at CMD/MTU (0/1) !*/ + SIGN32 chkSemId, /*! CMD: non-zero to check semaphore !*/ + SIGN32 updSemId, /*! CMD: non-zero to update semaphore !*/ + SIGN32 interrupt, /*! CMD: raise interrupt at CMD finish !*/ + T64b cfgQ[], /*! Pass NULL to directly update dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + UNSG32 *ptr /*! Pass in current cmdQ pointer (in 64b word), + & receive updated new pointer, + Pass NULL to read from HW + !*/ + ); + +/** SECTION - API definitions for $dHubReg2D +*/ +/******************************************************************************************** +* Function: dhub2d_hdl +* Description: Initialize HDL_dhub2d with a $dHub2D BIU instance. +*********************************************************************************************/ +void dhub2d_hdl( + UNSG32 mem, /*! Base address of dHub2D.dHub.HBO SRAM !*/ + UNSG32 ra, /*! Base address of a BIU instance of $dHub2D !*/ + void *hdl /*! Handle to HDL_dhub2d !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_cfg +* Description: Configurate a dHub2D channel. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 dhub2d_channel_cfg( + void *hdl, /*! Handle to HDL_dhub2d !*/ + SIGN32 id, /*! Channel ID in $dHubReg2D !*/ + UNSG32 addr, /*! CMD: 2D-buffer address !*/ + SIGN32 stride, /*! CMD: line stride size in bytes !*/ + SIGN32 width, /*! CMD: buffer width in bytes !*/ + SIGN32 height, /*! CMD: buffer height in lines !*/ + SIGN32 semLoop, /*! CMD: loop size (1~4) of semaphore operations !*/ + SIGN32 semOnMTU, /*! CMD: semaphore operation at CMD/MTU (0/1) !*/ + SIGN32 chkSemId[], /*! CMD: semaphore loop pattern - non-zero to check !*/ + SIGN32 updSemId[], /*! CMD: semaphore loop pattern - non-zero to update !*/ + SIGN32 interrupt, /*! CMD: raise interrupt at CMD finish !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init dHub2D, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_enable +* Description: dHub2D channel enable/disable. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 dhub2d_channel_enable( + void *hdl, /*! Handle to HDL_dhub2d !*/ + SIGN32 id, /*! Channel ID in $dHubReg2D !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init dHub2D, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_clear +* Description: Issue dHub2D channel clear (will NOT wait for finish). +*********************************************************************************************/ +void dhub2d_channel_clear( + void *hdl, /*! Handle to HDL_dhub2d !*/ + SIGN32 id /*! Channel ID in $dHubReg2D !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_busy +* Description: Read dHub2D 'BUSY' status for all channel FIFOs. +* Return: UNSG32 'BUSY' status bits of all channels +*********************************************************************************************/ +UNSG32 dhub2d_channel_busy( + void *hdl /*! Handle to HDL_dhub2d !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_clear_done +* Description: Wait for a given channel or all channels to be cleared. +*********************************************************************************************/ +void dhub2d_channel_clear_done( + void *hdl, /*! Handle to HDL_dhub2d !*/ + SIGN32 id /*! Channel ID in $dHubReg2D + -1 to wait for all channel clear done + !*/ + ); +/** ENDOFSECTION + */ + +typedef enum { + BCM_SCHED_Q0 = 0, + BCM_SCHED_Q1, + BCM_SCHED_Q2, + BCM_SCHED_Q3, + BCM_SCHED_Q4, + BCM_SCHED_Q5, + BCM_SCHED_Q6, + BCM_SCHED_Q7, + BCM_SCHED_Q8, + BCM_SCHED_Q9, + BCM_SCHED_Q10, + BCM_SCHED_Q11, + BCM_SCHED_Q12, + BCM_SCHED_Q13, + BCM_SCHED_Q14, + BCM_SCHED_Q15, + BCM_SCHED_Q16, + BCM_SCHED_Q17, + BCM_SCHED_Q18, +} ENUM_BCM_SCHED_QID; + +typedef enum { + BCM_SCHED_TRIG_CPCB0_VBI = 0, + BCM_SCHED_TRIG_CPCB1_VBI, + BCM_SCHED_TRIG_CPCB2_VBI, + BCM_SCHED_TRIG_CPCB0_VDE, + BCM_SCHED_TRIG_CPCB1_VDE, + BCM_SCHED_TRIG_CPCB2_VDE, + BCM_SCHED_TRIG_AUD_PRIM, + BCM_SCHED_TRIG_AUD_SEC, + BCM_SCHED_TRIG_AUD_HDMI, + BCM_SCHED_TRIG_AUD_SPDIF, + BCM_SCHED_TRIG_AUD_MIC, //0xA + BCM_SCHED_TRIG_VBI_VDE, + BCM_SCHED_TRIG_DVI_VDE, + BCM_SCHED_TRIG_SD_WRE, + BCM_SCHED_TRIG_SD_RDE, + BCM_SCHED_TRIG_SD_ERR, //0xF + BCM_SCHED_TRIG_NONE = 0x1f, + +} ENUM_BCM_SCHED_TRIG_EVENT; + +void BCM_SCHED_Open(void); +void BCM_SCHED_Close(void); +void BCM_SCHED_SetMux(UNSG32 QID, UNSG32 TrigEvent); +int BCM_SCHED_PushCmd(UNSG32 QID, UNSG32 *pCmd, UNSG32 *cfgQ); +void BCM_SCHED_GetEmptySts(UNSG32 QID, UNSG32 *EmptySts); + +void dhub2d_channel_clear_seq(void *hdl, SIGN32 id); +void dhub2d_channel_start_seq(void *hdl, SIGN32 id); + +#ifdef __cplusplus + } +#endif + + + +/** DHUB_API + */ +#endif + +/** ENDOFFILE: api_dhub.h + */ + diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/avif_dhub_config.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/avif_dhub_config.h new file mode 100644 index 00000000..ff082d3a --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/avif_dhub_config.h @@ -0,0 +1,4541 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + +////// +/// don't edit! auto-generated by docc: avif_dhub_config.h +//////////////////////////////////////////////////////////// +#ifndef avif_dhub_config_h +#define avif_dhub_config_h (){} + + +#include "ctypes.h" + +#pragma pack(1) +#ifdef __cplusplus + extern "C" { +#endif + +#ifndef _DOCC_H_BITOPS_ +#define _DOCC_H_BITOPS_ (){} + + #define _bSETMASK_(b) ((b)<32 ? (1<<((b)&31)) : 0) + #define _NSETMASK_(msb,lsb) (_bSETMASK_((msb)+1)-_bSETMASK_(lsb)) + #define _bCLRMASK_(b) (~_bSETMASK_(b)) + #define _NCLRMASK_(msb,lsb) (~_NSETMASK_(msb,lsb)) + #define _BFGET_(r,msb,lsb) (_NSETMASK_((msb)-(lsb),0)&((r)>>(lsb))) + #define _BFSET_(r,msb,lsb,v) do{ (r)&=_NCLRMASK_(msb,lsb); (r)|=_NSETMASK_(msb,lsb)&((v)<<(lsb)); }while(0) + +#endif + + + +////// +/// +/// $INTERFACE SemaINTR (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 mask (W-) +/// %unsigned 1 empty 0x0 +/// ### +/// * Enable interrupt on 'empty' condition +/// ### +/// %unsigned 1 full 0x0 +/// ### +/// * Enable interrupt on 'full' condition +/// ### +/// %unsigned 1 almostEmpty 0x0 +/// ### +/// * Enable interrupt on 'almostEmpty' condition +/// ### +/// %unsigned 1 almostFull 0x0 +/// ### +/// * Enable interrupt on 'almostFull' condition +/// ### +/// %% 28 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 4b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaINTR +#define h_SemaINTR (){} + + #define RA_SemaINTR_mask 0x0000 + + #define BA_SemaINTR_mask_empty 0x0000 + #define B16SemaINTR_mask_empty 0x0000 + #define LSb32SemaINTR_mask_empty 0 + #define LSb16SemaINTR_mask_empty 0 + #define bSemaINTR_mask_empty 1 + #define MSK32SemaINTR_mask_empty 0x00000001 + + #define BA_SemaINTR_mask_full 0x0000 + #define B16SemaINTR_mask_full 0x0000 + #define LSb32SemaINTR_mask_full 1 + #define LSb16SemaINTR_mask_full 1 + #define bSemaINTR_mask_full 1 + #define MSK32SemaINTR_mask_full 0x00000002 + + #define BA_SemaINTR_mask_almostEmpty 0x0000 + #define B16SemaINTR_mask_almostEmpty 0x0000 + #define LSb32SemaINTR_mask_almostEmpty 2 + #define LSb16SemaINTR_mask_almostEmpty 2 + #define bSemaINTR_mask_almostEmpty 1 + #define MSK32SemaINTR_mask_almostEmpty 0x00000004 + + #define BA_SemaINTR_mask_almostFull 0x0000 + #define B16SemaINTR_mask_almostFull 0x0000 + #define LSb32SemaINTR_mask_almostFull 3 + #define LSb16SemaINTR_mask_almostFull 3 + #define bSemaINTR_mask_almostFull 1 + #define MSK32SemaINTR_mask_almostFull 0x00000008 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaINTR { + /////////////////////////////////////////////////////////// + #define GET32SemaINTR_mask_empty(r32) _BFGET_(r32, 0, 0) + #define SET32SemaINTR_mask_empty(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaINTR_mask_empty(r16) _BFGET_(r16, 0, 0) + #define SET16SemaINTR_mask_empty(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaINTR_mask_full(r32) _BFGET_(r32, 1, 1) + #define SET32SemaINTR_mask_full(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaINTR_mask_full(r16) _BFGET_(r16, 1, 1) + #define SET16SemaINTR_mask_full(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaINTR_mask_almostEmpty(r32) _BFGET_(r32, 2, 2) + #define SET32SemaINTR_mask_almostEmpty(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaINTR_mask_almostEmpty(r16) _BFGET_(r16, 2, 2) + #define SET16SemaINTR_mask_almostEmpty(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaINTR_mask_almostFull(r32) _BFGET_(r32, 3, 3) + #define SET32SemaINTR_mask_almostFull(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaINTR_mask_almostFull(r16) _BFGET_(r16, 3, 3) + #define SET16SemaINTR_mask_almostFull(r16,v) _BFSET_(r16, 3, 3,v) + + #define w32SemaINTR_mask {\ + UNSG32 umask_empty : 1;\ + UNSG32 umask_full : 1;\ + UNSG32 umask_almostEmpty : 1;\ + UNSG32 umask_almostFull : 1;\ + UNSG32 RSVDx0_b4 : 28;\ + } + union { UNSG32 u32SemaINTR_mask; + struct w32SemaINTR_mask; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaINTR; + + typedef union T32SemaINTR_mask + { UNSG32 u32; + struct w32SemaINTR_mask; + } T32SemaINTR_mask; + /////////////////////////////////////////////////////////// + + typedef union TSemaINTR_mask + { UNSG32 u32[1]; + struct { + struct w32SemaINTR_mask; + }; + } TSemaINTR_mask; + + /////////////////////////////////////////////////////////// + SIGN32 SemaINTR_drvrd(SIE_SemaINTR *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaINTR_drvwr(SIE_SemaINTR *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaINTR_reset(SIE_SemaINTR *p); + SIGN32 SemaINTR_cmp (SIE_SemaINTR *p, SIE_SemaINTR *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaINTR_check(p,pie,pfx,hLOG) SemaINTR_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaINTR_print(p, pfx,hLOG) SemaINTR_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaINTR +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE Semaphore biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 16 DEPTH 0xF +/// ### +/// * Max level of semaphore +/// * Note: write this register will trigger counter reset +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00004 (P) +/// # 0x00004 INTR +/// $SemaINTR INTR REG [3] +/// ### +/// * Interrupt mask for 3 CPUs +/// ### +/// @ 0x00010 mask (W-) +/// %unsigned 1 full 0x0 +/// %unsigned 1 emp 0x0 +/// ### +/// * When full bit is set to one, to the producer, the semaphore will never be full, so that the producer will never be blocked. +/// * When emp bit is set to one, to the consumer, the semaphore will never be empty, so that the consumer will never be blocked. +/// * When the emp/full bit is set, the semaphore/FIFO pointer will be maintained, but the counter will be not correct anymore. +/// ### +/// %% 30 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 20B, bits: 30b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_Semaphore +#define h_Semaphore (){} + + #define RA_Semaphore_CFG 0x0000 + + #define BA_Semaphore_CFG_DEPTH 0x0000 + #define B16Semaphore_CFG_DEPTH 0x0000 + #define LSb32Semaphore_CFG_DEPTH 0 + #define LSb16Semaphore_CFG_DEPTH 0 + #define bSemaphore_CFG_DEPTH 16 + #define MSK32Semaphore_CFG_DEPTH 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_Semaphore_INTR 0x0004 + /////////////////////////////////////////////////////////// + #define RA_Semaphore_mask 0x0010 + + #define BA_Semaphore_mask_full 0x0010 + #define B16Semaphore_mask_full 0x0010 + #define LSb32Semaphore_mask_full 0 + #define LSb16Semaphore_mask_full 0 + #define bSemaphore_mask_full 1 + #define MSK32Semaphore_mask_full 0x00000001 + + #define BA_Semaphore_mask_emp 0x0010 + #define B16Semaphore_mask_emp 0x0010 + #define LSb32Semaphore_mask_emp 1 + #define LSb16Semaphore_mask_emp 1 + #define bSemaphore_mask_emp 1 + #define MSK32Semaphore_mask_emp 0x00000002 + /////////////////////////////////////////////////////////// + + typedef struct SIE_Semaphore { + /////////////////////////////////////////////////////////// + #define GET32Semaphore_CFG_DEPTH(r32) _BFGET_(r32,15, 0) + #define SET32Semaphore_CFG_DEPTH(r32,v) _BFSET_(r32,15, 0,v) + #define GET16Semaphore_CFG_DEPTH(r16) _BFGET_(r16,15, 0) + #define SET16Semaphore_CFG_DEPTH(r16,v) _BFSET_(r16,15, 0,v) + + #define w32Semaphore_CFG {\ + UNSG32 uCFG_DEPTH : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32Semaphore_CFG; + struct w32Semaphore_CFG; + }; + /////////////////////////////////////////////////////////// + SIE_SemaINTR ie_INTR[3]; + /////////////////////////////////////////////////////////// + #define GET32Semaphore_mask_full(r32) _BFGET_(r32, 0, 0) + #define SET32Semaphore_mask_full(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16Semaphore_mask_full(r16) _BFGET_(r16, 0, 0) + #define SET16Semaphore_mask_full(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32Semaphore_mask_emp(r32) _BFGET_(r32, 1, 1) + #define SET32Semaphore_mask_emp(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16Semaphore_mask_emp(r16) _BFGET_(r16, 1, 1) + #define SET16Semaphore_mask_emp(r16,v) _BFSET_(r16, 1, 1,v) + + #define w32Semaphore_mask {\ + UNSG32 umask_full : 1;\ + UNSG32 umask_emp : 1;\ + UNSG32 RSVDx10_b2 : 30;\ + } + union { UNSG32 u32Semaphore_mask; + struct w32Semaphore_mask; + }; + /////////////////////////////////////////////////////////// + } SIE_Semaphore; + + typedef union T32Semaphore_CFG + { UNSG32 u32; + struct w32Semaphore_CFG; + } T32Semaphore_CFG; + typedef union T32Semaphore_mask + { UNSG32 u32; + struct w32Semaphore_mask; + } T32Semaphore_mask; + /////////////////////////////////////////////////////////// + + typedef union TSemaphore_CFG + { UNSG32 u32[1]; + struct { + struct w32Semaphore_CFG; + }; + } TSemaphore_CFG; + typedef union TSemaphore_mask + { UNSG32 u32[1]; + struct { + struct w32Semaphore_mask; + }; + } TSemaphore_mask; + + /////////////////////////////////////////////////////////// + SIGN32 Semaphore_drvrd(SIE_Semaphore *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 Semaphore_drvwr(SIE_Semaphore *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void Semaphore_reset(SIE_Semaphore *p); + SIGN32 Semaphore_cmp (SIE_Semaphore *p, SIE_Semaphore *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define Semaphore_check(p,pie,pfx,hLOG) Semaphore_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define Semaphore_print(p, pfx,hLOG) Semaphore_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: Semaphore +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaQuery (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 RESP (R-) +/// %unsigned 16 CNT +/// ### +/// * Semaphore counter level +/// ### +/// %unsigned 16 PTR +/// ### +/// * Semaphore pointer: +/// * producer-wptr or consumer-rptr +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 32b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaQuery +#define h_SemaQuery (){} + + #define RA_SemaQuery_RESP 0x0000 + + #define BA_SemaQuery_RESP_CNT 0x0000 + #define B16SemaQuery_RESP_CNT 0x0000 + #define LSb32SemaQuery_RESP_CNT 0 + #define LSb16SemaQuery_RESP_CNT 0 + #define bSemaQuery_RESP_CNT 16 + #define MSK32SemaQuery_RESP_CNT 0x0000FFFF + + #define BA_SemaQuery_RESP_PTR 0x0002 + #define B16SemaQuery_RESP_PTR 0x0002 + #define LSb32SemaQuery_RESP_PTR 16 + #define LSb16SemaQuery_RESP_PTR 0 + #define bSemaQuery_RESP_PTR 16 + #define MSK32SemaQuery_RESP_PTR 0xFFFF0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaQuery { + /////////////////////////////////////////////////////////// + #define GET32SemaQuery_RESP_CNT(r32) _BFGET_(r32,15, 0) + #define SET32SemaQuery_RESP_CNT(r32,v) _BFSET_(r32,15, 0,v) + #define GET16SemaQuery_RESP_CNT(r16) _BFGET_(r16,15, 0) + #define SET16SemaQuery_RESP_CNT(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32SemaQuery_RESP_PTR(r32) _BFGET_(r32,31,16) + #define SET32SemaQuery_RESP_PTR(r32,v) _BFSET_(r32,31,16,v) + #define GET16SemaQuery_RESP_PTR(r16) _BFGET_(r16,15, 0) + #define SET16SemaQuery_RESP_PTR(r16,v) _BFSET_(r16,15, 0,v) + + #define w32SemaQuery_RESP {\ + UNSG32 uRESP_CNT : 16;\ + UNSG32 uRESP_PTR : 16;\ + } + union { UNSG32 u32SemaQuery_RESP; + struct w32SemaQuery_RESP; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaQuery; + + typedef union T32SemaQuery_RESP + { UNSG32 u32; + struct w32SemaQuery_RESP; + } T32SemaQuery_RESP; + /////////////////////////////////////////////////////////// + + typedef union TSemaQuery_RESP + { UNSG32 u32[1]; + struct { + struct w32SemaQuery_RESP; + }; + } TSemaQuery_RESP; + + /////////////////////////////////////////////////////////// + SIGN32 SemaQuery_drvrd(SIE_SemaQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaQuery_drvwr(SIE_SemaQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaQuery_reset(SIE_SemaQuery *p); + SIGN32 SemaQuery_cmp (SIE_SemaQuery *p, SIE_SemaQuery *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaQuery_check(p,pie,pfx,hLOG) SemaQuery_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaQuery_print(p, pfx,hLOG) SemaQuery_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaQuery +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaQueryMap (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 ADDR (P) +/// %unsigned 2 byte +/// %unsigned 5 ID +/// ### +/// * Semaphore cell index +/// ### +/// %unsigned 1 master +/// : producer 0x0 +/// : consumer 0x1 +/// ### +/// * Select which counter to read +/// ### +/// %% 24 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 8b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaQueryMap +#define h_SemaQueryMap (){} + + #define RA_SemaQueryMap_ADDR 0x0000 + + #define BA_SemaQueryMap_ADDR_byte 0x0000 + #define B16SemaQueryMap_ADDR_byte 0x0000 + #define LSb32SemaQueryMap_ADDR_byte 0 + #define LSb16SemaQueryMap_ADDR_byte 0 + #define bSemaQueryMap_ADDR_byte 2 + #define MSK32SemaQueryMap_ADDR_byte 0x00000003 + + #define BA_SemaQueryMap_ADDR_ID 0x0000 + #define B16SemaQueryMap_ADDR_ID 0x0000 + #define LSb32SemaQueryMap_ADDR_ID 2 + #define LSb16SemaQueryMap_ADDR_ID 2 + #define bSemaQueryMap_ADDR_ID 5 + #define MSK32SemaQueryMap_ADDR_ID 0x0000007C + + #define BA_SemaQueryMap_ADDR_master 0x0000 + #define B16SemaQueryMap_ADDR_master 0x0000 + #define LSb32SemaQueryMap_ADDR_master 7 + #define LSb16SemaQueryMap_ADDR_master 7 + #define bSemaQueryMap_ADDR_master 1 + #define MSK32SemaQueryMap_ADDR_master 0x00000080 + #define SemaQueryMap_ADDR_master_producer 0x0 + #define SemaQueryMap_ADDR_master_consumer 0x1 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaQueryMap { + /////////////////////////////////////////////////////////// + #define GET32SemaQueryMap_ADDR_byte(r32) _BFGET_(r32, 1, 0) + #define SET32SemaQueryMap_ADDR_byte(r32,v) _BFSET_(r32, 1, 0,v) + #define GET16SemaQueryMap_ADDR_byte(r16) _BFGET_(r16, 1, 0) + #define SET16SemaQueryMap_ADDR_byte(r16,v) _BFSET_(r16, 1, 0,v) + + #define GET32SemaQueryMap_ADDR_ID(r32) _BFGET_(r32, 6, 2) + #define SET32SemaQueryMap_ADDR_ID(r32,v) _BFSET_(r32, 6, 2,v) + #define GET16SemaQueryMap_ADDR_ID(r16) _BFGET_(r16, 6, 2) + #define SET16SemaQueryMap_ADDR_ID(r16,v) _BFSET_(r16, 6, 2,v) + + #define GET32SemaQueryMap_ADDR_master(r32) _BFGET_(r32, 7, 7) + #define SET32SemaQueryMap_ADDR_master(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaQueryMap_ADDR_master(r16) _BFGET_(r16, 7, 7) + #define SET16SemaQueryMap_ADDR_master(r16,v) _BFSET_(r16, 7, 7,v) + + #define w32SemaQueryMap_ADDR {\ + UNSG32 uADDR_byte : 2;\ + UNSG32 uADDR_ID : 5;\ + UNSG32 uADDR_master : 1;\ + UNSG32 RSVDx0_b8 : 24;\ + } + union { UNSG32 u32SemaQueryMap_ADDR; + struct w32SemaQueryMap_ADDR; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaQueryMap; + + typedef union T32SemaQueryMap_ADDR + { UNSG32 u32; + struct w32SemaQueryMap_ADDR; + } T32SemaQueryMap_ADDR; + /////////////////////////////////////////////////////////// + + typedef union TSemaQueryMap_ADDR + { UNSG32 u32[1]; + struct { + struct w32SemaQueryMap_ADDR; + }; + } TSemaQueryMap_ADDR; + + /////////////////////////////////////////////////////////// + SIGN32 SemaQueryMap_drvrd(SIE_SemaQueryMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaQueryMap_drvwr(SIE_SemaQueryMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaQueryMap_reset(SIE_SemaQueryMap *p); + SIGN32 SemaQueryMap_cmp (SIE_SemaQueryMap *p, SIE_SemaQueryMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaQueryMap_check(p,pie,pfx,hLOG) SemaQueryMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaQueryMap_print(p, pfx,hLOG) SemaQueryMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaQueryMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaHub biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 Query (R-) +/// # 0x00000 counter +/// $SemaQuery counter MEM [64] +/// ### +/// * Access address as defined above +/// ### +/// @ 0x00100 ARR (P) +/// # 0x00100 cell +/// $Semaphore cell REG [32] +/// ### +/// * Up-to 32 semaphore cells +/// ### +/// @ 0x00380 PUSH (W-) +/// %unsigned 8 ID +/// %unsigned 8 delta +/// ### +/// * CPU increases PCounter by delta (0 as push 256) +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00384 POP (W-) +/// %unsigned 8 ID +/// %unsigned 8 delta +/// ### +/// * CPU decreases CCounter by delta (0 as pop 256) +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00388 empty (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'empty' status +/// ### +/// @ 0x0038C full (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'full' status +/// ### +/// @ 0x00390 almostEmpty (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'almostEmpty' status +/// ### +/// @ 0x00394 almostFull (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'almostFull' status +/// ### +/// @ 0x00398 (W-) +/// # # Stuffing bytes... +/// %% 832 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 1024B, bits: 1152b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaHub +#define h_SemaHub (){} + + #define RA_SemaHub_Query 0x0000 + #define RA_SemaHub_counter 0x0000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_ARR 0x0100 + #define RA_SemaHub_cell 0x0100 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_PUSH 0x0380 + + #define BA_SemaHub_PUSH_ID 0x0380 + #define B16SemaHub_PUSH_ID 0x0380 + #define LSb32SemaHub_PUSH_ID 0 + #define LSb16SemaHub_PUSH_ID 0 + #define bSemaHub_PUSH_ID 8 + #define MSK32SemaHub_PUSH_ID 0x000000FF + + #define BA_SemaHub_PUSH_delta 0x0381 + #define B16SemaHub_PUSH_delta 0x0380 + #define LSb32SemaHub_PUSH_delta 8 + #define LSb16SemaHub_PUSH_delta 8 + #define bSemaHub_PUSH_delta 8 + #define MSK32SemaHub_PUSH_delta 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_POP 0x0384 + + #define BA_SemaHub_POP_ID 0x0384 + #define B16SemaHub_POP_ID 0x0384 + #define LSb32SemaHub_POP_ID 0 + #define LSb16SemaHub_POP_ID 0 + #define bSemaHub_POP_ID 8 + #define MSK32SemaHub_POP_ID 0x000000FF + + #define BA_SemaHub_POP_delta 0x0385 + #define B16SemaHub_POP_delta 0x0384 + #define LSb32SemaHub_POP_delta 8 + #define LSb16SemaHub_POP_delta 8 + #define bSemaHub_POP_delta 8 + #define MSK32SemaHub_POP_delta 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_empty 0x0388 + + #define BA_SemaHub_empty_ST_0i 0x0388 + #define B16SemaHub_empty_ST_0i 0x0388 + #define LSb32SemaHub_empty_ST_0i 0 + #define LSb16SemaHub_empty_ST_0i 0 + #define bSemaHub_empty_ST_0i 1 + #define MSK32SemaHub_empty_ST_0i 0x00000001 + + #define BA_SemaHub_empty_ST_1i 0x0388 + #define B16SemaHub_empty_ST_1i 0x0388 + #define LSb32SemaHub_empty_ST_1i 1 + #define LSb16SemaHub_empty_ST_1i 1 + #define bSemaHub_empty_ST_1i 1 + #define MSK32SemaHub_empty_ST_1i 0x00000002 + + #define BA_SemaHub_empty_ST_2i 0x0388 + #define B16SemaHub_empty_ST_2i 0x0388 + #define LSb32SemaHub_empty_ST_2i 2 + #define LSb16SemaHub_empty_ST_2i 2 + #define bSemaHub_empty_ST_2i 1 + #define MSK32SemaHub_empty_ST_2i 0x00000004 + + #define BA_SemaHub_empty_ST_3i 0x0388 + #define B16SemaHub_empty_ST_3i 0x0388 + #define LSb32SemaHub_empty_ST_3i 3 + #define LSb16SemaHub_empty_ST_3i 3 + #define bSemaHub_empty_ST_3i 1 + #define MSK32SemaHub_empty_ST_3i 0x00000008 + + #define BA_SemaHub_empty_ST_4i 0x0388 + #define B16SemaHub_empty_ST_4i 0x0388 + #define LSb32SemaHub_empty_ST_4i 4 + #define LSb16SemaHub_empty_ST_4i 4 + #define bSemaHub_empty_ST_4i 1 + #define MSK32SemaHub_empty_ST_4i 0x00000010 + + #define BA_SemaHub_empty_ST_5i 0x0388 + #define B16SemaHub_empty_ST_5i 0x0388 + #define LSb32SemaHub_empty_ST_5i 5 + #define LSb16SemaHub_empty_ST_5i 5 + #define bSemaHub_empty_ST_5i 1 + #define MSK32SemaHub_empty_ST_5i 0x00000020 + + #define BA_SemaHub_empty_ST_6i 0x0388 + #define B16SemaHub_empty_ST_6i 0x0388 + #define LSb32SemaHub_empty_ST_6i 6 + #define LSb16SemaHub_empty_ST_6i 6 + #define bSemaHub_empty_ST_6i 1 + #define MSK32SemaHub_empty_ST_6i 0x00000040 + + #define BA_SemaHub_empty_ST_7i 0x0388 + #define B16SemaHub_empty_ST_7i 0x0388 + #define LSb32SemaHub_empty_ST_7i 7 + #define LSb16SemaHub_empty_ST_7i 7 + #define bSemaHub_empty_ST_7i 1 + #define MSK32SemaHub_empty_ST_7i 0x00000080 + + #define BA_SemaHub_empty_ST_8i 0x0389 + #define B16SemaHub_empty_ST_8i 0x0388 + #define LSb32SemaHub_empty_ST_8i 8 + #define LSb16SemaHub_empty_ST_8i 8 + #define bSemaHub_empty_ST_8i 1 + #define MSK32SemaHub_empty_ST_8i 0x00000100 + + #define BA_SemaHub_empty_ST_9i 0x0389 + #define B16SemaHub_empty_ST_9i 0x0388 + #define LSb32SemaHub_empty_ST_9i 9 + #define LSb16SemaHub_empty_ST_9i 9 + #define bSemaHub_empty_ST_9i 1 + #define MSK32SemaHub_empty_ST_9i 0x00000200 + + #define BA_SemaHub_empty_ST_10i 0x0389 + #define B16SemaHub_empty_ST_10i 0x0388 + #define LSb32SemaHub_empty_ST_10i 10 + #define LSb16SemaHub_empty_ST_10i 10 + #define bSemaHub_empty_ST_10i 1 + #define MSK32SemaHub_empty_ST_10i 0x00000400 + + #define BA_SemaHub_empty_ST_11i 0x0389 + #define B16SemaHub_empty_ST_11i 0x0388 + #define LSb32SemaHub_empty_ST_11i 11 + #define LSb16SemaHub_empty_ST_11i 11 + #define bSemaHub_empty_ST_11i 1 + #define MSK32SemaHub_empty_ST_11i 0x00000800 + + #define BA_SemaHub_empty_ST_12i 0x0389 + #define B16SemaHub_empty_ST_12i 0x0388 + #define LSb32SemaHub_empty_ST_12i 12 + #define LSb16SemaHub_empty_ST_12i 12 + #define bSemaHub_empty_ST_12i 1 + #define MSK32SemaHub_empty_ST_12i 0x00001000 + + #define BA_SemaHub_empty_ST_13i 0x0389 + #define B16SemaHub_empty_ST_13i 0x0388 + #define LSb32SemaHub_empty_ST_13i 13 + #define LSb16SemaHub_empty_ST_13i 13 + #define bSemaHub_empty_ST_13i 1 + #define MSK32SemaHub_empty_ST_13i 0x00002000 + + #define BA_SemaHub_empty_ST_14i 0x0389 + #define B16SemaHub_empty_ST_14i 0x0388 + #define LSb32SemaHub_empty_ST_14i 14 + #define LSb16SemaHub_empty_ST_14i 14 + #define bSemaHub_empty_ST_14i 1 + #define MSK32SemaHub_empty_ST_14i 0x00004000 + + #define BA_SemaHub_empty_ST_15i 0x0389 + #define B16SemaHub_empty_ST_15i 0x0388 + #define LSb32SemaHub_empty_ST_15i 15 + #define LSb16SemaHub_empty_ST_15i 15 + #define bSemaHub_empty_ST_15i 1 + #define MSK32SemaHub_empty_ST_15i 0x00008000 + + #define BA_SemaHub_empty_ST_16i 0x038A + #define B16SemaHub_empty_ST_16i 0x038A + #define LSb32SemaHub_empty_ST_16i 16 + #define LSb16SemaHub_empty_ST_16i 0 + #define bSemaHub_empty_ST_16i 1 + #define MSK32SemaHub_empty_ST_16i 0x00010000 + + #define BA_SemaHub_empty_ST_17i 0x038A + #define B16SemaHub_empty_ST_17i 0x038A + #define LSb32SemaHub_empty_ST_17i 17 + #define LSb16SemaHub_empty_ST_17i 1 + #define bSemaHub_empty_ST_17i 1 + #define MSK32SemaHub_empty_ST_17i 0x00020000 + + #define BA_SemaHub_empty_ST_18i 0x038A + #define B16SemaHub_empty_ST_18i 0x038A + #define LSb32SemaHub_empty_ST_18i 18 + #define LSb16SemaHub_empty_ST_18i 2 + #define bSemaHub_empty_ST_18i 1 + #define MSK32SemaHub_empty_ST_18i 0x00040000 + + #define BA_SemaHub_empty_ST_19i 0x038A + #define B16SemaHub_empty_ST_19i 0x038A + #define LSb32SemaHub_empty_ST_19i 19 + #define LSb16SemaHub_empty_ST_19i 3 + #define bSemaHub_empty_ST_19i 1 + #define MSK32SemaHub_empty_ST_19i 0x00080000 + + #define BA_SemaHub_empty_ST_20i 0x038A + #define B16SemaHub_empty_ST_20i 0x038A + #define LSb32SemaHub_empty_ST_20i 20 + #define LSb16SemaHub_empty_ST_20i 4 + #define bSemaHub_empty_ST_20i 1 + #define MSK32SemaHub_empty_ST_20i 0x00100000 + + #define BA_SemaHub_empty_ST_21i 0x038A + #define B16SemaHub_empty_ST_21i 0x038A + #define LSb32SemaHub_empty_ST_21i 21 + #define LSb16SemaHub_empty_ST_21i 5 + #define bSemaHub_empty_ST_21i 1 + #define MSK32SemaHub_empty_ST_21i 0x00200000 + + #define BA_SemaHub_empty_ST_22i 0x038A + #define B16SemaHub_empty_ST_22i 0x038A + #define LSb32SemaHub_empty_ST_22i 22 + #define LSb16SemaHub_empty_ST_22i 6 + #define bSemaHub_empty_ST_22i 1 + #define MSK32SemaHub_empty_ST_22i 0x00400000 + + #define BA_SemaHub_empty_ST_23i 0x038A + #define B16SemaHub_empty_ST_23i 0x038A + #define LSb32SemaHub_empty_ST_23i 23 + #define LSb16SemaHub_empty_ST_23i 7 + #define bSemaHub_empty_ST_23i 1 + #define MSK32SemaHub_empty_ST_23i 0x00800000 + + #define BA_SemaHub_empty_ST_24i 0x038B + #define B16SemaHub_empty_ST_24i 0x038A + #define LSb32SemaHub_empty_ST_24i 24 + #define LSb16SemaHub_empty_ST_24i 8 + #define bSemaHub_empty_ST_24i 1 + #define MSK32SemaHub_empty_ST_24i 0x01000000 + + #define BA_SemaHub_empty_ST_25i 0x038B + #define B16SemaHub_empty_ST_25i 0x038A + #define LSb32SemaHub_empty_ST_25i 25 + #define LSb16SemaHub_empty_ST_25i 9 + #define bSemaHub_empty_ST_25i 1 + #define MSK32SemaHub_empty_ST_25i 0x02000000 + + #define BA_SemaHub_empty_ST_26i 0x038B + #define B16SemaHub_empty_ST_26i 0x038A + #define LSb32SemaHub_empty_ST_26i 26 + #define LSb16SemaHub_empty_ST_26i 10 + #define bSemaHub_empty_ST_26i 1 + #define MSK32SemaHub_empty_ST_26i 0x04000000 + + #define BA_SemaHub_empty_ST_27i 0x038B + #define B16SemaHub_empty_ST_27i 0x038A + #define LSb32SemaHub_empty_ST_27i 27 + #define LSb16SemaHub_empty_ST_27i 11 + #define bSemaHub_empty_ST_27i 1 + #define MSK32SemaHub_empty_ST_27i 0x08000000 + + #define BA_SemaHub_empty_ST_28i 0x038B + #define B16SemaHub_empty_ST_28i 0x038A + #define LSb32SemaHub_empty_ST_28i 28 + #define LSb16SemaHub_empty_ST_28i 12 + #define bSemaHub_empty_ST_28i 1 + #define MSK32SemaHub_empty_ST_28i 0x10000000 + + #define BA_SemaHub_empty_ST_29i 0x038B + #define B16SemaHub_empty_ST_29i 0x038A + #define LSb32SemaHub_empty_ST_29i 29 + #define LSb16SemaHub_empty_ST_29i 13 + #define bSemaHub_empty_ST_29i 1 + #define MSK32SemaHub_empty_ST_29i 0x20000000 + + #define BA_SemaHub_empty_ST_30i 0x038B + #define B16SemaHub_empty_ST_30i 0x038A + #define LSb32SemaHub_empty_ST_30i 30 + #define LSb16SemaHub_empty_ST_30i 14 + #define bSemaHub_empty_ST_30i 1 + #define MSK32SemaHub_empty_ST_30i 0x40000000 + + #define BA_SemaHub_empty_ST_31i 0x038B + #define B16SemaHub_empty_ST_31i 0x038A + #define LSb32SemaHub_empty_ST_31i 31 + #define LSb16SemaHub_empty_ST_31i 15 + #define bSemaHub_empty_ST_31i 1 + #define MSK32SemaHub_empty_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_full 0x038C + + #define BA_SemaHub_full_ST_0i 0x038C + #define B16SemaHub_full_ST_0i 0x038C + #define LSb32SemaHub_full_ST_0i 0 + #define LSb16SemaHub_full_ST_0i 0 + #define bSemaHub_full_ST_0i 1 + #define MSK32SemaHub_full_ST_0i 0x00000001 + + #define BA_SemaHub_full_ST_1i 0x038C + #define B16SemaHub_full_ST_1i 0x038C + #define LSb32SemaHub_full_ST_1i 1 + #define LSb16SemaHub_full_ST_1i 1 + #define bSemaHub_full_ST_1i 1 + #define MSK32SemaHub_full_ST_1i 0x00000002 + + #define BA_SemaHub_full_ST_2i 0x038C + #define B16SemaHub_full_ST_2i 0x038C + #define LSb32SemaHub_full_ST_2i 2 + #define LSb16SemaHub_full_ST_2i 2 + #define bSemaHub_full_ST_2i 1 + #define MSK32SemaHub_full_ST_2i 0x00000004 + + #define BA_SemaHub_full_ST_3i 0x038C + #define B16SemaHub_full_ST_3i 0x038C + #define LSb32SemaHub_full_ST_3i 3 + #define LSb16SemaHub_full_ST_3i 3 + #define bSemaHub_full_ST_3i 1 + #define MSK32SemaHub_full_ST_3i 0x00000008 + + #define BA_SemaHub_full_ST_4i 0x038C + #define B16SemaHub_full_ST_4i 0x038C + #define LSb32SemaHub_full_ST_4i 4 + #define LSb16SemaHub_full_ST_4i 4 + #define bSemaHub_full_ST_4i 1 + #define MSK32SemaHub_full_ST_4i 0x00000010 + + #define BA_SemaHub_full_ST_5i 0x038C + #define B16SemaHub_full_ST_5i 0x038C + #define LSb32SemaHub_full_ST_5i 5 + #define LSb16SemaHub_full_ST_5i 5 + #define bSemaHub_full_ST_5i 1 + #define MSK32SemaHub_full_ST_5i 0x00000020 + + #define BA_SemaHub_full_ST_6i 0x038C + #define B16SemaHub_full_ST_6i 0x038C + #define LSb32SemaHub_full_ST_6i 6 + #define LSb16SemaHub_full_ST_6i 6 + #define bSemaHub_full_ST_6i 1 + #define MSK32SemaHub_full_ST_6i 0x00000040 + + #define BA_SemaHub_full_ST_7i 0x038C + #define B16SemaHub_full_ST_7i 0x038C + #define LSb32SemaHub_full_ST_7i 7 + #define LSb16SemaHub_full_ST_7i 7 + #define bSemaHub_full_ST_7i 1 + #define MSK32SemaHub_full_ST_7i 0x00000080 + + #define BA_SemaHub_full_ST_8i 0x038D + #define B16SemaHub_full_ST_8i 0x038C + #define LSb32SemaHub_full_ST_8i 8 + #define LSb16SemaHub_full_ST_8i 8 + #define bSemaHub_full_ST_8i 1 + #define MSK32SemaHub_full_ST_8i 0x00000100 + + #define BA_SemaHub_full_ST_9i 0x038D + #define B16SemaHub_full_ST_9i 0x038C + #define LSb32SemaHub_full_ST_9i 9 + #define LSb16SemaHub_full_ST_9i 9 + #define bSemaHub_full_ST_9i 1 + #define MSK32SemaHub_full_ST_9i 0x00000200 + + #define BA_SemaHub_full_ST_10i 0x038D + #define B16SemaHub_full_ST_10i 0x038C + #define LSb32SemaHub_full_ST_10i 10 + #define LSb16SemaHub_full_ST_10i 10 + #define bSemaHub_full_ST_10i 1 + #define MSK32SemaHub_full_ST_10i 0x00000400 + + #define BA_SemaHub_full_ST_11i 0x038D + #define B16SemaHub_full_ST_11i 0x038C + #define LSb32SemaHub_full_ST_11i 11 + #define LSb16SemaHub_full_ST_11i 11 + #define bSemaHub_full_ST_11i 1 + #define MSK32SemaHub_full_ST_11i 0x00000800 + + #define BA_SemaHub_full_ST_12i 0x038D + #define B16SemaHub_full_ST_12i 0x038C + #define LSb32SemaHub_full_ST_12i 12 + #define LSb16SemaHub_full_ST_12i 12 + #define bSemaHub_full_ST_12i 1 + #define MSK32SemaHub_full_ST_12i 0x00001000 + + #define BA_SemaHub_full_ST_13i 0x038D + #define B16SemaHub_full_ST_13i 0x038C + #define LSb32SemaHub_full_ST_13i 13 + #define LSb16SemaHub_full_ST_13i 13 + #define bSemaHub_full_ST_13i 1 + #define MSK32SemaHub_full_ST_13i 0x00002000 + + #define BA_SemaHub_full_ST_14i 0x038D + #define B16SemaHub_full_ST_14i 0x038C + #define LSb32SemaHub_full_ST_14i 14 + #define LSb16SemaHub_full_ST_14i 14 + #define bSemaHub_full_ST_14i 1 + #define MSK32SemaHub_full_ST_14i 0x00004000 + + #define BA_SemaHub_full_ST_15i 0x038D + #define B16SemaHub_full_ST_15i 0x038C + #define LSb32SemaHub_full_ST_15i 15 + #define LSb16SemaHub_full_ST_15i 15 + #define bSemaHub_full_ST_15i 1 + #define MSK32SemaHub_full_ST_15i 0x00008000 + + #define BA_SemaHub_full_ST_16i 0x038E + #define B16SemaHub_full_ST_16i 0x038E + #define LSb32SemaHub_full_ST_16i 16 + #define LSb16SemaHub_full_ST_16i 0 + #define bSemaHub_full_ST_16i 1 + #define MSK32SemaHub_full_ST_16i 0x00010000 + + #define BA_SemaHub_full_ST_17i 0x038E + #define B16SemaHub_full_ST_17i 0x038E + #define LSb32SemaHub_full_ST_17i 17 + #define LSb16SemaHub_full_ST_17i 1 + #define bSemaHub_full_ST_17i 1 + #define MSK32SemaHub_full_ST_17i 0x00020000 + + #define BA_SemaHub_full_ST_18i 0x038E + #define B16SemaHub_full_ST_18i 0x038E + #define LSb32SemaHub_full_ST_18i 18 + #define LSb16SemaHub_full_ST_18i 2 + #define bSemaHub_full_ST_18i 1 + #define MSK32SemaHub_full_ST_18i 0x00040000 + + #define BA_SemaHub_full_ST_19i 0x038E + #define B16SemaHub_full_ST_19i 0x038E + #define LSb32SemaHub_full_ST_19i 19 + #define LSb16SemaHub_full_ST_19i 3 + #define bSemaHub_full_ST_19i 1 + #define MSK32SemaHub_full_ST_19i 0x00080000 + + #define BA_SemaHub_full_ST_20i 0x038E + #define B16SemaHub_full_ST_20i 0x038E + #define LSb32SemaHub_full_ST_20i 20 + #define LSb16SemaHub_full_ST_20i 4 + #define bSemaHub_full_ST_20i 1 + #define MSK32SemaHub_full_ST_20i 0x00100000 + + #define BA_SemaHub_full_ST_21i 0x038E + #define B16SemaHub_full_ST_21i 0x038E + #define LSb32SemaHub_full_ST_21i 21 + #define LSb16SemaHub_full_ST_21i 5 + #define bSemaHub_full_ST_21i 1 + #define MSK32SemaHub_full_ST_21i 0x00200000 + + #define BA_SemaHub_full_ST_22i 0x038E + #define B16SemaHub_full_ST_22i 0x038E + #define LSb32SemaHub_full_ST_22i 22 + #define LSb16SemaHub_full_ST_22i 6 + #define bSemaHub_full_ST_22i 1 + #define MSK32SemaHub_full_ST_22i 0x00400000 + + #define BA_SemaHub_full_ST_23i 0x038E + #define B16SemaHub_full_ST_23i 0x038E + #define LSb32SemaHub_full_ST_23i 23 + #define LSb16SemaHub_full_ST_23i 7 + #define bSemaHub_full_ST_23i 1 + #define MSK32SemaHub_full_ST_23i 0x00800000 + + #define BA_SemaHub_full_ST_24i 0x038F + #define B16SemaHub_full_ST_24i 0x038E + #define LSb32SemaHub_full_ST_24i 24 + #define LSb16SemaHub_full_ST_24i 8 + #define bSemaHub_full_ST_24i 1 + #define MSK32SemaHub_full_ST_24i 0x01000000 + + #define BA_SemaHub_full_ST_25i 0x038F + #define B16SemaHub_full_ST_25i 0x038E + #define LSb32SemaHub_full_ST_25i 25 + #define LSb16SemaHub_full_ST_25i 9 + #define bSemaHub_full_ST_25i 1 + #define MSK32SemaHub_full_ST_25i 0x02000000 + + #define BA_SemaHub_full_ST_26i 0x038F + #define B16SemaHub_full_ST_26i 0x038E + #define LSb32SemaHub_full_ST_26i 26 + #define LSb16SemaHub_full_ST_26i 10 + #define bSemaHub_full_ST_26i 1 + #define MSK32SemaHub_full_ST_26i 0x04000000 + + #define BA_SemaHub_full_ST_27i 0x038F + #define B16SemaHub_full_ST_27i 0x038E + #define LSb32SemaHub_full_ST_27i 27 + #define LSb16SemaHub_full_ST_27i 11 + #define bSemaHub_full_ST_27i 1 + #define MSK32SemaHub_full_ST_27i 0x08000000 + + #define BA_SemaHub_full_ST_28i 0x038F + #define B16SemaHub_full_ST_28i 0x038E + #define LSb32SemaHub_full_ST_28i 28 + #define LSb16SemaHub_full_ST_28i 12 + #define bSemaHub_full_ST_28i 1 + #define MSK32SemaHub_full_ST_28i 0x10000000 + + #define BA_SemaHub_full_ST_29i 0x038F + #define B16SemaHub_full_ST_29i 0x038E + #define LSb32SemaHub_full_ST_29i 29 + #define LSb16SemaHub_full_ST_29i 13 + #define bSemaHub_full_ST_29i 1 + #define MSK32SemaHub_full_ST_29i 0x20000000 + + #define BA_SemaHub_full_ST_30i 0x038F + #define B16SemaHub_full_ST_30i 0x038E + #define LSb32SemaHub_full_ST_30i 30 + #define LSb16SemaHub_full_ST_30i 14 + #define bSemaHub_full_ST_30i 1 + #define MSK32SemaHub_full_ST_30i 0x40000000 + + #define BA_SemaHub_full_ST_31i 0x038F + #define B16SemaHub_full_ST_31i 0x038E + #define LSb32SemaHub_full_ST_31i 31 + #define LSb16SemaHub_full_ST_31i 15 + #define bSemaHub_full_ST_31i 1 + #define MSK32SemaHub_full_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_almostEmpty 0x0390 + + #define BA_SemaHub_almostEmpty_ST_0i 0x0390 + #define B16SemaHub_almostEmpty_ST_0i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_0i 0 + #define LSb16SemaHub_almostEmpty_ST_0i 0 + #define bSemaHub_almostEmpty_ST_0i 1 + #define MSK32SemaHub_almostEmpty_ST_0i 0x00000001 + + #define BA_SemaHub_almostEmpty_ST_1i 0x0390 + #define B16SemaHub_almostEmpty_ST_1i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_1i 1 + #define LSb16SemaHub_almostEmpty_ST_1i 1 + #define bSemaHub_almostEmpty_ST_1i 1 + #define MSK32SemaHub_almostEmpty_ST_1i 0x00000002 + + #define BA_SemaHub_almostEmpty_ST_2i 0x0390 + #define B16SemaHub_almostEmpty_ST_2i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_2i 2 + #define LSb16SemaHub_almostEmpty_ST_2i 2 + #define bSemaHub_almostEmpty_ST_2i 1 + #define MSK32SemaHub_almostEmpty_ST_2i 0x00000004 + + #define BA_SemaHub_almostEmpty_ST_3i 0x0390 + #define B16SemaHub_almostEmpty_ST_3i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_3i 3 + #define LSb16SemaHub_almostEmpty_ST_3i 3 + #define bSemaHub_almostEmpty_ST_3i 1 + #define MSK32SemaHub_almostEmpty_ST_3i 0x00000008 + + #define BA_SemaHub_almostEmpty_ST_4i 0x0390 + #define B16SemaHub_almostEmpty_ST_4i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_4i 4 + #define LSb16SemaHub_almostEmpty_ST_4i 4 + #define bSemaHub_almostEmpty_ST_4i 1 + #define MSK32SemaHub_almostEmpty_ST_4i 0x00000010 + + #define BA_SemaHub_almostEmpty_ST_5i 0x0390 + #define B16SemaHub_almostEmpty_ST_5i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_5i 5 + #define LSb16SemaHub_almostEmpty_ST_5i 5 + #define bSemaHub_almostEmpty_ST_5i 1 + #define MSK32SemaHub_almostEmpty_ST_5i 0x00000020 + + #define BA_SemaHub_almostEmpty_ST_6i 0x0390 + #define B16SemaHub_almostEmpty_ST_6i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_6i 6 + #define LSb16SemaHub_almostEmpty_ST_6i 6 + #define bSemaHub_almostEmpty_ST_6i 1 + #define MSK32SemaHub_almostEmpty_ST_6i 0x00000040 + + #define BA_SemaHub_almostEmpty_ST_7i 0x0390 + #define B16SemaHub_almostEmpty_ST_7i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_7i 7 + #define LSb16SemaHub_almostEmpty_ST_7i 7 + #define bSemaHub_almostEmpty_ST_7i 1 + #define MSK32SemaHub_almostEmpty_ST_7i 0x00000080 + + #define BA_SemaHub_almostEmpty_ST_8i 0x0391 + #define B16SemaHub_almostEmpty_ST_8i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_8i 8 + #define LSb16SemaHub_almostEmpty_ST_8i 8 + #define bSemaHub_almostEmpty_ST_8i 1 + #define MSK32SemaHub_almostEmpty_ST_8i 0x00000100 + + #define BA_SemaHub_almostEmpty_ST_9i 0x0391 + #define B16SemaHub_almostEmpty_ST_9i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_9i 9 + #define LSb16SemaHub_almostEmpty_ST_9i 9 + #define bSemaHub_almostEmpty_ST_9i 1 + #define MSK32SemaHub_almostEmpty_ST_9i 0x00000200 + + #define BA_SemaHub_almostEmpty_ST_10i 0x0391 + #define B16SemaHub_almostEmpty_ST_10i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_10i 10 + #define LSb16SemaHub_almostEmpty_ST_10i 10 + #define bSemaHub_almostEmpty_ST_10i 1 + #define MSK32SemaHub_almostEmpty_ST_10i 0x00000400 + + #define BA_SemaHub_almostEmpty_ST_11i 0x0391 + #define B16SemaHub_almostEmpty_ST_11i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_11i 11 + #define LSb16SemaHub_almostEmpty_ST_11i 11 + #define bSemaHub_almostEmpty_ST_11i 1 + #define MSK32SemaHub_almostEmpty_ST_11i 0x00000800 + + #define BA_SemaHub_almostEmpty_ST_12i 0x0391 + #define B16SemaHub_almostEmpty_ST_12i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_12i 12 + #define LSb16SemaHub_almostEmpty_ST_12i 12 + #define bSemaHub_almostEmpty_ST_12i 1 + #define MSK32SemaHub_almostEmpty_ST_12i 0x00001000 + + #define BA_SemaHub_almostEmpty_ST_13i 0x0391 + #define B16SemaHub_almostEmpty_ST_13i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_13i 13 + #define LSb16SemaHub_almostEmpty_ST_13i 13 + #define bSemaHub_almostEmpty_ST_13i 1 + #define MSK32SemaHub_almostEmpty_ST_13i 0x00002000 + + #define BA_SemaHub_almostEmpty_ST_14i 0x0391 + #define B16SemaHub_almostEmpty_ST_14i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_14i 14 + #define LSb16SemaHub_almostEmpty_ST_14i 14 + #define bSemaHub_almostEmpty_ST_14i 1 + #define MSK32SemaHub_almostEmpty_ST_14i 0x00004000 + + #define BA_SemaHub_almostEmpty_ST_15i 0x0391 + #define B16SemaHub_almostEmpty_ST_15i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_15i 15 + #define LSb16SemaHub_almostEmpty_ST_15i 15 + #define bSemaHub_almostEmpty_ST_15i 1 + #define MSK32SemaHub_almostEmpty_ST_15i 0x00008000 + + #define BA_SemaHub_almostEmpty_ST_16i 0x0392 + #define B16SemaHub_almostEmpty_ST_16i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_16i 16 + #define LSb16SemaHub_almostEmpty_ST_16i 0 + #define bSemaHub_almostEmpty_ST_16i 1 + #define MSK32SemaHub_almostEmpty_ST_16i 0x00010000 + + #define BA_SemaHub_almostEmpty_ST_17i 0x0392 + #define B16SemaHub_almostEmpty_ST_17i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_17i 17 + #define LSb16SemaHub_almostEmpty_ST_17i 1 + #define bSemaHub_almostEmpty_ST_17i 1 + #define MSK32SemaHub_almostEmpty_ST_17i 0x00020000 + + #define BA_SemaHub_almostEmpty_ST_18i 0x0392 + #define B16SemaHub_almostEmpty_ST_18i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_18i 18 + #define LSb16SemaHub_almostEmpty_ST_18i 2 + #define bSemaHub_almostEmpty_ST_18i 1 + #define MSK32SemaHub_almostEmpty_ST_18i 0x00040000 + + #define BA_SemaHub_almostEmpty_ST_19i 0x0392 + #define B16SemaHub_almostEmpty_ST_19i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_19i 19 + #define LSb16SemaHub_almostEmpty_ST_19i 3 + #define bSemaHub_almostEmpty_ST_19i 1 + #define MSK32SemaHub_almostEmpty_ST_19i 0x00080000 + + #define BA_SemaHub_almostEmpty_ST_20i 0x0392 + #define B16SemaHub_almostEmpty_ST_20i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_20i 20 + #define LSb16SemaHub_almostEmpty_ST_20i 4 + #define bSemaHub_almostEmpty_ST_20i 1 + #define MSK32SemaHub_almostEmpty_ST_20i 0x00100000 + + #define BA_SemaHub_almostEmpty_ST_21i 0x0392 + #define B16SemaHub_almostEmpty_ST_21i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_21i 21 + #define LSb16SemaHub_almostEmpty_ST_21i 5 + #define bSemaHub_almostEmpty_ST_21i 1 + #define MSK32SemaHub_almostEmpty_ST_21i 0x00200000 + + #define BA_SemaHub_almostEmpty_ST_22i 0x0392 + #define B16SemaHub_almostEmpty_ST_22i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_22i 22 + #define LSb16SemaHub_almostEmpty_ST_22i 6 + #define bSemaHub_almostEmpty_ST_22i 1 + #define MSK32SemaHub_almostEmpty_ST_22i 0x00400000 + + #define BA_SemaHub_almostEmpty_ST_23i 0x0392 + #define B16SemaHub_almostEmpty_ST_23i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_23i 23 + #define LSb16SemaHub_almostEmpty_ST_23i 7 + #define bSemaHub_almostEmpty_ST_23i 1 + #define MSK32SemaHub_almostEmpty_ST_23i 0x00800000 + + #define BA_SemaHub_almostEmpty_ST_24i 0x0393 + #define B16SemaHub_almostEmpty_ST_24i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_24i 24 + #define LSb16SemaHub_almostEmpty_ST_24i 8 + #define bSemaHub_almostEmpty_ST_24i 1 + #define MSK32SemaHub_almostEmpty_ST_24i 0x01000000 + + #define BA_SemaHub_almostEmpty_ST_25i 0x0393 + #define B16SemaHub_almostEmpty_ST_25i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_25i 25 + #define LSb16SemaHub_almostEmpty_ST_25i 9 + #define bSemaHub_almostEmpty_ST_25i 1 + #define MSK32SemaHub_almostEmpty_ST_25i 0x02000000 + + #define BA_SemaHub_almostEmpty_ST_26i 0x0393 + #define B16SemaHub_almostEmpty_ST_26i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_26i 26 + #define LSb16SemaHub_almostEmpty_ST_26i 10 + #define bSemaHub_almostEmpty_ST_26i 1 + #define MSK32SemaHub_almostEmpty_ST_26i 0x04000000 + + #define BA_SemaHub_almostEmpty_ST_27i 0x0393 + #define B16SemaHub_almostEmpty_ST_27i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_27i 27 + #define LSb16SemaHub_almostEmpty_ST_27i 11 + #define bSemaHub_almostEmpty_ST_27i 1 + #define MSK32SemaHub_almostEmpty_ST_27i 0x08000000 + + #define BA_SemaHub_almostEmpty_ST_28i 0x0393 + #define B16SemaHub_almostEmpty_ST_28i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_28i 28 + #define LSb16SemaHub_almostEmpty_ST_28i 12 + #define bSemaHub_almostEmpty_ST_28i 1 + #define MSK32SemaHub_almostEmpty_ST_28i 0x10000000 + + #define BA_SemaHub_almostEmpty_ST_29i 0x0393 + #define B16SemaHub_almostEmpty_ST_29i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_29i 29 + #define LSb16SemaHub_almostEmpty_ST_29i 13 + #define bSemaHub_almostEmpty_ST_29i 1 + #define MSK32SemaHub_almostEmpty_ST_29i 0x20000000 + + #define BA_SemaHub_almostEmpty_ST_30i 0x0393 + #define B16SemaHub_almostEmpty_ST_30i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_30i 30 + #define LSb16SemaHub_almostEmpty_ST_30i 14 + #define bSemaHub_almostEmpty_ST_30i 1 + #define MSK32SemaHub_almostEmpty_ST_30i 0x40000000 + + #define BA_SemaHub_almostEmpty_ST_31i 0x0393 + #define B16SemaHub_almostEmpty_ST_31i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_31i 31 + #define LSb16SemaHub_almostEmpty_ST_31i 15 + #define bSemaHub_almostEmpty_ST_31i 1 + #define MSK32SemaHub_almostEmpty_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_almostFull 0x0394 + + #define BA_SemaHub_almostFull_ST_0i 0x0394 + #define B16SemaHub_almostFull_ST_0i 0x0394 + #define LSb32SemaHub_almostFull_ST_0i 0 + #define LSb16SemaHub_almostFull_ST_0i 0 + #define bSemaHub_almostFull_ST_0i 1 + #define MSK32SemaHub_almostFull_ST_0i 0x00000001 + + #define BA_SemaHub_almostFull_ST_1i 0x0394 + #define B16SemaHub_almostFull_ST_1i 0x0394 + #define LSb32SemaHub_almostFull_ST_1i 1 + #define LSb16SemaHub_almostFull_ST_1i 1 + #define bSemaHub_almostFull_ST_1i 1 + #define MSK32SemaHub_almostFull_ST_1i 0x00000002 + + #define BA_SemaHub_almostFull_ST_2i 0x0394 + #define B16SemaHub_almostFull_ST_2i 0x0394 + #define LSb32SemaHub_almostFull_ST_2i 2 + #define LSb16SemaHub_almostFull_ST_2i 2 + #define bSemaHub_almostFull_ST_2i 1 + #define MSK32SemaHub_almostFull_ST_2i 0x00000004 + + #define BA_SemaHub_almostFull_ST_3i 0x0394 + #define B16SemaHub_almostFull_ST_3i 0x0394 + #define LSb32SemaHub_almostFull_ST_3i 3 + #define LSb16SemaHub_almostFull_ST_3i 3 + #define bSemaHub_almostFull_ST_3i 1 + #define MSK32SemaHub_almostFull_ST_3i 0x00000008 + + #define BA_SemaHub_almostFull_ST_4i 0x0394 + #define B16SemaHub_almostFull_ST_4i 0x0394 + #define LSb32SemaHub_almostFull_ST_4i 4 + #define LSb16SemaHub_almostFull_ST_4i 4 + #define bSemaHub_almostFull_ST_4i 1 + #define MSK32SemaHub_almostFull_ST_4i 0x00000010 + + #define BA_SemaHub_almostFull_ST_5i 0x0394 + #define B16SemaHub_almostFull_ST_5i 0x0394 + #define LSb32SemaHub_almostFull_ST_5i 5 + #define LSb16SemaHub_almostFull_ST_5i 5 + #define bSemaHub_almostFull_ST_5i 1 + #define MSK32SemaHub_almostFull_ST_5i 0x00000020 + + #define BA_SemaHub_almostFull_ST_6i 0x0394 + #define B16SemaHub_almostFull_ST_6i 0x0394 + #define LSb32SemaHub_almostFull_ST_6i 6 + #define LSb16SemaHub_almostFull_ST_6i 6 + #define bSemaHub_almostFull_ST_6i 1 + #define MSK32SemaHub_almostFull_ST_6i 0x00000040 + + #define BA_SemaHub_almostFull_ST_7i 0x0394 + #define B16SemaHub_almostFull_ST_7i 0x0394 + #define LSb32SemaHub_almostFull_ST_7i 7 + #define LSb16SemaHub_almostFull_ST_7i 7 + #define bSemaHub_almostFull_ST_7i 1 + #define MSK32SemaHub_almostFull_ST_7i 0x00000080 + + #define BA_SemaHub_almostFull_ST_8i 0x0395 + #define B16SemaHub_almostFull_ST_8i 0x0394 + #define LSb32SemaHub_almostFull_ST_8i 8 + #define LSb16SemaHub_almostFull_ST_8i 8 + #define bSemaHub_almostFull_ST_8i 1 + #define MSK32SemaHub_almostFull_ST_8i 0x00000100 + + #define BA_SemaHub_almostFull_ST_9i 0x0395 + #define B16SemaHub_almostFull_ST_9i 0x0394 + #define LSb32SemaHub_almostFull_ST_9i 9 + #define LSb16SemaHub_almostFull_ST_9i 9 + #define bSemaHub_almostFull_ST_9i 1 + #define MSK32SemaHub_almostFull_ST_9i 0x00000200 + + #define BA_SemaHub_almostFull_ST_10i 0x0395 + #define B16SemaHub_almostFull_ST_10i 0x0394 + #define LSb32SemaHub_almostFull_ST_10i 10 + #define LSb16SemaHub_almostFull_ST_10i 10 + #define bSemaHub_almostFull_ST_10i 1 + #define MSK32SemaHub_almostFull_ST_10i 0x00000400 + + #define BA_SemaHub_almostFull_ST_11i 0x0395 + #define B16SemaHub_almostFull_ST_11i 0x0394 + #define LSb32SemaHub_almostFull_ST_11i 11 + #define LSb16SemaHub_almostFull_ST_11i 11 + #define bSemaHub_almostFull_ST_11i 1 + #define MSK32SemaHub_almostFull_ST_11i 0x00000800 + + #define BA_SemaHub_almostFull_ST_12i 0x0395 + #define B16SemaHub_almostFull_ST_12i 0x0394 + #define LSb32SemaHub_almostFull_ST_12i 12 + #define LSb16SemaHub_almostFull_ST_12i 12 + #define bSemaHub_almostFull_ST_12i 1 + #define MSK32SemaHub_almostFull_ST_12i 0x00001000 + + #define BA_SemaHub_almostFull_ST_13i 0x0395 + #define B16SemaHub_almostFull_ST_13i 0x0394 + #define LSb32SemaHub_almostFull_ST_13i 13 + #define LSb16SemaHub_almostFull_ST_13i 13 + #define bSemaHub_almostFull_ST_13i 1 + #define MSK32SemaHub_almostFull_ST_13i 0x00002000 + + #define BA_SemaHub_almostFull_ST_14i 0x0395 + #define B16SemaHub_almostFull_ST_14i 0x0394 + #define LSb32SemaHub_almostFull_ST_14i 14 + #define LSb16SemaHub_almostFull_ST_14i 14 + #define bSemaHub_almostFull_ST_14i 1 + #define MSK32SemaHub_almostFull_ST_14i 0x00004000 + + #define BA_SemaHub_almostFull_ST_15i 0x0395 + #define B16SemaHub_almostFull_ST_15i 0x0394 + #define LSb32SemaHub_almostFull_ST_15i 15 + #define LSb16SemaHub_almostFull_ST_15i 15 + #define bSemaHub_almostFull_ST_15i 1 + #define MSK32SemaHub_almostFull_ST_15i 0x00008000 + + #define BA_SemaHub_almostFull_ST_16i 0x0396 + #define B16SemaHub_almostFull_ST_16i 0x0396 + #define LSb32SemaHub_almostFull_ST_16i 16 + #define LSb16SemaHub_almostFull_ST_16i 0 + #define bSemaHub_almostFull_ST_16i 1 + #define MSK32SemaHub_almostFull_ST_16i 0x00010000 + + #define BA_SemaHub_almostFull_ST_17i 0x0396 + #define B16SemaHub_almostFull_ST_17i 0x0396 + #define LSb32SemaHub_almostFull_ST_17i 17 + #define LSb16SemaHub_almostFull_ST_17i 1 + #define bSemaHub_almostFull_ST_17i 1 + #define MSK32SemaHub_almostFull_ST_17i 0x00020000 + + #define BA_SemaHub_almostFull_ST_18i 0x0396 + #define B16SemaHub_almostFull_ST_18i 0x0396 + #define LSb32SemaHub_almostFull_ST_18i 18 + #define LSb16SemaHub_almostFull_ST_18i 2 + #define bSemaHub_almostFull_ST_18i 1 + #define MSK32SemaHub_almostFull_ST_18i 0x00040000 + + #define BA_SemaHub_almostFull_ST_19i 0x0396 + #define B16SemaHub_almostFull_ST_19i 0x0396 + #define LSb32SemaHub_almostFull_ST_19i 19 + #define LSb16SemaHub_almostFull_ST_19i 3 + #define bSemaHub_almostFull_ST_19i 1 + #define MSK32SemaHub_almostFull_ST_19i 0x00080000 + + #define BA_SemaHub_almostFull_ST_20i 0x0396 + #define B16SemaHub_almostFull_ST_20i 0x0396 + #define LSb32SemaHub_almostFull_ST_20i 20 + #define LSb16SemaHub_almostFull_ST_20i 4 + #define bSemaHub_almostFull_ST_20i 1 + #define MSK32SemaHub_almostFull_ST_20i 0x00100000 + + #define BA_SemaHub_almostFull_ST_21i 0x0396 + #define B16SemaHub_almostFull_ST_21i 0x0396 + #define LSb32SemaHub_almostFull_ST_21i 21 + #define LSb16SemaHub_almostFull_ST_21i 5 + #define bSemaHub_almostFull_ST_21i 1 + #define MSK32SemaHub_almostFull_ST_21i 0x00200000 + + #define BA_SemaHub_almostFull_ST_22i 0x0396 + #define B16SemaHub_almostFull_ST_22i 0x0396 + #define LSb32SemaHub_almostFull_ST_22i 22 + #define LSb16SemaHub_almostFull_ST_22i 6 + #define bSemaHub_almostFull_ST_22i 1 + #define MSK32SemaHub_almostFull_ST_22i 0x00400000 + + #define BA_SemaHub_almostFull_ST_23i 0x0396 + #define B16SemaHub_almostFull_ST_23i 0x0396 + #define LSb32SemaHub_almostFull_ST_23i 23 + #define LSb16SemaHub_almostFull_ST_23i 7 + #define bSemaHub_almostFull_ST_23i 1 + #define MSK32SemaHub_almostFull_ST_23i 0x00800000 + + #define BA_SemaHub_almostFull_ST_24i 0x0397 + #define B16SemaHub_almostFull_ST_24i 0x0396 + #define LSb32SemaHub_almostFull_ST_24i 24 + #define LSb16SemaHub_almostFull_ST_24i 8 + #define bSemaHub_almostFull_ST_24i 1 + #define MSK32SemaHub_almostFull_ST_24i 0x01000000 + + #define BA_SemaHub_almostFull_ST_25i 0x0397 + #define B16SemaHub_almostFull_ST_25i 0x0396 + #define LSb32SemaHub_almostFull_ST_25i 25 + #define LSb16SemaHub_almostFull_ST_25i 9 + #define bSemaHub_almostFull_ST_25i 1 + #define MSK32SemaHub_almostFull_ST_25i 0x02000000 + + #define BA_SemaHub_almostFull_ST_26i 0x0397 + #define B16SemaHub_almostFull_ST_26i 0x0396 + #define LSb32SemaHub_almostFull_ST_26i 26 + #define LSb16SemaHub_almostFull_ST_26i 10 + #define bSemaHub_almostFull_ST_26i 1 + #define MSK32SemaHub_almostFull_ST_26i 0x04000000 + + #define BA_SemaHub_almostFull_ST_27i 0x0397 + #define B16SemaHub_almostFull_ST_27i 0x0396 + #define LSb32SemaHub_almostFull_ST_27i 27 + #define LSb16SemaHub_almostFull_ST_27i 11 + #define bSemaHub_almostFull_ST_27i 1 + #define MSK32SemaHub_almostFull_ST_27i 0x08000000 + + #define BA_SemaHub_almostFull_ST_28i 0x0397 + #define B16SemaHub_almostFull_ST_28i 0x0396 + #define LSb32SemaHub_almostFull_ST_28i 28 + #define LSb16SemaHub_almostFull_ST_28i 12 + #define bSemaHub_almostFull_ST_28i 1 + #define MSK32SemaHub_almostFull_ST_28i 0x10000000 + + #define BA_SemaHub_almostFull_ST_29i 0x0397 + #define B16SemaHub_almostFull_ST_29i 0x0396 + #define LSb32SemaHub_almostFull_ST_29i 29 + #define LSb16SemaHub_almostFull_ST_29i 13 + #define bSemaHub_almostFull_ST_29i 1 + #define MSK32SemaHub_almostFull_ST_29i 0x20000000 + + #define BA_SemaHub_almostFull_ST_30i 0x0397 + #define B16SemaHub_almostFull_ST_30i 0x0396 + #define LSb32SemaHub_almostFull_ST_30i 30 + #define LSb16SemaHub_almostFull_ST_30i 14 + #define bSemaHub_almostFull_ST_30i 1 + #define MSK32SemaHub_almostFull_ST_30i 0x40000000 + + #define BA_SemaHub_almostFull_ST_31i 0x0397 + #define B16SemaHub_almostFull_ST_31i 0x0396 + #define LSb32SemaHub_almostFull_ST_31i 31 + #define LSb16SemaHub_almostFull_ST_31i 15 + #define bSemaHub_almostFull_ST_31i 1 + #define MSK32SemaHub_almostFull_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaHub { + /////////////////////////////////////////////////////////// + SIE_SemaQuery ie_counter[64]; + /////////////////////////////////////////////////////////// + SIE_Semaphore ie_cell[32]; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_PUSH_ID(r32) _BFGET_(r32, 7, 0) + #define SET32SemaHub_PUSH_ID(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16SemaHub_PUSH_ID(r16) _BFGET_(r16, 7, 0) + #define SET16SemaHub_PUSH_ID(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32SemaHub_PUSH_delta(r32) _BFGET_(r32,15, 8) + #define SET32SemaHub_PUSH_delta(r32,v) _BFSET_(r32,15, 8,v) + #define GET16SemaHub_PUSH_delta(r16) _BFGET_(r16,15, 8) + #define SET16SemaHub_PUSH_delta(r16,v) _BFSET_(r16,15, 8,v) + + #define w32SemaHub_PUSH {\ + UNSG32 uPUSH_ID : 8;\ + UNSG32 uPUSH_delta : 8;\ + UNSG32 RSVDx380_b16 : 16;\ + } + union { UNSG32 u32SemaHub_PUSH; + struct w32SemaHub_PUSH; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_POP_ID(r32) _BFGET_(r32, 7, 0) + #define SET32SemaHub_POP_ID(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16SemaHub_POP_ID(r16) _BFGET_(r16, 7, 0) + #define SET16SemaHub_POP_ID(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32SemaHub_POP_delta(r32) _BFGET_(r32,15, 8) + #define SET32SemaHub_POP_delta(r32,v) _BFSET_(r32,15, 8,v) + #define GET16SemaHub_POP_delta(r16) _BFGET_(r16,15, 8) + #define SET16SemaHub_POP_delta(r16,v) _BFSET_(r16,15, 8,v) + + #define w32SemaHub_POP {\ + UNSG32 uPOP_ID : 8;\ + UNSG32 uPOP_delta : 8;\ + UNSG32 RSVDx384_b16 : 16;\ + } + union { UNSG32 u32SemaHub_POP; + struct w32SemaHub_POP; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_empty_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_empty_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_empty_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_empty_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_empty_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_empty_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_empty_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_empty_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_empty_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_empty_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_empty_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_empty_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_empty_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_empty_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_empty_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_empty_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_empty_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_empty_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_empty_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_empty_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_empty_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_empty_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_empty_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_empty_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_empty_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_empty_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_empty_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_empty_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_empty_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_empty_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_empty_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_empty_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_empty_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_empty_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_empty_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_empty_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_empty_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_empty_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_empty_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_empty_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_empty_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_empty_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_empty_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_empty_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_empty_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_empty_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_empty_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_empty_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_empty_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_empty_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_empty_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_empty_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_empty_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_empty_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_empty_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_empty_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_empty_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_empty_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_empty_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_empty_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_empty_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_empty_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_empty_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_empty_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_empty_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_empty_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_empty_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_empty_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_empty_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_empty_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_empty_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_empty_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_empty_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_empty_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_empty_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_empty_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_empty_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_empty_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_empty_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_empty_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_empty_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_empty_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_empty_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_empty_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_empty_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_empty_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_empty_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_empty_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_empty_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_empty_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_empty_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_empty_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_empty_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_empty_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_empty_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_empty_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_empty_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_empty_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_empty_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_empty_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_empty_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_empty_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_empty_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_empty_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_empty_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_empty_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_empty_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_empty_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_empty_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_empty_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_empty_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_empty_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_empty_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_empty_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_empty_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_empty_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_empty_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_empty_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_empty_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_empty_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_empty_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_empty_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_empty_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_empty_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_empty_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_empty_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_empty_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_empty_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_empty {\ + UNSG32 uempty_ST_0i : 1;\ + UNSG32 uempty_ST_1i : 1;\ + UNSG32 uempty_ST_2i : 1;\ + UNSG32 uempty_ST_3i : 1;\ + UNSG32 uempty_ST_4i : 1;\ + UNSG32 uempty_ST_5i : 1;\ + UNSG32 uempty_ST_6i : 1;\ + UNSG32 uempty_ST_7i : 1;\ + UNSG32 uempty_ST_8i : 1;\ + UNSG32 uempty_ST_9i : 1;\ + UNSG32 uempty_ST_10i : 1;\ + UNSG32 uempty_ST_11i : 1;\ + UNSG32 uempty_ST_12i : 1;\ + UNSG32 uempty_ST_13i : 1;\ + UNSG32 uempty_ST_14i : 1;\ + UNSG32 uempty_ST_15i : 1;\ + UNSG32 uempty_ST_16i : 1;\ + UNSG32 uempty_ST_17i : 1;\ + UNSG32 uempty_ST_18i : 1;\ + UNSG32 uempty_ST_19i : 1;\ + UNSG32 uempty_ST_20i : 1;\ + UNSG32 uempty_ST_21i : 1;\ + UNSG32 uempty_ST_22i : 1;\ + UNSG32 uempty_ST_23i : 1;\ + UNSG32 uempty_ST_24i : 1;\ + UNSG32 uempty_ST_25i : 1;\ + UNSG32 uempty_ST_26i : 1;\ + UNSG32 uempty_ST_27i : 1;\ + UNSG32 uempty_ST_28i : 1;\ + UNSG32 uempty_ST_29i : 1;\ + UNSG32 uempty_ST_30i : 1;\ + UNSG32 uempty_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_empty; + struct w32SemaHub_empty; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_full_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_full_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_full_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_full_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_full_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_full_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_full_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_full_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_full_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_full_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_full_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_full_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_full_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_full_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_full_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_full_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_full_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_full_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_full_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_full_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_full_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_full_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_full_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_full_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_full_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_full_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_full_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_full_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_full_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_full_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_full_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_full_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_full_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_full_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_full_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_full_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_full_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_full_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_full_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_full_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_full_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_full_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_full_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_full_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_full_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_full_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_full_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_full_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_full_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_full_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_full_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_full_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_full_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_full_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_full_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_full_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_full_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_full_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_full_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_full_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_full_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_full_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_full_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_full_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_full_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_full_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_full_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_full_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_full_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_full_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_full_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_full_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_full_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_full_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_full_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_full_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_full_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_full_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_full_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_full_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_full_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_full_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_full_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_full_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_full_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_full_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_full_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_full_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_full_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_full_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_full_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_full_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_full_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_full_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_full_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_full_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_full_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_full_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_full_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_full_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_full_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_full_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_full_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_full_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_full_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_full_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_full_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_full_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_full_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_full_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_full_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_full_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_full_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_full_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_full_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_full_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_full_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_full_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_full_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_full_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_full_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_full_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_full_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_full_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_full_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_full_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_full_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_full_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_full {\ + UNSG32 ufull_ST_0i : 1;\ + UNSG32 ufull_ST_1i : 1;\ + UNSG32 ufull_ST_2i : 1;\ + UNSG32 ufull_ST_3i : 1;\ + UNSG32 ufull_ST_4i : 1;\ + UNSG32 ufull_ST_5i : 1;\ + UNSG32 ufull_ST_6i : 1;\ + UNSG32 ufull_ST_7i : 1;\ + UNSG32 ufull_ST_8i : 1;\ + UNSG32 ufull_ST_9i : 1;\ + UNSG32 ufull_ST_10i : 1;\ + UNSG32 ufull_ST_11i : 1;\ + UNSG32 ufull_ST_12i : 1;\ + UNSG32 ufull_ST_13i : 1;\ + UNSG32 ufull_ST_14i : 1;\ + UNSG32 ufull_ST_15i : 1;\ + UNSG32 ufull_ST_16i : 1;\ + UNSG32 ufull_ST_17i : 1;\ + UNSG32 ufull_ST_18i : 1;\ + UNSG32 ufull_ST_19i : 1;\ + UNSG32 ufull_ST_20i : 1;\ + UNSG32 ufull_ST_21i : 1;\ + UNSG32 ufull_ST_22i : 1;\ + UNSG32 ufull_ST_23i : 1;\ + UNSG32 ufull_ST_24i : 1;\ + UNSG32 ufull_ST_25i : 1;\ + UNSG32 ufull_ST_26i : 1;\ + UNSG32 ufull_ST_27i : 1;\ + UNSG32 ufull_ST_28i : 1;\ + UNSG32 ufull_ST_29i : 1;\ + UNSG32 ufull_ST_30i : 1;\ + UNSG32 ufull_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_full; + struct w32SemaHub_full; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_almostEmpty_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_almostEmpty_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_almostEmpty_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostEmpty_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostEmpty_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_almostEmpty_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_almostEmpty_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostEmpty_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostEmpty_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_almostEmpty_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_almostEmpty_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostEmpty_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostEmpty_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_almostEmpty_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_almostEmpty_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostEmpty_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostEmpty_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_almostEmpty_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_almostEmpty_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostEmpty_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostEmpty_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_almostEmpty_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_almostEmpty_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostEmpty_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostEmpty_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_almostEmpty_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_almostEmpty_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostEmpty_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostEmpty_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_almostEmpty_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_almostEmpty_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostEmpty_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostEmpty_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_almostEmpty_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_almostEmpty_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostEmpty_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostEmpty_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_almostEmpty_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_almostEmpty_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostEmpty_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostEmpty_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_almostEmpty_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_almostEmpty_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostEmpty_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostEmpty_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_almostEmpty_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_almostEmpty_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostEmpty_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostEmpty_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_almostEmpty_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_almostEmpty_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostEmpty_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostEmpty_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_almostEmpty_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_almostEmpty_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostEmpty_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostEmpty_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_almostEmpty_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_almostEmpty_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostEmpty_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostEmpty_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_almostEmpty_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_almostEmpty_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostEmpty_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_almostEmpty_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_almostEmpty_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_almostEmpty_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostEmpty_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostEmpty_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_almostEmpty_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_almostEmpty_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostEmpty_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostEmpty_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_almostEmpty_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_almostEmpty_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostEmpty_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostEmpty_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_almostEmpty_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_almostEmpty_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostEmpty_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostEmpty_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_almostEmpty_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_almostEmpty_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostEmpty_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostEmpty_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_almostEmpty_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_almostEmpty_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostEmpty_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostEmpty_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_almostEmpty_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_almostEmpty_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostEmpty_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostEmpty_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_almostEmpty_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_almostEmpty_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostEmpty_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostEmpty_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_almostEmpty_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_almostEmpty_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostEmpty_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostEmpty_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_almostEmpty_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_almostEmpty_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostEmpty_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostEmpty_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_almostEmpty_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_almostEmpty_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostEmpty_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostEmpty_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_almostEmpty_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_almostEmpty_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostEmpty_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostEmpty_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_almostEmpty_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_almostEmpty_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostEmpty_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostEmpty_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_almostEmpty_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_almostEmpty_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostEmpty_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostEmpty_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_almostEmpty_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_almostEmpty_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostEmpty_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostEmpty_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_almostEmpty_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_almostEmpty_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostEmpty_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_almostEmpty {\ + UNSG32 ualmostEmpty_ST_0i : 1;\ + UNSG32 ualmostEmpty_ST_1i : 1;\ + UNSG32 ualmostEmpty_ST_2i : 1;\ + UNSG32 ualmostEmpty_ST_3i : 1;\ + UNSG32 ualmostEmpty_ST_4i : 1;\ + UNSG32 ualmostEmpty_ST_5i : 1;\ + UNSG32 ualmostEmpty_ST_6i : 1;\ + UNSG32 ualmostEmpty_ST_7i : 1;\ + UNSG32 ualmostEmpty_ST_8i : 1;\ + UNSG32 ualmostEmpty_ST_9i : 1;\ + UNSG32 ualmostEmpty_ST_10i : 1;\ + UNSG32 ualmostEmpty_ST_11i : 1;\ + UNSG32 ualmostEmpty_ST_12i : 1;\ + UNSG32 ualmostEmpty_ST_13i : 1;\ + UNSG32 ualmostEmpty_ST_14i : 1;\ + UNSG32 ualmostEmpty_ST_15i : 1;\ + UNSG32 ualmostEmpty_ST_16i : 1;\ + UNSG32 ualmostEmpty_ST_17i : 1;\ + UNSG32 ualmostEmpty_ST_18i : 1;\ + UNSG32 ualmostEmpty_ST_19i : 1;\ + UNSG32 ualmostEmpty_ST_20i : 1;\ + UNSG32 ualmostEmpty_ST_21i : 1;\ + UNSG32 ualmostEmpty_ST_22i : 1;\ + UNSG32 ualmostEmpty_ST_23i : 1;\ + UNSG32 ualmostEmpty_ST_24i : 1;\ + UNSG32 ualmostEmpty_ST_25i : 1;\ + UNSG32 ualmostEmpty_ST_26i : 1;\ + UNSG32 ualmostEmpty_ST_27i : 1;\ + UNSG32 ualmostEmpty_ST_28i : 1;\ + UNSG32 ualmostEmpty_ST_29i : 1;\ + UNSG32 ualmostEmpty_ST_30i : 1;\ + UNSG32 ualmostEmpty_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_almostEmpty; + struct w32SemaHub_almostEmpty; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_almostFull_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_almostFull_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_almostFull_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostFull_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostFull_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_almostFull_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_almostFull_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostFull_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostFull_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_almostFull_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_almostFull_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostFull_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostFull_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_almostFull_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_almostFull_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostFull_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostFull_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_almostFull_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_almostFull_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostFull_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostFull_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_almostFull_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_almostFull_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostFull_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostFull_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_almostFull_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_almostFull_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostFull_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostFull_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_almostFull_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_almostFull_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostFull_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostFull_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_almostFull_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_almostFull_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostFull_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostFull_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_almostFull_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_almostFull_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostFull_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostFull_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_almostFull_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_almostFull_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostFull_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostFull_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_almostFull_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_almostFull_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostFull_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostFull_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_almostFull_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_almostFull_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostFull_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostFull_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_almostFull_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_almostFull_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostFull_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostFull_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_almostFull_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_almostFull_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostFull_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostFull_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_almostFull_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_almostFull_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostFull_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_almostFull_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_almostFull_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_almostFull_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostFull_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostFull_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_almostFull_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_almostFull_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostFull_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostFull_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_almostFull_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_almostFull_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostFull_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostFull_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_almostFull_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_almostFull_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostFull_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostFull_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_almostFull_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_almostFull_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostFull_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostFull_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_almostFull_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_almostFull_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostFull_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostFull_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_almostFull_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_almostFull_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostFull_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostFull_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_almostFull_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_almostFull_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostFull_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostFull_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_almostFull_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_almostFull_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostFull_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostFull_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_almostFull_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_almostFull_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostFull_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostFull_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_almostFull_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_almostFull_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostFull_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostFull_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_almostFull_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_almostFull_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostFull_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostFull_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_almostFull_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_almostFull_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostFull_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostFull_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_almostFull_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_almostFull_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostFull_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostFull_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_almostFull_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_almostFull_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostFull_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostFull_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_almostFull_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_almostFull_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostFull_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_almostFull {\ + UNSG32 ualmostFull_ST_0i : 1;\ + UNSG32 ualmostFull_ST_1i : 1;\ + UNSG32 ualmostFull_ST_2i : 1;\ + UNSG32 ualmostFull_ST_3i : 1;\ + UNSG32 ualmostFull_ST_4i : 1;\ + UNSG32 ualmostFull_ST_5i : 1;\ + UNSG32 ualmostFull_ST_6i : 1;\ + UNSG32 ualmostFull_ST_7i : 1;\ + UNSG32 ualmostFull_ST_8i : 1;\ + UNSG32 ualmostFull_ST_9i : 1;\ + UNSG32 ualmostFull_ST_10i : 1;\ + UNSG32 ualmostFull_ST_11i : 1;\ + UNSG32 ualmostFull_ST_12i : 1;\ + UNSG32 ualmostFull_ST_13i : 1;\ + UNSG32 ualmostFull_ST_14i : 1;\ + UNSG32 ualmostFull_ST_15i : 1;\ + UNSG32 ualmostFull_ST_16i : 1;\ + UNSG32 ualmostFull_ST_17i : 1;\ + UNSG32 ualmostFull_ST_18i : 1;\ + UNSG32 ualmostFull_ST_19i : 1;\ + UNSG32 ualmostFull_ST_20i : 1;\ + UNSG32 ualmostFull_ST_21i : 1;\ + UNSG32 ualmostFull_ST_22i : 1;\ + UNSG32 ualmostFull_ST_23i : 1;\ + UNSG32 ualmostFull_ST_24i : 1;\ + UNSG32 ualmostFull_ST_25i : 1;\ + UNSG32 ualmostFull_ST_26i : 1;\ + UNSG32 ualmostFull_ST_27i : 1;\ + UNSG32 ualmostFull_ST_28i : 1;\ + UNSG32 ualmostFull_ST_29i : 1;\ + UNSG32 ualmostFull_ST_30i : 1;\ + UNSG32 ualmostFull_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_almostFull; + struct w32SemaHub_almostFull; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx398 [104]; + /////////////////////////////////////////////////////////// + } SIE_SemaHub; + + typedef union T32SemaHub_PUSH + { UNSG32 u32; + struct w32SemaHub_PUSH; + } T32SemaHub_PUSH; + typedef union T32SemaHub_POP + { UNSG32 u32; + struct w32SemaHub_POP; + } T32SemaHub_POP; + typedef union T32SemaHub_empty + { UNSG32 u32; + struct w32SemaHub_empty; + } T32SemaHub_empty; + typedef union T32SemaHub_full + { UNSG32 u32; + struct w32SemaHub_full; + } T32SemaHub_full; + typedef union T32SemaHub_almostEmpty + { UNSG32 u32; + struct w32SemaHub_almostEmpty; + } T32SemaHub_almostEmpty; + typedef union T32SemaHub_almostFull + { UNSG32 u32; + struct w32SemaHub_almostFull; + } T32SemaHub_almostFull; + /////////////////////////////////////////////////////////// + + typedef union TSemaHub_PUSH + { UNSG32 u32[1]; + struct { + struct w32SemaHub_PUSH; + }; + } TSemaHub_PUSH; + typedef union TSemaHub_POP + { UNSG32 u32[1]; + struct { + struct w32SemaHub_POP; + }; + } TSemaHub_POP; + typedef union TSemaHub_empty + { UNSG32 u32[1]; + struct { + struct w32SemaHub_empty; + }; + } TSemaHub_empty; + typedef union TSemaHub_full + { UNSG32 u32[1]; + struct { + struct w32SemaHub_full; + }; + } TSemaHub_full; + typedef union TSemaHub_almostEmpty + { UNSG32 u32[1]; + struct { + struct w32SemaHub_almostEmpty; + }; + } TSemaHub_almostEmpty; + typedef union TSemaHub_almostFull + { UNSG32 u32[1]; + struct { + struct w32SemaHub_almostFull; + }; + } TSemaHub_almostFull; + + /////////////////////////////////////////////////////////// + SIGN32 SemaHub_drvrd(SIE_SemaHub *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaHub_drvwr(SIE_SemaHub *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaHub_reset(SIE_SemaHub *p); + SIGN32 SemaHub_cmp (SIE_SemaHub *p, SIE_SemaHub *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaHub_check(p,pie,pfx,hLOG) SemaHub_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaHub_print(p, pfx,hLOG) SemaHub_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaHub +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE FiFo biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 20 BASE +/// ### +/// * Base address (byte-address) of a FIFO in the shared SRAM. A channel's read/write pointers will be added to this “BASE†to get exact location of shared SRAM. +/// * Note: aligned with base SRAM data bus. +/// * For example, if SRAM data is 64-bit, then base[2:0] should be 3'b0; +/// ### +/// %% 12 # Stuffing bits... +/// @ 0x00004 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to this register will enable this channel, or 0 to this register will disable this channel. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to clear FIFO pointers to 0. +/// * Note : +/// * CPU should make sure to disabled the channel (write 0 to START_EN register) before issue clear command, otherwise the clear request will be ignored. +/// * Do not restart the channel when clear operation is in process. +/// * HW will make sure there is no pending transactions before execute the clear operation. +/// * Associated semaphore cell needs reset separately by re-write “CFG_DEPTH†+/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C FLUSH (W-) +/// %unsigned 1 EN +/// ### +/// * No support for now +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 23b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_FiFo +#define h_FiFo (){} + + #define RA_FiFo_CFG 0x0000 + + #define BA_FiFo_CFG_BASE 0x0000 + #define B16FiFo_CFG_BASE 0x0000 + #define LSb32FiFo_CFG_BASE 0 + #define LSb16FiFo_CFG_BASE 0 + #define bFiFo_CFG_BASE 20 + #define MSK32FiFo_CFG_BASE 0x000FFFFF + /////////////////////////////////////////////////////////// + #define RA_FiFo_START 0x0004 + + #define BA_FiFo_START_EN 0x0004 + #define B16FiFo_START_EN 0x0004 + #define LSb32FiFo_START_EN 0 + #define LSb16FiFo_START_EN 0 + #define bFiFo_START_EN 1 + #define MSK32FiFo_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_FiFo_CLEAR 0x0008 + + #define BA_FiFo_CLEAR_EN 0x0008 + #define B16FiFo_CLEAR_EN 0x0008 + #define LSb32FiFo_CLEAR_EN 0 + #define LSb16FiFo_CLEAR_EN 0 + #define bFiFo_CLEAR_EN 1 + #define MSK32FiFo_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_FiFo_FLUSH 0x000C + + #define BA_FiFo_FLUSH_EN 0x000C + #define B16FiFo_FLUSH_EN 0x000C + #define LSb32FiFo_FLUSH_EN 0 + #define LSb16FiFo_FLUSH_EN 0 + #define bFiFo_FLUSH_EN 1 + #define MSK32FiFo_FLUSH_EN 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_FiFo { + /////////////////////////////////////////////////////////// + #define GET32FiFo_CFG_BASE(r32) _BFGET_(r32,19, 0) + #define SET32FiFo_CFG_BASE(r32,v) _BFSET_(r32,19, 0,v) + + #define w32FiFo_CFG {\ + UNSG32 uCFG_BASE : 20;\ + UNSG32 RSVDx0_b20 : 12;\ + } + union { UNSG32 u32FiFo_CFG; + struct w32FiFo_CFG; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } + union { UNSG32 u32FiFo_START; + struct w32FiFo_START; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32FiFo_CLEAR; + struct w32FiFo_CLEAR; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_FLUSH_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_FLUSH_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_FLUSH_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_FLUSH_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_FLUSH {\ + UNSG32 uFLUSH_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32FiFo_FLUSH; + struct w32FiFo_FLUSH; + }; + /////////////////////////////////////////////////////////// + } SIE_FiFo; + + typedef union T32FiFo_CFG + { UNSG32 u32; + struct w32FiFo_CFG; + } T32FiFo_CFG; + typedef union T32FiFo_START + { UNSG32 u32; + struct w32FiFo_START; + } T32FiFo_START; + typedef union T32FiFo_CLEAR + { UNSG32 u32; + struct w32FiFo_CLEAR; + } T32FiFo_CLEAR; + typedef union T32FiFo_FLUSH + { UNSG32 u32; + struct w32FiFo_FLUSH; + } T32FiFo_FLUSH; + /////////////////////////////////////////////////////////// + + typedef union TFiFo_CFG + { UNSG32 u32[1]; + struct { + struct w32FiFo_CFG; + }; + } TFiFo_CFG; + typedef union TFiFo_START + { UNSG32 u32[1]; + struct { + struct w32FiFo_START; + }; + } TFiFo_START; + typedef union TFiFo_CLEAR + { UNSG32 u32[1]; + struct { + struct w32FiFo_CLEAR; + }; + } TFiFo_CLEAR; + typedef union TFiFo_FLUSH + { UNSG32 u32[1]; + struct { + struct w32FiFo_FLUSH; + }; + } TFiFo_FLUSH; + + /////////////////////////////////////////////////////////// + SIGN32 FiFo_drvrd(SIE_FiFo *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 FiFo_drvwr(SIE_FiFo *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void FiFo_reset(SIE_FiFo *p); + SIGN32 FiFo_cmp (SIE_FiFo *p, SIE_FiFo *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define FiFo_check(p,pie,pfx,hLOG) FiFo_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define FiFo_print(p, pfx,hLOG) FiFo_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: FiFo +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE HBO biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 FiFoCtl +/// $SemaHub FiFoCtl REG +/// @ 0x00400 ARR (P) +/// # 0x00400 FiFo +/// $FiFo FiFo REG [32] +/// ### +/// * Up-to 32 FIFO channels +/// * FiFo[N] is controlled by HBO.FiFoCtl.Channel[N] +/// ### +/// @ 0x00600 BUSY (R-) +/// %unsigned 32 ST +/// ### +/// * Per channel status +/// * Indicate the clear operation status. +/// * 1: clear is in process. +/// * 0 : clear is done. +/// ### +/// @ 0x00604 (W-) +/// # # Stuffing bytes... +/// %% 2016 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 1792B, bits: 1920b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_HBO +#define h_HBO (){} + + #define RA_HBO_FiFoCtl 0x0000 + /////////////////////////////////////////////////////////// + #define RA_HBO_ARR 0x0400 + #define RA_HBO_FiFo 0x0400 + /////////////////////////////////////////////////////////// + #define RA_HBO_BUSY 0x0600 + + #define BA_HBO_BUSY_ST 0x0600 + #define B16HBO_BUSY_ST 0x0600 + #define LSb32HBO_BUSY_ST 0 + #define LSb16HBO_BUSY_ST 0 + #define bHBO_BUSY_ST 32 + #define MSK32HBO_BUSY_ST 0xFFFFFFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_HBO { + /////////////////////////////////////////////////////////// + SIE_SemaHub ie_FiFoCtl; + /////////////////////////////////////////////////////////// + SIE_FiFo ie_FiFo[32]; + /////////////////////////////////////////////////////////// + #define GET32HBO_BUSY_ST(r32) _BFGET_(r32,31, 0) + #define SET32HBO_BUSY_ST(r32,v) _BFSET_(r32,31, 0,v) + + #define w32HBO_BUSY {\ + UNSG32 uBUSY_ST : 32;\ + } + union { UNSG32 u32HBO_BUSY; + struct w32HBO_BUSY; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx604 [252]; + /////////////////////////////////////////////////////////// + } SIE_HBO; + + typedef union T32HBO_BUSY + { UNSG32 u32; + struct w32HBO_BUSY; + } T32HBO_BUSY; + /////////////////////////////////////////////////////////// + + typedef union THBO_BUSY + { UNSG32 u32[1]; + struct { + struct w32HBO_BUSY; + }; + } THBO_BUSY; + + /////////////////////////////////////////////////////////// + SIGN32 HBO_drvrd(SIE_HBO *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 HBO_drvwr(SIE_HBO *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void HBO_reset(SIE_HBO *p); + SIGN32 HBO_cmp (SIE_HBO *p, SIE_HBO *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define HBO_check(p,pie,pfx,hLOG) HBO_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define HBO_print(p, pfx,hLOG) HBO_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: HBO +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE LLDesFmt biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 mem (P) +/// %unsigned 16 size +/// ### +/// * The size of one piece of scattered memory. +/// ### +/// %% 16 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 16b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_LLDesFmt +#define h_LLDesFmt (){} + + #define RA_LLDesFmt_mem 0x0000 + + #define BA_LLDesFmt_mem_size 0x0000 + #define B16LLDesFmt_mem_size 0x0000 + #define LSb32LLDesFmt_mem_size 0 + #define LSb16LLDesFmt_mem_size 0 + #define bLLDesFmt_mem_size 16 + #define MSK32LLDesFmt_mem_size 0x0000FFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_LLDesFmt { + /////////////////////////////////////////////////////////// + #define GET32LLDesFmt_mem_size(r32) _BFGET_(r32,15, 0) + #define SET32LLDesFmt_mem_size(r32,v) _BFSET_(r32,15, 0,v) + #define GET16LLDesFmt_mem_size(r16) _BFGET_(r16,15, 0) + #define SET16LLDesFmt_mem_size(r16,v) _BFSET_(r16,15, 0,v) + + #define w32LLDesFmt_mem {\ + UNSG32 umem_size : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32LLDesFmt_mem; + struct w32LLDesFmt_mem; + }; + /////////////////////////////////////////////////////////// + } SIE_LLDesFmt; + + typedef union T32LLDesFmt_mem + { UNSG32 u32; + struct w32LLDesFmt_mem; + } T32LLDesFmt_mem; + /////////////////////////////////////////////////////////// + + typedef union TLLDesFmt_mem + { UNSG32 u32[1]; + struct { + struct w32LLDesFmt_mem; + }; + } TLLDesFmt_mem; + + /////////////////////////////////////////////////////////// + SIGN32 LLDesFmt_drvrd(SIE_LLDesFmt *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 LLDesFmt_drvwr(SIE_LLDesFmt *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void LLDesFmt_reset(SIE_LLDesFmt *p); + SIGN32 LLDesFmt_cmp (SIE_LLDesFmt *p, SIE_LLDesFmt *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define LLDesFmt_check(p,pie,pfx,hLOG) LLDesFmt_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define LLDesFmt_print(p, pfx,hLOG) LLDesFmt_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: LLDesFmt +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmdHDR (4,4) +/// ### +/// * 32-bit dHub command header +/// * [0:31] +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 DESC (W-) +/// %unsigned 16 size +/// ### +/// * amount of data to be transferred, in bytes or MTU. +/// * Size of 0 is forbidden. +/// ### +/// %unsigned 1 sizeMTU +/// ### +/// * 0: size given in bytes; +/// * 1: size given in MTU (see dHubChCtl.CFG.MTU for MTU size definition) +/// ### +/// %unsigned 1 semOpMTU +/// ### +/// * 0: semaphore operations applied on dHubCmd level +/// * 1: semaphore operations applied on MTU level +/// ### +/// %unsigned 5 chkSemId +/// ### +/// * ID of semaphore to check before cmd / MTU; +/// * 0 indicates semaphore check is disabled +/// ### +/// %unsigned 5 updSemId +/// ### +/// * ID of semaphore to update after cmd / MTU; +/// * 0 indicates semaphore update is disabled +/// ### +/// %unsigned 1 interrupt +/// ### +/// * 1: raise interrupt upon command finish +/// * end dHubCmdHDR +/// ### +/// %% 3 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 29b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmdHDR +#define h_dHubCmdHDR (){} + + #define RA_dHubCmdHDR_DESC 0x0000 + + #define BA_dHubCmdHDR_DESC_size 0x0000 + #define B16dHubCmdHDR_DESC_size 0x0000 + #define LSb32dHubCmdHDR_DESC_size 0 + #define LSb16dHubCmdHDR_DESC_size 0 + #define bdHubCmdHDR_DESC_size 16 + #define MSK32dHubCmdHDR_DESC_size 0x0000FFFF + + #define BA_dHubCmdHDR_DESC_sizeMTU 0x0002 + #define B16dHubCmdHDR_DESC_sizeMTU 0x0002 + #define LSb32dHubCmdHDR_DESC_sizeMTU 16 + #define LSb16dHubCmdHDR_DESC_sizeMTU 0 + #define bdHubCmdHDR_DESC_sizeMTU 1 + #define MSK32dHubCmdHDR_DESC_sizeMTU 0x00010000 + + #define BA_dHubCmdHDR_DESC_semOpMTU 0x0002 + #define B16dHubCmdHDR_DESC_semOpMTU 0x0002 + #define LSb32dHubCmdHDR_DESC_semOpMTU 17 + #define LSb16dHubCmdHDR_DESC_semOpMTU 1 + #define bdHubCmdHDR_DESC_semOpMTU 1 + #define MSK32dHubCmdHDR_DESC_semOpMTU 0x00020000 + + #define BA_dHubCmdHDR_DESC_chkSemId 0x0002 + #define B16dHubCmdHDR_DESC_chkSemId 0x0002 + #define LSb32dHubCmdHDR_DESC_chkSemId 18 + #define LSb16dHubCmdHDR_DESC_chkSemId 2 + #define bdHubCmdHDR_DESC_chkSemId 5 + #define MSK32dHubCmdHDR_DESC_chkSemId 0x007C0000 + + #define BA_dHubCmdHDR_DESC_updSemId 0x0002 + #define B16dHubCmdHDR_DESC_updSemId 0x0002 + #define LSb32dHubCmdHDR_DESC_updSemId 23 + #define LSb16dHubCmdHDR_DESC_updSemId 7 + #define bdHubCmdHDR_DESC_updSemId 5 + #define MSK32dHubCmdHDR_DESC_updSemId 0x0F800000 + + #define BA_dHubCmdHDR_DESC_interrupt 0x0003 + #define B16dHubCmdHDR_DESC_interrupt 0x0002 + #define LSb32dHubCmdHDR_DESC_interrupt 28 + #define LSb16dHubCmdHDR_DESC_interrupt 12 + #define bdHubCmdHDR_DESC_interrupt 1 + #define MSK32dHubCmdHDR_DESC_interrupt 0x10000000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmdHDR { + /////////////////////////////////////////////////////////// + #define GET32dHubCmdHDR_DESC_size(r32) _BFGET_(r32,15, 0) + #define SET32dHubCmdHDR_DESC_size(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubCmdHDR_DESC_size(r16) _BFGET_(r16,15, 0) + #define SET16dHubCmdHDR_DESC_size(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubCmdHDR_DESC_sizeMTU(r32) _BFGET_(r32,16,16) + #define SET32dHubCmdHDR_DESC_sizeMTU(r32,v) _BFSET_(r32,16,16,v) + #define GET16dHubCmdHDR_DESC_sizeMTU(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmdHDR_DESC_sizeMTU(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32dHubCmdHDR_DESC_semOpMTU(r32) _BFGET_(r32,17,17) + #define SET32dHubCmdHDR_DESC_semOpMTU(r32,v) _BFSET_(r32,17,17,v) + #define GET16dHubCmdHDR_DESC_semOpMTU(r16) _BFGET_(r16, 1, 1) + #define SET16dHubCmdHDR_DESC_semOpMTU(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32dHubCmdHDR_DESC_chkSemId(r32) _BFGET_(r32,22,18) + #define SET32dHubCmdHDR_DESC_chkSemId(r32,v) _BFSET_(r32,22,18,v) + #define GET16dHubCmdHDR_DESC_chkSemId(r16) _BFGET_(r16, 6, 2) + #define SET16dHubCmdHDR_DESC_chkSemId(r16,v) _BFSET_(r16, 6, 2,v) + + #define GET32dHubCmdHDR_DESC_updSemId(r32) _BFGET_(r32,27,23) + #define SET32dHubCmdHDR_DESC_updSemId(r32,v) _BFSET_(r32,27,23,v) + #define GET16dHubCmdHDR_DESC_updSemId(r16) _BFGET_(r16,11, 7) + #define SET16dHubCmdHDR_DESC_updSemId(r16,v) _BFSET_(r16,11, 7,v) + + #define GET32dHubCmdHDR_DESC_interrupt(r32) _BFGET_(r32,28,28) + #define SET32dHubCmdHDR_DESC_interrupt(r32,v) _BFSET_(r32,28,28,v) + #define GET16dHubCmdHDR_DESC_interrupt(r16) _BFGET_(r16,12,12) + #define SET16dHubCmdHDR_DESC_interrupt(r16,v) _BFSET_(r16,12,12,v) + + #define w32dHubCmdHDR_DESC {\ + UNSG32 uDESC_size : 16;\ + UNSG32 uDESC_sizeMTU : 1;\ + UNSG32 uDESC_semOpMTU : 1;\ + UNSG32 uDESC_chkSemId : 5;\ + UNSG32 uDESC_updSemId : 5;\ + UNSG32 uDESC_interrupt : 1;\ + UNSG32 RSVDx0_b29 : 3;\ + } + union { UNSG32 u32dHubCmdHDR_DESC; + struct w32dHubCmdHDR_DESC; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubCmdHDR; + + typedef union T32dHubCmdHDR_DESC + { UNSG32 u32; + struct w32dHubCmdHDR_DESC; + } T32dHubCmdHDR_DESC; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmdHDR_DESC + { UNSG32 u32[1]; + struct { + struct w32dHubCmdHDR_DESC; + }; + } TdHubCmdHDR_DESC; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmdHDR_drvrd(SIE_dHubCmdHDR *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmdHDR_drvwr(SIE_dHubCmdHDR *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmdHDR_reset(SIE_dHubCmdHDR *p); + SIGN32 dHubCmdHDR_cmp (SIE_dHubCmdHDR *p, SIE_dHubCmdHDR *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmdHDR_check(p,pie,pfx,hLOG) dHubCmdHDR_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmdHDR_print(p, pfx,hLOG) dHubCmdHDR_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmdHDR +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmd biu (4,4) +/// ### +/// * 64-bit dHub command issued by read/write masters +/// * [0:31] +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 MEM (W-) +/// %unsigned 32 addr +/// ### +/// * DRAM data address, in bytes; not necessarily MTU aligned. +/// * [32:63] +/// ### +/// @ 0x00004 (P) +/// # 0x00004 HDR +/// $dHubCmdHDR HDR REG +/// ### +/// * end dHubCmd +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 8B, bits: 61b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmd +#define h_dHubCmd (){} + + #define RA_dHubCmd_MEM 0x0000 + + #define BA_dHubCmd_MEM_addr 0x0000 + #define B16dHubCmd_MEM_addr 0x0000 + #define LSb32dHubCmd_MEM_addr 0 + #define LSb16dHubCmd_MEM_addr 0 + #define bdHubCmd_MEM_addr 32 + #define MSK32dHubCmd_MEM_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_dHubCmd_HDR 0x0004 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmd { + /////////////////////////////////////////////////////////// + #define GET32dHubCmd_MEM_addr(r32) _BFGET_(r32,31, 0) + #define SET32dHubCmd_MEM_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32dHubCmd_MEM {\ + UNSG32 uMEM_addr : 32;\ + } + union { UNSG32 u32dHubCmd_MEM; + struct w32dHubCmd_MEM; + }; + /////////////////////////////////////////////////////////// + SIE_dHubCmdHDR ie_HDR; + /////////////////////////////////////////////////////////// + } SIE_dHubCmd; + + typedef union T32dHubCmd_MEM + { UNSG32 u32; + struct w32dHubCmd_MEM; + } T32dHubCmd_MEM; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmd_MEM + { UNSG32 u32[1]; + struct { + struct w32dHubCmd_MEM; + }; + } TdHubCmd_MEM; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmd_drvrd(SIE_dHubCmd *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmd_drvwr(SIE_dHubCmd *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmd_reset(SIE_dHubCmd *p); + SIGN32 dHubCmd_cmp (SIE_dHubCmd *p, SIE_dHubCmd *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmd_check(p,pie,pfx,hLOG) dHubCmd_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmd_print(p, pfx,hLOG) dHubCmd_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmd +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubChannel biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 2 MTU +/// : 8byte 0x0 +/// : 32byte 0x1 +/// : 128byte 0x2 +/// : 1024byte 0x3 +/// ### +/// * Minimum transfer unit of the channel +/// ### +/// %unsigned 1 QoS +/// ### +/// * Write 1 to turn on QoS detection +/// ### +/// %unsigned 1 selfLoop +/// ### +/// * Write 1 to enable cmd looping support; 0 to turn off +/// ### +/// %unsigned 1 intrCtl 0x0 +/// : cmdDone 0x0 +/// : chIdle 0x1 +/// ### +/// * 0 : default vlaue, the interrupt is triggered by the finish of the dHub command if the interrupt bit is defined in the dHub command. +/// * 1 : The interrupt is triggered if the dHub channel is idle ( no busy and no pending and the corresponding dHub command Q is empty). +/// ### +/// %unsigned 1 hScan 0x0 +/// : rastScan 0x0 +/// : invScan 0x1 +/// ### +/// * This parameter will only apply to read channels. +/// * It will affect 1D dHub command for the channel. +/// * When scan is set to 1 (invScan), the data (beat) inside the dHub command will be fetched in the inverse order. ie. The data from the last address will come first and the data (beat) from the first address will come lastly. +/// ### +/// %unsigned 1 vScan 0x0 +/// : rastScan 0x0 +/// : invScan 0x1 +/// ### +/// * This parameter will only apply to read channels. +/// * It will affect 2D channels. +/// * When scan is set to 1 (invScan), +/// * The last address line (1D command) will be fetched first, and the first address line will be fetched lastly. +/// ### +/// %% 25 # Stuffing bits... +/// @ 0x00004 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to enable the channel; 0 to pause the channel +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to reset the channel controller state +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C FLUSH (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to start the data flushing process. Invalid for read (M2H) channels +/// * end dHubChannel +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 10b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubChannel +#define h_dHubChannel (){} + + #define RA_dHubChannel_CFG 0x0000 + + #define BA_dHubChannel_CFG_MTU 0x0000 + #define B16dHubChannel_CFG_MTU 0x0000 + #define LSb32dHubChannel_CFG_MTU 0 + #define LSb16dHubChannel_CFG_MTU 0 + #define bdHubChannel_CFG_MTU 2 + #define MSK32dHubChannel_CFG_MTU 0x00000003 + #define dHubChannel_CFG_MTU_8byte 0x0 + #define dHubChannel_CFG_MTU_32byte 0x1 + #define dHubChannel_CFG_MTU_128byte 0x2 + #define dHubChannel_CFG_MTU_1024byte 0x3 + + #define BA_dHubChannel_CFG_QoS 0x0000 + #define B16dHubChannel_CFG_QoS 0x0000 + #define LSb32dHubChannel_CFG_QoS 2 + #define LSb16dHubChannel_CFG_QoS 2 + #define bdHubChannel_CFG_QoS 1 + #define MSK32dHubChannel_CFG_QoS 0x00000004 + + #define BA_dHubChannel_CFG_selfLoop 0x0000 + #define B16dHubChannel_CFG_selfLoop 0x0000 + #define LSb32dHubChannel_CFG_selfLoop 3 + #define LSb16dHubChannel_CFG_selfLoop 3 + #define bdHubChannel_CFG_selfLoop 1 + #define MSK32dHubChannel_CFG_selfLoop 0x00000008 + + #define BA_dHubChannel_CFG_intrCtl 0x0000 + #define B16dHubChannel_CFG_intrCtl 0x0000 + #define LSb32dHubChannel_CFG_intrCtl 4 + #define LSb16dHubChannel_CFG_intrCtl 4 + #define bdHubChannel_CFG_intrCtl 1 + #define MSK32dHubChannel_CFG_intrCtl 0x00000010 + #define dHubChannel_CFG_intrCtl_cmdDone 0x0 + #define dHubChannel_CFG_intrCtl_chIdle 0x1 + + #define BA_dHubChannel_CFG_hScan 0x0000 + #define B16dHubChannel_CFG_hScan 0x0000 + #define LSb32dHubChannel_CFG_hScan 5 + #define LSb16dHubChannel_CFG_hScan 5 + #define bdHubChannel_CFG_hScan 1 + #define MSK32dHubChannel_CFG_hScan 0x00000020 + #define dHubChannel_CFG_hScan_rastScan 0x0 + #define dHubChannel_CFG_hScan_invScan 0x1 + + #define BA_dHubChannel_CFG_vScan 0x0000 + #define B16dHubChannel_CFG_vScan 0x0000 + #define LSb32dHubChannel_CFG_vScan 6 + #define LSb16dHubChannel_CFG_vScan 6 + #define bdHubChannel_CFG_vScan 1 + #define MSK32dHubChannel_CFG_vScan 0x00000040 + #define dHubChannel_CFG_vScan_rastScan 0x0 + #define dHubChannel_CFG_vScan_invScan 0x1 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_START 0x0004 + + #define BA_dHubChannel_START_EN 0x0004 + #define B16dHubChannel_START_EN 0x0004 + #define LSb32dHubChannel_START_EN 0 + #define LSb16dHubChannel_START_EN 0 + #define bdHubChannel_START_EN 1 + #define MSK32dHubChannel_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_CLEAR 0x0008 + + #define BA_dHubChannel_CLEAR_EN 0x0008 + #define B16dHubChannel_CLEAR_EN 0x0008 + #define LSb32dHubChannel_CLEAR_EN 0 + #define LSb16dHubChannel_CLEAR_EN 0 + #define bdHubChannel_CLEAR_EN 1 + #define MSK32dHubChannel_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_FLUSH 0x000C + + #define BA_dHubChannel_FLUSH_EN 0x000C + #define B16dHubChannel_FLUSH_EN 0x000C + #define LSb32dHubChannel_FLUSH_EN 0 + #define LSb16dHubChannel_FLUSH_EN 0 + #define bdHubChannel_FLUSH_EN 1 + #define MSK32dHubChannel_FLUSH_EN 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubChannel { + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_CFG_MTU(r32) _BFGET_(r32, 1, 0) + #define SET32dHubChannel_CFG_MTU(r32,v) _BFSET_(r32, 1, 0,v) + #define GET16dHubChannel_CFG_MTU(r16) _BFGET_(r16, 1, 0) + #define SET16dHubChannel_CFG_MTU(r16,v) _BFSET_(r16, 1, 0,v) + + #define GET32dHubChannel_CFG_QoS(r32) _BFGET_(r32, 2, 2) + #define SET32dHubChannel_CFG_QoS(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16dHubChannel_CFG_QoS(r16) _BFGET_(r16, 2, 2) + #define SET16dHubChannel_CFG_QoS(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32dHubChannel_CFG_selfLoop(r32) _BFGET_(r32, 3, 3) + #define SET32dHubChannel_CFG_selfLoop(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16dHubChannel_CFG_selfLoop(r16) _BFGET_(r16, 3, 3) + #define SET16dHubChannel_CFG_selfLoop(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32dHubChannel_CFG_intrCtl(r32) _BFGET_(r32, 4, 4) + #define SET32dHubChannel_CFG_intrCtl(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16dHubChannel_CFG_intrCtl(r16) _BFGET_(r16, 4, 4) + #define SET16dHubChannel_CFG_intrCtl(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32dHubChannel_CFG_hScan(r32) _BFGET_(r32, 5, 5) + #define SET32dHubChannel_CFG_hScan(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16dHubChannel_CFG_hScan(r16) _BFGET_(r16, 5, 5) + #define SET16dHubChannel_CFG_hScan(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32dHubChannel_CFG_vScan(r32) _BFGET_(r32, 6, 6) + #define SET32dHubChannel_CFG_vScan(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16dHubChannel_CFG_vScan(r16) _BFGET_(r16, 6, 6) + #define SET16dHubChannel_CFG_vScan(r16,v) _BFSET_(r16, 6, 6,v) + + #define w32dHubChannel_CFG {\ + UNSG32 uCFG_MTU : 2;\ + UNSG32 uCFG_QoS : 1;\ + UNSG32 uCFG_selfLoop : 1;\ + UNSG32 uCFG_intrCtl : 1;\ + UNSG32 uCFG_hScan : 1;\ + UNSG32 uCFG_vScan : 1;\ + UNSG32 RSVDx0_b7 : 25;\ + } + union { UNSG32 u32dHubChannel_CFG; + struct w32dHubChannel_CFG; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_START; + struct w32dHubChannel_START; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_CLEAR; + struct w32dHubChannel_CLEAR; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_FLUSH_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_FLUSH_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_FLUSH_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_FLUSH_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_FLUSH {\ + UNSG32 uFLUSH_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_FLUSH; + struct w32dHubChannel_FLUSH; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubChannel; + + typedef union T32dHubChannel_CFG + { UNSG32 u32; + struct w32dHubChannel_CFG; + } T32dHubChannel_CFG; + typedef union T32dHubChannel_START + { UNSG32 u32; + struct w32dHubChannel_START; + } T32dHubChannel_START; + typedef union T32dHubChannel_CLEAR + { UNSG32 u32; + struct w32dHubChannel_CLEAR; + } T32dHubChannel_CLEAR; + typedef union T32dHubChannel_FLUSH + { UNSG32 u32; + struct w32dHubChannel_FLUSH; + } T32dHubChannel_FLUSH; + /////////////////////////////////////////////////////////// + + typedef union TdHubChannel_CFG + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_CFG; + }; + } TdHubChannel_CFG; + typedef union TdHubChannel_START + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_START; + }; + } TdHubChannel_START; + typedef union TdHubChannel_CLEAR + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_CLEAR; + }; + } TdHubChannel_CLEAR; + typedef union TdHubChannel_FLUSH + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_FLUSH; + }; + } TdHubChannel_FLUSH; + + /////////////////////////////////////////////////////////// + SIGN32 dHubChannel_drvrd(SIE_dHubChannel *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubChannel_drvwr(SIE_dHubChannel *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubChannel_reset(SIE_dHubChannel *p); + SIGN32 dHubChannel_cmp (SIE_dHubChannel *p, SIE_dHubChannel *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubChannel_check(p,pie,pfx,hLOG) dHubChannel_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubChannel_print(p, pfx,hLOG) dHubChannel_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubChannel +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubReg biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 SemaHub +/// $SemaHub SemaHub REG +/// ### +/// * For dHub internal interrupts, also provide semaphore service for external (all channels will be opened to external to access). +/// * Channel 0 is used for dHub.HBO interrupt. +/// * Channel N+1 is used for dHub.Channel[N] interrupt. +/// ### +/// @ 0x00400 (P) +/// # 0x00400 HBO +/// $HBO HBO REG +/// ### +/// * For dHub channels (command/data queues), also provide (unused) FIFO service for external. +/// * Channel 2N is used for dHub.Channel[N] command. +/// * Channel 2N+1 is used for dHub.Channel[N] data. +/// ### +/// @ 0x00B00 ARR (P) +/// # 0x00B00 channelCtl +/// $dHubChannel channelCtl REG [16] +/// ### +/// * Up-to 16 channels +/// ### +/// @ 0x00C00 BUSY (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: no ongoing command is being processed, and no flushing is taking place +/// * 1: channel controller is busy +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C04 PENDING (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: Response queue is empty, meaning no outstanding AXI transactions +/// * 1: there exist some outstanding AXI transactions +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C08 busRstEn (RW-) +/// %unsigned 1 reg 0x0 +/// ### +/// * Write one to this register will trigger gate-keeper to take over the AXI bus. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00C0C busRstDone (R-) +/// %unsigned 1 reg 0x1 +/// ### +/// * After gate-keeper take over the AXI bus, it will assert this bit once there is no outstanding transactions on AXI bus. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00C10 flowCtl (P) +/// %unsigned 8 rAlpha 0x0 +/// %unsigned 8 wAlpha 0x0 +/// ### +/// * Flow control parameter for read and write axi master. +/// * clkCnt=(alpha*bstLen)>>4. +/// * This # of clock cycles will be blocked for the axi master after an axi command with the burst length of “bstLenâ€. +/// * When set alpha to be 0, the master will never be blocked. +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C14 axiCmdCol (P) +/// %unsigned 16 rCnt 0x0 +/// %unsigned 16 wCnt 0x0 +/// ### +/// * Axi command collection. The counter value indicate read/write do the command collection for # of clock cycles, start from the first command pushed to an empty command Q. Here are the conditions that will trigger the Axi master to send out command. +/// * Cmd Q full or the counter count down to “0†from the programmed value. +/// * Set the counter to 0 will disable the command collection. +/// * end dHubReg +/// ### +/// @ 0x00C18 (W-) +/// # # Stuffing bytes... +/// %% 1856 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 3328B, bits: 3314b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubReg +#define h_dHubReg (){} + + #define RA_dHubReg_SemaHub 0x0000 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_HBO 0x0400 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_ARR 0x0B00 + #define RA_dHubReg_channelCtl 0x0B00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_BUSY 0x0C00 + + #define BA_dHubReg_BUSY_ST 0x0C00 + #define B16dHubReg_BUSY_ST 0x0C00 + #define LSb32dHubReg_BUSY_ST 0 + #define LSb16dHubReg_BUSY_ST 0 + #define bdHubReg_BUSY_ST 16 + #define MSK32dHubReg_BUSY_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg_PENDING 0x0C04 + + #define BA_dHubReg_PENDING_ST 0x0C04 + #define B16dHubReg_PENDING_ST 0x0C04 + #define LSb32dHubReg_PENDING_ST 0 + #define LSb16dHubReg_PENDING_ST 0 + #define bdHubReg_PENDING_ST 16 + #define MSK32dHubReg_PENDING_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg_busRstEn 0x0C08 + + #define BA_dHubReg_busRstEn_reg 0x0C08 + #define B16dHubReg_busRstEn_reg 0x0C08 + #define LSb32dHubReg_busRstEn_reg 0 + #define LSb16dHubReg_busRstEn_reg 0 + #define bdHubReg_busRstEn_reg 1 + #define MSK32dHubReg_busRstEn_reg 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_busRstDone 0x0C0C + + #define BA_dHubReg_busRstDone_reg 0x0C0C + #define B16dHubReg_busRstDone_reg 0x0C0C + #define LSb32dHubReg_busRstDone_reg 0 + #define LSb16dHubReg_busRstDone_reg 0 + #define bdHubReg_busRstDone_reg 1 + #define MSK32dHubReg_busRstDone_reg 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_flowCtl 0x0C10 + + #define BA_dHubReg_flowCtl_rAlpha 0x0C10 + #define B16dHubReg_flowCtl_rAlpha 0x0C10 + #define LSb32dHubReg_flowCtl_rAlpha 0 + #define LSb16dHubReg_flowCtl_rAlpha 0 + #define bdHubReg_flowCtl_rAlpha 8 + #define MSK32dHubReg_flowCtl_rAlpha 0x000000FF + + #define BA_dHubReg_flowCtl_wAlpha 0x0C11 + #define B16dHubReg_flowCtl_wAlpha 0x0C10 + #define LSb32dHubReg_flowCtl_wAlpha 8 + #define LSb16dHubReg_flowCtl_wAlpha 8 + #define bdHubReg_flowCtl_wAlpha 8 + #define MSK32dHubReg_flowCtl_wAlpha 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_axiCmdCol 0x0C14 + + #define BA_dHubReg_axiCmdCol_rCnt 0x0C14 + #define B16dHubReg_axiCmdCol_rCnt 0x0C14 + #define LSb32dHubReg_axiCmdCol_rCnt 0 + #define LSb16dHubReg_axiCmdCol_rCnt 0 + #define bdHubReg_axiCmdCol_rCnt 16 + #define MSK32dHubReg_axiCmdCol_rCnt 0x0000FFFF + + #define BA_dHubReg_axiCmdCol_wCnt 0x0C16 + #define B16dHubReg_axiCmdCol_wCnt 0x0C16 + #define LSb32dHubReg_axiCmdCol_wCnt 16 + #define LSb16dHubReg_axiCmdCol_wCnt 0 + #define bdHubReg_axiCmdCol_wCnt 16 + #define MSK32dHubReg_axiCmdCol_wCnt 0xFFFF0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubReg { + /////////////////////////////////////////////////////////// + SIE_SemaHub ie_SemaHub; + /////////////////////////////////////////////////////////// + SIE_HBO ie_HBO; + /////////////////////////////////////////////////////////// + SIE_dHubChannel ie_channelCtl[16]; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_BUSY_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_BUSY_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_BUSY_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_BUSY_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_BUSY {\ + UNSG32 uBUSY_ST : 16;\ + UNSG32 RSVDxC00_b16 : 16;\ + } + union { UNSG32 u32dHubReg_BUSY; + struct w32dHubReg_BUSY; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_PENDING_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_PENDING_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_PENDING_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_PENDING_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_PENDING {\ + UNSG32 uPENDING_ST : 16;\ + UNSG32 RSVDxC04_b16 : 16;\ + } + union { UNSG32 u32dHubReg_PENDING; + struct w32dHubReg_PENDING; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_busRstEn_reg(r32) _BFGET_(r32, 0, 0) + #define SET32dHubReg_busRstEn_reg(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubReg_busRstEn_reg(r16) _BFGET_(r16, 0, 0) + #define SET16dHubReg_busRstEn_reg(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubReg_busRstEn {\ + UNSG32 ubusRstEn_reg : 1;\ + UNSG32 RSVDxC08_b1 : 31;\ + } + union { UNSG32 u32dHubReg_busRstEn; + struct w32dHubReg_busRstEn; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_busRstDone_reg(r32) _BFGET_(r32, 0, 0) + #define SET32dHubReg_busRstDone_reg(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubReg_busRstDone_reg(r16) _BFGET_(r16, 0, 0) + #define SET16dHubReg_busRstDone_reg(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubReg_busRstDone {\ + UNSG32 ubusRstDone_reg : 1;\ + UNSG32 RSVDxC0C_b1 : 31;\ + } + union { UNSG32 u32dHubReg_busRstDone; + struct w32dHubReg_busRstDone; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_flowCtl_rAlpha(r32) _BFGET_(r32, 7, 0) + #define SET32dHubReg_flowCtl_rAlpha(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16dHubReg_flowCtl_rAlpha(r16) _BFGET_(r16, 7, 0) + #define SET16dHubReg_flowCtl_rAlpha(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32dHubReg_flowCtl_wAlpha(r32) _BFGET_(r32,15, 8) + #define SET32dHubReg_flowCtl_wAlpha(r32,v) _BFSET_(r32,15, 8,v) + #define GET16dHubReg_flowCtl_wAlpha(r16) _BFGET_(r16,15, 8) + #define SET16dHubReg_flowCtl_wAlpha(r16,v) _BFSET_(r16,15, 8,v) + + #define w32dHubReg_flowCtl {\ + UNSG32 uflowCtl_rAlpha : 8;\ + UNSG32 uflowCtl_wAlpha : 8;\ + UNSG32 RSVDxC10_b16 : 16;\ + } + union { UNSG32 u32dHubReg_flowCtl; + struct w32dHubReg_flowCtl; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_axiCmdCol_rCnt(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_axiCmdCol_rCnt(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_axiCmdCol_rCnt(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_axiCmdCol_rCnt(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubReg_axiCmdCol_wCnt(r32) _BFGET_(r32,31,16) + #define SET32dHubReg_axiCmdCol_wCnt(r32,v) _BFSET_(r32,31,16,v) + #define GET16dHubReg_axiCmdCol_wCnt(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_axiCmdCol_wCnt(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_axiCmdCol {\ + UNSG32 uaxiCmdCol_rCnt : 16;\ + UNSG32 uaxiCmdCol_wCnt : 16;\ + } + union { UNSG32 u32dHubReg_axiCmdCol; + struct w32dHubReg_axiCmdCol; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxC18 [232]; + /////////////////////////////////////////////////////////// + } SIE_dHubReg; + + typedef union T32dHubReg_BUSY + { UNSG32 u32; + struct w32dHubReg_BUSY; + } T32dHubReg_BUSY; + typedef union T32dHubReg_PENDING + { UNSG32 u32; + struct w32dHubReg_PENDING; + } T32dHubReg_PENDING; + typedef union T32dHubReg_busRstEn + { UNSG32 u32; + struct w32dHubReg_busRstEn; + } T32dHubReg_busRstEn; + typedef union T32dHubReg_busRstDone + { UNSG32 u32; + struct w32dHubReg_busRstDone; + } T32dHubReg_busRstDone; + typedef union T32dHubReg_flowCtl + { UNSG32 u32; + struct w32dHubReg_flowCtl; + } T32dHubReg_flowCtl; + typedef union T32dHubReg_axiCmdCol + { UNSG32 u32; + struct w32dHubReg_axiCmdCol; + } T32dHubReg_axiCmdCol; + /////////////////////////////////////////////////////////// + + typedef union TdHubReg_BUSY + { UNSG32 u32[1]; + struct { + struct w32dHubReg_BUSY; + }; + } TdHubReg_BUSY; + typedef union TdHubReg_PENDING + { UNSG32 u32[1]; + struct { + struct w32dHubReg_PENDING; + }; + } TdHubReg_PENDING; + typedef union TdHubReg_busRstEn + { UNSG32 u32[1]; + struct { + struct w32dHubReg_busRstEn; + }; + } TdHubReg_busRstEn; + typedef union TdHubReg_busRstDone + { UNSG32 u32[1]; + struct { + struct w32dHubReg_busRstDone; + }; + } TdHubReg_busRstDone; + typedef union TdHubReg_flowCtl + { UNSG32 u32[1]; + struct { + struct w32dHubReg_flowCtl; + }; + } TdHubReg_flowCtl; + typedef union TdHubReg_axiCmdCol + { UNSG32 u32[1]; + struct { + struct w32dHubReg_axiCmdCol; + }; + } TdHubReg_axiCmdCol; + + /////////////////////////////////////////////////////////// + SIGN32 dHubReg_drvrd(SIE_dHubReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubReg_drvwr(SIE_dHubReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubReg_reset(SIE_dHubReg *p); + SIGN32 dHubReg_cmp (SIE_dHubReg *p, SIE_dHubReg *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubReg_check(p,pie,pfx,hLOG) dHubReg_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubReg_print(p, pfx,hLOG) dHubReg_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubReg +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmd2D biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 MEM (W-) +/// %unsigned 32 addr +/// ### +/// * DRAM data address of the 2D buffer, in bytes. +/// ### +/// @ 0x00004 DESC (W-) +/// %unsigned 16 stride +/// ### +/// * Line stride size in bytes +/// ### +/// %unsigned 13 numLine +/// ### +/// * Number of lines in buffer. Size of 0 is forbidden. +/// ### +/// %unsigned 2 hdrLoop +/// ### +/// * Size of line-loop for choosing dHubCmdHDR +/// * 0 is treated as 4 +/// ### +/// %unsigned 1 interrupt +/// ### +/// * 1: raise interrupt upon whole 2D command finish. +/// * 1: set the last 1D command interrupt bit. +/// * 0 : use the default 1D command interrupt bit. +/// ### +/// @ 0x00008 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to enable the channel; 0 to pause the channel +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to reset the 2D engine. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00010 (P) +/// # 0x00010 HDR +/// $dHubCmdHDR HDR REG [4] +/// ### +/// * Headers used in generating dHubCmd for each line in looping order, loop size (1,2,3,4) specified by DESC_hdrLoop +/// * end dHubCmd2D +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 32B, bits: 182b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmd2D +#define h_dHubCmd2D (){} + + #define RA_dHubCmd2D_MEM 0x0000 + + #define BA_dHubCmd2D_MEM_addr 0x0000 + #define B16dHubCmd2D_MEM_addr 0x0000 + #define LSb32dHubCmd2D_MEM_addr 0 + #define LSb16dHubCmd2D_MEM_addr 0 + #define bdHubCmd2D_MEM_addr 32 + #define MSK32dHubCmd2D_MEM_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_DESC 0x0004 + + #define BA_dHubCmd2D_DESC_stride 0x0004 + #define B16dHubCmd2D_DESC_stride 0x0004 + #define LSb32dHubCmd2D_DESC_stride 0 + #define LSb16dHubCmd2D_DESC_stride 0 + #define bdHubCmd2D_DESC_stride 16 + #define MSK32dHubCmd2D_DESC_stride 0x0000FFFF + + #define BA_dHubCmd2D_DESC_numLine 0x0006 + #define B16dHubCmd2D_DESC_numLine 0x0006 + #define LSb32dHubCmd2D_DESC_numLine 16 + #define LSb16dHubCmd2D_DESC_numLine 0 + #define bdHubCmd2D_DESC_numLine 13 + #define MSK32dHubCmd2D_DESC_numLine 0x1FFF0000 + + #define BA_dHubCmd2D_DESC_hdrLoop 0x0007 + #define B16dHubCmd2D_DESC_hdrLoop 0x0006 + #define LSb32dHubCmd2D_DESC_hdrLoop 29 + #define LSb16dHubCmd2D_DESC_hdrLoop 13 + #define bdHubCmd2D_DESC_hdrLoop 2 + #define MSK32dHubCmd2D_DESC_hdrLoop 0x60000000 + + #define BA_dHubCmd2D_DESC_interrupt 0x0007 + #define B16dHubCmd2D_DESC_interrupt 0x0006 + #define LSb32dHubCmd2D_DESC_interrupt 31 + #define LSb16dHubCmd2D_DESC_interrupt 15 + #define bdHubCmd2D_DESC_interrupt 1 + #define MSK32dHubCmd2D_DESC_interrupt 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_START 0x0008 + + #define BA_dHubCmd2D_START_EN 0x0008 + #define B16dHubCmd2D_START_EN 0x0008 + #define LSb32dHubCmd2D_START_EN 0 + #define LSb16dHubCmd2D_START_EN 0 + #define bdHubCmd2D_START_EN 1 + #define MSK32dHubCmd2D_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_CLEAR 0x000C + + #define BA_dHubCmd2D_CLEAR_EN 0x000C + #define B16dHubCmd2D_CLEAR_EN 0x000C + #define LSb32dHubCmd2D_CLEAR_EN 0 + #define LSb16dHubCmd2D_CLEAR_EN 0 + #define bdHubCmd2D_CLEAR_EN 1 + #define MSK32dHubCmd2D_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_HDR 0x0010 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmd2D { + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_MEM_addr(r32) _BFGET_(r32,31, 0) + #define SET32dHubCmd2D_MEM_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32dHubCmd2D_MEM {\ + UNSG32 uMEM_addr : 32;\ + } + union { UNSG32 u32dHubCmd2D_MEM; + struct w32dHubCmd2D_MEM; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_DESC_stride(r32) _BFGET_(r32,15, 0) + #define SET32dHubCmd2D_DESC_stride(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubCmd2D_DESC_stride(r16) _BFGET_(r16,15, 0) + #define SET16dHubCmd2D_DESC_stride(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubCmd2D_DESC_numLine(r32) _BFGET_(r32,28,16) + #define SET32dHubCmd2D_DESC_numLine(r32,v) _BFSET_(r32,28,16,v) + #define GET16dHubCmd2D_DESC_numLine(r16) _BFGET_(r16,12, 0) + #define SET16dHubCmd2D_DESC_numLine(r16,v) _BFSET_(r16,12, 0,v) + + #define GET32dHubCmd2D_DESC_hdrLoop(r32) _BFGET_(r32,30,29) + #define SET32dHubCmd2D_DESC_hdrLoop(r32,v) _BFSET_(r32,30,29,v) + #define GET16dHubCmd2D_DESC_hdrLoop(r16) _BFGET_(r16,14,13) + #define SET16dHubCmd2D_DESC_hdrLoop(r16,v) _BFSET_(r16,14,13,v) + + #define GET32dHubCmd2D_DESC_interrupt(r32) _BFGET_(r32,31,31) + #define SET32dHubCmd2D_DESC_interrupt(r32,v) _BFSET_(r32,31,31,v) + #define GET16dHubCmd2D_DESC_interrupt(r16) _BFGET_(r16,15,15) + #define SET16dHubCmd2D_DESC_interrupt(r16,v) _BFSET_(r16,15,15,v) + + #define w32dHubCmd2D_DESC {\ + UNSG32 uDESC_stride : 16;\ + UNSG32 uDESC_numLine : 13;\ + UNSG32 uDESC_hdrLoop : 2;\ + UNSG32 uDESC_interrupt : 1;\ + } + union { UNSG32 u32dHubCmd2D_DESC; + struct w32dHubCmd2D_DESC; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubCmd2D_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubCmd2D_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmd2D_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubCmd2D_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32dHubCmd2D_START; + struct w32dHubCmd2D_START; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubCmd2D_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubCmd2D_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmd2D_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubCmd2D_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32dHubCmd2D_CLEAR; + struct w32dHubCmd2D_CLEAR; + }; + /////////////////////////////////////////////////////////// + SIE_dHubCmdHDR ie_HDR[4]; + /////////////////////////////////////////////////////////// + } SIE_dHubCmd2D; + + typedef union T32dHubCmd2D_MEM + { UNSG32 u32; + struct w32dHubCmd2D_MEM; + } T32dHubCmd2D_MEM; + typedef union T32dHubCmd2D_DESC + { UNSG32 u32; + struct w32dHubCmd2D_DESC; + } T32dHubCmd2D_DESC; + typedef union T32dHubCmd2D_START + { UNSG32 u32; + struct w32dHubCmd2D_START; + } T32dHubCmd2D_START; + typedef union T32dHubCmd2D_CLEAR + { UNSG32 u32; + struct w32dHubCmd2D_CLEAR; + } T32dHubCmd2D_CLEAR; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmd2D_MEM + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_MEM; + }; + } TdHubCmd2D_MEM; + typedef union TdHubCmd2D_DESC + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_DESC; + }; + } TdHubCmd2D_DESC; + typedef union TdHubCmd2D_START + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_START; + }; + } TdHubCmd2D_START; + typedef union TdHubCmd2D_CLEAR + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_CLEAR; + }; + } TdHubCmd2D_CLEAR; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmd2D_drvrd(SIE_dHubCmd2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmd2D_drvwr(SIE_dHubCmd2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmd2D_reset(SIE_dHubCmd2D *p); + SIGN32 dHubCmd2D_cmp (SIE_dHubCmd2D *p, SIE_dHubCmd2D *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmd2D_check(p,pie,pfx,hLOG) dHubCmd2D_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmd2D_print(p, pfx,hLOG) dHubCmd2D_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmd2D +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubQuery (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 RESP (R-) +/// %unsigned 16 ST +/// ### +/// * Dhub channel state machine status. +/// ### +/// %% 16 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 16b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubQuery +#define h_dHubQuery (){} + + #define RA_dHubQuery_RESP 0x0000 + + #define BA_dHubQuery_RESP_ST 0x0000 + #define B16dHubQuery_RESP_ST 0x0000 + #define LSb32dHubQuery_RESP_ST 0 + #define LSb16dHubQuery_RESP_ST 0 + #define bdHubQuery_RESP_ST 16 + #define MSK32dHubQuery_RESP_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubQuery { + /////////////////////////////////////////////////////////// + #define GET32dHubQuery_RESP_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubQuery_RESP_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubQuery_RESP_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubQuery_RESP_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubQuery_RESP {\ + UNSG32 uRESP_ST : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32dHubQuery_RESP; + struct w32dHubQuery_RESP; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubQuery; + + typedef union T32dHubQuery_RESP + { UNSG32 u32; + struct w32dHubQuery_RESP; + } T32dHubQuery_RESP; + /////////////////////////////////////////////////////////// + + typedef union TdHubQuery_RESP + { UNSG32 u32[1]; + struct { + struct w32dHubQuery_RESP; + }; + } TdHubQuery_RESP; + + /////////////////////////////////////////////////////////// + SIGN32 dHubQuery_drvrd(SIE_dHubQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubQuery_drvwr(SIE_dHubQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubQuery_reset(SIE_dHubQuery *p); + SIGN32 dHubQuery_cmp (SIE_dHubQuery *p, SIE_dHubQuery *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubQuery_check(p,pie,pfx,hLOG) dHubQuery_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubQuery_print(p, pfx,hLOG) dHubQuery_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubQuery +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubReg2D biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 dHub +/// $dHubReg dHub REG +/// @ 0x00D00 ARR (P) +/// # 0x00D00 Cmd2D +/// $dHubCmd2D Cmd2D REG [16] +/// ### +/// * Up-to 16 2D channels. +/// * 2D Channel[N] is connected to dHub.Channel[N] command queue, that is, dHub.HBO.Channel[2N] +/// * Note: Number of 2D channels could be less than dHub channels (rest of are 1D only) +/// ### +/// @ 0x00F00 BUSY (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: no ongoing command is being processed +/// * 1: channel controller is busy +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00F04 (W-) +/// # # Stuffing bytes... +/// %% 480 +/// @ 0x00F40 (P) +/// # 0x00F40 CH_ST +/// $dHubQuery CH_ST MEM [16] +/// ### +/// * end dHubReg2D +/// ### +/// @ 0x00F80 (W-) +/// # # Stuffing bytes... +/// %% 1024 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4096B, bits: 6274b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubReg2D +#define h_dHubReg2D (){} + + #define RA_dHubReg2D_dHub 0x0000 + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_ARR 0x0D00 + #define RA_dHubReg2D_Cmd2D 0x0D00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_BUSY 0x0F00 + + #define BA_dHubReg2D_BUSY_ST 0x0F00 + #define B16dHubReg2D_BUSY_ST 0x0F00 + #define LSb32dHubReg2D_BUSY_ST 0 + #define LSb16dHubReg2D_BUSY_ST 0 + #define bdHubReg2D_BUSY_ST 16 + #define MSK32dHubReg2D_BUSY_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_CH_ST 0x0F40 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubReg2D { + /////////////////////////////////////////////////////////// + SIE_dHubReg ie_dHub; + /////////////////////////////////////////////////////////// + SIE_dHubCmd2D ie_Cmd2D[16]; + /////////////////////////////////////////////////////////// + #define GET32dHubReg2D_BUSY_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg2D_BUSY_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg2D_BUSY_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg2D_BUSY_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg2D_BUSY {\ + UNSG32 uBUSY_ST : 16;\ + UNSG32 RSVDxF00_b16 : 16;\ + } + union { UNSG32 u32dHubReg2D_BUSY; + struct w32dHubReg2D_BUSY; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxF04 [60]; + /////////////////////////////////////////////////////////// + SIE_dHubQuery ie_CH_ST[16]; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxF80 [128]; + /////////////////////////////////////////////////////////// + } SIE_dHubReg2D; + + typedef union T32dHubReg2D_BUSY + { UNSG32 u32; + struct w32dHubReg2D_BUSY; + } T32dHubReg2D_BUSY; + /////////////////////////////////////////////////////////// + + typedef union TdHubReg2D_BUSY + { UNSG32 u32[1]; + struct { + struct w32dHubReg2D_BUSY; + }; + } TdHubReg2D_BUSY; + + /////////////////////////////////////////////////////////// + SIGN32 dHubReg2D_drvrd(SIE_dHubReg2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubReg2D_drvwr(SIE_dHubReg2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubReg2D_reset(SIE_dHubReg2D *p); + SIGN32 dHubReg2D_cmp (SIE_dHubReg2D *p, SIE_dHubReg2D *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubReg2D_check(p,pie,pfx,hLOG) dHubReg2D_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubReg2D_print(p, pfx,hLOG) dHubReg2D_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubReg2D +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avif_dhub_config_ChMap (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// %unsigned 4 avif +/// ### +/// * BANK #0 +/// ### +/// : SD_WR 0x0 +/// : SD_RE 0x1 +/// ### +/// * BANK #1 +/// ### +/// : MAIN_WR 0x2 +/// ### +/// * BANK #2 +/// ### +/// : PIP_WR 0x3 +/// ### +/// * BANK #3 +/// ### +/// : VBI_WR 0x4 +/// : AUD_WR0_MAIN 0x5 +/// : AUD_WR1_MAIN 0x6 +/// : AUD_WR2_MAIN 0x7 +/// : AUD_WR3_MAIN 0x8 +/// : AUD_WR0_PIP 0x9 +/// : AUD_WR1_PIP 0xA +/// : AUD_WR2_PIP 0xB +/// : AUD_WR3_PIP 0xC +/// : AUD_RD0 0xD +/// %% 28 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 4b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avif_dhub_config_ChMap +#define h_avif_dhub_config_ChMap (){} + + #define BA_avif_dhub_config_ChMap_avif 0x0000 + #define B16avif_dhub_config_ChMap_avif 0x0000 + #define LSb32avif_dhub_config_ChMap_avif 0 + #define LSb16avif_dhub_config_ChMap_avif 0 + #define bavif_dhub_config_ChMap_avif 4 + #define MSK32avif_dhub_config_ChMap_avif 0x0000000F + #define avif_dhub_config_ChMap_avif_SD_WR 0x0 + #define avif_dhub_config_ChMap_avif_SD_RE 0x1 + #define avif_dhub_config_ChMap_avif_MAIN_WR 0x2 + #define avif_dhub_config_ChMap_avif_PIP_WR 0x3 + #define avif_dhub_config_ChMap_avif_VBI_WR 0x4 + #define avif_dhub_config_ChMap_avif_AUD_WR0_MAIN 0x5 + #define avif_dhub_config_ChMap_avif_AUD_WR1_MAIN 0x6 + #define avif_dhub_config_ChMap_avif_AUD_WR2_MAIN 0x7 + #define avif_dhub_config_ChMap_avif_AUD_WR3_MAIN 0x8 + #define avif_dhub_config_ChMap_avif_AUD_WR0_PIP 0x9 + #define avif_dhub_config_ChMap_avif_AUD_WR1_PIP 0xA + #define avif_dhub_config_ChMap_avif_AUD_WR2_PIP 0xB + #define avif_dhub_config_ChMap_avif_AUD_WR3_PIP 0xC + #define avif_dhub_config_ChMap_avif_AUD_RD0 0xD + /////////////////////////////////////////////////////////// + + typedef struct SIE_avif_dhub_config_ChMap { + /////////////////////////////////////////////////////////// + #define GET32avif_dhub_config_ChMap_avif(r32) _BFGET_(r32, 3, 0) + #define SET32avif_dhub_config_ChMap_avif(r32,v) _BFSET_(r32, 3, 0,v) + #define GET16avif_dhub_config_ChMap_avif(r16) _BFGET_(r16, 3, 0) + #define SET16avif_dhub_config_ChMap_avif(r16,v) _BFSET_(r16, 3, 0,v) + + UNSG32 u_avif : 4; + UNSG32 RSVDx0_b4 : 28; + /////////////////////////////////////////////////////////// + } SIE_avif_dhub_config_ChMap; + + /////////////////////////////////////////////////////////// + SIGN32 avif_dhub_config_ChMap_drvrd(SIE_avif_dhub_config_ChMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avif_dhub_config_ChMap_drvwr(SIE_avif_dhub_config_ChMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avif_dhub_config_ChMap_reset(SIE_avif_dhub_config_ChMap *p); + SIGN32 avif_dhub_config_ChMap_cmp (SIE_avif_dhub_config_ChMap *p, SIE_avif_dhub_config_ChMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avif_dhub_config_ChMap_check(p,pie,pfx,hLOG) avif_dhub_config_ChMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avif_dhub_config_ChMap_print(p, pfx,hLOG) avif_dhub_config_ChMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avif_dhub_config_ChMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avif_dhub_config_TcmMap (4,4) +/// # # ---------------------------------------------------------- +/// : avifDhub_BANK0_START_ADDR 0x0 +/// : avifDhub_BANK0_SIZE 0x2000 +/// : avifDhub_BANK1_START_ADDR 0x2000 +/// : avifDhub_BANK1_SIZE 0x2000 +/// : avifDhub_BANK2_START_ADDR 0x4000 +/// : avifDhub_BANK2_SIZE 0x2000 +/// : avifDhub_BANK3_START_ADDR 0x6000 +/// : avifDhub_BANK3_SIZE 0x2000 +/// @ 0x00000 dummy (P) +/// %unsigned 1 xxx +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 1b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avif_dhub_config_TcmMap +#define h_avif_dhub_config_TcmMap (){} + + #define avif_dhub_config_TcmMap_avifDhub_BANK0_START_ADDR 0x0 + #define avif_dhub_config_TcmMap_avifDhub_BANK0_SIZE 0x2000 + #define avif_dhub_config_TcmMap_avifDhub_BANK1_START_ADDR 0x2000 + #define avif_dhub_config_TcmMap_avifDhub_BANK1_SIZE 0x2000 + #define avif_dhub_config_TcmMap_avifDhub_BANK2_START_ADDR 0x4000 + #define avif_dhub_config_TcmMap_avifDhub_BANK2_SIZE 0x2000 + #define avif_dhub_config_TcmMap_avifDhub_BANK3_START_ADDR 0x6000 + #define avif_dhub_config_TcmMap_avifDhub_BANK3_SIZE 0x2000 + /////////////////////////////////////////////////////////// + #define RA_avif_dhub_config_TcmMap_dummy 0x0000 + + #define BA_avif_dhub_config_TcmMap_dummy_xxx 0x0000 + #define B16avif_dhub_config_TcmMap_dummy_xxx 0x0000 + #define LSb32avif_dhub_config_TcmMap_dummy_xxx 0 + #define LSb16avif_dhub_config_TcmMap_dummy_xxx 0 + #define bavif_dhub_config_TcmMap_dummy_xxx 1 + #define MSK32avif_dhub_config_TcmMap_dummy_xxx 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_avif_dhub_config_TcmMap { + /////////////////////////////////////////////////////////// + #define GET32avif_dhub_config_TcmMap_dummy_xxx(r32) _BFGET_(r32, 0, 0) + #define SET32avif_dhub_config_TcmMap_dummy_xxx(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16avif_dhub_config_TcmMap_dummy_xxx(r16) _BFGET_(r16, 0, 0) + #define SET16avif_dhub_config_TcmMap_dummy_xxx(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32avif_dhub_config_TcmMap_dummy {\ + UNSG32 udummy_xxx : 1;\ + UNSG32 RSVDx0_b1 : 31;\ + } + union { UNSG32 u32avif_dhub_config_TcmMap_dummy; + struct w32avif_dhub_config_TcmMap_dummy; + }; + /////////////////////////////////////////////////////////// + } SIE_avif_dhub_config_TcmMap; + + typedef union T32avif_dhub_config_TcmMap_dummy + { UNSG32 u32; + struct w32avif_dhub_config_TcmMap_dummy; + } T32avif_dhub_config_TcmMap_dummy; + /////////////////////////////////////////////////////////// + + typedef union Tavif_dhub_config_TcmMap_dummy + { UNSG32 u32[1]; + struct { + struct w32avif_dhub_config_TcmMap_dummy; + }; + } Tavif_dhub_config_TcmMap_dummy; + + /////////////////////////////////////////////////////////// + SIGN32 avif_dhub_config_TcmMap_drvrd(SIE_avif_dhub_config_TcmMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avif_dhub_config_TcmMap_drvwr(SIE_avif_dhub_config_TcmMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avif_dhub_config_TcmMap_reset(SIE_avif_dhub_config_TcmMap *p); + SIGN32 avif_dhub_config_TcmMap_cmp (SIE_avif_dhub_config_TcmMap *p, SIE_avif_dhub_config_TcmMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avif_dhub_config_TcmMap_check(p,pie,pfx,hLOG) avif_dhub_config_TcmMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avif_dhub_config_TcmMap_print(p, pfx,hLOG) avif_dhub_config_TcmMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avif_dhub_config_TcmMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avif_dhub_config_SemMap (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// %unsigned 5 avif +/// : CH0_intr 0x0 +/// : CH1_intr 0x1 +/// : CH2_intr 0x2 +/// : CH3_intr 0x3 +/// : CH4_intr 0x4 +/// : CH5_intr 0x5 +/// : CH6_intr 0x6 +/// : CH7_intr 0x7 +/// : CH8_intr 0x8 +/// : CH9_intr 0x9 +/// : CH10_intr 0xA +/// : CH11_intr 0xB +/// : CH12_intr 0xC +/// : CH13_intr 0xD +/// : CH14_intr 0xE +/// : CH15_intr 0xF +/// %% 27 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 5b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avif_dhub_config_SemMap +#define h_avif_dhub_config_SemMap (){} + + #define BA_avif_dhub_config_SemMap_avif 0x0000 + #define B16avif_dhub_config_SemMap_avif 0x0000 + #define LSb32avif_dhub_config_SemMap_avif 0 + #define LSb16avif_dhub_config_SemMap_avif 0 + #define bavif_dhub_config_SemMap_avif 5 + #define MSK32avif_dhub_config_SemMap_avif 0x0000001F + #define avif_dhub_config_SemMap_avif_CH0_intr 0x0 + #define avif_dhub_config_SemMap_avif_CH1_intr 0x1 + #define avif_dhub_config_SemMap_avif_CH2_intr 0x2 + #define avif_dhub_config_SemMap_avif_CH3_intr 0x3 + #define avif_dhub_config_SemMap_avif_CH4_intr 0x4 + #define avif_dhub_config_SemMap_avif_CH5_intr 0x5 + #define avif_dhub_config_SemMap_avif_CH6_intr 0x6 + #define avif_dhub_config_SemMap_avif_CH7_intr 0x7 + #define avif_dhub_config_SemMap_avif_CH8_intr 0x8 + #define avif_dhub_config_SemMap_avif_CH9_intr 0x9 + #define avif_dhub_config_SemMap_avif_CH10_intr 0xA + #define avif_dhub_config_SemMap_avif_CH11_intr 0xB + #define avif_dhub_config_SemMap_avif_CH12_intr 0xC + #define avif_dhub_config_SemMap_avif_CH13_intr 0xD + #define avif_dhub_config_SemMap_avif_CH14_intr 0xE + #define avif_dhub_config_SemMap_avif_CH15_intr 0xF + + //FIXME: vijaykr - need to modify for AVIF + #define avif_dhub_config_SemMap_avif_rde_event_intr 0x10 + #define avif_dhub_config_SemMap_avif_wre_event_intr 0x11 + #define avif_dhub_config_SemMap_avif_dvi_vde_intr 0x12 + #define avif_dhub_config_SemMap_avif_sd_err_intr 0x13 + #define avif_dhub_config_SemMap_avif_audio_intr 0x14 + #define avif_dhub_config_SemMap_avif_vbi_vde_intr 0x15 + #define avif_dhub_config_SemMap_avif_sig_err_intr 0x16 + #define avif_dhub_config_SemMap_avif_bcmInvalidReqIntr 0x17 + #define avif_dhub_config_SemMap_avif_hdmirx_intr 0x18 + + + /////////////////////////////////////////////////////////// + + typedef struct SIE_avif_dhub_config_SemMap { + /////////////////////////////////////////////////////////// + #define GET32avif_dhub_config_SemMap_avif(r32) _BFGET_(r32, 4, 0) + #define SET32avif_dhub_config_SemMap_avif(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16avif_dhub_config_SemMap_avif(r16) _BFGET_(r16, 4, 0) + #define SET16avif_dhub_config_SemMap_avif(r16,v) _BFSET_(r16, 4, 0,v) + + UNSG32 u_avif : 5; + UNSG32 RSVDx0_b5 : 27; + /////////////////////////////////////////////////////////// + } SIE_avif_dhub_config_SemMap; + + /////////////////////////////////////////////////////////// + SIGN32 avif_dhub_config_SemMap_drvrd(SIE_avif_dhub_config_SemMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avif_dhub_config_SemMap_drvwr(SIE_avif_dhub_config_SemMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avif_dhub_config_SemMap_reset(SIE_avif_dhub_config_SemMap *p); + SIGN32 avif_dhub_config_SemMap_cmp (SIE_avif_dhub_config_SemMap *p, SIE_avif_dhub_config_SemMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avif_dhub_config_SemMap_check(p,pie,pfx,hLOG) avif_dhub_config_SemMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avif_dhub_config_SemMap_print(p, pfx,hLOG) avif_dhub_config_SemMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avif_dhub_config_SemMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avif_dhub_config_TcmEntry (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (R-) +/// %unsigned 32 dat +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 32b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avif_dhub_config_TcmEntry +#define h_avif_dhub_config_TcmEntry (){} + + #define BA_avif_dhub_config_TcmEntry_dat 0x0000 + #define B16avif_dhub_config_TcmEntry_dat 0x0000 + #define LSb32avif_dhub_config_TcmEntry_dat 0 + #define LSb16avif_dhub_config_TcmEntry_dat 0 + #define bavif_dhub_config_TcmEntry_dat 32 + #define MSK32avif_dhub_config_TcmEntry_dat 0xFFFFFFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_avif_dhub_config_TcmEntry { + /////////////////////////////////////////////////////////// + #define GET32avif_dhub_config_TcmEntry_dat(r32) _BFGET_(r32,31, 0) + #define SET32avif_dhub_config_TcmEntry_dat(r32,v) _BFSET_(r32,31, 0,v) + + UNSG32 u_dat : 32; + /////////////////////////////////////////////////////////// + } SIE_avif_dhub_config_TcmEntry; + + /////////////////////////////////////////////////////////// + SIGN32 avif_dhub_config_TcmEntry_drvrd(SIE_avif_dhub_config_TcmEntry *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avif_dhub_config_TcmEntry_drvwr(SIE_avif_dhub_config_TcmEntry *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avif_dhub_config_TcmEntry_reset(SIE_avif_dhub_config_TcmEntry *p); + SIGN32 avif_dhub_config_TcmEntry_cmp (SIE_avif_dhub_config_TcmEntry *p, SIE_avif_dhub_config_TcmEntry *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avif_dhub_config_TcmEntry_check(p,pie,pfx,hLOG) avif_dhub_config_TcmEntry_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avif_dhub_config_TcmEntry_print(p, pfx,hLOG) avif_dhub_config_TcmEntry_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avif_dhub_config_TcmEntry +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avif_dhub_config biu (4,4) +/// ### +/// * avifDhub register specification +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 tcm0 +/// $avif_dhub_config_TcmEntry tcm0 MEM [16384] +/// ### +/// * Real TCM size is 8K*4 Banks= 32KB + 32KB stuffed. Dhub BIU will align to 64KB space +/// ### +/// @ 0x10000 (P) +/// # 0x10000 dHub0 +/// $dHubReg2D dHub0 REG +/// @ 0x11000 (W-) +/// # # Stuffing bytes... +/// %% 491520 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 131072B, bits: 6306b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avif_dhub_config +#define h_avif_dhub_config (){} + + #define RA_avif_dhub_config_tcm0 0x0000 + /////////////////////////////////////////////////////////// + #define RA_avif_dhub_config_dHub0 0x10000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_avif_dhub_config { + /////////////////////////////////////////////////////////// + SIE_avif_dhub_config_TcmEntry ie_tcm0[16384]; + /////////////////////////////////////////////////////////// + SIE_dHubReg2D ie_dHub0; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx11000 [61440]; + /////////////////////////////////////////////////////////// + } SIE_avif_dhub_config; + + /////////////////////////////////////////////////////////// + SIGN32 avif_dhub_config_drvrd(SIE_avif_dhub_config *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avif_dhub_config_drvwr(SIE_avif_dhub_config *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avif_dhub_config_reset(SIE_avif_dhub_config *p); + SIGN32 avif_dhub_config_cmp (SIE_avif_dhub_config *p, SIE_avif_dhub_config *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avif_dhub_config_check(p,pie,pfx,hLOG) avif_dhub_config_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avif_dhub_config_print(p, pfx,hLOG) avif_dhub_config_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avif_dhub_config +//////////////////////////////////////////////////////////// + + + +#ifdef __cplusplus + } +#endif +#pragma pack() + +#endif +////// +/// ENDOFFILE: avif_dhub_config.h +//////////////////////////////////////////////////////////// + diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/avio.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/avio.h new file mode 100644 index 00000000..65be41f9 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/avio.h @@ -0,0 +1,2630 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + +////// +/// don't edit! auto-generated by docc: avio.h +//////////////////////////////////////////////////////////// +#ifndef avio_h +#define avio_h (){} + + +#include "ctypes.h" + +#pragma pack(1) +#ifdef __cplusplus + extern "C" { +#endif + +#ifndef _DOCC_H_BITOPS_ +#define _DOCC_H_BITOPS_ (){} + + #define _bSETMASK_(b) ((b)<32 ? (1<<((b)&31)) : 0) + #define _NSETMASK_(msb,lsb) (_bSETMASK_((msb)+1)-_bSETMASK_(lsb)) + #define _bCLRMASK_(b) (~_bSETMASK_(b)) + #define _NCLRMASK_(msb,lsb) (~_NSETMASK_(msb,lsb)) + #define _BFGET_(r,msb,lsb) (_NSETMASK_((msb)-(lsb),0)&((r)>>(lsb))) + #define _BFSET_(r,msb,lsb,v) do{ (r)&=_NCLRMASK_(msb,lsb); (r)|=_NSETMASK_(msb,lsb)&((v)<<(lsb)); }while(0) + +#endif + + + +////// +/// +/// $INTERFACE oneReg (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (R-) +/// %unsigned 32 0x00000000 +/// ### +/// * One 32 bit entry for the BCM queue +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 32b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_oneReg +#define h_oneReg (){} + + #define BA_oneReg_0x00000000 0x0000 + #define B16oneReg_0x00000000 0x0000 + #define LSb32oneReg_0x00000000 0 + #define LSb16oneReg_0x00000000 0 + #define boneReg_0x00000000 32 + #define MSK32oneReg_0x00000000 0xFFFFFFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_oneReg { + /////////////////////////////////////////////////////////// + #define GET32oneReg_0x00000000(r32) _BFGET_(r32,31, 0) + #define SET32oneReg_0x00000000(r32,v) _BFSET_(r32,31, 0,v) + + UNSG32 u_0x00000000 : 32; + /////////////////////////////////////////////////////////// + } SIE_oneReg; + + /////////////////////////////////////////////////////////// + SIGN32 oneReg_drvrd(SIE_oneReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 oneReg_drvwr(SIE_oneReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void oneReg_reset(SIE_oneReg *p); + SIGN32 oneReg_cmp (SIE_oneReg *p, SIE_oneReg *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define oneReg_check(p,pie,pfx,hLOG) oneReg_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define oneReg_print(p, pfx,hLOG) oneReg_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: oneReg +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE AVIO_REG (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 dummy +/// $oneReg dummy REG [64] +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 256B, bits: 2048b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_AVIO_REG +#define h_AVIO_REG (){} + + #define RA_AVIO_REG_dummy 0x0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_AVIO_REG { + /////////////////////////////////////////////////////////// + SIE_oneReg ie_dummy[64]; + /////////////////////////////////////////////////////////// + } SIE_AVIO_REG; + + /////////////////////////////////////////////////////////// + SIGN32 AVIO_REG_drvrd(SIE_AVIO_REG *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 AVIO_REG_drvwr(SIE_AVIO_REG *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void AVIO_REG_reset(SIE_AVIO_REG *p); + SIGN32 AVIO_REG_cmp (SIE_AVIO_REG *p, SIE_AVIO_REG *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define AVIO_REG_check(p,pie,pfx,hLOG) AVIO_REG_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define AVIO_REG_print(p, pfx,hLOG) AVIO_REG_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: AVIO_REG +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE OCCURENCE (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (WOC-) +/// %unsigned 8 AUTO_PUSH_CNT 0x0 +/// ### +/// * One 8 bit counter value for the BCM queue +/// ### +/// %% 24 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 8b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_OCCURENCE +#define h_OCCURENCE (){} + + #define BA_OCCURENCE_AUTO_PUSH_CNT 0x0000 + #define B16OCCURENCE_AUTO_PUSH_CNT 0x0000 + #define LSb32OCCURENCE_AUTO_PUSH_CNT 0 + #define LSb16OCCURENCE_AUTO_PUSH_CNT 0 + #define bOCCURENCE_AUTO_PUSH_CNT 8 + #define MSK32OCCURENCE_AUTO_PUSH_CNT 0x000000FF + /////////////////////////////////////////////////////////// + + typedef struct SIE_OCCURENCE { + /////////////////////////////////////////////////////////// + #define GET32OCCURENCE_AUTO_PUSH_CNT(r32) _BFGET_(r32, 7, 0) + #define SET32OCCURENCE_AUTO_PUSH_CNT(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16OCCURENCE_AUTO_PUSH_CNT(r16) _BFGET_(r16, 7, 0) + #define SET16OCCURENCE_AUTO_PUSH_CNT(r16,v) _BFSET_(r16, 7, 0,v) + + UNSG32 u_AUTO_PUSH_CNT : 8; + UNSG32 RSVDx0_b8 : 24; + /////////////////////////////////////////////////////////// + } SIE_OCCURENCE; + + /////////////////////////////////////////////////////////// + SIGN32 OCCURENCE_drvrd(SIE_OCCURENCE *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 OCCURENCE_drvwr(SIE_OCCURENCE *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void OCCURENCE_reset(SIE_OCCURENCE *p); + SIGN32 OCCURENCE_cmp (SIE_OCCURENCE *p, SIE_OCCURENCE *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define OCCURENCE_check(p,pie,pfx,hLOG) OCCURENCE_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define OCCURENCE_print(p, pfx,hLOG) OCCURENCE_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: OCCURENCE +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE AVIO biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (R-) +/// # 0x00000 cfgReg +/// $AVIO_REG cfgReg MEM +/// @ 0x00100 BCM_Q0 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #0. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00104 BCM_Q1 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #1. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00108 BCM_Q2 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #2. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x0010C BCM_Q3 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #3. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00110 BCM_Q4 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #4. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00114 BCM_Q5 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #5. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00118 BCM_Q6 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #6. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x0011C BCM_Q7 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #7. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00120 BCM_Q8 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #8. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00124 BCM_Q9 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #9. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00128 BCM_Q10 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #10. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x0012C BCM_Q11 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #11. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00130 BCM_Q14 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #14. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00134 BCM_Q15 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #15. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00138 BCM_Q16 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #16. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x0013C BCM_Q17 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #17. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00140 BCM_Q18 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #18. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00144 BCM_FULL_STS (R-) +/// %unsigned 1 Q0 0x0 +/// %unsigned 1 Q1 0x0 +/// %unsigned 1 Q2 0x0 +/// %unsigned 1 Q3 0x0 +/// %unsigned 1 Q4 0x0 +/// %unsigned 1 Q5 0x0 +/// %unsigned 1 Q6 0x0 +/// %unsigned 1 Q7 0x0 +/// %unsigned 1 Q8 0x0 +/// %unsigned 1 Q9 0x0 +/// %unsigned 1 Q10 0x0 +/// %unsigned 1 Q11 0x0 +/// %unsigned 1 Q12 0x0 +/// %unsigned 1 Q13 0x0 +/// %unsigned 1 Q14 0x0 +/// %unsigned 1 Q15 0x0 +/// %unsigned 1 Q16 0x0 +/// %unsigned 1 Q17 0x0 +/// %unsigned 1 Q18 0x0 +/// %unsigned 1 Q31 0x0 +/// ### +/// * This bit indicates the full status of each queue. One bit is assigned per queue. SW should poll this queue before programming the queue. If the queue is full and SW programs the queue, data will be lost. +/// ### +/// %% 12 # Stuffing bits... +/// @ 0x00148 BCM_EMP_STS (R-) +/// %unsigned 1 Q0 0x0 +/// %unsigned 1 Q1 0x0 +/// %unsigned 1 Q2 0x0 +/// %unsigned 1 Q3 0x0 +/// %unsigned 1 Q4 0x0 +/// %unsigned 1 Q5 0x0 +/// %unsigned 1 Q6 0x0 +/// %unsigned 1 Q7 0x0 +/// %unsigned 1 Q8 0x0 +/// %unsigned 1 Q9 0x0 +/// %unsigned 1 Q10 0x0 +/// %unsigned 1 Q11 0x0 +/// %unsigned 1 Q12 0x0 +/// %unsigned 1 Q13 0x0 +/// %unsigned 1 Q14 0x0 +/// %unsigned 1 Q15 0x0 +/// %unsigned 1 Q16 0x0 +/// %unsigned 1 Q17 0x0 +/// %unsigned 1 Q18 0x0 +/// %unsigned 1 Q31 0x0 +/// ### +/// * This bit indicates the empty status of each queue. +/// ### +/// %% 12 # Stuffing bits... +/// @ 0x0014C BCM_FLUSH (P) +/// %unsigned 1 Q0 0x0 +/// %unsigned 1 Q1 0x0 +/// %unsigned 1 Q2 0x0 +/// %unsigned 1 Q3 0x0 +/// %unsigned 1 Q4 0x0 +/// %unsigned 1 Q5 0x0 +/// %unsigned 1 Q6 0x0 +/// %unsigned 1 Q7 0x0 +/// %unsigned 1 Q8 0x0 +/// %unsigned 1 Q9 0x0 +/// %unsigned 1 Q10 0x0 +/// %unsigned 1 Q11 0x0 +/// %unsigned 1 Q12 0x0 +/// %unsigned 1 Q13 0x0 +/// %unsigned 1 Q14 0x0 +/// %unsigned 1 Q15 0x0 +/// %unsigned 1 Q16 0x0 +/// %unsigned 1 Q17 0x0 +/// %unsigned 1 Q18 0x0 +/// %unsigned 1 Q31 0x0 +/// ### +/// * This bit is used to clear each queue. +/// * 1: queue is cleared +/// * 0: queue is not cleared, normal operation. +/// ### +/// %% 12 # Stuffing bits... +/// @ 0x00150 BCM_AUTOPUSH_CNT (WOC-) +/// %unsigned 32 OCCURENCE 0x0 +/// @ 0x00154 (P) +/// # 0x00154 Q0 +/// $OCCURENCE Q0 REG +/// @ 0x00158 (P) +/// # 0x00158 Q1 +/// $OCCURENCE Q1 REG +/// @ 0x0015C (P) +/// # 0x0015C Q2 +/// $OCCURENCE Q2 REG +/// @ 0x00160 (P) +/// # 0x00160 Q3 +/// $OCCURENCE Q3 REG +/// @ 0x00164 (P) +/// # 0x00164 Q4 +/// $OCCURENCE Q4 REG +/// @ 0x00168 (P) +/// # 0x00168 Q5 +/// $OCCURENCE Q5 REG +/// @ 0x0016C (P) +/// # 0x0016C Q6 +/// $OCCURENCE Q6 REG +/// @ 0x00170 (P) +/// # 0x00170 Q7 +/// $OCCURENCE Q7 REG +/// @ 0x00174 (P) +/// # 0x00174 Q8 +/// $OCCURENCE Q8 REG +/// @ 0x00178 (P) +/// # 0x00178 Q9 +/// $OCCURENCE Q9 REG +/// @ 0x0017C (P) +/// # 0x0017C Q10 +/// $OCCURENCE Q10 REG +/// @ 0x00180 (P) +/// # 0x00180 Q11 +/// $OCCURENCE Q11 REG +/// @ 0x00184 (P) +/// # 0x00184 Q14 +/// $OCCURENCE Q14 REG +/// @ 0x00188 (P) +/// # 0x00188 Q15 +/// $OCCURENCE Q15 REG +/// @ 0x0018C (P) +/// # 0x0018C Q16 +/// $OCCURENCE Q16 REG +/// @ 0x00190 (P) +/// # 0x00190 Q17 +/// $OCCURENCE Q17 REG +/// @ 0x00194 (P) +/// # 0x00194 Q18 +/// $OCCURENCE Q18 REG +/// ### +/// * This register records number of occurences of BCM AUTOPUSH event +/// ### +/// @ 0x00198 BCM_AUTOPUSH (P) +/// %unsigned 1 Q0 0x0 +/// %unsigned 1 Q1 0x0 +/// %unsigned 1 Q2 0x0 +/// %unsigned 1 Q3 0x0 +/// %unsigned 1 Q4 0x0 +/// %unsigned 1 Q5 0x0 +/// %unsigned 1 Q6 0x0 +/// %unsigned 1 Q7 0x0 +/// %unsigned 1 Q8 0x0 +/// %unsigned 1 Q9 0x0 +/// %unsigned 1 Q10 0x0 +/// %unsigned 1 Q11 0x0 +/// %unsigned 1 Q12 0x0 +/// %unsigned 1 Q13 0x0 +/// %unsigned 1 Q14 0x0 +/// %unsigned 1 Q15 0x0 +/// %unsigned 1 Q16 0x0 +/// %unsigned 1 Q17 0x0 +/// %unsigned 1 Q18 0x0 +/// ### +/// * When this bit is set to 1 for a Q and corresponding Q is empty when interrupt event for the Q occurs, BCM automatically pushes last command in that particular Q +/// ### +/// %% 13 # Stuffing bits... +/// @ 0x0019C BCM_FULL_STS_STICKY (WOC-) +/// %unsigned 1 Q0 0x0 +/// %unsigned 1 Q1 0x0 +/// %unsigned 1 Q2 0x0 +/// %unsigned 1 Q3 0x0 +/// %unsigned 1 Q4 0x0 +/// %unsigned 1 Q5 0x0 +/// %unsigned 1 Q6 0x0 +/// %unsigned 1 Q7 0x0 +/// %unsigned 1 Q8 0x0 +/// %unsigned 1 Q9 0x0 +/// %unsigned 1 Q10 0x0 +/// %unsigned 1 Q11 0x0 +/// %unsigned 1 Q12 0x0 +/// %unsigned 1 Q13 0x0 +/// %unsigned 1 Q14 0x0 +/// %unsigned 1 Q15 0x0 +/// %unsigned 1 Q16 0x0 +/// %unsigned 1 Q17 0x0 +/// %unsigned 1 Q18 0x0 +/// ### +/// * 1: indicates full happened since last clear +/// * 0: full didn't happen since last clear +/// * Software shall write 1 to clear a particular bit. +/// ### +/// %% 13 # Stuffing bits... +/// @ 0x001A0 BCM_ERROR (WOC-) +/// %unsigned 1 err 0x0 +/// ### +/// * Indicates that BCM Engine received a {address, data} pair over data channel interface of dHub's BCM channel, where “address†points to a register that is inaccessible by BCM Engine. +/// * This is a sticky status, and SW need to write 0x1 to clear this bit. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x001A4 BCM_LOG_ADDR (R-) +/// %unsigned 32 addr 0x0 +/// ### +/// * The value of “address†which is inaccessible by BCM engine. It logs the address value for the most recent error transaction. +/// ### +/// @ 0x001A8 BCM_ERROR_DATA (R-) +/// %unsigned 32 data 0x0 +/// ### +/// * The value of “data†in {address, data} pair where address is inaccessible by BCM engine. It logs the data value for the most recent error transaction. +/// ### +/// @ 0x001AC (W-) +/// # # Stuffing bytes... +/// %% 672 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 512B, bits: 448b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_AVIO +#define h_AVIO (){} + + #define RA_AVIO_cfgReg 0x0000 + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q0 0x0100 + + #define BA_AVIO_BCM_Q0_mux 0x0100 + #define B16AVIO_BCM_Q0_mux 0x0100 + #define LSb32AVIO_BCM_Q0_mux 0 + #define LSb16AVIO_BCM_Q0_mux 0 + #define bAVIO_BCM_Q0_mux 5 + #define MSK32AVIO_BCM_Q0_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q1 0x0104 + + #define BA_AVIO_BCM_Q1_mux 0x0104 + #define B16AVIO_BCM_Q1_mux 0x0104 + #define LSb32AVIO_BCM_Q1_mux 0 + #define LSb16AVIO_BCM_Q1_mux 0 + #define bAVIO_BCM_Q1_mux 5 + #define MSK32AVIO_BCM_Q1_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q2 0x0108 + + #define BA_AVIO_BCM_Q2_mux 0x0108 + #define B16AVIO_BCM_Q2_mux 0x0108 + #define LSb32AVIO_BCM_Q2_mux 0 + #define LSb16AVIO_BCM_Q2_mux 0 + #define bAVIO_BCM_Q2_mux 5 + #define MSK32AVIO_BCM_Q2_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q3 0x010C + + #define BA_AVIO_BCM_Q3_mux 0x010C + #define B16AVIO_BCM_Q3_mux 0x010C + #define LSb32AVIO_BCM_Q3_mux 0 + #define LSb16AVIO_BCM_Q3_mux 0 + #define bAVIO_BCM_Q3_mux 5 + #define MSK32AVIO_BCM_Q3_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q4 0x0110 + + #define BA_AVIO_BCM_Q4_mux 0x0110 + #define B16AVIO_BCM_Q4_mux 0x0110 + #define LSb32AVIO_BCM_Q4_mux 0 + #define LSb16AVIO_BCM_Q4_mux 0 + #define bAVIO_BCM_Q4_mux 5 + #define MSK32AVIO_BCM_Q4_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q5 0x0114 + + #define BA_AVIO_BCM_Q5_mux 0x0114 + #define B16AVIO_BCM_Q5_mux 0x0114 + #define LSb32AVIO_BCM_Q5_mux 0 + #define LSb16AVIO_BCM_Q5_mux 0 + #define bAVIO_BCM_Q5_mux 5 + #define MSK32AVIO_BCM_Q5_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q6 0x0118 + + #define BA_AVIO_BCM_Q6_mux 0x0118 + #define B16AVIO_BCM_Q6_mux 0x0118 + #define LSb32AVIO_BCM_Q6_mux 0 + #define LSb16AVIO_BCM_Q6_mux 0 + #define bAVIO_BCM_Q6_mux 5 + #define MSK32AVIO_BCM_Q6_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q7 0x011C + + #define BA_AVIO_BCM_Q7_mux 0x011C + #define B16AVIO_BCM_Q7_mux 0x011C + #define LSb32AVIO_BCM_Q7_mux 0 + #define LSb16AVIO_BCM_Q7_mux 0 + #define bAVIO_BCM_Q7_mux 5 + #define MSK32AVIO_BCM_Q7_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q8 0x0120 + + #define BA_AVIO_BCM_Q8_mux 0x0120 + #define B16AVIO_BCM_Q8_mux 0x0120 + #define LSb32AVIO_BCM_Q8_mux 0 + #define LSb16AVIO_BCM_Q8_mux 0 + #define bAVIO_BCM_Q8_mux 5 + #define MSK32AVIO_BCM_Q8_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q9 0x0124 + + #define BA_AVIO_BCM_Q9_mux 0x0124 + #define B16AVIO_BCM_Q9_mux 0x0124 + #define LSb32AVIO_BCM_Q9_mux 0 + #define LSb16AVIO_BCM_Q9_mux 0 + #define bAVIO_BCM_Q9_mux 5 + #define MSK32AVIO_BCM_Q9_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q10 0x0128 + + #define BA_AVIO_BCM_Q10_mux 0x0128 + #define B16AVIO_BCM_Q10_mux 0x0128 + #define LSb32AVIO_BCM_Q10_mux 0 + #define LSb16AVIO_BCM_Q10_mux 0 + #define bAVIO_BCM_Q10_mux 5 + #define MSK32AVIO_BCM_Q10_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q11 0x012C + + #define BA_AVIO_BCM_Q11_mux 0x012C + #define B16AVIO_BCM_Q11_mux 0x012C + #define LSb32AVIO_BCM_Q11_mux 0 + #define LSb16AVIO_BCM_Q11_mux 0 + #define bAVIO_BCM_Q11_mux 5 + #define MSK32AVIO_BCM_Q11_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q14 0x0130 + + #define BA_AVIO_BCM_Q14_mux 0x0130 + #define B16AVIO_BCM_Q14_mux 0x0130 + #define LSb32AVIO_BCM_Q14_mux 0 + #define LSb16AVIO_BCM_Q14_mux 0 + #define bAVIO_BCM_Q14_mux 5 + #define MSK32AVIO_BCM_Q14_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q15 0x0134 + + #define BA_AVIO_BCM_Q15_mux 0x0134 + #define B16AVIO_BCM_Q15_mux 0x0134 + #define LSb32AVIO_BCM_Q15_mux 0 + #define LSb16AVIO_BCM_Q15_mux 0 + #define bAVIO_BCM_Q15_mux 5 + #define MSK32AVIO_BCM_Q15_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q16 0x0138 + + #define BA_AVIO_BCM_Q16_mux 0x0138 + #define B16AVIO_BCM_Q16_mux 0x0138 + #define LSb32AVIO_BCM_Q16_mux 0 + #define LSb16AVIO_BCM_Q16_mux 0 + #define bAVIO_BCM_Q16_mux 5 + #define MSK32AVIO_BCM_Q16_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q17 0x013C + + #define BA_AVIO_BCM_Q17_mux 0x013C + #define B16AVIO_BCM_Q17_mux 0x013C + #define LSb32AVIO_BCM_Q17_mux 0 + #define LSb16AVIO_BCM_Q17_mux 0 + #define bAVIO_BCM_Q17_mux 5 + #define MSK32AVIO_BCM_Q17_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q18 0x0140 + + #define BA_AVIO_BCM_Q18_mux 0x0140 + #define B16AVIO_BCM_Q18_mux 0x0140 + #define LSb32AVIO_BCM_Q18_mux 0 + #define LSb16AVIO_BCM_Q18_mux 0 + #define bAVIO_BCM_Q18_mux 5 + #define MSK32AVIO_BCM_Q18_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_FULL_STS 0x0144 + + #define BA_AVIO_BCM_FULL_STS_Q0 0x0144 + #define B16AVIO_BCM_FULL_STS_Q0 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q0 0 + #define LSb16AVIO_BCM_FULL_STS_Q0 0 + #define bAVIO_BCM_FULL_STS_Q0 1 + #define MSK32AVIO_BCM_FULL_STS_Q0 0x00000001 + + #define BA_AVIO_BCM_FULL_STS_Q1 0x0144 + #define B16AVIO_BCM_FULL_STS_Q1 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q1 1 + #define LSb16AVIO_BCM_FULL_STS_Q1 1 + #define bAVIO_BCM_FULL_STS_Q1 1 + #define MSK32AVIO_BCM_FULL_STS_Q1 0x00000002 + + #define BA_AVIO_BCM_FULL_STS_Q2 0x0144 + #define B16AVIO_BCM_FULL_STS_Q2 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q2 2 + #define LSb16AVIO_BCM_FULL_STS_Q2 2 + #define bAVIO_BCM_FULL_STS_Q2 1 + #define MSK32AVIO_BCM_FULL_STS_Q2 0x00000004 + + #define BA_AVIO_BCM_FULL_STS_Q3 0x0144 + #define B16AVIO_BCM_FULL_STS_Q3 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q3 3 + #define LSb16AVIO_BCM_FULL_STS_Q3 3 + #define bAVIO_BCM_FULL_STS_Q3 1 + #define MSK32AVIO_BCM_FULL_STS_Q3 0x00000008 + + #define BA_AVIO_BCM_FULL_STS_Q4 0x0144 + #define B16AVIO_BCM_FULL_STS_Q4 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q4 4 + #define LSb16AVIO_BCM_FULL_STS_Q4 4 + #define bAVIO_BCM_FULL_STS_Q4 1 + #define MSK32AVIO_BCM_FULL_STS_Q4 0x00000010 + + #define BA_AVIO_BCM_FULL_STS_Q5 0x0144 + #define B16AVIO_BCM_FULL_STS_Q5 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q5 5 + #define LSb16AVIO_BCM_FULL_STS_Q5 5 + #define bAVIO_BCM_FULL_STS_Q5 1 + #define MSK32AVIO_BCM_FULL_STS_Q5 0x00000020 + + #define BA_AVIO_BCM_FULL_STS_Q6 0x0144 + #define B16AVIO_BCM_FULL_STS_Q6 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q6 6 + #define LSb16AVIO_BCM_FULL_STS_Q6 6 + #define bAVIO_BCM_FULL_STS_Q6 1 + #define MSK32AVIO_BCM_FULL_STS_Q6 0x00000040 + + #define BA_AVIO_BCM_FULL_STS_Q7 0x0144 + #define B16AVIO_BCM_FULL_STS_Q7 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q7 7 + #define LSb16AVIO_BCM_FULL_STS_Q7 7 + #define bAVIO_BCM_FULL_STS_Q7 1 + #define MSK32AVIO_BCM_FULL_STS_Q7 0x00000080 + + #define BA_AVIO_BCM_FULL_STS_Q8 0x0145 + #define B16AVIO_BCM_FULL_STS_Q8 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q8 8 + #define LSb16AVIO_BCM_FULL_STS_Q8 8 + #define bAVIO_BCM_FULL_STS_Q8 1 + #define MSK32AVIO_BCM_FULL_STS_Q8 0x00000100 + + #define BA_AVIO_BCM_FULL_STS_Q9 0x0145 + #define B16AVIO_BCM_FULL_STS_Q9 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q9 9 + #define LSb16AVIO_BCM_FULL_STS_Q9 9 + #define bAVIO_BCM_FULL_STS_Q9 1 + #define MSK32AVIO_BCM_FULL_STS_Q9 0x00000200 + + #define BA_AVIO_BCM_FULL_STS_Q10 0x0145 + #define B16AVIO_BCM_FULL_STS_Q10 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q10 10 + #define LSb16AVIO_BCM_FULL_STS_Q10 10 + #define bAVIO_BCM_FULL_STS_Q10 1 + #define MSK32AVIO_BCM_FULL_STS_Q10 0x00000400 + + #define BA_AVIO_BCM_FULL_STS_Q11 0x0145 + #define B16AVIO_BCM_FULL_STS_Q11 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q11 11 + #define LSb16AVIO_BCM_FULL_STS_Q11 11 + #define bAVIO_BCM_FULL_STS_Q11 1 + #define MSK32AVIO_BCM_FULL_STS_Q11 0x00000800 + + #define BA_AVIO_BCM_FULL_STS_Q12 0x0145 + #define B16AVIO_BCM_FULL_STS_Q12 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q12 12 + #define LSb16AVIO_BCM_FULL_STS_Q12 12 + #define bAVIO_BCM_FULL_STS_Q12 1 + #define MSK32AVIO_BCM_FULL_STS_Q12 0x00001000 + + #define BA_AVIO_BCM_FULL_STS_Q13 0x0145 + #define B16AVIO_BCM_FULL_STS_Q13 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q13 13 + #define LSb16AVIO_BCM_FULL_STS_Q13 13 + #define bAVIO_BCM_FULL_STS_Q13 1 + #define MSK32AVIO_BCM_FULL_STS_Q13 0x00002000 + + #define BA_AVIO_BCM_FULL_STS_Q14 0x0145 + #define B16AVIO_BCM_FULL_STS_Q14 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q14 14 + #define LSb16AVIO_BCM_FULL_STS_Q14 14 + #define bAVIO_BCM_FULL_STS_Q14 1 + #define MSK32AVIO_BCM_FULL_STS_Q14 0x00004000 + + #define BA_AVIO_BCM_FULL_STS_Q15 0x0145 + #define B16AVIO_BCM_FULL_STS_Q15 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q15 15 + #define LSb16AVIO_BCM_FULL_STS_Q15 15 + #define bAVIO_BCM_FULL_STS_Q15 1 + #define MSK32AVIO_BCM_FULL_STS_Q15 0x00008000 + + #define BA_AVIO_BCM_FULL_STS_Q16 0x0146 + #define B16AVIO_BCM_FULL_STS_Q16 0x0146 + #define LSb32AVIO_BCM_FULL_STS_Q16 16 + #define LSb16AVIO_BCM_FULL_STS_Q16 0 + #define bAVIO_BCM_FULL_STS_Q16 1 + #define MSK32AVIO_BCM_FULL_STS_Q16 0x00010000 + + #define BA_AVIO_BCM_FULL_STS_Q17 0x0146 + #define B16AVIO_BCM_FULL_STS_Q17 0x0146 + #define LSb32AVIO_BCM_FULL_STS_Q17 17 + #define LSb16AVIO_BCM_FULL_STS_Q17 1 + #define bAVIO_BCM_FULL_STS_Q17 1 + #define MSK32AVIO_BCM_FULL_STS_Q17 0x00020000 + + #define BA_AVIO_BCM_FULL_STS_Q18 0x0146 + #define B16AVIO_BCM_FULL_STS_Q18 0x0146 + #define LSb32AVIO_BCM_FULL_STS_Q18 18 + #define LSb16AVIO_BCM_FULL_STS_Q18 2 + #define bAVIO_BCM_FULL_STS_Q18 1 + #define MSK32AVIO_BCM_FULL_STS_Q18 0x00040000 + + #define BA_AVIO_BCM_FULL_STS_Q31 0x0146 + #define B16AVIO_BCM_FULL_STS_Q31 0x0146 + #define LSb32AVIO_BCM_FULL_STS_Q31 19 + #define LSb16AVIO_BCM_FULL_STS_Q31 3 + #define bAVIO_BCM_FULL_STS_Q31 1 + #define MSK32AVIO_BCM_FULL_STS_Q31 0x00080000 + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_EMP_STS 0x0148 + + #define BA_AVIO_BCM_EMP_STS_Q0 0x0148 + #define B16AVIO_BCM_EMP_STS_Q0 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q0 0 + #define LSb16AVIO_BCM_EMP_STS_Q0 0 + #define bAVIO_BCM_EMP_STS_Q0 1 + #define MSK32AVIO_BCM_EMP_STS_Q0 0x00000001 + + #define BA_AVIO_BCM_EMP_STS_Q1 0x0148 + #define B16AVIO_BCM_EMP_STS_Q1 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q1 1 + #define LSb16AVIO_BCM_EMP_STS_Q1 1 + #define bAVIO_BCM_EMP_STS_Q1 1 + #define MSK32AVIO_BCM_EMP_STS_Q1 0x00000002 + + #define BA_AVIO_BCM_EMP_STS_Q2 0x0148 + #define B16AVIO_BCM_EMP_STS_Q2 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q2 2 + #define LSb16AVIO_BCM_EMP_STS_Q2 2 + #define bAVIO_BCM_EMP_STS_Q2 1 + #define MSK32AVIO_BCM_EMP_STS_Q2 0x00000004 + + #define BA_AVIO_BCM_EMP_STS_Q3 0x0148 + #define B16AVIO_BCM_EMP_STS_Q3 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q3 3 + #define LSb16AVIO_BCM_EMP_STS_Q3 3 + #define bAVIO_BCM_EMP_STS_Q3 1 + #define MSK32AVIO_BCM_EMP_STS_Q3 0x00000008 + + #define BA_AVIO_BCM_EMP_STS_Q4 0x0148 + #define B16AVIO_BCM_EMP_STS_Q4 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q4 4 + #define LSb16AVIO_BCM_EMP_STS_Q4 4 + #define bAVIO_BCM_EMP_STS_Q4 1 + #define MSK32AVIO_BCM_EMP_STS_Q4 0x00000010 + + #define BA_AVIO_BCM_EMP_STS_Q5 0x0148 + #define B16AVIO_BCM_EMP_STS_Q5 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q5 5 + #define LSb16AVIO_BCM_EMP_STS_Q5 5 + #define bAVIO_BCM_EMP_STS_Q5 1 + #define MSK32AVIO_BCM_EMP_STS_Q5 0x00000020 + + #define BA_AVIO_BCM_EMP_STS_Q6 0x0148 + #define B16AVIO_BCM_EMP_STS_Q6 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q6 6 + #define LSb16AVIO_BCM_EMP_STS_Q6 6 + #define bAVIO_BCM_EMP_STS_Q6 1 + #define MSK32AVIO_BCM_EMP_STS_Q6 0x00000040 + + #define BA_AVIO_BCM_EMP_STS_Q7 0x0148 + #define B16AVIO_BCM_EMP_STS_Q7 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q7 7 + #define LSb16AVIO_BCM_EMP_STS_Q7 7 + #define bAVIO_BCM_EMP_STS_Q7 1 + #define MSK32AVIO_BCM_EMP_STS_Q7 0x00000080 + + #define BA_AVIO_BCM_EMP_STS_Q8 0x0149 + #define B16AVIO_BCM_EMP_STS_Q8 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q8 8 + #define LSb16AVIO_BCM_EMP_STS_Q8 8 + #define bAVIO_BCM_EMP_STS_Q8 1 + #define MSK32AVIO_BCM_EMP_STS_Q8 0x00000100 + + #define BA_AVIO_BCM_EMP_STS_Q9 0x0149 + #define B16AVIO_BCM_EMP_STS_Q9 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q9 9 + #define LSb16AVIO_BCM_EMP_STS_Q9 9 + #define bAVIO_BCM_EMP_STS_Q9 1 + #define MSK32AVIO_BCM_EMP_STS_Q9 0x00000200 + + #define BA_AVIO_BCM_EMP_STS_Q10 0x0149 + #define B16AVIO_BCM_EMP_STS_Q10 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q10 10 + #define LSb16AVIO_BCM_EMP_STS_Q10 10 + #define bAVIO_BCM_EMP_STS_Q10 1 + #define MSK32AVIO_BCM_EMP_STS_Q10 0x00000400 + + #define BA_AVIO_BCM_EMP_STS_Q11 0x0149 + #define B16AVIO_BCM_EMP_STS_Q11 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q11 11 + #define LSb16AVIO_BCM_EMP_STS_Q11 11 + #define bAVIO_BCM_EMP_STS_Q11 1 + #define MSK32AVIO_BCM_EMP_STS_Q11 0x00000800 + + #define BA_AVIO_BCM_EMP_STS_Q12 0x0149 + #define B16AVIO_BCM_EMP_STS_Q12 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q12 12 + #define LSb16AVIO_BCM_EMP_STS_Q12 12 + #define bAVIO_BCM_EMP_STS_Q12 1 + #define MSK32AVIO_BCM_EMP_STS_Q12 0x00001000 + + #define BA_AVIO_BCM_EMP_STS_Q13 0x0149 + #define B16AVIO_BCM_EMP_STS_Q13 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q13 13 + #define LSb16AVIO_BCM_EMP_STS_Q13 13 + #define bAVIO_BCM_EMP_STS_Q13 1 + #define MSK32AVIO_BCM_EMP_STS_Q13 0x00002000 + + #define BA_AVIO_BCM_EMP_STS_Q14 0x0149 + #define B16AVIO_BCM_EMP_STS_Q14 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q14 14 + #define LSb16AVIO_BCM_EMP_STS_Q14 14 + #define bAVIO_BCM_EMP_STS_Q14 1 + #define MSK32AVIO_BCM_EMP_STS_Q14 0x00004000 + + #define BA_AVIO_BCM_EMP_STS_Q15 0x0149 + #define B16AVIO_BCM_EMP_STS_Q15 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q15 15 + #define LSb16AVIO_BCM_EMP_STS_Q15 15 + #define bAVIO_BCM_EMP_STS_Q15 1 + #define MSK32AVIO_BCM_EMP_STS_Q15 0x00008000 + + #define BA_AVIO_BCM_EMP_STS_Q16 0x014A + #define B16AVIO_BCM_EMP_STS_Q16 0x014A + #define LSb32AVIO_BCM_EMP_STS_Q16 16 + #define LSb16AVIO_BCM_EMP_STS_Q16 0 + #define bAVIO_BCM_EMP_STS_Q16 1 + #define MSK32AVIO_BCM_EMP_STS_Q16 0x00010000 + + #define BA_AVIO_BCM_EMP_STS_Q17 0x014A + #define B16AVIO_BCM_EMP_STS_Q17 0x014A + #define LSb32AVIO_BCM_EMP_STS_Q17 17 + #define LSb16AVIO_BCM_EMP_STS_Q17 1 + #define bAVIO_BCM_EMP_STS_Q17 1 + #define MSK32AVIO_BCM_EMP_STS_Q17 0x00020000 + + #define BA_AVIO_BCM_EMP_STS_Q18 0x014A + #define B16AVIO_BCM_EMP_STS_Q18 0x014A + #define LSb32AVIO_BCM_EMP_STS_Q18 18 + #define LSb16AVIO_BCM_EMP_STS_Q18 2 + #define bAVIO_BCM_EMP_STS_Q18 1 + #define MSK32AVIO_BCM_EMP_STS_Q18 0x00040000 + + #define BA_AVIO_BCM_EMP_STS_Q31 0x014A + #define B16AVIO_BCM_EMP_STS_Q31 0x014A + #define LSb32AVIO_BCM_EMP_STS_Q31 19 + #define LSb16AVIO_BCM_EMP_STS_Q31 3 + #define bAVIO_BCM_EMP_STS_Q31 1 + #define MSK32AVIO_BCM_EMP_STS_Q31 0x00080000 + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_FLUSH 0x014C + + #define BA_AVIO_BCM_FLUSH_Q0 0x014C + #define B16AVIO_BCM_FLUSH_Q0 0x014C + #define LSb32AVIO_BCM_FLUSH_Q0 0 + #define LSb16AVIO_BCM_FLUSH_Q0 0 + #define bAVIO_BCM_FLUSH_Q0 1 + #define MSK32AVIO_BCM_FLUSH_Q0 0x00000001 + + #define BA_AVIO_BCM_FLUSH_Q1 0x014C + #define B16AVIO_BCM_FLUSH_Q1 0x014C + #define LSb32AVIO_BCM_FLUSH_Q1 1 + #define LSb16AVIO_BCM_FLUSH_Q1 1 + #define bAVIO_BCM_FLUSH_Q1 1 + #define MSK32AVIO_BCM_FLUSH_Q1 0x00000002 + + #define BA_AVIO_BCM_FLUSH_Q2 0x014C + #define B16AVIO_BCM_FLUSH_Q2 0x014C + #define LSb32AVIO_BCM_FLUSH_Q2 2 + #define LSb16AVIO_BCM_FLUSH_Q2 2 + #define bAVIO_BCM_FLUSH_Q2 1 + #define MSK32AVIO_BCM_FLUSH_Q2 0x00000004 + + #define BA_AVIO_BCM_FLUSH_Q3 0x014C + #define B16AVIO_BCM_FLUSH_Q3 0x014C + #define LSb32AVIO_BCM_FLUSH_Q3 3 + #define LSb16AVIO_BCM_FLUSH_Q3 3 + #define bAVIO_BCM_FLUSH_Q3 1 + #define MSK32AVIO_BCM_FLUSH_Q3 0x00000008 + + #define BA_AVIO_BCM_FLUSH_Q4 0x014C + #define B16AVIO_BCM_FLUSH_Q4 0x014C + #define LSb32AVIO_BCM_FLUSH_Q4 4 + #define LSb16AVIO_BCM_FLUSH_Q4 4 + #define bAVIO_BCM_FLUSH_Q4 1 + #define MSK32AVIO_BCM_FLUSH_Q4 0x00000010 + + #define BA_AVIO_BCM_FLUSH_Q5 0x014C + #define B16AVIO_BCM_FLUSH_Q5 0x014C + #define LSb32AVIO_BCM_FLUSH_Q5 5 + #define LSb16AVIO_BCM_FLUSH_Q5 5 + #define bAVIO_BCM_FLUSH_Q5 1 + #define MSK32AVIO_BCM_FLUSH_Q5 0x00000020 + + #define BA_AVIO_BCM_FLUSH_Q6 0x014C + #define B16AVIO_BCM_FLUSH_Q6 0x014C + #define LSb32AVIO_BCM_FLUSH_Q6 6 + #define LSb16AVIO_BCM_FLUSH_Q6 6 + #define bAVIO_BCM_FLUSH_Q6 1 + #define MSK32AVIO_BCM_FLUSH_Q6 0x00000040 + + #define BA_AVIO_BCM_FLUSH_Q7 0x014C + #define B16AVIO_BCM_FLUSH_Q7 0x014C + #define LSb32AVIO_BCM_FLUSH_Q7 7 + #define LSb16AVIO_BCM_FLUSH_Q7 7 + #define bAVIO_BCM_FLUSH_Q7 1 + #define MSK32AVIO_BCM_FLUSH_Q7 0x00000080 + + #define BA_AVIO_BCM_FLUSH_Q8 0x014D + #define B16AVIO_BCM_FLUSH_Q8 0x014C + #define LSb32AVIO_BCM_FLUSH_Q8 8 + #define LSb16AVIO_BCM_FLUSH_Q8 8 + #define bAVIO_BCM_FLUSH_Q8 1 + #define MSK32AVIO_BCM_FLUSH_Q8 0x00000100 + + #define BA_AVIO_BCM_FLUSH_Q9 0x014D + #define B16AVIO_BCM_FLUSH_Q9 0x014C + #define LSb32AVIO_BCM_FLUSH_Q9 9 + #define LSb16AVIO_BCM_FLUSH_Q9 9 + #define bAVIO_BCM_FLUSH_Q9 1 + #define MSK32AVIO_BCM_FLUSH_Q9 0x00000200 + + #define BA_AVIO_BCM_FLUSH_Q10 0x014D + #define B16AVIO_BCM_FLUSH_Q10 0x014C + #define LSb32AVIO_BCM_FLUSH_Q10 10 + #define LSb16AVIO_BCM_FLUSH_Q10 10 + #define bAVIO_BCM_FLUSH_Q10 1 + #define MSK32AVIO_BCM_FLUSH_Q10 0x00000400 + + #define BA_AVIO_BCM_FLUSH_Q11 0x014D + #define B16AVIO_BCM_FLUSH_Q11 0x014C + #define LSb32AVIO_BCM_FLUSH_Q11 11 + #define LSb16AVIO_BCM_FLUSH_Q11 11 + #define bAVIO_BCM_FLUSH_Q11 1 + #define MSK32AVIO_BCM_FLUSH_Q11 0x00000800 + + #define BA_AVIO_BCM_FLUSH_Q12 0x014D + #define B16AVIO_BCM_FLUSH_Q12 0x014C + #define LSb32AVIO_BCM_FLUSH_Q12 12 + #define LSb16AVIO_BCM_FLUSH_Q12 12 + #define bAVIO_BCM_FLUSH_Q12 1 + #define MSK32AVIO_BCM_FLUSH_Q12 0x00001000 + + #define BA_AVIO_BCM_FLUSH_Q13 0x014D + #define B16AVIO_BCM_FLUSH_Q13 0x014C + #define LSb32AVIO_BCM_FLUSH_Q13 13 + #define LSb16AVIO_BCM_FLUSH_Q13 13 + #define bAVIO_BCM_FLUSH_Q13 1 + #define MSK32AVIO_BCM_FLUSH_Q13 0x00002000 + + #define BA_AVIO_BCM_FLUSH_Q14 0x014D + #define B16AVIO_BCM_FLUSH_Q14 0x014C + #define LSb32AVIO_BCM_FLUSH_Q14 14 + #define LSb16AVIO_BCM_FLUSH_Q14 14 + #define bAVIO_BCM_FLUSH_Q14 1 + #define MSK32AVIO_BCM_FLUSH_Q14 0x00004000 + + #define BA_AVIO_BCM_FLUSH_Q15 0x014D + #define B16AVIO_BCM_FLUSH_Q15 0x014C + #define LSb32AVIO_BCM_FLUSH_Q15 15 + #define LSb16AVIO_BCM_FLUSH_Q15 15 + #define bAVIO_BCM_FLUSH_Q15 1 + #define MSK32AVIO_BCM_FLUSH_Q15 0x00008000 + + #define BA_AVIO_BCM_FLUSH_Q16 0x014E + #define B16AVIO_BCM_FLUSH_Q16 0x014E + #define LSb32AVIO_BCM_FLUSH_Q16 16 + #define LSb16AVIO_BCM_FLUSH_Q16 0 + #define bAVIO_BCM_FLUSH_Q16 1 + #define MSK32AVIO_BCM_FLUSH_Q16 0x00010000 + + #define BA_AVIO_BCM_FLUSH_Q17 0x014E + #define B16AVIO_BCM_FLUSH_Q17 0x014E + #define LSb32AVIO_BCM_FLUSH_Q17 17 + #define LSb16AVIO_BCM_FLUSH_Q17 1 + #define bAVIO_BCM_FLUSH_Q17 1 + #define MSK32AVIO_BCM_FLUSH_Q17 0x00020000 + + #define BA_AVIO_BCM_FLUSH_Q18 0x014E + #define B16AVIO_BCM_FLUSH_Q18 0x014E + #define LSb32AVIO_BCM_FLUSH_Q18 18 + #define LSb16AVIO_BCM_FLUSH_Q18 2 + #define bAVIO_BCM_FLUSH_Q18 1 + #define MSK32AVIO_BCM_FLUSH_Q18 0x00040000 + + #define BA_AVIO_BCM_FLUSH_Q31 0x014E + #define B16AVIO_BCM_FLUSH_Q31 0x014E + #define LSb32AVIO_BCM_FLUSH_Q31 19 + #define LSb16AVIO_BCM_FLUSH_Q31 3 + #define bAVIO_BCM_FLUSH_Q31 1 + #define MSK32AVIO_BCM_FLUSH_Q31 0x00080000 + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_AUTOPUSH_CNT 0x0150 + + #define BA_AVIO_BCM_AUTOPUSH_CNT_OCCURENCE 0x0150 + #define B16AVIO_BCM_AUTOPUSH_CNT_OCCURENCE 0x0150 + #define LSb32AVIO_BCM_AUTOPUSH_CNT_OCCURENCE 0 + #define LSb16AVIO_BCM_AUTOPUSH_CNT_OCCURENCE 0 + #define bAVIO_BCM_AUTOPUSH_CNT_OCCURENCE 32 + #define MSK32AVIO_BCM_AUTOPUSH_CNT_OCCURENCE 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q0 0x0154 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q1 0x0158 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q2 0x015C + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q3 0x0160 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q4 0x0164 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q5 0x0168 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q6 0x016C + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q7 0x0170 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q8 0x0174 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q9 0x0178 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q10 0x017C + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q11 0x0180 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q14 0x0184 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q15 0x0188 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q16 0x018C + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q17 0x0190 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q18 0x0194 + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_AUTOPUSH 0x0198 + + #define BA_AVIO_BCM_AUTOPUSH_Q0 0x0198 + #define B16AVIO_BCM_AUTOPUSH_Q0 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q0 0 + #define LSb16AVIO_BCM_AUTOPUSH_Q0 0 + #define bAVIO_BCM_AUTOPUSH_Q0 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q0 0x00000001 + + #define BA_AVIO_BCM_AUTOPUSH_Q1 0x0198 + #define B16AVIO_BCM_AUTOPUSH_Q1 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q1 1 + #define LSb16AVIO_BCM_AUTOPUSH_Q1 1 + #define bAVIO_BCM_AUTOPUSH_Q1 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q1 0x00000002 + + #define BA_AVIO_BCM_AUTOPUSH_Q2 0x0198 + #define B16AVIO_BCM_AUTOPUSH_Q2 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q2 2 + #define LSb16AVIO_BCM_AUTOPUSH_Q2 2 + #define bAVIO_BCM_AUTOPUSH_Q2 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q2 0x00000004 + + #define BA_AVIO_BCM_AUTOPUSH_Q3 0x0198 + #define B16AVIO_BCM_AUTOPUSH_Q3 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q3 3 + #define LSb16AVIO_BCM_AUTOPUSH_Q3 3 + #define bAVIO_BCM_AUTOPUSH_Q3 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q3 0x00000008 + + #define BA_AVIO_BCM_AUTOPUSH_Q4 0x0198 + #define B16AVIO_BCM_AUTOPUSH_Q4 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q4 4 + #define LSb16AVIO_BCM_AUTOPUSH_Q4 4 + #define bAVIO_BCM_AUTOPUSH_Q4 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q4 0x00000010 + + #define BA_AVIO_BCM_AUTOPUSH_Q5 0x0198 + #define B16AVIO_BCM_AUTOPUSH_Q5 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q5 5 + #define LSb16AVIO_BCM_AUTOPUSH_Q5 5 + #define bAVIO_BCM_AUTOPUSH_Q5 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q5 0x00000020 + + #define BA_AVIO_BCM_AUTOPUSH_Q6 0x0198 + #define B16AVIO_BCM_AUTOPUSH_Q6 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q6 6 + #define LSb16AVIO_BCM_AUTOPUSH_Q6 6 + #define bAVIO_BCM_AUTOPUSH_Q6 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q6 0x00000040 + + #define BA_AVIO_BCM_AUTOPUSH_Q7 0x0198 + #define B16AVIO_BCM_AUTOPUSH_Q7 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q7 7 + #define LSb16AVIO_BCM_AUTOPUSH_Q7 7 + #define bAVIO_BCM_AUTOPUSH_Q7 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q7 0x00000080 + + #define BA_AVIO_BCM_AUTOPUSH_Q8 0x0199 + #define B16AVIO_BCM_AUTOPUSH_Q8 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q8 8 + #define LSb16AVIO_BCM_AUTOPUSH_Q8 8 + #define bAVIO_BCM_AUTOPUSH_Q8 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q8 0x00000100 + + #define BA_AVIO_BCM_AUTOPUSH_Q9 0x0199 + #define B16AVIO_BCM_AUTOPUSH_Q9 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q9 9 + #define LSb16AVIO_BCM_AUTOPUSH_Q9 9 + #define bAVIO_BCM_AUTOPUSH_Q9 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q9 0x00000200 + + #define BA_AVIO_BCM_AUTOPUSH_Q10 0x0199 + #define B16AVIO_BCM_AUTOPUSH_Q10 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q10 10 + #define LSb16AVIO_BCM_AUTOPUSH_Q10 10 + #define bAVIO_BCM_AUTOPUSH_Q10 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q10 0x00000400 + + #define BA_AVIO_BCM_AUTOPUSH_Q11 0x0199 + #define B16AVIO_BCM_AUTOPUSH_Q11 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q11 11 + #define LSb16AVIO_BCM_AUTOPUSH_Q11 11 + #define bAVIO_BCM_AUTOPUSH_Q11 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q11 0x00000800 + + #define BA_AVIO_BCM_AUTOPUSH_Q12 0x0199 + #define B16AVIO_BCM_AUTOPUSH_Q12 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q12 12 + #define LSb16AVIO_BCM_AUTOPUSH_Q12 12 + #define bAVIO_BCM_AUTOPUSH_Q12 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q12 0x00001000 + + #define BA_AVIO_BCM_AUTOPUSH_Q13 0x0199 + #define B16AVIO_BCM_AUTOPUSH_Q13 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q13 13 + #define LSb16AVIO_BCM_AUTOPUSH_Q13 13 + #define bAVIO_BCM_AUTOPUSH_Q13 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q13 0x00002000 + + #define BA_AVIO_BCM_AUTOPUSH_Q14 0x0199 + #define B16AVIO_BCM_AUTOPUSH_Q14 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q14 14 + #define LSb16AVIO_BCM_AUTOPUSH_Q14 14 + #define bAVIO_BCM_AUTOPUSH_Q14 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q14 0x00004000 + + #define BA_AVIO_BCM_AUTOPUSH_Q15 0x0199 + #define B16AVIO_BCM_AUTOPUSH_Q15 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q15 15 + #define LSb16AVIO_BCM_AUTOPUSH_Q15 15 + #define bAVIO_BCM_AUTOPUSH_Q15 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q15 0x00008000 + + #define BA_AVIO_BCM_AUTOPUSH_Q16 0x019A + #define B16AVIO_BCM_AUTOPUSH_Q16 0x019A + #define LSb32AVIO_BCM_AUTOPUSH_Q16 16 + #define LSb16AVIO_BCM_AUTOPUSH_Q16 0 + #define bAVIO_BCM_AUTOPUSH_Q16 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q16 0x00010000 + + #define BA_AVIO_BCM_AUTOPUSH_Q17 0x019A + #define B16AVIO_BCM_AUTOPUSH_Q17 0x019A + #define LSb32AVIO_BCM_AUTOPUSH_Q17 17 + #define LSb16AVIO_BCM_AUTOPUSH_Q17 1 + #define bAVIO_BCM_AUTOPUSH_Q17 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q17 0x00020000 + + #define BA_AVIO_BCM_AUTOPUSH_Q18 0x019A + #define B16AVIO_BCM_AUTOPUSH_Q18 0x019A + #define LSb32AVIO_BCM_AUTOPUSH_Q18 18 + #define LSb16AVIO_BCM_AUTOPUSH_Q18 2 + #define bAVIO_BCM_AUTOPUSH_Q18 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q18 0x00040000 + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_FULL_STS_STICKY 0x019C + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q0 0x019C + #define B16AVIO_BCM_FULL_STS_STICKY_Q0 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q0 0 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q0 0 + #define bAVIO_BCM_FULL_STS_STICKY_Q0 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q0 0x00000001 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q1 0x019C + #define B16AVIO_BCM_FULL_STS_STICKY_Q1 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q1 1 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q1 1 + #define bAVIO_BCM_FULL_STS_STICKY_Q1 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q1 0x00000002 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q2 0x019C + #define B16AVIO_BCM_FULL_STS_STICKY_Q2 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q2 2 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q2 2 + #define bAVIO_BCM_FULL_STS_STICKY_Q2 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q2 0x00000004 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q3 0x019C + #define B16AVIO_BCM_FULL_STS_STICKY_Q3 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q3 3 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q3 3 + #define bAVIO_BCM_FULL_STS_STICKY_Q3 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q3 0x00000008 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q4 0x019C + #define B16AVIO_BCM_FULL_STS_STICKY_Q4 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q4 4 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q4 4 + #define bAVIO_BCM_FULL_STS_STICKY_Q4 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q4 0x00000010 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q5 0x019C + #define B16AVIO_BCM_FULL_STS_STICKY_Q5 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q5 5 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q5 5 + #define bAVIO_BCM_FULL_STS_STICKY_Q5 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q5 0x00000020 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q6 0x019C + #define B16AVIO_BCM_FULL_STS_STICKY_Q6 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q6 6 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q6 6 + #define bAVIO_BCM_FULL_STS_STICKY_Q6 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q6 0x00000040 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q7 0x019C + #define B16AVIO_BCM_FULL_STS_STICKY_Q7 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q7 7 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q7 7 + #define bAVIO_BCM_FULL_STS_STICKY_Q7 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q7 0x00000080 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q8 0x019D + #define B16AVIO_BCM_FULL_STS_STICKY_Q8 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q8 8 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q8 8 + #define bAVIO_BCM_FULL_STS_STICKY_Q8 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q8 0x00000100 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q9 0x019D + #define B16AVIO_BCM_FULL_STS_STICKY_Q9 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q9 9 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q9 9 + #define bAVIO_BCM_FULL_STS_STICKY_Q9 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q9 0x00000200 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q10 0x019D + #define B16AVIO_BCM_FULL_STS_STICKY_Q10 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q10 10 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q10 10 + #define bAVIO_BCM_FULL_STS_STICKY_Q10 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q10 0x00000400 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q11 0x019D + #define B16AVIO_BCM_FULL_STS_STICKY_Q11 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q11 11 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q11 11 + #define bAVIO_BCM_FULL_STS_STICKY_Q11 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q11 0x00000800 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q12 0x019D + #define B16AVIO_BCM_FULL_STS_STICKY_Q12 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q12 12 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q12 12 + #define bAVIO_BCM_FULL_STS_STICKY_Q12 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q12 0x00001000 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q13 0x019D + #define B16AVIO_BCM_FULL_STS_STICKY_Q13 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q13 13 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q13 13 + #define bAVIO_BCM_FULL_STS_STICKY_Q13 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q13 0x00002000 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q14 0x019D + #define B16AVIO_BCM_FULL_STS_STICKY_Q14 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q14 14 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q14 14 + #define bAVIO_BCM_FULL_STS_STICKY_Q14 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q14 0x00004000 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q15 0x019D + #define B16AVIO_BCM_FULL_STS_STICKY_Q15 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q15 15 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q15 15 + #define bAVIO_BCM_FULL_STS_STICKY_Q15 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q15 0x00008000 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q16 0x019E + #define B16AVIO_BCM_FULL_STS_STICKY_Q16 0x019E + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q16 16 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q16 0 + #define bAVIO_BCM_FULL_STS_STICKY_Q16 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q16 0x00010000 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q17 0x019E + #define B16AVIO_BCM_FULL_STS_STICKY_Q17 0x019E + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q17 17 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q17 1 + #define bAVIO_BCM_FULL_STS_STICKY_Q17 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q17 0x00020000 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q18 0x019E + #define B16AVIO_BCM_FULL_STS_STICKY_Q18 0x019E + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q18 18 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q18 2 + #define bAVIO_BCM_FULL_STS_STICKY_Q18 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q18 0x00040000 + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_ERROR 0x01A0 + + #define BA_AVIO_BCM_ERROR_err 0x01A0 + #define B16AVIO_BCM_ERROR_err 0x01A0 + #define LSb32AVIO_BCM_ERROR_err 0 + #define LSb16AVIO_BCM_ERROR_err 0 + #define bAVIO_BCM_ERROR_err 1 + #define MSK32AVIO_BCM_ERROR_err 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_LOG_ADDR 0x01A4 + + #define BA_AVIO_BCM_LOG_ADDR_addr 0x01A4 + #define B16AVIO_BCM_LOG_ADDR_addr 0x01A4 + #define LSb32AVIO_BCM_LOG_ADDR_addr 0 + #define LSb16AVIO_BCM_LOG_ADDR_addr 0 + #define bAVIO_BCM_LOG_ADDR_addr 32 + #define MSK32AVIO_BCM_LOG_ADDR_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_ERROR_DATA 0x01A8 + + #define BA_AVIO_BCM_ERROR_DATA_data 0x01A8 + #define B16AVIO_BCM_ERROR_DATA_data 0x01A8 + #define LSb32AVIO_BCM_ERROR_DATA_data 0 + #define LSb16AVIO_BCM_ERROR_DATA_data 0 + #define bAVIO_BCM_ERROR_DATA_data 32 + #define MSK32AVIO_BCM_ERROR_DATA_data 0xFFFFFFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_AVIO { + /////////////////////////////////////////////////////////// + SIE_AVIO_REG ie_cfgReg; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q0_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q0_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q0_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q0_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q0 {\ + UNSG32 uBCM_Q0_mux : 5;\ + UNSG32 RSVDx100_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q0; + struct w32AVIO_BCM_Q0; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q1_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q1_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q1_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q1_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q1 {\ + UNSG32 uBCM_Q1_mux : 5;\ + UNSG32 RSVDx104_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q1; + struct w32AVIO_BCM_Q1; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q2_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q2_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q2_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q2_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q2 {\ + UNSG32 uBCM_Q2_mux : 5;\ + UNSG32 RSVDx108_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q2; + struct w32AVIO_BCM_Q2; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q3_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q3_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q3_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q3_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q3 {\ + UNSG32 uBCM_Q3_mux : 5;\ + UNSG32 RSVDx10C_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q3; + struct w32AVIO_BCM_Q3; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q4_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q4_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q4_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q4_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q4 {\ + UNSG32 uBCM_Q4_mux : 5;\ + UNSG32 RSVDx110_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q4; + struct w32AVIO_BCM_Q4; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q5_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q5_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q5_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q5_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q5 {\ + UNSG32 uBCM_Q5_mux : 5;\ + UNSG32 RSVDx114_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q5; + struct w32AVIO_BCM_Q5; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q6_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q6_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q6_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q6_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q6 {\ + UNSG32 uBCM_Q6_mux : 5;\ + UNSG32 RSVDx118_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q6; + struct w32AVIO_BCM_Q6; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q7_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q7_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q7_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q7_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q7 {\ + UNSG32 uBCM_Q7_mux : 5;\ + UNSG32 RSVDx11C_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q7; + struct w32AVIO_BCM_Q7; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q8_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q8_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q8_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q8_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q8 {\ + UNSG32 uBCM_Q8_mux : 5;\ + UNSG32 RSVDx120_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q8; + struct w32AVIO_BCM_Q8; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q9_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q9_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q9_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q9_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q9 {\ + UNSG32 uBCM_Q9_mux : 5;\ + UNSG32 RSVDx124_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q9; + struct w32AVIO_BCM_Q9; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q10_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q10_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q10_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q10_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q10 {\ + UNSG32 uBCM_Q10_mux : 5;\ + UNSG32 RSVDx128_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q10; + struct w32AVIO_BCM_Q10; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q11_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q11_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q11_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q11_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q11 {\ + UNSG32 uBCM_Q11_mux : 5;\ + UNSG32 RSVDx12C_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q11; + struct w32AVIO_BCM_Q11; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q14_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q14_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q14_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q14_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q14 {\ + UNSG32 uBCM_Q14_mux : 5;\ + UNSG32 RSVDx130_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q14; + struct w32AVIO_BCM_Q14; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q15_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q15_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q15_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q15_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q15 {\ + UNSG32 uBCM_Q15_mux : 5;\ + UNSG32 RSVDx134_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q15; + struct w32AVIO_BCM_Q15; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q16_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q16_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q16_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q16_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q16 {\ + UNSG32 uBCM_Q16_mux : 5;\ + UNSG32 RSVDx138_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q16; + struct w32AVIO_BCM_Q16; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q17_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q17_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q17_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q17_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q17 {\ + UNSG32 uBCM_Q17_mux : 5;\ + UNSG32 RSVDx13C_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q17; + struct w32AVIO_BCM_Q17; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q18_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q18_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q18_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q18_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q18 {\ + UNSG32 uBCM_Q18_mux : 5;\ + UNSG32 RSVDx140_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q18; + struct w32AVIO_BCM_Q18; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_FULL_STS_Q0(r32) _BFGET_(r32, 0, 0) + #define SET32AVIO_BCM_FULL_STS_Q0(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16AVIO_BCM_FULL_STS_Q0(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_FULL_STS_Q0(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_FULL_STS_Q1(r32) _BFGET_(r32, 1, 1) + #define SET32AVIO_BCM_FULL_STS_Q1(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16AVIO_BCM_FULL_STS_Q1(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_FULL_STS_Q1(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_FULL_STS_Q2(r32) _BFGET_(r32, 2, 2) + #define SET32AVIO_BCM_FULL_STS_Q2(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16AVIO_BCM_FULL_STS_Q2(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_FULL_STS_Q2(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32AVIO_BCM_FULL_STS_Q3(r32) _BFGET_(r32, 3, 3) + #define SET32AVIO_BCM_FULL_STS_Q3(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16AVIO_BCM_FULL_STS_Q3(r16) _BFGET_(r16, 3, 3) + #define SET16AVIO_BCM_FULL_STS_Q3(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32AVIO_BCM_FULL_STS_Q4(r32) _BFGET_(r32, 4, 4) + #define SET32AVIO_BCM_FULL_STS_Q4(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16AVIO_BCM_FULL_STS_Q4(r16) _BFGET_(r16, 4, 4) + #define SET16AVIO_BCM_FULL_STS_Q4(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32AVIO_BCM_FULL_STS_Q5(r32) _BFGET_(r32, 5, 5) + #define SET32AVIO_BCM_FULL_STS_Q5(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16AVIO_BCM_FULL_STS_Q5(r16) _BFGET_(r16, 5, 5) + #define SET16AVIO_BCM_FULL_STS_Q5(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32AVIO_BCM_FULL_STS_Q6(r32) _BFGET_(r32, 6, 6) + #define SET32AVIO_BCM_FULL_STS_Q6(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16AVIO_BCM_FULL_STS_Q6(r16) _BFGET_(r16, 6, 6) + #define SET16AVIO_BCM_FULL_STS_Q6(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32AVIO_BCM_FULL_STS_Q7(r32) _BFGET_(r32, 7, 7) + #define SET32AVIO_BCM_FULL_STS_Q7(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16AVIO_BCM_FULL_STS_Q7(r16) _BFGET_(r16, 7, 7) + #define SET16AVIO_BCM_FULL_STS_Q7(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32AVIO_BCM_FULL_STS_Q8(r32) _BFGET_(r32, 8, 8) + #define SET32AVIO_BCM_FULL_STS_Q8(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16AVIO_BCM_FULL_STS_Q8(r16) _BFGET_(r16, 8, 8) + #define SET16AVIO_BCM_FULL_STS_Q8(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32AVIO_BCM_FULL_STS_Q9(r32) _BFGET_(r32, 9, 9) + #define SET32AVIO_BCM_FULL_STS_Q9(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16AVIO_BCM_FULL_STS_Q9(r16) _BFGET_(r16, 9, 9) + #define SET16AVIO_BCM_FULL_STS_Q9(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32AVIO_BCM_FULL_STS_Q10(r32) _BFGET_(r32,10,10) + #define SET32AVIO_BCM_FULL_STS_Q10(r32,v) _BFSET_(r32,10,10,v) + #define GET16AVIO_BCM_FULL_STS_Q10(r16) _BFGET_(r16,10,10) + #define SET16AVIO_BCM_FULL_STS_Q10(r16,v) _BFSET_(r16,10,10,v) + + #define GET32AVIO_BCM_FULL_STS_Q11(r32) _BFGET_(r32,11,11) + #define SET32AVIO_BCM_FULL_STS_Q11(r32,v) _BFSET_(r32,11,11,v) + #define GET16AVIO_BCM_FULL_STS_Q11(r16) _BFGET_(r16,11,11) + #define SET16AVIO_BCM_FULL_STS_Q11(r16,v) _BFSET_(r16,11,11,v) + + #define GET32AVIO_BCM_FULL_STS_Q12(r32) _BFGET_(r32,12,12) + #define SET32AVIO_BCM_FULL_STS_Q12(r32,v) _BFSET_(r32,12,12,v) + #define GET16AVIO_BCM_FULL_STS_Q12(r16) _BFGET_(r16,12,12) + #define SET16AVIO_BCM_FULL_STS_Q12(r16,v) _BFSET_(r16,12,12,v) + + #define GET32AVIO_BCM_FULL_STS_Q13(r32) _BFGET_(r32,13,13) + #define SET32AVIO_BCM_FULL_STS_Q13(r32,v) _BFSET_(r32,13,13,v) + #define GET16AVIO_BCM_FULL_STS_Q13(r16) _BFGET_(r16,13,13) + #define SET16AVIO_BCM_FULL_STS_Q13(r16,v) _BFSET_(r16,13,13,v) + + #define GET32AVIO_BCM_FULL_STS_Q14(r32) _BFGET_(r32,14,14) + #define SET32AVIO_BCM_FULL_STS_Q14(r32,v) _BFSET_(r32,14,14,v) + #define GET16AVIO_BCM_FULL_STS_Q14(r16) _BFGET_(r16,14,14) + #define SET16AVIO_BCM_FULL_STS_Q14(r16,v) _BFSET_(r16,14,14,v) + + #define GET32AVIO_BCM_FULL_STS_Q15(r32) _BFGET_(r32,15,15) + #define SET32AVIO_BCM_FULL_STS_Q15(r32,v) _BFSET_(r32,15,15,v) + #define GET16AVIO_BCM_FULL_STS_Q15(r16) _BFGET_(r16,15,15) + #define SET16AVIO_BCM_FULL_STS_Q15(r16,v) _BFSET_(r16,15,15,v) + + #define GET32AVIO_BCM_FULL_STS_Q16(r32) _BFGET_(r32,16,16) + #define SET32AVIO_BCM_FULL_STS_Q16(r32,v) _BFSET_(r32,16,16,v) + #define GET16AVIO_BCM_FULL_STS_Q16(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_FULL_STS_Q16(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_FULL_STS_Q17(r32) _BFGET_(r32,17,17) + #define SET32AVIO_BCM_FULL_STS_Q17(r32,v) _BFSET_(r32,17,17,v) + #define GET16AVIO_BCM_FULL_STS_Q17(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_FULL_STS_Q17(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_FULL_STS_Q18(r32) _BFGET_(r32,18,18) + #define SET32AVIO_BCM_FULL_STS_Q18(r32,v) _BFSET_(r32,18,18,v) + #define GET16AVIO_BCM_FULL_STS_Q18(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_FULL_STS_Q18(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32AVIO_BCM_FULL_STS_Q31(r32) _BFGET_(r32,19,19) + #define SET32AVIO_BCM_FULL_STS_Q31(r32,v) _BFSET_(r32,19,19,v) + #define GET16AVIO_BCM_FULL_STS_Q31(r16) _BFGET_(r16, 3, 3) + #define SET16AVIO_BCM_FULL_STS_Q31(r16,v) _BFSET_(r16, 3, 3,v) + + #define w32AVIO_BCM_FULL_STS {\ + UNSG32 uBCM_FULL_STS_Q0 : 1;\ + UNSG32 uBCM_FULL_STS_Q1 : 1;\ + UNSG32 uBCM_FULL_STS_Q2 : 1;\ + UNSG32 uBCM_FULL_STS_Q3 : 1;\ + UNSG32 uBCM_FULL_STS_Q4 : 1;\ + UNSG32 uBCM_FULL_STS_Q5 : 1;\ + UNSG32 uBCM_FULL_STS_Q6 : 1;\ + UNSG32 uBCM_FULL_STS_Q7 : 1;\ + UNSG32 uBCM_FULL_STS_Q8 : 1;\ + UNSG32 uBCM_FULL_STS_Q9 : 1;\ + UNSG32 uBCM_FULL_STS_Q10 : 1;\ + UNSG32 uBCM_FULL_STS_Q11 : 1;\ + UNSG32 uBCM_FULL_STS_Q12 : 1;\ + UNSG32 uBCM_FULL_STS_Q13 : 1;\ + UNSG32 uBCM_FULL_STS_Q14 : 1;\ + UNSG32 uBCM_FULL_STS_Q15 : 1;\ + UNSG32 uBCM_FULL_STS_Q16 : 1;\ + UNSG32 uBCM_FULL_STS_Q17 : 1;\ + UNSG32 uBCM_FULL_STS_Q18 : 1;\ + UNSG32 uBCM_FULL_STS_Q31 : 1;\ + UNSG32 RSVDx144_b20 : 12;\ + } + union { UNSG32 u32AVIO_BCM_FULL_STS; + struct w32AVIO_BCM_FULL_STS; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_EMP_STS_Q0(r32) _BFGET_(r32, 0, 0) + #define SET32AVIO_BCM_EMP_STS_Q0(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16AVIO_BCM_EMP_STS_Q0(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_EMP_STS_Q0(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_EMP_STS_Q1(r32) _BFGET_(r32, 1, 1) + #define SET32AVIO_BCM_EMP_STS_Q1(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16AVIO_BCM_EMP_STS_Q1(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_EMP_STS_Q1(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_EMP_STS_Q2(r32) _BFGET_(r32, 2, 2) + #define SET32AVIO_BCM_EMP_STS_Q2(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16AVIO_BCM_EMP_STS_Q2(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_EMP_STS_Q2(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32AVIO_BCM_EMP_STS_Q3(r32) _BFGET_(r32, 3, 3) + #define SET32AVIO_BCM_EMP_STS_Q3(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16AVIO_BCM_EMP_STS_Q3(r16) _BFGET_(r16, 3, 3) + #define SET16AVIO_BCM_EMP_STS_Q3(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32AVIO_BCM_EMP_STS_Q4(r32) _BFGET_(r32, 4, 4) + #define SET32AVIO_BCM_EMP_STS_Q4(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16AVIO_BCM_EMP_STS_Q4(r16) _BFGET_(r16, 4, 4) + #define SET16AVIO_BCM_EMP_STS_Q4(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32AVIO_BCM_EMP_STS_Q5(r32) _BFGET_(r32, 5, 5) + #define SET32AVIO_BCM_EMP_STS_Q5(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16AVIO_BCM_EMP_STS_Q5(r16) _BFGET_(r16, 5, 5) + #define SET16AVIO_BCM_EMP_STS_Q5(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32AVIO_BCM_EMP_STS_Q6(r32) _BFGET_(r32, 6, 6) + #define SET32AVIO_BCM_EMP_STS_Q6(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16AVIO_BCM_EMP_STS_Q6(r16) _BFGET_(r16, 6, 6) + #define SET16AVIO_BCM_EMP_STS_Q6(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32AVIO_BCM_EMP_STS_Q7(r32) _BFGET_(r32, 7, 7) + #define SET32AVIO_BCM_EMP_STS_Q7(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16AVIO_BCM_EMP_STS_Q7(r16) _BFGET_(r16, 7, 7) + #define SET16AVIO_BCM_EMP_STS_Q7(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32AVIO_BCM_EMP_STS_Q8(r32) _BFGET_(r32, 8, 8) + #define SET32AVIO_BCM_EMP_STS_Q8(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16AVIO_BCM_EMP_STS_Q8(r16) _BFGET_(r16, 8, 8) + #define SET16AVIO_BCM_EMP_STS_Q8(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32AVIO_BCM_EMP_STS_Q9(r32) _BFGET_(r32, 9, 9) + #define SET32AVIO_BCM_EMP_STS_Q9(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16AVIO_BCM_EMP_STS_Q9(r16) _BFGET_(r16, 9, 9) + #define SET16AVIO_BCM_EMP_STS_Q9(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32AVIO_BCM_EMP_STS_Q10(r32) _BFGET_(r32,10,10) + #define SET32AVIO_BCM_EMP_STS_Q10(r32,v) _BFSET_(r32,10,10,v) + #define GET16AVIO_BCM_EMP_STS_Q10(r16) _BFGET_(r16,10,10) + #define SET16AVIO_BCM_EMP_STS_Q10(r16,v) _BFSET_(r16,10,10,v) + + #define GET32AVIO_BCM_EMP_STS_Q11(r32) _BFGET_(r32,11,11) + #define SET32AVIO_BCM_EMP_STS_Q11(r32,v) _BFSET_(r32,11,11,v) + #define GET16AVIO_BCM_EMP_STS_Q11(r16) _BFGET_(r16,11,11) + #define SET16AVIO_BCM_EMP_STS_Q11(r16,v) _BFSET_(r16,11,11,v) + + #define GET32AVIO_BCM_EMP_STS_Q12(r32) _BFGET_(r32,12,12) + #define SET32AVIO_BCM_EMP_STS_Q12(r32,v) _BFSET_(r32,12,12,v) + #define GET16AVIO_BCM_EMP_STS_Q12(r16) _BFGET_(r16,12,12) + #define SET16AVIO_BCM_EMP_STS_Q12(r16,v) _BFSET_(r16,12,12,v) + + #define GET32AVIO_BCM_EMP_STS_Q13(r32) _BFGET_(r32,13,13) + #define SET32AVIO_BCM_EMP_STS_Q13(r32,v) _BFSET_(r32,13,13,v) + #define GET16AVIO_BCM_EMP_STS_Q13(r16) _BFGET_(r16,13,13) + #define SET16AVIO_BCM_EMP_STS_Q13(r16,v) _BFSET_(r16,13,13,v) + + #define GET32AVIO_BCM_EMP_STS_Q14(r32) _BFGET_(r32,14,14) + #define SET32AVIO_BCM_EMP_STS_Q14(r32,v) _BFSET_(r32,14,14,v) + #define GET16AVIO_BCM_EMP_STS_Q14(r16) _BFGET_(r16,14,14) + #define SET16AVIO_BCM_EMP_STS_Q14(r16,v) _BFSET_(r16,14,14,v) + + #define GET32AVIO_BCM_EMP_STS_Q15(r32) _BFGET_(r32,15,15) + #define SET32AVIO_BCM_EMP_STS_Q15(r32,v) _BFSET_(r32,15,15,v) + #define GET16AVIO_BCM_EMP_STS_Q15(r16) _BFGET_(r16,15,15) + #define SET16AVIO_BCM_EMP_STS_Q15(r16,v) _BFSET_(r16,15,15,v) + + #define GET32AVIO_BCM_EMP_STS_Q16(r32) _BFGET_(r32,16,16) + #define SET32AVIO_BCM_EMP_STS_Q16(r32,v) _BFSET_(r32,16,16,v) + #define GET16AVIO_BCM_EMP_STS_Q16(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_EMP_STS_Q16(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_EMP_STS_Q17(r32) _BFGET_(r32,17,17) + #define SET32AVIO_BCM_EMP_STS_Q17(r32,v) _BFSET_(r32,17,17,v) + #define GET16AVIO_BCM_EMP_STS_Q17(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_EMP_STS_Q17(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_EMP_STS_Q18(r32) _BFGET_(r32,18,18) + #define SET32AVIO_BCM_EMP_STS_Q18(r32,v) _BFSET_(r32,18,18,v) + #define GET16AVIO_BCM_EMP_STS_Q18(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_EMP_STS_Q18(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32AVIO_BCM_EMP_STS_Q31(r32) _BFGET_(r32,19,19) + #define SET32AVIO_BCM_EMP_STS_Q31(r32,v) _BFSET_(r32,19,19,v) + #define GET16AVIO_BCM_EMP_STS_Q31(r16) _BFGET_(r16, 3, 3) + #define SET16AVIO_BCM_EMP_STS_Q31(r16,v) _BFSET_(r16, 3, 3,v) + + #define w32AVIO_BCM_EMP_STS {\ + UNSG32 uBCM_EMP_STS_Q0 : 1;\ + UNSG32 uBCM_EMP_STS_Q1 : 1;\ + UNSG32 uBCM_EMP_STS_Q2 : 1;\ + UNSG32 uBCM_EMP_STS_Q3 : 1;\ + UNSG32 uBCM_EMP_STS_Q4 : 1;\ + UNSG32 uBCM_EMP_STS_Q5 : 1;\ + UNSG32 uBCM_EMP_STS_Q6 : 1;\ + UNSG32 uBCM_EMP_STS_Q7 : 1;\ + UNSG32 uBCM_EMP_STS_Q8 : 1;\ + UNSG32 uBCM_EMP_STS_Q9 : 1;\ + UNSG32 uBCM_EMP_STS_Q10 : 1;\ + UNSG32 uBCM_EMP_STS_Q11 : 1;\ + UNSG32 uBCM_EMP_STS_Q12 : 1;\ + UNSG32 uBCM_EMP_STS_Q13 : 1;\ + UNSG32 uBCM_EMP_STS_Q14 : 1;\ + UNSG32 uBCM_EMP_STS_Q15 : 1;\ + UNSG32 uBCM_EMP_STS_Q16 : 1;\ + UNSG32 uBCM_EMP_STS_Q17 : 1;\ + UNSG32 uBCM_EMP_STS_Q18 : 1;\ + UNSG32 uBCM_EMP_STS_Q31 : 1;\ + UNSG32 RSVDx148_b20 : 12;\ + } + union { UNSG32 u32AVIO_BCM_EMP_STS; + struct w32AVIO_BCM_EMP_STS; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_FLUSH_Q0(r32) _BFGET_(r32, 0, 0) + #define SET32AVIO_BCM_FLUSH_Q0(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16AVIO_BCM_FLUSH_Q0(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_FLUSH_Q0(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_FLUSH_Q1(r32) _BFGET_(r32, 1, 1) + #define SET32AVIO_BCM_FLUSH_Q1(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16AVIO_BCM_FLUSH_Q1(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_FLUSH_Q1(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_FLUSH_Q2(r32) _BFGET_(r32, 2, 2) + #define SET32AVIO_BCM_FLUSH_Q2(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16AVIO_BCM_FLUSH_Q2(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_FLUSH_Q2(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32AVIO_BCM_FLUSH_Q3(r32) _BFGET_(r32, 3, 3) + #define SET32AVIO_BCM_FLUSH_Q3(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16AVIO_BCM_FLUSH_Q3(r16) _BFGET_(r16, 3, 3) + #define SET16AVIO_BCM_FLUSH_Q3(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32AVIO_BCM_FLUSH_Q4(r32) _BFGET_(r32, 4, 4) + #define SET32AVIO_BCM_FLUSH_Q4(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16AVIO_BCM_FLUSH_Q4(r16) _BFGET_(r16, 4, 4) + #define SET16AVIO_BCM_FLUSH_Q4(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32AVIO_BCM_FLUSH_Q5(r32) _BFGET_(r32, 5, 5) + #define SET32AVIO_BCM_FLUSH_Q5(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16AVIO_BCM_FLUSH_Q5(r16) _BFGET_(r16, 5, 5) + #define SET16AVIO_BCM_FLUSH_Q5(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32AVIO_BCM_FLUSH_Q6(r32) _BFGET_(r32, 6, 6) + #define SET32AVIO_BCM_FLUSH_Q6(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16AVIO_BCM_FLUSH_Q6(r16) _BFGET_(r16, 6, 6) + #define SET16AVIO_BCM_FLUSH_Q6(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32AVIO_BCM_FLUSH_Q7(r32) _BFGET_(r32, 7, 7) + #define SET32AVIO_BCM_FLUSH_Q7(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16AVIO_BCM_FLUSH_Q7(r16) _BFGET_(r16, 7, 7) + #define SET16AVIO_BCM_FLUSH_Q7(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32AVIO_BCM_FLUSH_Q8(r32) _BFGET_(r32, 8, 8) + #define SET32AVIO_BCM_FLUSH_Q8(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16AVIO_BCM_FLUSH_Q8(r16) _BFGET_(r16, 8, 8) + #define SET16AVIO_BCM_FLUSH_Q8(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32AVIO_BCM_FLUSH_Q9(r32) _BFGET_(r32, 9, 9) + #define SET32AVIO_BCM_FLUSH_Q9(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16AVIO_BCM_FLUSH_Q9(r16) _BFGET_(r16, 9, 9) + #define SET16AVIO_BCM_FLUSH_Q9(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32AVIO_BCM_FLUSH_Q10(r32) _BFGET_(r32,10,10) + #define SET32AVIO_BCM_FLUSH_Q10(r32,v) _BFSET_(r32,10,10,v) + #define GET16AVIO_BCM_FLUSH_Q10(r16) _BFGET_(r16,10,10) + #define SET16AVIO_BCM_FLUSH_Q10(r16,v) _BFSET_(r16,10,10,v) + + #define GET32AVIO_BCM_FLUSH_Q11(r32) _BFGET_(r32,11,11) + #define SET32AVIO_BCM_FLUSH_Q11(r32,v) _BFSET_(r32,11,11,v) + #define GET16AVIO_BCM_FLUSH_Q11(r16) _BFGET_(r16,11,11) + #define SET16AVIO_BCM_FLUSH_Q11(r16,v) _BFSET_(r16,11,11,v) + + #define GET32AVIO_BCM_FLUSH_Q12(r32) _BFGET_(r32,12,12) + #define SET32AVIO_BCM_FLUSH_Q12(r32,v) _BFSET_(r32,12,12,v) + #define GET16AVIO_BCM_FLUSH_Q12(r16) _BFGET_(r16,12,12) + #define SET16AVIO_BCM_FLUSH_Q12(r16,v) _BFSET_(r16,12,12,v) + + #define GET32AVIO_BCM_FLUSH_Q13(r32) _BFGET_(r32,13,13) + #define SET32AVIO_BCM_FLUSH_Q13(r32,v) _BFSET_(r32,13,13,v) + #define GET16AVIO_BCM_FLUSH_Q13(r16) _BFGET_(r16,13,13) + #define SET16AVIO_BCM_FLUSH_Q13(r16,v) _BFSET_(r16,13,13,v) + + #define GET32AVIO_BCM_FLUSH_Q14(r32) _BFGET_(r32,14,14) + #define SET32AVIO_BCM_FLUSH_Q14(r32,v) _BFSET_(r32,14,14,v) + #define GET16AVIO_BCM_FLUSH_Q14(r16) _BFGET_(r16,14,14) + #define SET16AVIO_BCM_FLUSH_Q14(r16,v) _BFSET_(r16,14,14,v) + + #define GET32AVIO_BCM_FLUSH_Q15(r32) _BFGET_(r32,15,15) + #define SET32AVIO_BCM_FLUSH_Q15(r32,v) _BFSET_(r32,15,15,v) + #define GET16AVIO_BCM_FLUSH_Q15(r16) _BFGET_(r16,15,15) + #define SET16AVIO_BCM_FLUSH_Q15(r16,v) _BFSET_(r16,15,15,v) + + #define GET32AVIO_BCM_FLUSH_Q16(r32) _BFGET_(r32,16,16) + #define SET32AVIO_BCM_FLUSH_Q16(r32,v) _BFSET_(r32,16,16,v) + #define GET16AVIO_BCM_FLUSH_Q16(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_FLUSH_Q16(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_FLUSH_Q17(r32) _BFGET_(r32,17,17) + #define SET32AVIO_BCM_FLUSH_Q17(r32,v) _BFSET_(r32,17,17,v) + #define GET16AVIO_BCM_FLUSH_Q17(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_FLUSH_Q17(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_FLUSH_Q18(r32) _BFGET_(r32,18,18) + #define SET32AVIO_BCM_FLUSH_Q18(r32,v) _BFSET_(r32,18,18,v) + #define GET16AVIO_BCM_FLUSH_Q18(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_FLUSH_Q18(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32AVIO_BCM_FLUSH_Q31(r32) _BFGET_(r32,19,19) + #define SET32AVIO_BCM_FLUSH_Q31(r32,v) _BFSET_(r32,19,19,v) + #define GET16AVIO_BCM_FLUSH_Q31(r16) _BFGET_(r16, 3, 3) + #define SET16AVIO_BCM_FLUSH_Q31(r16,v) _BFSET_(r16, 3, 3,v) + + #define w32AVIO_BCM_FLUSH {\ + UNSG32 uBCM_FLUSH_Q0 : 1;\ + UNSG32 uBCM_FLUSH_Q1 : 1;\ + UNSG32 uBCM_FLUSH_Q2 : 1;\ + UNSG32 uBCM_FLUSH_Q3 : 1;\ + UNSG32 uBCM_FLUSH_Q4 : 1;\ + UNSG32 uBCM_FLUSH_Q5 : 1;\ + UNSG32 uBCM_FLUSH_Q6 : 1;\ + UNSG32 uBCM_FLUSH_Q7 : 1;\ + UNSG32 uBCM_FLUSH_Q8 : 1;\ + UNSG32 uBCM_FLUSH_Q9 : 1;\ + UNSG32 uBCM_FLUSH_Q10 : 1;\ + UNSG32 uBCM_FLUSH_Q11 : 1;\ + UNSG32 uBCM_FLUSH_Q12 : 1;\ + UNSG32 uBCM_FLUSH_Q13 : 1;\ + UNSG32 uBCM_FLUSH_Q14 : 1;\ + UNSG32 uBCM_FLUSH_Q15 : 1;\ + UNSG32 uBCM_FLUSH_Q16 : 1;\ + UNSG32 uBCM_FLUSH_Q17 : 1;\ + UNSG32 uBCM_FLUSH_Q18 : 1;\ + UNSG32 uBCM_FLUSH_Q31 : 1;\ + UNSG32 RSVDx14C_b20 : 12;\ + } + union { UNSG32 u32AVIO_BCM_FLUSH; + struct w32AVIO_BCM_FLUSH; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_AUTOPUSH_CNT_OCCURENCE(r32) _BFGET_(r32,31, 0) + #define SET32AVIO_BCM_AUTOPUSH_CNT_OCCURENCE(r32,v) _BFSET_(r32,31, 0,v) + + #define w32AVIO_BCM_AUTOPUSH_CNT {\ + UNSG32 uBCM_AUTOPUSH_CNT_OCCURENCE : 32;\ + } + union { UNSG32 u32AVIO_BCM_AUTOPUSH_CNT; + struct w32AVIO_BCM_AUTOPUSH_CNT; + }; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q0; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q1; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q2; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q3; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q4; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q5; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q6; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q7; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q8; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q9; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q10; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q11; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q14; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q15; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q16; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q17; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q18; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_AUTOPUSH_Q0(r32) _BFGET_(r32, 0, 0) + #define SET32AVIO_BCM_AUTOPUSH_Q0(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16AVIO_BCM_AUTOPUSH_Q0(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_AUTOPUSH_Q0(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q1(r32) _BFGET_(r32, 1, 1) + #define SET32AVIO_BCM_AUTOPUSH_Q1(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16AVIO_BCM_AUTOPUSH_Q1(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_AUTOPUSH_Q1(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q2(r32) _BFGET_(r32, 2, 2) + #define SET32AVIO_BCM_AUTOPUSH_Q2(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16AVIO_BCM_AUTOPUSH_Q2(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_AUTOPUSH_Q2(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q3(r32) _BFGET_(r32, 3, 3) + #define SET32AVIO_BCM_AUTOPUSH_Q3(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16AVIO_BCM_AUTOPUSH_Q3(r16) _BFGET_(r16, 3, 3) + #define SET16AVIO_BCM_AUTOPUSH_Q3(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q4(r32) _BFGET_(r32, 4, 4) + #define SET32AVIO_BCM_AUTOPUSH_Q4(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16AVIO_BCM_AUTOPUSH_Q4(r16) _BFGET_(r16, 4, 4) + #define SET16AVIO_BCM_AUTOPUSH_Q4(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q5(r32) _BFGET_(r32, 5, 5) + #define SET32AVIO_BCM_AUTOPUSH_Q5(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16AVIO_BCM_AUTOPUSH_Q5(r16) _BFGET_(r16, 5, 5) + #define SET16AVIO_BCM_AUTOPUSH_Q5(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q6(r32) _BFGET_(r32, 6, 6) + #define SET32AVIO_BCM_AUTOPUSH_Q6(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16AVIO_BCM_AUTOPUSH_Q6(r16) _BFGET_(r16, 6, 6) + #define SET16AVIO_BCM_AUTOPUSH_Q6(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q7(r32) _BFGET_(r32, 7, 7) + #define SET32AVIO_BCM_AUTOPUSH_Q7(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16AVIO_BCM_AUTOPUSH_Q7(r16) _BFGET_(r16, 7, 7) + #define SET16AVIO_BCM_AUTOPUSH_Q7(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q8(r32) _BFGET_(r32, 8, 8) + #define SET32AVIO_BCM_AUTOPUSH_Q8(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16AVIO_BCM_AUTOPUSH_Q8(r16) _BFGET_(r16, 8, 8) + #define SET16AVIO_BCM_AUTOPUSH_Q8(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q9(r32) _BFGET_(r32, 9, 9) + #define SET32AVIO_BCM_AUTOPUSH_Q9(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16AVIO_BCM_AUTOPUSH_Q9(r16) _BFGET_(r16, 9, 9) + #define SET16AVIO_BCM_AUTOPUSH_Q9(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q10(r32) _BFGET_(r32,10,10) + #define SET32AVIO_BCM_AUTOPUSH_Q10(r32,v) _BFSET_(r32,10,10,v) + #define GET16AVIO_BCM_AUTOPUSH_Q10(r16) _BFGET_(r16,10,10) + #define SET16AVIO_BCM_AUTOPUSH_Q10(r16,v) _BFSET_(r16,10,10,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q11(r32) _BFGET_(r32,11,11) + #define SET32AVIO_BCM_AUTOPUSH_Q11(r32,v) _BFSET_(r32,11,11,v) + #define GET16AVIO_BCM_AUTOPUSH_Q11(r16) _BFGET_(r16,11,11) + #define SET16AVIO_BCM_AUTOPUSH_Q11(r16,v) _BFSET_(r16,11,11,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q12(r32) _BFGET_(r32,12,12) + #define SET32AVIO_BCM_AUTOPUSH_Q12(r32,v) _BFSET_(r32,12,12,v) + #define GET16AVIO_BCM_AUTOPUSH_Q12(r16) _BFGET_(r16,12,12) + #define SET16AVIO_BCM_AUTOPUSH_Q12(r16,v) _BFSET_(r16,12,12,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q13(r32) _BFGET_(r32,13,13) + #define SET32AVIO_BCM_AUTOPUSH_Q13(r32,v) _BFSET_(r32,13,13,v) + #define GET16AVIO_BCM_AUTOPUSH_Q13(r16) _BFGET_(r16,13,13) + #define SET16AVIO_BCM_AUTOPUSH_Q13(r16,v) _BFSET_(r16,13,13,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q14(r32) _BFGET_(r32,14,14) + #define SET32AVIO_BCM_AUTOPUSH_Q14(r32,v) _BFSET_(r32,14,14,v) + #define GET16AVIO_BCM_AUTOPUSH_Q14(r16) _BFGET_(r16,14,14) + #define SET16AVIO_BCM_AUTOPUSH_Q14(r16,v) _BFSET_(r16,14,14,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q15(r32) _BFGET_(r32,15,15) + #define SET32AVIO_BCM_AUTOPUSH_Q15(r32,v) _BFSET_(r32,15,15,v) + #define GET16AVIO_BCM_AUTOPUSH_Q15(r16) _BFGET_(r16,15,15) + #define SET16AVIO_BCM_AUTOPUSH_Q15(r16,v) _BFSET_(r16,15,15,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q16(r32) _BFGET_(r32,16,16) + #define SET32AVIO_BCM_AUTOPUSH_Q16(r32,v) _BFSET_(r32,16,16,v) + #define GET16AVIO_BCM_AUTOPUSH_Q16(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_AUTOPUSH_Q16(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q17(r32) _BFGET_(r32,17,17) + #define SET32AVIO_BCM_AUTOPUSH_Q17(r32,v) _BFSET_(r32,17,17,v) + #define GET16AVIO_BCM_AUTOPUSH_Q17(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_AUTOPUSH_Q17(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q18(r32) _BFGET_(r32,18,18) + #define SET32AVIO_BCM_AUTOPUSH_Q18(r32,v) _BFSET_(r32,18,18,v) + #define GET16AVIO_BCM_AUTOPUSH_Q18(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_AUTOPUSH_Q18(r16,v) _BFSET_(r16, 2, 2,v) + + #define w32AVIO_BCM_AUTOPUSH {\ + UNSG32 uBCM_AUTOPUSH_Q0 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q1 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q2 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q3 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q4 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q5 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q6 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q7 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q8 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q9 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q10 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q11 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q12 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q13 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q14 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q15 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q16 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q17 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q18 : 1;\ + UNSG32 RSVDx198_b19 : 13;\ + } + union { UNSG32 u32AVIO_BCM_AUTOPUSH; + struct w32AVIO_BCM_AUTOPUSH; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_FULL_STS_STICKY_Q0(r32) _BFGET_(r32, 0, 0) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q0(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q0(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q0(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q1(r32) _BFGET_(r32, 1, 1) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q1(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q1(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q1(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q2(r32) _BFGET_(r32, 2, 2) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q2(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q2(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q2(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q3(r32) _BFGET_(r32, 3, 3) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q3(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q3(r16) _BFGET_(r16, 3, 3) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q3(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q4(r32) _BFGET_(r32, 4, 4) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q4(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q4(r16) _BFGET_(r16, 4, 4) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q4(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q5(r32) _BFGET_(r32, 5, 5) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q5(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q5(r16) _BFGET_(r16, 5, 5) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q5(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q6(r32) _BFGET_(r32, 6, 6) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q6(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q6(r16) _BFGET_(r16, 6, 6) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q6(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q7(r32) _BFGET_(r32, 7, 7) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q7(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q7(r16) _BFGET_(r16, 7, 7) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q7(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q8(r32) _BFGET_(r32, 8, 8) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q8(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q8(r16) _BFGET_(r16, 8, 8) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q8(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q9(r32) _BFGET_(r32, 9, 9) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q9(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q9(r16) _BFGET_(r16, 9, 9) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q9(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q10(r32) _BFGET_(r32,10,10) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q10(r32,v) _BFSET_(r32,10,10,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q10(r16) _BFGET_(r16,10,10) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q10(r16,v) _BFSET_(r16,10,10,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q11(r32) _BFGET_(r32,11,11) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q11(r32,v) _BFSET_(r32,11,11,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q11(r16) _BFGET_(r16,11,11) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q11(r16,v) _BFSET_(r16,11,11,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q12(r32) _BFGET_(r32,12,12) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q12(r32,v) _BFSET_(r32,12,12,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q12(r16) _BFGET_(r16,12,12) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q12(r16,v) _BFSET_(r16,12,12,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q13(r32) _BFGET_(r32,13,13) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q13(r32,v) _BFSET_(r32,13,13,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q13(r16) _BFGET_(r16,13,13) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q13(r16,v) _BFSET_(r16,13,13,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q14(r32) _BFGET_(r32,14,14) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q14(r32,v) _BFSET_(r32,14,14,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q14(r16) _BFGET_(r16,14,14) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q14(r16,v) _BFSET_(r16,14,14,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q15(r32) _BFGET_(r32,15,15) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q15(r32,v) _BFSET_(r32,15,15,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q15(r16) _BFGET_(r16,15,15) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q15(r16,v) _BFSET_(r16,15,15,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q16(r32) _BFGET_(r32,16,16) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q16(r32,v) _BFSET_(r32,16,16,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q16(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q16(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q17(r32) _BFGET_(r32,17,17) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q17(r32,v) _BFSET_(r32,17,17,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q17(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q17(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q18(r32) _BFGET_(r32,18,18) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q18(r32,v) _BFSET_(r32,18,18,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q18(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q18(r16,v) _BFSET_(r16, 2, 2,v) + + #define w32AVIO_BCM_FULL_STS_STICKY {\ + UNSG32 uBCM_FULL_STS_STICKY_Q0 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q1 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q2 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q3 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q4 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q5 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q6 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q7 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q8 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q9 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q10 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q11 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q12 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q13 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q14 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q15 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q16 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q17 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q18 : 1;\ + UNSG32 RSVDx19C_b19 : 13;\ + } + union { UNSG32 u32AVIO_BCM_FULL_STS_STICKY; + struct w32AVIO_BCM_FULL_STS_STICKY; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_ERROR_err(r32) _BFGET_(r32, 0, 0) + #define SET32AVIO_BCM_ERROR_err(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16AVIO_BCM_ERROR_err(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_ERROR_err(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32AVIO_BCM_ERROR {\ + UNSG32 uBCM_ERROR_err : 1;\ + UNSG32 RSVDx1A0_b1 : 31;\ + } + union { UNSG32 u32AVIO_BCM_ERROR; + struct w32AVIO_BCM_ERROR; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_LOG_ADDR_addr(r32) _BFGET_(r32,31, 0) + #define SET32AVIO_BCM_LOG_ADDR_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32AVIO_BCM_LOG_ADDR {\ + UNSG32 uBCM_LOG_ADDR_addr : 32;\ + } + union { UNSG32 u32AVIO_BCM_LOG_ADDR; + struct w32AVIO_BCM_LOG_ADDR; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_ERROR_DATA_data(r32) _BFGET_(r32,31, 0) + #define SET32AVIO_BCM_ERROR_DATA_data(r32,v) _BFSET_(r32,31, 0,v) + + #define w32AVIO_BCM_ERROR_DATA {\ + UNSG32 uBCM_ERROR_DATA_data : 32;\ + } + union { UNSG32 u32AVIO_BCM_ERROR_DATA; + struct w32AVIO_BCM_ERROR_DATA; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx1AC [84]; + /////////////////////////////////////////////////////////// + } SIE_AVIO; + + typedef union T32AVIO_BCM_Q0 + { UNSG32 u32; + struct w32AVIO_BCM_Q0; + } T32AVIO_BCM_Q0; + typedef union T32AVIO_BCM_Q1 + { UNSG32 u32; + struct w32AVIO_BCM_Q1; + } T32AVIO_BCM_Q1; + typedef union T32AVIO_BCM_Q2 + { UNSG32 u32; + struct w32AVIO_BCM_Q2; + } T32AVIO_BCM_Q2; + typedef union T32AVIO_BCM_Q3 + { UNSG32 u32; + struct w32AVIO_BCM_Q3; + } T32AVIO_BCM_Q3; + typedef union T32AVIO_BCM_Q4 + { UNSG32 u32; + struct w32AVIO_BCM_Q4; + } T32AVIO_BCM_Q4; + typedef union T32AVIO_BCM_Q5 + { UNSG32 u32; + struct w32AVIO_BCM_Q5; + } T32AVIO_BCM_Q5; + typedef union T32AVIO_BCM_Q6 + { UNSG32 u32; + struct w32AVIO_BCM_Q6; + } T32AVIO_BCM_Q6; + typedef union T32AVIO_BCM_Q7 + { UNSG32 u32; + struct w32AVIO_BCM_Q7; + } T32AVIO_BCM_Q7; + typedef union T32AVIO_BCM_Q8 + { UNSG32 u32; + struct w32AVIO_BCM_Q8; + } T32AVIO_BCM_Q8; + typedef union T32AVIO_BCM_Q9 + { UNSG32 u32; + struct w32AVIO_BCM_Q9; + } T32AVIO_BCM_Q9; + typedef union T32AVIO_BCM_Q10 + { UNSG32 u32; + struct w32AVIO_BCM_Q10; + } T32AVIO_BCM_Q10; + typedef union T32AVIO_BCM_Q11 + { UNSG32 u32; + struct w32AVIO_BCM_Q11; + } T32AVIO_BCM_Q11; + typedef union T32AVIO_BCM_Q14 + { UNSG32 u32; + struct w32AVIO_BCM_Q14; + } T32AVIO_BCM_Q14; + typedef union T32AVIO_BCM_Q15 + { UNSG32 u32; + struct w32AVIO_BCM_Q15; + } T32AVIO_BCM_Q15; + typedef union T32AVIO_BCM_Q16 + { UNSG32 u32; + struct w32AVIO_BCM_Q16; + } T32AVIO_BCM_Q16; + typedef union T32AVIO_BCM_Q17 + { UNSG32 u32; + struct w32AVIO_BCM_Q17; + } T32AVIO_BCM_Q17; + typedef union T32AVIO_BCM_Q18 + { UNSG32 u32; + struct w32AVIO_BCM_Q18; + } T32AVIO_BCM_Q18; + typedef union T32AVIO_BCM_FULL_STS + { UNSG32 u32; + struct w32AVIO_BCM_FULL_STS; + } T32AVIO_BCM_FULL_STS; + typedef union T32AVIO_BCM_EMP_STS + { UNSG32 u32; + struct w32AVIO_BCM_EMP_STS; + } T32AVIO_BCM_EMP_STS; + typedef union T32AVIO_BCM_FLUSH + { UNSG32 u32; + struct w32AVIO_BCM_FLUSH; + } T32AVIO_BCM_FLUSH; + typedef union T32AVIO_BCM_AUTOPUSH_CNT + { UNSG32 u32; + struct w32AVIO_BCM_AUTOPUSH_CNT; + } T32AVIO_BCM_AUTOPUSH_CNT; + typedef union T32AVIO_BCM_AUTOPUSH + { UNSG32 u32; + struct w32AVIO_BCM_AUTOPUSH; + } T32AVIO_BCM_AUTOPUSH; + typedef union T32AVIO_BCM_FULL_STS_STICKY + { UNSG32 u32; + struct w32AVIO_BCM_FULL_STS_STICKY; + } T32AVIO_BCM_FULL_STS_STICKY; + typedef union T32AVIO_BCM_ERROR + { UNSG32 u32; + struct w32AVIO_BCM_ERROR; + } T32AVIO_BCM_ERROR; + typedef union T32AVIO_BCM_LOG_ADDR + { UNSG32 u32; + struct w32AVIO_BCM_LOG_ADDR; + } T32AVIO_BCM_LOG_ADDR; + typedef union T32AVIO_BCM_ERROR_DATA + { UNSG32 u32; + struct w32AVIO_BCM_ERROR_DATA; + } T32AVIO_BCM_ERROR_DATA; + /////////////////////////////////////////////////////////// + + typedef union TAVIO_BCM_Q0 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q0; + }; + } TAVIO_BCM_Q0; + typedef union TAVIO_BCM_Q1 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q1; + }; + } TAVIO_BCM_Q1; + typedef union TAVIO_BCM_Q2 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q2; + }; + } TAVIO_BCM_Q2; + typedef union TAVIO_BCM_Q3 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q3; + }; + } TAVIO_BCM_Q3; + typedef union TAVIO_BCM_Q4 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q4; + }; + } TAVIO_BCM_Q4; + typedef union TAVIO_BCM_Q5 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q5; + }; + } TAVIO_BCM_Q5; + typedef union TAVIO_BCM_Q6 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q6; + }; + } TAVIO_BCM_Q6; + typedef union TAVIO_BCM_Q7 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q7; + }; + } TAVIO_BCM_Q7; + typedef union TAVIO_BCM_Q8 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q8; + }; + } TAVIO_BCM_Q8; + typedef union TAVIO_BCM_Q9 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q9; + }; + } TAVIO_BCM_Q9; + typedef union TAVIO_BCM_Q10 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q10; + }; + } TAVIO_BCM_Q10; + typedef union TAVIO_BCM_Q11 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q11; + }; + } TAVIO_BCM_Q11; + typedef union TAVIO_BCM_Q14 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q14; + }; + } TAVIO_BCM_Q14; + typedef union TAVIO_BCM_Q15 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q15; + }; + } TAVIO_BCM_Q15; + typedef union TAVIO_BCM_Q16 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q16; + }; + } TAVIO_BCM_Q16; + typedef union TAVIO_BCM_Q17 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q17; + }; + } TAVIO_BCM_Q17; + typedef union TAVIO_BCM_Q18 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q18; + }; + } TAVIO_BCM_Q18; + typedef union TAVIO_BCM_FULL_STS + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_FULL_STS; + }; + } TAVIO_BCM_FULL_STS; + typedef union TAVIO_BCM_EMP_STS + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_EMP_STS; + }; + } TAVIO_BCM_EMP_STS; + typedef union TAVIO_BCM_FLUSH + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_FLUSH; + }; + } TAVIO_BCM_FLUSH; + typedef union TAVIO_BCM_AUTOPUSH_CNT + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_AUTOPUSH_CNT; + }; + } TAVIO_BCM_AUTOPUSH_CNT; + typedef union TAVIO_BCM_AUTOPUSH + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_AUTOPUSH; + }; + } TAVIO_BCM_AUTOPUSH; + typedef union TAVIO_BCM_FULL_STS_STICKY + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_FULL_STS_STICKY; + }; + } TAVIO_BCM_FULL_STS_STICKY; + typedef union TAVIO_BCM_ERROR + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_ERROR; + }; + } TAVIO_BCM_ERROR; + typedef union TAVIO_BCM_LOG_ADDR + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_LOG_ADDR; + }; + } TAVIO_BCM_LOG_ADDR; + typedef union TAVIO_BCM_ERROR_DATA + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_ERROR_DATA; + }; + } TAVIO_BCM_ERROR_DATA; + + /////////////////////////////////////////////////////////// + SIGN32 AVIO_drvrd(SIE_AVIO *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 AVIO_drvwr(SIE_AVIO *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void AVIO_reset(SIE_AVIO *p); + SIGN32 AVIO_cmp (SIE_AVIO *p, SIE_AVIO *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define AVIO_check(p,pie,pfx,hLOG) AVIO_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define AVIO_print(p, pfx,hLOG) AVIO_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: AVIO +//////////////////////////////////////////////////////////// + + + +#ifdef __cplusplus + } +#endif +#pragma pack() + +#endif +////// +/// ENDOFFILE: avio.h +//////////////////////////////////////////////////////////// + diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/avioDhub.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/avioDhub.h new file mode 100644 index 00000000..aeee4e9b --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/avioDhub.h @@ -0,0 +1,4979 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + +////// +/// don't edit! auto-generated by docc: avioDhub.h +//////////////////////////////////////////////////////////// +#ifndef avioDhub_h +#define avioDhub_h (){} + + +#include "ctypes.h" + +#pragma pack(1) +#ifdef __cplusplus + extern "C" { +#endif + +#ifndef _DOCC_H_BITOPS_ +#define _DOCC_H_BITOPS_ (){} + + #define _bSETMASK_(b) ((b)<32 ? (1<<((b)&31)) : 0) + #define _NSETMASK_(msb,lsb) (_bSETMASK_((msb)+1)-_bSETMASK_(lsb)) + #define _bCLRMASK_(b) (~_bSETMASK_(b)) + #define _NCLRMASK_(msb,lsb) (~_NSETMASK_(msb,lsb)) + #define _BFGET_(r,msb,lsb) (_NSETMASK_((msb)-(lsb),0)&((r)>>(lsb))) + #define _BFSET_(r,msb,lsb,v) do{ (r)&=_NCLRMASK_(msb,lsb); (r)|=_NSETMASK_(msb,lsb)&((v)<<(lsb)); }while(0) + +#endif + + + +////// +/// +/// $INTERFACE SemaINTR (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 mask (W-) +/// %unsigned 1 empty 0x0 +/// ### +/// * Enable interrupt on 'empty' condition +/// ### +/// %unsigned 1 full 0x0 +/// ### +/// * Enable interrupt on 'full' condition +/// ### +/// %unsigned 1 almostEmpty 0x0 +/// ### +/// * Enable interrupt on 'almostEmpty' condition +/// ### +/// %unsigned 1 almostFull 0x0 +/// ### +/// * Enable interrupt on 'almostFull' condition +/// ### +/// %% 28 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 4b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaINTR +#define h_SemaINTR (){} + + #define RA_SemaINTR_mask 0x0000 + + #define BA_SemaINTR_mask_empty 0x0000 + #define B16SemaINTR_mask_empty 0x0000 + #define LSb32SemaINTR_mask_empty 0 + #define LSb16SemaINTR_mask_empty 0 + #define bSemaINTR_mask_empty 1 + #define MSK32SemaINTR_mask_empty 0x00000001 + + #define BA_SemaINTR_mask_full 0x0000 + #define B16SemaINTR_mask_full 0x0000 + #define LSb32SemaINTR_mask_full 1 + #define LSb16SemaINTR_mask_full 1 + #define bSemaINTR_mask_full 1 + #define MSK32SemaINTR_mask_full 0x00000002 + + #define BA_SemaINTR_mask_almostEmpty 0x0000 + #define B16SemaINTR_mask_almostEmpty 0x0000 + #define LSb32SemaINTR_mask_almostEmpty 2 + #define LSb16SemaINTR_mask_almostEmpty 2 + #define bSemaINTR_mask_almostEmpty 1 + #define MSK32SemaINTR_mask_almostEmpty 0x00000004 + + #define BA_SemaINTR_mask_almostFull 0x0000 + #define B16SemaINTR_mask_almostFull 0x0000 + #define LSb32SemaINTR_mask_almostFull 3 + #define LSb16SemaINTR_mask_almostFull 3 + #define bSemaINTR_mask_almostFull 1 + #define MSK32SemaINTR_mask_almostFull 0x00000008 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaINTR { + /////////////////////////////////////////////////////////// + #define GET32SemaINTR_mask_empty(r32) _BFGET_(r32, 0, 0) + #define SET32SemaINTR_mask_empty(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaINTR_mask_empty(r16) _BFGET_(r16, 0, 0) + #define SET16SemaINTR_mask_empty(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaINTR_mask_full(r32) _BFGET_(r32, 1, 1) + #define SET32SemaINTR_mask_full(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaINTR_mask_full(r16) _BFGET_(r16, 1, 1) + #define SET16SemaINTR_mask_full(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaINTR_mask_almostEmpty(r32) _BFGET_(r32, 2, 2) + #define SET32SemaINTR_mask_almostEmpty(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaINTR_mask_almostEmpty(r16) _BFGET_(r16, 2, 2) + #define SET16SemaINTR_mask_almostEmpty(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaINTR_mask_almostFull(r32) _BFGET_(r32, 3, 3) + #define SET32SemaINTR_mask_almostFull(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaINTR_mask_almostFull(r16) _BFGET_(r16, 3, 3) + #define SET16SemaINTR_mask_almostFull(r16,v) _BFSET_(r16, 3, 3,v) + + #define w32SemaINTR_mask {\ + UNSG32 umask_empty : 1;\ + UNSG32 umask_full : 1;\ + UNSG32 umask_almostEmpty : 1;\ + UNSG32 umask_almostFull : 1;\ + UNSG32 RSVDx0_b4 : 28;\ + } + union { UNSG32 u32SemaINTR_mask; + struct w32SemaINTR_mask; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaINTR; + + typedef union T32SemaINTR_mask + { UNSG32 u32; + struct w32SemaINTR_mask; + } T32SemaINTR_mask; + /////////////////////////////////////////////////////////// + + typedef union TSemaINTR_mask + { UNSG32 u32[1]; + struct { + struct w32SemaINTR_mask; + }; + } TSemaINTR_mask; + + /////////////////////////////////////////////////////////// + SIGN32 SemaINTR_drvrd(SIE_SemaINTR *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaINTR_drvwr(SIE_SemaINTR *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaINTR_reset(SIE_SemaINTR *p); + SIGN32 SemaINTR_cmp (SIE_SemaINTR *p, SIE_SemaINTR *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaINTR_check(p,pie,pfx,hLOG) SemaINTR_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaINTR_print(p, pfx,hLOG) SemaINTR_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaINTR +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE Semaphore biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 16 DEPTH 0xF +/// ### +/// * Max level of semaphore +/// * Note: write this register will trigger counter reset +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00004 (P) +/// # 0x00004 INTR +/// $SemaINTR INTR REG [3] +/// ### +/// * Interrupt mask for 3 CPUs +/// ### +/// @ 0x00010 mask (W-) +/// %unsigned 1 full 0x0 +/// %unsigned 1 emp 0x0 +/// ### +/// * When full bit is set to one, to the producer, the semaphore will never be full, so that the producer will never be blocked. +/// * When emp bit is set to one, to the consumer, the semaphore will never be empty, so that the consumer will never be blocked. +/// * When the emp/full bit is set, the semaphore/FIFO pointer will be maintained, but the counter will be not correct anymore. +/// ### +/// %% 30 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 20B, bits: 30b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_Semaphore +#define h_Semaphore (){} + + #define RA_Semaphore_CFG 0x0000 + + #define BA_Semaphore_CFG_DEPTH 0x0000 + #define B16Semaphore_CFG_DEPTH 0x0000 + #define LSb32Semaphore_CFG_DEPTH 0 + #define LSb16Semaphore_CFG_DEPTH 0 + #define bSemaphore_CFG_DEPTH 16 + #define MSK32Semaphore_CFG_DEPTH 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_Semaphore_INTR 0x0004 + /////////////////////////////////////////////////////////// + #define RA_Semaphore_mask 0x0010 + + #define BA_Semaphore_mask_full 0x0010 + #define B16Semaphore_mask_full 0x0010 + #define LSb32Semaphore_mask_full 0 + #define LSb16Semaphore_mask_full 0 + #define bSemaphore_mask_full 1 + #define MSK32Semaphore_mask_full 0x00000001 + + #define BA_Semaphore_mask_emp 0x0010 + #define B16Semaphore_mask_emp 0x0010 + #define LSb32Semaphore_mask_emp 1 + #define LSb16Semaphore_mask_emp 1 + #define bSemaphore_mask_emp 1 + #define MSK32Semaphore_mask_emp 0x00000002 + /////////////////////////////////////////////////////////// + + typedef struct SIE_Semaphore { + /////////////////////////////////////////////////////////// + #define GET32Semaphore_CFG_DEPTH(r32) _BFGET_(r32,15, 0) + #define SET32Semaphore_CFG_DEPTH(r32,v) _BFSET_(r32,15, 0,v) + #define GET16Semaphore_CFG_DEPTH(r16) _BFGET_(r16,15, 0) + #define SET16Semaphore_CFG_DEPTH(r16,v) _BFSET_(r16,15, 0,v) + + #define w32Semaphore_CFG {\ + UNSG32 uCFG_DEPTH : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32Semaphore_CFG; + struct w32Semaphore_CFG; + }; + /////////////////////////////////////////////////////////// + SIE_SemaINTR ie_INTR[3]; + /////////////////////////////////////////////////////////// + #define GET32Semaphore_mask_full(r32) _BFGET_(r32, 0, 0) + #define SET32Semaphore_mask_full(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16Semaphore_mask_full(r16) _BFGET_(r16, 0, 0) + #define SET16Semaphore_mask_full(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32Semaphore_mask_emp(r32) _BFGET_(r32, 1, 1) + #define SET32Semaphore_mask_emp(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16Semaphore_mask_emp(r16) _BFGET_(r16, 1, 1) + #define SET16Semaphore_mask_emp(r16,v) _BFSET_(r16, 1, 1,v) + + #define w32Semaphore_mask {\ + UNSG32 umask_full : 1;\ + UNSG32 umask_emp : 1;\ + UNSG32 RSVDx10_b2 : 30;\ + } + union { UNSG32 u32Semaphore_mask; + struct w32Semaphore_mask; + }; + /////////////////////////////////////////////////////////// + } SIE_Semaphore; + + typedef union T32Semaphore_CFG + { UNSG32 u32; + struct w32Semaphore_CFG; + } T32Semaphore_CFG; + typedef union T32Semaphore_mask + { UNSG32 u32; + struct w32Semaphore_mask; + } T32Semaphore_mask; + /////////////////////////////////////////////////////////// + + typedef union TSemaphore_CFG + { UNSG32 u32[1]; + struct { + struct w32Semaphore_CFG; + }; + } TSemaphore_CFG; + typedef union TSemaphore_mask + { UNSG32 u32[1]; + struct { + struct w32Semaphore_mask; + }; + } TSemaphore_mask; + + /////////////////////////////////////////////////////////// + SIGN32 Semaphore_drvrd(SIE_Semaphore *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 Semaphore_drvwr(SIE_Semaphore *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void Semaphore_reset(SIE_Semaphore *p); + SIGN32 Semaphore_cmp (SIE_Semaphore *p, SIE_Semaphore *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define Semaphore_check(p,pie,pfx,hLOG) Semaphore_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define Semaphore_print(p, pfx,hLOG) Semaphore_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: Semaphore +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaQuery (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 RESP (R-) +/// %unsigned 16 CNT +/// ### +/// * Semaphore counter level +/// ### +/// %unsigned 16 PTR +/// ### +/// * Semaphore pointer: +/// * producer-wptr or consumer-rptr +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 32b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaQuery +#define h_SemaQuery (){} + + #define RA_SemaQuery_RESP 0x0000 + + #define BA_SemaQuery_RESP_CNT 0x0000 + #define B16SemaQuery_RESP_CNT 0x0000 + #define LSb32SemaQuery_RESP_CNT 0 + #define LSb16SemaQuery_RESP_CNT 0 + #define bSemaQuery_RESP_CNT 16 + #define MSK32SemaQuery_RESP_CNT 0x0000FFFF + + #define BA_SemaQuery_RESP_PTR 0x0002 + #define B16SemaQuery_RESP_PTR 0x0002 + #define LSb32SemaQuery_RESP_PTR 16 + #define LSb16SemaQuery_RESP_PTR 0 + #define bSemaQuery_RESP_PTR 16 + #define MSK32SemaQuery_RESP_PTR 0xFFFF0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaQuery { + /////////////////////////////////////////////////////////// + #define GET32SemaQuery_RESP_CNT(r32) _BFGET_(r32,15, 0) + #define SET32SemaQuery_RESP_CNT(r32,v) _BFSET_(r32,15, 0,v) + #define GET16SemaQuery_RESP_CNT(r16) _BFGET_(r16,15, 0) + #define SET16SemaQuery_RESP_CNT(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32SemaQuery_RESP_PTR(r32) _BFGET_(r32,31,16) + #define SET32SemaQuery_RESP_PTR(r32,v) _BFSET_(r32,31,16,v) + #define GET16SemaQuery_RESP_PTR(r16) _BFGET_(r16,15, 0) + #define SET16SemaQuery_RESP_PTR(r16,v) _BFSET_(r16,15, 0,v) + + #define w32SemaQuery_RESP {\ + UNSG32 uRESP_CNT : 16;\ + UNSG32 uRESP_PTR : 16;\ + } + union { UNSG32 u32SemaQuery_RESP; + struct w32SemaQuery_RESP; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaQuery; + + typedef union T32SemaQuery_RESP + { UNSG32 u32; + struct w32SemaQuery_RESP; + } T32SemaQuery_RESP; + /////////////////////////////////////////////////////////// + + typedef union TSemaQuery_RESP + { UNSG32 u32[1]; + struct { + struct w32SemaQuery_RESP; + }; + } TSemaQuery_RESP; + + /////////////////////////////////////////////////////////// + SIGN32 SemaQuery_drvrd(SIE_SemaQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaQuery_drvwr(SIE_SemaQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaQuery_reset(SIE_SemaQuery *p); + SIGN32 SemaQuery_cmp (SIE_SemaQuery *p, SIE_SemaQuery *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaQuery_check(p,pie,pfx,hLOG) SemaQuery_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaQuery_print(p, pfx,hLOG) SemaQuery_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaQuery +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaQueryMap (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 ADDR (P) +/// %unsigned 2 byte +/// %unsigned 5 ID +/// ### +/// * Semaphore cell index +/// ### +/// %unsigned 1 master +/// : producer 0x0 +/// : consumer 0x1 +/// ### +/// * Select which counter to read +/// ### +/// %% 24 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 8b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaQueryMap +#define h_SemaQueryMap (){} + + #define RA_SemaQueryMap_ADDR 0x0000 + + #define BA_SemaQueryMap_ADDR_byte 0x0000 + #define B16SemaQueryMap_ADDR_byte 0x0000 + #define LSb32SemaQueryMap_ADDR_byte 0 + #define LSb16SemaQueryMap_ADDR_byte 0 + #define bSemaQueryMap_ADDR_byte 2 + #define MSK32SemaQueryMap_ADDR_byte 0x00000003 + + #define BA_SemaQueryMap_ADDR_ID 0x0000 + #define B16SemaQueryMap_ADDR_ID 0x0000 + #define LSb32SemaQueryMap_ADDR_ID 2 + #define LSb16SemaQueryMap_ADDR_ID 2 + #define bSemaQueryMap_ADDR_ID 5 + #define MSK32SemaQueryMap_ADDR_ID 0x0000007C + + #define BA_SemaQueryMap_ADDR_master 0x0000 + #define B16SemaQueryMap_ADDR_master 0x0000 + #define LSb32SemaQueryMap_ADDR_master 7 + #define LSb16SemaQueryMap_ADDR_master 7 + #define bSemaQueryMap_ADDR_master 1 + #define MSK32SemaQueryMap_ADDR_master 0x00000080 + #define SemaQueryMap_ADDR_master_producer 0x0 + #define SemaQueryMap_ADDR_master_consumer 0x1 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaQueryMap { + /////////////////////////////////////////////////////////// + #define GET32SemaQueryMap_ADDR_byte(r32) _BFGET_(r32, 1, 0) + #define SET32SemaQueryMap_ADDR_byte(r32,v) _BFSET_(r32, 1, 0,v) + #define GET16SemaQueryMap_ADDR_byte(r16) _BFGET_(r16, 1, 0) + #define SET16SemaQueryMap_ADDR_byte(r16,v) _BFSET_(r16, 1, 0,v) + + #define GET32SemaQueryMap_ADDR_ID(r32) _BFGET_(r32, 6, 2) + #define SET32SemaQueryMap_ADDR_ID(r32,v) _BFSET_(r32, 6, 2,v) + #define GET16SemaQueryMap_ADDR_ID(r16) _BFGET_(r16, 6, 2) + #define SET16SemaQueryMap_ADDR_ID(r16,v) _BFSET_(r16, 6, 2,v) + + #define GET32SemaQueryMap_ADDR_master(r32) _BFGET_(r32, 7, 7) + #define SET32SemaQueryMap_ADDR_master(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaQueryMap_ADDR_master(r16) _BFGET_(r16, 7, 7) + #define SET16SemaQueryMap_ADDR_master(r16,v) _BFSET_(r16, 7, 7,v) + + #define w32SemaQueryMap_ADDR {\ + UNSG32 uADDR_byte : 2;\ + UNSG32 uADDR_ID : 5;\ + UNSG32 uADDR_master : 1;\ + UNSG32 RSVDx0_b8 : 24;\ + } + union { UNSG32 u32SemaQueryMap_ADDR; + struct w32SemaQueryMap_ADDR; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaQueryMap; + + typedef union T32SemaQueryMap_ADDR + { UNSG32 u32; + struct w32SemaQueryMap_ADDR; + } T32SemaQueryMap_ADDR; + /////////////////////////////////////////////////////////// + + typedef union TSemaQueryMap_ADDR + { UNSG32 u32[1]; + struct { + struct w32SemaQueryMap_ADDR; + }; + } TSemaQueryMap_ADDR; + + /////////////////////////////////////////////////////////// + SIGN32 SemaQueryMap_drvrd(SIE_SemaQueryMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaQueryMap_drvwr(SIE_SemaQueryMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaQueryMap_reset(SIE_SemaQueryMap *p); + SIGN32 SemaQueryMap_cmp (SIE_SemaQueryMap *p, SIE_SemaQueryMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaQueryMap_check(p,pie,pfx,hLOG) SemaQueryMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaQueryMap_print(p, pfx,hLOG) SemaQueryMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaQueryMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaHub biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 Query (R-) +/// # 0x00000 counter +/// $SemaQuery counter MEM [64] +/// ### +/// * Access address as defined above +/// ### +/// @ 0x00100 ARR (P) +/// # 0x00100 cell +/// $Semaphore cell REG [32] +/// ### +/// * Up-to 32 semaphore cells +/// ### +/// @ 0x00380 PUSH (W-) +/// %unsigned 8 ID +/// %unsigned 8 delta +/// ### +/// * CPU increases PCounter by delta (0 as push 256) +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00384 POP (W-) +/// %unsigned 8 ID +/// %unsigned 8 delta +/// ### +/// * CPU decreases CCounter by delta (0 as pop 256) +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00388 empty (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'empty' status +/// ### +/// @ 0x0038C full (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'full' status +/// ### +/// @ 0x00390 almostEmpty (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'almostEmpty' status +/// ### +/// @ 0x00394 almostFull (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'almostFull' status +/// ### +/// @ 0x00398 (W-) +/// # # Stuffing bytes... +/// %% 832 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 1024B, bits: 1152b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaHub +#define h_SemaHub (){} + + #define RA_SemaHub_Query 0x0000 + #define RA_SemaHub_counter 0x0000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_ARR 0x0100 + #define RA_SemaHub_cell 0x0100 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_PUSH 0x0380 + + #define BA_SemaHub_PUSH_ID 0x0380 + #define B16SemaHub_PUSH_ID 0x0380 + #define LSb32SemaHub_PUSH_ID 0 + #define LSb16SemaHub_PUSH_ID 0 + #define bSemaHub_PUSH_ID 8 + #define MSK32SemaHub_PUSH_ID 0x000000FF + + #define BA_SemaHub_PUSH_delta 0x0381 + #define B16SemaHub_PUSH_delta 0x0380 + #define LSb32SemaHub_PUSH_delta 8 + #define LSb16SemaHub_PUSH_delta 8 + #define bSemaHub_PUSH_delta 8 + #define MSK32SemaHub_PUSH_delta 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_POP 0x0384 + + #define BA_SemaHub_POP_ID 0x0384 + #define B16SemaHub_POP_ID 0x0384 + #define LSb32SemaHub_POP_ID 0 + #define LSb16SemaHub_POP_ID 0 + #define bSemaHub_POP_ID 8 + #define MSK32SemaHub_POP_ID 0x000000FF + + #define BA_SemaHub_POP_delta 0x0385 + #define B16SemaHub_POP_delta 0x0384 + #define LSb32SemaHub_POP_delta 8 + #define LSb16SemaHub_POP_delta 8 + #define bSemaHub_POP_delta 8 + #define MSK32SemaHub_POP_delta 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_empty 0x0388 + + #define BA_SemaHub_empty_ST_0i 0x0388 + #define B16SemaHub_empty_ST_0i 0x0388 + #define LSb32SemaHub_empty_ST_0i 0 + #define LSb16SemaHub_empty_ST_0i 0 + #define bSemaHub_empty_ST_0i 1 + #define MSK32SemaHub_empty_ST_0i 0x00000001 + + #define BA_SemaHub_empty_ST_1i 0x0388 + #define B16SemaHub_empty_ST_1i 0x0388 + #define LSb32SemaHub_empty_ST_1i 1 + #define LSb16SemaHub_empty_ST_1i 1 + #define bSemaHub_empty_ST_1i 1 + #define MSK32SemaHub_empty_ST_1i 0x00000002 + + #define BA_SemaHub_empty_ST_2i 0x0388 + #define B16SemaHub_empty_ST_2i 0x0388 + #define LSb32SemaHub_empty_ST_2i 2 + #define LSb16SemaHub_empty_ST_2i 2 + #define bSemaHub_empty_ST_2i 1 + #define MSK32SemaHub_empty_ST_2i 0x00000004 + + #define BA_SemaHub_empty_ST_3i 0x0388 + #define B16SemaHub_empty_ST_3i 0x0388 + #define LSb32SemaHub_empty_ST_3i 3 + #define LSb16SemaHub_empty_ST_3i 3 + #define bSemaHub_empty_ST_3i 1 + #define MSK32SemaHub_empty_ST_3i 0x00000008 + + #define BA_SemaHub_empty_ST_4i 0x0388 + #define B16SemaHub_empty_ST_4i 0x0388 + #define LSb32SemaHub_empty_ST_4i 4 + #define LSb16SemaHub_empty_ST_4i 4 + #define bSemaHub_empty_ST_4i 1 + #define MSK32SemaHub_empty_ST_4i 0x00000010 + + #define BA_SemaHub_empty_ST_5i 0x0388 + #define B16SemaHub_empty_ST_5i 0x0388 + #define LSb32SemaHub_empty_ST_5i 5 + #define LSb16SemaHub_empty_ST_5i 5 + #define bSemaHub_empty_ST_5i 1 + #define MSK32SemaHub_empty_ST_5i 0x00000020 + + #define BA_SemaHub_empty_ST_6i 0x0388 + #define B16SemaHub_empty_ST_6i 0x0388 + #define LSb32SemaHub_empty_ST_6i 6 + #define LSb16SemaHub_empty_ST_6i 6 + #define bSemaHub_empty_ST_6i 1 + #define MSK32SemaHub_empty_ST_6i 0x00000040 + + #define BA_SemaHub_empty_ST_7i 0x0388 + #define B16SemaHub_empty_ST_7i 0x0388 + #define LSb32SemaHub_empty_ST_7i 7 + #define LSb16SemaHub_empty_ST_7i 7 + #define bSemaHub_empty_ST_7i 1 + #define MSK32SemaHub_empty_ST_7i 0x00000080 + + #define BA_SemaHub_empty_ST_8i 0x0389 + #define B16SemaHub_empty_ST_8i 0x0388 + #define LSb32SemaHub_empty_ST_8i 8 + #define LSb16SemaHub_empty_ST_8i 8 + #define bSemaHub_empty_ST_8i 1 + #define MSK32SemaHub_empty_ST_8i 0x00000100 + + #define BA_SemaHub_empty_ST_9i 0x0389 + #define B16SemaHub_empty_ST_9i 0x0388 + #define LSb32SemaHub_empty_ST_9i 9 + #define LSb16SemaHub_empty_ST_9i 9 + #define bSemaHub_empty_ST_9i 1 + #define MSK32SemaHub_empty_ST_9i 0x00000200 + + #define BA_SemaHub_empty_ST_10i 0x0389 + #define B16SemaHub_empty_ST_10i 0x0388 + #define LSb32SemaHub_empty_ST_10i 10 + #define LSb16SemaHub_empty_ST_10i 10 + #define bSemaHub_empty_ST_10i 1 + #define MSK32SemaHub_empty_ST_10i 0x00000400 + + #define BA_SemaHub_empty_ST_11i 0x0389 + #define B16SemaHub_empty_ST_11i 0x0388 + #define LSb32SemaHub_empty_ST_11i 11 + #define LSb16SemaHub_empty_ST_11i 11 + #define bSemaHub_empty_ST_11i 1 + #define MSK32SemaHub_empty_ST_11i 0x00000800 + + #define BA_SemaHub_empty_ST_12i 0x0389 + #define B16SemaHub_empty_ST_12i 0x0388 + #define LSb32SemaHub_empty_ST_12i 12 + #define LSb16SemaHub_empty_ST_12i 12 + #define bSemaHub_empty_ST_12i 1 + #define MSK32SemaHub_empty_ST_12i 0x00001000 + + #define BA_SemaHub_empty_ST_13i 0x0389 + #define B16SemaHub_empty_ST_13i 0x0388 + #define LSb32SemaHub_empty_ST_13i 13 + #define LSb16SemaHub_empty_ST_13i 13 + #define bSemaHub_empty_ST_13i 1 + #define MSK32SemaHub_empty_ST_13i 0x00002000 + + #define BA_SemaHub_empty_ST_14i 0x0389 + #define B16SemaHub_empty_ST_14i 0x0388 + #define LSb32SemaHub_empty_ST_14i 14 + #define LSb16SemaHub_empty_ST_14i 14 + #define bSemaHub_empty_ST_14i 1 + #define MSK32SemaHub_empty_ST_14i 0x00004000 + + #define BA_SemaHub_empty_ST_15i 0x0389 + #define B16SemaHub_empty_ST_15i 0x0388 + #define LSb32SemaHub_empty_ST_15i 15 + #define LSb16SemaHub_empty_ST_15i 15 + #define bSemaHub_empty_ST_15i 1 + #define MSK32SemaHub_empty_ST_15i 0x00008000 + + #define BA_SemaHub_empty_ST_16i 0x038A + #define B16SemaHub_empty_ST_16i 0x038A + #define LSb32SemaHub_empty_ST_16i 16 + #define LSb16SemaHub_empty_ST_16i 0 + #define bSemaHub_empty_ST_16i 1 + #define MSK32SemaHub_empty_ST_16i 0x00010000 + + #define BA_SemaHub_empty_ST_17i 0x038A + #define B16SemaHub_empty_ST_17i 0x038A + #define LSb32SemaHub_empty_ST_17i 17 + #define LSb16SemaHub_empty_ST_17i 1 + #define bSemaHub_empty_ST_17i 1 + #define MSK32SemaHub_empty_ST_17i 0x00020000 + + #define BA_SemaHub_empty_ST_18i 0x038A + #define B16SemaHub_empty_ST_18i 0x038A + #define LSb32SemaHub_empty_ST_18i 18 + #define LSb16SemaHub_empty_ST_18i 2 + #define bSemaHub_empty_ST_18i 1 + #define MSK32SemaHub_empty_ST_18i 0x00040000 + + #define BA_SemaHub_empty_ST_19i 0x038A + #define B16SemaHub_empty_ST_19i 0x038A + #define LSb32SemaHub_empty_ST_19i 19 + #define LSb16SemaHub_empty_ST_19i 3 + #define bSemaHub_empty_ST_19i 1 + #define MSK32SemaHub_empty_ST_19i 0x00080000 + + #define BA_SemaHub_empty_ST_20i 0x038A + #define B16SemaHub_empty_ST_20i 0x038A + #define LSb32SemaHub_empty_ST_20i 20 + #define LSb16SemaHub_empty_ST_20i 4 + #define bSemaHub_empty_ST_20i 1 + #define MSK32SemaHub_empty_ST_20i 0x00100000 + + #define BA_SemaHub_empty_ST_21i 0x038A + #define B16SemaHub_empty_ST_21i 0x038A + #define LSb32SemaHub_empty_ST_21i 21 + #define LSb16SemaHub_empty_ST_21i 5 + #define bSemaHub_empty_ST_21i 1 + #define MSK32SemaHub_empty_ST_21i 0x00200000 + + #define BA_SemaHub_empty_ST_22i 0x038A + #define B16SemaHub_empty_ST_22i 0x038A + #define LSb32SemaHub_empty_ST_22i 22 + #define LSb16SemaHub_empty_ST_22i 6 + #define bSemaHub_empty_ST_22i 1 + #define MSK32SemaHub_empty_ST_22i 0x00400000 + + #define BA_SemaHub_empty_ST_23i 0x038A + #define B16SemaHub_empty_ST_23i 0x038A + #define LSb32SemaHub_empty_ST_23i 23 + #define LSb16SemaHub_empty_ST_23i 7 + #define bSemaHub_empty_ST_23i 1 + #define MSK32SemaHub_empty_ST_23i 0x00800000 + + #define BA_SemaHub_empty_ST_24i 0x038B + #define B16SemaHub_empty_ST_24i 0x038A + #define LSb32SemaHub_empty_ST_24i 24 + #define LSb16SemaHub_empty_ST_24i 8 + #define bSemaHub_empty_ST_24i 1 + #define MSK32SemaHub_empty_ST_24i 0x01000000 + + #define BA_SemaHub_empty_ST_25i 0x038B + #define B16SemaHub_empty_ST_25i 0x038A + #define LSb32SemaHub_empty_ST_25i 25 + #define LSb16SemaHub_empty_ST_25i 9 + #define bSemaHub_empty_ST_25i 1 + #define MSK32SemaHub_empty_ST_25i 0x02000000 + + #define BA_SemaHub_empty_ST_26i 0x038B + #define B16SemaHub_empty_ST_26i 0x038A + #define LSb32SemaHub_empty_ST_26i 26 + #define LSb16SemaHub_empty_ST_26i 10 + #define bSemaHub_empty_ST_26i 1 + #define MSK32SemaHub_empty_ST_26i 0x04000000 + + #define BA_SemaHub_empty_ST_27i 0x038B + #define B16SemaHub_empty_ST_27i 0x038A + #define LSb32SemaHub_empty_ST_27i 27 + #define LSb16SemaHub_empty_ST_27i 11 + #define bSemaHub_empty_ST_27i 1 + #define MSK32SemaHub_empty_ST_27i 0x08000000 + + #define BA_SemaHub_empty_ST_28i 0x038B + #define B16SemaHub_empty_ST_28i 0x038A + #define LSb32SemaHub_empty_ST_28i 28 + #define LSb16SemaHub_empty_ST_28i 12 + #define bSemaHub_empty_ST_28i 1 + #define MSK32SemaHub_empty_ST_28i 0x10000000 + + #define BA_SemaHub_empty_ST_29i 0x038B + #define B16SemaHub_empty_ST_29i 0x038A + #define LSb32SemaHub_empty_ST_29i 29 + #define LSb16SemaHub_empty_ST_29i 13 + #define bSemaHub_empty_ST_29i 1 + #define MSK32SemaHub_empty_ST_29i 0x20000000 + + #define BA_SemaHub_empty_ST_30i 0x038B + #define B16SemaHub_empty_ST_30i 0x038A + #define LSb32SemaHub_empty_ST_30i 30 + #define LSb16SemaHub_empty_ST_30i 14 + #define bSemaHub_empty_ST_30i 1 + #define MSK32SemaHub_empty_ST_30i 0x40000000 + + #define BA_SemaHub_empty_ST_31i 0x038B + #define B16SemaHub_empty_ST_31i 0x038A + #define LSb32SemaHub_empty_ST_31i 31 + #define LSb16SemaHub_empty_ST_31i 15 + #define bSemaHub_empty_ST_31i 1 + #define MSK32SemaHub_empty_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_full 0x038C + + #define BA_SemaHub_full_ST_0i 0x038C + #define B16SemaHub_full_ST_0i 0x038C + #define LSb32SemaHub_full_ST_0i 0 + #define LSb16SemaHub_full_ST_0i 0 + #define bSemaHub_full_ST_0i 1 + #define MSK32SemaHub_full_ST_0i 0x00000001 + + #define BA_SemaHub_full_ST_1i 0x038C + #define B16SemaHub_full_ST_1i 0x038C + #define LSb32SemaHub_full_ST_1i 1 + #define LSb16SemaHub_full_ST_1i 1 + #define bSemaHub_full_ST_1i 1 + #define MSK32SemaHub_full_ST_1i 0x00000002 + + #define BA_SemaHub_full_ST_2i 0x038C + #define B16SemaHub_full_ST_2i 0x038C + #define LSb32SemaHub_full_ST_2i 2 + #define LSb16SemaHub_full_ST_2i 2 + #define bSemaHub_full_ST_2i 1 + #define MSK32SemaHub_full_ST_2i 0x00000004 + + #define BA_SemaHub_full_ST_3i 0x038C + #define B16SemaHub_full_ST_3i 0x038C + #define LSb32SemaHub_full_ST_3i 3 + #define LSb16SemaHub_full_ST_3i 3 + #define bSemaHub_full_ST_3i 1 + #define MSK32SemaHub_full_ST_3i 0x00000008 + + #define BA_SemaHub_full_ST_4i 0x038C + #define B16SemaHub_full_ST_4i 0x038C + #define LSb32SemaHub_full_ST_4i 4 + #define LSb16SemaHub_full_ST_4i 4 + #define bSemaHub_full_ST_4i 1 + #define MSK32SemaHub_full_ST_4i 0x00000010 + + #define BA_SemaHub_full_ST_5i 0x038C + #define B16SemaHub_full_ST_5i 0x038C + #define LSb32SemaHub_full_ST_5i 5 + #define LSb16SemaHub_full_ST_5i 5 + #define bSemaHub_full_ST_5i 1 + #define MSK32SemaHub_full_ST_5i 0x00000020 + + #define BA_SemaHub_full_ST_6i 0x038C + #define B16SemaHub_full_ST_6i 0x038C + #define LSb32SemaHub_full_ST_6i 6 + #define LSb16SemaHub_full_ST_6i 6 + #define bSemaHub_full_ST_6i 1 + #define MSK32SemaHub_full_ST_6i 0x00000040 + + #define BA_SemaHub_full_ST_7i 0x038C + #define B16SemaHub_full_ST_7i 0x038C + #define LSb32SemaHub_full_ST_7i 7 + #define LSb16SemaHub_full_ST_7i 7 + #define bSemaHub_full_ST_7i 1 + #define MSK32SemaHub_full_ST_7i 0x00000080 + + #define BA_SemaHub_full_ST_8i 0x038D + #define B16SemaHub_full_ST_8i 0x038C + #define LSb32SemaHub_full_ST_8i 8 + #define LSb16SemaHub_full_ST_8i 8 + #define bSemaHub_full_ST_8i 1 + #define MSK32SemaHub_full_ST_8i 0x00000100 + + #define BA_SemaHub_full_ST_9i 0x038D + #define B16SemaHub_full_ST_9i 0x038C + #define LSb32SemaHub_full_ST_9i 9 + #define LSb16SemaHub_full_ST_9i 9 + #define bSemaHub_full_ST_9i 1 + #define MSK32SemaHub_full_ST_9i 0x00000200 + + #define BA_SemaHub_full_ST_10i 0x038D + #define B16SemaHub_full_ST_10i 0x038C + #define LSb32SemaHub_full_ST_10i 10 + #define LSb16SemaHub_full_ST_10i 10 + #define bSemaHub_full_ST_10i 1 + #define MSK32SemaHub_full_ST_10i 0x00000400 + + #define BA_SemaHub_full_ST_11i 0x038D + #define B16SemaHub_full_ST_11i 0x038C + #define LSb32SemaHub_full_ST_11i 11 + #define LSb16SemaHub_full_ST_11i 11 + #define bSemaHub_full_ST_11i 1 + #define MSK32SemaHub_full_ST_11i 0x00000800 + + #define BA_SemaHub_full_ST_12i 0x038D + #define B16SemaHub_full_ST_12i 0x038C + #define LSb32SemaHub_full_ST_12i 12 + #define LSb16SemaHub_full_ST_12i 12 + #define bSemaHub_full_ST_12i 1 + #define MSK32SemaHub_full_ST_12i 0x00001000 + + #define BA_SemaHub_full_ST_13i 0x038D + #define B16SemaHub_full_ST_13i 0x038C + #define LSb32SemaHub_full_ST_13i 13 + #define LSb16SemaHub_full_ST_13i 13 + #define bSemaHub_full_ST_13i 1 + #define MSK32SemaHub_full_ST_13i 0x00002000 + + #define BA_SemaHub_full_ST_14i 0x038D + #define B16SemaHub_full_ST_14i 0x038C + #define LSb32SemaHub_full_ST_14i 14 + #define LSb16SemaHub_full_ST_14i 14 + #define bSemaHub_full_ST_14i 1 + #define MSK32SemaHub_full_ST_14i 0x00004000 + + #define BA_SemaHub_full_ST_15i 0x038D + #define B16SemaHub_full_ST_15i 0x038C + #define LSb32SemaHub_full_ST_15i 15 + #define LSb16SemaHub_full_ST_15i 15 + #define bSemaHub_full_ST_15i 1 + #define MSK32SemaHub_full_ST_15i 0x00008000 + + #define BA_SemaHub_full_ST_16i 0x038E + #define B16SemaHub_full_ST_16i 0x038E + #define LSb32SemaHub_full_ST_16i 16 + #define LSb16SemaHub_full_ST_16i 0 + #define bSemaHub_full_ST_16i 1 + #define MSK32SemaHub_full_ST_16i 0x00010000 + + #define BA_SemaHub_full_ST_17i 0x038E + #define B16SemaHub_full_ST_17i 0x038E + #define LSb32SemaHub_full_ST_17i 17 + #define LSb16SemaHub_full_ST_17i 1 + #define bSemaHub_full_ST_17i 1 + #define MSK32SemaHub_full_ST_17i 0x00020000 + + #define BA_SemaHub_full_ST_18i 0x038E + #define B16SemaHub_full_ST_18i 0x038E + #define LSb32SemaHub_full_ST_18i 18 + #define LSb16SemaHub_full_ST_18i 2 + #define bSemaHub_full_ST_18i 1 + #define MSK32SemaHub_full_ST_18i 0x00040000 + + #define BA_SemaHub_full_ST_19i 0x038E + #define B16SemaHub_full_ST_19i 0x038E + #define LSb32SemaHub_full_ST_19i 19 + #define LSb16SemaHub_full_ST_19i 3 + #define bSemaHub_full_ST_19i 1 + #define MSK32SemaHub_full_ST_19i 0x00080000 + + #define BA_SemaHub_full_ST_20i 0x038E + #define B16SemaHub_full_ST_20i 0x038E + #define LSb32SemaHub_full_ST_20i 20 + #define LSb16SemaHub_full_ST_20i 4 + #define bSemaHub_full_ST_20i 1 + #define MSK32SemaHub_full_ST_20i 0x00100000 + + #define BA_SemaHub_full_ST_21i 0x038E + #define B16SemaHub_full_ST_21i 0x038E + #define LSb32SemaHub_full_ST_21i 21 + #define LSb16SemaHub_full_ST_21i 5 + #define bSemaHub_full_ST_21i 1 + #define MSK32SemaHub_full_ST_21i 0x00200000 + + #define BA_SemaHub_full_ST_22i 0x038E + #define B16SemaHub_full_ST_22i 0x038E + #define LSb32SemaHub_full_ST_22i 22 + #define LSb16SemaHub_full_ST_22i 6 + #define bSemaHub_full_ST_22i 1 + #define MSK32SemaHub_full_ST_22i 0x00400000 + + #define BA_SemaHub_full_ST_23i 0x038E + #define B16SemaHub_full_ST_23i 0x038E + #define LSb32SemaHub_full_ST_23i 23 + #define LSb16SemaHub_full_ST_23i 7 + #define bSemaHub_full_ST_23i 1 + #define MSK32SemaHub_full_ST_23i 0x00800000 + + #define BA_SemaHub_full_ST_24i 0x038F + #define B16SemaHub_full_ST_24i 0x038E + #define LSb32SemaHub_full_ST_24i 24 + #define LSb16SemaHub_full_ST_24i 8 + #define bSemaHub_full_ST_24i 1 + #define MSK32SemaHub_full_ST_24i 0x01000000 + + #define BA_SemaHub_full_ST_25i 0x038F + #define B16SemaHub_full_ST_25i 0x038E + #define LSb32SemaHub_full_ST_25i 25 + #define LSb16SemaHub_full_ST_25i 9 + #define bSemaHub_full_ST_25i 1 + #define MSK32SemaHub_full_ST_25i 0x02000000 + + #define BA_SemaHub_full_ST_26i 0x038F + #define B16SemaHub_full_ST_26i 0x038E + #define LSb32SemaHub_full_ST_26i 26 + #define LSb16SemaHub_full_ST_26i 10 + #define bSemaHub_full_ST_26i 1 + #define MSK32SemaHub_full_ST_26i 0x04000000 + + #define BA_SemaHub_full_ST_27i 0x038F + #define B16SemaHub_full_ST_27i 0x038E + #define LSb32SemaHub_full_ST_27i 27 + #define LSb16SemaHub_full_ST_27i 11 + #define bSemaHub_full_ST_27i 1 + #define MSK32SemaHub_full_ST_27i 0x08000000 + + #define BA_SemaHub_full_ST_28i 0x038F + #define B16SemaHub_full_ST_28i 0x038E + #define LSb32SemaHub_full_ST_28i 28 + #define LSb16SemaHub_full_ST_28i 12 + #define bSemaHub_full_ST_28i 1 + #define MSK32SemaHub_full_ST_28i 0x10000000 + + #define BA_SemaHub_full_ST_29i 0x038F + #define B16SemaHub_full_ST_29i 0x038E + #define LSb32SemaHub_full_ST_29i 29 + #define LSb16SemaHub_full_ST_29i 13 + #define bSemaHub_full_ST_29i 1 + #define MSK32SemaHub_full_ST_29i 0x20000000 + + #define BA_SemaHub_full_ST_30i 0x038F + #define B16SemaHub_full_ST_30i 0x038E + #define LSb32SemaHub_full_ST_30i 30 + #define LSb16SemaHub_full_ST_30i 14 + #define bSemaHub_full_ST_30i 1 + #define MSK32SemaHub_full_ST_30i 0x40000000 + + #define BA_SemaHub_full_ST_31i 0x038F + #define B16SemaHub_full_ST_31i 0x038E + #define LSb32SemaHub_full_ST_31i 31 + #define LSb16SemaHub_full_ST_31i 15 + #define bSemaHub_full_ST_31i 1 + #define MSK32SemaHub_full_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_almostEmpty 0x0390 + + #define BA_SemaHub_almostEmpty_ST_0i 0x0390 + #define B16SemaHub_almostEmpty_ST_0i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_0i 0 + #define LSb16SemaHub_almostEmpty_ST_0i 0 + #define bSemaHub_almostEmpty_ST_0i 1 + #define MSK32SemaHub_almostEmpty_ST_0i 0x00000001 + + #define BA_SemaHub_almostEmpty_ST_1i 0x0390 + #define B16SemaHub_almostEmpty_ST_1i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_1i 1 + #define LSb16SemaHub_almostEmpty_ST_1i 1 + #define bSemaHub_almostEmpty_ST_1i 1 + #define MSK32SemaHub_almostEmpty_ST_1i 0x00000002 + + #define BA_SemaHub_almostEmpty_ST_2i 0x0390 + #define B16SemaHub_almostEmpty_ST_2i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_2i 2 + #define LSb16SemaHub_almostEmpty_ST_2i 2 + #define bSemaHub_almostEmpty_ST_2i 1 + #define MSK32SemaHub_almostEmpty_ST_2i 0x00000004 + + #define BA_SemaHub_almostEmpty_ST_3i 0x0390 + #define B16SemaHub_almostEmpty_ST_3i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_3i 3 + #define LSb16SemaHub_almostEmpty_ST_3i 3 + #define bSemaHub_almostEmpty_ST_3i 1 + #define MSK32SemaHub_almostEmpty_ST_3i 0x00000008 + + #define BA_SemaHub_almostEmpty_ST_4i 0x0390 + #define B16SemaHub_almostEmpty_ST_4i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_4i 4 + #define LSb16SemaHub_almostEmpty_ST_4i 4 + #define bSemaHub_almostEmpty_ST_4i 1 + #define MSK32SemaHub_almostEmpty_ST_4i 0x00000010 + + #define BA_SemaHub_almostEmpty_ST_5i 0x0390 + #define B16SemaHub_almostEmpty_ST_5i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_5i 5 + #define LSb16SemaHub_almostEmpty_ST_5i 5 + #define bSemaHub_almostEmpty_ST_5i 1 + #define MSK32SemaHub_almostEmpty_ST_5i 0x00000020 + + #define BA_SemaHub_almostEmpty_ST_6i 0x0390 + #define B16SemaHub_almostEmpty_ST_6i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_6i 6 + #define LSb16SemaHub_almostEmpty_ST_6i 6 + #define bSemaHub_almostEmpty_ST_6i 1 + #define MSK32SemaHub_almostEmpty_ST_6i 0x00000040 + + #define BA_SemaHub_almostEmpty_ST_7i 0x0390 + #define B16SemaHub_almostEmpty_ST_7i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_7i 7 + #define LSb16SemaHub_almostEmpty_ST_7i 7 + #define bSemaHub_almostEmpty_ST_7i 1 + #define MSK32SemaHub_almostEmpty_ST_7i 0x00000080 + + #define BA_SemaHub_almostEmpty_ST_8i 0x0391 + #define B16SemaHub_almostEmpty_ST_8i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_8i 8 + #define LSb16SemaHub_almostEmpty_ST_8i 8 + #define bSemaHub_almostEmpty_ST_8i 1 + #define MSK32SemaHub_almostEmpty_ST_8i 0x00000100 + + #define BA_SemaHub_almostEmpty_ST_9i 0x0391 + #define B16SemaHub_almostEmpty_ST_9i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_9i 9 + #define LSb16SemaHub_almostEmpty_ST_9i 9 + #define bSemaHub_almostEmpty_ST_9i 1 + #define MSK32SemaHub_almostEmpty_ST_9i 0x00000200 + + #define BA_SemaHub_almostEmpty_ST_10i 0x0391 + #define B16SemaHub_almostEmpty_ST_10i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_10i 10 + #define LSb16SemaHub_almostEmpty_ST_10i 10 + #define bSemaHub_almostEmpty_ST_10i 1 + #define MSK32SemaHub_almostEmpty_ST_10i 0x00000400 + + #define BA_SemaHub_almostEmpty_ST_11i 0x0391 + #define B16SemaHub_almostEmpty_ST_11i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_11i 11 + #define LSb16SemaHub_almostEmpty_ST_11i 11 + #define bSemaHub_almostEmpty_ST_11i 1 + #define MSK32SemaHub_almostEmpty_ST_11i 0x00000800 + + #define BA_SemaHub_almostEmpty_ST_12i 0x0391 + #define B16SemaHub_almostEmpty_ST_12i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_12i 12 + #define LSb16SemaHub_almostEmpty_ST_12i 12 + #define bSemaHub_almostEmpty_ST_12i 1 + #define MSK32SemaHub_almostEmpty_ST_12i 0x00001000 + + #define BA_SemaHub_almostEmpty_ST_13i 0x0391 + #define B16SemaHub_almostEmpty_ST_13i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_13i 13 + #define LSb16SemaHub_almostEmpty_ST_13i 13 + #define bSemaHub_almostEmpty_ST_13i 1 + #define MSK32SemaHub_almostEmpty_ST_13i 0x00002000 + + #define BA_SemaHub_almostEmpty_ST_14i 0x0391 + #define B16SemaHub_almostEmpty_ST_14i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_14i 14 + #define LSb16SemaHub_almostEmpty_ST_14i 14 + #define bSemaHub_almostEmpty_ST_14i 1 + #define MSK32SemaHub_almostEmpty_ST_14i 0x00004000 + + #define BA_SemaHub_almostEmpty_ST_15i 0x0391 + #define B16SemaHub_almostEmpty_ST_15i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_15i 15 + #define LSb16SemaHub_almostEmpty_ST_15i 15 + #define bSemaHub_almostEmpty_ST_15i 1 + #define MSK32SemaHub_almostEmpty_ST_15i 0x00008000 + + #define BA_SemaHub_almostEmpty_ST_16i 0x0392 + #define B16SemaHub_almostEmpty_ST_16i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_16i 16 + #define LSb16SemaHub_almostEmpty_ST_16i 0 + #define bSemaHub_almostEmpty_ST_16i 1 + #define MSK32SemaHub_almostEmpty_ST_16i 0x00010000 + + #define BA_SemaHub_almostEmpty_ST_17i 0x0392 + #define B16SemaHub_almostEmpty_ST_17i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_17i 17 + #define LSb16SemaHub_almostEmpty_ST_17i 1 + #define bSemaHub_almostEmpty_ST_17i 1 + #define MSK32SemaHub_almostEmpty_ST_17i 0x00020000 + + #define BA_SemaHub_almostEmpty_ST_18i 0x0392 + #define B16SemaHub_almostEmpty_ST_18i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_18i 18 + #define LSb16SemaHub_almostEmpty_ST_18i 2 + #define bSemaHub_almostEmpty_ST_18i 1 + #define MSK32SemaHub_almostEmpty_ST_18i 0x00040000 + + #define BA_SemaHub_almostEmpty_ST_19i 0x0392 + #define B16SemaHub_almostEmpty_ST_19i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_19i 19 + #define LSb16SemaHub_almostEmpty_ST_19i 3 + #define bSemaHub_almostEmpty_ST_19i 1 + #define MSK32SemaHub_almostEmpty_ST_19i 0x00080000 + + #define BA_SemaHub_almostEmpty_ST_20i 0x0392 + #define B16SemaHub_almostEmpty_ST_20i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_20i 20 + #define LSb16SemaHub_almostEmpty_ST_20i 4 + #define bSemaHub_almostEmpty_ST_20i 1 + #define MSK32SemaHub_almostEmpty_ST_20i 0x00100000 + + #define BA_SemaHub_almostEmpty_ST_21i 0x0392 + #define B16SemaHub_almostEmpty_ST_21i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_21i 21 + #define LSb16SemaHub_almostEmpty_ST_21i 5 + #define bSemaHub_almostEmpty_ST_21i 1 + #define MSK32SemaHub_almostEmpty_ST_21i 0x00200000 + + #define BA_SemaHub_almostEmpty_ST_22i 0x0392 + #define B16SemaHub_almostEmpty_ST_22i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_22i 22 + #define LSb16SemaHub_almostEmpty_ST_22i 6 + #define bSemaHub_almostEmpty_ST_22i 1 + #define MSK32SemaHub_almostEmpty_ST_22i 0x00400000 + + #define BA_SemaHub_almostEmpty_ST_23i 0x0392 + #define B16SemaHub_almostEmpty_ST_23i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_23i 23 + #define LSb16SemaHub_almostEmpty_ST_23i 7 + #define bSemaHub_almostEmpty_ST_23i 1 + #define MSK32SemaHub_almostEmpty_ST_23i 0x00800000 + + #define BA_SemaHub_almostEmpty_ST_24i 0x0393 + #define B16SemaHub_almostEmpty_ST_24i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_24i 24 + #define LSb16SemaHub_almostEmpty_ST_24i 8 + #define bSemaHub_almostEmpty_ST_24i 1 + #define MSK32SemaHub_almostEmpty_ST_24i 0x01000000 + + #define BA_SemaHub_almostEmpty_ST_25i 0x0393 + #define B16SemaHub_almostEmpty_ST_25i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_25i 25 + #define LSb16SemaHub_almostEmpty_ST_25i 9 + #define bSemaHub_almostEmpty_ST_25i 1 + #define MSK32SemaHub_almostEmpty_ST_25i 0x02000000 + + #define BA_SemaHub_almostEmpty_ST_26i 0x0393 + #define B16SemaHub_almostEmpty_ST_26i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_26i 26 + #define LSb16SemaHub_almostEmpty_ST_26i 10 + #define bSemaHub_almostEmpty_ST_26i 1 + #define MSK32SemaHub_almostEmpty_ST_26i 0x04000000 + + #define BA_SemaHub_almostEmpty_ST_27i 0x0393 + #define B16SemaHub_almostEmpty_ST_27i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_27i 27 + #define LSb16SemaHub_almostEmpty_ST_27i 11 + #define bSemaHub_almostEmpty_ST_27i 1 + #define MSK32SemaHub_almostEmpty_ST_27i 0x08000000 + + #define BA_SemaHub_almostEmpty_ST_28i 0x0393 + #define B16SemaHub_almostEmpty_ST_28i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_28i 28 + #define LSb16SemaHub_almostEmpty_ST_28i 12 + #define bSemaHub_almostEmpty_ST_28i 1 + #define MSK32SemaHub_almostEmpty_ST_28i 0x10000000 + + #define BA_SemaHub_almostEmpty_ST_29i 0x0393 + #define B16SemaHub_almostEmpty_ST_29i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_29i 29 + #define LSb16SemaHub_almostEmpty_ST_29i 13 + #define bSemaHub_almostEmpty_ST_29i 1 + #define MSK32SemaHub_almostEmpty_ST_29i 0x20000000 + + #define BA_SemaHub_almostEmpty_ST_30i 0x0393 + #define B16SemaHub_almostEmpty_ST_30i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_30i 30 + #define LSb16SemaHub_almostEmpty_ST_30i 14 + #define bSemaHub_almostEmpty_ST_30i 1 + #define MSK32SemaHub_almostEmpty_ST_30i 0x40000000 + + #define BA_SemaHub_almostEmpty_ST_31i 0x0393 + #define B16SemaHub_almostEmpty_ST_31i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_31i 31 + #define LSb16SemaHub_almostEmpty_ST_31i 15 + #define bSemaHub_almostEmpty_ST_31i 1 + #define MSK32SemaHub_almostEmpty_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_almostFull 0x0394 + + #define BA_SemaHub_almostFull_ST_0i 0x0394 + #define B16SemaHub_almostFull_ST_0i 0x0394 + #define LSb32SemaHub_almostFull_ST_0i 0 + #define LSb16SemaHub_almostFull_ST_0i 0 + #define bSemaHub_almostFull_ST_0i 1 + #define MSK32SemaHub_almostFull_ST_0i 0x00000001 + + #define BA_SemaHub_almostFull_ST_1i 0x0394 + #define B16SemaHub_almostFull_ST_1i 0x0394 + #define LSb32SemaHub_almostFull_ST_1i 1 + #define LSb16SemaHub_almostFull_ST_1i 1 + #define bSemaHub_almostFull_ST_1i 1 + #define MSK32SemaHub_almostFull_ST_1i 0x00000002 + + #define BA_SemaHub_almostFull_ST_2i 0x0394 + #define B16SemaHub_almostFull_ST_2i 0x0394 + #define LSb32SemaHub_almostFull_ST_2i 2 + #define LSb16SemaHub_almostFull_ST_2i 2 + #define bSemaHub_almostFull_ST_2i 1 + #define MSK32SemaHub_almostFull_ST_2i 0x00000004 + + #define BA_SemaHub_almostFull_ST_3i 0x0394 + #define B16SemaHub_almostFull_ST_3i 0x0394 + #define LSb32SemaHub_almostFull_ST_3i 3 + #define LSb16SemaHub_almostFull_ST_3i 3 + #define bSemaHub_almostFull_ST_3i 1 + #define MSK32SemaHub_almostFull_ST_3i 0x00000008 + + #define BA_SemaHub_almostFull_ST_4i 0x0394 + #define B16SemaHub_almostFull_ST_4i 0x0394 + #define LSb32SemaHub_almostFull_ST_4i 4 + #define LSb16SemaHub_almostFull_ST_4i 4 + #define bSemaHub_almostFull_ST_4i 1 + #define MSK32SemaHub_almostFull_ST_4i 0x00000010 + + #define BA_SemaHub_almostFull_ST_5i 0x0394 + #define B16SemaHub_almostFull_ST_5i 0x0394 + #define LSb32SemaHub_almostFull_ST_5i 5 + #define LSb16SemaHub_almostFull_ST_5i 5 + #define bSemaHub_almostFull_ST_5i 1 + #define MSK32SemaHub_almostFull_ST_5i 0x00000020 + + #define BA_SemaHub_almostFull_ST_6i 0x0394 + #define B16SemaHub_almostFull_ST_6i 0x0394 + #define LSb32SemaHub_almostFull_ST_6i 6 + #define LSb16SemaHub_almostFull_ST_6i 6 + #define bSemaHub_almostFull_ST_6i 1 + #define MSK32SemaHub_almostFull_ST_6i 0x00000040 + + #define BA_SemaHub_almostFull_ST_7i 0x0394 + #define B16SemaHub_almostFull_ST_7i 0x0394 + #define LSb32SemaHub_almostFull_ST_7i 7 + #define LSb16SemaHub_almostFull_ST_7i 7 + #define bSemaHub_almostFull_ST_7i 1 + #define MSK32SemaHub_almostFull_ST_7i 0x00000080 + + #define BA_SemaHub_almostFull_ST_8i 0x0395 + #define B16SemaHub_almostFull_ST_8i 0x0394 + #define LSb32SemaHub_almostFull_ST_8i 8 + #define LSb16SemaHub_almostFull_ST_8i 8 + #define bSemaHub_almostFull_ST_8i 1 + #define MSK32SemaHub_almostFull_ST_8i 0x00000100 + + #define BA_SemaHub_almostFull_ST_9i 0x0395 + #define B16SemaHub_almostFull_ST_9i 0x0394 + #define LSb32SemaHub_almostFull_ST_9i 9 + #define LSb16SemaHub_almostFull_ST_9i 9 + #define bSemaHub_almostFull_ST_9i 1 + #define MSK32SemaHub_almostFull_ST_9i 0x00000200 + + #define BA_SemaHub_almostFull_ST_10i 0x0395 + #define B16SemaHub_almostFull_ST_10i 0x0394 + #define LSb32SemaHub_almostFull_ST_10i 10 + #define LSb16SemaHub_almostFull_ST_10i 10 + #define bSemaHub_almostFull_ST_10i 1 + #define MSK32SemaHub_almostFull_ST_10i 0x00000400 + + #define BA_SemaHub_almostFull_ST_11i 0x0395 + #define B16SemaHub_almostFull_ST_11i 0x0394 + #define LSb32SemaHub_almostFull_ST_11i 11 + #define LSb16SemaHub_almostFull_ST_11i 11 + #define bSemaHub_almostFull_ST_11i 1 + #define MSK32SemaHub_almostFull_ST_11i 0x00000800 + + #define BA_SemaHub_almostFull_ST_12i 0x0395 + #define B16SemaHub_almostFull_ST_12i 0x0394 + #define LSb32SemaHub_almostFull_ST_12i 12 + #define LSb16SemaHub_almostFull_ST_12i 12 + #define bSemaHub_almostFull_ST_12i 1 + #define MSK32SemaHub_almostFull_ST_12i 0x00001000 + + #define BA_SemaHub_almostFull_ST_13i 0x0395 + #define B16SemaHub_almostFull_ST_13i 0x0394 + #define LSb32SemaHub_almostFull_ST_13i 13 + #define LSb16SemaHub_almostFull_ST_13i 13 + #define bSemaHub_almostFull_ST_13i 1 + #define MSK32SemaHub_almostFull_ST_13i 0x00002000 + + #define BA_SemaHub_almostFull_ST_14i 0x0395 + #define B16SemaHub_almostFull_ST_14i 0x0394 + #define LSb32SemaHub_almostFull_ST_14i 14 + #define LSb16SemaHub_almostFull_ST_14i 14 + #define bSemaHub_almostFull_ST_14i 1 + #define MSK32SemaHub_almostFull_ST_14i 0x00004000 + + #define BA_SemaHub_almostFull_ST_15i 0x0395 + #define B16SemaHub_almostFull_ST_15i 0x0394 + #define LSb32SemaHub_almostFull_ST_15i 15 + #define LSb16SemaHub_almostFull_ST_15i 15 + #define bSemaHub_almostFull_ST_15i 1 + #define MSK32SemaHub_almostFull_ST_15i 0x00008000 + + #define BA_SemaHub_almostFull_ST_16i 0x0396 + #define B16SemaHub_almostFull_ST_16i 0x0396 + #define LSb32SemaHub_almostFull_ST_16i 16 + #define LSb16SemaHub_almostFull_ST_16i 0 + #define bSemaHub_almostFull_ST_16i 1 + #define MSK32SemaHub_almostFull_ST_16i 0x00010000 + + #define BA_SemaHub_almostFull_ST_17i 0x0396 + #define B16SemaHub_almostFull_ST_17i 0x0396 + #define LSb32SemaHub_almostFull_ST_17i 17 + #define LSb16SemaHub_almostFull_ST_17i 1 + #define bSemaHub_almostFull_ST_17i 1 + #define MSK32SemaHub_almostFull_ST_17i 0x00020000 + + #define BA_SemaHub_almostFull_ST_18i 0x0396 + #define B16SemaHub_almostFull_ST_18i 0x0396 + #define LSb32SemaHub_almostFull_ST_18i 18 + #define LSb16SemaHub_almostFull_ST_18i 2 + #define bSemaHub_almostFull_ST_18i 1 + #define MSK32SemaHub_almostFull_ST_18i 0x00040000 + + #define BA_SemaHub_almostFull_ST_19i 0x0396 + #define B16SemaHub_almostFull_ST_19i 0x0396 + #define LSb32SemaHub_almostFull_ST_19i 19 + #define LSb16SemaHub_almostFull_ST_19i 3 + #define bSemaHub_almostFull_ST_19i 1 + #define MSK32SemaHub_almostFull_ST_19i 0x00080000 + + #define BA_SemaHub_almostFull_ST_20i 0x0396 + #define B16SemaHub_almostFull_ST_20i 0x0396 + #define LSb32SemaHub_almostFull_ST_20i 20 + #define LSb16SemaHub_almostFull_ST_20i 4 + #define bSemaHub_almostFull_ST_20i 1 + #define MSK32SemaHub_almostFull_ST_20i 0x00100000 + + #define BA_SemaHub_almostFull_ST_21i 0x0396 + #define B16SemaHub_almostFull_ST_21i 0x0396 + #define LSb32SemaHub_almostFull_ST_21i 21 + #define LSb16SemaHub_almostFull_ST_21i 5 + #define bSemaHub_almostFull_ST_21i 1 + #define MSK32SemaHub_almostFull_ST_21i 0x00200000 + + #define BA_SemaHub_almostFull_ST_22i 0x0396 + #define B16SemaHub_almostFull_ST_22i 0x0396 + #define LSb32SemaHub_almostFull_ST_22i 22 + #define LSb16SemaHub_almostFull_ST_22i 6 + #define bSemaHub_almostFull_ST_22i 1 + #define MSK32SemaHub_almostFull_ST_22i 0x00400000 + + #define BA_SemaHub_almostFull_ST_23i 0x0396 + #define B16SemaHub_almostFull_ST_23i 0x0396 + #define LSb32SemaHub_almostFull_ST_23i 23 + #define LSb16SemaHub_almostFull_ST_23i 7 + #define bSemaHub_almostFull_ST_23i 1 + #define MSK32SemaHub_almostFull_ST_23i 0x00800000 + + #define BA_SemaHub_almostFull_ST_24i 0x0397 + #define B16SemaHub_almostFull_ST_24i 0x0396 + #define LSb32SemaHub_almostFull_ST_24i 24 + #define LSb16SemaHub_almostFull_ST_24i 8 + #define bSemaHub_almostFull_ST_24i 1 + #define MSK32SemaHub_almostFull_ST_24i 0x01000000 + + #define BA_SemaHub_almostFull_ST_25i 0x0397 + #define B16SemaHub_almostFull_ST_25i 0x0396 + #define LSb32SemaHub_almostFull_ST_25i 25 + #define LSb16SemaHub_almostFull_ST_25i 9 + #define bSemaHub_almostFull_ST_25i 1 + #define MSK32SemaHub_almostFull_ST_25i 0x02000000 + + #define BA_SemaHub_almostFull_ST_26i 0x0397 + #define B16SemaHub_almostFull_ST_26i 0x0396 + #define LSb32SemaHub_almostFull_ST_26i 26 + #define LSb16SemaHub_almostFull_ST_26i 10 + #define bSemaHub_almostFull_ST_26i 1 + #define MSK32SemaHub_almostFull_ST_26i 0x04000000 + + #define BA_SemaHub_almostFull_ST_27i 0x0397 + #define B16SemaHub_almostFull_ST_27i 0x0396 + #define LSb32SemaHub_almostFull_ST_27i 27 + #define LSb16SemaHub_almostFull_ST_27i 11 + #define bSemaHub_almostFull_ST_27i 1 + #define MSK32SemaHub_almostFull_ST_27i 0x08000000 + + #define BA_SemaHub_almostFull_ST_28i 0x0397 + #define B16SemaHub_almostFull_ST_28i 0x0396 + #define LSb32SemaHub_almostFull_ST_28i 28 + #define LSb16SemaHub_almostFull_ST_28i 12 + #define bSemaHub_almostFull_ST_28i 1 + #define MSK32SemaHub_almostFull_ST_28i 0x10000000 + + #define BA_SemaHub_almostFull_ST_29i 0x0397 + #define B16SemaHub_almostFull_ST_29i 0x0396 + #define LSb32SemaHub_almostFull_ST_29i 29 + #define LSb16SemaHub_almostFull_ST_29i 13 + #define bSemaHub_almostFull_ST_29i 1 + #define MSK32SemaHub_almostFull_ST_29i 0x20000000 + + #define BA_SemaHub_almostFull_ST_30i 0x0397 + #define B16SemaHub_almostFull_ST_30i 0x0396 + #define LSb32SemaHub_almostFull_ST_30i 30 + #define LSb16SemaHub_almostFull_ST_30i 14 + #define bSemaHub_almostFull_ST_30i 1 + #define MSK32SemaHub_almostFull_ST_30i 0x40000000 + + #define BA_SemaHub_almostFull_ST_31i 0x0397 + #define B16SemaHub_almostFull_ST_31i 0x0396 + #define LSb32SemaHub_almostFull_ST_31i 31 + #define LSb16SemaHub_almostFull_ST_31i 15 + #define bSemaHub_almostFull_ST_31i 1 + #define MSK32SemaHub_almostFull_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaHub { + /////////////////////////////////////////////////////////// + SIE_SemaQuery ie_counter[64]; + /////////////////////////////////////////////////////////// + SIE_Semaphore ie_cell[32]; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_PUSH_ID(r32) _BFGET_(r32, 7, 0) + #define SET32SemaHub_PUSH_ID(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16SemaHub_PUSH_ID(r16) _BFGET_(r16, 7, 0) + #define SET16SemaHub_PUSH_ID(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32SemaHub_PUSH_delta(r32) _BFGET_(r32,15, 8) + #define SET32SemaHub_PUSH_delta(r32,v) _BFSET_(r32,15, 8,v) + #define GET16SemaHub_PUSH_delta(r16) _BFGET_(r16,15, 8) + #define SET16SemaHub_PUSH_delta(r16,v) _BFSET_(r16,15, 8,v) + + #define w32SemaHub_PUSH {\ + UNSG32 uPUSH_ID : 8;\ + UNSG32 uPUSH_delta : 8;\ + UNSG32 RSVDx380_b16 : 16;\ + } + union { UNSG32 u32SemaHub_PUSH; + struct w32SemaHub_PUSH; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_POP_ID(r32) _BFGET_(r32, 7, 0) + #define SET32SemaHub_POP_ID(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16SemaHub_POP_ID(r16) _BFGET_(r16, 7, 0) + #define SET16SemaHub_POP_ID(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32SemaHub_POP_delta(r32) _BFGET_(r32,15, 8) + #define SET32SemaHub_POP_delta(r32,v) _BFSET_(r32,15, 8,v) + #define GET16SemaHub_POP_delta(r16) _BFGET_(r16,15, 8) + #define SET16SemaHub_POP_delta(r16,v) _BFSET_(r16,15, 8,v) + + #define w32SemaHub_POP {\ + UNSG32 uPOP_ID : 8;\ + UNSG32 uPOP_delta : 8;\ + UNSG32 RSVDx384_b16 : 16;\ + } + union { UNSG32 u32SemaHub_POP; + struct w32SemaHub_POP; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_empty_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_empty_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_empty_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_empty_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_empty_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_empty_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_empty_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_empty_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_empty_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_empty_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_empty_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_empty_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_empty_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_empty_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_empty_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_empty_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_empty_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_empty_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_empty_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_empty_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_empty_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_empty_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_empty_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_empty_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_empty_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_empty_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_empty_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_empty_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_empty_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_empty_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_empty_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_empty_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_empty_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_empty_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_empty_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_empty_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_empty_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_empty_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_empty_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_empty_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_empty_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_empty_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_empty_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_empty_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_empty_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_empty_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_empty_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_empty_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_empty_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_empty_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_empty_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_empty_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_empty_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_empty_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_empty_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_empty_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_empty_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_empty_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_empty_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_empty_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_empty_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_empty_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_empty_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_empty_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_empty_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_empty_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_empty_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_empty_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_empty_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_empty_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_empty_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_empty_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_empty_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_empty_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_empty_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_empty_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_empty_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_empty_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_empty_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_empty_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_empty_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_empty_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_empty_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_empty_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_empty_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_empty_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_empty_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_empty_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_empty_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_empty_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_empty_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_empty_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_empty_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_empty_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_empty_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_empty_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_empty_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_empty_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_empty_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_empty_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_empty_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_empty_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_empty_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_empty_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_empty_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_empty_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_empty_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_empty_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_empty_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_empty_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_empty_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_empty_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_empty_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_empty_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_empty_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_empty_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_empty_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_empty_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_empty_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_empty_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_empty_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_empty_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_empty_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_empty_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_empty_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_empty_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_empty_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_empty_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_empty {\ + UNSG32 uempty_ST_0i : 1;\ + UNSG32 uempty_ST_1i : 1;\ + UNSG32 uempty_ST_2i : 1;\ + UNSG32 uempty_ST_3i : 1;\ + UNSG32 uempty_ST_4i : 1;\ + UNSG32 uempty_ST_5i : 1;\ + UNSG32 uempty_ST_6i : 1;\ + UNSG32 uempty_ST_7i : 1;\ + UNSG32 uempty_ST_8i : 1;\ + UNSG32 uempty_ST_9i : 1;\ + UNSG32 uempty_ST_10i : 1;\ + UNSG32 uempty_ST_11i : 1;\ + UNSG32 uempty_ST_12i : 1;\ + UNSG32 uempty_ST_13i : 1;\ + UNSG32 uempty_ST_14i : 1;\ + UNSG32 uempty_ST_15i : 1;\ + UNSG32 uempty_ST_16i : 1;\ + UNSG32 uempty_ST_17i : 1;\ + UNSG32 uempty_ST_18i : 1;\ + UNSG32 uempty_ST_19i : 1;\ + UNSG32 uempty_ST_20i : 1;\ + UNSG32 uempty_ST_21i : 1;\ + UNSG32 uempty_ST_22i : 1;\ + UNSG32 uempty_ST_23i : 1;\ + UNSG32 uempty_ST_24i : 1;\ + UNSG32 uempty_ST_25i : 1;\ + UNSG32 uempty_ST_26i : 1;\ + UNSG32 uempty_ST_27i : 1;\ + UNSG32 uempty_ST_28i : 1;\ + UNSG32 uempty_ST_29i : 1;\ + UNSG32 uempty_ST_30i : 1;\ + UNSG32 uempty_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_empty; + struct w32SemaHub_empty; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_full_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_full_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_full_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_full_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_full_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_full_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_full_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_full_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_full_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_full_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_full_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_full_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_full_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_full_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_full_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_full_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_full_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_full_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_full_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_full_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_full_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_full_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_full_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_full_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_full_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_full_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_full_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_full_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_full_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_full_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_full_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_full_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_full_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_full_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_full_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_full_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_full_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_full_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_full_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_full_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_full_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_full_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_full_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_full_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_full_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_full_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_full_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_full_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_full_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_full_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_full_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_full_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_full_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_full_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_full_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_full_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_full_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_full_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_full_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_full_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_full_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_full_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_full_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_full_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_full_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_full_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_full_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_full_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_full_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_full_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_full_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_full_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_full_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_full_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_full_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_full_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_full_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_full_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_full_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_full_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_full_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_full_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_full_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_full_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_full_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_full_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_full_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_full_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_full_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_full_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_full_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_full_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_full_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_full_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_full_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_full_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_full_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_full_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_full_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_full_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_full_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_full_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_full_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_full_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_full_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_full_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_full_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_full_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_full_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_full_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_full_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_full_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_full_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_full_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_full_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_full_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_full_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_full_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_full_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_full_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_full_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_full_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_full_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_full_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_full_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_full_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_full_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_full_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_full {\ + UNSG32 ufull_ST_0i : 1;\ + UNSG32 ufull_ST_1i : 1;\ + UNSG32 ufull_ST_2i : 1;\ + UNSG32 ufull_ST_3i : 1;\ + UNSG32 ufull_ST_4i : 1;\ + UNSG32 ufull_ST_5i : 1;\ + UNSG32 ufull_ST_6i : 1;\ + UNSG32 ufull_ST_7i : 1;\ + UNSG32 ufull_ST_8i : 1;\ + UNSG32 ufull_ST_9i : 1;\ + UNSG32 ufull_ST_10i : 1;\ + UNSG32 ufull_ST_11i : 1;\ + UNSG32 ufull_ST_12i : 1;\ + UNSG32 ufull_ST_13i : 1;\ + UNSG32 ufull_ST_14i : 1;\ + UNSG32 ufull_ST_15i : 1;\ + UNSG32 ufull_ST_16i : 1;\ + UNSG32 ufull_ST_17i : 1;\ + UNSG32 ufull_ST_18i : 1;\ + UNSG32 ufull_ST_19i : 1;\ + UNSG32 ufull_ST_20i : 1;\ + UNSG32 ufull_ST_21i : 1;\ + UNSG32 ufull_ST_22i : 1;\ + UNSG32 ufull_ST_23i : 1;\ + UNSG32 ufull_ST_24i : 1;\ + UNSG32 ufull_ST_25i : 1;\ + UNSG32 ufull_ST_26i : 1;\ + UNSG32 ufull_ST_27i : 1;\ + UNSG32 ufull_ST_28i : 1;\ + UNSG32 ufull_ST_29i : 1;\ + UNSG32 ufull_ST_30i : 1;\ + UNSG32 ufull_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_full; + struct w32SemaHub_full; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_almostEmpty_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_almostEmpty_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_almostEmpty_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostEmpty_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostEmpty_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_almostEmpty_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_almostEmpty_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostEmpty_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostEmpty_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_almostEmpty_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_almostEmpty_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostEmpty_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostEmpty_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_almostEmpty_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_almostEmpty_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostEmpty_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostEmpty_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_almostEmpty_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_almostEmpty_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostEmpty_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostEmpty_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_almostEmpty_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_almostEmpty_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostEmpty_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostEmpty_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_almostEmpty_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_almostEmpty_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostEmpty_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostEmpty_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_almostEmpty_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_almostEmpty_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostEmpty_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostEmpty_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_almostEmpty_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_almostEmpty_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostEmpty_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostEmpty_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_almostEmpty_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_almostEmpty_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostEmpty_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostEmpty_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_almostEmpty_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_almostEmpty_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostEmpty_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostEmpty_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_almostEmpty_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_almostEmpty_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostEmpty_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostEmpty_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_almostEmpty_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_almostEmpty_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostEmpty_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostEmpty_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_almostEmpty_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_almostEmpty_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostEmpty_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostEmpty_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_almostEmpty_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_almostEmpty_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostEmpty_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostEmpty_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_almostEmpty_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_almostEmpty_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostEmpty_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_almostEmpty_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_almostEmpty_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_almostEmpty_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostEmpty_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostEmpty_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_almostEmpty_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_almostEmpty_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostEmpty_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostEmpty_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_almostEmpty_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_almostEmpty_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostEmpty_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostEmpty_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_almostEmpty_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_almostEmpty_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostEmpty_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostEmpty_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_almostEmpty_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_almostEmpty_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostEmpty_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostEmpty_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_almostEmpty_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_almostEmpty_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostEmpty_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostEmpty_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_almostEmpty_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_almostEmpty_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostEmpty_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostEmpty_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_almostEmpty_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_almostEmpty_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostEmpty_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostEmpty_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_almostEmpty_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_almostEmpty_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostEmpty_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostEmpty_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_almostEmpty_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_almostEmpty_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostEmpty_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostEmpty_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_almostEmpty_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_almostEmpty_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostEmpty_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostEmpty_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_almostEmpty_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_almostEmpty_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostEmpty_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostEmpty_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_almostEmpty_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_almostEmpty_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostEmpty_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostEmpty_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_almostEmpty_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_almostEmpty_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostEmpty_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostEmpty_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_almostEmpty_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_almostEmpty_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostEmpty_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostEmpty_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_almostEmpty_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_almostEmpty_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostEmpty_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_almostEmpty {\ + UNSG32 ualmostEmpty_ST_0i : 1;\ + UNSG32 ualmostEmpty_ST_1i : 1;\ + UNSG32 ualmostEmpty_ST_2i : 1;\ + UNSG32 ualmostEmpty_ST_3i : 1;\ + UNSG32 ualmostEmpty_ST_4i : 1;\ + UNSG32 ualmostEmpty_ST_5i : 1;\ + UNSG32 ualmostEmpty_ST_6i : 1;\ + UNSG32 ualmostEmpty_ST_7i : 1;\ + UNSG32 ualmostEmpty_ST_8i : 1;\ + UNSG32 ualmostEmpty_ST_9i : 1;\ + UNSG32 ualmostEmpty_ST_10i : 1;\ + UNSG32 ualmostEmpty_ST_11i : 1;\ + UNSG32 ualmostEmpty_ST_12i : 1;\ + UNSG32 ualmostEmpty_ST_13i : 1;\ + UNSG32 ualmostEmpty_ST_14i : 1;\ + UNSG32 ualmostEmpty_ST_15i : 1;\ + UNSG32 ualmostEmpty_ST_16i : 1;\ + UNSG32 ualmostEmpty_ST_17i : 1;\ + UNSG32 ualmostEmpty_ST_18i : 1;\ + UNSG32 ualmostEmpty_ST_19i : 1;\ + UNSG32 ualmostEmpty_ST_20i : 1;\ + UNSG32 ualmostEmpty_ST_21i : 1;\ + UNSG32 ualmostEmpty_ST_22i : 1;\ + UNSG32 ualmostEmpty_ST_23i : 1;\ + UNSG32 ualmostEmpty_ST_24i : 1;\ + UNSG32 ualmostEmpty_ST_25i : 1;\ + UNSG32 ualmostEmpty_ST_26i : 1;\ + UNSG32 ualmostEmpty_ST_27i : 1;\ + UNSG32 ualmostEmpty_ST_28i : 1;\ + UNSG32 ualmostEmpty_ST_29i : 1;\ + UNSG32 ualmostEmpty_ST_30i : 1;\ + UNSG32 ualmostEmpty_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_almostEmpty; + struct w32SemaHub_almostEmpty; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_almostFull_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_almostFull_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_almostFull_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostFull_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostFull_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_almostFull_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_almostFull_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostFull_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostFull_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_almostFull_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_almostFull_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostFull_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostFull_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_almostFull_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_almostFull_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostFull_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostFull_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_almostFull_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_almostFull_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostFull_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostFull_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_almostFull_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_almostFull_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostFull_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostFull_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_almostFull_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_almostFull_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostFull_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostFull_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_almostFull_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_almostFull_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostFull_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostFull_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_almostFull_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_almostFull_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostFull_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostFull_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_almostFull_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_almostFull_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostFull_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostFull_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_almostFull_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_almostFull_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostFull_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostFull_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_almostFull_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_almostFull_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostFull_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostFull_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_almostFull_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_almostFull_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostFull_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostFull_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_almostFull_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_almostFull_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostFull_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostFull_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_almostFull_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_almostFull_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostFull_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostFull_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_almostFull_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_almostFull_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostFull_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_almostFull_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_almostFull_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_almostFull_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostFull_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostFull_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_almostFull_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_almostFull_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostFull_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostFull_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_almostFull_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_almostFull_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostFull_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostFull_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_almostFull_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_almostFull_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostFull_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostFull_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_almostFull_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_almostFull_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostFull_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostFull_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_almostFull_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_almostFull_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostFull_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostFull_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_almostFull_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_almostFull_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostFull_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostFull_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_almostFull_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_almostFull_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostFull_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostFull_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_almostFull_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_almostFull_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostFull_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostFull_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_almostFull_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_almostFull_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostFull_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostFull_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_almostFull_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_almostFull_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostFull_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostFull_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_almostFull_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_almostFull_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostFull_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostFull_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_almostFull_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_almostFull_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostFull_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostFull_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_almostFull_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_almostFull_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostFull_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostFull_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_almostFull_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_almostFull_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostFull_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostFull_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_almostFull_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_almostFull_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostFull_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_almostFull {\ + UNSG32 ualmostFull_ST_0i : 1;\ + UNSG32 ualmostFull_ST_1i : 1;\ + UNSG32 ualmostFull_ST_2i : 1;\ + UNSG32 ualmostFull_ST_3i : 1;\ + UNSG32 ualmostFull_ST_4i : 1;\ + UNSG32 ualmostFull_ST_5i : 1;\ + UNSG32 ualmostFull_ST_6i : 1;\ + UNSG32 ualmostFull_ST_7i : 1;\ + UNSG32 ualmostFull_ST_8i : 1;\ + UNSG32 ualmostFull_ST_9i : 1;\ + UNSG32 ualmostFull_ST_10i : 1;\ + UNSG32 ualmostFull_ST_11i : 1;\ + UNSG32 ualmostFull_ST_12i : 1;\ + UNSG32 ualmostFull_ST_13i : 1;\ + UNSG32 ualmostFull_ST_14i : 1;\ + UNSG32 ualmostFull_ST_15i : 1;\ + UNSG32 ualmostFull_ST_16i : 1;\ + UNSG32 ualmostFull_ST_17i : 1;\ + UNSG32 ualmostFull_ST_18i : 1;\ + UNSG32 ualmostFull_ST_19i : 1;\ + UNSG32 ualmostFull_ST_20i : 1;\ + UNSG32 ualmostFull_ST_21i : 1;\ + UNSG32 ualmostFull_ST_22i : 1;\ + UNSG32 ualmostFull_ST_23i : 1;\ + UNSG32 ualmostFull_ST_24i : 1;\ + UNSG32 ualmostFull_ST_25i : 1;\ + UNSG32 ualmostFull_ST_26i : 1;\ + UNSG32 ualmostFull_ST_27i : 1;\ + UNSG32 ualmostFull_ST_28i : 1;\ + UNSG32 ualmostFull_ST_29i : 1;\ + UNSG32 ualmostFull_ST_30i : 1;\ + UNSG32 ualmostFull_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_almostFull; + struct w32SemaHub_almostFull; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx398 [104]; + /////////////////////////////////////////////////////////// + } SIE_SemaHub; + + typedef union T32SemaHub_PUSH + { UNSG32 u32; + struct w32SemaHub_PUSH; + } T32SemaHub_PUSH; + typedef union T32SemaHub_POP + { UNSG32 u32; + struct w32SemaHub_POP; + } T32SemaHub_POP; + typedef union T32SemaHub_empty + { UNSG32 u32; + struct w32SemaHub_empty; + } T32SemaHub_empty; + typedef union T32SemaHub_full + { UNSG32 u32; + struct w32SemaHub_full; + } T32SemaHub_full; + typedef union T32SemaHub_almostEmpty + { UNSG32 u32; + struct w32SemaHub_almostEmpty; + } T32SemaHub_almostEmpty; + typedef union T32SemaHub_almostFull + { UNSG32 u32; + struct w32SemaHub_almostFull; + } T32SemaHub_almostFull; + /////////////////////////////////////////////////////////// + + typedef union TSemaHub_PUSH + { UNSG32 u32[1]; + struct { + struct w32SemaHub_PUSH; + }; + } TSemaHub_PUSH; + typedef union TSemaHub_POP + { UNSG32 u32[1]; + struct { + struct w32SemaHub_POP; + }; + } TSemaHub_POP; + typedef union TSemaHub_empty + { UNSG32 u32[1]; + struct { + struct w32SemaHub_empty; + }; + } TSemaHub_empty; + typedef union TSemaHub_full + { UNSG32 u32[1]; + struct { + struct w32SemaHub_full; + }; + } TSemaHub_full; + typedef union TSemaHub_almostEmpty + { UNSG32 u32[1]; + struct { + struct w32SemaHub_almostEmpty; + }; + } TSemaHub_almostEmpty; + typedef union TSemaHub_almostFull + { UNSG32 u32[1]; + struct { + struct w32SemaHub_almostFull; + }; + } TSemaHub_almostFull; + + /////////////////////////////////////////////////////////// + SIGN32 SemaHub_drvrd(SIE_SemaHub *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaHub_drvwr(SIE_SemaHub *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaHub_reset(SIE_SemaHub *p); + SIGN32 SemaHub_cmp (SIE_SemaHub *p, SIE_SemaHub *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaHub_check(p,pie,pfx,hLOG) SemaHub_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaHub_print(p, pfx,hLOG) SemaHub_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaHub +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE FiFo biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 20 BASE +/// ### +/// * Base address (byte-address) of a FIFO in the shared SRAM. A channel's read/write pointers will be added to this “BASE†to get exact location of shared SRAM. +/// * Note: aligned with base SRAM data bus. +/// * For example, if SRAM data is 64-bit, then base[2:0] should be 3'b0; +/// ### +/// %% 12 # Stuffing bits... +/// @ 0x00004 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to this register will enable this channel, or 0 to this register will disable this channel. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to clear FIFO pointers to 0. +/// * Note : +/// * CPU should make sure to disabled the channel (write 0 to START_EN register) before issue clear command, otherwise the clear request will be ignored. +/// * Do not restart the channel when clear operation is in process. +/// * HW will make sure there is no pending transactions before execute the clear operation. +/// * Associated semaphore cell needs reset separately by re-write “CFG_DEPTH†+/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C FLUSH (W-) +/// %unsigned 1 EN +/// ### +/// * No support for now +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 23b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_FiFo +#define h_FiFo (){} + + #define RA_FiFo_CFG 0x0000 + + #define BA_FiFo_CFG_BASE 0x0000 + #define B16FiFo_CFG_BASE 0x0000 + #define LSb32FiFo_CFG_BASE 0 + #define LSb16FiFo_CFG_BASE 0 + #define bFiFo_CFG_BASE 20 + #define MSK32FiFo_CFG_BASE 0x000FFFFF + /////////////////////////////////////////////////////////// + #define RA_FiFo_START 0x0004 + + #define BA_FiFo_START_EN 0x0004 + #define B16FiFo_START_EN 0x0004 + #define LSb32FiFo_START_EN 0 + #define LSb16FiFo_START_EN 0 + #define bFiFo_START_EN 1 + #define MSK32FiFo_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_FiFo_CLEAR 0x0008 + + #define BA_FiFo_CLEAR_EN 0x0008 + #define B16FiFo_CLEAR_EN 0x0008 + #define LSb32FiFo_CLEAR_EN 0 + #define LSb16FiFo_CLEAR_EN 0 + #define bFiFo_CLEAR_EN 1 + #define MSK32FiFo_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_FiFo_FLUSH 0x000C + + #define BA_FiFo_FLUSH_EN 0x000C + #define B16FiFo_FLUSH_EN 0x000C + #define LSb32FiFo_FLUSH_EN 0 + #define LSb16FiFo_FLUSH_EN 0 + #define bFiFo_FLUSH_EN 1 + #define MSK32FiFo_FLUSH_EN 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_FiFo { + /////////////////////////////////////////////////////////// + #define GET32FiFo_CFG_BASE(r32) _BFGET_(r32,19, 0) + #define SET32FiFo_CFG_BASE(r32,v) _BFSET_(r32,19, 0,v) + + #define w32FiFo_CFG {\ + UNSG32 uCFG_BASE : 20;\ + UNSG32 RSVDx0_b20 : 12;\ + } + union { UNSG32 u32FiFo_CFG; + struct w32FiFo_CFG; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } + union { UNSG32 u32FiFo_START; + struct w32FiFo_START; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32FiFo_CLEAR; + struct w32FiFo_CLEAR; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_FLUSH_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_FLUSH_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_FLUSH_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_FLUSH_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_FLUSH {\ + UNSG32 uFLUSH_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32FiFo_FLUSH; + struct w32FiFo_FLUSH; + }; + /////////////////////////////////////////////////////////// + } SIE_FiFo; + + typedef union T32FiFo_CFG + { UNSG32 u32; + struct w32FiFo_CFG; + } T32FiFo_CFG; + typedef union T32FiFo_START + { UNSG32 u32; + struct w32FiFo_START; + } T32FiFo_START; + typedef union T32FiFo_CLEAR + { UNSG32 u32; + struct w32FiFo_CLEAR; + } T32FiFo_CLEAR; + typedef union T32FiFo_FLUSH + { UNSG32 u32; + struct w32FiFo_FLUSH; + } T32FiFo_FLUSH; + /////////////////////////////////////////////////////////// + + typedef union TFiFo_CFG + { UNSG32 u32[1]; + struct { + struct w32FiFo_CFG; + }; + } TFiFo_CFG; + typedef union TFiFo_START + { UNSG32 u32[1]; + struct { + struct w32FiFo_START; + }; + } TFiFo_START; + typedef union TFiFo_CLEAR + { UNSG32 u32[1]; + struct { + struct w32FiFo_CLEAR; + }; + } TFiFo_CLEAR; + typedef union TFiFo_FLUSH + { UNSG32 u32[1]; + struct { + struct w32FiFo_FLUSH; + }; + } TFiFo_FLUSH; + + /////////////////////////////////////////////////////////// + SIGN32 FiFo_drvrd(SIE_FiFo *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 FiFo_drvwr(SIE_FiFo *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void FiFo_reset(SIE_FiFo *p); + SIGN32 FiFo_cmp (SIE_FiFo *p, SIE_FiFo *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define FiFo_check(p,pie,pfx,hLOG) FiFo_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define FiFo_print(p, pfx,hLOG) FiFo_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: FiFo +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE HBO biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 FiFoCtl +/// $SemaHub FiFoCtl REG +/// @ 0x00400 ARR (P) +/// # 0x00400 FiFo +/// $FiFo FiFo REG [32] +/// ### +/// * Up-to 32 FIFO channels +/// * FiFo[N] is controlled by HBO.FiFoCtl.Channel[N] +/// ### +/// @ 0x00600 BUSY (R-) +/// %unsigned 32 ST +/// ### +/// * Per channel status +/// * Indicate the clear operation status. +/// * 1: clear is in process. +/// * 0 : clear is done. +/// ### +/// @ 0x00604 (W-) +/// # # Stuffing bytes... +/// %% 2016 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 1792B, bits: 1920b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_HBO +#define h_HBO (){} + + #define RA_HBO_FiFoCtl 0x0000 + /////////////////////////////////////////////////////////// + #define RA_HBO_ARR 0x0400 + #define RA_HBO_FiFo 0x0400 + /////////////////////////////////////////////////////////// + #define RA_HBO_BUSY 0x0600 + + #define BA_HBO_BUSY_ST 0x0600 + #define B16HBO_BUSY_ST 0x0600 + #define LSb32HBO_BUSY_ST 0 + #define LSb16HBO_BUSY_ST 0 + #define bHBO_BUSY_ST 32 + #define MSK32HBO_BUSY_ST 0xFFFFFFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_HBO { + /////////////////////////////////////////////////////////// + SIE_SemaHub ie_FiFoCtl; + /////////////////////////////////////////////////////////// + SIE_FiFo ie_FiFo[32]; + /////////////////////////////////////////////////////////// + #define GET32HBO_BUSY_ST(r32) _BFGET_(r32,31, 0) + #define SET32HBO_BUSY_ST(r32,v) _BFSET_(r32,31, 0,v) + + #define w32HBO_BUSY {\ + UNSG32 uBUSY_ST : 32;\ + } + union { UNSG32 u32HBO_BUSY; + struct w32HBO_BUSY; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx604 [252]; + /////////////////////////////////////////////////////////// + } SIE_HBO; + + typedef union T32HBO_BUSY + { UNSG32 u32; + struct w32HBO_BUSY; + } T32HBO_BUSY; + /////////////////////////////////////////////////////////// + + typedef union THBO_BUSY + { UNSG32 u32[1]; + struct { + struct w32HBO_BUSY; + }; + } THBO_BUSY; + + /////////////////////////////////////////////////////////// + SIGN32 HBO_drvrd(SIE_HBO *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 HBO_drvwr(SIE_HBO *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void HBO_reset(SIE_HBO *p); + SIGN32 HBO_cmp (SIE_HBO *p, SIE_HBO *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define HBO_check(p,pie,pfx,hLOG) HBO_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define HBO_print(p, pfx,hLOG) HBO_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: HBO +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE LLDesFmt biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 mem (P) +/// %unsigned 16 size +/// ### +/// * The size of one piece of scattered memory. +/// ### +/// %% 16 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 16b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_LLDesFmt +#define h_LLDesFmt (){} + + #define RA_LLDesFmt_mem 0x0000 + + #define BA_LLDesFmt_mem_size 0x0000 + #define B16LLDesFmt_mem_size 0x0000 + #define LSb32LLDesFmt_mem_size 0 + #define LSb16LLDesFmt_mem_size 0 + #define bLLDesFmt_mem_size 16 + #define MSK32LLDesFmt_mem_size 0x0000FFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_LLDesFmt { + /////////////////////////////////////////////////////////// + #define GET32LLDesFmt_mem_size(r32) _BFGET_(r32,15, 0) + #define SET32LLDesFmt_mem_size(r32,v) _BFSET_(r32,15, 0,v) + #define GET16LLDesFmt_mem_size(r16) _BFGET_(r16,15, 0) + #define SET16LLDesFmt_mem_size(r16,v) _BFSET_(r16,15, 0,v) + + #define w32LLDesFmt_mem {\ + UNSG32 umem_size : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32LLDesFmt_mem; + struct w32LLDesFmt_mem; + }; + /////////////////////////////////////////////////////////// + } SIE_LLDesFmt; + + typedef union T32LLDesFmt_mem + { UNSG32 u32; + struct w32LLDesFmt_mem; + } T32LLDesFmt_mem; + /////////////////////////////////////////////////////////// + + typedef union TLLDesFmt_mem + { UNSG32 u32[1]; + struct { + struct w32LLDesFmt_mem; + }; + } TLLDesFmt_mem; + + /////////////////////////////////////////////////////////// + SIGN32 LLDesFmt_drvrd(SIE_LLDesFmt *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 LLDesFmt_drvwr(SIE_LLDesFmt *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void LLDesFmt_reset(SIE_LLDesFmt *p); + SIGN32 LLDesFmt_cmp (SIE_LLDesFmt *p, SIE_LLDesFmt *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define LLDesFmt_check(p,pie,pfx,hLOG) LLDesFmt_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define LLDesFmt_print(p, pfx,hLOG) LLDesFmt_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: LLDesFmt +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmdHDR (4,4) +/// ### +/// * 32-bit dHub command header +/// * [0:31] +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 DESC (W-) +/// %unsigned 16 size +/// ### +/// * amount of data to be transferred, in bytes or MTU. +/// * Size of 0 is forbidden. +/// ### +/// %unsigned 1 sizeMTU +/// ### +/// * 0: size given in bytes; +/// * 1: size given in MTU (see dHubChCtl.CFG.MTU for MTU size definition) +/// ### +/// %unsigned 1 semOpMTU +/// ### +/// * 0: semaphore operations applied on dHubCmd level +/// * 1: semaphore operations applied on MTU level +/// ### +/// %unsigned 5 chkSemId +/// ### +/// * ID of semaphore to check before cmd / MTU; +/// * 0 indicates semaphore check is disabled +/// ### +/// %unsigned 5 updSemId +/// ### +/// * ID of semaphore to update after cmd / MTU; +/// * 0 indicates semaphore update is disabled +/// ### +/// %unsigned 1 interrupt +/// ### +/// * 1: raise interrupt upon command finish +/// * end dHubCmdHDR +/// ### +/// %% 3 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 29b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmdHDR +#define h_dHubCmdHDR (){} + + #define RA_dHubCmdHDR_DESC 0x0000 + + #define BA_dHubCmdHDR_DESC_size 0x0000 + #define B16dHubCmdHDR_DESC_size 0x0000 + #define LSb32dHubCmdHDR_DESC_size 0 + #define LSb16dHubCmdHDR_DESC_size 0 + #define bdHubCmdHDR_DESC_size 16 + #define MSK32dHubCmdHDR_DESC_size 0x0000FFFF + + #define BA_dHubCmdHDR_DESC_sizeMTU 0x0002 + #define B16dHubCmdHDR_DESC_sizeMTU 0x0002 + #define LSb32dHubCmdHDR_DESC_sizeMTU 16 + #define LSb16dHubCmdHDR_DESC_sizeMTU 0 + #define bdHubCmdHDR_DESC_sizeMTU 1 + #define MSK32dHubCmdHDR_DESC_sizeMTU 0x00010000 + + #define BA_dHubCmdHDR_DESC_semOpMTU 0x0002 + #define B16dHubCmdHDR_DESC_semOpMTU 0x0002 + #define LSb32dHubCmdHDR_DESC_semOpMTU 17 + #define LSb16dHubCmdHDR_DESC_semOpMTU 1 + #define bdHubCmdHDR_DESC_semOpMTU 1 + #define MSK32dHubCmdHDR_DESC_semOpMTU 0x00020000 + + #define BA_dHubCmdHDR_DESC_chkSemId 0x0002 + #define B16dHubCmdHDR_DESC_chkSemId 0x0002 + #define LSb32dHubCmdHDR_DESC_chkSemId 18 + #define LSb16dHubCmdHDR_DESC_chkSemId 2 + #define bdHubCmdHDR_DESC_chkSemId 5 + #define MSK32dHubCmdHDR_DESC_chkSemId 0x007C0000 + + #define BA_dHubCmdHDR_DESC_updSemId 0x0002 + #define B16dHubCmdHDR_DESC_updSemId 0x0002 + #define LSb32dHubCmdHDR_DESC_updSemId 23 + #define LSb16dHubCmdHDR_DESC_updSemId 7 + #define bdHubCmdHDR_DESC_updSemId 5 + #define MSK32dHubCmdHDR_DESC_updSemId 0x0F800000 + + #define BA_dHubCmdHDR_DESC_interrupt 0x0003 + #define B16dHubCmdHDR_DESC_interrupt 0x0002 + #define LSb32dHubCmdHDR_DESC_interrupt 28 + #define LSb16dHubCmdHDR_DESC_interrupt 12 + #define bdHubCmdHDR_DESC_interrupt 1 + #define MSK32dHubCmdHDR_DESC_interrupt 0x10000000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmdHDR { + /////////////////////////////////////////////////////////// + #define GET32dHubCmdHDR_DESC_size(r32) _BFGET_(r32,15, 0) + #define SET32dHubCmdHDR_DESC_size(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubCmdHDR_DESC_size(r16) _BFGET_(r16,15, 0) + #define SET16dHubCmdHDR_DESC_size(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubCmdHDR_DESC_sizeMTU(r32) _BFGET_(r32,16,16) + #define SET32dHubCmdHDR_DESC_sizeMTU(r32,v) _BFSET_(r32,16,16,v) + #define GET16dHubCmdHDR_DESC_sizeMTU(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmdHDR_DESC_sizeMTU(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32dHubCmdHDR_DESC_semOpMTU(r32) _BFGET_(r32,17,17) + #define SET32dHubCmdHDR_DESC_semOpMTU(r32,v) _BFSET_(r32,17,17,v) + #define GET16dHubCmdHDR_DESC_semOpMTU(r16) _BFGET_(r16, 1, 1) + #define SET16dHubCmdHDR_DESC_semOpMTU(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32dHubCmdHDR_DESC_chkSemId(r32) _BFGET_(r32,22,18) + #define SET32dHubCmdHDR_DESC_chkSemId(r32,v) _BFSET_(r32,22,18,v) + #define GET16dHubCmdHDR_DESC_chkSemId(r16) _BFGET_(r16, 6, 2) + #define SET16dHubCmdHDR_DESC_chkSemId(r16,v) _BFSET_(r16, 6, 2,v) + + #define GET32dHubCmdHDR_DESC_updSemId(r32) _BFGET_(r32,27,23) + #define SET32dHubCmdHDR_DESC_updSemId(r32,v) _BFSET_(r32,27,23,v) + #define GET16dHubCmdHDR_DESC_updSemId(r16) _BFGET_(r16,11, 7) + #define SET16dHubCmdHDR_DESC_updSemId(r16,v) _BFSET_(r16,11, 7,v) + + #define GET32dHubCmdHDR_DESC_interrupt(r32) _BFGET_(r32,28,28) + #define SET32dHubCmdHDR_DESC_interrupt(r32,v) _BFSET_(r32,28,28,v) + #define GET16dHubCmdHDR_DESC_interrupt(r16) _BFGET_(r16,12,12) + #define SET16dHubCmdHDR_DESC_interrupt(r16,v) _BFSET_(r16,12,12,v) + + #define w32dHubCmdHDR_DESC {\ + UNSG32 uDESC_size : 16;\ + UNSG32 uDESC_sizeMTU : 1;\ + UNSG32 uDESC_semOpMTU : 1;\ + UNSG32 uDESC_chkSemId : 5;\ + UNSG32 uDESC_updSemId : 5;\ + UNSG32 uDESC_interrupt : 1;\ + UNSG32 RSVDx0_b29 : 3;\ + } + union { UNSG32 u32dHubCmdHDR_DESC; + struct w32dHubCmdHDR_DESC; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubCmdHDR; + + typedef union T32dHubCmdHDR_DESC + { UNSG32 u32; + struct w32dHubCmdHDR_DESC; + } T32dHubCmdHDR_DESC; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmdHDR_DESC + { UNSG32 u32[1]; + struct { + struct w32dHubCmdHDR_DESC; + }; + } TdHubCmdHDR_DESC; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmdHDR_drvrd(SIE_dHubCmdHDR *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmdHDR_drvwr(SIE_dHubCmdHDR *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmdHDR_reset(SIE_dHubCmdHDR *p); + SIGN32 dHubCmdHDR_cmp (SIE_dHubCmdHDR *p, SIE_dHubCmdHDR *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmdHDR_check(p,pie,pfx,hLOG) dHubCmdHDR_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmdHDR_print(p, pfx,hLOG) dHubCmdHDR_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmdHDR +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmd biu (4,4) +/// ### +/// * 64-bit dHub command issued by read/write masters +/// * [0:31] +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 MEM (W-) +/// %unsigned 32 addr +/// ### +/// * DRAM data address, in bytes; not necessarily MTU aligned. +/// * [32:63] +/// ### +/// @ 0x00004 (P) +/// # 0x00004 HDR +/// $dHubCmdHDR HDR REG +/// ### +/// * end dHubCmd +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 8B, bits: 61b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmd +#define h_dHubCmd (){} + + #define RA_dHubCmd_MEM 0x0000 + + #define BA_dHubCmd_MEM_addr 0x0000 + #define B16dHubCmd_MEM_addr 0x0000 + #define LSb32dHubCmd_MEM_addr 0 + #define LSb16dHubCmd_MEM_addr 0 + #define bdHubCmd_MEM_addr 32 + #define MSK32dHubCmd_MEM_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_dHubCmd_HDR 0x0004 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmd { + /////////////////////////////////////////////////////////// + #define GET32dHubCmd_MEM_addr(r32) _BFGET_(r32,31, 0) + #define SET32dHubCmd_MEM_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32dHubCmd_MEM {\ + UNSG32 uMEM_addr : 32;\ + } + union { UNSG32 u32dHubCmd_MEM; + struct w32dHubCmd_MEM; + }; + /////////////////////////////////////////////////////////// + SIE_dHubCmdHDR ie_HDR; + /////////////////////////////////////////////////////////// + } SIE_dHubCmd; + + typedef union T32dHubCmd_MEM + { UNSG32 u32; + struct w32dHubCmd_MEM; + } T32dHubCmd_MEM; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmd_MEM + { UNSG32 u32[1]; + struct { + struct w32dHubCmd_MEM; + }; + } TdHubCmd_MEM; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmd_drvrd(SIE_dHubCmd *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmd_drvwr(SIE_dHubCmd *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmd_reset(SIE_dHubCmd *p); + SIGN32 dHubCmd_cmp (SIE_dHubCmd *p, SIE_dHubCmd *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmd_check(p,pie,pfx,hLOG) dHubCmd_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmd_print(p, pfx,hLOG) dHubCmd_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmd +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubChannel biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 2 MTU +/// : 8byte 0x0 +/// : 32byte 0x1 +/// : 128byte 0x2 +/// : 1024byte 0x3 +/// ### +/// * Minimum transfer unit of the channel +/// ### +/// %unsigned 1 QoS +/// ### +/// * Write 1 to turn on QoS detection +/// ### +/// %unsigned 1 selfLoop +/// ### +/// * Write 1 to enable cmd looping support; 0 to turn off +/// ### +/// %unsigned 1 intrCtl 0x0 +/// : cmdDone 0x0 +/// : chIdle 0x1 +/// ### +/// * 0 : default vlaue, the interrupt is triggered by the finish of the dHub command if the interrupt bit is defined in the dHub command. +/// * 1 : The interrupt is triggered if the dHub channel is idle ( no busy and no pending and the corresponding dHub command Q is empty). +/// ### +/// %unsigned 1 hScan 0x0 +/// : rastScan 0x0 +/// : invScan 0x1 +/// ### +/// * This parameter will only apply to read channels. +/// * It will affect 1D dHub command for the channel. +/// * When scan is set to 1 (invScan), the data (beat) inside the dHub command will be fetched in the inverse order. ie. The data from the last address will come first and the data (beat) from the first address will come lastly. +/// ### +/// %unsigned 1 vScan 0x0 +/// : rastScan 0x0 +/// : invScan 0x1 +/// ### +/// * This parameter will only apply to read channels. +/// * It will affect 2D channels. +/// * When scan is set to 1 (invScan), +/// * The last address line (1D command) will be fetched first, and the first address line will be fetched lastly. +/// ### +/// %% 25 # Stuffing bits... +/// @ 0x00004 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to enable the channel; 0 to pause the channel +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to reset the channel controller state +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C FLUSH (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to start the data flushing process. Invalid for read (M2H) channels +/// * end dHubChannel +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 10b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubChannel +#define h_dHubChannel (){} + + #define RA_dHubChannel_CFG 0x0000 + + #define BA_dHubChannel_CFG_MTU 0x0000 + #define B16dHubChannel_CFG_MTU 0x0000 + #define LSb32dHubChannel_CFG_MTU 0 + #define LSb16dHubChannel_CFG_MTU 0 + #define bdHubChannel_CFG_MTU 2 + #define MSK32dHubChannel_CFG_MTU 0x00000003 + #define dHubChannel_CFG_MTU_8byte 0x0 + #define dHubChannel_CFG_MTU_32byte 0x1 + #define dHubChannel_CFG_MTU_128byte 0x2 + #define dHubChannel_CFG_MTU_1024byte 0x3 + + #define BA_dHubChannel_CFG_QoS 0x0000 + #define B16dHubChannel_CFG_QoS 0x0000 + #define LSb32dHubChannel_CFG_QoS 2 + #define LSb16dHubChannel_CFG_QoS 2 + #define bdHubChannel_CFG_QoS 1 + #define MSK32dHubChannel_CFG_QoS 0x00000004 + + #define BA_dHubChannel_CFG_selfLoop 0x0000 + #define B16dHubChannel_CFG_selfLoop 0x0000 + #define LSb32dHubChannel_CFG_selfLoop 3 + #define LSb16dHubChannel_CFG_selfLoop 3 + #define bdHubChannel_CFG_selfLoop 1 + #define MSK32dHubChannel_CFG_selfLoop 0x00000008 + + #define BA_dHubChannel_CFG_intrCtl 0x0000 + #define B16dHubChannel_CFG_intrCtl 0x0000 + #define LSb32dHubChannel_CFG_intrCtl 4 + #define LSb16dHubChannel_CFG_intrCtl 4 + #define bdHubChannel_CFG_intrCtl 1 + #define MSK32dHubChannel_CFG_intrCtl 0x00000010 + #define dHubChannel_CFG_intrCtl_cmdDone 0x0 + #define dHubChannel_CFG_intrCtl_chIdle 0x1 + + #define BA_dHubChannel_CFG_hScan 0x0000 + #define B16dHubChannel_CFG_hScan 0x0000 + #define LSb32dHubChannel_CFG_hScan 5 + #define LSb16dHubChannel_CFG_hScan 5 + #define bdHubChannel_CFG_hScan 1 + #define MSK32dHubChannel_CFG_hScan 0x00000020 + #define dHubChannel_CFG_hScan_rastScan 0x0 + #define dHubChannel_CFG_hScan_invScan 0x1 + + #define BA_dHubChannel_CFG_vScan 0x0000 + #define B16dHubChannel_CFG_vScan 0x0000 + #define LSb32dHubChannel_CFG_vScan 6 + #define LSb16dHubChannel_CFG_vScan 6 + #define bdHubChannel_CFG_vScan 1 + #define MSK32dHubChannel_CFG_vScan 0x00000040 + #define dHubChannel_CFG_vScan_rastScan 0x0 + #define dHubChannel_CFG_vScan_invScan 0x1 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_START 0x0004 + + #define BA_dHubChannel_START_EN 0x0004 + #define B16dHubChannel_START_EN 0x0004 + #define LSb32dHubChannel_START_EN 0 + #define LSb16dHubChannel_START_EN 0 + #define bdHubChannel_START_EN 1 + #define MSK32dHubChannel_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_CLEAR 0x0008 + + #define BA_dHubChannel_CLEAR_EN 0x0008 + #define B16dHubChannel_CLEAR_EN 0x0008 + #define LSb32dHubChannel_CLEAR_EN 0 + #define LSb16dHubChannel_CLEAR_EN 0 + #define bdHubChannel_CLEAR_EN 1 + #define MSK32dHubChannel_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_FLUSH 0x000C + + #define BA_dHubChannel_FLUSH_EN 0x000C + #define B16dHubChannel_FLUSH_EN 0x000C + #define LSb32dHubChannel_FLUSH_EN 0 + #define LSb16dHubChannel_FLUSH_EN 0 + #define bdHubChannel_FLUSH_EN 1 + #define MSK32dHubChannel_FLUSH_EN 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubChannel { + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_CFG_MTU(r32) _BFGET_(r32, 1, 0) + #define SET32dHubChannel_CFG_MTU(r32,v) _BFSET_(r32, 1, 0,v) + #define GET16dHubChannel_CFG_MTU(r16) _BFGET_(r16, 1, 0) + #define SET16dHubChannel_CFG_MTU(r16,v) _BFSET_(r16, 1, 0,v) + + #define GET32dHubChannel_CFG_QoS(r32) _BFGET_(r32, 2, 2) + #define SET32dHubChannel_CFG_QoS(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16dHubChannel_CFG_QoS(r16) _BFGET_(r16, 2, 2) + #define SET16dHubChannel_CFG_QoS(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32dHubChannel_CFG_selfLoop(r32) _BFGET_(r32, 3, 3) + #define SET32dHubChannel_CFG_selfLoop(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16dHubChannel_CFG_selfLoop(r16) _BFGET_(r16, 3, 3) + #define SET16dHubChannel_CFG_selfLoop(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32dHubChannel_CFG_intrCtl(r32) _BFGET_(r32, 4, 4) + #define SET32dHubChannel_CFG_intrCtl(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16dHubChannel_CFG_intrCtl(r16) _BFGET_(r16, 4, 4) + #define SET16dHubChannel_CFG_intrCtl(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32dHubChannel_CFG_hScan(r32) _BFGET_(r32, 5, 5) + #define SET32dHubChannel_CFG_hScan(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16dHubChannel_CFG_hScan(r16) _BFGET_(r16, 5, 5) + #define SET16dHubChannel_CFG_hScan(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32dHubChannel_CFG_vScan(r32) _BFGET_(r32, 6, 6) + #define SET32dHubChannel_CFG_vScan(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16dHubChannel_CFG_vScan(r16) _BFGET_(r16, 6, 6) + #define SET16dHubChannel_CFG_vScan(r16,v) _BFSET_(r16, 6, 6,v) + + #define w32dHubChannel_CFG {\ + UNSG32 uCFG_MTU : 2;\ + UNSG32 uCFG_QoS : 1;\ + UNSG32 uCFG_selfLoop : 1;\ + UNSG32 uCFG_intrCtl : 1;\ + UNSG32 uCFG_hScan : 1;\ + UNSG32 uCFG_vScan : 1;\ + UNSG32 RSVDx0_b7 : 25;\ + } + union { UNSG32 u32dHubChannel_CFG; + struct w32dHubChannel_CFG; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_START; + struct w32dHubChannel_START; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_CLEAR; + struct w32dHubChannel_CLEAR; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_FLUSH_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_FLUSH_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_FLUSH_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_FLUSH_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_FLUSH {\ + UNSG32 uFLUSH_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_FLUSH; + struct w32dHubChannel_FLUSH; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubChannel; + + typedef union T32dHubChannel_CFG + { UNSG32 u32; + struct w32dHubChannel_CFG; + } T32dHubChannel_CFG; + typedef union T32dHubChannel_START + { UNSG32 u32; + struct w32dHubChannel_START; + } T32dHubChannel_START; + typedef union T32dHubChannel_CLEAR + { UNSG32 u32; + struct w32dHubChannel_CLEAR; + } T32dHubChannel_CLEAR; + typedef union T32dHubChannel_FLUSH + { UNSG32 u32; + struct w32dHubChannel_FLUSH; + } T32dHubChannel_FLUSH; + /////////////////////////////////////////////////////////// + + typedef union TdHubChannel_CFG + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_CFG; + }; + } TdHubChannel_CFG; + typedef union TdHubChannel_START + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_START; + }; + } TdHubChannel_START; + typedef union TdHubChannel_CLEAR + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_CLEAR; + }; + } TdHubChannel_CLEAR; + typedef union TdHubChannel_FLUSH + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_FLUSH; + }; + } TdHubChannel_FLUSH; + + /////////////////////////////////////////////////////////// + SIGN32 dHubChannel_drvrd(SIE_dHubChannel *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubChannel_drvwr(SIE_dHubChannel *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubChannel_reset(SIE_dHubChannel *p); + SIGN32 dHubChannel_cmp (SIE_dHubChannel *p, SIE_dHubChannel *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubChannel_check(p,pie,pfx,hLOG) dHubChannel_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubChannel_print(p, pfx,hLOG) dHubChannel_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubChannel +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubReg biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 SemaHub +/// $SemaHub SemaHub REG +/// ### +/// * For dHub internal interrupts, also provide semaphore service for external (all channels will be opened to external to access). +/// * Channel 0 is used for dHub.HBO interrupt. +/// * Channel N+1 is used for dHub.Channel[N] interrupt. +/// ### +/// @ 0x00400 (P) +/// # 0x00400 HBO +/// $HBO HBO REG +/// ### +/// * For dHub channels (command/data queues), also provide (unused) FIFO service for external. +/// * Channel 2N is used for dHub.Channel[N] command. +/// * Channel 2N+1 is used for dHub.Channel[N] data. +/// ### +/// @ 0x00B00 ARR (P) +/// # 0x00B00 channelCtl +/// $dHubChannel channelCtl REG [16] +/// ### +/// * Up-to 16 channels +/// ### +/// @ 0x00C00 BUSY (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: no ongoing command is being processed, and no flushing is taking place +/// * 1: channel controller is busy +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C04 PENDING (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: Response queue is empty, meaning no outstanding AXI transactions +/// * 1: there exist some outstanding AXI transactions +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C08 busRstEn (RW-) +/// %unsigned 1 reg 0x0 +/// ### +/// * Write one to this register will trigger gate-keeper to take over the AXI bus. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00C0C busRstDone (R-) +/// %unsigned 1 reg 0x1 +/// ### +/// * After gate-keeper take over the AXI bus, it will assert this bit once there is no outstanding transactions on AXI bus. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00C10 flowCtl (P) +/// %unsigned 8 rAlpha 0x0 +/// %unsigned 8 wAlpha 0x0 +/// ### +/// * Flow control parameter for read and write axi master. +/// * clkCnt=(alpha*bstLen)>>4. +/// * This # of clock cycles will be blocked for the axi master after an axi command with the burst length of “bstLenâ€. +/// * When set alpha to be 0, the master will never be blocked. +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C14 axiCmdCol (P) +/// %unsigned 16 rCnt 0x0 +/// %unsigned 16 wCnt 0x0 +/// ### +/// * Axi command collection. The counter value indicate read/write do the command collection for # of clock cycles, start from the first command pushed to an empty command Q. Here are the conditions that will trigger the Axi master to send out command. +/// * Cmd Q full or the counter count down to “0†from the programmed value. +/// * Set the counter to 0 will disable the command collection. +/// * end dHubReg +/// ### +/// @ 0x00C18 (W-) +/// # # Stuffing bytes... +/// %% 1856 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 3328B, bits: 3314b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubReg +#define h_dHubReg (){} + + #define RA_dHubReg_SemaHub 0x0000 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_HBO 0x0400 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_ARR 0x0B00 + #define RA_dHubReg_channelCtl 0x0B00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_BUSY 0x0C00 + + #define BA_dHubReg_BUSY_ST 0x0C00 + #define B16dHubReg_BUSY_ST 0x0C00 + #define LSb32dHubReg_BUSY_ST 0 + #define LSb16dHubReg_BUSY_ST 0 + #define bdHubReg_BUSY_ST 16 + #define MSK32dHubReg_BUSY_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg_PENDING 0x0C04 + + #define BA_dHubReg_PENDING_ST 0x0C04 + #define B16dHubReg_PENDING_ST 0x0C04 + #define LSb32dHubReg_PENDING_ST 0 + #define LSb16dHubReg_PENDING_ST 0 + #define bdHubReg_PENDING_ST 16 + #define MSK32dHubReg_PENDING_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg_busRstEn 0x0C08 + + #define BA_dHubReg_busRstEn_reg 0x0C08 + #define B16dHubReg_busRstEn_reg 0x0C08 + #define LSb32dHubReg_busRstEn_reg 0 + #define LSb16dHubReg_busRstEn_reg 0 + #define bdHubReg_busRstEn_reg 1 + #define MSK32dHubReg_busRstEn_reg 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_busRstDone 0x0C0C + + #define BA_dHubReg_busRstDone_reg 0x0C0C + #define B16dHubReg_busRstDone_reg 0x0C0C + #define LSb32dHubReg_busRstDone_reg 0 + #define LSb16dHubReg_busRstDone_reg 0 + #define bdHubReg_busRstDone_reg 1 + #define MSK32dHubReg_busRstDone_reg 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_flowCtl 0x0C10 + + #define BA_dHubReg_flowCtl_rAlpha 0x0C10 + #define B16dHubReg_flowCtl_rAlpha 0x0C10 + #define LSb32dHubReg_flowCtl_rAlpha 0 + #define LSb16dHubReg_flowCtl_rAlpha 0 + #define bdHubReg_flowCtl_rAlpha 8 + #define MSK32dHubReg_flowCtl_rAlpha 0x000000FF + + #define BA_dHubReg_flowCtl_wAlpha 0x0C11 + #define B16dHubReg_flowCtl_wAlpha 0x0C10 + #define LSb32dHubReg_flowCtl_wAlpha 8 + #define LSb16dHubReg_flowCtl_wAlpha 8 + #define bdHubReg_flowCtl_wAlpha 8 + #define MSK32dHubReg_flowCtl_wAlpha 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_axiCmdCol 0x0C14 + + #define BA_dHubReg_axiCmdCol_rCnt 0x0C14 + #define B16dHubReg_axiCmdCol_rCnt 0x0C14 + #define LSb32dHubReg_axiCmdCol_rCnt 0 + #define LSb16dHubReg_axiCmdCol_rCnt 0 + #define bdHubReg_axiCmdCol_rCnt 16 + #define MSK32dHubReg_axiCmdCol_rCnt 0x0000FFFF + + #define BA_dHubReg_axiCmdCol_wCnt 0x0C16 + #define B16dHubReg_axiCmdCol_wCnt 0x0C16 + #define LSb32dHubReg_axiCmdCol_wCnt 16 + #define LSb16dHubReg_axiCmdCol_wCnt 0 + #define bdHubReg_axiCmdCol_wCnt 16 + #define MSK32dHubReg_axiCmdCol_wCnt 0xFFFF0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubReg { + /////////////////////////////////////////////////////////// + SIE_SemaHub ie_SemaHub; + /////////////////////////////////////////////////////////// + SIE_HBO ie_HBO; + /////////////////////////////////////////////////////////// + SIE_dHubChannel ie_channelCtl[16]; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_BUSY_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_BUSY_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_BUSY_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_BUSY_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_BUSY {\ + UNSG32 uBUSY_ST : 16;\ + UNSG32 RSVDxC00_b16 : 16;\ + } + union { UNSG32 u32dHubReg_BUSY; + struct w32dHubReg_BUSY; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_PENDING_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_PENDING_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_PENDING_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_PENDING_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_PENDING {\ + UNSG32 uPENDING_ST : 16;\ + UNSG32 RSVDxC04_b16 : 16;\ + } + union { UNSG32 u32dHubReg_PENDING; + struct w32dHubReg_PENDING; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_busRstEn_reg(r32) _BFGET_(r32, 0, 0) + #define SET32dHubReg_busRstEn_reg(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubReg_busRstEn_reg(r16) _BFGET_(r16, 0, 0) + #define SET16dHubReg_busRstEn_reg(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubReg_busRstEn {\ + UNSG32 ubusRstEn_reg : 1;\ + UNSG32 RSVDxC08_b1 : 31;\ + } + union { UNSG32 u32dHubReg_busRstEn; + struct w32dHubReg_busRstEn; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_busRstDone_reg(r32) _BFGET_(r32, 0, 0) + #define SET32dHubReg_busRstDone_reg(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubReg_busRstDone_reg(r16) _BFGET_(r16, 0, 0) + #define SET16dHubReg_busRstDone_reg(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubReg_busRstDone {\ + UNSG32 ubusRstDone_reg : 1;\ + UNSG32 RSVDxC0C_b1 : 31;\ + } + union { UNSG32 u32dHubReg_busRstDone; + struct w32dHubReg_busRstDone; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_flowCtl_rAlpha(r32) _BFGET_(r32, 7, 0) + #define SET32dHubReg_flowCtl_rAlpha(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16dHubReg_flowCtl_rAlpha(r16) _BFGET_(r16, 7, 0) + #define SET16dHubReg_flowCtl_rAlpha(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32dHubReg_flowCtl_wAlpha(r32) _BFGET_(r32,15, 8) + #define SET32dHubReg_flowCtl_wAlpha(r32,v) _BFSET_(r32,15, 8,v) + #define GET16dHubReg_flowCtl_wAlpha(r16) _BFGET_(r16,15, 8) + #define SET16dHubReg_flowCtl_wAlpha(r16,v) _BFSET_(r16,15, 8,v) + + #define w32dHubReg_flowCtl {\ + UNSG32 uflowCtl_rAlpha : 8;\ + UNSG32 uflowCtl_wAlpha : 8;\ + UNSG32 RSVDxC10_b16 : 16;\ + } + union { UNSG32 u32dHubReg_flowCtl; + struct w32dHubReg_flowCtl; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_axiCmdCol_rCnt(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_axiCmdCol_rCnt(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_axiCmdCol_rCnt(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_axiCmdCol_rCnt(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubReg_axiCmdCol_wCnt(r32) _BFGET_(r32,31,16) + #define SET32dHubReg_axiCmdCol_wCnt(r32,v) _BFSET_(r32,31,16,v) + #define GET16dHubReg_axiCmdCol_wCnt(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_axiCmdCol_wCnt(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_axiCmdCol {\ + UNSG32 uaxiCmdCol_rCnt : 16;\ + UNSG32 uaxiCmdCol_wCnt : 16;\ + } + union { UNSG32 u32dHubReg_axiCmdCol; + struct w32dHubReg_axiCmdCol; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxC18 [232]; + /////////////////////////////////////////////////////////// + } SIE_dHubReg; + + typedef union T32dHubReg_BUSY + { UNSG32 u32; + struct w32dHubReg_BUSY; + } T32dHubReg_BUSY; + typedef union T32dHubReg_PENDING + { UNSG32 u32; + struct w32dHubReg_PENDING; + } T32dHubReg_PENDING; + typedef union T32dHubReg_busRstEn + { UNSG32 u32; + struct w32dHubReg_busRstEn; + } T32dHubReg_busRstEn; + typedef union T32dHubReg_busRstDone + { UNSG32 u32; + struct w32dHubReg_busRstDone; + } T32dHubReg_busRstDone; + typedef union T32dHubReg_flowCtl + { UNSG32 u32; + struct w32dHubReg_flowCtl; + } T32dHubReg_flowCtl; + typedef union T32dHubReg_axiCmdCol + { UNSG32 u32; + struct w32dHubReg_axiCmdCol; + } T32dHubReg_axiCmdCol; + /////////////////////////////////////////////////////////// + + typedef union TdHubReg_BUSY + { UNSG32 u32[1]; + struct { + struct w32dHubReg_BUSY; + }; + } TdHubReg_BUSY; + typedef union TdHubReg_PENDING + { UNSG32 u32[1]; + struct { + struct w32dHubReg_PENDING; + }; + } TdHubReg_PENDING; + typedef union TdHubReg_busRstEn + { UNSG32 u32[1]; + struct { + struct w32dHubReg_busRstEn; + }; + } TdHubReg_busRstEn; + typedef union TdHubReg_busRstDone + { UNSG32 u32[1]; + struct { + struct w32dHubReg_busRstDone; + }; + } TdHubReg_busRstDone; + typedef union TdHubReg_flowCtl + { UNSG32 u32[1]; + struct { + struct w32dHubReg_flowCtl; + }; + } TdHubReg_flowCtl; + typedef union TdHubReg_axiCmdCol + { UNSG32 u32[1]; + struct { + struct w32dHubReg_axiCmdCol; + }; + } TdHubReg_axiCmdCol; + + /////////////////////////////////////////////////////////// + SIGN32 dHubReg_drvrd(SIE_dHubReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubReg_drvwr(SIE_dHubReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubReg_reset(SIE_dHubReg *p); + SIGN32 dHubReg_cmp (SIE_dHubReg *p, SIE_dHubReg *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubReg_check(p,pie,pfx,hLOG) dHubReg_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubReg_print(p, pfx,hLOG) dHubReg_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubReg +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmd2D biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 MEM (W-) +/// %unsigned 32 addr +/// ### +/// * DRAM data address of the 2D buffer, in bytes. +/// ### +/// @ 0x00004 DESC (W-) +/// %unsigned 16 stride +/// ### +/// * Line stride size in bytes +/// ### +/// %unsigned 13 numLine +/// ### +/// * Number of lines in buffer. Size of 0 is forbidden. +/// ### +/// %unsigned 2 hdrLoop +/// ### +/// * Size of line-loop for choosing dHubCmdHDR +/// * 0 is treated as 4 +/// ### +/// %unsigned 1 interrupt +/// ### +/// * 1: raise interrupt upon whole 2D command finish. +/// * 1: set the last 1D command interrupt bit. +/// * 0 : use the default 1D command interrupt bit. +/// ### +/// @ 0x00008 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to enable the channel; 0 to pause the channel +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to reset the 2D engine. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00010 (P) +/// # 0x00010 HDR +/// $dHubCmdHDR HDR REG [4] +/// ### +/// * Headers used in generating dHubCmd for each line in looping order, loop size (1,2,3,4) specified by DESC_hdrLoop +/// * end dHubCmd2D +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 32B, bits: 182b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmd2D +#define h_dHubCmd2D (){} + + #define RA_dHubCmd2D_MEM 0x0000 + + #define BA_dHubCmd2D_MEM_addr 0x0000 + #define B16dHubCmd2D_MEM_addr 0x0000 + #define LSb32dHubCmd2D_MEM_addr 0 + #define LSb16dHubCmd2D_MEM_addr 0 + #define bdHubCmd2D_MEM_addr 32 + #define MSK32dHubCmd2D_MEM_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_DESC 0x0004 + + #define BA_dHubCmd2D_DESC_stride 0x0004 + #define B16dHubCmd2D_DESC_stride 0x0004 + #define LSb32dHubCmd2D_DESC_stride 0 + #define LSb16dHubCmd2D_DESC_stride 0 + #define bdHubCmd2D_DESC_stride 16 + #define MSK32dHubCmd2D_DESC_stride 0x0000FFFF + + #define BA_dHubCmd2D_DESC_numLine 0x0006 + #define B16dHubCmd2D_DESC_numLine 0x0006 + #define LSb32dHubCmd2D_DESC_numLine 16 + #define LSb16dHubCmd2D_DESC_numLine 0 + #define bdHubCmd2D_DESC_numLine 13 + #define MSK32dHubCmd2D_DESC_numLine 0x1FFF0000 + + #define BA_dHubCmd2D_DESC_hdrLoop 0x0007 + #define B16dHubCmd2D_DESC_hdrLoop 0x0006 + #define LSb32dHubCmd2D_DESC_hdrLoop 29 + #define LSb16dHubCmd2D_DESC_hdrLoop 13 + #define bdHubCmd2D_DESC_hdrLoop 2 + #define MSK32dHubCmd2D_DESC_hdrLoop 0x60000000 + + #define BA_dHubCmd2D_DESC_interrupt 0x0007 + #define B16dHubCmd2D_DESC_interrupt 0x0006 + #define LSb32dHubCmd2D_DESC_interrupt 31 + #define LSb16dHubCmd2D_DESC_interrupt 15 + #define bdHubCmd2D_DESC_interrupt 1 + #define MSK32dHubCmd2D_DESC_interrupt 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_START 0x0008 + + #define BA_dHubCmd2D_START_EN 0x0008 + #define B16dHubCmd2D_START_EN 0x0008 + #define LSb32dHubCmd2D_START_EN 0 + #define LSb16dHubCmd2D_START_EN 0 + #define bdHubCmd2D_START_EN 1 + #define MSK32dHubCmd2D_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_CLEAR 0x000C + + #define BA_dHubCmd2D_CLEAR_EN 0x000C + #define B16dHubCmd2D_CLEAR_EN 0x000C + #define LSb32dHubCmd2D_CLEAR_EN 0 + #define LSb16dHubCmd2D_CLEAR_EN 0 + #define bdHubCmd2D_CLEAR_EN 1 + #define MSK32dHubCmd2D_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_HDR 0x0010 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmd2D { + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_MEM_addr(r32) _BFGET_(r32,31, 0) + #define SET32dHubCmd2D_MEM_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32dHubCmd2D_MEM {\ + UNSG32 uMEM_addr : 32;\ + } + union { UNSG32 u32dHubCmd2D_MEM; + struct w32dHubCmd2D_MEM; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_DESC_stride(r32) _BFGET_(r32,15, 0) + #define SET32dHubCmd2D_DESC_stride(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubCmd2D_DESC_stride(r16) _BFGET_(r16,15, 0) + #define SET16dHubCmd2D_DESC_stride(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubCmd2D_DESC_numLine(r32) _BFGET_(r32,28,16) + #define SET32dHubCmd2D_DESC_numLine(r32,v) _BFSET_(r32,28,16,v) + #define GET16dHubCmd2D_DESC_numLine(r16) _BFGET_(r16,12, 0) + #define SET16dHubCmd2D_DESC_numLine(r16,v) _BFSET_(r16,12, 0,v) + + #define GET32dHubCmd2D_DESC_hdrLoop(r32) _BFGET_(r32,30,29) + #define SET32dHubCmd2D_DESC_hdrLoop(r32,v) _BFSET_(r32,30,29,v) + #define GET16dHubCmd2D_DESC_hdrLoop(r16) _BFGET_(r16,14,13) + #define SET16dHubCmd2D_DESC_hdrLoop(r16,v) _BFSET_(r16,14,13,v) + + #define GET32dHubCmd2D_DESC_interrupt(r32) _BFGET_(r32,31,31) + #define SET32dHubCmd2D_DESC_interrupt(r32,v) _BFSET_(r32,31,31,v) + #define GET16dHubCmd2D_DESC_interrupt(r16) _BFGET_(r16,15,15) + #define SET16dHubCmd2D_DESC_interrupt(r16,v) _BFSET_(r16,15,15,v) + + #define w32dHubCmd2D_DESC {\ + UNSG32 uDESC_stride : 16;\ + UNSG32 uDESC_numLine : 13;\ + UNSG32 uDESC_hdrLoop : 2;\ + UNSG32 uDESC_interrupt : 1;\ + } + union { UNSG32 u32dHubCmd2D_DESC; + struct w32dHubCmd2D_DESC; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubCmd2D_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubCmd2D_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmd2D_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubCmd2D_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32dHubCmd2D_START; + struct w32dHubCmd2D_START; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubCmd2D_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubCmd2D_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmd2D_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubCmd2D_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32dHubCmd2D_CLEAR; + struct w32dHubCmd2D_CLEAR; + }; + /////////////////////////////////////////////////////////// + SIE_dHubCmdHDR ie_HDR[4]; + /////////////////////////////////////////////////////////// + } SIE_dHubCmd2D; + + typedef union T32dHubCmd2D_MEM + { UNSG32 u32; + struct w32dHubCmd2D_MEM; + } T32dHubCmd2D_MEM; + typedef union T32dHubCmd2D_DESC + { UNSG32 u32; + struct w32dHubCmd2D_DESC; + } T32dHubCmd2D_DESC; + typedef union T32dHubCmd2D_START + { UNSG32 u32; + struct w32dHubCmd2D_START; + } T32dHubCmd2D_START; + typedef union T32dHubCmd2D_CLEAR + { UNSG32 u32; + struct w32dHubCmd2D_CLEAR; + } T32dHubCmd2D_CLEAR; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmd2D_MEM + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_MEM; + }; + } TdHubCmd2D_MEM; + typedef union TdHubCmd2D_DESC + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_DESC; + }; + } TdHubCmd2D_DESC; + typedef union TdHubCmd2D_START + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_START; + }; + } TdHubCmd2D_START; + typedef union TdHubCmd2D_CLEAR + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_CLEAR; + }; + } TdHubCmd2D_CLEAR; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmd2D_drvrd(SIE_dHubCmd2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmd2D_drvwr(SIE_dHubCmd2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmd2D_reset(SIE_dHubCmd2D *p); + SIGN32 dHubCmd2D_cmp (SIE_dHubCmd2D *p, SIE_dHubCmd2D *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmd2D_check(p,pie,pfx,hLOG) dHubCmd2D_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmd2D_print(p, pfx,hLOG) dHubCmd2D_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmd2D +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubQuery (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 RESP (R-) +/// %unsigned 16 ST +/// ### +/// * Dhub channel state machine status. +/// ### +/// %% 16 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 16b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubQuery +#define h_dHubQuery (){} + + #define RA_dHubQuery_RESP 0x0000 + + #define BA_dHubQuery_RESP_ST 0x0000 + #define B16dHubQuery_RESP_ST 0x0000 + #define LSb32dHubQuery_RESP_ST 0 + #define LSb16dHubQuery_RESP_ST 0 + #define bdHubQuery_RESP_ST 16 + #define MSK32dHubQuery_RESP_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubQuery { + /////////////////////////////////////////////////////////// + #define GET32dHubQuery_RESP_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubQuery_RESP_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubQuery_RESP_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubQuery_RESP_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubQuery_RESP {\ + UNSG32 uRESP_ST : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32dHubQuery_RESP; + struct w32dHubQuery_RESP; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubQuery; + + typedef union T32dHubQuery_RESP + { UNSG32 u32; + struct w32dHubQuery_RESP; + } T32dHubQuery_RESP; + /////////////////////////////////////////////////////////// + + typedef union TdHubQuery_RESP + { UNSG32 u32[1]; + struct { + struct w32dHubQuery_RESP; + }; + } TdHubQuery_RESP; + + /////////////////////////////////////////////////////////// + SIGN32 dHubQuery_drvrd(SIE_dHubQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubQuery_drvwr(SIE_dHubQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubQuery_reset(SIE_dHubQuery *p); + SIGN32 dHubQuery_cmp (SIE_dHubQuery *p, SIE_dHubQuery *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubQuery_check(p,pie,pfx,hLOG) dHubQuery_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubQuery_print(p, pfx,hLOG) dHubQuery_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubQuery +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubReg2D biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 dHub +/// $dHubReg dHub REG +/// @ 0x00D00 ARR (P) +/// # 0x00D00 Cmd2D +/// $dHubCmd2D Cmd2D REG [16] +/// ### +/// * Up-to 16 2D channels. +/// * 2D Channel[N] is connected to dHub.Channel[N] command queue, that is, dHub.HBO.Channel[2N] +/// * Note: Number of 2D channels could be less than dHub channels (rest of are 1D only) +/// ### +/// @ 0x00F00 BUSY (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: no ongoing command is being processed +/// * 1: channel controller is busy +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00F04 (W-) +/// # # Stuffing bytes... +/// %% 480 +/// @ 0x00F40 (P) +/// # 0x00F40 CH_ST +/// $dHubQuery CH_ST MEM [16] +/// ### +/// * end dHubReg2D +/// ### +/// @ 0x00F80 (W-) +/// # # Stuffing bytes... +/// %% 1024 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4096B, bits: 6274b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubReg2D +#define h_dHubReg2D (){} + + #define RA_dHubReg2D_dHub 0x0000 + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_ARR 0x0D00 + #define RA_dHubReg2D_Cmd2D 0x0D00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_BUSY 0x0F00 + + #define BA_dHubReg2D_BUSY_ST 0x0F00 + #define B16dHubReg2D_BUSY_ST 0x0F00 + #define LSb32dHubReg2D_BUSY_ST 0 + #define LSb16dHubReg2D_BUSY_ST 0 + #define bdHubReg2D_BUSY_ST 16 + #define MSK32dHubReg2D_BUSY_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_CH_ST 0x0F40 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubReg2D { + /////////////////////////////////////////////////////////// + SIE_dHubReg ie_dHub; + /////////////////////////////////////////////////////////// + SIE_dHubCmd2D ie_Cmd2D[16]; + /////////////////////////////////////////////////////////// + #define GET32dHubReg2D_BUSY_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg2D_BUSY_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg2D_BUSY_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg2D_BUSY_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg2D_BUSY {\ + UNSG32 uBUSY_ST : 16;\ + UNSG32 RSVDxF00_b16 : 16;\ + } + union { UNSG32 u32dHubReg2D_BUSY; + struct w32dHubReg2D_BUSY; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxF04 [60]; + /////////////////////////////////////////////////////////// + SIE_dHubQuery ie_CH_ST[16]; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxF80 [128]; + /////////////////////////////////////////////////////////// + } SIE_dHubReg2D; + + typedef union T32dHubReg2D_BUSY + { UNSG32 u32; + struct w32dHubReg2D_BUSY; + } T32dHubReg2D_BUSY; + /////////////////////////////////////////////////////////// + + typedef union TdHubReg2D_BUSY + { UNSG32 u32[1]; + struct { + struct w32dHubReg2D_BUSY; + }; + } TdHubReg2D_BUSY; + + /////////////////////////////////////////////////////////// + SIGN32 dHubReg2D_drvrd(SIE_dHubReg2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubReg2D_drvwr(SIE_dHubReg2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubReg2D_reset(SIE_dHubReg2D *p); + SIGN32 dHubReg2D_cmp (SIE_dHubReg2D *p, SIE_dHubReg2D *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubReg2D_check(p,pie,pfx,hLOG) dHubReg2D_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubReg2D_print(p, pfx,hLOG) dHubReg2D_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubReg2D +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avioDhubChMap (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// %unsigned 4 vpp +/// ### +/// * BANK #0 +/// ### +/// : MV_R 0x0 +/// : MV_FRC_R 0x1 +/// : MV_FRC_W 0x2 +/// ### +/// * BANK #1 +/// ### +/// : DINT0_R 0x3 +/// ### +/// * BANK #2 +/// ### +/// : DINT1_R 0x4 +/// ### +/// * BANK #3 +/// ### +/// : DINT_W 0x5 +/// ### +/// * BANK #4 +/// ### +/// : BCM_R 0x6 +/// : HDMI_R 0x7 +/// : SPDIF_W 0x8 +/// %% 28 # Stuffing bits... +/// @ 0x00004 (P) +/// %unsigned 4 ag +/// ### +/// * BANK #0 +/// * BCM_R +/// * 0 +/// ### +/// : APPCMD_R 0x0 +/// : MA0_R 0x1 +/// : MA1_R 0x2 +/// : MA2_R 0x3 +/// : MA3_R 0x4 +/// : SPDIF_R 0x5 +/// : APPDAT_R 0x6 +/// : APPDAT_W 0x7 +/// ### +/// * BANK #1 +/// ### +/// : CSR_R 0x8 +/// ### +/// * BANK #2 +/// ### +/// : GFX_R 0x9 +/// %% 28 # Stuffing bits... +/// @ 0x00008 (P) +/// %unsigned 4 vip +/// ### +/// * BANK #0 +/// ### +/// : DVI_WR 0x0 +/// ### +/// * BANK #1 +/// ### +/// : MIC0_W 0x1 +/// : MIC1_W 0x2 +/// : MIC2_W 0x3 +/// : MIC3_W 0x4 +/// %% 28 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 12B, bits: 12b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avioDhubChMap +#define h_avioDhubChMap (){} + + #define BA_avioDhubChMap_vpp 0x0000 + #define B16avioDhubChMap_vpp 0x0000 + #define LSb32avioDhubChMap_vpp 0 + #define LSb16avioDhubChMap_vpp 0 + #define bavioDhubChMap_vpp 4 + #define MSK32avioDhubChMap_vpp 0x0000000F + #define avioDhubChMap_vpp_MV_R 0x0 + #define avioDhubChMap_vpp_MV_FRC_R 0x1 + #define avioDhubChMap_vpp_MV_FRC_W 0x2 + #define avioDhubChMap_vpp_DINT0_R 0x3 + #define avioDhubChMap_vpp_DINT1_R 0x4 + #define avioDhubChMap_vpp_DINT_W 0x5 + #define avioDhubChMap_vpp_BCM_R 0x6 + #define avioDhubChMap_vpp_HDMI_R 0x7 + #define avioDhubChMap_vpp_SPDIF_W 0x8 + /////////////////////////////////////////////////////////// + + #define BA_avioDhubChMap_ag 0x0004 + #define B16avioDhubChMap_ag 0x0004 + #define LSb32avioDhubChMap_ag 0 + #define LSb16avioDhubChMap_ag 0 + #define bavioDhubChMap_ag 4 + #define MSK32avioDhubChMap_ag 0x0000000F + #define avioDhubChMap_ag_APPCMD_R 0x0 + #define avioDhubChMap_ag_MA0_R 0x1 + #define avioDhubChMap_ag_MA1_R 0x2 + #define avioDhubChMap_ag_MA2_R 0x3 + #define avioDhubChMap_ag_MA3_R 0x4 + #define avioDhubChMap_ag_SPDIF_R 0x5 + #define avioDhubChMap_ag_APPDAT_R 0x6 + #define avioDhubChMap_ag_APPDAT_W 0x7 + #define avioDhubChMap_ag_CSR_R 0x8 + #define avioDhubChMap_ag_GFX_R 0x9 + /////////////////////////////////////////////////////////// + + #define BA_avioDhubChMap_vip 0x0008 + #define B16avioDhubChMap_vip 0x0008 + #define LSb32avioDhubChMap_vip 0 + #define LSb16avioDhubChMap_vip 0 + #define bavioDhubChMap_vip 4 + #define MSK32avioDhubChMap_vip 0x0000000F + #define avioDhubChMap_vip_DVI_WR 0x0 + #define avioDhubChMap_vip_MIC0_W 0x1 + #define avioDhubChMap_vip_MIC1_W 0x2 + #define avioDhubChMap_vip_MIC2_W 0x3 + #define avioDhubChMap_vip_MIC3_W 0x4 + /////////////////////////////////////////////////////////// + + typedef struct SIE_avioDhubChMap { + /////////////////////////////////////////////////////////// + #define GET32avioDhubChMap_vpp(r32) _BFGET_(r32, 3, 0) + #define SET32avioDhubChMap_vpp(r32,v) _BFSET_(r32, 3, 0,v) + #define GET16avioDhubChMap_vpp(r16) _BFGET_(r16, 3, 0) + #define SET16avioDhubChMap_vpp(r16,v) _BFSET_(r16, 3, 0,v) + + UNSG32 u_vpp : 4; + UNSG32 RSVDx0_b4 : 28; + /////////////////////////////////////////////////////////// + #define GET32avioDhubChMap_ag(r32) _BFGET_(r32, 3, 0) + #define SET32avioDhubChMap_ag(r32,v) _BFSET_(r32, 3, 0,v) + #define GET16avioDhubChMap_ag(r16) _BFGET_(r16, 3, 0) + #define SET16avioDhubChMap_ag(r16,v) _BFSET_(r16, 3, 0,v) + + UNSG32 u_ag : 4; + UNSG32 RSVDx4_b4 : 28; + /////////////////////////////////////////////////////////// + #define GET32avioDhubChMap_vip(r32) _BFGET_(r32, 3, 0) + #define SET32avioDhubChMap_vip(r32,v) _BFSET_(r32, 3, 0,v) + #define GET16avioDhubChMap_vip(r16) _BFGET_(r16, 3, 0) + #define SET16avioDhubChMap_vip(r16,v) _BFSET_(r16, 3, 0,v) + + UNSG32 u_vip : 4; + UNSG32 RSVDx8_b4 : 28; + /////////////////////////////////////////////////////////// + } SIE_avioDhubChMap; + + /////////////////////////////////////////////////////////// + SIGN32 avioDhubChMap_drvrd(SIE_avioDhubChMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avioDhubChMap_drvwr(SIE_avioDhubChMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avioDhubChMap_reset(SIE_avioDhubChMap *p); + SIGN32 avioDhubChMap_cmp (SIE_avioDhubChMap *p, SIE_avioDhubChMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avioDhubChMap_check(p,pie,pfx,hLOG) avioDhubChMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avioDhubChMap_print(p, pfx,hLOG) avioDhubChMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avioDhubChMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avioDhubTcmMap (4,4) +/// # # ---------------------------------------------------------- +/// : vppDhub_BANK0_START_ADDR 0x0 +/// : vppDhub_BANK0_SIZE 0x2000 +/// : vppDhub_BANK1_START_ADDR 0x2000 +/// : vppDhub_BANK1_SIZE 0x2000 +/// : vppDhub_BANK2_START_ADDR 0x4000 +/// : vppDhub_BANK2_SIZE 0x2000 +/// : vppDhub_BANK3_START_ADDR 0x6000 +/// : vppDhub_BANK3_SIZE 0x2000 +/// : vppDhub_BANK4_START_ADDR 0x8000 +/// : vppDhub_BANK4_SIZE 0x1000 +/// : agDhub_BANK0_START_ADDR 0x0 +/// : agDhub_BANK0_SIZE 0x2000 +/// : agDhub_BANK1_START_ADDR 0x2000 +/// : agDhub_BANK1_SIZE 0x2000 +/// : agDhub_BANK2_START_ADDR 0x4000 +/// : agDhub_BANK2_SIZE 0x2000 +/// : vipDhub_BANK0_START_ADDR 0x0 +/// : vipDhub_BANK0_SIZE 0x3000 +/// : vipDhub_BANK1_START_ADDR 0x3000 +/// : vipDhub_BANK1_SIZE 0x2000 +/// @ 0x00000 dummy (P) +/// %unsigned 1 xxx +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 1b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avioDhubTcmMap +#define h_avioDhubTcmMap (){} + + #define avioDhubTcmMap_vppDhub_BANK0_START_ADDR 0x0 + #define avioDhubTcmMap_vppDhub_BANK0_SIZE 0x2000 + #define avioDhubTcmMap_vppDhub_BANK1_START_ADDR 0x2000 + #define avioDhubTcmMap_vppDhub_BANK1_SIZE 0x2000 + #define avioDhubTcmMap_vppDhub_BANK2_START_ADDR 0x4000 + #define avioDhubTcmMap_vppDhub_BANK2_SIZE 0x2000 + #define avioDhubTcmMap_vppDhub_BANK3_START_ADDR 0x6000 + #define avioDhubTcmMap_vppDhub_BANK3_SIZE 0x2000 + #define avioDhubTcmMap_vppDhub_BANK4_START_ADDR 0x8000 + #define avioDhubTcmMap_vppDhub_BANK4_SIZE 0x1000 + #define avioDhubTcmMap_agDhub_BANK0_START_ADDR 0x0 + #define avioDhubTcmMap_agDhub_BANK0_SIZE 0x2000 + #define avioDhubTcmMap_agDhub_BANK1_START_ADDR 0x2000 + #define avioDhubTcmMap_agDhub_BANK1_SIZE 0x2000 + #define avioDhubTcmMap_agDhub_BANK2_START_ADDR 0x4000 + #define avioDhubTcmMap_agDhub_BANK2_SIZE 0x2000 + #define avioDhubTcmMap_vipDhub_BANK0_START_ADDR 0x0 + #define avioDhubTcmMap_vipDhub_BANK0_SIZE 0x3000 + #define avioDhubTcmMap_vipDhub_BANK1_START_ADDR 0x3000 + #define avioDhubTcmMap_vipDhub_BANK1_SIZE 0x2000 + /////////////////////////////////////////////////////////// + #define RA_avioDhubTcmMap_dummy 0x0000 + + #define BA_avioDhubTcmMap_dummy_xxx 0x0000 + #define B16avioDhubTcmMap_dummy_xxx 0x0000 + #define LSb32avioDhubTcmMap_dummy_xxx 0 + #define LSb16avioDhubTcmMap_dummy_xxx 0 + #define bavioDhubTcmMap_dummy_xxx 1 + #define MSK32avioDhubTcmMap_dummy_xxx 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_avioDhubTcmMap { + /////////////////////////////////////////////////////////// + #define GET32avioDhubTcmMap_dummy_xxx(r32) _BFGET_(r32, 0, 0) + #define SET32avioDhubTcmMap_dummy_xxx(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16avioDhubTcmMap_dummy_xxx(r16) _BFGET_(r16, 0, 0) + #define SET16avioDhubTcmMap_dummy_xxx(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32avioDhubTcmMap_dummy {\ + UNSG32 udummy_xxx : 1;\ + UNSG32 RSVDx0_b1 : 31;\ + } + union { UNSG32 u32avioDhubTcmMap_dummy; + struct w32avioDhubTcmMap_dummy; + }; + /////////////////////////////////////////////////////////// + } SIE_avioDhubTcmMap; + + typedef union T32avioDhubTcmMap_dummy + { UNSG32 u32; + struct w32avioDhubTcmMap_dummy; + } T32avioDhubTcmMap_dummy; + /////////////////////////////////////////////////////////// + + typedef union TavioDhubTcmMap_dummy + { UNSG32 u32[1]; + struct { + struct w32avioDhubTcmMap_dummy; + }; + } TavioDhubTcmMap_dummy; + + /////////////////////////////////////////////////////////// + SIGN32 avioDhubTcmMap_drvrd(SIE_avioDhubTcmMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avioDhubTcmMap_drvwr(SIE_avioDhubTcmMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avioDhubTcmMap_reset(SIE_avioDhubTcmMap *p); + SIGN32 avioDhubTcmMap_cmp (SIE_avioDhubTcmMap *p, SIE_avioDhubTcmMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avioDhubTcmMap_check(p,pie,pfx,hLOG) avioDhubTcmMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avioDhubTcmMap_print(p, pfx,hLOG) avioDhubTcmMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avioDhubTcmMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avioDhubSemMap (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// %unsigned 5 vpp +/// : CH0_intr 0x0 +/// : CH1_intr 0x1 +/// : CH2_intr 0x2 +/// : CH3_intr 0x3 +/// : CH4_intr 0x4 +/// : CH5_intr 0x5 +/// : CH6_intr 0x6 +/// : CH7_intr 0x7 +/// : CH8_intr 0x8 +/// : CH9_intr 0x9 +/// : CH10_intr 0xA +/// : CH11_intr 0xB +/// : CH12_intr 0xC +/// : CH13_intr 0xD +/// : CH14_intr 0xE +/// : CH15_intr 0xF +/// : MV_R_SEM 0x10 +/// : PIP_R_SEM 0x11 +/// : BCM_R_SEM 0x12 +/// : vppCPCB0_intr 0x13 +/// ### +/// * VBI start interrupt for CPCB0 +/// ### +/// : vppCPCB1_intr 0x14 +/// ### +/// * VBI start interrupt for CPCB1 +/// ### +/// : vppCPCB2_intr 0x15 +/// ### +/// * VBI start interrupt for CPCB2 +/// ### +/// : vppOUT0_intr 0x16 +/// ### +/// * HDCP interrupt from HDMI-TX core +/// ### +/// : vppOUT1_intr 0x17 +/// ### +/// * HDMI CEC interrupt +/// ### +/// : vppOUT2_intr 0x18 +/// ### +/// * HDMI CEC interrupt +/// ### +/// : vppOUT3_intr 0x19 +/// ### +/// * HDMI_HPD interrpt +/// ### +/// : vppOUT4_intr 0x1A +/// ### +/// * active video start (VDE) interrupt for CPCB0 +/// ### +/// : vppOUT5_intr 0x1B +/// ### +/// * active video start (VDE) interrupt for CPCB1 +/// ### +/// : vppOUT6_intr 0x1C +/// ### +/// * active video start (VDE) interrupt for CPCB2 +/// ### +/// : vppspdifrx_intr 0x1D +/// ### +/// * interrupt for spdifrx +/// ### +/// : vppspdifrx_ch_intr 0x1E +/// ### +/// * interrupt for spdifrx_chovr +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00004 (P) +/// %unsigned 5 ag +/// : CH0_intr 0x0 +/// : CH1_intr 0x1 +/// : CH2_intr 0x2 +/// : CH3_intr 0x3 +/// : CH4_intr 0x4 +/// : CH5_intr 0x5 +/// : CH6_intr 0x6 +/// : CH7_intr 0x7 +/// : CH8_intr 0x8 +/// : CH9_intr 0x9 +/// : CH10_intr 0xA +/// : CH11_intr 0xB +/// : CH12_intr 0xC +/// : CH13_intr 0xD +/// : CH14_intr 0xE +/// : CH15_intr 0xF +/// : app_intr0 0x11 +/// : app_intr1 0x12 +/// : app_intr2 0x13 +/// : app_intr3 0x14 +/// : MA0_R_SEM 0x15 +/// : MA1_R_SEM 0x16 +/// : MA2_R_SEM 0x17 +/// : MA3_R_SEM 0x18 +/// : SA_R_SEM 0x19 +/// : SPDIF_R_SEM 0x1A +/// : MIC_W_SEM 0x1B +/// : spu_intr0 0x1C +/// : spu_intr1 0x1D +/// ### +/// * spu_intr0 : spu is finished. +/// * spu_intr1 : spu detected illegal stream. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00008 (P) +/// %unsigned 5 vip +/// : CH0_intr 0x0 +/// : CH1_intr 0x1 +/// : CH2_intr 0x2 +/// : CH3_intr 0x3 +/// : CH4_intr 0x4 +/// : CH5_intr 0x5 +/// : CH6_intr 0x6 +/// : CH7_intr 0x7 +/// : CH8_intr 0x8 +/// : CH9_intr 0x9 +/// : CH10_intr 0xA +/// : CH11_intr 0xB +/// : CH12_intr 0xC +/// : CH13_intr 0xD +/// : CH14_intr 0xE +/// : CH15_intr 0xF +/// : rde_event_intr 0x10 +/// ### +/// * interrupt for SD read channel . +/// ### +/// : wre_event_intr 0x11 +/// ### +/// * interrupt for SD write channel. +/// ### +/// : dvi_vde_intr 0x12 +/// ### +/// * interrupt for DVI channel , It indicates scaler's frst (frame reset) rising edge, which is programmable depending on frst_regs and this allows to adjust the position of interrupt within the VBI region. +/// ### +/// : sd_err_intr 0x13 +/// ### +/// * interrupt for both SD write and read channels in case error condition, indicates the need to reset and restart the complete SD interface for both BG2 and Cypress. +/// ### +/// : audio_intr 0x14 +/// : vbi_vde_intr 0x15 +/// ### +/// * interrupt for VBI channel and it indicates a DVI VDE rising edge. It is programmable and can also be changed to DVI VDE falling edge, or can also be positioned in DVI active region. +/// ### +/// : sig_err_intr 0x16 +/// ### +/// * This interrupt is asserted whenever signature check match fails. +/// ### +/// : bcmInvalidReqIntr 0x17 +/// ### +/// * This interrupt is asserted whenever invalid address access is attemted using BCM. +/// ### +/// : hdmirx_intr 0x18 +/// ### +/// * This is the hdmirx module interrupt +/// ### +/// %% 27 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 12B, bits: 15b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avioDhubSemMap +#define h_avioDhubSemMap (){} + + #define BA_avioDhubSemMap_vpp 0x0000 + #define B16avioDhubSemMap_vpp 0x0000 + #define LSb32avioDhubSemMap_vpp 0 + #define LSb16avioDhubSemMap_vpp 0 + #define bavioDhubSemMap_vpp 5 + #define MSK32avioDhubSemMap_vpp 0x0000001F + #define avioDhubSemMap_vpp_CH0_intr 0x0 + #define avioDhubSemMap_vpp_CH1_intr 0x1 + #define avioDhubSemMap_vpp_CH2_intr 0x2 + #define avioDhubSemMap_vpp_CH3_intr 0x3 + #define avioDhubSemMap_vpp_CH4_intr 0x4 + #define avioDhubSemMap_vpp_CH5_intr 0x5 + #define avioDhubSemMap_vpp_CH6_intr 0x6 + #define avioDhubSemMap_vpp_CH7_intr 0x7 + #define avioDhubSemMap_vpp_CH8_intr 0x8 + #define avioDhubSemMap_vpp_CH9_intr 0x9 + #define avioDhubSemMap_vpp_CH10_intr 0xA + #define avioDhubSemMap_vpp_CH11_intr 0xB + #define avioDhubSemMap_vpp_CH12_intr 0xC + #define avioDhubSemMap_vpp_CH13_intr 0xD + #define avioDhubSemMap_vpp_CH14_intr 0xE + #define avioDhubSemMap_vpp_CH15_intr 0xF + #define avioDhubSemMap_vpp_MV_R_SEM 0x10 + #define avioDhubSemMap_vpp_PIP_R_SEM 0x11 + #define avioDhubSemMap_vpp_BCM_R_SEM 0x12 + #define avioDhubSemMap_vpp_vppCPCB0_intr 0x13 + #define avioDhubSemMap_vpp_vppCPCB1_intr 0x14 + #define avioDhubSemMap_vpp_vppCPCB2_intr 0x15 + #define avioDhubSemMap_vpp_vppOUT0_intr 0x16 + #define avioDhubSemMap_vpp_vppOUT1_intr 0x17 + #define avioDhubSemMap_vpp_vppOUT2_intr 0x18 + #define avioDhubSemMap_vpp_vppOUT3_intr 0x19 + #define avioDhubSemMap_vpp_vppOUT4_intr 0x1A + #define avioDhubSemMap_vpp_vppOUT5_intr 0x1B + #define avioDhubSemMap_vpp_vppOUT6_intr 0x1C + #define avioDhubSemMap_vpp_vppspdifrx_intr 0x1D + #define avioDhubSemMap_vpp_vppspdifrx_ch_intr 0x1E + /////////////////////////////////////////////////////////// + + #define BA_avioDhubSemMap_ag 0x0004 + #define B16avioDhubSemMap_ag 0x0004 + #define LSb32avioDhubSemMap_ag 0 + #define LSb16avioDhubSemMap_ag 0 + #define bavioDhubSemMap_ag 5 + #define MSK32avioDhubSemMap_ag 0x0000001F + #define avioDhubSemMap_ag_CH0_intr 0x0 + #define avioDhubSemMap_ag_CH1_intr 0x1 + #define avioDhubSemMap_ag_CH2_intr 0x2 + #define avioDhubSemMap_ag_CH3_intr 0x3 + #define avioDhubSemMap_ag_CH4_intr 0x4 + #define avioDhubSemMap_ag_CH5_intr 0x5 + #define avioDhubSemMap_ag_CH6_intr 0x6 + #define avioDhubSemMap_ag_CH7_intr 0x7 + #define avioDhubSemMap_ag_CH8_intr 0x8 + #define avioDhubSemMap_ag_CH9_intr 0x9 + #define avioDhubSemMap_ag_CH10_intr 0xA + #define avioDhubSemMap_ag_CH11_intr 0xB + #define avioDhubSemMap_ag_CH12_intr 0xC + #define avioDhubSemMap_ag_CH13_intr 0xD + #define avioDhubSemMap_ag_CH14_intr 0xE + #define avioDhubSemMap_ag_CH15_intr 0xF + #define avioDhubSemMap_ag_app_intr0 0x11 + #define avioDhubSemMap_ag_app_intr1 0x12 + #define avioDhubSemMap_ag_app_intr2 0x13 + #define avioDhubSemMap_ag_app_intr3 0x14 + #define avioDhubSemMap_ag_MA0_R_SEM 0x15 + #define avioDhubSemMap_ag_MA1_R_SEM 0x16 + #define avioDhubSemMap_ag_MA2_R_SEM 0x17 + #define avioDhubSemMap_ag_MA3_R_SEM 0x18 + #define avioDhubSemMap_ag_SA_R_SEM 0x19 + #define avioDhubSemMap_ag_SPDIF_R_SEM 0x1A + #define avioDhubSemMap_ag_MIC_W_SEM 0x1B + #define avioDhubSemMap_ag_spu_intr0 0x1C + #define avioDhubSemMap_ag_spu_intr1 0x1D + /////////////////////////////////////////////////////////// + + #define BA_avioDhubSemMap_vip 0x0008 + #define B16avioDhubSemMap_vip 0x0008 + #define LSb32avioDhubSemMap_vip 0 + #define LSb16avioDhubSemMap_vip 0 + #define bavioDhubSemMap_vip 5 + #define MSK32avioDhubSemMap_vip 0x0000001F + #define avioDhubSemMap_vip_CH0_intr 0x0 + #define avioDhubSemMap_vip_CH1_intr 0x1 + #define avioDhubSemMap_vip_CH2_intr 0x2 + #define avioDhubSemMap_vip_CH3_intr 0x3 + #define avioDhubSemMap_vip_CH4_intr 0x4 + #define avioDhubSemMap_vip_CH5_intr 0x5 + #define avioDhubSemMap_vip_CH6_intr 0x6 + #define avioDhubSemMap_vip_CH7_intr 0x7 + #define avioDhubSemMap_vip_CH8_intr 0x8 + #define avioDhubSemMap_vip_CH9_intr 0x9 + #define avioDhubSemMap_vip_CH10_intr 0xA + #define avioDhubSemMap_vip_CH11_intr 0xB + #define avioDhubSemMap_vip_CH12_intr 0xC + #define avioDhubSemMap_vip_CH13_intr 0xD + #define avioDhubSemMap_vip_CH14_intr 0xE + #define avioDhubSemMap_vip_CH15_intr 0xF + #define avioDhubSemMap_vip_rde_event_intr 0x10 + #define avioDhubSemMap_vip_wre_event_intr 0x11 + #define avioDhubSemMap_vip_dvi_vde_intr 0x12 + #define avioDhubSemMap_vip_sd_err_intr 0x13 + #define avioDhubSemMap_vip_audio_intr 0x14 + #define avioDhubSemMap_vip_vbi_vde_intr 0x15 + #define avioDhubSemMap_vip_sig_err_intr 0x16 + #define avioDhubSemMap_vip_bcmInvalidReqIntr 0x17 + #define avioDhubSemMap_vip_hdmirx_intr 0x18 + /////////////////////////////////////////////////////////// + + typedef struct SIE_avioDhubSemMap { + /////////////////////////////////////////////////////////// + #define GET32avioDhubSemMap_vpp(r32) _BFGET_(r32, 4, 0) + #define SET32avioDhubSemMap_vpp(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16avioDhubSemMap_vpp(r16) _BFGET_(r16, 4, 0) + #define SET16avioDhubSemMap_vpp(r16,v) _BFSET_(r16, 4, 0,v) + + UNSG32 u_vpp : 5; + UNSG32 RSVDx0_b5 : 27; + /////////////////////////////////////////////////////////// + #define GET32avioDhubSemMap_ag(r32) _BFGET_(r32, 4, 0) + #define SET32avioDhubSemMap_ag(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16avioDhubSemMap_ag(r16) _BFGET_(r16, 4, 0) + #define SET16avioDhubSemMap_ag(r16,v) _BFSET_(r16, 4, 0,v) + + UNSG32 u_ag : 5; + UNSG32 RSVDx4_b5 : 27; + /////////////////////////////////////////////////////////// + #define GET32avioDhubSemMap_vip(r32) _BFGET_(r32, 4, 0) + #define SET32avioDhubSemMap_vip(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16avioDhubSemMap_vip(r16) _BFGET_(r16, 4, 0) + #define SET16avioDhubSemMap_vip(r16,v) _BFSET_(r16, 4, 0,v) + + UNSG32 u_vip : 5; + UNSG32 RSVDx8_b5 : 27; + /////////////////////////////////////////////////////////// + } SIE_avioDhubSemMap; + + /////////////////////////////////////////////////////////// + SIGN32 avioDhubSemMap_drvrd(SIE_avioDhubSemMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avioDhubSemMap_drvwr(SIE_avioDhubSemMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avioDhubSemMap_reset(SIE_avioDhubSemMap *p); + SIGN32 avioDhubSemMap_cmp (SIE_avioDhubSemMap *p, SIE_avioDhubSemMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avioDhubSemMap_check(p,pie,pfx,hLOG) avioDhubSemMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avioDhubSemMap_print(p, pfx,hLOG) avioDhubSemMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avioDhubSemMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE vppTcmEntry (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (R-) +/// %unsigned 32 dat +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 32b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_vppTcmEntry +#define h_vppTcmEntry (){} + + #define BA_vppTcmEntry_dat 0x0000 + #define B16vppTcmEntry_dat 0x0000 + #define LSb32vppTcmEntry_dat 0 + #define LSb16vppTcmEntry_dat 0 + #define bvppTcmEntry_dat 32 + #define MSK32vppTcmEntry_dat 0xFFFFFFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_vppTcmEntry { + /////////////////////////////////////////////////////////// + #define GET32vppTcmEntry_dat(r32) _BFGET_(r32,31, 0) + #define SET32vppTcmEntry_dat(r32,v) _BFSET_(r32,31, 0,v) + + UNSG32 u_dat : 32; + /////////////////////////////////////////////////////////// + } SIE_vppTcmEntry; + + /////////////////////////////////////////////////////////// + SIGN32 vppTcmEntry_drvrd(SIE_vppTcmEntry *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 vppTcmEntry_drvwr(SIE_vppTcmEntry *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void vppTcmEntry_reset(SIE_vppTcmEntry *p); + SIGN32 vppTcmEntry_cmp (SIE_vppTcmEntry *p, SIE_vppTcmEntry *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define vppTcmEntry_check(p,pie,pfx,hLOG) vppTcmEntry_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define vppTcmEntry_print(p, pfx,hLOG) vppTcmEntry_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: vppTcmEntry +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE vppDhub biu (4,4) +/// ### +/// * vppDhub register specification +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 tcm0 +/// $vppTcmEntry tcm0 MEM [11264] +/// ### +/// * Real tcm size is 8K*5 + 4K = 44KB +/// ### +/// @ 0x10000 (P) +/// # 0x10000 dHub0 +/// $dHubReg2D dHub0 REG +/// @ 0x11000 (W-) +/// # # Stuffing bytes... +/// %% 491520 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 131072B, bits: 6306b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_vppDhub +#define h_vppDhub (){} + + #define RA_vppDhub_tcm0 0x0000 + /////////////////////////////////////////////////////////// + #define RA_vppDhub_dHub0 0x10000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_vppDhub { + /////////////////////////////////////////////////////////// + SIE_vppTcmEntry ie_tcm0[11264]; + UNSG8 RSVD_tcm0 [20480]; + /////////////////////////////////////////////////////////// + SIE_dHubReg2D ie_dHub0; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx11000 [61440]; + /////////////////////////////////////////////////////////// + } SIE_vppDhub; + + /////////////////////////////////////////////////////////// + SIGN32 vppDhub_drvrd(SIE_vppDhub *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 vppDhub_drvwr(SIE_vppDhub *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void vppDhub_reset(SIE_vppDhub *p); + SIGN32 vppDhub_cmp (SIE_vppDhub *p, SIE_vppDhub *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define vppDhub_check(p,pie,pfx,hLOG) vppDhub_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define vppDhub_print(p, pfx,hLOG) vppDhub_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: vppDhub +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE agDhub (4,4) +/// ### +/// * agDhub register specification +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 tcm0 +/// $vppTcmEntry tcm0 MEM [11264] +/// ### +/// * Real tcm size is 8K*3= 24KB +/// ### +/// @ 0x10000 (P) +/// # 0x10000 dHub0 +/// $dHubReg2D dHub0 REG +/// @ 0x11000 (W-) +/// # # Stuffing bytes... +/// %% 491520 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 131072B, bits: 6306b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_agDhub +#define h_agDhub (){} + + #define RA_agDhub_tcm0 0x0000 + /////////////////////////////////////////////////////////// + #define RA_agDhub_dHub0 0x10000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_agDhub { + /////////////////////////////////////////////////////////// + SIE_vppTcmEntry ie_tcm0[11264]; + UNSG8 RSVD_tcm0 [20480]; + /////////////////////////////////////////////////////////// + SIE_dHubReg2D ie_dHub0; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx11000 [61440]; + /////////////////////////////////////////////////////////// + } SIE_agDhub; + + /////////////////////////////////////////////////////////// + SIGN32 agDhub_drvrd(SIE_agDhub *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 agDhub_drvwr(SIE_agDhub *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void agDhub_reset(SIE_agDhub *p); + SIGN32 agDhub_cmp (SIE_agDhub *p, SIE_agDhub *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define agDhub_check(p,pie,pfx,hLOG) agDhub_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define agDhub_print(p, pfx,hLOG) agDhub_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: agDhub +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE vipDhub (4,4) +/// ### +/// * vipDhub register specification +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 tcm0 +/// $vppTcmEntry tcm0 MEM [5120] +/// ### +/// * Real tcm size is 12K*1 + 8K = 20KB +/// ### +/// @ 0x08000 (P) +/// # 0x08000 dHub0 +/// $dHubReg2D dHub0 REG +/// @ 0x09000 (W-) +/// # # Stuffing bytes... +/// %% 229376 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 65536B, bits: 6306b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_vipDhub +#define h_vipDhub (){} + + #define RA_vipDhub_tcm0 0x0000 + /////////////////////////////////////////////////////////// + #define RA_vipDhub_dHub0 0x8000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_vipDhub { + /////////////////////////////////////////////////////////// + SIE_vppTcmEntry ie_tcm0[5120]; + UNSG8 RSVD_tcm0 [12288]; + /////////////////////////////////////////////////////////// + SIE_dHubReg2D ie_dHub0; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx9000 [28672]; + /////////////////////////////////////////////////////////// + } SIE_vipDhub; + + /////////////////////////////////////////////////////////// + SIGN32 vipDhub_drvrd(SIE_vipDhub *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 vipDhub_drvwr(SIE_vipDhub *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void vipDhub_reset(SIE_vipDhub *p); + SIGN32 vipDhub_cmp (SIE_vipDhub *p, SIE_vipDhub *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define vipDhub_check(p,pie,pfx,hLOG) vipDhub_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define vipDhub_print(p, pfx,hLOG) vipDhub_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: vipDhub +//////////////////////////////////////////////////////////// + + + +#ifdef __cplusplus + } +#endif +#pragma pack() + +#endif +////// +/// ENDOFFILE: avioDhub.h +//////////////////////////////////////////////////////////// + diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/cbase.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/cbase.h new file mode 100644 index 00000000..13a8ead5 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/cbase.h @@ -0,0 +1,427 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + +/********************************************************************************************************************** +* $Log: vsys#comm#inc#cbase.h_1,v $ +* Revision 1.15 2007-01-03 15:57:01-08 hguan +* put numeric type definitions in a separate file. +* +* Revision 1.14 2007-01-03 12:08:57-08 georgew +* Add __ARMCC_VERSION support +* +* Revision 1.13 2006-12-12 17:59:25-08 georgew +* Add __ARMCC_VERSION support +* +* +* +* Revision 1.11 2006-10-30 11:28:09-08 lsha +* Add define of 'CONST' +* +* Revision 1.10 2006-07-18 19:40:49-07 lsha +* types of 'T*b' added +* +* Revision 1.9 2006-07-13 23:25:18-07 lsha +* ...No comments entered during checkin... +* +* Revision 1.8 2006-06-23 11:14:46-07 lsha +* ...No comments entered during checkin... +* +* Revision 1.7 2006-06-13 14:15:56-07 lsha +* 'fdbg' added +* +* Revision 1.4 2006-05-09 12:01:45-07 lsha +* Initial revision. +* +* +* DESCRIPTION: +* First header file to include by all C/C++ files. +* Unified definitions of commonly used types, symbols, constants, and macros/functions. +* +* Pre-definition build options: +* __MAIN__ Must and only be defined at the beginning of the .c/.cpp file that contains main() function. +* __CODE_LINK__ Optionally defined in make file: +* "#define __CODE_LINK__ 0" +* - Link for deep-embedded firmware. Will not link any library except customized "string.h". +* "#define __CODE_LINK__ 1" +* - Link for firmware on embedded OS. Will link customized "malloc.h" in addition. +* "#ifndef __CODE_LINK__" +* - Link for application software. Most standard libraries will be linked. +* +**********************************************************************************************************************/ + +#ifndef CBASE +#define CBASE " CBASE >>> " +/** CBASE + */ + + +#include "ctypes.h" + + +/** SECTION - platform dependent includes, definitions, and data types + */ + +#ifndef __CODE_LINK__ +#ifndef _CRT_SECURE_NO_DEPRECATE +#define _CRT_SECURE_NO_DEPRECATE /* To avoid CRT warnings */ +#endif + + #include + #include + #include + #include + #include + #include + #include + +#else + #ifndef __KERNEL__ + #include "string.h" /* Customized: memcpy, memset, and str... */ + #endif + + #if __CODE_LINK__ > 0 + #include "malloc.h" /* Customized: malloc, free */ + #endif +#endif + +#if(defined(WIN32)) + #include + #include + + #if(!defined(__XPLATFORM__)) + #include + #endif + #define __reversed_bit_fields__ + + #if(defined(_TGTOS) && (_TGTOS == CE)) + #define __OS_MSVC_CE__ + + #elif(defined(DRIVER)) + #define __OS_MSVC_KERNEL__ + + #elif(defined(_CONSOLE) || defined(__XPLATFORM__)) + #define __OS_MSVC_CONSOLE__ + + #else + #define __OS_MSVC_USER__ + #endif + +#elif(defined(__ARMCC_VERSION)) + +#elif(defined(__GNUC__)) + #if(defined(__KERNEL__)) + #define __OS_GNUC_KERNEL__ + #else + #include + #include + #include + #define __OS_GNUC_USER__ + #endif +#else + #define __OS_UNKNOWN__ +#endif +#if 0 + typedef UNSG8 T8b; + typedef UNSG16 T16b; + typedef UNSG32 T32b; + typedef UNSG32 T64b [2]; + typedef UNSG32 T96b [3]; + typedef UNSG32 T128b[4]; + typedef UNSG32 T160b[5]; + typedef UNSG32 T192b[6]; + typedef UNSG32 T224b[7]; + typedef UNSG32 T256b[8]; +#endif + +/** ENDOFSECTION + */ + + + +/** SECTION - symbols + */ + #ifdef __MAIN__ + #define Global + #define GlobalAssign(g, x) g = (x) + #else + #define Global extern + #define GlobalAssign(g, x) g + #endif + + #ifdef CONST + #undef CONST + #endif + #define CONST static const + + #ifdef INLINE + #undef INLINE + #endif + #if(defined(WIN32)) + #define INLINE static __forceinline + #elif(defined(__ARMCC_VERSION)) + #define INLINE static __inline + + #else + #define INLINE static inline + #endif + + #ifdef NULL + #undef NULL + #endif + #define NULL 0 + + #if(defined(WIN32)) + #ifndef __OS_MSVC_CE__ + #define $QPTR qword ptr + #define $DPTR dword ptr + #define $CNT edx + #define MMX_WIN32 + #endif + + #define ptr32u(ptr) ((UNSG32)PtrToUlong((char*)ptr)) + + #elif(defined(__ARMCC_VERSION)) //xingguo wang RVDS + #define ptr32u(ptr) ((UNSG32)(ptr)) + #define _unlink remove + #define _stricmp strcmp + #define _unlink remove + + #else + #define ptr32u(ptr) ((UNSG32)(ptr)) + + #define _stricmp strcasecmp + #define _unlink unlink + #define _open open + #define _close close + #define _read read + #define _write write + #define _tell tell + #define _lseek lseek + #define _lseeki64 lseeki64 + #endif + + #ifndef MemCpy + #define MemCpy memcpy + #endif + + #ifndef MemSet + #define MemSet memset + #endif + +/** ENDOFSECTION + */ + + + +#ifdef __cplusplus + extern "C" + { +#endif + +/** SECTION - pre-defined function arguments and returns + */ + typedef enum { + + ARG_KEEP = - 32768, /* No update, keep old value */ + ARG_AUTO = - 32767, /* Function chooses the value for it */ + + } EFuncArgument; + + typedef enum { + + ERR_UNKNOWN = - 1, /* Error type not defined */ + ERR_POINTER = - 2, /* Invalid pointer */ + ERR_FILE = - 3, /* File access failure */ + ERR_FIFO = - 4, /* FIFO overflow or underflow */ + ERR_MEMORY = - 5, /* Not enough memory or allocation failure */ + ERR_MISMATCH = - 6, /* Mis-matches found in hand-shaking */ + ERR_PARAMETER = - 7, /* False function parameter */ + ERR_HARDWARE = - 8, /* Hardware error */ + ERR_TIMING = - 9, /* Sychronize-related violation */ + + SUCCESS = 0 + + } EFuncReturn; +#ifndef __CODE_LINK__ +#if 0 + static char *eperr[] = { "SUCCESS", + "ERR_UNKNOWN", + "ERR_POINTER", + "ERR_FILE", + "ERR_FIFO", + "ERR_MEMORY", + "ERR_MISMATCH", + "ERR_PARAMETER", + "ERR_HARDWARE", + "ERR_TIMING", + }; +#endif +#else + #define eperr garrps8 +#endif + +/** ENDOFSECTION + */ + + + +/** SECTION - unit constants for storage, frequency and bit-rate + */ + #define KILO (1024) + #define kilo (1000) + + #define MEGA (1024 * 1024) + #define mega (1000 * 1000) + + #define GIGA (1024. * 1024. * 1024.) + #define giga (1000. * 1000. * 1000.) + + #define TERA (1024. * 1024. * 1024. * 1024.) + #define tera (1000. * 1000. * 1000. * 1000.) + + #define KILOth (1. / KILO) + #define kiloth (1. / kilo) + + #define MEGAth (1. / MEGA) + #define megath (1. / mega) + + #define GIGAth (1. / GIGA) + #define gigath (1. / giga) + + #define TERAth (1. / TERA) + #define terath (1. / tera) + + #define INFINITY32 (1 << 28) /* Help to avoid 32b operation over-flow */ + +/** ENDOFSECTION + */ + + + +/** SECTION - unified 'xdbg(fmt, ...)' and '_LOG'/'_dftLOG'/'_fLOG' (masking enabled) functions + */ + Global UNSG32 GlobalAssign(dbghfp, 0), GlobalAssign(dbgmask, ~0); + +#ifdef __CODE_LINK__ + #define xdbg 1 ? 0 : +#else + #if(defined(__OS_GNUC_KERNEL__)) + #define xdbg printk + + #elif(defined(__OS_MSVC_KERNEL__)) + #define xdbg DbgPrint + + #elif(defined(__OS_MSVC_CE__)) + #define xdbg KITLOutputDebugString + + #elif(defined(__OS_MSVC_USER__)) + INLINE void _dbg(const char *fmt, va_list args) + { char str[KILO]; vsprintf(str, fmt, args); OutputDebugString(str); + } + #else + #define _dbg vprintf + #endif + + #ifdef xdbg + #define fdbg 1 ? 0 : + #define _dflush(fp) do{}while(0) + #else + INLINE void xdbg(const char *fmt, ...) + { va_list args; va_start(args, fmt); + if(!dbghfp) _dbg(fmt, args); else vfprintf((FILE*)dbghfp, fmt, args); + va_end(args); + } + INLINE void fdbg(UNSG32 hfp, const char *fmt, ...) + { va_list args; if(!hfp) return; va_start(args, fmt); + vfprintf((FILE*)hfp, fmt, args); va_end(args); + } + #define _dflush(fp) do{ if(fp) fflush((FILE*)fp); }while(0) + #endif +#endif + + /* Usage: _LOG(log_file, log_mask, item_bit, ("item = %d\n", item_value)) */ + #define _LOG(fp, mask, b, fmt_args) do{ if(((b) < 0) || bTST(mask, b)) { UNSG32 dft = dbghfp; \ + dbghfp = ptr32u(fp); xdbg fmt_args; dbghfp = dft; } \ + }while(0) + /* Usage: _dftLOG(bLogFlush, item_bit, ("item = %d\n", item_value)) */ + #define _dftLOG(flush, b, fmt_args) do{ _LOG(dbghfp, dbgmask, b, fmt_args); if(flush) _dflush(dbghfp); \ + }while(0) + /* Usage: _fLOG(log_file, ("item = %d\n", item_value)) */ + #define _fLOG(fp, fmt_args) do{ _LOG(fp, 1, 0, fmt_args); _dflush(fp); }while(0) + +/** ENDOFSECTION + */ + + + +/** SECTION - unified 'IO32RD', 'IO32WR', and 'IO64RD' functions + */ +#ifdef __INLINE_ASM_ARM__ + /** Read 32-bit data from certain address + * a: input, address + * d: output 32-bit data + */ + #define IO32RD(d, a) __asm__ __volatile__ ("ldr %0, [%1]" : "=r" (d) : "r" (a)) + + /** Write 32-bit data from certain address + * a: input, address + * d: input 32-bit data + */ + #define IO32WR(d, a) __asm__ __volatile__ ("str %0, [%1]" : : "r" (d), "r" (a) : "memory") + + /** Read 64-bit data from certain address (MUST be 8-byte aligned) + * a: input, address + * d0: output first 32-bit data + * d1: output second 32-bit data + */ + #define IO64RD(d0, d1, a) __asm__ __volatile__ ( \ + "ldrd r4, [%2] \n\t" "mov %0, r4 \n\t" "mov %1, r5 \n\t" \ + : "=r" (d0), "=r" (d1) : "r" (a) : "r4", "r5" \ + ) +#else + +#if defined(BERLIN_SINGLE_CPU) && !defined(__LINUX_KERNEL__) + #define IO32RD(d, a) do{ (d) = (*((volatile UNSG32 *)devmem_phy_to_virt(a))); }while(0) + #define IO32WR(d, a) do{ (*((volatile UNSG32 *)devmem_phy_to_virt(a)) = (UNSG32)(d)); }while(0) +#else + #define IO32RD(d, a) do{ (d) = *(UNSG32*)(a); }while(0) + #define IO32WR(d, a) do{ *(UNSG32*)(a) = (d); }while(0) +#endif + #define IO64RD(d0, d1, a) do{ IO32RD(d0, a); IO32RD(d1, (a) + 4); }while(0) +#endif + + /* Directly write a 32b register or append to 'T64b cfgQ[]', in (adr,data) pairs */ + #define IO32CFG(cfgQ, i, a, d) do{ if(cfgQ) { (cfgQ)[i][0] = (a); (cfgQ)[i][1] = (d); } \ + else IO32WR(d, a); \ + (i) ++; \ + }while(0) + +/** ENDOFSECTION + */ + +#ifdef __cplusplus + } +#endif + + + +/** CBASE + */ +#endif + +/** ENDOFFILE: cbase.h ************************************************************************************************ + */ + diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/cinclude.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/cinclude.h new file mode 100644 index 00000000..99340bac --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/cinclude.h @@ -0,0 +1,264 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + +/********************************************************************************************************************** +* $Log: vsys#comm#inc#cinclude.h_1,v $ +* Revision 1.12 2007-04-17 21:54:01-07 lsha +* ...No comments entered during checkin... +* +* Revision 1.11 2006-09-22 16:04:08-07 lsha +* ...No comments entered during checkin... +* +* Revision 1.10 2006-09-12 20:01:01-07 lsha +* ...No comments entered during checkin... +* +* Revision 1.9 2006-07-05 13:19:22-07 lsha +* more bit-field ops added +* +* Revision 1.8 2006-06-19 19:20:47-07 lsha +* ...No comments entered during checkin... +* +* Revision 1.7 2006-06-12 20:00:06-07 lsha +* ...No comments entered during checkin... +* +* Revision 1.6 2006-06-01 21:13:44-07 lsha +* Resolve the warning of shifting negative bits +* +* Revision 1.5 2006-05-09 19:53:30-07 lsha +* SOS "$Log: vsys#comm#inc#cinclude.h_1,v $ +* SOS "Revision 1.12 2007-04-17 21:54:01-07 lsha +* SOS "...No comments entered during checkin... +* SOS " +* SOS "Revision 1.11 2006-09-22 16:04:08-07 lsha +* SOS "...No comments entered during checkin... +* SOS " +* SOS "Revision 1.10 2006-09-12 20:01:01-07 lsha +* SOS "...No comments entered during checkin... +* SOS " +* SOS "Revision 1.9 2006-07-05 13:19:22-07 lsha +* SOS "more bit-field ops added +* SOS " +* SOS "Revision 1.8 2006-06-19 19:20:47-07 lsha +* SOS "...No comments entered during checkin... +* SOS " +* SOS "Revision 1.7 2006-06-12 20:00:06-07 lsha +* SOS "...No comments entered during checkin... +* SOS " +* SOS "Revision 1.6 2006-06-01 21:13:44-07 lsha +* SOS "Resolve the warning of shifting negative bits +* SOS "" tag added. +* +* Revision 1.4 2006-05-09 12:01:44-07 lsha +* Initial revision. +* +* +* DESCRIPTION: +* Strongly suggested to be included by all C/C++ files. +* It includes useful functional macro definitions. +* +* Pre-definition build options: +* __big_endian__ Optionally defined in "_proj.h" for big-endian system only. +* +**********************************************************************************************************************/ + +#ifndef CINCLUDE +#define CINCLUDE " CINCLUDE >>> " +/** CINCLUDE + */ + +#include "cbase.h" + + + +#ifdef __cplusplus + extern "C" + { +#endif + +/** SECTION - macros for basic math operations + */ + #ifdef MIN + #undef MIN + #endif + #define MIN(a, b) ((a) < (b) ? (a) : (b)) + + #ifdef MAX + #undef MAX + #endif + #define MAX(a, b) ((a) > (b) ? (a) : (b)) + + #ifdef ABS + #undef ABS + #endif + #define ABS(x) ((x) < 0 ? - (x) : (x)) + INLINE SIGN32 ABS32(SIGN32 x) { SIGN32 s = x >> 31; return (x ^ s) - s; } + + #ifdef SIGN + #undef SIGN + #endif + #define SIGN(x) ((x) < 0 ? - 1 : 1) + + #ifdef ROUND + #undef ROUND + #endif + #define ROUND(x) ((SIGN32)floor((x) + 0.5)) + + #define SCLb(k) (31 & (k)) + #define UNIVSCL(a, k) (((k) < 0) ? ((a) >> SCLb(- (k))) : ((a) << SCLb(k))) + #define UNSGDES(a, k) (((a) + (1 << SCLb(k) >> 1)) >> SCLb(k)) + #define UNSGSCL(a, k) (((k) < 0) ? UNSGDES(a, - (k)) : ((a) << SCLb(k))) + #define SIGNDES(a, k) (((a) > 0) ? - UNSGDES(- (a), k) : UNSGDES(a, k)) + #define SIGNSCL(a, k) (((k) < 0) ? SIGNDES(a, - (k)) : ((a) << SCLb(k))) + #define REALSCL(a, k) (((k) < 0) ? (a) / (1 << SCLb(- (k))) : (a) * (1 << SCLb(k))) + #define UNIVRND(k) UNIVSCL(1, (k) - 1) + + #define EVENDIV(x) (((x) >> 1) | ((x) & 1)) + #define CEILDIV(a, b) (((a) + (b) - 1) / (b)) + #define UNSGDIV(a, b) (((a) + ((b) >> 1)) / (b)) + #define SIGNDIV(a, b) ((((a) > 0) ? ((a) + ((b) >> 1)) : ((a) - ((b) >> 1))) / (b)) + #define NSclDIV(a, k1, b, k2) ((a) * (k1) / (b) * (k2) + UNSGDIV((((a) * (k1)) % (b)) * (k2), b)) + + #define Average256(x1, x2, a) (((x1) * (a) + (x2) * (256 - (a)) + 128) >> 8) + #define Average(x1, x2, a, s) (((x1) * (a) + (x2) * ((s) - (a)) + ((s) >> 1)) / (s)) + #define Average3(r, x1, p1, x2, p2, x3, p3) \ + (((r) + (x1) * (p1) + (x2) * (p2) + (x3) * (p3)) / ((p1) + (p2) + (p3))) + #define Median(a, b, c) ((a) > (b) ? ((b) > (c) ? (b) : MIN(a, c)) : ((b) < (c) ? (b) : MAX(a, c))) + + #define SATURATE(x, min, max) MAX(MIN((x), (max)), (min)) + #define ModInc(x, i, mod) do{ (x) += (i); while((x) >= (mod)) (x) -= (mod); }while(0) + #define RangeBits(x, b) do{ for((b) = 0; ; (b) ++) \ + if((UNSG32)(x) < (UNSG32)(1 << (b))) break; \ + }while(0) +/** ENDOFSECTION + */ + + + +/** SECTION - macros for bits operations + */ + #define bTST(x, b) (((x) >> (b)) & 1) + #define bSETMASK(b) ((b) < 32 ? (1 << (b)) : 0) + #define bSET(x, b) do{ (x) |= bSETMASK(b); }while(0) + #define bCLRMASK(b) (~(bSETMASK(b))) + #define bCLR(x, b) do{ (x) &= bCLRMASK(b); }while(0) + #define NSETMASK(msb, lsb) (bSETMASK((msb) + 1) - bSETMASK(lsb)) + #define NCLRMASK(msb, lsb) (~(NSETMASK(msb, lsb))) + #define CutTo(x, b) ((x) & (bSETMASK(b) - 1)) + #define SignedRestore(x, b) ((SIGN32)(x) << (32 - (b)) >> (32 - (b))) + #define SignMagnitude(x, b) CutTo((x) < 0 ? bSETMASK((b) - 1) - (x) : (x), b) + #define InvSignMagnitude(x, b) ((SIGN32)(bTST(x, (b) - 1) ? bSETMASK((b) - 1) - (x) : (x))) + #define ClpSignMagnitude(r, x, b) do{ SIGN32 lmt = (1 << ((b) - 1)) - 1, y = SATURATE(x, - lmt, lmt); \ + r = SignMagnitude(y, b); \ + }while(0) + #define GetField(r, b, mask) (((r) & (mask)) >> (b)) + #define vreg_GetField(r, name) GetField(r, CB_##name, CM_##name) + #define SetField(r, b, mask, f) do{ (r) &= ~(mask); (r) |= ((f) << (b)) & (mask); }while(0) + #define vreg_SetField(r, name, f) SetField(r, CB_##name, CM_##name, f) + #define vreg_Init(a, v, reg, rst, base) do{ (a) = (base) + RA_##reg; (v) = (rst); }while(0) + + #define GetUnsigned(bf, v, b) do{ (v) = (UNSG32)(bf); }while(0) + #define GetSigned(bf, v, b) do{ (v) = SignedRestore((UNSG32)bf, b); }while(0) + #define GetSignMagnitude(bf, v, b) do{ (v) = InvSignMagnitude((UNSG32)bf, b); }while(0) + #define SetUnsigned(bf, v, b) do{ (bf) = CutTo((UNSG32)v, b); }while(0) + #define SetSigned(bf, v, b) SetUnsigned(bf, v, b) + #define SetSignMagnitude(bf, v, b) do{ (bf) = SignMagnitude((SIGN32)v, b); }while(0) + + #define UnsignedBF(v, b, lsb) (CutTo((UNSG32)v, b) << (lsb)) + #define SignedBF(v, b, lsb) (CutTo((SIGN32)v, b) << (lsb)) + #define SignMagnitudeBF(v, b, lsb) (SignMagnitude((SIGN32)v, b) << (lsb)) + + #define sizeofType(Ta, Tb) (sizeof(Ta) / sizeof(Tb)) + #define sizeofArray(arr) (sizeofType(arr, arr[0])) + #define endofString(str, i) ((str) + (strlen(str) - i)) + + #ifdef __big_endian__ + #define MSi8 (0x0) + #define LSi8 (0x3) + #define MSi16 (0x0) + #define LSi16 (0x1) + #define MSB32(u32) (((UNSG8*)&(u32))[0]) + #define LSB32(u32) (((UNSG8*)&(u32))[3]) + #else + #define MSi8 (0x3) + #define LSi8 (0x0) + #define MSi16 (0x1) + #define LSi16 (0x0) + #define MSB32(u32) (((UNSG8*)&(u32))[3]) + #define LSB32(u32) (((UNSG8*)&(u32))[0]) + #endif + +/** ENDOFSECTION + */ + + + +/** SECTION - macros for miscellaneous functional shortcuts + */ + /* FIFO level decrease by N, return SUCCESS or ERR_FIFO if under-flow */ + #define FiFoDec(lvl, n) (((lvl) < (n)) ? ERR_FIFO : ((lvl) -= (n), SUCCESS)) + + /* FIFO level increase by N, return SUCCESS or ERR_FIFO if over-flow */ + #define FiFoInc(lvl, n, max) (((lvl) + (n) > (max)) ? ERR_FIFO : ((lvl) += (n), SUCCESS)) + + /* Parse function arguments */ + #define LET(x, arg, dftval) do{ if((arg) != ARG_KEEP) x = ((arg) == ARG_AUTO) ? (dftval) : (arg); \ + }while(0) + /* Copy an array */ + #define CpyN(n, T, tgt, src) do{ SIGN32 ni; \ + for(ni = 0; ni < (n); ni ++) (tgt)[ni] = (T)((src)[ni]); \ + }while(0) + /* Clip-copy an array */ + #define ClpN(n, tgt, src, min, max) do{ SIGN32 ni; \ + for(ni = 0; ni < (n); ni ++) \ + (tgt)[ni] = SATURATE((src)[ni], min, max); \ + }while(0) + /* Optimize memory pointer (default: pow2 = 32) */ + #define MemAlign(pmem, pow2) (((UNSG8*)(pmem)) + ((pow2) - 1) - ((ptr32u(pmem) - 1) & ((pow2) - 1))) + + /* Copy 2 32b pointers (non-burst mode) */ + #define RegCpy(pa, pb, regs) do{ SIGN32 ni, cnt = (regs); \ + for(ni = 0; ni < cnt; ni ++) ((UNSG32*)pa)[ni] = ((UNSG32*)pb)[ni]; \ + }while(0) + /* Copy 2 pointers of any same structure type */ + #define EleCpy(pa, pb, type) RegCpy(pa, pb, sizeof(type) >> 2) + + /* Print a number to binary bits */ + #define ToBinary(x, b, str) do{ SIGN32 ni; \ + for(ni = 0; ni < (b); ni ++) \ + (str)[ni] = bTST(x, (b) - ni - 1) ? '1' : '0'; \ + (str)[ni] = 0; \ + }while(0) + /* Scan a number from binary bits */ + #define FromBinary(x, b, str) do{ SIGN32 ni; (x) = 0; \ + for(ni = 0; ni < (b); ni ++) \ + (x) = ((x) << 1) | (((str)[ni] == '1') ? 1 : 0); \ + }while(0) +/** ENDOFSECTION + */ + +#ifdef __cplusplus + } +#endif + + + +/** CINCLUDE + */ +#endif + +/** ENDOFFILE: cinclude.h ********************************************************************************************* + */ + diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/ctypes.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/ctypes.h new file mode 100644 index 00000000..317b8b69 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/ctypes.h @@ -0,0 +1,69 @@ +/********************************************************************************************************** +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +**********************************************************************************************************/ + +#ifndef CTYPES_H_ +#define CTYPES_H_ + +typedef unsigned char UNSG8; +typedef signed char SIGN8; +typedef unsigned short UNSG16; +typedef signed short SIGN16; +typedef unsigned int UNSG32; +typedef signed int SIGN32; +typedef unsigned long long UNSG64; +typedef signed long long SIGN64; +typedef float REAL32; +typedef double REAL64; + +#ifndef INLINE +#define INLINE static inline +#endif + +/*--------------------------------------------------------------------------- + NULL + ---------------------------------------------------------------------------*/ + +#ifndef NULL + #ifdef __cplusplus + #define NULL 0 + #else + #define NULL ((void *)0) + #endif +#endif + + +/*--------------------------------------------------------------------------- + Multiple-word types + ---------------------------------------------------------------------------*/ +#ifndef Txxb + #define Txxb + typedef UNSG8 T8b; + typedef UNSG16 T16b; + typedef UNSG32 T32b; + typedef UNSG32 T64b [2]; + typedef UNSG32 T96b [3]; + typedef UNSG32 T128b[4]; + typedef UNSG32 T160b[5]; + typedef UNSG32 T192b[6]; + typedef UNSG32 T224b[7]; + typedef UNSG32 T256b[8]; +#endif + +#endif diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/dHub.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/dHub.h new file mode 100644 index 00000000..6a016473 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/dHub.h @@ -0,0 +1,4186 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + +////// +/// don't edit! auto-generated by docc: dHub.h +//////////////////////////////////////////////////////////// +#ifndef dHub_h +#define dHub_h (){} + + +#include "ctypes.h" + +#pragma pack(1) +#ifdef __cplusplus + extern "C" { +#endif + +#ifndef _DOCC_H_BITOPS_ +#define _DOCC_H_BITOPS_ (){} + + #define _bSETMASK_(b) ((b)<32 ? (1<<((b)&31)) : 0) + #define _NSETMASK_(msb,lsb) (_bSETMASK_((msb)+1)-_bSETMASK_(lsb)) + #define _bCLRMASK_(b) (~_bSETMASK_(b)) + #define _NCLRMASK_(msb,lsb) (~_NSETMASK_(msb,lsb)) + #define _BFGET_(r,msb,lsb) (_NSETMASK_((msb)-(lsb),0)&((r)>>(lsb))) + #define _BFSET_(r,msb,lsb,v) do{ (r)&=_NCLRMASK_(msb,lsb); (r)|=_NSETMASK_(msb,lsb)&((v)<<(lsb)); }while(0) + +#endif + + + +////// +/// +/// $INTERFACE SemaINTR (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 mask (W-) +/// %unsigned 1 empty 0x0 +/// ### +/// * Enable interrupt on 'empty' condition +/// ### +/// %unsigned 1 full 0x0 +/// ### +/// * Enable interrupt on 'full' condition +/// ### +/// %unsigned 1 almostEmpty 0x0 +/// ### +/// * Enable interrupt on 'almostEmpty' condition +/// ### +/// %unsigned 1 almostFull 0x0 +/// ### +/// * Enable interrupt on 'almostFull' condition +/// ### +/// %% 28 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 4b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaINTR +#define h_SemaINTR (){} + + #define RA_SemaINTR_mask 0x0000 + + #define BA_SemaINTR_mask_empty 0x0000 + #define B16SemaINTR_mask_empty 0x0000 + #define LSb32SemaINTR_mask_empty 0 + #define LSb16SemaINTR_mask_empty 0 + #define bSemaINTR_mask_empty 1 + #define MSK32SemaINTR_mask_empty 0x00000001 + + #define BA_SemaINTR_mask_full 0x0000 + #define B16SemaINTR_mask_full 0x0000 + #define LSb32SemaINTR_mask_full 1 + #define LSb16SemaINTR_mask_full 1 + #define bSemaINTR_mask_full 1 + #define MSK32SemaINTR_mask_full 0x00000002 + + #define BA_SemaINTR_mask_almostEmpty 0x0000 + #define B16SemaINTR_mask_almostEmpty 0x0000 + #define LSb32SemaINTR_mask_almostEmpty 2 + #define LSb16SemaINTR_mask_almostEmpty 2 + #define bSemaINTR_mask_almostEmpty 1 + #define MSK32SemaINTR_mask_almostEmpty 0x00000004 + + #define BA_SemaINTR_mask_almostFull 0x0000 + #define B16SemaINTR_mask_almostFull 0x0000 + #define LSb32SemaINTR_mask_almostFull 3 + #define LSb16SemaINTR_mask_almostFull 3 + #define bSemaINTR_mask_almostFull 1 + #define MSK32SemaINTR_mask_almostFull 0x00000008 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaINTR { + /////////////////////////////////////////////////////////// + #define GET32SemaINTR_mask_empty(r32) _BFGET_(r32, 0, 0) + #define SET32SemaINTR_mask_empty(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaINTR_mask_empty(r16) _BFGET_(r16, 0, 0) + #define SET16SemaINTR_mask_empty(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaINTR_mask_full(r32) _BFGET_(r32, 1, 1) + #define SET32SemaINTR_mask_full(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaINTR_mask_full(r16) _BFGET_(r16, 1, 1) + #define SET16SemaINTR_mask_full(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaINTR_mask_almostEmpty(r32) _BFGET_(r32, 2, 2) + #define SET32SemaINTR_mask_almostEmpty(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaINTR_mask_almostEmpty(r16) _BFGET_(r16, 2, 2) + #define SET16SemaINTR_mask_almostEmpty(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaINTR_mask_almostFull(r32) _BFGET_(r32, 3, 3) + #define SET32SemaINTR_mask_almostFull(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaINTR_mask_almostFull(r16) _BFGET_(r16, 3, 3) + #define SET16SemaINTR_mask_almostFull(r16,v) _BFSET_(r16, 3, 3,v) + + #define w32SemaINTR_mask {\ + UNSG32 umask_empty : 1;\ + UNSG32 umask_full : 1;\ + UNSG32 umask_almostEmpty : 1;\ + UNSG32 umask_almostFull : 1;\ + UNSG32 RSVDx0_b4 : 28;\ + } + union { UNSG32 u32SemaINTR_mask; + struct w32SemaINTR_mask; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaINTR; + + typedef union T32SemaINTR_mask + { UNSG32 u32; + struct w32SemaINTR_mask; + } T32SemaINTR_mask; + /////////////////////////////////////////////////////////// + + typedef union TSemaINTR_mask + { UNSG32 u32[1]; + struct { + struct w32SemaINTR_mask; + }; + } TSemaINTR_mask; + + /////////////////////////////////////////////////////////// + SIGN32 SemaINTR_drvrd(SIE_SemaINTR *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaINTR_drvwr(SIE_SemaINTR *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaINTR_reset(SIE_SemaINTR *p); + SIGN32 SemaINTR_cmp (SIE_SemaINTR *p, SIE_SemaINTR *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaINTR_check(p,pie,pfx,hLOG) SemaINTR_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaINTR_print(p, pfx,hLOG) SemaINTR_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaINTR +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE Semaphore biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 16 DEPTH 0xF +/// ### +/// * Max level of semaphore +/// * Note: write this register will trigger counter reset +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00004 (P) +/// # 0x00004 INTR +/// $SemaINTR INTR REG [3] +/// ### +/// * Interrupt mask for 3 CPUs +/// ### +/// @ 0x00010 mask (W-) +/// %unsigned 1 full 0x0 +/// %unsigned 1 emp 0x0 +/// ### +/// * When full bit is set to one, to the producer, the semaphore will never be full, so that the producer will never be blocked. +/// * When emp bit is set to one, to the consumer, the semaphore will never be empty, so that the consumer will never be blocked. +/// * When the emp/full bit is set, the semaphore/FIFO pointer will be maintained, but the counter will be not correct anymore. +/// ### +/// %% 30 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 20B, bits: 30b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_Semaphore +#define h_Semaphore (){} + + #define RA_Semaphore_CFG 0x0000 + + #define BA_Semaphore_CFG_DEPTH 0x0000 + #define B16Semaphore_CFG_DEPTH 0x0000 + #define LSb32Semaphore_CFG_DEPTH 0 + #define LSb16Semaphore_CFG_DEPTH 0 + #define bSemaphore_CFG_DEPTH 16 + #define MSK32Semaphore_CFG_DEPTH 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_Semaphore_INTR 0x0004 + /////////////////////////////////////////////////////////// + #define RA_Semaphore_mask 0x0010 + + #define BA_Semaphore_mask_full 0x0010 + #define B16Semaphore_mask_full 0x0010 + #define LSb32Semaphore_mask_full 0 + #define LSb16Semaphore_mask_full 0 + #define bSemaphore_mask_full 1 + #define MSK32Semaphore_mask_full 0x00000001 + + #define BA_Semaphore_mask_emp 0x0010 + #define B16Semaphore_mask_emp 0x0010 + #define LSb32Semaphore_mask_emp 1 + #define LSb16Semaphore_mask_emp 1 + #define bSemaphore_mask_emp 1 + #define MSK32Semaphore_mask_emp 0x00000002 + /////////////////////////////////////////////////////////// + + typedef struct SIE_Semaphore { + /////////////////////////////////////////////////////////// + #define GET32Semaphore_CFG_DEPTH(r32) _BFGET_(r32,15, 0) + #define SET32Semaphore_CFG_DEPTH(r32,v) _BFSET_(r32,15, 0,v) + #define GET16Semaphore_CFG_DEPTH(r16) _BFGET_(r16,15, 0) + #define SET16Semaphore_CFG_DEPTH(r16,v) _BFSET_(r16,15, 0,v) + + #define w32Semaphore_CFG {\ + UNSG32 uCFG_DEPTH : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32Semaphore_CFG; + struct w32Semaphore_CFG; + }; + /////////////////////////////////////////////////////////// + SIE_SemaINTR ie_INTR[3]; + /////////////////////////////////////////////////////////// + #define GET32Semaphore_mask_full(r32) _BFGET_(r32, 0, 0) + #define SET32Semaphore_mask_full(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16Semaphore_mask_full(r16) _BFGET_(r16, 0, 0) + #define SET16Semaphore_mask_full(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32Semaphore_mask_emp(r32) _BFGET_(r32, 1, 1) + #define SET32Semaphore_mask_emp(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16Semaphore_mask_emp(r16) _BFGET_(r16, 1, 1) + #define SET16Semaphore_mask_emp(r16,v) _BFSET_(r16, 1, 1,v) + + #define w32Semaphore_mask {\ + UNSG32 umask_full : 1;\ + UNSG32 umask_emp : 1;\ + UNSG32 RSVDx10_b2 : 30;\ + } + union { UNSG32 u32Semaphore_mask; + struct w32Semaphore_mask; + }; + /////////////////////////////////////////////////////////// + } SIE_Semaphore; + + typedef union T32Semaphore_CFG + { UNSG32 u32; + struct w32Semaphore_CFG; + } T32Semaphore_CFG; + typedef union T32Semaphore_mask + { UNSG32 u32; + struct w32Semaphore_mask; + } T32Semaphore_mask; + /////////////////////////////////////////////////////////// + + typedef union TSemaphore_CFG + { UNSG32 u32[1]; + struct { + struct w32Semaphore_CFG; + }; + } TSemaphore_CFG; + typedef union TSemaphore_mask + { UNSG32 u32[1]; + struct { + struct w32Semaphore_mask; + }; + } TSemaphore_mask; + + /////////////////////////////////////////////////////////// + SIGN32 Semaphore_drvrd(SIE_Semaphore *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 Semaphore_drvwr(SIE_Semaphore *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void Semaphore_reset(SIE_Semaphore *p); + SIGN32 Semaphore_cmp (SIE_Semaphore *p, SIE_Semaphore *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define Semaphore_check(p,pie,pfx,hLOG) Semaphore_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define Semaphore_print(p, pfx,hLOG) Semaphore_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: Semaphore +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaQuery (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 RESP (R-) +/// %unsigned 16 CNT +/// ### +/// * Semaphore counter level +/// ### +/// %unsigned 16 PTR +/// ### +/// * Semaphore pointer: +/// * producer-wptr or consumer-rptr +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 32b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaQuery +#define h_SemaQuery (){} + + #define RA_SemaQuery_RESP 0x0000 + + #define BA_SemaQuery_RESP_CNT 0x0000 + #define B16SemaQuery_RESP_CNT 0x0000 + #define LSb32SemaQuery_RESP_CNT 0 + #define LSb16SemaQuery_RESP_CNT 0 + #define bSemaQuery_RESP_CNT 16 + #define MSK32SemaQuery_RESP_CNT 0x0000FFFF + + #define BA_SemaQuery_RESP_PTR 0x0002 + #define B16SemaQuery_RESP_PTR 0x0002 + #define LSb32SemaQuery_RESP_PTR 16 + #define LSb16SemaQuery_RESP_PTR 0 + #define bSemaQuery_RESP_PTR 16 + #define MSK32SemaQuery_RESP_PTR 0xFFFF0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaQuery { + /////////////////////////////////////////////////////////// + #define GET32SemaQuery_RESP_CNT(r32) _BFGET_(r32,15, 0) + #define SET32SemaQuery_RESP_CNT(r32,v) _BFSET_(r32,15, 0,v) + #define GET16SemaQuery_RESP_CNT(r16) _BFGET_(r16,15, 0) + #define SET16SemaQuery_RESP_CNT(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32SemaQuery_RESP_PTR(r32) _BFGET_(r32,31,16) + #define SET32SemaQuery_RESP_PTR(r32,v) _BFSET_(r32,31,16,v) + #define GET16SemaQuery_RESP_PTR(r16) _BFGET_(r16,15, 0) + #define SET16SemaQuery_RESP_PTR(r16,v) _BFSET_(r16,15, 0,v) + + #define w32SemaQuery_RESP {\ + UNSG32 uRESP_CNT : 16;\ + UNSG32 uRESP_PTR : 16;\ + } + union { UNSG32 u32SemaQuery_RESP; + struct w32SemaQuery_RESP; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaQuery; + + typedef union T32SemaQuery_RESP + { UNSG32 u32; + struct w32SemaQuery_RESP; + } T32SemaQuery_RESP; + /////////////////////////////////////////////////////////// + + typedef union TSemaQuery_RESP + { UNSG32 u32[1]; + struct { + struct w32SemaQuery_RESP; + }; + } TSemaQuery_RESP; + + /////////////////////////////////////////////////////////// + SIGN32 SemaQuery_drvrd(SIE_SemaQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaQuery_drvwr(SIE_SemaQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaQuery_reset(SIE_SemaQuery *p); + SIGN32 SemaQuery_cmp (SIE_SemaQuery *p, SIE_SemaQuery *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaQuery_check(p,pie,pfx,hLOG) SemaQuery_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaQuery_print(p, pfx,hLOG) SemaQuery_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaQuery +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaQueryMap (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 ADDR (P) +/// %unsigned 2 byte +/// %unsigned 5 ID +/// ### +/// * Semaphore cell index +/// ### +/// %unsigned 1 master +/// : producer 0x0 +/// : consumer 0x1 +/// ### +/// * Select which counter to read +/// ### +/// %% 24 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 8b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaQueryMap +#define h_SemaQueryMap (){} + + #define RA_SemaQueryMap_ADDR 0x0000 + + #define BA_SemaQueryMap_ADDR_byte 0x0000 + #define B16SemaQueryMap_ADDR_byte 0x0000 + #define LSb32SemaQueryMap_ADDR_byte 0 + #define LSb16SemaQueryMap_ADDR_byte 0 + #define bSemaQueryMap_ADDR_byte 2 + #define MSK32SemaQueryMap_ADDR_byte 0x00000003 + + #define BA_SemaQueryMap_ADDR_ID 0x0000 + #define B16SemaQueryMap_ADDR_ID 0x0000 + #define LSb32SemaQueryMap_ADDR_ID 2 + #define LSb16SemaQueryMap_ADDR_ID 2 + #define bSemaQueryMap_ADDR_ID 5 + #define MSK32SemaQueryMap_ADDR_ID 0x0000007C + + #define BA_SemaQueryMap_ADDR_master 0x0000 + #define B16SemaQueryMap_ADDR_master 0x0000 + #define LSb32SemaQueryMap_ADDR_master 7 + #define LSb16SemaQueryMap_ADDR_master 7 + #define bSemaQueryMap_ADDR_master 1 + #define MSK32SemaQueryMap_ADDR_master 0x00000080 + #define SemaQueryMap_ADDR_master_producer 0x0 + #define SemaQueryMap_ADDR_master_consumer 0x1 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaQueryMap { + /////////////////////////////////////////////////////////// + #define GET32SemaQueryMap_ADDR_byte(r32) _BFGET_(r32, 1, 0) + #define SET32SemaQueryMap_ADDR_byte(r32,v) _BFSET_(r32, 1, 0,v) + #define GET16SemaQueryMap_ADDR_byte(r16) _BFGET_(r16, 1, 0) + #define SET16SemaQueryMap_ADDR_byte(r16,v) _BFSET_(r16, 1, 0,v) + + #define GET32SemaQueryMap_ADDR_ID(r32) _BFGET_(r32, 6, 2) + #define SET32SemaQueryMap_ADDR_ID(r32,v) _BFSET_(r32, 6, 2,v) + #define GET16SemaQueryMap_ADDR_ID(r16) _BFGET_(r16, 6, 2) + #define SET16SemaQueryMap_ADDR_ID(r16,v) _BFSET_(r16, 6, 2,v) + + #define GET32SemaQueryMap_ADDR_master(r32) _BFGET_(r32, 7, 7) + #define SET32SemaQueryMap_ADDR_master(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaQueryMap_ADDR_master(r16) _BFGET_(r16, 7, 7) + #define SET16SemaQueryMap_ADDR_master(r16,v) _BFSET_(r16, 7, 7,v) + + #define w32SemaQueryMap_ADDR {\ + UNSG32 uADDR_byte : 2;\ + UNSG32 uADDR_ID : 5;\ + UNSG32 uADDR_master : 1;\ + UNSG32 RSVDx0_b8 : 24;\ + } + union { UNSG32 u32SemaQueryMap_ADDR; + struct w32SemaQueryMap_ADDR; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaQueryMap; + + typedef union T32SemaQueryMap_ADDR + { UNSG32 u32; + struct w32SemaQueryMap_ADDR; + } T32SemaQueryMap_ADDR; + /////////////////////////////////////////////////////////// + + typedef union TSemaQueryMap_ADDR + { UNSG32 u32[1]; + struct { + struct w32SemaQueryMap_ADDR; + }; + } TSemaQueryMap_ADDR; + + /////////////////////////////////////////////////////////// + SIGN32 SemaQueryMap_drvrd(SIE_SemaQueryMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaQueryMap_drvwr(SIE_SemaQueryMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaQueryMap_reset(SIE_SemaQueryMap *p); + SIGN32 SemaQueryMap_cmp (SIE_SemaQueryMap *p, SIE_SemaQueryMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaQueryMap_check(p,pie,pfx,hLOG) SemaQueryMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaQueryMap_print(p, pfx,hLOG) SemaQueryMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaQueryMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaHub biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 Query (R-) +/// # 0x00000 counter +/// $SemaQuery counter MEM [64] +/// ### +/// * Access address as defined above +/// ### +/// @ 0x00100 ARR (P) +/// # 0x00100 cell +/// $Semaphore cell REG [32] +/// ### +/// * Up-to 32 semaphore cells +/// ### +/// @ 0x00380 PUSH (W-) +/// %unsigned 8 ID +/// %unsigned 8 delta +/// ### +/// * CPU increases PCounter by delta (0 as push 256) +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00384 POP (W-) +/// %unsigned 8 ID +/// %unsigned 8 delta +/// ### +/// * CPU decreases CCounter by delta (0 as pop 256) +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00388 empty (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'empty' status +/// ### +/// @ 0x0038C full (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'full' status +/// ### +/// @ 0x00390 almostEmpty (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'almostEmpty' status +/// ### +/// @ 0x00394 almostFull (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'almostFull' status +/// ### +/// @ 0x00398 (W-) +/// # # Stuffing bytes... +/// %% 832 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 1024B, bits: 1152b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaHub +#define h_SemaHub (){} + + #define RA_SemaHub_Query 0x0000 + #define RA_SemaHub_counter 0x0000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_ARR 0x0100 + #define RA_SemaHub_cell 0x0100 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_PUSH 0x0380 + + #define BA_SemaHub_PUSH_ID 0x0380 + #define B16SemaHub_PUSH_ID 0x0380 + #define LSb32SemaHub_PUSH_ID 0 + #define LSb16SemaHub_PUSH_ID 0 + #define bSemaHub_PUSH_ID 8 + #define MSK32SemaHub_PUSH_ID 0x000000FF + + #define BA_SemaHub_PUSH_delta 0x0381 + #define B16SemaHub_PUSH_delta 0x0380 + #define LSb32SemaHub_PUSH_delta 8 + #define LSb16SemaHub_PUSH_delta 8 + #define bSemaHub_PUSH_delta 8 + #define MSK32SemaHub_PUSH_delta 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_POP 0x0384 + + #define BA_SemaHub_POP_ID 0x0384 + #define B16SemaHub_POP_ID 0x0384 + #define LSb32SemaHub_POP_ID 0 + #define LSb16SemaHub_POP_ID 0 + #define bSemaHub_POP_ID 8 + #define MSK32SemaHub_POP_ID 0x000000FF + + #define BA_SemaHub_POP_delta 0x0385 + #define B16SemaHub_POP_delta 0x0384 + #define LSb32SemaHub_POP_delta 8 + #define LSb16SemaHub_POP_delta 8 + #define bSemaHub_POP_delta 8 + #define MSK32SemaHub_POP_delta 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_empty 0x0388 + + #define BA_SemaHub_empty_ST_0i 0x0388 + #define B16SemaHub_empty_ST_0i 0x0388 + #define LSb32SemaHub_empty_ST_0i 0 + #define LSb16SemaHub_empty_ST_0i 0 + #define bSemaHub_empty_ST_0i 1 + #define MSK32SemaHub_empty_ST_0i 0x00000001 + + #define BA_SemaHub_empty_ST_1i 0x0388 + #define B16SemaHub_empty_ST_1i 0x0388 + #define LSb32SemaHub_empty_ST_1i 1 + #define LSb16SemaHub_empty_ST_1i 1 + #define bSemaHub_empty_ST_1i 1 + #define MSK32SemaHub_empty_ST_1i 0x00000002 + + #define BA_SemaHub_empty_ST_2i 0x0388 + #define B16SemaHub_empty_ST_2i 0x0388 + #define LSb32SemaHub_empty_ST_2i 2 + #define LSb16SemaHub_empty_ST_2i 2 + #define bSemaHub_empty_ST_2i 1 + #define MSK32SemaHub_empty_ST_2i 0x00000004 + + #define BA_SemaHub_empty_ST_3i 0x0388 + #define B16SemaHub_empty_ST_3i 0x0388 + #define LSb32SemaHub_empty_ST_3i 3 + #define LSb16SemaHub_empty_ST_3i 3 + #define bSemaHub_empty_ST_3i 1 + #define MSK32SemaHub_empty_ST_3i 0x00000008 + + #define BA_SemaHub_empty_ST_4i 0x0388 + #define B16SemaHub_empty_ST_4i 0x0388 + #define LSb32SemaHub_empty_ST_4i 4 + #define LSb16SemaHub_empty_ST_4i 4 + #define bSemaHub_empty_ST_4i 1 + #define MSK32SemaHub_empty_ST_4i 0x00000010 + + #define BA_SemaHub_empty_ST_5i 0x0388 + #define B16SemaHub_empty_ST_5i 0x0388 + #define LSb32SemaHub_empty_ST_5i 5 + #define LSb16SemaHub_empty_ST_5i 5 + #define bSemaHub_empty_ST_5i 1 + #define MSK32SemaHub_empty_ST_5i 0x00000020 + + #define BA_SemaHub_empty_ST_6i 0x0388 + #define B16SemaHub_empty_ST_6i 0x0388 + #define LSb32SemaHub_empty_ST_6i 6 + #define LSb16SemaHub_empty_ST_6i 6 + #define bSemaHub_empty_ST_6i 1 + #define MSK32SemaHub_empty_ST_6i 0x00000040 + + #define BA_SemaHub_empty_ST_7i 0x0388 + #define B16SemaHub_empty_ST_7i 0x0388 + #define LSb32SemaHub_empty_ST_7i 7 + #define LSb16SemaHub_empty_ST_7i 7 + #define bSemaHub_empty_ST_7i 1 + #define MSK32SemaHub_empty_ST_7i 0x00000080 + + #define BA_SemaHub_empty_ST_8i 0x0389 + #define B16SemaHub_empty_ST_8i 0x0388 + #define LSb32SemaHub_empty_ST_8i 8 + #define LSb16SemaHub_empty_ST_8i 8 + #define bSemaHub_empty_ST_8i 1 + #define MSK32SemaHub_empty_ST_8i 0x00000100 + + #define BA_SemaHub_empty_ST_9i 0x0389 + #define B16SemaHub_empty_ST_9i 0x0388 + #define LSb32SemaHub_empty_ST_9i 9 + #define LSb16SemaHub_empty_ST_9i 9 + #define bSemaHub_empty_ST_9i 1 + #define MSK32SemaHub_empty_ST_9i 0x00000200 + + #define BA_SemaHub_empty_ST_10i 0x0389 + #define B16SemaHub_empty_ST_10i 0x0388 + #define LSb32SemaHub_empty_ST_10i 10 + #define LSb16SemaHub_empty_ST_10i 10 + #define bSemaHub_empty_ST_10i 1 + #define MSK32SemaHub_empty_ST_10i 0x00000400 + + #define BA_SemaHub_empty_ST_11i 0x0389 + #define B16SemaHub_empty_ST_11i 0x0388 + #define LSb32SemaHub_empty_ST_11i 11 + #define LSb16SemaHub_empty_ST_11i 11 + #define bSemaHub_empty_ST_11i 1 + #define MSK32SemaHub_empty_ST_11i 0x00000800 + + #define BA_SemaHub_empty_ST_12i 0x0389 + #define B16SemaHub_empty_ST_12i 0x0388 + #define LSb32SemaHub_empty_ST_12i 12 + #define LSb16SemaHub_empty_ST_12i 12 + #define bSemaHub_empty_ST_12i 1 + #define MSK32SemaHub_empty_ST_12i 0x00001000 + + #define BA_SemaHub_empty_ST_13i 0x0389 + #define B16SemaHub_empty_ST_13i 0x0388 + #define LSb32SemaHub_empty_ST_13i 13 + #define LSb16SemaHub_empty_ST_13i 13 + #define bSemaHub_empty_ST_13i 1 + #define MSK32SemaHub_empty_ST_13i 0x00002000 + + #define BA_SemaHub_empty_ST_14i 0x0389 + #define B16SemaHub_empty_ST_14i 0x0388 + #define LSb32SemaHub_empty_ST_14i 14 + #define LSb16SemaHub_empty_ST_14i 14 + #define bSemaHub_empty_ST_14i 1 + #define MSK32SemaHub_empty_ST_14i 0x00004000 + + #define BA_SemaHub_empty_ST_15i 0x0389 + #define B16SemaHub_empty_ST_15i 0x0388 + #define LSb32SemaHub_empty_ST_15i 15 + #define LSb16SemaHub_empty_ST_15i 15 + #define bSemaHub_empty_ST_15i 1 + #define MSK32SemaHub_empty_ST_15i 0x00008000 + + #define BA_SemaHub_empty_ST_16i 0x038A + #define B16SemaHub_empty_ST_16i 0x038A + #define LSb32SemaHub_empty_ST_16i 16 + #define LSb16SemaHub_empty_ST_16i 0 + #define bSemaHub_empty_ST_16i 1 + #define MSK32SemaHub_empty_ST_16i 0x00010000 + + #define BA_SemaHub_empty_ST_17i 0x038A + #define B16SemaHub_empty_ST_17i 0x038A + #define LSb32SemaHub_empty_ST_17i 17 + #define LSb16SemaHub_empty_ST_17i 1 + #define bSemaHub_empty_ST_17i 1 + #define MSK32SemaHub_empty_ST_17i 0x00020000 + + #define BA_SemaHub_empty_ST_18i 0x038A + #define B16SemaHub_empty_ST_18i 0x038A + #define LSb32SemaHub_empty_ST_18i 18 + #define LSb16SemaHub_empty_ST_18i 2 + #define bSemaHub_empty_ST_18i 1 + #define MSK32SemaHub_empty_ST_18i 0x00040000 + + #define BA_SemaHub_empty_ST_19i 0x038A + #define B16SemaHub_empty_ST_19i 0x038A + #define LSb32SemaHub_empty_ST_19i 19 + #define LSb16SemaHub_empty_ST_19i 3 + #define bSemaHub_empty_ST_19i 1 + #define MSK32SemaHub_empty_ST_19i 0x00080000 + + #define BA_SemaHub_empty_ST_20i 0x038A + #define B16SemaHub_empty_ST_20i 0x038A + #define LSb32SemaHub_empty_ST_20i 20 + #define LSb16SemaHub_empty_ST_20i 4 + #define bSemaHub_empty_ST_20i 1 + #define MSK32SemaHub_empty_ST_20i 0x00100000 + + #define BA_SemaHub_empty_ST_21i 0x038A + #define B16SemaHub_empty_ST_21i 0x038A + #define LSb32SemaHub_empty_ST_21i 21 + #define LSb16SemaHub_empty_ST_21i 5 + #define bSemaHub_empty_ST_21i 1 + #define MSK32SemaHub_empty_ST_21i 0x00200000 + + #define BA_SemaHub_empty_ST_22i 0x038A + #define B16SemaHub_empty_ST_22i 0x038A + #define LSb32SemaHub_empty_ST_22i 22 + #define LSb16SemaHub_empty_ST_22i 6 + #define bSemaHub_empty_ST_22i 1 + #define MSK32SemaHub_empty_ST_22i 0x00400000 + + #define BA_SemaHub_empty_ST_23i 0x038A + #define B16SemaHub_empty_ST_23i 0x038A + #define LSb32SemaHub_empty_ST_23i 23 + #define LSb16SemaHub_empty_ST_23i 7 + #define bSemaHub_empty_ST_23i 1 + #define MSK32SemaHub_empty_ST_23i 0x00800000 + + #define BA_SemaHub_empty_ST_24i 0x038B + #define B16SemaHub_empty_ST_24i 0x038A + #define LSb32SemaHub_empty_ST_24i 24 + #define LSb16SemaHub_empty_ST_24i 8 + #define bSemaHub_empty_ST_24i 1 + #define MSK32SemaHub_empty_ST_24i 0x01000000 + + #define BA_SemaHub_empty_ST_25i 0x038B + #define B16SemaHub_empty_ST_25i 0x038A + #define LSb32SemaHub_empty_ST_25i 25 + #define LSb16SemaHub_empty_ST_25i 9 + #define bSemaHub_empty_ST_25i 1 + #define MSK32SemaHub_empty_ST_25i 0x02000000 + + #define BA_SemaHub_empty_ST_26i 0x038B + #define B16SemaHub_empty_ST_26i 0x038A + #define LSb32SemaHub_empty_ST_26i 26 + #define LSb16SemaHub_empty_ST_26i 10 + #define bSemaHub_empty_ST_26i 1 + #define MSK32SemaHub_empty_ST_26i 0x04000000 + + #define BA_SemaHub_empty_ST_27i 0x038B + #define B16SemaHub_empty_ST_27i 0x038A + #define LSb32SemaHub_empty_ST_27i 27 + #define LSb16SemaHub_empty_ST_27i 11 + #define bSemaHub_empty_ST_27i 1 + #define MSK32SemaHub_empty_ST_27i 0x08000000 + + #define BA_SemaHub_empty_ST_28i 0x038B + #define B16SemaHub_empty_ST_28i 0x038A + #define LSb32SemaHub_empty_ST_28i 28 + #define LSb16SemaHub_empty_ST_28i 12 + #define bSemaHub_empty_ST_28i 1 + #define MSK32SemaHub_empty_ST_28i 0x10000000 + + #define BA_SemaHub_empty_ST_29i 0x038B + #define B16SemaHub_empty_ST_29i 0x038A + #define LSb32SemaHub_empty_ST_29i 29 + #define LSb16SemaHub_empty_ST_29i 13 + #define bSemaHub_empty_ST_29i 1 + #define MSK32SemaHub_empty_ST_29i 0x20000000 + + #define BA_SemaHub_empty_ST_30i 0x038B + #define B16SemaHub_empty_ST_30i 0x038A + #define LSb32SemaHub_empty_ST_30i 30 + #define LSb16SemaHub_empty_ST_30i 14 + #define bSemaHub_empty_ST_30i 1 + #define MSK32SemaHub_empty_ST_30i 0x40000000 + + #define BA_SemaHub_empty_ST_31i 0x038B + #define B16SemaHub_empty_ST_31i 0x038A + #define LSb32SemaHub_empty_ST_31i 31 + #define LSb16SemaHub_empty_ST_31i 15 + #define bSemaHub_empty_ST_31i 1 + #define MSK32SemaHub_empty_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_full 0x038C + + #define BA_SemaHub_full_ST_0i 0x038C + #define B16SemaHub_full_ST_0i 0x038C + #define LSb32SemaHub_full_ST_0i 0 + #define LSb16SemaHub_full_ST_0i 0 + #define bSemaHub_full_ST_0i 1 + #define MSK32SemaHub_full_ST_0i 0x00000001 + + #define BA_SemaHub_full_ST_1i 0x038C + #define B16SemaHub_full_ST_1i 0x038C + #define LSb32SemaHub_full_ST_1i 1 + #define LSb16SemaHub_full_ST_1i 1 + #define bSemaHub_full_ST_1i 1 + #define MSK32SemaHub_full_ST_1i 0x00000002 + + #define BA_SemaHub_full_ST_2i 0x038C + #define B16SemaHub_full_ST_2i 0x038C + #define LSb32SemaHub_full_ST_2i 2 + #define LSb16SemaHub_full_ST_2i 2 + #define bSemaHub_full_ST_2i 1 + #define MSK32SemaHub_full_ST_2i 0x00000004 + + #define BA_SemaHub_full_ST_3i 0x038C + #define B16SemaHub_full_ST_3i 0x038C + #define LSb32SemaHub_full_ST_3i 3 + #define LSb16SemaHub_full_ST_3i 3 + #define bSemaHub_full_ST_3i 1 + #define MSK32SemaHub_full_ST_3i 0x00000008 + + #define BA_SemaHub_full_ST_4i 0x038C + #define B16SemaHub_full_ST_4i 0x038C + #define LSb32SemaHub_full_ST_4i 4 + #define LSb16SemaHub_full_ST_4i 4 + #define bSemaHub_full_ST_4i 1 + #define MSK32SemaHub_full_ST_4i 0x00000010 + + #define BA_SemaHub_full_ST_5i 0x038C + #define B16SemaHub_full_ST_5i 0x038C + #define LSb32SemaHub_full_ST_5i 5 + #define LSb16SemaHub_full_ST_5i 5 + #define bSemaHub_full_ST_5i 1 + #define MSK32SemaHub_full_ST_5i 0x00000020 + + #define BA_SemaHub_full_ST_6i 0x038C + #define B16SemaHub_full_ST_6i 0x038C + #define LSb32SemaHub_full_ST_6i 6 + #define LSb16SemaHub_full_ST_6i 6 + #define bSemaHub_full_ST_6i 1 + #define MSK32SemaHub_full_ST_6i 0x00000040 + + #define BA_SemaHub_full_ST_7i 0x038C + #define B16SemaHub_full_ST_7i 0x038C + #define LSb32SemaHub_full_ST_7i 7 + #define LSb16SemaHub_full_ST_7i 7 + #define bSemaHub_full_ST_7i 1 + #define MSK32SemaHub_full_ST_7i 0x00000080 + + #define BA_SemaHub_full_ST_8i 0x038D + #define B16SemaHub_full_ST_8i 0x038C + #define LSb32SemaHub_full_ST_8i 8 + #define LSb16SemaHub_full_ST_8i 8 + #define bSemaHub_full_ST_8i 1 + #define MSK32SemaHub_full_ST_8i 0x00000100 + + #define BA_SemaHub_full_ST_9i 0x038D + #define B16SemaHub_full_ST_9i 0x038C + #define LSb32SemaHub_full_ST_9i 9 + #define LSb16SemaHub_full_ST_9i 9 + #define bSemaHub_full_ST_9i 1 + #define MSK32SemaHub_full_ST_9i 0x00000200 + + #define BA_SemaHub_full_ST_10i 0x038D + #define B16SemaHub_full_ST_10i 0x038C + #define LSb32SemaHub_full_ST_10i 10 + #define LSb16SemaHub_full_ST_10i 10 + #define bSemaHub_full_ST_10i 1 + #define MSK32SemaHub_full_ST_10i 0x00000400 + + #define BA_SemaHub_full_ST_11i 0x038D + #define B16SemaHub_full_ST_11i 0x038C + #define LSb32SemaHub_full_ST_11i 11 + #define LSb16SemaHub_full_ST_11i 11 + #define bSemaHub_full_ST_11i 1 + #define MSK32SemaHub_full_ST_11i 0x00000800 + + #define BA_SemaHub_full_ST_12i 0x038D + #define B16SemaHub_full_ST_12i 0x038C + #define LSb32SemaHub_full_ST_12i 12 + #define LSb16SemaHub_full_ST_12i 12 + #define bSemaHub_full_ST_12i 1 + #define MSK32SemaHub_full_ST_12i 0x00001000 + + #define BA_SemaHub_full_ST_13i 0x038D + #define B16SemaHub_full_ST_13i 0x038C + #define LSb32SemaHub_full_ST_13i 13 + #define LSb16SemaHub_full_ST_13i 13 + #define bSemaHub_full_ST_13i 1 + #define MSK32SemaHub_full_ST_13i 0x00002000 + + #define BA_SemaHub_full_ST_14i 0x038D + #define B16SemaHub_full_ST_14i 0x038C + #define LSb32SemaHub_full_ST_14i 14 + #define LSb16SemaHub_full_ST_14i 14 + #define bSemaHub_full_ST_14i 1 + #define MSK32SemaHub_full_ST_14i 0x00004000 + + #define BA_SemaHub_full_ST_15i 0x038D + #define B16SemaHub_full_ST_15i 0x038C + #define LSb32SemaHub_full_ST_15i 15 + #define LSb16SemaHub_full_ST_15i 15 + #define bSemaHub_full_ST_15i 1 + #define MSK32SemaHub_full_ST_15i 0x00008000 + + #define BA_SemaHub_full_ST_16i 0x038E + #define B16SemaHub_full_ST_16i 0x038E + #define LSb32SemaHub_full_ST_16i 16 + #define LSb16SemaHub_full_ST_16i 0 + #define bSemaHub_full_ST_16i 1 + #define MSK32SemaHub_full_ST_16i 0x00010000 + + #define BA_SemaHub_full_ST_17i 0x038E + #define B16SemaHub_full_ST_17i 0x038E + #define LSb32SemaHub_full_ST_17i 17 + #define LSb16SemaHub_full_ST_17i 1 + #define bSemaHub_full_ST_17i 1 + #define MSK32SemaHub_full_ST_17i 0x00020000 + + #define BA_SemaHub_full_ST_18i 0x038E + #define B16SemaHub_full_ST_18i 0x038E + #define LSb32SemaHub_full_ST_18i 18 + #define LSb16SemaHub_full_ST_18i 2 + #define bSemaHub_full_ST_18i 1 + #define MSK32SemaHub_full_ST_18i 0x00040000 + + #define BA_SemaHub_full_ST_19i 0x038E + #define B16SemaHub_full_ST_19i 0x038E + #define LSb32SemaHub_full_ST_19i 19 + #define LSb16SemaHub_full_ST_19i 3 + #define bSemaHub_full_ST_19i 1 + #define MSK32SemaHub_full_ST_19i 0x00080000 + + #define BA_SemaHub_full_ST_20i 0x038E + #define B16SemaHub_full_ST_20i 0x038E + #define LSb32SemaHub_full_ST_20i 20 + #define LSb16SemaHub_full_ST_20i 4 + #define bSemaHub_full_ST_20i 1 + #define MSK32SemaHub_full_ST_20i 0x00100000 + + #define BA_SemaHub_full_ST_21i 0x038E + #define B16SemaHub_full_ST_21i 0x038E + #define LSb32SemaHub_full_ST_21i 21 + #define LSb16SemaHub_full_ST_21i 5 + #define bSemaHub_full_ST_21i 1 + #define MSK32SemaHub_full_ST_21i 0x00200000 + + #define BA_SemaHub_full_ST_22i 0x038E + #define B16SemaHub_full_ST_22i 0x038E + #define LSb32SemaHub_full_ST_22i 22 + #define LSb16SemaHub_full_ST_22i 6 + #define bSemaHub_full_ST_22i 1 + #define MSK32SemaHub_full_ST_22i 0x00400000 + + #define BA_SemaHub_full_ST_23i 0x038E + #define B16SemaHub_full_ST_23i 0x038E + #define LSb32SemaHub_full_ST_23i 23 + #define LSb16SemaHub_full_ST_23i 7 + #define bSemaHub_full_ST_23i 1 + #define MSK32SemaHub_full_ST_23i 0x00800000 + + #define BA_SemaHub_full_ST_24i 0x038F + #define B16SemaHub_full_ST_24i 0x038E + #define LSb32SemaHub_full_ST_24i 24 + #define LSb16SemaHub_full_ST_24i 8 + #define bSemaHub_full_ST_24i 1 + #define MSK32SemaHub_full_ST_24i 0x01000000 + + #define BA_SemaHub_full_ST_25i 0x038F + #define B16SemaHub_full_ST_25i 0x038E + #define LSb32SemaHub_full_ST_25i 25 + #define LSb16SemaHub_full_ST_25i 9 + #define bSemaHub_full_ST_25i 1 + #define MSK32SemaHub_full_ST_25i 0x02000000 + + #define BA_SemaHub_full_ST_26i 0x038F + #define B16SemaHub_full_ST_26i 0x038E + #define LSb32SemaHub_full_ST_26i 26 + #define LSb16SemaHub_full_ST_26i 10 + #define bSemaHub_full_ST_26i 1 + #define MSK32SemaHub_full_ST_26i 0x04000000 + + #define BA_SemaHub_full_ST_27i 0x038F + #define B16SemaHub_full_ST_27i 0x038E + #define LSb32SemaHub_full_ST_27i 27 + #define LSb16SemaHub_full_ST_27i 11 + #define bSemaHub_full_ST_27i 1 + #define MSK32SemaHub_full_ST_27i 0x08000000 + + #define BA_SemaHub_full_ST_28i 0x038F + #define B16SemaHub_full_ST_28i 0x038E + #define LSb32SemaHub_full_ST_28i 28 + #define LSb16SemaHub_full_ST_28i 12 + #define bSemaHub_full_ST_28i 1 + #define MSK32SemaHub_full_ST_28i 0x10000000 + + #define BA_SemaHub_full_ST_29i 0x038F + #define B16SemaHub_full_ST_29i 0x038E + #define LSb32SemaHub_full_ST_29i 29 + #define LSb16SemaHub_full_ST_29i 13 + #define bSemaHub_full_ST_29i 1 + #define MSK32SemaHub_full_ST_29i 0x20000000 + + #define BA_SemaHub_full_ST_30i 0x038F + #define B16SemaHub_full_ST_30i 0x038E + #define LSb32SemaHub_full_ST_30i 30 + #define LSb16SemaHub_full_ST_30i 14 + #define bSemaHub_full_ST_30i 1 + #define MSK32SemaHub_full_ST_30i 0x40000000 + + #define BA_SemaHub_full_ST_31i 0x038F + #define B16SemaHub_full_ST_31i 0x038E + #define LSb32SemaHub_full_ST_31i 31 + #define LSb16SemaHub_full_ST_31i 15 + #define bSemaHub_full_ST_31i 1 + #define MSK32SemaHub_full_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_almostEmpty 0x0390 + + #define BA_SemaHub_almostEmpty_ST_0i 0x0390 + #define B16SemaHub_almostEmpty_ST_0i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_0i 0 + #define LSb16SemaHub_almostEmpty_ST_0i 0 + #define bSemaHub_almostEmpty_ST_0i 1 + #define MSK32SemaHub_almostEmpty_ST_0i 0x00000001 + + #define BA_SemaHub_almostEmpty_ST_1i 0x0390 + #define B16SemaHub_almostEmpty_ST_1i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_1i 1 + #define LSb16SemaHub_almostEmpty_ST_1i 1 + #define bSemaHub_almostEmpty_ST_1i 1 + #define MSK32SemaHub_almostEmpty_ST_1i 0x00000002 + + #define BA_SemaHub_almostEmpty_ST_2i 0x0390 + #define B16SemaHub_almostEmpty_ST_2i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_2i 2 + #define LSb16SemaHub_almostEmpty_ST_2i 2 + #define bSemaHub_almostEmpty_ST_2i 1 + #define MSK32SemaHub_almostEmpty_ST_2i 0x00000004 + + #define BA_SemaHub_almostEmpty_ST_3i 0x0390 + #define B16SemaHub_almostEmpty_ST_3i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_3i 3 + #define LSb16SemaHub_almostEmpty_ST_3i 3 + #define bSemaHub_almostEmpty_ST_3i 1 + #define MSK32SemaHub_almostEmpty_ST_3i 0x00000008 + + #define BA_SemaHub_almostEmpty_ST_4i 0x0390 + #define B16SemaHub_almostEmpty_ST_4i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_4i 4 + #define LSb16SemaHub_almostEmpty_ST_4i 4 + #define bSemaHub_almostEmpty_ST_4i 1 + #define MSK32SemaHub_almostEmpty_ST_4i 0x00000010 + + #define BA_SemaHub_almostEmpty_ST_5i 0x0390 + #define B16SemaHub_almostEmpty_ST_5i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_5i 5 + #define LSb16SemaHub_almostEmpty_ST_5i 5 + #define bSemaHub_almostEmpty_ST_5i 1 + #define MSK32SemaHub_almostEmpty_ST_5i 0x00000020 + + #define BA_SemaHub_almostEmpty_ST_6i 0x0390 + #define B16SemaHub_almostEmpty_ST_6i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_6i 6 + #define LSb16SemaHub_almostEmpty_ST_6i 6 + #define bSemaHub_almostEmpty_ST_6i 1 + #define MSK32SemaHub_almostEmpty_ST_6i 0x00000040 + + #define BA_SemaHub_almostEmpty_ST_7i 0x0390 + #define B16SemaHub_almostEmpty_ST_7i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_7i 7 + #define LSb16SemaHub_almostEmpty_ST_7i 7 + #define bSemaHub_almostEmpty_ST_7i 1 + #define MSK32SemaHub_almostEmpty_ST_7i 0x00000080 + + #define BA_SemaHub_almostEmpty_ST_8i 0x0391 + #define B16SemaHub_almostEmpty_ST_8i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_8i 8 + #define LSb16SemaHub_almostEmpty_ST_8i 8 + #define bSemaHub_almostEmpty_ST_8i 1 + #define MSK32SemaHub_almostEmpty_ST_8i 0x00000100 + + #define BA_SemaHub_almostEmpty_ST_9i 0x0391 + #define B16SemaHub_almostEmpty_ST_9i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_9i 9 + #define LSb16SemaHub_almostEmpty_ST_9i 9 + #define bSemaHub_almostEmpty_ST_9i 1 + #define MSK32SemaHub_almostEmpty_ST_9i 0x00000200 + + #define BA_SemaHub_almostEmpty_ST_10i 0x0391 + #define B16SemaHub_almostEmpty_ST_10i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_10i 10 + #define LSb16SemaHub_almostEmpty_ST_10i 10 + #define bSemaHub_almostEmpty_ST_10i 1 + #define MSK32SemaHub_almostEmpty_ST_10i 0x00000400 + + #define BA_SemaHub_almostEmpty_ST_11i 0x0391 + #define B16SemaHub_almostEmpty_ST_11i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_11i 11 + #define LSb16SemaHub_almostEmpty_ST_11i 11 + #define bSemaHub_almostEmpty_ST_11i 1 + #define MSK32SemaHub_almostEmpty_ST_11i 0x00000800 + + #define BA_SemaHub_almostEmpty_ST_12i 0x0391 + #define B16SemaHub_almostEmpty_ST_12i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_12i 12 + #define LSb16SemaHub_almostEmpty_ST_12i 12 + #define bSemaHub_almostEmpty_ST_12i 1 + #define MSK32SemaHub_almostEmpty_ST_12i 0x00001000 + + #define BA_SemaHub_almostEmpty_ST_13i 0x0391 + #define B16SemaHub_almostEmpty_ST_13i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_13i 13 + #define LSb16SemaHub_almostEmpty_ST_13i 13 + #define bSemaHub_almostEmpty_ST_13i 1 + #define MSK32SemaHub_almostEmpty_ST_13i 0x00002000 + + #define BA_SemaHub_almostEmpty_ST_14i 0x0391 + #define B16SemaHub_almostEmpty_ST_14i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_14i 14 + #define LSb16SemaHub_almostEmpty_ST_14i 14 + #define bSemaHub_almostEmpty_ST_14i 1 + #define MSK32SemaHub_almostEmpty_ST_14i 0x00004000 + + #define BA_SemaHub_almostEmpty_ST_15i 0x0391 + #define B16SemaHub_almostEmpty_ST_15i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_15i 15 + #define LSb16SemaHub_almostEmpty_ST_15i 15 + #define bSemaHub_almostEmpty_ST_15i 1 + #define MSK32SemaHub_almostEmpty_ST_15i 0x00008000 + + #define BA_SemaHub_almostEmpty_ST_16i 0x0392 + #define B16SemaHub_almostEmpty_ST_16i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_16i 16 + #define LSb16SemaHub_almostEmpty_ST_16i 0 + #define bSemaHub_almostEmpty_ST_16i 1 + #define MSK32SemaHub_almostEmpty_ST_16i 0x00010000 + + #define BA_SemaHub_almostEmpty_ST_17i 0x0392 + #define B16SemaHub_almostEmpty_ST_17i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_17i 17 + #define LSb16SemaHub_almostEmpty_ST_17i 1 + #define bSemaHub_almostEmpty_ST_17i 1 + #define MSK32SemaHub_almostEmpty_ST_17i 0x00020000 + + #define BA_SemaHub_almostEmpty_ST_18i 0x0392 + #define B16SemaHub_almostEmpty_ST_18i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_18i 18 + #define LSb16SemaHub_almostEmpty_ST_18i 2 + #define bSemaHub_almostEmpty_ST_18i 1 + #define MSK32SemaHub_almostEmpty_ST_18i 0x00040000 + + #define BA_SemaHub_almostEmpty_ST_19i 0x0392 + #define B16SemaHub_almostEmpty_ST_19i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_19i 19 + #define LSb16SemaHub_almostEmpty_ST_19i 3 + #define bSemaHub_almostEmpty_ST_19i 1 + #define MSK32SemaHub_almostEmpty_ST_19i 0x00080000 + + #define BA_SemaHub_almostEmpty_ST_20i 0x0392 + #define B16SemaHub_almostEmpty_ST_20i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_20i 20 + #define LSb16SemaHub_almostEmpty_ST_20i 4 + #define bSemaHub_almostEmpty_ST_20i 1 + #define MSK32SemaHub_almostEmpty_ST_20i 0x00100000 + + #define BA_SemaHub_almostEmpty_ST_21i 0x0392 + #define B16SemaHub_almostEmpty_ST_21i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_21i 21 + #define LSb16SemaHub_almostEmpty_ST_21i 5 + #define bSemaHub_almostEmpty_ST_21i 1 + #define MSK32SemaHub_almostEmpty_ST_21i 0x00200000 + + #define BA_SemaHub_almostEmpty_ST_22i 0x0392 + #define B16SemaHub_almostEmpty_ST_22i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_22i 22 + #define LSb16SemaHub_almostEmpty_ST_22i 6 + #define bSemaHub_almostEmpty_ST_22i 1 + #define MSK32SemaHub_almostEmpty_ST_22i 0x00400000 + + #define BA_SemaHub_almostEmpty_ST_23i 0x0392 + #define B16SemaHub_almostEmpty_ST_23i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_23i 23 + #define LSb16SemaHub_almostEmpty_ST_23i 7 + #define bSemaHub_almostEmpty_ST_23i 1 + #define MSK32SemaHub_almostEmpty_ST_23i 0x00800000 + + #define BA_SemaHub_almostEmpty_ST_24i 0x0393 + #define B16SemaHub_almostEmpty_ST_24i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_24i 24 + #define LSb16SemaHub_almostEmpty_ST_24i 8 + #define bSemaHub_almostEmpty_ST_24i 1 + #define MSK32SemaHub_almostEmpty_ST_24i 0x01000000 + + #define BA_SemaHub_almostEmpty_ST_25i 0x0393 + #define B16SemaHub_almostEmpty_ST_25i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_25i 25 + #define LSb16SemaHub_almostEmpty_ST_25i 9 + #define bSemaHub_almostEmpty_ST_25i 1 + #define MSK32SemaHub_almostEmpty_ST_25i 0x02000000 + + #define BA_SemaHub_almostEmpty_ST_26i 0x0393 + #define B16SemaHub_almostEmpty_ST_26i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_26i 26 + #define LSb16SemaHub_almostEmpty_ST_26i 10 + #define bSemaHub_almostEmpty_ST_26i 1 + #define MSK32SemaHub_almostEmpty_ST_26i 0x04000000 + + #define BA_SemaHub_almostEmpty_ST_27i 0x0393 + #define B16SemaHub_almostEmpty_ST_27i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_27i 27 + #define LSb16SemaHub_almostEmpty_ST_27i 11 + #define bSemaHub_almostEmpty_ST_27i 1 + #define MSK32SemaHub_almostEmpty_ST_27i 0x08000000 + + #define BA_SemaHub_almostEmpty_ST_28i 0x0393 + #define B16SemaHub_almostEmpty_ST_28i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_28i 28 + #define LSb16SemaHub_almostEmpty_ST_28i 12 + #define bSemaHub_almostEmpty_ST_28i 1 + #define MSK32SemaHub_almostEmpty_ST_28i 0x10000000 + + #define BA_SemaHub_almostEmpty_ST_29i 0x0393 + #define B16SemaHub_almostEmpty_ST_29i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_29i 29 + #define LSb16SemaHub_almostEmpty_ST_29i 13 + #define bSemaHub_almostEmpty_ST_29i 1 + #define MSK32SemaHub_almostEmpty_ST_29i 0x20000000 + + #define BA_SemaHub_almostEmpty_ST_30i 0x0393 + #define B16SemaHub_almostEmpty_ST_30i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_30i 30 + #define LSb16SemaHub_almostEmpty_ST_30i 14 + #define bSemaHub_almostEmpty_ST_30i 1 + #define MSK32SemaHub_almostEmpty_ST_30i 0x40000000 + + #define BA_SemaHub_almostEmpty_ST_31i 0x0393 + #define B16SemaHub_almostEmpty_ST_31i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_31i 31 + #define LSb16SemaHub_almostEmpty_ST_31i 15 + #define bSemaHub_almostEmpty_ST_31i 1 + #define MSK32SemaHub_almostEmpty_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_almostFull 0x0394 + + #define BA_SemaHub_almostFull_ST_0i 0x0394 + #define B16SemaHub_almostFull_ST_0i 0x0394 + #define LSb32SemaHub_almostFull_ST_0i 0 + #define LSb16SemaHub_almostFull_ST_0i 0 + #define bSemaHub_almostFull_ST_0i 1 + #define MSK32SemaHub_almostFull_ST_0i 0x00000001 + + #define BA_SemaHub_almostFull_ST_1i 0x0394 + #define B16SemaHub_almostFull_ST_1i 0x0394 + #define LSb32SemaHub_almostFull_ST_1i 1 + #define LSb16SemaHub_almostFull_ST_1i 1 + #define bSemaHub_almostFull_ST_1i 1 + #define MSK32SemaHub_almostFull_ST_1i 0x00000002 + + #define BA_SemaHub_almostFull_ST_2i 0x0394 + #define B16SemaHub_almostFull_ST_2i 0x0394 + #define LSb32SemaHub_almostFull_ST_2i 2 + #define LSb16SemaHub_almostFull_ST_2i 2 + #define bSemaHub_almostFull_ST_2i 1 + #define MSK32SemaHub_almostFull_ST_2i 0x00000004 + + #define BA_SemaHub_almostFull_ST_3i 0x0394 + #define B16SemaHub_almostFull_ST_3i 0x0394 + #define LSb32SemaHub_almostFull_ST_3i 3 + #define LSb16SemaHub_almostFull_ST_3i 3 + #define bSemaHub_almostFull_ST_3i 1 + #define MSK32SemaHub_almostFull_ST_3i 0x00000008 + + #define BA_SemaHub_almostFull_ST_4i 0x0394 + #define B16SemaHub_almostFull_ST_4i 0x0394 + #define LSb32SemaHub_almostFull_ST_4i 4 + #define LSb16SemaHub_almostFull_ST_4i 4 + #define bSemaHub_almostFull_ST_4i 1 + #define MSK32SemaHub_almostFull_ST_4i 0x00000010 + + #define BA_SemaHub_almostFull_ST_5i 0x0394 + #define B16SemaHub_almostFull_ST_5i 0x0394 + #define LSb32SemaHub_almostFull_ST_5i 5 + #define LSb16SemaHub_almostFull_ST_5i 5 + #define bSemaHub_almostFull_ST_5i 1 + #define MSK32SemaHub_almostFull_ST_5i 0x00000020 + + #define BA_SemaHub_almostFull_ST_6i 0x0394 + #define B16SemaHub_almostFull_ST_6i 0x0394 + #define LSb32SemaHub_almostFull_ST_6i 6 + #define LSb16SemaHub_almostFull_ST_6i 6 + #define bSemaHub_almostFull_ST_6i 1 + #define MSK32SemaHub_almostFull_ST_6i 0x00000040 + + #define BA_SemaHub_almostFull_ST_7i 0x0394 + #define B16SemaHub_almostFull_ST_7i 0x0394 + #define LSb32SemaHub_almostFull_ST_7i 7 + #define LSb16SemaHub_almostFull_ST_7i 7 + #define bSemaHub_almostFull_ST_7i 1 + #define MSK32SemaHub_almostFull_ST_7i 0x00000080 + + #define BA_SemaHub_almostFull_ST_8i 0x0395 + #define B16SemaHub_almostFull_ST_8i 0x0394 + #define LSb32SemaHub_almostFull_ST_8i 8 + #define LSb16SemaHub_almostFull_ST_8i 8 + #define bSemaHub_almostFull_ST_8i 1 + #define MSK32SemaHub_almostFull_ST_8i 0x00000100 + + #define BA_SemaHub_almostFull_ST_9i 0x0395 + #define B16SemaHub_almostFull_ST_9i 0x0394 + #define LSb32SemaHub_almostFull_ST_9i 9 + #define LSb16SemaHub_almostFull_ST_9i 9 + #define bSemaHub_almostFull_ST_9i 1 + #define MSK32SemaHub_almostFull_ST_9i 0x00000200 + + #define BA_SemaHub_almostFull_ST_10i 0x0395 + #define B16SemaHub_almostFull_ST_10i 0x0394 + #define LSb32SemaHub_almostFull_ST_10i 10 + #define LSb16SemaHub_almostFull_ST_10i 10 + #define bSemaHub_almostFull_ST_10i 1 + #define MSK32SemaHub_almostFull_ST_10i 0x00000400 + + #define BA_SemaHub_almostFull_ST_11i 0x0395 + #define B16SemaHub_almostFull_ST_11i 0x0394 + #define LSb32SemaHub_almostFull_ST_11i 11 + #define LSb16SemaHub_almostFull_ST_11i 11 + #define bSemaHub_almostFull_ST_11i 1 + #define MSK32SemaHub_almostFull_ST_11i 0x00000800 + + #define BA_SemaHub_almostFull_ST_12i 0x0395 + #define B16SemaHub_almostFull_ST_12i 0x0394 + #define LSb32SemaHub_almostFull_ST_12i 12 + #define LSb16SemaHub_almostFull_ST_12i 12 + #define bSemaHub_almostFull_ST_12i 1 + #define MSK32SemaHub_almostFull_ST_12i 0x00001000 + + #define BA_SemaHub_almostFull_ST_13i 0x0395 + #define B16SemaHub_almostFull_ST_13i 0x0394 + #define LSb32SemaHub_almostFull_ST_13i 13 + #define LSb16SemaHub_almostFull_ST_13i 13 + #define bSemaHub_almostFull_ST_13i 1 + #define MSK32SemaHub_almostFull_ST_13i 0x00002000 + + #define BA_SemaHub_almostFull_ST_14i 0x0395 + #define B16SemaHub_almostFull_ST_14i 0x0394 + #define LSb32SemaHub_almostFull_ST_14i 14 + #define LSb16SemaHub_almostFull_ST_14i 14 + #define bSemaHub_almostFull_ST_14i 1 + #define MSK32SemaHub_almostFull_ST_14i 0x00004000 + + #define BA_SemaHub_almostFull_ST_15i 0x0395 + #define B16SemaHub_almostFull_ST_15i 0x0394 + #define LSb32SemaHub_almostFull_ST_15i 15 + #define LSb16SemaHub_almostFull_ST_15i 15 + #define bSemaHub_almostFull_ST_15i 1 + #define MSK32SemaHub_almostFull_ST_15i 0x00008000 + + #define BA_SemaHub_almostFull_ST_16i 0x0396 + #define B16SemaHub_almostFull_ST_16i 0x0396 + #define LSb32SemaHub_almostFull_ST_16i 16 + #define LSb16SemaHub_almostFull_ST_16i 0 + #define bSemaHub_almostFull_ST_16i 1 + #define MSK32SemaHub_almostFull_ST_16i 0x00010000 + + #define BA_SemaHub_almostFull_ST_17i 0x0396 + #define B16SemaHub_almostFull_ST_17i 0x0396 + #define LSb32SemaHub_almostFull_ST_17i 17 + #define LSb16SemaHub_almostFull_ST_17i 1 + #define bSemaHub_almostFull_ST_17i 1 + #define MSK32SemaHub_almostFull_ST_17i 0x00020000 + + #define BA_SemaHub_almostFull_ST_18i 0x0396 + #define B16SemaHub_almostFull_ST_18i 0x0396 + #define LSb32SemaHub_almostFull_ST_18i 18 + #define LSb16SemaHub_almostFull_ST_18i 2 + #define bSemaHub_almostFull_ST_18i 1 + #define MSK32SemaHub_almostFull_ST_18i 0x00040000 + + #define BA_SemaHub_almostFull_ST_19i 0x0396 + #define B16SemaHub_almostFull_ST_19i 0x0396 + #define LSb32SemaHub_almostFull_ST_19i 19 + #define LSb16SemaHub_almostFull_ST_19i 3 + #define bSemaHub_almostFull_ST_19i 1 + #define MSK32SemaHub_almostFull_ST_19i 0x00080000 + + #define BA_SemaHub_almostFull_ST_20i 0x0396 + #define B16SemaHub_almostFull_ST_20i 0x0396 + #define LSb32SemaHub_almostFull_ST_20i 20 + #define LSb16SemaHub_almostFull_ST_20i 4 + #define bSemaHub_almostFull_ST_20i 1 + #define MSK32SemaHub_almostFull_ST_20i 0x00100000 + + #define BA_SemaHub_almostFull_ST_21i 0x0396 + #define B16SemaHub_almostFull_ST_21i 0x0396 + #define LSb32SemaHub_almostFull_ST_21i 21 + #define LSb16SemaHub_almostFull_ST_21i 5 + #define bSemaHub_almostFull_ST_21i 1 + #define MSK32SemaHub_almostFull_ST_21i 0x00200000 + + #define BA_SemaHub_almostFull_ST_22i 0x0396 + #define B16SemaHub_almostFull_ST_22i 0x0396 + #define LSb32SemaHub_almostFull_ST_22i 22 + #define LSb16SemaHub_almostFull_ST_22i 6 + #define bSemaHub_almostFull_ST_22i 1 + #define MSK32SemaHub_almostFull_ST_22i 0x00400000 + + #define BA_SemaHub_almostFull_ST_23i 0x0396 + #define B16SemaHub_almostFull_ST_23i 0x0396 + #define LSb32SemaHub_almostFull_ST_23i 23 + #define LSb16SemaHub_almostFull_ST_23i 7 + #define bSemaHub_almostFull_ST_23i 1 + #define MSK32SemaHub_almostFull_ST_23i 0x00800000 + + #define BA_SemaHub_almostFull_ST_24i 0x0397 + #define B16SemaHub_almostFull_ST_24i 0x0396 + #define LSb32SemaHub_almostFull_ST_24i 24 + #define LSb16SemaHub_almostFull_ST_24i 8 + #define bSemaHub_almostFull_ST_24i 1 + #define MSK32SemaHub_almostFull_ST_24i 0x01000000 + + #define BA_SemaHub_almostFull_ST_25i 0x0397 + #define B16SemaHub_almostFull_ST_25i 0x0396 + #define LSb32SemaHub_almostFull_ST_25i 25 + #define LSb16SemaHub_almostFull_ST_25i 9 + #define bSemaHub_almostFull_ST_25i 1 + #define MSK32SemaHub_almostFull_ST_25i 0x02000000 + + #define BA_SemaHub_almostFull_ST_26i 0x0397 + #define B16SemaHub_almostFull_ST_26i 0x0396 + #define LSb32SemaHub_almostFull_ST_26i 26 + #define LSb16SemaHub_almostFull_ST_26i 10 + #define bSemaHub_almostFull_ST_26i 1 + #define MSK32SemaHub_almostFull_ST_26i 0x04000000 + + #define BA_SemaHub_almostFull_ST_27i 0x0397 + #define B16SemaHub_almostFull_ST_27i 0x0396 + #define LSb32SemaHub_almostFull_ST_27i 27 + #define LSb16SemaHub_almostFull_ST_27i 11 + #define bSemaHub_almostFull_ST_27i 1 + #define MSK32SemaHub_almostFull_ST_27i 0x08000000 + + #define BA_SemaHub_almostFull_ST_28i 0x0397 + #define B16SemaHub_almostFull_ST_28i 0x0396 + #define LSb32SemaHub_almostFull_ST_28i 28 + #define LSb16SemaHub_almostFull_ST_28i 12 + #define bSemaHub_almostFull_ST_28i 1 + #define MSK32SemaHub_almostFull_ST_28i 0x10000000 + + #define BA_SemaHub_almostFull_ST_29i 0x0397 + #define B16SemaHub_almostFull_ST_29i 0x0396 + #define LSb32SemaHub_almostFull_ST_29i 29 + #define LSb16SemaHub_almostFull_ST_29i 13 + #define bSemaHub_almostFull_ST_29i 1 + #define MSK32SemaHub_almostFull_ST_29i 0x20000000 + + #define BA_SemaHub_almostFull_ST_30i 0x0397 + #define B16SemaHub_almostFull_ST_30i 0x0396 + #define LSb32SemaHub_almostFull_ST_30i 30 + #define LSb16SemaHub_almostFull_ST_30i 14 + #define bSemaHub_almostFull_ST_30i 1 + #define MSK32SemaHub_almostFull_ST_30i 0x40000000 + + #define BA_SemaHub_almostFull_ST_31i 0x0397 + #define B16SemaHub_almostFull_ST_31i 0x0396 + #define LSb32SemaHub_almostFull_ST_31i 31 + #define LSb16SemaHub_almostFull_ST_31i 15 + #define bSemaHub_almostFull_ST_31i 1 + #define MSK32SemaHub_almostFull_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaHub { + /////////////////////////////////////////////////////////// + SIE_SemaQuery ie_counter[64]; + /////////////////////////////////////////////////////////// + SIE_Semaphore ie_cell[32]; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_PUSH_ID(r32) _BFGET_(r32, 7, 0) + #define SET32SemaHub_PUSH_ID(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16SemaHub_PUSH_ID(r16) _BFGET_(r16, 7, 0) + #define SET16SemaHub_PUSH_ID(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32SemaHub_PUSH_delta(r32) _BFGET_(r32,15, 8) + #define SET32SemaHub_PUSH_delta(r32,v) _BFSET_(r32,15, 8,v) + #define GET16SemaHub_PUSH_delta(r16) _BFGET_(r16,15, 8) + #define SET16SemaHub_PUSH_delta(r16,v) _BFSET_(r16,15, 8,v) + + #define w32SemaHub_PUSH {\ + UNSG32 uPUSH_ID : 8;\ + UNSG32 uPUSH_delta : 8;\ + UNSG32 RSVDx380_b16 : 16;\ + } + union { UNSG32 u32SemaHub_PUSH; + struct w32SemaHub_PUSH; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_POP_ID(r32) _BFGET_(r32, 7, 0) + #define SET32SemaHub_POP_ID(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16SemaHub_POP_ID(r16) _BFGET_(r16, 7, 0) + #define SET16SemaHub_POP_ID(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32SemaHub_POP_delta(r32) _BFGET_(r32,15, 8) + #define SET32SemaHub_POP_delta(r32,v) _BFSET_(r32,15, 8,v) + #define GET16SemaHub_POP_delta(r16) _BFGET_(r16,15, 8) + #define SET16SemaHub_POP_delta(r16,v) _BFSET_(r16,15, 8,v) + + #define w32SemaHub_POP {\ + UNSG32 uPOP_ID : 8;\ + UNSG32 uPOP_delta : 8;\ + UNSG32 RSVDx384_b16 : 16;\ + } + union { UNSG32 u32SemaHub_POP; + struct w32SemaHub_POP; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_empty_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_empty_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_empty_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_empty_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_empty_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_empty_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_empty_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_empty_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_empty_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_empty_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_empty_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_empty_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_empty_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_empty_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_empty_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_empty_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_empty_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_empty_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_empty_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_empty_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_empty_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_empty_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_empty_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_empty_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_empty_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_empty_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_empty_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_empty_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_empty_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_empty_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_empty_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_empty_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_empty_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_empty_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_empty_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_empty_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_empty_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_empty_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_empty_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_empty_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_empty_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_empty_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_empty_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_empty_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_empty_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_empty_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_empty_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_empty_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_empty_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_empty_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_empty_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_empty_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_empty_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_empty_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_empty_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_empty_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_empty_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_empty_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_empty_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_empty_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_empty_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_empty_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_empty_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_empty_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_empty_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_empty_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_empty_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_empty_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_empty_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_empty_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_empty_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_empty_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_empty_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_empty_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_empty_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_empty_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_empty_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_empty_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_empty_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_empty_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_empty_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_empty_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_empty_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_empty_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_empty_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_empty_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_empty_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_empty_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_empty_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_empty_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_empty_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_empty_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_empty_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_empty_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_empty_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_empty_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_empty_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_empty_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_empty_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_empty_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_empty_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_empty_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_empty_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_empty_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_empty_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_empty_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_empty_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_empty_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_empty_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_empty_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_empty_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_empty_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_empty_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_empty_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_empty_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_empty_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_empty_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_empty_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_empty_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_empty_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_empty_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_empty_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_empty_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_empty_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_empty_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_empty_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_empty_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_empty_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_empty {\ + UNSG32 uempty_ST_0i : 1;\ + UNSG32 uempty_ST_1i : 1;\ + UNSG32 uempty_ST_2i : 1;\ + UNSG32 uempty_ST_3i : 1;\ + UNSG32 uempty_ST_4i : 1;\ + UNSG32 uempty_ST_5i : 1;\ + UNSG32 uempty_ST_6i : 1;\ + UNSG32 uempty_ST_7i : 1;\ + UNSG32 uempty_ST_8i : 1;\ + UNSG32 uempty_ST_9i : 1;\ + UNSG32 uempty_ST_10i : 1;\ + UNSG32 uempty_ST_11i : 1;\ + UNSG32 uempty_ST_12i : 1;\ + UNSG32 uempty_ST_13i : 1;\ + UNSG32 uempty_ST_14i : 1;\ + UNSG32 uempty_ST_15i : 1;\ + UNSG32 uempty_ST_16i : 1;\ + UNSG32 uempty_ST_17i : 1;\ + UNSG32 uempty_ST_18i : 1;\ + UNSG32 uempty_ST_19i : 1;\ + UNSG32 uempty_ST_20i : 1;\ + UNSG32 uempty_ST_21i : 1;\ + UNSG32 uempty_ST_22i : 1;\ + UNSG32 uempty_ST_23i : 1;\ + UNSG32 uempty_ST_24i : 1;\ + UNSG32 uempty_ST_25i : 1;\ + UNSG32 uempty_ST_26i : 1;\ + UNSG32 uempty_ST_27i : 1;\ + UNSG32 uempty_ST_28i : 1;\ + UNSG32 uempty_ST_29i : 1;\ + UNSG32 uempty_ST_30i : 1;\ + UNSG32 uempty_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_empty; + struct w32SemaHub_empty; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_full_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_full_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_full_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_full_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_full_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_full_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_full_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_full_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_full_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_full_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_full_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_full_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_full_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_full_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_full_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_full_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_full_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_full_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_full_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_full_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_full_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_full_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_full_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_full_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_full_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_full_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_full_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_full_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_full_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_full_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_full_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_full_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_full_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_full_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_full_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_full_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_full_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_full_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_full_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_full_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_full_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_full_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_full_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_full_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_full_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_full_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_full_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_full_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_full_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_full_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_full_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_full_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_full_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_full_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_full_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_full_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_full_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_full_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_full_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_full_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_full_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_full_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_full_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_full_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_full_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_full_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_full_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_full_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_full_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_full_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_full_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_full_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_full_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_full_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_full_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_full_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_full_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_full_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_full_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_full_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_full_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_full_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_full_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_full_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_full_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_full_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_full_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_full_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_full_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_full_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_full_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_full_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_full_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_full_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_full_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_full_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_full_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_full_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_full_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_full_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_full_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_full_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_full_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_full_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_full_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_full_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_full_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_full_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_full_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_full_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_full_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_full_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_full_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_full_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_full_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_full_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_full_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_full_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_full_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_full_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_full_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_full_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_full_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_full_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_full_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_full_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_full_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_full_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_full {\ + UNSG32 ufull_ST_0i : 1;\ + UNSG32 ufull_ST_1i : 1;\ + UNSG32 ufull_ST_2i : 1;\ + UNSG32 ufull_ST_3i : 1;\ + UNSG32 ufull_ST_4i : 1;\ + UNSG32 ufull_ST_5i : 1;\ + UNSG32 ufull_ST_6i : 1;\ + UNSG32 ufull_ST_7i : 1;\ + UNSG32 ufull_ST_8i : 1;\ + UNSG32 ufull_ST_9i : 1;\ + UNSG32 ufull_ST_10i : 1;\ + UNSG32 ufull_ST_11i : 1;\ + UNSG32 ufull_ST_12i : 1;\ + UNSG32 ufull_ST_13i : 1;\ + UNSG32 ufull_ST_14i : 1;\ + UNSG32 ufull_ST_15i : 1;\ + UNSG32 ufull_ST_16i : 1;\ + UNSG32 ufull_ST_17i : 1;\ + UNSG32 ufull_ST_18i : 1;\ + UNSG32 ufull_ST_19i : 1;\ + UNSG32 ufull_ST_20i : 1;\ + UNSG32 ufull_ST_21i : 1;\ + UNSG32 ufull_ST_22i : 1;\ + UNSG32 ufull_ST_23i : 1;\ + UNSG32 ufull_ST_24i : 1;\ + UNSG32 ufull_ST_25i : 1;\ + UNSG32 ufull_ST_26i : 1;\ + UNSG32 ufull_ST_27i : 1;\ + UNSG32 ufull_ST_28i : 1;\ + UNSG32 ufull_ST_29i : 1;\ + UNSG32 ufull_ST_30i : 1;\ + UNSG32 ufull_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_full; + struct w32SemaHub_full; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_almostEmpty_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_almostEmpty_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_almostEmpty_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostEmpty_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostEmpty_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_almostEmpty_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_almostEmpty_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostEmpty_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostEmpty_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_almostEmpty_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_almostEmpty_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostEmpty_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostEmpty_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_almostEmpty_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_almostEmpty_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostEmpty_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostEmpty_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_almostEmpty_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_almostEmpty_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostEmpty_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostEmpty_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_almostEmpty_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_almostEmpty_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostEmpty_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostEmpty_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_almostEmpty_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_almostEmpty_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostEmpty_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostEmpty_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_almostEmpty_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_almostEmpty_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostEmpty_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostEmpty_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_almostEmpty_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_almostEmpty_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostEmpty_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostEmpty_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_almostEmpty_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_almostEmpty_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostEmpty_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostEmpty_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_almostEmpty_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_almostEmpty_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostEmpty_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostEmpty_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_almostEmpty_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_almostEmpty_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostEmpty_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostEmpty_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_almostEmpty_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_almostEmpty_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostEmpty_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostEmpty_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_almostEmpty_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_almostEmpty_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostEmpty_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostEmpty_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_almostEmpty_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_almostEmpty_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostEmpty_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostEmpty_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_almostEmpty_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_almostEmpty_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostEmpty_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_almostEmpty_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_almostEmpty_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_almostEmpty_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostEmpty_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostEmpty_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_almostEmpty_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_almostEmpty_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostEmpty_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostEmpty_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_almostEmpty_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_almostEmpty_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostEmpty_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostEmpty_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_almostEmpty_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_almostEmpty_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostEmpty_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostEmpty_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_almostEmpty_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_almostEmpty_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostEmpty_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostEmpty_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_almostEmpty_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_almostEmpty_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostEmpty_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostEmpty_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_almostEmpty_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_almostEmpty_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostEmpty_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostEmpty_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_almostEmpty_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_almostEmpty_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostEmpty_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostEmpty_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_almostEmpty_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_almostEmpty_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostEmpty_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostEmpty_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_almostEmpty_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_almostEmpty_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostEmpty_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostEmpty_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_almostEmpty_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_almostEmpty_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostEmpty_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostEmpty_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_almostEmpty_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_almostEmpty_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostEmpty_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostEmpty_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_almostEmpty_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_almostEmpty_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostEmpty_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostEmpty_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_almostEmpty_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_almostEmpty_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostEmpty_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostEmpty_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_almostEmpty_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_almostEmpty_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostEmpty_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostEmpty_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_almostEmpty_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_almostEmpty_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostEmpty_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_almostEmpty {\ + UNSG32 ualmostEmpty_ST_0i : 1;\ + UNSG32 ualmostEmpty_ST_1i : 1;\ + UNSG32 ualmostEmpty_ST_2i : 1;\ + UNSG32 ualmostEmpty_ST_3i : 1;\ + UNSG32 ualmostEmpty_ST_4i : 1;\ + UNSG32 ualmostEmpty_ST_5i : 1;\ + UNSG32 ualmostEmpty_ST_6i : 1;\ + UNSG32 ualmostEmpty_ST_7i : 1;\ + UNSG32 ualmostEmpty_ST_8i : 1;\ + UNSG32 ualmostEmpty_ST_9i : 1;\ + UNSG32 ualmostEmpty_ST_10i : 1;\ + UNSG32 ualmostEmpty_ST_11i : 1;\ + UNSG32 ualmostEmpty_ST_12i : 1;\ + UNSG32 ualmostEmpty_ST_13i : 1;\ + UNSG32 ualmostEmpty_ST_14i : 1;\ + UNSG32 ualmostEmpty_ST_15i : 1;\ + UNSG32 ualmostEmpty_ST_16i : 1;\ + UNSG32 ualmostEmpty_ST_17i : 1;\ + UNSG32 ualmostEmpty_ST_18i : 1;\ + UNSG32 ualmostEmpty_ST_19i : 1;\ + UNSG32 ualmostEmpty_ST_20i : 1;\ + UNSG32 ualmostEmpty_ST_21i : 1;\ + UNSG32 ualmostEmpty_ST_22i : 1;\ + UNSG32 ualmostEmpty_ST_23i : 1;\ + UNSG32 ualmostEmpty_ST_24i : 1;\ + UNSG32 ualmostEmpty_ST_25i : 1;\ + UNSG32 ualmostEmpty_ST_26i : 1;\ + UNSG32 ualmostEmpty_ST_27i : 1;\ + UNSG32 ualmostEmpty_ST_28i : 1;\ + UNSG32 ualmostEmpty_ST_29i : 1;\ + UNSG32 ualmostEmpty_ST_30i : 1;\ + UNSG32 ualmostEmpty_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_almostEmpty; + struct w32SemaHub_almostEmpty; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_almostFull_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_almostFull_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_almostFull_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostFull_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostFull_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_almostFull_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_almostFull_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostFull_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostFull_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_almostFull_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_almostFull_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostFull_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostFull_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_almostFull_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_almostFull_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostFull_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostFull_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_almostFull_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_almostFull_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostFull_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostFull_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_almostFull_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_almostFull_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostFull_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostFull_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_almostFull_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_almostFull_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostFull_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostFull_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_almostFull_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_almostFull_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostFull_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostFull_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_almostFull_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_almostFull_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostFull_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostFull_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_almostFull_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_almostFull_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostFull_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostFull_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_almostFull_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_almostFull_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostFull_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostFull_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_almostFull_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_almostFull_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostFull_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostFull_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_almostFull_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_almostFull_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostFull_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostFull_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_almostFull_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_almostFull_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostFull_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostFull_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_almostFull_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_almostFull_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostFull_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostFull_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_almostFull_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_almostFull_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostFull_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_almostFull_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_almostFull_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_almostFull_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostFull_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostFull_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_almostFull_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_almostFull_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostFull_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostFull_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_almostFull_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_almostFull_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostFull_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostFull_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_almostFull_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_almostFull_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostFull_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostFull_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_almostFull_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_almostFull_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostFull_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostFull_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_almostFull_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_almostFull_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostFull_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostFull_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_almostFull_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_almostFull_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostFull_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostFull_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_almostFull_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_almostFull_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostFull_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostFull_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_almostFull_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_almostFull_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostFull_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostFull_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_almostFull_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_almostFull_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostFull_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostFull_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_almostFull_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_almostFull_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostFull_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostFull_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_almostFull_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_almostFull_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostFull_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostFull_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_almostFull_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_almostFull_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostFull_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostFull_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_almostFull_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_almostFull_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostFull_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostFull_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_almostFull_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_almostFull_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostFull_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostFull_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_almostFull_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_almostFull_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostFull_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_almostFull {\ + UNSG32 ualmostFull_ST_0i : 1;\ + UNSG32 ualmostFull_ST_1i : 1;\ + UNSG32 ualmostFull_ST_2i : 1;\ + UNSG32 ualmostFull_ST_3i : 1;\ + UNSG32 ualmostFull_ST_4i : 1;\ + UNSG32 ualmostFull_ST_5i : 1;\ + UNSG32 ualmostFull_ST_6i : 1;\ + UNSG32 ualmostFull_ST_7i : 1;\ + UNSG32 ualmostFull_ST_8i : 1;\ + UNSG32 ualmostFull_ST_9i : 1;\ + UNSG32 ualmostFull_ST_10i : 1;\ + UNSG32 ualmostFull_ST_11i : 1;\ + UNSG32 ualmostFull_ST_12i : 1;\ + UNSG32 ualmostFull_ST_13i : 1;\ + UNSG32 ualmostFull_ST_14i : 1;\ + UNSG32 ualmostFull_ST_15i : 1;\ + UNSG32 ualmostFull_ST_16i : 1;\ + UNSG32 ualmostFull_ST_17i : 1;\ + UNSG32 ualmostFull_ST_18i : 1;\ + UNSG32 ualmostFull_ST_19i : 1;\ + UNSG32 ualmostFull_ST_20i : 1;\ + UNSG32 ualmostFull_ST_21i : 1;\ + UNSG32 ualmostFull_ST_22i : 1;\ + UNSG32 ualmostFull_ST_23i : 1;\ + UNSG32 ualmostFull_ST_24i : 1;\ + UNSG32 ualmostFull_ST_25i : 1;\ + UNSG32 ualmostFull_ST_26i : 1;\ + UNSG32 ualmostFull_ST_27i : 1;\ + UNSG32 ualmostFull_ST_28i : 1;\ + UNSG32 ualmostFull_ST_29i : 1;\ + UNSG32 ualmostFull_ST_30i : 1;\ + UNSG32 ualmostFull_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_almostFull; + struct w32SemaHub_almostFull; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx398 [104]; + /////////////////////////////////////////////////////////// + } SIE_SemaHub; + + typedef union T32SemaHub_PUSH + { UNSG32 u32; + struct w32SemaHub_PUSH; + } T32SemaHub_PUSH; + typedef union T32SemaHub_POP + { UNSG32 u32; + struct w32SemaHub_POP; + } T32SemaHub_POP; + typedef union T32SemaHub_empty + { UNSG32 u32; + struct w32SemaHub_empty; + } T32SemaHub_empty; + typedef union T32SemaHub_full + { UNSG32 u32; + struct w32SemaHub_full; + } T32SemaHub_full; + typedef union T32SemaHub_almostEmpty + { UNSG32 u32; + struct w32SemaHub_almostEmpty; + } T32SemaHub_almostEmpty; + typedef union T32SemaHub_almostFull + { UNSG32 u32; + struct w32SemaHub_almostFull; + } T32SemaHub_almostFull; + /////////////////////////////////////////////////////////// + + typedef union TSemaHub_PUSH + { UNSG32 u32[1]; + struct { + struct w32SemaHub_PUSH; + }; + } TSemaHub_PUSH; + typedef union TSemaHub_POP + { UNSG32 u32[1]; + struct { + struct w32SemaHub_POP; + }; + } TSemaHub_POP; + typedef union TSemaHub_empty + { UNSG32 u32[1]; + struct { + struct w32SemaHub_empty; + }; + } TSemaHub_empty; + typedef union TSemaHub_full + { UNSG32 u32[1]; + struct { + struct w32SemaHub_full; + }; + } TSemaHub_full; + typedef union TSemaHub_almostEmpty + { UNSG32 u32[1]; + struct { + struct w32SemaHub_almostEmpty; + }; + } TSemaHub_almostEmpty; + typedef union TSemaHub_almostFull + { UNSG32 u32[1]; + struct { + struct w32SemaHub_almostFull; + }; + } TSemaHub_almostFull; + + /////////////////////////////////////////////////////////// + SIGN32 SemaHub_drvrd(SIE_SemaHub *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaHub_drvwr(SIE_SemaHub *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaHub_reset(SIE_SemaHub *p); + SIGN32 SemaHub_cmp (SIE_SemaHub *p, SIE_SemaHub *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaHub_check(p,pie,pfx,hLOG) SemaHub_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaHub_print(p, pfx,hLOG) SemaHub_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaHub +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE FiFo biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 20 BASE +/// ### +/// * Base address (byte-address) of a FIFO in the shared SRAM. A channel's read/write pointers will be added to this “BASE†to get exact location of shared SRAM. +/// * Note: aligned with base SRAM data bus. +/// * For example, if SRAM data is 64-bit, then base[2:0] should be 3'b0; +/// ### +/// %% 12 # Stuffing bits... +/// @ 0x00004 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to this register will enable this channel, or 0 to this register will disable this channel. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to clear FIFO pointers to 0. +/// * Note : +/// * CPU should make sure to disabled the channel (write 0 to START_EN register) before issue clear command, otherwise the clear request will be ignored. +/// * Do not restart the channel when clear operation is in process. +/// * HW will make sure there is no pending transactions before execute the clear operation. +/// * Associated semaphore cell needs reset separately by re-write “CFG_DEPTH†+/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C FLUSH (W-) +/// %unsigned 1 EN +/// ### +/// * No support for now +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 23b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_FiFo +#define h_FiFo (){} + + #define RA_FiFo_CFG 0x0000 + + #define BA_FiFo_CFG_BASE 0x0000 + #define B16FiFo_CFG_BASE 0x0000 + #define LSb32FiFo_CFG_BASE 0 + #define LSb16FiFo_CFG_BASE 0 + #define bFiFo_CFG_BASE 20 + #define MSK32FiFo_CFG_BASE 0x000FFFFF + /////////////////////////////////////////////////////////// + #define RA_FiFo_START 0x0004 + + #define BA_FiFo_START_EN 0x0004 + #define B16FiFo_START_EN 0x0004 + #define LSb32FiFo_START_EN 0 + #define LSb16FiFo_START_EN 0 + #define bFiFo_START_EN 1 + #define MSK32FiFo_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_FiFo_CLEAR 0x0008 + + #define BA_FiFo_CLEAR_EN 0x0008 + #define B16FiFo_CLEAR_EN 0x0008 + #define LSb32FiFo_CLEAR_EN 0 + #define LSb16FiFo_CLEAR_EN 0 + #define bFiFo_CLEAR_EN 1 + #define MSK32FiFo_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_FiFo_FLUSH 0x000C + + #define BA_FiFo_FLUSH_EN 0x000C + #define B16FiFo_FLUSH_EN 0x000C + #define LSb32FiFo_FLUSH_EN 0 + #define LSb16FiFo_FLUSH_EN 0 + #define bFiFo_FLUSH_EN 1 + #define MSK32FiFo_FLUSH_EN 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_FiFo { + /////////////////////////////////////////////////////////// + #define GET32FiFo_CFG_BASE(r32) _BFGET_(r32,19, 0) + #define SET32FiFo_CFG_BASE(r32,v) _BFSET_(r32,19, 0,v) + + #define w32FiFo_CFG {\ + UNSG32 uCFG_BASE : 20;\ + UNSG32 RSVDx0_b20 : 12;\ + } + union { UNSG32 u32FiFo_CFG; + struct w32FiFo_CFG; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } + union { UNSG32 u32FiFo_START; + struct w32FiFo_START; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32FiFo_CLEAR; + struct w32FiFo_CLEAR; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_FLUSH_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_FLUSH_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_FLUSH_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_FLUSH_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_FLUSH {\ + UNSG32 uFLUSH_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32FiFo_FLUSH; + struct w32FiFo_FLUSH; + }; + /////////////////////////////////////////////////////////// + } SIE_FiFo; + + typedef union T32FiFo_CFG + { UNSG32 u32; + struct w32FiFo_CFG; + } T32FiFo_CFG; + typedef union T32FiFo_START + { UNSG32 u32; + struct w32FiFo_START; + } T32FiFo_START; + typedef union T32FiFo_CLEAR + { UNSG32 u32; + struct w32FiFo_CLEAR; + } T32FiFo_CLEAR; + typedef union T32FiFo_FLUSH + { UNSG32 u32; + struct w32FiFo_FLUSH; + } T32FiFo_FLUSH; + /////////////////////////////////////////////////////////// + + typedef union TFiFo_CFG + { UNSG32 u32[1]; + struct { + struct w32FiFo_CFG; + }; + } TFiFo_CFG; + typedef union TFiFo_START + { UNSG32 u32[1]; + struct { + struct w32FiFo_START; + }; + } TFiFo_START; + typedef union TFiFo_CLEAR + { UNSG32 u32[1]; + struct { + struct w32FiFo_CLEAR; + }; + } TFiFo_CLEAR; + typedef union TFiFo_FLUSH + { UNSG32 u32[1]; + struct { + struct w32FiFo_FLUSH; + }; + } TFiFo_FLUSH; + + /////////////////////////////////////////////////////////// + SIGN32 FiFo_drvrd(SIE_FiFo *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 FiFo_drvwr(SIE_FiFo *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void FiFo_reset(SIE_FiFo *p); + SIGN32 FiFo_cmp (SIE_FiFo *p, SIE_FiFo *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define FiFo_check(p,pie,pfx,hLOG) FiFo_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define FiFo_print(p, pfx,hLOG) FiFo_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: FiFo +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE HBO biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 FiFoCtl +/// $SemaHub FiFoCtl REG +/// @ 0x00400 ARR (P) +/// # 0x00400 FiFo +/// $FiFo FiFo REG [32] +/// ### +/// * Up-to 32 FIFO channels +/// * FiFo[N] is controlled by HBO.FiFoCtl.Channel[N] +/// ### +/// @ 0x00600 BUSY (R-) +/// %unsigned 32 ST +/// ### +/// * Per channel status +/// * Indicate the clear operation status. +/// * 1: clear is in process. +/// * 0 : clear is done. +/// ### +/// @ 0x00604 (W-) +/// # # Stuffing bytes... +/// %% 2016 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 1792B, bits: 1920b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_HBO +#define h_HBO (){} + + #define RA_HBO_FiFoCtl 0x0000 + /////////////////////////////////////////////////////////// + #define RA_HBO_ARR 0x0400 + #define RA_HBO_FiFo 0x0400 + /////////////////////////////////////////////////////////// + #define RA_HBO_BUSY 0x0600 + + #define BA_HBO_BUSY_ST 0x0600 + #define B16HBO_BUSY_ST 0x0600 + #define LSb32HBO_BUSY_ST 0 + #define LSb16HBO_BUSY_ST 0 + #define bHBO_BUSY_ST 32 + #define MSK32HBO_BUSY_ST 0xFFFFFFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_HBO { + /////////////////////////////////////////////////////////// + SIE_SemaHub ie_FiFoCtl; + /////////////////////////////////////////////////////////// + SIE_FiFo ie_FiFo[32]; + /////////////////////////////////////////////////////////// + #define GET32HBO_BUSY_ST(r32) _BFGET_(r32,31, 0) + #define SET32HBO_BUSY_ST(r32,v) _BFSET_(r32,31, 0,v) + + #define w32HBO_BUSY {\ + UNSG32 uBUSY_ST : 32;\ + } + union { UNSG32 u32HBO_BUSY; + struct w32HBO_BUSY; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx604 [252]; + /////////////////////////////////////////////////////////// + } SIE_HBO; + + typedef union T32HBO_BUSY + { UNSG32 u32; + struct w32HBO_BUSY; + } T32HBO_BUSY; + /////////////////////////////////////////////////////////// + + typedef union THBO_BUSY + { UNSG32 u32[1]; + struct { + struct w32HBO_BUSY; + }; + } THBO_BUSY; + + /////////////////////////////////////////////////////////// + SIGN32 HBO_drvrd(SIE_HBO *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 HBO_drvwr(SIE_HBO *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void HBO_reset(SIE_HBO *p); + SIGN32 HBO_cmp (SIE_HBO *p, SIE_HBO *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define HBO_check(p,pie,pfx,hLOG) HBO_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define HBO_print(p, pfx,hLOG) HBO_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: HBO +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE LLDesFmt biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 mem (P) +/// %unsigned 16 size +/// ### +/// * The size of one piece of scattered memory. +/// ### +/// %% 16 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 16b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_LLDesFmt +#define h_LLDesFmt (){} + + #define RA_LLDesFmt_mem 0x0000 + + #define BA_LLDesFmt_mem_size 0x0000 + #define B16LLDesFmt_mem_size 0x0000 + #define LSb32LLDesFmt_mem_size 0 + #define LSb16LLDesFmt_mem_size 0 + #define bLLDesFmt_mem_size 16 + #define MSK32LLDesFmt_mem_size 0x0000FFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_LLDesFmt { + /////////////////////////////////////////////////////////// + #define GET32LLDesFmt_mem_size(r32) _BFGET_(r32,15, 0) + #define SET32LLDesFmt_mem_size(r32,v) _BFSET_(r32,15, 0,v) + #define GET16LLDesFmt_mem_size(r16) _BFGET_(r16,15, 0) + #define SET16LLDesFmt_mem_size(r16,v) _BFSET_(r16,15, 0,v) + + #define w32LLDesFmt_mem {\ + UNSG32 umem_size : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32LLDesFmt_mem; + struct w32LLDesFmt_mem; + }; + /////////////////////////////////////////////////////////// + } SIE_LLDesFmt; + + typedef union T32LLDesFmt_mem + { UNSG32 u32; + struct w32LLDesFmt_mem; + } T32LLDesFmt_mem; + /////////////////////////////////////////////////////////// + + typedef union TLLDesFmt_mem + { UNSG32 u32[1]; + struct { + struct w32LLDesFmt_mem; + }; + } TLLDesFmt_mem; + + /////////////////////////////////////////////////////////// + SIGN32 LLDesFmt_drvrd(SIE_LLDesFmt *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 LLDesFmt_drvwr(SIE_LLDesFmt *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void LLDesFmt_reset(SIE_LLDesFmt *p); + SIGN32 LLDesFmt_cmp (SIE_LLDesFmt *p, SIE_LLDesFmt *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define LLDesFmt_check(p,pie,pfx,hLOG) LLDesFmt_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define LLDesFmt_print(p, pfx,hLOG) LLDesFmt_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: LLDesFmt +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmdHDR (4,4) +/// ### +/// * 32-bit dHub command header +/// * [0:31] +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 DESC (W-) +/// %unsigned 16 size +/// ### +/// * amount of data to be transferred, in bytes or MTU. +/// * Size of 0 is forbidden. +/// ### +/// %unsigned 1 sizeMTU +/// ### +/// * 0: size given in bytes; +/// * 1: size given in MTU (see dHubChCtl.CFG.MTU for MTU size definition) +/// ### +/// %unsigned 1 semOpMTU +/// ### +/// * 0: semaphore operations applied on dHubCmd level +/// * 1: semaphore operations applied on MTU level +/// ### +/// %unsigned 5 chkSemId +/// ### +/// * ID of semaphore to check before cmd / MTU; +/// * 0 indicates semaphore check is disabled +/// ### +/// %unsigned 5 updSemId +/// ### +/// * ID of semaphore to update after cmd / MTU; +/// * 0 indicates semaphore update is disabled +/// ### +/// %unsigned 1 interrupt +/// ### +/// * 1: raise interrupt upon command finish +/// * end dHubCmdHDR +/// ### +/// %% 3 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 29b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmdHDR +#define h_dHubCmdHDR (){} + + #define RA_dHubCmdHDR_DESC 0x0000 + + #define BA_dHubCmdHDR_DESC_size 0x0000 + #define B16dHubCmdHDR_DESC_size 0x0000 + #define LSb32dHubCmdHDR_DESC_size 0 + #define LSb16dHubCmdHDR_DESC_size 0 + #define bdHubCmdHDR_DESC_size 16 + #define MSK32dHubCmdHDR_DESC_size 0x0000FFFF + + #define BA_dHubCmdHDR_DESC_sizeMTU 0x0002 + #define B16dHubCmdHDR_DESC_sizeMTU 0x0002 + #define LSb32dHubCmdHDR_DESC_sizeMTU 16 + #define LSb16dHubCmdHDR_DESC_sizeMTU 0 + #define bdHubCmdHDR_DESC_sizeMTU 1 + #define MSK32dHubCmdHDR_DESC_sizeMTU 0x00010000 + + #define BA_dHubCmdHDR_DESC_semOpMTU 0x0002 + #define B16dHubCmdHDR_DESC_semOpMTU 0x0002 + #define LSb32dHubCmdHDR_DESC_semOpMTU 17 + #define LSb16dHubCmdHDR_DESC_semOpMTU 1 + #define bdHubCmdHDR_DESC_semOpMTU 1 + #define MSK32dHubCmdHDR_DESC_semOpMTU 0x00020000 + + #define BA_dHubCmdHDR_DESC_chkSemId 0x0002 + #define B16dHubCmdHDR_DESC_chkSemId 0x0002 + #define LSb32dHubCmdHDR_DESC_chkSemId 18 + #define LSb16dHubCmdHDR_DESC_chkSemId 2 + #define bdHubCmdHDR_DESC_chkSemId 5 + #define MSK32dHubCmdHDR_DESC_chkSemId 0x007C0000 + + #define BA_dHubCmdHDR_DESC_updSemId 0x0002 + #define B16dHubCmdHDR_DESC_updSemId 0x0002 + #define LSb32dHubCmdHDR_DESC_updSemId 23 + #define LSb16dHubCmdHDR_DESC_updSemId 7 + #define bdHubCmdHDR_DESC_updSemId 5 + #define MSK32dHubCmdHDR_DESC_updSemId 0x0F800000 + + #define BA_dHubCmdHDR_DESC_interrupt 0x0003 + #define B16dHubCmdHDR_DESC_interrupt 0x0002 + #define LSb32dHubCmdHDR_DESC_interrupt 28 + #define LSb16dHubCmdHDR_DESC_interrupt 12 + #define bdHubCmdHDR_DESC_interrupt 1 + #define MSK32dHubCmdHDR_DESC_interrupt 0x10000000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmdHDR { + /////////////////////////////////////////////////////////// + #define GET32dHubCmdHDR_DESC_size(r32) _BFGET_(r32,15, 0) + #define SET32dHubCmdHDR_DESC_size(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubCmdHDR_DESC_size(r16) _BFGET_(r16,15, 0) + #define SET16dHubCmdHDR_DESC_size(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubCmdHDR_DESC_sizeMTU(r32) _BFGET_(r32,16,16) + #define SET32dHubCmdHDR_DESC_sizeMTU(r32,v) _BFSET_(r32,16,16,v) + #define GET16dHubCmdHDR_DESC_sizeMTU(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmdHDR_DESC_sizeMTU(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32dHubCmdHDR_DESC_semOpMTU(r32) _BFGET_(r32,17,17) + #define SET32dHubCmdHDR_DESC_semOpMTU(r32,v) _BFSET_(r32,17,17,v) + #define GET16dHubCmdHDR_DESC_semOpMTU(r16) _BFGET_(r16, 1, 1) + #define SET16dHubCmdHDR_DESC_semOpMTU(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32dHubCmdHDR_DESC_chkSemId(r32) _BFGET_(r32,22,18) + #define SET32dHubCmdHDR_DESC_chkSemId(r32,v) _BFSET_(r32,22,18,v) + #define GET16dHubCmdHDR_DESC_chkSemId(r16) _BFGET_(r16, 6, 2) + #define SET16dHubCmdHDR_DESC_chkSemId(r16,v) _BFSET_(r16, 6, 2,v) + + #define GET32dHubCmdHDR_DESC_updSemId(r32) _BFGET_(r32,27,23) + #define SET32dHubCmdHDR_DESC_updSemId(r32,v) _BFSET_(r32,27,23,v) + #define GET16dHubCmdHDR_DESC_updSemId(r16) _BFGET_(r16,11, 7) + #define SET16dHubCmdHDR_DESC_updSemId(r16,v) _BFSET_(r16,11, 7,v) + + #define GET32dHubCmdHDR_DESC_interrupt(r32) _BFGET_(r32,28,28) + #define SET32dHubCmdHDR_DESC_interrupt(r32,v) _BFSET_(r32,28,28,v) + #define GET16dHubCmdHDR_DESC_interrupt(r16) _BFGET_(r16,12,12) + #define SET16dHubCmdHDR_DESC_interrupt(r16,v) _BFSET_(r16,12,12,v) + + #define w32dHubCmdHDR_DESC {\ + UNSG32 uDESC_size : 16;\ + UNSG32 uDESC_sizeMTU : 1;\ + UNSG32 uDESC_semOpMTU : 1;\ + UNSG32 uDESC_chkSemId : 5;\ + UNSG32 uDESC_updSemId : 5;\ + UNSG32 uDESC_interrupt : 1;\ + UNSG32 RSVDx0_b29 : 3;\ + } + union { UNSG32 u32dHubCmdHDR_DESC; + struct w32dHubCmdHDR_DESC; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubCmdHDR; + + typedef union T32dHubCmdHDR_DESC + { UNSG32 u32; + struct w32dHubCmdHDR_DESC; + } T32dHubCmdHDR_DESC; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmdHDR_DESC + { UNSG32 u32[1]; + struct { + struct w32dHubCmdHDR_DESC; + }; + } TdHubCmdHDR_DESC; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmdHDR_drvrd(SIE_dHubCmdHDR *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmdHDR_drvwr(SIE_dHubCmdHDR *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmdHDR_reset(SIE_dHubCmdHDR *p); + SIGN32 dHubCmdHDR_cmp (SIE_dHubCmdHDR *p, SIE_dHubCmdHDR *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmdHDR_check(p,pie,pfx,hLOG) dHubCmdHDR_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmdHDR_print(p, pfx,hLOG) dHubCmdHDR_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmdHDR +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmd biu (4,4) +/// ### +/// * 64-bit dHub command issued by read/write masters +/// * [0:31] +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 MEM (W-) +/// %unsigned 32 addr +/// ### +/// * DRAM data address, in bytes; not necessarily MTU aligned. +/// * [32:63] +/// ### +/// @ 0x00004 (P) +/// # 0x00004 HDR +/// $dHubCmdHDR HDR REG +/// ### +/// * end dHubCmd +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 8B, bits: 61b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmd +#define h_dHubCmd (){} + + #define RA_dHubCmd_MEM 0x0000 + + #define BA_dHubCmd_MEM_addr 0x0000 + #define B16dHubCmd_MEM_addr 0x0000 + #define LSb32dHubCmd_MEM_addr 0 + #define LSb16dHubCmd_MEM_addr 0 + #define bdHubCmd_MEM_addr 32 + #define MSK32dHubCmd_MEM_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_dHubCmd_HDR 0x0004 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmd { + /////////////////////////////////////////////////////////// + #define GET32dHubCmd_MEM_addr(r32) _BFGET_(r32,31, 0) + #define SET32dHubCmd_MEM_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32dHubCmd_MEM {\ + UNSG32 uMEM_addr : 32;\ + } + union { UNSG32 u32dHubCmd_MEM; + struct w32dHubCmd_MEM; + }; + /////////////////////////////////////////////////////////// + SIE_dHubCmdHDR ie_HDR; + /////////////////////////////////////////////////////////// + } SIE_dHubCmd; + + typedef union T32dHubCmd_MEM + { UNSG32 u32; + struct w32dHubCmd_MEM; + } T32dHubCmd_MEM; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmd_MEM + { UNSG32 u32[1]; + struct { + struct w32dHubCmd_MEM; + }; + } TdHubCmd_MEM; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmd_drvrd(SIE_dHubCmd *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmd_drvwr(SIE_dHubCmd *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmd_reset(SIE_dHubCmd *p); + SIGN32 dHubCmd_cmp (SIE_dHubCmd *p, SIE_dHubCmd *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmd_check(p,pie,pfx,hLOG) dHubCmd_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmd_print(p, pfx,hLOG) dHubCmd_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmd +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubChannel biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 2 MTU +/// : 8byte 0x0 +/// : 32byte 0x1 +/// : 128byte 0x2 +/// : 1024byte 0x3 +/// ### +/// * Minimum transfer unit of the channel +/// ### +/// %unsigned 1 QoS +/// ### +/// * Write 1 to turn on QoS detection +/// ### +/// %unsigned 1 selfLoop +/// ### +/// * Write 1 to enable cmd looping support; 0 to turn off +/// ### +/// %unsigned 1 intrCtl 0x0 +/// : cmdDone 0x0 +/// : chIdle 0x1 +/// ### +/// * 0 : default vlaue, the interrupt is triggered by the finish of the dHub command if the interrupt bit is defined in the dHub command. +/// * 1 : The interrupt is triggered if the dHub channel is idle ( no busy and no pending and the corresponding dHub command Q is empty). +/// ### +/// %unsigned 1 hScan 0x0 +/// : rastScan 0x0 +/// : invScan 0x1 +/// ### +/// * This parameter will only apply to read channels. +/// * It will affect 1D dHub command for the channel. +/// * When scan is set to 1 (invScan), the data (beat) inside the dHub command will be fetched in the inverse order. ie. The data from the last address will come first and the data (beat) from the first address will come lastly. +/// ### +/// %unsigned 1 vScan 0x0 +/// : rastScan 0x0 +/// : invScan 0x1 +/// ### +/// * This parameter will only apply to read channels. +/// * It will affect 2D channels. +/// * When scan is set to 1 (invScan), +/// * The last address line (1D command) will be fetched first, and the first address line will be fetched lastly. +/// ### +/// %% 25 # Stuffing bits... +/// @ 0x00004 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to enable the channel; 0 to pause the channel +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to reset the channel controller state +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C FLUSH (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to start the data flushing process. Invalid for read (M2H) channels +/// * end dHubChannel +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 10b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubChannel +#define h_dHubChannel (){} + + #define RA_dHubChannel_CFG 0x0000 + + #define BA_dHubChannel_CFG_MTU 0x0000 + #define B16dHubChannel_CFG_MTU 0x0000 + #define LSb32dHubChannel_CFG_MTU 0 + #define LSb16dHubChannel_CFG_MTU 0 + #define bdHubChannel_CFG_MTU 2 + #define MSK32dHubChannel_CFG_MTU 0x00000003 + #define dHubChannel_CFG_MTU_8byte 0x0 + #define dHubChannel_CFG_MTU_32byte 0x1 + #define dHubChannel_CFG_MTU_128byte 0x2 + #define dHubChannel_CFG_MTU_1024byte 0x3 + + #define BA_dHubChannel_CFG_QoS 0x0000 + #define B16dHubChannel_CFG_QoS 0x0000 + #define LSb32dHubChannel_CFG_QoS 2 + #define LSb16dHubChannel_CFG_QoS 2 + #define bdHubChannel_CFG_QoS 1 + #define MSK32dHubChannel_CFG_QoS 0x00000004 + + #define BA_dHubChannel_CFG_selfLoop 0x0000 + #define B16dHubChannel_CFG_selfLoop 0x0000 + #define LSb32dHubChannel_CFG_selfLoop 3 + #define LSb16dHubChannel_CFG_selfLoop 3 + #define bdHubChannel_CFG_selfLoop 1 + #define MSK32dHubChannel_CFG_selfLoop 0x00000008 + + #define BA_dHubChannel_CFG_intrCtl 0x0000 + #define B16dHubChannel_CFG_intrCtl 0x0000 + #define LSb32dHubChannel_CFG_intrCtl 4 + #define LSb16dHubChannel_CFG_intrCtl 4 + #define bdHubChannel_CFG_intrCtl 1 + #define MSK32dHubChannel_CFG_intrCtl 0x00000010 + #define dHubChannel_CFG_intrCtl_cmdDone 0x0 + #define dHubChannel_CFG_intrCtl_chIdle 0x1 + + #define BA_dHubChannel_CFG_hScan 0x0000 + #define B16dHubChannel_CFG_hScan 0x0000 + #define LSb32dHubChannel_CFG_hScan 5 + #define LSb16dHubChannel_CFG_hScan 5 + #define bdHubChannel_CFG_hScan 1 + #define MSK32dHubChannel_CFG_hScan 0x00000020 + #define dHubChannel_CFG_hScan_rastScan 0x0 + #define dHubChannel_CFG_hScan_invScan 0x1 + + #define BA_dHubChannel_CFG_vScan 0x0000 + #define B16dHubChannel_CFG_vScan 0x0000 + #define LSb32dHubChannel_CFG_vScan 6 + #define LSb16dHubChannel_CFG_vScan 6 + #define bdHubChannel_CFG_vScan 1 + #define MSK32dHubChannel_CFG_vScan 0x00000040 + #define dHubChannel_CFG_vScan_rastScan 0x0 + #define dHubChannel_CFG_vScan_invScan 0x1 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_START 0x0004 + + #define BA_dHubChannel_START_EN 0x0004 + #define B16dHubChannel_START_EN 0x0004 + #define LSb32dHubChannel_START_EN 0 + #define LSb16dHubChannel_START_EN 0 + #define bdHubChannel_START_EN 1 + #define MSK32dHubChannel_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_CLEAR 0x0008 + + #define BA_dHubChannel_CLEAR_EN 0x0008 + #define B16dHubChannel_CLEAR_EN 0x0008 + #define LSb32dHubChannel_CLEAR_EN 0 + #define LSb16dHubChannel_CLEAR_EN 0 + #define bdHubChannel_CLEAR_EN 1 + #define MSK32dHubChannel_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_FLUSH 0x000C + + #define BA_dHubChannel_FLUSH_EN 0x000C + #define B16dHubChannel_FLUSH_EN 0x000C + #define LSb32dHubChannel_FLUSH_EN 0 + #define LSb16dHubChannel_FLUSH_EN 0 + #define bdHubChannel_FLUSH_EN 1 + #define MSK32dHubChannel_FLUSH_EN 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubChannel { + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_CFG_MTU(r32) _BFGET_(r32, 1, 0) + #define SET32dHubChannel_CFG_MTU(r32,v) _BFSET_(r32, 1, 0,v) + #define GET16dHubChannel_CFG_MTU(r16) _BFGET_(r16, 1, 0) + #define SET16dHubChannel_CFG_MTU(r16,v) _BFSET_(r16, 1, 0,v) + + #define GET32dHubChannel_CFG_QoS(r32) _BFGET_(r32, 2, 2) + #define SET32dHubChannel_CFG_QoS(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16dHubChannel_CFG_QoS(r16) _BFGET_(r16, 2, 2) + #define SET16dHubChannel_CFG_QoS(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32dHubChannel_CFG_selfLoop(r32) _BFGET_(r32, 3, 3) + #define SET32dHubChannel_CFG_selfLoop(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16dHubChannel_CFG_selfLoop(r16) _BFGET_(r16, 3, 3) + #define SET16dHubChannel_CFG_selfLoop(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32dHubChannel_CFG_intrCtl(r32) _BFGET_(r32, 4, 4) + #define SET32dHubChannel_CFG_intrCtl(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16dHubChannel_CFG_intrCtl(r16) _BFGET_(r16, 4, 4) + #define SET16dHubChannel_CFG_intrCtl(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32dHubChannel_CFG_hScan(r32) _BFGET_(r32, 5, 5) + #define SET32dHubChannel_CFG_hScan(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16dHubChannel_CFG_hScan(r16) _BFGET_(r16, 5, 5) + #define SET16dHubChannel_CFG_hScan(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32dHubChannel_CFG_vScan(r32) _BFGET_(r32, 6, 6) + #define SET32dHubChannel_CFG_vScan(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16dHubChannel_CFG_vScan(r16) _BFGET_(r16, 6, 6) + #define SET16dHubChannel_CFG_vScan(r16,v) _BFSET_(r16, 6, 6,v) + + #define w32dHubChannel_CFG {\ + UNSG32 uCFG_MTU : 2;\ + UNSG32 uCFG_QoS : 1;\ + UNSG32 uCFG_selfLoop : 1;\ + UNSG32 uCFG_intrCtl : 1;\ + UNSG32 uCFG_hScan : 1;\ + UNSG32 uCFG_vScan : 1;\ + UNSG32 RSVDx0_b7 : 25;\ + } + union { UNSG32 u32dHubChannel_CFG; + struct w32dHubChannel_CFG; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_START; + struct w32dHubChannel_START; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_CLEAR; + struct w32dHubChannel_CLEAR; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_FLUSH_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_FLUSH_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_FLUSH_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_FLUSH_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_FLUSH {\ + UNSG32 uFLUSH_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_FLUSH; + struct w32dHubChannel_FLUSH; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubChannel; + + typedef union T32dHubChannel_CFG + { UNSG32 u32; + struct w32dHubChannel_CFG; + } T32dHubChannel_CFG; + typedef union T32dHubChannel_START + { UNSG32 u32; + struct w32dHubChannel_START; + } T32dHubChannel_START; + typedef union T32dHubChannel_CLEAR + { UNSG32 u32; + struct w32dHubChannel_CLEAR; + } T32dHubChannel_CLEAR; + typedef union T32dHubChannel_FLUSH + { UNSG32 u32; + struct w32dHubChannel_FLUSH; + } T32dHubChannel_FLUSH; + /////////////////////////////////////////////////////////// + + typedef union TdHubChannel_CFG + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_CFG; + }; + } TdHubChannel_CFG; + typedef union TdHubChannel_START + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_START; + }; + } TdHubChannel_START; + typedef union TdHubChannel_CLEAR + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_CLEAR; + }; + } TdHubChannel_CLEAR; + typedef union TdHubChannel_FLUSH + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_FLUSH; + }; + } TdHubChannel_FLUSH; + + /////////////////////////////////////////////////////////// + SIGN32 dHubChannel_drvrd(SIE_dHubChannel *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubChannel_drvwr(SIE_dHubChannel *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubChannel_reset(SIE_dHubChannel *p); + SIGN32 dHubChannel_cmp (SIE_dHubChannel *p, SIE_dHubChannel *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubChannel_check(p,pie,pfx,hLOG) dHubChannel_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubChannel_print(p, pfx,hLOG) dHubChannel_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubChannel +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubReg biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 SemaHub +/// $SemaHub SemaHub REG +/// ### +/// * For dHub internal interrupts, also provide semaphore service for external (all channels will be opened to external to access). +/// * Channel 0 is used for dHub.HBO interrupt. +/// * Channel N+1 is used for dHub.Channel[N] interrupt. +/// ### +/// @ 0x00400 (P) +/// # 0x00400 HBO +/// $HBO HBO REG +/// ### +/// * For dHub channels (command/data queues), also provide (unused) FIFO service for external. +/// * Channel 2N is used for dHub.Channel[N] command. +/// * Channel 2N+1 is used for dHub.Channel[N] data. +/// ### +/// @ 0x00B00 ARR (P) +/// # 0x00B00 channelCtl +/// $dHubChannel channelCtl REG [16] +/// ### +/// * Up-to 16 channels +/// ### +/// @ 0x00C00 BUSY (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: no ongoing command is being processed, and no flushing is taking place +/// * 1: channel controller is busy +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C04 PENDING (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: Response queue is empty, meaning no outstanding AXI transactions +/// * 1: there exist some outstanding AXI transactions +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C08 busRstEn (RW-) +/// %unsigned 1 reg 0x0 +/// ### +/// * Write one to this register will trigger gate-keeper to take over the AXI bus. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00C0C busRstDone (R-) +/// %unsigned 1 reg 0x1 +/// ### +/// * After gate-keeper take over the AXI bus, it will assert this bit once there is no outstanding transactions on AXI bus. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00C10 flowCtl (P) +/// %unsigned 8 rAlpha 0x0 +/// %unsigned 8 wAlpha 0x0 +/// ### +/// * Flow control parameter for read and write axi master. +/// * clkCnt=(alpha*bstLen)>>4. +/// * This # of clock cycles will be blocked for the axi master after an axi command with the burst length of “bstLenâ€. +/// * When set alpha to be 0, the master will never be blocked. +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C14 axiCmdCol (P) +/// %unsigned 16 rCnt 0x0 +/// %unsigned 16 wCnt 0x0 +/// ### +/// * Axi command collection. The counter value indicate read/write do the command collection for # of clock cycles, start from the first command pushed to an empty command Q. Here are the conditions that will trigger the Axi master to send out command. +/// * Cmd Q full or the counter count down to “0†from the programmed value. +/// * Set the counter to 0 will disable the command collection. +/// * end dHubReg +/// ### +/// @ 0x00C18 (W-) +/// # # Stuffing bytes... +/// %% 1856 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 3328B, bits: 3314b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubReg +#define h_dHubReg (){} + + #define RA_dHubReg_SemaHub 0x0000 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_HBO 0x0400 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_ARR 0x0B00 + #define RA_dHubReg_channelCtl 0x0B00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_BUSY 0x0C00 + + #define BA_dHubReg_BUSY_ST 0x0C00 + #define B16dHubReg_BUSY_ST 0x0C00 + #define LSb32dHubReg_BUSY_ST 0 + #define LSb16dHubReg_BUSY_ST 0 + #define bdHubReg_BUSY_ST 16 + #define MSK32dHubReg_BUSY_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg_PENDING 0x0C04 + + #define BA_dHubReg_PENDING_ST 0x0C04 + #define B16dHubReg_PENDING_ST 0x0C04 + #define LSb32dHubReg_PENDING_ST 0 + #define LSb16dHubReg_PENDING_ST 0 + #define bdHubReg_PENDING_ST 16 + #define MSK32dHubReg_PENDING_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg_busRstEn 0x0C08 + + #define BA_dHubReg_busRstEn_reg 0x0C08 + #define B16dHubReg_busRstEn_reg 0x0C08 + #define LSb32dHubReg_busRstEn_reg 0 + #define LSb16dHubReg_busRstEn_reg 0 + #define bdHubReg_busRstEn_reg 1 + #define MSK32dHubReg_busRstEn_reg 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_busRstDone 0x0C0C + + #define BA_dHubReg_busRstDone_reg 0x0C0C + #define B16dHubReg_busRstDone_reg 0x0C0C + #define LSb32dHubReg_busRstDone_reg 0 + #define LSb16dHubReg_busRstDone_reg 0 + #define bdHubReg_busRstDone_reg 1 + #define MSK32dHubReg_busRstDone_reg 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_flowCtl 0x0C10 + + #define BA_dHubReg_flowCtl_rAlpha 0x0C10 + #define B16dHubReg_flowCtl_rAlpha 0x0C10 + #define LSb32dHubReg_flowCtl_rAlpha 0 + #define LSb16dHubReg_flowCtl_rAlpha 0 + #define bdHubReg_flowCtl_rAlpha 8 + #define MSK32dHubReg_flowCtl_rAlpha 0x000000FF + + #define BA_dHubReg_flowCtl_wAlpha 0x0C11 + #define B16dHubReg_flowCtl_wAlpha 0x0C10 + #define LSb32dHubReg_flowCtl_wAlpha 8 + #define LSb16dHubReg_flowCtl_wAlpha 8 + #define bdHubReg_flowCtl_wAlpha 8 + #define MSK32dHubReg_flowCtl_wAlpha 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_axiCmdCol 0x0C14 + + #define BA_dHubReg_axiCmdCol_rCnt 0x0C14 + #define B16dHubReg_axiCmdCol_rCnt 0x0C14 + #define LSb32dHubReg_axiCmdCol_rCnt 0 + #define LSb16dHubReg_axiCmdCol_rCnt 0 + #define bdHubReg_axiCmdCol_rCnt 16 + #define MSK32dHubReg_axiCmdCol_rCnt 0x0000FFFF + + #define BA_dHubReg_axiCmdCol_wCnt 0x0C16 + #define B16dHubReg_axiCmdCol_wCnt 0x0C16 + #define LSb32dHubReg_axiCmdCol_wCnt 16 + #define LSb16dHubReg_axiCmdCol_wCnt 0 + #define bdHubReg_axiCmdCol_wCnt 16 + #define MSK32dHubReg_axiCmdCol_wCnt 0xFFFF0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubReg { + /////////////////////////////////////////////////////////// + SIE_SemaHub ie_SemaHub; + /////////////////////////////////////////////////////////// + SIE_HBO ie_HBO; + /////////////////////////////////////////////////////////// + SIE_dHubChannel ie_channelCtl[16]; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_BUSY_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_BUSY_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_BUSY_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_BUSY_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_BUSY {\ + UNSG32 uBUSY_ST : 16;\ + UNSG32 RSVDxC00_b16 : 16;\ + } + union { UNSG32 u32dHubReg_BUSY; + struct w32dHubReg_BUSY; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_PENDING_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_PENDING_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_PENDING_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_PENDING_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_PENDING {\ + UNSG32 uPENDING_ST : 16;\ + UNSG32 RSVDxC04_b16 : 16;\ + } + union { UNSG32 u32dHubReg_PENDING; + struct w32dHubReg_PENDING; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_busRstEn_reg(r32) _BFGET_(r32, 0, 0) + #define SET32dHubReg_busRstEn_reg(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubReg_busRstEn_reg(r16) _BFGET_(r16, 0, 0) + #define SET16dHubReg_busRstEn_reg(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubReg_busRstEn {\ + UNSG32 ubusRstEn_reg : 1;\ + UNSG32 RSVDxC08_b1 : 31;\ + } + union { UNSG32 u32dHubReg_busRstEn; + struct w32dHubReg_busRstEn; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_busRstDone_reg(r32) _BFGET_(r32, 0, 0) + #define SET32dHubReg_busRstDone_reg(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubReg_busRstDone_reg(r16) _BFGET_(r16, 0, 0) + #define SET16dHubReg_busRstDone_reg(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubReg_busRstDone {\ + UNSG32 ubusRstDone_reg : 1;\ + UNSG32 RSVDxC0C_b1 : 31;\ + } + union { UNSG32 u32dHubReg_busRstDone; + struct w32dHubReg_busRstDone; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_flowCtl_rAlpha(r32) _BFGET_(r32, 7, 0) + #define SET32dHubReg_flowCtl_rAlpha(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16dHubReg_flowCtl_rAlpha(r16) _BFGET_(r16, 7, 0) + #define SET16dHubReg_flowCtl_rAlpha(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32dHubReg_flowCtl_wAlpha(r32) _BFGET_(r32,15, 8) + #define SET32dHubReg_flowCtl_wAlpha(r32,v) _BFSET_(r32,15, 8,v) + #define GET16dHubReg_flowCtl_wAlpha(r16) _BFGET_(r16,15, 8) + #define SET16dHubReg_flowCtl_wAlpha(r16,v) _BFSET_(r16,15, 8,v) + + #define w32dHubReg_flowCtl {\ + UNSG32 uflowCtl_rAlpha : 8;\ + UNSG32 uflowCtl_wAlpha : 8;\ + UNSG32 RSVDxC10_b16 : 16;\ + } + union { UNSG32 u32dHubReg_flowCtl; + struct w32dHubReg_flowCtl; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_axiCmdCol_rCnt(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_axiCmdCol_rCnt(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_axiCmdCol_rCnt(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_axiCmdCol_rCnt(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubReg_axiCmdCol_wCnt(r32) _BFGET_(r32,31,16) + #define SET32dHubReg_axiCmdCol_wCnt(r32,v) _BFSET_(r32,31,16,v) + #define GET16dHubReg_axiCmdCol_wCnt(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_axiCmdCol_wCnt(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_axiCmdCol {\ + UNSG32 uaxiCmdCol_rCnt : 16;\ + UNSG32 uaxiCmdCol_wCnt : 16;\ + } + union { UNSG32 u32dHubReg_axiCmdCol; + struct w32dHubReg_axiCmdCol; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxC18 [232]; + /////////////////////////////////////////////////////////// + } SIE_dHubReg; + + typedef union T32dHubReg_BUSY + { UNSG32 u32; + struct w32dHubReg_BUSY; + } T32dHubReg_BUSY; + typedef union T32dHubReg_PENDING + { UNSG32 u32; + struct w32dHubReg_PENDING; + } T32dHubReg_PENDING; + typedef union T32dHubReg_busRstEn + { UNSG32 u32; + struct w32dHubReg_busRstEn; + } T32dHubReg_busRstEn; + typedef union T32dHubReg_busRstDone + { UNSG32 u32; + struct w32dHubReg_busRstDone; + } T32dHubReg_busRstDone; + typedef union T32dHubReg_flowCtl + { UNSG32 u32; + struct w32dHubReg_flowCtl; + } T32dHubReg_flowCtl; + typedef union T32dHubReg_axiCmdCol + { UNSG32 u32; + struct w32dHubReg_axiCmdCol; + } T32dHubReg_axiCmdCol; + /////////////////////////////////////////////////////////// + + typedef union TdHubReg_BUSY + { UNSG32 u32[1]; + struct { + struct w32dHubReg_BUSY; + }; + } TdHubReg_BUSY; + typedef union TdHubReg_PENDING + { UNSG32 u32[1]; + struct { + struct w32dHubReg_PENDING; + }; + } TdHubReg_PENDING; + typedef union TdHubReg_busRstEn + { UNSG32 u32[1]; + struct { + struct w32dHubReg_busRstEn; + }; + } TdHubReg_busRstEn; + typedef union TdHubReg_busRstDone + { UNSG32 u32[1]; + struct { + struct w32dHubReg_busRstDone; + }; + } TdHubReg_busRstDone; + typedef union TdHubReg_flowCtl + { UNSG32 u32[1]; + struct { + struct w32dHubReg_flowCtl; + }; + } TdHubReg_flowCtl; + typedef union TdHubReg_axiCmdCol + { UNSG32 u32[1]; + struct { + struct w32dHubReg_axiCmdCol; + }; + } TdHubReg_axiCmdCol; + + /////////////////////////////////////////////////////////// + SIGN32 dHubReg_drvrd(SIE_dHubReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubReg_drvwr(SIE_dHubReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubReg_reset(SIE_dHubReg *p); + SIGN32 dHubReg_cmp (SIE_dHubReg *p, SIE_dHubReg *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubReg_check(p,pie,pfx,hLOG) dHubReg_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubReg_print(p, pfx,hLOG) dHubReg_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubReg +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmd2D biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 MEM (W-) +/// %unsigned 32 addr +/// ### +/// * DRAM data address of the 2D buffer, in bytes. +/// ### +/// @ 0x00004 DESC (W-) +/// %unsigned 16 stride +/// ### +/// * Line stride size in bytes +/// ### +/// %unsigned 13 numLine +/// ### +/// * Number of lines in buffer. Size of 0 is forbidden. +/// ### +/// %unsigned 2 hdrLoop +/// ### +/// * Size of line-loop for choosing dHubCmdHDR +/// * 0 is treated as 4 +/// ### +/// %unsigned 1 interrupt +/// ### +/// * 1: raise interrupt upon whole 2D command finish. +/// * 1: set the last 1D command interrupt bit. +/// * 0 : use the default 1D command interrupt bit. +/// ### +/// @ 0x00008 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to enable the channel; 0 to pause the channel +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to reset the 2D engine. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00010 (P) +/// # 0x00010 HDR +/// $dHubCmdHDR HDR REG [4] +/// ### +/// * Headers used in generating dHubCmd for each line in looping order, loop size (1,2,3,4) specified by DESC_hdrLoop +/// * end dHubCmd2D +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 32B, bits: 182b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmd2D +#define h_dHubCmd2D (){} + + #define RA_dHubCmd2D_MEM 0x0000 + + #define BA_dHubCmd2D_MEM_addr 0x0000 + #define B16dHubCmd2D_MEM_addr 0x0000 + #define LSb32dHubCmd2D_MEM_addr 0 + #define LSb16dHubCmd2D_MEM_addr 0 + #define bdHubCmd2D_MEM_addr 32 + #define MSK32dHubCmd2D_MEM_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_DESC 0x0004 + + #define BA_dHubCmd2D_DESC_stride 0x0004 + #define B16dHubCmd2D_DESC_stride 0x0004 + #define LSb32dHubCmd2D_DESC_stride 0 + #define LSb16dHubCmd2D_DESC_stride 0 + #define bdHubCmd2D_DESC_stride 16 + #define MSK32dHubCmd2D_DESC_stride 0x0000FFFF + + #define BA_dHubCmd2D_DESC_numLine 0x0006 + #define B16dHubCmd2D_DESC_numLine 0x0006 + #define LSb32dHubCmd2D_DESC_numLine 16 + #define LSb16dHubCmd2D_DESC_numLine 0 + #define bdHubCmd2D_DESC_numLine 13 + #define MSK32dHubCmd2D_DESC_numLine 0x1FFF0000 + + #define BA_dHubCmd2D_DESC_hdrLoop 0x0007 + #define B16dHubCmd2D_DESC_hdrLoop 0x0006 + #define LSb32dHubCmd2D_DESC_hdrLoop 29 + #define LSb16dHubCmd2D_DESC_hdrLoop 13 + #define bdHubCmd2D_DESC_hdrLoop 2 + #define MSK32dHubCmd2D_DESC_hdrLoop 0x60000000 + + #define BA_dHubCmd2D_DESC_interrupt 0x0007 + #define B16dHubCmd2D_DESC_interrupt 0x0006 + #define LSb32dHubCmd2D_DESC_interrupt 31 + #define LSb16dHubCmd2D_DESC_interrupt 15 + #define bdHubCmd2D_DESC_interrupt 1 + #define MSK32dHubCmd2D_DESC_interrupt 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_START 0x0008 + + #define BA_dHubCmd2D_START_EN 0x0008 + #define B16dHubCmd2D_START_EN 0x0008 + #define LSb32dHubCmd2D_START_EN 0 + #define LSb16dHubCmd2D_START_EN 0 + #define bdHubCmd2D_START_EN 1 + #define MSK32dHubCmd2D_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_CLEAR 0x000C + + #define BA_dHubCmd2D_CLEAR_EN 0x000C + #define B16dHubCmd2D_CLEAR_EN 0x000C + #define LSb32dHubCmd2D_CLEAR_EN 0 + #define LSb16dHubCmd2D_CLEAR_EN 0 + #define bdHubCmd2D_CLEAR_EN 1 + #define MSK32dHubCmd2D_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_HDR 0x0010 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmd2D { + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_MEM_addr(r32) _BFGET_(r32,31, 0) + #define SET32dHubCmd2D_MEM_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32dHubCmd2D_MEM {\ + UNSG32 uMEM_addr : 32;\ + } + union { UNSG32 u32dHubCmd2D_MEM; + struct w32dHubCmd2D_MEM; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_DESC_stride(r32) _BFGET_(r32,15, 0) + #define SET32dHubCmd2D_DESC_stride(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubCmd2D_DESC_stride(r16) _BFGET_(r16,15, 0) + #define SET16dHubCmd2D_DESC_stride(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubCmd2D_DESC_numLine(r32) _BFGET_(r32,28,16) + #define SET32dHubCmd2D_DESC_numLine(r32,v) _BFSET_(r32,28,16,v) + #define GET16dHubCmd2D_DESC_numLine(r16) _BFGET_(r16,12, 0) + #define SET16dHubCmd2D_DESC_numLine(r16,v) _BFSET_(r16,12, 0,v) + + #define GET32dHubCmd2D_DESC_hdrLoop(r32) _BFGET_(r32,30,29) + #define SET32dHubCmd2D_DESC_hdrLoop(r32,v) _BFSET_(r32,30,29,v) + #define GET16dHubCmd2D_DESC_hdrLoop(r16) _BFGET_(r16,14,13) + #define SET16dHubCmd2D_DESC_hdrLoop(r16,v) _BFSET_(r16,14,13,v) + + #define GET32dHubCmd2D_DESC_interrupt(r32) _BFGET_(r32,31,31) + #define SET32dHubCmd2D_DESC_interrupt(r32,v) _BFSET_(r32,31,31,v) + #define GET16dHubCmd2D_DESC_interrupt(r16) _BFGET_(r16,15,15) + #define SET16dHubCmd2D_DESC_interrupt(r16,v) _BFSET_(r16,15,15,v) + + #define w32dHubCmd2D_DESC {\ + UNSG32 uDESC_stride : 16;\ + UNSG32 uDESC_numLine : 13;\ + UNSG32 uDESC_hdrLoop : 2;\ + UNSG32 uDESC_interrupt : 1;\ + } + union { UNSG32 u32dHubCmd2D_DESC; + struct w32dHubCmd2D_DESC; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubCmd2D_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubCmd2D_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmd2D_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubCmd2D_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32dHubCmd2D_START; + struct w32dHubCmd2D_START; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubCmd2D_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubCmd2D_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmd2D_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubCmd2D_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32dHubCmd2D_CLEAR; + struct w32dHubCmd2D_CLEAR; + }; + /////////////////////////////////////////////////////////// + SIE_dHubCmdHDR ie_HDR[4]; + /////////////////////////////////////////////////////////// + } SIE_dHubCmd2D; + + typedef union T32dHubCmd2D_MEM + { UNSG32 u32; + struct w32dHubCmd2D_MEM; + } T32dHubCmd2D_MEM; + typedef union T32dHubCmd2D_DESC + { UNSG32 u32; + struct w32dHubCmd2D_DESC; + } T32dHubCmd2D_DESC; + typedef union T32dHubCmd2D_START + { UNSG32 u32; + struct w32dHubCmd2D_START; + } T32dHubCmd2D_START; + typedef union T32dHubCmd2D_CLEAR + { UNSG32 u32; + struct w32dHubCmd2D_CLEAR; + } T32dHubCmd2D_CLEAR; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmd2D_MEM + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_MEM; + }; + } TdHubCmd2D_MEM; + typedef union TdHubCmd2D_DESC + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_DESC; + }; + } TdHubCmd2D_DESC; + typedef union TdHubCmd2D_START + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_START; + }; + } TdHubCmd2D_START; + typedef union TdHubCmd2D_CLEAR + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_CLEAR; + }; + } TdHubCmd2D_CLEAR; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmd2D_drvrd(SIE_dHubCmd2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmd2D_drvwr(SIE_dHubCmd2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmd2D_reset(SIE_dHubCmd2D *p); + SIGN32 dHubCmd2D_cmp (SIE_dHubCmd2D *p, SIE_dHubCmd2D *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmd2D_check(p,pie,pfx,hLOG) dHubCmd2D_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmd2D_print(p, pfx,hLOG) dHubCmd2D_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmd2D +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubQuery (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 RESP (R-) +/// %unsigned 16 ST +/// ### +/// * Dhub channel state machine status. +/// ### +/// %% 16 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 16b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubQuery +#define h_dHubQuery (){} + + #define RA_dHubQuery_RESP 0x0000 + + #define BA_dHubQuery_RESP_ST 0x0000 + #define B16dHubQuery_RESP_ST 0x0000 + #define LSb32dHubQuery_RESP_ST 0 + #define LSb16dHubQuery_RESP_ST 0 + #define bdHubQuery_RESP_ST 16 + #define MSK32dHubQuery_RESP_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubQuery { + /////////////////////////////////////////////////////////// + #define GET32dHubQuery_RESP_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubQuery_RESP_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubQuery_RESP_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubQuery_RESP_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubQuery_RESP {\ + UNSG32 uRESP_ST : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32dHubQuery_RESP; + struct w32dHubQuery_RESP; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubQuery; + + typedef union T32dHubQuery_RESP + { UNSG32 u32; + struct w32dHubQuery_RESP; + } T32dHubQuery_RESP; + /////////////////////////////////////////////////////////// + + typedef union TdHubQuery_RESP + { UNSG32 u32[1]; + struct { + struct w32dHubQuery_RESP; + }; + } TdHubQuery_RESP; + + /////////////////////////////////////////////////////////// + SIGN32 dHubQuery_drvrd(SIE_dHubQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubQuery_drvwr(SIE_dHubQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubQuery_reset(SIE_dHubQuery *p); + SIGN32 dHubQuery_cmp (SIE_dHubQuery *p, SIE_dHubQuery *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubQuery_check(p,pie,pfx,hLOG) dHubQuery_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubQuery_print(p, pfx,hLOG) dHubQuery_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubQuery +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubReg2D biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 dHub +/// $dHubReg dHub REG +/// @ 0x00D00 ARR (P) +/// # 0x00D00 Cmd2D +/// $dHubCmd2D Cmd2D REG [16] +/// ### +/// * Up-to 16 2D channels. +/// * 2D Channel[N] is connected to dHub.Channel[N] command queue, that is, dHub.HBO.Channel[2N] +/// * Note: Number of 2D channels could be less than dHub channels (rest of are 1D only) +/// ### +/// @ 0x00F00 BUSY (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: no ongoing command is being processed +/// * 1: channel controller is busy +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00F04 (W-) +/// # # Stuffing bytes... +/// %% 480 +/// @ 0x00F40 (P) +/// # 0x00F40 CH_ST +/// $dHubQuery CH_ST MEM [16] +/// ### +/// * end dHubReg2D +/// ### +/// @ 0x00F80 (W-) +/// # # Stuffing bytes... +/// %% 1024 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4096B, bits: 6274b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubReg2D +#define h_dHubReg2D (){} + + #define RA_dHubReg2D_dHub 0x0000 + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_ARR 0x0D00 + #define RA_dHubReg2D_Cmd2D 0x0D00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_BUSY 0x0F00 + + #define BA_dHubReg2D_BUSY_ST 0x0F00 + #define B16dHubReg2D_BUSY_ST 0x0F00 + #define LSb32dHubReg2D_BUSY_ST 0 + #define LSb16dHubReg2D_BUSY_ST 0 + #define bdHubReg2D_BUSY_ST 16 + #define MSK32dHubReg2D_BUSY_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_CH_ST 0x0F40 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubReg2D { + /////////////////////////////////////////////////////////// + SIE_dHubReg ie_dHub; + /////////////////////////////////////////////////////////// + SIE_dHubCmd2D ie_Cmd2D[16]; + /////////////////////////////////////////////////////////// + #define GET32dHubReg2D_BUSY_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg2D_BUSY_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg2D_BUSY_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg2D_BUSY_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg2D_BUSY {\ + UNSG32 uBUSY_ST : 16;\ + UNSG32 RSVDxF00_b16 : 16;\ + } + union { UNSG32 u32dHubReg2D_BUSY; + struct w32dHubReg2D_BUSY; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxF04 [60]; + /////////////////////////////////////////////////////////// + SIE_dHubQuery ie_CH_ST[16]; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxF80 [128]; + /////////////////////////////////////////////////////////// + } SIE_dHubReg2D; + + typedef union T32dHubReg2D_BUSY + { UNSG32 u32; + struct w32dHubReg2D_BUSY; + } T32dHubReg2D_BUSY; + /////////////////////////////////////////////////////////// + + typedef union TdHubReg2D_BUSY + { UNSG32 u32[1]; + struct { + struct w32dHubReg2D_BUSY; + }; + } TdHubReg2D_BUSY; + + /////////////////////////////////////////////////////////// + SIGN32 dHubReg2D_drvrd(SIE_dHubReg2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubReg2D_drvwr(SIE_dHubReg2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubReg2D_reset(SIE_dHubReg2D *p); + SIGN32 dHubReg2D_cmp (SIE_dHubReg2D *p, SIE_dHubReg2D *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubReg2D_check(p,pie,pfx,hLOG) dHubReg2D_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubReg2D_print(p, pfx,hLOG) dHubReg2D_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubReg2D +//////////////////////////////////////////////////////////// + + + +#ifdef __cplusplus + } +#endif +#pragma pack() + +#endif +////// +/// ENDOFFILE: dHub.h +//////////////////////////////////////////////////////////// + diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/galois_cfg.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/galois_cfg.h new file mode 100644 index 00000000..d3e9cdca --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/galois_cfg.h @@ -0,0 +1,106 @@ +/******************************************************************************* + * Copyright (C) Marvell International Ltd. and its affiliates + * + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * alternative licensing terms. Once you have made an election to distribute the + * File under one of the following license alternatives, please (i) delete this + * introductory statement regarding license alternatives, (ii) delete the two + * license alternatives that you have not elected to use and (iii) preserve the + * Marvell copyright notice above. + * + ******************************************************************************* + * Marvell Commercial License Option + * + * If you received this File from Marvell and you have entered into a commercial + * license agreement (a "Commercial License") with Marvell, the File is licensed + * to you under the terms of the applicable Commercial License. + * + ******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************** + * Marvell BSD License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File under the following licensing terms. + * 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 Marvell 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. + * + *******************************************************************************/ + +#ifndef __GALOIS_CFG_H__ +#define __GALOIS_CFG_H__ + +/*! + * IO read/write through software/hardware socket + * #define __MEMIO_SOCKET + */ + +/*! + * IO read/write through PCI-Express bus + * #define __MEMIO_PCIE + */ + +/*! + * IO read/write directly using MEMI/O + */ +#define __MEMIO_DIRECT + +/*! + * Program is running under little endian system. + */ +#ifndef __LITTLE_ENDIAN +#define __LITTLE_ENDIAN +#endif + +/*! + * Program is running under big endian system. + * #define __BIG_ENDIAN + */ + +/*! + * Program is running under Linux on ARM processor + */ +#define __LINUX_ARM + + +/*! + * Program is running under VxWorks on ARM processor + * #define __VxWORKS_ARM + */ + +#endif /* __GALOIS_CFG_H__ */ diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/galois_common.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/galois_common.h new file mode 100644 index 00000000..60887266 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/galois_common.h @@ -0,0 +1,241 @@ +/******************************************************************************* + * Copyright (C) Marvell International Ltd. and its affiliates + * + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * alternative licensing terms. Once you have made an election to distribute the + * File under one of the following license alternatives, please (i) delete this + * introductory statement regarding license alternatives, (ii) delete the two + * license alternatives that you have not elected to use and (iii) preserve the + * Marvell copyright notice above. + * + ******************************************************************************* + * Marvell Commercial License Option + * + * If you received this File from Marvell and you have entered into a commercial + * license agreement (a "Commercial License") with Marvell, the File is licensed + * to you under the terms of the applicable Commercial License. + * + ******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************** + * Marvell BSD License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File under the following licensing terms. + * 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 Marvell 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. + * + *******************************************************************************/ + +#ifndef __GALOIS_COMMON_H__ +#define __GALOIS_COMMON_H__ + +#include "galois_cfg.h" +#include "galois_type.h" + +/*! + * Bit field definitions + */ +#define NO_BIT 0x00000000 +#define BIT0 0x00000001 +#define BIT1 0x00000002 +#define BIT2 0x00000004 +#define BIT3 0x00000008 +#define BIT4 0x00000010 +#define BIT5 0x00000020 +#define BIT6 0x00000040 +#define BIT7 0x00000080 +#define BIT8 0x00000100 +#define BIT9 0x00000200 +#define BIT10 0x00000400 +#define BIT11 0x00000800 +#define BIT12 0x00001000 +#define BIT13 0x00002000 +#define BIT14 0x00004000 +#define BIT15 0x00008000 +#define BIT16 0x00010000 +#define BIT17 0x00020000 +#define BIT18 0x00040000 +#define BIT19 0x00080000 +#define BIT20 0x00100000 +#define BIT21 0x00200000 +#define BIT22 0x00400000 +#define BIT23 0x00800000 +#define BIT24 0x01000000 +#define BIT25 0x02000000 +#define BIT26 0x04000000 +#define BIT27 0x08000000 +#define BIT28 0x10000000 +#define BIT29 0x20000000 +#define BIT30 0x40000000 +#define BIT31 0x80000000 + +/*! + * Handy sizes + */ +#define _1K 0x00000400 +#define _2K 0x00000800 +#define _4K 0x00001000 +#define _8K 0x00002000 +#define _16K 0x00004000 +#define _32K 0x00008000 +#define _64K 0x00010000 +#define _128K 0x00020000 +#define _256K 0x00040000 +#define _512K 0x00080000 + +#define _1M 0x00100000 +#define _2M 0x00200000 +#define _4M 0x00400000 +#define _8M 0x00800000 +#define _16M 0x01000000 +#define _32M 0x02000000 +#define _64M 0x04000000 +#define _128M 0x08000000 +#define _256M 0x10000000 +#define _512M 0x20000000 + +#define _1G 0x40000000 +#define _2G 0x80000000 + +/*! + * CPU cache information + */ +#define CPU_I_CACHE_LINE_SIZE 32 /* 2do: replace 32 with linux core macro */ +#define CPU_D_CACHE_LINE_SIZE 32 /* 2do: replace 32 with linux core macro */ + +/*! + * Data cache flush one line + */ +#if (defined(__LINUX_ARM)) +# define mvOsCacheLineFlushInv(addr) \ + do { \ + __asm__ __volatile__ ("mcr p15, 0, %0, c7, c14, 1" : : "r" (addr)); \ + } while (0) + +# define mvOsCacheLineInv(addr) \ + do { \ + __asm__ __volatile__ ("mcr p15, 0, %0, c7, c6, 1" : : "r" (addr)); \ + } while (0) + +# define mvArmNop \ + do { \ + __asm__ __volatile__("nop"); \ + } while (0) + +#elif (defined(__VxWORKS_ARM)) +# define mvOsCacheLineFlushInv(addr) \ + do { \ + _WRS_ASM("mcr p15, 0, %0, c7, c14, 1" : : "r" (addr)); \ + } while (0) + +# define mvOsCacheLineInv(addr) \ + do { \ + _WRS_ASM("mcr p15, 0, %0, c7, c6, 1" : : "r" (addr)); \ + } while (0) + +# define mvArmNop \ + do { \ + __WRS_ASM("nop"); \ + } while (0) + +#else /* __LINUX_ARM || __VxWORKS_ARM */ +# define mvOsCacheLineFlushInv(addr) do ; while (0) +# define mvOsCacheLineInv(addr) do ; while (0) +# define mvArmNop do ; while (0) + +#endif /* __LINUX_ARM || __VxWORKS_ARM */ + +/*! + * Swap tool + */ + +/*! + * 16bit nibble swap. For example 0x1234 -> 0x2143 + */ +#define MV_NIBBLE_SWAP_16BIT(X) (((X & 0xf) << 4) | ((X & 0xf0) >> 4) | ((X & 0xf00) << 4) | ((X & 0xf000) >> 4)) + +/*! + * 32bit nibble swap. For example 0x12345678 -> 0x21436587 + */ +#define MV_NIBBLE_SWAP_32BIT(X) (((X & 0xf) << 4) | ((X & 0xf0) >> 4) | ((X & 0xf00) << 4) | ((X & 0xf000) >> 4) | \ + ((X & 0xf0000) << 4) | ((X & 0xf00000) >> 4) | ((X & 0xf000000) << 4) | ((X & 0xf0000000) >> 4)) + +/*! + * 16bit byte swap. For example 0x1122 -> 0x2211 + */ +#define MV_BYTE_SWAP_16BIT(X) ((((X) & 0xff) << 8) | (((X) & 0xff00) >> 8)) + +/*! + * 32bit byte swap. For example 0x11223344 -> 0x44332211 + */ +#define MV_BYTE_SWAP_32BIT(X) ((((X) & 0xff) << 24) | (((X) & 0xff00) << 8) | (((X) & 0xff0000) >> 8) | (((X) & 0xff000000) >> 24)) + +/*! + * 64bit byte swap. For example 0x11223344.55667788 -> 0x88776655.44332211 + */ +#define MV_BYTE_SWAP_64BIT(X) ((MV_U64) ((((X) & 0xffULL) << 56) | (((X) & 0xff00ULL) << 40) | \ + (((X) & 0xff0000ULL) << 24) | (((X) & 0xff000000ULL) << 8) | \ + (((X) & 0xff00000000ULL) >> 8) | (((X) & 0xff0000000000ULL) >> 24) | \ + (((X) & 0xff000000000000ULL) >> 40) | (((X) & 0xff00000000000000ULL) >> 56))) + +/*! + * Endianess macros. + */ +#if (defined(__BIG_ENDIAN)) +# define MV_16BIT_LE(X) MV_BYTE_SWAP_16BIT(X) +# define MV_32BIT_LE(X) MV_BYTE_SWAP_32BIT(X) +# define MV_64BIT_LE(X) MV_BYTE_SWAP_64BIT(X) +# define MV_16BIT_BE(X) (X) +# define MV_32BIT_BE(X) (X) +# define MV_64BIT_BE(X) (X) + +#elif (defined(__LITTLE_ENDIAN)) +# define MV_16BIT_LE(X) (X) +# define MV_32BIT_LE(X) (X) +# define MV_64BIT_LE(X) (X) +# define MV_16BIT_BE(X) MV_BYTE_SWAP_16BIT(X) +# define MV_32BIT_BE(X) MV_BYTE_SWAP_32BIT(X) +# define MV_64BIT_BE(X) MV_BYTE_SWAP_64BIT(X) + +#else /* __BIG_ENDIAN || __LITTLE_ENDIAN */ +# error "Endianess type not selected" + +#endif /* __BIG_ENDIAN || __LITTLE_ENDIAN */ + +#endif /* __GALOIS_COMMON_H__ */ diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/galois_io.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/galois_io.h new file mode 100644 index 00000000..766e6147 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/galois_io.h @@ -0,0 +1,302 @@ +/******************************************************************************* + * Copyright (C) Marvell International Ltd. and its affiliates + * + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * alternative licensing terms. Once you have made an election to distribute the + * File under one of the following license alternatives, please (i) delete this + * introductory statement regarding license alternatives, (ii) delete the two + * license alternatives that you have not elected to use and (iii) preserve the + * Marvell copyright notice above. + * + ******************************************************************************* + * Marvell Commercial License Option + * + * If you received this File from Marvell and you have entered into a commercial + * license agreement (a "Commercial License") with Marvell, the File is licensed + * to you under the terms of the applicable Commercial License. + * + ******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************** + * Marvell BSD License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File under the following licensing terms. + * 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 Marvell 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. + * + *******************************************************************************/ + +#ifndef __GALOIS_IO_H__ +#define __GALOIS_IO_H__ + +#ifdef __MEMIO_SOCKET +#include +#include "trans_h.h" +#endif + +#ifdef __MEMIO_PCIE +#include +#include +#endif + +#include "galois_cfg.h" +#include "galois_type.h" +#include "galois_common.h" + + +#ifdef __MEMIO_PCIE +extern MV_U32 gu32_galois_pcie_ioremap_base; +#endif + +#define CPU_PHY_MEM(x) ((MV_U32)(x)) +#define CPU_MEMIO_CACHED_ADDR(x) ((void*)(x)) +#define CPU_MEMIO_UNCACHED_ADDR(x) ((void*)(x)) + +/*! + * CPU endian check + */ +#if defined( CPU_BIG_ENDIAN ) && defined( __LITTLE_ENDIAN ) +#error CPU endian conflict!!! +#elif defined(__BYTE_ORDER) +#if __BYTE_ORDER == __BIG_ENDIAN +#error CPU endian conflict!!! +#endif +#elif defined( __BIG_ENDIAN ) +#error CPU endian conflict!!! +#endif + +/*! + * CPU architecture dependent 32, 16, 8 bit read/write IO addresses + */ +#if defined(BERLIN_SINGLE_CPU) && !defined(__LINUX_KERNEL__) +#define MV_MEMIO32_WRITE(addr, data) ((*((volatile unsigned int *)devmem_phy_to_virt(addr))) = ((unsigned int)(data))) +#define MV_MEMIO32_READ(addr) ((*((volatile unsigned int *)devmem_phy_to_virt(addr)))) +#define MV_MEMIO16_WRITE(addr, data) ((*((volatile unsigned short *)devmem_phy_to_virt(addr))) = ((unsigned short)(data))) +#define MV_MEMIO16_READ(addr) ((*((volatile unsigned short *)devmem_phy_to_virt(addr)))) +#define MV_MEMIO08_WRITE(addr, data) ((*((volatile unsigned char *)devmem_phy_to_virt(addr))) = ((unsigned char)(data))) +#define MV_MEMIO08_READ(addr) ((*((volatile unsigned char *)devmem_phy_to_virt(addr)))) +#else +#define MV_MEMIO32_WRITE(addr, data) ((*((volatile unsigned int*)(addr))) = ((unsigned int)(data))) +#define MV_MEMIO32_READ(addr) ((*((volatile unsigned int*)(addr)))) +#define MV_MEMIO16_WRITE(addr, data) ((*((volatile unsigned short*)(addr))) = ((unsigned short)(data))) +#define MV_MEMIO16_READ(addr) ((*((volatile unsigned short*)(addr)))) +#define MV_MEMIO08_WRITE(addr, data) ((*((volatile unsigned char*)(addr))) = ((unsigned char)(data))) +#define MV_MEMIO08_READ(addr) ((*((volatile unsigned char*)(addr)))) +#endif + +/*! + * No Fast Swap implementation (in assembler) for ARM + */ +#define MV_32BIT_LE_FAST(val) MV_32BIT_LE(val) +#define MV_16BIT_LE_FAST(val) MV_16BIT_LE(val) +#define MV_32BIT_BE_FAST(val) MV_32BIT_BE(val) +#define MV_16BIT_BE_FAST(val) MV_16BIT_BE(val) + +/*! + * 32 and 16 bit read/write in big/little endian mode + */ + +/*! + * 16bit write in little endian mode + */ +#define MV_MEMIO_LE16_WRITE(addr, data) MV_MEMIO16_WRITE(addr, MV_16BIT_LE_FAST(data)) + +/*! + * 16bit read in little endian mode + */ +#define MV_MEMIO_LE16_READ(addr) MV_16BIT_LE_FAST((MV_U16)(MV_MEMIO16_READ((MV_U32)(addr)))) + +/*! + * 32bit write in little endian mode + */ +#define MV_MEMIO_LE32_WRITE(addr, data) MV_MEMIO32_WRITE(addr, MV_32BIT_LE_FAST(data)) + +/*! + * 32bit read in little endian mode + */ +#define MV_MEMIO_LE32_READ(addr) MV_32BIT_LE_FAST((MV_U32)(MV_MEMIO32_READ((MV_U32)(addr)))) + +/*! + * Generate 32bit mask + */ +#define GA_REG_MASK(bits, l_shift) ((bits) ? (((bits) < 32) ? (((1uL << (bits)) - 1) << (l_shift)) : (0xFFFFFFFFuL << (l_shift))) : 0) + +/*! + * Galois's register address translate + */ +#if (defined(__MEMIO_DIRECT)) +# ifndef INTER_REGS_BASE +# define INTER_REGS_BASE 0 +# endif + +# define REG_ADDR(offset) ((MV_U32)(INTER_REGS_BASE | (offset))) + +#elif (defined(__MEMIO_PCIE)) + /*! + * After ioremap the value in BAR1, got IO base address. value in BAR0 is for PCI-e core, BAR1 is for galois + */ +# define REG_ADDR(offset) ((MV_U32)(gu32_galois_pcie_ioremap_base + (offset))) + +#else +# define REG_ADDR(offset) ((MV_U32)(offset)) + +#endif + +/*! + * Galois controller register read/write macros + * + * offset -- address offset (32bits) + * holder -- pointer to the variable that will be used to store the data being read in. + * val -- variable contains the data that will be written out. + * bitMask -- variable contains the data (32bits) that will be written out. + * clearMask -- variable contains the mask (32bits) that will be used to clear the corresponding bits. + * + * GA_REG_WORD32_READ(offset, holder) -- Read a Double-Word (32bits) from 'offset' to 'holder' + * GA_REG_WORD16_READ(offset, holder) -- Read a Word (16bits) from 'offset' to 'holder' + * GA_REG_BYTE_READ(offset, holder) -- Read a Byte (8bits) from 'offset' to 'holder' + * + * GA_REG_WORD32_WRITE(offset, val) -- Write a Double-Word (32bits) to 'offset' + * GA_REG_WORD16_WRITE(offset, val) -- Write a Word (16bits) to 'offset' + * GA_REG_BYTE_WIRTE(offset, val) -- Write a Byte (8bits) to 'offset' + * + * GA_REG_WORD32_BIT_SET(offset, bitMask) -- Set bits to '1b' at 'offset', 'bitMask' should only be used to set '1b' for corresponding bits. + * GA_REG_WORD32_BITS_SET(offset, clearMask, val) -- Clear the bits to zero for the bits in clearMask are '1b' and write 'val' to 'offset'. + * GA_REG_WORD32_BIT_CLEAR(offset, clearMask) -- Clear the bits to zero for the bits in bitMask are '1b' + * + */ +#if (defined(__MEMIO_DIRECT)) + +#if defined(BERLIN_SINGLE_CPU) && !defined(__LINUX_KERNEL__) +//temp use this, 'cause the cpu endian definition has confliction +# define GA_REG_WORD32_READ(offset, holder) (*(holder) = (*((volatile unsigned int *)devmem_phy_to_virt(offset)))) +#else +# define GA_REG_WORD32_READ(offset, holder) (*(holder) = MV_MEMIO_LE32_READ(REG_ADDR(offset))) +#endif +# define GA_REG_WORD16_READ(offset, holder) (*(holder) = MV_MEMIO_LE16_READ(REG_ADDR(offset))) +# define GA_REG_BYTE_READ(offset, holder) (*(holder) = MV_MEMIO08_READ(REG_ADDR(offset))) + +#if defined(BERLIN_SINGLE_CPU) && !defined(__LINUX_KERNEL__) +# define GA_REG_WORD32_WRITE(addr, data) ((*((volatile unsigned int *)devmem_phy_to_virt(addr))) = ((unsigned int)(data))) +#else +# define GA_REG_WORD32_WRITE(offset, val) (MV_MEMIO_LE32_WRITE(REG_ADDR(offset), (MV_U32)(val))) +#endif +# define GA_REG_WORD16_WRITE(offset, val) (MV_MEMIO_LE16_WRITE(REG_ADDR(offset), (MV_U16)(val))) +# define GA_REG_BYTE_WRITE(offset, val) (MV_MEMIO08_WRITE(REG_ADDR(offset), (MV_U8)(val))) + +# define GA_REG_WORD32_BIT_SET(offset, bitMask) (MV_MEMIO32_WRITE(REG_ADDR(offset), \ + (MV_MEMIO_LE32_READ(REG_ADDR(offset)) | MV_32BIT_LE_FAST(bitMask)))) +# define GA_REG_WORD32_BITS_SET(offset, clearMask, val) \ + (MV_MEMIO32_WRITE(REG_ADDR(offset), \ + ((MV_MEMIO_LE32_READ(REG_ADDR(offset)) & MV_32BIT_LE_FAST(~(clearMask)))\ + | MV_32BIT_LE_FAST(val)))) +# define GA_REG_WORD32_BIT_CLEAR(offset, clearMask) \ + (MV_MEMIO32_WRITE(REG_ADDR(offset), \ + (MV_MEMIO_LE32_READ(REG_ADDR(offset)) & MV_32BIT_LE_FAST(~(clearMask))))) + +#elif (defined(__MEMIO_PCIE)) +/*! + * System dependent little endian from / to CPU conversions + */ +# define MV_CPU_TO_LE16(x) cpu_to_le16(x) +# define MV_CPU_TO_LE32(x) cpu_to_le32(x) + +# define MV_LE16_TO_CPU(x) le16_to_cpu(x) +# define MV_LE32_TO_CPU(x) le32_to_cpu(x) + +/*! + * System dependent register read / write in byte/word16/word32 variants + */ +# define GA_REG_WORD32_READ(offset, holder) (*(holder) = MV_LE32_TO_CPU(readl(REG_ADDR(offset)))) +# define GA_REG_WORD16_READ(offset, holder) (*(holder) = MV_LE16_TO_CPU(readw(REG_ADDR(offset)))) +# define GA_REG_BYTE_READ(offset, holder) (*(holder) = readb(REG_ADDR(offset))) + +# define GA_REG_WORD32_WRITE(offset, val) writel(MV_CPU_TO_LE32((MV_U32)(val)), REG_ADDR(offset)) +# define GA_REG_WORD16_WRITE(offset, val) writew(MV_CPU_TO_LE16((MV_U16)(val)), REG_ADDR(offset)) +# define GA_REG_BYTE_WRITE(offset, val) writeb((MV_U8)(val), REG_ADDR(offset)) + +# define GA_REG_WORD32_BIT_SET(offset, bitMask) writel((readl(REG_ADDR(offset)) | MV_CPU_TO_LE32(bitMask)), REG_ADDR(offset)) +# define GA_REG_WORD32_BITS_SET(offset, clearMask, val) \ + writel(((readl(REG_ADDR(offset)) & MV_CPU_TO_LE32(~(clearMask))) \ + | MV_CPU_TO_LE32(val)), REG_ADDR(offset)) +# define GA_REG_WORD32_BIT_CLEAR(offset, clearMask) \ + writel((readl(REG_ADDR(offset)) & MV_CPU_TO_LE32(~(clearMask))), REG_ADDR(offset)) + +#elif (defined(__MMIO_SOCKET)) +# define GA_REG_WORD32_READ(offset, holder) (assert(BFM_HOST_Bus_Read32(REG_ADDR(offset), (MV_U32 *)(holder)) >= 0)) +# define GA_REG_WORD16_READ(offset, holder) (assert(BFM_HOST_Bus_Read16(REG_ADDR(offset), (MV_U16 *)(holder)) >= 0)) +# define GA_REG_BYTE_READ(offset, holder) (assert(BFM_HOST_Bus_Read8(REG_ADDR(offset), (MV_U8 *)(holder)) >= 0)) + +# define GA_REG_WORD32_WRITE(offset, val) (assert(BFM_Host_Bus_Write32(REG_ADDR(offset), (MV_U32)(val)) >= 0)) +# define GA_REG_WORD16_WRITE(offset, val) (assert(BFM_Host_Bus_Write16(REG_ADDR(offset), (MV_U16)(val)) >= 0)) +# define GA_REG_BYTE_WRITE(offset, val) (assert(BFM_Host_Bus_Write8(REG_ADDR(offset), (MV_U8)(val)) >= 0)) + +# define GA_REG_WORD32_BIT_SET(offset, bitMask) \ + do { \ + MV_U32 temp; \ + \ + GA_REG_WORD32_READ(offset, &temp); \ + temp |= (bitMask); \ + GA_REG_WORD32_WRITE(offset, temp); \ + } while (0) + +# define GA_REG_WORD32_BITS_SET(offset, clearMask, val) \ + do { \ + MV_U32 temp; \ + \ + GA_REG_WORD32_READ(offset, &temp); \ + temp &= ~(clearMask); \ + temp |= val; \ + GA_REG_WORD32_WRITE(offset, temp); \ + } while (0) + +# define GA_REG_WORD32_BIT_CLEAR(offset, clearMask) \ + do { \ + MV_U32 temp; \ + \ + GA_REG_WORD32_READ(offset, &temp); \ + temp &= ~(clearMask); \ + GA_REG_WORD32_WRITE(offset, temp); \ + } while (0) + +#else +# error "MEMI/O way not selected" + +#endif /* __MEMIO_SOCKET || __MEMIO_PCIE || __MEMIO_DIRECT */ + +#endif /* __GALOIS_IO_H__ */ diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/galois_type.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/galois_type.h new file mode 100644 index 00000000..1337ca73 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/galois_type.h @@ -0,0 +1,178 @@ +/******************************************************************************* + * Copyright (C) Marvell International Ltd. and its affiliates + * + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * alternative licensing terms. Once you have made an election to distribute the + * File under one of the following license alternatives, please (i) delete this + * introductory statement regarding license alternatives, (ii) delete the two + * license alternatives that you have not elected to use and (iii) preserve the + * Marvell copyright notice above. + * + ******************************************************************************* + * Marvell Commercial License Option + * + * If you received this File from Marvell and you have entered into a commercial + * license agreement (a "Commercial License") with Marvell, the File is licensed + * to you under the terms of the applicable Commercial License. + * + ******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************** + * Marvell BSD License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File under the following licensing terms. + * 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 Marvell 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. + * + *******************************************************************************/ + +#ifndef __GALOIS_TYPE_H__ +#define __GALOIS_TYPE_H__ + +/*! + * Defines + * The following is a list of Marvell status + */ +#define MV_ERROR (int)(-1) +#define MV_INVALID (int)(-1) +#define MV_FALSE 0 +#define MV_TRUE (!(MV_FALSE)) + +#define MV_OK (0x00) /* Operation succeeded */ +#define MV_FAIL (0x01) /* Operation failed */ +#define MV_BAD_VALUE (0x02) /* Illegal value (general) */ +#define MV_OUT_OF_RANGE (0x03) /* The value is out of range */ +#define MV_BAD_PARAM (0x04) /* Illegal parameter in function called */ +#define MV_BAD_PTR (0x05) /* Illegal pointer value */ +#define MV_BAD_SIZE (0x06) /* Illegal size */ +#define MV_BAD_STATE (0x07) /* Illegal state of state machine */ +#define MV_SET_ERROR (0x08) /* Set operation failed */ +#define MV_GET_ERROR (0x09) /* Get operation failed */ +#define MV_CREATE_ERROR (0x0A) /* Fail while creating an item */ +#define MV_NOT_FOUND (0x0B) /* Item not found */ +#define MV_NO_MORE (0x0C) /* No more items found */ +#define MV_NO_SUCH (0x0D) /* No such item */ +#define MV_TIMEOUT (0x0E) /* Time Out */ +#define MV_NO_CHANGE (0x0F) /* Parameter(s) is already in this value */ +#define MV_NOT_SUPPORTED (0x10) /* This request is not support */ +#define MV_NOT_IMPLEMENTED (0x11) /* Request supported but not implemented */ +#define MV_NOT_INITIALIZED (0x12) /* The item is not initialized */ +#define MV_NO_RESOURCE (0x13) /* Resource not available (memory ...) */ +#define MV_FULL (0x14) /* Item is full (Queue or table etc...) */ +#define MV_EMPTY (0x15) /* Item is empty (Queue or table etc...) */ +#define MV_INIT_ERROR (0x16) /* Error occured while INIT process */ +#define MV_HW_ERROR (0x17) /* Hardware error */ +#define MV_TX_ERROR (0x18) /* Transmit operation not succeeded */ +#define MV_RX_ERROR (0x19) /* Recieve operation not succeeded */ +#define MV_NOT_READY (0x1A) /* The other side is not ready yet */ +#define MV_ALREADY_EXIST (0x1B) /* Tried to create existing item */ +#define MV_OUT_OF_CPU_MEM (0x1C) /* Cpu memory allocation failed. */ +#define MV_NOT_STARTED (0x1D) /* Not started yet */ +#define MV_BUSY (0x1E) /* Item is busy. */ +#define MV_TERMINATE (0x1F) /* Item terminates it's work. */ +#define MV_NOT_ALIGNED (0x20) /* Wrong alignment */ +#define MV_NOT_ALLOWED (0x21) /* Operation NOT allowed */ +#define MV_WRITE_PROTECT (0x22) /* Write protected */ + + +#ifndef NULL +#define NULL ((void*)0) +#endif + + +/*! + * Defines + * The following is a list of Marvell type definition + */ +typedef float MV_FLOAT; +typedef double MV_BOUBLE; + +typedef char MV_8; +typedef unsigned char MV_U8; +typedef short MV_16; +typedef unsigned short MV_U16; +typedef void MV_VOID; + + +#if (defined(WIN32)) +# include +# include + + typedef unsigned int MV_U32; + typedef signed int MV_32; + typedef unsigned __int64 MV_U64; + typedef signed __int64 MV_64; +/*--------------------------------------------------------------------------- + ARMCC (RVCT) + ---------------------------------------------------------------------------*/ +#elif defined (__ARMCC_VERSION) + + typedef unsigned int MV_U32; + typedef signed int MV_32; + typedef unsigned long long MV_U64; + typedef signed long long MV_64; + +#elif (defined(__GNUC__)) +#if defined(__UBOOT__) || defined(__LINUX_KERNEL__) || defined(NON_OS) +#else +# include +# include +# include +#endif +#if 0 + typedef __uint32_t MV_U32; + typedef __int32_t MV_32; + typedef __uint64_t MV_U64; + typedef __int64_t MV_64; +#else + typedef unsigned long MV_U32; + typedef signed long MV_32; + typedef unsigned long long MV_U64; + typedef signed long long MV_64; +#endif + +#else + typedef unsigned long MV_U32; + typedef signed long MV_32; + typedef unsigned long long MV_U64; + typedef signed long long MV_64; + +#endif +#endif /* __GALOIS_TYPE_H__ */ + diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/zspWrapper.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/zspWrapper.h new file mode 100644 index 00000000..d246dad4 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cd/zspWrapper.h @@ -0,0 +1,1148 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + +////// +/// don't edit! auto-generated by docc: zspWrapper.h +//////////////////////////////////////////////////////////// +#ifndef zspWrapper_h +#define zspWrapper_h (){} + + +#include "ctypes.h" + +#pragma pack(1) +#ifdef __cplusplus + extern "C" { +#endif + +#ifndef _DOCC_H_BITOPS_ +#define _DOCC_H_BITOPS_ (){} + + #define _bSETMASK_(b) ((b)<32 ? (1<<((b)&31)) : 0) + #define _NSETMASK_(msb,lsb) (_bSETMASK_((msb)+1)-_bSETMASK_(lsb)) + #define _bCLRMASK_(b) (~_bSETMASK_(b)) + #define _NCLRMASK_(msb,lsb) (~_NSETMASK_(msb,lsb)) + #define _BFGET_(r,msb,lsb) (_NSETMASK_((msb)-(lsb),0)&((r)>>(lsb))) + #define _BFSET_(r,msb,lsb,v) do{ (r)&=_NCLRMASK_(msb,lsb); (r)|=_NSETMASK_(msb,lsb)&((v)<<(lsb)); }while(0) + +#endif + + + +////// +/// +/// $INTERFACE ZspGlobalRegs (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 subsys_reset (RW) +/// %unsigned 1 reset_n 0x0 +/// ### +/// * 0: reset the ZSP800_subsys except for the ZSP800 core logic +/// * 1: start the ZSP800_subsys except for the ZSP800 core logic +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00004 core_reset (RW) +/// %unsigned 1 reset_n 0x0 +/// ### +/// * 0: reset the ZSP800 core logic +/// * 1: start the ZSP800 core logic +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 clock_ctrl (RW) +/// %unsigned 1 enable 0x1 +/// ### +/// * 1: enable the clock of ZSP800_subsys +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C ext_bp (RW) +/// %unsigned 4 ext_bp 0x0 +/// %% 28 # Stuffing bits... +/// @ 0x00010 halt (RW) +/// %unsigned 1 halt 0x0 +/// ### +/// * halt the zsp core +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00014 status (R-) +/// %unsigned 1 deu_ccu_halt_ahb 0x0 +/// %unsigned 1 zsp_idle_sleep 0x0 +/// %unsigned 1 zsp_halted 0x0 +/// %unsigned 1 deu_ccu_halt_cpu 0x0 +/// %unsigned 1 mbx_flag 0x0 +/// %% 27 # Stuffing bits... +/// @ 0x00018 (W-) +/// # # Stuffing bytes... +/// %% 32 +/// @ 0x0001C svtaddr (RW) +/// %% 9 # Stuffing bits... +/// %unsigned 23 svtaddr 0x0 +/// ### +/// * This is the boot up address of ZSP in byte. After the core_reset is released, ZSP will fetch the first instruction from address {svtaddr,9’d0}. +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 32B, bits: 36b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_ZspGlobalRegs +#define h_ZspGlobalRegs (){} + + #define RA_ZspGlobalRegs_subsys_reset 0x0000 + + #define BA_ZspGlobalRegs_subsys_reset_reset_n 0x0000 + #define B16ZspGlobalRegs_subsys_reset_reset_n 0x0000 + #define LSb32ZspGlobalRegs_subsys_reset_reset_n 0 + #define LSb16ZspGlobalRegs_subsys_reset_reset_n 0 + #define bZspGlobalRegs_subsys_reset_reset_n 1 + #define MSK32ZspGlobalRegs_subsys_reset_reset_n 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_ZspGlobalRegs_core_reset 0x0004 + + #define BA_ZspGlobalRegs_core_reset_reset_n 0x0004 + #define B16ZspGlobalRegs_core_reset_reset_n 0x0004 + #define LSb32ZspGlobalRegs_core_reset_reset_n 0 + #define LSb16ZspGlobalRegs_core_reset_reset_n 0 + #define bZspGlobalRegs_core_reset_reset_n 1 + #define MSK32ZspGlobalRegs_core_reset_reset_n 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_ZspGlobalRegs_clock_ctrl 0x0008 + + #define BA_ZspGlobalRegs_clock_ctrl_enable 0x0008 + #define B16ZspGlobalRegs_clock_ctrl_enable 0x0008 + #define LSb32ZspGlobalRegs_clock_ctrl_enable 0 + #define LSb16ZspGlobalRegs_clock_ctrl_enable 0 + #define bZspGlobalRegs_clock_ctrl_enable 1 + #define MSK32ZspGlobalRegs_clock_ctrl_enable 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_ZspGlobalRegs_ext_bp 0x000C + + #define BA_ZspGlobalRegs_ext_bp_ext_bp 0x000C + #define B16ZspGlobalRegs_ext_bp_ext_bp 0x000C + #define LSb32ZspGlobalRegs_ext_bp_ext_bp 0 + #define LSb16ZspGlobalRegs_ext_bp_ext_bp 0 + #define bZspGlobalRegs_ext_bp_ext_bp 4 + #define MSK32ZspGlobalRegs_ext_bp_ext_bp 0x0000000F + /////////////////////////////////////////////////////////// + #define RA_ZspGlobalRegs_halt 0x0010 + + #define BA_ZspGlobalRegs_halt_halt 0x0010 + #define B16ZspGlobalRegs_halt_halt 0x0010 + #define LSb32ZspGlobalRegs_halt_halt 0 + #define LSb16ZspGlobalRegs_halt_halt 0 + #define bZspGlobalRegs_halt_halt 1 + #define MSK32ZspGlobalRegs_halt_halt 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_ZspGlobalRegs_status 0x0014 + + #define BA_ZspGlobalRegs_status_deu_ccu_halt_ahb 0x0014 + #define B16ZspGlobalRegs_status_deu_ccu_halt_ahb 0x0014 + #define LSb32ZspGlobalRegs_status_deu_ccu_halt_ahb 0 + #define LSb16ZspGlobalRegs_status_deu_ccu_halt_ahb 0 + #define bZspGlobalRegs_status_deu_ccu_halt_ahb 1 + #define MSK32ZspGlobalRegs_status_deu_ccu_halt_ahb 0x00000001 + + #define BA_ZspGlobalRegs_status_zsp_idle_sleep 0x0014 + #define B16ZspGlobalRegs_status_zsp_idle_sleep 0x0014 + #define LSb32ZspGlobalRegs_status_zsp_idle_sleep 1 + #define LSb16ZspGlobalRegs_status_zsp_idle_sleep 1 + #define bZspGlobalRegs_status_zsp_idle_sleep 1 + #define MSK32ZspGlobalRegs_status_zsp_idle_sleep 0x00000002 + + #define BA_ZspGlobalRegs_status_zsp_halted 0x0014 + #define B16ZspGlobalRegs_status_zsp_halted 0x0014 + #define LSb32ZspGlobalRegs_status_zsp_halted 2 + #define LSb16ZspGlobalRegs_status_zsp_halted 2 + #define bZspGlobalRegs_status_zsp_halted 1 + #define MSK32ZspGlobalRegs_status_zsp_halted 0x00000004 + + #define BA_ZspGlobalRegs_status_deu_ccu_halt_cpu 0x0014 + #define B16ZspGlobalRegs_status_deu_ccu_halt_cpu 0x0014 + #define LSb32ZspGlobalRegs_status_deu_ccu_halt_cpu 3 + #define LSb16ZspGlobalRegs_status_deu_ccu_halt_cpu 3 + #define bZspGlobalRegs_status_deu_ccu_halt_cpu 1 + #define MSK32ZspGlobalRegs_status_deu_ccu_halt_cpu 0x00000008 + + #define BA_ZspGlobalRegs_status_mbx_flag 0x0014 + #define B16ZspGlobalRegs_status_mbx_flag 0x0014 + #define LSb32ZspGlobalRegs_status_mbx_flag 4 + #define LSb16ZspGlobalRegs_status_mbx_flag 4 + #define bZspGlobalRegs_status_mbx_flag 1 + #define MSK32ZspGlobalRegs_status_mbx_flag 0x00000010 + /////////////////////////////////////////////////////////// + #define RA_ZspGlobalRegs_svtaddr 0x001C + + #define BA_ZspGlobalRegs_svtaddr_svtaddr 0x001D + #define B16ZspGlobalRegs_svtaddr_svtaddr 0x001C + #define LSb32ZspGlobalRegs_svtaddr_svtaddr 9 + #define LSb16ZspGlobalRegs_svtaddr_svtaddr 9 + #define bZspGlobalRegs_svtaddr_svtaddr 23 + #define MSK32ZspGlobalRegs_svtaddr_svtaddr 0xFFFFFE00 + /////////////////////////////////////////////////////////// + + typedef struct SIE_ZspGlobalRegs { + /////////////////////////////////////////////////////////// + #define GET32ZspGlobalRegs_subsys_reset_reset_n(r32) _BFGET_(r32, 0, 0) + #define SET32ZspGlobalRegs_subsys_reset_reset_n(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16ZspGlobalRegs_subsys_reset_reset_n(r16) _BFGET_(r16, 0, 0) + #define SET16ZspGlobalRegs_subsys_reset_reset_n(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32ZspGlobalRegs_subsys_reset {\ + UNSG32 usubsys_reset_reset_n : 1;\ + UNSG32 RSVDx0_b1 : 31;\ + } + union { UNSG32 u32ZspGlobalRegs_subsys_reset; + struct w32ZspGlobalRegs_subsys_reset; + }; + /////////////////////////////////////////////////////////// + #define GET32ZspGlobalRegs_core_reset_reset_n(r32) _BFGET_(r32, 0, 0) + #define SET32ZspGlobalRegs_core_reset_reset_n(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16ZspGlobalRegs_core_reset_reset_n(r16) _BFGET_(r16, 0, 0) + #define SET16ZspGlobalRegs_core_reset_reset_n(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32ZspGlobalRegs_core_reset {\ + UNSG32 ucore_reset_reset_n : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } + union { UNSG32 u32ZspGlobalRegs_core_reset; + struct w32ZspGlobalRegs_core_reset; + }; + /////////////////////////////////////////////////////////// + #define GET32ZspGlobalRegs_clock_ctrl_enable(r32) _BFGET_(r32, 0, 0) + #define SET32ZspGlobalRegs_clock_ctrl_enable(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16ZspGlobalRegs_clock_ctrl_enable(r16) _BFGET_(r16, 0, 0) + #define SET16ZspGlobalRegs_clock_ctrl_enable(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32ZspGlobalRegs_clock_ctrl {\ + UNSG32 uclock_ctrl_enable : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32ZspGlobalRegs_clock_ctrl; + struct w32ZspGlobalRegs_clock_ctrl; + }; + /////////////////////////////////////////////////////////// + #define GET32ZspGlobalRegs_ext_bp_ext_bp(r32) _BFGET_(r32, 3, 0) + #define SET32ZspGlobalRegs_ext_bp_ext_bp(r32,v) _BFSET_(r32, 3, 0,v) + #define GET16ZspGlobalRegs_ext_bp_ext_bp(r16) _BFGET_(r16, 3, 0) + #define SET16ZspGlobalRegs_ext_bp_ext_bp(r16,v) _BFSET_(r16, 3, 0,v) + + #define w32ZspGlobalRegs_ext_bp {\ + UNSG32 uext_bp_ext_bp : 4;\ + UNSG32 RSVDxC_b4 : 28;\ + } + union { UNSG32 u32ZspGlobalRegs_ext_bp; + struct w32ZspGlobalRegs_ext_bp; + }; + /////////////////////////////////////////////////////////// + #define GET32ZspGlobalRegs_halt_halt(r32) _BFGET_(r32, 0, 0) + #define SET32ZspGlobalRegs_halt_halt(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16ZspGlobalRegs_halt_halt(r16) _BFGET_(r16, 0, 0) + #define SET16ZspGlobalRegs_halt_halt(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32ZspGlobalRegs_halt {\ + UNSG32 uhalt_halt : 1;\ + UNSG32 RSVDx10_b1 : 31;\ + } + union { UNSG32 u32ZspGlobalRegs_halt; + struct w32ZspGlobalRegs_halt; + }; + /////////////////////////////////////////////////////////// + #define GET32ZspGlobalRegs_status_deu_ccu_halt_ahb(r32) _BFGET_(r32, 0, 0) + #define SET32ZspGlobalRegs_status_deu_ccu_halt_ahb(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16ZspGlobalRegs_status_deu_ccu_halt_ahb(r16) _BFGET_(r16, 0, 0) + #define SET16ZspGlobalRegs_status_deu_ccu_halt_ahb(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32ZspGlobalRegs_status_zsp_idle_sleep(r32) _BFGET_(r32, 1, 1) + #define SET32ZspGlobalRegs_status_zsp_idle_sleep(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16ZspGlobalRegs_status_zsp_idle_sleep(r16) _BFGET_(r16, 1, 1) + #define SET16ZspGlobalRegs_status_zsp_idle_sleep(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32ZspGlobalRegs_status_zsp_halted(r32) _BFGET_(r32, 2, 2) + #define SET32ZspGlobalRegs_status_zsp_halted(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16ZspGlobalRegs_status_zsp_halted(r16) _BFGET_(r16, 2, 2) + #define SET16ZspGlobalRegs_status_zsp_halted(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32ZspGlobalRegs_status_deu_ccu_halt_cpu(r32) _BFGET_(r32, 3, 3) + #define SET32ZspGlobalRegs_status_deu_ccu_halt_cpu(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16ZspGlobalRegs_status_deu_ccu_halt_cpu(r16) _BFGET_(r16, 3, 3) + #define SET16ZspGlobalRegs_status_deu_ccu_halt_cpu(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32ZspGlobalRegs_status_mbx_flag(r32) _BFGET_(r32, 4, 4) + #define SET32ZspGlobalRegs_status_mbx_flag(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16ZspGlobalRegs_status_mbx_flag(r16) _BFGET_(r16, 4, 4) + #define SET16ZspGlobalRegs_status_mbx_flag(r16,v) _BFSET_(r16, 4, 4,v) + + #define w32ZspGlobalRegs_status {\ + UNSG32 ustatus_deu_ccu_halt_ahb : 1;\ + UNSG32 ustatus_zsp_idle_sleep : 1;\ + UNSG32 ustatus_zsp_halted : 1;\ + UNSG32 ustatus_deu_ccu_halt_cpu : 1;\ + UNSG32 ustatus_mbx_flag : 1;\ + UNSG32 RSVDx14_b5 : 27;\ + } + union { UNSG32 u32ZspGlobalRegs_status; + struct w32ZspGlobalRegs_status; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx18 [4]; + /////////////////////////////////////////////////////////// + #define GET32ZspGlobalRegs_svtaddr_svtaddr(r32) _BFGET_(r32,31, 9) + #define SET32ZspGlobalRegs_svtaddr_svtaddr(r32,v) _BFSET_(r32,31, 9,v) + + #define w32ZspGlobalRegs_svtaddr {\ + UNSG32 RSVDx1C : 9;\ + UNSG32 usvtaddr_svtaddr : 23;\ + } + union { UNSG32 u32ZspGlobalRegs_svtaddr; + struct w32ZspGlobalRegs_svtaddr; + }; + /////////////////////////////////////////////////////////// + } SIE_ZspGlobalRegs; + + typedef union T32ZspGlobalRegs_subsys_reset + { UNSG32 u32; + struct w32ZspGlobalRegs_subsys_reset; + } T32ZspGlobalRegs_subsys_reset; + typedef union T32ZspGlobalRegs_core_reset + { UNSG32 u32; + struct w32ZspGlobalRegs_core_reset; + } T32ZspGlobalRegs_core_reset; + typedef union T32ZspGlobalRegs_clock_ctrl + { UNSG32 u32; + struct w32ZspGlobalRegs_clock_ctrl; + } T32ZspGlobalRegs_clock_ctrl; + typedef union T32ZspGlobalRegs_ext_bp + { UNSG32 u32; + struct w32ZspGlobalRegs_ext_bp; + } T32ZspGlobalRegs_ext_bp; + typedef union T32ZspGlobalRegs_halt + { UNSG32 u32; + struct w32ZspGlobalRegs_halt; + } T32ZspGlobalRegs_halt; + typedef union T32ZspGlobalRegs_status + { UNSG32 u32; + struct w32ZspGlobalRegs_status; + } T32ZspGlobalRegs_status; + typedef union T32ZspGlobalRegs_svtaddr + { UNSG32 u32; + struct w32ZspGlobalRegs_svtaddr; + } T32ZspGlobalRegs_svtaddr; + /////////////////////////////////////////////////////////// + + typedef union TZspGlobalRegs_subsys_reset + { UNSG32 u32[1]; + struct { + struct w32ZspGlobalRegs_subsys_reset; + }; + } TZspGlobalRegs_subsys_reset; + typedef union TZspGlobalRegs_core_reset + { UNSG32 u32[1]; + struct { + struct w32ZspGlobalRegs_core_reset; + }; + } TZspGlobalRegs_core_reset; + typedef union TZspGlobalRegs_clock_ctrl + { UNSG32 u32[1]; + struct { + struct w32ZspGlobalRegs_clock_ctrl; + }; + } TZspGlobalRegs_clock_ctrl; + typedef union TZspGlobalRegs_ext_bp + { UNSG32 u32[1]; + struct { + struct w32ZspGlobalRegs_ext_bp; + }; + } TZspGlobalRegs_ext_bp; + typedef union TZspGlobalRegs_halt + { UNSG32 u32[1]; + struct { + struct w32ZspGlobalRegs_halt; + }; + } TZspGlobalRegs_halt; + typedef union TZspGlobalRegs_status + { UNSG32 u32[1]; + struct { + struct w32ZspGlobalRegs_status; + }; + } TZspGlobalRegs_status; + typedef union TZspGlobalRegs_svtaddr + { UNSG32 u32[1]; + struct { + struct w32ZspGlobalRegs_svtaddr; + }; + } TZspGlobalRegs_svtaddr; + + /////////////////////////////////////////////////////////// + SIGN32 ZspGlobalRegs_drvrd(SIE_ZspGlobalRegs *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 ZspGlobalRegs_drvwr(SIE_ZspGlobalRegs *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void ZspGlobalRegs_reset(SIE_ZspGlobalRegs *p); + SIGN32 ZspGlobalRegs_cmp (SIE_ZspGlobalRegs *p, SIE_ZspGlobalRegs *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define ZspGlobalRegs_check(p,pie,pfx,hLOG) ZspGlobalRegs_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define ZspGlobalRegs_print(p, pfx,hLOG) ZspGlobalRegs_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: ZspGlobalRegs +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE ZspInt2Zsp (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 status (R-) +/// %unsigned 16 status 0x0 +/// ### +/// * Interrupt status bits. +/// * For any bit, a low to high transition will trigger an interrupt to the ZSP core. +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00004 set (W-) +/// %unsigned 4 id +/// ### +/// * Writing to this address will set the status[id] to high. +/// ### +/// %% 28 # Stuffing bits... +/// @ 0x00008 clear (W-) +/// %unsigned 4 id +/// ### +/// * Writing to this address will set the status[id] to low. +/// ### +/// %% 28 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 12B, bits: 24b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_ZspInt2Zsp +#define h_ZspInt2Zsp (){} + + #define RA_ZspInt2Zsp_status 0x0000 + + #define BA_ZspInt2Zsp_status_status 0x0000 + #define B16ZspInt2Zsp_status_status 0x0000 + #define LSb32ZspInt2Zsp_status_status 0 + #define LSb16ZspInt2Zsp_status_status 0 + #define bZspInt2Zsp_status_status 16 + #define MSK32ZspInt2Zsp_status_status 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_ZspInt2Zsp_set 0x0004 + + #define BA_ZspInt2Zsp_set_id 0x0004 + #define B16ZspInt2Zsp_set_id 0x0004 + #define LSb32ZspInt2Zsp_set_id 0 + #define LSb16ZspInt2Zsp_set_id 0 + #define bZspInt2Zsp_set_id 4 + #define MSK32ZspInt2Zsp_set_id 0x0000000F + /////////////////////////////////////////////////////////// + #define RA_ZspInt2Zsp_clear 0x0008 + + #define BA_ZspInt2Zsp_clear_id 0x0008 + #define B16ZspInt2Zsp_clear_id 0x0008 + #define LSb32ZspInt2Zsp_clear_id 0 + #define LSb16ZspInt2Zsp_clear_id 0 + #define bZspInt2Zsp_clear_id 4 + #define MSK32ZspInt2Zsp_clear_id 0x0000000F + /////////////////////////////////////////////////////////// + + typedef struct SIE_ZspInt2Zsp { + /////////////////////////////////////////////////////////// + #define GET32ZspInt2Zsp_status_status(r32) _BFGET_(r32,15, 0) + #define SET32ZspInt2Zsp_status_status(r32,v) _BFSET_(r32,15, 0,v) + #define GET16ZspInt2Zsp_status_status(r16) _BFGET_(r16,15, 0) + #define SET16ZspInt2Zsp_status_status(r16,v) _BFSET_(r16,15, 0,v) + + #define w32ZspInt2Zsp_status {\ + UNSG32 ustatus_status : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32ZspInt2Zsp_status; + struct w32ZspInt2Zsp_status; + }; + /////////////////////////////////////////////////////////// + #define GET32ZspInt2Zsp_set_id(r32) _BFGET_(r32, 3, 0) + #define SET32ZspInt2Zsp_set_id(r32,v) _BFSET_(r32, 3, 0,v) + #define GET16ZspInt2Zsp_set_id(r16) _BFGET_(r16, 3, 0) + #define SET16ZspInt2Zsp_set_id(r16,v) _BFSET_(r16, 3, 0,v) + + #define w32ZspInt2Zsp_set {\ + UNSG32 uset_id : 4;\ + UNSG32 RSVDx4_b4 : 28;\ + } + union { UNSG32 u32ZspInt2Zsp_set; + struct w32ZspInt2Zsp_set; + }; + /////////////////////////////////////////////////////////// + #define GET32ZspInt2Zsp_clear_id(r32) _BFGET_(r32, 3, 0) + #define SET32ZspInt2Zsp_clear_id(r32,v) _BFSET_(r32, 3, 0,v) + #define GET16ZspInt2Zsp_clear_id(r16) _BFGET_(r16, 3, 0) + #define SET16ZspInt2Zsp_clear_id(r16,v) _BFSET_(r16, 3, 0,v) + + #define w32ZspInt2Zsp_clear {\ + UNSG32 uclear_id : 4;\ + UNSG32 RSVDx8_b4 : 28;\ + } + union { UNSG32 u32ZspInt2Zsp_clear; + struct w32ZspInt2Zsp_clear; + }; + /////////////////////////////////////////////////////////// + } SIE_ZspInt2Zsp; + + typedef union T32ZspInt2Zsp_status + { UNSG32 u32; + struct w32ZspInt2Zsp_status; + } T32ZspInt2Zsp_status; + typedef union T32ZspInt2Zsp_set + { UNSG32 u32; + struct w32ZspInt2Zsp_set; + } T32ZspInt2Zsp_set; + typedef union T32ZspInt2Zsp_clear + { UNSG32 u32; + struct w32ZspInt2Zsp_clear; + } T32ZspInt2Zsp_clear; + /////////////////////////////////////////////////////////// + + typedef union TZspInt2Zsp_status + { UNSG32 u32[1]; + struct { + struct w32ZspInt2Zsp_status; + }; + } TZspInt2Zsp_status; + typedef union TZspInt2Zsp_set + { UNSG32 u32[1]; + struct { + struct w32ZspInt2Zsp_set; + }; + } TZspInt2Zsp_set; + typedef union TZspInt2Zsp_clear + { UNSG32 u32[1]; + struct { + struct w32ZspInt2Zsp_clear; + }; + } TZspInt2Zsp_clear; + + /////////////////////////////////////////////////////////// + SIGN32 ZspInt2Zsp_drvrd(SIE_ZspInt2Zsp *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 ZspInt2Zsp_drvwr(SIE_ZspInt2Zsp *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void ZspInt2Zsp_reset(SIE_ZspInt2Zsp *p); + SIGN32 ZspInt2Zsp_cmp (SIE_ZspInt2Zsp *p, SIE_ZspInt2Zsp *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define ZspInt2Zsp_check(p,pie,pfx,hLOG) ZspInt2Zsp_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define ZspInt2Zsp_print(p, pfx,hLOG) ZspInt2Zsp_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: ZspInt2Zsp +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE ZspInt2Soc (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 status (R-) +/// %unsigned 16 status 0x0 +/// ### +/// * Interrupt status bits. +/// * If any of the enabled interrupt bits is high, port zspInt will be high. +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00004 set (W-) +/// %unsigned 4 id +/// ### +/// * Writing to this address will set the status[id] to high. +/// ### +/// %% 28 # Stuffing bits... +/// @ 0x00008 clear (W-) +/// %unsigned 4 id +/// ### +/// * Writing to this address will set the status[id] to low. +/// ### +/// %% 28 # Stuffing bits... +/// @ 0x0000C enable (RW) +/// %unsigned 16 enable 0x0 +/// ### +/// * Interrupt enable bit. +/// * For each bit, 1 indicates the interrupt for that bit is enabled +/// ### +/// %% 16 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 40b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_ZspInt2Soc +#define h_ZspInt2Soc (){} + + #define RA_ZspInt2Soc_status 0x0000 + + #define BA_ZspInt2Soc_status_status 0x0000 + #define B16ZspInt2Soc_status_status 0x0000 + #define LSb32ZspInt2Soc_status_status 0 + #define LSb16ZspInt2Soc_status_status 0 + #define bZspInt2Soc_status_status 16 + #define MSK32ZspInt2Soc_status_status 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_ZspInt2Soc_set 0x0004 + + #define BA_ZspInt2Soc_set_id 0x0004 + #define B16ZspInt2Soc_set_id 0x0004 + #define LSb32ZspInt2Soc_set_id 0 + #define LSb16ZspInt2Soc_set_id 0 + #define bZspInt2Soc_set_id 4 + #define MSK32ZspInt2Soc_set_id 0x0000000F + /////////////////////////////////////////////////////////// + #define RA_ZspInt2Soc_clear 0x0008 + + #define BA_ZspInt2Soc_clear_id 0x0008 + #define B16ZspInt2Soc_clear_id 0x0008 + #define LSb32ZspInt2Soc_clear_id 0 + #define LSb16ZspInt2Soc_clear_id 0 + #define bZspInt2Soc_clear_id 4 + #define MSK32ZspInt2Soc_clear_id 0x0000000F + /////////////////////////////////////////////////////////// + #define RA_ZspInt2Soc_enable 0x000C + + #define BA_ZspInt2Soc_enable_enable 0x000C + #define B16ZspInt2Soc_enable_enable 0x000C + #define LSb32ZspInt2Soc_enable_enable 0 + #define LSb16ZspInt2Soc_enable_enable 0 + #define bZspInt2Soc_enable_enable 16 + #define MSK32ZspInt2Soc_enable_enable 0x0000FFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_ZspInt2Soc { + /////////////////////////////////////////////////////////// + #define GET32ZspInt2Soc_status_status(r32) _BFGET_(r32,15, 0) + #define SET32ZspInt2Soc_status_status(r32,v) _BFSET_(r32,15, 0,v) + #define GET16ZspInt2Soc_status_status(r16) _BFGET_(r16,15, 0) + #define SET16ZspInt2Soc_status_status(r16,v) _BFSET_(r16,15, 0,v) + + #define w32ZspInt2Soc_status {\ + UNSG32 ustatus_status : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32ZspInt2Soc_status; + struct w32ZspInt2Soc_status; + }; + /////////////////////////////////////////////////////////// + #define GET32ZspInt2Soc_set_id(r32) _BFGET_(r32, 3, 0) + #define SET32ZspInt2Soc_set_id(r32,v) _BFSET_(r32, 3, 0,v) + #define GET16ZspInt2Soc_set_id(r16) _BFGET_(r16, 3, 0) + #define SET16ZspInt2Soc_set_id(r16,v) _BFSET_(r16, 3, 0,v) + + #define w32ZspInt2Soc_set {\ + UNSG32 uset_id : 4;\ + UNSG32 RSVDx4_b4 : 28;\ + } + union { UNSG32 u32ZspInt2Soc_set; + struct w32ZspInt2Soc_set; + }; + /////////////////////////////////////////////////////////// + #define GET32ZspInt2Soc_clear_id(r32) _BFGET_(r32, 3, 0) + #define SET32ZspInt2Soc_clear_id(r32,v) _BFSET_(r32, 3, 0,v) + #define GET16ZspInt2Soc_clear_id(r16) _BFGET_(r16, 3, 0) + #define SET16ZspInt2Soc_clear_id(r16,v) _BFSET_(r16, 3, 0,v) + + #define w32ZspInt2Soc_clear {\ + UNSG32 uclear_id : 4;\ + UNSG32 RSVDx8_b4 : 28;\ + } + union { UNSG32 u32ZspInt2Soc_clear; + struct w32ZspInt2Soc_clear; + }; + /////////////////////////////////////////////////////////// + #define GET32ZspInt2Soc_enable_enable(r32) _BFGET_(r32,15, 0) + #define SET32ZspInt2Soc_enable_enable(r32,v) _BFSET_(r32,15, 0,v) + #define GET16ZspInt2Soc_enable_enable(r16) _BFGET_(r16,15, 0) + #define SET16ZspInt2Soc_enable_enable(r16,v) _BFSET_(r16,15, 0,v) + + #define w32ZspInt2Soc_enable {\ + UNSG32 uenable_enable : 16;\ + UNSG32 RSVDxC_b16 : 16;\ + } + union { UNSG32 u32ZspInt2Soc_enable; + struct w32ZspInt2Soc_enable; + }; + /////////////////////////////////////////////////////////// + } SIE_ZspInt2Soc; + + typedef union T32ZspInt2Soc_status + { UNSG32 u32; + struct w32ZspInt2Soc_status; + } T32ZspInt2Soc_status; + typedef union T32ZspInt2Soc_set + { UNSG32 u32; + struct w32ZspInt2Soc_set; + } T32ZspInt2Soc_set; + typedef union T32ZspInt2Soc_clear + { UNSG32 u32; + struct w32ZspInt2Soc_clear; + } T32ZspInt2Soc_clear; + typedef union T32ZspInt2Soc_enable + { UNSG32 u32; + struct w32ZspInt2Soc_enable; + } T32ZspInt2Soc_enable; + /////////////////////////////////////////////////////////// + + typedef union TZspInt2Soc_status + { UNSG32 u32[1]; + struct { + struct w32ZspInt2Soc_status; + }; + } TZspInt2Soc_status; + typedef union TZspInt2Soc_set + { UNSG32 u32[1]; + struct { + struct w32ZspInt2Soc_set; + }; + } TZspInt2Soc_set; + typedef union TZspInt2Soc_clear + { UNSG32 u32[1]; + struct { + struct w32ZspInt2Soc_clear; + }; + } TZspInt2Soc_clear; + typedef union TZspInt2Soc_enable + { UNSG32 u32[1]; + struct { + struct w32ZspInt2Soc_enable; + }; + } TZspInt2Soc_enable; + + /////////////////////////////////////////////////////////// + SIGN32 ZspInt2Soc_drvrd(SIE_ZspInt2Soc *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 ZspInt2Soc_drvwr(SIE_ZspInt2Soc *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void ZspInt2Soc_reset(SIE_ZspInt2Soc *p); + SIGN32 ZspInt2Soc_cmp (SIE_ZspInt2Soc *p, SIE_ZspInt2Soc *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define ZspInt2Soc_check(p,pie,pfx,hLOG) ZspInt2Soc_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define ZspInt2Soc_print(p, pfx,hLOG) ZspInt2Soc_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: ZspInt2Soc +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE ZspDmaRegs (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 srcAddr (RW) +/// %unsigned 32 addr +/// ### +/// * Source address in byte +/// ### +/// @ 0x00004 desAddr (RW) +/// %unsigned 32 addr +/// ### +/// * Destination address in byte +/// ### +/// @ 0x00008 config (RW) +/// %unsigned 24 size +/// ### +/// * Number of bytes to transfer +/// * Writing non-zero value to this address will start the DMA transfer. +/// ### +/// %% 8 # Stuffing bits... +/// @ 0x0000C status (R-) +/// %unsigned 1 busy 0x0 +/// ### +/// * Indicates that the DMA is busy +/// ### +/// %unsigned 1 error 0x0 +/// ### +/// * Indicates that the last writing to ZspDmaRegs.config.size fails to start a DMA transfer because another one is ongoing. It will be cleared with the successful start of next DMA transfer. +/// ### +/// %% 30 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 90b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_ZspDmaRegs +#define h_ZspDmaRegs (){} + + #define RA_ZspDmaRegs_srcAddr 0x0000 + + #define BA_ZspDmaRegs_srcAddr_addr 0x0000 + #define B16ZspDmaRegs_srcAddr_addr 0x0000 + #define LSb32ZspDmaRegs_srcAddr_addr 0 + #define LSb16ZspDmaRegs_srcAddr_addr 0 + #define bZspDmaRegs_srcAddr_addr 32 + #define MSK32ZspDmaRegs_srcAddr_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_ZspDmaRegs_desAddr 0x0004 + + #define BA_ZspDmaRegs_desAddr_addr 0x0004 + #define B16ZspDmaRegs_desAddr_addr 0x0004 + #define LSb32ZspDmaRegs_desAddr_addr 0 + #define LSb16ZspDmaRegs_desAddr_addr 0 + #define bZspDmaRegs_desAddr_addr 32 + #define MSK32ZspDmaRegs_desAddr_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_ZspDmaRegs_config 0x0008 + + #define BA_ZspDmaRegs_config_size 0x0008 + #define B16ZspDmaRegs_config_size 0x0008 + #define LSb32ZspDmaRegs_config_size 0 + #define LSb16ZspDmaRegs_config_size 0 + #define bZspDmaRegs_config_size 24 + #define MSK32ZspDmaRegs_config_size 0x00FFFFFF + /////////////////////////////////////////////////////////// + #define RA_ZspDmaRegs_status 0x000C + + #define BA_ZspDmaRegs_status_busy 0x000C + #define B16ZspDmaRegs_status_busy 0x000C + #define LSb32ZspDmaRegs_status_busy 0 + #define LSb16ZspDmaRegs_status_busy 0 + #define bZspDmaRegs_status_busy 1 + #define MSK32ZspDmaRegs_status_busy 0x00000001 + + #define BA_ZspDmaRegs_status_error 0x000C + #define B16ZspDmaRegs_status_error 0x000C + #define LSb32ZspDmaRegs_status_error 1 + #define LSb16ZspDmaRegs_status_error 1 + #define bZspDmaRegs_status_error 1 + #define MSK32ZspDmaRegs_status_error 0x00000002 + /////////////////////////////////////////////////////////// + + typedef struct SIE_ZspDmaRegs { + /////////////////////////////////////////////////////////// + #define GET32ZspDmaRegs_srcAddr_addr(r32) _BFGET_(r32,31, 0) + #define SET32ZspDmaRegs_srcAddr_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32ZspDmaRegs_srcAddr {\ + UNSG32 usrcAddr_addr : 32;\ + } + union { UNSG32 u32ZspDmaRegs_srcAddr; + struct w32ZspDmaRegs_srcAddr; + }; + /////////////////////////////////////////////////////////// + #define GET32ZspDmaRegs_desAddr_addr(r32) _BFGET_(r32,31, 0) + #define SET32ZspDmaRegs_desAddr_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32ZspDmaRegs_desAddr {\ + UNSG32 udesAddr_addr : 32;\ + } + union { UNSG32 u32ZspDmaRegs_desAddr; + struct w32ZspDmaRegs_desAddr; + }; + /////////////////////////////////////////////////////////// + #define GET32ZspDmaRegs_config_size(r32) _BFGET_(r32,23, 0) + #define SET32ZspDmaRegs_config_size(r32,v) _BFSET_(r32,23, 0,v) + + #define w32ZspDmaRegs_config {\ + UNSG32 uconfig_size : 24;\ + UNSG32 RSVDx8_b24 : 8;\ + } + union { UNSG32 u32ZspDmaRegs_config; + struct w32ZspDmaRegs_config; + }; + /////////////////////////////////////////////////////////// + #define GET32ZspDmaRegs_status_busy(r32) _BFGET_(r32, 0, 0) + #define SET32ZspDmaRegs_status_busy(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16ZspDmaRegs_status_busy(r16) _BFGET_(r16, 0, 0) + #define SET16ZspDmaRegs_status_busy(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32ZspDmaRegs_status_error(r32) _BFGET_(r32, 1, 1) + #define SET32ZspDmaRegs_status_error(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16ZspDmaRegs_status_error(r16) _BFGET_(r16, 1, 1) + #define SET16ZspDmaRegs_status_error(r16,v) _BFSET_(r16, 1, 1,v) + + #define w32ZspDmaRegs_status {\ + UNSG32 ustatus_busy : 1;\ + UNSG32 ustatus_error : 1;\ + UNSG32 RSVDxC_b2 : 30;\ + } + union { UNSG32 u32ZspDmaRegs_status; + struct w32ZspDmaRegs_status; + }; + /////////////////////////////////////////////////////////// + } SIE_ZspDmaRegs; + + typedef union T32ZspDmaRegs_srcAddr + { UNSG32 u32; + struct w32ZspDmaRegs_srcAddr; + } T32ZspDmaRegs_srcAddr; + typedef union T32ZspDmaRegs_desAddr + { UNSG32 u32; + struct w32ZspDmaRegs_desAddr; + } T32ZspDmaRegs_desAddr; + typedef union T32ZspDmaRegs_config + { UNSG32 u32; + struct w32ZspDmaRegs_config; + } T32ZspDmaRegs_config; + typedef union T32ZspDmaRegs_status + { UNSG32 u32; + struct w32ZspDmaRegs_status; + } T32ZspDmaRegs_status; + /////////////////////////////////////////////////////////// + + typedef union TZspDmaRegs_srcAddr + { UNSG32 u32[1]; + struct { + struct w32ZspDmaRegs_srcAddr; + }; + } TZspDmaRegs_srcAddr; + typedef union TZspDmaRegs_desAddr + { UNSG32 u32[1]; + struct { + struct w32ZspDmaRegs_desAddr; + }; + } TZspDmaRegs_desAddr; + typedef union TZspDmaRegs_config + { UNSG32 u32[1]; + struct { + struct w32ZspDmaRegs_config; + }; + } TZspDmaRegs_config; + typedef union TZspDmaRegs_status + { UNSG32 u32[1]; + struct { + struct w32ZspDmaRegs_status; + }; + } TZspDmaRegs_status; + + /////////////////////////////////////////////////////////// + SIGN32 ZspDmaRegs_drvrd(SIE_ZspDmaRegs *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 ZspDmaRegs_drvwr(SIE_ZspDmaRegs *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void ZspDmaRegs_reset(SIE_ZspDmaRegs *p); + SIGN32 ZspDmaRegs_cmp (SIE_ZspDmaRegs *p, SIE_ZspDmaRegs *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define ZspDmaRegs_check(p,pie,pfx,hLOG) ZspDmaRegs_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define ZspDmaRegs_print(p, pfx,hLOG) ZspDmaRegs_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: ZspDmaRegs +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE ZspRegs biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 ITCM (P) +/// %unsigned 32 Base +/// @ 0x00004 (W-) +/// # # Stuffing bytes... +/// %% 1048544 +/// @ 0x20000 DTCM (P) +/// %unsigned 32 Base +/// @ 0x20004 (W-) +/// # # Stuffing bytes... +/// %% 1048544 +/// @ 0x40000 PMEM (P) +/// %unsigned 32 Base +/// @ 0x40004 (W-) +/// # # Stuffing bytes... +/// %% 1048544 +/// @ 0x60000 ZXBAR (R-) +/// %unsigned 32 Base 0x12006330 +/// @ 0x60004 (W-) +/// # # Stuffing bytes... +/// %% 131040 +/// @ 0x64000 (P) +/// # 0x64000 Global +/// $ZspGlobalRegs Global REG +/// @ 0x64020 (W-) +/// # # Stuffing bytes... +/// %% 7936 +/// @ 0x64400 (P) +/// # 0x64400 Int2Zsp +/// $ZspInt2Zsp Int2Zsp REG +/// @ 0x6440C (W-) +/// # # Stuffing bytes... +/// %% 4000 +/// @ 0x64600 (P) +/// # 0x64600 Int2Soc +/// $ZspInt2Soc Int2Soc REG +/// @ 0x64610 (W-) +/// # # Stuffing bytes... +/// %% 3968 +/// @ 0x64800 (P) +/// # 0x64800 DMA +/// $ZspDmaRegs DMA REG +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 411664B, bits: 318b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_ZspRegs +#define h_ZspRegs (){} + + #define RA_ZspRegs_ITCM 0x0000 + + #define BA_ZspRegs_ITCM_Base 0x0000 + #define B16ZspRegs_ITCM_Base 0x0000 + #define LSb32ZspRegs_ITCM_Base 0 + #define LSb16ZspRegs_ITCM_Base 0 + #define bZspRegs_ITCM_Base 32 + #define MSK32ZspRegs_ITCM_Base 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_ZspRegs_DTCM 0x20000 + + #define BA_ZspRegs_DTCM_Base 0x20000 + #define B16ZspRegs_DTCM_Base 0x20000 + #define LSb32ZspRegs_DTCM_Base 0 + #define LSb16ZspRegs_DTCM_Base 0 + #define bZspRegs_DTCM_Base 32 + #define MSK32ZspRegs_DTCM_Base 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_ZspRegs_PMEM 0x40000 + + #define BA_ZspRegs_PMEM_Base 0x40000 + #define B16ZspRegs_PMEM_Base 0x40000 + #define LSb32ZspRegs_PMEM_Base 0 + #define LSb16ZspRegs_PMEM_Base 0 + #define bZspRegs_PMEM_Base 32 + #define MSK32ZspRegs_PMEM_Base 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_ZspRegs_ZXBAR 0x60000 + + #define BA_ZspRegs_ZXBAR_Base 0x60000 + #define B16ZspRegs_ZXBAR_Base 0x60000 + #define LSb32ZspRegs_ZXBAR_Base 0 + #define LSb16ZspRegs_ZXBAR_Base 0 + #define bZspRegs_ZXBAR_Base 32 + #define MSK32ZspRegs_ZXBAR_Base 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_ZspRegs_Global 0x64000 + /////////////////////////////////////////////////////////// + #define RA_ZspRegs_Int2Zsp 0x64400 + /////////////////////////////////////////////////////////// + #define RA_ZspRegs_Int2Soc 0x64600 + /////////////////////////////////////////////////////////// + #define RA_ZspRegs_DMA 0x64800 + /////////////////////////////////////////////////////////// + + typedef struct SIE_ZspRegs { + /////////////////////////////////////////////////////////// + #define GET32ZspRegs_ITCM_Base(r32) _BFGET_(r32,31, 0) + #define SET32ZspRegs_ITCM_Base(r32,v) _BFSET_(r32,31, 0,v) + + #define w32ZspRegs_ITCM {\ + UNSG32 uITCM_Base : 32;\ + } + union { UNSG32 u32ZspRegs_ITCM; + struct w32ZspRegs_ITCM; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx4 [131068]; + /////////////////////////////////////////////////////////// + #define GET32ZspRegs_DTCM_Base(r32) _BFGET_(r32,31, 0) + #define SET32ZspRegs_DTCM_Base(r32,v) _BFSET_(r32,31, 0,v) + + #define w32ZspRegs_DTCM {\ + UNSG32 uDTCM_Base : 32;\ + } + union { UNSG32 u32ZspRegs_DTCM; + struct w32ZspRegs_DTCM; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx20004 [131068]; + /////////////////////////////////////////////////////////// + #define GET32ZspRegs_PMEM_Base(r32) _BFGET_(r32,31, 0) + #define SET32ZspRegs_PMEM_Base(r32,v) _BFSET_(r32,31, 0,v) + + #define w32ZspRegs_PMEM {\ + UNSG32 uPMEM_Base : 32;\ + } + union { UNSG32 u32ZspRegs_PMEM; + struct w32ZspRegs_PMEM; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx40004 [131068]; + /////////////////////////////////////////////////////////// + #define GET32ZspRegs_ZXBAR_Base(r32) _BFGET_(r32,31, 0) + #define SET32ZspRegs_ZXBAR_Base(r32,v) _BFSET_(r32,31, 0,v) + + #define w32ZspRegs_ZXBAR {\ + UNSG32 uZXBAR_Base : 32;\ + } + union { UNSG32 u32ZspRegs_ZXBAR; + struct w32ZspRegs_ZXBAR; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx60004 [16380]; + /////////////////////////////////////////////////////////// + SIE_ZspGlobalRegs ie_Global; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx64020 [992]; + /////////////////////////////////////////////////////////// + SIE_ZspInt2Zsp ie_Int2Zsp; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx6440C [500]; + /////////////////////////////////////////////////////////// + SIE_ZspInt2Soc ie_Int2Soc; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx64610 [496]; + /////////////////////////////////////////////////////////// + SIE_ZspDmaRegs ie_DMA; + /////////////////////////////////////////////////////////// + } SIE_ZspRegs; + + typedef union T32ZspRegs_ITCM + { UNSG32 u32; + struct w32ZspRegs_ITCM; + } T32ZspRegs_ITCM; + typedef union T32ZspRegs_DTCM + { UNSG32 u32; + struct w32ZspRegs_DTCM; + } T32ZspRegs_DTCM; + typedef union T32ZspRegs_PMEM + { UNSG32 u32; + struct w32ZspRegs_PMEM; + } T32ZspRegs_PMEM; + typedef union T32ZspRegs_ZXBAR + { UNSG32 u32; + struct w32ZspRegs_ZXBAR; + } T32ZspRegs_ZXBAR; + /////////////////////////////////////////////////////////// + + typedef union TZspRegs_ITCM + { UNSG32 u32[1]; + struct { + struct w32ZspRegs_ITCM; + }; + } TZspRegs_ITCM; + typedef union TZspRegs_DTCM + { UNSG32 u32[1]; + struct { + struct w32ZspRegs_DTCM; + }; + } TZspRegs_DTCM; + typedef union TZspRegs_PMEM + { UNSG32 u32[1]; + struct { + struct w32ZspRegs_PMEM; + }; + } TZspRegs_PMEM; + typedef union TZspRegs_ZXBAR + { UNSG32 u32[1]; + struct { + struct w32ZspRegs_ZXBAR; + }; + } TZspRegs_ZXBAR; + + /////////////////////////////////////////////////////////// + SIGN32 ZspRegs_drvrd(SIE_ZspRegs *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 ZspRegs_drvwr(SIE_ZspRegs *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void ZspRegs_reset(SIE_ZspRegs *p); + SIGN32 ZspRegs_cmp (SIE_ZspRegs *p, SIE_ZspRegs *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define ZspRegs_check(p,pie,pfx,hLOG) ZspRegs_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define ZspRegs_print(p, pfx,hLOG) ZspRegs_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: ZspRegs +//////////////////////////////////////////////////////////// + + + +#ifdef __cplusplus + } +#endif +#pragma pack() + +#endif +////// +/// ENDOFFILE: zspWrapper.h +//////////////////////////////////////////////////////////// + diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/api_avio_dhub.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/api_avio_dhub.h new file mode 100644 index 00000000..22a19ba0 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/api_avio_dhub.h @@ -0,0 +1,102 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + +#ifndef __API_AVIO_DHUB_H__ +#define __API_AVIO_DHUB_H__ +#include "dHub.h" +#include "avioDhub.h" +#include "api_dhub.h" + + +#define VPP_DHUB_BASE (MEMMAP_VPP_DHUB_REG_BASE + RA_vppDhub_dHub0) +#define VPP_HBO_SRAM_BASE (MEMMAP_VPP_DHUB_REG_BASE + RA_vppDhub_tcm0) + +//dhub channels are changed in CDp A0 +#define VPP_NUM_OF_CHANNELS_Z1 (avioDhubChMap_vpp_HDMI_R_Z1+1) +#define VPP_NUM_OF_CHANNELS_A0 (avioDhubChMap_vpp_HDMI_R_A0+1) + +#define AG_DHUB_BASE (MEMMAP_AG_DHUB_REG_BASE + RA_agDhub_dHub0) +#define AG_HBO_SRAM_BASE (MEMMAP_AG_DHUB_REG_BASE + RA_agDhub_tcm0) +#define AG_NUM_OF_CHANNELS_Z1 (avioDhubChMap_ag_GFX_R_Z1+1) +#define AG_NUM_OF_CHANNELS_A0 (avioDhubChMap_ag_GFX_R_A0+1) + +// add by yuxia for compilation +#define VPP_DHUB_BANK0_START_ADDR (8192*0) +#define VPP_DHUB_BANK1_START_ADDR (8192*1) +#define VPP_DHUB_BANK2_START_ADDR (8192*2) +#define VPP_DHUB_BANK3_START_ADDR (8192*3) +#define VPP_DHUB_BANK4_START_ADDR (8192*4) + + +#define DHUB_BANK0_START_ADDR (0) +#define DHUB_BANK1_START_ADDR (8192*1) + +#define AG_DHUB_BANK0_START_ADDR (0) +#define AG_DHUB_BANK1_START_ADDR (4096*1) +#define AG_DHUB_BANK2_START_ADDR (4096*3) + +//add by yuxia for compilation +#define DHUB_BANK5_START_ADDR (8192*4) + +typedef struct DHUB_channel_config { + SIGN32 chanId; + UNSG32 chanCmdBase; + UNSG32 chanDataBase; + SIGN32 chanCmdSize; + SIGN32 chanDataSize; + SIGN32 chanMtuSize; + SIGN32 chanQos; + SIGN32 chanSelfLoop; + SIGN32 chanEnable; +} DHUB_channel_config; + +extern HDL_dhub2d AG_dhubHandle; +extern HDL_dhub2d VPP_dhubHandle; +#if (BERLIN_CHIP_VERSION >= BERLIN_BG2) +extern HDL_dhub2d VIP_dhubHandle; +#endif +extern DHUB_channel_config AG_config_a0[]; +extern DHUB_channel_config VPP_config_a0[]; + +extern DHUB_channel_config AG_config[]; +extern DHUB_channel_config VPP_config[]; +#if (BERLIN_CHIP_VERSION >= BERLIN_BG2) +extern DHUB_channel_config VIP_config[]; +#endif + +/****************************************************************************************************************** + * Function: GetChannelInfo + * Description: Get the Dhub configuration of requested channel. + * Parameter : pdhubHandle ----- pointer to 2D dhubHandle + * IChannel ----- Channel of the dhub + * cfg ----- Configuration need to be updated here. + * Return: 0 ---- Success + + ****************************************************************************************************************** + * Function: DhubInitialization + * Description: Initialize DHUB . + * Parameter : cpuId ------------- cpu ID + * dHubBaseAddr ------------- dHub Base address. + * hboSramAddr ----- Sram Address for HBO. + * pdhubHandle ----- pointer to 2D dhubHandle + * dhub_config ----- configuration of AG + * numOfChans ----- number of channels + * Return: void +******************************************************************************************************************/ +void DhubInitialization(SIGN32 cpuId, UNSG32 dHubBaseAddr, UNSG32 hboSramAddr, HDL_dhub2d *pdhubHandle, DHUB_channel_config *dhub_config,SIGN32 numOfChans); + +void DhubChannelClear(void *hdl, SIGN32 id, T64b cfgQ[]); +#endif //__API_AVIO_DHUB_H__ diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/api_dhub.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/api_dhub.h new file mode 100644 index 00000000..e2ca1332 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/api_dhub.h @@ -0,0 +1,808 @@ +/****************************************************************************************************** +* Copyright (C) 2007-2011 +* Copyright © 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +* +* $Log: vsys#comm#cmodel#hal#drv#api_dhub.h,v $ +* Revision 1.4 2007-10-30 10:58:43-07 chengjun +* Remove interrpt from HBO to semaphore. Map dHub channel 0 interrupt to semaphore channel 0. +* +* Revision 1.3 2007-10-24 21:41:17-07 kbhatt +* add structures to api_dhub.h +* +* Revision 1.2 2007-10-12 21:36:54-07 oussama +* adapted the env to use Alpha's Cmodel driver +* +* Revision 1.1 2007-08-29 20:27:01-07 lsha +* Initial revision. +* +* +* DESCRIPTION: +* OS independent layer for dHub/HBO/SemaHub APIs. +* +****************************************************************************************************/ + +#ifndef DHUB_API +#define DHUB_API " DHUB_API >>> " +/** DHUB_API + */ + +#include "ctypes.h" + +typedef struct HDL_semaphore { +UNSG32 ra; /*! Base address of $SemaHub !*/ +SIGN32 depth[32]; /*! Array of semaphore (virtual FIFO) depth !*/ +} HDL_semaphore; + +typedef struct HDL_hbo { +UNSG32 mem; /*! Base address of HBO SRAM !*/ +UNSG32 ra; /*! Base address of $HBO !*/ +HDL_semaphore fifoCtl; /*! Handle of HBO.FiFoCtl !*/ +UNSG32 base[32]; /*! Array of HBO queue base address !*/ +} HDL_hbo; + +typedef struct HDL_dhub { +UNSG32 ra; /*! Base address of $dHub !*/ +HDL_semaphore semaHub; /*! Handle of dHub.SemaHub !*/ +HDL_hbo hbo; /*! Handle of dHub.HBO !*/ +SIGN32 MTUb[16]; /*! Array of dHub channel MTU size bits !*/ +} HDL_dhub; + +typedef struct HDL_dhub2d { +UNSG32 ra; /*! Base address of $dHub2D !*/ +HDL_dhub dhub; /*! Handle of dHub2D.dHub !*/ +} HDL_dhub2d; + + +#ifdef __cplusplus + extern "C" + { +#endif + +/** SECTION - handle of local contexts + */ +extern UNSG32 sizeof_hdl_semaphore; /*! sizeof(HDL_semaphore) !*/ +extern UNSG32 sizeof_hdl_hbo; /*! sizeof(HDL_hbo) !*/ +extern UNSG32 sizeof_hdl_dhub; /*! sizeof(HDL_dhub) !*/ +extern UNSG32 sizeof_hdl_dhub2d; /*! sizeof(HDL_dhub2d) !*/ + +/** ENDOFSECTION + */ + + + +/** SECTION - API definitions for $SemaHub + */ +/******************************************************************************************** +* Function: semaphore_hdl +* Description: Initialize HDL_semaphore with a $SemaHub BIU instance. +*********************************************************************************************/ +void semaphore_hdl( + UNSG32 ra, /*! Base address of a BIU instance of $SemaHub !*/ + void *hdl /*! Handle to HDL_semaphore !*/ + ); + +/******************************************************************************************** +* Function: semaphore_cfg +* Description: Configurate a semaphore's depth & reset pointers. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 semaphore_cfg( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 depth, /*! Semaphore (virtual FIFO) depth !*/ + T64b cfgQ[] /*! Pass NULL to directly init SemaHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_intr_enable +* Description: Configurate interrupt enable bits of a semaphore. +*********************************************************************************************/ +void semaphore_intr_enable( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 empty, /*! Interrupt enable for CPU at condition 'empty' !*/ + SIGN32 full, /*! Interrupt enable for CPU at condition 'full' !*/ + SIGN32 almostEmpty, /*! Interrupt enable for CPU at condition 'almostEmpty' !*/ + SIGN32 almostFull, /*! Interrupt enable for CPU at condition 'almostFull' !*/ + SIGN32 cpu /*! CPU ID (0/1/2) !*/ + ); + +/******************************************************************************************** +* Function: semaphore_query +* Description: Query current status (counter & pointer) of a semaphore. +* Return: UNSG32 Current available unit level +*********************************************************************************************/ +UNSG32 semaphore_query( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 master, /*! 0/1 as procuder/consumer query !*/ + UNSG32 *ptr /*! Non-zero to receive semaphore r/w pointer !*/ + ); + +/******************************************************************************************** +* Function: semaphore_push +* Description: Producer semaphore push. +*********************************************************************************************/ +void semaphore_push( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 delta /*! Delta to push as a producer !*/ + ); + +/******************************************************************************************** +* Function: semaphore_push +* Description: Consumer semaphore pop. +*********************************************************************************************/ +void semaphore_pop( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 delta /*! Delta to pop as a consumer !*/ + ); + +/******************************************************************************************** +* Function: semaphore_chk_empty +* Description: Check 'empty' status of a semaphore (or all semaphores). +* Return: UNSG32 status bit of given semaphore, or +* status bits of all semaphores if id==-1 +*********************************************************************************************/ +UNSG32 semaphore_chk_empty( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub + -1 to return all 32b of the interrupt status + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_chk_full +* Description: Check 'full' status of a semaphore (or all semaphores). +* Return: UNSG32 status bit of given semaphore, or +* status bits of all semaphores if id==-1 +*********************************************************************************************/ +UNSG32 semaphore_chk_full( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub + -1 to return all 32b of the interrupt status + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_chk_almostEmpty +* Description: Check 'almostEmpty' status of a semaphore (or all semaphores). +* Return: UNSG32 status bit of given semaphore, or +* status bits of all semaphores if id==-1 +*********************************************************************************************/ +UNSG32 semaphore_chk_almostEmpty( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub + -1 to return all 32b of the interrupt status + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_chk_almostFull +* Description: Check 'almostFull' status of a semaphore (or all semaphores). +* Return: UNSG32 status bit of given semaphore, or +* status bits of all semaphores if id==-1 +*********************************************************************************************/ +UNSG32 semaphore_chk_almostFull( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub + -1 to return all 32b of the interrupt status + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_clr_empty +* Description: Clear 'empty' status of a semaphore. +*********************************************************************************************/ +void semaphore_clr_empty( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub !*/ + ); + +/******************************************************************************************** +* Function: semaphore_clr_full +* Description: Clear 'full' status of a semaphore. +*********************************************************************************************/ +void semaphore_clr_full( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub !*/ + ); + +/******************************************************************************************** +* Function: semaphore_clr_almostEmpty +* Description: Clear 'almostEmpty' status of a semaphore. +*********************************************************************************************/ +void semaphore_clr_almostEmpty( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub !*/ + ); + +/******************************************************************************************** +* Function: semaphore_clr_almostFull +* Description: Clear 'almostFull' status of a semaphore. +*********************************************************************************************/ +void semaphore_clr_almostFull( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub !*/ + ); +/** ENDOFSECTION + */ + + + +/** SECTION - API definitions for $HBO + */ +/******************************************************************************************** +* Function: hbo_hdl +* Description: Initialize HDL_hbo with a $HBO BIU instance. +*********************************************************************************************/ +void hbo_hdl( + UNSG32 mem, /*! Base address of HBO SRAM !*/ + UNSG32 ra, /*! Base address of a BIU instance of $HBO !*/ + void *hdl /*! Handle to HDL_hbo !*/ + ); + +/******************************************************************************************** +* Function: hbo_fifoCtl +* Description: Get HDL_semaphore pointer from a HBO instance. +* Return: void* Handle for HBO.FiFoCtl +*********************************************************************************************/ +void* hbo_fifoCtl(void *hdl /*! Handle to HDL_hbo !*/ + ); + +/******************************************************************************************** +* DEFINITION - convert HBO FIFO control to semaphore control +*********************************************************************************************/ +#define hbo_queue_intr_enable (hdl,id,empty,full,almostEmpty,almostFull,cpu) \ + semaphore_intr_enable (hbo_fifoCtl(hdl),id,empty,full,almostEmpty,almostFull,cpu) + +#define hbo_queue_query(hdl,id,master,ptr) \ + semaphore_query(hbo_fifoCtl(hdl),id,master,ptr) + +#define hbo_queue_push(hdl,id,delta) \ + semaphore_push(hbo_fifoCtl(hdl),id,delta) + +#define hbo_queue_pop(hdl,id,delta) \ + semaphore_pop(hbo_fifoCtl(hdl),id,delta) + +#define hbo_queue_chk_empty(hdl,id) \ + semaphore_chk_empty(hbo_fifoCtl(hdl),id) + +#define hbo_queue_chk_full(hdl,id) \ + semaphore_chk_full(hbo_fifoCtl(hdl),id) + +#define hbo_queue_chk_almostEmpty(hdl,id) \ + semaphore_chk_almostEmpty(hbo_fifoCtl(hdl),id) + +#define hbo_queue_chk_almostFull(hdl,id) \ + semaphore_chk_almostFull(hbo_fifoCtl(hdl),id) + +#define hbo_queue_clr_empty(hdl,id) \ + semaphore_clr_empty(hbo_fifoCtl(hdl),id) + +#define hbo_queue_clr_full(hdl,id) \ + semaphore_clr_full(hbo_fifoCtl(hdl),id) + +#define hbo_queue_clr_almostEmpty (hdl,id) \ + semaphore_clr_almostEmpty(hbo_fifoCtl(hdl),id) + +#define hbo_queue_clr_almostFull(hdl,id) \ + semaphore_clr_almostFull(hbo_fifoCtl(hdl),id) + +/******************************************************************************************** +* Function: hbo_queue_cfg +* Description: Configurate a FIFO's base, depth & reset pointers. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 hbo_queue_cfg( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id, /*! Queue ID in $HBO !*/ + UNSG32 base, /*! Channel FIFO base address (byte address) !*/ + SIGN32 depth, /*! Channel FIFO depth, in 64b word !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init HBO, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_enable +* Description: HBO FIFO enable/disable. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 hbo_queue_enable( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id, /*! Queue ID in $HBO !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init HBO, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_clear +* Description: Issue HBO FIFO clear (will NOT wait for finish). +*********************************************************************************************/ +void hbo_queue_clear( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id /*! Queue ID in $HBO !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_busy +* Description: Read HBO 'BUSY' status for all channel FIFOs. +* Return: UNSG32 'BUSY' status bits of all channels +*********************************************************************************************/ +UNSG32 hbo_queue_busy( + void *hdl /*! Handle to HDL_hbo !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_clear_done +* Description: Wait for a given channel or all channels to be cleared. +*********************************************************************************************/ +void hbo_queue_clear_done( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id /*! Queue ID in $HBO + -1 to wait for all channel clear done + !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_read +* Description: Read a number of 64b data & pop FIFO from HBO SRAM. +* Return: UNSG32 Number of 64b data being read (=n), or (when cfgQ==NULL) +* 0 if there're not sufficient data in FIFO +*********************************************************************************************/ +UNSG32 hbo_queue_read( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id, /*! Queue ID in $HBO !*/ + SIGN32 n, /*! Number 64b entries to read !*/ + T64b data[], /*! To receive read data !*/ + UNSG32 *ptr /*! Pass in current FIFO pointer (in 64b word), + & receive updated new pointer, + Pass NULL to read from HW + !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_write +* Description: Write a number of 64b data & push FIFO to HBO SRAM. +* Return: UNSG32 Number of (adr,pair) added to cfgQ, or (when cfgQ==NULL) +* 0 if there're not sufficient space in FIFO +*********************************************************************************************/ +UNSG32 hbo_queue_write( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id, /*! Queue ID in $HBO !*/ + SIGN32 n, /*! Number 64b entries to write !*/ + T64b data[], /*! Write data !*/ + T64b cfgQ[], /*! Pass NULL to directly update HBO, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + UNSG32 *ptr /*! Pass in current FIFO pointer (in 64b word), + & receive updated new pointer, + Pass NULL to read from HW + !*/ + ); +/** ENDOFSECTION +*/ + + + +/** SECTION - API definitions for $dHubReg +*/ +/******************************************************************************************** +* Function: dhub_hdl +* Description: Initialize HDL_dhub with a $dHub BIU instance. +*********************************************************************************************/ +void dhub_hdl( + UNSG32 mem, /*! Base address of dHub.HBO SRAM !*/ + UNSG32 ra, /*! Base address of a BIU instance of $dHub !*/ + void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_semaphore +* Description: Get HDL_semaphore pointer from a dHub instance. +* Return: void* Handle for dHub.SemaHub +*********************************************************************************************/ +void* dhub_semaphore( + void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_hbo +* Description: Get HDL_hbo pointer from a dHub instance. +* Return: void* Handle for dHub.HBO +*********************************************************************************************/ +void* dhub_hbo( void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_hbo_fifoCtl +* Description: Get HDL_semaphore pointer from the HBO of a dHub instance. +* Return: void* Handle for dHub.HBO.FiFoCtl +*********************************************************************************************/ +#define dhub_hbo_fifoCtl(hdl) (hbo_fifoCtl(dhub_hbo(hdl))) + +/******************************************************************************************** +* DEFINITION - convert from dHub channel ID to HBO FIFO ID & semaphore (interrupt) ID +*********************************************************************************************/ +// removed connection from HBO interrupt to semaphore +//#define dhub_id2intr(id) ((id)+1) +#define dhub_id2intr(id) ((id)) +#define dhub_id2hbo_cmdQ(id) ((id)*2) +#define dhub_id2hbo_data(id) ((id)*2+1) + +/******************************************************************************************** +* DEFINITION - convert dHub cmdQ/dataQ/channel-done interrupt control to HBO/semaphore control +*********************************************************************************************/ +//removed connection from HBO interrupt to semaphore +//#define dhub_hbo_intr_enable (hdl,id,empty,full,almostEmpty,almostFull,cpu) +// semaphore_intr_enable (dhub_semaphore(hdl),0,empty,full,almostEmpty,almostFull,cpu) + +#define dhub_channel_intr_enable (hdl,id,full,cpu) \ + semaphore_intr_enable (dhub_semaphore(hdl),dhub_id2intr(id),0,full,0,0,cpu) + +#define dhub_hbo_cmdQ_intr_enable (hdl,id,empty,almostEmpty,cpu) \ + hbo_queue_intr_enable (dhub_hbo(hdl),dhub_id2hbo_cmdQ(id),empty,0,almostEmpty,0,cpu) + +#define dhub_hbo_data_intr_enable (hdl,id,empty,full,almostEmpty,almostFull,cpu) \ + hbo_queue_intr_enable (dhub_hbo(hdl),dhub_id2hbo_data(id),empty,full,almostEmpty,almostFull,cpu) + +/******************************************************************************************** +* DEFINITION - convert dHub cmdQ opehdltions to HBO FIFO opehdltions +*********************************************************************************************/ +#define dhub_cmdQ_query (hdl,id,ptr) \ + hbo_queue_query (dhub_hbo(hdl),dhub_id2hbo_cmdQ(id),0,ptr) + +#define dhub_cmdQ_push (hdl,id,delta) \ + hbo_queue_push (dhub_hbo(hdl),dhub_id2hbo_cmdQ(id),delta) + +/******************************************************************************************** +* DEFINITION - convert dHub dataQ opehdltions to HBO FIFO opehdltions +*********************************************************************************************/ +#define dhub_data_query(hdl,id,master,ptr)\ + hbo_queue_query(dhub_hbo(hdl),dhub_id2hbo_data(id),master,ptr) + +#define dhub_data_push (hdl,id,delta) \ + hbo_queue_push (dhub_hbo(hdl),dhub_id2hbo_data(id),delta) + +#define dhub_data_pop (hdl,id,delta) \ + hbo_queue_pop (dhub_hbo(hdl),dhub_id2hbo_data(id),delta) + +/******************************************************************************************** +* Function: dhub_channel_cfg +* Description: Configurate a dHub channel. +* Return: UNSG32 Number of (adr,pair) added to cfgQ, or (when cfgQ==NULL) +* 0 if either cmdQ or dataQ in HBO is still busy +*********************************************************************************************/ +UNSG32 dhub_channel_cfg( + void *hdl, /*!Handle to HDL_dhub !*/ + SIGN32 id, /*!Channel ID in $dHubReg !*/ + UNSG32 baseCmd, /*!Channel FIFO base address (byte address) for cmdQ !*/ + UNSG32 baseData, /*!Channel FIFO base address (byte address) for dataQ !*/ + SIGN32 depthCmd, /*!Channel FIFO depth for cmdQ, in 64b word !*/ + SIGN32 depthData, /*!Channel FIFO depth for dataQ, in 64b word !*/ + SIGN32 mtu, /*!See 'dHubChannel.CFG.MTU', 0/1/2 for 8/32/128 bytes !*/ + SIGN32 QoS, /*!See 'dHubChannel.CFG.QoS' !*/ + SIGN32 selfLoop, /*!See 'dHubChannel.CFG.selfLoop' !*/ + SIGN32 enable, /*!0 to disable, 1 to enable !*/ + T64b cfgQ[] /*!Pass NULL to directly init dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_enable +* Description: dHub channel enable/disable. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 dhub_channel_enable( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id, /*! Channel ID in $dHubReg !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_clear +* Description: Issue dHub channel clear (will NOT wait for finish). +*********************************************************************************************/ +void dhub_channel_clear( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id /*! Channel ID in $dHubReg !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_flush +* Description: Issue dHub channel (H2M only) flush (will NOT wait for finish). +*********************************************************************************************/ +void dhub_channel_flush( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id /*! Channel ID in $dHubReg !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_busy +* Description: Read dHub 'BUSY' status for all channel FIFOs. +* Return: UNSG32 'BUSY' status bits of all channels +*********************************************************************************************/ +UNSG32 dhub_channel_busy( + void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_pending +* Description: Read dHub 'PENDING' status for all channel FIFOs. +* Return: UNSG32 'PENDING' status bits of all channels +*********************************************************************************************/ +UNSG32 dhub_channel_pending( + void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_clear_done +* Description: Wait for a given channel or all channels to be cleared or flushed. +*********************************************************************************************/ +void dhub_channel_clear_done( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id /*! Channel ID in $dHubReg + -1 to wait for all channel clear done + !*/ + ); + +/****************************************************************************************************************** +* Function: dhub_channel_set_cfg +* Description: dHub channel configration set. +* Return: UNSG32 - Number of (adr,pair) added to cfgQ +*****************************************************************************************************************/ +UNSG32 dhub_channel_set_cfg( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id, /*! Channel ID in $dHubReg !*/ + UNSG32 data, /*! configure data !*/ + T64b cfgQ[] /*! Pass NULL to directly init dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + + + +/******************************************************************************************** +* Function: dhub_channel_write_cmd +* Description: Write a 64b command for a dHub channel. +* Return: UNSG32 Number of (adr,pair) added to cfgQ if success, or +* 0 if there're not sufficient space in FIFO +*********************************************************************************************/ +UNSG32 dhub_channel_write_cmd( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id, /*! Channel ID in $dHubReg !*/ + UNSG32 addr, /*! CMD: buffer address !*/ + SIGN32 size, /*! CMD: number of bytes to transfer !*/ + SIGN32 semOnMTU, /*! CMD: semaphore operation at CMD/MTU (0/1) !*/ + SIGN32 chkSemId, /*! CMD: non-zero to check semaphore !*/ + SIGN32 updSemId, /*! CMD: non-zero to update semaphore !*/ + SIGN32 interrupt, /*! CMD: raise interrupt at CMD finish !*/ + T64b cfgQ[], /*! Pass NULL to directly update dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + UNSG32 *ptr /*! Pass in current cmdQ pointer (in 64b word), + & receive updated new pointer, + Pass NULL to read from HW + !*/ + ); +/** ENDOFSECTION +*/ + +void dhub_channel_generate_cmd( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id, /*! Channel ID in $dHubReg !*/ + UNSG32 addr, /*! CMD: buffer address !*/ + SIGN32 size, /*! CMD: number of bytes to transfer !*/ + SIGN32 semOnMTU, /*! CMD: semaphore operation at CMD/MTU (0/1) !*/ + SIGN32 chkSemId, /*! CMD: non-zero to check semaphore !*/ + SIGN32 updSemId, /*! CMD: non-zero to update semaphore !*/ + SIGN32 interrupt, /*! CMD: raise interrupt at CMD finish !*/ + SIGN32 *pData + ); + +/******************************************************************************************** +* Function: dhub_channel_big_write_cmd +* Description: Write a sequence of 64b command for a dHub channel. +* Return: UNSG32 Number of (adr,pair) added to cfgQ if success, or +* 0 if there're not sufficient space in FIFO +*********************************************************************************************/ +UNSG32 dhub_channel_big_write_cmd( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id, /*! Channel ID in $dHubReg !*/ + UNSG32 addr, /*! CMD: buffer address !*/ + SIGN32 size, /*! CMD: number of bytes to transfer !*/ + SIGN32 semOnMTU, /*! CMD: semaphore operation at CMD/MTU (0/1) !*/ + SIGN32 chkSemId, /*! CMD: non-zero to check semaphore !*/ + SIGN32 updSemId, /*! CMD: non-zero to update semaphore !*/ + SIGN32 interrupt, /*! CMD: raise interrupt at CMD finish !*/ + T64b cfgQ[], /*! Pass NULL to directly update dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + UNSG32 *ptr /*! Pass in current cmdQ pointer (in 64b word), + & receive updated new pointer, + Pass NULL to read from HW + !*/ + ); + +/** SECTION - API definitions for $dHubReg2D +*/ +/******************************************************************************************** +* Function: dhub2d_hdl +* Description: Initialize HDL_dhub2d with a $dHub2D BIU instance. +*********************************************************************************************/ +void dhub2d_hdl( + UNSG32 mem, /*! Base address of dHub2D.dHub.HBO SRAM !*/ + UNSG32 ra, /*! Base address of a BIU instance of $dHub2D !*/ + void *hdl /*! Handle to HDL_dhub2d !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_cfg +* Description: Configurate a dHub2D channel. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 dhub2d_channel_cfg( + void *hdl, /*! Handle to HDL_dhub2d !*/ + SIGN32 id, /*! Channel ID in $dHubReg2D !*/ + UNSG32 addr, /*! CMD: 2D-buffer address !*/ + SIGN32 stride, /*! CMD: line stride size in bytes !*/ + SIGN32 width, /*! CMD: buffer width in bytes !*/ + SIGN32 height, /*! CMD: buffer height in lines !*/ + SIGN32 semLoop, /*! CMD: loop size (1~4) of semaphore operations !*/ + SIGN32 semOnMTU, /*! CMD: semaphore operation at CMD/MTU (0/1) !*/ + SIGN32 chkSemId[], /*! CMD: semaphore loop pattern - non-zero to check !*/ + SIGN32 updSemId[], /*! CMD: semaphore loop pattern - non-zero to update !*/ + SIGN32 interrupt, /*! CMD: raise interrupt at CMD finish !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init dHub2D, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_enable +* Description: dHub2D channel enable/disable. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 dhub2d_channel_enable( + void *hdl, /*! Handle to HDL_dhub2d !*/ + SIGN32 id, /*! Channel ID in $dHubReg2D !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init dHub2D, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_clear +* Description: Issue dHub2D channel clear (will NOT wait for finish). +*********************************************************************************************/ +void dhub2d_channel_clear( + void *hdl, /*! Handle to HDL_dhub2d !*/ + SIGN32 id /*! Channel ID in $dHubReg2D !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_busy +* Description: Read dHub2D 'BUSY' status for all channel FIFOs. +* Return: UNSG32 'BUSY' status bits of all channels +*********************************************************************************************/ +UNSG32 dhub2d_channel_busy( + void *hdl /*! Handle to HDL_dhub2d !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_clear_done +* Description: Wait for a given channel or all channels to be cleared. +*********************************************************************************************/ +void dhub2d_channel_clear_done( + void *hdl, /*! Handle to HDL_dhub2d !*/ + SIGN32 id /*! Channel ID in $dHubReg2D + -1 to wait for all channel clear done + !*/ + ); +/** ENDOFSECTION + */ + +typedef enum { + BCM_SCHED_Q0 = 0, + BCM_SCHED_Q1, + BCM_SCHED_Q2, + BCM_SCHED_Q3, + BCM_SCHED_Q4, + BCM_SCHED_Q5, + BCM_SCHED_Q6, + BCM_SCHED_Q7, + BCM_SCHED_Q8, + BCM_SCHED_Q9, + BCM_SCHED_Q10, + BCM_SCHED_Q11, + BCM_SCHED_Q12, + BCM_SCHED_Q13, + BCM_SCHED_Q14, + BCM_SCHED_Q15, + BCM_SCHED_Q16, + BCM_SCHED_Q17, + BCM_SCHED_Q18, +} ENUM_BCM_SCHED_QID; + +typedef enum { + BCM_SCHED_TRIG_CPCB0_VBI = 0, + BCM_SCHED_TRIG_CPCB1_VBI, + BCM_SCHED_TRIG_CPCB2_VBI, + BCM_SCHED_TRIG_CPCB0_VDE, + BCM_SCHED_TRIG_CPCB1_VDE, + BCM_SCHED_TRIG_CPCB2_VDE, + BCM_SCHED_TRIG_AUD_PRIM, + BCM_SCHED_TRIG_AUD_SEC, + BCM_SCHED_TRIG_AUD_HDMI, + BCM_SCHED_TRIG_AUD_SPDIF, + BCM_SCHED_TRIG_AUD_MIC, //0xA + BCM_SCHED_TRIG_VBI_VDE, + BCM_SCHED_TRIG_DVI_VDE, + BCM_SCHED_TRIG_SD_WRE, + BCM_SCHED_TRIG_SD_RDE, + BCM_SCHED_TRIG_SD_ERR, //0xF + BCM_SCHED_TRIG_NONE = 0x1f, + +} ENUM_BCM_SCHED_TRIG_EVENT; + +void BCM_SCHED_Open(void); +void BCM_SCHED_Close(void); +void BCM_SCHED_SetMux(UNSG32 QID, UNSG32 TrigEvent); +int BCM_SCHED_PushCmd(UNSG32 QID, UNSG32 *pCmd, UNSG32 *cfgQ); +void BCM_SCHED_GetEmptySts(UNSG32 QID, UNSG32 *EmptySts); + +void dhub2d_channel_clear_seq(void *hdl, SIGN32 id); +void dhub2d_channel_start_seq(void *hdl, SIGN32 id); + +#ifdef __cplusplus + } +#endif + + + +/** DHUB_API + */ +#endif + +/** ENDOFFILE: api_dhub.h + */ + diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/avif_dhub_config.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/avif_dhub_config.h new file mode 100644 index 00000000..ff082d3a --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/avif_dhub_config.h @@ -0,0 +1,4541 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + +////// +/// don't edit! auto-generated by docc: avif_dhub_config.h +//////////////////////////////////////////////////////////// +#ifndef avif_dhub_config_h +#define avif_dhub_config_h (){} + + +#include "ctypes.h" + +#pragma pack(1) +#ifdef __cplusplus + extern "C" { +#endif + +#ifndef _DOCC_H_BITOPS_ +#define _DOCC_H_BITOPS_ (){} + + #define _bSETMASK_(b) ((b)<32 ? (1<<((b)&31)) : 0) + #define _NSETMASK_(msb,lsb) (_bSETMASK_((msb)+1)-_bSETMASK_(lsb)) + #define _bCLRMASK_(b) (~_bSETMASK_(b)) + #define _NCLRMASK_(msb,lsb) (~_NSETMASK_(msb,lsb)) + #define _BFGET_(r,msb,lsb) (_NSETMASK_((msb)-(lsb),0)&((r)>>(lsb))) + #define _BFSET_(r,msb,lsb,v) do{ (r)&=_NCLRMASK_(msb,lsb); (r)|=_NSETMASK_(msb,lsb)&((v)<<(lsb)); }while(0) + +#endif + + + +////// +/// +/// $INTERFACE SemaINTR (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 mask (W-) +/// %unsigned 1 empty 0x0 +/// ### +/// * Enable interrupt on 'empty' condition +/// ### +/// %unsigned 1 full 0x0 +/// ### +/// * Enable interrupt on 'full' condition +/// ### +/// %unsigned 1 almostEmpty 0x0 +/// ### +/// * Enable interrupt on 'almostEmpty' condition +/// ### +/// %unsigned 1 almostFull 0x0 +/// ### +/// * Enable interrupt on 'almostFull' condition +/// ### +/// %% 28 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 4b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaINTR +#define h_SemaINTR (){} + + #define RA_SemaINTR_mask 0x0000 + + #define BA_SemaINTR_mask_empty 0x0000 + #define B16SemaINTR_mask_empty 0x0000 + #define LSb32SemaINTR_mask_empty 0 + #define LSb16SemaINTR_mask_empty 0 + #define bSemaINTR_mask_empty 1 + #define MSK32SemaINTR_mask_empty 0x00000001 + + #define BA_SemaINTR_mask_full 0x0000 + #define B16SemaINTR_mask_full 0x0000 + #define LSb32SemaINTR_mask_full 1 + #define LSb16SemaINTR_mask_full 1 + #define bSemaINTR_mask_full 1 + #define MSK32SemaINTR_mask_full 0x00000002 + + #define BA_SemaINTR_mask_almostEmpty 0x0000 + #define B16SemaINTR_mask_almostEmpty 0x0000 + #define LSb32SemaINTR_mask_almostEmpty 2 + #define LSb16SemaINTR_mask_almostEmpty 2 + #define bSemaINTR_mask_almostEmpty 1 + #define MSK32SemaINTR_mask_almostEmpty 0x00000004 + + #define BA_SemaINTR_mask_almostFull 0x0000 + #define B16SemaINTR_mask_almostFull 0x0000 + #define LSb32SemaINTR_mask_almostFull 3 + #define LSb16SemaINTR_mask_almostFull 3 + #define bSemaINTR_mask_almostFull 1 + #define MSK32SemaINTR_mask_almostFull 0x00000008 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaINTR { + /////////////////////////////////////////////////////////// + #define GET32SemaINTR_mask_empty(r32) _BFGET_(r32, 0, 0) + #define SET32SemaINTR_mask_empty(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaINTR_mask_empty(r16) _BFGET_(r16, 0, 0) + #define SET16SemaINTR_mask_empty(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaINTR_mask_full(r32) _BFGET_(r32, 1, 1) + #define SET32SemaINTR_mask_full(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaINTR_mask_full(r16) _BFGET_(r16, 1, 1) + #define SET16SemaINTR_mask_full(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaINTR_mask_almostEmpty(r32) _BFGET_(r32, 2, 2) + #define SET32SemaINTR_mask_almostEmpty(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaINTR_mask_almostEmpty(r16) _BFGET_(r16, 2, 2) + #define SET16SemaINTR_mask_almostEmpty(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaINTR_mask_almostFull(r32) _BFGET_(r32, 3, 3) + #define SET32SemaINTR_mask_almostFull(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaINTR_mask_almostFull(r16) _BFGET_(r16, 3, 3) + #define SET16SemaINTR_mask_almostFull(r16,v) _BFSET_(r16, 3, 3,v) + + #define w32SemaINTR_mask {\ + UNSG32 umask_empty : 1;\ + UNSG32 umask_full : 1;\ + UNSG32 umask_almostEmpty : 1;\ + UNSG32 umask_almostFull : 1;\ + UNSG32 RSVDx0_b4 : 28;\ + } + union { UNSG32 u32SemaINTR_mask; + struct w32SemaINTR_mask; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaINTR; + + typedef union T32SemaINTR_mask + { UNSG32 u32; + struct w32SemaINTR_mask; + } T32SemaINTR_mask; + /////////////////////////////////////////////////////////// + + typedef union TSemaINTR_mask + { UNSG32 u32[1]; + struct { + struct w32SemaINTR_mask; + }; + } TSemaINTR_mask; + + /////////////////////////////////////////////////////////// + SIGN32 SemaINTR_drvrd(SIE_SemaINTR *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaINTR_drvwr(SIE_SemaINTR *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaINTR_reset(SIE_SemaINTR *p); + SIGN32 SemaINTR_cmp (SIE_SemaINTR *p, SIE_SemaINTR *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaINTR_check(p,pie,pfx,hLOG) SemaINTR_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaINTR_print(p, pfx,hLOG) SemaINTR_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaINTR +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE Semaphore biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 16 DEPTH 0xF +/// ### +/// * Max level of semaphore +/// * Note: write this register will trigger counter reset +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00004 (P) +/// # 0x00004 INTR +/// $SemaINTR INTR REG [3] +/// ### +/// * Interrupt mask for 3 CPUs +/// ### +/// @ 0x00010 mask (W-) +/// %unsigned 1 full 0x0 +/// %unsigned 1 emp 0x0 +/// ### +/// * When full bit is set to one, to the producer, the semaphore will never be full, so that the producer will never be blocked. +/// * When emp bit is set to one, to the consumer, the semaphore will never be empty, so that the consumer will never be blocked. +/// * When the emp/full bit is set, the semaphore/FIFO pointer will be maintained, but the counter will be not correct anymore. +/// ### +/// %% 30 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 20B, bits: 30b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_Semaphore +#define h_Semaphore (){} + + #define RA_Semaphore_CFG 0x0000 + + #define BA_Semaphore_CFG_DEPTH 0x0000 + #define B16Semaphore_CFG_DEPTH 0x0000 + #define LSb32Semaphore_CFG_DEPTH 0 + #define LSb16Semaphore_CFG_DEPTH 0 + #define bSemaphore_CFG_DEPTH 16 + #define MSK32Semaphore_CFG_DEPTH 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_Semaphore_INTR 0x0004 + /////////////////////////////////////////////////////////// + #define RA_Semaphore_mask 0x0010 + + #define BA_Semaphore_mask_full 0x0010 + #define B16Semaphore_mask_full 0x0010 + #define LSb32Semaphore_mask_full 0 + #define LSb16Semaphore_mask_full 0 + #define bSemaphore_mask_full 1 + #define MSK32Semaphore_mask_full 0x00000001 + + #define BA_Semaphore_mask_emp 0x0010 + #define B16Semaphore_mask_emp 0x0010 + #define LSb32Semaphore_mask_emp 1 + #define LSb16Semaphore_mask_emp 1 + #define bSemaphore_mask_emp 1 + #define MSK32Semaphore_mask_emp 0x00000002 + /////////////////////////////////////////////////////////// + + typedef struct SIE_Semaphore { + /////////////////////////////////////////////////////////// + #define GET32Semaphore_CFG_DEPTH(r32) _BFGET_(r32,15, 0) + #define SET32Semaphore_CFG_DEPTH(r32,v) _BFSET_(r32,15, 0,v) + #define GET16Semaphore_CFG_DEPTH(r16) _BFGET_(r16,15, 0) + #define SET16Semaphore_CFG_DEPTH(r16,v) _BFSET_(r16,15, 0,v) + + #define w32Semaphore_CFG {\ + UNSG32 uCFG_DEPTH : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32Semaphore_CFG; + struct w32Semaphore_CFG; + }; + /////////////////////////////////////////////////////////// + SIE_SemaINTR ie_INTR[3]; + /////////////////////////////////////////////////////////// + #define GET32Semaphore_mask_full(r32) _BFGET_(r32, 0, 0) + #define SET32Semaphore_mask_full(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16Semaphore_mask_full(r16) _BFGET_(r16, 0, 0) + #define SET16Semaphore_mask_full(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32Semaphore_mask_emp(r32) _BFGET_(r32, 1, 1) + #define SET32Semaphore_mask_emp(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16Semaphore_mask_emp(r16) _BFGET_(r16, 1, 1) + #define SET16Semaphore_mask_emp(r16,v) _BFSET_(r16, 1, 1,v) + + #define w32Semaphore_mask {\ + UNSG32 umask_full : 1;\ + UNSG32 umask_emp : 1;\ + UNSG32 RSVDx10_b2 : 30;\ + } + union { UNSG32 u32Semaphore_mask; + struct w32Semaphore_mask; + }; + /////////////////////////////////////////////////////////// + } SIE_Semaphore; + + typedef union T32Semaphore_CFG + { UNSG32 u32; + struct w32Semaphore_CFG; + } T32Semaphore_CFG; + typedef union T32Semaphore_mask + { UNSG32 u32; + struct w32Semaphore_mask; + } T32Semaphore_mask; + /////////////////////////////////////////////////////////// + + typedef union TSemaphore_CFG + { UNSG32 u32[1]; + struct { + struct w32Semaphore_CFG; + }; + } TSemaphore_CFG; + typedef union TSemaphore_mask + { UNSG32 u32[1]; + struct { + struct w32Semaphore_mask; + }; + } TSemaphore_mask; + + /////////////////////////////////////////////////////////// + SIGN32 Semaphore_drvrd(SIE_Semaphore *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 Semaphore_drvwr(SIE_Semaphore *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void Semaphore_reset(SIE_Semaphore *p); + SIGN32 Semaphore_cmp (SIE_Semaphore *p, SIE_Semaphore *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define Semaphore_check(p,pie,pfx,hLOG) Semaphore_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define Semaphore_print(p, pfx,hLOG) Semaphore_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: Semaphore +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaQuery (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 RESP (R-) +/// %unsigned 16 CNT +/// ### +/// * Semaphore counter level +/// ### +/// %unsigned 16 PTR +/// ### +/// * Semaphore pointer: +/// * producer-wptr or consumer-rptr +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 32b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaQuery +#define h_SemaQuery (){} + + #define RA_SemaQuery_RESP 0x0000 + + #define BA_SemaQuery_RESP_CNT 0x0000 + #define B16SemaQuery_RESP_CNT 0x0000 + #define LSb32SemaQuery_RESP_CNT 0 + #define LSb16SemaQuery_RESP_CNT 0 + #define bSemaQuery_RESP_CNT 16 + #define MSK32SemaQuery_RESP_CNT 0x0000FFFF + + #define BA_SemaQuery_RESP_PTR 0x0002 + #define B16SemaQuery_RESP_PTR 0x0002 + #define LSb32SemaQuery_RESP_PTR 16 + #define LSb16SemaQuery_RESP_PTR 0 + #define bSemaQuery_RESP_PTR 16 + #define MSK32SemaQuery_RESP_PTR 0xFFFF0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaQuery { + /////////////////////////////////////////////////////////// + #define GET32SemaQuery_RESP_CNT(r32) _BFGET_(r32,15, 0) + #define SET32SemaQuery_RESP_CNT(r32,v) _BFSET_(r32,15, 0,v) + #define GET16SemaQuery_RESP_CNT(r16) _BFGET_(r16,15, 0) + #define SET16SemaQuery_RESP_CNT(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32SemaQuery_RESP_PTR(r32) _BFGET_(r32,31,16) + #define SET32SemaQuery_RESP_PTR(r32,v) _BFSET_(r32,31,16,v) + #define GET16SemaQuery_RESP_PTR(r16) _BFGET_(r16,15, 0) + #define SET16SemaQuery_RESP_PTR(r16,v) _BFSET_(r16,15, 0,v) + + #define w32SemaQuery_RESP {\ + UNSG32 uRESP_CNT : 16;\ + UNSG32 uRESP_PTR : 16;\ + } + union { UNSG32 u32SemaQuery_RESP; + struct w32SemaQuery_RESP; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaQuery; + + typedef union T32SemaQuery_RESP + { UNSG32 u32; + struct w32SemaQuery_RESP; + } T32SemaQuery_RESP; + /////////////////////////////////////////////////////////// + + typedef union TSemaQuery_RESP + { UNSG32 u32[1]; + struct { + struct w32SemaQuery_RESP; + }; + } TSemaQuery_RESP; + + /////////////////////////////////////////////////////////// + SIGN32 SemaQuery_drvrd(SIE_SemaQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaQuery_drvwr(SIE_SemaQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaQuery_reset(SIE_SemaQuery *p); + SIGN32 SemaQuery_cmp (SIE_SemaQuery *p, SIE_SemaQuery *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaQuery_check(p,pie,pfx,hLOG) SemaQuery_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaQuery_print(p, pfx,hLOG) SemaQuery_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaQuery +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaQueryMap (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 ADDR (P) +/// %unsigned 2 byte +/// %unsigned 5 ID +/// ### +/// * Semaphore cell index +/// ### +/// %unsigned 1 master +/// : producer 0x0 +/// : consumer 0x1 +/// ### +/// * Select which counter to read +/// ### +/// %% 24 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 8b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaQueryMap +#define h_SemaQueryMap (){} + + #define RA_SemaQueryMap_ADDR 0x0000 + + #define BA_SemaQueryMap_ADDR_byte 0x0000 + #define B16SemaQueryMap_ADDR_byte 0x0000 + #define LSb32SemaQueryMap_ADDR_byte 0 + #define LSb16SemaQueryMap_ADDR_byte 0 + #define bSemaQueryMap_ADDR_byte 2 + #define MSK32SemaQueryMap_ADDR_byte 0x00000003 + + #define BA_SemaQueryMap_ADDR_ID 0x0000 + #define B16SemaQueryMap_ADDR_ID 0x0000 + #define LSb32SemaQueryMap_ADDR_ID 2 + #define LSb16SemaQueryMap_ADDR_ID 2 + #define bSemaQueryMap_ADDR_ID 5 + #define MSK32SemaQueryMap_ADDR_ID 0x0000007C + + #define BA_SemaQueryMap_ADDR_master 0x0000 + #define B16SemaQueryMap_ADDR_master 0x0000 + #define LSb32SemaQueryMap_ADDR_master 7 + #define LSb16SemaQueryMap_ADDR_master 7 + #define bSemaQueryMap_ADDR_master 1 + #define MSK32SemaQueryMap_ADDR_master 0x00000080 + #define SemaQueryMap_ADDR_master_producer 0x0 + #define SemaQueryMap_ADDR_master_consumer 0x1 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaQueryMap { + /////////////////////////////////////////////////////////// + #define GET32SemaQueryMap_ADDR_byte(r32) _BFGET_(r32, 1, 0) + #define SET32SemaQueryMap_ADDR_byte(r32,v) _BFSET_(r32, 1, 0,v) + #define GET16SemaQueryMap_ADDR_byte(r16) _BFGET_(r16, 1, 0) + #define SET16SemaQueryMap_ADDR_byte(r16,v) _BFSET_(r16, 1, 0,v) + + #define GET32SemaQueryMap_ADDR_ID(r32) _BFGET_(r32, 6, 2) + #define SET32SemaQueryMap_ADDR_ID(r32,v) _BFSET_(r32, 6, 2,v) + #define GET16SemaQueryMap_ADDR_ID(r16) _BFGET_(r16, 6, 2) + #define SET16SemaQueryMap_ADDR_ID(r16,v) _BFSET_(r16, 6, 2,v) + + #define GET32SemaQueryMap_ADDR_master(r32) _BFGET_(r32, 7, 7) + #define SET32SemaQueryMap_ADDR_master(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaQueryMap_ADDR_master(r16) _BFGET_(r16, 7, 7) + #define SET16SemaQueryMap_ADDR_master(r16,v) _BFSET_(r16, 7, 7,v) + + #define w32SemaQueryMap_ADDR {\ + UNSG32 uADDR_byte : 2;\ + UNSG32 uADDR_ID : 5;\ + UNSG32 uADDR_master : 1;\ + UNSG32 RSVDx0_b8 : 24;\ + } + union { UNSG32 u32SemaQueryMap_ADDR; + struct w32SemaQueryMap_ADDR; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaQueryMap; + + typedef union T32SemaQueryMap_ADDR + { UNSG32 u32; + struct w32SemaQueryMap_ADDR; + } T32SemaQueryMap_ADDR; + /////////////////////////////////////////////////////////// + + typedef union TSemaQueryMap_ADDR + { UNSG32 u32[1]; + struct { + struct w32SemaQueryMap_ADDR; + }; + } TSemaQueryMap_ADDR; + + /////////////////////////////////////////////////////////// + SIGN32 SemaQueryMap_drvrd(SIE_SemaQueryMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaQueryMap_drvwr(SIE_SemaQueryMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaQueryMap_reset(SIE_SemaQueryMap *p); + SIGN32 SemaQueryMap_cmp (SIE_SemaQueryMap *p, SIE_SemaQueryMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaQueryMap_check(p,pie,pfx,hLOG) SemaQueryMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaQueryMap_print(p, pfx,hLOG) SemaQueryMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaQueryMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaHub biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 Query (R-) +/// # 0x00000 counter +/// $SemaQuery counter MEM [64] +/// ### +/// * Access address as defined above +/// ### +/// @ 0x00100 ARR (P) +/// # 0x00100 cell +/// $Semaphore cell REG [32] +/// ### +/// * Up-to 32 semaphore cells +/// ### +/// @ 0x00380 PUSH (W-) +/// %unsigned 8 ID +/// %unsigned 8 delta +/// ### +/// * CPU increases PCounter by delta (0 as push 256) +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00384 POP (W-) +/// %unsigned 8 ID +/// %unsigned 8 delta +/// ### +/// * CPU decreases CCounter by delta (0 as pop 256) +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00388 empty (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'empty' status +/// ### +/// @ 0x0038C full (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'full' status +/// ### +/// @ 0x00390 almostEmpty (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'almostEmpty' status +/// ### +/// @ 0x00394 almostFull (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'almostFull' status +/// ### +/// @ 0x00398 (W-) +/// # # Stuffing bytes... +/// %% 832 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 1024B, bits: 1152b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaHub +#define h_SemaHub (){} + + #define RA_SemaHub_Query 0x0000 + #define RA_SemaHub_counter 0x0000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_ARR 0x0100 + #define RA_SemaHub_cell 0x0100 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_PUSH 0x0380 + + #define BA_SemaHub_PUSH_ID 0x0380 + #define B16SemaHub_PUSH_ID 0x0380 + #define LSb32SemaHub_PUSH_ID 0 + #define LSb16SemaHub_PUSH_ID 0 + #define bSemaHub_PUSH_ID 8 + #define MSK32SemaHub_PUSH_ID 0x000000FF + + #define BA_SemaHub_PUSH_delta 0x0381 + #define B16SemaHub_PUSH_delta 0x0380 + #define LSb32SemaHub_PUSH_delta 8 + #define LSb16SemaHub_PUSH_delta 8 + #define bSemaHub_PUSH_delta 8 + #define MSK32SemaHub_PUSH_delta 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_POP 0x0384 + + #define BA_SemaHub_POP_ID 0x0384 + #define B16SemaHub_POP_ID 0x0384 + #define LSb32SemaHub_POP_ID 0 + #define LSb16SemaHub_POP_ID 0 + #define bSemaHub_POP_ID 8 + #define MSK32SemaHub_POP_ID 0x000000FF + + #define BA_SemaHub_POP_delta 0x0385 + #define B16SemaHub_POP_delta 0x0384 + #define LSb32SemaHub_POP_delta 8 + #define LSb16SemaHub_POP_delta 8 + #define bSemaHub_POP_delta 8 + #define MSK32SemaHub_POP_delta 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_empty 0x0388 + + #define BA_SemaHub_empty_ST_0i 0x0388 + #define B16SemaHub_empty_ST_0i 0x0388 + #define LSb32SemaHub_empty_ST_0i 0 + #define LSb16SemaHub_empty_ST_0i 0 + #define bSemaHub_empty_ST_0i 1 + #define MSK32SemaHub_empty_ST_0i 0x00000001 + + #define BA_SemaHub_empty_ST_1i 0x0388 + #define B16SemaHub_empty_ST_1i 0x0388 + #define LSb32SemaHub_empty_ST_1i 1 + #define LSb16SemaHub_empty_ST_1i 1 + #define bSemaHub_empty_ST_1i 1 + #define MSK32SemaHub_empty_ST_1i 0x00000002 + + #define BA_SemaHub_empty_ST_2i 0x0388 + #define B16SemaHub_empty_ST_2i 0x0388 + #define LSb32SemaHub_empty_ST_2i 2 + #define LSb16SemaHub_empty_ST_2i 2 + #define bSemaHub_empty_ST_2i 1 + #define MSK32SemaHub_empty_ST_2i 0x00000004 + + #define BA_SemaHub_empty_ST_3i 0x0388 + #define B16SemaHub_empty_ST_3i 0x0388 + #define LSb32SemaHub_empty_ST_3i 3 + #define LSb16SemaHub_empty_ST_3i 3 + #define bSemaHub_empty_ST_3i 1 + #define MSK32SemaHub_empty_ST_3i 0x00000008 + + #define BA_SemaHub_empty_ST_4i 0x0388 + #define B16SemaHub_empty_ST_4i 0x0388 + #define LSb32SemaHub_empty_ST_4i 4 + #define LSb16SemaHub_empty_ST_4i 4 + #define bSemaHub_empty_ST_4i 1 + #define MSK32SemaHub_empty_ST_4i 0x00000010 + + #define BA_SemaHub_empty_ST_5i 0x0388 + #define B16SemaHub_empty_ST_5i 0x0388 + #define LSb32SemaHub_empty_ST_5i 5 + #define LSb16SemaHub_empty_ST_5i 5 + #define bSemaHub_empty_ST_5i 1 + #define MSK32SemaHub_empty_ST_5i 0x00000020 + + #define BA_SemaHub_empty_ST_6i 0x0388 + #define B16SemaHub_empty_ST_6i 0x0388 + #define LSb32SemaHub_empty_ST_6i 6 + #define LSb16SemaHub_empty_ST_6i 6 + #define bSemaHub_empty_ST_6i 1 + #define MSK32SemaHub_empty_ST_6i 0x00000040 + + #define BA_SemaHub_empty_ST_7i 0x0388 + #define B16SemaHub_empty_ST_7i 0x0388 + #define LSb32SemaHub_empty_ST_7i 7 + #define LSb16SemaHub_empty_ST_7i 7 + #define bSemaHub_empty_ST_7i 1 + #define MSK32SemaHub_empty_ST_7i 0x00000080 + + #define BA_SemaHub_empty_ST_8i 0x0389 + #define B16SemaHub_empty_ST_8i 0x0388 + #define LSb32SemaHub_empty_ST_8i 8 + #define LSb16SemaHub_empty_ST_8i 8 + #define bSemaHub_empty_ST_8i 1 + #define MSK32SemaHub_empty_ST_8i 0x00000100 + + #define BA_SemaHub_empty_ST_9i 0x0389 + #define B16SemaHub_empty_ST_9i 0x0388 + #define LSb32SemaHub_empty_ST_9i 9 + #define LSb16SemaHub_empty_ST_9i 9 + #define bSemaHub_empty_ST_9i 1 + #define MSK32SemaHub_empty_ST_9i 0x00000200 + + #define BA_SemaHub_empty_ST_10i 0x0389 + #define B16SemaHub_empty_ST_10i 0x0388 + #define LSb32SemaHub_empty_ST_10i 10 + #define LSb16SemaHub_empty_ST_10i 10 + #define bSemaHub_empty_ST_10i 1 + #define MSK32SemaHub_empty_ST_10i 0x00000400 + + #define BA_SemaHub_empty_ST_11i 0x0389 + #define B16SemaHub_empty_ST_11i 0x0388 + #define LSb32SemaHub_empty_ST_11i 11 + #define LSb16SemaHub_empty_ST_11i 11 + #define bSemaHub_empty_ST_11i 1 + #define MSK32SemaHub_empty_ST_11i 0x00000800 + + #define BA_SemaHub_empty_ST_12i 0x0389 + #define B16SemaHub_empty_ST_12i 0x0388 + #define LSb32SemaHub_empty_ST_12i 12 + #define LSb16SemaHub_empty_ST_12i 12 + #define bSemaHub_empty_ST_12i 1 + #define MSK32SemaHub_empty_ST_12i 0x00001000 + + #define BA_SemaHub_empty_ST_13i 0x0389 + #define B16SemaHub_empty_ST_13i 0x0388 + #define LSb32SemaHub_empty_ST_13i 13 + #define LSb16SemaHub_empty_ST_13i 13 + #define bSemaHub_empty_ST_13i 1 + #define MSK32SemaHub_empty_ST_13i 0x00002000 + + #define BA_SemaHub_empty_ST_14i 0x0389 + #define B16SemaHub_empty_ST_14i 0x0388 + #define LSb32SemaHub_empty_ST_14i 14 + #define LSb16SemaHub_empty_ST_14i 14 + #define bSemaHub_empty_ST_14i 1 + #define MSK32SemaHub_empty_ST_14i 0x00004000 + + #define BA_SemaHub_empty_ST_15i 0x0389 + #define B16SemaHub_empty_ST_15i 0x0388 + #define LSb32SemaHub_empty_ST_15i 15 + #define LSb16SemaHub_empty_ST_15i 15 + #define bSemaHub_empty_ST_15i 1 + #define MSK32SemaHub_empty_ST_15i 0x00008000 + + #define BA_SemaHub_empty_ST_16i 0x038A + #define B16SemaHub_empty_ST_16i 0x038A + #define LSb32SemaHub_empty_ST_16i 16 + #define LSb16SemaHub_empty_ST_16i 0 + #define bSemaHub_empty_ST_16i 1 + #define MSK32SemaHub_empty_ST_16i 0x00010000 + + #define BA_SemaHub_empty_ST_17i 0x038A + #define B16SemaHub_empty_ST_17i 0x038A + #define LSb32SemaHub_empty_ST_17i 17 + #define LSb16SemaHub_empty_ST_17i 1 + #define bSemaHub_empty_ST_17i 1 + #define MSK32SemaHub_empty_ST_17i 0x00020000 + + #define BA_SemaHub_empty_ST_18i 0x038A + #define B16SemaHub_empty_ST_18i 0x038A + #define LSb32SemaHub_empty_ST_18i 18 + #define LSb16SemaHub_empty_ST_18i 2 + #define bSemaHub_empty_ST_18i 1 + #define MSK32SemaHub_empty_ST_18i 0x00040000 + + #define BA_SemaHub_empty_ST_19i 0x038A + #define B16SemaHub_empty_ST_19i 0x038A + #define LSb32SemaHub_empty_ST_19i 19 + #define LSb16SemaHub_empty_ST_19i 3 + #define bSemaHub_empty_ST_19i 1 + #define MSK32SemaHub_empty_ST_19i 0x00080000 + + #define BA_SemaHub_empty_ST_20i 0x038A + #define B16SemaHub_empty_ST_20i 0x038A + #define LSb32SemaHub_empty_ST_20i 20 + #define LSb16SemaHub_empty_ST_20i 4 + #define bSemaHub_empty_ST_20i 1 + #define MSK32SemaHub_empty_ST_20i 0x00100000 + + #define BA_SemaHub_empty_ST_21i 0x038A + #define B16SemaHub_empty_ST_21i 0x038A + #define LSb32SemaHub_empty_ST_21i 21 + #define LSb16SemaHub_empty_ST_21i 5 + #define bSemaHub_empty_ST_21i 1 + #define MSK32SemaHub_empty_ST_21i 0x00200000 + + #define BA_SemaHub_empty_ST_22i 0x038A + #define B16SemaHub_empty_ST_22i 0x038A + #define LSb32SemaHub_empty_ST_22i 22 + #define LSb16SemaHub_empty_ST_22i 6 + #define bSemaHub_empty_ST_22i 1 + #define MSK32SemaHub_empty_ST_22i 0x00400000 + + #define BA_SemaHub_empty_ST_23i 0x038A + #define B16SemaHub_empty_ST_23i 0x038A + #define LSb32SemaHub_empty_ST_23i 23 + #define LSb16SemaHub_empty_ST_23i 7 + #define bSemaHub_empty_ST_23i 1 + #define MSK32SemaHub_empty_ST_23i 0x00800000 + + #define BA_SemaHub_empty_ST_24i 0x038B + #define B16SemaHub_empty_ST_24i 0x038A + #define LSb32SemaHub_empty_ST_24i 24 + #define LSb16SemaHub_empty_ST_24i 8 + #define bSemaHub_empty_ST_24i 1 + #define MSK32SemaHub_empty_ST_24i 0x01000000 + + #define BA_SemaHub_empty_ST_25i 0x038B + #define B16SemaHub_empty_ST_25i 0x038A + #define LSb32SemaHub_empty_ST_25i 25 + #define LSb16SemaHub_empty_ST_25i 9 + #define bSemaHub_empty_ST_25i 1 + #define MSK32SemaHub_empty_ST_25i 0x02000000 + + #define BA_SemaHub_empty_ST_26i 0x038B + #define B16SemaHub_empty_ST_26i 0x038A + #define LSb32SemaHub_empty_ST_26i 26 + #define LSb16SemaHub_empty_ST_26i 10 + #define bSemaHub_empty_ST_26i 1 + #define MSK32SemaHub_empty_ST_26i 0x04000000 + + #define BA_SemaHub_empty_ST_27i 0x038B + #define B16SemaHub_empty_ST_27i 0x038A + #define LSb32SemaHub_empty_ST_27i 27 + #define LSb16SemaHub_empty_ST_27i 11 + #define bSemaHub_empty_ST_27i 1 + #define MSK32SemaHub_empty_ST_27i 0x08000000 + + #define BA_SemaHub_empty_ST_28i 0x038B + #define B16SemaHub_empty_ST_28i 0x038A + #define LSb32SemaHub_empty_ST_28i 28 + #define LSb16SemaHub_empty_ST_28i 12 + #define bSemaHub_empty_ST_28i 1 + #define MSK32SemaHub_empty_ST_28i 0x10000000 + + #define BA_SemaHub_empty_ST_29i 0x038B + #define B16SemaHub_empty_ST_29i 0x038A + #define LSb32SemaHub_empty_ST_29i 29 + #define LSb16SemaHub_empty_ST_29i 13 + #define bSemaHub_empty_ST_29i 1 + #define MSK32SemaHub_empty_ST_29i 0x20000000 + + #define BA_SemaHub_empty_ST_30i 0x038B + #define B16SemaHub_empty_ST_30i 0x038A + #define LSb32SemaHub_empty_ST_30i 30 + #define LSb16SemaHub_empty_ST_30i 14 + #define bSemaHub_empty_ST_30i 1 + #define MSK32SemaHub_empty_ST_30i 0x40000000 + + #define BA_SemaHub_empty_ST_31i 0x038B + #define B16SemaHub_empty_ST_31i 0x038A + #define LSb32SemaHub_empty_ST_31i 31 + #define LSb16SemaHub_empty_ST_31i 15 + #define bSemaHub_empty_ST_31i 1 + #define MSK32SemaHub_empty_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_full 0x038C + + #define BA_SemaHub_full_ST_0i 0x038C + #define B16SemaHub_full_ST_0i 0x038C + #define LSb32SemaHub_full_ST_0i 0 + #define LSb16SemaHub_full_ST_0i 0 + #define bSemaHub_full_ST_0i 1 + #define MSK32SemaHub_full_ST_0i 0x00000001 + + #define BA_SemaHub_full_ST_1i 0x038C + #define B16SemaHub_full_ST_1i 0x038C + #define LSb32SemaHub_full_ST_1i 1 + #define LSb16SemaHub_full_ST_1i 1 + #define bSemaHub_full_ST_1i 1 + #define MSK32SemaHub_full_ST_1i 0x00000002 + + #define BA_SemaHub_full_ST_2i 0x038C + #define B16SemaHub_full_ST_2i 0x038C + #define LSb32SemaHub_full_ST_2i 2 + #define LSb16SemaHub_full_ST_2i 2 + #define bSemaHub_full_ST_2i 1 + #define MSK32SemaHub_full_ST_2i 0x00000004 + + #define BA_SemaHub_full_ST_3i 0x038C + #define B16SemaHub_full_ST_3i 0x038C + #define LSb32SemaHub_full_ST_3i 3 + #define LSb16SemaHub_full_ST_3i 3 + #define bSemaHub_full_ST_3i 1 + #define MSK32SemaHub_full_ST_3i 0x00000008 + + #define BA_SemaHub_full_ST_4i 0x038C + #define B16SemaHub_full_ST_4i 0x038C + #define LSb32SemaHub_full_ST_4i 4 + #define LSb16SemaHub_full_ST_4i 4 + #define bSemaHub_full_ST_4i 1 + #define MSK32SemaHub_full_ST_4i 0x00000010 + + #define BA_SemaHub_full_ST_5i 0x038C + #define B16SemaHub_full_ST_5i 0x038C + #define LSb32SemaHub_full_ST_5i 5 + #define LSb16SemaHub_full_ST_5i 5 + #define bSemaHub_full_ST_5i 1 + #define MSK32SemaHub_full_ST_5i 0x00000020 + + #define BA_SemaHub_full_ST_6i 0x038C + #define B16SemaHub_full_ST_6i 0x038C + #define LSb32SemaHub_full_ST_6i 6 + #define LSb16SemaHub_full_ST_6i 6 + #define bSemaHub_full_ST_6i 1 + #define MSK32SemaHub_full_ST_6i 0x00000040 + + #define BA_SemaHub_full_ST_7i 0x038C + #define B16SemaHub_full_ST_7i 0x038C + #define LSb32SemaHub_full_ST_7i 7 + #define LSb16SemaHub_full_ST_7i 7 + #define bSemaHub_full_ST_7i 1 + #define MSK32SemaHub_full_ST_7i 0x00000080 + + #define BA_SemaHub_full_ST_8i 0x038D + #define B16SemaHub_full_ST_8i 0x038C + #define LSb32SemaHub_full_ST_8i 8 + #define LSb16SemaHub_full_ST_8i 8 + #define bSemaHub_full_ST_8i 1 + #define MSK32SemaHub_full_ST_8i 0x00000100 + + #define BA_SemaHub_full_ST_9i 0x038D + #define B16SemaHub_full_ST_9i 0x038C + #define LSb32SemaHub_full_ST_9i 9 + #define LSb16SemaHub_full_ST_9i 9 + #define bSemaHub_full_ST_9i 1 + #define MSK32SemaHub_full_ST_9i 0x00000200 + + #define BA_SemaHub_full_ST_10i 0x038D + #define B16SemaHub_full_ST_10i 0x038C + #define LSb32SemaHub_full_ST_10i 10 + #define LSb16SemaHub_full_ST_10i 10 + #define bSemaHub_full_ST_10i 1 + #define MSK32SemaHub_full_ST_10i 0x00000400 + + #define BA_SemaHub_full_ST_11i 0x038D + #define B16SemaHub_full_ST_11i 0x038C + #define LSb32SemaHub_full_ST_11i 11 + #define LSb16SemaHub_full_ST_11i 11 + #define bSemaHub_full_ST_11i 1 + #define MSK32SemaHub_full_ST_11i 0x00000800 + + #define BA_SemaHub_full_ST_12i 0x038D + #define B16SemaHub_full_ST_12i 0x038C + #define LSb32SemaHub_full_ST_12i 12 + #define LSb16SemaHub_full_ST_12i 12 + #define bSemaHub_full_ST_12i 1 + #define MSK32SemaHub_full_ST_12i 0x00001000 + + #define BA_SemaHub_full_ST_13i 0x038D + #define B16SemaHub_full_ST_13i 0x038C + #define LSb32SemaHub_full_ST_13i 13 + #define LSb16SemaHub_full_ST_13i 13 + #define bSemaHub_full_ST_13i 1 + #define MSK32SemaHub_full_ST_13i 0x00002000 + + #define BA_SemaHub_full_ST_14i 0x038D + #define B16SemaHub_full_ST_14i 0x038C + #define LSb32SemaHub_full_ST_14i 14 + #define LSb16SemaHub_full_ST_14i 14 + #define bSemaHub_full_ST_14i 1 + #define MSK32SemaHub_full_ST_14i 0x00004000 + + #define BA_SemaHub_full_ST_15i 0x038D + #define B16SemaHub_full_ST_15i 0x038C + #define LSb32SemaHub_full_ST_15i 15 + #define LSb16SemaHub_full_ST_15i 15 + #define bSemaHub_full_ST_15i 1 + #define MSK32SemaHub_full_ST_15i 0x00008000 + + #define BA_SemaHub_full_ST_16i 0x038E + #define B16SemaHub_full_ST_16i 0x038E + #define LSb32SemaHub_full_ST_16i 16 + #define LSb16SemaHub_full_ST_16i 0 + #define bSemaHub_full_ST_16i 1 + #define MSK32SemaHub_full_ST_16i 0x00010000 + + #define BA_SemaHub_full_ST_17i 0x038E + #define B16SemaHub_full_ST_17i 0x038E + #define LSb32SemaHub_full_ST_17i 17 + #define LSb16SemaHub_full_ST_17i 1 + #define bSemaHub_full_ST_17i 1 + #define MSK32SemaHub_full_ST_17i 0x00020000 + + #define BA_SemaHub_full_ST_18i 0x038E + #define B16SemaHub_full_ST_18i 0x038E + #define LSb32SemaHub_full_ST_18i 18 + #define LSb16SemaHub_full_ST_18i 2 + #define bSemaHub_full_ST_18i 1 + #define MSK32SemaHub_full_ST_18i 0x00040000 + + #define BA_SemaHub_full_ST_19i 0x038E + #define B16SemaHub_full_ST_19i 0x038E + #define LSb32SemaHub_full_ST_19i 19 + #define LSb16SemaHub_full_ST_19i 3 + #define bSemaHub_full_ST_19i 1 + #define MSK32SemaHub_full_ST_19i 0x00080000 + + #define BA_SemaHub_full_ST_20i 0x038E + #define B16SemaHub_full_ST_20i 0x038E + #define LSb32SemaHub_full_ST_20i 20 + #define LSb16SemaHub_full_ST_20i 4 + #define bSemaHub_full_ST_20i 1 + #define MSK32SemaHub_full_ST_20i 0x00100000 + + #define BA_SemaHub_full_ST_21i 0x038E + #define B16SemaHub_full_ST_21i 0x038E + #define LSb32SemaHub_full_ST_21i 21 + #define LSb16SemaHub_full_ST_21i 5 + #define bSemaHub_full_ST_21i 1 + #define MSK32SemaHub_full_ST_21i 0x00200000 + + #define BA_SemaHub_full_ST_22i 0x038E + #define B16SemaHub_full_ST_22i 0x038E + #define LSb32SemaHub_full_ST_22i 22 + #define LSb16SemaHub_full_ST_22i 6 + #define bSemaHub_full_ST_22i 1 + #define MSK32SemaHub_full_ST_22i 0x00400000 + + #define BA_SemaHub_full_ST_23i 0x038E + #define B16SemaHub_full_ST_23i 0x038E + #define LSb32SemaHub_full_ST_23i 23 + #define LSb16SemaHub_full_ST_23i 7 + #define bSemaHub_full_ST_23i 1 + #define MSK32SemaHub_full_ST_23i 0x00800000 + + #define BA_SemaHub_full_ST_24i 0x038F + #define B16SemaHub_full_ST_24i 0x038E + #define LSb32SemaHub_full_ST_24i 24 + #define LSb16SemaHub_full_ST_24i 8 + #define bSemaHub_full_ST_24i 1 + #define MSK32SemaHub_full_ST_24i 0x01000000 + + #define BA_SemaHub_full_ST_25i 0x038F + #define B16SemaHub_full_ST_25i 0x038E + #define LSb32SemaHub_full_ST_25i 25 + #define LSb16SemaHub_full_ST_25i 9 + #define bSemaHub_full_ST_25i 1 + #define MSK32SemaHub_full_ST_25i 0x02000000 + + #define BA_SemaHub_full_ST_26i 0x038F + #define B16SemaHub_full_ST_26i 0x038E + #define LSb32SemaHub_full_ST_26i 26 + #define LSb16SemaHub_full_ST_26i 10 + #define bSemaHub_full_ST_26i 1 + #define MSK32SemaHub_full_ST_26i 0x04000000 + + #define BA_SemaHub_full_ST_27i 0x038F + #define B16SemaHub_full_ST_27i 0x038E + #define LSb32SemaHub_full_ST_27i 27 + #define LSb16SemaHub_full_ST_27i 11 + #define bSemaHub_full_ST_27i 1 + #define MSK32SemaHub_full_ST_27i 0x08000000 + + #define BA_SemaHub_full_ST_28i 0x038F + #define B16SemaHub_full_ST_28i 0x038E + #define LSb32SemaHub_full_ST_28i 28 + #define LSb16SemaHub_full_ST_28i 12 + #define bSemaHub_full_ST_28i 1 + #define MSK32SemaHub_full_ST_28i 0x10000000 + + #define BA_SemaHub_full_ST_29i 0x038F + #define B16SemaHub_full_ST_29i 0x038E + #define LSb32SemaHub_full_ST_29i 29 + #define LSb16SemaHub_full_ST_29i 13 + #define bSemaHub_full_ST_29i 1 + #define MSK32SemaHub_full_ST_29i 0x20000000 + + #define BA_SemaHub_full_ST_30i 0x038F + #define B16SemaHub_full_ST_30i 0x038E + #define LSb32SemaHub_full_ST_30i 30 + #define LSb16SemaHub_full_ST_30i 14 + #define bSemaHub_full_ST_30i 1 + #define MSK32SemaHub_full_ST_30i 0x40000000 + + #define BA_SemaHub_full_ST_31i 0x038F + #define B16SemaHub_full_ST_31i 0x038E + #define LSb32SemaHub_full_ST_31i 31 + #define LSb16SemaHub_full_ST_31i 15 + #define bSemaHub_full_ST_31i 1 + #define MSK32SemaHub_full_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_almostEmpty 0x0390 + + #define BA_SemaHub_almostEmpty_ST_0i 0x0390 + #define B16SemaHub_almostEmpty_ST_0i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_0i 0 + #define LSb16SemaHub_almostEmpty_ST_0i 0 + #define bSemaHub_almostEmpty_ST_0i 1 + #define MSK32SemaHub_almostEmpty_ST_0i 0x00000001 + + #define BA_SemaHub_almostEmpty_ST_1i 0x0390 + #define B16SemaHub_almostEmpty_ST_1i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_1i 1 + #define LSb16SemaHub_almostEmpty_ST_1i 1 + #define bSemaHub_almostEmpty_ST_1i 1 + #define MSK32SemaHub_almostEmpty_ST_1i 0x00000002 + + #define BA_SemaHub_almostEmpty_ST_2i 0x0390 + #define B16SemaHub_almostEmpty_ST_2i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_2i 2 + #define LSb16SemaHub_almostEmpty_ST_2i 2 + #define bSemaHub_almostEmpty_ST_2i 1 + #define MSK32SemaHub_almostEmpty_ST_2i 0x00000004 + + #define BA_SemaHub_almostEmpty_ST_3i 0x0390 + #define B16SemaHub_almostEmpty_ST_3i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_3i 3 + #define LSb16SemaHub_almostEmpty_ST_3i 3 + #define bSemaHub_almostEmpty_ST_3i 1 + #define MSK32SemaHub_almostEmpty_ST_3i 0x00000008 + + #define BA_SemaHub_almostEmpty_ST_4i 0x0390 + #define B16SemaHub_almostEmpty_ST_4i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_4i 4 + #define LSb16SemaHub_almostEmpty_ST_4i 4 + #define bSemaHub_almostEmpty_ST_4i 1 + #define MSK32SemaHub_almostEmpty_ST_4i 0x00000010 + + #define BA_SemaHub_almostEmpty_ST_5i 0x0390 + #define B16SemaHub_almostEmpty_ST_5i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_5i 5 + #define LSb16SemaHub_almostEmpty_ST_5i 5 + #define bSemaHub_almostEmpty_ST_5i 1 + #define MSK32SemaHub_almostEmpty_ST_5i 0x00000020 + + #define BA_SemaHub_almostEmpty_ST_6i 0x0390 + #define B16SemaHub_almostEmpty_ST_6i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_6i 6 + #define LSb16SemaHub_almostEmpty_ST_6i 6 + #define bSemaHub_almostEmpty_ST_6i 1 + #define MSK32SemaHub_almostEmpty_ST_6i 0x00000040 + + #define BA_SemaHub_almostEmpty_ST_7i 0x0390 + #define B16SemaHub_almostEmpty_ST_7i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_7i 7 + #define LSb16SemaHub_almostEmpty_ST_7i 7 + #define bSemaHub_almostEmpty_ST_7i 1 + #define MSK32SemaHub_almostEmpty_ST_7i 0x00000080 + + #define BA_SemaHub_almostEmpty_ST_8i 0x0391 + #define B16SemaHub_almostEmpty_ST_8i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_8i 8 + #define LSb16SemaHub_almostEmpty_ST_8i 8 + #define bSemaHub_almostEmpty_ST_8i 1 + #define MSK32SemaHub_almostEmpty_ST_8i 0x00000100 + + #define BA_SemaHub_almostEmpty_ST_9i 0x0391 + #define B16SemaHub_almostEmpty_ST_9i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_9i 9 + #define LSb16SemaHub_almostEmpty_ST_9i 9 + #define bSemaHub_almostEmpty_ST_9i 1 + #define MSK32SemaHub_almostEmpty_ST_9i 0x00000200 + + #define BA_SemaHub_almostEmpty_ST_10i 0x0391 + #define B16SemaHub_almostEmpty_ST_10i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_10i 10 + #define LSb16SemaHub_almostEmpty_ST_10i 10 + #define bSemaHub_almostEmpty_ST_10i 1 + #define MSK32SemaHub_almostEmpty_ST_10i 0x00000400 + + #define BA_SemaHub_almostEmpty_ST_11i 0x0391 + #define B16SemaHub_almostEmpty_ST_11i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_11i 11 + #define LSb16SemaHub_almostEmpty_ST_11i 11 + #define bSemaHub_almostEmpty_ST_11i 1 + #define MSK32SemaHub_almostEmpty_ST_11i 0x00000800 + + #define BA_SemaHub_almostEmpty_ST_12i 0x0391 + #define B16SemaHub_almostEmpty_ST_12i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_12i 12 + #define LSb16SemaHub_almostEmpty_ST_12i 12 + #define bSemaHub_almostEmpty_ST_12i 1 + #define MSK32SemaHub_almostEmpty_ST_12i 0x00001000 + + #define BA_SemaHub_almostEmpty_ST_13i 0x0391 + #define B16SemaHub_almostEmpty_ST_13i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_13i 13 + #define LSb16SemaHub_almostEmpty_ST_13i 13 + #define bSemaHub_almostEmpty_ST_13i 1 + #define MSK32SemaHub_almostEmpty_ST_13i 0x00002000 + + #define BA_SemaHub_almostEmpty_ST_14i 0x0391 + #define B16SemaHub_almostEmpty_ST_14i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_14i 14 + #define LSb16SemaHub_almostEmpty_ST_14i 14 + #define bSemaHub_almostEmpty_ST_14i 1 + #define MSK32SemaHub_almostEmpty_ST_14i 0x00004000 + + #define BA_SemaHub_almostEmpty_ST_15i 0x0391 + #define B16SemaHub_almostEmpty_ST_15i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_15i 15 + #define LSb16SemaHub_almostEmpty_ST_15i 15 + #define bSemaHub_almostEmpty_ST_15i 1 + #define MSK32SemaHub_almostEmpty_ST_15i 0x00008000 + + #define BA_SemaHub_almostEmpty_ST_16i 0x0392 + #define B16SemaHub_almostEmpty_ST_16i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_16i 16 + #define LSb16SemaHub_almostEmpty_ST_16i 0 + #define bSemaHub_almostEmpty_ST_16i 1 + #define MSK32SemaHub_almostEmpty_ST_16i 0x00010000 + + #define BA_SemaHub_almostEmpty_ST_17i 0x0392 + #define B16SemaHub_almostEmpty_ST_17i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_17i 17 + #define LSb16SemaHub_almostEmpty_ST_17i 1 + #define bSemaHub_almostEmpty_ST_17i 1 + #define MSK32SemaHub_almostEmpty_ST_17i 0x00020000 + + #define BA_SemaHub_almostEmpty_ST_18i 0x0392 + #define B16SemaHub_almostEmpty_ST_18i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_18i 18 + #define LSb16SemaHub_almostEmpty_ST_18i 2 + #define bSemaHub_almostEmpty_ST_18i 1 + #define MSK32SemaHub_almostEmpty_ST_18i 0x00040000 + + #define BA_SemaHub_almostEmpty_ST_19i 0x0392 + #define B16SemaHub_almostEmpty_ST_19i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_19i 19 + #define LSb16SemaHub_almostEmpty_ST_19i 3 + #define bSemaHub_almostEmpty_ST_19i 1 + #define MSK32SemaHub_almostEmpty_ST_19i 0x00080000 + + #define BA_SemaHub_almostEmpty_ST_20i 0x0392 + #define B16SemaHub_almostEmpty_ST_20i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_20i 20 + #define LSb16SemaHub_almostEmpty_ST_20i 4 + #define bSemaHub_almostEmpty_ST_20i 1 + #define MSK32SemaHub_almostEmpty_ST_20i 0x00100000 + + #define BA_SemaHub_almostEmpty_ST_21i 0x0392 + #define B16SemaHub_almostEmpty_ST_21i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_21i 21 + #define LSb16SemaHub_almostEmpty_ST_21i 5 + #define bSemaHub_almostEmpty_ST_21i 1 + #define MSK32SemaHub_almostEmpty_ST_21i 0x00200000 + + #define BA_SemaHub_almostEmpty_ST_22i 0x0392 + #define B16SemaHub_almostEmpty_ST_22i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_22i 22 + #define LSb16SemaHub_almostEmpty_ST_22i 6 + #define bSemaHub_almostEmpty_ST_22i 1 + #define MSK32SemaHub_almostEmpty_ST_22i 0x00400000 + + #define BA_SemaHub_almostEmpty_ST_23i 0x0392 + #define B16SemaHub_almostEmpty_ST_23i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_23i 23 + #define LSb16SemaHub_almostEmpty_ST_23i 7 + #define bSemaHub_almostEmpty_ST_23i 1 + #define MSK32SemaHub_almostEmpty_ST_23i 0x00800000 + + #define BA_SemaHub_almostEmpty_ST_24i 0x0393 + #define B16SemaHub_almostEmpty_ST_24i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_24i 24 + #define LSb16SemaHub_almostEmpty_ST_24i 8 + #define bSemaHub_almostEmpty_ST_24i 1 + #define MSK32SemaHub_almostEmpty_ST_24i 0x01000000 + + #define BA_SemaHub_almostEmpty_ST_25i 0x0393 + #define B16SemaHub_almostEmpty_ST_25i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_25i 25 + #define LSb16SemaHub_almostEmpty_ST_25i 9 + #define bSemaHub_almostEmpty_ST_25i 1 + #define MSK32SemaHub_almostEmpty_ST_25i 0x02000000 + + #define BA_SemaHub_almostEmpty_ST_26i 0x0393 + #define B16SemaHub_almostEmpty_ST_26i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_26i 26 + #define LSb16SemaHub_almostEmpty_ST_26i 10 + #define bSemaHub_almostEmpty_ST_26i 1 + #define MSK32SemaHub_almostEmpty_ST_26i 0x04000000 + + #define BA_SemaHub_almostEmpty_ST_27i 0x0393 + #define B16SemaHub_almostEmpty_ST_27i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_27i 27 + #define LSb16SemaHub_almostEmpty_ST_27i 11 + #define bSemaHub_almostEmpty_ST_27i 1 + #define MSK32SemaHub_almostEmpty_ST_27i 0x08000000 + + #define BA_SemaHub_almostEmpty_ST_28i 0x0393 + #define B16SemaHub_almostEmpty_ST_28i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_28i 28 + #define LSb16SemaHub_almostEmpty_ST_28i 12 + #define bSemaHub_almostEmpty_ST_28i 1 + #define MSK32SemaHub_almostEmpty_ST_28i 0x10000000 + + #define BA_SemaHub_almostEmpty_ST_29i 0x0393 + #define B16SemaHub_almostEmpty_ST_29i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_29i 29 + #define LSb16SemaHub_almostEmpty_ST_29i 13 + #define bSemaHub_almostEmpty_ST_29i 1 + #define MSK32SemaHub_almostEmpty_ST_29i 0x20000000 + + #define BA_SemaHub_almostEmpty_ST_30i 0x0393 + #define B16SemaHub_almostEmpty_ST_30i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_30i 30 + #define LSb16SemaHub_almostEmpty_ST_30i 14 + #define bSemaHub_almostEmpty_ST_30i 1 + #define MSK32SemaHub_almostEmpty_ST_30i 0x40000000 + + #define BA_SemaHub_almostEmpty_ST_31i 0x0393 + #define B16SemaHub_almostEmpty_ST_31i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_31i 31 + #define LSb16SemaHub_almostEmpty_ST_31i 15 + #define bSemaHub_almostEmpty_ST_31i 1 + #define MSK32SemaHub_almostEmpty_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_almostFull 0x0394 + + #define BA_SemaHub_almostFull_ST_0i 0x0394 + #define B16SemaHub_almostFull_ST_0i 0x0394 + #define LSb32SemaHub_almostFull_ST_0i 0 + #define LSb16SemaHub_almostFull_ST_0i 0 + #define bSemaHub_almostFull_ST_0i 1 + #define MSK32SemaHub_almostFull_ST_0i 0x00000001 + + #define BA_SemaHub_almostFull_ST_1i 0x0394 + #define B16SemaHub_almostFull_ST_1i 0x0394 + #define LSb32SemaHub_almostFull_ST_1i 1 + #define LSb16SemaHub_almostFull_ST_1i 1 + #define bSemaHub_almostFull_ST_1i 1 + #define MSK32SemaHub_almostFull_ST_1i 0x00000002 + + #define BA_SemaHub_almostFull_ST_2i 0x0394 + #define B16SemaHub_almostFull_ST_2i 0x0394 + #define LSb32SemaHub_almostFull_ST_2i 2 + #define LSb16SemaHub_almostFull_ST_2i 2 + #define bSemaHub_almostFull_ST_2i 1 + #define MSK32SemaHub_almostFull_ST_2i 0x00000004 + + #define BA_SemaHub_almostFull_ST_3i 0x0394 + #define B16SemaHub_almostFull_ST_3i 0x0394 + #define LSb32SemaHub_almostFull_ST_3i 3 + #define LSb16SemaHub_almostFull_ST_3i 3 + #define bSemaHub_almostFull_ST_3i 1 + #define MSK32SemaHub_almostFull_ST_3i 0x00000008 + + #define BA_SemaHub_almostFull_ST_4i 0x0394 + #define B16SemaHub_almostFull_ST_4i 0x0394 + #define LSb32SemaHub_almostFull_ST_4i 4 + #define LSb16SemaHub_almostFull_ST_4i 4 + #define bSemaHub_almostFull_ST_4i 1 + #define MSK32SemaHub_almostFull_ST_4i 0x00000010 + + #define BA_SemaHub_almostFull_ST_5i 0x0394 + #define B16SemaHub_almostFull_ST_5i 0x0394 + #define LSb32SemaHub_almostFull_ST_5i 5 + #define LSb16SemaHub_almostFull_ST_5i 5 + #define bSemaHub_almostFull_ST_5i 1 + #define MSK32SemaHub_almostFull_ST_5i 0x00000020 + + #define BA_SemaHub_almostFull_ST_6i 0x0394 + #define B16SemaHub_almostFull_ST_6i 0x0394 + #define LSb32SemaHub_almostFull_ST_6i 6 + #define LSb16SemaHub_almostFull_ST_6i 6 + #define bSemaHub_almostFull_ST_6i 1 + #define MSK32SemaHub_almostFull_ST_6i 0x00000040 + + #define BA_SemaHub_almostFull_ST_7i 0x0394 + #define B16SemaHub_almostFull_ST_7i 0x0394 + #define LSb32SemaHub_almostFull_ST_7i 7 + #define LSb16SemaHub_almostFull_ST_7i 7 + #define bSemaHub_almostFull_ST_7i 1 + #define MSK32SemaHub_almostFull_ST_7i 0x00000080 + + #define BA_SemaHub_almostFull_ST_8i 0x0395 + #define B16SemaHub_almostFull_ST_8i 0x0394 + #define LSb32SemaHub_almostFull_ST_8i 8 + #define LSb16SemaHub_almostFull_ST_8i 8 + #define bSemaHub_almostFull_ST_8i 1 + #define MSK32SemaHub_almostFull_ST_8i 0x00000100 + + #define BA_SemaHub_almostFull_ST_9i 0x0395 + #define B16SemaHub_almostFull_ST_9i 0x0394 + #define LSb32SemaHub_almostFull_ST_9i 9 + #define LSb16SemaHub_almostFull_ST_9i 9 + #define bSemaHub_almostFull_ST_9i 1 + #define MSK32SemaHub_almostFull_ST_9i 0x00000200 + + #define BA_SemaHub_almostFull_ST_10i 0x0395 + #define B16SemaHub_almostFull_ST_10i 0x0394 + #define LSb32SemaHub_almostFull_ST_10i 10 + #define LSb16SemaHub_almostFull_ST_10i 10 + #define bSemaHub_almostFull_ST_10i 1 + #define MSK32SemaHub_almostFull_ST_10i 0x00000400 + + #define BA_SemaHub_almostFull_ST_11i 0x0395 + #define B16SemaHub_almostFull_ST_11i 0x0394 + #define LSb32SemaHub_almostFull_ST_11i 11 + #define LSb16SemaHub_almostFull_ST_11i 11 + #define bSemaHub_almostFull_ST_11i 1 + #define MSK32SemaHub_almostFull_ST_11i 0x00000800 + + #define BA_SemaHub_almostFull_ST_12i 0x0395 + #define B16SemaHub_almostFull_ST_12i 0x0394 + #define LSb32SemaHub_almostFull_ST_12i 12 + #define LSb16SemaHub_almostFull_ST_12i 12 + #define bSemaHub_almostFull_ST_12i 1 + #define MSK32SemaHub_almostFull_ST_12i 0x00001000 + + #define BA_SemaHub_almostFull_ST_13i 0x0395 + #define B16SemaHub_almostFull_ST_13i 0x0394 + #define LSb32SemaHub_almostFull_ST_13i 13 + #define LSb16SemaHub_almostFull_ST_13i 13 + #define bSemaHub_almostFull_ST_13i 1 + #define MSK32SemaHub_almostFull_ST_13i 0x00002000 + + #define BA_SemaHub_almostFull_ST_14i 0x0395 + #define B16SemaHub_almostFull_ST_14i 0x0394 + #define LSb32SemaHub_almostFull_ST_14i 14 + #define LSb16SemaHub_almostFull_ST_14i 14 + #define bSemaHub_almostFull_ST_14i 1 + #define MSK32SemaHub_almostFull_ST_14i 0x00004000 + + #define BA_SemaHub_almostFull_ST_15i 0x0395 + #define B16SemaHub_almostFull_ST_15i 0x0394 + #define LSb32SemaHub_almostFull_ST_15i 15 + #define LSb16SemaHub_almostFull_ST_15i 15 + #define bSemaHub_almostFull_ST_15i 1 + #define MSK32SemaHub_almostFull_ST_15i 0x00008000 + + #define BA_SemaHub_almostFull_ST_16i 0x0396 + #define B16SemaHub_almostFull_ST_16i 0x0396 + #define LSb32SemaHub_almostFull_ST_16i 16 + #define LSb16SemaHub_almostFull_ST_16i 0 + #define bSemaHub_almostFull_ST_16i 1 + #define MSK32SemaHub_almostFull_ST_16i 0x00010000 + + #define BA_SemaHub_almostFull_ST_17i 0x0396 + #define B16SemaHub_almostFull_ST_17i 0x0396 + #define LSb32SemaHub_almostFull_ST_17i 17 + #define LSb16SemaHub_almostFull_ST_17i 1 + #define bSemaHub_almostFull_ST_17i 1 + #define MSK32SemaHub_almostFull_ST_17i 0x00020000 + + #define BA_SemaHub_almostFull_ST_18i 0x0396 + #define B16SemaHub_almostFull_ST_18i 0x0396 + #define LSb32SemaHub_almostFull_ST_18i 18 + #define LSb16SemaHub_almostFull_ST_18i 2 + #define bSemaHub_almostFull_ST_18i 1 + #define MSK32SemaHub_almostFull_ST_18i 0x00040000 + + #define BA_SemaHub_almostFull_ST_19i 0x0396 + #define B16SemaHub_almostFull_ST_19i 0x0396 + #define LSb32SemaHub_almostFull_ST_19i 19 + #define LSb16SemaHub_almostFull_ST_19i 3 + #define bSemaHub_almostFull_ST_19i 1 + #define MSK32SemaHub_almostFull_ST_19i 0x00080000 + + #define BA_SemaHub_almostFull_ST_20i 0x0396 + #define B16SemaHub_almostFull_ST_20i 0x0396 + #define LSb32SemaHub_almostFull_ST_20i 20 + #define LSb16SemaHub_almostFull_ST_20i 4 + #define bSemaHub_almostFull_ST_20i 1 + #define MSK32SemaHub_almostFull_ST_20i 0x00100000 + + #define BA_SemaHub_almostFull_ST_21i 0x0396 + #define B16SemaHub_almostFull_ST_21i 0x0396 + #define LSb32SemaHub_almostFull_ST_21i 21 + #define LSb16SemaHub_almostFull_ST_21i 5 + #define bSemaHub_almostFull_ST_21i 1 + #define MSK32SemaHub_almostFull_ST_21i 0x00200000 + + #define BA_SemaHub_almostFull_ST_22i 0x0396 + #define B16SemaHub_almostFull_ST_22i 0x0396 + #define LSb32SemaHub_almostFull_ST_22i 22 + #define LSb16SemaHub_almostFull_ST_22i 6 + #define bSemaHub_almostFull_ST_22i 1 + #define MSK32SemaHub_almostFull_ST_22i 0x00400000 + + #define BA_SemaHub_almostFull_ST_23i 0x0396 + #define B16SemaHub_almostFull_ST_23i 0x0396 + #define LSb32SemaHub_almostFull_ST_23i 23 + #define LSb16SemaHub_almostFull_ST_23i 7 + #define bSemaHub_almostFull_ST_23i 1 + #define MSK32SemaHub_almostFull_ST_23i 0x00800000 + + #define BA_SemaHub_almostFull_ST_24i 0x0397 + #define B16SemaHub_almostFull_ST_24i 0x0396 + #define LSb32SemaHub_almostFull_ST_24i 24 + #define LSb16SemaHub_almostFull_ST_24i 8 + #define bSemaHub_almostFull_ST_24i 1 + #define MSK32SemaHub_almostFull_ST_24i 0x01000000 + + #define BA_SemaHub_almostFull_ST_25i 0x0397 + #define B16SemaHub_almostFull_ST_25i 0x0396 + #define LSb32SemaHub_almostFull_ST_25i 25 + #define LSb16SemaHub_almostFull_ST_25i 9 + #define bSemaHub_almostFull_ST_25i 1 + #define MSK32SemaHub_almostFull_ST_25i 0x02000000 + + #define BA_SemaHub_almostFull_ST_26i 0x0397 + #define B16SemaHub_almostFull_ST_26i 0x0396 + #define LSb32SemaHub_almostFull_ST_26i 26 + #define LSb16SemaHub_almostFull_ST_26i 10 + #define bSemaHub_almostFull_ST_26i 1 + #define MSK32SemaHub_almostFull_ST_26i 0x04000000 + + #define BA_SemaHub_almostFull_ST_27i 0x0397 + #define B16SemaHub_almostFull_ST_27i 0x0396 + #define LSb32SemaHub_almostFull_ST_27i 27 + #define LSb16SemaHub_almostFull_ST_27i 11 + #define bSemaHub_almostFull_ST_27i 1 + #define MSK32SemaHub_almostFull_ST_27i 0x08000000 + + #define BA_SemaHub_almostFull_ST_28i 0x0397 + #define B16SemaHub_almostFull_ST_28i 0x0396 + #define LSb32SemaHub_almostFull_ST_28i 28 + #define LSb16SemaHub_almostFull_ST_28i 12 + #define bSemaHub_almostFull_ST_28i 1 + #define MSK32SemaHub_almostFull_ST_28i 0x10000000 + + #define BA_SemaHub_almostFull_ST_29i 0x0397 + #define B16SemaHub_almostFull_ST_29i 0x0396 + #define LSb32SemaHub_almostFull_ST_29i 29 + #define LSb16SemaHub_almostFull_ST_29i 13 + #define bSemaHub_almostFull_ST_29i 1 + #define MSK32SemaHub_almostFull_ST_29i 0x20000000 + + #define BA_SemaHub_almostFull_ST_30i 0x0397 + #define B16SemaHub_almostFull_ST_30i 0x0396 + #define LSb32SemaHub_almostFull_ST_30i 30 + #define LSb16SemaHub_almostFull_ST_30i 14 + #define bSemaHub_almostFull_ST_30i 1 + #define MSK32SemaHub_almostFull_ST_30i 0x40000000 + + #define BA_SemaHub_almostFull_ST_31i 0x0397 + #define B16SemaHub_almostFull_ST_31i 0x0396 + #define LSb32SemaHub_almostFull_ST_31i 31 + #define LSb16SemaHub_almostFull_ST_31i 15 + #define bSemaHub_almostFull_ST_31i 1 + #define MSK32SemaHub_almostFull_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaHub { + /////////////////////////////////////////////////////////// + SIE_SemaQuery ie_counter[64]; + /////////////////////////////////////////////////////////// + SIE_Semaphore ie_cell[32]; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_PUSH_ID(r32) _BFGET_(r32, 7, 0) + #define SET32SemaHub_PUSH_ID(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16SemaHub_PUSH_ID(r16) _BFGET_(r16, 7, 0) + #define SET16SemaHub_PUSH_ID(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32SemaHub_PUSH_delta(r32) _BFGET_(r32,15, 8) + #define SET32SemaHub_PUSH_delta(r32,v) _BFSET_(r32,15, 8,v) + #define GET16SemaHub_PUSH_delta(r16) _BFGET_(r16,15, 8) + #define SET16SemaHub_PUSH_delta(r16,v) _BFSET_(r16,15, 8,v) + + #define w32SemaHub_PUSH {\ + UNSG32 uPUSH_ID : 8;\ + UNSG32 uPUSH_delta : 8;\ + UNSG32 RSVDx380_b16 : 16;\ + } + union { UNSG32 u32SemaHub_PUSH; + struct w32SemaHub_PUSH; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_POP_ID(r32) _BFGET_(r32, 7, 0) + #define SET32SemaHub_POP_ID(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16SemaHub_POP_ID(r16) _BFGET_(r16, 7, 0) + #define SET16SemaHub_POP_ID(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32SemaHub_POP_delta(r32) _BFGET_(r32,15, 8) + #define SET32SemaHub_POP_delta(r32,v) _BFSET_(r32,15, 8,v) + #define GET16SemaHub_POP_delta(r16) _BFGET_(r16,15, 8) + #define SET16SemaHub_POP_delta(r16,v) _BFSET_(r16,15, 8,v) + + #define w32SemaHub_POP {\ + UNSG32 uPOP_ID : 8;\ + UNSG32 uPOP_delta : 8;\ + UNSG32 RSVDx384_b16 : 16;\ + } + union { UNSG32 u32SemaHub_POP; + struct w32SemaHub_POP; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_empty_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_empty_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_empty_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_empty_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_empty_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_empty_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_empty_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_empty_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_empty_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_empty_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_empty_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_empty_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_empty_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_empty_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_empty_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_empty_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_empty_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_empty_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_empty_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_empty_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_empty_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_empty_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_empty_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_empty_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_empty_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_empty_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_empty_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_empty_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_empty_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_empty_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_empty_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_empty_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_empty_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_empty_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_empty_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_empty_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_empty_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_empty_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_empty_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_empty_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_empty_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_empty_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_empty_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_empty_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_empty_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_empty_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_empty_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_empty_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_empty_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_empty_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_empty_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_empty_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_empty_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_empty_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_empty_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_empty_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_empty_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_empty_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_empty_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_empty_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_empty_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_empty_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_empty_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_empty_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_empty_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_empty_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_empty_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_empty_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_empty_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_empty_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_empty_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_empty_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_empty_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_empty_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_empty_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_empty_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_empty_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_empty_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_empty_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_empty_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_empty_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_empty_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_empty_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_empty_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_empty_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_empty_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_empty_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_empty_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_empty_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_empty_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_empty_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_empty_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_empty_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_empty_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_empty_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_empty_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_empty_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_empty_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_empty_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_empty_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_empty_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_empty_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_empty_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_empty_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_empty_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_empty_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_empty_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_empty_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_empty_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_empty_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_empty_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_empty_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_empty_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_empty_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_empty_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_empty_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_empty_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_empty_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_empty_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_empty_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_empty_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_empty_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_empty_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_empty_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_empty_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_empty_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_empty_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_empty_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_empty {\ + UNSG32 uempty_ST_0i : 1;\ + UNSG32 uempty_ST_1i : 1;\ + UNSG32 uempty_ST_2i : 1;\ + UNSG32 uempty_ST_3i : 1;\ + UNSG32 uempty_ST_4i : 1;\ + UNSG32 uempty_ST_5i : 1;\ + UNSG32 uempty_ST_6i : 1;\ + UNSG32 uempty_ST_7i : 1;\ + UNSG32 uempty_ST_8i : 1;\ + UNSG32 uempty_ST_9i : 1;\ + UNSG32 uempty_ST_10i : 1;\ + UNSG32 uempty_ST_11i : 1;\ + UNSG32 uempty_ST_12i : 1;\ + UNSG32 uempty_ST_13i : 1;\ + UNSG32 uempty_ST_14i : 1;\ + UNSG32 uempty_ST_15i : 1;\ + UNSG32 uempty_ST_16i : 1;\ + UNSG32 uempty_ST_17i : 1;\ + UNSG32 uempty_ST_18i : 1;\ + UNSG32 uempty_ST_19i : 1;\ + UNSG32 uempty_ST_20i : 1;\ + UNSG32 uempty_ST_21i : 1;\ + UNSG32 uempty_ST_22i : 1;\ + UNSG32 uempty_ST_23i : 1;\ + UNSG32 uempty_ST_24i : 1;\ + UNSG32 uempty_ST_25i : 1;\ + UNSG32 uempty_ST_26i : 1;\ + UNSG32 uempty_ST_27i : 1;\ + UNSG32 uempty_ST_28i : 1;\ + UNSG32 uempty_ST_29i : 1;\ + UNSG32 uempty_ST_30i : 1;\ + UNSG32 uempty_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_empty; + struct w32SemaHub_empty; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_full_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_full_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_full_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_full_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_full_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_full_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_full_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_full_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_full_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_full_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_full_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_full_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_full_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_full_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_full_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_full_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_full_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_full_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_full_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_full_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_full_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_full_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_full_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_full_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_full_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_full_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_full_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_full_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_full_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_full_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_full_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_full_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_full_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_full_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_full_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_full_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_full_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_full_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_full_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_full_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_full_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_full_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_full_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_full_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_full_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_full_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_full_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_full_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_full_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_full_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_full_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_full_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_full_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_full_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_full_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_full_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_full_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_full_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_full_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_full_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_full_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_full_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_full_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_full_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_full_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_full_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_full_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_full_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_full_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_full_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_full_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_full_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_full_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_full_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_full_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_full_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_full_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_full_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_full_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_full_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_full_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_full_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_full_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_full_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_full_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_full_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_full_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_full_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_full_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_full_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_full_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_full_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_full_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_full_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_full_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_full_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_full_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_full_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_full_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_full_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_full_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_full_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_full_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_full_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_full_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_full_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_full_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_full_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_full_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_full_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_full_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_full_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_full_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_full_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_full_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_full_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_full_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_full_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_full_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_full_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_full_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_full_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_full_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_full_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_full_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_full_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_full_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_full_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_full {\ + UNSG32 ufull_ST_0i : 1;\ + UNSG32 ufull_ST_1i : 1;\ + UNSG32 ufull_ST_2i : 1;\ + UNSG32 ufull_ST_3i : 1;\ + UNSG32 ufull_ST_4i : 1;\ + UNSG32 ufull_ST_5i : 1;\ + UNSG32 ufull_ST_6i : 1;\ + UNSG32 ufull_ST_7i : 1;\ + UNSG32 ufull_ST_8i : 1;\ + UNSG32 ufull_ST_9i : 1;\ + UNSG32 ufull_ST_10i : 1;\ + UNSG32 ufull_ST_11i : 1;\ + UNSG32 ufull_ST_12i : 1;\ + UNSG32 ufull_ST_13i : 1;\ + UNSG32 ufull_ST_14i : 1;\ + UNSG32 ufull_ST_15i : 1;\ + UNSG32 ufull_ST_16i : 1;\ + UNSG32 ufull_ST_17i : 1;\ + UNSG32 ufull_ST_18i : 1;\ + UNSG32 ufull_ST_19i : 1;\ + UNSG32 ufull_ST_20i : 1;\ + UNSG32 ufull_ST_21i : 1;\ + UNSG32 ufull_ST_22i : 1;\ + UNSG32 ufull_ST_23i : 1;\ + UNSG32 ufull_ST_24i : 1;\ + UNSG32 ufull_ST_25i : 1;\ + UNSG32 ufull_ST_26i : 1;\ + UNSG32 ufull_ST_27i : 1;\ + UNSG32 ufull_ST_28i : 1;\ + UNSG32 ufull_ST_29i : 1;\ + UNSG32 ufull_ST_30i : 1;\ + UNSG32 ufull_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_full; + struct w32SemaHub_full; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_almostEmpty_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_almostEmpty_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_almostEmpty_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostEmpty_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostEmpty_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_almostEmpty_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_almostEmpty_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostEmpty_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostEmpty_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_almostEmpty_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_almostEmpty_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostEmpty_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostEmpty_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_almostEmpty_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_almostEmpty_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostEmpty_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostEmpty_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_almostEmpty_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_almostEmpty_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostEmpty_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostEmpty_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_almostEmpty_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_almostEmpty_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostEmpty_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostEmpty_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_almostEmpty_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_almostEmpty_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostEmpty_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostEmpty_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_almostEmpty_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_almostEmpty_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostEmpty_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostEmpty_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_almostEmpty_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_almostEmpty_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostEmpty_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostEmpty_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_almostEmpty_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_almostEmpty_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostEmpty_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostEmpty_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_almostEmpty_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_almostEmpty_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostEmpty_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostEmpty_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_almostEmpty_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_almostEmpty_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostEmpty_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostEmpty_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_almostEmpty_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_almostEmpty_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostEmpty_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostEmpty_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_almostEmpty_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_almostEmpty_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostEmpty_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostEmpty_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_almostEmpty_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_almostEmpty_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostEmpty_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostEmpty_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_almostEmpty_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_almostEmpty_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostEmpty_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_almostEmpty_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_almostEmpty_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_almostEmpty_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostEmpty_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostEmpty_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_almostEmpty_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_almostEmpty_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostEmpty_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostEmpty_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_almostEmpty_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_almostEmpty_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostEmpty_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostEmpty_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_almostEmpty_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_almostEmpty_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostEmpty_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostEmpty_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_almostEmpty_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_almostEmpty_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostEmpty_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostEmpty_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_almostEmpty_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_almostEmpty_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostEmpty_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostEmpty_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_almostEmpty_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_almostEmpty_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostEmpty_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostEmpty_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_almostEmpty_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_almostEmpty_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostEmpty_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostEmpty_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_almostEmpty_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_almostEmpty_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostEmpty_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostEmpty_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_almostEmpty_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_almostEmpty_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostEmpty_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostEmpty_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_almostEmpty_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_almostEmpty_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostEmpty_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostEmpty_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_almostEmpty_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_almostEmpty_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostEmpty_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostEmpty_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_almostEmpty_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_almostEmpty_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostEmpty_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostEmpty_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_almostEmpty_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_almostEmpty_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostEmpty_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostEmpty_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_almostEmpty_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_almostEmpty_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostEmpty_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostEmpty_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_almostEmpty_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_almostEmpty_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostEmpty_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_almostEmpty {\ + UNSG32 ualmostEmpty_ST_0i : 1;\ + UNSG32 ualmostEmpty_ST_1i : 1;\ + UNSG32 ualmostEmpty_ST_2i : 1;\ + UNSG32 ualmostEmpty_ST_3i : 1;\ + UNSG32 ualmostEmpty_ST_4i : 1;\ + UNSG32 ualmostEmpty_ST_5i : 1;\ + UNSG32 ualmostEmpty_ST_6i : 1;\ + UNSG32 ualmostEmpty_ST_7i : 1;\ + UNSG32 ualmostEmpty_ST_8i : 1;\ + UNSG32 ualmostEmpty_ST_9i : 1;\ + UNSG32 ualmostEmpty_ST_10i : 1;\ + UNSG32 ualmostEmpty_ST_11i : 1;\ + UNSG32 ualmostEmpty_ST_12i : 1;\ + UNSG32 ualmostEmpty_ST_13i : 1;\ + UNSG32 ualmostEmpty_ST_14i : 1;\ + UNSG32 ualmostEmpty_ST_15i : 1;\ + UNSG32 ualmostEmpty_ST_16i : 1;\ + UNSG32 ualmostEmpty_ST_17i : 1;\ + UNSG32 ualmostEmpty_ST_18i : 1;\ + UNSG32 ualmostEmpty_ST_19i : 1;\ + UNSG32 ualmostEmpty_ST_20i : 1;\ + UNSG32 ualmostEmpty_ST_21i : 1;\ + UNSG32 ualmostEmpty_ST_22i : 1;\ + UNSG32 ualmostEmpty_ST_23i : 1;\ + UNSG32 ualmostEmpty_ST_24i : 1;\ + UNSG32 ualmostEmpty_ST_25i : 1;\ + UNSG32 ualmostEmpty_ST_26i : 1;\ + UNSG32 ualmostEmpty_ST_27i : 1;\ + UNSG32 ualmostEmpty_ST_28i : 1;\ + UNSG32 ualmostEmpty_ST_29i : 1;\ + UNSG32 ualmostEmpty_ST_30i : 1;\ + UNSG32 ualmostEmpty_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_almostEmpty; + struct w32SemaHub_almostEmpty; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_almostFull_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_almostFull_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_almostFull_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostFull_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostFull_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_almostFull_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_almostFull_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostFull_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostFull_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_almostFull_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_almostFull_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostFull_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostFull_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_almostFull_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_almostFull_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostFull_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostFull_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_almostFull_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_almostFull_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostFull_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostFull_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_almostFull_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_almostFull_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostFull_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostFull_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_almostFull_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_almostFull_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostFull_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostFull_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_almostFull_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_almostFull_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostFull_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostFull_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_almostFull_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_almostFull_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostFull_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostFull_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_almostFull_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_almostFull_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostFull_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostFull_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_almostFull_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_almostFull_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostFull_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostFull_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_almostFull_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_almostFull_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostFull_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostFull_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_almostFull_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_almostFull_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostFull_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostFull_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_almostFull_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_almostFull_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostFull_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostFull_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_almostFull_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_almostFull_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostFull_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostFull_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_almostFull_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_almostFull_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostFull_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_almostFull_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_almostFull_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_almostFull_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostFull_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostFull_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_almostFull_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_almostFull_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostFull_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostFull_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_almostFull_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_almostFull_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostFull_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostFull_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_almostFull_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_almostFull_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostFull_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostFull_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_almostFull_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_almostFull_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostFull_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostFull_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_almostFull_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_almostFull_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostFull_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostFull_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_almostFull_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_almostFull_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostFull_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostFull_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_almostFull_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_almostFull_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostFull_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostFull_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_almostFull_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_almostFull_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostFull_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostFull_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_almostFull_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_almostFull_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostFull_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostFull_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_almostFull_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_almostFull_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostFull_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostFull_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_almostFull_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_almostFull_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostFull_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostFull_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_almostFull_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_almostFull_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostFull_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostFull_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_almostFull_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_almostFull_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostFull_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostFull_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_almostFull_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_almostFull_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostFull_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostFull_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_almostFull_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_almostFull_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostFull_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_almostFull {\ + UNSG32 ualmostFull_ST_0i : 1;\ + UNSG32 ualmostFull_ST_1i : 1;\ + UNSG32 ualmostFull_ST_2i : 1;\ + UNSG32 ualmostFull_ST_3i : 1;\ + UNSG32 ualmostFull_ST_4i : 1;\ + UNSG32 ualmostFull_ST_5i : 1;\ + UNSG32 ualmostFull_ST_6i : 1;\ + UNSG32 ualmostFull_ST_7i : 1;\ + UNSG32 ualmostFull_ST_8i : 1;\ + UNSG32 ualmostFull_ST_9i : 1;\ + UNSG32 ualmostFull_ST_10i : 1;\ + UNSG32 ualmostFull_ST_11i : 1;\ + UNSG32 ualmostFull_ST_12i : 1;\ + UNSG32 ualmostFull_ST_13i : 1;\ + UNSG32 ualmostFull_ST_14i : 1;\ + UNSG32 ualmostFull_ST_15i : 1;\ + UNSG32 ualmostFull_ST_16i : 1;\ + UNSG32 ualmostFull_ST_17i : 1;\ + UNSG32 ualmostFull_ST_18i : 1;\ + UNSG32 ualmostFull_ST_19i : 1;\ + UNSG32 ualmostFull_ST_20i : 1;\ + UNSG32 ualmostFull_ST_21i : 1;\ + UNSG32 ualmostFull_ST_22i : 1;\ + UNSG32 ualmostFull_ST_23i : 1;\ + UNSG32 ualmostFull_ST_24i : 1;\ + UNSG32 ualmostFull_ST_25i : 1;\ + UNSG32 ualmostFull_ST_26i : 1;\ + UNSG32 ualmostFull_ST_27i : 1;\ + UNSG32 ualmostFull_ST_28i : 1;\ + UNSG32 ualmostFull_ST_29i : 1;\ + UNSG32 ualmostFull_ST_30i : 1;\ + UNSG32 ualmostFull_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_almostFull; + struct w32SemaHub_almostFull; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx398 [104]; + /////////////////////////////////////////////////////////// + } SIE_SemaHub; + + typedef union T32SemaHub_PUSH + { UNSG32 u32; + struct w32SemaHub_PUSH; + } T32SemaHub_PUSH; + typedef union T32SemaHub_POP + { UNSG32 u32; + struct w32SemaHub_POP; + } T32SemaHub_POP; + typedef union T32SemaHub_empty + { UNSG32 u32; + struct w32SemaHub_empty; + } T32SemaHub_empty; + typedef union T32SemaHub_full + { UNSG32 u32; + struct w32SemaHub_full; + } T32SemaHub_full; + typedef union T32SemaHub_almostEmpty + { UNSG32 u32; + struct w32SemaHub_almostEmpty; + } T32SemaHub_almostEmpty; + typedef union T32SemaHub_almostFull + { UNSG32 u32; + struct w32SemaHub_almostFull; + } T32SemaHub_almostFull; + /////////////////////////////////////////////////////////// + + typedef union TSemaHub_PUSH + { UNSG32 u32[1]; + struct { + struct w32SemaHub_PUSH; + }; + } TSemaHub_PUSH; + typedef union TSemaHub_POP + { UNSG32 u32[1]; + struct { + struct w32SemaHub_POP; + }; + } TSemaHub_POP; + typedef union TSemaHub_empty + { UNSG32 u32[1]; + struct { + struct w32SemaHub_empty; + }; + } TSemaHub_empty; + typedef union TSemaHub_full + { UNSG32 u32[1]; + struct { + struct w32SemaHub_full; + }; + } TSemaHub_full; + typedef union TSemaHub_almostEmpty + { UNSG32 u32[1]; + struct { + struct w32SemaHub_almostEmpty; + }; + } TSemaHub_almostEmpty; + typedef union TSemaHub_almostFull + { UNSG32 u32[1]; + struct { + struct w32SemaHub_almostFull; + }; + } TSemaHub_almostFull; + + /////////////////////////////////////////////////////////// + SIGN32 SemaHub_drvrd(SIE_SemaHub *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaHub_drvwr(SIE_SemaHub *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaHub_reset(SIE_SemaHub *p); + SIGN32 SemaHub_cmp (SIE_SemaHub *p, SIE_SemaHub *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaHub_check(p,pie,pfx,hLOG) SemaHub_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaHub_print(p, pfx,hLOG) SemaHub_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaHub +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE FiFo biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 20 BASE +/// ### +/// * Base address (byte-address) of a FIFO in the shared SRAM. A channel's read/write pointers will be added to this “BASE†to get exact location of shared SRAM. +/// * Note: aligned with base SRAM data bus. +/// * For example, if SRAM data is 64-bit, then base[2:0] should be 3'b0; +/// ### +/// %% 12 # Stuffing bits... +/// @ 0x00004 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to this register will enable this channel, or 0 to this register will disable this channel. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to clear FIFO pointers to 0. +/// * Note : +/// * CPU should make sure to disabled the channel (write 0 to START_EN register) before issue clear command, otherwise the clear request will be ignored. +/// * Do not restart the channel when clear operation is in process. +/// * HW will make sure there is no pending transactions before execute the clear operation. +/// * Associated semaphore cell needs reset separately by re-write “CFG_DEPTH†+/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C FLUSH (W-) +/// %unsigned 1 EN +/// ### +/// * No support for now +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 23b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_FiFo +#define h_FiFo (){} + + #define RA_FiFo_CFG 0x0000 + + #define BA_FiFo_CFG_BASE 0x0000 + #define B16FiFo_CFG_BASE 0x0000 + #define LSb32FiFo_CFG_BASE 0 + #define LSb16FiFo_CFG_BASE 0 + #define bFiFo_CFG_BASE 20 + #define MSK32FiFo_CFG_BASE 0x000FFFFF + /////////////////////////////////////////////////////////// + #define RA_FiFo_START 0x0004 + + #define BA_FiFo_START_EN 0x0004 + #define B16FiFo_START_EN 0x0004 + #define LSb32FiFo_START_EN 0 + #define LSb16FiFo_START_EN 0 + #define bFiFo_START_EN 1 + #define MSK32FiFo_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_FiFo_CLEAR 0x0008 + + #define BA_FiFo_CLEAR_EN 0x0008 + #define B16FiFo_CLEAR_EN 0x0008 + #define LSb32FiFo_CLEAR_EN 0 + #define LSb16FiFo_CLEAR_EN 0 + #define bFiFo_CLEAR_EN 1 + #define MSK32FiFo_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_FiFo_FLUSH 0x000C + + #define BA_FiFo_FLUSH_EN 0x000C + #define B16FiFo_FLUSH_EN 0x000C + #define LSb32FiFo_FLUSH_EN 0 + #define LSb16FiFo_FLUSH_EN 0 + #define bFiFo_FLUSH_EN 1 + #define MSK32FiFo_FLUSH_EN 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_FiFo { + /////////////////////////////////////////////////////////// + #define GET32FiFo_CFG_BASE(r32) _BFGET_(r32,19, 0) + #define SET32FiFo_CFG_BASE(r32,v) _BFSET_(r32,19, 0,v) + + #define w32FiFo_CFG {\ + UNSG32 uCFG_BASE : 20;\ + UNSG32 RSVDx0_b20 : 12;\ + } + union { UNSG32 u32FiFo_CFG; + struct w32FiFo_CFG; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } + union { UNSG32 u32FiFo_START; + struct w32FiFo_START; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32FiFo_CLEAR; + struct w32FiFo_CLEAR; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_FLUSH_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_FLUSH_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_FLUSH_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_FLUSH_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_FLUSH {\ + UNSG32 uFLUSH_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32FiFo_FLUSH; + struct w32FiFo_FLUSH; + }; + /////////////////////////////////////////////////////////// + } SIE_FiFo; + + typedef union T32FiFo_CFG + { UNSG32 u32; + struct w32FiFo_CFG; + } T32FiFo_CFG; + typedef union T32FiFo_START + { UNSG32 u32; + struct w32FiFo_START; + } T32FiFo_START; + typedef union T32FiFo_CLEAR + { UNSG32 u32; + struct w32FiFo_CLEAR; + } T32FiFo_CLEAR; + typedef union T32FiFo_FLUSH + { UNSG32 u32; + struct w32FiFo_FLUSH; + } T32FiFo_FLUSH; + /////////////////////////////////////////////////////////// + + typedef union TFiFo_CFG + { UNSG32 u32[1]; + struct { + struct w32FiFo_CFG; + }; + } TFiFo_CFG; + typedef union TFiFo_START + { UNSG32 u32[1]; + struct { + struct w32FiFo_START; + }; + } TFiFo_START; + typedef union TFiFo_CLEAR + { UNSG32 u32[1]; + struct { + struct w32FiFo_CLEAR; + }; + } TFiFo_CLEAR; + typedef union TFiFo_FLUSH + { UNSG32 u32[1]; + struct { + struct w32FiFo_FLUSH; + }; + } TFiFo_FLUSH; + + /////////////////////////////////////////////////////////// + SIGN32 FiFo_drvrd(SIE_FiFo *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 FiFo_drvwr(SIE_FiFo *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void FiFo_reset(SIE_FiFo *p); + SIGN32 FiFo_cmp (SIE_FiFo *p, SIE_FiFo *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define FiFo_check(p,pie,pfx,hLOG) FiFo_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define FiFo_print(p, pfx,hLOG) FiFo_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: FiFo +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE HBO biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 FiFoCtl +/// $SemaHub FiFoCtl REG +/// @ 0x00400 ARR (P) +/// # 0x00400 FiFo +/// $FiFo FiFo REG [32] +/// ### +/// * Up-to 32 FIFO channels +/// * FiFo[N] is controlled by HBO.FiFoCtl.Channel[N] +/// ### +/// @ 0x00600 BUSY (R-) +/// %unsigned 32 ST +/// ### +/// * Per channel status +/// * Indicate the clear operation status. +/// * 1: clear is in process. +/// * 0 : clear is done. +/// ### +/// @ 0x00604 (W-) +/// # # Stuffing bytes... +/// %% 2016 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 1792B, bits: 1920b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_HBO +#define h_HBO (){} + + #define RA_HBO_FiFoCtl 0x0000 + /////////////////////////////////////////////////////////// + #define RA_HBO_ARR 0x0400 + #define RA_HBO_FiFo 0x0400 + /////////////////////////////////////////////////////////// + #define RA_HBO_BUSY 0x0600 + + #define BA_HBO_BUSY_ST 0x0600 + #define B16HBO_BUSY_ST 0x0600 + #define LSb32HBO_BUSY_ST 0 + #define LSb16HBO_BUSY_ST 0 + #define bHBO_BUSY_ST 32 + #define MSK32HBO_BUSY_ST 0xFFFFFFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_HBO { + /////////////////////////////////////////////////////////// + SIE_SemaHub ie_FiFoCtl; + /////////////////////////////////////////////////////////// + SIE_FiFo ie_FiFo[32]; + /////////////////////////////////////////////////////////// + #define GET32HBO_BUSY_ST(r32) _BFGET_(r32,31, 0) + #define SET32HBO_BUSY_ST(r32,v) _BFSET_(r32,31, 0,v) + + #define w32HBO_BUSY {\ + UNSG32 uBUSY_ST : 32;\ + } + union { UNSG32 u32HBO_BUSY; + struct w32HBO_BUSY; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx604 [252]; + /////////////////////////////////////////////////////////// + } SIE_HBO; + + typedef union T32HBO_BUSY + { UNSG32 u32; + struct w32HBO_BUSY; + } T32HBO_BUSY; + /////////////////////////////////////////////////////////// + + typedef union THBO_BUSY + { UNSG32 u32[1]; + struct { + struct w32HBO_BUSY; + }; + } THBO_BUSY; + + /////////////////////////////////////////////////////////// + SIGN32 HBO_drvrd(SIE_HBO *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 HBO_drvwr(SIE_HBO *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void HBO_reset(SIE_HBO *p); + SIGN32 HBO_cmp (SIE_HBO *p, SIE_HBO *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define HBO_check(p,pie,pfx,hLOG) HBO_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define HBO_print(p, pfx,hLOG) HBO_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: HBO +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE LLDesFmt biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 mem (P) +/// %unsigned 16 size +/// ### +/// * The size of one piece of scattered memory. +/// ### +/// %% 16 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 16b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_LLDesFmt +#define h_LLDesFmt (){} + + #define RA_LLDesFmt_mem 0x0000 + + #define BA_LLDesFmt_mem_size 0x0000 + #define B16LLDesFmt_mem_size 0x0000 + #define LSb32LLDesFmt_mem_size 0 + #define LSb16LLDesFmt_mem_size 0 + #define bLLDesFmt_mem_size 16 + #define MSK32LLDesFmt_mem_size 0x0000FFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_LLDesFmt { + /////////////////////////////////////////////////////////// + #define GET32LLDesFmt_mem_size(r32) _BFGET_(r32,15, 0) + #define SET32LLDesFmt_mem_size(r32,v) _BFSET_(r32,15, 0,v) + #define GET16LLDesFmt_mem_size(r16) _BFGET_(r16,15, 0) + #define SET16LLDesFmt_mem_size(r16,v) _BFSET_(r16,15, 0,v) + + #define w32LLDesFmt_mem {\ + UNSG32 umem_size : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32LLDesFmt_mem; + struct w32LLDesFmt_mem; + }; + /////////////////////////////////////////////////////////// + } SIE_LLDesFmt; + + typedef union T32LLDesFmt_mem + { UNSG32 u32; + struct w32LLDesFmt_mem; + } T32LLDesFmt_mem; + /////////////////////////////////////////////////////////// + + typedef union TLLDesFmt_mem + { UNSG32 u32[1]; + struct { + struct w32LLDesFmt_mem; + }; + } TLLDesFmt_mem; + + /////////////////////////////////////////////////////////// + SIGN32 LLDesFmt_drvrd(SIE_LLDesFmt *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 LLDesFmt_drvwr(SIE_LLDesFmt *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void LLDesFmt_reset(SIE_LLDesFmt *p); + SIGN32 LLDesFmt_cmp (SIE_LLDesFmt *p, SIE_LLDesFmt *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define LLDesFmt_check(p,pie,pfx,hLOG) LLDesFmt_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define LLDesFmt_print(p, pfx,hLOG) LLDesFmt_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: LLDesFmt +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmdHDR (4,4) +/// ### +/// * 32-bit dHub command header +/// * [0:31] +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 DESC (W-) +/// %unsigned 16 size +/// ### +/// * amount of data to be transferred, in bytes or MTU. +/// * Size of 0 is forbidden. +/// ### +/// %unsigned 1 sizeMTU +/// ### +/// * 0: size given in bytes; +/// * 1: size given in MTU (see dHubChCtl.CFG.MTU for MTU size definition) +/// ### +/// %unsigned 1 semOpMTU +/// ### +/// * 0: semaphore operations applied on dHubCmd level +/// * 1: semaphore operations applied on MTU level +/// ### +/// %unsigned 5 chkSemId +/// ### +/// * ID of semaphore to check before cmd / MTU; +/// * 0 indicates semaphore check is disabled +/// ### +/// %unsigned 5 updSemId +/// ### +/// * ID of semaphore to update after cmd / MTU; +/// * 0 indicates semaphore update is disabled +/// ### +/// %unsigned 1 interrupt +/// ### +/// * 1: raise interrupt upon command finish +/// * end dHubCmdHDR +/// ### +/// %% 3 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 29b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmdHDR +#define h_dHubCmdHDR (){} + + #define RA_dHubCmdHDR_DESC 0x0000 + + #define BA_dHubCmdHDR_DESC_size 0x0000 + #define B16dHubCmdHDR_DESC_size 0x0000 + #define LSb32dHubCmdHDR_DESC_size 0 + #define LSb16dHubCmdHDR_DESC_size 0 + #define bdHubCmdHDR_DESC_size 16 + #define MSK32dHubCmdHDR_DESC_size 0x0000FFFF + + #define BA_dHubCmdHDR_DESC_sizeMTU 0x0002 + #define B16dHubCmdHDR_DESC_sizeMTU 0x0002 + #define LSb32dHubCmdHDR_DESC_sizeMTU 16 + #define LSb16dHubCmdHDR_DESC_sizeMTU 0 + #define bdHubCmdHDR_DESC_sizeMTU 1 + #define MSK32dHubCmdHDR_DESC_sizeMTU 0x00010000 + + #define BA_dHubCmdHDR_DESC_semOpMTU 0x0002 + #define B16dHubCmdHDR_DESC_semOpMTU 0x0002 + #define LSb32dHubCmdHDR_DESC_semOpMTU 17 + #define LSb16dHubCmdHDR_DESC_semOpMTU 1 + #define bdHubCmdHDR_DESC_semOpMTU 1 + #define MSK32dHubCmdHDR_DESC_semOpMTU 0x00020000 + + #define BA_dHubCmdHDR_DESC_chkSemId 0x0002 + #define B16dHubCmdHDR_DESC_chkSemId 0x0002 + #define LSb32dHubCmdHDR_DESC_chkSemId 18 + #define LSb16dHubCmdHDR_DESC_chkSemId 2 + #define bdHubCmdHDR_DESC_chkSemId 5 + #define MSK32dHubCmdHDR_DESC_chkSemId 0x007C0000 + + #define BA_dHubCmdHDR_DESC_updSemId 0x0002 + #define B16dHubCmdHDR_DESC_updSemId 0x0002 + #define LSb32dHubCmdHDR_DESC_updSemId 23 + #define LSb16dHubCmdHDR_DESC_updSemId 7 + #define bdHubCmdHDR_DESC_updSemId 5 + #define MSK32dHubCmdHDR_DESC_updSemId 0x0F800000 + + #define BA_dHubCmdHDR_DESC_interrupt 0x0003 + #define B16dHubCmdHDR_DESC_interrupt 0x0002 + #define LSb32dHubCmdHDR_DESC_interrupt 28 + #define LSb16dHubCmdHDR_DESC_interrupt 12 + #define bdHubCmdHDR_DESC_interrupt 1 + #define MSK32dHubCmdHDR_DESC_interrupt 0x10000000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmdHDR { + /////////////////////////////////////////////////////////// + #define GET32dHubCmdHDR_DESC_size(r32) _BFGET_(r32,15, 0) + #define SET32dHubCmdHDR_DESC_size(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubCmdHDR_DESC_size(r16) _BFGET_(r16,15, 0) + #define SET16dHubCmdHDR_DESC_size(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubCmdHDR_DESC_sizeMTU(r32) _BFGET_(r32,16,16) + #define SET32dHubCmdHDR_DESC_sizeMTU(r32,v) _BFSET_(r32,16,16,v) + #define GET16dHubCmdHDR_DESC_sizeMTU(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmdHDR_DESC_sizeMTU(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32dHubCmdHDR_DESC_semOpMTU(r32) _BFGET_(r32,17,17) + #define SET32dHubCmdHDR_DESC_semOpMTU(r32,v) _BFSET_(r32,17,17,v) + #define GET16dHubCmdHDR_DESC_semOpMTU(r16) _BFGET_(r16, 1, 1) + #define SET16dHubCmdHDR_DESC_semOpMTU(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32dHubCmdHDR_DESC_chkSemId(r32) _BFGET_(r32,22,18) + #define SET32dHubCmdHDR_DESC_chkSemId(r32,v) _BFSET_(r32,22,18,v) + #define GET16dHubCmdHDR_DESC_chkSemId(r16) _BFGET_(r16, 6, 2) + #define SET16dHubCmdHDR_DESC_chkSemId(r16,v) _BFSET_(r16, 6, 2,v) + + #define GET32dHubCmdHDR_DESC_updSemId(r32) _BFGET_(r32,27,23) + #define SET32dHubCmdHDR_DESC_updSemId(r32,v) _BFSET_(r32,27,23,v) + #define GET16dHubCmdHDR_DESC_updSemId(r16) _BFGET_(r16,11, 7) + #define SET16dHubCmdHDR_DESC_updSemId(r16,v) _BFSET_(r16,11, 7,v) + + #define GET32dHubCmdHDR_DESC_interrupt(r32) _BFGET_(r32,28,28) + #define SET32dHubCmdHDR_DESC_interrupt(r32,v) _BFSET_(r32,28,28,v) + #define GET16dHubCmdHDR_DESC_interrupt(r16) _BFGET_(r16,12,12) + #define SET16dHubCmdHDR_DESC_interrupt(r16,v) _BFSET_(r16,12,12,v) + + #define w32dHubCmdHDR_DESC {\ + UNSG32 uDESC_size : 16;\ + UNSG32 uDESC_sizeMTU : 1;\ + UNSG32 uDESC_semOpMTU : 1;\ + UNSG32 uDESC_chkSemId : 5;\ + UNSG32 uDESC_updSemId : 5;\ + UNSG32 uDESC_interrupt : 1;\ + UNSG32 RSVDx0_b29 : 3;\ + } + union { UNSG32 u32dHubCmdHDR_DESC; + struct w32dHubCmdHDR_DESC; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubCmdHDR; + + typedef union T32dHubCmdHDR_DESC + { UNSG32 u32; + struct w32dHubCmdHDR_DESC; + } T32dHubCmdHDR_DESC; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmdHDR_DESC + { UNSG32 u32[1]; + struct { + struct w32dHubCmdHDR_DESC; + }; + } TdHubCmdHDR_DESC; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmdHDR_drvrd(SIE_dHubCmdHDR *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmdHDR_drvwr(SIE_dHubCmdHDR *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmdHDR_reset(SIE_dHubCmdHDR *p); + SIGN32 dHubCmdHDR_cmp (SIE_dHubCmdHDR *p, SIE_dHubCmdHDR *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmdHDR_check(p,pie,pfx,hLOG) dHubCmdHDR_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmdHDR_print(p, pfx,hLOG) dHubCmdHDR_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmdHDR +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmd biu (4,4) +/// ### +/// * 64-bit dHub command issued by read/write masters +/// * [0:31] +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 MEM (W-) +/// %unsigned 32 addr +/// ### +/// * DRAM data address, in bytes; not necessarily MTU aligned. +/// * [32:63] +/// ### +/// @ 0x00004 (P) +/// # 0x00004 HDR +/// $dHubCmdHDR HDR REG +/// ### +/// * end dHubCmd +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 8B, bits: 61b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmd +#define h_dHubCmd (){} + + #define RA_dHubCmd_MEM 0x0000 + + #define BA_dHubCmd_MEM_addr 0x0000 + #define B16dHubCmd_MEM_addr 0x0000 + #define LSb32dHubCmd_MEM_addr 0 + #define LSb16dHubCmd_MEM_addr 0 + #define bdHubCmd_MEM_addr 32 + #define MSK32dHubCmd_MEM_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_dHubCmd_HDR 0x0004 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmd { + /////////////////////////////////////////////////////////// + #define GET32dHubCmd_MEM_addr(r32) _BFGET_(r32,31, 0) + #define SET32dHubCmd_MEM_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32dHubCmd_MEM {\ + UNSG32 uMEM_addr : 32;\ + } + union { UNSG32 u32dHubCmd_MEM; + struct w32dHubCmd_MEM; + }; + /////////////////////////////////////////////////////////// + SIE_dHubCmdHDR ie_HDR; + /////////////////////////////////////////////////////////// + } SIE_dHubCmd; + + typedef union T32dHubCmd_MEM + { UNSG32 u32; + struct w32dHubCmd_MEM; + } T32dHubCmd_MEM; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmd_MEM + { UNSG32 u32[1]; + struct { + struct w32dHubCmd_MEM; + }; + } TdHubCmd_MEM; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmd_drvrd(SIE_dHubCmd *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmd_drvwr(SIE_dHubCmd *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmd_reset(SIE_dHubCmd *p); + SIGN32 dHubCmd_cmp (SIE_dHubCmd *p, SIE_dHubCmd *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmd_check(p,pie,pfx,hLOG) dHubCmd_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmd_print(p, pfx,hLOG) dHubCmd_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmd +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubChannel biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 2 MTU +/// : 8byte 0x0 +/// : 32byte 0x1 +/// : 128byte 0x2 +/// : 1024byte 0x3 +/// ### +/// * Minimum transfer unit of the channel +/// ### +/// %unsigned 1 QoS +/// ### +/// * Write 1 to turn on QoS detection +/// ### +/// %unsigned 1 selfLoop +/// ### +/// * Write 1 to enable cmd looping support; 0 to turn off +/// ### +/// %unsigned 1 intrCtl 0x0 +/// : cmdDone 0x0 +/// : chIdle 0x1 +/// ### +/// * 0 : default vlaue, the interrupt is triggered by the finish of the dHub command if the interrupt bit is defined in the dHub command. +/// * 1 : The interrupt is triggered if the dHub channel is idle ( no busy and no pending and the corresponding dHub command Q is empty). +/// ### +/// %unsigned 1 hScan 0x0 +/// : rastScan 0x0 +/// : invScan 0x1 +/// ### +/// * This parameter will only apply to read channels. +/// * It will affect 1D dHub command for the channel. +/// * When scan is set to 1 (invScan), the data (beat) inside the dHub command will be fetched in the inverse order. ie. The data from the last address will come first and the data (beat) from the first address will come lastly. +/// ### +/// %unsigned 1 vScan 0x0 +/// : rastScan 0x0 +/// : invScan 0x1 +/// ### +/// * This parameter will only apply to read channels. +/// * It will affect 2D channels. +/// * When scan is set to 1 (invScan), +/// * The last address line (1D command) will be fetched first, and the first address line will be fetched lastly. +/// ### +/// %% 25 # Stuffing bits... +/// @ 0x00004 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to enable the channel; 0 to pause the channel +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to reset the channel controller state +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C FLUSH (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to start the data flushing process. Invalid for read (M2H) channels +/// * end dHubChannel +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 10b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubChannel +#define h_dHubChannel (){} + + #define RA_dHubChannel_CFG 0x0000 + + #define BA_dHubChannel_CFG_MTU 0x0000 + #define B16dHubChannel_CFG_MTU 0x0000 + #define LSb32dHubChannel_CFG_MTU 0 + #define LSb16dHubChannel_CFG_MTU 0 + #define bdHubChannel_CFG_MTU 2 + #define MSK32dHubChannel_CFG_MTU 0x00000003 + #define dHubChannel_CFG_MTU_8byte 0x0 + #define dHubChannel_CFG_MTU_32byte 0x1 + #define dHubChannel_CFG_MTU_128byte 0x2 + #define dHubChannel_CFG_MTU_1024byte 0x3 + + #define BA_dHubChannel_CFG_QoS 0x0000 + #define B16dHubChannel_CFG_QoS 0x0000 + #define LSb32dHubChannel_CFG_QoS 2 + #define LSb16dHubChannel_CFG_QoS 2 + #define bdHubChannel_CFG_QoS 1 + #define MSK32dHubChannel_CFG_QoS 0x00000004 + + #define BA_dHubChannel_CFG_selfLoop 0x0000 + #define B16dHubChannel_CFG_selfLoop 0x0000 + #define LSb32dHubChannel_CFG_selfLoop 3 + #define LSb16dHubChannel_CFG_selfLoop 3 + #define bdHubChannel_CFG_selfLoop 1 + #define MSK32dHubChannel_CFG_selfLoop 0x00000008 + + #define BA_dHubChannel_CFG_intrCtl 0x0000 + #define B16dHubChannel_CFG_intrCtl 0x0000 + #define LSb32dHubChannel_CFG_intrCtl 4 + #define LSb16dHubChannel_CFG_intrCtl 4 + #define bdHubChannel_CFG_intrCtl 1 + #define MSK32dHubChannel_CFG_intrCtl 0x00000010 + #define dHubChannel_CFG_intrCtl_cmdDone 0x0 + #define dHubChannel_CFG_intrCtl_chIdle 0x1 + + #define BA_dHubChannel_CFG_hScan 0x0000 + #define B16dHubChannel_CFG_hScan 0x0000 + #define LSb32dHubChannel_CFG_hScan 5 + #define LSb16dHubChannel_CFG_hScan 5 + #define bdHubChannel_CFG_hScan 1 + #define MSK32dHubChannel_CFG_hScan 0x00000020 + #define dHubChannel_CFG_hScan_rastScan 0x0 + #define dHubChannel_CFG_hScan_invScan 0x1 + + #define BA_dHubChannel_CFG_vScan 0x0000 + #define B16dHubChannel_CFG_vScan 0x0000 + #define LSb32dHubChannel_CFG_vScan 6 + #define LSb16dHubChannel_CFG_vScan 6 + #define bdHubChannel_CFG_vScan 1 + #define MSK32dHubChannel_CFG_vScan 0x00000040 + #define dHubChannel_CFG_vScan_rastScan 0x0 + #define dHubChannel_CFG_vScan_invScan 0x1 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_START 0x0004 + + #define BA_dHubChannel_START_EN 0x0004 + #define B16dHubChannel_START_EN 0x0004 + #define LSb32dHubChannel_START_EN 0 + #define LSb16dHubChannel_START_EN 0 + #define bdHubChannel_START_EN 1 + #define MSK32dHubChannel_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_CLEAR 0x0008 + + #define BA_dHubChannel_CLEAR_EN 0x0008 + #define B16dHubChannel_CLEAR_EN 0x0008 + #define LSb32dHubChannel_CLEAR_EN 0 + #define LSb16dHubChannel_CLEAR_EN 0 + #define bdHubChannel_CLEAR_EN 1 + #define MSK32dHubChannel_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_FLUSH 0x000C + + #define BA_dHubChannel_FLUSH_EN 0x000C + #define B16dHubChannel_FLUSH_EN 0x000C + #define LSb32dHubChannel_FLUSH_EN 0 + #define LSb16dHubChannel_FLUSH_EN 0 + #define bdHubChannel_FLUSH_EN 1 + #define MSK32dHubChannel_FLUSH_EN 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubChannel { + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_CFG_MTU(r32) _BFGET_(r32, 1, 0) + #define SET32dHubChannel_CFG_MTU(r32,v) _BFSET_(r32, 1, 0,v) + #define GET16dHubChannel_CFG_MTU(r16) _BFGET_(r16, 1, 0) + #define SET16dHubChannel_CFG_MTU(r16,v) _BFSET_(r16, 1, 0,v) + + #define GET32dHubChannel_CFG_QoS(r32) _BFGET_(r32, 2, 2) + #define SET32dHubChannel_CFG_QoS(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16dHubChannel_CFG_QoS(r16) _BFGET_(r16, 2, 2) + #define SET16dHubChannel_CFG_QoS(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32dHubChannel_CFG_selfLoop(r32) _BFGET_(r32, 3, 3) + #define SET32dHubChannel_CFG_selfLoop(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16dHubChannel_CFG_selfLoop(r16) _BFGET_(r16, 3, 3) + #define SET16dHubChannel_CFG_selfLoop(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32dHubChannel_CFG_intrCtl(r32) _BFGET_(r32, 4, 4) + #define SET32dHubChannel_CFG_intrCtl(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16dHubChannel_CFG_intrCtl(r16) _BFGET_(r16, 4, 4) + #define SET16dHubChannel_CFG_intrCtl(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32dHubChannel_CFG_hScan(r32) _BFGET_(r32, 5, 5) + #define SET32dHubChannel_CFG_hScan(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16dHubChannel_CFG_hScan(r16) _BFGET_(r16, 5, 5) + #define SET16dHubChannel_CFG_hScan(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32dHubChannel_CFG_vScan(r32) _BFGET_(r32, 6, 6) + #define SET32dHubChannel_CFG_vScan(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16dHubChannel_CFG_vScan(r16) _BFGET_(r16, 6, 6) + #define SET16dHubChannel_CFG_vScan(r16,v) _BFSET_(r16, 6, 6,v) + + #define w32dHubChannel_CFG {\ + UNSG32 uCFG_MTU : 2;\ + UNSG32 uCFG_QoS : 1;\ + UNSG32 uCFG_selfLoop : 1;\ + UNSG32 uCFG_intrCtl : 1;\ + UNSG32 uCFG_hScan : 1;\ + UNSG32 uCFG_vScan : 1;\ + UNSG32 RSVDx0_b7 : 25;\ + } + union { UNSG32 u32dHubChannel_CFG; + struct w32dHubChannel_CFG; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_START; + struct w32dHubChannel_START; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_CLEAR; + struct w32dHubChannel_CLEAR; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_FLUSH_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_FLUSH_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_FLUSH_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_FLUSH_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_FLUSH {\ + UNSG32 uFLUSH_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_FLUSH; + struct w32dHubChannel_FLUSH; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubChannel; + + typedef union T32dHubChannel_CFG + { UNSG32 u32; + struct w32dHubChannel_CFG; + } T32dHubChannel_CFG; + typedef union T32dHubChannel_START + { UNSG32 u32; + struct w32dHubChannel_START; + } T32dHubChannel_START; + typedef union T32dHubChannel_CLEAR + { UNSG32 u32; + struct w32dHubChannel_CLEAR; + } T32dHubChannel_CLEAR; + typedef union T32dHubChannel_FLUSH + { UNSG32 u32; + struct w32dHubChannel_FLUSH; + } T32dHubChannel_FLUSH; + /////////////////////////////////////////////////////////// + + typedef union TdHubChannel_CFG + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_CFG; + }; + } TdHubChannel_CFG; + typedef union TdHubChannel_START + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_START; + }; + } TdHubChannel_START; + typedef union TdHubChannel_CLEAR + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_CLEAR; + }; + } TdHubChannel_CLEAR; + typedef union TdHubChannel_FLUSH + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_FLUSH; + }; + } TdHubChannel_FLUSH; + + /////////////////////////////////////////////////////////// + SIGN32 dHubChannel_drvrd(SIE_dHubChannel *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubChannel_drvwr(SIE_dHubChannel *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubChannel_reset(SIE_dHubChannel *p); + SIGN32 dHubChannel_cmp (SIE_dHubChannel *p, SIE_dHubChannel *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubChannel_check(p,pie,pfx,hLOG) dHubChannel_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubChannel_print(p, pfx,hLOG) dHubChannel_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubChannel +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubReg biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 SemaHub +/// $SemaHub SemaHub REG +/// ### +/// * For dHub internal interrupts, also provide semaphore service for external (all channels will be opened to external to access). +/// * Channel 0 is used for dHub.HBO interrupt. +/// * Channel N+1 is used for dHub.Channel[N] interrupt. +/// ### +/// @ 0x00400 (P) +/// # 0x00400 HBO +/// $HBO HBO REG +/// ### +/// * For dHub channels (command/data queues), also provide (unused) FIFO service for external. +/// * Channel 2N is used for dHub.Channel[N] command. +/// * Channel 2N+1 is used for dHub.Channel[N] data. +/// ### +/// @ 0x00B00 ARR (P) +/// # 0x00B00 channelCtl +/// $dHubChannel channelCtl REG [16] +/// ### +/// * Up-to 16 channels +/// ### +/// @ 0x00C00 BUSY (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: no ongoing command is being processed, and no flushing is taking place +/// * 1: channel controller is busy +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C04 PENDING (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: Response queue is empty, meaning no outstanding AXI transactions +/// * 1: there exist some outstanding AXI transactions +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C08 busRstEn (RW-) +/// %unsigned 1 reg 0x0 +/// ### +/// * Write one to this register will trigger gate-keeper to take over the AXI bus. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00C0C busRstDone (R-) +/// %unsigned 1 reg 0x1 +/// ### +/// * After gate-keeper take over the AXI bus, it will assert this bit once there is no outstanding transactions on AXI bus. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00C10 flowCtl (P) +/// %unsigned 8 rAlpha 0x0 +/// %unsigned 8 wAlpha 0x0 +/// ### +/// * Flow control parameter for read and write axi master. +/// * clkCnt=(alpha*bstLen)>>4. +/// * This # of clock cycles will be blocked for the axi master after an axi command with the burst length of “bstLenâ€. +/// * When set alpha to be 0, the master will never be blocked. +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C14 axiCmdCol (P) +/// %unsigned 16 rCnt 0x0 +/// %unsigned 16 wCnt 0x0 +/// ### +/// * Axi command collection. The counter value indicate read/write do the command collection for # of clock cycles, start from the first command pushed to an empty command Q. Here are the conditions that will trigger the Axi master to send out command. +/// * Cmd Q full or the counter count down to “0†from the programmed value. +/// * Set the counter to 0 will disable the command collection. +/// * end dHubReg +/// ### +/// @ 0x00C18 (W-) +/// # # Stuffing bytes... +/// %% 1856 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 3328B, bits: 3314b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubReg +#define h_dHubReg (){} + + #define RA_dHubReg_SemaHub 0x0000 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_HBO 0x0400 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_ARR 0x0B00 + #define RA_dHubReg_channelCtl 0x0B00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_BUSY 0x0C00 + + #define BA_dHubReg_BUSY_ST 0x0C00 + #define B16dHubReg_BUSY_ST 0x0C00 + #define LSb32dHubReg_BUSY_ST 0 + #define LSb16dHubReg_BUSY_ST 0 + #define bdHubReg_BUSY_ST 16 + #define MSK32dHubReg_BUSY_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg_PENDING 0x0C04 + + #define BA_dHubReg_PENDING_ST 0x0C04 + #define B16dHubReg_PENDING_ST 0x0C04 + #define LSb32dHubReg_PENDING_ST 0 + #define LSb16dHubReg_PENDING_ST 0 + #define bdHubReg_PENDING_ST 16 + #define MSK32dHubReg_PENDING_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg_busRstEn 0x0C08 + + #define BA_dHubReg_busRstEn_reg 0x0C08 + #define B16dHubReg_busRstEn_reg 0x0C08 + #define LSb32dHubReg_busRstEn_reg 0 + #define LSb16dHubReg_busRstEn_reg 0 + #define bdHubReg_busRstEn_reg 1 + #define MSK32dHubReg_busRstEn_reg 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_busRstDone 0x0C0C + + #define BA_dHubReg_busRstDone_reg 0x0C0C + #define B16dHubReg_busRstDone_reg 0x0C0C + #define LSb32dHubReg_busRstDone_reg 0 + #define LSb16dHubReg_busRstDone_reg 0 + #define bdHubReg_busRstDone_reg 1 + #define MSK32dHubReg_busRstDone_reg 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_flowCtl 0x0C10 + + #define BA_dHubReg_flowCtl_rAlpha 0x0C10 + #define B16dHubReg_flowCtl_rAlpha 0x0C10 + #define LSb32dHubReg_flowCtl_rAlpha 0 + #define LSb16dHubReg_flowCtl_rAlpha 0 + #define bdHubReg_flowCtl_rAlpha 8 + #define MSK32dHubReg_flowCtl_rAlpha 0x000000FF + + #define BA_dHubReg_flowCtl_wAlpha 0x0C11 + #define B16dHubReg_flowCtl_wAlpha 0x0C10 + #define LSb32dHubReg_flowCtl_wAlpha 8 + #define LSb16dHubReg_flowCtl_wAlpha 8 + #define bdHubReg_flowCtl_wAlpha 8 + #define MSK32dHubReg_flowCtl_wAlpha 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_axiCmdCol 0x0C14 + + #define BA_dHubReg_axiCmdCol_rCnt 0x0C14 + #define B16dHubReg_axiCmdCol_rCnt 0x0C14 + #define LSb32dHubReg_axiCmdCol_rCnt 0 + #define LSb16dHubReg_axiCmdCol_rCnt 0 + #define bdHubReg_axiCmdCol_rCnt 16 + #define MSK32dHubReg_axiCmdCol_rCnt 0x0000FFFF + + #define BA_dHubReg_axiCmdCol_wCnt 0x0C16 + #define B16dHubReg_axiCmdCol_wCnt 0x0C16 + #define LSb32dHubReg_axiCmdCol_wCnt 16 + #define LSb16dHubReg_axiCmdCol_wCnt 0 + #define bdHubReg_axiCmdCol_wCnt 16 + #define MSK32dHubReg_axiCmdCol_wCnt 0xFFFF0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubReg { + /////////////////////////////////////////////////////////// + SIE_SemaHub ie_SemaHub; + /////////////////////////////////////////////////////////// + SIE_HBO ie_HBO; + /////////////////////////////////////////////////////////// + SIE_dHubChannel ie_channelCtl[16]; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_BUSY_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_BUSY_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_BUSY_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_BUSY_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_BUSY {\ + UNSG32 uBUSY_ST : 16;\ + UNSG32 RSVDxC00_b16 : 16;\ + } + union { UNSG32 u32dHubReg_BUSY; + struct w32dHubReg_BUSY; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_PENDING_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_PENDING_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_PENDING_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_PENDING_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_PENDING {\ + UNSG32 uPENDING_ST : 16;\ + UNSG32 RSVDxC04_b16 : 16;\ + } + union { UNSG32 u32dHubReg_PENDING; + struct w32dHubReg_PENDING; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_busRstEn_reg(r32) _BFGET_(r32, 0, 0) + #define SET32dHubReg_busRstEn_reg(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubReg_busRstEn_reg(r16) _BFGET_(r16, 0, 0) + #define SET16dHubReg_busRstEn_reg(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubReg_busRstEn {\ + UNSG32 ubusRstEn_reg : 1;\ + UNSG32 RSVDxC08_b1 : 31;\ + } + union { UNSG32 u32dHubReg_busRstEn; + struct w32dHubReg_busRstEn; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_busRstDone_reg(r32) _BFGET_(r32, 0, 0) + #define SET32dHubReg_busRstDone_reg(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubReg_busRstDone_reg(r16) _BFGET_(r16, 0, 0) + #define SET16dHubReg_busRstDone_reg(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubReg_busRstDone {\ + UNSG32 ubusRstDone_reg : 1;\ + UNSG32 RSVDxC0C_b1 : 31;\ + } + union { UNSG32 u32dHubReg_busRstDone; + struct w32dHubReg_busRstDone; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_flowCtl_rAlpha(r32) _BFGET_(r32, 7, 0) + #define SET32dHubReg_flowCtl_rAlpha(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16dHubReg_flowCtl_rAlpha(r16) _BFGET_(r16, 7, 0) + #define SET16dHubReg_flowCtl_rAlpha(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32dHubReg_flowCtl_wAlpha(r32) _BFGET_(r32,15, 8) + #define SET32dHubReg_flowCtl_wAlpha(r32,v) _BFSET_(r32,15, 8,v) + #define GET16dHubReg_flowCtl_wAlpha(r16) _BFGET_(r16,15, 8) + #define SET16dHubReg_flowCtl_wAlpha(r16,v) _BFSET_(r16,15, 8,v) + + #define w32dHubReg_flowCtl {\ + UNSG32 uflowCtl_rAlpha : 8;\ + UNSG32 uflowCtl_wAlpha : 8;\ + UNSG32 RSVDxC10_b16 : 16;\ + } + union { UNSG32 u32dHubReg_flowCtl; + struct w32dHubReg_flowCtl; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_axiCmdCol_rCnt(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_axiCmdCol_rCnt(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_axiCmdCol_rCnt(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_axiCmdCol_rCnt(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubReg_axiCmdCol_wCnt(r32) _BFGET_(r32,31,16) + #define SET32dHubReg_axiCmdCol_wCnt(r32,v) _BFSET_(r32,31,16,v) + #define GET16dHubReg_axiCmdCol_wCnt(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_axiCmdCol_wCnt(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_axiCmdCol {\ + UNSG32 uaxiCmdCol_rCnt : 16;\ + UNSG32 uaxiCmdCol_wCnt : 16;\ + } + union { UNSG32 u32dHubReg_axiCmdCol; + struct w32dHubReg_axiCmdCol; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxC18 [232]; + /////////////////////////////////////////////////////////// + } SIE_dHubReg; + + typedef union T32dHubReg_BUSY + { UNSG32 u32; + struct w32dHubReg_BUSY; + } T32dHubReg_BUSY; + typedef union T32dHubReg_PENDING + { UNSG32 u32; + struct w32dHubReg_PENDING; + } T32dHubReg_PENDING; + typedef union T32dHubReg_busRstEn + { UNSG32 u32; + struct w32dHubReg_busRstEn; + } T32dHubReg_busRstEn; + typedef union T32dHubReg_busRstDone + { UNSG32 u32; + struct w32dHubReg_busRstDone; + } T32dHubReg_busRstDone; + typedef union T32dHubReg_flowCtl + { UNSG32 u32; + struct w32dHubReg_flowCtl; + } T32dHubReg_flowCtl; + typedef union T32dHubReg_axiCmdCol + { UNSG32 u32; + struct w32dHubReg_axiCmdCol; + } T32dHubReg_axiCmdCol; + /////////////////////////////////////////////////////////// + + typedef union TdHubReg_BUSY + { UNSG32 u32[1]; + struct { + struct w32dHubReg_BUSY; + }; + } TdHubReg_BUSY; + typedef union TdHubReg_PENDING + { UNSG32 u32[1]; + struct { + struct w32dHubReg_PENDING; + }; + } TdHubReg_PENDING; + typedef union TdHubReg_busRstEn + { UNSG32 u32[1]; + struct { + struct w32dHubReg_busRstEn; + }; + } TdHubReg_busRstEn; + typedef union TdHubReg_busRstDone + { UNSG32 u32[1]; + struct { + struct w32dHubReg_busRstDone; + }; + } TdHubReg_busRstDone; + typedef union TdHubReg_flowCtl + { UNSG32 u32[1]; + struct { + struct w32dHubReg_flowCtl; + }; + } TdHubReg_flowCtl; + typedef union TdHubReg_axiCmdCol + { UNSG32 u32[1]; + struct { + struct w32dHubReg_axiCmdCol; + }; + } TdHubReg_axiCmdCol; + + /////////////////////////////////////////////////////////// + SIGN32 dHubReg_drvrd(SIE_dHubReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubReg_drvwr(SIE_dHubReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubReg_reset(SIE_dHubReg *p); + SIGN32 dHubReg_cmp (SIE_dHubReg *p, SIE_dHubReg *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubReg_check(p,pie,pfx,hLOG) dHubReg_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubReg_print(p, pfx,hLOG) dHubReg_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubReg +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmd2D biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 MEM (W-) +/// %unsigned 32 addr +/// ### +/// * DRAM data address of the 2D buffer, in bytes. +/// ### +/// @ 0x00004 DESC (W-) +/// %unsigned 16 stride +/// ### +/// * Line stride size in bytes +/// ### +/// %unsigned 13 numLine +/// ### +/// * Number of lines in buffer. Size of 0 is forbidden. +/// ### +/// %unsigned 2 hdrLoop +/// ### +/// * Size of line-loop for choosing dHubCmdHDR +/// * 0 is treated as 4 +/// ### +/// %unsigned 1 interrupt +/// ### +/// * 1: raise interrupt upon whole 2D command finish. +/// * 1: set the last 1D command interrupt bit. +/// * 0 : use the default 1D command interrupt bit. +/// ### +/// @ 0x00008 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to enable the channel; 0 to pause the channel +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to reset the 2D engine. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00010 (P) +/// # 0x00010 HDR +/// $dHubCmdHDR HDR REG [4] +/// ### +/// * Headers used in generating dHubCmd for each line in looping order, loop size (1,2,3,4) specified by DESC_hdrLoop +/// * end dHubCmd2D +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 32B, bits: 182b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmd2D +#define h_dHubCmd2D (){} + + #define RA_dHubCmd2D_MEM 0x0000 + + #define BA_dHubCmd2D_MEM_addr 0x0000 + #define B16dHubCmd2D_MEM_addr 0x0000 + #define LSb32dHubCmd2D_MEM_addr 0 + #define LSb16dHubCmd2D_MEM_addr 0 + #define bdHubCmd2D_MEM_addr 32 + #define MSK32dHubCmd2D_MEM_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_DESC 0x0004 + + #define BA_dHubCmd2D_DESC_stride 0x0004 + #define B16dHubCmd2D_DESC_stride 0x0004 + #define LSb32dHubCmd2D_DESC_stride 0 + #define LSb16dHubCmd2D_DESC_stride 0 + #define bdHubCmd2D_DESC_stride 16 + #define MSK32dHubCmd2D_DESC_stride 0x0000FFFF + + #define BA_dHubCmd2D_DESC_numLine 0x0006 + #define B16dHubCmd2D_DESC_numLine 0x0006 + #define LSb32dHubCmd2D_DESC_numLine 16 + #define LSb16dHubCmd2D_DESC_numLine 0 + #define bdHubCmd2D_DESC_numLine 13 + #define MSK32dHubCmd2D_DESC_numLine 0x1FFF0000 + + #define BA_dHubCmd2D_DESC_hdrLoop 0x0007 + #define B16dHubCmd2D_DESC_hdrLoop 0x0006 + #define LSb32dHubCmd2D_DESC_hdrLoop 29 + #define LSb16dHubCmd2D_DESC_hdrLoop 13 + #define bdHubCmd2D_DESC_hdrLoop 2 + #define MSK32dHubCmd2D_DESC_hdrLoop 0x60000000 + + #define BA_dHubCmd2D_DESC_interrupt 0x0007 + #define B16dHubCmd2D_DESC_interrupt 0x0006 + #define LSb32dHubCmd2D_DESC_interrupt 31 + #define LSb16dHubCmd2D_DESC_interrupt 15 + #define bdHubCmd2D_DESC_interrupt 1 + #define MSK32dHubCmd2D_DESC_interrupt 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_START 0x0008 + + #define BA_dHubCmd2D_START_EN 0x0008 + #define B16dHubCmd2D_START_EN 0x0008 + #define LSb32dHubCmd2D_START_EN 0 + #define LSb16dHubCmd2D_START_EN 0 + #define bdHubCmd2D_START_EN 1 + #define MSK32dHubCmd2D_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_CLEAR 0x000C + + #define BA_dHubCmd2D_CLEAR_EN 0x000C + #define B16dHubCmd2D_CLEAR_EN 0x000C + #define LSb32dHubCmd2D_CLEAR_EN 0 + #define LSb16dHubCmd2D_CLEAR_EN 0 + #define bdHubCmd2D_CLEAR_EN 1 + #define MSK32dHubCmd2D_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_HDR 0x0010 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmd2D { + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_MEM_addr(r32) _BFGET_(r32,31, 0) + #define SET32dHubCmd2D_MEM_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32dHubCmd2D_MEM {\ + UNSG32 uMEM_addr : 32;\ + } + union { UNSG32 u32dHubCmd2D_MEM; + struct w32dHubCmd2D_MEM; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_DESC_stride(r32) _BFGET_(r32,15, 0) + #define SET32dHubCmd2D_DESC_stride(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubCmd2D_DESC_stride(r16) _BFGET_(r16,15, 0) + #define SET16dHubCmd2D_DESC_stride(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubCmd2D_DESC_numLine(r32) _BFGET_(r32,28,16) + #define SET32dHubCmd2D_DESC_numLine(r32,v) _BFSET_(r32,28,16,v) + #define GET16dHubCmd2D_DESC_numLine(r16) _BFGET_(r16,12, 0) + #define SET16dHubCmd2D_DESC_numLine(r16,v) _BFSET_(r16,12, 0,v) + + #define GET32dHubCmd2D_DESC_hdrLoop(r32) _BFGET_(r32,30,29) + #define SET32dHubCmd2D_DESC_hdrLoop(r32,v) _BFSET_(r32,30,29,v) + #define GET16dHubCmd2D_DESC_hdrLoop(r16) _BFGET_(r16,14,13) + #define SET16dHubCmd2D_DESC_hdrLoop(r16,v) _BFSET_(r16,14,13,v) + + #define GET32dHubCmd2D_DESC_interrupt(r32) _BFGET_(r32,31,31) + #define SET32dHubCmd2D_DESC_interrupt(r32,v) _BFSET_(r32,31,31,v) + #define GET16dHubCmd2D_DESC_interrupt(r16) _BFGET_(r16,15,15) + #define SET16dHubCmd2D_DESC_interrupt(r16,v) _BFSET_(r16,15,15,v) + + #define w32dHubCmd2D_DESC {\ + UNSG32 uDESC_stride : 16;\ + UNSG32 uDESC_numLine : 13;\ + UNSG32 uDESC_hdrLoop : 2;\ + UNSG32 uDESC_interrupt : 1;\ + } + union { UNSG32 u32dHubCmd2D_DESC; + struct w32dHubCmd2D_DESC; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubCmd2D_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubCmd2D_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmd2D_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubCmd2D_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32dHubCmd2D_START; + struct w32dHubCmd2D_START; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubCmd2D_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubCmd2D_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmd2D_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubCmd2D_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32dHubCmd2D_CLEAR; + struct w32dHubCmd2D_CLEAR; + }; + /////////////////////////////////////////////////////////// + SIE_dHubCmdHDR ie_HDR[4]; + /////////////////////////////////////////////////////////// + } SIE_dHubCmd2D; + + typedef union T32dHubCmd2D_MEM + { UNSG32 u32; + struct w32dHubCmd2D_MEM; + } T32dHubCmd2D_MEM; + typedef union T32dHubCmd2D_DESC + { UNSG32 u32; + struct w32dHubCmd2D_DESC; + } T32dHubCmd2D_DESC; + typedef union T32dHubCmd2D_START + { UNSG32 u32; + struct w32dHubCmd2D_START; + } T32dHubCmd2D_START; + typedef union T32dHubCmd2D_CLEAR + { UNSG32 u32; + struct w32dHubCmd2D_CLEAR; + } T32dHubCmd2D_CLEAR; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmd2D_MEM + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_MEM; + }; + } TdHubCmd2D_MEM; + typedef union TdHubCmd2D_DESC + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_DESC; + }; + } TdHubCmd2D_DESC; + typedef union TdHubCmd2D_START + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_START; + }; + } TdHubCmd2D_START; + typedef union TdHubCmd2D_CLEAR + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_CLEAR; + }; + } TdHubCmd2D_CLEAR; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmd2D_drvrd(SIE_dHubCmd2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmd2D_drvwr(SIE_dHubCmd2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmd2D_reset(SIE_dHubCmd2D *p); + SIGN32 dHubCmd2D_cmp (SIE_dHubCmd2D *p, SIE_dHubCmd2D *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmd2D_check(p,pie,pfx,hLOG) dHubCmd2D_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmd2D_print(p, pfx,hLOG) dHubCmd2D_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmd2D +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubQuery (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 RESP (R-) +/// %unsigned 16 ST +/// ### +/// * Dhub channel state machine status. +/// ### +/// %% 16 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 16b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubQuery +#define h_dHubQuery (){} + + #define RA_dHubQuery_RESP 0x0000 + + #define BA_dHubQuery_RESP_ST 0x0000 + #define B16dHubQuery_RESP_ST 0x0000 + #define LSb32dHubQuery_RESP_ST 0 + #define LSb16dHubQuery_RESP_ST 0 + #define bdHubQuery_RESP_ST 16 + #define MSK32dHubQuery_RESP_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubQuery { + /////////////////////////////////////////////////////////// + #define GET32dHubQuery_RESP_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubQuery_RESP_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubQuery_RESP_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubQuery_RESP_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubQuery_RESP {\ + UNSG32 uRESP_ST : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32dHubQuery_RESP; + struct w32dHubQuery_RESP; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubQuery; + + typedef union T32dHubQuery_RESP + { UNSG32 u32; + struct w32dHubQuery_RESP; + } T32dHubQuery_RESP; + /////////////////////////////////////////////////////////// + + typedef union TdHubQuery_RESP + { UNSG32 u32[1]; + struct { + struct w32dHubQuery_RESP; + }; + } TdHubQuery_RESP; + + /////////////////////////////////////////////////////////// + SIGN32 dHubQuery_drvrd(SIE_dHubQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubQuery_drvwr(SIE_dHubQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubQuery_reset(SIE_dHubQuery *p); + SIGN32 dHubQuery_cmp (SIE_dHubQuery *p, SIE_dHubQuery *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubQuery_check(p,pie,pfx,hLOG) dHubQuery_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubQuery_print(p, pfx,hLOG) dHubQuery_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubQuery +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubReg2D biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 dHub +/// $dHubReg dHub REG +/// @ 0x00D00 ARR (P) +/// # 0x00D00 Cmd2D +/// $dHubCmd2D Cmd2D REG [16] +/// ### +/// * Up-to 16 2D channels. +/// * 2D Channel[N] is connected to dHub.Channel[N] command queue, that is, dHub.HBO.Channel[2N] +/// * Note: Number of 2D channels could be less than dHub channels (rest of are 1D only) +/// ### +/// @ 0x00F00 BUSY (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: no ongoing command is being processed +/// * 1: channel controller is busy +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00F04 (W-) +/// # # Stuffing bytes... +/// %% 480 +/// @ 0x00F40 (P) +/// # 0x00F40 CH_ST +/// $dHubQuery CH_ST MEM [16] +/// ### +/// * end dHubReg2D +/// ### +/// @ 0x00F80 (W-) +/// # # Stuffing bytes... +/// %% 1024 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4096B, bits: 6274b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubReg2D +#define h_dHubReg2D (){} + + #define RA_dHubReg2D_dHub 0x0000 + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_ARR 0x0D00 + #define RA_dHubReg2D_Cmd2D 0x0D00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_BUSY 0x0F00 + + #define BA_dHubReg2D_BUSY_ST 0x0F00 + #define B16dHubReg2D_BUSY_ST 0x0F00 + #define LSb32dHubReg2D_BUSY_ST 0 + #define LSb16dHubReg2D_BUSY_ST 0 + #define bdHubReg2D_BUSY_ST 16 + #define MSK32dHubReg2D_BUSY_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_CH_ST 0x0F40 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubReg2D { + /////////////////////////////////////////////////////////// + SIE_dHubReg ie_dHub; + /////////////////////////////////////////////////////////// + SIE_dHubCmd2D ie_Cmd2D[16]; + /////////////////////////////////////////////////////////// + #define GET32dHubReg2D_BUSY_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg2D_BUSY_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg2D_BUSY_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg2D_BUSY_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg2D_BUSY {\ + UNSG32 uBUSY_ST : 16;\ + UNSG32 RSVDxF00_b16 : 16;\ + } + union { UNSG32 u32dHubReg2D_BUSY; + struct w32dHubReg2D_BUSY; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxF04 [60]; + /////////////////////////////////////////////////////////// + SIE_dHubQuery ie_CH_ST[16]; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxF80 [128]; + /////////////////////////////////////////////////////////// + } SIE_dHubReg2D; + + typedef union T32dHubReg2D_BUSY + { UNSG32 u32; + struct w32dHubReg2D_BUSY; + } T32dHubReg2D_BUSY; + /////////////////////////////////////////////////////////// + + typedef union TdHubReg2D_BUSY + { UNSG32 u32[1]; + struct { + struct w32dHubReg2D_BUSY; + }; + } TdHubReg2D_BUSY; + + /////////////////////////////////////////////////////////// + SIGN32 dHubReg2D_drvrd(SIE_dHubReg2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubReg2D_drvwr(SIE_dHubReg2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubReg2D_reset(SIE_dHubReg2D *p); + SIGN32 dHubReg2D_cmp (SIE_dHubReg2D *p, SIE_dHubReg2D *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubReg2D_check(p,pie,pfx,hLOG) dHubReg2D_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubReg2D_print(p, pfx,hLOG) dHubReg2D_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubReg2D +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avif_dhub_config_ChMap (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// %unsigned 4 avif +/// ### +/// * BANK #0 +/// ### +/// : SD_WR 0x0 +/// : SD_RE 0x1 +/// ### +/// * BANK #1 +/// ### +/// : MAIN_WR 0x2 +/// ### +/// * BANK #2 +/// ### +/// : PIP_WR 0x3 +/// ### +/// * BANK #3 +/// ### +/// : VBI_WR 0x4 +/// : AUD_WR0_MAIN 0x5 +/// : AUD_WR1_MAIN 0x6 +/// : AUD_WR2_MAIN 0x7 +/// : AUD_WR3_MAIN 0x8 +/// : AUD_WR0_PIP 0x9 +/// : AUD_WR1_PIP 0xA +/// : AUD_WR2_PIP 0xB +/// : AUD_WR3_PIP 0xC +/// : AUD_RD0 0xD +/// %% 28 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 4b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avif_dhub_config_ChMap +#define h_avif_dhub_config_ChMap (){} + + #define BA_avif_dhub_config_ChMap_avif 0x0000 + #define B16avif_dhub_config_ChMap_avif 0x0000 + #define LSb32avif_dhub_config_ChMap_avif 0 + #define LSb16avif_dhub_config_ChMap_avif 0 + #define bavif_dhub_config_ChMap_avif 4 + #define MSK32avif_dhub_config_ChMap_avif 0x0000000F + #define avif_dhub_config_ChMap_avif_SD_WR 0x0 + #define avif_dhub_config_ChMap_avif_SD_RE 0x1 + #define avif_dhub_config_ChMap_avif_MAIN_WR 0x2 + #define avif_dhub_config_ChMap_avif_PIP_WR 0x3 + #define avif_dhub_config_ChMap_avif_VBI_WR 0x4 + #define avif_dhub_config_ChMap_avif_AUD_WR0_MAIN 0x5 + #define avif_dhub_config_ChMap_avif_AUD_WR1_MAIN 0x6 + #define avif_dhub_config_ChMap_avif_AUD_WR2_MAIN 0x7 + #define avif_dhub_config_ChMap_avif_AUD_WR3_MAIN 0x8 + #define avif_dhub_config_ChMap_avif_AUD_WR0_PIP 0x9 + #define avif_dhub_config_ChMap_avif_AUD_WR1_PIP 0xA + #define avif_dhub_config_ChMap_avif_AUD_WR2_PIP 0xB + #define avif_dhub_config_ChMap_avif_AUD_WR3_PIP 0xC + #define avif_dhub_config_ChMap_avif_AUD_RD0 0xD + /////////////////////////////////////////////////////////// + + typedef struct SIE_avif_dhub_config_ChMap { + /////////////////////////////////////////////////////////// + #define GET32avif_dhub_config_ChMap_avif(r32) _BFGET_(r32, 3, 0) + #define SET32avif_dhub_config_ChMap_avif(r32,v) _BFSET_(r32, 3, 0,v) + #define GET16avif_dhub_config_ChMap_avif(r16) _BFGET_(r16, 3, 0) + #define SET16avif_dhub_config_ChMap_avif(r16,v) _BFSET_(r16, 3, 0,v) + + UNSG32 u_avif : 4; + UNSG32 RSVDx0_b4 : 28; + /////////////////////////////////////////////////////////// + } SIE_avif_dhub_config_ChMap; + + /////////////////////////////////////////////////////////// + SIGN32 avif_dhub_config_ChMap_drvrd(SIE_avif_dhub_config_ChMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avif_dhub_config_ChMap_drvwr(SIE_avif_dhub_config_ChMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avif_dhub_config_ChMap_reset(SIE_avif_dhub_config_ChMap *p); + SIGN32 avif_dhub_config_ChMap_cmp (SIE_avif_dhub_config_ChMap *p, SIE_avif_dhub_config_ChMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avif_dhub_config_ChMap_check(p,pie,pfx,hLOG) avif_dhub_config_ChMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avif_dhub_config_ChMap_print(p, pfx,hLOG) avif_dhub_config_ChMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avif_dhub_config_ChMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avif_dhub_config_TcmMap (4,4) +/// # # ---------------------------------------------------------- +/// : avifDhub_BANK0_START_ADDR 0x0 +/// : avifDhub_BANK0_SIZE 0x2000 +/// : avifDhub_BANK1_START_ADDR 0x2000 +/// : avifDhub_BANK1_SIZE 0x2000 +/// : avifDhub_BANK2_START_ADDR 0x4000 +/// : avifDhub_BANK2_SIZE 0x2000 +/// : avifDhub_BANK3_START_ADDR 0x6000 +/// : avifDhub_BANK3_SIZE 0x2000 +/// @ 0x00000 dummy (P) +/// %unsigned 1 xxx +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 1b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avif_dhub_config_TcmMap +#define h_avif_dhub_config_TcmMap (){} + + #define avif_dhub_config_TcmMap_avifDhub_BANK0_START_ADDR 0x0 + #define avif_dhub_config_TcmMap_avifDhub_BANK0_SIZE 0x2000 + #define avif_dhub_config_TcmMap_avifDhub_BANK1_START_ADDR 0x2000 + #define avif_dhub_config_TcmMap_avifDhub_BANK1_SIZE 0x2000 + #define avif_dhub_config_TcmMap_avifDhub_BANK2_START_ADDR 0x4000 + #define avif_dhub_config_TcmMap_avifDhub_BANK2_SIZE 0x2000 + #define avif_dhub_config_TcmMap_avifDhub_BANK3_START_ADDR 0x6000 + #define avif_dhub_config_TcmMap_avifDhub_BANK3_SIZE 0x2000 + /////////////////////////////////////////////////////////// + #define RA_avif_dhub_config_TcmMap_dummy 0x0000 + + #define BA_avif_dhub_config_TcmMap_dummy_xxx 0x0000 + #define B16avif_dhub_config_TcmMap_dummy_xxx 0x0000 + #define LSb32avif_dhub_config_TcmMap_dummy_xxx 0 + #define LSb16avif_dhub_config_TcmMap_dummy_xxx 0 + #define bavif_dhub_config_TcmMap_dummy_xxx 1 + #define MSK32avif_dhub_config_TcmMap_dummy_xxx 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_avif_dhub_config_TcmMap { + /////////////////////////////////////////////////////////// + #define GET32avif_dhub_config_TcmMap_dummy_xxx(r32) _BFGET_(r32, 0, 0) + #define SET32avif_dhub_config_TcmMap_dummy_xxx(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16avif_dhub_config_TcmMap_dummy_xxx(r16) _BFGET_(r16, 0, 0) + #define SET16avif_dhub_config_TcmMap_dummy_xxx(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32avif_dhub_config_TcmMap_dummy {\ + UNSG32 udummy_xxx : 1;\ + UNSG32 RSVDx0_b1 : 31;\ + } + union { UNSG32 u32avif_dhub_config_TcmMap_dummy; + struct w32avif_dhub_config_TcmMap_dummy; + }; + /////////////////////////////////////////////////////////// + } SIE_avif_dhub_config_TcmMap; + + typedef union T32avif_dhub_config_TcmMap_dummy + { UNSG32 u32; + struct w32avif_dhub_config_TcmMap_dummy; + } T32avif_dhub_config_TcmMap_dummy; + /////////////////////////////////////////////////////////// + + typedef union Tavif_dhub_config_TcmMap_dummy + { UNSG32 u32[1]; + struct { + struct w32avif_dhub_config_TcmMap_dummy; + }; + } Tavif_dhub_config_TcmMap_dummy; + + /////////////////////////////////////////////////////////// + SIGN32 avif_dhub_config_TcmMap_drvrd(SIE_avif_dhub_config_TcmMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avif_dhub_config_TcmMap_drvwr(SIE_avif_dhub_config_TcmMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avif_dhub_config_TcmMap_reset(SIE_avif_dhub_config_TcmMap *p); + SIGN32 avif_dhub_config_TcmMap_cmp (SIE_avif_dhub_config_TcmMap *p, SIE_avif_dhub_config_TcmMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avif_dhub_config_TcmMap_check(p,pie,pfx,hLOG) avif_dhub_config_TcmMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avif_dhub_config_TcmMap_print(p, pfx,hLOG) avif_dhub_config_TcmMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avif_dhub_config_TcmMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avif_dhub_config_SemMap (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// %unsigned 5 avif +/// : CH0_intr 0x0 +/// : CH1_intr 0x1 +/// : CH2_intr 0x2 +/// : CH3_intr 0x3 +/// : CH4_intr 0x4 +/// : CH5_intr 0x5 +/// : CH6_intr 0x6 +/// : CH7_intr 0x7 +/// : CH8_intr 0x8 +/// : CH9_intr 0x9 +/// : CH10_intr 0xA +/// : CH11_intr 0xB +/// : CH12_intr 0xC +/// : CH13_intr 0xD +/// : CH14_intr 0xE +/// : CH15_intr 0xF +/// %% 27 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 5b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avif_dhub_config_SemMap +#define h_avif_dhub_config_SemMap (){} + + #define BA_avif_dhub_config_SemMap_avif 0x0000 + #define B16avif_dhub_config_SemMap_avif 0x0000 + #define LSb32avif_dhub_config_SemMap_avif 0 + #define LSb16avif_dhub_config_SemMap_avif 0 + #define bavif_dhub_config_SemMap_avif 5 + #define MSK32avif_dhub_config_SemMap_avif 0x0000001F + #define avif_dhub_config_SemMap_avif_CH0_intr 0x0 + #define avif_dhub_config_SemMap_avif_CH1_intr 0x1 + #define avif_dhub_config_SemMap_avif_CH2_intr 0x2 + #define avif_dhub_config_SemMap_avif_CH3_intr 0x3 + #define avif_dhub_config_SemMap_avif_CH4_intr 0x4 + #define avif_dhub_config_SemMap_avif_CH5_intr 0x5 + #define avif_dhub_config_SemMap_avif_CH6_intr 0x6 + #define avif_dhub_config_SemMap_avif_CH7_intr 0x7 + #define avif_dhub_config_SemMap_avif_CH8_intr 0x8 + #define avif_dhub_config_SemMap_avif_CH9_intr 0x9 + #define avif_dhub_config_SemMap_avif_CH10_intr 0xA + #define avif_dhub_config_SemMap_avif_CH11_intr 0xB + #define avif_dhub_config_SemMap_avif_CH12_intr 0xC + #define avif_dhub_config_SemMap_avif_CH13_intr 0xD + #define avif_dhub_config_SemMap_avif_CH14_intr 0xE + #define avif_dhub_config_SemMap_avif_CH15_intr 0xF + + //FIXME: vijaykr - need to modify for AVIF + #define avif_dhub_config_SemMap_avif_rde_event_intr 0x10 + #define avif_dhub_config_SemMap_avif_wre_event_intr 0x11 + #define avif_dhub_config_SemMap_avif_dvi_vde_intr 0x12 + #define avif_dhub_config_SemMap_avif_sd_err_intr 0x13 + #define avif_dhub_config_SemMap_avif_audio_intr 0x14 + #define avif_dhub_config_SemMap_avif_vbi_vde_intr 0x15 + #define avif_dhub_config_SemMap_avif_sig_err_intr 0x16 + #define avif_dhub_config_SemMap_avif_bcmInvalidReqIntr 0x17 + #define avif_dhub_config_SemMap_avif_hdmirx_intr 0x18 + + + /////////////////////////////////////////////////////////// + + typedef struct SIE_avif_dhub_config_SemMap { + /////////////////////////////////////////////////////////// + #define GET32avif_dhub_config_SemMap_avif(r32) _BFGET_(r32, 4, 0) + #define SET32avif_dhub_config_SemMap_avif(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16avif_dhub_config_SemMap_avif(r16) _BFGET_(r16, 4, 0) + #define SET16avif_dhub_config_SemMap_avif(r16,v) _BFSET_(r16, 4, 0,v) + + UNSG32 u_avif : 5; + UNSG32 RSVDx0_b5 : 27; + /////////////////////////////////////////////////////////// + } SIE_avif_dhub_config_SemMap; + + /////////////////////////////////////////////////////////// + SIGN32 avif_dhub_config_SemMap_drvrd(SIE_avif_dhub_config_SemMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avif_dhub_config_SemMap_drvwr(SIE_avif_dhub_config_SemMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avif_dhub_config_SemMap_reset(SIE_avif_dhub_config_SemMap *p); + SIGN32 avif_dhub_config_SemMap_cmp (SIE_avif_dhub_config_SemMap *p, SIE_avif_dhub_config_SemMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avif_dhub_config_SemMap_check(p,pie,pfx,hLOG) avif_dhub_config_SemMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avif_dhub_config_SemMap_print(p, pfx,hLOG) avif_dhub_config_SemMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avif_dhub_config_SemMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avif_dhub_config_TcmEntry (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (R-) +/// %unsigned 32 dat +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 32b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avif_dhub_config_TcmEntry +#define h_avif_dhub_config_TcmEntry (){} + + #define BA_avif_dhub_config_TcmEntry_dat 0x0000 + #define B16avif_dhub_config_TcmEntry_dat 0x0000 + #define LSb32avif_dhub_config_TcmEntry_dat 0 + #define LSb16avif_dhub_config_TcmEntry_dat 0 + #define bavif_dhub_config_TcmEntry_dat 32 + #define MSK32avif_dhub_config_TcmEntry_dat 0xFFFFFFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_avif_dhub_config_TcmEntry { + /////////////////////////////////////////////////////////// + #define GET32avif_dhub_config_TcmEntry_dat(r32) _BFGET_(r32,31, 0) + #define SET32avif_dhub_config_TcmEntry_dat(r32,v) _BFSET_(r32,31, 0,v) + + UNSG32 u_dat : 32; + /////////////////////////////////////////////////////////// + } SIE_avif_dhub_config_TcmEntry; + + /////////////////////////////////////////////////////////// + SIGN32 avif_dhub_config_TcmEntry_drvrd(SIE_avif_dhub_config_TcmEntry *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avif_dhub_config_TcmEntry_drvwr(SIE_avif_dhub_config_TcmEntry *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avif_dhub_config_TcmEntry_reset(SIE_avif_dhub_config_TcmEntry *p); + SIGN32 avif_dhub_config_TcmEntry_cmp (SIE_avif_dhub_config_TcmEntry *p, SIE_avif_dhub_config_TcmEntry *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avif_dhub_config_TcmEntry_check(p,pie,pfx,hLOG) avif_dhub_config_TcmEntry_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avif_dhub_config_TcmEntry_print(p, pfx,hLOG) avif_dhub_config_TcmEntry_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avif_dhub_config_TcmEntry +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avif_dhub_config biu (4,4) +/// ### +/// * avifDhub register specification +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 tcm0 +/// $avif_dhub_config_TcmEntry tcm0 MEM [16384] +/// ### +/// * Real TCM size is 8K*4 Banks= 32KB + 32KB stuffed. Dhub BIU will align to 64KB space +/// ### +/// @ 0x10000 (P) +/// # 0x10000 dHub0 +/// $dHubReg2D dHub0 REG +/// @ 0x11000 (W-) +/// # # Stuffing bytes... +/// %% 491520 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 131072B, bits: 6306b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avif_dhub_config +#define h_avif_dhub_config (){} + + #define RA_avif_dhub_config_tcm0 0x0000 + /////////////////////////////////////////////////////////// + #define RA_avif_dhub_config_dHub0 0x10000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_avif_dhub_config { + /////////////////////////////////////////////////////////// + SIE_avif_dhub_config_TcmEntry ie_tcm0[16384]; + /////////////////////////////////////////////////////////// + SIE_dHubReg2D ie_dHub0; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx11000 [61440]; + /////////////////////////////////////////////////////////// + } SIE_avif_dhub_config; + + /////////////////////////////////////////////////////////// + SIGN32 avif_dhub_config_drvrd(SIE_avif_dhub_config *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avif_dhub_config_drvwr(SIE_avif_dhub_config *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avif_dhub_config_reset(SIE_avif_dhub_config *p); + SIGN32 avif_dhub_config_cmp (SIE_avif_dhub_config *p, SIE_avif_dhub_config *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avif_dhub_config_check(p,pie,pfx,hLOG) avif_dhub_config_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avif_dhub_config_print(p, pfx,hLOG) avif_dhub_config_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avif_dhub_config +//////////////////////////////////////////////////////////// + + + +#ifdef __cplusplus + } +#endif +#pragma pack() + +#endif +////// +/// ENDOFFILE: avif_dhub_config.h +//////////////////////////////////////////////////////////// + diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/avio.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/avio.h new file mode 100644 index 00000000..65be41f9 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/avio.h @@ -0,0 +1,2630 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + +////// +/// don't edit! auto-generated by docc: avio.h +//////////////////////////////////////////////////////////// +#ifndef avio_h +#define avio_h (){} + + +#include "ctypes.h" + +#pragma pack(1) +#ifdef __cplusplus + extern "C" { +#endif + +#ifndef _DOCC_H_BITOPS_ +#define _DOCC_H_BITOPS_ (){} + + #define _bSETMASK_(b) ((b)<32 ? (1<<((b)&31)) : 0) + #define _NSETMASK_(msb,lsb) (_bSETMASK_((msb)+1)-_bSETMASK_(lsb)) + #define _bCLRMASK_(b) (~_bSETMASK_(b)) + #define _NCLRMASK_(msb,lsb) (~_NSETMASK_(msb,lsb)) + #define _BFGET_(r,msb,lsb) (_NSETMASK_((msb)-(lsb),0)&((r)>>(lsb))) + #define _BFSET_(r,msb,lsb,v) do{ (r)&=_NCLRMASK_(msb,lsb); (r)|=_NSETMASK_(msb,lsb)&((v)<<(lsb)); }while(0) + +#endif + + + +////// +/// +/// $INTERFACE oneReg (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (R-) +/// %unsigned 32 0x00000000 +/// ### +/// * One 32 bit entry for the BCM queue +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 32b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_oneReg +#define h_oneReg (){} + + #define BA_oneReg_0x00000000 0x0000 + #define B16oneReg_0x00000000 0x0000 + #define LSb32oneReg_0x00000000 0 + #define LSb16oneReg_0x00000000 0 + #define boneReg_0x00000000 32 + #define MSK32oneReg_0x00000000 0xFFFFFFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_oneReg { + /////////////////////////////////////////////////////////// + #define GET32oneReg_0x00000000(r32) _BFGET_(r32,31, 0) + #define SET32oneReg_0x00000000(r32,v) _BFSET_(r32,31, 0,v) + + UNSG32 u_0x00000000 : 32; + /////////////////////////////////////////////////////////// + } SIE_oneReg; + + /////////////////////////////////////////////////////////// + SIGN32 oneReg_drvrd(SIE_oneReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 oneReg_drvwr(SIE_oneReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void oneReg_reset(SIE_oneReg *p); + SIGN32 oneReg_cmp (SIE_oneReg *p, SIE_oneReg *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define oneReg_check(p,pie,pfx,hLOG) oneReg_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define oneReg_print(p, pfx,hLOG) oneReg_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: oneReg +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE AVIO_REG (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 dummy +/// $oneReg dummy REG [64] +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 256B, bits: 2048b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_AVIO_REG +#define h_AVIO_REG (){} + + #define RA_AVIO_REG_dummy 0x0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_AVIO_REG { + /////////////////////////////////////////////////////////// + SIE_oneReg ie_dummy[64]; + /////////////////////////////////////////////////////////// + } SIE_AVIO_REG; + + /////////////////////////////////////////////////////////// + SIGN32 AVIO_REG_drvrd(SIE_AVIO_REG *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 AVIO_REG_drvwr(SIE_AVIO_REG *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void AVIO_REG_reset(SIE_AVIO_REG *p); + SIGN32 AVIO_REG_cmp (SIE_AVIO_REG *p, SIE_AVIO_REG *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define AVIO_REG_check(p,pie,pfx,hLOG) AVIO_REG_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define AVIO_REG_print(p, pfx,hLOG) AVIO_REG_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: AVIO_REG +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE OCCURENCE (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (WOC-) +/// %unsigned 8 AUTO_PUSH_CNT 0x0 +/// ### +/// * One 8 bit counter value for the BCM queue +/// ### +/// %% 24 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 8b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_OCCURENCE +#define h_OCCURENCE (){} + + #define BA_OCCURENCE_AUTO_PUSH_CNT 0x0000 + #define B16OCCURENCE_AUTO_PUSH_CNT 0x0000 + #define LSb32OCCURENCE_AUTO_PUSH_CNT 0 + #define LSb16OCCURENCE_AUTO_PUSH_CNT 0 + #define bOCCURENCE_AUTO_PUSH_CNT 8 + #define MSK32OCCURENCE_AUTO_PUSH_CNT 0x000000FF + /////////////////////////////////////////////////////////// + + typedef struct SIE_OCCURENCE { + /////////////////////////////////////////////////////////// + #define GET32OCCURENCE_AUTO_PUSH_CNT(r32) _BFGET_(r32, 7, 0) + #define SET32OCCURENCE_AUTO_PUSH_CNT(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16OCCURENCE_AUTO_PUSH_CNT(r16) _BFGET_(r16, 7, 0) + #define SET16OCCURENCE_AUTO_PUSH_CNT(r16,v) _BFSET_(r16, 7, 0,v) + + UNSG32 u_AUTO_PUSH_CNT : 8; + UNSG32 RSVDx0_b8 : 24; + /////////////////////////////////////////////////////////// + } SIE_OCCURENCE; + + /////////////////////////////////////////////////////////// + SIGN32 OCCURENCE_drvrd(SIE_OCCURENCE *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 OCCURENCE_drvwr(SIE_OCCURENCE *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void OCCURENCE_reset(SIE_OCCURENCE *p); + SIGN32 OCCURENCE_cmp (SIE_OCCURENCE *p, SIE_OCCURENCE *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define OCCURENCE_check(p,pie,pfx,hLOG) OCCURENCE_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define OCCURENCE_print(p, pfx,hLOG) OCCURENCE_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: OCCURENCE +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE AVIO biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (R-) +/// # 0x00000 cfgReg +/// $AVIO_REG cfgReg MEM +/// @ 0x00100 BCM_Q0 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #0. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00104 BCM_Q1 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #1. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00108 BCM_Q2 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #2. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x0010C BCM_Q3 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #3. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00110 BCM_Q4 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #4. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00114 BCM_Q5 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #5. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00118 BCM_Q6 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #6. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x0011C BCM_Q7 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #7. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00120 BCM_Q8 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #8. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00124 BCM_Q9 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #9. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00128 BCM_Q10 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #10. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x0012C BCM_Q11 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #11. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00130 BCM_Q14 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #14. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00134 BCM_Q15 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #15. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00138 BCM_Q16 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #16. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x0013C BCM_Q17 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #17. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00140 BCM_Q18 (P) +/// %unsigned 5 mux 0x1F +/// ### +/// * This mux defines the mapping between the interrupt and the BCM queue #18. +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00144 BCM_FULL_STS (R-) +/// %unsigned 1 Q0 0x0 +/// %unsigned 1 Q1 0x0 +/// %unsigned 1 Q2 0x0 +/// %unsigned 1 Q3 0x0 +/// %unsigned 1 Q4 0x0 +/// %unsigned 1 Q5 0x0 +/// %unsigned 1 Q6 0x0 +/// %unsigned 1 Q7 0x0 +/// %unsigned 1 Q8 0x0 +/// %unsigned 1 Q9 0x0 +/// %unsigned 1 Q10 0x0 +/// %unsigned 1 Q11 0x0 +/// %unsigned 1 Q12 0x0 +/// %unsigned 1 Q13 0x0 +/// %unsigned 1 Q14 0x0 +/// %unsigned 1 Q15 0x0 +/// %unsigned 1 Q16 0x0 +/// %unsigned 1 Q17 0x0 +/// %unsigned 1 Q18 0x0 +/// %unsigned 1 Q31 0x0 +/// ### +/// * This bit indicates the full status of each queue. One bit is assigned per queue. SW should poll this queue before programming the queue. If the queue is full and SW programs the queue, data will be lost. +/// ### +/// %% 12 # Stuffing bits... +/// @ 0x00148 BCM_EMP_STS (R-) +/// %unsigned 1 Q0 0x0 +/// %unsigned 1 Q1 0x0 +/// %unsigned 1 Q2 0x0 +/// %unsigned 1 Q3 0x0 +/// %unsigned 1 Q4 0x0 +/// %unsigned 1 Q5 0x0 +/// %unsigned 1 Q6 0x0 +/// %unsigned 1 Q7 0x0 +/// %unsigned 1 Q8 0x0 +/// %unsigned 1 Q9 0x0 +/// %unsigned 1 Q10 0x0 +/// %unsigned 1 Q11 0x0 +/// %unsigned 1 Q12 0x0 +/// %unsigned 1 Q13 0x0 +/// %unsigned 1 Q14 0x0 +/// %unsigned 1 Q15 0x0 +/// %unsigned 1 Q16 0x0 +/// %unsigned 1 Q17 0x0 +/// %unsigned 1 Q18 0x0 +/// %unsigned 1 Q31 0x0 +/// ### +/// * This bit indicates the empty status of each queue. +/// ### +/// %% 12 # Stuffing bits... +/// @ 0x0014C BCM_FLUSH (P) +/// %unsigned 1 Q0 0x0 +/// %unsigned 1 Q1 0x0 +/// %unsigned 1 Q2 0x0 +/// %unsigned 1 Q3 0x0 +/// %unsigned 1 Q4 0x0 +/// %unsigned 1 Q5 0x0 +/// %unsigned 1 Q6 0x0 +/// %unsigned 1 Q7 0x0 +/// %unsigned 1 Q8 0x0 +/// %unsigned 1 Q9 0x0 +/// %unsigned 1 Q10 0x0 +/// %unsigned 1 Q11 0x0 +/// %unsigned 1 Q12 0x0 +/// %unsigned 1 Q13 0x0 +/// %unsigned 1 Q14 0x0 +/// %unsigned 1 Q15 0x0 +/// %unsigned 1 Q16 0x0 +/// %unsigned 1 Q17 0x0 +/// %unsigned 1 Q18 0x0 +/// %unsigned 1 Q31 0x0 +/// ### +/// * This bit is used to clear each queue. +/// * 1: queue is cleared +/// * 0: queue is not cleared, normal operation. +/// ### +/// %% 12 # Stuffing bits... +/// @ 0x00150 BCM_AUTOPUSH_CNT (WOC-) +/// %unsigned 32 OCCURENCE 0x0 +/// @ 0x00154 (P) +/// # 0x00154 Q0 +/// $OCCURENCE Q0 REG +/// @ 0x00158 (P) +/// # 0x00158 Q1 +/// $OCCURENCE Q1 REG +/// @ 0x0015C (P) +/// # 0x0015C Q2 +/// $OCCURENCE Q2 REG +/// @ 0x00160 (P) +/// # 0x00160 Q3 +/// $OCCURENCE Q3 REG +/// @ 0x00164 (P) +/// # 0x00164 Q4 +/// $OCCURENCE Q4 REG +/// @ 0x00168 (P) +/// # 0x00168 Q5 +/// $OCCURENCE Q5 REG +/// @ 0x0016C (P) +/// # 0x0016C Q6 +/// $OCCURENCE Q6 REG +/// @ 0x00170 (P) +/// # 0x00170 Q7 +/// $OCCURENCE Q7 REG +/// @ 0x00174 (P) +/// # 0x00174 Q8 +/// $OCCURENCE Q8 REG +/// @ 0x00178 (P) +/// # 0x00178 Q9 +/// $OCCURENCE Q9 REG +/// @ 0x0017C (P) +/// # 0x0017C Q10 +/// $OCCURENCE Q10 REG +/// @ 0x00180 (P) +/// # 0x00180 Q11 +/// $OCCURENCE Q11 REG +/// @ 0x00184 (P) +/// # 0x00184 Q14 +/// $OCCURENCE Q14 REG +/// @ 0x00188 (P) +/// # 0x00188 Q15 +/// $OCCURENCE Q15 REG +/// @ 0x0018C (P) +/// # 0x0018C Q16 +/// $OCCURENCE Q16 REG +/// @ 0x00190 (P) +/// # 0x00190 Q17 +/// $OCCURENCE Q17 REG +/// @ 0x00194 (P) +/// # 0x00194 Q18 +/// $OCCURENCE Q18 REG +/// ### +/// * This register records number of occurences of BCM AUTOPUSH event +/// ### +/// @ 0x00198 BCM_AUTOPUSH (P) +/// %unsigned 1 Q0 0x0 +/// %unsigned 1 Q1 0x0 +/// %unsigned 1 Q2 0x0 +/// %unsigned 1 Q3 0x0 +/// %unsigned 1 Q4 0x0 +/// %unsigned 1 Q5 0x0 +/// %unsigned 1 Q6 0x0 +/// %unsigned 1 Q7 0x0 +/// %unsigned 1 Q8 0x0 +/// %unsigned 1 Q9 0x0 +/// %unsigned 1 Q10 0x0 +/// %unsigned 1 Q11 0x0 +/// %unsigned 1 Q12 0x0 +/// %unsigned 1 Q13 0x0 +/// %unsigned 1 Q14 0x0 +/// %unsigned 1 Q15 0x0 +/// %unsigned 1 Q16 0x0 +/// %unsigned 1 Q17 0x0 +/// %unsigned 1 Q18 0x0 +/// ### +/// * When this bit is set to 1 for a Q and corresponding Q is empty when interrupt event for the Q occurs, BCM automatically pushes last command in that particular Q +/// ### +/// %% 13 # Stuffing bits... +/// @ 0x0019C BCM_FULL_STS_STICKY (WOC-) +/// %unsigned 1 Q0 0x0 +/// %unsigned 1 Q1 0x0 +/// %unsigned 1 Q2 0x0 +/// %unsigned 1 Q3 0x0 +/// %unsigned 1 Q4 0x0 +/// %unsigned 1 Q5 0x0 +/// %unsigned 1 Q6 0x0 +/// %unsigned 1 Q7 0x0 +/// %unsigned 1 Q8 0x0 +/// %unsigned 1 Q9 0x0 +/// %unsigned 1 Q10 0x0 +/// %unsigned 1 Q11 0x0 +/// %unsigned 1 Q12 0x0 +/// %unsigned 1 Q13 0x0 +/// %unsigned 1 Q14 0x0 +/// %unsigned 1 Q15 0x0 +/// %unsigned 1 Q16 0x0 +/// %unsigned 1 Q17 0x0 +/// %unsigned 1 Q18 0x0 +/// ### +/// * 1: indicates full happened since last clear +/// * 0: full didn't happen since last clear +/// * Software shall write 1 to clear a particular bit. +/// ### +/// %% 13 # Stuffing bits... +/// @ 0x001A0 BCM_ERROR (WOC-) +/// %unsigned 1 err 0x0 +/// ### +/// * Indicates that BCM Engine received a {address, data} pair over data channel interface of dHub's BCM channel, where “address†points to a register that is inaccessible by BCM Engine. +/// * This is a sticky status, and SW need to write 0x1 to clear this bit. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x001A4 BCM_LOG_ADDR (R-) +/// %unsigned 32 addr 0x0 +/// ### +/// * The value of “address†which is inaccessible by BCM engine. It logs the address value for the most recent error transaction. +/// ### +/// @ 0x001A8 BCM_ERROR_DATA (R-) +/// %unsigned 32 data 0x0 +/// ### +/// * The value of “data†in {address, data} pair where address is inaccessible by BCM engine. It logs the data value for the most recent error transaction. +/// ### +/// @ 0x001AC (W-) +/// # # Stuffing bytes... +/// %% 672 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 512B, bits: 448b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_AVIO +#define h_AVIO (){} + + #define RA_AVIO_cfgReg 0x0000 + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q0 0x0100 + + #define BA_AVIO_BCM_Q0_mux 0x0100 + #define B16AVIO_BCM_Q0_mux 0x0100 + #define LSb32AVIO_BCM_Q0_mux 0 + #define LSb16AVIO_BCM_Q0_mux 0 + #define bAVIO_BCM_Q0_mux 5 + #define MSK32AVIO_BCM_Q0_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q1 0x0104 + + #define BA_AVIO_BCM_Q1_mux 0x0104 + #define B16AVIO_BCM_Q1_mux 0x0104 + #define LSb32AVIO_BCM_Q1_mux 0 + #define LSb16AVIO_BCM_Q1_mux 0 + #define bAVIO_BCM_Q1_mux 5 + #define MSK32AVIO_BCM_Q1_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q2 0x0108 + + #define BA_AVIO_BCM_Q2_mux 0x0108 + #define B16AVIO_BCM_Q2_mux 0x0108 + #define LSb32AVIO_BCM_Q2_mux 0 + #define LSb16AVIO_BCM_Q2_mux 0 + #define bAVIO_BCM_Q2_mux 5 + #define MSK32AVIO_BCM_Q2_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q3 0x010C + + #define BA_AVIO_BCM_Q3_mux 0x010C + #define B16AVIO_BCM_Q3_mux 0x010C + #define LSb32AVIO_BCM_Q3_mux 0 + #define LSb16AVIO_BCM_Q3_mux 0 + #define bAVIO_BCM_Q3_mux 5 + #define MSK32AVIO_BCM_Q3_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q4 0x0110 + + #define BA_AVIO_BCM_Q4_mux 0x0110 + #define B16AVIO_BCM_Q4_mux 0x0110 + #define LSb32AVIO_BCM_Q4_mux 0 + #define LSb16AVIO_BCM_Q4_mux 0 + #define bAVIO_BCM_Q4_mux 5 + #define MSK32AVIO_BCM_Q4_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q5 0x0114 + + #define BA_AVIO_BCM_Q5_mux 0x0114 + #define B16AVIO_BCM_Q5_mux 0x0114 + #define LSb32AVIO_BCM_Q5_mux 0 + #define LSb16AVIO_BCM_Q5_mux 0 + #define bAVIO_BCM_Q5_mux 5 + #define MSK32AVIO_BCM_Q5_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q6 0x0118 + + #define BA_AVIO_BCM_Q6_mux 0x0118 + #define B16AVIO_BCM_Q6_mux 0x0118 + #define LSb32AVIO_BCM_Q6_mux 0 + #define LSb16AVIO_BCM_Q6_mux 0 + #define bAVIO_BCM_Q6_mux 5 + #define MSK32AVIO_BCM_Q6_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q7 0x011C + + #define BA_AVIO_BCM_Q7_mux 0x011C + #define B16AVIO_BCM_Q7_mux 0x011C + #define LSb32AVIO_BCM_Q7_mux 0 + #define LSb16AVIO_BCM_Q7_mux 0 + #define bAVIO_BCM_Q7_mux 5 + #define MSK32AVIO_BCM_Q7_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q8 0x0120 + + #define BA_AVIO_BCM_Q8_mux 0x0120 + #define B16AVIO_BCM_Q8_mux 0x0120 + #define LSb32AVIO_BCM_Q8_mux 0 + #define LSb16AVIO_BCM_Q8_mux 0 + #define bAVIO_BCM_Q8_mux 5 + #define MSK32AVIO_BCM_Q8_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q9 0x0124 + + #define BA_AVIO_BCM_Q9_mux 0x0124 + #define B16AVIO_BCM_Q9_mux 0x0124 + #define LSb32AVIO_BCM_Q9_mux 0 + #define LSb16AVIO_BCM_Q9_mux 0 + #define bAVIO_BCM_Q9_mux 5 + #define MSK32AVIO_BCM_Q9_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q10 0x0128 + + #define BA_AVIO_BCM_Q10_mux 0x0128 + #define B16AVIO_BCM_Q10_mux 0x0128 + #define LSb32AVIO_BCM_Q10_mux 0 + #define LSb16AVIO_BCM_Q10_mux 0 + #define bAVIO_BCM_Q10_mux 5 + #define MSK32AVIO_BCM_Q10_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q11 0x012C + + #define BA_AVIO_BCM_Q11_mux 0x012C + #define B16AVIO_BCM_Q11_mux 0x012C + #define LSb32AVIO_BCM_Q11_mux 0 + #define LSb16AVIO_BCM_Q11_mux 0 + #define bAVIO_BCM_Q11_mux 5 + #define MSK32AVIO_BCM_Q11_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q14 0x0130 + + #define BA_AVIO_BCM_Q14_mux 0x0130 + #define B16AVIO_BCM_Q14_mux 0x0130 + #define LSb32AVIO_BCM_Q14_mux 0 + #define LSb16AVIO_BCM_Q14_mux 0 + #define bAVIO_BCM_Q14_mux 5 + #define MSK32AVIO_BCM_Q14_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q15 0x0134 + + #define BA_AVIO_BCM_Q15_mux 0x0134 + #define B16AVIO_BCM_Q15_mux 0x0134 + #define LSb32AVIO_BCM_Q15_mux 0 + #define LSb16AVIO_BCM_Q15_mux 0 + #define bAVIO_BCM_Q15_mux 5 + #define MSK32AVIO_BCM_Q15_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q16 0x0138 + + #define BA_AVIO_BCM_Q16_mux 0x0138 + #define B16AVIO_BCM_Q16_mux 0x0138 + #define LSb32AVIO_BCM_Q16_mux 0 + #define LSb16AVIO_BCM_Q16_mux 0 + #define bAVIO_BCM_Q16_mux 5 + #define MSK32AVIO_BCM_Q16_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q17 0x013C + + #define BA_AVIO_BCM_Q17_mux 0x013C + #define B16AVIO_BCM_Q17_mux 0x013C + #define LSb32AVIO_BCM_Q17_mux 0 + #define LSb16AVIO_BCM_Q17_mux 0 + #define bAVIO_BCM_Q17_mux 5 + #define MSK32AVIO_BCM_Q17_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_Q18 0x0140 + + #define BA_AVIO_BCM_Q18_mux 0x0140 + #define B16AVIO_BCM_Q18_mux 0x0140 + #define LSb32AVIO_BCM_Q18_mux 0 + #define LSb16AVIO_BCM_Q18_mux 0 + #define bAVIO_BCM_Q18_mux 5 + #define MSK32AVIO_BCM_Q18_mux 0x0000001F + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_FULL_STS 0x0144 + + #define BA_AVIO_BCM_FULL_STS_Q0 0x0144 + #define B16AVIO_BCM_FULL_STS_Q0 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q0 0 + #define LSb16AVIO_BCM_FULL_STS_Q0 0 + #define bAVIO_BCM_FULL_STS_Q0 1 + #define MSK32AVIO_BCM_FULL_STS_Q0 0x00000001 + + #define BA_AVIO_BCM_FULL_STS_Q1 0x0144 + #define B16AVIO_BCM_FULL_STS_Q1 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q1 1 + #define LSb16AVIO_BCM_FULL_STS_Q1 1 + #define bAVIO_BCM_FULL_STS_Q1 1 + #define MSK32AVIO_BCM_FULL_STS_Q1 0x00000002 + + #define BA_AVIO_BCM_FULL_STS_Q2 0x0144 + #define B16AVIO_BCM_FULL_STS_Q2 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q2 2 + #define LSb16AVIO_BCM_FULL_STS_Q2 2 + #define bAVIO_BCM_FULL_STS_Q2 1 + #define MSK32AVIO_BCM_FULL_STS_Q2 0x00000004 + + #define BA_AVIO_BCM_FULL_STS_Q3 0x0144 + #define B16AVIO_BCM_FULL_STS_Q3 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q3 3 + #define LSb16AVIO_BCM_FULL_STS_Q3 3 + #define bAVIO_BCM_FULL_STS_Q3 1 + #define MSK32AVIO_BCM_FULL_STS_Q3 0x00000008 + + #define BA_AVIO_BCM_FULL_STS_Q4 0x0144 + #define B16AVIO_BCM_FULL_STS_Q4 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q4 4 + #define LSb16AVIO_BCM_FULL_STS_Q4 4 + #define bAVIO_BCM_FULL_STS_Q4 1 + #define MSK32AVIO_BCM_FULL_STS_Q4 0x00000010 + + #define BA_AVIO_BCM_FULL_STS_Q5 0x0144 + #define B16AVIO_BCM_FULL_STS_Q5 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q5 5 + #define LSb16AVIO_BCM_FULL_STS_Q5 5 + #define bAVIO_BCM_FULL_STS_Q5 1 + #define MSK32AVIO_BCM_FULL_STS_Q5 0x00000020 + + #define BA_AVIO_BCM_FULL_STS_Q6 0x0144 + #define B16AVIO_BCM_FULL_STS_Q6 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q6 6 + #define LSb16AVIO_BCM_FULL_STS_Q6 6 + #define bAVIO_BCM_FULL_STS_Q6 1 + #define MSK32AVIO_BCM_FULL_STS_Q6 0x00000040 + + #define BA_AVIO_BCM_FULL_STS_Q7 0x0144 + #define B16AVIO_BCM_FULL_STS_Q7 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q7 7 + #define LSb16AVIO_BCM_FULL_STS_Q7 7 + #define bAVIO_BCM_FULL_STS_Q7 1 + #define MSK32AVIO_BCM_FULL_STS_Q7 0x00000080 + + #define BA_AVIO_BCM_FULL_STS_Q8 0x0145 + #define B16AVIO_BCM_FULL_STS_Q8 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q8 8 + #define LSb16AVIO_BCM_FULL_STS_Q8 8 + #define bAVIO_BCM_FULL_STS_Q8 1 + #define MSK32AVIO_BCM_FULL_STS_Q8 0x00000100 + + #define BA_AVIO_BCM_FULL_STS_Q9 0x0145 + #define B16AVIO_BCM_FULL_STS_Q9 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q9 9 + #define LSb16AVIO_BCM_FULL_STS_Q9 9 + #define bAVIO_BCM_FULL_STS_Q9 1 + #define MSK32AVIO_BCM_FULL_STS_Q9 0x00000200 + + #define BA_AVIO_BCM_FULL_STS_Q10 0x0145 + #define B16AVIO_BCM_FULL_STS_Q10 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q10 10 + #define LSb16AVIO_BCM_FULL_STS_Q10 10 + #define bAVIO_BCM_FULL_STS_Q10 1 + #define MSK32AVIO_BCM_FULL_STS_Q10 0x00000400 + + #define BA_AVIO_BCM_FULL_STS_Q11 0x0145 + #define B16AVIO_BCM_FULL_STS_Q11 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q11 11 + #define LSb16AVIO_BCM_FULL_STS_Q11 11 + #define bAVIO_BCM_FULL_STS_Q11 1 + #define MSK32AVIO_BCM_FULL_STS_Q11 0x00000800 + + #define BA_AVIO_BCM_FULL_STS_Q12 0x0145 + #define B16AVIO_BCM_FULL_STS_Q12 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q12 12 + #define LSb16AVIO_BCM_FULL_STS_Q12 12 + #define bAVIO_BCM_FULL_STS_Q12 1 + #define MSK32AVIO_BCM_FULL_STS_Q12 0x00001000 + + #define BA_AVIO_BCM_FULL_STS_Q13 0x0145 + #define B16AVIO_BCM_FULL_STS_Q13 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q13 13 + #define LSb16AVIO_BCM_FULL_STS_Q13 13 + #define bAVIO_BCM_FULL_STS_Q13 1 + #define MSK32AVIO_BCM_FULL_STS_Q13 0x00002000 + + #define BA_AVIO_BCM_FULL_STS_Q14 0x0145 + #define B16AVIO_BCM_FULL_STS_Q14 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q14 14 + #define LSb16AVIO_BCM_FULL_STS_Q14 14 + #define bAVIO_BCM_FULL_STS_Q14 1 + #define MSK32AVIO_BCM_FULL_STS_Q14 0x00004000 + + #define BA_AVIO_BCM_FULL_STS_Q15 0x0145 + #define B16AVIO_BCM_FULL_STS_Q15 0x0144 + #define LSb32AVIO_BCM_FULL_STS_Q15 15 + #define LSb16AVIO_BCM_FULL_STS_Q15 15 + #define bAVIO_BCM_FULL_STS_Q15 1 + #define MSK32AVIO_BCM_FULL_STS_Q15 0x00008000 + + #define BA_AVIO_BCM_FULL_STS_Q16 0x0146 + #define B16AVIO_BCM_FULL_STS_Q16 0x0146 + #define LSb32AVIO_BCM_FULL_STS_Q16 16 + #define LSb16AVIO_BCM_FULL_STS_Q16 0 + #define bAVIO_BCM_FULL_STS_Q16 1 + #define MSK32AVIO_BCM_FULL_STS_Q16 0x00010000 + + #define BA_AVIO_BCM_FULL_STS_Q17 0x0146 + #define B16AVIO_BCM_FULL_STS_Q17 0x0146 + #define LSb32AVIO_BCM_FULL_STS_Q17 17 + #define LSb16AVIO_BCM_FULL_STS_Q17 1 + #define bAVIO_BCM_FULL_STS_Q17 1 + #define MSK32AVIO_BCM_FULL_STS_Q17 0x00020000 + + #define BA_AVIO_BCM_FULL_STS_Q18 0x0146 + #define B16AVIO_BCM_FULL_STS_Q18 0x0146 + #define LSb32AVIO_BCM_FULL_STS_Q18 18 + #define LSb16AVIO_BCM_FULL_STS_Q18 2 + #define bAVIO_BCM_FULL_STS_Q18 1 + #define MSK32AVIO_BCM_FULL_STS_Q18 0x00040000 + + #define BA_AVIO_BCM_FULL_STS_Q31 0x0146 + #define B16AVIO_BCM_FULL_STS_Q31 0x0146 + #define LSb32AVIO_BCM_FULL_STS_Q31 19 + #define LSb16AVIO_BCM_FULL_STS_Q31 3 + #define bAVIO_BCM_FULL_STS_Q31 1 + #define MSK32AVIO_BCM_FULL_STS_Q31 0x00080000 + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_EMP_STS 0x0148 + + #define BA_AVIO_BCM_EMP_STS_Q0 0x0148 + #define B16AVIO_BCM_EMP_STS_Q0 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q0 0 + #define LSb16AVIO_BCM_EMP_STS_Q0 0 + #define bAVIO_BCM_EMP_STS_Q0 1 + #define MSK32AVIO_BCM_EMP_STS_Q0 0x00000001 + + #define BA_AVIO_BCM_EMP_STS_Q1 0x0148 + #define B16AVIO_BCM_EMP_STS_Q1 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q1 1 + #define LSb16AVIO_BCM_EMP_STS_Q1 1 + #define bAVIO_BCM_EMP_STS_Q1 1 + #define MSK32AVIO_BCM_EMP_STS_Q1 0x00000002 + + #define BA_AVIO_BCM_EMP_STS_Q2 0x0148 + #define B16AVIO_BCM_EMP_STS_Q2 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q2 2 + #define LSb16AVIO_BCM_EMP_STS_Q2 2 + #define bAVIO_BCM_EMP_STS_Q2 1 + #define MSK32AVIO_BCM_EMP_STS_Q2 0x00000004 + + #define BA_AVIO_BCM_EMP_STS_Q3 0x0148 + #define B16AVIO_BCM_EMP_STS_Q3 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q3 3 + #define LSb16AVIO_BCM_EMP_STS_Q3 3 + #define bAVIO_BCM_EMP_STS_Q3 1 + #define MSK32AVIO_BCM_EMP_STS_Q3 0x00000008 + + #define BA_AVIO_BCM_EMP_STS_Q4 0x0148 + #define B16AVIO_BCM_EMP_STS_Q4 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q4 4 + #define LSb16AVIO_BCM_EMP_STS_Q4 4 + #define bAVIO_BCM_EMP_STS_Q4 1 + #define MSK32AVIO_BCM_EMP_STS_Q4 0x00000010 + + #define BA_AVIO_BCM_EMP_STS_Q5 0x0148 + #define B16AVIO_BCM_EMP_STS_Q5 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q5 5 + #define LSb16AVIO_BCM_EMP_STS_Q5 5 + #define bAVIO_BCM_EMP_STS_Q5 1 + #define MSK32AVIO_BCM_EMP_STS_Q5 0x00000020 + + #define BA_AVIO_BCM_EMP_STS_Q6 0x0148 + #define B16AVIO_BCM_EMP_STS_Q6 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q6 6 + #define LSb16AVIO_BCM_EMP_STS_Q6 6 + #define bAVIO_BCM_EMP_STS_Q6 1 + #define MSK32AVIO_BCM_EMP_STS_Q6 0x00000040 + + #define BA_AVIO_BCM_EMP_STS_Q7 0x0148 + #define B16AVIO_BCM_EMP_STS_Q7 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q7 7 + #define LSb16AVIO_BCM_EMP_STS_Q7 7 + #define bAVIO_BCM_EMP_STS_Q7 1 + #define MSK32AVIO_BCM_EMP_STS_Q7 0x00000080 + + #define BA_AVIO_BCM_EMP_STS_Q8 0x0149 + #define B16AVIO_BCM_EMP_STS_Q8 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q8 8 + #define LSb16AVIO_BCM_EMP_STS_Q8 8 + #define bAVIO_BCM_EMP_STS_Q8 1 + #define MSK32AVIO_BCM_EMP_STS_Q8 0x00000100 + + #define BA_AVIO_BCM_EMP_STS_Q9 0x0149 + #define B16AVIO_BCM_EMP_STS_Q9 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q9 9 + #define LSb16AVIO_BCM_EMP_STS_Q9 9 + #define bAVIO_BCM_EMP_STS_Q9 1 + #define MSK32AVIO_BCM_EMP_STS_Q9 0x00000200 + + #define BA_AVIO_BCM_EMP_STS_Q10 0x0149 + #define B16AVIO_BCM_EMP_STS_Q10 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q10 10 + #define LSb16AVIO_BCM_EMP_STS_Q10 10 + #define bAVIO_BCM_EMP_STS_Q10 1 + #define MSK32AVIO_BCM_EMP_STS_Q10 0x00000400 + + #define BA_AVIO_BCM_EMP_STS_Q11 0x0149 + #define B16AVIO_BCM_EMP_STS_Q11 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q11 11 + #define LSb16AVIO_BCM_EMP_STS_Q11 11 + #define bAVIO_BCM_EMP_STS_Q11 1 + #define MSK32AVIO_BCM_EMP_STS_Q11 0x00000800 + + #define BA_AVIO_BCM_EMP_STS_Q12 0x0149 + #define B16AVIO_BCM_EMP_STS_Q12 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q12 12 + #define LSb16AVIO_BCM_EMP_STS_Q12 12 + #define bAVIO_BCM_EMP_STS_Q12 1 + #define MSK32AVIO_BCM_EMP_STS_Q12 0x00001000 + + #define BA_AVIO_BCM_EMP_STS_Q13 0x0149 + #define B16AVIO_BCM_EMP_STS_Q13 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q13 13 + #define LSb16AVIO_BCM_EMP_STS_Q13 13 + #define bAVIO_BCM_EMP_STS_Q13 1 + #define MSK32AVIO_BCM_EMP_STS_Q13 0x00002000 + + #define BA_AVIO_BCM_EMP_STS_Q14 0x0149 + #define B16AVIO_BCM_EMP_STS_Q14 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q14 14 + #define LSb16AVIO_BCM_EMP_STS_Q14 14 + #define bAVIO_BCM_EMP_STS_Q14 1 + #define MSK32AVIO_BCM_EMP_STS_Q14 0x00004000 + + #define BA_AVIO_BCM_EMP_STS_Q15 0x0149 + #define B16AVIO_BCM_EMP_STS_Q15 0x0148 + #define LSb32AVIO_BCM_EMP_STS_Q15 15 + #define LSb16AVIO_BCM_EMP_STS_Q15 15 + #define bAVIO_BCM_EMP_STS_Q15 1 + #define MSK32AVIO_BCM_EMP_STS_Q15 0x00008000 + + #define BA_AVIO_BCM_EMP_STS_Q16 0x014A + #define B16AVIO_BCM_EMP_STS_Q16 0x014A + #define LSb32AVIO_BCM_EMP_STS_Q16 16 + #define LSb16AVIO_BCM_EMP_STS_Q16 0 + #define bAVIO_BCM_EMP_STS_Q16 1 + #define MSK32AVIO_BCM_EMP_STS_Q16 0x00010000 + + #define BA_AVIO_BCM_EMP_STS_Q17 0x014A + #define B16AVIO_BCM_EMP_STS_Q17 0x014A + #define LSb32AVIO_BCM_EMP_STS_Q17 17 + #define LSb16AVIO_BCM_EMP_STS_Q17 1 + #define bAVIO_BCM_EMP_STS_Q17 1 + #define MSK32AVIO_BCM_EMP_STS_Q17 0x00020000 + + #define BA_AVIO_BCM_EMP_STS_Q18 0x014A + #define B16AVIO_BCM_EMP_STS_Q18 0x014A + #define LSb32AVIO_BCM_EMP_STS_Q18 18 + #define LSb16AVIO_BCM_EMP_STS_Q18 2 + #define bAVIO_BCM_EMP_STS_Q18 1 + #define MSK32AVIO_BCM_EMP_STS_Q18 0x00040000 + + #define BA_AVIO_BCM_EMP_STS_Q31 0x014A + #define B16AVIO_BCM_EMP_STS_Q31 0x014A + #define LSb32AVIO_BCM_EMP_STS_Q31 19 + #define LSb16AVIO_BCM_EMP_STS_Q31 3 + #define bAVIO_BCM_EMP_STS_Q31 1 + #define MSK32AVIO_BCM_EMP_STS_Q31 0x00080000 + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_FLUSH 0x014C + + #define BA_AVIO_BCM_FLUSH_Q0 0x014C + #define B16AVIO_BCM_FLUSH_Q0 0x014C + #define LSb32AVIO_BCM_FLUSH_Q0 0 + #define LSb16AVIO_BCM_FLUSH_Q0 0 + #define bAVIO_BCM_FLUSH_Q0 1 + #define MSK32AVIO_BCM_FLUSH_Q0 0x00000001 + + #define BA_AVIO_BCM_FLUSH_Q1 0x014C + #define B16AVIO_BCM_FLUSH_Q1 0x014C + #define LSb32AVIO_BCM_FLUSH_Q1 1 + #define LSb16AVIO_BCM_FLUSH_Q1 1 + #define bAVIO_BCM_FLUSH_Q1 1 + #define MSK32AVIO_BCM_FLUSH_Q1 0x00000002 + + #define BA_AVIO_BCM_FLUSH_Q2 0x014C + #define B16AVIO_BCM_FLUSH_Q2 0x014C + #define LSb32AVIO_BCM_FLUSH_Q2 2 + #define LSb16AVIO_BCM_FLUSH_Q2 2 + #define bAVIO_BCM_FLUSH_Q2 1 + #define MSK32AVIO_BCM_FLUSH_Q2 0x00000004 + + #define BA_AVIO_BCM_FLUSH_Q3 0x014C + #define B16AVIO_BCM_FLUSH_Q3 0x014C + #define LSb32AVIO_BCM_FLUSH_Q3 3 + #define LSb16AVIO_BCM_FLUSH_Q3 3 + #define bAVIO_BCM_FLUSH_Q3 1 + #define MSK32AVIO_BCM_FLUSH_Q3 0x00000008 + + #define BA_AVIO_BCM_FLUSH_Q4 0x014C + #define B16AVIO_BCM_FLUSH_Q4 0x014C + #define LSb32AVIO_BCM_FLUSH_Q4 4 + #define LSb16AVIO_BCM_FLUSH_Q4 4 + #define bAVIO_BCM_FLUSH_Q4 1 + #define MSK32AVIO_BCM_FLUSH_Q4 0x00000010 + + #define BA_AVIO_BCM_FLUSH_Q5 0x014C + #define B16AVIO_BCM_FLUSH_Q5 0x014C + #define LSb32AVIO_BCM_FLUSH_Q5 5 + #define LSb16AVIO_BCM_FLUSH_Q5 5 + #define bAVIO_BCM_FLUSH_Q5 1 + #define MSK32AVIO_BCM_FLUSH_Q5 0x00000020 + + #define BA_AVIO_BCM_FLUSH_Q6 0x014C + #define B16AVIO_BCM_FLUSH_Q6 0x014C + #define LSb32AVIO_BCM_FLUSH_Q6 6 + #define LSb16AVIO_BCM_FLUSH_Q6 6 + #define bAVIO_BCM_FLUSH_Q6 1 + #define MSK32AVIO_BCM_FLUSH_Q6 0x00000040 + + #define BA_AVIO_BCM_FLUSH_Q7 0x014C + #define B16AVIO_BCM_FLUSH_Q7 0x014C + #define LSb32AVIO_BCM_FLUSH_Q7 7 + #define LSb16AVIO_BCM_FLUSH_Q7 7 + #define bAVIO_BCM_FLUSH_Q7 1 + #define MSK32AVIO_BCM_FLUSH_Q7 0x00000080 + + #define BA_AVIO_BCM_FLUSH_Q8 0x014D + #define B16AVIO_BCM_FLUSH_Q8 0x014C + #define LSb32AVIO_BCM_FLUSH_Q8 8 + #define LSb16AVIO_BCM_FLUSH_Q8 8 + #define bAVIO_BCM_FLUSH_Q8 1 + #define MSK32AVIO_BCM_FLUSH_Q8 0x00000100 + + #define BA_AVIO_BCM_FLUSH_Q9 0x014D + #define B16AVIO_BCM_FLUSH_Q9 0x014C + #define LSb32AVIO_BCM_FLUSH_Q9 9 + #define LSb16AVIO_BCM_FLUSH_Q9 9 + #define bAVIO_BCM_FLUSH_Q9 1 + #define MSK32AVIO_BCM_FLUSH_Q9 0x00000200 + + #define BA_AVIO_BCM_FLUSH_Q10 0x014D + #define B16AVIO_BCM_FLUSH_Q10 0x014C + #define LSb32AVIO_BCM_FLUSH_Q10 10 + #define LSb16AVIO_BCM_FLUSH_Q10 10 + #define bAVIO_BCM_FLUSH_Q10 1 + #define MSK32AVIO_BCM_FLUSH_Q10 0x00000400 + + #define BA_AVIO_BCM_FLUSH_Q11 0x014D + #define B16AVIO_BCM_FLUSH_Q11 0x014C + #define LSb32AVIO_BCM_FLUSH_Q11 11 + #define LSb16AVIO_BCM_FLUSH_Q11 11 + #define bAVIO_BCM_FLUSH_Q11 1 + #define MSK32AVIO_BCM_FLUSH_Q11 0x00000800 + + #define BA_AVIO_BCM_FLUSH_Q12 0x014D + #define B16AVIO_BCM_FLUSH_Q12 0x014C + #define LSb32AVIO_BCM_FLUSH_Q12 12 + #define LSb16AVIO_BCM_FLUSH_Q12 12 + #define bAVIO_BCM_FLUSH_Q12 1 + #define MSK32AVIO_BCM_FLUSH_Q12 0x00001000 + + #define BA_AVIO_BCM_FLUSH_Q13 0x014D + #define B16AVIO_BCM_FLUSH_Q13 0x014C + #define LSb32AVIO_BCM_FLUSH_Q13 13 + #define LSb16AVIO_BCM_FLUSH_Q13 13 + #define bAVIO_BCM_FLUSH_Q13 1 + #define MSK32AVIO_BCM_FLUSH_Q13 0x00002000 + + #define BA_AVIO_BCM_FLUSH_Q14 0x014D + #define B16AVIO_BCM_FLUSH_Q14 0x014C + #define LSb32AVIO_BCM_FLUSH_Q14 14 + #define LSb16AVIO_BCM_FLUSH_Q14 14 + #define bAVIO_BCM_FLUSH_Q14 1 + #define MSK32AVIO_BCM_FLUSH_Q14 0x00004000 + + #define BA_AVIO_BCM_FLUSH_Q15 0x014D + #define B16AVIO_BCM_FLUSH_Q15 0x014C + #define LSb32AVIO_BCM_FLUSH_Q15 15 + #define LSb16AVIO_BCM_FLUSH_Q15 15 + #define bAVIO_BCM_FLUSH_Q15 1 + #define MSK32AVIO_BCM_FLUSH_Q15 0x00008000 + + #define BA_AVIO_BCM_FLUSH_Q16 0x014E + #define B16AVIO_BCM_FLUSH_Q16 0x014E + #define LSb32AVIO_BCM_FLUSH_Q16 16 + #define LSb16AVIO_BCM_FLUSH_Q16 0 + #define bAVIO_BCM_FLUSH_Q16 1 + #define MSK32AVIO_BCM_FLUSH_Q16 0x00010000 + + #define BA_AVIO_BCM_FLUSH_Q17 0x014E + #define B16AVIO_BCM_FLUSH_Q17 0x014E + #define LSb32AVIO_BCM_FLUSH_Q17 17 + #define LSb16AVIO_BCM_FLUSH_Q17 1 + #define bAVIO_BCM_FLUSH_Q17 1 + #define MSK32AVIO_BCM_FLUSH_Q17 0x00020000 + + #define BA_AVIO_BCM_FLUSH_Q18 0x014E + #define B16AVIO_BCM_FLUSH_Q18 0x014E + #define LSb32AVIO_BCM_FLUSH_Q18 18 + #define LSb16AVIO_BCM_FLUSH_Q18 2 + #define bAVIO_BCM_FLUSH_Q18 1 + #define MSK32AVIO_BCM_FLUSH_Q18 0x00040000 + + #define BA_AVIO_BCM_FLUSH_Q31 0x014E + #define B16AVIO_BCM_FLUSH_Q31 0x014E + #define LSb32AVIO_BCM_FLUSH_Q31 19 + #define LSb16AVIO_BCM_FLUSH_Q31 3 + #define bAVIO_BCM_FLUSH_Q31 1 + #define MSK32AVIO_BCM_FLUSH_Q31 0x00080000 + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_AUTOPUSH_CNT 0x0150 + + #define BA_AVIO_BCM_AUTOPUSH_CNT_OCCURENCE 0x0150 + #define B16AVIO_BCM_AUTOPUSH_CNT_OCCURENCE 0x0150 + #define LSb32AVIO_BCM_AUTOPUSH_CNT_OCCURENCE 0 + #define LSb16AVIO_BCM_AUTOPUSH_CNT_OCCURENCE 0 + #define bAVIO_BCM_AUTOPUSH_CNT_OCCURENCE 32 + #define MSK32AVIO_BCM_AUTOPUSH_CNT_OCCURENCE 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q0 0x0154 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q1 0x0158 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q2 0x015C + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q3 0x0160 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q4 0x0164 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q5 0x0168 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q6 0x016C + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q7 0x0170 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q8 0x0174 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q9 0x0178 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q10 0x017C + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q11 0x0180 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q14 0x0184 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q15 0x0188 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q16 0x018C + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q17 0x0190 + /////////////////////////////////////////////////////////// + #define RA_AVIO_Q18 0x0194 + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_AUTOPUSH 0x0198 + + #define BA_AVIO_BCM_AUTOPUSH_Q0 0x0198 + #define B16AVIO_BCM_AUTOPUSH_Q0 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q0 0 + #define LSb16AVIO_BCM_AUTOPUSH_Q0 0 + #define bAVIO_BCM_AUTOPUSH_Q0 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q0 0x00000001 + + #define BA_AVIO_BCM_AUTOPUSH_Q1 0x0198 + #define B16AVIO_BCM_AUTOPUSH_Q1 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q1 1 + #define LSb16AVIO_BCM_AUTOPUSH_Q1 1 + #define bAVIO_BCM_AUTOPUSH_Q1 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q1 0x00000002 + + #define BA_AVIO_BCM_AUTOPUSH_Q2 0x0198 + #define B16AVIO_BCM_AUTOPUSH_Q2 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q2 2 + #define LSb16AVIO_BCM_AUTOPUSH_Q2 2 + #define bAVIO_BCM_AUTOPUSH_Q2 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q2 0x00000004 + + #define BA_AVIO_BCM_AUTOPUSH_Q3 0x0198 + #define B16AVIO_BCM_AUTOPUSH_Q3 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q3 3 + #define LSb16AVIO_BCM_AUTOPUSH_Q3 3 + #define bAVIO_BCM_AUTOPUSH_Q3 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q3 0x00000008 + + #define BA_AVIO_BCM_AUTOPUSH_Q4 0x0198 + #define B16AVIO_BCM_AUTOPUSH_Q4 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q4 4 + #define LSb16AVIO_BCM_AUTOPUSH_Q4 4 + #define bAVIO_BCM_AUTOPUSH_Q4 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q4 0x00000010 + + #define BA_AVIO_BCM_AUTOPUSH_Q5 0x0198 + #define B16AVIO_BCM_AUTOPUSH_Q5 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q5 5 + #define LSb16AVIO_BCM_AUTOPUSH_Q5 5 + #define bAVIO_BCM_AUTOPUSH_Q5 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q5 0x00000020 + + #define BA_AVIO_BCM_AUTOPUSH_Q6 0x0198 + #define B16AVIO_BCM_AUTOPUSH_Q6 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q6 6 + #define LSb16AVIO_BCM_AUTOPUSH_Q6 6 + #define bAVIO_BCM_AUTOPUSH_Q6 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q6 0x00000040 + + #define BA_AVIO_BCM_AUTOPUSH_Q7 0x0198 + #define B16AVIO_BCM_AUTOPUSH_Q7 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q7 7 + #define LSb16AVIO_BCM_AUTOPUSH_Q7 7 + #define bAVIO_BCM_AUTOPUSH_Q7 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q7 0x00000080 + + #define BA_AVIO_BCM_AUTOPUSH_Q8 0x0199 + #define B16AVIO_BCM_AUTOPUSH_Q8 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q8 8 + #define LSb16AVIO_BCM_AUTOPUSH_Q8 8 + #define bAVIO_BCM_AUTOPUSH_Q8 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q8 0x00000100 + + #define BA_AVIO_BCM_AUTOPUSH_Q9 0x0199 + #define B16AVIO_BCM_AUTOPUSH_Q9 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q9 9 + #define LSb16AVIO_BCM_AUTOPUSH_Q9 9 + #define bAVIO_BCM_AUTOPUSH_Q9 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q9 0x00000200 + + #define BA_AVIO_BCM_AUTOPUSH_Q10 0x0199 + #define B16AVIO_BCM_AUTOPUSH_Q10 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q10 10 + #define LSb16AVIO_BCM_AUTOPUSH_Q10 10 + #define bAVIO_BCM_AUTOPUSH_Q10 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q10 0x00000400 + + #define BA_AVIO_BCM_AUTOPUSH_Q11 0x0199 + #define B16AVIO_BCM_AUTOPUSH_Q11 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q11 11 + #define LSb16AVIO_BCM_AUTOPUSH_Q11 11 + #define bAVIO_BCM_AUTOPUSH_Q11 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q11 0x00000800 + + #define BA_AVIO_BCM_AUTOPUSH_Q12 0x0199 + #define B16AVIO_BCM_AUTOPUSH_Q12 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q12 12 + #define LSb16AVIO_BCM_AUTOPUSH_Q12 12 + #define bAVIO_BCM_AUTOPUSH_Q12 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q12 0x00001000 + + #define BA_AVIO_BCM_AUTOPUSH_Q13 0x0199 + #define B16AVIO_BCM_AUTOPUSH_Q13 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q13 13 + #define LSb16AVIO_BCM_AUTOPUSH_Q13 13 + #define bAVIO_BCM_AUTOPUSH_Q13 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q13 0x00002000 + + #define BA_AVIO_BCM_AUTOPUSH_Q14 0x0199 + #define B16AVIO_BCM_AUTOPUSH_Q14 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q14 14 + #define LSb16AVIO_BCM_AUTOPUSH_Q14 14 + #define bAVIO_BCM_AUTOPUSH_Q14 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q14 0x00004000 + + #define BA_AVIO_BCM_AUTOPUSH_Q15 0x0199 + #define B16AVIO_BCM_AUTOPUSH_Q15 0x0198 + #define LSb32AVIO_BCM_AUTOPUSH_Q15 15 + #define LSb16AVIO_BCM_AUTOPUSH_Q15 15 + #define bAVIO_BCM_AUTOPUSH_Q15 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q15 0x00008000 + + #define BA_AVIO_BCM_AUTOPUSH_Q16 0x019A + #define B16AVIO_BCM_AUTOPUSH_Q16 0x019A + #define LSb32AVIO_BCM_AUTOPUSH_Q16 16 + #define LSb16AVIO_BCM_AUTOPUSH_Q16 0 + #define bAVIO_BCM_AUTOPUSH_Q16 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q16 0x00010000 + + #define BA_AVIO_BCM_AUTOPUSH_Q17 0x019A + #define B16AVIO_BCM_AUTOPUSH_Q17 0x019A + #define LSb32AVIO_BCM_AUTOPUSH_Q17 17 + #define LSb16AVIO_BCM_AUTOPUSH_Q17 1 + #define bAVIO_BCM_AUTOPUSH_Q17 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q17 0x00020000 + + #define BA_AVIO_BCM_AUTOPUSH_Q18 0x019A + #define B16AVIO_BCM_AUTOPUSH_Q18 0x019A + #define LSb32AVIO_BCM_AUTOPUSH_Q18 18 + #define LSb16AVIO_BCM_AUTOPUSH_Q18 2 + #define bAVIO_BCM_AUTOPUSH_Q18 1 + #define MSK32AVIO_BCM_AUTOPUSH_Q18 0x00040000 + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_FULL_STS_STICKY 0x019C + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q0 0x019C + #define B16AVIO_BCM_FULL_STS_STICKY_Q0 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q0 0 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q0 0 + #define bAVIO_BCM_FULL_STS_STICKY_Q0 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q0 0x00000001 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q1 0x019C + #define B16AVIO_BCM_FULL_STS_STICKY_Q1 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q1 1 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q1 1 + #define bAVIO_BCM_FULL_STS_STICKY_Q1 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q1 0x00000002 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q2 0x019C + #define B16AVIO_BCM_FULL_STS_STICKY_Q2 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q2 2 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q2 2 + #define bAVIO_BCM_FULL_STS_STICKY_Q2 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q2 0x00000004 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q3 0x019C + #define B16AVIO_BCM_FULL_STS_STICKY_Q3 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q3 3 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q3 3 + #define bAVIO_BCM_FULL_STS_STICKY_Q3 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q3 0x00000008 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q4 0x019C + #define B16AVIO_BCM_FULL_STS_STICKY_Q4 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q4 4 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q4 4 + #define bAVIO_BCM_FULL_STS_STICKY_Q4 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q4 0x00000010 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q5 0x019C + #define B16AVIO_BCM_FULL_STS_STICKY_Q5 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q5 5 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q5 5 + #define bAVIO_BCM_FULL_STS_STICKY_Q5 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q5 0x00000020 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q6 0x019C + #define B16AVIO_BCM_FULL_STS_STICKY_Q6 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q6 6 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q6 6 + #define bAVIO_BCM_FULL_STS_STICKY_Q6 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q6 0x00000040 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q7 0x019C + #define B16AVIO_BCM_FULL_STS_STICKY_Q7 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q7 7 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q7 7 + #define bAVIO_BCM_FULL_STS_STICKY_Q7 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q7 0x00000080 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q8 0x019D + #define B16AVIO_BCM_FULL_STS_STICKY_Q8 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q8 8 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q8 8 + #define bAVIO_BCM_FULL_STS_STICKY_Q8 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q8 0x00000100 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q9 0x019D + #define B16AVIO_BCM_FULL_STS_STICKY_Q9 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q9 9 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q9 9 + #define bAVIO_BCM_FULL_STS_STICKY_Q9 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q9 0x00000200 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q10 0x019D + #define B16AVIO_BCM_FULL_STS_STICKY_Q10 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q10 10 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q10 10 + #define bAVIO_BCM_FULL_STS_STICKY_Q10 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q10 0x00000400 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q11 0x019D + #define B16AVIO_BCM_FULL_STS_STICKY_Q11 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q11 11 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q11 11 + #define bAVIO_BCM_FULL_STS_STICKY_Q11 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q11 0x00000800 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q12 0x019D + #define B16AVIO_BCM_FULL_STS_STICKY_Q12 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q12 12 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q12 12 + #define bAVIO_BCM_FULL_STS_STICKY_Q12 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q12 0x00001000 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q13 0x019D + #define B16AVIO_BCM_FULL_STS_STICKY_Q13 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q13 13 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q13 13 + #define bAVIO_BCM_FULL_STS_STICKY_Q13 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q13 0x00002000 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q14 0x019D + #define B16AVIO_BCM_FULL_STS_STICKY_Q14 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q14 14 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q14 14 + #define bAVIO_BCM_FULL_STS_STICKY_Q14 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q14 0x00004000 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q15 0x019D + #define B16AVIO_BCM_FULL_STS_STICKY_Q15 0x019C + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q15 15 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q15 15 + #define bAVIO_BCM_FULL_STS_STICKY_Q15 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q15 0x00008000 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q16 0x019E + #define B16AVIO_BCM_FULL_STS_STICKY_Q16 0x019E + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q16 16 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q16 0 + #define bAVIO_BCM_FULL_STS_STICKY_Q16 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q16 0x00010000 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q17 0x019E + #define B16AVIO_BCM_FULL_STS_STICKY_Q17 0x019E + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q17 17 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q17 1 + #define bAVIO_BCM_FULL_STS_STICKY_Q17 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q17 0x00020000 + + #define BA_AVIO_BCM_FULL_STS_STICKY_Q18 0x019E + #define B16AVIO_BCM_FULL_STS_STICKY_Q18 0x019E + #define LSb32AVIO_BCM_FULL_STS_STICKY_Q18 18 + #define LSb16AVIO_BCM_FULL_STS_STICKY_Q18 2 + #define bAVIO_BCM_FULL_STS_STICKY_Q18 1 + #define MSK32AVIO_BCM_FULL_STS_STICKY_Q18 0x00040000 + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_ERROR 0x01A0 + + #define BA_AVIO_BCM_ERROR_err 0x01A0 + #define B16AVIO_BCM_ERROR_err 0x01A0 + #define LSb32AVIO_BCM_ERROR_err 0 + #define LSb16AVIO_BCM_ERROR_err 0 + #define bAVIO_BCM_ERROR_err 1 + #define MSK32AVIO_BCM_ERROR_err 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_LOG_ADDR 0x01A4 + + #define BA_AVIO_BCM_LOG_ADDR_addr 0x01A4 + #define B16AVIO_BCM_LOG_ADDR_addr 0x01A4 + #define LSb32AVIO_BCM_LOG_ADDR_addr 0 + #define LSb16AVIO_BCM_LOG_ADDR_addr 0 + #define bAVIO_BCM_LOG_ADDR_addr 32 + #define MSK32AVIO_BCM_LOG_ADDR_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_AVIO_BCM_ERROR_DATA 0x01A8 + + #define BA_AVIO_BCM_ERROR_DATA_data 0x01A8 + #define B16AVIO_BCM_ERROR_DATA_data 0x01A8 + #define LSb32AVIO_BCM_ERROR_DATA_data 0 + #define LSb16AVIO_BCM_ERROR_DATA_data 0 + #define bAVIO_BCM_ERROR_DATA_data 32 + #define MSK32AVIO_BCM_ERROR_DATA_data 0xFFFFFFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_AVIO { + /////////////////////////////////////////////////////////// + SIE_AVIO_REG ie_cfgReg; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q0_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q0_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q0_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q0_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q0 {\ + UNSG32 uBCM_Q0_mux : 5;\ + UNSG32 RSVDx100_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q0; + struct w32AVIO_BCM_Q0; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q1_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q1_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q1_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q1_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q1 {\ + UNSG32 uBCM_Q1_mux : 5;\ + UNSG32 RSVDx104_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q1; + struct w32AVIO_BCM_Q1; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q2_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q2_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q2_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q2_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q2 {\ + UNSG32 uBCM_Q2_mux : 5;\ + UNSG32 RSVDx108_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q2; + struct w32AVIO_BCM_Q2; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q3_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q3_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q3_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q3_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q3 {\ + UNSG32 uBCM_Q3_mux : 5;\ + UNSG32 RSVDx10C_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q3; + struct w32AVIO_BCM_Q3; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q4_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q4_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q4_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q4_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q4 {\ + UNSG32 uBCM_Q4_mux : 5;\ + UNSG32 RSVDx110_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q4; + struct w32AVIO_BCM_Q4; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q5_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q5_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q5_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q5_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q5 {\ + UNSG32 uBCM_Q5_mux : 5;\ + UNSG32 RSVDx114_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q5; + struct w32AVIO_BCM_Q5; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q6_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q6_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q6_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q6_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q6 {\ + UNSG32 uBCM_Q6_mux : 5;\ + UNSG32 RSVDx118_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q6; + struct w32AVIO_BCM_Q6; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q7_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q7_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q7_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q7_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q7 {\ + UNSG32 uBCM_Q7_mux : 5;\ + UNSG32 RSVDx11C_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q7; + struct w32AVIO_BCM_Q7; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q8_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q8_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q8_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q8_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q8 {\ + UNSG32 uBCM_Q8_mux : 5;\ + UNSG32 RSVDx120_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q8; + struct w32AVIO_BCM_Q8; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q9_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q9_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q9_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q9_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q9 {\ + UNSG32 uBCM_Q9_mux : 5;\ + UNSG32 RSVDx124_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q9; + struct w32AVIO_BCM_Q9; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q10_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q10_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q10_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q10_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q10 {\ + UNSG32 uBCM_Q10_mux : 5;\ + UNSG32 RSVDx128_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q10; + struct w32AVIO_BCM_Q10; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q11_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q11_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q11_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q11_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q11 {\ + UNSG32 uBCM_Q11_mux : 5;\ + UNSG32 RSVDx12C_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q11; + struct w32AVIO_BCM_Q11; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q14_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q14_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q14_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q14_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q14 {\ + UNSG32 uBCM_Q14_mux : 5;\ + UNSG32 RSVDx130_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q14; + struct w32AVIO_BCM_Q14; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q15_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q15_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q15_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q15_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q15 {\ + UNSG32 uBCM_Q15_mux : 5;\ + UNSG32 RSVDx134_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q15; + struct w32AVIO_BCM_Q15; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q16_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q16_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q16_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q16_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q16 {\ + UNSG32 uBCM_Q16_mux : 5;\ + UNSG32 RSVDx138_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q16; + struct w32AVIO_BCM_Q16; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q17_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q17_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q17_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q17_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q17 {\ + UNSG32 uBCM_Q17_mux : 5;\ + UNSG32 RSVDx13C_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q17; + struct w32AVIO_BCM_Q17; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_Q18_mux(r32) _BFGET_(r32, 4, 0) + #define SET32AVIO_BCM_Q18_mux(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16AVIO_BCM_Q18_mux(r16) _BFGET_(r16, 4, 0) + #define SET16AVIO_BCM_Q18_mux(r16,v) _BFSET_(r16, 4, 0,v) + + #define w32AVIO_BCM_Q18 {\ + UNSG32 uBCM_Q18_mux : 5;\ + UNSG32 RSVDx140_b5 : 27;\ + } + union { UNSG32 u32AVIO_BCM_Q18; + struct w32AVIO_BCM_Q18; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_FULL_STS_Q0(r32) _BFGET_(r32, 0, 0) + #define SET32AVIO_BCM_FULL_STS_Q0(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16AVIO_BCM_FULL_STS_Q0(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_FULL_STS_Q0(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_FULL_STS_Q1(r32) _BFGET_(r32, 1, 1) + #define SET32AVIO_BCM_FULL_STS_Q1(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16AVIO_BCM_FULL_STS_Q1(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_FULL_STS_Q1(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_FULL_STS_Q2(r32) _BFGET_(r32, 2, 2) + #define SET32AVIO_BCM_FULL_STS_Q2(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16AVIO_BCM_FULL_STS_Q2(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_FULL_STS_Q2(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32AVIO_BCM_FULL_STS_Q3(r32) _BFGET_(r32, 3, 3) + #define SET32AVIO_BCM_FULL_STS_Q3(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16AVIO_BCM_FULL_STS_Q3(r16) _BFGET_(r16, 3, 3) + #define SET16AVIO_BCM_FULL_STS_Q3(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32AVIO_BCM_FULL_STS_Q4(r32) _BFGET_(r32, 4, 4) + #define SET32AVIO_BCM_FULL_STS_Q4(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16AVIO_BCM_FULL_STS_Q4(r16) _BFGET_(r16, 4, 4) + #define SET16AVIO_BCM_FULL_STS_Q4(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32AVIO_BCM_FULL_STS_Q5(r32) _BFGET_(r32, 5, 5) + #define SET32AVIO_BCM_FULL_STS_Q5(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16AVIO_BCM_FULL_STS_Q5(r16) _BFGET_(r16, 5, 5) + #define SET16AVIO_BCM_FULL_STS_Q5(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32AVIO_BCM_FULL_STS_Q6(r32) _BFGET_(r32, 6, 6) + #define SET32AVIO_BCM_FULL_STS_Q6(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16AVIO_BCM_FULL_STS_Q6(r16) _BFGET_(r16, 6, 6) + #define SET16AVIO_BCM_FULL_STS_Q6(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32AVIO_BCM_FULL_STS_Q7(r32) _BFGET_(r32, 7, 7) + #define SET32AVIO_BCM_FULL_STS_Q7(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16AVIO_BCM_FULL_STS_Q7(r16) _BFGET_(r16, 7, 7) + #define SET16AVIO_BCM_FULL_STS_Q7(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32AVIO_BCM_FULL_STS_Q8(r32) _BFGET_(r32, 8, 8) + #define SET32AVIO_BCM_FULL_STS_Q8(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16AVIO_BCM_FULL_STS_Q8(r16) _BFGET_(r16, 8, 8) + #define SET16AVIO_BCM_FULL_STS_Q8(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32AVIO_BCM_FULL_STS_Q9(r32) _BFGET_(r32, 9, 9) + #define SET32AVIO_BCM_FULL_STS_Q9(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16AVIO_BCM_FULL_STS_Q9(r16) _BFGET_(r16, 9, 9) + #define SET16AVIO_BCM_FULL_STS_Q9(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32AVIO_BCM_FULL_STS_Q10(r32) _BFGET_(r32,10,10) + #define SET32AVIO_BCM_FULL_STS_Q10(r32,v) _BFSET_(r32,10,10,v) + #define GET16AVIO_BCM_FULL_STS_Q10(r16) _BFGET_(r16,10,10) + #define SET16AVIO_BCM_FULL_STS_Q10(r16,v) _BFSET_(r16,10,10,v) + + #define GET32AVIO_BCM_FULL_STS_Q11(r32) _BFGET_(r32,11,11) + #define SET32AVIO_BCM_FULL_STS_Q11(r32,v) _BFSET_(r32,11,11,v) + #define GET16AVIO_BCM_FULL_STS_Q11(r16) _BFGET_(r16,11,11) + #define SET16AVIO_BCM_FULL_STS_Q11(r16,v) _BFSET_(r16,11,11,v) + + #define GET32AVIO_BCM_FULL_STS_Q12(r32) _BFGET_(r32,12,12) + #define SET32AVIO_BCM_FULL_STS_Q12(r32,v) _BFSET_(r32,12,12,v) + #define GET16AVIO_BCM_FULL_STS_Q12(r16) _BFGET_(r16,12,12) + #define SET16AVIO_BCM_FULL_STS_Q12(r16,v) _BFSET_(r16,12,12,v) + + #define GET32AVIO_BCM_FULL_STS_Q13(r32) _BFGET_(r32,13,13) + #define SET32AVIO_BCM_FULL_STS_Q13(r32,v) _BFSET_(r32,13,13,v) + #define GET16AVIO_BCM_FULL_STS_Q13(r16) _BFGET_(r16,13,13) + #define SET16AVIO_BCM_FULL_STS_Q13(r16,v) _BFSET_(r16,13,13,v) + + #define GET32AVIO_BCM_FULL_STS_Q14(r32) _BFGET_(r32,14,14) + #define SET32AVIO_BCM_FULL_STS_Q14(r32,v) _BFSET_(r32,14,14,v) + #define GET16AVIO_BCM_FULL_STS_Q14(r16) _BFGET_(r16,14,14) + #define SET16AVIO_BCM_FULL_STS_Q14(r16,v) _BFSET_(r16,14,14,v) + + #define GET32AVIO_BCM_FULL_STS_Q15(r32) _BFGET_(r32,15,15) + #define SET32AVIO_BCM_FULL_STS_Q15(r32,v) _BFSET_(r32,15,15,v) + #define GET16AVIO_BCM_FULL_STS_Q15(r16) _BFGET_(r16,15,15) + #define SET16AVIO_BCM_FULL_STS_Q15(r16,v) _BFSET_(r16,15,15,v) + + #define GET32AVIO_BCM_FULL_STS_Q16(r32) _BFGET_(r32,16,16) + #define SET32AVIO_BCM_FULL_STS_Q16(r32,v) _BFSET_(r32,16,16,v) + #define GET16AVIO_BCM_FULL_STS_Q16(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_FULL_STS_Q16(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_FULL_STS_Q17(r32) _BFGET_(r32,17,17) + #define SET32AVIO_BCM_FULL_STS_Q17(r32,v) _BFSET_(r32,17,17,v) + #define GET16AVIO_BCM_FULL_STS_Q17(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_FULL_STS_Q17(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_FULL_STS_Q18(r32) _BFGET_(r32,18,18) + #define SET32AVIO_BCM_FULL_STS_Q18(r32,v) _BFSET_(r32,18,18,v) + #define GET16AVIO_BCM_FULL_STS_Q18(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_FULL_STS_Q18(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32AVIO_BCM_FULL_STS_Q31(r32) _BFGET_(r32,19,19) + #define SET32AVIO_BCM_FULL_STS_Q31(r32,v) _BFSET_(r32,19,19,v) + #define GET16AVIO_BCM_FULL_STS_Q31(r16) _BFGET_(r16, 3, 3) + #define SET16AVIO_BCM_FULL_STS_Q31(r16,v) _BFSET_(r16, 3, 3,v) + + #define w32AVIO_BCM_FULL_STS {\ + UNSG32 uBCM_FULL_STS_Q0 : 1;\ + UNSG32 uBCM_FULL_STS_Q1 : 1;\ + UNSG32 uBCM_FULL_STS_Q2 : 1;\ + UNSG32 uBCM_FULL_STS_Q3 : 1;\ + UNSG32 uBCM_FULL_STS_Q4 : 1;\ + UNSG32 uBCM_FULL_STS_Q5 : 1;\ + UNSG32 uBCM_FULL_STS_Q6 : 1;\ + UNSG32 uBCM_FULL_STS_Q7 : 1;\ + UNSG32 uBCM_FULL_STS_Q8 : 1;\ + UNSG32 uBCM_FULL_STS_Q9 : 1;\ + UNSG32 uBCM_FULL_STS_Q10 : 1;\ + UNSG32 uBCM_FULL_STS_Q11 : 1;\ + UNSG32 uBCM_FULL_STS_Q12 : 1;\ + UNSG32 uBCM_FULL_STS_Q13 : 1;\ + UNSG32 uBCM_FULL_STS_Q14 : 1;\ + UNSG32 uBCM_FULL_STS_Q15 : 1;\ + UNSG32 uBCM_FULL_STS_Q16 : 1;\ + UNSG32 uBCM_FULL_STS_Q17 : 1;\ + UNSG32 uBCM_FULL_STS_Q18 : 1;\ + UNSG32 uBCM_FULL_STS_Q31 : 1;\ + UNSG32 RSVDx144_b20 : 12;\ + } + union { UNSG32 u32AVIO_BCM_FULL_STS; + struct w32AVIO_BCM_FULL_STS; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_EMP_STS_Q0(r32) _BFGET_(r32, 0, 0) + #define SET32AVIO_BCM_EMP_STS_Q0(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16AVIO_BCM_EMP_STS_Q0(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_EMP_STS_Q0(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_EMP_STS_Q1(r32) _BFGET_(r32, 1, 1) + #define SET32AVIO_BCM_EMP_STS_Q1(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16AVIO_BCM_EMP_STS_Q1(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_EMP_STS_Q1(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_EMP_STS_Q2(r32) _BFGET_(r32, 2, 2) + #define SET32AVIO_BCM_EMP_STS_Q2(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16AVIO_BCM_EMP_STS_Q2(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_EMP_STS_Q2(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32AVIO_BCM_EMP_STS_Q3(r32) _BFGET_(r32, 3, 3) + #define SET32AVIO_BCM_EMP_STS_Q3(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16AVIO_BCM_EMP_STS_Q3(r16) _BFGET_(r16, 3, 3) + #define SET16AVIO_BCM_EMP_STS_Q3(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32AVIO_BCM_EMP_STS_Q4(r32) _BFGET_(r32, 4, 4) + #define SET32AVIO_BCM_EMP_STS_Q4(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16AVIO_BCM_EMP_STS_Q4(r16) _BFGET_(r16, 4, 4) + #define SET16AVIO_BCM_EMP_STS_Q4(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32AVIO_BCM_EMP_STS_Q5(r32) _BFGET_(r32, 5, 5) + #define SET32AVIO_BCM_EMP_STS_Q5(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16AVIO_BCM_EMP_STS_Q5(r16) _BFGET_(r16, 5, 5) + #define SET16AVIO_BCM_EMP_STS_Q5(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32AVIO_BCM_EMP_STS_Q6(r32) _BFGET_(r32, 6, 6) + #define SET32AVIO_BCM_EMP_STS_Q6(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16AVIO_BCM_EMP_STS_Q6(r16) _BFGET_(r16, 6, 6) + #define SET16AVIO_BCM_EMP_STS_Q6(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32AVIO_BCM_EMP_STS_Q7(r32) _BFGET_(r32, 7, 7) + #define SET32AVIO_BCM_EMP_STS_Q7(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16AVIO_BCM_EMP_STS_Q7(r16) _BFGET_(r16, 7, 7) + #define SET16AVIO_BCM_EMP_STS_Q7(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32AVIO_BCM_EMP_STS_Q8(r32) _BFGET_(r32, 8, 8) + #define SET32AVIO_BCM_EMP_STS_Q8(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16AVIO_BCM_EMP_STS_Q8(r16) _BFGET_(r16, 8, 8) + #define SET16AVIO_BCM_EMP_STS_Q8(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32AVIO_BCM_EMP_STS_Q9(r32) _BFGET_(r32, 9, 9) + #define SET32AVIO_BCM_EMP_STS_Q9(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16AVIO_BCM_EMP_STS_Q9(r16) _BFGET_(r16, 9, 9) + #define SET16AVIO_BCM_EMP_STS_Q9(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32AVIO_BCM_EMP_STS_Q10(r32) _BFGET_(r32,10,10) + #define SET32AVIO_BCM_EMP_STS_Q10(r32,v) _BFSET_(r32,10,10,v) + #define GET16AVIO_BCM_EMP_STS_Q10(r16) _BFGET_(r16,10,10) + #define SET16AVIO_BCM_EMP_STS_Q10(r16,v) _BFSET_(r16,10,10,v) + + #define GET32AVIO_BCM_EMP_STS_Q11(r32) _BFGET_(r32,11,11) + #define SET32AVIO_BCM_EMP_STS_Q11(r32,v) _BFSET_(r32,11,11,v) + #define GET16AVIO_BCM_EMP_STS_Q11(r16) _BFGET_(r16,11,11) + #define SET16AVIO_BCM_EMP_STS_Q11(r16,v) _BFSET_(r16,11,11,v) + + #define GET32AVIO_BCM_EMP_STS_Q12(r32) _BFGET_(r32,12,12) + #define SET32AVIO_BCM_EMP_STS_Q12(r32,v) _BFSET_(r32,12,12,v) + #define GET16AVIO_BCM_EMP_STS_Q12(r16) _BFGET_(r16,12,12) + #define SET16AVIO_BCM_EMP_STS_Q12(r16,v) _BFSET_(r16,12,12,v) + + #define GET32AVIO_BCM_EMP_STS_Q13(r32) _BFGET_(r32,13,13) + #define SET32AVIO_BCM_EMP_STS_Q13(r32,v) _BFSET_(r32,13,13,v) + #define GET16AVIO_BCM_EMP_STS_Q13(r16) _BFGET_(r16,13,13) + #define SET16AVIO_BCM_EMP_STS_Q13(r16,v) _BFSET_(r16,13,13,v) + + #define GET32AVIO_BCM_EMP_STS_Q14(r32) _BFGET_(r32,14,14) + #define SET32AVIO_BCM_EMP_STS_Q14(r32,v) _BFSET_(r32,14,14,v) + #define GET16AVIO_BCM_EMP_STS_Q14(r16) _BFGET_(r16,14,14) + #define SET16AVIO_BCM_EMP_STS_Q14(r16,v) _BFSET_(r16,14,14,v) + + #define GET32AVIO_BCM_EMP_STS_Q15(r32) _BFGET_(r32,15,15) + #define SET32AVIO_BCM_EMP_STS_Q15(r32,v) _BFSET_(r32,15,15,v) + #define GET16AVIO_BCM_EMP_STS_Q15(r16) _BFGET_(r16,15,15) + #define SET16AVIO_BCM_EMP_STS_Q15(r16,v) _BFSET_(r16,15,15,v) + + #define GET32AVIO_BCM_EMP_STS_Q16(r32) _BFGET_(r32,16,16) + #define SET32AVIO_BCM_EMP_STS_Q16(r32,v) _BFSET_(r32,16,16,v) + #define GET16AVIO_BCM_EMP_STS_Q16(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_EMP_STS_Q16(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_EMP_STS_Q17(r32) _BFGET_(r32,17,17) + #define SET32AVIO_BCM_EMP_STS_Q17(r32,v) _BFSET_(r32,17,17,v) + #define GET16AVIO_BCM_EMP_STS_Q17(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_EMP_STS_Q17(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_EMP_STS_Q18(r32) _BFGET_(r32,18,18) + #define SET32AVIO_BCM_EMP_STS_Q18(r32,v) _BFSET_(r32,18,18,v) + #define GET16AVIO_BCM_EMP_STS_Q18(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_EMP_STS_Q18(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32AVIO_BCM_EMP_STS_Q31(r32) _BFGET_(r32,19,19) + #define SET32AVIO_BCM_EMP_STS_Q31(r32,v) _BFSET_(r32,19,19,v) + #define GET16AVIO_BCM_EMP_STS_Q31(r16) _BFGET_(r16, 3, 3) + #define SET16AVIO_BCM_EMP_STS_Q31(r16,v) _BFSET_(r16, 3, 3,v) + + #define w32AVIO_BCM_EMP_STS {\ + UNSG32 uBCM_EMP_STS_Q0 : 1;\ + UNSG32 uBCM_EMP_STS_Q1 : 1;\ + UNSG32 uBCM_EMP_STS_Q2 : 1;\ + UNSG32 uBCM_EMP_STS_Q3 : 1;\ + UNSG32 uBCM_EMP_STS_Q4 : 1;\ + UNSG32 uBCM_EMP_STS_Q5 : 1;\ + UNSG32 uBCM_EMP_STS_Q6 : 1;\ + UNSG32 uBCM_EMP_STS_Q7 : 1;\ + UNSG32 uBCM_EMP_STS_Q8 : 1;\ + UNSG32 uBCM_EMP_STS_Q9 : 1;\ + UNSG32 uBCM_EMP_STS_Q10 : 1;\ + UNSG32 uBCM_EMP_STS_Q11 : 1;\ + UNSG32 uBCM_EMP_STS_Q12 : 1;\ + UNSG32 uBCM_EMP_STS_Q13 : 1;\ + UNSG32 uBCM_EMP_STS_Q14 : 1;\ + UNSG32 uBCM_EMP_STS_Q15 : 1;\ + UNSG32 uBCM_EMP_STS_Q16 : 1;\ + UNSG32 uBCM_EMP_STS_Q17 : 1;\ + UNSG32 uBCM_EMP_STS_Q18 : 1;\ + UNSG32 uBCM_EMP_STS_Q31 : 1;\ + UNSG32 RSVDx148_b20 : 12;\ + } + union { UNSG32 u32AVIO_BCM_EMP_STS; + struct w32AVIO_BCM_EMP_STS; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_FLUSH_Q0(r32) _BFGET_(r32, 0, 0) + #define SET32AVIO_BCM_FLUSH_Q0(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16AVIO_BCM_FLUSH_Q0(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_FLUSH_Q0(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_FLUSH_Q1(r32) _BFGET_(r32, 1, 1) + #define SET32AVIO_BCM_FLUSH_Q1(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16AVIO_BCM_FLUSH_Q1(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_FLUSH_Q1(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_FLUSH_Q2(r32) _BFGET_(r32, 2, 2) + #define SET32AVIO_BCM_FLUSH_Q2(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16AVIO_BCM_FLUSH_Q2(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_FLUSH_Q2(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32AVIO_BCM_FLUSH_Q3(r32) _BFGET_(r32, 3, 3) + #define SET32AVIO_BCM_FLUSH_Q3(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16AVIO_BCM_FLUSH_Q3(r16) _BFGET_(r16, 3, 3) + #define SET16AVIO_BCM_FLUSH_Q3(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32AVIO_BCM_FLUSH_Q4(r32) _BFGET_(r32, 4, 4) + #define SET32AVIO_BCM_FLUSH_Q4(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16AVIO_BCM_FLUSH_Q4(r16) _BFGET_(r16, 4, 4) + #define SET16AVIO_BCM_FLUSH_Q4(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32AVIO_BCM_FLUSH_Q5(r32) _BFGET_(r32, 5, 5) + #define SET32AVIO_BCM_FLUSH_Q5(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16AVIO_BCM_FLUSH_Q5(r16) _BFGET_(r16, 5, 5) + #define SET16AVIO_BCM_FLUSH_Q5(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32AVIO_BCM_FLUSH_Q6(r32) _BFGET_(r32, 6, 6) + #define SET32AVIO_BCM_FLUSH_Q6(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16AVIO_BCM_FLUSH_Q6(r16) _BFGET_(r16, 6, 6) + #define SET16AVIO_BCM_FLUSH_Q6(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32AVIO_BCM_FLUSH_Q7(r32) _BFGET_(r32, 7, 7) + #define SET32AVIO_BCM_FLUSH_Q7(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16AVIO_BCM_FLUSH_Q7(r16) _BFGET_(r16, 7, 7) + #define SET16AVIO_BCM_FLUSH_Q7(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32AVIO_BCM_FLUSH_Q8(r32) _BFGET_(r32, 8, 8) + #define SET32AVIO_BCM_FLUSH_Q8(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16AVIO_BCM_FLUSH_Q8(r16) _BFGET_(r16, 8, 8) + #define SET16AVIO_BCM_FLUSH_Q8(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32AVIO_BCM_FLUSH_Q9(r32) _BFGET_(r32, 9, 9) + #define SET32AVIO_BCM_FLUSH_Q9(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16AVIO_BCM_FLUSH_Q9(r16) _BFGET_(r16, 9, 9) + #define SET16AVIO_BCM_FLUSH_Q9(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32AVIO_BCM_FLUSH_Q10(r32) _BFGET_(r32,10,10) + #define SET32AVIO_BCM_FLUSH_Q10(r32,v) _BFSET_(r32,10,10,v) + #define GET16AVIO_BCM_FLUSH_Q10(r16) _BFGET_(r16,10,10) + #define SET16AVIO_BCM_FLUSH_Q10(r16,v) _BFSET_(r16,10,10,v) + + #define GET32AVIO_BCM_FLUSH_Q11(r32) _BFGET_(r32,11,11) + #define SET32AVIO_BCM_FLUSH_Q11(r32,v) _BFSET_(r32,11,11,v) + #define GET16AVIO_BCM_FLUSH_Q11(r16) _BFGET_(r16,11,11) + #define SET16AVIO_BCM_FLUSH_Q11(r16,v) _BFSET_(r16,11,11,v) + + #define GET32AVIO_BCM_FLUSH_Q12(r32) _BFGET_(r32,12,12) + #define SET32AVIO_BCM_FLUSH_Q12(r32,v) _BFSET_(r32,12,12,v) + #define GET16AVIO_BCM_FLUSH_Q12(r16) _BFGET_(r16,12,12) + #define SET16AVIO_BCM_FLUSH_Q12(r16,v) _BFSET_(r16,12,12,v) + + #define GET32AVIO_BCM_FLUSH_Q13(r32) _BFGET_(r32,13,13) + #define SET32AVIO_BCM_FLUSH_Q13(r32,v) _BFSET_(r32,13,13,v) + #define GET16AVIO_BCM_FLUSH_Q13(r16) _BFGET_(r16,13,13) + #define SET16AVIO_BCM_FLUSH_Q13(r16,v) _BFSET_(r16,13,13,v) + + #define GET32AVIO_BCM_FLUSH_Q14(r32) _BFGET_(r32,14,14) + #define SET32AVIO_BCM_FLUSH_Q14(r32,v) _BFSET_(r32,14,14,v) + #define GET16AVIO_BCM_FLUSH_Q14(r16) _BFGET_(r16,14,14) + #define SET16AVIO_BCM_FLUSH_Q14(r16,v) _BFSET_(r16,14,14,v) + + #define GET32AVIO_BCM_FLUSH_Q15(r32) _BFGET_(r32,15,15) + #define SET32AVIO_BCM_FLUSH_Q15(r32,v) _BFSET_(r32,15,15,v) + #define GET16AVIO_BCM_FLUSH_Q15(r16) _BFGET_(r16,15,15) + #define SET16AVIO_BCM_FLUSH_Q15(r16,v) _BFSET_(r16,15,15,v) + + #define GET32AVIO_BCM_FLUSH_Q16(r32) _BFGET_(r32,16,16) + #define SET32AVIO_BCM_FLUSH_Q16(r32,v) _BFSET_(r32,16,16,v) + #define GET16AVIO_BCM_FLUSH_Q16(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_FLUSH_Q16(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_FLUSH_Q17(r32) _BFGET_(r32,17,17) + #define SET32AVIO_BCM_FLUSH_Q17(r32,v) _BFSET_(r32,17,17,v) + #define GET16AVIO_BCM_FLUSH_Q17(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_FLUSH_Q17(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_FLUSH_Q18(r32) _BFGET_(r32,18,18) + #define SET32AVIO_BCM_FLUSH_Q18(r32,v) _BFSET_(r32,18,18,v) + #define GET16AVIO_BCM_FLUSH_Q18(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_FLUSH_Q18(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32AVIO_BCM_FLUSH_Q31(r32) _BFGET_(r32,19,19) + #define SET32AVIO_BCM_FLUSH_Q31(r32,v) _BFSET_(r32,19,19,v) + #define GET16AVIO_BCM_FLUSH_Q31(r16) _BFGET_(r16, 3, 3) + #define SET16AVIO_BCM_FLUSH_Q31(r16,v) _BFSET_(r16, 3, 3,v) + + #define w32AVIO_BCM_FLUSH {\ + UNSG32 uBCM_FLUSH_Q0 : 1;\ + UNSG32 uBCM_FLUSH_Q1 : 1;\ + UNSG32 uBCM_FLUSH_Q2 : 1;\ + UNSG32 uBCM_FLUSH_Q3 : 1;\ + UNSG32 uBCM_FLUSH_Q4 : 1;\ + UNSG32 uBCM_FLUSH_Q5 : 1;\ + UNSG32 uBCM_FLUSH_Q6 : 1;\ + UNSG32 uBCM_FLUSH_Q7 : 1;\ + UNSG32 uBCM_FLUSH_Q8 : 1;\ + UNSG32 uBCM_FLUSH_Q9 : 1;\ + UNSG32 uBCM_FLUSH_Q10 : 1;\ + UNSG32 uBCM_FLUSH_Q11 : 1;\ + UNSG32 uBCM_FLUSH_Q12 : 1;\ + UNSG32 uBCM_FLUSH_Q13 : 1;\ + UNSG32 uBCM_FLUSH_Q14 : 1;\ + UNSG32 uBCM_FLUSH_Q15 : 1;\ + UNSG32 uBCM_FLUSH_Q16 : 1;\ + UNSG32 uBCM_FLUSH_Q17 : 1;\ + UNSG32 uBCM_FLUSH_Q18 : 1;\ + UNSG32 uBCM_FLUSH_Q31 : 1;\ + UNSG32 RSVDx14C_b20 : 12;\ + } + union { UNSG32 u32AVIO_BCM_FLUSH; + struct w32AVIO_BCM_FLUSH; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_AUTOPUSH_CNT_OCCURENCE(r32) _BFGET_(r32,31, 0) + #define SET32AVIO_BCM_AUTOPUSH_CNT_OCCURENCE(r32,v) _BFSET_(r32,31, 0,v) + + #define w32AVIO_BCM_AUTOPUSH_CNT {\ + UNSG32 uBCM_AUTOPUSH_CNT_OCCURENCE : 32;\ + } + union { UNSG32 u32AVIO_BCM_AUTOPUSH_CNT; + struct w32AVIO_BCM_AUTOPUSH_CNT; + }; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q0; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q1; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q2; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q3; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q4; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q5; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q6; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q7; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q8; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q9; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q10; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q11; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q14; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q15; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q16; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q17; + /////////////////////////////////////////////////////////// + SIE_OCCURENCE ie_Q18; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_AUTOPUSH_Q0(r32) _BFGET_(r32, 0, 0) + #define SET32AVIO_BCM_AUTOPUSH_Q0(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16AVIO_BCM_AUTOPUSH_Q0(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_AUTOPUSH_Q0(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q1(r32) _BFGET_(r32, 1, 1) + #define SET32AVIO_BCM_AUTOPUSH_Q1(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16AVIO_BCM_AUTOPUSH_Q1(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_AUTOPUSH_Q1(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q2(r32) _BFGET_(r32, 2, 2) + #define SET32AVIO_BCM_AUTOPUSH_Q2(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16AVIO_BCM_AUTOPUSH_Q2(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_AUTOPUSH_Q2(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q3(r32) _BFGET_(r32, 3, 3) + #define SET32AVIO_BCM_AUTOPUSH_Q3(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16AVIO_BCM_AUTOPUSH_Q3(r16) _BFGET_(r16, 3, 3) + #define SET16AVIO_BCM_AUTOPUSH_Q3(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q4(r32) _BFGET_(r32, 4, 4) + #define SET32AVIO_BCM_AUTOPUSH_Q4(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16AVIO_BCM_AUTOPUSH_Q4(r16) _BFGET_(r16, 4, 4) + #define SET16AVIO_BCM_AUTOPUSH_Q4(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q5(r32) _BFGET_(r32, 5, 5) + #define SET32AVIO_BCM_AUTOPUSH_Q5(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16AVIO_BCM_AUTOPUSH_Q5(r16) _BFGET_(r16, 5, 5) + #define SET16AVIO_BCM_AUTOPUSH_Q5(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q6(r32) _BFGET_(r32, 6, 6) + #define SET32AVIO_BCM_AUTOPUSH_Q6(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16AVIO_BCM_AUTOPUSH_Q6(r16) _BFGET_(r16, 6, 6) + #define SET16AVIO_BCM_AUTOPUSH_Q6(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q7(r32) _BFGET_(r32, 7, 7) + #define SET32AVIO_BCM_AUTOPUSH_Q7(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16AVIO_BCM_AUTOPUSH_Q7(r16) _BFGET_(r16, 7, 7) + #define SET16AVIO_BCM_AUTOPUSH_Q7(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q8(r32) _BFGET_(r32, 8, 8) + #define SET32AVIO_BCM_AUTOPUSH_Q8(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16AVIO_BCM_AUTOPUSH_Q8(r16) _BFGET_(r16, 8, 8) + #define SET16AVIO_BCM_AUTOPUSH_Q8(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q9(r32) _BFGET_(r32, 9, 9) + #define SET32AVIO_BCM_AUTOPUSH_Q9(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16AVIO_BCM_AUTOPUSH_Q9(r16) _BFGET_(r16, 9, 9) + #define SET16AVIO_BCM_AUTOPUSH_Q9(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q10(r32) _BFGET_(r32,10,10) + #define SET32AVIO_BCM_AUTOPUSH_Q10(r32,v) _BFSET_(r32,10,10,v) + #define GET16AVIO_BCM_AUTOPUSH_Q10(r16) _BFGET_(r16,10,10) + #define SET16AVIO_BCM_AUTOPUSH_Q10(r16,v) _BFSET_(r16,10,10,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q11(r32) _BFGET_(r32,11,11) + #define SET32AVIO_BCM_AUTOPUSH_Q11(r32,v) _BFSET_(r32,11,11,v) + #define GET16AVIO_BCM_AUTOPUSH_Q11(r16) _BFGET_(r16,11,11) + #define SET16AVIO_BCM_AUTOPUSH_Q11(r16,v) _BFSET_(r16,11,11,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q12(r32) _BFGET_(r32,12,12) + #define SET32AVIO_BCM_AUTOPUSH_Q12(r32,v) _BFSET_(r32,12,12,v) + #define GET16AVIO_BCM_AUTOPUSH_Q12(r16) _BFGET_(r16,12,12) + #define SET16AVIO_BCM_AUTOPUSH_Q12(r16,v) _BFSET_(r16,12,12,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q13(r32) _BFGET_(r32,13,13) + #define SET32AVIO_BCM_AUTOPUSH_Q13(r32,v) _BFSET_(r32,13,13,v) + #define GET16AVIO_BCM_AUTOPUSH_Q13(r16) _BFGET_(r16,13,13) + #define SET16AVIO_BCM_AUTOPUSH_Q13(r16,v) _BFSET_(r16,13,13,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q14(r32) _BFGET_(r32,14,14) + #define SET32AVIO_BCM_AUTOPUSH_Q14(r32,v) _BFSET_(r32,14,14,v) + #define GET16AVIO_BCM_AUTOPUSH_Q14(r16) _BFGET_(r16,14,14) + #define SET16AVIO_BCM_AUTOPUSH_Q14(r16,v) _BFSET_(r16,14,14,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q15(r32) _BFGET_(r32,15,15) + #define SET32AVIO_BCM_AUTOPUSH_Q15(r32,v) _BFSET_(r32,15,15,v) + #define GET16AVIO_BCM_AUTOPUSH_Q15(r16) _BFGET_(r16,15,15) + #define SET16AVIO_BCM_AUTOPUSH_Q15(r16,v) _BFSET_(r16,15,15,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q16(r32) _BFGET_(r32,16,16) + #define SET32AVIO_BCM_AUTOPUSH_Q16(r32,v) _BFSET_(r32,16,16,v) + #define GET16AVIO_BCM_AUTOPUSH_Q16(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_AUTOPUSH_Q16(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q17(r32) _BFGET_(r32,17,17) + #define SET32AVIO_BCM_AUTOPUSH_Q17(r32,v) _BFSET_(r32,17,17,v) + #define GET16AVIO_BCM_AUTOPUSH_Q17(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_AUTOPUSH_Q17(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_AUTOPUSH_Q18(r32) _BFGET_(r32,18,18) + #define SET32AVIO_BCM_AUTOPUSH_Q18(r32,v) _BFSET_(r32,18,18,v) + #define GET16AVIO_BCM_AUTOPUSH_Q18(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_AUTOPUSH_Q18(r16,v) _BFSET_(r16, 2, 2,v) + + #define w32AVIO_BCM_AUTOPUSH {\ + UNSG32 uBCM_AUTOPUSH_Q0 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q1 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q2 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q3 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q4 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q5 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q6 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q7 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q8 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q9 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q10 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q11 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q12 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q13 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q14 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q15 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q16 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q17 : 1;\ + UNSG32 uBCM_AUTOPUSH_Q18 : 1;\ + UNSG32 RSVDx198_b19 : 13;\ + } + union { UNSG32 u32AVIO_BCM_AUTOPUSH; + struct w32AVIO_BCM_AUTOPUSH; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_FULL_STS_STICKY_Q0(r32) _BFGET_(r32, 0, 0) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q0(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q0(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q0(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q1(r32) _BFGET_(r32, 1, 1) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q1(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q1(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q1(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q2(r32) _BFGET_(r32, 2, 2) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q2(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q2(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q2(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q3(r32) _BFGET_(r32, 3, 3) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q3(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q3(r16) _BFGET_(r16, 3, 3) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q3(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q4(r32) _BFGET_(r32, 4, 4) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q4(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q4(r16) _BFGET_(r16, 4, 4) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q4(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q5(r32) _BFGET_(r32, 5, 5) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q5(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q5(r16) _BFGET_(r16, 5, 5) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q5(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q6(r32) _BFGET_(r32, 6, 6) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q6(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q6(r16) _BFGET_(r16, 6, 6) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q6(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q7(r32) _BFGET_(r32, 7, 7) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q7(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q7(r16) _BFGET_(r16, 7, 7) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q7(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q8(r32) _BFGET_(r32, 8, 8) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q8(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q8(r16) _BFGET_(r16, 8, 8) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q8(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q9(r32) _BFGET_(r32, 9, 9) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q9(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q9(r16) _BFGET_(r16, 9, 9) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q9(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q10(r32) _BFGET_(r32,10,10) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q10(r32,v) _BFSET_(r32,10,10,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q10(r16) _BFGET_(r16,10,10) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q10(r16,v) _BFSET_(r16,10,10,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q11(r32) _BFGET_(r32,11,11) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q11(r32,v) _BFSET_(r32,11,11,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q11(r16) _BFGET_(r16,11,11) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q11(r16,v) _BFSET_(r16,11,11,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q12(r32) _BFGET_(r32,12,12) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q12(r32,v) _BFSET_(r32,12,12,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q12(r16) _BFGET_(r16,12,12) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q12(r16,v) _BFSET_(r16,12,12,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q13(r32) _BFGET_(r32,13,13) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q13(r32,v) _BFSET_(r32,13,13,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q13(r16) _BFGET_(r16,13,13) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q13(r16,v) _BFSET_(r16,13,13,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q14(r32) _BFGET_(r32,14,14) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q14(r32,v) _BFSET_(r32,14,14,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q14(r16) _BFGET_(r16,14,14) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q14(r16,v) _BFSET_(r16,14,14,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q15(r32) _BFGET_(r32,15,15) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q15(r32,v) _BFSET_(r32,15,15,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q15(r16) _BFGET_(r16,15,15) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q15(r16,v) _BFSET_(r16,15,15,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q16(r32) _BFGET_(r32,16,16) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q16(r32,v) _BFSET_(r32,16,16,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q16(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q16(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q17(r32) _BFGET_(r32,17,17) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q17(r32,v) _BFSET_(r32,17,17,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q17(r16) _BFGET_(r16, 1, 1) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q17(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AVIO_BCM_FULL_STS_STICKY_Q18(r32) _BFGET_(r32,18,18) + #define SET32AVIO_BCM_FULL_STS_STICKY_Q18(r32,v) _BFSET_(r32,18,18,v) + #define GET16AVIO_BCM_FULL_STS_STICKY_Q18(r16) _BFGET_(r16, 2, 2) + #define SET16AVIO_BCM_FULL_STS_STICKY_Q18(r16,v) _BFSET_(r16, 2, 2,v) + + #define w32AVIO_BCM_FULL_STS_STICKY {\ + UNSG32 uBCM_FULL_STS_STICKY_Q0 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q1 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q2 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q3 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q4 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q5 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q6 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q7 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q8 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q9 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q10 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q11 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q12 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q13 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q14 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q15 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q16 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q17 : 1;\ + UNSG32 uBCM_FULL_STS_STICKY_Q18 : 1;\ + UNSG32 RSVDx19C_b19 : 13;\ + } + union { UNSG32 u32AVIO_BCM_FULL_STS_STICKY; + struct w32AVIO_BCM_FULL_STS_STICKY; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_ERROR_err(r32) _BFGET_(r32, 0, 0) + #define SET32AVIO_BCM_ERROR_err(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16AVIO_BCM_ERROR_err(r16) _BFGET_(r16, 0, 0) + #define SET16AVIO_BCM_ERROR_err(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32AVIO_BCM_ERROR {\ + UNSG32 uBCM_ERROR_err : 1;\ + UNSG32 RSVDx1A0_b1 : 31;\ + } + union { UNSG32 u32AVIO_BCM_ERROR; + struct w32AVIO_BCM_ERROR; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_LOG_ADDR_addr(r32) _BFGET_(r32,31, 0) + #define SET32AVIO_BCM_LOG_ADDR_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32AVIO_BCM_LOG_ADDR {\ + UNSG32 uBCM_LOG_ADDR_addr : 32;\ + } + union { UNSG32 u32AVIO_BCM_LOG_ADDR; + struct w32AVIO_BCM_LOG_ADDR; + }; + /////////////////////////////////////////////////////////// + #define GET32AVIO_BCM_ERROR_DATA_data(r32) _BFGET_(r32,31, 0) + #define SET32AVIO_BCM_ERROR_DATA_data(r32,v) _BFSET_(r32,31, 0,v) + + #define w32AVIO_BCM_ERROR_DATA {\ + UNSG32 uBCM_ERROR_DATA_data : 32;\ + } + union { UNSG32 u32AVIO_BCM_ERROR_DATA; + struct w32AVIO_BCM_ERROR_DATA; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx1AC [84]; + /////////////////////////////////////////////////////////// + } SIE_AVIO; + + typedef union T32AVIO_BCM_Q0 + { UNSG32 u32; + struct w32AVIO_BCM_Q0; + } T32AVIO_BCM_Q0; + typedef union T32AVIO_BCM_Q1 + { UNSG32 u32; + struct w32AVIO_BCM_Q1; + } T32AVIO_BCM_Q1; + typedef union T32AVIO_BCM_Q2 + { UNSG32 u32; + struct w32AVIO_BCM_Q2; + } T32AVIO_BCM_Q2; + typedef union T32AVIO_BCM_Q3 + { UNSG32 u32; + struct w32AVIO_BCM_Q3; + } T32AVIO_BCM_Q3; + typedef union T32AVIO_BCM_Q4 + { UNSG32 u32; + struct w32AVIO_BCM_Q4; + } T32AVIO_BCM_Q4; + typedef union T32AVIO_BCM_Q5 + { UNSG32 u32; + struct w32AVIO_BCM_Q5; + } T32AVIO_BCM_Q5; + typedef union T32AVIO_BCM_Q6 + { UNSG32 u32; + struct w32AVIO_BCM_Q6; + } T32AVIO_BCM_Q6; + typedef union T32AVIO_BCM_Q7 + { UNSG32 u32; + struct w32AVIO_BCM_Q7; + } T32AVIO_BCM_Q7; + typedef union T32AVIO_BCM_Q8 + { UNSG32 u32; + struct w32AVIO_BCM_Q8; + } T32AVIO_BCM_Q8; + typedef union T32AVIO_BCM_Q9 + { UNSG32 u32; + struct w32AVIO_BCM_Q9; + } T32AVIO_BCM_Q9; + typedef union T32AVIO_BCM_Q10 + { UNSG32 u32; + struct w32AVIO_BCM_Q10; + } T32AVIO_BCM_Q10; + typedef union T32AVIO_BCM_Q11 + { UNSG32 u32; + struct w32AVIO_BCM_Q11; + } T32AVIO_BCM_Q11; + typedef union T32AVIO_BCM_Q14 + { UNSG32 u32; + struct w32AVIO_BCM_Q14; + } T32AVIO_BCM_Q14; + typedef union T32AVIO_BCM_Q15 + { UNSG32 u32; + struct w32AVIO_BCM_Q15; + } T32AVIO_BCM_Q15; + typedef union T32AVIO_BCM_Q16 + { UNSG32 u32; + struct w32AVIO_BCM_Q16; + } T32AVIO_BCM_Q16; + typedef union T32AVIO_BCM_Q17 + { UNSG32 u32; + struct w32AVIO_BCM_Q17; + } T32AVIO_BCM_Q17; + typedef union T32AVIO_BCM_Q18 + { UNSG32 u32; + struct w32AVIO_BCM_Q18; + } T32AVIO_BCM_Q18; + typedef union T32AVIO_BCM_FULL_STS + { UNSG32 u32; + struct w32AVIO_BCM_FULL_STS; + } T32AVIO_BCM_FULL_STS; + typedef union T32AVIO_BCM_EMP_STS + { UNSG32 u32; + struct w32AVIO_BCM_EMP_STS; + } T32AVIO_BCM_EMP_STS; + typedef union T32AVIO_BCM_FLUSH + { UNSG32 u32; + struct w32AVIO_BCM_FLUSH; + } T32AVIO_BCM_FLUSH; + typedef union T32AVIO_BCM_AUTOPUSH_CNT + { UNSG32 u32; + struct w32AVIO_BCM_AUTOPUSH_CNT; + } T32AVIO_BCM_AUTOPUSH_CNT; + typedef union T32AVIO_BCM_AUTOPUSH + { UNSG32 u32; + struct w32AVIO_BCM_AUTOPUSH; + } T32AVIO_BCM_AUTOPUSH; + typedef union T32AVIO_BCM_FULL_STS_STICKY + { UNSG32 u32; + struct w32AVIO_BCM_FULL_STS_STICKY; + } T32AVIO_BCM_FULL_STS_STICKY; + typedef union T32AVIO_BCM_ERROR + { UNSG32 u32; + struct w32AVIO_BCM_ERROR; + } T32AVIO_BCM_ERROR; + typedef union T32AVIO_BCM_LOG_ADDR + { UNSG32 u32; + struct w32AVIO_BCM_LOG_ADDR; + } T32AVIO_BCM_LOG_ADDR; + typedef union T32AVIO_BCM_ERROR_DATA + { UNSG32 u32; + struct w32AVIO_BCM_ERROR_DATA; + } T32AVIO_BCM_ERROR_DATA; + /////////////////////////////////////////////////////////// + + typedef union TAVIO_BCM_Q0 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q0; + }; + } TAVIO_BCM_Q0; + typedef union TAVIO_BCM_Q1 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q1; + }; + } TAVIO_BCM_Q1; + typedef union TAVIO_BCM_Q2 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q2; + }; + } TAVIO_BCM_Q2; + typedef union TAVIO_BCM_Q3 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q3; + }; + } TAVIO_BCM_Q3; + typedef union TAVIO_BCM_Q4 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q4; + }; + } TAVIO_BCM_Q4; + typedef union TAVIO_BCM_Q5 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q5; + }; + } TAVIO_BCM_Q5; + typedef union TAVIO_BCM_Q6 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q6; + }; + } TAVIO_BCM_Q6; + typedef union TAVIO_BCM_Q7 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q7; + }; + } TAVIO_BCM_Q7; + typedef union TAVIO_BCM_Q8 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q8; + }; + } TAVIO_BCM_Q8; + typedef union TAVIO_BCM_Q9 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q9; + }; + } TAVIO_BCM_Q9; + typedef union TAVIO_BCM_Q10 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q10; + }; + } TAVIO_BCM_Q10; + typedef union TAVIO_BCM_Q11 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q11; + }; + } TAVIO_BCM_Q11; + typedef union TAVIO_BCM_Q14 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q14; + }; + } TAVIO_BCM_Q14; + typedef union TAVIO_BCM_Q15 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q15; + }; + } TAVIO_BCM_Q15; + typedef union TAVIO_BCM_Q16 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q16; + }; + } TAVIO_BCM_Q16; + typedef union TAVIO_BCM_Q17 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q17; + }; + } TAVIO_BCM_Q17; + typedef union TAVIO_BCM_Q18 + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_Q18; + }; + } TAVIO_BCM_Q18; + typedef union TAVIO_BCM_FULL_STS + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_FULL_STS; + }; + } TAVIO_BCM_FULL_STS; + typedef union TAVIO_BCM_EMP_STS + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_EMP_STS; + }; + } TAVIO_BCM_EMP_STS; + typedef union TAVIO_BCM_FLUSH + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_FLUSH; + }; + } TAVIO_BCM_FLUSH; + typedef union TAVIO_BCM_AUTOPUSH_CNT + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_AUTOPUSH_CNT; + }; + } TAVIO_BCM_AUTOPUSH_CNT; + typedef union TAVIO_BCM_AUTOPUSH + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_AUTOPUSH; + }; + } TAVIO_BCM_AUTOPUSH; + typedef union TAVIO_BCM_FULL_STS_STICKY + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_FULL_STS_STICKY; + }; + } TAVIO_BCM_FULL_STS_STICKY; + typedef union TAVIO_BCM_ERROR + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_ERROR; + }; + } TAVIO_BCM_ERROR; + typedef union TAVIO_BCM_LOG_ADDR + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_LOG_ADDR; + }; + } TAVIO_BCM_LOG_ADDR; + typedef union TAVIO_BCM_ERROR_DATA + { UNSG32 u32[1]; + struct { + struct w32AVIO_BCM_ERROR_DATA; + }; + } TAVIO_BCM_ERROR_DATA; + + /////////////////////////////////////////////////////////// + SIGN32 AVIO_drvrd(SIE_AVIO *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 AVIO_drvwr(SIE_AVIO *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void AVIO_reset(SIE_AVIO *p); + SIGN32 AVIO_cmp (SIE_AVIO *p, SIE_AVIO *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define AVIO_check(p,pie,pfx,hLOG) AVIO_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define AVIO_print(p, pfx,hLOG) AVIO_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: AVIO +//////////////////////////////////////////////////////////// + + + +#ifdef __cplusplus + } +#endif +#pragma pack() + +#endif +////// +/// ENDOFFILE: avio.h +//////////////////////////////////////////////////////////// + diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/avioDhub.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/avioDhub.h new file mode 100644 index 00000000..ac6499bb --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/avioDhub.h @@ -0,0 +1,4777 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + +////// +/// don't edit! auto-generated by docc: avioDhub.h +//////////////////////////////////////////////////////////// +#ifndef avioDhub_h +#define avioDhub_h (){} + + +#include "ctypes.h" + +#pragma pack(1) +#ifdef __cplusplus + extern "C" { +#endif + +#ifndef _DOCC_H_BITOPS_ +#define _DOCC_H_BITOPS_ (){} + + #define _bSETMASK_(b) ((b)<32 ? (1<<((b)&31)) : 0) + #define _NSETMASK_(msb,lsb) (_bSETMASK_((msb)+1)-_bSETMASK_(lsb)) + #define _bCLRMASK_(b) (~_bSETMASK_(b)) + #define _NCLRMASK_(msb,lsb) (~_NSETMASK_(msb,lsb)) + #define _BFGET_(r,msb,lsb) (_NSETMASK_((msb)-(lsb),0)&((r)>>(lsb))) + #define _BFSET_(r,msb,lsb,v) do{ (r)&=_NCLRMASK_(msb,lsb); (r)|=_NSETMASK_(msb,lsb)&((v)<<(lsb)); }while(0) + +#endif + +////// +/// +/// $INTERFACE SemaINTR (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 mask (W-) +/// %unsigned 1 empty 0x0 +/// ### +/// * Enable interrupt on 'empty' condition +/// ### +/// %unsigned 1 full 0x0 +/// ### +/// * Enable interrupt on 'full' condition +/// ### +/// %unsigned 1 almostEmpty 0x0 +/// ### +/// * Enable interrupt on 'almostEmpty' condition +/// ### +/// %unsigned 1 almostFull 0x0 +/// ### +/// * Enable interrupt on 'almostFull' condition +/// ### +/// %% 28 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 4b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaINTR +#define h_SemaINTR (){} + + #define RA_SemaINTR_mask 0x0000 + + #define BA_SemaINTR_mask_empty 0x0000 + #define B16SemaINTR_mask_empty 0x0000 + #define LSb32SemaINTR_mask_empty 0 + #define LSb16SemaINTR_mask_empty 0 + #define bSemaINTR_mask_empty 1 + #define MSK32SemaINTR_mask_empty 0x00000001 + + #define BA_SemaINTR_mask_full 0x0000 + #define B16SemaINTR_mask_full 0x0000 + #define LSb32SemaINTR_mask_full 1 + #define LSb16SemaINTR_mask_full 1 + #define bSemaINTR_mask_full 1 + #define MSK32SemaINTR_mask_full 0x00000002 + + #define BA_SemaINTR_mask_almostEmpty 0x0000 + #define B16SemaINTR_mask_almostEmpty 0x0000 + #define LSb32SemaINTR_mask_almostEmpty 2 + #define LSb16SemaINTR_mask_almostEmpty 2 + #define bSemaINTR_mask_almostEmpty 1 + #define MSK32SemaINTR_mask_almostEmpty 0x00000004 + + #define BA_SemaINTR_mask_almostFull 0x0000 + #define B16SemaINTR_mask_almostFull 0x0000 + #define LSb32SemaINTR_mask_almostFull 3 + #define LSb16SemaINTR_mask_almostFull 3 + #define bSemaINTR_mask_almostFull 1 + #define MSK32SemaINTR_mask_almostFull 0x00000008 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaINTR { + /////////////////////////////////////////////////////////// + #define GET32SemaINTR_mask_empty(r32) _BFGET_(r32, 0, 0) + #define SET32SemaINTR_mask_empty(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaINTR_mask_empty(r16) _BFGET_(r16, 0, 0) + #define SET16SemaINTR_mask_empty(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaINTR_mask_full(r32) _BFGET_(r32, 1, 1) + #define SET32SemaINTR_mask_full(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaINTR_mask_full(r16) _BFGET_(r16, 1, 1) + #define SET16SemaINTR_mask_full(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaINTR_mask_almostEmpty(r32) _BFGET_(r32, 2, 2) + #define SET32SemaINTR_mask_almostEmpty(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaINTR_mask_almostEmpty(r16) _BFGET_(r16, 2, 2) + #define SET16SemaINTR_mask_almostEmpty(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaINTR_mask_almostFull(r32) _BFGET_(r32, 3, 3) + #define SET32SemaINTR_mask_almostFull(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaINTR_mask_almostFull(r16) _BFGET_(r16, 3, 3) + #define SET16SemaINTR_mask_almostFull(r16,v) _BFSET_(r16, 3, 3,v) + + #define w32SemaINTR_mask {\ + UNSG32 umask_empty : 1;\ + UNSG32 umask_full : 1;\ + UNSG32 umask_almostEmpty : 1;\ + UNSG32 umask_almostFull : 1;\ + UNSG32 RSVDx0_b4 : 28;\ + } + union { UNSG32 u32SemaINTR_mask; + struct w32SemaINTR_mask; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaINTR; + + typedef union T32SemaINTR_mask + { UNSG32 u32; + struct w32SemaINTR_mask; + } T32SemaINTR_mask; + /////////////////////////////////////////////////////////// + + typedef union TSemaINTR_mask + { UNSG32 u32[1]; + struct { + struct w32SemaINTR_mask; + }; + } TSemaINTR_mask; + + /////////////////////////////////////////////////////////// + SIGN32 SemaINTR_drvrd(SIE_SemaINTR *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaINTR_drvwr(SIE_SemaINTR *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaINTR_reset(SIE_SemaINTR *p); + SIGN32 SemaINTR_cmp (SIE_SemaINTR *p, SIE_SemaINTR *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaINTR_check(p,pie,pfx,hLOG) SemaINTR_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaINTR_print(p, pfx,hLOG) SemaINTR_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaINTR +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE Semaphore biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 16 DEPTH 0xF +/// ### +/// * Max level of semaphore +/// * Note: write this register will trigger counter reset +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00004 (P) +/// # 0x00004 INTR +/// $SemaINTR INTR REG [3] +/// ### +/// * Interrupt mask for 3 CPUs +/// ### +/// @ 0x00010 mask (W-) +/// %unsigned 1 full 0x0 +/// %unsigned 1 emp 0x0 +/// ### +/// * When full bit is set to one, to the producer, the semaphore will never be full, so that the producer will never be blocked. +/// * When emp bit is set to one, to the consumer, the semaphore will never be empty, so that the consumer will never be blocked. +/// * When the emp/full bit is set, the semaphore/FIFO pointer will be maintained, but the counter will be not correct anymore. +/// ### +/// %% 30 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 20B, bits: 30b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_Semaphore +#define h_Semaphore (){} + + #define RA_Semaphore_CFG 0x0000 + + #define BA_Semaphore_CFG_DEPTH 0x0000 + #define B16Semaphore_CFG_DEPTH 0x0000 + #define LSb32Semaphore_CFG_DEPTH 0 + #define LSb16Semaphore_CFG_DEPTH 0 + #define bSemaphore_CFG_DEPTH 16 + #define MSK32Semaphore_CFG_DEPTH 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_Semaphore_INTR 0x0004 + /////////////////////////////////////////////////////////// + #define RA_Semaphore_mask 0x0010 + + #define BA_Semaphore_mask_full 0x0010 + #define B16Semaphore_mask_full 0x0010 + #define LSb32Semaphore_mask_full 0 + #define LSb16Semaphore_mask_full 0 + #define bSemaphore_mask_full 1 + #define MSK32Semaphore_mask_full 0x00000001 + + #define BA_Semaphore_mask_emp 0x0010 + #define B16Semaphore_mask_emp 0x0010 + #define LSb32Semaphore_mask_emp 1 + #define LSb16Semaphore_mask_emp 1 + #define bSemaphore_mask_emp 1 + #define MSK32Semaphore_mask_emp 0x00000002 + /////////////////////////////////////////////////////////// + + typedef struct SIE_Semaphore { + /////////////////////////////////////////////////////////// + #define GET32Semaphore_CFG_DEPTH(r32) _BFGET_(r32,15, 0) + #define SET32Semaphore_CFG_DEPTH(r32,v) _BFSET_(r32,15, 0,v) + #define GET16Semaphore_CFG_DEPTH(r16) _BFGET_(r16,15, 0) + #define SET16Semaphore_CFG_DEPTH(r16,v) _BFSET_(r16,15, 0,v) + + #define w32Semaphore_CFG {\ + UNSG32 uCFG_DEPTH : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32Semaphore_CFG; + struct w32Semaphore_CFG; + }; + /////////////////////////////////////////////////////////// + SIE_SemaINTR ie_INTR[3]; + /////////////////////////////////////////////////////////// + #define GET32Semaphore_mask_full(r32) _BFGET_(r32, 0, 0) + #define SET32Semaphore_mask_full(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16Semaphore_mask_full(r16) _BFGET_(r16, 0, 0) + #define SET16Semaphore_mask_full(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32Semaphore_mask_emp(r32) _BFGET_(r32, 1, 1) + #define SET32Semaphore_mask_emp(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16Semaphore_mask_emp(r16) _BFGET_(r16, 1, 1) + #define SET16Semaphore_mask_emp(r16,v) _BFSET_(r16, 1, 1,v) + + #define w32Semaphore_mask {\ + UNSG32 umask_full : 1;\ + UNSG32 umask_emp : 1;\ + UNSG32 RSVDx10_b2 : 30;\ + } + union { UNSG32 u32Semaphore_mask; + struct w32Semaphore_mask; + }; + /////////////////////////////////////////////////////////// + } SIE_Semaphore; + + typedef union T32Semaphore_CFG + { UNSG32 u32; + struct w32Semaphore_CFG; + } T32Semaphore_CFG; + typedef union T32Semaphore_mask + { UNSG32 u32; + struct w32Semaphore_mask; + } T32Semaphore_mask; + /////////////////////////////////////////////////////////// + + typedef union TSemaphore_CFG + { UNSG32 u32[1]; + struct { + struct w32Semaphore_CFG; + }; + } TSemaphore_CFG; + typedef union TSemaphore_mask + { UNSG32 u32[1]; + struct { + struct w32Semaphore_mask; + }; + } TSemaphore_mask; + + /////////////////////////////////////////////////////////// + SIGN32 Semaphore_drvrd(SIE_Semaphore *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 Semaphore_drvwr(SIE_Semaphore *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void Semaphore_reset(SIE_Semaphore *p); + SIGN32 Semaphore_cmp (SIE_Semaphore *p, SIE_Semaphore *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define Semaphore_check(p,pie,pfx,hLOG) Semaphore_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define Semaphore_print(p, pfx,hLOG) Semaphore_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: Semaphore +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaQuery (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 RESP (R-) +/// %unsigned 16 CNT +/// ### +/// * Semaphore counter level +/// ### +/// %unsigned 16 PTR +/// ### +/// * Semaphore pointer: +/// * producer-wptr or consumer-rptr +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 32b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaQuery +#define h_SemaQuery (){} + + #define RA_SemaQuery_RESP 0x0000 + + #define BA_SemaQuery_RESP_CNT 0x0000 + #define B16SemaQuery_RESP_CNT 0x0000 + #define LSb32SemaQuery_RESP_CNT 0 + #define LSb16SemaQuery_RESP_CNT 0 + #define bSemaQuery_RESP_CNT 16 + #define MSK32SemaQuery_RESP_CNT 0x0000FFFF + + #define BA_SemaQuery_RESP_PTR 0x0002 + #define B16SemaQuery_RESP_PTR 0x0002 + #define LSb32SemaQuery_RESP_PTR 16 + #define LSb16SemaQuery_RESP_PTR 0 + #define bSemaQuery_RESP_PTR 16 + #define MSK32SemaQuery_RESP_PTR 0xFFFF0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaQuery { + /////////////////////////////////////////////////////////// + #define GET32SemaQuery_RESP_CNT(r32) _BFGET_(r32,15, 0) + #define SET32SemaQuery_RESP_CNT(r32,v) _BFSET_(r32,15, 0,v) + #define GET16SemaQuery_RESP_CNT(r16) _BFGET_(r16,15, 0) + #define SET16SemaQuery_RESP_CNT(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32SemaQuery_RESP_PTR(r32) _BFGET_(r32,31,16) + #define SET32SemaQuery_RESP_PTR(r32,v) _BFSET_(r32,31,16,v) + #define GET16SemaQuery_RESP_PTR(r16) _BFGET_(r16,15, 0) + #define SET16SemaQuery_RESP_PTR(r16,v) _BFSET_(r16,15, 0,v) + + #define w32SemaQuery_RESP {\ + UNSG32 uRESP_CNT : 16;\ + UNSG32 uRESP_PTR : 16;\ + } + union { UNSG32 u32SemaQuery_RESP; + struct w32SemaQuery_RESP; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaQuery; + + typedef union T32SemaQuery_RESP + { UNSG32 u32; + struct w32SemaQuery_RESP; + } T32SemaQuery_RESP; + /////////////////////////////////////////////////////////// + + typedef union TSemaQuery_RESP + { UNSG32 u32[1]; + struct { + struct w32SemaQuery_RESP; + }; + } TSemaQuery_RESP; + + /////////////////////////////////////////////////////////// + SIGN32 SemaQuery_drvrd(SIE_SemaQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaQuery_drvwr(SIE_SemaQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaQuery_reset(SIE_SemaQuery *p); + SIGN32 SemaQuery_cmp (SIE_SemaQuery *p, SIE_SemaQuery *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaQuery_check(p,pie,pfx,hLOG) SemaQuery_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaQuery_print(p, pfx,hLOG) SemaQuery_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaQuery +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaQueryMap (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 ADDR (P) +/// %unsigned 2 byte +/// %unsigned 5 ID +/// ### +/// * Semaphore cell index +/// ### +/// %unsigned 1 master +/// : producer 0x0 +/// : consumer 0x1 +/// ### +/// * Select which counter to read +/// ### +/// %% 24 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 8b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaQueryMap +#define h_SemaQueryMap (){} + + #define RA_SemaQueryMap_ADDR 0x0000 + + #define BA_SemaQueryMap_ADDR_byte 0x0000 + #define B16SemaQueryMap_ADDR_byte 0x0000 + #define LSb32SemaQueryMap_ADDR_byte 0 + #define LSb16SemaQueryMap_ADDR_byte 0 + #define bSemaQueryMap_ADDR_byte 2 + #define MSK32SemaQueryMap_ADDR_byte 0x00000003 + + #define BA_SemaQueryMap_ADDR_ID 0x0000 + #define B16SemaQueryMap_ADDR_ID 0x0000 + #define LSb32SemaQueryMap_ADDR_ID 2 + #define LSb16SemaQueryMap_ADDR_ID 2 + #define bSemaQueryMap_ADDR_ID 5 + #define MSK32SemaQueryMap_ADDR_ID 0x0000007C + + #define BA_SemaQueryMap_ADDR_master 0x0000 + #define B16SemaQueryMap_ADDR_master 0x0000 + #define LSb32SemaQueryMap_ADDR_master 7 + #define LSb16SemaQueryMap_ADDR_master 7 + #define bSemaQueryMap_ADDR_master 1 + #define MSK32SemaQueryMap_ADDR_master 0x00000080 + #define SemaQueryMap_ADDR_master_producer 0x0 + #define SemaQueryMap_ADDR_master_consumer 0x1 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaQueryMap { + /////////////////////////////////////////////////////////// + #define GET32SemaQueryMap_ADDR_byte(r32) _BFGET_(r32, 1, 0) + #define SET32SemaQueryMap_ADDR_byte(r32,v) _BFSET_(r32, 1, 0,v) + #define GET16SemaQueryMap_ADDR_byte(r16) _BFGET_(r16, 1, 0) + #define SET16SemaQueryMap_ADDR_byte(r16,v) _BFSET_(r16, 1, 0,v) + + #define GET32SemaQueryMap_ADDR_ID(r32) _BFGET_(r32, 6, 2) + #define SET32SemaQueryMap_ADDR_ID(r32,v) _BFSET_(r32, 6, 2,v) + #define GET16SemaQueryMap_ADDR_ID(r16) _BFGET_(r16, 6, 2) + #define SET16SemaQueryMap_ADDR_ID(r16,v) _BFSET_(r16, 6, 2,v) + + #define GET32SemaQueryMap_ADDR_master(r32) _BFGET_(r32, 7, 7) + #define SET32SemaQueryMap_ADDR_master(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaQueryMap_ADDR_master(r16) _BFGET_(r16, 7, 7) + #define SET16SemaQueryMap_ADDR_master(r16,v) _BFSET_(r16, 7, 7,v) + + #define w32SemaQueryMap_ADDR {\ + UNSG32 uADDR_byte : 2;\ + UNSG32 uADDR_ID : 5;\ + UNSG32 uADDR_master : 1;\ + UNSG32 RSVDx0_b8 : 24;\ + } + union { UNSG32 u32SemaQueryMap_ADDR; + struct w32SemaQueryMap_ADDR; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaQueryMap; + + typedef union T32SemaQueryMap_ADDR + { UNSG32 u32; + struct w32SemaQueryMap_ADDR; + } T32SemaQueryMap_ADDR; + /////////////////////////////////////////////////////////// + + typedef union TSemaQueryMap_ADDR + { UNSG32 u32[1]; + struct { + struct w32SemaQueryMap_ADDR; + }; + } TSemaQueryMap_ADDR; + + /////////////////////////////////////////////////////////// + SIGN32 SemaQueryMap_drvrd(SIE_SemaQueryMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaQueryMap_drvwr(SIE_SemaQueryMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaQueryMap_reset(SIE_SemaQueryMap *p); + SIGN32 SemaQueryMap_cmp (SIE_SemaQueryMap *p, SIE_SemaQueryMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaQueryMap_check(p,pie,pfx,hLOG) SemaQueryMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaQueryMap_print(p, pfx,hLOG) SemaQueryMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaQueryMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaHub biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 Query (R-) +/// # 0x00000 counter +/// $SemaQuery counter MEM [64] +/// ### +/// * Access address as defined above +/// ### +/// @ 0x00100 ARR (P) +/// # 0x00100 cell +/// $Semaphore cell REG [32] +/// ### +/// * Up-to 32 semaphore cells +/// ### +/// @ 0x00380 PUSH (W-) +/// %unsigned 8 ID +/// %unsigned 8 delta +/// ### +/// * CPU increases PCounter by delta (0 as push 256) +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00384 POP (W-) +/// %unsigned 8 ID +/// %unsigned 8 delta +/// ### +/// * CPU decreases CCounter by delta (0 as pop 256) +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00388 empty (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'empty' status +/// ### +/// @ 0x0038C full (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'full' status +/// ### +/// @ 0x00390 almostEmpty (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'almostEmpty' status +/// ### +/// @ 0x00394 almostFull (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'almostFull' status +/// ### +/// @ 0x00398 (W-) +/// # # Stuffing bytes... +/// %% 832 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 1024B, bits: 1152b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaHub +#define h_SemaHub (){} + + #define RA_SemaHub_Query 0x0000 + #define RA_SemaHub_counter 0x0000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_ARR 0x0100 + #define RA_SemaHub_cell 0x0100 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_PUSH 0x0380 + + #define BA_SemaHub_PUSH_ID 0x0380 + #define B16SemaHub_PUSH_ID 0x0380 + #define LSb32SemaHub_PUSH_ID 0 + #define LSb16SemaHub_PUSH_ID 0 + #define bSemaHub_PUSH_ID 8 + #define MSK32SemaHub_PUSH_ID 0x000000FF + + #define BA_SemaHub_PUSH_delta 0x0381 + #define B16SemaHub_PUSH_delta 0x0380 + #define LSb32SemaHub_PUSH_delta 8 + #define LSb16SemaHub_PUSH_delta 8 + #define bSemaHub_PUSH_delta 8 + #define MSK32SemaHub_PUSH_delta 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_POP 0x0384 + + #define BA_SemaHub_POP_ID 0x0384 + #define B16SemaHub_POP_ID 0x0384 + #define LSb32SemaHub_POP_ID 0 + #define LSb16SemaHub_POP_ID 0 + #define bSemaHub_POP_ID 8 + #define MSK32SemaHub_POP_ID 0x000000FF + + #define BA_SemaHub_POP_delta 0x0385 + #define B16SemaHub_POP_delta 0x0384 + #define LSb32SemaHub_POP_delta 8 + #define LSb16SemaHub_POP_delta 8 + #define bSemaHub_POP_delta 8 + #define MSK32SemaHub_POP_delta 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_empty 0x0388 + + #define BA_SemaHub_empty_ST_0i 0x0388 + #define B16SemaHub_empty_ST_0i 0x0388 + #define LSb32SemaHub_empty_ST_0i 0 + #define LSb16SemaHub_empty_ST_0i 0 + #define bSemaHub_empty_ST_0i 1 + #define MSK32SemaHub_empty_ST_0i 0x00000001 + + #define BA_SemaHub_empty_ST_1i 0x0388 + #define B16SemaHub_empty_ST_1i 0x0388 + #define LSb32SemaHub_empty_ST_1i 1 + #define LSb16SemaHub_empty_ST_1i 1 + #define bSemaHub_empty_ST_1i 1 + #define MSK32SemaHub_empty_ST_1i 0x00000002 + + #define BA_SemaHub_empty_ST_2i 0x0388 + #define B16SemaHub_empty_ST_2i 0x0388 + #define LSb32SemaHub_empty_ST_2i 2 + #define LSb16SemaHub_empty_ST_2i 2 + #define bSemaHub_empty_ST_2i 1 + #define MSK32SemaHub_empty_ST_2i 0x00000004 + + #define BA_SemaHub_empty_ST_3i 0x0388 + #define B16SemaHub_empty_ST_3i 0x0388 + #define LSb32SemaHub_empty_ST_3i 3 + #define LSb16SemaHub_empty_ST_3i 3 + #define bSemaHub_empty_ST_3i 1 + #define MSK32SemaHub_empty_ST_3i 0x00000008 + + #define BA_SemaHub_empty_ST_4i 0x0388 + #define B16SemaHub_empty_ST_4i 0x0388 + #define LSb32SemaHub_empty_ST_4i 4 + #define LSb16SemaHub_empty_ST_4i 4 + #define bSemaHub_empty_ST_4i 1 + #define MSK32SemaHub_empty_ST_4i 0x00000010 + + #define BA_SemaHub_empty_ST_5i 0x0388 + #define B16SemaHub_empty_ST_5i 0x0388 + #define LSb32SemaHub_empty_ST_5i 5 + #define LSb16SemaHub_empty_ST_5i 5 + #define bSemaHub_empty_ST_5i 1 + #define MSK32SemaHub_empty_ST_5i 0x00000020 + + #define BA_SemaHub_empty_ST_6i 0x0388 + #define B16SemaHub_empty_ST_6i 0x0388 + #define LSb32SemaHub_empty_ST_6i 6 + #define LSb16SemaHub_empty_ST_6i 6 + #define bSemaHub_empty_ST_6i 1 + #define MSK32SemaHub_empty_ST_6i 0x00000040 + + #define BA_SemaHub_empty_ST_7i 0x0388 + #define B16SemaHub_empty_ST_7i 0x0388 + #define LSb32SemaHub_empty_ST_7i 7 + #define LSb16SemaHub_empty_ST_7i 7 + #define bSemaHub_empty_ST_7i 1 + #define MSK32SemaHub_empty_ST_7i 0x00000080 + + #define BA_SemaHub_empty_ST_8i 0x0389 + #define B16SemaHub_empty_ST_8i 0x0388 + #define LSb32SemaHub_empty_ST_8i 8 + #define LSb16SemaHub_empty_ST_8i 8 + #define bSemaHub_empty_ST_8i 1 + #define MSK32SemaHub_empty_ST_8i 0x00000100 + + #define BA_SemaHub_empty_ST_9i 0x0389 + #define B16SemaHub_empty_ST_9i 0x0388 + #define LSb32SemaHub_empty_ST_9i 9 + #define LSb16SemaHub_empty_ST_9i 9 + #define bSemaHub_empty_ST_9i 1 + #define MSK32SemaHub_empty_ST_9i 0x00000200 + + #define BA_SemaHub_empty_ST_10i 0x0389 + #define B16SemaHub_empty_ST_10i 0x0388 + #define LSb32SemaHub_empty_ST_10i 10 + #define LSb16SemaHub_empty_ST_10i 10 + #define bSemaHub_empty_ST_10i 1 + #define MSK32SemaHub_empty_ST_10i 0x00000400 + + #define BA_SemaHub_empty_ST_11i 0x0389 + #define B16SemaHub_empty_ST_11i 0x0388 + #define LSb32SemaHub_empty_ST_11i 11 + #define LSb16SemaHub_empty_ST_11i 11 + #define bSemaHub_empty_ST_11i 1 + #define MSK32SemaHub_empty_ST_11i 0x00000800 + + #define BA_SemaHub_empty_ST_12i 0x0389 + #define B16SemaHub_empty_ST_12i 0x0388 + #define LSb32SemaHub_empty_ST_12i 12 + #define LSb16SemaHub_empty_ST_12i 12 + #define bSemaHub_empty_ST_12i 1 + #define MSK32SemaHub_empty_ST_12i 0x00001000 + + #define BA_SemaHub_empty_ST_13i 0x0389 + #define B16SemaHub_empty_ST_13i 0x0388 + #define LSb32SemaHub_empty_ST_13i 13 + #define LSb16SemaHub_empty_ST_13i 13 + #define bSemaHub_empty_ST_13i 1 + #define MSK32SemaHub_empty_ST_13i 0x00002000 + + #define BA_SemaHub_empty_ST_14i 0x0389 + #define B16SemaHub_empty_ST_14i 0x0388 + #define LSb32SemaHub_empty_ST_14i 14 + #define LSb16SemaHub_empty_ST_14i 14 + #define bSemaHub_empty_ST_14i 1 + #define MSK32SemaHub_empty_ST_14i 0x00004000 + + #define BA_SemaHub_empty_ST_15i 0x0389 + #define B16SemaHub_empty_ST_15i 0x0388 + #define LSb32SemaHub_empty_ST_15i 15 + #define LSb16SemaHub_empty_ST_15i 15 + #define bSemaHub_empty_ST_15i 1 + #define MSK32SemaHub_empty_ST_15i 0x00008000 + + #define BA_SemaHub_empty_ST_16i 0x038A + #define B16SemaHub_empty_ST_16i 0x038A + #define LSb32SemaHub_empty_ST_16i 16 + #define LSb16SemaHub_empty_ST_16i 0 + #define bSemaHub_empty_ST_16i 1 + #define MSK32SemaHub_empty_ST_16i 0x00010000 + + #define BA_SemaHub_empty_ST_17i 0x038A + #define B16SemaHub_empty_ST_17i 0x038A + #define LSb32SemaHub_empty_ST_17i 17 + #define LSb16SemaHub_empty_ST_17i 1 + #define bSemaHub_empty_ST_17i 1 + #define MSK32SemaHub_empty_ST_17i 0x00020000 + + #define BA_SemaHub_empty_ST_18i 0x038A + #define B16SemaHub_empty_ST_18i 0x038A + #define LSb32SemaHub_empty_ST_18i 18 + #define LSb16SemaHub_empty_ST_18i 2 + #define bSemaHub_empty_ST_18i 1 + #define MSK32SemaHub_empty_ST_18i 0x00040000 + + #define BA_SemaHub_empty_ST_19i 0x038A + #define B16SemaHub_empty_ST_19i 0x038A + #define LSb32SemaHub_empty_ST_19i 19 + #define LSb16SemaHub_empty_ST_19i 3 + #define bSemaHub_empty_ST_19i 1 + #define MSK32SemaHub_empty_ST_19i 0x00080000 + + #define BA_SemaHub_empty_ST_20i 0x038A + #define B16SemaHub_empty_ST_20i 0x038A + #define LSb32SemaHub_empty_ST_20i 20 + #define LSb16SemaHub_empty_ST_20i 4 + #define bSemaHub_empty_ST_20i 1 + #define MSK32SemaHub_empty_ST_20i 0x00100000 + + #define BA_SemaHub_empty_ST_21i 0x038A + #define B16SemaHub_empty_ST_21i 0x038A + #define LSb32SemaHub_empty_ST_21i 21 + #define LSb16SemaHub_empty_ST_21i 5 + #define bSemaHub_empty_ST_21i 1 + #define MSK32SemaHub_empty_ST_21i 0x00200000 + + #define BA_SemaHub_empty_ST_22i 0x038A + #define B16SemaHub_empty_ST_22i 0x038A + #define LSb32SemaHub_empty_ST_22i 22 + #define LSb16SemaHub_empty_ST_22i 6 + #define bSemaHub_empty_ST_22i 1 + #define MSK32SemaHub_empty_ST_22i 0x00400000 + + #define BA_SemaHub_empty_ST_23i 0x038A + #define B16SemaHub_empty_ST_23i 0x038A + #define LSb32SemaHub_empty_ST_23i 23 + #define LSb16SemaHub_empty_ST_23i 7 + #define bSemaHub_empty_ST_23i 1 + #define MSK32SemaHub_empty_ST_23i 0x00800000 + + #define BA_SemaHub_empty_ST_24i 0x038B + #define B16SemaHub_empty_ST_24i 0x038A + #define LSb32SemaHub_empty_ST_24i 24 + #define LSb16SemaHub_empty_ST_24i 8 + #define bSemaHub_empty_ST_24i 1 + #define MSK32SemaHub_empty_ST_24i 0x01000000 + + #define BA_SemaHub_empty_ST_25i 0x038B + #define B16SemaHub_empty_ST_25i 0x038A + #define LSb32SemaHub_empty_ST_25i 25 + #define LSb16SemaHub_empty_ST_25i 9 + #define bSemaHub_empty_ST_25i 1 + #define MSK32SemaHub_empty_ST_25i 0x02000000 + + #define BA_SemaHub_empty_ST_26i 0x038B + #define B16SemaHub_empty_ST_26i 0x038A + #define LSb32SemaHub_empty_ST_26i 26 + #define LSb16SemaHub_empty_ST_26i 10 + #define bSemaHub_empty_ST_26i 1 + #define MSK32SemaHub_empty_ST_26i 0x04000000 + + #define BA_SemaHub_empty_ST_27i 0x038B + #define B16SemaHub_empty_ST_27i 0x038A + #define LSb32SemaHub_empty_ST_27i 27 + #define LSb16SemaHub_empty_ST_27i 11 + #define bSemaHub_empty_ST_27i 1 + #define MSK32SemaHub_empty_ST_27i 0x08000000 + + #define BA_SemaHub_empty_ST_28i 0x038B + #define B16SemaHub_empty_ST_28i 0x038A + #define LSb32SemaHub_empty_ST_28i 28 + #define LSb16SemaHub_empty_ST_28i 12 + #define bSemaHub_empty_ST_28i 1 + #define MSK32SemaHub_empty_ST_28i 0x10000000 + + #define BA_SemaHub_empty_ST_29i 0x038B + #define B16SemaHub_empty_ST_29i 0x038A + #define LSb32SemaHub_empty_ST_29i 29 + #define LSb16SemaHub_empty_ST_29i 13 + #define bSemaHub_empty_ST_29i 1 + #define MSK32SemaHub_empty_ST_29i 0x20000000 + + #define BA_SemaHub_empty_ST_30i 0x038B + #define B16SemaHub_empty_ST_30i 0x038A + #define LSb32SemaHub_empty_ST_30i 30 + #define LSb16SemaHub_empty_ST_30i 14 + #define bSemaHub_empty_ST_30i 1 + #define MSK32SemaHub_empty_ST_30i 0x40000000 + + #define BA_SemaHub_empty_ST_31i 0x038B + #define B16SemaHub_empty_ST_31i 0x038A + #define LSb32SemaHub_empty_ST_31i 31 + #define LSb16SemaHub_empty_ST_31i 15 + #define bSemaHub_empty_ST_31i 1 + #define MSK32SemaHub_empty_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_full 0x038C + + #define BA_SemaHub_full_ST_0i 0x038C + #define B16SemaHub_full_ST_0i 0x038C + #define LSb32SemaHub_full_ST_0i 0 + #define LSb16SemaHub_full_ST_0i 0 + #define bSemaHub_full_ST_0i 1 + #define MSK32SemaHub_full_ST_0i 0x00000001 + + #define BA_SemaHub_full_ST_1i 0x038C + #define B16SemaHub_full_ST_1i 0x038C + #define LSb32SemaHub_full_ST_1i 1 + #define LSb16SemaHub_full_ST_1i 1 + #define bSemaHub_full_ST_1i 1 + #define MSK32SemaHub_full_ST_1i 0x00000002 + + #define BA_SemaHub_full_ST_2i 0x038C + #define B16SemaHub_full_ST_2i 0x038C + #define LSb32SemaHub_full_ST_2i 2 + #define LSb16SemaHub_full_ST_2i 2 + #define bSemaHub_full_ST_2i 1 + #define MSK32SemaHub_full_ST_2i 0x00000004 + + #define BA_SemaHub_full_ST_3i 0x038C + #define B16SemaHub_full_ST_3i 0x038C + #define LSb32SemaHub_full_ST_3i 3 + #define LSb16SemaHub_full_ST_3i 3 + #define bSemaHub_full_ST_3i 1 + #define MSK32SemaHub_full_ST_3i 0x00000008 + + #define BA_SemaHub_full_ST_4i 0x038C + #define B16SemaHub_full_ST_4i 0x038C + #define LSb32SemaHub_full_ST_4i 4 + #define LSb16SemaHub_full_ST_4i 4 + #define bSemaHub_full_ST_4i 1 + #define MSK32SemaHub_full_ST_4i 0x00000010 + + #define BA_SemaHub_full_ST_5i 0x038C + #define B16SemaHub_full_ST_5i 0x038C + #define LSb32SemaHub_full_ST_5i 5 + #define LSb16SemaHub_full_ST_5i 5 + #define bSemaHub_full_ST_5i 1 + #define MSK32SemaHub_full_ST_5i 0x00000020 + + #define BA_SemaHub_full_ST_6i 0x038C + #define B16SemaHub_full_ST_6i 0x038C + #define LSb32SemaHub_full_ST_6i 6 + #define LSb16SemaHub_full_ST_6i 6 + #define bSemaHub_full_ST_6i 1 + #define MSK32SemaHub_full_ST_6i 0x00000040 + + #define BA_SemaHub_full_ST_7i 0x038C + #define B16SemaHub_full_ST_7i 0x038C + #define LSb32SemaHub_full_ST_7i 7 + #define LSb16SemaHub_full_ST_7i 7 + #define bSemaHub_full_ST_7i 1 + #define MSK32SemaHub_full_ST_7i 0x00000080 + + #define BA_SemaHub_full_ST_8i 0x038D + #define B16SemaHub_full_ST_8i 0x038C + #define LSb32SemaHub_full_ST_8i 8 + #define LSb16SemaHub_full_ST_8i 8 + #define bSemaHub_full_ST_8i 1 + #define MSK32SemaHub_full_ST_8i 0x00000100 + + #define BA_SemaHub_full_ST_9i 0x038D + #define B16SemaHub_full_ST_9i 0x038C + #define LSb32SemaHub_full_ST_9i 9 + #define LSb16SemaHub_full_ST_9i 9 + #define bSemaHub_full_ST_9i 1 + #define MSK32SemaHub_full_ST_9i 0x00000200 + + #define BA_SemaHub_full_ST_10i 0x038D + #define B16SemaHub_full_ST_10i 0x038C + #define LSb32SemaHub_full_ST_10i 10 + #define LSb16SemaHub_full_ST_10i 10 + #define bSemaHub_full_ST_10i 1 + #define MSK32SemaHub_full_ST_10i 0x00000400 + + #define BA_SemaHub_full_ST_11i 0x038D + #define B16SemaHub_full_ST_11i 0x038C + #define LSb32SemaHub_full_ST_11i 11 + #define LSb16SemaHub_full_ST_11i 11 + #define bSemaHub_full_ST_11i 1 + #define MSK32SemaHub_full_ST_11i 0x00000800 + + #define BA_SemaHub_full_ST_12i 0x038D + #define B16SemaHub_full_ST_12i 0x038C + #define LSb32SemaHub_full_ST_12i 12 + #define LSb16SemaHub_full_ST_12i 12 + #define bSemaHub_full_ST_12i 1 + #define MSK32SemaHub_full_ST_12i 0x00001000 + + #define BA_SemaHub_full_ST_13i 0x038D + #define B16SemaHub_full_ST_13i 0x038C + #define LSb32SemaHub_full_ST_13i 13 + #define LSb16SemaHub_full_ST_13i 13 + #define bSemaHub_full_ST_13i 1 + #define MSK32SemaHub_full_ST_13i 0x00002000 + + #define BA_SemaHub_full_ST_14i 0x038D + #define B16SemaHub_full_ST_14i 0x038C + #define LSb32SemaHub_full_ST_14i 14 + #define LSb16SemaHub_full_ST_14i 14 + #define bSemaHub_full_ST_14i 1 + #define MSK32SemaHub_full_ST_14i 0x00004000 + + #define BA_SemaHub_full_ST_15i 0x038D + #define B16SemaHub_full_ST_15i 0x038C + #define LSb32SemaHub_full_ST_15i 15 + #define LSb16SemaHub_full_ST_15i 15 + #define bSemaHub_full_ST_15i 1 + #define MSK32SemaHub_full_ST_15i 0x00008000 + + #define BA_SemaHub_full_ST_16i 0x038E + #define B16SemaHub_full_ST_16i 0x038E + #define LSb32SemaHub_full_ST_16i 16 + #define LSb16SemaHub_full_ST_16i 0 + #define bSemaHub_full_ST_16i 1 + #define MSK32SemaHub_full_ST_16i 0x00010000 + + #define BA_SemaHub_full_ST_17i 0x038E + #define B16SemaHub_full_ST_17i 0x038E + #define LSb32SemaHub_full_ST_17i 17 + #define LSb16SemaHub_full_ST_17i 1 + #define bSemaHub_full_ST_17i 1 + #define MSK32SemaHub_full_ST_17i 0x00020000 + + #define BA_SemaHub_full_ST_18i 0x038E + #define B16SemaHub_full_ST_18i 0x038E + #define LSb32SemaHub_full_ST_18i 18 + #define LSb16SemaHub_full_ST_18i 2 + #define bSemaHub_full_ST_18i 1 + #define MSK32SemaHub_full_ST_18i 0x00040000 + + #define BA_SemaHub_full_ST_19i 0x038E + #define B16SemaHub_full_ST_19i 0x038E + #define LSb32SemaHub_full_ST_19i 19 + #define LSb16SemaHub_full_ST_19i 3 + #define bSemaHub_full_ST_19i 1 + #define MSK32SemaHub_full_ST_19i 0x00080000 + + #define BA_SemaHub_full_ST_20i 0x038E + #define B16SemaHub_full_ST_20i 0x038E + #define LSb32SemaHub_full_ST_20i 20 + #define LSb16SemaHub_full_ST_20i 4 + #define bSemaHub_full_ST_20i 1 + #define MSK32SemaHub_full_ST_20i 0x00100000 + + #define BA_SemaHub_full_ST_21i 0x038E + #define B16SemaHub_full_ST_21i 0x038E + #define LSb32SemaHub_full_ST_21i 21 + #define LSb16SemaHub_full_ST_21i 5 + #define bSemaHub_full_ST_21i 1 + #define MSK32SemaHub_full_ST_21i 0x00200000 + + #define BA_SemaHub_full_ST_22i 0x038E + #define B16SemaHub_full_ST_22i 0x038E + #define LSb32SemaHub_full_ST_22i 22 + #define LSb16SemaHub_full_ST_22i 6 + #define bSemaHub_full_ST_22i 1 + #define MSK32SemaHub_full_ST_22i 0x00400000 + + #define BA_SemaHub_full_ST_23i 0x038E + #define B16SemaHub_full_ST_23i 0x038E + #define LSb32SemaHub_full_ST_23i 23 + #define LSb16SemaHub_full_ST_23i 7 + #define bSemaHub_full_ST_23i 1 + #define MSK32SemaHub_full_ST_23i 0x00800000 + + #define BA_SemaHub_full_ST_24i 0x038F + #define B16SemaHub_full_ST_24i 0x038E + #define LSb32SemaHub_full_ST_24i 24 + #define LSb16SemaHub_full_ST_24i 8 + #define bSemaHub_full_ST_24i 1 + #define MSK32SemaHub_full_ST_24i 0x01000000 + + #define BA_SemaHub_full_ST_25i 0x038F + #define B16SemaHub_full_ST_25i 0x038E + #define LSb32SemaHub_full_ST_25i 25 + #define LSb16SemaHub_full_ST_25i 9 + #define bSemaHub_full_ST_25i 1 + #define MSK32SemaHub_full_ST_25i 0x02000000 + + #define BA_SemaHub_full_ST_26i 0x038F + #define B16SemaHub_full_ST_26i 0x038E + #define LSb32SemaHub_full_ST_26i 26 + #define LSb16SemaHub_full_ST_26i 10 + #define bSemaHub_full_ST_26i 1 + #define MSK32SemaHub_full_ST_26i 0x04000000 + + #define BA_SemaHub_full_ST_27i 0x038F + #define B16SemaHub_full_ST_27i 0x038E + #define LSb32SemaHub_full_ST_27i 27 + #define LSb16SemaHub_full_ST_27i 11 + #define bSemaHub_full_ST_27i 1 + #define MSK32SemaHub_full_ST_27i 0x08000000 + + #define BA_SemaHub_full_ST_28i 0x038F + #define B16SemaHub_full_ST_28i 0x038E + #define LSb32SemaHub_full_ST_28i 28 + #define LSb16SemaHub_full_ST_28i 12 + #define bSemaHub_full_ST_28i 1 + #define MSK32SemaHub_full_ST_28i 0x10000000 + + #define BA_SemaHub_full_ST_29i 0x038F + #define B16SemaHub_full_ST_29i 0x038E + #define LSb32SemaHub_full_ST_29i 29 + #define LSb16SemaHub_full_ST_29i 13 + #define bSemaHub_full_ST_29i 1 + #define MSK32SemaHub_full_ST_29i 0x20000000 + + #define BA_SemaHub_full_ST_30i 0x038F + #define B16SemaHub_full_ST_30i 0x038E + #define LSb32SemaHub_full_ST_30i 30 + #define LSb16SemaHub_full_ST_30i 14 + #define bSemaHub_full_ST_30i 1 + #define MSK32SemaHub_full_ST_30i 0x40000000 + + #define BA_SemaHub_full_ST_31i 0x038F + #define B16SemaHub_full_ST_31i 0x038E + #define LSb32SemaHub_full_ST_31i 31 + #define LSb16SemaHub_full_ST_31i 15 + #define bSemaHub_full_ST_31i 1 + #define MSK32SemaHub_full_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_almostEmpty 0x0390 + + #define BA_SemaHub_almostEmpty_ST_0i 0x0390 + #define B16SemaHub_almostEmpty_ST_0i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_0i 0 + #define LSb16SemaHub_almostEmpty_ST_0i 0 + #define bSemaHub_almostEmpty_ST_0i 1 + #define MSK32SemaHub_almostEmpty_ST_0i 0x00000001 + + #define BA_SemaHub_almostEmpty_ST_1i 0x0390 + #define B16SemaHub_almostEmpty_ST_1i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_1i 1 + #define LSb16SemaHub_almostEmpty_ST_1i 1 + #define bSemaHub_almostEmpty_ST_1i 1 + #define MSK32SemaHub_almostEmpty_ST_1i 0x00000002 + + #define BA_SemaHub_almostEmpty_ST_2i 0x0390 + #define B16SemaHub_almostEmpty_ST_2i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_2i 2 + #define LSb16SemaHub_almostEmpty_ST_2i 2 + #define bSemaHub_almostEmpty_ST_2i 1 + #define MSK32SemaHub_almostEmpty_ST_2i 0x00000004 + + #define BA_SemaHub_almostEmpty_ST_3i 0x0390 + #define B16SemaHub_almostEmpty_ST_3i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_3i 3 + #define LSb16SemaHub_almostEmpty_ST_3i 3 + #define bSemaHub_almostEmpty_ST_3i 1 + #define MSK32SemaHub_almostEmpty_ST_3i 0x00000008 + + #define BA_SemaHub_almostEmpty_ST_4i 0x0390 + #define B16SemaHub_almostEmpty_ST_4i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_4i 4 + #define LSb16SemaHub_almostEmpty_ST_4i 4 + #define bSemaHub_almostEmpty_ST_4i 1 + #define MSK32SemaHub_almostEmpty_ST_4i 0x00000010 + + #define BA_SemaHub_almostEmpty_ST_5i 0x0390 + #define B16SemaHub_almostEmpty_ST_5i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_5i 5 + #define LSb16SemaHub_almostEmpty_ST_5i 5 + #define bSemaHub_almostEmpty_ST_5i 1 + #define MSK32SemaHub_almostEmpty_ST_5i 0x00000020 + + #define BA_SemaHub_almostEmpty_ST_6i 0x0390 + #define B16SemaHub_almostEmpty_ST_6i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_6i 6 + #define LSb16SemaHub_almostEmpty_ST_6i 6 + #define bSemaHub_almostEmpty_ST_6i 1 + #define MSK32SemaHub_almostEmpty_ST_6i 0x00000040 + + #define BA_SemaHub_almostEmpty_ST_7i 0x0390 + #define B16SemaHub_almostEmpty_ST_7i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_7i 7 + #define LSb16SemaHub_almostEmpty_ST_7i 7 + #define bSemaHub_almostEmpty_ST_7i 1 + #define MSK32SemaHub_almostEmpty_ST_7i 0x00000080 + + #define BA_SemaHub_almostEmpty_ST_8i 0x0391 + #define B16SemaHub_almostEmpty_ST_8i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_8i 8 + #define LSb16SemaHub_almostEmpty_ST_8i 8 + #define bSemaHub_almostEmpty_ST_8i 1 + #define MSK32SemaHub_almostEmpty_ST_8i 0x00000100 + + #define BA_SemaHub_almostEmpty_ST_9i 0x0391 + #define B16SemaHub_almostEmpty_ST_9i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_9i 9 + #define LSb16SemaHub_almostEmpty_ST_9i 9 + #define bSemaHub_almostEmpty_ST_9i 1 + #define MSK32SemaHub_almostEmpty_ST_9i 0x00000200 + + #define BA_SemaHub_almostEmpty_ST_10i 0x0391 + #define B16SemaHub_almostEmpty_ST_10i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_10i 10 + #define LSb16SemaHub_almostEmpty_ST_10i 10 + #define bSemaHub_almostEmpty_ST_10i 1 + #define MSK32SemaHub_almostEmpty_ST_10i 0x00000400 + + #define BA_SemaHub_almostEmpty_ST_11i 0x0391 + #define B16SemaHub_almostEmpty_ST_11i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_11i 11 + #define LSb16SemaHub_almostEmpty_ST_11i 11 + #define bSemaHub_almostEmpty_ST_11i 1 + #define MSK32SemaHub_almostEmpty_ST_11i 0x00000800 + + #define BA_SemaHub_almostEmpty_ST_12i 0x0391 + #define B16SemaHub_almostEmpty_ST_12i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_12i 12 + #define LSb16SemaHub_almostEmpty_ST_12i 12 + #define bSemaHub_almostEmpty_ST_12i 1 + #define MSK32SemaHub_almostEmpty_ST_12i 0x00001000 + + #define BA_SemaHub_almostEmpty_ST_13i 0x0391 + #define B16SemaHub_almostEmpty_ST_13i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_13i 13 + #define LSb16SemaHub_almostEmpty_ST_13i 13 + #define bSemaHub_almostEmpty_ST_13i 1 + #define MSK32SemaHub_almostEmpty_ST_13i 0x00002000 + + #define BA_SemaHub_almostEmpty_ST_14i 0x0391 + #define B16SemaHub_almostEmpty_ST_14i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_14i 14 + #define LSb16SemaHub_almostEmpty_ST_14i 14 + #define bSemaHub_almostEmpty_ST_14i 1 + #define MSK32SemaHub_almostEmpty_ST_14i 0x00004000 + + #define BA_SemaHub_almostEmpty_ST_15i 0x0391 + #define B16SemaHub_almostEmpty_ST_15i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_15i 15 + #define LSb16SemaHub_almostEmpty_ST_15i 15 + #define bSemaHub_almostEmpty_ST_15i 1 + #define MSK32SemaHub_almostEmpty_ST_15i 0x00008000 + + #define BA_SemaHub_almostEmpty_ST_16i 0x0392 + #define B16SemaHub_almostEmpty_ST_16i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_16i 16 + #define LSb16SemaHub_almostEmpty_ST_16i 0 + #define bSemaHub_almostEmpty_ST_16i 1 + #define MSK32SemaHub_almostEmpty_ST_16i 0x00010000 + + #define BA_SemaHub_almostEmpty_ST_17i 0x0392 + #define B16SemaHub_almostEmpty_ST_17i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_17i 17 + #define LSb16SemaHub_almostEmpty_ST_17i 1 + #define bSemaHub_almostEmpty_ST_17i 1 + #define MSK32SemaHub_almostEmpty_ST_17i 0x00020000 + + #define BA_SemaHub_almostEmpty_ST_18i 0x0392 + #define B16SemaHub_almostEmpty_ST_18i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_18i 18 + #define LSb16SemaHub_almostEmpty_ST_18i 2 + #define bSemaHub_almostEmpty_ST_18i 1 + #define MSK32SemaHub_almostEmpty_ST_18i 0x00040000 + + #define BA_SemaHub_almostEmpty_ST_19i 0x0392 + #define B16SemaHub_almostEmpty_ST_19i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_19i 19 + #define LSb16SemaHub_almostEmpty_ST_19i 3 + #define bSemaHub_almostEmpty_ST_19i 1 + #define MSK32SemaHub_almostEmpty_ST_19i 0x00080000 + + #define BA_SemaHub_almostEmpty_ST_20i 0x0392 + #define B16SemaHub_almostEmpty_ST_20i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_20i 20 + #define LSb16SemaHub_almostEmpty_ST_20i 4 + #define bSemaHub_almostEmpty_ST_20i 1 + #define MSK32SemaHub_almostEmpty_ST_20i 0x00100000 + + #define BA_SemaHub_almostEmpty_ST_21i 0x0392 + #define B16SemaHub_almostEmpty_ST_21i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_21i 21 + #define LSb16SemaHub_almostEmpty_ST_21i 5 + #define bSemaHub_almostEmpty_ST_21i 1 + #define MSK32SemaHub_almostEmpty_ST_21i 0x00200000 + + #define BA_SemaHub_almostEmpty_ST_22i 0x0392 + #define B16SemaHub_almostEmpty_ST_22i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_22i 22 + #define LSb16SemaHub_almostEmpty_ST_22i 6 + #define bSemaHub_almostEmpty_ST_22i 1 + #define MSK32SemaHub_almostEmpty_ST_22i 0x00400000 + + #define BA_SemaHub_almostEmpty_ST_23i 0x0392 + #define B16SemaHub_almostEmpty_ST_23i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_23i 23 + #define LSb16SemaHub_almostEmpty_ST_23i 7 + #define bSemaHub_almostEmpty_ST_23i 1 + #define MSK32SemaHub_almostEmpty_ST_23i 0x00800000 + + #define BA_SemaHub_almostEmpty_ST_24i 0x0393 + #define B16SemaHub_almostEmpty_ST_24i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_24i 24 + #define LSb16SemaHub_almostEmpty_ST_24i 8 + #define bSemaHub_almostEmpty_ST_24i 1 + #define MSK32SemaHub_almostEmpty_ST_24i 0x01000000 + + #define BA_SemaHub_almostEmpty_ST_25i 0x0393 + #define B16SemaHub_almostEmpty_ST_25i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_25i 25 + #define LSb16SemaHub_almostEmpty_ST_25i 9 + #define bSemaHub_almostEmpty_ST_25i 1 + #define MSK32SemaHub_almostEmpty_ST_25i 0x02000000 + + #define BA_SemaHub_almostEmpty_ST_26i 0x0393 + #define B16SemaHub_almostEmpty_ST_26i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_26i 26 + #define LSb16SemaHub_almostEmpty_ST_26i 10 + #define bSemaHub_almostEmpty_ST_26i 1 + #define MSK32SemaHub_almostEmpty_ST_26i 0x04000000 + + #define BA_SemaHub_almostEmpty_ST_27i 0x0393 + #define B16SemaHub_almostEmpty_ST_27i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_27i 27 + #define LSb16SemaHub_almostEmpty_ST_27i 11 + #define bSemaHub_almostEmpty_ST_27i 1 + #define MSK32SemaHub_almostEmpty_ST_27i 0x08000000 + + #define BA_SemaHub_almostEmpty_ST_28i 0x0393 + #define B16SemaHub_almostEmpty_ST_28i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_28i 28 + #define LSb16SemaHub_almostEmpty_ST_28i 12 + #define bSemaHub_almostEmpty_ST_28i 1 + #define MSK32SemaHub_almostEmpty_ST_28i 0x10000000 + + #define BA_SemaHub_almostEmpty_ST_29i 0x0393 + #define B16SemaHub_almostEmpty_ST_29i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_29i 29 + #define LSb16SemaHub_almostEmpty_ST_29i 13 + #define bSemaHub_almostEmpty_ST_29i 1 + #define MSK32SemaHub_almostEmpty_ST_29i 0x20000000 + + #define BA_SemaHub_almostEmpty_ST_30i 0x0393 + #define B16SemaHub_almostEmpty_ST_30i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_30i 30 + #define LSb16SemaHub_almostEmpty_ST_30i 14 + #define bSemaHub_almostEmpty_ST_30i 1 + #define MSK32SemaHub_almostEmpty_ST_30i 0x40000000 + + #define BA_SemaHub_almostEmpty_ST_31i 0x0393 + #define B16SemaHub_almostEmpty_ST_31i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_31i 31 + #define LSb16SemaHub_almostEmpty_ST_31i 15 + #define bSemaHub_almostEmpty_ST_31i 1 + #define MSK32SemaHub_almostEmpty_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_almostFull 0x0394 + + #define BA_SemaHub_almostFull_ST_0i 0x0394 + #define B16SemaHub_almostFull_ST_0i 0x0394 + #define LSb32SemaHub_almostFull_ST_0i 0 + #define LSb16SemaHub_almostFull_ST_0i 0 + #define bSemaHub_almostFull_ST_0i 1 + #define MSK32SemaHub_almostFull_ST_0i 0x00000001 + + #define BA_SemaHub_almostFull_ST_1i 0x0394 + #define B16SemaHub_almostFull_ST_1i 0x0394 + #define LSb32SemaHub_almostFull_ST_1i 1 + #define LSb16SemaHub_almostFull_ST_1i 1 + #define bSemaHub_almostFull_ST_1i 1 + #define MSK32SemaHub_almostFull_ST_1i 0x00000002 + + #define BA_SemaHub_almostFull_ST_2i 0x0394 + #define B16SemaHub_almostFull_ST_2i 0x0394 + #define LSb32SemaHub_almostFull_ST_2i 2 + #define LSb16SemaHub_almostFull_ST_2i 2 + #define bSemaHub_almostFull_ST_2i 1 + #define MSK32SemaHub_almostFull_ST_2i 0x00000004 + + #define BA_SemaHub_almostFull_ST_3i 0x0394 + #define B16SemaHub_almostFull_ST_3i 0x0394 + #define LSb32SemaHub_almostFull_ST_3i 3 + #define LSb16SemaHub_almostFull_ST_3i 3 + #define bSemaHub_almostFull_ST_3i 1 + #define MSK32SemaHub_almostFull_ST_3i 0x00000008 + + #define BA_SemaHub_almostFull_ST_4i 0x0394 + #define B16SemaHub_almostFull_ST_4i 0x0394 + #define LSb32SemaHub_almostFull_ST_4i 4 + #define LSb16SemaHub_almostFull_ST_4i 4 + #define bSemaHub_almostFull_ST_4i 1 + #define MSK32SemaHub_almostFull_ST_4i 0x00000010 + + #define BA_SemaHub_almostFull_ST_5i 0x0394 + #define B16SemaHub_almostFull_ST_5i 0x0394 + #define LSb32SemaHub_almostFull_ST_5i 5 + #define LSb16SemaHub_almostFull_ST_5i 5 + #define bSemaHub_almostFull_ST_5i 1 + #define MSK32SemaHub_almostFull_ST_5i 0x00000020 + + #define BA_SemaHub_almostFull_ST_6i 0x0394 + #define B16SemaHub_almostFull_ST_6i 0x0394 + #define LSb32SemaHub_almostFull_ST_6i 6 + #define LSb16SemaHub_almostFull_ST_6i 6 + #define bSemaHub_almostFull_ST_6i 1 + #define MSK32SemaHub_almostFull_ST_6i 0x00000040 + + #define BA_SemaHub_almostFull_ST_7i 0x0394 + #define B16SemaHub_almostFull_ST_7i 0x0394 + #define LSb32SemaHub_almostFull_ST_7i 7 + #define LSb16SemaHub_almostFull_ST_7i 7 + #define bSemaHub_almostFull_ST_7i 1 + #define MSK32SemaHub_almostFull_ST_7i 0x00000080 + + #define BA_SemaHub_almostFull_ST_8i 0x0395 + #define B16SemaHub_almostFull_ST_8i 0x0394 + #define LSb32SemaHub_almostFull_ST_8i 8 + #define LSb16SemaHub_almostFull_ST_8i 8 + #define bSemaHub_almostFull_ST_8i 1 + #define MSK32SemaHub_almostFull_ST_8i 0x00000100 + + #define BA_SemaHub_almostFull_ST_9i 0x0395 + #define B16SemaHub_almostFull_ST_9i 0x0394 + #define LSb32SemaHub_almostFull_ST_9i 9 + #define LSb16SemaHub_almostFull_ST_9i 9 + #define bSemaHub_almostFull_ST_9i 1 + #define MSK32SemaHub_almostFull_ST_9i 0x00000200 + + #define BA_SemaHub_almostFull_ST_10i 0x0395 + #define B16SemaHub_almostFull_ST_10i 0x0394 + #define LSb32SemaHub_almostFull_ST_10i 10 + #define LSb16SemaHub_almostFull_ST_10i 10 + #define bSemaHub_almostFull_ST_10i 1 + #define MSK32SemaHub_almostFull_ST_10i 0x00000400 + + #define BA_SemaHub_almostFull_ST_11i 0x0395 + #define B16SemaHub_almostFull_ST_11i 0x0394 + #define LSb32SemaHub_almostFull_ST_11i 11 + #define LSb16SemaHub_almostFull_ST_11i 11 + #define bSemaHub_almostFull_ST_11i 1 + #define MSK32SemaHub_almostFull_ST_11i 0x00000800 + + #define BA_SemaHub_almostFull_ST_12i 0x0395 + #define B16SemaHub_almostFull_ST_12i 0x0394 + #define LSb32SemaHub_almostFull_ST_12i 12 + #define LSb16SemaHub_almostFull_ST_12i 12 + #define bSemaHub_almostFull_ST_12i 1 + #define MSK32SemaHub_almostFull_ST_12i 0x00001000 + + #define BA_SemaHub_almostFull_ST_13i 0x0395 + #define B16SemaHub_almostFull_ST_13i 0x0394 + #define LSb32SemaHub_almostFull_ST_13i 13 + #define LSb16SemaHub_almostFull_ST_13i 13 + #define bSemaHub_almostFull_ST_13i 1 + #define MSK32SemaHub_almostFull_ST_13i 0x00002000 + + #define BA_SemaHub_almostFull_ST_14i 0x0395 + #define B16SemaHub_almostFull_ST_14i 0x0394 + #define LSb32SemaHub_almostFull_ST_14i 14 + #define LSb16SemaHub_almostFull_ST_14i 14 + #define bSemaHub_almostFull_ST_14i 1 + #define MSK32SemaHub_almostFull_ST_14i 0x00004000 + + #define BA_SemaHub_almostFull_ST_15i 0x0395 + #define B16SemaHub_almostFull_ST_15i 0x0394 + #define LSb32SemaHub_almostFull_ST_15i 15 + #define LSb16SemaHub_almostFull_ST_15i 15 + #define bSemaHub_almostFull_ST_15i 1 + #define MSK32SemaHub_almostFull_ST_15i 0x00008000 + + #define BA_SemaHub_almostFull_ST_16i 0x0396 + #define B16SemaHub_almostFull_ST_16i 0x0396 + #define LSb32SemaHub_almostFull_ST_16i 16 + #define LSb16SemaHub_almostFull_ST_16i 0 + #define bSemaHub_almostFull_ST_16i 1 + #define MSK32SemaHub_almostFull_ST_16i 0x00010000 + + #define BA_SemaHub_almostFull_ST_17i 0x0396 + #define B16SemaHub_almostFull_ST_17i 0x0396 + #define LSb32SemaHub_almostFull_ST_17i 17 + #define LSb16SemaHub_almostFull_ST_17i 1 + #define bSemaHub_almostFull_ST_17i 1 + #define MSK32SemaHub_almostFull_ST_17i 0x00020000 + + #define BA_SemaHub_almostFull_ST_18i 0x0396 + #define B16SemaHub_almostFull_ST_18i 0x0396 + #define LSb32SemaHub_almostFull_ST_18i 18 + #define LSb16SemaHub_almostFull_ST_18i 2 + #define bSemaHub_almostFull_ST_18i 1 + #define MSK32SemaHub_almostFull_ST_18i 0x00040000 + + #define BA_SemaHub_almostFull_ST_19i 0x0396 + #define B16SemaHub_almostFull_ST_19i 0x0396 + #define LSb32SemaHub_almostFull_ST_19i 19 + #define LSb16SemaHub_almostFull_ST_19i 3 + #define bSemaHub_almostFull_ST_19i 1 + #define MSK32SemaHub_almostFull_ST_19i 0x00080000 + + #define BA_SemaHub_almostFull_ST_20i 0x0396 + #define B16SemaHub_almostFull_ST_20i 0x0396 + #define LSb32SemaHub_almostFull_ST_20i 20 + #define LSb16SemaHub_almostFull_ST_20i 4 + #define bSemaHub_almostFull_ST_20i 1 + #define MSK32SemaHub_almostFull_ST_20i 0x00100000 + + #define BA_SemaHub_almostFull_ST_21i 0x0396 + #define B16SemaHub_almostFull_ST_21i 0x0396 + #define LSb32SemaHub_almostFull_ST_21i 21 + #define LSb16SemaHub_almostFull_ST_21i 5 + #define bSemaHub_almostFull_ST_21i 1 + #define MSK32SemaHub_almostFull_ST_21i 0x00200000 + + #define BA_SemaHub_almostFull_ST_22i 0x0396 + #define B16SemaHub_almostFull_ST_22i 0x0396 + #define LSb32SemaHub_almostFull_ST_22i 22 + #define LSb16SemaHub_almostFull_ST_22i 6 + #define bSemaHub_almostFull_ST_22i 1 + #define MSK32SemaHub_almostFull_ST_22i 0x00400000 + + #define BA_SemaHub_almostFull_ST_23i 0x0396 + #define B16SemaHub_almostFull_ST_23i 0x0396 + #define LSb32SemaHub_almostFull_ST_23i 23 + #define LSb16SemaHub_almostFull_ST_23i 7 + #define bSemaHub_almostFull_ST_23i 1 + #define MSK32SemaHub_almostFull_ST_23i 0x00800000 + + #define BA_SemaHub_almostFull_ST_24i 0x0397 + #define B16SemaHub_almostFull_ST_24i 0x0396 + #define LSb32SemaHub_almostFull_ST_24i 24 + #define LSb16SemaHub_almostFull_ST_24i 8 + #define bSemaHub_almostFull_ST_24i 1 + #define MSK32SemaHub_almostFull_ST_24i 0x01000000 + + #define BA_SemaHub_almostFull_ST_25i 0x0397 + #define B16SemaHub_almostFull_ST_25i 0x0396 + #define LSb32SemaHub_almostFull_ST_25i 25 + #define LSb16SemaHub_almostFull_ST_25i 9 + #define bSemaHub_almostFull_ST_25i 1 + #define MSK32SemaHub_almostFull_ST_25i 0x02000000 + + #define BA_SemaHub_almostFull_ST_26i 0x0397 + #define B16SemaHub_almostFull_ST_26i 0x0396 + #define LSb32SemaHub_almostFull_ST_26i 26 + #define LSb16SemaHub_almostFull_ST_26i 10 + #define bSemaHub_almostFull_ST_26i 1 + #define MSK32SemaHub_almostFull_ST_26i 0x04000000 + + #define BA_SemaHub_almostFull_ST_27i 0x0397 + #define B16SemaHub_almostFull_ST_27i 0x0396 + #define LSb32SemaHub_almostFull_ST_27i 27 + #define LSb16SemaHub_almostFull_ST_27i 11 + #define bSemaHub_almostFull_ST_27i 1 + #define MSK32SemaHub_almostFull_ST_27i 0x08000000 + + #define BA_SemaHub_almostFull_ST_28i 0x0397 + #define B16SemaHub_almostFull_ST_28i 0x0396 + #define LSb32SemaHub_almostFull_ST_28i 28 + #define LSb16SemaHub_almostFull_ST_28i 12 + #define bSemaHub_almostFull_ST_28i 1 + #define MSK32SemaHub_almostFull_ST_28i 0x10000000 + + #define BA_SemaHub_almostFull_ST_29i 0x0397 + #define B16SemaHub_almostFull_ST_29i 0x0396 + #define LSb32SemaHub_almostFull_ST_29i 29 + #define LSb16SemaHub_almostFull_ST_29i 13 + #define bSemaHub_almostFull_ST_29i 1 + #define MSK32SemaHub_almostFull_ST_29i 0x20000000 + + #define BA_SemaHub_almostFull_ST_30i 0x0397 + #define B16SemaHub_almostFull_ST_30i 0x0396 + #define LSb32SemaHub_almostFull_ST_30i 30 + #define LSb16SemaHub_almostFull_ST_30i 14 + #define bSemaHub_almostFull_ST_30i 1 + #define MSK32SemaHub_almostFull_ST_30i 0x40000000 + + #define BA_SemaHub_almostFull_ST_31i 0x0397 + #define B16SemaHub_almostFull_ST_31i 0x0396 + #define LSb32SemaHub_almostFull_ST_31i 31 + #define LSb16SemaHub_almostFull_ST_31i 15 + #define bSemaHub_almostFull_ST_31i 1 + #define MSK32SemaHub_almostFull_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaHub { + /////////////////////////////////////////////////////////// + SIE_SemaQuery ie_counter[64]; + /////////////////////////////////////////////////////////// + SIE_Semaphore ie_cell[32]; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_PUSH_ID(r32) _BFGET_(r32, 7, 0) + #define SET32SemaHub_PUSH_ID(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16SemaHub_PUSH_ID(r16) _BFGET_(r16, 7, 0) + #define SET16SemaHub_PUSH_ID(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32SemaHub_PUSH_delta(r32) _BFGET_(r32,15, 8) + #define SET32SemaHub_PUSH_delta(r32,v) _BFSET_(r32,15, 8,v) + #define GET16SemaHub_PUSH_delta(r16) _BFGET_(r16,15, 8) + #define SET16SemaHub_PUSH_delta(r16,v) _BFSET_(r16,15, 8,v) + + #define w32SemaHub_PUSH {\ + UNSG32 uPUSH_ID : 8;\ + UNSG32 uPUSH_delta : 8;\ + UNSG32 RSVDx380_b16 : 16;\ + } + union { UNSG32 u32SemaHub_PUSH; + struct w32SemaHub_PUSH; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_POP_ID(r32) _BFGET_(r32, 7, 0) + #define SET32SemaHub_POP_ID(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16SemaHub_POP_ID(r16) _BFGET_(r16, 7, 0) + #define SET16SemaHub_POP_ID(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32SemaHub_POP_delta(r32) _BFGET_(r32,15, 8) + #define SET32SemaHub_POP_delta(r32,v) _BFSET_(r32,15, 8,v) + #define GET16SemaHub_POP_delta(r16) _BFGET_(r16,15, 8) + #define SET16SemaHub_POP_delta(r16,v) _BFSET_(r16,15, 8,v) + + #define w32SemaHub_POP {\ + UNSG32 uPOP_ID : 8;\ + UNSG32 uPOP_delta : 8;\ + UNSG32 RSVDx384_b16 : 16;\ + } + union { UNSG32 u32SemaHub_POP; + struct w32SemaHub_POP; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_empty_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_empty_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_empty_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_empty_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_empty_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_empty_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_empty_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_empty_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_empty_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_empty_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_empty_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_empty_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_empty_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_empty_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_empty_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_empty_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_empty_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_empty_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_empty_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_empty_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_empty_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_empty_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_empty_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_empty_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_empty_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_empty_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_empty_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_empty_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_empty_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_empty_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_empty_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_empty_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_empty_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_empty_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_empty_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_empty_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_empty_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_empty_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_empty_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_empty_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_empty_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_empty_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_empty_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_empty_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_empty_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_empty_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_empty_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_empty_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_empty_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_empty_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_empty_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_empty_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_empty_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_empty_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_empty_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_empty_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_empty_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_empty_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_empty_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_empty_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_empty_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_empty_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_empty_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_empty_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_empty_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_empty_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_empty_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_empty_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_empty_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_empty_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_empty_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_empty_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_empty_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_empty_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_empty_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_empty_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_empty_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_empty_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_empty_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_empty_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_empty_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_empty_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_empty_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_empty_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_empty_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_empty_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_empty_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_empty_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_empty_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_empty_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_empty_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_empty_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_empty_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_empty_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_empty_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_empty_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_empty_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_empty_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_empty_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_empty_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_empty_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_empty_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_empty_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_empty_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_empty_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_empty_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_empty_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_empty_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_empty_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_empty_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_empty_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_empty_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_empty_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_empty_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_empty_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_empty_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_empty_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_empty_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_empty_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_empty_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_empty_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_empty_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_empty_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_empty_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_empty_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_empty_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_empty_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_empty_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_empty {\ + UNSG32 uempty_ST_0i : 1;\ + UNSG32 uempty_ST_1i : 1;\ + UNSG32 uempty_ST_2i : 1;\ + UNSG32 uempty_ST_3i : 1;\ + UNSG32 uempty_ST_4i : 1;\ + UNSG32 uempty_ST_5i : 1;\ + UNSG32 uempty_ST_6i : 1;\ + UNSG32 uempty_ST_7i : 1;\ + UNSG32 uempty_ST_8i : 1;\ + UNSG32 uempty_ST_9i : 1;\ + UNSG32 uempty_ST_10i : 1;\ + UNSG32 uempty_ST_11i : 1;\ + UNSG32 uempty_ST_12i : 1;\ + UNSG32 uempty_ST_13i : 1;\ + UNSG32 uempty_ST_14i : 1;\ + UNSG32 uempty_ST_15i : 1;\ + UNSG32 uempty_ST_16i : 1;\ + UNSG32 uempty_ST_17i : 1;\ + UNSG32 uempty_ST_18i : 1;\ + UNSG32 uempty_ST_19i : 1;\ + UNSG32 uempty_ST_20i : 1;\ + UNSG32 uempty_ST_21i : 1;\ + UNSG32 uempty_ST_22i : 1;\ + UNSG32 uempty_ST_23i : 1;\ + UNSG32 uempty_ST_24i : 1;\ + UNSG32 uempty_ST_25i : 1;\ + UNSG32 uempty_ST_26i : 1;\ + UNSG32 uempty_ST_27i : 1;\ + UNSG32 uempty_ST_28i : 1;\ + UNSG32 uempty_ST_29i : 1;\ + UNSG32 uempty_ST_30i : 1;\ + UNSG32 uempty_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_empty; + struct w32SemaHub_empty; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_full_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_full_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_full_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_full_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_full_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_full_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_full_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_full_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_full_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_full_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_full_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_full_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_full_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_full_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_full_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_full_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_full_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_full_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_full_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_full_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_full_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_full_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_full_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_full_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_full_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_full_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_full_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_full_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_full_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_full_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_full_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_full_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_full_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_full_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_full_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_full_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_full_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_full_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_full_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_full_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_full_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_full_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_full_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_full_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_full_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_full_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_full_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_full_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_full_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_full_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_full_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_full_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_full_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_full_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_full_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_full_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_full_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_full_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_full_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_full_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_full_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_full_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_full_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_full_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_full_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_full_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_full_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_full_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_full_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_full_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_full_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_full_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_full_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_full_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_full_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_full_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_full_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_full_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_full_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_full_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_full_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_full_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_full_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_full_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_full_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_full_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_full_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_full_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_full_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_full_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_full_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_full_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_full_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_full_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_full_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_full_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_full_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_full_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_full_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_full_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_full_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_full_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_full_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_full_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_full_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_full_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_full_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_full_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_full_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_full_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_full_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_full_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_full_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_full_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_full_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_full_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_full_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_full_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_full_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_full_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_full_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_full_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_full_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_full_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_full_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_full_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_full_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_full_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_full {\ + UNSG32 ufull_ST_0i : 1;\ + UNSG32 ufull_ST_1i : 1;\ + UNSG32 ufull_ST_2i : 1;\ + UNSG32 ufull_ST_3i : 1;\ + UNSG32 ufull_ST_4i : 1;\ + UNSG32 ufull_ST_5i : 1;\ + UNSG32 ufull_ST_6i : 1;\ + UNSG32 ufull_ST_7i : 1;\ + UNSG32 ufull_ST_8i : 1;\ + UNSG32 ufull_ST_9i : 1;\ + UNSG32 ufull_ST_10i : 1;\ + UNSG32 ufull_ST_11i : 1;\ + UNSG32 ufull_ST_12i : 1;\ + UNSG32 ufull_ST_13i : 1;\ + UNSG32 ufull_ST_14i : 1;\ + UNSG32 ufull_ST_15i : 1;\ + UNSG32 ufull_ST_16i : 1;\ + UNSG32 ufull_ST_17i : 1;\ + UNSG32 ufull_ST_18i : 1;\ + UNSG32 ufull_ST_19i : 1;\ + UNSG32 ufull_ST_20i : 1;\ + UNSG32 ufull_ST_21i : 1;\ + UNSG32 ufull_ST_22i : 1;\ + UNSG32 ufull_ST_23i : 1;\ + UNSG32 ufull_ST_24i : 1;\ + UNSG32 ufull_ST_25i : 1;\ + UNSG32 ufull_ST_26i : 1;\ + UNSG32 ufull_ST_27i : 1;\ + UNSG32 ufull_ST_28i : 1;\ + UNSG32 ufull_ST_29i : 1;\ + UNSG32 ufull_ST_30i : 1;\ + UNSG32 ufull_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_full; + struct w32SemaHub_full; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_almostEmpty_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_almostEmpty_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_almostEmpty_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostEmpty_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostEmpty_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_almostEmpty_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_almostEmpty_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostEmpty_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostEmpty_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_almostEmpty_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_almostEmpty_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostEmpty_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostEmpty_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_almostEmpty_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_almostEmpty_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostEmpty_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostEmpty_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_almostEmpty_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_almostEmpty_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostEmpty_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostEmpty_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_almostEmpty_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_almostEmpty_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostEmpty_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostEmpty_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_almostEmpty_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_almostEmpty_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostEmpty_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostEmpty_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_almostEmpty_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_almostEmpty_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostEmpty_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostEmpty_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_almostEmpty_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_almostEmpty_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostEmpty_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostEmpty_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_almostEmpty_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_almostEmpty_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostEmpty_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostEmpty_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_almostEmpty_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_almostEmpty_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostEmpty_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostEmpty_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_almostEmpty_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_almostEmpty_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostEmpty_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostEmpty_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_almostEmpty_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_almostEmpty_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostEmpty_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostEmpty_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_almostEmpty_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_almostEmpty_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostEmpty_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostEmpty_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_almostEmpty_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_almostEmpty_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostEmpty_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostEmpty_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_almostEmpty_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_almostEmpty_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostEmpty_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_almostEmpty_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_almostEmpty_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_almostEmpty_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostEmpty_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostEmpty_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_almostEmpty_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_almostEmpty_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostEmpty_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostEmpty_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_almostEmpty_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_almostEmpty_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostEmpty_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostEmpty_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_almostEmpty_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_almostEmpty_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostEmpty_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostEmpty_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_almostEmpty_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_almostEmpty_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostEmpty_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostEmpty_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_almostEmpty_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_almostEmpty_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostEmpty_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostEmpty_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_almostEmpty_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_almostEmpty_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostEmpty_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostEmpty_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_almostEmpty_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_almostEmpty_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostEmpty_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostEmpty_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_almostEmpty_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_almostEmpty_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostEmpty_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostEmpty_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_almostEmpty_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_almostEmpty_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostEmpty_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostEmpty_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_almostEmpty_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_almostEmpty_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostEmpty_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostEmpty_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_almostEmpty_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_almostEmpty_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostEmpty_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostEmpty_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_almostEmpty_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_almostEmpty_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostEmpty_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostEmpty_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_almostEmpty_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_almostEmpty_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostEmpty_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostEmpty_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_almostEmpty_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_almostEmpty_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostEmpty_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostEmpty_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_almostEmpty_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_almostEmpty_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostEmpty_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_almostEmpty {\ + UNSG32 ualmostEmpty_ST_0i : 1;\ + UNSG32 ualmostEmpty_ST_1i : 1;\ + UNSG32 ualmostEmpty_ST_2i : 1;\ + UNSG32 ualmostEmpty_ST_3i : 1;\ + UNSG32 ualmostEmpty_ST_4i : 1;\ + UNSG32 ualmostEmpty_ST_5i : 1;\ + UNSG32 ualmostEmpty_ST_6i : 1;\ + UNSG32 ualmostEmpty_ST_7i : 1;\ + UNSG32 ualmostEmpty_ST_8i : 1;\ + UNSG32 ualmostEmpty_ST_9i : 1;\ + UNSG32 ualmostEmpty_ST_10i : 1;\ + UNSG32 ualmostEmpty_ST_11i : 1;\ + UNSG32 ualmostEmpty_ST_12i : 1;\ + UNSG32 ualmostEmpty_ST_13i : 1;\ + UNSG32 ualmostEmpty_ST_14i : 1;\ + UNSG32 ualmostEmpty_ST_15i : 1;\ + UNSG32 ualmostEmpty_ST_16i : 1;\ + UNSG32 ualmostEmpty_ST_17i : 1;\ + UNSG32 ualmostEmpty_ST_18i : 1;\ + UNSG32 ualmostEmpty_ST_19i : 1;\ + UNSG32 ualmostEmpty_ST_20i : 1;\ + UNSG32 ualmostEmpty_ST_21i : 1;\ + UNSG32 ualmostEmpty_ST_22i : 1;\ + UNSG32 ualmostEmpty_ST_23i : 1;\ + UNSG32 ualmostEmpty_ST_24i : 1;\ + UNSG32 ualmostEmpty_ST_25i : 1;\ + UNSG32 ualmostEmpty_ST_26i : 1;\ + UNSG32 ualmostEmpty_ST_27i : 1;\ + UNSG32 ualmostEmpty_ST_28i : 1;\ + UNSG32 ualmostEmpty_ST_29i : 1;\ + UNSG32 ualmostEmpty_ST_30i : 1;\ + UNSG32 ualmostEmpty_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_almostEmpty; + struct w32SemaHub_almostEmpty; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_almostFull_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_almostFull_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_almostFull_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostFull_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostFull_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_almostFull_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_almostFull_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostFull_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostFull_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_almostFull_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_almostFull_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostFull_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostFull_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_almostFull_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_almostFull_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostFull_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostFull_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_almostFull_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_almostFull_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostFull_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostFull_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_almostFull_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_almostFull_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostFull_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostFull_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_almostFull_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_almostFull_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostFull_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostFull_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_almostFull_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_almostFull_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostFull_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostFull_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_almostFull_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_almostFull_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostFull_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostFull_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_almostFull_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_almostFull_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostFull_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostFull_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_almostFull_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_almostFull_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostFull_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostFull_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_almostFull_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_almostFull_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostFull_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostFull_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_almostFull_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_almostFull_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostFull_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostFull_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_almostFull_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_almostFull_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostFull_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostFull_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_almostFull_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_almostFull_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostFull_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostFull_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_almostFull_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_almostFull_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostFull_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_almostFull_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_almostFull_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_almostFull_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostFull_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostFull_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_almostFull_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_almostFull_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostFull_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostFull_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_almostFull_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_almostFull_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostFull_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostFull_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_almostFull_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_almostFull_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostFull_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostFull_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_almostFull_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_almostFull_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostFull_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostFull_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_almostFull_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_almostFull_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostFull_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostFull_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_almostFull_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_almostFull_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostFull_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostFull_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_almostFull_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_almostFull_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostFull_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostFull_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_almostFull_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_almostFull_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostFull_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostFull_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_almostFull_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_almostFull_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostFull_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostFull_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_almostFull_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_almostFull_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostFull_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostFull_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_almostFull_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_almostFull_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostFull_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostFull_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_almostFull_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_almostFull_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostFull_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostFull_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_almostFull_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_almostFull_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostFull_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostFull_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_almostFull_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_almostFull_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostFull_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostFull_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_almostFull_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_almostFull_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostFull_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_almostFull {\ + UNSG32 ualmostFull_ST_0i : 1;\ + UNSG32 ualmostFull_ST_1i : 1;\ + UNSG32 ualmostFull_ST_2i : 1;\ + UNSG32 ualmostFull_ST_3i : 1;\ + UNSG32 ualmostFull_ST_4i : 1;\ + UNSG32 ualmostFull_ST_5i : 1;\ + UNSG32 ualmostFull_ST_6i : 1;\ + UNSG32 ualmostFull_ST_7i : 1;\ + UNSG32 ualmostFull_ST_8i : 1;\ + UNSG32 ualmostFull_ST_9i : 1;\ + UNSG32 ualmostFull_ST_10i : 1;\ + UNSG32 ualmostFull_ST_11i : 1;\ + UNSG32 ualmostFull_ST_12i : 1;\ + UNSG32 ualmostFull_ST_13i : 1;\ + UNSG32 ualmostFull_ST_14i : 1;\ + UNSG32 ualmostFull_ST_15i : 1;\ + UNSG32 ualmostFull_ST_16i : 1;\ + UNSG32 ualmostFull_ST_17i : 1;\ + UNSG32 ualmostFull_ST_18i : 1;\ + UNSG32 ualmostFull_ST_19i : 1;\ + UNSG32 ualmostFull_ST_20i : 1;\ + UNSG32 ualmostFull_ST_21i : 1;\ + UNSG32 ualmostFull_ST_22i : 1;\ + UNSG32 ualmostFull_ST_23i : 1;\ + UNSG32 ualmostFull_ST_24i : 1;\ + UNSG32 ualmostFull_ST_25i : 1;\ + UNSG32 ualmostFull_ST_26i : 1;\ + UNSG32 ualmostFull_ST_27i : 1;\ + UNSG32 ualmostFull_ST_28i : 1;\ + UNSG32 ualmostFull_ST_29i : 1;\ + UNSG32 ualmostFull_ST_30i : 1;\ + UNSG32 ualmostFull_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_almostFull; + struct w32SemaHub_almostFull; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx398 [104]; + /////////////////////////////////////////////////////////// + } SIE_SemaHub; + + typedef union T32SemaHub_PUSH + { UNSG32 u32; + struct w32SemaHub_PUSH; + } T32SemaHub_PUSH; + typedef union T32SemaHub_POP + { UNSG32 u32; + struct w32SemaHub_POP; + } T32SemaHub_POP; + typedef union T32SemaHub_empty + { UNSG32 u32; + struct w32SemaHub_empty; + } T32SemaHub_empty; + typedef union T32SemaHub_full + { UNSG32 u32; + struct w32SemaHub_full; + } T32SemaHub_full; + typedef union T32SemaHub_almostEmpty + { UNSG32 u32; + struct w32SemaHub_almostEmpty; + } T32SemaHub_almostEmpty; + typedef union T32SemaHub_almostFull + { UNSG32 u32; + struct w32SemaHub_almostFull; + } T32SemaHub_almostFull; + /////////////////////////////////////////////////////////// + + typedef union TSemaHub_PUSH + { UNSG32 u32[1]; + struct { + struct w32SemaHub_PUSH; + }; + } TSemaHub_PUSH; + typedef union TSemaHub_POP + { UNSG32 u32[1]; + struct { + struct w32SemaHub_POP; + }; + } TSemaHub_POP; + typedef union TSemaHub_empty + { UNSG32 u32[1]; + struct { + struct w32SemaHub_empty; + }; + } TSemaHub_empty; + typedef union TSemaHub_full + { UNSG32 u32[1]; + struct { + struct w32SemaHub_full; + }; + } TSemaHub_full; + typedef union TSemaHub_almostEmpty + { UNSG32 u32[1]; + struct { + struct w32SemaHub_almostEmpty; + }; + } TSemaHub_almostEmpty; + typedef union TSemaHub_almostFull + { UNSG32 u32[1]; + struct { + struct w32SemaHub_almostFull; + }; + } TSemaHub_almostFull; + + /////////////////////////////////////////////////////////// + SIGN32 SemaHub_drvrd(SIE_SemaHub *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaHub_drvwr(SIE_SemaHub *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaHub_reset(SIE_SemaHub *p); + SIGN32 SemaHub_cmp (SIE_SemaHub *p, SIE_SemaHub *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaHub_check(p,pie,pfx,hLOG) SemaHub_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaHub_print(p, pfx,hLOG) SemaHub_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaHub +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE FiFo biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 20 BASE +/// ### +/// * Base address (byte-address) of a FIFO in the shared SRAM. A channel's read/write pointers will be added to this “BASE†to get exact location of shared SRAM. +/// * Note: aligned with base SRAM data bus. +/// * For example, if SRAM data is 64-bit, then base[2:0] should be 3'b0; +/// ### +/// %% 12 # Stuffing bits... +/// @ 0x00004 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to this register will enable this channel, or 0 to this register will disable this channel. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to clear FIFO pointers to 0. +/// * Note : +/// * CPU should make sure to disabled the channel (write 0 to START_EN register) before issue clear command, otherwise the clear request will be ignored. +/// * Do not restart the channel when clear operation is in process. +/// * HW will make sure there is no pending transactions before execute the clear operation. +/// * Associated semaphore cell needs reset separately by re-write “CFG_DEPTH†+/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C FLUSH (W-) +/// %unsigned 1 EN +/// ### +/// * No support for now +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 23b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_FiFo +#define h_FiFo (){} + + #define RA_FiFo_CFG 0x0000 + + #define BA_FiFo_CFG_BASE 0x0000 + #define B16FiFo_CFG_BASE 0x0000 + #define LSb32FiFo_CFG_BASE 0 + #define LSb16FiFo_CFG_BASE 0 + #define bFiFo_CFG_BASE 20 + #define MSK32FiFo_CFG_BASE 0x000FFFFF + /////////////////////////////////////////////////////////// + #define RA_FiFo_START 0x0004 + + #define BA_FiFo_START_EN 0x0004 + #define B16FiFo_START_EN 0x0004 + #define LSb32FiFo_START_EN 0 + #define LSb16FiFo_START_EN 0 + #define bFiFo_START_EN 1 + #define MSK32FiFo_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_FiFo_CLEAR 0x0008 + + #define BA_FiFo_CLEAR_EN 0x0008 + #define B16FiFo_CLEAR_EN 0x0008 + #define LSb32FiFo_CLEAR_EN 0 + #define LSb16FiFo_CLEAR_EN 0 + #define bFiFo_CLEAR_EN 1 + #define MSK32FiFo_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_FiFo_FLUSH 0x000C + + #define BA_FiFo_FLUSH_EN 0x000C + #define B16FiFo_FLUSH_EN 0x000C + #define LSb32FiFo_FLUSH_EN 0 + #define LSb16FiFo_FLUSH_EN 0 + #define bFiFo_FLUSH_EN 1 + #define MSK32FiFo_FLUSH_EN 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_FiFo { + /////////////////////////////////////////////////////////// + #define GET32FiFo_CFG_BASE(r32) _BFGET_(r32,19, 0) + #define SET32FiFo_CFG_BASE(r32,v) _BFSET_(r32,19, 0,v) + + #define w32FiFo_CFG {\ + UNSG32 uCFG_BASE : 20;\ + UNSG32 RSVDx0_b20 : 12;\ + } + union { UNSG32 u32FiFo_CFG; + struct w32FiFo_CFG; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } + union { UNSG32 u32FiFo_START; + struct w32FiFo_START; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32FiFo_CLEAR; + struct w32FiFo_CLEAR; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_FLUSH_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_FLUSH_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_FLUSH_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_FLUSH_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_FLUSH {\ + UNSG32 uFLUSH_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32FiFo_FLUSH; + struct w32FiFo_FLUSH; + }; + /////////////////////////////////////////////////////////// + } SIE_FiFo; + + typedef union T32FiFo_CFG + { UNSG32 u32; + struct w32FiFo_CFG; + } T32FiFo_CFG; + typedef union T32FiFo_START + { UNSG32 u32; + struct w32FiFo_START; + } T32FiFo_START; + typedef union T32FiFo_CLEAR + { UNSG32 u32; + struct w32FiFo_CLEAR; + } T32FiFo_CLEAR; + typedef union T32FiFo_FLUSH + { UNSG32 u32; + struct w32FiFo_FLUSH; + } T32FiFo_FLUSH; + /////////////////////////////////////////////////////////// + + typedef union TFiFo_CFG + { UNSG32 u32[1]; + struct { + struct w32FiFo_CFG; + }; + } TFiFo_CFG; + typedef union TFiFo_START + { UNSG32 u32[1]; + struct { + struct w32FiFo_START; + }; + } TFiFo_START; + typedef union TFiFo_CLEAR + { UNSG32 u32[1]; + struct { + struct w32FiFo_CLEAR; + }; + } TFiFo_CLEAR; + typedef union TFiFo_FLUSH + { UNSG32 u32[1]; + struct { + struct w32FiFo_FLUSH; + }; + } TFiFo_FLUSH; + + /////////////////////////////////////////////////////////// + SIGN32 FiFo_drvrd(SIE_FiFo *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 FiFo_drvwr(SIE_FiFo *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void FiFo_reset(SIE_FiFo *p); + SIGN32 FiFo_cmp (SIE_FiFo *p, SIE_FiFo *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define FiFo_check(p,pie,pfx,hLOG) FiFo_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define FiFo_print(p, pfx,hLOG) FiFo_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: FiFo +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE HBO biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 FiFoCtl +/// $SemaHub FiFoCtl REG +/// @ 0x00400 ARR (P) +/// # 0x00400 FiFo +/// $FiFo FiFo REG [32] +/// ### +/// * Up-to 32 FIFO channels +/// * FiFo[N] is controlled by HBO.FiFoCtl.Channel[N] +/// ### +/// @ 0x00600 BUSY (R-) +/// %unsigned 32 ST +/// ### +/// * Per channel status +/// * Indicate the clear operation status. +/// * 1: clear is in process. +/// * 0 : clear is done. +/// ### +/// @ 0x00604 (W-) +/// # # Stuffing bytes... +/// %% 2016 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 1792B, bits: 1920b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_HBO +#define h_HBO (){} + + #define RA_HBO_FiFoCtl 0x0000 + /////////////////////////////////////////////////////////// + #define RA_HBO_ARR 0x0400 + #define RA_HBO_FiFo 0x0400 + /////////////////////////////////////////////////////////// + #define RA_HBO_BUSY 0x0600 + + #define BA_HBO_BUSY_ST 0x0600 + #define B16HBO_BUSY_ST 0x0600 + #define LSb32HBO_BUSY_ST 0 + #define LSb16HBO_BUSY_ST 0 + #define bHBO_BUSY_ST 32 + #define MSK32HBO_BUSY_ST 0xFFFFFFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_HBO { + /////////////////////////////////////////////////////////// + SIE_SemaHub ie_FiFoCtl; + /////////////////////////////////////////////////////////// + SIE_FiFo ie_FiFo[32]; + /////////////////////////////////////////////////////////// + #define GET32HBO_BUSY_ST(r32) _BFGET_(r32,31, 0) + #define SET32HBO_BUSY_ST(r32,v) _BFSET_(r32,31, 0,v) + + #define w32HBO_BUSY {\ + UNSG32 uBUSY_ST : 32;\ + } + union { UNSG32 u32HBO_BUSY; + struct w32HBO_BUSY; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx604 [252]; + /////////////////////////////////////////////////////////// + } SIE_HBO; + + typedef union T32HBO_BUSY + { UNSG32 u32; + struct w32HBO_BUSY; + } T32HBO_BUSY; + /////////////////////////////////////////////////////////// + + typedef union THBO_BUSY + { UNSG32 u32[1]; + struct { + struct w32HBO_BUSY; + }; + } THBO_BUSY; + + /////////////////////////////////////////////////////////// + SIGN32 HBO_drvrd(SIE_HBO *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 HBO_drvwr(SIE_HBO *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void HBO_reset(SIE_HBO *p); + SIGN32 HBO_cmp (SIE_HBO *p, SIE_HBO *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define HBO_check(p,pie,pfx,hLOG) HBO_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define HBO_print(p, pfx,hLOG) HBO_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: HBO +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE LLDesFmt biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 mem (P) +/// %unsigned 16 size +/// ### +/// * The size of one piece of scattered memory. +/// ### +/// %% 16 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 16b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_LLDesFmt +#define h_LLDesFmt (){} + + #define RA_LLDesFmt_mem 0x0000 + + #define BA_LLDesFmt_mem_size 0x0000 + #define B16LLDesFmt_mem_size 0x0000 + #define LSb32LLDesFmt_mem_size 0 + #define LSb16LLDesFmt_mem_size 0 + #define bLLDesFmt_mem_size 16 + #define MSK32LLDesFmt_mem_size 0x0000FFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_LLDesFmt { + /////////////////////////////////////////////////////////// + #define GET32LLDesFmt_mem_size(r32) _BFGET_(r32,15, 0) + #define SET32LLDesFmt_mem_size(r32,v) _BFSET_(r32,15, 0,v) + #define GET16LLDesFmt_mem_size(r16) _BFGET_(r16,15, 0) + #define SET16LLDesFmt_mem_size(r16,v) _BFSET_(r16,15, 0,v) + + #define w32LLDesFmt_mem {\ + UNSG32 umem_size : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32LLDesFmt_mem; + struct w32LLDesFmt_mem; + }; + /////////////////////////////////////////////////////////// + } SIE_LLDesFmt; + + typedef union T32LLDesFmt_mem + { UNSG32 u32; + struct w32LLDesFmt_mem; + } T32LLDesFmt_mem; + /////////////////////////////////////////////////////////// + + typedef union TLLDesFmt_mem + { UNSG32 u32[1]; + struct { + struct w32LLDesFmt_mem; + }; + } TLLDesFmt_mem; + + /////////////////////////////////////////////////////////// + SIGN32 LLDesFmt_drvrd(SIE_LLDesFmt *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 LLDesFmt_drvwr(SIE_LLDesFmt *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void LLDesFmt_reset(SIE_LLDesFmt *p); + SIGN32 LLDesFmt_cmp (SIE_LLDesFmt *p, SIE_LLDesFmt *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define LLDesFmt_check(p,pie,pfx,hLOG) LLDesFmt_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define LLDesFmt_print(p, pfx,hLOG) LLDesFmt_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: LLDesFmt +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmdHDR (4,4) +/// ### +/// * 32-bit dHub command header +/// * [0:31] +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 DESC (W-) +/// %unsigned 16 size +/// ### +/// * amount of data to be transferred, in bytes or MTU. +/// * Size of 0 is forbidden. +/// ### +/// %unsigned 1 sizeMTU +/// ### +/// * 0: size given in bytes; +/// * 1: size given in MTU (see dHubChCtl.CFG.MTU for MTU size definition) +/// ### +/// %unsigned 1 semOpMTU +/// ### +/// * 0: semaphore operations applied on dHubCmd level +/// * 1: semaphore operations applied on MTU level +/// ### +/// %unsigned 5 chkSemId +/// ### +/// * ID of semaphore to check before cmd / MTU; +/// * 0 indicates semaphore check is disabled +/// ### +/// %unsigned 5 updSemId +/// ### +/// * ID of semaphore to update after cmd / MTU; +/// * 0 indicates semaphore update is disabled +/// ### +/// %unsigned 1 interrupt +/// ### +/// * 1: raise interrupt upon command finish +/// * end dHubCmdHDR +/// ### +/// %% 3 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 29b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmdHDR +#define h_dHubCmdHDR (){} + + #define RA_dHubCmdHDR_DESC 0x0000 + + #define BA_dHubCmdHDR_DESC_size 0x0000 + #define B16dHubCmdHDR_DESC_size 0x0000 + #define LSb32dHubCmdHDR_DESC_size 0 + #define LSb16dHubCmdHDR_DESC_size 0 + #define bdHubCmdHDR_DESC_size 16 + #define MSK32dHubCmdHDR_DESC_size 0x0000FFFF + + #define BA_dHubCmdHDR_DESC_sizeMTU 0x0002 + #define B16dHubCmdHDR_DESC_sizeMTU 0x0002 + #define LSb32dHubCmdHDR_DESC_sizeMTU 16 + #define LSb16dHubCmdHDR_DESC_sizeMTU 0 + #define bdHubCmdHDR_DESC_sizeMTU 1 + #define MSK32dHubCmdHDR_DESC_sizeMTU 0x00010000 + + #define BA_dHubCmdHDR_DESC_semOpMTU 0x0002 + #define B16dHubCmdHDR_DESC_semOpMTU 0x0002 + #define LSb32dHubCmdHDR_DESC_semOpMTU 17 + #define LSb16dHubCmdHDR_DESC_semOpMTU 1 + #define bdHubCmdHDR_DESC_semOpMTU 1 + #define MSK32dHubCmdHDR_DESC_semOpMTU 0x00020000 + + #define BA_dHubCmdHDR_DESC_chkSemId 0x0002 + #define B16dHubCmdHDR_DESC_chkSemId 0x0002 + #define LSb32dHubCmdHDR_DESC_chkSemId 18 + #define LSb16dHubCmdHDR_DESC_chkSemId 2 + #define bdHubCmdHDR_DESC_chkSemId 5 + #define MSK32dHubCmdHDR_DESC_chkSemId 0x007C0000 + + #define BA_dHubCmdHDR_DESC_updSemId 0x0002 + #define B16dHubCmdHDR_DESC_updSemId 0x0002 + #define LSb32dHubCmdHDR_DESC_updSemId 23 + #define LSb16dHubCmdHDR_DESC_updSemId 7 + #define bdHubCmdHDR_DESC_updSemId 5 + #define MSK32dHubCmdHDR_DESC_updSemId 0x0F800000 + + #define BA_dHubCmdHDR_DESC_interrupt 0x0003 + #define B16dHubCmdHDR_DESC_interrupt 0x0002 + #define LSb32dHubCmdHDR_DESC_interrupt 28 + #define LSb16dHubCmdHDR_DESC_interrupt 12 + #define bdHubCmdHDR_DESC_interrupt 1 + #define MSK32dHubCmdHDR_DESC_interrupt 0x10000000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmdHDR { + /////////////////////////////////////////////////////////// + #define GET32dHubCmdHDR_DESC_size(r32) _BFGET_(r32,15, 0) + #define SET32dHubCmdHDR_DESC_size(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubCmdHDR_DESC_size(r16) _BFGET_(r16,15, 0) + #define SET16dHubCmdHDR_DESC_size(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubCmdHDR_DESC_sizeMTU(r32) _BFGET_(r32,16,16) + #define SET32dHubCmdHDR_DESC_sizeMTU(r32,v) _BFSET_(r32,16,16,v) + #define GET16dHubCmdHDR_DESC_sizeMTU(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmdHDR_DESC_sizeMTU(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32dHubCmdHDR_DESC_semOpMTU(r32) _BFGET_(r32,17,17) + #define SET32dHubCmdHDR_DESC_semOpMTU(r32,v) _BFSET_(r32,17,17,v) + #define GET16dHubCmdHDR_DESC_semOpMTU(r16) _BFGET_(r16, 1, 1) + #define SET16dHubCmdHDR_DESC_semOpMTU(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32dHubCmdHDR_DESC_chkSemId(r32) _BFGET_(r32,22,18) + #define SET32dHubCmdHDR_DESC_chkSemId(r32,v) _BFSET_(r32,22,18,v) + #define GET16dHubCmdHDR_DESC_chkSemId(r16) _BFGET_(r16, 6, 2) + #define SET16dHubCmdHDR_DESC_chkSemId(r16,v) _BFSET_(r16, 6, 2,v) + + #define GET32dHubCmdHDR_DESC_updSemId(r32) _BFGET_(r32,27,23) + #define SET32dHubCmdHDR_DESC_updSemId(r32,v) _BFSET_(r32,27,23,v) + #define GET16dHubCmdHDR_DESC_updSemId(r16) _BFGET_(r16,11, 7) + #define SET16dHubCmdHDR_DESC_updSemId(r16,v) _BFSET_(r16,11, 7,v) + + #define GET32dHubCmdHDR_DESC_interrupt(r32) _BFGET_(r32,28,28) + #define SET32dHubCmdHDR_DESC_interrupt(r32,v) _BFSET_(r32,28,28,v) + #define GET16dHubCmdHDR_DESC_interrupt(r16) _BFGET_(r16,12,12) + #define SET16dHubCmdHDR_DESC_interrupt(r16,v) _BFSET_(r16,12,12,v) + + #define w32dHubCmdHDR_DESC {\ + UNSG32 uDESC_size : 16;\ + UNSG32 uDESC_sizeMTU : 1;\ + UNSG32 uDESC_semOpMTU : 1;\ + UNSG32 uDESC_chkSemId : 5;\ + UNSG32 uDESC_updSemId : 5;\ + UNSG32 uDESC_interrupt : 1;\ + UNSG32 RSVDx0_b29 : 3;\ + } + union { UNSG32 u32dHubCmdHDR_DESC; + struct w32dHubCmdHDR_DESC; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubCmdHDR; + + typedef union T32dHubCmdHDR_DESC + { UNSG32 u32; + struct w32dHubCmdHDR_DESC; + } T32dHubCmdHDR_DESC; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmdHDR_DESC + { UNSG32 u32[1]; + struct { + struct w32dHubCmdHDR_DESC; + }; + } TdHubCmdHDR_DESC; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmdHDR_drvrd(SIE_dHubCmdHDR *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmdHDR_drvwr(SIE_dHubCmdHDR *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmdHDR_reset(SIE_dHubCmdHDR *p); + SIGN32 dHubCmdHDR_cmp (SIE_dHubCmdHDR *p, SIE_dHubCmdHDR *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmdHDR_check(p,pie,pfx,hLOG) dHubCmdHDR_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmdHDR_print(p, pfx,hLOG) dHubCmdHDR_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmdHDR +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmd biu (4,4) +/// ### +/// * 64-bit dHub command issued by read/write masters +/// * [0:31] +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 MEM (W-) +/// %unsigned 32 addr +/// ### +/// * DRAM data address, in bytes; not necessarily MTU aligned. +/// * [32:63] +/// ### +/// @ 0x00004 (P) +/// # 0x00004 HDR +/// $dHubCmdHDR HDR REG +/// ### +/// * end dHubCmd +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 8B, bits: 61b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmd +#define h_dHubCmd (){} + + #define RA_dHubCmd_MEM 0x0000 + + #define BA_dHubCmd_MEM_addr 0x0000 + #define B16dHubCmd_MEM_addr 0x0000 + #define LSb32dHubCmd_MEM_addr 0 + #define LSb16dHubCmd_MEM_addr 0 + #define bdHubCmd_MEM_addr 32 + #define MSK32dHubCmd_MEM_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_dHubCmd_HDR 0x0004 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmd { + /////////////////////////////////////////////////////////// + #define GET32dHubCmd_MEM_addr(r32) _BFGET_(r32,31, 0) + #define SET32dHubCmd_MEM_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32dHubCmd_MEM {\ + UNSG32 uMEM_addr : 32;\ + } + union { UNSG32 u32dHubCmd_MEM; + struct w32dHubCmd_MEM; + }; + /////////////////////////////////////////////////////////// + SIE_dHubCmdHDR ie_HDR; + /////////////////////////////////////////////////////////// + } SIE_dHubCmd; + + typedef union T32dHubCmd_MEM + { UNSG32 u32; + struct w32dHubCmd_MEM; + } T32dHubCmd_MEM; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmd_MEM + { UNSG32 u32[1]; + struct { + struct w32dHubCmd_MEM; + }; + } TdHubCmd_MEM; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmd_drvrd(SIE_dHubCmd *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmd_drvwr(SIE_dHubCmd *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmd_reset(SIE_dHubCmd *p); + SIGN32 dHubCmd_cmp (SIE_dHubCmd *p, SIE_dHubCmd *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmd_check(p,pie,pfx,hLOG) dHubCmd_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmd_print(p, pfx,hLOG) dHubCmd_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmd +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubChannel biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 2 MTU +/// : 8byte 0x0 +/// : 32byte 0x1 +/// : 128byte 0x2 +/// : 1024byte 0x3 +/// ### +/// * Minimum transfer unit of the channel +/// ### +/// %unsigned 1 QoS +/// ### +/// * Write 1 to turn on QoS detection +/// ### +/// %unsigned 1 selfLoop +/// ### +/// * Write 1 to enable cmd looping support; 0 to turn off +/// ### +/// %unsigned 1 intrCtl 0x0 +/// : cmdDone 0x0 +/// : chIdle 0x1 +/// ### +/// * 0 : default vlaue, the interrupt is triggered by the finish of the dHub command if the interrupt bit is defined in the dHub command. +/// * 1 : The interrupt is triggered if the dHub channel is idle ( no busy and no pending and the corresponding dHub command Q is empty). +/// ### +/// %unsigned 1 hScan 0x0 +/// : rastScan 0x0 +/// : invScan 0x1 +/// ### +/// * This parameter will only apply to read channels. +/// * It will affect 1D dHub command for the channel. +/// * When scan is set to 1 (invScan), the data (beat) inside the dHub command will be fetched in the inverse order. ie. The data from the last address will come first and the data (beat) from the first address will come lastly. +/// ### +/// %unsigned 1 vScan 0x0 +/// : rastScan 0x0 +/// : invScan 0x1 +/// ### +/// * This parameter will only apply to read channels. +/// * It will affect 2D channels. +/// * When scan is set to 1 (invScan), +/// * The last address line (1D command) will be fetched first, and the first address line will be fetched lastly. +/// ### +/// %% 25 # Stuffing bits... +/// @ 0x00004 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to enable the channel; 0 to pause the channel +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to reset the channel controller state +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C FLUSH (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to start the data flushing process. Invalid for read (M2H) channels +/// * end dHubChannel +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 10b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubChannel +#define h_dHubChannel (){} + + #define RA_dHubChannel_CFG 0x0000 + + #define BA_dHubChannel_CFG_MTU 0x0000 + #define B16dHubChannel_CFG_MTU 0x0000 + #define LSb32dHubChannel_CFG_MTU 0 + #define LSb16dHubChannel_CFG_MTU 0 + #define bdHubChannel_CFG_MTU 2 + #define MSK32dHubChannel_CFG_MTU 0x00000003 + #define dHubChannel_CFG_MTU_8byte 0x0 + #define dHubChannel_CFG_MTU_32byte 0x1 + #define dHubChannel_CFG_MTU_128byte 0x2 + #define dHubChannel_CFG_MTU_1024byte 0x3 + + #define BA_dHubChannel_CFG_QoS 0x0000 + #define B16dHubChannel_CFG_QoS 0x0000 + #define LSb32dHubChannel_CFG_QoS 2 + #define LSb16dHubChannel_CFG_QoS 2 + #define bdHubChannel_CFG_QoS 1 + #define MSK32dHubChannel_CFG_QoS 0x00000004 + + #define BA_dHubChannel_CFG_selfLoop 0x0000 + #define B16dHubChannel_CFG_selfLoop 0x0000 + #define LSb32dHubChannel_CFG_selfLoop 3 + #define LSb16dHubChannel_CFG_selfLoop 3 + #define bdHubChannel_CFG_selfLoop 1 + #define MSK32dHubChannel_CFG_selfLoop 0x00000008 + + #define BA_dHubChannel_CFG_intrCtl 0x0000 + #define B16dHubChannel_CFG_intrCtl 0x0000 + #define LSb32dHubChannel_CFG_intrCtl 4 + #define LSb16dHubChannel_CFG_intrCtl 4 + #define bdHubChannel_CFG_intrCtl 1 + #define MSK32dHubChannel_CFG_intrCtl 0x00000010 + #define dHubChannel_CFG_intrCtl_cmdDone 0x0 + #define dHubChannel_CFG_intrCtl_chIdle 0x1 + + #define BA_dHubChannel_CFG_hScan 0x0000 + #define B16dHubChannel_CFG_hScan 0x0000 + #define LSb32dHubChannel_CFG_hScan 5 + #define LSb16dHubChannel_CFG_hScan 5 + #define bdHubChannel_CFG_hScan 1 + #define MSK32dHubChannel_CFG_hScan 0x00000020 + #define dHubChannel_CFG_hScan_rastScan 0x0 + #define dHubChannel_CFG_hScan_invScan 0x1 + + #define BA_dHubChannel_CFG_vScan 0x0000 + #define B16dHubChannel_CFG_vScan 0x0000 + #define LSb32dHubChannel_CFG_vScan 6 + #define LSb16dHubChannel_CFG_vScan 6 + #define bdHubChannel_CFG_vScan 1 + #define MSK32dHubChannel_CFG_vScan 0x00000040 + #define dHubChannel_CFG_vScan_rastScan 0x0 + #define dHubChannel_CFG_vScan_invScan 0x1 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_START 0x0004 + + #define BA_dHubChannel_START_EN 0x0004 + #define B16dHubChannel_START_EN 0x0004 + #define LSb32dHubChannel_START_EN 0 + #define LSb16dHubChannel_START_EN 0 + #define bdHubChannel_START_EN 1 + #define MSK32dHubChannel_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_CLEAR 0x0008 + + #define BA_dHubChannel_CLEAR_EN 0x0008 + #define B16dHubChannel_CLEAR_EN 0x0008 + #define LSb32dHubChannel_CLEAR_EN 0 + #define LSb16dHubChannel_CLEAR_EN 0 + #define bdHubChannel_CLEAR_EN 1 + #define MSK32dHubChannel_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_FLUSH 0x000C + + #define BA_dHubChannel_FLUSH_EN 0x000C + #define B16dHubChannel_FLUSH_EN 0x000C + #define LSb32dHubChannel_FLUSH_EN 0 + #define LSb16dHubChannel_FLUSH_EN 0 + #define bdHubChannel_FLUSH_EN 1 + #define MSK32dHubChannel_FLUSH_EN 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubChannel { + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_CFG_MTU(r32) _BFGET_(r32, 1, 0) + #define SET32dHubChannel_CFG_MTU(r32,v) _BFSET_(r32, 1, 0,v) + #define GET16dHubChannel_CFG_MTU(r16) _BFGET_(r16, 1, 0) + #define SET16dHubChannel_CFG_MTU(r16,v) _BFSET_(r16, 1, 0,v) + + #define GET32dHubChannel_CFG_QoS(r32) _BFGET_(r32, 2, 2) + #define SET32dHubChannel_CFG_QoS(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16dHubChannel_CFG_QoS(r16) _BFGET_(r16, 2, 2) + #define SET16dHubChannel_CFG_QoS(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32dHubChannel_CFG_selfLoop(r32) _BFGET_(r32, 3, 3) + #define SET32dHubChannel_CFG_selfLoop(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16dHubChannel_CFG_selfLoop(r16) _BFGET_(r16, 3, 3) + #define SET16dHubChannel_CFG_selfLoop(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32dHubChannel_CFG_intrCtl(r32) _BFGET_(r32, 4, 4) + #define SET32dHubChannel_CFG_intrCtl(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16dHubChannel_CFG_intrCtl(r16) _BFGET_(r16, 4, 4) + #define SET16dHubChannel_CFG_intrCtl(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32dHubChannel_CFG_hScan(r32) _BFGET_(r32, 5, 5) + #define SET32dHubChannel_CFG_hScan(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16dHubChannel_CFG_hScan(r16) _BFGET_(r16, 5, 5) + #define SET16dHubChannel_CFG_hScan(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32dHubChannel_CFG_vScan(r32) _BFGET_(r32, 6, 6) + #define SET32dHubChannel_CFG_vScan(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16dHubChannel_CFG_vScan(r16) _BFGET_(r16, 6, 6) + #define SET16dHubChannel_CFG_vScan(r16,v) _BFSET_(r16, 6, 6,v) + + #define w32dHubChannel_CFG {\ + UNSG32 uCFG_MTU : 2;\ + UNSG32 uCFG_QoS : 1;\ + UNSG32 uCFG_selfLoop : 1;\ + UNSG32 uCFG_intrCtl : 1;\ + UNSG32 uCFG_hScan : 1;\ + UNSG32 uCFG_vScan : 1;\ + UNSG32 RSVDx0_b7 : 25;\ + } + union { UNSG32 u32dHubChannel_CFG; + struct w32dHubChannel_CFG; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_START; + struct w32dHubChannel_START; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_CLEAR; + struct w32dHubChannel_CLEAR; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_FLUSH_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_FLUSH_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_FLUSH_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_FLUSH_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_FLUSH {\ + UNSG32 uFLUSH_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_FLUSH; + struct w32dHubChannel_FLUSH; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubChannel; + + typedef union T32dHubChannel_CFG + { UNSG32 u32; + struct w32dHubChannel_CFG; + } T32dHubChannel_CFG; + typedef union T32dHubChannel_START + { UNSG32 u32; + struct w32dHubChannel_START; + } T32dHubChannel_START; + typedef union T32dHubChannel_CLEAR + { UNSG32 u32; + struct w32dHubChannel_CLEAR; + } T32dHubChannel_CLEAR; + typedef union T32dHubChannel_FLUSH + { UNSG32 u32; + struct w32dHubChannel_FLUSH; + } T32dHubChannel_FLUSH; + /////////////////////////////////////////////////////////// + + typedef union TdHubChannel_CFG + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_CFG; + }; + } TdHubChannel_CFG; + typedef union TdHubChannel_START + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_START; + }; + } TdHubChannel_START; + typedef union TdHubChannel_CLEAR + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_CLEAR; + }; + } TdHubChannel_CLEAR; + typedef union TdHubChannel_FLUSH + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_FLUSH; + }; + } TdHubChannel_FLUSH; + + /////////////////////////////////////////////////////////// + SIGN32 dHubChannel_drvrd(SIE_dHubChannel *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubChannel_drvwr(SIE_dHubChannel *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubChannel_reset(SIE_dHubChannel *p); + SIGN32 dHubChannel_cmp (SIE_dHubChannel *p, SIE_dHubChannel *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubChannel_check(p,pie,pfx,hLOG) dHubChannel_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubChannel_print(p, pfx,hLOG) dHubChannel_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubChannel +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubReg biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 SemaHub +/// $SemaHub SemaHub REG +/// ### +/// * For dHub internal interrupts, also provide semaphore service for external (all channels will be opened to external to access). +/// * Channel 0 is used for dHub.HBO interrupt. +/// * Channel N+1 is used for dHub.Channel[N] interrupt. +/// ### +/// @ 0x00400 (P) +/// # 0x00400 HBO +/// $HBO HBO REG +/// ### +/// * For dHub channels (command/data queues), also provide (unused) FIFO service for external. +/// * Channel 2N is used for dHub.Channel[N] command. +/// * Channel 2N+1 is used for dHub.Channel[N] data. +/// ### +/// @ 0x00B00 ARR (P) +/// # 0x00B00 channelCtl +/// $dHubChannel channelCtl REG [16] +/// ### +/// * Up-to 16 channels +/// ### +/// @ 0x00C00 BUSY (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: no ongoing command is being processed, and no flushing is taking place +/// * 1: channel controller is busy +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C04 PENDING (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: Response queue is empty, meaning no outstanding AXI transactions +/// * 1: there exist some outstanding AXI transactions +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C08 busRstEn (RW-) +/// %unsigned 1 reg 0x0 +/// ### +/// * Write one to this register will trigger gate-keeper to take over the AXI bus. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00C0C busRstDone (R-) +/// %unsigned 1 reg 0x1 +/// ### +/// * After gate-keeper take over the AXI bus, it will assert this bit once there is no outstanding transactions on AXI bus. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00C10 flowCtl (P) +/// %unsigned 8 rAlpha 0x0 +/// %unsigned 8 wAlpha 0x0 +/// ### +/// * Flow control parameter for read and write axi master. +/// * clkCnt=(alpha*bstLen)>>4. +/// * This # of clock cycles will be blocked for the axi master after an axi command with the burst length of “bstLenâ€. +/// * When set alpha to be 0, the master will never be blocked. +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C14 axiCmdCol (P) +/// %unsigned 16 rCnt 0x0 +/// %unsigned 16 wCnt 0x0 +/// ### +/// * Axi command collection. The counter value indicate read/write do the command collection for # of clock cycles, start from the first command pushed to an empty command Q. Here are the conditions that will trigger the Axi master to send out command. +/// * Cmd Q full or the counter count down to “0†from the programmed value. +/// * Set the counter to 0 will disable the command collection. +/// * end dHubReg +/// ### +/// @ 0x00C18 (W-) +/// # # Stuffing bytes... +/// %% 1856 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 3328B, bits: 3314b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubReg +#define h_dHubReg (){} + + #define RA_dHubReg_SemaHub 0x0000 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_HBO 0x0400 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_ARR 0x0B00 + #define RA_dHubReg_channelCtl 0x0B00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_BUSY 0x0C00 + + #define BA_dHubReg_BUSY_ST 0x0C00 + #define B16dHubReg_BUSY_ST 0x0C00 + #define LSb32dHubReg_BUSY_ST 0 + #define LSb16dHubReg_BUSY_ST 0 + #define bdHubReg_BUSY_ST 16 + #define MSK32dHubReg_BUSY_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg_PENDING 0x0C04 + + #define BA_dHubReg_PENDING_ST 0x0C04 + #define B16dHubReg_PENDING_ST 0x0C04 + #define LSb32dHubReg_PENDING_ST 0 + #define LSb16dHubReg_PENDING_ST 0 + #define bdHubReg_PENDING_ST 16 + #define MSK32dHubReg_PENDING_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg_busRstEn 0x0C08 + + #define BA_dHubReg_busRstEn_reg 0x0C08 + #define B16dHubReg_busRstEn_reg 0x0C08 + #define LSb32dHubReg_busRstEn_reg 0 + #define LSb16dHubReg_busRstEn_reg 0 + #define bdHubReg_busRstEn_reg 1 + #define MSK32dHubReg_busRstEn_reg 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_busRstDone 0x0C0C + + #define BA_dHubReg_busRstDone_reg 0x0C0C + #define B16dHubReg_busRstDone_reg 0x0C0C + #define LSb32dHubReg_busRstDone_reg 0 + #define LSb16dHubReg_busRstDone_reg 0 + #define bdHubReg_busRstDone_reg 1 + #define MSK32dHubReg_busRstDone_reg 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_flowCtl 0x0C10 + + #define BA_dHubReg_flowCtl_rAlpha 0x0C10 + #define B16dHubReg_flowCtl_rAlpha 0x0C10 + #define LSb32dHubReg_flowCtl_rAlpha 0 + #define LSb16dHubReg_flowCtl_rAlpha 0 + #define bdHubReg_flowCtl_rAlpha 8 + #define MSK32dHubReg_flowCtl_rAlpha 0x000000FF + + #define BA_dHubReg_flowCtl_wAlpha 0x0C11 + #define B16dHubReg_flowCtl_wAlpha 0x0C10 + #define LSb32dHubReg_flowCtl_wAlpha 8 + #define LSb16dHubReg_flowCtl_wAlpha 8 + #define bdHubReg_flowCtl_wAlpha 8 + #define MSK32dHubReg_flowCtl_wAlpha 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_axiCmdCol 0x0C14 + + #define BA_dHubReg_axiCmdCol_rCnt 0x0C14 + #define B16dHubReg_axiCmdCol_rCnt 0x0C14 + #define LSb32dHubReg_axiCmdCol_rCnt 0 + #define LSb16dHubReg_axiCmdCol_rCnt 0 + #define bdHubReg_axiCmdCol_rCnt 16 + #define MSK32dHubReg_axiCmdCol_rCnt 0x0000FFFF + + #define BA_dHubReg_axiCmdCol_wCnt 0x0C16 + #define B16dHubReg_axiCmdCol_wCnt 0x0C16 + #define LSb32dHubReg_axiCmdCol_wCnt 16 + #define LSb16dHubReg_axiCmdCol_wCnt 0 + #define bdHubReg_axiCmdCol_wCnt 16 + #define MSK32dHubReg_axiCmdCol_wCnt 0xFFFF0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubReg { + /////////////////////////////////////////////////////////// + SIE_SemaHub ie_SemaHub; + /////////////////////////////////////////////////////////// + SIE_HBO ie_HBO; + /////////////////////////////////////////////////////////// + SIE_dHubChannel ie_channelCtl[16]; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_BUSY_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_BUSY_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_BUSY_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_BUSY_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_BUSY {\ + UNSG32 uBUSY_ST : 16;\ + UNSG32 RSVDxC00_b16 : 16;\ + } + union { UNSG32 u32dHubReg_BUSY; + struct w32dHubReg_BUSY; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_PENDING_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_PENDING_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_PENDING_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_PENDING_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_PENDING {\ + UNSG32 uPENDING_ST : 16;\ + UNSG32 RSVDxC04_b16 : 16;\ + } + union { UNSG32 u32dHubReg_PENDING; + struct w32dHubReg_PENDING; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_busRstEn_reg(r32) _BFGET_(r32, 0, 0) + #define SET32dHubReg_busRstEn_reg(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubReg_busRstEn_reg(r16) _BFGET_(r16, 0, 0) + #define SET16dHubReg_busRstEn_reg(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubReg_busRstEn {\ + UNSG32 ubusRstEn_reg : 1;\ + UNSG32 RSVDxC08_b1 : 31;\ + } + union { UNSG32 u32dHubReg_busRstEn; + struct w32dHubReg_busRstEn; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_busRstDone_reg(r32) _BFGET_(r32, 0, 0) + #define SET32dHubReg_busRstDone_reg(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubReg_busRstDone_reg(r16) _BFGET_(r16, 0, 0) + #define SET16dHubReg_busRstDone_reg(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubReg_busRstDone {\ + UNSG32 ubusRstDone_reg : 1;\ + UNSG32 RSVDxC0C_b1 : 31;\ + } + union { UNSG32 u32dHubReg_busRstDone; + struct w32dHubReg_busRstDone; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_flowCtl_rAlpha(r32) _BFGET_(r32, 7, 0) + #define SET32dHubReg_flowCtl_rAlpha(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16dHubReg_flowCtl_rAlpha(r16) _BFGET_(r16, 7, 0) + #define SET16dHubReg_flowCtl_rAlpha(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32dHubReg_flowCtl_wAlpha(r32) _BFGET_(r32,15, 8) + #define SET32dHubReg_flowCtl_wAlpha(r32,v) _BFSET_(r32,15, 8,v) + #define GET16dHubReg_flowCtl_wAlpha(r16) _BFGET_(r16,15, 8) + #define SET16dHubReg_flowCtl_wAlpha(r16,v) _BFSET_(r16,15, 8,v) + + #define w32dHubReg_flowCtl {\ + UNSG32 uflowCtl_rAlpha : 8;\ + UNSG32 uflowCtl_wAlpha : 8;\ + UNSG32 RSVDxC10_b16 : 16;\ + } + union { UNSG32 u32dHubReg_flowCtl; + struct w32dHubReg_flowCtl; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_axiCmdCol_rCnt(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_axiCmdCol_rCnt(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_axiCmdCol_rCnt(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_axiCmdCol_rCnt(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubReg_axiCmdCol_wCnt(r32) _BFGET_(r32,31,16) + #define SET32dHubReg_axiCmdCol_wCnt(r32,v) _BFSET_(r32,31,16,v) + #define GET16dHubReg_axiCmdCol_wCnt(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_axiCmdCol_wCnt(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_axiCmdCol {\ + UNSG32 uaxiCmdCol_rCnt : 16;\ + UNSG32 uaxiCmdCol_wCnt : 16;\ + } + union { UNSG32 u32dHubReg_axiCmdCol; + struct w32dHubReg_axiCmdCol; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxC18 [232]; + /////////////////////////////////////////////////////////// + } SIE_dHubReg; + + typedef union T32dHubReg_BUSY + { UNSG32 u32; + struct w32dHubReg_BUSY; + } T32dHubReg_BUSY; + typedef union T32dHubReg_PENDING + { UNSG32 u32; + struct w32dHubReg_PENDING; + } T32dHubReg_PENDING; + typedef union T32dHubReg_busRstEn + { UNSG32 u32; + struct w32dHubReg_busRstEn; + } T32dHubReg_busRstEn; + typedef union T32dHubReg_busRstDone + { UNSG32 u32; + struct w32dHubReg_busRstDone; + } T32dHubReg_busRstDone; + typedef union T32dHubReg_flowCtl + { UNSG32 u32; + struct w32dHubReg_flowCtl; + } T32dHubReg_flowCtl; + typedef union T32dHubReg_axiCmdCol + { UNSG32 u32; + struct w32dHubReg_axiCmdCol; + } T32dHubReg_axiCmdCol; + /////////////////////////////////////////////////////////// + + typedef union TdHubReg_BUSY + { UNSG32 u32[1]; + struct { + struct w32dHubReg_BUSY; + }; + } TdHubReg_BUSY; + typedef union TdHubReg_PENDING + { UNSG32 u32[1]; + struct { + struct w32dHubReg_PENDING; + }; + } TdHubReg_PENDING; + typedef union TdHubReg_busRstEn + { UNSG32 u32[1]; + struct { + struct w32dHubReg_busRstEn; + }; + } TdHubReg_busRstEn; + typedef union TdHubReg_busRstDone + { UNSG32 u32[1]; + struct { + struct w32dHubReg_busRstDone; + }; + } TdHubReg_busRstDone; + typedef union TdHubReg_flowCtl + { UNSG32 u32[1]; + struct { + struct w32dHubReg_flowCtl; + }; + } TdHubReg_flowCtl; + typedef union TdHubReg_axiCmdCol + { UNSG32 u32[1]; + struct { + struct w32dHubReg_axiCmdCol; + }; + } TdHubReg_axiCmdCol; + + /////////////////////////////////////////////////////////// + SIGN32 dHubReg_drvrd(SIE_dHubReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubReg_drvwr(SIE_dHubReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubReg_reset(SIE_dHubReg *p); + SIGN32 dHubReg_cmp (SIE_dHubReg *p, SIE_dHubReg *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubReg_check(p,pie,pfx,hLOG) dHubReg_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubReg_print(p, pfx,hLOG) dHubReg_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubReg +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmd2D biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 MEM (W-) +/// %unsigned 32 addr +/// ### +/// * DRAM data address of the 2D buffer, in bytes. +/// ### +/// @ 0x00004 DESC (W-) +/// %unsigned 16 stride +/// ### +/// * Line stride size in bytes +/// ### +/// %unsigned 13 numLine +/// ### +/// * Number of lines in buffer. Size of 0 is forbidden. +/// ### +/// %unsigned 2 hdrLoop +/// ### +/// * Size of line-loop for choosing dHubCmdHDR +/// * 0 is treated as 4 +/// ### +/// %unsigned 1 interrupt +/// ### +/// * 1: raise interrupt upon whole 2D command finish. +/// * 1: set the last 1D command interrupt bit. +/// * 0 : use the default 1D command interrupt bit. +/// ### +/// @ 0x00008 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to enable the channel; 0 to pause the channel +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to reset the 2D engine. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00010 (P) +/// # 0x00010 HDR +/// $dHubCmdHDR HDR REG [4] +/// ### +/// * Headers used in generating dHubCmd for each line in looping order, loop size (1,2,3,4) specified by DESC_hdrLoop +/// * end dHubCmd2D +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 32B, bits: 182b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmd2D +#define h_dHubCmd2D (){} + + #define RA_dHubCmd2D_MEM 0x0000 + + #define BA_dHubCmd2D_MEM_addr 0x0000 + #define B16dHubCmd2D_MEM_addr 0x0000 + #define LSb32dHubCmd2D_MEM_addr 0 + #define LSb16dHubCmd2D_MEM_addr 0 + #define bdHubCmd2D_MEM_addr 32 + #define MSK32dHubCmd2D_MEM_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_DESC 0x0004 + + #define BA_dHubCmd2D_DESC_stride 0x0004 + #define B16dHubCmd2D_DESC_stride 0x0004 + #define LSb32dHubCmd2D_DESC_stride 0 + #define LSb16dHubCmd2D_DESC_stride 0 + #define bdHubCmd2D_DESC_stride 16 + #define MSK32dHubCmd2D_DESC_stride 0x0000FFFF + + #define BA_dHubCmd2D_DESC_numLine 0x0006 + #define B16dHubCmd2D_DESC_numLine 0x0006 + #define LSb32dHubCmd2D_DESC_numLine 16 + #define LSb16dHubCmd2D_DESC_numLine 0 + #define bdHubCmd2D_DESC_numLine 13 + #define MSK32dHubCmd2D_DESC_numLine 0x1FFF0000 + + #define BA_dHubCmd2D_DESC_hdrLoop 0x0007 + #define B16dHubCmd2D_DESC_hdrLoop 0x0006 + #define LSb32dHubCmd2D_DESC_hdrLoop 29 + #define LSb16dHubCmd2D_DESC_hdrLoop 13 + #define bdHubCmd2D_DESC_hdrLoop 2 + #define MSK32dHubCmd2D_DESC_hdrLoop 0x60000000 + + #define BA_dHubCmd2D_DESC_interrupt 0x0007 + #define B16dHubCmd2D_DESC_interrupt 0x0006 + #define LSb32dHubCmd2D_DESC_interrupt 31 + #define LSb16dHubCmd2D_DESC_interrupt 15 + #define bdHubCmd2D_DESC_interrupt 1 + #define MSK32dHubCmd2D_DESC_interrupt 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_START 0x0008 + + #define BA_dHubCmd2D_START_EN 0x0008 + #define B16dHubCmd2D_START_EN 0x0008 + #define LSb32dHubCmd2D_START_EN 0 + #define LSb16dHubCmd2D_START_EN 0 + #define bdHubCmd2D_START_EN 1 + #define MSK32dHubCmd2D_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_CLEAR 0x000C + + #define BA_dHubCmd2D_CLEAR_EN 0x000C + #define B16dHubCmd2D_CLEAR_EN 0x000C + #define LSb32dHubCmd2D_CLEAR_EN 0 + #define LSb16dHubCmd2D_CLEAR_EN 0 + #define bdHubCmd2D_CLEAR_EN 1 + #define MSK32dHubCmd2D_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_HDR 0x0010 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmd2D { + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_MEM_addr(r32) _BFGET_(r32,31, 0) + #define SET32dHubCmd2D_MEM_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32dHubCmd2D_MEM {\ + UNSG32 uMEM_addr : 32;\ + } + union { UNSG32 u32dHubCmd2D_MEM; + struct w32dHubCmd2D_MEM; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_DESC_stride(r32) _BFGET_(r32,15, 0) + #define SET32dHubCmd2D_DESC_stride(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubCmd2D_DESC_stride(r16) _BFGET_(r16,15, 0) + #define SET16dHubCmd2D_DESC_stride(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubCmd2D_DESC_numLine(r32) _BFGET_(r32,28,16) + #define SET32dHubCmd2D_DESC_numLine(r32,v) _BFSET_(r32,28,16,v) + #define GET16dHubCmd2D_DESC_numLine(r16) _BFGET_(r16,12, 0) + #define SET16dHubCmd2D_DESC_numLine(r16,v) _BFSET_(r16,12, 0,v) + + #define GET32dHubCmd2D_DESC_hdrLoop(r32) _BFGET_(r32,30,29) + #define SET32dHubCmd2D_DESC_hdrLoop(r32,v) _BFSET_(r32,30,29,v) + #define GET16dHubCmd2D_DESC_hdrLoop(r16) _BFGET_(r16,14,13) + #define SET16dHubCmd2D_DESC_hdrLoop(r16,v) _BFSET_(r16,14,13,v) + + #define GET32dHubCmd2D_DESC_interrupt(r32) _BFGET_(r32,31,31) + #define SET32dHubCmd2D_DESC_interrupt(r32,v) _BFSET_(r32,31,31,v) + #define GET16dHubCmd2D_DESC_interrupt(r16) _BFGET_(r16,15,15) + #define SET16dHubCmd2D_DESC_interrupt(r16,v) _BFSET_(r16,15,15,v) + + #define w32dHubCmd2D_DESC {\ + UNSG32 uDESC_stride : 16;\ + UNSG32 uDESC_numLine : 13;\ + UNSG32 uDESC_hdrLoop : 2;\ + UNSG32 uDESC_interrupt : 1;\ + } + union { UNSG32 u32dHubCmd2D_DESC; + struct w32dHubCmd2D_DESC; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubCmd2D_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubCmd2D_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmd2D_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubCmd2D_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32dHubCmd2D_START; + struct w32dHubCmd2D_START; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubCmd2D_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubCmd2D_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmd2D_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubCmd2D_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32dHubCmd2D_CLEAR; + struct w32dHubCmd2D_CLEAR; + }; + /////////////////////////////////////////////////////////// + SIE_dHubCmdHDR ie_HDR[4]; + /////////////////////////////////////////////////////////// + } SIE_dHubCmd2D; + + typedef union T32dHubCmd2D_MEM + { UNSG32 u32; + struct w32dHubCmd2D_MEM; + } T32dHubCmd2D_MEM; + typedef union T32dHubCmd2D_DESC + { UNSG32 u32; + struct w32dHubCmd2D_DESC; + } T32dHubCmd2D_DESC; + typedef union T32dHubCmd2D_START + { UNSG32 u32; + struct w32dHubCmd2D_START; + } T32dHubCmd2D_START; + typedef union T32dHubCmd2D_CLEAR + { UNSG32 u32; + struct w32dHubCmd2D_CLEAR; + } T32dHubCmd2D_CLEAR; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmd2D_MEM + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_MEM; + }; + } TdHubCmd2D_MEM; + typedef union TdHubCmd2D_DESC + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_DESC; + }; + } TdHubCmd2D_DESC; + typedef union TdHubCmd2D_START + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_START; + }; + } TdHubCmd2D_START; + typedef union TdHubCmd2D_CLEAR + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_CLEAR; + }; + } TdHubCmd2D_CLEAR; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmd2D_drvrd(SIE_dHubCmd2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmd2D_drvwr(SIE_dHubCmd2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmd2D_reset(SIE_dHubCmd2D *p); + SIGN32 dHubCmd2D_cmp (SIE_dHubCmd2D *p, SIE_dHubCmd2D *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmd2D_check(p,pie,pfx,hLOG) dHubCmd2D_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmd2D_print(p, pfx,hLOG) dHubCmd2D_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmd2D +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubQuery (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 RESP (R-) +/// %unsigned 16 ST +/// ### +/// * Dhub channel state machine status. +/// ### +/// %% 16 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 16b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubQuery +#define h_dHubQuery (){} + + #define RA_dHubQuery_RESP 0x0000 + + #define BA_dHubQuery_RESP_ST 0x0000 + #define B16dHubQuery_RESP_ST 0x0000 + #define LSb32dHubQuery_RESP_ST 0 + #define LSb16dHubQuery_RESP_ST 0 + #define bdHubQuery_RESP_ST 16 + #define MSK32dHubQuery_RESP_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubQuery { + /////////////////////////////////////////////////////////// + #define GET32dHubQuery_RESP_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubQuery_RESP_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubQuery_RESP_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubQuery_RESP_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubQuery_RESP {\ + UNSG32 uRESP_ST : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32dHubQuery_RESP; + struct w32dHubQuery_RESP; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubQuery; + + typedef union T32dHubQuery_RESP + { UNSG32 u32; + struct w32dHubQuery_RESP; + } T32dHubQuery_RESP; + /////////////////////////////////////////////////////////// + + typedef union TdHubQuery_RESP + { UNSG32 u32[1]; + struct { + struct w32dHubQuery_RESP; + }; + } TdHubQuery_RESP; + + /////////////////////////////////////////////////////////// + SIGN32 dHubQuery_drvrd(SIE_dHubQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubQuery_drvwr(SIE_dHubQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubQuery_reset(SIE_dHubQuery *p); + SIGN32 dHubQuery_cmp (SIE_dHubQuery *p, SIE_dHubQuery *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubQuery_check(p,pie,pfx,hLOG) dHubQuery_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubQuery_print(p, pfx,hLOG) dHubQuery_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubQuery +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubReg2D biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 dHub +/// $dHubReg dHub REG +/// @ 0x00D00 ARR (P) +/// # 0x00D00 Cmd2D +/// $dHubCmd2D Cmd2D REG [16] +/// ### +/// * Up-to 16 2D channels. +/// * 2D Channel[N] is connected to dHub.Channel[N] command queue, that is, dHub.HBO.Channel[2N] +/// * Note: Number of 2D channels could be less than dHub channels (rest of are 1D only) +/// ### +/// @ 0x00F00 BUSY (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: no ongoing command is being processed +/// * 1: channel controller is busy +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00F04 (W-) +/// # # Stuffing bytes... +/// %% 480 +/// @ 0x00F40 (P) +/// # 0x00F40 CH_ST +/// $dHubQuery CH_ST MEM [16] +/// ### +/// * end dHubReg2D +/// ### +/// @ 0x00F80 (W-) +/// # # Stuffing bytes... +/// %% 1024 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4096B, bits: 6274b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubReg2D +#define h_dHubReg2D (){} + + #define RA_dHubReg2D_dHub 0x0000 + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_ARR 0x0D00 + #define RA_dHubReg2D_Cmd2D 0x0D00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_BUSY 0x0F00 + + #define BA_dHubReg2D_BUSY_ST 0x0F00 + #define B16dHubReg2D_BUSY_ST 0x0F00 + #define LSb32dHubReg2D_BUSY_ST 0 + #define LSb16dHubReg2D_BUSY_ST 0 + #define bdHubReg2D_BUSY_ST 16 + #define MSK32dHubReg2D_BUSY_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_CH_ST 0x0F40 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubReg2D { + /////////////////////////////////////////////////////////// + SIE_dHubReg ie_dHub; + /////////////////////////////////////////////////////////// + SIE_dHubCmd2D ie_Cmd2D[16]; + /////////////////////////////////////////////////////////// + #define GET32dHubReg2D_BUSY_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg2D_BUSY_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg2D_BUSY_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg2D_BUSY_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg2D_BUSY {\ + UNSG32 uBUSY_ST : 16;\ + UNSG32 RSVDxF00_b16 : 16;\ + } + union { UNSG32 u32dHubReg2D_BUSY; + struct w32dHubReg2D_BUSY; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxF04 [60]; + /////////////////////////////////////////////////////////// + SIE_dHubQuery ie_CH_ST[16]; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxF80 [128]; + /////////////////////////////////////////////////////////// + } SIE_dHubReg2D; + + typedef union T32dHubReg2D_BUSY + { UNSG32 u32; + struct w32dHubReg2D_BUSY; + } T32dHubReg2D_BUSY; + /////////////////////////////////////////////////////////// + + typedef union TdHubReg2D_BUSY + { UNSG32 u32[1]; + struct { + struct w32dHubReg2D_BUSY; + }; + } TdHubReg2D_BUSY; + + /////////////////////////////////////////////////////////// + SIGN32 dHubReg2D_drvrd(SIE_dHubReg2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubReg2D_drvwr(SIE_dHubReg2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubReg2D_reset(SIE_dHubReg2D *p); + SIGN32 dHubReg2D_cmp (SIE_dHubReg2D *p, SIE_dHubReg2D *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubReg2D_check(p,pie,pfx,hLOG) dHubReg2D_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubReg2D_print(p, pfx,hLOG) dHubReg2D_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubReg2D +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avioDhubChMap (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// %unsigned 4 vpp +/// ### +/// * BANK #0 +/// ### +/// : MV_R 0x0 +/// : MV_FRC_R 0x1 +/// : MV_FRC_W 0x2 +/// ### +/// * BANK #1 +/// ### +/// : BCM_R 0x3 +/// : HDMI_R 0x4 +/// %% 28 # Stuffing bits... +/// @ 0x00004 (P) +/// %unsigned 4 ag +/// ### +/// * BANK #0 +/// ### +/// : MA0_R 0x0 +/// : MA1_R 0x1 +/// : MA2_R 0x2 +/// : MA3_R 0x3 +/// : SA0_R 0x4 +/// : MIC0_W 0x5 +/// : MIC1_W 0x6 +/// ### +/// * BANK #1 +/// ### +/// : CSR_R 0x7 +/// ### +/// * BANK #2 +/// ### +/// : GFX_R 0x8 +/// %% 28 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 8B, bits: 8b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avioDhubChMap +#define h_avioDhubChMap (){} + + #define BA_avioDhubChMap_vpp 0x0000 + #define B16avioDhubChMap_vpp 0x0000 + #define LSb32avioDhubChMap_vpp 0 + #define LSb16avioDhubChMap_vpp 0 + #define bavioDhubChMap_vpp 4 + #define MSK32avioDhubChMap_vpp 0x0000000F + #define avioDhubChMap_vpp_MV_R 0x0 + #define avioDhubChMap_vpp_MV_FRC_R 0x1 + #define avioDhubChMap_vpp_MV_FRC_W 0x2 + + #define avioDhubChMap_vpp_DINT0_R_Z1 0x3 + #define avioDhubChMap_vpp_DINT1_R_Z1 0x4 + #define avioDhubChMap_vpp_DINT_W_Z1 0x5 + #define avioDhubChMap_vpp_BCM_R_Z1 0x6 + #define avioDhubChMap_vpp_HDMI_R_Z1 0x7 + #define avioDhubChMap_vpp_AUX_FRC_R_Z1 0x8 + #define avioDhubChMap_vpp_AUX_FRC_W_Z1 0x9 + #define avioDhubChMap_vpp_TT_R_Z1 0xA + + #define avioDhubChMap_vpp_BCM_R_A0 0x3 + #define avioDhubChMap_vpp_HDMI_R_A0 0x4 + + #define avioDhubChMap_vpp_BCM_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x6 : 0x3) + #define avioDhubChMap_vpp_HDMI_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x7 : 0x4) + + /////////////////////////////////////////////////////////// + + #define BA_avioDhubChMap_ag 0x0004 + #define B16avioDhubChMap_ag 0x0004 + #define LSb32avioDhubChMap_ag 0 + #define LSb16avioDhubChMap_ag 0 + #define bavioDhubChMap_ag 4 + #define MSK32avioDhubChMap_ag 0x0000000F + #define avioDhubChMap_ag_APPCMD_R_Z1 0x0 + #define avioDhubChMap_ag_MA0_R_Z1 0x1 + #define avioDhubChMap_ag_MA1_R_Z1 0x2 + #define avioDhubChMap_ag_MA2_R_Z1 0x3 + #define avioDhubChMap_ag_MA3_R_Z1 0x4 + #define avioDhubChMap_ag_SA_R_Z1 0x5 + #define avioDhubChMap_ag_SPDIF_R_Z1 0x6 + #define avioDhubChMap_ag_APPDAT_R_Z1 0x7 + #define avioDhubChMap_ag_APPDAT_W_Z1 0x8 + #define avioDhubChMap_ag_CSR_R_Z1 0x9 + #define avioDhubChMap_ag_GFX_R_Z1 0xA + + #define avioDhubChMap_ag_MA0_R_A0 0x0 + #define avioDhubChMap_ag_MA1_R_A0 0x1 + #define avioDhubChMap_ag_MA2_R_A0 0x2 + #define avioDhubChMap_ag_MA3_R_A0 0x3 + #define avioDhubChMap_ag_SA0_R_A0 0x4 + #define avioDhubChMap_ag_MIC0_W_A0 0x5 + #define avioDhubChMap_ag_MIC1_W_A0 0x6 + #define avioDhubChMap_ag_CSR_R_A0 0x7 + #define avioDhubChMap_ag_GFX_R_A0 0x8 + + #define avioDhubChMap_ag_MA0_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x1 : 0x0) + #define avioDhubChMap_ag_MA1_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x2 : 0x1) + #define avioDhubChMap_ag_MA2_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x3 : 0x2) + #define avioDhubChMap_ag_MA3_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x4 : 0x3) + + #define avioDhubChMap_ag_CSR_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x9 : 0x7) + #define avioDhubChMap_ag_GFX_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0xA : 0x8) + /////////////////////////////////////////////////////////// + + typedef struct SIE_avioDhubChMap { + /////////////////////////////////////////////////////////// + #define GET32avioDhubChMap_vpp(r32) _BFGET_(r32, 3, 0) + #define SET32avioDhubChMap_vpp(r32,v) _BFSET_(r32, 3, 0,v) + #define GET16avioDhubChMap_vpp(r16) _BFGET_(r16, 3, 0) + #define SET16avioDhubChMap_vpp(r16,v) _BFSET_(r16, 3, 0,v) + + UNSG32 u_vpp : 4; + UNSG32 RSVDx0_b4 : 28; + /////////////////////////////////////////////////////////// + #define GET32avioDhubChMap_ag(r32) _BFGET_(r32, 3, 0) + #define SET32avioDhubChMap_ag(r32,v) _BFSET_(r32, 3, 0,v) + #define GET16avioDhubChMap_ag(r16) _BFGET_(r16, 3, 0) + #define SET16avioDhubChMap_ag(r16,v) _BFSET_(r16, 3, 0,v) + + UNSG32 u_ag : 4; + UNSG32 RSVDx4_b4 : 28; + /////////////////////////////////////////////////////////// + } SIE_avioDhubChMap; + + /////////////////////////////////////////////////////////// + SIGN32 avioDhubChMap_drvrd(SIE_avioDhubChMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avioDhubChMap_drvwr(SIE_avioDhubChMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avioDhubChMap_reset(SIE_avioDhubChMap *p); + SIGN32 avioDhubChMap_cmp (SIE_avioDhubChMap *p, SIE_avioDhubChMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avioDhubChMap_check(p,pie,pfx,hLOG) avioDhubChMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avioDhubChMap_print(p, pfx,hLOG) avioDhubChMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avioDhubChMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avioDhubTcmMap (4,4) +/// # # ---------------------------------------------------------- +/// : vppDhub_BANK0_START_ADDR 0x0 +/// : vppDhub_BANK0_SIZE 0x2000 +/// : vppDhub_BANK1_START_ADDR 0x2000 +/// : vppDhub_BANK1_SIZE 0x1000 +/// : agDhub_BANK0_START_ADDR 0x0 +/// : agDhub_BANK0_SIZE 0x1000 +/// : agDhub_BANK1_START_ADDR 0x2000 +/// : agDhub_BANK1_SIZE 0x2000 +/// : agDhub_BANK2_START_ADDR 0x4000 +/// : agDhub_BANK2_SIZE 0x2000 +/// @ 0x00000 dummy (P) +/// %unsigned 1 xxx +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 1b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avioDhubTcmMap +#define h_avioDhubTcmMap (){} + + #define avioDhubTcmMap_vppDhub_BANK0_START_ADDR 0x0 + #define avioDhubTcmMap_vppDhub_BANK0_SIZE 0x2000 + #define avioDhubTcmMap_vppDhub_BANK1_START_ADDR 0x2000 + #define avioDhubTcmMap_vppDhub_BANK1_SIZE_A0 0x1000 + #define avioDhubTcmMap_agDhub_BANK0_START_ADDR 0x0 + #define avioDhubTcmMap_agDhub_BANK0_SIZE_A0 0x1000 + #define avioDhubTcmMap_agDhub_BANK1_START_ADDR 0x2000 + #define avioDhubTcmMap_agDhub_BANK1_SIZE 0x2000 + #define avioDhubTcmMap_agDhub_BANK2_START_ADDR 0x4000 + #define avioDhubTcmMap_agDhub_BANK2_SIZE 0x2000 + /////////////////////////////////////////////////////////// + #define RA_avioDhubTcmMap_dummy 0x0000 + + #define BA_avioDhubTcmMap_dummy_xxx 0x0000 + #define B16avioDhubTcmMap_dummy_xxx 0x0000 + #define LSb32avioDhubTcmMap_dummy_xxx 0 + #define LSb16avioDhubTcmMap_dummy_xxx 0 + #define bavioDhubTcmMap_dummy_xxx 1 + #define MSK32avioDhubTcmMap_dummy_xxx 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_avioDhubTcmMap { + /////////////////////////////////////////////////////////// + #define GET32avioDhubTcmMap_dummy_xxx(r32) _BFGET_(r32, 0, 0) + #define SET32avioDhubTcmMap_dummy_xxx(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16avioDhubTcmMap_dummy_xxx(r16) _BFGET_(r16, 0, 0) + #define SET16avioDhubTcmMap_dummy_xxx(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32avioDhubTcmMap_dummy {\ + UNSG32 udummy_xxx : 1;\ + UNSG32 RSVDx0_b1 : 31;\ + } + union { UNSG32 u32avioDhubTcmMap_dummy; + struct w32avioDhubTcmMap_dummy; + }; + /////////////////////////////////////////////////////////// + } SIE_avioDhubTcmMap; + + typedef union T32avioDhubTcmMap_dummy + { UNSG32 u32; + struct w32avioDhubTcmMap_dummy; + } T32avioDhubTcmMap_dummy; + /////////////////////////////////////////////////////////// + + typedef union TavioDhubTcmMap_dummy + { UNSG32 u32[1]; + struct { + struct w32avioDhubTcmMap_dummy; + }; + } TavioDhubTcmMap_dummy; + + /////////////////////////////////////////////////////////// + SIGN32 avioDhubTcmMap_drvrd(SIE_avioDhubTcmMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avioDhubTcmMap_drvwr(SIE_avioDhubTcmMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avioDhubTcmMap_reset(SIE_avioDhubTcmMap *p); + SIGN32 avioDhubTcmMap_cmp (SIE_avioDhubTcmMap *p, SIE_avioDhubTcmMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avioDhubTcmMap_check(p,pie,pfx,hLOG) avioDhubTcmMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avioDhubTcmMap_print(p, pfx,hLOG) avioDhubTcmMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avioDhubTcmMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avioDhubSemMap (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// %unsigned 5 vpp +/// : CH0_intr 0x0 +/// : CH1_intr 0x1 +/// : CH2_intr 0x2 +/// : CH3_intr 0x3 +/// : CH4_intr 0x4 +/// : CH5_intr 0x5 +/// : CH6_intr 0x6 +/// : CH7_intr 0x7 +/// : CH8_intr 0x8 +/// : CH9_intr 0x9 +/// : CH10_intr 0xA +/// : CH11_intr 0xB +/// : CH12_intr 0xC +/// : CH13_intr 0xD +/// : CH14_intr 0xE +/// : CH15_intr 0xF +/// : MV_R_SEM 0x10 +/// : PIP_R_SEM 0x11 +/// : BCM_R_SEM 0x12 +/// : vppCPCB0_intr 0x13 +/// ### +/// * VBI start interrupt for CPCB0 +/// ### +/// : vppCPCB1_intr 0x14 +/// ### +/// * VBI start interrupt for CPCB1 +/// ### +/// : vppCPCB2_intr 0x15 +/// ### +/// * VBI start interrupt for CPCB2 +/// ### +/// : vppOUT0_intr 0x16 +/// ### +/// * HDCP interrupt from HDMI-TX core +/// ### +/// : vppOUT1_intr 0x17 +/// ### +/// * HDMI CEC interrupt +/// ### +/// : vppOUT2_intr 0x18 +/// ### +/// * HDMI CEC interrupt +/// ### +/// : vppOUT3_intr 0x19 +/// ### +/// * HDMI_HPD interrpt +/// ### +/// : vppOUT4_intr 0x1A +/// ### +/// * active video start (VDE) interrupt for CPCB0 +/// ### +/// : vppOUT5_intr 0x1B +/// ### +/// * active video start (VDE) interrupt for CPCB1 +/// ### +/// : vppOUT6_intr 0x1C +/// ### +/// * active video start (VDE) interrupt for CPCB2 +/// ### +/// : bcmInvalidReqIntr 0x1D +/// ### +/// * Interrupt indicating invalid address access is made using BCM +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00004 (P) +/// %unsigned 5 ag +/// : CH0_intr 0x0 +/// : CH1_intr 0x1 +/// : CH2_intr 0x2 +/// : CH3_intr 0x3 +/// : CH4_intr 0x4 +/// : CH5_intr 0x5 +/// : CH6_intr 0x6 +/// : CH7_intr 0x7 +/// : CH8_intr 0x8 +/// : CH9_intr 0x9 +/// : CH10_intr 0xA +/// : CH11_intr 0xB +/// : CH12_intr 0xC +/// : CH13_intr 0xD +/// : CH14_intr 0xE +/// : CH15_intr 0xF +/// : app_intr0 0x11 +/// : app_intr1 0x12 +/// : app_intr2 0x13 +/// : app_intr3 0x14 +/// : MA0_R_SEM 0x15 +/// : MA1_R_SEM 0x16 +/// : MA2_R_SEM 0x17 +/// : MA3_R_SEM 0x18 +/// : SA_R_SEM 0x19 +/// : SPDIF_R_SEM 0x1A +/// : MIC_W_SEM 0x1B +/// : audio_intr 0x1C +/// %% 27 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 8B, bits: 10b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avioDhubSemMap +#define h_avioDhubSemMap (){} + + #define BA_avioDhubSemMap_vpp 0x0000 + #define B16avioDhubSemMap_vpp 0x0000 + #define LSb32avioDhubSemMap_vpp 0 + #define LSb16avioDhubSemMap_vpp 0 + #define bavioDhubSemMap_vpp 5 + #define MSK32avioDhubSemMap_vpp 0x0000001F + #define avioDhubSemMap_vpp_CH0_intr 0x0 + #define avioDhubSemMap_vpp_CH1_intr 0x1 + #define avioDhubSemMap_vpp_CH2_intr 0x2 + #define avioDhubSemMap_vpp_CH3_intr 0x3 + #define avioDhubSemMap_vpp_CH4_intr 0x4 + #define avioDhubSemMap_vpp_CH5_intr 0x5 + #define avioDhubSemMap_vpp_CH6_intr 0x6 + #define avioDhubSemMap_vpp_CH7_intr 0x7 + #define avioDhubSemMap_vpp_CH8_intr 0x8 + #define avioDhubSemMap_vpp_CH9_intr 0x9 + #define avioDhubSemMap_vpp_CH10_intr 0xA + #define avioDhubSemMap_vpp_CH11_intr 0xB + #define avioDhubSemMap_vpp_CH12_intr 0xC + #define avioDhubSemMap_vpp_CH13_intr 0xD + #define avioDhubSemMap_vpp_CH14_intr 0xE + #define avioDhubSemMap_vpp_CH15_intr 0xF + #define avioDhubSemMap_vpp_MV_R_SEM 0x10 + #define avioDhubSemMap_vpp_PIP_R_SEM 0x11 + #define avioDhubSemMap_vpp_BCM_R_SEM 0x12 + #define avioDhubSemMap_vpp_vppCPCB0_intr 0x13 + #define avioDhubSemMap_vpp_vppCPCB1_intr 0x14 + #define avioDhubSemMap_vpp_vppCPCB2_intr 0x15 + #define avioDhubSemMap_vpp_vppOUT0_intr 0x16 + #define avioDhubSemMap_vpp_vppOUT1_intr 0x17 + #define avioDhubSemMap_vpp_vppOUT2_intr 0x18 + #define avioDhubSemMap_vpp_vppOUT3_intr 0x19 + #define avioDhubSemMap_vpp_vppOUT4_intr 0x1A + #define avioDhubSemMap_vpp_vppOUT5_intr 0x1B + #define avioDhubSemMap_vpp_vppOUT6_intr 0x1C + #define avioDhubSemMap_vpp_bcmInvalidReqIntr 0x1D + /////////////////////////////////////////////////////////// + + #define BA_avioDhubSemMap_ag 0x0004 + #define B16avioDhubSemMap_ag 0x0004 + #define LSb32avioDhubSemMap_ag 0 + #define LSb16avioDhubSemMap_ag 0 + #define bavioDhubSemMap_ag 5 + #define MSK32avioDhubSemMap_ag 0x0000001F + #define avioDhubSemMap_ag_CH0_intr 0x0 + #define avioDhubSemMap_ag_CH1_intr 0x1 + #define avioDhubSemMap_ag_CH2_intr 0x2 + #define avioDhubSemMap_ag_CH3_intr 0x3 + #define avioDhubSemMap_ag_CH4_intr 0x4 + #define avioDhubSemMap_ag_CH5_intr 0x5 + #define avioDhubSemMap_ag_CH6_intr 0x6 + #define avioDhubSemMap_ag_CH7_intr 0x7 + #define avioDhubSemMap_ag_CH8_intr 0x8 + #define avioDhubSemMap_ag_CH9_intr 0x9 + #define avioDhubSemMap_ag_CH10_intr 0xA + #define avioDhubSemMap_ag_CH11_intr 0xB + #define avioDhubSemMap_ag_CH12_intr 0xC + #define avioDhubSemMap_ag_CH13_intr 0xD + #define avioDhubSemMap_ag_CH14_intr 0xE + #define avioDhubSemMap_ag_CH15_intr 0xF + #define avioDhubSemMap_ag_app_intr0 0x11 + #define avioDhubSemMap_ag_app_intr1 0x12 + #define avioDhubSemMap_ag_app_intr2 0x13 + #define avioDhubSemMap_ag_app_intr3 0x14 + #define avioDhubSemMap_ag_MA0_R_SEM 0x15 + #define avioDhubSemMap_ag_MA1_R_SEM 0x16 + #define avioDhubSemMap_ag_MA2_R_SEM 0x17 + #define avioDhubSemMap_ag_MA3_R_SEM 0x18 + #define avioDhubSemMap_ag_SA_R_SEM 0x19 + #define avioDhubSemMap_ag_SPDIF_R_SEM 0x1A + #define avioDhubSemMap_ag_MIC_W_SEM 0x1B + #define avioDhubSemMap_ag_audio_intr_A0 0x1C + /////////////////////////////////////////////////////////// + + typedef struct SIE_avioDhubSemMap { + /////////////////////////////////////////////////////////// + #define GET32avioDhubSemMap_vpp(r32) _BFGET_(r32, 4, 0) + #define SET32avioDhubSemMap_vpp(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16avioDhubSemMap_vpp(r16) _BFGET_(r16, 4, 0) + #define SET16avioDhubSemMap_vpp(r16,v) _BFSET_(r16, 4, 0,v) + + UNSG32 u_vpp : 5; + UNSG32 RSVDx0_b5 : 27; + /////////////////////////////////////////////////////////// + #define GET32avioDhubSemMap_ag(r32) _BFGET_(r32, 4, 0) + #define SET32avioDhubSemMap_ag(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16avioDhubSemMap_ag(r16) _BFGET_(r16, 4, 0) + #define SET16avioDhubSemMap_ag(r16,v) _BFSET_(r16, 4, 0,v) + + UNSG32 u_ag : 5; + UNSG32 RSVDx4_b5 : 27; + /////////////////////////////////////////////////////////// + } SIE_avioDhubSemMap; + + /////////////////////////////////////////////////////////// + SIGN32 avioDhubSemMap_drvrd(SIE_avioDhubSemMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avioDhubSemMap_drvwr(SIE_avioDhubSemMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avioDhubSemMap_reset(SIE_avioDhubSemMap *p); + SIGN32 avioDhubSemMap_cmp (SIE_avioDhubSemMap *p, SIE_avioDhubSemMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avioDhubSemMap_check(p,pie,pfx,hLOG) avioDhubSemMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avioDhubSemMap_print(p, pfx,hLOG) avioDhubSemMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avioDhubSemMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE vppTcmEntry (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (R-) +/// %unsigned 32 dat +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 32b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_vppTcmEntry +#define h_vppTcmEntry (){} + + #define BA_vppTcmEntry_dat 0x0000 + #define B16vppTcmEntry_dat 0x0000 + #define LSb32vppTcmEntry_dat 0 + #define LSb16vppTcmEntry_dat 0 + #define bvppTcmEntry_dat 32 + #define MSK32vppTcmEntry_dat 0xFFFFFFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_vppTcmEntry { + /////////////////////////////////////////////////////////// + #define GET32vppTcmEntry_dat(r32) _BFGET_(r32,31, 0) + #define SET32vppTcmEntry_dat(r32,v) _BFSET_(r32,31, 0,v) + + UNSG32 u_dat : 32; + /////////////////////////////////////////////////////////// + } SIE_vppTcmEntry; + + /////////////////////////////////////////////////////////// + SIGN32 vppTcmEntry_drvrd(SIE_vppTcmEntry *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 vppTcmEntry_drvwr(SIE_vppTcmEntry *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void vppTcmEntry_reset(SIE_vppTcmEntry *p); + SIGN32 vppTcmEntry_cmp (SIE_vppTcmEntry *p, SIE_vppTcmEntry *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define vppTcmEntry_check(p,pie,pfx,hLOG) vppTcmEntry_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define vppTcmEntry_print(p, pfx,hLOG) vppTcmEntry_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: vppTcmEntry +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE vppDhub biu (4,4) +/// ### +/// * vppDhub register specification +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 tcm0 +/// $vppTcmEntry tcm0 MEM [10240] +/// ### +/// * Real tcm size is 8K+4K = 12KB +/// ### +/// @ 0x10000 (P) +/// # 0x10000 dHub0 +/// $dHubReg2D dHub0 REG +/// @ 0x11000 (W-) +/// # # Stuffing bytes... +/// %% 491520 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 131072B, bits: 6306b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_vppDhub +#define h_vppDhub (){} + + #define RA_vppDhub_tcm0 0x0000 + /////////////////////////////////////////////////////////// + #define RA_vppDhub_dHub0 0x10000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_vppDhub { + /////////////////////////////////////////////////////////// + SIE_vppTcmEntry ie_tcm0[10240]; + UNSG8 RSVD_tcm0 [24576]; + /////////////////////////////////////////////////////////// + SIE_dHubReg2D ie_dHub0; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx11000 [61440]; + /////////////////////////////////////////////////////////// + } SIE_vppDhub; + + /////////////////////////////////////////////////////////// + SIGN32 vppDhub_drvrd(SIE_vppDhub *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 vppDhub_drvwr(SIE_vppDhub *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void vppDhub_reset(SIE_vppDhub *p); + SIGN32 vppDhub_cmp (SIE_vppDhub *p, SIE_vppDhub *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define vppDhub_check(p,pie,pfx,hLOG) vppDhub_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define vppDhub_print(p, pfx,hLOG) vppDhub_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: vppDhub +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE agDhub (4,4) +/// ### +/// * agDhub register specification +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 tcm0 +/// $vppTcmEntry tcm0 MEM [10240] +/// ### +/// * Real tcm size is 4K+8K+8K= 20KB +/// ### +/// @ 0x10000 (P) +/// # 0x10000 dHub0 +/// $dHubReg2D dHub0 REG +/// @ 0x11000 (W-) +/// # # Stuffing bytes... +/// %% 491520 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 131072B, bits: 6306b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_agDhub +#define h_agDhub (){} + + #define RA_agDhub_tcm0 0x0000 + /////////////////////////////////////////////////////////// + #define RA_agDhub_dHub0 0x10000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_agDhub { + /////////////////////////////////////////////////////////// + SIE_vppTcmEntry ie_tcm0[10240]; + UNSG8 RSVD_tcm0 [24576]; + /////////////////////////////////////////////////////////// + SIE_dHubReg2D ie_dHub0; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx11000 [61440]; + /////////////////////////////////////////////////////////// + } SIE_agDhub; + + /////////////////////////////////////////////////////////// + SIGN32 agDhub_drvrd(SIE_agDhub *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 agDhub_drvwr(SIE_agDhub *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void agDhub_reset(SIE_agDhub *p); + SIGN32 agDhub_cmp (SIE_agDhub *p, SIE_agDhub *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define agDhub_check(p,pie,pfx,hLOG) agDhub_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define agDhub_print(p, pfx,hLOG) agDhub_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: agDhub +//////////////////////////////////////////////////////////// + + + +#ifdef __cplusplus + } +#endif +#pragma pack() + +#endif +////// +/// ENDOFFILE: avioDhub.h +//////////////////////////////////////////////////////////// + diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/cbase.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/cbase.h new file mode 100644 index 00000000..13a8ead5 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/cbase.h @@ -0,0 +1,427 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + +/********************************************************************************************************************** +* $Log: vsys#comm#inc#cbase.h_1,v $ +* Revision 1.15 2007-01-03 15:57:01-08 hguan +* put numeric type definitions in a separate file. +* +* Revision 1.14 2007-01-03 12:08:57-08 georgew +* Add __ARMCC_VERSION support +* +* Revision 1.13 2006-12-12 17:59:25-08 georgew +* Add __ARMCC_VERSION support +* +* +* +* Revision 1.11 2006-10-30 11:28:09-08 lsha +* Add define of 'CONST' +* +* Revision 1.10 2006-07-18 19:40:49-07 lsha +* types of 'T*b' added +* +* Revision 1.9 2006-07-13 23:25:18-07 lsha +* ...No comments entered during checkin... +* +* Revision 1.8 2006-06-23 11:14:46-07 lsha +* ...No comments entered during checkin... +* +* Revision 1.7 2006-06-13 14:15:56-07 lsha +* 'fdbg' added +* +* Revision 1.4 2006-05-09 12:01:45-07 lsha +* Initial revision. +* +* +* DESCRIPTION: +* First header file to include by all C/C++ files. +* Unified definitions of commonly used types, symbols, constants, and macros/functions. +* +* Pre-definition build options: +* __MAIN__ Must and only be defined at the beginning of the .c/.cpp file that contains main() function. +* __CODE_LINK__ Optionally defined in make file: +* "#define __CODE_LINK__ 0" +* - Link for deep-embedded firmware. Will not link any library except customized "string.h". +* "#define __CODE_LINK__ 1" +* - Link for firmware on embedded OS. Will link customized "malloc.h" in addition. +* "#ifndef __CODE_LINK__" +* - Link for application software. Most standard libraries will be linked. +* +**********************************************************************************************************************/ + +#ifndef CBASE +#define CBASE " CBASE >>> " +/** CBASE + */ + + +#include "ctypes.h" + + +/** SECTION - platform dependent includes, definitions, and data types + */ + +#ifndef __CODE_LINK__ +#ifndef _CRT_SECURE_NO_DEPRECATE +#define _CRT_SECURE_NO_DEPRECATE /* To avoid CRT warnings */ +#endif + + #include + #include + #include + #include + #include + #include + #include + +#else + #ifndef __KERNEL__ + #include "string.h" /* Customized: memcpy, memset, and str... */ + #endif + + #if __CODE_LINK__ > 0 + #include "malloc.h" /* Customized: malloc, free */ + #endif +#endif + +#if(defined(WIN32)) + #include + #include + + #if(!defined(__XPLATFORM__)) + #include + #endif + #define __reversed_bit_fields__ + + #if(defined(_TGTOS) && (_TGTOS == CE)) + #define __OS_MSVC_CE__ + + #elif(defined(DRIVER)) + #define __OS_MSVC_KERNEL__ + + #elif(defined(_CONSOLE) || defined(__XPLATFORM__)) + #define __OS_MSVC_CONSOLE__ + + #else + #define __OS_MSVC_USER__ + #endif + +#elif(defined(__ARMCC_VERSION)) + +#elif(defined(__GNUC__)) + #if(defined(__KERNEL__)) + #define __OS_GNUC_KERNEL__ + #else + #include + #include + #include + #define __OS_GNUC_USER__ + #endif +#else + #define __OS_UNKNOWN__ +#endif +#if 0 + typedef UNSG8 T8b; + typedef UNSG16 T16b; + typedef UNSG32 T32b; + typedef UNSG32 T64b [2]; + typedef UNSG32 T96b [3]; + typedef UNSG32 T128b[4]; + typedef UNSG32 T160b[5]; + typedef UNSG32 T192b[6]; + typedef UNSG32 T224b[7]; + typedef UNSG32 T256b[8]; +#endif + +/** ENDOFSECTION + */ + + + +/** SECTION - symbols + */ + #ifdef __MAIN__ + #define Global + #define GlobalAssign(g, x) g = (x) + #else + #define Global extern + #define GlobalAssign(g, x) g + #endif + + #ifdef CONST + #undef CONST + #endif + #define CONST static const + + #ifdef INLINE + #undef INLINE + #endif + #if(defined(WIN32)) + #define INLINE static __forceinline + #elif(defined(__ARMCC_VERSION)) + #define INLINE static __inline + + #else + #define INLINE static inline + #endif + + #ifdef NULL + #undef NULL + #endif + #define NULL 0 + + #if(defined(WIN32)) + #ifndef __OS_MSVC_CE__ + #define $QPTR qword ptr + #define $DPTR dword ptr + #define $CNT edx + #define MMX_WIN32 + #endif + + #define ptr32u(ptr) ((UNSG32)PtrToUlong((char*)ptr)) + + #elif(defined(__ARMCC_VERSION)) //xingguo wang RVDS + #define ptr32u(ptr) ((UNSG32)(ptr)) + #define _unlink remove + #define _stricmp strcmp + #define _unlink remove + + #else + #define ptr32u(ptr) ((UNSG32)(ptr)) + + #define _stricmp strcasecmp + #define _unlink unlink + #define _open open + #define _close close + #define _read read + #define _write write + #define _tell tell + #define _lseek lseek + #define _lseeki64 lseeki64 + #endif + + #ifndef MemCpy + #define MemCpy memcpy + #endif + + #ifndef MemSet + #define MemSet memset + #endif + +/** ENDOFSECTION + */ + + + +#ifdef __cplusplus + extern "C" + { +#endif + +/** SECTION - pre-defined function arguments and returns + */ + typedef enum { + + ARG_KEEP = - 32768, /* No update, keep old value */ + ARG_AUTO = - 32767, /* Function chooses the value for it */ + + } EFuncArgument; + + typedef enum { + + ERR_UNKNOWN = - 1, /* Error type not defined */ + ERR_POINTER = - 2, /* Invalid pointer */ + ERR_FILE = - 3, /* File access failure */ + ERR_FIFO = - 4, /* FIFO overflow or underflow */ + ERR_MEMORY = - 5, /* Not enough memory or allocation failure */ + ERR_MISMATCH = - 6, /* Mis-matches found in hand-shaking */ + ERR_PARAMETER = - 7, /* False function parameter */ + ERR_HARDWARE = - 8, /* Hardware error */ + ERR_TIMING = - 9, /* Sychronize-related violation */ + + SUCCESS = 0 + + } EFuncReturn; +#ifndef __CODE_LINK__ +#if 0 + static char *eperr[] = { "SUCCESS", + "ERR_UNKNOWN", + "ERR_POINTER", + "ERR_FILE", + "ERR_FIFO", + "ERR_MEMORY", + "ERR_MISMATCH", + "ERR_PARAMETER", + "ERR_HARDWARE", + "ERR_TIMING", + }; +#endif +#else + #define eperr garrps8 +#endif + +/** ENDOFSECTION + */ + + + +/** SECTION - unit constants for storage, frequency and bit-rate + */ + #define KILO (1024) + #define kilo (1000) + + #define MEGA (1024 * 1024) + #define mega (1000 * 1000) + + #define GIGA (1024. * 1024. * 1024.) + #define giga (1000. * 1000. * 1000.) + + #define TERA (1024. * 1024. * 1024. * 1024.) + #define tera (1000. * 1000. * 1000. * 1000.) + + #define KILOth (1. / KILO) + #define kiloth (1. / kilo) + + #define MEGAth (1. / MEGA) + #define megath (1. / mega) + + #define GIGAth (1. / GIGA) + #define gigath (1. / giga) + + #define TERAth (1. / TERA) + #define terath (1. / tera) + + #define INFINITY32 (1 << 28) /* Help to avoid 32b operation over-flow */ + +/** ENDOFSECTION + */ + + + +/** SECTION - unified 'xdbg(fmt, ...)' and '_LOG'/'_dftLOG'/'_fLOG' (masking enabled) functions + */ + Global UNSG32 GlobalAssign(dbghfp, 0), GlobalAssign(dbgmask, ~0); + +#ifdef __CODE_LINK__ + #define xdbg 1 ? 0 : +#else + #if(defined(__OS_GNUC_KERNEL__)) + #define xdbg printk + + #elif(defined(__OS_MSVC_KERNEL__)) + #define xdbg DbgPrint + + #elif(defined(__OS_MSVC_CE__)) + #define xdbg KITLOutputDebugString + + #elif(defined(__OS_MSVC_USER__)) + INLINE void _dbg(const char *fmt, va_list args) + { char str[KILO]; vsprintf(str, fmt, args); OutputDebugString(str); + } + #else + #define _dbg vprintf + #endif + + #ifdef xdbg + #define fdbg 1 ? 0 : + #define _dflush(fp) do{}while(0) + #else + INLINE void xdbg(const char *fmt, ...) + { va_list args; va_start(args, fmt); + if(!dbghfp) _dbg(fmt, args); else vfprintf((FILE*)dbghfp, fmt, args); + va_end(args); + } + INLINE void fdbg(UNSG32 hfp, const char *fmt, ...) + { va_list args; if(!hfp) return; va_start(args, fmt); + vfprintf((FILE*)hfp, fmt, args); va_end(args); + } + #define _dflush(fp) do{ if(fp) fflush((FILE*)fp); }while(0) + #endif +#endif + + /* Usage: _LOG(log_file, log_mask, item_bit, ("item = %d\n", item_value)) */ + #define _LOG(fp, mask, b, fmt_args) do{ if(((b) < 0) || bTST(mask, b)) { UNSG32 dft = dbghfp; \ + dbghfp = ptr32u(fp); xdbg fmt_args; dbghfp = dft; } \ + }while(0) + /* Usage: _dftLOG(bLogFlush, item_bit, ("item = %d\n", item_value)) */ + #define _dftLOG(flush, b, fmt_args) do{ _LOG(dbghfp, dbgmask, b, fmt_args); if(flush) _dflush(dbghfp); \ + }while(0) + /* Usage: _fLOG(log_file, ("item = %d\n", item_value)) */ + #define _fLOG(fp, fmt_args) do{ _LOG(fp, 1, 0, fmt_args); _dflush(fp); }while(0) + +/** ENDOFSECTION + */ + + + +/** SECTION - unified 'IO32RD', 'IO32WR', and 'IO64RD' functions + */ +#ifdef __INLINE_ASM_ARM__ + /** Read 32-bit data from certain address + * a: input, address + * d: output 32-bit data + */ + #define IO32RD(d, a) __asm__ __volatile__ ("ldr %0, [%1]" : "=r" (d) : "r" (a)) + + /** Write 32-bit data from certain address + * a: input, address + * d: input 32-bit data + */ + #define IO32WR(d, a) __asm__ __volatile__ ("str %0, [%1]" : : "r" (d), "r" (a) : "memory") + + /** Read 64-bit data from certain address (MUST be 8-byte aligned) + * a: input, address + * d0: output first 32-bit data + * d1: output second 32-bit data + */ + #define IO64RD(d0, d1, a) __asm__ __volatile__ ( \ + "ldrd r4, [%2] \n\t" "mov %0, r4 \n\t" "mov %1, r5 \n\t" \ + : "=r" (d0), "=r" (d1) : "r" (a) : "r4", "r5" \ + ) +#else + +#if defined(BERLIN_SINGLE_CPU) && !defined(__LINUX_KERNEL__) + #define IO32RD(d, a) do{ (d) = (*((volatile UNSG32 *)devmem_phy_to_virt(a))); }while(0) + #define IO32WR(d, a) do{ (*((volatile UNSG32 *)devmem_phy_to_virt(a)) = (UNSG32)(d)); }while(0) +#else + #define IO32RD(d, a) do{ (d) = *(UNSG32*)(a); }while(0) + #define IO32WR(d, a) do{ *(UNSG32*)(a) = (d); }while(0) +#endif + #define IO64RD(d0, d1, a) do{ IO32RD(d0, a); IO32RD(d1, (a) + 4); }while(0) +#endif + + /* Directly write a 32b register or append to 'T64b cfgQ[]', in (adr,data) pairs */ + #define IO32CFG(cfgQ, i, a, d) do{ if(cfgQ) { (cfgQ)[i][0] = (a); (cfgQ)[i][1] = (d); } \ + else IO32WR(d, a); \ + (i) ++; \ + }while(0) + +/** ENDOFSECTION + */ + +#ifdef __cplusplus + } +#endif + + + +/** CBASE + */ +#endif + +/** ENDOFFILE: cbase.h ************************************************************************************************ + */ + diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/cinclude.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/cinclude.h new file mode 100644 index 00000000..99340bac --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/cinclude.h @@ -0,0 +1,264 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + +/********************************************************************************************************************** +* $Log: vsys#comm#inc#cinclude.h_1,v $ +* Revision 1.12 2007-04-17 21:54:01-07 lsha +* ...No comments entered during checkin... +* +* Revision 1.11 2006-09-22 16:04:08-07 lsha +* ...No comments entered during checkin... +* +* Revision 1.10 2006-09-12 20:01:01-07 lsha +* ...No comments entered during checkin... +* +* Revision 1.9 2006-07-05 13:19:22-07 lsha +* more bit-field ops added +* +* Revision 1.8 2006-06-19 19:20:47-07 lsha +* ...No comments entered during checkin... +* +* Revision 1.7 2006-06-12 20:00:06-07 lsha +* ...No comments entered during checkin... +* +* Revision 1.6 2006-06-01 21:13:44-07 lsha +* Resolve the warning of shifting negative bits +* +* Revision 1.5 2006-05-09 19:53:30-07 lsha +* SOS "$Log: vsys#comm#inc#cinclude.h_1,v $ +* SOS "Revision 1.12 2007-04-17 21:54:01-07 lsha +* SOS "...No comments entered during checkin... +* SOS " +* SOS "Revision 1.11 2006-09-22 16:04:08-07 lsha +* SOS "...No comments entered during checkin... +* SOS " +* SOS "Revision 1.10 2006-09-12 20:01:01-07 lsha +* SOS "...No comments entered during checkin... +* SOS " +* SOS "Revision 1.9 2006-07-05 13:19:22-07 lsha +* SOS "more bit-field ops added +* SOS " +* SOS "Revision 1.8 2006-06-19 19:20:47-07 lsha +* SOS "...No comments entered during checkin... +* SOS " +* SOS "Revision 1.7 2006-06-12 20:00:06-07 lsha +* SOS "...No comments entered during checkin... +* SOS " +* SOS "Revision 1.6 2006-06-01 21:13:44-07 lsha +* SOS "Resolve the warning of shifting negative bits +* SOS "" tag added. +* +* Revision 1.4 2006-05-09 12:01:44-07 lsha +* Initial revision. +* +* +* DESCRIPTION: +* Strongly suggested to be included by all C/C++ files. +* It includes useful functional macro definitions. +* +* Pre-definition build options: +* __big_endian__ Optionally defined in "_proj.h" for big-endian system only. +* +**********************************************************************************************************************/ + +#ifndef CINCLUDE +#define CINCLUDE " CINCLUDE >>> " +/** CINCLUDE + */ + +#include "cbase.h" + + + +#ifdef __cplusplus + extern "C" + { +#endif + +/** SECTION - macros for basic math operations + */ + #ifdef MIN + #undef MIN + #endif + #define MIN(a, b) ((a) < (b) ? (a) : (b)) + + #ifdef MAX + #undef MAX + #endif + #define MAX(a, b) ((a) > (b) ? (a) : (b)) + + #ifdef ABS + #undef ABS + #endif + #define ABS(x) ((x) < 0 ? - (x) : (x)) + INLINE SIGN32 ABS32(SIGN32 x) { SIGN32 s = x >> 31; return (x ^ s) - s; } + + #ifdef SIGN + #undef SIGN + #endif + #define SIGN(x) ((x) < 0 ? - 1 : 1) + + #ifdef ROUND + #undef ROUND + #endif + #define ROUND(x) ((SIGN32)floor((x) + 0.5)) + + #define SCLb(k) (31 & (k)) + #define UNIVSCL(a, k) (((k) < 0) ? ((a) >> SCLb(- (k))) : ((a) << SCLb(k))) + #define UNSGDES(a, k) (((a) + (1 << SCLb(k) >> 1)) >> SCLb(k)) + #define UNSGSCL(a, k) (((k) < 0) ? UNSGDES(a, - (k)) : ((a) << SCLb(k))) + #define SIGNDES(a, k) (((a) > 0) ? - UNSGDES(- (a), k) : UNSGDES(a, k)) + #define SIGNSCL(a, k) (((k) < 0) ? SIGNDES(a, - (k)) : ((a) << SCLb(k))) + #define REALSCL(a, k) (((k) < 0) ? (a) / (1 << SCLb(- (k))) : (a) * (1 << SCLb(k))) + #define UNIVRND(k) UNIVSCL(1, (k) - 1) + + #define EVENDIV(x) (((x) >> 1) | ((x) & 1)) + #define CEILDIV(a, b) (((a) + (b) - 1) / (b)) + #define UNSGDIV(a, b) (((a) + ((b) >> 1)) / (b)) + #define SIGNDIV(a, b) ((((a) > 0) ? ((a) + ((b) >> 1)) : ((a) - ((b) >> 1))) / (b)) + #define NSclDIV(a, k1, b, k2) ((a) * (k1) / (b) * (k2) + UNSGDIV((((a) * (k1)) % (b)) * (k2), b)) + + #define Average256(x1, x2, a) (((x1) * (a) + (x2) * (256 - (a)) + 128) >> 8) + #define Average(x1, x2, a, s) (((x1) * (a) + (x2) * ((s) - (a)) + ((s) >> 1)) / (s)) + #define Average3(r, x1, p1, x2, p2, x3, p3) \ + (((r) + (x1) * (p1) + (x2) * (p2) + (x3) * (p3)) / ((p1) + (p2) + (p3))) + #define Median(a, b, c) ((a) > (b) ? ((b) > (c) ? (b) : MIN(a, c)) : ((b) < (c) ? (b) : MAX(a, c))) + + #define SATURATE(x, min, max) MAX(MIN((x), (max)), (min)) + #define ModInc(x, i, mod) do{ (x) += (i); while((x) >= (mod)) (x) -= (mod); }while(0) + #define RangeBits(x, b) do{ for((b) = 0; ; (b) ++) \ + if((UNSG32)(x) < (UNSG32)(1 << (b))) break; \ + }while(0) +/** ENDOFSECTION + */ + + + +/** SECTION - macros for bits operations + */ + #define bTST(x, b) (((x) >> (b)) & 1) + #define bSETMASK(b) ((b) < 32 ? (1 << (b)) : 0) + #define bSET(x, b) do{ (x) |= bSETMASK(b); }while(0) + #define bCLRMASK(b) (~(bSETMASK(b))) + #define bCLR(x, b) do{ (x) &= bCLRMASK(b); }while(0) + #define NSETMASK(msb, lsb) (bSETMASK((msb) + 1) - bSETMASK(lsb)) + #define NCLRMASK(msb, lsb) (~(NSETMASK(msb, lsb))) + #define CutTo(x, b) ((x) & (bSETMASK(b) - 1)) + #define SignedRestore(x, b) ((SIGN32)(x) << (32 - (b)) >> (32 - (b))) + #define SignMagnitude(x, b) CutTo((x) < 0 ? bSETMASK((b) - 1) - (x) : (x), b) + #define InvSignMagnitude(x, b) ((SIGN32)(bTST(x, (b) - 1) ? bSETMASK((b) - 1) - (x) : (x))) + #define ClpSignMagnitude(r, x, b) do{ SIGN32 lmt = (1 << ((b) - 1)) - 1, y = SATURATE(x, - lmt, lmt); \ + r = SignMagnitude(y, b); \ + }while(0) + #define GetField(r, b, mask) (((r) & (mask)) >> (b)) + #define vreg_GetField(r, name) GetField(r, CB_##name, CM_##name) + #define SetField(r, b, mask, f) do{ (r) &= ~(mask); (r) |= ((f) << (b)) & (mask); }while(0) + #define vreg_SetField(r, name, f) SetField(r, CB_##name, CM_##name, f) + #define vreg_Init(a, v, reg, rst, base) do{ (a) = (base) + RA_##reg; (v) = (rst); }while(0) + + #define GetUnsigned(bf, v, b) do{ (v) = (UNSG32)(bf); }while(0) + #define GetSigned(bf, v, b) do{ (v) = SignedRestore((UNSG32)bf, b); }while(0) + #define GetSignMagnitude(bf, v, b) do{ (v) = InvSignMagnitude((UNSG32)bf, b); }while(0) + #define SetUnsigned(bf, v, b) do{ (bf) = CutTo((UNSG32)v, b); }while(0) + #define SetSigned(bf, v, b) SetUnsigned(bf, v, b) + #define SetSignMagnitude(bf, v, b) do{ (bf) = SignMagnitude((SIGN32)v, b); }while(0) + + #define UnsignedBF(v, b, lsb) (CutTo((UNSG32)v, b) << (lsb)) + #define SignedBF(v, b, lsb) (CutTo((SIGN32)v, b) << (lsb)) + #define SignMagnitudeBF(v, b, lsb) (SignMagnitude((SIGN32)v, b) << (lsb)) + + #define sizeofType(Ta, Tb) (sizeof(Ta) / sizeof(Tb)) + #define sizeofArray(arr) (sizeofType(arr, arr[0])) + #define endofString(str, i) ((str) + (strlen(str) - i)) + + #ifdef __big_endian__ + #define MSi8 (0x0) + #define LSi8 (0x3) + #define MSi16 (0x0) + #define LSi16 (0x1) + #define MSB32(u32) (((UNSG8*)&(u32))[0]) + #define LSB32(u32) (((UNSG8*)&(u32))[3]) + #else + #define MSi8 (0x3) + #define LSi8 (0x0) + #define MSi16 (0x1) + #define LSi16 (0x0) + #define MSB32(u32) (((UNSG8*)&(u32))[3]) + #define LSB32(u32) (((UNSG8*)&(u32))[0]) + #endif + +/** ENDOFSECTION + */ + + + +/** SECTION - macros for miscellaneous functional shortcuts + */ + /* FIFO level decrease by N, return SUCCESS or ERR_FIFO if under-flow */ + #define FiFoDec(lvl, n) (((lvl) < (n)) ? ERR_FIFO : ((lvl) -= (n), SUCCESS)) + + /* FIFO level increase by N, return SUCCESS or ERR_FIFO if over-flow */ + #define FiFoInc(lvl, n, max) (((lvl) + (n) > (max)) ? ERR_FIFO : ((lvl) += (n), SUCCESS)) + + /* Parse function arguments */ + #define LET(x, arg, dftval) do{ if((arg) != ARG_KEEP) x = ((arg) == ARG_AUTO) ? (dftval) : (arg); \ + }while(0) + /* Copy an array */ + #define CpyN(n, T, tgt, src) do{ SIGN32 ni; \ + for(ni = 0; ni < (n); ni ++) (tgt)[ni] = (T)((src)[ni]); \ + }while(0) + /* Clip-copy an array */ + #define ClpN(n, tgt, src, min, max) do{ SIGN32 ni; \ + for(ni = 0; ni < (n); ni ++) \ + (tgt)[ni] = SATURATE((src)[ni], min, max); \ + }while(0) + /* Optimize memory pointer (default: pow2 = 32) */ + #define MemAlign(pmem, pow2) (((UNSG8*)(pmem)) + ((pow2) - 1) - ((ptr32u(pmem) - 1) & ((pow2) - 1))) + + /* Copy 2 32b pointers (non-burst mode) */ + #define RegCpy(pa, pb, regs) do{ SIGN32 ni, cnt = (regs); \ + for(ni = 0; ni < cnt; ni ++) ((UNSG32*)pa)[ni] = ((UNSG32*)pb)[ni]; \ + }while(0) + /* Copy 2 pointers of any same structure type */ + #define EleCpy(pa, pb, type) RegCpy(pa, pb, sizeof(type) >> 2) + + /* Print a number to binary bits */ + #define ToBinary(x, b, str) do{ SIGN32 ni; \ + for(ni = 0; ni < (b); ni ++) \ + (str)[ni] = bTST(x, (b) - ni - 1) ? '1' : '0'; \ + (str)[ni] = 0; \ + }while(0) + /* Scan a number from binary bits */ + #define FromBinary(x, b, str) do{ SIGN32 ni; (x) = 0; \ + for(ni = 0; ni < (b); ni ++) \ + (x) = ((x) << 1) | (((str)[ni] == '1') ? 1 : 0); \ + }while(0) +/** ENDOFSECTION + */ + +#ifdef __cplusplus + } +#endif + + + +/** CINCLUDE + */ +#endif + +/** ENDOFFILE: cinclude.h ********************************************************************************************* + */ + diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/ctypes.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/ctypes.h new file mode 100644 index 00000000..317b8b69 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/ctypes.h @@ -0,0 +1,69 @@ +/********************************************************************************************************** +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +**********************************************************************************************************/ + +#ifndef CTYPES_H_ +#define CTYPES_H_ + +typedef unsigned char UNSG8; +typedef signed char SIGN8; +typedef unsigned short UNSG16; +typedef signed short SIGN16; +typedef unsigned int UNSG32; +typedef signed int SIGN32; +typedef unsigned long long UNSG64; +typedef signed long long SIGN64; +typedef float REAL32; +typedef double REAL64; + +#ifndef INLINE +#define INLINE static inline +#endif + +/*--------------------------------------------------------------------------- + NULL + ---------------------------------------------------------------------------*/ + +#ifndef NULL + #ifdef __cplusplus + #define NULL 0 + #else + #define NULL ((void *)0) + #endif +#endif + + +/*--------------------------------------------------------------------------- + Multiple-word types + ---------------------------------------------------------------------------*/ +#ifndef Txxb + #define Txxb + typedef UNSG8 T8b; + typedef UNSG16 T16b; + typedef UNSG32 T32b; + typedef UNSG32 T64b [2]; + typedef UNSG32 T96b [3]; + typedef UNSG32 T128b[4]; + typedef UNSG32 T160b[5]; + typedef UNSG32 T192b[6]; + typedef UNSG32 T224b[7]; + typedef UNSG32 T256b[8]; +#endif + +#endif diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/dHub.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/dHub.h new file mode 100644 index 00000000..6a016473 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/dHub.h @@ -0,0 +1,4186 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + +////// +/// don't edit! auto-generated by docc: dHub.h +//////////////////////////////////////////////////////////// +#ifndef dHub_h +#define dHub_h (){} + + +#include "ctypes.h" + +#pragma pack(1) +#ifdef __cplusplus + extern "C" { +#endif + +#ifndef _DOCC_H_BITOPS_ +#define _DOCC_H_BITOPS_ (){} + + #define _bSETMASK_(b) ((b)<32 ? (1<<((b)&31)) : 0) + #define _NSETMASK_(msb,lsb) (_bSETMASK_((msb)+1)-_bSETMASK_(lsb)) + #define _bCLRMASK_(b) (~_bSETMASK_(b)) + #define _NCLRMASK_(msb,lsb) (~_NSETMASK_(msb,lsb)) + #define _BFGET_(r,msb,lsb) (_NSETMASK_((msb)-(lsb),0)&((r)>>(lsb))) + #define _BFSET_(r,msb,lsb,v) do{ (r)&=_NCLRMASK_(msb,lsb); (r)|=_NSETMASK_(msb,lsb)&((v)<<(lsb)); }while(0) + +#endif + + + +////// +/// +/// $INTERFACE SemaINTR (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 mask (W-) +/// %unsigned 1 empty 0x0 +/// ### +/// * Enable interrupt on 'empty' condition +/// ### +/// %unsigned 1 full 0x0 +/// ### +/// * Enable interrupt on 'full' condition +/// ### +/// %unsigned 1 almostEmpty 0x0 +/// ### +/// * Enable interrupt on 'almostEmpty' condition +/// ### +/// %unsigned 1 almostFull 0x0 +/// ### +/// * Enable interrupt on 'almostFull' condition +/// ### +/// %% 28 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 4b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaINTR +#define h_SemaINTR (){} + + #define RA_SemaINTR_mask 0x0000 + + #define BA_SemaINTR_mask_empty 0x0000 + #define B16SemaINTR_mask_empty 0x0000 + #define LSb32SemaINTR_mask_empty 0 + #define LSb16SemaINTR_mask_empty 0 + #define bSemaINTR_mask_empty 1 + #define MSK32SemaINTR_mask_empty 0x00000001 + + #define BA_SemaINTR_mask_full 0x0000 + #define B16SemaINTR_mask_full 0x0000 + #define LSb32SemaINTR_mask_full 1 + #define LSb16SemaINTR_mask_full 1 + #define bSemaINTR_mask_full 1 + #define MSK32SemaINTR_mask_full 0x00000002 + + #define BA_SemaINTR_mask_almostEmpty 0x0000 + #define B16SemaINTR_mask_almostEmpty 0x0000 + #define LSb32SemaINTR_mask_almostEmpty 2 + #define LSb16SemaINTR_mask_almostEmpty 2 + #define bSemaINTR_mask_almostEmpty 1 + #define MSK32SemaINTR_mask_almostEmpty 0x00000004 + + #define BA_SemaINTR_mask_almostFull 0x0000 + #define B16SemaINTR_mask_almostFull 0x0000 + #define LSb32SemaINTR_mask_almostFull 3 + #define LSb16SemaINTR_mask_almostFull 3 + #define bSemaINTR_mask_almostFull 1 + #define MSK32SemaINTR_mask_almostFull 0x00000008 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaINTR { + /////////////////////////////////////////////////////////// + #define GET32SemaINTR_mask_empty(r32) _BFGET_(r32, 0, 0) + #define SET32SemaINTR_mask_empty(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaINTR_mask_empty(r16) _BFGET_(r16, 0, 0) + #define SET16SemaINTR_mask_empty(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaINTR_mask_full(r32) _BFGET_(r32, 1, 1) + #define SET32SemaINTR_mask_full(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaINTR_mask_full(r16) _BFGET_(r16, 1, 1) + #define SET16SemaINTR_mask_full(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaINTR_mask_almostEmpty(r32) _BFGET_(r32, 2, 2) + #define SET32SemaINTR_mask_almostEmpty(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaINTR_mask_almostEmpty(r16) _BFGET_(r16, 2, 2) + #define SET16SemaINTR_mask_almostEmpty(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaINTR_mask_almostFull(r32) _BFGET_(r32, 3, 3) + #define SET32SemaINTR_mask_almostFull(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaINTR_mask_almostFull(r16) _BFGET_(r16, 3, 3) + #define SET16SemaINTR_mask_almostFull(r16,v) _BFSET_(r16, 3, 3,v) + + #define w32SemaINTR_mask {\ + UNSG32 umask_empty : 1;\ + UNSG32 umask_full : 1;\ + UNSG32 umask_almostEmpty : 1;\ + UNSG32 umask_almostFull : 1;\ + UNSG32 RSVDx0_b4 : 28;\ + } + union { UNSG32 u32SemaINTR_mask; + struct w32SemaINTR_mask; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaINTR; + + typedef union T32SemaINTR_mask + { UNSG32 u32; + struct w32SemaINTR_mask; + } T32SemaINTR_mask; + /////////////////////////////////////////////////////////// + + typedef union TSemaINTR_mask + { UNSG32 u32[1]; + struct { + struct w32SemaINTR_mask; + }; + } TSemaINTR_mask; + + /////////////////////////////////////////////////////////// + SIGN32 SemaINTR_drvrd(SIE_SemaINTR *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaINTR_drvwr(SIE_SemaINTR *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaINTR_reset(SIE_SemaINTR *p); + SIGN32 SemaINTR_cmp (SIE_SemaINTR *p, SIE_SemaINTR *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaINTR_check(p,pie,pfx,hLOG) SemaINTR_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaINTR_print(p, pfx,hLOG) SemaINTR_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaINTR +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE Semaphore biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 16 DEPTH 0xF +/// ### +/// * Max level of semaphore +/// * Note: write this register will trigger counter reset +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00004 (P) +/// # 0x00004 INTR +/// $SemaINTR INTR REG [3] +/// ### +/// * Interrupt mask for 3 CPUs +/// ### +/// @ 0x00010 mask (W-) +/// %unsigned 1 full 0x0 +/// %unsigned 1 emp 0x0 +/// ### +/// * When full bit is set to one, to the producer, the semaphore will never be full, so that the producer will never be blocked. +/// * When emp bit is set to one, to the consumer, the semaphore will never be empty, so that the consumer will never be blocked. +/// * When the emp/full bit is set, the semaphore/FIFO pointer will be maintained, but the counter will be not correct anymore. +/// ### +/// %% 30 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 20B, bits: 30b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_Semaphore +#define h_Semaphore (){} + + #define RA_Semaphore_CFG 0x0000 + + #define BA_Semaphore_CFG_DEPTH 0x0000 + #define B16Semaphore_CFG_DEPTH 0x0000 + #define LSb32Semaphore_CFG_DEPTH 0 + #define LSb16Semaphore_CFG_DEPTH 0 + #define bSemaphore_CFG_DEPTH 16 + #define MSK32Semaphore_CFG_DEPTH 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_Semaphore_INTR 0x0004 + /////////////////////////////////////////////////////////// + #define RA_Semaphore_mask 0x0010 + + #define BA_Semaphore_mask_full 0x0010 + #define B16Semaphore_mask_full 0x0010 + #define LSb32Semaphore_mask_full 0 + #define LSb16Semaphore_mask_full 0 + #define bSemaphore_mask_full 1 + #define MSK32Semaphore_mask_full 0x00000001 + + #define BA_Semaphore_mask_emp 0x0010 + #define B16Semaphore_mask_emp 0x0010 + #define LSb32Semaphore_mask_emp 1 + #define LSb16Semaphore_mask_emp 1 + #define bSemaphore_mask_emp 1 + #define MSK32Semaphore_mask_emp 0x00000002 + /////////////////////////////////////////////////////////// + + typedef struct SIE_Semaphore { + /////////////////////////////////////////////////////////// + #define GET32Semaphore_CFG_DEPTH(r32) _BFGET_(r32,15, 0) + #define SET32Semaphore_CFG_DEPTH(r32,v) _BFSET_(r32,15, 0,v) + #define GET16Semaphore_CFG_DEPTH(r16) _BFGET_(r16,15, 0) + #define SET16Semaphore_CFG_DEPTH(r16,v) _BFSET_(r16,15, 0,v) + + #define w32Semaphore_CFG {\ + UNSG32 uCFG_DEPTH : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32Semaphore_CFG; + struct w32Semaphore_CFG; + }; + /////////////////////////////////////////////////////////// + SIE_SemaINTR ie_INTR[3]; + /////////////////////////////////////////////////////////// + #define GET32Semaphore_mask_full(r32) _BFGET_(r32, 0, 0) + #define SET32Semaphore_mask_full(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16Semaphore_mask_full(r16) _BFGET_(r16, 0, 0) + #define SET16Semaphore_mask_full(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32Semaphore_mask_emp(r32) _BFGET_(r32, 1, 1) + #define SET32Semaphore_mask_emp(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16Semaphore_mask_emp(r16) _BFGET_(r16, 1, 1) + #define SET16Semaphore_mask_emp(r16,v) _BFSET_(r16, 1, 1,v) + + #define w32Semaphore_mask {\ + UNSG32 umask_full : 1;\ + UNSG32 umask_emp : 1;\ + UNSG32 RSVDx10_b2 : 30;\ + } + union { UNSG32 u32Semaphore_mask; + struct w32Semaphore_mask; + }; + /////////////////////////////////////////////////////////// + } SIE_Semaphore; + + typedef union T32Semaphore_CFG + { UNSG32 u32; + struct w32Semaphore_CFG; + } T32Semaphore_CFG; + typedef union T32Semaphore_mask + { UNSG32 u32; + struct w32Semaphore_mask; + } T32Semaphore_mask; + /////////////////////////////////////////////////////////// + + typedef union TSemaphore_CFG + { UNSG32 u32[1]; + struct { + struct w32Semaphore_CFG; + }; + } TSemaphore_CFG; + typedef union TSemaphore_mask + { UNSG32 u32[1]; + struct { + struct w32Semaphore_mask; + }; + } TSemaphore_mask; + + /////////////////////////////////////////////////////////// + SIGN32 Semaphore_drvrd(SIE_Semaphore *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 Semaphore_drvwr(SIE_Semaphore *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void Semaphore_reset(SIE_Semaphore *p); + SIGN32 Semaphore_cmp (SIE_Semaphore *p, SIE_Semaphore *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define Semaphore_check(p,pie,pfx,hLOG) Semaphore_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define Semaphore_print(p, pfx,hLOG) Semaphore_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: Semaphore +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaQuery (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 RESP (R-) +/// %unsigned 16 CNT +/// ### +/// * Semaphore counter level +/// ### +/// %unsigned 16 PTR +/// ### +/// * Semaphore pointer: +/// * producer-wptr or consumer-rptr +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 32b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaQuery +#define h_SemaQuery (){} + + #define RA_SemaQuery_RESP 0x0000 + + #define BA_SemaQuery_RESP_CNT 0x0000 + #define B16SemaQuery_RESP_CNT 0x0000 + #define LSb32SemaQuery_RESP_CNT 0 + #define LSb16SemaQuery_RESP_CNT 0 + #define bSemaQuery_RESP_CNT 16 + #define MSK32SemaQuery_RESP_CNT 0x0000FFFF + + #define BA_SemaQuery_RESP_PTR 0x0002 + #define B16SemaQuery_RESP_PTR 0x0002 + #define LSb32SemaQuery_RESP_PTR 16 + #define LSb16SemaQuery_RESP_PTR 0 + #define bSemaQuery_RESP_PTR 16 + #define MSK32SemaQuery_RESP_PTR 0xFFFF0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaQuery { + /////////////////////////////////////////////////////////// + #define GET32SemaQuery_RESP_CNT(r32) _BFGET_(r32,15, 0) + #define SET32SemaQuery_RESP_CNT(r32,v) _BFSET_(r32,15, 0,v) + #define GET16SemaQuery_RESP_CNT(r16) _BFGET_(r16,15, 0) + #define SET16SemaQuery_RESP_CNT(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32SemaQuery_RESP_PTR(r32) _BFGET_(r32,31,16) + #define SET32SemaQuery_RESP_PTR(r32,v) _BFSET_(r32,31,16,v) + #define GET16SemaQuery_RESP_PTR(r16) _BFGET_(r16,15, 0) + #define SET16SemaQuery_RESP_PTR(r16,v) _BFSET_(r16,15, 0,v) + + #define w32SemaQuery_RESP {\ + UNSG32 uRESP_CNT : 16;\ + UNSG32 uRESP_PTR : 16;\ + } + union { UNSG32 u32SemaQuery_RESP; + struct w32SemaQuery_RESP; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaQuery; + + typedef union T32SemaQuery_RESP + { UNSG32 u32; + struct w32SemaQuery_RESP; + } T32SemaQuery_RESP; + /////////////////////////////////////////////////////////// + + typedef union TSemaQuery_RESP + { UNSG32 u32[1]; + struct { + struct w32SemaQuery_RESP; + }; + } TSemaQuery_RESP; + + /////////////////////////////////////////////////////////// + SIGN32 SemaQuery_drvrd(SIE_SemaQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaQuery_drvwr(SIE_SemaQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaQuery_reset(SIE_SemaQuery *p); + SIGN32 SemaQuery_cmp (SIE_SemaQuery *p, SIE_SemaQuery *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaQuery_check(p,pie,pfx,hLOG) SemaQuery_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaQuery_print(p, pfx,hLOG) SemaQuery_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaQuery +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaQueryMap (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 ADDR (P) +/// %unsigned 2 byte +/// %unsigned 5 ID +/// ### +/// * Semaphore cell index +/// ### +/// %unsigned 1 master +/// : producer 0x0 +/// : consumer 0x1 +/// ### +/// * Select which counter to read +/// ### +/// %% 24 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 8b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaQueryMap +#define h_SemaQueryMap (){} + + #define RA_SemaQueryMap_ADDR 0x0000 + + #define BA_SemaQueryMap_ADDR_byte 0x0000 + #define B16SemaQueryMap_ADDR_byte 0x0000 + #define LSb32SemaQueryMap_ADDR_byte 0 + #define LSb16SemaQueryMap_ADDR_byte 0 + #define bSemaQueryMap_ADDR_byte 2 + #define MSK32SemaQueryMap_ADDR_byte 0x00000003 + + #define BA_SemaQueryMap_ADDR_ID 0x0000 + #define B16SemaQueryMap_ADDR_ID 0x0000 + #define LSb32SemaQueryMap_ADDR_ID 2 + #define LSb16SemaQueryMap_ADDR_ID 2 + #define bSemaQueryMap_ADDR_ID 5 + #define MSK32SemaQueryMap_ADDR_ID 0x0000007C + + #define BA_SemaQueryMap_ADDR_master 0x0000 + #define B16SemaQueryMap_ADDR_master 0x0000 + #define LSb32SemaQueryMap_ADDR_master 7 + #define LSb16SemaQueryMap_ADDR_master 7 + #define bSemaQueryMap_ADDR_master 1 + #define MSK32SemaQueryMap_ADDR_master 0x00000080 + #define SemaQueryMap_ADDR_master_producer 0x0 + #define SemaQueryMap_ADDR_master_consumer 0x1 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaQueryMap { + /////////////////////////////////////////////////////////// + #define GET32SemaQueryMap_ADDR_byte(r32) _BFGET_(r32, 1, 0) + #define SET32SemaQueryMap_ADDR_byte(r32,v) _BFSET_(r32, 1, 0,v) + #define GET16SemaQueryMap_ADDR_byte(r16) _BFGET_(r16, 1, 0) + #define SET16SemaQueryMap_ADDR_byte(r16,v) _BFSET_(r16, 1, 0,v) + + #define GET32SemaQueryMap_ADDR_ID(r32) _BFGET_(r32, 6, 2) + #define SET32SemaQueryMap_ADDR_ID(r32,v) _BFSET_(r32, 6, 2,v) + #define GET16SemaQueryMap_ADDR_ID(r16) _BFGET_(r16, 6, 2) + #define SET16SemaQueryMap_ADDR_ID(r16,v) _BFSET_(r16, 6, 2,v) + + #define GET32SemaQueryMap_ADDR_master(r32) _BFGET_(r32, 7, 7) + #define SET32SemaQueryMap_ADDR_master(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaQueryMap_ADDR_master(r16) _BFGET_(r16, 7, 7) + #define SET16SemaQueryMap_ADDR_master(r16,v) _BFSET_(r16, 7, 7,v) + + #define w32SemaQueryMap_ADDR {\ + UNSG32 uADDR_byte : 2;\ + UNSG32 uADDR_ID : 5;\ + UNSG32 uADDR_master : 1;\ + UNSG32 RSVDx0_b8 : 24;\ + } + union { UNSG32 u32SemaQueryMap_ADDR; + struct w32SemaQueryMap_ADDR; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaQueryMap; + + typedef union T32SemaQueryMap_ADDR + { UNSG32 u32; + struct w32SemaQueryMap_ADDR; + } T32SemaQueryMap_ADDR; + /////////////////////////////////////////////////////////// + + typedef union TSemaQueryMap_ADDR + { UNSG32 u32[1]; + struct { + struct w32SemaQueryMap_ADDR; + }; + } TSemaQueryMap_ADDR; + + /////////////////////////////////////////////////////////// + SIGN32 SemaQueryMap_drvrd(SIE_SemaQueryMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaQueryMap_drvwr(SIE_SemaQueryMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaQueryMap_reset(SIE_SemaQueryMap *p); + SIGN32 SemaQueryMap_cmp (SIE_SemaQueryMap *p, SIE_SemaQueryMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaQueryMap_check(p,pie,pfx,hLOG) SemaQueryMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaQueryMap_print(p, pfx,hLOG) SemaQueryMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaQueryMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaHub biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 Query (R-) +/// # 0x00000 counter +/// $SemaQuery counter MEM [64] +/// ### +/// * Access address as defined above +/// ### +/// @ 0x00100 ARR (P) +/// # 0x00100 cell +/// $Semaphore cell REG [32] +/// ### +/// * Up-to 32 semaphore cells +/// ### +/// @ 0x00380 PUSH (W-) +/// %unsigned 8 ID +/// %unsigned 8 delta +/// ### +/// * CPU increases PCounter by delta (0 as push 256) +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00384 POP (W-) +/// %unsigned 8 ID +/// %unsigned 8 delta +/// ### +/// * CPU decreases CCounter by delta (0 as pop 256) +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00388 empty (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'empty' status +/// ### +/// @ 0x0038C full (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'full' status +/// ### +/// @ 0x00390 almostEmpty (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'almostEmpty' status +/// ### +/// @ 0x00394 almostFull (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'almostFull' status +/// ### +/// @ 0x00398 (W-) +/// # # Stuffing bytes... +/// %% 832 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 1024B, bits: 1152b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaHub +#define h_SemaHub (){} + + #define RA_SemaHub_Query 0x0000 + #define RA_SemaHub_counter 0x0000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_ARR 0x0100 + #define RA_SemaHub_cell 0x0100 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_PUSH 0x0380 + + #define BA_SemaHub_PUSH_ID 0x0380 + #define B16SemaHub_PUSH_ID 0x0380 + #define LSb32SemaHub_PUSH_ID 0 + #define LSb16SemaHub_PUSH_ID 0 + #define bSemaHub_PUSH_ID 8 + #define MSK32SemaHub_PUSH_ID 0x000000FF + + #define BA_SemaHub_PUSH_delta 0x0381 + #define B16SemaHub_PUSH_delta 0x0380 + #define LSb32SemaHub_PUSH_delta 8 + #define LSb16SemaHub_PUSH_delta 8 + #define bSemaHub_PUSH_delta 8 + #define MSK32SemaHub_PUSH_delta 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_POP 0x0384 + + #define BA_SemaHub_POP_ID 0x0384 + #define B16SemaHub_POP_ID 0x0384 + #define LSb32SemaHub_POP_ID 0 + #define LSb16SemaHub_POP_ID 0 + #define bSemaHub_POP_ID 8 + #define MSK32SemaHub_POP_ID 0x000000FF + + #define BA_SemaHub_POP_delta 0x0385 + #define B16SemaHub_POP_delta 0x0384 + #define LSb32SemaHub_POP_delta 8 + #define LSb16SemaHub_POP_delta 8 + #define bSemaHub_POP_delta 8 + #define MSK32SemaHub_POP_delta 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_empty 0x0388 + + #define BA_SemaHub_empty_ST_0i 0x0388 + #define B16SemaHub_empty_ST_0i 0x0388 + #define LSb32SemaHub_empty_ST_0i 0 + #define LSb16SemaHub_empty_ST_0i 0 + #define bSemaHub_empty_ST_0i 1 + #define MSK32SemaHub_empty_ST_0i 0x00000001 + + #define BA_SemaHub_empty_ST_1i 0x0388 + #define B16SemaHub_empty_ST_1i 0x0388 + #define LSb32SemaHub_empty_ST_1i 1 + #define LSb16SemaHub_empty_ST_1i 1 + #define bSemaHub_empty_ST_1i 1 + #define MSK32SemaHub_empty_ST_1i 0x00000002 + + #define BA_SemaHub_empty_ST_2i 0x0388 + #define B16SemaHub_empty_ST_2i 0x0388 + #define LSb32SemaHub_empty_ST_2i 2 + #define LSb16SemaHub_empty_ST_2i 2 + #define bSemaHub_empty_ST_2i 1 + #define MSK32SemaHub_empty_ST_2i 0x00000004 + + #define BA_SemaHub_empty_ST_3i 0x0388 + #define B16SemaHub_empty_ST_3i 0x0388 + #define LSb32SemaHub_empty_ST_3i 3 + #define LSb16SemaHub_empty_ST_3i 3 + #define bSemaHub_empty_ST_3i 1 + #define MSK32SemaHub_empty_ST_3i 0x00000008 + + #define BA_SemaHub_empty_ST_4i 0x0388 + #define B16SemaHub_empty_ST_4i 0x0388 + #define LSb32SemaHub_empty_ST_4i 4 + #define LSb16SemaHub_empty_ST_4i 4 + #define bSemaHub_empty_ST_4i 1 + #define MSK32SemaHub_empty_ST_4i 0x00000010 + + #define BA_SemaHub_empty_ST_5i 0x0388 + #define B16SemaHub_empty_ST_5i 0x0388 + #define LSb32SemaHub_empty_ST_5i 5 + #define LSb16SemaHub_empty_ST_5i 5 + #define bSemaHub_empty_ST_5i 1 + #define MSK32SemaHub_empty_ST_5i 0x00000020 + + #define BA_SemaHub_empty_ST_6i 0x0388 + #define B16SemaHub_empty_ST_6i 0x0388 + #define LSb32SemaHub_empty_ST_6i 6 + #define LSb16SemaHub_empty_ST_6i 6 + #define bSemaHub_empty_ST_6i 1 + #define MSK32SemaHub_empty_ST_6i 0x00000040 + + #define BA_SemaHub_empty_ST_7i 0x0388 + #define B16SemaHub_empty_ST_7i 0x0388 + #define LSb32SemaHub_empty_ST_7i 7 + #define LSb16SemaHub_empty_ST_7i 7 + #define bSemaHub_empty_ST_7i 1 + #define MSK32SemaHub_empty_ST_7i 0x00000080 + + #define BA_SemaHub_empty_ST_8i 0x0389 + #define B16SemaHub_empty_ST_8i 0x0388 + #define LSb32SemaHub_empty_ST_8i 8 + #define LSb16SemaHub_empty_ST_8i 8 + #define bSemaHub_empty_ST_8i 1 + #define MSK32SemaHub_empty_ST_8i 0x00000100 + + #define BA_SemaHub_empty_ST_9i 0x0389 + #define B16SemaHub_empty_ST_9i 0x0388 + #define LSb32SemaHub_empty_ST_9i 9 + #define LSb16SemaHub_empty_ST_9i 9 + #define bSemaHub_empty_ST_9i 1 + #define MSK32SemaHub_empty_ST_9i 0x00000200 + + #define BA_SemaHub_empty_ST_10i 0x0389 + #define B16SemaHub_empty_ST_10i 0x0388 + #define LSb32SemaHub_empty_ST_10i 10 + #define LSb16SemaHub_empty_ST_10i 10 + #define bSemaHub_empty_ST_10i 1 + #define MSK32SemaHub_empty_ST_10i 0x00000400 + + #define BA_SemaHub_empty_ST_11i 0x0389 + #define B16SemaHub_empty_ST_11i 0x0388 + #define LSb32SemaHub_empty_ST_11i 11 + #define LSb16SemaHub_empty_ST_11i 11 + #define bSemaHub_empty_ST_11i 1 + #define MSK32SemaHub_empty_ST_11i 0x00000800 + + #define BA_SemaHub_empty_ST_12i 0x0389 + #define B16SemaHub_empty_ST_12i 0x0388 + #define LSb32SemaHub_empty_ST_12i 12 + #define LSb16SemaHub_empty_ST_12i 12 + #define bSemaHub_empty_ST_12i 1 + #define MSK32SemaHub_empty_ST_12i 0x00001000 + + #define BA_SemaHub_empty_ST_13i 0x0389 + #define B16SemaHub_empty_ST_13i 0x0388 + #define LSb32SemaHub_empty_ST_13i 13 + #define LSb16SemaHub_empty_ST_13i 13 + #define bSemaHub_empty_ST_13i 1 + #define MSK32SemaHub_empty_ST_13i 0x00002000 + + #define BA_SemaHub_empty_ST_14i 0x0389 + #define B16SemaHub_empty_ST_14i 0x0388 + #define LSb32SemaHub_empty_ST_14i 14 + #define LSb16SemaHub_empty_ST_14i 14 + #define bSemaHub_empty_ST_14i 1 + #define MSK32SemaHub_empty_ST_14i 0x00004000 + + #define BA_SemaHub_empty_ST_15i 0x0389 + #define B16SemaHub_empty_ST_15i 0x0388 + #define LSb32SemaHub_empty_ST_15i 15 + #define LSb16SemaHub_empty_ST_15i 15 + #define bSemaHub_empty_ST_15i 1 + #define MSK32SemaHub_empty_ST_15i 0x00008000 + + #define BA_SemaHub_empty_ST_16i 0x038A + #define B16SemaHub_empty_ST_16i 0x038A + #define LSb32SemaHub_empty_ST_16i 16 + #define LSb16SemaHub_empty_ST_16i 0 + #define bSemaHub_empty_ST_16i 1 + #define MSK32SemaHub_empty_ST_16i 0x00010000 + + #define BA_SemaHub_empty_ST_17i 0x038A + #define B16SemaHub_empty_ST_17i 0x038A + #define LSb32SemaHub_empty_ST_17i 17 + #define LSb16SemaHub_empty_ST_17i 1 + #define bSemaHub_empty_ST_17i 1 + #define MSK32SemaHub_empty_ST_17i 0x00020000 + + #define BA_SemaHub_empty_ST_18i 0x038A + #define B16SemaHub_empty_ST_18i 0x038A + #define LSb32SemaHub_empty_ST_18i 18 + #define LSb16SemaHub_empty_ST_18i 2 + #define bSemaHub_empty_ST_18i 1 + #define MSK32SemaHub_empty_ST_18i 0x00040000 + + #define BA_SemaHub_empty_ST_19i 0x038A + #define B16SemaHub_empty_ST_19i 0x038A + #define LSb32SemaHub_empty_ST_19i 19 + #define LSb16SemaHub_empty_ST_19i 3 + #define bSemaHub_empty_ST_19i 1 + #define MSK32SemaHub_empty_ST_19i 0x00080000 + + #define BA_SemaHub_empty_ST_20i 0x038A + #define B16SemaHub_empty_ST_20i 0x038A + #define LSb32SemaHub_empty_ST_20i 20 + #define LSb16SemaHub_empty_ST_20i 4 + #define bSemaHub_empty_ST_20i 1 + #define MSK32SemaHub_empty_ST_20i 0x00100000 + + #define BA_SemaHub_empty_ST_21i 0x038A + #define B16SemaHub_empty_ST_21i 0x038A + #define LSb32SemaHub_empty_ST_21i 21 + #define LSb16SemaHub_empty_ST_21i 5 + #define bSemaHub_empty_ST_21i 1 + #define MSK32SemaHub_empty_ST_21i 0x00200000 + + #define BA_SemaHub_empty_ST_22i 0x038A + #define B16SemaHub_empty_ST_22i 0x038A + #define LSb32SemaHub_empty_ST_22i 22 + #define LSb16SemaHub_empty_ST_22i 6 + #define bSemaHub_empty_ST_22i 1 + #define MSK32SemaHub_empty_ST_22i 0x00400000 + + #define BA_SemaHub_empty_ST_23i 0x038A + #define B16SemaHub_empty_ST_23i 0x038A + #define LSb32SemaHub_empty_ST_23i 23 + #define LSb16SemaHub_empty_ST_23i 7 + #define bSemaHub_empty_ST_23i 1 + #define MSK32SemaHub_empty_ST_23i 0x00800000 + + #define BA_SemaHub_empty_ST_24i 0x038B + #define B16SemaHub_empty_ST_24i 0x038A + #define LSb32SemaHub_empty_ST_24i 24 + #define LSb16SemaHub_empty_ST_24i 8 + #define bSemaHub_empty_ST_24i 1 + #define MSK32SemaHub_empty_ST_24i 0x01000000 + + #define BA_SemaHub_empty_ST_25i 0x038B + #define B16SemaHub_empty_ST_25i 0x038A + #define LSb32SemaHub_empty_ST_25i 25 + #define LSb16SemaHub_empty_ST_25i 9 + #define bSemaHub_empty_ST_25i 1 + #define MSK32SemaHub_empty_ST_25i 0x02000000 + + #define BA_SemaHub_empty_ST_26i 0x038B + #define B16SemaHub_empty_ST_26i 0x038A + #define LSb32SemaHub_empty_ST_26i 26 + #define LSb16SemaHub_empty_ST_26i 10 + #define bSemaHub_empty_ST_26i 1 + #define MSK32SemaHub_empty_ST_26i 0x04000000 + + #define BA_SemaHub_empty_ST_27i 0x038B + #define B16SemaHub_empty_ST_27i 0x038A + #define LSb32SemaHub_empty_ST_27i 27 + #define LSb16SemaHub_empty_ST_27i 11 + #define bSemaHub_empty_ST_27i 1 + #define MSK32SemaHub_empty_ST_27i 0x08000000 + + #define BA_SemaHub_empty_ST_28i 0x038B + #define B16SemaHub_empty_ST_28i 0x038A + #define LSb32SemaHub_empty_ST_28i 28 + #define LSb16SemaHub_empty_ST_28i 12 + #define bSemaHub_empty_ST_28i 1 + #define MSK32SemaHub_empty_ST_28i 0x10000000 + + #define BA_SemaHub_empty_ST_29i 0x038B + #define B16SemaHub_empty_ST_29i 0x038A + #define LSb32SemaHub_empty_ST_29i 29 + #define LSb16SemaHub_empty_ST_29i 13 + #define bSemaHub_empty_ST_29i 1 + #define MSK32SemaHub_empty_ST_29i 0x20000000 + + #define BA_SemaHub_empty_ST_30i 0x038B + #define B16SemaHub_empty_ST_30i 0x038A + #define LSb32SemaHub_empty_ST_30i 30 + #define LSb16SemaHub_empty_ST_30i 14 + #define bSemaHub_empty_ST_30i 1 + #define MSK32SemaHub_empty_ST_30i 0x40000000 + + #define BA_SemaHub_empty_ST_31i 0x038B + #define B16SemaHub_empty_ST_31i 0x038A + #define LSb32SemaHub_empty_ST_31i 31 + #define LSb16SemaHub_empty_ST_31i 15 + #define bSemaHub_empty_ST_31i 1 + #define MSK32SemaHub_empty_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_full 0x038C + + #define BA_SemaHub_full_ST_0i 0x038C + #define B16SemaHub_full_ST_0i 0x038C + #define LSb32SemaHub_full_ST_0i 0 + #define LSb16SemaHub_full_ST_0i 0 + #define bSemaHub_full_ST_0i 1 + #define MSK32SemaHub_full_ST_0i 0x00000001 + + #define BA_SemaHub_full_ST_1i 0x038C + #define B16SemaHub_full_ST_1i 0x038C + #define LSb32SemaHub_full_ST_1i 1 + #define LSb16SemaHub_full_ST_1i 1 + #define bSemaHub_full_ST_1i 1 + #define MSK32SemaHub_full_ST_1i 0x00000002 + + #define BA_SemaHub_full_ST_2i 0x038C + #define B16SemaHub_full_ST_2i 0x038C + #define LSb32SemaHub_full_ST_2i 2 + #define LSb16SemaHub_full_ST_2i 2 + #define bSemaHub_full_ST_2i 1 + #define MSK32SemaHub_full_ST_2i 0x00000004 + + #define BA_SemaHub_full_ST_3i 0x038C + #define B16SemaHub_full_ST_3i 0x038C + #define LSb32SemaHub_full_ST_3i 3 + #define LSb16SemaHub_full_ST_3i 3 + #define bSemaHub_full_ST_3i 1 + #define MSK32SemaHub_full_ST_3i 0x00000008 + + #define BA_SemaHub_full_ST_4i 0x038C + #define B16SemaHub_full_ST_4i 0x038C + #define LSb32SemaHub_full_ST_4i 4 + #define LSb16SemaHub_full_ST_4i 4 + #define bSemaHub_full_ST_4i 1 + #define MSK32SemaHub_full_ST_4i 0x00000010 + + #define BA_SemaHub_full_ST_5i 0x038C + #define B16SemaHub_full_ST_5i 0x038C + #define LSb32SemaHub_full_ST_5i 5 + #define LSb16SemaHub_full_ST_5i 5 + #define bSemaHub_full_ST_5i 1 + #define MSK32SemaHub_full_ST_5i 0x00000020 + + #define BA_SemaHub_full_ST_6i 0x038C + #define B16SemaHub_full_ST_6i 0x038C + #define LSb32SemaHub_full_ST_6i 6 + #define LSb16SemaHub_full_ST_6i 6 + #define bSemaHub_full_ST_6i 1 + #define MSK32SemaHub_full_ST_6i 0x00000040 + + #define BA_SemaHub_full_ST_7i 0x038C + #define B16SemaHub_full_ST_7i 0x038C + #define LSb32SemaHub_full_ST_7i 7 + #define LSb16SemaHub_full_ST_7i 7 + #define bSemaHub_full_ST_7i 1 + #define MSK32SemaHub_full_ST_7i 0x00000080 + + #define BA_SemaHub_full_ST_8i 0x038D + #define B16SemaHub_full_ST_8i 0x038C + #define LSb32SemaHub_full_ST_8i 8 + #define LSb16SemaHub_full_ST_8i 8 + #define bSemaHub_full_ST_8i 1 + #define MSK32SemaHub_full_ST_8i 0x00000100 + + #define BA_SemaHub_full_ST_9i 0x038D + #define B16SemaHub_full_ST_9i 0x038C + #define LSb32SemaHub_full_ST_9i 9 + #define LSb16SemaHub_full_ST_9i 9 + #define bSemaHub_full_ST_9i 1 + #define MSK32SemaHub_full_ST_9i 0x00000200 + + #define BA_SemaHub_full_ST_10i 0x038D + #define B16SemaHub_full_ST_10i 0x038C + #define LSb32SemaHub_full_ST_10i 10 + #define LSb16SemaHub_full_ST_10i 10 + #define bSemaHub_full_ST_10i 1 + #define MSK32SemaHub_full_ST_10i 0x00000400 + + #define BA_SemaHub_full_ST_11i 0x038D + #define B16SemaHub_full_ST_11i 0x038C + #define LSb32SemaHub_full_ST_11i 11 + #define LSb16SemaHub_full_ST_11i 11 + #define bSemaHub_full_ST_11i 1 + #define MSK32SemaHub_full_ST_11i 0x00000800 + + #define BA_SemaHub_full_ST_12i 0x038D + #define B16SemaHub_full_ST_12i 0x038C + #define LSb32SemaHub_full_ST_12i 12 + #define LSb16SemaHub_full_ST_12i 12 + #define bSemaHub_full_ST_12i 1 + #define MSK32SemaHub_full_ST_12i 0x00001000 + + #define BA_SemaHub_full_ST_13i 0x038D + #define B16SemaHub_full_ST_13i 0x038C + #define LSb32SemaHub_full_ST_13i 13 + #define LSb16SemaHub_full_ST_13i 13 + #define bSemaHub_full_ST_13i 1 + #define MSK32SemaHub_full_ST_13i 0x00002000 + + #define BA_SemaHub_full_ST_14i 0x038D + #define B16SemaHub_full_ST_14i 0x038C + #define LSb32SemaHub_full_ST_14i 14 + #define LSb16SemaHub_full_ST_14i 14 + #define bSemaHub_full_ST_14i 1 + #define MSK32SemaHub_full_ST_14i 0x00004000 + + #define BA_SemaHub_full_ST_15i 0x038D + #define B16SemaHub_full_ST_15i 0x038C + #define LSb32SemaHub_full_ST_15i 15 + #define LSb16SemaHub_full_ST_15i 15 + #define bSemaHub_full_ST_15i 1 + #define MSK32SemaHub_full_ST_15i 0x00008000 + + #define BA_SemaHub_full_ST_16i 0x038E + #define B16SemaHub_full_ST_16i 0x038E + #define LSb32SemaHub_full_ST_16i 16 + #define LSb16SemaHub_full_ST_16i 0 + #define bSemaHub_full_ST_16i 1 + #define MSK32SemaHub_full_ST_16i 0x00010000 + + #define BA_SemaHub_full_ST_17i 0x038E + #define B16SemaHub_full_ST_17i 0x038E + #define LSb32SemaHub_full_ST_17i 17 + #define LSb16SemaHub_full_ST_17i 1 + #define bSemaHub_full_ST_17i 1 + #define MSK32SemaHub_full_ST_17i 0x00020000 + + #define BA_SemaHub_full_ST_18i 0x038E + #define B16SemaHub_full_ST_18i 0x038E + #define LSb32SemaHub_full_ST_18i 18 + #define LSb16SemaHub_full_ST_18i 2 + #define bSemaHub_full_ST_18i 1 + #define MSK32SemaHub_full_ST_18i 0x00040000 + + #define BA_SemaHub_full_ST_19i 0x038E + #define B16SemaHub_full_ST_19i 0x038E + #define LSb32SemaHub_full_ST_19i 19 + #define LSb16SemaHub_full_ST_19i 3 + #define bSemaHub_full_ST_19i 1 + #define MSK32SemaHub_full_ST_19i 0x00080000 + + #define BA_SemaHub_full_ST_20i 0x038E + #define B16SemaHub_full_ST_20i 0x038E + #define LSb32SemaHub_full_ST_20i 20 + #define LSb16SemaHub_full_ST_20i 4 + #define bSemaHub_full_ST_20i 1 + #define MSK32SemaHub_full_ST_20i 0x00100000 + + #define BA_SemaHub_full_ST_21i 0x038E + #define B16SemaHub_full_ST_21i 0x038E + #define LSb32SemaHub_full_ST_21i 21 + #define LSb16SemaHub_full_ST_21i 5 + #define bSemaHub_full_ST_21i 1 + #define MSK32SemaHub_full_ST_21i 0x00200000 + + #define BA_SemaHub_full_ST_22i 0x038E + #define B16SemaHub_full_ST_22i 0x038E + #define LSb32SemaHub_full_ST_22i 22 + #define LSb16SemaHub_full_ST_22i 6 + #define bSemaHub_full_ST_22i 1 + #define MSK32SemaHub_full_ST_22i 0x00400000 + + #define BA_SemaHub_full_ST_23i 0x038E + #define B16SemaHub_full_ST_23i 0x038E + #define LSb32SemaHub_full_ST_23i 23 + #define LSb16SemaHub_full_ST_23i 7 + #define bSemaHub_full_ST_23i 1 + #define MSK32SemaHub_full_ST_23i 0x00800000 + + #define BA_SemaHub_full_ST_24i 0x038F + #define B16SemaHub_full_ST_24i 0x038E + #define LSb32SemaHub_full_ST_24i 24 + #define LSb16SemaHub_full_ST_24i 8 + #define bSemaHub_full_ST_24i 1 + #define MSK32SemaHub_full_ST_24i 0x01000000 + + #define BA_SemaHub_full_ST_25i 0x038F + #define B16SemaHub_full_ST_25i 0x038E + #define LSb32SemaHub_full_ST_25i 25 + #define LSb16SemaHub_full_ST_25i 9 + #define bSemaHub_full_ST_25i 1 + #define MSK32SemaHub_full_ST_25i 0x02000000 + + #define BA_SemaHub_full_ST_26i 0x038F + #define B16SemaHub_full_ST_26i 0x038E + #define LSb32SemaHub_full_ST_26i 26 + #define LSb16SemaHub_full_ST_26i 10 + #define bSemaHub_full_ST_26i 1 + #define MSK32SemaHub_full_ST_26i 0x04000000 + + #define BA_SemaHub_full_ST_27i 0x038F + #define B16SemaHub_full_ST_27i 0x038E + #define LSb32SemaHub_full_ST_27i 27 + #define LSb16SemaHub_full_ST_27i 11 + #define bSemaHub_full_ST_27i 1 + #define MSK32SemaHub_full_ST_27i 0x08000000 + + #define BA_SemaHub_full_ST_28i 0x038F + #define B16SemaHub_full_ST_28i 0x038E + #define LSb32SemaHub_full_ST_28i 28 + #define LSb16SemaHub_full_ST_28i 12 + #define bSemaHub_full_ST_28i 1 + #define MSK32SemaHub_full_ST_28i 0x10000000 + + #define BA_SemaHub_full_ST_29i 0x038F + #define B16SemaHub_full_ST_29i 0x038E + #define LSb32SemaHub_full_ST_29i 29 + #define LSb16SemaHub_full_ST_29i 13 + #define bSemaHub_full_ST_29i 1 + #define MSK32SemaHub_full_ST_29i 0x20000000 + + #define BA_SemaHub_full_ST_30i 0x038F + #define B16SemaHub_full_ST_30i 0x038E + #define LSb32SemaHub_full_ST_30i 30 + #define LSb16SemaHub_full_ST_30i 14 + #define bSemaHub_full_ST_30i 1 + #define MSK32SemaHub_full_ST_30i 0x40000000 + + #define BA_SemaHub_full_ST_31i 0x038F + #define B16SemaHub_full_ST_31i 0x038E + #define LSb32SemaHub_full_ST_31i 31 + #define LSb16SemaHub_full_ST_31i 15 + #define bSemaHub_full_ST_31i 1 + #define MSK32SemaHub_full_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_almostEmpty 0x0390 + + #define BA_SemaHub_almostEmpty_ST_0i 0x0390 + #define B16SemaHub_almostEmpty_ST_0i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_0i 0 + #define LSb16SemaHub_almostEmpty_ST_0i 0 + #define bSemaHub_almostEmpty_ST_0i 1 + #define MSK32SemaHub_almostEmpty_ST_0i 0x00000001 + + #define BA_SemaHub_almostEmpty_ST_1i 0x0390 + #define B16SemaHub_almostEmpty_ST_1i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_1i 1 + #define LSb16SemaHub_almostEmpty_ST_1i 1 + #define bSemaHub_almostEmpty_ST_1i 1 + #define MSK32SemaHub_almostEmpty_ST_1i 0x00000002 + + #define BA_SemaHub_almostEmpty_ST_2i 0x0390 + #define B16SemaHub_almostEmpty_ST_2i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_2i 2 + #define LSb16SemaHub_almostEmpty_ST_2i 2 + #define bSemaHub_almostEmpty_ST_2i 1 + #define MSK32SemaHub_almostEmpty_ST_2i 0x00000004 + + #define BA_SemaHub_almostEmpty_ST_3i 0x0390 + #define B16SemaHub_almostEmpty_ST_3i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_3i 3 + #define LSb16SemaHub_almostEmpty_ST_3i 3 + #define bSemaHub_almostEmpty_ST_3i 1 + #define MSK32SemaHub_almostEmpty_ST_3i 0x00000008 + + #define BA_SemaHub_almostEmpty_ST_4i 0x0390 + #define B16SemaHub_almostEmpty_ST_4i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_4i 4 + #define LSb16SemaHub_almostEmpty_ST_4i 4 + #define bSemaHub_almostEmpty_ST_4i 1 + #define MSK32SemaHub_almostEmpty_ST_4i 0x00000010 + + #define BA_SemaHub_almostEmpty_ST_5i 0x0390 + #define B16SemaHub_almostEmpty_ST_5i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_5i 5 + #define LSb16SemaHub_almostEmpty_ST_5i 5 + #define bSemaHub_almostEmpty_ST_5i 1 + #define MSK32SemaHub_almostEmpty_ST_5i 0x00000020 + + #define BA_SemaHub_almostEmpty_ST_6i 0x0390 + #define B16SemaHub_almostEmpty_ST_6i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_6i 6 + #define LSb16SemaHub_almostEmpty_ST_6i 6 + #define bSemaHub_almostEmpty_ST_6i 1 + #define MSK32SemaHub_almostEmpty_ST_6i 0x00000040 + + #define BA_SemaHub_almostEmpty_ST_7i 0x0390 + #define B16SemaHub_almostEmpty_ST_7i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_7i 7 + #define LSb16SemaHub_almostEmpty_ST_7i 7 + #define bSemaHub_almostEmpty_ST_7i 1 + #define MSK32SemaHub_almostEmpty_ST_7i 0x00000080 + + #define BA_SemaHub_almostEmpty_ST_8i 0x0391 + #define B16SemaHub_almostEmpty_ST_8i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_8i 8 + #define LSb16SemaHub_almostEmpty_ST_8i 8 + #define bSemaHub_almostEmpty_ST_8i 1 + #define MSK32SemaHub_almostEmpty_ST_8i 0x00000100 + + #define BA_SemaHub_almostEmpty_ST_9i 0x0391 + #define B16SemaHub_almostEmpty_ST_9i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_9i 9 + #define LSb16SemaHub_almostEmpty_ST_9i 9 + #define bSemaHub_almostEmpty_ST_9i 1 + #define MSK32SemaHub_almostEmpty_ST_9i 0x00000200 + + #define BA_SemaHub_almostEmpty_ST_10i 0x0391 + #define B16SemaHub_almostEmpty_ST_10i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_10i 10 + #define LSb16SemaHub_almostEmpty_ST_10i 10 + #define bSemaHub_almostEmpty_ST_10i 1 + #define MSK32SemaHub_almostEmpty_ST_10i 0x00000400 + + #define BA_SemaHub_almostEmpty_ST_11i 0x0391 + #define B16SemaHub_almostEmpty_ST_11i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_11i 11 + #define LSb16SemaHub_almostEmpty_ST_11i 11 + #define bSemaHub_almostEmpty_ST_11i 1 + #define MSK32SemaHub_almostEmpty_ST_11i 0x00000800 + + #define BA_SemaHub_almostEmpty_ST_12i 0x0391 + #define B16SemaHub_almostEmpty_ST_12i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_12i 12 + #define LSb16SemaHub_almostEmpty_ST_12i 12 + #define bSemaHub_almostEmpty_ST_12i 1 + #define MSK32SemaHub_almostEmpty_ST_12i 0x00001000 + + #define BA_SemaHub_almostEmpty_ST_13i 0x0391 + #define B16SemaHub_almostEmpty_ST_13i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_13i 13 + #define LSb16SemaHub_almostEmpty_ST_13i 13 + #define bSemaHub_almostEmpty_ST_13i 1 + #define MSK32SemaHub_almostEmpty_ST_13i 0x00002000 + + #define BA_SemaHub_almostEmpty_ST_14i 0x0391 + #define B16SemaHub_almostEmpty_ST_14i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_14i 14 + #define LSb16SemaHub_almostEmpty_ST_14i 14 + #define bSemaHub_almostEmpty_ST_14i 1 + #define MSK32SemaHub_almostEmpty_ST_14i 0x00004000 + + #define BA_SemaHub_almostEmpty_ST_15i 0x0391 + #define B16SemaHub_almostEmpty_ST_15i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_15i 15 + #define LSb16SemaHub_almostEmpty_ST_15i 15 + #define bSemaHub_almostEmpty_ST_15i 1 + #define MSK32SemaHub_almostEmpty_ST_15i 0x00008000 + + #define BA_SemaHub_almostEmpty_ST_16i 0x0392 + #define B16SemaHub_almostEmpty_ST_16i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_16i 16 + #define LSb16SemaHub_almostEmpty_ST_16i 0 + #define bSemaHub_almostEmpty_ST_16i 1 + #define MSK32SemaHub_almostEmpty_ST_16i 0x00010000 + + #define BA_SemaHub_almostEmpty_ST_17i 0x0392 + #define B16SemaHub_almostEmpty_ST_17i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_17i 17 + #define LSb16SemaHub_almostEmpty_ST_17i 1 + #define bSemaHub_almostEmpty_ST_17i 1 + #define MSK32SemaHub_almostEmpty_ST_17i 0x00020000 + + #define BA_SemaHub_almostEmpty_ST_18i 0x0392 + #define B16SemaHub_almostEmpty_ST_18i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_18i 18 + #define LSb16SemaHub_almostEmpty_ST_18i 2 + #define bSemaHub_almostEmpty_ST_18i 1 + #define MSK32SemaHub_almostEmpty_ST_18i 0x00040000 + + #define BA_SemaHub_almostEmpty_ST_19i 0x0392 + #define B16SemaHub_almostEmpty_ST_19i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_19i 19 + #define LSb16SemaHub_almostEmpty_ST_19i 3 + #define bSemaHub_almostEmpty_ST_19i 1 + #define MSK32SemaHub_almostEmpty_ST_19i 0x00080000 + + #define BA_SemaHub_almostEmpty_ST_20i 0x0392 + #define B16SemaHub_almostEmpty_ST_20i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_20i 20 + #define LSb16SemaHub_almostEmpty_ST_20i 4 + #define bSemaHub_almostEmpty_ST_20i 1 + #define MSK32SemaHub_almostEmpty_ST_20i 0x00100000 + + #define BA_SemaHub_almostEmpty_ST_21i 0x0392 + #define B16SemaHub_almostEmpty_ST_21i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_21i 21 + #define LSb16SemaHub_almostEmpty_ST_21i 5 + #define bSemaHub_almostEmpty_ST_21i 1 + #define MSK32SemaHub_almostEmpty_ST_21i 0x00200000 + + #define BA_SemaHub_almostEmpty_ST_22i 0x0392 + #define B16SemaHub_almostEmpty_ST_22i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_22i 22 + #define LSb16SemaHub_almostEmpty_ST_22i 6 + #define bSemaHub_almostEmpty_ST_22i 1 + #define MSK32SemaHub_almostEmpty_ST_22i 0x00400000 + + #define BA_SemaHub_almostEmpty_ST_23i 0x0392 + #define B16SemaHub_almostEmpty_ST_23i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_23i 23 + #define LSb16SemaHub_almostEmpty_ST_23i 7 + #define bSemaHub_almostEmpty_ST_23i 1 + #define MSK32SemaHub_almostEmpty_ST_23i 0x00800000 + + #define BA_SemaHub_almostEmpty_ST_24i 0x0393 + #define B16SemaHub_almostEmpty_ST_24i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_24i 24 + #define LSb16SemaHub_almostEmpty_ST_24i 8 + #define bSemaHub_almostEmpty_ST_24i 1 + #define MSK32SemaHub_almostEmpty_ST_24i 0x01000000 + + #define BA_SemaHub_almostEmpty_ST_25i 0x0393 + #define B16SemaHub_almostEmpty_ST_25i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_25i 25 + #define LSb16SemaHub_almostEmpty_ST_25i 9 + #define bSemaHub_almostEmpty_ST_25i 1 + #define MSK32SemaHub_almostEmpty_ST_25i 0x02000000 + + #define BA_SemaHub_almostEmpty_ST_26i 0x0393 + #define B16SemaHub_almostEmpty_ST_26i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_26i 26 + #define LSb16SemaHub_almostEmpty_ST_26i 10 + #define bSemaHub_almostEmpty_ST_26i 1 + #define MSK32SemaHub_almostEmpty_ST_26i 0x04000000 + + #define BA_SemaHub_almostEmpty_ST_27i 0x0393 + #define B16SemaHub_almostEmpty_ST_27i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_27i 27 + #define LSb16SemaHub_almostEmpty_ST_27i 11 + #define bSemaHub_almostEmpty_ST_27i 1 + #define MSK32SemaHub_almostEmpty_ST_27i 0x08000000 + + #define BA_SemaHub_almostEmpty_ST_28i 0x0393 + #define B16SemaHub_almostEmpty_ST_28i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_28i 28 + #define LSb16SemaHub_almostEmpty_ST_28i 12 + #define bSemaHub_almostEmpty_ST_28i 1 + #define MSK32SemaHub_almostEmpty_ST_28i 0x10000000 + + #define BA_SemaHub_almostEmpty_ST_29i 0x0393 + #define B16SemaHub_almostEmpty_ST_29i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_29i 29 + #define LSb16SemaHub_almostEmpty_ST_29i 13 + #define bSemaHub_almostEmpty_ST_29i 1 + #define MSK32SemaHub_almostEmpty_ST_29i 0x20000000 + + #define BA_SemaHub_almostEmpty_ST_30i 0x0393 + #define B16SemaHub_almostEmpty_ST_30i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_30i 30 + #define LSb16SemaHub_almostEmpty_ST_30i 14 + #define bSemaHub_almostEmpty_ST_30i 1 + #define MSK32SemaHub_almostEmpty_ST_30i 0x40000000 + + #define BA_SemaHub_almostEmpty_ST_31i 0x0393 + #define B16SemaHub_almostEmpty_ST_31i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_31i 31 + #define LSb16SemaHub_almostEmpty_ST_31i 15 + #define bSemaHub_almostEmpty_ST_31i 1 + #define MSK32SemaHub_almostEmpty_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_almostFull 0x0394 + + #define BA_SemaHub_almostFull_ST_0i 0x0394 + #define B16SemaHub_almostFull_ST_0i 0x0394 + #define LSb32SemaHub_almostFull_ST_0i 0 + #define LSb16SemaHub_almostFull_ST_0i 0 + #define bSemaHub_almostFull_ST_0i 1 + #define MSK32SemaHub_almostFull_ST_0i 0x00000001 + + #define BA_SemaHub_almostFull_ST_1i 0x0394 + #define B16SemaHub_almostFull_ST_1i 0x0394 + #define LSb32SemaHub_almostFull_ST_1i 1 + #define LSb16SemaHub_almostFull_ST_1i 1 + #define bSemaHub_almostFull_ST_1i 1 + #define MSK32SemaHub_almostFull_ST_1i 0x00000002 + + #define BA_SemaHub_almostFull_ST_2i 0x0394 + #define B16SemaHub_almostFull_ST_2i 0x0394 + #define LSb32SemaHub_almostFull_ST_2i 2 + #define LSb16SemaHub_almostFull_ST_2i 2 + #define bSemaHub_almostFull_ST_2i 1 + #define MSK32SemaHub_almostFull_ST_2i 0x00000004 + + #define BA_SemaHub_almostFull_ST_3i 0x0394 + #define B16SemaHub_almostFull_ST_3i 0x0394 + #define LSb32SemaHub_almostFull_ST_3i 3 + #define LSb16SemaHub_almostFull_ST_3i 3 + #define bSemaHub_almostFull_ST_3i 1 + #define MSK32SemaHub_almostFull_ST_3i 0x00000008 + + #define BA_SemaHub_almostFull_ST_4i 0x0394 + #define B16SemaHub_almostFull_ST_4i 0x0394 + #define LSb32SemaHub_almostFull_ST_4i 4 + #define LSb16SemaHub_almostFull_ST_4i 4 + #define bSemaHub_almostFull_ST_4i 1 + #define MSK32SemaHub_almostFull_ST_4i 0x00000010 + + #define BA_SemaHub_almostFull_ST_5i 0x0394 + #define B16SemaHub_almostFull_ST_5i 0x0394 + #define LSb32SemaHub_almostFull_ST_5i 5 + #define LSb16SemaHub_almostFull_ST_5i 5 + #define bSemaHub_almostFull_ST_5i 1 + #define MSK32SemaHub_almostFull_ST_5i 0x00000020 + + #define BA_SemaHub_almostFull_ST_6i 0x0394 + #define B16SemaHub_almostFull_ST_6i 0x0394 + #define LSb32SemaHub_almostFull_ST_6i 6 + #define LSb16SemaHub_almostFull_ST_6i 6 + #define bSemaHub_almostFull_ST_6i 1 + #define MSK32SemaHub_almostFull_ST_6i 0x00000040 + + #define BA_SemaHub_almostFull_ST_7i 0x0394 + #define B16SemaHub_almostFull_ST_7i 0x0394 + #define LSb32SemaHub_almostFull_ST_7i 7 + #define LSb16SemaHub_almostFull_ST_7i 7 + #define bSemaHub_almostFull_ST_7i 1 + #define MSK32SemaHub_almostFull_ST_7i 0x00000080 + + #define BA_SemaHub_almostFull_ST_8i 0x0395 + #define B16SemaHub_almostFull_ST_8i 0x0394 + #define LSb32SemaHub_almostFull_ST_8i 8 + #define LSb16SemaHub_almostFull_ST_8i 8 + #define bSemaHub_almostFull_ST_8i 1 + #define MSK32SemaHub_almostFull_ST_8i 0x00000100 + + #define BA_SemaHub_almostFull_ST_9i 0x0395 + #define B16SemaHub_almostFull_ST_9i 0x0394 + #define LSb32SemaHub_almostFull_ST_9i 9 + #define LSb16SemaHub_almostFull_ST_9i 9 + #define bSemaHub_almostFull_ST_9i 1 + #define MSK32SemaHub_almostFull_ST_9i 0x00000200 + + #define BA_SemaHub_almostFull_ST_10i 0x0395 + #define B16SemaHub_almostFull_ST_10i 0x0394 + #define LSb32SemaHub_almostFull_ST_10i 10 + #define LSb16SemaHub_almostFull_ST_10i 10 + #define bSemaHub_almostFull_ST_10i 1 + #define MSK32SemaHub_almostFull_ST_10i 0x00000400 + + #define BA_SemaHub_almostFull_ST_11i 0x0395 + #define B16SemaHub_almostFull_ST_11i 0x0394 + #define LSb32SemaHub_almostFull_ST_11i 11 + #define LSb16SemaHub_almostFull_ST_11i 11 + #define bSemaHub_almostFull_ST_11i 1 + #define MSK32SemaHub_almostFull_ST_11i 0x00000800 + + #define BA_SemaHub_almostFull_ST_12i 0x0395 + #define B16SemaHub_almostFull_ST_12i 0x0394 + #define LSb32SemaHub_almostFull_ST_12i 12 + #define LSb16SemaHub_almostFull_ST_12i 12 + #define bSemaHub_almostFull_ST_12i 1 + #define MSK32SemaHub_almostFull_ST_12i 0x00001000 + + #define BA_SemaHub_almostFull_ST_13i 0x0395 + #define B16SemaHub_almostFull_ST_13i 0x0394 + #define LSb32SemaHub_almostFull_ST_13i 13 + #define LSb16SemaHub_almostFull_ST_13i 13 + #define bSemaHub_almostFull_ST_13i 1 + #define MSK32SemaHub_almostFull_ST_13i 0x00002000 + + #define BA_SemaHub_almostFull_ST_14i 0x0395 + #define B16SemaHub_almostFull_ST_14i 0x0394 + #define LSb32SemaHub_almostFull_ST_14i 14 + #define LSb16SemaHub_almostFull_ST_14i 14 + #define bSemaHub_almostFull_ST_14i 1 + #define MSK32SemaHub_almostFull_ST_14i 0x00004000 + + #define BA_SemaHub_almostFull_ST_15i 0x0395 + #define B16SemaHub_almostFull_ST_15i 0x0394 + #define LSb32SemaHub_almostFull_ST_15i 15 + #define LSb16SemaHub_almostFull_ST_15i 15 + #define bSemaHub_almostFull_ST_15i 1 + #define MSK32SemaHub_almostFull_ST_15i 0x00008000 + + #define BA_SemaHub_almostFull_ST_16i 0x0396 + #define B16SemaHub_almostFull_ST_16i 0x0396 + #define LSb32SemaHub_almostFull_ST_16i 16 + #define LSb16SemaHub_almostFull_ST_16i 0 + #define bSemaHub_almostFull_ST_16i 1 + #define MSK32SemaHub_almostFull_ST_16i 0x00010000 + + #define BA_SemaHub_almostFull_ST_17i 0x0396 + #define B16SemaHub_almostFull_ST_17i 0x0396 + #define LSb32SemaHub_almostFull_ST_17i 17 + #define LSb16SemaHub_almostFull_ST_17i 1 + #define bSemaHub_almostFull_ST_17i 1 + #define MSK32SemaHub_almostFull_ST_17i 0x00020000 + + #define BA_SemaHub_almostFull_ST_18i 0x0396 + #define B16SemaHub_almostFull_ST_18i 0x0396 + #define LSb32SemaHub_almostFull_ST_18i 18 + #define LSb16SemaHub_almostFull_ST_18i 2 + #define bSemaHub_almostFull_ST_18i 1 + #define MSK32SemaHub_almostFull_ST_18i 0x00040000 + + #define BA_SemaHub_almostFull_ST_19i 0x0396 + #define B16SemaHub_almostFull_ST_19i 0x0396 + #define LSb32SemaHub_almostFull_ST_19i 19 + #define LSb16SemaHub_almostFull_ST_19i 3 + #define bSemaHub_almostFull_ST_19i 1 + #define MSK32SemaHub_almostFull_ST_19i 0x00080000 + + #define BA_SemaHub_almostFull_ST_20i 0x0396 + #define B16SemaHub_almostFull_ST_20i 0x0396 + #define LSb32SemaHub_almostFull_ST_20i 20 + #define LSb16SemaHub_almostFull_ST_20i 4 + #define bSemaHub_almostFull_ST_20i 1 + #define MSK32SemaHub_almostFull_ST_20i 0x00100000 + + #define BA_SemaHub_almostFull_ST_21i 0x0396 + #define B16SemaHub_almostFull_ST_21i 0x0396 + #define LSb32SemaHub_almostFull_ST_21i 21 + #define LSb16SemaHub_almostFull_ST_21i 5 + #define bSemaHub_almostFull_ST_21i 1 + #define MSK32SemaHub_almostFull_ST_21i 0x00200000 + + #define BA_SemaHub_almostFull_ST_22i 0x0396 + #define B16SemaHub_almostFull_ST_22i 0x0396 + #define LSb32SemaHub_almostFull_ST_22i 22 + #define LSb16SemaHub_almostFull_ST_22i 6 + #define bSemaHub_almostFull_ST_22i 1 + #define MSK32SemaHub_almostFull_ST_22i 0x00400000 + + #define BA_SemaHub_almostFull_ST_23i 0x0396 + #define B16SemaHub_almostFull_ST_23i 0x0396 + #define LSb32SemaHub_almostFull_ST_23i 23 + #define LSb16SemaHub_almostFull_ST_23i 7 + #define bSemaHub_almostFull_ST_23i 1 + #define MSK32SemaHub_almostFull_ST_23i 0x00800000 + + #define BA_SemaHub_almostFull_ST_24i 0x0397 + #define B16SemaHub_almostFull_ST_24i 0x0396 + #define LSb32SemaHub_almostFull_ST_24i 24 + #define LSb16SemaHub_almostFull_ST_24i 8 + #define bSemaHub_almostFull_ST_24i 1 + #define MSK32SemaHub_almostFull_ST_24i 0x01000000 + + #define BA_SemaHub_almostFull_ST_25i 0x0397 + #define B16SemaHub_almostFull_ST_25i 0x0396 + #define LSb32SemaHub_almostFull_ST_25i 25 + #define LSb16SemaHub_almostFull_ST_25i 9 + #define bSemaHub_almostFull_ST_25i 1 + #define MSK32SemaHub_almostFull_ST_25i 0x02000000 + + #define BA_SemaHub_almostFull_ST_26i 0x0397 + #define B16SemaHub_almostFull_ST_26i 0x0396 + #define LSb32SemaHub_almostFull_ST_26i 26 + #define LSb16SemaHub_almostFull_ST_26i 10 + #define bSemaHub_almostFull_ST_26i 1 + #define MSK32SemaHub_almostFull_ST_26i 0x04000000 + + #define BA_SemaHub_almostFull_ST_27i 0x0397 + #define B16SemaHub_almostFull_ST_27i 0x0396 + #define LSb32SemaHub_almostFull_ST_27i 27 + #define LSb16SemaHub_almostFull_ST_27i 11 + #define bSemaHub_almostFull_ST_27i 1 + #define MSK32SemaHub_almostFull_ST_27i 0x08000000 + + #define BA_SemaHub_almostFull_ST_28i 0x0397 + #define B16SemaHub_almostFull_ST_28i 0x0396 + #define LSb32SemaHub_almostFull_ST_28i 28 + #define LSb16SemaHub_almostFull_ST_28i 12 + #define bSemaHub_almostFull_ST_28i 1 + #define MSK32SemaHub_almostFull_ST_28i 0x10000000 + + #define BA_SemaHub_almostFull_ST_29i 0x0397 + #define B16SemaHub_almostFull_ST_29i 0x0396 + #define LSb32SemaHub_almostFull_ST_29i 29 + #define LSb16SemaHub_almostFull_ST_29i 13 + #define bSemaHub_almostFull_ST_29i 1 + #define MSK32SemaHub_almostFull_ST_29i 0x20000000 + + #define BA_SemaHub_almostFull_ST_30i 0x0397 + #define B16SemaHub_almostFull_ST_30i 0x0396 + #define LSb32SemaHub_almostFull_ST_30i 30 + #define LSb16SemaHub_almostFull_ST_30i 14 + #define bSemaHub_almostFull_ST_30i 1 + #define MSK32SemaHub_almostFull_ST_30i 0x40000000 + + #define BA_SemaHub_almostFull_ST_31i 0x0397 + #define B16SemaHub_almostFull_ST_31i 0x0396 + #define LSb32SemaHub_almostFull_ST_31i 31 + #define LSb16SemaHub_almostFull_ST_31i 15 + #define bSemaHub_almostFull_ST_31i 1 + #define MSK32SemaHub_almostFull_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaHub { + /////////////////////////////////////////////////////////// + SIE_SemaQuery ie_counter[64]; + /////////////////////////////////////////////////////////// + SIE_Semaphore ie_cell[32]; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_PUSH_ID(r32) _BFGET_(r32, 7, 0) + #define SET32SemaHub_PUSH_ID(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16SemaHub_PUSH_ID(r16) _BFGET_(r16, 7, 0) + #define SET16SemaHub_PUSH_ID(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32SemaHub_PUSH_delta(r32) _BFGET_(r32,15, 8) + #define SET32SemaHub_PUSH_delta(r32,v) _BFSET_(r32,15, 8,v) + #define GET16SemaHub_PUSH_delta(r16) _BFGET_(r16,15, 8) + #define SET16SemaHub_PUSH_delta(r16,v) _BFSET_(r16,15, 8,v) + + #define w32SemaHub_PUSH {\ + UNSG32 uPUSH_ID : 8;\ + UNSG32 uPUSH_delta : 8;\ + UNSG32 RSVDx380_b16 : 16;\ + } + union { UNSG32 u32SemaHub_PUSH; + struct w32SemaHub_PUSH; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_POP_ID(r32) _BFGET_(r32, 7, 0) + #define SET32SemaHub_POP_ID(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16SemaHub_POP_ID(r16) _BFGET_(r16, 7, 0) + #define SET16SemaHub_POP_ID(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32SemaHub_POP_delta(r32) _BFGET_(r32,15, 8) + #define SET32SemaHub_POP_delta(r32,v) _BFSET_(r32,15, 8,v) + #define GET16SemaHub_POP_delta(r16) _BFGET_(r16,15, 8) + #define SET16SemaHub_POP_delta(r16,v) _BFSET_(r16,15, 8,v) + + #define w32SemaHub_POP {\ + UNSG32 uPOP_ID : 8;\ + UNSG32 uPOP_delta : 8;\ + UNSG32 RSVDx384_b16 : 16;\ + } + union { UNSG32 u32SemaHub_POP; + struct w32SemaHub_POP; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_empty_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_empty_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_empty_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_empty_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_empty_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_empty_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_empty_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_empty_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_empty_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_empty_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_empty_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_empty_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_empty_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_empty_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_empty_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_empty_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_empty_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_empty_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_empty_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_empty_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_empty_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_empty_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_empty_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_empty_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_empty_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_empty_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_empty_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_empty_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_empty_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_empty_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_empty_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_empty_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_empty_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_empty_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_empty_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_empty_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_empty_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_empty_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_empty_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_empty_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_empty_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_empty_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_empty_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_empty_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_empty_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_empty_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_empty_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_empty_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_empty_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_empty_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_empty_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_empty_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_empty_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_empty_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_empty_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_empty_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_empty_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_empty_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_empty_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_empty_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_empty_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_empty_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_empty_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_empty_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_empty_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_empty_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_empty_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_empty_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_empty_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_empty_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_empty_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_empty_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_empty_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_empty_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_empty_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_empty_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_empty_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_empty_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_empty_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_empty_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_empty_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_empty_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_empty_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_empty_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_empty_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_empty_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_empty_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_empty_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_empty_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_empty_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_empty_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_empty_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_empty_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_empty_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_empty_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_empty_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_empty_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_empty_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_empty_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_empty_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_empty_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_empty_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_empty_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_empty_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_empty_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_empty_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_empty_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_empty_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_empty_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_empty_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_empty_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_empty_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_empty_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_empty_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_empty_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_empty_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_empty_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_empty_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_empty_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_empty_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_empty_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_empty_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_empty_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_empty_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_empty_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_empty_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_empty_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_empty_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_empty {\ + UNSG32 uempty_ST_0i : 1;\ + UNSG32 uempty_ST_1i : 1;\ + UNSG32 uempty_ST_2i : 1;\ + UNSG32 uempty_ST_3i : 1;\ + UNSG32 uempty_ST_4i : 1;\ + UNSG32 uempty_ST_5i : 1;\ + UNSG32 uempty_ST_6i : 1;\ + UNSG32 uempty_ST_7i : 1;\ + UNSG32 uempty_ST_8i : 1;\ + UNSG32 uempty_ST_9i : 1;\ + UNSG32 uempty_ST_10i : 1;\ + UNSG32 uempty_ST_11i : 1;\ + UNSG32 uempty_ST_12i : 1;\ + UNSG32 uempty_ST_13i : 1;\ + UNSG32 uempty_ST_14i : 1;\ + UNSG32 uempty_ST_15i : 1;\ + UNSG32 uempty_ST_16i : 1;\ + UNSG32 uempty_ST_17i : 1;\ + UNSG32 uempty_ST_18i : 1;\ + UNSG32 uempty_ST_19i : 1;\ + UNSG32 uempty_ST_20i : 1;\ + UNSG32 uempty_ST_21i : 1;\ + UNSG32 uempty_ST_22i : 1;\ + UNSG32 uempty_ST_23i : 1;\ + UNSG32 uempty_ST_24i : 1;\ + UNSG32 uempty_ST_25i : 1;\ + UNSG32 uempty_ST_26i : 1;\ + UNSG32 uempty_ST_27i : 1;\ + UNSG32 uempty_ST_28i : 1;\ + UNSG32 uempty_ST_29i : 1;\ + UNSG32 uempty_ST_30i : 1;\ + UNSG32 uempty_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_empty; + struct w32SemaHub_empty; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_full_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_full_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_full_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_full_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_full_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_full_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_full_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_full_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_full_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_full_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_full_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_full_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_full_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_full_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_full_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_full_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_full_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_full_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_full_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_full_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_full_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_full_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_full_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_full_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_full_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_full_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_full_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_full_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_full_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_full_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_full_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_full_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_full_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_full_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_full_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_full_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_full_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_full_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_full_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_full_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_full_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_full_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_full_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_full_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_full_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_full_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_full_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_full_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_full_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_full_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_full_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_full_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_full_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_full_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_full_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_full_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_full_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_full_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_full_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_full_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_full_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_full_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_full_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_full_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_full_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_full_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_full_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_full_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_full_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_full_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_full_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_full_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_full_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_full_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_full_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_full_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_full_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_full_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_full_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_full_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_full_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_full_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_full_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_full_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_full_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_full_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_full_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_full_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_full_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_full_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_full_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_full_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_full_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_full_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_full_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_full_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_full_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_full_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_full_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_full_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_full_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_full_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_full_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_full_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_full_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_full_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_full_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_full_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_full_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_full_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_full_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_full_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_full_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_full_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_full_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_full_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_full_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_full_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_full_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_full_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_full_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_full_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_full_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_full_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_full_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_full_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_full_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_full_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_full {\ + UNSG32 ufull_ST_0i : 1;\ + UNSG32 ufull_ST_1i : 1;\ + UNSG32 ufull_ST_2i : 1;\ + UNSG32 ufull_ST_3i : 1;\ + UNSG32 ufull_ST_4i : 1;\ + UNSG32 ufull_ST_5i : 1;\ + UNSG32 ufull_ST_6i : 1;\ + UNSG32 ufull_ST_7i : 1;\ + UNSG32 ufull_ST_8i : 1;\ + UNSG32 ufull_ST_9i : 1;\ + UNSG32 ufull_ST_10i : 1;\ + UNSG32 ufull_ST_11i : 1;\ + UNSG32 ufull_ST_12i : 1;\ + UNSG32 ufull_ST_13i : 1;\ + UNSG32 ufull_ST_14i : 1;\ + UNSG32 ufull_ST_15i : 1;\ + UNSG32 ufull_ST_16i : 1;\ + UNSG32 ufull_ST_17i : 1;\ + UNSG32 ufull_ST_18i : 1;\ + UNSG32 ufull_ST_19i : 1;\ + UNSG32 ufull_ST_20i : 1;\ + UNSG32 ufull_ST_21i : 1;\ + UNSG32 ufull_ST_22i : 1;\ + UNSG32 ufull_ST_23i : 1;\ + UNSG32 ufull_ST_24i : 1;\ + UNSG32 ufull_ST_25i : 1;\ + UNSG32 ufull_ST_26i : 1;\ + UNSG32 ufull_ST_27i : 1;\ + UNSG32 ufull_ST_28i : 1;\ + UNSG32 ufull_ST_29i : 1;\ + UNSG32 ufull_ST_30i : 1;\ + UNSG32 ufull_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_full; + struct w32SemaHub_full; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_almostEmpty_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_almostEmpty_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_almostEmpty_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostEmpty_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostEmpty_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_almostEmpty_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_almostEmpty_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostEmpty_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostEmpty_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_almostEmpty_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_almostEmpty_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostEmpty_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostEmpty_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_almostEmpty_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_almostEmpty_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostEmpty_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostEmpty_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_almostEmpty_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_almostEmpty_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostEmpty_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostEmpty_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_almostEmpty_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_almostEmpty_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostEmpty_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostEmpty_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_almostEmpty_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_almostEmpty_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostEmpty_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostEmpty_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_almostEmpty_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_almostEmpty_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostEmpty_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostEmpty_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_almostEmpty_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_almostEmpty_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostEmpty_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostEmpty_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_almostEmpty_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_almostEmpty_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostEmpty_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostEmpty_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_almostEmpty_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_almostEmpty_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostEmpty_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostEmpty_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_almostEmpty_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_almostEmpty_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostEmpty_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostEmpty_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_almostEmpty_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_almostEmpty_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostEmpty_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostEmpty_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_almostEmpty_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_almostEmpty_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostEmpty_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostEmpty_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_almostEmpty_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_almostEmpty_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostEmpty_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostEmpty_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_almostEmpty_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_almostEmpty_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostEmpty_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_almostEmpty_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_almostEmpty_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_almostEmpty_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostEmpty_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostEmpty_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_almostEmpty_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_almostEmpty_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostEmpty_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostEmpty_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_almostEmpty_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_almostEmpty_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostEmpty_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostEmpty_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_almostEmpty_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_almostEmpty_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostEmpty_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostEmpty_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_almostEmpty_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_almostEmpty_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostEmpty_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostEmpty_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_almostEmpty_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_almostEmpty_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostEmpty_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostEmpty_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_almostEmpty_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_almostEmpty_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostEmpty_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostEmpty_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_almostEmpty_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_almostEmpty_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostEmpty_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostEmpty_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_almostEmpty_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_almostEmpty_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostEmpty_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostEmpty_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_almostEmpty_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_almostEmpty_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostEmpty_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostEmpty_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_almostEmpty_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_almostEmpty_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostEmpty_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostEmpty_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_almostEmpty_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_almostEmpty_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostEmpty_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostEmpty_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_almostEmpty_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_almostEmpty_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostEmpty_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostEmpty_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_almostEmpty_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_almostEmpty_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostEmpty_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostEmpty_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_almostEmpty_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_almostEmpty_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostEmpty_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostEmpty_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_almostEmpty_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_almostEmpty_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostEmpty_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_almostEmpty {\ + UNSG32 ualmostEmpty_ST_0i : 1;\ + UNSG32 ualmostEmpty_ST_1i : 1;\ + UNSG32 ualmostEmpty_ST_2i : 1;\ + UNSG32 ualmostEmpty_ST_3i : 1;\ + UNSG32 ualmostEmpty_ST_4i : 1;\ + UNSG32 ualmostEmpty_ST_5i : 1;\ + UNSG32 ualmostEmpty_ST_6i : 1;\ + UNSG32 ualmostEmpty_ST_7i : 1;\ + UNSG32 ualmostEmpty_ST_8i : 1;\ + UNSG32 ualmostEmpty_ST_9i : 1;\ + UNSG32 ualmostEmpty_ST_10i : 1;\ + UNSG32 ualmostEmpty_ST_11i : 1;\ + UNSG32 ualmostEmpty_ST_12i : 1;\ + UNSG32 ualmostEmpty_ST_13i : 1;\ + UNSG32 ualmostEmpty_ST_14i : 1;\ + UNSG32 ualmostEmpty_ST_15i : 1;\ + UNSG32 ualmostEmpty_ST_16i : 1;\ + UNSG32 ualmostEmpty_ST_17i : 1;\ + UNSG32 ualmostEmpty_ST_18i : 1;\ + UNSG32 ualmostEmpty_ST_19i : 1;\ + UNSG32 ualmostEmpty_ST_20i : 1;\ + UNSG32 ualmostEmpty_ST_21i : 1;\ + UNSG32 ualmostEmpty_ST_22i : 1;\ + UNSG32 ualmostEmpty_ST_23i : 1;\ + UNSG32 ualmostEmpty_ST_24i : 1;\ + UNSG32 ualmostEmpty_ST_25i : 1;\ + UNSG32 ualmostEmpty_ST_26i : 1;\ + UNSG32 ualmostEmpty_ST_27i : 1;\ + UNSG32 ualmostEmpty_ST_28i : 1;\ + UNSG32 ualmostEmpty_ST_29i : 1;\ + UNSG32 ualmostEmpty_ST_30i : 1;\ + UNSG32 ualmostEmpty_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_almostEmpty; + struct w32SemaHub_almostEmpty; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_almostFull_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_almostFull_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_almostFull_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostFull_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostFull_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_almostFull_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_almostFull_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostFull_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostFull_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_almostFull_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_almostFull_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostFull_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostFull_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_almostFull_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_almostFull_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostFull_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostFull_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_almostFull_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_almostFull_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostFull_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostFull_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_almostFull_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_almostFull_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostFull_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostFull_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_almostFull_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_almostFull_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostFull_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostFull_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_almostFull_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_almostFull_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostFull_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostFull_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_almostFull_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_almostFull_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostFull_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostFull_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_almostFull_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_almostFull_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostFull_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostFull_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_almostFull_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_almostFull_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostFull_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostFull_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_almostFull_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_almostFull_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostFull_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostFull_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_almostFull_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_almostFull_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostFull_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostFull_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_almostFull_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_almostFull_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostFull_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostFull_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_almostFull_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_almostFull_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostFull_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostFull_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_almostFull_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_almostFull_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostFull_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_almostFull_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_almostFull_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_almostFull_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostFull_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostFull_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_almostFull_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_almostFull_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostFull_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostFull_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_almostFull_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_almostFull_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostFull_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostFull_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_almostFull_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_almostFull_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostFull_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostFull_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_almostFull_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_almostFull_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostFull_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostFull_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_almostFull_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_almostFull_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostFull_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostFull_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_almostFull_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_almostFull_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostFull_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostFull_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_almostFull_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_almostFull_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostFull_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostFull_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_almostFull_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_almostFull_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostFull_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostFull_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_almostFull_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_almostFull_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostFull_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostFull_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_almostFull_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_almostFull_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostFull_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostFull_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_almostFull_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_almostFull_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostFull_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostFull_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_almostFull_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_almostFull_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostFull_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostFull_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_almostFull_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_almostFull_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostFull_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostFull_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_almostFull_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_almostFull_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostFull_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostFull_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_almostFull_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_almostFull_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostFull_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_almostFull {\ + UNSG32 ualmostFull_ST_0i : 1;\ + UNSG32 ualmostFull_ST_1i : 1;\ + UNSG32 ualmostFull_ST_2i : 1;\ + UNSG32 ualmostFull_ST_3i : 1;\ + UNSG32 ualmostFull_ST_4i : 1;\ + UNSG32 ualmostFull_ST_5i : 1;\ + UNSG32 ualmostFull_ST_6i : 1;\ + UNSG32 ualmostFull_ST_7i : 1;\ + UNSG32 ualmostFull_ST_8i : 1;\ + UNSG32 ualmostFull_ST_9i : 1;\ + UNSG32 ualmostFull_ST_10i : 1;\ + UNSG32 ualmostFull_ST_11i : 1;\ + UNSG32 ualmostFull_ST_12i : 1;\ + UNSG32 ualmostFull_ST_13i : 1;\ + UNSG32 ualmostFull_ST_14i : 1;\ + UNSG32 ualmostFull_ST_15i : 1;\ + UNSG32 ualmostFull_ST_16i : 1;\ + UNSG32 ualmostFull_ST_17i : 1;\ + UNSG32 ualmostFull_ST_18i : 1;\ + UNSG32 ualmostFull_ST_19i : 1;\ + UNSG32 ualmostFull_ST_20i : 1;\ + UNSG32 ualmostFull_ST_21i : 1;\ + UNSG32 ualmostFull_ST_22i : 1;\ + UNSG32 ualmostFull_ST_23i : 1;\ + UNSG32 ualmostFull_ST_24i : 1;\ + UNSG32 ualmostFull_ST_25i : 1;\ + UNSG32 ualmostFull_ST_26i : 1;\ + UNSG32 ualmostFull_ST_27i : 1;\ + UNSG32 ualmostFull_ST_28i : 1;\ + UNSG32 ualmostFull_ST_29i : 1;\ + UNSG32 ualmostFull_ST_30i : 1;\ + UNSG32 ualmostFull_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_almostFull; + struct w32SemaHub_almostFull; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx398 [104]; + /////////////////////////////////////////////////////////// + } SIE_SemaHub; + + typedef union T32SemaHub_PUSH + { UNSG32 u32; + struct w32SemaHub_PUSH; + } T32SemaHub_PUSH; + typedef union T32SemaHub_POP + { UNSG32 u32; + struct w32SemaHub_POP; + } T32SemaHub_POP; + typedef union T32SemaHub_empty + { UNSG32 u32; + struct w32SemaHub_empty; + } T32SemaHub_empty; + typedef union T32SemaHub_full + { UNSG32 u32; + struct w32SemaHub_full; + } T32SemaHub_full; + typedef union T32SemaHub_almostEmpty + { UNSG32 u32; + struct w32SemaHub_almostEmpty; + } T32SemaHub_almostEmpty; + typedef union T32SemaHub_almostFull + { UNSG32 u32; + struct w32SemaHub_almostFull; + } T32SemaHub_almostFull; + /////////////////////////////////////////////////////////// + + typedef union TSemaHub_PUSH + { UNSG32 u32[1]; + struct { + struct w32SemaHub_PUSH; + }; + } TSemaHub_PUSH; + typedef union TSemaHub_POP + { UNSG32 u32[1]; + struct { + struct w32SemaHub_POP; + }; + } TSemaHub_POP; + typedef union TSemaHub_empty + { UNSG32 u32[1]; + struct { + struct w32SemaHub_empty; + }; + } TSemaHub_empty; + typedef union TSemaHub_full + { UNSG32 u32[1]; + struct { + struct w32SemaHub_full; + }; + } TSemaHub_full; + typedef union TSemaHub_almostEmpty + { UNSG32 u32[1]; + struct { + struct w32SemaHub_almostEmpty; + }; + } TSemaHub_almostEmpty; + typedef union TSemaHub_almostFull + { UNSG32 u32[1]; + struct { + struct w32SemaHub_almostFull; + }; + } TSemaHub_almostFull; + + /////////////////////////////////////////////////////////// + SIGN32 SemaHub_drvrd(SIE_SemaHub *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaHub_drvwr(SIE_SemaHub *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaHub_reset(SIE_SemaHub *p); + SIGN32 SemaHub_cmp (SIE_SemaHub *p, SIE_SemaHub *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaHub_check(p,pie,pfx,hLOG) SemaHub_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaHub_print(p, pfx,hLOG) SemaHub_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaHub +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE FiFo biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 20 BASE +/// ### +/// * Base address (byte-address) of a FIFO in the shared SRAM. A channel's read/write pointers will be added to this “BASE†to get exact location of shared SRAM. +/// * Note: aligned with base SRAM data bus. +/// * For example, if SRAM data is 64-bit, then base[2:0] should be 3'b0; +/// ### +/// %% 12 # Stuffing bits... +/// @ 0x00004 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to this register will enable this channel, or 0 to this register will disable this channel. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to clear FIFO pointers to 0. +/// * Note : +/// * CPU should make sure to disabled the channel (write 0 to START_EN register) before issue clear command, otherwise the clear request will be ignored. +/// * Do not restart the channel when clear operation is in process. +/// * HW will make sure there is no pending transactions before execute the clear operation. +/// * Associated semaphore cell needs reset separately by re-write “CFG_DEPTH†+/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C FLUSH (W-) +/// %unsigned 1 EN +/// ### +/// * No support for now +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 23b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_FiFo +#define h_FiFo (){} + + #define RA_FiFo_CFG 0x0000 + + #define BA_FiFo_CFG_BASE 0x0000 + #define B16FiFo_CFG_BASE 0x0000 + #define LSb32FiFo_CFG_BASE 0 + #define LSb16FiFo_CFG_BASE 0 + #define bFiFo_CFG_BASE 20 + #define MSK32FiFo_CFG_BASE 0x000FFFFF + /////////////////////////////////////////////////////////// + #define RA_FiFo_START 0x0004 + + #define BA_FiFo_START_EN 0x0004 + #define B16FiFo_START_EN 0x0004 + #define LSb32FiFo_START_EN 0 + #define LSb16FiFo_START_EN 0 + #define bFiFo_START_EN 1 + #define MSK32FiFo_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_FiFo_CLEAR 0x0008 + + #define BA_FiFo_CLEAR_EN 0x0008 + #define B16FiFo_CLEAR_EN 0x0008 + #define LSb32FiFo_CLEAR_EN 0 + #define LSb16FiFo_CLEAR_EN 0 + #define bFiFo_CLEAR_EN 1 + #define MSK32FiFo_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_FiFo_FLUSH 0x000C + + #define BA_FiFo_FLUSH_EN 0x000C + #define B16FiFo_FLUSH_EN 0x000C + #define LSb32FiFo_FLUSH_EN 0 + #define LSb16FiFo_FLUSH_EN 0 + #define bFiFo_FLUSH_EN 1 + #define MSK32FiFo_FLUSH_EN 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_FiFo { + /////////////////////////////////////////////////////////// + #define GET32FiFo_CFG_BASE(r32) _BFGET_(r32,19, 0) + #define SET32FiFo_CFG_BASE(r32,v) _BFSET_(r32,19, 0,v) + + #define w32FiFo_CFG {\ + UNSG32 uCFG_BASE : 20;\ + UNSG32 RSVDx0_b20 : 12;\ + } + union { UNSG32 u32FiFo_CFG; + struct w32FiFo_CFG; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } + union { UNSG32 u32FiFo_START; + struct w32FiFo_START; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32FiFo_CLEAR; + struct w32FiFo_CLEAR; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_FLUSH_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_FLUSH_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_FLUSH_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_FLUSH_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_FLUSH {\ + UNSG32 uFLUSH_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32FiFo_FLUSH; + struct w32FiFo_FLUSH; + }; + /////////////////////////////////////////////////////////// + } SIE_FiFo; + + typedef union T32FiFo_CFG + { UNSG32 u32; + struct w32FiFo_CFG; + } T32FiFo_CFG; + typedef union T32FiFo_START + { UNSG32 u32; + struct w32FiFo_START; + } T32FiFo_START; + typedef union T32FiFo_CLEAR + { UNSG32 u32; + struct w32FiFo_CLEAR; + } T32FiFo_CLEAR; + typedef union T32FiFo_FLUSH + { UNSG32 u32; + struct w32FiFo_FLUSH; + } T32FiFo_FLUSH; + /////////////////////////////////////////////////////////// + + typedef union TFiFo_CFG + { UNSG32 u32[1]; + struct { + struct w32FiFo_CFG; + }; + } TFiFo_CFG; + typedef union TFiFo_START + { UNSG32 u32[1]; + struct { + struct w32FiFo_START; + }; + } TFiFo_START; + typedef union TFiFo_CLEAR + { UNSG32 u32[1]; + struct { + struct w32FiFo_CLEAR; + }; + } TFiFo_CLEAR; + typedef union TFiFo_FLUSH + { UNSG32 u32[1]; + struct { + struct w32FiFo_FLUSH; + }; + } TFiFo_FLUSH; + + /////////////////////////////////////////////////////////// + SIGN32 FiFo_drvrd(SIE_FiFo *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 FiFo_drvwr(SIE_FiFo *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void FiFo_reset(SIE_FiFo *p); + SIGN32 FiFo_cmp (SIE_FiFo *p, SIE_FiFo *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define FiFo_check(p,pie,pfx,hLOG) FiFo_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define FiFo_print(p, pfx,hLOG) FiFo_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: FiFo +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE HBO biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 FiFoCtl +/// $SemaHub FiFoCtl REG +/// @ 0x00400 ARR (P) +/// # 0x00400 FiFo +/// $FiFo FiFo REG [32] +/// ### +/// * Up-to 32 FIFO channels +/// * FiFo[N] is controlled by HBO.FiFoCtl.Channel[N] +/// ### +/// @ 0x00600 BUSY (R-) +/// %unsigned 32 ST +/// ### +/// * Per channel status +/// * Indicate the clear operation status. +/// * 1: clear is in process. +/// * 0 : clear is done. +/// ### +/// @ 0x00604 (W-) +/// # # Stuffing bytes... +/// %% 2016 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 1792B, bits: 1920b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_HBO +#define h_HBO (){} + + #define RA_HBO_FiFoCtl 0x0000 + /////////////////////////////////////////////////////////// + #define RA_HBO_ARR 0x0400 + #define RA_HBO_FiFo 0x0400 + /////////////////////////////////////////////////////////// + #define RA_HBO_BUSY 0x0600 + + #define BA_HBO_BUSY_ST 0x0600 + #define B16HBO_BUSY_ST 0x0600 + #define LSb32HBO_BUSY_ST 0 + #define LSb16HBO_BUSY_ST 0 + #define bHBO_BUSY_ST 32 + #define MSK32HBO_BUSY_ST 0xFFFFFFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_HBO { + /////////////////////////////////////////////////////////// + SIE_SemaHub ie_FiFoCtl; + /////////////////////////////////////////////////////////// + SIE_FiFo ie_FiFo[32]; + /////////////////////////////////////////////////////////// + #define GET32HBO_BUSY_ST(r32) _BFGET_(r32,31, 0) + #define SET32HBO_BUSY_ST(r32,v) _BFSET_(r32,31, 0,v) + + #define w32HBO_BUSY {\ + UNSG32 uBUSY_ST : 32;\ + } + union { UNSG32 u32HBO_BUSY; + struct w32HBO_BUSY; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx604 [252]; + /////////////////////////////////////////////////////////// + } SIE_HBO; + + typedef union T32HBO_BUSY + { UNSG32 u32; + struct w32HBO_BUSY; + } T32HBO_BUSY; + /////////////////////////////////////////////////////////// + + typedef union THBO_BUSY + { UNSG32 u32[1]; + struct { + struct w32HBO_BUSY; + }; + } THBO_BUSY; + + /////////////////////////////////////////////////////////// + SIGN32 HBO_drvrd(SIE_HBO *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 HBO_drvwr(SIE_HBO *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void HBO_reset(SIE_HBO *p); + SIGN32 HBO_cmp (SIE_HBO *p, SIE_HBO *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define HBO_check(p,pie,pfx,hLOG) HBO_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define HBO_print(p, pfx,hLOG) HBO_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: HBO +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE LLDesFmt biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 mem (P) +/// %unsigned 16 size +/// ### +/// * The size of one piece of scattered memory. +/// ### +/// %% 16 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 16b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_LLDesFmt +#define h_LLDesFmt (){} + + #define RA_LLDesFmt_mem 0x0000 + + #define BA_LLDesFmt_mem_size 0x0000 + #define B16LLDesFmt_mem_size 0x0000 + #define LSb32LLDesFmt_mem_size 0 + #define LSb16LLDesFmt_mem_size 0 + #define bLLDesFmt_mem_size 16 + #define MSK32LLDesFmt_mem_size 0x0000FFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_LLDesFmt { + /////////////////////////////////////////////////////////// + #define GET32LLDesFmt_mem_size(r32) _BFGET_(r32,15, 0) + #define SET32LLDesFmt_mem_size(r32,v) _BFSET_(r32,15, 0,v) + #define GET16LLDesFmt_mem_size(r16) _BFGET_(r16,15, 0) + #define SET16LLDesFmt_mem_size(r16,v) _BFSET_(r16,15, 0,v) + + #define w32LLDesFmt_mem {\ + UNSG32 umem_size : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32LLDesFmt_mem; + struct w32LLDesFmt_mem; + }; + /////////////////////////////////////////////////////////// + } SIE_LLDesFmt; + + typedef union T32LLDesFmt_mem + { UNSG32 u32; + struct w32LLDesFmt_mem; + } T32LLDesFmt_mem; + /////////////////////////////////////////////////////////// + + typedef union TLLDesFmt_mem + { UNSG32 u32[1]; + struct { + struct w32LLDesFmt_mem; + }; + } TLLDesFmt_mem; + + /////////////////////////////////////////////////////////// + SIGN32 LLDesFmt_drvrd(SIE_LLDesFmt *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 LLDesFmt_drvwr(SIE_LLDesFmt *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void LLDesFmt_reset(SIE_LLDesFmt *p); + SIGN32 LLDesFmt_cmp (SIE_LLDesFmt *p, SIE_LLDesFmt *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define LLDesFmt_check(p,pie,pfx,hLOG) LLDesFmt_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define LLDesFmt_print(p, pfx,hLOG) LLDesFmt_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: LLDesFmt +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmdHDR (4,4) +/// ### +/// * 32-bit dHub command header +/// * [0:31] +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 DESC (W-) +/// %unsigned 16 size +/// ### +/// * amount of data to be transferred, in bytes or MTU. +/// * Size of 0 is forbidden. +/// ### +/// %unsigned 1 sizeMTU +/// ### +/// * 0: size given in bytes; +/// * 1: size given in MTU (see dHubChCtl.CFG.MTU for MTU size definition) +/// ### +/// %unsigned 1 semOpMTU +/// ### +/// * 0: semaphore operations applied on dHubCmd level +/// * 1: semaphore operations applied on MTU level +/// ### +/// %unsigned 5 chkSemId +/// ### +/// * ID of semaphore to check before cmd / MTU; +/// * 0 indicates semaphore check is disabled +/// ### +/// %unsigned 5 updSemId +/// ### +/// * ID of semaphore to update after cmd / MTU; +/// * 0 indicates semaphore update is disabled +/// ### +/// %unsigned 1 interrupt +/// ### +/// * 1: raise interrupt upon command finish +/// * end dHubCmdHDR +/// ### +/// %% 3 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 29b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmdHDR +#define h_dHubCmdHDR (){} + + #define RA_dHubCmdHDR_DESC 0x0000 + + #define BA_dHubCmdHDR_DESC_size 0x0000 + #define B16dHubCmdHDR_DESC_size 0x0000 + #define LSb32dHubCmdHDR_DESC_size 0 + #define LSb16dHubCmdHDR_DESC_size 0 + #define bdHubCmdHDR_DESC_size 16 + #define MSK32dHubCmdHDR_DESC_size 0x0000FFFF + + #define BA_dHubCmdHDR_DESC_sizeMTU 0x0002 + #define B16dHubCmdHDR_DESC_sizeMTU 0x0002 + #define LSb32dHubCmdHDR_DESC_sizeMTU 16 + #define LSb16dHubCmdHDR_DESC_sizeMTU 0 + #define bdHubCmdHDR_DESC_sizeMTU 1 + #define MSK32dHubCmdHDR_DESC_sizeMTU 0x00010000 + + #define BA_dHubCmdHDR_DESC_semOpMTU 0x0002 + #define B16dHubCmdHDR_DESC_semOpMTU 0x0002 + #define LSb32dHubCmdHDR_DESC_semOpMTU 17 + #define LSb16dHubCmdHDR_DESC_semOpMTU 1 + #define bdHubCmdHDR_DESC_semOpMTU 1 + #define MSK32dHubCmdHDR_DESC_semOpMTU 0x00020000 + + #define BA_dHubCmdHDR_DESC_chkSemId 0x0002 + #define B16dHubCmdHDR_DESC_chkSemId 0x0002 + #define LSb32dHubCmdHDR_DESC_chkSemId 18 + #define LSb16dHubCmdHDR_DESC_chkSemId 2 + #define bdHubCmdHDR_DESC_chkSemId 5 + #define MSK32dHubCmdHDR_DESC_chkSemId 0x007C0000 + + #define BA_dHubCmdHDR_DESC_updSemId 0x0002 + #define B16dHubCmdHDR_DESC_updSemId 0x0002 + #define LSb32dHubCmdHDR_DESC_updSemId 23 + #define LSb16dHubCmdHDR_DESC_updSemId 7 + #define bdHubCmdHDR_DESC_updSemId 5 + #define MSK32dHubCmdHDR_DESC_updSemId 0x0F800000 + + #define BA_dHubCmdHDR_DESC_interrupt 0x0003 + #define B16dHubCmdHDR_DESC_interrupt 0x0002 + #define LSb32dHubCmdHDR_DESC_interrupt 28 + #define LSb16dHubCmdHDR_DESC_interrupt 12 + #define bdHubCmdHDR_DESC_interrupt 1 + #define MSK32dHubCmdHDR_DESC_interrupt 0x10000000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmdHDR { + /////////////////////////////////////////////////////////// + #define GET32dHubCmdHDR_DESC_size(r32) _BFGET_(r32,15, 0) + #define SET32dHubCmdHDR_DESC_size(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubCmdHDR_DESC_size(r16) _BFGET_(r16,15, 0) + #define SET16dHubCmdHDR_DESC_size(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubCmdHDR_DESC_sizeMTU(r32) _BFGET_(r32,16,16) + #define SET32dHubCmdHDR_DESC_sizeMTU(r32,v) _BFSET_(r32,16,16,v) + #define GET16dHubCmdHDR_DESC_sizeMTU(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmdHDR_DESC_sizeMTU(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32dHubCmdHDR_DESC_semOpMTU(r32) _BFGET_(r32,17,17) + #define SET32dHubCmdHDR_DESC_semOpMTU(r32,v) _BFSET_(r32,17,17,v) + #define GET16dHubCmdHDR_DESC_semOpMTU(r16) _BFGET_(r16, 1, 1) + #define SET16dHubCmdHDR_DESC_semOpMTU(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32dHubCmdHDR_DESC_chkSemId(r32) _BFGET_(r32,22,18) + #define SET32dHubCmdHDR_DESC_chkSemId(r32,v) _BFSET_(r32,22,18,v) + #define GET16dHubCmdHDR_DESC_chkSemId(r16) _BFGET_(r16, 6, 2) + #define SET16dHubCmdHDR_DESC_chkSemId(r16,v) _BFSET_(r16, 6, 2,v) + + #define GET32dHubCmdHDR_DESC_updSemId(r32) _BFGET_(r32,27,23) + #define SET32dHubCmdHDR_DESC_updSemId(r32,v) _BFSET_(r32,27,23,v) + #define GET16dHubCmdHDR_DESC_updSemId(r16) _BFGET_(r16,11, 7) + #define SET16dHubCmdHDR_DESC_updSemId(r16,v) _BFSET_(r16,11, 7,v) + + #define GET32dHubCmdHDR_DESC_interrupt(r32) _BFGET_(r32,28,28) + #define SET32dHubCmdHDR_DESC_interrupt(r32,v) _BFSET_(r32,28,28,v) + #define GET16dHubCmdHDR_DESC_interrupt(r16) _BFGET_(r16,12,12) + #define SET16dHubCmdHDR_DESC_interrupt(r16,v) _BFSET_(r16,12,12,v) + + #define w32dHubCmdHDR_DESC {\ + UNSG32 uDESC_size : 16;\ + UNSG32 uDESC_sizeMTU : 1;\ + UNSG32 uDESC_semOpMTU : 1;\ + UNSG32 uDESC_chkSemId : 5;\ + UNSG32 uDESC_updSemId : 5;\ + UNSG32 uDESC_interrupt : 1;\ + UNSG32 RSVDx0_b29 : 3;\ + } + union { UNSG32 u32dHubCmdHDR_DESC; + struct w32dHubCmdHDR_DESC; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubCmdHDR; + + typedef union T32dHubCmdHDR_DESC + { UNSG32 u32; + struct w32dHubCmdHDR_DESC; + } T32dHubCmdHDR_DESC; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmdHDR_DESC + { UNSG32 u32[1]; + struct { + struct w32dHubCmdHDR_DESC; + }; + } TdHubCmdHDR_DESC; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmdHDR_drvrd(SIE_dHubCmdHDR *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmdHDR_drvwr(SIE_dHubCmdHDR *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmdHDR_reset(SIE_dHubCmdHDR *p); + SIGN32 dHubCmdHDR_cmp (SIE_dHubCmdHDR *p, SIE_dHubCmdHDR *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmdHDR_check(p,pie,pfx,hLOG) dHubCmdHDR_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmdHDR_print(p, pfx,hLOG) dHubCmdHDR_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmdHDR +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmd biu (4,4) +/// ### +/// * 64-bit dHub command issued by read/write masters +/// * [0:31] +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 MEM (W-) +/// %unsigned 32 addr +/// ### +/// * DRAM data address, in bytes; not necessarily MTU aligned. +/// * [32:63] +/// ### +/// @ 0x00004 (P) +/// # 0x00004 HDR +/// $dHubCmdHDR HDR REG +/// ### +/// * end dHubCmd +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 8B, bits: 61b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmd +#define h_dHubCmd (){} + + #define RA_dHubCmd_MEM 0x0000 + + #define BA_dHubCmd_MEM_addr 0x0000 + #define B16dHubCmd_MEM_addr 0x0000 + #define LSb32dHubCmd_MEM_addr 0 + #define LSb16dHubCmd_MEM_addr 0 + #define bdHubCmd_MEM_addr 32 + #define MSK32dHubCmd_MEM_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_dHubCmd_HDR 0x0004 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmd { + /////////////////////////////////////////////////////////// + #define GET32dHubCmd_MEM_addr(r32) _BFGET_(r32,31, 0) + #define SET32dHubCmd_MEM_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32dHubCmd_MEM {\ + UNSG32 uMEM_addr : 32;\ + } + union { UNSG32 u32dHubCmd_MEM; + struct w32dHubCmd_MEM; + }; + /////////////////////////////////////////////////////////// + SIE_dHubCmdHDR ie_HDR; + /////////////////////////////////////////////////////////// + } SIE_dHubCmd; + + typedef union T32dHubCmd_MEM + { UNSG32 u32; + struct w32dHubCmd_MEM; + } T32dHubCmd_MEM; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmd_MEM + { UNSG32 u32[1]; + struct { + struct w32dHubCmd_MEM; + }; + } TdHubCmd_MEM; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmd_drvrd(SIE_dHubCmd *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmd_drvwr(SIE_dHubCmd *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmd_reset(SIE_dHubCmd *p); + SIGN32 dHubCmd_cmp (SIE_dHubCmd *p, SIE_dHubCmd *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmd_check(p,pie,pfx,hLOG) dHubCmd_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmd_print(p, pfx,hLOG) dHubCmd_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmd +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubChannel biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 2 MTU +/// : 8byte 0x0 +/// : 32byte 0x1 +/// : 128byte 0x2 +/// : 1024byte 0x3 +/// ### +/// * Minimum transfer unit of the channel +/// ### +/// %unsigned 1 QoS +/// ### +/// * Write 1 to turn on QoS detection +/// ### +/// %unsigned 1 selfLoop +/// ### +/// * Write 1 to enable cmd looping support; 0 to turn off +/// ### +/// %unsigned 1 intrCtl 0x0 +/// : cmdDone 0x0 +/// : chIdle 0x1 +/// ### +/// * 0 : default vlaue, the interrupt is triggered by the finish of the dHub command if the interrupt bit is defined in the dHub command. +/// * 1 : The interrupt is triggered if the dHub channel is idle ( no busy and no pending and the corresponding dHub command Q is empty). +/// ### +/// %unsigned 1 hScan 0x0 +/// : rastScan 0x0 +/// : invScan 0x1 +/// ### +/// * This parameter will only apply to read channels. +/// * It will affect 1D dHub command for the channel. +/// * When scan is set to 1 (invScan), the data (beat) inside the dHub command will be fetched in the inverse order. ie. The data from the last address will come first and the data (beat) from the first address will come lastly. +/// ### +/// %unsigned 1 vScan 0x0 +/// : rastScan 0x0 +/// : invScan 0x1 +/// ### +/// * This parameter will only apply to read channels. +/// * It will affect 2D channels. +/// * When scan is set to 1 (invScan), +/// * The last address line (1D command) will be fetched first, and the first address line will be fetched lastly. +/// ### +/// %% 25 # Stuffing bits... +/// @ 0x00004 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to enable the channel; 0 to pause the channel +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to reset the channel controller state +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C FLUSH (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to start the data flushing process. Invalid for read (M2H) channels +/// * end dHubChannel +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 10b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubChannel +#define h_dHubChannel (){} + + #define RA_dHubChannel_CFG 0x0000 + + #define BA_dHubChannel_CFG_MTU 0x0000 + #define B16dHubChannel_CFG_MTU 0x0000 + #define LSb32dHubChannel_CFG_MTU 0 + #define LSb16dHubChannel_CFG_MTU 0 + #define bdHubChannel_CFG_MTU 2 + #define MSK32dHubChannel_CFG_MTU 0x00000003 + #define dHubChannel_CFG_MTU_8byte 0x0 + #define dHubChannel_CFG_MTU_32byte 0x1 + #define dHubChannel_CFG_MTU_128byte 0x2 + #define dHubChannel_CFG_MTU_1024byte 0x3 + + #define BA_dHubChannel_CFG_QoS 0x0000 + #define B16dHubChannel_CFG_QoS 0x0000 + #define LSb32dHubChannel_CFG_QoS 2 + #define LSb16dHubChannel_CFG_QoS 2 + #define bdHubChannel_CFG_QoS 1 + #define MSK32dHubChannel_CFG_QoS 0x00000004 + + #define BA_dHubChannel_CFG_selfLoop 0x0000 + #define B16dHubChannel_CFG_selfLoop 0x0000 + #define LSb32dHubChannel_CFG_selfLoop 3 + #define LSb16dHubChannel_CFG_selfLoop 3 + #define bdHubChannel_CFG_selfLoop 1 + #define MSK32dHubChannel_CFG_selfLoop 0x00000008 + + #define BA_dHubChannel_CFG_intrCtl 0x0000 + #define B16dHubChannel_CFG_intrCtl 0x0000 + #define LSb32dHubChannel_CFG_intrCtl 4 + #define LSb16dHubChannel_CFG_intrCtl 4 + #define bdHubChannel_CFG_intrCtl 1 + #define MSK32dHubChannel_CFG_intrCtl 0x00000010 + #define dHubChannel_CFG_intrCtl_cmdDone 0x0 + #define dHubChannel_CFG_intrCtl_chIdle 0x1 + + #define BA_dHubChannel_CFG_hScan 0x0000 + #define B16dHubChannel_CFG_hScan 0x0000 + #define LSb32dHubChannel_CFG_hScan 5 + #define LSb16dHubChannel_CFG_hScan 5 + #define bdHubChannel_CFG_hScan 1 + #define MSK32dHubChannel_CFG_hScan 0x00000020 + #define dHubChannel_CFG_hScan_rastScan 0x0 + #define dHubChannel_CFG_hScan_invScan 0x1 + + #define BA_dHubChannel_CFG_vScan 0x0000 + #define B16dHubChannel_CFG_vScan 0x0000 + #define LSb32dHubChannel_CFG_vScan 6 + #define LSb16dHubChannel_CFG_vScan 6 + #define bdHubChannel_CFG_vScan 1 + #define MSK32dHubChannel_CFG_vScan 0x00000040 + #define dHubChannel_CFG_vScan_rastScan 0x0 + #define dHubChannel_CFG_vScan_invScan 0x1 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_START 0x0004 + + #define BA_dHubChannel_START_EN 0x0004 + #define B16dHubChannel_START_EN 0x0004 + #define LSb32dHubChannel_START_EN 0 + #define LSb16dHubChannel_START_EN 0 + #define bdHubChannel_START_EN 1 + #define MSK32dHubChannel_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_CLEAR 0x0008 + + #define BA_dHubChannel_CLEAR_EN 0x0008 + #define B16dHubChannel_CLEAR_EN 0x0008 + #define LSb32dHubChannel_CLEAR_EN 0 + #define LSb16dHubChannel_CLEAR_EN 0 + #define bdHubChannel_CLEAR_EN 1 + #define MSK32dHubChannel_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_FLUSH 0x000C + + #define BA_dHubChannel_FLUSH_EN 0x000C + #define B16dHubChannel_FLUSH_EN 0x000C + #define LSb32dHubChannel_FLUSH_EN 0 + #define LSb16dHubChannel_FLUSH_EN 0 + #define bdHubChannel_FLUSH_EN 1 + #define MSK32dHubChannel_FLUSH_EN 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubChannel { + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_CFG_MTU(r32) _BFGET_(r32, 1, 0) + #define SET32dHubChannel_CFG_MTU(r32,v) _BFSET_(r32, 1, 0,v) + #define GET16dHubChannel_CFG_MTU(r16) _BFGET_(r16, 1, 0) + #define SET16dHubChannel_CFG_MTU(r16,v) _BFSET_(r16, 1, 0,v) + + #define GET32dHubChannel_CFG_QoS(r32) _BFGET_(r32, 2, 2) + #define SET32dHubChannel_CFG_QoS(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16dHubChannel_CFG_QoS(r16) _BFGET_(r16, 2, 2) + #define SET16dHubChannel_CFG_QoS(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32dHubChannel_CFG_selfLoop(r32) _BFGET_(r32, 3, 3) + #define SET32dHubChannel_CFG_selfLoop(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16dHubChannel_CFG_selfLoop(r16) _BFGET_(r16, 3, 3) + #define SET16dHubChannel_CFG_selfLoop(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32dHubChannel_CFG_intrCtl(r32) _BFGET_(r32, 4, 4) + #define SET32dHubChannel_CFG_intrCtl(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16dHubChannel_CFG_intrCtl(r16) _BFGET_(r16, 4, 4) + #define SET16dHubChannel_CFG_intrCtl(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32dHubChannel_CFG_hScan(r32) _BFGET_(r32, 5, 5) + #define SET32dHubChannel_CFG_hScan(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16dHubChannel_CFG_hScan(r16) _BFGET_(r16, 5, 5) + #define SET16dHubChannel_CFG_hScan(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32dHubChannel_CFG_vScan(r32) _BFGET_(r32, 6, 6) + #define SET32dHubChannel_CFG_vScan(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16dHubChannel_CFG_vScan(r16) _BFGET_(r16, 6, 6) + #define SET16dHubChannel_CFG_vScan(r16,v) _BFSET_(r16, 6, 6,v) + + #define w32dHubChannel_CFG {\ + UNSG32 uCFG_MTU : 2;\ + UNSG32 uCFG_QoS : 1;\ + UNSG32 uCFG_selfLoop : 1;\ + UNSG32 uCFG_intrCtl : 1;\ + UNSG32 uCFG_hScan : 1;\ + UNSG32 uCFG_vScan : 1;\ + UNSG32 RSVDx0_b7 : 25;\ + } + union { UNSG32 u32dHubChannel_CFG; + struct w32dHubChannel_CFG; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_START; + struct w32dHubChannel_START; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_CLEAR; + struct w32dHubChannel_CLEAR; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_FLUSH_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_FLUSH_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_FLUSH_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_FLUSH_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_FLUSH {\ + UNSG32 uFLUSH_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_FLUSH; + struct w32dHubChannel_FLUSH; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubChannel; + + typedef union T32dHubChannel_CFG + { UNSG32 u32; + struct w32dHubChannel_CFG; + } T32dHubChannel_CFG; + typedef union T32dHubChannel_START + { UNSG32 u32; + struct w32dHubChannel_START; + } T32dHubChannel_START; + typedef union T32dHubChannel_CLEAR + { UNSG32 u32; + struct w32dHubChannel_CLEAR; + } T32dHubChannel_CLEAR; + typedef union T32dHubChannel_FLUSH + { UNSG32 u32; + struct w32dHubChannel_FLUSH; + } T32dHubChannel_FLUSH; + /////////////////////////////////////////////////////////// + + typedef union TdHubChannel_CFG + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_CFG; + }; + } TdHubChannel_CFG; + typedef union TdHubChannel_START + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_START; + }; + } TdHubChannel_START; + typedef union TdHubChannel_CLEAR + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_CLEAR; + }; + } TdHubChannel_CLEAR; + typedef union TdHubChannel_FLUSH + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_FLUSH; + }; + } TdHubChannel_FLUSH; + + /////////////////////////////////////////////////////////// + SIGN32 dHubChannel_drvrd(SIE_dHubChannel *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubChannel_drvwr(SIE_dHubChannel *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubChannel_reset(SIE_dHubChannel *p); + SIGN32 dHubChannel_cmp (SIE_dHubChannel *p, SIE_dHubChannel *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubChannel_check(p,pie,pfx,hLOG) dHubChannel_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubChannel_print(p, pfx,hLOG) dHubChannel_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubChannel +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubReg biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 SemaHub +/// $SemaHub SemaHub REG +/// ### +/// * For dHub internal interrupts, also provide semaphore service for external (all channels will be opened to external to access). +/// * Channel 0 is used for dHub.HBO interrupt. +/// * Channel N+1 is used for dHub.Channel[N] interrupt. +/// ### +/// @ 0x00400 (P) +/// # 0x00400 HBO +/// $HBO HBO REG +/// ### +/// * For dHub channels (command/data queues), also provide (unused) FIFO service for external. +/// * Channel 2N is used for dHub.Channel[N] command. +/// * Channel 2N+1 is used for dHub.Channel[N] data. +/// ### +/// @ 0x00B00 ARR (P) +/// # 0x00B00 channelCtl +/// $dHubChannel channelCtl REG [16] +/// ### +/// * Up-to 16 channels +/// ### +/// @ 0x00C00 BUSY (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: no ongoing command is being processed, and no flushing is taking place +/// * 1: channel controller is busy +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C04 PENDING (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: Response queue is empty, meaning no outstanding AXI transactions +/// * 1: there exist some outstanding AXI transactions +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C08 busRstEn (RW-) +/// %unsigned 1 reg 0x0 +/// ### +/// * Write one to this register will trigger gate-keeper to take over the AXI bus. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00C0C busRstDone (R-) +/// %unsigned 1 reg 0x1 +/// ### +/// * After gate-keeper take over the AXI bus, it will assert this bit once there is no outstanding transactions on AXI bus. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00C10 flowCtl (P) +/// %unsigned 8 rAlpha 0x0 +/// %unsigned 8 wAlpha 0x0 +/// ### +/// * Flow control parameter for read and write axi master. +/// * clkCnt=(alpha*bstLen)>>4. +/// * This # of clock cycles will be blocked for the axi master after an axi command with the burst length of “bstLenâ€. +/// * When set alpha to be 0, the master will never be blocked. +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C14 axiCmdCol (P) +/// %unsigned 16 rCnt 0x0 +/// %unsigned 16 wCnt 0x0 +/// ### +/// * Axi command collection. The counter value indicate read/write do the command collection for # of clock cycles, start from the first command pushed to an empty command Q. Here are the conditions that will trigger the Axi master to send out command. +/// * Cmd Q full or the counter count down to “0†from the programmed value. +/// * Set the counter to 0 will disable the command collection. +/// * end dHubReg +/// ### +/// @ 0x00C18 (W-) +/// # # Stuffing bytes... +/// %% 1856 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 3328B, bits: 3314b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubReg +#define h_dHubReg (){} + + #define RA_dHubReg_SemaHub 0x0000 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_HBO 0x0400 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_ARR 0x0B00 + #define RA_dHubReg_channelCtl 0x0B00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_BUSY 0x0C00 + + #define BA_dHubReg_BUSY_ST 0x0C00 + #define B16dHubReg_BUSY_ST 0x0C00 + #define LSb32dHubReg_BUSY_ST 0 + #define LSb16dHubReg_BUSY_ST 0 + #define bdHubReg_BUSY_ST 16 + #define MSK32dHubReg_BUSY_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg_PENDING 0x0C04 + + #define BA_dHubReg_PENDING_ST 0x0C04 + #define B16dHubReg_PENDING_ST 0x0C04 + #define LSb32dHubReg_PENDING_ST 0 + #define LSb16dHubReg_PENDING_ST 0 + #define bdHubReg_PENDING_ST 16 + #define MSK32dHubReg_PENDING_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg_busRstEn 0x0C08 + + #define BA_dHubReg_busRstEn_reg 0x0C08 + #define B16dHubReg_busRstEn_reg 0x0C08 + #define LSb32dHubReg_busRstEn_reg 0 + #define LSb16dHubReg_busRstEn_reg 0 + #define bdHubReg_busRstEn_reg 1 + #define MSK32dHubReg_busRstEn_reg 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_busRstDone 0x0C0C + + #define BA_dHubReg_busRstDone_reg 0x0C0C + #define B16dHubReg_busRstDone_reg 0x0C0C + #define LSb32dHubReg_busRstDone_reg 0 + #define LSb16dHubReg_busRstDone_reg 0 + #define bdHubReg_busRstDone_reg 1 + #define MSK32dHubReg_busRstDone_reg 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_flowCtl 0x0C10 + + #define BA_dHubReg_flowCtl_rAlpha 0x0C10 + #define B16dHubReg_flowCtl_rAlpha 0x0C10 + #define LSb32dHubReg_flowCtl_rAlpha 0 + #define LSb16dHubReg_flowCtl_rAlpha 0 + #define bdHubReg_flowCtl_rAlpha 8 + #define MSK32dHubReg_flowCtl_rAlpha 0x000000FF + + #define BA_dHubReg_flowCtl_wAlpha 0x0C11 + #define B16dHubReg_flowCtl_wAlpha 0x0C10 + #define LSb32dHubReg_flowCtl_wAlpha 8 + #define LSb16dHubReg_flowCtl_wAlpha 8 + #define bdHubReg_flowCtl_wAlpha 8 + #define MSK32dHubReg_flowCtl_wAlpha 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_axiCmdCol 0x0C14 + + #define BA_dHubReg_axiCmdCol_rCnt 0x0C14 + #define B16dHubReg_axiCmdCol_rCnt 0x0C14 + #define LSb32dHubReg_axiCmdCol_rCnt 0 + #define LSb16dHubReg_axiCmdCol_rCnt 0 + #define bdHubReg_axiCmdCol_rCnt 16 + #define MSK32dHubReg_axiCmdCol_rCnt 0x0000FFFF + + #define BA_dHubReg_axiCmdCol_wCnt 0x0C16 + #define B16dHubReg_axiCmdCol_wCnt 0x0C16 + #define LSb32dHubReg_axiCmdCol_wCnt 16 + #define LSb16dHubReg_axiCmdCol_wCnt 0 + #define bdHubReg_axiCmdCol_wCnt 16 + #define MSK32dHubReg_axiCmdCol_wCnt 0xFFFF0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubReg { + /////////////////////////////////////////////////////////// + SIE_SemaHub ie_SemaHub; + /////////////////////////////////////////////////////////// + SIE_HBO ie_HBO; + /////////////////////////////////////////////////////////// + SIE_dHubChannel ie_channelCtl[16]; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_BUSY_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_BUSY_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_BUSY_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_BUSY_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_BUSY {\ + UNSG32 uBUSY_ST : 16;\ + UNSG32 RSVDxC00_b16 : 16;\ + } + union { UNSG32 u32dHubReg_BUSY; + struct w32dHubReg_BUSY; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_PENDING_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_PENDING_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_PENDING_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_PENDING_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_PENDING {\ + UNSG32 uPENDING_ST : 16;\ + UNSG32 RSVDxC04_b16 : 16;\ + } + union { UNSG32 u32dHubReg_PENDING; + struct w32dHubReg_PENDING; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_busRstEn_reg(r32) _BFGET_(r32, 0, 0) + #define SET32dHubReg_busRstEn_reg(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubReg_busRstEn_reg(r16) _BFGET_(r16, 0, 0) + #define SET16dHubReg_busRstEn_reg(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubReg_busRstEn {\ + UNSG32 ubusRstEn_reg : 1;\ + UNSG32 RSVDxC08_b1 : 31;\ + } + union { UNSG32 u32dHubReg_busRstEn; + struct w32dHubReg_busRstEn; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_busRstDone_reg(r32) _BFGET_(r32, 0, 0) + #define SET32dHubReg_busRstDone_reg(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubReg_busRstDone_reg(r16) _BFGET_(r16, 0, 0) + #define SET16dHubReg_busRstDone_reg(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubReg_busRstDone {\ + UNSG32 ubusRstDone_reg : 1;\ + UNSG32 RSVDxC0C_b1 : 31;\ + } + union { UNSG32 u32dHubReg_busRstDone; + struct w32dHubReg_busRstDone; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_flowCtl_rAlpha(r32) _BFGET_(r32, 7, 0) + #define SET32dHubReg_flowCtl_rAlpha(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16dHubReg_flowCtl_rAlpha(r16) _BFGET_(r16, 7, 0) + #define SET16dHubReg_flowCtl_rAlpha(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32dHubReg_flowCtl_wAlpha(r32) _BFGET_(r32,15, 8) + #define SET32dHubReg_flowCtl_wAlpha(r32,v) _BFSET_(r32,15, 8,v) + #define GET16dHubReg_flowCtl_wAlpha(r16) _BFGET_(r16,15, 8) + #define SET16dHubReg_flowCtl_wAlpha(r16,v) _BFSET_(r16,15, 8,v) + + #define w32dHubReg_flowCtl {\ + UNSG32 uflowCtl_rAlpha : 8;\ + UNSG32 uflowCtl_wAlpha : 8;\ + UNSG32 RSVDxC10_b16 : 16;\ + } + union { UNSG32 u32dHubReg_flowCtl; + struct w32dHubReg_flowCtl; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_axiCmdCol_rCnt(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_axiCmdCol_rCnt(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_axiCmdCol_rCnt(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_axiCmdCol_rCnt(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubReg_axiCmdCol_wCnt(r32) _BFGET_(r32,31,16) + #define SET32dHubReg_axiCmdCol_wCnt(r32,v) _BFSET_(r32,31,16,v) + #define GET16dHubReg_axiCmdCol_wCnt(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_axiCmdCol_wCnt(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_axiCmdCol {\ + UNSG32 uaxiCmdCol_rCnt : 16;\ + UNSG32 uaxiCmdCol_wCnt : 16;\ + } + union { UNSG32 u32dHubReg_axiCmdCol; + struct w32dHubReg_axiCmdCol; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxC18 [232]; + /////////////////////////////////////////////////////////// + } SIE_dHubReg; + + typedef union T32dHubReg_BUSY + { UNSG32 u32; + struct w32dHubReg_BUSY; + } T32dHubReg_BUSY; + typedef union T32dHubReg_PENDING + { UNSG32 u32; + struct w32dHubReg_PENDING; + } T32dHubReg_PENDING; + typedef union T32dHubReg_busRstEn + { UNSG32 u32; + struct w32dHubReg_busRstEn; + } T32dHubReg_busRstEn; + typedef union T32dHubReg_busRstDone + { UNSG32 u32; + struct w32dHubReg_busRstDone; + } T32dHubReg_busRstDone; + typedef union T32dHubReg_flowCtl + { UNSG32 u32; + struct w32dHubReg_flowCtl; + } T32dHubReg_flowCtl; + typedef union T32dHubReg_axiCmdCol + { UNSG32 u32; + struct w32dHubReg_axiCmdCol; + } T32dHubReg_axiCmdCol; + /////////////////////////////////////////////////////////// + + typedef union TdHubReg_BUSY + { UNSG32 u32[1]; + struct { + struct w32dHubReg_BUSY; + }; + } TdHubReg_BUSY; + typedef union TdHubReg_PENDING + { UNSG32 u32[1]; + struct { + struct w32dHubReg_PENDING; + }; + } TdHubReg_PENDING; + typedef union TdHubReg_busRstEn + { UNSG32 u32[1]; + struct { + struct w32dHubReg_busRstEn; + }; + } TdHubReg_busRstEn; + typedef union TdHubReg_busRstDone + { UNSG32 u32[1]; + struct { + struct w32dHubReg_busRstDone; + }; + } TdHubReg_busRstDone; + typedef union TdHubReg_flowCtl + { UNSG32 u32[1]; + struct { + struct w32dHubReg_flowCtl; + }; + } TdHubReg_flowCtl; + typedef union TdHubReg_axiCmdCol + { UNSG32 u32[1]; + struct { + struct w32dHubReg_axiCmdCol; + }; + } TdHubReg_axiCmdCol; + + /////////////////////////////////////////////////////////// + SIGN32 dHubReg_drvrd(SIE_dHubReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubReg_drvwr(SIE_dHubReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubReg_reset(SIE_dHubReg *p); + SIGN32 dHubReg_cmp (SIE_dHubReg *p, SIE_dHubReg *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubReg_check(p,pie,pfx,hLOG) dHubReg_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubReg_print(p, pfx,hLOG) dHubReg_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubReg +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmd2D biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 MEM (W-) +/// %unsigned 32 addr +/// ### +/// * DRAM data address of the 2D buffer, in bytes. +/// ### +/// @ 0x00004 DESC (W-) +/// %unsigned 16 stride +/// ### +/// * Line stride size in bytes +/// ### +/// %unsigned 13 numLine +/// ### +/// * Number of lines in buffer. Size of 0 is forbidden. +/// ### +/// %unsigned 2 hdrLoop +/// ### +/// * Size of line-loop for choosing dHubCmdHDR +/// * 0 is treated as 4 +/// ### +/// %unsigned 1 interrupt +/// ### +/// * 1: raise interrupt upon whole 2D command finish. +/// * 1: set the last 1D command interrupt bit. +/// * 0 : use the default 1D command interrupt bit. +/// ### +/// @ 0x00008 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to enable the channel; 0 to pause the channel +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to reset the 2D engine. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00010 (P) +/// # 0x00010 HDR +/// $dHubCmdHDR HDR REG [4] +/// ### +/// * Headers used in generating dHubCmd for each line in looping order, loop size (1,2,3,4) specified by DESC_hdrLoop +/// * end dHubCmd2D +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 32B, bits: 182b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmd2D +#define h_dHubCmd2D (){} + + #define RA_dHubCmd2D_MEM 0x0000 + + #define BA_dHubCmd2D_MEM_addr 0x0000 + #define B16dHubCmd2D_MEM_addr 0x0000 + #define LSb32dHubCmd2D_MEM_addr 0 + #define LSb16dHubCmd2D_MEM_addr 0 + #define bdHubCmd2D_MEM_addr 32 + #define MSK32dHubCmd2D_MEM_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_DESC 0x0004 + + #define BA_dHubCmd2D_DESC_stride 0x0004 + #define B16dHubCmd2D_DESC_stride 0x0004 + #define LSb32dHubCmd2D_DESC_stride 0 + #define LSb16dHubCmd2D_DESC_stride 0 + #define bdHubCmd2D_DESC_stride 16 + #define MSK32dHubCmd2D_DESC_stride 0x0000FFFF + + #define BA_dHubCmd2D_DESC_numLine 0x0006 + #define B16dHubCmd2D_DESC_numLine 0x0006 + #define LSb32dHubCmd2D_DESC_numLine 16 + #define LSb16dHubCmd2D_DESC_numLine 0 + #define bdHubCmd2D_DESC_numLine 13 + #define MSK32dHubCmd2D_DESC_numLine 0x1FFF0000 + + #define BA_dHubCmd2D_DESC_hdrLoop 0x0007 + #define B16dHubCmd2D_DESC_hdrLoop 0x0006 + #define LSb32dHubCmd2D_DESC_hdrLoop 29 + #define LSb16dHubCmd2D_DESC_hdrLoop 13 + #define bdHubCmd2D_DESC_hdrLoop 2 + #define MSK32dHubCmd2D_DESC_hdrLoop 0x60000000 + + #define BA_dHubCmd2D_DESC_interrupt 0x0007 + #define B16dHubCmd2D_DESC_interrupt 0x0006 + #define LSb32dHubCmd2D_DESC_interrupt 31 + #define LSb16dHubCmd2D_DESC_interrupt 15 + #define bdHubCmd2D_DESC_interrupt 1 + #define MSK32dHubCmd2D_DESC_interrupt 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_START 0x0008 + + #define BA_dHubCmd2D_START_EN 0x0008 + #define B16dHubCmd2D_START_EN 0x0008 + #define LSb32dHubCmd2D_START_EN 0 + #define LSb16dHubCmd2D_START_EN 0 + #define bdHubCmd2D_START_EN 1 + #define MSK32dHubCmd2D_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_CLEAR 0x000C + + #define BA_dHubCmd2D_CLEAR_EN 0x000C + #define B16dHubCmd2D_CLEAR_EN 0x000C + #define LSb32dHubCmd2D_CLEAR_EN 0 + #define LSb16dHubCmd2D_CLEAR_EN 0 + #define bdHubCmd2D_CLEAR_EN 1 + #define MSK32dHubCmd2D_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_HDR 0x0010 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmd2D { + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_MEM_addr(r32) _BFGET_(r32,31, 0) + #define SET32dHubCmd2D_MEM_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32dHubCmd2D_MEM {\ + UNSG32 uMEM_addr : 32;\ + } + union { UNSG32 u32dHubCmd2D_MEM; + struct w32dHubCmd2D_MEM; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_DESC_stride(r32) _BFGET_(r32,15, 0) + #define SET32dHubCmd2D_DESC_stride(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubCmd2D_DESC_stride(r16) _BFGET_(r16,15, 0) + #define SET16dHubCmd2D_DESC_stride(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubCmd2D_DESC_numLine(r32) _BFGET_(r32,28,16) + #define SET32dHubCmd2D_DESC_numLine(r32,v) _BFSET_(r32,28,16,v) + #define GET16dHubCmd2D_DESC_numLine(r16) _BFGET_(r16,12, 0) + #define SET16dHubCmd2D_DESC_numLine(r16,v) _BFSET_(r16,12, 0,v) + + #define GET32dHubCmd2D_DESC_hdrLoop(r32) _BFGET_(r32,30,29) + #define SET32dHubCmd2D_DESC_hdrLoop(r32,v) _BFSET_(r32,30,29,v) + #define GET16dHubCmd2D_DESC_hdrLoop(r16) _BFGET_(r16,14,13) + #define SET16dHubCmd2D_DESC_hdrLoop(r16,v) _BFSET_(r16,14,13,v) + + #define GET32dHubCmd2D_DESC_interrupt(r32) _BFGET_(r32,31,31) + #define SET32dHubCmd2D_DESC_interrupt(r32,v) _BFSET_(r32,31,31,v) + #define GET16dHubCmd2D_DESC_interrupt(r16) _BFGET_(r16,15,15) + #define SET16dHubCmd2D_DESC_interrupt(r16,v) _BFSET_(r16,15,15,v) + + #define w32dHubCmd2D_DESC {\ + UNSG32 uDESC_stride : 16;\ + UNSG32 uDESC_numLine : 13;\ + UNSG32 uDESC_hdrLoop : 2;\ + UNSG32 uDESC_interrupt : 1;\ + } + union { UNSG32 u32dHubCmd2D_DESC; + struct w32dHubCmd2D_DESC; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubCmd2D_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubCmd2D_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmd2D_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubCmd2D_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32dHubCmd2D_START; + struct w32dHubCmd2D_START; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubCmd2D_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubCmd2D_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmd2D_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubCmd2D_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32dHubCmd2D_CLEAR; + struct w32dHubCmd2D_CLEAR; + }; + /////////////////////////////////////////////////////////// + SIE_dHubCmdHDR ie_HDR[4]; + /////////////////////////////////////////////////////////// + } SIE_dHubCmd2D; + + typedef union T32dHubCmd2D_MEM + { UNSG32 u32; + struct w32dHubCmd2D_MEM; + } T32dHubCmd2D_MEM; + typedef union T32dHubCmd2D_DESC + { UNSG32 u32; + struct w32dHubCmd2D_DESC; + } T32dHubCmd2D_DESC; + typedef union T32dHubCmd2D_START + { UNSG32 u32; + struct w32dHubCmd2D_START; + } T32dHubCmd2D_START; + typedef union T32dHubCmd2D_CLEAR + { UNSG32 u32; + struct w32dHubCmd2D_CLEAR; + } T32dHubCmd2D_CLEAR; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmd2D_MEM + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_MEM; + }; + } TdHubCmd2D_MEM; + typedef union TdHubCmd2D_DESC + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_DESC; + }; + } TdHubCmd2D_DESC; + typedef union TdHubCmd2D_START + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_START; + }; + } TdHubCmd2D_START; + typedef union TdHubCmd2D_CLEAR + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_CLEAR; + }; + } TdHubCmd2D_CLEAR; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmd2D_drvrd(SIE_dHubCmd2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmd2D_drvwr(SIE_dHubCmd2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmd2D_reset(SIE_dHubCmd2D *p); + SIGN32 dHubCmd2D_cmp (SIE_dHubCmd2D *p, SIE_dHubCmd2D *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmd2D_check(p,pie,pfx,hLOG) dHubCmd2D_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmd2D_print(p, pfx,hLOG) dHubCmd2D_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmd2D +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubQuery (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 RESP (R-) +/// %unsigned 16 ST +/// ### +/// * Dhub channel state machine status. +/// ### +/// %% 16 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 16b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubQuery +#define h_dHubQuery (){} + + #define RA_dHubQuery_RESP 0x0000 + + #define BA_dHubQuery_RESP_ST 0x0000 + #define B16dHubQuery_RESP_ST 0x0000 + #define LSb32dHubQuery_RESP_ST 0 + #define LSb16dHubQuery_RESP_ST 0 + #define bdHubQuery_RESP_ST 16 + #define MSK32dHubQuery_RESP_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubQuery { + /////////////////////////////////////////////////////////// + #define GET32dHubQuery_RESP_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubQuery_RESP_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubQuery_RESP_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubQuery_RESP_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubQuery_RESP {\ + UNSG32 uRESP_ST : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32dHubQuery_RESP; + struct w32dHubQuery_RESP; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubQuery; + + typedef union T32dHubQuery_RESP + { UNSG32 u32; + struct w32dHubQuery_RESP; + } T32dHubQuery_RESP; + /////////////////////////////////////////////////////////// + + typedef union TdHubQuery_RESP + { UNSG32 u32[1]; + struct { + struct w32dHubQuery_RESP; + }; + } TdHubQuery_RESP; + + /////////////////////////////////////////////////////////// + SIGN32 dHubQuery_drvrd(SIE_dHubQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubQuery_drvwr(SIE_dHubQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubQuery_reset(SIE_dHubQuery *p); + SIGN32 dHubQuery_cmp (SIE_dHubQuery *p, SIE_dHubQuery *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubQuery_check(p,pie,pfx,hLOG) dHubQuery_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubQuery_print(p, pfx,hLOG) dHubQuery_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubQuery +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubReg2D biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 dHub +/// $dHubReg dHub REG +/// @ 0x00D00 ARR (P) +/// # 0x00D00 Cmd2D +/// $dHubCmd2D Cmd2D REG [16] +/// ### +/// * Up-to 16 2D channels. +/// * 2D Channel[N] is connected to dHub.Channel[N] command queue, that is, dHub.HBO.Channel[2N] +/// * Note: Number of 2D channels could be less than dHub channels (rest of are 1D only) +/// ### +/// @ 0x00F00 BUSY (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: no ongoing command is being processed +/// * 1: channel controller is busy +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00F04 (W-) +/// # # Stuffing bytes... +/// %% 480 +/// @ 0x00F40 (P) +/// # 0x00F40 CH_ST +/// $dHubQuery CH_ST MEM [16] +/// ### +/// * end dHubReg2D +/// ### +/// @ 0x00F80 (W-) +/// # # Stuffing bytes... +/// %% 1024 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4096B, bits: 6274b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubReg2D +#define h_dHubReg2D (){} + + #define RA_dHubReg2D_dHub 0x0000 + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_ARR 0x0D00 + #define RA_dHubReg2D_Cmd2D 0x0D00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_BUSY 0x0F00 + + #define BA_dHubReg2D_BUSY_ST 0x0F00 + #define B16dHubReg2D_BUSY_ST 0x0F00 + #define LSb32dHubReg2D_BUSY_ST 0 + #define LSb16dHubReg2D_BUSY_ST 0 + #define bdHubReg2D_BUSY_ST 16 + #define MSK32dHubReg2D_BUSY_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_CH_ST 0x0F40 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubReg2D { + /////////////////////////////////////////////////////////// + SIE_dHubReg ie_dHub; + /////////////////////////////////////////////////////////// + SIE_dHubCmd2D ie_Cmd2D[16]; + /////////////////////////////////////////////////////////// + #define GET32dHubReg2D_BUSY_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg2D_BUSY_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg2D_BUSY_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg2D_BUSY_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg2D_BUSY {\ + UNSG32 uBUSY_ST : 16;\ + UNSG32 RSVDxF00_b16 : 16;\ + } + union { UNSG32 u32dHubReg2D_BUSY; + struct w32dHubReg2D_BUSY; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxF04 [60]; + /////////////////////////////////////////////////////////// + SIE_dHubQuery ie_CH_ST[16]; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxF80 [128]; + /////////////////////////////////////////////////////////// + } SIE_dHubReg2D; + + typedef union T32dHubReg2D_BUSY + { UNSG32 u32; + struct w32dHubReg2D_BUSY; + } T32dHubReg2D_BUSY; + /////////////////////////////////////////////////////////// + + typedef union TdHubReg2D_BUSY + { UNSG32 u32[1]; + struct { + struct w32dHubReg2D_BUSY; + }; + } TdHubReg2D_BUSY; + + /////////////////////////////////////////////////////////// + SIGN32 dHubReg2D_drvrd(SIE_dHubReg2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubReg2D_drvwr(SIE_dHubReg2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubReg2D_reset(SIE_dHubReg2D *p); + SIGN32 dHubReg2D_cmp (SIE_dHubReg2D *p, SIE_dHubReg2D *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubReg2D_check(p,pie,pfx,hLOG) dHubReg2D_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubReg2D_print(p, pfx,hLOG) dHubReg2D_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubReg2D +//////////////////////////////////////////////////////////// + + + +#ifdef __cplusplus + } +#endif +#pragma pack() + +#endif +////// +/// ENDOFFILE: dHub.h +//////////////////////////////////////////////////////////// + diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/galois_cfg.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/galois_cfg.h new file mode 100644 index 00000000..d3e9cdca --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/galois_cfg.h @@ -0,0 +1,106 @@ +/******************************************************************************* + * Copyright (C) Marvell International Ltd. and its affiliates + * + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * alternative licensing terms. Once you have made an election to distribute the + * File under one of the following license alternatives, please (i) delete this + * introductory statement regarding license alternatives, (ii) delete the two + * license alternatives that you have not elected to use and (iii) preserve the + * Marvell copyright notice above. + * + ******************************************************************************* + * Marvell Commercial License Option + * + * If you received this File from Marvell and you have entered into a commercial + * license agreement (a "Commercial License") with Marvell, the File is licensed + * to you under the terms of the applicable Commercial License. + * + ******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************** + * Marvell BSD License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File under the following licensing terms. + * 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 Marvell 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. + * + *******************************************************************************/ + +#ifndef __GALOIS_CFG_H__ +#define __GALOIS_CFG_H__ + +/*! + * IO read/write through software/hardware socket + * #define __MEMIO_SOCKET + */ + +/*! + * IO read/write through PCI-Express bus + * #define __MEMIO_PCIE + */ + +/*! + * IO read/write directly using MEMI/O + */ +#define __MEMIO_DIRECT + +/*! + * Program is running under little endian system. + */ +#ifndef __LITTLE_ENDIAN +#define __LITTLE_ENDIAN +#endif + +/*! + * Program is running under big endian system. + * #define __BIG_ENDIAN + */ + +/*! + * Program is running under Linux on ARM processor + */ +#define __LINUX_ARM + + +/*! + * Program is running under VxWorks on ARM processor + * #define __VxWORKS_ARM + */ + +#endif /* __GALOIS_CFG_H__ */ diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/galois_common.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/galois_common.h new file mode 100644 index 00000000..60887266 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/galois_common.h @@ -0,0 +1,241 @@ +/******************************************************************************* + * Copyright (C) Marvell International Ltd. and its affiliates + * + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * alternative licensing terms. Once you have made an election to distribute the + * File under one of the following license alternatives, please (i) delete this + * introductory statement regarding license alternatives, (ii) delete the two + * license alternatives that you have not elected to use and (iii) preserve the + * Marvell copyright notice above. + * + ******************************************************************************* + * Marvell Commercial License Option + * + * If you received this File from Marvell and you have entered into a commercial + * license agreement (a "Commercial License") with Marvell, the File is licensed + * to you under the terms of the applicable Commercial License. + * + ******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************** + * Marvell BSD License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File under the following licensing terms. + * 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 Marvell 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. + * + *******************************************************************************/ + +#ifndef __GALOIS_COMMON_H__ +#define __GALOIS_COMMON_H__ + +#include "galois_cfg.h" +#include "galois_type.h" + +/*! + * Bit field definitions + */ +#define NO_BIT 0x00000000 +#define BIT0 0x00000001 +#define BIT1 0x00000002 +#define BIT2 0x00000004 +#define BIT3 0x00000008 +#define BIT4 0x00000010 +#define BIT5 0x00000020 +#define BIT6 0x00000040 +#define BIT7 0x00000080 +#define BIT8 0x00000100 +#define BIT9 0x00000200 +#define BIT10 0x00000400 +#define BIT11 0x00000800 +#define BIT12 0x00001000 +#define BIT13 0x00002000 +#define BIT14 0x00004000 +#define BIT15 0x00008000 +#define BIT16 0x00010000 +#define BIT17 0x00020000 +#define BIT18 0x00040000 +#define BIT19 0x00080000 +#define BIT20 0x00100000 +#define BIT21 0x00200000 +#define BIT22 0x00400000 +#define BIT23 0x00800000 +#define BIT24 0x01000000 +#define BIT25 0x02000000 +#define BIT26 0x04000000 +#define BIT27 0x08000000 +#define BIT28 0x10000000 +#define BIT29 0x20000000 +#define BIT30 0x40000000 +#define BIT31 0x80000000 + +/*! + * Handy sizes + */ +#define _1K 0x00000400 +#define _2K 0x00000800 +#define _4K 0x00001000 +#define _8K 0x00002000 +#define _16K 0x00004000 +#define _32K 0x00008000 +#define _64K 0x00010000 +#define _128K 0x00020000 +#define _256K 0x00040000 +#define _512K 0x00080000 + +#define _1M 0x00100000 +#define _2M 0x00200000 +#define _4M 0x00400000 +#define _8M 0x00800000 +#define _16M 0x01000000 +#define _32M 0x02000000 +#define _64M 0x04000000 +#define _128M 0x08000000 +#define _256M 0x10000000 +#define _512M 0x20000000 + +#define _1G 0x40000000 +#define _2G 0x80000000 + +/*! + * CPU cache information + */ +#define CPU_I_CACHE_LINE_SIZE 32 /* 2do: replace 32 with linux core macro */ +#define CPU_D_CACHE_LINE_SIZE 32 /* 2do: replace 32 with linux core macro */ + +/*! + * Data cache flush one line + */ +#if (defined(__LINUX_ARM)) +# define mvOsCacheLineFlushInv(addr) \ + do { \ + __asm__ __volatile__ ("mcr p15, 0, %0, c7, c14, 1" : : "r" (addr)); \ + } while (0) + +# define mvOsCacheLineInv(addr) \ + do { \ + __asm__ __volatile__ ("mcr p15, 0, %0, c7, c6, 1" : : "r" (addr)); \ + } while (0) + +# define mvArmNop \ + do { \ + __asm__ __volatile__("nop"); \ + } while (0) + +#elif (defined(__VxWORKS_ARM)) +# define mvOsCacheLineFlushInv(addr) \ + do { \ + _WRS_ASM("mcr p15, 0, %0, c7, c14, 1" : : "r" (addr)); \ + } while (0) + +# define mvOsCacheLineInv(addr) \ + do { \ + _WRS_ASM("mcr p15, 0, %0, c7, c6, 1" : : "r" (addr)); \ + } while (0) + +# define mvArmNop \ + do { \ + __WRS_ASM("nop"); \ + } while (0) + +#else /* __LINUX_ARM || __VxWORKS_ARM */ +# define mvOsCacheLineFlushInv(addr) do ; while (0) +# define mvOsCacheLineInv(addr) do ; while (0) +# define mvArmNop do ; while (0) + +#endif /* __LINUX_ARM || __VxWORKS_ARM */ + +/*! + * Swap tool + */ + +/*! + * 16bit nibble swap. For example 0x1234 -> 0x2143 + */ +#define MV_NIBBLE_SWAP_16BIT(X) (((X & 0xf) << 4) | ((X & 0xf0) >> 4) | ((X & 0xf00) << 4) | ((X & 0xf000) >> 4)) + +/*! + * 32bit nibble swap. For example 0x12345678 -> 0x21436587 + */ +#define MV_NIBBLE_SWAP_32BIT(X) (((X & 0xf) << 4) | ((X & 0xf0) >> 4) | ((X & 0xf00) << 4) | ((X & 0xf000) >> 4) | \ + ((X & 0xf0000) << 4) | ((X & 0xf00000) >> 4) | ((X & 0xf000000) << 4) | ((X & 0xf0000000) >> 4)) + +/*! + * 16bit byte swap. For example 0x1122 -> 0x2211 + */ +#define MV_BYTE_SWAP_16BIT(X) ((((X) & 0xff) << 8) | (((X) & 0xff00) >> 8)) + +/*! + * 32bit byte swap. For example 0x11223344 -> 0x44332211 + */ +#define MV_BYTE_SWAP_32BIT(X) ((((X) & 0xff) << 24) | (((X) & 0xff00) << 8) | (((X) & 0xff0000) >> 8) | (((X) & 0xff000000) >> 24)) + +/*! + * 64bit byte swap. For example 0x11223344.55667788 -> 0x88776655.44332211 + */ +#define MV_BYTE_SWAP_64BIT(X) ((MV_U64) ((((X) & 0xffULL) << 56) | (((X) & 0xff00ULL) << 40) | \ + (((X) & 0xff0000ULL) << 24) | (((X) & 0xff000000ULL) << 8) | \ + (((X) & 0xff00000000ULL) >> 8) | (((X) & 0xff0000000000ULL) >> 24) | \ + (((X) & 0xff000000000000ULL) >> 40) | (((X) & 0xff00000000000000ULL) >> 56))) + +/*! + * Endianess macros. + */ +#if (defined(__BIG_ENDIAN)) +# define MV_16BIT_LE(X) MV_BYTE_SWAP_16BIT(X) +# define MV_32BIT_LE(X) MV_BYTE_SWAP_32BIT(X) +# define MV_64BIT_LE(X) MV_BYTE_SWAP_64BIT(X) +# define MV_16BIT_BE(X) (X) +# define MV_32BIT_BE(X) (X) +# define MV_64BIT_BE(X) (X) + +#elif (defined(__LITTLE_ENDIAN)) +# define MV_16BIT_LE(X) (X) +# define MV_32BIT_LE(X) (X) +# define MV_64BIT_LE(X) (X) +# define MV_16BIT_BE(X) MV_BYTE_SWAP_16BIT(X) +# define MV_32BIT_BE(X) MV_BYTE_SWAP_32BIT(X) +# define MV_64BIT_BE(X) MV_BYTE_SWAP_64BIT(X) + +#else /* __BIG_ENDIAN || __LITTLE_ENDIAN */ +# error "Endianess type not selected" + +#endif /* __BIG_ENDIAN || __LITTLE_ENDIAN */ + +#endif /* __GALOIS_COMMON_H__ */ diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/galois_io.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/galois_io.h new file mode 100644 index 00000000..766e6147 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/galois_io.h @@ -0,0 +1,302 @@ +/******************************************************************************* + * Copyright (C) Marvell International Ltd. and its affiliates + * + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * alternative licensing terms. Once you have made an election to distribute the + * File under one of the following license alternatives, please (i) delete this + * introductory statement regarding license alternatives, (ii) delete the two + * license alternatives that you have not elected to use and (iii) preserve the + * Marvell copyright notice above. + * + ******************************************************************************* + * Marvell Commercial License Option + * + * If you received this File from Marvell and you have entered into a commercial + * license agreement (a "Commercial License") with Marvell, the File is licensed + * to you under the terms of the applicable Commercial License. + * + ******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************** + * Marvell BSD License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File under the following licensing terms. + * 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 Marvell 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. + * + *******************************************************************************/ + +#ifndef __GALOIS_IO_H__ +#define __GALOIS_IO_H__ + +#ifdef __MEMIO_SOCKET +#include +#include "trans_h.h" +#endif + +#ifdef __MEMIO_PCIE +#include +#include +#endif + +#include "galois_cfg.h" +#include "galois_type.h" +#include "galois_common.h" + + +#ifdef __MEMIO_PCIE +extern MV_U32 gu32_galois_pcie_ioremap_base; +#endif + +#define CPU_PHY_MEM(x) ((MV_U32)(x)) +#define CPU_MEMIO_CACHED_ADDR(x) ((void*)(x)) +#define CPU_MEMIO_UNCACHED_ADDR(x) ((void*)(x)) + +/*! + * CPU endian check + */ +#if defined( CPU_BIG_ENDIAN ) && defined( __LITTLE_ENDIAN ) +#error CPU endian conflict!!! +#elif defined(__BYTE_ORDER) +#if __BYTE_ORDER == __BIG_ENDIAN +#error CPU endian conflict!!! +#endif +#elif defined( __BIG_ENDIAN ) +#error CPU endian conflict!!! +#endif + +/*! + * CPU architecture dependent 32, 16, 8 bit read/write IO addresses + */ +#if defined(BERLIN_SINGLE_CPU) && !defined(__LINUX_KERNEL__) +#define MV_MEMIO32_WRITE(addr, data) ((*((volatile unsigned int *)devmem_phy_to_virt(addr))) = ((unsigned int)(data))) +#define MV_MEMIO32_READ(addr) ((*((volatile unsigned int *)devmem_phy_to_virt(addr)))) +#define MV_MEMIO16_WRITE(addr, data) ((*((volatile unsigned short *)devmem_phy_to_virt(addr))) = ((unsigned short)(data))) +#define MV_MEMIO16_READ(addr) ((*((volatile unsigned short *)devmem_phy_to_virt(addr)))) +#define MV_MEMIO08_WRITE(addr, data) ((*((volatile unsigned char *)devmem_phy_to_virt(addr))) = ((unsigned char)(data))) +#define MV_MEMIO08_READ(addr) ((*((volatile unsigned char *)devmem_phy_to_virt(addr)))) +#else +#define MV_MEMIO32_WRITE(addr, data) ((*((volatile unsigned int*)(addr))) = ((unsigned int)(data))) +#define MV_MEMIO32_READ(addr) ((*((volatile unsigned int*)(addr)))) +#define MV_MEMIO16_WRITE(addr, data) ((*((volatile unsigned short*)(addr))) = ((unsigned short)(data))) +#define MV_MEMIO16_READ(addr) ((*((volatile unsigned short*)(addr)))) +#define MV_MEMIO08_WRITE(addr, data) ((*((volatile unsigned char*)(addr))) = ((unsigned char)(data))) +#define MV_MEMIO08_READ(addr) ((*((volatile unsigned char*)(addr)))) +#endif + +/*! + * No Fast Swap implementation (in assembler) for ARM + */ +#define MV_32BIT_LE_FAST(val) MV_32BIT_LE(val) +#define MV_16BIT_LE_FAST(val) MV_16BIT_LE(val) +#define MV_32BIT_BE_FAST(val) MV_32BIT_BE(val) +#define MV_16BIT_BE_FAST(val) MV_16BIT_BE(val) + +/*! + * 32 and 16 bit read/write in big/little endian mode + */ + +/*! + * 16bit write in little endian mode + */ +#define MV_MEMIO_LE16_WRITE(addr, data) MV_MEMIO16_WRITE(addr, MV_16BIT_LE_FAST(data)) + +/*! + * 16bit read in little endian mode + */ +#define MV_MEMIO_LE16_READ(addr) MV_16BIT_LE_FAST((MV_U16)(MV_MEMIO16_READ((MV_U32)(addr)))) + +/*! + * 32bit write in little endian mode + */ +#define MV_MEMIO_LE32_WRITE(addr, data) MV_MEMIO32_WRITE(addr, MV_32BIT_LE_FAST(data)) + +/*! + * 32bit read in little endian mode + */ +#define MV_MEMIO_LE32_READ(addr) MV_32BIT_LE_FAST((MV_U32)(MV_MEMIO32_READ((MV_U32)(addr)))) + +/*! + * Generate 32bit mask + */ +#define GA_REG_MASK(bits, l_shift) ((bits) ? (((bits) < 32) ? (((1uL << (bits)) - 1) << (l_shift)) : (0xFFFFFFFFuL << (l_shift))) : 0) + +/*! + * Galois's register address translate + */ +#if (defined(__MEMIO_DIRECT)) +# ifndef INTER_REGS_BASE +# define INTER_REGS_BASE 0 +# endif + +# define REG_ADDR(offset) ((MV_U32)(INTER_REGS_BASE | (offset))) + +#elif (defined(__MEMIO_PCIE)) + /*! + * After ioremap the value in BAR1, got IO base address. value in BAR0 is for PCI-e core, BAR1 is for galois + */ +# define REG_ADDR(offset) ((MV_U32)(gu32_galois_pcie_ioremap_base + (offset))) + +#else +# define REG_ADDR(offset) ((MV_U32)(offset)) + +#endif + +/*! + * Galois controller register read/write macros + * + * offset -- address offset (32bits) + * holder -- pointer to the variable that will be used to store the data being read in. + * val -- variable contains the data that will be written out. + * bitMask -- variable contains the data (32bits) that will be written out. + * clearMask -- variable contains the mask (32bits) that will be used to clear the corresponding bits. + * + * GA_REG_WORD32_READ(offset, holder) -- Read a Double-Word (32bits) from 'offset' to 'holder' + * GA_REG_WORD16_READ(offset, holder) -- Read a Word (16bits) from 'offset' to 'holder' + * GA_REG_BYTE_READ(offset, holder) -- Read a Byte (8bits) from 'offset' to 'holder' + * + * GA_REG_WORD32_WRITE(offset, val) -- Write a Double-Word (32bits) to 'offset' + * GA_REG_WORD16_WRITE(offset, val) -- Write a Word (16bits) to 'offset' + * GA_REG_BYTE_WIRTE(offset, val) -- Write a Byte (8bits) to 'offset' + * + * GA_REG_WORD32_BIT_SET(offset, bitMask) -- Set bits to '1b' at 'offset', 'bitMask' should only be used to set '1b' for corresponding bits. + * GA_REG_WORD32_BITS_SET(offset, clearMask, val) -- Clear the bits to zero for the bits in clearMask are '1b' and write 'val' to 'offset'. + * GA_REG_WORD32_BIT_CLEAR(offset, clearMask) -- Clear the bits to zero for the bits in bitMask are '1b' + * + */ +#if (defined(__MEMIO_DIRECT)) + +#if defined(BERLIN_SINGLE_CPU) && !defined(__LINUX_KERNEL__) +//temp use this, 'cause the cpu endian definition has confliction +# define GA_REG_WORD32_READ(offset, holder) (*(holder) = (*((volatile unsigned int *)devmem_phy_to_virt(offset)))) +#else +# define GA_REG_WORD32_READ(offset, holder) (*(holder) = MV_MEMIO_LE32_READ(REG_ADDR(offset))) +#endif +# define GA_REG_WORD16_READ(offset, holder) (*(holder) = MV_MEMIO_LE16_READ(REG_ADDR(offset))) +# define GA_REG_BYTE_READ(offset, holder) (*(holder) = MV_MEMIO08_READ(REG_ADDR(offset))) + +#if defined(BERLIN_SINGLE_CPU) && !defined(__LINUX_KERNEL__) +# define GA_REG_WORD32_WRITE(addr, data) ((*((volatile unsigned int *)devmem_phy_to_virt(addr))) = ((unsigned int)(data))) +#else +# define GA_REG_WORD32_WRITE(offset, val) (MV_MEMIO_LE32_WRITE(REG_ADDR(offset), (MV_U32)(val))) +#endif +# define GA_REG_WORD16_WRITE(offset, val) (MV_MEMIO_LE16_WRITE(REG_ADDR(offset), (MV_U16)(val))) +# define GA_REG_BYTE_WRITE(offset, val) (MV_MEMIO08_WRITE(REG_ADDR(offset), (MV_U8)(val))) + +# define GA_REG_WORD32_BIT_SET(offset, bitMask) (MV_MEMIO32_WRITE(REG_ADDR(offset), \ + (MV_MEMIO_LE32_READ(REG_ADDR(offset)) | MV_32BIT_LE_FAST(bitMask)))) +# define GA_REG_WORD32_BITS_SET(offset, clearMask, val) \ + (MV_MEMIO32_WRITE(REG_ADDR(offset), \ + ((MV_MEMIO_LE32_READ(REG_ADDR(offset)) & MV_32BIT_LE_FAST(~(clearMask)))\ + | MV_32BIT_LE_FAST(val)))) +# define GA_REG_WORD32_BIT_CLEAR(offset, clearMask) \ + (MV_MEMIO32_WRITE(REG_ADDR(offset), \ + (MV_MEMIO_LE32_READ(REG_ADDR(offset)) & MV_32BIT_LE_FAST(~(clearMask))))) + +#elif (defined(__MEMIO_PCIE)) +/*! + * System dependent little endian from / to CPU conversions + */ +# define MV_CPU_TO_LE16(x) cpu_to_le16(x) +# define MV_CPU_TO_LE32(x) cpu_to_le32(x) + +# define MV_LE16_TO_CPU(x) le16_to_cpu(x) +# define MV_LE32_TO_CPU(x) le32_to_cpu(x) + +/*! + * System dependent register read / write in byte/word16/word32 variants + */ +# define GA_REG_WORD32_READ(offset, holder) (*(holder) = MV_LE32_TO_CPU(readl(REG_ADDR(offset)))) +# define GA_REG_WORD16_READ(offset, holder) (*(holder) = MV_LE16_TO_CPU(readw(REG_ADDR(offset)))) +# define GA_REG_BYTE_READ(offset, holder) (*(holder) = readb(REG_ADDR(offset))) + +# define GA_REG_WORD32_WRITE(offset, val) writel(MV_CPU_TO_LE32((MV_U32)(val)), REG_ADDR(offset)) +# define GA_REG_WORD16_WRITE(offset, val) writew(MV_CPU_TO_LE16((MV_U16)(val)), REG_ADDR(offset)) +# define GA_REG_BYTE_WRITE(offset, val) writeb((MV_U8)(val), REG_ADDR(offset)) + +# define GA_REG_WORD32_BIT_SET(offset, bitMask) writel((readl(REG_ADDR(offset)) | MV_CPU_TO_LE32(bitMask)), REG_ADDR(offset)) +# define GA_REG_WORD32_BITS_SET(offset, clearMask, val) \ + writel(((readl(REG_ADDR(offset)) & MV_CPU_TO_LE32(~(clearMask))) \ + | MV_CPU_TO_LE32(val)), REG_ADDR(offset)) +# define GA_REG_WORD32_BIT_CLEAR(offset, clearMask) \ + writel((readl(REG_ADDR(offset)) & MV_CPU_TO_LE32(~(clearMask))), REG_ADDR(offset)) + +#elif (defined(__MMIO_SOCKET)) +# define GA_REG_WORD32_READ(offset, holder) (assert(BFM_HOST_Bus_Read32(REG_ADDR(offset), (MV_U32 *)(holder)) >= 0)) +# define GA_REG_WORD16_READ(offset, holder) (assert(BFM_HOST_Bus_Read16(REG_ADDR(offset), (MV_U16 *)(holder)) >= 0)) +# define GA_REG_BYTE_READ(offset, holder) (assert(BFM_HOST_Bus_Read8(REG_ADDR(offset), (MV_U8 *)(holder)) >= 0)) + +# define GA_REG_WORD32_WRITE(offset, val) (assert(BFM_Host_Bus_Write32(REG_ADDR(offset), (MV_U32)(val)) >= 0)) +# define GA_REG_WORD16_WRITE(offset, val) (assert(BFM_Host_Bus_Write16(REG_ADDR(offset), (MV_U16)(val)) >= 0)) +# define GA_REG_BYTE_WRITE(offset, val) (assert(BFM_Host_Bus_Write8(REG_ADDR(offset), (MV_U8)(val)) >= 0)) + +# define GA_REG_WORD32_BIT_SET(offset, bitMask) \ + do { \ + MV_U32 temp; \ + \ + GA_REG_WORD32_READ(offset, &temp); \ + temp |= (bitMask); \ + GA_REG_WORD32_WRITE(offset, temp); \ + } while (0) + +# define GA_REG_WORD32_BITS_SET(offset, clearMask, val) \ + do { \ + MV_U32 temp; \ + \ + GA_REG_WORD32_READ(offset, &temp); \ + temp &= ~(clearMask); \ + temp |= val; \ + GA_REG_WORD32_WRITE(offset, temp); \ + } while (0) + +# define GA_REG_WORD32_BIT_CLEAR(offset, clearMask) \ + do { \ + MV_U32 temp; \ + \ + GA_REG_WORD32_READ(offset, &temp); \ + temp &= ~(clearMask); \ + GA_REG_WORD32_WRITE(offset, temp); \ + } while (0) + +#else +# error "MEMI/O way not selected" + +#endif /* __MEMIO_SOCKET || __MEMIO_PCIE || __MEMIO_DIRECT */ + +#endif /* __GALOIS_IO_H__ */ diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/galois_type.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/galois_type.h new file mode 100644 index 00000000..1337ca73 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/galois_type.h @@ -0,0 +1,178 @@ +/******************************************************************************* + * Copyright (C) Marvell International Ltd. and its affiliates + * + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * alternative licensing terms. Once you have made an election to distribute the + * File under one of the following license alternatives, please (i) delete this + * introductory statement regarding license alternatives, (ii) delete the two + * license alternatives that you have not elected to use and (iii) preserve the + * Marvell copyright notice above. + * + ******************************************************************************* + * Marvell Commercial License Option + * + * If you received this File from Marvell and you have entered into a commercial + * license agreement (a "Commercial License") with Marvell, the File is licensed + * to you under the terms of the applicable Commercial License. + * + ******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************** + * Marvell BSD License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File under the following licensing terms. + * 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 Marvell 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. + * + *******************************************************************************/ + +#ifndef __GALOIS_TYPE_H__ +#define __GALOIS_TYPE_H__ + +/*! + * Defines + * The following is a list of Marvell status + */ +#define MV_ERROR (int)(-1) +#define MV_INVALID (int)(-1) +#define MV_FALSE 0 +#define MV_TRUE (!(MV_FALSE)) + +#define MV_OK (0x00) /* Operation succeeded */ +#define MV_FAIL (0x01) /* Operation failed */ +#define MV_BAD_VALUE (0x02) /* Illegal value (general) */ +#define MV_OUT_OF_RANGE (0x03) /* The value is out of range */ +#define MV_BAD_PARAM (0x04) /* Illegal parameter in function called */ +#define MV_BAD_PTR (0x05) /* Illegal pointer value */ +#define MV_BAD_SIZE (0x06) /* Illegal size */ +#define MV_BAD_STATE (0x07) /* Illegal state of state machine */ +#define MV_SET_ERROR (0x08) /* Set operation failed */ +#define MV_GET_ERROR (0x09) /* Get operation failed */ +#define MV_CREATE_ERROR (0x0A) /* Fail while creating an item */ +#define MV_NOT_FOUND (0x0B) /* Item not found */ +#define MV_NO_MORE (0x0C) /* No more items found */ +#define MV_NO_SUCH (0x0D) /* No such item */ +#define MV_TIMEOUT (0x0E) /* Time Out */ +#define MV_NO_CHANGE (0x0F) /* Parameter(s) is already in this value */ +#define MV_NOT_SUPPORTED (0x10) /* This request is not support */ +#define MV_NOT_IMPLEMENTED (0x11) /* Request supported but not implemented */ +#define MV_NOT_INITIALIZED (0x12) /* The item is not initialized */ +#define MV_NO_RESOURCE (0x13) /* Resource not available (memory ...) */ +#define MV_FULL (0x14) /* Item is full (Queue or table etc...) */ +#define MV_EMPTY (0x15) /* Item is empty (Queue or table etc...) */ +#define MV_INIT_ERROR (0x16) /* Error occured while INIT process */ +#define MV_HW_ERROR (0x17) /* Hardware error */ +#define MV_TX_ERROR (0x18) /* Transmit operation not succeeded */ +#define MV_RX_ERROR (0x19) /* Recieve operation not succeeded */ +#define MV_NOT_READY (0x1A) /* The other side is not ready yet */ +#define MV_ALREADY_EXIST (0x1B) /* Tried to create existing item */ +#define MV_OUT_OF_CPU_MEM (0x1C) /* Cpu memory allocation failed. */ +#define MV_NOT_STARTED (0x1D) /* Not started yet */ +#define MV_BUSY (0x1E) /* Item is busy. */ +#define MV_TERMINATE (0x1F) /* Item terminates it's work. */ +#define MV_NOT_ALIGNED (0x20) /* Wrong alignment */ +#define MV_NOT_ALLOWED (0x21) /* Operation NOT allowed */ +#define MV_WRITE_PROTECT (0x22) /* Write protected */ + + +#ifndef NULL +#define NULL ((void*)0) +#endif + + +/*! + * Defines + * The following is a list of Marvell type definition + */ +typedef float MV_FLOAT; +typedef double MV_BOUBLE; + +typedef char MV_8; +typedef unsigned char MV_U8; +typedef short MV_16; +typedef unsigned short MV_U16; +typedef void MV_VOID; + + +#if (defined(WIN32)) +# include +# include + + typedef unsigned int MV_U32; + typedef signed int MV_32; + typedef unsigned __int64 MV_U64; + typedef signed __int64 MV_64; +/*--------------------------------------------------------------------------- + ARMCC (RVCT) + ---------------------------------------------------------------------------*/ +#elif defined (__ARMCC_VERSION) + + typedef unsigned int MV_U32; + typedef signed int MV_32; + typedef unsigned long long MV_U64; + typedef signed long long MV_64; + +#elif (defined(__GNUC__)) +#if defined(__UBOOT__) || defined(__LINUX_KERNEL__) || defined(NON_OS) +#else +# include +# include +# include +#endif +#if 0 + typedef __uint32_t MV_U32; + typedef __int32_t MV_32; + typedef __uint64_t MV_U64; + typedef __int64_t MV_64; +#else + typedef unsigned long MV_U32; + typedef signed long MV_32; + typedef unsigned long long MV_U64; + typedef signed long long MV_64; +#endif + +#else + typedef unsigned long MV_U32; + typedef signed long MV_32; + typedef unsigned long long MV_U64; + typedef signed long long MV_64; + +#endif +#endif /* __GALOIS_TYPE_H__ */ + diff --git a/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/zspWrapper.h b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/zspWrapper.h new file mode 100644 index 00000000..c808c9d2 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/asinc/bg2cdp/zspWrapper.h @@ -0,0 +1,57 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the GPL License), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + +#ifndef zspWrapper_h +#define zspWrapper_h (){} + + #define RA_ZspGlobalRegs_subsys_reset 0x0000 + #define RA_ZspGlobalRegs_core_reset 0x0004 + #define RA_ZspGlobalRegs_clock_ctrl 0x0008 + #define RA_ZspGlobalRegs_ext_bp 0x000C + #define RA_ZspGlobalRegs_halt 0x0010 + #define RA_ZspGlobalRegs_status 0x0014 + #define RA_ZspGlobalRegs_svtaddr 0x001C + #define RA_ZspInt2Zsp_status 0x0000 + #define RA_ZspInt2Zsp_set 0x0004 + #define RA_ZspInt2Zsp_clear 0x0008 + #define RA_ZspInt2Soc_status 0x0000 + #define RA_ZspInt2Soc_set 0x0004 + #define RA_ZspInt2Soc_clear 0x0008 + #define RA_ZspInt2Soc_enable 0x000C + #define RA_ZspDmaRegs_srcAddr 0x0000 + #define RA_ZspDmaRegs_desAddr 0x0004 + #define RA_ZspDmaRegs_config 0x0008 + #define RA_ZspDmaRegs_status 0x000C + #define RA_ZspRegs_ITCM 0x0000 + #define RA_ZspRegs_DTCM 0x20000 + #define RA_ZspRegs_PMEM 0x40000 + #define RA_ZspRegs_ZXBAR 0x60000 + #define RA_ZspRegs_Global 0x64000 + #define RA_ZspRegs_Int2Zsp 0x64400 + #define RA_ZspRegs_Int2Soc 0x64600 + #define RA_ZspRegs_DMA 0x64800 + + + typedef union T32ZspInt2Soc_status + { UNSG32 u32; + struct w32ZspInt2Soc_status; + } T32ZspInt2Soc_status; + + +#endif diff --git a/arch/arm/mach-berlin/modules/amp/avio_dhub_drv.c b/arch/arm/mach-berlin/modules/amp/avio_dhub_drv.c new file mode 100644 index 00000000..fe6c42e1 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/avio_dhub_drv.c @@ -0,0 +1,231 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + +#include "api_avio_dhub.h" + +HDL_dhub2d AG_dhubHandle; +HDL_dhub2d VPP_dhubHandle; +#if (BERLIN_CHIP_VERSION >= BERLIN_BG2) +HDL_dhub2d VIP_dhubHandle; +#endif + +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + +DHUB_channel_config VPP_config[VPP_NUM_OF_CHANNELS_Z1] = { + // BANK0 + { avioDhubChMap_vpp_MV_R, VPP_DHUB_BANK0_START_ADDR, VPP_DHUB_BANK0_START_ADDR+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_MV_FRC_R, VPP_DHUB_BANK0_START_ADDR + 2048*2, VPP_DHUB_BANK0_START_ADDR + 2048*2+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_MV_FRC_W, VPP_DHUB_BANK0_START_ADDR + 2048*3, VPP_DHUB_BANK0_START_ADDR + 2048*3+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // BANK1 + { avioDhubChMap_vpp_DINT0_R_Z1,VPP_DHUB_BANK1_START_ADDR, VPP_DHUB_BANK1_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // BANK2 + { avioDhubChMap_vpp_DINT1_R_Z1,VPP_DHUB_BANK2_START_ADDR, VPP_DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // BANK3 + { avioDhubChMap_vpp_DINT_W_Z1,VPP_DHUB_BANK3_START_ADDR, VPP_DHUB_BANK3_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // Bank4 + { avioDhubChMap_vpp_BCM_R_Z1, VPP_DHUB_BANK4_START_ADDR, VPP_DHUB_BANK4_START_ADDR+128, 128, (1024-128), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_HDMI_R_Z1, VPP_DHUB_BANK4_START_ADDR+1024, VPP_DHUB_BANK4_START_ADDR+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + +#if 0 /* not in use */ + { avioDhubChMap_vpp_AUX_FRC_R_Z1,DHUB_BANK5_START_ADDR+1024*2, DHUB_BANK5_START_ADDR+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_AUX_FRC_W_Z1,DHUB_BANK5_START_ADDR+1024*3, DHUB_BANK5_START_ADDR+1024*3+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_TT_R_Z1,DHUB_BANK5_START_ADDR+1024*4, DHUB_BANK5_START_ADDR+1024*4+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1} +#endif +}; + +DHUB_channel_config AG_config[AG_NUM_OF_CHANNELS_Z1] = { + // Bank0 + { avioDhubChMap_ag_APPCMD_R_Z1, AG_DHUB_BANK0_START_ADDR, AG_DHUB_BANK0_START_ADDR+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA0_R_Z1, AG_DHUB_BANK0_START_ADDR+512, AG_DHUB_BANK0_START_ADDR+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA1_R_Z1, AG_DHUB_BANK0_START_ADDR+512+1024,AG_DHUB_BANK0_START_ADDR+512+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA2_R_Z1, AG_DHUB_BANK0_START_ADDR+512+1024*2,AG_DHUB_BANK0_START_ADDR+512+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA3_R_Z1, AG_DHUB_BANK0_START_ADDR+512+1024*3,AG_DHUB_BANK0_START_ADDR+512+1024*3+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_SA_R_Z1, AG_DHUB_BANK0_START_ADDR+512+1024*4,AG_DHUB_BANK0_START_ADDR+512+1024*4+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_SPDIF_R_Z1, AG_DHUB_BANK0_START_ADDR+512+1024*5, AG_DHUB_BANK0_START_ADDR+512+1024*5+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_APPDAT_R_Z1, AG_DHUB_BANK0_START_ADDR+512+1024*6, AG_DHUB_BANK0_START_ADDR+512+1024*6+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_APPDAT_W_Z1, AG_DHUB_BANK0_START_ADDR+1024*7, AG_DHUB_BANK0_START_ADDR+1024*7+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // Bank1 + { avioDhubChMap_ag_CSR_R_Z1, AG_DHUB_BANK1_START_ADDR, AG_DHUB_BANK1_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // Bank2 + { avioDhubChMap_ag_GFX_R_Z1, AG_DHUB_BANK2_START_ADDR, AG_DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, +}; + +DHUB_channel_config VPP_config_a0[VPP_NUM_OF_CHANNELS_A0] = { + // BANK0 + { avioDhubChMap_vpp_MV_R, DHUB_BANK0_START_ADDR, DHUB_BANK0_START_ADDR+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_MV_FRC_R, DHUB_BANK0_START_ADDR + 2048*2, DHUB_BANK0_START_ADDR + 2048*2+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_MV_FRC_W, DHUB_BANK0_START_ADDR + 2048*3, DHUB_BANK0_START_ADDR + 2048*3+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // Bank1 + { avioDhubChMap_vpp_BCM_R_A0, DHUB_BANK1_START_ADDR, DHUB_BANK1_START_ADDR+128, 128, (2048-128), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_HDMI_R_A0, DHUB_BANK1_START_ADDR+2048, DHUB_BANK1_START_ADDR+2048+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, +}; + + +DHUB_channel_config AG_config_a0[AG_NUM_OF_CHANNELS_A0] = { + // Bank0 + { avioDhubChMap_ag_MA0_R_A0, AG_DHUB_BANK0_START_ADDR, AG_DHUB_BANK0_START_ADDR+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA1_R_A0, AG_DHUB_BANK0_START_ADDR+512,AG_DHUB_BANK0_START_ADDR+512+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA2_R_A0, AG_DHUB_BANK0_START_ADDR+512*2,AG_DHUB_BANK0_START_ADDR+512*2+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA3_R_A0, AG_DHUB_BANK0_START_ADDR+512*3,AG_DHUB_BANK0_START_ADDR+512*3+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_SA0_R_A0, AG_DHUB_BANK0_START_ADDR+512*4,AG_DHUB_BANK0_START_ADDR+512*4+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MIC0_W_A0, AG_DHUB_BANK0_START_ADDR+1024*3, AG_DHUB_BANK0_START_ADDR+1024*3+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MIC1_W_A0, AG_DHUB_BANK0_START_ADDR+512+1024*3, AG_DHUB_BANK0_START_ADDR+512+1024*3+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // Bank1 + { avioDhubChMap_ag_CSR_R_A0, AG_DHUB_BANK1_START_ADDR, AG_DHUB_BANK1_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // Bank2 + { avioDhubChMap_ag_GFX_R_A0, AG_DHUB_BANK2_START_ADDR, AG_DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, +}; + +#else /* only BG2CDP is supported */ +#error +#endif + +/****************************************************************************************************************** + * Function: GetChannelInfo + * Description: Get the Dhub configuration of requested channel. + * Parameter : pdhubHandle ----- pointer to 2D dhubHandle + * IChannel ----- Channel of the dhub + * cfg ----- Configuration need to be updated here. + * Return: 0 ---- Success +******************************************************************************************************************/ +#if (BERLIN_CHIP_VERSION >= BERLIN_BG2_CT) +int getDhubChannelInfo(HDL_dhub2d *pdhubHandle, SIGN32 IChannel, T32dHubChannel_CFG *cfg) +{ + DHUB_channel_config *dhub_config; + //Get the Dhub Config array from the received handle + if(pdhubHandle == &VPP_dhubHandle) + { + dhub_config = VPP_config; + } + if(pdhubHandle == &AG_dhubHandle) + { + dhub_config = AG_config; + } + //Update the MTU, QOS and self loop paramteres. + cfg->uCFG_MTU = dhub_config[IChannel].chanMtuSize; + cfg->uCFG_QoS = dhub_config[IChannel].chanQos; + cfg->uCFG_selfLoop = dhub_config[IChannel].chanSelfLoop; + + return 0; +} +#endif + +/****************************************************************************************************************** + * Function: DhubInitialization + * Description: Initialize DHUB . + * Parameter : cpuId ------------- cpu ID + * dHubBaseAddr ------------- dHub Base address. + * hboSramAddr ----- Sram Address for HBO. + * pdhubHandle ----- pointer to 2D dhubHandle + * dhub_config ----- configuration of AG + * numOfChans ----- number of channels + * Return: void +******************************************************************************************************************/ +void DhubInitialization(SIGN32 cpuId, UNSG32 dHubBaseAddr, UNSG32 hboSramAddr, HDL_dhub2d *pdhubHandle, DHUB_channel_config *dhub_config,SIGN32 numOfChans) +{ + HDL_semaphore *pSemHandle; + SIGN32 i; + SIGN32 chanId; + + //Initialize HDL_dhub with a $dHub BIU instance. + dhub2d_hdl( hboSramAddr, /*! Base address of dHub.HBO SRAM !*/ + dHubBaseAddr, /*! Base address of a BIU instance of $dHub !*/ + pdhubHandle /*! Handle to HDL_dhub2d !*/ + ); + //set up semaphore to trigger cmd done interrupt + //note that this set of semaphores are different from the HBO semaphores + //the ID must match the dhub ID because they are hardwired. + pSemHandle = dhub_semaphore(&pdhubHandle->dhub); + + for (i = 0; i< numOfChans; i++) { + //Configurate a dHub channel + //note that in this function, it also configured right HBO channels(cmdQ and dataQ) and semaphores + chanId = dhub_config[i].chanId; + { + dhub_channel_cfg( + &pdhubHandle->dhub, /*! Handle to HDL_dhub !*/ + chanId, /*! Channel ID in $dHubReg !*/ + dhub_config[chanId].chanCmdBase, //UNSG32 baseCmd, /*! Channel FIFO base address (byte address) for cmdQ !*/ + dhub_config[chanId].chanDataBase, //UNSG32 baseData, /*! Channel FIFO base address (byte address) for dataQ !*/ + dhub_config[chanId].chanCmdSize/8, //SIGN32 depthCmd, /*! Channel FIFO depth for cmdQ, in 64b word !*/ + dhub_config[chanId].chanDataSize/8, //SIGN32 depthData, /*! Channel FIFO depth for dataQ, in 64b word !*/ + dhub_config[chanId].chanMtuSize, /*! See 'dHubChannel.CFG.MTU', 0/1/2 for 8/32/128 bytes !*/ + dhub_config[chanId].chanQos, /*! See 'dHubChannel.CFG.QoS' !*/ + dhub_config[chanId].chanSelfLoop, /*! See 'dHubChannel.CFG.selfLoop' !*/ + dhub_config[chanId].chanEnable, /*! 0 to disable, 1 to enable !*/ + 0 /*! Pass NULL to directly init dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + // setup interrupt for channel chanId + //configure the semaphore depth to be 1 + semaphore_cfg(pSemHandle, chanId, 1, 0); +#if 0 + // enable interrupt from this semaphore + semaphore_intr_enable ( + pSemHandle, // semaphore handler + chanId, + 0, // empty + 1, // full + 0, // almost_empty + 0, // almost_full + cpuId // 0~2, depending on which CPU the interrupt is enabled for. + ); +#endif + } + } +} + +/****************************************************************************************************************** + * Function: DhubChannelClear + * Description: Clear corresponding DHUB channel. + * Parameter: hdl ---------- handle to HDL_dhub + * id ---------- channel ID in dHubReg + * cfgQ ---------- pass null to directly init dhub, or pass non-zero to receive programming + * sequence in (adr, data) pairs + * Return: void +******************************************************************************************************************/ +void DhubChannelClear(void *hdl, SIGN32 id, T64b cfgQ[]) +{ + UNSG32 cmdID = dhub_id2hbo_cmdQ(id); + UNSG32 dataID = dhub_id2hbo_data(id); + HDL_dhub *dhub = (HDL_dhub *)hdl; + HDL_hbo *hbo = &(dhub->hbo); + + /* 1.Software stops the command queue in HBO (please refer to HBO.sxw for details) */ + hbo_queue_enable(hbo, cmdID, 0, cfgQ); + /* 2.Software stops the channel in dHub by writing zero to dHubChannel.START.EN */ + dhub_channel_enable(dhub, id, 0, cfgQ); + /* 3.Software clears the channel in dHub by writing one to dHubChannel.CLEAR.EN */ + dhub_channel_clear(dhub, id); + /* 4.Software waits for the register bits dHubChannel.PENDING.ST and dHubChannel.BUSY.ST to be 0 */ + dhub_channel_clear_done(dhub, id); + /* 5.Software stops and clears the command queue */ + hbo_queue_enable(hbo, cmdID, 0, cfgQ); + hbo_queue_clear(hbo, cmdID); + /* 6.Software wait for the corresponding busy bit to be 0 */ + hbo_queue_clear_done(hbo, cmdID); + /* 7.Software stops and clears the data queue */ + hbo_queue_enable(hbo, dataID, 0, cfgQ); + hbo_queue_clear(hbo, dataID); + /* 8.Software wait for the corresponding data Q busy bit to be 0 */ + hbo_queue_clear_done(hbo, dataID); + /* 9.Software enable dHub and HBO */ + dhub_channel_enable(dhub, id, 1, cfgQ); + hbo_queue_enable(hbo, cmdID, 1, cfgQ); + hbo_queue_enable(hbo, dataID, 1, cfgQ); +} diff --git a/arch/arm/mach-berlin/modules/amp/vmeta_sched_driver.c b/arch/arm/mach-berlin/modules/amp/vmeta_sched_driver.c new file mode 100644 index 00000000..e0b9a523 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/vmeta_sched_driver.c @@ -0,0 +1,349 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ********************************************************************************/ + +/******************************************************************************* + System head files +*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/******************************************************************************* + Local head files +*/ +#include "vmeta_sched_priv.h" + +/******************************************************************************* + Macro Defined + */ +#define VMETA_TAG "[vmeta_scheduler]" +#define VMETA_STATUS "status" + +#define vmeta_trace(...) \ + if (enable_trace != '0') { \ + printk(KERN_WARNING VMETA_TAG __VA_ARGS__); \ + } + +#define vmeta_error(...) printk(KERN_ERR VMETA_TAG __VA_ARGS__) + +static int vmeta_driver_open(struct inode *inode, struct file *filp); +static int vmeta_driver_release(struct inode *inode, struct file *filp); +static long vmeta_driver_ioctl_unlocked(struct file *filp, unsigned int cmd, + unsigned long arg); + +/******************************************************************************* + Module Variable +*/ +typedef struct { + struct file *filp[MAX_SCHED_SLOTS_NUMBER]; + bool is_waiting[MAX_SCHED_SLOTS_NUMBER]; + wait_queue_head_t wait_head[MAX_SCHED_SLOTS_NUMBER]; + + int owner; + unsigned int user_count; +} vmeta_scheduler; + +static vmeta_scheduler *g_sched = NULL; +static struct cdev vmeta_dev; +static struct class *vmeta_dev_class; +static struct proc_dir_entry *vmeta_driver_procdir; +static struct proc_dir_entry *vmeta_driver_state; +static int vmeta_major, vmeta_minor; +static char enable_trace = '0'; + +static struct file_operations vmeta_ops = { + .open = vmeta_driver_open, + .release = vmeta_driver_release, + .unlocked_ioctl = vmeta_driver_ioctl_unlocked, + .owner = THIS_MODULE, +}; + +static DEFINE_SPINLOCK(vmeta_spinlock); + +/******************************************************************************* + Module API + */ +static int read_proc_status(char *page, char **start, off_t offset, + int count, int *eof, void *data) { + int len = 0; + int i = 0; + + spin_lock(&vmeta_spinlock); + len += sprintf(page + len, "vmeta user count %d, owner %d\n", + g_sched->user_count, g_sched->owner); + for (i = 0; i < MAX_SCHED_SLOTS_NUMBER; i++) { + len += sprintf(page + len, "slot %d filp %p waiting %d\n", + i, g_sched->filp[i], g_sched->is_waiting[i]); + } + spin_unlock(&vmeta_spinlock); + *eof = 1; + return ((count < len) ? count : len); +} + +ssize_t write_proc_status(struct file *filp, const char __user *buff, + unsigned long len, void *data) { + if (copy_from_user(&enable_trace, buff, 1)) { + return -EFAULT; + } + return len; +} + +static int get_index_locked(struct file *filp) { + int i = 0; + for (i = 0; i < MAX_SCHED_SLOTS_NUMBER; i++) { + if (filp == g_sched->filp[i]) + return i; + } + return -1; +} + +static int vmeta_driver_open(struct inode *inode, struct file *filp) { + int i = 0; + + spin_lock(&vmeta_spinlock); + if (g_sched->user_count < MAX_SCHED_SLOTS_NUMBER) { + for (i = 0; i < MAX_SCHED_SLOTS_NUMBER; i++) { + if (!g_sched->filp[i]) { + g_sched->filp[i] = filp; + init_waitqueue_head(&g_sched->wait_head[i]); + g_sched->user_count++; + + vmeta_trace("%p.%d: slot open\n", filp, i); + spin_unlock(&vmeta_spinlock); + return 0; + } + } + } + spin_unlock(&vmeta_spinlock); + vmeta_error("run out of vmeta scheduler slots!\n"); + return -1; +} + +static int vmeta_driver_release(struct inode *inode, struct file *filp) { + int index; + + spin_lock(&vmeta_spinlock); + index = get_index_locked(filp); + if (index >= 0) { + g_sched->filp[index] = NULL; + g_sched->user_count--; + + // All players gone, reset owner. + if (g_sched->user_count == 0) + g_sched->owner = -1; + + vmeta_trace("%p.%d: slot release\n", filp, index); + spin_unlock(&vmeta_spinlock); + return 0; + } + spin_unlock(&vmeta_spinlock); + vmeta_error("error in release vmeta scheduler slot!\n"); + return -1; +} + +static int get_next_player_locked(int index) { + int next; + int curr = index; + + do { + next = (++curr) % MAX_SCHED_SLOTS_NUMBER; + if ((g_sched->filp[next] != NULL) && + (g_sched->is_waiting[next] == true)) { + return next; + } + } while(next != index); + + return index; +} + +static long vmeta_driver_ioctl_unlocked(struct file *filp, unsigned int cmd, + unsigned long arg) { + int index, next; + int res = 0; + char result; + + spin_lock(&vmeta_spinlock); + index = get_index_locked(filp); + + switch(cmd) { + case VMETA_IOCTL_LOCK: + if (g_sched->owner == -1) { + // Only one player. + g_sched->owner = index; + } else if (g_sched->owner != index) { + g_sched->is_waiting[index] = true; + + spin_unlock(&vmeta_spinlock); + interruptible_sleep_on(&g_sched->wait_head[index]); + spin_lock(&vmeta_spinlock); + + g_sched->is_waiting[index] = false; + } + + // Only two results for lock, "Approved" or "Canceled". + if (g_sched->owner == index) { + vmeta_trace("%p.%d: approved vmeta\n", filp, index); + result = VMETA_CMD_APPROVED; + } else { + vmeta_trace("%p.%d: canceled vmeta\n", filp, index); + result = VMETA_CMD_CANCELED; + } + res = copy_to_user((void __user *)arg, + (const void *)&result, VMETA_RESULT_SIZE); + break; + + case VMETA_IOCTL_UNLOCK: + if (g_sched->owner != index) { + vmeta_error("%p: release while don't have ownership\n", filp); + res = -1; + } else { + next = get_next_player_locked(index); + if (next != index) { + g_sched->owner = next; + vmeta_trace("%p.%d: release vmeta to %d\n", filp, index, next); + wake_up(&g_sched->wait_head[next]); + } + } + break; + + case VMETA_IOCTL_CANCEL: + if (g_sched->is_waiting[index] == true) { + g_sched->is_waiting[index] = false; + wake_up(&g_sched->wait_head[index]); + } else { + vmeta_trace("%p.%d: no need to cancel\n", filp, index); + } + break; + case VMETA_IOCTL_WAITINT: + // TODO: handle vmeta interrupt here. + break; + } + + spin_unlock(&vmeta_spinlock); + return res; +} +/******************************************************************************* + Module Register API + */ +static int vmeta_driver_setup_cdev(struct cdev *dev, int major, int minor, + struct file_operations *fops) { + cdev_init(dev, fops); + dev->owner = THIS_MODULE; + dev->ops = fops; + return cdev_add(dev, MKDEV(major, minor), 1); +} + +int __init vmeta_sched_driver_init(int major, int minor) { + int res; + + /* Now setup cdevs. */ + vmeta_major = major; + vmeta_minor = minor; + res = + vmeta_driver_setup_cdev(&vmeta_dev, vmeta_major, + vmeta_minor, &vmeta_ops); + if (res) { + vmeta_error("pe_agent_driver_setup_cdev failed.\n"); + goto err_reg_device; + } + + vmeta_trace("setup cdevs device minor [%d]\n", + vmeta_minor); + + g_sched = (vmeta_scheduler *) kmalloc(sizeof(vmeta_scheduler), GFP_KERNEL); + if (g_sched == NULL) { + vmeta_error("malloc failed.\n"); + res = -ENODEV; + goto err_add_device; + } + memset(g_sched, 0, sizeof(vmeta_scheduler)); + g_sched->owner = -1; + + /* add vmeta device */ + vmeta_dev_class = class_create(THIS_MODULE, VMETA_SCHED_NAME); + if (IS_ERR(vmeta_dev_class)) { + vmeta_error("class_create failed.\n"); + res = -ENODEV; + goto err_add_device; + } + + device_create(vmeta_dev_class, NULL, + MKDEV(vmeta_major, vmeta_minor), + NULL, VMETA_SCHED_NAME); + vmeta_trace("create device [%s]\n", VMETA_SCHED_NAME); + + /* create vmeta device proc file */ + vmeta_driver_procdir = proc_mkdir(VMETA_SCHED_NAME, NULL); + if (vmeta_driver_procdir == NULL) { + vmeta_error("make proc dir 0 failed.\n"); + res = -ENODEV; + goto err_add_device; + } + + vmeta_driver_state = create_proc_entry(VMETA_STATUS, 0644, vmeta_driver_procdir); + if (vmeta_driver_state == NULL) { + vmeta_error("make proc dir 1 failed.\n"); + res = -ENODEV; + remove_proc_entry(VMETA_SCHED_NAME, NULL); + goto err_add_device; + } + + vmeta_driver_state->read_proc = read_proc_status; + vmeta_driver_state->write_proc = write_proc_status; + + vmeta_trace("vmeta_sched_driver_init OK\n"); + return 0; + + err_add_device: + + cdev_del(&vmeta_dev); + + err_reg_device: + + vmeta_trace("vmeta_driver_init failed !!! (%d)\n", res); + + return res; +} + +void __exit vmeta_sched_driver_exit(void) { + if (g_sched) { + kfree(g_sched); + g_sched = NULL; + } + /* remove vmeta device proc file */ + remove_proc_entry(VMETA_STATUS, vmeta_driver_procdir); + remove_proc_entry(VMETA_SCHED_NAME, NULL); + + /* delete device */ + device_destroy(vmeta_dev_class, + MKDEV(vmeta_major, vmeta_minor)); + vmeta_trace("delete device [%s]\n", VMETA_SCHED_NAME); + + class_destroy(vmeta_dev_class); + + /* del cdev */ + cdev_del(&vmeta_dev); + + vmeta_trace("vmeta_driver_exit OK\n"); +} diff --git a/arch/arm/mach-berlin/modules/amp/vmeta_sched_driver.h b/arch/arm/mach-berlin/modules/amp/vmeta_sched_driver.h new file mode 100644 index 00000000..91e6206b --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/vmeta_sched_driver.h @@ -0,0 +1,23 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ********************************************************************************/ +#ifndef _VMETA_SCHED_DRIVER_H +#define _VMETA_SCHED_DRIVER_H + +int __init vmeta_sched_driver_init(int major, int minor); + +void __exit vmeta_sched_driver_exit(void); + +#endif /* _VMETA_SCHED_DRIVER_H */ diff --git a/arch/arm/mach-berlin/modules/amp/vmeta_sched_priv.h b/arch/arm/mach-berlin/modules/amp/vmeta_sched_priv.h new file mode 100644 index 00000000..252a01c0 --- /dev/null +++ b/arch/arm/mach-berlin/modules/amp/vmeta_sched_priv.h @@ -0,0 +1,33 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ********************************************************************************/ +#ifndef _VMETA_SCHED_PRIV_H +#define _VMETA_SCHED_PRIV_H + +#define MAX_SCHED_SLOTS_NUMBER 21 + +#define VMETA_CMD_APPROVED 'A' +#define VMETA_CMD_CANCELED 'C' +#define VMETA_RESULT_SIZE 1 + +#define VMETA_IOCTL_LOCK (0xbeef7001) +#define VMETA_IOCTL_UNLOCK (0xbeef7002) +#define VMETA_IOCTL_CANCEL (0xbeef7003) +#define VMETA_IOCTL_WAITINT (0xbeef7004) + +#define VMETA_SCHED_NAME "vmeta_sched" +#define VMETA_SCHED_PATH_NAME ("/dev/"VMETA_SCHED_NAME) + +#endif /* _VMETA_SCHED_PRIV_H */ diff --git a/arch/arm/mach-berlin/modules/bt_sd8887/Makefile b/arch/arm/mach-berlin/modules/bt_sd8887/Makefile new file mode 100644 index 00000000..8fb6cfe1 --- /dev/null +++ b/arch/arm/mach-berlin/modules/bt_sd8887/Makefile @@ -0,0 +1,164 @@ +# File: Makefile +# +# Copyright (C) 2008-2012, Marvell International Ltd. +# +# This software file (the "File") is distributed by Marvell International +# Ltd. under the terms of the GNU General Public License Version 2, June 1991 +# (the "License"). You may use, redistribute and/or modify this File in +# accordance with the terms and conditions of the License, a copy of which +# is available by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the +# worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. +# +# A copy of the GPL is available in file gpl-2.0.txt accompanying in this +# deliverables. +# +# THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE +# IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE +# ARE EXPRESSLY DISCLAIMED. The License provides additional details about +# this warranty disclaimer. + +CC= $(CROSS_COMPILE)gcc +LD= $(CROSS_COMPILE)ld + +BACKUP= /root/backup +YMD= `date +%Y%m%d%H%M` + +############################################################################# +# Configuration Options +############################################################################# + +# Debug Option +# DEBUG LEVEL n/1/2: +# n: NO DEBUG +# 1: PRINTM(MSG,...), PRINTM(FATAL,...), PRINTM(WARN,...) and PRINTM(INFO,...) +# 2: All PRINTM() +CONFIG_DEBUG=1 + +# SDIO suspend/resume +CONFIG_SDIO_SUSPEND_RESUME=y + +############################################################################# +# Select Platform Tools +############################################################################# + +MODEXT = ko + +ifeq ($(CONFIG_64BIT), y) + EXTRA_CFLAGS += -DMBT_64BIT +endif + +EXTRA_CFLAGS += -I$(M)/bt +LD += -S + +#ifdef SD8xxx +BINDIR = ../bin_sd8xxx_bt +#endif + +############################################################################# +# Compiler Flags +############################################################################# + EXTRA_CFLAGS += -DFPNUM='"29"' + +ifeq ($(CONFIG_DEBUG),1) + EXTRA_CFLAGS += -DDEBUG_LEVEL1 +endif + +ifeq ($(CONFIG_DEBUG),2) + EXTRA_CFLAGS += -DDEBUG_LEVEL1 + EXTRA_CFLAGS += -DDEBUG_LEVEL2 + DBG= -dbg +endif + +ifeq ($(CONFIG_SDIO_SUSPEND_RESUME),y) + EXTRA_CFLAGS += -DSDIO_SUSPEND_RESUME +endif + +############################################################################# +# Make Targets +############################################################################# + +ifneq ($(KERNELRELEASE),) + +ifeq ($(CONFIG_BERLIN_SDIO_BT_8887_CHAR_DRV),y) + +BTOBJS = bt_char/bt_main.o bt_char/bt_sdiommc.o bt_char/bt_proc.o bt_char/mbt_char.o + +BTOBJS += bt_char/bt_init.o +else +BTOBJS = bt/bt_main.o bt/bt_sdiommc.o bt/bt_proc.o bt/mbt_char.o + +BTOBJS += bt/bt_init.o +endif + +obj-$(CONFIG_BERLIN_SDIO_WLAN_8887) := bt8xxx.o +bt8xxx-objs := $(BTOBJS) + + + +# Otherwise we were called directly from the command line; invoke the kernel build system. +else + +KERNEL_VERSION_HOST := $(shell uname -r) +KERNELDIR ?= /lib/modules/$(KERNEL_VERSION_HOST)/build +EXTRA_CFLAGS += -I$(KERNELDIR)/include + +default: + $(MAKE) -C $(KERNELDIR) M=$(PWD) modules +endif + +############################################################### + +export CC LD EXTRA_CFLAGS KERNELDIR + +.PHONY: app/fm_app clean distclean + +app/fm_app: + $(MAKE) -C $@ + +echo: + +build: echo default + + @if [ ! -d $(BINDIR) ]; then \ + mkdir $(BINDIR); \ + fi + + cp -f bt8xxx.$(MODEXT) $(BINDIR)/bt8xxx$(DBG).$(MODEXT) + cp -r config $(BINDIR) + + cp -f script/sdio_mmc/* $(BINDIR)/ + + cp -f README $(BINDIR) + + $(MAKE) -C app/fm_app $@ INSTALLDIR=$(BINDIR); + cp -f app/fm_app/fmapp $(BINDIR); + +clean: + -find . -name "*.o" -exec rm {} \; + -find . -name "*.ko" -exec rm {} \; + -find . -name ".*.cmd" -exec rm {} \; + -find . -name "*.mod.c" -exec rm {} \; + -find . -name "*.symvers" -exec rm {} \; + -find . -name "modules.order" -exec rm {} \; + -rm -rf .tmp_versions + $(MAKE) -C app/fm_app $@ + +install: default + +distclean: + -find . -name "*.o" -exec rm {} \; + -find . -name "*.orig" -exec rm {} \; + -find . -name "*.swp" -exec rm {} \; + -find . -name "*.*~" -exec rm {} \; + -find . -name "*~" -exec rm {} \; + -find . -name "*.d" -exec rm {} \; + -find . -name "*.a" -exec rm {} \; + -find . -name "tags" -exec rm {} \; + -find . -name ".*" -exec rm -rf 2> /dev/null \; + -find . -name "*.ko" -exec rm {} \; + -find . -name ".*.cmd" -exec rm {} \; + -find . -name "*.mod.c" -exec rm {} \; + -rm -rf .tmp_versions + $(MAKE) -C app/fm_app $@ +# End of file; diff --git a/arch/arm/mach-berlin/modules/bt_sd8887/bt/bt_drv.h b/arch/arm/mach-berlin/modules/bt_sd8887/bt/bt_drv.h new file mode 100644 index 00000000..02edda93 --- /dev/null +++ b/arch/arm/mach-berlin/modules/bt_sd8887/bt/bt_drv.h @@ -0,0 +1,846 @@ +/** @file bt_drv.h + * @brief This header file contains global constant/enum definitions, + * global variable declaration. + * + * Copyright (C) 2007-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available along with the File in the gpl.txt file or by writing to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307 or on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#ifndef _BT_DRV_H_ +#define _BT_DRV_H_ + +#include +#include +#include +#include + +#include "hci_wrapper.h" + +#ifndef BIT +/** BIT definition */ +#define BIT(x) (1UL << (x)) +#endif + +#ifdef MBT_64BIT +typedef u64 t_ptr; +#else +typedef u32 t_ptr; +#endif + +/** Define drv_mode bit */ +#define DRV_MODE_BT BIT(0) +#define DRV_MODE_FM BIT(1) +#define DRV_MODE_NFC BIT(2) + +/** Define devFeature bit */ +#define DEV_FEATURE_BT BIT(0) +#define DEV_FEATURE_BTAMP BIT(1) +#define DEV_FEATURE_BLE BIT(2) +#define DEV_FEATURE_FM BIT(3) +#define DEV_FEATURE_NFC BIT(4) + +/** Define maximum number of radio func supported */ +#define MAX_RADIO_FUNC 3 + +/** MAC address print format */ +#ifndef MACSTR +#define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x" +#endif + +/** MAC address print arguments */ +#ifndef MAC2STR +#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5] +#endif + +/** Debug level : Message */ +#define DBG_MSG BIT(0) +/** Debug level : Fatal */ +#define DBG_FATAL BIT(1) +/** Debug level : Error */ +#define DBG_ERROR BIT(2) +/** Debug level : Data */ +#define DBG_DATA BIT(3) +/** Debug level : Command */ +#define DBG_CMD BIT(4) +/** Debug level : Event */ +#define DBG_EVENT BIT(5) +/** Debug level : Interrupt */ +#define DBG_INTR BIT(6) + +/** Debug entry : Data dump */ +#define DBG_DAT_D BIT(16) +/** Debug entry : Data dump */ +#define DBG_CMD_D BIT(17) + +/** Debug level : Entry */ +#define DBG_ENTRY BIT(28) +/** Debug level : Warning */ +#define DBG_WARN BIT(29) +/** Debug level : Informative */ +#define DBG_INFO BIT(30) + +#ifdef DEBUG_LEVEL1 +extern u32 mbt_drvdbg; + +#ifdef DEBUG_LEVEL2 +/** Print informative message */ +#define PRINTM_INFO(msg...) \ + do {if (mbt_drvdbg & DBG_INFO) \ + printk(KERN_DEBUG msg); } while (0) +/** Print warning message */ +#define PRINTM_WARN(msg...) \ + do {if (mbt_drvdbg & DBG_WARN) \ + printk(KERN_DEBUG msg); } while (0) +/** Print entry message */ +#define PRINTM_ENTRY(msg...) \ + do {if (mbt_drvdbg & DBG_ENTRY) \ + printk(KERN_DEBUG msg); } while (0) +#else +/** Print informative message */ +#define PRINTM_INFO(msg...) do {} while (0) +/** Print warning message */ +#define PRINTM_WARN(msg...) do {} while (0) +/** Print entry message */ +#define PRINTM_ENTRY(msg...) do {} while (0) +#endif /* DEBUG_LEVEL2 */ + +/** Print interrupt message */ +#define PRINTM_INTR(msg...) \ + do {if (mbt_drvdbg & DBG_INTR) \ + printk(KERN_DEBUG msg); } while (0) +/** Print event message */ +#define PRINTM_EVENT(msg...) \ + do {if (mbt_drvdbg & DBG_EVENT) \ + printk(KERN_DEBUG msg); } while (0) +/** Print command message */ +#define PRINTM_CMD(msg...) \ + do {if (mbt_drvdbg & DBG_CMD) \ + printk(KERN_DEBUG msg); } while (0) +/** Print data message */ +#define PRINTM_DATA(msg...) \ + do {if (mbt_drvdbg & DBG_DATA) \ + printk(KERN_DEBUG msg); } while (0) +/** Print error message */ +#define PRINTM_ERROR(msg...) \ + do {if (mbt_drvdbg & DBG_ERROR) \ + printk(KERN_ERR msg); } while (0) +/** Print fatal message */ +#define PRINTM_FATAL(msg...) \ + do {if (mbt_drvdbg & DBG_FATAL) \ + printk(KERN_ERR msg); } while (0) +/** Print message */ +#define PRINTM_MSG(msg...) \ + do {if (mbt_drvdbg & DBG_MSG) \ + printk(KERN_ALERT msg); } while (0) + +/** Print data dump message */ +#define PRINTM_DAT_D(msg...) \ + do {if (mbt_drvdbg & DBG_DAT_D) \ + printk(KERN_DEBUG msg); } while (0) +/** Print data dump message */ +#define PRINTM_CMD_D(msg...) \ + do {if (mbt_drvdbg & DBG_CMD_D) \ + printk(KERN_DEBUG msg); } while (0) + +/** Print message with required level */ +#define PRINTM(level, msg...) PRINTM_##level(msg) + +/** Debug dump buffer length */ +#define DBG_DUMP_BUF_LEN 64 +/** Maximum number of dump per line */ +#define MAX_DUMP_PER_LINE 16 +/** Maximum data dump length */ +#define MAX_DATA_DUMP_LEN 48 + +static inline void +hexdump(char *prompt, u8 *buf, int len) +{ + int i; + char dbgdumpbuf[DBG_DUMP_BUF_LEN]; + char *ptr = dbgdumpbuf; + + printk(KERN_DEBUG "%s: len=%d\n", prompt, len); + for (i = 1; i <= len; i++) { + ptr += snprintf(ptr, 4, "%02x ", *buf); + buf++; + if (i % MAX_DUMP_PER_LINE == 0) { + *ptr = 0; + printk(KERN_DEBUG "%s\n", dbgdumpbuf); + ptr = dbgdumpbuf; + } + } + if (len % MAX_DUMP_PER_LINE) { + *ptr = 0; + printk(KERN_DEBUG "%s\n", dbgdumpbuf); + } +} + +/** Debug hexdump of debug data */ +#define DBG_HEXDUMP_DAT_D(x, y, z) \ + do {if (mbt_drvdbg & DBG_DAT_D) \ + hexdump(x, y, z); } while (0) +/** Debug hexdump of debug command */ +#define DBG_HEXDUMP_CMD_D(x, y, z) \ + do {if (mbt_drvdbg & DBG_CMD_D) \ + hexdump(x, y, z); } while (0) + +/** Debug hexdump */ +#define DBG_HEXDUMP(level, x, y, z) DBG_HEXDUMP_##level(x, y, z) + +/** Mark entry point */ +#define ENTER() PRINTM(ENTRY, "Enter: %s, %s:%i\n", __func__, \ + __FILE__, __LINE__) +/** Mark exit point */ +#define LEAVE() PRINTM(ENTRY, "Leave: %s, %s:%i\n", __func__, \ + __FILE__, __LINE__) +#else +/** Do nothing */ +#define PRINTM(level, msg...) do {} while (0) +/** Do nothing */ +#define DBG_HEXDUMP(level, x, y, z) do {} while (0) +/** Do nothing */ +#define ENTER() do {} while (0) +/** Do nothing */ +#define LEAVE() do {} while (0) +#endif /* DEBUG_LEVEL1 */ + +/** Bluetooth upload size */ +#define BT_UPLD_SIZE 2312 +/** Bluetooth status success */ +#define BT_STATUS_SUCCESS (0) +/** Bluetooth status failure */ +#define BT_STATUS_FAILURE (-1) + +#ifndef TRUE +/** True value */ +#define TRUE 1 +#endif +#ifndef FALSE +/** False value */ +#define FALSE 0 +#endif + +/** Set thread state */ +#define OS_SET_THREAD_STATE(x) set_current_state(x) +/** Time to wait until Host Sleep state change in millisecond */ +#define WAIT_UNTIL_HS_STATE_CHANGED 2000 +/** Time to wait cmd resp in millisecond */ +#define WAIT_UNTIL_CMD_RESP 5000 + +/** Sleep until a condition gets true or a timeout elapses */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) +#define os_wait_interruptible_timeout(waitq, cond, timeout) \ + interruptible_sleep_on_timeout(&waitq, ((timeout) * HZ / 1000)) +#else +#define os_wait_interruptible_timeout(waitq, cond, timeout) \ + wait_event_interruptible_timeout(waitq, cond, ((timeout) * HZ / 1000)) +#endif + +typedef struct { + /** Task */ + struct task_struct *task; + /** Queue */ + wait_queue_head_t waitQ; + /** PID */ + pid_t pid; + /** Private structure */ + void *priv; +} bt_thread; + +static inline void +bt_activate_thread(bt_thread *thr) +{ + /** Initialize the wait queue */ + init_waitqueue_head(&thr->waitQ); + + /** Record the thread pid */ + thr->pid = current->pid; +} + +static inline void +bt_deactivate_thread(bt_thread *thr) +{ + thr->pid = 0; + return; +} + +static inline void +bt_create_thread(int (*btfunc) (void *), bt_thread *thr, char *name) +{ + thr->task = kthread_run(btfunc, thr, "%s", name); +} + +static inline int +bt_terminate_thread(bt_thread *thr) +{ + /* Check if the thread is active or not */ + if (!thr->pid) + return -1; + + kthread_stop(thr->task); + return 0; +} + +static inline void +os_sched_timeout(u32 millisec) +{ + set_current_state(TASK_INTERRUPTIBLE); + + schedule_timeout((millisec * HZ) / 1000); +} + +#ifndef __ATTRIB_ALIGN__ +#define __ATTRIB_ALIGN__ __attribute__((aligned(4))) +#endif + +#ifndef __ATTRIB_PACK__ +#define __ATTRIB_PACK__ __attribute__((packed)) +#endif + +/** BT histogram command */ +#define BT_CMD_HISTOGRAM 0xEA +/** max antenna num */ +#define MAX_ANTENNA_NUM 2 +/** BDR 1M */ +#define BDR_RATE_1M 1 +/** EDR 2/3 M */ +#define EDR_RATE_2_3M 2 +/** BLE 1M */ +#define BLE_RATE_1M 5 +/** max bt link number */ +#define MAX_BT_LINK 10 +/** max ble link number */ +#define MAX_BLE_LINK 16 + +typedef struct _bt_link_stat { + /** txrx rate 1: BDR_1M, 2:EDR 2/3 M, 3:BLE 1M */ + u8 txrxrate; + /** power: -30 = N = 20 dbm*/ + s8 txpower; + /** rssi: -127 to +20 (For BT), -128 to +127 (For BLE) */ + s8 rssi; +}__ATTRIB_PACK__ bt_link_stat; + +typedef struct _bt_histogram_data { + u8 antenna; + u8 powerclass; + bt_link_stat link[MAX_BT_LINK + MAX_BLE_LINK]; +}__ATTRIB_PACK__ bt_histogram_data; + +typedef struct _bt_hist_proc_data { + /** antenna */ + u8 antenna; + /** Private structure */ + struct _bt_private *pbt; +} bt_hist_proc_data; + +/** Data structure for the Marvell Bluetooth device */ +typedef struct _bt_dev { + /** device name */ + char name[DEV_NAME_LEN]; + /** card pointer */ + void *card; + /** IO port */ + u32 ioport; + + struct m_dev m_dev[MAX_RADIO_FUNC]; + + /** Tx download ready flag */ + u8 tx_dnld_rdy; + /** Function */ + u8 fn; + /** Rx unit */ + u8 rx_unit; + /** Power Save mode : Timeout configuration */ + u16 idle_timeout; + /** Power Save mode */ + u8 psmode; + /** Power Save command */ + u8 pscmd; + /** Host Sleep mode */ + u8 hsmode; + /** Host Sleep command */ + u8 hscmd; + /** Low byte is gap, high byte is GPIO */ + u16 gpio_gap; + /** Host Sleep configuration command */ + u8 hscfgcmd; + /** Host Send Cmd Flag */ + u8 sendcmdflag; + /** ocf for Send Cmd */ + u16 send_cmd_ocf; + /** Device Type */ + u8 devType; + /** Device Features */ + u8 devFeature; + /** cmd52 function */ + u8 cmd52_func; + /** cmd52 register */ + u8 cmd52_reg; + /** cmd52 value */ + u8 cmd52_val; + /** SDIO pull control command */ + u8 sdio_pull_ctrl; + /** Low 2 bytes is pullUp, high 2 bytes for pull-down */ + u32 sdio_pull_cfg; + /** Test mode command */ + u8 test_mode; +} bt_dev_t, *pbt_dev_t; + +typedef struct _bt_adapter { + /** Chip revision ID */ + u8 chip_rev; + /** Surprise removed flag */ + u8 SurpriseRemoved; + /** IRQ number */ + int irq; + /** Interrupt counter */ + u32 IntCounter; + /** Tx packet queue */ + struct sk_buff_head tx_queue; + /** Pending Tx packet queue */ + struct sk_buff_head pending_queue; + /** tx lock flag */ + u8 tx_lock; + /** Power Save mode */ + u8 psmode; + /** Power Save state */ + u8 ps_state; + /** Host Sleep state */ + u8 hs_state; + /** hs skip count */ + u32 hs_skip; + /** suspend_fail flag */ + u8 suspend_fail; + /** suspended flag */ + u8 is_suspended; + /** Number of wakeup tries */ + u8 WakeupTries; + /** Host Sleep wait queue */ + wait_queue_head_t cmd_wait_q __ATTRIB_ALIGN__; + /** Host Cmd complet state */ + u8 cmd_complete; + /** last irq recv */ + u8 irq_recv; + /** last irq processed */ + u8 irq_done; + /** sdio int status */ + u8 sd_ireg; + /** buf allocated for read interrupt status */ + u8 *hw_regs_buf; + /** buf for read interrupt status */ + u8 *hw_regs; + /** tx pending */ + u32 skb_pending; +/** Version string buffer length */ +#define MAX_VER_STR_LEN 128 + /** Driver version */ + u8 drv_ver[MAX_VER_STR_LEN]; + /** Number of command timeout */ + u32 num_cmd_timeout; +} bt_adapter, *pbt_adapter; + +/** Length of prov name */ +#define PROC_NAME_LEN 32 + +struct item_data { + /** Name */ + char name[PROC_NAME_LEN]; + /** Size */ + u32 size; + /** Address */ + t_ptr addr; + /** Offset */ + u32 offset; + /** Flag */ + u32 flag; +}; + +struct proc_private_data { + /** Name */ + char name[PROC_NAME_LEN]; + /** File flag */ + u32 fileflag; + /** Buffer size */ + u32 bufsize; + /** Number of items */ + u32 num_items; + /** Item data */ + struct item_data *pdata; + /** Private structure */ + struct _bt_private *pbt; + /** File operations */ + const struct file_operations *fops; +}; + +struct device_proc { + /** Proc directory entry */ + struct proc_dir_entry *proc_entry; + /** proc entry for hist */ + struct proc_dir_entry *hist_entry; + /** num of proc files */ + u8 num_proc_files; + /** pointer to proc_private_data */ + struct proc_private_data *pfiles; +}; + +/** Private structure for the MV device */ +typedef struct _bt_private { + /** Bluetooth device */ + bt_dev_t bt_dev; + /** Adapter */ + bt_adapter *adapter; + /** Firmware helper */ + const struct firmware *fw_helper; + /** Firmware */ + const struct firmware *firmware; + /** Init user configure file */ + const struct firmware *init_user_cfg; + /** Init user configure wait queue token */ + u16 init_user_conf_wait_flag; + /** Init user configure file wait queue */ + wait_queue_head_t init_user_conf_wait_q __ATTRIB_ALIGN__; + /** Firmware request start time */ + struct timeval req_fw_time; + /** Hotplug device */ + struct device *hotplug_device; + /** thread to service interrupts */ + bt_thread MainThread; + /** proc data */ + struct device_proc dev_proc[MAX_RADIO_FUNC]; + /** Driver lock */ + spinlock_t driver_lock; + /** Driver lock flags */ + ulong driver_flags; + /** Driver reference flags */ + struct kobject kobj; + /** CRC check flag */ + u16 fw_crc_check; + /** Card type */ + u16 card_type; + /** sdio device */ + const struct sdio_device *psdio_device; + u8 fw_reload; + /* hist_data_len */ + u8 hist_data_len; + /** hist data */ + bt_histogram_data hist_data[MAX_ANTENNA_NUM]; + /** hist proc data */ + bt_hist_proc_data hist_proc[MAX_ANTENNA_NUM]; +} bt_private, *pbt_private; + +int bt_get_histogram(bt_private *priv); + +/** Disable interrupt */ +#define OS_INT_DISABLE spin_lock_irqsave(&priv->driver_lock, \ + priv->driver_flags) +/** Enable interrupt */ +#define OS_INT_RESTORE spin_unlock_irqrestore(&priv->driver_lock, \ + priv->driver_flags) + +#ifndef HCI_BT_AMP +/** BT_AMP flag for device type */ +#define HCI_BT_AMP 0x80 +#endif + +/** Device type of BT */ +#define DEV_TYPE_BT 0x00 +/** Device type of AMP */ +#define DEV_TYPE_AMP 0x01 +/** Device type of FM */ +#define DEV_TYPE_FM 0x02 +/** Device type of NFC */ +#define DEV_TYPE_NFC 0x04 + +/** Marvell vendor packet */ +#define MRVL_VENDOR_PKT 0xFE + +/** Bluetooth command : Get FW Version */ +#define BT_CMD_GET_FW_VERSION 0x0F +/** Bluetooth command : Sleep mode */ +#define BT_CMD_AUTO_SLEEP_MODE 0x23 +/** Bluetooth command : Host Sleep configuration */ +#define BT_CMD_HOST_SLEEP_CONFIG 0x59 +/** Bluetooth command : Host Sleep enable */ +#define BT_CMD_HOST_SLEEP_ENABLE 0x5A +/** Bluetooth command : Module Configuration request */ +#define BT_CMD_MODULE_CFG_REQ 0x5B +/** Bluetooth command : SDIO pull up down configuration request */ +#define BT_CMD_SDIO_PULL_CFG_REQ 0x69 +/** Bluetooth command : Set Evt Filter Command */ +#define BT_CMD_SET_EVT_FILTER 0x05 +/** Bluetooth command : Enable Write Scan Command */ +#define BT_CMD_ENABLE_WRITE_SCAN 0x1A +/** Bluetooth command : Enable Device under test mode */ +#define BT_CMD_ENABLE_DEVICE_TESTMODE 0x03 +#ifdef SDIO_SUSPEND_RESUME +/* FM default event interrupt mask + bit[0], RSSI low + bit[1], New RDS data + bit[2], RSSI indication */ +#define FM_DEFAULT_INTR_MASK 0x07 +/** Disable FM event interrupt mask */ +#define FM_DISABLE_INTR_MASK 0x00 +/** FM set event interrupt mask command */ +#define FM_SET_INTR_MASK 0x2E +/** FM ocf value */ +#define FM_CMD 0x0280 +int fm_set_intr_mask(bt_private *priv, u32 mask); +#endif +/** Sub Command: Module Bring Up Request */ +#define MODULE_BRINGUP_REQ 0xF1 +/** Sub Command: Module Shut Down Request */ +#define MODULE_SHUTDOWN_REQ 0xF2 +/** Module already up */ +#define MODULE_CFG_RESP_ALREADY_UP 0x0c +/** Sub Command: Host Interface Control Request */ +#define MODULE_INTERFACE_CTRL_REQ 0xF5 + +/** Bluetooth event : Power State */ +#define BT_EVENT_POWER_STATE 0x20 + +/** Bluetooth Power State : Enable */ +#define BT_PS_ENABLE 0x02 +/** Bluetooth Power State : Disable */ +#define BT_PS_DISABLE 0x03 +/** Bluetooth Power State : Sleep */ +#define BT_PS_SLEEP 0x01 +/** Bluetooth Power State : Awake */ +#define BT_PS_AWAKE 0x02 + +/** Vendor OGF */ +#define VENDOR_OGF 0x3F +/** OGF for reset */ +#define RESET_OGF 0x03 +/** Bluetooth command : Reset */ +#define BT_CMD_RESET 0x03 + +/** Host Sleep activated */ +#define HS_ACTIVATED 0x01 +/** Host Sleep deactivated */ +#define HS_DEACTIVATED 0x00 + +/** Power Save sleep */ +#define PS_SLEEP 0x01 +/** Power Save awake */ +#define PS_AWAKE 0x00 + +/** bt header length */ +#define BT_HEADER_LEN 4 + +#ifndef MAX +/** Return maximum of two */ +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#endif + +/** This is for firmware specific length */ +#define EXTRA_LEN 36 + +/** Command buffer size for Marvell driver */ +#define MRVDRV_SIZE_OF_CMD_BUFFER (2 * 1024) + +/** Bluetooth Rx packet buffer size for Marvell driver */ +#define MRVDRV_BT_RX_PACKET_BUFFER_SIZE \ + (HCI_MAX_FRAME_SIZE + EXTRA_LEN) + +/** Buffer size to allocate */ +#define ALLOC_BUF_SIZE (((MAX(MRVDRV_BT_RX_PACKET_BUFFER_SIZE, \ + MRVDRV_SIZE_OF_CMD_BUFFER) + SDIO_HEADER_LEN \ + + SD_BLOCK_SIZE - 1) / SD_BLOCK_SIZE) * SD_BLOCK_SIZE) + +/** Request FW timeout in second */ +#define REQUEST_FW_TIMEOUT 30 + +/** The number of times to try when polling for status bits */ +#define MAX_POLL_TRIES 100 + +/** The number of times to try when waiting for downloaded firmware to + become active when multiple interface is present */ +#define MAX_MULTI_INTERFACE_POLL_TRIES 150 + +/** The number of times to try when waiting for downloaded firmware to + become active. (polling the scratch register). */ +#define MAX_FIRMWARE_POLL_TRIES 100 + +/** default idle time */ +#define DEFAULT_IDLE_TIME 0 + +#define BT_CMD_HEADER_SIZE 3 + +typedef struct _BT_CMD { + /** OCF OGF */ + u16 ocf_ogf; + /** Length */ + u8 length; + /** Data */ + u8 data[128]; +} __ATTRIB_PACK__ BT_CMD; + +typedef struct _BT_EVENT { + /** Event Counter */ + u8 EC; + /** Length */ + u8 length; + /** Data */ + u8 data[8]; +} BT_EVENT; + +/** This function verify the received event pkt */ +int check_evtpkt(bt_private *priv, struct sk_buff *skb); + +/* Prototype of global function */ +/** This function gets the priv reference */ +struct kobject *bt_priv_get(bt_private *priv); +/** This function release the priv reference */ +void bt_priv_put(bt_private *priv); +/** This function adds the card */ +bt_private *bt_add_card(void *card); +/** This function removes the card */ +int bt_remove_card(void *card); +/** This function handles the interrupt */ +void bt_interrupt(struct m_dev *m_dev); + +/** This function creates proc interface directory structure */ +int bt_root_proc_init(void); +/** This function removes proc interface directory structure */ +int bt_root_proc_remove(void); +/** This function initializes proc entry */ +int bt_proc_init(bt_private *priv, struct m_dev *m_dev, int seq); +/** This function removes proc interface */ +void bt_proc_remove(bt_private *priv); + +/** This function process the received event */ +int bt_process_event(bt_private *priv, struct sk_buff *skb); +/** This function enables host sleep */ +int bt_enable_hs(bt_private *priv); +/** This function used to send command to firmware */ +int bt_prepare_command(bt_private *priv); +/** This function frees the structure of adapter */ +void bt_free_adapter(bt_private *priv); + +/** clean up m_devs */ +void clean_up_m_devs(bt_private *priv); +/** bt driver call this function to register to bus driver */ +int *sbi_register(void); +/** bt driver call this function to unregister to bus driver */ +void sbi_unregister(void); +/** bt driver calls this function to register the device */ +int sbi_register_dev(bt_private *priv); +/** bt driver calls this function to unregister the device */ +int sbi_unregister_dev(bt_private *priv); +/** This function initializes firmware */ +int sbi_download_fw(bt_private *priv); +/** Configures hardware to quit deep sleep state */ +int sbi_wakeup_firmware(bt_private *priv); +/** Module configuration and register device */ +int sbi_register_conf_dpc(bt_private *priv); + +/** This function is used to send the data/cmd to hardware */ +int sbi_host_to_card(bt_private *priv, u8 *payload, u16 nb); +/** This function reads the current interrupt status register */ +int sbi_get_int_status(bt_private *priv); + +/** This function enables the host interrupts */ +int sd_enable_host_int(bt_private *priv); +/** This function disables the host interrupts */ +int sd_disable_host_int(bt_private *priv); +/** This function reload firmware */ +void bt_request_fw_reload(bt_private *priv); +/** This function downloads firmware image to the card */ +int sd_download_firmware_w_helper(bt_private *priv); +void bt_dump_sdio_regs(bt_private *priv); +/* dumps the firmware to /var/ or /data/ */ +void bt_dump_firmware_info_v2(bt_private *priv); + +/** Max line length allowed in init config file */ +#define MAX_LINE_LEN 256 +/** Max MAC address string length allowed */ +#define MAX_MAC_ADDR_LEN 18 +/** Max register type/offset/value etc. parameter length allowed */ +#define MAX_PARAM_LEN 12 + +/** Bluetooth command : Mac address configuration */ +#define BT_CMD_CONFIG_MAC_ADDR 0x22 +/** Bluetooth command : Write CSU register */ +#define BT_CMD_CSU_WRITE_REG 0x66 +/** Bluetooth command : Load calibrate data */ +#define BT_CMD_LOAD_CONFIG_DATA 0x61 +/** Bluetooth command : Load calibrate ext data */ +#define BT_CMD_LOAD_CONFIG_DATA_EXT 0x60 + +/** Bluetooth command : BLE deepsleep */ +#define BT_CMD_BLE_DEEP_SLEEP 0x8b + +typedef struct _BT_BLE_CMD { + /** OCF OGF */ + u16 ocf_ogf; + /** Length */ + u8 length; + /** deepsleep flag */ + u8 deepsleep; +} __ATTRIB_PACK__ BT_BLE_CMD; + +typedef struct _BT_CSU_CMD { + /** OCF OGF */ + u16 ocf_ogf; + /** Length */ + u8 length; + /** reg type */ + u8 type; + /** address */ + u8 offset[4]; + /** Data */ + u8 value[2]; +} __ATTRIB_PACK__ BT_CSU_CMD; + +/** This function sets mac address */ +int bt_set_mac_address(bt_private *priv, u8 *mac); +/** This function writes value to CSU registers */ +int bt_write_reg(bt_private *priv, u8 type, u32 offset, u16 value); +/** BT set user defined init data and param */ +int bt_init_config(bt_private *priv, char *cfg_file); +/** This function load the calibrate data */ +int bt_load_cal_data(bt_private *priv, u8 *config_data, u8 *mac); +/** This function load the calibrate ext data */ +int bt_load_cal_data_ext(bt_private *priv, u8 *config_data, u32 cfg_data_len); +/** BT set user defined calibration data */ +int bt_cal_config(bt_private *priv, char *cfg_file, char *mac); +/** BT set user defined calibration ext data */ +int bt_cal_config_ext(bt_private *priv, char *cfg_file); +int bt_init_mac_address(bt_private *priv, char *mac); +int bt_set_gpio_pin(bt_private *priv); +/** Bluetooth command : Set gpio pin */ +#define BT_CMD_SET_GPIO_PIN 0xEC +/** Interrupt Raising Edge**/ +#define INT_RASING_EDGE 0 +/** Interrupt Falling Edge**/ +#define INT_FALLING_EDGE 1 +#define DELAY_50_US 50 + +typedef struct _BT_HCI_CMD { + /** OCF OGF */ + u16 ocf_ogf; + /** Length */ + u8 length; + /** cmd type */ + u8 cmd_type; + /** cmd len */ + u8 cmd_len; + /** Data */ + u8 data[6]; +} __ATTRIB_PACK__ BT_HCI_CMD; + +#endif /* _BT_DRV_H_ */ diff --git a/arch/arm/mach-berlin/modules/bt_sd8887/bt/bt_init.c b/arch/arm/mach-berlin/modules/bt_sd8887/bt/bt_init.c new file mode 100644 index 00000000..fe70aa83 --- /dev/null +++ b/arch/arm/mach-berlin/modules/bt_sd8887/bt/bt_init.c @@ -0,0 +1,755 @@ +/** @file bt_init.c + * + * @brief This file contains the init functions for BlueTooth + * driver. + * + * Copyright (C) 2011-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available along with the File in the gpl.txt file or by writing to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307 or on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#include +#include + +#include "bt_drv.h" + +extern int bt_req_fw_nowait; + +#define isxdigit(c) (('0' <= (c) && (c) <= '9') \ + || ('a' <= (c) && (c) <= 'f') \ + || ('A' <= (c) && (c) <= 'F')) + +#define isdigit(c) (('0' <= (c) && (c) <= '9')) +#define isspace(c) (c <= ' ' && (c == ' ' || (c <= 13 && c >= 9))) +/** + * @brief Returns hex value of a give character + * + * @param chr Character to be converted + * + * @return The converted character if chr is a valid hex, else 0 + */ +static int +bt_hexval(char chr) +{ + ENTER(); + + if (chr >= '0' && chr <= '9') + return chr - '0'; + if (chr >= 'A' && chr <= 'F') + return chr - 'A' + 10; + if (chr >= 'a' && chr <= 'f') + return chr - 'a' + 10; + + LEAVE(); + return 0; +} + +/** + * @brief Extension of strsep lib command. This function will also take care + * escape character + * + * @param s A pointer to array of chars to process + * @param delim The delimiter character to end the string + * @param esc The escape character to ignore for delimiter + * + * @return Pointer to the separated string if delim found, else NULL + */ +static char * +bt_strsep(char **s, char delim, char esc) +{ + char *se = *s, *sb; + + ENTER(); + + if (!(*s) || (*se == '\0')) { + LEAVE(); + return NULL; + } + + for (sb = *s; *sb != '\0'; ++sb) { + if (*sb == esc && *(sb + 1) == esc) { + /* + * We get a esc + esc seq then keep the one esc + * and chop off the other esc character + */ + memmove(sb, sb + 1, strlen(sb)); + continue; + } + if (*sb == esc && *(sb + 1) == delim) { + /* + * We get a delim + esc seq then keep the delim + * and chop off the esc character + */ + memmove(sb, sb + 1, strlen(sb)); + continue; + } + if (*sb == delim) + break; + } + + if (*sb == '\0') + sb = NULL; + else + *sb++ = '\0'; + + *s = sb; + + LEAVE(); + return se; +} + +/** + * @brief Returns hex value of a given ascii string + * + * @param a String to be converted + * + * @return hex value + */ +static int +bt_atox(const char *a) +{ + int i = 0; + ENTER(); + while (isxdigit(*a)) + i = i * 16 + bt_hexval(*a++); + + LEAVE(); + return i; +} + +/** + * @brief Converts mac address from string to t_u8 buffer. + * + * @param mac_addr The buffer to store the mac address in. + * @param buf The source of mac address which is a string. + * + * @return N/A + */ +static void +bt_mac2u8(u8 *mac_addr, char *buf) +{ + char *begin, *end, *mac_buff; + int i; + + ENTER(); + + if (!buf) { + LEAVE(); + return; + } + + mac_buff = kzalloc(strlen(buf) + 1, GFP_KERNEL); + if (!mac_buff) { + LEAVE(); + return; + } + memcpy(mac_buff, buf, strlen(buf)); + + begin = mac_buff; + for (i = 0; i < ETH_ALEN; ++i) { + end = bt_strsep(&begin, ':', '/'); + if (end) + mac_addr[i] = bt_atox(end); + } + + kfree(mac_buff); + LEAVE(); +} + +/** + * @brief Returns integer value of a given ascii string + * + * @param data Converted data to be returned + * @param a String to be converted + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int +bt_atoi(int *data, char *a) +{ + int i, val = 0, len; + + ENTER(); + + len = strlen(a); + if (!strncmp(a, "0x", 2)) { + a = a + 2; + len -= 2; + *data = bt_atox(a); + return BT_STATUS_SUCCESS; + } + for (i = 0; i < len; i++) { + if (isdigit(a[i])) { + val = val * 10 + (a[i] - '0'); + } else { + PRINTM(ERROR, "Invalid char %c in string %s\n", a[i], + a); + return BT_STATUS_FAILURE; + } + } + *data = val; + + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief parse cal-data + * + * @param src a pointer to cal-data string + * @param len len of cal-data + * @param dst a pointer to return cal-data + * @param dst_size size of dest buffer + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int +bt_parse_cal_cfg(const u8 *src, u32 len, u8 *dst, u32 *dst_size) +{ + const u8 *ptr; + u8 *dptr; + u32 count = 0; + int ret = BT_STATUS_FAILURE; + + ENTER(); + ptr = src; + dptr = dst; + + while ((ptr - src) < len) { + if (*ptr && isspace(*ptr)) { + ptr++; + continue; + } + + if (isxdigit(*ptr)) { + if ((dptr - dst) >= *dst_size) { + PRINTM(ERROR, "cal_file size too big!!!\n"); + goto done; + } + *dptr++ = bt_atox((const char *)ptr); + ptr += 2; + count++; + } else { + ptr++; + } + } + if (dptr == dst) { + ret = BT_STATUS_FAILURE; + goto done; + } + + *dst_size = count; + ret = BT_STATUS_SUCCESS; +done: + LEAVE(); + return ret; +} + +/** + * @brief BT get one line data from ASCII format data + * + * @param data Source data + * @param size Source data length + * @param line_pos Destination data + * @return -1 or length of the line + */ +int +parse_cfg_get_line(u8 *data, u32 size, u8 *line_pos) +{ + static s32 pos; + u8 *src, *dest; + + if (pos >= size) { /* reach the end */ + pos = 0; /* Reset position for rfkill */ + return -1; + } + memset(line_pos, 0, MAX_LINE_LEN); + src = data + pos; + dest = line_pos; + + while (pos < size && *src != '\x0A' && *src != '\0') { + if (*src != ' ' && *src != '\t') /* parse space */ + *dest++ = *src++; + else + src++; + pos++; + } + *dest = '\0'; + /* parse new line */ + pos++; + return strlen((const char *)line_pos); +} + +/** + * @brief BT parse ASCII format data to MAC address + * + * @param priv BT private handle + * @param data Source data + * @param size data length + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_process_init_cfg(bt_private *priv, u8 *data, u32 size) +{ + u8 *pos; + u8 *intf_s, *intf_e; + u8 s[MAX_LINE_LEN]; /* 1 line data */ + u32 line_len; + char dev_name[MAX_PARAM_LEN]; + u8 buf[MAX_PARAM_LEN]; + u8 bt_addr[MAX_MAC_ADDR_LEN]; + u8 bt_mac[ETH_ALEN]; + int setting = 0; + u8 type = 0; + u16 value = 0; + u32 offset = 0; + int ret = BT_STATUS_FAILURE; + + memset(dev_name, 0, sizeof(dev_name)); + memset(bt_addr, 0, sizeof(bt_addr)); + memset(bt_mac, 0, sizeof(bt_mac)); + + while ((line_len = parse_cfg_get_line(data, size, s)) != -1) { + pos = s; + while (*pos == ' ' || *pos == '\t') + pos++; + + if (*pos == '#' || (*pos == '\r' && *(pos + 1) == '\n') || + *pos == '\n' || *pos == '\0') + continue; /* Need n't process this line */ + + /* Process MAC addr */ + if (strncmp((char *)pos, "mac_addr", 8) == 0) { + intf_s = (u8 *)strchr((const char *)pos, '='); + if (intf_s != NULL) + intf_e = (u8 *)strchr((const char *)intf_s, + ':'); + else + intf_e = NULL; + if (intf_s != NULL && intf_e != NULL) { + if ((intf_e - intf_s) > MAX_PARAM_LEN) { + PRINTM(ERROR, + "BT: Too long interface name %d\n", + __LINE__); + goto done; + } + strncpy(dev_name, (const char *)intf_s + 1, + intf_e - intf_s - 1); + dev_name[intf_e - intf_s - 1] = '\0'; + if (strcmp + (dev_name, + priv->bt_dev.m_dev[BT_SEQ].name) == 0) { + /* found hci device */ + strncpy((char *)bt_addr, + (const char *)intf_e + 1, + MAX_MAC_ADDR_LEN - 1); + bt_addr[MAX_MAC_ADDR_LEN - 1] = '\0'; + /* Convert MAC format */ + bt_mac2u8(bt_mac, (char *)bt_addr); + PRINTM(CMD, + "HCI: %s new BT Address " MACSTR + "\n", dev_name, MAC2STR(bt_mac)); + if (BT_STATUS_SUCCESS != + bt_set_mac_address(priv, bt_mac)) { + PRINTM(FATAL, + "BT: Fail to set mac address\n"); + goto done; + } + } + } else { + PRINTM(ERROR, + "BT: Wrong config file format %d\n", + __LINE__); + goto done; + } + } + /* Process REG value */ + else if (strncmp((char *)pos, "bt_reg", 6) == 0) { + intf_s = (u8 *)strchr((const char *)pos, '='); + if (intf_s != NULL) + intf_e = (u8 *)strchr((const char *)intf_s, + ','); + else + intf_e = NULL; + if (intf_s != NULL && intf_e != NULL) { + /* Copy type */ + memset(buf, 0, sizeof(buf)); + strncpy((char *)buf, (const char *)intf_s + 1, + 1); + buf[1] = '\0'; + if (0 == bt_atoi(&setting, (char *)buf)) + type = (u8)setting; + else { + PRINTM(ERROR, + "BT: Fail to parse reg type\n"); + goto done; + } + } else { + PRINTM(ERROR, + "BT: Wrong config file format %d\n", + __LINE__); + goto done; + } + intf_s = intf_e + 1; + intf_e = (u8 *)strchr((const char *)intf_s, ','); + if (intf_e != NULL) { + if ((intf_e - intf_s) >= MAX_PARAM_LEN) { + PRINTM(ERROR, + "BT: Regsier offset is too long %d\n", + __LINE__); + goto done; + } + /* Copy offset */ + memset(buf, 0, sizeof(buf)); + strncpy((char *)buf, (const char *)intf_s, + intf_e - intf_s); + buf[intf_e - intf_s] = '\0'; + if (0 == bt_atoi(&setting, (char *)buf)) + offset = (u32)setting; + else { + PRINTM(ERROR, + "BT: Fail to parse reg offset\n"); + goto done; + } + } else { + PRINTM(ERROR, + "BT: Wrong config file format %d\n", + __LINE__); + goto done; + } + intf_s = intf_e + 1; + if ((strlen((const char *)intf_s) >= MAX_PARAM_LEN)) { + PRINTM(ERROR, + "BT: Regsier value is too long %d\n", + __LINE__); + goto done; + } + /* Copy value */ + memset(buf, 0, sizeof(buf)); + strncpy((char *)buf, (const char *)intf_s, sizeof(buf)); + if (0 == bt_atoi(&setting, (char *)buf)) + value = (u16) setting; + else { + PRINTM(ERROR, "BT: Fail to parse reg value\n"); + goto done; + } + + PRINTM(CMD, + "BT: Write reg type: %d offset: 0x%x value: 0x%x\n", + type, offset, value); + if (BT_STATUS_SUCCESS != + bt_write_reg(priv, type, offset, value)) { + PRINTM(FATAL, + "BT: Write reg failed. type: %d offset: 0x%x value: 0x%x\n", + type, offset, value); + goto done; + } + } + } + ret = BT_STATUS_SUCCESS; + +done: + LEAVE(); + return ret; +} + +/** + * @brief BT request init conf firmware callback + * This function is invoked by request_firmware_nowait system call + * + * @param firmware A pointer to firmware image + * @param context A pointer to bt_private structure + * + * @return N/A + */ +static void +bt_request_init_user_conf_callback(const struct firmware *firmware, + void *context) +{ + bt_private *priv = (bt_private *)context; + + ENTER(); + + if (!firmware) + PRINTM(ERROR, "BT user init config request firmware failed\n"); + + priv->init_user_cfg = firmware; + priv->init_user_conf_wait_flag = TRUE; + wake_up_interruptible(&priv->init_user_conf_wait_q); + + LEAVE(); + return; +} + +/** + * @brief BT set user defined init data and param + * + * @param priv BT private handle + * @param cfg_file user cofig file + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_init_config(bt_private *priv, char *cfg_file) +{ + const struct firmware *cfg = NULL; + int ret = BT_STATUS_SUCCESS; + + ENTER(); + if ((request_firmware(&cfg, cfg_file, priv->hotplug_device)) < 0) { + PRINTM(FATAL, "BT: request_firmware() %s failed\n", cfg_file); + ret = BT_STATUS_FAILURE; + goto done; + } + if (cfg) + ret = bt_process_init_cfg(priv, (u8 *)cfg->data, cfg->size); + else + ret = BT_STATUS_FAILURE; +done: + if (cfg) + release_firmware(cfg); + LEAVE(); + return ret; +} + +/** + * @brief BT process calibration data + * + * @param priv a pointer to bt_private structure + * @param data a pointer to cal data + * @param size cal data size + * @param mac mac address buf + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_process_cal_cfg(bt_private *priv, u8 *data, u32 size, char *mac) +{ + u8 bt_mac[ETH_ALEN]; + u8 cal_data[32]; + u8 *mac_data = NULL; + u32 cal_data_len; + int ret = BT_STATUS_FAILURE; + + memset(bt_mac, 0, sizeof(bt_mac)); + cal_data_len = sizeof(cal_data); + if (BT_STATUS_SUCCESS != + bt_parse_cal_cfg(data, size, cal_data, &cal_data_len)) { + goto done; + } + if (mac != NULL) { + /* Convert MAC format */ + bt_mac2u8(bt_mac, mac); + PRINTM(CMD, "HCI: new BT Address " MACSTR "\n", + MAC2STR(bt_mac)); + mac_data = bt_mac; + } + if (BT_STATUS_SUCCESS != bt_load_cal_data(priv, cal_data, mac_data)) { + PRINTM(FATAL, "BT: Fail to load calibrate data\n"); + goto done; + } + ret = BT_STATUS_SUCCESS; + +done: + LEAVE(); + return ret; +} + +/** + * @brief BT process calibration EXT data + * + * @param priv a pointer to bt_private structure + * @param data a pointer to cal data + * @param size cal data size + * @param mac mac address buf + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_process_cal_cfg_ext(bt_private *priv, u8 *data, u32 size) +{ + u8 cal_data[128]; + u32 cal_data_len; + int ret = BT_STATUS_FAILURE; + + cal_data_len = sizeof(cal_data); + if (BT_STATUS_SUCCESS != + bt_parse_cal_cfg(data, size, cal_data, &cal_data_len)) { + goto done; + } + if (BT_STATUS_SUCCESS != + bt_load_cal_data_ext(priv, cal_data, cal_data_len)) { + PRINTM(FATAL, "BT: Fail to load calibrate data\n"); + goto done; + } + ret = BT_STATUS_SUCCESS; + +done: + LEAVE(); + return ret; +} + +/** + * @brief BT process calibration file + * + * @param priv a pointer to bt_private structure + * @param cal_file calibration file name + * @param mac mac address buf + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_cal_config(bt_private *priv, char *cal_file, char *mac) +{ + const struct firmware *cfg = NULL; + int ret = BT_STATUS_SUCCESS; + + ENTER(); + if (bt_req_fw_nowait) { +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) + ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, + cal_file, priv->hotplug_device, + GFP_KERNEL, priv, + bt_request_init_user_conf_callback); +#else +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 13) + ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, + cal_file, priv->hotplug_device, + priv, + bt_request_init_user_conf_callback); +#else + ret = request_firmware_nowait(THIS_MODULE, + cal_file, priv->hotplug_device, + priv, + bt_request_init_user_conf_callback); +#endif +#endif + if (ret < 0) { + PRINTM(FATAL, + "BT: bt_cal_config() failed, error code = %#x cal_file=%s\n", + ret, cal_file); + ret = BT_STATUS_FAILURE; + goto done; + } + priv->init_user_conf_wait_flag = FALSE; + wait_event_interruptible(priv->init_user_conf_wait_q, + priv->init_user_conf_wait_flag); + cfg = priv->init_user_cfg; + } else { + if ((request_firmware(&cfg, cal_file, priv->hotplug_device)) < + 0) { + PRINTM(FATAL, "BT: request_firmware() %s failed\n", + cal_file); + ret = BT_STATUS_FAILURE; + goto done; + } + } + if (cfg) + ret = bt_process_cal_cfg(priv, (u8 *)cfg->data, cfg->size, mac); + else + ret = BT_STATUS_FAILURE; +done: + if (cfg) + release_firmware(cfg); + LEAVE(); + return ret; +} + +/** + * @brief BT process calibration EXT file + * + * @param priv a pointer to bt_private structure + * @param cal_file calibration file name + * @param mac mac address buf + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_cal_config_ext(bt_private *priv, char *cal_file) +{ + const struct firmware *cfg = NULL; + int ret = BT_STATUS_SUCCESS; + + ENTER(); + if (bt_req_fw_nowait) { +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) + ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, + cal_file, priv->hotplug_device, + GFP_KERNEL, priv, + bt_request_init_user_conf_callback); +#else +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 13) + ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, + cal_file, priv->hotplug_device, + priv, + bt_request_init_user_conf_callback); +#else + ret = request_firmware_nowait(THIS_MODULE, + cal_file, priv->hotplug_device, + priv, + bt_request_init_user_conf_callback); +#endif +#endif + if (ret < 0) { + PRINTM(FATAL, + "BT: bt_cal_config_ext() failed, error code = %#x cal_file=%s\n", + ret, cal_file); + ret = BT_STATUS_FAILURE; + goto done; + } + priv->init_user_conf_wait_flag = FALSE; + wait_event_interruptible(priv->init_user_conf_wait_q, + priv->init_user_conf_wait_flag); + cfg = priv->init_user_cfg; + } else { + if ((request_firmware(&cfg, cal_file, priv->hotplug_device)) < + 0) { + PRINTM(FATAL, "BT: request_firmware() %s failed\n", + cal_file); + ret = BT_STATUS_FAILURE; + goto done; + } + } + if (cfg) + ret = bt_process_cal_cfg_ext(priv, (u8 *)cfg->data, cfg->size); + else + ret = BT_STATUS_FAILURE; +done: + if (cfg) + release_firmware(cfg); + LEAVE(); + return ret; +} + +/** + * @brief BT init mac address from bt_mac parametre when insmod + * + * @param priv a pointer to bt_private structure + * @param bt_mac mac address buf + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_init_mac_address(bt_private *priv, char *mac) +{ + u8 bt_mac[ETH_ALEN]; + int ret = BT_STATUS_FAILURE; + + ENTER(); + memset(bt_mac, 0, sizeof(bt_mac)); + bt_mac2u8(bt_mac, mac); + PRINTM(CMD, "HCI: New BT Address " MACSTR "\n", MAC2STR(bt_mac)); + ret = bt_set_mac_address(priv, bt_mac); + if (ret != BT_STATUS_SUCCESS) + PRINTM(FATAL, + "BT: Fail to set mac address from insmod parametre.\n"); + + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/bt_sd8887/bt/bt_main.c b/arch/arm/mach-berlin/modules/bt_sd8887/bt/bt_main.c new file mode 100644 index 00000000..bb1d80c8 --- /dev/null +++ b/arch/arm/mach-berlin/modules/bt_sd8887/bt/bt_main.c @@ -0,0 +1,3499 @@ +/** @file bt_main.c + * + * @brief This file contains the major functions in BlueTooth + * driver. It includes init, exit, open, close and main + * thread etc.. + * + * Copyright (C) 2007-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available along with the File in the gpl.txt file or by writing to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307 or on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ +/** + * @mainpage M-BT Linux Driver + * + * @section overview_sec Overview + * + * The M-BT is a Linux reference driver for Marvell Bluetooth chipset. + * + * @section copyright_sec Copyright + * + * Copyright (C) 2007-2015, Marvell International Ltd. + * + */ + +#include + +#ifdef CONFIG_OF +#include +#endif + +#include + +#include "bt_drv.h" +#include "mbt_char.h" +#include "bt_sdio.h" + +/** Version */ +#define VERSION "C3X14112" + +/** Driver version */ +static char mbt_driver_version[] = "SD8XXX-%s-" VERSION "-(" "FP" FPNUM ")" +#ifdef DEBUG_LEVEL2 + "-dbg" +#endif + " "; + +/** SD8787 Card */ +#define CARD_SD8787 "SD8787" +/** SD8777 Card */ +#define CARD_SD8777 "SD8777" +/** SD8887 Card */ +#define CARD_SD8887 "SD8887" +/** SD8897 Card */ +#define CARD_SD8897 "SD8897" +/** SD8797 Card */ +#define CARD_SD8797 "SD8797" + +/** Declare and initialize fw_version */ +static char fw_version[32] = "0.0.0.p0"; + +#define AID_SYSTEM 1000 /* system server */ + +#define AID_BLUETOOTH 1002 /* bluetooth subsystem */ + +/** Define module name */ +#define MODULE_NAME "bt_fm_nfc" + +/** Declaration of chardev class */ +static struct class *chardev_class; + +/** Interface specific variables */ +static int fmchar_minor; +static int nfcchar_minor; + +/** Default Driver mode */ +static int drv_mode = (DRV_MODE_BT | DRV_MODE_FM | DRV_MODE_NFC); + +/** FM interface name */ +static char *fm_name; +/** NFC interface name */ +static char *nfc_name; + +/** Firmware flag */ +static int fw = 1; +/** default powermode */ +static int psmode = 1; +/** Default CRC check control */ +static int fw_crc_check = 1; +/** Init config file (MAC address, register etc.) */ +static char *init_cfg; +/** Calibration config file (MAC address, init powe etc.) */ +static char *cal_cfg; +/** Calibration config file EXT */ +static char *cal_cfg_ext; +/** Init MAC address */ +static char *bt_mac; +static int mbt_gpio_pin; + +/** Setting mbt_drvdbg value based on DEBUG level */ +#ifdef DEBUG_LEVEL1 +#ifdef DEBUG_LEVEL2 +#define DEFAULT_DEBUG_MASK (0xffffffff & ~DBG_EVENT) +#else +#define DEFAULT_DEBUG_MASK (DBG_MSG | DBG_FATAL | DBG_ERROR) +#endif /* DEBUG_LEVEL2 */ +u32 mbt_drvdbg = DEFAULT_DEBUG_MASK; +#endif + +#ifdef CONFIG_OF +static int dts_enable = 1; +#endif + +#ifdef SDIO_SUSPEND_RESUME +/** PM keep power */ +int mbt_pm_keep_power = 1; +#endif + +/** + * @brief Alloc bt device + * + * @return pointer to structure mbt_dev or NULL + */ +struct mbt_dev * +alloc_mbt_dev(void) +{ + struct mbt_dev *mbt_dev; + ENTER(); + + mbt_dev = kzalloc(sizeof(struct mbt_dev), GFP_KERNEL); + if (!mbt_dev) { + LEAVE(); + return NULL; + } + + LEAVE(); + return mbt_dev; +} + +/** + * @brief Alloc fm device + * + * @return pointer to structure fm_dev or NULL + */ +struct fm_dev * +alloc_fm_dev(void) +{ + struct fm_dev *fm_dev; + ENTER(); + + fm_dev = kzalloc(sizeof(struct fm_dev), GFP_KERNEL); + if (!fm_dev) { + LEAVE(); + return NULL; + } + + LEAVE(); + return fm_dev; +} + +/** + * @brief Alloc nfc device + * + * @return pointer to structure nfc_dev or NULL + */ +struct nfc_dev * +alloc_nfc_dev(void) +{ + struct nfc_dev *nfc_dev; + ENTER(); + + nfc_dev = kzalloc(sizeof(struct nfc_dev), GFP_KERNEL); + if (!nfc_dev) { + LEAVE(); + return NULL; + } + + LEAVE(); + return nfc_dev; +} + +/** + * @brief Frees m_dev + * + * @return N/A + */ +void +free_m_dev(struct m_dev *m_dev) +{ + ENTER(); + kfree(m_dev->dev_pointer); + m_dev->dev_pointer = NULL; + LEAVE(); +} + +/** + * @brief clean up m_devs + * + * @return N/A + */ +void +clean_up_m_devs(bt_private *priv) +{ + struct m_dev *m_dev = NULL; + struct hci_dev *hdev = NULL; + + ENTER(); + if (priv->bt_dev.m_dev[BT_SEQ].dev_pointer) { + m_dev = &(priv->bt_dev.m_dev[BT_SEQ]); + PRINTM(MSG, "BT: Delete %s\n", m_dev->name); + if (m_dev->spec_type == BLUEZ_SPEC) { + hdev = (struct hci_dev *)m_dev->dev_pointer; + hci_unregister_dev(hdev); + hci_free_dev(hdev); + } + priv->bt_dev.m_dev[BT_SEQ].dev_pointer = NULL; + } + if (priv->bt_dev.m_dev[FM_SEQ].dev_pointer) { + m_dev = &(priv->bt_dev.m_dev[FM_SEQ]); + PRINTM(MSG, "BT: Delete %s\n", m_dev->name); + if ((drv_mode & DRV_MODE_FM) && (fmchar_minor > 0)) + fmchar_minor--; + m_dev->close(m_dev); + /** unregister m_dev to char_dev */ + if (chardev_class) + chardev_cleanup_one(m_dev, chardev_class); + free_m_dev(m_dev); + priv->bt_dev.m_dev[FM_SEQ].dev_pointer = NULL; + } + if (priv->bt_dev.m_dev[NFC_SEQ].dev_pointer) { + m_dev = &(priv->bt_dev.m_dev[NFC_SEQ]); + PRINTM(MSG, "BT: Delete %s\n", m_dev->name); + if ((drv_mode & DRV_MODE_NFC) && (nfcchar_minor > 0)) + nfcchar_minor--; + m_dev->close(m_dev); + /** unregister m_dev to char_dev */ + if (chardev_class) + chardev_cleanup_one(m_dev, chardev_class); + free_m_dev(m_dev); + priv->bt_dev.m_dev[NFC_SEQ].dev_pointer = NULL; + } + LEAVE(); + return; +} + +/** + * @brief This function verify the received event pkt + * + * Event format: + * +--------+--------+--------+--------+--------+ + * | Event | Length | ncmd | Opcode | + * +--------+--------+--------+--------+--------+ + * | 1-byte | 1-byte | 1-byte | 2-byte | + * +--------+--------+--------+--------+--------+ + * + * @param priv A pointer to bt_private structure + * @param skb A pointer to rx skb + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +check_evtpkt(bt_private *priv, struct sk_buff *skb) +{ + struct hci_event_hdr *hdr = (struct hci_event_hdr *)skb->data; + struct hci_ev_cmd_complete *ec; + u16 opcode, ocf; + int ret = BT_STATUS_SUCCESS; + ENTER(); + if (!priv->bt_dev.sendcmdflag) { + ret = BT_STATUS_FAILURE; + goto exit; + } + if (hdr->evt == HCI_EV_CMD_COMPLETE) { + ec = (struct hci_ev_cmd_complete *) + (skb->data + HCI_EVENT_HDR_SIZE); + opcode = __le16_to_cpu(ec->opcode); + ocf = hci_opcode_ocf(opcode); + PRINTM(CMD, "BT: CMD_COMPLTE ocf=0x%x, send_cmd_ocf=0x%x\n", + ocf, priv->bt_dev.send_cmd_ocf); + if (ocf != priv->bt_dev.send_cmd_ocf) { + ret = BT_STATUS_FAILURE; + goto exit; + } + switch (ocf) { + case BT_CMD_MODULE_CFG_REQ: + case BT_CMD_BLE_DEEP_SLEEP: + case BT_CMD_CONFIG_MAC_ADDR: + case BT_CMD_CSU_WRITE_REG: + case BT_CMD_LOAD_CONFIG_DATA: + case BT_CMD_LOAD_CONFIG_DATA_EXT: + case BT_CMD_AUTO_SLEEP_MODE: + case BT_CMD_HOST_SLEEP_CONFIG: + case BT_CMD_SDIO_PULL_CFG_REQ: + case BT_CMD_SET_EVT_FILTER: + case BT_CMD_ENABLE_WRITE_SCAN: + // case BT_CMD_ENABLE_DEVICE_TESTMODE: + case BT_CMD_RESET: + case BT_CMD_SET_GPIO_PIN: + priv->bt_dev.sendcmdflag = FALSE; + priv->adapter->cmd_complete = TRUE; + wake_up_interruptible(&priv->adapter->cmd_wait_q); + break; + case BT_CMD_GET_FW_VERSION: + { + u8 *pos = (skb->data + HCI_EVENT_HDR_SIZE + + sizeof(struct hci_ev_cmd_complete) + + 1); + snprintf(fw_version, sizeof(fw_version), + "%u.%u.%u.p%u", pos[2], pos[1], pos[0], + pos[3]); + priv->bt_dev.sendcmdflag = FALSE; + priv->adapter->cmd_complete = TRUE; + wake_up_interruptible(&priv->adapter-> + cmd_wait_q); + break; + } + case BT_CMD_HISTOGRAM: + { + u8 *status = + skb->data + HCI_EVENT_HDR_SIZE + + sizeof(struct hci_ev_cmd_complete); + u8 *pos = + (skb->data + HCI_EVENT_HDR_SIZE + + sizeof(struct hci_ev_cmd_complete) + + 1); + if (*status == 0) { + priv->hist_data_len = + hdr->plen - + sizeof(struct + hci_ev_cmd_complete) - 1; + if (priv->hist_data_len > + sizeof(priv->hist_data)) + priv->hist_data_len = + sizeof(priv->hist_data); + memcpy(priv->hist_data, pos, + priv->hist_data_len); + PRINTM(CMD, "histogram len=%d\n", + priv->hist_data_len); + } + priv->bt_dev.sendcmdflag = FALSE; + priv->adapter->cmd_complete = TRUE; + wake_up_interruptible(&priv->adapter-> + cmd_wait_q); + break; + } +#ifdef SDIO_SUSPEND_RESUME + case FM_CMD: + { + u8 *pos = + (skb->data + HCI_EVENT_HDR_SIZE + + sizeof(struct hci_ev_cmd_complete) + + 1); + if (*pos == FM_SET_INTR_MASK) { + priv->bt_dev.sendcmdflag = FALSE; + priv->adapter->cmd_complete = TRUE; + wake_up_interruptible(&priv->adapter-> + cmd_wait_q); + } + } + break; +#endif + case BT_CMD_HOST_SLEEP_ENABLE: + priv->bt_dev.sendcmdflag = FALSE; + break; + default: + ret = BT_STATUS_FAILURE; + break; + } + } +exit: + if (ret == BT_STATUS_SUCCESS) + kfree_skb(skb); + LEAVE(); + return ret; +} + +/** + * @brief This function process the received event + * + * Event format: + * +--------+--------+--------+--------+-----+ + * | EC | Length | Data | + * +--------+--------+--------+--------+-----+ + * | 1-byte | 1-byte | n-byte | + * +--------+--------+--------+--------+-----+ + * + * @param priv A pointer to bt_private structure + * @param skb A pointer to rx skb + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_process_event(bt_private *priv, struct sk_buff *skb) +{ + int ret = BT_STATUS_SUCCESS; + struct m_dev *m_dev = &(priv->bt_dev.m_dev[BT_SEQ]); + BT_EVENT *pevent; + + ENTER(); + pevent = (BT_EVENT *)skb->data; + if (pevent->EC != 0xff) { + PRINTM(CMD, "BT: Not Marvell Event=0x%x\n", pevent->EC); + ret = BT_STATUS_FAILURE; + goto exit; + } + switch (pevent->data[0]) { + case BT_CMD_HISTOGRAM: + break; + case BT_CMD_AUTO_SLEEP_MODE: + if (pevent->data[2] == BT_STATUS_SUCCESS) { + if (pevent->data[1] == BT_PS_ENABLE) + priv->adapter->psmode = 1; + else + priv->adapter->psmode = 0; + PRINTM(CMD, "BT: PS Mode %s:%s\n", m_dev->name, + (priv->adapter->psmode) ? "Enable" : "Disable"); + + } else { + PRINTM(CMD, "BT: PS Mode Command Fail %s\n", + m_dev->name); + } + break; + case BT_CMD_HOST_SLEEP_CONFIG: + if (pevent->data[3] == BT_STATUS_SUCCESS) { + PRINTM(CMD, "BT: %s: gpio=0x%x, gap=0x%x\n", + m_dev->name, pevent->data[1], pevent->data[2]); + } else { + PRINTM(CMD, "BT: %s: HSCFG Command Fail\n", + m_dev->name); + } + break; + case BT_CMD_HOST_SLEEP_ENABLE: + if (pevent->data[1] == BT_STATUS_SUCCESS) { + priv->adapter->hs_state = HS_ACTIVATED; + if (priv->adapter->suspend_fail == FALSE) { +#ifdef SDIO_SUSPEND_RESUME +#ifdef MMC_PM_KEEP_POWER +#ifdef MMC_PM_FUNC_SUSPENDED + bt_is_suspended(priv); +#endif +#endif +#endif + wake_up_interruptible(&priv->adapter-> + cmd_wait_q); + } + if (priv->adapter->psmode) + priv->adapter->ps_state = PS_SLEEP; + PRINTM(CMD, "BT: EVENT %s: HS ACTIVATED!\n", + m_dev->name); + + } else { + PRINTM(CMD, "BT: %s: HS Enable Fail\n", m_dev->name); + } + break; + case BT_CMD_MODULE_CFG_REQ: + if ((priv->bt_dev.sendcmdflag == TRUE) && + ((pevent->data[1] == MODULE_BRINGUP_REQ) + || (pevent->data[1] == MODULE_SHUTDOWN_REQ))) { + if (pevent->data[1] == MODULE_BRINGUP_REQ) { + PRINTM(CMD, "BT: EVENT %s:%s\n", m_dev->name, + (pevent->data[2] && (pevent->data[2] != + MODULE_CFG_RESP_ALREADY_UP)) + ? "Bring up Fail" : "Bring up success"); + priv->bt_dev.devType = pevent->data[3]; + PRINTM(CMD, "devType:%s\n", + (pevent->data[3] == + DEV_TYPE_AMP) ? "AMP controller" : + "BR/EDR controller"); + priv->bt_dev.devFeature = pevent->data[4]; + PRINTM(CMD, + "devFeature: %s, %s, %s, %s, %s\n", + ((pevent-> + data[4] & DEV_FEATURE_BT) ? + "BT Feature" : "No BT Feature"), + ((pevent-> + data[4] & DEV_FEATURE_BTAMP) ? + "BTAMP Feature" : "No BTAMP Feature"), + ((pevent-> + data[4] & DEV_FEATURE_BLE) ? + "BLE Feature" : "No BLE Feature"), + ((pevent-> + data[4] & DEV_FEATURE_FM) ? + "FM Feature" : "No FM Feature"), + ((pevent-> + data[4] & DEV_FEATURE_NFC) ? + "NFC Feature" : "No NFC Feature")); + } + if (pevent->data[1] == MODULE_SHUTDOWN_REQ) { + PRINTM(CMD, "BT: EVENT %s:%s\n", m_dev->name, + (pevent->data[2]) ? "Shut down Fail" + : "Shut down success"); + + } + if (pevent->data[2]) { + priv->bt_dev.sendcmdflag = FALSE; + priv->adapter->cmd_complete = TRUE; + wake_up_interruptible(&priv->adapter-> + cmd_wait_q); + } + } else { + PRINTM(CMD, "BT_CMD_MODULE_CFG_REQ resp for APP\n"); + ret = BT_STATUS_FAILURE; + } + break; + case BT_EVENT_POWER_STATE: + if (pevent->data[1] == BT_PS_SLEEP) + priv->adapter->ps_state = PS_SLEEP; + PRINTM(CMD, "BT: EVENT %s:%s\n", m_dev->name, + (priv->adapter->ps_state) ? "PS_SLEEP" : "PS_AWAKE"); + + break; + case BT_CMD_SDIO_PULL_CFG_REQ: + if (pevent->data[pevent->length - 1] == BT_STATUS_SUCCESS) + PRINTM(CMD, "BT: %s: SDIO pull configuration success\n", + m_dev->name); + + else { + PRINTM(CMD, "BT: %s: SDIO pull configuration fail\n", + m_dev->name); + + } + break; + default: + PRINTM(CMD, "BT: Unknown Event=%d %s\n", pevent->data[0], + m_dev->name); + ret = BT_STATUS_FAILURE; + break; + } +exit: + if (ret == BT_STATUS_SUCCESS) + kfree_skb(skb); + LEAVE(); + return ret; +} + +/** + * @brief This function save the dump info to file + * + * + * @param dir_name directory name + * @param file_name file_name + * @return 0 --success otherwise fail + */ +int +bt_save_dump_info_to_file(char *dir_name, char *file_name, u8 *buf, u32 buf_len) +{ + int ret = BT_STATUS_SUCCESS; + struct file *pfile = NULL; + u8 name[64]; + mm_segment_t fs; + loff_t pos; + + ENTER(); + + if (!dir_name || !file_name || !buf) { + PRINTM(ERROR, "Can't save dump info to file\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + + memset(name, 0, sizeof(name)); + sprintf((char *)name, "%s/%s", dir_name, file_name); + pfile = filp_open((const char *)name, O_CREAT | O_RDWR, 0644); + if (IS_ERR(pfile)) { + PRINTM(MSG, + "Create file %s error, try to save dump file in /var\n", + name); + memset(name, 0, sizeof(name)); + sprintf((char *)name, "%s/%s", "/var", file_name); + pfile = filp_open((const char *)name, O_CREAT | O_RDWR, 0644); + } + if (IS_ERR(pfile)) { + PRINTM(ERROR, "Create Dump file for %s error\n", name); + ret = BT_STATUS_FAILURE; + goto done; + } + + PRINTM(MSG, "Dump data %s saved in %s\n", file_name, name); + + fs = get_fs(); + set_fs(KERNEL_DS); + pos = 0; + vfs_write(pfile, (const char __user *)buf, buf_len, &pos); + filp_close(pfile, NULL); + set_fs(fs); + + PRINTM(MSG, "Dump data %s saved in %s successfully\n", file_name, name); + +done: + LEAVE(); + return ret; +} + +#define DEBUG_HOST_READY 0xEE +#define DEBUG_FW_DONE 0xFF +#define MAX_POLL_TRIES 100 + +#define DEBUG_DUMP_CTRL_REG_8897 0xE2 +#define DEBUG_DUMP_START_REG_8897 0xE3 +#define DEBUG_DUMP_END_REG_8897 0xEA +#define DEBUG_DUMP_CTRL_REG_8887 0xA2 +#define DEBUG_DUMP_START_REG_8887 0xA3 +#define DEBUG_DUMP_END_REG_8887 0xAA + +typedef enum { + DUMP_TYPE_ITCM = 0, + DUMP_TYPE_DTCM = 1, + DUMP_TYPE_SQRAM = 2, + DUMP_TYPE_APU_REGS = 3, + DUMP_TYPE_CIU_REGS = 4, + DUMP_TYPE_ICU_REGS = 5, + DUMP_TYPE_MAC_REGS = 6, + DUMP_TYPE_EXTEND_7 = 7, + DUMP_TYPE_EXTEND_8 = 8, + DUMP_TYPE_EXTEND_9 = 9, + DUMP_TYPE_EXTEND_10 = 10, + DUMP_TYPE_EXTEND_11 = 11, + DUMP_TYPE_EXTEND_12 = 12, + DUMP_TYPE_EXTEND_13 = 13, + DUMP_TYPE_EXTEND_LAST = 14 +} dumped_mem_type; + +#define MAX_NAME_LEN 8 +#define MAX_FULL_NAME_LEN 32 + +typedef struct { + u8 mem_name[MAX_NAME_LEN]; + u8 *mem_Ptr; + struct file *pfile_mem; + u8 done_flag; +} memory_type_mapping; + +memory_type_mapping bt_mem_type_mapping_tbl[] = { + {"ITCM", NULL, NULL, 0xF0}, + {"DTCM", NULL, NULL, 0xF1}, + {"SQRAM", NULL, NULL, 0xF2}, + {"APU", NULL, NULL, 0xF3}, + {"CIU", NULL, NULL, 0xF4}, + {"ICU", NULL, NULL, 0xF5}, + {"MAC", NULL, NULL, 0xF6}, + {"EXT7", NULL, NULL, 0xF7}, + {"EXT8", NULL, NULL, 0xF8}, + {"EXT9", NULL, NULL, 0xF9}, + {"EXT10", NULL, NULL, 0xFA}, + {"EXT11", NULL, NULL, 0xFB}, + {"EXT12", NULL, NULL, 0xFC}, + {"EXT13", NULL, NULL, 0xFD}, + {"EXTLAST", NULL, NULL, 0xFE}, +}; + +typedef enum { + RDWR_STATUS_SUCCESS = 0, + RDWR_STATUS_FAILURE = 1, + RDWR_STATUS_DONE = 2 +} rdwr_status; + +/** + * @brief This function read/write firmware via cmd52 + * + * @param phandle A pointer to moal_handle + * + * @return MLAN_STATUS_SUCCESS + */ +rdwr_status +bt_cmd52_rdwr_firmware(bt_private *priv, u8 doneflag) +{ + int ret = 0; + int tries = 0; + u8 ctrl_data = 0; + u8 dbg_dump_ctrl_reg = 0; + + if (priv->card_type == CARD_TYPE_SD8887) + dbg_dump_ctrl_reg = DEBUG_DUMP_CTRL_REG_8887; + else if (priv->card_type == CARD_TYPE_SD8897) + dbg_dump_ctrl_reg = DEBUG_DUMP_CTRL_REG_8897; + + sdio_writeb(((struct sdio_mmc_card *)priv->bt_dev.card)->func, + DEBUG_HOST_READY, dbg_dump_ctrl_reg, &ret); + if (ret) { + PRINTM(ERROR, "SDIO Write ERR\n"); + return RDWR_STATUS_FAILURE; + } + for (tries = 0; tries < MAX_POLL_TRIES; tries++) { + ctrl_data = + sdio_readb(((struct sdio_mmc_card *)priv->bt_dev.card)-> + func, dbg_dump_ctrl_reg, &ret); + if (ret) { + PRINTM(ERROR, "SDIO READ ERR\n"); + return RDWR_STATUS_FAILURE; + } + if (ctrl_data == DEBUG_FW_DONE) + break; + if (doneflag && ctrl_data == doneflag) + return RDWR_STATUS_DONE; + if (ctrl_data != DEBUG_HOST_READY) { + PRINTM(INFO, + "The ctrl reg was changed, re-try again!\n"); + sdio_writeb(((struct sdio_mmc_card *)priv->bt_dev. + card)->func, DEBUG_HOST_READY, + dbg_dump_ctrl_reg, &ret); + if (ret) { + PRINTM(ERROR, "SDIO Write ERR\n"); + return RDWR_STATUS_FAILURE; + } + } + udelay(100); + } + if (ctrl_data == DEBUG_HOST_READY) { + PRINTM(ERROR, "Fail to pull ctrl_data\n"); + return RDWR_STATUS_FAILURE; + } + + return RDWR_STATUS_SUCCESS; +} + +/** + * @brief This function dump firmware memory to file + * + * @param phandle A pointer to moal_handle + * + * @return N/A + */ +void +bt_dump_firmware_info_v2(bt_private *priv) +{ + int ret = 0; + unsigned int reg, reg_start, reg_end; + u8 *dbg_ptr = NULL; + u8 dump_num = 0; + u8 idx = 0; + u8 doneflag = 0; + rdwr_status stat; + u8 i = 0; + u8 read_reg = 0; + u32 memory_size = 0; + u8 path_name[64], file_name[32]; + u8 *end_ptr = NULL; + u8 dbg_dump_start_reg = 0; + u8 dbg_dump_end_reg = 0; + + if (!priv) { + PRINTM(ERROR, "Could not dump firmwware info\n"); + return; + } + + if ((priv->card_type != CARD_TYPE_SD8887) && + (priv->card_type != CARD_TYPE_SD8897)) { + PRINTM(MSG, "card_type %d don't support FW dump\n", + priv->card_type); + return; + } + + memset(path_name, 0, sizeof(path_name)); + strcpy((char *)path_name, "/data"); + PRINTM(MSG, "Create DUMP directory success:dir_name=%s\n", path_name); + + if (priv->card_type == CARD_TYPE_SD8887) { + dbg_dump_start_reg = DEBUG_DUMP_START_REG_8887; + dbg_dump_end_reg = DEBUG_DUMP_END_REG_8887; + } else if (priv->card_type == CARD_TYPE_SD8897) { + dbg_dump_start_reg = DEBUG_DUMP_START_REG_8897; + dbg_dump_end_reg = DEBUG_DUMP_END_REG_8897; + } + + sbi_wakeup_firmware(priv); + sdio_claim_host(((struct sdio_mmc_card *)priv->bt_dev.card)->func); + /* start dump fw memory */ + PRINTM(MSG, "==== DEBUG MODE OUTPUT START ====\n"); + /* read the number of the memories which will dump */ + if (RDWR_STATUS_FAILURE == bt_cmd52_rdwr_firmware(priv, doneflag)) + goto done; + reg = dbg_dump_start_reg; + dump_num = + sdio_readb(((struct sdio_mmc_card *)priv->bt_dev.card)->func, + reg, &ret); + if (ret) { + PRINTM(MSG, "SDIO READ MEM NUM ERR\n"); + goto done; + } + + /* read the length of every memory which will dump */ + for (idx = 0; idx < dump_num; idx++) { + if (RDWR_STATUS_FAILURE == + bt_cmd52_rdwr_firmware(priv, doneflag)) + goto done; + memory_size = 0; + reg = dbg_dump_start_reg; + for (i = 0; i < 4; i++) { + read_reg = + sdio_readb(((struct sdio_mmc_card *)priv-> + bt_dev.card)->func, reg, &ret); + if (ret) { + PRINTM(MSG, "SDIO READ ERR\n"); + goto done; + } + memory_size |= (read_reg << i * 8); + reg++; + } + if (memory_size == 0) { + PRINTM(MSG, "Firmware Dump Finished!\n"); + break; + } else { + PRINTM(MSG, "%s_SIZE=0x%x\n", + bt_mem_type_mapping_tbl[idx].mem_name, + memory_size); + bt_mem_type_mapping_tbl[idx].mem_Ptr = + vmalloc(memory_size + 1); + if ((ret != BT_STATUS_SUCCESS) || + !bt_mem_type_mapping_tbl[idx].mem_Ptr) { + PRINTM(ERROR, + "Error: vmalloc %s buffer failed!!!\n", + bt_mem_type_mapping_tbl[idx].mem_name); + goto done; + } + dbg_ptr = bt_mem_type_mapping_tbl[idx].mem_Ptr; + end_ptr = dbg_ptr + memory_size; + } + doneflag = bt_mem_type_mapping_tbl[idx].done_flag; + PRINTM(MSG, "Start %s output, please wait...\n", + bt_mem_type_mapping_tbl[idx].mem_name); + do { + stat = bt_cmd52_rdwr_firmware(priv, doneflag); + if (RDWR_STATUS_FAILURE == stat) + goto done; + + reg_start = dbg_dump_start_reg; + reg_end = dbg_dump_end_reg; + for (reg = reg_start; reg <= reg_end; reg++) { + *dbg_ptr = + sdio_readb(((struct sdio_mmc_card *) + priv->bt_dev.card)->func, + reg, &ret); + if (ret) { + PRINTM(MSG, "SDIO READ ERR\n"); + goto done; + } + if (dbg_ptr < end_ptr) + dbg_ptr++; + else + PRINTM(MSG, + "pre-allocced buf is not enough\n"); + } + if (RDWR_STATUS_DONE == stat) { + PRINTM(MSG, "%s done:" + "size = 0x%x\n", + bt_mem_type_mapping_tbl[idx].mem_name, + (unsigned int)(dbg_ptr - + bt_mem_type_mapping_tbl + [idx].mem_Ptr)); + memset(file_name, 0, sizeof(file_name)); + sprintf((char *)file_name, "%s%s", "file_bt_", + bt_mem_type_mapping_tbl[idx].mem_name); + if (BT_STATUS_SUCCESS != + bt_save_dump_info_to_file((char *)path_name, + (char *)file_name, + bt_mem_type_mapping_tbl + [idx].mem_Ptr, + memory_size)) + PRINTM(MSG, + "Can't save dump file %s in %s\n", + file_name, path_name); + vfree(bt_mem_type_mapping_tbl[idx].mem_Ptr); + bt_mem_type_mapping_tbl[idx].mem_Ptr = NULL; + break; + } + } while (1); + } + PRINTM(MSG, "==== DEBUG MODE OUTPUT END ====\n"); + /* end dump fw memory */ +done: + sdio_release_host(((struct sdio_mmc_card *)priv->bt_dev.card)->func); + for (idx = 0; idx < dump_num; idx++) { + if (bt_mem_type_mapping_tbl[idx].mem_Ptr) { + vfree(bt_mem_type_mapping_tbl[idx].mem_Ptr); + bt_mem_type_mapping_tbl[idx].mem_Ptr = NULL; + } + } + PRINTM(MSG, "==== DEBUG MODE END ====\n"); + return; +} + +/** + * @brief This function shows debug info for timeout of command sending. + * + * @param adapter A pointer to bt_private + * @param cmd Timeout command id + * + * @return N/A + */ +static void +bt_cmd_timeout_func(bt_private *priv, u16 cmd) +{ + bt_adapter *adapter = priv->adapter; + ENTER(); + + adapter->num_cmd_timeout++; + + PRINTM(ERROR, "Version = %s\n", adapter->drv_ver); + PRINTM(ERROR, "Timeout Command id = 0x%x\n", cmd); + PRINTM(ERROR, "Number of command timeout = %d\n", + adapter->num_cmd_timeout); + PRINTM(ERROR, "Interrupt counter = %d\n", adapter->IntCounter); + PRINTM(ERROR, "Power Save mode = %d\n", adapter->psmode); + PRINTM(ERROR, "Power Save state = %d\n", adapter->ps_state); + PRINTM(ERROR, "Host Sleep state = %d\n", adapter->hs_state); + PRINTM(ERROR, "hs skip count = %d\n", adapter->hs_skip); + PRINTM(ERROR, "suspend_fail flag = %d\n", adapter->suspend_fail); + PRINTM(ERROR, "suspended flag = %d\n", adapter->is_suspended); + PRINTM(ERROR, "Number of wakeup tries = %d\n", adapter->WakeupTries); + PRINTM(ERROR, "Host Cmd complet state = %d\n", adapter->cmd_complete); + PRINTM(ERROR, "Last irq recv = %d\n", adapter->irq_recv); + PRINTM(ERROR, "Last irq processed = %d\n", adapter->irq_done); + PRINTM(ERROR, "tx pending = %d\n", adapter->skb_pending); + PRINTM(ERROR, "sdio int status = %d\n", adapter->sd_ireg); + bt_dump_sdio_regs(priv); + LEAVE(); +} + +/** + * @brief This function send reset cmd to firmware + * + * @param priv A pointer to bt_private structure + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_send_reset_command(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_HCI_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_HCI_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_HCI_CMD *)skb->data; + pcmd->ocf_ogf = (RESET_OGF << 10) | BT_CMD_RESET; + pcmd->length = 0x00; + pcmd->cmd_type = 0x00; + bt_cb(skb)->pkt_type = HCI_COMMAND_PKT; + skb_put(skb, 3); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_RESET; + priv->adapter->cmd_complete = FALSE; + PRINTM(CMD, "Queue Reset Command(0x%x)\n", pcmd->ocf_ogf); + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: Reset timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_RESET); + } else { + PRINTM(CMD, "BT: Reset Command done\n"); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function sends module cfg cmd to firmware + * + * Command format: + * +--------+--------+--------+--------+--------+--------+--------+ + * | OCF OGF | Length | Data | + * +--------+--------+--------+--------+--------+--------+--------+ + * | 2-byte | 1-byte | 4-byte | + * +--------+--------+--------+--------+--------+--------+--------+ + * + * @param priv A pointer to bt_private structure + * @param subcmd sub command + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_send_module_cfg_cmd(bt_private *priv, int subcmd) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "BT: No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_MODULE_CFG_REQ; + pcmd->length = 1; + pcmd->data[0] = subcmd; + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_MODULE_CFG_REQ; + priv->adapter->cmd_complete = FALSE; + PRINTM(CMD, "Queue module cfg Command(0x%x)\n", pcmd->ocf_ogf); + wake_up_interruptible(&priv->MainThread.waitQ); + /* + On some Android platforms certain delay is needed for HCI daemon to + remove this module and close itself gracefully. Otherwise it hangs. + This 10ms delay is a workaround for such platforms as the root cause + has not been found yet. */ + mdelay(10); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: module_cfg_cmd(%#x): timeout sendcmdflag=%d\n", + subcmd, priv->bt_dev.sendcmdflag); + bt_cmd_timeout_func(priv, BT_CMD_MODULE_CFG_REQ); + } else { + PRINTM(CMD, "BT: module cfg Command done\n"); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function to get histogram + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_get_histogram(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_HISTOGRAM; + pcmd->length = 0; + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + PRINTM(CMD, "Queue Histogram cmd(0x%x)\n", pcmd->ocf_ogf); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_HISTOGRAM; + priv->adapter->cmd_complete = FALSE; + priv->hist_data_len = 0; + memset(priv->hist_data, 0, sizeof(priv->hist_data)); + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: histogram timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_HISTOGRAM); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function enables power save mode + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_enable_ps(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_AUTO_SLEEP_MODE; + if (priv->bt_dev.psmode) + pcmd->data[0] = BT_PS_ENABLE; + else + pcmd->data[0] = BT_PS_DISABLE; + if (priv->bt_dev.idle_timeout) { + pcmd->length = 3; + pcmd->data[1] = (u8)(priv->bt_dev.idle_timeout & 0x00ff); + pcmd->data[2] = (priv->bt_dev.idle_timeout & 0xff00) >> 8; + } else { + pcmd->length = 1; + } + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + PRINTM(CMD, "Queue PSMODE Command(0x%x):%d\n", pcmd->ocf_ogf, + pcmd->data[0]); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_AUTO_SLEEP_MODE; + priv->adapter->cmd_complete = FALSE; + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: psmode timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_AUTO_SLEEP_MODE); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function sends hscfg command + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_send_hscfg_cmd(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_HOST_SLEEP_CONFIG; + pcmd->length = 2; + pcmd->data[0] = (priv->bt_dev.gpio_gap & 0xff00) >> 8; + pcmd->data[1] = (u8)(priv->bt_dev.gpio_gap & 0x00ff); + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + PRINTM(CMD, "Queue HSCFG Command(0x%x),gpio=0x%x,gap=0x%x\n", + pcmd->ocf_ogf, pcmd->data[0], pcmd->data[1]); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_HOST_SLEEP_CONFIG; + priv->adapter->cmd_complete = FALSE; + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: HSCFG timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_HOST_SLEEP_CONFIG); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function sends sdio pull ctrl command + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_send_sdio_pull_ctrl_cmd(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_SDIO_PULL_CFG_REQ; + pcmd->length = 4; + pcmd->data[0] = (priv->bt_dev.sdio_pull_cfg & 0x000000ff); + pcmd->data[1] = (priv->bt_dev.sdio_pull_cfg & 0x0000ff00) >> 8; + pcmd->data[2] = (priv->bt_dev.sdio_pull_cfg & 0x00ff0000) >> 16; + pcmd->data[3] = (priv->bt_dev.sdio_pull_cfg & 0xff000000) >> 24; + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + PRINTM(CMD, + "Queue SDIO PULL CFG Command(0x%x), PullUp=0x%x%x,PullDown=0x%x%x\n", + pcmd->ocf_ogf, pcmd->data[1], pcmd->data[0], + pcmd->data[3], pcmd->data[2]); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_SDIO_PULL_CFG_REQ; + priv->adapter->cmd_complete = FALSE; + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: SDIO PULL CFG timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_SDIO_PULL_CFG_REQ); + } +exit: + LEAVE(); + return ret; +} + +#ifdef SDIO_SUSPEND_RESUME +/** + * @brief This function set FM interrupt mask + * + * @param priv A pointer to bt_private structure + * + * @param priv FM interrupt mask value + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +fm_set_intr_mask(bt_private *priv, u32 mask) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | FM_CMD; + pcmd->length = 0x05; + pcmd->data[0] = FM_SET_INTR_MASK; + memcpy(&pcmd->data[1], &mask, sizeof(mask)); + PRINTM(CMD, "FM set intr mask=0x%x\n", mask); + bt_cb(skb)->pkt_type = HCI_COMMAND_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[FM_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = FM_CMD; + priv->adapter->cmd_complete = FALSE; + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout(priv->adapter->cmd_wait_q, + priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "FM: set intr mask=%d timeout\n", (int)mask); + bt_cmd_timeout_func(priv, FM_CMD); + } +exit: + LEAVE(); + return ret; +} +#endif + +/** + * @brief This function enables host sleep + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_enable_hs(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + priv->adapter->suspend_fail = FALSE; + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_HOST_SLEEP_ENABLE; + pcmd->length = 0; + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_HOST_SLEEP_ENABLE; + PRINTM(CMD, "Queue hs enable Command(0x%x)\n", pcmd->ocf_ogf); + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->hs_state, + WAIT_UNTIL_HS_STATE_CHANGED)) { + PRINTM(MSG, "BT: Enable host sleep timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_HOST_SLEEP_ENABLE); + } + OS_INT_DISABLE; + if ((priv->adapter->hs_state == HS_ACTIVATED) || + (priv->adapter->is_suspended == TRUE)) { + OS_INT_RESTORE; + PRINTM(MSG, "BT: suspend success! skip=%d\n", + priv->adapter->hs_skip); + } else { + priv->adapter->suspend_fail = TRUE; + OS_INT_RESTORE; + priv->adapter->hs_skip++; + ret = BT_STATUS_FAILURE; + PRINTM(MSG, + "BT: suspend skipped! " + "state=%d skip=%d ps_state= %d WakeupTries=%d\n", + priv->adapter->hs_state, priv->adapter->hs_skip, + priv->adapter->ps_state, priv->adapter->WakeupTries); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function Set Evt Filter + * + * @param priv A pointer to bt_private structure + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_set_evt_filter(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (0x03 << 10) | BT_CMD_SET_EVT_FILTER; + pcmd->length = 0x03; + pcmd->data[0] = 0x02; + pcmd->data[1] = 0x00; + pcmd->data[2] = 0x03; + bt_cb(skb)->pkt_type = HCI_COMMAND_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + PRINTM(CMD, "Queue Set Evt Filter Command(0x%x)\n", pcmd->ocf_ogf); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_SET_EVT_FILTER; + priv->adapter->cmd_complete = FALSE; + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout(priv->adapter->cmd_wait_q, + priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: Set Evt Filter timeout\n"); + bt_cmd_timeout_func(priv, BT_CMD_SET_EVT_FILTER); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function Enable Write Scan - Page and Inquiry + * + * @param priv A pointer to bt_private structure + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_enable_write_scan(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (0x03 << 10) | BT_CMD_ENABLE_WRITE_SCAN; + pcmd->length = 0x01; + pcmd->data[0] = 0x03; + bt_cb(skb)->pkt_type = HCI_COMMAND_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + PRINTM(CMD, "Queue Enable Write Scan Command(0x%x)\n", pcmd->ocf_ogf); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_ENABLE_WRITE_SCAN; + priv->adapter->cmd_complete = FALSE; + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout(priv->adapter->cmd_wait_q, + priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: Enable Write Scan timeout\n"); + bt_cmd_timeout_func(priv, BT_CMD_ENABLE_WRITE_SCAN); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function Enable Device under test mode + * + * @param priv A pointer to bt_private structure + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_enable_device_under_testmode(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (0x06 << 10) | BT_CMD_ENABLE_DEVICE_TESTMODE; + pcmd->length = 0x00; + bt_cb(skb)->pkt_type = HCI_COMMAND_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + PRINTM(CMD, "Queue enable device under testmode Command(0x%x)\n", + pcmd->ocf_ogf); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_ENABLE_DEVICE_TESTMODE; + priv->adapter->cmd_complete = FALSE; + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout(priv->adapter->cmd_wait_q, + priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: Enable Device under TEST mode timeout\n"); + bt_cmd_timeout_func(priv, BT_CMD_ENABLE_DEVICE_TESTMODE); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function enables test mode and send cmd + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_enable_test_mode(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + + ENTER(); + + /** Set Evt Filter Command */ + ret = bt_set_evt_filter(priv); + if (ret != BT_STATUS_SUCCESS) { + PRINTM(ERROR, "BT test_mode: Set Evt filter fail\n"); + goto exit; + } + + /** Enable Write Scan Command */ + ret = bt_enable_write_scan(priv); + if (ret != BT_STATUS_SUCCESS) { + PRINTM(ERROR, "BT test_mode: Enable Write Scan fail\n"); + goto exit; + } + + /** Enable Device under test mode */ + ret = bt_enable_device_under_testmode(priv); + if (ret != BT_STATUS_SUCCESS) + PRINTM(ERROR, + "BT test_mode: Enable device under testmode fail\n"); + +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function set GPIO pin + * + * @param priv A pointer to bt_private structure + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_set_gpio_pin(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + /**Interrupt falling edge **/ + u8 gpio_int_edge = INT_FALLING_EDGE; + /**Delay 50 usec **/ + u8 gpio_pulse_width = DELAY_50_US; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_SET_GPIO_PIN; + pcmd->data[0] = mbt_gpio_pin; + pcmd->data[1] = gpio_int_edge; + pcmd->data[2] = gpio_pulse_width; + pcmd->length = 3; + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_SET_GPIO_PIN; + priv->adapter->cmd_complete = FALSE; + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout(priv->adapter->cmd_wait_q, + priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: Set GPIO pin: timeout!\n"); + bt_cmd_timeout_func(priv, BT_CMD_SET_GPIO_PIN); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function sets ble deepsleep mode + * + * @param priv A pointer to bt_private structure + * @param mode TRUE/FALSE + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_set_ble_deepsleep(bt_private *priv, int mode) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_BLE_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_BLE_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_BLE_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_BLE_DEEP_SLEEP; + pcmd->length = 1; + pcmd->deepsleep = mode; + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, sizeof(BT_BLE_CMD)); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_BLE_DEEP_SLEEP; + priv->adapter->cmd_complete = FALSE; + PRINTM(CMD, "BT: Set BLE deepsleep = %d (0x%x)\n", mode, pcmd->ocf_ogf); + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: Set BLE deepsleep timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_BLE_DEEP_SLEEP); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function gets FW version + * + * @param priv A pointer to bt_private structure + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_get_fw_version(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_HCI_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_HCI_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_HCI_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_GET_FW_VERSION; + pcmd->length = 0x01; + pcmd->cmd_type = 0x00; + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, 4); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_GET_FW_VERSION; + priv->adapter->cmd_complete = FALSE; + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout(priv->adapter->cmd_wait_q, + priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: Get FW version: timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_GET_FW_VERSION); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function sets mac address + * + * @param priv A pointer to bt_private structure + * @param mac A pointer to mac address + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_set_mac_address(bt_private *priv, u8 *mac) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_HCI_CMD *pcmd; + int i = 0; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_HCI_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_HCI_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_CONFIG_MAC_ADDR; + pcmd->length = 8; + pcmd->cmd_type = MRVL_VENDOR_PKT; + pcmd->cmd_len = 6; + for (i = 0; i < 6; i++) + pcmd->data[i] = mac[5 - i]; + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, sizeof(BT_HCI_CMD)); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_CONFIG_MAC_ADDR; + priv->adapter->cmd_complete = FALSE; + PRINTM(CMD, "BT: Set mac addr " MACSTR " (0x%x)\n", MAC2STR(mac), + pcmd->ocf_ogf); + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: Set mac addr: timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_CONFIG_MAC_ADDR); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function load the calibrate data + * + * @param priv A pointer to bt_private structure + * @param config_data A pointer to calibrate data + * @param mac A pointer to mac address + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_load_cal_data(bt_private *priv, u8 *config_data, u8 *mac) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + int i = 0; + /* u8 config_data[28] = {0x37 0x01 0x1c 0x00 0xFF 0xFF 0xFF 0xFF 0x01 + 0x7f 0x04 0x02 0x00 0x00 0xBA 0xCE 0xC0 0xC6 0x2D 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0xF0}; */ + + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_LOAD_CONFIG_DATA; + pcmd->length = 0x20; + pcmd->data[0] = 0x00; + pcmd->data[1] = 0x00; + pcmd->data[2] = 0x00; + pcmd->data[3] = 0x1C; + /* swip cal-data byte */ + for (i = 4; i < 32; i++) + pcmd->data[i] = config_data[(i / 4) * 8 - 1 - i]; + if (mac != NULL) { + pcmd->data[2] = 0x01; /* skip checksum */ + for (i = 24; i < 30; i++) + pcmd->data[i] = mac[29 - i]; + } + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_LOAD_CONFIG_DATA; + priv->adapter->cmd_complete = FALSE; + + DBG_HEXDUMP(DAT_D, "calirate data: ", pcmd->data, 32); + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(ERROR, "BT: Load calibrate data: timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_LOAD_CONFIG_DATA); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function load the calibrate EXT data + * + * @param priv A pointer to bt_private structure + * @param config_data A pointer to calibrate data + * @param mac A pointer to mac address + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_load_cal_data_ext(bt_private *priv, u8 *config_data, u32 cfg_data_len) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_LOAD_CONFIG_DATA_EXT; + pcmd->length = cfg_data_len; + + memcpy(pcmd->data, config_data, cfg_data_len); + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_LOAD_CONFIG_DATA_EXT; + priv->adapter->cmd_complete = FALSE; + + DBG_HEXDUMP(DAT_D, "calirate ext data", pcmd->data, pcmd->length); + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(ERROR, "BT: Load calibrate ext data: timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_LOAD_CONFIG_DATA_EXT); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function writes value to CSU registers + * + * @param priv A pointer to bt_private structure + * @param type reg type + * @param offset register address + * @param value register value to write + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_write_reg(bt_private *priv, u8 type, u32 offset, u16 value) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CSU_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CSU_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CSU_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_CSU_WRITE_REG; + pcmd->length = 7; + pcmd->type = type; + pcmd->offset[0] = (offset & 0x000000ff); + pcmd->offset[1] = (offset & 0x0000ff00) >> 8; + pcmd->offset[2] = (offset & 0x00ff0000) >> 16; + pcmd->offset[3] = (offset & 0xff000000) >> 24; + pcmd->value[0] = (value & 0x00ff); + pcmd->value[1] = (value & 0xff00) >> 8; + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, sizeof(BT_CSU_CMD)); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_CSU_WRITE_REG; + priv->adapter->cmd_complete = FALSE; + PRINTM(CMD, "BT: Set CSU reg type=%d reg=0x%x value=0x%x\n", + type, offset, value); + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(ERROR, "BT: Set CSU reg timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_CSU_WRITE_REG); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function used to restore tx_queue + * + * @param priv A pointer to bt_private structure + * @return N/A + */ +void +bt_restore_tx_queue(bt_private *priv) +{ + struct sk_buff *skb = NULL; + while (!skb_queue_empty(&priv->adapter->pending_queue)) { + skb = skb_dequeue(&priv->adapter->pending_queue); + if (skb) + skb_queue_tail(&priv->adapter->tx_queue, skb); + } + wake_up_interruptible(&priv->MainThread.waitQ); +} + +/** + * @brief This function used to send command to firmware + * + * Command format: + * +--------+--------+--------+--------+--------+--------+--------+ + * | OCF OGF | Length | Data | + * +--------+--------+--------+--------+--------+--------+--------+ + * | 2-byte | 1-byte | 4-byte | + * +--------+--------+--------+--------+--------+--------+--------+ + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_prepare_command(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + ENTER(); + if (priv->bt_dev.hscfgcmd) { + priv->bt_dev.hscfgcmd = 0; + ret = bt_send_hscfg_cmd(priv); + } + if (priv->bt_dev.pscmd) { + priv->bt_dev.pscmd = 0; + ret = bt_enable_ps(priv); + } + if (priv->bt_dev.sdio_pull_ctrl) { + priv->bt_dev.sdio_pull_ctrl = 0; + ret = bt_send_sdio_pull_ctrl_cmd(priv); + } + if (priv->bt_dev.hscmd) { + priv->bt_dev.hscmd = 0; + if (priv->bt_dev.hsmode) + ret = bt_enable_hs(priv); + else { + ret = sbi_wakeup_firmware(priv); + priv->adapter->hs_state = HS_DEACTIVATED; + } + } + if (priv->bt_dev.test_mode) { + priv->bt_dev.test_mode = 0; + ret = bt_enable_test_mode(priv); + } + LEAVE(); + return ret; +} + +/** @brief This function processes a single packet + * + * @param priv A pointer to bt_private structure + * @param skb A pointer to skb which includes TX packet + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int +send_single_packet(bt_private *priv, struct sk_buff *skb) +{ + int ret; + int has_realloc = 0; + ENTER(); + if (!skb || !skb->data) { + LEAVE(); + return BT_STATUS_FAILURE; + } + + if (!skb->len || ((skb->len + BT_HEADER_LEN) > BT_UPLD_SIZE)) { + PRINTM(ERROR, "Tx Error: Bad skb length %d : %d\n", skb->len, + BT_UPLD_SIZE); + LEAVE(); + return BT_STATUS_FAILURE; + } + if (skb_headroom(skb) < BT_HEADER_LEN) { + skb = skb_realloc_headroom(skb, BT_HEADER_LEN); + if (!skb) { + PRINTM(ERROR, "TX error: realloc_headroom failed %d\n", + BT_HEADER_LEN); + LEAVE(); + return BT_STATUS_FAILURE; + } + has_realloc = 1; + } + /* This is SDIO specific header length: byte[3][2][1], * type: byte[0] + (HCI_COMMAND = 1, ACL_DATA = 2, SCO_DATA = 3, 0xFE = Vendor) */ + skb_push(skb, BT_HEADER_LEN); + skb->data[0] = (skb->len & 0x0000ff); + skb->data[1] = (skb->len & 0x00ff00) >> 8; + skb->data[2] = (skb->len & 0xff0000) >> 16; + skb->data[3] = bt_cb(skb)->pkt_type; + if (bt_cb(skb)->pkt_type == MRVL_VENDOR_PKT) + PRINTM(CMD, "DNLD_CMD: ocf_ogf=0x%x len=%d\n", + *((u16 *) & skb->data[4]), skb->len); + ret = sbi_host_to_card(priv, skb->data, skb->len); + if (has_realloc) + kfree_skb(skb); + LEAVE(); + return ret; +} + +static void +update_stat_byte_tx(bt_private *priv, struct sk_buff *skb) +{ + if (((priv->bt_dev.m_dev[FM_SEQ].dev_pointer) && + (!strcmp + (((struct m_dev *)skb->dev)->name, + priv->bt_dev.m_dev[FM_SEQ].name))) || + ((priv->bt_dev.m_dev[NFC_SEQ].dev_pointer) && + (!strcmp + (((struct m_dev *)skb->dev)->name, + priv->bt_dev.m_dev[NFC_SEQ].name)))) + ((struct m_dev *)skb->dev)->stat.byte_tx += skb->len; + else + ((struct hci_dev *)priv->bt_dev.m_dev[BT_SEQ].dev_pointer)-> + stat.byte_tx += skb->len; +} + +static void +update_stat_err_tx(bt_private *priv, struct sk_buff *skb) +{ + if (((priv->bt_dev.m_dev[FM_SEQ].dev_pointer) && + (!strcmp + (((struct m_dev *)skb->dev)->name, + priv->bt_dev.m_dev[FM_SEQ].name))) || + ((priv->bt_dev.m_dev[NFC_SEQ].dev_pointer) && + (!strcmp + (((struct m_dev *)skb->dev)->name, + priv->bt_dev.m_dev[NFC_SEQ].name)))) + ((struct m_dev *)skb->dev)->stat.err_tx++; + else + ((struct hci_dev *)priv->bt_dev.m_dev[BT_SEQ].dev_pointer)-> + stat.err_tx++; +} + +#ifdef CONFIG_OF +/** + * @brief This function read the initial parameter from device tress + * + * + * @return N/A + */ +static void +bt_init_from_dev_tree(void) +{ + struct device_node *dt_node = NULL; + struct property *prop; + u32 data; + const char *string_data; + + ENTER(); + + if (!dts_enable) { + PRINTM(CMD, "DTS is disabled!"); + return; + } + + dt_node = of_find_node_by_name(NULL, "sd8xxx-bt"); + if (!dt_node) { + LEAVE(); + return; + } + for_each_property_of_node(dt_node, prop) { + if (!strncmp(prop->name, "mbt_drvdbg", strlen("mbt_drvdbg"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(CMD, "mbt_drvdbg=0x%x\n", data); + mbt_drvdbg = data; + } + } else if (!strncmp(prop->name, "init_cfg", strlen("init_cfg"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + init_cfg = (char *)string_data; + PRINTM(CMD, "init_cfg=%s\n", init_cfg); + } + } else if (!strncmp + (prop->name, "cal_cfg_ext", strlen("cal_cfg_ext"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + cal_cfg_ext = (char *)string_data; + PRINTM(CMD, "cal_cfg_ext=%s\n", cal_cfg_ext); + } + } else if (!strncmp(prop->name, "cal_cfg", strlen("cal_cfg"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + cal_cfg = (char *)string_data; + PRINTM(CMD, "cal_cfg=%s\n", cal_cfg); + } + } else if (!strncmp(prop->name, "bt_mac", strlen("bt_mac"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + bt_mac = (char *)string_data; + PRINTM(CMD, "bt_mac=%s\n", bt_mac); + } + } else if (!strncmp + (prop->name, "mbt_gpio_pin", + strlen("mbt_gpio_pin"))) { + if (!of_property_read_string + (dt_node, prop->name, &data)) { + mbt_gpio_pin = data; + PRINTM(CMD, "mbt_gpio_pin=%d\n", mbt_gpio_pin); + } + } + } + LEAVE(); + return; +} +#endif + +/** + * @brief This function initializes the adapter structure + * and set default value to the member of adapter. + * + * @param priv A pointer to bt_private structure + * @return N/A + */ +static void +bt_init_adapter(bt_private *priv) +{ + ENTER(); +#ifdef CONFIG_OF + bt_init_from_dev_tree(); +#endif + skb_queue_head_init(&priv->adapter->tx_queue); + skb_queue_head_init(&priv->adapter->pending_queue); + priv->adapter->tx_lock = FALSE; + priv->adapter->ps_state = PS_AWAKE; + priv->adapter->suspend_fail = FALSE; + priv->adapter->is_suspended = FALSE; + priv->adapter->hs_skip = 0; + priv->adapter->num_cmd_timeout = 0; + init_waitqueue_head(&priv->adapter->cmd_wait_q); + LEAVE(); +} + +/** + * @brief This function initializes firmware + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int +bt_init_fw(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + ENTER(); + if (fw == 0) { + sd_enable_host_int(priv); + goto done; + } + sd_disable_host_int(priv); + if ((priv->card_type == CARD_TYPE_SD8787) || + (priv->card_type == CARD_TYPE_SD8777)) + priv->fw_crc_check = fw_crc_check; + if (sbi_download_fw(priv)) { + PRINTM(ERROR, " FW failed to be download!\n"); + ret = BT_STATUS_FAILURE; + goto done; + } +done: + LEAVE(); + return ret; +} + +#define FW_POLL_TRIES 100 +#define FW_RESET_REG 0xB6 + +/** + * @brief This function reload firmware + * + * @param priv A pointer to bt_private + * + * @return 0--success, otherwise failure + */ +static int +bt_reload_fw(bt_private *priv) +{ + int ret = 0, tries = 0; + u8 value = 1; + + ENTER(); + /** Wake up firmware firstly */ + sbi_wakeup_firmware(priv); + + /** wait SOC fully wake up */ + for (tries = 0; tries < FW_POLL_TRIES; ++tries) { + ret = sd_write_reg(priv, FW_RESET_REG, 0xba); + if (!ret) { + ret = sd_read_reg(priv, FW_RESET_REG, &value); + if (!ret && (value == 0xba)) { + PRINTM(MSG, "Fw wake up\n"); + break; + } + } + udelay(1000); + } + + ret = sd_write_reg(priv, FW_RESET_REG, 1); + if (ret) { + PRINTM(ERROR, "Failed to write register.\n"); + goto done; + } + + /** Poll register around 1 ms */ + for (; tries < FW_POLL_TRIES; ++tries) { + ret = sd_read_reg(priv, FW_RESET_REG, &value); + if (ret) { + PRINTM(ERROR, "Failed to read register.\n"); + goto done; + } + if (value == 0) + /** FW is ready */ + break; + udelay(1000); + } + if (value) { + PRINTM(ERROR, "Failed to poll FW reset register %X=0x%x\n", + FW_RESET_REG, value); + ret = -EFAULT; + goto done; + } + + /** reload FW */ + ret = bt_init_fw(priv); + if (ret) { + PRINTM(ERROR, "Re download firmware failed.\n"); + ret = -EFAULT; + goto done; + } +done: + LEAVE(); + return ret; +} + +/** + * @brief This function request to reload firmware + * + * @param priv A pointer to bt_private + * + * @return N/A + */ +void +bt_request_fw_reload(bt_private *priv) +{ + ENTER(); + + /** Reload FW */ + priv->fw_reload = TRUE; + if (bt_reload_fw(priv)) { + PRINTM(ERROR, "FW reload fail\n"); + goto done; + } + priv->fw_reload = FALSE; + /** Other operation here? */ +done: + LEAVE(); + return; +} + +/** + * @brief This function frees the structure of adapter + * + * @param priv A pointer to bt_private structure + * @return N/A + */ +void +bt_free_adapter(bt_private *priv) +{ + bt_adapter *adapter = priv->adapter; + ENTER(); + skb_queue_purge(&priv->adapter->tx_queue); + kfree(adapter->hw_regs_buf); + /* Free the adapter object itself */ + kfree(adapter); + priv->adapter = NULL; + + LEAVE(); +} + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) +/** + * @brief This function handles the BT ioctl + * + * @param hdev A pointer to hci_dev structure + * @cmd ioctl cmd + * @arg argument + * @return -ENOIOCTLCMD + */ +static int +bt_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long arg) +{ + ENTER(); + LEAVE(); + return -ENOIOCTLCMD; +} +#endif + +/** + * @brief This function handles the wrapper_dev ioctl + * + * @param hev A pointer to wrapper_dev structure + * @cmd ioctl cmd + * @arg argument + * @return -ENOIOCTLCMD + */ +static int +mdev_ioctl(struct m_dev *m_dev, unsigned int cmd, void *arg) +{ + ENTER(); + LEAVE(); + return -ENOIOCTLCMD; +} + +/** + * @brief This function handles BT destruct + * + * @param hdev A pointer to hci_dev structure + * + * @return N/A + */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0) +static void +bt_destruct(struct hci_dev *hdev) +{ + ENTER(); + LEAVE(); + return; +} +#endif + +/** + * @brief This function handles wrapper device destruct + * + * @param m_dev A pointer to m_dev structure + * + * @return N/A + */ +static void +mdev_destruct(struct m_dev *m_dev) +{ + ENTER(); + LEAVE(); + return; +} + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) +/** + * @brief This function handles the BT transmit + * + * @param skb A pointer to sk_buff structure + * + * @return BT_STATUS_SUCCESS or other error no. + */ +static int +bt_send_frame(struct sk_buff *skb) +#else +/** + * @brief This function handles the BT transmit + * + * @param hdev A pointer to hci_dev structure + * @param skb A pointer to sk_buff structure + * + * @return BT_STATUS_SUCCESS or other error no. + */ +static int +bt_send_frame(struct hci_dev *hdev, struct sk_buff *skb) +#endif +{ + bt_private *priv = NULL; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + struct hci_dev *hdev = (struct hci_dev *)skb->dev; +#else + skb->dev = (void *)hdev; +#endif + + ENTER(); + PRINTM(DATA, "bt_send_frame %s: Type=%d, len=%d\n", hdev->name, + bt_cb(skb)->pkt_type, skb->len); + DBG_HEXDUMP(CMD_D, "bt_send_frame", skb->data, skb->len); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) + if (!hdev || !hci_get_drvdata(hdev)) { +#else + if (!hdev || !hdev->driver_data) { +#endif + PRINTM(ERROR, "Frame for unknown HCI device (hdev=NULL)\n"); + LEAVE(); + return -ENODEV; + } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) + priv = (bt_private *)hci_get_drvdata(hdev); +#else + priv = (bt_private *)hdev->driver_data; +#endif + if (!test_bit(HCI_RUNNING, &hdev->flags)) { + PRINTM(ERROR, "Fail test HCI_RUNNING, flag=0x%lx\n", + hdev->flags); + LEAVE(); + return -EBUSY; + } + switch (bt_cb(skb)->pkt_type) { + case HCI_COMMAND_PKT: + hdev->stat.cmd_tx++; + break; + case HCI_ACLDATA_PKT: + hdev->stat.acl_tx++; + break; + case HCI_SCODATA_PKT: + hdev->stat.sco_tx++; + break; + } + if (priv->adapter->tx_lock == TRUE) + skb_queue_tail(&priv->adapter->pending_queue, skb); + else + skb_queue_tail(&priv->adapter->tx_queue, skb); + wake_up_interruptible(&priv->MainThread.waitQ); + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function handles the wrapper device transmit + * + * @param m_dev A pointer to m_dev structure + * @param skb A pointer to sk_buff structure + * + * @return BT_STATUS_SUCCESS or other error no. + */ +static int +mdev_send_frame(struct m_dev *m_dev, struct sk_buff *skb) +{ + bt_private *priv = NULL; + + ENTER(); + if (!m_dev || !m_dev->driver_data) { + PRINTM(ERROR, "Frame for unknown HCI device (m_dev=NULL)\n"); + LEAVE(); + return -ENODEV; + } + priv = (bt_private *)m_dev->driver_data; + if (!test_bit(HCI_RUNNING, &m_dev->flags)) { + PRINTM(ERROR, "Fail test HCI_RUNNING, flag=0x%lx\n", + m_dev->flags); + LEAVE(); + return -EBUSY; + } + switch (bt_cb(skb)->pkt_type) { + case HCI_COMMAND_PKT: + m_dev->stat.cmd_tx++; + break; + case HCI_ACLDATA_PKT: + m_dev->stat.acl_tx++; + break; + case HCI_SCODATA_PKT: + m_dev->stat.sco_tx++; + break; + } + + if (priv->adapter->tx_lock == TRUE) + skb_queue_tail(&priv->adapter->pending_queue, skb); + else + skb_queue_tail(&priv->adapter->tx_queue, skb); + wake_up_interruptible(&priv->MainThread.waitQ); + + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function flushes the transmit queue + * + * @param hdev A pointer to hci_dev structure + * + * @return BT_STATUS_SUCCESS + */ +static int +bt_flush(struct hci_dev *hdev) +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) + bt_private *priv = (bt_private *)hci_get_drvdata(hdev); +#else + bt_private *priv = (bt_private *)hdev->driver_data; +#endif + ENTER(); + skb_queue_purge(&priv->adapter->tx_queue); + skb_queue_purge(&priv->adapter->pending_queue); + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function flushes the transmit queue + * + * @param m_dev A pointer to m_dev structure + * + * @return BT_STATUS_SUCCESS + */ +static int +mdev_flush(struct m_dev *m_dev) +{ + bt_private *priv = (bt_private *)m_dev->driver_data; + ENTER(); + skb_queue_purge(&priv->adapter->tx_queue); + skb_queue_purge(&priv->adapter->pending_queue); + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function closes the bluetooth device + * + * @param hdev A pointer to hci_dev structure + * + * @return BT_STATUS_SUCCESS + */ +static int +bt_close(struct hci_dev *hdev) +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) + bt_private *priv = (bt_private *)hci_get_drvdata(hdev); +#else + bt_private *priv = (bt_private *)hdev->driver_data; +#endif + ENTER(); + if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags)) { + LEAVE(); + return BT_STATUS_SUCCESS; + } + skb_queue_purge(&priv->adapter->tx_queue); + module_put(THIS_MODULE); + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function closes the wrapper device + * + * @param m_dev A pointer to m_dev structure + * + * @return BT_STATUS_SUCCESS + */ +static int +mdev_close(struct m_dev *m_dev) +{ + ENTER(); + mdev_req_lock(m_dev); + if (!test_and_clear_bit(HCI_UP, &m_dev->flags)) { + mdev_req_unlock(m_dev); + LEAVE(); + return 0; + } + + if (m_dev->flush) + m_dev->flush(m_dev); + /* wait up pending read and unregister char dev */ + wake_up_interruptible(&m_dev->req_wait_q); + /* Drop queues */ + skb_queue_purge(&m_dev->rx_q); + + if (!test_and_clear_bit(HCI_RUNNING, &m_dev->flags)) { + mdev_req_unlock(m_dev); + LEAVE(); + return 0; + } + module_put(THIS_MODULE); + m_dev->flags = 0; + mdev_req_unlock(m_dev); + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function opens the bluetooth device + * + * @param hdev A pointer to hci_dev structure + * + * @return BT_STATUS_SUCCESS or other + */ +static int +bt_open(struct hci_dev *hdev) +{ + ENTER(); + if (try_module_get(THIS_MODULE) == 0) + return BT_STATUS_FAILURE; + set_bit(HCI_RUNNING, &hdev->flags); + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function opens the wrapper device + * + * @param m_dev A pointer to m_dev structure + * + * @return BT_STATUS_SUCCESS or other + */ +static int +mdev_open(struct m_dev *m_dev) +{ + ENTER(); + + if (try_module_get(THIS_MODULE) == 0) + return BT_STATUS_FAILURE; + + set_bit(HCI_RUNNING, &m_dev->flags); + + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function queries the wrapper device + * + * @param m_dev A pointer to m_dev structure + * @param arg arguement + * + * @return BT_STATUS_SUCCESS or other + */ +void +mdev_query(struct m_dev *m_dev, void *arg) +{ + struct mbt_dev *mbt_dev = (struct mbt_dev *)m_dev->dev_pointer; + + ENTER(); + if (copy_to_user(arg, &mbt_dev->type, sizeof(mbt_dev->type))) + PRINTM(ERROR, "IOCTL_QUERY_TYPE: Fail copy to user\n"); + + LEAVE(); +} + +/** + * @brief This function initializes the wrapper device + * + * @param m_dev A pointer to m_dev structure + * + * @return BT_STATUS_SUCCESS or other + */ +void +init_m_dev(struct m_dev *m_dev) +{ + m_dev->dev_pointer = NULL; + m_dev->driver_data = NULL; + m_dev->dev_type = 0; + m_dev->spec_type = 0; + skb_queue_head_init(&m_dev->rx_q); + init_waitqueue_head(&m_dev->req_wait_q); + init_waitqueue_head(&m_dev->rx_wait_q); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) + init_MUTEX(&m_dev->req_lock); +#else + sema_init(&m_dev->req_lock, 1); +#endif + memset(&m_dev->stat, 0, sizeof(struct hci_dev_stats)); + m_dev->open = mdev_open; + m_dev->close = mdev_close; + m_dev->flush = mdev_flush; + m_dev->send = mdev_send_frame; + m_dev->destruct = mdev_destruct; + m_dev->ioctl = mdev_ioctl; + m_dev->query = mdev_query; + m_dev->owner = THIS_MODULE; + +} + +/** + * @brief This function handles the major job in bluetooth driver. + * it handles the event generated by firmware, rx data received + * from firmware and tx data sent from kernel. + * + * @param data A pointer to bt_thread structure + * @return BT_STATUS_SUCCESS + */ +static int +bt_service_main_thread(void *data) +{ + bt_thread *thread = data; + bt_private *priv = thread->priv; + bt_adapter *adapter = priv->adapter; + wait_queue_t wait; + struct sk_buff *skb; + ENTER(); + bt_activate_thread(thread); + init_waitqueue_entry(&wait, current); + current->flags |= PF_NOFREEZE; + + for (;;) { + add_wait_queue(&thread->waitQ, &wait); + OS_SET_THREAD_STATE(TASK_INTERRUPTIBLE); + if (priv->adapter->WakeupTries || + ((!priv->adapter->IntCounter) && + (!priv->bt_dev.tx_dnld_rdy || + skb_queue_empty(&priv->adapter->tx_queue)))) { + PRINTM(INFO, "Main: Thread sleeping...\n"); + schedule(); + } + OS_SET_THREAD_STATE(TASK_RUNNING); + remove_wait_queue(&thread->waitQ, &wait); + if (kthread_should_stop() || adapter->SurpriseRemoved) { + PRINTM(INFO, "main-thread: break from main thread: " + "SurpriseRemoved=0x%x\n", + adapter->SurpriseRemoved); + break; + } + + PRINTM(INFO, "Main: Thread waking up...\n"); + + if (priv->adapter->IntCounter) { + OS_INT_DISABLE; + adapter->IntCounter = 0; + OS_INT_RESTORE; + sbi_get_int_status(priv); + } else if ((priv->adapter->ps_state == PS_SLEEP) && + !skb_queue_empty(&priv->adapter->tx_queue)) { + priv->adapter->WakeupTries++; + sbi_wakeup_firmware(priv); + continue; + } + if (priv->adapter->ps_state == PS_SLEEP) + continue; + if (priv->bt_dev.tx_dnld_rdy == TRUE) { + if (!skb_queue_empty(&priv->adapter->tx_queue)) { + skb = skb_dequeue(&priv->adapter->tx_queue); + if (skb) { + if (send_single_packet(priv, skb)) + update_stat_err_tx(priv, skb); + else + update_stat_byte_tx(priv, skb); + kfree_skb(skb); + } + } + } + } + bt_deactivate_thread(thread); + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function handles the interrupt. it will change PS + * state if applicable. it will wake up main_thread to handle + * the interrupt event as well. + * + * @param m_dev A pointer to m_dev structure + * @return N/A + */ +void +bt_interrupt(struct m_dev *m_dev) +{ + bt_private *priv = (bt_private *)m_dev->driver_data; + ENTER(); + if (!priv || !priv->adapter) { + LEAVE(); + return; + } + PRINTM(INTR, "*\n"); + priv->adapter->ps_state = PS_AWAKE; + if (priv->adapter->hs_state == HS_ACTIVATED) { + PRINTM(CMD, "BT: %s: HS DEACTIVATED in ISR!\n", m_dev->name); + priv->adapter->hs_state = HS_DEACTIVATED; + } + priv->adapter->WakeupTries = 0; + priv->adapter->IntCounter++; + wake_up_interruptible(&priv->MainThread.waitQ); + LEAVE(); +} + +static void +char_dev_release_dynamic(struct kobject *kobj) +{ + struct char_dev *cdev = container_of(kobj, struct char_dev, kobj); + ENTER(); + PRINTM(INFO, "free char_dev\n"); + kfree(cdev); + LEAVE(); +} + +static struct kobj_type ktype_char_dev_dynamic = { + .release = char_dev_release_dynamic, +}; + +static struct char_dev * +alloc_char_dev(void) +{ + struct char_dev *cdev; + ENTER(); + cdev = kzalloc(sizeof(struct char_dev), GFP_KERNEL); + if (cdev) { + kobject_init(&cdev->kobj, &ktype_char_dev_dynamic); + PRINTM(INFO, "alloc char_dev\n"); + } + return cdev; +} + +static void +bt_private_dynamic_release(struct kobject *kobj) +{ + bt_private *priv = container_of(kobj, bt_private, kobj); + ENTER(); + PRINTM(INFO, "free bt priv\n"); + kfree(priv); + LEAVE(); +} + +static struct kobj_type ktype_bt_private_dynamic = { + .release = bt_private_dynamic_release, +}; + +static bt_private * +bt_alloc_priv(void) +{ + bt_private *priv; + ENTER(); + priv = kzalloc(sizeof(bt_private), GFP_KERNEL); + if (priv) { + kobject_init(&priv->kobj, &ktype_bt_private_dynamic); + PRINTM(INFO, "alloc bt priv\n"); + } + LEAVE(); + return priv; +} + +struct kobject * +bt_priv_get(bt_private *priv) +{ + PRINTM(INFO, "bt priv get object"); + return kobject_get(&priv->kobj); +} + +void +bt_priv_put(bt_private *priv) +{ + PRINTM(INFO, "bt priv put object"); + kobject_put(&priv->kobj); +} + +int +bt_reinit_fw(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + priv->adapter->tx_lock = FALSE; + priv->adapter->ps_state = PS_AWAKE; + priv->adapter->suspend_fail = FALSE; + priv->adapter->is_suspended = FALSE; + priv->adapter->hs_skip = 0; + priv->adapter->num_cmd_timeout = 0; + if (mbt_gpio_pin) { + ret = bt_set_gpio_pin(priv); + if (ret < 0) { + PRINTM(FATAL, "GPIO pin set failed!\n"); + goto done; + } + } + ret = bt_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ); + if (ret < 0) { + PRINTM(FATAL, "Module cfg command send failed!\n"); + goto done; + } + ret = bt_set_ble_deepsleep(priv, TRUE); + if (ret < 0) { + PRINTM(FATAL, "Enable BLE deepsleep failed!\n"); + goto done; + } + if (psmode) { + priv->bt_dev.psmode = TRUE; + priv->bt_dev.idle_timeout = DEFAULT_IDLE_TIME; + ret = bt_enable_ps(priv); + if (ret < 0) { + PRINTM(FATAL, "Enable PS mode failed!\n"); + goto done; + } + } +#ifdef SDIO_SUSPEND_RESUME + priv->bt_dev.gpio_gap = 0xffff; + ret = bt_send_hscfg_cmd(priv); + if (ret < 0) { + PRINTM(FATAL, "Send HSCFG failed!\n"); + goto done; + } +#endif + priv->bt_dev.sdio_pull_cfg = 0xffffffff; + priv->bt_dev.sdio_pull_ctrl = 0; + wake_up_interruptible(&priv->MainThread.waitQ); + /* block all the packet from bluez */ + if (init_cfg || cal_cfg || bt_mac || cal_cfg_ext) + priv->adapter->tx_lock = TRUE; + + if (init_cfg) + if (BT_STATUS_SUCCESS != bt_init_config(priv, init_cfg)) { + PRINTM(FATAL, + "BT: Set user init data and param failed\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + + if (cal_cfg) { + if (BT_STATUS_SUCCESS != bt_cal_config(priv, cal_cfg, bt_mac)) { + PRINTM(FATAL, "BT: Set cal data failed\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + } + + if (bt_mac) { + PRINTM(INFO, + "Set BT mac_addr from insmod parametre bt_mac = %s\n", + bt_mac); + if (BT_STATUS_SUCCESS != bt_init_mac_address(priv, bt_mac)) { + PRINTM(FATAL, + "BT: Fail to set mac address from insmod parametre\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + } + + if (cal_cfg_ext) { + if (BT_STATUS_SUCCESS != bt_cal_config_ext(priv, cal_cfg_ext)) { + PRINTM(FATAL, "BT: Set cal ext data failed\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + } + if (init_cfg || cal_cfg || bt_mac || cal_cfg_ext) { + priv->adapter->tx_lock = FALSE; + bt_restore_tx_queue(priv); + } + bt_get_fw_version(priv); + snprintf((char *)priv->adapter->drv_ver, MAX_VER_STR_LEN, + mbt_driver_version, fw_version); +done: + return ret; +} + +/** + * @brief Module configuration and register device + * + * @param priv A Pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +sbi_register_conf_dpc(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + struct fm_dev *fm_dev = NULL; + struct nfc_dev *nfc_dev = NULL; + struct hci_dev *hdev = NULL; + struct char_dev *char_dev = NULL; + char dev_file[DEV_NAME_LEN + 5]; + unsigned char dev_type = 0; + + ENTER(); + + priv->bt_dev.tx_dnld_rdy = TRUE; + + if (priv->fw_reload) { + bt_reinit_fw(priv); + LEAVE(); + return ret; + } + + if (drv_mode & DRV_MODE_BT) { + hdev = hci_alloc_dev(); + if (!hdev) { + PRINTM(FATAL, "Can not allocate HCI device\n"); + ret = -ENOMEM; + goto err_kmalloc; + } + hdev->open = bt_open; + hdev->close = bt_close; + hdev->flush = bt_flush; + hdev->send = bt_send_frame; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0) + hdev->destruct = bt_destruct; +#endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + hdev->ioctl = bt_ioctl; +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) + hci_set_drvdata(hdev, priv); +#else + hdev->driver_data = priv; +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0) + hdev->owner = THIS_MODULE; +#endif + priv->bt_dev.m_dev[BT_SEQ].dev_type = BT_TYPE; + priv->bt_dev.m_dev[BT_SEQ].spec_type = BLUEZ_SPEC; + priv->bt_dev.m_dev[BT_SEQ].dev_pointer = (void *)hdev; + priv->bt_dev.m_dev[BT_SEQ].driver_data = priv; + priv->bt_dev.m_dev[BT_SEQ].read_continue_flag = 0; + } + + dev_type = HCI_SDIO; + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) + if (hdev) + hdev->bus = dev_type; +#else + if (hdev) + hdev->type = dev_type; +#endif /* >= 2.6.34 */ + if (mbt_gpio_pin) { + ret = bt_set_gpio_pin(priv); + if (ret < 0) { + PRINTM(FATAL, "GPIO pin set failed!\n"); + goto done; + } + } + + ret = bt_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ); + if (ret < 0) { + PRINTM(FATAL, "Module cfg command send failed!\n"); + goto done; + } + ret = bt_set_ble_deepsleep(priv, TRUE); + if (ret < 0) { + PRINTM(FATAL, "Enable BLE deepsleep failed!\n"); + goto done; + } + if (psmode) { + priv->bt_dev.psmode = TRUE; + priv->bt_dev.idle_timeout = DEFAULT_IDLE_TIME; + ret = bt_enable_ps(priv); + if (ret < 0) { + PRINTM(FATAL, "Enable PS mode failed!\n"); + goto done; + } + } +#ifdef SDIO_SUSPEND_RESUME + priv->bt_dev.gpio_gap = 0xffff; + ret = bt_send_hscfg_cmd(priv); + if (ret < 0) { + PRINTM(FATAL, "Send HSCFG failed!\n"); + goto done; + } +#endif + priv->bt_dev.sdio_pull_cfg = 0xffffffff; + priv->bt_dev.sdio_pull_ctrl = 0; + wake_up_interruptible(&priv->MainThread.waitQ); + /* block all the packet from bluez */ + if (init_cfg || cal_cfg || bt_mac || cal_cfg_ext) + priv->adapter->tx_lock = TRUE; + + if (hdev) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) + hdev->dev_type = priv->bt_dev.devType; +#endif + ret = hci_register_dev(hdev); + } + if (ret < 0) { + PRINTM(FATAL, "Can not register HCI device\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + snprintf((char *)priv->bt_dev.m_dev[BT_SEQ].name, + sizeof(priv->bt_dev.m_dev[BT_SEQ].name), hdev->name); + bt_proc_init(priv, &(priv->bt_dev.m_dev[BT_SEQ]), BT_SEQ); + + if ((drv_mode & DRV_MODE_FM) && + (!(priv->bt_dev.devType == DEV_TYPE_AMP)) && + (priv->bt_dev.devFeature & DEV_FEATURE_FM)) { + + /** alloc fm_dev */ + fm_dev = alloc_fm_dev(); + if (!fm_dev) { + PRINTM(FATAL, "Can not allocate fm dev\n"); + ret = -ENOMEM; + goto err_kmalloc; + } + + /** init m_dev */ + init_m_dev(&(priv->bt_dev.m_dev[FM_SEQ])); + priv->bt_dev.m_dev[FM_SEQ].dev_type = FM_TYPE; + priv->bt_dev.m_dev[FM_SEQ].spec_type = GENERIC_SPEC; + priv->bt_dev.m_dev[FM_SEQ].dev_pointer = (void *)fm_dev; + priv->bt_dev.m_dev[FM_SEQ].driver_data = priv; + priv->bt_dev.m_dev[FM_SEQ].read_continue_flag = 0; + + /** create char device for FM */ + char_dev = alloc_char_dev(); + if (!char_dev) { + class_destroy(chardev_class); + ret = -ENOMEM; + goto err_kmalloc; + } + char_dev->minor = FMCHAR_MINOR_BASE + fmchar_minor; + char_dev->dev_type = FM_TYPE; + + if (fm_name) + snprintf(fm_dev->name, sizeof(fm_dev->name), "%s%d", + fm_name, fmchar_minor); + else + snprintf(fm_dev->name, sizeof(fm_dev->name), + "mfmchar%d", fmchar_minor); + snprintf(dev_file, sizeof(dev_file), "/dev/%s", fm_dev->name); + PRINTM(MSG, "BT: Create %s\n", dev_file); + fmchar_minor++; + + /** register m_dev to FM char device */ + priv->bt_dev.m_dev[FM_SEQ].index = char_dev->minor; + char_dev->m_dev = &(priv->bt_dev.m_dev[FM_SEQ]); + + /** register char dev */ + register_char_dev(char_dev, chardev_class, + MODULE_NAME, fm_dev->name); + + /** chmod for FM char device */ + mbtchar_chmod(dev_file, 0660); + + /** create proc device */ + snprintf(priv->bt_dev.m_dev[FM_SEQ].name, + sizeof(priv->bt_dev.m_dev[FM_SEQ].name), fm_dev->name); + bt_proc_init(priv, &(priv->bt_dev.m_dev[FM_SEQ]), FM_SEQ); + } + + if ((drv_mode & DRV_MODE_NFC) && + (!(priv->bt_dev.devType == DEV_TYPE_AMP)) && + (priv->bt_dev.devFeature & DEV_FEATURE_NFC)) { + + /** alloc nfc_dev */ + nfc_dev = alloc_nfc_dev(); + if (!nfc_dev) { + PRINTM(FATAL, "Can not allocate nfc dev\n"); + ret = -ENOMEM; + goto err_kmalloc; + } + + /** init m_dev */ + init_m_dev(&(priv->bt_dev.m_dev[NFC_SEQ])); + priv->bt_dev.m_dev[NFC_SEQ].dev_type = NFC_TYPE; + priv->bt_dev.m_dev[NFC_SEQ].spec_type = GENERIC_SPEC; + priv->bt_dev.m_dev[NFC_SEQ].dev_pointer = (void *)nfc_dev; + priv->bt_dev.m_dev[NFC_SEQ].driver_data = priv; + priv->bt_dev.m_dev[NFC_SEQ].read_continue_flag = 0; + + /** create char device for NFC */ + char_dev = alloc_char_dev(); + if (!char_dev) { + class_destroy(chardev_class); + ret = -ENOMEM; + goto err_kmalloc; + } + char_dev->minor = NFCCHAR_MINOR_BASE + nfcchar_minor; + char_dev->dev_type = NFC_TYPE; + if (nfc_name) + snprintf(nfc_dev->name, sizeof(nfc_dev->name), "%s%d", + nfc_name, nfcchar_minor); + else + snprintf(nfc_dev->name, sizeof(nfc_dev->name), + "mnfcchar%d", nfcchar_minor); + snprintf(dev_file, sizeof(dev_file), "/dev/%s", nfc_dev->name); + PRINTM(MSG, "BT: Create %s\n", dev_file); + nfcchar_minor++; + + /** register m_dev to NFC char device */ + priv->bt_dev.m_dev[NFC_SEQ].index = char_dev->minor; + char_dev->m_dev = &(priv->bt_dev.m_dev[NFC_SEQ]); + + /** register char dev */ + register_char_dev(char_dev, chardev_class, MODULE_NAME, + nfc_dev->name); + + /** chmod for NFC char device */ + mbtchar_chmod(dev_file, 0666); + + /** create proc device */ + snprintf(priv->bt_dev.m_dev[NFC_SEQ].name, + sizeof(priv->bt_dev.m_dev[NFC_SEQ].name), + nfc_dev->name); + bt_proc_init(priv, &(priv->bt_dev.m_dev[NFC_SEQ]), NFC_SEQ); + } + + if (init_cfg) + if (BT_STATUS_SUCCESS != bt_init_config(priv, init_cfg)) { + PRINTM(FATAL, + "BT: Set user init data and param failed\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + + if (cal_cfg) { + if (BT_STATUS_SUCCESS != bt_cal_config(priv, cal_cfg, bt_mac)) { + PRINTM(FATAL, "BT: Set cal data failed\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + } else if (bt_mac) { + PRINTM(INFO, + "Set BT mac_addr from insmod parametre bt_mac = %s\n", + bt_mac); + if (BT_STATUS_SUCCESS != bt_init_mac_address(priv, bt_mac)) { + PRINTM(FATAL, + "BT: Fail to set mac address from insmod parametre\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + } + if (cal_cfg_ext && (priv->card_type == CARD_TYPE_SD8787) + ) { + if (BT_STATUS_SUCCESS != bt_cal_config_ext(priv, cal_cfg_ext)) { + PRINTM(FATAL, "BT: Set cal ext data failed\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + } + if (init_cfg || cal_cfg || bt_mac || cal_cfg_ext) { + priv->adapter->tx_lock = FALSE; + bt_restore_tx_queue(priv); + } + + /* Get FW version */ + bt_get_fw_version(priv); + snprintf((char *)priv->adapter->drv_ver, MAX_VER_STR_LEN, + mbt_driver_version, fw_version); + +done: + LEAVE(); + return ret; +err_kmalloc: + LEAVE(); + return ret; +} + +/** + * @brief This function adds the card. it will probe the + * card, allocate the bt_priv and initialize the device. + * + * @param card A pointer to card + * @return A pointer to bt_private structure + */ + +bt_private * +bt_add_card(void *card) +{ + bt_private *priv = NULL; + + ENTER(); + + priv = bt_alloc_priv(); + if (!priv) { + PRINTM(FATAL, "Can not allocate priv\n"); + LEAVE(); + return NULL; + } + + /* allocate buffer for bt_adapter */ + priv->adapter = kzalloc(sizeof(bt_adapter), GFP_KERNEL); + if (!priv->adapter) { + PRINTM(FATAL, "Allocate buffer for bt_adapter failed!\n"); + goto err_kmalloc; + } + priv->adapter->hw_regs_buf = + kzalloc(SD_BLOCK_SIZE + DMA_ALIGNMENT, GFP_KERNEL); + if (!priv->adapter->hw_regs_buf) { + PRINTM(FATAL, "Allocate buffer for INT read buf failed!\n"); + goto err_kmalloc; + } + priv->adapter->hw_regs = + (u8 *)ALIGN_ADDR(priv->adapter->hw_regs_buf, DMA_ALIGNMENT); + bt_init_adapter(priv); + + PRINTM(INFO, "Starting kthread...\n"); + priv->MainThread.priv = priv; + spin_lock_init(&priv->driver_lock); + + bt_create_thread(bt_service_main_thread, &priv->MainThread, + "bt_main_service"); + + /* wait for mainthread to up */ + while (!priv->MainThread.pid) + os_sched_timeout(1); + + sdio_update_card_type(priv, card); + /* Update driver version */ + if (priv->card_type == CARD_TYPE_SD8787) + memcpy(mbt_driver_version, CARD_SD8787, strlen(CARD_SD8787)); + else if (priv->card_type == CARD_TYPE_SD8777) + memcpy(mbt_driver_version, CARD_SD8777, strlen(CARD_SD8777)); + else if (priv->card_type == CARD_TYPE_SD8887) + memcpy(mbt_driver_version, CARD_SD8887, strlen(CARD_SD8887)); + else if (priv->card_type == CARD_TYPE_SD8897) + memcpy(mbt_driver_version, CARD_SD8897, strlen(CARD_SD8897)); + else if (priv->card_type == CARD_TYPE_SD8797) + memcpy(mbt_driver_version, CARD_SD8797, strlen(CARD_SD8797)); + + if (BT_STATUS_SUCCESS != sdio_get_sdio_device(priv)) + goto err_kmalloc; + + /** user config file */ + init_waitqueue_head(&priv->init_user_conf_wait_q); + + priv->bt_dev.card = card; + + ((struct sdio_mmc_card *)card)->priv = priv; + priv->adapter->sd_ireg = 0; + /* + * Register the device. Fillup the private data structure with + * relevant information from the card and request for the required + * IRQ. + */ + if (sbi_register_dev(priv) < 0) { + PRINTM(FATAL, "Failed to register bt device!\n"); + goto err_registerdev; + } + if (bt_init_fw(priv)) { + PRINTM(FATAL, "BT Firmware Init Failed\n"); + goto err_init_fw; + } + LEAVE(); + return priv; + +err_init_fw: + clean_up_m_devs(priv); + bt_proc_remove(priv); + PRINTM(INFO, "Unregister device\n"); + sbi_unregister_dev(priv); +err_registerdev: + ((struct sdio_mmc_card *)card)->priv = NULL; + /* Stop the thread servicing the interrupts */ + priv->adapter->SurpriseRemoved = TRUE; + wake_up_interruptible(&priv->MainThread.waitQ); + while (priv->MainThread.pid) + os_sched_timeout(1); +err_kmalloc: + if (priv->adapter) + bt_free_adapter(priv); + bt_priv_put(priv); + LEAVE(); + return NULL; +} + +/** + * @brief This function send hardware remove event + * + * @param priv A pointer to bt_private + * @return N/A + */ +void +bt_send_hw_remove_event(bt_private *priv) +{ + struct sk_buff *skb = NULL; + struct hci_dev *hdev = NULL; + ENTER(); + if (!priv->bt_dev.m_dev[BT_SEQ].dev_pointer) { + LEAVE(); + return; + } + if (priv->bt_dev.m_dev[BT_SEQ].spec_type == BLUEZ_SPEC) + hdev = (struct hci_dev *)priv->bt_dev.m_dev[BT_SEQ].dev_pointer; +#define HCI_HARDWARE_ERROR_EVT 0x10 +#define HCI_HARDWARE_REMOVE 0x24 + skb = bt_skb_alloc(3, GFP_ATOMIC); + skb->data[0] = HCI_HARDWARE_ERROR_EVT; + skb->data[1] = 1; + skb->data[2] = HCI_HARDWARE_REMOVE; + bt_cb(skb)->pkt_type = HCI_EVENT_PKT; + skb_put(skb, 3); + if (hdev) { + skb->dev = (void *)hdev; + PRINTM(MSG, "Send HW ERROR event\n"); +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + hci_recv_frame(skb); +#else + hci_recv_frame(hdev, skb); +#endif + os_sched_timeout(5); + hdev->stat.byte_rx += 3; + } + LEAVE(); + return; +} + +/** + * @brief This function removes the card. + * + * @param card A pointer to card + * @return BT_STATUS_SUCCESS + */ +int +bt_remove_card(void *card) +{ + bt_private *priv = (bt_private *)card; + ENTER(); + if (!priv) { + LEAVE(); + return BT_STATUS_SUCCESS; + } + if (!priv->adapter->SurpriseRemoved) { + if (BT_STATUS_SUCCESS == bt_send_reset_command(priv)) + bt_send_module_cfg_cmd(priv, MODULE_SHUTDOWN_REQ); + /* Disable interrupts on the card */ + sd_disable_host_int(priv); + priv->adapter->SurpriseRemoved = TRUE; + } + bt_send_hw_remove_event(priv); + wake_up_interruptible(&priv->adapter->cmd_wait_q); + priv->adapter->SurpriseRemoved = TRUE; + wake_up_interruptible(&priv->MainThread.waitQ); + while (priv->MainThread.pid) { + os_sched_timeout(1); + wake_up_interruptible(&priv->MainThread.waitQ); + } + + bt_proc_remove(priv); + PRINTM(INFO, "Unregister device\n"); + sbi_unregister_dev(priv); + clean_up_m_devs(priv); + PRINTM(INFO, "Free Adapter\n"); + bt_free_adapter(priv); + bt_priv_put(priv); + + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function initializes module. + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int +bt_init_module(void) +{ + int ret = BT_STATUS_SUCCESS; + ENTER(); + PRINTM(MSG, "BT: Loading driver\n"); + + bt_root_proc_init(); + + /** create char device class */ + chardev_class = class_create(THIS_MODULE, MODULE_NAME); + if (IS_ERR(chardev_class)) { + PRINTM(ERROR, "Unable to allocate class\n"); + bt_root_proc_remove(); + ret = PTR_ERR(chardev_class); + goto done; + } + + if (sbi_register() == NULL) { + bt_root_proc_remove(); + ret = BT_STATUS_FAILURE; + goto done; + } +done: + if (ret) + PRINTM(MSG, "BT: Driver loading failed\n"); + else + PRINTM(MSG, "BT: Driver loaded successfully\n"); + + LEAVE(); + return ret; +} + +/** + * @brief This function cleans module + * + * @return N/A + */ +static void +bt_exit_module(void) +{ + ENTER(); + PRINTM(MSG, "BT: Unloading driver\n"); + sbi_unregister(); + + bt_root_proc_remove(); + class_destroy(chardev_class); + PRINTM(MSG, "BT: Driver unloaded\n"); + LEAVE(); +} + +module_init(bt_init_module); +module_exit(bt_exit_module); + +MODULE_AUTHOR("Marvell International Ltd."); +MODULE_DESCRIPTION("Marvell Bluetooth Driver Ver. " VERSION); +MODULE_VERSION(VERSION); +MODULE_LICENSE("GPL"); +module_param(fw, int, 0); +MODULE_PARM_DESC(fw, "0: Skip firmware download; otherwise: Download firmware"); +module_param(fw_crc_check, int, 0); +MODULE_PARM_DESC(fw_crc_check, + "1: Enable FW download CRC check (default); 0: Disable FW download CRC check"); +module_param(psmode, int, 0); +MODULE_PARM_DESC(psmode, "1: Enable powermode; 0: Disable powermode"); +#ifdef CONFIG_OF +module_param(dts_enable, int, 0); +MODULE_PARM_DESC(dts_enable, "0: Disable DTS; 1: Enable DTS"); +#endif +#ifdef DEBUG_LEVEL1 +module_param(mbt_drvdbg, uint, 0); +MODULE_PARM_DESC(mbt_drvdbg, "BIT3:DBG_DATA BIT4:DBG_CMD 0xFF:DBG_ALL"); +#endif +#ifdef SDIO_SUSPEND_RESUME +module_param(mbt_pm_keep_power, int, 0); +MODULE_PARM_DESC(mbt_pm_keep_power, "1: PM keep power; 0: PM no power"); +#endif +module_param(init_cfg, charp, 0); +MODULE_PARM_DESC(init_cfg, "BT init config file name"); +module_param(cal_cfg, charp, 0); +MODULE_PARM_DESC(cal_cfg, "BT calibrate file name"); +module_param(cal_cfg_ext, charp, 0); +MODULE_PARM_DESC(cal_cfg_ext, "BT calibrate ext file name"); +module_param(bt_mac, charp, 0660); +MODULE_PARM_DESC(bt_mac, "BT init mac address"); +module_param(drv_mode, int, 0); +MODULE_PARM_DESC(drv_mode, "Bit 0: BT/AMP/BLE; Bit 1: FM; Bit 2: NFC"); +module_param(fm_name, charp, 0); +MODULE_PARM_DESC(fm_name, "FM interface name"); +module_param(nfc_name, charp, 0); +MODULE_PARM_DESC(nfc_name, "NFC interface name"); +module_param(mbt_gpio_pin, int, 0); +MODULE_PARM_DESC(mbt_gpio_pin, + "GPIO pin to interrupt host. 0xFFFF: disable GPIO interrupt mode; Others: GPIO pin assigned to generate pulse to host."); diff --git a/arch/arm/mach-berlin/modules/bt_sd8887/bt/bt_proc.c b/arch/arm/mach-berlin/modules/bt_sd8887/bt/bt_proc.c new file mode 100644 index 00000000..15c4ff3c --- /dev/null +++ b/arch/arm/mach-berlin/modules/bt_sd8887/bt/bt_proc.c @@ -0,0 +1,870 @@ +/** @file bt_proc.c + * + * @brief This file handle the functions for proc files + * + * Copyright (C) 2007-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available along with the File in the gpl.txt file or by writing to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307 or on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#include + +#include "bt_drv.h" +#include "bt_sdio.h" + +/** proc diretory root */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +#define PROC_DIR NULL +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) +#define PROC_DIR (&proc_root) +#else +#define PROC_DIR proc_net +#endif + +/** Proc mbt directory entry */ +static struct proc_dir_entry *proc_mbt; + +#define CMD52_STR_LEN 50 +static bt_private *bpriv; +static char cmd52_string[CMD52_STR_LEN]; + +struct proc_data { + /** Read length */ + int rdlen; + /** Read buffer */ + char *rdbuf; + /** Write length */ + int wrlen; + /** Maximum write length */ + int maxwrlen; + /** Write buffer */ + char *wrbuf; + void (*on_close) (struct inode *, struct file *); +}; + +/** Default file permission */ +#define DEFAULT_FILE_PERM 0644 + +/** Bluetooth device offset */ +#define OFFSET_BT_DEV 0x01 +/** Bluetooth adapter offset */ +#define OFFSET_BT_ADAPTER 0x02 +/** Show integer */ +#define SHOW_INT 0x10 +/** Show hex */ +#define SHOW_HEX 0x20 +/** Show string */ +#define SHOW_STRING 0x40 + +/** Device size */ +#define item_dev_size(n) (sizeof((bt_dev_t *)0)->n) +/** Device address */ +#define item_dev_addr(n) ((t_ptr) &((bt_dev_t *)0)->n) + +/** Adapter size */ +#define item_adapter_size(n) (sizeof((bt_adapter *)0)->n) +/** Adapter address */ +#define item_adapter_addr(n) ((t_ptr) &((bt_adapter *)0)->n) + +static struct item_data config_items[] = { +#ifdef DEBUG_LEVEL1 + {"drvdbg", sizeof(u32), (t_ptr)&mbt_drvdbg, 0, SHOW_HEX} + , +#endif + {"idle_timeout", item_dev_size(idle_timeout), 0, + item_dev_addr(idle_timeout), OFFSET_BT_DEV | SHOW_HEX} + , + {"psmode", item_dev_size(psmode), 0, item_dev_addr(psmode), + OFFSET_BT_DEV | SHOW_INT} + , + {"pscmd", item_dev_size(pscmd), 0, item_dev_addr(pscmd), + OFFSET_BT_DEV | SHOW_INT} + , + {"hsmode", item_dev_size(hsmode), 0, item_dev_addr(hsmode), + OFFSET_BT_DEV | SHOW_INT} + , + {"hscmd", item_dev_size(hscmd), 0, item_dev_addr(hscmd), + OFFSET_BT_DEV | SHOW_INT} + , + {"gpio_gap", item_dev_size(gpio_gap), 0, item_dev_addr(gpio_gap), + OFFSET_BT_DEV | SHOW_HEX} + , + {"hscfgcmd", item_dev_size(hscfgcmd), 0, item_dev_addr(hscfgcmd), + OFFSET_BT_DEV | SHOW_INT} + , + {"sdio_pull_cfg", item_dev_size(sdio_pull_cfg), 0, + item_dev_addr(sdio_pull_cfg), OFFSET_BT_DEV | SHOW_HEX} + , + {"sdio_pull_ctrl", item_dev_size(sdio_pull_ctrl), 0, + item_dev_addr(sdio_pull_ctrl), OFFSET_BT_DEV | SHOW_INT} + , + {"test_mode", item_dev_size(test_mode), 0, item_dev_addr(test_mode), + OFFSET_BT_DEV | SHOW_INT} + , + +}; + +static struct item_data status_items[] = { + {"version", item_adapter_size(drv_ver), 0, item_adapter_addr(drv_ver), + OFFSET_BT_ADAPTER | SHOW_STRING}, + {"tx_dnld_rdy", item_dev_size(tx_dnld_rdy), 0, + item_dev_addr(tx_dnld_rdy), + OFFSET_BT_DEV | SHOW_INT}, + {"psmode", item_adapter_size(psmode), 0, item_adapter_addr(psmode), + OFFSET_BT_ADAPTER | SHOW_INT}, + {"hs_state", item_adapter_size(hs_state), 0, + item_adapter_addr(hs_state), + OFFSET_BT_ADAPTER | SHOW_INT}, + {"hs_skip", item_adapter_size(hs_skip), 0, item_adapter_addr(hs_skip), + OFFSET_BT_ADAPTER | SHOW_INT}, + {"ps_state", item_adapter_size(ps_state), 0, + item_adapter_addr(ps_state), + OFFSET_BT_ADAPTER | SHOW_INT}, + {"WakeupTries", item_adapter_size(WakeupTries), 0, + item_adapter_addr(WakeupTries), OFFSET_BT_ADAPTER | SHOW_INT}, + {"irq_recv", item_adapter_size(irq_recv), 0, + item_adapter_addr(irq_recv), + OFFSET_BT_ADAPTER | SHOW_INT}, + {"irq_done", item_adapter_size(irq_done), 0, + item_adapter_addr(irq_done), + OFFSET_BT_ADAPTER | SHOW_INT}, + {"skb_pending", item_adapter_size(skb_pending), 0, + item_adapter_addr(skb_pending), OFFSET_BT_ADAPTER | SHOW_INT}, +}; + +static struct item_data debug_items[] = { + {"sdcmd52rw", 0, (t_ptr)cmd52_string, 0, SHOW_STRING}, +}; + +/** + * @brief convert string to number + * + * @param s pointer to numbered string + * @return converted number from string s + */ +int +string_to_number(char *s) +{ + int r = 0; + int base = 0; + int pn = 1; + + if (strncmp(s, "-", 1) == 0) { + pn = -1; + s++; + } + if ((strncmp(s, "0x", 2) == 0) || (strncmp(s, "0X", 2) == 0)) { + base = 16; + s += 2; + } else + base = 10; + + for (s = s; *s != 0; s++) { + if ((*s >= '0') && (*s <= '9')) + r = (r * base) + (*s - '0'); + else if ((*s >= 'A') && (*s <= 'F')) + r = (r * base) + (*s - 'A' + 10); + else if ((*s >= 'a') && (*s <= 'f')) + r = (r * base) + (*s - 'a' + 10); + else + break; + } + + return r * pn; +} + +/** + * @brief Create cmd52 string + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS + */ +static int +form_cmd52_string(bt_private *priv) +{ + ENTER(); + + memset(cmd52_string, 0, CMD52_STR_LEN); + snprintf(cmd52_string, CMD52_STR_LEN - 1, "BT: %d 0x%0x 0x%02X", + priv->bt_dev.cmd52_func, priv->bt_dev.cmd52_reg, + priv->bt_dev.cmd52_val); + + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/* + * @brief Parse cmd52 string + * + * @param buffer A pointer user buffer + * @param len Length of user buffer + * @param func Parsed func number + * @param reg Parsed reg value + * @param val Parsed value to set + * @return BT_STATUS_SUCCESS + */ +static int +parse_cmd52_string(const char __user * buffer, size_t len, + int *func, int *reg, int *val) +{ + int ret = BT_STATUS_SUCCESS; + char *string = NULL; + char *pos = NULL; + + ENTER(); + + string = kzalloc(CMD52_STR_LEN, GFP_KERNEL); + if (!string) { + PRINTM(ERROR, "BT: Can not alloc mem for cmd52 string\n"); + LEAVE(); + return -ENOMEM; + } + memcpy(string, buffer + strlen("sdcmd52rw="), + len - strlen("sdcmd52rw=")); + string = strstrip(string); + + *func = -1; + *reg = -1; + *val = -1; + + /* Get func */ + pos = strsep(&string, " \t"); + if (pos) + *func = string_to_number(pos); + + /* Get reg */ + pos = strsep(&string, " \t"); + if (pos) + *reg = string_to_number(pos); + + /* Get val (optional) */ + pos = strsep(&string, " \t"); + if (pos) + *val = string_to_number(pos); + kfree(string); + LEAVE(); + return ret; +} + +/** + * @brief This function handle generic proc file close + * + * @param inode A pointer to inode structure + * @param file A pointer to file structure + * @return BT_STATUS_SUCCESS + */ +static int +proc_close(struct inode *inode, struct file *file) +{ + struct proc_data *pdata = file->private_data; + ENTER(); + if (pdata) { + if (pdata->on_close != NULL) + pdata->on_close(inode, file); + kfree(pdata->rdbuf); + kfree(pdata->wrbuf); + kfree(pdata); + } + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function handle generic proc file read + * + * @param file A pointer to file structure + * @param buffer A pointer to output buffer + * @param len number of byte to read + * @param offset A pointer to offset of file + * @return number of output data + */ +static ssize_t +proc_read(struct file *file, char __user * buffer, size_t len, loff_t * offset) +{ + loff_t pos = *offset; + struct proc_data *pdata = (struct proc_data *)file->private_data; + if ((!pdata->rdbuf) || (pos < 0)) + return -EINVAL; + if (pos >= pdata->rdlen) + return 0; + if (len > pdata->rdlen - pos) + len = pdata->rdlen - pos; + if (copy_to_user(buffer, pdata->rdbuf + pos, len)) + return -EFAULT; + *offset = pos + len; + return len; +} + +/** + * @brief This function handle generic proc file write + * + * @param file A pointer to file structure + * @param buffer A pointer to input buffer + * @param len number of byte to write + * @param offset A pointer to offset of file + * @return number of input data + */ +static ssize_t +proc_write(struct file *file, + const char __user * buffer, size_t len, loff_t * offset) +{ + loff_t pos = *offset; + struct proc_data *pdata = (struct proc_data *)file->private_data; + int func = 0, reg = 0, val = 0; + + if (!pdata->wrbuf || (pos < 0)) + return -EINVAL; + if (pos >= pdata->maxwrlen) + return 0; + if (len > pdata->maxwrlen - pos) + len = pdata->maxwrlen - pos; + if (copy_from_user(pdata->wrbuf + pos, buffer, len)) + return -EFAULT; + if (!strncmp(buffer, "sdcmd52rw=", strlen("sdcmd52rw="))) { + parse_cmd52_string(buffer, len, &func, ®, &val); + sd_write_cmd52_val(bpriv, func, reg, val); + } + if (!strncmp(buffer, "debug_dump", strlen("debug_dump"))) { + bt_dump_sdio_regs(bpriv); + bt_dump_firmware_info_v2(bpriv); + } + if (!strncmp(buffer, "fw_reload", strlen("fw_reload"))) { + PRINTM(MSG, "Request fw_reload...\n"); + bt_request_fw_reload(bpriv); + } + if (pos + len > pdata->wrlen) + pdata->wrlen = len + file->f_pos; + *offset = pos + len; + return len; +} + +/** + * @brief This function handle the generic file close + * + * @param inode A pointer to inode structure + * @param file A pointer to file structure + * @return N/A + */ +static void +proc_on_close(struct inode *inode, struct file *file) +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) + struct proc_private_data *priv = PDE_DATA(inode); +#else + struct proc_private_data *priv = PDE(inode)->data; +#endif + struct proc_data *pdata = file->private_data; + char *line; + int i; + ENTER(); + if (!pdata->wrlen) + return; + line = pdata->wrbuf; + while (line[0]) { + for (i = 0; i < priv->num_items; i++) { + if (!strncmp + (line, priv->pdata[i].name, + strlen(priv->pdata[i].name))) { + line += strlen(priv->pdata[i].name) + 1; + if (priv->pdata[i].size == 1) + *((u8 *)priv->pdata[i].addr) = + (u8)string_to_number(line); + else if (priv->pdata[i].size == 2) + *((u16 *) priv->pdata[i].addr) = + (u16) string_to_number(line); + else if (priv->pdata[i].size == 4) + *((u32 *)priv->pdata[i].addr) = + (u32)string_to_number(line); + } + } + while (line[0] && line[0] != '\n') + line++; + if (line[0]) + line++; + } + if (priv->pbt->bt_dev.hscmd || priv->pbt->bt_dev.pscmd + || priv->pbt->bt_dev.sdio_pull_ctrl + || priv->pbt->bt_dev.test_mode || priv->pbt->bt_dev.hscfgcmd) { + bt_prepare_command(priv->pbt); + wake_up_interruptible(&priv->pbt->MainThread.waitQ); + } + LEAVE(); + return; +} + +/** + * @brief This function handle the generic file open + * + * @param inode A pointer to inode structure + * @param file A pointer to file structure + * @return BT_STATUS_SUCCESS or other error no. + */ +static int +proc_open(struct inode *inode, struct file *file) +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) + struct proc_private_data *priv = PDE_DATA(inode); +#else + struct proc_private_data *priv = PDE(inode)->data; +#endif + struct proc_data *pdata; + int i; + char *p; + u32 val = 0; + ENTER(); + priv->pbt->adapter->skb_pending = + skb_queue_len(&priv->pbt->adapter->tx_queue); + file->private_data = kzalloc(sizeof(struct proc_data), GFP_KERNEL); + if (file->private_data == NULL) { + PRINTM(ERROR, "BT: Can not alloc mem for proc_data\n"); + LEAVE(); + return -ENOMEM; + } + pdata = (struct proc_data *)file->private_data; + pdata->rdbuf = kmalloc(priv->bufsize, GFP_KERNEL); + if (pdata->rdbuf == NULL) { + PRINTM(ERROR, "BT: Can not alloc mem for rdbuf\n"); + kfree(file->private_data); + LEAVE(); + return -ENOMEM; + } + if (priv->fileflag == DEFAULT_FILE_PERM) { + pdata->wrbuf = kzalloc(priv->bufsize, GFP_KERNEL); + if (pdata->wrbuf == NULL) { + PRINTM(ERROR, "BT: Can not alloc mem for wrbuf\n"); + kfree(pdata->rdbuf); + kfree(file->private_data); + return -ENOMEM; + } + pdata->maxwrlen = priv->bufsize; + pdata->on_close = proc_on_close; + } + p = pdata->rdbuf; + for (i = 0; i < priv->num_items; i++) { + if (priv->pdata[i].size == 1) + val = *((u8 *)priv->pdata[i].addr); + else if (priv->pdata[i].size == 2) + val = *((u16 *) priv->pdata[i].addr); + else if (priv->pdata[i].size == 4) + val = *((u32 *)priv->pdata[i].addr); + if (priv->pdata[i].flag & SHOW_INT) + p += sprintf(p, "%s=%d\n", priv->pdata[i].name, val); + else if (priv->pdata[i].flag & SHOW_HEX) + p += sprintf(p, "%s=0x%x\n", priv->pdata[i].name, val); + else if (priv->pdata[i].flag & SHOW_STRING) { + if (!strncmp + (priv->pdata[i].name, "sdcmd52rw", + strlen("sdcmd52rw"))) { + sd_read_cmd52_val(bpriv); + form_cmd52_string(bpriv); + } + p += sprintf(p, "%s=%s\n", priv->pdata[i].name, + (char *)priv->pdata[i].addr); + } + } + pdata->rdlen = strlen(pdata->rdbuf); + LEAVE(); + return BT_STATUS_SUCCESS; +} + +static const struct file_operations proc_read_ops = { + .read = proc_read, + .open = proc_open, + .release = proc_close +}; + +static const struct file_operations proc_rw_ops = { + .read = proc_read, + .write = proc_write, + .open = proc_open, + .release = proc_close +}; + +static struct proc_private_data proc_files[] = { + {"status", S_IRUGO, 1024, + sizeof(status_items) / sizeof(status_items[0]), + &status_items[0], NULL, &proc_read_ops} + , + {"config", DEFAULT_FILE_PERM, 512, + sizeof(config_items) / sizeof(config_items[0]), &config_items[0], NULL, + &proc_rw_ops} + , + {"debug", DEFAULT_FILE_PERM, 512, + sizeof(debug_items) / sizeof(debug_items[0]), &debug_items[0], NULL, + &proc_rw_ops} + , +}; + +/** + * @brief Proc read function for histogram + * + * @param sfp pointer to seq_file structure + * @param data + * + * @return Number of output data or MLAN_STATUS_FAILURE + */ +static int +bt_histogram_read(struct seq_file *sfp, void *data) +{ + bt_hist_proc_data *pdata = (bt_hist_proc_data *) sfp->private; + bt_private *priv = (bt_private *)pdata->pbt; + u8 ant_num; + int i, j; + + ENTER(); + if (!priv) { + LEAVE(); + return -EFAULT; + } + bt_get_histogram(priv); + ant_num = priv->hist_data_len / sizeof(bt_histogram_data); + seq_printf(sfp, "BT histogram:\n"); + seq_printf(sfp, "antenna: 0=2.4G antenna a, 1=2.4G antenna b\n\n"); + if (ant_num < 1) { + seq_printf(sfp, "no histogram data from FW\n"); + LEAVE(); + return 0; + } + for (i = 0; i < ant_num; i++) { + if (pdata->antenna != priv->hist_data[i].antenna) + continue; + seq_printf(sfp, "antenna %d\n", priv->hist_data[i].antenna); + switch (priv->hist_data[i].powerclass) { + case 2: + seq_printf(sfp, "Power class=1.5\n"); + break; + case 5: + seq_printf(sfp, "Power class=2\n"); + break; + case 6: + seq_printf(sfp, "Power class=1\n"); + break; + default: + seq_printf(sfp, "Power class=%d\n", + priv->hist_data[i].powerclass); + break; + } + for (j = 0; j < (MAX_BT_LINK + MAX_BLE_LINK); j++) { + switch (priv->hist_data[i].link[j].txrxrate) { + case BDR_RATE_1M: + seq_printf(sfp, + "BT link[%d]: TxPower=%d dBm, TxRx Rate=BDR(1 mbps), RSSI=%d dBm\n", + j + 1, + priv->hist_data[i].link[j].txpower, + priv->hist_data[i].link[j].rssi); + break; + case EDR_RATE_2_3M: + seq_printf(sfp, + "BT link[%d]: TxPower=%d dBm, TxRx Rate=EDR(2/3 mbps), RSSI=%d dBm\n", + j + 1, + priv->hist_data[i].link[j].txpower, + priv->hist_data[i].link[j].rssi); + break; + case BLE_RATE_1M: + seq_printf(sfp, + "BLE link[%d]: TxPower=%d dBm, TxRx Rate=BLE(1 mbps), RSSI=%d dBm\n", + j - MAX_BT_LINK + 0x80, + priv->hist_data[i].link[j].txpower, + priv->hist_data[i].link[j].rssi); + break; + default: + if (j < MAX_BT_LINK) + seq_printf(sfp, + "BT link[%d]: TxPower=%d dBm, TxRx Rate=(%d), RSSI=%d dBm\n", + j + 1, + priv->hist_data[i].link[j]. + txpower, + priv->hist_data[i].link[j]. + txrxrate, + priv->hist_data[i].link[j]. + rssi); + else + seq_printf(sfp, + "BLE link[%d]: TxPower=%d dBm, TxRx Rate=(%d), RSSI=%d dBm\n", + j - MAX_BT_LINK + 0x80, + priv->hist_data[i].link[j]. + txpower, + priv->hist_data[i].link[j]. + txrxrate, + priv->hist_data[i].link[j]. + rssi); + break; + } + } + seq_printf(sfp, "\n"); + } + LEAVE(); + return 0; +} + +static int +bt_histogram_proc_open(struct inode *inode, struct file *file) +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) + return single_open(file, bt_histogram_read, PDE_DATA(inode)); +#else + return single_open(file, bt_histogram_read, PDE(inode)->data); +#endif +} + +static const struct file_operations histogram_proc_fops = { + .owner = THIS_MODULE, + .open = bt_histogram_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +/** + * @brief This function initializes proc entry + * + * @param priv A pointer to bt_private structure + * @param m_dev A pointer to struct m_dev + * @param seq Sequence number + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_proc_init(bt_private *priv, struct m_dev *m_dev, int seq) +{ + int ret = BT_STATUS_SUCCESS; + struct proc_dir_entry *entry; + int i, j; + char hist_entry[50]; + ENTER(); + + bpriv = priv; + memset(cmd52_string, 0, CMD52_STR_LEN); + if (proc_mbt) { + priv->dev_proc[seq].proc_entry = + proc_mkdir(m_dev->name, proc_mbt); + if (!priv->dev_proc[seq].proc_entry) { + PRINTM(ERROR, "BT: Could not mkdir %s!\n", m_dev->name); + ret = BT_STATUS_FAILURE; + goto done; + } + priv->dev_proc[seq].hist_entry = + proc_mkdir("histogram", priv->dev_proc[seq].proc_entry); + if (!priv->dev_proc[seq].hist_entry) { + PRINTM(ERROR, "BT: Could not mkdir histogram!\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + for (i = 0; i < MAX_ANTENNA_NUM; i++) { + priv->hist_proc[i].antenna = i; + priv->hist_proc[i].pbt = priv; + snprintf(hist_entry, sizeof(hist_entry), "bt-ant%d", i); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + entry = proc_create_data(hist_entry, 0644, + priv->dev_proc[seq].hist_entry, + &histogram_proc_fops, + &priv->hist_proc[i]); + if (entry == NULL) +#else + entry = create_proc_entry(hist_entry, 0644, + priv->dev_proc[seq]. + hist_entry); + if (entry) { + entry->data = &priv->hist_proc[i]; + entry->proc_fops = &histogram_proc_fops; + } else +#endif + { + PRINTM(MSG, + "Fail to create histogram proc %s\n", + hist_entry); + ret = BT_STATUS_FAILURE; + goto done; + } + } + priv->dev_proc[seq].pfiles = + kmalloc(sizeof(proc_files), GFP_ATOMIC); + if (!priv->dev_proc[seq].pfiles) { + PRINTM(ERROR, + "BT: Could not alloc memory for pfile!\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + memcpy((u8 *)priv->dev_proc[seq].pfiles, (u8 *)proc_files, + sizeof(proc_files)); + priv->dev_proc[seq].num_proc_files = ARRAY_SIZE(proc_files); + for (j = 0; j < priv->dev_proc[seq].num_proc_files; j++) + priv->dev_proc[seq].pfiles[j].pdata = NULL; + for (j = 0; j < priv->dev_proc[seq].num_proc_files; j++) { + priv->dev_proc[seq].pfiles[j].pdata = + kmalloc(priv->dev_proc[seq].pfiles[j]. + num_items * sizeof(struct item_data), + GFP_ATOMIC); + if (!priv->dev_proc[seq].pfiles[j].pdata) { + PRINTM(ERROR, + "BT: Could not alloc memory for pdata!\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + memcpy((u8 *)priv->dev_proc[seq].pfiles[j].pdata, + (u8 *)proc_files[j].pdata, + priv->dev_proc[seq].pfiles[j].num_items * + sizeof(struct item_data)); + for (i = 0; i < priv->dev_proc[seq].pfiles[j].num_items; + i++) { + if (priv->dev_proc[seq].pfiles[j]. + pdata[i].flag & OFFSET_BT_DEV) + priv->dev_proc[seq].pfiles[j].pdata[i]. + addr = + priv->dev_proc[seq].pfiles[j]. + pdata[i].offset + + (t_ptr)&priv->bt_dev; + if (priv->dev_proc[seq].pfiles[j]. + pdata[i].flag & OFFSET_BT_ADAPTER) + priv->dev_proc[seq].pfiles[j].pdata[i]. + addr = + priv->dev_proc[seq].pfiles[j]. + pdata[i].offset + + (t_ptr)priv->adapter; + } + priv->dev_proc[seq].pfiles[j].pbt = priv; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + entry = proc_create_data(proc_files[j].name, + S_IFREG | proc_files[j]. + fileflag, + priv->dev_proc[seq].proc_entry, + proc_files[j].fops, + &priv->dev_proc[seq]. + pfiles[j]); + if (entry == NULL) +#else + entry = create_proc_entry(proc_files[j].name, + S_IFREG | proc_files[j]. + fileflag, + priv->dev_proc[seq]. + proc_entry); + if (entry) { + entry->data = &priv->dev_proc[seq].pfiles[j]; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) + entry->owner = THIS_MODULE; +#endif + entry->proc_fops = proc_files[j].fops; + } else +#endif + PRINTM(MSG, "BT: Fail to create proc %s\n", + proc_files[j].name); + } + } +done: + if (ret == BT_STATUS_FAILURE) { + if (priv->dev_proc[seq].proc_entry) { + remove_proc_entry(m_dev->name, proc_mbt); + priv->dev_proc[seq].proc_entry = NULL; + } + if (priv->dev_proc[seq].pfiles) { + for (j = 0; j < priv->dev_proc[seq].num_proc_files; j++) { + if (priv->dev_proc[seq].pfiles[j].pdata) { + kfree(priv->dev_proc[seq].pfiles[j]. + pdata); + priv->dev_proc[seq].pfiles[j].pdata = + NULL; + } + } + kfree(priv->dev_proc[seq].pfiles); + priv->dev_proc[seq].pfiles = NULL; + } + } + LEAVE(); + return ret; +} + +/** + * @brief This function removes proc interface + * + * @param priv A pointer to bt_private structure + * @return N/A + */ +void +bt_proc_remove(bt_private *priv) +{ + int j, i; + char hist_entry[50]; + ENTER(); + PRINTM(INFO, "BT: Remove Proc Interface\n"); + if (proc_mbt) { + for (i = 0; i < MAX_RADIO_FUNC; i++) { + if (!priv->dev_proc[i].proc_entry) + continue; + for (j = 0; j < ARRAY_SIZE(proc_files); j++) { + remove_proc_entry(proc_files[j].name, + priv->dev_proc[i].proc_entry); + } + for (j = 0; j < MAX_ANTENNA_NUM; j++) { + snprintf(hist_entry, sizeof(hist_entry), + "bt-ant%d", j); + remove_proc_entry(hist_entry, + priv->dev_proc[i].hist_entry); + } + remove_proc_entry("histogram", + priv->dev_proc[i].proc_entry); + remove_proc_entry(priv->bt_dev.m_dev[i].name, proc_mbt); + priv->dev_proc[i].proc_entry = NULL; + + if (priv->dev_proc[i].pfiles) { + for (j = 0; + j < priv->dev_proc[i].num_proc_files; + j++) { + if (priv->dev_proc[i].pfiles[j].pdata) { + kfree(priv->dev_proc[i]. + pfiles[j].pdata); + priv->dev_proc[i].pfiles[j]. + pdata = NULL; + } + } + kfree(priv->dev_proc[i].pfiles); + priv->dev_proc[i].pfiles = NULL; + } + } + } + LEAVE(); + return; +} + +/** + * @brief This function creates proc interface + * directory structure + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_root_proc_init(void) +{ + PRINTM(INFO, "BT: Create Proc Interface\n"); + proc_mbt = proc_mkdir("mbt", PROC_DIR); + if (!proc_mbt) { + PRINTM(ERROR, "BT: Cannot create proc interface\n"); + return BT_STATUS_FAILURE; + } + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function removes proc interface + * directory structure + * + * @return BT_STATUS_SUCCESS + */ +int +bt_root_proc_remove(void) +{ + remove_proc_entry("mbt", PROC_DIR); + proc_mbt = NULL; + return BT_STATUS_SUCCESS; +} diff --git a/arch/arm/mach-berlin/modules/bt_sd8887/bt/bt_sdio.h b/arch/arm/mach-berlin/modules/bt_sd8887/bt/bt_sdio.h new file mode 100644 index 00000000..3ab5509d --- /dev/null +++ b/arch/arm/mach-berlin/modules/bt_sd8887/bt/bt_sdio.h @@ -0,0 +1,375 @@ +/** @file bt_sdio.h + * @brief This file contains SDIO (interface) module + * related macros, enum, and structure. + * + * Copyright (C) 2007-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available along with the File in the gpl.txt file or by writing to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307 or on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#ifndef _BT_SDIO_H_ +#define _BT_SDIO_H_ + +#include + +/** SD8787 card type */ +#define CARD_TYPE_SD8787 0x01 +/** SD8777 card type */ +#define CARD_TYPE_SD8777 0x02 +/** SD8887 card type */ +#define CARD_TYPE_SD8887 0x03 +/** SD8897 card type */ +#define CARD_TYPE_SD8897 0x04 +/** SD8797 card type */ +#define CARD_TYPE_SD8797 0x05 + +/** IRQ return type */ +typedef irqreturn_t IRQ_RET_TYPE; +/** IRQ return */ +#define IRQ_RET (return IRQ_HANDLED) +/** ISR notifier function */ +typedef IRQ_RET_TYPE (*isr_notifier_fn_t) (s32 irq, void *dev_id, + struct pt_regs * reg); + +/** SDIO header length */ +#define SDIO_HEADER_LEN 4 + +/* SD block size can not bigger than 64 due to buf size limit in firmware */ +/** define SD block size for data Tx/Rx */ +#define SD_BLOCK_SIZE 64 +/** define SD block size for firmware download */ +#define SD_BLOCK_SIZE_FW_DL 256 + +/** Number of blocks for firmware transfer */ +#define FIRMWARE_TRANSFER_NBLOCK 2 + +/** Firmware ready */ +#define FIRMWARE_READY 0xfedc + +/* Bus Interface Control Reg 0x07 */ +/** SD BUS width 1 */ +#define SD_BUS_WIDTH_1 0x00 +/** SD BUS width 4 */ +#define SD_BUS_WIDTH_4 0x02 +/** SD BUS width mask */ +#define SD_BUS_WIDTH_MASK 0x03 +/** Asynchronous interrupt mode */ +#define ASYNC_INT_MODE 0x20 +/* Host Control Registers */ +/** Host Control Registers : Configuration */ +#define CONFIGURATION_REG 0x00 +/** Host Control Registers : Host without Command 53 finish host*/ +#define HOST_TO_CARD_EVENT (0x1U << 3) +/** Host Control Registers : Host without Command 53 finish host */ +#define HOST_WO_CMD53_FINISH_HOST (0x1U << 2) +/** Host Control Registers : Host power up */ +#define HOST_POWER_UP (0x1U << 1) +/** Host Control Registers : Host power down */ +#define HOST_POWER_DOWN (0x1U << 0) + +/** Host Control Registers : Host interrupt RSR */ +#define HOST_INT_RSR_REG 0x01 + +/** Host Control Registers : Upload host interrupt RSR */ +#define UP_LD_HOST_INT_RSR (0x1U) + +/** Host Control Registers : Host interrupt mask */ +#define HOST_INT_MASK_REG 0x02 + +/** Host Control Registers : Upload host interrupt mask */ +#define UP_LD_HOST_INT_MASK (0x1U) +/** Host Control Registers : Download host interrupt mask */ +#define DN_LD_HOST_INT_MASK (0x2U) +/** Enable Host interrupt mask */ +#define HIM_ENABLE (UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK) +/** Disable Host interrupt mask */ +#define HIM_DISABLE 0xff + +#define HOST_INTSTATUS_REG 0x03 +/** Host Control Registers : Upload host interrupt status */ +#define UP_LD_HOST_INT_STATUS (0x1U) +/** Host Control Registers : Download host interrupt status */ +#define DN_LD_HOST_INT_STATUS (0x2U) + +/** Host Control Registers : Host interrupt status */ +#define HOST_INT_STATUS_REG 0x28 +/** Host Control Registers : Upload CRC error */ +#define UP_LD_CRC_ERR (0x1U << 2) +/** Host Control Registers : Upload restart */ +#define UP_LD_RESTART (0x1U << 1) +/** Host Control Registers : Download restart */ +#define DN_LD_RESTART (0x1U << 0) + +/* Card Control Registers */ +/** Card Control Registers : Read SQ base address A0 register */ +#define SQ_READ_BASE_ADDRESS_A0_REG 0x40 +/** Card Control Registers : Read SQ base address A1 register */ +#define SQ_READ_BASE_ADDRESS_A1_REG 0x41 +/** Card Control Registers : Read SQ base address A2 register */ +#define SQ_READ_BASE_ADDRESS_A2_REG 0x42 +/** Card Control Registers : Read SQ base address A3 register */ +#define SQ_READ_BASE_ADDRESS_A3_REG 0x43 +/** Card Control Registers : Read SQ base address B0 register */ +#define SQ_READ_BASE_ADDRESS_B0_REG 0x44 +/** Card Control Registers : Read SQ base address B1 register */ +#define SQ_READ_BASE_ADDRESS_B1_REG 0x45 +/** Card Control Registers : Read SQ base address B2 register */ +#define SQ_READ_BASE_ADDRESS_B2_REG 0x46 +/** Card Control Registers : Read SQ base address B3 register */ +#define SQ_READ_BASE_ADDRESS_B3_REG 0x47 + +/** Card Control Registers : Card status register */ +#define CARD_STATUS_REG 0x30 +/** Card Control Registers : Card I/O ready */ +#define CARD_IO_READY (0x1U << 3) +/** Card Control Registers : CIS card ready */ +#define CIS_CARD_RDY (0x1U << 2) +/** Card Control Registers : Upload card ready */ +#define UP_LD_CARD_RDY (0x1U << 1) +/** Card Control Registers : Download card ready */ +#define DN_LD_CARD_RDY (0x1U << 0) + +/** Card Control Registers : Host interrupt mask register */ +#define HOST_INTERRUPT_MASK_REG 0x34 +/** Card Control Registers : Host power interrupt mask */ +#define HOST_POWER_INT_MASK (0x1U << 3) +/** Card Control Registers : Abort card interrupt mask */ +#define ABORT_CARD_INT_MASK (0x1U << 2) +/** Card Control Registers : Upload card interrupt mask */ +#define UP_LD_CARD_INT_MASK (0x1U << 1) +/** Card Control Registers : Download card interrupt mask */ +#define DN_LD_CARD_INT_MASK (0x1U << 0) + +/** Card Control Registers : Card interrupt status register */ +#define CARD_INTERRUPT_STATUS_REG 0x38 +/** Card Control Registers : Power up interrupt */ +#define POWER_UP_INT (0x1U << 4) +/** Card Control Registers : Power down interrupt */ +#define POWER_DOWN_INT (0x1U << 3) + +/** Card Control Registers : Card interrupt RSR register */ +#define CARD_INTERRUPT_RSR_REG 0x3c +/** Card Control Registers : Power up RSR */ +#define POWER_UP_RSR (0x1U << 4) +/** Card Control Registers : Power down RSR */ +#define POWER_DOWN_RSR (0x1U << 3) + +/** Card Control Registers : Debug 0 register */ +#define DEBUG_0_REG 0x70 +/** Card Control Registers : SD test BUS 0 */ +#define SD_TESTBUS0 (0x1U) +/** Card Control Registers : Debug 1 register */ +#define DEBUG_1_REG 0x71 +/** Card Control Registers : SD test BUS 1 */ +#define SD_TESTBUS1 (0x1U) +/** Card Control Registers : Debug 2 register */ +#define DEBUG_2_REG 0x72 +/** Card Control Registers : SD test BUS 2 */ +#define SD_TESTBUS2 (0x1U) +/** Card Control Registers : Debug 3 register */ +#define DEBUG_3_REG 0x73 +/** Card Control Registers : SD test BUS 3 */ +#define SD_TESTBUS3 (0x1U) + +/** Host Control Registers : I/O port 0 */ +#define IO_PORT_0_REG 0x78 +/** Host Control Registers : I/O port 1 */ +#define IO_PORT_1_REG 0x79 +/** Host Control Registers : I/O port 2 */ +#define IO_PORT_2_REG 0x7A + +/** Firmware status 0 register */ +#define CARD_FW_STATUS0_REG 0x60 +/** Firmware status 1 register */ +#define CARD_FW_STATUS1_REG 0x61 +/** Rx length register */ +#define CARD_RX_LEN_REG 0x62 +/** Rx unit register */ +#define CARD_RX_UNIT_REG 0x63 +/** Card Control Registers : Miscellaneous Configuration Register */ +#define CARD_MISC_CFG_REG 0x6C +/** Misc. Config Register : Auto Re-enable interrupts */ +#define AUTO_RE_ENABLE_INT (0x1U << 4) + +/** Card Control Registers : Card OCR 0 register */ +#define CARD_OCR_0_REG 0x68 +/** Card Control Registers : Card OCR 1 register */ +#define CARD_OCR_1_REG 0x69 +/** Card Control Registers : Card OCR 3 register */ +#define CARD_OCR_3_REG 0x6A +/** Card Control Registers : Card config register */ +#define CARD_CONFIG_REG 0x6B +/** Card Control Registers : Card revision register */ +#define CARD_REVISION_REG 0x5c +/** Card Control Registers : Command 53 finish G BUS */ +#define CMD53_FINISH_GBUS (0x1U << 1) +/** Card Control Registers : SD negative edge */ +#define SD_NEG_EDGE (0x1U << 0) + +/* Special registers in function 0 of the SDxx card */ +/** Special register in function 0 of the SDxxx card : Scratch 0 */ +#define SCRATCH_0_REG 0x80fe +/** Special register in function 0 of the SDxxx card : Scratch 1 */ +#define SCRATCH_1_REG 0x80ff +/** Host F1 read base 0 */ +#define HOST_F1_RD_BASE_0 0x0040 +/** Host F1 read base 1 */ +#define HOST_F1_RD_BASE_1 0x0041 +/** Host F1 card ready */ +#define HOST_F1_CARD_RDY 0x0020 + +/** Chip Id Register 0 */ +#define CARD_CHIP_ID_0_REG 0x801c +/** Chip Id Register 1 */ +#define CARD_CHIP_ID_1_REG 0x801d + +struct sdio_mmc_card { + /** sdio_func structure pointer */ + struct sdio_func *func; + /** bt_private structure pointer */ + bt_private *priv; +}; + +struct sdio_card_reg { + u8 cfg; + u8 host_int_mask; // HOST_INT_MASK_REG + u8 host_intstatus; // HOST_INTSTATUS_REG + u8 host_int_rsr_reg; // HOST_INT_RSR_REG + u8 card_misc_cfg_reg; // CARD_MISC_CFG_REG + u8 card_status; // CARD_STATUS_REG + u8 sq_read_base_addr_a0; // SQ_READ_BASE_ADDRESS_A0_REG + u8 sq_read_base_addr_a1; // SQ_READ_BASE_ADDRESS_A1_REG + u8 card_revision; // CARD_REVISION_REG + u8 card_fw_status0; // CARD_FW_STATUS0_REG + u8 card_fw_status1; // CARD_FW_STATUS1_REG + u8 card_rx_len; // CARD_RX_LEN_REG + u8 card_rx_unit; // CARD_RX_UNIT_REG + u8 io_port_0; // IO_PORT_0_REG + u8 io_port_1; // IO_PORT_1_REG + u8 io_port_2; // IO_PORT_2_REG +}; + +struct sdio_device { + const struct sdio_card_reg *reg; +}; + +static const struct sdio_card_reg bt_reg_87xx = { + .cfg = 0x00, + .host_int_mask = 0x02, // HOST_INT_MASK_REG + .host_intstatus = 0x03, // HOST_INTSTATUS_REG + .host_int_rsr_reg = 0x01, // HOST_INT_RSR_REG + .card_misc_cfg_reg = 0x6c, // CARD_MISC_CFG_REG + .card_status = 0x30, // CARD_STATUS_REG + .sq_read_base_addr_a0 = 0x40, // SQ_READ_BASE_ADDRESS_A0_REG + .sq_read_base_addr_a1 = 0x41, // SQ_READ_BASE_ADDRESS_A1_REG + .card_revision = 0x5C, // CARD_REVISION_REG + .card_fw_status0 = 0x60, // CARD_FW_STATUS0_REG + .card_fw_status1 = 0x61, // CARD_FW_STATUS1_REG + .card_rx_len = 0x62, // CARD_RX_LEN_REG + .card_rx_unit = 0x63, // CARD_RX_UNIT_REG + .io_port_0 = 0x78, // IO_PORT_0_REG + .io_port_1 = 0x79, // IO_PORT_1_REG + .io_port_2 = 0x7a, // IO_PORT_2_REG +}; + +static const struct sdio_card_reg bt_reg_8887 = { + .cfg = 0x00, + .host_int_mask = 0x08, // HOST_INT_MASK_REG + .host_intstatus = 0x0C, // HOST_INTSTATUS_REG + .host_int_rsr_reg = 0x04, // HOST_INT_RSR_REG + .card_misc_cfg_reg = 0xD8, // CARD_MISC_CFG_REG + .card_status = 0x5C, // CARD_STATUS_REG + .sq_read_base_addr_a0 = 0x6C, // SQ_READ_BASE_ADDRESS_A0_REG + .sq_read_base_addr_a1 = 0x6D, // SQ_READ_BASE_ADDRESS_A1_REG + .card_revision = 0xC8, // CARD_REVISION_REG + .card_fw_status0 = 0x88, // CARD_FW_STATUS0_REG + .card_fw_status1 = 0x89, // CARD_FW_STATUS1_REG + .card_rx_len = 0x8A, // CARD_RX_LEN_REG + .card_rx_unit = 0x8B, // CARD_RX_UNIT_REG + .io_port_0 = 0xE4, // IO_PORT_0_REG + .io_port_1 = 0xE5, // IO_PORT_1_REG + .io_port_2 = 0xE6, // IO_PORT_2_REG +}; + +static const struct sdio_card_reg bt_reg_8897 = { + .cfg = 0x00, + .host_int_mask = 0x02, // HOST_INT_MASK_REG + .host_intstatus = 0x03, // HOST_INTSTATUS_REG + .host_int_rsr_reg = 0x01, // HOST_INT_RSR_REG + .card_misc_cfg_reg = 0xCC, // CARD_MISC_CFG_REG + .card_status = 0x50, // CARD_STATUS_REG + .sq_read_base_addr_a0 = 0x60, // SQ_READ_BASE_ADDRESS_A0_REG + .sq_read_base_addr_a1 = 0x61, // SQ_READ_BASE_ADDRESS_A1_REG + .card_revision = 0xBC, // CARD_REVISION_REG + .card_fw_status0 = 0xC0, // CARD_FW_STATUS0_REG + .card_fw_status1 = 0xC1, // CARD_FW_STATUS1_REG + .card_rx_len = 0xC2, // CARD_RX_LEN_REG + .card_rx_unit = 0xC3, // CARD_RX_UNIT_REG + .io_port_0 = 0xD8, // IO_PORT_0_REG + .io_port_1 = 0xD9, // IO_PORT_1_REG + .io_port_2 = 0xDA, // IO_PORT_2_REG +}; + +static const struct sdio_device bt_sdio_sd8787 = { + .reg = &bt_reg_87xx, +}; + +static const struct sdio_device bt_sdio_sd8777 = { + .reg = &bt_reg_87xx, +}; + +static const struct sdio_device bt_sdio_sd8887 = { + .reg = &bt_reg_8887, +}; + +static const struct sdio_device bt_sdio_sd8897 = { + .reg = &bt_reg_8897, +}; + +static const struct sdio_device bt_sdio_sd8797 = { + .reg = &bt_reg_87xx, +}; + +/** DMA alignment value */ +#define DMA_ALIGNMENT 64 +/** Macros for Data Alignment : size */ +#define ALIGN_SZ(p, a) \ + (((p) + ((a) - 1)) & ~((a) - 1)) + +/** Macros for Data Alignment : address */ +#define ALIGN_ADDR(p, a) \ + ((((t_ptr)(p)) + (((t_ptr)(a)) - 1)) & ~(((t_ptr)(a)) - 1)) + +/** This function read cmd52 register */ +int sd_write_reg(bt_private *priv, int reg, u8 val); +/** This function write cmd52 value to register */ +int sd_read_reg(bt_private *priv, int reg, u8 *data); +/** This function reads the Cmd52 value in dev structure */ +int sd_read_cmd52_val(bt_private *priv); +/** This function updates card reg based on the Cmd52 value in dev structure */ +int sd_write_cmd52_val(bt_private *priv, int func, int reg, int val); + +void sdio_update_card_type(bt_private *priv, void *card); +int sdio_get_sdio_device(bt_private *priv); + +#ifdef SDIO_SUSPEND_RESUME +#ifdef MMC_PM_KEEP_POWER +#ifdef MMC_PM_FUNC_SUSPENDED +/** This function tells lower driver that BT is suspended */ +void bt_is_suspended(bt_private *priv); +#endif +#endif +#endif +#endif /* _BT_SDIO_H_ */ diff --git a/arch/arm/mach-berlin/modules/bt_sd8887/bt/bt_sdiommc.c b/arch/arm/mach-berlin/modules/bt_sd8887/bt/bt_sdiommc.c new file mode 100644 index 00000000..9158d515 --- /dev/null +++ b/arch/arm/mach-berlin/modules/bt_sd8887/bt/bt_sdiommc.c @@ -0,0 +1,2126 @@ +/** @file bt_sdiommc.c + * @brief This file contains SDIO IF (interface) module + * related functions. + * + * Copyright (C) 2007-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available along with the File in the gpl.txt file or by writing to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307 or on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#include +#include + +#include "bt_drv.h" +#include "bt_sdio.h" + +/** define marvell vendor id */ +#define MARVELL_VENDOR_ID 0x02df + +/** Max retry number of CMD53 write */ +#define MAX_WRITE_IOMEM_RETRY 2 +/** Firmware name */ +static char *fw_name; +/** fw serial download flag */ +static int bt_fw_serial = 0; +/** request firmware nowait */ +int bt_req_fw_nowait; +static int multi_fn = BIT(2); + +#define DEFAULT_FW_NAME "" + +/** FW header length for CRC check disable */ +#define FW_CRC_HEADER_RB2 28 +/** FW header for CRC check disable */ +static u8 fw_crc_header_rb_2[FW_CRC_HEADER_RB2] = { + 0x05, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x9d, 0x32, 0xbb, 0x11, 0x01, 0x00, 0x00, 0x7f, + 0x00, 0x00, 0x00, 0x00, 0x67, 0xd6, 0xfc, 0x25 +}; + +/** FW header length for CRC check disable */ +#define FW_CRC_HEADER_RB 24 +/** FW header for CRC check disable */ +static u8 fw_crc_header_rb_1[FW_CRC_HEADER_RB] = { + 0x01, 0x00, 0x00, 0x00, 0x04, 0xfd, 0x00, 0x04, + 0x08, 0x00, 0x00, 0x00, 0x26, 0x52, 0x2a, 0x7b, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +/** Default firmware name */ +#define DEFAULT_FW_NAME_8777 "mrvl/sd8777_uapsta.bin" +#define DEFAULT_FW_NAME_8787 "mrvl/sd8787_uapsta.bin" +#define DEFAULT_FW_NAME_8797 "mrvl/sd8797_uapsta.bin" +#define DEFAULT_FW_NAME_8887 "mrvl/sd8887_uapsta.bin" +#define DEFAULT_FW_NAME_8897 "mrvl/sd8897_uapsta.bin" + +/** SD8787 chip revision ID */ +#define SD8787_W0 0x30 +#define SD8787_W1 0x31 +#define SD8787_A0_A1 0x40 +/** SD8797 chip revision ID */ +#define SD8797_A0 0x00 +#define SD8797_B0 0x10 +/** SD8897 chip revision ID */ +#define SD8897_A0 0x10 +#define SD8897_B0 0x20 + +/** SD8887 chip revision ID */ +#define SD8887_A0 0x0 +#define SD8887_A2 0x2 +#define SD8887_A0_FW_NAME "mrvl/sd8887_uapsta.bin" +#define SD8887_A2_FW_NAME "mrvl/sd8887_uapsta_a2.bin" +#define SD8887_A2_BT_FW_NAME "mrvl/sd8887_bt_a2.bin" + +#define SD8897_A0_FW_NAME "mrvl/sd8897_uapsta_a0.bin" +#define SD8897_B0_FW_NAME "mrvl/sd8897_uapsta.bin" + +#define SD8787_W1_FW_NAME "mrvl/sd8787_uapsta_w1.bin" +#define SD8787_AX_FW_NAME "mrvl/sd8787_uapsta.bin" +#define SD8797_A0_FW_NAME "mrvl/sd8797_uapsta_a0.bin" +#define SD8797_B0_FW_NAME "mrvl/sd8797_uapsta.bin" +/** Function number 2 */ +#define FN2 2 +/** Device ID for SD8787 FN2 */ +#define SD_DEVICE_ID_8787_BT_FN2 0x911A +/** Device ID for SD8787 FN3 */ +#define SD_DEVICE_ID_8787_BT_FN3 0x911B +/** Device ID for SD8777 FN2 */ +#define SD_DEVICE_ID_8777_BT_FN2 0x9132 +/** Device ID for SD8777 FN3 */ +#define SD_DEVICE_ID_8777_BT_FN3 0x9133 +/** Device ID for SD8887 FN2 */ +#define SD_DEVICE_ID_8887_BT_FN2 0x9136 +/** Device ID for SD8887 FN3 */ +#define SD_DEVICE_ID_8887_BT_FN3 0x9137 +/** Device ID for SD8897 FN2 */ +#define SD_DEVICE_ID_8897_BT_FN2 0x912E +/** Device ID for SD8897 FN3 */ +#define SD_DEVICE_ID_8897_BT_FN3 0x912F +/** Device ID for SD8797 FN2 */ +#define SD_DEVICE_ID_8797_BT_FN2 0x912A +/** Device ID for SD8797 FN3 */ +#define SD_DEVICE_ID_8797_BT_FN3 0x912B + +/** Array of SDIO device ids when multi_fn=0x12 */ +static const struct sdio_device_id bt_ids[] = { + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8787_BT_FN2)}, + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8777_BT_FN2)}, + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8887_BT_FN2)}, + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8897_BT_FN2)}, + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8797_BT_FN2)}, + {} +}; + +MODULE_DEVICE_TABLE(sdio, bt_ids); + +/******************************************************** + Global Variables +********************************************************/ +/** unregiser bus driver flag */ +static u8 unregister; +#ifdef SDIO_SUSPEND_RESUME +/** PM keep power */ +extern int mbt_pm_keep_power; +#endif + +/******************************************************** + Local Functions +********************************************************/ + +/** + * @brief This function gets rx_unit value + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +sd_get_rx_unit(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + u8 reg; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + u8 card_rx_unit_reg = priv->psdio_device->reg->card_rx_unit; + + ENTER(); + + reg = sdio_readb(card->func, card_rx_unit_reg, &ret); + if (ret == BT_STATUS_SUCCESS) + priv->bt_dev.rx_unit = reg; + + LEAVE(); + return ret; +} + +/** + * @brief This function reads fwstatus registers + * + * @param priv A pointer to bt_private structure + * @param dat A pointer to keep returned data + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int +sd_read_firmware_status(bt_private *priv, u16 * dat) +{ + int ret = BT_STATUS_SUCCESS; + u8 fws0; + u8 fws1; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + u8 card_fw_status0_reg = priv->psdio_device->reg->card_fw_status0; + u8 card_fw_status1_reg = priv->psdio_device->reg->card_fw_status1; + + ENTER(); + + fws0 = sdio_readb(card->func, card_fw_status0_reg, &ret); + if (ret < 0) { + LEAVE(); + return BT_STATUS_FAILURE; + } + + fws1 = sdio_readb(card->func, card_fw_status1_reg, &ret); + if (ret < 0) { + LEAVE(); + return BT_STATUS_FAILURE; + } + + *dat = (((u16) fws1) << 8) | fws0; + + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function reads rx length + * + * @param priv A pointer to bt_private structure + * @param dat A pointer to keep returned data + * @return BT_STATUS_SUCCESS or other error no. + */ +static int +sd_read_rx_len(bt_private *priv, u16 * dat) +{ + int ret = BT_STATUS_SUCCESS; + u8 reg; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + u8 card_rx_len_reg = priv->psdio_device->reg->card_rx_len; + + ENTER(); + + reg = sdio_readb(card->func, card_rx_len_reg, &ret); + if (ret == BT_STATUS_SUCCESS) + *dat = (u16) reg << priv->bt_dev.rx_unit; + + LEAVE(); + return ret; +} + +/** + * @brief This function enables the host interrupts mask + * + * @param priv A pointer to bt_private structure + * @param mask the interrupt mask + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int +sd_enable_host_int_mask(bt_private *priv, u8 mask) +{ + int ret = BT_STATUS_SUCCESS; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + u8 host_int_mask_reg = priv->psdio_device->reg->host_int_mask; + + ENTER(); + + sdio_writeb(card->func, mask, host_int_mask_reg, &ret); + if (ret) { + PRINTM(WARN, "BT: Unable to enable the host interrupt!\n"); + ret = BT_STATUS_FAILURE; + } + + LEAVE(); + return ret; +} + +/** @brief This function disables the host interrupts mask. + * + * @param priv A pointer to bt_private structure + * @param mask the interrupt mask + * @return BT_STATUS_SUCCESS or other error no. + */ +static int +sd_disable_host_int_mask(bt_private *priv, u8 mask) +{ + int ret = BT_STATUS_FAILURE; + u8 host_int_mask; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + u8 host_int_mask_reg = priv->psdio_device->reg->host_int_mask; + + ENTER(); + + /* Read back the host_int_mask register */ + host_int_mask = sdio_readb(card->func, host_int_mask_reg, &ret); + if (ret) + goto done; + + /* Update with the mask and write back to the register */ + host_int_mask &= ~mask; + sdio_writeb(card->func, host_int_mask, host_int_mask_reg, &ret); + if (ret < 0) { + PRINTM(WARN, "BT: Unable to diable the host interrupt!\n"); + goto done; + } + ret = BT_STATUS_SUCCESS; +done: + LEAVE(); + return ret; +} + +/** + * @brief This function polls the card status register + * + * @param priv A pointer to bt_private structure + * @param bits the bit mask + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int +sd_poll_card_status(bt_private *priv, u8 bits) +{ + int tries; + int rval; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + u8 cs; + u8 card_status_reg = priv->psdio_device->reg->card_status; + + ENTER(); + + for (tries = 0; tries < MAX_POLL_TRIES * 1000; tries++) { + cs = sdio_readb(card->func, card_status_reg, &rval); + if (rval != 0) + break; + if (rval == 0 && (cs & bits) == bits) { + LEAVE(); + return BT_STATUS_SUCCESS; + } + udelay(1); + } + PRINTM(ERROR, + "BT: sdio_poll_card_status failed (%d), tries = %d, cs = 0x%x\n", + rval, tries, cs); + + LEAVE(); + return BT_STATUS_FAILURE; +} + +/** + * @brief This function reads updates the Cmd52 value in dev structure + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or other error no. + */ +int +sd_read_cmd52_val(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + u8 func, reg, val; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + + ENTER(); + + func = priv->bt_dev.cmd52_func; + reg = priv->bt_dev.cmd52_reg; + sdio_claim_host(card->func); + if (func) + val = sdio_readb(card->func, reg, &ret); + else + val = sdio_f0_readb(card->func, reg, &ret); + sdio_release_host(card->func); + if (ret) { + PRINTM(ERROR, "BT: Cannot read value from func %d reg %d\n", + func, reg); + } else { + priv->bt_dev.cmd52_val = val; + } + + LEAVE(); + return ret; +} + +/** + * @brief This function updates card reg based on the Cmd52 value in dev structure + * + * @param priv A pointer to bt_private structure + * @param func Stores func variable + * @param reg Stores reg variable + * @param val Stores val variable + * @return BT_STATUS_SUCCESS or other error no. + */ +int +sd_write_cmd52_val(bt_private *priv, int func, int reg, int val) +{ + int ret = BT_STATUS_SUCCESS; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + + ENTER(); + + if (val >= 0) { + /* Perform actual write only if val is provided */ + sdio_claim_host(card->func); + if (func) + sdio_writeb(card->func, val, reg, &ret); + else + sdio_f0_writeb(card->func, val, reg, &ret); + sdio_release_host(card->func); + if (ret) { + PRINTM(ERROR, + "BT: Cannot write value (0x%x) to func %d reg %d\n", + val, func, reg); + goto done; + } + priv->bt_dev.cmd52_val = val; + } + + /* Save current func and reg for future read */ + priv->bt_dev.cmd52_func = func; + priv->bt_dev.cmd52_reg = reg; + +done: + LEAVE(); + return ret; +} + +/** + * @brief This function updates card reg based on the Cmd52 value in dev structure + * + * @param priv A pointer to bt_private structure + * @param reg register to write + * @param val value + * @return BT_STATUS_SUCCESS or other error no. + */ +int +sd_write_reg(bt_private *priv, int reg, u8 val) +{ + int ret = BT_STATUS_SUCCESS; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + ENTER(); + sdio_claim_host(card->func); + sdio_writeb(card->func, val, reg, &ret); + sdio_release_host(card->func); + LEAVE(); + return ret; +} + +/** + * @brief This function reads updates the Cmd52 value in dev structure + * + * @param priv A pointer to bt_private structure + * @param reg register to read + * @return BT_STATUS_SUCCESS or other error no. + */ +int +sd_read_reg(bt_private *priv, int reg, u8 *data) +{ + int ret = BT_STATUS_SUCCESS; + u8 val; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + ENTER(); + sdio_claim_host(card->func); + val = sdio_readb(card->func, reg, &ret); + sdio_release_host(card->func); + *data = val; + LEAVE(); + return ret; +} + +/** + * @brief This function probes the card + * + * @param func A pointer to sdio_func structure. + * @param id A pointer to structure sdio_device_id + * @return BT_STATUS_SUCCESS/BT_STATUS_FAILURE or other error no. + */ +static int +sd_probe_card(struct sdio_func *func, const struct sdio_device_id *id) +{ + int ret = BT_STATUS_SUCCESS; + bt_private *priv = NULL; + struct sdio_mmc_card *card = NULL; + + ENTER(); + + PRINTM(INFO, "BT: vendor=0x%x,device=0x%x,class=%d,fn=%d\n", id->vendor, + id->device, id->class, func->num); + card = kzalloc(sizeof(struct sdio_mmc_card), GFP_KERNEL); + if (!card) { + ret = -ENOMEM; + goto done; + } + card->func = func; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) + /* wait for chip fully wake up */ + if (!func->enable_timeout) + func->enable_timeout = 200; +#endif + sdio_claim_host(func); + ret = sdio_enable_func(func); + if (ret) { + sdio_disable_func(func); + sdio_release_host(func); + PRINTM(FATAL, "BT: sdio_enable_func() failed: ret=%d\n", ret); + kfree(card); + LEAVE(); + return -EIO; + } + sdio_release_host(func); + priv = bt_add_card(card); + if (!priv) { + sdio_claim_host(func); + sdio_disable_func(func); + sdio_release_host(func); + ret = BT_STATUS_FAILURE; + kfree(card); + } +done: + LEAVE(); + return ret; +} + +/** + * @brief This function checks if the firmware is ready to accept + * command or not. + * + * @param priv A pointer to bt_private structure + * @param pollnum Number of times to poll fw status + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +sd_verify_fw_download(bt_private *priv, int pollnum) +{ + int ret = BT_STATUS_FAILURE; + u16 firmwarestat = 0; + int tries; + + ENTER(); + + /* Wait for firmware initialization event */ + for (tries = 0; tries < pollnum; tries++) { + if (sd_read_firmware_status(priv, &firmwarestat) < 0) + continue; + if (firmwarestat == FIRMWARE_READY) { + PRINTM(MSG, "BT FW is active(%d)\n", tries); + ret = BT_STATUS_SUCCESS; + break; + } + mdelay(100); + } + if ((pollnum > 1) && (ret != BT_STATUS_SUCCESS)) + PRINTM(ERROR, + "Fail to poll firmware status: firmwarestat=0x%x\n", + firmwarestat); + LEAVE(); + return ret; +} + +/** + * @brief Transfers firmware to card + * + * @param priv A Pointer to bt_private structure + * @param fw A Pointer to fw image + * @param fw_len fw image len + * @return BT_STATUS_SUCCESS/BT_STATUS_FAILURE or other error no. + */ +static int +sd_init_fw_dpc(bt_private *priv, u8 *fw, int fw_len) +{ + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + u8 *firmware = fw; + int firmwarelen = fw_len; + u8 base0; + u8 base1; + int ret = BT_STATUS_SUCCESS; + int offset; + void *tmpfwbuf = NULL; + int tmpfwbufsz; + u8 *fwbuf; + u16 len; + int txlen = 0; + int tx_blocks = 0; + int i = 0; + int tries = 0; + u8 sq_read_base_address_a0_reg = + priv->psdio_device->reg->sq_read_base_addr_a0; + u8 sq_read_base_address_a1_reg = + priv->psdio_device->reg->sq_read_base_addr_a1; + u8 crc_buffer = 0; + u8 *header_crc_fw = NULL; + u8 header_crc_fw_len = 0; + + if (priv->card_type == CARD_TYPE_SD8787) { + header_crc_fw = fw_crc_header_rb_1; + header_crc_fw_len = FW_CRC_HEADER_RB; + } else if (priv->card_type == CARD_TYPE_SD8777) { + header_crc_fw = fw_crc_header_rb_2; + header_crc_fw_len = FW_CRC_HEADER_RB2; + } + + ENTER(); + + PRINTM(INFO, "BT: Downloading FW image (%d bytes)\n", firmwarelen); + + tmpfwbufsz = BT_UPLD_SIZE + DMA_ALIGNMENT; + tmpfwbuf = kzalloc(tmpfwbufsz, GFP_KERNEL); + if (!tmpfwbuf) { + PRINTM(ERROR, + "BT: Unable to allocate buffer for firmware. Terminating download\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + /* Ensure aligned firmware buffer */ + fwbuf = (u8 *)ALIGN_ADDR(tmpfwbuf, DMA_ALIGNMENT); + + if (!(priv->fw_crc_check) + && ((priv->card_type == CARD_TYPE_SD8787) || + (priv->card_type == CARD_TYPE_SD8777)) + ) { + /* CRC check not required, use custom header first */ + firmware = header_crc_fw; + firmwarelen = header_crc_fw_len; + crc_buffer = 1; + } + + /* Perform firmware data transfer */ + offset = 0; + do { + /* The host polls for the DN_LD_CARD_RDY and CARD_IO_READY bits + */ + ret = sd_poll_card_status(priv, CARD_IO_READY | DN_LD_CARD_RDY); + if (ret < 0) { + PRINTM(FATAL, + "BT: FW download with helper poll status timeout @ %d\n", + offset); + goto done; + } + if (!crc_buffer) + /* More data? */ + if (offset >= firmwarelen) + break; + + for (tries = 0; tries < MAX_POLL_TRIES; tries++) { + base0 = sdio_readb(card->func, + sq_read_base_address_a0_reg, &ret); + if (ret) { + PRINTM(WARN, "Dev BASE0 register read failed:" + " base0=0x%04X(%d). Terminating download\n", + base0, base0); + ret = BT_STATUS_FAILURE; + goto done; + } + base1 = sdio_readb(card->func, + sq_read_base_address_a1_reg, &ret); + if (ret) { + PRINTM(WARN, "Dev BASE1 register read failed:" + " base1=0x%04X(%d). Terminating download\n", + base1, base1); + ret = BT_STATUS_FAILURE; + goto done; + } + len = (((u16) base1) << 8) | base0; + + if (len != 0) + break; + udelay(10); + } + + if (len == 0) + break; + else if (len > BT_UPLD_SIZE) { + PRINTM(FATAL, + "BT: FW download failure @ %d, invalid length %d\n", + offset, len); + ret = BT_STATUS_FAILURE; + goto done; + } + + txlen = len; + + if (len & BIT(0)) { + i++; + if (i > MAX_WRITE_IOMEM_RETRY) { + PRINTM(FATAL, + "BT: FW download failure @ %d, over max retry count\n", + offset); + ret = BT_STATUS_FAILURE; + goto done; + } + PRINTM(ERROR, + "BT: FW CRC error indicated by the helper:" + " len = 0x%04X, txlen = %d\n", len, txlen); + len &= ~BIT(0); + + PRINTM(ERROR, "BT: retry: %d, offset %d\n", i, offset); + /* Setting this to 0 to resend from same offset */ + txlen = 0; + } else { + i = 0; + + /* Set blocksize to transfer - checking for last block */ + if (firmwarelen - offset < txlen) + txlen = firmwarelen - offset; + + PRINTM(INFO, "."); + + tx_blocks = + (txlen + SD_BLOCK_SIZE_FW_DL - + 1) / SD_BLOCK_SIZE_FW_DL; + + /* Copy payload to buffer */ + memcpy(fwbuf, &firmware[offset], txlen); + } + + /* Send data */ + ret = sdio_writesb(card->func, priv->bt_dev.ioport, fwbuf, + tx_blocks * SD_BLOCK_SIZE_FW_DL); + + if (ret < 0) { + PRINTM(ERROR, + "BT: FW download, write iomem (%d) failed @ %d\n", + i, offset); + sdio_writeb(card->func, 0x04, CONFIGURATION_REG, &ret); + if (ret) + PRINTM(ERROR, "write ioreg failed (CFG)\n"); + } + + offset += txlen; + if (crc_buffer + && ((priv->card_type == CARD_TYPE_SD8787) || + (priv->card_type == CARD_TYPE_SD8777)) + ) { + if (offset >= header_crc_fw_len) { + /* Custom header download complete, restore + original FW */ + offset = 0; + firmware = fw; + firmwarelen = fw_len; + crc_buffer = 0; + } + } + } while (TRUE); + + PRINTM(MSG, "BT: FW download over, size %d bytes\n", offset); + + ret = BT_STATUS_SUCCESS; +done: + kfree(tmpfwbuf); + LEAVE(); + return ret; +} + +/** + * @brief request_firmware callback + * + * @param fw_firmware A pointer to firmware structure + * @param context A Pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int +sd_request_fw_dpc(const struct firmware *fw_firmware, void *context) +{ + int ret = BT_STATUS_SUCCESS; + bt_private *priv = (bt_private *)context; + struct sdio_mmc_card *card = NULL; + struct m_dev *m_dev_bt = NULL; + struct m_dev *m_dev_fm = NULL; + struct m_dev *m_dev_nfc = NULL; + struct timeval tstamp; + + ENTER(); + + m_dev_bt = &priv->bt_dev.m_dev[BT_SEQ]; + m_dev_fm = &priv->bt_dev.m_dev[FM_SEQ]; + m_dev_nfc = &priv->bt_dev.m_dev[NFC_SEQ]; + + if ((priv == NULL) || (priv->adapter == NULL) || + (priv->bt_dev.card == NULL) || (m_dev_bt == NULL) || + (m_dev_fm == NULL) || (m_dev_nfc == NULL)) { + LEAVE(); + return BT_STATUS_FAILURE; + } + + card = (struct sdio_mmc_card *)priv->bt_dev.card; + + if (!fw_firmware) { + do_gettimeofday(&tstamp); + if (tstamp.tv_sec > + (priv->req_fw_time.tv_sec + REQUEST_FW_TIMEOUT)) { + PRINTM(ERROR, + "BT: No firmware image found. Skipping download\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + PRINTM(ERROR, + "BT: No firmware image found! Retrying download\n"); + /* Wait a second here before calling the callback again */ + os_sched_timeout(1000); + sd_download_firmware_w_helper(priv); + LEAVE(); + return ret; + } + + priv->firmware = fw_firmware; + + if (BT_STATUS_FAILURE == + sd_init_fw_dpc(priv, (u8 *)priv->firmware->data, + priv->firmware->size)) { + PRINTM(ERROR, + "BT: sd_init_fw_dpc failed (download fw with nowait: %d). Terminating download\n", + bt_req_fw_nowait); + sdio_release_host(card->func); + ret = BT_STATUS_FAILURE; + goto done; + } + + /* check if the fimware is downloaded successfully or not */ + if (sd_verify_fw_download(priv, MAX_FIRMWARE_POLL_TRIES)) { + PRINTM(ERROR, "BT: FW failed to be active in time!\n"); + ret = BT_STATUS_FAILURE; + sdio_release_host(card->func); + goto done; + } + sdio_release_host(card->func); + sd_enable_host_int(priv); + if (BT_STATUS_FAILURE == sbi_register_conf_dpc(priv)) { + PRINTM(ERROR, + "BT: sbi_register_conf_dpc failed. Terminating download\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + if (fw_firmware) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) + if (!bt_req_fw_nowait) +#endif + release_firmware(fw_firmware); + } + LEAVE(); + return ret; + +done: + if (fw_firmware) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) + if (!bt_req_fw_nowait) +#endif + release_firmware(fw_firmware); + } + /* For synchronous download cleanup will be done in add_card */ + if (!bt_req_fw_nowait) + return ret; + PRINTM(INFO, "unregister device\n"); + sbi_unregister_dev(priv); + ((struct sdio_mmc_card *)card)->priv = NULL; + /* Stop the thread servicing the interrupts */ + priv->adapter->SurpriseRemoved = TRUE; + wake_up_interruptible(&priv->MainThread.waitQ); + while (priv->MainThread.pid) + os_sched_timeout(1); + bt_proc_remove(priv); + clean_up_m_devs(priv); + bt_free_adapter(priv); + bt_priv_put(priv); + LEAVE(); + return ret; +} + +/** + * @brief request_firmware callback + * This function is invoked by request_firmware_nowait system call + * + * @param firmware A pointer to firmware structure + * @param context A Pointer to bt_private structure + * @return None + **/ +static void +sd_request_fw_callback(const struct firmware *firmware, void *context) +{ + ENTER(); + sd_request_fw_dpc(firmware, context); + LEAVE(); + return; +} + +/** + * @brief This function downloads firmware image to the card. + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS/BT_STATUS_FAILURE or other error no. + */ +int +sd_download_firmware_w_helper(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + int err; + char *cur_fw_name = NULL; + + ENTER(); + + cur_fw_name = fw_name; + if (fw_name == NULL) { + if (priv->card_type == CARD_TYPE_SD8787) + cur_fw_name = DEFAULT_FW_NAME_8787; + else if (priv->card_type == CARD_TYPE_SD8777) + cur_fw_name = DEFAULT_FW_NAME_8777; + else if (priv->card_type == CARD_TYPE_SD8887) { + /* Check revision ID */ + switch (priv->adapter->chip_rev) { + case SD8887_A0: + cur_fw_name = SD8887_A0_FW_NAME; + break; + case SD8887_A2: + if (bt_fw_serial == 1) + cur_fw_name = SD8887_A2_FW_NAME; + else + cur_fw_name = SD8887_A2_BT_FW_NAME; + break; + default: + cur_fw_name = DEFAULT_FW_NAME_8887; + break; + } + } else if (priv->card_type == CARD_TYPE_SD8897) + cur_fw_name = DEFAULT_FW_NAME_8897; + else if (priv->card_type == CARD_TYPE_SD8797) + cur_fw_name = DEFAULT_FW_NAME_8797; + } + + if (bt_req_fw_nowait) { +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) + ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, + cur_fw_name, priv->hotplug_device, + GFP_KERNEL, priv, + sd_request_fw_callback); +#else +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 13) + ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, + cur_fw_name, priv->hotplug_device, + priv, sd_request_fw_callback); +#else + ret = request_firmware_nowait(THIS_MODULE, + cur_fw_name, priv->hotplug_device, + priv, sd_request_fw_callback); +#endif +#endif + if (ret < 0) + PRINTM(FATAL, + "BT: request_firmware_nowait() failed, error code = %#x\n", + ret); + } else { + err = request_firmware(&priv->firmware, cur_fw_name, + priv->hotplug_device); + if (err < 0) { + PRINTM(FATAL, + "BT: request_firmware() failed, error code = %#x\n", + err); + ret = BT_STATUS_FAILURE; + } else + ret = sd_request_fw_dpc(priv->firmware, priv); + } + + LEAVE(); + return ret; +} + +/** + * @brief This function reads data from the card. + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int +sd_card_to_host(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + u16 buf_len = 0; + int buf_block_len; + int blksz; + struct sk_buff *skb = NULL; + u32 type; + u8 *payload = NULL; + struct hci_dev *hdev = NULL; + struct m_dev *mdev_fm = &(priv->bt_dev.m_dev[FM_SEQ]); + struct m_dev *mdev_nfc = &(priv->bt_dev.m_dev[NFC_SEQ]); + struct nfc_dev *nfc_dev = + (struct nfc_dev *)priv->bt_dev.m_dev[NFC_SEQ].dev_pointer; + struct fm_dev *fm_dev = + (struct fm_dev *)priv->bt_dev.m_dev[FM_SEQ].dev_pointer; + struct sdio_mmc_card *card = priv->bt_dev.card; + + ENTER(); + if (priv->bt_dev.m_dev[BT_SEQ].spec_type == BLUEZ_SPEC) + hdev = (struct hci_dev *)priv->bt_dev.m_dev[BT_SEQ].dev_pointer; + if (!card || !card->func) { + PRINTM(ERROR, "BT: card or function is NULL!\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + + /* Read the length of data to be transferred */ + ret = sd_read_rx_len(priv, &buf_len); + if (ret < 0) { + PRINTM(ERROR, "BT: card_to_host, read scratch reg failed\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + + /* Allocate buffer */ + blksz = SD_BLOCK_SIZE; + buf_block_len = (buf_len + blksz - 1) / blksz; + if (buf_len <= BT_HEADER_LEN || + (buf_block_len * blksz) > ALLOC_BUF_SIZE) { + PRINTM(ERROR, "BT: card_to_host, invalid packet length: %d\n", + buf_len); + ret = BT_STATUS_FAILURE; + goto exit; + } + skb = bt_skb_alloc(buf_block_len * blksz + DMA_ALIGNMENT, GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "BT: No free skb\n"); + goto exit; + } + if ((t_ptr)skb->data & (DMA_ALIGNMENT - 1)) { + skb_put(skb, + DMA_ALIGNMENT - + ((t_ptr)skb->data & (DMA_ALIGNMENT - 1))); + skb_pull(skb, + DMA_ALIGNMENT - + ((t_ptr)skb->data & (DMA_ALIGNMENT - 1))); + } + + payload = skb->data; + ret = sdio_readsb(card->func, payload, priv->bt_dev.ioport, + buf_block_len * blksz); + if (ret < 0) { + PRINTM(ERROR, "BT: card_to_host, read iomem failed: %d\n", ret); + kfree_skb(skb); + skb = NULL; + ret = BT_STATUS_FAILURE; + goto exit; + } + /* This is SDIO specific header length: byte[2][1][0], * type: byte[3] + (HCI_COMMAND = 1, ACL_DATA = 2, SCO_DATA = 3, 0xFE = Vendor) */ + buf_len = payload[0]; + buf_len |= (u16) payload[1] << 8; + type = payload[3]; + PRINTM(DATA, "BT: SDIO Blk Rd %s: len=%d type=%d\n", hdev->name, + buf_len, type); + if (buf_len > buf_block_len * blksz) { + PRINTM(ERROR, + "BT: Drop invalid rx pkt, len in hdr=%d, cmd53 length=%d\n", + buf_len, buf_block_len * blksz); + ret = BT_STATUS_FAILURE; + kfree_skb(skb); + skb = NULL; + goto exit; + } + DBG_HEXDUMP(DAT_D, "BT: SDIO Blk Rd", payload, buf_len); + switch (type) { + case HCI_ACLDATA_PKT: + bt_cb(skb)->pkt_type = type; + skb_put(skb, buf_len); + skb_pull(skb, BT_HEADER_LEN); + if (hdev) { + skb->dev = (void *)hdev; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + hci_recv_frame(skb); +#else + hci_recv_frame(hdev, skb); +#endif + hdev->stat.byte_rx += buf_len; + } + break; + case HCI_SCODATA_PKT: + bt_cb(skb)->pkt_type = type; + skb_put(skb, buf_len); + skb_pull(skb, BT_HEADER_LEN); + if (hdev) { + skb->dev = (void *)hdev; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + hci_recv_frame(skb); +#else + hci_recv_frame(hdev, skb); +#endif + hdev->stat.byte_rx += buf_len; + } + break; + case HCI_EVENT_PKT: + /** add EVT Demux */ + bt_cb(skb)->pkt_type = type; + skb_put(skb, buf_len); + skb_pull(skb, BT_HEADER_LEN); + if (BT_STATUS_SUCCESS == check_evtpkt(priv, skb)) + break; + switch (skb->data[0]) { + case 0x0E: + /** cmd complete */ + if (skb->data[3] == 0x80 && skb->data[4] == 0xFE) { + /** FM cmd complete */ + if (fm_dev) { + skb->dev = (void *)mdev_fm; + mdev_recv_frame(skb); + mdev_fm->stat.byte_rx += buf_len; + } + } else if (skb->data[3] == 0x81 && skb->data[4] == 0xFE) { + /** NFC cmd complete */ + if (nfc_dev) { + skb->dev = (void *)mdev_nfc; + mdev_recv_frame(skb); + mdev_nfc->stat.byte_rx += buf_len; + } + } else { + if (hdev) { + skb->dev = (void *)hdev; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + hci_recv_frame(skb); +#else + hci_recv_frame(hdev, skb); +#endif + hdev->stat.byte_rx += buf_len; + } + } + break; + case 0x0F: + /** cmd status */ + if (skb->data[4] == 0x80 && skb->data[5] == 0xFE) { + /** FM cmd ststus */ + if (fm_dev) { + skb->dev = (void *)mdev_fm; + mdev_recv_frame(skb); + mdev_fm->stat.byte_rx += buf_len; + } + } else if (skb->data[4] == 0x81 && skb->data[5] == 0xFE) { + /** NFC cmd ststus */ + if (nfc_dev) { + skb->dev = (void *)mdev_nfc; + mdev_recv_frame(skb); + mdev_nfc->stat.byte_rx += buf_len; + } + } else { + /** BT cmd status */ + if (hdev) { + skb->dev = (void *)hdev; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + hci_recv_frame(skb); +#else + hci_recv_frame(hdev, skb); +#endif + hdev->stat.byte_rx += buf_len; + } + } + break; + case 0xFF: + /** Vendor specific pkt */ + if (skb->data[2] == 0xC0) { + /** NFC EVT */ + if (nfc_dev) { + skb->dev = (void *)mdev_nfc; + mdev_recv_frame(skb); + mdev_nfc->stat.byte_rx += buf_len; + } + } else if (skb->data[2] >= 0x80 && skb->data[2] <= 0xAF) { + /** FM EVT */ + if (fm_dev) { + skb->dev = (void *)mdev_fm; + mdev_recv_frame(skb); + mdev_fm->stat.byte_rx += buf_len; + } + } else { + /** BT EVT */ + if (hdev) { + skb->dev = (void *)hdev; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + hci_recv_frame(skb); +#else + hci_recv_frame(hdev, skb); +#endif + hdev->stat.byte_rx += buf_len; + } + } + break; + default: + /** BT EVT */ + if (hdev) { + skb->dev = (void *)hdev; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + hci_recv_frame(skb); +#else + hci_recv_frame(hdev, skb); +#endif + hdev->stat.byte_rx += buf_len; + } + break; + } + break; + case MRVL_VENDOR_PKT: + /* Just think here need to back compatible FM */ + bt_cb(skb)->pkt_type = HCI_VENDOR_PKT; + skb_put(skb, buf_len); + skb_pull(skb, BT_HEADER_LEN); + if (hdev) { + if (BT_STATUS_SUCCESS != bt_process_event(priv, skb)) { + skb->dev = (void *)hdev; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + hci_recv_frame(skb); +#else + hci_recv_frame(hdev, skb); +#endif + hdev->stat.byte_rx += buf_len; + } + } + + break; + default: + /* Driver specified event and command resp should be handle + here */ + PRINTM(INFO, "BT: Unknown PKT type:%d\n", type); + kfree_skb(skb); + skb = NULL; + break; + } +exit: + if (ret) { + if (hdev) + hdev->stat.err_rx++; + PRINTM(ERROR, "error when recv pkt!\n"); + } + + LEAVE(); + return ret; +} + +/** + * @brief This function removes the card + * + * @param func A pointer to sdio_func structure + * @return N/A + */ +static void +sd_remove_card(struct sdio_func *func) +{ + struct sdio_mmc_card *card; + + ENTER(); + + if (func) { + card = sdio_get_drvdata(func); + if (card) { + if (!unregister && card->priv) { + PRINTM(INFO, "BT: card removed from sd slot\n"); + ((bt_private *)(card->priv))->adapter-> + SurpriseRemoved = TRUE; + } + bt_remove_card(card->priv); + kfree(card); + } + } + + LEAVE(); +} + +/** + * @brief This function handles the interrupt. + * + * @param func A pointer to sdio_func structure + * @return N/A + */ +static void +sd_interrupt(struct sdio_func *func) +{ + bt_private *priv; + struct m_dev *m_dev = NULL; + struct sdio_mmc_card *card; + int ret = BT_STATUS_SUCCESS; + u8 ireg = 0; + u8 host_intstatus_reg = 0; + + ENTER(); + + card = sdio_get_drvdata(func); + if (!card || !card->priv) { + PRINTM(INFO, + "BT: %s: sbi_interrupt(%p) card or priv is NULL, card=%p\n", + __func__, func, card); + LEAVE(); + return; + } + priv = card->priv; + host_intstatus_reg = priv->psdio_device->reg->host_intstatus; + m_dev = &(priv->bt_dev.m_dev[BT_SEQ]); + if (priv->card_type == CARD_TYPE_SD8887 || + priv->card_type == CARD_TYPE_SD8897) { + ret = sdio_readsb(card->func, priv->adapter->hw_regs, 0, + SD_BLOCK_SIZE); + if (ret) { + PRINTM(ERROR, + "BT: sdio_read_ioreg: cmd53 read int status register failed %d\n", + ret); + goto done; + } + ireg = priv->adapter->hw_regs[host_intstatus_reg]; + } else { + ireg = sdio_readb(card->func, host_intstatus_reg, &ret); + } + if (ret) { + PRINTM(ERROR, + "BT: sdio_read_ioreg: CMD52 read int status register failed %d\n", + ret); + goto done; + } + if (ireg != 0) { + /* + * DN_LD_HOST_INT_STATUS and/or UP_LD_HOST_INT_STATUS + * Clear the interrupt status register and re-enable + * the interrupt + */ + PRINTM(INTR, "BT: INT %s: sdio_ireg = 0x%x\n", m_dev->name, + ireg); + priv->adapter->irq_recv = ireg; + if (priv->card_type != CARD_TYPE_SD8887 && + priv->card_type != CARD_TYPE_SD8897 && + priv->card_type != CARD_TYPE_SD8797) { + sdio_writeb(card->func, + ~(ireg) & (DN_LD_HOST_INT_STATUS | + UP_LD_HOST_INT_STATUS), + host_intstatus_reg, &ret); + if (ret) { + PRINTM(ERROR, + "BT: sdio_write_ioreg: clear int status register failed\n"); + goto done; + } + } + } else { + PRINTM(ERROR, "BT: ERR: ireg=0\n"); + } + OS_INT_DISABLE; + priv->adapter->sd_ireg |= ireg; + OS_INT_RESTORE; + bt_interrupt(m_dev); +done: + LEAVE(); +} + +/** + * @brief This function checks if the interface is ready to download + * or not while other download interfaces are present + * + * @param priv A pointer to bt_private structure + * @param val Winner status (0: winner) + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +sd_check_winner_status(bt_private *priv, u8 *val) +{ + + int ret = BT_STATUS_SUCCESS; + u8 winner = 0; + struct sdio_mmc_card *cardp = (struct sdio_mmc_card *)priv->bt_dev.card; + u8 card_fw_status0_reg = priv->psdio_device->reg->card_fw_status0; + + ENTER(); + winner = sdio_readb(cardp->func, card_fw_status0_reg, &ret); + if (ret != BT_STATUS_SUCCESS) { + LEAVE(); + return BT_STATUS_FAILURE; + } + *val = winner; + + LEAVE(); + return ret; +} + +#ifdef SDIO_SUSPEND_RESUME +#ifdef MMC_PM_KEEP_POWER +#ifdef MMC_PM_FUNC_SUSPENDED +/** @brief This function tells lower driver that BT is suspended + * + * @param priv A pointer to bt_private structure + * @return None + */ +void +bt_is_suspended(bt_private *priv) +{ + struct sdio_mmc_card *card = priv->bt_dev.card; + priv->adapter->is_suspended = TRUE; + sdio_func_suspended(card->func); +} +#endif + +/** @brief This function handles client driver suspend + * + * @param dev A pointer to device structure + * @return BT_STATUS_SUCCESS or other error no. + */ +int +bt_sdio_suspend(struct device *dev) +{ + struct sdio_func *func = dev_to_sdio_func(dev); + mmc_pm_flag_t pm_flags = 0; + bt_private *priv = NULL; + struct sdio_mmc_card *cardp; + struct m_dev *m_dev = NULL; + struct hci_dev *hcidev; + + ENTER(); + + pm_flags = sdio_get_host_pm_caps(func); + PRINTM(CMD, "BT: %s: suspend: PM flags = 0x%x\n", sdio_func_id(func), + pm_flags); + if (!(pm_flags & MMC_PM_KEEP_POWER)) { + PRINTM(ERROR, + "BT: %s: cannot remain alive while host is suspended\n", + sdio_func_id(func)); + return -ENOSYS; + } + cardp = sdio_get_drvdata(func); + if (!cardp || !cardp->priv) { + PRINTM(ERROR, "BT: Card or priv structure is not valid\n"); + LEAVE(); + return BT_STATUS_SUCCESS; + } + + priv = cardp->priv; + + if ((mbt_pm_keep_power) && (priv->adapter->hs_state != HS_ACTIVATED)) { + /* disable FM event mask */ + if ((priv->bt_dev.m_dev[FM_SEQ].dev_type == FM_TYPE) && + test_bit(HCI_RUNNING, &(priv->bt_dev.m_dev[FM_SEQ].flags))) + fm_set_intr_mask(priv, FM_DISABLE_INTR_MASK); + if (BT_STATUS_SUCCESS != bt_enable_hs(priv)) { + PRINTM(CMD, "BT: HS not actived, suspend fail!\n"); + if (BT_STATUS_SUCCESS != bt_enable_hs(priv)) { + PRINTM(CMD, + "BT: HS not actived the second time, force to suspend!\n"); + } + } + } + m_dev = &(priv->bt_dev.m_dev[BT_SEQ]); + PRINTM(CMD, "BT %s: SDIO suspend\n", m_dev->name); + hcidev = (struct hci_dev *)m_dev->dev_pointer; + hci_suspend_dev(hcidev); + skb_queue_purge(&priv->adapter->tx_queue); + + priv->adapter->is_suspended = TRUE; + + LEAVE(); + /* We will keep the power when hs enabled successfully */ + if ((mbt_pm_keep_power) && (priv->adapter->hs_state == HS_ACTIVATED)) { +#ifdef MMC_PM_SKIP_RESUME_PROBE + PRINTM(CMD, "BT: suspend with MMC_PM_KEEP_POWER and " + "MMC_PM_SKIP_RESUME_PROBE\n"); + return sdio_set_host_pm_flags(func, + MMC_PM_KEEP_POWER | + MMC_PM_SKIP_RESUME_PROBE); +#else + PRINTM(CMD, "BT: suspend with MMC_PM_KEEP_POWER\n"); + return sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); +#endif + } else { + PRINTM(CMD, "BT: suspend without MMC_PM_KEEP_POWER\n"); + return BT_STATUS_SUCCESS; + } +} + +/** @brief This function handles client driver resume + * + * @param dev A pointer to device structure + * @return BT_STATUS_SUCCESS + */ +int +bt_sdio_resume(struct device *dev) +{ + struct sdio_func *func = dev_to_sdio_func(dev); + mmc_pm_flag_t pm_flags = 0; + bt_private *priv = NULL; + struct sdio_mmc_card *cardp; + struct m_dev *m_dev = NULL; + struct hci_dev *hcidev; + + ENTER(); + pm_flags = sdio_get_host_pm_caps(func); + PRINTM(CMD, "BT: %s: resume: PM flags = 0x%x\n", sdio_func_id(func), + pm_flags); + cardp = sdio_get_drvdata(func); + if (!cardp || !cardp->priv) { + PRINTM(ERROR, "BT: Card or priv structure is not valid\n"); + LEAVE(); + return BT_STATUS_SUCCESS; + } + + priv = cardp->priv; + priv->adapter->is_suspended = FALSE; + m_dev = &(priv->bt_dev.m_dev[BT_SEQ]); + PRINTM(CMD, "BT %s: SDIO resume\n", m_dev->name); + hcidev = (struct hci_dev *)m_dev->dev_pointer; + hci_resume_dev(hcidev); + sbi_wakeup_firmware(priv); + /* enable FM event mask */ + if ((priv->bt_dev.m_dev[FM_SEQ].dev_type == FM_TYPE) && + test_bit(HCI_RUNNING, &(priv->bt_dev.m_dev[FM_SEQ].flags))) + fm_set_intr_mask(priv, FM_DEFAULT_INTR_MASK); + priv->adapter->hs_state = HS_DEACTIVATED; + PRINTM(CMD, "BT:%s: HS DEACTIVATED in Resume!\n", m_dev->name); + LEAVE(); + return BT_STATUS_SUCCESS; +} +#endif +#endif + +/******************************************************** + Global Functions +********************************************************/ +#ifdef SDIO_SUSPEND_RESUME +#ifdef MMC_PM_KEEP_POWER +static const struct dev_pm_ops bt_sdio_pm_ops = { + .suspend = bt_sdio_suspend, + .resume = bt_sdio_resume, +}; +#endif +#endif +static struct sdio_driver sdio_bt = { + .name = "sdio_bt", + .id_table = bt_ids, + .probe = sd_probe_card, + .remove = sd_remove_card, +#ifdef SDIO_SUSPEND_RESUME +#ifdef MMC_PM_KEEP_POWER + .drv = { + .pm = &bt_sdio_pm_ops, + } +#endif +#endif +}; + +/** + * @brief This function registers the bt module in bus driver. + * + * @return An int pointer that keeps returned value + */ +int * +sbi_register(void) +{ + int *ret; + + ENTER(); + + if (sdio_register_driver(&sdio_bt) != 0) { + PRINTM(FATAL, "BT: SD Driver Registration Failed\n"); + LEAVE(); + return NULL; + } else + ret = (int *)1; + + LEAVE(); + return ret; +} + +/** + * @brief This function de-registers the bt module in bus driver. + * + * @return N/A + */ +void +sbi_unregister(void) +{ + ENTER(); + unregister = TRUE; + sdio_unregister_driver(&sdio_bt); + LEAVE(); +} + +/** + * @brief This function registers the device. + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +sbi_register_dev(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + u8 reg; + u8 chiprev; + struct sdio_mmc_card *card = priv->bt_dev.card; + struct sdio_func *func; + u8 host_intstatus_reg = priv->psdio_device->reg->host_intstatus; + u8 host_int_rsr_reg = priv->psdio_device->reg->host_int_rsr_reg; + u8 card_misc_cfg_reg = priv->psdio_device->reg->card_misc_cfg_reg; + u8 card_revision_reg = priv->psdio_device->reg->card_revision; + u8 io_port_0_reg = priv->psdio_device->reg->io_port_0; + u8 io_port_1_reg = priv->psdio_device->reg->io_port_1; + u8 io_port_2_reg = priv->psdio_device->reg->io_port_2; + + ENTER(); + + if (!card || !card->func) { + PRINTM(ERROR, "BT: Error: card or function is NULL!\n"); + goto failed; + } + func = card->func; + priv->hotplug_device = &func->dev; + + /* Initialize the private structure */ + strncpy(priv->bt_dev.name, "bt_sdio0", sizeof(priv->bt_dev.name)); + priv->bt_dev.ioport = 0; + priv->bt_dev.fn = func->num; + + sdio_claim_host(func); + ret = sdio_claim_irq(func, sd_interrupt); + if (ret) { + PRINTM(FATAL, ": sdio_claim_irq failed: ret=%d\n", ret); + goto release_host; + } + ret = sdio_set_block_size(card->func, SD_BLOCK_SIZE); + if (ret) { + PRINTM(FATAL, ": %s: cannot set SDIO block size\n", __func__); + goto release_irq; + } + + /* read Revision Register to get the chip revision number */ + chiprev = sdio_readb(func, card_revision_reg, &ret); + if (ret) { + PRINTM(FATAL, ": cannot read CARD_REVISION_REG\n"); + goto release_irq; + } + priv->adapter->chip_rev = chiprev; + PRINTM(INFO, "revision=%#x\n", chiprev); + + /* + * Read the HOST_INTSTATUS_REG for ACK the first interrupt got + * from the bootloader. If we don't do this we get a interrupt + * as soon as we register the irq. + */ + reg = sdio_readb(func, host_intstatus_reg, &ret); + if (ret < 0) + goto release_irq; + + /* Read the IO port */ + reg = sdio_readb(func, io_port_0_reg, &ret); + if (ret < 0) + goto release_irq; + else + priv->bt_dev.ioport |= reg; + + reg = sdio_readb(func, io_port_1_reg, &ret); + if (ret < 0) + goto release_irq; + else + priv->bt_dev.ioport |= (reg << 8); + + reg = sdio_readb(func, io_port_2_reg, &ret); + if (ret < 0) + goto release_irq; + else + priv->bt_dev.ioport |= (reg << 16); + + PRINTM(INFO, ": SDIO FUNC%d IO port: 0x%x\n", priv->bt_dev.fn, + priv->bt_dev.ioport); +#define SDIO_INT_MASK 0x3F + if (priv->card_type == CARD_TYPE_SD8887 || + priv->card_type == CARD_TYPE_SD8897 || + priv->card_type == CARD_TYPE_SD8797) { + /* Set Host interrupt reset to read to clear */ + reg = sdio_readb(func, host_int_rsr_reg, &ret); + if (ret < 0) + goto release_irq; + sdio_writeb(func, reg | SDIO_INT_MASK, host_int_rsr_reg, &ret); + if (ret < 0) + goto release_irq; + /* Set auto re-enable */ + reg = sdio_readb(func, card_misc_cfg_reg, &ret); + if (ret < 0) + goto release_irq; + sdio_writeb(func, reg | AUTO_RE_ENABLE_INT, card_misc_cfg_reg, + &ret); + if (ret < 0) + goto release_irq; + } + + sdio_set_drvdata(func, card); + sdio_release_host(func); + + LEAVE(); + return BT_STATUS_SUCCESS; +release_irq: + sdio_release_irq(func); +release_host: + sdio_release_host(func); +failed: + + LEAVE(); + return BT_STATUS_FAILURE; +} + +/** + * @brief This function de-registers the device. + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS + */ +int +sbi_unregister_dev(bt_private *priv) +{ + struct sdio_mmc_card *card = priv->bt_dev.card; + + ENTER(); + + if (card && card->func) { + sdio_claim_host(card->func); + sdio_release_irq(card->func); + sdio_disable_func(card->func); + sdio_release_host(card->func); + sdio_set_drvdata(card->func, NULL); + } + + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function enables the host interrupts. + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +sd_enable_host_int(bt_private *priv) +{ + struct sdio_mmc_card *card = priv->bt_dev.card; + int ret; + + ENTER(); + + if (!card || !card->func) { + LEAVE(); + return BT_STATUS_FAILURE; + } + sdio_claim_host(card->func); + ret = sd_enable_host_int_mask(priv, HIM_ENABLE); + sd_get_rx_unit(priv); + sdio_release_host(card->func); + + LEAVE(); + return ret; +} + +/** + * @brief This function disables the host interrupts. + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS/BT_STATUS_FAILURE or other error no. + */ +int +sd_disable_host_int(bt_private *priv) +{ + struct sdio_mmc_card *card = priv->bt_dev.card; + int ret; + + ENTER(); + + if (!card || !card->func) { + LEAVE(); + return BT_STATUS_FAILURE; + } + sdio_claim_host(card->func); + ret = sd_disable_host_int_mask(priv, HIM_DISABLE); + sdio_release_host(card->func); + + LEAVE(); + return ret; +} + +/** + * @brief This function sends data to the card. + * + * @param priv A pointer to bt_private structure + * @param payload A pointer to the data/cmd buffer + * @param nb Length of data/cmd + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +sbi_host_to_card(bt_private *priv, u8 *payload, u16 nb) +{ + struct sdio_mmc_card *card = priv->bt_dev.card; + struct m_dev *m_dev = &(priv->bt_dev.m_dev[BT_SEQ]); + int ret = BT_STATUS_SUCCESS; + int buf_block_len; + int blksz; + int i = 0; + u8 *buf = NULL; + void *tmpbuf = NULL; + int tmpbufsz; + + ENTER(); + + if (!card || !card->func) { + PRINTM(ERROR, "BT: card or function is NULL!\n"); + LEAVE(); + return BT_STATUS_FAILURE; + } + buf = payload; + + blksz = SD_BLOCK_SIZE; + buf_block_len = (nb + blksz - 1) / blksz; + /* Allocate buffer and copy payload */ + if ((t_ptr)payload & (DMA_ALIGNMENT - 1)) { + tmpbufsz = buf_block_len * blksz + DMA_ALIGNMENT; + tmpbuf = kzalloc(tmpbufsz, GFP_KERNEL); + if (!tmpbuf) { + LEAVE(); + return BT_STATUS_FAILURE; + } + /* Ensure 8-byte aligned CMD buffer */ + buf = (u8 *)ALIGN_ADDR(tmpbuf, DMA_ALIGNMENT); + memcpy(buf, payload, nb); + } + sdio_claim_host(card->func); +#define MAX_WRITE_IOMEM_RETRY 2 + do { + /* Transfer data to card */ + ret = sdio_writesb(card->func, priv->bt_dev.ioport, buf, + buf_block_len * blksz); + if (ret < 0) { + i++; + PRINTM(ERROR, + "BT: host_to_card, write iomem (%d) failed: %d\n", + i, ret); + if ((priv->card_type == CARD_TYPE_SD8887) || + (priv->card_type == CARD_TYPE_SD8897)) + break; + sdio_writeb(card->func, HOST_WO_CMD53_FINISH_HOST, + CONFIGURATION_REG, &ret); + udelay(20); + ret = BT_STATUS_FAILURE; + if (i > MAX_WRITE_IOMEM_RETRY) + goto exit; + } else { + PRINTM(DATA, "BT: SDIO Blk Wr %s: len=%d\n", + m_dev->name, nb); + DBG_HEXDUMP(DAT_D, "BT: SDIO Blk Wr", payload, nb); + } + } while (ret == BT_STATUS_FAILURE); + priv->bt_dev.tx_dnld_rdy = FALSE; +exit: + sdio_release_host(card->func); + kfree(tmpbuf); + LEAVE(); + return ret; +} + +/** + * @brief This function downloads firmware + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +sbi_download_fw(bt_private *priv) +{ + struct sdio_mmc_card *card = priv->bt_dev.card; + int ret = BT_STATUS_SUCCESS; + u8 winner = 0; + + ENTER(); + + if (!card || !card->func) { + PRINTM(ERROR, "BT: card or function is NULL!\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + + sdio_claim_host(card->func); + if (BT_STATUS_SUCCESS == sd_verify_fw_download(priv, 1)) { + PRINTM(MSG, "BT: FW already downloaded!\n"); + sdio_release_host(card->func); + sd_enable_host_int(priv); + if (BT_STATUS_FAILURE == sbi_register_conf_dpc(priv)) { + PRINTM(ERROR, + "BT: sbi_register_conf_dpc failed. Terminating download\n"); + ret = BT_STATUS_FAILURE; + goto err_register; + } + goto exit; + } + /* Check if other interface is downloading */ + ret = sd_check_winner_status(priv, &winner); + if (ret == BT_STATUS_FAILURE) { + PRINTM(FATAL, "BT read winner status failed!\n"); + goto done; + } + if (winner) { + PRINTM(MSG, "BT is not the winner (0x%x). Skip FW download\n", + winner); + /* check if the fimware is downloaded successfully or not */ + if (sd_verify_fw_download(priv, MAX_MULTI_INTERFACE_POLL_TRIES)) { + PRINTM(FATAL, "BT: FW failed to be active in time!\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + sdio_release_host(card->func); + sd_enable_host_int(priv); + if (BT_STATUS_FAILURE == sbi_register_conf_dpc(priv)) { + PRINTM(ERROR, + "BT: sbi_register_conf_dpc failed. Terminating download\n"); + ret = BT_STATUS_FAILURE; + goto err_register; + } + goto exit; + } + + do_gettimeofday(&priv->req_fw_time); + /* Download the main firmware via the helper firmware */ + if (sd_download_firmware_w_helper(priv)) { + PRINTM(INFO, "BT: FW download failed!\n"); + ret = BT_STATUS_FAILURE; + } + goto exit; +done: + sdio_release_host(card->func); +exit: + LEAVE(); + return ret; +err_register: + LEAVE(); + return ret; +} + +/** + * @brief This function checks the interrupt status and handle it accordingly. + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS + */ +int +sbi_get_int_status(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + u8 sdio_ireg = 0; + struct sdio_mmc_card *card = priv->bt_dev.card; + + ENTER(); + + OS_INT_DISABLE; + sdio_ireg = priv->adapter->sd_ireg; + priv->adapter->sd_ireg = 0; + OS_INT_RESTORE; + sdio_claim_host(card->func); + priv->adapter->irq_done = sdio_ireg; + if (sdio_ireg & DN_LD_HOST_INT_STATUS) { /* tx_done INT */ + if (priv->bt_dev.tx_dnld_rdy) { /* tx_done already received */ + PRINTM(INFO, + "BT: warning: tx_done already received: tx_dnld_rdy=0x%x int status=0x%x\n", + priv->bt_dev.tx_dnld_rdy, sdio_ireg); + } else { + priv->bt_dev.tx_dnld_rdy = TRUE; + } + } + if (sdio_ireg & UP_LD_HOST_INT_STATUS) + sd_card_to_host(priv); + + ret = BT_STATUS_SUCCESS; + sdio_release_host(card->func); + LEAVE(); + return ret; +} + +/** + * @brief This function wakeup firmware + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS/BT_STATUS_FAILURE or other error no. + */ +int +sbi_wakeup_firmware(bt_private *priv) +{ + struct sdio_mmc_card *card = priv->bt_dev.card; + int ret = BT_STATUS_SUCCESS; + + ENTER(); + + if (!card || !card->func) { + PRINTM(ERROR, "BT: card or function is NULL!\n"); + LEAVE(); + return BT_STATUS_FAILURE; + } + sdio_claim_host(card->func); + sdio_writeb(card->func, HOST_POWER_UP, CONFIGURATION_REG, &ret); + sdio_release_host(card->func); + PRINTM(CMD, "BT wake up firmware\n"); + + LEAVE(); + return ret; +} + +/** @brief This function updates the SDIO card types + * + * @param priv A Pointer to the bt_private structure + * @param card A Pointer to card + * + * @return N/A + */ +void +sdio_update_card_type(bt_private *priv, void *card) +{ + struct sdio_mmc_card *cardp = (struct sdio_mmc_card *)card; + + /* Update card type */ + if (cardp->func->device == SD_DEVICE_ID_8777_BT_FN2 || + cardp->func->device == SD_DEVICE_ID_8777_BT_FN3) + priv->card_type = CARD_TYPE_SD8777; + else if (cardp->func->device == SD_DEVICE_ID_8787_BT_FN2 || + cardp->func->device == SD_DEVICE_ID_8787_BT_FN3) + priv->card_type = CARD_TYPE_SD8787; + else if (cardp->func->device == SD_DEVICE_ID_8887_BT_FN2 || + cardp->func->device == SD_DEVICE_ID_8887_BT_FN3) + priv->card_type = CARD_TYPE_SD8887; + else if (cardp->func->device == SD_DEVICE_ID_8897_BT_FN2 || + cardp->func->device == SD_DEVICE_ID_8897_BT_FN3) + priv->card_type = CARD_TYPE_SD8897; + else if (cardp->func->device == SD_DEVICE_ID_8797_BT_FN2 || + cardp->func->device == SD_DEVICE_ID_8797_BT_FN3) + priv->card_type = CARD_TYPE_SD8797; +} + +/** + * @brief This function get sdio device from card type + * + * @param pmadapter A pointer to mlan_adapter structure + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +int +sdio_get_sdio_device(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + u16 card_type = priv->card_type; + + ENTER(); + + switch (card_type) { + case CARD_TYPE_SD8777: + priv->psdio_device = &bt_sdio_sd8777; + break; + case CARD_TYPE_SD8787: + priv->psdio_device = &bt_sdio_sd8787; + break; + case CARD_TYPE_SD8887: + priv->psdio_device = &bt_sdio_sd8887; + break; + case CARD_TYPE_SD8897: + priv->psdio_device = &bt_sdio_sd8897; + break; + case CARD_TYPE_SD8797: + priv->psdio_device = &bt_sdio_sd8797; + break; + default: + PRINTM(ERROR, "BT can't get right card type \n"); + ret = BT_STATUS_FAILURE; + break; + } + + LEAVE(); + return ret; +} + +/** @brief This function dump the SDIO register + * + * @param priv A Pointer to the bt_private structure + * + * @return N/A + */ +void +bt_dump_sdio_regs(bt_private *priv) +{ + struct sdio_mmc_card *card = priv->bt_dev.card; + int ret = BT_STATUS_SUCCESS; + char buf[256], *ptr; + u8 loop, func, data; + unsigned int reg, reg_start, reg_end; + u8 index = 0; + unsigned int reg_table_8887[] = { 0x58, 0x59, 0x5c, 0x60, 0x64, 0x70, + 0x71, 0x72, 0x73, 0xd8, 0xd9, 0xda + }; + u8 loop_num = 0; + unsigned int *reg_table = NULL; + u8 reg_table_size = 0; + if (priv->card_type == CARD_TYPE_SD8887) { + loop_num = 3; + reg_table = reg_table_8887; + reg_table_size = sizeof(reg_table_8887) / sizeof(int); + } else + loop_num = 2; + if (priv->adapter->ps_state) + sbi_wakeup_firmware(priv); + + sdio_claim_host(card->func); + for (loop = 0; loop < loop_num; loop++) { + memset(buf, 0, sizeof(buf)); + ptr = buf; + if (loop == 0) { + /* Read the registers of SDIO function0 */ + func = loop; + reg_start = 0; + reg_end = 9; + + } else if (loop == 2) { + /* Read specific registers of SDIO function1 */ + index = 0; + func = 2; + reg_start = reg_table[index++]; + reg_end = reg_table[reg_table_size - 1]; + } else { + func = 2; + reg_start = 0; + reg_end = 0x09; + } + if (loop == 2) + ptr += sprintf(ptr, "SDIO Func%d: ", func); + else + ptr += sprintf(ptr, "SDIO Func%d (%#x-%#x): ", func, + reg_start, reg_end); + for (reg = reg_start; reg <= reg_end;) { + if (func == 0) + data = sdio_f0_readb(card->func, reg, &ret); + else + data = sdio_readb(card->func, reg, &ret); + if (loop == 2) + ptr += sprintf(ptr, "(%#x)", reg); + if (!ret) + ptr += sprintf(ptr, "%02x ", data); + else { + ptr += sprintf(ptr, "ERR"); + break; + } + if (loop == 2 && reg < reg_end) + reg = reg_table[index++]; + else + reg++; + } + PRINTM(MSG, "%s\n", buf); + } + sdio_release_host(card->func); +} + +module_param(fw_name, charp, 0); +MODULE_PARM_DESC(fw_name, "Firmware name"); +module_param(bt_req_fw_nowait, int, 0); +MODULE_PARM_DESC(bt_req_fw_nowait, + "0: Use request_firmware API; 1: Use request_firmware_nowait API"); +module_param(multi_fn, int, 0); +MODULE_PARM_DESC(multi_fn, "Bit 2: FN2;"); +module_param(bt_fw_serial, int, 0); +MODULE_PARM_DESC(bt_fw_serial, + "0: Support parallel download FW; 1: Support serial download FW"); diff --git a/arch/arm/mach-berlin/modules/bt_sd8887/bt/hci_wrapper.h b/arch/arm/mach-berlin/modules/bt_sd8887/bt/hci_wrapper.h new file mode 100644 index 00000000..50fba02f --- /dev/null +++ b/arch/arm/mach-berlin/modules/bt_sd8887/bt/hci_wrapper.h @@ -0,0 +1,175 @@ +/** @file hci_wrapper.h + * @brief This file contains HCI related definitions + * + * Copyright (C) 2011-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available along with the File in the gpl.txt file or by writing to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307 or on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#ifndef _HCI_WRAPPER_H_ +#define _HCI_WRAPPER_H_ + +#include +#include +#include + +/** Define Seq num */ +#define BT_SEQ 0 +#define FM_SEQ 1 +#define NFC_SEQ 2 + +/** Define dev type */ +#define BT_TYPE 1 +#define BT_AMP_TYPE 2 +#define FM_TYPE 3 +#define NFC_TYPE 4 + +/** Define spec type */ +#define BLUEZ_SPEC 1 +#define IANYWHERE_SPEC 2 +#define GENERIC_SPEC 3 + +/** Define lock/unlock wrapper */ +#define mdev_req_lock(d) down(&d->req_lock) +#define mdev_req_unlock(d) up(&d->req_lock) + +/** Length of device name */ +#define DEV_NAME_LEN 32 + +/** Define struct m_dev */ +struct m_dev { + char name[DEV_NAME_LEN]; + int index; + unsigned long flags; + spinlock_t lock; + struct semaphore req_lock; + struct sk_buff_head rx_q; + wait_queue_head_t req_wait_q; + struct hci_dev_stats stat; + struct module *owner; + void *dev_pointer; + int dev_type; + int spec_type; + void *driver_data; + int read_continue_flag; + int wait_rx_complete; + int rx_complete_flag; + wait_queue_head_t rx_wait_q; + + int (*open) (struct m_dev * m_dev); + int (*close) (struct m_dev * m_dev); + int (*flush) (struct m_dev * m_dev); + int (*send) (struct m_dev * m_dev, struct sk_buff * skb); + void (*destruct) (struct m_dev * m_dev); + void (*notify) (struct m_dev * m_dev, unsigned int evt); + int (*ioctl) (struct m_dev * m_dev, unsigned int cmd, void *arg); + void (*query) (struct m_dev * m_dev, void *arg); + +}; + +/** Define struct mbt_dev */ +struct mbt_dev { + /** maybe could add some private member later */ + char name[DEV_NAME_LEN]; + unsigned long flags; + __u8 type; + + __u16 pkt_type; + __u16 esco_type; + __u16 link_policy; + __u16 link_mode; + + __u32 idle_timeout; + __u16 sniff_min_interval; + __u16 sniff_max_interval; + + struct sk_buff *reassembly[3]; + + atomic_t promisc; +}; + +/** Define 'fm' interface specific struct fm_dev */ +struct fm_dev { + /** maybe could add some private member later */ + char name[DEV_NAME_LEN]; + unsigned long flags; +}; + +/** Define 'nfc' interface specific struct fm_dev */ +struct nfc_dev { + /** maybe could add some private member later */ + char name[DEV_NAME_LEN]; + unsigned long flags; +}; + +/** This function frees m_dev allocation */ +void free_m_dev(struct m_dev *m_dev); + +/** + * @brief This function receives frames + * + * @param skb A pointer to struct sk_buff + * @return 0--success otherwise error code + */ +static inline int +mdev_recv_frame(struct sk_buff *skb) +{ + struct m_dev *m_dev = (struct m_dev *)skb->dev; + if (!m_dev || (!test_bit(HCI_UP, &m_dev->flags) + && !test_bit(HCI_INIT, &m_dev->flags))) { + kfree_skb(skb); + return -ENXIO; + } + + /* Incomming skb */ + bt_cb(skb)->incoming = 1; + + /* Time stamp */ + __net_timestamp(skb); + + /* Queue frame for rx task */ + skb_queue_tail(&m_dev->rx_q, skb); + + /* Wakeup rx thread */ + wake_up_interruptible(&m_dev->req_wait_q); + + return 0; +} + +/** + * @brief mbt dev suspend handler + * + * @param m_dev A pointer to struct m_dev + * @return 0 + */ +static inline int +mbt_hci_suspend_dev(struct m_dev *m_dev) +{ + return 0; +} + +/** + * @brief mbt dev resume handler + * + * @param m_dev A pointer to struct m_dev + * @return 0 + */ +static inline int +mbt_hci_resume_dev(struct m_dev *m_dev) +{ + return 0; +} + +#endif /* _HCI_WRAPPER_H_ */ diff --git a/arch/arm/mach-berlin/modules/bt_sd8887/bt/mbt_char.c b/arch/arm/mach-berlin/modules/bt_sd8887/bt/mbt_char.c new file mode 100644 index 00000000..bc5e147a --- /dev/null +++ b/arch/arm/mach-berlin/modules/bt_sd8887/bt/mbt_char.c @@ -0,0 +1,765 @@ +/** @file mbt_char.c + * + * @brief This file contains the char device function calls + * + * Copyright (C) 2010-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#include +#include +#include + +#include "bt_drv.h" +#include "mbt_char.h" + +static LIST_HEAD(char_dev_list); + +static DEFINE_SPINLOCK(char_dev_list_lock); + +static int mbtchar_major = MBTCHAR_MAJOR_NUM; + +struct kobject * +chardev_get(struct char_dev *dev) +{ + struct kobject *kobj; + + kobj = bt_priv_get(dev->m_dev->driver_data); + if (!kobj) + return NULL; + PRINTM(INFO, "dev get kobj\n"); + kobj = kobject_get(&dev->kobj); + if (!kobj) + bt_priv_put(dev->m_dev->driver_data); + return kobj; +} + +void +chardev_put(struct char_dev *dev) +{ + if (dev) { + struct m_dev *m_dev = dev->m_dev; + PRINTM(INFO, "dev put kobj\n"); + kobject_put(&dev->kobj); + if (m_dev) + bt_priv_put(m_dev->driver_data); + } +} + +/** + * @brief Changes permissions of the dev + * + * @param name pointer to character + * @param mode mode_t type data + * @return 0--success otherwise failure + */ +int +mbtchar_chmod(char *name, mode_t mode) +{ + struct path path; + struct inode *inode; + struct iattr newattrs; + int ret; + int retrycount = 0; + + ENTER(); + do { + os_sched_timeout(30); + ret = kern_path(name, LOOKUP_FOLLOW, &path); + if (++retrycount >= 10) { + PRINTM(ERROR, + "mbtchar_chmod(): fail to get kern_path\n"); + LEAVE(); + return -EFAULT; + } + } while (ret); + inode = path.dentry->d_inode; + + mutex_lock(&inode->i_mutex); + ret = mnt_want_write(path.mnt); + if (ret) + goto out_unlock; + newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); + newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; + if (inode->i_op->setattr) + ret = inode->i_op->setattr(path.dentry, &newattrs); + else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) + ret = simple_setattr(path.dentry, &newattrs); +#else + ret = inode_setattr(inode, &newattrs); +#endif + + mutex_unlock(&inode->i_mutex); + mnt_drop_write(path.mnt); + + path_put(&path); + LEAVE(); + return ret; +out_unlock: + mutex_unlock(&inode->i_mutex); + mnt_drop_write(path.mnt); + path_put(&path); + return ret; +} + +/** + * @brief Changes ownership of the dev + * + * @param name pointer to character + * @param user uid_t type data + * @param group gid_t type data + * @return 0--success otherwise failure + */ +int +mbtchar_chown(char *name, uid_t user, gid_t group) +{ + struct path path; + struct inode *inode = NULL; + struct iattr newattrs; + int ret = 0; + int retrycount = 0; + + ENTER(); + do { + os_sched_timeout(30); + ret = kern_path(name, LOOKUP_FOLLOW, &path); + if (++retrycount >= 10) { + PRINTM(ERROR, + "mbtchar_chown(): fail to get kern_path\n"); + LEAVE(); + return -EFAULT; + } + } while (ret); + inode = path.dentry->d_inode; + mutex_lock(&inode->i_mutex); + ret = mnt_want_write(path.mnt); + if (ret) + goto out_unlock; + newattrs.ia_valid = ATTR_CTIME; + if (user != (uid_t) (-1)) { + newattrs.ia_valid |= ATTR_UID; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 5, 0) + newattrs.ia_uid = user; +#else + newattrs.ia_uid = KUIDT_INIT(user); +#endif + } + if (group != (gid_t) (-1)) { + newattrs.ia_valid |= ATTR_GID; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 5, 0) + newattrs.ia_gid = group; +#else + newattrs.ia_gid = KGIDT_INIT(group); +#endif + } + if (!S_ISDIR(inode->i_mode)) + newattrs.ia_valid |= + ATTR_KILL_SUID | ATTR_KILL_SGID | ATTR_KILL_PRIV; + if (inode->i_op->setattr) + ret = inode->i_op->setattr(path.dentry, &newattrs); + else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) + ret = simple_setattr(path.dentry, &newattrs); +#else + ret = inode_setattr(inode, &newattrs); +#endif + + mutex_unlock(&inode->i_mutex); + mnt_drop_write(path.mnt); + + path_put(&path); + LEAVE(); + return ret; +out_unlock: + mutex_unlock(&inode->i_mutex); + mnt_drop_write(path.mnt); + path_put(&path); + return ret; +} + +/** + * @brief write handler for char dev + * + * @param filp pointer to structure file + * @param buf pointer to char buffer + * @param count size of receive buffer + * @param f_pos pointer to loff_t type data + * @return number of bytes written + */ +ssize_t +chardev_write(struct file * filp, const char *buf, size_t count, loff_t * f_pos) +{ + int nwrite = 0; + struct sk_buff *skb; + struct char_dev *dev = (struct char_dev *)filp->private_data; + struct m_dev *m_dev = NULL; + + ENTER(); + + if (!dev || !dev->m_dev) { + LEAVE(); + return -ENXIO; + } + m_dev = dev->m_dev; + if (!test_bit(HCI_UP, &m_dev->flags)) { + LEAVE(); + return -EBUSY; + } + nwrite = count; + skb = bt_skb_alloc(count, GFP_ATOMIC); + if (!skb) { + PRINTM(ERROR, "mbtchar_write(): fail to alloc skb\n"); + LEAVE(); + return -ENOMEM; + } + + if (copy_from_user((void *)skb_put(skb, count), buf, count)) { + PRINTM(ERROR, "mbtchar_write(): cp_from_user failed\n"); + kfree_skb(skb); + nwrite = -EFAULT; + goto exit; + } + + skb->dev = (void *)m_dev; + bt_cb(skb)->pkt_type = *((unsigned char *)skb->data); + skb_pull(skb, 1); + + PRINTM(DATA, "Write: pkt_type: 0x%x, len=%d @%lu\n", + bt_cb(skb)->pkt_type, skb->len, jiffies); + DBG_HEXDUMP(DAT_D, "chardev_write", skb->data, skb->len); + + /* Send skb to the hci wrapper layer */ + if (m_dev->send(m_dev, skb)) { + PRINTM(ERROR, "Write: Fail\n"); + nwrite = 0; + /* Send failed */ + kfree_skb(skb); + } +exit: + LEAVE(); + return nwrite; +} + +/** + * @brief read handler for BT char dev + * + * @param filp pointer to structure file + * @param buf pointer to char buffer + * @param count size of receive buffer + * @param f_pos pointer to loff_t type data + * @return number of bytes read + */ +ssize_t +chardev_read(struct file * filp, char *buf, size_t count, loff_t * f_pos) +{ + struct char_dev *dev = (struct char_dev *)filp->private_data; + struct m_dev *m_dev = NULL; + DECLARE_WAITQUEUE(wait, current); + ssize_t ret = 0; + struct sk_buff *skb = NULL; + + ENTER(); + if (!dev || !dev->m_dev) { + LEAVE(); + return -ENXIO; + } + m_dev = dev->m_dev; + /* Wait for rx data */ + add_wait_queue(&m_dev->req_wait_q, &wait); + while (1) { + set_current_state(TASK_INTERRUPTIBLE); + skb = skb_dequeue(&m_dev->rx_q); + if (skb) + break; + if (!test_bit(HCI_UP, &m_dev->flags)) { + ret = -EBUSY; + break; + } + + if (filp->f_flags & O_NONBLOCK) { + ret = -EAGAIN; + break; + } + if (signal_pending(current)) { + ret = -EINTR; + break; + } + schedule(); + } + set_current_state(TASK_RUNNING); + remove_wait_queue(&m_dev->req_wait_q, &wait); + + if (!skb) + goto out; + + if (m_dev->read_continue_flag == 0) { + /* Put type byte before the data */ + memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1); + PRINTM(DATA, "Read: pkt_type: 0x%x, len=%d @%lu\n", + bt_cb(skb)->pkt_type, skb->len, jiffies); + } + DBG_HEXDUMP(DAT_D, "chardev_read", skb->data, skb->len); + if (skb->len > count) { + /* user data length is smaller than the skb length */ + if (copy_to_user(buf, skb->data, count)) { + ret = -EFAULT; + goto outf; + } + skb_pull(skb, count); + skb_queue_head(&m_dev->rx_q, skb); + m_dev->read_continue_flag = 1; + wake_up_interruptible(&m_dev->req_wait_q); + ret = count; + goto out; + } else { + if (copy_to_user(buf, skb->data, skb->len)) { + ret = -EFAULT; + goto outf; + } + m_dev->read_continue_flag = 0; + ret = skb->len; + } +outf: + kfree_skb(skb); +out: + if (m_dev->wait_rx_complete && skb_queue_empty(&m_dev->rx_q)) { + m_dev->rx_complete_flag = TRUE; + wake_up_interruptible(&m_dev->rx_wait_q); + } + LEAVE(); + return ret; +} + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) +/** + * @brief ioctl common handler for char dev + * + * @param inode pointer to structure inode + * @param filp pointer to structure file + * @param cmd contains the IOCTL + * @param arg contains the arguement + * @return 0--success otherwise failure + */ +int +char_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, void *arg) +#else +/** + * @brief ioctl common handler for char dev + * + * @param filp pointer to structure file + * @param cmd contains the IOCTL + * @param arg contains the arguement + * @return 0--success otherwise failure + */ +long +char_ioctl(struct file *filp, unsigned int cmd, void *arg) +#endif +{ + struct char_dev *dev = (struct char_dev *)filp->private_data; + struct m_dev *m_dev = NULL; + + ENTER(); + if (!dev || !dev->m_dev) { + LEAVE(); + return -ENXIO; + } + m_dev = dev->m_dev; + PRINTM(INFO, "IOCTL: cmd=%d\n", cmd); + switch (cmd) { + case MBTCHAR_IOCTL_RELEASE: + m_dev->close(m_dev); + break; + case MBTCHAR_IOCTL_QUERY_TYPE: + m_dev->query(m_dev, arg); + break; + default: + break; + } + LEAVE(); + return 0; +} + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) +/** + * @brief ioctl handler for char dev + * + * @param inode pointer to structure inode + * @param filp pointer to structure file + * @param cmd contains the IOCTL + * @param arg contains the arguement + * @return 0--success otherwise failure + */ +int +chardev_ioctl(struct inode *inode, struct file *filp, + unsigned int cmd, unsigned long arg) +#else +/** + * @brief ioctl handler for char dev + * + * @param filp pointer to structure file + * @param cmd contains the IOCTL + * @param arg contains the arguement + * @return 0--success otherwise failure + */ +long +chardev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) +#endif +{ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) + return char_ioctl(inode, filp, cmd, (void *)arg); +#else + return char_ioctl(filp, cmd, (void *)arg); +#endif +} + +#ifdef CONFIG_COMPAT +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) +/** + * @brief compat ioctl handler for char dev + * + * @param inode pointer to structure inode + * @param filp pointer to structure file + * @param cmd contains the IOCTL + * @param arg contains the arguement + * @return 0--success otherwise failure + */ +int +chardev_ioctl_compat(struct inode *inode, struct file *filp, + unsigned int cmd, unsigned long arg) +#else +/** + * @brief compat ioctl handler for char dev + * + * @param filp pointer to structure file + * @param cmd contains the IOCTL + * @param arg contains the arguement + * @return 0--success otherwise failure + */ +long +chardev_ioctl_compat(struct file *filp, unsigned int cmd, unsigned long arg) +#endif +{ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) + return char_ioctl(inode, filp, cmd, compat_ptr(arg)); +#else + return char_ioctl(filp, cmd, compat_ptr(arg)); +#endif +} +#endif /* CONFIG_COMPAT */ + +/** + * @brief open handler for char dev + * + * @param inode pointer to structure inode + * @param filp pointer to structure file + * @return 0--success otherwise failure + */ +int +chardev_open(struct inode *inode, struct file *filp) +{ + int ret = 0; + struct char_dev *dev = NULL; + struct m_dev *m_dev = NULL; + struct char_dev *cdev = NULL; + struct list_head *p = NULL; + ENTER(); + + list_for_each(p, &char_dev_list) { + cdev = list_entry(p, struct char_dev, list); + if (mbtchar_major == MAJOR(inode->i_cdev->dev) && + cdev->minor == MINOR(inode->i_cdev->dev)) { + dev = cdev; + break; + } + } + if (!dev) { + PRINTM(ERROR, "cannot find dev from inode\n"); + LEAVE(); + return -ENXIO; + } + if (!chardev_get(dev)) { + LEAVE(); + return -ENXIO; + } + filp->private_data = dev; /* for other methods */ + m_dev = dev->m_dev; + mdev_req_lock(m_dev); + if (test_bit(HCI_UP, &m_dev->flags)) { + ret = -EALREADY; + goto done; + } + if (m_dev->open(m_dev)) { + ret = -EIO; + goto done; + } + set_bit(HCI_UP, &m_dev->flags); + +done: + mdev_req_unlock(m_dev); + if (ret) + chardev_put(dev); + LEAVE(); + return ret; +} + +/** + * @brief release handler for char dev + * + * @param inode pointer to structure inode + * @param filp pointer to structure file + * @return 0--success otherwise failure + */ +int +chardev_release(struct inode *inode, struct file *filp) +{ + int ret = 0; + struct char_dev *dev = (struct char_dev *)filp->private_data; + struct m_dev *m_dev = NULL; + ENTER(); + if (!dev) { + LEAVE(); + return -ENXIO; + } + m_dev = dev->m_dev; + if (m_dev) + ret = dev->m_dev->close(dev->m_dev); + filp->private_data = NULL; + chardev_put(dev); + LEAVE(); + return ret; +} + +/** + * @brief poll handler for char dev + * + * @param filp pointer to structure file + * @param wait pointer to poll_table structure + * @return mask + */ +static unsigned int +chardev_poll(struct file *filp, poll_table * wait) +{ + unsigned int mask; + struct char_dev *dev = (struct char_dev *)filp->private_data; + struct m_dev *m_dev = NULL; + ENTER(); + if (!dev || !dev->m_dev) { + LEAVE(); + return -ENXIO; + } + + m_dev = dev->m_dev; + poll_wait(filp, &m_dev->req_wait_q, wait); + mask = POLLOUT | POLLWRNORM; + if (skb_peek(&m_dev->rx_q)) + mask |= POLLIN | POLLRDNORM; + if (!test_bit(HCI_UP, &(m_dev->flags))) + mask |= POLLHUP; + PRINTM(INFO, "poll mask=0x%x\n", mask); + LEAVE(); + return mask; +} + +/* File ops for the Char driver */ +const struct file_operations chardev_fops = { + .owner = THIS_MODULE, + .read = chardev_read, + .write = chardev_write, +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) + .ioctl = chardev_ioctl, +#else + .unlocked_ioctl = chardev_ioctl, +#endif +#ifdef CONFIG_COMPAT + .compat_ioctl = chardev_ioctl_compat, +#endif + .open = chardev_open, + .release = chardev_release, + .poll = chardev_poll, +}; + +/** + * @brief This function creates the char dev + * + * @param dev A pointer to structure char_dev + * @param char_class A pointer to class struct + * @param mod_name A pointer to char + * @param dev_name A pointer to char + * @return 0--success otherwise failure + */ +int +register_char_dev(struct char_dev *dev, struct class *char_class, + char *mod_name, char *dev_name) +{ + int ret = 0, dev_num; + unsigned long flags; + ENTER(); + /* create the chrdev region */ + if (mbtchar_major) { + dev_num = MKDEV(mbtchar_major, dev->minor); + ret = register_chrdev_region(dev_num, 1, mod_name); + } else { + PRINTM(INFO, "chardev: no major # yet\n"); + ret = alloc_chrdev_region((dev_t *) & dev_num, dev->minor, 1, + mod_name); + } + + if (ret) { + PRINTM(ERROR, "chardev: create chrdev_region failed\n"); + LEAVE(); + return ret; + } + if (!mbtchar_major) { + /* Store the allocated dev major # */ + mbtchar_major = MAJOR(dev_num); + } + dev->cdev = cdev_alloc(); + dev->cdev->ops = &chardev_fops; + dev->cdev->owner = chardev_fops.owner; + dev_num = MKDEV(mbtchar_major, dev->minor); + + if (cdev_add(dev->cdev, dev_num, 1)) { + PRINTM(ERROR, "chardev: cdev_add failed\n"); + ret = -EFAULT; + goto free_cdev_region; + } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + if ((dev->dev_type == BT_TYPE) || (dev->dev_type == BT_AMP_TYPE)) { + device_create(char_class, NULL, + MKDEV(mbtchar_major, dev->minor), NULL, dev_name); + } + if (dev->dev_type == FM_TYPE) { + device_create(char_class, NULL, + MKDEV(mbtchar_major, dev->minor), NULL, dev_name); + } + if (dev->dev_type == NFC_TYPE) { + device_create(char_class, NULL, + MKDEV(mbtchar_major, dev->minor), NULL, dev_name); + } +#else + if ((dev->dev_type == BT_TYPE) || (dev->dev_type == BT_AMP_TYPE)) { + device_create(char_class, NULL, + MKDEV(mbtchar_major, dev->minor), dev_name); + } + if (dev->dev_type == FM_TYPE) { + device_create(char_class, NULL, + MKDEV(mbtchar_major, dev->minor), dev_name); + } + if (dev->dev_type == NFC_TYPE) { + device_create(char_class, NULL, + MKDEV(mbtchar_major, dev->minor), dev_name); + } +#endif + PRINTM(INFO, "register char dev=%s\n", dev_name); + + /** modify later */ + + spin_lock_irqsave(&char_dev_list_lock, flags); + list_add_tail(&dev->list, &char_dev_list); + spin_unlock_irqrestore(&char_dev_list_lock, flags); + + LEAVE(); + return ret; +free_cdev_region: + unregister_chrdev_region(MKDEV(mbtchar_major, dev->minor), 1); + LEAVE(); + return ret; +} + +/** + * @brief This function deletes the char dev + * + * @param dev A pointer to structure char_dev + * @param char_class A pointer to class struct + * @param dev_name A pointer to char + * @return 0--success otherwise failure + */ +int +unregister_char_dev(struct char_dev *dev, struct class *char_class, + char *dev_name) +{ + ENTER(); + device_destroy(char_class, MKDEV(mbtchar_major, dev->minor)); + cdev_del(dev->cdev); + unregister_chrdev_region(MKDEV(mbtchar_major, dev->minor), 1); + PRINTM(INFO, "unregister char dev=%s\n", dev_name); + + LEAVE(); + return 0; +} + +/** + * @brief This function cleans module + * + * @param char_class A pointer to class struct + * @return N/A + */ +void +chardev_cleanup(struct class *char_class) +{ + unsigned long flags; + struct list_head *p = NULL; + struct char_dev *dev = NULL; + ENTER(); + spin_lock_irqsave(&char_dev_list_lock, flags); + do { + dev = NULL; + list_for_each(p, &char_dev_list) { + dev = list_entry(p, struct char_dev, list); + list_del(p); + spin_unlock_irqrestore(&char_dev_list_lock, flags); + unregister_char_dev(dev, char_class, dev->m_dev->name); + kobject_put(&dev->kobj); + spin_lock_irqsave(&char_dev_list_lock, flags); + break; + } + } while (dev); + spin_unlock_irqrestore(&char_dev_list_lock, flags); + class_destroy(char_class); + LEAVE(); +} + +/** + * @brief This function cleans module + * + * @param m_dev A pointer to m_dev struct + * @param char_class A pointer to class struct + * @return N/A + */ +void +chardev_cleanup_one(struct m_dev *m_dev, struct class *char_class) +{ + unsigned long flags; + struct list_head *p = NULL; + struct char_dev *dev = NULL; + ENTER(); + spin_lock_irqsave(&char_dev_list_lock, flags); + list_for_each(p, &char_dev_list) { + dev = list_entry(p, struct char_dev, list); + if (dev->minor == m_dev->index) { + list_del(p); + spin_unlock_irqrestore(&char_dev_list_lock, flags); + dev->m_dev = NULL; + unregister_char_dev(dev, char_class, m_dev->name); + kobject_put(&dev->kobj); + spin_lock_irqsave(&char_dev_list_lock, flags); + break; + } + } + spin_unlock_irqrestore(&char_dev_list_lock, flags); + LEAVE(); +} diff --git a/arch/arm/mach-berlin/modules/bt_sd8887/bt/mbt_char.h b/arch/arm/mach-berlin/modules/bt_sd8887/bt/mbt_char.h new file mode 100644 index 00000000..bb69dd0f --- /dev/null +++ b/arch/arm/mach-berlin/modules/bt_sd8887/bt/mbt_char.h @@ -0,0 +1,67 @@ +/** @file mbt_char.h + * + * @brief This file contains mbtchar driver specific defines etc + * + * Copyright (C) 2010-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ +#ifndef __MBT_CHAR_H__ +#define __MBT_CHAR_H__ + +#include +#include + +/** Define ioctl */ +#define MBTCHAR_IOCTL_RELEASE _IO('M', 1) +#define MBTCHAR_IOCTL_QUERY_TYPE _IO('M', 2) + +#define MBTCHAR_MAJOR_NUM (0) + +/** Interface specific macros */ +#define FMCHAR_MINOR_BASE (10) +#define NFCCHAR_MINOR_BASE (20) + +/** Declaration of char_dev struct */ +struct char_dev { + struct list_head list; + int minor; + int dev_type; + struct cdev *cdev; + struct m_dev *m_dev; + struct kobject kobj; +}; + +/** Changes permissions of the dev */ +int mbtchar_chmod(char *name, mode_t mode); + +/** Changes ownership of the dev */ +int mbtchar_chown(char *name, uid_t user, gid_t group); + +/** This function creates the char dev */ +int register_char_dev(struct char_dev *dev, struct class *char_class, + char *mod_name, char *dev_name); + +/** This function deletes the char dev */ +int unregister_char_dev(struct char_dev *dev, struct class *char_class, + char *dev_name); + +/** This function cleans module */ +void chardev_cleanup(struct class *char_class); + +/** This function cleans module */ +void chardev_cleanup_one(struct m_dev *m_dev, struct class *char_class); + +#endif /*__MBT_CHAR_H__*/ diff --git a/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/bt_drv.h b/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/bt_drv.h new file mode 100644 index 00000000..1ffaaf1b --- /dev/null +++ b/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/bt_drv.h @@ -0,0 +1,848 @@ +/** @file bt_drv.h + * @brief This header file contains global constant/enum definitions, + * global variable declaration. + * + * Copyright (C) 2007-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available along with the File in the gpl.txt file or by writing to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307 or on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#ifndef _BT_DRV_H_ +#define _BT_DRV_H_ + +#include +#include +#include +#include + +#include "hci_wrapper.h" + +#ifndef BIT +/** BIT definition */ +#define BIT(x) (1UL << (x)) +#endif + +#ifdef MBT_64BIT +typedef u64 t_ptr; +#else +typedef u32 t_ptr; +#endif + +/** Define drv_mode bit */ +#define DRV_MODE_BT BIT(0) +#define DRV_MODE_FM BIT(1) +#define DRV_MODE_NFC BIT(2) + +/** Define devFeature bit */ +#define DEV_FEATURE_BT BIT(0) +#define DEV_FEATURE_BTAMP BIT(1) +#define DEV_FEATURE_BLE BIT(2) +#define DEV_FEATURE_FM BIT(3) +#define DEV_FEATURE_NFC BIT(4) + +/** Define maximum number of radio func supported */ +#define MAX_RADIO_FUNC 4 + +/** MAC address print format */ +#ifndef MACSTR +#define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x" +#endif + +/** MAC address print arguments */ +#ifndef MAC2STR +#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5] +#endif + +/** Debug level : Message */ +#define DBG_MSG BIT(0) +/** Debug level : Fatal */ +#define DBG_FATAL BIT(1) +/** Debug level : Error */ +#define DBG_ERROR BIT(2) +/** Debug level : Data */ +#define DBG_DATA BIT(3) +/** Debug level : Command */ +#define DBG_CMD BIT(4) +/** Debug level : Event */ +#define DBG_EVENT BIT(5) +/** Debug level : Interrupt */ +#define DBG_INTR BIT(6) + +/** Debug entry : Data dump */ +#define DBG_DAT_D BIT(16) +/** Debug entry : Data dump */ +#define DBG_CMD_D BIT(17) + +/** Debug level : Entry */ +#define DBG_ENTRY BIT(28) +/** Debug level : Warning */ +#define DBG_WARN BIT(29) +/** Debug level : Informative */ +#define DBG_INFO BIT(30) + +#ifdef DEBUG_LEVEL1 +extern u32 mbt_drvdbg; + +#ifdef DEBUG_LEVEL2 +/** Print informative message */ +#define PRINTM_INFO(msg...) \ + do {if (mbt_drvdbg & DBG_INFO) \ + printk(KERN_DEBUG msg); } while (0) +/** Print warning message */ +#define PRINTM_WARN(msg...) \ + do {if (mbt_drvdbg & DBG_WARN) \ + printk(KERN_DEBUG msg); } while (0) +/** Print entry message */ +#define PRINTM_ENTRY(msg...) \ + do {if (mbt_drvdbg & DBG_ENTRY) \ + printk(KERN_DEBUG msg); } while (0) +#else +/** Print informative message */ +#define PRINTM_INFO(msg...) do {} while (0) +/** Print warning message */ +#define PRINTM_WARN(msg...) do {} while (0) +/** Print entry message */ +#define PRINTM_ENTRY(msg...) do {} while (0) +#endif /* DEBUG_LEVEL2 */ + +/** Print interrupt message */ +#define PRINTM_INTR(msg...) \ + do {if (mbt_drvdbg & DBG_INTR) \ + printk(KERN_DEBUG msg); } while (0) +/** Print event message */ +#define PRINTM_EVENT(msg...) \ + do {if (mbt_drvdbg & DBG_EVENT) \ + printk(KERN_DEBUG msg); } while (0) +/** Print command message */ +#define PRINTM_CMD(msg...) \ + do {if (mbt_drvdbg & DBG_CMD) \ + printk(KERN_DEBUG msg); } while (0) +/** Print data message */ +#define PRINTM_DATA(msg...) \ + do {if (mbt_drvdbg & DBG_DATA) \ + printk(KERN_DEBUG msg); } while (0) +/** Print error message */ +#define PRINTM_ERROR(msg...) \ + do {if (mbt_drvdbg & DBG_ERROR) \ + printk(KERN_ERR msg); } while (0) +/** Print fatal message */ +#define PRINTM_FATAL(msg...) \ + do {if (mbt_drvdbg & DBG_FATAL) \ + printk(KERN_ERR msg); } while (0) +/** Print message */ +#define PRINTM_MSG(msg...) \ + do {if (mbt_drvdbg & DBG_MSG) \ + printk(KERN_ALERT msg); } while (0) + +/** Print data dump message */ +#define PRINTM_DAT_D(msg...) \ + do {if (mbt_drvdbg & DBG_DAT_D) \ + printk(KERN_DEBUG msg); } while (0) +/** Print data dump message */ +#define PRINTM_CMD_D(msg...) \ + do {if (mbt_drvdbg & DBG_CMD_D) \ + printk(KERN_DEBUG msg); } while (0) + +/** Print message with required level */ +#define PRINTM(level, msg...) PRINTM_##level(msg) + +/** Debug dump buffer length */ +#define DBG_DUMP_BUF_LEN 64 +/** Maximum number of dump per line */ +#define MAX_DUMP_PER_LINE 16 +/** Maximum data dump length */ +#define MAX_DATA_DUMP_LEN 48 + +static inline void +hexdump(char *prompt, u8 *buf, int len) +{ + int i; + char dbgdumpbuf[DBG_DUMP_BUF_LEN]; + char *ptr = dbgdumpbuf; + + printk(KERN_DEBUG "%s: len=%d\n", prompt, len); + for (i = 1; i <= len; i++) { + ptr += snprintf(ptr, 4, "%02x ", *buf); + buf++; + if (i % MAX_DUMP_PER_LINE == 0) { + *ptr = 0; + printk(KERN_DEBUG "%s\n", dbgdumpbuf); + ptr = dbgdumpbuf; + } + } + if (len % MAX_DUMP_PER_LINE) { + *ptr = 0; + printk(KERN_DEBUG "%s\n", dbgdumpbuf); + } +} + +/** Debug hexdump of debug data */ +#define DBG_HEXDUMP_DAT_D(x, y, z) \ + do {if (mbt_drvdbg & DBG_DAT_D) \ + hexdump(x, y, z); } while (0) +/** Debug hexdump of debug command */ +#define DBG_HEXDUMP_CMD_D(x, y, z) \ + do {if (mbt_drvdbg & DBG_CMD_D) \ + hexdump(x, y, z); } while (0) + +/** Debug hexdump */ +#define DBG_HEXDUMP(level, x, y, z) DBG_HEXDUMP_##level(x, y, z) + +/** Mark entry point */ +#define ENTER() PRINTM(ENTRY, "Enter: %s, %s:%i\n", __func__, \ + __FILE__, __LINE__) +/** Mark exit point */ +#define LEAVE() PRINTM(ENTRY, "Leave: %s, %s:%i\n", __func__, \ + __FILE__, __LINE__) +#else +/** Do nothing */ +#define PRINTM(level, msg...) do {} while (0) +/** Do nothing */ +#define DBG_HEXDUMP(level, x, y, z) do {} while (0) +/** Do nothing */ +#define ENTER() do {} while (0) +/** Do nothing */ +#define LEAVE() do {} while (0) +#endif /* DEBUG_LEVEL1 */ + +/** Bluetooth upload size */ +#define BT_UPLD_SIZE 2312 +/** Bluetooth status success */ +#define BT_STATUS_SUCCESS (0) +/** Bluetooth status failure */ +#define BT_STATUS_FAILURE (-1) + +#ifndef TRUE +/** True value */ +#define TRUE 1 +#endif +#ifndef FALSE +/** False value */ +#define FALSE 0 +#endif + +/** Set thread state */ +#define OS_SET_THREAD_STATE(x) set_current_state(x) +/** Time to wait until Host Sleep state change in millisecond */ +#define WAIT_UNTIL_HS_STATE_CHANGED 2000 +/** Time to wait cmd resp in millisecond */ +#define WAIT_UNTIL_CMD_RESP 5000 + +/** Sleep until a condition gets true or a timeout elapses */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) +#define os_wait_interruptible_timeout(waitq, cond, timeout) \ + interruptible_sleep_on_timeout(&waitq, ((timeout) * HZ / 1000)) +#else +#define os_wait_interruptible_timeout(waitq, cond, timeout) \ + wait_event_interruptible_timeout(waitq, cond, ((timeout) * HZ / 1000)) +#endif + +typedef struct { + /** Task */ + struct task_struct *task; + /** Queue */ + wait_queue_head_t waitQ; + /** PID */ + pid_t pid; + /** Private structure */ + void *priv; +} bt_thread; + +static inline void +bt_activate_thread(bt_thread *thr) +{ + /** Initialize the wait queue */ + init_waitqueue_head(&thr->waitQ); + + /** Record the thread pid */ + thr->pid = current->pid; +} + +static inline void +bt_deactivate_thread(bt_thread *thr) +{ + thr->pid = 0; + return; +} + +static inline void +bt_create_thread(int (*btfunc) (void *), bt_thread *thr, char *name) +{ + thr->task = kthread_run(btfunc, thr, "%s", name); +} + +static inline int +bt_terminate_thread(bt_thread *thr) +{ + /* Check if the thread is active or not */ + if (!thr->pid) + return -1; + + kthread_stop(thr->task); + return 0; +} + +static inline void +os_sched_timeout(u32 millisec) +{ + set_current_state(TASK_INTERRUPTIBLE); + + schedule_timeout((millisec * HZ) / 1000); +} + +#ifndef __ATTRIB_ALIGN__ +#define __ATTRIB_ALIGN__ __attribute__((aligned(4))) +#endif + +#ifndef __ATTRIB_PACK__ +#define __ATTRIB_PACK__ __attribute__((packed)) +#endif + +/** BT histogram command */ +#define BT_CMD_HISTOGRAM 0xEA +/** max antenna num */ +#define MAX_ANTENNA_NUM 2 +/** BDR 1M */ +#define BDR_RATE_1M 1 +/** EDR 2/3 M */ +#define EDR_RATE_2_3M 2 +/** BLE 1M */ +#define BLE_RATE_1M 5 +/** max bt link number */ +#define MAX_BT_LINK 10 +/** max ble link number */ +#define MAX_BLE_LINK 16 + +typedef struct _bt_link_stat { + /** txrx rate 1: BDR_1M, 2:EDR 2/3 M, 3:BLE 1M */ + u8 txrxrate; + /** power: -30 = N = 20 dbm*/ + s8 txpower; + /** rssi: -127 to +20 (For BT), -128 to +127 (For BLE) */ + s8 rssi; +}__ATTRIB_PACK__ bt_link_stat; + +typedef struct _bt_histogram_data { + u8 antenna; + u8 powerclass; + bt_link_stat link[MAX_BT_LINK + MAX_BLE_LINK]; +}__ATTRIB_PACK__ bt_histogram_data; + +typedef struct _bt_hist_proc_data { + /** antenna */ + u8 antenna; + /** Private structure */ + struct _bt_private *pbt; +} bt_hist_proc_data; + +/** Data structure for the Marvell Bluetooth device */ +typedef struct _bt_dev { + /** device name */ + char name[DEV_NAME_LEN]; + /** card pointer */ + void *card; + /** IO port */ + u32 ioport; + + struct m_dev m_dev[MAX_RADIO_FUNC]; + + /** Tx download ready flag */ + u8 tx_dnld_rdy; + /** Function */ + u8 fn; + /** Rx unit */ + u8 rx_unit; + /** Power Save mode : Timeout configuration */ + u16 idle_timeout; + /** Power Save mode */ + u8 psmode; + /** Power Save command */ + u8 pscmd; + /** Host Sleep mode */ + u8 hsmode; + /** Host Sleep command */ + u8 hscmd; + /** Low byte is gap, high byte is GPIO */ + u16 gpio_gap; + /** Host Sleep configuration command */ + u8 hscfgcmd; + /** Host Send Cmd Flag */ + u8 sendcmdflag; + /** ocf for Send Cmd */ + u16 send_cmd_ocf; + /** Device Type */ + u8 devType; + /** Device Features */ + u8 devFeature; + /** cmd52 function */ + u8 cmd52_func; + /** cmd52 register */ + u8 cmd52_reg; + /** cmd52 value */ + u8 cmd52_val; + /** SDIO pull control command */ + u8 sdio_pull_ctrl; + /** Low 2 bytes is pullUp, high 2 bytes for pull-down */ + u32 sdio_pull_cfg; + /** Test mode command */ + u8 test_mode; +} bt_dev_t, *pbt_dev_t; + +typedef struct _bt_adapter { + /** Chip revision ID */ + u8 chip_rev; + /** Surprise removed flag */ + u8 SurpriseRemoved; + /** IRQ number */ + int irq; + /** Interrupt counter */ + u32 IntCounter; + /** Tx packet queue */ + struct sk_buff_head tx_queue; + /** Pending Tx packet queue */ + struct sk_buff_head pending_queue; + /** tx lock flag */ + u8 tx_lock; + /** Power Save mode */ + u8 psmode; + /** Power Save state */ + u8 ps_state; + /** Host Sleep state */ + u8 hs_state; + /** hs skip count */ + u32 hs_skip; + /** suspend_fail flag */ + u8 suspend_fail; + /** suspended flag */ + u8 is_suspended; + /** Number of wakeup tries */ + u8 WakeupTries; + /** Host Sleep wait queue */ + wait_queue_head_t cmd_wait_q __ATTRIB_ALIGN__; + /** Host Cmd complet state */ + u8 cmd_complete; + /** last irq recv */ + u8 irq_recv; + /** last irq processed */ + u8 irq_done; + /** sdio int status */ + u8 sd_ireg; + /** buf allocated for read interrupt status */ + u8 *hw_regs_buf; + /** buf for read interrupt status */ + u8 *hw_regs; + /** tx pending */ + u32 skb_pending; +/** Version string buffer length */ +#define MAX_VER_STR_LEN 128 + /** Driver version */ + u8 drv_ver[MAX_VER_STR_LEN]; + /** Number of command timeout */ + u32 num_cmd_timeout; +} bt_adapter, *pbt_adapter; + +/** Length of prov name */ +#define PROC_NAME_LEN 32 + +struct item_data { + /** Name */ + char name[PROC_NAME_LEN]; + /** Size */ + u32 size; + /** Address */ + t_ptr addr; + /** Offset */ + u32 offset; + /** Flag */ + u32 flag; +}; + +struct proc_private_data { + /** Name */ + char name[PROC_NAME_LEN]; + /** File flag */ + u32 fileflag; + /** Buffer size */ + u32 bufsize; + /** Number of items */ + u32 num_items; + /** Item data */ + struct item_data *pdata; + /** Private structure */ + struct _bt_private *pbt; + /** File operations */ + const struct file_operations *fops; +}; + +struct device_proc { + /** Proc directory entry */ + struct proc_dir_entry *proc_entry; + /** proc entry for hist */ + struct proc_dir_entry *hist_entry; + /** num of proc files */ + u8 num_proc_files; + /** pointer to proc_private_data */ + struct proc_private_data *pfiles; +}; + +/** Private structure for the MV device */ +typedef struct _bt_private { + /** Bluetooth device */ + bt_dev_t bt_dev; + /** Adapter */ + bt_adapter *adapter; + /** Firmware helper */ + const struct firmware *fw_helper; + /** Firmware */ + const struct firmware *firmware; + /** Init user configure file */ + const struct firmware *init_user_cfg; + /** Init user configure wait queue token */ + u16 init_user_conf_wait_flag; + /** Init user configure file wait queue */ + wait_queue_head_t init_user_conf_wait_q __ATTRIB_ALIGN__; + /** Firmware request start time */ + struct timeval req_fw_time; + /** Hotplug device */ + struct device *hotplug_device; + /** thread to service interrupts */ + bt_thread MainThread; + /** proc data */ + struct device_proc dev_proc[MAX_RADIO_FUNC]; + /** Driver lock */ + spinlock_t driver_lock; + /** Driver lock flags */ + ulong driver_flags; + /** Driver reference flags */ + struct kobject kobj; + /** CRC check flag */ + u16 fw_crc_check; + /** Card type */ + u16 card_type; + /** sdio device */ + const struct sdio_device *psdio_device; + int debug_device_pending; + int debug_ocf_ogf[2]; + u8 fw_reload; + /* hist_data_len */ + u8 hist_data_len; + /** hist data */ + bt_histogram_data hist_data[MAX_ANTENNA_NUM]; + /** hist proc data */ + bt_hist_proc_data hist_proc[MAX_ANTENNA_NUM]; +} bt_private, *pbt_private; + +int bt_get_histogram(bt_private *priv); + +/** Disable interrupt */ +#define OS_INT_DISABLE spin_lock_irqsave(&priv->driver_lock, \ + priv->driver_flags) +/** Enable interrupt */ +#define OS_INT_RESTORE spin_unlock_irqrestore(&priv->driver_lock, \ + priv->driver_flags) + +#ifndef HCI_BT_AMP +/** BT_AMP flag for device type */ +#define HCI_BT_AMP 0x80 +#endif + +/** Device type of BT */ +#define DEV_TYPE_BT 0x00 +/** Device type of AMP */ +#define DEV_TYPE_AMP 0x01 +/** Device type of FM */ +#define DEV_TYPE_FM 0x02 +/** Device type of NFC */ +#define DEV_TYPE_NFC 0x04 + +/** Marvell vendor packet */ +#define MRVL_VENDOR_PKT 0xFE + +/** Bluetooth command : Get FW Version */ +#define BT_CMD_GET_FW_VERSION 0x0F +/** Bluetooth command : Sleep mode */ +#define BT_CMD_AUTO_SLEEP_MODE 0x23 +/** Bluetooth command : Host Sleep configuration */ +#define BT_CMD_HOST_SLEEP_CONFIG 0x59 +/** Bluetooth command : Host Sleep enable */ +#define BT_CMD_HOST_SLEEP_ENABLE 0x5A +/** Bluetooth command : Module Configuration request */ +#define BT_CMD_MODULE_CFG_REQ 0x5B +/** Bluetooth command : SDIO pull up down configuration request */ +#define BT_CMD_SDIO_PULL_CFG_REQ 0x69 +/** Bluetooth command : Set Evt Filter Command */ +#define BT_CMD_SET_EVT_FILTER 0x05 +/** Bluetooth command : Enable Write Scan Command */ +#define BT_CMD_ENABLE_WRITE_SCAN 0x1A +/** Bluetooth command : Enable Device under test mode */ +#define BT_CMD_ENABLE_DEVICE_TESTMODE 0x03 +#ifdef SDIO_SUSPEND_RESUME +/* FM default event interrupt mask + bit[0], RSSI low + bit[1], New RDS data + bit[2], RSSI indication */ +#define FM_DEFAULT_INTR_MASK 0x07 +/** Disable FM event interrupt mask */ +#define FM_DISABLE_INTR_MASK 0x00 +/** FM set event interrupt mask command */ +#define FM_SET_INTR_MASK 0x2E +/** FM ocf value */ +#define FM_CMD 0x0280 +int fm_set_intr_mask(bt_private *priv, u32 mask); +#endif +/** Sub Command: Module Bring Up Request */ +#define MODULE_BRINGUP_REQ 0xF1 +/** Sub Command: Module Shut Down Request */ +#define MODULE_SHUTDOWN_REQ 0xF2 +/** Module already up */ +#define MODULE_CFG_RESP_ALREADY_UP 0x0c +/** Sub Command: Host Interface Control Request */ +#define MODULE_INTERFACE_CTRL_REQ 0xF5 + +/** Bluetooth event : Power State */ +#define BT_EVENT_POWER_STATE 0x20 + +/** Bluetooth Power State : Enable */ +#define BT_PS_ENABLE 0x02 +/** Bluetooth Power State : Disable */ +#define BT_PS_DISABLE 0x03 +/** Bluetooth Power State : Sleep */ +#define BT_PS_SLEEP 0x01 +/** Bluetooth Power State : Awake */ +#define BT_PS_AWAKE 0x02 + +/** Vendor OGF */ +#define VENDOR_OGF 0x3F +/** OGF for reset */ +#define RESET_OGF 0x03 +/** Bluetooth command : Reset */ +#define BT_CMD_RESET 0x03 + +/** Host Sleep activated */ +#define HS_ACTIVATED 0x01 +/** Host Sleep deactivated */ +#define HS_DEACTIVATED 0x00 + +/** Power Save sleep */ +#define PS_SLEEP 0x01 +/** Power Save awake */ +#define PS_AWAKE 0x00 + +/** bt header length */ +#define BT_HEADER_LEN 4 + +#ifndef MAX +/** Return maximum of two */ +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#endif + +/** This is for firmware specific length */ +#define EXTRA_LEN 36 + +/** Command buffer size for Marvell driver */ +#define MRVDRV_SIZE_OF_CMD_BUFFER (2 * 1024) + +/** Bluetooth Rx packet buffer size for Marvell driver */ +#define MRVDRV_BT_RX_PACKET_BUFFER_SIZE \ + (HCI_MAX_FRAME_SIZE + EXTRA_LEN) + +/** Buffer size to allocate */ +#define ALLOC_BUF_SIZE (((MAX(MRVDRV_BT_RX_PACKET_BUFFER_SIZE, \ + MRVDRV_SIZE_OF_CMD_BUFFER) + SDIO_HEADER_LEN \ + + SD_BLOCK_SIZE - 1) / SD_BLOCK_SIZE) * SD_BLOCK_SIZE) + +/** Request FW timeout in second */ +#define REQUEST_FW_TIMEOUT 30 + +/** The number of times to try when polling for status bits */ +#define MAX_POLL_TRIES 100 + +/** The number of times to try when waiting for downloaded firmware to + become active when multiple interface is present */ +#define MAX_MULTI_INTERFACE_POLL_TRIES 150 + +/** The number of times to try when waiting for downloaded firmware to + become active. (polling the scratch register). */ +#define MAX_FIRMWARE_POLL_TRIES 100 + +/** default idle time */ +#define DEFAULT_IDLE_TIME 1000 + +#define BT_CMD_HEADER_SIZE 3 + +typedef struct _BT_CMD { + /** OCF OGF */ + u16 ocf_ogf; + /** Length */ + u8 length; + /** Data */ + u8 data[128]; +} __ATTRIB_PACK__ BT_CMD; + +typedef struct _BT_EVENT { + /** Event Counter */ + u8 EC; + /** Length */ + u8 length; + /** Data */ + u8 data[8]; +} BT_EVENT; + +/** This function verify the received event pkt */ +int check_evtpkt(bt_private *priv, struct sk_buff *skb); + +/* Prototype of global function */ +/** This function gets the priv reference */ +struct kobject *bt_priv_get(bt_private *priv); +/** This function release the priv reference */ +void bt_priv_put(bt_private *priv); +/** This function adds the card */ +bt_private *bt_add_card(void *card); +/** This function removes the card */ +int bt_remove_card(void *card); +/** This function handles the interrupt */ +void bt_interrupt(struct m_dev *m_dev); + +/** This function creates proc interface directory structure */ +int bt_root_proc_init(void); +/** This function removes proc interface directory structure */ +int bt_root_proc_remove(void); +/** This function initializes proc entry */ +int bt_proc_init(bt_private *priv, struct m_dev *m_dev, int seq); +/** This function removes proc interface */ +void bt_proc_remove(bt_private *priv); + +/** This function process the received event */ +int bt_process_event(bt_private *priv, struct sk_buff *skb); +/** This function enables host sleep */ +int bt_enable_hs(bt_private *priv); +/** This function used to send command to firmware */ +int bt_prepare_command(bt_private *priv); +/** This function frees the structure of adapter */ +void bt_free_adapter(bt_private *priv); + +/** clean up m_devs */ +void clean_up_m_devs(bt_private *priv); +/** bt driver call this function to register to bus driver */ +int *sbi_register(void); +/** bt driver call this function to unregister to bus driver */ +void sbi_unregister(void); +/** bt driver calls this function to register the device */ +int sbi_register_dev(bt_private *priv); +/** bt driver calls this function to unregister the device */ +int sbi_unregister_dev(bt_private *priv); +/** This function initializes firmware */ +int sbi_download_fw(bt_private *priv); +/** Configures hardware to quit deep sleep state */ +int sbi_wakeup_firmware(bt_private *priv); +/** Module configuration and register device */ +int sbi_register_conf_dpc(bt_private *priv); + +/** This function is used to send the data/cmd to hardware */ +int sbi_host_to_card(bt_private *priv, u8 *payload, u16 nb); +/** This function reads the current interrupt status register */ +int sbi_get_int_status(bt_private *priv); + +/** This function enables the host interrupts */ +int sd_enable_host_int(bt_private *priv); +/** This function disables the host interrupts */ +int sd_disable_host_int(bt_private *priv); +/** This function reload firmware */ +void bt_request_fw_reload(bt_private *priv); +/** This function downloads firmware image to the card */ +int sd_download_firmware_w_helper(bt_private *priv); +void bt_dump_sdio_regs(bt_private *priv); +/* dumps the firmware to /var/ or /data/ */ +void bt_dump_firmware_info_v2(bt_private *priv); + +/** Max line length allowed in init config file */ +#define MAX_LINE_LEN 256 +/** Max MAC address string length allowed */ +#define MAX_MAC_ADDR_LEN 18 +/** Max register type/offset/value etc. parameter length allowed */ +#define MAX_PARAM_LEN 12 + +/** Bluetooth command : Mac address configuration */ +#define BT_CMD_CONFIG_MAC_ADDR 0x22 +/** Bluetooth command : Write CSU register */ +#define BT_CMD_CSU_WRITE_REG 0x66 +/** Bluetooth command : Load calibrate data */ +#define BT_CMD_LOAD_CONFIG_DATA 0x61 +/** Bluetooth command : Load calibrate ext data */ +#define BT_CMD_LOAD_CONFIG_DATA_EXT 0x60 + +/** Bluetooth command : BLE deepsleep */ +#define BT_CMD_BLE_DEEP_SLEEP 0x8b + +typedef struct _BT_BLE_CMD { + /** OCF OGF */ + u16 ocf_ogf; + /** Length */ + u8 length; + /** deepsleep flag */ + u8 deepsleep; +} __ATTRIB_PACK__ BT_BLE_CMD; + +typedef struct _BT_CSU_CMD { + /** OCF OGF */ + u16 ocf_ogf; + /** Length */ + u8 length; + /** reg type */ + u8 type; + /** address */ + u8 offset[4]; + /** Data */ + u8 value[2]; +} __ATTRIB_PACK__ BT_CSU_CMD; + +/** This function sets mac address */ +int bt_set_mac_address(bt_private *priv, u8 *mac); +/** This function writes value to CSU registers */ +int bt_write_reg(bt_private *priv, u8 type, u32 offset, u16 value); +/** BT set user defined init data and param */ +int bt_init_config(bt_private *priv, char *cfg_file); +/** This function load the calibrate data */ +int bt_load_cal_data(bt_private *priv, u8 *config_data, u8 *mac); +/** This function load the calibrate ext data */ +int bt_load_cal_data_ext(bt_private *priv, u8 *config_data, u32 cfg_data_len); +/** BT set user defined calibration data */ +int bt_cal_config(bt_private *priv, char *cfg_file, char *mac); +/** BT set user defined calibration ext data */ +int bt_cal_config_ext(bt_private *priv, char *cfg_file); +int bt_init_mac_address(bt_private *priv, char *mac); +int bt_set_gpio_pin(bt_private *priv); +/** Bluetooth command : Set gpio pin */ +#define BT_CMD_SET_GPIO_PIN 0xEC +/** Interrupt Raising Edge**/ +#define INT_RASING_EDGE 0 +/** Interrupt Falling Edge**/ +#define INT_FALLING_EDGE 1 +#define DELAY_50_US 50 + +typedef struct _BT_HCI_CMD { + /** OCF OGF */ + u16 ocf_ogf; + /** Length */ + u8 length; + /** cmd type */ + u8 cmd_type; + /** cmd len */ + u8 cmd_len; + /** Data */ + u8 data[6]; +} __ATTRIB_PACK__ BT_HCI_CMD; + +#endif /* _BT_DRV_H_ */ diff --git a/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/bt_init.c b/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/bt_init.c new file mode 100644 index 00000000..fe70aa83 --- /dev/null +++ b/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/bt_init.c @@ -0,0 +1,755 @@ +/** @file bt_init.c + * + * @brief This file contains the init functions for BlueTooth + * driver. + * + * Copyright (C) 2011-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available along with the File in the gpl.txt file or by writing to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307 or on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#include +#include + +#include "bt_drv.h" + +extern int bt_req_fw_nowait; + +#define isxdigit(c) (('0' <= (c) && (c) <= '9') \ + || ('a' <= (c) && (c) <= 'f') \ + || ('A' <= (c) && (c) <= 'F')) + +#define isdigit(c) (('0' <= (c) && (c) <= '9')) +#define isspace(c) (c <= ' ' && (c == ' ' || (c <= 13 && c >= 9))) +/** + * @brief Returns hex value of a give character + * + * @param chr Character to be converted + * + * @return The converted character if chr is a valid hex, else 0 + */ +static int +bt_hexval(char chr) +{ + ENTER(); + + if (chr >= '0' && chr <= '9') + return chr - '0'; + if (chr >= 'A' && chr <= 'F') + return chr - 'A' + 10; + if (chr >= 'a' && chr <= 'f') + return chr - 'a' + 10; + + LEAVE(); + return 0; +} + +/** + * @brief Extension of strsep lib command. This function will also take care + * escape character + * + * @param s A pointer to array of chars to process + * @param delim The delimiter character to end the string + * @param esc The escape character to ignore for delimiter + * + * @return Pointer to the separated string if delim found, else NULL + */ +static char * +bt_strsep(char **s, char delim, char esc) +{ + char *se = *s, *sb; + + ENTER(); + + if (!(*s) || (*se == '\0')) { + LEAVE(); + return NULL; + } + + for (sb = *s; *sb != '\0'; ++sb) { + if (*sb == esc && *(sb + 1) == esc) { + /* + * We get a esc + esc seq then keep the one esc + * and chop off the other esc character + */ + memmove(sb, sb + 1, strlen(sb)); + continue; + } + if (*sb == esc && *(sb + 1) == delim) { + /* + * We get a delim + esc seq then keep the delim + * and chop off the esc character + */ + memmove(sb, sb + 1, strlen(sb)); + continue; + } + if (*sb == delim) + break; + } + + if (*sb == '\0') + sb = NULL; + else + *sb++ = '\0'; + + *s = sb; + + LEAVE(); + return se; +} + +/** + * @brief Returns hex value of a given ascii string + * + * @param a String to be converted + * + * @return hex value + */ +static int +bt_atox(const char *a) +{ + int i = 0; + ENTER(); + while (isxdigit(*a)) + i = i * 16 + bt_hexval(*a++); + + LEAVE(); + return i; +} + +/** + * @brief Converts mac address from string to t_u8 buffer. + * + * @param mac_addr The buffer to store the mac address in. + * @param buf The source of mac address which is a string. + * + * @return N/A + */ +static void +bt_mac2u8(u8 *mac_addr, char *buf) +{ + char *begin, *end, *mac_buff; + int i; + + ENTER(); + + if (!buf) { + LEAVE(); + return; + } + + mac_buff = kzalloc(strlen(buf) + 1, GFP_KERNEL); + if (!mac_buff) { + LEAVE(); + return; + } + memcpy(mac_buff, buf, strlen(buf)); + + begin = mac_buff; + for (i = 0; i < ETH_ALEN; ++i) { + end = bt_strsep(&begin, ':', '/'); + if (end) + mac_addr[i] = bt_atox(end); + } + + kfree(mac_buff); + LEAVE(); +} + +/** + * @brief Returns integer value of a given ascii string + * + * @param data Converted data to be returned + * @param a String to be converted + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int +bt_atoi(int *data, char *a) +{ + int i, val = 0, len; + + ENTER(); + + len = strlen(a); + if (!strncmp(a, "0x", 2)) { + a = a + 2; + len -= 2; + *data = bt_atox(a); + return BT_STATUS_SUCCESS; + } + for (i = 0; i < len; i++) { + if (isdigit(a[i])) { + val = val * 10 + (a[i] - '0'); + } else { + PRINTM(ERROR, "Invalid char %c in string %s\n", a[i], + a); + return BT_STATUS_FAILURE; + } + } + *data = val; + + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief parse cal-data + * + * @param src a pointer to cal-data string + * @param len len of cal-data + * @param dst a pointer to return cal-data + * @param dst_size size of dest buffer + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int +bt_parse_cal_cfg(const u8 *src, u32 len, u8 *dst, u32 *dst_size) +{ + const u8 *ptr; + u8 *dptr; + u32 count = 0; + int ret = BT_STATUS_FAILURE; + + ENTER(); + ptr = src; + dptr = dst; + + while ((ptr - src) < len) { + if (*ptr && isspace(*ptr)) { + ptr++; + continue; + } + + if (isxdigit(*ptr)) { + if ((dptr - dst) >= *dst_size) { + PRINTM(ERROR, "cal_file size too big!!!\n"); + goto done; + } + *dptr++ = bt_atox((const char *)ptr); + ptr += 2; + count++; + } else { + ptr++; + } + } + if (dptr == dst) { + ret = BT_STATUS_FAILURE; + goto done; + } + + *dst_size = count; + ret = BT_STATUS_SUCCESS; +done: + LEAVE(); + return ret; +} + +/** + * @brief BT get one line data from ASCII format data + * + * @param data Source data + * @param size Source data length + * @param line_pos Destination data + * @return -1 or length of the line + */ +int +parse_cfg_get_line(u8 *data, u32 size, u8 *line_pos) +{ + static s32 pos; + u8 *src, *dest; + + if (pos >= size) { /* reach the end */ + pos = 0; /* Reset position for rfkill */ + return -1; + } + memset(line_pos, 0, MAX_LINE_LEN); + src = data + pos; + dest = line_pos; + + while (pos < size && *src != '\x0A' && *src != '\0') { + if (*src != ' ' && *src != '\t') /* parse space */ + *dest++ = *src++; + else + src++; + pos++; + } + *dest = '\0'; + /* parse new line */ + pos++; + return strlen((const char *)line_pos); +} + +/** + * @brief BT parse ASCII format data to MAC address + * + * @param priv BT private handle + * @param data Source data + * @param size data length + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_process_init_cfg(bt_private *priv, u8 *data, u32 size) +{ + u8 *pos; + u8 *intf_s, *intf_e; + u8 s[MAX_LINE_LEN]; /* 1 line data */ + u32 line_len; + char dev_name[MAX_PARAM_LEN]; + u8 buf[MAX_PARAM_LEN]; + u8 bt_addr[MAX_MAC_ADDR_LEN]; + u8 bt_mac[ETH_ALEN]; + int setting = 0; + u8 type = 0; + u16 value = 0; + u32 offset = 0; + int ret = BT_STATUS_FAILURE; + + memset(dev_name, 0, sizeof(dev_name)); + memset(bt_addr, 0, sizeof(bt_addr)); + memset(bt_mac, 0, sizeof(bt_mac)); + + while ((line_len = parse_cfg_get_line(data, size, s)) != -1) { + pos = s; + while (*pos == ' ' || *pos == '\t') + pos++; + + if (*pos == '#' || (*pos == '\r' && *(pos + 1) == '\n') || + *pos == '\n' || *pos == '\0') + continue; /* Need n't process this line */ + + /* Process MAC addr */ + if (strncmp((char *)pos, "mac_addr", 8) == 0) { + intf_s = (u8 *)strchr((const char *)pos, '='); + if (intf_s != NULL) + intf_e = (u8 *)strchr((const char *)intf_s, + ':'); + else + intf_e = NULL; + if (intf_s != NULL && intf_e != NULL) { + if ((intf_e - intf_s) > MAX_PARAM_LEN) { + PRINTM(ERROR, + "BT: Too long interface name %d\n", + __LINE__); + goto done; + } + strncpy(dev_name, (const char *)intf_s + 1, + intf_e - intf_s - 1); + dev_name[intf_e - intf_s - 1] = '\0'; + if (strcmp + (dev_name, + priv->bt_dev.m_dev[BT_SEQ].name) == 0) { + /* found hci device */ + strncpy((char *)bt_addr, + (const char *)intf_e + 1, + MAX_MAC_ADDR_LEN - 1); + bt_addr[MAX_MAC_ADDR_LEN - 1] = '\0'; + /* Convert MAC format */ + bt_mac2u8(bt_mac, (char *)bt_addr); + PRINTM(CMD, + "HCI: %s new BT Address " MACSTR + "\n", dev_name, MAC2STR(bt_mac)); + if (BT_STATUS_SUCCESS != + bt_set_mac_address(priv, bt_mac)) { + PRINTM(FATAL, + "BT: Fail to set mac address\n"); + goto done; + } + } + } else { + PRINTM(ERROR, + "BT: Wrong config file format %d\n", + __LINE__); + goto done; + } + } + /* Process REG value */ + else if (strncmp((char *)pos, "bt_reg", 6) == 0) { + intf_s = (u8 *)strchr((const char *)pos, '='); + if (intf_s != NULL) + intf_e = (u8 *)strchr((const char *)intf_s, + ','); + else + intf_e = NULL; + if (intf_s != NULL && intf_e != NULL) { + /* Copy type */ + memset(buf, 0, sizeof(buf)); + strncpy((char *)buf, (const char *)intf_s + 1, + 1); + buf[1] = '\0'; + if (0 == bt_atoi(&setting, (char *)buf)) + type = (u8)setting; + else { + PRINTM(ERROR, + "BT: Fail to parse reg type\n"); + goto done; + } + } else { + PRINTM(ERROR, + "BT: Wrong config file format %d\n", + __LINE__); + goto done; + } + intf_s = intf_e + 1; + intf_e = (u8 *)strchr((const char *)intf_s, ','); + if (intf_e != NULL) { + if ((intf_e - intf_s) >= MAX_PARAM_LEN) { + PRINTM(ERROR, + "BT: Regsier offset is too long %d\n", + __LINE__); + goto done; + } + /* Copy offset */ + memset(buf, 0, sizeof(buf)); + strncpy((char *)buf, (const char *)intf_s, + intf_e - intf_s); + buf[intf_e - intf_s] = '\0'; + if (0 == bt_atoi(&setting, (char *)buf)) + offset = (u32)setting; + else { + PRINTM(ERROR, + "BT: Fail to parse reg offset\n"); + goto done; + } + } else { + PRINTM(ERROR, + "BT: Wrong config file format %d\n", + __LINE__); + goto done; + } + intf_s = intf_e + 1; + if ((strlen((const char *)intf_s) >= MAX_PARAM_LEN)) { + PRINTM(ERROR, + "BT: Regsier value is too long %d\n", + __LINE__); + goto done; + } + /* Copy value */ + memset(buf, 0, sizeof(buf)); + strncpy((char *)buf, (const char *)intf_s, sizeof(buf)); + if (0 == bt_atoi(&setting, (char *)buf)) + value = (u16) setting; + else { + PRINTM(ERROR, "BT: Fail to parse reg value\n"); + goto done; + } + + PRINTM(CMD, + "BT: Write reg type: %d offset: 0x%x value: 0x%x\n", + type, offset, value); + if (BT_STATUS_SUCCESS != + bt_write_reg(priv, type, offset, value)) { + PRINTM(FATAL, + "BT: Write reg failed. type: %d offset: 0x%x value: 0x%x\n", + type, offset, value); + goto done; + } + } + } + ret = BT_STATUS_SUCCESS; + +done: + LEAVE(); + return ret; +} + +/** + * @brief BT request init conf firmware callback + * This function is invoked by request_firmware_nowait system call + * + * @param firmware A pointer to firmware image + * @param context A pointer to bt_private structure + * + * @return N/A + */ +static void +bt_request_init_user_conf_callback(const struct firmware *firmware, + void *context) +{ + bt_private *priv = (bt_private *)context; + + ENTER(); + + if (!firmware) + PRINTM(ERROR, "BT user init config request firmware failed\n"); + + priv->init_user_cfg = firmware; + priv->init_user_conf_wait_flag = TRUE; + wake_up_interruptible(&priv->init_user_conf_wait_q); + + LEAVE(); + return; +} + +/** + * @brief BT set user defined init data and param + * + * @param priv BT private handle + * @param cfg_file user cofig file + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_init_config(bt_private *priv, char *cfg_file) +{ + const struct firmware *cfg = NULL; + int ret = BT_STATUS_SUCCESS; + + ENTER(); + if ((request_firmware(&cfg, cfg_file, priv->hotplug_device)) < 0) { + PRINTM(FATAL, "BT: request_firmware() %s failed\n", cfg_file); + ret = BT_STATUS_FAILURE; + goto done; + } + if (cfg) + ret = bt_process_init_cfg(priv, (u8 *)cfg->data, cfg->size); + else + ret = BT_STATUS_FAILURE; +done: + if (cfg) + release_firmware(cfg); + LEAVE(); + return ret; +} + +/** + * @brief BT process calibration data + * + * @param priv a pointer to bt_private structure + * @param data a pointer to cal data + * @param size cal data size + * @param mac mac address buf + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_process_cal_cfg(bt_private *priv, u8 *data, u32 size, char *mac) +{ + u8 bt_mac[ETH_ALEN]; + u8 cal_data[32]; + u8 *mac_data = NULL; + u32 cal_data_len; + int ret = BT_STATUS_FAILURE; + + memset(bt_mac, 0, sizeof(bt_mac)); + cal_data_len = sizeof(cal_data); + if (BT_STATUS_SUCCESS != + bt_parse_cal_cfg(data, size, cal_data, &cal_data_len)) { + goto done; + } + if (mac != NULL) { + /* Convert MAC format */ + bt_mac2u8(bt_mac, mac); + PRINTM(CMD, "HCI: new BT Address " MACSTR "\n", + MAC2STR(bt_mac)); + mac_data = bt_mac; + } + if (BT_STATUS_SUCCESS != bt_load_cal_data(priv, cal_data, mac_data)) { + PRINTM(FATAL, "BT: Fail to load calibrate data\n"); + goto done; + } + ret = BT_STATUS_SUCCESS; + +done: + LEAVE(); + return ret; +} + +/** + * @brief BT process calibration EXT data + * + * @param priv a pointer to bt_private structure + * @param data a pointer to cal data + * @param size cal data size + * @param mac mac address buf + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_process_cal_cfg_ext(bt_private *priv, u8 *data, u32 size) +{ + u8 cal_data[128]; + u32 cal_data_len; + int ret = BT_STATUS_FAILURE; + + cal_data_len = sizeof(cal_data); + if (BT_STATUS_SUCCESS != + bt_parse_cal_cfg(data, size, cal_data, &cal_data_len)) { + goto done; + } + if (BT_STATUS_SUCCESS != + bt_load_cal_data_ext(priv, cal_data, cal_data_len)) { + PRINTM(FATAL, "BT: Fail to load calibrate data\n"); + goto done; + } + ret = BT_STATUS_SUCCESS; + +done: + LEAVE(); + return ret; +} + +/** + * @brief BT process calibration file + * + * @param priv a pointer to bt_private structure + * @param cal_file calibration file name + * @param mac mac address buf + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_cal_config(bt_private *priv, char *cal_file, char *mac) +{ + const struct firmware *cfg = NULL; + int ret = BT_STATUS_SUCCESS; + + ENTER(); + if (bt_req_fw_nowait) { +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) + ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, + cal_file, priv->hotplug_device, + GFP_KERNEL, priv, + bt_request_init_user_conf_callback); +#else +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 13) + ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, + cal_file, priv->hotplug_device, + priv, + bt_request_init_user_conf_callback); +#else + ret = request_firmware_nowait(THIS_MODULE, + cal_file, priv->hotplug_device, + priv, + bt_request_init_user_conf_callback); +#endif +#endif + if (ret < 0) { + PRINTM(FATAL, + "BT: bt_cal_config() failed, error code = %#x cal_file=%s\n", + ret, cal_file); + ret = BT_STATUS_FAILURE; + goto done; + } + priv->init_user_conf_wait_flag = FALSE; + wait_event_interruptible(priv->init_user_conf_wait_q, + priv->init_user_conf_wait_flag); + cfg = priv->init_user_cfg; + } else { + if ((request_firmware(&cfg, cal_file, priv->hotplug_device)) < + 0) { + PRINTM(FATAL, "BT: request_firmware() %s failed\n", + cal_file); + ret = BT_STATUS_FAILURE; + goto done; + } + } + if (cfg) + ret = bt_process_cal_cfg(priv, (u8 *)cfg->data, cfg->size, mac); + else + ret = BT_STATUS_FAILURE; +done: + if (cfg) + release_firmware(cfg); + LEAVE(); + return ret; +} + +/** + * @brief BT process calibration EXT file + * + * @param priv a pointer to bt_private structure + * @param cal_file calibration file name + * @param mac mac address buf + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_cal_config_ext(bt_private *priv, char *cal_file) +{ + const struct firmware *cfg = NULL; + int ret = BT_STATUS_SUCCESS; + + ENTER(); + if (bt_req_fw_nowait) { +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) + ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, + cal_file, priv->hotplug_device, + GFP_KERNEL, priv, + bt_request_init_user_conf_callback); +#else +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 13) + ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, + cal_file, priv->hotplug_device, + priv, + bt_request_init_user_conf_callback); +#else + ret = request_firmware_nowait(THIS_MODULE, + cal_file, priv->hotplug_device, + priv, + bt_request_init_user_conf_callback); +#endif +#endif + if (ret < 0) { + PRINTM(FATAL, + "BT: bt_cal_config_ext() failed, error code = %#x cal_file=%s\n", + ret, cal_file); + ret = BT_STATUS_FAILURE; + goto done; + } + priv->init_user_conf_wait_flag = FALSE; + wait_event_interruptible(priv->init_user_conf_wait_q, + priv->init_user_conf_wait_flag); + cfg = priv->init_user_cfg; + } else { + if ((request_firmware(&cfg, cal_file, priv->hotplug_device)) < + 0) { + PRINTM(FATAL, "BT: request_firmware() %s failed\n", + cal_file); + ret = BT_STATUS_FAILURE; + goto done; + } + } + if (cfg) + ret = bt_process_cal_cfg_ext(priv, (u8 *)cfg->data, cfg->size); + else + ret = BT_STATUS_FAILURE; +done: + if (cfg) + release_firmware(cfg); + LEAVE(); + return ret; +} + +/** + * @brief BT init mac address from bt_mac parametre when insmod + * + * @param priv a pointer to bt_private structure + * @param bt_mac mac address buf + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_init_mac_address(bt_private *priv, char *mac) +{ + u8 bt_mac[ETH_ALEN]; + int ret = BT_STATUS_FAILURE; + + ENTER(); + memset(bt_mac, 0, sizeof(bt_mac)); + bt_mac2u8(bt_mac, mac); + PRINTM(CMD, "HCI: New BT Address " MACSTR "\n", MAC2STR(bt_mac)); + ret = bt_set_mac_address(priv, bt_mac); + if (ret != BT_STATUS_SUCCESS) + PRINTM(FATAL, + "BT: Fail to set mac address from insmod parametre.\n"); + + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/bt_main.c b/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/bt_main.c new file mode 100644 index 00000000..498cd1b6 --- /dev/null +++ b/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/bt_main.c @@ -0,0 +1,3458 @@ +/** @file bt_main.c + * + * @brief This file contains the major functions in BlueTooth + * driver. It includes init, exit, open, close and main + * thread etc.. + * + * Copyright (C) 2007-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available along with the File in the gpl.txt file or by writing to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307 or on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ +/** + * @mainpage M-BT Linux Driver + * + * @section overview_sec Overview + * + * The M-BT is a Linux reference driver for Marvell Bluetooth chipset. + * + * @section copyright_sec Copyright + * + * Copyright (C) 2007-2015, Marvell International Ltd. + * + */ + +#include + +#ifdef CONFIG_OF +#include +#endif + +#include + +#include "bt_drv.h" +#include "mbt_char.h" +#include "bt_sdio.h" + +/** Version */ +#define VERSION "C3X14112" + +/** Driver version */ +static char mbt_driver_version[] = "SD8XXX-%s-" VERSION "-(" "FP" FPNUM ")" +#ifdef DEBUG_LEVEL2 + "-dbg" +#endif + " "; + +/** SD8787 Card */ +#define CARD_SD8787 "SD8787" +/** SD8777 Card */ +#define CARD_SD8777 "SD8777" +/** SD8887 Card */ +#define CARD_SD8887 "SD8887" +/** SD8897 Card */ +#define CARD_SD8897 "SD8897" +/** SD8797 Card */ +#define CARD_SD8797 "SD8797" + +/** Declare and initialize fw_version */ +static char fw_version[32] = "0.0.0.p0"; + +#define AID_SYSTEM 1000 /* system server */ + +#define AID_BLUETOOTH 1002 /* bluetooth subsystem */ + +/** Define module name */ +#define MODULE_NAME "bt_fm_nfc" + +/** Declaration of chardev class */ +static struct class *chardev_class; + +/** Interface specific variables */ +static int mbtchar_minor; +static int fmchar_minor; +static int nfcchar_minor; +static int debugchar_minor; + +/** Default Driver mode */ +static int drv_mode = (DRV_MODE_BT | DRV_MODE_FM | DRV_MODE_NFC); + +/** BT interface name */ +static char *bt_name; +/** FM interface name */ +static char *fm_name; +/** NFC interface name */ +static char *nfc_name; +/** BT debug interface name */ +static char *debug_name; + +/** Firmware flag */ +static int fw = 1; +/** default powermode */ +static int psmode = 1; +/** Default CRC check control */ +static int fw_crc_check = 1; +/** Init config file (MAC address, register etc.) */ +static char *init_cfg; +/** Calibration config file (MAC address, init powe etc.) */ +static char *cal_cfg; +/** Calibration config file EXT */ +static char *cal_cfg_ext; +/** Init MAC address */ +static char *bt_mac; +static int mbt_gpio_pin; + +/** Setting mbt_drvdbg value based on DEBUG level */ +#ifdef DEBUG_LEVEL1 +#ifdef DEBUG_LEVEL2 +#define DEFAULT_DEBUG_MASK (0xffffffff & ~DBG_EVENT) +#else +#define DEFAULT_DEBUG_MASK (DBG_MSG | DBG_FATAL | DBG_ERROR) +#endif /* DEBUG_LEVEL2 */ +u32 mbt_drvdbg = DEFAULT_DEBUG_MASK; +#endif + +#ifdef CONFIG_OF +static int dts_enable = 1; +#endif + +#ifdef SDIO_SUSPEND_RESUME +/** PM keep power */ +int mbt_pm_keep_power = 1; +#endif + +static int debug_intf = 1; + +/** + * @brief Alloc bt device + * + * @return pointer to structure mbt_dev or NULL + */ +struct mbt_dev * +alloc_mbt_dev(void) +{ + struct mbt_dev *mbt_dev; + ENTER(); + + mbt_dev = kzalloc(sizeof(struct mbt_dev), GFP_KERNEL); + if (!mbt_dev) { + LEAVE(); + return NULL; + } + + LEAVE(); + return mbt_dev; +} + +/** + * @brief Alloc fm device + * + * @return pointer to structure fm_dev or NULL + */ +struct fm_dev * +alloc_fm_dev(void) +{ + struct fm_dev *fm_dev; + ENTER(); + + fm_dev = kzalloc(sizeof(struct fm_dev), GFP_KERNEL); + if (!fm_dev) { + LEAVE(); + return NULL; + } + + LEAVE(); + return fm_dev; +} + +/** + * @brief Alloc nfc device + * + * @return pointer to structure nfc_dev or NULL + */ +struct nfc_dev * +alloc_nfc_dev(void) +{ + struct nfc_dev *nfc_dev; + ENTER(); + + nfc_dev = kzalloc(sizeof(struct nfc_dev), GFP_KERNEL); + if (!nfc_dev) { + LEAVE(); + return NULL; + } + + LEAVE(); + return nfc_dev; +} + +/** + * @brief Alloc debug device + * + * @return pointer to structure debug_level or NULL + */ +struct debug_dev * +alloc_debug_dev(void) +{ + struct debug_dev *debug_dev; + ENTER(); + + debug_dev = kzalloc(sizeof(struct debug_dev), GFP_KERNEL); + if (!debug_dev) { + LEAVE(); + return NULL; + } + + LEAVE(); + return debug_dev; +} + +/** + * @brief Frees m_dev + * + * @return N/A + */ +void +free_m_dev(struct m_dev *m_dev) +{ + ENTER(); + kfree(m_dev->dev_pointer); + m_dev->dev_pointer = NULL; + LEAVE(); +} + +/** + * @brief clean up m_devs + * + * @return N/A + */ +void +clean_up_m_devs(bt_private *priv) +{ + struct m_dev *m_dev = NULL; + int i; + + ENTER(); + if (priv->bt_dev.m_dev[BT_SEQ].dev_pointer) { + m_dev = &(priv->bt_dev.m_dev[BT_SEQ]); + PRINTM(MSG, "BT: Delete %s\n", m_dev->name); + if (m_dev->spec_type == IANYWHERE_SPEC) { + if ((drv_mode & DRV_MODE_BT) && (mbtchar_minor > 0)) + mbtchar_minor--; + m_dev->close(m_dev); + for (i = 0; i < 3; i++) + kfree_skb(((struct mbt_dev *) + (m_dev->dev_pointer))-> + reassembly[i]); + /** unregister m_dev to char_dev */ + if (chardev_class) + chardev_cleanup_one(m_dev, chardev_class); + free_m_dev(m_dev); + } + priv->bt_dev.m_dev[BT_SEQ].dev_pointer = NULL; + } + if (priv->bt_dev.m_dev[FM_SEQ].dev_pointer) { + m_dev = &(priv->bt_dev.m_dev[FM_SEQ]); + PRINTM(MSG, "BT: Delete %s\n", m_dev->name); + if ((drv_mode & DRV_MODE_FM) && (fmchar_minor > 0)) + fmchar_minor--; + m_dev->close(m_dev); + /** unregister m_dev to char_dev */ + if (chardev_class) + chardev_cleanup_one(m_dev, chardev_class); + free_m_dev(m_dev); + priv->bt_dev.m_dev[FM_SEQ].dev_pointer = NULL; + } + if (priv->bt_dev.m_dev[NFC_SEQ].dev_pointer) { + m_dev = &(priv->bt_dev.m_dev[NFC_SEQ]); + PRINTM(MSG, "BT: Delete %s\n", m_dev->name); + if ((drv_mode & DRV_MODE_NFC) && (nfcchar_minor > 0)) + nfcchar_minor--; + m_dev->close(m_dev); + /** unregister m_dev to char_dev */ + if (chardev_class) + chardev_cleanup_one(m_dev, chardev_class); + free_m_dev(m_dev); + priv->bt_dev.m_dev[NFC_SEQ].dev_pointer = NULL; + } + if (priv->bt_dev.m_dev[DEBUG_SEQ].dev_pointer) { + m_dev = &(priv->bt_dev.m_dev[DEBUG_SEQ]); + PRINTM(MSG, "BT: Delete %s\n", m_dev->name); + if ((debug_intf) && (debugchar_minor > 0)) + debugchar_minor--; + /** unregister m_dev to char_dev */ + if (chardev_class) + chardev_cleanup_one(m_dev, chardev_class); + free_m_dev(m_dev); + priv->bt_dev.m_dev[DEBUG_SEQ].dev_pointer = NULL; + } + LEAVE(); + return; +} + +/** + * @brief This function verify the received event pkt + * + * Event format: + * +--------+--------+--------+--------+--------+ + * | Event | Length | ncmd | Opcode | + * +--------+--------+--------+--------+--------+ + * | 1-byte | 1-byte | 1-byte | 2-byte | + * +--------+--------+--------+--------+--------+ + * + * @param priv A pointer to bt_private structure + * @param skb A pointer to rx skb + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +check_evtpkt(bt_private *priv, struct sk_buff *skb) +{ + struct hci_event_hdr *hdr = (struct hci_event_hdr *)skb->data; + struct hci_ev_cmd_complete *ec; + u16 opcode, ocf; + int ret = BT_STATUS_SUCCESS; + ENTER(); + if (!priv->bt_dev.sendcmdflag) { + ret = BT_STATUS_FAILURE; + goto exit; + } + if (hdr->evt == HCI_EV_CMD_COMPLETE) { + ec = (struct hci_ev_cmd_complete *) + (skb->data + HCI_EVENT_HDR_SIZE); + opcode = __le16_to_cpu(ec->opcode); + ocf = hci_opcode_ocf(opcode); + PRINTM(CMD, "BT: CMD_COMPLTE ocf=0x%x, send_cmd_ocf=0x%x\n", + ocf, priv->bt_dev.send_cmd_ocf); + if (ocf != priv->bt_dev.send_cmd_ocf) { + ret = BT_STATUS_FAILURE; + goto exit; + } + switch (ocf) { + case BT_CMD_MODULE_CFG_REQ: + case BT_CMD_BLE_DEEP_SLEEP: + case BT_CMD_CONFIG_MAC_ADDR: + case BT_CMD_CSU_WRITE_REG: + case BT_CMD_LOAD_CONFIG_DATA: + case BT_CMD_LOAD_CONFIG_DATA_EXT: + case BT_CMD_AUTO_SLEEP_MODE: + case BT_CMD_HOST_SLEEP_CONFIG: + case BT_CMD_SDIO_PULL_CFG_REQ: + case BT_CMD_SET_EVT_FILTER: + case BT_CMD_ENABLE_WRITE_SCAN: + // case BT_CMD_ENABLE_DEVICE_TESTMODE: + case BT_CMD_RESET: + case BT_CMD_SET_GPIO_PIN: + priv->bt_dev.sendcmdflag = FALSE; + priv->adapter->cmd_complete = TRUE; + wake_up_interruptible(&priv->adapter->cmd_wait_q); + break; + case BT_CMD_GET_FW_VERSION: + { + u8 *pos = (skb->data + HCI_EVENT_HDR_SIZE + + sizeof(struct hci_ev_cmd_complete) + + 1); + snprintf(fw_version, sizeof(fw_version), + "%u.%u.%u.p%u", pos[2], pos[1], pos[0], + pos[3]); + priv->bt_dev.sendcmdflag = FALSE; + priv->adapter->cmd_complete = TRUE; + wake_up_interruptible(&priv->adapter-> + cmd_wait_q); + break; + } + case BT_CMD_HISTOGRAM: + { + u8 *status = + skb->data + HCI_EVENT_HDR_SIZE + + sizeof(struct hci_ev_cmd_complete); + u8 *pos = + (skb->data + HCI_EVENT_HDR_SIZE + + sizeof(struct hci_ev_cmd_complete) + + 1); + if (*status == 0) { + priv->hist_data_len = + hdr->plen - + sizeof(struct + hci_ev_cmd_complete) - 1; + if (priv->hist_data_len > + sizeof(priv->hist_data)) + priv->hist_data_len = + sizeof(priv->hist_data); + memcpy(priv->hist_data, pos, + priv->hist_data_len); + PRINTM(CMD, "histogram len=%d\n", + priv->hist_data_len); + } + priv->bt_dev.sendcmdflag = FALSE; + priv->adapter->cmd_complete = TRUE; + wake_up_interruptible(&priv->adapter-> + cmd_wait_q); + break; + } +#ifdef SDIO_SUSPEND_RESUME + case FM_CMD: + { + u8 *pos = + (skb->data + HCI_EVENT_HDR_SIZE + + sizeof(struct hci_ev_cmd_complete) + + 1); + if (*pos == FM_SET_INTR_MASK) { + priv->bt_dev.sendcmdflag = FALSE; + priv->adapter->cmd_complete = TRUE; + wake_up_interruptible(&priv->adapter-> + cmd_wait_q); + } + } + break; +#endif + case BT_CMD_HOST_SLEEP_ENABLE: + priv->bt_dev.sendcmdflag = FALSE; + break; + default: + ret = BT_STATUS_FAILURE; + break; + } + } +exit: + if (ret == BT_STATUS_SUCCESS) + kfree_skb(skb); + LEAVE(); + return ret; +} + +/** + * @brief This function process the received event + * + * Event format: + * +--------+--------+--------+--------+-----+ + * | EC | Length | Data | + * +--------+--------+--------+--------+-----+ + * | 1-byte | 1-byte | n-byte | + * +--------+--------+--------+--------+-----+ + * + * @param priv A pointer to bt_private structure + * @param skb A pointer to rx skb + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_process_event(bt_private *priv, struct sk_buff *skb) +{ + int ret = BT_STATUS_SUCCESS; + struct m_dev *m_dev = &(priv->bt_dev.m_dev[BT_SEQ]); + BT_EVENT *pevent; + + ENTER(); + pevent = (BT_EVENT *)skb->data; + if (pevent->EC != 0xff) { + PRINTM(CMD, "BT: Not Marvell Event=0x%x\n", pevent->EC); + ret = BT_STATUS_FAILURE; + goto exit; + } + switch (pevent->data[0]) { + case BT_CMD_HISTOGRAM: + break; + case BT_CMD_AUTO_SLEEP_MODE: + if (pevent->data[2] == BT_STATUS_SUCCESS) { + if (pevent->data[1] == BT_PS_ENABLE) + priv->adapter->psmode = 1; + else + priv->adapter->psmode = 0; + PRINTM(CMD, "BT: PS Mode %s:%s\n", m_dev->name, + (priv->adapter->psmode) ? "Enable" : "Disable"); + + } else { + PRINTM(CMD, "BT: PS Mode Command Fail %s\n", + m_dev->name); + } + break; + case BT_CMD_HOST_SLEEP_CONFIG: + if (pevent->data[3] == BT_STATUS_SUCCESS) { + PRINTM(CMD, "BT: %s: gpio=0x%x, gap=0x%x\n", + m_dev->name, pevent->data[1], pevent->data[2]); + } else { + PRINTM(CMD, "BT: %s: HSCFG Command Fail\n", + m_dev->name); + } + break; + case BT_CMD_HOST_SLEEP_ENABLE: + if (pevent->data[1] == BT_STATUS_SUCCESS) { + priv->adapter->hs_state = HS_ACTIVATED; + if (priv->adapter->suspend_fail == FALSE) { +#ifdef SDIO_SUSPEND_RESUME +#ifdef MMC_PM_KEEP_POWER +#ifdef MMC_PM_FUNC_SUSPENDED + bt_is_suspended(priv); +#endif +#endif +#endif + wake_up_interruptible(&priv->adapter-> + cmd_wait_q); + } + if (priv->adapter->psmode) + priv->adapter->ps_state = PS_SLEEP; + PRINTM(CMD, "BT: EVENT %s: HS ACTIVATED!\n", + m_dev->name); + + } else { + PRINTM(CMD, "BT: %s: HS Enable Fail\n", m_dev->name); + } + break; + case BT_CMD_MODULE_CFG_REQ: + if ((priv->bt_dev.sendcmdflag == TRUE) && + ((pevent->data[1] == MODULE_BRINGUP_REQ) + || (pevent->data[1] == MODULE_SHUTDOWN_REQ))) { + if (pevent->data[1] == MODULE_BRINGUP_REQ) { + PRINTM(CMD, "BT: EVENT %s:%s\n", m_dev->name, + (pevent->data[2] && (pevent->data[2] != + MODULE_CFG_RESP_ALREADY_UP)) + ? "Bring up Fail" : "Bring up success"); + priv->bt_dev.devType = pevent->data[3]; + PRINTM(CMD, "devType:%s\n", + (pevent->data[3] == + DEV_TYPE_AMP) ? "AMP controller" : + "BR/EDR controller"); + priv->bt_dev.devFeature = pevent->data[4]; + PRINTM(CMD, + "devFeature: %s, %s, %s, %s, %s\n", + ((pevent-> + data[4] & DEV_FEATURE_BT) ? + "BT Feature" : "No BT Feature"), + ((pevent-> + data[4] & DEV_FEATURE_BTAMP) ? + "BTAMP Feature" : "No BTAMP Feature"), + ((pevent-> + data[4] & DEV_FEATURE_BLE) ? + "BLE Feature" : "No BLE Feature"), + ((pevent-> + data[4] & DEV_FEATURE_FM) ? + "FM Feature" : "No FM Feature"), + ((pevent-> + data[4] & DEV_FEATURE_NFC) ? + "NFC Feature" : "No NFC Feature")); + } + if (pevent->data[1] == MODULE_SHUTDOWN_REQ) { + PRINTM(CMD, "BT: EVENT %s:%s\n", m_dev->name, + (pevent->data[2]) ? "Shut down Fail" + : "Shut down success"); + + } + if (pevent->data[2]) { + priv->bt_dev.sendcmdflag = FALSE; + priv->adapter->cmd_complete = TRUE; + wake_up_interruptible(&priv->adapter-> + cmd_wait_q); + } + } else { + PRINTM(CMD, "BT_CMD_MODULE_CFG_REQ resp for APP\n"); + ret = BT_STATUS_FAILURE; + } + break; + case BT_EVENT_POWER_STATE: + if (pevent->data[1] == BT_PS_SLEEP) + priv->adapter->ps_state = PS_SLEEP; + PRINTM(CMD, "BT: EVENT %s:%s\n", m_dev->name, + (priv->adapter->ps_state) ? "PS_SLEEP" : "PS_AWAKE"); + + break; + case BT_CMD_SDIO_PULL_CFG_REQ: + if (pevent->data[pevent->length - 1] == BT_STATUS_SUCCESS) + PRINTM(CMD, "BT: %s: SDIO pull configuration success\n", + m_dev->name); + + else { + PRINTM(CMD, "BT: %s: SDIO pull configuration fail\n", + m_dev->name); + + } + break; + default: + PRINTM(CMD, "BT: Unknown Event=%d %s\n", pevent->data[0], + m_dev->name); + ret = BT_STATUS_FAILURE; + break; + } +exit: + if (ret == BT_STATUS_SUCCESS) + kfree_skb(skb); + LEAVE(); + return ret; +} + +/** + * @brief This function save the dump info to file + * + * + * @param dir_name directory name + * @param file_name file_name + * @return 0 --success otherwise fail + */ +int +bt_save_dump_info_to_file(char *dir_name, char *file_name, u8 *buf, u32 buf_len) +{ + int ret = BT_STATUS_SUCCESS; + struct file *pfile = NULL; + u8 name[64]; + mm_segment_t fs; + loff_t pos; + + ENTER(); + + if (!dir_name || !file_name || !buf) { + PRINTM(ERROR, "Can't save dump info to file\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + + memset(name, 0, sizeof(name)); + sprintf((char *)name, "%s/%s", dir_name, file_name); + pfile = filp_open((const char *)name, O_CREAT | O_RDWR, 0644); + if (IS_ERR(pfile)) { + PRINTM(MSG, + "Create file %s error, try to save dump file in /var\n", + name); + memset(name, 0, sizeof(name)); + sprintf((char *)name, "%s/%s", "/var", file_name); + pfile = filp_open((const char *)name, O_CREAT | O_RDWR, 0644); + } + if (IS_ERR(pfile)) { + PRINTM(ERROR, "Create Dump file for %s error\n", name); + ret = BT_STATUS_FAILURE; + goto done; + } + + PRINTM(MSG, "Dump data %s saved in %s\n", file_name, name); + + fs = get_fs(); + set_fs(KERNEL_DS); + pos = 0; + vfs_write(pfile, (const char __user *)buf, buf_len, &pos); + filp_close(pfile, NULL); + set_fs(fs); + + PRINTM(MSG, "Dump data %s saved in %s successfully\n", file_name, name); + +done: + LEAVE(); + return ret; +} + +#define DEBUG_HOST_READY 0xEE +#define DEBUG_FW_DONE 0xFF +#define MAX_POLL_TRIES 100 + +#define DEBUG_DUMP_CTRL_REG_8897 0xE2 +#define DEBUG_DUMP_START_REG_8897 0xE3 +#define DEBUG_DUMP_END_REG_8897 0xEA +#define DEBUG_DUMP_CTRL_REG_8887 0xA2 +#define DEBUG_DUMP_START_REG_8887 0xA3 +#define DEBUG_DUMP_END_REG_8887 0xAA + +typedef enum { + DUMP_TYPE_ITCM = 0, + DUMP_TYPE_DTCM = 1, + DUMP_TYPE_SQRAM = 2, + DUMP_TYPE_APU_REGS = 3, + DUMP_TYPE_CIU_REGS = 4, + DUMP_TYPE_ICU_REGS = 5, + DUMP_TYPE_MAC_REGS = 6, + DUMP_TYPE_EXTEND_7 = 7, + DUMP_TYPE_EXTEND_8 = 8, + DUMP_TYPE_EXTEND_9 = 9, + DUMP_TYPE_EXTEND_10 = 10, + DUMP_TYPE_EXTEND_11 = 11, + DUMP_TYPE_EXTEND_12 = 12, + DUMP_TYPE_EXTEND_13 = 13, + DUMP_TYPE_EXTEND_LAST = 14 +} dumped_mem_type; + +#define MAX_NAME_LEN 8 +#define MAX_FULL_NAME_LEN 32 + +typedef struct { + u8 mem_name[MAX_NAME_LEN]; + u8 *mem_Ptr; + struct file *pfile_mem; + u8 done_flag; +} memory_type_mapping; + +memory_type_mapping bt_mem_type_mapping_tbl[] = { + {"ITCM", NULL, NULL, 0xF0}, + {"DTCM", NULL, NULL, 0xF1}, + {"SQRAM", NULL, NULL, 0xF2}, + {"APU", NULL, NULL, 0xF3}, + {"CIU", NULL, NULL, 0xF4}, + {"ICU", NULL, NULL, 0xF5}, + {"MAC", NULL, NULL, 0xF6}, + {"EXT7", NULL, NULL, 0xF7}, + {"EXT8", NULL, NULL, 0xF8}, + {"EXT9", NULL, NULL, 0xF9}, + {"EXT10", NULL, NULL, 0xFA}, + {"EXT11", NULL, NULL, 0xFB}, + {"EXT12", NULL, NULL, 0xFC}, + {"EXT13", NULL, NULL, 0xFD}, + {"EXTLAST", NULL, NULL, 0xFE}, +}; + +typedef enum { + RDWR_STATUS_SUCCESS = 0, + RDWR_STATUS_FAILURE = 1, + RDWR_STATUS_DONE = 2 +} rdwr_status; + +/** + * @brief This function read/write firmware via cmd52 + * + * @param phandle A pointer to moal_handle + * + * @return MLAN_STATUS_SUCCESS + */ +rdwr_status +bt_cmd52_rdwr_firmware(bt_private *priv, u8 doneflag) +{ + int ret = 0; + int tries = 0; + u8 ctrl_data = 0; + u8 dbg_dump_ctrl_reg = 0; + + if (priv->card_type == CARD_TYPE_SD8887) + dbg_dump_ctrl_reg = DEBUG_DUMP_CTRL_REG_8887; + else if (priv->card_type == CARD_TYPE_SD8897) + dbg_dump_ctrl_reg = DEBUG_DUMP_CTRL_REG_8897; + + sdio_writeb(((struct sdio_mmc_card *)priv->bt_dev.card)->func, + DEBUG_HOST_READY, dbg_dump_ctrl_reg, &ret); + if (ret) { + PRINTM(ERROR, "SDIO Write ERR\n"); + return RDWR_STATUS_FAILURE; + } + for (tries = 0; tries < MAX_POLL_TRIES; tries++) { + ctrl_data = + sdio_readb(((struct sdio_mmc_card *)priv->bt_dev.card)-> + func, dbg_dump_ctrl_reg, &ret); + if (ret) { + PRINTM(ERROR, "SDIO READ ERR\n"); + return RDWR_STATUS_FAILURE; + } + if (ctrl_data == DEBUG_FW_DONE) + break; + if (doneflag && ctrl_data == doneflag) + return RDWR_STATUS_DONE; + if (ctrl_data != DEBUG_HOST_READY) { + PRINTM(INFO, + "The ctrl reg was changed, re-try again!\n"); + sdio_writeb(((struct sdio_mmc_card *)priv->bt_dev. + card)->func, DEBUG_HOST_READY, + dbg_dump_ctrl_reg, &ret); + if (ret) { + PRINTM(ERROR, "SDIO Write ERR\n"); + return RDWR_STATUS_FAILURE; + } + } + udelay(100); + } + if (ctrl_data == DEBUG_HOST_READY) { + PRINTM(ERROR, "Fail to pull ctrl_data\n"); + return RDWR_STATUS_FAILURE; + } + + return RDWR_STATUS_SUCCESS; +} + +/** + * @brief This function dump firmware memory to file + * + * @param phandle A pointer to moal_handle + * + * @return N/A + */ +void +bt_dump_firmware_info_v2(bt_private *priv) +{ + int ret = 0; + unsigned int reg, reg_start, reg_end; + u8 *dbg_ptr = NULL; + u8 dump_num = 0; + u8 idx = 0; + u8 doneflag = 0; + rdwr_status stat; + u8 i = 0; + u8 read_reg = 0; + u32 memory_size = 0; + u8 path_name[64], file_name[32]; + u8 *end_ptr = NULL; + u8 dbg_dump_start_reg = 0; + u8 dbg_dump_end_reg = 0; + + if (!priv) { + PRINTM(ERROR, "Could not dump firmwware info\n"); + return; + } + + if ((priv->card_type != CARD_TYPE_SD8887) && + (priv->card_type != CARD_TYPE_SD8897)) { + PRINTM(MSG, "card_type %d don't support FW dump\n", + priv->card_type); + return; + } + + memset(path_name, 0, sizeof(path_name)); + strcpy((char *)path_name, "/data"); + PRINTM(MSG, "Create DUMP directory success:dir_name=%s\n", path_name); + + if (priv->card_type == CARD_TYPE_SD8887) { + dbg_dump_start_reg = DEBUG_DUMP_START_REG_8887; + dbg_dump_end_reg = DEBUG_DUMP_END_REG_8887; + } else if (priv->card_type == CARD_TYPE_SD8897) { + dbg_dump_start_reg = DEBUG_DUMP_START_REG_8897; + dbg_dump_end_reg = DEBUG_DUMP_END_REG_8897; + } + + sbi_wakeup_firmware(priv); + sdio_claim_host(((struct sdio_mmc_card *)priv->bt_dev.card)->func); + /* start dump fw memory */ + PRINTM(MSG, "==== DEBUG MODE OUTPUT START ====\n"); + /* read the number of the memories which will dump */ + if (RDWR_STATUS_FAILURE == bt_cmd52_rdwr_firmware(priv, doneflag)) + goto done; + reg = dbg_dump_start_reg; + dump_num = + sdio_readb(((struct sdio_mmc_card *)priv->bt_dev.card)->func, + reg, &ret); + if (ret) { + PRINTM(MSG, "SDIO READ MEM NUM ERR\n"); + goto done; + } + + /* read the length of every memory which will dump */ + for (idx = 0; idx < dump_num; idx++) { + if (RDWR_STATUS_FAILURE == + bt_cmd52_rdwr_firmware(priv, doneflag)) + goto done; + memory_size = 0; + reg = dbg_dump_start_reg; + for (i = 0; i < 4; i++) { + read_reg = + sdio_readb(((struct sdio_mmc_card *)priv-> + bt_dev.card)->func, reg, &ret); + if (ret) { + PRINTM(MSG, "SDIO READ ERR\n"); + goto done; + } + memory_size |= (read_reg << i * 8); + reg++; + } + if (memory_size == 0) { + PRINTM(MSG, "Firmware Dump Finished!\n"); + break; + } else { + PRINTM(MSG, "%s_SIZE=0x%x\n", + bt_mem_type_mapping_tbl[idx].mem_name, + memory_size); + bt_mem_type_mapping_tbl[idx].mem_Ptr = + vmalloc(memory_size + 1); + if ((ret != BT_STATUS_SUCCESS) || + !bt_mem_type_mapping_tbl[idx].mem_Ptr) { + PRINTM(ERROR, + "Error: vmalloc %s buffer failed!!!\n", + bt_mem_type_mapping_tbl[idx].mem_name); + goto done; + } + dbg_ptr = bt_mem_type_mapping_tbl[idx].mem_Ptr; + end_ptr = dbg_ptr + memory_size; + } + doneflag = bt_mem_type_mapping_tbl[idx].done_flag; + PRINTM(MSG, "Start %s output, please wait...\n", + bt_mem_type_mapping_tbl[idx].mem_name); + do { + stat = bt_cmd52_rdwr_firmware(priv, doneflag); + if (RDWR_STATUS_FAILURE == stat) + goto done; + + reg_start = dbg_dump_start_reg; + reg_end = dbg_dump_end_reg; + for (reg = reg_start; reg <= reg_end; reg++) { + *dbg_ptr = + sdio_readb(((struct sdio_mmc_card *) + priv->bt_dev.card)->func, + reg, &ret); + if (ret) { + PRINTM(MSG, "SDIO READ ERR\n"); + goto done; + } + if (dbg_ptr < end_ptr) + dbg_ptr++; + else + PRINTM(MSG, + "pre-allocced buf is not enough\n"); + } + if (RDWR_STATUS_DONE == stat) { + PRINTM(MSG, "%s done:" + "size = 0x%x\n", + bt_mem_type_mapping_tbl[idx].mem_name, + (unsigned int)(dbg_ptr - + bt_mem_type_mapping_tbl + [idx].mem_Ptr)); + memset(file_name, 0, sizeof(file_name)); + sprintf((char *)file_name, "%s%s", "file_bt_", + bt_mem_type_mapping_tbl[idx].mem_name); + if (BT_STATUS_SUCCESS != + bt_save_dump_info_to_file((char *)path_name, + (char *)file_name, + bt_mem_type_mapping_tbl + [idx].mem_Ptr, + memory_size)) + PRINTM(MSG, + "Can't save dump file %s in %s\n", + file_name, path_name); + vfree(bt_mem_type_mapping_tbl[idx].mem_Ptr); + bt_mem_type_mapping_tbl[idx].mem_Ptr = NULL; + break; + } + } while (1); + } + PRINTM(MSG, "==== DEBUG MODE OUTPUT END ====\n"); + /* end dump fw memory */ +done: + sdio_release_host(((struct sdio_mmc_card *)priv->bt_dev.card)->func); + for (idx = 0; idx < dump_num; idx++) { + if (bt_mem_type_mapping_tbl[idx].mem_Ptr) { + vfree(bt_mem_type_mapping_tbl[idx].mem_Ptr); + bt_mem_type_mapping_tbl[idx].mem_Ptr = NULL; + } + } + PRINTM(MSG, "==== DEBUG MODE END ====\n"); + return; +} + +/** + * @brief This function shows debug info for timeout of command sending. + * + * @param adapter A pointer to bt_private + * @param cmd Timeout command id + * + * @return N/A + */ +static void +bt_cmd_timeout_func(bt_private *priv, u16 cmd) +{ + bt_adapter *adapter = priv->adapter; + ENTER(); + + adapter->num_cmd_timeout++; + + PRINTM(ERROR, "Version = %s\n", adapter->drv_ver); + PRINTM(ERROR, "Timeout Command id = 0x%x\n", cmd); + PRINTM(ERROR, "Number of command timeout = %d\n", + adapter->num_cmd_timeout); + PRINTM(ERROR, "Interrupt counter = %d\n", adapter->IntCounter); + PRINTM(ERROR, "Power Save mode = %d\n", adapter->psmode); + PRINTM(ERROR, "Power Save state = %d\n", adapter->ps_state); + PRINTM(ERROR, "Host Sleep state = %d\n", adapter->hs_state); + PRINTM(ERROR, "hs skip count = %d\n", adapter->hs_skip); + PRINTM(ERROR, "suspend_fail flag = %d\n", adapter->suspend_fail); + PRINTM(ERROR, "suspended flag = %d\n", adapter->is_suspended); + PRINTM(ERROR, "Number of wakeup tries = %d\n", adapter->WakeupTries); + PRINTM(ERROR, "Host Cmd complet state = %d\n", adapter->cmd_complete); + PRINTM(ERROR, "Last irq recv = %d\n", adapter->irq_recv); + PRINTM(ERROR, "Last irq processed = %d\n", adapter->irq_done); + PRINTM(ERROR, "tx pending = %d\n", adapter->skb_pending); + PRINTM(ERROR, "sdio int status = %d\n", adapter->sd_ireg); + bt_dump_sdio_regs(priv); + LEAVE(); +} + +/** + * @brief This function send reset cmd to firmware + * + * @param priv A pointer to bt_private structure + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_send_reset_command(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_HCI_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_HCI_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_HCI_CMD *)skb->data; + pcmd->ocf_ogf = (RESET_OGF << 10) | BT_CMD_RESET; + pcmd->length = 0x00; + pcmd->cmd_type = 0x00; + bt_cb(skb)->pkt_type = HCI_COMMAND_PKT; + skb_put(skb, 3); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_RESET; + priv->adapter->cmd_complete = FALSE; + PRINTM(CMD, "Queue Reset Command(0x%x)\n", pcmd->ocf_ogf); + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: Reset timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_RESET); + } else { + PRINTM(CMD, "BT: Reset Command done\n"); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function sends module cfg cmd to firmware + * + * Command format: + * +--------+--------+--------+--------+--------+--------+--------+ + * | OCF OGF | Length | Data | + * +--------+--------+--------+--------+--------+--------+--------+ + * | 2-byte | 1-byte | 4-byte | + * +--------+--------+--------+--------+--------+--------+--------+ + * + * @param priv A pointer to bt_private structure + * @param subcmd sub command + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_send_module_cfg_cmd(bt_private *priv, int subcmd) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "BT: No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_MODULE_CFG_REQ; + pcmd->length = 1; + pcmd->data[0] = subcmd; + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_MODULE_CFG_REQ; + priv->adapter->cmd_complete = FALSE; + PRINTM(CMD, "Queue module cfg Command(0x%x)\n", pcmd->ocf_ogf); + wake_up_interruptible(&priv->MainThread.waitQ); + /* + On some Android platforms certain delay is needed for HCI daemon to + remove this module and close itself gracefully. Otherwise it hangs. + This 10ms delay is a workaround for such platforms as the root cause + has not been found yet. */ + mdelay(10); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: module_cfg_cmd(%#x): timeout sendcmdflag=%d\n", + subcmd, priv->bt_dev.sendcmdflag); + bt_cmd_timeout_func(priv, BT_CMD_MODULE_CFG_REQ); + } else { + PRINTM(CMD, "BT: module cfg Command done\n"); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function to get histogram + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_get_histogram(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_HISTOGRAM; + pcmd->length = 0; + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + PRINTM(CMD, "Queue Histogram cmd(0x%x)\n", pcmd->ocf_ogf); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_HISTOGRAM; + priv->adapter->cmd_complete = FALSE; + priv->hist_data_len = 0; + memset(priv->hist_data, 0, sizeof(priv->hist_data)); + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: histogram timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_HISTOGRAM); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function enables power save mode + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_enable_ps(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_AUTO_SLEEP_MODE; + if (priv->bt_dev.psmode) + pcmd->data[0] = BT_PS_ENABLE; + else + pcmd->data[0] = BT_PS_DISABLE; + if (priv->bt_dev.idle_timeout) { + pcmd->length = 3; + pcmd->data[1] = (u8)(priv->bt_dev.idle_timeout & 0x00ff); + pcmd->data[2] = (priv->bt_dev.idle_timeout & 0xff00) >> 8; + } else { + pcmd->length = 1; + } + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + PRINTM(CMD, "Queue PSMODE Command(0x%x):%d\n", pcmd->ocf_ogf, + pcmd->data[0]); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_AUTO_SLEEP_MODE; + priv->adapter->cmd_complete = FALSE; + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: psmode timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_AUTO_SLEEP_MODE); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function sends hscfg command + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_send_hscfg_cmd(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_HOST_SLEEP_CONFIG; + pcmd->length = 2; + pcmd->data[0] = (priv->bt_dev.gpio_gap & 0xff00) >> 8; + pcmd->data[1] = (u8)(priv->bt_dev.gpio_gap & 0x00ff); + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + PRINTM(CMD, "Queue HSCFG Command(0x%x),gpio=0x%x,gap=0x%x\n", + pcmd->ocf_ogf, pcmd->data[0], pcmd->data[1]); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_HOST_SLEEP_CONFIG; + priv->adapter->cmd_complete = FALSE; + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: HSCFG timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_HOST_SLEEP_CONFIG); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function sends sdio pull ctrl command + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_send_sdio_pull_ctrl_cmd(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_SDIO_PULL_CFG_REQ; + pcmd->length = 4; + pcmd->data[0] = (priv->bt_dev.sdio_pull_cfg & 0x000000ff); + pcmd->data[1] = (priv->bt_dev.sdio_pull_cfg & 0x0000ff00) >> 8; + pcmd->data[2] = (priv->bt_dev.sdio_pull_cfg & 0x00ff0000) >> 16; + pcmd->data[3] = (priv->bt_dev.sdio_pull_cfg & 0xff000000) >> 24; + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + PRINTM(CMD, + "Queue SDIO PULL CFG Command(0x%x), PullUp=0x%x%x,PullDown=0x%x%x\n", + pcmd->ocf_ogf, pcmd->data[1], pcmd->data[0], + pcmd->data[3], pcmd->data[2]); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_SDIO_PULL_CFG_REQ; + priv->adapter->cmd_complete = FALSE; + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: SDIO PULL CFG timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_SDIO_PULL_CFG_REQ); + } +exit: + LEAVE(); + return ret; +} + +#ifdef SDIO_SUSPEND_RESUME +/** + * @brief This function set FM interrupt mask + * + * @param priv A pointer to bt_private structure + * + * @param priv FM interrupt mask value + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +fm_set_intr_mask(bt_private *priv, u32 mask) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | FM_CMD; + pcmd->length = 0x05; + pcmd->data[0] = FM_SET_INTR_MASK; + memcpy(&pcmd->data[1], &mask, sizeof(mask)); + PRINTM(CMD, "FM set intr mask=0x%x\n", mask); + bt_cb(skb)->pkt_type = HCI_COMMAND_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[FM_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = FM_CMD; + priv->adapter->cmd_complete = FALSE; + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout(priv->adapter->cmd_wait_q, + priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "FM: set intr mask=%d timeout\n", (int)mask); + bt_cmd_timeout_func(priv, FM_CMD); + } +exit: + LEAVE(); + return ret; +} +#endif + +/** + * @brief This function enables host sleep + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_enable_hs(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + priv->adapter->suspend_fail = FALSE; + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_HOST_SLEEP_ENABLE; + pcmd->length = 0; + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_HOST_SLEEP_ENABLE; + PRINTM(CMD, "Queue hs enable Command(0x%x)\n", pcmd->ocf_ogf); + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->hs_state, + WAIT_UNTIL_HS_STATE_CHANGED)) { + PRINTM(MSG, "BT: Enable host sleep timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_HOST_SLEEP_ENABLE); + } + OS_INT_DISABLE; + if ((priv->adapter->hs_state == HS_ACTIVATED) || + (priv->adapter->is_suspended == TRUE)) { + OS_INT_RESTORE; + PRINTM(MSG, "BT: suspend success! skip=%d\n", + priv->adapter->hs_skip); + } else { + priv->adapter->suspend_fail = TRUE; + OS_INT_RESTORE; + priv->adapter->hs_skip++; + ret = BT_STATUS_FAILURE; + PRINTM(MSG, + "BT: suspend skipped! " + "state=%d skip=%d ps_state= %d WakeupTries=%d\n", + priv->adapter->hs_state, priv->adapter->hs_skip, + priv->adapter->ps_state, priv->adapter->WakeupTries); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function Set Evt Filter + * + * @param priv A pointer to bt_private structure + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_set_evt_filter(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (0x03 << 10) | BT_CMD_SET_EVT_FILTER; + pcmd->length = 0x03; + pcmd->data[0] = 0x02; + pcmd->data[1] = 0x00; + pcmd->data[2] = 0x03; + bt_cb(skb)->pkt_type = HCI_COMMAND_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + PRINTM(CMD, "Queue Set Evt Filter Command(0x%x)\n", pcmd->ocf_ogf); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_SET_EVT_FILTER; + priv->adapter->cmd_complete = FALSE; + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout(priv->adapter->cmd_wait_q, + priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: Set Evt Filter timeout\n"); + bt_cmd_timeout_func(priv, BT_CMD_SET_EVT_FILTER); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function Enable Write Scan - Page and Inquiry + * + * @param priv A pointer to bt_private structure + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_enable_write_scan(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (0x03 << 10) | BT_CMD_ENABLE_WRITE_SCAN; + pcmd->length = 0x01; + pcmd->data[0] = 0x03; + bt_cb(skb)->pkt_type = HCI_COMMAND_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + PRINTM(CMD, "Queue Enable Write Scan Command(0x%x)\n", pcmd->ocf_ogf); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_ENABLE_WRITE_SCAN; + priv->adapter->cmd_complete = FALSE; + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout(priv->adapter->cmd_wait_q, + priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: Enable Write Scan timeout\n"); + bt_cmd_timeout_func(priv, BT_CMD_ENABLE_WRITE_SCAN); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function Enable Device under test mode + * + * @param priv A pointer to bt_private structure + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_enable_device_under_testmode(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (0x06 << 10) | BT_CMD_ENABLE_DEVICE_TESTMODE; + pcmd->length = 0x00; + bt_cb(skb)->pkt_type = HCI_COMMAND_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + PRINTM(CMD, "Queue enable device under testmode Command(0x%x)\n", + pcmd->ocf_ogf); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_ENABLE_DEVICE_TESTMODE; + priv->adapter->cmd_complete = FALSE; + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout(priv->adapter->cmd_wait_q, + priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: Enable Device under TEST mode timeout\n"); + bt_cmd_timeout_func(priv, BT_CMD_ENABLE_DEVICE_TESTMODE); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function enables test mode and send cmd + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_enable_test_mode(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + + ENTER(); + + /** Set Evt Filter Command */ + ret = bt_set_evt_filter(priv); + if (ret != BT_STATUS_SUCCESS) { + PRINTM(ERROR, "BT test_mode: Set Evt filter fail\n"); + goto exit; + } + + /** Enable Write Scan Command */ + ret = bt_enable_write_scan(priv); + if (ret != BT_STATUS_SUCCESS) { + PRINTM(ERROR, "BT test_mode: Enable Write Scan fail\n"); + goto exit; + } + + /** Enable Device under test mode */ + ret = bt_enable_device_under_testmode(priv); + if (ret != BT_STATUS_SUCCESS) + PRINTM(ERROR, + "BT test_mode: Enable device under testmode fail\n"); + +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function set GPIO pin + * + * @param priv A pointer to bt_private structure + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_set_gpio_pin(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + /**Interrupt falling edge **/ + u8 gpio_int_edge = INT_FALLING_EDGE; + /**Delay 50 usec **/ + u8 gpio_pulse_width = DELAY_50_US; + BT_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_SET_GPIO_PIN; + pcmd->data[0] = mbt_gpio_pin; + pcmd->data[1] = gpio_int_edge; + pcmd->data[2] = gpio_pulse_width; + pcmd->length = 3; + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_SET_GPIO_PIN; + priv->adapter->cmd_complete = FALSE; + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout(priv->adapter->cmd_wait_q, + priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: Set GPIO pin: timeout!\n"); + bt_cmd_timeout_func(priv, BT_CMD_SET_GPIO_PIN); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function sets ble deepsleep mode + * + * @param priv A pointer to bt_private structure + * @param mode TRUE/FALSE + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_set_ble_deepsleep(bt_private *priv, int mode) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_BLE_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_BLE_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_BLE_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_BLE_DEEP_SLEEP; + pcmd->length = 1; + pcmd->deepsleep = mode; + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, sizeof(BT_BLE_CMD)); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_BLE_DEEP_SLEEP; + priv->adapter->cmd_complete = FALSE; + PRINTM(CMD, "BT: Set BLE deepsleep = %d (0x%x)\n", mode, pcmd->ocf_ogf); + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: Set BLE deepsleep timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_BLE_DEEP_SLEEP); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function gets FW version + * + * @param priv A pointer to bt_private structure + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_get_fw_version(bt_private *priv) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_HCI_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_HCI_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_HCI_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_GET_FW_VERSION; + pcmd->length = 0x01; + pcmd->cmd_type = 0x00; + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, 4); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_GET_FW_VERSION; + priv->adapter->cmd_complete = FALSE; + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout(priv->adapter->cmd_wait_q, + priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: Get FW version: timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_GET_FW_VERSION); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function sets mac address + * + * @param priv A pointer to bt_private structure + * @param mac A pointer to mac address + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_set_mac_address(bt_private *priv, u8 *mac) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_HCI_CMD *pcmd; + int i = 0; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_HCI_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_HCI_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_CONFIG_MAC_ADDR; + pcmd->length = 8; + pcmd->cmd_type = MRVL_VENDOR_PKT; + pcmd->cmd_len = 6; + for (i = 0; i < 6; i++) + pcmd->data[i] = mac[5 - i]; + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, sizeof(BT_HCI_CMD)); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_CONFIG_MAC_ADDR; + priv->adapter->cmd_complete = FALSE; + PRINTM(CMD, "BT: Set mac addr " MACSTR " (0x%x)\n", MAC2STR(mac), + pcmd->ocf_ogf); + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(MSG, "BT: Set mac addr: timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_CONFIG_MAC_ADDR); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function load the calibrate data + * + * @param priv A pointer to bt_private structure + * @param config_data A pointer to calibrate data + * @param mac A pointer to mac address + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_load_cal_data(bt_private *priv, u8 *config_data, u8 *mac) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + int i = 0; + /* u8 config_data[28] = {0x37 0x01 0x1c 0x00 0xFF 0xFF 0xFF 0xFF 0x01 + 0x7f 0x04 0x02 0x00 0x00 0xBA 0xCE 0xC0 0xC6 0x2D 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0xF0}; */ + + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_LOAD_CONFIG_DATA; + pcmd->length = 0x20; + pcmd->data[0] = 0x00; + pcmd->data[1] = 0x00; + pcmd->data[2] = 0x00; + pcmd->data[3] = 0x1C; + /* swip cal-data byte */ + for (i = 4; i < 32; i++) + pcmd->data[i] = config_data[(i / 4) * 8 - 1 - i]; + if (mac != NULL) { + pcmd->data[2] = 0x01; /* skip checksum */ + for (i = 24; i < 30; i++) + pcmd->data[i] = mac[29 - i]; + } + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_LOAD_CONFIG_DATA; + priv->adapter->cmd_complete = FALSE; + + DBG_HEXDUMP(DAT_D, "calirate data: ", pcmd->data, 32); + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(ERROR, "BT: Load calibrate data: timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_LOAD_CONFIG_DATA); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function load the calibrate EXT data + * + * @param priv A pointer to bt_private structure + * @param config_data A pointer to calibrate data + * @param mac A pointer to mac address + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_load_cal_data_ext(bt_private *priv, u8 *config_data, u32 cfg_data_len) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CMD *pcmd; + + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_LOAD_CONFIG_DATA_EXT; + pcmd->length = cfg_data_len; + + memcpy(pcmd->data, config_data, cfg_data_len); + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, BT_CMD_HEADER_SIZE + pcmd->length); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_LOAD_CONFIG_DATA_EXT; + priv->adapter->cmd_complete = FALSE; + + DBG_HEXDUMP(DAT_D, "calirate ext data", pcmd->data, pcmd->length); + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(ERROR, "BT: Load calibrate ext data: timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_LOAD_CONFIG_DATA_EXT); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function writes value to CSU registers + * + * @param priv A pointer to bt_private structure + * @param type reg type + * @param offset register address + * @param value register value to write + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_write_reg(bt_private *priv, u8 type, u32 offset, u16 value) +{ + struct sk_buff *skb = NULL; + int ret = BT_STATUS_SUCCESS; + BT_CSU_CMD *pcmd; + ENTER(); + skb = bt_skb_alloc(sizeof(BT_CSU_CMD), GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "No free skb\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + pcmd = (BT_CSU_CMD *)skb->data; + pcmd->ocf_ogf = (VENDOR_OGF << 10) | BT_CMD_CSU_WRITE_REG; + pcmd->length = 7; + pcmd->type = type; + pcmd->offset[0] = (offset & 0x000000ff); + pcmd->offset[1] = (offset & 0x0000ff00) >> 8; + pcmd->offset[2] = (offset & 0x00ff0000) >> 16; + pcmd->offset[3] = (offset & 0xff000000) >> 24; + pcmd->value[0] = (value & 0x00ff); + pcmd->value[1] = (value & 0xff00) >> 8; + bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; + skb_put(skb, sizeof(BT_CSU_CMD)); + skb->dev = (void *)(&(priv->bt_dev.m_dev[BT_SEQ])); + skb_queue_head(&priv->adapter->tx_queue, skb); + priv->bt_dev.sendcmdflag = TRUE; + priv->bt_dev.send_cmd_ocf = BT_CMD_CSU_WRITE_REG; + priv->adapter->cmd_complete = FALSE; + PRINTM(CMD, "BT: Set CSU reg type=%d reg=0x%x value=0x%x\n", + type, offset, value); + wake_up_interruptible(&priv->MainThread.waitQ); + if (!os_wait_interruptible_timeout + (priv->adapter->cmd_wait_q, priv->adapter->cmd_complete, + WAIT_UNTIL_CMD_RESP)) { + ret = BT_STATUS_FAILURE; + PRINTM(ERROR, "BT: Set CSU reg timeout:\n"); + bt_cmd_timeout_func(priv, BT_CMD_CSU_WRITE_REG); + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function used to restore tx_queue + * + * @param priv A pointer to bt_private structure + * @return N/A + */ +void +bt_restore_tx_queue(bt_private *priv) +{ + struct sk_buff *skb = NULL; + while (!skb_queue_empty(&priv->adapter->pending_queue)) { + skb = skb_dequeue(&priv->adapter->pending_queue); + if (skb) + skb_queue_tail(&priv->adapter->tx_queue, skb); + } + wake_up_interruptible(&priv->MainThread.waitQ); +} + +/** + * @brief This function used to send command to firmware + * + * Command format: + * +--------+--------+--------+--------+--------+--------+--------+ + * | OCF OGF | Length | Data | + * +--------+--------+--------+--------+--------+--------+--------+ + * | 2-byte | 1-byte | 4-byte | + * +--------+--------+--------+--------+--------+--------+--------+ + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_prepare_command(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + ENTER(); + if (priv->bt_dev.hscfgcmd) { + priv->bt_dev.hscfgcmd = 0; + ret = bt_send_hscfg_cmd(priv); + } + if (priv->bt_dev.pscmd) { + priv->bt_dev.pscmd = 0; + ret = bt_enable_ps(priv); + } + if (priv->bt_dev.sdio_pull_ctrl) { + priv->bt_dev.sdio_pull_ctrl = 0; + ret = bt_send_sdio_pull_ctrl_cmd(priv); + } + if (priv->bt_dev.hscmd) { + priv->bt_dev.hscmd = 0; + if (priv->bt_dev.hsmode) + ret = bt_enable_hs(priv); + else { + ret = sbi_wakeup_firmware(priv); + priv->adapter->hs_state = HS_DEACTIVATED; + } + } + if (priv->bt_dev.test_mode) { + priv->bt_dev.test_mode = 0; + ret = bt_enable_test_mode(priv); + } + LEAVE(); + return ret; +} + +/** @brief This function processes a single packet + * + * @param priv A pointer to bt_private structure + * @param skb A pointer to skb which includes TX packet + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int +send_single_packet(bt_private *priv, struct sk_buff *skb) +{ + int ret; + int has_realloc = 0; + ENTER(); + if (!skb || !skb->data) { + LEAVE(); + return BT_STATUS_FAILURE; + } + + if (!skb->len || ((skb->len + BT_HEADER_LEN) > BT_UPLD_SIZE)) { + PRINTM(ERROR, "Tx Error: Bad skb length %d : %d\n", skb->len, + BT_UPLD_SIZE); + LEAVE(); + return BT_STATUS_FAILURE; + } + if (skb_headroom(skb) < BT_HEADER_LEN) { + skb = skb_realloc_headroom(skb, BT_HEADER_LEN); + if (!skb) { + PRINTM(ERROR, "TX error: realloc_headroom failed %d\n", + BT_HEADER_LEN); + LEAVE(); + return BT_STATUS_FAILURE; + } + has_realloc = 1; + } + /* This is SDIO specific header length: byte[3][2][1], * type: byte[0] + (HCI_COMMAND = 1, ACL_DATA = 2, SCO_DATA = 3, 0xFE = Vendor) */ + skb_push(skb, BT_HEADER_LEN); + skb->data[0] = (skb->len & 0x0000ff); + skb->data[1] = (skb->len & 0x00ff00) >> 8; + skb->data[2] = (skb->len & 0xff0000) >> 16; + skb->data[3] = bt_cb(skb)->pkt_type; + if (bt_cb(skb)->pkt_type == MRVL_VENDOR_PKT) + PRINTM(CMD, "DNLD_CMD: ocf_ogf=0x%x len=%d\n", + *((u16 *) & skb->data[4]), skb->len); + ret = sbi_host_to_card(priv, skb->data, skb->len); + if (has_realloc) + kfree_skb(skb); + LEAVE(); + return ret; +} + +#ifdef CONFIG_OF +/** + * @brief This function read the initial parameter from device tress + * + * + * @return N/A + */ +static void +bt_init_from_dev_tree(void) +{ + struct device_node *dt_node = NULL; + struct property *prop; + u32 data; + const char *string_data; + + ENTER(); + + if (!dts_enable) { + PRINTM(CMD, "DTS is disabled!"); + return; + } + + dt_node = of_find_node_by_name(NULL, "sd8xxx-bt"); + if (!dt_node) { + LEAVE(); + return; + } + for_each_property_of_node(dt_node, prop) { + if (!strncmp(prop->name, "mbt_drvdbg", strlen("mbt_drvdbg"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(CMD, "mbt_drvdbg=0x%x\n", data); + mbt_drvdbg = data; + } + } else if (!strncmp(prop->name, "init_cfg", strlen("init_cfg"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + init_cfg = (char *)string_data; + PRINTM(CMD, "init_cfg=%s\n", init_cfg); + } + } else if (!strncmp + (prop->name, "cal_cfg_ext", strlen("cal_cfg_ext"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + cal_cfg_ext = (char *)string_data; + PRINTM(CMD, "cal_cfg_ext=%s\n", cal_cfg_ext); + } + } else if (!strncmp(prop->name, "cal_cfg", strlen("cal_cfg"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + cal_cfg = (char *)string_data; + PRINTM(CMD, "cal_cfg=%s\n", cal_cfg); + } + } else if (!strncmp(prop->name, "bt_mac", strlen("bt_mac"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + bt_mac = (char *)string_data; + PRINTM(CMD, "bt_mac=%s\n", bt_mac); + } + } else if (!strncmp + (prop->name, "mbt_gpio_pin", + strlen("mbt_gpio_pin"))) { + if (!of_property_read_string + (dt_node, prop->name, &data)) { + mbt_gpio_pin = data; + PRINTM(CMD, "mbt_gpio_pin=%d\n", mbt_gpio_pin); + } + } + } + LEAVE(); + return; +} +#endif + +/** + * @brief This function initializes the adapter structure + * and set default value to the member of adapter. + * + * @param priv A pointer to bt_private structure + * @return N/A + */ +static void +bt_init_adapter(bt_private *priv) +{ + ENTER(); +#ifdef CONFIG_OF + bt_init_from_dev_tree(); +#endif + skb_queue_head_init(&priv->adapter->tx_queue); + skb_queue_head_init(&priv->adapter->pending_queue); + priv->adapter->tx_lock = FALSE; + priv->adapter->ps_state = PS_AWAKE; + priv->adapter->suspend_fail = FALSE; + priv->adapter->is_suspended = FALSE; + priv->adapter->hs_skip = 0; + priv->adapter->num_cmd_timeout = 0; + init_waitqueue_head(&priv->adapter->cmd_wait_q); + LEAVE(); +} + +/** + * @brief This function initializes firmware + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int +bt_init_fw(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + ENTER(); + if (fw == 0) { + sd_enable_host_int(priv); + goto done; + } + sd_disable_host_int(priv); + if ((priv->card_type == CARD_TYPE_SD8787) || + (priv->card_type == CARD_TYPE_SD8777)) + priv->fw_crc_check = fw_crc_check; + if (sbi_download_fw(priv)) { + PRINTM(ERROR, " FW failed to be download!\n"); + ret = BT_STATUS_FAILURE; + goto done; + } +done: + LEAVE(); + return ret; +} + +#define FW_POLL_TRIES 100 +#define FW_RESET_REG 0xB6 + +/** + * @brief This function reload firmware + * + * @param priv A pointer to bt_private + * + * @return 0--success, otherwise failure + */ +static int +bt_reload_fw(bt_private *priv) +{ + int ret = 0, tries = 0; + u8 value = 1; + + ENTER(); + /** Wake up firmware firstly */ + sbi_wakeup_firmware(priv); + + /** wait SOC fully wake up */ + for (tries = 0; tries < FW_POLL_TRIES; ++tries) { + ret = sd_write_reg(priv, FW_RESET_REG, 0xba); + if (!ret) { + ret = sd_read_reg(priv, FW_RESET_REG, &value); + if (!ret && (value == 0xba)) { + PRINTM(MSG, "Fw wake up\n"); + break; + } + } + udelay(1000); + } + + ret = sd_write_reg(priv, FW_RESET_REG, 1); + if (ret) { + PRINTM(ERROR, "Failed to write register.\n"); + goto done; + } + + /** Poll register around 1 ms */ + for (; tries < FW_POLL_TRIES; ++tries) { + ret = sd_read_reg(priv, FW_RESET_REG, &value); + if (ret) { + PRINTM(ERROR, "Failed to read register.\n"); + goto done; + } + if (value == 0) + /** FW is ready */ + break; + udelay(1000); + } + if (value) { + PRINTM(ERROR, "Failed to poll FW reset register %X=0x%x\n", + FW_RESET_REG, value); + ret = -EFAULT; + goto done; + } + + /** reload FW */ + ret = bt_init_fw(priv); + if (ret) { + PRINTM(ERROR, "Re download firmware failed.\n"); + ret = -EFAULT; + goto done; + } +done: + LEAVE(); + return ret; +} + +/** + * @brief This function request to reload firmware + * + * @param priv A pointer to bt_private + * + * @return N/A + */ +void +bt_request_fw_reload(bt_private *priv) +{ + ENTER(); + + /** Reload FW */ + priv->fw_reload = TRUE; + if (bt_reload_fw(priv)) { + PRINTM(ERROR, "FW reload fail\n"); + goto done; + } + priv->fw_reload = FALSE; + /** Other operation here? */ +done: + LEAVE(); + return; +} + +/** + * @brief This function frees the structure of adapter + * + * @param priv A pointer to bt_private structure + * @return N/A + */ +void +bt_free_adapter(bt_private *priv) +{ + bt_adapter *adapter = priv->adapter; + ENTER(); + skb_queue_purge(&priv->adapter->tx_queue); + kfree(adapter->hw_regs_buf); + /* Free the adapter object itself */ + kfree(adapter); + priv->adapter = NULL; + + LEAVE(); +} + +/** + * @brief This function handles the wrapper_dev ioctl + * + * @param hev A pointer to wrapper_dev structure + * @cmd ioctl cmd + * @arg argument + * @return -ENOIOCTLCMD + */ +static int +mdev_ioctl(struct m_dev *m_dev, unsigned int cmd, void *arg) +{ + ENTER(); + LEAVE(); + return -ENOIOCTLCMD; +} + +/** + * @brief This function handles wrapper device destruct + * + * @param m_dev A pointer to m_dev structure + * + * @return N/A + */ +static void +mdev_destruct(struct m_dev *m_dev) +{ + ENTER(); + LEAVE(); + return; +} + +/** + * @brief This function handles the wrapper device transmit + * + * @param m_dev A pointer to m_dev structure + * @param skb A pointer to sk_buff structure + * + * @return BT_STATUS_SUCCESS or other error no. + */ +static int +mdev_send_frame(struct m_dev *m_dev, struct sk_buff *skb) +{ + bt_private *priv = NULL; + + ENTER(); + if (!m_dev || !m_dev->driver_data) { + PRINTM(ERROR, "Frame for unknown HCI device (m_dev=NULL)\n"); + LEAVE(); + return -ENODEV; + } + priv = (bt_private *)m_dev->driver_data; + if (!test_bit(HCI_RUNNING, &m_dev->flags)) { + PRINTM(ERROR, "Fail test HCI_RUNNING, flag=0x%lx\n", + m_dev->flags); + LEAVE(); + return -EBUSY; + } + switch (bt_cb(skb)->pkt_type) { + case HCI_COMMAND_PKT: + m_dev->stat.cmd_tx++; + break; + case HCI_ACLDATA_PKT: + m_dev->stat.acl_tx++; + break; + case HCI_SCODATA_PKT: + m_dev->stat.sco_tx++; + break; + } + + if (m_dev->dev_type == DEBUG_TYPE) { + /* remember the ogf_ocf */ + priv->debug_device_pending = 1; + priv->debug_ocf_ogf[0] = skb->data[0]; + priv->debug_ocf_ogf[1] = skb->data[1]; + PRINTM(CMD, "debug_ocf_ogf[0]=0x%x debug_ocf_ogf[1]=0x%x\n", + priv->debug_ocf_ogf[0], priv->debug_ocf_ogf[1]); + } + + if (priv->adapter->tx_lock == TRUE) + skb_queue_tail(&priv->adapter->pending_queue, skb); + else + skb_queue_tail(&priv->adapter->tx_queue, skb); + wake_up_interruptible(&priv->MainThread.waitQ); + + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function flushes the transmit queue + * + * @param m_dev A pointer to m_dev structure + * + * @return BT_STATUS_SUCCESS + */ +static int +mdev_flush(struct m_dev *m_dev) +{ + bt_private *priv = (bt_private *)m_dev->driver_data; + ENTER(); + skb_queue_purge(&priv->adapter->tx_queue); + skb_queue_purge(&priv->adapter->pending_queue); + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function closes the wrapper device + * + * @param m_dev A pointer to m_dev structure + * + * @return BT_STATUS_SUCCESS + */ +static int +mdev_close(struct m_dev *m_dev) +{ + ENTER(); + mdev_req_lock(m_dev); + if (!test_and_clear_bit(HCI_UP, &m_dev->flags)) { + mdev_req_unlock(m_dev); + LEAVE(); + return 0; + } + + if (m_dev->flush) + m_dev->flush(m_dev); + /* wait up pending read and unregister char dev */ + wake_up_interruptible(&m_dev->req_wait_q); + /* Drop queues */ + skb_queue_purge(&m_dev->rx_q); + + if (!test_and_clear_bit(HCI_RUNNING, &m_dev->flags)) { + mdev_req_unlock(m_dev); + LEAVE(); + return 0; + } + module_put(THIS_MODULE); + m_dev->flags = 0; + mdev_req_unlock(m_dev); + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function opens the wrapper device + * + * @param m_dev A pointer to m_dev structure + * + * @return BT_STATUS_SUCCESS or other + */ +static int +mdev_open(struct m_dev *m_dev) +{ + ENTER(); + + if (try_module_get(THIS_MODULE) == 0) + return BT_STATUS_FAILURE; + + set_bit(HCI_RUNNING, &m_dev->flags); + + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function queries the wrapper device + * + * @param m_dev A pointer to m_dev structure + * @param arg arguement + * + * @return BT_STATUS_SUCCESS or other + */ +void +mdev_query(struct m_dev *m_dev, void *arg) +{ + struct mbt_dev *mbt_dev = (struct mbt_dev *)m_dev->dev_pointer; + + ENTER(); + if (copy_to_user(arg, &mbt_dev->type, sizeof(mbt_dev->type))) + PRINTM(ERROR, "IOCTL_QUERY_TYPE: Fail copy to user\n"); + + LEAVE(); +} + +/** + * @brief This function initializes the wrapper device + * + * @param m_dev A pointer to m_dev structure + * + * @return BT_STATUS_SUCCESS or other + */ +void +init_m_dev(struct m_dev *m_dev) +{ + m_dev->dev_pointer = NULL; + m_dev->driver_data = NULL; + m_dev->dev_type = 0; + m_dev->spec_type = 0; + skb_queue_head_init(&m_dev->rx_q); + init_waitqueue_head(&m_dev->req_wait_q); + init_waitqueue_head(&m_dev->rx_wait_q); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) + init_MUTEX(&m_dev->req_lock); +#else + sema_init(&m_dev->req_lock, 1); +#endif + memset(&m_dev->stat, 0, sizeof(struct hci_dev_stats)); + m_dev->open = mdev_open; + m_dev->close = mdev_close; + m_dev->flush = mdev_flush; + m_dev->send = mdev_send_frame; + m_dev->destruct = mdev_destruct; + m_dev->ioctl = mdev_ioctl; + m_dev->query = mdev_query; + m_dev->owner = THIS_MODULE; + +} + +/** + * @brief This function handles the major job in bluetooth driver. + * it handles the event generated by firmware, rx data received + * from firmware and tx data sent from kernel. + * + * @param data A pointer to bt_thread structure + * @return BT_STATUS_SUCCESS + */ +static int +bt_service_main_thread(void *data) +{ + bt_thread *thread = data; + bt_private *priv = thread->priv; + bt_adapter *adapter = priv->adapter; + wait_queue_t wait; + struct sk_buff *skb; + ENTER(); + bt_activate_thread(thread); + init_waitqueue_entry(&wait, current); + current->flags |= PF_NOFREEZE; + + for (;;) { + add_wait_queue(&thread->waitQ, &wait); + OS_SET_THREAD_STATE(TASK_INTERRUPTIBLE); + if (priv->adapter->WakeupTries || + ((!priv->adapter->IntCounter) && + (!priv->bt_dev.tx_dnld_rdy || + skb_queue_empty(&priv->adapter->tx_queue)))) { + PRINTM(INFO, "Main: Thread sleeping...\n"); + schedule(); + } + OS_SET_THREAD_STATE(TASK_RUNNING); + remove_wait_queue(&thread->waitQ, &wait); + if (kthread_should_stop() || adapter->SurpriseRemoved) { + PRINTM(INFO, "main-thread: break from main thread: " + "SurpriseRemoved=0x%x\n", + adapter->SurpriseRemoved); + break; + } + + PRINTM(INFO, "Main: Thread waking up...\n"); + + if (priv->adapter->IntCounter) { + OS_INT_DISABLE; + adapter->IntCounter = 0; + OS_INT_RESTORE; + sbi_get_int_status(priv); + } else if ((priv->adapter->ps_state == PS_SLEEP) && + !skb_queue_empty(&priv->adapter->tx_queue)) { + priv->adapter->WakeupTries++; + sbi_wakeup_firmware(priv); + continue; + } + if (priv->adapter->ps_state == PS_SLEEP) + continue; + if (priv->bt_dev.tx_dnld_rdy == TRUE) { + if (!skb_queue_empty(&priv->adapter->tx_queue)) { + skb = skb_dequeue(&priv->adapter->tx_queue); + if (skb) { + if (send_single_packet(priv, skb)) + ((struct m_dev *)skb->dev)-> + stat.err_tx++; + else + ((struct m_dev *)skb->dev)-> + stat.byte_tx += + skb->len; + kfree_skb(skb); + } + } + } + } + bt_deactivate_thread(thread); + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function handles the interrupt. it will change PS + * state if applicable. it will wake up main_thread to handle + * the interrupt event as well. + * + * @param m_dev A pointer to m_dev structure + * @return N/A + */ +void +bt_interrupt(struct m_dev *m_dev) +{ + bt_private *priv = (bt_private *)m_dev->driver_data; + ENTER(); + if (!priv || !priv->adapter) { + LEAVE(); + return; + } + PRINTM(INTR, "*\n"); + priv->adapter->ps_state = PS_AWAKE; + if (priv->adapter->hs_state == HS_ACTIVATED) { + PRINTM(CMD, "BT: %s: HS DEACTIVATED in ISR!\n", m_dev->name); + priv->adapter->hs_state = HS_DEACTIVATED; + } + priv->adapter->WakeupTries = 0; + priv->adapter->IntCounter++; + wake_up_interruptible(&priv->MainThread.waitQ); + LEAVE(); +} + +static void +char_dev_release_dynamic(struct kobject *kobj) +{ + struct char_dev *cdev = container_of(kobj, struct char_dev, kobj); + ENTER(); + PRINTM(INFO, "free char_dev\n"); + kfree(cdev); + LEAVE(); +} + +static struct kobj_type ktype_char_dev_dynamic = { + .release = char_dev_release_dynamic, +}; + +static struct char_dev * +alloc_char_dev(void) +{ + struct char_dev *cdev; + ENTER(); + cdev = kzalloc(sizeof(struct char_dev), GFP_KERNEL); + if (cdev) { + kobject_init(&cdev->kobj, &ktype_char_dev_dynamic); + PRINTM(INFO, "alloc char_dev\n"); + } + return cdev; +} + +static void +bt_private_dynamic_release(struct kobject *kobj) +{ + bt_private *priv = container_of(kobj, bt_private, kobj); + ENTER(); + PRINTM(INFO, "free bt priv\n"); + kfree(priv); + LEAVE(); +} + +static struct kobj_type ktype_bt_private_dynamic = { + .release = bt_private_dynamic_release, +}; + +static bt_private * +bt_alloc_priv(void) +{ + bt_private *priv; + ENTER(); + priv = kzalloc(sizeof(bt_private), GFP_KERNEL); + if (priv) { + kobject_init(&priv->kobj, &ktype_bt_private_dynamic); + PRINTM(INFO, "alloc bt priv\n"); + } + LEAVE(); + return priv; +} + +struct kobject * +bt_priv_get(bt_private *priv) +{ + PRINTM(INFO, "bt priv get object"); + return kobject_get(&priv->kobj); +} + +void +bt_priv_put(bt_private *priv) +{ + PRINTM(INFO, "bt priv put object"); + kobject_put(&priv->kobj); +} + +int +bt_reinit_fw(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + priv->adapter->tx_lock = FALSE; + priv->adapter->ps_state = PS_AWAKE; + priv->adapter->suspend_fail = FALSE; + priv->adapter->is_suspended = FALSE; + priv->adapter->hs_skip = 0; + priv->adapter->num_cmd_timeout = 0; + if (mbt_gpio_pin) { + ret = bt_set_gpio_pin(priv); + if (ret < 0) { + PRINTM(FATAL, "GPIO pin set failed!\n"); + goto done; + } + } + ret = bt_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ); + if (ret < 0) { + PRINTM(FATAL, "Module cfg command send failed!\n"); + goto done; + } + ret = bt_set_ble_deepsleep(priv, TRUE); + if (ret < 0) { + PRINTM(FATAL, "Enable BLE deepsleep failed!\n"); + goto done; + } + if (psmode) { + priv->bt_dev.psmode = TRUE; + priv->bt_dev.idle_timeout = DEFAULT_IDLE_TIME; + ret = bt_enable_ps(priv); + if (ret < 0) { + PRINTM(FATAL, "Enable PS mode failed!\n"); + goto done; + } + } +#ifdef SDIO_SUSPEND_RESUME + priv->bt_dev.gpio_gap = 0xffff; + ret = bt_send_hscfg_cmd(priv); + if (ret < 0) { + PRINTM(FATAL, "Send HSCFG failed!\n"); + goto done; + } +#endif + priv->bt_dev.sdio_pull_cfg = 0xffffffff; + priv->bt_dev.sdio_pull_ctrl = 0; + wake_up_interruptible(&priv->MainThread.waitQ); + /* block all the packet from bluez */ + if (init_cfg || cal_cfg || bt_mac || cal_cfg_ext) + priv->adapter->tx_lock = TRUE; + + if (init_cfg) + if (BT_STATUS_SUCCESS != bt_init_config(priv, init_cfg)) { + PRINTM(FATAL, + "BT: Set user init data and param failed\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + + if (cal_cfg) { + if (BT_STATUS_SUCCESS != bt_cal_config(priv, cal_cfg, bt_mac)) { + PRINTM(FATAL, "BT: Set cal data failed\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + } + + if (bt_mac) { + PRINTM(INFO, + "Set BT mac_addr from insmod parametre bt_mac = %s\n", + bt_mac); + if (BT_STATUS_SUCCESS != bt_init_mac_address(priv, bt_mac)) { + PRINTM(FATAL, + "BT: Fail to set mac address from insmod parametre\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + } + + if (cal_cfg_ext) { + if (BT_STATUS_SUCCESS != bt_cal_config_ext(priv, cal_cfg_ext)) { + PRINTM(FATAL, "BT: Set cal ext data failed\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + } + if (init_cfg || cal_cfg || bt_mac || cal_cfg_ext) { + priv->adapter->tx_lock = FALSE; + bt_restore_tx_queue(priv); + } + bt_get_fw_version(priv); + snprintf((char *)priv->adapter->drv_ver, MAX_VER_STR_LEN, + mbt_driver_version, fw_version); +done: + return ret; +} + +/** + * @brief Module configuration and register device + * + * @param priv A Pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +sbi_register_conf_dpc(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + struct mbt_dev *mbt_dev = NULL; + struct fm_dev *fm_dev = NULL; + struct nfc_dev *nfc_dev = NULL; + struct debug_dev *debug_dev = NULL; + int i = 0; + struct char_dev *char_dev = NULL; + char dev_file[DEV_NAME_LEN + 5]; + unsigned char dev_type = 0; + + ENTER(); + + priv->bt_dev.tx_dnld_rdy = TRUE; + + if (priv->fw_reload) { + bt_reinit_fw(priv); + LEAVE(); + return ret; + } + + if (drv_mode & DRV_MODE_BT) { + mbt_dev = alloc_mbt_dev(); + if (!mbt_dev) { + PRINTM(FATAL, "Can not allocate mbt dev\n"); + ret = -ENOMEM; + goto err_kmalloc; + } + init_m_dev(&(priv->bt_dev.m_dev[BT_SEQ])); + priv->bt_dev.m_dev[BT_SEQ].dev_type = BT_TYPE; + priv->bt_dev.m_dev[BT_SEQ].spec_type = IANYWHERE_SPEC; + priv->bt_dev.m_dev[BT_SEQ].dev_pointer = (void *)mbt_dev; + priv->bt_dev.m_dev[BT_SEQ].driver_data = priv; + priv->bt_dev.m_dev[BT_SEQ].read_continue_flag = 0; + } + + dev_type = HCI_SDIO; + + if (mbt_dev) + mbt_dev->type = dev_type; + if (mbt_gpio_pin) { + ret = bt_set_gpio_pin(priv); + if (ret < 0) { + PRINTM(FATAL, "GPIO pin set failed!\n"); + goto done; + } + } + + ret = bt_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ); + if (ret < 0) { + PRINTM(FATAL, "Module cfg command send failed!\n"); + goto done; + } + ret = bt_set_ble_deepsleep(priv, TRUE); + if (ret < 0) { + PRINTM(FATAL, "Enable BLE deepsleep failed!\n"); + goto done; + } + if (psmode) { + priv->bt_dev.psmode = TRUE; + priv->bt_dev.idle_timeout = DEFAULT_IDLE_TIME; + ret = bt_enable_ps(priv); + if (ret < 0) { + PRINTM(FATAL, "Enable PS mode failed!\n"); + goto done; + } + } +#ifdef SDIO_SUSPEND_RESUME + priv->bt_dev.gpio_gap = 0xffff; + ret = bt_send_hscfg_cmd(priv); + if (ret < 0) { + PRINTM(FATAL, "Send HSCFG failed!\n"); + goto done; + } +#endif + priv->bt_dev.sdio_pull_cfg = 0xffffffff; + priv->bt_dev.sdio_pull_ctrl = 0; + wake_up_interruptible(&priv->MainThread.waitQ); + if (mbt_dev && priv->bt_dev.devType == DEV_TYPE_AMP) { + mbt_dev->type |= HCI_BT_AMP; + priv->bt_dev.m_dev[BT_SEQ].dev_type = BT_AMP_TYPE; + } + /* block all the packet from bluez */ + if (init_cfg || cal_cfg || bt_mac || cal_cfg_ext) + priv->adapter->tx_lock = TRUE; + + if (mbt_dev) { + /** init mbt_dev */ + mbt_dev->flags = 0; + mbt_dev->pkt_type = (HCI_DM1 | HCI_DH1 | HCI_HV1); + mbt_dev->esco_type = (ESCO_HV1); + mbt_dev->link_mode = (HCI_LM_ACCEPT); + + mbt_dev->idle_timeout = 0; + mbt_dev->sniff_max_interval = 800; + mbt_dev->sniff_min_interval = 80; + for (i = 0; i < 3; i++) + mbt_dev->reassembly[i] = NULL; + atomic_set(&mbt_dev->promisc, 0); + + /** alloc char dev node */ + char_dev = alloc_char_dev(); + if (!char_dev) { + class_destroy(chardev_class); + ret = -ENOMEM; + goto err_kmalloc; + } + char_dev->minor = MBTCHAR_MINOR_BASE + mbtchar_minor; + if (mbt_dev->type & HCI_BT_AMP) + char_dev->dev_type = BT_AMP_TYPE; + else + char_dev->dev_type = BT_TYPE; + + if (bt_name) + snprintf(mbt_dev->name, sizeof(mbt_dev->name), "%s%d", + bt_name, mbtchar_minor); + else + snprintf(mbt_dev->name, sizeof(mbt_dev->name), + "mbtchar%d", mbtchar_minor); + snprintf(dev_file, sizeof(dev_file), "/dev/%s", mbt_dev->name); + mbtchar_minor++; + PRINTM(MSG, "BT: Create %s\n", dev_file); + + /** register m_dev to BT char device */ + priv->bt_dev.m_dev[BT_SEQ].index = char_dev->minor; + char_dev->m_dev = &(priv->bt_dev.m_dev[BT_SEQ]); + + /** create BT char device node */ + register_char_dev(char_dev, chardev_class, MODULE_NAME, + mbt_dev->name); + + /** chmod & chown for BT char device */ + mbtchar_chown(dev_file, AID_SYSTEM, AID_BLUETOOTH); + mbtchar_chmod(dev_file, 0666); + + /** create proc device */ + snprintf(priv->bt_dev.m_dev[BT_SEQ].name, + sizeof(priv->bt_dev.m_dev[BT_SEQ].name), + mbt_dev->name); + bt_proc_init(priv, &(priv->bt_dev.m_dev[BT_SEQ]), BT_SEQ); + } + + if ((drv_mode & DRV_MODE_FM) && + (!(priv->bt_dev.devType == DEV_TYPE_AMP)) && + (priv->bt_dev.devFeature & DEV_FEATURE_FM)) { + + /** alloc fm_dev */ + fm_dev = alloc_fm_dev(); + if (!fm_dev) { + PRINTM(FATAL, "Can not allocate fm dev\n"); + ret = -ENOMEM; + goto err_kmalloc; + } + + /** init m_dev */ + init_m_dev(&(priv->bt_dev.m_dev[FM_SEQ])); + priv->bt_dev.m_dev[FM_SEQ].dev_type = FM_TYPE; + priv->bt_dev.m_dev[FM_SEQ].spec_type = GENERIC_SPEC; + priv->bt_dev.m_dev[FM_SEQ].dev_pointer = (void *)fm_dev; + priv->bt_dev.m_dev[FM_SEQ].driver_data = priv; + priv->bt_dev.m_dev[FM_SEQ].read_continue_flag = 0; + + /** create char device for FM */ + char_dev = alloc_char_dev(); + if (!char_dev) { + class_destroy(chardev_class); + ret = -ENOMEM; + goto err_kmalloc; + } + char_dev->minor = FMCHAR_MINOR_BASE + fmchar_minor; + char_dev->dev_type = FM_TYPE; + + if (fm_name) + snprintf(fm_dev->name, sizeof(fm_dev->name), "%s%d", + fm_name, fmchar_minor); + else + snprintf(fm_dev->name, sizeof(fm_dev->name), + "mfmchar%d", fmchar_minor); + snprintf(dev_file, sizeof(dev_file), "/dev/%s", fm_dev->name); + PRINTM(MSG, "BT: Create %s\n", dev_file); + fmchar_minor++; + + /** register m_dev to FM char device */ + priv->bt_dev.m_dev[FM_SEQ].index = char_dev->minor; + char_dev->m_dev = &(priv->bt_dev.m_dev[FM_SEQ]); + + /** register char dev */ + register_char_dev(char_dev, chardev_class, + MODULE_NAME, fm_dev->name); + + /** chmod for FM char device */ + mbtchar_chmod(dev_file, 0660); + + /** create proc device */ + snprintf(priv->bt_dev.m_dev[FM_SEQ].name, + sizeof(priv->bt_dev.m_dev[FM_SEQ].name), fm_dev->name); + bt_proc_init(priv, &(priv->bt_dev.m_dev[FM_SEQ]), FM_SEQ); + } + + if ((drv_mode & DRV_MODE_NFC) && + (!(priv->bt_dev.devType == DEV_TYPE_AMP)) && + (priv->bt_dev.devFeature & DEV_FEATURE_NFC)) { + + /** alloc nfc_dev */ + nfc_dev = alloc_nfc_dev(); + if (!nfc_dev) { + PRINTM(FATAL, "Can not allocate nfc dev\n"); + ret = -ENOMEM; + goto err_kmalloc; + } + + /** init m_dev */ + init_m_dev(&(priv->bt_dev.m_dev[NFC_SEQ])); + priv->bt_dev.m_dev[NFC_SEQ].dev_type = NFC_TYPE; + priv->bt_dev.m_dev[NFC_SEQ].spec_type = GENERIC_SPEC; + priv->bt_dev.m_dev[NFC_SEQ].dev_pointer = (void *)nfc_dev; + priv->bt_dev.m_dev[NFC_SEQ].driver_data = priv; + priv->bt_dev.m_dev[NFC_SEQ].read_continue_flag = 0; + + /** create char device for NFC */ + char_dev = alloc_char_dev(); + if (!char_dev) { + class_destroy(chardev_class); + ret = -ENOMEM; + goto err_kmalloc; + } + char_dev->minor = NFCCHAR_MINOR_BASE + nfcchar_minor; + char_dev->dev_type = NFC_TYPE; + if (nfc_name) + snprintf(nfc_dev->name, sizeof(nfc_dev->name), "%s%d", + nfc_name, nfcchar_minor); + else + snprintf(nfc_dev->name, sizeof(nfc_dev->name), + "mnfcchar%d", nfcchar_minor); + snprintf(dev_file, sizeof(dev_file), "/dev/%s", nfc_dev->name); + PRINTM(MSG, "BT: Create %s\n", dev_file); + nfcchar_minor++; + + /** register m_dev to NFC char device */ + priv->bt_dev.m_dev[NFC_SEQ].index = char_dev->minor; + char_dev->m_dev = &(priv->bt_dev.m_dev[NFC_SEQ]); + + /** register char dev */ + register_char_dev(char_dev, chardev_class, MODULE_NAME, + nfc_dev->name); + + /** chmod for NFC char device */ + mbtchar_chmod(dev_file, 0666); + + /** create proc device */ + snprintf(priv->bt_dev.m_dev[NFC_SEQ].name, + sizeof(priv->bt_dev.m_dev[NFC_SEQ].name), + nfc_dev->name); + bt_proc_init(priv, &(priv->bt_dev.m_dev[NFC_SEQ]), NFC_SEQ); + } + + if ((debug_intf) && + ((drv_mode & DRV_MODE_BT) || + (drv_mode & DRV_MODE_FM) || (drv_mode & DRV_MODE_NFC))) { + /** alloc debug_dev */ + debug_dev = alloc_debug_dev(); + if (!debug_dev) { + PRINTM(FATAL, "Can not allocate debug dev\n"); + ret = -ENOMEM; + goto err_kmalloc; + } + + /** init m_dev */ + init_m_dev(&(priv->bt_dev.m_dev[DEBUG_SEQ])); + priv->bt_dev.m_dev[DEBUG_SEQ].dev_type = DEBUG_TYPE; + priv->bt_dev.m_dev[DEBUG_SEQ].spec_type = GENERIC_SPEC; + priv->bt_dev.m_dev[DEBUG_SEQ].dev_pointer = (void *)debug_dev; + priv->bt_dev.m_dev[DEBUG_SEQ].driver_data = priv; + + /** create char device for Debug */ + char_dev = alloc_char_dev(); + if (!char_dev) { + class_destroy(chardev_class); + ret = -ENOMEM; + goto err_kmalloc; + } + char_dev->minor = DEBUGCHAR_MINOR_BASE + debugchar_minor; + char_dev->dev_type = DEBUG_TYPE; + if (debug_name) + snprintf(debug_dev->name, sizeof(debug_dev->name), + "%s%d", debug_name, debugchar_minor); + else + snprintf(debug_dev->name, sizeof(debug_dev->name), + "mdebugchar%d", debugchar_minor); + snprintf(dev_file, sizeof(dev_file), "/dev/%s", + debug_dev->name); + PRINTM(MSG, "BT: Create %s\n", dev_file); + debugchar_minor++; + + /** register char dev */ + priv->bt_dev.m_dev[DEBUG_SEQ].index = char_dev->minor; + char_dev->m_dev = &(priv->bt_dev.m_dev[DEBUG_SEQ]); + register_char_dev(char_dev, chardev_class, MODULE_NAME, + debug_dev->name); + + /** chmod for debug char device */ + mbtchar_chmod(dev_file, 0666); + + /** create proc device */ + snprintf(priv->bt_dev.m_dev[DEBUG_SEQ].name, + sizeof(priv->bt_dev.m_dev[DEBUG_SEQ].name), + debug_dev->name); + bt_proc_init(priv, &(priv->bt_dev.m_dev[DEBUG_SEQ]), DEBUG_SEQ); + } + + if (init_cfg) + if (BT_STATUS_SUCCESS != bt_init_config(priv, init_cfg)) { + PRINTM(FATAL, + "BT: Set user init data and param failed\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + + if (cal_cfg) { + if (BT_STATUS_SUCCESS != bt_cal_config(priv, cal_cfg, bt_mac)) { + PRINTM(FATAL, "BT: Set cal data failed\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + } else if (bt_mac) { + PRINTM(INFO, + "Set BT mac_addr from insmod parametre bt_mac = %s\n", + bt_mac); + if (BT_STATUS_SUCCESS != bt_init_mac_address(priv, bt_mac)) { + PRINTM(FATAL, + "BT: Fail to set mac address from insmod parametre\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + } + if (cal_cfg_ext && (priv->card_type == CARD_TYPE_SD8787) + ) { + if (BT_STATUS_SUCCESS != bt_cal_config_ext(priv, cal_cfg_ext)) { + PRINTM(FATAL, "BT: Set cal ext data failed\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + } + if (init_cfg || cal_cfg || bt_mac || cal_cfg_ext) { + priv->adapter->tx_lock = FALSE; + bt_restore_tx_queue(priv); + } + + /* Get FW version */ + bt_get_fw_version(priv); + snprintf((char *)priv->adapter->drv_ver, MAX_VER_STR_LEN, + mbt_driver_version, fw_version); + +done: + LEAVE(); + return ret; +err_kmalloc: + LEAVE(); + return ret; +} + +/** + * @brief This function adds the card. it will probe the + * card, allocate the bt_priv and initialize the device. + * + * @param card A pointer to card + * @return A pointer to bt_private structure + */ + +bt_private * +bt_add_card(void *card) +{ + bt_private *priv = NULL; + + ENTER(); + + priv = bt_alloc_priv(); + if (!priv) { + PRINTM(FATAL, "Can not allocate priv\n"); + LEAVE(); + return NULL; + } + + /* allocate buffer for bt_adapter */ + priv->adapter = kzalloc(sizeof(bt_adapter), GFP_KERNEL); + if (!priv->adapter) { + PRINTM(FATAL, "Allocate buffer for bt_adapter failed!\n"); + goto err_kmalloc; + } + priv->adapter->hw_regs_buf = + kzalloc(SD_BLOCK_SIZE + DMA_ALIGNMENT, GFP_KERNEL); + if (!priv->adapter->hw_regs_buf) { + PRINTM(FATAL, "Allocate buffer for INT read buf failed!\n"); + goto err_kmalloc; + } + priv->adapter->hw_regs = + (u8 *)ALIGN_ADDR(priv->adapter->hw_regs_buf, DMA_ALIGNMENT); + bt_init_adapter(priv); + + PRINTM(INFO, "Starting kthread...\n"); + priv->MainThread.priv = priv; + spin_lock_init(&priv->driver_lock); + + bt_create_thread(bt_service_main_thread, &priv->MainThread, + "bt_main_service"); + + /* wait for mainthread to up */ + while (!priv->MainThread.pid) + os_sched_timeout(1); + + sdio_update_card_type(priv, card); + /* Update driver version */ + if (priv->card_type == CARD_TYPE_SD8787) + memcpy(mbt_driver_version, CARD_SD8787, strlen(CARD_SD8787)); + else if (priv->card_type == CARD_TYPE_SD8777) + memcpy(mbt_driver_version, CARD_SD8777, strlen(CARD_SD8777)); + else if (priv->card_type == CARD_TYPE_SD8887) + memcpy(mbt_driver_version, CARD_SD8887, strlen(CARD_SD8887)); + else if (priv->card_type == CARD_TYPE_SD8897) + memcpy(mbt_driver_version, CARD_SD8897, strlen(CARD_SD8897)); + else if (priv->card_type == CARD_TYPE_SD8797) + memcpy(mbt_driver_version, CARD_SD8797, strlen(CARD_SD8797)); + + if (BT_STATUS_SUCCESS != sdio_get_sdio_device(priv)) + goto err_kmalloc; + + /** user config file */ + init_waitqueue_head(&priv->init_user_conf_wait_q); + + priv->bt_dev.card = card; + + ((struct sdio_mmc_card *)card)->priv = priv; + priv->adapter->sd_ireg = 0; + /* + * Register the device. Fillup the private data structure with + * relevant information from the card and request for the required + * IRQ. + */ + if (sbi_register_dev(priv) < 0) { + PRINTM(FATAL, "Failed to register bt device!\n"); + goto err_registerdev; + } + if (bt_init_fw(priv)) { + PRINTM(FATAL, "BT Firmware Init Failed\n"); + goto err_init_fw; + } + LEAVE(); + return priv; + +err_init_fw: + clean_up_m_devs(priv); + bt_proc_remove(priv); + PRINTM(INFO, "Unregister device\n"); + sbi_unregister_dev(priv); +err_registerdev: + ((struct sdio_mmc_card *)card)->priv = NULL; + /* Stop the thread servicing the interrupts */ + priv->adapter->SurpriseRemoved = TRUE; + wake_up_interruptible(&priv->MainThread.waitQ); + while (priv->MainThread.pid) + os_sched_timeout(1); +err_kmalloc: + if (priv->adapter) + bt_free_adapter(priv); + bt_priv_put(priv); + LEAVE(); + return NULL; +} + +/** + * @brief This function send hardware remove event + * + * @param priv A pointer to bt_private + * @return N/A + */ +void +bt_send_hw_remove_event(bt_private *priv) +{ + struct sk_buff *skb = NULL; + struct mbt_dev *mbt_dev = NULL; + struct m_dev *mdev_bt = &(priv->bt_dev.m_dev[BT_SEQ]); + ENTER(); + if (!priv->bt_dev.m_dev[BT_SEQ].dev_pointer) { + LEAVE(); + return; + } + if (priv->bt_dev.m_dev[BT_SEQ].spec_type != BLUEZ_SPEC) + mbt_dev = + (struct mbt_dev *)priv->bt_dev.m_dev[BT_SEQ]. + dev_pointer; +#define HCI_HARDWARE_ERROR_EVT 0x10 +#define HCI_HARDWARE_REMOVE 0x24 + skb = bt_skb_alloc(3, GFP_ATOMIC); + skb->data[0] = HCI_HARDWARE_ERROR_EVT; + skb->data[1] = 1; + skb->data[2] = HCI_HARDWARE_REMOVE; + bt_cb(skb)->pkt_type = HCI_EVENT_PKT; + skb_put(skb, 3); + if (mbt_dev) { + skb->dev = (void *)mdev_bt; + PRINTM(MSG, "Send HW ERROR event\n"); + if (!mdev_recv_frame(skb)) { +#define RX_WAIT_TIMEOUT 300 + mdev_bt->wait_rx_complete = TRUE; + mdev_bt->rx_complete_flag = FALSE; + if (os_wait_interruptible_timeout + (mdev_bt->rx_wait_q, mdev_bt->rx_complete_flag, + RX_WAIT_TIMEOUT)) + PRINTM(MSG, "BT stack received the event\n"); + mdev_bt->stat.byte_rx += 3; + } + } + LEAVE(); + return; +} + +/** + * @brief This function removes the card. + * + * @param card A pointer to card + * @return BT_STATUS_SUCCESS + */ +int +bt_remove_card(void *card) +{ + bt_private *priv = (bt_private *)card; + ENTER(); + if (!priv) { + LEAVE(); + return BT_STATUS_SUCCESS; + } + if (!priv->adapter->SurpriseRemoved) { + if (BT_STATUS_SUCCESS == bt_send_reset_command(priv)) + bt_send_module_cfg_cmd(priv, MODULE_SHUTDOWN_REQ); + /* Disable interrupts on the card */ + sd_disable_host_int(priv); + priv->adapter->SurpriseRemoved = TRUE; + } + bt_send_hw_remove_event(priv); + wake_up_interruptible(&priv->adapter->cmd_wait_q); + priv->adapter->SurpriseRemoved = TRUE; + wake_up_interruptible(&priv->MainThread.waitQ); + while (priv->MainThread.pid) { + os_sched_timeout(1); + wake_up_interruptible(&priv->MainThread.waitQ); + } + + bt_proc_remove(priv); + PRINTM(INFO, "Unregister device\n"); + sbi_unregister_dev(priv); + clean_up_m_devs(priv); + PRINTM(INFO, "Free Adapter\n"); + bt_free_adapter(priv); + bt_priv_put(priv); + + LEAVE(); + return BT_STATUS_SUCCESS; +} + +extern unsigned long mlan_WiFiInitSem; +extern int bt_req_fw_nowait; + +/** + * @brief This function initializes module. + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int bt_init_module(void *p) +{ + int ret = BT_STATUS_SUCCESS; + struct semaphore *pWiFiSem; + ENTER(); + PRINTM(MSG, "BT: Loading driver\n"); + + if (bt_req_fw_nowait) { + pWiFiSem = (struct semaphore *) mlan_WiFiInitSem; + down_interruptible(pWiFiSem); + } + PRINTM(ERROR,"%s():%d: WiFi init complete; proceeding with BT init..\n",__FUNCTION__,__LINE__); + + bt_root_proc_init(); + + /** create char device class */ + chardev_class = class_create(THIS_MODULE, MODULE_NAME); + if (IS_ERR(chardev_class)) { + PRINTM(ERROR, "Unable to allocate class\n"); + bt_root_proc_remove(); + ret = PTR_ERR(chardev_class); + goto done; + } + + if (sbi_register() == NULL) { + bt_root_proc_remove(); + ret = BT_STATUS_FAILURE; + goto done; + } +done: + if (ret) + PRINTM(MSG, "BT: Driver loading failed\n"); + else + PRINTM(MSG, "BT: Driver loaded successfully\n"); + + LEAVE(); + do_exit(0); +} + +static int +bt_module_start(void *data) +{ + int ix=0; + kthread_run( bt_init_module,NULL,"BT test thread"); + + return 0; +} +/** + * @brief This function cleans module + * + * @return N/A + */ +static void +bt_exit_module(void) +{ + ENTER(); + PRINTM(MSG, "BT: Unloading driver\n"); + sbi_unregister(); + + bt_root_proc_remove(); + class_destroy(chardev_class); + PRINTM(MSG, "BT: Driver unloaded\n"); + LEAVE(); +} + +module_init(bt_module_start); +module_exit(bt_exit_module); + +MODULE_AUTHOR("Marvell International Ltd."); +MODULE_DESCRIPTION("Marvell Bluetooth Driver Ver. " VERSION); +MODULE_VERSION(VERSION); +MODULE_LICENSE("GPL"); +module_param(fw, int, 0); +MODULE_PARM_DESC(fw, "0: Skip firmware download; otherwise: Download firmware"); +module_param(fw_crc_check, int, 0); +MODULE_PARM_DESC(fw_crc_check, + "1: Enable FW download CRC check (default); 0: Disable FW download CRC check"); +module_param(psmode, int, 0); +MODULE_PARM_DESC(psmode, "1: Enable powermode; 0: Disable powermode"); +#ifdef CONFIG_OF +module_param(dts_enable, int, 0); +MODULE_PARM_DESC(dts_enable, "0: Disable DTS; 1: Enable DTS"); +#endif +#ifdef DEBUG_LEVEL1 +module_param(mbt_drvdbg, uint, 0); +MODULE_PARM_DESC(mbt_drvdbg, "BIT3:DBG_DATA BIT4:DBG_CMD 0xFF:DBG_ALL"); +#endif +#ifdef SDIO_SUSPEND_RESUME +module_param(mbt_pm_keep_power, int, 0); +MODULE_PARM_DESC(mbt_pm_keep_power, "1: PM keep power; 0: PM no power"); +#endif +module_param(init_cfg, charp, 0); +MODULE_PARM_DESC(init_cfg, "BT init config file name"); +module_param(cal_cfg, charp, 0); +MODULE_PARM_DESC(cal_cfg, "BT calibrate file name"); +module_param(cal_cfg_ext, charp, 0); +MODULE_PARM_DESC(cal_cfg_ext, "BT calibrate ext file name"); +module_param(bt_mac, charp, 0660); +MODULE_PARM_DESC(bt_mac, "BT init mac address"); +module_param(drv_mode, int, 0); +MODULE_PARM_DESC(drv_mode, "Bit 0: BT/AMP/BLE; Bit 1: FM; Bit 2: NFC"); +module_param(bt_name, charp, 0); +MODULE_PARM_DESC(bt_name, "BT interface name"); +module_param(fm_name, charp, 0); +MODULE_PARM_DESC(fm_name, "FM interface name"); +module_param(nfc_name, charp, 0); +MODULE_PARM_DESC(nfc_name, "NFC interface name"); +module_param(debug_intf, int, 0); +MODULE_PARM_DESC(debug_intf, + "1: Enable debug interface; 0: Disable debug interface "); +module_param(debug_name, charp, 0); +MODULE_PARM_DESC(debug_name, "Debug interface name"); +module_param(mbt_gpio_pin, int, 0); +MODULE_PARM_DESC(mbt_gpio_pin, + "GPIO pin to interrupt host. 0xFFFF: disable GPIO interrupt mode; Others: GPIO pin assigned to generate pulse to host."); diff --git a/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/bt_proc.c b/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/bt_proc.c new file mode 100644 index 00000000..15c4ff3c --- /dev/null +++ b/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/bt_proc.c @@ -0,0 +1,870 @@ +/** @file bt_proc.c + * + * @brief This file handle the functions for proc files + * + * Copyright (C) 2007-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available along with the File in the gpl.txt file or by writing to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307 or on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#include + +#include "bt_drv.h" +#include "bt_sdio.h" + +/** proc diretory root */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +#define PROC_DIR NULL +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) +#define PROC_DIR (&proc_root) +#else +#define PROC_DIR proc_net +#endif + +/** Proc mbt directory entry */ +static struct proc_dir_entry *proc_mbt; + +#define CMD52_STR_LEN 50 +static bt_private *bpriv; +static char cmd52_string[CMD52_STR_LEN]; + +struct proc_data { + /** Read length */ + int rdlen; + /** Read buffer */ + char *rdbuf; + /** Write length */ + int wrlen; + /** Maximum write length */ + int maxwrlen; + /** Write buffer */ + char *wrbuf; + void (*on_close) (struct inode *, struct file *); +}; + +/** Default file permission */ +#define DEFAULT_FILE_PERM 0644 + +/** Bluetooth device offset */ +#define OFFSET_BT_DEV 0x01 +/** Bluetooth adapter offset */ +#define OFFSET_BT_ADAPTER 0x02 +/** Show integer */ +#define SHOW_INT 0x10 +/** Show hex */ +#define SHOW_HEX 0x20 +/** Show string */ +#define SHOW_STRING 0x40 + +/** Device size */ +#define item_dev_size(n) (sizeof((bt_dev_t *)0)->n) +/** Device address */ +#define item_dev_addr(n) ((t_ptr) &((bt_dev_t *)0)->n) + +/** Adapter size */ +#define item_adapter_size(n) (sizeof((bt_adapter *)0)->n) +/** Adapter address */ +#define item_adapter_addr(n) ((t_ptr) &((bt_adapter *)0)->n) + +static struct item_data config_items[] = { +#ifdef DEBUG_LEVEL1 + {"drvdbg", sizeof(u32), (t_ptr)&mbt_drvdbg, 0, SHOW_HEX} + , +#endif + {"idle_timeout", item_dev_size(idle_timeout), 0, + item_dev_addr(idle_timeout), OFFSET_BT_DEV | SHOW_HEX} + , + {"psmode", item_dev_size(psmode), 0, item_dev_addr(psmode), + OFFSET_BT_DEV | SHOW_INT} + , + {"pscmd", item_dev_size(pscmd), 0, item_dev_addr(pscmd), + OFFSET_BT_DEV | SHOW_INT} + , + {"hsmode", item_dev_size(hsmode), 0, item_dev_addr(hsmode), + OFFSET_BT_DEV | SHOW_INT} + , + {"hscmd", item_dev_size(hscmd), 0, item_dev_addr(hscmd), + OFFSET_BT_DEV | SHOW_INT} + , + {"gpio_gap", item_dev_size(gpio_gap), 0, item_dev_addr(gpio_gap), + OFFSET_BT_DEV | SHOW_HEX} + , + {"hscfgcmd", item_dev_size(hscfgcmd), 0, item_dev_addr(hscfgcmd), + OFFSET_BT_DEV | SHOW_INT} + , + {"sdio_pull_cfg", item_dev_size(sdio_pull_cfg), 0, + item_dev_addr(sdio_pull_cfg), OFFSET_BT_DEV | SHOW_HEX} + , + {"sdio_pull_ctrl", item_dev_size(sdio_pull_ctrl), 0, + item_dev_addr(sdio_pull_ctrl), OFFSET_BT_DEV | SHOW_INT} + , + {"test_mode", item_dev_size(test_mode), 0, item_dev_addr(test_mode), + OFFSET_BT_DEV | SHOW_INT} + , + +}; + +static struct item_data status_items[] = { + {"version", item_adapter_size(drv_ver), 0, item_adapter_addr(drv_ver), + OFFSET_BT_ADAPTER | SHOW_STRING}, + {"tx_dnld_rdy", item_dev_size(tx_dnld_rdy), 0, + item_dev_addr(tx_dnld_rdy), + OFFSET_BT_DEV | SHOW_INT}, + {"psmode", item_adapter_size(psmode), 0, item_adapter_addr(psmode), + OFFSET_BT_ADAPTER | SHOW_INT}, + {"hs_state", item_adapter_size(hs_state), 0, + item_adapter_addr(hs_state), + OFFSET_BT_ADAPTER | SHOW_INT}, + {"hs_skip", item_adapter_size(hs_skip), 0, item_adapter_addr(hs_skip), + OFFSET_BT_ADAPTER | SHOW_INT}, + {"ps_state", item_adapter_size(ps_state), 0, + item_adapter_addr(ps_state), + OFFSET_BT_ADAPTER | SHOW_INT}, + {"WakeupTries", item_adapter_size(WakeupTries), 0, + item_adapter_addr(WakeupTries), OFFSET_BT_ADAPTER | SHOW_INT}, + {"irq_recv", item_adapter_size(irq_recv), 0, + item_adapter_addr(irq_recv), + OFFSET_BT_ADAPTER | SHOW_INT}, + {"irq_done", item_adapter_size(irq_done), 0, + item_adapter_addr(irq_done), + OFFSET_BT_ADAPTER | SHOW_INT}, + {"skb_pending", item_adapter_size(skb_pending), 0, + item_adapter_addr(skb_pending), OFFSET_BT_ADAPTER | SHOW_INT}, +}; + +static struct item_data debug_items[] = { + {"sdcmd52rw", 0, (t_ptr)cmd52_string, 0, SHOW_STRING}, +}; + +/** + * @brief convert string to number + * + * @param s pointer to numbered string + * @return converted number from string s + */ +int +string_to_number(char *s) +{ + int r = 0; + int base = 0; + int pn = 1; + + if (strncmp(s, "-", 1) == 0) { + pn = -1; + s++; + } + if ((strncmp(s, "0x", 2) == 0) || (strncmp(s, "0X", 2) == 0)) { + base = 16; + s += 2; + } else + base = 10; + + for (s = s; *s != 0; s++) { + if ((*s >= '0') && (*s <= '9')) + r = (r * base) + (*s - '0'); + else if ((*s >= 'A') && (*s <= 'F')) + r = (r * base) + (*s - 'A' + 10); + else if ((*s >= 'a') && (*s <= 'f')) + r = (r * base) + (*s - 'a' + 10); + else + break; + } + + return r * pn; +} + +/** + * @brief Create cmd52 string + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS + */ +static int +form_cmd52_string(bt_private *priv) +{ + ENTER(); + + memset(cmd52_string, 0, CMD52_STR_LEN); + snprintf(cmd52_string, CMD52_STR_LEN - 1, "BT: %d 0x%0x 0x%02X", + priv->bt_dev.cmd52_func, priv->bt_dev.cmd52_reg, + priv->bt_dev.cmd52_val); + + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/* + * @brief Parse cmd52 string + * + * @param buffer A pointer user buffer + * @param len Length of user buffer + * @param func Parsed func number + * @param reg Parsed reg value + * @param val Parsed value to set + * @return BT_STATUS_SUCCESS + */ +static int +parse_cmd52_string(const char __user * buffer, size_t len, + int *func, int *reg, int *val) +{ + int ret = BT_STATUS_SUCCESS; + char *string = NULL; + char *pos = NULL; + + ENTER(); + + string = kzalloc(CMD52_STR_LEN, GFP_KERNEL); + if (!string) { + PRINTM(ERROR, "BT: Can not alloc mem for cmd52 string\n"); + LEAVE(); + return -ENOMEM; + } + memcpy(string, buffer + strlen("sdcmd52rw="), + len - strlen("sdcmd52rw=")); + string = strstrip(string); + + *func = -1; + *reg = -1; + *val = -1; + + /* Get func */ + pos = strsep(&string, " \t"); + if (pos) + *func = string_to_number(pos); + + /* Get reg */ + pos = strsep(&string, " \t"); + if (pos) + *reg = string_to_number(pos); + + /* Get val (optional) */ + pos = strsep(&string, " \t"); + if (pos) + *val = string_to_number(pos); + kfree(string); + LEAVE(); + return ret; +} + +/** + * @brief This function handle generic proc file close + * + * @param inode A pointer to inode structure + * @param file A pointer to file structure + * @return BT_STATUS_SUCCESS + */ +static int +proc_close(struct inode *inode, struct file *file) +{ + struct proc_data *pdata = file->private_data; + ENTER(); + if (pdata) { + if (pdata->on_close != NULL) + pdata->on_close(inode, file); + kfree(pdata->rdbuf); + kfree(pdata->wrbuf); + kfree(pdata); + } + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function handle generic proc file read + * + * @param file A pointer to file structure + * @param buffer A pointer to output buffer + * @param len number of byte to read + * @param offset A pointer to offset of file + * @return number of output data + */ +static ssize_t +proc_read(struct file *file, char __user * buffer, size_t len, loff_t * offset) +{ + loff_t pos = *offset; + struct proc_data *pdata = (struct proc_data *)file->private_data; + if ((!pdata->rdbuf) || (pos < 0)) + return -EINVAL; + if (pos >= pdata->rdlen) + return 0; + if (len > pdata->rdlen - pos) + len = pdata->rdlen - pos; + if (copy_to_user(buffer, pdata->rdbuf + pos, len)) + return -EFAULT; + *offset = pos + len; + return len; +} + +/** + * @brief This function handle generic proc file write + * + * @param file A pointer to file structure + * @param buffer A pointer to input buffer + * @param len number of byte to write + * @param offset A pointer to offset of file + * @return number of input data + */ +static ssize_t +proc_write(struct file *file, + const char __user * buffer, size_t len, loff_t * offset) +{ + loff_t pos = *offset; + struct proc_data *pdata = (struct proc_data *)file->private_data; + int func = 0, reg = 0, val = 0; + + if (!pdata->wrbuf || (pos < 0)) + return -EINVAL; + if (pos >= pdata->maxwrlen) + return 0; + if (len > pdata->maxwrlen - pos) + len = pdata->maxwrlen - pos; + if (copy_from_user(pdata->wrbuf + pos, buffer, len)) + return -EFAULT; + if (!strncmp(buffer, "sdcmd52rw=", strlen("sdcmd52rw="))) { + parse_cmd52_string(buffer, len, &func, ®, &val); + sd_write_cmd52_val(bpriv, func, reg, val); + } + if (!strncmp(buffer, "debug_dump", strlen("debug_dump"))) { + bt_dump_sdio_regs(bpriv); + bt_dump_firmware_info_v2(bpriv); + } + if (!strncmp(buffer, "fw_reload", strlen("fw_reload"))) { + PRINTM(MSG, "Request fw_reload...\n"); + bt_request_fw_reload(bpriv); + } + if (pos + len > pdata->wrlen) + pdata->wrlen = len + file->f_pos; + *offset = pos + len; + return len; +} + +/** + * @brief This function handle the generic file close + * + * @param inode A pointer to inode structure + * @param file A pointer to file structure + * @return N/A + */ +static void +proc_on_close(struct inode *inode, struct file *file) +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) + struct proc_private_data *priv = PDE_DATA(inode); +#else + struct proc_private_data *priv = PDE(inode)->data; +#endif + struct proc_data *pdata = file->private_data; + char *line; + int i; + ENTER(); + if (!pdata->wrlen) + return; + line = pdata->wrbuf; + while (line[0]) { + for (i = 0; i < priv->num_items; i++) { + if (!strncmp + (line, priv->pdata[i].name, + strlen(priv->pdata[i].name))) { + line += strlen(priv->pdata[i].name) + 1; + if (priv->pdata[i].size == 1) + *((u8 *)priv->pdata[i].addr) = + (u8)string_to_number(line); + else if (priv->pdata[i].size == 2) + *((u16 *) priv->pdata[i].addr) = + (u16) string_to_number(line); + else if (priv->pdata[i].size == 4) + *((u32 *)priv->pdata[i].addr) = + (u32)string_to_number(line); + } + } + while (line[0] && line[0] != '\n') + line++; + if (line[0]) + line++; + } + if (priv->pbt->bt_dev.hscmd || priv->pbt->bt_dev.pscmd + || priv->pbt->bt_dev.sdio_pull_ctrl + || priv->pbt->bt_dev.test_mode || priv->pbt->bt_dev.hscfgcmd) { + bt_prepare_command(priv->pbt); + wake_up_interruptible(&priv->pbt->MainThread.waitQ); + } + LEAVE(); + return; +} + +/** + * @brief This function handle the generic file open + * + * @param inode A pointer to inode structure + * @param file A pointer to file structure + * @return BT_STATUS_SUCCESS or other error no. + */ +static int +proc_open(struct inode *inode, struct file *file) +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) + struct proc_private_data *priv = PDE_DATA(inode); +#else + struct proc_private_data *priv = PDE(inode)->data; +#endif + struct proc_data *pdata; + int i; + char *p; + u32 val = 0; + ENTER(); + priv->pbt->adapter->skb_pending = + skb_queue_len(&priv->pbt->adapter->tx_queue); + file->private_data = kzalloc(sizeof(struct proc_data), GFP_KERNEL); + if (file->private_data == NULL) { + PRINTM(ERROR, "BT: Can not alloc mem for proc_data\n"); + LEAVE(); + return -ENOMEM; + } + pdata = (struct proc_data *)file->private_data; + pdata->rdbuf = kmalloc(priv->bufsize, GFP_KERNEL); + if (pdata->rdbuf == NULL) { + PRINTM(ERROR, "BT: Can not alloc mem for rdbuf\n"); + kfree(file->private_data); + LEAVE(); + return -ENOMEM; + } + if (priv->fileflag == DEFAULT_FILE_PERM) { + pdata->wrbuf = kzalloc(priv->bufsize, GFP_KERNEL); + if (pdata->wrbuf == NULL) { + PRINTM(ERROR, "BT: Can not alloc mem for wrbuf\n"); + kfree(pdata->rdbuf); + kfree(file->private_data); + return -ENOMEM; + } + pdata->maxwrlen = priv->bufsize; + pdata->on_close = proc_on_close; + } + p = pdata->rdbuf; + for (i = 0; i < priv->num_items; i++) { + if (priv->pdata[i].size == 1) + val = *((u8 *)priv->pdata[i].addr); + else if (priv->pdata[i].size == 2) + val = *((u16 *) priv->pdata[i].addr); + else if (priv->pdata[i].size == 4) + val = *((u32 *)priv->pdata[i].addr); + if (priv->pdata[i].flag & SHOW_INT) + p += sprintf(p, "%s=%d\n", priv->pdata[i].name, val); + else if (priv->pdata[i].flag & SHOW_HEX) + p += sprintf(p, "%s=0x%x\n", priv->pdata[i].name, val); + else if (priv->pdata[i].flag & SHOW_STRING) { + if (!strncmp + (priv->pdata[i].name, "sdcmd52rw", + strlen("sdcmd52rw"))) { + sd_read_cmd52_val(bpriv); + form_cmd52_string(bpriv); + } + p += sprintf(p, "%s=%s\n", priv->pdata[i].name, + (char *)priv->pdata[i].addr); + } + } + pdata->rdlen = strlen(pdata->rdbuf); + LEAVE(); + return BT_STATUS_SUCCESS; +} + +static const struct file_operations proc_read_ops = { + .read = proc_read, + .open = proc_open, + .release = proc_close +}; + +static const struct file_operations proc_rw_ops = { + .read = proc_read, + .write = proc_write, + .open = proc_open, + .release = proc_close +}; + +static struct proc_private_data proc_files[] = { + {"status", S_IRUGO, 1024, + sizeof(status_items) / sizeof(status_items[0]), + &status_items[0], NULL, &proc_read_ops} + , + {"config", DEFAULT_FILE_PERM, 512, + sizeof(config_items) / sizeof(config_items[0]), &config_items[0], NULL, + &proc_rw_ops} + , + {"debug", DEFAULT_FILE_PERM, 512, + sizeof(debug_items) / sizeof(debug_items[0]), &debug_items[0], NULL, + &proc_rw_ops} + , +}; + +/** + * @brief Proc read function for histogram + * + * @param sfp pointer to seq_file structure + * @param data + * + * @return Number of output data or MLAN_STATUS_FAILURE + */ +static int +bt_histogram_read(struct seq_file *sfp, void *data) +{ + bt_hist_proc_data *pdata = (bt_hist_proc_data *) sfp->private; + bt_private *priv = (bt_private *)pdata->pbt; + u8 ant_num; + int i, j; + + ENTER(); + if (!priv) { + LEAVE(); + return -EFAULT; + } + bt_get_histogram(priv); + ant_num = priv->hist_data_len / sizeof(bt_histogram_data); + seq_printf(sfp, "BT histogram:\n"); + seq_printf(sfp, "antenna: 0=2.4G antenna a, 1=2.4G antenna b\n\n"); + if (ant_num < 1) { + seq_printf(sfp, "no histogram data from FW\n"); + LEAVE(); + return 0; + } + for (i = 0; i < ant_num; i++) { + if (pdata->antenna != priv->hist_data[i].antenna) + continue; + seq_printf(sfp, "antenna %d\n", priv->hist_data[i].antenna); + switch (priv->hist_data[i].powerclass) { + case 2: + seq_printf(sfp, "Power class=1.5\n"); + break; + case 5: + seq_printf(sfp, "Power class=2\n"); + break; + case 6: + seq_printf(sfp, "Power class=1\n"); + break; + default: + seq_printf(sfp, "Power class=%d\n", + priv->hist_data[i].powerclass); + break; + } + for (j = 0; j < (MAX_BT_LINK + MAX_BLE_LINK); j++) { + switch (priv->hist_data[i].link[j].txrxrate) { + case BDR_RATE_1M: + seq_printf(sfp, + "BT link[%d]: TxPower=%d dBm, TxRx Rate=BDR(1 mbps), RSSI=%d dBm\n", + j + 1, + priv->hist_data[i].link[j].txpower, + priv->hist_data[i].link[j].rssi); + break; + case EDR_RATE_2_3M: + seq_printf(sfp, + "BT link[%d]: TxPower=%d dBm, TxRx Rate=EDR(2/3 mbps), RSSI=%d dBm\n", + j + 1, + priv->hist_data[i].link[j].txpower, + priv->hist_data[i].link[j].rssi); + break; + case BLE_RATE_1M: + seq_printf(sfp, + "BLE link[%d]: TxPower=%d dBm, TxRx Rate=BLE(1 mbps), RSSI=%d dBm\n", + j - MAX_BT_LINK + 0x80, + priv->hist_data[i].link[j].txpower, + priv->hist_data[i].link[j].rssi); + break; + default: + if (j < MAX_BT_LINK) + seq_printf(sfp, + "BT link[%d]: TxPower=%d dBm, TxRx Rate=(%d), RSSI=%d dBm\n", + j + 1, + priv->hist_data[i].link[j]. + txpower, + priv->hist_data[i].link[j]. + txrxrate, + priv->hist_data[i].link[j]. + rssi); + else + seq_printf(sfp, + "BLE link[%d]: TxPower=%d dBm, TxRx Rate=(%d), RSSI=%d dBm\n", + j - MAX_BT_LINK + 0x80, + priv->hist_data[i].link[j]. + txpower, + priv->hist_data[i].link[j]. + txrxrate, + priv->hist_data[i].link[j]. + rssi); + break; + } + } + seq_printf(sfp, "\n"); + } + LEAVE(); + return 0; +} + +static int +bt_histogram_proc_open(struct inode *inode, struct file *file) +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) + return single_open(file, bt_histogram_read, PDE_DATA(inode)); +#else + return single_open(file, bt_histogram_read, PDE(inode)->data); +#endif +} + +static const struct file_operations histogram_proc_fops = { + .owner = THIS_MODULE, + .open = bt_histogram_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +/** + * @brief This function initializes proc entry + * + * @param priv A pointer to bt_private structure + * @param m_dev A pointer to struct m_dev + * @param seq Sequence number + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_proc_init(bt_private *priv, struct m_dev *m_dev, int seq) +{ + int ret = BT_STATUS_SUCCESS; + struct proc_dir_entry *entry; + int i, j; + char hist_entry[50]; + ENTER(); + + bpriv = priv; + memset(cmd52_string, 0, CMD52_STR_LEN); + if (proc_mbt) { + priv->dev_proc[seq].proc_entry = + proc_mkdir(m_dev->name, proc_mbt); + if (!priv->dev_proc[seq].proc_entry) { + PRINTM(ERROR, "BT: Could not mkdir %s!\n", m_dev->name); + ret = BT_STATUS_FAILURE; + goto done; + } + priv->dev_proc[seq].hist_entry = + proc_mkdir("histogram", priv->dev_proc[seq].proc_entry); + if (!priv->dev_proc[seq].hist_entry) { + PRINTM(ERROR, "BT: Could not mkdir histogram!\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + for (i = 0; i < MAX_ANTENNA_NUM; i++) { + priv->hist_proc[i].antenna = i; + priv->hist_proc[i].pbt = priv; + snprintf(hist_entry, sizeof(hist_entry), "bt-ant%d", i); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + entry = proc_create_data(hist_entry, 0644, + priv->dev_proc[seq].hist_entry, + &histogram_proc_fops, + &priv->hist_proc[i]); + if (entry == NULL) +#else + entry = create_proc_entry(hist_entry, 0644, + priv->dev_proc[seq]. + hist_entry); + if (entry) { + entry->data = &priv->hist_proc[i]; + entry->proc_fops = &histogram_proc_fops; + } else +#endif + { + PRINTM(MSG, + "Fail to create histogram proc %s\n", + hist_entry); + ret = BT_STATUS_FAILURE; + goto done; + } + } + priv->dev_proc[seq].pfiles = + kmalloc(sizeof(proc_files), GFP_ATOMIC); + if (!priv->dev_proc[seq].pfiles) { + PRINTM(ERROR, + "BT: Could not alloc memory for pfile!\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + memcpy((u8 *)priv->dev_proc[seq].pfiles, (u8 *)proc_files, + sizeof(proc_files)); + priv->dev_proc[seq].num_proc_files = ARRAY_SIZE(proc_files); + for (j = 0; j < priv->dev_proc[seq].num_proc_files; j++) + priv->dev_proc[seq].pfiles[j].pdata = NULL; + for (j = 0; j < priv->dev_proc[seq].num_proc_files; j++) { + priv->dev_proc[seq].pfiles[j].pdata = + kmalloc(priv->dev_proc[seq].pfiles[j]. + num_items * sizeof(struct item_data), + GFP_ATOMIC); + if (!priv->dev_proc[seq].pfiles[j].pdata) { + PRINTM(ERROR, + "BT: Could not alloc memory for pdata!\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + memcpy((u8 *)priv->dev_proc[seq].pfiles[j].pdata, + (u8 *)proc_files[j].pdata, + priv->dev_proc[seq].pfiles[j].num_items * + sizeof(struct item_data)); + for (i = 0; i < priv->dev_proc[seq].pfiles[j].num_items; + i++) { + if (priv->dev_proc[seq].pfiles[j]. + pdata[i].flag & OFFSET_BT_DEV) + priv->dev_proc[seq].pfiles[j].pdata[i]. + addr = + priv->dev_proc[seq].pfiles[j]. + pdata[i].offset + + (t_ptr)&priv->bt_dev; + if (priv->dev_proc[seq].pfiles[j]. + pdata[i].flag & OFFSET_BT_ADAPTER) + priv->dev_proc[seq].pfiles[j].pdata[i]. + addr = + priv->dev_proc[seq].pfiles[j]. + pdata[i].offset + + (t_ptr)priv->adapter; + } + priv->dev_proc[seq].pfiles[j].pbt = priv; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + entry = proc_create_data(proc_files[j].name, + S_IFREG | proc_files[j]. + fileflag, + priv->dev_proc[seq].proc_entry, + proc_files[j].fops, + &priv->dev_proc[seq]. + pfiles[j]); + if (entry == NULL) +#else + entry = create_proc_entry(proc_files[j].name, + S_IFREG | proc_files[j]. + fileflag, + priv->dev_proc[seq]. + proc_entry); + if (entry) { + entry->data = &priv->dev_proc[seq].pfiles[j]; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) + entry->owner = THIS_MODULE; +#endif + entry->proc_fops = proc_files[j].fops; + } else +#endif + PRINTM(MSG, "BT: Fail to create proc %s\n", + proc_files[j].name); + } + } +done: + if (ret == BT_STATUS_FAILURE) { + if (priv->dev_proc[seq].proc_entry) { + remove_proc_entry(m_dev->name, proc_mbt); + priv->dev_proc[seq].proc_entry = NULL; + } + if (priv->dev_proc[seq].pfiles) { + for (j = 0; j < priv->dev_proc[seq].num_proc_files; j++) { + if (priv->dev_proc[seq].pfiles[j].pdata) { + kfree(priv->dev_proc[seq].pfiles[j]. + pdata); + priv->dev_proc[seq].pfiles[j].pdata = + NULL; + } + } + kfree(priv->dev_proc[seq].pfiles); + priv->dev_proc[seq].pfiles = NULL; + } + } + LEAVE(); + return ret; +} + +/** + * @brief This function removes proc interface + * + * @param priv A pointer to bt_private structure + * @return N/A + */ +void +bt_proc_remove(bt_private *priv) +{ + int j, i; + char hist_entry[50]; + ENTER(); + PRINTM(INFO, "BT: Remove Proc Interface\n"); + if (proc_mbt) { + for (i = 0; i < MAX_RADIO_FUNC; i++) { + if (!priv->dev_proc[i].proc_entry) + continue; + for (j = 0; j < ARRAY_SIZE(proc_files); j++) { + remove_proc_entry(proc_files[j].name, + priv->dev_proc[i].proc_entry); + } + for (j = 0; j < MAX_ANTENNA_NUM; j++) { + snprintf(hist_entry, sizeof(hist_entry), + "bt-ant%d", j); + remove_proc_entry(hist_entry, + priv->dev_proc[i].hist_entry); + } + remove_proc_entry("histogram", + priv->dev_proc[i].proc_entry); + remove_proc_entry(priv->bt_dev.m_dev[i].name, proc_mbt); + priv->dev_proc[i].proc_entry = NULL; + + if (priv->dev_proc[i].pfiles) { + for (j = 0; + j < priv->dev_proc[i].num_proc_files; + j++) { + if (priv->dev_proc[i].pfiles[j].pdata) { + kfree(priv->dev_proc[i]. + pfiles[j].pdata); + priv->dev_proc[i].pfiles[j]. + pdata = NULL; + } + } + kfree(priv->dev_proc[i].pfiles); + priv->dev_proc[i].pfiles = NULL; + } + } + } + LEAVE(); + return; +} + +/** + * @brief This function creates proc interface + * directory structure + * + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +bt_root_proc_init(void) +{ + PRINTM(INFO, "BT: Create Proc Interface\n"); + proc_mbt = proc_mkdir("mbt", PROC_DIR); + if (!proc_mbt) { + PRINTM(ERROR, "BT: Cannot create proc interface\n"); + return BT_STATUS_FAILURE; + } + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function removes proc interface + * directory structure + * + * @return BT_STATUS_SUCCESS + */ +int +bt_root_proc_remove(void) +{ + remove_proc_entry("mbt", PROC_DIR); + proc_mbt = NULL; + return BT_STATUS_SUCCESS; +} diff --git a/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/bt_sdio.h b/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/bt_sdio.h new file mode 100644 index 00000000..3ab5509d --- /dev/null +++ b/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/bt_sdio.h @@ -0,0 +1,375 @@ +/** @file bt_sdio.h + * @brief This file contains SDIO (interface) module + * related macros, enum, and structure. + * + * Copyright (C) 2007-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available along with the File in the gpl.txt file or by writing to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307 or on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#ifndef _BT_SDIO_H_ +#define _BT_SDIO_H_ + +#include + +/** SD8787 card type */ +#define CARD_TYPE_SD8787 0x01 +/** SD8777 card type */ +#define CARD_TYPE_SD8777 0x02 +/** SD8887 card type */ +#define CARD_TYPE_SD8887 0x03 +/** SD8897 card type */ +#define CARD_TYPE_SD8897 0x04 +/** SD8797 card type */ +#define CARD_TYPE_SD8797 0x05 + +/** IRQ return type */ +typedef irqreturn_t IRQ_RET_TYPE; +/** IRQ return */ +#define IRQ_RET (return IRQ_HANDLED) +/** ISR notifier function */ +typedef IRQ_RET_TYPE (*isr_notifier_fn_t) (s32 irq, void *dev_id, + struct pt_regs * reg); + +/** SDIO header length */ +#define SDIO_HEADER_LEN 4 + +/* SD block size can not bigger than 64 due to buf size limit in firmware */ +/** define SD block size for data Tx/Rx */ +#define SD_BLOCK_SIZE 64 +/** define SD block size for firmware download */ +#define SD_BLOCK_SIZE_FW_DL 256 + +/** Number of blocks for firmware transfer */ +#define FIRMWARE_TRANSFER_NBLOCK 2 + +/** Firmware ready */ +#define FIRMWARE_READY 0xfedc + +/* Bus Interface Control Reg 0x07 */ +/** SD BUS width 1 */ +#define SD_BUS_WIDTH_1 0x00 +/** SD BUS width 4 */ +#define SD_BUS_WIDTH_4 0x02 +/** SD BUS width mask */ +#define SD_BUS_WIDTH_MASK 0x03 +/** Asynchronous interrupt mode */ +#define ASYNC_INT_MODE 0x20 +/* Host Control Registers */ +/** Host Control Registers : Configuration */ +#define CONFIGURATION_REG 0x00 +/** Host Control Registers : Host without Command 53 finish host*/ +#define HOST_TO_CARD_EVENT (0x1U << 3) +/** Host Control Registers : Host without Command 53 finish host */ +#define HOST_WO_CMD53_FINISH_HOST (0x1U << 2) +/** Host Control Registers : Host power up */ +#define HOST_POWER_UP (0x1U << 1) +/** Host Control Registers : Host power down */ +#define HOST_POWER_DOWN (0x1U << 0) + +/** Host Control Registers : Host interrupt RSR */ +#define HOST_INT_RSR_REG 0x01 + +/** Host Control Registers : Upload host interrupt RSR */ +#define UP_LD_HOST_INT_RSR (0x1U) + +/** Host Control Registers : Host interrupt mask */ +#define HOST_INT_MASK_REG 0x02 + +/** Host Control Registers : Upload host interrupt mask */ +#define UP_LD_HOST_INT_MASK (0x1U) +/** Host Control Registers : Download host interrupt mask */ +#define DN_LD_HOST_INT_MASK (0x2U) +/** Enable Host interrupt mask */ +#define HIM_ENABLE (UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK) +/** Disable Host interrupt mask */ +#define HIM_DISABLE 0xff + +#define HOST_INTSTATUS_REG 0x03 +/** Host Control Registers : Upload host interrupt status */ +#define UP_LD_HOST_INT_STATUS (0x1U) +/** Host Control Registers : Download host interrupt status */ +#define DN_LD_HOST_INT_STATUS (0x2U) + +/** Host Control Registers : Host interrupt status */ +#define HOST_INT_STATUS_REG 0x28 +/** Host Control Registers : Upload CRC error */ +#define UP_LD_CRC_ERR (0x1U << 2) +/** Host Control Registers : Upload restart */ +#define UP_LD_RESTART (0x1U << 1) +/** Host Control Registers : Download restart */ +#define DN_LD_RESTART (0x1U << 0) + +/* Card Control Registers */ +/** Card Control Registers : Read SQ base address A0 register */ +#define SQ_READ_BASE_ADDRESS_A0_REG 0x40 +/** Card Control Registers : Read SQ base address A1 register */ +#define SQ_READ_BASE_ADDRESS_A1_REG 0x41 +/** Card Control Registers : Read SQ base address A2 register */ +#define SQ_READ_BASE_ADDRESS_A2_REG 0x42 +/** Card Control Registers : Read SQ base address A3 register */ +#define SQ_READ_BASE_ADDRESS_A3_REG 0x43 +/** Card Control Registers : Read SQ base address B0 register */ +#define SQ_READ_BASE_ADDRESS_B0_REG 0x44 +/** Card Control Registers : Read SQ base address B1 register */ +#define SQ_READ_BASE_ADDRESS_B1_REG 0x45 +/** Card Control Registers : Read SQ base address B2 register */ +#define SQ_READ_BASE_ADDRESS_B2_REG 0x46 +/** Card Control Registers : Read SQ base address B3 register */ +#define SQ_READ_BASE_ADDRESS_B3_REG 0x47 + +/** Card Control Registers : Card status register */ +#define CARD_STATUS_REG 0x30 +/** Card Control Registers : Card I/O ready */ +#define CARD_IO_READY (0x1U << 3) +/** Card Control Registers : CIS card ready */ +#define CIS_CARD_RDY (0x1U << 2) +/** Card Control Registers : Upload card ready */ +#define UP_LD_CARD_RDY (0x1U << 1) +/** Card Control Registers : Download card ready */ +#define DN_LD_CARD_RDY (0x1U << 0) + +/** Card Control Registers : Host interrupt mask register */ +#define HOST_INTERRUPT_MASK_REG 0x34 +/** Card Control Registers : Host power interrupt mask */ +#define HOST_POWER_INT_MASK (0x1U << 3) +/** Card Control Registers : Abort card interrupt mask */ +#define ABORT_CARD_INT_MASK (0x1U << 2) +/** Card Control Registers : Upload card interrupt mask */ +#define UP_LD_CARD_INT_MASK (0x1U << 1) +/** Card Control Registers : Download card interrupt mask */ +#define DN_LD_CARD_INT_MASK (0x1U << 0) + +/** Card Control Registers : Card interrupt status register */ +#define CARD_INTERRUPT_STATUS_REG 0x38 +/** Card Control Registers : Power up interrupt */ +#define POWER_UP_INT (0x1U << 4) +/** Card Control Registers : Power down interrupt */ +#define POWER_DOWN_INT (0x1U << 3) + +/** Card Control Registers : Card interrupt RSR register */ +#define CARD_INTERRUPT_RSR_REG 0x3c +/** Card Control Registers : Power up RSR */ +#define POWER_UP_RSR (0x1U << 4) +/** Card Control Registers : Power down RSR */ +#define POWER_DOWN_RSR (0x1U << 3) + +/** Card Control Registers : Debug 0 register */ +#define DEBUG_0_REG 0x70 +/** Card Control Registers : SD test BUS 0 */ +#define SD_TESTBUS0 (0x1U) +/** Card Control Registers : Debug 1 register */ +#define DEBUG_1_REG 0x71 +/** Card Control Registers : SD test BUS 1 */ +#define SD_TESTBUS1 (0x1U) +/** Card Control Registers : Debug 2 register */ +#define DEBUG_2_REG 0x72 +/** Card Control Registers : SD test BUS 2 */ +#define SD_TESTBUS2 (0x1U) +/** Card Control Registers : Debug 3 register */ +#define DEBUG_3_REG 0x73 +/** Card Control Registers : SD test BUS 3 */ +#define SD_TESTBUS3 (0x1U) + +/** Host Control Registers : I/O port 0 */ +#define IO_PORT_0_REG 0x78 +/** Host Control Registers : I/O port 1 */ +#define IO_PORT_1_REG 0x79 +/** Host Control Registers : I/O port 2 */ +#define IO_PORT_2_REG 0x7A + +/** Firmware status 0 register */ +#define CARD_FW_STATUS0_REG 0x60 +/** Firmware status 1 register */ +#define CARD_FW_STATUS1_REG 0x61 +/** Rx length register */ +#define CARD_RX_LEN_REG 0x62 +/** Rx unit register */ +#define CARD_RX_UNIT_REG 0x63 +/** Card Control Registers : Miscellaneous Configuration Register */ +#define CARD_MISC_CFG_REG 0x6C +/** Misc. Config Register : Auto Re-enable interrupts */ +#define AUTO_RE_ENABLE_INT (0x1U << 4) + +/** Card Control Registers : Card OCR 0 register */ +#define CARD_OCR_0_REG 0x68 +/** Card Control Registers : Card OCR 1 register */ +#define CARD_OCR_1_REG 0x69 +/** Card Control Registers : Card OCR 3 register */ +#define CARD_OCR_3_REG 0x6A +/** Card Control Registers : Card config register */ +#define CARD_CONFIG_REG 0x6B +/** Card Control Registers : Card revision register */ +#define CARD_REVISION_REG 0x5c +/** Card Control Registers : Command 53 finish G BUS */ +#define CMD53_FINISH_GBUS (0x1U << 1) +/** Card Control Registers : SD negative edge */ +#define SD_NEG_EDGE (0x1U << 0) + +/* Special registers in function 0 of the SDxx card */ +/** Special register in function 0 of the SDxxx card : Scratch 0 */ +#define SCRATCH_0_REG 0x80fe +/** Special register in function 0 of the SDxxx card : Scratch 1 */ +#define SCRATCH_1_REG 0x80ff +/** Host F1 read base 0 */ +#define HOST_F1_RD_BASE_0 0x0040 +/** Host F1 read base 1 */ +#define HOST_F1_RD_BASE_1 0x0041 +/** Host F1 card ready */ +#define HOST_F1_CARD_RDY 0x0020 + +/** Chip Id Register 0 */ +#define CARD_CHIP_ID_0_REG 0x801c +/** Chip Id Register 1 */ +#define CARD_CHIP_ID_1_REG 0x801d + +struct sdio_mmc_card { + /** sdio_func structure pointer */ + struct sdio_func *func; + /** bt_private structure pointer */ + bt_private *priv; +}; + +struct sdio_card_reg { + u8 cfg; + u8 host_int_mask; // HOST_INT_MASK_REG + u8 host_intstatus; // HOST_INTSTATUS_REG + u8 host_int_rsr_reg; // HOST_INT_RSR_REG + u8 card_misc_cfg_reg; // CARD_MISC_CFG_REG + u8 card_status; // CARD_STATUS_REG + u8 sq_read_base_addr_a0; // SQ_READ_BASE_ADDRESS_A0_REG + u8 sq_read_base_addr_a1; // SQ_READ_BASE_ADDRESS_A1_REG + u8 card_revision; // CARD_REVISION_REG + u8 card_fw_status0; // CARD_FW_STATUS0_REG + u8 card_fw_status1; // CARD_FW_STATUS1_REG + u8 card_rx_len; // CARD_RX_LEN_REG + u8 card_rx_unit; // CARD_RX_UNIT_REG + u8 io_port_0; // IO_PORT_0_REG + u8 io_port_1; // IO_PORT_1_REG + u8 io_port_2; // IO_PORT_2_REG +}; + +struct sdio_device { + const struct sdio_card_reg *reg; +}; + +static const struct sdio_card_reg bt_reg_87xx = { + .cfg = 0x00, + .host_int_mask = 0x02, // HOST_INT_MASK_REG + .host_intstatus = 0x03, // HOST_INTSTATUS_REG + .host_int_rsr_reg = 0x01, // HOST_INT_RSR_REG + .card_misc_cfg_reg = 0x6c, // CARD_MISC_CFG_REG + .card_status = 0x30, // CARD_STATUS_REG + .sq_read_base_addr_a0 = 0x40, // SQ_READ_BASE_ADDRESS_A0_REG + .sq_read_base_addr_a1 = 0x41, // SQ_READ_BASE_ADDRESS_A1_REG + .card_revision = 0x5C, // CARD_REVISION_REG + .card_fw_status0 = 0x60, // CARD_FW_STATUS0_REG + .card_fw_status1 = 0x61, // CARD_FW_STATUS1_REG + .card_rx_len = 0x62, // CARD_RX_LEN_REG + .card_rx_unit = 0x63, // CARD_RX_UNIT_REG + .io_port_0 = 0x78, // IO_PORT_0_REG + .io_port_1 = 0x79, // IO_PORT_1_REG + .io_port_2 = 0x7a, // IO_PORT_2_REG +}; + +static const struct sdio_card_reg bt_reg_8887 = { + .cfg = 0x00, + .host_int_mask = 0x08, // HOST_INT_MASK_REG + .host_intstatus = 0x0C, // HOST_INTSTATUS_REG + .host_int_rsr_reg = 0x04, // HOST_INT_RSR_REG + .card_misc_cfg_reg = 0xD8, // CARD_MISC_CFG_REG + .card_status = 0x5C, // CARD_STATUS_REG + .sq_read_base_addr_a0 = 0x6C, // SQ_READ_BASE_ADDRESS_A0_REG + .sq_read_base_addr_a1 = 0x6D, // SQ_READ_BASE_ADDRESS_A1_REG + .card_revision = 0xC8, // CARD_REVISION_REG + .card_fw_status0 = 0x88, // CARD_FW_STATUS0_REG + .card_fw_status1 = 0x89, // CARD_FW_STATUS1_REG + .card_rx_len = 0x8A, // CARD_RX_LEN_REG + .card_rx_unit = 0x8B, // CARD_RX_UNIT_REG + .io_port_0 = 0xE4, // IO_PORT_0_REG + .io_port_1 = 0xE5, // IO_PORT_1_REG + .io_port_2 = 0xE6, // IO_PORT_2_REG +}; + +static const struct sdio_card_reg bt_reg_8897 = { + .cfg = 0x00, + .host_int_mask = 0x02, // HOST_INT_MASK_REG + .host_intstatus = 0x03, // HOST_INTSTATUS_REG + .host_int_rsr_reg = 0x01, // HOST_INT_RSR_REG + .card_misc_cfg_reg = 0xCC, // CARD_MISC_CFG_REG + .card_status = 0x50, // CARD_STATUS_REG + .sq_read_base_addr_a0 = 0x60, // SQ_READ_BASE_ADDRESS_A0_REG + .sq_read_base_addr_a1 = 0x61, // SQ_READ_BASE_ADDRESS_A1_REG + .card_revision = 0xBC, // CARD_REVISION_REG + .card_fw_status0 = 0xC0, // CARD_FW_STATUS0_REG + .card_fw_status1 = 0xC1, // CARD_FW_STATUS1_REG + .card_rx_len = 0xC2, // CARD_RX_LEN_REG + .card_rx_unit = 0xC3, // CARD_RX_UNIT_REG + .io_port_0 = 0xD8, // IO_PORT_0_REG + .io_port_1 = 0xD9, // IO_PORT_1_REG + .io_port_2 = 0xDA, // IO_PORT_2_REG +}; + +static const struct sdio_device bt_sdio_sd8787 = { + .reg = &bt_reg_87xx, +}; + +static const struct sdio_device bt_sdio_sd8777 = { + .reg = &bt_reg_87xx, +}; + +static const struct sdio_device bt_sdio_sd8887 = { + .reg = &bt_reg_8887, +}; + +static const struct sdio_device bt_sdio_sd8897 = { + .reg = &bt_reg_8897, +}; + +static const struct sdio_device bt_sdio_sd8797 = { + .reg = &bt_reg_87xx, +}; + +/** DMA alignment value */ +#define DMA_ALIGNMENT 64 +/** Macros for Data Alignment : size */ +#define ALIGN_SZ(p, a) \ + (((p) + ((a) - 1)) & ~((a) - 1)) + +/** Macros for Data Alignment : address */ +#define ALIGN_ADDR(p, a) \ + ((((t_ptr)(p)) + (((t_ptr)(a)) - 1)) & ~(((t_ptr)(a)) - 1)) + +/** This function read cmd52 register */ +int sd_write_reg(bt_private *priv, int reg, u8 val); +/** This function write cmd52 value to register */ +int sd_read_reg(bt_private *priv, int reg, u8 *data); +/** This function reads the Cmd52 value in dev structure */ +int sd_read_cmd52_val(bt_private *priv); +/** This function updates card reg based on the Cmd52 value in dev structure */ +int sd_write_cmd52_val(bt_private *priv, int func, int reg, int val); + +void sdio_update_card_type(bt_private *priv, void *card); +int sdio_get_sdio_device(bt_private *priv); + +#ifdef SDIO_SUSPEND_RESUME +#ifdef MMC_PM_KEEP_POWER +#ifdef MMC_PM_FUNC_SUSPENDED +/** This function tells lower driver that BT is suspended */ +void bt_is_suspended(bt_private *priv); +#endif +#endif +#endif +#endif /* _BT_SDIO_H_ */ diff --git a/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/bt_sdiommc.c b/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/bt_sdiommc.c new file mode 100644 index 00000000..b5705288 --- /dev/null +++ b/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/bt_sdiommc.c @@ -0,0 +1,2117 @@ +/** @file bt_sdiommc.c + * @brief This file contains SDIO IF (interface) module + * related functions. + * + * Copyright (C) 2007-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available along with the File in the gpl.txt file or by writing to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307 or on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#include +#include + +#include "bt_drv.h" +#include "bt_sdio.h" + +/** define marvell vendor id */ +#define MARVELL_VENDOR_ID 0x02df + +/** Max retry number of CMD53 write */ +#define MAX_WRITE_IOMEM_RETRY 2 +/** Firmware name */ +static char *fw_name; +/** fw serial download flag */ +static int bt_fw_serial = 0; +/** request firmware nowait */ +int bt_req_fw_nowait = 1; +static int multi_fn = BIT(2); + + +#define DEFAULT_FW_NAME "" + +/** FW header length for CRC check disable */ +#define FW_CRC_HEADER_RB2 28 +/** FW header for CRC check disable */ +static u8 fw_crc_header_rb_2[FW_CRC_HEADER_RB2] = { + 0x05, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x9d, 0x32, 0xbb, 0x11, 0x01, 0x00, 0x00, 0x7f, + 0x00, 0x00, 0x00, 0x00, 0x67, 0xd6, 0xfc, 0x25 +}; + +/** FW header length for CRC check disable */ +#define FW_CRC_HEADER_RB 24 +/** FW header for CRC check disable */ +static u8 fw_crc_header_rb_1[FW_CRC_HEADER_RB] = { + 0x01, 0x00, 0x00, 0x00, 0x04, 0xfd, 0x00, 0x04, + 0x08, 0x00, 0x00, 0x00, 0x26, 0x52, 0x2a, 0x7b, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +/** Default firmware name */ +#define DEFAULT_FW_NAME_8777 "mrvl/sd8777_uapsta.bin" +#define DEFAULT_FW_NAME_8787 "mrvl/sd8787_uapsta.bin" +#define DEFAULT_FW_NAME_8797 "mrvl/sd8797_uapsta.bin" +#define DEFAULT_FW_NAME_8887 "mrvl/sd8887_uapsta.bin" +#define DEFAULT_FW_NAME_8897 "mrvl/sd8897_uapsta.bin" + +/** SD8787 chip revision ID */ +#define SD8787_W0 0x30 +#define SD8787_W1 0x31 +#define SD8787_A0_A1 0x40 +/** SD8797 chip revision ID */ +#define SD8797_A0 0x00 +#define SD8797_B0 0x10 +/** SD8897 chip revision ID */ +#define SD8897_A0 0x10 +#define SD8897_B0 0x20 + +/** SD8887 chip revision ID */ +#define SD8887_A0 0x0 +#define SD8887_A2 0x2 +#define SD8887_A0_FW_NAME "mrvl/sd8887_uapsta.bin" +#define SD8887_A2_FW_NAME "mrvl/sd8887_uapsta_a2.bin" +#define SD8887_A2_BT_FW_NAME "mrvl/sd8887_bt_a2.bin" + +#define SD8897_A0_FW_NAME "mrvl/sd8897_uapsta_a0.bin" +#define SD8897_B0_FW_NAME "mrvl/sd8897_uapsta.bin" + +#define SD8787_W1_FW_NAME "mrvl/sd8787_uapsta_w1.bin" +#define SD8787_AX_FW_NAME "mrvl/sd8787_uapsta.bin" +#define SD8797_A0_FW_NAME "mrvl/sd8797_uapsta_a0.bin" +#define SD8797_B0_FW_NAME "mrvl/sd8797_uapsta.bin" +/** Function number 2 */ +#define FN2 2 +/** Device ID for SD8787 FN2 */ +#define SD_DEVICE_ID_8787_BT_FN2 0x911A +/** Device ID for SD8787 FN3 */ +#define SD_DEVICE_ID_8787_BT_FN3 0x911B +/** Device ID for SD8777 FN2 */ +#define SD_DEVICE_ID_8777_BT_FN2 0x9132 +/** Device ID for SD8777 FN3 */ +#define SD_DEVICE_ID_8777_BT_FN3 0x9133 +/** Device ID for SD8887 FN2 */ +#define SD_DEVICE_ID_8887_BT_FN2 0x9136 +/** Device ID for SD8887 FN3 */ +#define SD_DEVICE_ID_8887_BT_FN3 0x9137 +/** Device ID for SD8897 FN2 */ +#define SD_DEVICE_ID_8897_BT_FN2 0x912E +/** Device ID for SD8897 FN3 */ +#define SD_DEVICE_ID_8897_BT_FN3 0x912F +/** Device ID for SD8797 FN2 */ +#define SD_DEVICE_ID_8797_BT_FN2 0x912A +/** Device ID for SD8797 FN3 */ +#define SD_DEVICE_ID_8797_BT_FN3 0x912B + +/** Array of SDIO device ids when multi_fn=0x12 */ +static const struct sdio_device_id bt_ids[] = { + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8787_BT_FN2)}, + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8777_BT_FN2)}, + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8887_BT_FN2)}, + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8897_BT_FN2)}, + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8797_BT_FN2)}, + {} +}; + +MODULE_DEVICE_TABLE(sdio, bt_ids); + +/******************************************************** + Global Variables +********************************************************/ +/** unregiser bus driver flag */ +static u8 unregister; +#ifdef SDIO_SUSPEND_RESUME +/** PM keep power */ +extern int mbt_pm_keep_power; +#endif + +/******************************************************** + Local Functions +********************************************************/ + +/** + * @brief This function gets rx_unit value + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +sd_get_rx_unit(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + u8 reg; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + u8 card_rx_unit_reg = priv->psdio_device->reg->card_rx_unit; + + ENTER(); + + reg = sdio_readb(card->func, card_rx_unit_reg, &ret); + if (ret == BT_STATUS_SUCCESS) + priv->bt_dev.rx_unit = reg; + + LEAVE(); + return ret; +} + +/** + * @brief This function reads fwstatus registers + * + * @param priv A pointer to bt_private structure + * @param dat A pointer to keep returned data + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int +sd_read_firmware_status(bt_private *priv, u16 * dat) +{ + int ret = BT_STATUS_SUCCESS; + u8 fws0; + u8 fws1; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + u8 card_fw_status0_reg = priv->psdio_device->reg->card_fw_status0; + u8 card_fw_status1_reg = priv->psdio_device->reg->card_fw_status1; + + ENTER(); + + fws0 = sdio_readb(card->func, card_fw_status0_reg, &ret); + if (ret < 0) { + LEAVE(); + return BT_STATUS_FAILURE; + } + + fws1 = sdio_readb(card->func, card_fw_status1_reg, &ret); + if (ret < 0) { + LEAVE(); + return BT_STATUS_FAILURE; + } + + *dat = (((u16) fws1) << 8) | fws0; + + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function reads rx length + * + * @param priv A pointer to bt_private structure + * @param dat A pointer to keep returned data + * @return BT_STATUS_SUCCESS or other error no. + */ +static int +sd_read_rx_len(bt_private *priv, u16 * dat) +{ + int ret = BT_STATUS_SUCCESS; + u8 reg; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + u8 card_rx_len_reg = priv->psdio_device->reg->card_rx_len; + + ENTER(); + + reg = sdio_readb(card->func, card_rx_len_reg, &ret); + if (ret == BT_STATUS_SUCCESS) + *dat = (u16) reg << priv->bt_dev.rx_unit; + + LEAVE(); + return ret; +} + +/** + * @brief This function enables the host interrupts mask + * + * @param priv A pointer to bt_private structure + * @param mask the interrupt mask + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int +sd_enable_host_int_mask(bt_private *priv, u8 mask) +{ + int ret = BT_STATUS_SUCCESS; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + u8 host_int_mask_reg = priv->psdio_device->reg->host_int_mask; + + ENTER(); + + sdio_writeb(card->func, mask, host_int_mask_reg, &ret); + if (ret) { + PRINTM(WARN, "BT: Unable to enable the host interrupt!\n"); + ret = BT_STATUS_FAILURE; + } + + LEAVE(); + return ret; +} + +/** @brief This function disables the host interrupts mask. + * + * @param priv A pointer to bt_private structure + * @param mask the interrupt mask + * @return BT_STATUS_SUCCESS or other error no. + */ +static int +sd_disable_host_int_mask(bt_private *priv, u8 mask) +{ + int ret = BT_STATUS_FAILURE; + u8 host_int_mask; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + u8 host_int_mask_reg = priv->psdio_device->reg->host_int_mask; + + ENTER(); + + /* Read back the host_int_mask register */ + host_int_mask = sdio_readb(card->func, host_int_mask_reg, &ret); + if (ret) + goto done; + + /* Update with the mask and write back to the register */ + host_int_mask &= ~mask; + sdio_writeb(card->func, host_int_mask, host_int_mask_reg, &ret); + if (ret < 0) { + PRINTM(WARN, "BT: Unable to diable the host interrupt!\n"); + goto done; + } + ret = BT_STATUS_SUCCESS; +done: + LEAVE(); + return ret; +} + +/** + * @brief This function polls the card status register + * + * @param priv A pointer to bt_private structure + * @param bits the bit mask + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int +sd_poll_card_status(bt_private *priv, u8 bits) +{ + int tries; + int rval; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + u8 cs; + u8 card_status_reg = priv->psdio_device->reg->card_status; + + ENTER(); + + for (tries = 0; tries < MAX_POLL_TRIES * 1000; tries++) { + cs = sdio_readb(card->func, card_status_reg, &rval); + if (rval != 0) + break; + if (rval == 0 && (cs & bits) == bits) { + LEAVE(); + return BT_STATUS_SUCCESS; + } + udelay(1); + } + PRINTM(ERROR, + "BT: sdio_poll_card_status failed (%d), tries = %d, cs = 0x%x\n", + rval, tries, cs); + + LEAVE(); + return BT_STATUS_FAILURE; +} + +/** + * @brief This function reads updates the Cmd52 value in dev structure + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or other error no. + */ +int +sd_read_cmd52_val(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + u8 func, reg, val; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + + ENTER(); + + func = priv->bt_dev.cmd52_func; + reg = priv->bt_dev.cmd52_reg; + sdio_claim_host(card->func); + if (func) + val = sdio_readb(card->func, reg, &ret); + else + val = sdio_f0_readb(card->func, reg, &ret); + sdio_release_host(card->func); + if (ret) { + PRINTM(ERROR, "BT: Cannot read value from func %d reg %d\n", + func, reg); + } else { + priv->bt_dev.cmd52_val = val; + } + + LEAVE(); + return ret; +} + +/** + * @brief This function updates card reg based on the Cmd52 value in dev structure + * + * @param priv A pointer to bt_private structure + * @param func Stores func variable + * @param reg Stores reg variable + * @param val Stores val variable + * @return BT_STATUS_SUCCESS or other error no. + */ +int +sd_write_cmd52_val(bt_private *priv, int func, int reg, int val) +{ + int ret = BT_STATUS_SUCCESS; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + + ENTER(); + + if (val >= 0) { + /* Perform actual write only if val is provided */ + sdio_claim_host(card->func); + if (func) + sdio_writeb(card->func, val, reg, &ret); + else + sdio_f0_writeb(card->func, val, reg, &ret); + sdio_release_host(card->func); + if (ret) { + PRINTM(ERROR, + "BT: Cannot write value (0x%x) to func %d reg %d\n", + val, func, reg); + goto done; + } + priv->bt_dev.cmd52_val = val; + } + + /* Save current func and reg for future read */ + priv->bt_dev.cmd52_func = func; + priv->bt_dev.cmd52_reg = reg; + +done: + LEAVE(); + return ret; +} + +/** + * @brief This function updates card reg based on the Cmd52 value in dev structure + * + * @param priv A pointer to bt_private structure + * @param reg register to write + * @param val value + * @return BT_STATUS_SUCCESS or other error no. + */ +int +sd_write_reg(bt_private *priv, int reg, u8 val) +{ + int ret = BT_STATUS_SUCCESS; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + ENTER(); + sdio_claim_host(card->func); + sdio_writeb(card->func, val, reg, &ret); + sdio_release_host(card->func); + LEAVE(); + return ret; +} + +/** + * @brief This function reads updates the Cmd52 value in dev structure + * + * @param priv A pointer to bt_private structure + * @param reg register to read + * @return BT_STATUS_SUCCESS or other error no. + */ +int +sd_read_reg(bt_private *priv, int reg, u8 *data) +{ + int ret = BT_STATUS_SUCCESS; + u8 val; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + ENTER(); + sdio_claim_host(card->func); + val = sdio_readb(card->func, reg, &ret); + sdio_release_host(card->func); + *data = val; + LEAVE(); + return ret; +} + +/** + * @brief This function probes the card + * + * @param func A pointer to sdio_func structure. + * @param id A pointer to structure sdio_device_id + * @return BT_STATUS_SUCCESS/BT_STATUS_FAILURE or other error no. + */ +static int +sd_probe_card(struct sdio_func *func, const struct sdio_device_id *id) +{ + int ret = BT_STATUS_SUCCESS; + bt_private *priv = NULL; + struct sdio_mmc_card *card = NULL; + + ENTER(); + + PRINTM(INFO, "BT: vendor=0x%x,device=0x%x,class=%d,fn=%d\n", id->vendor, + id->device, id->class, func->num); + card = kzalloc(sizeof(struct sdio_mmc_card), GFP_KERNEL); + if (!card) { + ret = -ENOMEM; + goto done; + } + card->func = func; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) + /* wait for chip fully wake up */ + if (!func->enable_timeout) + func->enable_timeout = 200; +#endif + sdio_claim_host(func); + ret = sdio_enable_func(func); + if (ret) { + sdio_disable_func(func); + sdio_release_host(func); + PRINTM(FATAL, "BT: sdio_enable_func() failed: ret=%d\n", ret); + kfree(card); + LEAVE(); + return -EIO; + } + sdio_release_host(func); + priv = bt_add_card(card); + if (!priv) { + sdio_claim_host(func); + sdio_disable_func(func); + sdio_release_host(func); + ret = BT_STATUS_FAILURE; + kfree(card); + } +done: + LEAVE(); + return ret; +} + +/** + * @brief This function checks if the firmware is ready to accept + * command or not. + * + * @param priv A pointer to bt_private structure + * @param pollnum Number of times to poll fw status + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +sd_verify_fw_download(bt_private *priv, int pollnum) +{ + int ret = BT_STATUS_FAILURE; + u16 firmwarestat = 0; + int tries; + + ENTER(); + + /* Wait for firmware initialization event */ + for (tries = 0; tries < pollnum; tries++) { + if (sd_read_firmware_status(priv, &firmwarestat) < 0) + continue; + if (firmwarestat == FIRMWARE_READY) { + PRINTM(MSG, "BT FW is active(%d)\n", tries); + ret = BT_STATUS_SUCCESS; + break; + } + mdelay(100); + } + if ((pollnum > 1) && (ret != BT_STATUS_SUCCESS)) + PRINTM(ERROR, + "Fail to poll firmware status: firmwarestat=0x%x\n", + firmwarestat); + LEAVE(); + return ret; +} + +/** + * @brief Transfers firmware to card + * + * @param priv A Pointer to bt_private structure + * @param fw A Pointer to fw image + * @param fw_len fw image len + * @return BT_STATUS_SUCCESS/BT_STATUS_FAILURE or other error no. + */ +static int +sd_init_fw_dpc(bt_private *priv, u8 *fw, int fw_len) +{ + struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card; + u8 *firmware = fw; + int firmwarelen = fw_len; + u8 base0; + u8 base1; + int ret = BT_STATUS_SUCCESS; + int offset; + void *tmpfwbuf = NULL; + int tmpfwbufsz; + u8 *fwbuf; + u16 len; + int txlen = 0; + int tx_blocks = 0; + int i = 0; + int tries = 0; + u8 sq_read_base_address_a0_reg = + priv->psdio_device->reg->sq_read_base_addr_a0; + u8 sq_read_base_address_a1_reg = + priv->psdio_device->reg->sq_read_base_addr_a1; + u8 crc_buffer = 0; + u8 *header_crc_fw = NULL; + u8 header_crc_fw_len = 0; + + if (priv->card_type == CARD_TYPE_SD8787) { + header_crc_fw = fw_crc_header_rb_1; + header_crc_fw_len = FW_CRC_HEADER_RB; + } else if (priv->card_type == CARD_TYPE_SD8777) { + header_crc_fw = fw_crc_header_rb_2; + header_crc_fw_len = FW_CRC_HEADER_RB2; + } + + ENTER(); + + PRINTM(INFO, "BT: Downloading FW image (%d bytes)\n", firmwarelen); + + tmpfwbufsz = BT_UPLD_SIZE + DMA_ALIGNMENT; + tmpfwbuf = kzalloc(tmpfwbufsz, GFP_KERNEL); + if (!tmpfwbuf) { + PRINTM(ERROR, + "BT: Unable to allocate buffer for firmware. Terminating download\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + /* Ensure aligned firmware buffer */ + fwbuf = (u8 *)ALIGN_ADDR(tmpfwbuf, DMA_ALIGNMENT); + + if (!(priv->fw_crc_check) + && ((priv->card_type == CARD_TYPE_SD8787) || + (priv->card_type == CARD_TYPE_SD8777)) + ) { + /* CRC check not required, use custom header first */ + firmware = header_crc_fw; + firmwarelen = header_crc_fw_len; + crc_buffer = 1; + } + + /* Perform firmware data transfer */ + offset = 0; + do { + /* The host polls for the DN_LD_CARD_RDY and CARD_IO_READY bits + */ + ret = sd_poll_card_status(priv, CARD_IO_READY | DN_LD_CARD_RDY); + if (ret < 0) { + PRINTM(FATAL, + "BT: FW download with helper poll status timeout @ %d\n", + offset); + goto done; + } + if (!crc_buffer) + /* More data? */ + if (offset >= firmwarelen) + break; + + for (tries = 0; tries < MAX_POLL_TRIES; tries++) { + base0 = sdio_readb(card->func, + sq_read_base_address_a0_reg, &ret); + if (ret) { + PRINTM(WARN, "Dev BASE0 register read failed:" + " base0=0x%04X(%d). Terminating download\n", + base0, base0); + ret = BT_STATUS_FAILURE; + goto done; + } + base1 = sdio_readb(card->func, + sq_read_base_address_a1_reg, &ret); + if (ret) { + PRINTM(WARN, "Dev BASE1 register read failed:" + " base1=0x%04X(%d). Terminating download\n", + base1, base1); + ret = BT_STATUS_FAILURE; + goto done; + } + len = (((u16) base1) << 8) | base0; + + if (len != 0) + break; + udelay(10); + } + + if (len == 0) + break; + else if (len > BT_UPLD_SIZE) { + PRINTM(FATAL, + "BT: FW download failure @ %d, invalid length %d\n", + offset, len); + ret = BT_STATUS_FAILURE; + goto done; + } + + txlen = len; + + if (len & BIT(0)) { + i++; + if (i > MAX_WRITE_IOMEM_RETRY) { + PRINTM(FATAL, + "BT: FW download failure @ %d, over max retry count\n", + offset); + ret = BT_STATUS_FAILURE; + goto done; + } + PRINTM(ERROR, + "BT: FW CRC error indicated by the helper:" + " len = 0x%04X, txlen = %d\n", len, txlen); + len &= ~BIT(0); + + PRINTM(ERROR, "BT: retry: %d, offset %d\n", i, offset); + /* Setting this to 0 to resend from same offset */ + txlen = 0; + } else { + i = 0; + + /* Set blocksize to transfer - checking for last block */ + if (firmwarelen - offset < txlen) + txlen = firmwarelen - offset; + + PRINTM(INFO, "."); + + tx_blocks = + (txlen + SD_BLOCK_SIZE_FW_DL - + 1) / SD_BLOCK_SIZE_FW_DL; + + /* Copy payload to buffer */ + memcpy(fwbuf, &firmware[offset], txlen); + } + + /* Send data */ + ret = sdio_writesb(card->func, priv->bt_dev.ioport, fwbuf, + tx_blocks * SD_BLOCK_SIZE_FW_DL); + + if (ret < 0) { + PRINTM(ERROR, + "BT: FW download, write iomem (%d) failed @ %d\n", + i, offset); + sdio_writeb(card->func, 0x04, CONFIGURATION_REG, &ret); + if (ret) + PRINTM(ERROR, "write ioreg failed (CFG)\n"); + } + + offset += txlen; + if (crc_buffer + && ((priv->card_type == CARD_TYPE_SD8787) || + (priv->card_type == CARD_TYPE_SD8777)) + ) { + if (offset >= header_crc_fw_len) { + /* Custom header download complete, restore + original FW */ + offset = 0; + firmware = fw; + firmwarelen = fw_len; + crc_buffer = 0; + } + } + } while (TRUE); + + PRINTM(MSG, "BT: FW download over, size %d bytes\n", offset); + + ret = BT_STATUS_SUCCESS; +done: + kfree(tmpfwbuf); + LEAVE(); + return ret; +} + +/** + * @brief request_firmware callback + * + * @param fw_firmware A pointer to firmware structure + * @param context A Pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int +sd_request_fw_dpc(const struct firmware *fw_firmware, void *context) +{ + int ret = BT_STATUS_SUCCESS; + bt_private *priv = (bt_private *)context; + struct sdio_mmc_card *card = NULL; + struct m_dev *m_dev_bt = NULL; + struct m_dev *m_dev_fm = NULL; + struct m_dev *m_dev_nfc = NULL; + struct timeval tstamp; + + ENTER(); + + m_dev_bt = &priv->bt_dev.m_dev[BT_SEQ]; + m_dev_fm = &priv->bt_dev.m_dev[FM_SEQ]; + m_dev_nfc = &priv->bt_dev.m_dev[NFC_SEQ]; + + if ((priv == NULL) || (priv->adapter == NULL) || + (priv->bt_dev.card == NULL) || (m_dev_bt == NULL) || + (m_dev_fm == NULL) || (m_dev_nfc == NULL)) { + LEAVE(); + return BT_STATUS_FAILURE; + } + + card = (struct sdio_mmc_card *)priv->bt_dev.card; + + if (!fw_firmware) { + do_gettimeofday(&tstamp); + if (tstamp.tv_sec > + (priv->req_fw_time.tv_sec + REQUEST_FW_TIMEOUT)) { + PRINTM(ERROR, + "BT: No firmware image found. Skipping download\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + PRINTM(ERROR, + "BT: No firmware image found! Retrying download\n"); + /* Wait a second here before calling the callback again */ + os_sched_timeout(1000); + sd_download_firmware_w_helper(priv); + LEAVE(); + return ret; + } + + priv->firmware = fw_firmware; + + if (BT_STATUS_FAILURE == + sd_init_fw_dpc(priv, (u8 *)priv->firmware->data, + priv->firmware->size)) { + PRINTM(ERROR, + "BT: sd_init_fw_dpc failed (download fw with nowait: %d). Terminating download\n", + bt_req_fw_nowait); + sdio_release_host(card->func); + ret = BT_STATUS_FAILURE; + goto done; + } + + /* check if the fimware is downloaded successfully or not */ + if (sd_verify_fw_download(priv, MAX_FIRMWARE_POLL_TRIES)) { + PRINTM(ERROR, "BT: FW failed to be active in time!\n"); + ret = BT_STATUS_FAILURE; + sdio_release_host(card->func); + goto done; + } + sdio_release_host(card->func); + sd_enable_host_int(priv); + if (BT_STATUS_FAILURE == sbi_register_conf_dpc(priv)) { + PRINTM(ERROR, + "BT: sbi_register_conf_dpc failed. Terminating download\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + if (fw_firmware) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) + if (!bt_req_fw_nowait) +#endif + release_firmware(fw_firmware); + } + LEAVE(); + return ret; + +done: + if (fw_firmware) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) + if (!bt_req_fw_nowait) +#endif + release_firmware(fw_firmware); + } + /* For synchronous download cleanup will be done in add_card */ + if (!bt_req_fw_nowait) + return ret; + PRINTM(INFO, "unregister device\n"); + sbi_unregister_dev(priv); + ((struct sdio_mmc_card *)card)->priv = NULL; + /* Stop the thread servicing the interrupts */ + priv->adapter->SurpriseRemoved = TRUE; + wake_up_interruptible(&priv->MainThread.waitQ); + while (priv->MainThread.pid) + os_sched_timeout(1); + bt_proc_remove(priv); + clean_up_m_devs(priv); + bt_free_adapter(priv); + bt_priv_put(priv); + LEAVE(); + return ret; +} + +/** + * @brief request_firmware callback + * This function is invoked by request_firmware_nowait system call + * + * @param firmware A pointer to firmware structure + * @param context A Pointer to bt_private structure + * @return None + **/ +static void +sd_request_fw_callback(const struct firmware *firmware, void *context) +{ + ENTER(); + sd_request_fw_dpc(firmware, context); + LEAVE(); + return; +} + +/** + * @brief This function downloads firmware image to the card. + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS/BT_STATUS_FAILURE or other error no. + */ +int +sd_download_firmware_w_helper(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + int err; + char *cur_fw_name = NULL; + + ENTER(); + + cur_fw_name = fw_name; + if (fw_name == NULL) { + if (priv->card_type == CARD_TYPE_SD8787) + cur_fw_name = DEFAULT_FW_NAME_8787; + else if (priv->card_type == CARD_TYPE_SD8777) + cur_fw_name = DEFAULT_FW_NAME_8777; + else if (priv->card_type == CARD_TYPE_SD8887) { + /* Check revision ID */ + switch (priv->adapter->chip_rev) { + case SD8887_A0: + cur_fw_name = SD8887_A0_FW_NAME; + break; + case SD8887_A2: + if (bt_fw_serial == 1) + cur_fw_name = SD8887_A2_FW_NAME; + else + cur_fw_name = SD8887_A2_BT_FW_NAME; + break; + default: + cur_fw_name = DEFAULT_FW_NAME_8887; + break; + } + } else if (priv->card_type == CARD_TYPE_SD8897) + cur_fw_name = DEFAULT_FW_NAME_8897; + else if (priv->card_type == CARD_TYPE_SD8797) + cur_fw_name = DEFAULT_FW_NAME_8797; + } + + if (bt_req_fw_nowait) { +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) + ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, + cur_fw_name, priv->hotplug_device, + GFP_KERNEL, priv, + sd_request_fw_callback); +#else +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 13) + ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, + cur_fw_name, priv->hotplug_device, + priv, sd_request_fw_callback); +#else + ret = request_firmware_nowait(THIS_MODULE, + cur_fw_name, priv->hotplug_device, + priv, sd_request_fw_callback); +#endif +#endif + if (ret < 0) + PRINTM(FATAL, + "BT: request_firmware_nowait() failed, error code = %#x\n", + ret); + } else { + err = request_firmware(&priv->firmware, cur_fw_name, + priv->hotplug_device); + if (err < 0) { + PRINTM(FATAL, + "BT: request_firmware() failed, error code = %#x\n", + err); + ret = BT_STATUS_FAILURE; + } else + ret = sd_request_fw_dpc(priv->firmware, priv); + } + + LEAVE(); + return ret; +} + +/** + * @brief This function reads data from the card. + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +static int +sd_card_to_host(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + u16 buf_len = 0; + int buf_block_len; + int blksz; + struct sk_buff *skb = NULL; + u32 type; + u8 *payload = NULL; + struct mbt_dev *mbt_dev = NULL; + struct m_dev *mdev_bt = &(priv->bt_dev.m_dev[BT_SEQ]); + struct m_dev *mdev_fm = &(priv->bt_dev.m_dev[FM_SEQ]); + struct m_dev *mdev_nfc = &(priv->bt_dev.m_dev[NFC_SEQ]); + struct nfc_dev *nfc_dev = + (struct nfc_dev *)priv->bt_dev.m_dev[NFC_SEQ].dev_pointer; + struct fm_dev *fm_dev = + (struct fm_dev *)priv->bt_dev.m_dev[FM_SEQ].dev_pointer; + struct m_dev *mdev_debug = &(priv->bt_dev.m_dev[DEBUG_SEQ]); + struct debug_dev *debug_dev = + (struct debug_dev *)priv->bt_dev.m_dev[DEBUG_SEQ].dev_pointer; + struct sdio_mmc_card *card = priv->bt_dev.card; + + ENTER(); + if (priv->bt_dev.m_dev[BT_SEQ].spec_type != BLUEZ_SPEC) + mbt_dev = + (struct mbt_dev *)priv->bt_dev.m_dev[BT_SEQ]. + dev_pointer; + if (!card || !card->func) { + PRINTM(ERROR, "BT: card or function is NULL!\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + + /* Read the length of data to be transferred */ + ret = sd_read_rx_len(priv, &buf_len); + if (ret < 0) { + PRINTM(ERROR, "BT: card_to_host, read scratch reg failed\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + + /* Allocate buffer */ + blksz = SD_BLOCK_SIZE; + buf_block_len = (buf_len + blksz - 1) / blksz; + if (buf_len <= BT_HEADER_LEN || + (buf_block_len * blksz) > ALLOC_BUF_SIZE) { + PRINTM(ERROR, "BT: card_to_host, invalid packet length: %d\n", + buf_len); + ret = BT_STATUS_FAILURE; + goto exit; + } + skb = bt_skb_alloc(buf_block_len * blksz + DMA_ALIGNMENT, GFP_ATOMIC); + if (skb == NULL) { + PRINTM(WARN, "BT: No free skb\n"); + goto exit; + } + if ((t_ptr)skb->data & (DMA_ALIGNMENT - 1)) { + skb_put(skb, + DMA_ALIGNMENT - + ((t_ptr)skb->data & (DMA_ALIGNMENT - 1))); + skb_pull(skb, + DMA_ALIGNMENT - + ((t_ptr)skb->data & (DMA_ALIGNMENT - 1))); + } + + payload = skb->data; + ret = sdio_readsb(card->func, payload, priv->bt_dev.ioport, + buf_block_len * blksz); + if (ret < 0) { + PRINTM(ERROR, "BT: card_to_host, read iomem failed: %d\n", ret); + kfree_skb(skb); + skb = NULL; + ret = BT_STATUS_FAILURE; + goto exit; + } + /* This is SDIO specific header length: byte[2][1][0], * type: byte[3] + (HCI_COMMAND = 1, ACL_DATA = 2, SCO_DATA = 3, 0xFE = Vendor) */ + buf_len = payload[0]; + buf_len |= (u16) payload[1] << 8; + type = payload[3]; + PRINTM(DATA, "BT: SDIO Blk Rd %s: len=%d type=%d\n", mbt_dev->name, + buf_len, type); + if (buf_len > buf_block_len * blksz) { + PRINTM(ERROR, + "BT: Drop invalid rx pkt, len in hdr=%d, cmd53 length=%d\n", + buf_len, buf_block_len * blksz); + ret = BT_STATUS_FAILURE; + kfree_skb(skb); + skb = NULL; + goto exit; + } + DBG_HEXDUMP(DAT_D, "BT: SDIO Blk Rd", payload, buf_len); + switch (type) { + case HCI_ACLDATA_PKT: + bt_cb(skb)->pkt_type = type; + skb_put(skb, buf_len); + skb_pull(skb, BT_HEADER_LEN); + if (mbt_dev) { + skb->dev = (void *)mdev_bt; + mdev_recv_frame(skb); + mdev_bt->stat.byte_rx += buf_len; + } + break; + case HCI_SCODATA_PKT: + bt_cb(skb)->pkt_type = type; + skb_put(skb, buf_len); + skb_pull(skb, BT_HEADER_LEN); + if (mbt_dev) { + skb->dev = (void *)mdev_bt; + mdev_recv_frame(skb); + mdev_bt->stat.byte_rx += buf_len; + } + break; + case HCI_EVENT_PKT: + /** add EVT Demux */ + bt_cb(skb)->pkt_type = type; + skb_put(skb, buf_len); + skb_pull(skb, BT_HEADER_LEN); + if (BT_STATUS_SUCCESS == check_evtpkt(priv, skb)) + break; + switch (skb->data[0]) { + case 0x0E: + /** cmd complete */ + if (priv->debug_device_pending) { + if (priv->debug_ocf_ogf[0] == skb->data[3] && + priv->debug_ocf_ogf[1] == skb->data[4]) { + priv->debug_device_pending = 0; + priv->debug_ocf_ogf[0] = 0; + priv->debug_ocf_ogf[1] = 0; + /** debug cmd complete */ + if (debug_dev) { + skb->dev = (void *)mdev_debug; + mdev_recv_frame(skb); + mdev_debug->stat.byte_rx += + buf_len; + } + break; + } + } + if (skb->data[3] == 0x80 && skb->data[4] == 0xFE) { + /** FM cmd complete */ + if (fm_dev) { + skb->dev = (void *)mdev_fm; + mdev_recv_frame(skb); + mdev_fm->stat.byte_rx += buf_len; + } + } else if (skb->data[3] == 0x81 && skb->data[4] == 0xFE) { + /** NFC cmd complete */ + if (nfc_dev) { + skb->dev = (void *)mdev_nfc; + mdev_recv_frame(skb); + mdev_nfc->stat.byte_rx += buf_len; + } + } else { + if (mbt_dev) { + skb->dev = (void *)mdev_bt; + mdev_recv_frame(skb); + mdev_bt->stat.byte_rx += buf_len; + } + } + break; + case 0x0F: + /** cmd status */ + if (skb->data[4] == 0x80 && skb->data[5] == 0xFE) { + /** FM cmd ststus */ + if (fm_dev) { + skb->dev = (void *)mdev_fm; + mdev_recv_frame(skb); + mdev_fm->stat.byte_rx += buf_len; + } + } else if (skb->data[4] == 0x81 && skb->data[5] == 0xFE) { + /** NFC cmd ststus */ + if (nfc_dev) { + skb->dev = (void *)mdev_nfc; + mdev_recv_frame(skb); + mdev_nfc->stat.byte_rx += buf_len; + } + } else { + /** BT cmd status */ + if (mbt_dev) { + skb->dev = (void *)mdev_bt; + mdev_recv_frame(skb); + mdev_bt->stat.byte_rx += buf_len; + } + } + break; + case 0xFF: + /** Vendor specific pkt */ + if (skb->data[2] == 0xC0) { + /** NFC EVT */ + if (nfc_dev) { + skb->dev = (void *)mdev_nfc; + mdev_recv_frame(skb); + mdev_nfc->stat.byte_rx += buf_len; + } + } else if (skb->data[2] >= 0x80 && skb->data[2] <= 0xAF) { + /** FM EVT */ + if (fm_dev) { + skb->dev = (void *)mdev_fm; + mdev_recv_frame(skb); + mdev_fm->stat.byte_rx += buf_len; + } + } else { + /** BT EVT */ + if (mbt_dev) { + skb->dev = (void *)mdev_bt; + mdev_recv_frame(skb); + mdev_bt->stat.byte_rx += buf_len; + } + } + break; + default: + /** BT EVT */ + if (mbt_dev) { + skb->dev = (void *)mdev_bt; + mdev_recv_frame(skb); + mdev_bt->stat.byte_rx += buf_len; + } + break; + } + break; + case MRVL_VENDOR_PKT: + /* Just think here need to back compatible FM */ + bt_cb(skb)->pkt_type = HCI_VENDOR_PKT; + skb_put(skb, buf_len); + skb_pull(skb, BT_HEADER_LEN); + if (mbt_dev) { + if (BT_STATUS_SUCCESS != bt_process_event(priv, skb)) { + skb->dev = (void *)mdev_bt; + mdev_recv_frame(skb); + mdev_bt->stat.byte_rx += buf_len; + } + } + + break; + default: + /* Driver specified event and command resp should be handle + here */ + PRINTM(INFO, "BT: Unknown PKT type:%d\n", type); + kfree_skb(skb); + skb = NULL; + break; + } +exit: + if (ret) { + if (mbt_dev) + mdev_bt->stat.err_rx++; + PRINTM(ERROR, "error when recv pkt!\n"); + } + + LEAVE(); + return ret; +} + +/** + * @brief This function removes the card + * + * @param func A pointer to sdio_func structure + * @return N/A + */ +static void +sd_remove_card(struct sdio_func *func) +{ + struct sdio_mmc_card *card; + + ENTER(); + + if (func) { + card = sdio_get_drvdata(func); + if (card) { + if (!unregister && card->priv) { + PRINTM(INFO, "BT: card removed from sd slot\n"); + ((bt_private *)(card->priv))->adapter-> + SurpriseRemoved = TRUE; + } + bt_remove_card(card->priv); + kfree(card); + } + } + + LEAVE(); +} + +/** + * @brief This function handles the interrupt. + * + * @param func A pointer to sdio_func structure + * @return N/A + */ +static void +sd_interrupt(struct sdio_func *func) +{ + bt_private *priv; + struct m_dev *m_dev = NULL; + struct sdio_mmc_card *card; + int ret = BT_STATUS_SUCCESS; + u8 ireg = 0; + u8 host_intstatus_reg = 0; + + ENTER(); + + card = sdio_get_drvdata(func); + if (!card || !card->priv) { + PRINTM(INFO, + "BT: %s: sbi_interrupt(%p) card or priv is NULL, card=%p\n", + __func__, func, card); + LEAVE(); + return; + } + priv = card->priv; + host_intstatus_reg = priv->psdio_device->reg->host_intstatus; + m_dev = &(priv->bt_dev.m_dev[BT_SEQ]); + if (priv->card_type == CARD_TYPE_SD8887 || + priv->card_type == CARD_TYPE_SD8897) { + ret = sdio_readsb(card->func, priv->adapter->hw_regs, 0, + SD_BLOCK_SIZE); + if (ret) { + PRINTM(ERROR, + "BT: sdio_read_ioreg: cmd53 read int status register failed %d\n", + ret); + goto done; + } + ireg = priv->adapter->hw_regs[host_intstatus_reg]; + } else { + ireg = sdio_readb(card->func, host_intstatus_reg, &ret); + } + if (ret) { + PRINTM(ERROR, + "BT: sdio_read_ioreg: CMD52 read int status register failed %d\n", + ret); + goto done; + } + if (ireg != 0) { + /* + * DN_LD_HOST_INT_STATUS and/or UP_LD_HOST_INT_STATUS + * Clear the interrupt status register and re-enable + * the interrupt + */ + PRINTM(INTR, "BT: INT %s: sdio_ireg = 0x%x\n", m_dev->name, + ireg); + priv->adapter->irq_recv = ireg; + if (priv->card_type != CARD_TYPE_SD8887 && + priv->card_type != CARD_TYPE_SD8897 && + priv->card_type != CARD_TYPE_SD8797) { + sdio_writeb(card->func, + ~(ireg) & (DN_LD_HOST_INT_STATUS | + UP_LD_HOST_INT_STATUS), + host_intstatus_reg, &ret); + if (ret) { + PRINTM(ERROR, + "BT: sdio_write_ioreg: clear int status register failed\n"); + goto done; + } + } + } else { + PRINTM(ERROR, "BT: ERR: ireg=0\n"); + } + OS_INT_DISABLE; + priv->adapter->sd_ireg |= ireg; + OS_INT_RESTORE; + bt_interrupt(m_dev); +done: + LEAVE(); +} + +/** + * @brief This function checks if the interface is ready to download + * or not while other download interfaces are present + * + * @param priv A pointer to bt_private structure + * @param val Winner status (0: winner) + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +sd_check_winner_status(bt_private *priv, u8 *val) +{ + + int ret = BT_STATUS_SUCCESS; + u8 winner = 0; + struct sdio_mmc_card *cardp = (struct sdio_mmc_card *)priv->bt_dev.card; + u8 card_fw_status0_reg = priv->psdio_device->reg->card_fw_status0; + + ENTER(); + winner = sdio_readb(cardp->func, card_fw_status0_reg, &ret); + if (ret != BT_STATUS_SUCCESS) { + LEAVE(); + return BT_STATUS_FAILURE; + } + *val = winner; + + LEAVE(); + return ret; +} + +#ifdef SDIO_SUSPEND_RESUME +#ifdef MMC_PM_KEEP_POWER +#ifdef MMC_PM_FUNC_SUSPENDED +/** @brief This function tells lower driver that BT is suspended + * + * @param priv A pointer to bt_private structure + * @return None + */ +void +bt_is_suspended(bt_private *priv) +{ + struct sdio_mmc_card *card = priv->bt_dev.card; + priv->adapter->is_suspended = TRUE; + sdio_func_suspended(card->func); +} +#endif + +/** @brief This function handles client driver suspend + * + * @param dev A pointer to device structure + * @return BT_STATUS_SUCCESS or other error no. + */ +int +bt_sdio_suspend(struct device *dev) +{ + struct sdio_func *func = dev_to_sdio_func(dev); + mmc_pm_flag_t pm_flags = 0; + bt_private *priv = NULL; + struct sdio_mmc_card *cardp; + struct m_dev *m_dev = NULL; + + ENTER(); + + pm_flags = sdio_get_host_pm_caps(func); + PRINTM(CMD, "BT: %s: suspend: PM flags = 0x%x\n", sdio_func_id(func), + pm_flags); + if (!(pm_flags & MMC_PM_KEEP_POWER)) { + PRINTM(ERROR, + "BT: %s: cannot remain alive while host is suspended\n", + sdio_func_id(func)); + return -ENOSYS; + } + cardp = sdio_get_drvdata(func); + if (!cardp || !cardp->priv) { + PRINTM(ERROR, "BT: Card or priv structure is not valid\n"); + LEAVE(); + return BT_STATUS_SUCCESS; + } + + priv = cardp->priv; + + if ((mbt_pm_keep_power) && (priv->adapter->hs_state != HS_ACTIVATED)) { + /* disable FM event mask */ + if ((priv->bt_dev.m_dev[FM_SEQ].dev_type == FM_TYPE) && + test_bit(HCI_RUNNING, &(priv->bt_dev.m_dev[FM_SEQ].flags))) + fm_set_intr_mask(priv, FM_DISABLE_INTR_MASK); + if (BT_STATUS_SUCCESS != bt_enable_hs(priv)) { + PRINTM(CMD, "BT: HS not actived, suspend fail!\n"); + if (BT_STATUS_SUCCESS != bt_enable_hs(priv)) { + PRINTM(CMD, + "BT: HS not actived the second time, force to suspend!\n"); + } + } + } + m_dev = &(priv->bt_dev.m_dev[BT_SEQ]); + PRINTM(CMD, "BT %s: SDIO suspend\n", m_dev->name); + mbt_hci_suspend_dev(m_dev); + skb_queue_purge(&priv->adapter->tx_queue); + + priv->adapter->is_suspended = TRUE; + + LEAVE(); + /* We will keep the power when hs enabled successfully */ + if ((mbt_pm_keep_power) && (priv->adapter->hs_state == HS_ACTIVATED)) { +#ifdef MMC_PM_SKIP_RESUME_PROBE + PRINTM(CMD, "BT: suspend with MMC_PM_KEEP_POWER and " + "MMC_PM_SKIP_RESUME_PROBE\n"); + return sdio_set_host_pm_flags(func, + MMC_PM_KEEP_POWER | + MMC_PM_SKIP_RESUME_PROBE); +#else + PRINTM(CMD, "BT: suspend with MMC_PM_KEEP_POWER\n"); + return sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); +#endif + } else { + PRINTM(CMD, "BT: suspend without MMC_PM_KEEP_POWER\n"); + return BT_STATUS_SUCCESS; + } +} + +/** @brief This function handles client driver resume + * + * @param dev A pointer to device structure + * @return BT_STATUS_SUCCESS + */ +int +bt_sdio_resume(struct device *dev) +{ + struct sdio_func *func = dev_to_sdio_func(dev); + mmc_pm_flag_t pm_flags = 0; + bt_private *priv = NULL; + struct sdio_mmc_card *cardp; + struct m_dev *m_dev = NULL; + + ENTER(); + pm_flags = sdio_get_host_pm_caps(func); + PRINTM(CMD, "BT: %s: resume: PM flags = 0x%x\n", sdio_func_id(func), + pm_flags); + cardp = sdio_get_drvdata(func); + if (!cardp || !cardp->priv) { + PRINTM(ERROR, "BT: Card or priv structure is not valid\n"); + LEAVE(); + return BT_STATUS_SUCCESS; + } + + priv = cardp->priv; + priv->adapter->is_suspended = FALSE; + m_dev = &(priv->bt_dev.m_dev[BT_SEQ]); + PRINTM(CMD, "BT %s: SDIO resume\n", m_dev->name); + mbt_hci_resume_dev(m_dev); + sbi_wakeup_firmware(priv); + /* enable FM event mask */ + if ((priv->bt_dev.m_dev[FM_SEQ].dev_type == FM_TYPE) && + test_bit(HCI_RUNNING, &(priv->bt_dev.m_dev[FM_SEQ].flags))) + fm_set_intr_mask(priv, FM_DEFAULT_INTR_MASK); + priv->adapter->hs_state = HS_DEACTIVATED; + PRINTM(CMD, "BT:%s: HS DEACTIVATED in Resume!\n", m_dev->name); + LEAVE(); + return BT_STATUS_SUCCESS; +} +#endif +#endif + +/******************************************************** + Global Functions +********************************************************/ +#ifdef SDIO_SUSPEND_RESUME +#ifdef MMC_PM_KEEP_POWER +static const struct dev_pm_ops bt_sdio_pm_ops = { + .suspend = bt_sdio_suspend, + .resume = bt_sdio_resume, +}; +#endif +#endif +static struct sdio_driver sdio_bt = { + .name = "sdio_bt", + .id_table = bt_ids, + .probe = sd_probe_card, + .remove = sd_remove_card, +#ifdef SDIO_SUSPEND_RESUME +#ifdef MMC_PM_KEEP_POWER + .drv = { + .pm = &bt_sdio_pm_ops, + } +#endif +#endif +}; + +/** + * @brief This function registers the bt module in bus driver. + * + * @return An int pointer that keeps returned value + */ +int * +sbi_register(void) +{ + int *ret; + + ENTER(); + + if (sdio_register_driver(&sdio_bt) != 0) { + PRINTM(FATAL, "BT: SD Driver Registration Failed\n"); + LEAVE(); + return NULL; + } else + ret = (int *)1; + + LEAVE(); + return ret; +} + +/** + * @brief This function de-registers the bt module in bus driver. + * + * @return N/A + */ +void +sbi_unregister(void) +{ + ENTER(); + unregister = TRUE; + sdio_unregister_driver(&sdio_bt); + LEAVE(); +} + +/** + * @brief This function registers the device. + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +sbi_register_dev(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + u8 reg; + u8 chiprev; + struct sdio_mmc_card *card = priv->bt_dev.card; + struct sdio_func *func; + u8 host_intstatus_reg = priv->psdio_device->reg->host_intstatus; + u8 host_int_rsr_reg = priv->psdio_device->reg->host_int_rsr_reg; + u8 card_misc_cfg_reg = priv->psdio_device->reg->card_misc_cfg_reg; + u8 card_revision_reg = priv->psdio_device->reg->card_revision; + u8 io_port_0_reg = priv->psdio_device->reg->io_port_0; + u8 io_port_1_reg = priv->psdio_device->reg->io_port_1; + u8 io_port_2_reg = priv->psdio_device->reg->io_port_2; + + ENTER(); + + if (!card || !card->func) { + PRINTM(ERROR, "BT: Error: card or function is NULL!\n"); + goto failed; + } + func = card->func; + priv->hotplug_device = &func->dev; + + /* Initialize the private structure */ + strncpy(priv->bt_dev.name, "bt_sdio0", sizeof(priv->bt_dev.name)); + priv->bt_dev.ioport = 0; + priv->bt_dev.fn = func->num; + + sdio_claim_host(func); + ret = sdio_claim_irq(func, sd_interrupt); + if (ret) { + PRINTM(FATAL, ": sdio_claim_irq failed: ret=%d\n", ret); + goto release_host; + } + ret = sdio_set_block_size(card->func, SD_BLOCK_SIZE); + if (ret) { + PRINTM(FATAL, ": %s: cannot set SDIO block size\n", __func__); + goto release_irq; + } + + /* read Revision Register to get the chip revision number */ + chiprev = sdio_readb(func, card_revision_reg, &ret); + if (ret) { + PRINTM(FATAL, ": cannot read CARD_REVISION_REG\n"); + goto release_irq; + } + priv->adapter->chip_rev = chiprev; + PRINTM(INFO, "revision=%#x\n", chiprev); + + /* + * Read the HOST_INTSTATUS_REG for ACK the first interrupt got + * from the bootloader. If we don't do this we get a interrupt + * as soon as we register the irq. + */ + reg = sdio_readb(func, host_intstatus_reg, &ret); + if (ret < 0) + goto release_irq; + + /* Read the IO port */ + reg = sdio_readb(func, io_port_0_reg, &ret); + if (ret < 0) + goto release_irq; + else + priv->bt_dev.ioport |= reg; + + reg = sdio_readb(func, io_port_1_reg, &ret); + if (ret < 0) + goto release_irq; + else + priv->bt_dev.ioport |= (reg << 8); + + reg = sdio_readb(func, io_port_2_reg, &ret); + if (ret < 0) + goto release_irq; + else + priv->bt_dev.ioport |= (reg << 16); + + PRINTM(INFO, ": SDIO FUNC%d IO port: 0x%x\n", priv->bt_dev.fn, + priv->bt_dev.ioport); +#define SDIO_INT_MASK 0x3F + if (priv->card_type == CARD_TYPE_SD8887 || + priv->card_type == CARD_TYPE_SD8897 || + priv->card_type == CARD_TYPE_SD8797) { + /* Set Host interrupt reset to read to clear */ + reg = sdio_readb(func, host_int_rsr_reg, &ret); + if (ret < 0) + goto release_irq; + sdio_writeb(func, reg | SDIO_INT_MASK, host_int_rsr_reg, &ret); + if (ret < 0) + goto release_irq; + /* Set auto re-enable */ + reg = sdio_readb(func, card_misc_cfg_reg, &ret); + if (ret < 0) + goto release_irq; + sdio_writeb(func, reg | AUTO_RE_ENABLE_INT, card_misc_cfg_reg, + &ret); + if (ret < 0) + goto release_irq; + } + + sdio_set_drvdata(func, card); + sdio_release_host(func); + + LEAVE(); + return BT_STATUS_SUCCESS; +release_irq: + sdio_release_irq(func); +release_host: + sdio_release_host(func); +failed: + + LEAVE(); + return BT_STATUS_FAILURE; +} + +/** + * @brief This function de-registers the device. + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS + */ +int +sbi_unregister_dev(bt_private *priv) +{ + struct sdio_mmc_card *card = priv->bt_dev.card; + + ENTER(); + + if (card && card->func) { + sdio_claim_host(card->func); + sdio_release_irq(card->func); + sdio_disable_func(card->func); + sdio_release_host(card->func); + sdio_set_drvdata(card->func, NULL); + } + + LEAVE(); + return BT_STATUS_SUCCESS; +} + +/** + * @brief This function enables the host interrupts. + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +sd_enable_host_int(bt_private *priv) +{ + struct sdio_mmc_card *card = priv->bt_dev.card; + int ret; + + ENTER(); + + if (!card || !card->func) { + LEAVE(); + return BT_STATUS_FAILURE; + } + sdio_claim_host(card->func); + ret = sd_enable_host_int_mask(priv, HIM_ENABLE); + sd_get_rx_unit(priv); + sdio_release_host(card->func); + + LEAVE(); + return ret; +} + +/** + * @brief This function disables the host interrupts. + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS/BT_STATUS_FAILURE or other error no. + */ +int +sd_disable_host_int(bt_private *priv) +{ + struct sdio_mmc_card *card = priv->bt_dev.card; + int ret; + + ENTER(); + + if (!card || !card->func) { + LEAVE(); + return BT_STATUS_FAILURE; + } + sdio_claim_host(card->func); + ret = sd_disable_host_int_mask(priv, HIM_DISABLE); + sdio_release_host(card->func); + + LEAVE(); + return ret; +} + +/** + * @brief This function sends data to the card. + * + * @param priv A pointer to bt_private structure + * @param payload A pointer to the data/cmd buffer + * @param nb Length of data/cmd + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +sbi_host_to_card(bt_private *priv, u8 *payload, u16 nb) +{ + struct sdio_mmc_card *card = priv->bt_dev.card; + struct m_dev *m_dev = &(priv->bt_dev.m_dev[BT_SEQ]); + int ret = BT_STATUS_SUCCESS; + int buf_block_len; + int blksz; + int i = 0; + u8 *buf = NULL; + void *tmpbuf = NULL; + int tmpbufsz; + + ENTER(); + + if (!card || !card->func) { + PRINTM(ERROR, "BT: card or function is NULL!\n"); + LEAVE(); + return BT_STATUS_FAILURE; + } + buf = payload; + + blksz = SD_BLOCK_SIZE; + buf_block_len = (nb + blksz - 1) / blksz; + /* Allocate buffer and copy payload */ + if ((t_ptr)payload & (DMA_ALIGNMENT - 1)) { + tmpbufsz = buf_block_len * blksz + DMA_ALIGNMENT; + tmpbuf = kzalloc(tmpbufsz, GFP_KERNEL); + if (!tmpbuf) { + LEAVE(); + return BT_STATUS_FAILURE; + } + /* Ensure 8-byte aligned CMD buffer */ + buf = (u8 *)ALIGN_ADDR(tmpbuf, DMA_ALIGNMENT); + memcpy(buf, payload, nb); + } + sdio_claim_host(card->func); +#define MAX_WRITE_IOMEM_RETRY 2 + do { + /* Transfer data to card */ + ret = sdio_writesb(card->func, priv->bt_dev.ioport, buf, + buf_block_len * blksz); + if (ret < 0) { + i++; + PRINTM(ERROR, + "BT: host_to_card, write iomem (%d) failed: %d\n", + i, ret); + if ((priv->card_type == CARD_TYPE_SD8887) || + (priv->card_type == CARD_TYPE_SD8897)) + break; + sdio_writeb(card->func, HOST_WO_CMD53_FINISH_HOST, + CONFIGURATION_REG, &ret); + udelay(20); + ret = BT_STATUS_FAILURE; + if (i > MAX_WRITE_IOMEM_RETRY) + goto exit; + } else { + PRINTM(DATA, "BT: SDIO Blk Wr %s: len=%d\n", + m_dev->name, nb); + DBG_HEXDUMP(DAT_D, "BT: SDIO Blk Wr", payload, nb); + } + } while (ret == BT_STATUS_FAILURE); + priv->bt_dev.tx_dnld_rdy = FALSE; +exit: + sdio_release_host(card->func); + kfree(tmpbuf); + LEAVE(); + return ret; +} + +/** + * @brief This function downloads firmware + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS or BT_STATUS_FAILURE + */ +int +sbi_download_fw(bt_private *priv) +{ + struct sdio_mmc_card *card = priv->bt_dev.card; + int ret = BT_STATUS_SUCCESS; + u8 winner = 0; + + ENTER(); + + if (!card || !card->func) { + PRINTM(ERROR, "BT: card or function is NULL!\n"); + ret = BT_STATUS_FAILURE; + goto exit; + } + + sdio_claim_host(card->func); + if (BT_STATUS_SUCCESS == sd_verify_fw_download(priv, 1)) { + PRINTM(MSG, "BT: FW already downloaded!\n"); + sdio_release_host(card->func); + sd_enable_host_int(priv); + if (BT_STATUS_FAILURE == sbi_register_conf_dpc(priv)) { + PRINTM(ERROR, + "BT: sbi_register_conf_dpc failed. Terminating download\n"); + ret = BT_STATUS_FAILURE; + goto err_register; + } + goto exit; + } + /* Check if other interface is downloading */ + ret = sd_check_winner_status(priv, &winner); + if (ret == BT_STATUS_FAILURE) { + PRINTM(FATAL, "BT read winner status failed!\n"); + goto done; + } + if (winner) { + PRINTM(MSG, "BT is not the winner (0x%x). Skip FW download\n", + winner); + /* check if the fimware is downloaded successfully or not */ + if (sd_verify_fw_download(priv, MAX_MULTI_INTERFACE_POLL_TRIES)) { + PRINTM(FATAL, "BT: FW failed to be active in time!\n"); + ret = BT_STATUS_FAILURE; + goto done; + } + sdio_release_host(card->func); + sd_enable_host_int(priv); + if (BT_STATUS_FAILURE == sbi_register_conf_dpc(priv)) { + PRINTM(ERROR, + "BT: sbi_register_conf_dpc failed. Terminating download\n"); + ret = BT_STATUS_FAILURE; + goto err_register; + } + goto exit; + } + + do_gettimeofday(&priv->req_fw_time); + /* Download the main firmware via the helper firmware */ + if (sd_download_firmware_w_helper(priv)) { + PRINTM(INFO, "BT: FW download failed!\n"); + ret = BT_STATUS_FAILURE; + } + goto exit; +done: + sdio_release_host(card->func); +exit: + LEAVE(); + return ret; +err_register: + LEAVE(); + return ret; +} + +/** + * @brief This function checks the interrupt status and handle it accordingly. + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS + */ +int +sbi_get_int_status(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + u8 sdio_ireg = 0; + struct sdio_mmc_card *card = priv->bt_dev.card; + + ENTER(); + + OS_INT_DISABLE; + sdio_ireg = priv->adapter->sd_ireg; + priv->adapter->sd_ireg = 0; + OS_INT_RESTORE; + sdio_claim_host(card->func); + priv->adapter->irq_done = sdio_ireg; + if (sdio_ireg & DN_LD_HOST_INT_STATUS) { /* tx_done INT */ + if (priv->bt_dev.tx_dnld_rdy) { /* tx_done already received */ + PRINTM(INFO, + "BT: warning: tx_done already received: tx_dnld_rdy=0x%x int status=0x%x\n", + priv->bt_dev.tx_dnld_rdy, sdio_ireg); + } else { + priv->bt_dev.tx_dnld_rdy = TRUE; + } + } + if (sdio_ireg & UP_LD_HOST_INT_STATUS) + sd_card_to_host(priv); + + ret = BT_STATUS_SUCCESS; + sdio_release_host(card->func); + LEAVE(); + return ret; +} + +/** + * @brief This function wakeup firmware + * + * @param priv A pointer to bt_private structure + * @return BT_STATUS_SUCCESS/BT_STATUS_FAILURE or other error no. + */ +int +sbi_wakeup_firmware(bt_private *priv) +{ + struct sdio_mmc_card *card = priv->bt_dev.card; + int ret = BT_STATUS_SUCCESS; + + ENTER(); + + if (!card || !card->func) { + PRINTM(ERROR, "BT: card or function is NULL!\n"); + LEAVE(); + return BT_STATUS_FAILURE; + } + sdio_claim_host(card->func); + sdio_writeb(card->func, HOST_POWER_UP, CONFIGURATION_REG, &ret); + sdio_release_host(card->func); + PRINTM(CMD, "BT wake up firmware\n"); + + LEAVE(); + return ret; +} + +/** @brief This function updates the SDIO card types + * + * @param priv A Pointer to the bt_private structure + * @param card A Pointer to card + * + * @return N/A + */ +void +sdio_update_card_type(bt_private *priv, void *card) +{ + struct sdio_mmc_card *cardp = (struct sdio_mmc_card *)card; + + /* Update card type */ + if (cardp->func->device == SD_DEVICE_ID_8777_BT_FN2 || + cardp->func->device == SD_DEVICE_ID_8777_BT_FN3) + priv->card_type = CARD_TYPE_SD8777; + else if (cardp->func->device == SD_DEVICE_ID_8787_BT_FN2 || + cardp->func->device == SD_DEVICE_ID_8787_BT_FN3) + priv->card_type = CARD_TYPE_SD8787; + else if (cardp->func->device == SD_DEVICE_ID_8887_BT_FN2 || + cardp->func->device == SD_DEVICE_ID_8887_BT_FN3) + priv->card_type = CARD_TYPE_SD8887; + else if (cardp->func->device == SD_DEVICE_ID_8897_BT_FN2 || + cardp->func->device == SD_DEVICE_ID_8897_BT_FN3) + priv->card_type = CARD_TYPE_SD8897; + else if (cardp->func->device == SD_DEVICE_ID_8797_BT_FN2 || + cardp->func->device == SD_DEVICE_ID_8797_BT_FN3) + priv->card_type = CARD_TYPE_SD8797; +} + +/** + * @brief This function get sdio device from card type + * + * @param pmadapter A pointer to mlan_adapter structure + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +int +sdio_get_sdio_device(bt_private *priv) +{ + int ret = BT_STATUS_SUCCESS; + u16 card_type = priv->card_type; + + ENTER(); + + switch (card_type) { + case CARD_TYPE_SD8777: + priv->psdio_device = &bt_sdio_sd8777; + break; + case CARD_TYPE_SD8787: + priv->psdio_device = &bt_sdio_sd8787; + break; + case CARD_TYPE_SD8887: + priv->psdio_device = &bt_sdio_sd8887; + break; + case CARD_TYPE_SD8897: + priv->psdio_device = &bt_sdio_sd8897; + break; + case CARD_TYPE_SD8797: + priv->psdio_device = &bt_sdio_sd8797; + break; + default: + PRINTM(ERROR, "BT can't get right card type \n"); + ret = BT_STATUS_FAILURE; + break; + } + + LEAVE(); + return ret; +} + +/** @brief This function dump the SDIO register + * + * @param priv A Pointer to the bt_private structure + * + * @return N/A + */ +void +bt_dump_sdio_regs(bt_private *priv) +{ + struct sdio_mmc_card *card = priv->bt_dev.card; + int ret = BT_STATUS_SUCCESS; + char buf[256], *ptr; + u8 loop, func, data; + unsigned int reg, reg_start, reg_end; + u8 index = 0; + unsigned int reg_table_8887[] = { 0x58, 0x59, 0x5c, 0x60, 0x64, 0x70, + 0x71, 0x72, 0x73, 0xd8, 0xd9, 0xda + }; + u8 loop_num = 0; + unsigned int *reg_table = NULL; + u8 reg_table_size = 0; + if (priv->card_type == CARD_TYPE_SD8887) { + loop_num = 3; + reg_table = reg_table_8887; + reg_table_size = sizeof(reg_table_8887) / sizeof(int); + } else + loop_num = 2; + if (priv->adapter->ps_state) + sbi_wakeup_firmware(priv); + + sdio_claim_host(card->func); + for (loop = 0; loop < loop_num; loop++) { + memset(buf, 0, sizeof(buf)); + ptr = buf; + if (loop == 0) { + /* Read the registers of SDIO function0 */ + func = loop; + reg_start = 0; + reg_end = 9; + + } else if (loop == 2) { + /* Read specific registers of SDIO function1 */ + index = 0; + func = 2; + reg_start = reg_table[index++]; + reg_end = reg_table[reg_table_size - 1]; + } else { + func = 2; + reg_start = 0; + reg_end = 0x09; + } + if (loop == 2) + ptr += sprintf(ptr, "SDIO Func%d: ", func); + else + ptr += sprintf(ptr, "SDIO Func%d (%#x-%#x): ", func, + reg_start, reg_end); + for (reg = reg_start; reg <= reg_end;) { + if (func == 0) + data = sdio_f0_readb(card->func, reg, &ret); + else + data = sdio_readb(card->func, reg, &ret); + if (loop == 2) + ptr += sprintf(ptr, "(%#x)", reg); + if (!ret) + ptr += sprintf(ptr, "%02x ", data); + else { + ptr += sprintf(ptr, "ERR"); + break; + } + if (loop == 2 && reg < reg_end) + reg = reg_table[index++]; + else + reg++; + } + PRINTM(MSG, "%s\n", buf); + } + sdio_release_host(card->func); +} + +module_param(fw_name, charp, 0); +MODULE_PARM_DESC(fw_name, "Firmware name"); +module_param(bt_req_fw_nowait, int, 0); +MODULE_PARM_DESC(bt_req_fw_nowait, + "0: Use request_firmware API; 1: Use request_firmware_nowait API"); +module_param(multi_fn, int, 0); +MODULE_PARM_DESC(multi_fn, "Bit 2: FN2;"); +module_param(bt_fw_serial, int, 0); +MODULE_PARM_DESC(bt_fw_serial, + "0: Support parallel download FW; 1: Support serial download FW"); diff --git a/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/hci_wrapper.h b/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/hci_wrapper.h new file mode 100644 index 00000000..5a423141 --- /dev/null +++ b/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/hci_wrapper.h @@ -0,0 +1,183 @@ +/** @file hci_wrapper.h + * @brief This file contains HCI related definitions + * + * Copyright (C) 2011-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available along with the File in the gpl.txt file or by writing to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307 or on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#ifndef _HCI_WRAPPER_H_ +#define _HCI_WRAPPER_H_ + +#include +#include +#include + +/** Define Seq num */ +#define BT_SEQ 0 +#define FM_SEQ 1 +#define NFC_SEQ 2 +#define DEBUG_SEQ 3 + +/** Define dev type */ +#define BT_TYPE 1 +#define BT_AMP_TYPE 2 +#define FM_TYPE 3 +#define NFC_TYPE 4 +#define DEBUG_TYPE 5 + +/** Define spec type */ +#define BLUEZ_SPEC 1 +#define IANYWHERE_SPEC 2 +#define GENERIC_SPEC 3 + +/** Define lock/unlock wrapper */ +#define mdev_req_lock(d) down(&d->req_lock) +#define mdev_req_unlock(d) up(&d->req_lock) + +/** Length of device name */ +#define DEV_NAME_LEN 32 + +/** Define struct m_dev */ +struct m_dev { + char name[DEV_NAME_LEN]; + int index; + unsigned long flags; + spinlock_t lock; + struct semaphore req_lock; + struct sk_buff_head rx_q; + wait_queue_head_t req_wait_q; + struct hci_dev_stats stat; + struct module *owner; + void *dev_pointer; + int dev_type; + int spec_type; + void *driver_data; + int read_continue_flag; + int wait_rx_complete; + int rx_complete_flag; + wait_queue_head_t rx_wait_q; + + int (*open) (struct m_dev * m_dev); + int (*close) (struct m_dev * m_dev); + int (*flush) (struct m_dev * m_dev); + int (*send) (struct m_dev * m_dev, struct sk_buff * skb); + void (*destruct) (struct m_dev * m_dev); + void (*notify) (struct m_dev * m_dev, unsigned int evt); + int (*ioctl) (struct m_dev * m_dev, unsigned int cmd, void *arg); + void (*query) (struct m_dev * m_dev, void *arg); + +}; + +/** Define struct mbt_dev */ +struct mbt_dev { + /** maybe could add some private member later */ + char name[DEV_NAME_LEN]; + unsigned long flags; + __u8 type; + + __u16 pkt_type; + __u16 esco_type; + __u16 link_policy; + __u16 link_mode; + + __u32 idle_timeout; + __u16 sniff_min_interval; + __u16 sniff_max_interval; + + struct sk_buff *reassembly[3]; + + atomic_t promisc; +}; + +/** Define 'fm' interface specific struct fm_dev */ +struct fm_dev { + /** maybe could add some private member later */ + char name[DEV_NAME_LEN]; + unsigned long flags; +}; + +/** Define 'nfc' interface specific struct fm_dev */ +struct nfc_dev { + /** maybe could add some private member later */ + char name[DEV_NAME_LEN]; + unsigned long flags; +}; + +struct debug_dev { + /** maybe could add some private member later */ + char name[DEV_NAME_LEN]; + unsigned long flags; +}; + +/** This function frees m_dev allocation */ +void free_m_dev(struct m_dev *m_dev); + +/** + * @brief This function receives frames + * + * @param skb A pointer to struct sk_buff + * @return 0--success otherwise error code + */ +static inline int +mdev_recv_frame(struct sk_buff *skb) +{ + struct m_dev *m_dev = (struct m_dev *)skb->dev; + if (!m_dev || (!test_bit(HCI_UP, &m_dev->flags) + && !test_bit(HCI_INIT, &m_dev->flags))) { + kfree_skb(skb); + return -ENXIO; + } + + /* Incomming skb */ + bt_cb(skb)->incoming = 1; + + /* Time stamp */ + __net_timestamp(skb); + + /* Queue frame for rx task */ + skb_queue_tail(&m_dev->rx_q, skb); + + /* Wakeup rx thread */ + wake_up_interruptible(&m_dev->req_wait_q); + + return 0; +} + +/** + * @brief mbt dev suspend handler + * + * @param m_dev A pointer to struct m_dev + * @return 0 + */ +static inline int +mbt_hci_suspend_dev(struct m_dev *m_dev) +{ + return 0; +} + +/** + * @brief mbt dev resume handler + * + * @param m_dev A pointer to struct m_dev + * @return 0 + */ +static inline int +mbt_hci_resume_dev(struct m_dev *m_dev) +{ + return 0; +} + +#endif /* _HCI_WRAPPER_H_ */ diff --git a/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/mbt_char.c b/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/mbt_char.c new file mode 100644 index 00000000..1bd218d5 --- /dev/null +++ b/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/mbt_char.c @@ -0,0 +1,773 @@ +/** @file mbt_char.c + * + * @brief This file contains the char device function calls + * + * Copyright (C) 2010-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#include +#include +#include + +#include "bt_drv.h" +#include "mbt_char.h" + +static LIST_HEAD(char_dev_list); + +static DEFINE_SPINLOCK(char_dev_list_lock); + +static int mbtchar_major = MBTCHAR_MAJOR_NUM; + +struct kobject * +chardev_get(struct char_dev *dev) +{ + struct kobject *kobj; + + kobj = bt_priv_get(dev->m_dev->driver_data); + if (!kobj) + return NULL; + PRINTM(INFO, "dev get kobj\n"); + kobj = kobject_get(&dev->kobj); + if (!kobj) + bt_priv_put(dev->m_dev->driver_data); + return kobj; +} + +void +chardev_put(struct char_dev *dev) +{ + if (dev) { + struct m_dev *m_dev = dev->m_dev; + PRINTM(INFO, "dev put kobj\n"); + kobject_put(&dev->kobj); + if (m_dev) + bt_priv_put(m_dev->driver_data); + } +} + +/** + * @brief Changes permissions of the dev + * + * @param name pointer to character + * @param mode mode_t type data + * @return 0--success otherwise failure + */ +int +mbtchar_chmod(char *name, mode_t mode) +{ + struct path path; + struct inode *inode; + struct iattr newattrs; + int ret; + int retrycount = 0; + + ENTER(); + do { + os_sched_timeout(30); + ret = kern_path(name, LOOKUP_FOLLOW, &path); + if (++retrycount >= 10) { + PRINTM(ERROR, + "mbtchar_chmod(): fail to get kern_path\n"); + LEAVE(); + return -EFAULT; + } + } while (ret); + inode = path.dentry->d_inode; + + mutex_lock(&inode->i_mutex); + ret = mnt_want_write(path.mnt); + if (ret) + goto out_unlock; + newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); + newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; + if (inode->i_op->setattr) + ret = inode->i_op->setattr(path.dentry, &newattrs); + else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) + ret = simple_setattr(path.dentry, &newattrs); +#else + ret = inode_setattr(inode, &newattrs); +#endif + + mutex_unlock(&inode->i_mutex); + mnt_drop_write(path.mnt); + + path_put(&path); + LEAVE(); + return ret; +out_unlock: + mutex_unlock(&inode->i_mutex); + mnt_drop_write(path.mnt); + path_put(&path); + return ret; +} + +/** + * @brief Changes ownership of the dev + * + * @param name pointer to character + * @param user uid_t type data + * @param group gid_t type data + * @return 0--success otherwise failure + */ +int +mbtchar_chown(char *name, uid_t user, gid_t group) +{ + struct path path; + struct inode *inode = NULL; + struct iattr newattrs; + int ret = 0; + int retrycount = 0; + + ENTER(); + do { + os_sched_timeout(30); + ret = kern_path(name, LOOKUP_FOLLOW, &path); + if (++retrycount >= 10) { + PRINTM(ERROR, + "mbtchar_chown(): fail to get kern_path\n"); + LEAVE(); + return -EFAULT; + } + } while (ret); + inode = path.dentry->d_inode; + mutex_lock(&inode->i_mutex); + ret = mnt_want_write(path.mnt); + if (ret) + goto out_unlock; + newattrs.ia_valid = ATTR_CTIME; + if (user != (uid_t) (-1)) { + newattrs.ia_valid |= ATTR_UID; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 5, 0) + newattrs.ia_uid = user; +#else + newattrs.ia_uid = KUIDT_INIT(user); +#endif + } + if (group != (gid_t) (-1)) { + newattrs.ia_valid |= ATTR_GID; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 5, 0) + newattrs.ia_gid = group; +#else + newattrs.ia_gid = KGIDT_INIT(group); +#endif + } + if (!S_ISDIR(inode->i_mode)) + newattrs.ia_valid |= + ATTR_KILL_SUID | ATTR_KILL_SGID | ATTR_KILL_PRIV; + if (inode->i_op->setattr) + ret = inode->i_op->setattr(path.dentry, &newattrs); + else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) + ret = simple_setattr(path.dentry, &newattrs); +#else + ret = inode_setattr(inode, &newattrs); +#endif + + mutex_unlock(&inode->i_mutex); + mnt_drop_write(path.mnt); + + path_put(&path); + LEAVE(); + return ret; +out_unlock: + mutex_unlock(&inode->i_mutex); + mnt_drop_write(path.mnt); + path_put(&path); + return ret; +} + +/** + * @brief write handler for char dev + * + * @param filp pointer to structure file + * @param buf pointer to char buffer + * @param count size of receive buffer + * @param f_pos pointer to loff_t type data + * @return number of bytes written + */ +ssize_t +chardev_write(struct file * filp, const char *buf, size_t count, loff_t * f_pos) +{ + int nwrite = 0; + struct sk_buff *skb; + struct char_dev *dev = (struct char_dev *)filp->private_data; + struct m_dev *m_dev = NULL; + + ENTER(); + + if (!dev || !dev->m_dev) { + LEAVE(); + return -ENXIO; + } + m_dev = dev->m_dev; + if (!test_bit(HCI_UP, &m_dev->flags)) { + LEAVE(); + return -EBUSY; + } + nwrite = count; + skb = bt_skb_alloc(count, GFP_ATOMIC); + if (!skb) { + PRINTM(ERROR, "mbtchar_write(): fail to alloc skb\n"); + LEAVE(); + return -ENOMEM; + } + + if (copy_from_user((void *)skb_put(skb, count), buf, count)) { + PRINTM(ERROR, "mbtchar_write(): cp_from_user failed\n"); + kfree_skb(skb); + nwrite = -EFAULT; + goto exit; + } + + skb->dev = (void *)m_dev; + bt_cb(skb)->pkt_type = *((unsigned char *)skb->data); + skb_pull(skb, 1); + + PRINTM(DATA, "Write: pkt_type: 0x%x, len=%d @%lu\n", + bt_cb(skb)->pkt_type, skb->len, jiffies); + DBG_HEXDUMP(DAT_D, "chardev_write", skb->data, skb->len); + + /* Send skb to the hci wrapper layer */ + if (m_dev->send(m_dev, skb)) { + PRINTM(ERROR, "Write: Fail\n"); + nwrite = 0; + /* Send failed */ + kfree_skb(skb); + } +exit: + LEAVE(); + return nwrite; +} + +/** + * @brief read handler for BT char dev + * + * @param filp pointer to structure file + * @param buf pointer to char buffer + * @param count size of receive buffer + * @param f_pos pointer to loff_t type data + * @return number of bytes read + */ +ssize_t +chardev_read(struct file * filp, char *buf, size_t count, loff_t * f_pos) +{ + struct char_dev *dev = (struct char_dev *)filp->private_data; + struct m_dev *m_dev = NULL; + DECLARE_WAITQUEUE(wait, current); + ssize_t ret = 0; + struct sk_buff *skb = NULL; + + ENTER(); + if (!dev || !dev->m_dev) { + LEAVE(); + return -ENXIO; + } + m_dev = dev->m_dev; + /* Wait for rx data */ + add_wait_queue(&m_dev->req_wait_q, &wait); + while (1) { + set_current_state(TASK_INTERRUPTIBLE); + skb = skb_dequeue(&m_dev->rx_q); + if (skb) + break; + if (!test_bit(HCI_UP, &m_dev->flags)) { + ret = -EBUSY; + break; + } + + if (filp->f_flags & O_NONBLOCK) { + ret = -EAGAIN; + break; + } + if (signal_pending(current)) { + ret = -EINTR; + break; + } + schedule(); + } + set_current_state(TASK_RUNNING); + remove_wait_queue(&m_dev->req_wait_q, &wait); + + if (!skb) + goto out; + + if (m_dev->read_continue_flag == 0) { + /* Put type byte before the data */ + memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1); + PRINTM(DATA, "Read: pkt_type: 0x%x, len=%d @%lu\n", + bt_cb(skb)->pkt_type, skb->len, jiffies); + } + DBG_HEXDUMP(DAT_D, "chardev_read", skb->data, skb->len); + if (skb->len > count) { + /* user data length is smaller than the skb length */ + if (copy_to_user(buf, skb->data, count)) { + ret = -EFAULT; + goto outf; + } + skb_pull(skb, count); + skb_queue_head(&m_dev->rx_q, skb); + m_dev->read_continue_flag = 1; + wake_up_interruptible(&m_dev->req_wait_q); + ret = count; + goto out; + } else { + if (copy_to_user(buf, skb->data, skb->len)) { + ret = -EFAULT; + goto outf; + } + m_dev->read_continue_flag = 0; + ret = skb->len; + } +outf: + kfree_skb(skb); +out: + if (m_dev->wait_rx_complete && skb_queue_empty(&m_dev->rx_q)) { + m_dev->rx_complete_flag = TRUE; + wake_up_interruptible(&m_dev->rx_wait_q); + } + LEAVE(); + return ret; +} + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) +/** + * @brief ioctl common handler for char dev + * + * @param inode pointer to structure inode + * @param filp pointer to structure file + * @param cmd contains the IOCTL + * @param arg contains the arguement + * @return 0--success otherwise failure + */ +int +char_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, void *arg) +#else +/** + * @brief ioctl common handler for char dev + * + * @param filp pointer to structure file + * @param cmd contains the IOCTL + * @param arg contains the arguement + * @return 0--success otherwise failure + */ +long +char_ioctl(struct file *filp, unsigned int cmd, void *arg) +#endif +{ + struct char_dev *dev = (struct char_dev *)filp->private_data; + struct m_dev *m_dev = NULL; + + ENTER(); + if (!dev || !dev->m_dev) { + LEAVE(); + return -ENXIO; + } + m_dev = dev->m_dev; + PRINTM(INFO, "IOCTL: cmd=%d\n", cmd); + switch (cmd) { + case MBTCHAR_IOCTL_RELEASE: + m_dev->close(m_dev); + break; + case MBTCHAR_IOCTL_QUERY_TYPE: + m_dev->query(m_dev, arg); + break; + default: + break; + } + LEAVE(); + return 0; +} + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) +/** + * @brief ioctl handler for char dev + * + * @param inode pointer to structure inode + * @param filp pointer to structure file + * @param cmd contains the IOCTL + * @param arg contains the arguement + * @return 0--success otherwise failure + */ +int +chardev_ioctl(struct inode *inode, struct file *filp, + unsigned int cmd, unsigned long arg) +#else +/** + * @brief ioctl handler for char dev + * + * @param filp pointer to structure file + * @param cmd contains the IOCTL + * @param arg contains the arguement + * @return 0--success otherwise failure + */ +long +chardev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) +#endif +{ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) + return char_ioctl(inode, filp, cmd, (void *)arg); +#else + return char_ioctl(filp, cmd, (void *)arg); +#endif +} + +#ifdef CONFIG_COMPAT +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) +/** + * @brief compat ioctl handler for char dev + * + * @param inode pointer to structure inode + * @param filp pointer to structure file + * @param cmd contains the IOCTL + * @param arg contains the arguement + * @return 0--success otherwise failure + */ +int +chardev_ioctl_compat(struct inode *inode, struct file *filp, + unsigned int cmd, unsigned long arg) +#else +/** + * @brief compat ioctl handler for char dev + * + * @param filp pointer to structure file + * @param cmd contains the IOCTL + * @param arg contains the arguement + * @return 0--success otherwise failure + */ +long +chardev_ioctl_compat(struct file *filp, unsigned int cmd, unsigned long arg) +#endif +{ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) + return char_ioctl(inode, filp, cmd, compat_ptr(arg)); +#else + return char_ioctl(filp, cmd, compat_ptr(arg)); +#endif +} +#endif /* CONFIG_COMPAT */ + +/** + * @brief open handler for char dev + * + * @param inode pointer to structure inode + * @param filp pointer to structure file + * @return 0--success otherwise failure + */ +int +chardev_open(struct inode *inode, struct file *filp) +{ + int ret = 0; + struct char_dev *dev = NULL; + struct m_dev *m_dev = NULL; + struct char_dev *cdev = NULL; + struct list_head *p = NULL; + ENTER(); + + list_for_each(p, &char_dev_list) { + cdev = list_entry(p, struct char_dev, list); + if (mbtchar_major == MAJOR(inode->i_cdev->dev) && + cdev->minor == MINOR(inode->i_cdev->dev)) { + dev = cdev; + break; + } + } + if (!dev) { + PRINTM(ERROR, "cannot find dev from inode\n"); + LEAVE(); + return -ENXIO; + } + if (!chardev_get(dev)) { + LEAVE(); + return -ENXIO; + } + filp->private_data = dev; /* for other methods */ + m_dev = dev->m_dev; + mdev_req_lock(m_dev); + if (test_bit(HCI_UP, &m_dev->flags)) { + ret = -EALREADY; + goto done; + } + if (m_dev->open(m_dev)) { + ret = -EIO; + goto done; + } + set_bit(HCI_UP, &m_dev->flags); + +done: + mdev_req_unlock(m_dev); + if (ret) + chardev_put(dev); + LEAVE(); + return ret; +} + +/** + * @brief release handler for char dev + * + * @param inode pointer to structure inode + * @param filp pointer to structure file + * @return 0--success otherwise failure + */ +int +chardev_release(struct inode *inode, struct file *filp) +{ + int ret = 0; + struct char_dev *dev = (struct char_dev *)filp->private_data; + struct m_dev *m_dev = NULL; + ENTER(); + if (!dev) { + LEAVE(); + return -ENXIO; + } + m_dev = dev->m_dev; + if (m_dev) + ret = dev->m_dev->close(dev->m_dev); + filp->private_data = NULL; + chardev_put(dev); + LEAVE(); + return ret; +} + +/** + * @brief poll handler for char dev + * + * @param filp pointer to structure file + * @param wait pointer to poll_table structure + * @return mask + */ +static unsigned int +chardev_poll(struct file *filp, poll_table * wait) +{ + unsigned int mask; + struct char_dev *dev = (struct char_dev *)filp->private_data; + struct m_dev *m_dev = NULL; + ENTER(); + if (!dev || !dev->m_dev) { + LEAVE(); + return -ENXIO; + } + + m_dev = dev->m_dev; + poll_wait(filp, &m_dev->req_wait_q, wait); + mask = POLLOUT | POLLWRNORM; + if (skb_peek(&m_dev->rx_q)) + mask |= POLLIN | POLLRDNORM; + if (!test_bit(HCI_UP, &(m_dev->flags))) + mask |= POLLHUP; + PRINTM(INFO, "poll mask=0x%x\n", mask); + LEAVE(); + return mask; +} + +/* File ops for the Char driver */ +const struct file_operations chardev_fops = { + .owner = THIS_MODULE, + .read = chardev_read, + .write = chardev_write, +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) + .ioctl = chardev_ioctl, +#else + .unlocked_ioctl = chardev_ioctl, +#endif +#ifdef CONFIG_COMPAT + .compat_ioctl = chardev_ioctl_compat, +#endif + .open = chardev_open, + .release = chardev_release, + .poll = chardev_poll, +}; + +/** + * @brief This function creates the char dev + * + * @param dev A pointer to structure char_dev + * @param char_class A pointer to class struct + * @param mod_name A pointer to char + * @param dev_name A pointer to char + * @return 0--success otherwise failure + */ +int +register_char_dev(struct char_dev *dev, struct class *char_class, + char *mod_name, char *dev_name) +{ + int ret = 0, dev_num; + unsigned long flags; + ENTER(); + /* create the chrdev region */ + if (mbtchar_major) { + dev_num = MKDEV(mbtchar_major, dev->minor); + ret = register_chrdev_region(dev_num, 1, mod_name); + } else { + PRINTM(INFO, "chardev: no major # yet\n"); + ret = alloc_chrdev_region((dev_t *) & dev_num, dev->minor, 1, + mod_name); + } + + if (ret) { + PRINTM(ERROR, "chardev: create chrdev_region failed\n"); + LEAVE(); + return ret; + } + if (!mbtchar_major) { + /* Store the allocated dev major # */ + mbtchar_major = MAJOR(dev_num); + } + dev->cdev = cdev_alloc(); + dev->cdev->ops = &chardev_fops; + dev->cdev->owner = chardev_fops.owner; + dev_num = MKDEV(mbtchar_major, dev->minor); + + if (cdev_add(dev->cdev, dev_num, 1)) { + PRINTM(ERROR, "chardev: cdev_add failed\n"); + ret = -EFAULT; + goto free_cdev_region; + } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + if ((dev->dev_type == BT_TYPE) || (dev->dev_type == BT_AMP_TYPE)) { + device_create(char_class, NULL, + MKDEV(mbtchar_major, dev->minor), NULL, dev_name); + } + if (dev->dev_type == FM_TYPE) { + device_create(char_class, NULL, + MKDEV(mbtchar_major, dev->minor), NULL, dev_name); + } + if (dev->dev_type == NFC_TYPE) { + device_create(char_class, NULL, + MKDEV(mbtchar_major, dev->minor), NULL, dev_name); + } + if (dev->dev_type == DEBUG_TYPE) { + device_create(char_class, NULL, + MKDEV(mbtchar_major, dev->minor), NULL, dev_name); + } +#else + if ((dev->dev_type == BT_TYPE) || (dev->dev_type == BT_AMP_TYPE)) { + device_create(char_class, NULL, + MKDEV(mbtchar_major, dev->minor), dev_name); + } + if (dev->dev_type == FM_TYPE) { + device_create(char_class, NULL, + MKDEV(mbtchar_major, dev->minor), dev_name); + } + if (dev->dev_type == NFC_TYPE) { + device_create(char_class, NULL, + MKDEV(mbtchar_major, dev->minor), dev_name); + } + if (dev->dev_type == DEBUG_TYPE) { + device_create(char_class, NULL, + MKDEV(mbtchar_major, dev->minor), dev_name); + } +#endif + PRINTM(INFO, "register char dev=%s\n", dev_name); + + /** modify later */ + + spin_lock_irqsave(&char_dev_list_lock, flags); + list_add_tail(&dev->list, &char_dev_list); + spin_unlock_irqrestore(&char_dev_list_lock, flags); + + LEAVE(); + return ret; +free_cdev_region: + unregister_chrdev_region(MKDEV(mbtchar_major, dev->minor), 1); + LEAVE(); + return ret; +} + +/** + * @brief This function deletes the char dev + * + * @param dev A pointer to structure char_dev + * @param char_class A pointer to class struct + * @param dev_name A pointer to char + * @return 0--success otherwise failure + */ +int +unregister_char_dev(struct char_dev *dev, struct class *char_class, + char *dev_name) +{ + ENTER(); + device_destroy(char_class, MKDEV(mbtchar_major, dev->minor)); + cdev_del(dev->cdev); + unregister_chrdev_region(MKDEV(mbtchar_major, dev->minor), 1); + PRINTM(INFO, "unregister char dev=%s\n", dev_name); + + LEAVE(); + return 0; +} + +/** + * @brief This function cleans module + * + * @param char_class A pointer to class struct + * @return N/A + */ +void +chardev_cleanup(struct class *char_class) +{ + unsigned long flags; + struct list_head *p = NULL; + struct char_dev *dev = NULL; + ENTER(); + spin_lock_irqsave(&char_dev_list_lock, flags); + do { + dev = NULL; + list_for_each(p, &char_dev_list) { + dev = list_entry(p, struct char_dev, list); + list_del(p); + spin_unlock_irqrestore(&char_dev_list_lock, flags); + unregister_char_dev(dev, char_class, dev->m_dev->name); + kobject_put(&dev->kobj); + spin_lock_irqsave(&char_dev_list_lock, flags); + break; + } + } while (dev); + spin_unlock_irqrestore(&char_dev_list_lock, flags); + class_destroy(char_class); + LEAVE(); +} + +/** + * @brief This function cleans module + * + * @param m_dev A pointer to m_dev struct + * @param char_class A pointer to class struct + * @return N/A + */ +void +chardev_cleanup_one(struct m_dev *m_dev, struct class *char_class) +{ + unsigned long flags; + struct list_head *p = NULL; + struct char_dev *dev = NULL; + ENTER(); + spin_lock_irqsave(&char_dev_list_lock, flags); + list_for_each(p, &char_dev_list) { + dev = list_entry(p, struct char_dev, list); + if (dev->minor == m_dev->index) { + list_del(p); + spin_unlock_irqrestore(&char_dev_list_lock, flags); + dev->m_dev = NULL; + unregister_char_dev(dev, char_class, m_dev->name); + kobject_put(&dev->kobj); + spin_lock_irqsave(&char_dev_list_lock, flags); + break; + } + } + spin_unlock_irqrestore(&char_dev_list_lock, flags); + LEAVE(); +} diff --git a/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/mbt_char.h b/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/mbt_char.h new file mode 100644 index 00000000..ab8d1f88 --- /dev/null +++ b/arch/arm/mach-berlin/modules/bt_sd8887/bt_char/mbt_char.h @@ -0,0 +1,69 @@ +/** @file mbt_char.h + * + * @brief This file contains mbtchar driver specific defines etc + * + * Copyright (C) 2010-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ +#ifndef __MBT_CHAR_H__ +#define __MBT_CHAR_H__ + +#include +#include + +/** Define ioctl */ +#define MBTCHAR_IOCTL_RELEASE _IO('M', 1) +#define MBTCHAR_IOCTL_QUERY_TYPE _IO('M', 2) + +#define MBTCHAR_MAJOR_NUM (0) + +/** Interface specific macros */ +#define MBTCHAR_MINOR_BASE (0) +#define FMCHAR_MINOR_BASE (10) +#define NFCCHAR_MINOR_BASE (20) +#define DEBUGCHAR_MINOR_BASE (30) + +/** Declaration of char_dev struct */ +struct char_dev { + struct list_head list; + int minor; + int dev_type; + struct cdev *cdev; + struct m_dev *m_dev; + struct kobject kobj; +}; + +/** Changes permissions of the dev */ +int mbtchar_chmod(char *name, mode_t mode); + +/** Changes ownership of the dev */ +int mbtchar_chown(char *name, uid_t user, gid_t group); + +/** This function creates the char dev */ +int register_char_dev(struct char_dev *dev, struct class *char_class, + char *mod_name, char *dev_name); + +/** This function deletes the char dev */ +int unregister_char_dev(struct char_dev *dev, struct class *char_class, + char *dev_name); + +/** This function cleans module */ +void chardev_cleanup(struct class *char_class); + +/** This function cleans module */ +void chardev_cleanup_one(struct m_dev *m_dev, struct class *char_class); + +#endif /*__MBT_CHAR_H__*/ diff --git a/arch/arm/mach-berlin/modules/cc/cc_cbuf.h b/arch/arm/mach-berlin/modules/cc/cc_cbuf.h index 199a22b0..63f41533 100644 --- a/arch/arm/mach-berlin/modules/cc/cc_cbuf.h +++ b/arch/arm/mach-berlin/modules/cc/cc_cbuf.h @@ -76,6 +76,8 @@ HRESULT MV_CC_CBufSrv_Release_By_Taskid(MV_CC_Task *cc_task); void * MV_SHM_GetCacheVirtAddr(size_t Offset); int MV_SHM_Free( size_t Offset); size_t MV_SHM_Malloc( size_t Size, size_t Alignment); +int MV_SHM_Takeover(size_t Offset); +void MV_SHM_Check_Clean_Map(pid_t pid); #endif diff --git a/arch/arm/mach-berlin/modules/cc/cc_cbuf_body.c b/arch/arm/mach-berlin/modules/cc/cc_cbuf_body.c index 75c8c154..f7e5957d 100644 --- a/arch/arm/mach-berlin/modules/cc/cc_cbuf_body.c +++ b/arch/arm/mach-berlin/modules/cc/cc_cbuf_body.c @@ -57,6 +57,7 @@ HRESULT MV_CC_CBufBody_Create(UINT32 *pSHMOffset, MV_CC_DBG_Error(res, "MV_CC_CBufBody_Create MV_SHM_Malloc", NULL); return res; } + MV_SHM_Takeover(SHMOffset); pCBufBody = (pMV_CC_CBufBody_t)MV_SHM_GetCacheVirtAddr(SHMOffset); if (pCBufBody == NULL) { diff --git a/arch/arm/mach-berlin/modules/cc/cc_cbuf_server.c b/arch/arm/mach-berlin/modules/cc/cc_cbuf_server.c old mode 100755 new mode 100644 index f7202790..e9288369 --- a/arch/arm/mach-berlin/modules/cc/cc_cbuf_server.c +++ b/arch/arm/mach-berlin/modules/cc/cc_cbuf_server.c @@ -1,6 +1,6 @@ -/******************************************************************************* -* Copyright (C) Marvell International Ltd. and its affiliates -* +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* * Marvell GPL License Option * * If you received this File from Marvell, you may opt to use, redistribute and/or @@ -46,7 +46,10 @@ HRESULT MV_CC_CBufSrv_Create( pMV_CC_DSS_ServiceInfo_CBuf_t pSrvInfo, GaloisMemcpy(pSrvInfo, &SrvInfo_CBuf, sizeof(MV_CC_DSS_ServiceInfo_CBuf_t)); + + mutex_lock(&cc_task->cbuf_Mutex); singlenode_add(cc_task->cbuf_head, pSrvInfo->m_ServiceID); + mutex_unlock(&cc_task->cbuf_Mutex); return S_OK; } @@ -68,7 +71,7 @@ HRESULT MV_CC_CBufSrv_Create( pMV_CC_DSS_ServiceInfo_CBuf_t pSrvInfo, pSrvInfo->m_seqid = 1; - res = MV_CC_DSS_Reg((pMV_CC_DSS_ServiceInfo_t)pSrvInfo,cc_task); + res = MV_CC_DSS_Reg((pMV_CC_DSS_ServiceInfo_t)pSrvInfo, NULL); if (res != S_OK) { MV_CC_DBG_Error(res, "MV_CC_CBufSrv_Create" " MV_CC_DSS_Reg", NULL); @@ -77,7 +80,9 @@ HRESULT MV_CC_CBufSrv_Create( pMV_CC_DSS_ServiceInfo_CBuf_t pSrvInfo, MV_CC_DBG_Info("MV_CC_CBufSrv_Create" " ServiceID = 0x%08X\n", pSrvInfo->m_ServiceID); + mutex_lock(&cc_task->cbuf_Mutex); singlenode_add(cc_task->cbuf_head, pSrvInfo->m_ServiceID); + mutex_unlock(&cc_task->cbuf_Mutex); return S_OK; } @@ -95,11 +100,13 @@ HRESULT MV_CC_CBufSrv_Destroy(pMV_CC_DSS_ServiceInfo_CBuf_t pSrvInfo, if ((pSrvInfo == NULL)) MV_CC_DBG_Error(E_INVALIDARG, "MV_CC_CBufSrv_Destroy", NULL); - singlenode_delete(cc_task->cbuf_head, pSrvInfo->m_ServiceID); - if (pSrvInfo->m_ServiceID == MV_CC_ServiceID_DynamicApply) MV_CC_DBG_Error(E_BADVALUE, "MV_CC_CBufSrv_Destroy", NULL); + mutex_lock(&cc_task->cbuf_Mutex); + singlenode_delete(cc_task->cbuf_head, pSrvInfo->m_ServiceID); + mutex_unlock(&cc_task->cbuf_Mutex); + res = MV_CC_DSS_Inquiry((pMV_CC_DSS_ServiceInfo_t)pSrvInfo); if (res != S_OK) { MV_CC_DBG_Error(res, "MV_CC_CBufSrv_Destroy" @@ -115,21 +122,19 @@ HRESULT MV_CC_CBufSrv_Destroy(pMV_CC_DSS_ServiceInfo_CBuf_t pSrvInfo, MV_CC_DBG_Error(res, "MV_CC_CBufSrv_Destroy" " MV_CC_DSS_Update", NULL); } + return S_OK; } // destroy cbuf body - res = MV_CC_CBufBody_Destroy(pSrvInfo->m_CBufBody_SHMOffset); - if (res != S_OK) { - MV_CC_DBG_Error(res, "MV_CC_CBufSrv_Create" - " MV_CC_CBufBody_Destroy", NULL); - } + MV_CC_CBufBody_Destroy(pSrvInfo->m_CBufBody_SHMOffset); - res = MV_CC_DSS_Free((pMV_CC_DSS_ServiceInfo_t)pSrvInfo,cc_task); + res = MV_CC_DSS_Free((pMV_CC_DSS_ServiceInfo_t)pSrvInfo, NULL); if (res != S_OK){ MV_CC_DBG_Error(res, "MV_CC_CBufSrv_Create" " MV_CC_DSS_Reg", NULL); } + return S_OK; } @@ -139,12 +144,23 @@ HRESULT MV_CC_CBufSrv_Release_By_Taskid(MV_CC_Task *cc_task) unsigned int first_serverid = 0; MV_CC_DSS_ServiceInfo_t pSrvInfo_Search; MV_CC_Node *head = cc_task->cbuf_head; - - while (singlenode_checkempty(head)) { - first_serverid = singlenode_getfirstnode(head); - pSrvInfo_Search.m_ServiceID = first_serverid; - MV_CC_CBufSrv_Destroy(&pSrvInfo_Search, cc_task); + HRESULT res = 0; + + while (1) { + mutex_lock(&cc_task->cbuf_Mutex); + if (singlenode_checkempty(head)) { + first_serverid = singlenode_getfirstnode(head); + pSrvInfo_Search.m_ServiceID = first_serverid; + mutex_unlock(&cc_task->cbuf_Mutex); + MV_CC_CBufSrv_Destroy(&pSrvInfo_Search, cc_task); + } else { + mutex_unlock(&cc_task->cbuf_Mutex); + break; + } } - return singlenode_exit(head); + mutex_lock(&cc_task->cbuf_Mutex); + res = singlenode_exit(head); + mutex_unlock(&cc_task->cbuf_Mutex); + return res; } diff --git a/arch/arm/mach-berlin/modules/cc/cc_driver.c b/arch/arm/mach-berlin/modules/cc/cc_driver.c index 35680d3e..c1838cbf 100644 --- a/arch/arm/mach-berlin/modules/cc/cc_driver.c +++ b/arch/arm/mach-berlin/modules/cc/cc_driver.c @@ -133,6 +133,7 @@ static int cc_driver_open (struct inode *inode, struct file *filp) singlenode_init(&cc_task->serverid_head); singlenode_init(&cc_task->cbuf_head); + mutex_init(&cc_task->cbuf_Mutex); filp->private_data = cc_task; cc_debug("cc_driver_open ok\n"); diff --git a/arch/arm/mach-berlin/modules/cc/cc_dss.c b/arch/arm/mach-berlin/modules/cc/cc_dss.c index a0735131..b6bf9557 100644 --- a/arch/arm/mach-berlin/modules/cc/cc_dss.c +++ b/arch/arm/mach-berlin/modules/cc/cc_dss.c @@ -1,6 +1,6 @@ -/******************************************************************************* -* Copyright (C) Marvell International Ltd. and its affiliates -* +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* * Marvell GPL License Option * * If you received this File from Marvell, you may opt to use, redistribute and/or @@ -28,10 +28,12 @@ pMV_CC_DSP_t pMV_APP_DSS = NULL; MV_CC_ServiceID_U32_t MV_CC_DSS_GetDynamicSID(pMV_CC_DSP_t self) { + MV_CC_ServiceID_U32_t allocate_SID; + if (self == NULL) return MV_CC_ServiceID_None; - MV_OSAL_Mutex_Lock(self->m_SeqIDMutex); + mutex_lock(&self->m_SeqIDMutex); self->m_SeqID++; self->m_Status.m_SeqID = self->m_SeqID; @@ -39,10 +41,11 @@ MV_CC_ServiceID_U32_t MV_CC_DSS_GetDynamicSID(pMV_CC_DSP_t self) if (!(self->m_SeqID & MV_CC_SID_BIT_DYNAMIC)) MV_CC_DBG_Warning(E_OUTOFRANGE, \ "MV_CC_DSS_GetDynamicSID rolled !!!", NULL); + allocate_SID = self->m_SeqID; - MV_OSAL_Mutex_Unlock(self->m_SeqIDMutex); + mutex_unlock(&self->m_SeqIDMutex); - return (self->m_SeqID | MV_CC_SID_BIT_DYNAMIC + return (allocate_SID | MV_CC_SID_BIT_DYNAMIC | MV_CC_SID_BIT_NORMAL | MV_CC_SID_BIT_LOCAL); } @@ -60,10 +63,10 @@ HRESULT MV_CC_DSS_Init(void) pMV_APP_DSS->m_SeqID = MV_CC_ServiceID_DynamicStart; - MV_OSAL_Mutex_Create(&(pMV_APP_DSS->m_SeqIDMutex)); - MV_OSAL_Mutex_Create(&(pMV_APP_DSS->m_hGSListMutex)); + mutex_init(&(pMV_APP_DSS->m_SeqIDMutex)); + mutex_init(&(pMV_APP_DSS->m_hGSListMutex)); - MV_OSAL_Mutex_Lock(pMV_APP_DSS->m_hGSListMutex); + mutex_lock(&pMV_APP_DSS->m_hGSListMutex); res = MV_CC_DSS_GlobalServiceList_Init(); if (res != S_OK) @@ -82,7 +85,7 @@ HRESULT MV_CC_DSS_Init(void) pMV_APP_DSS->m_Status.m_LastServiceID = 0; pMV_APP_DSS->m_Status.m_SeqID = pMV_APP_DSS->m_SeqID; - MV_OSAL_Mutex_Unlock(pMV_APP_DSS->m_hGSListMutex); + mutex_unlock(&pMV_APP_DSS->m_hGSListMutex); return S_OK; } @@ -94,17 +97,14 @@ HRESULT MV_CC_DSS_Exit(void) if (pMV_APP_DSS == NULL) MV_CC_DBG_Error(E_NOTREADY, "MV_CC_DSS_Exit", NULL); - MV_OSAL_Mutex_Lock(pMV_APP_DSS->m_hGSListMutex); + mutex_lock(&pMV_APP_DSS->m_hGSListMutex); res = MV_CC_DSS_GlobalServiceList_Exit(); if (res != S_OK) MV_CC_DBG_Error(res, "MV_CC_DSS_Exit" \ " MV_CC_DSS_GlobalServiceList_Exit", NULL); - MV_OSAL_Mutex_Unlock(pMV_APP_DSS->m_hGSListMutex); - - MV_OSAL_Mutex_Destroy(&(pMV_APP_DSS->m_hGSListMutex)); - MV_OSAL_Mutex_Destroy(&(pMV_APP_DSS->m_SeqIDMutex)); + mutex_unlock(&pMV_APP_DSS->m_hGSListMutex); MV_OSAL_Free(pMV_APP_DSS); @@ -277,26 +277,23 @@ HRESULT MV_CC_DSS_Reg(pMV_CC_DSS_ServiceInfo_t pSrvInfo, if (pMV_APP_DSS == NULL) MV_CC_DBG_Error(E_NOTREADY, "MV_CC_DSS_Reg", NULL); - MV_OSAL_Mutex_Lock(pMV_APP_DSS->m_hGSListMutex); - // check service id need dynamic generator? if (pSrvInfo->m_ServiceID == MV_CC_ServiceID_DynamicApply) { //get a new dynamic service id pSrvInfo->m_ServiceID = MV_CC_DSS_GetDynamicSID(pMV_APP_DSS); if (pSrvInfo->m_ServiceID == MV_CC_ServiceID_None) { pMV_APP_DSS->m_Status.m_RegErrCount++; - MV_OSAL_Mutex_Unlock(pMV_APP_DSS->m_hGSListMutex); MV_CC_DBG_Error(E_FAIL, "MV_CC_DSS_Reg", NULL); } } pSrvInfo_copy = MV_CC_DSS_GlobalServiceList_SrvInfo_Ctor(); if (pSrvInfo_copy == NULL) { - MV_OSAL_Mutex_Unlock(pMV_APP_DSS->m_hGSListMutex); MV_CC_DBG_Error(E_OUTOFMEMORY, "MV_CC_DSS_Reg", NULL); } GaloisMemcpy(pSrvInfo_copy, pSrvInfo, sizeof(MV_CC_DSS_ServiceInfo_t)); + mutex_lock(&pMV_APP_DSS->m_hGSListMutex); res = MV_CC_DSS_GlobalServiceList_Add(pSrvInfo->m_ServiceID, pSrvInfo_copy); if (res != S_OK) { @@ -306,7 +303,8 @@ HRESULT MV_CC_DSS_Reg(pMV_CC_DSS_ServiceInfo_t pSrvInfo, goto MV_CC_DSS_Reg_Failure; } - singlenode_add(cc_task->serverid_head, pSrvInfo->m_ServiceID); + if (cc_task != NULL) + singlenode_add(cc_task->serverid_head, pSrvInfo->m_ServiceID); pMV_APP_DSS->m_Status.m_RegCount++; pMV_APP_DSS->m_Status.m_ServiceCount++; @@ -314,7 +312,7 @@ HRESULT MV_CC_DSS_Reg(pMV_CC_DSS_ServiceInfo_t pSrvInfo, MV_CC_DSS_Reg_Failure: - MV_OSAL_Mutex_Unlock(pMV_APP_DSS->m_hGSListMutex); + mutex_unlock(&pMV_APP_DSS->m_hGSListMutex); return res; } @@ -335,7 +333,7 @@ HRESULT MV_CC_DSS_Update(pMV_CC_DSS_ServiceInfo_t pSrvInfo) if (pSrvInfo->m_ServiceID == MV_CC_ServiceID_DynamicApply) MV_CC_DBG_Error(E_BADVALUE, "MV_CC_DSS_Update", NULL); - MV_OSAL_Mutex_Lock(pMV_APP_DSS->m_hGSListMutex); + mutex_lock(&pMV_APP_DSS->m_hGSListMutex); res = MV_CC_DSS_GlobalServiceList_Get(pSrvInfo->m_ServiceID, \ &pSrvInfo_Search); @@ -357,7 +355,7 @@ HRESULT MV_CC_DSS_Update(pMV_CC_DSS_ServiceInfo_t pSrvInfo) MV_CC_DSS_Update_Failure: - MV_OSAL_Mutex_Unlock(pMV_APP_DSS->m_hGSListMutex); + mutex_unlock(&pMV_APP_DSS->m_hGSListMutex); return res; } @@ -374,9 +372,9 @@ HRESULT MV_CC_DSS_Free(pMV_CC_DSS_ServiceInfo_t pSrvInfo, if (pMV_APP_DSS == NULL) MV_CC_DBG_Error(E_NOTREADY, "MV_CC_DSS_Free", NULL); - MV_OSAL_Mutex_Lock(pMV_APP_DSS->m_hGSListMutex); - - singlenode_delete(cc_task->serverid_head, pSrvInfo->m_ServiceID); + mutex_lock(&pMV_APP_DSS->m_hGSListMutex); + if (cc_task != NULL) + singlenode_delete(cc_task->serverid_head, pSrvInfo->m_ServiceID); res = MV_CC_DSS_GlobalServiceList_Delete(pSrvInfo->m_ServiceID); if (res != S_OK) { @@ -392,7 +390,7 @@ HRESULT MV_CC_DSS_Free(pMV_CC_DSS_ServiceInfo_t pSrvInfo, MV_CC_DSS_Free_Failure: - MV_OSAL_Mutex_Unlock(pMV_APP_DSS->m_hGSListMutex); + mutex_unlock(&pMV_APP_DSS->m_hGSListMutex); return res; } @@ -409,7 +407,7 @@ HRESULT MV_CC_DSS_Inquiry(pMV_CC_DSS_ServiceInfo_t pSrvInfo) if (pMV_APP_DSS == NULL) MV_CC_DBG_Error(E_NOTREADY, "MV_CC_DSS_Inquiry", NULL); - MV_OSAL_Mutex_Lock(pMV_APP_DSS->m_hGSListMutex); + mutex_lock(&pMV_APP_DSS->m_hGSListMutex); res = MV_CC_DSS_GlobalServiceList_Get(pSrvInfo->m_ServiceID, \ &pSrvInfo_Search); @@ -431,7 +429,7 @@ HRESULT MV_CC_DSS_Inquiry(pMV_CC_DSS_ServiceInfo_t pSrvInfo) MV_CC_DSS_Inquiry_Failure: - MV_OSAL_Mutex_Unlock(pMV_APP_DSS->m_hGSListMutex); + mutex_unlock(&pMV_APP_DSS->m_hGSListMutex); return res; } @@ -472,7 +470,7 @@ HRESULT MV_CC_DSS_GetList(pMV_CC_DSS_ServiceInfo_DataList_t pSrvInfoList) pSrvInfoList->m_DataNum = 0; pSrvInfoList->m_MaxNum = 0; - MV_OSAL_Mutex_Lock(pMV_APP_DSS->m_hGSListMutex); + mutex_lock(&pMV_APP_DSS->m_hGSListMutex); res = MV_CC_DSS_GlobalServiceList_Traversal(GSList_VisitFunc_GetList, pSrvInfoList); @@ -480,7 +478,7 @@ HRESULT MV_CC_DSS_GetList(pMV_CC_DSS_ServiceInfo_DataList_t pSrvInfoList) MV_CC_DBG_Warning(res, "MV_CC_DSS_GetList" \ " MV_CC_DSS_GlobalServiceList_Traversal", NULL); - MV_OSAL_Mutex_Unlock(pMV_APP_DSS->m_hGSListMutex); + mutex_unlock(&pMV_APP_DSS->m_hGSListMutex); return res; } diff --git a/arch/arm/mach-berlin/modules/cc/cc_dss.h b/arch/arm/mach-berlin/modules/cc/cc_dss.h index d4970e96..b07cff69 100644 --- a/arch/arm/mach-berlin/modules/cc/cc_dss.h +++ b/arch/arm/mach-berlin/modules/cc/cc_dss.h @@ -19,7 +19,7 @@ #ifndef _CC_DSS_H_ #define _CC_DSS_H_ -#include +#include #include "cc_list.h" #define MV_CC_SID_BIT_DYNAMIC (0x80000000) @@ -32,11 +32,6 @@ #define MV_CC_ServiceID_DynamicStart (0x80000000) #define MV_CC_ServiceID_DynamicApply (0x80000000) -#define MV_OSAL_Mutex_Create(sem) spin_lock_init(sem) -#define MV_OSAL_Mutex_Lock(sem) spin_lock_bh(&sem) -#define MV_OSAL_Mutex_Unlock(sem) spin_unlock_bh(&sem) -#define MV_OSAL_Mutex_Destroy(sem) - typedef struct _MV_CC_DSS_Status { UINT32 m_RegCount; @@ -64,13 +59,14 @@ typedef struct mv_cc_task { char cc_taskname[16]; MV_CC_Node *serverid_head; MV_CC_Node *cbuf_head; + struct mutex cbuf_Mutex; } MV_CC_Task; typedef struct _MV_CC_DSP { - spinlock_t m_hGSListMutex; + struct mutex m_hGSListMutex; MV_CC_ServiceID_U32_t m_SeqID; - spinlock_t m_SeqIDMutex; + struct mutex m_SeqIDMutex; MV_CC_DSS_Status_t m_Status; } MV_CC_DSP_t, *pMV_CC_DSP_t; diff --git a/arch/arm/mach-berlin/modules/cc/cc_msgq.c b/arch/arm/mach-berlin/modules/cc/cc_msgq.c index 56c9eb84..7a3de72f 100644 --- a/arch/arm/mach-berlin/modules/cc/cc_msgq.c +++ b/arch/arm/mach-berlin/modules/cc/cc_msgq.c @@ -25,19 +25,11 @@ HRESULT MV_CC_MsgQ_PostMsgByID(MV_CC_ServiceID_U32_t ServiceID, PVOID pMSG ) { HRESULT res; - MV_CC_DSS_ServiceInfo_MsgQ_t SrvInfo; /* Parameter Check */ if (pMSG == NULL) MV_CC_DBG_Error(E_INVALIDARG, "MV_CC_MsgQ_PostMsgByID", NULL); - SrvInfo.m_ServiceID = ServiceID; - res = MV_CC_DSS_Inquiry((pMV_CC_DSS_ServiceInfo_t)&SrvInfo); - if (res != S_OK) { - MV_CC_DBG_Error(res, "MV_CC_MsgQ_PostMsgByID" - " MV_CC_DSS_Inquiry", NULL); - } - res = MV_CC_UDP_SendMsg(NULL, ServiceID, pMSG, sizeof(MV_CC_MSG_t)); if (res != S_OK) { MV_CC_DBG_Error(res, "MV_CC_MsgQ_PostMsgByID" diff --git a/arch/arm/mach-berlin/modules/fastlogo/DHUB/source/avio_dhub_drv.c b/arch/arm/mach-berlin/modules/fastlogo/DHUB/source/avio_dhub_drv.c index b067d890..bd814a2f 100755 --- a/arch/arm/mach-berlin/modules/fastlogo/DHUB/source/avio_dhub_drv.c +++ b/arch/arm/mach-berlin/modules/fastlogo/DHUB/source/avio_dhub_drv.c @@ -1,199 +1,198 @@ -/******************************************************************************* -* Copyright (C) Marvell International Ltd. and its affiliates -* -* Marvell GPL License Option -* -* If you received this File from Marvell, you may opt to use, redistribute and/or -* modify this File in accordance with the terms and conditions of the General -* Public License Version 2, June 1991 (the "GPL License"), a copy of which is -* available along with the File in the license.txt file or by writing to the Free -* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or -* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. -* -* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED -* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY -* DISCLAIMED. The GPL License provides additional details about this warranty -* disclaimer. -********************************************************************************/ - - - -#include "api_avio_dhub.h" - -HDL_dhub2d AG_dhubHandle; -HDL_dhub2d VPP_dhubHandle; -HDL_dhub2d VIP_dhubHandle; - -DHUB_channel_config VPP_config[VPP_NUM_OF_CHANNELS] = { -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) - // BANK0 - { avioDhubChMap_vpp_MV_R, DHUB_BANK0_START_ADDR, DHUB_BANK0_START_ADDR+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_MV_FRC_R, DHUB_BANK0_START_ADDR + 2048*2, DHUB_BANK0_START_ADDR + 2048*2+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_MV_FRC_W, DHUB_BANK0_START_ADDR + 2048*3, DHUB_BANK0_START_ADDR + 2048*3+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - // BANK1 - { avioDhubChMap_vpp_PIP_R, DHUB_BANK1_START_ADDR, DHUB_BANK1_START_ADDR+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_PIP_FRC_R,DHUB_BANK1_START_ADDR +2048*2, DHUB_BANK1_START_ADDR + 2048*2+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_PIP_FRC_W,DHUB_BANK1_START_ADDR + 2048*3, DHUB_BANK1_START_ADDR + 2048*3+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - // BANK2 - { avioDhubChMap_vpp_DINT0_R,DHUB_BANK2_START_ADDR, DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // BANK3 - { avioDhubChMap_vpp_DINT1_R,DHUB_BANK3_START_ADDR, DHUB_BANK3_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // BANK4 - { avioDhubChMap_vpp_DINT_W,DHUB_BANK4_START_ADDR, DHUB_BANK4_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // Bank5 - { avioDhubChMap_vpp_BCM_R, DHUB_BANK5_START_ADDR, DHUB_BANK5_START_ADDR+512, 512, (1024-512), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vpp_HDMI_R, DHUB_BANK5_START_ADDR+1024, DHUB_BANK5_START_ADDR+1024+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vpp_AUX_FRC_R,DHUB_BANK5_START_ADDR+1024+512, DHUB_BANK5_START_ADDR+1024+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_AUX_FRC_W,DHUB_BANK5_START_ADDR+2048+512, DHUB_BANK5_START_ADDR+2048+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_BG_R,DHUB_BANK5_START_ADDR+2048+512*3, DHUB_BANK5_START_ADDR+2048+512*3+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_TT_R,DHUB_BANK5_START_ADDR+2048*3+512*3, DHUB_BANK5_START_ADDR+2048*3+512*3+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, -#else /* (BERLIN_CHIP_VERSION == BERLIN_BG2CD_A0) */ - // BANK0 - { avioDhubChMap_vpp_MV_R, VPP_DHUB_BANK0_START_ADDR, VPP_DHUB_BANK0_START_ADDR+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_MV_FRC_R, VPP_DHUB_BANK0_START_ADDR + 2048*2, VPP_DHUB_BANK0_START_ADDR + 2048*2+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_MV_FRC_W, VPP_DHUB_BANK0_START_ADDR + 2048*3, VPP_DHUB_BANK0_START_ADDR + 2048*3+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - // BANK1 - { avioDhubChMap_vpp_DINT0_R,VPP_DHUB_BANK1_START_ADDR, VPP_DHUB_BANK1_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // BANK2 - { avioDhubChMap_vpp_DINT1_R,VPP_DHUB_BANK2_START_ADDR, VPP_DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // BANK3 - { avioDhubChMap_vpp_DINT_W,VPP_DHUB_BANK3_START_ADDR, VPP_DHUB_BANK3_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // Bank4 - { avioDhubChMap_vpp_BCM_R, VPP_DHUB_BANK4_START_ADDR, VPP_DHUB_BANK4_START_ADDR+128, 128, (1024-128), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_HDMI_R, VPP_DHUB_BANK4_START_ADDR+1024, VPP_DHUB_BANK4_START_ADDR+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vpp_SPDIF_W,VPP_DHUB_BANK4_START_ADDR+1024*2, VPP_DHUB_BANK4_START_ADDR+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1} -#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ -}; -DHUB_channel_config AG_config[AG_NUM_OF_CHANNELS] = { -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) - // Bank0 - { avioDhubChMap_ag_APPCMD_R, DHUB_BANK0_START_ADDR, DHUB_BANK0_START_ADDR+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA0_R, DHUB_BANK0_START_ADDR+512, DHUB_BANK0_START_ADDR+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA1_R, DHUB_BANK0_START_ADDR+512+1024,DHUB_BANK0_START_ADDR+512+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA2_R, DHUB_BANK0_START_ADDR+512+1024*2,DHUB_BANK0_START_ADDR+512+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA3_R, DHUB_BANK0_START_ADDR+512+1024*3,DHUB_BANK0_START_ADDR+512+1024*3+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_SA_R, DHUB_BANK0_START_ADDR+512+1024*4,DHUB_BANK0_START_ADDR+512+1024*4+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_SPDIF_R, DHUB_BANK0_START_ADDR+512+1024*5, DHUB_BANK0_START_ADDR+512+1024*5+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MIC_W, DHUB_BANK0_START_ADDR+1024*6, DHUB_BANK0_START_ADDR+1024*6+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_APPDAT_R, DHUB_BANK0_START_ADDR+512+1024*6, DHUB_BANK0_START_ADDR+512+1024*6+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_APPDAT_W, DHUB_BANK0_START_ADDR+1024*7, DHUB_BANK0_START_ADDR+1024*7+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - // Bank1 - { avioDhubChMap_ag_MOSD_R, DHUB_BANK1_START_ADDR, DHUB_BANK1_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // Bank2 - { avioDhubChMap_ag_CSR_R, DHUB_BANK2_START_ADDR, DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // Bank3 - { avioDhubChMap_ag_GFX_R, DHUB_BANK3_START_ADDR, DHUB_BANK3_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // Bank4 - { avioDhubChMap_ag_PG_R, DHUB_BANK4_START_ADDR, DHUB_BANK4_START_ADDR+32, 32, (2048*3-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_ag_PG_ENG_R, DHUB_BANK4_START_ADDR + (2048 * 3), DHUB_BANK4_START_ADDR + (2048 *3) + 32, 32, (1024 - 32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_PG_ENG_W, DHUB_BANK4_START_ADDR + (2048 * 3) + 1024, DHUB_BANK4_START_ADDR + (2048 * 3) + 1024 + 32, 32, (1024 - 32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, -#else /* (BERLIN_CHIP_VERSION == BERLIN_BG2CD_A0) */ - // Bank0 - { avioDhubChMap_ag_APPCMD_R, AG_DHUB_BANK0_START_ADDR, AG_DHUB_BANK0_START_ADDR+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA0_R, AG_DHUB_BANK0_START_ADDR+512, AG_DHUB_BANK0_START_ADDR+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA1_R, AG_DHUB_BANK0_START_ADDR+512+1024,AG_DHUB_BANK0_START_ADDR+512+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA2_R, AG_DHUB_BANK0_START_ADDR+512+1024*2,AG_DHUB_BANK0_START_ADDR+512+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA3_R, AG_DHUB_BANK0_START_ADDR+512+1024*3,AG_DHUB_BANK0_START_ADDR+512+1024*3+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_SPDIF_R, AG_DHUB_BANK0_START_ADDR+512+1024*5, AG_DHUB_BANK0_START_ADDR+512+1024*5+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_APPDAT_R, AG_DHUB_BANK0_START_ADDR+512+1024*6, AG_DHUB_BANK0_START_ADDR+512+1024*6+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_APPDAT_W, AG_DHUB_BANK0_START_ADDR+1024*7, AG_DHUB_BANK0_START_ADDR+1024*7+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - // Bank1 - { avioDhubChMap_ag_CSR_R, AG_DHUB_BANK1_START_ADDR, AG_DHUB_BANK1_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // Bank2 - { avioDhubChMap_ag_GFX_R, AG_DHUB_BANK2_START_ADDR, AG_DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, -#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ -}; -/****************************************************************************************************************** - * Function: DhubInitialization - * Description: Initialize DHUB . - * Parameter : cpuId ------------- cpu ID - * dHubBaseAddr ------------- dHub Base address. - * hboSramAddr ----- Sram Address for HBO. - * pdhubHandle ----- pointer to 2D dhubHandle - * dhub_config ----- configuration of AG - * numOfChans ----- number of channels - * Return: void -******************************************************************************************************************/ -void DhubInitialization(SIGN32 cpuId, UNSG32 dHubBaseAddr, UNSG32 hboSramAddr, HDL_dhub2d *pdhubHandle, DHUB_channel_config *dhub_config,SIGN32 numOfChans) -{ - HDL_semaphore *pSemHandle; - SIGN32 i; - SIGN32 chanId; - - //Initialize HDL_dhub with a $dHub BIU instance. - dhub2d_hdl( hboSramAddr, /*! Base address of dHub.HBO SRAM !*/ - dHubBaseAddr, /*! Base address of a BIU instance of $dHub !*/ - pdhubHandle /*! Handle to HDL_dhub2d !*/ - ); - //set up semaphore to trigger cmd done interrupt - //note that this set of semaphores are different from the HBO semaphores - //the ID must match the dhub ID because they are hardwired. - pSemHandle = dhub_semaphore(&pdhubHandle->dhub); - - for (i = 0; i< numOfChans; i++) { - //Configurate a dHub channel - //note that in this function, it also configured right HBO channels(cmdQ and dataQ) and semaphores - chanId = dhub_config[i].chanId; - { - dhub_channel_cfg( - &pdhubHandle->dhub, /*! Handle to HDL_dhub !*/ - chanId, /*! Channel ID in $dHubReg !*/ - dhub_config[chanId].chanCmdBase, //UNSG32 baseCmd, /*! Channel FIFO base address (byte address) for cmdQ !*/ - dhub_config[chanId].chanDataBase, //UNSG32 baseData, /*! Channel FIFO base address (byte address) for dataQ !*/ - dhub_config[chanId].chanCmdSize/8, //SIGN32 depthCmd, /*! Channel FIFO depth for cmdQ, in 64b word !*/ - dhub_config[chanId].chanDataSize/8, //SIGN32 depthData, /*! Channel FIFO depth for dataQ, in 64b word !*/ - dhub_config[chanId].chanMtuSize, /*! See 'dHubChannel.CFG.MTU', 0/1/2 for 8/32/128 bytes !*/ - dhub_config[chanId].chanQos, /*! See 'dHubChannel.CFG.QoS' !*/ - dhub_config[chanId].chanSelfLoop, /*! See 'dHubChannel.CFG.selfLoop' !*/ - dhub_config[chanId].chanEnable, /*! 0 to disable, 1 to enable !*/ - 0 /*! Pass NULL to directly init dHub, or - Pass non-zero to receive programming sequence - in (adr,data) pairs - !*/ - ); - // setup interrupt for channel chanId - //configure the semaphore depth to be 1 - semaphore_cfg(pSemHandle, chanId, 1, 0); - } - } -} - -/****************************************************************************************************************** - * Function: DhubChannelClear - * Description: Clear corresponding DHUB channel. - * Parameter: hdl ---------- handle to HDL_dhub - * id ---------- channel ID in dHubReg - * cfgQ ---------- pass null to directly init dhub, or pass non-zero to receive programming - * sequence in (adr, data) pairs - * Return: void -******************************************************************************************************************/ -void DhubChannelClear(void *hdl, SIGN32 id, T64b cfgQ[]) -{ - UNSG32 cmdID = dhub_id2hbo_cmdQ(id); - UNSG32 dataID = dhub_id2hbo_data(id); - HDL_dhub *dhub = (HDL_dhub *)hdl; - HDL_hbo *hbo = &(dhub->hbo); - - /* 1.Software stops the command queue in HBO (please refer to HBO.sxw for details) */ - hbo_queue_enable(hbo, cmdID, 0, cfgQ); - /* 2.Software stops the channel in dHub by writing zero to dHubChannel.START.EN */ - dhub_channel_enable(dhub, id, 0, cfgQ); - /* 3.Software clears the channel in dHub by writing one to dHubChannel.CLEAR.EN */ - dhub_channel_clear(dhub, id); - /* 4.Software waits for the register bits dHubChannel.PENDING.ST and dHubChannel.BUSY.ST to be 0 */ - dhub_channel_clear_done(dhub, id); - /* 5.Software stops and clears the command queue */ - hbo_queue_enable(hbo, cmdID, 0, cfgQ); - hbo_queue_clear(hbo, cmdID); - /* 6.Software wait for the corresponding busy bit to be 0 */ - hbo_queue_clear_done(hbo, cmdID); - /* 7.Software stops and clears the data queue */ - hbo_queue_enable(hbo, dataID, 0, cfgQ); - hbo_queue_clear(hbo, dataID); - /* 8.Software wait for the corresponding data Q busy bit to be 0 */ - hbo_queue_clear_done(hbo, dataID); - /* 9.Software enable dHub and HBO */ - dhub_channel_enable(dhub, id, 1, cfgQ); - hbo_queue_enable(hbo, cmdID, 1, cfgQ); - hbo_queue_enable(hbo, dataID, 1, cfgQ); -} +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + +#include "api_avio_dhub.h" + +HDL_dhub2d AG_dhubHandle; +HDL_dhub2d VPP_dhubHandle; +#if (BERLIN_CHIP_VERSION >= BERLIN_BG2) +HDL_dhub2d VIP_dhubHandle; +#endif + +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + +DHUB_channel_config VPP_config[VPP_NUM_OF_CHANNELS_Z1] = { + // BANK0 + { avioDhubChMap_vpp_MV_R, VPP_DHUB_BANK0_START_ADDR, VPP_DHUB_BANK0_START_ADDR+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_MV_FRC_R, VPP_DHUB_BANK0_START_ADDR + 2048*2, VPP_DHUB_BANK0_START_ADDR + 2048*2+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_MV_FRC_W, VPP_DHUB_BANK0_START_ADDR + 2048*3, VPP_DHUB_BANK0_START_ADDR + 2048*3+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // BANK1 + { avioDhubChMap_vpp_DINT0_R_Z1,VPP_DHUB_BANK1_START_ADDR, VPP_DHUB_BANK1_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // BANK2 + { avioDhubChMap_vpp_DINT1_R_Z1,VPP_DHUB_BANK2_START_ADDR, VPP_DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // BANK3 + { avioDhubChMap_vpp_DINT_W_Z1,VPP_DHUB_BANK3_START_ADDR, VPP_DHUB_BANK3_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // Bank4 + { avioDhubChMap_vpp_BCM_R_Z1, VPP_DHUB_BANK4_START_ADDR, VPP_DHUB_BANK4_START_ADDR+128, 128, (1024-128), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_HDMI_R_Z1, VPP_DHUB_BANK4_START_ADDR+1024, VPP_DHUB_BANK4_START_ADDR+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, +}; + +DHUB_channel_config AG_config[AG_NUM_OF_CHANNELS_Z1] = { + // Bank0 + { avioDhubChMap_ag_APPCMD_R_Z1, AG_DHUB_BANK0_START_ADDR, AG_DHUB_BANK0_START_ADDR+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA0_R_Z1, AG_DHUB_BANK0_START_ADDR+512, AG_DHUB_BANK0_START_ADDR+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA1_R_Z1, AG_DHUB_BANK0_START_ADDR+512+1024,AG_DHUB_BANK0_START_ADDR+512+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA2_R_Z1, AG_DHUB_BANK0_START_ADDR+512+1024*2,AG_DHUB_BANK0_START_ADDR+512+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA3_R_Z1, AG_DHUB_BANK0_START_ADDR+512+1024*3,AG_DHUB_BANK0_START_ADDR+512+1024*3+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_SA_R_Z1, AG_DHUB_BANK0_START_ADDR+512+1024*4,AG_DHUB_BANK0_START_ADDR+512+1024*4+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_SPDIF_R_Z1, AG_DHUB_BANK0_START_ADDR+512+1024*5, AG_DHUB_BANK0_START_ADDR+512+1024*5+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_APPDAT_R_Z1, AG_DHUB_BANK0_START_ADDR+512+1024*6, AG_DHUB_BANK0_START_ADDR+512+1024*6+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_APPDAT_W_Z1, AG_DHUB_BANK0_START_ADDR+1024*7, AG_DHUB_BANK0_START_ADDR+1024*7+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // Bank1 + { avioDhubChMap_ag_CSR_R_Z1, AG_DHUB_BANK1_START_ADDR, AG_DHUB_BANK1_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // Bank2 + { avioDhubChMap_ag_GFX_R_Z1, AG_DHUB_BANK2_START_ADDR, AG_DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, +}; + +DHUB_channel_config VPP_config_a0[VPP_NUM_OF_CHANNELS_A0] = { + // BANK0 + { avioDhubChMap_vpp_MV_R, DHUB_BANK0_START_ADDR, DHUB_BANK0_START_ADDR+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_MV_FRC_R, DHUB_BANK0_START_ADDR + 2048*2, DHUB_BANK0_START_ADDR + 2048*2+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_MV_FRC_W, DHUB_BANK0_START_ADDR + 2048*3, DHUB_BANK0_START_ADDR + 2048*3+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // Bank1 + { avioDhubChMap_vpp_BCM_R_A0, DHUB_BANK1_START_ADDR, DHUB_BANK1_START_ADDR+128, 128, (2048-128), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_HDMI_R_A0, DHUB_BANK1_START_ADDR+2048, DHUB_BANK1_START_ADDR+2048+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, +}; + + +DHUB_channel_config AG_config_a0[AG_NUM_OF_CHANNELS_A0] = { + // Bank0 + { avioDhubChMap_ag_MA0_R_A0, AG_DHUB_BANK0_START_ADDR, AG_DHUB_BANK0_START_ADDR+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA1_R_A0, AG_DHUB_BANK0_START_ADDR+512,AG_DHUB_BANK0_START_ADDR+512+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA2_R_A0, AG_DHUB_BANK0_START_ADDR+512*2,AG_DHUB_BANK0_START_ADDR+512*2+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA3_R_A0, AG_DHUB_BANK0_START_ADDR+512*3,AG_DHUB_BANK0_START_ADDR+512*3+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_SA0_R_A0, AG_DHUB_BANK0_START_ADDR+512*4,AG_DHUB_BANK0_START_ADDR+512*4+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MIC0_W_A0, AG_DHUB_BANK0_START_ADDR+1024*3, AG_DHUB_BANK0_START_ADDR+1024*3+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MIC1_W_A0, AG_DHUB_BANK0_START_ADDR+512+1024*3, AG_DHUB_BANK0_START_ADDR+512+1024*3+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // Bank1 + { avioDhubChMap_ag_CSR_R_A0, AG_DHUB_BANK1_START_ADDR, AG_DHUB_BANK1_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // Bank2 + { avioDhubChMap_ag_GFX_R_A0, AG_DHUB_BANK2_START_ADDR, AG_DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, +}; + +#else /* only BG2CDP is supported */ +#error +#endif + + +/****************************************************************************************************************** + * Function: DhubInitialization + * Description: Initialize DHUB . + * Parameter : cpuId ------------- cpu ID + * dHubBaseAddr ------------- dHub Base address. + * hboSramAddr ----- Sram Address for HBO. + * pdhubHandle ----- pointer to 2D dhubHandle + * dhub_config ----- configuration of AG + * numOfChans ----- number of channels + * Return: void +******************************************************************************************************************/ +void DhubInitialization(SIGN32 cpuId, UNSG32 dHubBaseAddr, UNSG32 hboSramAddr, HDL_dhub2d *pdhubHandle, DHUB_channel_config *dhub_config,SIGN32 numOfChans) +{ + HDL_semaphore *pSemHandle; + SIGN32 i; + SIGN32 chanId; + + //Initialize HDL_dhub with a $dHub BIU instance. + dhub2d_hdl( hboSramAddr, /*! Base address of dHub.HBO SRAM !*/ + dHubBaseAddr, /*! Base address of a BIU instance of $dHub !*/ + pdhubHandle /*! Handle to HDL_dhub2d !*/ + ); + //set up semaphore to trigger cmd done interrupt + //note that this set of semaphores are different from the HBO semaphores + //the ID must match the dhub ID because they are hardwired. + pSemHandle = dhub_semaphore(&pdhubHandle->dhub); + + for (i = 0; i< numOfChans; i++) { + //Configurate a dHub channel + //note that in this function, it also configured right HBO channels(cmdQ and dataQ) and semaphores + chanId = dhub_config[i].chanId; + { + dhub_channel_cfg( + &pdhubHandle->dhub, /*! Handle to HDL_dhub !*/ + chanId, /*! Channel ID in $dHubReg !*/ + dhub_config[chanId].chanCmdBase, //UNSG32 baseCmd, /*! Channel FIFO base address (byte address) for cmdQ !*/ + dhub_config[chanId].chanDataBase, //UNSG32 baseData, /*! Channel FIFO base address (byte address) for dataQ !*/ + dhub_config[chanId].chanCmdSize/8, //SIGN32 depthCmd, /*! Channel FIFO depth for cmdQ, in 64b word !*/ + dhub_config[chanId].chanDataSize/8, //SIGN32 depthData, /*! Channel FIFO depth for dataQ, in 64b word !*/ + dhub_config[chanId].chanMtuSize, /*! See 'dHubChannel.CFG.MTU', 0/1/2 for 8/32/128 bytes !*/ + dhub_config[chanId].chanQos, /*! See 'dHubChannel.CFG.QoS' !*/ + dhub_config[chanId].chanSelfLoop, /*! See 'dHubChannel.CFG.selfLoop' !*/ + dhub_config[chanId].chanEnable, /*! 0 to disable, 1 to enable !*/ + 0 /*! Pass NULL to directly init dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + // setup interrupt for channel chanId + //configure the semaphore depth to be 1 + semaphore_cfg(pSemHandle, chanId, 1, 0); +#if 0 + // enable interrupt from this semaphore + semaphore_intr_enable ( + pSemHandle, // semaphore handler + chanId, + 0, // empty + 1, // full + 0, // almost_empty + 0, // almost_full + cpuId // 0~2, depending on which CPU the interrupt is enabled for. + ); +#endif + } + } +} + +/****************************************************************************************************************** + * Function: DhubChannelClear + * Description: Clear corresponding DHUB channel. + * Parameter: hdl ---------- handle to HDL_dhub + * id ---------- channel ID in dHubReg + * cfgQ ---------- pass null to directly init dhub, or pass non-zero to receive programming + * sequence in (adr, data) pairs + * Return: void +******************************************************************************************************************/ +void DhubChannelClear(void *hdl, SIGN32 id, T64b cfgQ[]) +{ + UNSG32 cmdID = dhub_id2hbo_cmdQ(id); + UNSG32 dataID = dhub_id2hbo_data(id); + HDL_dhub *dhub = (HDL_dhub *)hdl; + HDL_hbo *hbo = &(dhub->hbo); + + /* 1.Software stops the command queue in HBO (please refer to HBO.sxw for details) */ + hbo_queue_enable(hbo, cmdID, 0, cfgQ); + /* 2.Software stops the channel in dHub by writing zero to dHubChannel.START.EN */ + dhub_channel_enable(dhub, id, 0, cfgQ); + /* 3.Software clears the channel in dHub by writing one to dHubChannel.CLEAR.EN */ + dhub_channel_clear(dhub, id); + /* 4.Software waits for the register bits dHubChannel.PENDING.ST and dHubChannel.BUSY.ST to be 0 */ + dhub_channel_clear_done(dhub, id); + /* 5.Software stops and clears the command queue */ + hbo_queue_enable(hbo, cmdID, 0, cfgQ); + hbo_queue_clear(hbo, cmdID); + /* 6.Software wait for the corresponding busy bit to be 0 */ + hbo_queue_clear_done(hbo, cmdID); + /* 7.Software stops and clears the data queue */ + hbo_queue_enable(hbo, dataID, 0, cfgQ); + hbo_queue_clear(hbo, dataID); + /* 8.Software wait for the corresponding data Q busy bit to be 0 */ + hbo_queue_clear_done(hbo, dataID); + /* 9.Software enable dHub and HBO */ + dhub_channel_enable(dhub, id, 1, cfgQ); + hbo_queue_enable(hbo, cmdID, 1, cfgQ); + hbo_queue_enable(hbo, dataID, 1, cfgQ); +} diff --git a/arch/arm/mach-berlin/modules/fastlogo/Makefile b/arch/arm/mach-berlin/modules/fastlogo/Makefile index a9d44c90..20554a9d 100755 --- a/arch/arm/mach-berlin/modules/fastlogo/Makefile +++ b/arch/arm/mach-berlin/modules/fastlogo/Makefile @@ -1,19 +1,13 @@ -include $(srctree)/arch/arm/mach-berlin/mv88de3100.mk - MWD=$(srctree)/arch/arm/mach-berlin -PWD=$(MWD)/modules/fastlogo +include $(MWD)/mv88de3100.mk +PWD=$(MWD)/modules/fastlogo HEADER_PATH := \ -I$(MWD)/include \ -I$(MWD)/include/mach \ - -I$(MWD)/modules/shm \ - -I$(MWD)/modules/cc \ - -I$(MWD)/modules/nfc \ - -I$(MWD)/modules/pe \ - -I$(MWD)/modules/pe/gsinc \ - -I$(MWD)/modules/pe/gsinc/$(FIRMWARE) \ - -I$(PWD)/Common/include \ - -I$(PWD)/Common/include/$(FIRMWARE) + -I$(MWD)/modules/shm_amp \ + -I$(PWD) \ + -I$(PWD)/inc_bg2cdp ccflags-y += -DLOGO_ENABLE_MAIN=1 -DLOGO_ENABLE_PIP=0 -DLOGO_ENABLE_AUX=0 ccflags-y += -DLOGO_PROC_FS=1 -DLOGO_TIME_PROFILE=1 @@ -22,23 +16,18 @@ ccflags-y += -DLOGO_USE_SHM=1 endif ccflags-y += $(MV_DEFINE) $(HEADER_PATH) -ccflags-y += -I$(PWD)/THINVPP/source/include/include_BG2_A0 - ccflags-y += -I$(PWD)/THINVPP/include ccflags-y += -I$(PWD)/THINVPP/source/include ccflags-y += -I$(PWD)/THINVPP/source/MISC/include asflags-y += -I$(PWD) +FASTLOGO_OBJ += fastlogo_soc.o FASTLOGO_OBJ += THINVPP/source/thinvpp_api.o FASTLOGO_OBJ += THINVPP/source/thinvpp_apifuncs.o FASTLOGO_OBJ += THINVPP/source/thinvpp_isr.o FASTLOGO_OBJ += THINVPP/source/MISC/source/thinvpp_bcmbuf.o -ifeq ($(CONFIG_BERLIN_PE),y) -#use the avio_dhub_drv in pe module -else -FASTLOGO_OBJ += DHUB/source/avio_dhub_drv.o -endif +#FASTLOGO_OBJ += DHUB/source/avio_dhub_drv.o obj-$(CONFIG_BERLIN_FASTLOGO) += galois_fastlogo.o galois_fastlogo-objs := fastlogo_driver.o $(FASTLOGO_OBJ) diff --git a/arch/arm/mach-berlin/modules/fastlogo/THINVPP/include/bcm_cmds_cdp.h b/arch/arm/mach-berlin/modules/fastlogo/THINVPP/include/bcm_cmds_cdp.h new file mode 100644 index 00000000..f99b0c5e --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo/THINVPP/include/bcm_cmds_cdp.h @@ -0,0 +1,538 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + +static unsigned z1_bcm_cmd_0[] = +{ +/* 1*/ 0x00000015,0xf7f70000, 0x0000000c,0xf7f65010, 0x00000002,0xf7f65014, 0x00000059,0xf7f65018, + 0x00000003,0xf7f6501c, 0x000000e0,0xf7f65030, 0x00000002,0xf7f65034, 0x000000e7,0xf7f65038, + 0x00000001,0xf7f6503c, 0x0000001e,0xf7f65040, 0x00000003,0xf7f65044, 0x000000e0,0xf7f65048, + 0x00000002,0xf7f6504c, 0x000000ef,0xf7f65050, 0x00000001,0xf7f65054, 0x000000e9,0xf7f65058, + 0x00000001,0xf7f6505c, 0x000000cf,0xf7f65448, 0x00000002,0xf7f6544c, 0x000000e3,0xf7f65458, + 0x00000002,0xf7f6545c, 0x000000f3,0xf7f65460, 0x00000000,0xf7f65464, 0x000000f6,0xf7f65468, + 0x00000000,0xf7f6546c, 0x000000f3,0xf7f65470, 0x00000000,0xf7f65474, 0x00000021,0xf7f65478, + 0x00000003,0xf7f6547c, 0x000000e3,0xf7f65480, 0x00000002,0xf7f65484, 0x000000e3,0xf7f65488, + 0x00000002,0xf7f6548c, 0x00000036,0xf7f65490, 0x00000001,0xf7f65494, 0x00000000,0xf7f65498, + 0x00000000,0xf7f6549c, 0x00000000,0xf7f654a0, 0x00000002,0xf7f654a4, 0x00000001,0xf7f65440, + 0x00000000,0xf7f65060, 0x00000000,0xf7f65064, 0x000000d0,0xf7f65068, 0x00000002,0xf7f6506c, + 0x00000000,0xf7f65070, 0x00000000,0xf7f65074, 0x000000e0,0xf7f65078, 0x00000001,0xf7f6507c, + 0x00000000,0xf7f65180, 0x00000000,0xf7f65184, 0x000000d0,0xf7f65188, 0x00000002,0xf7f6518c, + 0x00000000,0xf7f65190, 0x00000000,0xf7f65194, 0x000000e0,0xf7f65198, 0x00000001,0xf7f6519c, + 0x00000080,0xf7f66000, 0x00000000,0xf7f66004, 0x00000001,0xf7f66010, 0x00000000,0xf7f6600c, + 0x80000000,0xf7f653d0, 0x00000000,0xf7f653d4, 0x00000000,0xf7f653d8, 0x000000ff,0xf7f65404, + 0x000000ff,0xf7f67828, 0x00000000,0xf7f7041c, 0x00000000,0xf7f72c64, + 0x90000000,0xf7f70414, 0x00b40000,0xf7f70418, + 0xa0000000,0xf7f72c08, 0x000000ef,0xf7f72c10, 0x000002e5,0xf7f72c0c, + 0x000001e9,0xf7f72c18, 0x000001e9,0xf7f72c14, 0x00000001,0xf7f72c04, + 0xb0000000,0xf7f700dc, 0x000702d8,0xf7f700e4, 0x000201e3, 0xf7f700f0, + 0xc0000000,0xf7f70094, 0x00054600,0xf7f70098, + 0x000548d0,0xf7f700a8, 0x00022595,0xf7f700ac, 0x00000050,0xf7f62018,0x00000000,0xf7f621fc, + 0x00000000,0xf7f700c8, 0x000000e0,0xf7f62180, 0x00000001,0xf7f62184, 0x000000d0,0xf7f62188, + 0x00000002,0xf7f6218c, 0x000000e0,0xf7f62190, 0x00000001,0xf7f62194, 0x000000d0,0xf7f62198, + 0x00000002,0xf7f6219c, 0x00000000,0xf7f621ec, 0x00000000,0xf7f621c0, 0x00000000,0xf7f621c4, + 0x00000010,0xf7f621c8, 0x00000000,0xf7f621b0, 0x00000000,0xf7f621b4, 0x00000010,0xf7f621b8, + 0x00000040,0xf7f620ac, 0x000000c2,0xf7f621f0, 0x00000000,0xf7f621e0, 0x00000000,0xf7f621d8, + 0x00000000,0xf7f621dc, 0x00000050,0xf7f70080, 0x0000000b,0xf7f621e8, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000040,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000041,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000042,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000043,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000044,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000045,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000046,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000047,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000048,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000049,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000004a,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x0000004b,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000004c,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x0000004d,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000004e,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x0000004f,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000050,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000051,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000052,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000053,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000054,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000055,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000056,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000057,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000058,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000059,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000005a,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x0000005b,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000005c,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x0000005d,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000005e,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x0000005f,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000060,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x0000000b,0xf7f621e4, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000000,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000001,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000002,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000003,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000004,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000005,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000006,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000007,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000008,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000009,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000000a,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x0000000b,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000000c,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x0000000d,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000000e,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x0000000f,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000010,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000011,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000012,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000013,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000014,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000015,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000016,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000017,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000018,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000019,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000001a,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x0000001b,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000001c,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x0000001d,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000001e,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x0000001f,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000020,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x000000d0,0xf7f62090, 0x00000002,0xf7f62094, 0x000000e0,0xf7f62098, 0x00000001,0xf7f6209c, + 0x00000050,0xf7f63018, 0x00000000,0xf7f631fc, 0x000000e0,0xf7f63180, 0x00000001,0xf7f63184, + 0x000000d0,0xf7f63188, 0x00000002,0xf7f6318c, 0x000000e0,0xf7f63190, 0x00000001,0xf7f63194, + 0x000000d0,0xf7f63198, 0x00000002,0xf7f6319c, 0x00000000,0xf7f631ec, 0x00000000,0xf7f631c0, + 0x00000000,0xf7f631c4, 0x00000010,0xf7f631c8, 0x00000000,0xf7f631b0, 0x00000000,0xf7f631b4, + 0x00000010,0xf7f631b8, 0x00000040,0xf7f630ac, 0x000000c2,0xf7f631f0, 0x00000000,0xf7f631e0, + 0x00000000,0xf7f631d8, 0x00000000,0xf7f631dc, 0x00000001,0xf7f63288, 0x000000d0,0xf7f63090, + 0x00000002,0xf7f63094, 0x000000e0,0xf7f63098, 0x00000001,0xf7f6309c, + 0xd0000000,0xf7f65080, + 0x00000000,0xf7f65084, 0x000000d0,0xf7f65088, 0x00000002,0xf7f6508c, 0x00000000,0xf7f65090, + 0x00000000,0xf7f65094, 0x000000e0,0xf7f65098, 0x00000001,0xf7f6509c, 0x00000000,0xf7f650a0, + 0x00000000,0xf7f650a4, 0x000000d0,0xf7f650a8, 0x00000002,0xf7f650ac, 0x00000000,0xf7f650b0, + 0x00000000,0xf7f650b4, 0x000000e0,0xf7f650b8, 0x00000001,0xf7f650bc, 0x00000000,0xf7f650c0, + 0x00000000,0xf7f650c4, 0x000000d0,0xf7f650c8, 0x00000002,0xf7f650cc, 0x00000000,0xf7f650d0, + 0x00000000,0xf7f650d4, 0x000000e0,0xf7f650d8, 0x00000001,0xf7f650dc, 0x00000000,0xf7f651a0, + 0x00000000,0xf7f651a4, 0x000000d0,0xf7f651a8, 0x00000002,0xf7f651ac, 0x00000000,0xf7f651b0, + 0x00000000,0xf7f651b4, 0x000000e0,0xf7f651b8, 0x00000001,0xf7f651bc, 0x00000001,0xf7f70420, +}; +static unsigned z1_bcm_cmd_0_len = sizeof(z1_bcm_cmd_0); + +static const unsigned z1_bcm_cmd_a[] = +{ + 0x00000000,0xf7f653d0, 0x00000000,0xf7f653d4, 0x00000000,0xf7f653d8, 0x000000ff,0xf7f65404, + 0x000000ff,0xf7f67828, +}; +static unsigned z1_bcm_cmd_a_len = sizeof(z1_bcm_cmd_a); + +static const unsigned z1_bcm_cmd_n[] = +{ + 0x00000001,0xf7f70420, +}; +static unsigned z1_bcm_cmd_n_len = sizeof(z1_bcm_cmd_n); + +static const unsigned z1_bcm_cmd_z[] = +{ + 0x00000000,0xf7f65010, 0x00000000,0xf7f65014, 0x00000000,0xf7f65018, 0x00000000,0xf7f6501c, + 0x00000000,0xf7f65030, 0x00000000,0xf7f65034, 0x00000007,0xf7f65038, 0x00000000,0xf7f6503c, + 0x00000000,0xf7f65040, 0x00000000,0xf7f65044, 0x00000000,0xf7f65048, 0x00000000,0xf7f6504c, + 0x00000000,0xf7f65050, 0x00000000,0xf7f65054, 0x00000000,0xf7f65058, 0x00000000,0xf7f6505c, + 0x000000cf,0xf7f65448, 0x00000002,0xf7f6544c, 0x00000000,0xf7f65458, 0x00000000,0xf7f6545c, + 0x00000000,0xf7f65460, 0x00000000,0xf7f65464, 0x00000000,0xf7f65468, 0x00000000,0xf7f6546c, + 0x00000000,0xf7f65470, 0x00000000,0xf7f65474, 0x00000000,0xf7f65478, 0x00000000,0xf7f6547c, + 0x00000000,0xf7f65480, 0x00000000,0xf7f65484, 0x00000000,0xf7f65488, 0x00000000,0xf7f6548c, + 0x00000000,0xf7f65490, 0x00000000,0xf7f65494, 0x00000000,0xf7f65498, 0x00000000,0xf7f6549c, + 0x00000000,0xf7f654a0, 0x00000002,0xf7f654a4, 0x00000001,0xf7f65440, 0x00000000,0xf7f65060, + 0x00000000,0xf7f65064, 0x00000000,0xf7f65068, 0x00000000,0xf7f6506c, 0x00000000,0xf7f65070, + 0x00000000,0xf7f65074, 0x00000000,0xf7f65078, 0x00000000,0xf7f6507c, 0x00000000,0xf7f65180, + 0x00000000,0xf7f65184, 0x00000000,0xf7f65188, 0x00000000,0xf7f6518c, 0x00000000,0xf7f65190, + 0x00000000,0xf7f65194, 0x00000000,0xf7f65198, 0x00000000,0xf7f6519c, +}; +static unsigned z1_bcm_cmd_z_len = sizeof(z1_bcm_cmd_z); +static unsigned z1_bcmQ_len = ((sizeof(z1_bcm_cmd_0)+63)&~63); + +static unsigned z1_logo_frame_dma_cmd[] = +{ + 0x00000000,0xf7f50d08, + 0x11000000,0xf7f50d00, 0x21e005a0,0xf7f50d04, 0x000005a0,0xf7f50d10, + 0x00000001,0xf7f50d08, +}; +static unsigned z1_logo_dma_cmd_len = sizeof(z1_logo_frame_dma_cmd); diff --git a/arch/arm/mach-berlin/modules/fastlogo/THINVPP/include/bcm_cmds_cdp_a0.h b/arch/arm/mach-berlin/modules/fastlogo/THINVPP/include/bcm_cmds_cdp_a0.h new file mode 100644 index 00000000..f8ac9066 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo/THINVPP/include/bcm_cmds_cdp_a0.h @@ -0,0 +1,538 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + +static unsigned a0_bcm_cmd_0[] = +{ +/* 1*/ 0x00000015,0xf7f70000, 0x0000000c,0xf7f65010, 0x00000002,0xf7f65014, 0x00000059,0xf7f65018, + 0x00000003,0xf7f6501c, 0x000000e0,0xf7f65030, 0x00000002,0xf7f65034, 0x000000e7,0xf7f65038, + 0x00000001,0xf7f6503c, 0x0000001e,0xf7f65040, 0x00000003,0xf7f65044, 0x000000e0,0xf7f65048, + 0x00000002,0xf7f6504c, 0x000000ef,0xf7f65050, 0x00000001,0xf7f65054, 0x000000e9,0xf7f65058, + 0x00000001,0xf7f6505c, 0x000000cf,0xf7f65448, 0x00000002,0xf7f6544c, 0x000000e3,0xf7f65458, + 0x00000002,0xf7f6545c, 0x000000f3,0xf7f65460, 0x00000000,0xf7f65464, 0x000000f6,0xf7f65468, + 0x00000000,0xf7f6546c, 0x000000f3,0xf7f65470, 0x00000000,0xf7f65474, 0x00000021,0xf7f65478, + 0x00000003,0xf7f6547c, 0x000000e3,0xf7f65480, 0x00000002,0xf7f65484, 0x000000e3,0xf7f65488, + 0x00000002,0xf7f6548c, 0x00000036,0xf7f65490, 0x00000001,0xf7f65494, 0x00000000,0xf7f65498, + 0x00000000,0xf7f6549c, 0x00000000,0xf7f654a0, 0x00000002,0xf7f654a4, 0x00000001,0xf7f65440, + 0x00000000,0xf7f65060, 0x00000000,0xf7f65064, 0x000000d0,0xf7f65068, 0x00000002,0xf7f6506c, + 0x00000000,0xf7f65070, 0x00000000,0xf7f65074, 0x000000e0,0xf7f65078, 0x00000001,0xf7f6507c, + 0x00000000,0xf7f65180, 0x00000000,0xf7f65184, 0x000000d0,0xf7f65188, 0x00000002,0xf7f6518c, + 0x00000000,0xf7f65190, 0x00000000,0xf7f65194, 0x000000e0,0xf7f65198, 0x00000001,0xf7f6519c, + 0x00000080,0xf7f66000, 0x00000000,0xf7f66004, 0x00000001,0xf7f66010, 0x00000000,0xf7f6600c, + 0x80000000,0xf7f653d0, 0x00000000,0xf7f653d4, 0x00000000,0xf7f653d8, 0x00000020,0xf7f65404, + 0x00000020,0xf7f67828, 0x00000000,0xf7f7041c, 0x00000000,0xf7f72c64, + 0x90000000,0xf7f70414, 0x00b40000,0xf7f70418, + 0xa0000000,0xf7f72c08, 0x000000ef,0xf7f72c10, 0x000002e5,0xf7f72c0c, + 0x000001e9,0xf7f72c18, 0x000001e9,0xf7f72c14, 0x00000001,0xf7f72c04, + 0x02e401ea,0xf7f700e0, 0x000702d8,0xf7f700e8, 0x000201e3,0xf7f700f4, + 0xb0000000,0xf7f70098, 0x00054600,0xf7f7009c, + 0xc0000000,0xf7f700ac, 0x00022595,0xf7f700b0, 0x00000050,0xf7f62018, 0x00000000,0xf7f621fc, + 0x00000000,0xf7f700cc, 0x000000e0,0xf7f62180, 0x00000001,0xf7f62184, 0x000000d0,0xf7f62188, + 0x00000002,0xf7f6218c, 0x000000e0,0xf7f62190, 0x00000001,0xf7f62194, 0x000000d0,0xf7f62198, + 0x00000002,0xf7f6219c, 0x00000000,0xf7f621ec, 0x00000000,0xf7f621c0, 0x00000000,0xf7f621c4, + 0x00000010,0xf7f621c8, 0x00000000,0xf7f621b0, 0x00000000,0xf7f621b4, 0x00000010,0xf7f621b8, + 0x00000040,0xf7f620ac, 0x000000c2,0xf7f621f0, 0x00000000,0xf7f621e0, 0x00000000,0xf7f621d8, + 0x00000000,0xf7f621dc, 0x00000050,0xf7f70084, 0x0000000b,0xf7f621e8, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000040,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000041,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000042,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000043,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000044,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000045,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000046,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000047,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000048,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000049,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000004a,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x0000004b,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000004c,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x0000004d,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000004e,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x0000004f,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000050,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000051,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000052,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000053,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000054,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000055,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000056,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000057,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000058,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000059,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000005a,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x0000005b,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000005c,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x0000005d,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000005e,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x0000005f,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000060,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x0000000b,0xf7f621e4, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000000,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000001,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000002,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000003,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000004,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000005,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000006,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000007,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000008,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000009,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000000a,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x0000000b,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000000c,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x0000000d,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000000e,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x0000000f,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000010,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000011,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000012,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000013,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000014,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000015,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000016,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000017,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000018,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000019,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000001a,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x0000001b,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000001c,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x0000001d,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000001e,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x0000001f,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000020,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x000000d0,0xf7f62090, 0x00000002,0xf7f62094, 0x000000e0,0xf7f62098, 0x00000001,0xf7f6209c, + 0x00000050,0xf7f63018, 0x00000000,0xf7f631fc, 0x000000e0,0xf7f63180, 0x00000001,0xf7f63184, + 0x000000d0,0xf7f63188, 0x00000002,0xf7f6318c, 0x000000e0,0xf7f63190, 0x00000001,0xf7f63194, + 0x000000d0,0xf7f63198, 0x00000002,0xf7f6319c, 0x00000000,0xf7f631ec, 0x00000000,0xf7f631c0, + 0x00000000,0xf7f631c4, 0x00000010,0xf7f631c8, 0x00000000,0xf7f631b0, 0x00000000,0xf7f631b4, + 0x00000010,0xf7f631b8, 0x00000040,0xf7f630ac, 0x000000c2,0xf7f631f0, 0x00000000,0xf7f631e0, + 0x00000000,0xf7f631d8, 0x00000000,0xf7f631dc, 0x00000001,0xf7f63288, 0x000000d0,0xf7f63090, + 0x00000002,0xf7f63094, 0x000000e0,0xf7f63098, 0x00000001,0xf7f6309c, + 0xd0000000,0xf7f65080, + 0x00000000,0xf7f65084, 0x000000d0,0xf7f65088, 0x00000002,0xf7f6508c, 0x00000000,0xf7f65090, + 0x00000000,0xf7f65094, 0x000000e0,0xf7f65098, 0x00000001,0xf7f6509c, 0x00000000,0xf7f650a0, + 0x00000000,0xf7f650a4, 0x000000d0,0xf7f650a8, 0x00000002,0xf7f650ac, 0x00000000,0xf7f650b0, + 0x00000000,0xf7f650b4, 0x000000e0,0xf7f650b8, 0x00000001,0xf7f650bc, 0x00000000,0xf7f650c0, + 0x00000000,0xf7f650c4, 0x000000d0,0xf7f650c8, 0x00000002,0xf7f650cc, 0x00000000,0xf7f650d0, + 0x00000000,0xf7f650d4, 0x000000e0,0xf7f650d8, 0x00000001,0xf7f650dc, 0x00000000,0xf7f651a0, + 0x00000000,0xf7f651a4, 0x000000d0,0xf7f651a8, 0x00000002,0xf7f651ac, 0x00000000,0xf7f651b0, + 0x00000000,0xf7f651b4, 0x000000e0,0xf7f651b8, 0x00000001,0xf7f651bc, 0x00000001,0xf7f70420, +}; +static unsigned a0_bcm_cmd_0_len = sizeof(a0_bcm_cmd_0); + +static const unsigned a0_bcm_cmd_a[] = +{ + 0x00000000,0xf7f653d0, 0x00000000,0xf7f653d4, 0x00000000,0xf7f653d8, 0x000000ff,0xf7f65404, + 0x000000ff,0xf7f67828, +}; +static unsigned a0_bcm_cmd_a_len = sizeof(a0_bcm_cmd_a); + +static const unsigned a0_bcm_cmd_n[] = +{ + 0x00000001,0xf7f70420, +}; +static unsigned a0_bcm_cmd_n_len = sizeof(a0_bcm_cmd_n); + +static const unsigned a0_bcm_cmd_z[] = +{ + 0x00000000,0xf7f65010, 0x00000000,0xf7f65014, 0x00000000,0xf7f65018, 0x00000000,0xf7f6501c, + 0x00000000,0xf7f65030, 0x00000000,0xf7f65034, 0x00000007,0xf7f65038, 0x00000000,0xf7f6503c, + 0x00000000,0xf7f65040, 0x00000000,0xf7f65044, 0x00000000,0xf7f65048, 0x00000000,0xf7f6504c, + 0x00000000,0xf7f65050, 0x00000000,0xf7f65054, 0x00000000,0xf7f65058, 0x00000000,0xf7f6505c, + 0x000000cf,0xf7f65448, 0x00000002,0xf7f6544c, 0x00000000,0xf7f65458, 0x00000000,0xf7f6545c, + 0x00000000,0xf7f65460, 0x00000000,0xf7f65464, 0x00000000,0xf7f65468, 0x00000000,0xf7f6546c, + 0x00000000,0xf7f65470, 0x00000000,0xf7f65474, 0x00000000,0xf7f65478, 0x00000000,0xf7f6547c, + 0x00000000,0xf7f65480, 0x00000000,0xf7f65484, 0x00000000,0xf7f65488, 0x00000000,0xf7f6548c, + 0x00000000,0xf7f65490, 0x00000000,0xf7f65494, 0x00000000,0xf7f65498, 0x00000000,0xf7f6549c, + 0x00000000,0xf7f654a0, 0x00000002,0xf7f654a4, 0x00000001,0xf7f65440, 0x00000000,0xf7f65060, + 0x00000000,0xf7f65064, 0x00000000,0xf7f65068, 0x00000000,0xf7f6506c, 0x00000000,0xf7f65070, + 0x00000000,0xf7f65074, 0x00000000,0xf7f65078, 0x00000000,0xf7f6507c, 0x00000000,0xf7f65180, + 0x00000000,0xf7f65184, 0x00000000,0xf7f65188, 0x00000000,0xf7f6518c, 0x00000000,0xf7f65190, + 0x00000000,0xf7f65194, 0x00000000,0xf7f65198, 0x00000000,0xf7f6519c, +}; +static unsigned a0_bcm_cmd_z_len = sizeof(a0_bcm_cmd_z); +static unsigned a0_bcmQ_len = ((sizeof(a0_bcm_cmd_0)+63)&~63); + +static unsigned a0_logo_frame_dma_cmd[] = +{ + 0x00000000,0xf7f50d08, + 0x11000000,0xf7f50d00, 0x21e005a0,0xf7f50d04, 0x000005a0,0xf7f50d10, + 0x00000001,0xf7f50d08, +}; +static unsigned a0_logo_dma_cmd_len = sizeof(a0_logo_frame_dma_cmd); diff --git a/arch/arm/mach-berlin/modules/fastlogo/THINVPP/include/thinvpp_api.h b/arch/arm/mach-berlin/modules/fastlogo/THINVPP/include/thinvpp_api.h index 9f7d0929..a9453e44 100755 --- a/arch/arm/mach-berlin/modules/fastlogo/THINVPP/include/thinvpp_api.h +++ b/arch/arm/mach-berlin/modules/fastlogo/THINVPP/include/thinvpp_api.h @@ -1892,45 +1892,6 @@ typedef struct VPP_SCL_CTRL_PARAM_T VPP_SCL_CTRL SclCtrl; }VPP_SCL_CTRL_PARAM; -typedef struct -{ - unsigned planes; - int vres; - VPP_WIN win; - unsigned *logoBuf; - unsigned *logoBuf_2; - unsigned *mapaddr; - long length; - unsigned count; - - const unsigned *bcm_cmd_0; - unsigned bcm_cmd_0_len; - const unsigned *bcm_cmd_a; - unsigned bcm_cmd_a_len; - const unsigned *bcm_cmd_n; - unsigned bcm_cmd_n_len; - const unsigned *bcm_cmd_z; - unsigned bcm_cmd_z_len; - - unsigned *logo_frame_dma_cmd; - unsigned logo_dma_cmd_len; - - unsigned bcmQ_len; - unsigned dmaQ_len; - unsigned cfgQ_len; - -#if LOGO_USE_SHM - size_t mSHMOffset; - unsigned mSHMSize; - char * bcmQ; - unsigned bcmQ_phys; - char * dmaQ; - unsigned dmaQ_phys; - char * cfgQ; - unsigned cfgQ_phys; -#endif -} logo_device_t; - /************* VPP module external APIs *****************/ /*********************************************** @@ -1942,7 +1903,8 @@ typedef struct * MV_THINVPP_ENODEV - no device * MV_THINVPP_ENOMEM - no memory ***********************************************/ -int MV_THINVPP_Create(int base_addr); +//int MV_THINVPP_Create(int base_addr); +int MV_THINVPP_Create(void); /*********************************************** * FUNCTION: destroy a VPP object diff --git a/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/MISC/source/thinvpp_bcmbuf.c b/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/MISC/source/thinvpp_bcmbuf.c index 2c5c2874..13ab5173 100755 --- a/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/MISC/source/thinvpp_bcmbuf.c +++ b/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/MISC/source/thinvpp_bcmbuf.c @@ -18,9 +18,8 @@ #define _THINVPP_BCMBUF_C -#include "thinvpp_module.h" -#include "thinvpp_common.h" -#include "Galois_memmap.h" +#include "fastlogo.h" +#include "galois_io.h" #include "avio.h" #include "galois_io.h" #include "maddr.h" @@ -31,6 +30,7 @@ #include #include +#if !LOGO_USE_SHM static void inner_outer_flush_dcache_area(void *addr, size_t length) { phys_addr_t start, end; @@ -40,8 +40,10 @@ static void inner_outer_flush_dcache_area(void *addr, size_t length) start = virt_to_phys(addr); end = start + length; - outer_cache.flush_range(start, end); + // USE formal way + outer_clean_range(start, end); } +#endif /*************************************************************** * FUNCTION: allocate register programming buffer @@ -127,7 +129,9 @@ int THINVPP_BCMBUF_Reset(BCMBUF *pbcmbuf) /*set pointers to the head*/ pbcmbuf->writer = pbcmbuf->head; pbcmbuf->dv1_head = pbcmbuf->head; - //pbcmbuf->dv3_head = pbcmbuf->dv1_head + (pbcmbuf->size/16)*3; +#if !LOGO_USE_SHM + pbcmbuf->dv3_head = pbcmbuf->dv1_head + (pbcmbuf->size/16)*3; +#endif pbcmbuf->subID = -1; /* total */ return MV_THINVPP_OK; @@ -143,10 +147,12 @@ void THINVPP_BCMBUF_Select(BCMBUF *pbcmbuf, int subID) /* reset read/write pointer of the buffer */ if (subID == CPCB_1){ pbcmbuf->writer = pbcmbuf->dv1_head; - //} else if (subID == CPCB_3) { - //pbcmbuf->writer = pbcmbuf->dv3_head; - //} else { - //pbcmbuf->writer = pbcmbuf->head; +#if !LOGO_USE_SHM + } else if (subID == CPCB_3) { + pbcmbuf->writer = pbcmbuf->dv3_head; + } else { + pbcmbuf->writer = pbcmbuf->head; +#endif } pbcmbuf->subID = subID; @@ -283,10 +289,10 @@ int THINVPP_BCMDHUB_CFGQ_Commit(DHUB_CFGQ *cfgQ, int cpcbID) } #if LOGO_USE_SHM - dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), avioDhubChMap_vpp_BCM_R, cfgQ->phys, (int)cfgQ->len*8, 0, 0, 0, 1, bcm_sched_cmd); + dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), soc->avioDhubChMap_vpp_BCM_R, cfgQ->phys, (int)cfgQ->len*8, 0, 0, 0, 1, bcm_sched_cmd); #else inner_outer_flush_dcache_area(cfgQ->addr, cfgQ->len*8); - dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), avioDhubChMap_vpp_BCM_R, (int)virt_to_phys(cfgQ->addr), (int)cfgQ->len*8, 0, 0, 0, 1, bcm_sched_cmd); + dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), soc->avioDhubChMap_vpp_BCM_R, (int)virt_to_phys(cfgQ->addr), (int)cfgQ->len*8, 0, 0, 0, 1, bcm_sched_cmd); #endif while( !BCM_SCHED_PushCmd(sched_qid, bcm_sched_cmd, NULL)); @@ -322,10 +328,10 @@ int THINVPP_BCMBUF_To_CFGQ(BCMBUF *pbcmbuf, DHUB_CFGQ *cfgQ) return MV_THINVPP_EBADPARAM; #if LOGO_USE_SHM - dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), avioDhubChMap_vpp_BCM_R, pbcmbuf->phys, size, 0, 0, 0, 1, bcm_sched_cmd); + dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), soc->avioDhubChMap_vpp_BCM_R, pbcmbuf->phys, size, 0, 0, 0, 1, bcm_sched_cmd); #else inner_outer_flush_dcache_area(start, size); - dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), avioDhubChMap_vpp_BCM_R, (int)virt_to_phys(start), size, 0, 0, 0, 1, bcm_sched_cmd); + dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), soc->avioDhubChMap_vpp_BCM_R, (int)virt_to_phys(start), size, 0, 0, 0, 1, bcm_sched_cmd); #endif while( !BCM_SCHED_PushCmd(BCM_SCHED_Q13, bcm_sched_cmd, cfgQ->addr + cfgQ->len*2)); cfgQ->len += 2; @@ -347,10 +353,10 @@ void THINVPP_CFGQ_To_CFGQ(DHUB_CFGQ *src_cfgQ, DHUB_CFGQ *cfgQ) return; #if LOGO_USE_SHM - dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), avioDhubChMap_vpp_BCM_R, src_cfgQ->phys, (int)src_cfgQ->len*8, 0, 0, 0, 1, bcm_sched_cmd); + dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), soc->avioDhubChMap_vpp_BCM_R, src_cfgQ->phys, (int)src_cfgQ->len*8, 0, 0, 0, 1, bcm_sched_cmd); #else inner_outer_flush_dcache_area(src_cfgQ->addr, src_cfgQ->len*8); - dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), avioDhubChMap_vpp_BCM_R, (int)virt_to_phys(src_cfgQ->addr), (int)src_cfgQ->len*8, 0, 0, 0, 1, bcm_sched_cmd); + dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), soc->avioDhubChMap_vpp_BCM_R, (int)virt_to_phys(src_cfgQ->addr), (int)src_cfgQ->len*8, 0, 0, 0, 1, bcm_sched_cmd); #endif while( !BCM_SCHED_PushCmd(BCM_SCHED_Q13, bcm_sched_cmd, cfgQ->addr + cfgQ->len*2)); cfgQ->len += 2; diff --git a/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/include/thinvpp_common.h b/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/include/thinvpp_common.h index a268109c..6212b286 100755 --- a/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/include/thinvpp_common.h +++ b/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/include/thinvpp_common.h @@ -38,15 +38,11 @@ /* BCM buffer size */ /* DV1_BCM_BUFFER_SIZE + DV2_BCM_BUFFER_SIZE + DV3_BCM_BUFFER_SIZE = BCM_BUFFER_SIZE */ -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) -#define BCM_BUFFER_SIZE 0xA000//20480 -#else //(BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) #define BCM_BUFFER_SIZE 0x17700 //96000 #define DV1_BCM_BUFFER_SIZE 0x7d00 //32000 #define DV2_BCM_BUFFER_SIZE 0x7d00 //32000 #define DV3_BCM_BUFFER_SIZE 0x7d00 //32000 #define VDE_BCM_BUFFER_SIZE 0x800 -#endif //(BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) /* 3D De-interlacer field buffer size */ #define DEINT_BUFFER_SIZE (1920*1081*26*3/8) // 6 1080I frame (26-bit per pixel) @@ -74,11 +70,7 @@ #define TT_DATA_QUEUE_SIZE (TT_DATA_LEN_PER_FRAME * 10) /* DMA command buffer size */ -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) -#define DMA_CMD_BUFFER_SIZE (20 * 8) -#else //(BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) #define DMA_CMD_BUFFER_SIZE (100 * 8) -#endif //(BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) /* Hardware interface constants */ diff --git a/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/include/thinvpp_module.h b/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/include/thinvpp_module.h index be1c653f..e68e6d02 100755 --- a/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/include/thinvpp_module.h +++ b/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/include/thinvpp_module.h @@ -241,11 +241,8 @@ typedef struct THINVPP_OBJ_T { unsigned int base_addr; // VPP object hardware base address HDL_semaphore *pSemHandle; // semaphore handler of CPCB semaphores -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) - int dhub_cmdQ[avioDhubChMap_vpp_TT_R]; -#else //(BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) - UINT32 dhub_cmdQ[avioDhubChMap_vpp_SPDIF_W]; -#endif //(BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) + //int dhub_cmdQ[(VPP_NUM_OF_CHANNELS - 1)]; + int dhub_cmdQ[(VPP_NUM_OF_CHANNELS_Z1>VPP_NUM_OF_CHANNELS_A0? VPP_NUM_OF_CHANNELS_Z1: VPP_NUM_OF_CHANNELS_A0) - 1]; int hdmi_mute; BCMBUF vbi_bcm_buf[2]; diff --git a/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/thinvpp_api.c b/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/thinvpp_api.c index 46670ac5..3166ef10 100755 --- a/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/thinvpp_api.c +++ b/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/thinvpp_api.c @@ -21,11 +21,8 @@ #define _THINVPP_API_C_ #include "Galois_memmap.h" -#include "galois_io.h" -#include "thinvpp_module.h" -#include "thinvpp_apifuncs.h" -#include "thinvpp_isr.h" +#include "fastlogo.h" #include #include @@ -37,8 +34,6 @@ #define bTST(x, b) (((x) >> (b)) & 1) -extern logo_device_t fastlogo_ctx; - void VPP_dhub_sem_clear(void) { int instat; @@ -59,7 +54,7 @@ void VPP_dhub_sem_clear(void) } - dhubID = avioDhubChMap_vpp_BCM_R; + dhubID = soc->avioDhubChMap_vpp_BCM_R; pDhubHandle = &VPP_dhubHandle; /* clear BCM interrupt */ @@ -82,7 +77,8 @@ void VPP_dhub_sem_clear(void) * RETURN: MV_THINVPP_OK - succeed * MV_THINVPP_EUNCONFIG - not initialized ***********************************************/ -int MV_THINVPP_Create(int base_addr) +//int MV_THINVPP_Create(int base_addr) +int MV_THINVPP_Create(void) { if (!(thinvpp_obj = (THINVPP_OBJ *)THINVPP_MALLOC(sizeof(THINVPP_OBJ)))){ return (MV_THINVPP_ENOMEM); @@ -90,13 +86,15 @@ int MV_THINVPP_Create(int base_addr) THINVPP_MEMSET(thinvpp_obj, 0, sizeof(THINVPP_OBJ)); - thinvpp_obj->base_addr = base_addr; + thinvpp_obj->base_addr = MEMMAP_VPP_REG_BASE; #if LOGO_USE_SHM // do no need double buffers for dhub queues THINVPP_BCMBUF_Set(&(thinvpp_obj->vbi_bcm_buf[0]), fastlogo_ctx.bcmQ, fastlogo_ctx.bcmQ_phys, fastlogo_ctx.bcmQ_len); THINVPP_CFGQ_Set(&(thinvpp_obj->dv[CPCB_1].vbi_dma_cfgQ[0]), fastlogo_ctx.dmaQ, fastlogo_ctx.dmaQ_phys, fastlogo_ctx.dmaQ_len); THINVPP_CFGQ_Set(&(thinvpp_obj->dv[CPCB_1].vbi_bcm_cfgQ[0]), fastlogo_ctx.cfgQ, fastlogo_ctx.cfgQ_phys, fastlogo_ctx.cfgQ_len); + + return (MV_THINVPP_OK); #else if (THINVPP_BCMBUF_Create(&(thinvpp_obj->vbi_bcm_buf[0]), BCM_BUFFER_SIZE) != MV_THINVPP_OK){ goto nomem_exit; @@ -119,7 +117,6 @@ int MV_THINVPP_Create(int base_addr) if (THINVPP_CFGQ_Create(&(thinvpp_obj->dv[CPCB_1].vbi_bcm_cfgQ[1]), DMA_CMD_BUFFER_SIZE) != MV_THINVPP_OK) { goto nomem_exit; } -#endif return (MV_THINVPP_OK); @@ -141,6 +138,7 @@ int MV_THINVPP_Create(int base_addr) THINVPP_FREE(thinvpp_obj); return (MV_THINVPP_ENOMEM); +#endif } /*********************************************** @@ -235,7 +233,6 @@ int MV_THINVPP_Reset(void) thinvpp_obj->hdmi_mute = 0; #if !LOGO_USE_SHM - // do no need double buffers for dhub queues THINVPP_BCMBUF_Reset(&thinvpp_obj->vbi_bcm_buf[1]); #endif thinvpp_obj->pVbiBcmBufCpcb[CPCB_1] = &(thinvpp_obj->vbi_bcm_buf[0]); @@ -244,11 +241,7 @@ int MV_THINVPP_Reset(void) thinvpp_obj->dv[CPCB_1].curr_cpcb_vbi_bcm_cfgQ = &(thinvpp_obj->dv[CPCB_1].vbi_bcm_cfgQ[0]); /* reset dHub cmdQ */ -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) - for (i = 0; i < avioDhubChMap_vpp_TT_R; i++) -#else /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ - for (i = 0; i < avioDhubChMap_vpp_SPDIF_W; i++) -#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ + for (i = 0; i < (soc->VPP_NUM_OF_CHANNELS - 1); i++) thinvpp_obj->dhub_cmdQ[i] = 0; /* select BCM sub-buffer to dump register settings */ @@ -474,7 +467,6 @@ int MV_THINVPP_OpenDispWindow(int planeID, VPP_WIN *win, VPP_WIN_ATTR *attr) volatile int stop_flag=0; int MV_THINVPP_CloseDispWindow(void) { - int n; if (!thinvpp_obj) return (MV_THINVPP_ENODEV); @@ -486,7 +478,6 @@ extern int curr_logo_tp_count; int MV_THINVPP_Stop(void) { - int n; if (!thinvpp_obj) return (MV_THINVPP_ENODEV); diff --git a/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/thinvpp_apifuncs.c b/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/thinvpp_apifuncs.c index 172749b4..ab452c30 100755 --- a/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/thinvpp_apifuncs.c +++ b/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/thinvpp_apifuncs.c @@ -20,8 +20,7 @@ #define _VPP_APIFUNCS_C_ -#include "thinvpp_module.h" -#include "thinvpp_apifuncs.h" +#include "fastlogo.h" /******************************************************************* * FUNCTION: set CPCB(for Berlin) or DV(for Galois) output resolution diff --git a/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/thinvpp_isr.c b/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/thinvpp_isr.c index a3c7b201..9bf14f4f 100755 --- a/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/thinvpp_isr.c +++ b/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/thinvpp_isr.c @@ -21,9 +21,7 @@ #define _VPP_ISR_C_ #include "linux/sched.h" // for cpu_clock() -#include "thinvpp_module.h" -#include "thinvpp_apifuncs.h" -#include "thinvpp_isr.h" +#include "fastlogo.h" #include "vpp.h" #include "maddr.h" @@ -31,8 +29,6 @@ #include "api_avio_dhub.h" #include "avioDhub.h" -extern logo_device_t fastlogo_ctx; - extern int stop_flag; extern int cpcb_start_flag; extern unsigned last_isr_interval; @@ -47,7 +43,7 @@ static void set_bcm_cmd_0(THINVPP_OBJ *vpp_obj, unsigned bytes) pbcmbuf->writer += (bytes/sizeof(*pbcmbuf->writer)); } #endif -static void set_bcm_cmd(THINVPP_OBJ *vpp_obj, unsigned * cmd, unsigned bytes) +static void set_bcm_cmd(THINVPP_OBJ *vpp_obj, const unsigned * cmd, unsigned bytes) { BCMBUF *pbcmbuf = vpp_obj->pVbiBcmBuf; @@ -302,7 +298,7 @@ static unsigned *m_FE_DLR_SetDummyTG(unsigned *Que, THINVPP_OBJ *vpp_obj, unsign { unsigned int RegAddr; - RegAddr = vpp_obj->base_addr + RA_Vpp_VP_TG; + RegAddr = vpp_obj->base_addr + soc->RA_Vpp_VP_TG; /*write TG size*/ *Que++ = ((VRes + VPP_FE_DUMMY_TG_SIZE_V_OFF_P) + ((HRes + VPP_FE_DUMMY_TG_SIZE_H_OFF_P) << 16)); @@ -329,20 +325,20 @@ static unsigned* m_UpdateVPSize(unsigned* Que, THINVPP_OBJ *vpp_obj, unsigned ih //THINVPP_BCMBUF_Write(vpp_obj->pVbiBcmBuf, vpp_obj->base_addr+RA_Vpp_vpIn_pix, TotalInpPix); *Que++ = TotalInpPix; - *Que++ = (vpp_obj->base_addr+RA_Vpp_vpIn_pix); + *Que++ = (vpp_obj->base_addr+soc->RA_Vpp_vpIn_pix); //THINVPP_BCMBUF_Write(vpp_obj->pVbiBcmBuf, vpp_obj->base_addr+RA_Vpp_vpOut_pix, TotalOutPix); *Que++ = TotalOutPix; - *Que++ = (vpp_obj->base_addr+RA_Vpp_vpOut_pix); + *Que++ = (vpp_obj->base_addr+soc->RA_Vpp_vpOut_pix); TotPixForWriteClient = (ivRes + 1) * ihRes; TotPixForReadClient = (TotPixForWriteClient * 26 + 63) / 64; //THINVPP_BCMBUF_Write(vpp_obj->pVbiBcmBuf, vpp_obj->base_addr+RA_Vpp_diW_pix, TotPixForWriteClient); *Que++ = TotPixForWriteClient; - *Que++ = (vpp_obj->base_addr+RA_Vpp_diW_pix); + *Que++ = (vpp_obj->base_addr+soc->RA_Vpp_diW_pix); //THINVPP_BCMBUF_Write(vpp_obj->pVbiBcmBuf, vpp_obj->base_addr+RA_Vpp_diR_word, TotPixForReadClient); *Que++ = TotPixForReadClient; - *Que++ = (vpp_obj->base_addr+RA_Vpp_diR_word); + *Que++ = (vpp_obj->base_addr+soc->RA_Vpp_diR_word); return Que; } diff --git a/arch/arm/mach-berlin/modules/fastlogo/fastlogo.h b/arch/arm/mach-berlin/modules/fastlogo/fastlogo.h new file mode 100644 index 00000000..82283106 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo/fastlogo.h @@ -0,0 +1,104 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + + +#ifndef _FASTLOGO_H_ +#define _FASTLOGO_H_ + +#include "Galois_memmap.h" + +#include "thinvpp_module.h" +#include "thinvpp_api.h" +#include "thinvpp_apifuncs.h" +#include "thinvpp_isr.h" + +#include "vpp.h" +#include "maddr.h" + +#include + +typedef struct +{ + //HDL_dhub2d AG_dhubHandle; + //HDL_dhub2d VPP_dhubHandle; + //HDL_dhub2d VIP_dhubHandle; + + unsigned VPP_NUM_OF_CHANNELS; + unsigned AG_NUM_OF_CHANNELS; + + //DHUB_channel_config *VIP_config; + DHUB_channel_config *VPP_config; + DHUB_channel_config *AG_config; + + unsigned avioDhubChMap_vpp_BCM_R; + unsigned RA_Vpp_VP_TG; + unsigned RA_Vpp_vpIn_pix; + unsigned RA_Vpp_vpOut_pix; + unsigned RA_Vpp_diW_pix; + unsigned RA_Vpp_diR_word; +} logo_soc_specific; + +typedef struct +{ + unsigned planes; + int vres; + VPP_WIN win; + unsigned *logoBuf; + unsigned *logoBuf_2; + unsigned *mapaddr; + long length; + unsigned count; + + const unsigned *bcm_cmd_0; + unsigned bcm_cmd_0_len; + const unsigned *bcm_cmd_a; + unsigned bcm_cmd_a_len; + const unsigned *bcm_cmd_n; + unsigned bcm_cmd_n_len; + const unsigned *bcm_cmd_z; + unsigned bcm_cmd_z_len; + + unsigned *logo_frame_dma_cmd; + unsigned logo_dma_cmd_len; + + unsigned bcmQ_len; + unsigned dmaQ_len; + unsigned cfgQ_len; + +#if LOGO_USE_SHM + size_t mSHMOffset; + unsigned mSHMSize; + char * bcmQ; + unsigned bcmQ_phys; + char * dmaQ; + unsigned dmaQ_phys; + char * cfgQ; + unsigned cfgQ_phys; +#endif + + unsigned berlin_chip_revision; +} logo_device_t; + + +extern logo_device_t fastlogo_ctx; +extern logo_soc_specific *soc; + +void fastlogo_soc_select(unsigned chip_revision); + +#endif diff --git a/arch/arm/mach-berlin/modules/fastlogo/fastlogo_driver.c b/arch/arm/mach-berlin/modules/fastlogo/fastlogo_driver.c index be8f1235..2a343f7c 100755 --- a/arch/arm/mach-berlin/modules/fastlogo/fastlogo_driver.c +++ b/arch/arm/mach-berlin/modules/fastlogo/fastlogo_driver.c @@ -16,16 +16,14 @@ * disclaimer. ********************************************************************************/ -// fastlogo options: -//#define LOGO_TIME_PROFILE 1 // use definition in Makefile -//#define LOGO_PROC_FS 1 // use definition in Makefile - #define _FASTLOGO_DRIVER_C_ #include #include #include #include +#include +#include #include #include #include @@ -41,13 +39,15 @@ #include #endif -#include "galois_io.h" -#include "thinvpp_api.h" -#include "thinvpp_isr.h" -#include "api_dhub.h" -#include "api_avio_dhub.h" -#include "Galois_memmap.h" +#include "fastlogo.h" + +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) +#include "bcm_cmds_cdp_a0.h" +#include "bcm_cmds_cdp.h" +#else #include "bcm_cmds.h" +#endif + #include "logo_data.h" #if LOGO_USE_SHM @@ -55,6 +55,10 @@ #include "shm_type.h" extern shm_device_t *shm_api_device_noncache; #endif + +#ifdef NR_IRQS +#undef NR_IRQS // "" will define NR_IRQS +#endif #include /******************************************************************************* @@ -89,8 +93,13 @@ void VPP_dhub_sem_clear(void); */ logo_device_t fastlogo_ctx; -int save_console_loglevel; // to restore console printk 91 static VBUF_INFO vbuf; +logo_soc_specific *soc; + +#define FASTLOGO_LIMIT_CONSOLE_PRINT 1 +#ifdef FASTLOGO_LIMIT_CONSOLE_PRINT #define LIMIT_CONSOLE_LOGLEVEL 4 // limit printk to KERN_EMERG, KERN_ALERT, KERN_CRIT and KERN_ERR +int save_console_loglevel; // to restore console printk 91 static VBUF_INFO vbuf; +#endif static VBUF_INFO vbuf; #if LOGO_TIME_PROFILE @@ -101,13 +110,20 @@ u64 lat2[LOGO_TP_MAX_COUNT]; volatile int logo_tp_count = 0; #endif +static int vpp_intr_vect= IRQ_DHUBINTRAVIO0; + +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) +#define IRQ_DHUBINTRAVIO0_CDP (0x41) +#endif + + #if LOGO_PROC_FS static int logo_device_show_stat(logo_device_t *Ctx, struct seq_file *file) { - int i, n, len; + int i, len; - if ((NULL == Ctx) || (NULL == file)) - return -EINVAL; + if ((NULL == Ctx) || (NULL == file)) + return -EINVAL; if (Ctx->planes & 1) len += seq_printf(file, "Plane MAIN is used\n"); @@ -117,11 +133,11 @@ static int logo_device_show_stat(logo_device_t *Ctx, struct seq_file *file) len += seq_printf(file, "Plane AUX is used\n"); len += seq_printf(file, "Vres : %d\nWidth x Height : %d x %d\n", Ctx->vres, Ctx->win.width, Ctx->win.height); - len += seq_printf(file, "logoBuf : 0x%p (0x%p)\n", Ctx->logoBuf_2, Ctx->mapaddr); - len += seq_printf(file, " display @(%d,%d) %dx%d\n", + len += seq_printf(file, "logoBuf : 0x%p (0x%p)\n", Ctx->logoBuf_2, Ctx->mapaddr); + len += seq_printf(file, " display @(%d,%d) %dx%d\n", vbuf.m_active_left, vbuf.m_active_top, vbuf.m_active_width, vbuf.m_active_height); - len += seq_printf(file, "Total count : %d\n", Ctx->count); + len += seq_printf(file, "Total count : %d\n", Ctx->count); #if LOGO_TIME_PROFILE // show profile len += seq_printf(file,"\n[profile] %d", logo_tp_count); @@ -136,17 +152,17 @@ static int logo_device_show_stat(logo_device_t *Ctx, struct seq_file *file) len += seq_printf(file,"\n"); - return len; + return len; } static struct proc_dir_entry *logo_driver_procdir; static int logo_stat_seq_show(struct seq_file *file, void *data) { - logo_device_t *Ctx = (logo_device_t *) data; - if (Ctx) - logo_device_show_stat(Ctx, file); + logo_device_t *Ctx = (logo_device_t *) data; + if (Ctx) + logo_device_show_stat(Ctx, file); - return 0; + return 0; } static void logo_stat_seq_stop(struct seq_file *file, void *data) @@ -155,37 +171,39 @@ static void logo_stat_seq_stop(struct seq_file *file, void *data) static void *logo_stat_seq_start(struct seq_file *file, loff_t * pos) { - if (*pos == 0) - return (void *)&fastlogo_ctx; - return NULL; + if (*pos == 0) + return (void *)&fastlogo_ctx; + return NULL; } static void *logo_stat_seq_next(struct seq_file *file, void *data, loff_t * pos) { - (*pos)++; - if (*pos == 0) - return (void *)&fastlogo_ctx; - return NULL; + (*pos)++; + if (*pos == 0) + return (void *)&fastlogo_ctx; + return NULL; } -static struct seq_operations logo_stat_seq_ops = { - .start = logo_stat_seq_start, - .next = logo_stat_seq_next, - .stop = logo_stat_seq_stop, - .show = logo_stat_seq_show +static struct seq_operations logo_stat_seq_ops = +{ + .start = logo_stat_seq_start, + .next = logo_stat_seq_next, + .stop = logo_stat_seq_stop, + .show = logo_stat_seq_show }; static int logo_stat_proc_open(struct inode *inode, struct file *file) { - return seq_open(file, &logo_stat_seq_ops); + return seq_open(file, &logo_stat_seq_ops); } -static struct file_operations logo_stat_file_ops = { - .owner = THIS_MODULE, - .open = logo_stat_proc_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release +static struct file_operations logo_stat_file_ops = +{ + .owner = THIS_MODULE, + .open = logo_stat_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release }; #endif //LOGO_PROC_FS @@ -231,10 +249,10 @@ static irqreturn_t fastlogo_devices_vpp_isr(int irq, void *dev_id) semaphore_pop(pSemHandle, avioDhubSemMap_vpp_vppCPCB0_intr, 1); semaphore_clr_full(pSemHandle, avioDhubSemMap_vpp_vppCPCB0_intr); - if(logo_isr_count > 1) - { - THINVPP_CPCB_ISR_service(thinvpp_obj, CPCB_1); - } + if(logo_isr_count > 1) + { + THINVPP_CPCB_ISR_service(thinvpp_obj, CPCB_1); + } } #if LOGO_TIME_PROFILE @@ -255,16 +273,35 @@ static int __init fastlogo_device_init(unsigned int cpu_id) logo_time_0 = cpu_clock(0); // init context - fastlogo_ctx.bcm_cmd_0 = bcm_cmd_0; - fastlogo_ctx.bcm_cmd_0_len = bcm_cmd_0_len; - fastlogo_ctx.bcm_cmd_a = bcm_cmd_a; - fastlogo_ctx.bcm_cmd_a_len = bcm_cmd_a_len; - fastlogo_ctx.bcm_cmd_n = bcm_cmd_n; - fastlogo_ctx.bcm_cmd_n_len = bcm_cmd_n_len; - fastlogo_ctx.bcm_cmd_z = bcm_cmd_z; - fastlogo_ctx.bcm_cmd_z_len = bcm_cmd_z_len; - - fastlogo_ctx.bcmQ_len = bcmQ_len; + if (fastlogo_ctx.berlin_chip_revision >= 0xA0) /* CDP A0 */ + { + fastlogo_ctx.bcm_cmd_0 = a0_bcm_cmd_0; + fastlogo_ctx.bcm_cmd_0_len = a0_bcm_cmd_0_len; + fastlogo_ctx.bcm_cmd_a = a0_bcm_cmd_a; + fastlogo_ctx.bcm_cmd_a_len = a0_bcm_cmd_a_len; + fastlogo_ctx.bcm_cmd_n = a0_bcm_cmd_n; + fastlogo_ctx.bcm_cmd_n_len = a0_bcm_cmd_n_len; + fastlogo_ctx.bcm_cmd_z = a0_bcm_cmd_z; + fastlogo_ctx.bcm_cmd_z_len = a0_bcm_cmd_z_len; + fastlogo_ctx.bcmQ_len = a0_bcmQ_len; + fastlogo_ctx.logo_dma_cmd_len = a0_logo_dma_cmd_len; + fastlogo_ctx.logo_frame_dma_cmd = a0_logo_frame_dma_cmd; + } + else + { + fastlogo_ctx.bcm_cmd_0 = z1_bcm_cmd_0; + fastlogo_ctx.bcm_cmd_0_len = z1_bcm_cmd_0_len; + fastlogo_ctx.bcm_cmd_a = z1_bcm_cmd_a; + fastlogo_ctx.bcm_cmd_a_len = z1_bcm_cmd_a_len; + fastlogo_ctx.bcm_cmd_n = z1_bcm_cmd_n; + fastlogo_ctx.bcm_cmd_n_len = z1_bcm_cmd_n_len; + fastlogo_ctx.bcm_cmd_z = z1_bcm_cmd_z; + fastlogo_ctx.bcm_cmd_z_len = z1_bcm_cmd_z_len; + fastlogo_ctx.bcmQ_len = z1_bcmQ_len; + fastlogo_ctx.logo_dma_cmd_len = z1_logo_dma_cmd_len; + fastlogo_ctx.logo_frame_dma_cmd = z1_logo_frame_dma_cmd; + } + fastlogo_ctx.dmaQ_len = 8*8; fastlogo_ctx.cfgQ_len = 8*8; @@ -317,20 +354,18 @@ static int __init fastlogo_device_init(unsigned int cpu_id) fastlogo_ctx.cfgQ_phys = fastlogo_ctx.dmaQ_phys + fastlogo_ctx.dmaQ_len; // pre-load vpp commands - memcpy(fastlogo_ctx.bcmQ, bcm_cmd_0, bcm_cmd_0_len); + memcpy(fastlogo_ctx.bcmQ, fastlogo_ctx.bcm_cmd_0, fastlogo_ctx.bcm_cmd_0_len); // pre-load logo frame dma commands - fastlogo_ctx.logo_dma_cmd_len = logo_dma_cmd_len; - fastlogo_ctx.logo_frame_dma_cmd = logo_frame_dma_cmd; - logo_frame_dma_cmd[2] = shm_phys; + fastlogo_ctx.logo_frame_dma_cmd[2] = shm_phys; vbuf.m_pbuf_start = (void *) shm_phys; - memcpy(fastlogo_ctx.dmaQ, logo_frame_dma_cmd, logo_dma_cmd_len); + memcpy(fastlogo_ctx.dmaQ, fastlogo_ctx.logo_frame_dma_cmd, fastlogo_ctx.logo_dma_cmd_len); } #else fastlogo_ctx.logoBuf = kmalloc(fastlogo_ctx.length, GFP_KERNEL); if (!fastlogo_ctx.logoBuf) { gs_trace("kmalloc error\n"); - return err; + return -1; } memcpy(fastlogo_ctx.logoBuf, yuv_logo, fastlogo_ctx.length); @@ -342,21 +377,22 @@ static int __init fastlogo_device_init(unsigned int cpu_id) fastlogo_ctx.logoBuf = NULL; return err; } - outer_cache.flush_range(virt_to_phys(fastlogo_ctx.logoBuf), virt_to_phys(fastlogo_ctx.logoBuf)+fastlogo_ctx.length); - logo_frame_dma_cmd[2] = virt_to_phys(fastlogo_ctx.logoBuf); - vbuf.m_pbuf_start = (void *) logo_frame_dma_cmd[2]; + __cpuc_flush_dcache_area(fastlogo_ctx.logoBuf, fastlogo_ctx.length); + outer_clean_range(virt_to_phys(fastlogo_ctx.logoBuf), virt_to_phys(fastlogo_ctx.logoBuf)+fastlogo_ctx.length); + fastlogo_ctx.logo_frame_dma_cmd[2] = virt_to_phys(fastlogo_ctx.logoBuf); + vbuf.m_pbuf_start = (void *) fastlogo_ctx.logo_frame_dma_cmd[2]; #endif fastlogo_ctx.logoBuf_2 = fastlogo_ctx.logoBuf; /* initialize dhub */ - DhubInitialization(cpu_id, VPP_DHUB_BASE, VPP_HBO_SRAM_BASE, &VPP_dhubHandle, VPP_config, VPP_NUM_OF_CHANNELS); - DhubInitialization(cpu_id, AG_DHUB_BASE, AG_HBO_SRAM_BASE, &AG_dhubHandle, AG_config, AG_NUM_OF_CHANNELS); + DhubInitialization(cpu_id, VPP_DHUB_BASE, VPP_HBO_SRAM_BASE, &VPP_dhubHandle, soc->VPP_config, soc->VPP_NUM_OF_CHANNELS); + DhubInitialization(cpu_id, AG_DHUB_BASE, AG_HBO_SRAM_BASE, &AG_dhubHandle, soc->AG_config, soc->AG_NUM_OF_CHANNELS); - MV_THINVPP_Create(MEMMAP_VPP_REG_BASE); + MV_THINVPP_Create(); //MV_THINVPP_Create(MEMMAP_VPP_REG_BASE); MV_THINVPP_Reset(); MV_THINVPP_Config(); - /* set output resolution */ + /* set output resolution */ MV_THINVPP_SetCPCBOutputResolution(CPCB_1, RES_525P5994, OUTPUT_BIT_DEPTH_8BIT); // use MAIN plane @@ -369,17 +405,17 @@ static int __init fastlogo_device_init(unsigned int cpu_id) MV_THINVPP_OpenDispWindow(PLANE_MAIN, &fastlogo_ctx.win, NULL); /* register ISR */ - err = request_irq(IRQ_DHUBINTRAVIO0, fastlogo_devices_vpp_isr, IRQF_DISABLED, "fastlogo_module_vpp", NULL); + err = request_irq(vpp_intr_vect, fastlogo_devices_vpp_isr, IRQF_DISABLED, "fastlogo_module_vpp", NULL); if (unlikely(err < 0)) { - gs_trace("vec_num:%5d, err:%8x\n", IRQ_DHUBINTRAVIO0, err); + gs_trace("vec_num:%5d, err:%8x\n", vpp_intr_vect, err); return err; } - /* - * using 3 for debugging legacy; should change to a more reasonable - * number after clean-up - */ - cpcb_start_flag = 3; + /* + * using 3 for debugging legacy; should change to a more reasonable + * number after clean-up + */ + cpcb_start_flag = 3; /* clean up and enable ISR */ VPP_dhub_sem_clear(); @@ -403,24 +439,27 @@ static void fastlogo_device_exit(void) MV_SHM_NONCACHE_Free(fastlogo_ctx.mSHMOffset); fastlogo_ctx.logoBuf = NULL; fastlogo_ctx.mSHMOffset = ERROR_SHM_MALLOC_FAILED; + gs_trace("free pBuf OK\n"); } #else if (fastlogo_ctx.logoBuf) { dma_unmap_single(NULL, (dma_addr_t)fastlogo_ctx.mapaddr, fastlogo_ctx.length, DMA_TO_DEVICE); - gs_trace("will free pBuf OK\n"); kfree(fastlogo_ctx.logoBuf); fastlogo_ctx.logoBuf = NULL; + gs_trace("free pBuf OK\n"); } #endif /* unregister VPP interrupt */ msleep(100); //100 milliseconds - free_irq(IRQ_DHUBINTRAVIO0, NULL); + free_irq(vpp_intr_vect, NULL); +#ifdef FASTLOGO_LIMIT_CONSOLE_PRINT console_loglevel = save_console_loglevel; // restore console printk +#endif gs_trace("dev exit done\n"); -#if LOGO_TIME_PROFILE +#if 0 // LOGO_TIME_PROFILE { int i; gs_notice("profile %d:\n", logo_tp_count); @@ -449,10 +488,38 @@ EXPORT_SYMBOL(fastlogo_stop); static int __init fastlogo_driver_init(void) { int res; + struct device_node *np, *iter; + u32 chip_ext = 0; gs_info("drv init\n"); - memset(&fastlogo_ctx, 0, sizeof(fastlogo_ctx)); +#if defined(BERLIN_BG2CDP) + /* Check Chip ID extension */ + np = of_find_compatible_node(NULL, NULL, "mrvl,berlin-amp"); + if (!np) + return -ENODEV; + + for_each_child_of_node(np, iter) + { + if (of_device_is_compatible(iter, "mrvl,berlin-chip-ext")) + { + res = of_property_read_u32(iter, "revision", &chip_ext); + //if (!res) + //fastlogo_ctx.berlin_chip_revision = chip_ext; + } + } +#endif + fastlogo_ctx.berlin_chip_revision = chip_ext; + gs_trace("select fastlogo for chip revision %X\n", chip_ext); + fastlogo_soc_select(chip_ext); + +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + vpp_intr_vect = IRQ_DHUBINTRAVIO0_CDP; +#else + vpp_intr_vect = IRQ_DHUBINTRAVIO0; +#endif + + #if LOGO_PROC_FS { struct proc_dir_entry *pstat = NULL; @@ -476,10 +543,12 @@ static int __init fastlogo_driver_init(void) return 0; // do nothing if vres is not supported } +#ifdef FASTLOGO_LIMIT_CONSOLE_PRINT //console_silent(); // don't want printk to interfere us save_console_loglevel = console_loglevel; // to restore console printk if (console_loglevel > LIMIT_CONSOLE_LOGLEVEL) console_loglevel = LIMIT_CONSOLE_LOGLEVEL; +#endif /* create PE device */ res = fastlogo_device_init(CPUINDEX); diff --git a/arch/arm/mach-berlin/modules/fastlogo/fastlogo_soc.c b/arch/arm/mach-berlin/modules/fastlogo/fastlogo_soc.c new file mode 100644 index 00000000..59985861 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo/fastlogo_soc.c @@ -0,0 +1,66 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + + +#include "fastlogo.h" +#include "maddr.h" + +extern logo_device_t fastlogo_ctx; +extern logo_soc_specific *soc; +static logo_soc_specific soc_a0 = +{ + VPP_NUM_OF_CHANNELS_A0, + AG_NUM_OF_CHANNELS_A0, + + VPP_config_a0, + AG_config_a0, + + avioDhubChMap_vpp_BCM_R_A0, + RA_Vpp_VP_TG_A0, + RA_Vpp_vpIn_pix_A0, + RA_Vpp_vpOut_pix_A0, + RA_Vpp_diW_pix_A0, + RA_Vpp_diR_word_A0, +}; + +static logo_soc_specific soc_z1 = +{ + VPP_NUM_OF_CHANNELS_Z1, + AG_NUM_OF_CHANNELS_Z1, + + VPP_config, + AG_config, + + avioDhubChMap_vpp_BCM_R_Z1, + RA_Vpp_VP_TG_Z1, + RA_Vpp_vpIn_pix_Z1, + RA_Vpp_vpOut_pix_Z1, + RA_Vpp_diW_pix_Z1, + RA_Vpp_diR_word_Z1, +}; + + +void fastlogo_soc_select(unsigned chip_revision) +{ + if (fastlogo_ctx.berlin_chip_revision >= 0xA0) /* CDP A0 */ + soc = &soc_a0; + else + soc = &soc_z1; +} + diff --git a/arch/arm/mach-berlin/modules/fastlogo/Common/include/Firmware_Berlin_BG2CD_A0/Galois_memmap.h b/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/Galois_memmap.h old mode 100755 new mode 100644 similarity index 100% rename from arch/arm/mach-berlin/modules/fastlogo/Common/include/Firmware_Berlin_BG2CD_A0/Galois_memmap.h rename to arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/Galois_memmap.h diff --git a/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/api_avio_dhub.h b/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/api_avio_dhub.h new file mode 100644 index 00000000..3a55e950 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/api_avio_dhub.h @@ -0,0 +1,105 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the GPL License), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + +#ifndef __API_AVIO_DHUB_H__ +#define __API_AVIO_DHUB_H__ +#include "dHub.h" +#include "avioDhub.h" +#include "api_dhub.h" + + +#define VPP_DHUB_BASE (MEMMAP_VPP_DHUB_REG_BASE + RA_vppDhub_dHub0) +#define VPP_HBO_SRAM_BASE (MEMMAP_VPP_DHUB_REG_BASE + RA_vppDhub_tcm0) + +//dhub channels are changed in CDp A0 +#define VPP_NUM_OF_CHANNELS_Z1 (avioDhubChMap_vpp_HDMI_R_Z1+1) +#define VPP_NUM_OF_CHANNELS_A0 (avioDhubChMap_vpp_HDMI_R_A0+1) + +#define AG_DHUB_BASE (MEMMAP_AG_DHUB_REG_BASE + RA_agDhub_dHub0) +#define AG_HBO_SRAM_BASE (MEMMAP_AG_DHUB_REG_BASE + RA_agDhub_tcm0) +#define AG_NUM_OF_CHANNELS_Z1 (avioDhubChMap_ag_GFX_R_Z1+1) +#define AG_NUM_OF_CHANNELS_A0 (avioDhubChMap_ag_GFX_R_A0+1) + +// add by yuxia for compilation +#define VPP_DHUB_BANK0_START_ADDR (8192*0) +#define VPP_DHUB_BANK1_START_ADDR (8192*1) +#define VPP_DHUB_BANK2_START_ADDR (8192*2) +#define VPP_DHUB_BANK3_START_ADDR (8192*3) +#define VPP_DHUB_BANK4_START_ADDR (8192*4) + + +#define DHUB_BANK0_START_ADDR (0) +#define DHUB_BANK1_START_ADDR (8192*1) + +#define AG_DHUB_BANK0_START_ADDR (0) +#define AG_DHUB_BANK1_START_ADDR (4096*1) +#define AG_DHUB_BANK2_START_ADDR (4096*3) + +//add by yuxia for compilation +#define DHUB_BANK5_START_ADDR (8192*4) + +typedef struct DHUB_channel_config { + SIGN32 chanId; + UNSG32 chanCmdBase; + UNSG32 chanDataBase; + SIGN32 chanCmdSize; + SIGN32 chanDataSize; + SIGN32 chanMtuSize; + SIGN32 chanQos; + SIGN32 chanSelfLoop; + SIGN32 chanEnable; +} DHUB_channel_config; + +extern HDL_dhub2d AG_dhubHandle; +extern HDL_dhub2d VPP_dhubHandle; +#if (BERLIN_CHIP_VERSION >= BERLIN_BG2) +extern HDL_dhub2d VIP_dhubHandle; +#endif +extern DHUB_channel_config AG_config_a0[]; +extern DHUB_channel_config VPP_config_a0[]; + +extern DHUB_channel_config AG_config[]; +extern DHUB_channel_config VPP_config[]; +#if (BERLIN_CHIP_VERSION >= BERLIN_BG2) +extern DHUB_channel_config VIP_config[]; +#endif + +/****************************************************************************************************************** + * Function: GetChannelInfo + * Description: Get the Dhub configuration of requested channel. + * Parameter : pdhubHandle ----- pointer to 2D dhubHandle + * IChannel ----- Channel of the dhub + * cfg ----- Configuration need to be updated here. + * Return: 0 ---- Success + + ****************************************************************************************************************** + * Function: DhubInitialization + * Description: Initialize DHUB . + * Parameter : cpuId ------------- cpu ID + * dHubBaseAddr ------------- dHub Base address. + * hboSramAddr ----- Sram Address for HBO. + * pdhubHandle ----- pointer to 2D dhubHandle + * dhub_config ----- configuration of AG + * numOfChans ----- number of channels + * Return: void +******************************************************************************************************************/ +void DhubInitialization(SIGN32 cpuId, UNSG32 dHubBaseAddr, UNSG32 hboSramAddr, HDL_dhub2d *pdhubHandle, DHUB_channel_config *dhub_config,SIGN32 numOfChans); + +void DhubChannelClear(void *hdl, SIGN32 id, T64b cfgQ[]); +#endif //__API_AVIO_DHUB_H__ diff --git a/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/avioDhub.h b/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/avioDhub.h new file mode 100644 index 00000000..cf8a5ab5 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/avioDhub.h @@ -0,0 +1,182 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the GPL License), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + +#ifndef avioDhub_h +#define avioDhub_h (){} + + #define RA_SemaINTR_mask 0x0000 + #define RA_Semaphore_CFG 0x0000 + #define RA_Semaphore_INTR 0x0004 + #define RA_Semaphore_mask 0x0010 + #define RA_SemaQuery_RESP 0x0000 + #define RA_SemaQueryMap_ADDR 0x0000 + #define RA_SemaHub_Query 0x0000 + #define RA_SemaHub_counter 0x0000 + #define RA_SemaHub_ARR 0x0100 + #define RA_SemaHub_cell 0x0100 + #define RA_SemaHub_PUSH 0x0380 + #define RA_SemaHub_POP 0x0384 + #define RA_SemaHub_empty 0x0388 + #define RA_SemaHub_full 0x038C + #define RA_SemaHub_almostEmpty 0x0390 + #define RA_SemaHub_almostFull 0x0394 + #define RA_FiFo_CFG 0x0000 + #define RA_FiFo_START 0x0004 + #define RA_FiFo_CLEAR 0x0008 + #define RA_FiFo_FLUSH 0x000C + #define RA_HBO_FiFoCtl 0x0000 + #define RA_HBO_ARR 0x0400 + #define RA_HBO_FiFo 0x0400 + #define RA_HBO_BUSY 0x0600 + #define RA_LLDesFmt_mem 0x0000 + #define RA_dHubCmdHDR_DESC 0x0000 + #define RA_dHubCmd_MEM 0x0000 + #define RA_dHubCmd_HDR 0x0004 + #define RA_dHubChannel_CFG 0x0000 + #define RA_dHubChannel_START 0x0004 + #define RA_dHubChannel_CLEAR 0x0008 + #define RA_dHubChannel_FLUSH 0x000C + #define RA_dHubReg_SemaHub 0x0000 + #define RA_dHubReg_HBO 0x0400 + #define RA_dHubReg_ARR 0x0B00 + #define RA_dHubReg_channelCtl 0x0B00 + #define RA_dHubReg_BUSY 0x0C00 + #define RA_dHubReg_PENDING 0x0C04 + #define RA_dHubReg_busRstEn 0x0C08 + #define RA_dHubReg_busRstDone 0x0C0C + #define RA_dHubReg_flowCtl 0x0C10 + #define RA_dHubReg_axiCmdCol 0x0C14 + #define RA_dHubCmd2D_MEM 0x0000 + #define RA_dHubCmd2D_DESC 0x0004 + #define RA_dHubCmd2D_START 0x0008 + #define RA_dHubCmd2D_CLEAR 0x000C + #define RA_dHubCmd2D_HDR 0x0010 + #define RA_dHubQuery_RESP 0x0000 + #define RA_dHubReg2D_dHub 0x0000 + #define RA_dHubReg2D_ARR 0x0D00 + #define RA_dHubReg2D_Cmd2D 0x0D00 + #define RA_dHubReg2D_BUSY 0x0F00 + #define RA_dHubReg2D_CH_ST 0x0F40 + #define RA_avioDhubTcmMap_dummy 0x0000 + #define RA_vppDhub_tcm0 0x0000 + #define RA_vppDhub_dHub0 0x10000 + #define RA_agDhub_tcm0 0x0000 + #define RA_agDhub_dHub0 0x10000 + #define BA_avioDhubChMap_vpp 0x0000 + #define avioDhubChMap_vpp_MV_R 0x0 + #define avioDhubChMap_vpp_MV_FRC_R 0x1 + #define avioDhubChMap_vpp_MV_FRC_W 0x2 + #define avioDhubChMap_vpp_DINT0_R_Z1 0x3 + #define avioDhubChMap_vpp_DINT1_R_Z1 0x4 + #define avioDhubChMap_vpp_DINT_W_Z1 0x5 + #define avioDhubChMap_vpp_BCM_R_Z1 0x6 + #define avioDhubChMap_vpp_HDMI_R_Z1 0x7 + #define avioDhubChMap_vpp_AUX_FRC_R_Z1 0x8 + #define avioDhubChMap_vpp_AUX_FRC_W_Z1 0x9 + #define avioDhubChMap_vpp_TT_R_Z1 0xA + #define avioDhubChMap_vpp_BCM_R_A0 0x3 + #define avioDhubChMap_vpp_HDMI_R_A0 0x4 + #define avioDhubChMap_vpp_BCM_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x6 : 0x3) + #define avioDhubChMap_vpp_HDMI_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x7 : 0x4) + #define avioDhubChMap_ag_APPCMD_R_Z1 0x0 + #define avioDhubChMap_ag_MA0_R_Z1 0x1 + #define avioDhubChMap_ag_MA1_R_Z1 0x2 + #define avioDhubChMap_ag_MA2_R_Z1 0x3 + #define avioDhubChMap_ag_MA3_R_Z1 0x4 + #define avioDhubChMap_ag_SA_R_Z1 0x5 + #define avioDhubChMap_ag_SPDIF_R_Z1 0x6 + #define avioDhubChMap_ag_APPDAT_R_Z1 0x7 + #define avioDhubChMap_ag_APPDAT_W_Z1 0x8 + #define avioDhubChMap_ag_CSR_R_Z1 0x9 + #define avioDhubChMap_ag_GFX_R_Z1 0xA + #define avioDhubChMap_ag_MA0_R_A0 0x0 + #define avioDhubChMap_ag_MA1_R_A0 0x1 + #define avioDhubChMap_ag_MA2_R_A0 0x2 + #define avioDhubChMap_ag_MA3_R_A0 0x3 + #define avioDhubChMap_ag_SA0_R_A0 0x4 + #define avioDhubChMap_ag_MIC0_W_A0 0x5 + #define avioDhubChMap_ag_MIC1_W_A0 0x6 + #define avioDhubChMap_ag_CSR_R_A0 0x7 + #define avioDhubChMap_ag_GFX_R_A0 0x8 + #define avioDhubChMap_ag_MA0_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x1 : 0x0) + #define avioDhubChMap_ag_MA1_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x2 : 0x1) + #define avioDhubChMap_ag_MA2_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x3 : 0x2) + #define avioDhubChMap_ag_MA3_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x4 : 0x3) + #define avioDhubChMap_ag_CSR_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x9 : 0x7) + #define avioDhubChMap_ag_GFX_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0xA : 0x8) + #define avioDhubSemMap_vpp_CH0_intr 0x0 + #define avioDhubSemMap_vpp_CH1_intr 0x1 + #define avioDhubSemMap_vpp_CH2_intr 0x2 + #define avioDhubSemMap_vpp_CH3_intr 0x3 + #define avioDhubSemMap_vpp_CH4_intr 0x4 + #define avioDhubSemMap_vpp_CH5_intr 0x5 + #define avioDhubSemMap_vpp_CH6_intr 0x6 + #define avioDhubSemMap_vpp_CH7_intr 0x7 + #define avioDhubSemMap_vpp_CH8_intr 0x8 + #define avioDhubSemMap_vpp_CH9_intr 0x9 + #define avioDhubSemMap_vpp_CH10_intr 0xA + #define avioDhubSemMap_vpp_CH11_intr 0xB + #define avioDhubSemMap_vpp_CH12_intr 0xC + #define avioDhubSemMap_vpp_CH13_intr 0xD + #define avioDhubSemMap_vpp_CH14_intr 0xE + #define avioDhubSemMap_vpp_CH15_intr 0xF + #define avioDhubSemMap_vpp_MV_R_SEM 0x10 + #define avioDhubSemMap_vpp_PIP_R_SEM 0x11 + #define avioDhubSemMap_vpp_BCM_R_SEM 0x12 + #define avioDhubSemMap_vpp_vppCPCB0_intr 0x13 + #define avioDhubSemMap_vpp_vppCPCB1_intr 0x14 + #define avioDhubSemMap_vpp_vppCPCB2_intr 0x15 + #define avioDhubSemMap_vpp_vppOUT0_intr 0x16 + #define avioDhubSemMap_vpp_vppOUT1_intr 0x17 + #define avioDhubSemMap_vpp_vppOUT2_intr 0x18 + #define avioDhubSemMap_vpp_vppOUT3_intr 0x19 + #define avioDhubSemMap_vpp_vppOUT4_intr 0x1A + #define avioDhubSemMap_vpp_vppOUT5_intr 0x1B + #define avioDhubSemMap_vpp_vppOUT6_intr 0x1C + #define avioDhubSemMap_vpp_bcmInvalidReqIntr 0x1D + #define avioDhubSemMap_ag_CH0_intr 0x0 + #define avioDhubSemMap_ag_CH1_intr 0x1 + #define avioDhubSemMap_ag_CH2_intr 0x2 + #define avioDhubSemMap_ag_CH3_intr 0x3 + #define avioDhubSemMap_ag_CH4_intr 0x4 + #define avioDhubSemMap_ag_CH5_intr 0x5 + #define avioDhubSemMap_ag_CH6_intr 0x6 + #define avioDhubSemMap_ag_CH7_intr 0x7 + #define avioDhubSemMap_ag_CH8_intr 0x8 + #define avioDhubSemMap_ag_CH9_intr 0x9 + #define avioDhubSemMap_ag_CH10_intr 0xA + #define avioDhubSemMap_ag_CH11_intr 0xB + #define avioDhubSemMap_ag_CH12_intr 0xC + #define avioDhubSemMap_ag_CH13_intr 0xD + #define avioDhubSemMap_ag_CH14_intr 0xE + #define avioDhubSemMap_ag_CH15_intr 0xF + #define avioDhubSemMap_ag_app_intr0 0x11 + #define avioDhubSemMap_ag_app_intr1 0x12 + #define avioDhubSemMap_ag_app_intr2 0x13 + #define avioDhubSemMap_ag_app_intr3 0x14 + #define avioDhubSemMap_ag_MA0_R_SEM 0x15 + #define avioDhubSemMap_ag_MA1_R_SEM 0x16 + #define avioDhubSemMap_ag_MA2_R_SEM 0x17 + #define avioDhubSemMap_ag_MA3_R_SEM 0x18 + #define avioDhubSemMap_ag_SA_R_SEM 0x19 + #define avioDhubSemMap_ag_SPDIF_R_SEM 0x1A + #define avioDhubSemMap_ag_MIC_W_SEM 0x1B + #define avioDhubSemMap_ag_audio_intr_A0 0x1C + +#endif diff --git a/arch/arm/mach-berlin/modules/fastlogo/Common/include/com_type.h b/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/com_type.h old mode 100755 new mode 100644 similarity index 100% rename from arch/arm/mach-berlin/modules/fastlogo/Common/include/com_type.h rename to arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/com_type.h diff --git a/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/galois_cfg.h b/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/galois_cfg.h new file mode 100644 index 00000000..d3e9cdca --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/galois_cfg.h @@ -0,0 +1,106 @@ +/******************************************************************************* + * Copyright (C) Marvell International Ltd. and its affiliates + * + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * alternative licensing terms. Once you have made an election to distribute the + * File under one of the following license alternatives, please (i) delete this + * introductory statement regarding license alternatives, (ii) delete the two + * license alternatives that you have not elected to use and (iii) preserve the + * Marvell copyright notice above. + * + ******************************************************************************* + * Marvell Commercial License Option + * + * If you received this File from Marvell and you have entered into a commercial + * license agreement (a "Commercial License") with Marvell, the File is licensed + * to you under the terms of the applicable Commercial License. + * + ******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************** + * Marvell BSD License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File under the following licensing terms. + * 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 Marvell 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. + * + *******************************************************************************/ + +#ifndef __GALOIS_CFG_H__ +#define __GALOIS_CFG_H__ + +/*! + * IO read/write through software/hardware socket + * #define __MEMIO_SOCKET + */ + +/*! + * IO read/write through PCI-Express bus + * #define __MEMIO_PCIE + */ + +/*! + * IO read/write directly using MEMI/O + */ +#define __MEMIO_DIRECT + +/*! + * Program is running under little endian system. + */ +#ifndef __LITTLE_ENDIAN +#define __LITTLE_ENDIAN +#endif + +/*! + * Program is running under big endian system. + * #define __BIG_ENDIAN + */ + +/*! + * Program is running under Linux on ARM processor + */ +#define __LINUX_ARM + + +/*! + * Program is running under VxWorks on ARM processor + * #define __VxWORKS_ARM + */ + +#endif /* __GALOIS_CFG_H__ */ diff --git a/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/galois_common.h b/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/galois_common.h new file mode 100644 index 00000000..60887266 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/galois_common.h @@ -0,0 +1,241 @@ +/******************************************************************************* + * Copyright (C) Marvell International Ltd. and its affiliates + * + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * alternative licensing terms. Once you have made an election to distribute the + * File under one of the following license alternatives, please (i) delete this + * introductory statement regarding license alternatives, (ii) delete the two + * license alternatives that you have not elected to use and (iii) preserve the + * Marvell copyright notice above. + * + ******************************************************************************* + * Marvell Commercial License Option + * + * If you received this File from Marvell and you have entered into a commercial + * license agreement (a "Commercial License") with Marvell, the File is licensed + * to you under the terms of the applicable Commercial License. + * + ******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************** + * Marvell BSD License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File under the following licensing terms. + * 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 Marvell 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. + * + *******************************************************************************/ + +#ifndef __GALOIS_COMMON_H__ +#define __GALOIS_COMMON_H__ + +#include "galois_cfg.h" +#include "galois_type.h" + +/*! + * Bit field definitions + */ +#define NO_BIT 0x00000000 +#define BIT0 0x00000001 +#define BIT1 0x00000002 +#define BIT2 0x00000004 +#define BIT3 0x00000008 +#define BIT4 0x00000010 +#define BIT5 0x00000020 +#define BIT6 0x00000040 +#define BIT7 0x00000080 +#define BIT8 0x00000100 +#define BIT9 0x00000200 +#define BIT10 0x00000400 +#define BIT11 0x00000800 +#define BIT12 0x00001000 +#define BIT13 0x00002000 +#define BIT14 0x00004000 +#define BIT15 0x00008000 +#define BIT16 0x00010000 +#define BIT17 0x00020000 +#define BIT18 0x00040000 +#define BIT19 0x00080000 +#define BIT20 0x00100000 +#define BIT21 0x00200000 +#define BIT22 0x00400000 +#define BIT23 0x00800000 +#define BIT24 0x01000000 +#define BIT25 0x02000000 +#define BIT26 0x04000000 +#define BIT27 0x08000000 +#define BIT28 0x10000000 +#define BIT29 0x20000000 +#define BIT30 0x40000000 +#define BIT31 0x80000000 + +/*! + * Handy sizes + */ +#define _1K 0x00000400 +#define _2K 0x00000800 +#define _4K 0x00001000 +#define _8K 0x00002000 +#define _16K 0x00004000 +#define _32K 0x00008000 +#define _64K 0x00010000 +#define _128K 0x00020000 +#define _256K 0x00040000 +#define _512K 0x00080000 + +#define _1M 0x00100000 +#define _2M 0x00200000 +#define _4M 0x00400000 +#define _8M 0x00800000 +#define _16M 0x01000000 +#define _32M 0x02000000 +#define _64M 0x04000000 +#define _128M 0x08000000 +#define _256M 0x10000000 +#define _512M 0x20000000 + +#define _1G 0x40000000 +#define _2G 0x80000000 + +/*! + * CPU cache information + */ +#define CPU_I_CACHE_LINE_SIZE 32 /* 2do: replace 32 with linux core macro */ +#define CPU_D_CACHE_LINE_SIZE 32 /* 2do: replace 32 with linux core macro */ + +/*! + * Data cache flush one line + */ +#if (defined(__LINUX_ARM)) +# define mvOsCacheLineFlushInv(addr) \ + do { \ + __asm__ __volatile__ ("mcr p15, 0, %0, c7, c14, 1" : : "r" (addr)); \ + } while (0) + +# define mvOsCacheLineInv(addr) \ + do { \ + __asm__ __volatile__ ("mcr p15, 0, %0, c7, c6, 1" : : "r" (addr)); \ + } while (0) + +# define mvArmNop \ + do { \ + __asm__ __volatile__("nop"); \ + } while (0) + +#elif (defined(__VxWORKS_ARM)) +# define mvOsCacheLineFlushInv(addr) \ + do { \ + _WRS_ASM("mcr p15, 0, %0, c7, c14, 1" : : "r" (addr)); \ + } while (0) + +# define mvOsCacheLineInv(addr) \ + do { \ + _WRS_ASM("mcr p15, 0, %0, c7, c6, 1" : : "r" (addr)); \ + } while (0) + +# define mvArmNop \ + do { \ + __WRS_ASM("nop"); \ + } while (0) + +#else /* __LINUX_ARM || __VxWORKS_ARM */ +# define mvOsCacheLineFlushInv(addr) do ; while (0) +# define mvOsCacheLineInv(addr) do ; while (0) +# define mvArmNop do ; while (0) + +#endif /* __LINUX_ARM || __VxWORKS_ARM */ + +/*! + * Swap tool + */ + +/*! + * 16bit nibble swap. For example 0x1234 -> 0x2143 + */ +#define MV_NIBBLE_SWAP_16BIT(X) (((X & 0xf) << 4) | ((X & 0xf0) >> 4) | ((X & 0xf00) << 4) | ((X & 0xf000) >> 4)) + +/*! + * 32bit nibble swap. For example 0x12345678 -> 0x21436587 + */ +#define MV_NIBBLE_SWAP_32BIT(X) (((X & 0xf) << 4) | ((X & 0xf0) >> 4) | ((X & 0xf00) << 4) | ((X & 0xf000) >> 4) | \ + ((X & 0xf0000) << 4) | ((X & 0xf00000) >> 4) | ((X & 0xf000000) << 4) | ((X & 0xf0000000) >> 4)) + +/*! + * 16bit byte swap. For example 0x1122 -> 0x2211 + */ +#define MV_BYTE_SWAP_16BIT(X) ((((X) & 0xff) << 8) | (((X) & 0xff00) >> 8)) + +/*! + * 32bit byte swap. For example 0x11223344 -> 0x44332211 + */ +#define MV_BYTE_SWAP_32BIT(X) ((((X) & 0xff) << 24) | (((X) & 0xff00) << 8) | (((X) & 0xff0000) >> 8) | (((X) & 0xff000000) >> 24)) + +/*! + * 64bit byte swap. For example 0x11223344.55667788 -> 0x88776655.44332211 + */ +#define MV_BYTE_SWAP_64BIT(X) ((MV_U64) ((((X) & 0xffULL) << 56) | (((X) & 0xff00ULL) << 40) | \ + (((X) & 0xff0000ULL) << 24) | (((X) & 0xff000000ULL) << 8) | \ + (((X) & 0xff00000000ULL) >> 8) | (((X) & 0xff0000000000ULL) >> 24) | \ + (((X) & 0xff000000000000ULL) >> 40) | (((X) & 0xff00000000000000ULL) >> 56))) + +/*! + * Endianess macros. + */ +#if (defined(__BIG_ENDIAN)) +# define MV_16BIT_LE(X) MV_BYTE_SWAP_16BIT(X) +# define MV_32BIT_LE(X) MV_BYTE_SWAP_32BIT(X) +# define MV_64BIT_LE(X) MV_BYTE_SWAP_64BIT(X) +# define MV_16BIT_BE(X) (X) +# define MV_32BIT_BE(X) (X) +# define MV_64BIT_BE(X) (X) + +#elif (defined(__LITTLE_ENDIAN)) +# define MV_16BIT_LE(X) (X) +# define MV_32BIT_LE(X) (X) +# define MV_64BIT_LE(X) (X) +# define MV_16BIT_BE(X) MV_BYTE_SWAP_16BIT(X) +# define MV_32BIT_BE(X) MV_BYTE_SWAP_32BIT(X) +# define MV_64BIT_BE(X) MV_BYTE_SWAP_64BIT(X) + +#else /* __BIG_ENDIAN || __LITTLE_ENDIAN */ +# error "Endianess type not selected" + +#endif /* __BIG_ENDIAN || __LITTLE_ENDIAN */ + +#endif /* __GALOIS_COMMON_H__ */ diff --git a/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/galois_io.h b/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/galois_io.h new file mode 100644 index 00000000..766e6147 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/galois_io.h @@ -0,0 +1,302 @@ +/******************************************************************************* + * Copyright (C) Marvell International Ltd. and its affiliates + * + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * alternative licensing terms. Once you have made an election to distribute the + * File under one of the following license alternatives, please (i) delete this + * introductory statement regarding license alternatives, (ii) delete the two + * license alternatives that you have not elected to use and (iii) preserve the + * Marvell copyright notice above. + * + ******************************************************************************* + * Marvell Commercial License Option + * + * If you received this File from Marvell and you have entered into a commercial + * license agreement (a "Commercial License") with Marvell, the File is licensed + * to you under the terms of the applicable Commercial License. + * + ******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************** + * Marvell BSD License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File under the following licensing terms. + * 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 Marvell 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. + * + *******************************************************************************/ + +#ifndef __GALOIS_IO_H__ +#define __GALOIS_IO_H__ + +#ifdef __MEMIO_SOCKET +#include +#include "trans_h.h" +#endif + +#ifdef __MEMIO_PCIE +#include +#include +#endif + +#include "galois_cfg.h" +#include "galois_type.h" +#include "galois_common.h" + + +#ifdef __MEMIO_PCIE +extern MV_U32 gu32_galois_pcie_ioremap_base; +#endif + +#define CPU_PHY_MEM(x) ((MV_U32)(x)) +#define CPU_MEMIO_CACHED_ADDR(x) ((void*)(x)) +#define CPU_MEMIO_UNCACHED_ADDR(x) ((void*)(x)) + +/*! + * CPU endian check + */ +#if defined( CPU_BIG_ENDIAN ) && defined( __LITTLE_ENDIAN ) +#error CPU endian conflict!!! +#elif defined(__BYTE_ORDER) +#if __BYTE_ORDER == __BIG_ENDIAN +#error CPU endian conflict!!! +#endif +#elif defined( __BIG_ENDIAN ) +#error CPU endian conflict!!! +#endif + +/*! + * CPU architecture dependent 32, 16, 8 bit read/write IO addresses + */ +#if defined(BERLIN_SINGLE_CPU) && !defined(__LINUX_KERNEL__) +#define MV_MEMIO32_WRITE(addr, data) ((*((volatile unsigned int *)devmem_phy_to_virt(addr))) = ((unsigned int)(data))) +#define MV_MEMIO32_READ(addr) ((*((volatile unsigned int *)devmem_phy_to_virt(addr)))) +#define MV_MEMIO16_WRITE(addr, data) ((*((volatile unsigned short *)devmem_phy_to_virt(addr))) = ((unsigned short)(data))) +#define MV_MEMIO16_READ(addr) ((*((volatile unsigned short *)devmem_phy_to_virt(addr)))) +#define MV_MEMIO08_WRITE(addr, data) ((*((volatile unsigned char *)devmem_phy_to_virt(addr))) = ((unsigned char)(data))) +#define MV_MEMIO08_READ(addr) ((*((volatile unsigned char *)devmem_phy_to_virt(addr)))) +#else +#define MV_MEMIO32_WRITE(addr, data) ((*((volatile unsigned int*)(addr))) = ((unsigned int)(data))) +#define MV_MEMIO32_READ(addr) ((*((volatile unsigned int*)(addr)))) +#define MV_MEMIO16_WRITE(addr, data) ((*((volatile unsigned short*)(addr))) = ((unsigned short)(data))) +#define MV_MEMIO16_READ(addr) ((*((volatile unsigned short*)(addr)))) +#define MV_MEMIO08_WRITE(addr, data) ((*((volatile unsigned char*)(addr))) = ((unsigned char)(data))) +#define MV_MEMIO08_READ(addr) ((*((volatile unsigned char*)(addr)))) +#endif + +/*! + * No Fast Swap implementation (in assembler) for ARM + */ +#define MV_32BIT_LE_FAST(val) MV_32BIT_LE(val) +#define MV_16BIT_LE_FAST(val) MV_16BIT_LE(val) +#define MV_32BIT_BE_FAST(val) MV_32BIT_BE(val) +#define MV_16BIT_BE_FAST(val) MV_16BIT_BE(val) + +/*! + * 32 and 16 bit read/write in big/little endian mode + */ + +/*! + * 16bit write in little endian mode + */ +#define MV_MEMIO_LE16_WRITE(addr, data) MV_MEMIO16_WRITE(addr, MV_16BIT_LE_FAST(data)) + +/*! + * 16bit read in little endian mode + */ +#define MV_MEMIO_LE16_READ(addr) MV_16BIT_LE_FAST((MV_U16)(MV_MEMIO16_READ((MV_U32)(addr)))) + +/*! + * 32bit write in little endian mode + */ +#define MV_MEMIO_LE32_WRITE(addr, data) MV_MEMIO32_WRITE(addr, MV_32BIT_LE_FAST(data)) + +/*! + * 32bit read in little endian mode + */ +#define MV_MEMIO_LE32_READ(addr) MV_32BIT_LE_FAST((MV_U32)(MV_MEMIO32_READ((MV_U32)(addr)))) + +/*! + * Generate 32bit mask + */ +#define GA_REG_MASK(bits, l_shift) ((bits) ? (((bits) < 32) ? (((1uL << (bits)) - 1) << (l_shift)) : (0xFFFFFFFFuL << (l_shift))) : 0) + +/*! + * Galois's register address translate + */ +#if (defined(__MEMIO_DIRECT)) +# ifndef INTER_REGS_BASE +# define INTER_REGS_BASE 0 +# endif + +# define REG_ADDR(offset) ((MV_U32)(INTER_REGS_BASE | (offset))) + +#elif (defined(__MEMIO_PCIE)) + /*! + * After ioremap the value in BAR1, got IO base address. value in BAR0 is for PCI-e core, BAR1 is for galois + */ +# define REG_ADDR(offset) ((MV_U32)(gu32_galois_pcie_ioremap_base + (offset))) + +#else +# define REG_ADDR(offset) ((MV_U32)(offset)) + +#endif + +/*! + * Galois controller register read/write macros + * + * offset -- address offset (32bits) + * holder -- pointer to the variable that will be used to store the data being read in. + * val -- variable contains the data that will be written out. + * bitMask -- variable contains the data (32bits) that will be written out. + * clearMask -- variable contains the mask (32bits) that will be used to clear the corresponding bits. + * + * GA_REG_WORD32_READ(offset, holder) -- Read a Double-Word (32bits) from 'offset' to 'holder' + * GA_REG_WORD16_READ(offset, holder) -- Read a Word (16bits) from 'offset' to 'holder' + * GA_REG_BYTE_READ(offset, holder) -- Read a Byte (8bits) from 'offset' to 'holder' + * + * GA_REG_WORD32_WRITE(offset, val) -- Write a Double-Word (32bits) to 'offset' + * GA_REG_WORD16_WRITE(offset, val) -- Write a Word (16bits) to 'offset' + * GA_REG_BYTE_WIRTE(offset, val) -- Write a Byte (8bits) to 'offset' + * + * GA_REG_WORD32_BIT_SET(offset, bitMask) -- Set bits to '1b' at 'offset', 'bitMask' should only be used to set '1b' for corresponding bits. + * GA_REG_WORD32_BITS_SET(offset, clearMask, val) -- Clear the bits to zero for the bits in clearMask are '1b' and write 'val' to 'offset'. + * GA_REG_WORD32_BIT_CLEAR(offset, clearMask) -- Clear the bits to zero for the bits in bitMask are '1b' + * + */ +#if (defined(__MEMIO_DIRECT)) + +#if defined(BERLIN_SINGLE_CPU) && !defined(__LINUX_KERNEL__) +//temp use this, 'cause the cpu endian definition has confliction +# define GA_REG_WORD32_READ(offset, holder) (*(holder) = (*((volatile unsigned int *)devmem_phy_to_virt(offset)))) +#else +# define GA_REG_WORD32_READ(offset, holder) (*(holder) = MV_MEMIO_LE32_READ(REG_ADDR(offset))) +#endif +# define GA_REG_WORD16_READ(offset, holder) (*(holder) = MV_MEMIO_LE16_READ(REG_ADDR(offset))) +# define GA_REG_BYTE_READ(offset, holder) (*(holder) = MV_MEMIO08_READ(REG_ADDR(offset))) + +#if defined(BERLIN_SINGLE_CPU) && !defined(__LINUX_KERNEL__) +# define GA_REG_WORD32_WRITE(addr, data) ((*((volatile unsigned int *)devmem_phy_to_virt(addr))) = ((unsigned int)(data))) +#else +# define GA_REG_WORD32_WRITE(offset, val) (MV_MEMIO_LE32_WRITE(REG_ADDR(offset), (MV_U32)(val))) +#endif +# define GA_REG_WORD16_WRITE(offset, val) (MV_MEMIO_LE16_WRITE(REG_ADDR(offset), (MV_U16)(val))) +# define GA_REG_BYTE_WRITE(offset, val) (MV_MEMIO08_WRITE(REG_ADDR(offset), (MV_U8)(val))) + +# define GA_REG_WORD32_BIT_SET(offset, bitMask) (MV_MEMIO32_WRITE(REG_ADDR(offset), \ + (MV_MEMIO_LE32_READ(REG_ADDR(offset)) | MV_32BIT_LE_FAST(bitMask)))) +# define GA_REG_WORD32_BITS_SET(offset, clearMask, val) \ + (MV_MEMIO32_WRITE(REG_ADDR(offset), \ + ((MV_MEMIO_LE32_READ(REG_ADDR(offset)) & MV_32BIT_LE_FAST(~(clearMask)))\ + | MV_32BIT_LE_FAST(val)))) +# define GA_REG_WORD32_BIT_CLEAR(offset, clearMask) \ + (MV_MEMIO32_WRITE(REG_ADDR(offset), \ + (MV_MEMIO_LE32_READ(REG_ADDR(offset)) & MV_32BIT_LE_FAST(~(clearMask))))) + +#elif (defined(__MEMIO_PCIE)) +/*! + * System dependent little endian from / to CPU conversions + */ +# define MV_CPU_TO_LE16(x) cpu_to_le16(x) +# define MV_CPU_TO_LE32(x) cpu_to_le32(x) + +# define MV_LE16_TO_CPU(x) le16_to_cpu(x) +# define MV_LE32_TO_CPU(x) le32_to_cpu(x) + +/*! + * System dependent register read / write in byte/word16/word32 variants + */ +# define GA_REG_WORD32_READ(offset, holder) (*(holder) = MV_LE32_TO_CPU(readl(REG_ADDR(offset)))) +# define GA_REG_WORD16_READ(offset, holder) (*(holder) = MV_LE16_TO_CPU(readw(REG_ADDR(offset)))) +# define GA_REG_BYTE_READ(offset, holder) (*(holder) = readb(REG_ADDR(offset))) + +# define GA_REG_WORD32_WRITE(offset, val) writel(MV_CPU_TO_LE32((MV_U32)(val)), REG_ADDR(offset)) +# define GA_REG_WORD16_WRITE(offset, val) writew(MV_CPU_TO_LE16((MV_U16)(val)), REG_ADDR(offset)) +# define GA_REG_BYTE_WRITE(offset, val) writeb((MV_U8)(val), REG_ADDR(offset)) + +# define GA_REG_WORD32_BIT_SET(offset, bitMask) writel((readl(REG_ADDR(offset)) | MV_CPU_TO_LE32(bitMask)), REG_ADDR(offset)) +# define GA_REG_WORD32_BITS_SET(offset, clearMask, val) \ + writel(((readl(REG_ADDR(offset)) & MV_CPU_TO_LE32(~(clearMask))) \ + | MV_CPU_TO_LE32(val)), REG_ADDR(offset)) +# define GA_REG_WORD32_BIT_CLEAR(offset, clearMask) \ + writel((readl(REG_ADDR(offset)) & MV_CPU_TO_LE32(~(clearMask))), REG_ADDR(offset)) + +#elif (defined(__MMIO_SOCKET)) +# define GA_REG_WORD32_READ(offset, holder) (assert(BFM_HOST_Bus_Read32(REG_ADDR(offset), (MV_U32 *)(holder)) >= 0)) +# define GA_REG_WORD16_READ(offset, holder) (assert(BFM_HOST_Bus_Read16(REG_ADDR(offset), (MV_U16 *)(holder)) >= 0)) +# define GA_REG_BYTE_READ(offset, holder) (assert(BFM_HOST_Bus_Read8(REG_ADDR(offset), (MV_U8 *)(holder)) >= 0)) + +# define GA_REG_WORD32_WRITE(offset, val) (assert(BFM_Host_Bus_Write32(REG_ADDR(offset), (MV_U32)(val)) >= 0)) +# define GA_REG_WORD16_WRITE(offset, val) (assert(BFM_Host_Bus_Write16(REG_ADDR(offset), (MV_U16)(val)) >= 0)) +# define GA_REG_BYTE_WRITE(offset, val) (assert(BFM_Host_Bus_Write8(REG_ADDR(offset), (MV_U8)(val)) >= 0)) + +# define GA_REG_WORD32_BIT_SET(offset, bitMask) \ + do { \ + MV_U32 temp; \ + \ + GA_REG_WORD32_READ(offset, &temp); \ + temp |= (bitMask); \ + GA_REG_WORD32_WRITE(offset, temp); \ + } while (0) + +# define GA_REG_WORD32_BITS_SET(offset, clearMask, val) \ + do { \ + MV_U32 temp; \ + \ + GA_REG_WORD32_READ(offset, &temp); \ + temp &= ~(clearMask); \ + temp |= val; \ + GA_REG_WORD32_WRITE(offset, temp); \ + } while (0) + +# define GA_REG_WORD32_BIT_CLEAR(offset, clearMask) \ + do { \ + MV_U32 temp; \ + \ + GA_REG_WORD32_READ(offset, &temp); \ + temp &= ~(clearMask); \ + GA_REG_WORD32_WRITE(offset, temp); \ + } while (0) + +#else +# error "MEMI/O way not selected" + +#endif /* __MEMIO_SOCKET || __MEMIO_PCIE || __MEMIO_DIRECT */ + +#endif /* __GALOIS_IO_H__ */ diff --git a/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/galois_type.h b/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/galois_type.h new file mode 100644 index 00000000..1337ca73 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/galois_type.h @@ -0,0 +1,178 @@ +/******************************************************************************* + * Copyright (C) Marvell International Ltd. and its affiliates + * + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * alternative licensing terms. Once you have made an election to distribute the + * File under one of the following license alternatives, please (i) delete this + * introductory statement regarding license alternatives, (ii) delete the two + * license alternatives that you have not elected to use and (iii) preserve the + * Marvell copyright notice above. + * + ******************************************************************************* + * Marvell Commercial License Option + * + * If you received this File from Marvell and you have entered into a commercial + * license agreement (a "Commercial License") with Marvell, the File is licensed + * to you under the terms of the applicable Commercial License. + * + ******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************** + * Marvell BSD License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File under the following licensing terms. + * 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 Marvell 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. + * + *******************************************************************************/ + +#ifndef __GALOIS_TYPE_H__ +#define __GALOIS_TYPE_H__ + +/*! + * Defines + * The following is a list of Marvell status + */ +#define MV_ERROR (int)(-1) +#define MV_INVALID (int)(-1) +#define MV_FALSE 0 +#define MV_TRUE (!(MV_FALSE)) + +#define MV_OK (0x00) /* Operation succeeded */ +#define MV_FAIL (0x01) /* Operation failed */ +#define MV_BAD_VALUE (0x02) /* Illegal value (general) */ +#define MV_OUT_OF_RANGE (0x03) /* The value is out of range */ +#define MV_BAD_PARAM (0x04) /* Illegal parameter in function called */ +#define MV_BAD_PTR (0x05) /* Illegal pointer value */ +#define MV_BAD_SIZE (0x06) /* Illegal size */ +#define MV_BAD_STATE (0x07) /* Illegal state of state machine */ +#define MV_SET_ERROR (0x08) /* Set operation failed */ +#define MV_GET_ERROR (0x09) /* Get operation failed */ +#define MV_CREATE_ERROR (0x0A) /* Fail while creating an item */ +#define MV_NOT_FOUND (0x0B) /* Item not found */ +#define MV_NO_MORE (0x0C) /* No more items found */ +#define MV_NO_SUCH (0x0D) /* No such item */ +#define MV_TIMEOUT (0x0E) /* Time Out */ +#define MV_NO_CHANGE (0x0F) /* Parameter(s) is already in this value */ +#define MV_NOT_SUPPORTED (0x10) /* This request is not support */ +#define MV_NOT_IMPLEMENTED (0x11) /* Request supported but not implemented */ +#define MV_NOT_INITIALIZED (0x12) /* The item is not initialized */ +#define MV_NO_RESOURCE (0x13) /* Resource not available (memory ...) */ +#define MV_FULL (0x14) /* Item is full (Queue or table etc...) */ +#define MV_EMPTY (0x15) /* Item is empty (Queue or table etc...) */ +#define MV_INIT_ERROR (0x16) /* Error occured while INIT process */ +#define MV_HW_ERROR (0x17) /* Hardware error */ +#define MV_TX_ERROR (0x18) /* Transmit operation not succeeded */ +#define MV_RX_ERROR (0x19) /* Recieve operation not succeeded */ +#define MV_NOT_READY (0x1A) /* The other side is not ready yet */ +#define MV_ALREADY_EXIST (0x1B) /* Tried to create existing item */ +#define MV_OUT_OF_CPU_MEM (0x1C) /* Cpu memory allocation failed. */ +#define MV_NOT_STARTED (0x1D) /* Not started yet */ +#define MV_BUSY (0x1E) /* Item is busy. */ +#define MV_TERMINATE (0x1F) /* Item terminates it's work. */ +#define MV_NOT_ALIGNED (0x20) /* Wrong alignment */ +#define MV_NOT_ALLOWED (0x21) /* Operation NOT allowed */ +#define MV_WRITE_PROTECT (0x22) /* Write protected */ + + +#ifndef NULL +#define NULL ((void*)0) +#endif + + +/*! + * Defines + * The following is a list of Marvell type definition + */ +typedef float MV_FLOAT; +typedef double MV_BOUBLE; + +typedef char MV_8; +typedef unsigned char MV_U8; +typedef short MV_16; +typedef unsigned short MV_U16; +typedef void MV_VOID; + + +#if (defined(WIN32)) +# include +# include + + typedef unsigned int MV_U32; + typedef signed int MV_32; + typedef unsigned __int64 MV_U64; + typedef signed __int64 MV_64; +/*--------------------------------------------------------------------------- + ARMCC (RVCT) + ---------------------------------------------------------------------------*/ +#elif defined (__ARMCC_VERSION) + + typedef unsigned int MV_U32; + typedef signed int MV_32; + typedef unsigned long long MV_U64; + typedef signed long long MV_64; + +#elif (defined(__GNUC__)) +#if defined(__UBOOT__) || defined(__LINUX_KERNEL__) || defined(NON_OS) +#else +# include +# include +# include +#endif +#if 0 + typedef __uint32_t MV_U32; + typedef __int32_t MV_32; + typedef __uint64_t MV_U64; + typedef __int64_t MV_64; +#else + typedef unsigned long MV_U32; + typedef signed long MV_32; + typedef unsigned long long MV_U64; + typedef signed long long MV_64; +#endif + +#else + typedef unsigned long MV_U32; + typedef signed long MV_32; + typedef unsigned long long MV_U64; + typedef signed long long MV_64; + +#endif +#endif /* __GALOIS_TYPE_H__ */ + diff --git a/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/maddr.h b/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/maddr.h new file mode 100644 index 00000000..8421a77e --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/maddr.h @@ -0,0 +1,93 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + +#ifndef maddr_h +#define maddr_h (){} + + #define CPCB0_VT_L 0x1404 //FF + #define CPCB0_VT_H 0x1405 //0F + #define CPCB2_VT_L 0x1734 //FF + #define CPCB2_VT_H 0x1735 //0F + + #define CPCB0_P2_CR1_SX_L 0x1440 //FF + + #define CPCB0_P1_SX_L 0x1420 //FF + #define CPCB0_P1_CR1_SX_L 0x1428 //FF + #define CPCB0_P1_CR2_SX_L 0x1430 //FF + #define CPCB0_P2_SX_L 0x1438 //FF + + #define CPCB0_VO_WEIGHT 0x148C //FF + + #define CPCB0_OO_LAY12 0x14EA //FF + #define CPCB0_OO_LAY34 0x14EB //FF + #define CPCB0_OO_FIX_0 0x14EC //FF + #define CPCB0_OO_FIX_1 0x14ED //FF + #define CPCB0_OO_FIX_2 0x14EE //FF + #define CPCB0_OO_FIX0_0 0x14F0 //FF + #define CPCB0_OO_FIX0_1 0x14F1 //FF + #define CPCB0_OO_FIX0_2 0x14F2 //FF + #define CPCB0_OO_FIX1_0 0x14F4 //FF + #define CPCB0_OO_FIX1_1 0x14F5 //FF + #define CPCB0_OO_FIX1_2 0x14F6 //FF + #define CPCB0_OO_FIX2_0 0x14F8 //FF + #define CPCB0_OO_FIX2_1 0x14F9 //FF + #define CPCB0_OO_FIX2_2 0x14FA //FF + #define CPCB0_OO_FIX3_0 0x14FC //FF + #define CPCB0_OO_FIX3_1 0x14FD //FF + #define CPCB0_OO_FIX3_2 0x14FE //FF + #define CPCB0_OO_CTRL 0x1500 //03 + #define CPCB0_OO_P1_AL 0x1501 //FF + #define CPCB0_OO_P2_AL 0x1502 //FF + #define CPCB0_OO_FIX3A_0 0x1504 //FF + #define CPCB0_OO_FIX3A_1 0x1505 //FF + #define CPCB0_OO_FIX3A_2 0x1506 //FF + + #define CPCB1_VO_WEIGHT 0x168F //FF + + #define CPCB2_OO_FIX0_0 0x17C0 //FF + #define CPCB2_OO_FIX1_0 0x17C4 //FF + #define CPCB2_P1_SX_L 0x1750 //FF + + #define CPCB0_OO_P3D_AL 0x1E08 //FF + + #define CPCB0_OO_P5_AL 0x1E0A //FF + #define CPCB0_OO_P6_AL 0x1E0B //FF + #define CPCB0_OO_P7_AL 0x1E0C //FF + #define CPCB0_OO_P7A_AL 0x1E0D //FF + #define CPCB0_OO_P7B_AL 0x1E0E //FF + #define CPCB0_OO_P7C_AL 0x1E0F //FF + #define CPCB0_OO_P7D_AL 0x1E10 //FF + + #define CPCB0_OO_FIX3B_0 0x1E48 //FF + #define CPCB0_OO_FIX3B_1 0x1E49 //FF + #define CPCB0_OO_FIX3B_2 0x1E4A //FF + + #define CPCB0_OO_FIX3C_0 0x1E4C //FF + #define CPCB0_OO_FIX3C_1 0x1E4D //FF + #define CPCB0_OO_FIX3C_2 0x1E4E //FF + + #define CPCB0_OO_FIX3D_0 0x1E50 //FF + #define CPCB0_OO_FIX3D_1 0x1E51 //FF + #define CPCB0_OO_FIX3D_2 0x1E52 //FF + + #define CPCB0_OO_LAY56 0x1E54 //FF + #define CPCB0_OO_LAY7 0x1E55 //07 + + #define VOP_HDMI_SEL 0x1803 //07 + +#endif diff --git a/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/vpp.h b/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/vpp.h new file mode 100644 index 00000000..78c0a551 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo/inc_bg2cdp/vpp.h @@ -0,0 +1,66 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the GPL License), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + +#ifndef vpp_h +#define vpp_h (){} + + #define RA_LDR_BG 0x0000 + #define RA_LDR_MAIN 0x0014 + #define RA_LDR_PIP 0x0028 + #define RA_LDR_PG 0x0400 + #define RA_LDR_IG 0x0C00 + #define RA_LDR_CURSOR 0x1400 + #define RA_LDR_MOSD 0x2000 + + #define RA_Vpp_VP_DMX_CTRL 0x12C04 + #define RA_Vpp_VP_DMX_HRES 0x12C08 + #define RA_Vpp_VP_DMX_HT 0x12C0C + #define RA_Vpp_VP_DMX_VRES 0x12C10 + #define RA_Vpp_VP_DMX_VT 0x12C14 + #define RA_Vpp_VP_DMX_IVT 0x12C18 + + #define RA_Vpp_LDR 0x10400 + #define RA_PLANE_SIZE 0x0000 + #define RA_PLANE_CROP 0x0004 + + #define RA_TG_SIZE 0x0004 + #define RA_TG_HB 0x000C + #define RA_TG_VB0 0x0018 + + #define RA_Vpp_vpIn_pix_A0 0x10098 + #define RA_Vpp_vpIn_pix_Z1 0x10094 + #define RA_Vpp_vpIn_pix_CD_A0 0x100EC + + #define RA_Vpp_vpOut_pix_A0 0x1009C + #define RA_Vpp_vpOut_pix_Z1 0x10098 + #define RA_Vpp_vpOut_pix_CD_A0 0x100F0 + + #define RA_Vpp_diW_pix_A0 0x100AC + #define RA_Vpp_diW_pix_Z1 0x100A8 + #define RA_Vpp_diW_pix_CD_A0 0x10100 + + #define RA_Vpp_diR_word_A0 0x100B0 + #define RA_Vpp_diR_word_Z1 0x100AC + #define RA_Vpp_diR_word_CD_A0 0x10104 + + #define RA_Vpp_VP_TG_A0 0x100DC + #define RA_Vpp_VP_TG_Z1 0x100D8 + #define RA_Vpp_VP_TG_CD_A0 0x10130 + +#endif diff --git a/arch/arm/mach-berlin/modules/fastlogo/logo_data.h b/arch/arm/mach-berlin/modules/fastlogo/logo_data.h index c1bbaabf..d9a02c43 100644 --- a/arch/arm/mach-berlin/modules/fastlogo/logo_data.h +++ b/arch/arm/mach-berlin/modules/fastlogo/logo_data.h @@ -5,7 +5,6 @@ static unsigned int yuv_logo_height = 112; static unsigned int yuv_logo_offset_x = 210; static unsigned int yuv_logo_offset_y = 368; -static unsigned int yuv_logo_bytepp = 2; /* Stride is a product of the width and bytes per pixel, assuming * the image itself is not padded. */ diff --git a/arch/arm/mach-berlin/modules/fastlogo/Common/include/Firmware_Berlin_BG2_A0/Galois_memmap.h b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/Common/include/Firmware_Berlin_BG2CD_A0/Galois_memmap.h similarity index 100% rename from arch/arm/mach-berlin/modules/fastlogo/Common/include/Firmware_Berlin_BG2_A0/Galois_memmap.h rename to arch/arm/mach-berlin/modules/fastlogo_bg2cd/Common/include/Firmware_Berlin_BG2CD_A0/Galois_memmap.h diff --git a/arch/arm/mach-berlin/modules/fastlogo/Common/include/Firmware_Berlin_BG2CD_A0/avio.h b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/Common/include/Firmware_Berlin_BG2CD_A0/avio.h similarity index 100% rename from arch/arm/mach-berlin/modules/fastlogo/Common/include/Firmware_Berlin_BG2CD_A0/avio.h rename to arch/arm/mach-berlin/modules/fastlogo_bg2cd/Common/include/Firmware_Berlin_BG2CD_A0/avio.h diff --git a/arch/arm/mach-berlin/modules/fastlogo/Common/include/Firmware_Berlin_BG2CD_A0/vpp.h b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/Common/include/Firmware_Berlin_BG2CD_A0/vpp.h similarity index 100% rename from arch/arm/mach-berlin/modules/fastlogo/Common/include/Firmware_Berlin_BG2CD_A0/vpp.h rename to arch/arm/mach-berlin/modules/fastlogo_bg2cd/Common/include/Firmware_Berlin_BG2CD_A0/vpp.h diff --git a/arch/arm/mach-berlin/modules/fastlogo_bg2cd/Common/include/Firmware_Berlin_BG2_A0/Galois_memmap.h b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/Common/include/Firmware_Berlin_BG2_A0/Galois_memmap.h new file mode 100755 index 00000000..3eb1921b --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/Common/include/Firmware_Berlin_BG2_A0/Galois_memmap.h @@ -0,0 +1,28 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the GPL License), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + +#ifndef Galois_memmap_h +#define Galois_memmap_h (){} + + #define MEMMAP_VPP_REG_BASE 0xF7F60000 + #define MEMMAP_VPP_DHUB_REG_BASE 0xF7F40000 + #define MEMMAP_AG_DHUB_REG_BASE 0xF7D00000 + #define MEMMAP_AVIO_BCM_REG_BASE 0xF7B50000 + +#endif diff --git a/arch/arm/mach-berlin/modules/fastlogo/Common/include/Firmware_Berlin_BG2_A0/avio.h b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/Common/include/Firmware_Berlin_BG2_A0/avio.h similarity index 100% rename from arch/arm/mach-berlin/modules/fastlogo/Common/include/Firmware_Berlin_BG2_A0/avio.h rename to arch/arm/mach-berlin/modules/fastlogo_bg2cd/Common/include/Firmware_Berlin_BG2_A0/avio.h diff --git a/arch/arm/mach-berlin/modules/fastlogo/Common/include/Firmware_Berlin_BG2_A0/vpp.h b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/Common/include/Firmware_Berlin_BG2_A0/vpp.h similarity index 100% rename from arch/arm/mach-berlin/modules/fastlogo/Common/include/Firmware_Berlin_BG2_A0/vpp.h rename to arch/arm/mach-berlin/modules/fastlogo_bg2cd/Common/include/Firmware_Berlin_BG2_A0/vpp.h diff --git a/arch/arm/mach-berlin/modules/fastlogo_bg2cd/Common/include/com_type.h b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/Common/include/com_type.h new file mode 100755 index 00000000..b66f87c8 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/Common/include/com_type.h @@ -0,0 +1,233 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + + +#ifndef __COMMON_TYPE_H__ +#define __COMMON_TYPE_H__ + +#include +#include + + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Basic data types and macros +//////////////////////////////////////////////////////////////////////////////// +typedef unsigned char UCHAR; +typedef char CHAR; +#ifndef BOOL +typedef UCHAR BOOL; +#endif + +typedef UCHAR BOOLEAN; +typedef short SHORT; +typedef unsigned short USHORT; +typedef int INT; +typedef unsigned int UINT; +typedef long LONG; +typedef unsigned long ULONG; +typedef long long LONGLONG; +typedef unsigned long long ULONGLONG; +typedef void VOID; +typedef void* PTR; +typedef void** PHANDLE; +typedef void* HANDLE; +typedef void* PVOID; + +typedef UCHAR BYTE; + +typedef CHAR INT8; +typedef UCHAR UINT8; +typedef short INT16; +typedef unsigned short UINT16; +typedef int INT32; +typedef unsigned int UINT32; +typedef long long INT64; +typedef unsigned long long UINT64; +typedef unsigned int SIZE_T; + +typedef signed int HRESULT; + +typedef struct +{ + UINT Data1; + UINT16 Data2; + UINT16 Data3; + UCHAR Data4[8]; +} GUID; + +#ifndef _MAX_PATH +#define _MAX_PATH 260 +#endif + +#ifndef TRUE +#define TRUE (1) +#endif +#ifndef FALSE +#define FALSE (0) +#endif + +#ifndef true +#define true (1) +#endif +#ifndef false +#define false (0) +#endif + +#ifndef True +#define True (1) +#endif +#ifndef False +#define False (0) +#endif + +#ifndef NULL +#define NULL ((void *)0) +#endif + +#ifndef IN +#define IN +#endif +#ifndef OUT +#define OUT +#endif +#ifndef INOUT +#define INOUT +#endif + +#define MV_CAST(type) type + + + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Memory allocation and related... +//////////////////////////////////////////////////////////////////////////////// + +#define GaloisCalloc calloc + +#define GALOIS_CACHE_LINE 32 + + +#ifdef BERLIN_SINGLE_CPU +#define SINGLE_CPU_FLICK_HACK +#endif + +#define GaloisMalloc malloc +#define GaloisCalloc calloc +#define GaloisFree(p) \ + do { \ + if ((p) != NULL) { \ + free((void *)(p)); \ + (p) = NULL; \ + } \ + } while (0) + +#if defined(__LINUX__) || !defined(SMALL_MEM_POOL_SUPPORT) +#define CommonMemPoolMalloc GaloisMalloc +#define CommonMemPoolFree GaloisFree +#endif + +// BD IG/PG and GFX Memory malloc/free functions for small buffer. +// By Wanyong, 20090605. +#define GFXMalloc CommonMemPoolMalloc +#define GFXFree CommonMemPoolFree +#define BDRESUBMalloc CommonMemPoolMalloc +#define BDRESUBFree CommonMemPoolFree + +#define GaloisMemmove memmove +#define GaloisMemcpy memcpy +#define GaloisMemClear(buf, n) memset((buf), 0, (n)) +#define GaloisMemSet(buf, c, n) memset((buf), (c), (n)) +#define GaloisMemComp(buf1, buf2, n) memcmp((buf1), (buf2), (n)) + +#define UINT_ADDR(a, b) ((UINT *)(a) + ((b) >> 2)) +#define USHORT_ADDR(a,b) ((USHORT *)(a) + ((b) >> 1)) +#define UCHAR_ADDR(a, b) ((UCHAR *)(a) + (b)) +#define INT_ADDR(a, b) ((INT *)(a) + ((b) >> 2)) +#define SHORT_ADDR(a,b) ((SHORT *)(a) + ((b) >> 1)) +#define CHAR_ADDR(a, b) ((CHAR *)(a) + (b)) + + + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Some useful macros and defs +//////////////////////////////////////////////////////////////////////////////// +#ifndef MIN +#define MIN(A, B) ((A) < (B) ? (A) : (B)) +#endif +#ifndef MAX +#define MAX(A, B) ((A) > (B) ? (A) : (B)) +#endif + +#ifndef SWAP +#define SWAP(a, b) \ + do \ + { \ + (a) ^= (b); \ + (b) ^= (a); \ + (a) ^= (b); \ + } while (0) +#endif + +#ifdef ENABLE_DEBUG + +#define DBGPRINTF(x) printk x +#define ERRPRINTF(x) printk x +#define LOGPRINTF(x) printk x +#define ASSERT(x) printk (x) + +#else + +#define ASSERT(x) do {;} while (0) +#define DBGPRINTF(x) do {;} while (0) +#define ERRPRINTF(x) do {;} while (0) +#define LOGPRINTF(x) do {;} while (0) + +#endif // ENABLE_DEBUG + +#ifndef ASSERT +#define ASSERT(x) MV_ASSERT(x) +#endif // ASSERT + +/*common definition*/ +#define KB (0x400) +#define MB (0x100000) + +#ifdef CPU_BIG_ENDIAN +#define FCC_GEN(a, b, c, d) (((a)<<24) |((b)<<16) | ((c)<<8) | (d)) +#else +#define FCC_GEN(a, b, c, d) (((d)<<24) |((c)<<16) | ((b)<<8) | (a)) +#endif + +// Definitions for array operations +#define GaloisMemberIndexInArray(array, member) \ + (((unsigned long)(member) - (unsigned long)(array)) / sizeof(*(member))) + +#ifdef __cplusplus +extern "C" { +#endif + +// Get number of items in an array; +// The input parameter 'array' has to be a 'c' array, not a pointer or 'c++' array +#define GaloisSizeOfArray(array) (sizeof(array)/sizeof(array[0])) + +#ifdef __cplusplus +} +#endif + +#endif // #ifndef __COMMON_TYPE__ diff --git a/arch/arm/mach-berlin/modules/fastlogo_bg2cd/DHUB/source/avio_dhub_drv.c b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/DHUB/source/avio_dhub_drv.c new file mode 100755 index 00000000..b067d890 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/DHUB/source/avio_dhub_drv.c @@ -0,0 +1,199 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + + +#include "api_avio_dhub.h" + +HDL_dhub2d AG_dhubHandle; +HDL_dhub2d VPP_dhubHandle; +HDL_dhub2d VIP_dhubHandle; + +DHUB_channel_config VPP_config[VPP_NUM_OF_CHANNELS] = { +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) + // BANK0 + { avioDhubChMap_vpp_MV_R, DHUB_BANK0_START_ADDR, DHUB_BANK0_START_ADDR+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_MV_FRC_R, DHUB_BANK0_START_ADDR + 2048*2, DHUB_BANK0_START_ADDR + 2048*2+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_MV_FRC_W, DHUB_BANK0_START_ADDR + 2048*3, DHUB_BANK0_START_ADDR + 2048*3+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // BANK1 + { avioDhubChMap_vpp_PIP_R, DHUB_BANK1_START_ADDR, DHUB_BANK1_START_ADDR+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_PIP_FRC_R,DHUB_BANK1_START_ADDR +2048*2, DHUB_BANK1_START_ADDR + 2048*2+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_PIP_FRC_W,DHUB_BANK1_START_ADDR + 2048*3, DHUB_BANK1_START_ADDR + 2048*3+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // BANK2 + { avioDhubChMap_vpp_DINT0_R,DHUB_BANK2_START_ADDR, DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // BANK3 + { avioDhubChMap_vpp_DINT1_R,DHUB_BANK3_START_ADDR, DHUB_BANK3_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // BANK4 + { avioDhubChMap_vpp_DINT_W,DHUB_BANK4_START_ADDR, DHUB_BANK4_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // Bank5 + { avioDhubChMap_vpp_BCM_R, DHUB_BANK5_START_ADDR, DHUB_BANK5_START_ADDR+512, 512, (1024-512), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_HDMI_R, DHUB_BANK5_START_ADDR+1024, DHUB_BANK5_START_ADDR+1024+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_AUX_FRC_R,DHUB_BANK5_START_ADDR+1024+512, DHUB_BANK5_START_ADDR+1024+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_AUX_FRC_W,DHUB_BANK5_START_ADDR+2048+512, DHUB_BANK5_START_ADDR+2048+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_BG_R,DHUB_BANK5_START_ADDR+2048+512*3, DHUB_BANK5_START_ADDR+2048+512*3+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_TT_R,DHUB_BANK5_START_ADDR+2048*3+512*3, DHUB_BANK5_START_ADDR+2048*3+512*3+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, +#else /* (BERLIN_CHIP_VERSION == BERLIN_BG2CD_A0) */ + // BANK0 + { avioDhubChMap_vpp_MV_R, VPP_DHUB_BANK0_START_ADDR, VPP_DHUB_BANK0_START_ADDR+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_MV_FRC_R, VPP_DHUB_BANK0_START_ADDR + 2048*2, VPP_DHUB_BANK0_START_ADDR + 2048*2+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_MV_FRC_W, VPP_DHUB_BANK0_START_ADDR + 2048*3, VPP_DHUB_BANK0_START_ADDR + 2048*3+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // BANK1 + { avioDhubChMap_vpp_DINT0_R,VPP_DHUB_BANK1_START_ADDR, VPP_DHUB_BANK1_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // BANK2 + { avioDhubChMap_vpp_DINT1_R,VPP_DHUB_BANK2_START_ADDR, VPP_DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // BANK3 + { avioDhubChMap_vpp_DINT_W,VPP_DHUB_BANK3_START_ADDR, VPP_DHUB_BANK3_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // Bank4 + { avioDhubChMap_vpp_BCM_R, VPP_DHUB_BANK4_START_ADDR, VPP_DHUB_BANK4_START_ADDR+128, 128, (1024-128), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_HDMI_R, VPP_DHUB_BANK4_START_ADDR+1024, VPP_DHUB_BANK4_START_ADDR+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_SPDIF_W,VPP_DHUB_BANK4_START_ADDR+1024*2, VPP_DHUB_BANK4_START_ADDR+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1} +#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ +}; +DHUB_channel_config AG_config[AG_NUM_OF_CHANNELS] = { +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) + // Bank0 + { avioDhubChMap_ag_APPCMD_R, DHUB_BANK0_START_ADDR, DHUB_BANK0_START_ADDR+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA0_R, DHUB_BANK0_START_ADDR+512, DHUB_BANK0_START_ADDR+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA1_R, DHUB_BANK0_START_ADDR+512+1024,DHUB_BANK0_START_ADDR+512+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA2_R, DHUB_BANK0_START_ADDR+512+1024*2,DHUB_BANK0_START_ADDR+512+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA3_R, DHUB_BANK0_START_ADDR+512+1024*3,DHUB_BANK0_START_ADDR+512+1024*3+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_SA_R, DHUB_BANK0_START_ADDR+512+1024*4,DHUB_BANK0_START_ADDR+512+1024*4+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_SPDIF_R, DHUB_BANK0_START_ADDR+512+1024*5, DHUB_BANK0_START_ADDR+512+1024*5+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MIC_W, DHUB_BANK0_START_ADDR+1024*6, DHUB_BANK0_START_ADDR+1024*6+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_APPDAT_R, DHUB_BANK0_START_ADDR+512+1024*6, DHUB_BANK0_START_ADDR+512+1024*6+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_APPDAT_W, DHUB_BANK0_START_ADDR+1024*7, DHUB_BANK0_START_ADDR+1024*7+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // Bank1 + { avioDhubChMap_ag_MOSD_R, DHUB_BANK1_START_ADDR, DHUB_BANK1_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // Bank2 + { avioDhubChMap_ag_CSR_R, DHUB_BANK2_START_ADDR, DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // Bank3 + { avioDhubChMap_ag_GFX_R, DHUB_BANK3_START_ADDR, DHUB_BANK3_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // Bank4 + { avioDhubChMap_ag_PG_R, DHUB_BANK4_START_ADDR, DHUB_BANK4_START_ADDR+32, 32, (2048*3-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_ag_PG_ENG_R, DHUB_BANK4_START_ADDR + (2048 * 3), DHUB_BANK4_START_ADDR + (2048 *3) + 32, 32, (1024 - 32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_PG_ENG_W, DHUB_BANK4_START_ADDR + (2048 * 3) + 1024, DHUB_BANK4_START_ADDR + (2048 * 3) + 1024 + 32, 32, (1024 - 32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, +#else /* (BERLIN_CHIP_VERSION == BERLIN_BG2CD_A0) */ + // Bank0 + { avioDhubChMap_ag_APPCMD_R, AG_DHUB_BANK0_START_ADDR, AG_DHUB_BANK0_START_ADDR+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA0_R, AG_DHUB_BANK0_START_ADDR+512, AG_DHUB_BANK0_START_ADDR+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA1_R, AG_DHUB_BANK0_START_ADDR+512+1024,AG_DHUB_BANK0_START_ADDR+512+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA2_R, AG_DHUB_BANK0_START_ADDR+512+1024*2,AG_DHUB_BANK0_START_ADDR+512+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA3_R, AG_DHUB_BANK0_START_ADDR+512+1024*3,AG_DHUB_BANK0_START_ADDR+512+1024*3+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_SPDIF_R, AG_DHUB_BANK0_START_ADDR+512+1024*5, AG_DHUB_BANK0_START_ADDR+512+1024*5+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_APPDAT_R, AG_DHUB_BANK0_START_ADDR+512+1024*6, AG_DHUB_BANK0_START_ADDR+512+1024*6+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_APPDAT_W, AG_DHUB_BANK0_START_ADDR+1024*7, AG_DHUB_BANK0_START_ADDR+1024*7+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // Bank1 + { avioDhubChMap_ag_CSR_R, AG_DHUB_BANK1_START_ADDR, AG_DHUB_BANK1_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // Bank2 + { avioDhubChMap_ag_GFX_R, AG_DHUB_BANK2_START_ADDR, AG_DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, +#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ +}; +/****************************************************************************************************************** + * Function: DhubInitialization + * Description: Initialize DHUB . + * Parameter : cpuId ------------- cpu ID + * dHubBaseAddr ------------- dHub Base address. + * hboSramAddr ----- Sram Address for HBO. + * pdhubHandle ----- pointer to 2D dhubHandle + * dhub_config ----- configuration of AG + * numOfChans ----- number of channels + * Return: void +******************************************************************************************************************/ +void DhubInitialization(SIGN32 cpuId, UNSG32 dHubBaseAddr, UNSG32 hboSramAddr, HDL_dhub2d *pdhubHandle, DHUB_channel_config *dhub_config,SIGN32 numOfChans) +{ + HDL_semaphore *pSemHandle; + SIGN32 i; + SIGN32 chanId; + + //Initialize HDL_dhub with a $dHub BIU instance. + dhub2d_hdl( hboSramAddr, /*! Base address of dHub.HBO SRAM !*/ + dHubBaseAddr, /*! Base address of a BIU instance of $dHub !*/ + pdhubHandle /*! Handle to HDL_dhub2d !*/ + ); + //set up semaphore to trigger cmd done interrupt + //note that this set of semaphores are different from the HBO semaphores + //the ID must match the dhub ID because they are hardwired. + pSemHandle = dhub_semaphore(&pdhubHandle->dhub); + + for (i = 0; i< numOfChans; i++) { + //Configurate a dHub channel + //note that in this function, it also configured right HBO channels(cmdQ and dataQ) and semaphores + chanId = dhub_config[i].chanId; + { + dhub_channel_cfg( + &pdhubHandle->dhub, /*! Handle to HDL_dhub !*/ + chanId, /*! Channel ID in $dHubReg !*/ + dhub_config[chanId].chanCmdBase, //UNSG32 baseCmd, /*! Channel FIFO base address (byte address) for cmdQ !*/ + dhub_config[chanId].chanDataBase, //UNSG32 baseData, /*! Channel FIFO base address (byte address) for dataQ !*/ + dhub_config[chanId].chanCmdSize/8, //SIGN32 depthCmd, /*! Channel FIFO depth for cmdQ, in 64b word !*/ + dhub_config[chanId].chanDataSize/8, //SIGN32 depthData, /*! Channel FIFO depth for dataQ, in 64b word !*/ + dhub_config[chanId].chanMtuSize, /*! See 'dHubChannel.CFG.MTU', 0/1/2 for 8/32/128 bytes !*/ + dhub_config[chanId].chanQos, /*! See 'dHubChannel.CFG.QoS' !*/ + dhub_config[chanId].chanSelfLoop, /*! See 'dHubChannel.CFG.selfLoop' !*/ + dhub_config[chanId].chanEnable, /*! 0 to disable, 1 to enable !*/ + 0 /*! Pass NULL to directly init dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + // setup interrupt for channel chanId + //configure the semaphore depth to be 1 + semaphore_cfg(pSemHandle, chanId, 1, 0); + } + } +} + +/****************************************************************************************************************** + * Function: DhubChannelClear + * Description: Clear corresponding DHUB channel. + * Parameter: hdl ---------- handle to HDL_dhub + * id ---------- channel ID in dHubReg + * cfgQ ---------- pass null to directly init dhub, or pass non-zero to receive programming + * sequence in (adr, data) pairs + * Return: void +******************************************************************************************************************/ +void DhubChannelClear(void *hdl, SIGN32 id, T64b cfgQ[]) +{ + UNSG32 cmdID = dhub_id2hbo_cmdQ(id); + UNSG32 dataID = dhub_id2hbo_data(id); + HDL_dhub *dhub = (HDL_dhub *)hdl; + HDL_hbo *hbo = &(dhub->hbo); + + /* 1.Software stops the command queue in HBO (please refer to HBO.sxw for details) */ + hbo_queue_enable(hbo, cmdID, 0, cfgQ); + /* 2.Software stops the channel in dHub by writing zero to dHubChannel.START.EN */ + dhub_channel_enable(dhub, id, 0, cfgQ); + /* 3.Software clears the channel in dHub by writing one to dHubChannel.CLEAR.EN */ + dhub_channel_clear(dhub, id); + /* 4.Software waits for the register bits dHubChannel.PENDING.ST and dHubChannel.BUSY.ST to be 0 */ + dhub_channel_clear_done(dhub, id); + /* 5.Software stops and clears the command queue */ + hbo_queue_enable(hbo, cmdID, 0, cfgQ); + hbo_queue_clear(hbo, cmdID); + /* 6.Software wait for the corresponding busy bit to be 0 */ + hbo_queue_clear_done(hbo, cmdID); + /* 7.Software stops and clears the data queue */ + hbo_queue_enable(hbo, dataID, 0, cfgQ); + hbo_queue_clear(hbo, dataID); + /* 8.Software wait for the corresponding data Q busy bit to be 0 */ + hbo_queue_clear_done(hbo, dataID); + /* 9.Software enable dHub and HBO */ + dhub_channel_enable(dhub, id, 1, cfgQ); + hbo_queue_enable(hbo, cmdID, 1, cfgQ); + hbo_queue_enable(hbo, dataID, 1, cfgQ); +} diff --git a/arch/arm/mach-berlin/modules/fastlogo_bg2cd/Makefile b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/Makefile new file mode 100755 index 00000000..31d2c628 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/Makefile @@ -0,0 +1,44 @@ +include $(srctree)/arch/arm/mach-berlin/mv88de3100.mk + +MWD=$(srctree)/arch/arm/mach-berlin +PWD=$(MWD)/modules/fastlogo_bg2cd + +HEADER_PATH := \ + -I$(MWD)/include \ + -I$(MWD)/include/mach \ + -I$(MWD)/modules/shm \ + -I$(MWD)/modules/cc \ + -I$(MWD)/modules/nfc \ + -I$(MWD)/modules/pe \ + -I$(MWD)/modules/pe/gsinc \ + -I$(MWD)/modules/pe/gsinc/$(FIRMWARE) \ + -I$(PWD)/Common/include \ + -I$(PWD)/Common/include/$(FIRMWARE) + +ccflags-y += -DLOGO_ENABLE_MAIN=1 -DLOGO_ENABLE_PIP=0 -DLOGO_ENABLE_AUX=0 +ccflags-y += -DLOGO_PROC_FS=1 -DLOGO_TIME_PROFILE=1 +ifeq ($(CONFIG_BERLIN_SHM),y) +ccflags-y += -DLOGO_USE_SHM=1 +endif +ccflags-y += $(MV_DEFINE) $(HEADER_PATH) + +ccflags-y += -I$(PWD)/THINVPP/source/include/include_BG2_A0 + +ccflags-y += -I$(PWD)/THINVPP/include +ccflags-y += -I$(PWD)/THINVPP/source/include +ccflags-y += -I$(PWD)/THINVPP/source/MISC/include +asflags-y += -I$(PWD) + + +FASTLOGO_OBJ += THINVPP/source/thinvpp_api.o +FASTLOGO_OBJ += THINVPP/source/thinvpp_apifuncs.o +FASTLOGO_OBJ += THINVPP/source/thinvpp_isr.o +FASTLOGO_OBJ += THINVPP/source/MISC/source/thinvpp_bcmbuf.o +ifeq ($(CONFIG_BERLIN_PE),y) +#use the avio_dhub_drv in pe module +else +FASTLOGO_OBJ += DHUB/source/avio_dhub_drv.o +endif + +obj-$(CONFIG_BERLIN_FASTLOGO) += galois_fastlogo.o +galois_fastlogo-objs := fastlogo_driver.o $(FASTLOGO_OBJ) diff --git a/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/include/bcm_cmds.h b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/include/bcm_cmds.h new file mode 100644 index 00000000..4388d781 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/include/bcm_cmds.h @@ -0,0 +1,538 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + +static unsigned bcm_cmd_0[] = +{ +/* 1*/ 0x00000015,0xf7f70000, 0x0000000c,0xf7f65010, 0x00000002,0xf7f65014, 0x00000059,0xf7f65018, + 0x00000003,0xf7f6501c, 0x000000e0,0xf7f65030, 0x00000002,0xf7f65034, 0x000000e7,0xf7f65038, + 0x00000001,0xf7f6503c, 0x0000001e,0xf7f65040, 0x00000003,0xf7f65044, 0x000000e0,0xf7f65048, + 0x00000002,0xf7f6504c, 0x000000ef,0xf7f65050, 0x00000001,0xf7f65054, 0x000000e9,0xf7f65058, + 0x00000001,0xf7f6505c, 0x000000cf,0xf7f65448, 0x00000002,0xf7f6544c, 0x000000e3,0xf7f65458, + 0x00000002,0xf7f6545c, 0x000000f3,0xf7f65460, 0x00000000,0xf7f65464, 0x000000f6,0xf7f65468, + 0x00000000,0xf7f6546c, 0x000000f3,0xf7f65470, 0x00000000,0xf7f65474, 0x00000021,0xf7f65478, + 0x00000003,0xf7f6547c, 0x000000e3,0xf7f65480, 0x00000002,0xf7f65484, 0x000000e3,0xf7f65488, + 0x00000002,0xf7f6548c, 0x00000036,0xf7f65490, 0x00000001,0xf7f65494, 0x00000000,0xf7f65498, + 0x00000000,0xf7f6549c, 0x00000000,0xf7f654a0, 0x00000002,0xf7f654a4, 0x00000001,0xf7f65440, + 0x00000000,0xf7f65060, 0x00000000,0xf7f65064, 0x000000d0,0xf7f65068, 0x00000002,0xf7f6506c, + 0x00000000,0xf7f65070, 0x00000000,0xf7f65074, 0x000000e0,0xf7f65078, 0x00000001,0xf7f6507c, + 0x00000000,0xf7f65180, 0x00000000,0xf7f65184, 0x000000d0,0xf7f65188, 0x00000002,0xf7f6518c, + 0x00000000,0xf7f65190, 0x00000000,0xf7f65194, 0x000000e0,0xf7f65198, 0x00000001,0xf7f6519c, + 0x00000080,0xf7f66000, 0x00000000,0xf7f66004, 0x00000001,0xf7f66010, 0x00000000,0xf7f6600c, + 0x80000000,0xf7f653d0, 0x00000000,0xf7f653d4, 0x00000000,0xf7f653d8, 0x00000020,0xf7f65404, + 0x00000020,0xf7f67828, 0x00000000,0xf7f7041c, 0x00000000,0xf7f72c64, + 0x90000000,0xf7f70414, 0x00b40000,0xf7f70418, + 0xa0000000,0xf7f72c08, 0x000000ef,0xf7f72c10, 0x000002e5,0xf7f72c0c, + 0x000001e9,0xf7f72c18, 0x000001e9,0xf7f72c14, 0x00000001,0xf7f72c04, + 0xb0000000,0xf7f70134, 0x000702d8,0xf7f7013c, 0x000201e3,0xf7f70148, + 0xc0000000,0xf7f700ec, 0x00054600,0xf7f700f0, + 0x000548d0,0xf7f70100, 0x00022595,0xf7f70104, 0x00000050,0xf7f62018, 0x00000000,0xf7f621fc, + 0x00000000,0xf7f70120, 0x000000e0,0xf7f62180, 0x00000001,0xf7f62184, 0x000000d0,0xf7f62188, + 0x00000002,0xf7f6218c, 0x000000e0,0xf7f62190, 0x00000001,0xf7f62194, 0x000000d0,0xf7f62198, + 0x00000002,0xf7f6219c, 0x00000000,0xf7f621ec, 0x00000000,0xf7f621c0, 0x00000000,0xf7f621c4, + 0x00000010,0xf7f621c8, 0x00000000,0xf7f621b0, 0x00000000,0xf7f621b4, 0x00000010,0xf7f621b8, + 0x00000040,0xf7f620ac, 0x000000c2,0xf7f621f0, 0x00000000,0xf7f621e0, 0x00000000,0xf7f621d8, + 0x00000000,0xf7f621dc, 0x00000050,0xf7f700d8, 0x0000000b,0xf7f621e8, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000040,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000041,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000042,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000043,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000044,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000045,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000046,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000047,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000048,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000049,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000004a,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x0000004b,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000004c,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x0000004d,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000004e,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x0000004f,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000050,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000051,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000052,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000053,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000054,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000055,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000056,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000057,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000058,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x00000059,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000005a,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x0000005b,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000005c,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x0000005d,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000005e,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, + 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, + 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, + 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, + 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, + 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, + 0x00000000,0xf7f62284, 0x0000005f,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, + 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, + 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, + 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000008,0xf7f62254, 0x00000000,0xf7f62258, + 0x00000000,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, + 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, + 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000060,0xf7f62288, + 0x000000ff,0xf7f6228c, 0x0000000b,0xf7f621e4, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000000,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000001,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000002,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000003,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000004,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000005,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000006,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000007,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000008,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000009,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000000a,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x0000000b,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000000c,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x0000000d,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000000e,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x0000000f,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000010,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000011,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000012,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000013,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000014,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000015,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000016,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000017,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000018,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x00000019,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000001a,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x0000001b,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000001c,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x0000001d,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x0000001e,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, + 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, + 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, + 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, + 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, + 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, + 0x0000001f,0xf7f62288, 0x000000ff,0xf7f6228c, 0x00000000,0xf7f62228, 0x00000000,0xf7f6222c, + 0x00000000,0xf7f62230, 0x00000000,0xf7f62234, 0x00000000,0xf7f62238, 0x00000000,0xf7f6223c, + 0x00000000,0xf7f62240, 0x00000000,0xf7f62244, 0x00000000,0xf7f62248, 0x00000000,0xf7f6224c, + 0x00000000,0xf7f62250, 0x00000000,0xf7f62254, 0x00000000,0xf7f62258, 0x00000008,0xf7f6225c, + 0x00000000,0xf7f62260, 0x00000000,0xf7f62264, 0x00000000,0xf7f62268, 0x00000000,0xf7f6226c, + 0x00000000,0xf7f62270, 0x00000000,0xf7f62274, 0x00000000,0xf7f62278, 0x00000000,0xf7f6227c, + 0x00000000,0xf7f62280, 0x00000000,0xf7f62284, 0x00000020,0xf7f62288, 0x000000ff,0xf7f6228c, + 0x000000d0,0xf7f62090, 0x00000002,0xf7f62094, 0x000000e0,0xf7f62098, 0x00000001,0xf7f6209c, + 0x00000050,0xf7f63018, 0x00000000,0xf7f631fc, 0x000000e0,0xf7f63180, 0x00000001,0xf7f63184, + 0x000000d0,0xf7f63188, 0x00000002,0xf7f6318c, 0x000000e0,0xf7f63190, 0x00000001,0xf7f63194, + 0x000000d0,0xf7f63198, 0x00000002,0xf7f6319c, 0x00000000,0xf7f631ec, 0x00000000,0xf7f631c0, + 0x00000000,0xf7f631c4, 0x00000010,0xf7f631c8, 0x00000000,0xf7f631b0, 0x00000000,0xf7f631b4, + 0x00000010,0xf7f631b8, 0x00000040,0xf7f630ac, 0x000000c2,0xf7f631f0, 0x00000000,0xf7f631e0, + 0x00000000,0xf7f631d8, 0x00000000,0xf7f631dc, 0x00000001,0xf7f63288, 0x000000d0,0xf7f63090, + 0x00000002,0xf7f63094, 0x000000e0,0xf7f63098, 0x00000001,0xf7f6309c, + 0xd0000000,0xf7f65080, + 0x00000000,0xf7f65084, 0x000000d0,0xf7f65088, 0x00000002,0xf7f6508c, 0x00000000,0xf7f65090, + 0x00000000,0xf7f65094, 0x000000e0,0xf7f65098, 0x00000001,0xf7f6509c, 0x00000000,0xf7f650a0, + 0x00000000,0xf7f650a4, 0x000000d0,0xf7f650a8, 0x00000002,0xf7f650ac, 0x00000000,0xf7f650b0, + 0x00000000,0xf7f650b4, 0x000000e0,0xf7f650b8, 0x00000001,0xf7f650bc, 0x00000000,0xf7f650c0, + 0x00000000,0xf7f650c4, 0x000000d0,0xf7f650c8, 0x00000002,0xf7f650cc, 0x00000000,0xf7f650d0, + 0x00000000,0xf7f650d4, 0x000000e0,0xf7f650d8, 0x00000001,0xf7f650dc, 0x00000000,0xf7f651a0, + 0x00000000,0xf7f651a4, 0x000000d0,0xf7f651a8, 0x00000002,0xf7f651ac, 0x00000000,0xf7f651b0, + 0x00000000,0xf7f651b4, 0x000000e0,0xf7f651b8, 0x00000001,0xf7f651bc, 0x00000001,0xf7f70420, +}; +static unsigned bcm_cmd_0_len = sizeof(bcm_cmd_0); + +static const unsigned bcm_cmd_a[] = +{ + 0x00000000,0xf7f653d0, 0x00000000,0xf7f653d4, 0x00000000,0xf7f653d8, 0x000000ff,0xf7f65404, + 0x000000ff,0xf7f67828, +}; +static unsigned bcm_cmd_a_len = sizeof(bcm_cmd_a); + +static const unsigned bcm_cmd_n[] = +{ + 0x00000001,0xf7f70420, +}; +static unsigned bcm_cmd_n_len = sizeof(bcm_cmd_n); + +static const unsigned bcm_cmd_z[] = +{ + 0x00000000,0xf7f65010, 0x00000000,0xf7f65014, 0x00000000,0xf7f65018, 0x00000000,0xf7f6501c, + 0x00000000,0xf7f65030, 0x00000000,0xf7f65034, 0x00000007,0xf7f65038, 0x00000000,0xf7f6503c, + 0x00000000,0xf7f65040, 0x00000000,0xf7f65044, 0x00000000,0xf7f65048, 0x00000000,0xf7f6504c, + 0x00000000,0xf7f65050, 0x00000000,0xf7f65054, 0x00000000,0xf7f65058, 0x00000000,0xf7f6505c, + 0x000000cf,0xf7f65448, 0x00000002,0xf7f6544c, 0x00000000,0xf7f65458, 0x00000000,0xf7f6545c, + 0x00000000,0xf7f65460, 0x00000000,0xf7f65464, 0x00000000,0xf7f65468, 0x00000000,0xf7f6546c, + 0x00000000,0xf7f65470, 0x00000000,0xf7f65474, 0x00000000,0xf7f65478, 0x00000000,0xf7f6547c, + 0x00000000,0xf7f65480, 0x00000000,0xf7f65484, 0x00000000,0xf7f65488, 0x00000000,0xf7f6548c, + 0x00000000,0xf7f65490, 0x00000000,0xf7f65494, 0x00000000,0xf7f65498, 0x00000000,0xf7f6549c, + 0x00000000,0xf7f654a0, 0x00000002,0xf7f654a4, 0x00000001,0xf7f65440, 0x00000000,0xf7f65060, + 0x00000000,0xf7f65064, 0x00000000,0xf7f65068, 0x00000000,0xf7f6506c, 0x00000000,0xf7f65070, + 0x00000000,0xf7f65074, 0x00000000,0xf7f65078, 0x00000000,0xf7f6507c, 0x00000000,0xf7f65180, + 0x00000000,0xf7f65184, 0x00000000,0xf7f65188, 0x00000000,0xf7f6518c, 0x00000000,0xf7f65190, + 0x00000000,0xf7f65194, 0x00000000,0xf7f65198, 0x00000000,0xf7f6519c, +}; +static unsigned bcm_cmd_z_len = sizeof(bcm_cmd_z); +static unsigned bcmQ_len = ((sizeof(bcm_cmd_0)+63)&~63); + +static unsigned logo_frame_dma_cmd[] = +{ + 0x00000000,0xf7f50d08, + 0x11000000,0xf7f50d00, 0x21e005a0,0xf7f50d04, 0x000005a0,0xf7f50d10, + 0x00000001,0xf7f50d08, +}; +static unsigned logo_dma_cmd_len = sizeof(logo_frame_dma_cmd); diff --git a/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/include/thinvpp_api.h b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/include/thinvpp_api.h new file mode 100755 index 00000000..9f7d0929 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/include/thinvpp_api.h @@ -0,0 +1,2014 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + + +#ifndef _THINVPP_API_H_ +#define _THINVPP_API_H_ + +#include "thinvpp_api_types.h" + +// error code definitions +#define MV_THINVPP_OK 1 +#define MV_THINVPP_ENODEV -1 +#define MV_THINVPP_EBADPARAM -2 +#define MV_THINVPP_EBADCALL -3 +#define MV_THINVPP_EUNSUPPORT -4 +#define MV_THINVPP_EIOFAIL -5 +#define MV_THINVPP_EUNCONFIG -6 +#define MV_THINVPP_ECMDQFULL -7 +#define MV_THINVPP_EFRAMEQFULL -8 +#define MV_THINVPP_EBCMBUFFULL -9 +#define MV_THINVPP_ENOMEM -10 + +#ifdef __cplusplus +extern "C" { +#endif + +/* definition of display mode */ +typedef enum { + DISP_NON_DEFINED = -1, /* non-defined */ + DISP_STILL_PIC = 0, /* display still picture mode */ + DISP_FRAME = 1, /* display frame mode */ + DISP_PATGEN = 2, /* display pattern generated by patgen, only valid for main */ +}ENUM_DISP_MODE; + +/* definition of de-interlacer working mode */ +typedef enum { + DEINT_2D = 0, /* 2D mode, only valid for interlaced input */ + DEINT_3D = 1, /* 3D mode, only valid for interlaced input */ +}ENUM_DEINT_MODE; + +/* definition of VNR working mode */ +typedef enum { + VNR_NO = 0, /* disable VNR */ + VNR_2D = 1, /* 2D mode */ + VNR_3D = 2, /* 3D mode */ +}ENUM_VNR_MODE; + +/* definition of VNR parameter profile */ +typedef enum { + VNR_PARAM_INVALID = -1, + VNR_SD_LOW = 0, /* VNR SD low profiel parameters */ + VNR_SD_MED = 1, /* VNR SD medium profile parameters */ + VNR_SD_HIGH = 2, /* VNR SD high profile parameters */ + VNR_SD_QDEO = 3, /* VNR SD Qdeo parameters */ + VNR_SD_INTERNET_HIGH = 4, /* VNR SD high bit rate internet video content parameters */ + VNR_SD_INTERNET_LOW = 5, /* VNR SD low bit rate internet video content parameters */ + VNR_SD_INTERNET_VERY_LOW = 6, /* VNR SD very low bit rate internet video content parameters */ + VNR_HD_LOW = 7, /* VNR HD low profiel parameters */ + VNR_HD_MED = 8, /* VNR HD medium profile parameters */ + VNR_HD_HIGH = 9, /* VNR HD high profile parameters */ + VNR_HD_QDEO = 10, /* VNR HD Qdeo parameters */ + VNR_HD_INTERNET_HIGH = 11, /* VNR HD high bit rate internet video content parameters */ + VNR_HD_INTERNET_LOW = 12, /* VNR HD low bit rate internet video content parameters */ + VNR_HD_INTERNET_VERY_LOW = 13, /* VNR HD very low bit rate internet video content parameters */ + MAX_NUM_VNR_PARAMS +}ENUM_VNR_PARAMS; + +/* defination of CAR parameter cmd */ +typedef enum { + CAR_CMD_INVALID = -1, + VPP_CMD_CAR_SET_MODE =0, + VPP_CMD_CAR_SET_MNR_PARAM , + VPP_CMD_CAR_SET_BNR_PARAM, + VPP_CMD_CAR_SET_CROP_AND_REGION_PARAM, + VPP_CMD_CAR_SET_UBD_PARAM, + VPP_CMD_CAR_SET_FGG_GAIN, + VPP_CMD_CAR_SET_CHROMA_FILTERING_MODE, + VPP_CMD_CAR_SET_FGG_PARAMS, + VPP_CMD_CAR_SET_BNR_SOFT_FILTER_FLATNESS_LOWER_THRESHOLD, + VPP_CMD_CAR_SET_MNR_MAJOR_EXP_THRESHOLD, + MAX_NUM_CAR_CMD + +}VPP_CMD_EXT_CAR; +/* defination of NR parameter cmd */ +typedef enum { + NR_CMD_INVALID = -1, + VPP_CMD_NR_SET_CTRL =0, + VPP_CMD_NR_SET_PARAM , + MAX_NUM_NR_CMD + +}VPP_CMD_EXT_NR; + +/* defination of DEINT parameter cmd */ +typedef enum { + DEINT_CMD_INVALID = -1, + VPP_CMD_DEINT_SET_USERCAD=0, + VPP_CMD_DEINT_SET_EXCLCTRL, + VPP_CMD_DEINT_SET_LPFCTRL, + VPP_CMD_DEINT_SET_FILM_CADCTRL, + VPP_CMD_DEINT_SET_PRESET_MODE, + VPP_CMD_DEINT_SET_FORCED_2D, + VPP_CMD_DEINT_SET_HARD_SOFT_FILM_MODE, + MAX_NUM_DEINT_CMD + +}VPP_CMD_EXT_DEINT; + +/* defination of SHIFT3D parameter cmd */ +typedef enum { + SHIFT3D_CMD_INVALID = -1, + VPP_CMD_SHIFT3D_SET_CTRL=0, + VPP_CMD_SHIFT3D_SET_PARAM, + MAX_NUM_SHIFT3D_CMD + +}VPP_CMD_EXT_SHIFT3D; + +/* defination of NEST parameter cmd */ +typedef enum { + NEST_CMD_INVALID = -1, + VPP_CMD_NEST_SET_CROP=0, + VPP_CMD_NEST_SET_MAP_CTRL, + VPP_CMD_NEST_SET_FD_CTRL, + VPP_CMD_NEST_SET_THRESHOLDS, + VPP_CMD_NEST_SET_FD_THRESHOLDS, + MAX_NUM_NEST_CMD + +}VPP_CMD_EXT_NEST; + +/* defination of EE parameter cmd */ +typedef enum { + EE_CMD_INVALID = -1, + VPP_CMD_EE_SET_DET_CTRL=0, + VPP_CMD_EE_SET_DET_CTRL_PARAM, + VPP_CMD_EE_SET_CTRL, + MAX_NUM_EE_CMD + +}VPP_CMD_EXT_EE; + +typedef enum { + SCL_CMD_INVALID = -1, + VPP_CMD_SCL_SET_CTRL=0, + VPP_CMD_SCL_SET_NLPARAM, + VPP_CMD_SCL_LOAD_CUST_COEFFS, + VPP_CMD_SCL_RELOAD_DEF_COEFFS, + MAX_NUM_SCL_CMD + +}VPP_CMD_EXT_SCL; + +typedef enum { + ACE_CMD_INVALID = -1, + VPP_CMD_ACE_SET_ENABLE=0, + VPP_CMD_ACE_SET_MODE, + VPP_CMD_ACE_SET_PARAM, + VPP_CMD_ACE_SET_CLR_LEVEL, + VPP_CMD_ACE_SET_WFACTOR_1, + VPP_CMD_ACE_SET_WFACTOR_2, + VPP_CMD_ACE_SET_WFACTOR_3, + VPP_CMD_ACE_SET_THRSLD_0, + VPP_CMD_ACE_SET_THRSLD_1, + VPP_CMD_ACE_SET_THRSLD_2, + VPP_CMD_ACE_SET_THRSLD_3, + VPP_CMD_ACE_SET_THRSLD_4, + VPP_CMD_ACE_SET_THRSLD_5, + VPP_CMD_ACE_SET_OUTPUT_0, + VPP_CMD_ACE_SET_OUTPUT_5, + VPP_CMD_ACE_SET_GUARDBAND_2, + VPP_CMD_ACE_SET_GUARDBAND_3, + VPP_CMD_ACE_SET_MAX_SLOPE_1, + VPP_CMD_ACE_SET_MAX_SLOPE_2, + VPP_CMD_ACE_SET_MAX_SLOPE_3, + MAX_NUM_ACE_CMD + +}VPP_CMD_EXT_ACE; + +/* definition of video component data format in frame buffer */ +typedef enum { + SRCFMT_YUV422 = 0, /* only valid for video plane */ + SRCFMT_ARGB32 = 0, /* only valid for gfx/PG planes */ + SRCFMT_ARGB24 = 1, /* only valid for gfx planes */ + SRCFMT_ARGB4444 = 2, /* only valid for gfx planes */ + SRCFMT_RGB565 = 3, /* only valid for gfx planes */ + SRCFMT_ARGB1555 = 4, /* only valid for gfx planes */ + SRCFMT_LUT8 = 5, /* only valid for gfx planes */ + SRCFMT_AYUV32 = 6, /* only valid for PG planes */ +}ENUM_SRC_FMT; + +/* definition of video component data order in frame buffer */ +typedef enum { + ORDER_ARGB = 0, /* only valid for gfx planes */ + ORDER_ABGR = 1, /* only valid for gfx planes */ + ORDER_RGBA = 2, /* only valid for gfx planes */ + ORDER_BGRA = 3, /* only valid for gfx planes */ + ORDER_AVYU = 0, /* only valid for PG plane */ + ORDER_AUYV = 1, /* only valid for PG plane */ + ORDER_VYUA = 2, /* only valid for PG plane */ + ORDER_UYVA = 3, /* only valid for PG plane */ + ORDER_UYVY = 0, /* only valid for video planes */ + ORDER_VYUY = 1, /* only valid for video planes */ + ORDER_YUYV = 2, /* only valid for video planes */ + ORDER_YVYU = 3, /* only valid for video planes */ +}ENUM_SRC_ORDER; + +/* definition of CPCB output video format */ +typedef enum { + OUTPUT_PROGRESSIVE = 0, + OUTPUT_INTERLACED = 1, + OUTPUT_AUTO_SELECT = 2, +}ENUM_OUTPUT_MODE; + +/* definition of all the output color supported by VPP*/ +typedef enum { + OUTPUT_COLOR_FMT_INVALID = -1, + FIRST_OUTPUT_COLOR_FMT = 0, + OUTPUT_COLOR_FMT_RGB888 = 0, + OUTPUT_COLOR_FMT_YCBCR444 = 1, + OUTPUT_COLOR_FMT_YCBCR422 = 2, + MAX_NUM_OUTPUT_COLOR_FMTS +} ENUM_OUTPUT_COLOR_FMT; + +/* definition of all the bit depths (output) supported by VPP*/ +typedef enum { + OUTPUT_BIT_DEPTH_INVALID = -1, + FIRST_OUTPUT_BIT_DEPTH = 0, + OUTPUT_BIT_DEPTH_12BIT = 0, + OUTPUT_BIT_DEPTH_10BIT = 1, + OUTPUT_BIT_DEPTH_8BIT = 2, + MAX_NUM_OUTPUT_BIT_DEPTHS +} ENUM_OUTPUT_BIT_DEPTH; + +/* definition of aspect ratio */ +typedef enum { + ASPECT_RATIO_INVALID = -1, + FIRST_ASPECT_RATIO = 0, + ASPECT_RATIO_NONE = 0, + ASPECT_RATIO_4BY3 = 1, + ASPECT_RATIO_16BY9 = 2, + MAX_ASPECT_RATIO +} ENUM_ASPECT_RATIO; + +/* definition of scan information */ +typedef enum { + SCAN_DATA_INVALID = -1, + FIRST_SCAN_DATA = 0, + SCAN_DATA_NONE = 0, + OVER_SCAN_DATA = 1, + UNDER_SCAN_DATA = 2, + MAX_SCAN_DATA +} ENUM_SCAN_DATA; + +/* definition of VPP TG timing formats */ +typedef enum { + RES_INVALID = -1, + FIRST_RES = 0, + RES_NTSC_M = 0, + RES_NTSC_J = 1, + RES_PAL_M = 2, + RES_PAL_BGH = 3, + RES_525I60 = 4, + RES_525I5994 = 5, + RES_625I50 = 6, + RES_525P60 = 7, + RES_525P5994 = 8, + RES_625P50 = 9, + RES_720P30 = 10, + RES_720P2997 = 11, + RES_720P25 = 12, + RES_720P60 = 13, + RES_720P5994 = 14, + RES_720P50 = 15, + RES_1080I60 = 16, + RES_1080I5994 = 17, + RES_1080I50 = 18, + RES_1080P30 = 19, + RES_1080P2997 = 20, + RES_1080P25 = 21, + RES_1080P24 = 22, + RES_1080P2398 = 23, + RES_1080P60 = 24, + RES_1080P5994 = 25, + RES_1080P50 = 26, + RES_VGA_480P60 = 27, + RES_VGA_480P5994 = 28, + FIRST_RES_3D = 29, + RES_720P50_3D = 29, + RES_720P60_3D = 30, + RES_720P5994_3D = 31, + RES_1080P24_3D = 32, + RES_1080P2398_3D = 33, + RES_1080P30_3D = 34, + RES_1080P2997_3D = 35, + RES_1080P25_3D = 36, + MAX_NUM_RES_3D = 36, + RES_LVDS_1920X540P60_3D = 37, + RES_LVDS_1920X540P30_3D = 38, + RES_LVDS_1920X540P24_3D = 39, + RES_RESET, + MAX_NUM_RESS +}ENUM_CPCB_TG_RES; + +/* definition of VPP status */ +typedef enum { + STATUS_INACTIVE = 0, /* for plane and channel */ + STATUS_INACTIVE_PENDING = 1, /* for plane and channel */ + STATUS_ACTIVE = 2, /* for plane and channel */ + STATUS_ACTIVE_PENDING = 3, /* for plane and channel */ + STATUS_DISP = 4, /* for channel only */ + STATUS_DISP_LOGO = 5, /* for plane only */ + STATUS_DISP_VIDEO = 6, /* for plane only */ + STATUS_DISP_PATGEN = 7, /* for main plane */ + STATUS_STOP = 8, /* STOP */ +}ENUM_PLANE_STATUS; + +/* definition of VPP input planes */ +typedef enum { + PLANE_INVALID = -1, + FIRST_PLANE = 0, + PLANE_MAIN = 0, + PLANE_PIP = 1, + PLANE_GFX0 = 2, + PLANE_GFX1 = 3, + PLANE_GFX2 = 4, + PLANE_PG = 5, + PLANE_BG = 6, + PLANE_AUX = 7, + MAX_NUM_PLANES +}ENUM_PLANE_ID; + +/* definition of VPP channels, namely pipelines */ +typedef enum { + CHAN_INVALID = -1, + FIRST_CHAN = 0, + CHAN_MAIN = 0, + CHAN_PIP = 1, + CHAN_GFX0 = 2, + CHAN_GFX1 = 3, + CHAN_GFX2 = 4, + CHAN_PG = 5, + CHAN_BG = 6, + CHAN_AUX = 7, + MAX_NUM_CHANS +}ENUM_CHAN_ID; + +/* definition of VPP CPCB plane(for Berlin) */ +typedef enum { + CPCB_PLANE_INVALID = -1, + FIRST_CPCB_PLANE = 0, + CPCB1_PLANE_1 = 0, // CPCB 1st plane + CPCB1_PLANE_2 = 1, // CPCB 2nd plane + CPCB1_PLANE_3 = 2, // CPCB 3rd plane + CPCB1_PLANE_4 = 3, // CPCB 4th plane + CPCB1_PLANE_5 = 4, // CPCB 5th plane + CPCB1_PLANE_6 = 5, // CPCB 6th plane + CPCB1_PLANE_7 = 6, // CPCB 7th plane + MAX_NUM_CPCB_PLANES +}ENUM_CPCB_PLANE; + +/* definition of VPP CPCB plane z-order(for Berlin) */ +typedef enum { + CPCB_ZORDER_INVALID = -1, + FIRST_CPCB_ZORDER = 0, + CPCB_ZORDER_1 = 0, // CPCB z-order 1 (bottom) + CPCB_ZORDER_2 = 1, // CPCB z-order 2 + CPCB_ZORDER_3 = 2, // CPCB z-order 3 + CPCB_ZORDER_4 = 3, // CPCB z-order 4 + CPCB_ZORDER_5 = 4, // CPCB z-order 5 + CPCB_ZORDER_6 = 5, // CPCB z-order 6 + CPCB_ZORDER_7 = 6, // CPCB z-order 7 (top) + MAX_NUM_CPCB_ZORDERS +}ENUM_CPCB_ZORDER; + +/* definition of VPP digital video outputs(for Galois) */ +typedef enum { + DV_INVALID = -1, + FIRST_DV = 0, + DV_1 = 0, // DV-1 port for Galois + DV_2 = 1, // DV-2 port for Galois + MAX_NUM_DVS +}ENUM_DV_ID; + +/* definition of VPP CPCB video outputs(for Berlin) */ +typedef enum { + CPCB_INVALID = -1, + FIRST_CPCB = 0, + CPCB_1 = 0, // CPCB-0 for Berlin + CPCB_2 = 1, // CPCB-1 for Berlin + CPCB_3 = 2, // CPCB-2 for Berlin + MAX_NUM_CPCBS +}ENUM_CPCB_ID; + +/* definition of VPP video outputs */ +typedef enum { + VOUT_INVALID = -1, + FIRST_VOUT = 0, + VOUT_HDMI = 0, + VOUT_HD = 1, + VOUT_SD = 2, + VOUT_TTL24 = 3, + VOUT_TTL30 = 4, + VOUT_LVDS = 5, + MAX_NUM_VOUTS +}ENUM_VOUT_ID; + +/* definition of VDAC and DVIO */ +typedef enum { + PORT_INVALID = -1, + FIRST_PORT = 0, + PORT_COMPONENT = 0, + PORT_CVBS = 1, + PORT_SVIDEO = 2, + PORT_DVIO = 3, + PORT_HDMI = 4, + MAX_NUM_PORTS +}ENUM_VDAC_ID; + +/* definition of GFX0/PG plane input mode */ +typedef enum { + GFX_INPUT_MODE_INVALID = -1, + GFX_INPUT_MODE_NORMAL = 0, + GFX_INPUT_MODE_MATTE = 1, /* pre-multiplied ARGB/AYUV */ +}ENUM_GFX_INPUT_MODE; + +/* definition of alpha polarity */ +typedef enum { + ALPHA_POL_NORMAL = 0, + ALPHA_POL_INVERSE = 1, +}ENUM_ALPHA_POL; + +/* definition of all the horizontal and vertical scaling coefficient modes */ +typedef enum { + SCALAR_COEFF_INVALID = -1, + FIRST_SCALAR_COEFF = 0, + SCALAR_COEFF_HORZ_EXP_SOFT = 0, + SCALAR_COEFF_HORZ_EXP_MILD = 1, + SCALAR_COEFF_HORZ_EXP_MEDIUM = 2, + SCALAR_COEFF_HORZ_EXP_HIGH = 3, + SCALAR_COEFF_HORZ_EXP_SHARP = 4, + SCALAR_COEFF_HORZ_EXP_GRAPHICS = 5, + SCALAR_COEFF_HORZ_EXP_BYPASS = 6, + SCALAR_COEFF_HORZ_RED_1_1 = 7, + SCALAR_COEFF_HORZ_RED_1_25 = 8, + SCALAR_COEFF_HORZ_RED_1_5 = 9, + SCALAR_COEFF_HORZ_RED_1_8 = 10, + SCALAR_COEFF_HORZ_RED_2 = 11, + SCALAR_COEFF_HORZ_RED_2_3 = 12, + SCALAR_COEFF_HORZ_RED_2_7 = 13, + SCALAR_COEFF_HORZ_RED_3 = 14, + SCALAR_COEFF_HORZ_RED_4 = 15, + SCALAR_COEFF_HORZ_RED_5 = 16, + SCALAR_COEFF_HORZ_RED_8 = 17, + SCALAR_COEFF_VERT_EXP_SOFT = 18, + SCALAR_COEFF_VERT_EXP_MILD = 19, + SCALAR_COEFF_VERT_EXP_MEDIUM = 20, + SCALAR_COEFF_VERT_EXP_HIGH = 21, + SCALAR_COEFF_VERT_EXP_SHARP = 22, + SCALAR_COEFF_VERT_EXP_GRAPHICS = 23, + SCALAR_COEFF_VERT_EXP_GRAPHICS_3TAP = 24, + SCALAR_COEFF_VERT_EXP_BYPASS = 25, + SCALAR_COEFF_VERT_EXP_GRAPHICS_BYPASS = 26, + SCALAR_COEFF_VERT_RED_1_1 = 27, + SCALAR_COEFF_VERT_RED_1_25 = 28, + SCALAR_COEFF_VERT_RED_GRAPHICS_1_25 = 29, + SCALAR_COEFF_VERT_RED_1_5 = 30, + SCALAR_COEFF_VERT_RED_1_5_5TAP = 31, + SCALAR_COEFF_VERT_RED_1_5_3TAP = 32, + SCALAR_COEFF_VERT_RED_1_875 = 33, + SCALAR_COEFF_VERT_RED_2 = 34, + SCALAR_COEFF_VERT_RED_GRAPHICS_2 = 35, + SCALAR_COEFF_VERT_RED_2_25 = 36, + SCALAR_COEFF_VERT_RED_2_5 = 37, + SCALAR_COEFF_VERT_RED_3 = 38, + SCALAR_COEFF_VERT_RED_3_75 = 39, + SCALAR_COEFF_VERT_RED_4 = 40, + SCALAR_COEFF_VERT_RED_4_5 = 41, + SCALAR_COEFF_VERT_RED_5 = 42, + SCALAR_COEFF_VERT_RED_6_75 = 43, + SCALAR_COEFF_VERT_RED_8 = 44, + MAX_NUM_PREDEFINED_COEFFS = 45, + SCALAR_COEFF_AUTO = 45, + MAX_NUM_SCALAR_COEFF_MODES +} ENUM_SCALAR_COEFF_MODE; + +/* definition of all the sensio horizontal scaling coefficient modes */ +typedef enum { + SENSIO_SCALAR_COEFF_INVALID = -1, + SENSIO_SCALAR_COEFF_HORZ_RED_1_5 = 0, + SENSIO_SCALAR_COEFF_HORZ_RED_2 = 1, + MAX_NUM_PREDEFINED_SENSIO_COEFFS = 2, +} ENUM_SENSIO_SCALAR_COEFF_MODE; + +/* definition of EE parameter profile */ +typedef enum { + EE_PARAM_INVALID = -1, + EE_TH_LOW = 0, /* EE low threshold profile parameters */ + EE_TH_MEDIUM = 1, /* EE medium threshold profile parameters */ + EE_TH_HIGH = 2, /* EE low high profile parameters */ + EE_INTERNET_LOW_BR_SD = 3, /* EE parameter profile for internet low quality SD content */ + EE_INTERNET_HIGH_BR_SD = 4, /* EE parameter profile for internet high quality SD content */ + EE_INTERNET_HD = 5, /* EE parameter profile for internet HD content */ + MAX_NUM_EE_PARAMS +}ENUM_EE_PARAMS; + +/*definition of picture control*/ +typedef enum{ + FIRST_PICTURE_CTRL = 0, + PICTURE_CTRL_BRIGHTNESS = 0, + PICTURE_CTRL_CONTRAST, + PICTURE_CTRL_HUE, + PICTURE_CTRL_SATURATION, + PICTURE_CTRL_COLORTEMPERATURE, + MAX_PICTURE_CTRL +}ENUM_PICTURE_CTRL; + +/*definition of ACE mode*/ +typedef enum { + FIRST_ACE = 0, + ACE_OFF = 0, + ACE_MANUAL, + ACE_LOW, + ACE_MEDIUM, + ACE_HIGH, + MAX_ACE +}ENUM_ACE_MODE; + +/*definition of BR level*/ +typedef enum { + FIRST_BR = 0, + BR_LEVEL0 = 0, + BR_LEVEL1, + BR_LEVEL2, + BR_LEVEL3, + BR_LEVEL4, + BR_LEVEL5, + BR_LEVEL6, + BR_LEVEL7, + BR_LEVEL8, + BR_LEVEL9, + BR_LEVEL10, + BR_LEVEL11, + BR_LEVEL12, + BR_LEVEL13, + BR_LEVEL14, + MAX_BR +}ENUM_BR_LEVEL; + +typedef enum{ + FIRST_COLOR = 0, + COLOR_RED = 0, + COLOR_GREEN, + COLOR_BLUE, + COLOR_CYAN, + COLOR_YELLOW, + COLOR_MAGENTA, + COLOR_ALL, + MAX_COLOR +}ENUM_COLOR_MODE; + +/*definition of ICR mode*/ +typedef enum{ + FIRST_ICR_MODE = 0, + ICR_MODE_OFF = 0, + ICR_MODE_SKY, + ICR_MODE_GRASS, + ICR_MODE_SKYGRASS, + ICR_MODE_VIVID, + MAX_ICR_MODE +}ENUM_ICR_MODE; + +/*definition of FTDC mode*/ +typedef enum { + FIRST_FTDC = 0, + FTDC_MODE1 = 0, + FTDC_MODE2, + FTDC_MODE3, + FTDC_MODE4, + FTDC_OFF, + MAX_FTDC +}ENUM_FTDC_MODE; + +/*definition of Gamma mode*/ +typedef enum { + FIRST_GM_MODE = 0, + GM_1_8 = 0, + GM_2_5, + GM_SCURVE_LIGHT, + GM_SCURVE_DARK, + GM_OFF, + MAX_GM_MODE +}ENUM_GAMMA_MODE; + +/*pattern generation mode*/ +typedef enum { + PATGEN_SOLID = 0, + PATGEN_INCREMENT = 1, + PATGEN_INVERSE = 2, + PATGEN_RANDOM = 3, +} ENUM_PATGEN_MODE; + +/*pattern generation type*/ +typedef enum { + PATGEN_PROG = 0, + PATGEN_INT = 1, +} ENUM_PATGEN_TYPE; + +/*pattern generation cadence*/ +typedef enum { + PATGEN_NORMAL = 0, + PATGEN_3_2_CAD = 1, + PATGEN_2_2_CAD = 2, +} ENUM_PATGEN_CADENCE; + +/*Macrovision control*/ +typedef enum { + VPP_MV_INVALID = -1, + VPP_MV_OFF = 0, + VPP_MV_AGC, + VPP_MV_AGC_2LINE, + VPP_MV_AGC_4LINE, + VPP_MAX_MV_MODE +} ENUM_VPP_MV_MODE; + +/*WSS aspect ratio mode*/ +typedef enum { + FIRST_WSS_AR_MODE = 0, + WSS_AR_4_3_FULL_FORMAT = 0, + WSS_AR_14_9_LETTERBOX_CENTER, + WSS_AR_14_9_LETTERBOX_TOP, + WSS_AR_16_9_LETTERBOX_CENTER, + WSS_AR_16_9_LETTERBOX_TOP, + WSS_AR_16_9_ABOVE_LETTERBOX_CENTER, + WSS_AR_14_9_FULL_FORMAT_CENTER, + WSS_AR_16_9_FULL_FORMAT, + MAX_WSS_AR_MODE +} ENUM_WSS_AR_MODE; + +/*WSS source mode*/ +typedef enum { + FIRST_WSS_SOURCE_MODE = 0, + WSS_SOURCE_MODE_CAMERA = 0, + WSS_SOURCE_MODE_FILM, + MAX_WSS_SOURCE_MODE +} ENUM_WSS_SOURCE_MODE; + +/*WSS subtitle existence in teletext*/ +typedef enum { + FIRST_WSS_SUBTITLE_IN_TT_MODE = 0, + WSS_NO_SUBTITLE_IN_TT = 0, + WSS_SUBTITLE_IN_TT , + MAX_WSS_SUBTITLE_IN_TT_MODE +} ENUM_WSS_SUBTITLE_IN_TT_MODE; + +/*WSS subtitle mode*/ +typedef enum { + FIRST_WSS_SUBTITLE_MODE = 0, + WSS_NO_OPEN_SUBTITLE = 0, + WSS_SUBTITLE_INSIDE_ACTIVE, + WSS_SUBTITLE_OUTSIDE_ACTIVE, + MAX_WSS_SUBTITLE_MODE +} ENUM_WSS_SUBTITLE_MODE; + +/*WSS surround sound mode*/ +typedef enum { + FIRST_WSS_SURROUND_SOUND_MODE = 0, + WSS_NO_SURROUND_SOUND = 0, + WSS_SURROUND_SOUND_MODE, + MAX_WSS_SURROUND_SOUND_MODE +} ENUM_WSS_SURROUND_SOUND_MODE; + +/*WSS copyright mode*/ +typedef enum { + FIRST_WSS_COPYRIGHT_MODE = 0, + WSS_NO_COPYRIGHT_ASSERTED = 0, + WSS_COPYRIGHT_ASSERTED, + MAX_WSS_COPYRIGHT_MODE +} ENUM_WSS_COPYRIGHT_MODE; + +/*WSS generation mode*/ +typedef enum { + FIRST_WSS_GENERATION_MODE = 0, + WSS_COPYING_NOT_RESTRICTED = 0, + WSS_COPYING_RESTRICTED, + MAX_WSS_GENERATION_MODE +} ENUM_WSS_GENERATION_MODE; + +/*CGMS aspect ratio mode*/ +typedef enum { + FIRST_CGMS_AR_MODE = 0, + CGMS_AR_NOT_INDICATED = 0, + CGMS_AR_4_3_NORMAL = 0, + CGMS_AR_16_9_NORMAL, + CGMS_AR_4_3_LETTERBOX, + MAX_CGMS_AR_MODE +} ENUM_CGMS_AR_MODE; + +/*CGMS copy control infomation transfer mode*/ +typedef enum { + FIRST_CGMS_COPY_CTRL_INFO_TRANS_MODE = 0, + CGMS_COPY_CTRL_INFO_TRANS = 0, + CGMS_COPY_CTRL_INFO_NOT_TRANS, + MAX_CGMS_COPY_CTRL_INFO_TRANS_MODE +} ENUM_CGMS_COPY_CTRL_INFO_TRANS_MODE; + +/*CGMS copy control infomation mode*/ +typedef enum { + FIRST_CGMS_COPY_CTRL_INFO_MODE = 0, + CGMS_COPY_CTRL_INFO_PERMITTED = 0, + CGMS_COPY_CTRL_INFO_NOT_USED, + CGMS_COPY_CTRL_INFO_ONE_GENERATION, + CGMS_COPY_CTRL_INFO_NOT_PERMITTED, + MAX_CGMS_COPY_CTRL_INFO_MODE +} ENUM_CGMS_COPY_CTRL_INFO_MODE; + +/*CGMS APS mode*/ +typedef enum { + FIRST_CGMS_APS_MODE = 0, + CGMS_APS_PSP_OFF = 0, + CGMS_APS_PSP_ON_SPLIT_BURST_OFF, + CGMS_APS_PSP_ON_SPLIT_BURST_2_LINE, + CGMS_APS_PSP_ON_SPLIT_BURST_4_LINE, + MAX_CGMS_APS_MODE +} ENUM_CGMS_APS_MODE; + +/*CGMS source mode*/ +typedef enum { + FIRST_CGMS_SOURCE_MODE = 0, + CGMS_SOURCE_NOT_ANALOG = 0, + CGMS_SOURCE_ANALOG, + MAX_CGMS_SOURCE_MODE +} ENUM_CGMS_SOURCE_MODE; + +/*TT control mode*/ +typedef enum { + FIRST_TT_CTRL_MODE = 0, + TT_CTRL_ENABLE = 0, + TT_CTRL_UPDATE, + TT_CTRL_DISABLE, + MAX_TT_CTRL_MODE +} ENUM_TT_CTRL_MODE; + +/* SS offset mode */ +typedef enum { + FIRST_SS_OFFSET_MODE = 0, + SS_OFFSET_NONE = 0, + SS_OFFSET_VIDEO, + SS_OFFSET_DEFAULT, + MAX_SS_OFFSET_MODE +} ENUM_SS_OFFSET_MODE; + +typedef struct PTS_T { /* 33-bit PTS */ + unsigned int hi_word; /* bit-32 */ + unsigned int lo_word; /* bit-31 ~ bit-0 */ +} PTS; + +typedef struct VPP_WIN_T { + int x; /* x-coordination of a vpp window top-left corner in pixel, index starting from 0 */ + int y; /* y-coordination of a vpp window top-left corner in pixle, index starting from 0 */ + int width; /* width of a vpp window in pixel */ + int height; /* height of a vpp window in pixel */ +} VPP_WIN; + +typedef struct VPP_WIN_ATTR_T { + int bgcolor; /* background color of a vpp window */ + int alpha; /* global alpha of a vpp window */ +} VPP_WIN_ATTR; + +typedef struct VPP_BG_COLOR_T { + int ColorFmt; /*MV_PE_VPP_COLOR_FMT*/ + unsigned int Color; +} VPP_BG_COLOR; + +typedef struct VPP_ZORDER_CTRL_T { + int main; + int pip; + int gfx0; + int gfx1; + int gfx2; + int pg; + int bg; + int aux; +} VPP_ZORDER_CTRL; + +typedef struct VPP_PATGEN_DATA_T { + int hmode; + int vmode; + int hPith; + int vPith; + int hColPith; // 0x00BBGGRR + int vColPith; // 0x00BBGGRR + int ColSeed1; // 0x00BBGGRR + int ColSeed2; // 0x00BBGGRR +} VPP_PATGEN_DATA; + +typedef struct VPP_PATGEN_TYPE_T { + int type; + int cadence; + int rff; +} VPP_PATGEN_TYPE; + +typedef struct VPP_FGG_CTRL_T +{ + unsigned char MainEnable; + unsigned char PipEnable; + unsigned char AdaptiveMode; +}VPP_FGG_CTRL; + +typedef struct VPP_FGG_PARAMS_T +{ + unsigned int FggGain; + unsigned int FggTemp; + unsigned int FggLth; + unsigned int FggHth; +}VPP_FGG_PARAMS; + +typedef struct VPP_WSS_DATA_T { + char ARMode; + char SourceMode; + char SubinTT; + char SubMode; + char SoundMode; + char Copyright; + char Generation; +}VPP_WSS_DATA; + +typedef struct VPP_CGMS_DATA_T { + char ARMode; + char CopyInfoTrans; + char CopyInfoMode; + char APSMode; + char SourceMode; +}VPP_CGMS_DATA; + +typedef struct VPP_DMA_INFO_T { + unsigned int DmaAddr; + unsigned int DmaLen; + unsigned int cpcbID; +}VPP_DMA_INFO; + +/* CAR Data Structure */ +/* + * * CAR control register1. + * */ +typedef enum tagVPP_FE_CAR_MODE +{ + VPP_FE_CAR_BYPASS = 0, + VPP_FE_CAR_ENABLE_MQ, + VPP_FE_CAR_ENABLE_BNR, + VPP_FE_CAR_ENABLE_MQ_AND_BNR + +}VPP_FE_CAR_MODE; + +typedef enum tagVPP_FE_CAR_MQBLMODE +{ + VPP_FE_CAR_MQBL_BLOCKNOISE =0, + VPP_FE_CAR_MQBL_MOSQUITONOISE, + VPP_FE_CAR_MQBL_AVG_BLOCK_MOSQUITO, + VPP_FE_CAR_MQBL_ADAPTIVE_BLOCK_MOSQUITO +}VPP_FE_CAR_MQBLMODE; + +typedef enum tagVPP_FE_CAR_CMODEFILTER +{ + VPP_FE_CAR_CMODEFILTER_BYPASS = 0, + VPP_FE_CAR_CMODEFILTER_WEFILTER, + VPP_FE_CAR_CMODEFILTER_STRFILTER =4, + VPP_FE_CAR_CMODEFILTER_MAXFILTER +}VPP_FE_CAR_CMODEFILTER; + +typedef struct tagVPP_FE_CAR_CTRL1_REG_BITS +{ + VPP_FE_CAR_MODE CarMode; + int EnableProScan; + int EnableDeepLine; + int EnableOnScreenIndc; + int FieldPolarity; + +}VPP_FE_CAR_CTRL1_REG_BITS,*PVPP_FE_CAR_CTRL1_REG_BITS; + +/* CAR control register2. + * */ +typedef struct tagVPP_FE_CAR_CTRL2_REG_BITS +{ + unsigned char MqBlMode; + unsigned char ChromaFilteringMode; + unsigned char DCTBasedBlockDetetcion; + unsigned char EnableDemoMode; + +}VPP_FE_CAR_CTRL2_REG_BITS,*PVPP_FE_CAR_CTRL2_REG_BITS; + + +/* Mosquito noise reducer mode register 1 + * */ +typedef struct tagVPP_FE_CAR_MQ_MODE1_REG_BITS +{ + int EnableMosquitoNoiseReduction; + unsigned char DisableLowResMode; + unsigned char FilerSize; + unsigned char RingingDetetorEnable; + unsigned char SelectRingingDetectorAlgo; + +}VPP_FE_CAR_MQ_MODE1_REG_BITS,*PVPP_FE_CAR_MQ_MODE1_REG_BITS; + +/* Mosquito noise reducer mode register 2 + * */ +typedef struct tagVPP_FE_CAR_MQ_MODE2_REG_BITS +{ + unsigned char EnableMajorEdgeExpansion; + unsigned char EnableMinorEdgeExpansion; + unsigned char EnableFlatConditionUsage; + +}VPP_FE_CAR_MQ_MODE2_REG_BITS,*PVPP_FE_CAR_MQ_MODE2_REG_BITS; + +/* Major and Minor Horizontal expansions. + * */ +typedef struct tagVPP_FE_CAR_MQ_HEXP_REG_BITS +{ + unsigned char MajorHExp; + unsigned char MinorHExp; + +}VPP_FE_CAR_MQ_HEXP_REG_BITS,*PVPP_FE_CAR_MQ_HEXP_REG_BITS; + +/* Major and Minor Vertical expansions. + * */ +typedef struct tagVPP_FE_CAR_MQ_VEXP_REG_BITS +{ + unsigned char MajorVExp; + unsigned char MinorVExp; + +}VPP_FE_CAR_MQ_VEXP_REG_BITS,*PVPP_FE_CAR_MQ_VEXP_REG_BITS; + +/* Flat expansion control register + * */ +typedef struct tagVPP_FE_CAR_MQ_FLAT_EXPANSION_CTRL +{ + unsigned char HorExp; + unsigned char VerExp; + unsigned char KernelSelection; + +}VPP_FE_CAR_MQ_FLAT_EXPANSION_CTRL,*PVPP_FE_CAR_MQ_FLAT_EXPANSION_CTRL; + + +typedef struct tagVPP_FE_CAR_CONTROL_REGS +{ + VPP_FE_CAR_CTRL1_REG_BITS Ctrl1Reg; + VPP_FE_CAR_CTRL2_REG_BITS Ctrl2Reg; +}VPP_FE_CAR_CONTROL_REGS,*PVPP_FE_CAR_CONTROL_REGS; + + +typedef struct tagVPP_FE_CAR_MQ_REGS +{ + VPP_FE_CAR_MQ_MODE1_REG_BITS MqMode1Reg; + VPP_FE_CAR_MQ_MODE2_REG_BITS MqMode2Reg; + VPP_FE_CAR_MQ_HEXP_REG_BITS MqHorzExpReg; + VPP_FE_CAR_MQ_VEXP_REG_BITS MqVerExpReg; + unsigned char MqEdgeAdapFilterThr; + unsigned char MqBlendFactor; + unsigned char MqMajorExpEdgeStrengthThr; + unsigned char MqMinorExpEdgeStrengthThr; + VPP_FE_CAR_MQ_FLAT_EXPANSION_CTRL MqFlatExpCtrl; + unsigned char MqLowerThrForFlatness; + unsigned char MqHigherThrForFlatness; + unsigned char MqRingingDetectionThr1; + unsigned char MqRingingDetectionThr2; + unsigned char MqRingingDetectionThr3; + unsigned char MqRingingDetectionThr4; + +}VPP_FE_CAR_MQ_REGS,*PVPP_FE_CAR_MQ_REGS; + + +/* Flat expansion control register + * */ +typedef struct tagVPP_FE_CAR_BL_PHASE_CTRL +{ + unsigned char VerticalBlockPhase; + unsigned char HorizontalBlockPhase; + unsigned char BlockPhaseEnable; + +}VPP_FE_CAR_BL_PHASE_CTRL,*PVPP_FE_CAR_BL_PHASE_CTRL; + +typedef enum tagVPP_FE_CAR_BL_GRID_FILT_CTRL +{ + VPP_FE_CAR_BL_GRID_FILT_HORIZ_BLK_DET = 0, + VPP_FE_CAR_BL_GRID_FILT_VERT_BLK_DET, + VPP_FE_CAR_BL_GRID_FILT_HORIZ_OR_VERT_BLK_DET, + VPP_FE_CAR_BL_GRID_FILT_HORIZ_AND_VERT_BLK_DET + +}VPP_FE_CAR_BL_GRID_FILT_CTRL; + + +/* Block Noise Reducer mode + * */ +typedef struct tagVPP_FE_CAR_BL_NR_MODE +{ + unsigned char VBlockNoiseReducer; + unsigned char HBlockNoiseReducer; + VPP_FE_CAR_BL_GRID_FILT_CTRL GridFilteringCtrl; + unsigned char EnableGridExp; + unsigned char BlSel; + unsigned char FilterSize; + +}VPP_FE_CAR_BL_NR_MODE,*PVPP_FE_CAR_BL_NR_MODE; + + +/* Block Noise Reducer control for both Hor and Vert + * */ +typedef enum tagVPP_FE_CAR_FILTER_OPT +{ + VPP_FE_CAR_FILTER_OPT_GBL_FILTER =0, + VPP_FE_CAR_FILTER_OPT_GRID_FILTER, + VPP_FE_CAR_FILTER_OPT_GRID_FILTER_BLK, + VPP_FE_CAR_FILTER_OPT_NO_FILTERING + +}VPP_FE_CAR_FILTER_OPT; + +typedef struct tagVPP_FE_CAR_HV_BLOCKS_BL_NR_MODE +{ + VPP_FE_CAR_FILTER_OPT FilteringOption0; + VPP_FE_CAR_FILTER_OPT FilteringOption1; + VPP_FE_CAR_FILTER_OPT FilteringOption2; + VPP_FE_CAR_FILTER_OPT FilteringOption3; + +}VPP_FE_CAR_HV_BLOCKS_BL_NR_MODE,*PVPP_FE_CAR_HV_BLOCKS_BL_NR_MODE; + + +/* Block Noise Reducer Filter Control Reg1 + * */ +typedef struct tagVPP_FE_CAR_BL_FILTER_CTRL1 +{ + unsigned char HFilterMode; + unsigned char VFilterMode; + unsigned char HFilterSize; + unsigned char VFilterSize; + +}VPP_FE_CAR_BL_FILTER_CTRL1,*PVPP_FE_CAR_BL_FILTER_CTRL1; + + +/* Block Noise Reducer Filter Control Reg2 + * */ +typedef struct tagVPP_FE_CAR_BL_FILTER_CTRL2 +{ + unsigned char Select1DHFilter; + unsigned char Select1DVFilter; + unsigned char VFilterNumTaps; + +}VPP_FE_CAR_BL_FILTER_CTRL2,*PVPP_FE_CAR_BL_FILTER_CTRL2; + + +/* Enable robust block detetcion for both had and soft mode + * */ +typedef struct tagVPP_FE_CAR_BL_DET_CTRL +{ + unsigned char SoftRobustDetection; + unsigned char HardRobustDetection; + unsigned char EnableIndepSelForHGrid; + unsigned char EnableIndepSelForVGrid; +} VPP_FE_CAR_BL_DET_CTRL,*PVPP_FE_CAR_BL_DET_CTRL; + + +/* Vertical block detector flatness conditions (Soft/HArd) + * */ +typedef struct tagVPP_FE_CAR_BL_SHDET1_REG_BITS +{ + unsigned char FlatTh; + unsigned char LowerBound; + +}VPP_FE_CAR_BL_SHDET1_REG_BITS,*PVPP_FE_CAR_BL_SHDET1_REG_BITS; + + + +/* Vertical/Horizontal block noise detection control (soft/Hard) + * */ +typedef struct tagVPP_FE_CAR_BL_SHDET_HV_REG_BITS +{ + unsigned char left1; + unsigned char right1; + unsigned char left2; + unsigned char right2; + +}VPP_FE_CAR_BL_SHDET_HV_REG_BITS,*PVPP_FE_CAR_BL_SHDET_HV_REG_BITS; + + +typedef struct tagVPP_FE_CAR_BL_REGS +{ + VPP_FE_CAR_BL_PHASE_CTRL BlPhaseControl; + VPP_FE_CAR_BL_NR_MODE BlNrMode; + VPP_FE_CAR_HV_BLOCKS_BL_NR_MODE BlNrHBlkMode; + VPP_FE_CAR_HV_BLOCKS_BL_NR_MODE BlNrVBlkMode; + unsigned char BlNumofHyst; + unsigned char BlEdgeAdpThr; + VPP_FE_CAR_BL_FILTER_CTRL1 BlNrReducerFilterCtrl1; + unsigned char BlNrEdgeAdaptHFilter; + unsigned char BlNrEdgeAdaptVFilter; + VPP_FE_CAR_BL_FILTER_CTRL2 BlNrReducerFilterCtrl2; + +}VPP_FE_CAR_BL_REGS,*PVPP_FE_CAR_BL_REGS; + +/* Vertical/Horizontal block noise detection criteria(soft) + * */ +typedef struct tagVPP_FE_CAR_BL_SDET_CRITERIA_REG_BITS +{ + unsigned char VAdjPixelFlatnesCond; + unsigned char VMaxMinFlatnessCond; + unsigned char VBoundaryFlatnessCond; + unsigned char VAvgPixelFlatnessCond; + unsigned char HAdjPixelFlatnesCond; + unsigned char HMaxMinFlatnessCond; + unsigned char HBoundaryFlatnessCond; + unsigned char HAvgPixelFlatnessCond; + +}VPP_FE_CAR_BL_SDET_CRITERIA_REG_BITS,*PVPP_FE_CAR_BL_SDET_CRITERIA_REG_BITS; + + +typedef struct tagVPP_FE_CAR_BL_SOFT_FILTER_REGS +{ + VPP_FE_CAR_BL_DET_CTRL BlDetectionCtrl; + VPP_FE_CAR_BL_SHDET1_REG_BITS BlSoftFlatnessCtrl; + unsigned char BlSoftUpperBoundFlatnessCtrl; + VPP_FE_CAR_BL_SHDET_HV_REG_BITS BlSoftVertBlockNoiseDetectCtrl; + VPP_FE_CAR_BL_SHDET_HV_REG_BITS BlSoftHorzBlockNoiseDetectCtrl; + VPP_FE_CAR_BL_SDET_CRITERIA_REG_BITS BlSoftNoiseDetectionCriteria; +}VPP_FE_CAR_BL_SOFT_FILTER_REGS,*PVPP_FE_CAR_BL_SOFT_FILTER_REGS; + + +typedef struct tagVPP_FE_CAR_BL_HARD_FILTER_REGS +{ + VPP_FE_CAR_BL_DET_CTRL BlDetectionCtrl; + VPP_FE_CAR_BL_SHDET1_REG_BITS BlHardFlatnessCtrl; + unsigned char BlHardUpperBoundFlatnessCtrl; + VPP_FE_CAR_BL_SHDET_HV_REG_BITS BlHardVertBlockNoiseDetectCtrl; + VPP_FE_CAR_BL_SHDET_HV_REG_BITS BlHardHorzBlockNoiseDetectCtrl; + VPP_FE_CAR_BL_SDET_CRITERIA_REG_BITS BlHardNoiseDetectionCriteria; + +}VPP_FE_CAR_BL_HARD_FILTER_REGS,*PVPP_FE_CAR_BL_HARD_FILTER_REGS; + +typedef struct tagVPP_FE_CAR_BL_THR_FOR_HVREGION_AND_CROP +{ + unsigned short BlHDetectThr0; + unsigned short BlHDetectThr1; + unsigned short BlHDetectThr2; + unsigned short BlVDetectThr0; + unsigned short BlVDetectThr1; + unsigned short BlVDetectThr2; + unsigned char BlCropFromTop; + unsigned char BlCropFromBottom; + unsigned char BlCropFromLeft; + unsigned char BlCropFromRight; + +}VPP_FE_CAR_BL_THR_FOR_HVREGION_AND_CROP,*PVPP_FE_CAR_BL_THR_FOR_HVREGION_AND_CROP; + + +/* Universal Block detection control for scaled material block detector + * */ +typedef struct tagVPP_FE_CAR_UBL_CTRL +{ + unsigned char NumDetections; + unsigned char FlatnessCheck; + +}VPP_FE_CAR_UBL_CTRL,*PVPP_FE_CAR_UBL_CTRL; + +typedef struct tagVPP_FE_CAR_UBL_CTRL_AND_THRESHOLD +{ + unsigned char UBlCropFromTop; + unsigned char UBlCropFromBottom; + unsigned char UBlLowerThrforBlockMap1; + unsigned char UBlHigherThrforBlockMap1; + unsigned char UBlLowerThrforBlockMap2; + unsigned char UBlHigherThrforBlockMap2; + VPP_FE_CAR_UBL_CTRL UBlCtrl1; + VPP_FE_CAR_UBL_CTRL UBlCtrl2; + unsigned short UBlThrforFinalVal; + unsigned char UBlThrforGradMapCleanup; + unsigned char UBlThrforHyst; + +}VPP_FE_CAR_UBL_CTRL_AND_THRESHOLD,*PVPP_FE_CAR_UBL_CTRL_AND_THRESHOLD; + +typedef struct tagVPP_FE_CAR_DEFAULTS +{ + int IsInpHD; + int IsInpProgressive; +}VPP_FE_CAR_DEFAULTS, *PVPP_FE_CAR_DEFAULTS; + +typedef struct tagVPP_FE_CAR_FGG_CTRL_AND_GAIN +{ + unsigned char CarFggEnabled; + unsigned char CarFggExtGainSelect; + unsigned char CarFggAdapFggGain; + unsigned char CarFggGain; + unsigned char CarFggTempVariation; + unsigned char CarFggLowerThres; + unsigned char CarFggHigherThres; +}VPP_FE_CAR_FGG_CTRL_AND_GAIN,*PVPP_FE_CAR_FGG_CTRL_AND_GAIN; + +typedef struct tagVPP_FE_CAR_NE_REGS +{ + unsigned char CarNeHyst; + unsigned short CarNeHThreshold; + unsigned short CarNeVThreshold; +}VPP_FE_CAR_NE_REGS,*PVPP_FE_CAR_NE_REGS; + + +typedef struct tagVPP_FE_CAR_NE_CTRLREGS +{ + unsigned char CarNeSigmaInpThr; + unsigned char CarNeEnableSigmaMOde; +}VPP_FE_CAR_NE_CTRLREGS,*PVPP_FE_CAR_NE_CTRLREGS; + +typedef union tagVPP_FE_CAR_REG +{ + VPP_FE_CAR_CONTROL_REGS CarCTRLReg; + VPP_FE_CAR_MQ_REGS CarMQCtrlReg; + VPP_FE_CAR_BL_REGS CarBLCtrlReg; + VPP_FE_CAR_BL_THR_FOR_HVREGION_AND_CROP CarBLThrCtrlReg; + VPP_FE_CAR_UBL_CTRL_AND_THRESHOLD CarUBLCtrlReg; + unsigned char CarFGGGainReg; +}VPP_FE_CAR_REG, *PVPP_FE_CAR_REG; + + + +/* NR DS and ENUM */ +// NR Modes (part of VPP_VDO_NR_CTRL structure) +typedef enum tagVPP_VDO_NR_MODE +{ + VPP_VDO_NR_MODE_DISABLE = 0, + VPP_VDO_NR_MODE_SPATIAL, + VPP_VDO_NR_MODE_TEMPORAL, + VPP_VDO_NR_MODE_SPATIO_TEMPORAL, + VPP_VDO_NR_MODE_MAX +}VPP_VDO_NR_MODE; + +// Position of flesh tone blender (part of VPP_VDO_NR_CTRL structure) +typedef enum tagVPP_VDO_NR_FTB_POS +{ + VPP_VDO_NR_FTB_AFTER_ST_BLENDER = 0, + VPP_VDO_NR_FTB_BEFORE_ST_BLENDER, + VPP_VDO_NR_FTB_POS_MAX +}VPP_VDO_NR_FTB_POS; + +// Chroma channel motion selection modes +// (part of VPP_VDO_NR_CTRL structure) +typedef enum tagVPP_VDO_NR_CHROMA_CHN_MOTION_SEL +{ + VPP_VDO_NR_CHROMA_CHN_CMOTION = 0, + VPP_VDO_NR_CHROMA_CHN_YMOTION, + VPP_VDO_NR_CHROMA_CHN_MAXYC_MOTION, + VPP_VDO_NR_CHROMA_CHN_MAX_MOTION_SEL +}VPP_VDO_NR_CHROMA_CHN_MOTION_SEL; + +// Window size for spatial filter (part of VPP_VDO_NR_PARAMS struct) +typedef enum tagVPP_VDO_NR_SNR_MODE +{ + // 5/3 window in interlaced mode + VPP_VDO_NR_SNR_5_BY_3_WIN_INT_MODE = 0, + // 5/3 window in progressive mode + VPP_VDO_NR_SNR_5_BY_3_WIN_PROG_MODE, + // 9/3 window in progressive mode + VPP_VDO_NR_SNR_9_BY_3_WIN_PROG_MODE, + VPP_VDO_NR_SNR_MODE_MAX +}VPP_VDO_NR_SNR_MODE; + +// Noise source to control VNR parameters +// (part of VPP_VDO_NR_NE_CTRL structure) +typedef enum tagVPP_VDO_NR_NOISE_SRC_MODE +{ + VPP_VDO_NR_NOISE_SRC_MODE_REGISTER = 0, + VPP_VDO_NR_NOISE_SRC_MODE_INTERNAL_EST, + VPP_VDO_NR_NOISE_SRC_MODE_INPUT_PORT, + VPP_VDO_NR_NOISE_SRC_MODE_MAX +}VPP_VDO_NR_NOISE_SRC_MODE; + +// Noise Estimate Mode (part of VPP_VDO_NR_NE_CTRL structure) +typedef enum tagVPP_VDO_NR_NOISE_EST_MODE +{ + VPP_VDO_NR_NOISE_EST_MODE_SPATIAL = 0, + VPP_VDO_NR_NOISE_EST_MODE_TEMPO, + VPP_VDO_NR_NOISE_EST_MODE_MIN_OF_SPATIAL_TEMPO, + VPP_VDO_NR_NOISE_EST_MODE_AVG_OF_SPATIAL_TEMPO, + VPP_VDO_NR_NOISE_EST_MODE_MAX +}VPP_VDO_NR_NOISE_EST_MODE; + +// Chroma Scaling Factor (part of VPP_VDO_NR_NE_PARAMS struct) +typedef enum tagVPP_VDO_NR_CHROMA_SCALE_FACTOR +{ + VPP_VDO_NR_CHROMA_SCALE_SAME_AS_LUMA = 0, + VPP_VDO_NR_CHROMA_SCALE_DOWN_LUMA_BY_2, + VPP_VDO_NR_CHROMA_SCALE_DOWN_LUMA_BY_4, + VPP_VDO_NR_CHROMA_SCALE_DOWN_LUMA_BY_8, + VPP_VDO_NR_CHROMA_SCALE_MAX +}VPP_NR_CHROMA_SCALE_FACTOR; + +// Final Output Selection Modes (part of VPP_VDO_NR_DBG_CTRL struct) +typedef enum tagVPP_VDO_NR_OUT_SEL +{ + VPP_VDO_NR_OUTPUT_FINAL_VNR = 0, + VPP_VDO_NR_OUTPUT_FTD_MAP, + VPP_VDO_NR_OUTPUT_NOISE_MAP, + VPP_VDO_NR_OUTPUT_LUMA, + VPP_VDO_NR_OUTPUT_MAX +}VPP_VDO_NR_OUT_SEL; + +// Motion Map Display Mode (part of VPP_VDO_NR_DBG_CTRL struct) +typedef enum tagVPP_VDO_NR_MOTION_MAP_DISP_MODE +{ + VPP_VDO_NR_MOTION_MAP_DISP_LUMA = 0, + VPP_VDO_NR_MOTION_MAP_DISP_CHROMA, + VPP_VDO_NR_MOTION_MAP_DISP_FIN_OP_VNR, + VPP_VDO_NR_MOTION_MAP_DISP_MODE_MAX = 4 +}VPP_VDO_NR_MOTION_MAP_DISP_MODE, *PVPP_VDO_NR_MOTION_MAP_DISP_MODE; + +/* Structures */ +// NR Capability Fields +typedef struct tagAVC_NR_CAPS +{ + unsigned char NumUnits; + unsigned int Flags; +} AVC_NR_CAPS, *PAVC_NR_CAPS; + +// Fields for control of block motion sub-module +// (part of VPP_VDO_NR_CTRL structure) +typedef struct tagVPP_VDO_NR_TNR_FINE_CTRL +{ + int EnblNudge; + int EnblAsd; + int EnblBlk; + int EnblBlkMotion; + int EnblBlkBeta; + int EnblBlkFilm; +}VPP_VDO_NR_TNR_FINE_CTRL, *PVPP_VDO_NR_TNR_FINE_CTRL; + +// NR Control Fields +typedef struct tagVPP_VDO_NR_CTRL +{ + VPP_VDO_NR_MODE VnrMode; + int YthAdaptive; + int CthAdaptive; + int YBetaAdaptive; + int CBetaAdaptive; + VPP_VDO_NR_FTB_POS FtbPos; + int ProscanInput; + + int EnblYSnr; + int EnblCSnr; + int EnblYTnr; + int EnblCTnr; + int EnblLumaFtd; + int EnblChromaFtd; + + VPP_VDO_NR_TNR_FINE_CTRL YTnrFineCtrl; + VPP_VDO_NR_TNR_FINE_CTRL CTnrFineCtrl; + VPP_VDO_NR_CHROMA_CHN_MOTION_SEL ChromaChnMotSel; +}VPP_VDO_NR_CTRL, *PVPP_VDO_NR_CTRL; + +// NR Parameters - Threshold settings for various sub-modules +typedef struct tagVPP_VDO_NR_PARAMS +{ + // Block Motion Module settings (for TNR) + unsigned short YBlkTh; + unsigned short CBlkTh; + unsigned char BlkXSize; + unsigned char BlkYSize; + + // Motion Thresholds + unsigned char YMotBaseTh; + unsigned char YMotStepTh; + unsigned char CMotBaseTh; + unsigned char CMotStepTh; + + // SNR settings + VPP_VDO_NR_SNR_MODE YSnrMode; + unsigned char YSnrLowTh; + unsigned char YSnrHighTh; + unsigned char CSnrLowTh; + unsigned char CSnrHighTh; + + // Beta values for TNR + unsigned char YBeta; + unsigned char CBeta; + unsigned char BlkBeta; +}VPP_VDO_NR_PARAMS, *PVPP_VDO_NR_PARAMS; + +// Noise Estimation Control fields +typedef struct tagVPP_VDO_NR_NE_CTRL +{ + int EnblFldFrmFltr; + VPP_VDO_NR_NOISE_SRC_MODE NoiSrcMode; + VPP_VDO_NR_NOISE_EST_MODE NoiEstMode; +}VPP_VDO_NR_NE_CTRL, *PVPP_VDO_NR_NE_CTRL; + +// Noise Estimation Parameters +typedef struct tagVPP_VDO_NR_NE_PARAMS +{ + // Window Parameters (4 bits each) + unsigned char HWindow; + unsigned char HOffset; + unsigned char VWindow; + unsigned char VOffset; + // Gaussian Noise Standard Deviation + unsigned char StdDev; + unsigned char NoiNumScale; //4 bits + unsigned char NoiNumOffset; //4 bits + unsigned char NoiSat; //4 bits + VPP_NR_CHROMA_SCALE_FACTOR NoiChromaScale; +}VPP_VDO_NR_NE_PARAMS, *PVPP_VDO_NR_NE_PARAMS; + +// Noise Estimation Status +typedef struct tagVPP_VDO_NR_NE_STATUS +{ + unsigned char NoiseEstimateSpatial; + unsigned char NoiseEstimateTemporal; +}VPP_VDO_NR_NE_STATUS, *PVPP_VDO_NR_NE_STATUS; + +// Debug Control Fields +typedef struct tagVPP_VDO_NR_DBG_CTRL +{ + VPP_VDO_NR_OUT_SEL OutSel; + VPP_VDO_NR_MOTION_MAP_DISP_MODE MotionMapDispMode; + int Enbl8_0Rnding; +}VPP_VDO_NR_DBG_CTRL, *PVPP_VDO_NR_DBG_CTRL; + +typedef union tagVPP_VDO_NR_REG +{ + VPP_VDO_NR_CTRL NRCtrl; + VPP_VDO_NR_PARAMS NRParam; +}VPP_VDO_NR_REG, *PVPP_VDO_NR_REG; + +/*DEINT DS */ + +typedef enum tagVPP_DEINTUSER_CAD_MODE +{ + VPP_DEINTUSER_CAD_MODE_1 = 0, + VPP_DEINTUSER_CAD_MODE_2 + +}VPP_DEINTUSER_CAD_MODE; + +typedef enum tagVPP_DEINTEXCL_PARAM_MODE +{ + VPP_DEINTEXCL_PARAM_MODE_NONE = 0, + VPP_DEINTEXCL_PARAM_EXCLUSION_SEL, + VPP_DEINTEXCL_PARAM_EXCLUSION_SEL_2ZONE + +}VPP_DEINTEXCL_PARAM_MODE; + + +typedef struct tagVPP_DEINTEXCL_CTRL_PARAMS +{ + VPP_DEINTEXCL_PARAM_MODE ExclSel; + unsigned char LinesFromTop; + unsigned char LinesFromBottom; + unsigned char PixelsFromLeft; + unsigned char PixelsFromRight; + +} VPP_DEINTEXCL_CTRL_PARAMS, *PVPP_DEINTEXCL_CTRL_PARAMS; + + +typedef struct tagVPP_DEINTUSER_CAD_PARAMS_NEW +{ + VPP_DEINTUSER_CAD_MODE Cadence; + int Enable; + unsigned char Length; + unsigned int Pattern; + +} VPP_DEINTUSER_CAD_PARAMS_NEW, *PVPP_DEINTUSER_CAD_PARAMS_NEW; + +typedef struct tagVPP_DEINTUSER_CAD_PARAMS +{ + int Enable; + unsigned char Length; + unsigned int Pattern; + +} VPP_DEINTUSER_CAD_PARAMS, *PVPP_DEINTUSER_CAD_PARAMS; + + +/* SHIFT3D DS */ +typedef struct tagVPP_SHIFT3D_SETPARAMS +{ + unsigned int BlackLevel; + unsigned char TopShift; + unsigned char BottomShift; + unsigned short EndTop; + unsigned short StartBottom; +}VPP_SHIFT3D_SETPARAMS,*PVPP_SHIFT3D_SETPARAMS; + +typedef struct tagVPP_SHIFT3D_SETPARAMS_NEW +{ + int SetParam; + VPP_SHIFT3D_SETPARAMS ParamVal; +}VPP_SHIFT3D_SETPARAMS_NEW; + +typedef struct tagVPP_SHIFT3D_CTRLPARAMS +{ + int Enable3D; + int HardByPass; +}VPP_SHIFT3D_CTRLPARAMS,*PVPP_SHIFT3D_CTRLPARAMS; + +typedef union tagVPP_VDO_SHIFT3D_REG +{ + VPP_SHIFT3D_SETPARAMS_NEW SHIFT3DSetParam; + VPP_SHIFT3D_CTRLPARAMS SHIFT3DCtrlParam; +}VPP_VDO_SHIFT3D_REG; +/*struct for Detail Control LPF settings.*/ +typedef struct VPP_FE_DET_LPF_CTRL +{ + unsigned char Lpfmode; //VPP_FE_DET_LPF_MODE + int HlpfEnable; + int VlpfEnable; +}VPP_FE_DET_LPF_CTRL,*PVPP_FE_DET_LPF_CTRL; + +/*struct for LPF parameters (controls the sharpness).*/ +typedef struct VPP_FE_DET_LPF_CTRL_PARAMS +{ + unsigned char DetailLpfHs; + unsigned char DetailLpfVs; +}VPP_FE_DET_LPF_CTRL_PARAMS,*PVPP_FE_DET_LPF_CTRL_PARAMS; + +typedef struct VPP_FE_DEINT_LPF_CTRL +{ + VPP_FE_DET_LPF_CTRL LPFCtrl; + VPP_FE_DET_LPF_CTRL_PARAMS LPFParam; +}VPP_FE_DEINT_LPF_CTRL; + +typedef enum tagVPP_DEINTVI_MODE +{ + VPP_DEINTMODE_OFF = 0, + VPP_DEINTMODE_SAFE , + VPP_DEINTMODE_AGGRESSIVE + +}VPP_DEINTVI_MODE; + +typedef enum tagVPP_DEINTCHROMA_MOT_VID_MODE +{ + VPP_DEINTCHROMA_MOT_VID_SAME_AS_LUMA = 0, + VPP_DEINTCHROMA_MOT_FIXED_2D, + VPP_DEINTCHROMA_MOT_INDEP_CHROMA_MOT, + VPP_DEINTCHROMA_MOT_MAX_OF_CHROMA_AND_LUMA_MOT + +}VPP_DEINTCHROMA_MOT_VID_MODE; + +/* + * These Params are mainly based on the mode. + * So they are combined with SetPresetMode(). + */ +typedef struct tagVPP_DINT_PRESET_MODE_PARAMS +{ + VPP_DEINTVI_MODE ViMode; + VPP_DEINTCHROMA_MOT_VID_MODE ChrMotVidMode; + int ChrMotFlmMode; + +}VPP_DINT_PRESET_MODE_PARAMS, *PVPP_DINT_PRESET_MODE_PARAMS; + +typedef struct tagVPP_DEINT_PRESET_MODE +{ + int DeintPresetMode; + VPP_DINT_PRESET_MODE_PARAMS DeintPresetModeParam; +}VPP_FE_DEINT_PRESET_MODE, *PVPP_FE_DEINT_PRESET_MODE; + +typedef enum tagVPP_DEINT_SPATIO_TEMP_MIXER_CTRL_ENUM +{ + VPP_DEINT_MOTION_ADAPTIVE = 0, + VPP_DEINT_FORCED_SPATIAL, + VPP_DEINT_FORCED_TEMPORAL + +}VPP_DEINT_SPATIO_TEMP_MIXER_CTRL_ENUM; + +//Deint Saptio-Temporal Mixer Control Parameters +typedef struct tagVPP_DEINT_FORCED2D_CTRL +{ + VPP_DEINT_SPATIO_TEMP_MIXER_CTRL_ENUM LumaCtrlForVideoPix; + VPP_DEINT_SPATIO_TEMP_MIXER_CTRL_ENUM ChromaCtrlForVideoPix; + VPP_DEINT_SPATIO_TEMP_MIXER_CTRL_ENUM LumaCtrlForFilmPix; + VPP_DEINT_SPATIO_TEMP_MIXER_CTRL_ENUM ChromaCtrlForFilmPix; + +}VPP_DEINT_FORCED2D_CTRL, *PVPP_DEINT_FORCED2D_CTRL; + +typedef enum tagVPP_DEINT_FILM_ENTRY_MODE +{ + VPP_DEINT_MODE_22=0, + VPP_DEINT_MODE_32 +}VPP_DEINT_FILM_ENTRY_MODE; + +typedef struct tagVPP_DEINT_FILM_MODE_ENTRY_PARAM +{ + VPP_DEINT_FILM_ENTRY_MODE EntryMode; + unsigned short NofInHardBld; + unsigned short NofInSoftBld; +}VPP_DEINT_FILM_MODE_ENTRY_PARAM, *PVPP_DEINT_FILM_MODE_ENTRY_PARAM; + +typedef union tagVPP_VDO_DEINT_REG +{ + VPP_DEINTUSER_CAD_PARAMS_NEW DEINTUserCad; + VPP_DEINTEXCL_CTRL_PARAMS DEINTExclCtrl; + VPP_FE_DEINT_LPF_CTRL DEINTLPFCtrl; + unsigned short FilmCadence; + VPP_FE_DEINT_PRESET_MODE DEINTPreset; + VPP_DEINT_FORCED2D_CTRL DEINTF2DCtrl; + VPP_DEINT_FILM_MODE_ENTRY_PARAM DEINTFilmMode; +}VPP_VDO_DEINT_REG; + + +/* NEST DS and ENUM */ +#define VNR_MAX_NUM_SIGMA 16 +#define NE_MAX_NUM_SIGMA 4 + +/* Type of thresholds for map signal generator */ +typedef enum tagVPP_NE_TYPE_OF_THRESHOLD +{ + VPP_NE_BAND_THRESHOLD = 0, + VPP_NE_FLAT_THRESHOLD, + VPP_NE_PIX_THRESHOLD, + VPP_NE_THRESH_MAX +}VPP_NE_TYPE_OF_THRESHOLD,*PVPP_NE_TYPE_OF_THRESHOLD; + + +/* Type of feedback thresholds */ +typedef enum tagVPP_NE_FEEDBACK_THRESH +{ + VPP_NE_TEMPORAL_BETA_FACT_FB = 0, + VPP_NE_SPATIAL_THRESH_FB, + VPP_NE_MOTION_THRESH_FB, + VPP_NE_BLOCK_MOTION_THRESH_FB, + VPP_NE_FB_MAX +}VPP_NE_FEEDBACK_THRESH,*PVPP_NE_FEEDBACK_THRESH; + +typedef struct tagVPP_NE_CROP_CTRL +{ + int TypeOfCrop; + unsigned char CropVal; +}VPP_NE_CROP_CTRL; + +/* Noise Estimation Map control registers */ +typedef struct tagVPP_NE_MAP_CTRL +{ + int GreyLevel; + unsigned char GreyLevMin; + unsigned char GreyLevMax; + unsigned char ThrForFlatness; + unsigned char ThrForMedianComp; + unsigned char WeightingFactor1Th[3]; + unsigned short ThrForFlatAreaCntSum[4]; + unsigned char ThrForFlatAreaCntSumLSB; + unsigned char WeightingFactor2Th[3]; + unsigned char NoOfFrames; +}VPP_NE_MAP_CTRL,*PVPP_NE_MAP_CTRL; + +/* NE Feedback control registers */ +typedef struct tagVPP_NE_FEEDBACK_CTRL +{ + int InputType; + int OsdSigmaInd; + unsigned char HVBlkEnble; + unsigned char Threshold; +}VPP_NE_FEEDBACK_CTRL,*PVPP_NE_FEEDBACK_CTRL; + + +typedef struct tagVPP_NE_THRESHOLDS +{ + VPP_NE_TYPE_OF_THRESHOLD ThType; + unsigned short ThVal[4]; +}VPP_NE_THRESHOLDS,*PVPP_NE_THRESHOLDS; + +typedef struct tagVPP_NE_FEEDBACK_THRESHOLDS +{ + VPP_NE_FEEDBACK_THRESH FbThresh; + unsigned short ThreshVal[VNR_MAX_NUM_SIGMA]; +}VPP_NE_FEEDBACK_THRESHOLDS, *PVPP_NE_FEEDBACK_THRESHOLDS; + +typedef union tagVPP_VDO_NE_REG +{ + VPP_NE_CROP_CTRL NESTCropCtrl; + VPP_NE_MAP_CTRL NESTMapCtrl; + VPP_NE_FEEDBACK_CTRL NESTFDCtrl; + VPP_NE_THRESHOLDS NESTThrd; + VPP_NE_FEEDBACK_THRESHOLDS NESTFDThrd; +}VPP_VDO_NEST_REG; + +/* EE DS */ +/*enum for detail path 1 horizontal filter selection (DET_CTRL)*/ +typedef enum VPP_FE_DET_HFMODE +{ + VPP_FE_DET_HFMODE_DISABLED = 0x00, // Filter output is 0 + VPP_FE_DET_HORIZONTAL_BPF = 0x01, // Band Pass Filter + VPP_FE_DET_HORIZONTAL_HPF = 0x02, // High Pass Filter + VPP_FE_DET_HFEND +}VPP_FE_DET_HFMODE, *PVPP_FE_DET_HFMODE; + +/*enum for detail path 2 vertiocal filter selection (DET_CTRL)*/ +typedef enum VPP_FE_DET_VFMODE +{ + VPP_FE_DET_VFMODE_DISABLED = 0x00, // Filter output in Path2 is 0.(Disabled) + VPP_FE_DET_VERTICAL_BPF = 0x01, // Band Pass Filter + VPP_FE_DET_VERTICAL_HPF = 0x02, // High Pass Filter + VPP_FE_DET_OMNI_DIRECTION_2D_HPF = 0x03, // Omni-Directional 2D HPF + VPP_FE_DET_VFEND +}VPP_FE_DET_VFMODE, *PVPP_FE_DET_VFMODE; + +/*enum for mode of generating large mask signal (DET_CTRL_PARAMS)*/ +typedef enum VPP_FE_DET_MASK_GEN_MODE +{ + VPP_FE_DET_MASK_GEN_DISABLED = 0x00, // Mask generation Disabled + VPP_FE_DET_MASK_GEN_3X3_MAX = 0x01, // Generation using 3x3 max + VPP_FE_DET_MASK_GEN_5X5_AND_AVERAGE_COMB = 0x02, // Generation using 5x5 max and average combination + VPP_FE_DET_MASK_GEN_5X5_MAX = 0x03, // Generation using 5x5 max + VPP_FE_DET_MASK_GEN_END +}VPP_FE_DET_MASK_GEN_MODE, *PVPP_FE_DET_MASK_GEN_MODE; +/*struct for FE detail EE control*/ +typedef struct VPP_FE_DET_CTRL +{ + int EeEnable; + int DetailEnable; + int DetailAdd; + unsigned char HfMode; //VPP_FE_DET_HFMODE + unsigned char VfMode; //VPP_FE_DET_HFMODE + unsigned char DetailLut[16]; +}VPP_FE_DET_CTRL, *PVPP_FE_DET_CTRL; + + +/*struct for FE detail EE control parameters*/ +typedef struct VPP_FE_DET_CTRL_PARAMS +{ + unsigned char DetNosieTh1; + unsigned char DetNosieTh2; + unsigned char DetGain1; + unsigned char DetGain2; + unsigned char DetMaskGenMode; //VPP_FE_DET_MASK_GEN_MODE + unsigned char DetThBase; + unsigned char DetThStep; +}VPP_FE_DET_CTRL_PARAMS, *PVPP_FE_DET_CTRL_PARAMS; + + + typedef enum VPP_CPCB_EE_UNIT_NUM + { + VPP_CPCB_EE0 = 0, + VPP_CPCB_EE1, + VPP_CPCB_EE_MAX + }VPP_CPCB_EE_UNIT_NUM, *PVPP_CPCB_EE_UNIT_NUM; + +/*struct for CPCB EE control*/ +typedef struct VPP_CPCB_EE_CTRL +{ + unsigned char UpsamplerEn; + unsigned char LumaGainEn; + unsigned char DetailEn; + unsigned char ChromaGainEn; +} VPP_CPCB_EE_CTRL, *PVPP_CPCB_EE_CTRL; + + +typedef enum tagVPP_CMU_ACE_REGION +{ + VPP_CMU_ACE_REGION1 = 0, + VPP_CMU_ACE_REGION2, + VPP_CMU_ACE_REGION3 +} VPP_CMU_ACE_REGION; + +typedef enum tagVPP_CMU_ACE_THOLD +{ + VPP_CMU_ACE_THOLD0 = 0, // Below this is Black crush + VPP_CMU_ACE_THOLD1, + VPP_CMU_ACE_THOLD2, + VPP_CMU_ACE_THOLD3, + VPP_CMU_ACE_THOLD4, + VPP_CMU_ACE_THOLD5 // Above this is white pull up. +} VPP_CMU_ACE_THOLD; + + +typedef enum tagVPP_CMU_ACE_OUTPUT +{ + VPP_CMU_ACE_OUTPUT0 = 0, // White (below th0) + VPP_CMU_ACE_OUTPUT5 // Black (above th5) +} VPP_CMU_ACE_OUTPUT; + + +typedef enum tagVPP_CMU_ACE_GUARDBAND +{ + VPP_CMU_ACE_GUARDBAND2 = 0, + VPP_CMU_ACE_GUARDBAND3 +} VPP_CMU_ACE_GUARDBAND; + +typedef enum tagVPP_CMU_ACE_MAXSLOPE +{ + VPP_CMU_ACE_MAXSLOPE1= 0, + VPP_CMU_ACE_MAXSLOPE2, + VPP_CMU_ACE_MAXSLOPE3 +} VPP_CMU_ACE_MAXSLOPE; + + +typedef enum tagVPP_CMU_ACE_MODE +{ + VPP_CMU_ACE_OFF = 0, + VPP_CMU_ACE_MANUAL, + VPP_CMU_ACE_LOW, + VPP_CMU_ACE_MEDIUM, + VPP_CMU_ACE_HIGH, + VPP_CMU_ACE_MAX_MODE +} VPP_CMU_ACE_MODE; + + +typedef enum tagVPP_CMU_ACE_RANGE +{ + VPP_CMU_ACE_RANGE_0_255 = 0, + VPP_CMU_ACE_RANGE_16_236, + VPP_CMU_ACE_MAX_RANGE +} VPP_CMU_ACE_RANGE; + +typedef struct tagVPP_CMU_ACE_PARAMS +{ + unsigned char Enable; + unsigned char ColorCompensationLevel; + unsigned char Crush; + unsigned char WeightingFactor1; + unsigned char WeightingFactor2; + unsigned char WeightingFactor3; + + unsigned char ThresHold0; + unsigned char ThresHold1; + unsigned char ThresHold2; + unsigned char ThresHold3; + unsigned char ThresHold4; + unsigned char ThresHold5; + + unsigned short OutPut0; //White + unsigned short OutPut5; // Black + + unsigned char GuardBand2; + unsigned char GuardBand3; + + unsigned char MaximumSlope1; + unsigned char MaximumSlope2; + unsigned char MaximumSlope3; + +}VPP_CMU_ACE_PARAMS, *PVPP_CMU_ACE_PARAMS; + + +/*Enum for FRC SCL unit number*/ +typedef enum VPP_FRC_SCL_NUM +{ + VPP_FRC_SCL_MAIN = 0, + VPP_FRC_SCL_PIP, + VPP_FRC_SCL_OSD, + VPP_FRC_SCL_PG, + VPP_FRC_SCL_DETAIL, + VPP_FRC_SCL_BE, + VPP_FRC_SCL_GFX2, + VPP_FRC_SCL_MAX +}VPP_FRC_SCL_NUM; + + +/*data structure for scaler control*/ +typedef struct VPP_SCL_CTRL_T +{ + unsigned char HScalePos; //vertical scaler position, usually set to auto + unsigned char InputClr; //input color space + unsigned char OsdInput; //whether OSD input + unsigned char NLEn; //enable non linear scaler + unsigned char BitMode; //input and out put bit mode + unsigned char I565; //whether 18 bits 656 input + + unsigned char HTapNum; + unsigned char VTapNum; + + unsigned char DynamicLoad; // 1: dynamically load coefficient table, 0: don't load coefficient table dynamically. + unsigned char ForceSel; // 0: secect coefficients by scaling ratio.1:force selection scaler H coeff, 2:force selection scaler V coeff, 3:force selection both + int HSclMode; //if set ForceSel to 1, HSclMode should be set + int VSclMode; //if set ForceSel to 1, VSclMode should be set + + unsigned char CscMode; //used when the input is OSD + unsigned char CenterFrac;//used when enable NL scaling + +} VPP_SCL_CTRL, *PVPP_SCL_CTRL; + +/*scaler input and output resolution*/ +typedef struct VPP_SCL_RES_T +{ + unsigned int IVRes; + unsigned int IHRes; + unsigned int OVRes; + unsigned int OHRes; +} VPP_SCL_RES, *PVPP_SCL_RES; + +typedef struct VPP_SCL_CTRL_PARAM_T +{ + VPP_SCL_RES IORes; + VPP_SCL_CTRL SclCtrl; +}VPP_SCL_CTRL_PARAM; + +typedef struct +{ + unsigned planes; + int vres; + VPP_WIN win; + unsigned *logoBuf; + unsigned *logoBuf_2; + unsigned *mapaddr; + long length; + unsigned count; + + const unsigned *bcm_cmd_0; + unsigned bcm_cmd_0_len; + const unsigned *bcm_cmd_a; + unsigned bcm_cmd_a_len; + const unsigned *bcm_cmd_n; + unsigned bcm_cmd_n_len; + const unsigned *bcm_cmd_z; + unsigned bcm_cmd_z_len; + + unsigned *logo_frame_dma_cmd; + unsigned logo_dma_cmd_len; + + unsigned bcmQ_len; + unsigned dmaQ_len; + unsigned cfgQ_len; + +#if LOGO_USE_SHM + size_t mSHMOffset; + unsigned mSHMSize; + char * bcmQ; + unsigned bcmQ_phys; + char * dmaQ; + unsigned dmaQ_phys; + char * cfgQ; + unsigned cfgQ_phys; +#endif +} logo_device_t; + +/************* VPP module external APIs *****************/ + +/*********************************************** + * FUNCTION: create a VPP object + * PARAMS: base_addr - VPP object base address + * *handle - pointer to object handle + * RETURN: MV_THINVPP_OK - succeed + * MV_THINVPP_EUNCONFIG - not initialized + * MV_THINVPP_ENODEV - no device + * MV_THINVPP_ENOMEM - no memory + ***********************************************/ +int MV_THINVPP_Create(int base_addr); + +/*********************************************** + * FUNCTION: destroy a VPP object + * PARAMS: handle - VPP object handle + * RETURN: MV_THINVPP_OK - succeed + * MV_THINVPP_EUNCONFIG - not initialized + * MV_THINVPP_ENODEV - no device + * MV_THINVPP_ENOMEM - no memory + ***********************************************/ +int MV_THINVPP_Destroy(void); + +/*************************************** + * FUNCTION: VPP reset + * INPUT: NONE + * RETURN: NONE + **************************************/ +int MV_THINVPP_Reset(void); + +/*************************************** + * FUNCTION: VPP profile configuration + * INPUT: NONE + * RETURN: NONE + **************************************/ +int MV_THINVPP_Config(void); + +/******************************************************************* + * FUNCTION: set CPCB or DV output resolution + * INPUT: cpcbID - CPCB(for Berlin) or DV(for Galois) id + * resID - id of output resolution + * bit_depth - HDMI deep color bit depth + * RETURN: MV_THINVPP_OK - SUCCEED + * MV_EBADPARAM - invalid parameters + * MV_EUNCONFIG - VPP not configured or plane not active + * MV_EFRAMEQFULL - frame queue is full + * Note: this function has to be called before enabling a plane + * which belongs to that CPCB or DV. + *******************************************************************/ +int MV_THINVPP_SetCPCBOutputResolution(int cpcbID, int resID, int bit_depth); + +int MV_THINVPP_IsCPCBActive(int cpcbID); + +int MV_THINVPP_SetMainDisplayFrame(VBUF_INFO *pinfo); + +/****************************************************************************** + * FUNCTION: open a window of a video/graphics plane for display. + * the window is defined in end display resolution + * INPUT: planeID - id of a video/grahpics plane + * *win - pointer to a vpp window struct + * *attr - pointer to a vpp window attribute struct + * RETURN: MV_THINVPP_OK - SUCCEED + * MV_EBADPARAM - invalid parameters + * MV_EUNCONFIG - VPP not configured + * MV_EUNSUPPORT - plane not connected in configuration + * MV_ECMDQFULL - command queue is full + ******************************************************************************/ +int MV_THINVPP_OpenDispWindow(int planeID, VPP_WIN *win, VPP_WIN_ATTR *attr); + +int MV_THINVPP_CloseDispWindow(void); + +int MV_THINVPP_Stop(void); + + +#ifdef __cplusplus +} +#endif + +#define printz printk +//#define printz(...) +#endif diff --git a/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/include/thinvpp_api_types.h b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/include/thinvpp_api_types.h new file mode 100755 index 00000000..cbc4cf24 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/include/thinvpp_api_types.h @@ -0,0 +1,370 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + + +#ifndef __VPP_API_TYPES_H__ +#define __VPP_API_TYPES_H__ + +/*----------------------------------------------------------------------------- + * Macros and Constants + *----------------------------------------------------------------------------- + */ + +/*----------------------------------------------------------------------------- + * HDMI Notification Events + *----------------------------------------------------------------------------- + */ +#define MV_THINVPP_EVENT_HDMI_SINK_CONNECTED 0 +#define MV_THINVPP_EVENT_HDMI_SINK_DISCONNECTED 1 +#define MV_THINVPP_EVENT_HDMI_VIDEO_CFG_ERR 2 +#define MV_THINVPP_EVENT_HDMI_AUDIO_CFG_ERR 3 +#define MV_THINVPP_EVENT_HDMI_HDCP_ERR 4 + +/*----------------------------------------------------------------------------- + * HDMI Aux packet enums, structures + *----------------------------------------------------------------------------- + */ +typedef enum tagVPP_HDMI_PKT_ID +{ + VPP_HDMI_PKT_ID_ACP = 0x04, + VPP_HDMI_PKT_ID_ISRC1 = 0x05, + VPP_HDMI_PKT_ID_ISRC2 = 0x06, + VPP_HDMI_PKT_ID_GAMUT_METADATA = 0x0A, + VPP_HDMI_PKT_ID_VENDOR_INFOFRAME = 0x81, + VPP_HDMI_PKT_ID_AVI_INFOFRAME = 0x82, + VPP_HDMI_PKT_ID_SPD_INFOFRAME = 0x83, + VPP_HDMI_PKT_ID_AUDIO_INFOFRAME = 0x84, + VPP_HDMI_PKT_ID_MPEG_SRC_INFOFRAME = 0x85, +}VPP_HDMI_PKT_ID; + +typedef struct tagVPP_HDMI_PKT_GMD +{ + int nextField; + int noCurGBD; + int gdbProfile; // VPP_HDMI_GDB_PROFILE + int seqInfo; // VPP_HDMI_PKT_GMD_SEQ_INFO + unsigned char affectedGamutSeqNum; + unsigned char curGamutSeqNum; + unsigned char gbdData[28]; +}VPP_HDMI_PKT_GMD; + +// ACP packet +typedef enum tagVPP_HDMI_PKT_ACP_TYPE +{ + VPP_HDMI_PKT_ACP_GENERIC_AUDIO = 0x00, + VPP_HDMI_PKT_ACP_IEC60958, + VPP_HDMI_PKT_ACP_DVD_AUDIO, + VPP_HDMI_PKT_ACP_SACD, + VPP_HDMI_PKT_ACP_MAX, +}VPP_HDMI_PKT_ACP_TYPE; + +typedef struct tagVPP_HDMI_PKT_ACP +{ + int type; // VPP_HDMI_PKT_ACP_TYPE + // Valid only for DVD Audio and SACD + unsigned char dataLen; + unsigned char dataBuf[16]; +}VPP_HDMI_PKT_ACP; + +// ISRC Packet +typedef enum tagVPP_HDMI_PKT_ISRC_STS +{ + VPP_HDMI_PKT_ISRC_STS_START_POS = 0x01, + VPP_HDMI_PKT_ISRC_STS_INTER_POS = 0x02, + VPP_HDMI_PKT_ISRC_STS_END_POS = 0x04, +}VPP_HDMI_PKT_ISRC_STS; + +typedef struct tagVPP_HDMI_PKT_ISRC1 +{ + int cont; + int sts; // VPP_HDMI_PKT_ISRC_STS + int valid; + unsigned char upc_ean_fld[16]; +}VPP_HDMI_PKT_ISRC1; + +typedef struct tagVPP_HDMI_PKT_ISRC2 +{ + unsigned char upc_ean_fld[16]; +}VPP_HDMI_PKT_ISRC2; + +// SPD InfoFrame +typedef enum tagVPP_HDMI_CEA_SRC_DEV_TYPE +{ + VPP_HDMI_CEA_SRC_DEV_UNKNOWN = 0x00, + VPP_HDMI_CEA_SRC_DEV_DIG_STB, + VPP_HDMI_CEA_SRC_DEV_DVD_PLAYER, + VPP_HDMI_CEA_SRC_DEV_DVHS, + VPP_HDMI_CEA_SRC_DEV_HDD_REC, + VPP_HDMI_CEA_SRC_DEV_DVC, + VPP_HDMI_CEA_SRC_DEV_DSC, + VPP_HDMI_CEA_SRC_DEV_VIDEO_CD, + VPP_HDMI_CEA_SRC_DEV_GAME, + VPP_HDMI_CEA_SRC_DEV_PC, + VPP_HDMI_CEA_SRC_DEV_BD_PLAYER, + VPP_HDMI_CEA_SRC_DEV_SACD, + VPP_HDMI_CEA_SRC_DEV_MAX +}VPP_HDMI_CEA_SRC_DEV_TYPE; + +typedef struct tagVPP_HDMI_PKT_SPD_INFOFRM { + unsigned char vendorName[8]; + unsigned char prodDescChar[16]; + int srcDev; // VPP_HDMI_CEA_SRC_DEV_TYPE +}VPP_HDMI_PKT_SPD_INFOFRM; + +// MPEG source InfoFrame +typedef enum tagVPP_HDMI_CEA_MPG_FRM_TYPE +{ + VPP_HDMI_MPEG_FRM_UNKNOWN = 0x00, + VPP_HDMI_MPEG_FRM_I_PICTURE, + VPP_HDMI_MPEG_FRM_B_PICTURE, + VPP_HDMI_MPEG_FRM_P_PICTURE, + VPP_HDMI_MPEG_FRM_MAX, +}VPP_HDMI_CEA_MPG_FRM_TYPE; + +typedef struct tagVPP_HDMI_PKT_MPEG_SRC_INFOFRM +{ + unsigned int bitRate; + int mpegFrameType; // VPP_HDMI_CEA_MPG_FRM_TYPE + int repeatedField; +}VPP_HDMI_PKT_MPEG_SRC_INFOFRM; + +// Vendor Specific InfoFrame +typedef enum tagVPP_HDMI_VIDEO_FORMAT +{ + VPP_HDMI_VIDEO_FMT_NO_INFO = 0x00, + VPP_HDMI_VIDEO_FMT_EXTENDED_RES_FMT, + VPP_HDMI_VIDEO_FMT_3D_FMT, + VPP_HDMI_VIDEO_FMT_RESERVED, +}VPP_HDMI_VIDEO_FORMAT; + +typedef enum tagVPP_HDMI_VIC +{ + VPP_HDMI_VIC_RESERVED1 = 0x00, + VPP_HDMI_VIC_4K_2K_30, + VPP_HDMI_VIC_4K_2K_25, + VPP_HDMI_VIC_4K_2K_24, + VPP_HDMI_VIC_4K_2K_24_SMPTE, + VPP_HDMI_VIC_RESERVED2, +}VPP_HDMI_VIC; + +typedef enum tagVPP_HDMI_3D_STRUCTURE +{ + VPP_HDMI_3D_STRUCT_FRAME_PACKING=0x00, + VPP_HDMI_3D_STRUCT_FIELD_ALTERNATIVE=0x01, + VPP_HDMI_3D_STRUCT_LINE_ALTERNATIVE=0x02, + VPP_HDMI_3D_STRUCT_SIDE_BY_SIDE_FULL=0x03, + VPP_HDMI_3D_STRUCT_L_DEPTH=0x04, + VPP_HDMI_3D_STRUCT_L_DEPTH_GFX_GDEPTH=0x05, + VPP_HDMI_3D_STRUCT_TOP_AND_BOTTOM=0x06, + VPP_HDMI_3D_STRUCT_RESERVED2=0x07, + VPP_HDMI_3D_STRUCT_SIDE_BY_SIDE_HALF=0x08, + VPP_HDMI_3D_STRUCT_RESERVED3=0x09, +}VPP_HDMI_3D_STRUCTURE; + +typedef enum tagVPP_HDMI_3D_METADATA_TYPE +{ + VPP_HDMI_3D_METADATA_TYPE_PARALLAX_INFO = 0x00, + VPP_HDMI_3D_METADATA_TYPE_RESERVED = 0x01, +}VPP_HDMI_3D_METADATA_TYPE; + +typedef enum tagVPP_HDMI_3D_EXT_DATA +{ + VPP_HDMI_HORZ_SUBSAMP_3D_EXT_DATA_OL_OR=0x00, + VPP_HDMI_HORZ_SUBSAMP_3D_EXT_DATA_OL_ER, + VPP_HDMI_HORZ_SUBSAMP_3D_EXT_DATA_EL_OR, + VPP_HDMI_HORZ_SUBSAMP_3D_EXT_DATA_EL_ER, + + VPP_HDMI_QUIN_3D_EXT_DATA_OL_OR=0x04, + VPP_HDMI_QUIN_3D_EXT_DATA_OL_ER, + VPP_HDMI_QUIN_3D_EXT_DATA_EL_OR, + VPP_HDMI_QUIN_3D_EXT_DATA_EL_ER, + + VPP_HDMI_3D_EXT_DATA_RESERVED = 0x08, + +}VPP_HDMI_3D_EXT_DATA; + +typedef struct tagVPP_HDMI_PKT_VNDRSPEC_INFOFRM +{ + unsigned int ieeeRegID; + unsigned char HdmiVideoFmt;//defines the structure of the extended video formats - //VPP_HDMI_EXTENDED_VIDEO_FORMAT + unsigned char HDMI_VIC;//Video Identification Code - VPP_HDMI_VIC + unsigned char Hdmi_3D_Structure;//Transmission format of 3D Video Data - VPP_HDMI_3D_STRUCTURE + int Hdmi_3D_Meta_Present;//additional bytes of 3D Metadata are present in the Infoframe + unsigned char Hdmi_3D_Ext_Data;// + unsigned char Hdmi_3D_Metadata_Type;//Type of info of metadata whcich is used in the correct rendering of the stereoscopic video + unsigned char Hdmi_3D_Metadata_Length; + unsigned char Hdmi_3D_Metadata[16];//!WARN : Need to check +}VPP_HDMI_PKT_VNDRSPEC_INFOFRM; + +// Aux packet structure +typedef union tagVPP_HDMI_PKT +{ + VPP_HDMI_PKT_ACP acpPkt; + VPP_HDMI_PKT_GMD gmdPkt; + VPP_HDMI_PKT_ISRC1 isrc1Pkt; + VPP_HDMI_PKT_ISRC2 isrc2Pkt; + VPP_HDMI_PKT_SPD_INFOFRM spdInfoFrm; + VPP_HDMI_PKT_MPEG_SRC_INFOFRM mpegSrcInfoFrm; + VPP_HDMI_PKT_VNDRSPEC_INFOFRM vndrSpecInfoFrm; +}VPP_HDMI_PKT; + +/*----------------------------------------------------------------------------- + * HDMI Audio configuration structure + *----------------------------------------------------------------------------- + */ +typedef struct VPP_HDMI_AUDIO_CFG_T { + int numChannels; + int portNum; + int sampFreq; + int sampSize; + int mClkFactor; + int audioFmt; /* VPP_HDMI_AUDIO_FMT_T */ + int hbrAudio; /* True/False for controlling HBR audio */ +}VPP_HDMI_AUDIO_CFG; + +typedef enum tagVPP_HDMI_AUDIO_VUC_CFG_TYPE +{ + VPP_HDMI_VUC_CFG_SET_DEFAULT = 0x00, + VPP_HDMI_VUC_CFG_UPDATE_WITH_GIVEN_CFG, + VPP_HDMI_VUC_CFG_NO_UPDATE_TO_CURRENT_CFG, + VPP_HDMI_VUC_CFG_MAX +}VPP_HDMI_AUDIO_VUC_CFG_TYPE; + +typedef struct VPP_HDMI_AUDIO_VUC_CFG_T { + // VPP_HDMI_AUDIO_VUC_CFG_TYPE + unsigned char vBitCfg; + unsigned char vBit; + + // VPP_HDMI_AUDIO_VUC_CFG_TYPE + unsigned char uBitsCfg; + unsigned char uBits[14]; + + // VPP_HDMI_AUDIO_VUC_CFG_TYPE + unsigned char cBitsCfg; + unsigned char cBits[5]; +}VPP_HDMI_AUDIO_VUC_CFG; + +/*----------------------------------------------------------------------------- + * HDMI Sink Capabilities structures + *----------------------------------------------------------------------------- + */ +typedef enum VPP_HDMI_AUDIO_FMT_T +{ + VPP_HDMI_AUDIO_FMT_UNDEF = 0x00, + VPP_HDMI_AUDIO_FMT_PCM = 0x01, + VPP_HDMI_AUDIO_FMT_AC3, + VPP_HDMI_AUDIO_FMT_MPEG1, + VPP_HDMI_AUDIO_FMT_MP3, + VPP_HDMI_AUDIO_FMT_MPEG2, + VPP_HDMI_AUDIO_FMT_AAC, + VPP_HDMI_AUDIO_FMT_DTS, + VPP_HDMI_AUDIO_FMT_ATRAC, + VPP_HDMI_AUDIO_FMT_ONE_BIT_AUDIO, + VPP_HDMI_AUDIO_FMT_DOLBY_DIGITAL_PLUS, + VPP_HDMI_AUDIO_FMT_DTS_HD, + VPP_HDMI_AUDIO_FMT_MAT, + VPP_HDMI_AUDIO_FMT_DST, + VPP_HDMI_AUDIO_FMT_WMA_PRO, +}VPP_HDMI_AUDIO_FMT; + +typedef struct VPP_HDMI_RES_INFO_T { + int hActive; + int vActive; + // Refresh rate in Hz, -1 if refresh rate is + // undefined in the descriptor + int refreshRate; + // 0 = progressive, 1 = interlaced, 2 = undefined + int interlaced; +} VPP_HDMI_RES_INFO; + +typedef struct VPP_HDMI_AUDIO_FREQ_SPRT_T { + unsigned char Res : 1; + unsigned char Fs32KHz : 1; + unsigned char Fs44_1KHz : 1; + unsigned char Fs48KHz : 1; + unsigned char Fs88_2KHz : 1; + unsigned char Fs96KHz : 1; + unsigned char Fs176_4KHz : 1; + unsigned char Fs192KHz : 1; +} VPP_HDMI_AUDIO_FREQ_SPRT; + +typedef struct VPP_HDMI_AUDIO_WDLEN_SPRT_T { + unsigned char Res1 : 1; + unsigned char WdLen16 : 1; + unsigned char WdLen20 : 1; + unsigned char WdLen24 : 1; + unsigned char Res2 : 4; +} VPP_HDMI_AUDIO_WDLEN_SPRT; + +typedef struct VPP_HDMI_AUDIO_INFO_T { + int audioFmt; // VPP_HDMI_AUDIO_FMT + VPP_HDMI_AUDIO_FREQ_SPRT freqSprt; + // Field is valid only for compressed audio formats + unsigned int maxBitRate; // in KHz + // Field is valid only for LPCM + VPP_HDMI_AUDIO_WDLEN_SPRT wdLenSprt; + unsigned char maxNumChnls; +} VPP_HDMI_AUDIO_INFO; + +typedef struct VPP_HDMI_SPKR_ALLOC_T { + unsigned char FlFr : 1; // FrontLeft/Front Rear + unsigned char Lfe : 1; // Low Frequency Effect + unsigned char Fc : 1; // Front Center + unsigned char RlRr : 1; // Rear Left/Rear Right + unsigned char Rc : 1; // Rear Center + unsigned char FlcFrc: 1; // Front Left Center/Front Right Center + unsigned char RlcRrc: 1; // Rear Left Center /Rear Right Center + unsigned char Res : 1; +} VPP_HDMI_SPKR_ALLOC; + +// Calorimetry support +typedef struct tagVPP_HDMI_CALORIMETRY_INFO +{ + unsigned char xvYCC601 : 1; + unsigned char xvYCC709 : 1; + unsigned char MD0 : 1; + unsigned char MD1 : 1; + unsigned char MD2 : 1; + unsigned char res : 3; +}VPP_HDMI_CALORIMETRY_INFO; + +// Pixel repetition info +typedef struct tagVPP_HDMI_PIXEL_REPT_INFO +{ + unsigned int resMask : 26; + unsigned int prSupport : 6; +}VPP_HDMI_PIXEL_REPT_INFO; + +// Frame buffer info +typedef struct vbuf_info_t +{ + void * m_pbuf_start; // base address of the frame buffer; + unsigned m_buf_stride; // line stride (in bytes) of the frame buffer + unsigned m_active_left; // x-coordination (in pixels) of active window top left in reference window + unsigned m_active_top; // y-coordination (in pixels) of active window top left in reference window + unsigned m_active_width; // with of active in pixels. + unsigned m_active_height; // height of active data in pixels. + unsigned m_disp_offset; //Offset (in bytes) of active data to be displayed + + unsigned bgcolor; // background color of a vpp window + unsigned alpha; // global alpha of a vpp window +}VBUF_INFO; + + +#endif // __VPP_API_TYPES_H__ diff --git a/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/MISC/include/thinvpp_bcmbuf.h b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/MISC/include/thinvpp_bcmbuf.h new file mode 100755 index 00000000..39999cab --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/MISC/include/thinvpp_bcmbuf.h @@ -0,0 +1,146 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + + +#ifndef _BCMBUF_H_ +#define _BCMBUF_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct DHUB_CFGQ_T { + int base_addr; + int *addr; + int len; +#if LOGO_USE_SHM + unsigned phys; +#endif +} DHUB_CFGQ; + +/* structure of a buffer descriptor */ +/* a buffer descriptor contains the pointers of the entire buffer and sub-buffers */ +typedef struct BCMBUF_T { + int addr; + unsigned int *head; // head of total BCM buffer + unsigned int *dv1_head; // head of BCM sub-buffer used for CPCB0 +#if LOGO_USE_SHM + unsigned phys; +#else + unsigned int *dv3_head; // head of BCM sub-buffer used for CPCB2 +#endif + unsigned int *tail; // tail of the buffer, used for checking wrap around + unsigned int *writer; // write pointer of queue, update with shadow_tail with commit + int size; // size of total BCM buffer + int subID; // sub-buffer ID currently in use +} BCMBUF; + +/******* register programming buffer APIs **************/ +/*************************************************************** + * FUNCTION: allocate register programming buffer + * PARAMS: *buf - pointer to a register programming buffer + * : size - size of the buffer to allocate + * : - (should be a multiple of 4) + * RETURN: 1 - succeed + * 0 - failed to initialize a BCM buffer + ****************************************************************/ +#if LOGO_USE_SHM +int THINVPP_BCMBUF_Set(BCMBUF *pbcmbuf, void* addr, unsigned phys, int size); +#else +int THINVPP_BCMBUF_Create(BCMBUF *pbcmbuf,int size); +#endif + +/*************************************************************** + * FUNCTION: free register programming buffer + * PARAMS: *buf - pointer to a register programming buffer + * RETURN: 1 - succeed + * 0 - failed to initialize a BCM buffer + ****************************************************************/ +int THINVPP_BCMBUF_Destroy(BCMBUF *pbcmbuf); + +/*************************************************************** + * FUNCTION: reset a register programming buffer + * PARAMS: *buf - pointer to a register programming buffer + * RETURN: 1 - succeed + * 0 - failed to initialize a BCM buffer + ****************************************************************/ +int THINVPP_BCMBUF_Reset(BCMBUF *pbcmbuf); + +/********************************************************* + * FUNCTION: selest BCM sub-buffer to use + * PARAMS: *buf - pointer to the buffer descriptor + * subID - DV_1, DV_2, DV_3 + ********************************************************/ +void THINVPP_BCMBUF_Select(BCMBUF *pbcmbuf, int subID); + +/********************************************************* + * FUNCTION: write register address (4bytes) and value (4bytes) to the buffer + * PARAMS: *buf - pointer to the buffer descriptor + * address - address of the register to be set + * value - the value to be written into the register + * RETURN: 1 - succeed + * 0 - register programming buffer is full + ********************************************************/ +int THINVPP_BCMBUF_Write(BCMBUF *pbcmbuf, unsigned int address, unsigned int value); + +/********************************************************************* + * FUNCTION: do the hardware transmission + * PARAMS: block - 0: return without waiting for transaction finishing + * 1: return after waiting for transaction finishing + ********************************************************************/ +void THINVPP_BCMBUF_HardwareTrans(BCMBUF *pbcmbuf, int block); + + +#if LOGO_USE_SHM +int THINVPP_CFGQ_Set(DHUB_CFGQ *cfgQ,void* addr, unsigned phys, int size); +#else +int THINVPP_CFGQ_Create(DHUB_CFGQ *cfgQ, int size); +#endif +int THINVPP_CFGQ_Destroy(DHUB_CFGQ *cfgQ); + +/******************************************************************************* + * FUNCTION: commit cfgQ which contains BCM DHUB programming info to interrupt service routine + * PARAMS: *cfgQ - cfgQ + * cpcbID - cpcb ID which this cmdQ belongs to + * intrType - interrupt type which this cmdQ belongs to: 0 - VBI, 1 - VDE + * NOTE: this API is only called from VBI/VDE ISR. + *******************************************************************************/ +int THINVPP_BCMDHUB_CFGQ_Commit(DHUB_CFGQ *cfgQ, int cpcbID); + +/********************************************************************* + * FUNCTION: send a BCM BUF info to a BCM cfgQ + * PARAMS: *pbcmbuf - pointer to the BCMBUF + * *cfgQ - target BCM cfgQ + * NOTE: this API is only called from VBI/VDE ISR. + ********************************************************************/ +int THINVPP_BCMBUF_To_CFGQ(BCMBUF *pbcmbuf, DHUB_CFGQ *cfgQ); + +/********************************************************************* + * FUNCTION: send a BCM cfgQ info to a BCM cfgQ + * PARAMS: src_cfgQ - pointer to the source BCM cfgQ + * *cfgQ - target BCM cfgQ + * NOTE: this API is only called from VBI/VDE ISR. + ********************************************************************/ +void THINVPP_CFGQ_To_CFGQ(DHUB_CFGQ *src_cfgQ, DHUB_CFGQ *cfgQ); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/MISC/source/thinvpp_bcmbuf.c b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/MISC/source/thinvpp_bcmbuf.c new file mode 100755 index 00000000..2c5c2874 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/MISC/source/thinvpp_bcmbuf.c @@ -0,0 +1,358 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + +#define _THINVPP_BCMBUF_C + +#include "thinvpp_module.h" +#include "thinvpp_common.h" +#include "Galois_memmap.h" +#include "avio.h" +#include "galois_io.h" +#include "maddr.h" + +#include +#include // for msleep() +#include +#include +#include + +static void inner_outer_flush_dcache_area(void *addr, size_t length) +{ + phys_addr_t start, end; + + __cpuc_flush_dcache_area(addr, length); + + start = virt_to_phys(addr); + end = start + length; + + outer_cache.flush_range(start, end); +} + +/*************************************************************** + * FUNCTION: allocate register programming buffer + * PARAMS: *buf - pointer to a register programming buffer + * : size - size of the buffer to allocate + * : - (should be a multiple of 4) + * RETURN: 1 - succeed + * 0 - failed to initialize a BCM buffer + ****************************************************************/ +#if LOGO_USE_SHM +int THINVPP_BCMBUF_Set(BCMBUF *pbcmbuf, void *addr, unsigned phys, int size) +{ + if (size <= 0) + return (MV_THINVPP_EBADPARAM); + + /* allocate memory for the buffer */ + pbcmbuf->addr = (int)addr; + if(!pbcmbuf->addr) + return MV_THINVPP_ENOMEM; + pbcmbuf->phys = phys; + + pbcmbuf->size = size; + pbcmbuf->head = (unsigned int *)((pbcmbuf->addr+0x1f)&(~0x01f)); + if (pbcmbuf->head != (unsigned int *)pbcmbuf->addr) + pbcmbuf->size = size-64; + + return MV_THINVPP_OK; +} +#else +int THINVPP_BCMBUF_Create(BCMBUF *pbcmbuf, int size) +{ + if (size <= 0) + return (MV_THINVPP_EBADPARAM); + + /* allocate memory for the buffer */ + pbcmbuf->addr = (int)THINVPP_MALLOC(size); + if(!pbcmbuf->addr) + return MV_THINVPP_ENOMEM; + + pbcmbuf->size = size; + pbcmbuf->head = (unsigned int *)((pbcmbuf->addr+0x1f)&(~0x01f)); + if (pbcmbuf->head != (unsigned int *)pbcmbuf->addr) + pbcmbuf->size = size-64; + + return MV_THINVPP_OK; +} +#endif + + +/*************************************************************** + * FUNCTION: free register programming buffer + * PARAMS: *buf - pointer to a register programming buffer + * RETURN: 1 - succeed + * 0 - failed to initialize a BCM buffer + ****************************************************************/ +int THINVPP_BCMBUF_Destroy(BCMBUF *pbcmbuf) +{ + /* allocate memory for the buffer */ + if (!pbcmbuf->addr) + return (MV_THINVPP_EBADCALL); + +#if !LOGO_USE_SHM + THINVPP_FREE((int *)(pbcmbuf->addr)); +#endif + + pbcmbuf->addr = 0; + pbcmbuf->head = NULL; + + return MV_THINVPP_OK; +} + + +/*************************************************************** + * FUNCTION: reset a register programming buffer + * PARAMS: *buf - pointer to a register programming buffer + * RETURN: 1 - succeed + * 0 - failed to initialize a BCM buffer + ****************************************************************/ +int THINVPP_BCMBUF_Reset(BCMBUF *pbcmbuf) +{ + pbcmbuf->tail = pbcmbuf->head + (pbcmbuf->size/4); + + /*set pointers to the head*/ + pbcmbuf->writer = pbcmbuf->head; + pbcmbuf->dv1_head = pbcmbuf->head; + //pbcmbuf->dv3_head = pbcmbuf->dv1_head + (pbcmbuf->size/16)*3; + pbcmbuf->subID = -1; /* total */ + + return MV_THINVPP_OK; +} + +/********************************************************* + * FUNCTION: Select sub register programming buffer + * PARAMS: *buf - pointer to the buffer descriptor + * subID - CPCB_1, CPCB_2, CPCB_3 or total + ********************************************************/ +void THINVPP_BCMBUF_Select(BCMBUF *pbcmbuf, int subID) +{ + /* reset read/write pointer of the buffer */ + if (subID == CPCB_1){ + pbcmbuf->writer = pbcmbuf->dv1_head; + //} else if (subID == CPCB_3) { + //pbcmbuf->writer = pbcmbuf->dv3_head; + //} else { + //pbcmbuf->writer = pbcmbuf->head; + } + + pbcmbuf->subID = subID; + + return; +} + +#if !LOGO_USE_SHM +/********************************************************* + * FUNCTION: write register address (4 bytes) and value (4 bytes) to the buffer + * PARAMS: *buf - pointer to the buffer descriptor + * address - address of the register to be set + * value - the value to be written into the register + * RETURN: 1 - succeed + * 0 - register programming buffer is full + ********************************************************/ +int THINVPP_BCMBUF_Write(BCMBUF *pbcmbuf, unsigned int address, unsigned int value) +{ + unsigned int *end; + + /*if not enough space for storing another 8 bytes, wrap around happens*/ + if (pbcmbuf->subID == CPCB_1) + end = pbcmbuf->dv3_head; + else + end = pbcmbuf->tail; + + if(pbcmbuf->writer == end){ + /*the buffer is full, no space for wrap around*/ + return MV_THINVPP_EBCMBUFFULL; + } + + /*save the data to the buffer*/ + *pbcmbuf->writer = value; + pbcmbuf->writer ++; + *pbcmbuf->writer = address; + pbcmbuf->writer ++; + + return MV_THINVPP_OK; +} +#endif + +#if LOGO_USE_SHM +int THINVPP_CFGQ_Set(DHUB_CFGQ *cfgQ, void *addr, unsigned phys, int size) +{ + if (size <= 0) + return (MV_THINVPP_EBADPARAM); + + /* allocate memory for the buffer */ + cfgQ->base_addr = (int)addr; + if(!cfgQ->base_addr) + return MV_THINVPP_ENOMEM; + cfgQ->phys = phys; + cfgQ->addr = (int *)((cfgQ->base_addr+0x1f)&(~0x01f)); + cfgQ->len = 0; + + return MV_THINVPP_OK; +} +#else +int THINVPP_CFGQ_Create(DHUB_CFGQ *cfgQ, int size) +{ + if (size <= 0) + return (MV_THINVPP_EBADPARAM); + + /* allocate memory for the buffer */ + cfgQ->base_addr = (int)THINVPP_MALLOC(size); + if(!cfgQ->base_addr) + return MV_THINVPP_ENOMEM; + cfgQ->addr = (int *)((cfgQ->base_addr+0x1f)&(~0x01f)); + cfgQ->len = 0; + + return MV_THINVPP_OK; +} +#endif + +int THINVPP_CFGQ_Destroy(DHUB_CFGQ *cfgQ) +{ + int i; + if (!cfgQ->base_addr ) + return (MV_THINVPP_EBADCALL); + + for(i=0; ilen; i++); + { + //Dummy register: system timer couter1 divider, not in use! + *(cfgQ->addr+i*2) = 0; + *(cfgQ->addr+i*2+1) = 0xf7f60000 + (VOP_HDMI_SEL<<2); + } + +#if !LOGO_USE_SHM + THINVPP_FREE((int *)(cfgQ->base_addr)); +#endif + + cfgQ->base_addr = 0; + cfgQ->addr = 0; + + return MV_THINVPP_OK; +} + +/******************************************************************************* + * FUNCTION: commit cfgQ which contains BCM DHUB programming info to interrupt service routine + * PARAMS: *cfgQ - cfgQ + * cpcbID - cpcb ID which this cmdQ belongs to + * intrType - interrupt type which this cmdQ belongs to: 0 - VBI, 1 - VDE + * NOTE: this API is only called from VBI/VDE ISR. + *******************************************************************************/ +int THINVPP_BCMDHUB_CFGQ_Commit(DHUB_CFGQ *cfgQ, int cpcbID) +{ + unsigned int sched_qid; + unsigned int bcm_sched_cmd[2]; + + static int bcm_count = 0; + bcm_count++; + + if (cfgQ->len <= 0) + return MV_THINVPP_EBADPARAM; + + if (cpcbID == CPCB_1) + sched_qid = BCM_SCHED_Q0; + else if (cpcbID == CPCB_2) + sched_qid = BCM_SCHED_Q1; + else + sched_qid = BCM_SCHED_Q2; + + { + //check BCM Q status before use + int sched_stat; + + BCM_SCHED_GetEmptySts(sched_qid, &sched_stat); + if (sched_stat == 0) + { + printk("****************[VPP fastlogo]ERROR! Q%d SCHED QUEUE OVERFLOW!!!!*************\n", sched_qid); + printk("[VPP fastlogo] BCM Q fulless status: %X\n", MV_MEMIO32_READ(MEMMAP_AVIO_BCM_REG_BASE+RA_AVIO_BCM_FULL_STS)); + return MV_THINVPP_EIOFAIL; + } + } + +#if LOGO_USE_SHM + dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), avioDhubChMap_vpp_BCM_R, cfgQ->phys, (int)cfgQ->len*8, 0, 0, 0, 1, bcm_sched_cmd); +#else + inner_outer_flush_dcache_area(cfgQ->addr, cfgQ->len*8); + dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), avioDhubChMap_vpp_BCM_R, (int)virt_to_phys(cfgQ->addr), (int)cfgQ->len*8, 0, 0, 0, 1, bcm_sched_cmd); +#endif + while( !BCM_SCHED_PushCmd(sched_qid, bcm_sched_cmd, NULL)); + + return MV_THINVPP_OK; +} + +/********************************************************************* + * FUNCTION: send a BCM BUF info to a BCM cfgQ + * PARAMS: *pbcmbuf - pointer to the BCMBUF + * *cfgQ - target BCM cfgQ + * NOTE: this API is only called from VBI/VDE ISR. + ********************************************************************/ +int THINVPP_BCMBUF_To_CFGQ(BCMBUF *pbcmbuf, DHUB_CFGQ *cfgQ) +{ + int size; + unsigned int bcm_sched_cmd[2]; + unsigned int *start; + +#if LOGO_USE_SHM + start = pbcmbuf->dv1_head; +#else + if (pbcmbuf->subID == CPCB_1) + start = pbcmbuf->dv1_head; + else if (pbcmbuf->subID == CPCB_3) + start = pbcmbuf->dv3_head; + else + start = pbcmbuf->head; +#endif + + size = (int)pbcmbuf->writer-(int)start; + + if (size <= 0) + return MV_THINVPP_EBADPARAM; + +#if LOGO_USE_SHM + dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), avioDhubChMap_vpp_BCM_R, pbcmbuf->phys, size, 0, 0, 0, 1, bcm_sched_cmd); +#else + inner_outer_flush_dcache_area(start, size); + dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), avioDhubChMap_vpp_BCM_R, (int)virt_to_phys(start), size, 0, 0, 0, 1, bcm_sched_cmd); +#endif + while( !BCM_SCHED_PushCmd(BCM_SCHED_Q13, bcm_sched_cmd, cfgQ->addr + cfgQ->len*2)); + cfgQ->len += 2; + + return MV_THINVPP_OK; +} + +/********************************************************************* + * FUNCTION: send a BCM cfgQ info to a BCM cfgQ + * PARAMS: src_cfgQ - pointer to the source BCM cfgQ + * *cfgQ - target BCM cfgQ + * NOTE: this API is only called from VBI/VDE ISR. + ********************************************************************/ +void THINVPP_CFGQ_To_CFGQ(DHUB_CFGQ *src_cfgQ, DHUB_CFGQ *cfgQ) +{ + unsigned int bcm_sched_cmd[2]; + + if (src_cfgQ->len <= 0) + return; + +#if LOGO_USE_SHM + dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), avioDhubChMap_vpp_BCM_R, src_cfgQ->phys, (int)src_cfgQ->len*8, 0, 0, 0, 1, bcm_sched_cmd); +#else + inner_outer_flush_dcache_area(src_cfgQ->addr, src_cfgQ->len*8); + dhub_channel_generate_cmd(&(VPP_dhubHandle.dhub), avioDhubChMap_vpp_BCM_R, (int)virt_to_phys(src_cfgQ->addr), (int)src_cfgQ->len*8, 0, 0, 0, 1, bcm_sched_cmd); +#endif + while( !BCM_SCHED_PushCmd(BCM_SCHED_Q13, bcm_sched_cmd, cfgQ->addr + cfgQ->len*2)); + cfgQ->len += 2; +} + diff --git a/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/include/include_BG2CD_A0/maddr.h b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/include/include_BG2CD_A0/maddr.h similarity index 100% rename from arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/include/include_BG2CD_A0/maddr.h rename to arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/include/include_BG2CD_A0/maddr.h diff --git a/arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/include/include_BG2_A0/maddr.h b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/include/include_BG2_A0/maddr.h similarity index 100% rename from arch/arm/mach-berlin/modules/fastlogo/THINVPP/source/include/include_BG2_A0/maddr.h rename to arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/include/include_BG2_A0/maddr.h diff --git a/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/include/thinvpp_apifuncs.h b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/include/thinvpp_apifuncs.h new file mode 100755 index 00000000..e30fa4f7 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/include/thinvpp_apifuncs.h @@ -0,0 +1,45 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + + +#ifndef _VPP_APIFUNCS_H_ +#define _VPP_APIFUNCS_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/******************************************************************* + * FUNCTION: set CPCB(for Berlin) or DV(for Galois) output resolution + * INPUT: cpcbID - CPCB(for Berlin) or DV(for Galois) id + * resID - id of output resolution + * RETURN: MV_THINVPP_OK - SUCCEED + * MV_EBADPARAM - invalid parameters + * MV_EUNCONFIG - VPP not configured or plane not active + * MV_EFRAMEQFULL - frame queue is full + * Note: this function has to be called before enabling a plane + * which belongs to that CPCB or DV. + *******************************************************************/ +int VPP_SetCPCBOutputResolution(THINVPP_OBJ *vpp_obj, int *in_params); + +#ifdef __cplusplus__ +} +#endif + +#endif diff --git a/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/include/thinvpp_common.h b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/include/thinvpp_common.h new file mode 100755 index 00000000..a268109c --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/include/thinvpp_common.h @@ -0,0 +1,110 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + +#ifndef _THINVPP_COMMON_H_ +#define _THINVPP_COMMON_H_ + +#include "com_type.h" + +/* maximum number of VPP objects */ +#define MAX_NUM_OBJECTS 1 + +/* maximum number of integer parameters of callback functions */ +#define MAX_NUM_PARAMS 10 + +/* maximum number of frames in frame buffer queue */ +#define MAX_NUM_FRAMES 20 + +/* maximum number of commands in command queue */ +#define MAX_NUM_CMDS 100 + +/* maximum number of events */ +#define MAX_NUM_EVENTS 32 + +/* BCM buffer size */ +/* DV1_BCM_BUFFER_SIZE + DV2_BCM_BUFFER_SIZE + DV3_BCM_BUFFER_SIZE = BCM_BUFFER_SIZE */ +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#define BCM_BUFFER_SIZE 0xA000//20480 +#else //(BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#define BCM_BUFFER_SIZE 0x17700 //96000 +#define DV1_BCM_BUFFER_SIZE 0x7d00 //32000 +#define DV2_BCM_BUFFER_SIZE 0x7d00 //32000 +#define DV3_BCM_BUFFER_SIZE 0x7d00 //32000 +#define VDE_BCM_BUFFER_SIZE 0x800 +#endif //(BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) + +/* 3D De-interlacer field buffer size */ +#define DEINT_BUFFER_SIZE (1920*1081*26*3/8) // 6 1080I frame (26-bit per pixel) + +/* offline scaling threshold ratio */ +#define OFFLINE_SCL_THRESH_VRATIO 2 + +/* offline frame buffer size */ +#define OFFLINE_BUFFER_SIZE (1920*1080*2/(OFFLINE_SCL_THRESH_VRATIO)) // 2 offline frames +#define AUX_OFFLINE_BUFFER_SIZE (720*576*2) // 2 aux offline frames + +/* CC data queue size */ +#define CC_DATA_QUEUE_SIZE (100) + +/* WSS data queue size */ +#define WSS_DATA_QUEUE_SIZE (10) + +/* CGMS data queue size */ +#define CGMS_DATA_QUEUE_SIZE (10) + +/* TT data length per frame */ +#define TT_DATA_LEN_PER_FRAME (40 * 4) + +/* TT data queue size */ +#define TT_DATA_QUEUE_SIZE (TT_DATA_LEN_PER_FRAME * 10) + +/* DMA command buffer size */ +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#define DMA_CMD_BUFFER_SIZE (20 * 8) +#else //(BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#define DMA_CMD_BUFFER_SIZE (100 * 8) +#endif //(BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) + +/* Hardware interface constants */ + +/* Register width in Berlin is 32 bits */ +typedef unsigned int REG_WIDTH; +#define SIZE_OF_REG sizeof(REG_WIDTH) + +// Packed structure and packed array attributes +#ifndef PACKED_STRUCT + #ifdef __LINUX__ + #define PACKED_STRUCT __attribute__((packed)) + #define PACKED_ARRAY __attribute__((aligned(1))) + #else + #define PACKED_STRUCT + #define PACKED_ARRAY + #endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* callback function type definition */ +typedef int (*FUNCPTR)(void *, void *); +#ifdef __cplusplus +} +#endif + +#endif diff --git a/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/include/thinvpp_isr.h b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/include/thinvpp_isr.h new file mode 100755 index 00000000..d4b907ad --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/include/thinvpp_isr.h @@ -0,0 +1,37 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + +#ifndef _THINVPP_H_ +#define _THINVPP_H_ + +#include "thinvpp_module.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +void THINVPP_CPCB_ISR_service(THINVPP_OBJ *vpp_obj, int cpcbID); +void THINVPP_Enable_ISR_Interrupt(THINVPP_OBJ *vpp_obj, int cpcbID, int flag); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/include/thinvpp_module.h b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/include/thinvpp_module.h new file mode 100755 index 00000000..be1c653f --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/include/thinvpp_module.h @@ -0,0 +1,275 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + + +#ifndef _VPP_MODULE_H_ +#define _VPP_MODULE_H_ + +#include "api_avio_dhub.h" +#include "thinvpp_common.h" +#include "thinvpp_api.h" +#include "thinvpp_bcmbuf.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#define THINVPP_MALLOC(s) kmalloc(s, GFP_KERNEL) +#define THINVPP_MEMSET memset +#define THINVPP_MEMCPY memcpy +#define THINVPP_FREE kfree + + +/* helper MACROs */ +#define CPCB_OF_CHAN(vpp_obj, chanID) (vpp_obj->chan[chanID].dvID) +#define CPCB_OF_VOUT(vpp_obj, voutID) (vpp_obj->vout[voutID].dvID) + +#define START_1DDMA(dhubID, dmaID, start_addr, size, cfgQ, ptr) \ + dhub_channel_big_write_cmd(&(((HDL_dhub2d *)dhubID)->dhub), dmaID, (int)start_addr, size, 0, 0, 0, 1, cfgQ, ptr) + +#define START_2DDMA(dhubID, dmaID, start_addr, stride, width, height, cfgQ) \ + dhub2d_channel_cfg((HDL_dhub2d *)dhubID, dmaID, start_addr, stride, width, height, 1, 0, 0, 0, 0, 1, cfgQ) + +#define VPP_REG_WRITE32(reg, val) THINVPP_BCMBUF_Write(vpp_obj->pVbiBcmBuf, vpp_obj->base_addr+(reg), (val)) +#define VPP_REG_WRITE8(reg, val) THINVPP_BCMBUF_Write(vpp_obj->pVbiBcmBuf, vpp_obj->base_addr+((reg)<<2), (val)) + +#define GLB_REG_WRITE32(reg, val) *(volatile int *)(reg) = (val) +#define GLB_REG_READ32(reg) (*(volatile int *)(reg)) +#define VPP_REG_READ32_RAW(reg) (*(volatile int *)(vpp_obj->base_addr+(reg))) +#define VPP_REG_READ8_RAW(reg) (*(volatile int *)(vpp_obj->base_addr+((reg)<<2))) +#define VPP_REG_WRITE32_RAW(reg, val) *(volatile int *)(vpp_obj->base_addr+(reg)) = (val) +#define VPP_REG_WRITE8_RAW(reg, val) *(volatile int *)(vpp_obj->base_addr+((reg)<<2)) = (val) + +/*************************************************************** +* DESCR: get the one byte of a unsigned int +* PARAMS: uint32 - an unsigned int +****************************************************************/ +#define GET_LOWEST_BYTE(uint32) ((uint32) & 0xFF) +#define GET_SECOND_BYTE(uint32) (((uint32) & 0xFF00) >> 8) +#define GET_THIRD_BYTE(uint32) (((uint32) & 0xFF0000) >> 16) + +/*************************************************************** +* DESCR: load register default value by name +* PARAMS: RegName - register name in maddr.h +* DefValues - register default value +****************************************************************/ +#define WRITE_REG_DEFAULT_VAL(RegName, DefValues)\ +do{\ + THINVPP_BCMBUF_Write(vpp_obj->pVbiBcmBuf, vpp_obj->base_addr + (RegName << 2), DefValues.VPP_##RegName);\ +}while(0) + +#define WRITE_REG_DEFAULT_VAL_32BITS(RegName, DefValues)\ +do{\ + THINVPP_BCMBUF_Write(vpp_obj->pVbiBcmBuf, vpp_obj->base_addr + RegName, DefValues.VPP_##RegName);\ +}while(0) + +/*Enum for maintaining CPCB 0,1 and 2 at Backend*/ +typedef enum VPP_CPCB_UNIT_NUM/////////////////////////////////temp put here +{ + VPP_CPCB0 = 0, + VPP_CPCB1, + VPP_CPCB2, + VPP_CPCB_MAX +}VPP_CPCB_UNIT_NUM, *PVPP_CPCB_UNIT_NUM; + +/* default window attributes */ +#define DEFAULT_BGCOLOR 0 // green +#define DEFAULT_ALPHA 0xff // opaque + +/* definition of video resolution type */ +enum { + TYPE_SD = 0, + TYPE_HD = 1, +}; + +/* definition of video scan mode */ +enum { + SCAN_PROGRESSIVE = 0, + SCAN_INTERLACED = 1, +}; + +/* definition of video frame-rate */ +enum { + FRAME_RATE_23P98 = 0, + FRAME_RATE_24 = 1, + FRAME_RATE_25 = 2, + FRAME_RATE_29P97 = 3, + FRAME_RATE_30 = 4, + FRAME_RATE_47P96 = 5, + FRAME_RATE_48 = 6, + FRAME_RATE_50 = 7, + FRAME_RATE_59P94 = 8, + FRAME_RATE_60 = 9, + FRAME_RATE_100 = 10, + FRAME_RATE_119P88 = 11, + FRAME_RATE_120 = 12, +}; + +/* definition of EE working mode */ +enum { + EE_MODE_OFF = 0, /* disable EE */ + EE_MODE_ON = 1, /* enable EE*/ +}; + +/* definition of VPP in-line and off-line modes */ +enum { + MODE_INLINE = 0, + MODE_OFFLINE = 1, +}; + +/* definition of HV scaling coeff selection */ +enum { + MODE_COEFF_SEL_AUTO = 0, + MODE_COEFF_SEL_FORCE_H = 1, + MODE_COEFF_SEL_FORCE_V = 2, + MODE_COEFF_SEL_FORCE_HV = 3, +}; + +/* definition of stages of a pipeline */ +enum { + STAGE_FE = 0, + STAGE_SCL = 1, + STAGE_CPCB = 2, + STAGE_BE = 3, + MAX_NUM_STAGES = 4 +}; + +enum { + SENSIO_DISABLE = 0, + SENSIO_SCALE_ONLY = 1, + SENSIO_FILTER_ONLY = 2, + SENSIO_FULL = 3, +}; + +typedef struct EVENT_CALLBACK_T{ + volatile int status; // registered or not + FUNCPTR cb_func; // callback function + int params[MAX_NUM_PARAMS]; // function parameters +} EVENT_CALLBACK; + +typedef struct OFFLINE_BUFF_DESCR_T{ + void *addr; // offline buffer address + int size; // data size in byte + VPP_WIN disp_win; // display window in end display for content in this offline buffer + VPP_WIN content_win; // content window in end display for content in this offline buffer +}OFFLINE_BUFF_DESCR; + +typedef struct PLANE_T { + volatile int status; // active or not + int mode; // off-line or in-line mode, only valid for main & PIP video + int srcfmt; // video component data format in input frame buffer + int order; // video component data order in input frame buffer + + int wpl; // beat per line of current frame + + int dmaRID; // plane inline read DMA channel ID + int dmaRdhubID; // ID of Dhub on which inline read DMA channel is connected + + /* offline write-back/read-back DMAs are only available for Berlin Main/PIP/AUX plane */ + int offline_dmaWID; // plane offline write-back DMA channel ID + int offline_dmaWdhubID; // ID of Dhub on which offline write-back DMA channel is connected + int offline_dmaRID; // plane offline read-back DMA channel ID + int offline_dmaRdhubID; // ID of Dhub on which offline read-back DMA channel is connected + + VPP_WIN actv_win; // plane display content location and size in reference window + // this information is a copy from frame descriptor for register updating purpose. + VBUF_INFO * pinfo; +} PLANE; + + +typedef struct CHAN_T { + volatile int status; // active or not + int dvID; // ID of the DV, which this channel belongs to + int dvlayerID; // ID of DV layer, which this channel connects to + int zorder; // Z-order of DV plane, which this channel connects to + int scl_in_out_mode; + + VPP_WIN disp_win; // channel display window in end display + VPP_WIN_ATTR disp_win_attr; // channel display window attribute: bgcolor and alpha +} CHAN; + +typedef struct DV_T { + volatile int status; // active or not + int num_of_chans; // number of the channels, which belong to this channel + int chanID[MAX_NUM_CHANS]; // ID of the channels, which belong to this DV + int num_of_vouts; // number of the VOUTs, which belong to this channel + int voutID[MAX_NUM_VOUTS]; // ID of the VOUTs, which belong to this DV + int output_res; // ID of CPCB(for Berlin) or DV(for Galois) output resolution, i.e. end display resolution + + DHUB_CFGQ vbi_dma_cfgQ[2]; + DHUB_CFGQ *curr_cpcb_vbi_dma_cfgQ; + DHUB_CFGQ vbi_bcm_cfgQ[2]; + DHUB_CFGQ *curr_cpcb_vbi_bcm_cfgQ; + + volatile int vbi_num; // VBI interrupt counter +} DV; + +typedef struct VOUT_T { + volatile int status; // active or not + int dvID; // ID of the DV, which this VOUT belongs to +} VOUT; + + +/************************************************/ +/*********** VPP object data structures *********/ +/************************************************/ +typedef struct THINVPP_OBJ_T { + volatile int status; // active or not + + PLANE plane[MAX_NUM_PLANES]; // CURSOR, OSD, IG, PG, PIP, MAIN, BG + CHAN chan[MAX_NUM_CHANS]; // OSD, PG, PIP, MAIN and BG + DV dv[MAX_NUM_CPCBS]; // CPCB-0, CPCB-1, and CPCB-2 + VOUT vout[MAX_NUM_VOUTS]; // HDMI, Component, S-Video and CVBS + + unsigned int base_addr; // VPP object hardware base address + HDL_semaphore *pSemHandle; // semaphore handler of CPCB semaphores + +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) + int dhub_cmdQ[avioDhubChMap_vpp_TT_R]; +#else //(BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) + UINT32 dhub_cmdQ[avioDhubChMap_vpp_SPDIF_W]; +#endif //(BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) + + int hdmi_mute; + BCMBUF vbi_bcm_buf[2]; + BCMBUF *pVbiBcmBufCpcb[VPP_CPCB_MAX]; + BCMBUF *pVbiBcmBuf; //pointer to the VBI BCM buffer in use + +} THINVPP_OBJ; + + +/************************************************/ +/*********** global VPP container ***************/ +/************************************************/ +#ifdef _THINVPP_API_C_ +THINVPP_OBJ *thinvpp_obj = NULL; +#else +extern THINVPP_OBJ *thinvpp_obj; +#endif + +/**************************************************************************/ +/****************** Common VPP object Function Calls **********************/ +/**************************************************************************/ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/thinvpp_api.c b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/thinvpp_api.c new file mode 100755 index 00000000..46670ac5 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/thinvpp_api.c @@ -0,0 +1,508 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + + +#define _THINVPP_API_C_ + +#include "Galois_memmap.h" +#include "galois_io.h" + +#include "thinvpp_module.h" +#include "thinvpp_apifuncs.h" +#include "thinvpp_isr.h" + +#include +#include +#include + +#include "maddr.h" +#include "vpp.h" +#include "api_dhub.h" + +#define bTST(x, b) (((x) >> (b)) & 1) + +extern logo_device_t fastlogo_ctx; + +void VPP_dhub_sem_clear(void) +{ + int instat; + HDL_dhub2d *pDhubHandle; + int dhubID; + int status; + + HDL_semaphore *pSemHandle = thinvpp_obj->pSemHandle; + + instat = semaphore_chk_full(pSemHandle, -1); + + if (bTST(instat, avioDhubSemMap_vpp_vppCPCB0_intr)){ + semaphore_pop(pSemHandle, avioDhubSemMap_vpp_vppCPCB0_intr, 1); + semaphore_clr_full(pSemHandle, avioDhubSemMap_vpp_vppCPCB0_intr); + } else if (bTST(instat, avioDhubSemMap_vpp_vppCPCB2_intr)){ + semaphore_pop(pSemHandle, avioDhubSemMap_vpp_vppCPCB2_intr, 1); + semaphore_clr_full(pSemHandle, avioDhubSemMap_vpp_vppCPCB2_intr); + } + + + dhubID = avioDhubChMap_vpp_BCM_R; + pDhubHandle = &VPP_dhubHandle; + + /* clear BCM interrupt */ + pSemHandle = dhub_semaphore(&(pDhubHandle->dhub)); + status = semaphore_chk_full(pSemHandle, dhubID); + while (status) { + semaphore_pop(pSemHandle, dhubID, 1); + semaphore_clr_full(pSemHandle, dhubID); + status = semaphore_chk_full(pSemHandle, dhubID); + } + + return; +} + + +/*********************************************** + * FUNCTION: create a VPP object + * PARAMS: base_addr - VPP object base address + * *handle - pointer to object handle + * RETURN: MV_THINVPP_OK - succeed + * MV_THINVPP_EUNCONFIG - not initialized + ***********************************************/ +int MV_THINVPP_Create(int base_addr) +{ + if (!(thinvpp_obj = (THINVPP_OBJ *)THINVPP_MALLOC(sizeof(THINVPP_OBJ)))){ + return (MV_THINVPP_ENOMEM); + } + + THINVPP_MEMSET(thinvpp_obj, 0, sizeof(THINVPP_OBJ)); + + thinvpp_obj->base_addr = base_addr; + +#if LOGO_USE_SHM + // do no need double buffers for dhub queues + THINVPP_BCMBUF_Set(&(thinvpp_obj->vbi_bcm_buf[0]), fastlogo_ctx.bcmQ, fastlogo_ctx.bcmQ_phys, fastlogo_ctx.bcmQ_len); + THINVPP_CFGQ_Set(&(thinvpp_obj->dv[CPCB_1].vbi_dma_cfgQ[0]), fastlogo_ctx.dmaQ, fastlogo_ctx.dmaQ_phys, fastlogo_ctx.dmaQ_len); + THINVPP_CFGQ_Set(&(thinvpp_obj->dv[CPCB_1].vbi_bcm_cfgQ[0]), fastlogo_ctx.cfgQ, fastlogo_ctx.cfgQ_phys, fastlogo_ctx.cfgQ_len); +#else + if (THINVPP_BCMBUF_Create(&(thinvpp_obj->vbi_bcm_buf[0]), BCM_BUFFER_SIZE) != MV_THINVPP_OK){ + goto nomem_exit; + } + + if (THINVPP_BCMBUF_Create(&(thinvpp_obj->vbi_bcm_buf[1]), BCM_BUFFER_SIZE) != MV_THINVPP_OK) { + goto nomem_exit; + } + + if (THINVPP_CFGQ_Create(&(thinvpp_obj->dv[CPCB_1].vbi_dma_cfgQ[0]), DMA_CMD_BUFFER_SIZE) != MV_THINVPP_OK) { + goto nomem_exit; + } + if (THINVPP_CFGQ_Create(&(thinvpp_obj->dv[CPCB_1].vbi_dma_cfgQ[1]), DMA_CMD_BUFFER_SIZE) != MV_THINVPP_OK) { + goto nomem_exit; + } + + if (THINVPP_CFGQ_Create(&(thinvpp_obj->dv[CPCB_1].vbi_bcm_cfgQ[0]), DMA_CMD_BUFFER_SIZE) != MV_THINVPP_OK) { + goto nomem_exit; + } + if (THINVPP_CFGQ_Create(&(thinvpp_obj->dv[CPCB_1].vbi_bcm_cfgQ[1]), DMA_CMD_BUFFER_SIZE) != MV_THINVPP_OK) { + goto nomem_exit; + } +#endif + + return (MV_THINVPP_OK); + +nomem_exit: + if (thinvpp_obj->vbi_bcm_buf[0].addr != 0) + THINVPP_BCMBUF_Destroy(&(thinvpp_obj->vbi_bcm_buf[0])); + if (thinvpp_obj->vbi_bcm_buf[1].addr != 0) + THINVPP_BCMBUF_Destroy(&(thinvpp_obj->vbi_bcm_buf[1])); + + if (thinvpp_obj->dv[CPCB_1].vbi_dma_cfgQ[0].addr != 0) + THINVPP_CFGQ_Destroy(&(thinvpp_obj->dv[CPCB_1].vbi_dma_cfgQ[0])); + if (thinvpp_obj->dv[CPCB_1].vbi_dma_cfgQ[1].addr != 0) + THINVPP_CFGQ_Destroy(&(thinvpp_obj->dv[CPCB_1].vbi_dma_cfgQ[1])); + if (thinvpp_obj->dv[CPCB_1].vbi_bcm_cfgQ[0].addr != 0) + THINVPP_CFGQ_Destroy(&(thinvpp_obj->dv[CPCB_1].vbi_bcm_cfgQ[0])); + if (thinvpp_obj->dv[CPCB_1].vbi_bcm_cfgQ[1].addr != 0) + THINVPP_CFGQ_Destroy(&(thinvpp_obj->dv[CPCB_1].vbi_bcm_cfgQ[1])); + + THINVPP_FREE(thinvpp_obj); + + return (MV_THINVPP_ENOMEM); +} + +/*********************************************** + * FUNCTION: destroy a VPP object + * PARAMS: handle - VPP object handle + * RETURN: MV_THINVPP_OK - succeed + * MV_THINVPP_EUNCONFIG - not initialized + * MV_THINVPP_ENODEV - no device + * MV_THINVPP_ENOMEM - no memory + ***********************************************/ +int MV_THINVPP_Destroy(void) +{ + if (thinvpp_obj == NULL) + return (MV_THINVPP_ENODEV); + + /* free BCM buffer memory */ + THINVPP_BCMBUF_Destroy(&(thinvpp_obj->vbi_bcm_buf[0])); + THINVPP_CFGQ_Destroy(&(thinvpp_obj->dv[CPCB_1].vbi_dma_cfgQ[0])); + THINVPP_CFGQ_Destroy(&(thinvpp_obj->dv[CPCB_1].vbi_bcm_cfgQ[0])); +#if !LOGO_USE_SHM + // do no need double buffers for dhub queues + THINVPP_BCMBUF_Destroy(&(thinvpp_obj->vbi_bcm_buf[1])); + THINVPP_CFGQ_Destroy(&(thinvpp_obj->dv[CPCB_1].vbi_dma_cfgQ[1])); + THINVPP_CFGQ_Destroy(&(thinvpp_obj->dv[CPCB_1].vbi_bcm_cfgQ[1])); +#endif + + /* free vpp object memory */ + THINVPP_FREE(thinvpp_obj); + thinvpp_obj = NULL; + + return (MV_THINVPP_OK); +} + +/*************************************** + * FUNCTION: VPP reset + * INPUT: NONE + * RETURN: NONE + **************************************/ +int MV_THINVPP_Reset(void) +{ + int i; + + if (!thinvpp_obj) + return (MV_THINVPP_ENODEV); + + // reset VPP object variable + thinvpp_obj->status = STATUS_INACTIVE; + + /* reset planes */ + for (i=FIRST_PLANE; iplane[i].status = STATUS_INACTIVE; + thinvpp_obj->plane[i].mode = -1; // invalid + thinvpp_obj->plane[i].srcfmt = -1; // invalid + thinvpp_obj->plane[i].order = -1; // invalid + + thinvpp_obj->plane[i].actv_win.x = 0; + thinvpp_obj->plane[i].actv_win.y = 0; + thinvpp_obj->plane[i].actv_win.width = 0; + thinvpp_obj->plane[i].actv_win.height = 0; + } + + /* reset channels */ + for (i=FIRST_CHAN; ichan[i].status = STATUS_INACTIVE; + thinvpp_obj->chan[i].dvID = -1; // invalid + thinvpp_obj->chan[i].dvlayerID = -1; // invalid + thinvpp_obj->chan[i].zorder = -1; // invalid + + thinvpp_obj->chan[i].disp_win.x = 0; + thinvpp_obj->chan[i].disp_win.y = 0; + thinvpp_obj->chan[i].disp_win.width = 0; + thinvpp_obj->chan[i].disp_win.height = 0; + } + + /* reset DVs */ + for (i=FIRST_CPCB; idv[i].status = STATUS_INACTIVE; + thinvpp_obj->dv[i].output_res = RES_INVALID; // invalid + thinvpp_obj->dv[i].num_of_vouts = 0; + thinvpp_obj->dv[i].vbi_num = 0; + } + + /* reset VOUTs */ + for (i=FIRST_VOUT; ivout[i].status = STATUS_INACTIVE; + thinvpp_obj->vout[i].dvID = -1; // invalid + } + + /* reset VBI BCM buffer */ + THINVPP_BCMBUF_Reset(&thinvpp_obj->vbi_bcm_buf[0]); + thinvpp_obj->pVbiBcmBuf = &(thinvpp_obj->vbi_bcm_buf[0]); + thinvpp_obj->hdmi_mute = 0; + +#if !LOGO_USE_SHM + // do no need double buffers for dhub queues + THINVPP_BCMBUF_Reset(&thinvpp_obj->vbi_bcm_buf[1]); +#endif + thinvpp_obj->pVbiBcmBufCpcb[CPCB_1] = &(thinvpp_obj->vbi_bcm_buf[0]); + + thinvpp_obj->dv[CPCB_1].curr_cpcb_vbi_dma_cfgQ = &(thinvpp_obj->dv[CPCB_1].vbi_dma_cfgQ[0]); + thinvpp_obj->dv[CPCB_1].curr_cpcb_vbi_bcm_cfgQ = &(thinvpp_obj->dv[CPCB_1].vbi_bcm_cfgQ[0]); + + /* reset dHub cmdQ */ +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) + for (i = 0; i < avioDhubChMap_vpp_TT_R; i++) +#else /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ + for (i = 0; i < avioDhubChMap_vpp_SPDIF_W; i++) +#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ + thinvpp_obj->dhub_cmdQ[i] = 0; + + /* select BCM sub-buffer to dump register settings */ + THINVPP_BCMBUF_Select(thinvpp_obj->pVbiBcmBuf, -1); + + return (MV_THINVPP_OK); +} + +/*************************************** + * FUNCTION: VPP profile configuration + * INPUT: NONE + * RETURN: NONE + **************************************/ +int MV_THINVPP_Config(void) +{ + int i; + + if (!thinvpp_obj) + return (MV_THINVPP_ENODEV); + + /* VPP module has been configured */ + if (thinvpp_obj->status == STATUS_ACTIVE) + return (MV_THINVPP_OK); + + thinvpp_obj->pSemHandle = dhub_semaphore(&VPP_dhubHandle.dhub); + + /* config planes */ + for (i=FIRST_PLANE; iplane[i].dmaRID = avioDhubChMap_vpp_MV_R; // inline read DMA + thinvpp_obj->plane[i].dmaRdhubID = (int)(&VPP_dhubHandle); + thinvpp_obj->plane[i].offline_dmaWID = avioDhubChMap_vpp_MV_FRC_W; // offline write-back DMA + thinvpp_obj->plane[i].offline_dmaWdhubID = (int)(&VPP_dhubHandle); + thinvpp_obj->plane[i].offline_dmaRID = avioDhubChMap_vpp_MV_FRC_R; // offline readd-back DMA + thinvpp_obj->plane[i].offline_dmaRdhubID = (int)(&VPP_dhubHandle); + } + + } // <- config FE planes + + /* config channels */ + thinvpp_obj->chan[CHAN_MAIN].dvID = CPCB_1; + thinvpp_obj->chan[CHAN_MAIN].zorder = CPCB_ZORDER_2; + thinvpp_obj->chan[CHAN_MAIN].dvlayerID = CPCB1_PLANE_1; + + thinvpp_obj->chan[CHAN_AUX].dvID = CPCB_3; + thinvpp_obj->chan[CHAN_AUX].zorder = CPCB_ZORDER_1; + thinvpp_obj->chan[CHAN_AUX].dvlayerID = CPCB1_PLANE_1; // PLANE-1 of CPCB-2 + + thinvpp_obj->dv[CPCB_1].num_of_chans = 1; + thinvpp_obj->dv[CPCB_1].chanID[0] = CHAN_MAIN; + + thinvpp_obj->dv[CPCB_1].num_of_vouts = 1; + thinvpp_obj->dv[CPCB_1].voutID[0] = VOUT_HDMI; + + thinvpp_obj->dv[CPCB_3].num_of_chans = 0; + + /* config VOUTs */ + thinvpp_obj->vout[VOUT_HDMI].dvID = CPCB_1; + + /* select BCM sub-buffer to dump register settings */ + THINVPP_BCMBUF_Select(thinvpp_obj->pVbiBcmBuf, -1); + + BCM_SCHED_SetMux(BCM_SCHED_Q0, 0); /* CPCB0 VBI -> Q0 */ + + /* set VPP module to be configured */ + thinvpp_obj->status = STATUS_ACTIVE; + return (MV_THINVPP_OK); +} + +/******************************************************************* + * FUNCTION: set CPCB or DV output resolution + * INPUT: cpcbID - CPCB(for Berlin) or DV(for Galois) id + * resID - id of output resolution + * bit_depth - HDMI deep color bit depth + * RETURN: MV_THINVPP_OK - SUCCEED + * MV_EBADPARAM - invalid parameters + * MV_EUNCONFIG - VPP not configured or plane not active + * MV_EFRAMEQFULL - frame queue is full + * Note: this function has to be called before enabling a plane + * which belongs to that CPCB or DV. + *******************************************************************/ +int MV_THINVPP_SetCPCBOutputResolution(int cpcbID, int resID, int bit_depth) +{ + int params[3]; + + if (!thinvpp_obj) { + return (MV_THINVPP_ENODEV); + } + + if (resID=MAX_NUM_RESS) { + return (MV_THINVPP_EBADPARAM); + } + + if (thinvpp_obj->status == STATUS_INACTIVE){ + /* VPP module is not configured */ + return (MV_THINVPP_EUNCONFIG); + } + + if (cpcbID=MAX_NUM_CPCBS) { + return (MV_THINVPP_EBADPARAM); + } + + + if (resID != RES_RESET) { + + /* select BCM sub-buffer to dump register settings */ + THINVPP_BCMBUF_Select(thinvpp_obj->pVbiBcmBuf, cpcbID); + + /* set CPCB resolution */ + params[0] = cpcbID; + params[1] = resID; + VPP_SetCPCBOutputResolution(thinvpp_obj, params); + + /* set DV status to active */ + thinvpp_obj->dv[cpcbID].status = STATUS_ACTIVE; + } + return (MV_THINVPP_OK); +} + +int MV_THINVPP_IsCPCBActive(int cpcbID) +{ + int vtotal; + + if (cpcbID == CPCB_1) { + vtotal = (GLB_REG_READ32(MEMMAP_VPP_REG_BASE+(CPCB0_VT_H << 2)) & 0x0ff); + vtotal <<= 8; + vtotal |= (GLB_REG_READ32(MEMMAP_VPP_REG_BASE+(CPCB0_VT_L << 2)) & 0x0ff); + } else if (cpcbID == CPCB_3) { + vtotal = (GLB_REG_READ32(MEMMAP_VPP_REG_BASE+(CPCB2_VT_H << 2)) & 0x0ff); + vtotal <<= 8; + vtotal |= (GLB_REG_READ32(MEMMAP_VPP_REG_BASE+(CPCB2_VT_L << 2)) & 0x0ff); + } else + vtotal = 0; + + return (vtotal); +} + +int MV_THINVPP_SetMainDisplayFrame(VBUF_INFO *pinfo) +{ + PLANE *plane; + + if (!thinvpp_obj) + return (MV_THINVPP_ENODEV); + + if (!pinfo) + return (MV_THINVPP_EBADPARAM); + + plane = &(thinvpp_obj->plane[PLANE_MAIN]); + plane->pinfo = pinfo; + + plane->actv_win.x = pinfo->m_active_left; + plane->actv_win.y = pinfo->m_active_top; + plane->actv_win.width = pinfo->m_active_width; + plane->actv_win.height = pinfo->m_active_height; + + return (MV_THINVPP_OK); +} + +/****************************************************************************** + * FUNCTION: open a window of a video/graphics plane for display. + * the window is defined in end display resolution + * INPUT: planeID - id of a video/grahpics plane + * *win - pointer to a vpp window struct + * *attr - pointer to a vpp window attribute struct + * RETURN: MV_THINVPP_OK - SUCCEED + * MV_EBADPARAM - invalid parameters + * MV_EUNCONFIG - VPP not configured + * MV_EUNSUPPORT - plane not connected in configuration + * MV_ECMDQFULL - command queue is full + ******************************************************************************/ +int MV_THINVPP_OpenDispWindow(int planeID, VPP_WIN *win, VPP_WIN_ATTR *attr) +{ + int chanID; + int cpcbID; + PLANE *plane; + CHAN *chan; + + + if (!thinvpp_obj) + return (MV_THINVPP_ENODEV); + + if (planeID=MAX_NUM_PLANES) + return (MV_THINVPP_EBADPARAM); + + if (!win) + return (MV_THINVPP_EBADPARAM); + + if ((win->width<=0) || (win->height<=0)) + return (MV_THINVPP_EBADPARAM); + + if (thinvpp_obj->status == STATUS_INACTIVE){ + /* VPP module is not configured */ + return (MV_THINVPP_EUNCONFIG); + } + + plane = &(thinvpp_obj->plane[planeID]); + chanID = planeID; + chan = &(thinvpp_obj->chan[chanID]); + cpcbID = chan->dvID; + + /* update video/graphics channel display window */ + chan->disp_win.x = win->x; + chan->disp_win.y = win->y; + chan->disp_win.width = win->width; + chan->disp_win.height = win->height; + + if (attr){ + chan->disp_win_attr.bgcolor = attr->bgcolor; + chan->disp_win_attr.alpha = attr->alpha; + } else { + chan->disp_win_attr.bgcolor = DEFAULT_BGCOLOR; + chan->disp_win_attr.alpha = DEFAULT_ALPHA; + } + /* set video/graphics plane & channel in active status */ + plane->status = STATUS_ACTIVE; + chan->status = STATUS_ACTIVE; + + return (MV_THINVPP_OK); +} + +volatile int stop_flag=0; +int MV_THINVPP_CloseDispWindow(void) +{ + int n; + if (!thinvpp_obj) + return (MV_THINVPP_ENODEV); + + return (MV_THINVPP_OK); +} + +extern int cpcb_isr_count; +extern int curr_logo_tp_count; + +int MV_THINVPP_Stop(void) +{ + int n; + if (!thinvpp_obj) + return (MV_THINVPP_ENODEV); + + printk(KERN_INFO "set stop_flag to 1\n"); + stop_flag = 1; + + while(1) { + if(stop_flag > 1) break; + + msleep(20); + } + + printk(KERN_INFO "VPP_dhub_sem_clear stop_flag=%d\n", stop_flag); + VPP_dhub_sem_clear(); + + return (MV_THINVPP_OK); +} + + diff --git a/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/thinvpp_apifuncs.c b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/thinvpp_apifuncs.c new file mode 100755 index 00000000..172749b4 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/thinvpp_apifuncs.c @@ -0,0 +1,54 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + + +#define _VPP_APIFUNCS_C_ + +#include "thinvpp_module.h" +#include "thinvpp_apifuncs.h" + +/******************************************************************* + * FUNCTION: set CPCB(for Berlin) or DV(for Galois) output resolution + * INPUT: cpcbID - CPCB(for Berlin) or DV(for Galois) id + * resID - id of DV output resolution + * RETURN: MV_THINVPP_OK - SUCCEED + * MV_EBADPARAM - invalid parameters + * MV_EUNCONFIG - VPP not configured or plane not active + * MV_EFRAMEQFULL - frame queue is full + * Note: this function has to be called before enabling a plane + * which belongs to that DV. + *******************************************************************/ +int VPP_SetCPCBOutputResolution(THINVPP_OBJ *vpp_obj, int *in_params) +{ + int cpcbID = in_params[0]; + int resID = in_params[1]; + DV *cpcb; + + cpcb = &(vpp_obj->dv[cpcbID]); + + if(resID == RES_RESET){ + vpp_obj->dv[cpcbID].vbi_num = 0; // reset VBI counter + vpp_obj->dv[cpcbID].status = STATUS_INACTIVE; + return (MV_THINVPP_OK); + } + + cpcb->output_res = resID; + + return (MV_THINVPP_OK); +} diff --git a/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/thinvpp_isr.c b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/thinvpp_isr.c new file mode 100755 index 00000000..a3c7b201 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/THINVPP/source/thinvpp_isr.c @@ -0,0 +1,608 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + + +#define _VPP_ISR_C_ + +#include "linux/sched.h" // for cpu_clock() +#include "thinvpp_module.h" +#include "thinvpp_apifuncs.h" +#include "thinvpp_isr.h" + +#include "vpp.h" +#include "maddr.h" + +#include "api_avio_dhub.h" +#include "avioDhub.h" + +extern logo_device_t fastlogo_ctx; + +extern int stop_flag; +extern int cpcb_start_flag; +extern unsigned last_isr_interval; + +static int vbi_init=0; + +#if LOGO_USE_SHM +static void set_bcm_cmd_0(THINVPP_OBJ *vpp_obj, unsigned bytes) +{ + // first vpp commands are pre-loaded + BCMBUF *pbcmbuf = vpp_obj->pVbiBcmBuf; + pbcmbuf->writer += (bytes/sizeof(*pbcmbuf->writer)); +} +#endif +static void set_bcm_cmd(THINVPP_OBJ *vpp_obj, unsigned * cmd, unsigned bytes) +{ + BCMBUF *pbcmbuf = vpp_obj->pVbiBcmBuf; + + memcpy(pbcmbuf->writer, cmd, bytes); + pbcmbuf->writer += (bytes/sizeof(*pbcmbuf->writer)); +} + +static void dma_logo_frame(THINVPP_OBJ *vpp_obj) +{ + DHUB_CFGQ *src_cfgQ = vpp_obj->dv[CPCB_1].curr_cpcb_vbi_dma_cfgQ; + unsigned bytes = fastlogo_ctx.logo_dma_cmd_len; +#if LOGO_USE_SHM + // logo dma commands are pre-loaded +#else + memcpy(src_cfgQ->addr, fastlogo_ctx.logo_frame_dma_cmd, bytes); +#endif + src_cfgQ->len = bytes/8; +} + + +typedef struct _rect_win { unsigned left, top, right, bottom; } RECT_WIN; +typedef struct _RES_T { unsigned int HRes, VRes; } VPP_FE_DLR_INPUT_RES, *PVPP_FE_DLR_INPUT_RES; + +/*the offset plus with input resolution to set dummy TG size*/ +#define VPP_FE_DUMMY_TG_SIZE_H_OFF_P 20 +#define VPP_FE_DUMMY_TG_SIZE_V_OFF_P 10 +#define VPP_FE_DUMMY_TG_SIZE_H_OFF_I 22 +#define VPP_FE_DUMMY_TG_SIZE_V_OFF_I 10 +#define VPP_FE_DUMMY_TG_HS_FE 1 +#define VPP_FE_DUMMY_TG_HS_BE 3 +#define VPP_FE_DUMMY_TG_HB_FE_OFF 8 +#define VPP_FE_DUMMY_TG_HB_BE 7 +#define VPP_FE_DUMMY_TG_VB0_FE_OFF 3 +#define VPP_FE_DUMMY_TG_VB0_BE 2 + +#define PIXEL_PER_BEAT_YUV_422 4 + +static const unsigned int VppFeDlrRegOff[] = { + RA_LDR_BG, + RA_LDR_MAIN, + RA_LDR_PIP, + RA_LDR_PG, + RA_LDR_IG, + RA_LDR_CURSOR, + RA_LDR_MOSD +}; + +typedef enum VPP_OVL_PLANE_UNIT_NUM_T +{ + Vpp_OVL_PLANE0 = 0, + Vpp_OVL_PLANE1, + Vpp_OVL_PLANE2, + Vpp_OVL_PLANE3, + Vpp_OVL_PLANE3A, + Vpp_OVL_PLANE3B, + Vpp_OVL_PLANE3C, + Vpp_OVL_PLANE3D, +}VPP_OVL_PLANE_UNIT_NUM; + +static unsigned CPCB1_VPP_OVL_PlaneColorRegOffset[] = { + CPCB0_OO_FIX0_0<<2, + CPCB0_OO_FIX1_0<<2, + CPCB0_OO_FIX2_0<<2, + CPCB0_OO_FIX3_0<<2, + CPCB0_OO_FIX3A_0<<2, + CPCB0_OO_FIX3B_0<<2, + CPCB0_OO_FIX3C_0<<2, + CPCB0_OO_FIX3D_0<<2, +}; +static unsigned CPCB3_VPP_OVL_PlaneColorRegOffset[] = { + CPCB2_OO_FIX0_0<<2, + CPCB2_OO_FIX1_0<<2, + ~0, + ~0, + ~0, + ~0, + ~0, + ~0, +}; +static unsigned CPCB1_VPP_OVL_BorderAlphaRegOffset[] = { + ~0, + CPCB0_OO_P5_AL<<2, + CPCB0_OO_P6_AL<<2, + CPCB0_OO_P7_AL<<2, + CPCB0_OO_P7A_AL<<2, + CPCB0_OO_P7B_AL<<2, + CPCB0_OO_P7C_AL<<2, + CPCB0_OO_P7D_AL<<2, +}; + +static unsigned VPP_OVL_WeightRegOffset[] = { + CPCB0_VO_WEIGHT << 2, + CPCB1_VO_WEIGHT << 2, + ~0, + ~0 +}; + + + +static unsigned* set_plane_widnow_helper(unsigned* Que, unsigned plane_addr, unsigned value) +{ + *Que++ = value & 0xff; + *Que++ = plane_addr; + *Que++ = (value>>8) & 0xff; + *Que++ = plane_addr + 4; + return Que; +} + +static unsigned* m_SetPlaneWindow(unsigned* Que, unsigned plane_addr, RECT_WIN *Win) +{ + Que = set_plane_widnow_helper(Que, plane_addr + 0*8, Win->left); + Que = set_plane_widnow_helper(Que, plane_addr + 1*8, Win->right); + Que = set_plane_widnow_helper(Que, plane_addr + 2*8, Win->top); + Que = set_plane_widnow_helper(Que, plane_addr + 3*8, Win->bottom); + return Que; +} + +static unsigned* m_THINVPP_CPCB_SetPlaneAttribute(unsigned* Que, THINVPP_OBJ *vpp_obj, int cpcbID, int layerID, int alpha, int bgcolor) +{ + unsigned RegAddr; + + // set plane background color + RegAddr = ~0; + if (cpcbID == CPCB_1) + { + RegAddr = CPCB1_VPP_OVL_PlaneColorRegOffset[layerID+1]; + } + else if (cpcbID == CPCB_3) + { + RegAddr = CPCB3_VPP_OVL_PlaneColorRegOffset[layerID+1]; + } + + if (RegAddr == ~0) + return Que; + + *Que++ = GET_LOWEST_BYTE(bgcolor); + *Que++ = (vpp_obj->base_addr + RegAddr); + *Que++ = GET_SECOND_BYTE(bgcolor); + *Que++ = (vpp_obj->base_addr + RegAddr + 4); + *Que++ = GET_THIRD_BYTE(bgcolor); + *Que++ = (vpp_obj->base_addr + RegAddr + 8); + + // set plane source global alpha + if ((cpcbID > CPCB_1) || (layerID > CPCB1_PLANE_2)) + return Que; + + RegAddr = (CPCB0_OO_P1_AL << 2); + if (layerID == CPCB1_PLANE_2) + { + unsigned alpha2; + + alpha2 = (vpp_obj->chan[CHAN_MAIN].zorder < vpp_obj->chan[CHAN_PIP].zorder)? + (alpha+1)/2: (256-alpha)/2; + //VPP_OVL_SetVideoBlendingFactor(vpp_obj, cpcbID, alpha2); + *Que++ = alpha2; + *Que++ = (vpp_obj->base_addr + VPP_OVL_WeightRegOffset[cpcbID]); + + RegAddr += 4; + } + + *Que++ = alpha; + *Que++ = (vpp_obj->base_addr + RegAddr); + + // set plane border global alpha + RegAddr = CPCB1_VPP_OVL_BorderAlphaRegOffset[layerID+1]; + *Que++ = alpha; + *Que++ = (vpp_obj->base_addr + RegAddr); + + return Que; +} + +static unsigned *m_THINVPP_CPCB_SetPlaneSourceWindow(unsigned *Que, THINVPP_OBJ *vpp_obj, int cpcbID, int layerID, int x, int y, int width, int height) +{ + unsigned PlaneAddr; + RECT_WIN window; + window.left = x; + window.top = y; + window.right = x + width; + window.bottom = y + height; + + switch (cpcbID){ + case CPCB_1: + switch (layerID){ + case CPCB1_PLANE_1: /* CPCB plane 1 */ + PlaneAddr = vpp_obj->base_addr + (CPCB0_P1_SX_L << 2); // CPCB_1::TG_PLANE1_MAIN + Que = m_SetPlaneWindow(Que, PlaneAddr, &window); + PlaneAddr = vpp_obj->base_addr + (CPCB0_P1_CR1_SX_L << 2); // CPCB_1::TG_PLANE1_MAIN_CROP1 + Que = m_SetPlaneWindow(Que, PlaneAddr, &window); + PlaneAddr = vpp_obj->base_addr + (CPCB0_P1_CR2_SX_L << 2); // CPCB_1::TG_PLANE1_MAIN_CROP1 + Que = m_SetPlaneWindow(Que, PlaneAddr, &window); + break; + case CPCB1_PLANE_2: /* CPCB plane 2 */ + PlaneAddr = vpp_obj->base_addr + (CPCB0_P2_SX_L << 2); // CPCB_1::TG_PLANE2_PIP + Que = m_SetPlaneWindow(Que, PlaneAddr, &window); + PlaneAddr = vpp_obj->base_addr + (CPCB0_P2_CR1_SX_L << 2); // CPCB_1::TG_PLANE2_PIP_CROP1 + Que = m_SetPlaneWindow(Que, PlaneAddr, &window); + break; + } + break; + case CPCB_3: + switch (layerID){ + case CPCB1_PLANE_1: /* CPCB plane 1 */ + PlaneAddr = vpp_obj->base_addr + (CPCB2_P1_SX_L << 2); // CPCB_3::TG_PLANE1_MAIN + Que = m_SetPlaneWindow(Que, PlaneAddr, &window); + break; + } + break; + } + + return Que; +} + +static unsigned *m_FE_DLR_SetVPDMX(unsigned *Que, THINVPP_OBJ *vpp_obj, unsigned HRes, unsigned VRes) +{ + *Que++ = (HRes-1); + *Que++ = (vpp_obj->base_addr + RA_Vpp_VP_DMX_HRES); + + *Que++ = ((VRes/2)-1); + *Que++ = (vpp_obj->base_addr + RA_Vpp_VP_DMX_VRES); + + *Que++ = (HRes + VPP_FE_DUMMY_TG_SIZE_H_OFF_I - 1); + *Que++ = (vpp_obj->base_addr + RA_Vpp_VP_DMX_HT); + + *Que++ = (VRes + VPP_FE_DUMMY_TG_SIZE_V_OFF_I - 1); + *Que++ = (vpp_obj->base_addr + RA_Vpp_VP_DMX_IVT); + + *Que++ = (VRes + VPP_FE_DUMMY_TG_SIZE_V_OFF_I - 1); + *Que++ = (vpp_obj->base_addr + RA_Vpp_VP_DMX_VT); + + *Que++ = (1); + *Que++ = (vpp_obj->base_addr + RA_Vpp_VP_DMX_CTRL); + + return Que; +} + +static unsigned *m_FE_DLR_SetPlaneSize(unsigned *Que, THINVPP_OBJ *vpp_obj, int Channel, unsigned HRes, unsigned VRes, unsigned CropWpl) +{ + unsigned int RegAddr = vpp_obj->base_addr + RA_Vpp_LDR + VppFeDlrRegOff[Channel]; + + /*write plane size to BCM buffer*/ + *Que++ = (VRes + (HRes << 16)); + *Que++ = (RegAddr + RA_PLANE_SIZE); + + /*write crop WPL to BCM buffer*/ + *Que++ = CropWpl; + *Que++ = (RegAddr + RA_PLANE_CROP); + + return Que; +} + +static unsigned *m_FE_DLR_SetDummyTG(unsigned *Que, THINVPP_OBJ *vpp_obj, unsigned HRes, unsigned VRes) +{ + unsigned int RegAddr; + + RegAddr = vpp_obj->base_addr + RA_Vpp_VP_TG; + + /*write TG size*/ + *Que++ = ((VRes + VPP_FE_DUMMY_TG_SIZE_V_OFF_P) + ((HRes + VPP_FE_DUMMY_TG_SIZE_H_OFF_P) << 16)); + *Que++ = (RegAddr + RA_TG_SIZE); + + /*write the H blank front edge value*/ + *Que++ = (HRes + VPP_FE_DUMMY_TG_HB_FE_OFF + (VPP_FE_DUMMY_TG_HB_BE << 16)); + *Que++ = (RegAddr + RA_TG_HB); + + /*write the V blank front edge value*/ + *Que++ = (VRes + VPP_FE_DUMMY_TG_VB0_FE_OFF + (VPP_FE_DUMMY_TG_VB0_BE << 16)); + *Que++ = (RegAddr + RA_TG_VB0); + + return Que; +} + +static unsigned* m_UpdateVPSize(unsigned* Que, THINVPP_OBJ *vpp_obj, unsigned ihRes, unsigned ivRes) +{ + unsigned int TotalInpPix, TotalOutPix; + unsigned int TotPixForWriteClient, TotPixForReadClient; + + TotalInpPix = + TotalOutPix = ivRes * ihRes; + + //THINVPP_BCMBUF_Write(vpp_obj->pVbiBcmBuf, vpp_obj->base_addr+RA_Vpp_vpIn_pix, TotalInpPix); + *Que++ = TotalInpPix; + *Que++ = (vpp_obj->base_addr+RA_Vpp_vpIn_pix); + //THINVPP_BCMBUF_Write(vpp_obj->pVbiBcmBuf, vpp_obj->base_addr+RA_Vpp_vpOut_pix, TotalOutPix); + *Que++ = TotalOutPix; + *Que++ = (vpp_obj->base_addr+RA_Vpp_vpOut_pix); + + TotPixForWriteClient = (ivRes + 1) * ihRes; + TotPixForReadClient = (TotPixForWriteClient * 26 + 63) / 64; + + //THINVPP_BCMBUF_Write(vpp_obj->pVbiBcmBuf, vpp_obj->base_addr+RA_Vpp_diW_pix, TotPixForWriteClient); + *Que++ = TotPixForWriteClient; + *Que++ = (vpp_obj->base_addr+RA_Vpp_diW_pix); + //THINVPP_BCMBUF_Write(vpp_obj->pVbiBcmBuf, vpp_obj->base_addr+RA_Vpp_diR_word, TotPixForReadClient); + *Que++ = TotPixForReadClient; + *Que++ = (vpp_obj->base_addr+RA_Vpp_diR_word); + + return Que; +} + +void init_vbi(THINVPP_OBJ *vpp_obj) +{ + PLANE *plane = &vpp_obj->plane[PLANE_MAIN]; + VBUF_INFO *pinfo = plane->pinfo; + unsigned *Que, *Cmd, *CmdEnd; + unsigned CropWpl; + +#if LOGO_USE_SHM + Cmd = (unsigned *) fastlogo_ctx.bcmQ; + Que = (unsigned *) fastlogo_ctx.dmaQ; +#else + Cmd = (unsigned *) fastlogo_ctx.bcm_cmd_0; + Que = (unsigned *) logo_frame_dma_cmd; +#endif + CmdEnd = Cmd + (fastlogo_ctx.bcm_cmd_0_len/(sizeof(unsigned))); + //pinfo->m_active_left &= ~1; + //pinfo->m_active_width = ((pinfo->m_active_left + pinfo->m_active_width) & ~1) - pinfo->m_active_left; + CropWpl = (((pinfo->m_active_width + PIXEL_PER_BEAT_YUV_422 - 1) / PIXEL_PER_BEAT_YUV_422) << 16); + plane->wpl = (CropWpl>>16); + + while (Cmd < CmdEnd) + { + switch (*Cmd & 0xf0000000) + { + case 0x80000000: + Cmd = m_THINVPP_CPCB_SetPlaneAttribute(Cmd, vpp_obj, 0, 0, pinfo->alpha, pinfo->bgcolor); + break; + case 0x90000000: + Cmd = m_FE_DLR_SetPlaneSize(Cmd, vpp_obj, 1, pinfo->m_active_width, pinfo->m_active_height, CropWpl); + break; + case 0xa0000000: + Cmd = m_FE_DLR_SetVPDMX(Cmd, vpp_obj, pinfo->m_active_width, pinfo->m_active_height); + break; + case 0xb0000000: + Cmd = m_FE_DLR_SetDummyTG(Cmd, vpp_obj, pinfo->m_active_width, pinfo->m_active_height); + break; + case 0xc0000000: + Cmd = m_UpdateVPSize(Cmd, vpp_obj, pinfo->m_active_width, pinfo->m_active_height); + break; + case 0xd0000000: + Cmd = m_THINVPP_CPCB_SetPlaneSourceWindow(Cmd, vpp_obj, 0, 0, + pinfo->m_active_left, pinfo->m_active_top, pinfo->m_active_width, pinfo->m_active_height); + break; + default: + Cmd += 2; + break; + } + } + + START_2DDMA(plane->dmaRdhubID, plane->dmaRID, + (unsigned) pinfo->m_pbuf_start + (unsigned) pinfo->m_disp_offset, pinfo->m_buf_stride, + plane->wpl*8, plane->actv_win.height, + (unsigned int (*)[2])Que); +} + +///////////////////////////////////////////////////// +// // +// Interrupt Service Routines for Berlin // +// // +///////////////////////////////////////////////////// + +/******************************************************************************** + * FUNCTION: start all active plane data loader of a VPP FE channel + * PARAMS: *vpp_obj - pointer to VPP object + * chanID - channel + * RETURN: MV_THINVPP_OK - succeed + * MV_THINVPP_EBADPARAM - invalid parameter + * MV_THINVPP_EUNCONFIG - plane not activated yet + *******************************************************************************/ +static int startChannelDataLoader(THINVPP_OBJ *vpp_obj, int chanID) +{ + int cpcbID; + CHAN *chan; + PLANE *plane; + + cpcbID = CPCB_OF_CHAN(vpp_obj, chanID); + chan = &vpp_obj->chan[chanID]; + + if (chanID == CHAN_MAIN || chanID == CHAN_PIP) { /* none AUX channel */ + int planeID = chanID; + + plane = &vpp_obj->plane[planeID]; + + switch (plane->status) { + case STATUS_ACTIVE: +#if LOGO_USE_SHM + // first vpp commands are pre-loaded + set_bcm_cmd_0(vpp_obj, fastlogo_ctx.bcm_cmd_0_len); +#else + set_bcm_cmd(vpp_obj, fastlogo_ctx.bcm_cmd_0, fastlogo_ctx.bcm_cmd_0_len); +#endif + dma_logo_frame(vpp_obj); + plane->status = STATUS_DISP; + break; + + case STATUS_DISP: + /* start data loader DMA to load display content */ + dma_logo_frame(vpp_obj); + + /* start read-back data loader */ + set_bcm_cmd(vpp_obj, fastlogo_ctx.bcm_cmd_n, fastlogo_ctx.bcm_cmd_n_len); + + break; + + default: + break; + } + } + + return (MV_THINVPP_OK); +} + +static void toggleQ(THINVPP_OBJ *vpp_obj, int cpcbID) +{ + THINVPP_BCMBUF_To_CFGQ(vpp_obj->pVbiBcmBuf, vpp_obj->dv[cpcbID].curr_cpcb_vbi_bcm_cfgQ); + THINVPP_BCMDHUB_CFGQ_Commit(vpp_obj->dv[cpcbID].curr_cpcb_vbi_bcm_cfgQ, cpcbID); + +#if !LOGO_USE_SHM + // do no need double buffers for dhub queues + if (vpp_obj->pVbiBcmBufCpcb[cpcbID] == &vpp_obj->vbi_bcm_buf[0]) + vpp_obj->pVbiBcmBufCpcb[cpcbID] = &vpp_obj->vbi_bcm_buf[1]; + else + vpp_obj->pVbiBcmBufCpcb[cpcbID] = &vpp_obj->vbi_bcm_buf[0]; + + if (vpp_obj->dv[cpcbID].curr_cpcb_vbi_dma_cfgQ == &vpp_obj->dv[cpcbID].vbi_dma_cfgQ[0]) + vpp_obj->dv[cpcbID].curr_cpcb_vbi_dma_cfgQ = &(vpp_obj->dv[cpcbID].vbi_dma_cfgQ[1]); + else + vpp_obj->dv[cpcbID].curr_cpcb_vbi_dma_cfgQ = &(vpp_obj->dv[cpcbID].vbi_dma_cfgQ[0]); + + if (vpp_obj->dv[cpcbID].curr_cpcb_vbi_bcm_cfgQ == &vpp_obj->dv[cpcbID].vbi_bcm_cfgQ[0]) + vpp_obj->dv[cpcbID].curr_cpcb_vbi_bcm_cfgQ = &(vpp_obj->dv[cpcbID].vbi_bcm_cfgQ[1]); + else + vpp_obj->dv[cpcbID].curr_cpcb_vbi_bcm_cfgQ = &(vpp_obj->dv[cpcbID].vbi_bcm_cfgQ[0]); +#endif +} + +static void prepareQ(THINVPP_OBJ *vpp_obj, int cpcbID) +{ + vpp_obj->dv[cpcbID].curr_cpcb_vbi_bcm_cfgQ->len = 0; + vpp_obj->dv[cpcbID].curr_cpcb_vbi_dma_cfgQ->len = 0; + vpp_obj->pVbiBcmBuf = vpp_obj->pVbiBcmBufCpcb[cpcbID]; + THINVPP_BCMBUF_Select(vpp_obj->pVbiBcmBuf, cpcbID); +} + +/* interrupt service routine for CPCB TG interrupt */ +void THINVPP_CPCB_ISR_service(THINVPP_OBJ *vpp_obj, int cpcbID) +{ + DV *pDV; + int params[2]; + static int cpcb_isr_count=0; + cpcb_isr_count++; + + if (!vpp_obj) + return; + + if (cpcbID != CPCB_1) + return; + + pDV = &(vpp_obj->dv[cpcbID]); + pDV->vbi_num ++; // VBI counter + + switch (pDV->status) { + case STATUS_INACTIVE: + break; + + case STATUS_ACTIVE: + /*when change cpcb output resolution, status was set to inactive, Dhub should be stopped at this moment*/ + if (cpcbID != CPCB_1) + break; + + /* stop fast-logo */ + if(stop_flag == 1) + { + prepareQ(vpp_obj, cpcbID); + + /* set resolution to RESET mode */ + params[0] = CPCB_1; + params[1] = RES_RESET; + + VPP_SetCPCBOutputResolution(vpp_obj, params); + set_bcm_cmd(vpp_obj, &fastlogo_ctx.bcm_cmd_z[0], fastlogo_ctx.bcm_cmd_z_len); + + toggleQ(vpp_obj, cpcbID); + + /* disable interrupt */ + THINVPP_Enable_ISR_Interrupt(vpp_obj, CPCB_1, 0); + + pDV->status = STATUS_INACTIVE; + stop_flag++; + + break; + } + + /* display fast-logo */ + if (cpcb_start_flag == 3) + { + cpcb_start_flag = 4; + } + else + { + cpcb_start_flag++; + prepareQ(vpp_obj, cpcbID); + } + + startChannelDataLoader(vpp_obj, CHAN_MAIN); + + THINVPP_CFGQ_To_CFGQ(vpp_obj->dv[CPCB_1].curr_cpcb_vbi_dma_cfgQ, vpp_obj->dv[CPCB_1].curr_cpcb_vbi_bcm_cfgQ); + toggleQ(vpp_obj, cpcbID); + break; + + case STATUS_STOP: + if (cpcbID != CPCB_1) + break; + + prepareQ(vpp_obj, cpcbID); + + params[0] = CPCB_1; + params[1] = RES_RESET; + VPP_SetCPCBOutputResolution(vpp_obj, params); + + if(!(stop_flag > 0)) + THINVPP_CFGQ_To_CFGQ(vpp_obj->dv[CPCB_1].curr_cpcb_vbi_dma_cfgQ, vpp_obj->dv[CPCB_1].curr_cpcb_vbi_bcm_cfgQ); + + toggleQ(vpp_obj, cpcbID); + break; + + default: + break; + } +} + +/************************************************************* + * FUNCTION: register VPP interrupt service routine + * PARAMS: cpcbID - CPCB ID + * RETURN: none + *************************************************************/ +void THINVPP_Enable_ISR_Interrupt(THINVPP_OBJ *vpp_obj, int cpcbID, int flag) +{ + if (cpcbID == CPCB_1){ + /* configure and enable CPCB0 interrupt */ + semaphore_cfg(vpp_obj->pSemHandle, avioDhubSemMap_vpp_vppCPCB0_intr, 1, 0); + semaphore_pop(vpp_obj->pSemHandle, avioDhubSemMap_vpp_vppCPCB0_intr, 1); + semaphore_clr_full(vpp_obj->pSemHandle, avioDhubSemMap_vpp_vppCPCB0_intr); + + if (flag) + { + if (!vbi_init) + { + init_vbi(vpp_obj); + } + vbi_init = 1; + flag = 1; + } + semaphore_intr_enable(vpp_obj->pSemHandle, avioDhubSemMap_vpp_vppCPCB0_intr, 0, flag, 0, 0, 0); + } + + return; +} + diff --git a/arch/arm/mach-berlin/modules/fastlogo_bg2cd/fastlogo_driver.c b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/fastlogo_driver.c new file mode 100755 index 00000000..be8f1235 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/fastlogo_driver.c @@ -0,0 +1,508 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + +// fastlogo options: +//#define LOGO_TIME_PROFILE 1 // use definition in Makefile +//#define LOGO_PROC_FS 1 // use definition in Makefile + +#define _FASTLOGO_DRIVER_C_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include // for msleep() +#include // for __cpuc_flush_dcache_area(logoBuf, length); +#include +#include +#include + +#if LOGO_PROC_FS +#include +#include +#endif + +#include "galois_io.h" +#include "thinvpp_api.h" +#include "thinvpp_isr.h" +#include "api_dhub.h" +#include "api_avio_dhub.h" +#include "Galois_memmap.h" +#include "bcm_cmds.h" +#include "logo_data.h" + +#if LOGO_USE_SHM +#include "shm_api.h" +#include "shm_type.h" +extern shm_device_t *shm_api_device_noncache; +#endif +#include + +/******************************************************************************* + Module API defined + */ + +#define bTST(x, b) (((x) >> (b)) & 1) + +#define FASTLOGO_DEVICE_TAG "[Galois][fastlogo_driver] " +#define DEVICE_NAME "galois_fastlogo" + +void VPP_dhub_sem_clear(void); + +/******************************************************************************* + Macro Defined + */ + +#ifdef ENABLE_DEBUG +#define gs_debug(...) printk(KERN_DEBUG FASTLOGO_DEVICE_TAG __VA_ARGS__) +#else +#define gs_debug(...) +#endif + +#define gs_info(...) printk(KERN_INFO FASTLOGO_DEVICE_TAG __VA_ARGS__) +#define gs_notice(...) printk(KERN_NOTICE FASTLOGO_DEVICE_TAG __VA_ARGS__) + +#define gs_trace(...) printk(KERN_WARNING FASTLOGO_DEVICE_TAG __VA_ARGS__) +#define gs_error(...) printk(KERN_ERR FASTLOGO_DEVICE_TAG __VA_ARGS__) + +/******************************************************************************* + Module Variable + */ + +logo_device_t fastlogo_ctx; +int save_console_loglevel; // to restore console printk 91 static VBUF_INFO vbuf; +#define LIMIT_CONSOLE_LOGLEVEL 4 // limit printk to KERN_EMERG, KERN_ALERT, KERN_CRIT and KERN_ERR +static VBUF_INFO vbuf; + +#if LOGO_TIME_PROFILE +#define LOGO_TP_MAX_COUNT 384 //0x10000 +static u64 cpcb0_isr_time_previous = (u64) 0; +u64 lat[LOGO_TP_MAX_COUNT]; +u64 lat2[LOGO_TP_MAX_COUNT]; +volatile int logo_tp_count = 0; +#endif + +#if LOGO_PROC_FS +static int logo_device_show_stat(logo_device_t *Ctx, struct seq_file *file) +{ + int i, n, len; + + if ((NULL == Ctx) || (NULL == file)) + return -EINVAL; + + if (Ctx->planes & 1) + len += seq_printf(file, "Plane MAIN is used\n"); + if (Ctx->planes & 2) + len += seq_printf(file, "Plane PIP is used\n"); + if (Ctx->planes & 4) + len += seq_printf(file, "Plane AUX is used\n"); + + len += seq_printf(file, "Vres : %d\nWidth x Height : %d x %d\n", Ctx->vres, Ctx->win.width, Ctx->win.height); + len += seq_printf(file, "logoBuf : 0x%p (0x%p)\n", Ctx->logoBuf_2, Ctx->mapaddr); + len += seq_printf(file, " display @(%d,%d) %dx%d\n", + vbuf.m_active_left, vbuf.m_active_top, vbuf.m_active_width, vbuf.m_active_height); + + len += seq_printf(file, "Total count : %d\n", Ctx->count); +#if LOGO_TIME_PROFILE + // show profile + len += seq_printf(file,"\n[profile] %d", logo_tp_count); + for (i = 0; i < logo_tp_count; i++) + { + if (i%4) + len += seq_printf(file, "%08llu:%08llu ", lat[i], lat2[i]); + else + len += seq_printf(file, "\n%4d: %08llu:%08llu ", i, lat[i], lat2[i]); + } +#endif //LOGO_TIME_PROFILE + + len += seq_printf(file,"\n"); + + return len; +} + +static struct proc_dir_entry *logo_driver_procdir; +static int logo_stat_seq_show(struct seq_file *file, void *data) +{ + logo_device_t *Ctx = (logo_device_t *) data; + if (Ctx) + logo_device_show_stat(Ctx, file); + + return 0; +} + +static void logo_stat_seq_stop(struct seq_file *file, void *data) +{ +} + +static void *logo_stat_seq_start(struct seq_file *file, loff_t * pos) +{ + if (*pos == 0) + return (void *)&fastlogo_ctx; + return NULL; +} + +static void *logo_stat_seq_next(struct seq_file *file, void *data, loff_t * pos) +{ + (*pos)++; + if (*pos == 0) + return (void *)&fastlogo_ctx; + return NULL; +} + +static struct seq_operations logo_stat_seq_ops = { + .start = logo_stat_seq_start, + .next = logo_stat_seq_next, + .stop = logo_stat_seq_stop, + .show = logo_stat_seq_show +}; + +static int logo_stat_proc_open(struct inode *inode, struct file *file) +{ + return seq_open(file, &logo_stat_seq_ops); +} + +static struct file_operations logo_stat_file_ops = { + .owner = THIS_MODULE, + .open = logo_stat_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release +}; + +#endif //LOGO_PROC_FS + +u64 logo_time_0 = (u64) 0; +u64 last_isr_time = (u64) 0; +unsigned last_isr_interval = 0; +volatile int logo_isr_count = 0; +volatile int cpcb_start_flag = 0; + +static irqreturn_t fastlogo_devices_vpp_isr(int irq, void *dev_id) +{ + int instat; + HDL_semaphore *pSemHandle; + u64 cpcb0_isr_time_current; + + ++fastlogo_ctx.count; + logo_isr_count++; + + cpcb0_isr_time_current = cpu_clock(smp_processor_id()); + last_isr_interval = (unsigned) (cpcb0_isr_time_current - last_isr_time); + last_isr_time = cpcb0_isr_time_current; + +#if LOGO_TIME_PROFILE + { + u64 curr_interval; + if (cpcb0_isr_time_previous) { + curr_interval = cpcb0_isr_time_current - cpcb0_isr_time_previous; + if (logo_tp_count < LOGO_TP_MAX_COUNT) + lat[logo_tp_count++] = curr_interval; + } + cpcb0_isr_time_previous = cpcb0_isr_time_current; + } +#endif + + /* VPP interrupt handling */ + pSemHandle = dhub_semaphore(&VPP_dhubHandle.dhub); + instat = semaphore_chk_full(pSemHandle, -1); + + if (bTST(instat, avioDhubSemMap_vpp_vppCPCB0_intr)) { + /* our CPCB interrupt */ + /* clear interrupt */ + semaphore_pop(pSemHandle, avioDhubSemMap_vpp_vppCPCB0_intr, 1); + semaphore_clr_full(pSemHandle, avioDhubSemMap_vpp_vppCPCB0_intr); + + if(logo_isr_count > 1) + { + THINVPP_CPCB_ISR_service(thinvpp_obj, CPCB_1); + } + } + +#if LOGO_TIME_PROFILE + if (logo_tp_count) { + u64 curr_interval = cpu_clock(0) - cpcb0_isr_time_current; + if ((logo_tp_count-1) < LOGO_TP_MAX_COUNT) + lat2[logo_tp_count-1] = curr_interval; + } +#endif + + return IRQ_HANDLED; +} + +static int __init fastlogo_device_init(unsigned int cpu_id) +{ + int err; + + logo_time_0 = cpu_clock(0); + + // init context + fastlogo_ctx.bcm_cmd_0 = bcm_cmd_0; + fastlogo_ctx.bcm_cmd_0_len = bcm_cmd_0_len; + fastlogo_ctx.bcm_cmd_a = bcm_cmd_a; + fastlogo_ctx.bcm_cmd_a_len = bcm_cmd_a_len; + fastlogo_ctx.bcm_cmd_n = bcm_cmd_n; + fastlogo_ctx.bcm_cmd_n_len = bcm_cmd_n_len; + fastlogo_ctx.bcm_cmd_z = bcm_cmd_z; + fastlogo_ctx.bcm_cmd_z_len = bcm_cmd_z_len; + + fastlogo_ctx.bcmQ_len = bcmQ_len; + fastlogo_ctx.dmaQ_len = 8*8; + fastlogo_ctx.cfgQ_len = 8*8; + + /* set up logo frame */ + fastlogo_ctx.length = yuv_logo_stride*yuv_logo_height; +#ifndef YUV_LOGO_ALPHA + vbuf.alpha = 255; +#else + vbuf.alpha = YUV_LOGO_ALPHA; +#endif +#ifndef YUV_LOGO_BGCOLOR + vbuf.bgcolor = yuv_logo[0]; + if ((vbuf.bgcolor & 0xff00ff) != 0x800080) + vbuf.bgcolor = 0x00800080; // black +#else + vbuf.bgcolor = YUV_LOGO_BGCOLOR; +#endif + vbuf.m_disp_offset = 0; + vbuf.m_active_left = yuv_logo_offset_x; + vbuf.m_active_top = yuv_logo_offset_y; + vbuf.m_buf_stride = yuv_logo_stride; + vbuf.m_active_width = yuv_logo_width; + vbuf.m_active_height = yuv_logo_height; + +#if LOGO_USE_SHM + // use MV_SHM for logo buffer and 3 dhub queues to have contiguous memory + fastlogo_ctx.mSHMSize = fastlogo_ctx.length + + fastlogo_ctx.bcmQ_len + fastlogo_ctx.dmaQ_len + fastlogo_ctx.cfgQ_len; + + fastlogo_ctx.mSHMOffset = MV_SHM_NONCACHE_Malloc(fastlogo_ctx.mSHMSize, 4096); + if (fastlogo_ctx.mSHMOffset == ERROR_SHM_MALLOC_FAILED) + { + return -1; + } + + // put logo image in logo buffer + fastlogo_ctx.logoBuf = (int *) MV_SHM_GetNonCacheVirtAddr(fastlogo_ctx.mSHMOffset); + fastlogo_ctx.mapaddr = (unsigned int *) MV_SHM_GetNonCachePhysAddr(fastlogo_ctx.mSHMOffset); + memcpy(fastlogo_ctx.logoBuf, yuv_logo, fastlogo_ctx.length); + + // arrange dhub queues and commands + { + char *shm = (char *) fastlogo_ctx.logoBuf; + unsigned shm_phys = (unsigned) fastlogo_ctx.mapaddr; + fastlogo_ctx.bcmQ = shm + fastlogo_ctx.length; + fastlogo_ctx.dmaQ = fastlogo_ctx.bcmQ + fastlogo_ctx.bcmQ_len; + fastlogo_ctx.cfgQ = fastlogo_ctx.dmaQ + fastlogo_ctx.dmaQ_len; + fastlogo_ctx.bcmQ_phys = shm_phys + fastlogo_ctx.length; + fastlogo_ctx.dmaQ_phys = fastlogo_ctx.bcmQ_phys + fastlogo_ctx.bcmQ_len; + fastlogo_ctx.cfgQ_phys = fastlogo_ctx.dmaQ_phys + fastlogo_ctx.dmaQ_len; + + // pre-load vpp commands + memcpy(fastlogo_ctx.bcmQ, bcm_cmd_0, bcm_cmd_0_len); + + // pre-load logo frame dma commands + fastlogo_ctx.logo_dma_cmd_len = logo_dma_cmd_len; + fastlogo_ctx.logo_frame_dma_cmd = logo_frame_dma_cmd; + logo_frame_dma_cmd[2] = shm_phys; + vbuf.m_pbuf_start = (void *) shm_phys; + memcpy(fastlogo_ctx.dmaQ, logo_frame_dma_cmd, logo_dma_cmd_len); + } +#else + fastlogo_ctx.logoBuf = kmalloc(fastlogo_ctx.length, GFP_KERNEL); + if (!fastlogo_ctx.logoBuf) { + gs_trace("kmalloc error\n"); + return err; + } + memcpy(fastlogo_ctx.logoBuf, yuv_logo, fastlogo_ctx.length); + + fastlogo_ctx.mapaddr = (unsigned int *)dma_map_single(NULL, fastlogo_ctx.logoBuf, fastlogo_ctx.length, DMA_TO_DEVICE); + err = dma_mapping_error(NULL, (dma_addr_t)fastlogo_ctx.logoBuf); + if (err) { + gs_trace("dma_mapping_error\n"); + kfree(fastlogo_ctx.logoBuf); + fastlogo_ctx.logoBuf = NULL; + return err; + } + outer_cache.flush_range(virt_to_phys(fastlogo_ctx.logoBuf), virt_to_phys(fastlogo_ctx.logoBuf)+fastlogo_ctx.length); + logo_frame_dma_cmd[2] = virt_to_phys(fastlogo_ctx.logoBuf); + vbuf.m_pbuf_start = (void *) logo_frame_dma_cmd[2]; +#endif + fastlogo_ctx.logoBuf_2 = fastlogo_ctx.logoBuf; + + /* initialize dhub */ + DhubInitialization(cpu_id, VPP_DHUB_BASE, VPP_HBO_SRAM_BASE, &VPP_dhubHandle, VPP_config, VPP_NUM_OF_CHANNELS); + DhubInitialization(cpu_id, AG_DHUB_BASE, AG_HBO_SRAM_BASE, &AG_dhubHandle, AG_config, AG_NUM_OF_CHANNELS); + + MV_THINVPP_Create(MEMMAP_VPP_REG_BASE); + MV_THINVPP_Reset(); + MV_THINVPP_Config(); + + /* set output resolution */ + MV_THINVPP_SetCPCBOutputResolution(CPCB_1, RES_525P5994, OUTPUT_BIT_DEPTH_8BIT); + + // use MAIN plane + fastlogo_ctx.planes = 1; + fastlogo_ctx.win.x = 0; + fastlogo_ctx.win.y = 0; + fastlogo_ctx.win.width = 720; + fastlogo_ctx.win.height = 480; + MV_THINVPP_SetMainDisplayFrame(&vbuf); + MV_THINVPP_OpenDispWindow(PLANE_MAIN, &fastlogo_ctx.win, NULL); + + /* register ISR */ + err = request_irq(IRQ_DHUBINTRAVIO0, fastlogo_devices_vpp_isr, IRQF_DISABLED, "fastlogo_module_vpp", NULL); + if (unlikely(err < 0)) { + gs_trace("vec_num:%5d, err:%8x\n", IRQ_DHUBINTRAVIO0, err); + return err; + } + + /* + * using 3 for debugging legacy; should change to a more reasonable + * number after clean-up + */ + cpcb_start_flag = 3; + + /* clean up and enable ISR */ + VPP_dhub_sem_clear(); + semaphore_pop(thinvpp_obj->pSemHandle, avioDhubSemMap_vpp_vppCPCB0_intr, 1); + semaphore_clr_full(thinvpp_obj->pSemHandle, avioDhubSemMap_vpp_vppCPCB0_intr); + THINVPP_Enable_ISR_Interrupt(thinvpp_obj, CPCB_1, 1); + + return 0; +} + +static void fastlogo_device_exit(void) +{ + MV_THINVPP_CloseDispWindow(); + MV_THINVPP_Stop(); + + msleep(100); //100 milliseconds + MV_THINVPP_Destroy(); +#if LOGO_USE_SHM + if (fastlogo_ctx.mSHMOffset != ERROR_SHM_MALLOC_FAILED) + { + MV_SHM_NONCACHE_Free(fastlogo_ctx.mSHMOffset); + fastlogo_ctx.logoBuf = NULL; + fastlogo_ctx.mSHMOffset = ERROR_SHM_MALLOC_FAILED; + } +#else + if (fastlogo_ctx.logoBuf) { + dma_unmap_single(NULL, (dma_addr_t)fastlogo_ctx.mapaddr, fastlogo_ctx.length, DMA_TO_DEVICE); + gs_trace("will free pBuf OK\n"); + kfree(fastlogo_ctx.logoBuf); + fastlogo_ctx.logoBuf = NULL; + } +#endif + + /* unregister VPP interrupt */ + msleep(100); //100 milliseconds + free_irq(IRQ_DHUBINTRAVIO0, NULL); + console_loglevel = save_console_loglevel; // restore console printk + + gs_trace("dev exit done\n"); + +#if LOGO_TIME_PROFILE + { + int i; + gs_notice("profile %d:\n", logo_tp_count); + for (i = 0; i < logo_tp_count; i++) { + if (lat[i]>17000000 || lat[i]<16000000) + printk("%4d: %08llu:%08llu\n", i, lat[i], lat2[i]); + } + } +#endif +} + +/******************************************************************************* + Module API + */ +void fastlogo_stop(void) +{ + if (MV_THINVPP_IsCPCBActive(CPCB_1)) + fastlogo_device_exit(); +} +EXPORT_SYMBOL(fastlogo_stop); + + +/******************************************************************************* + Module Register API + */ +static int __init fastlogo_driver_init(void) +{ + int res; + + gs_info("drv init\n"); + + memset(&fastlogo_ctx, 0, sizeof(fastlogo_ctx)); +#if LOGO_PROC_FS + { + struct proc_dir_entry *pstat = NULL; + logo_driver_procdir = proc_mkdir(DEVICE_NAME, NULL); + pstat = create_proc_entry("stat", 0, logo_driver_procdir); + if (pstat) + pstat->proc_fops = &logo_stat_file_ops; + } +#endif //LOGO_PROC_FS + + fastlogo_ctx.vres = MV_THINVPP_IsCPCBActive(CPCB_1); + + if (!fastlogo_ctx.vres) + { + gs_trace("fastlogo is not enabled in bootloader\n"); + return 0; // do nothing if fastlogo is not enabled in bootloader + } + if (fastlogo_ctx.vres != 524) + { + gs_trace("fastlogo does not supprt vres=%d\n", fastlogo_ctx.vres); + return 0; // do nothing if vres is not supported + } + + //console_silent(); // don't want printk to interfere us + save_console_loglevel = console_loglevel; // to restore console printk + if (console_loglevel > LIMIT_CONSOLE_LOGLEVEL) + console_loglevel = LIMIT_CONSOLE_LOGLEVEL; + + /* create PE device */ + res = fastlogo_device_init(CPUINDEX); + if (res != 0) { + gs_error("drv init failed !!! res = 0x%08X\n", res); + return res; + } else { + gs_trace("drv init OK\n"); + } + + return 0; +} + +static void __exit fastlogo_driver_exit(void) +{ + fastlogo_stop(); + + gs_trace("drv exit done\n"); +} + +module_init(fastlogo_driver_init); +module_exit(fastlogo_driver_exit); + +MODULE_AUTHOR("marvell"); +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("fastlogo module"); diff --git a/arch/arm/mach-berlin/modules/fastlogo_bg2cd/fastlogo_driver.h b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/fastlogo_driver.h new file mode 100755 index 00000000..94ed28a0 --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/fastlogo_driver.h @@ -0,0 +1,28 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the "GPL License"), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + +#ifndef __fastlogo_driver_h__ +#define __fastlogo_driver_h__ + +#ifdef CONFIG_BERLIN_FASTLOGO +void fastlogo_stop(void); +#else +static inline void fastlogo_stop(void) {} +#endif + +#endif diff --git a/arch/arm/mach-berlin/modules/fastlogo_bg2cd/logo_data.h b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/logo_data.h new file mode 100644 index 00000000..c1bbaabf --- /dev/null +++ b/arch/arm/mach-berlin/modules/fastlogo_bg2cd/logo_data.h @@ -0,0 +1,4221 @@ +#define YUV_LOGO_BGCOLOR 0x00800080 // background color in YUYV format + +static unsigned int yuv_logo_width = 300; +static unsigned int yuv_logo_height = 112; +static unsigned int yuv_logo_offset_x = 210; +static unsigned int yuv_logo_offset_y = 368; + +static unsigned int yuv_logo_bytepp = 2; +/* Stride is a product of the width and bytes per pixel, assuming + * the image itself is not padded. + */ +static unsigned int yuv_logo_stride = 2 * 300; + +/* Conversion steps for converting png to array below: + * convert -extract 300x112+210+368 s01.png s01_e.uyvy + * hexdump -v -e '16/1 "0x%02X," "\n"' s01_e.uyvy > s01_e.c + * + * Note: width/height/offsets above vary with source png image. + */ +static unsigned char yuv_logo[] = { +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x4E,0x80,0x5B,0x80,0x1A, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x73,0x80,0x7E,0x80,0x7E,0x80,0x67,0x80,0x00, +0x80,0x00,0x80,0xA4,0x80,0xBE,0x80,0x5B,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x1A,0x80,0xA4,0x80,0xBE, +0x80,0xBE,0x80,0xBE,0x80,0xBE,0x80,0x88,0x80,0x00,0x80,0xA4,0x80,0xBE,0x80,0x5B, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x3F, +0x80,0x7E,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x92,0x80,0xBE,0x80,0xB6,0x80,0x7E,0x80,0x7E,0x80,0xAD,0x80,0x67, +0x80,0x00,0x80,0xA4,0x80,0xBE,0x80,0x5B,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x1A,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x1A,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x1A,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x92,0x80,0xBE,0x80,0x1A,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x2E,0x80,0xBE,0x80,0xBE,0x80,0x4E, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0xA4,0x80,0xBE,0x80,0x73, +0x80,0x9B,0x80,0xB6,0x80,0x9B,0x80,0x1A,0x80,0x00,0x80,0x00,0x80,0x88,0x80,0x92, +0x80,0x1A,0x80,0x9B,0x80,0xB6,0x80,0x00,0x80,0x00,0x80,0x7E,0x80,0xA4,0x80,0xAD, +0x80,0x92,0x80,0x1A,0x80,0x00,0x80,0x00,0x80,0x73,0x80,0xA4,0x80,0x4E,0x80,0x92, +0x80,0xB6,0x80,0x9B,0x80,0x3F,0x80,0x73,0x80,0xA4,0x80,0xAD,0x80,0x7E,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x1A,0x80,0x92,0x80,0xB6,0x80,0xA4,0x80,0x73,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x67,0x80,0xA4,0x80,0xBE,0x80,0xA4,0x80,0x5B,0x80,0x00, +0x80,0x73,0x80,0xA4,0x80,0xBE,0x80,0xA4,0x80,0x7E,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x67,0x80,0xA4,0x80,0xBE,0x80,0xA4,0x80,0x73,0x80,0x00,0x80,0x5B,0x80,0xB6, +0x80,0xBE,0x80,0xA4,0x80,0xA4,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x67,0x80,0xBE,0x80,0xA4,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0xA4,0x80,0xBE,0x80,0xB6,0x80,0xBE,0x80,0xBE,0x80,0xBE,0x80,0x92, +0x80,0x00,0x80,0x00,0x80,0xA4,0x80,0xBE,0x80,0xA4,0x80,0xBE,0x80,0xBE,0x80,0x1A, +0x80,0x88,0x80,0xBE,0x80,0xBE,0x80,0xBE,0x80,0xBE,0x80,0xA4,0x80,0x00,0x80,0x00, +0x80,0x7E,0x80,0xBE,0x80,0xAD,0x80,0xBE,0x80,0xBE,0x80,0xBE,0x80,0xA4,0x80,0xBE, +0x80,0xBE,0x80,0xBE,0x80,0xBE,0x80,0x4E,0x80,0x00,0x80,0x00,0x80,0xA4,0x80,0xBE, +0x80,0xA4,0x80,0xB6,0x80,0xBE,0x80,0x73,0x80,0x00,0x80,0x67,0x80,0xBE,0x80,0xBE, +0x80,0xBE,0x80,0xBE,0x80,0x73,0x80,0x00,0x80,0x9B,0x80,0xBE,0x80,0xA4,0x80,0xBE, +0x80,0xBE,0x80,0x73,0x80,0x00,0x80,0x4E,0x80,0xBE,0x80,0xBE,0x80,0xAD,0x80,0xBE, +0x80,0xA4,0x80,0x1A,0x80,0xBE,0x80,0xBE,0x80,0xBE,0x80,0xBE,0x80,0xBE,0x80,0x1A, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x7E,0x80,0xBE,0x80,0x92,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0xA4,0x80,0xBE,0x80,0x9B, +0x80,0x2E,0x80,0x73,0x80,0xBE,0x80,0xB6,0x80,0x00,0x80,0x00,0x80,0xA4,0x80,0xBE, +0x80,0xB6,0x80,0x73,0x80,0x4E,0x80,0x3F,0x80,0xBE,0x80,0xB6,0x80,0x4E,0x80,0x2E, +0x80,0xAD,0x80,0xBE,0x80,0x67,0x80,0x00,0x80,0x7E,0x80,0xBE,0x80,0xB6,0x80,0x3F, +0x80,0x5B,0x80,0xBE,0x80,0xBE,0x80,0x88,0x80,0x1A,0x80,0x9B,0x80,0xBE,0x80,0x7E, +0x80,0x00,0x80,0x73,0x80,0xBE,0x80,0x92,0x80,0x00,0x80,0x3F,0x80,0xBE,0x80,0xA4, +0x80,0x00,0x80,0xAD,0x80,0xBE,0x80,0x73,0x80,0x1A,0x80,0x67,0x80,0x1A,0x80,0x00, +0x80,0x3F,0x80,0x3F,0x80,0x00,0x80,0x67,0x80,0xBE,0x80,0xA4,0x80,0x00,0x80,0x7E, +0x80,0xBE,0x80,0x92,0x80,0x00,0x80,0x3F,0x80,0x4E,0x80,0x00,0x80,0x1A,0x80,0xBE, +0x80,0xBE,0x80,0x1A,0x80,0x1A,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x7E,0x80,0xBE,0x80,0x7E,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0xA4,0x80,0xBE,0x80,0x73,0x80,0x00,0x80,0x1A,0x80,0xBE,0x80,0xBE, +0x80,0x1A,0x80,0x00,0x80,0xA4,0x80,0xBE,0x80,0x73,0x80,0x00,0x80,0x00,0x80,0x67, +0x80,0xBE,0x80,0xA4,0x80,0x00,0x80,0x00,0x80,0x7E,0x80,0xBE,0x80,0x7E,0x80,0x00, +0x80,0x7E,0x80,0xBE,0x80,0x92,0x80,0x00,0x80,0x1A,0x80,0xBE,0x80,0xBE,0x80,0x2E, +0x80,0x00,0x80,0x7E,0x80,0xBE,0x80,0x7E,0x80,0x00,0x80,0x7E,0x80,0xBE,0x80,0x92, +0x80,0x5B,0x80,0x5B,0x80,0xAD,0x80,0xBE,0x80,0x1A,0x80,0xBE,0x80,0xBE,0x80,0x1A, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x5B,0x80,0x73,0x80,0x92, +0x80,0xBE,0x80,0xA4,0x80,0x00,0x80,0x5B,0x80,0xBE,0x80,0xBE,0x80,0x92,0x80,0x2E, +0x80,0x00,0x80,0x00,0x80,0x1A,0x80,0xBE,0x80,0xBE,0x80,0x1A,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x7E,0x80,0xBE,0x80,0x9B,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0xA4,0x80,0xBE,0x80,0x5B, +0x80,0x00,0x80,0x1A,0x80,0xBE,0x80,0xBE,0x80,0x1A,0x80,0x00,0x80,0xA4,0x80,0xBE, +0x80,0x5B,0x80,0x00,0x80,0x00,0x80,0x7E,0x80,0xBE,0x80,0x7E,0x80,0x00,0x80,0x00, +0x80,0x7E,0x80,0xBE,0x80,0x7E,0x80,0x00,0x80,0x7E,0x80,0xBE,0x80,0x7E,0x80,0x00, +0x80,0x1A,0x80,0xBE,0x80,0xBE,0x80,0x1A,0x80,0x00,0x80,0x7E,0x80,0xBE,0x80,0x7E, +0x80,0x00,0x80,0xA4,0x80,0xBE,0x80,0xBE,0x80,0xBE,0x80,0xBE,0x80,0xBE,0x80,0xBE, +0x80,0x5B,0x80,0xBE,0x80,0xA4,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x2E, +0x80,0xAD,0x80,0xBE,0x80,0xBE,0x80,0xBE,0x80,0xBE,0x80,0xA4,0x80,0x00,0x80,0x00, +0x80,0x88,0x80,0xBE,0x80,0xBE,0x80,0xB6,0x80,0x73,0x80,0x00,0x80,0x1A,0x80,0xBE, +0x80,0xBE,0x80,0x1A,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x5B,0x80,0xBE,0x80,0xAD,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0xA4,0x80,0xBE,0x80,0x5B,0x80,0x00,0x80,0x1A,0x80,0xBE,0x80,0xBE, +0x80,0x1A,0x80,0x00,0x80,0xA4,0x80,0xBE,0x80,0x5B,0x80,0x00,0x80,0x00,0x80,0x67, +0x80,0xBE,0x80,0x9B,0x80,0x00,0x80,0x00,0x80,0x7E,0x80,0xBE,0x80,0x7E,0x80,0x00, +0x80,0x7E,0x80,0xBE,0x80,0x7E,0x80,0x00,0x80,0x1A,0x80,0xBE,0x80,0xBE,0x80,0x1A, +0x80,0x00,0x80,0x7E,0x80,0xBE,0x80,0x7E,0x80,0x00,0x80,0x92,0x80,0xBE,0x80,0x88, +0x80,0x5B,0x80,0x5B,0x80,0x5B,0x80,0x5B,0x80,0x3F,0x80,0xBE,0x80,0xB6,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x88,0x80,0xBE,0x80,0x92,0x80,0x2E,0x80,0x5B, +0x80,0xBE,0x80,0xA4,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x5B,0x80,0xA4,0x80,0xBE, +0x80,0xB6,0x80,0x00,0x80,0x1A,0x80,0xBE,0x80,0xBE,0x80,0x1A,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0xB6,0x80,0xBE,0x80,0x73, +0x80,0x00,0x80,0x00,0x80,0x3F,0x80,0x1A,0x80,0x00,0x80,0xA4,0x80,0xBE,0x80,0x5B, +0x80,0x00,0x80,0x1A,0x80,0xBE,0x80,0xBE,0x80,0x1A,0x80,0x00,0x80,0xA4,0x80,0xBE, +0x80,0x5B,0x80,0x00,0x80,0x00,0x80,0x3F,0x80,0xBE,0x80,0xAD,0x80,0x1A,0x80,0x00, +0x80,0x9B,0x80,0xBE,0x80,0x73,0x80,0x00,0x80,0x7E,0x80,0xBE,0x80,0x7E,0x80,0x00, +0x80,0x1A,0x80,0xBE,0x80,0xBE,0x80,0x1A,0x80,0x00,0x80,0x7E,0x80,0xBE,0x80,0x7E, +0x80,0x00,0x80,0x73,0x80,0xBE,0x80,0x92,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x1A, +0x80,0x1A,0x80,0xBE,0x80,0xBE,0x80,0x5B,0x80,0x00,0x80,0x1A,0x80,0x4E,0x80,0xA4, +0x80,0xBE,0x80,0x67,0x80,0x00,0x80,0x73,0x80,0xBE,0x80,0xA4,0x80,0x00,0x80,0x2E, +0x80,0x00,0x80,0x00,0x80,0x1A,0x80,0xB6,0x80,0xBE,0x80,0x1A,0x80,0x1A,0x80,0xBE, +0x80,0xBE,0x80,0x1A,0x80,0x00,0x80,0x00,0x80,0x2E,0x80,0x73,0x80,0x1A,0x80,0x00, +0x80,0x1A,0x80,0x73,0x80,0x2E,0x80,0x00,0x80,0x00,0x80,0x73,0x80,0x5B,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x7E,0x80,0xBE,0x80,0xBE,0x80,0xB6,0x80,0xB6,0x80,0xBE,0x80,0x5B, +0x80,0x00,0x80,0xA4,0x80,0xBE,0x80,0x5B,0x80,0x00,0x80,0x1A,0x80,0xBE,0x80,0xBE, +0x80,0x1A,0x80,0x00,0x80,0xA4,0x80,0xBE,0x80,0x5B,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x9B,0x80,0xBE,0x80,0xAD,0x80,0xA4,0x80,0xBE,0x80,0xB6,0x80,0x1A,0x80,0x00, +0x80,0x7E,0x80,0xBE,0x80,0x7E,0x80,0x00,0x80,0x1A,0x80,0xBE,0x80,0xBE,0x80,0x1A, +0x80,0x00,0x80,0x7E,0x80,0xBE,0x80,0x7E,0x80,0x00,0x80,0x1A,0x80,0xB6,0x80,0xBE, +0x80,0xA4,0x80,0x92,0x80,0xA4,0x80,0x7E,0x80,0x00,0x80,0x92,0x80,0xBE,0x80,0xB6, +0x80,0xA4,0x80,0xB6,0x80,0x7E,0x80,0x88,0x80,0xBE,0x80,0xAD,0x80,0x88,0x80,0xB6, +0x80,0xBE,0x80,0xA4,0x80,0x00,0x80,0x7E,0x80,0xAD,0x80,0x92,0x80,0x92,0x80,0xBE, +0x80,0xB6,0x80,0x00,0x80,0x00,0x80,0xAD,0x80,0xBE,0x80,0xA4,0x80,0xA4,0x80,0x1A, +0x80,0x9B,0x80,0xBE,0x80,0x73,0x80,0x00,0x80,0x73,0x80,0xBE,0x80,0x9B,0x80,0x00, +0x80,0x4E,0x80,0xBE,0x80,0xB6,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x7E,0x80,0xB6, +0x80,0xBE,0x80,0xBE,0x80,0xB6,0x80,0x4E,0x80,0x00,0x80,0xA4,0x80,0xBE,0x80,0x5B, +0x80,0x00,0x80,0x1A,0x80,0xBE,0x80,0xBE,0x80,0x1A,0x80,0x00,0x80,0xA4,0x80,0xBE, +0x80,0x5B,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x1A,0x80,0x9B,0x80,0xBE,0x80,0xBE, +0x80,0xAD,0x80,0x3F,0x80,0x00,0x80,0x00,0x80,0x7E,0x80,0xBE,0x80,0x7E,0x80,0x00, +0x80,0x1A,0x80,0xBE,0x80,0xBE,0x80,0x1A,0x80,0x00,0x80,0x7E,0x80,0xBE,0x80,0x7E, +0x80,0x00,0x80,0x00,0x80,0x3F,0x80,0xAD,0x80,0xBE,0x80,0xBE,0x80,0xBE,0x80,0x73, +0x80,0x00,0x80,0x1A,0x80,0x9B,0x80,0xBE,0x80,0xBE,0x80,0xB6,0x80,0x67,0x80,0x2E, +0x80,0xAD,0x80,0xBE,0x80,0xBE,0x80,0x73,0x80,0xA4,0x80,0xA4,0x80,0x00,0x80,0x73, +0x80,0xB6,0x80,0xBE,0x80,0xBE,0x80,0xB6,0x80,0x5B,0x80,0x00,0x80,0x00,0x80,0x73, +0x80,0xBE,0x80,0xBE,0x80,0xB6,0x80,0x00,0x80,0x92,0x80,0xBE,0x80,0x73,0x80,0x00, +0x80,0x73,0x80,0xBE,0x80,0x92,0x80,0x00,0x80,0x3F,0x80,0xBE,0x80,0xAD,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x4E,0x80,0x3F,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x1A,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x1A,0x80,0x1A, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x1A,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x3F,0x80,0x3F,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x1A,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x1A,0x80,0x1A,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x1A,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x3F,0x80,0x4E,0x80,0x1A,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x2E, +0x80,0x4E,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x4E,0x80,0x1A,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x4E,0x80,0x3F,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x2E,0x80,0x4E,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x4E,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x4E,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x3F,0x80,0x1A,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00, +}; diff --git a/arch/arm/mach-berlin/modules/gpio/kgpio.h b/arch/arm/mach-berlin/modules/gpio/kgpio.h index 95088bf6..ac6922b7 100644 --- a/arch/arm/mach-berlin/modules/gpio/kgpio.h +++ b/arch/arm/mach-berlin/modules/gpio/kgpio.h @@ -1,3 +1,19 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + #ifndef __GALOIS_GPIO_HEADER__ #define __GALOIS_GPIO_HEADER__ diff --git a/arch/arm/mach-berlin/modules/gpu3D/hal/kernel/inc/gc_hal_base.h b/arch/arm/mach-berlin/modules/gpu3D/hal/kernel/inc/gc_hal_base.h index bf4cb2f9..697c409e 100644 --- a/arch/arm/mach-berlin/modules/gpu3D/hal/kernel/inc/gc_hal_base.h +++ b/arch/arm/mach-berlin/modules/gpu3D/hal/kernel/inc/gc_hal_base.h @@ -1,17 +1,24 @@ /**************************************************************************** * -* Copyright (c) 2005 - 2014 by Vivante Corp. All rights reserved. +* Copyright (C) 2005 - 2014 by Vivante Corp. * -* The material in this file is confidential and contains trade secrets -* of Vivante Corporation. This is proprietary information owned by -* Vivante Corporation. No part of this work may be disclosed, -* reproduced, copied, transmitted, or used in any way for any purpose, -* without the express written permission of Vivante Corporation. +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the license, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not write to the Free Software +* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * *****************************************************************************/ - #ifndef __gc_hal_base_h_ #define __gc_hal_base_h_ diff --git a/arch/arm/mach-berlin/modules/gpu3D/hal/kernel/inc/gc_hal_eglplatform.h b/arch/arm/mach-berlin/modules/gpu3D/hal/kernel/inc/gc_hal_eglplatform.h index da6c5200..49e38b41 100644 --- a/arch/arm/mach-berlin/modules/gpu3D/hal/kernel/inc/gc_hal_eglplatform.h +++ b/arch/arm/mach-berlin/modules/gpu3D/hal/kernel/inc/gc_hal_eglplatform.h @@ -1,20 +1,12 @@ /**************************************************************************** * -* Copyright (C) 2005 - 2014 by Vivante Corp. +* Copyright (c) 2005 - 2014 by Vivante Corp. All rights reserved. * -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the license, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not write to the Free Software -* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +* The material in this file is confidential and contains trade secrets +* of Vivante Corporation. This is proprietary information owned by +* Vivante Corporation. No part of this work may be disclosed, +* reproduced, copied, transmitted, or used in any way for any purpose, +* without the express written permission of Vivante Corporation. * *****************************************************************************/ diff --git a/arch/arm/mach-berlin/modules/nfc/Makefile b/arch/arm/mach-berlin/modules/nfc/Makefile index 97ef3574..1d1e1a98 100644 --- a/arch/arm/mach-berlin/modules/nfc/Makefile +++ b/arch/arm/mach-berlin/modules/nfc/Makefile @@ -1,3 +1,6 @@ +ccflags-y += -I$(srctree)/arch/arm/mach-berlin/include/mach + obj-$(CONFIG_BERLIN_PXA3XX_NFC) += pxa3xx_nand.o -pxa3xx_nand-y := pxa3xx_nand_debu.o hal_dhub.o +pxa3xx_nand-y := pxa3xx_nand_debu.o pxa3xx_nand-$(CONFIG_BERLIN_NAND_RANDOMIZER) += prbs15.o nand_randomizer.o +pxa3xx_nand-$(CONFIG_BERLIN_NAND_READ_RETRY) += pxa3xx_nand_read_retry_debu.o diff --git a/arch/arm/mach-berlin/modules/nfc/nand_randomizer.c b/arch/arm/mach-berlin/modules/nfc/nand_randomizer.c index a4891c51..f2d06955 100644 --- a/arch/arm/mach-berlin/modules/nfc/nand_randomizer.c +++ b/arch/arm/mach-berlin/modules/nfc/nand_randomizer.c @@ -1,3 +1,19 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + /** Randomize the data in NAND. * * At present, it only supports SAMSUNG NAND randomization way at present. @@ -197,6 +213,27 @@ static const struct nand_randomized_chip_info_s g_nand_randomized_chip_list[] = MV_NAND_RANDOMIZER_SAMSUNG_PRBS15, 4096 } + /* HYNIX H27UCG8T2ATR, 64Gb */ + ,{ + 6, + {0xAD, 0xDE, 0x94, 0xDA, 0x74, 0xC4}, + 8192 * 256, + 8192, + 640, + MV_NAND_RANDOMIZER_SAMSUNG_PRBS15, + 4096 + } + /* HYNIX H27UAG8T2CTR, 16Gb */ + ,{ + 6, + {0xAD, 0xD5, 0x94, 0xDA, 0x74, 0xC4}, + 8192 * 256, + 8192, + 640, + MV_NAND_RANDOMIZER_SAMSUNG_PRBS15, + 4096 + } + }; /* Samsung randomizer. diff --git a/arch/arm/mach-berlin/modules/nfc/nand_randomizer.h b/arch/arm/mach-berlin/modules/nfc/nand_randomizer.h index 06c31f3c..951044ad 100644 --- a/arch/arm/mach-berlin/modules/nfc/nand_randomizer.h +++ b/arch/arm/mach-berlin/modules/nfc/nand_randomizer.h @@ -1,3 +1,19 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + #ifndef _NAND_RANDOMIZER_H_ #define _NAND_RANDOMIZER_H_ /** Randomizer API. diff --git a/arch/arm/mach-berlin/modules/nfc/prbs.h b/arch/arm/mach-berlin/modules/nfc/prbs.h index fb3159cc..0db9e284 100644 --- a/arch/arm/mach-berlin/modules/nfc/prbs.h +++ b/arch/arm/mach-berlin/modules/nfc/prbs.h @@ -1,3 +1,19 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + #ifndef _PRBS_H_ #define _PRBS_H_ /** Generate the PRBS (Pseudo Random Binary Sequence). diff --git a/arch/arm/mach-berlin/modules/nfc/prbs15.c b/arch/arm/mach-berlin/modules/nfc/prbs15.c index cbb0c72a..990744c9 100644 --- a/arch/arm/mach-berlin/modules/nfc/prbs15.c +++ b/arch/arm/mach-berlin/modules/nfc/prbs15.c @@ -1,3 +1,19 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + /** Generate PRBS-15. * * At present, only x^15 + x^14 + 1 (0xC001) is supported. diff --git a/arch/arm/mach-berlin/modules/nfc/pxa3xx_nand_debu.c b/arch/arm/mach-berlin/modules/nfc/pxa3xx_nand_debu.c index 5aeb20d1..622fdbdf 100644 --- a/arch/arm/mach-berlin/modules/nfc/pxa3xx_nand_debu.c +++ b/arch/arm/mach-berlin/modules/nfc/pxa3xx_nand_debu.c @@ -28,168 +28,21 @@ #include #include #include -#include #include -#include #include -#include #include #include #include +#include #include #include - #include "pxa3xx_nand_debu.h" -#include "pBridge.h" -#include "api_dhub.h" +#ifdef CONFIG_BERLIN_NAND_READ_RETRY +#include "pxa3xx_nand_read_retry_debu.h" +#endif -enum { - READ_DATA_CHANNEL_ID = PBSemaMap_dHubSemID_dHubCh0_intr, - WRITE_DATA_CHANNEL_ID = PBSemaMap_dHubSemID_dHubCh1_intr, - DESCRIPTOR_CHANNEL_ID = PBSemaMap_dHubSemID_dHubCh2_intr, - NFC_DEV_CTL_CHANNEL_ID = PBSemaMap_dHubSemID_dHubCh3_intr, - SPI_DEV_CTL_CHANNEL_ID = PBSemaMap_dHubSemID_dHubCh4_intr -}; -#define READ_DATA_CHAN_CMD_BASE (0) -#define READ_DATA_CHAN_CMD_SIZE (2 << 3) -#define READ_DATA_CHAN_DATA_BASE (READ_DATA_CHAN_CMD_BASE + READ_DATA_CHAN_CMD_SIZE) -#define READ_DATA_CHAN_DATA_SIZE (32 << 3) - -#define WRITE_DATA_CHAN_CMD_BASE (READ_DATA_CHAN_DATA_BASE + READ_DATA_CHAN_DATA_SIZE) -#define WRITE_DATA_CHAN_CMD_SIZE (2 << 3) -#define WRITE_DATA_CHAN_DATA_BASE (WRITE_DATA_CHAN_CMD_BASE + WRITE_DATA_CHAN_CMD_SIZE) -#define WRITE_DATA_CHAN_DATA_SIZE (32 << 3) - -#define DESCRIPTOR_CHAN_CMD_BASE (WRITE_DATA_CHAN_DATA_BASE + WRITE_DATA_CHAN_DATA_SIZE) -#define DESCRIPTOR_CHAN_CMD_SIZE (2 << 3) -#define DESCRIPTOR_CHAN_DATA_BASE (DESCRIPTOR_CHAN_CMD_BASE + DESCRIPTOR_CHAN_CMD_SIZE) -#define DESCRIPTOR_CHAN_DATA_SIZE (32 << 3) - -#define NFC_DEV_CTL_CHAN_CMD_BASE (DESCRIPTOR_CHAN_DATA_BASE + DESCRIPTOR_CHAN_DATA_SIZE) -#define NFC_DEV_CTL_CHAN_CMD_SIZE (2 << 3) -#define NFC_DEV_CTL_CHAN_DATA_BASE (NFC_DEV_CTL_CHAN_CMD_BASE + NFC_DEV_CTL_CHAN_CMD_SIZE) -#define NFC_DEV_CTL_CHAN_DATA_SIZE (32 << 3) - -#define CHIP_DELAY_TIMEOUT (2 * HZ/10) -#define NAND_STOP_DELAY (2 * HZ/50) -#define PAGE_CHUNK_SIZE (2048) -#define OOB_CHUNK_SIZE (64) -#define CMD_POOL_SIZE (5) -#define BCH_THRESHOLD (8) -#define BCH_STRENGTH (4) -#define HAMMING_STRENGTH (1) - -#define DMA_H_SIZE (32*1024) - -/* registers and bit definitions */ -#define NDCR (0x00) /* Control register */ -#define NDTR0CS0 (0x04) /* Timing Parameter 0 for CS0 */ -#define NDTR1CS0 (0x0C) /* Timing Parameter 1 for CS0 */ -#define NDSR (0x14) /* Status Register */ -#define NDPCR (0x18) /* Page Count Register */ -#define NDBDR0 (0x1C) /* Bad Block Register 0 */ -#define NDBDR1 (0x20) /* Bad Block Register 1 */ -#define NDECCCTRL (0x28) /* ECC Control Register */ -#define NDDB (0x40) /* Data Buffer */ -#define NDCB0 (0x48) /* Command Buffer0 */ -#define NDCB1 (0x4C) /* Command Buffer1 */ -#define NDCB2 (0x50) /* Command Buffer2 */ - -#define NDCR_SPARE_EN (0x1 << 31) -#define NDCR_ECC_EN (0x1 << 30) -#define NDCR_DMA_EN (0x1 << 29) -#define NDCR_ND_RUN (0x1 << 28) -#define NDCR_DWIDTH_C (0x1 << 27) -#define NDCR_DWIDTH_M (0x1 << 26) -#define NDCR_PAGE_SZ (0x1 << 24) -#define NDCR_NCSX (0x1 << 23) -#define NDCR_FORCE_CSX (0x1 << 21) -#define NDCR_CLR_PG_CNT (0x1 << 20) -#define NDCR_STOP_ON_UNCOR (0x1 << 19) -#define NDCR_RD_ID_CNT_MASK (0x7 << 16) -#define NDCR_RD_ID_CNT(x) (((x) << 16) & NDCR_RD_ID_CNT_MASK) - -#define NDCR_RA_START (0x1 << 15) -#define NDCR_PG_PER_BLK_MASK (0x3 << 13) -#define NDCR_PG_PER_BLK(x) (((x) << 13) & NDCR_PG_PER_BLK_MASK) -#define NDCR_ND_ARB_EN (0x1 << 12) -#define NDCR_INT_MASK (0xFFF) -#define NDCR_RDYM (0x1 << 11) - -#define NDSR_MASK (0xffffffff) -#define NDSR_ERR_CNT_MASK (0x1F << 16) -#define NDSR_ERR_CNT(x) (((x) << 16) & NDSR_ERR_CNT_MASK) -#define NDSR_RDY (0x1 << 12) -#define NDSR_FLASH_RDY (0x1 << 11) -#define NDSR_CS0_PAGED (0x1 << 10) -#define NDSR_CS1_PAGED (0x1 << 9) -#define NDSR_CS0_CMDD (0x1 << 8) -#define NDSR_CS1_CMDD (0x1 << 7) -#define NDSR_CS0_BBD (0x1 << 6) -#define NDSR_CS1_BBD (0x1 << 5) -#define NDSR_DBERR (0x1 << 4) -#define NDSR_SBERR (0x1 << 3) -#define NDSR_WRDREQ (0x1 << 2) -#define NDSR_RDDREQ (0x1 << 1) -#define NDSR_WRCMDREQ (0x1) - -#define NDCB0_CMD_XTYPE_MASK (0x7 << 29) -#define NDCB0_CMD_XTYPE(x) (((x) << 29) & NDCB0_CMD_XTYPE_MASK) -#define NDCB0_LEN_OVRD (0x1 << 28) -#define NDCB0_ST_ROW_EN (0x1 << 26) -#define NDCB0_AUTO_RS (0x1 << 25) -#define NDCB0_CSEL (0x1 << 24) -#define NDCB0_CMD_TYPE_MASK (0x7 << 21) -#define NDCB0_CMD_TYPE(x) (((x) << 21) & NDCB0_CMD_TYPE_MASK) -#define NDCB0_NC (0x1 << 20) -#define NDCB0_DBC (0x1 << 19) -#define NDCB0_ADDR_CYC_MASK (0x7 << 16) -#define NDCB0_ADDR_CYC(x) (((x) << 16) & NDCB0_ADDR_CYC_MASK) -#define NDCB0_CMD2_MASK (0xff << 8) -#define NDCB0_CMD1_MASK (0xff) -#define NDCB0_ADDR_CYC_SHIFT (16) - -#define NDCB0_CMDX_MREAD (0x0) -#define NDCB0_CMDX_MWRITE (0x0) -#define NDCB0_CMDX_NWRITE_FINAL_CMD (0x1) -#define NDCB0_CMDX_FINAL_CMD (0x3) -#define NDCB0_CMDX_CMDP_WRITE (0x4) -#define NDCB0_CMDX_NREAD (0x5) -#define NDCB0_CMDX_NWRITE (0x5) -#define NDCB0_CMDX_CMDP (0x6) - -#define NDCB0_CMD_READ (0x0) -#define NDCB0_CMD_PROGRAM (0x1) -#define NDCB0_CMD_ERASE (0x2) -#define NDCB0_CMD_READID (0x3) -#define NDCB0_CMD_STATUSREAD (0x4) -#define NDCB0_CMD_RESET (0x5) -#define NDCB0_CMD_NAKED_CMD (0x6) -#define NDCB0_CMD_NAKED_ADDR (0x7) - -#define NDCB3_NDLENCNT_MASK (0xffff) -#define NDCB3_NDLENCNT(x) ((x) & NDCB3_NDLENCNT_MASK) - -/* ECC Control Register */ -#define NDECCCTRL_ECC_SPARE_MSK (0xFF << 7) -#define NDECCCTRL_ECC_SPARE(x) (((x) << 7) & NDECCCTRL_ECC_SPARE_MSK) -#define NDECCCTRL_ECC_THR_MSK (0x3F << 1) -#define NDECCCTRL_ECC_THRESH(x) (((x) << 1) & NDECCCTRL_ECC_THR_MSK) -#define NDECCCTRL_BCH_EN (0x1) -#define NDECCCTRL_ECC_STRENGTH_SHIFT (24) -#define NDECCCTRL_ECC_STRENGTH_MSK (0xFF << 24) -#define NDECCCTRL_ECC_STRENGTH(x) (((x) << 24) & NDECCCTRL_ECC_STRENGTH_MSK) - -/* macros for registers read/write */ -#define nand_writel(nand, off, val) \ - __raw_writel((val), (nand)->mmio_base + (off)) - -#define nand_readl(nand, off) \ - __raw_readl((nand)->mmio_base + (off)) -#define get_mtd_by_info(info) \ - (struct mtd_info *)((void *)info - sizeof(struct mtd_info)) /* macros for pbridge registers read/write */ #define pb_writel(nand, off, val) \ @@ -197,76 +50,6 @@ enum { #define pb_readl(nand, off) \ __raw_readl(nand->pb_base + (off)) -enum { - MV_MTU_8_BYTE = 0, - MV_MTU_32_BYTE, - MV_MTU_128_BYTE, - MV_MTU_1024_BYTE -}; - -#define pb_get_phys_offset(nand, off) \ - ((nand->mmio_phys + off) & 0x0FFFFFFF) - -/* structure for DMA command buffer */ -struct cmd_3_desc { - SIE_BCMCFGW cfgw_ndcb0[3]; -}; -struct cmd_4_desc { - SIE_BCMCFGW cfgw_ndcb0[4]; -}; - -struct start_desc { - SIE_BCMCFGW ndcr_stop; - SIE_BCMCFGW ndeccctrl; - SIE_BCMCFGW ndsr_clear; - SIE_BCMCFGW ndcr_go; -}; - -struct reset_desc { - SIE_BCMSEMA sema_cmd; - struct cmd_3_desc cmd; -}; - -struct read_status_desc { - SIE_BCMSEMA sema_cmd; - struct cmd_3_desc cmd; - SIE_BCMSEMA sema_data; - SIE_BCMWCMD wcmd; - SIE_BCMWDAT wdat; -}; - -struct read_desc { - SIE_BCMSEMA sema_cmd1; - struct cmd_3_desc cmd1; - SIE_BCMSEMA sema_addr; - struct cmd_3_desc addr; - SIE_BCMSEMA sema_cmd2; - struct cmd_3_desc cmd2; - /* chunks * (sema + cmd4 + units * (sema + data)) */ - unsigned char data_cmd[0]; -}; - -struct dp_read_desc { - SIE_BCMSEMA sema_cmd1; - struct cmd_3_desc plane_1_cmd; - SIE_BCMSEMA sema_addr1; - struct cmd_3_desc plane_1_addr; - SIE_BCMSEMA sema_cmd2; - struct cmd_3_desc plane_2_cmd; - SIE_BCMSEMA sema_addr2; - struct cmd_3_desc plane_2_addr; - SIE_BCMSEMA sema_conf_cmd; - struct cmd_3_desc confirm_cmd; - /* planes * ( sema + cmd3 + - * sema + cmd3 + - * sema + cmd3 + - * sema + cmd3 + - * sema + cmd3 + - * chunk * ( sema + cmd4 + - * units * (sema + wcmd + wdat)))*/ - unsigned char data_cmd[0]; -}; - struct dp_erase_desc { SIE_BCMSEMA sema_cmd1; struct cmd_3_desc plane_1_cmd; @@ -294,146 +77,6 @@ struct write_2_desc { struct cmd_3_desc cmd2; }; -/* error code and state */ -enum { - ERR_NONE = 0, - ERR_DMABUSERR = -1, - ERR_SENDCMD = -2, - ERR_DBERR = -3, - ERR_BBERR = -4, - ERR_SBERR = -5, - ERR_DMAMAPERR = -6, -}; - -enum { - STATE_IDLE = 0, - STATE_PREPARED, - STATE_CMD_HANDLE, - STATE_DMA_READING, - STATE_DMA_WRITING, - STATE_DMA_DONE, - STATE_PIO_READING, - STATE_PIO_WRITING, - STATE_CMD_DONE, - STATE_READY, -}; - -enum { - TYPE_SINGLE_PLANE = 0, - TYPE_DUAL_PLANE, - TYPE_UNKNOWN, -}; - -struct pxa3xx_nand_info { - struct nand_chip nand_chip; - - struct pxa3xx_nand_cmdset *cmdset; - /* page size of attached chip */ - uint16_t page_size; - uint8_t chip_select; - uint8_t ecc_strength; - - int page_shift; - int erase_shift; - - uint8_t has_dual_plane; - uint8_t n_planes; - uint32_t erase_size; - - /* calculated from pxa3xx_nand_flash data */ - uint8_t col_addr_cycles; - uint8_t row_addr_cycles; - uint8_t read_id_bytes; - - /* cached register value */ - uint32_t reg_ndcr; - uint32_t ndtr0cs0; - uint32_t ndtr1cs0; - - void *nand_data; -}; - -struct pxa3xx_nand { - void __iomem *mmio_base; - void __iomem *pb_base; - unsigned long mmio_phys; - struct nand_hw_control controller; - struct completion cmd_complete; - struct platform_device *pdev; - - /* DMA information */ - HDL_dhub PB_dhubHandle; - unsigned int mtu_size; - unsigned int mtu_type; - dma_addr_t data_buff_phys; - dma_addr_t oob_buff_phys; - - unsigned char *bounce_buffer; - - dma_addr_t data_desc_addr; - unsigned char *data_desc; - int data_desc_len; - - dma_addr_t read_desc_addr; - unsigned char *read_desc; - int read_desc_len[NUM_CHIP_SELECT]; - - dma_addr_t write_desc_addr; - unsigned char *write_desc; - int write_desc_len[NUM_CHIP_SELECT]; - - dma_addr_t dp_read_desc_addr; - unsigned char *dp_read_desc; - int dp_read_desc_len[NUM_CHIP_SELECT]; - - dma_addr_t dp_write_desc_addr; - unsigned char *dp_write_desc; - int dp_write_desc_len[NUM_CHIP_SELECT]; - - int transfer_units[NUM_CHIP_SELECT]; - int transfer_units_last_trunk[NUM_CHIP_SELECT]; - - struct pxa3xx_nand_info *info[NUM_CHIP_SELECT]; - struct pxa3xx_nand_info *info_dp[NUM_CHIP_SELECT]; - uint8_t chip_select; - uint32_t command; - uint16_t data_size; /* data size in FIFO */ - uint16_t oob_size; - unsigned char *data_buff; - unsigned char *oob_buff; - - /************ - * following members will be reset as 0 before real IO - ************/ - uint32_t buf_start; - uint32_t buf_count; - uint16_t data_column; - uint16_t oob_column; - - /* relate to the command */ - unsigned int state; - int page_addr; - uint16_t column; - unsigned int ecc_strength; - unsigned int bad_count; - int use_mapped_buf; - int is_ready; - int retcode; - - uint32_t ndeccctrl; - uint32_t ndcr; - - /* generated NDCBx register values */ - uint8_t total_cmds; - uint8_t cmd_seqs; - uint8_t wait_ready[CMD_POOL_SIZE]; - uint32_t ndcb0[CMD_POOL_SIZE]; - uint32_t ndcb1; - uint32_t ndcb2; - uint32_t chunk_oob_size[CMD_POOL_SIZE]; - uint32_t curr_chunk; -}; - static char *plane_cmdline; module_param(plane_cmdline, charp, 0000); MODULE_PARM_DESC(plane_cmdline, "command line for plane numbers of different partitions"); @@ -442,7 +85,12 @@ static bool use_dma = 1; module_param(use_dma, bool, 0444); MODULE_PARM_DESC(use_dma, "enable DMA for data transferring to/from NAND HW"); +#ifdef CONFIG_BERLIN_ASIC static char *usr_ndtr0 = "84840A12"; +#else +static char *usr_ndtr0 = "84840A92"; +#endif + module_param(usr_ndtr0, charp, 0000); MODULE_PARM_DESC(usr_ndtr0, "NDTR0CS0"); @@ -494,6 +142,11 @@ static struct pxa3xx_nand_flash builtin_flash_types[] = { { "DEFAULT FLASH", 0, 0, 0, 2048, 8, 8, 0, 0, &timing[0], 0 }, { "64MiB 16-bit", 0x46ec, 0xffff, 32, 512, 16, 16, 1, 4096, &timing[1], 0 }, { "256MiB 8-bit", 0xdaec, 0xffff, 64, 2048, 8, 8, 1, 2048, &timing[1], 0 }, +{ "Power Chip 256MiB 8-bit", 0xdac8, 0x9590, 64, 2048, 8, 8, 16, 2048, &timing[6], 0 }, +{ "Power Chip 512MiB 8-bit", 0xdcc8, 0x9590, 64, 2048, 8, 8, 16, 4096, &timing[6], 0 }, +{ "Toshiba 256MiB 8-bit", 0xda98, 0x1590, 64, 2048, 8, 8, 48, 2048, &timing[6], 0 }, +{ "Toshiba 512MiB 8-bit", 0xdc98, 0x1591, 64, 2048, 8, 8, 32, 4096, &timing[6], 0 }, +{ "Hynix 256MiB 8-bit", 0xdaad, 0x9590, 64, 2048, 8, 8, 32, 2048, &timing[6], 0 }, { "4GiB 8-bit", 0xd7ec, 0xb655, 128, 4096, 8, 8, 4, 8192, &timing[1], 0 }, { "4GiB 8-bit", 0xd7ec, 0x29d5, 128, 4096, 8, 8, 8, 8192, &timing[1], 0 }, { "128MiB 8-bit", 0xa12c, 0xffff, 64, 2048, 8, 8, 1, 1024, &timing[2], 0 }, @@ -505,6 +158,7 @@ static struct pxa3xx_nand_flash builtin_flash_types[] = { { "2GiB 8-bit", 0xd5ec, 0x7284, 128, 8192, 8, 8, 48, 2048, &timing[4], 0 }, { "2GiB 8-bit", 0xd598, 0x3284, 128, 8192, 8, 8, 80, 2048, &timing[5], 1 }, { "2GiB 8-bit", 0x482c, 0x4a04, 256, 4096, 8, 8, 48, 2048, &timing[6], 1 }, +{ "2GiB 8-bit", 0xd5ad, 0xda94, 256, 8192, 8, 8, 80, 1024, &timing[6], 1 }, { "4GiB 8-bit", 0xd7ec, 0x7A94, 128, 8192, 8, 8, 48, 4096, &timing[5], 1 }, { "4GiB 8-bit", 0xd7ec, 0x7e94, 128, 8192, 8, 8, 80, 4096, &timing[5], 1 }, { "8GiB 8-bit", 0xdeec, 0x7ad5, 128, 8192, 8, 8, 48, 4096, &timing[5], 1 }, @@ -512,6 +166,26 @@ static struct pxa3xx_nand_flash builtin_flash_types[] = { { "4GiB 8-bit", 0x682c, 0x4a04, 256, 4096, 8, 8, 48, 4096, &timing[6], 1 }, { "4GiB 8-bit", 0x682c, 0x4604, 256, 4096, 8, 8, 48, 4096, &timing[6], 1 }, { "8GiB 8-bit", 0x882c, 0x4b04, 256, 8192, 8, 8, 48, 4096, &timing[6], 1 }, +{ "8GiB 8-bit", 0xdead, 0xda94, 256, 8192, 8, 8, 80, 4096, &timing[6], 1 }, +}; + +static const unsigned char g_byte_zero_bits[256] = { + 8, 7, 7, 6, 7, 6, 6, 5, 7, 6, 6, 5, 6, 5, 5, 4, + 7, 6, 6, 5, 6, 5, 5, 4, 6, 5, 5, 4, 5, 4, 4, 3, + 7, 6, 6, 5, 6, 5, 5, 4, 6, 5, 5, 4, 5, 4, 4, 3, + 6, 5, 5, 4, 5, 4, 4, 3, 5, 4, 4, 3, 4, 3, 3, 2, + 7, 6, 6, 5, 6, 5, 5, 4, 6, 5, 5, 4, 5, 4, 4, 3, + 6, 5, 5, 4, 5, 4, 4, 3, 5, 4, 4, 3, 4, 3, 3, 2, + 6, 5, 5, 4, 5, 4, 4, 3, 5, 4, 4, 3, 4, 3, 3, 2, + 5, 4, 4, 3, 4, 3, 3, 2, 4, 3, 3, 2, 3, 2, 2, 1, + 7, 6, 6, 5, 6, 5, 5, 4, 6, 5, 5, 4, 5, 4, 4, 3, + 6, 5, 5, 4, 5, 4, 4, 3, 5, 4, 4, 3, 4, 3, 3, 2, + 6, 5, 5, 4, 5, 4, 4, 3, 5, 4, 4, 3, 4, 3, 3, 2, + 5, 4, 4, 3, 4, 3, 3, 2, 4, 3, 3, 2, 3, 2, 2, 1, + 6, 5, 5, 4, 5, 4, 4, 3, 5, 4, 4, 3, 4, 3, 3, 2, + 5, 4, 4, 3, 4, 3, 3, 2, 4, 3, 3, 2, 3, 2, 2, 1, + 5, 4, 4, 3, 4, 3, 3, 2, 4, 3, 3, 2, 3, 2, 2, 1, + 4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0 }; /* Define a default flash type setting serve as flash detecting only */ @@ -530,6 +204,96 @@ const char *mtd_names[] = {"mv_nand", "mv_nand", NULL}; #define NDTR1_tWHR(c) (min((c), 15) << 4) #define NDTR1_tAR(c) (min((c), 15) << 0) +static struct class *nand_class; +static int nand_create_device(struct pxa3xx_nand *nand); +int parse_mtd_partitions(struct mtd_info *master, const char **types, + struct mtd_partition **pparts, + struct mtd_part_parser_data *data); + + + +#define PXA3XX_NAND_DMA_DEBUG 1 +#if (PXA3XX_NAND_DMA_DEBUG == 1) +#define TEST_NUM 100 +static void pxa3xx_nand_dump_registers(struct pxa3xx_nand_info *info); +static void pxa3xx_nand_start(struct pxa3xx_nand_info *info); +void pb_init(struct pxa3xx_nand *nand); + +static struct pxa3xx_dma_debug_info { + unsigned int cmd; + int page_addr; + int planes; + unsigned int buff; + unsigned int mode; + unsigned int step; + ktime_t exec_time; + ktime_t finish_time; +} nand_debug_info[TEST_NUM]; +static int current_num = 0; + +#define loop_watcher(loop, limit) \ +{ \ + loop++; \ + if ( loop > limit ) { \ + printk("%s time out, retrying !!!!!!\n", __FUNCTION__); \ + debug_info_print(nand); \ + return -1; \ + } \ +} + +static void debug_push_info(struct mtd_info *mtd, unsigned command, + int page_addr) +{ + struct pxa3xx_nand_info *info = mtd->priv; + struct pxa3xx_nand *nand = info->nand_data; + unsigned int num; + + current_num++; + if (current_num == TEST_NUM) { + current_num = 0; + } + + num = current_num; + memset(&nand_debug_info[num], 0, sizeof(nand_debug_info[num])); + nand_debug_info[num].cmd = command; + nand_debug_info[num].page_addr = page_addr; + nand_debug_info[num].planes = info->n_planes; + nand_debug_info[num].mode = info->eslc_mode; + nand_debug_info[num].exec_time = ktime_get(); + if (command == NAND_CMD_RNDOUT) { + nand_debug_info[num].buff = (int)nand->data_buff; + } else if (command == NAND_CMD_PAGEPROG) { + nand_debug_info[num].buff = (int)nand->data_buff_phys; + } else { + nand_debug_info[num].buff = (int)NULL; + } + +} + +static void debug_info_print(struct pxa3xx_nand *nand) +{ + int i, num = current_num; + int time_ent, time_ext; + + pxa3xx_nand_dump_registers(nand->info[nand->chip_select]); + for (i = 0; i < TEST_NUM; i++) { + time_ent = (unsigned long) ktime_to_ns(nand_debug_info[num].exec_time) >> 10; + time_ext = (unsigned long) ktime_to_ns(nand_debug_info[num].finish_time) >> 10; + printk("Num[%02d] CMD[%04x] page_addr[%08x] planes[%d] mode [%d] buff[%08x] " + "ent[%08x] ext[%08x]\n", + num, nand_debug_info[num].cmd, nand_debug_info[num].page_addr, + nand_debug_info[num].planes, nand_debug_info[num].mode, nand_debug_info[num].buff, + time_ent, time_ext); + + if (num == 0) + num = TEST_NUM -1; + else + num--; + } +} + +#endif //(PXA3XX_NAND_DMA_DEBUG == 1) + #ifdef CONFIG_BERLIN_NAND_RANDOMIZER #include "nand_randomizer.h" @@ -537,9 +301,6 @@ const char *mtd_names[] = {"mv_nand", "mv_nand", NULL}; #define NAND_ID_SIZE (4) /* 4 is a hack. we need to fix it. * most of the chip should be 6 */ -int parse_mtd_partitions(struct mtd_info *master, const char **types, - struct mtd_partition **pparts, - struct mtd_part_parser_data *data); static void nand_read_chip_id(struct mtd_info *mtd, unsigned char *id_data, int id_len) { @@ -565,7 +326,7 @@ static void nand_randomizer_init_by_chip(struct mtd_info *mtd, int chip) unsigned char id_data[NAND_ID_SIZE]; int randomized; - if ((chip < 0) || (mtd == pre_mtd && chip == pre_chip)) + if ((chip < 0) || (/*mtd == pre_mtd &&*/ chip == pre_chip)) return; pre_mtd = mtd; @@ -683,6 +444,11 @@ static void pxa3xx_nand_dump_registers(struct pxa3xx_nand_info *info) printk(KERN_INFO "NDCR = %08X\n", nand_readl(nand, NDCR)); printk(KERN_INFO "NDECCCTRL = %08X\n", nand_readl(nand, NDECCCTRL)); printk(KERN_INFO "NDSR = %08X\n", nand_readl(nand, NDSR)); + printk(KERN_INFO "NDCB = %08x %08x %08x %08x\n", + nand_readl(nand, NDCB0), + nand_readl(nand, NDCB1), + nand_readl(nand, NDCB2), + nand_readl(nand, NDCB3)); printk(KERN_INFO "================================\n"); } @@ -861,8 +627,16 @@ static irqreturn_t mv88dexx_nand_dma_intr(int irq, void *devid) status = nand_readl(nand, NDSR); if (status & NDSR_DBERR) nand->retcode = ERR_DBERR; - if (status & NDSR_SBERR) + if (status & NDSR_SBERR) { nand->retcode = ERR_SBERR; + nand->bad_count = (status>>16)&0xff; + } + if (status & NDSR_CS0_BBD) { + nand->retcode = ERR_BBERR; + printk(KERN_INFO "BBERR: status %x, page %x, cmd %x\n", + status, nand->page_addr, nand->command); + } + nand_writel(nand, NDSR, status); complete(&nand->cmd_complete); @@ -870,67 +644,67 @@ static irqreturn_t mv88dexx_nand_dma_intr(int irq, void *devid) return IRQ_HANDLED; } -static inline int is_buf_blank(uint8_t *buf, size_t len) +static int is_trunk_blank(int ecc, uint8_t *data_buf, uint8_t *oob_buf, + size_t data_len, size_t oob_len) { - for (; len > 0; len--) - if (*buf++ != 0xff) + int i, zero_bits_num = 0; + + for (i = 0, zero_bits_num = 0; i < data_len; i++) { + zero_bits_num += g_byte_zero_bits[data_buf[i]]; + if (zero_bits_num >= ecc) { + printk(KERN_DEBUG "[%s], data %d %d\n", __func__, + zero_bits_num, i); return 0; + } + } + + if (oob_buf) { + for (i = 0; i < oob_len; i++) { + zero_bits_num += g_byte_zero_bits[oob_buf[i]]; + if (zero_bits_num >= ecc) { + printk(KERN_DEBUG "[%s], oob %d %d\n", __func__, + zero_bits_num, i); + return 0; + } + } + } return 1; } -static int is_read_datbuf_blank(int ecc, int pagesize, - uint8_t *buf, size_t len) +static inline int is_read_page_blank(int ecc, uint8_t *data_buf, + uint8_t *oob_buf, size_t data_len, size_t oob_len, int plane_num) { - int i = 0; + int plane, i, chunks, len; - for (; len > 0; len--, i++, buf++) { - if (*buf != 0xff) { - switch (ecc) { - case 48: - /* Bellow position will not be 0xff: - * - * Last Chunk: 0x7CD - * Not Last Chunk: 0x7C8 - * - * Should cover 2kB-8kB, and 16kB for dual-plane. - * For dual-plane, data layout is as bellow: - * [chunk00]...[chunk03][oob0][chunk10]...[chunk13][oob1] - * | page 0 || page 1 | - * - * page0's [oob0] is same as page1's [oob1]. - * - * So, for 8kB page, 0x1FC8 won't be covered. - */ - if (i == 0x7C8 || i == 0xFC8 || i == 0x17C8 - || i == 0x1FC8 || i == 0x27C8 - || i == 0x2FC8 || i == 0x37C8 - || i == 0x7CD || i == 0xFCD - || i == 0x1FCD || i == 0x3FCD) { - *buf = 0xff; - continue; - } - break; - case 80: - /* Bellow position will not be 0xff: - * - * Last Chunk: 0x744; - * Not Last Chunk: none; - * - * Should cover 2kB-8kB, and 16kB for dual-plane - */ - if (i == 0x744 || i == 0xF44 - || i == 0x1F44 || i == 0x3F44) { - *buf = 0xff; - continue; - } - break; + if (plane_num == 2) { + data_len >>= 1; + oob_len >>= 1; + } else { + plane_num = 1; + } + chunks = data_len / PAGE_CHUNK_SIZE; + + for (plane = 0; plane < plane_num; plane++) { + for (i = 0, len = data_len; i < chunks-1; i++) { + if (!is_trunk_blank(ecc, data_buf, NULL, + PAGE_CHUNK_SIZE, 0)) { + printk(KERN_INFO "[%s], planes [%d of %d], chunk %d\n", + __func__, plane, plane_num, i); + return 0; } - printk(KERN_DEBUG "[%s] offset %08x: %02X\n", __func__, i, *buf); + data_buf += PAGE_CHUNK_SIZE; + len -= PAGE_CHUNK_SIZE; + } + + if (!is_trunk_blank(ecc, data_buf, oob_buf + plane*oob_len, + len, oob_len)) { + printk(KERN_INFO "[%s], planes [%d of %d], chunk %d\n", + __func__, plane, plane_num, chunks-1); return 0; } + data_buf += len; } - return 1; } @@ -1001,6 +775,7 @@ static int prepare_command_pool(struct pxa3xx_nand_info *info, int command, break; case NAND_CMD_RNDOUT: + nand->page_addr = page_addr; cmd = info->cmdset->read1; if (command == NAND_CMD_READOOB) nand->buf_start = mtd->writesize + column; @@ -1055,7 +830,6 @@ static int prepare_command_pool(struct pxa3xx_nand_info *info, int command, if (unlikely(info->page_size < PAGE_CHUNK_SIZE) || !(pdata->controller_attrs & PXA3XX_NAKED_CMD_EN)) { nand->ndcb0[0] |= NDCB0_CMD_TYPE(0x1) - | NDCB0_AUTO_RS | NDCB0_ST_ROW_EN | NDCB0_DBC | cmd @@ -1067,14 +841,12 @@ static int prepare_command_pool(struct pxa3xx_nand_info *info, int command, nand->ndcb0[0] |= NDCB0_CMD_XTYPE(0x4) | NDCB0_CMD_TYPE(0x1) | NDCB0_NC - | NDCB0_AUTO_RS | (cmd & NDCB0_CMD1_MASK) | addr_cycle; for (i = 1; i < chunks; i ++) nand->ndcb0[i] |= NDCB0_CMD_XTYPE(0x5) | NDCB0_NC - | NDCB0_AUTO_RS | (cmd & NDCB0_CMD1_MASK) | NDCB0_CMD_TYPE(0x1); @@ -1335,7 +1107,7 @@ static void pxa3xx_nand_run_state_machine(struct pxa3xx_nand_info *info) * dma related functions *******************************/ -static inline void init_cmd_3(struct pxa3xx_nand *nand, struct cmd_3_desc *cmd) +void init_cmd_3(struct pxa3xx_nand *nand, struct cmd_3_desc *cmd) { SIE_BCMCFGW *cfgw = (SIE_BCMCFGW *)cmd; @@ -1351,7 +1123,7 @@ static inline void init_cmd_3(struct pxa3xx_nand *nand, struct cmd_3_desc *cmd) cfgw->u_devAdr = pb_get_phys_offset(nand, NDCB0); cfgw->u_hdr = BCMINSFMT_hdr_CFGW; } -static inline void init_cmd_4(struct pxa3xx_nand *nand, struct cmd_4_desc *cmd) +void init_cmd_4(struct pxa3xx_nand *nand, struct cmd_4_desc *cmd) { SIE_BCMCFGW *cfgw = (SIE_BCMCFGW *)cmd; @@ -1371,7 +1143,7 @@ static inline void init_cmd_4(struct pxa3xx_nand *nand, struct cmd_4_desc *cmd) cfgw->u_devAdr = pb_get_phys_offset(nand, NDCB0); cfgw->u_hdr = BCMINSFMT_hdr_CFGW; } -static inline void init_wcmd(struct pxa3xx_nand *nand, SIE_BCMWCMD *wcmd) +void init_wcmd(struct pxa3xx_nand *nand, SIE_BCMWCMD *wcmd) { wcmd->u_ddrAdr = 0; wcmd->u_size = 8; @@ -1379,7 +1151,7 @@ static inline void init_wcmd(struct pxa3xx_nand *nand, SIE_BCMWCMD *wcmd) wcmd->u_updSemId = 0; wcmd->u_hdr = BCMINSFMT_hdr_WCMD; } -static inline void init_wdat(struct pxa3xx_nand *nand, SIE_BCMWDAT *wdat) +void init_wdat(struct pxa3xx_nand *nand, SIE_BCMWDAT *wdat) { wdat->u_size = 8; wdat->u_mode = 2; @@ -1389,7 +1161,7 @@ static inline void init_wdat(struct pxa3xx_nand *nand, SIE_BCMWDAT *wdat) wdat->u_devAdr = pb_get_phys_offset(nand, NDDB); wdat->u_hdr = BCMINSFMT_hdr_WDAT; } -static inline void init_rcmd(struct pxa3xx_nand *nand, SIE_BCMRCMD *rcmd) +void init_rcmd(struct pxa3xx_nand *nand, SIE_BCMRCMD *rcmd) { rcmd->u_ddrAdr = 0; rcmd->u_size = 0; @@ -1398,7 +1170,7 @@ static inline void init_rcmd(struct pxa3xx_nand *nand, SIE_BCMRCMD *rcmd) rcmd->u_rsvd = 0; rcmd->u_hdr = BCMINSFMT_hdr_RCMD; } -static inline void init_rdat(struct pxa3xx_nand *nand, SIE_BCMRDAT *rdat) +void init_rdat(struct pxa3xx_nand *nand, SIE_BCMRDAT *rdat) { rdat->u_size = 0; rdat->u_mode = 2; @@ -1410,7 +1182,7 @@ static inline void init_rdat(struct pxa3xx_nand *nand, SIE_BCMRDAT *rdat) rdat->u_devAdr = pb_get_phys_offset(nand, NDDB); rdat->u_hdr = BCMINSFMT_hdr_RDAT; } -static inline void init_sema_nfccmd(struct pxa3xx_nand *nand, +void init_sema_nfccmd(struct pxa3xx_nand *nand, SIE_BCMSEMA *sema) { sema->u_pUpdId = 0; @@ -1419,7 +1191,7 @@ static inline void init_sema_nfccmd(struct pxa3xx_nand *nand, sema->u_cChkId = PBSemaMap_dHubSemID_dHub_NFCCmd; sema->u_hdr = BCMINSFMT_hdr_SEMA; } -static inline void init_sema_nfcdat(struct pxa3xx_nand *nand, +void init_sema_nfcdat(struct pxa3xx_nand *nand, SIE_BCMSEMA *sema) { sema->u_pUpdId = 0; @@ -1429,14 +1201,25 @@ static inline void init_sema_nfcdat(struct pxa3xx_nand *nand, sema->u_hdr = BCMINSFMT_hdr_SEMA; } -static inline void wait_dhub_ready(struct pxa3xx_nand *nand) +void wait_dhub_ready(struct pxa3xx_nand *nand) { uint32_t read; - + int timeout = 300000; /* check if NFC_DEV_CTL_CHANNEL_ID bit FULL */ do { read = pb_readl(nand, RA_pBridge_dHub + RA_dHubReg2D_dHub + RA_dHubReg_SemaHub+ RA_SemaHub_full); + timeout--; + if(!timeout) { + pxa3xx_nand_dump_registers(nand->info[nand->chip_select]); + printk("wait_dhub_ready time out %x\n", read); + + dump_stack(); +#if (PXA3XX_NAND_DMA_DEBUG == 1) + debug_info_print(nand); +#endif + timeout = 0xffffffff; + } } while (!(read & (1 << NFC_DEV_CTL_CHANNEL_ID))); /* pop NFC_DEV_CTL_CHANNEL_ID semaphore */ @@ -1465,7 +1248,6 @@ static void mv88dexx_nand_dma_reset(struct pxa3xx_nand_info *info) NDCB0_CMD_TYPE(NDCB0_CMD_RESET) | (info->cmdset->reset & NDCB0_CMD1_MASK); i += sizeof(struct cmd_3_desc); - wmb(); dhub_channel_write_cmd( &nand->PB_dhubHandle, /* Handle to HDL_dhub */ @@ -1666,7 +1448,7 @@ static void mv88dexx_nand_dma_readid(struct pxa3xx_nand_info *info) wait_dhub_ready(nand); } -static void mv88dexx_nand_dma_start(struct pxa3xx_nand_info *info, int rw) +void mv88dexx_nand_dma_start(struct pxa3xx_nand_info *info, int rw) { unsigned int i = 0; SIE_BCMCFGW *cfgw; @@ -2067,7 +1849,6 @@ static void mv88dexx_nand_dma_init_write_desc(struct pxa3xx_nand_info *info) cfgw = (SIE_BCMCFGW *)&(desc2->cmd2); cfgw->u_dat = NDCB0_CMD_XTYPE(NDCB0_CMDX_FINAL_CMD) | ndcb0_cs | - NDCB0_AUTO_RS | NDCB0_NC | NDCB0_DBC | NDCB0_CMD_TYPE(NDCB0_CMD_PROGRAM) | @@ -2309,7 +2090,6 @@ static void mv88dexx_nand_dma_dp_erase(struct pxa3xx_nand_info *info) cfgw->u_dat = ndcb0_cs | NDCB0_CMD_TYPE(NDCB0_CMD_ERASE) | addr_cycle - | NDCB0_AUTO_RS | NDCB0_NC | ((cmd & 0xff0000) >> 16); i += sizeof(struct cmd_3_desc); @@ -2450,7 +2230,6 @@ static void mv88dexx_nand_dma_init_dp_write_desc(struct pxa3xx_nand_info *info) init_cmd_4(nand, cmd_4); cmd_4->cfgw_ndcb0[0].u_dat = NDCB0_LEN_OVRD | NDCB0_CMD_XTYPE(NDCB0_CMDX_NWRITE) | - NDCB0_AUTO_RS | ndcb0_cs | NDCB0_CMD_TYPE(NDCB0_CMD_PROGRAM) | NDCB0_NC | @@ -2489,7 +2268,6 @@ static void mv88dexx_nand_dma_init_dp_write_desc(struct pxa3xx_nand_info *info) init_cmd_3(nand, cmd_3); cmd_3->cfgw_ndcb0[0].u_dat = ndcb0_cs | NDCB0_CMD_XTYPE(NDCB0_CMDX_FINAL_CMD) | - NDCB0_AUTO_RS | NDCB0_CMD_TYPE(NDCB0_CMD_PROGRAM) | NDCB0_NC | NDCB0_DBC | @@ -2541,7 +2319,6 @@ static void mv88dexx_nand_dma_init_dp_write_desc(struct pxa3xx_nand_info *info) init_cmd_4(nand, cmd_4); cmd_4->cfgw_ndcb0[0].u_dat = NDCB0_LEN_OVRD | NDCB0_CMD_XTYPE(NDCB0_CMDX_NWRITE) | - NDCB0_AUTO_RS | ndcb0_cs | NDCB0_CMD_TYPE(NDCB0_CMD_PROGRAM) | NDCB0_NC | @@ -2580,7 +2357,6 @@ static void mv88dexx_nand_dma_init_dp_write_desc(struct pxa3xx_nand_info *info) init_cmd_3(nand, cmd_3); cmd_3->cfgw_ndcb0[0].u_dat = ndcb0_cs | NDCB0_CMD_XTYPE(NDCB0_CMDX_FINAL_CMD) | - NDCB0_AUTO_RS | NDCB0_NC | NDCB0_DBC | NDCB0_CMD_TYPE(NDCB0_CMD_PROGRAM) | @@ -2802,6 +2578,7 @@ static void pxa3xx_nand_dma_cmdfunc(struct pxa3xx_nand_info *info, mv88dexx_nand_dma_dp_erase(info); else mv88dexx_nand_dma_erase(info); + nand->nand_sts.block_erased++; break; case NAND_CMD_RNDOUT: if (info->n_planes == 2) { @@ -2897,10 +2674,9 @@ static void pxa3xx_nand_dma_cmdfunc(struct pxa3xx_nand_info *info, } } if (!ret) { - printk(KERN_ERR "%s pid %d cmd 0x%02x stop NFC\n", - __func__, current->pid, nand->command); - /* Stop State Machine for next command cycle */ - pxa3xx_nand_stop(nand); + printk(KERN_ERR "BLOCK NAND DRVIER, page [%x]\n", nand->page_addr); + pxa3xx_nand_dump_registers(info); + wait_for_completion(&nand->cmd_complete); } finish: @@ -2914,6 +2690,10 @@ static void pxa3xx_nand_cmdfunc(struct mtd_info *mtd, unsigned command, struct pxa3xx_nand *nand = info->nand_data; int exec_cmd; +#if (PXA3XX_NAND_DMA_DEBUG == 1) + debug_push_info(mtd, command, page_addr); +#endif + /* * if this is a x16 device ,then convert the input * "byte" address into a "word" address appropriate @@ -2933,6 +2713,17 @@ static void pxa3xx_nand_cmdfunc(struct mtd_info *mtd, unsigned command, nand_writel(nand, NDTR1CS0, info->ndtr1cs0); } + if (info->eslc_mode && nand->p_slc) { + struct pxa3xx_nand_slc *slc = nand->p_slc; + if(info->eslc_mode == 2) { + page_addr = slc->slc_start(slc->priv, + command, page_addr); + } else { + page_addr = slc->eslc_start(slc->priv, + command, page_addr); + } + } + nand->state = STATE_PREPARED; exec_cmd = prepare_command_pool(info, command, column, page_addr); if (exec_cmd) { @@ -2944,6 +2735,14 @@ static void pxa3xx_nand_cmdfunc(struct mtd_info *mtd, unsigned command, } } + if (info->eslc_mode && nand->p_slc) { + struct pxa3xx_nand_slc *slc = nand->p_slc; + if(info->eslc_mode == 2) { + slc->slc_stop(slc->priv, command); + } else { + slc->eslc_stop(slc->priv, command); + } + } nand->state = STATE_IDLE; } @@ -2958,13 +2757,6 @@ static int pxa3xx_nand_write_page_hwecc(struct mtd_info *mtd, int randomized = 0; int pages_per_blk = 1 << (info->erase_shift - info->page_shift); - if (is_buf_blank((uint8_t *)buf, mtd->writesize) && - is_buf_blank(oob, mtd->oobsize)) { - nand->command = NAND_CMD_NONE; - printk("[%s,%d]\n", __func__, __LINE__); - return 0; - } - if (info->n_planes == 2) { int page_addr = dp_page_addr_to_sp(info, nand->page_addr); @@ -3066,6 +2858,7 @@ static int pxa3xx_nand_write_page_hwecc(struct mtd_info *mtd, skip_map: nand->data_buff = (unsigned char *)buf; nand->oob_buff = oob; + nand->nand_sts.page_written++; return 0; } #else @@ -3077,12 +2870,6 @@ static int pxa3xx_nand_write_page_hwecc(struct mtd_info *mtd, dma_addr_t mapped_addr = 0; uint8_t *oob = chip->oob_poi; - if (is_buf_blank((uint8_t *)buf, mtd->writesize) && - is_buf_blank(oob, mtd->oobsize)) { - nand->command = NAND_CMD_NONE; - return 0; - } - if (use_dma) { mapped_addr = map_addr(nand, (void *)buf, mtd->writesize, DMA_TO_DEVICE); @@ -3106,11 +2893,12 @@ static int pxa3xx_nand_write_page_hwecc(struct mtd_info *mtd, nand->data_buff = (unsigned char *)buf; nand->oob_buff = oob; + nand->nand_sts.page_written++; return 0; } #endif /* CONFIG_BERLIN_NAND_RANDOMIZER */ -static int pxa3xx_read_page(struct mtd_info *mtd, uint8_t *buf, int page) +int pxa3xx_read_page(struct mtd_info *mtd, uint8_t *buf, int page) { struct pxa3xx_nand_info *info = mtd->priv; struct nand_chip *chip = mtd->priv; @@ -3120,6 +2908,12 @@ static int pxa3xx_read_page(struct mtd_info *mtd, uint8_t *buf, int page) int need_copy_back = 0; int buf_blank = 0; +#ifdef CONFIG_BERLIN_NAND_READ_RETRY + struct pxa3xx_nand_read_retry *retry = nand->retry; + int retry_c = 0; + +read_retry: +#endif if (use_dma) { again: if (buf) { @@ -3131,9 +2925,11 @@ static int pxa3xx_read_page(struct mtd_info *mtd, uint8_t *buf, int page) __func__); return -ENOMEM; } - // TODO(ghines): bounce buffer message removed, - // driver should be fixed so this never - // happens. + printk(KERN_DEBUG "[%s,%d] nand page %08X " + "direct map buf %p error, " + "try bounce buffer\n", + __func__, __LINE__, + nand->page_addr, buf); buf = nand->bounce_buffer; need_copy_back = 1; goto again; @@ -3155,16 +2951,25 @@ static int pxa3xx_read_page(struct mtd_info *mtd, uint8_t *buf, int page) if (nand->use_mapped_buf) unmap_addr(&nand->pdev->dev, mapped_addr, buf, mtd->writesize, DMA_FROM_DEVICE); - - if (nand->retcode == ERR_SBERR) { + if (nand->retcode == ERR_NONE) + nand->nand_sts.page_count_err_0++; + else if (nand->retcode == ERR_SBERR) { switch (nand->ecc_strength) { default: - if (nand->bad_count > BCH_THRESHOLD) - mtd->ecc_stats.corrected += - (nand->bad_count - BCH_THRESHOLD); + mtd->ecc_stats.corrected += nand->bad_count; + nand->nand_sts.corrected_err_bits += nand->bad_count; + if (nand->bad_count == 1) + nand->nand_sts.page_count_err_1++; + else if (nand->bad_count < nand->nand_sts.err_l1) { + nand->nand_sts.page_count_err_l1++; + } else if (nand->bad_count < nand->nand_sts.err_l2){ + nand->nand_sts.page_count_err_l2++; + } else { + nand->nand_sts.page_count_err_l3++; + } break; case HAMMING_STRENGTH: - mtd->ecc_stats.corrected ++; + mtd->ecc_stats.corrected++; case 0: break; } @@ -3174,21 +2979,57 @@ static int pxa3xx_read_page(struct mtd_info *mtd, uint8_t *buf, int page) * 0, which is different from the ECC information within * OOB, ignore such double bit errors */ - if (is_read_datbuf_blank(nand->ecc_strength, mtd->writesize, - nand->data_buff, mtd->writesize)) { + int oob_len; + oob_len = info->n_planes == 2 ? 64 : 32; + if (is_read_page_blank(nand->ecc_strength, nand->data_buff, + nand->oob_buff, mtd->writesize, oob_len, info->n_planes)) { nand->retcode = ERR_NONE; + memset(nand->data_buff, 0xff, mtd->writesize); + memset(nand->oob_buff, 0xff, oob_len); buf_blank = 1; + nand->nand_sts.page_count_blank++; } - else + else { +#ifdef CONFIG_BERLIN_NAND_READ_RETRY + if (retry->rr_table_ready == 1) { + retry_c++; + if (retry_c <= retry->rr_cycles) { + retry->rr_current_cycle++; + retry->rr_current_cycle %= retry->rr_cycles; + printk(KERN_DEBUG "page %x rd error, retrying %d/%d\n", + page, retry->rr_current_cycle, retry->rr_cycles); + retry->set_rr(nand, retry->rr_current_cycle); + buf = orig_buf; + need_copy_back = buf_blank = mapped_addr = 0; + pxa3xx_nand_cmdfunc(mtd, NAND_CMD_READ0, 0x00, page); + goto read_retry; + } + } +#endif + if (nand->bad_count >= nand->nand_sts.err_l2) + nand->nand_sts.page_count_err_l3++; mtd->ecc_stats.failed++; + nand->nand_sts.uncorrect_page_cnt++; + nand->nand_sts.uncerr_pn_rec[nand->nand_sts.rec_idx] = page; + nand->nand_sts.rec_idx++; + if (nand->nand_sts.rec_idx > UNCERR_REC_DEPTH) + nand->nand_sts.rec_idx = 0; + printk(KERN_ERR "uncorrectable ECC error @ page 0x%x\n", page); + } } +#ifdef CONFIG_BERLIN_NAND_READ_RETRY + if (retry_c) + printk(KERN_INFO "read %s with %d retry @ page %x\n", + retry_c > retry->rr_cycles ? "failed" : "done", + retry_c > retry->rr_cycles ? (retry_c - 1) : retry_c, page); +#endif #ifdef CONFIG_BERLIN_NAND_RANDOMIZER if (buf_blank) goto skip_derandomize; if (info->n_planes == 2) { int pages_per_blk = 1 << (info->erase_shift - info->page_shift); - page = dp_page_addr_to_sp(info, page);; + page = dp_page_addr_to_sp(info, page); nand_read_page_post_process(mtd, page, nand->data_buff, nand->oob_buff, nand->data_buff, nand->oob_buff); @@ -3198,7 +3039,7 @@ static int pxa3xx_read_page(struct mtd_info *mtd, uint8_t *buf, int page) nand->data_buff + info->page_size, nand->oob_buff + 32); } else { - nand_read_page_post_process(mtd, page, nand->data_buff, + nand_read_page_post_process(mtd, nand->page_addr, nand->data_buff, nand->oob_buff, nand->data_buff, nand->oob_buff); } skip_derandomize: @@ -3216,9 +3057,83 @@ static int pxa3xx_read_page(struct mtd_info *mtd, uint8_t *buf, int page) if (need_copy_back) memcpy(orig_buf, nand->data_buff, mtd->writesize); + nand->nand_sts.page_read++; + return 0; +} + +static void free_dummy_rd_buf(struct pxa3xx_nand *nand) +{ + + if (nand->drd_buf != NULL) { + unmap_addr(&nand->pdev->dev, nand->drd_dma_addr, + nand->drd_buf, NAND_MAX_PAGESIZE*2, + DMA_FROM_DEVICE); + kfree(nand->drd_buf); + nand->drd_buf = NULL; + nand->drd_dma_addr = (dma_addr_t)0; + } +} + +static int alloc_dummy_rd_buf(struct pxa3xx_nand *nand) +{ + if (nand->drd_buf == NULL) { + nand->drd_buf = kmalloc(NAND_MAX_PAGESIZE*2, + GFP_KERNEL); + if (nand->drd_buf == NULL) { + printk(KERN_ERR "dummy read malloc failed !!!\n"); + return -ENOMEM; + } + nand->drd_dma_addr = map_addr(nand, + (void *)nand->drd_buf, + NAND_MAX_PAGESIZE*2, DMA_FROM_DEVICE); + if (dma_mapping_error(&nand->pdev->dev, nand->drd_dma_addr)) { + printk(KERN_ERR "%s: can't map DMA buffer\n", + __func__); + kfree(nand->drd_buf); + nand->drd_dma_addr = (dma_addr_t)0; + nand->drd_buf = NULL; + return -ENOMEM; + } + printk(KERN_INFO "dummy read map done!!! \n"); + } return 0; } +int pxa3xx_dummy_read(struct mtd_info *mtd, int page) +{ + struct pxa3xx_nand_info *info = mtd->priv; + struct pxa3xx_nand *nand = info->nand_data; + int ret; + + pxa3xx_nand_cmdfunc(mtd, NAND_CMD_READ0, 0x00, page); + + if(nand->drd_buf == NULL){ + if (alloc_dummy_rd_buf(nand) != 0) { + return -ENOMEM; + } + } + +#if (PXA3XX_NAND_DMA_DEBUG == 1) + debug_push_info(mtd, NAND_CMD_READ0 | 0x200, page); +#endif + udelay(10); + mv88dexx_nand_dma_start(info, 1); + + init_completion(&nand->cmd_complete); + + mv88dexx_nand_dma_fill_read_desc(info, page, + nand->drd_dma_addr, + nand->drd_dma_addr + NAND_MAX_PAGESIZE); + mv88dexx_nand_dma_read_go(nand); + ret = wait_for_completion_timeout(&nand->cmd_complete, + CHIP_DELAY_TIMEOUT); + if (!ret) { + printk(KERN_ERR "pxa3xx_dummy_read time out!!!\n"); + } + + return ret; +} + static int pxa3xx_nand_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip, uint8_t *buf, int oob_required, int page) { @@ -3233,6 +3148,17 @@ static int pxa3xx_nand_read_oob(struct mtd_info *mtd, struct nand_chip *chip, return 0; } +int pxa3xx_nand_intern_read(struct pxa3xx_nand *nand, uint8_t *buf, int page) +{ + int ret; + struct mtd_info *mtd = get_mtd_by_info(nand->info[0]); + + pxa3xx_nand_cmdfunc(mtd, NAND_CMD_READ0, 0x00, page); + ret = pxa3xx_read_page(mtd, buf, page); + + return ret; +} + static uint8_t pxa3xx_nand_read_byte(struct mtd_info *mtd) { struct pxa3xx_nand_info *info = mtd->priv; @@ -3284,7 +3210,7 @@ static int pxa3xx_nand_scan_bbt(struct mtd_info *mtd) { struct pxa3xx_nand_info *info = mtd->priv; - if (info->n_planes == DUAL_PLANE) + if ((info->n_planes == MTD_DUAL_PLANE) || info->eslc_mode) return 0; return nand_default_bbt(mtd); @@ -3309,10 +3235,62 @@ static int pxa3xx_nand_block_markbad(struct mtd_info *mtd_dp, loff_t ofs) return ret; } -static int pxa3xx_nand_get_planes(struct mtd_info *mtd) +static int pxa3xx_nand_slc_markbad(struct mtd_info *mtd_src, loff_t ofs) +{ + struct nand_chip *chip; + //struct pxa3xx_nand_info *src_info = mtd_src->priv; + struct mtd_info *mtd_mlc; + struct pxa3xx_nand_info *slc_info = mtd_src->priv; + struct pxa3xx_nand *nand = slc_info->nand_data; + int ret = 0; + + mtd_mlc = get_mtd_by_info(nand->info[slc_info->chip_select]); + chip = mtd_mlc->priv; + if (slc_info->eslc_mode == 1) { + loff_t dst; + dst = nand->p_slc->eslc_get_phy_off( + nand->p_slc->priv, ofs); + + printk("eslc markbad %llx -> %llx", ofs, dst); + ofs = dst; + } else if (slc_info->eslc_mode == 2) { + loff_t dst; + dst = nand->p_slc->slc_get_phy_off( + nand->p_slc->priv, ofs); + printk("slc markbad %llx -> %llx", ofs, dst); + ofs = dst; + } else { + return -EINVAL; + } + + if (chip->block_markbad) { + ret = chip->block_markbad(mtd_mlc, ofs); + } + return ret; +} + +static int pxa3xx_nand_get_mtd_info(struct mtd_info *mtd, loff_t off, loff_t *dst) { struct pxa3xx_nand_info *info = mtd->priv; - return info->n_planes; + + *dst = off; + if (info->eslc_mode == 1) { + struct pxa3xx_nand *nand = info->nand_data; + if (nand->p_slc) { + *dst = nand->p_slc->eslc_get_phy_off( + nand->p_slc->priv, off); + } + return MTD_ESLC; + } else if (info->eslc_mode == 2) { + struct pxa3xx_nand *nand = info->nand_data; + if (nand->p_slc) { + *dst = nand->p_slc->slc_get_phy_off( + nand->p_slc->priv, off); + } + return MTD_SLC; + } else { + return info->n_planes; + } } static void pxa3xx_nand_select_chip(struct mtd_info *mtd, int chip) @@ -3549,6 +3527,7 @@ static int pxa3xx_nand_config_flash(struct pxa3xx_nand_info *info, info->has_dual_plane = 0; } info->n_planes = 1; /* use single plane by default */ + info->eslc_mode = 0; /* calculate addressing information */ info->col_addr_cycles = (f->page_size >= 2048) ? 2 : 1; @@ -3650,6 +3629,9 @@ static int pxa3xx_nand_scan(struct mtd_info *mtd, int type_plane) uint16_t* id; uint64_t chipsize; int i, ret, num; +#ifdef CONFIG_BERLIN_NAND_READ_RETRY + struct pxa3xx_nand_read_retry *retry = nand->retry; +#endif nand->chip_select = info->chip_select; @@ -3669,6 +3651,7 @@ static int pxa3xx_nand_scan(struct mtd_info *mtd, int type_plane) if (id[0] != 0) printk(KERN_INFO "Detect a flash id %x, ext id %x\n", id[0], id[1]); else { + printk(KERN_INFO "NAND_CMD_READID failed, id %x, ext id %x\n", id[0], id[1]); pxa3xx_nand_dump_registers(info); free_cs_resource(info, nand->chip_select); return -EINVAL; @@ -3705,11 +3688,25 @@ static int pxa3xx_nand_scan(struct mtd_info *mtd, int type_plane) chipsize = (uint64_t)f->num_blocks * f->page_per_block * f->page_size; pxa3xx_flash_ids[0].erasesize = f->page_size * f->page_per_block * info->n_planes; + if (type_plane == TYPE_DUAL_PLANE) { info->n_planes = 2; pxa3xx_flash_ids[0].pagesize *= 2; pxa3xx_flash_ids[0].erasesize *= 2; + } else if (type_plane == TYPE_E_SLC) { + mtd->erasesize /= 2; + pxa3xx_flash_ids[0].erasesize /= 2; + info->eslc_mode = 1; + info->erase_shift -= 1; + info->erase_size /= 2; + } else if (type_plane == TYPE_SLC) { + mtd->erasesize /= 2; + pxa3xx_flash_ids[0].erasesize /= 2; + info->eslc_mode = 2; + info->erase_shift -= 1; + info->erase_size /= 2; } + pxa3xx_flash_ids[0].chipsize = chipsize >> 20; if (f->flash_width == 16) pxa3xx_flash_ids[0].options = NAND_BUSWIDTH_16; @@ -3737,8 +3734,15 @@ static int pxa3xx_nand_scan(struct mtd_info *mtd, int type_plane) chip->options = (info->reg_ndcr & NDCR_DWIDTH_M) ? NAND_BUSWIDTH_16 : 0; chip->options |= NAND_OWN_BUFFERS; +#ifdef CONFIG_BERLIN2CD + /*set this flag to skip nand_check_wp(), not needed for internal flash*/ + chip->options |= NAND_BROKEN_XD; +#endif chip->bbt_options = NAND_BBT_USE_FLASH; - //chip->options |= NAND_USE_FLASH_BBT | NAND_USE_FLASH_BBT_WITH_BBM; + + nand->nand_sts.err_l1 = (f->ecc_strength>>2) + 1; + nand->nand_sts.err_l2 = (f->ecc_strength>>1) + 1; + nand->nand_sts.ecc_strength = f->ecc_strength; if ((f->chip_id == 0xd7ec && f->ext_id == 0x7a94) || (f->chip_id == 0xd7ec && f->ext_id == 0x7e94) || @@ -3749,8 +3753,15 @@ static int pxa3xx_nand_scan(struct mtd_info *mtd, int type_plane) (f->chip_id == 0xd7ad && f->ext_id == 0x9a94) || (f->chip_id == 0x482c && f->ext_id == 0x4a04) || (f->chip_id == 0x682c && f->ext_id == 0x4a04) || + (f->chip_id == 0x682c && f->ext_id == 0x4604) || (f->chip_id == 0x882c && f->ext_id == 0x4b04) || - (f->chip_id == 0x682c && f->ext_id == 0x4604)) + (f->chip_id == 0xdead && f->ext_id == 0xda94) || + (f->chip_id == 0xd5ad && f->ext_id == 0xda94) || + (f->chip_id == 0xdac8 && f->ext_id == 0x9590) || + (f->chip_id == 0xdcc8 && f->ext_id == 0x9590) || + (f->chip_id == 0xda98 && f->ext_id == 0x1590) || + (f->chip_id == 0xdc98 && f->ext_id == 0x1591) || + (f->chip_id == 0xdaad && f->ext_id == 0x9590)) chip->ecc.layout = &nand_oob_128; printk("mtd_info: writesize=0x%X, oobsize=0x%X, erasesize=0x%X size=%llX\n", @@ -3762,12 +3773,34 @@ static int pxa3xx_nand_scan(struct mtd_info *mtd, int type_plane) if (use_dma) { if (type_plane == TYPE_DUAL_PLANE) { mv88dexx_nand_dma_init_dp_write_desc(info); - } else { + mv88dexx_nand_dma_init_read_desc(info); + } else if(type_plane == TYPE_SINGLE_PLANE) { mv88dexx_nand_dma_init_write_desc(info); + mv88dexx_nand_dma_init_read_desc(info); } - mv88dexx_nand_dma_init_read_desc(info); } +#ifdef CONFIG_BERLIN_NAND_READ_RETRY + if (type_plane == TYPE_SINGLE_PLANE) { + switch (f->chip_id) { + case 0xdead: + case 0xd5ad: + if (f->ext_id == 0xda94) + retry->rr_type = HYNIX_H27UCG8T_RR_MODE1; + break; + default: + retry->rr_type = NO_READ_RETRY; + } + + if (berlin_nand_rr_init(nand, pxa3xx_flash_ids) != 0) { + printk("RR init failed!!!\n"); + retry->rr_type = NO_READ_RETRY; + } else { + printk("RR init done!!!\n"); + } + } +#endif + /* * This is the second phase of the normal nand_scan() function. It * fills out all the uninitialized function pointers with the defaults @@ -3776,19 +3809,165 @@ static int pxa3xx_nand_scan(struct mtd_info *mtd, int type_plane) return nand_scan_tail(mtd); } -static int pxa3xx_dp_info_fill(struct pxa3xx_nand *nand, - struct mtd_info *mtd_dp, struct mtd_info *mtd_sp, int cs) +static int pxa3xx_info_fill(struct pxa3xx_nand *nand, + struct mtd_info *mtd_dst, struct mtd_info *mtd_src, + int cs, int type) { struct pxa3xx_nand_info *info; int info_size = sizeof(struct mtd_info) + sizeof(struct pxa3xx_nand_info); - memcpy(mtd_dp, mtd_sp, info_size); - info = (struct pxa3xx_nand_info *)(&mtd_dp[1]); + memcpy(mtd_dst, mtd_src, info_size); + info = (struct pxa3xx_nand_info *)(&mtd_dst[1]); info->nand_data = nand; - mtd_dp->priv = info; - nand->info_dp[cs] = info; + mtd_dst->priv = info; + switch (type) { + case TYPE_DUAL_PLANE: + nand->info_dp[cs] = info; + break; + case TYPE_E_SLC: + nand->info_eslc[cs] = info; + break; + case TYPE_SLC: + nand->info_slc[cs] = info; + break; + } + return 0; +} + + + +static ssize_t ecc_sts_show(struct device *pdev, struct device_attribute *attr, + char *buf) +{ + struct pxa3xx_nand *nand = dev_get_drvdata(pdev); + int size; + + size = snprintf(buf, PAGE_SIZE, + "NAND ecc capability: %12d\n" + " Level 1 threshold: %12d\n" + " Level 2 threshold: %12d\n" + "Total corrected bits: %12d\n" + "Error distributions: \n" + " Uncorrected pages: %12d\n" + " 0 err pages: %12d\n" + " 1 err pages: %12d\n" + " [2, %d] err pages: %12d\n" + " [%d, %d] err pages: %12d\n" + " >=%d err pages: %12d\n" + " Blank pages: %12d\n", + nand->nand_sts.ecc_strength, + nand->nand_sts.err_l1, + nand->nand_sts.err_l2, + nand->nand_sts.corrected_err_bits, + nand->nand_sts.uncorrect_page_cnt, + nand->nand_sts.page_count_err_0, + nand->nand_sts.page_count_err_1, + nand->nand_sts.err_l1-1, + nand->nand_sts.page_count_err_l1, + nand->nand_sts.err_l1, + nand->nand_sts.err_l2-1, + nand->nand_sts.page_count_err_l2, + nand->nand_sts.err_l2, + nand->nand_sts.page_count_err_l3, + nand->nand_sts.page_count_blank); + + return size; +} + +static ssize_t ecc_sts_store(struct device *pdev, struct device_attribute *attr, + const char *buf, size_t size) +{ + struct pxa3xx_nand *nand = dev_get_drvdata(pdev); + int l1 = 0, l2 = 0; + sscanf(buf, "%d %d", &l1, &l2); + printk("set err_l %d %d %d\n", l1, l2, nand->nand_sts.ecc_strength); + if ((l2 > l1) && (l1 > 0) && (l2 < nand->nand_sts.ecc_strength)) { + nand->nand_sts.err_l1 = l1; + nand->nand_sts.err_l2 = l2; + } + return size; +} + +static ssize_t rw_sts_show(struct device *pdev, struct device_attribute *attr, + char *buf) +{ + struct pxa3xx_nand *nand = dev_get_drvdata(pdev); + int size; + + size = sprintf(buf, "page RD cnt: \t[%d]\npage WR cnt: \t[%d]\n" + "block erase cnt: \t[%d]\n", + nand->nand_sts.page_read, nand->nand_sts.page_written, + nand->nand_sts.block_erased); + return size; +} + +static ssize_t unc_err_rec_show(struct device *pdev, struct device_attribute *attr, + char *buf) +{ + struct pxa3xx_nand *nand = dev_get_drvdata(pdev); + int i, pn, size; + + pn = (nand->nand_sts.uncorrect_page_cnt >= UNCERR_REC_DEPTH) ? + UNCERR_REC_DEPTH : nand->nand_sts.uncorrect_page_cnt; + + size = snprintf(buf, PAGE_SIZE, "===== uncorrectable erro record =====\n" + "Total error numbers: %d, latest %d RECs:\n", + nand->nand_sts.uncorrect_page_cnt, + pn); + i = nand->nand_sts.rec_idx; + while(pn) { + if (i) + i--; + else + i = UNCERR_REC_DEPTH - 1; + + size += snprintf(buf+size, PAGE_SIZE-size, "page: [0x%x]\n", + nand->nand_sts.uncerr_pn_rec[i]); + pn--; + } + return size; +} + +static DEVICE_ATTR(ecc_sts, S_IRUGO | S_IWUSR, ecc_sts_show, ecc_sts_store); +static DEVICE_ATTR(rw_sts, S_IRUGO | S_IWUSR, rw_sts_show, NULL); +static DEVICE_ATTR(uncerr_rec, S_IRUGO | S_IWUSR, unc_err_rec_show, NULL); + +static struct device_attribute *nand_sts[] = { + &dev_attr_ecc_sts, + &dev_attr_rw_sts, + &dev_attr_uncerr_rec, + NULL +}; +static int nand_create_device(struct pxa3xx_nand *nand) +{ + struct device_attribute **attrs = nand_sts; + struct device_attribute *attr; + struct device *dev; + int err; + + nand_class = class_create(THIS_MODULE, "nfc"); + if (IS_ERR(nand_class)) + return PTR_ERR(nand_class); + + dev = device_create(nand_class, NULL, + MKDEV(233, 0), NULL, "statistics"); + + if (IS_ERR(dev)) { + class_destroy(nand_class); + return PTR_ERR(dev); + } + dev_set_drvdata(dev, nand); + + while ((attr = *attrs++)) { + err = device_create_file(dev, attr); + if (err) { + device_destroy(nand_class, dev->devt); + class_destroy(nand_class); + return err; + } + } return 0; } @@ -3797,11 +3976,14 @@ static int alloc_nand_resource(struct platform_device *pdev) struct pxa3xx_nand_platform_data *pdata; struct pxa3xx_nand_info *info; struct nand_chip *chip; - struct mtd_info *mtd; + struct mtd_info *mtd, *mtd_dp, *mtd_eslc, *mtd_slc; struct pxa3xx_nand *nand; struct resource *r; int ret, irq, cs; struct device_node *np = pdev->dev.of_node; +#ifdef CONFIG_BERLIN_NAND_READ_RETRY + struct pxa3xx_nand_read_retry *retry; +#endif pdata = pdev->dev.platform_data; nand = kzalloc(sizeof(struct pxa3xx_nand), GFP_KERNEL); @@ -3812,6 +3994,16 @@ static int alloc_nand_resource(struct platform_device *pdev) nand->pdev = pdev; +#ifdef CONFIG_BERLIN_NAND_READ_RETRY + retry = kzalloc(sizeof(struct pxa3xx_nand_read_retry), GFP_KERNEL); + if (!retry) { + dev_err(&pdev->dev, "failed to allocate memory\n"); + kfree(nand); + return -ENOMEM; + } + nand->retry = retry; +#endif + r = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (r == NULL) { dev_err(&pdev->dev, "no IO memory resource defined\n"); @@ -3907,13 +4099,17 @@ static int alloc_nand_resource(struct platform_device *pdev) * if chip doesn't support dual plane, * so it's better if it has a dedicated allocation action */ - mtd = kzalloc(info_size * 2, GFP_KERNEL); + mtd = kzalloc(info_size * 4, GFP_KERNEL); if (!mtd) { dev_err(&pdev->dev, "failed to allocate memory\n"); ret = -ENOMEM; goto fail_free_buf; } + mtd_dp = (struct mtd_info *)((char *)mtd + info_size); + mtd_eslc = (struct mtd_info *)((char *)mtd_dp + info_size); + mtd_slc = (struct mtd_info *)((char *)mtd_eslc + info_size); + info = (struct pxa3xx_nand_info *)(&mtd[1]); info->nand_data = nand; info->chip_select = cs; @@ -3942,13 +4138,15 @@ static int alloc_nand_resource(struct platform_device *pdev) chip->read_byte = pxa3xx_nand_read_byte; chip->read_buf = pxa3xx_nand_read_buf; chip->write_buf = pxa3xx_nand_write_buf; - chip->get_planes = pxa3xx_nand_get_planes; + chip->get_mtd_info = pxa3xx_nand_get_mtd_info; chip->scan_bbt = pxa3xx_nand_scan_bbt; - pxa3xx_dp_info_fill(nand, - (struct mtd_info *)((char *)mtd + info_size), mtd, cs); + pxa3xx_info_fill(nand, mtd_dp, mtd, cs, TYPE_DUAL_PLANE); + pxa3xx_info_fill(nand, mtd_eslc, mtd, cs, TYPE_E_SLC); + pxa3xx_info_fill(nand, mtd_slc, mtd, cs, TYPE_SLC); } + nand_create_device(nand); return 0; fail_free_buf: @@ -3973,6 +4171,9 @@ static int alloc_nand_resource(struct platform_device *pdev) fail_free_io: release_mem_region(r->start, resource_size(r)); fail_alloc: +#ifdef CONFIG_BERLIN_NAND_READ_RETRY + kfree(retry); +#endif kfree(nand); return ret; } @@ -4004,6 +4205,7 @@ static int pxa3xx_nand_remove(struct platform_device *pdev) r = platform_get_resource(pdev, IORESOURCE_MEM, 0); release_mem_region(r->start, resource_size(r)); + free_dummy_rd_buf(nand); for (cs = 0; cs < pdata->cs_num; cs++) { info = nand->info[cs]; @@ -4022,11 +4224,16 @@ static int pxa3xx_nand_remove(struct platform_device *pdev) #ifdef CONFIG_BERLIN_NAND_RANDOMIZER nand_randomizer_release(pdev); #endif /* CONFIG_BERLIN_NAND_RANDOMIZER */ +#ifdef CONFIG_BERLIN_NAND_READ_RETRY + berlin_nand_rr_exit(nand); +#endif if (pdata->controller_attrs & PXA3XX_PDATA_MALLOC) { kfree(pdata); pdev->dev.platform_data = NULL; } + + class_destroy(nand_class); return 0; } @@ -4073,6 +4280,10 @@ static int pxa3xx_parse_part_type(const struct mtd_partition *parts, if ((part_name_len == name_len) && (strncmp(parts->name, name, name_len) == 0)) { if (strncmp(p, "dp", 2) == 0) { return TYPE_DUAL_PLANE; + } else if (strncmp(p, "eslc", 4) == 0) { + return TYPE_E_SLC; + } else if(strncmp(p, "slc", 3) == 0) { + return TYPE_SLC; } else if(strncmp(p, "sp", 2) == 0) { return TYPE_SINGLE_PLANE; } @@ -4111,14 +4322,14 @@ static struct pxa3xx_nand_platform_data *pxa3xx_nand_probe_dt(struct platform_de return pdata; } - static int pxa3xx_nand_probe(struct platform_device *pdev) { struct pxa3xx_nand_platform_data *pdata; struct pxa3xx_nand_info *info; - struct nand_chip *chip = NULL, *chip_dp = NULL; + struct nand_chip *chip = NULL, *chip_dp = NULL, *chip_eslc = NULL; + struct nand_chip *chip_slc = NULL; struct pxa3xx_nand *nand; - struct mtd_info *mtd, *mtd_dp; + struct mtd_info *mtd, *mtd_dp, *mtd_eslc, *mtd_slc; int cs, part_num, ret, nr_parts, probe_success; probe_success = 0; @@ -4152,8 +4363,12 @@ static int pxa3xx_nand_probe(struct platform_device *pdev) info = nand->info[cs]; mtd = get_mtd_by_info(info); mtd_dp = get_mtd_by_info(nand->info_dp[cs]); + mtd_eslc = get_mtd_by_info(nand->info_eslc[cs]); + mtd_slc = get_mtd_by_info(nand->info_slc[cs]); chip = mtd->priv; chip_dp = mtd_dp->priv; + chip_eslc = mtd_eslc->priv; + chip_slc = mtd_slc->priv; if (pxa3xx_nand_scan(mtd, TYPE_SINGLE_PLANE)) { dev_err(&pdev->dev, "failed to scan nand\n"); @@ -4167,7 +4382,19 @@ static int pxa3xx_nand_probe(struct platform_device *pdev) continue; } - chip_dp->bbt = chip->bbt; + chip_eslc->block_markbad = pxa3xx_nand_slc_markbad; + if (pxa3xx_nand_scan(mtd_eslc, TYPE_E_SLC)) { + dev_err(&pdev->dev, "failed to scan eslc nand\n"); + continue; + } + + chip_slc->block_markbad = pxa3xx_nand_slc_markbad; + if (pxa3xx_nand_scan(mtd_slc, TYPE_SLC)) { + dev_err(&pdev->dev, "failed to scan slc nand\n"); + continue; + } + + chip_slc->bbt = chip_eslc->bbt = chip_dp->bbt = chip->bbt; ret = 0; nr_parts = 0; @@ -4179,14 +4406,45 @@ static int pxa3xx_nand_probe(struct platform_device *pdev) if (info->has_dual_plane && plane_cmdline) { printk(KERN_INFO "analyzing plane info\n"); for (part_num = 0; part_num < nr_parts; part_num++) { - if (pxa3xx_parse_part_type(&parts[part_num], - plane_cmdline) - == TYPE_DUAL_PLANE) { + int type = pxa3xx_parse_part_type(&parts[part_num], + plane_cmdline); + switch (type) { + case TYPE_DUAL_PLANE: printk(KERN_INFO "dual plane part: %s\n", parts[part_num].name); ret = mtd_device_register(mtd_dp, &parts[part_num], 1); - } else { + break; + case TYPE_E_SLC: + printk(KERN_INFO "e-slc part: %s, offset %llx\n", + parts[part_num].name, + parts[part_num].offset); + if (nand->p_slc) { + parts[part_num].size /= 2; + nand->p_slc->eslc_part_add( + nand->p_slc->priv, + &parts[part_num]); + ret = mtd_device_register( + mtd_eslc, + &parts[part_num], 1); + } + + break; + case TYPE_SLC: + printk(KERN_INFO "slc part: %s, offset %llx\n", + parts[part_num].name, + parts[part_num].offset); + if (nand->p_slc) { + parts[part_num].size /= 2; + nand->p_slc->slc_part_add( + nand->p_slc->priv, + &parts[part_num]); + ret = mtd_device_register( + mtd_slc, + &parts[part_num], 1); + } + break; + default: printk(KERN_INFO "sing plane part: %s\n", parts[part_num].name); ret = mtd_device_register(mtd, @@ -4216,8 +4474,7 @@ static int pxa3xx_nand_probe(struct platform_device *pdev) if (!probe_success) { pxa3xx_nand_remove(pdev); return -ENODEV; - } - else + } else return 0; } diff --git a/arch/arm/mach-berlin/modules/nfc/pxa3xx_nand_debu.h b/arch/arm/mach-berlin/modules/nfc/pxa3xx_nand_debu.h index c8b04df1..3223cc9c 100644 --- a/arch/arm/mach-berlin/modules/nfc/pxa3xx_nand_debu.h +++ b/arch/arm/mach-berlin/modules/nfc/pxa3xx_nand_debu.h @@ -1,8 +1,204 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + #ifndef __ASM_ARCH_PXA3XX_NAND_H #define __ASM_ARCH_PXA3XX_NAND_H #include #include +#include + +#include +#include +#include "api_dhub.h" +#include "pBridge.h" +#include + + +#define READ_DATA_CHAN_CMD_BASE (0) +#define READ_DATA_CHAN_CMD_SIZE (2 << 3) +#define READ_DATA_CHAN_DATA_BASE (READ_DATA_CHAN_CMD_BASE + READ_DATA_CHAN_CMD_SIZE) +#define READ_DATA_CHAN_DATA_SIZE (32 << 3) + +#define WRITE_DATA_CHAN_CMD_BASE (READ_DATA_CHAN_DATA_BASE + READ_DATA_CHAN_DATA_SIZE) +#define WRITE_DATA_CHAN_CMD_SIZE (2 << 3) +#define WRITE_DATA_CHAN_DATA_BASE (WRITE_DATA_CHAN_CMD_BASE + WRITE_DATA_CHAN_CMD_SIZE) +#define WRITE_DATA_CHAN_DATA_SIZE (32 << 3) + +#define DESCRIPTOR_CHAN_CMD_BASE (WRITE_DATA_CHAN_DATA_BASE + WRITE_DATA_CHAN_DATA_SIZE) +#define DESCRIPTOR_CHAN_CMD_SIZE (2 << 3) +#define DESCRIPTOR_CHAN_DATA_BASE (DESCRIPTOR_CHAN_CMD_BASE + DESCRIPTOR_CHAN_CMD_SIZE) +#define DESCRIPTOR_CHAN_DATA_SIZE (32 << 3) + +#define NFC_DEV_CTL_CHAN_CMD_BASE (DESCRIPTOR_CHAN_DATA_BASE + DESCRIPTOR_CHAN_DATA_SIZE) +#define NFC_DEV_CTL_CHAN_CMD_SIZE (2 << 3) +#define NFC_DEV_CTL_CHAN_DATA_BASE (NFC_DEV_CTL_CHAN_CMD_BASE + NFC_DEV_CTL_CHAN_CMD_SIZE) +#define NFC_DEV_CTL_CHAN_DATA_SIZE (32 << 3) + +#define CHIP_DELAY_TIMEOUT (2 * HZ/10) +#define NAND_STOP_DELAY (2 * HZ/50) +#define PAGE_CHUNK_SIZE (2048) +#define OOB_CHUNK_SIZE (64) +#define CMD_POOL_SIZE (5) +#define BCH_THRESHOLD (0) +#define BCH_STRENGTH (4) +#define HAMMING_STRENGTH (1) + +#define DMA_H_SIZE (32*1024) + +/* registers and bit definitions */ +#define NDCR (0x00) /* Control register */ +#define NDTR0CS0 (0x04) /* Timing Parameter 0 for CS0 */ +#define NDTR1CS0 (0x0C) /* Timing Parameter 1 for CS0 */ +#define NDSR (0x14) /* Status Register */ +#define NDPCR (0x18) /* Page Count Register */ +#define NDBDR0 (0x1C) /* Bad Block Register 0 */ +#define NDBDR1 (0x20) /* Bad Block Register 1 */ +#define NDECCCTRL (0x28) /* ECC Control Register */ +#define NDDB (0x40) /* Data Buffer */ +#define NDCB0 (0x48) /* Command Buffer0 */ +#define NDCB1 (0x4C) /* Command Buffer1 */ +#define NDCB2 (0x50) /* Command Buffer2 */ +#define NDCB3 (0x54) /* Command Buffer3 */ + +#define NDCR_SPARE_EN (0x1 << 31) +#define NDCR_ECC_EN (0x1 << 30) +#define NDCR_DMA_EN (0x1 << 29) +#define NDCR_ND_RUN (0x1 << 28) +#define NDCR_DWIDTH_C (0x1 << 27) +#define NDCR_DWIDTH_M (0x1 << 26) +#define NDCR_PAGE_SZ (0x1 << 24) +#define NDCR_NCSX (0x1 << 23) +#define NDCR_FORCE_CSX (0x1 << 21) +#define NDCR_CLR_PG_CNT (0x1 << 20) +#define NDCR_STOP_ON_UNCOR (0x1 << 19) +#define NDCR_RD_ID_CNT_MASK (0x7 << 16) +#define NDCR_RD_ID_CNT(x) (((x) << 16) & NDCR_RD_ID_CNT_MASK) + +#define NDCR_RA_START (0x1 << 15) +#define NDCR_PG_PER_BLK_MASK (0x3 << 13) +#define NDCR_PG_PER_BLK(x) (((x) << 13) & NDCR_PG_PER_BLK_MASK) +#define NDCR_ND_ARB_EN (0x1 << 12) +#define NDCR_INT_MASK (0xFFF) +#define NDCR_RDYM (0x1 << 11) + +#define NDSR_MASK (0xffffffff) +#define NDSR_ERR_CNT_MASK (0x1F << 16) +#define NDSR_ERR_CNT(x) (((x) << 16) & NDSR_ERR_CNT_MASK) +#define NDSR_RDY (0x1 << 12) +#define NDSR_FLASH_RDY (0x1 << 11) +#define NDSR_CS0_PAGED (0x1 << 10) +#define NDSR_CS1_PAGED (0x1 << 9) +#define NDSR_CS0_CMDD (0x1 << 8) +#define NDSR_CS1_CMDD (0x1 << 7) +#define NDSR_CS0_BBD (0x1 << 6) +#define NDSR_CS1_BBD (0x1 << 5) +#define NDSR_DBERR (0x1 << 4) +#define NDSR_SBERR (0x1 << 3) +#define NDSR_WRDREQ (0x1 << 2) +#define NDSR_RDDREQ (0x1 << 1) +#define NDSR_WRCMDREQ (0x1) + +#define NDCB0_CMD_XTYPE_MASK (0x7 << 29) +#define NDCB0_CMD_XTYPE(x) (((x) << 29) & NDCB0_CMD_XTYPE_MASK) +#define NDCB0_LEN_OVRD (0x1 << 28) +#define NDCB0_ST_ROW_EN (0x1 << 26) +#define NDCB0_AUTO_RS (0x1 << 25) +#define NDCB0_CSEL (0x1 << 24) +#define NDCB0_CMD_TYPE_MASK (0x7 << 21) +#define NDCB0_CMD_TYPE(x) (((x) << 21) & NDCB0_CMD_TYPE_MASK) +#define NDCB0_NC (0x1 << 20) +#define NDCB0_DBC (0x1 << 19) +#define NDCB0_ADDR_CYC_MASK (0x7 << 16) +#define NDCB0_ADDR_CYC(x) (((x) << 16) & NDCB0_ADDR_CYC_MASK) +#define NDCB0_CMD2_MASK (0xff << 8) +#define NDCB0_CMD1_MASK (0xff) +#define NDCB0_ADDR_CYC_SHIFT (16) + +#define NDCB0_CMDX_MREAD (0x0) +#define NDCB0_CMDX_MWRITE (0x0) +#define NDCB0_CMDX_NWRITE_FINAL_CMD (0x1) +#define NDCB0_CMDX_FINAL_CMD (0x3) +#define NDCB0_CMDX_CMDP_WRITE (0x4) +#define NDCB0_CMDX_NREAD (0x5) +#define NDCB0_CMDX_NWRITE (0x5) +#define NDCB0_CMDX_CMDP (0x6) + +#define NDCB0_CMD_READ (0x0) +#define NDCB0_CMD_PROGRAM (0x1) +#define NDCB0_CMD_ERASE (0x2) +#define NDCB0_CMD_READID (0x3) +#define NDCB0_CMD_STATUSREAD (0x4) +#define NDCB0_CMD_RESET (0x5) +#define NDCB0_CMD_NAKED_CMD (0x6) +#define NDCB0_CMD_NAKED_ADDR (0x7) + +#define NDCB3_NDLENCNT_MASK (0xffff) +#define NDCB3_NDLENCNT(x) ((x) & NDCB3_NDLENCNT_MASK) + +/* ECC Control Register */ +#define NDECCCTRL_ECC_SPARE_MSK (0xFF << 7) +#define NDECCCTRL_ECC_SPARE(x) (((x) << 7) & NDECCCTRL_ECC_SPARE_MSK) +#define NDECCCTRL_ECC_THR_MSK (0x3F << 1) +#define NDECCCTRL_ECC_THRESH(x) (((x) << 1) & NDECCCTRL_ECC_THR_MSK) +#define NDECCCTRL_BCH_EN (0x1) +#define NDECCCTRL_ECC_STRENGTH_SHIFT (24) +#define NDECCCTRL_ECC_STRENGTH_MSK (0xFF << 24) +#define NDECCCTRL_ECC_STRENGTH(x) (((x) << 24) & NDECCCTRL_ECC_STRENGTH_MSK) + + +enum { + MV_MTU_8_BYTE = 0, + MV_MTU_32_BYTE, + MV_MTU_128_BYTE, + MV_MTU_1024_BYTE +}; + +/* error code and state */ +enum { + ERR_NONE = 0, + ERR_DMABUSERR = -1, + ERR_SENDCMD = -2, + ERR_DBERR = -3, + ERR_BBERR = -4, + ERR_SBERR = -5, + ERR_DMAMAPERR = -6, +}; + +enum { + STATE_IDLE = 0, + STATE_PREPARED, + STATE_CMD_HANDLE, + STATE_DMA_READING, + STATE_DMA_WRITING, + STATE_DMA_DONE, + STATE_PIO_READING, + STATE_PIO_WRITING, + STATE_CMD_DONE, + STATE_READY, +}; + +enum { + TYPE_SINGLE_PLANE = 0, + TYPE_DUAL_PLANE, + TYPE_E_SLC, + TYPE_SLC, + TYPE_UNKNOWN, +}; + struct pxa3xx_nand_timing { unsigned int tCH; /* Enable signal hold time */ @@ -66,6 +262,184 @@ struct pxa3xx_nand_flash { #define PXA3XX_PDATA_MALLOC (1 << 4) +#define HY_ESLC_REG_NUM 4 + +struct eslc_part { + struct mtd_partition *part; + struct list_head list; +}; + +struct hynix_eslc_data { + struct pxa3xx_nand *nand; + uint8_t eslc_def[HY_ESLC_REG_NUM]; + struct list_head eslc_parts_qh; + struct list_head slc_parts_qh; + const unsigned int *reg_addr; + int page_addr; +}; + +struct pxa3xx_nand_slc { + int (*eslc_part_add)(void *priv, struct mtd_partition *part); + int (*eslc_start)(void *priv, uint cmd, int page); + void (*eslc_stop)(void *priv, uint cmd); + loff_t (*eslc_get_phy_off)(void *priv, loff_t off); + + int (*slc_part_add)(void *priv, struct mtd_partition *part); + int (*slc_start)(void *priv, uint cmd, int page); + void (*slc_stop)(void *priv, uint cmd); + loff_t (*slc_get_phy_off)(void *priv, loff_t off); + + void *priv; +}; + +struct pxa3xx_nand_info { + struct nand_chip nand_chip; + + struct pxa3xx_nand_cmdset *cmdset; + /* page size of attached chip */ + uint16_t page_size; + uint8_t chip_select; + uint8_t ecc_strength; + + int page_shift; + int erase_shift; + + uint8_t has_dual_plane; + uint8_t n_planes; + uint8_t eslc_mode; + uint32_t erase_size; + + /* calculated from pxa3xx_nand_flash data */ + uint8_t col_addr_cycles; + uint8_t row_addr_cycles; + uint8_t read_id_bytes; + + /* cached register value */ + uint32_t reg_ndcr; + uint32_t ndtr0cs0; + uint32_t ndtr1cs0; + + void *nand_data; +}; + +#define UNCERR_REC_DEPTH 64 +struct pxa3xx_nand_sts { + /* error bits number of level 1*/ + u16 err_l1; + /* error bits number of level 2*/ + u16 err_l2; + /* page count with error bit 0 */ + u32 page_count_err_0; + /* page count with error bit 1 */ + u32 page_count_err_1; + /* page count with error bits from 2 to l1*/ + u32 page_count_err_l1; + /* page count with error bits from l1 to l2*/ + u32 page_count_err_l2; + /* page count with error bits more than l2*/ + u32 page_count_err_l3; + u32 uncorrect_page_cnt; + u32 page_count_blank; + /* total corrected bits number*/ + u32 corrected_err_bits; + u32 block_erased; + u32 page_read; + u32 page_written; + /* page number record for uncorrectable error*/ + u32 uncerr_pn_rec[UNCERR_REC_DEPTH]; + u16 rec_idx; + u16 ecc_strength; +}; + +struct pxa3xx_nand { + void __iomem *mmio_base; + void __iomem *pb_base; + unsigned long mmio_phys; + struct nand_hw_control controller; + struct completion cmd_complete; + struct platform_device *pdev; + struct pxa3xx_nand_sts nand_sts; + + /* DMA information */ + HDL_dhub PB_dhubHandle; + unsigned int mtu_size; + unsigned int mtu_type; + dma_addr_t data_buff_phys; + dma_addr_t oob_buff_phys; + dma_addr_t drd_dma_addr; + unsigned char *drd_buf; + + unsigned char *bounce_buffer; + + dma_addr_t data_desc_addr; + unsigned char *data_desc; + int data_desc_len; + + dma_addr_t read_desc_addr; + unsigned char *read_desc; + int read_desc_len[NUM_CHIP_SELECT]; + + dma_addr_t write_desc_addr; + unsigned char *write_desc; + int write_desc_len[NUM_CHIP_SELECT]; + + dma_addr_t dp_read_desc_addr; + unsigned char *dp_read_desc; + int dp_read_desc_len[NUM_CHIP_SELECT]; + + dma_addr_t dp_write_desc_addr; + unsigned char *dp_write_desc; + int dp_write_desc_len[NUM_CHIP_SELECT]; + + int transfer_units[NUM_CHIP_SELECT]; + int transfer_units_last_trunk[NUM_CHIP_SELECT]; +#ifdef CONFIG_BERLIN_NAND_READ_RETRY + struct pxa3xx_nand_read_retry *retry; +#endif + struct pxa3xx_nand_slc *p_slc; + struct pxa3xx_nand_info *info[NUM_CHIP_SELECT]; + struct pxa3xx_nand_info *info_dp[NUM_CHIP_SELECT]; + struct pxa3xx_nand_info *info_eslc[NUM_CHIP_SELECT]; + struct pxa3xx_nand_info *info_slc[NUM_CHIP_SELECT]; + + uint8_t chip_select; + uint32_t command; + uint16_t data_size; /* data size in FIFO */ + uint16_t oob_size; + unsigned char *data_buff; + unsigned char *oob_buff; + /************ + * following members will be reset as 0 before real IO + ************/ + uint32_t buf_start; + uint32_t buf_count; + uint16_t data_column; + uint16_t oob_column; + + /* relate to the command */ + unsigned int state; + int page_addr; + uint16_t column; + unsigned int ecc_strength; + unsigned int bad_count; + int use_mapped_buf; + int is_ready; + int retcode; + + uint32_t ndeccctrl; + uint32_t ndcr; + + /* generated NDCBx register values */ + uint8_t total_cmds; + uint8_t cmd_seqs; + uint8_t wait_ready[CMD_POOL_SIZE]; + uint32_t ndcb0[CMD_POOL_SIZE]; + uint32_t ndcb1; + uint32_t ndcb2; + uint32_t chunk_oob_size[CMD_POOL_SIZE]; + uint32_t curr_chunk; +}; + struct pxa3xx_nand_platform_data { unsigned int controller_attrs; @@ -78,5 +452,113 @@ struct pxa3xx_nand_platform_data { size_t num_flash; }; +#ifdef CONFIG_BERLIN_NAND_READ_RETRY +struct pxa3xx_nand_read_retry { + uint8_t rr_type; + uint8_t rr_cycles; + uint8_t rr_reg_nr; + uint8_t rr_current_cycle; + uint8_t rr_table_ready; + uint8_t *rr_table; + int (*set_rr)(struct pxa3xx_nand *nand, int rr_current_cycle); + int (*verify_rr)(struct pxa3xx_nand *nand); +}; +#endif + +enum { + READ_DATA_CHANNEL_ID = PBSemaMap_dHubSemID_dHubCh0_intr, + WRITE_DATA_CHANNEL_ID = PBSemaMap_dHubSemID_dHubCh1_intr, + DESCRIPTOR_CHANNEL_ID = PBSemaMap_dHubSemID_dHubCh2_intr, + NFC_DEV_CTL_CHANNEL_ID = PBSemaMap_dHubSemID_dHubCh3_intr, + SPI_DEV_CTL_CHANNEL_ID = PBSemaMap_dHubSemID_dHubCh4_intr +}; + +#define pb_get_phys_offset(nand, off) \ + ((nand->mmio_phys + off) & 0x0FFFFFFF) + +/* structure for DMA command buffer */ +struct cmd_3_desc { + SIE_BCMCFGW cfgw_ndcb0[3]; +}; +struct cmd_4_desc { + SIE_BCMCFGW cfgw_ndcb0[4]; +}; + +struct start_desc { + SIE_BCMCFGW ndcr_stop; + SIE_BCMCFGW ndeccctrl; + SIE_BCMCFGW ndsr_clear; + SIE_BCMCFGW ndcr_go; +}; + +struct reset_desc { + SIE_BCMSEMA sema_cmd; + struct cmd_3_desc cmd; +}; + +struct read_status_desc { + SIE_BCMSEMA sema_cmd; + struct cmd_3_desc cmd; + SIE_BCMSEMA sema_data; + SIE_BCMWCMD wcmd; + SIE_BCMWDAT wdat; +}; + +struct read_desc { + SIE_BCMSEMA sema_cmd1; + struct cmd_3_desc cmd1; + SIE_BCMSEMA sema_addr; + struct cmd_3_desc addr; + SIE_BCMSEMA sema_cmd2; + struct cmd_3_desc cmd2; + /* chunks * (sema + cmd4 + units * (sema + data)) */ + unsigned char data_cmd[0]; +}; + +struct dp_read_desc { + SIE_BCMSEMA sema_cmd1; + struct cmd_3_desc plane_1_cmd; + SIE_BCMSEMA sema_addr1; + struct cmd_3_desc plane_1_addr; + SIE_BCMSEMA sema_cmd2; + struct cmd_3_desc plane_2_cmd; + SIE_BCMSEMA sema_addr2; + struct cmd_3_desc plane_2_addr; + SIE_BCMSEMA sema_conf_cmd; + struct cmd_3_desc confirm_cmd; + /* planes * ( sema + cmd3 + + * sema + cmd3 + + * sema + cmd3 + + * sema + cmd3 + + * sema + cmd3 + + * chunk * ( sema + cmd4 + + * units * (sema + wcmd + wdat)))*/ + unsigned char data_cmd[0]; +}; + +/* macros for registers read/write */ +#define nand_writel(nand, off, val) \ + __raw_writel((val), (nand)->mmio_base + (off)) + +#define nand_readl(nand, off) \ + __raw_readl((nand)->mmio_base + (off)) +#define get_mtd_by_info(info) \ + (struct mtd_info *)((void *)info - sizeof(struct mtd_info)) extern void pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info); +extern int pxa3xx_read_page(struct mtd_info *mtd, uint8_t *buf, int page); +extern int pxa3xx_nand_intern_read(struct pxa3xx_nand *nand, uint8_t *buf, int page); +extern int pxa3xx_dummy_read(struct mtd_info *mtd, int page); + +void mv88dexx_nand_dma_start(struct pxa3xx_nand_info *info, int rw); +void init_cmd_3(struct pxa3xx_nand *nand, struct cmd_3_desc *cmd); +void init_cmd_4(struct pxa3xx_nand *nand, struct cmd_4_desc *cmd); +void init_wcmd(struct pxa3xx_nand *nand, SIE_BCMWCMD *wcmd); +void init_wdat(struct pxa3xx_nand *nand, SIE_BCMWDAT *wdat); +void init_rcmd(struct pxa3xx_nand *nand, SIE_BCMRCMD *rcmd); +void init_rdat(struct pxa3xx_nand *nand, SIE_BCMRDAT *rdat); + +void wait_dhub_ready(struct pxa3xx_nand *nand); +void init_sema_nfccmd(struct pxa3xx_nand *nand, SIE_BCMSEMA *sema); +void init_sema_nfcdat(struct pxa3xx_nand *nand, SIE_BCMSEMA *sema); + #endif /* __ASM_ARCH_PXA3XX_NAND_H */ diff --git a/arch/arm/mach-berlin/modules/nfc/pxa3xx_nand_read_retry_debu.c b/arch/arm/mach-berlin/modules/nfc/pxa3xx_nand_read_retry_debu.c new file mode 100644 index 00000000..9df7643f --- /dev/null +++ b/arch/arm/mach-berlin/modules/nfc/pxa3xx_nand_read_retry_debu.c @@ -0,0 +1,1186 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + +/* + * READ RETRY feature Driver for Marvell BERLIN SoC NAND controller + * +*/ + +#include "pxa3xx_nand_debu.h" +#include "pxa3xx_nand_read_retry_debu.h" +#include + +static inline int do_wait_status_bit_set(struct pxa3xx_nand *nand, unsigned int bit, + const char *func, int line_no) +{ + unsigned int read, i = NAND_TIME_OUT; + + do { + read = nand_readl(nand, NDSR) & bit; + } while (!read && --i); + + if (!i) { + printk("wait bit %08X time out! SR %x, %s:%d\n", bit, + nand_readl(nand, NDSR), + func, line_no); + return -1; + } + nand_writel(nand, NDSR, bit); + return 0; +} +#define wait_status_bit_set(nand, bit) \ + do_wait_status_bit_set(nand, bit,\ + __func__, __LINE__) + +static void berlin_nand_wait_stop(struct pxa3xx_nand *nand) +{ + uint32_t ndcr; + int timeout = NAND_STOP_DELAY*10; + + /* wait RUN bit in NDCR become 0 */ + ndcr = nand_readl(nand, NDCR); + while ((ndcr & NDCR_ND_RUN) && (timeout-- > 0)) { + ndcr = nand_readl(nand, NDCR); + udelay(1); + } + + if (timeout <= 0) { + printk("berline_nand_stop timeout\n"); + dump_stack(); + } +} + + +static void handle_data_pio_rr(struct pxa3xx_nand *nand, void *buf, + int data_size, int state) +{ + uint16_t real_data_size = DIV_ROUND_UP(data_size, 4); + + switch (state) { + case STATE_PIO_WRITING: + if (data_size > 0) + __raw_writesl(nand->mmio_base + NDDB, + buf, + real_data_size); + + break; + case STATE_PIO_READING: + if (data_size > 0) + __raw_readsl(nand->mmio_base + NDDB, + buf, + real_data_size); + + break; + default: + printk(KERN_ERR "%s: invalid state %d\n", __func__, + state); + BUG(); + } + +} + +static void handle_data_dummy_rd(struct pxa3xx_nand *nand, int data_size) +{ + uint16_t real_data_size = DIV_ROUND_UP(data_size, 4); + + while (real_data_size--) { + nand_readl(nand, NDDB); + } +} + + +static void berlin_nand_pio_start(struct pxa3xx_nand *nand,int size) +{ + uint32_t ndcr; + + nand_writel(nand, NDECCCTRL, 0); + ndcr = nand_readl(nand, NDCR); + + if (size == 1) + ndcr &= ~(NDCR_SPARE_EN | NDCR_ECC_EN | NDCR_PAGE_SZ);//set PAGE_SZ to 512 + else + ndcr &= ~(NDCR_SPARE_EN | NDCR_ECC_EN); + + /* clear status bits and run */ + nand_writel(nand, NDSR, NDSR_MASK); + nand_writel(nand, NDCR, ndcr & (~NDCR_ND_RUN)); + nand_writel(nand, NDSR, NDSR_MASK); + nand_writel(nand, NDCR, ndcr | NDCR_ND_RUN); +} + +/* berlin_nand_rr_tbl_verify_hynix +* +* description: There're 8 sets retry parameter in otp area of hynix nand. +* original and inverse parameter constitute one set. +* XOR check should be taken for these parameter for ensuring integrity +*/ +static int berlin_nand_rr_tbl_verify_hynix(int rr_total, unsigned char *read_buf) +{ + int i, offset, err, set_nr = 0; + + for (set_nr = 0; set_nr < 8; set_nr++) { + offset = set_nr * rr_total * 2; + err = 0; + + for (i = 0; i < rr_total; i++) { + if ((read_buf[i + offset] ^ read_buf[i + offset + rr_total]) != 0xff) { + err = 1; + break; + } + } + + if (err == 0) + return offset; + } + return -EINVAL; +} + +static void berlin_nand_pio_write_cmd_4(struct pxa3xx_nand *nand) +{ + nand_writel(nand, NDCB0, nand->ndcb0[0]); + nand_writel(nand, NDCB0, nand->ndcb0[1]); + nand_writel(nand, NDCB0, nand->ndcb0[2]); + nand_writel(nand, NDCB0, nand->ndcb0[3]); +} + +static void berlin_nand_pio_write_cmd_3(struct pxa3xx_nand *nand) +{ + nand_writel(nand, NDCB0, nand->ndcb0[0]); + nand_writel(nand, NDCB0, nand->ndcb0[1]); + nand_writel(nand, NDCB0, nand->ndcb0[2]); +} + +static int berlin_nand_pio_readrr_hynix(struct pxa3xx_nand *nand, unsigned char *read_buf) +{ + int i; + const uint32_t cmd_tbl[RR_CMD_LEN] = {0x16, 0x17, 0x4, 0x19, 0x00}; + const uint32_t addr_tbl[RR_ADDR_LEN] = {0x0, 0x0, 0x0, 0x2, 0x0}; + + //CMD 0x36 + Addr 0xFF + WData 0x40 + memset(nand->ndcb0, 0, sizeof(uint32_t)*CMD_POOL_SIZE); + nand->ndcb0[0] = NDCB0_CMD_TYPE(NDCB0_CMD_PROGRAM) + | NDCB0_ADDR_CYC(1) + | NDCB0_LEN_OVRD + | 0x36; + nand->ndcb0[1] = 0xFF; + nand->ndcb0[2] = 1<<8; + nand->ndcb0[3] = 8; + berlin_nand_pio_start(nand,0); + if (wait_status_bit_set(nand, NDSR_WRCMDREQ) == -1) + return -EBUSY; + berlin_nand_pio_write_cmd_4(nand); + if (wait_status_bit_set(nand, NDSR_WRDREQ) == -1) + return -EBUSY; + memset(read_buf, 0x40, 8); + handle_data_pio_rr(nand, read_buf, 8, STATE_PIO_WRITING); + + //Addr 0xCC + memset(nand->ndcb0, 0, sizeof(uint32_t)*CMD_POOL_SIZE); + nand->ndcb0[0] = NDCB0_CMD_TYPE(NDCB0_CMD_NAKED_ADDR) + | NDCB0_ADDR_CYC(1) + | NDCB0_NC; + nand->ndcb0[1] = 0xcc; + nand->ndcb0[2] = 1 << 8; + berlin_nand_pio_start(nand,0); + if (wait_status_bit_set(nand, NDSR_WRCMDREQ) == -1) + return -EBUSY; + berlin_nand_pio_write_cmd_3(nand); + + //WData 0x4d + memset(nand->ndcb0, 0, sizeof(uint32_t)*CMD_POOL_SIZE); + nand->ndcb0[0] = NDCB0_CMD_TYPE(NDCB0_CMD_PROGRAM) + | NDCB0_CMD_XTYPE(NDCB0_CMDX_NWRITE) + | NDCB0_LEN_OVRD; + nand->ndcb0[2] = 1<<8; + nand->ndcb0[3] = 8; + if (wait_status_bit_set(nand, NDSR_WRCMDREQ) == -1) + return -EBUSY; + berlin_nand_pio_write_cmd_4(nand); + if (wait_status_bit_set(nand, NDSR_WRDREQ) == -1) + return -EBUSY; + memset(read_buf, 0x4d, 8); + handle_data_pio_rr(nand, read_buf, 8, STATE_PIO_WRITING); + + //5 CMD + memset(nand->ndcb0, 0, sizeof(uint32_t)*CMD_POOL_SIZE); + nand->ndcb0[2] = 1<<8; + berlin_nand_pio_start(nand,0); + for (i=0; indcb0[0] = NDCB0_CMD_TYPE(NDCB0_CMD_NAKED_CMD) + | NDCB0_NC + | cmd_tbl[i]; + if (wait_status_bit_set(nand, NDSR_WRCMDREQ) == -1) + return -EBUSY; + berlin_nand_pio_write_cmd_3(nand); + } + + //5 sets of Addr + nand->ndcb0[2] = 1<<8; + for (i=0; indcb0, 0, sizeof(uint32_t)*CMD_POOL_SIZE); + nand->ndcb0[0] = NDCB0_CMD_TYPE(NDCB0_CMD_NAKED_ADDR) + | NDCB0_NC + | NDCB0_ADDR_CYC(1); + nand->ndcb0[1] = addr_tbl[i]; + if (wait_status_bit_set(nand, NDSR_WRCMDREQ) == -1) + return -EBUSY; + berlin_nand_pio_write_cmd_3(nand); + } + + //CMD 0x30 + RData + berlin_nand_pio_start(nand,1); + memset(nand->ndcb0, 0, sizeof(uint32_t)*CMD_POOL_SIZE); + nand->ndcb0[0] = NDCB0_CMD_TYPE(NDCB0_CMD_READ) + | NDCB0_CMD_XTYPE(NDCB0_CMDX_MREAD) + | NDCB0_LEN_OVRD + | 0x30; + nand->ndcb0[2] = 0<<8; + nand->ndcb0[3] = RR_READ_LEN; + if (wait_status_bit_set(nand, NDSR_WRCMDREQ) == -1) + return -EBUSY; + berlin_nand_pio_write_cmd_4(nand); + + if (wait_status_bit_set(nand, NDSR_RDDREQ) == -1) + return -EBUSY; + handle_data_pio_rr(nand, read_buf, RR_READ_LEN, STATE_PIO_READING); + + //CMD 0xFF + memset(nand->ndcb0, 0, sizeof(uint32_t)*CMD_POOL_SIZE); + nand->ndcb0[0] = NDCB0_CMD_TYPE(NDCB0_CMD_NAKED_CMD) + | NDCB0_NC + | 0xFF; + nand->ndcb0[2] = 1<<8; + berlin_nand_pio_start(nand,0); + if (wait_status_bit_set(nand, NDSR_WRCMDREQ) == -1) + return -EBUSY; + berlin_nand_pio_write_cmd_3(nand); + + //CMD 0x38 + memset(nand->ndcb0, 0, sizeof(uint32_t)*CMD_POOL_SIZE); + nand->ndcb0[0] = NDCB0_CMD_TYPE(NDCB0_CMD_RESET) + | 0x38; + nand->ndcb0[2] = 1<<8; + if (wait_status_bit_set(nand, NDSR_WRCMDREQ) == -1) + return -EBUSY; + berlin_nand_pio_write_cmd_3(nand); + pxa3xx_read_page(get_mtd_by_info(nand->info[0]), NULL, 0x3800); + + return 0; +} + + +static int berlin_nand_pio_setrr_hynix(struct pxa3xx_nand *nand, int rr_current_cycle) +{ + unsigned int addr_nr = 0; + unsigned char set_buf[8]; + struct pxa3xx_nand_read_retry *retry = nand->retry; + struct pxa3xx_nand_info *info = nand->info[nand->chip_select]; + struct mtd_info *mtd = get_mtd_by_info(info); + struct nand_chip *chip = mtd->priv; + const unsigned int addr_tbl[8] = {0xcc, 0xbf, 0xaa, 0xab, 0xcd, 0xad, 0xae, 0xaf}; + + memset(set_buf, 0, 8); + //CMD 0x36 + memset(nand->ndcb0, 0, sizeof(uint32_t)*CMD_POOL_SIZE); + nand->ndcb0[0] = NDCB0_CMD_TYPE(NDCB0_CMD_NAKED_CMD) + | NDCB0_ADDR_CYC(0) + | NDCB0_NC + | 0x36; + berlin_nand_pio_start(nand,0); + if (wait_status_bit_set(nand, NDSR_WRCMDREQ) == -1) + return -EBUSY; + berlin_nand_pio_write_cmd_3(nand); + + //8 sets of Addr and WData + for (addr_nr = 0; addr_nr < retry->rr_reg_nr; addr_nr++) { + memset(nand->ndcb0, 0, sizeof(uint32_t)*CMD_POOL_SIZE); + nand->ndcb0[0] = NDCB0_CMD_TYPE(NDCB0_CMD_NAKED_ADDR) + | NDCB0_ADDR_CYC(1) + | NDCB0_NC; + nand->ndcb0[1] = addr_tbl[addr_nr]; + if (wait_status_bit_set(nand, NDSR_WRCMDREQ) == -1) + return -EBUSY; + berlin_nand_pio_write_cmd_3(nand); + + //W-data + memset(nand->ndcb0, 0, sizeof(uint32_t)*CMD_POOL_SIZE); + nand->ndcb0[0] = NDCB0_CMD_TYPE(NDCB0_CMD_PROGRAM) + | NDCB0_CMD_XTYPE(NDCB0_CMDX_NWRITE) + | NDCB0_NC + | NDCB0_LEN_OVRD; + nand->ndcb0[3] = 8; + if (wait_status_bit_set(nand, NDSR_WRCMDREQ) == -1) + return -EBUSY; + berlin_nand_pio_write_cmd_4(nand); + memset(set_buf, retry->rr_table[retry->rr_current_cycle * retry->rr_reg_nr + addr_nr], 8); + if (wait_status_bit_set(nand, NDSR_WRDREQ) == -1) + return -EBUSY; + + handle_data_pio_rr(nand, set_buf, 8, STATE_PIO_WRITING); + } + + // CMD 0x16 + berlin_nand_pio_start(nand,0); + memset(nand->ndcb0, 0, sizeof(uint32_t)*CMD_POOL_SIZE); + nand->ndcb0[0] = NDCB0_CMD_TYPE(NDCB0_CMD_NAKED_CMD) + | 0x16; + if (wait_status_bit_set(nand, NDSR_WRCMDREQ) == -1) + return -EBUSY; + berlin_nand_pio_write_cmd_3(nand); + berlin_nand_wait_stop(nand); + + chip->cmdfunc(mtd, NAND_CMD_RESET, 0, 0); + + udelay(100); + pxa3xx_dummy_read(mtd, 0x80); + return 0; +} + + +static int berlin_nand_pio_verifyrr_hynix(struct pxa3xx_nand *nand) +{ + int offset = 0; + int i; + unsigned char read_buf[8]; + const uint32_t addr_tbl[8] = {0xcc, 0xbf, 0xaa, 0xab, 0xcd, 0xad, 0xae, 0xaf}; + + memset(read_buf, 0, 8); + for (i=0;i<8;i++) { + offset = nand->data_column; + memset(nand->ndcb0, 0, sizeof(uint32_t)*CMD_POOL_SIZE); + nand->ndcb0[0] = NDCB0_CMD_TYPE(NDCB0_CMD_READ) + | NDCB0_ADDR_CYC(1) + | NDCB0_LEN_OVRD + | 0x37; + nand->ndcb0[1] = addr_tbl[i]; + nand->ndcb0[2] = 1<<8; + nand->ndcb0[3] = 8; + + berlin_nand_pio_start(nand,0); + if (wait_status_bit_set(nand, NDSR_WRCMDREQ) == -1) + return -EBUSY; + berlin_nand_pio_write_cmd_4(nand); + handle_data_pio_rr(nand, read_buf, 8, STATE_PIO_READING); + printk("%02x ",*read_buf); + } + return 0; +} + +int get_saved_rr_table(struct pxa3xx_nand *nand, struct nand_flash_dev *flash) +{ + struct pxa3xx_nand_read_retry *retry = nand->retry; + int rr_page, rr_page_idx, rr_block_idx, ret = -1; + u32 magic_id; + + rr_page = (flash->chipsize << 10) / (flash->pagesize >> 10); + + { + struct mtd_info *mtd = get_mtd_by_info(nand->info[0]); + struct nand_chip *chip = mtd->priv; + if ((chip->oob_poi == NULL) && chip->buffers) { + chip->oob_poi = chip->buffers->databuf + mtd->writesize; + } + } + + for (rr_block_idx = 0; rr_block_idx < 8; rr_block_idx++) { + for (rr_page_idx = 0; rr_page_idx < 8; rr_page_idx++) { + uint rr_c, rr_rn, rr_total, offset; + u8 *p_rr_buf; + pxa3xx_nand_intern_read(nand, nand->bounce_buffer, rr_page + rr_page_idx); + if (nand->retcode == ERR_DBERR + || nand->retcode == ERR_BBERR) { + continue; + } + memcpy(&magic_id, nand->bounce_buffer, sizeof(u32)); + if (magic_id != 0x5a5a3412) + continue; + + rr_c = nand->bounce_buffer[4]; + rr_rn = nand->bounce_buffer[5]; + + if (rr_c >= 16 || !rr_c || rr_rn >= 16 || !rr_rn) { + continue; + } + rr_total = rr_c * rr_rn; + p_rr_buf = nand->bounce_buffer + sizeof(u32) + 2; + offset = berlin_nand_rr_tbl_verify_hynix(rr_total, p_rr_buf); + if (offset >= 0) { + int i; + retry->rr_table = (uint8_t *)kmalloc(sizeof(uint8_t) * rr_total, GFP_KERNEL); + memcpy(retry->rr_table, &p_rr_buf[offset], rr_total); + + printk(KERN_INFO "got saved rr table @page %x, (%d,%d)\n", rr_page + rr_page_idx, rr_c, rr_rn); + + for (i = 0; i < rr_total; i++) { + if ((i%rr_rn) == 0) + printk(KERN_INFO "\n "); + printk(KERN_INFO "%02x ", retry->rr_table[i]); + } + printk(KERN_INFO "\n"); + retry->rr_cycles = rr_c; + retry->rr_reg_nr = rr_rn; + retry->set_rr = berlin_nand_pio_setrr_hynix; + retry->verify_rr = berlin_nand_pio_verifyrr_hynix; + retry->rr_current_cycle = 0; + retry->rr_table_ready = 1; + + ret = 0; + goto done; + } + } + rr_page += flash->erasesize / flash->pagesize; + } +done: + + return ret; +} + +int get_opt_rr_table(struct pxa3xx_nand *nand) +{ + struct pxa3xx_nand_read_retry *retry = nand->retry; + uint rr_c, rr_rn, rr_total, offset; + unsigned char *read_buf, *p_rr_buf; + int i, ret = -EINVAL; + + read_buf = kzalloc(RR_READ_LEN, GFP_KERNEL); + if (!read_buf) + goto exit; + + if (berlin_nand_pio_readrr_hynix(nand, read_buf) != 0) { + printk("read RR table timeout\n"); + goto exit_free; + } + + rr_c = read_buf[0]; + rr_rn = read_buf[1]; + if (rr_c >= 16 || !rr_c || rr_rn >= 16 || !rr_rn) { + printk("invalid rr table header, set %d, rn %d\n", rr_c, rr_rn); + goto exit_free; + } + + rr_total = rr_c * rr_rn; + p_rr_buf = read_buf + 2; + offset = berlin_nand_rr_tbl_verify_hynix(rr_total, p_rr_buf); + if (offset >= 0) { + retry->rr_table = (uint8_t *)kmalloc(sizeof(uint8_t) * rr_total, GFP_KERNEL); + memcpy(retry->rr_table, &p_rr_buf[offset], rr_total); + } else { + printk(KERN_INFO "invalid rr table data\n"); + goto exit_free; + } + + for (i = 0; i < rr_total; i++) { + if ((i%rr_rn) == 0) + printk("\n "); + printk("%02x ", retry->rr_table[i]); + } + printk("\n"); + + retry->rr_cycles = rr_c; + retry->rr_reg_nr = rr_rn; + retry->set_rr = berlin_nand_pio_setrr_hynix; + retry->verify_rr = berlin_nand_pio_verifyrr_hynix; + retry->rr_current_cycle = 0; + retry->rr_table_ready = 1; + ret = 0; +exit_free: + kfree(read_buf); +exit: + return ret; +} + +int berlin_nand_nake_cmd(struct pxa3xx_nand *nand, u8 cmd, int last) +{ + memset(nand->ndcb0, 0, sizeof(uint32_t)*CMD_POOL_SIZE); + nand->ndcb0[0] = NDCB0_CMD_TYPE(NDCB0_CMD_NAKED_CMD) + | NDCB0_ADDR_CYC(0) + | cmd; + if (!last) + nand->ndcb0[0] |= NDCB0_NC; + + if (wait_status_bit_set(nand, NDSR_WRCMDREQ) == -1) { + return -EBUSY; + } + berlin_nand_pio_write_cmd_3(nand); + return 0; +} + +int berlin_nand_nake_addr(struct pxa3xx_nand *nand, u32 addr, int last) +{ + memset(nand->ndcb0, 0, sizeof(uint32_t)*CMD_POOL_SIZE); + nand->ndcb0[0] = NDCB0_CMD_TYPE(NDCB0_CMD_NAKED_ADDR) + | NDCB0_ADDR_CYC(1); + if (!last) + nand->ndcb0[0] |= NDCB0_NC; + + nand->ndcb0[1] = addr; + if (wait_status_bit_set(nand, NDSR_WRCMDREQ) == -1) { + return -EBUSY; + } + berlin_nand_pio_write_cmd_3(nand); + return 0; +} + + + +const unsigned int eslc_reg_addr[HY_ESLC_REG_NUM] = {0xb0, 0xb1, 0xa0, 0xa1}; +const unsigned char hynix_paired_tbl[128][2] = +{ + {0x00,0x04}, {0x01,0x05}, {0x02,0x08}, {0x03,0x09}, + {0x06,0x0C}, {0x07,0x0D}, {0x0A,0x10}, {0x0B,0x11}, + {0x0E,0x14}, {0x0F,0x15}, {0x12,0x18}, {0x13,0x19}, + {0x16,0x1C}, {0x17,0x1D}, {0x1A,0x20}, {0x1B,0x21}, + {0x1E,0x24}, {0x1F,0x25}, {0x22,0x28}, {0x23,0x29}, + {0x26,0x2C}, {0x27,0x2D}, {0x2A,0x30}, {0x2B,0x31}, + {0x2E,0x34}, {0x2F,0x35}, {0x32,0x38}, {0x33,0x39}, + {0x36,0x3C}, {0x37,0x3D}, {0x3A,0x40}, {0x3B,0x41}, + {0x3E,0x44}, {0x3F,0x45}, {0x42,0x48}, {0x43,0x49}, + {0x46,0x4C}, {0x47,0x4D}, {0x4A,0x50}, {0x4B,0x51}, + {0x4E,0x54}, {0x4F,0x55}, {0x52,0x58}, {0x53,0x59}, + {0x56,0x5C}, {0x57,0x5D}, {0x5A,0x60}, {0x5B,0x61}, + {0x5E,0x64}, {0x5F,0x65}, {0x62,0x68}, {0x63,0x69}, + {0x66,0x6C}, {0x67,0x6D}, {0x6A,0x70}, {0x6B,0x71}, + {0x6E,0x74}, {0x6F,0x75}, {0x72,0x78}, {0x73,0x79}, + {0x76,0x7C}, {0x77,0x7D}, {0x7A,0x80}, {0x7B,0x81}, + {0x7E,0x84}, {0x7F,0x85}, {0x82,0x88}, {0x83,0x89}, + {0x86,0x8C}, {0x87,0x8D}, {0x8A,0x90}, {0x8B,0x91}, + {0x8E,0x94}, {0x8F,0x95}, {0x92,0x98}, {0x93,0x99}, + {0x96,0x9C}, {0x97,0x9D}, {0x9A,0xA0}, {0x9B,0xA1}, + {0x9E,0xA4}, {0x9F,0xA5}, {0xA2,0xA8}, {0xA3,0xA9}, + {0xA6,0xAC}, {0xA7,0xAD}, {0xAA,0xB0}, {0xAB,0xB1}, + {0xAE,0xB4}, {0xAF,0xB5}, {0xB2,0xB8}, {0xB3,0xB9}, + {0xB6,0xBC}, {0xB7,0xBD}, {0xBA,0xC0}, {0xBB,0xC1}, + {0xBE,0xC4}, {0xBF,0xC5}, {0xC2,0xC8}, {0xC3,0xC9}, + {0xC6,0xCC}, {0xC7,0xCD}, {0xCA,0xD0}, {0xCB,0xD1}, + {0xCE,0xD4}, {0xCF,0xD5}, {0xD2,0xD8}, {0xD3,0xD9}, + {0xD6,0xDC}, {0xD7,0xDD}, {0xDA,0xE0}, {0xDB,0xE1}, + {0xDE,0xE4}, {0xDF,0xE5}, {0xE2,0xE8}, {0xE3,0xE9}, + {0xE6,0xEC}, {0xE7,0xED}, {0xEA,0xF0}, {0xEB,0xF1}, + {0xEE,0xF4}, {0xEF,0xF5}, {0xF2,0xF8}, {0xF3,0xF9}, + {0xF6,0xFC}, {0xF7,0xFD}, {0xFA,0xFE}, {0xFB,0xFF} +}; + +static int hynix_eslc_get_def(struct hynix_eslc_data *priv) +{ + struct pxa3xx_nand *nand = priv->nand; + unsigned char set_buf[8]; + int i; + + berlin_nand_pio_start(nand,0); + /* cmd 0x37 */ + berlin_nand_nake_cmd(nand, 0x37, 0); + + for (i = 0; i < HY_ESLC_REG_NUM; i++) { + berlin_nand_nake_addr(nand, priv->reg_addr[i], 0); + + /* R-data */ + memset(nand->ndcb0, 0, sizeof(uint32_t)*CMD_POOL_SIZE); + nand->ndcb0[0] = NDCB0_CMD_TYPE(NDCB0_CMD_READ) + | NDCB0_CMD_XTYPE(NDCB0_CMDX_NREAD) + | NDCB0_NC + | NDCB0_LEN_OVRD; + nand->ndcb0[3] = 8; + if (wait_status_bit_set(nand, NDSR_WRCMDREQ) == -1) { + return -EBUSY; + } + berlin_nand_pio_write_cmd_4(nand); + + if (wait_status_bit_set(nand, NDSR_RDDREQ) == -1) { + return -EBUSY; + } + + handle_data_pio_rr(nand, set_buf, 8, STATE_PIO_READING); + + priv->eslc_def[i] = set_buf[0]; + } + + for (i = 0; i < HY_ESLC_REG_NUM; i++) { + printk("0x%02x ", priv->eslc_def[i]); + } + printk("\n"); + + handle_data_dummy_rd(nand, 2048); + return 0; +} + + +int hynix_nand_eslc_en(struct hynix_eslc_data *eslc_d, int en) +{ + struct pxa3xx_nand *nand = eslc_d->nand; + struct mtd_info *mtd = get_mtd_by_info(nand->info[nand->chip_select]); + struct pxa3xx_nand_info *info = mtd->priv; + u8 *p_data_buf; + SIE_BCMCFGW *cfgw; + SIE_BCMRDAT *rdat; + SIE_BCMRCMD *rcmd; + u8 offset = 0; + int c, i=0; + + if (en) + offset = 0x0a; + + p_data_buf = nand->data_desc + DMA_H_SIZE + + sizeof(struct nand_buffers) * nand->chip_select; + //berlin_nand_pio_start(nand, 0); + mv88dexx_nand_dma_start(info, 0); + //berlin_nand_nake_cmd(nand, 0x36, 0); + /* CMD 0x36 */ + init_sema_nfccmd(nand, (SIE_BCMSEMA *)(nand->data_desc + i)); + i += sizeof(SIE_BCMSEMA); + init_cmd_3(nand, (struct cmd_3_desc *)(nand->data_desc + i)); + cfgw = (SIE_BCMCFGW *)(nand->data_desc + i); + + cfgw->u_dat = NDCB0_CMD_TYPE(NDCB0_CMD_NAKED_CMD) + | NDCB0_ADDR_CYC(0) + | NDCB0_NC + | 0x36; + i += sizeof(struct cmd_3_desc); + + for (c = 0; c < HY_ESLC_REG_NUM; c++) { + init_sema_nfccmd(nand, (SIE_BCMSEMA *)(nand->data_desc + i)); + i += sizeof(SIE_BCMSEMA); + init_cmd_3(nand, (struct cmd_3_desc *)(nand->data_desc + i)); + cfgw = (SIE_BCMCFGW *)(nand->data_desc + i); + + cfgw->u_dat = NDCB0_CMD_TYPE(NDCB0_CMD_NAKED_ADDR) + | NDCB0_ADDR_CYC(1) + | NDCB0_NC; + cfgw++; + cfgw->u_dat = eslc_d->reg_addr[c] & 0xff; + i += sizeof(struct cmd_3_desc); + //berlin_nand_nake_addr(nand, eslc_d->reg_addr[c], 0); + + /* w-cmd */ + init_sema_nfccmd(nand, (SIE_BCMSEMA *)(nand->data_desc + i)); + i += sizeof(SIE_BCMSEMA); + init_cmd_4(nand, (struct cmd_4_desc *)(nand->data_desc + i)); + cfgw = (SIE_BCMCFGW *)(nand->data_desc + i); + cfgw->u_dat = NDCB0_CMD_TYPE(NDCB0_CMD_PROGRAM) + | NDCB0_CMD_XTYPE(NDCB0_CMDX_NWRITE) + | NDCB0_NC + | NDCB0_LEN_OVRD; + cfgw += 3; + cfgw->u_dat = 8; + i += sizeof(struct cmd_4_desc); + + /* write NDDB + * 1. RCMD WRITE from DDR to Dhub local */ + memset(p_data_buf + i * 8, eslc_d->eslc_def[c] + offset, 8); + rcmd = (SIE_BCMRCMD *)(nand->data_desc + i); + init_rcmd(nand, rcmd); /* need instantiation */ + rcmd->u_ddrAdr = nand->data_desc_addr + DMA_H_SIZE + + sizeof(struct nand_buffers) * nand->chip_select + i * 8; + rcmd->u_size = 8; + i += sizeof(SIE_BCMRCMD); + + /* write NDDB + * 2. forward data from dhub to NFC NDDB */ + rdat = (SIE_BCMRDAT *)(nand->data_desc + i); + init_rdat(nand, rdat); + rdat->u_size = 8; + i += sizeof(SIE_BCMRDAT); + + + } + + /* CMD 0x16 */ + init_sema_nfccmd(nand, (SIE_BCMSEMA *)(nand->data_desc + i)); + i += sizeof(SIE_BCMSEMA); + init_cmd_3(nand, (struct cmd_3_desc *)(nand->data_desc + i)); + cfgw = (SIE_BCMCFGW *)(nand->data_desc + i); + + cfgw->u_dat = NDCB0_CMD_TYPE(NDCB0_CMD_NAKED_CMD) + | NDCB0_ADDR_CYC(0) + | 0x16; + i += sizeof(struct cmd_3_desc); + + wmb(); + dhub_channel_write_cmd( + &nand->PB_dhubHandle, /* Handle to HDL_dhub */ + NFC_DEV_CTL_CHANNEL_ID, /* Channel ID in $dHubReg */ + nand->data_desc_addr, + i, /* CMD: number of bytes to transfer */ + 0, /* CMD: semaphore operation at CMD/MTU (0/1) */ + 0, /* CMD: non-zero to check semaphore */ + 0, /* CMD: non-zero to update semaphore */ + 1, /* CMD: raise interrupt at CMD finish */ + 0, /* Pass NULL to directly update dHub, or*/ + 0 /* Pass in current cmdQ pointer (in 64b word) */ + ); + + wait_dhub_ready(nand); + berlin_nand_wait_stop(nand); + if (!en) { + /* a dummy read according to spec */ + i = 0; + udelay(100); + mv88dexx_nand_dma_start(info, 0); + udelay(50); + /* CMD 0x00 */ + init_sema_nfccmd(nand, (SIE_BCMSEMA *)(nand->data_desc + i)); + i += sizeof(SIE_BCMSEMA); + init_cmd_3(nand, (struct cmd_3_desc *)(nand->data_desc + i)); + cfgw = (SIE_BCMCFGW *)(nand->data_desc + i); + + cfgw->u_dat = NDCB0_CMD_TYPE(NDCB0_CMD_NAKED_CMD) + | NDCB0_ADDR_CYC(0) + | NDCB0_NC + | 0x00; + i += sizeof(struct cmd_3_desc); + + init_sema_nfccmd(nand, (SIE_BCMSEMA *)(nand->data_desc + i)); + i += sizeof(SIE_BCMSEMA); + init_cmd_3(nand, (struct cmd_3_desc *)(nand->data_desc + i)); + cfgw = (SIE_BCMCFGW *)(nand->data_desc + i); + cfgw->u_dat = NDCB0_CMD_TYPE(NDCB0_CMD_NAKED_ADDR) + | NDCB0_ADDR_CYC(5) + | NDCB0_NC; + i += sizeof(struct cmd_3_desc); + + init_sema_nfccmd(nand, (SIE_BCMSEMA *)(nand->data_desc + i)); + i += sizeof(SIE_BCMSEMA); + init_cmd_3(nand, (struct cmd_3_desc *)(nand->data_desc + i)); + cfgw = (SIE_BCMCFGW *)(nand->data_desc + i); + + cfgw->u_dat = NDCB0_CMD_TYPE(NDCB0_CMD_NAKED_CMD) + | NDCB0_ADDR_CYC(0) + //| NDCB0_NC + | 0x30; + i += sizeof(struct cmd_3_desc); + wmb(); + dhub_channel_write_cmd( + &nand->PB_dhubHandle, /* Handle to HDL_dhub */ + NFC_DEV_CTL_CHANNEL_ID, /* Channel ID in $dHubReg */ + nand->data_desc_addr, + i, /* CMD: number of bytes to transfer */ + 0, /* CMD: semaphore operation at CMD/MTU (0/1) */ + 0, /* CMD: non-zero to check semaphore */ + 0, /* CMD: non-zero to update semaphore */ + 1, /* CMD: raise interrupt at CMD finish */ + 0, /* Pass NULL to directly update dHub, or*/ + 0 /* Pass in current cmdQ pointer (in 64b word) */ + ); + + wait_dhub_ready(nand); + berlin_nand_wait_stop(nand); + if (wait_status_bit_set(nand, NDSR_FLASH_RDY) == -1) + return -EBUSY; + udelay(100); + + mv88dexx_nand_dma_start(info, 0); + udelay(50); + i = 0; + /* CMD 0xff */ + init_sema_nfccmd(nand, (SIE_BCMSEMA *)(nand->data_desc + i)); + i += sizeof(SIE_BCMSEMA); + init_cmd_3(nand, (struct cmd_3_desc *)(nand->data_desc + i)); + cfgw = (SIE_BCMCFGW *)(nand->data_desc + i); + + cfgw->u_dat = NDCB0_CMD_TYPE(NDCB0_CMD_NAKED_CMD) + | NDCB0_ADDR_CYC(0) + | 0xff; + i += sizeof(struct cmd_3_desc); + + wmb(); + dhub_channel_write_cmd( + &nand->PB_dhubHandle, /* Handle to HDL_dhub */ + NFC_DEV_CTL_CHANNEL_ID, /* Channel ID in $dHubReg */ + nand->data_desc_addr, + i, /* CMD: number of bytes to transfer */ + 0, /* CMD: semaphore operation at CMD/MTU (0/1) */ + 0, /* CMD: non-zero to check semaphore */ + 0, /* CMD: non-zero to update semaphore */ + 1, /* CMD: raise interrupt at CMD finish */ + 0, /* Pass NULL to directly update dHub, or*/ + 0 /* Pass in current cmdQ pointer (in 64b word) */ + ); + + wait_dhub_ready(nand); + berlin_nand_wait_stop(nand); + + udelay(200); + pxa3xx_dummy_read(mtd, eslc_d->page_addr); + udelay(100); + } + + return 0; +} + +static int hynix_slc_page_trans(struct hynix_eslc_data *eslc_d, u32 page_addr) +{ + struct pxa3xx_nand *nand = eslc_d->nand; + struct mtd_info *mtd = get_mtd_by_info(nand->info_slc[nand->chip_select]); + struct pxa3xx_nand_info *info = mtd->priv; + struct eslc_part *eslc_q; + int page = -1; + + list_for_each_entry(eslc_q, &eslc_d->slc_parts_qh, list) { + u32 start, end; + + start = eslc_q->part->offset >> info->page_shift; + end = start + (eslc_q->part->size >> info->page_shift); + if ((page_addr >= start) && (page_addr < end)) { + page = page_addr - (start>>1); + break; + } + } + return page; +} + +static int hynix_nand_set_slc_mode(struct hynix_eslc_data *eslc_d, int mode) +{ + struct pxa3xx_nand *nand = eslc_d->nand; + unsigned int i = 0; + SIE_BCMCFGW *cfgw; + uint32_t ndcr, ndeccctrl = 0, cmd; + + if (mode == SLC_MODE) { + cmd = 0xBF; + } else { + cmd = 0xBE; + } + + ndcr = nand_readl(nand, NDCR);//info->reg_ndcr; + ndcr |= NDCR_ND_RUN; + + switch (nand->ecc_strength) { + default: + ndeccctrl |= NDECCCTRL_BCH_EN; + ndeccctrl |= NDECCCTRL_ECC_THRESH(BCH_THRESHOLD); + case HAMMING_STRENGTH: + ndcr |= NDCR_ECC_EN; + case 0: + break; + } + ndeccctrl |= NDECCCTRL_ECC_STRENGTH(nand->ecc_strength); + + ndcr &= ~(NDCR_SPARE_EN | NDCR_ECC_EN); + ndeccctrl &= ~NDECCCTRL_BCH_EN; + + //nand->ndeccctrl = ndeccctrl; + //nand->ndcr = ndcr; + + cfgw = (SIE_BCMCFGW *)(nand->data_desc + i); + cfgw->u_dat = 0; + cfgw->u_devAdr = pb_get_phys_offset(nand, NDCR); + cfgw->u_hdr = BCMINSFMT_hdr_CFGW; + i += sizeof(SIE_BCMCFGW); + + cfgw = (SIE_BCMCFGW *)(nand->data_desc + i); + cfgw->u_dat = ndeccctrl; + cfgw->u_devAdr = pb_get_phys_offset(nand, NDECCCTRL); + cfgw->u_hdr = BCMINSFMT_hdr_CFGW; + i += sizeof(SIE_BCMCFGW); + + cfgw = (SIE_BCMCFGW *)(nand->data_desc + i); + cfgw->u_dat = NDSR_MASK; + cfgw->u_devAdr = pb_get_phys_offset(nand, NDSR); + cfgw->u_hdr = BCMINSFMT_hdr_CFGW; + i += sizeof(SIE_BCMCFGW); + + cfgw = (SIE_BCMCFGW *)(nand->data_desc + i); + cfgw->u_dat = ndcr; + cfgw->u_devAdr = pb_get_phys_offset(nand, NDCR); + cfgw->u_hdr = BCMINSFMT_hdr_CFGW; + i += sizeof(SIE_BCMCFGW); + + init_sema_nfccmd(nand, (SIE_BCMSEMA *)(nand->data_desc + i)); + i += sizeof(SIE_BCMSEMA); + init_cmd_3(nand, (struct cmd_3_desc *)(nand->data_desc + i)); + cfgw = (SIE_BCMCFGW *)(nand->data_desc + i); + + cfgw->u_dat = NDCB0_CMD_TYPE(NDCB0_CMD_NAKED_CMD) + | NDCB0_ADDR_CYC(0) + | cmd; + i += sizeof(struct cmd_3_desc); + + /************* restore NDECCCTRL ****************/ + cfgw = (SIE_BCMCFGW *)(nand->data_desc + i); + cfgw->u_dat = nand->ndeccctrl; + cfgw->u_devAdr = pb_get_phys_offset(nand, NDECCCTRL); + cfgw->u_hdr = BCMINSFMT_hdr_CFGW; + i += sizeof(SIE_BCMCFGW); + + wmb(); + dhub_channel_write_cmd( + &nand->PB_dhubHandle, /* Handle to HDL_dhub */ + NFC_DEV_CTL_CHANNEL_ID, /* Channel ID in $dHubReg */ + nand->data_desc_addr, + i, /* CMD: number of bytes to transfer */ + 0, /* CMD: semaphore operation at CMD/MTU (0/1) */ + 0, /* CMD: non-zero to check semaphore */ + 0, /* CMD: non-zero to update semaphore */ + 1, /* CMD: raise interrupt at CMD finish */ + 0, /* Pass NULL to directly update dHub, or*/ + 0 /* Pass in current cmdQ pointer (in 64b word) */ + ); + + wait_dhub_ready(nand); + + berlin_nand_wait_stop(nand); + return 0; +} + +static int hynix_slc_add_part(void *priv, struct mtd_partition *part) +{ + struct hynix_eslc_data *p_eslc = (struct hynix_eslc_data *) priv; + struct eslc_part *slc_partition; + + slc_partition = kmalloc(sizeof(struct eslc_part), GFP_KERNEL); + if (slc_partition) { + slc_partition->part = part; + list_add_tail(&slc_partition->list, &p_eslc->slc_parts_qh); + return 0; + } + return -ENOMEM; +} + +static int hynix_slc_start(void *priv, unsigned cmd, int page) +{ + struct hynix_eslc_data *eslc_d = (struct hynix_eslc_data *)priv; + int new_page; + + new_page = hynix_slc_page_trans(eslc_d, page); + + if (cmd == NAND_CMD_PAGEPROG || + cmd == NAND_CMD_RNDOUT || + cmd == NAND_CMD_ERASE1) { + hynix_nand_set_slc_mode(eslc_d, SLC_MODE); + /* at least 100ns delay according to spec */ + udelay(1); + } + + if (new_page != -1) { + eslc_d->page_addr = new_page; + return new_page; + } else { + return page; + } + +} + +static void hynix_slc_stop(void *priv, uint cmd) +{ + if (cmd == NAND_CMD_PAGEPROG || + cmd == NAND_CMD_RNDOUT || + cmd == NAND_CMD_ERASE1) { + hynix_nand_set_slc_mode((struct hynix_eslc_data *)priv, MLC_MODE); + /* at least 100ns delay according to spec */ + udelay(10); + } +} + +loff_t hynix_slc_get_phy_off(void *priv, loff_t off) +{ + struct hynix_eslc_data *eslc_d = (struct hynix_eslc_data *)priv; + struct eslc_part *slc_q; + + list_for_each_entry(slc_q, &eslc_d->slc_parts_qh, list) { + if ((off >= slc_q->part->offset) && + (off < (slc_q->part->offset + slc_q->part->size))) { + return ((off - slc_q->part->offset) << 1) + + slc_q->part->offset; + } + } + printk(KERN_ERR "eslc get phy offset failed!!!\n"); + return off; +} + +static int hynix_eslc_page_trans(struct hynix_eslc_data *eslc_d, u32 page_addr) +{ + struct pxa3xx_nand *nand = eslc_d->nand; + struct mtd_info *mtd = get_mtd_by_info(nand->info_eslc[nand->chip_select]); + struct pxa3xx_nand_info *info = mtd->priv; + struct eslc_part *eslc_q; + u32 inter_off, pages_per_blk, page_shift; + int page = -1; + + page_shift = info->erase_shift - info->page_shift; + pages_per_blk = 1 << page_shift; + list_for_each_entry(eslc_q, &eslc_d->eslc_parts_qh, list) { + u32 start, end; + + start = eslc_q->part->offset >> info->page_shift; + end = start + (eslc_q->part->size >> info->page_shift); + if ((page_addr >= start) && (page_addr < end)) { + page_addr -= start; + inter_off = page_addr % pages_per_blk; + inter_off = hynix_paired_tbl[inter_off][0]; + page = (page_addr >> page_shift) << (page_shift + 1); + page += start + inter_off; + break; + } + } + return page; +} + +loff_t hynix_get_phy_off(void *priv, loff_t off) +{ + struct hynix_eslc_data *eslc_d = (struct hynix_eslc_data *)priv; + struct eslc_part *eslc_q; + + list_for_each_entry(eslc_q, &eslc_d->eslc_parts_qh, list) { + if ((off >= eslc_q->part->offset) && + (off < (eslc_q->part->offset + eslc_q->part->size))) { + return ((off - eslc_q->part->offset) << 1) + + eslc_q->part->offset; + } + } + printk(KERN_ERR "eslc get phy offset failed!!!\n"); + return off; +} + +static int hynix_eslc_add_part(void *priv, struct mtd_partition *part) +{ + struct hynix_eslc_data *p_eslc = (struct hynix_eslc_data *) priv; + struct eslc_part *eslc_partition; + + eslc_partition = kmalloc(sizeof(struct eslc_part), GFP_KERNEL); + if (eslc_partition) { + eslc_partition->part = part; + list_add_tail(&eslc_partition->list, &p_eslc->eslc_parts_qh); + return 0; + } + return -ENOMEM; +} + +static int hynix_eslc_start(void *priv, unsigned cmd, int page) +{ + struct hynix_eslc_data *eslc_d = (struct hynix_eslc_data *)priv; + int new_page; + + new_page = hynix_eslc_page_trans(eslc_d, page); + + if (cmd == NAND_CMD_PAGEPROG) { + hynix_nand_eslc_en((struct hynix_eslc_data *)priv, 1); + } + + if (new_page != -1) { + eslc_d->page_addr = new_page; + return new_page; + } else { + return page; + } + +} + +static void hynix_eslc_stop(void *priv, uint cmd) +{ + if (cmd == NAND_CMD_PAGEPROG) { + hynix_nand_eslc_en((struct hynix_eslc_data *)priv, 0); + } +} + +struct pxa3xx_nand_slc* hynix_slc_init(struct pxa3xx_nand *nand) +{ + struct pxa3xx_nand_slc *p_slc = NULL; + struct hynix_eslc_data *priv; + p_slc = kmalloc(sizeof(struct pxa3xx_nand_slc), GFP_KERNEL); + if (!p_slc) + return NULL; + + p_slc->priv = kmalloc(sizeof(struct hynix_eslc_data), GFP_KERNEL); + if (!p_slc->priv) { + kfree(p_slc); + return NULL; + } + + priv = (struct hynix_eslc_data *)p_slc->priv; + priv->nand = nand; + priv->reg_addr = eslc_reg_addr; + INIT_LIST_HEAD(&priv->eslc_parts_qh); + hynix_eslc_get_def(priv); + + p_slc->eslc_part_add = hynix_eslc_add_part; + p_slc->eslc_start = hynix_eslc_start; + p_slc->eslc_stop = hynix_eslc_stop; + p_slc->eslc_get_phy_off = hynix_get_phy_off; + + + p_slc->slc_part_add = hynix_slc_add_part; + p_slc->slc_start = hynix_slc_start; + p_slc->slc_stop = hynix_slc_stop; + p_slc->slc_get_phy_off = hynix_slc_get_phy_off; + INIT_LIST_HEAD(&priv->slc_parts_qh); + + return p_slc; +} + + +void hynix_slc_deinit(struct pxa3xx_nand *nand) +{ + if (nand->p_slc) { + if (nand->p_slc->priv) { + struct eslc_part *eslc_part; + struct hynix_eslc_data *priv; + + priv = (struct hynix_eslc_data *)nand->p_slc->priv; + list_for_each_entry(eslc_part, &priv->eslc_parts_qh, list) { + list_del(&eslc_part->list); + kfree(eslc_part); + } + list_for_each_entry(eslc_part, &priv->slc_parts_qh, list) { + list_del(&eslc_part->list); + kfree(eslc_part); + } + kfree(nand->p_slc->priv); + } + kfree(nand->p_slc); + } + + nand->p_slc = NULL; +} +int berlin_nand_rr_init(struct pxa3xx_nand *nand, struct nand_flash_dev *flash) +{ + int ret = 0; + struct pxa3xx_nand_read_retry *retry = nand->retry; + + switch (retry->rr_type) { + case HYNIX_H27UCG8T_RR_MODE1: + if (retry->rr_table_ready) + break; + if (!nand->p_slc) { + nand->p_slc = hynix_slc_init(nand); + } + ret = get_saved_rr_table(nand, flash); + if (ret != 0) { + ret = get_opt_rr_table(nand); + } + break; + case NO_READ_RETRY: + retry->rr_cycles = 0; + retry->rr_reg_nr = 0; + retry->rr_table_ready = 0; + retry->rr_table = NULL; + retry->set_rr = NULL; + retry->verify_rr = NULL; + printk("READ RETRY :\n TYPE:NOT SUPPORTING\n"); + break; + } + return ret; +} + +void berlin_nand_rr_exit(struct pxa3xx_nand *nand) +{ + struct pxa3xx_nand_read_retry *retry = nand->retry; + if (retry->rr_table != NULL) + kfree(retry->rr_table); + kfree(retry); + + if (nand->p_slc) { + hynix_slc_deinit(nand); + } +} diff --git a/arch/arm/mach-berlin/modules/nfc/pxa3xx_nand_read_retry_debu.h b/arch/arm/mach-berlin/modules/nfc/pxa3xx_nand_read_retry_debu.h new file mode 100644 index 00000000..2b7ca189 --- /dev/null +++ b/arch/arm/mach-berlin/modules/nfc/pxa3xx_nand_read_retry_debu.h @@ -0,0 +1,51 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + +#ifndef _PXA3XX_NAND_READ_RETRY_DEBU_ +#define _PXA3XX_NAND_READ_RETRY_DEBU_ +/** nand read retry API. + * + * all the read retry serial function here ,including various kinds of nand chip. + * step 1, call read_rr function to read out the register parameter. + * step 2, call set_rr to set these parameter to nand chip register when ecc fail in read operation + * + * Note: + * + * Author: Tianjun hu, hutj@marvell.com + */ + +#include + +#define NAND_TIME_OUT 1000000 +#define RR_CMD_LEN 5 +#define RR_ADDR_LEN 5 +#define RR_READ_LEN 2048 + + +#define SLC_MODE 0x5aa5 +#define MLC_MODE 0 + +enum { + NO_READ_RETRY = 0, + HYNIX_H27UCG8T_RR_MODE1, +} ; + +int berlin_nand_rr_init(struct pxa3xx_nand *nand, struct nand_flash_dev *flash); +void berlin_nand_rr_exit(struct pxa3xx_nand *nand); + + +#endif /* _PXA3XX_NAND_READ_RETRY_DEBU_ */ + diff --git a/arch/arm/mach-berlin/modules/pe/Makefile b/arch/arm/mach-berlin/modules/pe/Makefile index 40f15df9..8c3287db 100644 --- a/arch/arm/mach-berlin/modules/pe/Makefile +++ b/arch/arm/mach-berlin/modules/pe/Makefile @@ -1,18 +1,12 @@ include $(srctree)/arch/arm/mach-berlin/mv88de3100.mk -ifeq ($(CONFIG_BERLIN2CD),y) - MV_DEFINE += -DBERLIN_CHIP_VERSION=BERLIN_BG2CD_A0 -endif - HEADER_PATH += \ -I$(srctree)/arch/arm/mach-berlin/modules/shm \ -I$(srctree)/arch/arm/mach-berlin/modules/cc \ -I$(srctree)/arch/arm/mach-berlin/modules/nfc \ -I$(srctree)/arch/arm/mach-berlin/modules/pe/gsinc \ -ifeq ($(CONFIG_BERLIN2CD),y) - HEADER_PATH += -I$(srctree)/arch/arm/mach-berlin/modules/pe/gsinc/Firmware_Berlin_BG2CD_A0 -endif +HEADER_PATH += -I$(srctree)/arch/arm/mach-berlin/modules/pe/gsinc/$(FIRMWARE) ccflags-y += $(MV_DEFINE) $(HEADER_PATH) diff --git a/arch/arm/mach-berlin/modules/pe/avio_dhub_drv.c b/arch/arm/mach-berlin/modules/pe/avio_dhub_drv.c index 72c23906..d7f71b79 100644 --- a/arch/arm/mach-berlin/modules/pe/avio_dhub_drv.c +++ b/arch/arm/mach-berlin/modules/pe/avio_dhub_drv.c @@ -1,304 +1,319 @@ -/******************************************************************************* -* Copyright (C) Marvell International Ltd. and its affiliates -* -* Marvell GPL License Option -* -* If you received this File from Marvell, you may opt to use, redistribute and/or -* modify this File in accordance with the terms and conditions of the General -* Public License Version 2, June 1991 (the "GPL License"), a copy of which is -* available along with the File in the license.txt file or by writing to the Free -* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or -* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. -* -* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED -* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY -* DISCLAIMED. The GPL License provides additional details about this warranty -* disclaimer. +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the GPL License), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. ********************************************************************************/ -#include "api_avio_dhub.h" -HDL_dhub2d AG_dhubHandle; -HDL_dhub2d VPP_dhubHandle; -#if (BERLIN_CHIP_VERSION >= BERLIN_BG2) -HDL_dhub2d VIP_dhubHandle; -#endif +#ifndef avio_dhub_drv.c +#define avio_dhub_drv.c (){} -#if (BERLIN_CHIP_VERSION >= BERLIN_BG2) -DHUB_channel_config VIP_config[VIP_NUM_OF_CHANNELS] = { -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) - // BANK0 - { avioDhubChMap_vip_SD_WR, VIP_DHUB_BANK0_START_ADDR, VIP_DHUB_BANK0_START_ADDR+32, 32, (6144-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vip_SD_RE, VIP_DHUB_BANK0_START_ADDR + 6144, VIP_DHUB_BANK0_START_ADDR + 6144+32, 32, (6144-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, -#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ -#if (BERLIN_CHIP_VERSION == BERLIN_BG2) // Z1 - // BANK1 - { avioDhubChMap_vip_HDMI_DWR, VIP_DHUB_BANK1_START_ADDR, VIP_DHUB_BANK1_START_ADDR+32, 32, (1024*4-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vip_HDMI_AWR0, VIP_DHUB_BANK1_START_ADDR + 4096, VIP_DHUB_BANK1_START_ADDR + 4096+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vip_HDMI_AWR1, VIP_DHUB_BANK1_START_ADDR + 6144, VIP_DHUB_BANK1_START_ADDR + 6144+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vip_HDMI_AWR2, VIP_DHUB_BANK1_START_ADDR + 8192, VIP_DHUB_BANK1_START_ADDR + 8192+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vip_HDMI_AWR3, VIP_DHUB_BANK1_START_ADDR + 10240, VIP_DHUB_BANK1_START_ADDR + 10240+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - // BANK2 - { avioDhubChMap_vip_DVI_WR, VIP_DHUB_BANK2_START_ADDR, VIP_DHUB_BANK2_START_ADDR+32, 32, (1024*12-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - // BANK3 - { avioDhubChMap_vip_VBI_WR, VIP_DHUB_BANK3_START_ADDR, VIP_DHUB_BANK3_START_ADDR+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, -#elif (BERLIN_CHIP_VERSION == BERLIN_BG2_Z2) //Z2 - // BANK1 - { avioDhubChMap_vip_DVI_WR, VIP_DHUB_BANK1_START_ADDR, VIP_DHUB_BANK1_START_ADDR+32, 32, (1024*12-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - // BANK2 - { avioDhubChMap_vip_VBI_WR, VIP_DHUB_BANK2_START_ADDR, VIP_DHUB_BANK2_START_ADDR+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - -#else // (BERLIN_CHIP_VERSION == BERLIN_BG2_A0) //A0 -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) - // BANK1 - { avioDhubChMap_vip_DVI_WR, VIP_DHUB_BANK1_START_ADDR, VIP_DHUB_BANK1_START_ADDR+32, 32, (1024*12-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - // BANK2 - //use 8-byte MTU for VBI data workaround! - { avioDhubChMap_vip_VBI_WR, VIP_DHUB_BANK2_START_ADDR, VIP_DHUB_BANK2_START_ADDR+32, 32, (1024-32), dHubChannel_CFG_MTU_8byte, 0, 0, 1}, - { avioDhubChMap_vip_MIC0_W, VIP_DHUB_BANK2_START_ADDR+1024, VIP_DHUB_BANK2_START_ADDR+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vip_MIC1_W, VIP_DHUB_BANK2_START_ADDR+1024*2, VIP_DHUB_BANK2_START_ADDR+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vip_MIC2_W, VIP_DHUB_BANK2_START_ADDR+1024*3, VIP_DHUB_BANK2_START_ADDR+1024*3+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vip_MIC3_W, VIP_DHUB_BANK2_START_ADDR+1024*4, VIP_DHUB_BANK2_START_ADDR+1024*4+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, -#else /* (BERLIN_CHIP_VERSION == BERLIN_BG2CD_A0) */ - // BANK1 - { avioDhubChMap_vip_DVI_WR, VIP_DHUB_BANK0_START_ADDR, VIP_DHUB_BANK0_START_ADDR+32, 32, (1024*12-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - // BANK2 - { avioDhubChMap_vip_MIC0_W, VIP_DHUB_BANK1_START_ADDR+1024, VIP_DHUB_BANK1_START_ADDR+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vip_MIC1_W, VIP_DHUB_BANK1_START_ADDR+1024*2, VIP_DHUB_BANK1_START_ADDR+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vip_MIC2_W, VIP_DHUB_BANK1_START_ADDR+1024*3, VIP_DHUB_BANK1_START_ADDR+1024*3+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vip_MIC3_W, VIP_DHUB_BANK1_START_ADDR+1024*4, VIP_DHUB_BANK1_START_ADDR+1024*4+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, -#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ -#endif -}; -#endif - -DHUB_channel_config VPP_config[VPP_NUM_OF_CHANNELS] = { -#if (BERLIN_CHIP_VERSION >= BERLIN_B_0) -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) - // BANK0 - { avioDhubChMap_vpp_MV_R, DHUB_BANK0_START_ADDR, DHUB_BANK0_START_ADDR+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_MV_FRC_R, DHUB_BANK0_START_ADDR + 2048*2, DHUB_BANK0_START_ADDR + 2048*2+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_MV_FRC_W, DHUB_BANK0_START_ADDR + 2048*3, DHUB_BANK0_START_ADDR + 2048*3+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - // BANK1 - { avioDhubChMap_vpp_PIP_R, DHUB_BANK1_START_ADDR, DHUB_BANK1_START_ADDR+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_PIP_FRC_R,DHUB_BANK1_START_ADDR +2048*2, DHUB_BANK1_START_ADDR + 2048*2+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_PIP_FRC_W,DHUB_BANK1_START_ADDR + 2048*3, DHUB_BANK1_START_ADDR + 2048*3+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - // BANK2 - { avioDhubChMap_vpp_DINT0_R,DHUB_BANK2_START_ADDR, DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // BANK3 - { avioDhubChMap_vpp_DINT1_R,DHUB_BANK3_START_ADDR, DHUB_BANK3_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // BANK4 - { avioDhubChMap_vpp_DINT_W,DHUB_BANK4_START_ADDR, DHUB_BANK4_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // Bank5 -#if (BERLIN_CHIP_VERSION >= BERLIN_BG2) - { avioDhubChMap_vpp_BCM_R, DHUB_BANK5_START_ADDR, DHUB_BANK5_START_ADDR+512, 512, (1024-512), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vpp_HDMI_R, DHUB_BANK5_START_ADDR+1024, DHUB_BANK5_START_ADDR+1024+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, -#else - { avioDhubChMap_vpp_BCM_R, DHUB_BANK5_START_ADDR, DHUB_BANK5_START_ADDR+128, 128, (512-128), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vpp_HDMI_R, DHUB_BANK5_START_ADDR+512, DHUB_BANK5_START_ADDR+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, -#endif - { avioDhubChMap_vpp_AUX_FRC_R,DHUB_BANK5_START_ADDR+1024+512, DHUB_BANK5_START_ADDR+1024+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_AUX_FRC_W,DHUB_BANK5_START_ADDR+2048+512, DHUB_BANK5_START_ADDR+2048+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_BG_R,DHUB_BANK5_START_ADDR+2048+512*3, DHUB_BANK5_START_ADDR+2048+512*3+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_TT_R,DHUB_BANK5_START_ADDR+2048*3+512*3, DHUB_BANK5_START_ADDR+2048*3+512*3+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, -#else /* (BERLIN_CHIP_VERSION == BERLIN_BG2CD_A0) */ - // BANK0 - { avioDhubChMap_vpp_MV_R, VPP_DHUB_BANK0_START_ADDR, VPP_DHUB_BANK0_START_ADDR+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_MV_FRC_R, VPP_DHUB_BANK0_START_ADDR + 2048*2, VPP_DHUB_BANK0_START_ADDR + 2048*2+32, 32, (1024*3-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_MV_FRC_W, VPP_DHUB_BANK0_START_ADDR + 1024*7, VPP_DHUB_BANK0_START_ADDR + 1024*7+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - // BANK1 - { avioDhubChMap_vpp_DINT0_R,VPP_DHUB_BANK1_START_ADDR, VPP_DHUB_BANK1_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // BANK2 - { avioDhubChMap_vpp_DINT1_R,VPP_DHUB_BANK2_START_ADDR, VPP_DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // BANK3 - { avioDhubChMap_vpp_DINT_W,VPP_DHUB_BANK3_START_ADDR, VPP_DHUB_BANK3_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // Bank4 - { avioDhubChMap_vpp_BCM_R, VPP_DHUB_BANK4_START_ADDR, VPP_DHUB_BANK4_START_ADDR+128, 128, (1024-128), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vpp_HDMI_R, VPP_DHUB_BANK4_START_ADDR+1024, VPP_DHUB_BANK4_START_ADDR+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vpp_SPDIF_W,VPP_DHUB_BANK4_START_ADDR+1024*2, VPP_DHUB_BANK4_START_ADDR+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1} -#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ -#else - { avioDhubChMap_vpp_MV_R, 0, 0+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_vpp_MV_PBO_R, 2048*2, 2048*2+0, 0, 0, dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vpp_MV_FRC_R, 1024*4, 1024*4+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vpp_MV_FRC_W, 2048*3, 2048*3+32, 32, (2048-32), dHubChannel_CFG_MTU_32byte, 0, 0, 1}, - { avioDhubChMap_vpp_PIP_R, 2048*4, 2048*4+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vpp_PIP_PBO_R,2048*5, 2048*5+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vpp_PIP_FRC_R,2048*6, 2048*6+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vpp_PIP_FRC_W,2048*7, 2048*7+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vpp_DINT0_R,2048*8, 2048*8+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vpp_DINT1_R,2048*9, 2048*9+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vpp_DINT_W,2048*10, 2048*10+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vpp_AUX_FRC_R,2048*12, 2048*12+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vpp_AUX_FRC_W,2048*13, 2048*14+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_vpp_BG_R,2048*14, 2048*14+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, -#endif -}; -DHUB_channel_config AG_config[AG_NUM_OF_CHANNELS] = { -#if (BERLIN_CHIP_VERSION >= BERLIN_B_0) -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) - // Bank0 - { avioDhubChMap_ag_APPCMD_R, DHUB_BANK0_START_ADDR, DHUB_BANK0_START_ADDR+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA0_R, DHUB_BANK0_START_ADDR+512, DHUB_BANK0_START_ADDR+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA1_R, DHUB_BANK0_START_ADDR+512+1024,DHUB_BANK0_START_ADDR+512+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA2_R, DHUB_BANK0_START_ADDR+512+1024*2,DHUB_BANK0_START_ADDR+512+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA3_R, DHUB_BANK0_START_ADDR+512+1024*3,DHUB_BANK0_START_ADDR+512+1024*3+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_SA_R, DHUB_BANK0_START_ADDR+512+1024*4,DHUB_BANK0_START_ADDR+512+1024*4+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_SPDIF_R, DHUB_BANK0_START_ADDR+512+1024*5, DHUB_BANK0_START_ADDR+512+1024*5+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MIC_W, DHUB_BANK0_START_ADDR+1024*6, DHUB_BANK0_START_ADDR+1024*6+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_APPDAT_R, DHUB_BANK0_START_ADDR+512+1024*6, DHUB_BANK0_START_ADDR+512+1024*6+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_APPDAT_W, DHUB_BANK0_START_ADDR+1024*7, DHUB_BANK0_START_ADDR+1024*7+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - // Bank1 - { avioDhubChMap_ag_MOSD_R, DHUB_BANK1_START_ADDR, DHUB_BANK1_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // Bank2 - { avioDhubChMap_ag_CSR_R, DHUB_BANK2_START_ADDR, DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // Bank3 - { avioDhubChMap_ag_GFX_R, DHUB_BANK3_START_ADDR, DHUB_BANK3_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // Bank4 - { avioDhubChMap_ag_PG_R, DHUB_BANK4_START_ADDR, DHUB_BANK4_START_ADDR+32, 32, (2048*3-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_ag_PG_ENG_R, DHUB_BANK4_START_ADDR + (2048 * 3), DHUB_BANK4_START_ADDR + (2048 *3) + 32, 32, (1024 - 32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_PG_ENG_W, DHUB_BANK4_START_ADDR + (2048 * 3) + 1024, DHUB_BANK4_START_ADDR + (2048 * 3) + 1024 + 32, 32, (1024 - 32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, -#else /* (BERLIN_CHIP_VERSION == BERLIN_BG2CD_A0) */ - // Bank0 - { avioDhubChMap_ag_APPCMD_R, AG_DHUB_BANK0_START_ADDR, AG_DHUB_BANK0_START_ADDR+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA0_R, AG_DHUB_BANK0_START_ADDR+512, AG_DHUB_BANK0_START_ADDR+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA1_R, AG_DHUB_BANK0_START_ADDR+512+1024,AG_DHUB_BANK0_START_ADDR+512+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA2_R, AG_DHUB_BANK0_START_ADDR+512+1024*2,AG_DHUB_BANK0_START_ADDR+512+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA3_R, AG_DHUB_BANK0_START_ADDR+512+1024*3,AG_DHUB_BANK0_START_ADDR+512+1024*3+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_SPDIF_R, AG_DHUB_BANK0_START_ADDR+512+1024*5, AG_DHUB_BANK0_START_ADDR+512+1024*5+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_APPDAT_R, AG_DHUB_BANK0_START_ADDR+512+1024*6, AG_DHUB_BANK0_START_ADDR+512+1024*6+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_APPDAT_W, AG_DHUB_BANK0_START_ADDR+1024*7, AG_DHUB_BANK0_START_ADDR+1024*7+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - // Bank1 - { avioDhubChMap_ag_CSR_R, AG_DHUB_BANK1_START_ADDR, AG_DHUB_BANK1_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - // Bank2 - { avioDhubChMap_ag_GFX_R, AG_DHUB_BANK2_START_ADDR, AG_DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, -#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ -#else - { avioDhubChMap_ag_BCM_R, 0, 0+64, 64, (512-64), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA0_R, 512, 512 + 64, 64, (512-64), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA1_R, 512*2,512*2 + 64, 64, (512-64), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA2_R, 512*3,512*3 + 64, 64, (512-64), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MA3_R, 512*4,512*4 + 64, 64, (512-64), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_SA_R, 512*5,512*5 + 64, 64, (512-64), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_SPDIF_R, 512*6, 512*6 + 64, 64, (512-64), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_MIC_W, 512*7, 512*7 + 64, 64, (512-64), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - /* - { avioDhubChMap_ag_MOSD_R, 512*8, (512*8+64), 64, (256-64), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_ag_CSR_R, (4096+256 ), (4096+256+64), 64, (4096-256-64), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - */ - { avioDhubChMap_ag_MOSD_R, 512*8, (512*8+64), 64, (4096-256-64), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_ag_CSR_R, (512*8+4096-256), (512*8+4096-256+64), 64, (256-64), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_ag_GFX_R, (4096 + 4096), (4096+4096 + 64), 64, (2048*4 -64), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_ag_GFX_PBO_R, (4096 + 4096 + 2048*4), (4096+4096 + 2048*4 ), 0, 0, dHubChannel_CFG_MTU_128byte, 0, 0, 0}, - { avioDhubChMap_ag_PG_R, (4096 +4096 + 2048*4), (4096+4096 +2048*4 + 64), 64, (2048*4-64), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, - { avioDhubChMap_ag_PG_ENG_R, (4096 + 4096 + 8192 ), (4096+4096 +8192 ), 0, 0, dHubChannel_CFG_MTU_128byte, 0, 0, 1}, - { avioDhubChMap_ag_PG_ENG_W, (4096 + 4096 + 8192 ), (4096+4096 +8192 ), 0, 0, dHubChannel_CFG_MTU_128byte, 0, 0, 1}, -#endif -}; -/****************************************************************************************************************** - * Function: DhubInitialization - * Description: Initialize DHUB . - * Parameter : cpuId ------------- cpu ID - * dHubBaseAddr ------------- dHub Base address. - * hboSramAddr ----- Sram Address for HBO. - * pdhubHandle ----- pointer to 2D dhubHandle - * dhub_config ----- configuration of AG - * numOfChans ----- number of channels - * Return: void -******************************************************************************************************************/ -void DhubInitialization(SIGN32 cpuId, UNSG32 dHubBaseAddr, UNSG32 hboSramAddr, HDL_dhub2d *pdhubHandle, DHUB_channel_config *dhub_config,SIGN32 numOfChans) -{ - HDL_semaphore *pSemHandle; - SIGN32 i; - SIGN32 chanId; - - //Initialize HDL_dhub with a $dHub BIU instance. - dhub2d_hdl( hboSramAddr, /*! Base address of dHub.HBO SRAM !*/ - dHubBaseAddr, /*! Base address of a BIU instance of $dHub !*/ - pdhubHandle /*! Handle to HDL_dhub2d !*/ - ); - //set up semaphore to trigger cmd done interrupt - //note that this set of semaphores are different from the HBO semaphores - //the ID must match the dhub ID because they are hardwired. - pSemHandle = dhub_semaphore(&pdhubHandle->dhub); +#include "api_avio_dhub.h" + +HDL_dhub2d AG_dhubHandle; +HDL_dhub2d VPP_dhubHandle; +#if (BERLIN_CHIP_VERSION >= BERLIN_BG2) +HDL_dhub2d VIP_dhubHandle; +#endif + +#if ((BERLIN_CHIP_VERSION >= BERLIN_BG2) && (BERLIN_CHIP_VERSION != BERLIN_BG2CDP)) +DHUB_channel_config VIP_config[VIP_NUM_OF_CHANNELS] = { +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) + // BANK0 + { avioDhubChMap_vip_SD_WR, VIP_DHUB_BANK0_START_ADDR, VIP_DHUB_BANK0_START_ADDR+32, 32, (6144-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vip_SD_RE, VIP_DHUB_BANK0_START_ADDR + 6144, VIP_DHUB_BANK0_START_ADDR + 6144+32, 32, (6144-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, +#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ +#if (BERLIN_CHIP_VERSION == BERLIN_BG2) // Z1 + // BANK1 + { avioDhubChMap_vip_HDMI_DWR, VIP_DHUB_BANK1_START_ADDR, VIP_DHUB_BANK1_START_ADDR+32, 32, (1024*4-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vip_HDMI_AWR0, VIP_DHUB_BANK1_START_ADDR + 4096, VIP_DHUB_BANK1_START_ADDR + 4096+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vip_HDMI_AWR1, VIP_DHUB_BANK1_START_ADDR + 6144, VIP_DHUB_BANK1_START_ADDR + 6144+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vip_HDMI_AWR2, VIP_DHUB_BANK1_START_ADDR + 8192, VIP_DHUB_BANK1_START_ADDR + 8192+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vip_HDMI_AWR3, VIP_DHUB_BANK1_START_ADDR + 10240, VIP_DHUB_BANK1_START_ADDR + 10240+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // BANK2 + { avioDhubChMap_vip_DVI_WR, VIP_DHUB_BANK2_START_ADDR, VIP_DHUB_BANK2_START_ADDR+32, 32, (1024*12-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // BANK3 + { avioDhubChMap_vip_VBI_WR, VIP_DHUB_BANK3_START_ADDR, VIP_DHUB_BANK3_START_ADDR+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, +#elif (BERLIN_CHIP_VERSION == BERLIN_BG2_Z2) //Z2 + // BANK1 + { avioDhubChMap_vip_DVI_WR, VIP_DHUB_BANK1_START_ADDR, VIP_DHUB_BANK1_START_ADDR+32, 32, (1024*12-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // BANK2 + { avioDhubChMap_vip_VBI_WR, VIP_DHUB_BANK2_START_ADDR, VIP_DHUB_BANK2_START_ADDR+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + +#else // (BERLIN_CHIP_VERSION == BERLIN_BG2_A0) //A0 +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) + // BANK1 + { avioDhubChMap_vip_DVI_WR, VIP_DHUB_BANK1_START_ADDR, VIP_DHUB_BANK1_START_ADDR+32, 32, (1024*12-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // BANK2 + //use 8-byte MTU for VBI data workaround! + { avioDhubChMap_vip_VBI_WR, VIP_DHUB_BANK2_START_ADDR, VIP_DHUB_BANK2_START_ADDR+32, 32, (1024-32), dHubChannel_CFG_MTU_8byte, 0, 0, 1}, + { avioDhubChMap_vip_MIC0_W, VIP_DHUB_BANK2_START_ADDR+1024, VIP_DHUB_BANK2_START_ADDR+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vip_MIC1_W, VIP_DHUB_BANK2_START_ADDR+1024*2, VIP_DHUB_BANK2_START_ADDR+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vip_MIC2_W, VIP_DHUB_BANK2_START_ADDR+1024*3, VIP_DHUB_BANK2_START_ADDR+1024*3+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vip_MIC3_W, VIP_DHUB_BANK2_START_ADDR+1024*4, VIP_DHUB_BANK2_START_ADDR+1024*4+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, +#else /* (BERLIN_CHIP_VERSION == BERLIN_BG2CD_A0) */ + // BANK1 + { avioDhubChMap_vip_DVI_WR, VIP_DHUB_BANK0_START_ADDR, VIP_DHUB_BANK0_START_ADDR+32, 32, (1024*12-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // BANK2 + { avioDhubChMap_vip_MIC0_W, VIP_DHUB_BANK1_START_ADDR+1024, VIP_DHUB_BANK1_START_ADDR+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vip_MIC1_W, VIP_DHUB_BANK1_START_ADDR+1024*2, VIP_DHUB_BANK1_START_ADDR+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vip_MIC2_W, VIP_DHUB_BANK1_START_ADDR+1024*3, VIP_DHUB_BANK1_START_ADDR+1024*3+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vip_MIC3_W, VIP_DHUB_BANK1_START_ADDR+1024*4, VIP_DHUB_BANK1_START_ADDR+1024*4+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, +#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ +#endif +}; +#endif + +DHUB_channel_config VPP_config[VPP_NUM_OF_CHANNELS] = { +#if (BERLIN_CHIP_VERSION >= BERLIN_B_0) +#if ((BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) && (BERLIN_CHIP_VERSION != BERLIN_BG2CDP)) + // BANK0 + { avioDhubChMap_vpp_MV_R, DHUB_BANK0_START_ADDR, DHUB_BANK0_START_ADDR+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_MV_FRC_R, DHUB_BANK0_START_ADDR + 2048*2, DHUB_BANK0_START_ADDR + 2048*2+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_MV_FRC_W, DHUB_BANK0_START_ADDR + 2048*3, DHUB_BANK0_START_ADDR + 2048*3+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // BANK1 + { avioDhubChMap_vpp_PIP_R, DHUB_BANK1_START_ADDR, DHUB_BANK1_START_ADDR+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_PIP_FRC_R,DHUB_BANK1_START_ADDR +2048*2, DHUB_BANK1_START_ADDR + 2048*2+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_PIP_FRC_W,DHUB_BANK1_START_ADDR + 2048*3, DHUB_BANK1_START_ADDR + 2048*3+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // BANK2 + { avioDhubChMap_vpp_DINT0_R,DHUB_BANK2_START_ADDR, DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // BANK3 + { avioDhubChMap_vpp_DINT1_R,DHUB_BANK3_START_ADDR, DHUB_BANK3_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // BANK4 + { avioDhubChMap_vpp_DINT_W,DHUB_BANK4_START_ADDR, DHUB_BANK4_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // Bank5 +#if (BERLIN_CHIP_VERSION >= BERLIN_BG2) + { avioDhubChMap_vpp_BCM_R, DHUB_BANK5_START_ADDR, DHUB_BANK5_START_ADDR+512, 512, (1024-512), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_HDMI_R, DHUB_BANK5_START_ADDR+1024, DHUB_BANK5_START_ADDR+1024+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, +#else + { avioDhubChMap_vpp_BCM_R, DHUB_BANK5_START_ADDR, DHUB_BANK5_START_ADDR+128, 128, (512-128), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_HDMI_R, DHUB_BANK5_START_ADDR+512, DHUB_BANK5_START_ADDR+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, +#endif + { avioDhubChMap_vpp_AUX_FRC_R,DHUB_BANK5_START_ADDR+1024+512, DHUB_BANK5_START_ADDR+1024+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_AUX_FRC_W,DHUB_BANK5_START_ADDR+2048+512, DHUB_BANK5_START_ADDR+2048+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_BG_R,DHUB_BANK5_START_ADDR+2048+512*3, DHUB_BANK5_START_ADDR+2048+512*3+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_TT_R,DHUB_BANK5_START_ADDR+2048*3+512*3, DHUB_BANK5_START_ADDR+2048*3+512*3+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, +#else /* (BERLIN_CHIP_VERSION == BERLIN_BG2CD_A0) */ + // BANK0 + { avioDhubChMap_vpp_MV_R, VPP_DHUB_BANK0_START_ADDR, VPP_DHUB_BANK0_START_ADDR+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_MV_FRC_R, VPP_DHUB_BANK0_START_ADDR + 2048*2, VPP_DHUB_BANK0_START_ADDR + 2048*2+32, 32, (1024*3-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_MV_FRC_W, VPP_DHUB_BANK0_START_ADDR + 1024*7, VPP_DHUB_BANK0_START_ADDR + 1024*7+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // BANK1 + { avioDhubChMap_vpp_DINT0_R,VPP_DHUB_BANK1_START_ADDR, VPP_DHUB_BANK1_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // BANK2 + { avioDhubChMap_vpp_DINT1_R,VPP_DHUB_BANK2_START_ADDR, VPP_DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // BANK3 + { avioDhubChMap_vpp_DINT_W,VPP_DHUB_BANK3_START_ADDR, VPP_DHUB_BANK3_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // Bank4 + { avioDhubChMap_vpp_BCM_R, VPP_DHUB_BANK4_START_ADDR, VPP_DHUB_BANK4_START_ADDR+128, 128, (1024-128), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_HDMI_R, VPP_DHUB_BANK4_START_ADDR+1024, VPP_DHUB_BANK4_START_ADDR+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + { avioDhubChMap_vpp_AUX_FRC_R,DHUB_BANK5_START_ADDR+1024*2, DHUB_BANK5_START_ADDR+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_AUX_FRC_W,DHUB_BANK5_START_ADDR+1024*3, DHUB_BANK5_START_ADDR+1024*3+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_TT_R,DHUB_BANK5_START_ADDR+1024*4, DHUB_BANK5_START_ADDR+1024*4+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1} +#endif /* (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) */ +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CD_A0) + { avioDhubChMap_vpp_SPDIF_W,VPP_DHUB_BANK4_START_ADDR+1024*2, VPP_DHUB_BANK4_START_ADDR+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1} +#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ +#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) && (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) */ +#else + { avioDhubChMap_vpp_MV_R, 0, 0+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_vpp_MV_PBO_R, 2048*2, 2048*2+0, 0, 0, dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_MV_FRC_R, 1024*4, 1024*4+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_MV_FRC_W, 2048*3, 2048*3+32, 32, (2048-32), dHubChannel_CFG_MTU_32byte, 0, 0, 1}, + { avioDhubChMap_vpp_PIP_R, 2048*4, 2048*4+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_PIP_PBO_R,2048*5, 2048*5+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_PIP_FRC_R,2048*6, 2048*6+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_PIP_FRC_W,2048*7, 2048*7+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_DINT0_R,2048*8, 2048*8+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_DINT1_R,2048*9, 2048*9+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_DINT_W,2048*10, 2048*10+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_AUX_FRC_R,2048*12, 2048*12+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_AUX_FRC_W,2048*13, 2048*14+32, 32, (2048-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_vpp_BG_R,2048*14, 2048*14+32, 32, (2048*2-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, +#endif +}; +DHUB_channel_config AG_config[AG_NUM_OF_CHANNELS] = { +#if (BERLIN_CHIP_VERSION >= BERLIN_B_0) +#if ((BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) && (BERLIN_CHIP_VERSION != BERLIN_BG2CDP)) + // Bank0 + { avioDhubChMap_ag_APPCMD_R, DHUB_BANK0_START_ADDR, DHUB_BANK0_START_ADDR+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA0_R, DHUB_BANK0_START_ADDR+512, DHUB_BANK0_START_ADDR+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA1_R, DHUB_BANK0_START_ADDR+512+1024,DHUB_BANK0_START_ADDR+512+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA2_R, DHUB_BANK0_START_ADDR+512+1024*2,DHUB_BANK0_START_ADDR+512+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA3_R, DHUB_BANK0_START_ADDR+512+1024*3,DHUB_BANK0_START_ADDR+512+1024*3+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_SA_R, DHUB_BANK0_START_ADDR+512+1024*4,DHUB_BANK0_START_ADDR+512+1024*4+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_SPDIF_R, DHUB_BANK0_START_ADDR+512+1024*5, DHUB_BANK0_START_ADDR+512+1024*5+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MIC_W, DHUB_BANK0_START_ADDR+1024*6, DHUB_BANK0_START_ADDR+1024*6+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_APPDAT_R, DHUB_BANK0_START_ADDR+512+1024*6, DHUB_BANK0_START_ADDR+512+1024*6+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_APPDAT_W, DHUB_BANK0_START_ADDR+1024*7, DHUB_BANK0_START_ADDR+1024*7+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // Bank1 + { avioDhubChMap_ag_MOSD_R, DHUB_BANK1_START_ADDR, DHUB_BANK1_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // Bank2 + { avioDhubChMap_ag_CSR_R, DHUB_BANK2_START_ADDR, DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // Bank3 + { avioDhubChMap_ag_GFX_R, DHUB_BANK3_START_ADDR, DHUB_BANK3_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // Bank4 + { avioDhubChMap_ag_PG_R, DHUB_BANK4_START_ADDR, DHUB_BANK4_START_ADDR+32, 32, (2048*3-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_ag_PG_ENG_R, DHUB_BANK4_START_ADDR + (2048 * 3), DHUB_BANK4_START_ADDR + (2048 *3) + 32, 32, (1024 - 32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_PG_ENG_W, DHUB_BANK4_START_ADDR + (2048 * 3) + 1024, DHUB_BANK4_START_ADDR + (2048 * 3) + 1024 + 32, 32, (1024 - 32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, +#else /* (BERLIN_CHIP_VERSION == BERLIN_BG2CD_A0) */ + // Bank0 + { avioDhubChMap_ag_APPCMD_R, AG_DHUB_BANK0_START_ADDR, AG_DHUB_BANK0_START_ADDR+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA0_R, AG_DHUB_BANK0_START_ADDR+512, AG_DHUB_BANK0_START_ADDR+512+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA1_R, AG_DHUB_BANK0_START_ADDR+512+1024,AG_DHUB_BANK0_START_ADDR+512+1024+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA2_R, AG_DHUB_BANK0_START_ADDR+512+1024*2,AG_DHUB_BANK0_START_ADDR+512+1024*2+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA3_R, AG_DHUB_BANK0_START_ADDR+512+1024*3,AG_DHUB_BANK0_START_ADDR+512+1024*3+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, +#if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) + { avioDhubChMap_ag_SA_R, DHUB_BANK0_START_ADDR+512+1024*4,DHUB_BANK0_START_ADDR+512+1024*4+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, +#endif /* (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) */ + { avioDhubChMap_ag_SPDIF_R, AG_DHUB_BANK0_START_ADDR+512+1024*5, AG_DHUB_BANK0_START_ADDR+512+1024*5+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_APPDAT_R, AG_DHUB_BANK0_START_ADDR+512+1024*6, AG_DHUB_BANK0_START_ADDR+512+1024*6+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_APPDAT_W, AG_DHUB_BANK0_START_ADDR+1024*7, AG_DHUB_BANK0_START_ADDR+1024*7+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // Bank1 + { avioDhubChMap_ag_CSR_R, AG_DHUB_BANK1_START_ADDR, AG_DHUB_BANK1_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // Bank2 + { avioDhubChMap_ag_GFX_R, AG_DHUB_BANK2_START_ADDR, AG_DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, +#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ +#else + { avioDhubChMap_ag_BCM_R, 0, 0+64, 64, (512-64), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA0_R, 512, 512 + 64, 64, (512-64), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA1_R, 512*2,512*2 + 64, 64, (512-64), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA2_R, 512*3,512*3 + 64, 64, (512-64), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA3_R, 512*4,512*4 + 64, 64, (512-64), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_SA_R, 512*5,512*5 + 64, 64, (512-64), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_SPDIF_R, 512*6, 512*6 + 64, 64, (512-64), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MIC_W, 512*7, 512*7 + 64, 64, (512-64), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + /* + { avioDhubChMap_ag_MOSD_R, 512*8, (512*8+64), 64, (256-64), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_ag_CSR_R, (4096+256 ), (4096+256+64), 64, (4096-256-64), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + */ + { avioDhubChMap_ag_MOSD_R, 512*8, (512*8+64), 64, (4096-256-64), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_ag_CSR_R, (512*8+4096-256), (512*8+4096-256+64), 64, (256-64), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_ag_GFX_R, (4096 + 4096), (4096+4096 + 64), 64, (2048*4 -64), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_ag_GFX_PBO_R, (4096 + 4096 + 2048*4), (4096+4096 + 2048*4 ), 0, 0, dHubChannel_CFG_MTU_128byte, 0, 0, 0}, + { avioDhubChMap_ag_PG_R, (4096 +4096 + 2048*4), (4096+4096 +2048*4 + 64), 64, (2048*4-64), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + { avioDhubChMap_ag_PG_ENG_R, (4096 + 4096 + 8192 ), (4096+4096 +8192 ), 0, 0, dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_PG_ENG_W, (4096 + 4096 + 8192 ), (4096+4096 +8192 ), 0, 0, dHubChannel_CFG_MTU_128byte, 0, 0, 1}, +#endif +}; +/****************************************************************************************************************** + * Function: DhubInitialization + * Description: Initialize DHUB . + * Parameter : cpuId ------------- cpu ID + * dHubBaseAddr ------------- dHub Base address. + * hboSramAddr ----- Sram Address for HBO. + * pdhubHandle ----- pointer to 2D dhubHandle + * dhub_config ----- configuration of AG + * numOfChans ----- number of channels + * Return: void +******************************************************************************************************************/ +void DhubInitialization(SIGN32 cpuId, UNSG32 dHubBaseAddr, UNSG32 hboSramAddr, HDL_dhub2d *pdhubHandle, DHUB_channel_config *dhub_config,SIGN32 numOfChans) +{ + HDL_semaphore *pSemHandle; + SIGN32 i; + SIGN32 chanId; + + //Initialize HDL_dhub with a $dHub BIU instance. + dhub2d_hdl( hboSramAddr, /*! Base address of dHub.HBO SRAM !*/ + dHubBaseAddr, /*! Base address of a BIU instance of $dHub !*/ + pdhubHandle /*! Handle to HDL_dhub2d !*/ + ); + //set up semaphore to trigger cmd done interrupt + //note that this set of semaphores are different from the HBO semaphores + //the ID must match the dhub ID because they are hardwired. + pSemHandle = dhub_semaphore(&pdhubHandle->dhub); + + for (i = 0; i< numOfChans; i++) { + //Configurate a dHub channel + //note that in this function, it also configured right HBO channels(cmdQ and dataQ) and semaphores + chanId = dhub_config[i].chanId; + { + dhub_channel_cfg( + &pdhubHandle->dhub, /*! Handle to HDL_dhub !*/ + chanId, /*! Channel ID in $dHubReg !*/ + dhub_config[chanId].chanCmdBase, //UNSG32 baseCmd, /*! Channel FIFO base address (byte address) for cmdQ !*/ + dhub_config[chanId].chanDataBase, //UNSG32 baseData, /*! Channel FIFO base address (byte address) for dataQ !*/ + dhub_config[chanId].chanCmdSize/8, //SIGN32 depthCmd, /*! Channel FIFO depth for cmdQ, in 64b word !*/ + dhub_config[chanId].chanDataSize/8, //SIGN32 depthData, /*! Channel FIFO depth for dataQ, in 64b word !*/ + dhub_config[chanId].chanMtuSize, /*! See 'dHubChannel.CFG.MTU', 0/1/2 for 8/32/128 bytes !*/ + dhub_config[chanId].chanQos, /*! See 'dHubChannel.CFG.QoS' !*/ + dhub_config[chanId].chanSelfLoop, /*! See 'dHubChannel.CFG.selfLoop' !*/ + dhub_config[chanId].chanEnable, /*! 0 to disable, 1 to enable !*/ + 0 /*! Pass NULL to directly init dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + // setup interrupt for channel chanId + //configure the semaphore depth to be 1 + semaphore_cfg(pSemHandle, chanId, 1, 0); +#if 0 + // enable interrupt from this semaphore + semaphore_intr_enable ( + pSemHandle, // semaphore handler + chanId, + 0, // empty + 1, // full + 0, // almost_empty + 0, // almost_full + cpuId // 0~2, depending on which CPU the interrupt is enabled for. + ); +#endif + } + } +} + +/****************************************************************************************************************** + * Function: DhubChannelClear + * Description: Clear corresponding DHUB channel. + * Parameter: hdl ---------- handle to HDL_dhub + * id ---------- channel ID in dHubReg + * cfgQ ---------- pass null to directly init dhub, or pass non-zero to receive programming + * sequence in (adr, data) pairs + * Return: void +******************************************************************************************************************/ +void DhubChannelClear(void *hdl, SIGN32 id, T64b cfgQ[]) +{ + UNSG32 cmdID = dhub_id2hbo_cmdQ(id); + UNSG32 dataID = dhub_id2hbo_data(id); + HDL_dhub *dhub = (HDL_dhub *)hdl; + HDL_hbo *hbo = &(dhub->hbo); + + /* 1.Software stops the command queue in HBO (please refer to HBO.sxw for details) */ + hbo_queue_enable(hbo, cmdID, 0, cfgQ); + /* 2.Software stops the channel in dHub by writing zero to dHubChannel.START.EN */ + dhub_channel_enable(dhub, id, 0, cfgQ); + /* 3.Software clears the channel in dHub by writing one to dHubChannel.CLEAR.EN */ + dhub_channel_clear(dhub, id); + /* 4.Software waits for the register bits dHubChannel.PENDING.ST and dHubChannel.BUSY.ST to be 0 */ + dhub_channel_clear_done(dhub, id); + /* 5.Software stops and clears the command queue */ + hbo_queue_enable(hbo, cmdID, 0, cfgQ); + hbo_queue_clear(hbo, cmdID); + /* 6.Software wait for the corresponding busy bit to be 0 */ + hbo_queue_clear_done(hbo, cmdID); + /* 7.Software stops and clears the data queue */ + hbo_queue_enable(hbo, dataID, 0, cfgQ); + hbo_queue_clear(hbo, dataID); + /* 8.Software wait for the corresponding data Q busy bit to be 0 */ + hbo_queue_clear_done(hbo, dataID); + /* 9.Software enable dHub and HBO */ + dhub_channel_enable(dhub, id, 1, cfgQ); + hbo_queue_enable(hbo, cmdID, 1, cfgQ); + hbo_queue_enable(hbo, dataID, 1, cfgQ); +} - for (i = 0; i< numOfChans; i++) { - //Configurate a dHub channel - //note that in this function, it also configured right HBO channels(cmdQ and dataQ) and semaphores - chanId = dhub_config[i].chanId; - { - dhub_channel_cfg( - &pdhubHandle->dhub, /*! Handle to HDL_dhub !*/ - chanId, /*! Channel ID in $dHubReg !*/ - dhub_config[chanId].chanCmdBase, //UNSG32 baseCmd, /*! Channel FIFO base address (byte address) for cmdQ !*/ - dhub_config[chanId].chanDataBase, //UNSG32 baseData, /*! Channel FIFO base address (byte address) for dataQ !*/ - dhub_config[chanId].chanCmdSize/8, //SIGN32 depthCmd, /*! Channel FIFO depth for cmdQ, in 64b word !*/ - dhub_config[chanId].chanDataSize/8, //SIGN32 depthData, /*! Channel FIFO depth for dataQ, in 64b word !*/ - dhub_config[chanId].chanMtuSize, /*! See 'dHubChannel.CFG.MTU', 0/1/2 for 8/32/128 bytes !*/ - dhub_config[chanId].chanQos, /*! See 'dHubChannel.CFG.QoS' !*/ - dhub_config[chanId].chanSelfLoop, /*! See 'dHubChannel.CFG.selfLoop' !*/ - dhub_config[chanId].chanEnable, /*! 0 to disable, 1 to enable !*/ - 0 /*! Pass NULL to directly init dHub, or - Pass non-zero to receive programming sequence - in (adr,data) pairs - !*/ - ); - // setup interrupt for channel chanId - //configure the semaphore depth to be 1 - semaphore_cfg(pSemHandle, chanId, 1, 0); -#if 0 - // enable interrupt from this semaphore - semaphore_intr_enable ( - pSemHandle, // semaphore handler - chanId, - 0, // empty - 1, // full - 0, // almost_empty - 0, // almost_full - cpuId // 0~2, depending on which CPU the interrupt is enabled for. - ); #endif - } - } -} - -/****************************************************************************************************************** - * Function: DhubChannelClear - * Description: Clear corresponding DHUB channel. - * Parameter: hdl ---------- handle to HDL_dhub - * id ---------- channel ID in dHubReg - * cfgQ ---------- pass null to directly init dhub, or pass non-zero to receive programming - * sequence in (adr, data) pairs - * Return: void -******************************************************************************************************************/ -void DhubChannelClear(void *hdl, SIGN32 id, T64b cfgQ[]) -{ - UNSG32 cmdID = dhub_id2hbo_cmdQ(id); - UNSG32 dataID = dhub_id2hbo_data(id); - HDL_dhub *dhub = (HDL_dhub *)hdl; - HDL_hbo *hbo = &(dhub->hbo); - - /* 1.Software stops the command queue in HBO (please refer to HBO.sxw for details) */ - hbo_queue_enable(hbo, cmdID, 0, cfgQ); - /* 2.Software stops the channel in dHub by writing zero to dHubChannel.START.EN */ - dhub_channel_enable(dhub, id, 0, cfgQ); - /* 3.Software clears the channel in dHub by writing one to dHubChannel.CLEAR.EN */ - dhub_channel_clear(dhub, id); - /* 4.Software waits for the register bits dHubChannel.PENDING.ST and dHubChannel.BUSY.ST to be 0 */ - dhub_channel_clear_done(dhub, id); - /* 5.Software stops and clears the command queue */ - hbo_queue_enable(hbo, cmdID, 0, cfgQ); - hbo_queue_clear(hbo, cmdID); - /* 6.Software wait for the corresponding busy bit to be 0 */ - hbo_queue_clear_done(hbo, cmdID); - /* 7.Software stops and clears the data queue */ - hbo_queue_enable(hbo, dataID, 0, cfgQ); - hbo_queue_clear(hbo, dataID); - /* 8.Software wait for the corresponding data Q busy bit to be 0 */ - hbo_queue_clear_done(hbo, dataID); - /* 9.Software enable dHub and HBO */ - dhub_channel_enable(dhub, id, 1, cfgQ); - hbo_queue_enable(hbo, cmdID, 1, cfgQ); - hbo_queue_enable(hbo, dataID, 1, cfgQ); -} - diff --git a/arch/arm/mach-berlin/modules/pe/gsinc/Firmware_Berlin_BG2CDP/avioDhub.h b/arch/arm/mach-berlin/modules/pe/gsinc/Firmware_Berlin_BG2CDP/avioDhub.h new file mode 100644 index 00000000..3b724fd5 --- /dev/null +++ b/arch/arm/mach-berlin/modules/pe/gsinc/Firmware_Berlin_BG2CDP/avioDhub.h @@ -0,0 +1,161 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the GPL License), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + +#ifndef avioDhub_h +#define avioDhub_h (){} + + #define RA_SemaINTR_mask 0x0000 + #define RA_Semaphore_CFG 0x0000 + #define RA_Semaphore_INTR 0x0004 + #define RA_Semaphore_mask 0x0010 + #define RA_SemaQuery_RESP 0x0000 + #define RA_SemaQueryMap_ADDR 0x0000 + #define RA_SemaHub_Query 0x0000 + #define RA_SemaHub_counter 0x0000 + #define RA_SemaHub_ARR 0x0100 + #define RA_SemaHub_cell 0x0100 + #define RA_SemaHub_PUSH 0x0380 + #define RA_SemaHub_POP 0x0384 + #define RA_SemaHub_empty 0x0388 + #define RA_SemaHub_full 0x038C + #define RA_SemaHub_almostEmpty 0x0390 + #define RA_SemaHub_almostFull 0x0394 + #define RA_FiFo_CFG 0x0000 + #define RA_FiFo_START 0x0004 + #define RA_FiFo_CLEAR 0x0008 + #define RA_FiFo_FLUSH 0x000C + #define RA_HBO_FiFoCtl 0x0000 + #define RA_HBO_ARR 0x0400 + #define RA_HBO_FiFo 0x0400 + #define RA_HBO_BUSY 0x0600 + #define RA_LLDesFmt_mem 0x0000 + #define RA_dHubCmdHDR_DESC 0x0000 + #define RA_dHubCmd_MEM 0x0000 + #define RA_dHubCmd_HDR 0x0004 + #define RA_dHubChannel_CFG 0x0000 + #define RA_dHubChannel_START 0x0004 + #define RA_dHubChannel_CLEAR 0x0008 + #define RA_dHubChannel_FLUSH 0x000C + #define RA_dHubReg_SemaHub 0x0000 + #define RA_dHubReg_HBO 0x0400 + #define RA_dHubReg_ARR 0x0B00 + #define RA_dHubReg_channelCtl 0x0B00 + #define RA_dHubReg_BUSY 0x0C00 + #define RA_dHubReg_PENDING 0x0C04 + #define RA_dHubReg_busRstEn 0x0C08 + #define RA_dHubReg_busRstDone 0x0C0C + #define RA_dHubReg_flowCtl 0x0C10 + #define RA_dHubReg_axiCmdCol 0x0C14 + #define RA_dHubCmd2D_MEM 0x0000 + #define RA_dHubCmd2D_DESC 0x0004 + #define RA_dHubCmd2D_START 0x0008 + #define RA_dHubCmd2D_CLEAR 0x000C + #define RA_dHubCmd2D_HDR 0x0010 + #define RA_dHubQuery_RESP 0x0000 + #define RA_dHubReg2D_dHub 0x0000 + #define RA_dHubReg2D_ARR 0x0D00 + #define RA_dHubReg2D_Cmd2D 0x0D00 + #define RA_dHubReg2D_BUSY 0x0F00 + #define RA_dHubReg2D_CH_ST 0x0F40 + #define RA_avioDhubTcmMap_dummy 0x0000 + #define RA_vppDhub_tcm0 0x0000 + #define RA_vppDhub_dHub0 0x10000 + #define RA_agDhub_tcm0 0x0000 + #define RA_agDhub_dHub0 0x10000 + #define avioDhubChMap_vpp_MV_R 0x0 + #define avioDhubChMap_vpp_MV_FRC_R 0x1 + #define avioDhubChMap_vpp_MV_FRC_W 0x2 + #define avioDhubChMap_vpp_DINT0_R 0x3 + #define avioDhubChMap_vpp_DINT1_R 0x4 + #define avioDhubChMap_vpp_DINT_W 0x5 + #define avioDhubChMap_vpp_BCM_R 0x6 + #define avioDhubChMap_vpp_HDMI_R 0x7 + #define avioDhubChMap_vpp_AUX_FRC_R 0x8 + #define avioDhubChMap_vpp_AUX_FRC_W 0x9 + #define avioDhubChMap_vpp_TT_R 0xA + #define avioDhubChMap_ag_APPCMD_R 0x0 + #define avioDhubChMap_ag_MA0_R 0x1 + #define avioDhubChMap_ag_MA1_R 0x2 + #define avioDhubChMap_ag_MA2_R 0x3 + #define avioDhubChMap_ag_MA3_R 0x4 + #define avioDhubChMap_ag_SA_R 0x5 + #define avioDhubChMap_ag_SPDIF_R 0x6 + #define avioDhubChMap_ag_APPDAT_R 0x7 + #define avioDhubChMap_ag_APPDAT_W 0x8 + #define avioDhubChMap_ag_CSR_R 0x9 + #define avioDhubChMap_ag_GFX_R 0xA + #define avioDhubSemMap_vpp_CH0_intr 0x0 + #define avioDhubSemMap_vpp_CH1_intr 0x1 + #define avioDhubSemMap_vpp_CH2_intr 0x2 + #define avioDhubSemMap_vpp_CH3_intr 0x3 + #define avioDhubSemMap_vpp_CH4_intr 0x4 + #define avioDhubSemMap_vpp_CH5_intr 0x5 + #define avioDhubSemMap_vpp_CH6_intr 0x6 + #define avioDhubSemMap_vpp_CH7_intr 0x7 + #define avioDhubSemMap_vpp_CH8_intr 0x8 + #define avioDhubSemMap_vpp_CH9_intr 0x9 + #define avioDhubSemMap_vpp_CH10_intr 0xA + #define avioDhubSemMap_vpp_CH11_intr 0xB + #define avioDhubSemMap_vpp_CH12_intr 0xC + #define avioDhubSemMap_vpp_CH13_intr 0xD + #define avioDhubSemMap_vpp_CH14_intr 0xE + #define avioDhubSemMap_vpp_CH15_intr 0xF + #define avioDhubSemMap_vpp_MV_R_SEM 0x10 + #define avioDhubSemMap_vpp_PIP_R_SEM 0x11 + #define avioDhubSemMap_vpp_BCM_R_SEM 0x12 + #define avioDhubSemMap_vpp_vppCPCB0_intr 0x13 + #define avioDhubSemMap_vpp_vppCPCB1_intr 0x14 + #define avioDhubSemMap_vpp_vppCPCB2_intr 0x15 + #define avioDhubSemMap_vpp_vppOUT0_intr 0x16 + #define avioDhubSemMap_vpp_vppOUT1_intr 0x17 + #define avioDhubSemMap_vpp_vppOUT2_intr 0x18 + #define avioDhubSemMap_vpp_vppOUT3_intr 0x19 + #define avioDhubSemMap_vpp_vppOUT4_intr 0x1A + #define avioDhubSemMap_vpp_vppOUT5_intr 0x1B + #define avioDhubSemMap_vpp_vppOUT6_intr 0x1C + #define avioDhubSemMap_vpp_bcmInvalidReqIntr 0x1D + #define avioDhubSemMap_ag_CH0_intr 0x0 + #define avioDhubSemMap_ag_CH1_intr 0x1 + #define avioDhubSemMap_ag_CH2_intr 0x2 + #define avioDhubSemMap_ag_CH3_intr 0x3 + #define avioDhubSemMap_ag_CH4_intr 0x4 + #define avioDhubSemMap_ag_CH5_intr 0x5 + #define avioDhubSemMap_ag_CH6_intr 0x6 + #define avioDhubSemMap_ag_CH7_intr 0x7 + #define avioDhubSemMap_ag_CH8_intr 0x8 + #define avioDhubSemMap_ag_CH9_intr 0x9 + #define avioDhubSemMap_ag_CH10_intr 0xA + #define avioDhubSemMap_ag_CH11_intr 0xB + #define avioDhubSemMap_ag_CH12_intr 0xC + #define avioDhubSemMap_ag_CH13_intr 0xD + #define avioDhubSemMap_ag_CH14_intr 0xE + #define avioDhubSemMap_ag_CH15_intr 0xF + #define avioDhubSemMap_ag_app_intr0 0x11 + #define avioDhubSemMap_ag_app_intr1 0x12 + #define avioDhubSemMap_ag_app_intr2 0x13 + #define avioDhubSemMap_ag_app_intr3 0x14 + #define avioDhubSemMap_ag_MA0_R_SEM 0x15 + #define avioDhubSemMap_ag_MA1_R_SEM 0x16 + #define avioDhubSemMap_ag_MA2_R_SEM 0x17 + #define avioDhubSemMap_ag_MA3_R_SEM 0x18 + #define avioDhubSemMap_ag_SA_R_SEM 0x19 + #define avioDhubSemMap_ag_SPDIF_R_SEM 0x1A + #define avioDhubSemMap_ag_MIC_W_SEM 0x1B + +#endif diff --git a/arch/arm/mach-berlin/modules/pe/gsinc/Firmware_Berlin_BG2CDP/zspWrapper.h b/arch/arm/mach-berlin/modules/pe/gsinc/Firmware_Berlin_BG2CDP/zspWrapper.h new file mode 100644 index 00000000..c808c9d2 --- /dev/null +++ b/arch/arm/mach-berlin/modules/pe/gsinc/Firmware_Berlin_BG2CDP/zspWrapper.h @@ -0,0 +1,57 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the GPL License), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +********************************************************************************/ + + +#ifndef zspWrapper_h +#define zspWrapper_h (){} + + #define RA_ZspGlobalRegs_subsys_reset 0x0000 + #define RA_ZspGlobalRegs_core_reset 0x0004 + #define RA_ZspGlobalRegs_clock_ctrl 0x0008 + #define RA_ZspGlobalRegs_ext_bp 0x000C + #define RA_ZspGlobalRegs_halt 0x0010 + #define RA_ZspGlobalRegs_status 0x0014 + #define RA_ZspGlobalRegs_svtaddr 0x001C + #define RA_ZspInt2Zsp_status 0x0000 + #define RA_ZspInt2Zsp_set 0x0004 + #define RA_ZspInt2Zsp_clear 0x0008 + #define RA_ZspInt2Soc_status 0x0000 + #define RA_ZspInt2Soc_set 0x0004 + #define RA_ZspInt2Soc_clear 0x0008 + #define RA_ZspInt2Soc_enable 0x000C + #define RA_ZspDmaRegs_srcAddr 0x0000 + #define RA_ZspDmaRegs_desAddr 0x0004 + #define RA_ZspDmaRegs_config 0x0008 + #define RA_ZspDmaRegs_status 0x000C + #define RA_ZspRegs_ITCM 0x0000 + #define RA_ZspRegs_DTCM 0x20000 + #define RA_ZspRegs_PMEM 0x40000 + #define RA_ZspRegs_ZXBAR 0x60000 + #define RA_ZspRegs_Global 0x64000 + #define RA_ZspRegs_Int2Zsp 0x64400 + #define RA_ZspRegs_Int2Soc 0x64600 + #define RA_ZspRegs_DMA 0x64800 + + + typedef union T32ZspInt2Soc_status + { UNSG32 u32; + struct w32ZspInt2Soc_status; + } T32ZspInt2Soc_status; + + +#endif diff --git a/arch/arm/mach-berlin/modules/pe/pe_driver.c b/arch/arm/mach-berlin/modules/pe/pe_driver.c index 0eb65761..60d33373 100755 --- a/arch/arm/mach-berlin/modules/pe/pe_driver.c +++ b/arch/arm/mach-berlin/modules/pe/pe_driver.c @@ -671,7 +671,7 @@ static void pe_sa_do_tasklet(unsigned long unused) { MV_CC_MSG_t msg = { 0, }; -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0 && BERLIN_CHIP_VERSION != BERLIN_BG2CDP) msg.m_MsgID = 1 << avioDhubChMap_ag_SA_R; MV_CC_MsgQ_PostMsgByID(PE_MODULE_MSG_ID_AUD, &msg); #endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ @@ -681,7 +681,7 @@ static void pe_spdif_do_tasklet(unsigned long unused) { MV_CC_MSG_t msg = { 0, }; -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0 && BERLIN_CHIP_VERSION != BERLIN_BG2CDP) msg.m_MsgID = 1 << avioDhubChMap_ag_SPDIF_R; MV_CC_MsgQ_PostMsgByID(PE_MODULE_MSG_ID_AUD, &msg); #endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ @@ -689,6 +689,8 @@ static void pe_spdif_do_tasklet(unsigned long unused) static void pe_aip_do_tasklet(unsigned long unused) { +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) + MV_CC_MSG_t msg = { 0, }; #if (BERLIN_CHIP_VERSION >= BERLIN_BG2_A0) msg.m_MsgID = 1 << avioDhubChMap_vip_MIC0_W; @@ -696,6 +698,7 @@ static void pe_aip_do_tasklet(unsigned long unused) msg.m_MsgID = 1 << avioDhubChMap_ag_MIC_W; #endif MV_CC_MsgQ_PostMsgByID(PE_MODULE_MSG_ID_AIP, &msg); +#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) */ } static void pe_hdmi_do_tasklet(unsigned long unused) @@ -733,7 +736,7 @@ static void pe_pg_dhub_done_tasklet(unsigned long unused) { MV_CC_MSG_t msg = { 0, }; -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0 && BERLIN_CHIP_VERSION != BERLIN_BG2CDP) msg.m_MsgID = 1 << avioDhubChMap_ag_PG_ENG_W; MV_CC_MsgQ_PostMsgByID(PE_MODULE_MSG_ID_RLE, &msg); #endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ @@ -742,17 +745,20 @@ static void pe_pg_dhub_done_tasklet(unsigned long unused) static void pe_rle_do_err_tasklet(unsigned long unused) { MV_CC_MSG_t msg = { 0, }; - +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) msg.m_MsgID = 1 << avioDhubSemMap_ag_spu_intr0; MV_CC_MsgQ_PostMsgByID(PE_MODULE_MSG_ID_RLE, &msg); +#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) */ } static void pe_rle_do_done_tasklet(unsigned long unused) { MV_CC_MSG_t msg = { 0, }; +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) msg.m_MsgID = 1 << avioDhubSemMap_ag_spu_intr1; MV_CC_MsgQ_PostMsgByID(PE_MODULE_MSG_ID_RLE, &msg); +#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) */ } static irqreturn_t pe_devices_vpp_cec_isr(int irq, void *dev_id) @@ -1148,21 +1154,22 @@ static irqreturn_t pe_devices_vpp_isr(int irq, void *dev_id) #endif } -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0 && BERLIN_CHIP_VERSION != BERLIN_BG2CDP) if (bTST(instat, avioDhubSemMap_vpp_CH10_intr) + #else /* (BERLIN_CHIP_VERSION == BERLIN_BG2CD_A0) */ if (bTST(instat, avioDhubSemMap_vpp_CH7_intr) #endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ #ifdef NEW_ISR && -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0 && BERLIN_CHIP_VERSION != BERLIN_BG2CDP) (vpp_intr_status[avioDhubSemMap_vpp_CH10_intr]) #else /* (BERLIN_CHIP_VERSION == BERLIN_BG2CD_A0) */ (vpp_intr_status[avioDhubSemMap_vpp_CH7_intr]) #endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ #endif ) { -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0 && BERLIN_CHIP_VERSION != BERLIN_BG2CDP) bSET(instat_used, avioDhubSemMap_vpp_CH10_intr); #else /* (BERLIN_CHIP_VERSION == BERLIN_BG2CD_A0) */ bSET(instat_used, avioDhubSemMap_vpp_CH7_intr); @@ -1170,7 +1177,7 @@ static irqreturn_t pe_devices_vpp_isr(int irq, void *dev_id) /* HDMI audio interrupt */ vpp_hdmi_audio_int_cnt++; /* clear interrupt */ -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0 && BERLIN_CHIP_VERSION != BERLIN_BG2CDP) semaphore_pop(pSemHandle, avioDhubSemMap_vpp_CH10_intr, 1); semaphore_clr_full(pSemHandle, avioDhubSemMap_vpp_CH10_intr); #else /* (BERLIN_CHIP_VERSION == BERLIN_BG2CD_A0) */ @@ -1179,7 +1186,7 @@ static irqreturn_t pe_devices_vpp_isr(int irq, void *dev_id) #endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ aout_resume_cmd(HDMI_PATH); tasklet_hi_schedule(&pe_hdmi_tasklet); -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0 && BERLIN_CHIP_VERSION != BERLIN_BG2CDP) bCLR(instat, avioDhubSemMap_vpp_CH10_intr); #else /* (BERLIN_CHIP_VERSION == BERLIN_BG2CD_A0) */ bCLR(instat, avioDhubSemMap_vpp_CH7_intr); @@ -1468,6 +1475,7 @@ static void start_vip_sd_rd_bcm(void) static irqreturn_t pe_devices_vip_isr(int irq, void *dev_id) { +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) INT instat; HDL_semaphore *pSemHandle; INT vip_intr = 0; @@ -1512,7 +1520,7 @@ static irqreturn_t pe_devices_vip_isr(int irq, void *dev_id) vip_intr = 1; #endif } -#if (BERLIN_CHIP_VERSION >= BERLIN_BG2_A0) +#if (BERLIN_CHIP_VERSION >= BERLIN_BG2_A0 && BERLIN_CHIP_VERSION != BERLIN_BG2CDP) if (bTST(instat, avioDhubSemMap_vip_vbi_vde_intr) #ifdef NEW_ISR && @@ -1563,6 +1571,7 @@ static irqreturn_t pe_devices_vip_isr(int irq, void *dev_id) #endif } +#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) */ return IRQ_HANDLED; } #endif @@ -1615,7 +1624,7 @@ static void aout_disable_int_msg_update(int *aout_info) if(*p == HDMI_PATH) disable_hdmi_int_msg = *(p+1); - return; + return; } static void aout_start_cmd(int *aout_info) @@ -1640,7 +1649,7 @@ static void aout_start_cmd(int *aout_info) } else if (*p == LoRo_PATH) { p_sa_fifo = (AOUT_PATH_CMD_FIFO *) MV_SHM_GetNonCacheVirtAddr(*(p + 1)); -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0 && BERLIN_CHIP_VERSION != BERLIN_BG2CDP) p_dma_info = (AOUT_DMA_INFO *) AoutFifoGetKernelRdDMAInfo(p_sa_fifo, 0); chanId = avioDhubChMap_ag_SA_R; @@ -1651,7 +1660,7 @@ static void aout_start_cmd(int *aout_info) } else if (*p == SPDIF_PATH) { p_spdif_fifo = (AOUT_PATH_CMD_FIFO *) MV_SHM_GetNonCacheVirtAddr(*(p + 1)); -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0 && BERLIN_CHIP_VERSION != BERLIN_BG2CDP) p_dma_info = (AOUT_DMA_INFO *) AoutFifoGetKernelRdDMAInfo(p_spdif_fifo, 0); @@ -1720,7 +1729,7 @@ static void aout_resume_cmd(int path_id) } } } else if (path_id == LoRo_PATH) { -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0 && BERLIN_CHIP_VERSION != BERLIN_BG2CDP) if (!p_sa_fifo->fifo_underflow) AoutFifoKernelRdUpdate(p_sa_fifo, 1); @@ -1750,7 +1759,7 @@ static void aout_resume_cmd(int path_id) } #endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ } else if (path_id == SPDIF_PATH) { -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0 && BERLIN_CHIP_VERSION != BERLIN_BG2CDP) if (!p_spdif_fifo->fifo_underflow) AoutFifoKernelRdUpdate(p_spdif_fifo, 1); @@ -1847,6 +1856,8 @@ static int AIPFifoCheckKernelFullness(AIP_DMA_CMD_FIFO *p_aip_cmd_fifo) static void aip_start_cmd(int *aip_info) { +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) + int *p = aip_info; int chanId, pair; AIP_DMA_CMD *p_dma_cmd; @@ -1927,6 +1938,7 @@ static void aip_start_cmd(int *aip_info) } AIPFifoKernelPreRdUpdate(p_aip_fifo, 1); } +#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) */ } static void aip_stop_cmd(void) @@ -1940,6 +1952,7 @@ static void aip_resume_cmd() unsigned int chanId; int pair; +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) if (!p_aip_fifo->fifo_overflow) AIPFifoKernelRdUpdate(p_aip_fifo, 1); @@ -1996,6 +2009,7 @@ static void aip_resume_cmd() #endif } } +#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) */ } static int HwAPPFifoCheckKernelFullness(HWAPP_CMD_FIFO *p_app_cmd_fifo) @@ -2092,7 +2106,7 @@ static irqreturn_t pe_devices_aout_isr(int irq, void *dev_id) } } -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0 && BERLIN_CHIP_VERSION != BERLIN_BG2CDP) chanId = avioDhubChMap_ag_SA_R; if (bTST(instat, chanId)) { semaphore_pop(pSemHandle, chanId, 1); @@ -2102,7 +2116,7 @@ static irqreturn_t pe_devices_aout_isr(int irq, void *dev_id) } #endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ -#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0 && BERLIN_CHIP_VERSION != BERLIN_BG2CDP) chanId = avioDhubChMap_ag_SPDIF_R; if (bTST(instat, chanId)) { semaphore_pop(pSemHandle, chanId, 1); @@ -2133,6 +2147,7 @@ static irqreturn_t pe_devices_aout_isr(int irq, void *dev_id) tasklet_hi_schedule(&pe_app_tasklet); } +#if (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) #if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) chanId = avioDhubChMap_ag_PG_ENG_W; if (bTST(instat, chanId)) { @@ -2156,6 +2171,7 @@ static irqreturn_t pe_devices_aout_isr(int irq, void *dev_id) tasklet_hi_schedule(&pe_rle_done_tasklet); } +#endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) */ return IRQ_HANDLED; } @@ -2258,7 +2274,7 @@ static int pe_device_init(unsigned int cpu_id, void *pHandle) &VPP_dhubHandle, VPP_config, VPP_NUM_OF_CHANNELS); DhubInitialization(cpu_id, AG_DHUB_BASE, AG_HBO_SRAM_BASE, &AG_dhubHandle, AG_config, AG_NUM_OF_CHANNELS); -#if (BERLIN_CHIP_VERSION >= BERLIN_BG2) && (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#if (BERLIN_CHIP_VERSION >= BERLIN_BG2) && (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) && (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) DhubInitialization(cpu_id, VIP_DHUB_BASE, VIP_HBO_SRAM_BASE, &VIP_dhubHandle, VIP_config, VIP_NUM_OF_CHANNELS); #endif @@ -2355,7 +2371,7 @@ static int pe_driver_open(struct inode *inode, struct file *filp) &VPP_dhubHandle, VPP_config, VPP_NUM_OF_CHANNELS); DhubInitialization(pe_cpu_id, AG_DHUB_BASE, AG_HBO_SRAM_BASE, &AG_dhubHandle, AG_config, AG_NUM_OF_CHANNELS); -#if (BERLIN_CHIP_VERSION >= BERLIN_BG2) && (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) +#if (BERLIN_CHIP_VERSION >= BERLIN_BG2) && (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) && (BERLIN_CHIP_VERSION != BERLIN_BG2CDP) DhubInitialization(pe_cpu_id, VIP_DHUB_BASE, VIP_HBO_SRAM_BASE, &VIP_dhubHandle, VIP_config, VIP_NUM_OF_CHANNELS); #endif @@ -2890,7 +2906,7 @@ static int pe_driver_setup_cdev(struct cdev *dev, int major, int minor, static int __init pe_driver_init(void) { - int i, res; + int i, res; struct device_node *np, *iter; struct resource r; diff --git a/arch/arm/mach-berlin/modules/shm_amp/Makefile b/arch/arm/mach-berlin/modules/shm_amp/Makefile new file mode 100644 index 00000000..dea56be5 --- /dev/null +++ b/arch/arm/mach-berlin/modules/shm_amp/Makefile @@ -0,0 +1,2 @@ +obj-$(CONFIG_BERLIN_SHM) += galois_shm.o +galois_shm-objs := shm_driver.o shm_device.o memory_engine.o shm_api_kernel.o diff --git a/arch/arm/mach-berlin/modules/shm_amp/memory_engine.c b/arch/arm/mach-berlin/modules/shm_amp/memory_engine.c new file mode 100644 index 00000000..0da31031 --- /dev/null +++ b/arch/arm/mach-berlin/modules/shm_amp/memory_engine.c @@ -0,0 +1,1093 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ********************************************************************************/ + + +/******************************************************************************* + System head files +*/ +#include /* printk() */ +#include +#include /* kmalloc() */ +#include /* everything... */ +#include /* error codes */ +#include /* size_t */ +#include /*seq_file api*/ +#include +#include + +/******************************************************************************* + Local head files +*/ + +#include "shm_type.h" +#include "memory_engine.h" +#include "shm_api_kernel.h" + + + + +/******************************************************************************* + Local variable +*/ + + +/******************************************************************************* + Private API +*/ + +static memory_node_t * _FindNode_size(memory_engine_t *engine, size_t size, + size_t alignment) +{ + memory_node_t *node; + size_t offset; + + /* Walk all free nodes until we have one that is big enough or we have + reached the root. (root.m_size == 0) */ + for (node = engine->m_root.m_next_free; node->m_size != 0; node = node->m_next_free) { + /* Compute number of bytes to skip for alignment. */ + offset = (alignment == 0) + ? 0 + : (alignment - (node->m_addr % alignment)); + + /* Node is already aligned. */ + if (offset == alignment) + offset = 0; + + if (node->m_size >= size + offset) { + /* This node is big enough. */ + node->m_offset = offset; + return node; + } + } + + /* Not enough memory. */ + return NULL; +} + +static int _Split(memory_engine_t *engine, memory_node_t *node, size_t size) +{ + memory_node_t *new_node; + + /* Make sure the byte boundary makes sense. */ + if ((size == 0) || (size >= node->m_size)) + return -EINVAL; + + /* Allocate a new node object */ + new_node = kmalloc(sizeof(memory_node_t), GFP_KERNEL); + if (new_node == NULL) + return -ENOMEM; + memset(new_node, 0, sizeof(memory_node_t)); + + /* Initialize node structure. */ + new_node->m_addr = node->m_addr + size; + new_node->m_size = node->m_size - size; + new_node->m_alignment = 0; + new_node->m_offset = 0; + + /* Insert node behind specified node. */ + new_node->m_next = node->m_next; + new_node->m_prev = node; + node->m_next = new_node->m_next->m_prev = new_node; + + /* Insert free node behind specified node. */ + new_node->m_next_free = node->m_next_free; + new_node->m_prev_free = node; + node->m_next_free = new_node->m_next_free->m_prev_free = new_node; + + /* Adjust size of specified node. */ + node->m_size = size; + + /* Success. */ + return 0; +} + +static int _Merge(memory_engine_t *engine, memory_node_t *node) +{ + memory_node_t *new_node; + + /* Save pointer to next node. */ + new_node = node->m_next; + + /* This is a good time to make sure the heap is not corrupted. */ + if (node->m_addr + node->m_size != new_node->m_addr) { + /* Corrupted heap. */ + /* Error. */ + shm_error("Found memory corrupted !!! (0x%08X + 0x%08X != 0x%08X)\n", + node->m_addr, node->m_size, new_node->m_addr); + return -EFAULT; + } + + /* Adjust byte count. */ + node->m_size += new_node->m_size; + + /* Unlink next node from linked list. */ + node->m_next = new_node->m_next; + node->m_next_free = new_node->m_next_free; + + node->m_next->m_prev = + node->m_next_free->m_prev_free = node; + + /* Free next node. */ + kfree(new_node); + + return 0; +} + + + +/******************************************************************************* + Module API +*/ + +int memory_engine_create(memory_engine_t **engine, size_t base, size_t size, size_t threshold) +{ + int res; + memory_node_t * new_node; + memory_engine_t *new_engine; + + shm_debug("memory_engine_create start. (0x%08X, %u, %u) \n", base, size, threshold); + + if (engine == NULL) { + res = -EINVAL; + goto err_add_engine; + } + + new_engine = kmalloc(sizeof(memory_engine_t), GFP_KERNEL); + if (new_engine == NULL) { + res = -ENOMEM; + goto err_add_engine; + } + memset(new_engine, 0 , sizeof(memory_engine_t)); + + new_engine->m_base = base; + new_engine->m_size = new_engine->m_size_free = size; + new_engine->m_size_used = 0; + new_engine->m_threshold = threshold; + + new_engine->m_peak_usedmem = + new_engine->m_max_usedblock = + new_engine->m_min_usedblock = new_engine->m_size_used; + + new_engine->m_max_freeblock = + new_engine->m_min_freeblock = new_engine->m_size_free; + + new_engine->m_num_freeblock = 1; + new_engine->m_num_usedblock = 0; + + /* Allocate a new node object */ + new_node = kmalloc(sizeof(memory_node_t), GFP_KERNEL); + if (new_node == NULL) { + res = -ENOMEM; + goto err_add_node; + } + memset(new_node, 0, sizeof(memory_node_t)); + + new_node->m_next = + new_node->m_prev = + new_node->m_next_free = + new_node->m_prev_free = &(new_engine->m_root); + + new_node->m_addr = new_engine->m_base; + new_node->m_size = new_engine->m_size_free; + new_node->m_alignment = 0; + new_node->m_offset = 0; + + /* Initialize the linked list of nodes. */ + new_engine->m_root.m_next = + new_engine->m_root.m_prev = + new_engine->m_root.m_next_free = + new_engine->m_root.m_prev_free = new_node; + + new_engine->m_root.m_size = 0; + new_engine->m_shm_root = RB_ROOT; + + /* Initialize the semaphore, come up in unlocked state. */ + mutex_init(&(new_engine->m_mutex)); + + *engine = new_engine; + + shm_debug("memory_engine_create OK.\n"); + + return 0; + +err_add_node: + + kfree(new_engine); + +err_add_engine: + + shm_error("memory_engine_create failed !!! (0x%08X, %u, %u) \n", base, size, threshold); + + return res; +} + + +int memory_engine_destroy(memory_engine_t **engine) +{ + int res; + memory_node_t *node, *next; + + shm_debug("memory_engine_destroy start.\n"); + + if (engine == NULL) { + res = -EINVAL; + goto err_del_engine; + } + + /* Walk all the nodes until we reached the root. (root.m_size == 0) */ + for (node = (*engine)->m_root.m_next; node->m_size != 0; node = next) { + /* Save pointer to the next node. */ + next = node->m_next; + + /* Free the node. */ + kfree(node); + } + + /* Free the mutex. */ + + /* Free the engine object. */ + kfree(*engine); + + *engine = NULL; + + shm_debug("memory_engine_destroy OK.\n"); + + return 0; + +err_del_engine: + + shm_error("memory_engine_destroy failed !!!\n"); + + return res; +} + +static void memory_engine_insert_shm_node(struct rb_root *shm_root, + memory_node_t *shm_node) +{ + struct rb_node **p = &shm_root->rb_node; + struct rb_node *parent = NULL; + memory_node_t *tmp_node; + + while (*p) { + parent = *p; + tmp_node = rb_entry(parent, memory_node_t, __rb_node); + + if (shm_node->m_phyaddress < tmp_node->m_phyaddress) + p = &parent->rb_left; + else + p = &parent->rb_right; + } + + rb_link_node(&shm_node->__rb_node, parent, p); + rb_insert_color(&shm_node->__rb_node, shm_root); +} + +static memory_node_t *memory_engine_lookup_shm_node( + struct rb_root *shm_root, const uint phyaddress) +{ + struct rb_node *n = shm_root->rb_node; + memory_node_t *tmp_node; + + while (n) { + tmp_node = rb_entry(n, memory_node_t, __rb_node); + if (phyaddress < tmp_node->m_phyaddress) + n = n->rb_left; + else if (phyaddress > tmp_node->m_phyaddress) + n = n->rb_right; + else + return tmp_node; + } + + return NULL; +} + +static memory_node_t *memory_engine_lookup_shm_node_for_cache( + struct rb_root *shm_root, const uint phyaddress, const uint size) +{ + struct rb_node *n = shm_root->rb_node; + memory_node_t *tmp_node; + + while (n) { + tmp_node = rb_entry(n, memory_node_t, __rb_node); + if (phyaddress < tmp_node->m_phyaddress) + n = n->rb_left; + else if (phyaddress > tmp_node->m_phyaddress) + if ((phyaddress + size) <= (MEMNODE_ALIGN_ADDR(tmp_node) + + MEMNODE_ALIGN_SIZE(tmp_node))) { + return tmp_node; + } else { + n = n->rb_right; + } + else { + if (size <= MEMNODE_ALIGN_SIZE(tmp_node)) { + return tmp_node; + } else { + return NULL; + } + } + } + + return NULL; +} + + +memory_node_t *memory_engine_lookup_shm_node_for_size( + struct rb_root *shm_root, size_t phyaddress) +{ + struct rb_node *n = shm_root->rb_node; + memory_node_t *tmp_node; + + while (n) { + tmp_node = rb_entry(n, memory_node_t, __rb_node); + if (phyaddress < tmp_node->m_phyaddress) + n = n->rb_left; + else if (phyaddress > tmp_node->m_phyaddress) + if (phyaddress < (tmp_node->m_phyaddress + + MEMNODE_ALIGN_SIZE(tmp_node))) { + return tmp_node; + } else { + n = n->rb_right; + } + else { + return tmp_node; + } + } + return NULL; +} + +static void memory_engine_delete_shm_node(struct rb_root *shm_root, + memory_node_t *shm_node) +{ + rb_erase(&shm_node->__rb_node, shm_root); +} + + + +int memory_engine_allocate(memory_engine_t *engine, size_t size, + size_t alignment, memory_node_t **node) +{ + int res = 0; + memory_node_t *new_node = NULL; + struct task_struct *grptask = NULL; + + shm_debug("memory_engine_allocate start. (%d, %d)\n", size, alignment); + + if ((engine == NULL) || (node == NULL)) + return -EINVAL; + + mutex_lock(&(engine->m_mutex)); + + if (size > engine->m_size_free) { + shm_error("heap has not enough (%u) bytes for (%u) bytes\n", engine->m_size_free, size); + res = -ENOMEM; + goto err_exit; + } + + /* Find a free node in heap */ + new_node = _FindNode_size(engine, size, alignment); + if (new_node == NULL) { + memory_node_t *pLastNode = NULL; + pLastNode = engine->m_root.m_prev_free; + if (pLastNode) + shm_error("heap has not enough liner memory for (%u) bytes, free blocks:%u(max free block:%u)\n", + size, engine->m_num_freeblock, pLastNode->m_size); + else + shm_error("heap has not enough liner memory, no free blocks!!!\n"); + res = -ENOMEM; + goto err_exit; + } + + /* Do we have enough memory after the allocation to split it? */ + if (MEMNODE_ALIGN_SIZE(new_node) - size > engine->m_threshold) + _Split(engine, new_node, size + new_node->m_offset);/* Adjust the node size. */ + else + engine->m_num_freeblock--; + + engine->m_num_usedblock++; + + /* Remove the node from the free list. */ + new_node->m_prev_free->m_next_free = new_node->m_next_free; + new_node->m_next_free->m_prev_free = new_node->m_prev_free; + new_node->m_next_free = + new_node->m_prev_free = NULL; + + /* Fill in the information. */ + new_node->m_alignment = alignment; + /*record pid/thread name in node info, for debug usage*/ + new_node->m_threadid = task_pid_vnr(current);/*(current)->pid;*/ + + /* qzhang@marvell + * record creating task id,user task id + * by default user task id is creating task id + * until memory_engine_lock invoked + */ + new_node->m_taskid = + new_node->m_usrtaskid= task_tgid_vnr(current); + strncpy(new_node->m_threadname, current->comm, 16); + grptask = pid_task(task_tgid(current),PIDTYPE_PID); + if (NULL != grptask) { + strncpy(new_node->m_taskname,grptask->comm,16); + strncpy(new_node->m_usrtaskname,grptask->comm,16); + } else { + memset(new_node->m_taskname,0,16); + memset(new_node->m_usrtaskname,0,16); + } + new_node->m_refcount = 1; + new_node->m_reference_count = 1; + INIT_LIST_HEAD(&new_node->m_user_list); + new_node->m_task_free_flag = 1; + + new_node->m_phyaddress = MEMNODE_ALIGN_ADDR(new_node); + memory_engine_insert_shm_node(&(engine->m_shm_root), new_node); + new_node->b_takeover = 0; + + /* Adjust the number of free bytes. */ + engine->m_size_free -= new_node->m_size; + engine->m_size_used += new_node->m_size; + + engine->m_peak_usedmem = max(engine->m_peak_usedmem, engine->m_size_used); + + /* Return the pointer to the node. */ + *node = new_node; + + mutex_unlock(&(engine->m_mutex)); + + shm_debug("Allocated %u (%u) bytes @ 0x%08X (0x%08X) for align (%u)\n", + MEMNODE_ALIGN_SIZE(new_node), new_node->m_size, + MEMNODE_ALIGN_ADDR(new_node), new_node->m_addr, + new_node->m_alignment); + + shm_debug("memory_engine_allocate OK.\n"); + + return 0; + +err_exit: + + mutex_unlock(&(engine->m_mutex)); + *node = NULL; + + shm_error("memory_engine_allocate failed !!! (%d, %d) (%d %s)\n", + size, alignment, current->pid, current->comm); + return res; +} + +int memory_engine_free(memory_engine_t *engine, int alignaddr) +{ + int res = 0; + pid_t taskid; + user_node_t *tmp, *q; + memory_node_t *new_node, *node; + + shm_debug("memory_engine_free start. (0x%08X)\n", alignaddr); + + if ((engine == NULL) || (alignaddr == 0)) + return -EINVAL; + + mutex_lock(&(engine->m_mutex)); + + /* find alignaddr */ + node = memory_engine_lookup_shm_node(&(engine->m_shm_root), alignaddr); + if (node == NULL) { + printk("memory free again physicaladdress[%x] threadid[%d]" + "threadname[%s]\n", alignaddr, task_pid_vnr(current), + current->comm); + res = -EFAULT; + goto err_exit; + } + + if (node->b_takeover == 1) { + node->m_refcount = 0; + node->m_reference_count = 0; + node->m_task_free_flag = 0; + goto FREE; + } + + taskid = task_tgid_vnr(current); + if (node->m_taskid != taskid) { + list_for_each_entry_safe(tmp, q, &node->m_user_list, m_list) { + if (tmp->m_taskid == taskid) { + tmp->m_refcount--; + node->m_reference_count--; + if (tmp->m_refcount == 0) { + list_del(&tmp->m_list); + kfree(tmp); + } + break; + } + } + } else { + if (node->m_task_free_flag == 1) { + node->m_refcount--; + node->m_reference_count--; + if (node->m_refcount == 0) + node->m_task_free_flag = 0; + } + } + + if (node->m_reference_count != 0) { + mutex_unlock(&(engine->m_mutex)); + return 0; + } + +FREE: + memory_engine_delete_shm_node(&(engine->m_shm_root), node); + + /* if the node to be freed is a free one, there could be invalid operations*/ + if (node->m_next_free != NULL) { + res = -EFAULT; + goto err_exit; + } + + /* clean node */ + node->m_offset = 0; + node->m_alignment = 0; + + node->memory_type = 0; + + /* Update the number of free bytes. */ + engine->m_size_free += node->m_size; + engine->m_size_used -= node->m_size; + + /* Find the next free node(go through node list, find the first node which is free). */ + for (new_node = node->m_next; new_node->m_next_free == NULL; new_node = new_node->m_next) ; + + /* Insert this node in the free list. */ + node->m_next_free = new_node; + node->m_prev_free = new_node->m_prev_free; + + node->m_prev_free->m_next_free = + new_node->m_prev_free = node; + + engine->m_num_usedblock--; + engine->m_num_freeblock++; + + /* Is the next node a free node and not the root? */ + if ((node->m_next == node->m_next_free) && + (node->m_next->m_size != 0)) { + /* Merge this node with the next node. */ + new_node = node; + res = _Merge(engine, new_node); + + if((new_node->m_next_free == new_node) || + (new_node->m_prev_free == new_node) || (res != 0)) { + /* Error. */ + shm_error("_Merge next node failed.\n"); + goto err_exit; + } + + engine->m_num_freeblock--; + + shm_debug("_Merge next node OK.\n"); + } + + /* Is the previous node a free node and not the root? */ + if ((node->m_prev == node->m_prev_free) && (node->m_prev->m_size != 0)) { + /* Merge this node with the previous node. */ + new_node = node->m_prev; + res = _Merge(engine, new_node); + + if((new_node->m_next_free == new_node) || + (new_node->m_prev_free == new_node) || (res != 0)) { + /* Error. */ + shm_error("_Merge previous node failed.\n"); + goto err_exit; + } + + engine->m_num_freeblock--; + + shm_debug("_Merge previous node OK.\n"); + } + + mutex_unlock(&(engine->m_mutex)); + + shm_debug("memory_engine_free OK.\n"); + + return res; + +err_exit: + + mutex_unlock(&(engine->m_mutex)); + + if (shm_lowmem_debug_level > 2) { + shm_error("memory_engine_free failed !!! (0x%08X)\n", alignaddr); + dump_stack(); + } + + return res; +} + +int memory_engine_cache(memory_engine_t *engine, uint cmd, + shm_driver_operation_t op) +{ + int res = 0; + memory_node_t *node; + char tag_clean[] = "clean"; + char tag_invalidate[] = "invalidate"; + char tag_cleanAndinvalidate[] = "clean and invalidate"; + char *ptr_tag; + if (engine == NULL || op.m_param1 == 0 + || op.m_param2 == 0 || op.m_param3 == 0) { + return -EINVAL; + } + + if (shm_lowmem_debug_level > 2) { + mutex_lock(&(engine->m_mutex)); + node = memory_engine_lookup_shm_node_for_cache( + &(engine->m_shm_root), op.m_param3, op.m_param2); + mutex_unlock(&(engine->m_mutex)); + if ((node == NULL) || (node->m_next_free != NULL)) { + res = 0; + if (cmd == SHM_DEVICE_CMD_INVALIDATE) { + ptr_tag = tag_invalidate; + } else if (cmd == SHM_DEVICE_CMD_CLEAN) { + ptr_tag = tag_clean; + } else { + ptr_tag = tag_cleanAndinvalidate; + } + shm_error("%s %s cache Error, Can't found " + "viraddr[0x%lx] phyaddr[0x%lx] " + "Size[0x%lx] memory node\n", + __FUNCTION__, ptr_tag, op.m_param1, + op.m_param3, op.m_param2); + return res; + } + } + + switch (cmd) { + case SHM_DEVICE_CMD_INVALIDATE: + dmac_map_area((const void *)op.m_param1, + op.m_param2, DMA_FROM_DEVICE); + outer_inv_range(op.m_param3, + op.m_param3 + op.m_param2); + break; + case SHM_DEVICE_CMD_CLEAN: + dmac_map_area((const void *)op.m_param1, + op.m_param2, DMA_TO_DEVICE); + outer_clean_range(op.m_param3, + op.m_param3 + op.m_param2); + break; + case SHM_DEVICE_CMD_CLEANANDINVALIDATE: + dmac_flush_range((const void *)op.m_param1, + (const void *)(op.m_param1 + + op.m_param2)); + outer_flush_range(op.m_param3, + op.m_param3 + op.m_param2); + break; + default: + res = -ENOTTY; + } + + return res; +} + +int memory_engine_takeover(memory_engine_t *engine,int alignaddr) +{ + int res = 0; + memory_node_t *node = NULL; + struct task_struct *grptask = NULL; + + shm_debug("mem_engine_takeover start, (0x%08X)\n",alignaddr); + + if ((NULL == engine) || (0 == alignaddr)) + return -EINVAL; + + mutex_lock(&(engine->m_mutex)); + + /* find alignaddr */ + node = memory_engine_lookup_shm_node(&(engine->m_shm_root), alignaddr); + if (node == NULL) { + printk("memory_engine_lookup_shm_node Error alignaddr[%x]\n", + alignaddr); + res = -EFAULT; + goto err_exit; + } + + /* if the node found is a free one, there could be invalid operations */ + if (NULL != node->m_next_free) { + shm_error("node(%#.8x) already freed\n",alignaddr); + res = -EFAULT; + goto err_exit; + } + + /* change usrtaskid to current */ + node->m_usrtaskid = task_tgid_vnr(current); + grptask = pid_task(task_tgid(current),PIDTYPE_PID); + if (NULL == grptask) + memset(node->m_usrtaskname,0,16); + else + strncpy(node->m_usrtaskname,grptask->comm,16); + node->b_takeover = 1; + + mutex_unlock(&(engine->m_mutex)); + + shm_debug("memory_engine_takeover OK.\n"); + return 0; + +err_exit: + + mutex_unlock(&(engine->m_mutex)); + shm_error("memory_engine_takeover failed!!! (0x%08X)\n", alignaddr); + return res; +} + +int memory_engine_giveup(memory_engine_t *engine, int alignaddr) +{ + int res = 0; + memory_node_t *node = NULL; + + shm_debug("memory_engine_giveup start, (0x%08X)\n",alignaddr); + + if ((NULL == engine) || (0 == alignaddr)) + return -EINVAL; + + mutex_lock(&(engine->m_mutex)); + + /* find note from alignaddr */ + node = memory_engine_lookup_shm_node(&(engine->m_shm_root), alignaddr); + + /* if the node found is a free one, there could be invalid operations */ + if ((NULL == node) || (NULL != node->m_next_free)) { + shm_error("node(%#.8x) not exists\n",alignaddr); + res = -EFAULT; + goto err_exit; + } + + /* change usrtaskid to taskid */ + node->m_usrtaskid = node->m_taskid; + strncpy(node->m_usrtaskname,node->m_taskname,16); + node->b_takeover = 0; + + mutex_unlock(&(engine->m_mutex)); + + shm_debug("memory_engine_giveup OK.\n"); + return 0; + +err_exit: + + mutex_unlock(&(engine->m_mutex)); + shm_error("memory_engine_giveup fail!!! (0x%08X)\n", alignaddr); + return res; +} + + +int memory_engine_show(memory_engine_t *engine, struct seq_file *file) +{ + int len = 0, i = 0; + memory_node_t *new_node; + char tag_used[] = " used "; + char tag_free[] = " free "; + char *ptr_tag; + user_node_t *tmp = NULL; + + if ((engine == NULL) || (file == NULL)) + return -EINVAL; + + len += seq_printf(file, " No| Alloc Mem Ref| Offset | Addr | Size | Align " + "| thread id(name)[free] pid(name)[takeover][refcount]\n"); + len += seq_printf(file, "---------------------------------------------------------------" + "----------------------------------------------\n"); + + mutex_lock(&(engine->m_mutex)); + + /* Walk all nodes until we have + reached the root. (root.m_size == 0) */ + for (new_node = engine->m_root.m_next; new_node->m_size != 0; + new_node = new_node->m_next) { + if (new_node->m_next_free != NULL) + ptr_tag = tag_free; + else + ptr_tag = tag_used; + + len += seq_printf(file, " %3d|%6s[%1d][%3d]| 0x%8X| 0x%8x| 0x%8x| 0x%8x" + "| %4d(%16s)[%1d] %4d(%16s)[%1d][%d]", + ++i, ptr_tag, new_node->memory_type, new_node->m_reference_count, + (MEMNODE_ALIGN_ADDR(new_node) - engine->m_base), + new_node->m_phyaddress, new_node->m_size, new_node->m_alignment, + new_node->m_threadid, new_node->m_threadname, new_node->m_task_free_flag, + new_node->m_taskid, new_node->m_taskname, new_node->b_takeover, + new_node->m_refcount); + + if (new_node->m_next_free == NULL) { + list_for_each_entry(tmp, &new_node->m_user_list, m_list) { + len += seq_printf(file, "| %5d[%16s][%d]", tmp->m_threadid, + tmp->m_threadname, tmp->m_refcount); + } + } + len += seq_printf(file, "\n"); + } + + + mutex_unlock(&(engine->m_mutex)); + + shm_debug("memory_engine_show OK. (node = %d, len = %d)\n", i, len); + + return len; +} + + +/* + * release memory allocated by process pid + */ +int memory_engine_release_by_taskid(shm_device_t *device, pid_t taskid) +{ + size_t alignaddr = 0 ; + memory_node_t *new_node = NULL; + memory_engine_t *engine = NULL; + int rlsCnt = 0 ; + int idx = 0; + int totalSize = 0 ; + int *release_array = NULL; + int static_release_array[64] = {0}; + int *dynamic_release_array = NULL; + int i = 1; + int node_max = 64; + + if (NULL == device) + return -EINVAL; + + engine = device->m_engine; + if (NULL == engine) + return -EINVAL; + + release_array = static_release_array; + /* Walk all nodes until we have reached the root. (root.m_size == 0) */ + mutex_lock(&(engine->m_mutex)); + for (new_node = engine->m_root.m_next ; new_node->m_size != 0 ; new_node = new_node->m_next) { + if (NULL != new_node->m_next_free) + continue;/* free node */ + + if ((taskid == new_node->m_taskid) && (!new_node->b_takeover)) { + release_array[rlsCnt++] = MEMNODE_ALIGN_ADDR(new_node); + totalSize += new_node->m_size; + } else + continue; + + /* For berlin_avservice, the shm node number is larger than 64, + * than swift to dynamic allocate array */ + if (node_max == rlsCnt) { + printk("%s,%d memory note for pid(%d) exceed 64\n", __FUNCTION__,__LINE__,taskid); + dynamic_release_array = kzalloc(i * 1024 * sizeof(int), GFP_KERNEL); + if (NULL == dynamic_release_array) { + shm_error("%s,%d fail to allocate memory for dynamic_release_array\n", + __FUNCTION__,__LINE__); + break; + } else { + memcpy(dynamic_release_array, release_array, rlsCnt * sizeof(int)); + if (i > 1) + kfree(release_array); + release_array = dynamic_release_array; + node_max = i * 1024; + i++; + } + } + } + mutex_unlock(&(engine->m_mutex)); + + for (idx = 0 ; idx < rlsCnt ; idx++) { + alignaddr = release_array[idx]; + MV_SHM_iounmap_and_free_rbtree(device, alignaddr - device->m_base); + if (0 != memory_engine_free(engine,alignaddr)) { + shm_error("%s,%d fail to relesae shm alignaddr %#.8x,for taskid:%d\n", + __FUNCTION__, __LINE__, alignaddr, taskid); + } + } + + if (NULL != dynamic_release_array) + kfree(dynamic_release_array); + + shm_debug("%s,%d should release shm block %d size %d for taskid %d\n", + __FUNCTION__,__LINE__,rlsCnt,totalSize,taskid); + return 0; +} + + +int memory_engine_get_stat(memory_engine_t *engine, struct shm_stat_info *stat) +{ + memory_node_t *mem_node = NULL; + struct shm_usr_node *usr_node = NULL; + int i = 0; + + shm_debug("memory_engine_get_stat enter. \n"); + if (NULL == engine || NULL == stat) + return -EINVAL; + + mutex_lock(&(engine->m_mutex)); + + stat->m_size = engine->m_size; + stat->m_used = engine->m_size_used; + for (mem_node = engine->m_root.m_next ; mem_node->m_size != 0 ; + mem_node = mem_node->m_next) { + pid_t taskid; + pid_t usrtaskid; + + /* free node*/ + if (NULL != mem_node->m_next_free) + continue; + + taskid = mem_node->m_taskid; + usrtaskid = mem_node->m_usrtaskid; + + //update allocate size + for (i = 0 ; i < MAX_SHM_USR_NODE_NUM ; i++) { + usr_node = &(stat->m_nodes[i]); + /* find a usr_node with the same taskid */ + if (taskid == usr_node->m_taskid) + break; + /* occupy a usr_node for taskid */ + if (0 == usr_node->m_taskid) { + stat->m_count++; + usr_node->m_taskid = taskid; + strncpy(usr_node->m_taskname,mem_node->m_taskname,16); + + usr_node->m_oom_adj = shm_find_oomadj_by_pid(usr_node->m_taskid); + break; + } + } + + /* by default the total number of usr_node for shm user should not exceed MAX_SHM_USR_NODE_NUM */ + if (i >= MAX_SHM_USR_NODE_NUM) { + shm_error("%s,%d stat out of memory\n",__FUNCTION__,__LINE__); + goto err_exit; + } + + usr_node->m_size_alloc += mem_node->m_size; + + /* if taskid equals to usrtaskid, then follow the shortcut*/ + if (taskid == usrtaskid) { + usr_node->m_size_use += mem_node->m_size; + continue; + } + + usr_node = NULL; + for (i = 0 ; i < MAX_SHM_USR_NODE_NUM ; i++) { + usr_node = &(stat->m_nodes[i]); + + if (usrtaskid == usr_node->m_taskid) + break; + + if (0 == usr_node->m_taskid) { + stat->m_count++; + usr_node->m_taskid = usrtaskid; + strncpy(usr_node->m_taskname,mem_node->m_usrtaskname,16); + + usr_node->m_oom_adj = shm_find_oomadj_by_pid(usr_node->m_taskid); + break; + } + } + + if (i >= MAX_SHM_USR_NODE_NUM ) { + shm_error("%s,%d stat out of memory\n",__FUNCTION__,__LINE__); + goto err_exit; + } + + usr_node->m_size_use += mem_node->m_size; + } + mutex_unlock(&(engine->m_mutex)); + shm_debug("memory_engine_get_stat OK.\n"); + return 0; + +err_exit: + mutex_unlock(&(engine->m_mutex)); + shm_error("memory_engine_get_stat fail\n"); + return -EINVAL; +} + +int memory_engine_dump_stat(memory_engine_t *engine) +{ + struct shm_stat_info *stat_info = NULL; + int res = 0; + int i = 0; + + shm_debug("memory_engine_dump_stat enter. \n"); + if (NULL == engine) { + shm_error("memory_engine_dump_stat invalid param\n"); + return -EINVAL; + } + + stat_info = kzalloc(sizeof(struct shm_stat_info),GFP_KERNEL); + if (NULL == stat_info) { + shm_error("memory_engine_dump_stat kmalloc fail\n"); + return -ENOMEM; + } + + res = memory_engine_get_stat(engine,stat_info); + if (0 != res) { + shm_error("memory_engine_dump_stat fail to gat stat info\n"); + goto err_exit; + } + + printk("total size : %d \nused : %d \ntask count : %d\n", + stat_info->m_size,stat_info->m_used,stat_info->m_count); + + printk(" No | task id( name ) | oom_adj | alloc | use |\n"); + printk("-----------------------------------------------------------------------\n"); + for (i = 0 ; i < stat_info->m_count ; i++) + printk(" %3d | %8d(%16s) | %3d | %10d | %10d |\n", i, stat_info->m_nodes[i].m_taskid, + stat_info->m_nodes[i].m_taskname, stat_info->m_nodes[i].m_oom_adj, + stat_info->m_nodes[i].m_size_alloc, stat_info->m_nodes[i].m_size_use); + + + shm_debug("memory_engine_dump_stat OK.\n"); + if (NULL != stat_info) { + kfree(stat_info); + stat_info = NULL; + } + return 0; + +err_exit: + if (NULL != stat_info) { + kfree(stat_info); + stat_info = NULL; + } + shm_error("memory_engine_dump_stat fail\n"); + return res; +} + +int memory_engine_show_stat(memory_engine_t *engine, struct seq_file *file) +{ + int len = 0, i = 0; + int res = 0; + static struct shm_stat_info gshm_stat; + struct shm_stat_info *stat_info = &gshm_stat; + + shm_debug("memory_engine_show_stat enter. \n"); + if ((NULL == engine) || (NULL == file)) + return -EINVAL; + + memset(stat_info,0,sizeof(struct shm_stat_info)); + + res = memory_engine_get_stat(engine, stat_info); + if (0 != res) { + shm_error("memory_engine_dump_stat fail to gat stat info\n"); + goto err_exit; + } + + len += seq_printf(file,"\ntotal size : %d \nused : %d \ntask count : %d\n", + stat_info->m_size,stat_info->m_used,stat_info->m_count); + + len += seq_printf(file," No | task id( name ) | oom_adj | alloc | use |\n"); + len += seq_printf(file,"-----------------------------------------------------------------------\n"); + for (i = 0 ; i < stat_info->m_count ; i++) + len += seq_printf(file, " %3d | %8d(%16s) | %3d | %10d | %10d |\n", i, stat_info->m_nodes[i].m_taskid, + stat_info->m_nodes[i].m_taskname, stat_info->m_nodes[i].m_oom_adj, + stat_info->m_nodes[i].m_size_alloc, stat_info->m_nodes[i].m_size_use); + + shm_debug("memory_engine_show_stat OK.\n"); + return len; +err_exit: + shm_error("memory_engine_show_stat fail\n"); + return res; +} diff --git a/arch/arm/mach-berlin/modules/shm_amp/memory_engine.h b/arch/arm/mach-berlin/modules/shm_amp/memory_engine.h new file mode 100644 index 00000000..60e7a050 --- /dev/null +++ b/arch/arm/mach-berlin/modules/shm_amp/memory_engine.h @@ -0,0 +1,57 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ********************************************************************************/ + + +#ifndef __memory_engine_h__ +#define __memory_engine_h__ + +#include "shm_type.h" + +#define MEMNODE_ALIGN_ADDR(x) ((x)->m_addr + (x)->m_offset) +#define MEMNODE_ALIGN_SIZE(x) ((x)->m_size - (x)->m_offset) + +int memory_engine_create(memory_engine_t **engine, uint base, + uint size, uint threshold); + +int memory_engine_destroy(memory_engine_t **engine); + +int memory_engine_allocate(memory_engine_t *engine, uint size, + uint alignment, memory_node_t **node); + +int memory_engine_free(memory_engine_t *engine, int alignaddr); + +int memory_engine_cache(memory_engine_t *engine, uint cmd, + shm_driver_operation_t op); + +int memory_engine_show(memory_engine_t *engine, struct seq_file *file); + +/* release shm resource once task was killed*/ +int memory_engine_release_by_taskid(shm_device_t *device, pid_t taskid); + +int memory_engine_takeover(memory_engine_t *engine, int alignaddr); + +int memory_engine_giveup(memory_engine_t *engine, int alignaddr); + +int memory_engine_get_stat(memory_engine_t *engine, struct shm_stat_info *stat); + +int memory_engine_dump_stat(memory_engine_t *engine); + +int memory_engine_show_stat(memory_engine_t *engine, struct seq_file *file); + +memory_node_t *memory_engine_lookup_shm_node_for_size( + struct rb_root *shm_root, size_t phyaddress); + +#endif /* __memory_engine_h__ */ diff --git a/arch/arm/mach-berlin/modules/shm_amp/shm_api.h b/arch/arm/mach-berlin/modules/shm_amp/shm_api.h new file mode 100644 index 00000000..dd9deedc --- /dev/null +++ b/arch/arm/mach-berlin/modules/shm_amp/shm_api.h @@ -0,0 +1,346 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ********************************************************************************/ + + +#ifndef __shm_api_h__ +#define __shm_api_h__ + +#include + +#define ERROR_SHM_MALLOC_FAILED (0xFFFFFFFF) + +typedef struct _MV_SHM_MemInfo { + + size_t m_totalmem; // total size of entire shared memory + size_t m_usedmem; // total memory in use + size_t m_freemem; // total space in bytes not in use + + size_t m_peak_usedmem; // the peak of memory in use history + size_t m_max_freeblock; // size of largest unused block + size_t m_min_freeblock; // size of smallest unused block + size_t m_max_usedblock; // size of largest memory used + size_t m_min_usedblock; // size of smallest memory used + uint m_num_freeblock; // amount of unused block + uint m_num_usedblock; // amount of unused block + +} MV_SHM_MemInfo_t, *pMV_SHM_MemInfo_t; + +typedef struct _MV_SHM_BaseInfo { + + size_t m_size; // [shm_device user/kernel] size of shared memory + size_t m_threshold; // [shm_device user/kernel] threshold of shared memory + + size_t m_base_physaddr; // [shm_device user/kernel] physical address of cacheable memory base + size_t m_base_virtaddr; // [shm_api user/kernel] virtual address of cacheable memory base + + int m_fd; // [shm_api user] file descriptor associated with shared memory cache + +} MV_SHM_BaseInfo_t, *pMV_SHM_BaseInfo_t; + +size_t MV_SHM_Malloc(size_t Size, size_t Alignment); +size_t MV_SHM_NONCACHE_Malloc( size_t Size, size_t Alignment); +int MV_SHM_Free( size_t Offset); +int MV_SHM_NONCACHE_Free( size_t Offset); +int MV_SHM_Takeover(size_t offset); +int MV_SHM_Giveup(size_t offset); +//////////////////////////////////////////////////////////////////////////////// +//! \brief Function: MV_SHM_GetCacheMemInfo +//! +//! Description: Get cache memory information of shared memory +//! +//! \param pMV_SHM_MemInfo_t (IN): -- the pointer to memory information data structure +//! +//! \return Return: S_OK +//! E_INVALIDARG +//! E_FAIL +//! +//////////////////////////////////////////////////////////////////////////////// +int MV_SHM_GetCacheMemInfo( pMV_SHM_MemInfo_t pInfo ); + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Function: MV_SHM_GetCacheBaseInfo +//! +//! Description: Get base information of cacheable shared memory +//! +//! \param pMV_SHM_BaseInfo_t (IN): -- the pointer to base information data structure +//! +//! \return Return: S_OK +//! E_INVALIDARG +//! E_FAIL +//! +//////////////////////////////////////////////////////////////////////////////// +int MV_SHM_GetCacheBaseInfo( pMV_SHM_BaseInfo_t pInfo ); + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Function: MV_SHM_GetCacheMemInfo +//! +//! Description: Get non-cache memory information of shared memory +//! +//! \param pMV_SHM_MemInfo_t (IN): -- the pointer to memory information data structure +//! +//! \return Return: S_OK +//! E_INVALIDARG +//! E_FAIL +//! +//////////////////////////////////////////////////////////////////////////////// +int MV_SHM_GetNonCacheMemInfo( pMV_SHM_MemInfo_t pInfo ); + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Function: MV_SHM_GetNonCacheBaseInfo +//! +//! Description: Get base information of non-cacheable shared memory +//! +//! \param pMV_SHM_BaseInfo_t (IN): -- the pointer to base information data structure +//! +//! \return Return: S_OK +//! E_INVALIDARG +//! E_FAIL +//! +//////////////////////////////////////////////////////////////////////////////// +int MV_SHM_GetNonCacheBaseInfo( pMV_SHM_BaseInfo_t pInfo ); + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Function: MV_SHM_Malloc +//! +//! Description: Allocate contiguous space in shared memory +//! +//! \param Size (IN): -- the number of bytes allocated. +//! \param Alignment (IN): -- the number of bytes aligned. +//! \param pPhysAddr (OUT): -- the pointer to a variable of physical address of the space allocated +//! \param pVirtAddr (OUT): -- the pointer to a variable of virtual address of the space allocated +//! +//! \return Return: Not ERROR_SHM_MALLOC_FAILED | ok, return memory offset of shared memory base address +//! ERROR_SHM_MALLOC_FAILED | failed. +//! +//////////////////////////////////////////////////////////////////////////////// +size_t MV_SHM_Malloc( size_t Size, size_t Alignment); + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Function: MV_SHM_Free +//! +//! Description: release contiguous space in shared memory +//! +//! \param Offset (IN): -- memory offset of shared memory base address +//! +//! \return Return: S_OK +//! E_INVALIDARG +//! E_FAIL +//! +//////////////////////////////////////////////////////////////////////////////// +int MV_SHM_Free( size_t Offset); +//int MV_SHM_Free( size_t Offset, char *pFunc, int line); +//////////////////////////////////////////////////////////////////////////////// +//! \brief Function: MV_SHM_InvalidateCache +//! +//! Description: Invalidate L1 and L2 Cahce Region data. +//! The operation need to make sure +//! that the adress and size and cache line based. Use this one with +//! cautions.(Typically, it is used on DMA write, CPU read only case) +//! All cache lines which are in address rage will be operated. So the addrres +//! and size are not requested to be aligned in word or cache line. +//! Allowed by : Cache Memory Address On Galois_Linux +//! +//! \param Offset (IN): -- contain memory offset of shared memory base address +//! \param Size (IN): -- contains size of Region in bytes +//! +//! \return Return: S_OK +//! E_FAIL +//! +//////////////////////////////////////////////////////////////////////////////// +int MV_SHM_InvalidateCache(size_t Offset, size_t Size); + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Function: MV_SHM_CleanCache +//! +//! Description: Clean L1 and L2 Cahce Region data +//! All cache lines which are in address rage will be operated. So the addrres +//! and size are not requested to be aligned in word or cache line. +//! Allowed by : Cache Memory Address On Galois_Linux +//! +//! \param Offset (IN): -- contain memory offset of shared memory base address +//! \param Size (IN): -- contains size of Region in bytes +//! +//! \return Return: S_OK +//! E_FAIL +//! +//////////////////////////////////////////////////////////////////////////////// +int MV_SHM_CleanCache(size_t Offset, size_t Size); + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Function: MV_SHM_CleanAndInvalidateCache +//! +//! Description: Clean L1 and L2 Cahce Region data +//! All cache lines which are in address rage will be operated. So the addrres +//! and size are not requested to be aligned in word or cache line. +//! Allowed by : Cache Memory Address On Galois_Linux +//! +//! \param Offset (IN): -- contain memory offset of shared memory base address +//! \param Size (IN): -- contains size of Region in bytes +//! +//! \return Return: S_OK +//! E_FAIL +//! +//////////////////////////////////////////////////////////////////////////////// +int MV_SHM_CleanAndInvalidateCache(size_t Offset, size_t Size); + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Function: MV_SHM_GetVirtAddr +//! +//! Description: get virtual address of non-cacheable memory from offset +//! +//! \param Offset (IN): -- contain memory offset of shared memory base address +//! +//! \return Return: NULL | system not ready or input is error +//! Not NULL | ok +//! +//////////////////////////////////////////////////////////////////////////////// +void * MV_SHM_GetNonCacheVirtAddr(size_t Offset); + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Function: MV_SHM_GetVirtAddr +//! +//! Description: get virtual address of cacheable memory from offset +//! +//! \param Offset (IN): -- contain memory offset of shared memory base address +//! +//! \return Return: NULL | system not ready or input is error +//! Not NULL | ok +//! +//////////////////////////////////////////////////////////////////////////////// +void * MV_SHM_GetCacheVirtAddr(size_t Offset); + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Function: MV_SHM_GetNonCachePhysAddr +//! +//! Description: get physical address of non-cacheable memory from offset +//! +//! \param Offset (IN): -- contain memory offset of shared memory base address +//! +//! +//! \return Return: NULL | system not ready or input is error +//! Not NULL | ok +//! +//////////////////////////////////////////////////////////////////////////////// +void * MV_SHM_GetNonCachePhysAddr(size_t Offset); + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Function: MV_SHM_GetCachePhysAddr +//! +//! Description: get physical address of cacheable memory from offset +//! +//! \param Offset (IN): -- contain memory offset of shared memory base address +//! +//! +//! \return Return: NULL | system not ready or input is error +//! Not NULL | ok +//! +//////////////////////////////////////////////////////////////////////////////// +void * MV_SHM_GetCachePhysAddr(size_t Offset); + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Function: MV_SHM_RevertNonCacheVirtAddr +//! +//! Description: virtual address of non-cacheable memory reverts to offset +//! +//! \param ptr (IN): -- virtual address of non-cacheable memory +//! +//! \return Return: ERROR_SHM_MALLOC_FAILED | system not ready or input is error +//! Not ERROR_SHM_MALLOC_FAILED | offset +//! +//////////////////////////////////////////////////////////////////////////////// +size_t MV_SHM_RevertNonCacheVirtAddr(void * ptr); + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Function: MV_SHM_RevertCacheVirtAddr +//! +//! Description: virtual address of cacheable memory reverts to offset +//! +//! \param ptr (IN): -- virtual address of cacheable memory +//! +//! \return Return: ERROR_SHM_MALLOC_FAILED | system not ready or input is error +//! Not ERROR_SHM_MALLOC_FAILED | offset +//! +//////////////////////////////////////////////////////////////////////////////// +size_t MV_SHM_RevertCacheVirtAddr(void * ptr); + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Function: MV_SHM_RevertNonCachePhysAddr +//! +//! Description: physical address of non-cacheable memory reverts to offset +//! +//! \param ptr (IN): -- physical address of non-cacheable memory +//! +//! +//! \return Return: ERROR_SHM_MALLOC_FAILED | system not ready or input is error +//! Not ERROR_SHM_MALLOC_FAILED | offset +//! +//////////////////////////////////////////////////////////////////////////////// +size_t MV_SHM_RevertNonCachePhysAddr(void * ptr); + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Function: MV_SHM_RevertCachePhysAddr +//! +//! Description: physical address of cacheable memory reverts to offset +//! +//! \param ptr (IN): -- physical address of cacheable memory +//! +//! +//! \return Return: ERROR_SHM_MALLOC_FAILED | system not ready or input is error +//! Not ERROR_SHM_MALLOC_FAILED | offset +//! +//////////////////////////////////////////////////////////////////////////////// +size_t MV_SHM_RevertCachePhysAddr(void * ptr); + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Function: MV_SHM_NONCACHE_Malloc +//! +//! Description: Allocate contiguous space in shared memory +//! +//! \param Size (IN): -- the number of bytes allocated. +//! \param Alignment (IN): -- the number of bytes aligned. +//! +//! \return Return: Not ERROR_SHM_MALLOC_FAILED | ok, return memory offset of shared memory base address +//! ERROR_SHM_MALLOC_FAILED | failed. +//! +//////////////////////////////////////////////////////////////////////////////// +size_t MV_SHM_NONCACHE_Malloc( size_t Size, size_t Alignment); + +//////////////////////////////////////////////////////////////////////////////// +//! \brief Function: MV_SHM_NONCACHE_Free +//! +//! Description: release contiguous space in shared memory +//! +//! \param Offset (IN): -- memory offset of shared memory base address +//! +//! \return Return: S_OK +//! E_INVALIDARG +//! E_FAIL +//! +//////////////////////////////////////////////////////////////////////////////// +int MV_SHM_NONCACHE_Free( size_t Offset); + +int MV_SHM_GetMemory(size_t offset); + +int MV_SHM_PutMemory(size_t offset); + +int MV_SHM_NONCACHE_GetMemory(size_t offset); + +int MV_SHM_NONCACHE_PutMemory(size_t offset); + +void MV_SHM_Check_Clean_Map(pid_t pid); + + +#endif /* __shm_api_h__ */ diff --git a/arch/arm/mach-berlin/modules/shm_amp/shm_api_kernel.c b/arch/arm/mach-berlin/modules/shm_amp/shm_api_kernel.c new file mode 100644 index 00000000..5f825e63 --- /dev/null +++ b/arch/arm/mach-berlin/modules/shm_amp/shm_api_kernel.c @@ -0,0 +1,682 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ********************************************************************************/ + + +/******************************************************************************* + System head files +*/ + +#include /* printk() */ +#include +#include /* kmalloc() */ +#include /* everything... */ +#include /* error codes */ +#include /* size_t */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/******************************************************************************* + Local head files +*/ + +#include "shm_type.h" +#include "shm_device.h" +#include "shm_api.h" +#include "memory_engine.h" +/******************************************************************************* + Module Variable +*/ + + +void MV_SHM_Check_Clean_Map(pid_t pid) +{ + +} + + +static void MV_SHM_insert_phyaddress_node(struct rb_root *shm_root, + shm_address_t *shm_node) +{ + struct rb_node **p = &shm_root->rb_node; + struct rb_node *parent = NULL; + shm_address_t *tmp_node; + + while (*p) { + parent = *p; + tmp_node = rb_entry(parent, shm_address_t, phys_node); + + if (shm_node->m_phyaddress < tmp_node->m_phyaddress) + p = &parent->rb_left; + else + p = &parent->rb_right; + } + + rb_link_node(&shm_node->phys_node, parent, p); + rb_insert_color(&shm_node->phys_node, shm_root); +} + + +static shm_address_t *MV_SHM_lookup_phyaddress_node( + struct rb_root *shm_root, const uint address) +{ + struct rb_node *n = shm_root->rb_node; + shm_address_t *tmp_node; + + while (n) { + tmp_node = rb_entry(n, shm_address_t, phys_node); + if (address < tmp_node->m_phyaddress) { + n = n->rb_left; + } else if (address > tmp_node->m_phyaddress) { + if (address < (tmp_node->m_phyaddress + + tmp_node->m_size) ) { + return tmp_node; + } else { + n = n->rb_right; + } + } else { + return tmp_node; + } + } + return NULL; +} + + +static void MV_SHM_delete_phyaddress_node(struct rb_root *shm_root, + shm_address_t *shm_node) +{ + rb_erase(&shm_node->phys_node, shm_root); +} + + +static void MV_SHM_insert_virtaddress_node(struct rb_root *shm_root, + shm_address_t *shm_node) +{ + struct rb_node **p = &shm_root->rb_node; + struct rb_node *parent = NULL; + shm_address_t *tmp_node; + + while (*p) { + parent = *p; + tmp_node = rb_entry(parent, shm_address_t, virt_node); + + if (shm_node->m_virtaddress < tmp_node->m_virtaddress) + p = &parent->rb_left; + else + p = &parent->rb_right; + } + + rb_link_node(&shm_node->virt_node, parent, p); + rb_insert_color(&shm_node->virt_node, shm_root); +} + + +static shm_address_t *MV_SHM_lookup_virtaddress_node( + struct rb_root *shm_root, const uint address) +{ + struct rb_node *n = shm_root->rb_node; + shm_address_t *tmp_node; + + while (n) { + tmp_node = rb_entry(n, shm_address_t, virt_node); + if (address < tmp_node->m_virtaddress) { + n = n->rb_left; + } else if (address > tmp_node->m_virtaddress) { + if (address < (tmp_node->m_virtaddress + + tmp_node->m_size) ) { + return tmp_node; + } else { + n = n->rb_right; + } + } else { + return tmp_node; + } + } + + return NULL; +} + + +static void MV_SHM_delete_virtaddress_node(struct rb_root *shm_root, + shm_address_t *shm_node) +{ + rb_erase(&shm_node->virt_node, shm_root); +} + + +static void* MV_SHM_ioremap(unsigned long phys_start, unsigned long size) +{ + struct vm_struct *area; + + area = get_vm_area(size, VM_IOREMAP); + if (area == NULL) + return NULL; + + area->phys_addr = phys_start; + if (ioremap_page_range((unsigned long)area->addr, + (unsigned long)area->addr + size, phys_start, PAGE_KERNEL)) { + return NULL; + } + return area->addr; +} + + +static void* MV_SHM_noncache_ioremap(unsigned long phys_start, + unsigned long size) +{ + return (void*)ioremap_nocache(phys_start, size); +} + +static size_t MV_SHM_Base_ioremap(unsigned long phys_start, + unsigned long size, int mem_type) +{ + size_t virtaddress; + if (mem_type == SHM_CACHE) { + virtaddress = (size_t)MV_SHM_ioremap(phys_start, size); + } else if (mem_type == SHM_NONCACHE) { + virtaddress = (size_t)MV_SHM_noncache_ioremap(phys_start, size); + } else { + virtaddress = (size_t)NULL; + } + return virtaddress; +} + +int MV_SHM_iounmap_and_free_rbtree(shm_device_t *device, size_t Offset) +{ + shm_address_t *address_node; + + if (device == NULL) { + shm_error("kernel MV_SHM_iounmap_and_free_rbtree error\n"); + return -ENODEV; + } + + down_read(&device->m_rwsem); + address_node = MV_SHM_lookup_phyaddress_node( + &device->m_phyaddr_root, (Offset + device->m_base)); + up_read(&device->m_rwsem); + + if (address_node ==NULL) { + return 0; + } + + down_write(&device->m_rwsem); + MV_SHM_delete_phyaddress_node(&device->m_phyaddr_root, address_node); + MV_SHM_delete_virtaddress_node(&device->m_virtaddr_root,address_node); + up_write(&device->m_rwsem); + + iounmap((void *)(address_node->m_virtaddress)); + kfree(address_node); + + return 0; +} + +static size_t MV_SHM_Base_Malloc(shm_device_t *shm_dev, size_t Size, + size_t Alignment, int mem_type) +{ + size_t Offset; + + if ((shm_dev == NULL) || (Size == 0) + || (Alignment % 2)) { + shm_error("kernel MV_SHM_Base_Malloc parameters error" + "shm_dev[%p] size[%08x] align[%0x] mem_type[%d]\n", + shm_dev, Size, Alignment, mem_type); + return ERROR_SHM_MALLOC_FAILED; + } + + if (shm_check_alignment(Alignment) != 0) { + shm_error("kernel MV_SHM_Base_Malloc Alignment parameter" + " error. align[%x]\n", Alignment); + return ERROR_SHM_MALLOC_FAILED; + } + + shm_round_size(Size); + shm_round_alignment(Alignment); + + Offset = shm_device_allocate(shm_dev, + Size, Alignment, mem_type); + if (Offset == ERROR_SHM_MALLOC_FAILED) { + + shm_error("kernel MV_SHM_Base_Malloc malloc shm fail " + "shm_dev[%p] size[%08x] align[%0x] mem_type[%d]\n", + shm_dev, Size, Alignment, mem_type); + return ERROR_SHM_MALLOC_FAILED; + } + + return Offset; +} + +static int MV_SHM_Base_Free(shm_device_t *shm_dev, size_t Offset) +{ + if (shm_dev == NULL) + return -ENODEV; + return shm_device_free(shm_dev, Offset); +} + +static int MV_SHM_Base_Takeover(shm_device_t *shm_dev, size_t Offset) +{ + if (NULL == shm_dev) + return -ENODEV; + + return shm_device_takeover(shm_dev, Offset); +} + +static int MV_SHM_Base_Giveup(shm_device_t *shm_dev, size_t Offset) +{ + if (NULL == shm_dev) + return -ENODEV; + + return shm_device_giveup(shm_dev, Offset); +} + + +static void *MV_SHM_Base_GetVirtAddr(shm_device_t *shm_dev, + size_t Offset, int mem_type) +{ + shm_address_t *address_node; + memory_node_t *tmp; + size_t physaddress = 0; + + if (shm_dev == NULL) { + shm_error("kernel MV_SHM_Base_GetVirtAddr parameters" + " error shm_dev is NULL"); + return NULL; + } + + if (Offset >= shm_dev->m_size) { + shm_error("kernel MV_SHM_Base_GetVirtAddr parameters error" + " shm_dev[%p] Offset[%08x] > shm_size[%08x] mem_type[%d]" + "\n", shm_dev, Offset, shm_dev->m_size, mem_type); + return NULL; + } + + physaddress = Offset + shm_dev->m_base; + + mutex_lock(&(shm_dev->m_engine->m_mutex)); + tmp = memory_engine_lookup_shm_node_for_size( + &(shm_dev->m_engine->m_shm_root), physaddress); + mutex_unlock(&(shm_dev->m_engine->m_mutex)); + if (tmp == NULL) { + shm_error("kernel MV_SHM_Base_GetVirtAddr" + " memory_engine_lookup_shm_node_for_size" + " offset[%08x] physaddress[%08x] mem_type[%d]\n", + Offset, (physaddress), mem_type); + return NULL; + } + + down_write(&shm_dev->m_rwsem); + address_node = + MV_SHM_lookup_phyaddress_node( + &(shm_dev->m_phyaddr_root), physaddress); + + if (address_node == NULL) { + address_node = kmalloc(sizeof(shm_address_t), GFP_KERNEL); + if(address_node == NULL) { + up_write(&shm_dev->m_rwsem); + shm_error("kernel MV_SHM_Base_GetVirtAddr" + " kmalloc fail offset[%08x] mem_type[%d]\n", + Offset, mem_type); + return NULL; + } + address_node->m_phyaddress = tmp->m_phyaddress; + address_node->m_size = MEMNODE_ALIGN_SIZE(tmp); + address_node->m_virtaddress = (size_t)MV_SHM_Base_ioremap( + address_node->m_phyaddress, + address_node->m_size, mem_type); + if (address_node->m_virtaddress == (size_t)NULL) { + kfree(address_node); + up_write(&shm_dev->m_rwsem); + shm_error("kernel MV_SHM_Base_GetVirtAddr" + " MV_SHM_ioremap fail offset[%08x]" + " mem_type[%d]\n",Offset, mem_type); + return NULL; + } + + MV_SHM_insert_phyaddress_node( + &(shm_dev->m_phyaddr_root), address_node); + MV_SHM_insert_virtaddress_node( + &(shm_dev->m_virtaddr_root), address_node); + up_write(&shm_dev->m_rwsem); + + return (void *)(address_node->m_virtaddress + + ((Offset + shm_dev->m_base) + - address_node->m_phyaddress)); + } else { + if((address_node->m_phyaddress == tmp->m_phyaddress) + && (address_node->m_size == MEMNODE_ALIGN_SIZE(tmp))) { + up_write(&shm_dev->m_rwsem); + return (void *)(address_node->m_virtaddress + + ((Offset + shm_dev->m_base) + - address_node->m_phyaddress)); + } else { + MV_SHM_delete_phyaddress_node( + &(shm_dev->m_phyaddr_root), address_node); + MV_SHM_delete_virtaddress_node( + &(shm_dev->m_virtaddr_root),address_node); + + iounmap((void *)(address_node->m_virtaddress)); + + address_node->m_phyaddress = tmp->m_phyaddress; + address_node->m_size = MEMNODE_ALIGN_SIZE(tmp); + address_node->m_virtaddress = (size_t)MV_SHM_Base_ioremap( + address_node->m_phyaddress, + address_node->m_size, mem_type); + if (address_node->m_virtaddress == (size_t)NULL) { + kfree(address_node); + up_write(&shm_dev->m_rwsem); + shm_error("kernel MV_SHM_Base_GetVirtAddr" + " MV_SHM_ioremap fail offset[%08x]" + " mem_type[%d]\n", Offset, mem_type); + return NULL; + } + + MV_SHM_insert_phyaddress_node( + &(shm_dev->m_phyaddr_root), address_node); + MV_SHM_insert_virtaddress_node( + &(shm_dev->m_virtaddr_root), address_node); + up_write(&shm_dev->m_rwsem); + return (void *)(address_node->m_virtaddress + + ((Offset + shm_dev->m_base) + - address_node->m_phyaddress)); + } + } +} + + +static void *MV_SHM_Base_GetPhysAddr(shm_device_t *shm_dev, size_t Offset) +{ + if (shm_dev == NULL) { + shm_error("kernel MV_SHM_Base_GetPhysAddr parameter error" + "shm dev is NULL"); + return NULL; + } + + if (Offset >= shm_dev->m_size) { + shm_error("kernel MV_SHM_Base_GetPhysAddr parameter error" + "shm_dev[%p] offset[%08x] > shm_size[%08x]\n", + shm_dev, Offset, shm_dev->m_size); + return NULL; + } + + return (void *)(Offset + shm_dev->m_base); +} + +static size_t MV_SHM_Base_RevertVirtAddr(shm_device_t *shm_dev, void *ptr) +{ + shm_address_t *address_node; + if (shm_dev == NULL) { + shm_error("kernel MV_SHM_Base_RevertVirtAddr parameter error\n"); + return ERROR_SHM_MALLOC_FAILED; + } + + down_read(&shm_dev->m_rwsem); + address_node = + MV_SHM_lookup_virtaddress_node( + &(shm_dev->m_virtaddr_root), (size_t) ptr); + up_read(&shm_dev->m_rwsem); + + if (address_node == NULL) { + shm_error("kernel MV_SHM_RevertCacheVirtAddr" + " fail [%08x]\n",(size_t) ptr); + return ERROR_SHM_MALLOC_FAILED; + } else { + return (size_t)((address_node->m_phyaddress + + (((size_t) ptr) - address_node->m_virtaddress)) + - shm_dev->m_base); + } +} + +static size_t MV_SHM_Base_RevertPhysAddr(shm_device_t *shm_dev, void *ptr) +{ + if (shm_dev == NULL) { + shm_error("kernel MV_SHM_Base_RevertPhysAddr parameter error" + " shm_dev[%p]\n", shm_dev); + return ERROR_SHM_MALLOC_FAILED; + } + + if (((size_t) ptr < shm_dev->m_base) || + ((size_t) ptr >= shm_dev->m_base + shm_dev->m_size)) { + shm_error("kernel MV_SHM_Base_RevertPhysAddr parameter error" + " physaddr[%08x] shm_base[%08x] shm_size[%08x]\n", + (size_t)ptr, shm_dev->m_base, shm_dev->m_size); + return ERROR_SHM_MALLOC_FAILED; + } + + return ((size_t) ptr - shm_dev->m_base); +} + +static int MV_SHM_Base_GetMemory(shm_device_t *shm_dev, + size_t offset, int mem_type) +{ + if (shm_dev == NULL) { + shm_error("kernel MV_SHM_Base_GetMemory parameter error" + " shm_dev[%p] offset[%08x] mem_type[%d]\n", + shm_dev, offset, mem_type); + return -1; + } + + if (shm_device_add_reference_count(shm_dev,offset) != 0) { + shm_error("kernel MV_SHM_Base_GetMemory " + "shm_device_add_reference_count fail" + " offset[%08x] mem_type[%d]\n", offset, mem_type); + return -1; + } + + if (MV_SHM_Base_GetVirtAddr(shm_dev, offset, mem_type) == NULL) { + shm_error("kernel MV_SHM_Base_GetMemory fail\n"); + return -1; + } + + return 0; +} + +static int MV_SHM_Base_PutMemory(shm_device_t *shm_dev, size_t offset) +{ + MV_SHM_iounmap_and_free_rbtree(shm_dev, offset); + return MV_SHM_Base_Free(shm_dev, offset); +} + +/******************************************************************************* + Module API: for kernel module use only, mainly CBuf and Graphics driver, suppose to be removed later +*/ +int MV_SHM_Init(shm_device_t * device_secure, shm_device_t * device_cache) +{ + if (device_cache == NULL) + return -EINVAL; + + init_rwsem(&device_cache->m_rwsem); + device_cache->m_phyaddr_root = RB_ROOT; + device_cache->m_virtaddr_root = RB_ROOT; + + init_rwsem(&device_secure->m_rwsem); + device_secure->m_phyaddr_root = RB_ROOT; + device_secure->m_virtaddr_root = RB_ROOT; + return 0; +} + +int MV_SHM_Exit(void) +{ + return 0; +} + + +int MV_SHM_GetCacheMemInfo(pMV_SHM_MemInfo_t pInfo) +{ + if (pInfo == NULL) + return -EINVAL; + + if (shm_device == NULL) + return -ENODEV; + + return shm_device_get_meminfo(shm_device, pInfo); +} + + +int MV_SHM_GetCacheBaseInfo(pMV_SHM_BaseInfo_t pInfo) +{ + if (pInfo == NULL) + return -EINVAL; + + if (shm_device == NULL) + return -ENODEV; + + pInfo->m_base_physaddr = shm_device->m_base; + pInfo->m_base_virtaddr = 0; + pInfo->m_fd = -1; + pInfo->m_size = shm_device->m_size; + pInfo->m_threshold = shm_device->m_threshold; + + return 0; +} + + +size_t MV_SHM_Malloc(size_t Size, size_t Alignment) +{ + return MV_SHM_Base_Malloc(shm_device, Size, Alignment,SHM_CACHE); +} + + +int MV_SHM_Takeover(size_t Offset) +{ + return MV_SHM_Base_Takeover(shm_device, Offset); +} + + +int MV_SHM_Giveup(size_t Offset) +{ + return MV_SHM_Base_Giveup(shm_device, Offset); +} + + +int MV_SHM_Free(size_t Offset) +{ + MV_SHM_iounmap_and_free_rbtree(shm_device, Offset); + return MV_SHM_Base_Free(shm_device, Offset); +} + + +size_t MV_SHM_NONCACHE_Malloc(size_t Size, size_t Alignment) +{ + return MV_SHM_Base_Malloc(shm_device, Size, Alignment,SHM_NONCACHE); +} + + +int MV_SHM_NONCACHE_Free(size_t Offset) +{ + MV_SHM_iounmap_and_free_rbtree(shm_device, Offset); + return MV_SHM_Base_Free(shm_device, Offset); +} + + +void *MV_SHM_GetNonCacheVirtAddr(size_t Offset) +{ + return MV_SHM_Base_GetVirtAddr(shm_device, Offset, SHM_NONCACHE); +} + + +void *MV_SHM_GetCacheVirtAddr(size_t Offset) +{ + return MV_SHM_Base_GetVirtAddr(shm_device, Offset, SHM_CACHE); +} + + +void *MV_SHM_GetNonCachePhysAddr(size_t Offset) +{ + return MV_SHM_Base_GetPhysAddr(shm_device, Offset); +} + + +void *MV_SHM_GetCachePhysAddr(size_t Offset) +{ + return MV_SHM_Base_GetPhysAddr(shm_device, Offset); +} + + +size_t MV_SHM_RevertNonCacheVirtAddr(void *ptr) +{ + return MV_SHM_Base_RevertVirtAddr(shm_device, ptr); +} + + +size_t MV_SHM_RevertCacheVirtAddr(void *ptr) +{ + return MV_SHM_Base_RevertVirtAddr(shm_device, ptr); +} + + +size_t MV_SHM_RevertNonCachePhysAddr(void *ptr) +{ + return MV_SHM_Base_RevertPhysAddr(shm_device, ptr); +} + + +size_t MV_SHM_RevertCachePhysAddr(void *ptr) +{ + return MV_SHM_Base_RevertPhysAddr(shm_device, ptr); +} + + +int MV_SHM_GetMemory(size_t offset) +{ + return MV_SHM_Base_GetMemory(shm_device, offset, SHM_CACHE); +} + + +int MV_SHM_PutMemory(size_t offset) +{ + return MV_SHM_Base_PutMemory(shm_device, offset); +} + + +int MV_SHM_NONCACHE_GetMemory(size_t offset) +{ + return MV_SHM_Base_GetMemory(shm_device, offset, SHM_NONCACHE); +} + + +int MV_SHM_NONCACHE_PutMemory(size_t offset) +{ + return MV_SHM_Base_PutMemory(shm_device, offset); +} + + +EXPORT_SYMBOL(MV_SHM_Malloc); +EXPORT_SYMBOL(MV_SHM_Free); +EXPORT_SYMBOL(MV_SHM_Takeover); +EXPORT_SYMBOL(MV_SHM_Giveup); +EXPORT_SYMBOL(MV_SHM_NONCACHE_Malloc); +EXPORT_SYMBOL(MV_SHM_NONCACHE_Free); +EXPORT_SYMBOL(MV_SHM_GetNonCacheVirtAddr); +EXPORT_SYMBOL(MV_SHM_GetCacheVirtAddr); +EXPORT_SYMBOL(MV_SHM_GetNonCachePhysAddr); +EXPORT_SYMBOL(MV_SHM_GetCachePhysAddr); +EXPORT_SYMBOL(MV_SHM_RevertNonCacheVirtAddr); +EXPORT_SYMBOL(MV_SHM_RevertCacheVirtAddr); +EXPORT_SYMBOL(MV_SHM_RevertNonCachePhysAddr); +EXPORT_SYMBOL(MV_SHM_RevertCachePhysAddr); +EXPORT_SYMBOL(MV_SHM_GetCacheMemInfo); +EXPORT_SYMBOL(MV_SHM_GetCacheBaseInfo); +EXPORT_SYMBOL(MV_SHM_Check_Clean_Map); +EXPORT_SYMBOL(MV_SHM_GetMemory); +EXPORT_SYMBOL(MV_SHM_PutMemory); +EXPORT_SYMBOL(MV_SHM_NONCACHE_GetMemory); +EXPORT_SYMBOL(MV_SHM_NONCACHE_PutMemory); diff --git a/arch/arm/mach-berlin/modules/shm_amp/shm_api_kernel.h b/arch/arm/mach-berlin/modules/shm_amp/shm_api_kernel.h new file mode 100644 index 00000000..243fe4c1 --- /dev/null +++ b/arch/arm/mach-berlin/modules/shm_amp/shm_api_kernel.h @@ -0,0 +1,28 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ********************************************************************************/ + + +#ifndef __shm_api_kernel_h__ +#define __shm_api_kernel_h__ + +int MV_SHM_Init(shm_device_t *device_secure, shm_device_t *device_cache); + +int MV_SHM_Exit(void); + +void MV_SHM_iounmap_and_free_rbtree(shm_device_t *device, size_t Offset); + + +#endif /* __shm_device_h__ */ diff --git a/arch/arm/mach-berlin/modules/shm_amp/shm_device.c b/arch/arm/mach-berlin/modules/shm_amp/shm_device.c new file mode 100644 index 00000000..6f2d1dac --- /dev/null +++ b/arch/arm/mach-berlin/modules/shm_amp/shm_device.c @@ -0,0 +1,496 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ********************************************************************************/ + + +/******************************************************************************* + System head files +*/ + +#include /* printk() */ +#include /* kmalloc() */ +#include /* everything... */ +#include /* error codes */ +#include /* size_t */ + +/******************************************************************************* + Local head files +*/ + +#include "shm_type.h" +#include "memory_engine.h" + +/******************************************************************************* + Device API +*/ + +int shm_device_create(shm_device_t ** device, + uint base, uint size, uint threshold) +{ + int res; + shm_device_t *new_device; + + shm_debug("shm_device_create start.\n"); + + if (device == NULL) + return -EINVAL; + + new_device = kmalloc(sizeof(shm_device_t), GFP_KERNEL); + if (new_device == NULL) + return -ENOMEM; + + memset(new_device, 0, sizeof(shm_device_t)); + new_device->m_base = base; + new_device->m_size = size; + new_device->m_threshold = threshold; + + res = memory_engine_create(&new_device->m_engine, + new_device->m_base, + new_device->m_size, new_device->m_threshold); + if (res != 0) { + shm_error("memory_engine_create failed. (%d)\n", res); + return res; + } + + shm_trace("memory size (bytes) = 0x%08X\n", + new_device->m_size); + shm_trace("memory threshold (bytes) = 0x%08X\n", + new_device->m_threshold); + shm_trace("memory base phys addr = 0x%08X\n", + new_device->m_base); + + *device = new_device; + + return 0; +} + +int shm_device_destroy(shm_device_t ** device) +{ + int res; + + shm_debug("shm_device_destroy start.\n"); + + if (device == NULL) + return -EINVAL; + + res = memory_engine_destroy(&((*device)->m_engine)); + if (res != 0) { + shm_error("memory_engine_destroy failed. (%d)\n", res); + return res; + } + + kfree(*device); + *device = NULL; + + shm_trace("shm_device_destroy OK.\n"); + + return 0; +} + +int shm_device_get_meminfo(shm_device_t * device, pMV_SHM_MemInfo_t pInfo) +{ + shm_debug("shm_device_get_meminfo start.\n"); + + if ((device == NULL) || (pInfo == NULL)) + return -EINVAL; + + pInfo->m_totalmem = device->m_engine->m_size; + pInfo->m_usedmem = device->m_engine->m_size_used; + pInfo->m_freemem = device->m_engine->m_size_free; + + pInfo->m_peak_usedmem = device->m_engine->m_peak_usedmem; + pInfo->m_max_freeblock = device->m_engine->m_max_freeblock; + pInfo->m_min_freeblock = device->m_engine->m_min_freeblock; + pInfo->m_max_usedblock = device->m_engine->m_max_usedblock; + pInfo->m_min_usedblock = device->m_engine->m_min_usedblock; + pInfo->m_num_freeblock = device->m_engine->m_num_freeblock; + pInfo->m_num_usedblock = device->m_engine->m_num_usedblock; + + return 0; +} + +int shm_device_get_baseinfo(shm_device_t * device, pMV_SHM_BaseInfo_t pInfo) +{ + shm_debug("shm_device_get_baseinfo start.\n"); + + if ((device == NULL) || (pInfo == NULL)) + return -EINVAL; + + pInfo->m_size = device->m_size; + pInfo->m_threshold = device->m_threshold; + pInfo->m_base_physaddr = device->m_base; + + return 0; +} + + +int shm_device_get_node_info(shm_device_t *device, + shm_driver_operation_t *op) +{ + memory_node_t *tmp; + if (device == NULL) + return -1; + mutex_lock(&(device->m_engine->m_mutex)); + tmp = memory_engine_lookup_shm_node_for_size( + &(device->m_engine->m_shm_root), op->m_param1); + + op->m_param2 = 0; + if (tmp == NULL) { + printk("shm_device_get_node_info fail" + " physaddress[%08lx]\n",op->m_param1); + mutex_unlock(&(device->m_engine->m_mutex)); + return -1; + } + + op->m_param1 = tmp->m_phyaddress; + op->m_param2 = MEMNODE_ALIGN_SIZE(tmp); + mutex_unlock(&(device->m_engine->m_mutex)); + return 0; +} + +int shm_device_check_test(shm_device_t *device, + shm_check_test_t *op) +{ + int i = 0; + int res = 0; + memory_node_t *node = NULL; + user_node_t *usertmp = NULL; + + if (device == NULL) + return -1; + mutex_lock(&(device->m_engine->m_mutex)); + node = memory_engine_lookup_shm_node_for_size( + &device->m_engine->m_shm_root, + op->offset + device->m_engine->m_base); + if (node == NULL) { + op->node_alive = 0; + } else { + op->node_alive = 1; + switch (op->cmd) { + case SHM_TEST_GET_INFO: + op->takeover_flag = node->b_takeover; + op->physical = node->m_phyaddress; + op->malloc_refcount = node->m_task_free_flag; + op->malloc_taskid = node->m_taskid; + + list_for_each_entry(usertmp, &node->m_user_list, + m_list) { + op->user_taskid[i] = usertmp->m_taskid; + i++; + if (i == 5) + break; + } + res = 0; + break; + } + } + mutex_unlock(&(device->m_engine->m_mutex)); + return res; +} + +int shm_device_add_reference_count(shm_device_t *device, + size_t offset) +{ + pid_t taskid; + size_t phyaddress; + int res = 0; + + memory_node_t *node = NULL; + user_node_t *tmp = NULL; + struct task_struct *grptask = NULL; + + if (device == NULL) { + shm_error("shm_device_free device is NULL\n"); + return -EINVAL; + } + + phyaddress = offset + device->m_engine->m_base; + mutex_lock(&device->m_engine->m_mutex); + node = memory_engine_lookup_shm_node_for_size( + &device->m_engine->m_shm_root, + phyaddress); + if (node == NULL) { + printk("shm_device_add_reference_count fail 1" + " physaddress[%08x]\n", phyaddress); + res = -1; + goto EXIT; + } + + if (node->b_takeover == 1) { + res = 0; + goto EXIT; + } + + taskid = task_tgid_vnr(current); + if (taskid == node->m_taskid) { + if (node->memory_type == SHM_SECURE_CACHE || + node->memory_type == SHM_SECURE_NONCACHE) { + node->m_refcount++; + node->m_reference_count++; + } + res = 0; + goto EXIT; + } + + list_for_each_entry(tmp, &node->m_user_list, m_list) { + if (tmp->m_taskid == taskid) { + if (node->memory_type == SHM_SECURE_CACHE || + node->memory_type == SHM_SECURE_NONCACHE) { + tmp->m_refcount++; + node->m_reference_count++; + } + res = 0; + goto EXIT; + } + } + + tmp = kmalloc(sizeof(user_node_t), GFP_KERNEL); + if (tmp == NULL) { + res = -ENOMEM; + goto EXIT; + } + + tmp->m_refcount = 1; + tmp->m_threadid = task_pid_vnr(current); + strncpy(tmp->m_threadname, current->comm, 16); + tmp->m_taskid = task_tgid_vnr(current); + grptask = pid_task(task_tgid(current), PIDTYPE_PID); + if (NULL != grptask) { + strncpy(tmp->m_taskname, grptask->comm, 16); + } else { + memset(tmp->m_taskname, 0, 16); + } + + list_add(&tmp->m_list, &node->m_user_list); + node->m_reference_count++; + res = 0; + +EXIT: + mutex_unlock(&device->m_engine->m_mutex); + return res; +} + +int shm_device_show_detail(shm_device_t * device, struct seq_file *file) +{ + shm_debug("shm_device_show_detail start.\n"); + + if ((device == NULL) || (file == NULL)) + return -EINVAL; + + /* Walk all nodes and print node info to buffer */ + return memory_engine_show(device->m_engine, file); +} + +uint shm_device_allocate(shm_device_t * device, uint size, uint align, int mem_type) +{ + int res = 0; + uint offset = 0; + memory_node_t *node = NULL; + memory_engine_t *engine = NULL; + pid_t taskid = task_tgid_vnr(current); + + shm_debug("shm_device_allocate start. (%u, %u)\n", size, align); + + if (device == NULL) + return ERROR_SHM_MALLOC_FAILED; + + engine = device->m_engine; + if (NULL == engine) + return ERROR_SHM_MALLOC_FAILED; + + res = memory_engine_allocate(device->m_engine, size, align, &node); + if (res != 0) { + memory_engine_dump_stat(device->m_engine); + + /* invoke lowmem killer to release less important task */ + if (NULL != device->m_shrinker) + device->m_shrinker((void *)device, size); + + shm_error("memory_engine_allocate failed, size:%d pid:%d\n", size, taskid); + return ERROR_SHM_MALLOC_FAILED; + } + + offset = MEMNODE_ALIGN_ADDR(node) - device->m_engine->m_base; + node->memory_type = mem_type; + + shm_debug("shm_device_allocate get offset (%u) OK\n", offset); + + return offset; +} + +int shm_device_free(shm_device_t * device, uint offset) +{ + int res = 0; + uint alignaddr = 0; + pid_t taskid = task_tgid_vnr(current); + + shm_debug("shm_device_free start. (%u)\n", offset); + + if (device == NULL) { + shm_error("shm_device_free device is NULL pid:%d\n", taskid); + return -EINVAL; + } + + alignaddr = device->m_engine->m_base + offset; + + res = memory_engine_free(device->m_engine, alignaddr); + if (res != 0) { + return res; + } + + shm_debug("shm_device_free offset (%u) OK\n", offset); + + return 0; +} + + +int shm_device_cache(shm_device_t *device, uint cmd, + shm_driver_operation_t op, int mem_type) +{ + int res = 0; + char tag_clean[] = "clean"; + char tag_invalidate[] = "invalidate"; + char tag_cleanAndinvalidate[] = "clean and invalidate"; + char *ptr_tag; + + if (device == NULL) { + shm_error("shm_device_free device is NULL\n"); + return -EINVAL; + } + + if ((mem_type == SHM_CACHE) || (mem_type == SHM_SECURE_CACHE)) { + res = memory_engine_cache(device->m_engine, cmd, op); + } else { // non-cache + res = -1; + if (cmd == SHM_DEVICE_CMD_INVALIDATE) { + ptr_tag = tag_invalidate; + } else if (cmd == SHM_DEVICE_CMD_CLEAN) { + ptr_tag = tag_clean; + } else { + ptr_tag = tag_cleanAndinvalidate; + } + printk("SHM noncache not need %s cache\n",ptr_tag); + } + return res; +} + +int shm_device_takeover(shm_device_t* device, uint offset) +{ + int res = 0; + uint alignaddr = 0; + + shm_debug("shm_device_takeover start (%u)\n", offset); + + if (NULL == device) + return -EINVAL; + + alignaddr = device->m_engine->m_base + offset; + + res = memory_engine_takeover(device->m_engine, alignaddr); + if (0 != res) { + return res; + } + + shm_debug("shm_device_takeover offset (%u) OK\n", offset); + return 0; +} + + +int shm_device_giveup(shm_device_t *device, uint offset) +{ + int res = 0; + uint alignaddr = 0; + + shm_debug("shm_device_giveup start (%u)\n", offset); + + if (NULL == device) + return -EINVAL; + + alignaddr = device->m_engine->m_base + offset; + + res = memory_engine_giveup(device->m_engine,alignaddr); + if (0 != res) { + return res; + } + + shm_debug("shm_device_giveup offset (%u) OK\n", offset); + return 0; +} + +int shm_device_get_stat(shm_device_t *device, struct shm_stat_info *stat) +{ + int res = 0; + + shm_debug("shm_device_get_stat start.\n"); + + if (NULL == device || NULL == stat) + return -EINVAL; + + res = memory_engine_get_stat(device->m_engine, stat); + if (0 != res) { + return res; + } + + shm_debug("shm_device_get_stat OK.\n"); + return 0; +} + +int shm_device_release_by_taskid(shm_device_t *device, pid_t taskid) +{ + int res; + + shm_debug("shm_device_release_by_taskid(%d) enter\n",taskid); + + if (device == NULL) + return -EINVAL; + + res = memory_engine_release_by_taskid(device, taskid); + if (res != 0) { + shm_error("memory_engine_release_by_taskid(%d) failed\n", taskid); + return res; + } + + shm_debug("shm_device_release_by_taskid(%d) OK\n",taskid); + return 0; +} + +int shm_device_dump_stat(shm_device_t *device) +{ + int res = 0; + shm_debug("shm_device_dump_stat start.\n"); + + if (NULL == device) + return -EINVAL; + + res = memory_engine_dump_stat(device->m_engine); + + shm_debug("shm_device_dump_stat OK. \n"); + return res; +} + +int shm_device_show_stat(shm_device_t *device, struct seq_file *file) +{ + int res = 0; + shm_debug("shm_device_show_stat start.\n"); + + if ((NULL == device) || (NULL == file)) + return -EINVAL; + + /* Walk all nodes and print node info to buffer */ + res = memory_engine_show_stat(device->m_engine, file); + + shm_debug("shm_device_show_stat OK. \n"); + return res; +} diff --git a/arch/arm/mach-berlin/modules/shm_amp/shm_device.h b/arch/arm/mach-berlin/modules/shm_amp/shm_device.h new file mode 100644 index 00000000..e78680b4 --- /dev/null +++ b/arch/arm/mach-berlin/modules/shm_amp/shm_device.h @@ -0,0 +1,65 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ********************************************************************************/ + + +#ifndef __shm_device_h__ +#define __shm_device_h__ + +#include "shm_type.h" + +int shm_device_create(shm_device_t **device, uint base, uint size, uint threshold); + +int shm_device_destroy(shm_device_t **device); + +int shm_device_get_meminfo(shm_device_t *device, pMV_SHM_MemInfo_t pInfo); + +int shm_device_get_baseinfo(shm_device_t *device, pMV_SHM_BaseInfo_t pInfo); + +uint shm_device_allocate(shm_device_t *device, size_t size, size_t align, int mem_type); + +int shm_device_free(shm_device_t *device, size_t offset); + +int shm_device_cache_invalidate(void * virtaddr_cache, size_t size); + +int shm_device_cache_clean(void * virtaddr_cache, size_t size); + +int shm_device_cache_clean_and_invalidate(void * virtaddr_cache, size_t size); + +int shm_device_cache(shm_device_t *device, uint cmd, + shm_driver_operation_t op, int mem_type); + +int shm_device_get_node_info(shm_device_t *device, shm_driver_operation_t *op); + +int shm_device_show_detail(shm_device_t *device, struct seq_file *file); + +int shm_device_release_by_taskid(shm_device_t *device, pid_t taskid); + +int shm_device_takeover(shm_device_t *device, size_t offset); + +int shm_device_giveup(shm_device_t *device, size_t offset); + +int shm_device_get_stat(shm_device_t *device, struct shm_stat_info *stat); + +int shm_device_dump_stat(shm_device_t *device); + +int shm_device_show_stat(shm_device_t *devce, struct seq_file *file); + +int shm_device_add_reference_count(shm_device_t *device, size_t offset); + +int shm_device_check_test(shm_device_t *device, shm_check_test_t *op); + + +#endif /* __shm_device_h__ */ diff --git a/arch/arm/mach-berlin/modules/shm_amp/shm_driver.c b/arch/arm/mach-berlin/modules/shm_amp/shm_driver.c new file mode 100644 index 00000000..4f12a371 --- /dev/null +++ b/arch/arm/mach-berlin/modules/shm_amp/shm_driver.c @@ -0,0 +1,1130 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ********************************************************************************/ + + +/******************************************************************************* + System head files +*/ + +#include +#include +#include +#include +#include +#include /* for seq_file */ +#include /* for tasklist_lock */ +#include +#include +#include +#include + +#include +#include + +/******************************************************************************* + Local head files +*/ + +#include "shm_type.h" +#include "shm_device.h" +#include "shm_api_kernel.h" + +#define SHM_MAX_DEVS 4 +/******************************************************************************* + Module Descrption +*/ + +MODULE_AUTHOR("Fang Bao"); +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Shared Memory Driver"); + +/******************************************************************************* + Module API defined +*/ +/******************************************************************************* + Separate cache and non-cache driver interface +*/ +static int shm_driver_open(struct inode *inode, struct file *filp); +static int shm_driver_open_noncache(struct inode *inode, struct file *filp); +static int shm_driver_open_secure(struct inode *inode, struct file *filp); +static int shm_driver_open_secure_noncache(struct inode *inode, + struct file *filp); +static int shm_driver_release(struct inode *inode, struct file *filp); +static int shm_driver_mmap_noncache(struct file *filp, struct vm_area_struct *vma); +static int shm_driver_mmap_cache(struct file *filp, struct vm_area_struct *vma); + +static int shm_driver_mmap_secure_cache(struct file *filp, struct vm_area_struct *vma); +static int shm_driver_mmap_secure_noncache(struct file *filp, struct vm_area_struct *vma); + +static long shm_driver_ioctl(struct file *filp, unsigned int cmd, + unsigned long arg); + +/******************************************************************************* + Module Parameter +*/ +uint shm_lowmem_debug_level = 2; +module_param_named(debug_level, shm_lowmem_debug_level, uint, S_IRUGO | S_IWUSR); + +static uint shm_lowmem_shrink_threshold = 90; +module_param_named(shrink_threshold, shm_lowmem_shrink_threshold, uint, S_IRUGO | S_IWUSR); + +static oom_flags_t shm_lowmem_start_oom_adj = 1; +module_param_named(start_oom_adj, shm_lowmem_start_oom_adj, uint, S_IRUGO | S_IWUSR); + +static int shm_lowmem_min_adj = 1; +module_param_named(min_adj, shm_lowmem_min_adj, int, S_IRUGO | S_IWUSR); + +static int shm_lowmem_min_release_kbytes = 4096; +module_param_named(min_release_kbytes, shm_lowmem_min_release_kbytes, int, S_IRUGO | S_IWUSR); +/******************************************************************************* + Module Variable +*/ + +shm_device_t *shm_device = NULL; +shm_device_t *shm_secure_device = NULL; + +static struct cdev shm_dev_noncache; +static struct cdev shm_dev_cache; +static struct cdev shm_dev_secure_noncache; +static struct cdev shm_dev_secure_cache; + +static struct class *shm_dev_class; +static int shm_major; +uint shm_base_cache; +static uint shm_size_cache; +static uint shm_size_secure; +static uint shm_base_secure; + +static struct file_operations shm_ops_noncache = { + .open = shm_driver_open_noncache, + .release = shm_driver_release, + .mmap = shm_driver_mmap_noncache, + .unlocked_ioctl = shm_driver_ioctl, + .owner = THIS_MODULE, +}; + +static struct file_operations shm_ops_cache = { + .open = shm_driver_open, + .release = shm_driver_release, + .mmap = shm_driver_mmap_cache, + .unlocked_ioctl = shm_driver_ioctl, + .owner = THIS_MODULE, +}; + +static struct file_operations shm_ops_secure_noncache = { + .open = shm_driver_open_secure_noncache, + .release = shm_driver_release, + .mmap = shm_driver_mmap_secure_noncache, + .unlocked_ioctl = shm_driver_ioctl, + .owner = THIS_MODULE, +}; + +static struct file_operations shm_ops_secure_cache = { + .open = shm_driver_open_secure, + .release = shm_driver_release, + .mmap = shm_driver_mmap_secure_cache, + .unlocked_ioctl = shm_driver_ioctl, + .owner = THIS_MODULE, +}; + +static shm_driver_cdev_t shm_driver_dev_list[] = { + {0, SHM_DEVICE_NAME_NONCACHE, &shm_dev_noncache, + &shm_ops_noncache}, + {1, SHM_DEVICE_NAME_CACHE, &shm_dev_cache, + &shm_ops_cache}, + {2, SHM_DEVICE_NAME_SECURE_NONCACHE, &shm_dev_secure_noncache, + &shm_ops_secure_noncache}, + {3, SHM_DEVICE_NAME_SECURE_CACHE, &shm_dev_secure_cache, + &shm_ops_secure_cache}, +}; + +static struct proc_dir_entry *shm_driver_procdir; + +static struct task_struct* shm_lowmem_deathpending; +static unsigned long shm_lowmem_deathpending_timeout; +static int shm_lowmem_going; +static struct shm_stat_info shm_stat; +static DEFINE_SEMAPHORE(shm_lowmem_mutex); +/*********************** shm lowmem killer *****************************/ + +#define shm_lowmem_print(level, x...) \ + do { \ + if (shm_lowmem_debug_level >= (level)) \ + printk(x); \ + }while(0) + +static int shm_task_notify_func(struct notifier_block* self, unsigned long val, void *data) +{ + struct task_struct *task = data; + + if (task == shm_lowmem_deathpending) + shm_lowmem_deathpending = NULL; + + return NOTIFY_OK; +} + +static void shm_shrink_dump_usage(struct shm_stat_info *stat_info,int print_level) +{ + int i = 0 ; + + if (NULL == stat_info) + return; + + shm_lowmem_print(print_level,"total size : %d \nused : %d \ntask count : %d\n", + stat_info->m_size,stat_info->m_used,stat_info->m_count); + + shm_lowmem_print(print_level," No | task id( name ) | oom_flags | alloc | use |\n"); + shm_lowmem_print(print_level,"-----------------------------------------------------------------------\n"); + + for (i = 0 ; i < stat_info->m_count ; i++) + shm_lowmem_print(print_level," %3d | %8d(%16s) | %3d | %10d | %10d |\n", + i, stat_info->m_nodes[i].m_taskid, + stat_info->m_nodes[i].m_taskname, stat_info->m_nodes[i].m_oom_adj, + stat_info->m_nodes[i].m_size_alloc, stat_info->m_nodes[i].m_size_use); +} + +static size_t shm_shrink_find_task_usage(struct shm_stat_info *stat_info, pid_t taskid) +{ + int i = 0 ; + + if (NULL == stat_info) + return 0; + + for (i = 0 ; i < stat_info->m_count ; i++){ + struct shm_usr_node *usr_node = &(stat_info->m_nodes[i]); + + if (taskid == usr_node->m_taskid) + return usr_node->m_size_use; + } + return 0; +} +/** + * find the candidate task and release it + * a)the oom-adj of task is more than shm_lowmem_start_oom_adj + * b)the shm used size is more than shm_lowmem_min_release_kbyte * 1024 + * c)when meet the above two cond, then select the largest oom-adj task + */ +static int shm_lowmem_shrink_killer(void *shm_dev, int allocsize) +{ + int res = 0; + struct task_struct *p; + struct task_struct *selected = NULL; + int selected_shmsize = 0; + oom_flags_t selected_oom_adj = 0; + + /* check whether in shrinking or exits pending task */ + down(&shm_lowmem_mutex); + if (shm_lowmem_going) { + /* another shrinking is executing */ + up(&shm_lowmem_mutex); + shm_lowmem_print(2,"shm_lowmem shrink is under going\n"); + return 0; + } else { + if (shm_lowmem_deathpending && + time_before_eq(jiffies,shm_lowmem_deathpending_timeout)) { + /* no shrinking is executing, but exists pending task*/ + up(&shm_lowmem_mutex); + shm_lowmem_print(2,"a pending task exists pid(%d)\n",shm_lowmem_deathpending->pid); + return 0; + } + shm_lowmem_going = 1; + up(&shm_lowmem_mutex); + } + + /* the following is only access by one thread at one time */ + /* query current shm stat*/ + memset(&shm_stat, 0, sizeof(struct shm_stat_info)); + if (res != shm_device_get_stat((shm_device_t *)shm_dev,&shm_stat)) { + shm_lowmem_print(2,"shm_lowmemkiller fail to get shm stat info\n"); + goto _exit_entry; + } + + /* find task whose oom-adj larger than + * and use largest shm memory size than allocsize + */ + read_lock(&tasklist_lock); + for_each_process(p) { + struct mm_struct *mm; + struct signal_struct *sig; + oom_flags_t oom_adj; + size_t shmsize = 0; + int tasksize; + + task_lock(p); + mm = p->mm; + sig = p->signal; + if (!mm || !sig) { + task_unlock(p); + continue; + } + /* ignore task whose pid less than shm_lowmem_start_oom_adj */ + oom_adj = sig->oom_flags; + if (oom_adj < shm_lowmem_start_oom_adj) { + task_unlock(p); + continue; + } + tasksize = get_mm_rss(mm); + task_unlock(p); + + shmsize = shm_shrink_find_task_usage(&shm_stat, p->pid); + + /* ignore precess has no tasksize */ + if (tasksize <= 0) + continue; + + /* ignore process has little shmsize */ + if (shmsize <= (shm_lowmem_min_release_kbytes * 1024)) + continue; + + /* if shmsize larger than shm_lowmem_min_free_kbytes + * select large oom-adj to release*/ + if (selected && (oom_adj <= selected_oom_adj)) + continue; + + selected = p; + selected_shmsize = shmsize; + selected_oom_adj = oom_adj; + shm_lowmem_print(3, "shm_lowmem_killer select %d (%s),adj %d, shmsize %d to kill\n", + p->pid,p->comm,oom_adj,shmsize); + + } + if (selected) { + shm_lowmem_print(2,"shm_lowmem_killer send sigkill to %d (%s), adj %d, shmsize %d\n", + selected->pid, selected->comm, + selected_oom_adj, selected_shmsize); + + set_tsk_thread_flag(selected, TIF_MEMDIE); + force_sig(SIGKILL, selected); + } else { + shm_lowmem_print(2,"shm_lowmem_killer alert!!!! no task selected to release\n"); + shm_shrink_dump_usage(&shm_stat, 2); + } + + read_unlock(&tasklist_lock); + res = 0; + +_exit_entry: + + down(&shm_lowmem_mutex); + + shm_lowmem_going = 0; + if (selected) { + shm_lowmem_deathpending = selected; + shm_lowmem_deathpending_timeout = jiffies + HZ; + }else + shm_lowmem_deathpending = NULL; + + up(&shm_lowmem_mutex); + + return res; +} + +static struct notifier_block shm_task_nb = { + .notifier_call = shm_task_notify_func, +}; + +/******************************************************************************* + Module API +*/ + +static int shm_driver_open(struct inode *inode, struct file *filp) +{ + /*save the device and opening taskid to private_data, + * then from user space we will depend on the specified device + * since there are cache and non-cache device */ + struct shm_device_priv_data *priv_data + = kzalloc(sizeof(struct shm_device_priv_data), GFP_KERNEL); + if (NULL == priv_data) { + shm_error("shm_driver_open fail to allocate private data\n"); + return -ENOMEM; + } + + priv_data->m_taskid = task_tgid_vnr(current); + priv_data->m_map_physaddress = shm_device->m_base; + priv_data->m_device = shm_device; + priv_data->memory_type = SHM_CACHE; + filp->private_data = priv_data; + + shm_debug("shm_driver_open ok\n"); + + return 0; +} + +static int shm_driver_open_noncache(struct inode *inode, struct file *filp) +{ + /*save the device and opening task id to private_data + * then from user space we will depend on the specified device + * since there are cache and non-cache device */ + struct shm_device_priv_data *priv_data + = kzalloc(sizeof(struct shm_device_priv_data), GFP_KERNEL); + if (NULL == priv_data) { + shm_error("shm_driver_open_noncache fail to allocate memory\n"); + return -ENOMEM; + } + + priv_data->m_taskid = task_tgid_vnr(current); + priv_data->m_map_physaddress = shm_device->m_base; + priv_data->m_device = shm_device; + priv_data->memory_type = SHM_NONCACHE; + filp->private_data = priv_data; + + shm_debug("shm_driver_open_noncache ok\n"); + + return 0; +} + + +static int shm_driver_open_secure(struct inode *inode, struct file *filp) +{ + struct shm_device_priv_data *priv_data + = kzalloc(sizeof(struct shm_device_priv_data), GFP_KERNEL); + if (NULL == priv_data) { + shm_error("shm_driver_open_secure fail to allocate memory\n"); + return -ENOMEM; + } + + priv_data->m_taskid = task_tgid_vnr(current); + priv_data->m_map_physaddress = shm_secure_device->m_base; + priv_data->m_device = shm_secure_device; + priv_data->memory_type = SHM_SECURE_CACHE; + filp->private_data = priv_data; + + return 0; +} + +static int shm_driver_open_secure_noncache(struct inode *inode, struct file *filp) +{ + struct shm_device_priv_data *priv_data + = kzalloc(sizeof(struct shm_device_priv_data), GFP_KERNEL); + if (NULL == priv_data) { + shm_error("shm_driver_open_secure_noncache fail to allocate memory\n"); + return -ENOMEM; + } + + priv_data->m_taskid = task_tgid_vnr(current); + priv_data->m_map_physaddress = shm_secure_device->m_base; + priv_data->m_device = shm_secure_device; + priv_data->memory_type = SHM_SECURE_NONCACHE; + filp->private_data = priv_data; + + return 0; +} + +static int shm_driver_release(struct inode *inode, struct file *filp) +{ + shm_device_t *pDevice; + pid_t taskid; + struct shm_device_priv_data *priv_data + = (struct shm_device_priv_data*)filp->private_data; + + if (NULL == priv_data) { + shm_error("shm_driver_release private data is NULL\n"); + return 0; + } + + pDevice = priv_data->m_device; + taskid = priv_data->m_taskid; + + shm_debug("shm_driver_release for pid:%d\n",taskid); + + if (NULL == pDevice) { + shm_error("shm_driver_release device NULL\n"); + kfree(priv_data); + filp->private_data = NULL; + return 0; + } + + /* once the fd released, we should release allocated cache + * memory device accordingly to avoid shm leak */ + if (priv_data->memory_type == SHM_CACHE || + priv_data->memory_type == SHM_SECURE_CACHE) + shm_device_release_by_taskid(pDevice, taskid); + /* free private data*/ + kfree(priv_data); + filp->private_data = NULL; + + shm_debug("after shm_driver_release OK for pid:%d\n",taskid); + + return 0; +} + +static int shm_driver_mmap_noncache(struct file *filp, struct vm_area_struct *vma) +{ + shm_device_t *pDevice; + unsigned long pfn, vsize; + struct shm_device_priv_data *priv_data + = (struct shm_device_priv_data*)filp->private_data; + if (NULL == priv_data) { + shm_error("shm_driver_mmap_noncache NULL private data\n"); + return -ENOTTY; + } + + pDevice = priv_data->m_device; + if (NULL == pDevice) { + shm_error("shm_driver_mmap_noncache NULL shm device\n"); + return -ENOTTY; + } + + pfn = priv_data->m_map_physaddress >> PAGE_SHIFT; + vsize = vma->vm_end - vma->vm_start; + + vma->vm_pgoff = 0; // skip offset + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); // set memory non-cache + + if (remap_pfn_range(vma, vma->vm_start, pfn, vsize, vma->vm_page_prot)) + return -EAGAIN; + + return 0; +} + +static int shm_driver_mmap_cache(struct file *filp, struct vm_area_struct *vma) +{ + unsigned long pfn, vsize; + shm_device_t *pDevice; + struct shm_device_priv_data *priv_data + = (struct shm_device_priv_data*)filp->private_data; + if (NULL == priv_data) { + shm_error("shm_driver_mmap_cache NULL private data\n"); + return -ENOTTY; + } + + pDevice = (shm_device_t*)priv_data->m_device; + if (NULL == pDevice) { + shm_error("shm_driver_mmap_cache NULL shm device\n"); + return -ENOTTY; + } + + pfn = priv_data->m_map_physaddress >> PAGE_SHIFT; + vsize = vma->vm_end - vma->vm_start; + + vma->vm_pgoff = 0; // skip offset + + if (remap_pfn_range(vma, vma->vm_start, pfn, vsize, vma->vm_page_prot)) + return -EAGAIN; + + return 0; +} + +static int shm_driver_mmap_secure_cache(struct file *filp, struct vm_area_struct *vma) +{ + unsigned long pfn, vsize; + shm_device_t *pDevice; + struct shm_device_priv_data *priv_data + = (struct shm_device_priv_data*)filp->private_data; + if (NULL == priv_data) { + shm_error("shm_driver_mmap_cache NULL private data\n"); + return -ENOTTY; + } + + pDevice = (shm_device_t*)priv_data->m_device; + if (NULL == pDevice) { + shm_error("shm_driver_mmap_cache NULL shm device\n"); + return -ENOTTY; + } + + pfn = priv_data->m_map_physaddress >> PAGE_SHIFT; + vsize = vma->vm_end - vma->vm_start; + + vma->vm_pgoff = 0; // skip offset + + if (remap_pfn_range(vma, vma->vm_start, pfn, vsize, vma->vm_page_prot)) + return -EAGAIN; + + return 0; +} + +static int shm_driver_mmap_secure_noncache(struct file *filp, struct vm_area_struct *vma) +{ + shm_device_t *pDevice; + unsigned long pfn, vsize; + struct shm_device_priv_data *priv_data + = (struct shm_device_priv_data*)filp->private_data; + if (NULL == priv_data) { + shm_error("shm_driver_mmap_noncache NULL private data\n"); + return -ENOTTY; + } + + pDevice = priv_data->m_device; + if (NULL == pDevice) { + shm_error("shm_driver_mmap_noncache NULL shm device\n"); + return -ENOTTY; + } + + pfn = priv_data->m_map_physaddress >> PAGE_SHIFT; + vsize = vma->vm_end - vma->vm_start; + + vma->vm_pgoff = 0; // skip offset + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); // set memory non-cache + + if (remap_pfn_range(vma, vma->vm_start, pfn, vsize, vma->vm_page_prot)) + return -EAGAIN; + + return 0; +} + +static long shm_driver_ioctl(struct file *filp, unsigned int cmd, + unsigned long arg) +{ + int res = 0; + shm_driver_operation_t op; + shm_device_t *shm_dev; + shm_check_test_t test; + MV_SHM_MemInfo_t meminfo; + MV_SHM_BaseInfo_t baseinfo; + + struct shm_device_priv_data *priv_data + = (struct shm_device_priv_data*)filp->private_data; + if (NULL == priv_data) { + shm_error("shm_driver_ioctl NULL private data\n"); + return -ENOTTY; + } + + shm_dev = (shm_device_t*)priv_data->m_device; + if (NULL == shm_dev) { + shm_error("shm_driver_ioctl NULL shm device\n"); + return -ENOTTY; + } + + shm_debug("shm_driver_ioctl cmd = 0x%08x\n, base:0x%08X size:0x%08X\n", + cmd, shm_dev->m_base, shm_dev->m_size); + + switch (cmd) { + case SHM_DEVICE_CMD_GET_MEMINFO: + { + res = shm_device_get_meminfo(shm_dev, &meminfo); + if (res == 0) + res = + copy_to_user((void __user *)arg, &meminfo, + sizeof(meminfo)); + break; + } + + case SHM_DEVICE_CMD_GET_DEVINFO: + { + res = shm_device_get_baseinfo(shm_dev, &baseinfo); + if (res == 0) + res = + copy_to_user((void __user *)arg, &baseinfo, + sizeof(baseinfo)); + break; + } + + case SHM_DEVICE_CMD_ALLOCATE: + { + res = + copy_from_user(&op, (int __user *)arg, sizeof(op)); + if (res != 0) + break; + op.m_param1 = + shm_device_allocate(shm_dev, op.m_param1, + op.m_param2, priv_data->memory_type); + res = copy_to_user((void __user *)arg, &op, sizeof(op)); + + break; + } + + case SHM_DEVICE_CMD_FREE: + { + res = + copy_from_user(&op, (int __user *)arg, sizeof(op)); + if (res != 0) + break; + MV_SHM_iounmap_and_free_rbtree(shm_dev, op.m_param1); + op.m_param1 = + shm_device_free(shm_dev, op.m_param1); + res = copy_to_user((void __user *)arg, &op, sizeof(op)); + + break; + } + + case SHM_DEVICE_CMD_MMAP_PREPARATION: + { + res = + copy_from_user(&op, (int __user *)arg, sizeof(op)); + if (res != 0) + break; + //get phys node info + shm_device_get_node_info(shm_dev, &op); + //save mmap phys address + priv_data->m_map_physaddress = op.m_param1; + res = copy_to_user((void __user *)arg, &op, sizeof(op)); + + break; + } + + case SHM_DEVICE_CMD_INVALIDATE: + case SHM_DEVICE_CMD_CLEAN: + case SHM_DEVICE_CMD_CLEANANDINVALIDATE: + { + res = + copy_from_user(&op, (int __user *)arg, sizeof(op)); + if (res == 0) { + res = shm_device_cache(shm_dev, cmd, op, + priv_data->memory_type); + } + break; + } + + case SHM_DEVICE_CMD_ADD_REFERENCE_COUNT: + { + res = + copy_from_user(&op, (int __user *)arg, sizeof(op)); + if (res == 0) { + op.m_param1 = shm_device_add_reference_count(shm_dev, + op.m_param1); + } + res = copy_to_user((void __user *)arg, &op, sizeof(op)); + break; + } + + case SHM_DEVICE_CMD_CHECK_TEST: + { + res = + copy_from_user(&test, (int __user *)arg, sizeof(test)); + if (res == 0) + test.res = shm_device_check_test(shm_dev, &test); + res = copy_to_user((void __user *)arg, &test, sizeof(test)); + break; + } + + default: + + res = -ENOTTY; + } + + shm_debug("shm_driver_ioctl res = %d\n", res); + + return res; +} + +static int meminfo_proc_show(struct seq_file *m, void *v) +{ + int res; + MV_SHM_MemInfo_t meminfo; + + res = shm_device_get_meminfo(shm_device, &meminfo); + if (res != 0) { + shm_error("shm_driver_read_proc_meminfo failed. (%d)\n", res); + return 0; + } + seq_printf(m, "cache memory information:\n" + "%20s : %10u Bytes\n" + "%20s : %10u Bytes\n" + "%20s : %10u Bytes\n" + "%20s : %10u Bytes\n" + "%20s : %10u Blocks\n" + "%20s : %10u Blocks\n", + "total mem", meminfo.m_totalmem, + "free mem", meminfo.m_freemem, + "used mem", meminfo.m_usedmem, + "peak used mem", meminfo.m_peak_usedmem, + "num free block", meminfo.m_num_freeblock, + "num used block", meminfo.m_num_usedblock); + + res = shm_device_get_meminfo(shm_secure_device, &meminfo); + if (res != 0) { + shm_error("shm_driver_read_proc_meminfo failed. (%d)\n", res); + return 0; + } + seq_printf(m, "secure memory information:\n" + "%20s : %10u Bytes\n" + "%20s : %10u Bytes\n" + "%20s : %10u Bytes\n" + "%20s : %10u Bytes\n" + "%20s : %10u Blocks\n" + "%20s : %10u Blocks\n", + "total mem", meminfo.m_totalmem, + "free mem", meminfo.m_freemem, + "used mem", meminfo.m_usedmem, + "peak used mem", meminfo.m_peak_usedmem, + "num free block", meminfo.m_num_freeblock, + "num used block", meminfo.m_num_usedblock); + + return 0; +} + +static int meminfo_proc_open(struct inode *inode, struct file *file) +{ + return single_open(file, meminfo_proc_show, NULL); +} + +static const struct file_operations meminfo_proc_fops = { + .open = meminfo_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +static int baseinfo_proc_show(struct seq_file *m, void *v) +{ + int res; + MV_SHM_BaseInfo_t baseinfo; + + res = shm_device_get_baseinfo(shm_device, &baseinfo); + if (res != 0) { + shm_error("shm_device_get_baseinfo failed. (%d)\n", res); + return 0; + } + + seq_printf(m, "cache device base information:\n" + "%20s : %10u Bytes\n" + "%20s : %10u Bytes\n" + "------------ physical address:0x%08X\n", + "memory size", baseinfo.m_size, + "threshold", baseinfo.m_threshold, + baseinfo.m_base_physaddr); + + res = shm_device_get_baseinfo(shm_secure_device, &baseinfo); + if (res != 0) { + shm_error("shm_device_get_baseinfo failed. (%d)\n", res); + return 0; + } + + seq_printf(m, "secure device base information:\n" + "%20s : %10u Bytes\n" + "%20s : %10u Bytes\n" + "------------ physical address:0x%08X\n", + "memory size", baseinfo.m_size, + "threshold", baseinfo.m_threshold, + baseinfo.m_base_physaddr); + + return 0; +} + +static int baseinfo_proc_open(struct inode *inode, struct file *file) +{ + return single_open(file, baseinfo_proc_show, NULL); +} + +static const struct file_operations baseinfo_proc_fops = { + .open = baseinfo_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +static int detail_seq_show(struct seq_file *file, void *data) +{ + shm_device_t *pShmdev = (shm_device_t *) data; + if (pShmdev) + shm_device_show_detail(pShmdev, file); + + return 0; +} + +static void detail_seq_stop(struct seq_file *file, void *data) +{ +} + +static void *detail_seq_start(struct seq_file *file, loff_t * pos) +{ + if (*pos == 0) + return (void *)shm_device; + /* return non cache device for the second time, + * first start will return cache device. + */ + else if (*pos == 1) + return (void *)shm_secure_device; + return NULL; +} + +static void *detail_seq_next(struct seq_file *file, void *data, loff_t * pos) +{ + (*pos)++; + /* return non cache device for the second time, + * first start will return cache device. + */ + if (*pos == 1) + return (void *)shm_secure_device; + return NULL; +} + +static struct seq_operations detail_seq_ops = { + .start = detail_seq_start, + .next = detail_seq_next, + .stop = detail_seq_stop, + .show = detail_seq_show +}; + +static int detail_proc_open(struct inode *inode, struct file *file) +{ + return seq_open(file, &detail_seq_ops); +} + +static struct file_operations detail_proc_ops = { + .open = detail_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release +}; + +static int shm_stat_seq_show(struct seq_file *file, void *data) +{ + shm_device_t *pShmdev = (shm_device_t *) data; + if (pShmdev) + shm_device_show_stat(pShmdev, file); + + return 0; +} + +static void shm_stat_seq_stop(struct seq_file *file, void *data) +{ +} + +static void *shm_stat_seq_start(struct seq_file *file, loff_t * pos) +{ + if (*pos == 0) + return (void *)shm_device; + else if (*pos == 1) + return (void *)shm_secure_device; + return NULL; +} + +static void *shm_stat_seq_next(struct seq_file *file, void *data, loff_t * pos) +{ + (*pos)++; + /* return non cache device for the second time, + * first start will return cache device. + */ + if (*pos == 0) + return (void *)shm_device; + else if (*pos == 1) + return (void *)shm_secure_device; + return NULL; +} + +static struct seq_operations shm_stat_seq_ops = { + .start = shm_stat_seq_start, + .next = shm_stat_seq_next, + .stop = shm_stat_seq_stop, + .show = shm_stat_seq_show +}; + +static int shm_stat_proc_open(struct inode *inode, struct file *file) +{ + return seq_open(file, &shm_stat_seq_ops); +} + +static struct file_operations shm_stat_file_ops = { + .owner = THIS_MODULE, + .open = shm_stat_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release +}; + +static int shm_driver_setup_cdev(struct cdev *dev, int major, int minor, + struct file_operations *fops) +{ + cdev_init(dev, fops); + dev->owner = THIS_MODULE; + dev->ops = fops; + return cdev_add(dev, MKDEV(major, minor), 1); +} + +static int __init shm_driver_init(void) +{ + int i, res = -ENODEV; + dev_t shmdev; + struct device_node *np; + struct resource r; + struct proc_dir_entry *pent = NULL; + struct proc_dir_entry *pstat = NULL; + + np = of_find_compatible_node(NULL, NULL, "mrvl,berlin-shm"); + if (!np) + goto err_node; + + res = of_address_to_resource(np, 0, &r); + if (res) + goto err_reg_device; + shm_base_cache = r.start; + shm_size_cache = resource_size(&r); + + res = of_address_to_resource(np, 1, &r); + if (res) + goto err_reg_device; + shm_base_secure = r.start; + shm_size_secure = resource_size(&r); + of_node_put(np); + + res = alloc_chrdev_region(&shmdev, 0, SHM_MAX_DEVS, SHM_DEVICE_NAME); + shm_major = MAJOR(shmdev); + if (res < 0) { + shm_error("alloc_chrdev_region() failed for shm\n"); + goto err_reg_device; + } + shm_debug("register cdev device major [%d]\n", shm_major); + + /* Now setup cdevs. */ + for (i = 0; i < ARRAY_SIZE(shm_driver_dev_list); i++) { + res = shm_driver_setup_cdev(shm_driver_dev_list[i].cdev, + shm_major, + shm_driver_dev_list[i].minor, + shm_driver_dev_list[i].fops); + if (res) { + shm_error("shm_driver_setup_cdev failed in [%d].\n", i); + goto err_add_device; + } + shm_debug("setup cdevs device minor [%d]\n", + shm_driver_dev_list[i].minor); + } + + /* add shm devices to sysfs */ + shm_dev_class = class_create(THIS_MODULE, SHM_DEVICE_NAME); + if (IS_ERR(shm_dev_class)) { + shm_error("class_create failed.\n"); + res = -ENODEV; + goto err_add_device; + } + + for (i = 0; i < ARRAY_SIZE(shm_driver_dev_list); i++) { + device_create(shm_dev_class, NULL, + MKDEV(shm_major, + shm_driver_dev_list[i].minor), NULL, + shm_driver_dev_list[i].name); + shm_debug("create device sysfs [%s]\n", + shm_driver_dev_list[i].name); + } + + /* create shm cache device */ + res = shm_device_create(&shm_device, shm_base_cache, + shm_size_cache, SHM_DEVICE_THRESHOLD); + if (res != 0) { + shm_error("shm_device_create failed.\n"); + goto err_add_device; + } + /* init shrinker */ + shm_device->m_shrinker = shm_lowmem_shrink_killer; + + res = shm_device_create(&shm_secure_device, shm_base_secure, + shm_size_secure, SHM_DEVICE_THRESHOLD); + if (res != 0) { + shm_error("shm_device_create failed.\n"); + goto err_add_device; + } + shm_secure_device->m_shrinker = shm_lowmem_shrink_killer; + + /* create shm kernel API, need map for noncache and cache device!!! */ + res = MV_SHM_Init(shm_secure_device, shm_device); + if (res != 0) { + shm_error("MV_SHM_Init failed !!!\n"); + goto err_SHM_Init; + } + + /* create shm device proc file */ + shm_driver_procdir = proc_mkdir(SHM_DEVICE_NAME, NULL); + if (!shm_driver_procdir) { + shm_error(KERN_WARNING "Failed to mkdir /proc/%s\n", SHM_DEVICE_NAME); + return 0; + } + proc_create("meminfo", 0, shm_driver_procdir, &meminfo_proc_fops); + proc_create("baseinfo", 0, shm_driver_procdir, &baseinfo_proc_fops); + + pent = create_proc_entry("detail", 0, shm_driver_procdir); + if (pent) + pent->proc_fops = &detail_proc_ops; + + pstat = create_proc_entry("stat", 0, shm_driver_procdir); + if (pstat) + pstat->proc_fops = &shm_stat_file_ops; + + task_free_register(&shm_task_nb); + shm_trace("shm_driver_init OK\n"); + + return 0; + +err_SHM_Init: + + shm_trace("shm_driver_init Undo ...\n"); + + shm_device_destroy(&shm_device); + shm_device_destroy(&shm_secure_device); + + /* del sysfs entries */ + for (i = 0; i < ARRAY_SIZE(shm_driver_dev_list); i++) { + device_destroy(shm_dev_class, + MKDEV(shm_major, + shm_driver_dev_list[i].minor)); + shm_debug("delete device sysfs [%s]\n", + shm_driver_dev_list[i].name); + } + class_destroy(shm_dev_class); + +err_add_device: + + for (i = 0; i < ARRAY_SIZE(shm_driver_dev_list); i++) { + cdev_del(shm_driver_dev_list[i].cdev); + } + unregister_chrdev_region(MKDEV(shm_major, 0), SHM_MAX_DEVS); + +err_reg_device: + of_node_put(np); +err_node: + shm_trace("shm_driver_init failed !!! (%d)\n", res); + + return res; +} + +static void __exit shm_driver_exit(void) +{ + int res, i; + + task_free_unregister(&shm_task_nb); + + /* destroy shm kernel API */ + res = MV_SHM_Exit(); + if (res != 0) + shm_error("MV_SHM_Exit failed !!!\n"); + + /* remove shm device proc file */ + remove_proc_entry("meminfo", shm_driver_procdir); + remove_proc_entry("baseinfo", shm_driver_procdir); + remove_proc_entry("detail", shm_driver_procdir); + remove_proc_entry("stat", shm_driver_procdir); + remove_proc_entry(SHM_DEVICE_NAME, NULL); + + if (shm_device_destroy(&shm_device) != 0) + shm_error("shm_device_destroy cache mem failed.\n"); + if (shm_device_destroy(&shm_secure_device) != 0) + shm_error("shm_device_destroy cache mem failed.\n"); + + /* del sysfs entries */ + for (i = 0; i < ARRAY_SIZE(shm_driver_dev_list); i++) { + device_destroy(shm_dev_class, + MKDEV(shm_major, + shm_driver_dev_list[i].minor)); + shm_debug("delete device sysfs [%s]\n", + shm_driver_dev_list[i].name); + } + class_destroy(shm_dev_class); + + /* del cdev */ + for (i = 0; i < ARRAY_SIZE(shm_driver_dev_list); i++) { + cdev_del(shm_driver_dev_list[i].cdev); + shm_debug("delete cdevs device minor [%d]\n", + shm_driver_dev_list[i].minor); + } + + if (shm_major) + unregister_chrdev_region(MKDEV(shm_major, 0), SHM_MAX_DEVS); + shm_debug("unregister cdev device major [%d]\n", shm_major); + + shm_trace("shm_driver_exit OK\n"); +} + +module_init(shm_driver_init); +module_exit(shm_driver_exit); diff --git a/arch/arm/mach-berlin/modules/shm_amp/shm_type.h b/arch/arm/mach-berlin/modules/shm_amp/shm_type.h new file mode 100644 index 00000000..18ac2ece --- /dev/null +++ b/arch/arm/mach-berlin/modules/shm_amp/shm_type.h @@ -0,0 +1,312 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ********************************************************************************/ + + +#ifndef __shm_type_h__ +#define __shm_type_h__ + +#include "shm_api.h" +#include +#include +#include + +/******************************************************************************* + Macro Defined +*/ + + +#define SHM_DEVICE_NAME "galois_shm" +#define SHM_DEVICE_TAG "[Galois][shm_driver] " + +#define SHM_DEVICE_PATH "/dev/" +#define SHM_DEVICE_NAME_NONCACHE "shm_noncache" +#define SHM_DEVICE_NAME_CACHE "shm_cache" +#define SHM_DEVICE_NAME_SECURE_NONCACHE "shm_secure_noncache" +#define SHM_DEVICE_NAME_SECURE_CACHE "shm_secure_cache" +#define SHM_DEVICE_PATH_NONCACHE (SHM_DEVICE_PATH SHM_DEVICE_NAME_NONCACHE) +#define SHM_DEVICE_PATH_CACHE (SHM_DEVICE_PATH SHM_DEVICE_NAME_CACHE) +#define SHM_DEVICE_PATH_SECURE_NONCACHE (SHM_DEVICE_PATH SHM_DEVICE_NAME_SECURE_NONCACHE) +#define SHM_DEVICE_PATH_SECURE_CACHE (SHM_DEVICE_PATH SHM_DEVICE_NAME_SECURE_CACHE) + +#define SHM_CACHE 1 +#define SHM_NONCACHE 2 +#define SHM_SECURE_CACHE 3 +#define SHM_SECURE_NONCACHE 4 + + +#ifdef ENABLE_DEBUG +#define shm_debug(...) printk(KERN_INFO SHM_DEVICE_TAG __VA_ARGS__) +#else +#define shm_debug(...) +#endif + +extern uint shm_lowmem_debug_level; + +#define shm_trace(...) printk(KERN_ALERT SHM_DEVICE_TAG __VA_ARGS__) +#define shm_error(...) printk(KERN_ERR SHM_DEVICE_TAG __VA_ARGS__) + +// Shared Memory Physical Address Conventer +#define SHM_GET_PHYSADDR_NONCACHE (uint)NON_CACHE_ADDR +#define SHM_GET_PHYSADDR_CACHE (uint)CACHE_ADDR + +// Shared Memory Device IO Command List +#define SHM_DEVICE_CMD_GET_MEMINFO (0x1F01) +#define SHM_DEVICE_CMD_GET_DEVINFO (0x1F02) + +#define SHM_DEVICE_CMD_ALLOCATE (0x1F11) +#define SHM_DEVICE_CMD_FREE (0x1F12) +#define SHM_DEVICE_CMD_ALLOCATE_NONCACHE (0x1F13) +#define SHM_DEVICE_CMD_FREE_NONCACHE (0x1F14) + +#define SHM_DEVICE_CMD_INVALIDATE (0x1F21) +#define SHM_DEVICE_CMD_CLEAN (0x1F22) +#define SHM_DEVICE_CMD_CLEANANDINVALIDATE (0x1F23) + +#define SHM_DEVICE_CMD_MMAP_PREPARATION (0x1F31) +#define SHM_DEVICE_CMD_ADD_REFERENCE_COUNT (0X1F32) +#define SHM_DEVICE_CMD_CHECK_TEST (0X1F33) + + +#define SHM_DEVICE_THRESHOLD (0x0040) +#define SHM_DEVICE_ALIGNMENT_MIN (0x1000) +#define SHM_DEVICE_ALIGNMENT_MAX (0x400000) + +#define SHM_DEVICE_SIZE_MIN (0x1000) +#define shm_round_size(size) \ + do { \ + size_t temp; \ + if (size == 0) { \ + return -1; \ + } \ + temp = size % SHM_DEVICE_SIZE_MIN; \ + if (temp) \ + size += SHM_DEVICE_SIZE_MIN - temp; \ + } while(0) + +#define shm_round_alignment(align) \ + do { \ + if (align < SHM_DEVICE_ALIGNMENT_MIN) \ + align = SHM_DEVICE_ALIGNMENT_MIN; \ + } while(0) + +static int inline shm_check_alignment (size_t Alignment) +{ + size_t temp = 2; + + if (Alignment == 0) + return 0; + + do { + if (temp == Alignment) + return 0; + temp = temp << 1; + } while ((temp <= SHM_DEVICE_ALIGNMENT_MAX) && (temp <= Alignment)); + + return -1; +} + + +/******************************************************************************* + Data structure Defined +*/ + +typedef struct +{ + unsigned long m_param1; + unsigned long m_param2; + unsigned long m_param3; +} shm_driver_operation_t; + +#define SHM_TEST_GET_INFO 1 + +typedef struct +{ + int cmd; + size_t offset; + size_t physical; + pid_t malloc_taskid; + int malloc_refcount; + pid_t user_taskid[5]; + int node_alive; + int takeover_flag; + int maptype; + int res; +} shm_check_test_t; + +typedef struct _memory_node_t *memory_node_ptr_t; + +// memory managerment engine in linux kernel +typedef struct _memory_node_t +{ + + /* Dual-linked list of nodes. */ + memory_node_ptr_t m_next; + memory_node_ptr_t m_prev; + + /* Dual-linked list of free nodes. */ + memory_node_ptr_t m_next_free; + memory_node_ptr_t m_prev_free; + + /* Information for this node. */ + size_t m_addr; // true addr for alignment = m_addr + m_offset + size_t m_size; // true size for alignment = m_size - m_offset + + size_t m_alignment; + size_t m_offset; + pid_t m_threadid; //record the caller's thread id for debug usage + char m_threadname[16]; // thread name + pid_t m_taskid; // 9/23 qzhang@marvell.com add for releas + char m_taskname[16]; + int m_task_free_flag; + int m_refcount; + /* record locking task for shm lowmem killer */ + pid_t m_usrtaskid; + int b_takeover; + int memory_type; + char m_usrtaskname[16]; + + size_t m_phyaddress; + struct rb_node __rb_node; + + int m_reference_count; + struct list_head m_user_list; +} memory_node_t; + +typedef struct _user_node_t +{ + pid_t m_threadid; + char m_threadname[16]; + pid_t m_taskid; + char m_taskname[16]; + int m_refcount; + + struct list_head m_list; + +} user_node_t; + + +// memory managerment engine +typedef struct +{ + + size_t m_base; + size_t m_size; + size_t m_virt_base; + size_t m_cache_or_noncache; + size_t m_threshold; /* Allocation threshold. */ + + size_t m_size_used; + size_t m_size_free; + + size_t m_peak_usedmem; // the peak of memory in use history + size_t m_max_freeblock; // size of largest unused block + size_t m_min_freeblock; // size of smallest unused block + size_t m_max_usedblock; // size of largest memory used + size_t m_min_usedblock; // size of smallest memory used + uint m_num_freeblock; // amount of unused block + uint m_num_usedblock; // amount of unused block + + memory_node_t m_root; + + struct mutex m_mutex; + struct rb_root m_shm_root; + +} memory_engine_t; + +typedef struct +{ + int minor; + char *name; + struct cdev *cdev; + struct file_operations *fops; +} shm_driver_cdev_t; + +typedef int (*shm_device_shrinker) (void *shm_dev, int allocsize); + +typedef struct { + size_t m_phyaddress; + size_t m_virtaddress; + size_t m_size; + struct rb_node phys_node; + struct rb_node virt_node; +} shm_address_t; +typedef struct +{ + + size_t m_base; + size_t m_size; + size_t m_threshold; + + size_t m_base_cache; + struct rw_semaphore m_rwsem; + struct rb_root m_virtaddr_root; + struct rb_root m_phyaddr_root; + + memory_engine_t *m_engine; + + /* share memory shrinker */ + shm_device_shrinker m_shrinker; +} shm_device_t; + +extern shm_device_t *shm_device; +extern shm_device_t *shm_secure_device; + +#define UNKNOWN_OOM_ADJ -100 +#define MAX_SHM_USR_NODE_NUM 100 + +typedef struct shm_usr_node *shm_usr_ptr_t; + +struct shm_usr_node +{ + pid_t m_taskid; + char m_taskname[16]; + size_t m_size_alloc; + size_t m_size_use; + oom_flags_t m_oom_adj; +}; + +struct shm_stat_info +{ + size_t m_size; + size_t m_used; + + size_t m_count; + struct shm_usr_node m_nodes[MAX_SHM_USR_NODE_NUM]; +}; + +struct shm_device_priv_data +{ + pid_t m_taskid; + size_t m_map_physaddress; + int memory_type; + shm_device_t *m_device; +}; + +static oom_flags_t inline shm_find_oomadj_by_pid (pid_t taskid) +{ + struct task_struct *task = NULL; + struct signal_struct *sig = NULL; + + task = find_task_by_vpid (taskid); + if (task) { + sig = task->signal; + + if (sig) + return sig->oom_flags; + } + return UNKNOWN_OOM_ADJ; +} +#endif /* __shm_type_h__ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/Kconfig b/arch/arm/mach-berlin/modules/tzdd/Kconfig new file mode 100644 index 00000000..228dad13 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/Kconfig @@ -0,0 +1,7 @@ + +menuconfig MV_TZDD + tristate "Enable Trust Zone Device Driver" + depends on TZ_HYPERVISOR + default m +help + Marvell Trust Execution Environment (TEE) Solution in non-trusted world diff --git a/arch/arm/mach-berlin/modules/tzdd/Makefile b/arch/arm/mach-berlin/modules/tzdd/Makefile new file mode 100644 index 00000000..9482557a --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/Makefile @@ -0,0 +1,84 @@ + +# debug for TZDD +TZDD_DBG := N + +# debug proc fs +TZDD_DBG_PROC_FS := Y + +# debug for OSA +OSA_DEBUG := Y + +# measure performance +TZDD_PERF_REC := N + +# sharedMem context checking +TZDD_SHAREDMEM_CONTEXT_CHECKING := N + +obj-$(CONFIG_BERLIN_TZDD) := tzdd.o +tzdd-objs := \ + osa/osa.o \ + osa/osa_atomic.o \ + osa/osa_dbg.o \ + osa/osa_delay.o \ + osa/osa_irq.o \ + osa/osa_list.o \ + osa/osa_mem.o \ + osa/osa_sync.o \ + osa/osa_thread.o \ + osa/osa_sched.o \ + \ + main/tzdd_main_core.o \ + main/tzdd_main.o \ + main/tzdd_pt.o \ + main/tzdd_pt_core.o \ + main/teec_client_api.o \ + main/teec_cb.o \ + main/teec_time.o \ + \ + msgm/ntw/tee_msgm_handle_params.o \ + msgm/ntw/tee_msgm_close_ss.o \ + msgm/ntw/tee_msgm_open_ss.o \ + msgm/ntw/tee_msgm_map_shm.o \ + msgm/ntw/tee_msgm_unmap_shm.o \ + msgm/ntw/tee_msgm_inv_op.o \ + msgm/ntw/tee_msgm_can_op.o \ + msgm/ntw/tee_msgm_ntw.o \ + \ + comm/tee_cm.o \ + comm/tee_cm_smi.o \ + comm/ntw/tee_cm_init_ntw.o \ + comm/ntw/tee_cm_misc_ntw.o \ + \ + memm/tee_memm.o + +ifeq ($(TZDD_DBG), Y) +ccflags-y += -DTZDD_DEBUG +endif + +ifeq ($(OSA_DEBUG), Y) +ccflags-y += -DOSA_DEBUG +endif + +ifeq ($(TZDD_PERF_REC), Y) +ccflags-y += -DTEE_PERF_MEASURE -I$(CWD)/perf/ntw +tzdd-objs += perf/tee_perf.o +endif + +ifeq ($(TZDD_DBG_PROC_FS), Y) +ccflags-y += -DTEE_DEBUG_ENALBE_PROC_FS_LOG +tzdd-objs += dbg/ntw/tee_dbg_log.o +endif + +ifeq ($(TZDD_SHAREDMEM_CONTEXT_CHECKING), Y) +EXTRA_CFLAGS += -DSHAREDMEM_CONTEXT_CHECKING +endif + +ccflags-y += -Wall -O2 \ + -I$(src)/osa/ \ + -I$(src)/osa/include \ + -I$(src)/inc \ + -I$(src)/inc_common \ + -I$(src)/comm/ntw \ + -I$(src)/main \ + -I$(src)/memm + diff --git a/arch/arm/mach-berlin/modules/tzdd/comm/ntw/tee_cm_init_ntw.c b/arch/arm/mach-berlin/modules/tzdd/comm/ntw/tee_cm_init_ntw.c new file mode 100644 index 00000000..eb17f94f --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/comm/ntw/tee_cm_init_ntw.c @@ -0,0 +1,120 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#include "tee_client_api.h" +#include "tee_cm.h" +#include "tee_cm_internal.h" +#include "tee_perf.h" + +/* variables */ +extern void *in_header; +extern void *in_buf; /* rb data buffer */ +extern uint32_t in_buf_size; +extern void *out_header; +extern void *out_buf; /* rc data buffer */ +extern uint32_t out_buf_size; + +/* rb mapping info */ +static uint32_t _g_phys_rb; +static uint32_t _g_size_rb; +static uint32_t _g_virt_rb; +/* rc mapping info */ +static uint32_t _g_phys_rc; +static uint32_t _g_size_rc; +static uint32_t _g_virt_rc; + +#ifdef TEE_DEBUG_ENALBE_PROC_FS_LOG +extern void tee_dbg_log_init(uint32_t buffer, uint32_t ctl); +#endif + +tee_cm_stat tee_cm_init(void) +{ + tee_cm_stat ret = TEEC_SUCCESS; +#ifdef TEE_PERF_MEASURE + uint32_t *perf_buffer; +#endif + /* map RB */ + _g_phys_rb = _read_rb_phys_addr(); + _g_size_rb = _read_rb_size(); + _g_virt_rb = + (uint32_t) ioremap_nocache(_g_phys_rb, (uint32_t) (_g_size_rb)); + printk(KERN_ERR "remap rb to 0x%x\n", _g_virt_rb); + + /* map RC */ + _g_phys_rc = _read_rc_phys_addr(); + _g_size_rc = _read_rc_size(); + _g_virt_rc = + (uint32_t) ioremap_nocache(_g_phys_rc, (uint32_t) (_g_size_rc)); + printk(KERN_ERR "remap rc to 0x%x\n", _g_virt_rc); + +#ifdef TEE_PERF_MEASURE + /* map permance log buffer */ + perf_buffer = + (uint32_t *) ioremap_nocache(PERF_BUF_ADDR, PERF_BUF_SIZE); + tee_perf_init((uint32_t *) perf_buffer); + printk(KERN_ERR + "remap perf log buffer to 0x%x\n", + (uint32_t) perf_buffer); +#endif + + in_header = (void *)_g_virt_rb; + in_buf = (void *)((uint32_t) in_header + sizeof(cm_index_header_t)); + in_buf_size = _g_size_rb / 2 - sizeof(cm_index_header_t); + + OSA_ASSERT(_g_virt_rc); + memset((void *)_g_virt_rc, 0, _g_size_rc); + out_header = (void *)_g_virt_rc; + out_buf = (void *)((uint32_t) out_header + sizeof(cm_index_header_t)); + out_buf_size = _g_size_rc / 2 - sizeof(cm_index_header_t); + +#ifdef TEE_DEBUG_ENALBE_PROC_FS_LOG + tee_dbg_log_init((uint32_t) in_buf + in_buf_size, + (uint32_t) out_buf + out_buf_size); +#endif + + return ret; +} + +void tee_cm_cleanup(void) +{ + /* resetting */ + in_header = NULL; + in_buf = NULL; + in_buf_size = 0; + out_header = NULL; + out_buf = NULL; + out_buf_size = 0; + + /* unmap RB */ + if (_g_virt_rb) + osa_iounmap_cached((void *)_g_virt_rb, _g_size_rb); + + /* free RC */ + if (_g_virt_rc) + osa_iounmap_cached((void *)_g_virt_rc, _g_size_rc); + + _g_phys_rb = 0; + _g_virt_rb = 0; + _g_size_rb = 0; + _g_phys_rc = 0; + _g_virt_rc = 0; + _g_size_rc = 0; + + return; +} diff --git a/arch/arm/mach-berlin/modules/tzdd/comm/ntw/tee_cm_internal.h b/arch/arm/mach-berlin/modules/tzdd/comm/ntw/tee_cm_internal.h new file mode 100644 index 00000000..840b4d4f --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/comm/ntw/tee_cm_internal.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#ifndef _TEE_CM_INTERNAL_H_ +#define _TEE_CM_INTERNAL_H_ + +#include "tee_client_api.h" +#include "osa.h" +#include "tee_msgm_ntw.h" + +#define CM_BLK_MAGIC (0xC1C2C3C4) +#define CM_PAD_CHAR (0) + +/* read/write index header */ +typedef struct { + int32_t idx_read; /* res pool read index */ + int32_t idx_write; /* req pool write index */ + int32_t tw_idle; + int32_t from_idle; + int32_t wakeup_count; + int32_t timer_count; +} cm_index_header_t; + +/* smi trap arguments */ +typedef struct { + uint32_t arg0; + uint32_t arg1; + uint32_t arg2; +} tee_cm_smi_input_t; + +#endif /* _TEE_CM_INTERNAL_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/comm/ntw/tee_cm_misc_ntw.c b/arch/arm/mach-berlin/modules/tzdd/comm/ntw/tee_cm_misc_ntw.c new file mode 100644 index 00000000..e4d88309 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/comm/ntw/tee_cm_misc_ntw.c @@ -0,0 +1,86 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#include "tee_client_api.h" +#include "tee_cm_internal.h" +#include "tee_cm.h" + +extern void *in_header; +extern void *out_header; + +static int32_t _g_idx_out_write; + +/* get in read idx's pointer */ +inline int32_t *_cm_in_read_idx(void) +{ + static int32_t index_in_read; + + return &index_in_read; +} + +/* get in write idx's pointer(the other end modify) */ +inline int32_t *_cm_in_write_idx(void) +{ + cm_index_header_t *in_head = (cm_index_header_t *) in_header; + + return &(in_head->idx_write); +} + +/* get out read idx's pointer(the other and modify */ +inline int32_t *_cm_out_read_idx(void) +{ + cm_index_header_t *out_head = (cm_index_header_t *) out_header; + + return &(out_head->idx_read); +} + +/* get out write idx's pointer */ +inline int32_t *_cm_out_write_idx(void) +{ + static int32_t _g_idx_out_write; + + return &_g_idx_out_write; +} + +inline int32_t _cm_get_out_write_idx(void) +{ + return _g_idx_out_write; +} + +inline void _cm_update_out_write_idx(int32_t idx) +{ + cm_index_header_t *out_head = (cm_index_header_t *) out_header; + + _g_idx_out_write = idx; + out_head->idx_write = idx; + + return; +} +bool tee_cm_tw_is_idle(void) +{ + cm_index_header_t *in_head = (cm_index_header_t*)in_header; + + return (bool)in_head->tw_idle; +} +uint32_t tee_cm_get_wakeup_count(void) +{ + cm_index_header_t *in_head = (cm_index_header_t*)in_header; + + return in_head->wakeup_count; +} diff --git a/arch/arm/mach-berlin/modules/tzdd/comm/tee_cm.c b/arch/arm/mach-berlin/modules/tzdd/comm/tee_cm.c new file mode 100644 index 00000000..fd8e7f5b --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/comm/tee_cm.c @@ -0,0 +1,214 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#include "tee_cm_internal.h" +#include "tee_cm.h" + +/* variables */ +void *in_header = NULL; +void *in_buf = NULL; /* rb data buffer */ +uint32_t in_buf_size = 0; +void *out_header = NULL; +void *out_buf = NULL; /* rc data buffer */ +uint32_t out_buf_size = 0; +/* if wr idx wrap around and behind rd idx, this is min space to reserved */ +#define BAR_SIZE (4) + +/*** facility functions/macros ***/ +extern int32_t *_cm_in_read_idx(void); +extern int32_t *_cm_in_write_idx(void); +extern int32_t *_cm_out_read_idx(void); +extern int32_t *_cm_out_write_idx(void); +#define IN_RD_IDX (*_cm_in_read_idx()) /* RB, read_index */ +#define IN_WR_IDX (*_cm_in_write_idx()) /* RB, wirte_index */ +#define OUT_RD_IDX (*_cm_out_read_idx()) /* RC, read_index */ +#define OUT_WR_IDX (*_cm_out_write_idx()) /* RC, write_index */ + +extern void cm_call_smi(void *arg); + +extern int32_t _cm_get_out_write_idx(void); +extern void _cm_update_out_write_idx(int32_t idx); + +/* get out empty size */ +uint32_t _out_empty_size(void) +{ + uint32_t ret = 0; + int32_t delta = OUT_WR_IDX - OUT_RD_IDX; + if (delta >= 0) /* data size */ + ret = out_buf_size - (delta) - BAR_SIZE; + else /* data size */ + ret = out_buf_size - (delta + out_buf_size) - BAR_SIZE; + + return ret; +} + +/* get in data size */ +uint32_t _in_data_size(void) +{ + uint32_t ret = 0; + int32_t delta = IN_WR_IDX - IN_RD_IDX; + if (delta >= 0) + ret = delta; + else + ret = in_buf_size - delta - BAR_SIZE; + + return ret; +} + +/* out writing */ +void _out_write(int8_t *buf, uint32_t len, int32_t *idx) +{ + uint32_t end; + + OSA_ASSERT(len < out_buf_size); + + end = (uint32_t)(*idx) + len; + if (end > out_buf_size) { + uint32_t remained_sz; + uint32_t current_sz; + + remained_sz = end - out_buf_size; + current_sz = out_buf_size - (uint32_t)(*idx); + memcpy(out_buf + *idx, buf, current_sz); + memcpy(out_buf, buf + current_sz, remained_sz); + *idx = remained_sz; + } else { + memcpy(out_buf + *idx, buf, len); + *idx = end; + } +} + +/* in reading */ +void _in_read(int8_t *buf, uint32_t len, int32_t *idx) +{ + uint32_t end; + + OSA_ASSERT(len < in_buf_size); + + end = (uint32_t)(*idx) + len; + if (end > in_buf_size) { + uint32_t remained_sz; + uint32_t current_sz; + + remained_sz = end - in_buf_size; + current_sz = in_buf_size - (uint32_t)(*idx); + memcpy(buf, in_buf + *idx, current_sz); + memcpy(buf + current_sz, in_buf, remained_sz); + *idx = remained_sz; + } else { + memcpy(buf, in_buf + *idx, len); + *idx = end; + } +} + +bool tee_cm_send_data(uint8_t *buf) +{ + bool ret = true; + uint32_t size; + /* int32_t idx = OUT_WR_IDX; */ + int32_t idx; + tee_msg_head_t *tee_msg_head; + + tee_msg_head = (tee_msg_head_t *)buf; + + size = sizeof(tee_msg_head_t) + tee_msg_head->msg_sz; + +#if 0 /* zyq 20130207, find the bugs with RB and RC */ + /* check if there is enough space */ + if (_out_empty_size() < size) + return false; +#endif + + idx = _cm_get_out_write_idx(); + + /* write caller's data */ + _out_write((int8_t *)buf, size, &idx); + + /* set out write index */ + _cm_update_out_write_idx(idx); + /* OUT_WR_IDX = idx; */ + + return ret; +} + +uint32_t tee_cm_get_data_size(void) +{ + uint32_t size_in_data = _in_data_size(); + tee_msg_head_t tee_msg_head; + uint32_t size; + int32_t idx = IN_RD_IDX; + + if (size_in_data < sizeof(tee_msg_head_t)) + return 0; + + _in_read((int8_t *)(&tee_msg_head), sizeof(tee_msg_head_t), &idx); + size = sizeof(tee_msg_head_t) + tee_msg_head.msg_sz; + return size; +} + +void tee_cm_recv_data(uint8_t *buf) +{ + tee_msg_head_t tee_msg_head; + int32_t idx = IN_RD_IDX; + + _in_read((int8_t *)(&tee_msg_head), sizeof(tee_msg_head_t), &idx); + + idx = IN_RD_IDX; + + /* output data */ + _in_read((int8_t *)buf, sizeof(tee_msg_head_t) + tee_msg_head.msg_sz, + &idx); + + /* update rb read index */ + IN_RD_IDX = idx; +} + +void tee_cm_get_recv_buf(void **head) +{ + tee_msg_head_t tee_msg_head; + int32_t idx = IN_RD_IDX; + + _in_read((int8_t *)(&tee_msg_head), sizeof(tee_msg_head_t), &idx); + + *head = tee_msg_head.tee_msg; +} + +void tee_cm_smi(uint32_t flag) +{ + tee_cm_smi_input_t tee_cm_smi_input; + + tee_cm_smi_input.arg0 = flag; + tee_cm_smi_input.arg1 = 0; + tee_cm_smi_input.arg2 = 0; + + cm_call_smi(&tee_cm_smi_input); + + return; +} + +void tee_cm_get_msgm_head(void *msg_head) +{ + int32_t idx = IN_RD_IDX; + + OSA_ASSERT(msg_head); + + _in_read((int8_t *)msg_head, sizeof(tee_msg_head_t), &idx); + + return; +} diff --git a/arch/arm/mach-berlin/modules/tzdd/comm/tee_cm_smi.S b/arch/arm/mach-berlin/modules/tzdd/comm/tee_cm_smi.S new file mode 100644 index 00000000..3afd3dd2 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/comm/tee_cm_smi.S @@ -0,0 +1,16 @@ + +.globl cm_call_smi + +cm_call_smi: + stmdb sp!, {r1-r12,lr} + + ldr r1, [r0, #4] + ldr r2, [r0, #8] + ldr r0, [r0, #0] + +#if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 5) + .arch_extension sec +#endif + smc #0 + ldmia sp!, {r1-r12,pc} + diff --git a/arch/arm/mach-berlin/modules/tzdd/dbg/ntw/tee_dbg_log.c b/arch/arm/mach-berlin/modules/tzdd/dbg/ntw/tee_dbg_log.c new file mode 100644 index 00000000..053f2267 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/dbg/ntw/tee_dbg_log.c @@ -0,0 +1,256 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#include "tzdd_internal.h" +#include +#include + +#define _TEE_DBG_PROC_LOG_TMP_BUF_SZ (255) /* max size of string */ +#define _TEE_DBG_PROC_LOG_BUF_SZ \ + (0x80000 - _TEE_DBG_PROC_LOG_TMP_BUF_SZ - sizeof(tee_dbg_log_t)) +#define _TEE_DBG_PROC_ENABLE (0x55aa55aa) + +#define IS_DBG_PROC_MAGIC_VALID(_m) \ + (('P' == _m[0]) && \ + ('r' == _m[1]) && \ + ('O' == _m[2]) && \ + ('c' == _m[3])) + +typedef struct _tee_dbg_log_t { + uint8_t magic[4]; + uint32_t write_offset; + uint32_t round; + bool round_rollback; +} tee_dbg_log_t; + +typedef struct _tee_dbg_log_ctl_t { + volatile uint32_t enable; +} tee_dbg_log_ctl_t; + +static tee_dbg_log_t *_g_tee_dbg_log_header; +static tee_dbg_log_ctl_t *_g_tee_dbg_log_ctl_header; +static uint8_t *_g_tee_dbg_log_buf; + +void tee_dbg_log_init(uint32_t buffer, uint32_t ctl) +{ + _g_tee_dbg_log_header = (tee_dbg_log_t *) buffer; + _g_tee_dbg_log_ctl_header = (tee_dbg_log_ctl_t *) ctl; + _g_tee_dbg_log_buf = (uint8_t *) (_g_tee_dbg_log_header + 1); + printk(KERN_ERR "proc log buf: %x, ctl: %x\n", buffer, ctl); +} + +static uint32_t g_snapshot_write_offset; +static uint32_t g_snapshot_round; +static uint32_t g_snapshot_round_rollback; +static uint32_t g_read_round; +static uint32_t g_read_offset; +static uint32_t g_read_count; +static bool g_proc_log_eanbled; + +static void *log_seq_start(struct seq_file *s, loff_t *pos) +{ + g_snapshot_write_offset = _g_tee_dbg_log_header->write_offset; + g_snapshot_round = _g_tee_dbg_log_header->round; + g_snapshot_round_rollback = _g_tee_dbg_log_header->round_rollback; + + if (!IS_DBG_PROC_MAGIC_VALID(_g_tee_dbg_log_header->magic)) + return NULL; + + if (g_read_round == g_snapshot_round + && g_read_offset == g_snapshot_write_offset) + /* nothing to read */ + return NULL; + + if (g_snapshot_round_rollback) { + if (g_snapshot_round != 0 || + g_snapshot_round != 0xFFFFFFFF || + g_snapshot_write_offset > g_read_offset) { + seq_printf(s, + "=========================rollback==========================\n"); + g_read_offset = g_snapshot_write_offset; + g_read_round = g_snapshot_round - 1; + g_snapshot_round_rollback = false; + } + } else { + if (g_snapshot_round > g_read_round + 1 || + (g_snapshot_round == g_read_round + 1 + && g_snapshot_write_offset > g_read_offset)) { + g_read_offset = g_snapshot_write_offset; + g_read_round = g_snapshot_round - 1; + seq_printf(s, + "--------------------------rollback--------------------------\n"); + } + } + g_read_count = s->count; + + return _g_tee_dbg_log_buf + g_read_offset; +} + +static void *log_seq_next(struct seq_file *s, void *v, loff_t *pos) +{ + g_read_offset += s->count - g_read_count + 1; + if (g_read_offset > _TEE_DBG_PROC_LOG_BUF_SZ) { + g_read_offset -= _TEE_DBG_PROC_LOG_BUF_SZ; + g_read_round++; + } + g_read_count = s->count; + if ((g_read_round == g_snapshot_round + && g_read_offset >= g_snapshot_write_offset) + || g_read_round > g_snapshot_round) + return NULL; + + return _g_tee_dbg_log_buf + g_read_offset; +} + +static void log_seq_stop(struct seq_file *s, void *v) +{ + return; +} + +static int log_seq_show(struct seq_file *s, void *v) +{ + seq_printf(s, "%s", (int8_t *) v); + return 0; +} + +static const struct seq_operations log_seq_ops = { + .start = log_seq_start, + .next = log_seq_next, + .stop = log_seq_stop, + .show = log_seq_show +}; + +static int log_open(struct inode *inode, struct file *file) +{ + return seq_open(file, &log_seq_ops); +} + +static const struct file_operations log_file_ops = { + .owner = THIS_MODULE, + .open = log_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release +}; + +static int ctl_seq_show(struct seq_file *m, void *v) +{ + seq_printf(m, "tee proc log %s\n", + g_proc_log_eanbled ? "enabled" : "disabled"); + return 0; +} + +static int ctl_open(struct inode *inode, struct file *file) +{ + return single_open(file, ctl_seq_show, NULL); +} + +static ssize_t ctl_write(struct file *file, const char *buf, + size_t count, loff_t *pos) +{ + char val; + + get_user(val, buf); + switch (val) { + case '1': + _g_tee_dbg_log_ctl_header->enable = _TEE_DBG_PROC_ENABLE; + g_proc_log_eanbled = true; + break; + case '0': + _g_tee_dbg_log_ctl_header->enable = 0; + g_proc_log_eanbled = false; + break; + default: + printk(KERN_ERR "value should be 1 or 0\n"); + return 0; + } + + return count; +} + +static const struct file_operations ctl_file_ops = { + .owner = THIS_MODULE, + .open = ctl_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, + .write = ctl_write, +}; + +extern uint32_t g_msg_sent; +extern uint32_t g_msg_recv; +extern uint32_t g_msg_fake; +extern uint32_t g_msg_ignd; +extern uint32_t g_pre_ipi_num; +extern uint32_t g_pst_ipi_num; +extern uint32_t g_pre_dmy_num; +extern uint32_t g_pst_dmy_num; +extern uint32_t g_wait_for; +extern uint32_t g_wait_for_idle; +extern uint32_t g_wait_for_command; + +extern uint32_t tzdd_get_req_num_in_list(void); + +static int stat_seq_show(struct seq_file *m, void *v) +{ + seq_printf(m, "lst: %d\n" + "msg: sent %d, recv %d, fake %d, ignd %d\n" + "smc: pre-ipi %d, pst-ipi %d, pre-dmy %d, pst-dmy %d\n" + "req list: %s, current wait for %d\n" + "idle: %d, cmd %d\n" + , + tzdd_get_req_num_in_list(), + g_msg_sent, g_msg_recv, g_msg_fake, g_msg_ignd, + g_pre_ipi_num, g_pst_ipi_num, g_pre_dmy_num, g_pst_dmy_num, + osa_list_empty(&tzdd_dev->req_list) ? "empty": "not empty", + g_wait_for, g_wait_for_idle, g_wait_for_command); + return 0; +} + +static int stat_open(struct inode *inode, struct file *file) +{ + return single_open(file, stat_seq_show, NULL); +} + +static const struct file_operations stat_file_ops = { + .owner = THIS_MODULE, + .open = stat_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +struct proc_dir_entry *_g_tzdd_entry; +void tee_dbg_proc_fs_init(void) +{ + _g_tzdd_entry = proc_mkdir("tee", NULL); + + proc_create("log", S_IRUGO, _g_tzdd_entry, &log_file_ops); + proc_create("enable", S_IRUGO | S_IWUGO, _g_tzdd_entry, &ctl_file_ops); + proc_create("stat", S_IRUGO, _g_tzdd_entry, &stat_file_ops); +} + +void tee_dbg_proc_fs_cleanup(void) +{ + if (_g_tzdd_entry) { + remove_proc_entry("log", _g_tzdd_entry); + remove_proc_entry("enable", _g_tzdd_entry); + remove_proc_entry("stat", _g_tzdd_entry); + remove_proc_entry("tee", NULL); + } +} diff --git a/arch/arm/mach-berlin/modules/tzdd/dbg/tee_dump.sh b/arch/arm/mach-berlin/modules/tzdd/dbg/tee_dump.sh new file mode 100755 index 00000000..9e8bdd33 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/dbg/tee_dump.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +adb shell "while ( true ) do cat /proc/tee/log; done" | tee tee.dmp diff --git a/arch/arm/mach-berlin/modules/tzdd/dbg/tee_enable_dbg.sh b/arch/arm/mach-berlin/modules/tzdd/dbg/tee_enable_dbg.sh new file mode 100755 index 00000000..13939cb1 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/dbg/tee_enable_dbg.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +adb shell "echo 1 > /proc/tee/enable; cat /proc/tee/enable" diff --git a/arch/arm/mach-berlin/modules/tzdd/inc/tee_cm.h b/arch/arm/mach-berlin/modules/tzdd/inc/tee_cm.h new file mode 100644 index 00000000..089a4c19 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/inc/tee_cm.h @@ -0,0 +1,65 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#ifndef _TEE_CM_H_ +#define _TEE_CM_H_ + +#include "tz-addr-map.h" + +typedef uint32_t tee_cm_stat; +/* initialization function, return err code */ +extern tee_cm_stat tee_cm_init(void); +/* deinitialization function, return err code */ +extern void tee_cm_cleanup(void); +/* write data to the other end */ +extern bool tee_cm_send_data(uint8_t *buf); +/* get the size of current available data */ +extern uint32_t tee_cm_get_data_size(void); +/* get the destination buffer for receiver*/ +extern void tee_cm_get_recv_buf(void **head); +/* receive data */ +extern void tee_cm_recv_data(uint8_t *buf); +extern void tee_cm_smi(uint32_t flag); +extern void tee_cm_get_msgm_head(void *msg_head); + +/* read RB phys address */ +static inline uint32_t _read_rb_phys_addr(void) +{ + return (uint32_t) RB_PHYS_ADDR; +} + +/* read RB size */ +static inline uint32_t _read_rb_size(void) +{ + return (uint32_t) RB_SIZE; +} + +/* read RC phys address */ +static inline uint32_t _read_rc_phys_addr(void) +{ + return (uint32_t) RC_PHYS_ADDR; +} + +/* read RC size */ +static inline uint32_t _read_rc_size(void) +{ + return (uint32_t) RC_SIZE; +} + +#endif /* _TEE_CM_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/inc/tee_memm.h b/arch/arm/mach-berlin/modules/tzdd/inc/tee_memm.h new file mode 100644 index 00000000..d8282932 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/inc/tee_memm.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#ifndef _TEE_MEMM_H_ +#define _TEE_MEMM_H_ +typedef void *tee_memm_ss_t; +typedef struct _tee_mem_page_t { + void *phy_addr; + uint32_t len; +} tee_mem_page_t; +tee_memm_ss_t tee_memm_create_ss(void); +void tee_memm_destroy_ss(tee_memm_ss_t tee_memm_ss); +tee_stat_t tee_memm_calc_pages_num(tee_memm_ss_t tee_memm_ss, void *virt, + uint32_t size, uint32_t *pages_num); +tee_stat_t tee_memm_parse_phys_pages(tee_memm_ss_t tee_memm_ss, void *virt, + uint32_t length, tee_mem_page_t *pages, + uint32_t pages_num); +tee_stat_t tee_memm_get_user_mem(tee_memm_ss_t tee_memm_ss, void __user *virt, + uint32_t size, void __kernel **kvirt); +void tee_memm_put_user_mem(tee_memm_ss_t tee_memm_ss, void *vm); + +#endif /* _TEE_MEMM_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/inc/tee_mrvl_imp.h b/arch/arm/mach-berlin/modules/tzdd/inc/tee_mrvl_imp.h new file mode 100644 index 00000000..8fc05d5c --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/inc/tee_mrvl_imp.h @@ -0,0 +1,71 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#ifndef _TEE_MRVL_IMP_H_ +#define _TEE_MRVL_IMP_H_ + +#include "tzdd_types.h" +#include "osa.h" +#include "tzdd_list.h" + +typedef void *tee_ss_ntw; +typedef void *tee_msg_handle_t; + +#define MGC_NUM (4) + +typedef struct __tee_ctx_ntw { + uint8_t magic[MGC_NUM]; + /* add the count if there is a session or sharedmemory */ + osa_atomic_t count; + tee_impl tee_ctx_ntw; + tee_impl private_data; +} _TEEC_MRVL_Context; + +typedef struct __tee_ss_ntw { + uint8_t magic[MGC_NUM]; + /* add the count if there is an operation */ + osa_atomic_t count; + tee_impl tee_ctx_ntw; + tee_impl tee_ss_tw; + tee_impl tee_ss_ntw; + tee_impl private_data; +} _TEEC_MRVL_Session; + +typedef struct __tee_op_ntw { + uint8_t magic[MGC_NUM]; + tee_ss_ntw tee_ss_ntw; + tee_msg_handle_t tee_msg_ntw; + tee_impl tee_op_ntw; +} _TEEC_MRVL_Operation; + +typedef struct __tee_shm_ntw { + uint8_t magic[MGC_NUM]; + /* add the count if there is a memref in the operation */ + osa_atomic_t count; + tee_impl tee_ctx_ntw; + void *vaddr_tw; + uint32_t size; + /* who allocates the mem, if flag=1, + * it means driver allocate the buffer + */ + uint32_t flag; + tee_impl tee_shm_ntw; + tee_impl private_data; +} _TEEC_MRVL_SharedMemory; + +#endif /* _TEE_MRVL_IMP_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/inc/tee_msgm_ntw.h b/arch/arm/mach-berlin/modules/tzdd/inc/tee_msgm_ntw.h new file mode 100644 index 00000000..fda19dd0 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/inc/tee_msgm_ntw.h @@ -0,0 +1,212 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#ifndef _TEE_MSGM_NTW_H_ +#define _TEE_MSGM_NTW_H_ + +#include "tee_mrvl_imp.h" +#include "tee_client_api.h" + +typedef TEEC_Result tee_stat_t; +typedef void *tee_msgm_t; + +typedef enum _tee_msg_business_stat_t { + TEE_MSG_STAT_INVALID, + TEE_MSG_STAT_REQ, + TEE_MSG_STAT_RSP, + TEE_MSG_STAT_CAN, +} tee_msg_business_stat_t; + +typedef enum _tee_msg_control_cmd_t { + TEE_MSG_CTL_INVALID, + TEE_MSG_CTL_RETURN_TO_NTW, + TEE_MSG_CTL_TRAPPED, +} tee_msg_control_cmd_t; + +typedef enum _tee_msg_type_t { + TEE_MSG_TYPE_BUSINESS, + TEE_MSG_TYPE_CONTROL, +} tee_msg_type_t; + +/* + * this struct is like this + * ,----------------------------------------------------------, + * | type | tw | tp | reserve | stat | bp + * | 31~28 | 27 | 26 | 25~16 | 15~0 | + * | |-----------------------------+-------------------| + * | | reserve | cmd | ctl + * | | 27~16 | 15~0 | + * |----------------------------------------------------------| + * | value | + * | 32~0 | + * '----------------------------------------------------------' + */ +typedef union _tee_msg_prop_t { + struct { + tee_msg_business_stat_t stat:16; + uint32_t:10; + bool has_trapped:1; + bool is_from_tw:1; + } bp; + struct { + tee_msg_control_cmd_t cmd:16; + uint32_t:12; + } ctl; + struct { + uint32_t:28; + tee_msg_type_t type:4; + }; + uint32_t value; +} tee_msg_prop_t; + +/* open msg-head for updating msg-ntw according to msg-in-rb by pt-ntw */ +typedef struct _tee_msg_head_t { + uint8_t magic[4]; + uint32_t msg_sz; + osa_list_t node; + tee_msg_prop_t msg_prop; + tee_msg_handle_t tee_msg; + osa_sem_t comp; + void *reserved; +} tee_msg_head_t; + +typedef TEEC_SharedMemory tee_msg_map_shm_info_t; +typedef TEEC_Operation tee_msg_op_info_t; + +typedef enum _tee_cmd_t { + TEE_CMD_INVALID, + TEE_CMD_MAP_SHM, + TEE_CMD_UNMAP_SHM, + TEE_CMD_OPEN_SS, + TEE_CMD_CLOSE_SS, + TEE_CMD_INV_OP, + TEE_CMD_CAN_OP, +} tee_cmd_t; + +typedef struct _tee_msgm_msg_info_t { + tee_cmd_t cmd; + /* valid when map_shm */ + tee_msg_map_shm_info_t *msg_map_shm_info; + /* valid when op available */ + tee_msg_op_info_t *msg_op_info; +} tee_msgm_msg_info_t; + +/* vvv set_cmd_arg vvv */ +typedef TEEC_SharedMemory tee_set_cmd_map_shm_arg_t; +typedef TEEC_SharedMemory tee_set_cmd_unmap_shm_arg_t; +typedef struct _tee_set_cmd_open_ss_arg_t { + TEEC_UUID *uuid; + uint32_t meth; + TEEC_UUID data; +} tee_set_cmd_open_ss_arg_t; +typedef void *tee_set_cmd_close_ss_arg_t; +typedef struct _tee_set_cmd_inv_op_arg_t { + void *ss; + uint32_t srv_cmd; +} tee_set_cmd_inv_op_arg_t; +typedef TEEC_Operation tee_set_cmd_can_op_arg_t; +/* ^^^ set_cmd_arg ^^^ */ + +/* vvv get_cmd_arg vvv */ +typedef struct _tee_msgm_phys_memblock_t { + void *phys; + size_t size; +} tee_msgm_phys_memblock_t; +typedef struct _tee_get_cmd_map_shm_arg_t { + tee_msgm_phys_memblock_t(*arr)[]; + uint32_t arr_sz; +} tee_get_cmd_map_shm_arg_t; +typedef struct _tee_get_cmd_unmap_shm_arg_t { + void *vaddr_tw; +} tee_get_cmd_unmap_shm_arg_t; +typedef struct _tee_get_cmd_open_ss_arg_t { + TEEC_UUID *uuid; + uint32_t meth; + TEEC_UUID data; + uint32_t data_sz; +} tee_get_cmd_open_ss_arg_t; +typedef struct _tee_get_cmd_close_ss_arg_t { + void *ss; +} tee_get_cmd_close_ss_arg_t; +typedef struct _tee_get_cmd_inv_op_arg_t { + void *ss; + uint32_t srv_cmd; +} tee_get_cmd_inv_op_arg_t; +typedef struct _tee_get_cmd_can_op_arg_t { + void *ss; /* NULL for tee-ss */ + void *msg; +} tee_get_cmd_can_op_arg_t; +/* ^^^ get_cmd_arg ^^^ */ + +/* vvv get_ret_arg vvv */ +typedef struct _tee_get_ret_map_shm_arg_t { + void *vaddr_tw; + tee_stat_t ret; +} tee_get_ret_map_shm_arg_t; +typedef struct _tee_get_ret_open_ss_arg_t { + void *ss_tw; + uint32_t ret_orig; + tee_stat_t ret; +} tee_get_ret_open_ss_arg_t; +typedef struct _tee_get_ret_inv_op_arg_t { + uint32_t ret_orig; + tee_stat_t ret; +} tee_get_ret_inv_op_arg_t; +/* ^^^ get_ret_arg ^^^ */ + +/* vvv set_ret_arg vvv */ +typedef struct _tee_set_ret_map_shm_arg_t { + void *vaddr_tw; + tee_stat_t ret; +} tee_set_ret_map_shm_arg_t; +typedef struct _tee_set_ret_open_ss_arg_t { + void *ss_tw; + uint32_t ret_orig; + tee_stat_t ret; +} tee_set_ret_open_ss_arg_t; +typedef struct _tee_set_ret_inv_op_arg_t { + uint32_t ret_orig; + tee_stat_t ret; +} tee_set_ret_inv_op_arg_t; +/* ^^^ set_ret_arg ^^^ */ + +tee_msgm_t tee_msgm_create_inst(void); +/* will not destroy the msg buf */ +void tee_msgm_destroy_inst(tee_msgm_t msgm); + +/* "buf = NULL" to get the buf size first */ +/* + * the buffer does NOT include the command header. + * the header is maintained by callers. + * the typical behavior of callers is to alloc + * sizeof(tee_msg_head_t) + buf-size. + * then set "mem + sizeof(tee_msg_head_t)" as the arg, buf. + */ +tee_stat_t tee_msgm_set_msg_buf(tee_msgm_t msgm, + tee_msgm_msg_info_t *mi, uint8_t *buf, + uint32_t *size); + +tee_stat_t tee_msgm_get_cmd(tee_msgm_t msgm, tee_cmd_t *cmd, void *arg); +tee_stat_t tee_msgm_set_cmd(tee_msgm_t msgm, tee_cmd_t cmd, void *arg); + +tee_stat_t tee_msgm_set_params(tee_msgm_t msgm, tee_msg_op_info_t *params); +tee_stat_t tee_msgm_update_params(tee_msgm_t msgm, tee_msg_op_info_t *params); + +tee_stat_t tee_msgm_get_ret(tee_msgm_t msgm, void *arg); +tee_stat_t tee_msgm_set_ret(tee_msgm_t msgm, void *arg); +#endif /* _TEE_MSGM_NTW_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/inc/tee_perf.h b/arch/arm/mach-berlin/modules/tzdd/inc/tee_perf.h new file mode 100644 index 00000000..8ec3784f --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/inc/tee_perf.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#ifndef _TEE_PERF_COUNTER +#define _TEE_PERF_COUNTER + +#ifdef TEE_PERF_MEASURE +typedef struct _tee_perf_record { + char name[4]; + unsigned int value; +} tee_perf_record; + +typedef struct _tee_perf_desc { + volatile unsigned int offset; + unsigned int total; +} tee_perf_desc; + +extern void tee_perf_init(unsigned int *base); +extern void tee_prepare_record_time(void); +extern void tee_add_time_record_point(char name[4]); +extern void tee_finish_record_time(void); +#else +#define tee_perf_init(x) do { } while (0) +#define tee_prepare_record_time() do { } while (0) +#define tee_add_time_record_point(x) do { } while (0) +#define tee_finish_record_time() do {} while (0) +#endif + +#endif /* _TEE_PERF_COUNTER */ diff --git a/arch/arm/mach-berlin/modules/tzdd/inc_common/tee_cb_common.h b/arch/arm/mach-berlin/modules/tzdd/inc_common/tee_cb_common.h new file mode 100644 index 00000000..0067c613 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/inc_common/tee_cb_common.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell and you have entered into a commercial + * license agreement (a "Commercial License") with Marvell, the File is licensed + * to you under the terms of the applicable Commercial License. + * + */ +#ifndef __TEE_CB_COMMON_H__ +#define __TEE_CB_COMMON_H__ + +/* this data structure is the callback's arguments */ +typedef struct _tee_cb_arg_t +{ + int32_t nbytes; /* sizeof(args), max = 4K - sizeof(uint32_t) */ + uint8_t args[0]; /* the arguments, sizeof(args) == nbytes */ +} tee_cb_arg_t; + +#endif /* __TEE_CB_COMMON_H__ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/inc_common/tee_cb_common_local.h b/arch/arm/mach-berlin/modules/tzdd/inc_common/tee_cb_common_local.h new file mode 100644 index 00000000..41077753 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/inc_common/tee_cb_common_local.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell and you have entered into a commercial + * license agreement (a "Commercial License") with Marvell, the File is licensed + * to you under the terms of the applicable Commercial License. + * + */ +#ifndef __TEE_CB_COMMON_LOCAL_H__ +#define __TEE_CB_COMMON_LOCAL_H__ + +#include "tee_cb_common.h" + +#define TEE_CB_SHM_MAX_SZ (0x1000) + +#define TEE_CB_SRV_UUID \ + { \ + 0x00000004, 0x0000, 0x0000, \ + { \ + 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, \ + }, \ + } + +#define TEE_CB_FETCH_REQ (0x12345678) +#define TEE_CB_TRIGGER_STOP (0x87654321) + +/* + * this ctrl-bit indicates unreg-cb happens in ntw. + * set by ntw and read by tw. + */ +#define TEE_CB_CTRL_BIT_DYING (0x00000001) +/* + * this ctrl-bit means a fake call from tw to ntw. + * no need to call ntw callback actually. + * set by tw and read by ntw. + */ +#define TEE_CB_CTRL_BIT_FAKE (0x00010000) + +/* indicator for NULL arg when calling ntw */ +#define TEE_CB_ARG_NULL (-1) +#define TEE_CB_IS_ARG_NULL(_n) (TEE_CB_ARG_NULL == (_n)) + +#endif /* __TEE_CB_COMMON_LOCAL_H__ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/inc_common/tee_client_api.h b/arch/arm/mach-berlin/modules/tzdd/inc_common/tee_client_api.h new file mode 100644 index 00000000..ad080397 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/inc_common/tee_client_api.h @@ -0,0 +1,181 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#ifndef _TEE_CLIENT_API_H_ +#define _TEE_CLIENT_API_H_ + +#include "teec_types.h" + +/* + * Constants + */ +#define TEEC_CONFIG_SHAREDMEM_MAX_SIZE (0x8000000) /* 128MB */ + +/* + * API Error Codes + */ +#define TEEC_SUCCESS (0x00000000) +#define TEEC_ERROR_GENERIC (0xFFFF0000) +#define TEEC_ERROR_ACCESS_DENIED (0xFFFF0001) +#define TEEC_ERROR_CANCEL (0xFFFF0002) +#define TEEC_ERROR_ACCESS_CONFLICT (0xFFFF0003) +#define TEEC_ERROR_EXCESS_DATA (0xFFFF0004) +#define TEEC_ERROR_BAD_FORMAT (0xFFFF0005) +#define TEEC_ERROR_BAD_PARAMETERS (0xFFFF0006) +#define TEEC_ERROR_BAD_STATE (0xFFFF0007) +#define TEEC_ERROR_ITEM_NOT_FOUND (0xFFFF0008) +#define TEEC_ERROR_NOT_IMPLEMENTED (0xFFFF0009) +#define TEEC_ERROR_NOT_SUPPORTED (0xFFFF000A) +#define TEEC_ERROR_NO_DATA (0xFFFF000B) +#define TEEC_ERROR_OUT_OF_MEMORY (0xFFFF000C) +#define TEEC_ERROR_BUSY (0xFFFF000D) +#define TEEC_ERROR_COMMUNICATION (0xFFFF000E) +#define TEEC_ERROR_SECURITY (0xFFFF000F) +#define TEEC_ERROR_SHORT_BUFFER (0xFFFF0010) +#define TEEC_ERROR_TARGET_DEAD (0xFFFF3024) + +/* + * Login Type Constants + */ +#define TEEC_LOGIN_PUBLIC (0x00000000) +#define TEEC_LOGIN_USER (0x00000001) +#define TEEC_LOGIN_GROUP (0x00000002) +#define TEEC_LOGIN_APPLICATION (0x00000004) + +/* + * Return Code for returnOrigins + */ +#define TEEC_ORIGIN_API (0x00000001) +#define TEEC_ORIGIN_COMMS (0x00000002) +#define TEEC_ORIGIN_TEE (0x00000003) +#define TEEC_ORIGIN_TRUSTED_APP (0x00000004) + +/* + * Parameter Types for paramTypes arg + */ +#define TEEC_NONE (0x00000000) +#define TEEC_VALUE_INPUT (0x00000001) +#define TEEC_VALUE_OUTPUT (0x00000002) +#define TEEC_VALUE_INOUT (0x00000003) +#define TEEC_MEMREF_TEMP_INPUT (0x00000005) +#define TEEC_MEMREF_TEMP_OUTPUT (0x00000006) +#define TEEC_MEMREF_TEMP_INOUT (0x00000007) +#define TEEC_MEMREF_WHOLE (0x0000000C) +#define TEEC_MEMREF_PARTIAL_INPUT (0x0000000D) +#define TEEC_MEMREF_PARTIAL_OUTPUT (0x0000000E) +#define TEEC_MEMREF_PARTIAL_INOUT (0x0000000F) + +/* + * Session Login Methods + */ +#define TEEC_LOGIN_PUBLIC (0x00000000) +#define TEEC_LOGIN_USER (0x00000001) +#define TEEC_LOGIN_GROUP (0x00000002) +#define TEEC_LOGIN_APPLICATION (0x00000004) +#define TEEC_LOGIN_USER_APPLICATION (0x00000005) +#define TEEC_LOGIN_GROUP_APPLICATION (0x00000006) + +#define TEEC_PARAM_TYPES(t0, t1, t2, t3) \ + ((t0) | ((t1) << 4) | ((t2) << 8) | ((t3) << 12)) +#define TEEC_PARAM_TYPE_GET(t, i) (((t) >> (i*4)) & 0xF) + +/* + * Shared Memory Control Flags + */ +#define TEEC_MEM_INPUT (0x00000001) +#define TEEC_MEM_OUTPUT (0x00000002) + +typedef uint32_t TEEC_Result; +typedef void *TEEC_MRVL_Context; +typedef void *TEEC_MRVL_Session; +typedef void *TEEC_MRVL_SharedMemory; +typedef void *TEEC_MRVL_Operation; + +typedef struct { + uint32_t timeLow; + uint16_t timeMid; + uint16_t timeHiAndVersion; + uint8_t clockSeqAndNode[8]; +} TEEC_UUID; + +typedef struct { + TEEC_MRVL_Context imp; +} TEEC_Context; + +typedef struct { + TEEC_MRVL_Session imp; +} TEEC_Session; + +typedef struct { + void *buffer; + size_t size; + uint32_t flags; + TEEC_MRVL_SharedMemory imp; +} TEEC_SharedMemory; + +typedef struct { + void *buffer; + size_t size; +} TEEC_TempMemoryReference; + +typedef struct { + TEEC_SharedMemory *parent; + size_t size; + size_t offset; +} TEEC_RegisteredMemoryReference; + +typedef struct { + uint32_t a; + uint32_t b; +} TEEC_Value; + +typedef union { + TEEC_TempMemoryReference tmpref; + TEEC_RegisteredMemoryReference memref; + TEEC_Value value; +} TEEC_Parameter; + +typedef struct { + uint32_t started; + uint32_t paramTypes; + TEEC_Parameter params[4]; + TEEC_MRVL_Operation imp; +} TEEC_Operation; + + +TEEC_Result TEEC_InitializeContext(const char *name, TEEC_Context *context); +void TEEC_FinalizeContext(TEEC_Context *context); +TEEC_Result TEEC_RegisterSharedMemory(TEEC_Context *context, + TEEC_SharedMemory *sharedMem); +TEEC_Result TEEC_AllocateSharedMemory(TEEC_Context *context, + TEEC_SharedMemory *sharedMem); +void TEEC_ReleaseSharedMemory(TEEC_SharedMemory *sharedMem); +TEEC_Result TEEC_OpenSession(TEEC_Context *context, TEEC_Session *session, + const TEEC_UUID *destination, + uint32_t connectionMethod, + const void *connectionData, + TEEC_Operation *operation, + uint32_t *returnOrigin); +void TEEC_CloseSession(TEEC_Session *session); +TEEC_Result TEEC_InvokeCommand(TEEC_Session *session, uint32_t commandID, + TEEC_Operation *operation, + uint32_t *returnOrigin); +void TEEC_RequestCancellation(TEEC_Operation *operation); + +#endif /* _TEE_CLIENT_API_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/inc_common/teec_cb.h b/arch/arm/mach-berlin/modules/tzdd/inc_common/teec_cb.h new file mode 100644 index 00000000..65bfaaf4 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/inc_common/teec_cb.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#ifndef __TEEC_CB_H__ +#define __TEEC_CB_H__ + +#include "teec_types.h" +#include "tee_client_api.h" +#include "tee_cb_common.h" + +/* alias */ +typedef TEEC_UUID teec_cb_uuid_t; +typedef TEEC_Result teec_cb_stat_t; + +/* context in non-trust world */ +typedef void *teec_cb_cntx_t; +/* callback handle */ +typedef void *teec_cb_handle_t; + +/* callback function type */ +typedef teec_cb_stat_t (*teec_cb_fn_t)(tee_cb_arg_t *, teec_cb_cntx_t); + +/* the function should be called before tee_cb_call_ntw is invoked. */ +teec_cb_handle_t teec_reg_cb(const teec_cb_uuid_t *uuid, + teec_cb_fn_t func, teec_cb_cntx_t cntx); +/* once unregistering, the uuid call will be invalid. */ +void teec_unreg_cb(teec_cb_handle_t handle); + +#endif /* __TEEC_CB_H__ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/inc_common/teec_types.h b/arch/arm/mach-berlin/modules/tzdd/inc_common/teec_types.h new file mode 100644 index 00000000..c22c35eb --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/inc_common/teec_types.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#ifndef _TEEC_TYPES_H_ +#define _TEEC_TYPES_H_ + +#include "tzdd_types.h" + +#endif /* _TEEC_TYPES_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/inc_common/tz-addr-map.h b/arch/arm/mach-berlin/modules/tzdd/inc_common/tz-addr-map.h new file mode 100644 index 00000000..5e900cf8 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/inc_common/tz-addr-map.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#ifndef __TZ_ADDR_MAP_H__ +#define __TZ_ADDR_MAP_H__ + +#define RA_PHYS_ADDR (0x00000000) +#define RA_SIZE (0x00E00000) + +#define RB_PHYS_ADDR (0x00E00000) +#define RB_SIZE (0x00100000) + +#define RC_PHYS_ADDR (0x00F00000) +#define RC_SIZE (0x00100000) + +#ifdef TEE_PERF_MEASURE +#define PERF_BUF_ADDR (0x01000000) +#define PERF_BUF_SIZE (0x01000000) +#endif + +#endif /* __TZ_ADDR_MAP__ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/inc_common/tzdd_ioctl.h b/arch/arm/mach-berlin/modules/tzdd/inc_common/tzdd_ioctl.h new file mode 100644 index 00000000..f7819d7a --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/inc_common/tzdd_ioctl.h @@ -0,0 +1,120 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#ifndef _TZDD_IOCTL_H_ +#define _TZDD_IOCTL_H_ + +#include "tee_client_api.h" + +#define OPERATION_EXIST (1) +#define OPERATION_NON_EXIST (0) + +typedef struct { + const char *name; + tee_impl tee_ctx_ntw; + uint32_t ret; +} teec_init_context_args; + +typedef struct { + tee_impl tee_ctx_ntw; + uint32_t ret; +} teec_final_context_args; + +/* allocate and register use the same structure */ +typedef struct { + tee_impl tee_ctx_ntw; + void *buffer; + size_t size; + uint32_t flags; + tee_impl tee_shm_ntw; + uint32_t ret; +} teec_map_shared_mem_args; + +typedef struct { + void *buffer; + size_t size; + uint32_t flags; + tee_impl tee_shm_ntw; + uint32_t ret; +} teec_unmap_shared_mem_args; + +typedef struct { + tee_impl tee_ctx_ntw; + tee_impl tee_ss_ntw; + const TEEC_UUID *destination; + uint32_t connectionMethod; + const void *connectionData; + /* if the openSS includes the TEE_Operation, + * the flag should be set to 1. + * if flag=1, that means driver need to allomate tee_op_ntw + */ + uint32_t flags; + uint32_t paramTypes; + TEEC_Parameter params[4]; + tee_impl tee_op_ntw; + tee_impl tee_op_ntw_for_cancel; + uint32_t returnOrigin; + uint32_t ret; +} teec_open_ss_args; + +typedef struct { + tee_impl tee_ss_ntw; + uint32_t ret; +} teec_close_ss_args; + +typedef struct { + tee_impl tee_ss_ntw; + uint32_t cmd_ID; + uint32_t started; + /* if flag=1, that means driver need to allomate tee_op_ntw */ + uint32_t flags; + uint32_t paramTypes; + TEEC_Parameter params[4]; + tee_impl tee_op_ntw; + tee_impl tee_op_ntw_for_cancel; + uint32_t returnOrigin; + uint32_t ret; +} teec_invoke_cmd_args; + +typedef struct { + tee_impl tee_op_ntw; + uint32_t ret; +} teec_requeset_cancel_args; + +#define TEEC_IOCTL_MAGIC 't' + +#define TEEC_INIT_CONTEXT _IOW(TEEC_IOCTL_MAGIC, 0, unsigned int) + +#define TEEC_FINAL_CONTEXT _IOW(TEEC_IOCTL_MAGIC, 1, unsigned int) + +#define TEEC_REGIST_SHARED_MEM _IOW(TEEC_IOCTL_MAGIC, 2, unsigned int) + +#define TEEC_ALLOC_SHARED_MEM _IOW(TEEC_IOCTL_MAGIC, 3, unsigned int) + +#define TEEC_RELEASE_SHARED_MEM _IOW(TEEC_IOCTL_MAGIC, 4, unsigned int) + +#define TEEC_OPEN_SS _IOW(TEEC_IOCTL_MAGIC, 5, unsigned int) + +#define TEEC_CLOSE_SS _IOW(TEEC_IOCTL_MAGIC, 6, unsigned int) + +#define TEEC_INVOKE_CMD _IOW(TEEC_IOCTL_MAGIC, 7, unsigned int) + +#define TEEC_REQUEST_CANCEL _IOW(TEEC_IOCTL_MAGIC, 8, unsigned int) + +#endif /* _TZDD_IOCTL_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/inc_common/tzdd_types.h b/arch/arm/mach-berlin/modules/tzdd/inc_common/tzdd_types.h new file mode 100644 index 00000000..d347af9e --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/inc_common/tzdd_types.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#ifndef _TZDD_TYPES_H_ +#define _TZDD_TYPES_H_ + +#include + +typedef void *tee_impl; + +#endif /* _TZDD_TYPES_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/main/teec_cb.c b/arch/arm/mach-berlin/modules/tzdd/main/teec_cb.c new file mode 100644 index 00000000..5d464270 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/main/teec_cb.c @@ -0,0 +1,368 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#include "teec_types.h" +#include "tee_cb_common_local.h" +#include "teec_cb.h" +#include "osa.h" +#include "tzdd_internal.h" + +#define INIT_CB_MAGIC(_m) do { \ + (_m)[0] = 'T'; \ + (_m)[1] = 'e'; \ + (_m)[2] = 'C'; \ + (_m)[3] = 'b'; \ + } while (0) +#define CLEANUP_CB_MAGIC(_m) do { \ + (_m)[0] = 0; \ + (_m)[1] = 0; \ + (_m)[2] = 0; \ + (_m)[3] = 0; \ + } while (0) +#define IS_CB_MAGIC_VALID(_m) (('T' == (_m)[0]) && \ + ('e' == (_m)[1]) && \ + ('C' == (_m)[2]) && \ + ('b' == (_m)[3])) + +#define TEE_CB_DBG + +#ifdef TEE_CB_DBG +#define _teec_cb_err_log(_f, _a...) osa_dbg_print(DBG_ERR, _f, ##_a) +#define _teec_cb_dbg_log(_f, _a...) osa_dbg_print(DBG_INFO, _f, ##_a) +#else /* !TEE_CB_DBG */ +#define _teec_cb_dbg_log(_f, _a...) +#endif /* TEE_CB_DBG */ + +typedef struct __teec_cb_struct_t +{ + /* mgmt */ + uint8_t magic[4]; + osa_list_t node; + osa_mutex_t lock; + osa_mutex_t ready; /* create/destroy by api, post by worker */ + teec_cb_stat_t err; /* returned by worker to api when init-ing */ + bool stop; /* stop flag */ + + /* data xchg */ + void *shm; /* set in worker */ + + /* data */ + teec_cb_uuid_t uuid; + teec_cb_fn_t func; + teec_cb_cntx_t cntx; + osa_thread_t worker; +} _teec_cb_struct_t; + +static TEEC_Context _g_cb_cntx; /* no lock */ + +static OSA_LIST(_g_cb_list); +static osa_mutex_t _g_cb_list_lock; + +static const TEEC_UUID _g_cb_uuid = TEE_CB_SRV_UUID; + +static void _teec_cb_worker(void *arg) +{ + _teec_cb_struct_t *cb; + bool is_stop; + + TEEC_SharedMemory shm; + TEEC_Session ss; + TEEC_Operation op; + TEEC_Result res; + + osa_err_t err; + teec_cb_stat_t ret; + + OSA_ASSERT(arg); + cb = (_teec_cb_struct_t *)arg; + OSA_ASSERT(IS_CB_MAGIC_VALID(cb->magic)); + + memset(&shm, 0, sizeof(TEEC_SharedMemory)); + shm.buffer = NULL; + shm.size = TEE_CB_SHM_MAX_SZ; + shm.flags = TEEC_MEM_INPUT | TEEC_MEM_OUTPUT; + res = TEEC_AllocateSharedMemory(&_g_cb_cntx, &shm); + if (res) { + _teec_cb_err_log("ERROR - alloc shm err = 0x%08x in %s\n", + res, __func__); + cb->err = res; + osa_release_mutex(cb->ready); + return; + } + + /* + * open-ss: + * +-----------+--------+------+------+ + * | tmpRefMem | memRef | none | none | + * | cb_uuid | args | | | + * +-----------+--------+------+------+ + */ + memset(&op, 0, sizeof(TEEC_Operation)); + op.paramTypes = TEEC_PARAM_TYPES( + TEEC_MEMREF_TEMP_INPUT, TEEC_MEMREF_WHOLE, TEEC_NONE, TEEC_NONE); + op.params[0].tmpref.buffer = &cb->uuid; + op.params[0].tmpref.size = sizeof(teec_cb_uuid_t); + op.params[1].memref.parent = &shm; + op.params[1].memref.size = TEE_CB_SHM_MAX_SZ; + op.params[1].memref.offset = 0; + + res = TEEC_OpenSession(&_g_cb_cntx, &ss, + &_g_cb_uuid, MRVL_LOGIN_APPLICATION_DAEMON, + NULL, &op, NULL); + if (res) { + _teec_cb_err_log("ERROR - open ss err = 0x%08x in %s\n", res, __func__); + TEEC_ReleaseSharedMemory(&shm); + cb->err = res; + osa_release_mutex(cb->ready); + return; + } + + /* release reg-api */ + cb->err = TEEC_SUCCESS; + + /* *BEFORE* releasing cb->ready, cb->lock is a must */ + + err = osa_wait_for_mutex(cb->lock, INFINITE); + OSA_ASSERT(OSA_OK == err); + + osa_release_mutex(cb->ready); + + /* now ready to trap in tw */ + ret = TEEC_SUCCESS; + while (1) { + is_stop = cb->stop; + /* + * inv-op: + * +-------+------+------+------+ + * | val.a | none | none | none | + * | ret | | | | + * | val.b | | | | + * | ctrl | | | | + * +-------+------+------+------+ + */ + memset(&op, 0, sizeof(TEEC_Operation)); + op.paramTypes = TEEC_PARAM_TYPES( + TEEC_VALUE_INOUT, TEEC_NONE, TEEC_NONE, TEEC_NONE); + op.params[0].value.a = ret; + if (is_stop) { + op.params[0].value.b = TEE_CB_CTRL_BIT_DYING; /* stop-flag */ + } + + osa_release_mutex(cb->lock); + + res = TEEC_InvokeCommand(&ss, TEE_CB_FETCH_REQ, &op, NULL); + OSA_ASSERT(res == TEEC_SUCCESS); + + err = osa_wait_for_mutex(cb->lock, INFINITE); + OSA_ASSERT(OSA_OK == err); + + /* + * NOTE + * here comes is_stop rather than cp->stop + * we need to let tw know stop-flag first + * so tw-callers will not hang + */ + if (!is_stop && res) { + /* FIXME how to handle this err? */ + continue; + } + + if (!is_stop) { + if (!(TEE_CB_CTRL_BIT_FAKE & op.params[0].value.b)) { + /* functionality flow */ + if (TEE_CB_IS_ARG_NULL(((tee_cb_arg_t *)shm.buffer)->nbytes)) { + ret = cb->func(NULL, cb->cntx); + } else { + ret = cb->func(shm.buffer, cb->cntx); + } + } else { + /* no real call for fake ntw-calling */ + ret = TEEC_SUCCESS; + } + } else { + /* for real exit*/ + osa_release_mutex(cb->lock); + break; + } + } + + TEEC_CloseSession(&ss); + TEEC_ReleaseSharedMemory(&shm); +} + +teec_cb_handle_t teec_reg_cb(const teec_cb_uuid_t *uuid, + teec_cb_fn_t func, teec_cb_cntx_t cntx) +{ + _teec_cb_struct_t *cb; + osa_list_t *entry; + bool found = false; + struct osa_thread_attr attr; + osa_err_t err; + + if ((NULL == uuid) || (NULL == func)) { + _teec_cb_err_log("ERROR - invalid param(s) in %s\n", __func__); + return NULL; + } + + err =osa_wait_for_mutex(_g_cb_list_lock, INFINITE); + OSA_ASSERT(OSA_OK == err); + + osa_list_iterate(&_g_cb_list, entry) { + OSA_LIST_ENTRY(entry, _teec_cb_struct_t, node, cb); + if (!memcmp(uuid, &cb->uuid, sizeof(teec_cb_uuid_t))) { + found = true; + break; + } + } + + if (found) { + osa_release_mutex(_g_cb_list_lock); + _teec_cb_err_log("ERROR - uuid has been reg-ed in %s\n", __func__); + return NULL; + } + + cb = osa_kmem_alloc(sizeof(_teec_cb_struct_t)); + OSA_ASSERT(cb); + + INIT_CB_MAGIC(cb->magic); + memcpy(&cb->uuid, uuid, sizeof(teec_cb_uuid_t)); + cb->func = func; + cb->cntx = cntx; + cb->lock = osa_create_mutex(); + OSA_ASSERT(cb->lock); + cb->ready = osa_create_mutex_locked(); + OSA_ASSERT(cb->ready); + cb->stop = false; + attr.name = "tee-cb"; + attr.prio = 0; /* highest prio */ + attr.stack_addr = NULL; /* not used */ + attr.stack_size = 0; /* not used */ + cb->worker = osa_create_thread(_teec_cb_worker, cb, &attr); + OSA_ASSERT(cb->worker); + + err = osa_wait_for_mutex(cb->ready, INFINITE); + OSA_ASSERT(OSA_OK == err); + + if (cb->err) { + /* cb is not available so safe to free list-lock */ + osa_release_mutex(_g_cb_list_lock); + + /* free res, no lock req */ + osa_destroy_thread(cb->worker); + osa_destroy_mutex(cb->ready); + osa_destroy_mutex(cb->lock); + CLEANUP_CB_MAGIC(cb->magic); + osa_kmem_free(cb); + + return NULL; + } else { + osa_list_add(&cb->node, &_g_cb_list); + osa_release_mutex(_g_cb_list_lock); + return (teec_cb_handle_t)cb; + } +} +EXPORT_SYMBOL(teec_reg_cb); + +void teec_unreg_cb(teec_cb_handle_t handle) +{ + _teec_cb_struct_t *cb; + TEEC_Session ss; + TEEC_Operation op; + TEEC_Result res; + osa_err_t err; + + if (NULL == handle) { + _teec_cb_err_log("ERROR - invalid param(s) in %s\n", __func__); + return; + } + + err = osa_wait_for_mutex(_g_cb_list_lock, INFINITE); + OSA_ASSERT(OSA_OK == err); + + cb = (_teec_cb_struct_t *)handle; + if (!IS_CB_MAGIC_VALID(cb->magic)) { + osa_release_mutex(_g_cb_list_lock); + _teec_cb_err_log("ERROR - invalid param(s) in %s\n", __func__); + return; + } + + /* cb lock should be acquired before releasing cb-list-lock */ + err = osa_wait_for_mutex(cb->lock, INFINITE); + OSA_ASSERT(OSA_OK == err); + osa_list_del(&cb->node); + /* make cb invalid before release list-lock */ + CLEANUP_CB_MAGIC(cb->magic); + /* no cb now, safe to unlick list */ + osa_release_mutex(_g_cb_list_lock); + + /* set stop */ + cb->stop = true; + osa_release_mutex(cb->lock); + + /* + * open-ss: + * +-----------+------+------+------+ + * | tmpRefMem | none | none | none | + * | cb_uuid | | | | + * +-----------+------+------+------+ + * + * the 2nd param is none for trig-stop ss. + */ + memset(&op, 0, sizeof(TEEC_Operation)); + op.paramTypes = TEEC_PARAM_TYPES( + TEEC_MEMREF_TEMP_INPUT, TEEC_NONE, TEEC_NONE, TEEC_NONE); + op.params[0].tmpref.buffer = &cb->uuid; + op.params[0].tmpref.size = sizeof(teec_cb_uuid_t); + res = TEEC_OpenSession(&_g_cb_cntx, &ss, + &_g_cb_uuid, TEEC_LOGIN_APPLICATION, NULL, &op, NULL); + if (TEEC_SUCCESS == res) { + (void)TEEC_InvokeCommand(&ss, TEE_CB_TRIGGER_STOP, NULL, NULL); + TEEC_CloseSession(&ss); + } else { + /* FIXME - may hang here, no solution */ + } + + /* free res */ + osa_destroy_thread(cb->worker); + osa_destroy_mutex(cb->ready); + osa_destroy_mutex(cb->lock); + osa_kmem_free(cb); +} +EXPORT_SYMBOL(teec_unreg_cb); + +teec_cb_stat_t teec_cb_module_init(void) +{ + TEEC_Result res = TEEC_InitializeContext(NULL, &_g_cb_cntx); + if (res) { + _teec_cb_err_log("ERROR - init cntx err = 0x%08x in %s\n", + res, __func__); + return res; + } + _g_cb_list_lock = osa_create_mutex(); + OSA_ASSERT(_g_cb_list_lock); + return TEEC_SUCCESS; +} + +void teec_cb_module_cleanup(void) +{ + /* we do not cover list-not-empty case */ + OSA_ASSERT(osa_list_empty(&_g_cb_list)); + osa_destroy_mutex(_g_cb_list_lock); + TEEC_FinalizeContext(&_g_cb_cntx); +} diff --git a/arch/arm/mach-berlin/modules/tzdd/main/teec_cb_local.h b/arch/arm/mach-berlin/modules/tzdd/main/teec_cb_local.h new file mode 100644 index 00000000..5e047168 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/main/teec_cb_local.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#ifndef __TEEC_CB_LOCAL_H__ +#define __TEEC_CB_LOCAL_H__ + +#include "teec_cb.h" + +teec_cb_stat_t teec_cb_module_init(void); +void teec_cb_module_cleanup(void); + +#endif /* __TEEC_CB_LOCAL_H__ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/main/teec_client_api.c b/arch/arm/mach-berlin/modules/tzdd/main/teec_client_api.c new file mode 100644 index 00000000..fa8034ce --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/main/teec_client_api.c @@ -0,0 +1,1208 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#include "tzdd_internal.h" + +#define INIT_MAGIC(_n) \ + do { \ + ((uint8_t *)_n)[0] = 'T'; \ + ((uint8_t *)_n)[1] = 'Z'; \ + ((uint8_t *)_n)[2] = 'D'; \ + ((uint8_t *)_n)[3] = 'D'; \ + } while (0) + +#define IS_MAGIC_VALID(_n) \ + (('T' == ((uint8_t *)_n)[0]) && \ + ('Z' == ((uint8_t *)_n)[1]) && \ + ('D' == ((uint8_t *)_n)[2]) && \ + ('D' == ((uint8_t *)_n)[3])) + +#define CLEANUP_MAGIC(_n) \ + do { \ + ((uint8_t *)_n)[0] = '\0'; \ + ((uint8_t *)_n)[1] = '\0'; \ + ((uint8_t *)_n)[2] = '\0'; \ + ((uint8_t *)_n)[3] = '\0'; \ + } while (0) + +#define INIT_MSG_MAGIC(_m) \ + do { \ + _m[0] = 'M'; \ + _m[1] = 's'; \ + _m[2] = 'G'; \ + _m[3] = 'm'; \ + } while (0) +#define IS_MSG_MAGIC_VALID(_m) \ + (('M' == _m[0]) && \ + ('s' == _m[1]) && \ + ('G' == _m[2]) && \ + ('m' == _m[3])) +#define CLEANUP_MSG_MAGIC(_m) \ + do { \ + _m[0] = _m[1] = _m[2] = _m[3] = 0;\ + } while (0) + +#define CA_AOLLC_BUF (1) +#define DRV_AOLLC_BUF (2) + +#define NO_SET (0) +#define INC_ATOMIC (1) +#define DEC_ATOMIC (2) + +#define OP_PARAM_NUM (4) + +static TEEC_Result _set_sharedMem_atomic( + tee_impl tee_ctx_ntw, + TEEC_Operation *operation, + uint32_t set_atomic_flag) +{ + uint32_t param_types; + uint32_t i, tmp; + _TEEC_MRVL_SharedMemory *_teec_mrvl_sharedMem; + + param_types = operation->paramTypes; + + for (i = 0; i < OP_PARAM_NUM; i++) { + tmp = TEEC_PARAM_TYPE_GET(param_types, i); + if (tmp == TEEC_NONE) { + continue; + } else { + switch (tmp) { + case TEEC_MEMREF_WHOLE: + case TEEC_MEMREF_PARTIAL_INPUT: + case TEEC_MEMREF_PARTIAL_OUTPUT: + case TEEC_MEMREF_PARTIAL_INOUT: + { + TEEC_RegisteredMemoryReference memref; + memref = operation->params[i].memref; + if (!memref.parent) + OSA_ASSERT(0); + + _teec_mrvl_sharedMem = + (_TEEC_MRVL_SharedMemory *) + (memref.parent->imp); + if (!(IS_MAGIC_VALID( + _teec_mrvl_sharedMem->magic))) + OSA_ASSERT(0); +#ifdef SHAREDMEM_CONTEXT_CHECKING + if (_teec_mrvl_sharedMem->tee_ctx_ntw != + tee_ctx_ntw) + return TEEC_ERROR_BAD_PARAMETERS; +#endif + if (set_atomic_flag == INC_ATOMIC) + osa_atomic_inc( + &(_teec_mrvl_sharedMem->count)); + else if (set_atomic_flag == DEC_ATOMIC) + osa_atomic_dec( + &(_teec_mrvl_sharedMem->count)); + } + break; + default: + break; + } + } + + } + + return TEEC_SUCCESS; +} + +static tee_msg_head_t *_init_msg_head(uint8_t *tee_msg_buf, uint32_t buf_size) +{ + tee_msg_head_t *tee_msg_head = (tee_msg_head_t *)tee_msg_buf; + INIT_MSG_MAGIC(tee_msg_head->magic); + tee_msg_head->msg_sz = buf_size; + tee_msg_head->msg_prop.value = 0; + tee_msg_head->msg_prop.bp.stat = TEE_MSG_STAT_REQ; + tee_msg_head->tee_msg = (void *)tee_msg_buf; + tee_msg_head->comp = osa_create_sem(0); + tee_msg_head->reserved = NULL; + + return tee_msg_head; +} + +static TEEC_Result _teec_map_memory(TEEC_SharedMemory *sharedMem, + tee_get_ret_map_shm_arg_t *tee_get_ret) +{ + tee_msgm_t tee_msgm_handle; + tee_cmd_t tee_msg_cmd; + tee_set_cmd_map_shm_arg_t *tee_msg_set_cmd_map_shm_arg; + tee_stat_t tee_msg_stat; + uint32_t buf_size; + tee_msgm_msg_info_t tee_msg_info; + + uint8_t *tee_msg_buf; + tee_msg_head_t *tee_msg_head; + + /* prepare the request, create the msg and add it to the msgQ */ + tee_msgm_handle = tee_msgm_create_inst(); + if (!tee_msgm_handle) + OSA_ASSERT(0); + + tee_msg_info.cmd = TEE_CMD_MAP_SHM; + tee_msg_info.msg_map_shm_info = sharedMem; + tee_msg_info.msg_op_info = NULL; + + /* Get buffer size */ + tee_msg_stat = + tee_msgm_set_msg_buf(tee_msgm_handle, &tee_msg_info, NULL, + &buf_size); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + tee_msg_buf = osa_kmem_alloc(sizeof(tee_msg_head_t) + buf_size); + if (!tee_msg_buf) { + tee_msgm_destroy_inst(tee_msgm_handle); + return TEEC_ERROR_OUT_OF_MEMORY; + } + + /* give the buffer to Msgm */ + tee_msg_stat = + tee_msgm_set_msg_buf(tee_msgm_handle, NULL, + tee_msg_buf + sizeof(tee_msg_head_t), + &buf_size); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + /* init head_t */ + tee_msg_head = _init_msg_head(tee_msg_buf, buf_size); + + /* set cmd body */ + tee_msg_cmd = TEE_CMD_MAP_SHM; + tee_msg_set_cmd_map_shm_arg = sharedMem; + + tee_msg_stat = + tee_msgm_set_cmd(tee_msgm_handle, tee_msg_cmd, + tee_msg_set_cmd_map_shm_arg); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + tzdd_add_node_to_req_list(&(tee_msg_head->node)); + + /* Wake up PT */ + osa_release_sem(tzdd_dev->pt_sem); + /* osa_wakeup_process(tzdd_dev->proxy_thd); */ + + /* Wait for the mutex, PT will wake it up */ + osa_wait_for_sem(tee_msg_head->comp, INFINITE); + + osa_destroy_sem(tee_msg_head->comp); + + /* deal with the response */ + if (!(IS_MSG_MAGIC_VALID(tee_msg_head->magic))) + OSA_ASSERT(0); + + /* Get return */ + tee_msg_stat = tee_msgm_get_ret(tee_msgm_handle, (void *)tee_get_ret); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + osa_kmem_free(tee_msg_buf); + tee_msgm_destroy_inst(tee_msgm_handle); + + return tee_msg_stat; +} + +static void _teec_generate_connection_data(uint32_t connectionMethod, + tee_set_cmd_open_ss_arg_t *tee_msg_set_cmd_open_ss_arg) +{ + tee_msg_set_cmd_open_ss_arg->meth = connectionMethod; + + switch (connectionMethod) { + case TEEC_LOGIN_PUBLIC: + { + memset(&(tee_msg_set_cmd_open_ss_arg->data), 0, + sizeof(TEEC_UUID)); + } + break; + case TEEC_LOGIN_USER: + { + memset(&(tee_msg_set_cmd_open_ss_arg->data), 0, + sizeof(TEEC_UUID)); + tee_msg_set_cmd_open_ss_arg->data.timeLow = + current_uid(); + } + break; + case TEEC_LOGIN_GROUP: + { + memset(&(tee_msg_set_cmd_open_ss_arg->data), 0, + sizeof(TEEC_UUID)); + tee_msg_set_cmd_open_ss_arg->data.timeLow = + current_gid(); + } + break; + case TEEC_LOGIN_APPLICATION: + { + memset(&(tee_msg_set_cmd_open_ss_arg->data), 0, + sizeof(TEEC_UUID)); + tee_msg_set_cmd_open_ss_arg->data.timeLow = + current_euid(); + } + break; + case TEEC_LOGIN_USER_APPLICATION: + { + memset(&(tee_msg_set_cmd_open_ss_arg->data), 0, + sizeof(TEEC_UUID)); + tee_msg_set_cmd_open_ss_arg->data.timeLow = + (current_uid() << 16 | current_euid()); + } + break; + case TEEC_LOGIN_GROUP_APPLICATION: + { + memset(&(tee_msg_set_cmd_open_ss_arg->data), 0, + sizeof(TEEC_UUID)); + tee_msg_set_cmd_open_ss_arg->data.timeLow = + (current_gid() << 16 | current_euid()); + } + break; + case MRVL_LOGIN_APPLICATION_DAEMON: + { + memset(&(tee_msg_set_cmd_open_ss_arg->data), 0, + sizeof(TEEC_UUID)); + /* add more in the future */ + } + break; + default: + /* never be here */ + OSA_ASSERT(0); + break; + } + + return; +} + +TEEC_Result TEEC_InitializeContext(const char *name, TEEC_Context *context) +{ + _TEEC_MRVL_Context *_teec_mrvl_context; + +#ifdef TEE_PERF_MEASURE + /* Since performance measure is base on core level PMU registers. + * So we put all processors on core 0, the same core as PT. + */ + set_cpus_allowed_ptr(current, cpumask_of(0)); +#endif + + if (name && (osa_memcmp(name, DEVICE_NAME, DEVICE_NAME_SIZE))) + return TEEC_ERROR_BAD_PARAMETERS; + + if (!context) + return TEEC_ERROR_BAD_PARAMETERS; + + context->imp = osa_kmem_alloc(sizeof(_TEEC_MRVL_Context)); + if (!(context->imp)) + return TEEC_ERROR_OUT_OF_MEMORY; + + _teec_mrvl_context = (_TEEC_MRVL_Context *) (context->imp); + INIT_MAGIC(_teec_mrvl_context->magic); + + osa_atomic_set(&(_teec_mrvl_context->count), 0); + _teec_mrvl_context->tee_ctx_ntw = context; + + tee_prepare_record_time(); + + return TEEC_SUCCESS; +} + +void TEEC_FinalizeContext(TEEC_Context *context) +{ + int32_t count; + _TEEC_MRVL_Context *_teec_mrvl_context; + + if (!context) + return; + + tee_finish_record_time(); + + _teec_mrvl_context = (_TEEC_MRVL_Context *) (context->imp); + TZDD_DBG("_teec_final_context name = %c%c%c%c\n", + _teec_mrvl_context->magic[0], + _teec_mrvl_context->magic[1], + _teec_mrvl_context->magic[2], + _teec_mrvl_context->magic[3]); + + if (!(IS_MAGIC_VALID(_teec_mrvl_context->magic))) + OSA_ASSERT(0); + + CLEANUP_MAGIC(_teec_mrvl_context->magic); + + count = osa_atomic_read(&(_teec_mrvl_context->count)); + if (count != 0) + OSA_ASSERT(0); + + osa_kmem_free(context->imp); + return; +} + +TEEC_Result TEEC_RegisterSharedMemory(TEEC_Context *context, + TEEC_SharedMemory *sharedMem) +{ + TEEC_Result tee_result = TEEC_SUCCESS; + TEEC_Result tee_msg_stat; + _TEEC_MRVL_Context *_teec_mrvl_context; + _TEEC_MRVL_SharedMemory *_teec_mrvl_sharedMem; + + tee_get_ret_map_shm_arg_t tee_get_ret; + + if (!context || !sharedMem || !(sharedMem->buffer)) + return TEEC_ERROR_BAD_PARAMETERS; + + if ((sharedMem->flags != TEEC_MEM_INPUT) && + (sharedMem->flags != TEEC_MEM_OUTPUT) && + (sharedMem->flags != (TEEC_MEM_INPUT | TEEC_MEM_OUTPUT))) + return TEEC_ERROR_BAD_PARAMETERS; + + _teec_mrvl_context = (_TEEC_MRVL_Context *) (context->imp); + + if (!(IS_MAGIC_VALID(_teec_mrvl_context->magic))) + return TEEC_ERROR_BAD_PARAMETERS; + + if (sharedMem->size >= TEEC_CONFIG_SHAREDMEM_MAX_SIZE) + return TEEC_ERROR_OUT_OF_MEMORY; + + if (sharedMem->size == 0) + return TEEC_SUCCESS; + + osa_atomic_inc(&(_teec_mrvl_context->count)); + + sharedMem->imp = osa_kmem_alloc(sizeof(_TEEC_MRVL_SharedMemory)); + if (!(sharedMem->imp)) + return TEEC_ERROR_OUT_OF_MEMORY; + + _teec_mrvl_sharedMem = (_TEEC_MRVL_SharedMemory *) (sharedMem->imp); + _teec_mrvl_sharedMem->tee_ctx_ntw = &(context->imp); + _teec_mrvl_sharedMem->flag = CA_AOLLC_BUF; + osa_atomic_set(&(_teec_mrvl_sharedMem->count), 0); + + tee_msg_stat = _teec_map_memory(sharedMem, &tee_get_ret); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + _teec_mrvl_sharedMem->vaddr_tw = tee_get_ret.vaddr_tw; + tee_result = tee_get_ret.ret; + + INIT_MAGIC(_teec_mrvl_sharedMem->magic); + + if (tee_result != TEEC_SUCCESS) + osa_atomic_dec(&(_teec_mrvl_context->count)); + + return tee_result; +} + +TEEC_Result TEEC_AllocateSharedMemory(TEEC_Context *context, + TEEC_SharedMemory *sharedMem) +{ + TEEC_Result tee_result = TEEC_SUCCESS; + TEEC_Result tee_msg_stat; + _TEEC_MRVL_Context *_teec_mrvl_context; + _TEEC_MRVL_SharedMemory *_teec_mrvl_sharedMem; + + tee_get_ret_map_shm_arg_t tee_get_ret; + + if (!sharedMem) + return TEEC_ERROR_BAD_PARAMETERS; + + if (!context) { + sharedMem->buffer = NULL; + return TEEC_ERROR_BAD_PARAMETERS; + } + + if ((sharedMem->flags != TEEC_MEM_INPUT) && + (sharedMem->flags != TEEC_MEM_OUTPUT) && + (sharedMem->flags != (TEEC_MEM_INPUT | TEEC_MEM_OUTPUT))) { + sharedMem->buffer = NULL; + return TEEC_ERROR_BAD_PARAMETERS; + } + + _teec_mrvl_context = (_TEEC_MRVL_Context *) (context->imp); + + if (!(IS_MAGIC_VALID(_teec_mrvl_context->magic))) { + sharedMem->buffer = NULL; + return TEEC_ERROR_BAD_PARAMETERS; + } + + if (sharedMem->size >= TEEC_CONFIG_SHAREDMEM_MAX_SIZE) { + sharedMem->buffer = NULL; + return TEEC_ERROR_BAD_PARAMETERS; + } + + if (sharedMem->size == 0) + return TEEC_SUCCESS; + + sharedMem->buffer = osa_kmem_alloc(sharedMem->size); + if (!sharedMem->buffer) + return TEEC_ERROR_OUT_OF_MEMORY; + + osa_atomic_inc(&(_teec_mrvl_context->count)); + + sharedMem->imp = osa_kmem_alloc(sizeof(_TEEC_MRVL_SharedMemory)); + if (!(sharedMem->imp)) + return TEEC_ERROR_OUT_OF_MEMORY; + + _teec_mrvl_sharedMem = (_TEEC_MRVL_SharedMemory *) (sharedMem->imp); + _teec_mrvl_sharedMem->tee_ctx_ntw = &(context->imp); + _teec_mrvl_sharedMem->flag = DRV_AOLLC_BUF; + osa_atomic_set(&(_teec_mrvl_sharedMem->count), 0); + + tee_msg_stat = _teec_map_memory(sharedMem, &tee_get_ret); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + _teec_mrvl_sharedMem->vaddr_tw = tee_get_ret.vaddr_tw; + tee_result = tee_get_ret.ret; + + INIT_MAGIC(_teec_mrvl_sharedMem->magic); + + if (tee_result != TEEC_SUCCESS) + sharedMem->buffer = NULL; + + if (tee_result != TEEC_SUCCESS) + osa_atomic_dec(&(_teec_mrvl_context->count)); + + return tee_result; +} + +void TEEC_ReleaseSharedMemory(TEEC_SharedMemory *sharedMem) +{ + TEEC_Context *teec_context; + int32_t count; + + tee_msgm_t tee_msgm_handle; + tee_cmd_t tee_msg_cmd; + tee_set_cmd_unmap_shm_arg_t *tee_msg_set_cmd_ummap_shm_arg; + tee_stat_t tee_msg_stat; + uint32_t buf_size; + tee_msgm_msg_info_t tee_msg_info; + + uint8_t *tee_msg_buf; + tee_msg_head_t *tee_msg_head; + _TEEC_MRVL_Context *_teec_mrvl_context; + _TEEC_MRVL_SharedMemory *_teec_mrvl_sharedMem; + + if (!sharedMem) + return; + + if (sharedMem->size == 0) + return; + + _teec_mrvl_sharedMem = (_TEEC_MRVL_SharedMemory *) (sharedMem->imp); + + if (!(IS_MAGIC_VALID(_teec_mrvl_sharedMem->magic))) + OSA_ASSERT(0); + + CLEANUP_MAGIC(_teec_mrvl_sharedMem->magic); + + if (_teec_mrvl_sharedMem->flag == DRV_AOLLC_BUF) { + osa_kmem_free(sharedMem->buffer); + sharedMem->buffer = NULL; + sharedMem->size = 0; + sharedMem->flags = 0; + } else if (_teec_mrvl_sharedMem->flag == CA_AOLLC_BUF) { + /* Do nothing */ + /* Do not need to free the buffer, it's owned by CA */ + } + + count = osa_atomic_read(&(_teec_mrvl_sharedMem->count)); + if (count != 0) + OSA_ASSERT(0); + + /* prepare the request, create the msg and add it to the msgQ */ + tee_msgm_handle = tee_msgm_create_inst(); + if (!tee_msgm_handle) + OSA_ASSERT(0); + + tee_msg_info.cmd = TEE_CMD_UNMAP_SHM; + tee_msg_info.msg_map_shm_info = NULL; + tee_msg_info.msg_op_info = NULL; + + /* Get buffer size */ + tee_msg_stat = + tee_msgm_set_msg_buf(tee_msgm_handle, &tee_msg_info, NULL, + &buf_size); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + tee_msg_buf = osa_kmem_alloc(sizeof(tee_msg_head_t) + buf_size); + if (!tee_msg_buf) { + tee_msgm_destroy_inst(tee_msgm_handle); + OSA_ASSERT(0); + } + + /* give the buffer to Msgm */ + tee_msg_stat = + tee_msgm_set_msg_buf(tee_msgm_handle, NULL, + tee_msg_buf + sizeof(tee_msg_head_t), + &buf_size); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + /* init head_t */ + tee_msg_head = _init_msg_head(tee_msg_buf, buf_size); + + /* set cmd body */ + tee_msg_cmd = TEE_CMD_UNMAP_SHM; + tee_msg_set_cmd_ummap_shm_arg = sharedMem; + tee_msg_stat = + tee_msgm_set_cmd(tee_msgm_handle, tee_msg_cmd, + tee_msg_set_cmd_ummap_shm_arg); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + tzdd_add_node_to_req_list(&(tee_msg_head->node)); + + /* Wake up PT */ + osa_release_sem(tzdd_dev->pt_sem); + /* osa_wakeup_process(tzdd_dev->proxy_thd); */ + + /* Wait for the mutex, PT will wake it up */ + osa_wait_for_sem(tee_msg_head->comp, INFINITE); + + osa_destroy_sem(tee_msg_head->comp); + + /* deal with the response */ + osa_kmem_free(tee_msg_buf); + tee_msgm_destroy_inst(tee_msgm_handle); + + teec_context = + container_of(_teec_mrvl_sharedMem->tee_ctx_ntw, TEEC_Context, imp); + _teec_mrvl_context = (_TEEC_MRVL_Context *) (teec_context->imp); + osa_atomic_dec(&(_teec_mrvl_context->count)); + + _teec_mrvl_sharedMem->tee_ctx_ntw = NULL; + _teec_mrvl_sharedMem->vaddr_tw = NULL; + _teec_mrvl_sharedMem->size = 0; + _teec_mrvl_sharedMem->flag = 0; + + osa_kmem_free(sharedMem->imp); + return; +} + +TEEC_Result TEEC_OpenSession(TEEC_Context *context, + TEEC_Session *session, + const TEEC_UUID *destination, + uint32_t connectionMethod, + const void *connectionData, + TEEC_Operation *operation, + uint32_t *returnOrigin) +{ + TEEC_Result tee_result = TEEC_SUCCESS; + + tee_msgm_t tee_msgm_handle; + tee_cmd_t tee_msg_cmd; + tee_set_cmd_open_ss_arg_t tee_msg_set_cmd_open_ss_arg; + tee_stat_t tee_msg_stat; + uint32_t buf_size; + tee_msgm_msg_info_t tee_msg_info; + tee_get_ret_open_ss_arg_t tee_get_ret; + + uint8_t *tee_msg_buf; + tee_msg_head_t *tee_msg_head; + _TEEC_MRVL_Context *_teec_mrvl_context; + _TEEC_MRVL_Session *_teec_mrvl_session; + _TEEC_MRVL_Operation *_teec_mrvl_operation; + + if (!context || !session || !destination) { + if (returnOrigin) + *returnOrigin = TEEC_ORIGIN_API; + + return TEEC_ERROR_BAD_PARAMETERS; + } + + tee_add_time_record_point("naoe"); + switch (connectionMethod) { + case TEEC_LOGIN_PUBLIC: + case TEEC_LOGIN_USER: + case TEEC_LOGIN_APPLICATION: + case TEEC_LOGIN_USER_APPLICATION: + { + if (connectionData) { + if (returnOrigin) + *returnOrigin = TEEC_ORIGIN_API; + + return TEEC_ERROR_BAD_PARAMETERS; + } + } + break; + case TEEC_LOGIN_GROUP: + case TEEC_LOGIN_GROUP_APPLICATION: + { + if (!connectionData) { + if (returnOrigin) + *returnOrigin = TEEC_ORIGIN_API; + + return TEEC_ERROR_BAD_PARAMETERS; + } + } + break; + case MRVL_LOGIN_APPLICATION_DAEMON: + { + /* Mrvl internal method */ + /* The thread should NOT be frozen + * even the system is suspending + */ + unsigned long flags; + local_irq_save(flags); + current->flags |= PF_NOFREEZE; + local_irq_restore(flags); + } + break; + default: + { + if (returnOrigin) + *returnOrigin = TEEC_ORIGIN_API; + + return TEEC_ERROR_BAD_PARAMETERS; + } + break; + } + + _teec_mrvl_context = (_TEEC_MRVL_Context *) (context->imp); + + if (!(IS_MAGIC_VALID(_teec_mrvl_context->magic))) { + if (returnOrigin) + *returnOrigin = TEEC_ORIGIN_API; + + return TEEC_ERROR_BAD_PARAMETERS; + } + + if (operation) { + tee_result = _set_sharedMem_atomic((tee_impl)&(context->imp), + operation, INC_ATOMIC); + if (tee_result != TEEC_SUCCESS) { + if (returnOrigin) + *returnOrigin = TEEC_ORIGIN_API; + return TEEC_ERROR_BAD_PARAMETERS; + } + } + + osa_atomic_inc(&(_teec_mrvl_context->count)); + + session->imp = osa_kmem_alloc(sizeof(_TEEC_MRVL_Session)); + if (!(session->imp)) { + if (returnOrigin) + *returnOrigin = TEEC_ORIGIN_API; + return TEEC_ERROR_OUT_OF_MEMORY; + } + _teec_mrvl_session = (_TEEC_MRVL_Session *) (session->imp); + INIT_MAGIC(_teec_mrvl_session->magic); + _teec_mrvl_session->tee_ctx_ntw = &(context->imp); + osa_atomic_set(&(_teec_mrvl_session->count), 0); + + if (operation) + osa_atomic_inc(&(_teec_mrvl_session->count)); + + /* prepare the request, create the msg and add it to the msgQ */ + tee_msgm_handle = tee_msgm_create_inst(); + if (!tee_msgm_handle) + OSA_ASSERT(0); + + tee_msg_info.cmd = TEE_CMD_OPEN_SS; + tee_msg_info.msg_map_shm_info = NULL; + tee_msg_info.msg_op_info = operation; + + /* Get buffer size */ + tee_msg_stat = + tee_msgm_set_msg_buf(tee_msgm_handle, &tee_msg_info, NULL, + &buf_size); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + tee_msg_buf = osa_kmem_alloc(sizeof(tee_msg_head_t) + buf_size); + if (!tee_msg_buf) { + tee_msgm_destroy_inst(tee_msgm_handle); + if (returnOrigin) + *returnOrigin = TEEC_ORIGIN_API; + + return TEEC_ERROR_GENERIC; + } + + /* give the buffer to Msgm */ + tee_msg_stat = + tee_msgm_set_msg_buf(tee_msgm_handle, NULL, + tee_msg_buf + sizeof(tee_msg_head_t), + &buf_size); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + /* init head_t */ + tee_msg_head = _init_msg_head(tee_msg_buf, buf_size); + + if (operation) { + operation->imp = osa_kmem_alloc(sizeof(_TEEC_MRVL_Operation)); + if (!(operation->imp)) { + if (returnOrigin) + *returnOrigin = TEEC_ORIGIN_API; + return TEEC_ERROR_OUT_OF_MEMORY; + } + _teec_mrvl_operation = + (_TEEC_MRVL_Operation *) (operation->imp); + + _teec_mrvl_operation->tee_msg_ntw = (void *)tee_msg_buf; + } + + /* set cmd body */ + tee_msg_cmd = TEE_CMD_OPEN_SS; + tee_msg_set_cmd_open_ss_arg.uuid = (TEEC_UUID *) destination; + _teec_generate_connection_data(connectionMethod, + &tee_msg_set_cmd_open_ss_arg); + tee_msg_stat = + tee_msgm_set_cmd(tee_msgm_handle, tee_msg_cmd, + &tee_msg_set_cmd_open_ss_arg); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + /* set params body */ + if (operation) { + tee_msg_stat = tee_msgm_set_params(tee_msgm_handle, operation); + if (tee_msg_stat != TEEC_SUCCESS) { + osa_atomic_dec(&(_teec_mrvl_context->count)); + + if (operation) { + osa_atomic_dec(&(_teec_mrvl_session->count)); + _set_sharedMem_atomic((tee_impl)&(context->imp), + operation, DEC_ATOMIC); + } + + osa_kmem_free(tee_msg_buf); + tee_msgm_destroy_inst(tee_msgm_handle); + if (returnOrigin) + *returnOrigin = TEEC_ORIGIN_API; + + return tee_msg_stat; + } + } + + tzdd_add_node_to_req_list(&(tee_msg_head->node)); + + tee_add_time_record_point("naow"); + /* Wake up PT */ + osa_release_sem(tzdd_dev->pt_sem); + /* osa_wakeup_process(tzdd_dev->proxy_thd); */ + + /* Wait for the mutex, PT will wake it up */ + osa_wait_for_sem(tee_msg_head->comp, INFINITE); + tee_add_time_record_point("naob"); + osa_destroy_sem(tee_msg_head->comp); + + /* deal with the response */ + if (!(IS_MSG_MAGIC_VALID(tee_msg_head->magic))) + OSA_ASSERT(0); + + /* Get return */ + if (operation) { + tee_msg_stat = + tee_msgm_update_params(tee_msgm_handle, operation); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + } + + tee_msg_stat = tee_msgm_get_ret(tee_msgm_handle, (void *)&tee_get_ret); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + _teec_mrvl_session->tee_ss_tw = tee_get_ret.ss_tw; + if (returnOrigin) + *returnOrigin = tee_get_ret.ret_orig; + + tee_result = tee_get_ret.ret; + + if (tee_result != TEEC_SUCCESS) + osa_atomic_dec(&(_teec_mrvl_context->count)); + + if (operation) { + osa_atomic_dec(&(_teec_mrvl_session->count)); + _set_sharedMem_atomic((tee_impl)&(context->imp), + operation, DEC_ATOMIC); + } + + osa_kmem_free(tee_msg_buf); + tee_msgm_destroy_inst(tee_msgm_handle); + + if (operation) + osa_kmem_free(operation->imp); + + tee_add_time_record_point("naox"); + return tee_result; +} + +void TEEC_CloseSession(TEEC_Session *session) +{ + TEEC_Context *teec_context; + int32_t count; + + tee_msgm_t tee_msgm_handle; + tee_cmd_t tee_msg_cmd; + tee_set_cmd_close_ss_arg_t tee_msg_set_cmd_close_ss_arg; + tee_stat_t tee_msg_stat; + uint32_t buf_size; + tee_msgm_msg_info_t tee_msg_info; + + uint8_t *tee_msg_buf; + tee_msg_head_t *tee_msg_head; + _TEEC_MRVL_Context *_teec_mrvl_context; + _TEEC_MRVL_Session *_teec_mrvl_session; + + if (!session) + return; + + tee_add_time_record_point("nace"); + _teec_mrvl_session = (_TEEC_MRVL_Session *) (session->imp); + + if (!(IS_MAGIC_VALID(_teec_mrvl_session->magic))) + OSA_ASSERT(0); + + CLEANUP_MAGIC(_teec_mrvl_session->magic); + + count = osa_atomic_read(&(_teec_mrvl_session->count)); + if (count != 0) + OSA_ASSERT(0); + + /* prepare the request, create the msg and add it to the msgQ */ + tee_msgm_handle = tee_msgm_create_inst(); + if (!tee_msgm_handle) + OSA_ASSERT(0); + + tee_msg_info.cmd = TEE_CMD_CLOSE_SS; + tee_msg_info.msg_map_shm_info = NULL; + tee_msg_info.msg_op_info = NULL; + + /* Get buffer size */ + tee_msg_stat = + tee_msgm_set_msg_buf(tee_msgm_handle, &tee_msg_info, NULL, + &buf_size); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + tee_msg_buf = osa_kmem_alloc(sizeof(tee_msg_head_t) + buf_size); + if (!tee_msg_buf) { + tee_msgm_destroy_inst(tee_msgm_handle); + OSA_ASSERT(0); + } + + /* give the buffer to Msgm */ + tee_msg_stat = + tee_msgm_set_msg_buf(tee_msgm_handle, NULL, + tee_msg_buf + sizeof(tee_msg_head_t), + &buf_size); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + /* init head_t */ + tee_msg_head = _init_msg_head(tee_msg_buf, buf_size); + + /* set cmd body */ + tee_msg_cmd = TEE_CMD_CLOSE_SS; + tee_msg_set_cmd_close_ss_arg = _teec_mrvl_session->tee_ss_tw; + tee_msg_stat = + tee_msgm_set_cmd(tee_msgm_handle, tee_msg_cmd, + tee_msg_set_cmd_close_ss_arg); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + tzdd_add_node_to_req_list(&(tee_msg_head->node)); + + tee_add_time_record_point("nacw"); + /* Wake up PT */ + osa_release_sem(tzdd_dev->pt_sem); + /* osa_wakeup_process(tzdd_dev->proxy_thd); */ + + /* Wait for the mutex, PT will wake it up */ + osa_wait_for_sem(tee_msg_head->comp, INFINITE); + tee_add_time_record_point("nacb"); + + osa_destroy_sem(tee_msg_head->comp); + + /* deal with the response */ + osa_kmem_free(tee_msg_buf); + tee_msgm_destroy_inst(tee_msgm_handle); + + teec_context = + container_of(_teec_mrvl_session->tee_ctx_ntw, TEEC_Context, imp); + _teec_mrvl_context = (_TEEC_MRVL_Context *) (teec_context->imp); + osa_atomic_dec(&(_teec_mrvl_context->count)); + + _teec_mrvl_session->tee_ctx_ntw = NULL; + _teec_mrvl_session->tee_ss_tw = NULL; + + osa_kmem_free(session->imp); + tee_add_time_record_point("nacx"); + + return; +} + +TEEC_Result TEEC_InvokeCommand(TEEC_Session *session, + uint32_t commandID, + TEEC_Operation *operation, + uint32_t *returnOrigin) +{ + TEEC_Result tee_result = TEEC_SUCCESS; + + tee_msgm_t tee_msgm_handle; + tee_cmd_t tee_msg_cmd; + tee_set_cmd_inv_op_arg_t tee_msg_set_cmd_inv_op_arg; + tee_stat_t tee_msg_stat; + uint32_t buf_size; + tee_msgm_msg_info_t tee_msg_info; + tee_get_ret_inv_op_arg_t tee_get_ret; + + uint8_t *tee_msg_buf; + tee_msg_head_t *tee_msg_head; + _TEEC_MRVL_Session *_teec_mrvl_session; + _TEEC_MRVL_Operation *_teec_mrvl_operation; + + tee_add_time_record_point("naie"); + if (!session) { + if (returnOrigin) + *returnOrigin = TEEC_ORIGIN_API; + + return TEEC_ERROR_BAD_PARAMETERS; + } + + _teec_mrvl_session = (_TEEC_MRVL_Session *) (session->imp); + + if (!(IS_MAGIC_VALID(_teec_mrvl_session->magic))) { + if (returnOrigin) + *returnOrigin = TEEC_ORIGIN_API; + return TEEC_ERROR_BAD_PARAMETERS; + } + + if (operation) { + tee_result = _set_sharedMem_atomic( + _teec_mrvl_session->tee_ctx_ntw, + operation, INC_ATOMIC); + if (tee_result != TEEC_SUCCESS) { + if (returnOrigin) + *returnOrigin = TEEC_ORIGIN_API; + return TEEC_ERROR_BAD_PARAMETERS; + } + } + + if (operation) + osa_atomic_inc(&(_teec_mrvl_session->count)); + + /* prepare the request, create the msg and add it to the msgQ */ + tee_msgm_handle = tee_msgm_create_inst(); + if (!tee_msgm_handle) + OSA_ASSERT(0); + + tee_msg_info.cmd = TEE_CMD_INV_OP; + tee_msg_info.msg_map_shm_info = NULL; + if (operation) + tee_msg_info.msg_op_info = operation; + else + tee_msg_info.msg_op_info = NULL; + + /* Get buffer size */ + tee_msg_stat = + tee_msgm_set_msg_buf(tee_msgm_handle, &tee_msg_info, NULL, + &buf_size); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + tee_msg_buf = osa_kmem_alloc(sizeof(tee_msg_head_t) + buf_size); + if (!tee_msg_buf) { + tee_msgm_destroy_inst(tee_msgm_handle); + if (returnOrigin) + *returnOrigin = TEEC_ORIGIN_API; + + return TEEC_ERROR_GENERIC; + } + + /* give the buffer to Msgm */ + tee_msg_stat = + tee_msgm_set_msg_buf(tee_msgm_handle, NULL, + tee_msg_buf + sizeof(tee_msg_head_t), + &buf_size); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + /* init head_t */ + tee_msg_head = _init_msg_head(tee_msg_buf, buf_size); + + if (operation) { + operation->imp = osa_kmem_alloc(sizeof(_TEEC_MRVL_Operation)); + if (!(operation->imp)) { + if (returnOrigin) + *returnOrigin = TEEC_ORIGIN_API; + return TEEC_ERROR_OUT_OF_MEMORY; + } + + _teec_mrvl_operation = + (_TEEC_MRVL_Operation *) (operation->imp); + + _teec_mrvl_operation->tee_msg_ntw = (void *)tee_msg_buf; + } + + /* set cmd body */ + tee_msg_cmd = TEE_CMD_INV_OP; + tee_msg_set_cmd_inv_op_arg.ss = _teec_mrvl_session->tee_ss_tw; + tee_msg_set_cmd_inv_op_arg.srv_cmd = commandID; + tee_msg_stat = + tee_msgm_set_cmd(tee_msgm_handle, tee_msg_cmd, + &tee_msg_set_cmd_inv_op_arg); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + /* set params body */ + if (operation) { + tee_msg_stat = tee_msgm_set_params(tee_msgm_handle, operation); + if (tee_msg_stat != TEEC_SUCCESS) { + if (operation) { + osa_atomic_dec(&(_teec_mrvl_session->count)); + _set_sharedMem_atomic(_teec_mrvl_session->tee_ctx_ntw, + operation, DEC_ATOMIC); + } + + osa_kmem_free(tee_msg_buf); + tee_msgm_destroy_inst(tee_msgm_handle); + if (returnOrigin) + *returnOrigin = TEEC_ORIGIN_API; + return tee_msg_stat; + } + } + + tzdd_add_node_to_req_list(&(tee_msg_head->node)); + tee_add_time_record_point("naiw"); + /* Wake up PT */ + osa_release_sem(tzdd_dev->pt_sem); + /* osa_wakeup_process(tzdd_dev->proxy_thd); */ + + /* Wait for the mutex, PT will wake it up */ + osa_wait_for_sem(tee_msg_head->comp, INFINITE); + tee_add_time_record_point("naib"); + osa_destroy_sem(tee_msg_head->comp); + + /* deal with the response */ + if (!(IS_MSG_MAGIC_VALID(tee_msg_head->magic))) + OSA_ASSERT(0); + + /* Get return */ + if (operation) { + tee_msg_stat = + tee_msgm_update_params(tee_msgm_handle, operation); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + } + + tee_msg_stat = tee_msgm_get_ret(tee_msgm_handle, (void *)&tee_get_ret); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + if (returnOrigin) + *returnOrigin = tee_get_ret.ret_orig; + + tee_result = tee_get_ret.ret; + + if (operation) { + osa_atomic_dec(&(_teec_mrvl_session->count)); + _set_sharedMem_atomic(_teec_mrvl_session->tee_ctx_ntw, + operation, DEC_ATOMIC); + } + + osa_kmem_free(tee_msg_buf); + tee_msgm_destroy_inst(tee_msgm_handle); + + if (operation) + osa_kmem_free(operation->imp); + + tee_add_time_record_point("naix"); + return tee_result; +} + +void TEEC_RequestCancellation(TEEC_Operation *operation) +{ + tee_msg_head_t *tee_msg_head; + + tee_msgm_t tee_msgm_handle; + tee_cmd_t tee_msg_cmd; + tee_set_cmd_can_op_arg_t *tee_msg_set_cmd_can_op_arg; + tee_stat_t tee_msg_stat; + uint32_t buf_size; + tee_msgm_msg_info_t tee_msg_info; + + uint8_t *tee_msg_buf; + _TEEC_MRVL_Operation *_teec_mrvl_operation; + + if (!operation) + OSA_ASSERT(0); + + _teec_mrvl_operation = (_TEEC_MRVL_Operation *)(operation->imp); + + tee_msg_head = _teec_mrvl_operation->tee_msg_ntw; + + if (tzdd_chk_node_on_req_list(&(tee_msg_head->node))) { + /* The msg is in the msgQ in NTW */ + tee_msg_head->msg_prop.bp.stat = TEE_MSG_STAT_CAN; + return; + } else { + /* The msg has been sent to the TW */ + + /* prepare the request, create the msg and add it to the msgQ */ + tee_msgm_handle = tee_msgm_create_inst(); + if (!tee_msgm_handle) + OSA_ASSERT(0); + + tee_msg_info.cmd = TEE_CMD_CAN_OP; + tee_msg_info.msg_map_shm_info = NULL; + tee_msg_info.msg_op_info = operation; + + /* Get buffer size */ + tee_msg_stat = + tee_msgm_set_msg_buf(tee_msgm_handle, &tee_msg_info, NULL, + &buf_size); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + tee_msg_buf = osa_kmem_alloc(sizeof(tee_msg_head_t) + buf_size); + if (!tee_msg_buf) { + tee_msgm_destroy_inst(tee_msgm_handle); + OSA_ASSERT(0); + } + + /* give the buffer to Msgm */ + tee_msg_stat = + tee_msgm_set_msg_buf(tee_msgm_handle, NULL, + tee_msg_buf + sizeof(tee_msg_head_t), + &buf_size); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + /* init head_t */ + tee_msg_head = _init_msg_head(tee_msg_buf, buf_size); + + _teec_mrvl_operation->tee_msg_ntw = (void *)tee_msg_buf; + + /* set cmd body */ + tee_msg_cmd = TEE_CMD_CAN_OP; + tee_msg_set_cmd_can_op_arg = operation; + tee_msg_stat = + tee_msgm_set_cmd(tee_msgm_handle, tee_msg_cmd, + tee_msg_set_cmd_can_op_arg); + if (tee_msg_stat != TEEC_SUCCESS) + OSA_ASSERT(0); + + tzdd_add_node_to_req_list(&(tee_msg_head->node)); + + /* Wake up PT */ + osa_release_sem(tzdd_dev->pt_sem); + /* osa_wakeup_process(tzdd_dev->proxy_thd); */ + + tee_msgm_destroy_inst(tee_msgm_handle); + } + return; +} diff --git a/arch/arm/mach-berlin/modules/tzdd/main/teec_time.c b/arch/arm/mach-berlin/modules/tzdd/main/teec_time.c new file mode 100644 index 00000000..690e4887 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/main/teec_time.c @@ -0,0 +1,76 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#include "teec_cb.h" +#include "teec_time.h" +#include "osa.h" + +/* vvv sync with tw vvv */ + +typedef struct _ree_time +{ + uint32_t sec; + uint32_t nsec; +} ree_time; + +static const teec_cb_uuid_t _g_ree_time_uuid = { + 0x79b77788, 0x9789, 0x4a7a, + { 0xa2, 0xbe, 0xb6, 0x1, 0x74, 0x69, 0x6d, 0x65 }, +}; + +/* ^^^ sync with tw ^^^ */ + +static teec_cb_handle_t _g_time_cb_h = NULL; + +teec_cb_stat_t _teec_get_ree_time(tee_cb_arg_t *args, teec_cb_cntx_t cntx) +{ + ree_time *t; + struct timespec ts; + + OSA_ASSERT(sizeof(ree_time) == args->nbytes); + + getnstimeofday(&ts); + + t = (ree_time *)args->args; + t->sec = ts.tv_sec; + t->nsec = ts.tv_nsec; + return TEEC_SUCCESS; +} + +tee_stat_t teec_reg_time_cb(void) +{ + if (_g_time_cb_h) { + return TEEC_SUCCESS; + } + + _g_time_cb_h = teec_reg_cb(&_g_ree_time_uuid, _teec_get_ree_time, NULL); + if (NULL == _g_time_cb_h) { + return TEEC_ERROR_GENERIC; + } + + return TEEC_SUCCESS; +} + +void teec_unreg_time_cb(void) +{ + if (_g_time_cb_h) { + teec_unreg_cb(_g_time_cb_h); + _g_time_cb_h = NULL; + } +} diff --git a/arch/arm/mach-berlin/modules/tzdd/main/teec_time.h b/arch/arm/mach-berlin/modules/tzdd/main/teec_time.h new file mode 100644 index 00000000..39a02fe7 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/main/teec_time.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#ifndef __TEEC_TIME_H__ +#define __TEEC_TIME_H__ + +#include "tzdd_internal.h" + +tee_stat_t teec_reg_time_cb(void); +void teec_unreg_time_cb(void); + +#endif /* __TEEC_TIME_H__ */ + diff --git a/arch/arm/mach-berlin/modules/tzdd/main/tzdd_internal.h b/arch/arm/mach-berlin/modules/tzdd/main/tzdd_internal.h new file mode 100644 index 00000000..e58ce021 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/main/tzdd_internal.h @@ -0,0 +1,172 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#ifndef _TZDD_INTERNAL_H_ +#define _TZDD_INTERNAL_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "tee_mrvl_imp.h" +#include "tee_client_api.h" +#include "tzdd_ioctl.h" +#include "osa.h" +#include "tee_msgm_ntw.h" +#include "tee_cm.h" +#include "tee_memm.h" +#include "tzdd_sstd.h" +#include "tee_perf.h" + +#include "teec_cb_local.h" +#include "teec_time.h" +#include "tzdd_list.h" + +/* + * Trustzone driver struct + */ +#define DEVICE_NAME "tzdd" +#define DEVICE_NAME_SIZE 4 + +typedef struct { + struct cdev cdev; + struct task_struct *proxy_thd; + + osa_list_t req_list; + osa_mutex_t req_mutex; + + osa_sem_t pt_sem; + + osa_list_t pid_list; + osa_mutex_t pid_mutex; +} tzdd_dev_t; + +extern tzdd_dev_t *tzdd_dev; + +typedef struct _tzdd_ctx_node_t +{ + uint8_t magic[4]; + tee_impl tee_ctx_ntw; + osa_list_t node; + osa_list_t shm_list; + osa_list_t ss_list; +} tzdd_ctx_node_t; + +typedef struct _tzdd_shm_node_t +{ + uint8_t magic[4]; + tee_impl tee_ctx_ntw; + tee_impl tee_shm_ntw; + osa_list_t node; +} tzdd_shm_node_t; + +typedef struct _tzdd_ss_node_t +{ + uint8_t magic[4]; + tee_impl tee_ctx_ntw; + tee_impl tee_ss_ntw; + osa_list_t node; +} tzdd_ss_node_t; + +extern TEEC_Result _teec_initialize_context(const char *name, + tee_impl *tee_ctx_ntw); +extern TEEC_Result _teec_final_context(tee_impl tee_ctx_ntw); +extern TEEC_Result _teec_map_shared_mem(teec_map_shared_mem_args + teec_map_shared_mem, + tee_impl *tee_shm_ntw); +extern TEEC_Result _teec_unmap_shared_mem(teec_unmap_shared_mem_args + teec_unmap_shared_mem, + tee_impl tee_shm_ntw); +extern TEEC_Result _teec_open_session(tee_impl tee_ctx_ntw, + tee_impl *tee_ss_ntw, + const TEEC_UUID *destination, + uint32_t connectionMethod, + const void *connectionData, + uint32_t flags, uint32_t paramTypes, + TEEC_Parameter(*params)[4], + tee_impl *tee_op_ntw, + tee_impl tee_op_ntw_for_cancel, + uint32_t *returnOrigin, + unsigned long arg, + teec_open_ss_args open_ss_args); +extern TEEC_Result _teec_close_session(tee_impl tee_ss_ntw); +extern TEEC_Result _teec_invoke_command(tee_impl tee_ss_ntw, + uint32_t cmd_ID, + uint32_t started, + uint32_t flags, + uint32_t paramTypes, + TEEC_Parameter(*params)[4], + tee_impl *tee_op_ntw, + tee_impl tee_op_ntw_for_cancel, + uint32_t *returnOrigin, + unsigned long arg, + teec_invoke_cmd_args invoke_cmd_args); +extern TEEC_Result _teec_request_cancellation(tee_impl tee_op_ntw); + +extern void tzdd_add_node_to_req_list(osa_list_t *list); +extern bool tzdd_chk_node_on_req_list(osa_list_t *list); +extern bool tzdd_del_node_from_req_list(osa_list_t *list); + +/* get request node from request list */ +extern bool tzdd_get_first_req(tee_msg_head_t **tee_msg_head); + +/* check request list and run list are empty or not */ +extern bool tzdd_have_req(void); +extern uint32_t tzdd_get_req_num_in_list(void); + +extern int tzdd_proxy_thread_init(tzdd_dev_t *dev); +extern void tzdd_proxy_thread_cleanup(tzdd_dev_t *dev); + +extern int32_t tzdd_init_core(tzdd_dev_t *dev); +extern void tzdd_cleanup_core(tzdd_dev_t *dev); + +#ifdef TZDD_DEBUG +#define TZDD_DBG(fmt, args...) \ + osa_dbg_print(DBG_INFO, DEVICE_NAME ": " fmt, ##args) +#else +#define TZDD_DBG(fmt, args...) +#endif + +#define osa_memset memset +#define osa_memcmp memcmp +#define osa_memcpy memcpy + +#define container_of(ptr, type, member) ({ \ + const typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) + + +#endif /* _TZDD_INTERNAL_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/main/tzdd_list.h b/arch/arm/mach-berlin/modules/tzdd/main/tzdd_list.h new file mode 100644 index 00000000..8f1134c0 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/main/tzdd_list.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#ifndef _TZDD_LIST_H_ +#define _TZDD_LIST_H_ + +#define FIND_PID_IN_PID_LIST (0xAA) + +typedef struct _tzdd_pid_list_t +{ + osa_list_t node; + osa_list_t ctx_list; + uint32_t pid; + uint32_t count; /* number of context in the node*/ +} tzdd_pid_list_t; + +#endif /* _TZDD_LIST_H_ */ + diff --git a/arch/arm/mach-berlin/modules/tzdd/main/tzdd_main.c b/arch/arm/mach-berlin/modules/tzdd/main/tzdd_main.c new file mode 100644 index 00000000..afd97c0f --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/main/tzdd_main.c @@ -0,0 +1,843 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#include "tzdd_internal.h" + +MODULE_LICENSE("GPL"); + +/* + * Parameters which can be set at load time. + */ + +#define TZDD_VERSION "TEEC Drvier Version 1.0.5" + +int tzdd_major; +int tzdd_minor; + +module_param(tzdd_major, int, S_IRUGO); +module_param(tzdd_minor, int, S_IRUGO); + +/* driver data struct */ +tzdd_dev_t *tzdd_dev; +static struct class *_tzdd_class; + +#define OP_PARAM_NUM 4 + +#define IS_MAGIC_VALID(_n) \ + (('T' == ((uint8_t *)_n)[0]) && \ + ('Z' == ((uint8_t *)_n)[1]) && \ + ('D' == ((uint8_t *)_n)[2]) && \ + ('D' == ((uint8_t *)_n)[3])) +#define CLEANUP_MAGIC(_n) \ + do { \ + ((uint8_t *)_n)[0] = '\0'; \ + ((uint8_t *)_n)[1] = '\0'; \ + ((uint8_t *)_n)[2] = '\0'; \ + ((uint8_t *)_n)[3] = '\0'; \ + } while (0) + +static void _tzdd_free_session(tzdd_ctx_node_t *tzdd_ctx_node) +{ + TEEC_Session *teec_session; + tzdd_ss_node_t *tzdd_ss_node; + osa_list_t *entry, *next; + + osa_list_iterate_safe(&(tzdd_ctx_node->ss_list), entry, next) { + OSA_LIST_ENTRY(entry, tzdd_ss_node_t, node, tzdd_ss_node); + if (!(IS_MAGIC_VALID(tzdd_ss_node->magic))) + OSA_ASSERT(0); + CLEANUP_MAGIC(tzdd_ss_node->magic); + + osa_list_del(&(tzdd_ss_node->node)); + + teec_session = (TEEC_Session *)(tzdd_ss_node->tee_ss_ntw); + TEEC_CloseSession(teec_session); + + osa_kmem_free(tzdd_ss_node); + osa_kmem_free(teec_session); + } + + return; +} + +static void _tzdd_free_shared_mem(tzdd_ctx_node_t *tzdd_ctx_node) +{ + TEEC_SharedMemory *teec_shared_mem; + tzdd_shm_node_t *tzdd_shm_node; + osa_list_t *entry, *next; + + osa_list_iterate_safe(&(tzdd_ctx_node->shm_list), entry, next) { + OSA_LIST_ENTRY(entry, tzdd_shm_node_t, node, tzdd_shm_node); + if (!(IS_MAGIC_VALID(tzdd_shm_node->magic))) + OSA_ASSERT(0); + CLEANUP_MAGIC(tzdd_shm_node->magic); + + osa_list_del(&(tzdd_shm_node->node)); + + teec_shared_mem = (TEEC_SharedMemory *)(tzdd_shm_node->tee_shm_ntw); + TEEC_ReleaseSharedMemory(teec_shared_mem); + + osa_kmem_free(tzdd_shm_node); + osa_kmem_free(teec_shared_mem); + } + + return; +} + +static void _tzdd_free_context(tzdd_ctx_node_t *tzdd_ctx_node) +{ + TEEC_Context *teec_context; + + CLEANUP_MAGIC(tzdd_ctx_node->magic); + + osa_list_del(&(tzdd_ctx_node->node)); + + teec_context = (TEEC_Context *)(tzdd_ctx_node->tee_ctx_ntw); + TEEC_FinalizeContext(teec_context); + + osa_kmem_free(tzdd_ctx_node); + osa_kmem_free(teec_context); + + return; +} + +static int tzdd_open(struct inode *inode, struct file *filp) +{ + tzdd_pid_list_t *tzdd_pid; + tzdd_pid_list_t *tmp_pid; + osa_list_t *entry; + uint32_t flag = 0; + pid_t pid; + + pid = current->tgid; + + osa_wait_for_sem(tzdd_dev->pid_mutex, INFINITE); + osa_list_iterate(&(tzdd_dev->pid_list), entry) { + OSA_LIST_ENTRY(entry, tzdd_pid_list_t, node, tmp_pid); + if (pid == tmp_pid->pid) { + flag = FIND_PID_IN_PID_LIST; + tmp_pid->count ++; + break; + } + } + + if (flag != FIND_PID_IN_PID_LIST) { + /* tzdd_pid will be released in tzdd_close */ + tzdd_pid = osa_kmem_alloc(sizeof(tzdd_pid_list_t)); + OSA_ASSERT(tzdd_pid != NULL); + + osa_list_init_head(&(tzdd_pid->ctx_list)); + tzdd_pid->pid = pid; + tzdd_pid->count = 1; + osa_list_add(&(tzdd_pid->node), &(tzdd_dev->pid_list)); + } + + osa_release_sem(tzdd_dev->pid_mutex); + + return 0; +} + +static int tzdd_close(struct inode *inode, struct file *filp) +{ + tzdd_pid_list_t *tzdd_pid = NULL; + osa_list_t *entry, *next; + uint32_t flag; + pid_t pid; + + pid = current->tgid; + + TZDD_DBG("tzdd_close, pid = 0x%x\n", pid); + + osa_wait_for_sem(tzdd_dev->pid_mutex, INFINITE); + osa_list_iterate(&(tzdd_dev->pid_list), entry) { + OSA_LIST_ENTRY(entry, tzdd_pid_list_t, node, tzdd_pid); + if (pid == tzdd_pid->pid) { + flag = FIND_PID_IN_PID_LIST; + if (tzdd_pid->count > 0) + tzdd_pid->count --; + break; + } + } + + if ((flag == FIND_PID_IN_PID_LIST) && + (tzdd_pid->count == 0)) { + tzdd_ctx_node_t *tzdd_ctx_node; + osa_list_iterate_safe(&(tzdd_pid->ctx_list), entry, next) { + OSA_LIST_ENTRY(entry, tzdd_ctx_node_t, node, tzdd_ctx_node); + if (!(IS_MAGIC_VALID(tzdd_ctx_node->magic))) + OSA_ASSERT(0); + _tzdd_free_session(tzdd_ctx_node); + _tzdd_free_shared_mem(tzdd_ctx_node); + _tzdd_free_context(tzdd_ctx_node); + } + + osa_list_del(&(tzdd_pid->node)); + osa_kmem_free(tzdd_pid); + } + + osa_release_sem(tzdd_dev->pid_mutex); + + return 0; +} + +static long tzdd_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) +{ + int ret = 0; + TEEC_Result result; + + TZDD_DBG("tzdd_ioctl\n"); + + OSA_ASSERT(arg); + + switch (cmd) { + case TEEC_INIT_CONTEXT: + { + teec_init_context_args teec_init_context; + if (copy_from_user + (&teec_init_context, (void __user *)arg, + sizeof(teec_init_context_args))) { + return -EFAULT; + } + + result = + _teec_initialize_context(teec_init_context.name, + &(teec_init_context. + tee_ctx_ntw)); + teec_init_context.ret = result; + + if (copy_to_user + ((void __user *)arg, &teec_init_context, + sizeof(teec_init_context_args))) { + return -EFAULT; + } + } + break; + case TEEC_FINAL_CONTEXT: + { + teec_final_context_args teec_final_context; + if (copy_from_user + (&teec_final_context, (void __user *)arg, + sizeof(teec_final_context_args))) { + return -EFAULT; + } + + OSA_ASSERT(teec_final_context.tee_ctx_ntw); + + result = + _teec_final_context(teec_final_context.tee_ctx_ntw); + teec_final_context.ret = result; + + if (copy_to_user + ((void __user *)arg, &teec_final_context, + sizeof(teec_final_context_args))) { + return -EFAULT; + } + } + break; + case TEEC_REGIST_SHARED_MEM: + case TEEC_ALLOC_SHARED_MEM: + { + teec_map_shared_mem_args teec_map_shared_mem; + void *buf_local_virt; + tee_memm_ss_t memm_handle; + + if (copy_from_user + (&teec_map_shared_mem, (void __user *)arg, + sizeof(teec_map_shared_mem_args))) { + return -EFAULT; + } + + memm_handle = tee_memm_create_ss(); + tee_memm_get_user_mem(memm_handle, + teec_map_shared_mem.buffer, + teec_map_shared_mem.size, + &buf_local_virt); + if (!buf_local_virt) { + TZDD_DBG("Error in tee_memm_get_user_mem\n"); + return -EFAULT; + } + tee_memm_destroy_ss(memm_handle); + + teec_map_shared_mem.buffer = buf_local_virt; + + OSA_ASSERT(teec_map_shared_mem.tee_ctx_ntw); + result = + _teec_map_shared_mem(teec_map_shared_mem, + &(teec_map_shared_mem. + tee_shm_ntw)); + teec_map_shared_mem.ret = result; + + if (copy_to_user + ((void __user *)arg, &teec_map_shared_mem, + sizeof(teec_map_shared_mem_args))) { + return -EFAULT; + } + } + break; + case TEEC_RELEASE_SHARED_MEM: + { + teec_unmap_shared_mem_args teec_unmap_shared_mem; + if (copy_from_user + (&teec_unmap_shared_mem, (void __user *)arg, + sizeof(teec_unmap_shared_mem_args))) { + return -EFAULT; + } + + OSA_ASSERT(teec_unmap_shared_mem.tee_shm_ntw); + result = + _teec_unmap_shared_mem(teec_unmap_shared_mem, + teec_unmap_shared_mem. + tee_shm_ntw); + teec_unmap_shared_mem.ret = result; + + if (copy_to_user + ((void __user *)arg, &teec_unmap_shared_mem, + sizeof(teec_unmap_shared_mem_args))) { + return -EFAULT; + } + } + break; + case TEEC_OPEN_SS: + { + uint32_t param_types, tmp_types; + uint32_t i; + uint8_t *tmpref_buf[OP_PARAM_NUM]; + void *save_buf_addr[OP_PARAM_NUM]; + + teec_open_ss_args teec_open_ss; + TEEC_UUID destination; + uint32_t _connectionData; + void *connectionData; + + for (i = 0; i < OP_PARAM_NUM; i++) { + tmpref_buf[i] = NULL; + save_buf_addr[i] = NULL; + } + + if (copy_from_user + (&teec_open_ss, (void __user *)arg, + sizeof(teec_open_ss_args))) { + return -EFAULT; + } + + if (teec_open_ss.destination) { + if (copy_from_user + (&destination, + (void __user *)teec_open_ss.destination, + sizeof(TEEC_UUID))) { + return -EFAULT; + } + } + + if (teec_open_ss.connectionData) { + if (copy_from_user + (&_connectionData, + (void __user *)teec_open_ss.connectionData, + sizeof(uint32_t))) { + return -EFAULT; + } + connectionData = (void *)&_connectionData; + } else { + connectionData = NULL; + } + + if (teec_open_ss.flags == OPERATION_EXIST) { + param_types = teec_open_ss.paramTypes; + for (i = 0; i < OP_PARAM_NUM; i++) { + tmp_types = + TEEC_PARAM_TYPE_GET(param_types, i); + switch (tmp_types) { + case TEEC_MEMREF_TEMP_INPUT: + case TEEC_MEMREF_TEMP_OUTPUT: + case TEEC_MEMREF_TEMP_INOUT: + { + if (NULL != + teec_open_ss.params[i] + .tmpref.buffer) { + tmpref_buf[i] = kmalloc( + teec_open_ss.params[i] + .tmpref.size, + GFP_KERNEL); + if (NULL == tmpref_buf[i]) { + TZDD_DBG + ("%s(%d): Failed to \ + allocate buffer\n", + __func__, + __LINE__); + return -ENOMEM; + } + if (copy_from_user( + tmpref_buf[i], + (void __user *) + (teec_open_ss.params[i].tmpref.buffer), + teec_open_ss.params[i].tmpref.size)) { + for (i = 0; i < OP_PARAM_NUM; i++) { + if (NULL != tmpref_buf[i]) + kfree(tmpref_buf[i]); + } + return + -EFAULT; + } + save_buf_addr[i] = + teec_open_ss.params[i].tmpref.buffer; + teec_open_ss.params[i].tmpref.buffer = + tmpref_buf[i]; + } + } + break; + case TEEC_MEMREF_WHOLE: + case TEEC_MEMREF_PARTIAL_INPUT: + case TEEC_MEMREF_PARTIAL_OUTPUT: + case TEEC_MEMREF_PARTIAL_INOUT: + { + TEEC_MRVL_SharedMemory *teec_mrvl_shared_mem; + + save_buf_addr[i] = + teec_open_ss.params[i].memref.parent; + teec_mrvl_shared_mem = + (TEEC_MRVL_SharedMemory *) (save_buf_addr[i]); + teec_open_ss.params[i].memref.parent = + container_of(teec_mrvl_shared_mem, + TEEC_SharedMemory, + imp); + } + break; + default: + break; + } + } + } + OSA_ASSERT(teec_open_ss.tee_ctx_ntw); + result = _teec_open_session( + teec_open_ss.tee_ctx_ntw, + &(teec_open_ss.tee_ss_ntw), + (const TEEC_UUID + *)(&destination), + teec_open_ss.connectionMethod, + connectionData, + teec_open_ss.flags, + teec_open_ss.paramTypes, + &(teec_open_ss.params), + &(teec_open_ss.tee_op_ntw), + teec_open_ss.tee_op_ntw_for_cancel, + &(teec_open_ss.returnOrigin), arg, + teec_open_ss); + teec_open_ss.ret = result; + + if (teec_open_ss.flags == OPERATION_EXIST) { + if (TEEC_SUCCESS == teec_open_ss.ret) { + param_types = teec_open_ss.paramTypes; + for (i = 0; i < OP_PARAM_NUM; i++) { + tmp_types = + TEEC_PARAM_TYPE_GET + (param_types, i); + switch (tmp_types) { + case TEEC_MEMREF_TEMP_INPUT: + case TEEC_MEMREF_TEMP_OUTPUT: + case TEEC_MEMREF_TEMP_INOUT: + { + if (NULL != + teec_open_ss.params[i].tmpref.buffer) { + teec_open_ss.params[i].tmpref.buffer = + save_buf_addr[i]; + if (copy_to_user((void __user *) + (teec_open_ss.params[i].tmpref.buffer), + tmpref_buf[i], + teec_open_ss.params[i].tmpref.size)) { + for (i = 0; i < OP_PARAM_NUM; i++) + if (NULL != tmpref_buf[i]) + kfree(tmpref_buf[i]); + return -EFAULT; + } + } + } + break; + default: + break; + } + } + } + } + if (copy_to_user + ((void __user *)arg, &teec_open_ss, + sizeof(teec_open_ss_args))) { + for (i = 0; i < OP_PARAM_NUM; i++) + if (NULL != tmpref_buf[i]) + kfree(tmpref_buf[i]); + + return -EFAULT; + } + for (i = 0; i < OP_PARAM_NUM; i++) + if (NULL != tmpref_buf[i]) + kfree(tmpref_buf[i]); + } + break; + case TEEC_CLOSE_SS: + { + teec_close_ss_args teec_close_ss; + if (copy_from_user + (&teec_close_ss, (void __user *)arg, + sizeof(teec_close_ss_args))) + return -EFAULT; + + OSA_ASSERT(teec_close_ss.tee_ss_ntw); + + result = _teec_close_session(teec_close_ss.tee_ss_ntw); + teec_close_ss.ret = result; + + if (copy_to_user + ((void __user *)arg, &teec_close_ss, + sizeof(teec_close_ss_args))) + return -EFAULT; + + } + break; + case TEEC_INVOKE_CMD: + { + uint32_t param_types, tmp_types; + uint32_t i; + uint8_t *tmpref_buf[OP_PARAM_NUM]; + void *save_buf_addr[OP_PARAM_NUM]; + + teec_invoke_cmd_args teec_invoke_cmd; + if (copy_from_user(&teec_invoke_cmd, + (void __user *)arg, + sizeof(teec_invoke_cmd_args))) + return -EFAULT; + + for (i = 0; i < OP_PARAM_NUM; i++) { + tmpref_buf[i] = NULL; + save_buf_addr[i] = NULL; + } + + if (teec_invoke_cmd.flags == OPERATION_EXIST) { + param_types = teec_invoke_cmd.paramTypes; + for (i = 0; i < OP_PARAM_NUM; i++) { + tmp_types = + TEEC_PARAM_TYPE_GET(param_types, i); + switch (tmp_types) { + case TEEC_MEMREF_TEMP_INPUT: + case TEEC_MEMREF_TEMP_OUTPUT: + case TEEC_MEMREF_TEMP_INOUT: + { + if (NULL != + teec_invoke_cmd.params[i].tmpref.buffer) { + tmpref_buf[i] = kmalloc + (teec_invoke_cmd. + params[i]. + tmpref. + size, + GFP_KERNEL); + if (NULL == tmpref_buf[i]) { + TZDD_DBG + ("%s(%d): Failed to allocate buffer\n", + __func__, + __LINE__); + return -ENOMEM; + } + + if (copy_from_user(tmpref_buf[i], + (void __user *) + (teec_invoke_cmd.params[i].tmpref.buffer), + teec_invoke_cmd.params[i].tmpref.size)) { + for (i = 0; i < OP_PARAM_NUM; i++) + if (NULL != tmpref_buf[i]) + kfree(tmpref_buf[i]); + + return -EFAULT; + } + save_buf_addr[i] = + teec_invoke_cmd.params[i].tmpref.buffer; + teec_invoke_cmd.params[i].tmpref.buffer = + tmpref_buf[i]; + } + } + break; + case TEEC_MEMREF_WHOLE: + case TEEC_MEMREF_PARTIAL_INPUT: + case TEEC_MEMREF_PARTIAL_OUTPUT: + case TEEC_MEMREF_PARTIAL_INOUT: + { + TEEC_MRVL_SharedMemory *teec_mrvl_shared_mem; + + save_buf_addr[i] = + teec_invoke_cmd.params[i].memref.parent; + teec_mrvl_shared_mem = + (TEEC_MRVL_SharedMemory *) (save_buf_addr[i]); + teec_invoke_cmd.params[i].memref.parent = + container_of(teec_mrvl_shared_mem, + TEEC_SharedMemory, + imp); + } + break; + default: + break; + } + } + } + OSA_ASSERT(teec_invoke_cmd.tee_ss_ntw); + result = _teec_invoke_command(teec_invoke_cmd.tee_ss_ntw, + teec_invoke_cmd.cmd_ID, + teec_invoke_cmd.started, + teec_invoke_cmd.flags, + teec_invoke_cmd.paramTypes, + &(teec_invoke_cmd.params), + &(teec_invoke_cmd.tee_op_ntw), + teec_invoke_cmd.tee_op_ntw_for_cancel, + &(teec_invoke_cmd.returnOrigin), + arg, + teec_invoke_cmd); + teec_invoke_cmd.ret = result; + + if (teec_invoke_cmd.flags == OPERATION_EXIST) { + if (TEEC_SUCCESS == teec_invoke_cmd.ret) { + param_types = + teec_invoke_cmd.paramTypes; + for (i = 0; i < OP_PARAM_NUM; i++) { + tmp_types = + TEEC_PARAM_TYPE_GET(param_types, i); + switch (tmp_types) { + case TEEC_MEMREF_TEMP_INPUT: + case TEEC_MEMREF_TEMP_OUTPUT: + case TEEC_MEMREF_TEMP_INOUT: + { + if (NULL != + teec_invoke_cmd.params[i].tmpref.buffer) { + teec_invoke_cmd.params[i].tmpref.buffer = + save_buf_addr[i]; + if (copy_to_user( + (void __user *) + (teec_invoke_cmd.params[i].tmpref.buffer), + tmpref_buf[i], + teec_invoke_cmd.params[i].tmpref.size)) { + for (i = 0; i < OP_PARAM_NUM; i++) + if (NULL != tmpref_buf[i]) + kfree(tmpref_buf[i]); + + return -EFAULT; + } + } + } + break; + default: + break; + } + } + } + } + if (copy_to_user + ((void __user *)arg, &teec_invoke_cmd, + sizeof(teec_invoke_cmd_args))) { + for (i = 0; i < OP_PARAM_NUM; i++) + if (NULL != tmpref_buf[i]) + kfree(tmpref_buf[i]); + + return -EFAULT; + } + for (i = 0; i < OP_PARAM_NUM; i++) + if (NULL != tmpref_buf[i]) + kfree(tmpref_buf[i]); + } + break; + case TEEC_REQUEST_CANCEL: + { + teec_requeset_cancel_args teec_requeset_cancel; + if (copy_from_user + (&teec_requeset_cancel, (void __user *)arg, + sizeof(teec_requeset_cancel_args))) + return -EFAULT; + + OSA_ASSERT(teec_requeset_cancel.tee_op_ntw); + + result = + _teec_request_cancellation(teec_requeset_cancel.tee_op_ntw); + teec_requeset_cancel.ret = result; + + if (copy_to_user + ((void __user *)arg, &teec_requeset_cancel, + sizeof(teec_requeset_cancel_args))) { + return -EFAULT; + } + } + break; + default: + TZDD_DBG("default\n"); + TZDD_DBG("GEU IOCTL invald command %x\n", cmd); + ret = -EINVAL; + break; + } + + return ret; +} + +#ifdef __ENABLE_PM_ +extern osa_sem_t _g_pm_lock; +static int32_t tzdd_suspend(struct platform_device *dev, pm_message_t state) +{ + int32_t ret; + ret = (osa_try_to_wait_for_sem(_g_pm_lock) ? -1 : 0); + return ret; +} + +static int32_t tzdd_resume(struct platform_device *dev) +{ + osa_release_sem(_g_pm_lock); + return 0; +} +#endif + +/* driver file ops */ +static struct file_operations _tzdd_fops = { + .open = tzdd_open, + .release = tzdd_close, + .unlocked_ioctl = tzdd_ioctl, + .owner = THIS_MODULE, +}; + +static struct platform_driver _tzdd_drv = { +#ifdef __ENABLE_PM_ + .suspend = tzdd_suspend, + .resume = tzdd_resume, +#endif + .driver = { + .name = "tzdd", + .owner = THIS_MODULE, + }, +}; + +static int32_t tzdd_cdev_init(tzdd_dev_t *dev) +{ + int32_t err, dev_nr; + + OSA_ASSERT(dev); + + if (tzdd_major) { + dev_nr = MKDEV(tzdd_major, tzdd_minor); + err = register_chrdev_region(dev_nr, 1, "tzdd"); + } else { + err = alloc_chrdev_region(&dev_nr, 0, 1, "tzdd"); + tzdd_major = MAJOR(dev_nr); + tzdd_minor = MINOR(dev_nr); + } + + if (err < 0) + goto _err0; + + cdev_init(&dev->cdev, &_tzdd_fops); + dev->cdev.owner = THIS_MODULE; + dev->cdev.ops = &_tzdd_fops; + + err = cdev_add(&dev->cdev, dev_nr, 1); + + /* Fail gracefully if need be */ + if (err) + goto _err1; + + err = platform_driver_register(&_tzdd_drv); + if (err) + goto _err2; + + _tzdd_class = class_create(THIS_MODULE, "tzdd"); + if (IS_ERR(_tzdd_class)) + goto _err3; + device_create(_tzdd_class, NULL, + MKDEV(tzdd_major, tzdd_minor), NULL, "tzdd"); + + return 0; + +_err3: + platform_driver_unregister(&_tzdd_drv); +_err2: + cdev_del(&dev->cdev); +_err1: + unregister_chrdev_region(MKDEV(tzdd_major, tzdd_minor), 1); +_err0: + return -1; +} + +static void tzdd_cdev_cleanup(tzdd_dev_t *dev) +{ + OSA_ASSERT(dev); + + device_destroy(_tzdd_class, MKDEV(tzdd_major, tzdd_minor)); + class_destroy(_tzdd_class); + platform_driver_unregister(&_tzdd_drv); + cdev_del(&dev->cdev); + unregister_chrdev_region(MKDEV(tzdd_major, tzdd_minor), 1); + + return; +} + +static int32_t __init tzdd_init(void) +{ + unsigned int ret = 0; + + TZDD_DBG("tzdd init\n"); + + /* allocate driver struct */ + tzdd_dev = kmalloc(sizeof(tzdd_dev_t), GFP_KERNEL); + if (NULL == tzdd_dev) { + TZDD_DBG("%s(%d): Failed to allocate buffer\n", __func__, + __LINE__); + return -ENOMEM; + } + memset(tzdd_dev, 0, sizeof(tzdd_dev_t)); + + ret = tzdd_cdev_init(tzdd_dev); + if (ret < 0) { + TZDD_DBG("Failed to init cdev\n"); + goto _fail_in_adding_cdev; + } + + ret = tzdd_init_core(tzdd_dev); + if (ret) { + TZDD_DBG("%s: failed to init core\n", __func__); + goto _fail_in_init_core; + } + + osa_list_init_head(&(tzdd_dev->pid_list)); + tzdd_dev->pid_mutex = osa_create_sem(1); + + printk(KERN_ERR "%s\n", TZDD_VERSION); + return 0; + +_fail_in_init_core: + tzdd_cdev_cleanup(tzdd_dev); +_fail_in_adding_cdev: + if (NULL != tzdd_dev) + kfree(tzdd_dev); + + return 0; +} + +static void __exit tzdd_cleanup(void) +{ + TZDD_DBG("tzdd cleanup\n"); + + osa_destroy_sem(tzdd_dev->pid_mutex); + tzdd_cleanup_core(tzdd_dev); + tzdd_cdev_cleanup(tzdd_dev); + if (NULL != tzdd_dev) + kfree(tzdd_dev); + + return; +} + +module_init(tzdd_init); +module_exit(tzdd_cleanup); diff --git a/arch/arm/mach-berlin/modules/tzdd/main/tzdd_main_core.c b/arch/arm/mach-berlin/modules/tzdd/main/tzdd_main_core.c new file mode 100644 index 00000000..4a4e02a2 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/main/tzdd_main_core.c @@ -0,0 +1,797 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#include +#include "tzdd_internal.h" + +#define INIT_MAGIC(_n) \ + do { \ + ((uint8_t *)_n)[0] = 'T'; \ + ((uint8_t *)_n)[1] = 'Z'; \ + ((uint8_t *)_n)[2] = 'D'; \ + ((uint8_t *)_n)[3] = 'D'; \ + } while (0) + +#define IS_MAGIC_VALID(_n) \ + (('T' == ((uint8_t *)_n)[0]) && \ + ('Z' == ((uint8_t *)_n)[1]) && \ + ('D' == ((uint8_t *)_n)[2]) && \ + ('D' == ((uint8_t *)_n)[3])) + +#define CLEANUP_MAGIC(_n) \ + do { \ + ((uint8_t *)_n)[0] = '\0'; \ + ((uint8_t *)_n)[1] = '\0'; \ + ((uint8_t *)_n)[2] = '\0'; \ + ((uint8_t *)_n)[3] = '\0'; \ + } while (0) + +static void _tzdd_ctx_list_add(TEEC_Context *teec_context, + tzdd_ctx_node_t *tzdd_ctx_node) +{ + tzdd_pid_list_t *tzdd_pid = NULL; + osa_list_t *entry; + uint32_t flag = 0; + pid_t pid; + + pid = current->tgid; + + osa_list_iterate(&(tzdd_dev->pid_list), entry) { + OSA_LIST_ENTRY(entry, tzdd_pid_list_t, node, tzdd_pid); + if (pid == tzdd_pid->pid) { + flag = FIND_PID_IN_PID_LIST; + break; + } + } + + if (flag == FIND_PID_IN_PID_LIST) { + osa_list_init_head(&(tzdd_ctx_node->shm_list)); + osa_list_init_head(&(tzdd_ctx_node->ss_list)); + + osa_list_add(&(tzdd_ctx_node->node), + &(tzdd_pid->ctx_list)); + INIT_MAGIC(tzdd_ctx_node->magic); + tzdd_ctx_node->tee_ctx_ntw = teec_context; + } + + return; +} + +static void _tzdd_ctx_list_del(tzdd_ctx_node_t *tzdd_ctx_node) +{ + tzdd_pid_list_t *tzdd_pid = NULL; + osa_list_t *entry; + uint32_t flag = 0; + pid_t pid; + + pid = current->tgid; + + osa_list_iterate(&(tzdd_dev->pid_list), entry) { + OSA_LIST_ENTRY(entry, tzdd_pid_list_t, node, tzdd_pid); + if (pid == tzdd_pid->pid) { + flag = FIND_PID_IN_PID_LIST; + break; + } + } + + if (flag == FIND_PID_IN_PID_LIST) { + if (!(IS_MAGIC_VALID(tzdd_ctx_node->magic))) + OSA_ASSERT(0); + CLEANUP_MAGIC(tzdd_ctx_node->magic); + + osa_list_del(&(tzdd_ctx_node->node)); + } + return; +} + +static void _tzdd_shm_list_add(TEEC_Context *teec_context, + TEEC_SharedMemory *teec_shared_memory, + tzdd_shm_node_t *tzdd_shm_node) +{ + tzdd_ctx_node_t *tzdd_ctx_node; + _TEEC_MRVL_Context *_teec_mrvl_context; + + _teec_mrvl_context = (_TEEC_MRVL_Context *)(teec_context->imp); + tzdd_ctx_node = (tzdd_ctx_node_t *)(_teec_mrvl_context->private_data); + + osa_list_add(&(tzdd_shm_node->node), &(tzdd_ctx_node->shm_list)); + INIT_MAGIC(tzdd_shm_node->magic); + tzdd_shm_node->tee_ctx_ntw = teec_context; + tzdd_shm_node->tee_shm_ntw = teec_shared_memory; + + return; +} + +static void _tzdd_shm_list_del(tzdd_shm_node_t *tzdd_shm_node) +{ + TEEC_Context *teec_context; + _TEEC_MRVL_Context *_teec_mrvl_context; + tzdd_ctx_node_t *tzdd_ctx_node; + + if (!(IS_MAGIC_VALID(tzdd_shm_node->magic))) + OSA_ASSERT(0); + + teec_context = tzdd_shm_node->tee_ctx_ntw; + _teec_mrvl_context = (_TEEC_MRVL_Context *)(teec_context->imp); + tzdd_ctx_node = (tzdd_ctx_node_t *)(_teec_mrvl_context->private_data); + + if (!(IS_MAGIC_VALID(tzdd_ctx_node->magic))) + OSA_ASSERT(0); + + CLEANUP_MAGIC(tzdd_shm_node->magic); + + osa_list_del(&(tzdd_shm_node->node)); + + return; +} + +static void _tzdd_ss_list_add(TEEC_Context *teec_context, + TEEC_Session *teec_session, + tzdd_ss_node_t *tzdd_ss_node) +{ + tzdd_ctx_node_t *tzdd_ctx_node; + _TEEC_MRVL_Context *_teec_mrvl_context; + + _teec_mrvl_context = (_TEEC_MRVL_Context *)(teec_context->imp); + tzdd_ctx_node = (tzdd_ctx_node_t *)(_teec_mrvl_context->private_data); + + osa_list_add(&(tzdd_ss_node->node), &(tzdd_ctx_node->ss_list)); + INIT_MAGIC(tzdd_ss_node->magic); + tzdd_ss_node->tee_ctx_ntw = teec_context; + tzdd_ss_node->tee_ss_ntw = teec_session; + + return; +} + +static void _tzdd_ss_list_del(tzdd_ss_node_t *tzdd_ss_node) +{ + TEEC_Context *teec_context; + _TEEC_MRVL_Context *_teec_mrvl_context; + tzdd_ctx_node_t *tzdd_ctx_node; + + if (!(IS_MAGIC_VALID(tzdd_ss_node->magic))) + OSA_ASSERT(0); + + teec_context = tzdd_ss_node->tee_ctx_ntw; + _teec_mrvl_context = (_TEEC_MRVL_Context *)(teec_context->imp); + tzdd_ctx_node = (tzdd_ctx_node_t *)(_teec_mrvl_context->private_data); + + if (!(IS_MAGIC_VALID(tzdd_ctx_node->magic))) + OSA_ASSERT(0); + + CLEANUP_MAGIC(tzdd_ss_node->magic); + + osa_list_del(&(tzdd_ss_node->node)); + + return; +} + +TEEC_Result _teec_initialize_context(const char *name, tee_impl *tee_ctx_ntw) +{ + TEEC_Context *teec_context; + TEEC_Result result; + tzdd_ctx_node_t *tzdd_ctx_node; + _TEEC_MRVL_Context *_teec_mrvl_context; + + if (!name || (!osa_memcmp(name, DEVICE_NAME, DEVICE_NAME_SIZE))) { + TZDD_DBG("_teec_initialize_context the name is tzdd\n"); + teec_context = + (TEEC_Context *) osa_kmem_alloc(sizeof(TEEC_Context)); + if (!teec_context) { + TZDD_DBG("Fail to malloc TEEC_Context\n"); + return TEEC_ERROR_OUT_OF_MEMORY; + } + + result = TEEC_InitializeContext(name, teec_context); + if (result != TEEC_SUCCESS) { + TZDD_DBG + ("%s(%d), Error in TEEC_InitializeContext,\ + result = 0x%x\n", + __func__, __LINE__, result); + *tee_ctx_ntw = NULL; + osa_kmem_free(teec_context); + + return result; + } + + *tee_ctx_ntw = (tee_impl) (&(teec_context->imp)); + + _teec_mrvl_context = (_TEEC_MRVL_Context *)(teec_context->imp); + tzdd_ctx_node = osa_kmem_alloc(sizeof(tzdd_ctx_node_t)); + OSA_ASSERT(tzdd_ctx_node != NULL); + + osa_wait_for_sem(tzdd_dev->pid_mutex, INFINITE); + _tzdd_ctx_list_add(teec_context, tzdd_ctx_node); + osa_release_sem(tzdd_dev->pid_mutex); + + _teec_mrvl_context->private_data = tzdd_ctx_node; + } else { + return TEEC_ERROR_BAD_PARAMETERS; + } + + return TEEC_SUCCESS; +} + +TEEC_Result _teec_final_context(tee_impl tee_ctx_ntw) +{ + TEEC_Context *teec_context; + TEEC_MRVL_Context *teec_mrvl_context; + tzdd_ctx_node_t *tzdd_ctx_node; + _TEEC_MRVL_Context *_teec_mrvl_context; + + /* Find the struct according to the member */ + teec_mrvl_context = (TEEC_MRVL_Context *) tee_ctx_ntw; + teec_context = container_of(teec_mrvl_context, TEEC_Context, imp); + + _teec_mrvl_context = (_TEEC_MRVL_Context *)(teec_context->imp); + tzdd_ctx_node = (tzdd_ctx_node_t *)(_teec_mrvl_context->private_data); + + osa_wait_for_sem(tzdd_dev->pid_mutex, INFINITE); + _tzdd_ctx_list_del(tzdd_ctx_node); + osa_release_sem(tzdd_dev->pid_mutex); + + osa_kmem_free(tzdd_ctx_node); + + TEEC_FinalizeContext(teec_context); + + osa_kmem_free(teec_context); + + return TEEC_SUCCESS; +} + +TEEC_Result _teec_map_shared_mem(teec_map_shared_mem_args teec_map_shared_mem, + tee_impl *tee_shm_ntw) +{ + /* only call TEEC_RegisterSharedMemory */ + TEEC_Context *teec_context; + TEEC_MRVL_Context *teec_mrvl_context; + TEEC_SharedMemory *teec_shared_memory; + TEEC_Result result; + tzdd_shm_node_t *tzdd_shm_node; + _TEEC_MRVL_SharedMemory *_teec_mrvl_sharedMem; + + teec_mrvl_context = + (TEEC_MRVL_Context *) (teec_map_shared_mem.tee_ctx_ntw); + teec_context = container_of(teec_mrvl_context, TEEC_Context, imp); + + teec_shared_memory = + (TEEC_SharedMemory *) osa_kmem_alloc(sizeof(TEEC_SharedMemory)); + if (!teec_shared_memory) { + TZDD_DBG("Fail to malloc TEEC_SharedMemory\n"); + return TEEC_ERROR_OUT_OF_MEMORY; + } + + teec_shared_memory->buffer = teec_map_shared_mem.buffer; + teec_shared_memory->size = teec_map_shared_mem.size; + teec_shared_memory->flags = teec_map_shared_mem.flags; + + result = TEEC_RegisterSharedMemory(teec_context, teec_shared_memory); + if (result != TEEC_SUCCESS) { + TZDD_DBG + ("%s(%d), Error in TEEC_RegisterSharedMemory, result = 0x%x\n", + __func__, __LINE__, result); + *tee_shm_ntw = NULL; + osa_kmem_free(teec_shared_memory); + + return result; + } + + *tee_shm_ntw = (tee_impl) (&(teec_shared_memory->imp)); + + _teec_mrvl_sharedMem = + (_TEEC_MRVL_SharedMemory *)(teec_shared_memory->imp); + tzdd_shm_node = osa_kmem_alloc(sizeof(tzdd_shm_node_t)); + OSA_ASSERT(tzdd_shm_node != NULL); + + osa_wait_for_sem(tzdd_dev->pid_mutex, INFINITE); + _tzdd_shm_list_add(teec_context, teec_shared_memory, tzdd_shm_node); + osa_release_sem(tzdd_dev->pid_mutex); + + _teec_mrvl_sharedMem->private_data = tzdd_shm_node; + + return TEEC_SUCCESS; +} + +TEEC_Result _teec_unmap_shared_mem(teec_unmap_shared_mem_args + teec_unmap_shared_mem, tee_impl tee_shm_ntw) +{ + TEEC_SharedMemory *teec_shared_memory; + TEEC_MRVL_SharedMemory *teec_mrvl_shared_mem; + _TEEC_MRVL_SharedMemory *_teec_mrvl_sharedMem; + tzdd_shm_node_t *tzdd_shm_node; + + teec_mrvl_shared_mem = (TEEC_MRVL_SharedMemory *) tee_shm_ntw; + teec_shared_memory = + container_of(teec_mrvl_shared_mem, TEEC_SharedMemory, imp); + + _teec_mrvl_sharedMem = (_TEEC_MRVL_SharedMemory *)(teec_shared_memory->imp); + tzdd_shm_node = (tzdd_shm_node_t *)(_teec_mrvl_sharedMem->private_data); + + osa_wait_for_sem(tzdd_dev->pid_mutex, INFINITE); + _tzdd_shm_list_del(tzdd_shm_node); + osa_release_sem(tzdd_dev->pid_mutex); + + osa_kmem_free(tzdd_shm_node); + + TEEC_ReleaseSharedMemory(teec_shared_memory); + + osa_kmem_free(teec_shared_memory); + + return TEEC_SUCCESS; +} + +TEEC_Result _teec_open_session(tee_impl tee_ctx_ntw, + tee_impl *tee_ss_ntw, + const TEEC_UUID *destination, + uint32_t connectionMethod, + const void *connectionData, + uint32_t flags, + uint32_t paramTypes, + TEEC_Parameter(*params)[4], + tee_impl *tee_op_ntw, + tee_impl tee_op_ntw_for_cancel, + uint32_t *returnOrigin, + unsigned long arg, + teec_open_ss_args open_ss_args) +{ + TEEC_Context *teec_context; + TEEC_MRVL_Context *teec_mrvl_context; + TEEC_Session *teec_session; + TEEC_Operation *teec_operation = NULL; + TEEC_Result result; + uint32_t i; + uint32_t tmp_for_cancel; + tzdd_ss_node_t *tzdd_ss_node; + _TEEC_MRVL_Session *_teec_mrvl_session; + + teec_mrvl_context = (TEEC_MRVL_Context *) (tee_ctx_ntw); + teec_context = container_of(teec_mrvl_context, TEEC_Context, imp); + + teec_session = (TEEC_Session *) osa_kmem_alloc(sizeof(TEEC_Session)); + if (!teec_session) { + TZDD_DBG("Fail to malloc TEEC_Session\n"); + return TEEC_ERROR_OUT_OF_MEMORY; + } + + *tee_ss_ntw = (tee_impl) (&(teec_session->imp)); + + if (flags == OPERATION_EXIST) { + if (copy_from_user + (&tmp_for_cancel, (void __user *)(tee_op_ntw_for_cancel), + 4)) { + osa_kmem_free(teec_session); + return -EFAULT; + } + + teec_operation = + (TEEC_Operation *) osa_kmem_alloc(sizeof(TEEC_Operation)); + if (!teec_operation) { + TZDD_DBG("Fail to malloc TEEC_Operation\n"); + osa_kmem_free(teec_session); + return TEEC_ERROR_OUT_OF_MEMORY; + } + teec_operation->started = 0; + teec_operation->paramTypes = paramTypes; + for (i = 0; i < 4; i++) + teec_operation->params[i] = (*params)[i]; + + *tee_op_ntw = (tee_impl) (&(teec_operation->imp)); + tmp_for_cancel = (uint32_t) (&(teec_operation->imp)); + + /* Add copy_to_user here, for cancellation */ + if (copy_to_user + ((void __user *)(tee_op_ntw_for_cancel), &tmp_for_cancel, + 4)) { + osa_kmem_free(teec_operation); + osa_kmem_free(teec_session); + return -EFAULT; + } + } else { + *tee_op_ntw = NULL; + } + + result = TEEC_OpenSession(teec_context, + teec_session, + destination, + connectionMethod, + connectionData, teec_operation, returnOrigin); + + if (result != TEEC_SUCCESS) { + TZDD_DBG("%s(%d), Error in TEEC_OpenSession, result = 0x%x\n", + __func__, __LINE__, result); + *tee_ss_ntw = NULL; + osa_kmem_free(teec_session); + + if (flags == OPERATION_EXIST) { + for (i = 0; i < 4; i++) + (*params)[i] = teec_operation->params[i]; + + *tee_op_ntw = NULL; + osa_kmem_free(teec_operation); + } + return result; + } + + /* Copy param in order to return to CA */ + if (flags == OPERATION_EXIST) { + for (i = 0; i < 4; i++) + (*params)[i] = teec_operation->params[i]; + + osa_kmem_free(teec_operation); + } + + _teec_mrvl_session = + (_TEEC_MRVL_Session*)(teec_session->imp); + tzdd_ss_node = osa_kmem_alloc(sizeof(tzdd_ss_node_t)); + OSA_ASSERT(tzdd_ss_node != NULL); + + osa_wait_for_sem(tzdd_dev->pid_mutex, INFINITE); + _tzdd_ss_list_add(teec_context, teec_session, tzdd_ss_node); + osa_release_sem(tzdd_dev->pid_mutex); + + _teec_mrvl_session->private_data = tzdd_ss_node; + + return TEEC_SUCCESS; +} + +TEEC_Result _teec_close_session(tee_impl tee_ss_ntw) +{ + TEEC_Session *teec_session; + TEEC_MRVL_Session *teec_mrvl_session; + tzdd_ss_node_t *tzdd_ss_node; + _TEEC_MRVL_Session *_teec_mrvl_session; + + teec_mrvl_session = (TEEC_MRVL_Session *) (tee_ss_ntw); + teec_session = container_of(teec_mrvl_session, TEEC_Session, imp); + + _teec_mrvl_session = (_TEEC_MRVL_Session *)(teec_session->imp); + tzdd_ss_node = (tzdd_ss_node_t *)(_teec_mrvl_session->private_data); + + osa_wait_for_sem(tzdd_dev->pid_mutex, INFINITE); + _tzdd_ss_list_del(tzdd_ss_node); + osa_release_sem(tzdd_dev->pid_mutex); + + osa_kmem_free(tzdd_ss_node); + + TEEC_CloseSession(teec_session); + + osa_kmem_free(teec_session); + + return TEEC_SUCCESS; +} + +TEEC_Result _teec_invoke_command(tee_impl tee_ss_ntw, + uint32_t cmd_ID, + uint32_t started, + uint32_t flags, + uint32_t paramTypes, + TEEC_Parameter(*params)[4], + tee_impl *tee_op_ntw, + tee_impl tee_op_ntw_for_cancel, + uint32_t *returnOrigin, + unsigned long arg, + teec_invoke_cmd_args invoke_cmd_args) +{ + TEEC_Session *teec_session; + TEEC_MRVL_Session *teec_mrvl_session; + TEEC_Operation *teec_operation = NULL; + TEEC_Result result; + uint32_t i; + uint32_t tmp_for_cancel; + + teec_mrvl_session = (TEEC_MRVL_Session *) (tee_ss_ntw); + teec_session = container_of(teec_mrvl_session, TEEC_Session, imp); + + if (flags == OPERATION_EXIST) { + if (copy_from_user + (&tmp_for_cancel, (void __user *)(tee_op_ntw_for_cancel), + 4)) { + return -EFAULT; + } + + teec_operation = + (TEEC_Operation *) osa_kmem_alloc(sizeof(TEEC_Operation)); + if (!teec_operation) { + TZDD_DBG("Fail to malloc TEEC_Operation\n"); + return TEEC_ERROR_OUT_OF_MEMORY; + } + teec_operation->started = 0; + teec_operation->paramTypes = paramTypes; + for (i = 0; i < 4; i++) + teec_operation->params[i] = (*params)[i]; + + *tee_op_ntw = (tee_impl) (&(teec_operation->imp)); + tmp_for_cancel = (uint32_t) (&(teec_operation->imp)); + + /* Add copy_to_user here, for cancellation */ + if (copy_to_user + ((void __user *)(tee_op_ntw_for_cancel), &tmp_for_cancel, + 4)) { + osa_kmem_free(teec_operation); + return -EFAULT; + } + } else { + *tee_op_ntw = NULL; + } + + result = TEEC_InvokeCommand(teec_session, + cmd_ID, teec_operation, returnOrigin); + + if (result != TEEC_SUCCESS) { + TZDD_DBG("%s(%d), Error in TEEC_InvokeCommand, result = 0x%x\n", + __func__, __LINE__, result); + if (flags == OPERATION_EXIST) { + for (i = 0; i < 4; i++) + (*params)[i] = teec_operation->params[i]; + + *tee_op_ntw = NULL; + osa_kmem_free(teec_operation); + } + return result; + } + + /* Copy param in order to return to CA */ + if (flags == OPERATION_EXIST) { + for (i = 0; i < 4; i++) + (*params)[i] = teec_operation->params[i]; + + osa_kmem_free(teec_operation); + } + + return TEEC_SUCCESS; +} + +TEEC_Result _teec_request_cancellation(tee_impl tee_op_ntw) +{ + TEEC_Operation *teec_operation; + TEEC_MRVL_Operation *teec_mrvl_operation; + + teec_mrvl_operation = (TEEC_MRVL_Operation *) tee_op_ntw; + teec_operation = container_of(teec_mrvl_operation, TEEC_Operation, imp); + + TEEC_RequestCancellation(teec_operation); + + return TEEC_SUCCESS; +} + +/* + * Name: tzdd_get_first_req + * + * Description: get first node from request list + * + * Params: + * node - node pointer + * + * Returns: + * true - have request + * false - have no request + * + * Notes: none + * + */ +bool tzdd_get_first_req(tee_msg_head_t **tee_msg_head) +{ + struct osa_list *first; + + *tee_msg_head = NULL; + + osa_wait_for_mutex(tzdd_dev->req_mutex, INFINITE); + if (osa_list_empty(&tzdd_dev->req_list)) { + osa_release_mutex(tzdd_dev->req_mutex); + return false; + } else { + first = (tzdd_dev->req_list).next; + OSA_LIST_ENTRY(first, tee_msg_head_t, node, *tee_msg_head); + } + osa_release_mutex(tzdd_dev->req_mutex); + + return true; +} + +/* + * Name: tzdd_add_node_to_req_list + * + * Description: add node to request list + * + * Params: + * list - list pointer + * + * Returns: none + * + * Notes: none + * + */ +void tzdd_add_node_to_req_list(osa_list_t *list) +{ + osa_wait_for_mutex(tzdd_dev->req_mutex, INFINITE); + osa_list_add_tail(list, &tzdd_dev->req_list); + osa_release_mutex(tzdd_dev->req_mutex); + + return; +} + +/* + * Name: tzdd_chk_node_on_req_list + * + * Description: check node to request list + * + * Params: + * list - list pointer + * + * Returns: + * true - node is on the list + * false - node is not exist + * + * Notes: none + * + */ +bool tzdd_chk_node_on_req_list(osa_list_t *list) +{ + struct osa_list *entry; + + osa_wait_for_mutex(tzdd_dev->req_mutex, INFINITE); + osa_list_iterate(&tzdd_dev->req_list, entry) { + if (entry == list) { + osa_release_mutex(tzdd_dev->req_mutex); + return true; + } + } + osa_release_mutex(tzdd_dev->req_mutex); + + return false; +} + +/* + * Name: tzdd_del_node_from_req_list + * + * Description: delete node from request list + * + * Params: + * list - list pointer + * + * Returns: + * true - node has deleted from the list + * false - node is not exist + * + * Notes: none + * + */ +bool tzdd_del_node_from_req_list(osa_list_t *list) +{ + struct osa_list *entry, *next; + + osa_wait_for_mutex(tzdd_dev->req_mutex, INFINITE); + osa_list_iterate_safe(&tzdd_dev->req_list, entry, next) { + if (entry == list) { + osa_list_del(entry); + osa_release_mutex(tzdd_dev->req_mutex); + return true; + } + } + osa_release_mutex(tzdd_dev->req_mutex); + + return false; +} + +/* + * Name: tzdd_have_req + * + * Description: check there have some request in the run list + * and the request list or not + * + * Params: none + * + * Returns: + * true - have request + * false - have no request + * + * Notes: none + * + */ +bool tzdd_have_req(void) +{ + osa_wait_for_mutex(tzdd_dev->req_mutex, INFINITE); + if (!osa_list_empty(&tzdd_dev->req_list)) { + osa_release_mutex(tzdd_dev->req_mutex); + return true; + } + osa_release_mutex(tzdd_dev->req_mutex); + + return false; +} + +uint32_t tzdd_get_req_num_in_list(void) +{ + struct osa_list *entry; + uint32_t n = 0; + + osa_wait_for_mutex(tzdd_dev->req_mutex, INFINITE); + osa_list_iterate(&tzdd_dev->req_list, entry) { + n++; + } + osa_release_mutex(tzdd_dev->req_mutex); + + return n; +} + +#ifdef TEE_DEBUG_ENALBE_PROC_FS_LOG +extern void tee_dbg_proc_fs_init(void); +extern void tee_dbg_proc_fs_cleanup(void); +#endif + +int32_t tzdd_init_core(tzdd_dev_t *dev) +{ + int32_t ret; + + osa_list_init_head(&dev->req_list); + dev->req_mutex = osa_create_mutex(); + + ret = tee_cm_init(); + if (ret) { + TZDD_DBG("%s: failed to init cm\n", __func__); + + goto _failure_in_cm_init; + } +#ifdef TEE_DEBUG_ENALBE_PROC_FS_LOG + tee_dbg_proc_fs_init(); +#endif + + ret = tzdd_proxy_thread_init(dev); + if (ret) { + TZDD_DBG("%s: failed to init proxy threads\n", __func__); + goto _failure_in_proxy_thread_init; + } + + ret = (int32_t)teec_cb_module_init(); + if (ret) { + TZDD_DBG("%s: failed to init callback module\n", __FUNCTION__); + goto _failure_in_cb_init; + } + ret = (int32_t)teec_reg_time_cb(); + if (ret) { + TZDD_DBG("%s: failed to reg time cb\n", __FUNCTION__); + goto _failure_in_reg_time_cb; + } + return 0; + +_failure_in_reg_time_cb: + teec_cb_module_cleanup(); +/* _failure_in_kd_init: */ +_failure_in_cb_init: + tzdd_proxy_thread_cleanup(dev); +_failure_in_proxy_thread_init: +_failure_in_cm_init: + + tee_cm_cleanup(); + return ret; +} + +void tzdd_cleanup_core(tzdd_dev_t *dev) +{ + teec_unreg_time_cb(); + teec_cb_module_cleanup(); + tzdd_proxy_thread_cleanup(dev); +#ifdef TEE_DEBUG_ENALBE_PROC_FS_LOG + tee_dbg_proc_fs_cleanup(); +#endif + tee_cm_cleanup(); + + osa_destroy_mutex(dev->req_mutex); + return; +} diff --git a/arch/arm/mach-berlin/modules/tzdd/main/tzdd_pt.c b/arch/arm/mach-berlin/modules/tzdd/main/tzdd_pt.c new file mode 100644 index 00000000..22a96691 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/main/tzdd_pt.c @@ -0,0 +1,256 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#include "tzdd_internal.h" +#include "tzdd_pt_core.h" + +#define CALL_IPI (0xF0000000) + +static uint32_t _g_tzdd_send_num; +static bool _g_pt_thread_stop_flag; +#ifdef __ENABLE_PM_ +static struct pm_qos_request _g_tzdd_lpm_cons; +#endif + +#ifdef TEE_DEBUG_ENALBE_PROC_FS_LOG +uint32_t g_msg_sent; +uint32_t g_msg_recv; +uint32_t g_msg_fake; +uint32_t g_msg_ignd; +uint32_t g_pre_ipi_num; +uint32_t g_pst_ipi_num; +uint32_t g_pre_dmy_num; +uint32_t g_pst_dmy_num; +uint32_t g_wait_for; +uint32_t g_wait_for_idle = 0; +uint32_t g_wait_for_command = 0; +#endif /* TEE_DEBUG_ENALBE_PROC_FS_LOG */ + +#ifdef __ENABLE_PM_ +osa_sem_t _g_pm_lock; +#endif +extern bool tee_cm_tw_is_idle(void); + +static int tzdd_proxy_thread(void *data) +{ + tzdd_dev_t *dev; + tee_msg_head_t *tee_msg_send_head = NULL; + + //uint32_t nice; + + uint32_t res_size = 0; + uint32_t msg_flag; + + uint32_t ret; + bool list_ret; + bool is_lpm_blocked = false; + + struct sched_param param; + + set_cpus_allowed_ptr(current, cpumask_of(0)); + TZDD_DBG("tzdd_proxy_thread on cpu %d\n", smp_processor_id()); + + param.sched_priority = MAX_RT_PRIO - 1; + + sched_setscheduler(current, SCHED_FIFO, ¶m); +#if 0 + nice = task_nice(current); + TZDD_DBG("tzdd_proxy_thread: nice = %d\n", nice); +#endif + + dev = (tzdd_dev_t *) data; + + while (1) { + while (tzdd_get_first_req(&tee_msg_send_head)) { + TZDD_DBG + ("%s: tee_msg_send_head (0x%08x) =\ + {magic (%c%c%c%c),\ + size (0x%08x)},\ + cmd (0x%x)\n",\ + __func__, (uint32_t) tee_msg_send_head, + tee_msg_send_head->magic[0], + tee_msg_send_head->magic[1], + tee_msg_send_head->magic[2], + tee_msg_send_head->magic[3], + tee_msg_send_head->msg_sz, + *((uint32_t *) (tee_msg_send_head) + 8)); + + list_ret = + tzdd_del_node_from_req_list(& + (tee_msg_send_head-> + node)); + OSA_ASSERT(list_ret); + + tzdd_pt_send(tee_msg_send_head); + + if (false == is_lpm_blocked) { + /* block LPM D1P and deeper than D1P */ +#ifdef __ENABLE_PM_ + osa_wait_for_sem(_g_pm_lock, INFINITE); + pm_qos_update_request(&_g_tzdd_lpm_cons, + PM_QOS_CPUIDLE_BLOCK_AXI_VALUE); +#endif + is_lpm_blocked = true; + } + tee_add_time_record_point("npct"); + /* Call IPI to TW */ +#ifdef TEE_DEBUG_ENALBE_PROC_FS_LOG + g_pre_ipi_num++; +#endif + tee_cm_smi(CALL_IPI); +#ifdef TEE_DEBUG_ENALBE_PROC_FS_LOG + g_pst_ipi_num++; +#endif + tee_add_time_record_point("npbt"); + _g_tzdd_send_num++; +#ifdef TEE_DEBUG_ENALBE_PROC_FS_LOG + g_msg_sent++; +#endif + } + + res_size = tee_cm_get_data_size(); + + while (res_size) { + + msg_flag = tzdd_pt_recv(); + if (msg_flag == TEE_MSG_IGNORE_COUNTER) { + /* do nothing */ +#ifdef TEE_DEBUG_ENALBE_PROC_FS_LOG + g_msg_ignd++; +#endif + } else { /* TEE_MSG_FAKE && TEE_MSG_NORMAL */ +#ifdef TEE_DEBUG_ENALBE_PROC_FS_LOG + if (TEE_MSG_NORMAL == msg_flag) + g_msg_recv++; + else if (TEE_MSG_FAKE == msg_flag) + g_msg_fake++; + else + OSA_ASSERT(0); +#endif + _g_tzdd_send_num--; + } + + res_size = tee_cm_get_data_size(); + } + tee_add_time_record_point("nprm"); + if (_g_tzdd_send_num) { +#ifdef TEE_DEBUG_ENALBE_PROC_FS_LOG + g_pre_dmy_num++; +#endif + if (tee_cm_tw_is_idle()) { + g_wait_for = 1; + g_wait_for_idle++; + ret = osa_wait_for_sem(dev->pt_sem, 5); + g_wait_for = 0; + if (ret != OSA_OK) { + tee_cm_smi(0); + } + } else { + tee_cm_smi(0); + } +#ifdef TEE_DEBUG_ENALBE_PROC_FS_LOG + g_pst_dmy_num++; +#endif + } else { + /* release D1P LPM constraint */ + if (true == is_lpm_blocked) { +#ifdef __ENABLE_PM_ + pm_qos_update_request(&_g_tzdd_lpm_cons, + PM_QOS_CPUIDLE_BLOCK_DEFAULT_VALUE); + osa_release_sem(_g_pm_lock); +#endif + is_lpm_blocked = false; + } + + tee_add_time_record_point("npwa"); + g_wait_for = 2; + g_wait_for_command++; + ret = osa_wait_for_sem(dev->pt_sem, INFINITE); + g_wait_for = 0; + OSA_ASSERT(!ret); + + if (true == _g_pt_thread_stop_flag) { + TZDD_DBG("tzdd_proxy_thread(),P-break\n"); + break; + } + tee_add_time_record_point("npet"); + } + } + + TZDD_DBG("proxy thread exit.\n"); + return 0; + +} + +//static irqreturn_t _tw_exit_idle(int irq, void *dev) +uint32_t tee_cm_get_wakeup_count(void); +static void _tw_exit_idle(void *data) +{ + static uint32_t ipi_count = 0; + if (ipi_count != tee_cm_get_wakeup_count()) { + ipi_count++; + osa_release_sem(tzdd_dev->pt_sem); + } +} +extern void register_user_ipi(void (*handler)(void *), void *data); +int tzdd_proxy_thread_init(tzdd_dev_t *dev) +{ +#ifdef __ENABLE_PM_ + /* initialize the qos list at the first time */ + _g_tzdd_lpm_cons.name = "TZDD"; + pm_qos_add_request(&_g_tzdd_lpm_cons, + PM_QOS_CPUIDLE_BLOCK, + PM_QOS_CPUIDLE_BLOCK_DEFAULT_VALUE); + _g_pm_lock = osa_create_sem(1); +#endif +#if 0 + ret = request_irq(0xF, _tw_exit_idle, 0, "tw_exit", NULL); + if (ret) { + TZDD_DBG("%s: failed to register irq. ret is %d\n", __func__, ret); + return ret; + } +#endif + register_user_ipi(_tw_exit_idle, NULL); + + dev->pt_sem = osa_create_sem(0); + + dev->proxy_thd = kthread_run(tzdd_proxy_thread, dev, "tzdd"); + + if (!dev->proxy_thd) { + TZDD_DBG("%s: failed to create proxy thread.\n", __func__); + return -1; + } + + return 0; +} + +void tzdd_proxy_thread_cleanup(tzdd_dev_t *dev) +{ + _g_pt_thread_stop_flag = true; + osa_release_sem(dev->pt_sem); + osa_destroy_sem(dev->pt_sem); + +#ifdef __ENABLE_PM_ + osa_destroy_sem(_g_pm_lock); + + pm_qos_remove_request(&_g_tzdd_lpm_cons); +#endif + + return; +} diff --git a/arch/arm/mach-berlin/modules/tzdd/main/tzdd_pt_core.c b/arch/arm/mach-berlin/modules/tzdd/main/tzdd_pt_core.c new file mode 100644 index 00000000..17c85f12 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/main/tzdd_pt_core.c @@ -0,0 +1,136 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#include "tzdd_internal.h" +#include "tzdd_pt_core.h" + +static uint32_t _check_message_flag(tee_msg_head_t tee_msg_head) +{ + /* + TEE_MSG_FAKE: (the fake message for SSTd) + 1. tzdd_send_num -- + 2. read the msg from RB, then discard it + TEE_MSG_IGNORE_COUNTER: (the real message for SSTd) + 1. handle the msg as normal + 2. did NOT modify the tzdd_send_num + */ + if ((tee_msg_head.msg_prop.type == TEE_MSG_TYPE_CONTROL) && + (tee_msg_head.msg_prop.ctl.cmd == TEE_MSG_CTL_TRAPPED)) { + return TEE_MSG_FAKE; + } + + if (tee_msg_head.msg_prop.bp.has_trapped == true) + return TEE_MSG_IGNORE_COUNTER; + + return TEE_MSG_NORMAL; +} + +void tzdd_pt_send(tee_msg_head_t *tee_msg_send_head) +{ + tee_msgm_t tee_msgm_handle; + tee_cmd_t tee_msg_cmd; + + /* deal with cancellation */ + if (tee_msg_send_head->msg_prop.bp.stat == TEE_MSG_STAT_CAN) { + void *arg; + + tee_msgm_handle = tee_msgm_create_inst(); + tee_msgm_set_msg_buf(tee_msgm_handle, NULL, + (uint8_t *) tee_msg_send_head + + sizeof(tee_msg_head_t), NULL); + tee_msgm_get_cmd(tee_msgm_handle, &tee_msg_cmd, NULL); + + if (tee_msg_cmd == TEE_CMD_OPEN_SS) { + tee_set_ret_open_ss_arg_t tee_set_ret_open_ss_arg; + tee_set_ret_open_ss_arg.ss_tw = NULL; + tee_set_ret_open_ss_arg.ret_orig = TEEC_ORIGIN_API; + tee_set_ret_open_ss_arg.ret = TEEC_ERROR_CANCEL; + + arg = &tee_set_ret_open_ss_arg; + } else if (tee_msg_cmd == TEE_CMD_INV_OP) { + tee_set_ret_inv_op_arg_t tee_set_ret_inv_op_arg; + tee_set_ret_inv_op_arg.ret_orig = TEEC_ORIGIN_API; + tee_set_ret_inv_op_arg.ret = TEEC_ERROR_CANCEL; + + arg = &tee_set_ret_inv_op_arg; + } else { + OSA_ASSERT(0); + } + + tee_msgm_set_ret(tee_msgm_handle, arg); + + tee_msgm_destroy_inst(tee_msgm_handle); + + osa_release_sem(tee_msg_send_head->comp); + } + /* Call ComM to copy the buffer into RC */ + tee_cm_send_data((uint8_t *) tee_msg_send_head); + + return; +} + +uint32_t tzdd_pt_recv(void) +{ + tee_msg_head_t *tee_msg_recv_head; + tee_msgm_t tee_msgm_handle; + tee_cmd_t tee_msg_cmd; + tee_msg_head_t tee_msg_head; + uint32_t msg_flag; + + tee_cm_get_msgm_head(&tee_msg_head); + msg_flag = _check_message_flag(tee_msg_head); + + if (msg_flag != TEE_MSG_FAKE) { + TZDD_DBG + ("%s: tee_msg_recv_head =\ + {magic (%c%c%c%c) ,\ + size (0x%08x)},\ + cmd (0x%x),\ + msg_flag (0x%x)\n",\ + __func__, tee_msg_head.magic[0], tee_msg_head.magic[1], + tee_msg_head.magic[2], tee_msg_head.magic[3], + tee_msg_head.msg_sz, + *((uint32_t *) (tee_msg_head.tee_msg) + 8), msg_flag); + + tee_msg_recv_head = tee_msg_head.tee_msg; + tee_cm_recv_data((uint8_t *) tee_msg_recv_head); + + tee_msgm_handle = tee_msgm_create_inst(); + tee_msgm_set_msg_buf(tee_msgm_handle, NULL, + (uint8_t *) tee_msg_recv_head + + sizeof(tee_msg_head_t), NULL); + tee_msgm_get_cmd(tee_msgm_handle, &tee_msg_cmd, NULL); + if (tee_msg_cmd == TEE_CMD_CAN_OP) { + osa_destroy_sem(tee_msg_recv_head->comp); + osa_kmem_free(tee_msg_recv_head); + } else { + + osa_release_sem(tee_msg_recv_head->comp); + } + tee_msgm_destroy_inst(tee_msgm_handle); + } else if (msg_flag == TEE_MSG_FAKE) { + /* delete fake msg from msgQ */ + tee_msg_head_t tee_msg_head_for_fake_msg; + + TZDD_DBG("%s: FAKE MSG, msg_flag (0x%x)\n", __func__, + msg_flag); + tee_cm_recv_data((uint8_t *)&tee_msg_head_for_fake_msg); + } + return msg_flag; +} diff --git a/arch/arm/mach-berlin/modules/tzdd/main/tzdd_pt_core.h b/arch/arm/mach-berlin/modules/tzdd/main/tzdd_pt_core.h new file mode 100644 index 00000000..913227e6 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/main/tzdd_pt_core.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#ifndef _TZDD_PT_CORE_H_ +#define _TZDD_PT_CORE_H_ + +#define TEE_MSG_NORMAL (0x00000000) +#define TEE_MSG_FAKE (0x00000001) +#define TEE_MSG_IGNORE_COUNTER (0x00000002) + +void tzdd_pt_send(tee_msg_head_t *tee_msg_send_head); +uint32_t tzdd_pt_recv(void); + +#endif /* _TZDD_PT_CORE_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/main/tzdd_sstd.h b/arch/arm/mach-berlin/modules/tzdd/main/tzdd_sstd.h new file mode 100644 index 00000000..cbc20828 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/main/tzdd_sstd.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#ifndef _TZDD_SSTD_H_ +#define _TZDD_SSTD_H_ + +#define MRVL_LOGIN_APPLICATION_DAEMON (0x80000000) + +#endif /* _TZDD_SSTD_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/memm/tee_memm.c b/arch/arm/mach-berlin/modules/tzdd/memm/tee_memm.c new file mode 100644 index 00000000..b4c671ef --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/memm/tee_memm.c @@ -0,0 +1,246 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#include "tee_memm_internal.h" + +#define MAGIC_NUM (4) + +#define INIT_MEMM_MAGIC(_n) \ + do { \ + ((uint8_t *)_n)[0] = 'M'; \ + ((uint8_t *)_n)[1] = 'E'; \ + ((uint8_t *)_n)[2] = 'M'; \ + ((uint8_t *)_n)[3] = 'M'; \ + } while (0); + +#define IS_MEMM_MAGIC_VALID(_n) \ + (('M' == ((uint8_t *)_n)[0]) && \ + ('E' == ((uint8_t *)_n)[1]) && \ + ('M' == ((uint8_t *)_n)[2]) && \ + ('M' == ((uint8_t *)_n)[3])) + +#define CLEANUP_MEMM_MAGIC(_n) \ + do { \ + ((uint8_t *)_n)[0] = '\0'; \ + ((uint8_t *)_n)[1] = '\0'; \ + ((uint8_t *)_n)[2] = '\0'; \ + ((uint8_t *)_n)[3] = '\0'; \ + } while (0); + +typedef struct _tee_memm_handle_t { + uint8_t magic[MAGIC_NUM]; + uint8_t *page_list_buf; + uint32_t page_list_size; + uint32_t reserve; +} tee_memm_handle_t; + +tee_memm_ss_t tee_memm_create_ss(void) +{ + tee_memm_handle_t *tee_memm_handle; + + tee_memm_handle = osa_kmem_alloc(sizeof(tee_memm_handle_t)); + if (!tee_memm_handle) + return NULL; + + memset(tee_memm_handle, 0, sizeof(tee_memm_handle_t)); + INIT_MEMM_MAGIC(tee_memm_handle->magic); + + return (tee_memm_ss_t) tee_memm_handle; +} + +void tee_memm_destroy_ss(tee_memm_ss_t tee_memm_ss) +{ + tee_memm_handle_t *tee_memm_handle; + + if (!tee_memm_ss) + return; + + tee_memm_handle = (tee_memm_handle_t *) tee_memm_ss; + if (!(IS_MEMM_MAGIC_VALID(tee_memm_handle->magic))) + return; + + CLEANUP_MEMM_MAGIC(tee_memm_handle->magic); + + if (tee_memm_handle->page_list_buf) + osa_kmem_free(tee_memm_handle->page_list_buf); + osa_kmem_free(tee_memm_handle); + + return; +} + +tee_stat_t tee_memm_calc_pages_num(tee_memm_ss_t tee_memm_ss, + void *virt, uint32_t size, + uint32_t *pages_num) +{ + uint32_t num = 0; + uint32_t base = (uint32_t) virt; + uint32_t length = size; + tee_memm_handle_t *tee_memm_handle; + + uint8_t *buf; + tee_mem_page_t *page; + tee_mem_page_t tmp; + uint32_t tmp_len = 0; + uint32_t count = 0; + + if (!tee_memm_ss || !virt || !pages_num) + OSA_ASSERT(0); + + tee_memm_handle = (tee_memm_handle_t *) tee_memm_ss; + if (!(IS_MEMM_MAGIC_VALID(tee_memm_handle->magic))) + OSA_ASSERT(0); + + size += base & (~PAGE_MASK); + num = size / PAGE_SIZE; + if (size & (PAGE_SIZE - 1)) + num ++; + + /* *pages_num = num; */ + + buf = osa_kmem_alloc(num * sizeof(tee_mem_page_t)); + OSA_ASSERT(buf != NULL); + + page = (tee_mem_page_t *)buf; + tmp.phy_addr = NULL; + tmp.len = 0; + while (base < ((ulong_t) virt + length)) { + page->phy_addr = osa_virt_to_phys((void *)base); + if (base == (ulong_t) virt) { + /* the first page */ + tmp.len = PAGE_SIZE - (base - (base & PAGE_MASK)); + if (tmp.len > length) + tmp.len = length; + tmp_len = tmp.len; + } else if (((ulong_t) virt + length) - base <= PAGE_SIZE) { + /* the last page */ + tmp_len = ((ulong_t) virt + length) - base; + } else { + tmp_len = PAGE_SIZE; + } + + if (page->phy_addr == (tmp.phy_addr + tmp.len)) { + page --; + page->len += tmp_len; + } else { + page->len = tmp_len; + count ++; + } + + tmp.phy_addr = page->phy_addr; + tmp.len = page->len; + page ++; + + base = (base & PAGE_MASK) + PAGE_SIZE; + } + + *pages_num = count; + + tee_memm_handle->page_list_buf = buf; + tee_memm_handle->page_list_size = count * sizeof(tee_mem_page_t); + + return TEEC_SUCCESS; +} + +tee_stat_t tee_memm_parse_phys_pages(tee_memm_ss_t tee_memm_ss, + void *virt, uint32_t length, + tee_mem_page_t *pages, uint32_t pages_num) +{ + tee_memm_handle_t *tee_memm_handle; + + if (!tee_memm_ss || !virt || !pages) + OSA_ASSERT(0); + + tee_memm_handle = (tee_memm_handle_t *) tee_memm_ss; + if (!(IS_MEMM_MAGIC_VALID(tee_memm_handle->magic))) + OSA_ASSERT(0); + + memcpy(pages, tee_memm_handle->page_list_buf, + tee_memm_handle->page_list_size); + + return TEEC_SUCCESS; +} + +tee_stat_t tee_memm_get_user_mem(tee_memm_ss_t tee_memm_ss, + void __user *virt, uint32_t size, + void __kernel **kvirt) +{ + ulong_t start = (ulong_t) virt; + ulong_t end = (start + size + PAGE_SIZE - 1) & PAGE_MASK; + + struct vm_area_struct *vma; + ulong_t cur = start & PAGE_MASK, cur_end; + int32_t err, write; + tee_memm_handle_t *tee_memm_handle; + + OSA_ASSERT(virt && tee_memm_ss); + + tee_memm_handle = (tee_memm_handle_t *) tee_memm_ss; + if (!(IS_MEMM_MAGIC_VALID(tee_memm_handle->magic))) + OSA_ASSERT(0); + + down_read(¤t->mm->mmap_sem); + + do { + vma = find_vma(current->mm, cur); + if (!vma) { + up_read(¤t->mm->mmap_sem); + *kvirt = NULL; + return TEEC_SUCCESS; + } + cur_end = ((end <= vma->vm_end) ? end : vma->vm_end); + + /* this vma is NOT mmap-ed and pfn-direct mapped */ + if (!(vma->vm_flags & (VM_IO | VM_PFNMAP))) { + write = ((vma->vm_flags & VM_WRITE) != 0); + /* NOTE: no get_page since overall sync-flow */ + err = get_user_pages(current, current->mm, + (ulong_t) cur, + (cur_end - cur) >> PAGE_SHIFT, + write, 0, NULL, NULL); + if (err < 0) { + up_read(¤t->mm->mmap_sem); + *kvirt = NULL; + return TEEC_SUCCESS; + } + } + + cur = cur_end; + } while (cur_end < end); + + up_read(¤t->mm->mmap_sem); + + *kvirt = virt; + + /* fake wtm_vm handle here */ + return TEEC_SUCCESS; +} + +void tee_memm_put_user_mem(tee_memm_ss_t tee_memm_ss, void *vm) +{ + tee_memm_handle_t *tee_memm_handle; + + tee_memm_handle = (tee_memm_handle_t *) tee_memm_ss; + if (!(IS_MEMM_MAGIC_VALID(tee_memm_handle->magic))) + OSA_ASSERT(0); + + OSA_ASSERT(vm); + + /* nothing */ + return; +} diff --git a/arch/arm/mach-berlin/modules/tzdd/memm/tee_memm_internal.h b/arch/arm/mach-berlin/modules/tzdd/memm/tee_memm_internal.h new file mode 100644 index 00000000..b9557174 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/memm/tee_memm_internal.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#ifndef _TEE_MEMM_INTERNAL_H_ +#define _TEE_MEMM_INTERNAL_H_ + +#include "osa.h" +#include "tee_msgm_ntw.h" +#include "tee_memm.h" + +#endif /* _TEE_MEMM_INTERNAL_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_can_op.c b/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_can_op.c new file mode 100644 index 00000000..8d99a7a8 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_can_op.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#include "tee_client_api.h" +#include "tee_msgm_op_internal.h" + +tee_stat_t set_cmd_can_op(tee_msgm_t msgm, void *arg) +{ + can_op_body *ptr = NULL; + tee_set_cmd_can_op_arg_t *src = NULL; + tee_msgm_ntw_struct *ntw_handle = NULL; + _TEEC_MRVL_Operation *_teec_mrvl_operation; + + src = (tee_set_cmd_can_op_arg_t *) arg; + ntw_handle = (tee_msgm_ntw_struct *) msgm; + ptr = (can_op_body *) ntw_handle->body; + ptr->ss_tw = NULL; + + _teec_mrvl_operation = (_TEEC_MRVL_Operation *) (src->imp); + ptr->tee_msg_ntw = _teec_mrvl_operation->tee_msg_ntw; + return TEEC_SUCCESS; +} + +tee_stat_t get_cmd_can_op(tee_msgm_t msgm, void *arg) +{ + can_op_body *ptr = NULL; + tee_get_cmd_can_op_arg_t *dst = NULL; + tee_msgm_ntw_struct *ntw_handle = NULL; + + dst = (tee_get_cmd_can_op_arg_t *) arg; + ntw_handle = (tee_msgm_ntw_struct *) msgm; + ptr = (can_op_body *) ntw_handle->body; + dst->ss = ptr->ss_tw; + dst->msg = ptr->tee_msg_ntw; + return TEEC_SUCCESS; +} + +bool cmd_class_can_op(tee_cmd_t cmd) +{ + return (TEE_CMD_CAN_OP == cmd); +} + +const tee_msgm_op_class can_op_class = { + .set_cmd = set_cmd_can_op, + .get_cmd = get_cmd_can_op, + .set_ret = NULL, + .get_ret = NULL, + .cmd_class = cmd_class_can_op, +}; diff --git a/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_close_ss.c b/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_close_ss.c new file mode 100644 index 00000000..e248e5db --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_close_ss.c @@ -0,0 +1,59 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#include "tee_client_api.h" +#include "tee_msgm_op_internal.h" + +tee_stat_t set_cmd_close_ss(tee_msgm_t msgm, void *arg) +{ + close_ss_body *dst = NULL; + tee_set_cmd_close_ss_arg_t src = NULL; + tee_msgm_ntw_struct *ntw_handle = NULL; + + src = (tee_set_cmd_close_ss_arg_t) arg; + ntw_handle = (tee_msgm_ntw_struct *) msgm; + dst = (close_ss_body *) ntw_handle->body; + dst->ss_tw = src; + return TEEC_SUCCESS; +} + +tee_stat_t get_cmd_close_ss(tee_msgm_t msgm, void *arg) +{ + close_ss_body *src = NULL; + tee_get_cmd_close_ss_arg_t *dst = NULL; + tee_msgm_ntw_struct *ntw_handle = NULL; + + dst = (tee_get_cmd_close_ss_arg_t *) arg; + ntw_handle = (tee_msgm_ntw_struct *) msgm; + src = (close_ss_body *) ntw_handle->body; + dst->ss = src->ss_tw; + return TEEC_SUCCESS; +} + +bool cmd_class_close_ss(tee_cmd_t cmd) +{ + return (TEE_CMD_CLOSE_SS == cmd); +} + +const tee_msgm_op_class close_ss_class = { + .set_cmd = set_cmd_close_ss, + .get_cmd = get_cmd_close_ss, + .set_ret = NULL, + .get_ret = NULL, + .cmd_class = cmd_class_close_ss, +}; diff --git a/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_handle_params.c b/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_handle_params.c new file mode 100644 index 00000000..21554d0b --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_handle_params.c @@ -0,0 +1,171 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#include "tee_client_api.h" +#include "tzdd_internal.h" +#define IS_TYPE_UNMATCH_PARENT_FLAG(_m, _n) (((_n) ^ (_m)) & (_n) & 0x3) +const char cmd_magic[] = "CmDm"; +#include "tee_msgm_op_internal.h" + +tee_stat_t set_params(tee_msgm_t msgm, tee_msg_op_info_t *arg) +{ + params_struct *dst = NULL; + uint32_t index = 0, value = 0; + uint8_t *last = NULL; + tee_msgm_ntw_struct *ntw_handle = NULL; + _TEEC_MRVL_SharedMemory *_teec_mrvl_sharedMem; + + ntw_handle = (tee_msgm_ntw_struct *) msgm; + dst = ntw_handle->ntw_params; + if (!dst) + return TEEC_SUCCESS; + last = (uint8_t *) dst + sizeof(params_struct); + dst->paramTypes = arg->paramTypes; + + for (index = 0; index < PARAM_NUMBERS; index++) { + value = TEEC_PARAM_TYPE_GET(arg->paramTypes, index); + if (IS_TYPE_NONE(value)) { + memset(&(dst->param[index].value), 0, + sizeof(Union_Parameter)); + continue; + } + + if (IS_TYPE_TMPREF(value)) { + if (IS_PARAM_TAGED_INPUT(value)) { + /* type of input */ + if (arg->params[index].tmpref.buffer) { + memcpy(last, + arg->params[index].tmpref.buffer, + arg->params[index].tmpref.size); + } + } else { + /* type of output, so clear it */ + memset(last, 0, arg->params[index].tmpref.size); + } + dst->param[index].tmpref.buffer = + (void *)(last - + ((uint8_t *) dst + + OFFSETOF(params_struct, param[index]))); + dst->param[index].tmpref.size = + arg->params[index].tmpref.size; + last += dst->param[index].tmpref.size; + } else if (IS_TYPE_MEMREF(value)) { + /* for memref */ + if (TEEC_MEMREF_WHOLE == value) { + _teec_mrvl_sharedMem = + (_TEEC_MRVL_SharedMemory *) (arg-> + params[index]. + memref.parent-> + imp); + dst->param[index].memref.buffer = + _teec_mrvl_sharedMem->vaddr_tw; + dst->param[index].memref.size = + arg->params[index].memref.parent->size; + } else { + if (IS_TYPE_UNMATCH_PARENT_FLAG + (arg->params[index].memref.parent->flags, + value)) { + TZDD_DBG + ("set_params: in/out un-compatible\n"); + return TEEC_ERROR_BAD_PARAMETERS; + } + OSA_ASSERT((arg->params[index].memref.offset + + arg->params[index].memref.size <= + arg->params[index].memref.parent-> + size)); + + _teec_mrvl_sharedMem = + (_TEEC_MRVL_SharedMemory *) (arg-> + params[index]. + memref.parent-> + imp); + dst->param[index].memref.buffer = + _teec_mrvl_sharedMem->vaddr_tw + + arg->params[index].memref.offset; + dst->param[index].memref.size = + arg->params[index].memref.size; + } + } else if (IS_TYPE_VALUE(value) + && IS_PARAM_TAGED_INPUT(value)) { + dst->param[index].value.a = arg->params[index].value.a; + dst->param[index].value.b = arg->params[index].value.b; + } else { + TZDD_DBG("set_params: no input when index = %d\n", + index); + } + } + return TEEC_SUCCESS; +} + +/* + * get temp_memref to tw/ntw + * in ntw: set-> set offset and convert to abstract-addr + * get-> get buffer and convert to relative-addr + * */ +tee_stat_t update_params(tee_msgm_t msgm, tee_msg_op_info_t *arg) +{ + params_struct *src = NULL; + uint32_t index = 0, value = 0; + uint8_t *last = NULL, *start = NULL; + TEEC_Result stat = TEEC_SUCCESS; + tee_msgm_ntw_struct *ntw_handle = NULL; + + ntw_handle = (tee_msgm_ntw_struct *) msgm; + src = ntw_handle->ntw_params; + if (!src) + return stat; + + start = (uint8_t *) src; + arg->paramTypes = src->paramTypes; + + for (index = 0; index < PARAM_NUMBERS; index++) { + value = TEEC_PARAM_TYPE_GET(src->paramTypes, index); + if (IS_TYPE_NONE(value) + || (!IS_PARAM_TAGED_OUTPUT(value) && (0xc != value))) { + continue; + } + + if (IS_TYPE_TMPREF(value) || IS_TYPE_MEMREF(value)) { + /* update size, update content if tmpref */ + if (src->param[index].memref.size > + arg->params[index].memref.size) { + TZDD_DBG("Warning: short buffer\n"); + } else if (IS_TYPE_TMPREF(value)) { + last = + start + OFFSETOF(params_struct, + param[index]) + + (uint32_t) src->param[index].memref.buffer; + if (arg->params[index].tmpref.buffer) { + memcpy(arg->params[index].tmpref.buffer, + last, + src->param[index].memref.size); + } + } + arg->params[index].memref.size = + src->param[index].memref.size; + } else if (IS_TYPE_VALUE(value)) { + arg->params[index].value.a = src->param[index].value.a; + arg->params[index].value.b = src->param[index].value.b; + } else { + printk(KERN_ERR + "update_params: index = %d is TEEC_NONE\n", + index); + } + } + return stat; +} diff --git a/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_inv_op.c b/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_inv_op.c new file mode 100644 index 00000000..58f6ac3d --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_inv_op.c @@ -0,0 +1,89 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#include "tee_client_api.h" +#include "tee_msgm_op_internal.h" + +tee_stat_t set_cmd_inv_op(tee_msgm_t msgm, void *arg) +{ + inv_op_body *dst = NULL; + tee_set_cmd_inv_op_arg_t *src = NULL; + tee_msgm_ntw_struct *ntw_handle = NULL; + + src = (tee_set_cmd_inv_op_arg_t *) arg; + ntw_handle = (tee_msgm_ntw_struct *) msgm; + dst = (inv_op_body *) ntw_handle->body; + dst->srv_cmd = src->srv_cmd; + dst->ss_tw = src->ss; + return TEEC_SUCCESS; +} + +tee_stat_t get_cmd_inv_op(tee_msgm_t msgm, void *arg) +{ + inv_op_body *src = NULL; + tee_get_cmd_inv_op_arg_t *dst = NULL; + tee_msgm_ntw_struct *ntw_handle = NULL; + + dst = (tee_get_cmd_inv_op_arg_t *) arg; + ntw_handle = (tee_msgm_ntw_struct *) msgm; + src = (inv_op_body *) ntw_handle->body; + dst->ss = src->ss_tw; + dst->srv_cmd = src->srv_cmd; + return TEEC_SUCCESS; +} + +tee_stat_t set_ret_inv_op(tee_msgm_t msgm, void *arg) +{ + inv_op_body *dst = NULL; + tee_set_ret_inv_op_arg_t *src = NULL; + tee_msgm_ntw_struct *ntw_handle = NULL; + + src = (tee_set_ret_inv_op_arg_t *) arg; + ntw_handle = (tee_msgm_ntw_struct *) msgm; + dst = (inv_op_body *) ntw_handle->body; + dst->ret_orig = src->ret_orig; + dst->ret = src->ret; + return TEEC_SUCCESS; +} + +tee_stat_t get_ret_inv_op(tee_msgm_t msgm, void *arg) +{ + inv_op_body *src = NULL; + tee_get_ret_inv_op_arg_t *dst = NULL; + tee_msgm_ntw_struct *ntw_handle = NULL; + + dst = (tee_get_ret_inv_op_arg_t *) arg; + ntw_handle = (tee_msgm_ntw_struct *) msgm; + src = (inv_op_body *) ntw_handle->body; + dst->ret_orig = src->ret_orig; + dst->ret = src->ret; + return TEEC_SUCCESS; +} + +bool cmd_class_inv_op(tee_cmd_t cmd) +{ + return (TEE_CMD_INV_OP == cmd); +} + +const tee_msgm_op_class inv_op_class = { + .set_cmd = set_cmd_inv_op, + .get_cmd = get_cmd_inv_op, + .set_ret = set_ret_inv_op, + .get_ret = get_ret_inv_op, + .cmd_class = cmd_class_inv_op, +}; diff --git a/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_map_shm.c b/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_map_shm.c new file mode 100644 index 00000000..62c206ca --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_map_shm.c @@ -0,0 +1,111 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#include "tee_client_api.h" +#include "tzdd_internal.h" +#include "tee_memm.h" +#include "tee_msgm_op_internal.h" + +tee_stat_t set_cmd_map_shm(tee_msgm_t msgm, void *arg) +{ + uint32_t pages_num = 0; + tee_memm_ss_t memm_handle = NULL; + map_shm_body *ptr = NULL; + tee_set_cmd_map_shm_arg_t *src = NULL; + tee_stat_t ntw_stat = TEEC_SUCCESS; + tee_msgm_ntw_struct *ntw_handle = NULL; + + memm_handle = tee_memm_create_ss(); + src = (tee_set_cmd_map_shm_arg_t *) arg; + ntw_handle = (tee_msgm_ntw_struct *) msgm; + ptr = (map_shm_body *) ntw_handle->body; + + ntw_stat = tee_memm_calc_pages_num(memm_handle, src->buffer, + src->size, &pages_num); + if (TEEC_SUCCESS != ntw_stat) + return ntw_stat; + + ntw_stat = tee_memm_parse_phys_pages(memm_handle, src->buffer, + src->size, + (tee_mem_page_t *) ((uint8_t *) ptr + + + sizeof + (map_shm_body)), + pages_num); + if (TEEC_SUCCESS != ntw_stat) + return ntw_stat; + + tee_memm_destroy_ss(memm_handle); + ptr->arr_sz = pages_num; + return TEEC_SUCCESS; +} + +tee_stat_t get_cmd_map_shm(tee_msgm_t msgm, void *arg) +{ + map_shm_body *src = NULL; + tee_get_cmd_map_shm_arg_t *dst = NULL; + tee_msgm_ntw_struct *ntw_handle = NULL; + + dst = (tee_get_cmd_map_shm_arg_t *) arg; + ntw_handle = (tee_msgm_ntw_struct *) msgm; + src = (map_shm_body *) ntw_handle->body; + dst->arr_sz = src->arr_sz; + dst->arr = (tee_msgm_phys_memblock_t(*)[])src->arr; + return TEEC_SUCCESS; +} + +tee_stat_t set_ret_map_shm(tee_msgm_t msgm, void *arg) +{ + map_shm_body *dst = NULL; + tee_set_ret_map_shm_arg_t *src = NULL; + tee_msgm_ntw_struct *ntw_handle = NULL; + + src = (tee_set_ret_map_shm_arg_t *) arg; + ntw_handle = (tee_msgm_ntw_struct *) msgm; + dst = (map_shm_body *) ntw_handle->body; + dst->vaddr_tw = src->vaddr_tw; + dst->ret = src->ret; + return TEEC_SUCCESS; +} + +tee_stat_t get_ret_map_shm(tee_msgm_t msgm, void *arg) +{ + map_shm_body *src = NULL; + tee_get_ret_map_shm_arg_t *dst = NULL; + tee_msgm_ntw_struct *ntw_handle = NULL; + + dst = (tee_get_ret_map_shm_arg_t *) arg; + ntw_handle = (tee_msgm_ntw_struct *) msgm; + src = (map_shm_body *) ntw_handle->body; + dst->vaddr_tw = src->vaddr_tw; + dst->ret = src->ret; + return TEEC_SUCCESS; +} + +bool cmd_class_map_shm(tee_cmd_t cmd) +{ + return (TEE_CMD_MAP_SHM == cmd); +} + +const tee_msgm_op_class map_shm_class = { + .set_cmd = set_cmd_map_shm, + .get_cmd = get_cmd_map_shm, + .set_ret = set_ret_map_shm, + .get_ret = get_ret_map_shm, + .cmd_class = cmd_class_map_shm, +}; diff --git a/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_ntw.c b/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_ntw.c new file mode 100644 index 00000000..296845de --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_ntw.c @@ -0,0 +1,360 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#include "tee_msgm_ntw.h" +#include "tee_msgm_op_internal.h" +#include "tee_memm.h" +#include "tzdd_internal.h" + +extern const char cmd_magic[]; +static uint8_t magic[] = { 'm', 'N', 'T', 'W', }; + +#define INIT_MAGIC(_m) \ + do { \ + ((uint8_t *)(_m))[0] = magic[0]; \ + ((uint8_t *)(_m))[1] = magic[1]; \ + ((uint8_t *)(_m))[2] = magic[2]; \ + ((uint8_t *)(_m))[3] = magic[3]; \ + } while (0) +#define IS_MAGIC_VALID(_m) \ + ((magic[0] == ((uint8_t *)(_m))[0]) && \ + (magic[1] == ((uint8_t *)(_m))[1]) && \ + (magic[2] == ((uint8_t *)(_m))[2]) && \ + (magic[3] == ((uint8_t *)(_m))[3])) +#define CLEANUP_MAGIC(_m) \ + do { \ + ((uint8_t *)(_m))[0] = '\0'; \ + ((uint8_t *)(_m))[1] = '\0'; \ + ((uint8_t *)(_m))[2] = '\0'; \ + ((uint8_t *)(_m))[3] = '\0'; \ + } while (0) +#define IS_PARAMTYPES_TYPE_VALID(_m) \ + (IS_TYPE_NONE(_m) || \ + IS_TYPE_VALUE(_m) || \ + IS_TYPE_TMPREF(_m) || \ + IS_TYPE_MEMREF(_m)) +#define IS_NTW_MEM_FLAG_VALID(_m) ((_m) > 0 && (_m) < 4) +static uint32_t _g_body_size_array[] = { + 0, MAP_SHM_SZ, UNMAP_SHM_SZ, OPEN_SS_SZ, + CLOSE_SS_SZ, INV_OP_SZ, CAN_OP_SZ, +}; + +const tee_msgm_op_class *_g_op_array[] = { + NULL, &map_shm_class, &unmap_shm_class, + &open_ss_class, &close_ss_class, + &inv_op_class, &can_op_class, +}; + +/* ******************** + * create instance + * ********************/ +tee_msgm_t tee_msgm_create_inst(void) +{ + tee_msgm_ntw_struct *handle = NULL; + + handle = + (tee_msgm_ntw_struct *) osa_kmem_alloc(sizeof(tee_msgm_ntw_struct)); + if (NULL == handle) { + TZDD_DBG("In tee_msgm_create_inst, alloc err\n"); + goto err; + } + osa_memset(handle, 0, sizeof(tee_msgm_ntw_struct)); + INIT_MAGIC(handle->magic); + handle->ntw_cmd = NULL; + handle->body = NULL; + handle->op = NULL; + handle->cmd_record.cmd = TEE_CMD_INVALID; + handle->cmd_record.cmd_sz = 0; + handle->cmd_record.param_size = 0; + handle->cmd_record.stat = TEE_NTW_CMD_STAT_CLEAR; + return (tee_msgm_t) handle; +err: + TZDD_DBG("In tee_msgm_create_inst err\n"); + return NULL; +} + +/* ****************************** + * will not destroy the msg buf + * *******************************/ +void tee_msgm_destroy_inst(tee_msgm_t msgm) +{ + tee_msgm_ntw_struct *ntw_handle = NULL; + + OSA_ASSERT(msgm); + ntw_handle = (tee_msgm_ntw_struct *) msgm; + OSA_ASSERT(IS_MAGIC_VALID(ntw_handle->magic)); + CLEANUP_MAGIC(ntw_handle->magic); + osa_kmem_free(ntw_handle); + ntw_handle = NULL; + return; +} + +/* ************************************ + * calculate the sizo of tmp_memref + * ************************************/ +static inline tee_stat_t _calc_map_shm_len(TEEC_SharedMemory *obj, + uint32_t *num) +{ + tee_memm_ss_t memm_handle = NULL; + tee_stat_t ntw_stat = TEEC_SUCCESS; + + memm_handle = tee_memm_create_ss(); + OSA_ASSERT(memm_handle); + ntw_stat = tee_memm_calc_pages_num(memm_handle, obj->buffer, + obj->size, num); + if (TEEC_SUCCESS != ntw_stat) + return ntw_stat; + + tee_memm_destroy_ss(memm_handle); + memm_handle = NULL; + return TEEC_SUCCESS; +} + +/* ************************************************************************* + * "buf = NULL" to get the buf size first */ +/* + * the buffer does NOT include the command header. + * the header is maintained by callers. + * the typical behavior of callers is to alloc + * sizeof(tee_msg_head_t) + buf-size. + * then set "mem + sizeof(tee_msg_head_t)" as the arg, buf. + * + * send Msg: tee_msgm_set_msg_buf(msgm, mi, NULL, &size); STAT_SET + * tee_msgm_set_msg_buf(msgm, NULL, buf, NULL); STAT_CLEAR + * receive Msg: tee_msgm_set_msg_buf(msgm, NULL, buf, NULL); + * ************************************************************************** + */ +tee_stat_t tee_msgm_set_msg_buf(tee_msgm_t msgm, tee_msgm_msg_info_t *mi, + uint8_t *buf, uint32_t *size) +{ + tee_msgm_ntw_struct *ntw_handle = NULL; + uint32_t buf_size = 0, pages = 0, types = 0, idx = 0, value = 0; + tee_stat_t shm_stat = TEEC_SUCCESS; + TEEC_Operation *ntw_op = NULL; + + /* either mi && size or buf non-NULL; */ + OSA_ASSERT(((mi && size) || buf)); + OSA_ASSERT(msgm); + ntw_handle = (tee_msgm_ntw_struct *) msgm; + OSA_ASSERT(IS_MAGIC_VALID(ntw_handle->magic)); + + if (NULL != buf) { + /* set handle-item according to buf-ptr */ + ntw_handle->ntw_cmd = (cmd_struct *) buf; + ntw_handle->body = buf + sizeof(cmd_struct); + if (TEE_NTW_CMD_STAT_SET == ntw_handle->cmd_record.stat) { + /* send msg: empty buffer for set cmd and params */ + osa_memset(buf, 0, ntw_handle->cmd_record.msg_sz); + INIT_CMD_MAGIC(ntw_handle->ntw_cmd->magic); + ntw_handle->ntw_params = + (params_struct *) (ntw_handle->body + + ntw_handle->cmd_record.cmd_sz); + ntw_handle->ntw_cmd->cmd_sz = + ntw_handle->cmd_record.cmd_sz; + ntw_handle->op = + _g_op_array[ntw_handle->cmd_record.cmd]; + ntw_handle->cmd_record.stat = TEE_NTW_CMD_STAT_CLEAR; + } else { + /* receive msg: msg for get cmd or params */ + OSA_ASSERT(IS_CMD_MAGIC_VALID + (ntw_handle->ntw_cmd->magic)); + ntw_handle->ntw_params = + (params_struct *) (ntw_handle->body + + ntw_handle->ntw_cmd->cmd_sz); + ntw_handle->op = _g_op_array[ntw_handle->ntw_cmd->cmd]; + } + } else if (mi && size) { + /* send msg: calculate the size of msg-buf + * according info provided by mi + */ + OSA_ASSERT(TEE_NTW_CMD_STAT_CLEAR == + ntw_handle->cmd_record.stat); + /* handle tmp_mem_ref */ + if (mi->msg_op_info) { + ntw_op = mi->msg_op_info; + types = ntw_op->paramTypes; + for (idx = 0; idx < 4; idx++) { + value = TEEC_PARAM_TYPE_GET(types, idx); + if (IS_TYPE_TMPREF(value)) { + buf_size += + ntw_op->params[idx].tmpref.size; + } + } + } + /* calculate the size of cmd_body */ + if (TEE_CMD_INVALID <= mi->cmd && TEE_CMD_CAN_OP >= mi->cmd) { + if (TEE_CMD_MAP_SHM == mi->cmd + && NULL != mi->msg_map_shm_info) { + shm_stat = + _calc_map_shm_len(mi->msg_map_shm_info, + &pages); + if (TEEC_SUCCESS != shm_stat) + return shm_stat; + + ntw_handle->cmd_record.cmd_sz = + _g_body_size_array[mi->cmd] + + pages * sizeof(tee_mem_page_t); + } else + ntw_handle->cmd_record.cmd_sz = + _g_body_size_array[mi->cmd]; + } else { + TZDD_DBG("ERROR: cmd not exist\n"); + OSA_ASSERT(0); + } + /* saved rec to cmd_record */ + ntw_handle->cmd_record.param_size = buf_size; + ntw_handle->cmd_record.cmd = mi->cmd; + ntw_handle->cmd_record.stat = TEE_NTW_CMD_STAT_SET; + *size = sizeof(cmd_struct) + ntw_handle->cmd_record.cmd_sz + + sizeof(params_struct) + ntw_handle->cmd_record.param_size; + ntw_handle->cmd_record.msg_sz = *size; + } else { + TZDD_DBG("ERROR: both mi&&size and buf are NULL pointer\n"); + OSA_ASSERT(0); + } + return TEEC_SUCCESS; +} + +/* ******************** + * set cmd in ntw + * ********************/ +tee_stat_t tee_msgm_set_cmd(tee_msgm_t msgm, tee_cmd_t cmd, void *arg) +{ + tee_msgm_ntw_struct *ntw_handle = NULL; + tee_stat_t set_cmd_stat = TEEC_SUCCESS; + + OSA_ASSERT(msgm); + if (TEE_CMD_INVALID == cmd) { + TZDD_DBG("cmd TEE_CMD_INVALID\n"); + return set_cmd_stat; + } + ntw_handle = (tee_msgm_ntw_struct *) msgm; + OSA_ASSERT(IS_MAGIC_VALID(ntw_handle->magic)); + INIT_CMD_MAGIC(ntw_handle->ntw_cmd->magic); + + ntw_handle->ntw_cmd->cmd = cmd; + if (NULL != arg) + set_cmd_stat = ntw_handle->op->set_cmd(msgm, arg); + + return set_cmd_stat; +} + +/* ****************** + * get cmd in ntw + * *******************/ +tee_stat_t tee_msgm_get_cmd(tee_msgm_t msgm, tee_cmd_t *cmd, void *arg) +{ + tee_msgm_ntw_struct *ntw_handle = NULL; + tee_stat_t get_cmd_stat = TEEC_SUCCESS; + + OSA_ASSERT(msgm); + OSA_ASSERT((cmd || arg)); + ntw_handle = (tee_msgm_ntw_struct *) msgm; + OSA_ASSERT(IS_MAGIC_VALID(ntw_handle->magic)); + + if (NULL != cmd) + *cmd = ntw_handle->ntw_cmd->cmd; + + if (NULL != arg) + get_cmd_stat = ntw_handle->op->get_cmd(msgm, arg); + + return get_cmd_stat; +} + +/* ***************** + * get ret in ntw + * *****************/ +tee_stat_t tee_msgm_get_ret(tee_msgm_t msgm, void *arg) +{ + tee_msgm_ntw_struct *ntw_handle = NULL; + tee_stat_t get_ret_stat = TEEC_SUCCESS; + + OSA_ASSERT(msgm); + ntw_handle = (tee_msgm_ntw_struct *) msgm; + OSA_ASSERT(IS_MAGIC_VALID(ntw_handle->magic)); + + if (NULL != arg) + get_ret_stat = ntw_handle->op->get_ret(msgm, arg); + + return get_ret_stat; +} + +/* **************** + * set ret in ntw + * ****************/ +tee_stat_t tee_msgm_set_ret(tee_msgm_t msgm, void *arg) +{ + tee_msgm_ntw_struct *ntw_handle = NULL; + tee_stat_t set_ret_stat = TEEC_SUCCESS; + + OSA_ASSERT((arg && msgm)); + ntw_handle = (tee_msgm_ntw_struct *) msgm; + OSA_ASSERT(IS_MAGIC_VALID(ntw_handle->magic)); + + set_ret_stat = ntw_handle->op->set_ret(msgm, arg); + return set_ret_stat; +} + +/* ********************* + * set params in ntw + * *********************/ +tee_stat_t tee_msgm_set_params(tee_msgm_t msgm, tee_msg_op_info_t *params) +{ + tee_msgm_ntw_struct *ntw_handle = NULL; + tee_stat_t set_params_stat = TEEC_SUCCESS; + uint32_t times = PARAM_NUMBERS, idx = 0, type = TEEC_NONE; + + OSA_ASSERT((msgm && params)); + ntw_handle = (tee_msgm_ntw_struct *) msgm; + OSA_ASSERT(IS_MAGIC_VALID(ntw_handle->magic)); + while (times--) { + type = TEEC_PARAM_TYPE_GET(params->paramTypes, idx); + if (!IS_PARAMTYPES_TYPE_VALID(type)) { + TZDD_DBG("tee_msgm_set_params: bad paramsTypes\n"); + return TEEC_ERROR_BAD_PARAMETERS; + } + if (IS_TYPE_MEMREF(type)) { + if (!IS_NTW_MEM_FLAG_VALID + (params->params[idx].memref.parent->flags)) { + TZDD_DBG + ("tee_msgm_set_params: \ + un-compatible arg\n"); + return TEEC_ERROR_BAD_PARAMETERS; + } + } + idx++; + } + set_params_stat = set_params(msgm, params); + return set_params_stat; +} + +/* ********************** + * update_params in ntw + * **********************/ +tee_stat_t tee_msgm_update_params(tee_msgm_t msgm, tee_msg_op_info_t *params) +{ + tee_msgm_ntw_struct *ntw_handle = NULL; + tee_stat_t update_params_stat = TEEC_SUCCESS; + + OSA_ASSERT((msgm && params)); + ntw_handle = (tee_msgm_ntw_struct *) msgm; + OSA_ASSERT(IS_MAGIC_VALID(ntw_handle->magic)); + + update_params_stat = update_params(msgm, params); + return update_params_stat; +} diff --git a/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_op_internal.h b/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_op_internal.h new file mode 100644 index 00000000..e15b4c54 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_op_internal.h @@ -0,0 +1,171 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#ifndef _TEE_MSGM_OP_INTERNAL_H_ +#define _TEE_MSGM_OP_INTERNAL_H_ +#include "tee_msgm_ntw.h" + +extern const char cmd_magic[]; +#define BYTES_OF_MAGIC (4) +#define INIT_CMD_MAGIC(_m) \ + do { \ + _m[0] = cmd_magic[0]; \ + _m[1] = cmd_magic[1]; \ + _m[2] = cmd_magic[2]; \ + _m[3] = cmd_magic[3]; \ + } while (0) +#define CLEANUP_CMD_MAGIC(_m) \ + do { \ + _m[0] = _m[1] = _m[2] = _m[3] = 0; \ + } while (0) +#define IS_CMD_MAGIC_VALID(_m) \ + ((cmd_magic[0] == _m[0]) && \ + (cmd_magic[1] == _m[1]) && \ + (cmd_magic[2] == _m[2]) && \ + (cmd_magic[3] == _m[3])) +/* for translate cmd idx */ +#define TEE_TW_SUB_CMD_SIZE (8) +#define TEE_TW_PREM_CMD_MASK ((1 << (32 - TEE_TW_SUB_CMD_SIZE)) - 1) +/* for parameters */ +#define PARAM_NUMBERS (4) +#define IS_TYPE_NONE(_m) (0x0 == (_m)) +#define IS_TYPE_VALUE(_m) ((_m) >= 0x1 && (_m) <= 0x3) +#define IS_TYPE_TMPREF(_m) ((_m) >= 0x5 && (_m) <= 0x7) +#define IS_TYPE_MEMREF(_m) ((_m) >= 0xc && (_m) <= 0xf) +/* common macro */ +#define IS_PARAM_TAGED_INPUT(_m) (((_m) & 0x1) == 0x1) +#define IS_PARAM_TAGED_OUTPUT(_m) (((_m) & 0x2) == 0x2) +#define OFFSETOF(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER) + +/* vvv cmd_body struct vvv */ +typedef struct _map_shm_body { + void *vaddr_tw; + tee_stat_t ret; + + uint32_t arr_sz; + tee_msgm_phys_memblock_t arr[]; +} map_shm_body; +typedef struct _unmap_shm_body { + void *vaddr_tw; + size_t sz; +} unmap_shm_body; +typedef struct _open_ss_body { + TEEC_UUID uuid; + uint32_t meth; + uint32_t data_sz; + TEEC_UUID data; + void *ss_tw; + uint32_t ret_orig; + tee_stat_t ret; +} open_ss_body; +typedef struct _close_ss_body { + void *ss_tw; +} close_ss_body; +typedef struct _inv_op_body { + uint32_t srv_cmd; + void *ss_tw; + + uint32_t ret_orig; + tee_stat_t ret; +} inv_op_body; +typedef struct _can_op_body { + void *ss_tw; + void *tee_msg_ntw; +} can_op_body; +/* ^^^^^^ cmd_body struct ^^^^^^^ */ + +/* vvv size of cmd_body vvv */ +#define MAP_SHM_SZ (sizeof(map_shm_body)) +#define UNMAP_SHM_SZ (sizeof(unmap_shm_body)) +#define OPEN_SS_SZ (sizeof(open_ss_body)) +#define CLOSE_SS_SZ (sizeof(close_ss_body)) +#define INV_OP_SZ (sizeof(inv_op_body)) +#define CAN_OP_SZ (sizeof(can_op_body)) +/* ^^^ size of cmd_body ^^^ */ + +/* vvv cmd operation class vvv */ +typedef struct _tee_msgm_op_class { + tee_stat_t(*set_cmd) (tee_msgm_t msgm, void *arg); + tee_stat_t(*get_cmd) (tee_msgm_t msgm, void *arg); + tee_stat_t(*set_ret) (tee_msgm_t msgm, void *arg); + tee_stat_t(*get_ret) (tee_msgm_t msgm, void *arg); + bool(*cmd_class) (tee_cmd_t cmd); +} tee_msgm_op_class; +extern const tee_msgm_op_class map_shm_class; +extern const tee_msgm_op_class unmap_shm_class; +extern const tee_msgm_op_class open_ss_class; +extern const tee_msgm_op_class close_ss_class; +extern const tee_msgm_op_class inv_op_class; +extern const tee_msgm_op_class can_op_class; +/* ^^^^^ cmd operation class ^^^^ */ + +/* vvv params handling vvv */ +tee_stat_t get_params(tee_msgm_t msgm, tee_msg_op_info_t *arg); +tee_stat_t set_params(tee_msgm_t msgm, tee_msg_op_info_t *arg); +tee_stat_t update_params(tee_msgm_t msgm, tee_msg_op_info_t *arg); +/* ^^^^^^^^^^ params handling ^^^^^^ */ + +/* vvv msg params format vvv */ +typedef struct _cmd_struct { + uint8_t magic[4]; + tee_cmd_t cmd; + uint32_t cmd_sz; /* size of cmd */ + uint8_t cmd_body[0]; +} cmd_struct; +typedef union { + struct { + void *buffer; + size_t size; + } tmpref; + struct { + void *buffer; + size_t size; + } memref; + struct { + uint32_t a, b; + } value; +} Union_Parameter; +typedef struct _params_struct { + uint32_t paramTypes; + Union_Parameter param[4]; +} params_struct; +/* ^^^ msg params format ^^^ */ + +/* vvv internal handler vvv */ +typedef enum _tee_ntw_cmd_stat_t { + TEE_NTW_CMD_STAT_CLEAR, + TEE_NTW_CMD_STAT_SET, +} tee_ntw_cmd_stat_t; +typedef struct _tee_ntw_cmd_record_t { + tee_cmd_t cmd; + uint32_t cmd_sz; + uint32_t param_size; + uint32_t msg_sz; /* the summary size of msg */ + tee_ntw_cmd_stat_t stat; +} tee_ntw_cmd_record_t; +typedef struct _tee_msgm_ntw_struct { + uint8_t magic[BYTES_OF_MAGIC]; + + cmd_struct *ntw_cmd; + uint8_t *body; + params_struct *ntw_params; + const tee_msgm_op_class *op; + tee_ntw_cmd_record_t cmd_record; +} tee_msgm_ntw_struct; + +#endif diff --git a/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_open_ss.c b/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_open_ss.c new file mode 100644 index 00000000..d3a836b9 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_open_ss.c @@ -0,0 +1,109 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#include "tee_client_api.h" +#define LOGIN_METHOD_NULL (0) +#define LOGIN_METHOD_VALID (sizeof(TEEC_UUID)) +#include "tee_msgm_op_internal.h" + +/* + * set cmd + * */ +tee_stat_t set_cmd_open_ss(tee_msgm_t msgm, void *arg) +{ + open_ss_body *dst = NULL; + tee_set_cmd_open_ss_arg_t *src = NULL; + tee_msgm_ntw_struct *ntw_handle = NULL; + + src = (tee_set_cmd_open_ss_arg_t *) arg; + ntw_handle = (tee_msgm_ntw_struct *) msgm; + dst = (open_ss_body *) ntw_handle->body; + memcpy(&(dst->uuid), (uint8_t *) src->uuid, sizeof(TEEC_UUID)); + dst->meth = src->meth; + dst->data_sz = LOGIN_METHOD_VALID; + dst->data = src->data; + return TEEC_SUCCESS; +} + +/* + * set cmd + * */ +tee_stat_t get_cmd_open_ss(tee_msgm_t msgm, void *arg) +{ + open_ss_body *src = NULL; + tee_get_cmd_open_ss_arg_t *dst = NULL; + tee_msgm_ntw_struct *ntw_handle = NULL; + + dst = (tee_get_cmd_open_ss_arg_t *) arg; + ntw_handle = (tee_msgm_ntw_struct *) msgm; + src = (open_ss_body *) ntw_handle->body; + dst->uuid = &(src->uuid); + dst->meth = src->meth; + dst->data_sz = src->data_sz; + dst->data = src->data; + return TEEC_SUCCESS; +} + +/* + * set ret + * */ +tee_stat_t set_ret_open_ss(tee_msgm_t msgm, void *arg) +{ + open_ss_body *dst = NULL; + tee_set_ret_open_ss_arg_t *src = NULL; + tee_msgm_ntw_struct *ntw_handle = NULL; + + src = (tee_set_ret_open_ss_arg_t *) arg; + ntw_handle = (tee_msgm_ntw_struct *) msgm; + dst = (open_ss_body *) ntw_handle->body; + dst->ss_tw = src->ss_tw; + dst->ret_orig = src->ret_orig; + dst->ret = src->ret; + return TEEC_SUCCESS; +} + +/* + * get ret + * */ +tee_stat_t get_ret_open_ss(tee_msgm_t msgm, void *arg) +{ + open_ss_body *src = NULL; + tee_get_ret_open_ss_arg_t *dst = NULL; + tee_msgm_ntw_struct *ntw_handle = NULL; + + dst = (tee_get_ret_open_ss_arg_t *) arg; + ntw_handle = (tee_msgm_ntw_struct *) msgm; + src = (open_ss_body *) ntw_handle->body; + dst->ss_tw = src->ss_tw; + dst->ret_orig = src->ret_orig; + dst->ret = src->ret; + return TEEC_SUCCESS; +} + +bool cmd_class_open_ss(tee_cmd_t cmd) +{ + return (TEE_CMD_OPEN_SS == cmd); +} + +const tee_msgm_op_class open_ss_class = { + .set_cmd = set_cmd_open_ss, + .get_cmd = get_cmd_open_ss, + .set_ret = set_ret_open_ss, + .get_ret = get_ret_open_ss, + .cmd_class = cmd_class_open_ss, +}; diff --git a/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_unmap_shm.c b/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_unmap_shm.c new file mode 100644 index 00000000..764a797d --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/msgm/ntw/tee_msgm_unmap_shm.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#include "tee_client_api.h" +#include "tee_msgm_op_internal.h" + +tee_stat_t set_cmd_unmap_shm(tee_msgm_t msgm, void *arg) +{ + unmap_shm_body *dst = NULL; + tee_set_cmd_unmap_shm_arg_t *src = NULL; + tee_msgm_ntw_struct *ntw_handle = NULL; + _TEEC_MRVL_SharedMemory *_teec_mrvl_sharedMem; + + src = (tee_set_cmd_unmap_shm_arg_t *) arg; + ntw_handle = (tee_msgm_ntw_struct *) msgm; + dst = (unmap_shm_body *) ntw_handle->body; + + _teec_mrvl_sharedMem = (_TEEC_MRVL_SharedMemory *) (src->imp); + + dst->vaddr_tw = _teec_mrvl_sharedMem->vaddr_tw; + dst->sz = _teec_mrvl_sharedMem->size; + return TEEC_SUCCESS; +} + +tee_stat_t get_cmd_unmap_shm(tee_msgm_t msgm, void *arg) +{ + unmap_shm_body *src = NULL; + tee_get_cmd_unmap_shm_arg_t *dst = NULL; + tee_msgm_ntw_struct *ntw_handle = NULL; + + dst = (tee_get_cmd_unmap_shm_arg_t *) arg; + ntw_handle = (tee_msgm_ntw_struct *) msgm; + src = (unmap_shm_body *) ntw_handle->body; + dst->vaddr_tw = src->vaddr_tw; + return TEEC_SUCCESS; +} + +bool cmd_class_unmap_shm(tee_cmd_t cmd) +{ + return (TEE_CMD_UNMAP_SHM == cmd); +} + +const tee_msgm_op_class unmap_shm_class = { + .set_cmd = set_cmd_unmap_shm, + .get_cmd = get_cmd_unmap_shm, + .set_ret = NULL, + .get_ret = NULL, + .cmd_class = cmd_class_unmap_shm, +}; diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/include/linux/osa_os_inc.h b/arch/arm/mach-berlin/modules/tzdd/osa/include/linux/osa_os_inc.h new file mode 100644 index 00000000..19ac18e8 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/include/linux/osa_os_inc.h @@ -0,0 +1,114 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + * Filename : osa_os_inc.h + * Author : Dafu Lv + * Date Created : 04/06/08 + * Description : specifiec os files of osa for linux + * + */ + +#ifndef _OSA_OS_INC_H_ +#define _OSA_OS_INC_H_ + +#include + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)) + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#define OSA_EXPORT_SYMBOL EXPORT_SYMBOL +#define INFINITE (0xFFFFFFFF) + +typedef uint8_t bool; + +#define true (1) +#define false (0) + +typedef signed long long_t; +typedef unsigned long ulong_t; + +#else + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define OSA_EXPORT_SYMBOL EXPORT_SYMBOL +#define INFINITE (0xFFFFFFFF) + +#define true (1) +#define false (0) + +typedef signed long long_t; +typedef unsigned long ulong_t; + +#endif + +#endif /* _OSA_OS_INC_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/include/osa.h b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa.h new file mode 100644 index 00000000..b51720b4 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa.h @@ -0,0 +1,95 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + * Filename : osa.h + * Author : Dafu Lv + * Date Created : 30/09/2009 + * Description : osa header file + * + */ + +#ifndef _OSA_H_ +#define _OSA_H_ + +typedef struct osa_list { + struct osa_list *next; + struct osa_list *prev; +} osa_list_t; + +typedef struct _osa_time_t { + unsigned int sec; + unsigned int msec; +} osa_time_t; + +typedef void *osa_drv_t; +typedef int osa_err_t; +typedef void *osa_irq_t; +typedef void *osa_mpool_t; +typedef void *osa_mutex_t; +typedef void *osa_event_t; +typedef void *osa_rw_sem_t; +typedef void *osa_sem_t; +typedef void *osa_timer_t; +typedef void *osa_thread_id_t; +typedef void *osa_thread_t; + +#define LINUX + +#ifdef LINUX + +#include "linux/osa_os_inc.h" + +#elif defined(WINCE) + +#include "wince/osa_os_inc.h" + +#elif defined(ECOS) + +#include "ecos/osa_os_inc.h" + +#elif defined(MINOS) + +#include "minos/osa_os_inc.h" + +#else + +#error "invalid OS or no OS defined." + +#endif + +typedef atomic_t osa_atomic_t; + +#include "osa_err.h" + +#include "osa_atomic.h" +#include "osa_dbg.h" +#include "osa_delay.h" +#include "osa_drv.h" +#include "osa_irq.h" +#include "osa_list.h" +#include "osa_mem.h" +#include "osa_misc.h" +#include "osa_sched.h" +#include "osa_sync.h" +#include "osa_time.h" +#include "osa_timer.h" +#include "osa_thread.h" + +extern osa_err_t osa_init_module(void); +extern void osa_cleanup_module(void); + +#endif /* _OSA_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_atomic.h b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_atomic.h new file mode 100644 index 00000000..cd169dc2 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_atomic.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#ifndef _OSA_ATOMIC_H_ +#define _OSA_ATOMIC_H_ + +#include + +extern int osa_atomic_read(osa_atomic_t *v); +extern void osa_atomic_set(osa_atomic_t *v, int i); +extern void osa_atomic_add(int i, osa_atomic_t *v); +extern void osa_atomic_sub(int i, osa_atomic_t *v); +extern void osa_atomic_inc(osa_atomic_t *v); +extern void osa_atomic_dec(osa_atomic_t *v); + +#endif diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_dbg.h b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_dbg.h new file mode 100644 index 00000000..9acffc46 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_dbg.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#ifndef _OSA_DBG_H_ +#define _OSA_DBG_H_ + +#include "osa.h" + +#define OSA_RM_WARNING(x) ((void)(x)) + +/* no implemented in print proc, for osa_dbg_level only */ +#define DBG_ALL (0) + +#define DBG_INFO (1) +#define DBG_WARN (2) +#define DBG_ERR (3) + +/* DBG LOG will be printed even in release version */ +#define DBG_LOG (0xFFFFFFFF) + +#ifdef OSA_DEBUG + +#define OSA_ASSERT(x) \ + { \ + if (!(x)) { \ + osa_dbg_print(DBG_ERR, \ + "ASSERT FAILURE:\r\n");\ + osa_dbg_print(DBG_ERR, \ + "%s (%d): %s\r\n", \ + __FILE__, __LINE__, __func__); \ + osa_dbg_bt(); \ + while (1) \ + ; \ + } \ + } +#else + +#define OSA_ASSERT(x) + +#endif + +extern uint32_t osa_dbg_level; + +extern uint32_t osa_dbg_print(uint32_t level, const void *format, ...); +extern void osa_dbg_bt(void); + +#endif /* _OSA_DBG_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_delay.h b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_delay.h new file mode 100644 index 00000000..221ca1dc --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_delay.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + * Filename : osa_delay.h + * Author : Dafu Lv + * Date Created : 21/03/08 + * Description : This is the header file of delay/sleep function in osa. + * + */ + +#ifndef _OSA_DELAY_H_ +#define _OSA_DELAY_H_ + +#include "osa.h" + +extern void osa_sleep(uint32_t msec); + +#endif /* _OSA_DELAY_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_drv.h b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_drv.h new file mode 100644 index 00000000..6bf37d20 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_drv.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#ifndef _OSA_DRV_H_ +#define _OSA_DRV_H_ + +#include + +struct osa_pseudo_drv_ops { + osa_err_t(*open) (int8_t *, int32_t); + osa_err_t(*close) (osa_drv_t); + osa_err_t(*ioctl) (osa_drv_t, int32_t, ulong_t); +}; + +/* called by OS */ +extern osa_err_t osa_pseudo_drv_init(void); +extern osa_err_t osa_pseudo_drv_cleanup(void); + +/* called by OS or driver */ +extern osa_err_t osa_pseudo_drv_reg(int8_t *name, + struct osa_pseudo_drv_ops *ops, + int32_t flags); +extern osa_err_t osa_pseudo_drv_unreg(int8_t *name); + +/* called by middle-ware */ +extern osa_drv_t osa_pseudo_drv_open(int8_t *name, int32_t flags); +extern osa_err_t osa_pseudo_drv_close(osa_drv_t drv); +extern osa_err_t osa_pseudo_drv_ioctl(osa_drv_t drv, int32_t cmd, ulong_t arg); + +#endif /* _OSA_DRV_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_err.h b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_err.h new file mode 100644 index 00000000..78c38535 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_err.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#ifndef _OSA_ERR_H_ +#define _OSA_ERR_H_ + +#define OSA_OK (0) +#define OSA_ERR (-1) + +#define OSA_BAD_ARG (-10) +#define OSA_OUT_OF_MEM (-11) +#define OSA_BUSY (-12) +#define OSA_ITEM_NOT_FOUND (-13) + +#define OSA_SEM_WAIT_FAILED (-100) +#define OSA_SEM_WAIT_TO (-101) +#define OSA_MUTEX_WAIT_FAILED (-102) +#define OSA_MUTEX_WAIT_TO (-103) +#define OSA_EVENT_WAIT_FAILED (-102) +#define OSA_EVENT_WAIT_TO (-103) + +#define OSA_THREAD_BAD_STATUS (-110) +#define OSA_THREAD_STOP_FAILED (-111) + +#define OSA_BAD_USER_VIR_ADDR (-120) + +#define OSA_DUP_DRV (-130) + +#define OSA_TIMER_BAD_STATUS (-140) +#define OSA_INIT_TIMER_FAILED (-141) + +#endif /* _OSA_ERR_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_irq.h b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_irq.h new file mode 100644 index 00000000..90f4b457 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_irq.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + * Filename : osa_irq.h + * Author : Dafu Lv + * Date Created : 21/03/08 + * Description : This is the header file of irq-related functions in osa layer. + * + */ + +#ifndef _OSA_IRQ_H_ +#define _OSA_IRQ_H_ + +#include + +#define OSA_IRQ_INVALID ((osa_irq_t)(0xFFFFFFFF)) + +struct osa_irq_param { + uint32_t flag; + uint32_t priority; +}; + +extern void osa_disable_irq(void); +extern void osa_enable_irq(void); + +extern void osa_save_irq(uint32_t *flags); +extern void osa_restore_irq(uint32_t *flags); + +extern osa_irq_t osa_hook_irq(int32_t irq, + void (*isr) (void *), void (*dsr) (void *), + void *arg, struct osa_irq_param *param); +extern osa_err_t osa_free_irq(osa_irq_t handle); +extern void osa_mask_irq(uint32_t irq); +extern void osa_unmask_irq(uint32_t irq); + +#endif /* _OSA_IRQ_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_list.h b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_list.h new file mode 100644 index 00000000..8be224f3 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_list.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + * Filename : osa_list.h + * Author : Dafu Lv + * Date Created : 21/03/08 + * Description : This is the header file of list-related functions in osa. + * + */ + +#ifndef _OSA_LIST_H_ +#define _OSA_LIST_H_ + +#include "osa.h" + +#define OSA_LIST(head) \ + struct osa_list head = { &(head), &(head) } + +#define OSA_LIST_HEAD(head) { &(head), &(head) } + +#define OSA_LIST_ENTRY(_addr, _type, _member, _entry) do { \ + _type _tmp; \ + int32_t _offset = ((int32_t)(&_tmp._member) - (int32_t)&_tmp); \ + _entry = (_type *)((int32_t)_addr - _offset); \ +} while (0) + +#define osa_list_iterate(head, entry) \ + for ((entry) = (head)->next; (entry) != (head); (entry) = (entry)->next) + +#define osa_list_iterate_safe(head, entry, n) \ + for (entry = (head)->next, n = entry->next; entry != (head); \ + entry = n, n = entry->next) + +extern void osa_list_init_head(struct osa_list *head); +extern void osa_list_add(struct osa_list *entry, struct osa_list *head); +extern void osa_list_add_tail(struct osa_list *entry, struct osa_list *head); +extern void osa_list_del(struct osa_list *entry); +extern bool osa_list_empty(struct osa_list *head); + +#endif /* _OSA_LIST_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_mem.h b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_mem.h new file mode 100644 index 00000000..7bc75edf --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_mem.h @@ -0,0 +1,222 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + * Filename : osa_mem.h + * Author : Dafu Lv + * Date Created : 21/03/08 + * Description : This is the header file of memory-related functions in osa. + * + */ + +#ifndef _OSA_MEM_H_ +#define _OSA_MEM_H_ + +/* + ****************************** + * HEADERS + ****************************** + */ + +#include + +/* + ****************************** + * MACROS + ****************************** + */ + +#ifndef PAGE_SHIFT +#define PAGE_SHIFT (12) +#endif +#ifndef PAGE_SIZE +#define PAGE_SIZE (1UL << PAGE_SHIFT) +#endif +#ifndef PAGE_MASK +#define PAGE_MASK (~(PAGE_SIZE - 1)) +#endif + +#ifndef SECTION_SHIFT +#define SECTION_SHIFT (20) +#endif +#ifndef SECTION_SIZE +#define SECTION_SIZE (1UL << SECTION_SHIFT) +#endif +#ifndef SECTION_MASK +#define SECTION_MASK (~(SECTION_SIZE - 1)) +#endif + +#define INVALID_PHYS_ADDR ((void *)0xFFFFFFFF) +#define INVALID_USER_VIRT_ADDR ((void *)0xFFFFFFFF) + +/* for OSA in secure world */ +#define OSA_MAP_EC (0x1) +#define OSA_MAP_EB (0x2) +#define OSA_MAP_RO (0x4) +#define OSA_MAP_WO (0x8) +#define OSA_MAP_EWR (OSA_MAP_RO | OSA_MAP_WO) + +/* + ****************************** + * ENUMERATIONS + ****************************** + */ + +typedef enum osa_mem_attr { + OSA_MEM_NO_ACCESS, /* can not access */ + OSA_MEM_READ_ONLY, /* read only mapping */ + OSA_MEM_WRITE_ONLY, /* write only mapping */ + OSA_MEM_READ_WRITE /* read and write */ +} osa_mem_attr_t; + +/* for cache/TLB only */ +typedef enum _osa_mode_t { + MODE_USER, + MODE_KERNEL +} osa_mode_t; + +/* for OSA in secure world */ +typedef enum osa_mmap_type { + OSA_MMAP_SECTION, /* mapping as section */ + OSA_MMAP_LARGE_PAGE, /* mapping as 16k page */ + OSA_MMAP_SMALL_PAGE, /* mapping as 4k page */ + OSA_MMAP_TINY_PAGE, /* mapping as 1k page */ +} osa_mmap_type_t; + +/* for OSA in secure world */ +typedef enum osa_mpool_type { + OSA_MPOOL_FIX, /* fixed memory pool */ + OSA_MPOOL_VAR, /* variable memory pool */ + OSA_MPOOL_SEP, /* sepmeta memory pool */ + OSA_MPOOL_DL /* dynamic memory pool */ +} osa_mpool_type_t; + +/* + ****************************** + * STRUCTURES + ****************************** + */ + +struct osa_page_entry { + void *phy_addr; + uint32_t len; + + struct osa_page_entry *next; +}; + +/* for OSA in secure world */ +struct osa_mpool_info { + osa_mpool_type_t type; + void *base; + uint32_t size; + uint32_t block_size; + void *meta_addr; + uint32_t meta_len; + uint32_t alignment; +}; + +/* + ****************************** + * FUNCTIONS + ****************************** + */ + +/* allocate/free physical and virtual continuous memory block */ +extern void __kernel *osa_kmem_alloc(uint32_t size); +extern void osa_kmem_free(void __kernel *addr); + +/* allocate/free virtual continuous memory block */ +extern void __kernel *osa_vmem_alloc(uint32_t size, osa_mem_attr_t attr); +extern void osa_vmem_free(void __kernel *addr); + +/* allocate/free pages */ +extern void __kernel *osa_pages_alloc(uint32_t nr); +extern void osa_pages_free(void __kernel *addr); + +/* allocate/free physical continuous memory block w' cache & alignment */ +extern osa_err_t osa_phys_mem_pool_init(void); +extern void osa_phys_mem_pool_cleanup(void); +extern void __kernel *osa_alloc_phys_mem(uint32_t size, bool is_cached, + uint32_t alignment, void **phys); +extern void osa_free_phys_mem(void __kernel *virt); + +/* memory map/unmap */ +extern osa_err_t osa_iomap_rgn_init(void); +extern void osa_iomap_rgn_cleanup(void); +extern void __kernel *osa_ioremap(void *phy_addr, uint32_t size); +extern osa_err_t osa_iounmap(void __kernel *vir_addr, uint32_t size); +extern void __kernel *osa_ioremap_cached(void *phy_addr, uint32_t size); +extern osa_err_t osa_iounmap_cached(void __kernel *vir_addr, uint32_t size); + +/* the following two functions should be called in process context */ +extern osa_err_t osa_map_to_user(void __user *vir_addr, void *phy_addr, + uint32_t size, uint32_t prot); +extern osa_err_t osa_unmap_from_user(void __user *vir_addr); + +/* memory map/unmap */ +extern osa_err_t osa_map_section(void *phy_addr, void *vir_addr, uint32_t size, + uint32_t property); +extern osa_err_t osa_unmap_section(void *vir_addr, uint32_t size); +extern osa_err_t osa_map_page(void *phy_addr, void *vir_addr, + void *pte_phy_addr, void *pte_vir_addr, + uint32_t size, uint32_t property); +extern osa_err_t osa_unmap_page(void *vir_addr, uint32_t size); +extern osa_err_t osa_set_map_property(void *vir_addr, uint32_t size, + osa_mmap_type_t type, uint32_t property); + +/* memory pool related interfaces */ +extern osa_mpool_t osa_mpool_create(struct osa_mpool_info *arg); +extern osa_err_t osa_mpool_destroy(osa_mpool_t handle); +extern void *osa_mpool_alloc(osa_mpool_t handle, uint32_t len); +extern void osa_mpool_free(osa_mpool_t handle, void *addr); +extern osa_err_t osa_mpool_get_info(osa_mpool_t handle, + struct osa_mpool_info *mpool_info); + +/* NW only */ +/* caller needs to free the list generated by osa_vmem_to_pages */ +extern struct osa_page_entry *osa_vmem_to_pages(void __user *vir_addr, + uint32_t size); + +/* memory will be real-allocated by calling this function */ +/* NOTE: no copy_xxx_user needed then */ +extern osa_err_t osa_validate_vmem(void __user *vir_addr, uint32_t size); +/* re-enable the swap-able attribute of the memory block */ +extern osa_err_t osa_invalidate_vmem(void __user *vir_addr, uint32_t size); +/* memory will be real-allocated for a string */ +extern osa_err_t osa_validate_string(void __user *string); +/* re-enable the swap-able attribute of the memory block */ +extern osa_err_t osa_invalidate_string(void __user *string); + +/* translate virtual address to physical address */ +extern void *osa_virt_to_phys(void *virt_addr); +/* for SW only */ +extern void *osa_phys_to_virt(void __kernel *phys_addr); + +/* cache-related and TLB-related interfaces */ +extern void osa_invalidate_dcache(osa_mode_t mode, ulong_t start, + uint32_t size); +extern void osa_clean_dcache(osa_mode_t mode, ulong_t start, uint32_t size); +extern void osa_flush_dcache(osa_mode_t mode, ulong_t start, uint32_t size); +extern void osa_flush_dcache_all(void); +extern void osa_invalidate_l2dcache(osa_mode_t mode, ulong_t start, + uint32_t size); +extern void osa_clean_l2dcache(osa_mode_t mode, ulong_t start, uint32_t size); +extern void osa_flush_l2dcache(osa_mode_t mode, ulong_t start, uint32_t size); +extern void osa_flush_l2dcache_all(void); +extern void osa_flush_tlb(osa_mode_t mode, ulong_t start, uint32_t size); +extern void osa_flush_tlb_all(void); + +#endif /* _OSA_MEM_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_misc.h b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_misc.h new file mode 100644 index 00000000..ccb1af4c --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_misc.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#ifndef _OSA_MISC_H_ +#define _OSA_MISC_H_ + +#define OSA_1K (0x00000400) +#define OSA_2K (0x00000800) +#define OSA_4K (0x00001000) +#define OSA_8K (0x00002000) +#define OSA_16K (0x00004000) +#define OSA_32K (0x00008000) +#define OSA_64K (0x00010000) +#define OSA_128K (0x00020000) +#define OSA_256K (0x00040000) +#define OSA_512K (0x00080000) +#define OSA_1M (0x00100000) +#define OSA_2M (0x00200000) +#define OSA_4M (0x00400000) +#define OSA_8M (0x00800000) +#define OSA_16M (0x01000000) +#define OSA_32M (0x02000000) +#define OSA_64M (0x04000000) +#define OSA_128M (0x08000000) +#define OSA_256M (0x10000000) +#define OSA_512M (0x20000000) +#define OSA_1G (0x40000000) +#define OSA_2G (0x80000000) + +#endif /* _OSA_MISC_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_sched.h b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_sched.h new file mode 100644 index 00000000..624a6d3d --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_sched.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + * Filename : osa_sched.h + * Author : Dafu Lv + * Date Created : 28/08/08 + * Description : This is the header file of sched-related + * functions in osa layer. + * + */ + +#ifndef _OSA_SCHED_H_ +#define _OSA_SCHED_H_ + +#include + +extern void osa_enable_preempt(void); +extern void osa_disable_preempt(void); +extern void osa_yield(void); + +extern void osa_wakeup_process(struct task_struct *tsk); + +#endif /* _OSA_SCHED_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_sync.h b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_sync.h new file mode 100644 index 00000000..9431fb9f --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_sync.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#ifndef _OSA_SYNC_H_ +#define _OSA_SYNC_H_ + +#include "osa.h" + +extern osa_sem_t osa_create_sem(int32_t init_val); +extern void osa_destroy_sem(osa_sem_t handle); +extern osa_err_t osa_wait_for_sem(osa_sem_t handle, int32_t msec); +extern osa_err_t osa_try_to_wait_for_sem(osa_sem_t handle); +extern void osa_release_sem(osa_sem_t handle); + +extern osa_sem_t osa_create_rw_sem(int32_t init_val); +extern void osa_destroy_rw_sem(osa_sem_t handle); +extern osa_err_t osa_wait_for_rw_sem(osa_sem_t handle, int32_t msec); +extern osa_err_t osa_try_to_wait_for_rw_sem(osa_sem_t handle); +extern void osa_release_rw_sem(osa_sem_t handle); + +extern osa_mutex_t osa_create_mutex(void); +extern osa_mutex_t osa_create_mutex_locked(void); +extern void osa_destroy_mutex(osa_mutex_t handle); +extern osa_err_t osa_wait_for_mutex(osa_mutex_t handle, int32_t msec); +extern osa_err_t osa_try_to_wait_for_mutex(osa_mutex_t handle); +extern void osa_release_mutex(osa_mutex_t handle); + +extern osa_event_t osa_create_event(bool is_set); +extern void osa_destroy_event(osa_event_t handle); +extern osa_err_t osa_wait_for_event(osa_event_t handle, int32_t msec); +extern osa_err_t osa_try_to_wait_for_event(osa_event_t handle); +extern void osa_set_event(osa_event_t handle); +extern void osa_reset_event(osa_event_t handle); + +#endif /* _OSA_SYNC_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_thread.h b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_thread.h new file mode 100644 index 00000000..0b018924 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_thread.h @@ -0,0 +1,75 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + * Filename : osa_thread.h + * Author : Dafu Lv + * Date Created : 21/03/08 + * Description : This is the header file of thread-related functions in osa. + * + */ + +#ifndef _OSA_THREAD_H_ +#define _OSA_THREAD_H_ + +#include "osa.h" + +#define OSA_THRD_PRIO_TIME_CRITICAL (0) +#define OSA_THRD_PRIO_HIGHEST (1) +#define OSA_THRD_PRIO_ABOVE_NORMAL (2) +#define OSA_THRD_PRIO_NORMAL (3) +#define OSA_THRD_PRIO_BELOW_NORMAL (4) +#define OSA_THRD_PRIO_LOWEST (5) +#define OSA_THRD_PRIO_ABOVE_IDLE (6) +#define OSA_THRD_PRIO_IDLE (7) + +struct osa_thread_attr { + uint8_t *name; + uint32_t prio; + void *stack_addr; + uint32_t stack_size; +}; + +/* for OSA in secure world */ +typedef enum osa_thread_status { + OSA_THRD_STATUS_RUNNING = 0, + OSA_THRD_STATUS_SLEEPING, + OSA_THRD_STATUS_SUSPENDED, + OSA_THRD_STATUS_CREATING, + OSA_THRD_STATUS_EXITED, + OSA_THRD_STATUS_UNKOWN, +} osa_thread_status_t; + +extern osa_thread_t osa_create_thread(void (*func) (void *), void *arg, + struct osa_thread_attr *attr); +extern void osa_destroy_thread(osa_thread_t handle); +/* stop thread synchronously */ +extern osa_err_t osa_stop_thread(osa_thread_t handle); +/* stop thread asynchronously */ +extern osa_err_t osa_stop_thread_async(osa_thread_t handle); +/* + * user should check the return value of the function frequently + * in his main loop. + * if true, the user function should terminate itself as quickly as possible. + */ +extern bool osa_thread_should_stop(void); + +extern osa_thread_id_t osa_get_thread_id(osa_thread_t handle); +extern osa_thread_id_t osa_get_thread_group_id(osa_thread_t handle); +extern osa_thread_id_t osa_get_current_thread_id(void); +extern osa_thread_id_t osa_get_current_thread_group_id(void); + +#endif /* _OSA_THREAD_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_time.h b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_time.h new file mode 100644 index 00000000..5dcee7a0 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_time.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + * Filename : osa_time.h + * Author : Dafu Lv + * Date Created : 17/08/09 + * Description : This is the header file of time-related functions in osa. + * + */ + +#ifndef _OSA_TIME_H_ +#define _OSA_TIME_H_ + +#include + +extern osa_err_t osa_get_time(osa_time_t *time); + +#endif /* _OSA_TIME_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_timer.h b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_timer.h new file mode 100644 index 00000000..aa864883 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/include/osa_timer.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + * Filename : osa_timer.h + * Author : Dafu Lv + * Date Created : 21/03/08 + * Description : This is the header file of timer-related functions in osa. + * + */ + +#ifndef _OSA_TIMER_H_ +#define _OSA_TIMER_H_ + +#include + +/* create a timer to call func with arg as the argument */ +osa_timer_t osa_create_timer(void (*func) (void *), void *arg, uint32_t msec); +/* destroy the timer */ +void osa_destroy_timer(osa_timer_t handle); +/* start the timer */ +osa_err_t osa_start_timer(osa_timer_t handle); +/* cancel the timer */ +osa_err_t osa_cancel_timer(osa_timer_t handle); +/* modify the timer */ +osa_err_t osa_modify_timer(osa_timer_t handle, uint32_t msec); + +/* APIs called by TZDD */ +/* init timer module */ +osa_err_t osa_init_timer_module(void); +/* cleanup timer module */ +void osa_cleanup_timer_module(void); + +#endif /* _OSA_TIMER_H_ */ diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/osa.c b/arch/arm/mach-berlin/modules/tzdd/osa/osa.c new file mode 100644 index 00000000..2bd79717 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/osa.c @@ -0,0 +1,71 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + * Filename : osa.c + * Author : Dafu Lv + * Date Created : 21/03/08 + * Description : This is the source code of init/cleanup functions in osa. + * + */ + +/* + ****************************** + * HEADERS + ****************************** + */ + +#include + +/* + ****************************** + * FUNCTIONS + ****************************** + */ + +/* + * Name: osa_init_module + * + * Description: the init function of osa module + * + * Params: none + * + * Returns: osa_err_t + * + * Notes: the function is called in tzdd + */ +osa_err_t osa_init_module(void) +{ + return OSA_OK; +} +OSA_EXPORT_SYMBOL(osa_init_module); + +/* + * Name: osa_cleanup_module + * + * Description: the cleanup function of osa module + * + * Params: none + * + * Returns: none + * + * Notes: the function is called in tzdd + */ +void osa_cleanup_module(void) +{ + /* nothing */ ; +} +OSA_EXPORT_SYMBOL(osa_cleanup_module); diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/osa_atomic.c b/arch/arm/mach-berlin/modules/tzdd/osa/osa_atomic.c new file mode 100644 index 00000000..eb61d5fe --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/osa_atomic.c @@ -0,0 +1,66 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#include + +int osa_atomic_read(osa_atomic_t *v) +{ + return atomic_read(v); +} +OSA_EXPORT_SYMBOL(osa_atomic_read); + +void osa_atomic_set(osa_atomic_t *v, int i) +{ + atomic_set(v, i); + + return; +} +OSA_EXPORT_SYMBOL(osa_atomic_set); + +void osa_atomic_add(int i, osa_atomic_t *v) +{ + atomic_add(i, v); + + return; +} +OSA_EXPORT_SYMBOL(osa_atomic_add); + +void osa_atomic_sub(int i, osa_atomic_t *v) +{ + atomic_sub(i, v); + + return; +} +OSA_EXPORT_SYMBOL(osa_atomic_sub); + +void osa_atomic_inc(osa_atomic_t *v) +{ + atomic_inc(v); + + return; +} +OSA_EXPORT_SYMBOL(osa_atomic_inc); + +void osa_atomic_dec(osa_atomic_t *v) +{ + atomic_dec(v); + + return; +} +OSA_EXPORT_SYMBOL(osa_atomic_dec); diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/osa_dbg.c b/arch/arm/mach-berlin/modules/tzdd/osa/osa_dbg.c new file mode 100644 index 00000000..9faeeed6 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/osa_dbg.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#include + +#ifdef OSA_DEBUG + +uint32_t osa_dbg_level = DBG_ALL; + +#else + +uint32_t osa_dbg_level = DBG_LOG; + +#endif + +uint32_t osa_dbg_print(uint32_t level, const void *format, ...) +{ + va_list args; + uint32_t ret = 0; + + if (level >= osa_dbg_level) { + va_start(args, format); + ret = vprintk(format, args); + va_end(args); + } + + return ret; +} +OSA_EXPORT_SYMBOL(osa_dbg_print); + +void osa_dbg_bt(void) +{ +#ifdef OSA_DEBUG + + dump_stack(); + +#endif /* OSA_DEBUG */ +} +OSA_EXPORT_SYMBOL(osa_dbg_bt); diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/osa_delay.c b/arch/arm/mach-berlin/modules/tzdd/osa/osa_delay.c new file mode 100644 index 00000000..82bbd3e3 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/osa_delay.c @@ -0,0 +1,54 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + * Filename : osa_delay.c + * Author : Dafu Lv + * Date Created : 21/03/08 + * Description : This is the source code of delay-related functions in osa. + * + */ + +/* + ****************************** + * HEADERS + ****************************** + */ + +#include + +/* + ****************************** + * FUNCTIONS + ****************************** + */ + +/* + * Name: osa_sleep + * + * Description: sleep in about n micro-seconds. + * + * Params: msec - number of the micro-seconds. + * + * Returns: none + * + * Notes: the function does yield CPU and cause task re-scheduling. + */ +void osa_sleep(uint32_t msec) +{ + msleep(msec); +} +OSA_EXPORT_SYMBOL(osa_sleep); diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/osa_irq.c b/arch/arm/mach-berlin/modules/tzdd/osa/osa_irq.c new file mode 100644 index 00000000..fcd4dc4d --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/osa_irq.c @@ -0,0 +1,331 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + * Filename : osa_irq.c + * Author : Dafu Lv + * Date Created : 21/03/08 + * Description : This is the source code of irq-related functions in osa. + * + */ + +/* + ****************************** + * HEADERS + ****************************** + */ + +#include + +/* + ****************************** + * MACROS + ****************************** + */ + +#define INIT_IRQ_HANDLE_MAGIC(ih) \ +do { \ + ((struct _irq_handle *)ih)->magic[0] = 'I'; \ + ((struct _irq_handle *)ih)->magic[1] = 'r'; \ + ((struct _irq_handle *)ih)->magic[2] = 'Q'; \ + ((struct _irq_handle *)ih)->magic[3] = 'h'; \ +} while (0) + +#define IS_IRQ_HANDLE_VALID(ih) \ + ('I' == ((struct _irq_handle *)ih)->magic[0] && \ + 'r' == ((struct _irq_handle *)ih)->magic[1] && \ + 'Q' == ((struct _irq_handle *)ih)->magic[2] && \ + 'h' == ((struct _irq_handle *)ih)->magic[3]) + +#define CLEAN_IRQ_HANDLE_MAGIC(ih) \ +do { \ + ((struct _irq_handle *)ih)->magic[0] = 0; \ + ((struct _irq_handle *)ih)->magic[1] = 0; \ + ((struct _irq_handle *)ih)->magic[2] = 0; \ + ((struct _irq_handle *)ih)->magic[3] = 0; \ +} while (0) + +/* + ****************************** + * TYPES + ****************************** + */ + +struct _irq_handle { + uint8_t magic[4]; + + int32_t irq; + void (*isr) (void *); + void (*dsr) (void *); + void *arg; + + struct tasklet_struct tl; +}; + +/* + ****************************** + * FUNCTIONS + ****************************** + */ + +/* + * Name: osa_disable_irq + * + * Description: disable the irqs + * + * Params: none + * + * Returns: none + * + * Notes: none + */ +void osa_disable_irq(void) +{ + local_irq_disable(); +} +OSA_EXPORT_SYMBOL(osa_disable_irq); + +/* + * Name: osa_enable_irq + * + * Description: enable the irqs + * + * Params: none + * + * Returns: none + * + * Notes: none + */ +void osa_enable_irq(void) +{ + local_irq_enable(); +} +OSA_EXPORT_SYMBOL(osa_enable_irq); + +/* + * Name: osa_save_irq + * + * Description: save the irq flags and disable the irqs + * + * Params: flags - the irq flags to be saved + * + * Returns: none + * + * Notes: none + */ +void osa_save_irq(uint32_t *flags) +{ + if (flags) + local_irq_save(*((ulong_t *)(flags))); +} +OSA_EXPORT_SYMBOL(osa_save_irq); + +/* + * Name: osa_restore_irq + * + * Description: restore the irq flags + * + * Params: flags - the irq flags to be restored + * + * Returns: none + * + * Notes: none + */ +void osa_restore_irq(uint32_t *flags) +{ + OSA_ASSERT(flags); + + local_irq_restore(*(ulong_t *)flags); +} +OSA_EXPORT_SYMBOL(osa_restore_irq); + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)) + +static irqreturn_t _isr_shell(int irq, void *dev_id, struct pt_regs *regs) +{ + struct _irq_handle *irq_handle = (struct _irq_handle *)dev_id; + + if (irq_handle->isr) + irq_handle->isr(irq_handle->arg); + + /* + * FIXME: + * here is a bug. + * isr should return the status whether the irq is handled. + * that means isr needs a return value. + */ + + if (irq_handle->dsr) + tasklet_schedule(&irq_handle->tl); + + return IRQ_HANDLED; +} + +#else + +static irqreturn_t _isr_shell(int irq, void *dev_id) +{ + struct _irq_handle *irq_handle = (struct _irq_handle *)dev_id; + + if (irq_handle->isr) + irq_handle->isr(irq_handle->arg); + + /* + * FIXME: + * here is a bug. + * isr should return the status whether the irq is handled. + * that means isr needs a return value. + */ + + if (irq_handle->dsr) + tasklet_schedule(&irq_handle->tl); + + return IRQ_HANDLED; +} + +#endif + +/* + * Name: osa_hook_irq + * + * Description: request the irq and hook the callback isr + * + * Params: irq - irq number to be hooked + * isr - the interrupt service routine of the irq + * dsr - the delayed service routine of the irq, no use in linux + * arg - the argument of the isr/dsr when called + * param - the os-specific param of irq + * param->flag - status flag of irq + * SA_SHIRQ interrupt is shared + * SA_INTERRUPT disable local interrupts while processing + * SA_SAMPLE_RANDOM the interrupt can be used for entropy + * + * Returns: osa_irq_t - the irq-hooking handle + * + * Notes: none + */ +osa_irq_t osa_hook_irq(int32_t irq, + void (*isr) (void *), void (*dsr) (void *), + void *arg, struct osa_irq_param *param) +{ + struct _irq_handle *ret = NULL; + int32_t res; + + OSA_ASSERT((irq >= 0) && (irq < NR_IRQS)); + OSA_ASSERT(isr || dsr); + OSA_ASSERT(param); + + ret = kmalloc(sizeof(struct _irq_handle), GFP_KERNEL); + if (!ret) { + osa_dbg_print(DBG_ERR, "ERROR - failed to create irq handle\n"); + return NULL; + } + + INIT_IRQ_HANDLE_MAGIC(ret); + + ret->irq = irq; + ret->isr = isr; + ret->dsr = dsr; + ret->arg = arg; + + if (dsr) { + ret->tl.next = NULL; + ret->tl.state = 0; + atomic_set(&ret->tl.count, 0); + ret->tl.func = (void (*)(ulong_t))dsr; + ret->tl.data = (ulong_t) arg; + } + + res = request_irq(irq, + _isr_shell, + (ulong_t) param->flag, "osa", (void *)ret); + if (0 == res) { + return (osa_irq_t) ret; + } else { + osa_dbg_print(DBG_ERR, "ERROR - failed to hook irq %d\n", irq); + CLEAN_IRQ_HANDLE_MAGIC(ret); + kfree(ret); + return NULL; + } +} +OSA_EXPORT_SYMBOL(osa_hook_irq); + +/* + * Name: osa_free_irq + * + * Description: free the irq-hooking + * + * Params: handle - the handle of irq-hooking + * + * Returns: osa_err_t - the status of freeing irq, always OK. + * + * Notes: none + */ +osa_err_t osa_free_irq(osa_irq_t handle) +{ + struct _irq_handle *irq_handle = handle; + + OSA_ASSERT(IS_IRQ_HANDLE_VALID(irq_handle)); + /* + * to avoid the condition of freeing irq when isr is called, + * the irq will be disabled and then enabled in free_irq. + * so what we need to do here is to free_irq and then + * to free irq handle. + */ + free_irq(irq_handle->irq, irq_handle); + + CLEAN_IRQ_HANDLE_MAGIC(irq_handle); + kfree(irq_handle); + + return OSA_OK; +} +OSA_EXPORT_SYMBOL(osa_free_irq); + +/* + * Name: osa_mask_irq + * + * Description: mask the irq + * + * Params: irq - the irq number to be masked + * + * Returns: none + * + * Notes: no implementation in linux currently + */ +void osa_mask_irq(uint32_t irq) +{ + OSA_ASSERT((irq >= 0) && (irq < NR_IRQS)); + disable_irq(irq); +} +OSA_EXPORT_SYMBOL(osa_mask_irq); + +/* + * Name: osa_unmask_irq + * + * Description: unmask the irq + * + * Params: irq - the irq number to be unmasked + * + * Returns: none + * + * Notes: no implementation in linux currently + */ +void osa_unmask_irq(uint32_t irq) +{ + OSA_ASSERT((irq >= 0) && (irq < NR_IRQS)); + enable_irq(irq); +} +OSA_EXPORT_SYMBOL(osa_unmask_irq); diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/osa_list.c b/arch/arm/mach-berlin/modules/tzdd/osa/osa_list.c new file mode 100644 index 00000000..d78c9496 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/osa_list.c @@ -0,0 +1,81 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + * Filename : osa_list.c + * Author : Dafu Lv + * Date Created : 21/03/08 + * Description : This is the source code of list-related functions in osa. + * + */ + +/* + ****************************** + * HEADERS + ****************************** + */ + +#include + +void osa_list_init_head(struct osa_list *head) +{ + OSA_ASSERT(head); + + head->next = head; + head->prev = head; +} +OSA_EXPORT_SYMBOL(osa_list_init_head); + +void osa_list_add(struct osa_list *entry, struct osa_list *head) +{ + OSA_ASSERT(entry); + OSA_ASSERT(head); + + entry->next = head->next; + entry->prev = head; + head->next->prev = entry; + head->next = entry; +} +OSA_EXPORT_SYMBOL(osa_list_add); + +void osa_list_add_tail(struct osa_list *entry, struct osa_list *head) +{ + OSA_ASSERT(entry); + OSA_ASSERT(head); + + entry->next = head; + entry->prev = head->prev; + head->prev->next = entry; + head->prev = entry; +} +OSA_EXPORT_SYMBOL(osa_list_add_tail); + +void osa_list_del(struct osa_list *entry) +{ + OSA_ASSERT(entry); + + entry->prev->next = entry->next; + entry->next->prev = entry->prev; +} +OSA_EXPORT_SYMBOL(osa_list_del); + +bool osa_list_empty(struct osa_list *head) +{ + OSA_ASSERT(head); + + return ((head->next == head) && (head->prev == head)); +} +OSA_EXPORT_SYMBOL(osa_list_empty); diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/osa_mem.c b/arch/arm/mach-berlin/modules/tzdd/osa/osa_mem.c new file mode 100644 index 00000000..bf318d5c --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/osa_mem.c @@ -0,0 +1,1474 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + * Filename : osa_mem.c + * Author : Dafu Lv + * Date Created : 21/03/08 + * Description : This is the source code of memory-related functions in osa. + * + */ + +/* + ****************************** + * HEADERS + ****************************** + */ + +/* + * typically OSA supports the test of checking memory leak. + * all the memory alloc/free and new/delete will be overloaded + * by the memory-leak-checking tool. + * since osa_mem.c implements the memory management behaviors, + * the interfaces in this file should not be overloaded. + * the macro, "OSA_DISABLE_ML_OSA_MEM", makes this file invisible to + * the overloading behaviors of the memory-leak checking tool. + */ +#define OSA_DISABLE_ML_OSA_MEM + +#include + +/* + ****************************** + * MACROS + ****************************** + */ + +/* + * *normally* alloc_pages can support less than + * or equal to OSA_4M memory block. + * the capability of alloc_pages can be configured + * in .config. (CONFIG_FORCE_MAX_ZONEORDER) + */ +#define KMEM_ALLOC_MAX_SIZE (OSA_4M) + +#define L1_CACHE_LINE_SIZE (32) +#define L2_CACHE_LINE_SIZE (32) + +#define L1_CACHE_LINE_MASK (0xFFFFFFE0) + +#define MAKE_PAGE_VALID(va) \ +do { \ + volatile uint32_t tmp; \ + uint32_t ret; \ + uint32_t *p = (uint32_t *)&tmp; \ + ret = copy_from_user((void *)p, (void __user *)va, 1); \ + ret = copy_to_user((void __user *)va, (__force void *)p, 1); \ +} while (0) + +/* + ****************************** + * TYPES + ****************************** + */ + +struct _pages_record { + struct osa_list node; + + void __kernel *vir_addr; + uint32_t size; +}; + +#if 0 + +struct _phys_mem_info_header { + void *alloc_virt_addr; + void *map_virt_addr; + uint32_t map_size; + bool is_cached; +}; + +#else + +struct _phys_mem_info_header { + void *alloc_virt_addr; + void *alloc_phys_addr; + uint32_t alloc_size; + bool is_cached; +}; + +#endif + +/* + ****************************** + * VARIABLES + ****************************** + */ +static struct osa_list _g_alloc_pages_list = OSA_LIST_HEAD(_g_alloc_pages_list); +static DEFINE_SPINLOCK(_g_pg_walk_by_cp15_lock); + +static DEFINE_SEMAPHORE(_g_list_sema); + +/* + ****************************** + * FUNCTIONS + ****************************** + */ + +/* + * Name: osa_kmem_alloc + * + * Description: allocate physical/virtual-sequential memory block in kernel + * + * Params: size - the size of the memory block + * + * Returns: void __kernel * - the pointer to the memory block allocated + * + * Notes: no call in isr + */ +void __kernel *osa_kmem_alloc(uint32_t size) +{ + OSA_ASSERT(size); + + if (size < OSA_128K) + return (void __kernel *)kmalloc(size, GFP_KERNEL); + else if (size <= KMEM_ALLOC_MAX_SIZE) { + struct page *page; + struct _pages_record *record; + void __kernel *ret; + + record = + (struct _pages_record *) + kmalloc(sizeof(struct _pages_record), GFP_KERNEL); + if (!record) { + osa_dbg_print(DBG_ERR, + "ERROR - failed to alloc a page record in osa_kmem_alloc\n"); + return NULL; + } + + page = alloc_pages(GFP_KERNEL, get_order(size)); + if (!page) { + osa_dbg_print(DBG_ERR, + "ERROR - failed to alloc pages in osa_kmem_alloc\n"); + kfree(record); + return NULL; + } + + ret = (void __kernel *)page_address(page); + + record->vir_addr = ret; + record->size = size; + + down(&_g_list_sema); + osa_list_add(&record->node, &_g_alloc_pages_list); + up(&_g_list_sema); + + return ret; + } else { + osa_dbg_print(DBG_ERR, + "ERROR - too large memory block required\n"); + return NULL; + } +} +OSA_EXPORT_SYMBOL(osa_kmem_alloc); + +/* + * Name: osa_kmem_free + * + * Description: free the memory block allocated by osa_kmem_alloc + * + * Params: addr - the pointer to the memory block to free + * + * Returns: none + * + * Notes: no call in isr + */ +void osa_kmem_free(void __kernel *addr) +{ + struct _pages_record *record = NULL; + struct osa_list *ptr = NULL; + + OSA_ASSERT(addr); + + down(&_g_list_sema); + osa_list_iterate(&_g_alloc_pages_list, ptr) { + OSA_LIST_ENTRY(ptr, struct _pages_record, node, record); + OSA_ASSERT(record); + if (record->vir_addr == addr) + break; + } + + if (ptr != &_g_alloc_pages_list) { + /* find record in the list */ + free_pages((ulong_t) addr, get_order(record->size)); + osa_list_del(&record->node); + up(&_g_list_sema); + kfree(record); + } else { + up(&_g_list_sema); + kfree(addr); + } +} +OSA_EXPORT_SYMBOL(osa_kmem_free); + +/* + * Name: osa_vmem_alloc + * + * Description: allocate the virtual-sequential memory block in kernel + * + * Params: size - the size of the memory block + * attr - attribute of the memory block, see osa_mem_attr_t + * + * Returns: void __kernel * - the pointer to the memory block allocated + * + * Notes: no call in isr + * OSA_MEM_WRITE_ONLY is not supported in linux + */ +void __kernel *osa_vmem_alloc(uint32_t size, osa_mem_attr_t attr) +{ + void __kernel *ret = NULL; + + OSA_ASSERT(size); + + switch (attr) { + case OSA_MEM_NO_ACCESS: + ret = __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_NONE); + break; + case OSA_MEM_READ_ONLY: + ret = + __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_READONLY); + break; + case OSA_MEM_WRITE_ONLY: + ret = __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL); + break; + case OSA_MEM_READ_WRITE: + ret = __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL); + break; + default: + OSA_ASSERT(0); + } + + return ret; +} +OSA_EXPORT_SYMBOL(osa_vmem_alloc); + +/* + * Name: osa_vmem_free + * + * Description: free the memory block allocated by osa_vmem_alloc + * + * Params: addr - the pointer to the memory block to free + * + * Returns: none + * + * Notes: no call in isr + */ +void osa_vmem_free(void __kernel *addr) +{ + OSA_ASSERT(addr); + + vfree(addr); +} +OSA_EXPORT_SYMBOL(osa_vmem_free); + +/* + * Name: osa_pages_alloc + * + * Description: allocate pages in kernel + * + * Params: nr - the number of pages + * + * Returns: void __kernel * - the pointer to the memory block allocated + * + * Notes: no call in isr + */ +void __kernel *osa_pages_alloc(uint32_t nr) +{ + uint32_t size = PAGE_SIZE * nr; + + OSA_ASSERT(nr); + + if (size <= KMEM_ALLOC_MAX_SIZE) { + struct page *page; + struct _pages_record *record; + void __kernel *ret; + void *phys; + uint32_t i; + + record = + (struct _pages_record *) + kmalloc(sizeof(struct _pages_record), GFP_KERNEL); + if (!record) { + osa_dbg_print(DBG_ERR, + "ERROR - failed to alloc a page record in osa_pages_alloc\n"); + return NULL; + } + + page = alloc_pages(GFP_KERNEL, get_order(size)); + if (!page) { + osa_dbg_print(DBG_ERR, + "ERROR - failed to alloc pages in osa_pages_alloc\n"); + kfree(record); + return NULL; + } + + ret = (void __kernel *)page_address(page); + + /* + * in the current kernel, + * remap_pfn_range works in the condition of + * PageReserved is set. + */ + phys = __virt_to_phys(ret); + for (i = 0; i < nr; i++) { + SetPageReserved(pfn_to_page + (((uint32_t) phys >> PAGE_SHIFT) + i)); + } + + record->vir_addr = ret; + record->size = size; + + down(&_g_list_sema); + osa_list_add(&record->node, &_g_alloc_pages_list); + up(&_g_list_sema); + + return ret; + } else { + osa_dbg_print(DBG_ERR, + "ERROR - too large memory block required\n"); + return NULL; + } +} +OSA_EXPORT_SYMBOL(osa_pages_alloc); + +/* + * Name: osa_pages_free + * + * Description: free the memory block allocated by osa_pages_alloc + * + * Params: addr - the pointer to the memory block to free + * + * Returns: none + * + * Notes: no call in isr + */ +void osa_pages_free(void __kernel *addr) +{ + struct _pages_record *record = NULL; + struct osa_list *ptr = NULL; + void *phys; + uint32_t nr; + uint32_t i; + + OSA_ASSERT(addr); + + down(&_g_list_sema); + osa_list_iterate(&_g_alloc_pages_list, ptr) { + OSA_LIST_ENTRY(ptr, struct _pages_record, node, record); + OSA_ASSERT(record); + if (record->vir_addr == addr) + break; + } + + OSA_ASSERT(ptr != &_g_alloc_pages_list); + + phys = __virt_to_phys(addr); + nr = record->size >> PAGE_SHIFT; + for (i = 0; i < nr; i++) { + ClearPageReserved(pfn_to_page + (((uint32_t) phys >> PAGE_SHIFT) + i)); + } + + /* find record in the list */ + free_pages((ulong_t) addr, get_order(record->size)); + osa_list_del(&record->node); + up(&_g_list_sema); + kfree(record); +} +OSA_EXPORT_SYMBOL(osa_pages_free); + +osa_err_t osa_phys_mem_pool_init(void) +{ + return OSA_OK; +} + +void osa_phys_mem_pool_cleanup(void) +{ + return; +} + +#if 0 + +void *osa_alloc_phys_mem(uint32_t size, bool is_cached, uint32_t alignment, + void **phys) +{ + uint32_t mem_blk_size; + void *alloc_virt_addr; + void *map_virt_addr; + void *ret_virt_addr; + struct _phys_mem_info_header *rec_virt_addr; + + if (!size || !phys) + return NULL; + + mem_blk_size = size + sizeof(struct _phys_mem_info_header) + alignment; + + alloc_virt_addr = osa_kmem_alloc(mem_blk_size); + if (NULL == alloc_virt_addr) { + *phys = NULL; + return NULL; + } + + /* flush the dcache for shared physical memory with ioremap. */ + osa_flush_dcache_all(); + osa_flush_l2dcache_all(); + + if (is_cached) { + map_virt_addr = + osa_ioremap_cached(osa_virt_to_phys(alloc_virt_addr), + mem_blk_size); + } else { + map_virt_addr = + osa_ioremap(osa_virt_to_phys(alloc_virt_addr), + mem_blk_size); + } + if (NULL == map_virt_addr) { + *phys = NULL; + osa_kmem_free(alloc_virt_addr); + return NULL; + } + + ret_virt_addr = (void *)(((uint32_t) + map_virt_addr + alignment - 1) & ~(alignment - + 1)); + do { + if (ret_virt_addr - map_virt_addr + >= sizeof(struct _phys_mem_info_header)) { + rec_virt_addr = + (struct _phys_mem_info_header *)((uint32_t) + ret_virt_addr - + sizeof(struct + _phys_mem_info_header)); + break; + } else { + ret_virt_addr = (void *)((uint32_t) ret_virt_addr + + alignment); + } + } while (1); + + OSA_ASSERT((uint32_t) rec_virt_addr >= (uint32_t) map_virt_addr); + OSA_ASSERT((uint32_t) ret_virt_addr + size + <= (uint32_t) map_virt_addr + mem_blk_size); + + rec_virt_addr->alloc_virt_addr = alloc_virt_addr; + rec_virt_addr->map_virt_addr = map_virt_addr; + rec_virt_addr->map_size = mem_blk_size; + rec_virt_addr->is_cached = is_cached; + + *phys = osa_virt_to_phys(ret_virt_addr); + + return ret_virt_addr; +} +OSA_EXPORT_SYMBOL(osa_alloc_phys_mem); + +void osa_free_phys_mem(void *virt) +{ + struct _phys_mem_info_header *rec_virt_addr; + void *map_virt_addr; + uint32_t map_size; + void *alloc_virt_addr; + + OSA_ASSERT(virt); + + rec_virt_addr = (struct _phys_mem_info_header *)((uint32_t) virt - + sizeof(struct + _phys_mem_info_header)); + + alloc_virt_addr = rec_virt_addr->alloc_virt_addr; + map_virt_addr = rec_virt_addr->map_virt_addr; + map_size = rec_virt_addr->map_size; + + if (rec_virt_addr->is_cached) + osa_iounmap_cached(map_virt_addr, map_size); + else + osa_iounmap(map_virt_addr, map_size); + + osa_kmem_free(alloc_virt_addr); +} +OSA_EXPORT_SYMBOL(osa_free_phys_mem); + +#else + +void *osa_alloc_phys_mem(uint32_t size, bool is_cached, uint32_t alignment, + void **phys) +{ + uint32_t mem_blk_size; + void *alloc_virt_addr; + void *alloc_phys_addr; + void *ret_virt_addr; + struct _phys_mem_info_header *rec_virt_addr; + + if (!size || !phys) + return NULL; + + mem_blk_size = size + sizeof(struct _phys_mem_info_header) + alignment; + + if (is_cached) { + alloc_virt_addr = kmalloc(mem_blk_size, GFP_KERNEL); + if (NULL == alloc_virt_addr) { + *phys = NULL; + return NULL; + } + alloc_phys_addr = __virt_to_phys(alloc_virt_addr); + } else { + alloc_virt_addr = + dma_alloc_coherent(NULL, mem_blk_size, + (dma_addr_t *)&alloc_phys_addr, + GFP_KERNEL); + if (NULL == alloc_virt_addr) { + *phys = NULL; + return NULL; + } + } + + /* calculate the virtual address returned */ + ret_virt_addr = (void *)(((uint32_t) + alloc_virt_addr + alignment - + 1) & (~(alignment - 1))); + do { + if (ret_virt_addr - alloc_virt_addr + >= sizeof(struct _phys_mem_info_header)) { + rec_virt_addr = + (struct _phys_mem_info_header *)((uint32_t) + ret_virt_addr - + sizeof(struct + _phys_mem_info_header)); + break; + } else { + ret_virt_addr = (void *)((uint32_t) ret_virt_addr + + alignment); + } + } while (1); + + OSA_ASSERT((uint32_t) rec_virt_addr >= (uint32_t) alloc_virt_addr); + OSA_ASSERT((uint32_t) ret_virt_addr + size + <= (uint32_t) alloc_virt_addr + mem_blk_size); + + rec_virt_addr->alloc_virt_addr = alloc_virt_addr; + rec_virt_addr->alloc_phys_addr = alloc_phys_addr; + rec_virt_addr->alloc_size = mem_blk_size; + rec_virt_addr->is_cached = is_cached; + + *phys = (void *)((uint32_t) alloc_phys_addr + + ((uint32_t) ret_virt_addr - + (uint32_t) alloc_virt_addr)); + + return ret_virt_addr; +} +OSA_EXPORT_SYMBOL(osa_alloc_phys_mem); + +void osa_free_phys_mem(void *virt) +{ + struct _phys_mem_info_header *rec_virt_addr; + + OSA_ASSERT(virt); + + rec_virt_addr = (struct _phys_mem_info_header *)((uint32_t) virt - + sizeof(struct + _phys_mem_info_header)); + + if (rec_virt_addr->is_cached) { + kfree(rec_virt_addr->alloc_virt_addr); + } else { + dma_free_coherent(NULL, rec_virt_addr->alloc_size, + rec_virt_addr->alloc_virt_addr, + (dma_addr_t) rec_virt_addr->alloc_phys_addr); + } +} +OSA_EXPORT_SYMBOL(osa_free_phys_mem); + +#endif +#if 0 +/* + * Name: _osa_ioremap + * + * Description: map a physical-sequential addressing space to kernel space + * + * Params: phy_addr - the physical address of the addressing space + * size - the size of the addressing space (1M aligned) + * flags - the flags in pte. see asm/pgtable.h + * + * Returns: void __kernel * - the virtual address of the mapping block + * NULL for an error occures. + * + * Notes: none + */ +static void __kernel *_osa_ioremap(void *phy_addr, uint32_t size, ulong_t flags) +{ + /* flags is no checked since it is not exported to user */ + if (flags & (L_PTE_CACHEABLE | L_PTE_BUFFERABLE)) + return ioremap_cached((ulong_t) phy_addr, size); + else + return ioremap((ulong_t) phy_addr, size); + +} +#endif +/* + * Name: _osa_iounmap + * + * Description: unmap a physical-sequential addressing space from kernel space + * + * Params: vir_addr - the virtual address to be unmapped from + * size - the size of mapping memory block (no use) + * + * Returns: status code + * TZ_OK - success + * TZ_OSA_BAD_ARG - bad argument + * + * Notes: none + */ +static osa_err_t _osa_iounmap(void __kernel *vir_addr, uint32_t size) +{ +#ifdef MK2 + __iounmap((void __iomem *)vir_addr); +#else + __arm_iounmap((void __iomem *)vir_addr); +#endif + return OSA_OK; +} + +/* + * Name: osa_ioremap + * + * Description: the wrapper for mapping noncacheable-nonbufferable space + * + * Params: phy_addr - the physical address of the addressing space + * size - the size of the addressing space (1M aligned) + * + * Returns: void __kernel * - the virtual address of the mapping block + * NULL for an error occures. + * + * Notes: none + */ +void __kernel *osa_ioremap(void *phy_addr, uint32_t size) +{ + return ioremap((ulong_t) phy_addr, size); +} +OSA_EXPORT_SYMBOL(osa_ioremap); + +/* + * Name: osa_iounmap + * + * Description: the wrapper for unmapping noncacheable-nonbufferable space + * + * Params: vir_addr - the virtual address to be unmapped from + * size - the size of mapping memory block (no use) + * + * Returns: status code + * TZ_OK - success + * TZ_OSA_BAD_ARG - bad argument + * Notes: none + */ +osa_err_t osa_iounmap(void __kernel *vir_addr, uint32_t size) +{ + return _osa_iounmap((void __iomem *)vir_addr, size); +} +OSA_EXPORT_SYMBOL(osa_iounmap); + +/* + * Name: osa_ioremap_cached + * + * Description: the wrapper for mapping cacheable-bufferable space + * + * Params: phy_addr - the physical address of the addressing space + * size - the size of the addressing space (1M aligned) + * + * Returns: void __kernel * - the virtual address of the mapping block + * NULL for an error occures. + * + * Notes: none + */ +void __kernel *osa_ioremap_cached(void *phy_addr, uint32_t size) +{ + return ioremap_cached((ulong_t) phy_addr, size); +} +OSA_EXPORT_SYMBOL(osa_ioremap_cached); + +/* + * Name: osa_iounmap_cached + * + * Description: the wrapper for unmapping cacheable-bufferable space + * + * Params: vir_addr - the virtual address to be unmapped from + * size - the size of mapping memory block (no use) + * + * Returns: status code + * TZ_OK - success + * TZ_OSA_BAD_ARG - bad argument + * + * Notes: none + */ +osa_err_t osa_iounmap_cached(void __kernel *vir_addr, uint32_t size) +{ + return _osa_iounmap((void __iomem *)vir_addr, size); +} +OSA_EXPORT_SYMBOL(osa_iounmap_cached); + +static void *_virt_to_phys_by_pg_mapping(struct mm_struct *mm, void *va) +{ + pgd_t *pgd; + pmd_t *pmd; + pte_t *pte; + + ulong_t pfn; +#ifdef pte_offset_map_lock + spinlock_t *ptl; +#endif + void *ret = INVALID_PHYS_ADDR; + + down_read(&mm->mmap_sem); + + pgd = pgd_offset(mm, (ulong_t) va); + if (!pgd_present(*pgd)) + goto _no_pgd; + + /* pmd = pmd_offset(pgd, (ulong_t)va); */ + /* update for kernel version */ + pmd = pmd_offset((pud_t *) pgd, (ulong_t) va); + if (!pmd_present(*pmd)) + goto _no_pmd; + +#ifdef pte_offset_map_lock + pte = pte_offset_map_lock(mm, pmd, (ulong_t) va, &ptl); +#else + pte = pte_offset_map(pmd, (ulong_t) va); +#endif + if (!pte_present(*pte)) + goto _no_pte; + + pfn = pte_pfn(*pte); + + ret = (void *)((pfn << PAGE_SHIFT) + + ((ulong_t) va & (~PAGE_MASK))); +_no_pte: +#ifdef pte_offset_map_lock + pte_unmap_unlock(pte, ptl); +#endif + +_no_pmd: +_no_pgd: + up_read(&mm->mmap_sem); + + return ret; +} + +static void *_osa_virt_to_phys_by_cp15(uint32_t virt) +{ + ulong_t flags; + volatile uint32_t ret; + + spin_lock_irqsave(&_g_pg_walk_by_cp15_lock, flags); + + __asm__ __volatile__("mcr p15, 0, %1, c7, c8, 1\n\t" + "mrc p15, 0, %0, c7, c4, 0\n\t" : "=r"(ret) : "r" + (virt)); + + spin_unlock_irqrestore(&_g_pg_walk_by_cp15_lock, flags); + + ret &= ~(PAGE_SIZE - 1); + ret |= (virt & (PAGE_SIZE - 1)); + + return (void *)ret; +} + +/* + * Name: osa_virt_to_phys + * + * Description: translate virtual address to physical address + * + * Params: virt_addr - the virtual address + * + * Returns: void * - the physical address + * + * Notes: page table directory is saved in swapper_pg_dir + */ +void *osa_virt_to_phys(void *virt_addr) +{ + if ((uint32_t) virt_addr < PAGE_OFFSET) + return _virt_to_phys_by_pg_mapping(current->mm, virt_addr); + else if (virt_addr < high_memory) + return __virt_to_phys(virt_addr); + else + return _osa_virt_to_phys_by_cp15((uint32_t) virt_addr); + +} +OSA_EXPORT_SYMBOL(osa_virt_to_phys); + +/* + * Name: osa_invalidate_dcache + * + * Description: invalidate the data cache by the range of [start, start + size) + * + * Params: mode - kernel or user mode + * start - start address + * size - size of the range + * + * Returns: none + * + * Notes: invalidate the entry of the data cache only + */ +void osa_invalidate_dcache(osa_mode_t mode, ulong_t start, uint32_t size) +{ + ulong_t end = start + size; + + start = (start & L1_CACHE_LINE_MASK); + end = ((end + L1_CACHE_LINE_SIZE - 1) & L1_CACHE_LINE_MASK); + + asm volatile (" \ + mov ip, #0; \ + 1: mcr p15, 0, %0, c7, c6, 1; \ + add %0, %0, #32; \ + cmp %0, %1; \ + blo 1b; \ + mrc p15, 0, ip, c7, c10, 4; @ drain write buffer \ + mov ip, ip; \ + sub pc, pc, #4; \ + " + : + : "r" (start), "r"(end) + : "ip"); + return; +} +OSA_EXPORT_SYMBOL(osa_invalidate_dcache); + +/* + * Name: osa_clean_dcache + * + * Description: clean the data cache by the range of [start, start + size) + * + * Params: mode - kernel or user mode + * start - start address + * size - size of the range + * + * Returns: none + * + * Notes: write back the content of cache to the external memory only + */ +void osa_clean_dcache(osa_mode_t mode, ulong_t start, uint32_t size) +{ + ulong_t end = start + size; + + start = (start & L1_CACHE_LINE_MASK); + end = ((end + L1_CACHE_LINE_SIZE - 1) & L1_CACHE_LINE_MASK); + + asm volatile (" \ + mov ip, #0; \ + 1: mcr p15, 0, %0, c7, c10, 1; \ + add %0, %0, #32; \ + cmp %0, %1; \ + blo 1b; \ + mrc p15, 0, ip, c7, c10, 4; @ drain write buffer \ + mov ip, ip; \ + sub pc, pc, #4; \ + " + : + : "r" (start), "r"(end) + : "ip"); + return; +} +OSA_EXPORT_SYMBOL(osa_clean_dcache); + +/* + * Name: osa_flush_dcache + * + * Description: flush the data cache by the range of [start, start + size) + * + * Params: mode - kernel or user mode + * start - start address + * size - size of the range + * + * Returns: none + * + * Notes: flush = clean + invalidate + */ +void osa_flush_dcache(osa_mode_t mode, ulong_t start, uint32_t size) +{ +#if 0 + ulong_t end = start + size; + + start = (start & L1_CACHE_LINE_MASK); + end = ((end + L1_CACHE_LINE_SIZE - 1) & L1_CACHE_LINE_MASK); + + asm volatile (" \ + mov ip, #0; \ + 1: mcr p15, 0, %0, c7, c14, 1; @ clean & invalidate D line \ + add %0, %0, #32; \ + cmp %0, %1; \ + blo 1b; \ + mrc p15, 0, ip, c7, c10, 4; @ drain write buffer \ + mov ip, ip; \ + sub pc, pc, #4; \ + " + : + : "r" (start), "r"(end) + : "ip"); + return; +#else + /* flush_cache_all(); */ + dmac_flush_range((void *)start, (void *)(start + size)); +#endif +} +OSA_EXPORT_SYMBOL(osa_flush_dcache); + +/* + * Name: osa_flush_dcache_all + * + * Description: flush all the data cache + * + * Params: none + * + * Returns: none + * + * Notes: flush = clean + invalidate + */ +void osa_flush_dcache_all(void) +{ + flush_cache_all(); +} +OSA_EXPORT_SYMBOL(osa_flush_dcache_all); + +#if 0 + +/* + * Name: _l2cache_clean_va + * + * Description: invalidate the l2 data cache line by the virtual address + * + * Params: addr - the virtual address + * + * Returns: none + * + * Notes: none + */ +static inline void _l2cache_inv_va(unsigned long addr) +{ + __asm__("mcr p15, 1, %0, c7, c7, 1" + : + : "r"(addr)); +} + +/* + * Name: _l2cache_clean_va + * + * Description: clean the l2 data cache line by the virtual address + * + * Params: addr - the virtual address + * + * Returns: none + * + * Notes: none + */ +static inline void _l2cache_clean_va(unsigned long addr) +{ + __asm__("mcr p15, 1, %0, c7, c11, 1" + : + : "r"(addr)); +} + +/* + * Name: _l2cache_flush_va + * + * Description: flush the l2 data cache line by the virtual address + * + * Params: addr - the virtual address + * + * Returns: none + * + * Notes: none + */ +static inline void _l2cache_flush_va(unsigned long addr) +{ + __asm__("mcr p15, 1, %0, c7, c15, 1" + : + : "r"(addr)); +} + +/* + * Name: _l2cache_inv_all + * + * Description: invalidate all the l2 data cache lines + * + * Params: none + * + * Returns: none + * + * Notes: none + */ +static inline void _l2cache_inv_all(void) +{ + __asm__ __volatile__("mcr p15, 1, %0, c7, c7, 0" + : + : "r"(0)); + dsb(); +} + +/* + * Name: _l2cache_clean_all + * + * Description: clean all the l2 data cache lines + * + * Params: none + * + * Returns: none + * + * Notes: none + */ +static inline void _l2cache_clean_all(void) +{ + __asm__ __volatile__("mcr p15, 1, %0, c7, c11, 0" + : + : "r"(0)); + dsb(); +} + +/* + * Name: _l2cache_flush_all + * + * Description: flush all the l2 data cache lines + * + * Params: none + * + * Returns: none + * + * Notes: none + */ +static inline void _l2cache_flush_all(void) +{ + __asm__ __volatile__("mcr p15, 1, %0, c7, c11, 0" + : + : "r"(0)); + __asm__ __volatile__("mcr p15, 1, %0, c7, c7, 0" + : + : "r"(0)); + dsb(); +} + +#endif + +/* + * Name: osa_invalidate_l2dcache + * + * Description: invalidate the data cache by the range of [start, start + size) + * + * Params: mode - kernel or user mode + * start - start address + * size - size of the range + * + * Returns: none + * + * Notes: invalidate the entry of the data cache only + */ +void osa_invalidate_l2dcache(osa_mode_t mode, ulong_t start, uint32_t size) +{ +#if 0 + ulong_t end; + + if ((0 == start) && ((uint32_t) (-1) == size)) { + _l2cache_inv_all(); + return; + } + + end = start + size; + + if (start & (L2_CACHE_LINE_SIZE - 1)) { + _l2cache_flush_va(start & ~(L2_CACHE_LINE_SIZE - 1)); + start = (start | (L2_CACHE_LINE_SIZE - 1)) + 1; + } + + if (start < end && (end & (L2_CACHE_LINE_SIZE - 1))) { + _l2cache_flush_va(end & ~(L2_CACHE_LINE_SIZE - 1)); + end &= ~(L2_CACHE_LINE_SIZE - 1); + } + + while (start < end) { + _l2cache_inv_va(start); + start += L2_CACHE_LINE_SIZE; + } + + dsb(); +#else + ulong_t phys = (ulong_t) osa_virt_to_phys((void *)start); + outer_inv_range(phys, phys + size); + OSA_ASSERT(0); +#endif +} +OSA_EXPORT_SYMBOL(osa_invalidate_l2dcache); + +/* + * Name: osa_l2clean_dcache + * + * Description: clean the l2 data cache by the range of [start, start + size) + * + * Params: mode - kernel or user mode + * start - start address + * size - size of the range + * + * Returns: none + * + * Notes: write back the content of cache to the external memory only + */ +void osa_clean_l2dcache(osa_mode_t mode, ulong_t start, uint32_t size) +{ +#if 0 + ulong_t end = start + size; + + if ((0 == start) && ((uint32_t) (-1) == size)) { + _l2cache_clean_all(); + return; + } + + start &= ~(L2_CACHE_LINE_SIZE - 1); + while (start < end) { + _l2cache_clean_va(start); + start += L2_CACHE_LINE_SIZE; + } + + dsb(); +#else + ulong_t phys = (ulong_t) osa_virt_to_phys((void *)start); + outer_clean_range(phys, phys + size); + OSA_ASSERT(0); +#endif +} +OSA_EXPORT_SYMBOL(osa_clean_l2dcache); + +/* + * Name: osa_flush_l2dcache + * + * Description: flush the l2 data cache by the range of [start, start + size) + * + * Params: mode - kernel or user mode + * start - start address + * size - size of the range + * + * Returns: none + * + * Notes: flush = clean + invalidate + */ +void osa_flush_l2dcache(osa_mode_t mode, ulong_t start, uint32_t size) +{ +#if 0 + ulong_t end; + + if ((0 == start) && ((uint32_t) (-1) == size)) { + _l2cache_flush_all(); + return; + } + + end = start + size; + + start &= ~(L2_CACHE_LINE_SIZE - 1); + while (start < end) { + _l2cache_flush_va(start); + start += L2_CACHE_LINE_SIZE; + } + + dsb(); +#else +/* + outer_flush_range(start, start + size); + + result not correct! + void *phys = osa_virt_to_phys((void *)start); + outer_flush_range((uint32_t)phys, (uint32_t)phys + size); + + crash + outer_flush_range(0, -1UL); + + result not correct! + unsigned long set_way; + int set, way; + + for (set = 0; set < 0x800; set++) { + for (way = 0; way < 8; way++) { + set_way = (way << 29) | (set << 5); + __asm__("mcr p15, 0, %0, c7, c7, 2" + : + : "r"(set_way)); + } + } + + result not correct! +*/ + /* clean & invalidate all of l2 dcache */ +/* + asm volatile ("mrc p15, 0, %0, c5, c14, 0" + : + : "r"(0)); + dsb(); + + result not correct! +*/ +#if 0 + asm volatile (" \ + mrc p15, 0, %0, c5, c10, 0; \ + mrc p15, 0, %0, c5, c6, 0; \ + " + : + : "r" (0)); + dsb(); +#endif /* 0 */ +/* +result not correct + ulong_t phys = (ulong_t)osa_virt_to_phys((void *)start); + outer_flush_range(phys, phys + size); +*/ + { + ulong_t flags; + local_irq_save(flags); + outer_flush_range(0, -1UL); + local_irq_restore(flags); + } +#endif +} +OSA_EXPORT_SYMBOL(osa_flush_l2dcache); + +/* + * Name: osa_flush_l2dcache_all + * + * Description: flush all the L2 data cache + * + * Params: none + * + * Returns: none + * + * Notes: flush = clean + invalidate + */ +void osa_flush_l2dcache_all(void) +{ +#if 0 + _l2cache_flush_all(); +#else + outer_flush_range(0, -1UL); + OSA_ASSERT(0); +#endif +} +OSA_EXPORT_SYMBOL(osa_flush_l2dcache_all); + +/* + * Name: osa_flush_tlb + * + * Description: flush the tlb by the range of [start, start + size) + * + * Params: mode - kernel or user mode + * start - start address + * size - size of the range + * + * Returns: none + * + * Notes: flush = invalidate + */ +void osa_flush_tlb(osa_mode_t mode, ulong_t start, uint32_t size) +{ + /* FIXME: temporary implementation. */ + /* flush_tlb_all(); */ +} +OSA_EXPORT_SYMBOL(osa_flush_tlb); + +/* + * Name: osa_flush_tlb_all + * + * Description: flush all the tlb + * + * Params: none + * + * Returns: none + * + * Notes: none + */ +void osa_flush_tlb_all(void) +{ + /* flush_tlb_all(); */ +} +OSA_EXPORT_SYMBOL(osa_flush_tlb_all); + +#if 0 + +/* + * Name: osa_validate_vmem + * + * Description: validate the memory in user space + * the memory will be kept from swap + * + * Params: vir_addr - the virtual address of the memory block + * + * Returns: status code + * OSA_OK - no error + * OSA_BAD_USER_VIR_ADDR - bad virtual address in user space + * + * Notes: the function enforces to allocate *real* memory for user space + * no copy_xxx_user needed then + * FIXME - SetPageLocked not invoked. + */ +osa_err_t osa_validate_vmem(void __user *vir_addr, uint32_t size) +{ + + uint32_t va = (uint32_t) vir_addr; + uint32_t sz = size, sz_bak; + uint32_t range; + + OSA_ASSERT(vir_addr && size); + + if ((uint32_t) vir_addr >= PAGE_OFFSET) + return OSA_BAD_USER_VIR_ADDR; + + /* + * since no swap action in arm-linux, + * here we need not hold the mmap_sem and SetPageLocked. + */ + do { + MAKE_PAGE_VALID(va); + + range = PAGE_SIZE - (va % PAGE_SIZE); + va += range; + sz_bak = sz; + sz -= range; + } while (sz_bak > range); + + return OSA_OK; +} +OSA_EXPORT_SYMBOL(osa_validate_vmem); + +/* + * Name: osa_invalidate_vmem + * + * Description: invalidate the memory in user space. + * the memory is again suitable to be swapped by kswapd. + * + * Params: vir_addr - the virtual address of the memory block + * + * Returns: status code + * OSA_OK - no error + * OSA_BAD_USER_VIR_ADDR - bad virtual address in user space + * + * Notes: since there is no swap action in arm linux, + * this function is set (almost) NULL. + * FIXME - ClearPageLocked not invoked. + */ +osa_err_t osa_invalidate_vmem(void __user *vir_addr, uint32_t size) +{ + OSA_ASSERT(vir_addr && size); + + if ((uint32_t) vir_addr >= PAGE_OFFSET) + return OSA_BAD_USER_VIR_ADDR; + + /* + * if swap is enabled, we need to clear + * the locked flag for each page here. + */ + + return OSA_OK; +} +OSA_EXPORT_SYMBOL(osa_invalidate_vmem); + +#else + +osa_err_t osa_validate_vmem(void __user *vir_addr, uint32_t size) +{ + ulong_t start = ((ulong_t) vir_addr & PAGE_MASK); + ulong_t end = ((ulong_t) vir_addr + size + PAGE_SIZE - 1) & PAGE_MASK; + + struct vm_area_struct *vma; + ulong_t cur = start, cur_end; + int32_t err, write; + + if (!size) + return OSA_OK; + + down_read(¤t->mm->mmap_sem); + + do { + vma = find_vma(current->mm, cur); + if (!vma) { + up_read(¤t->mm->mmap_sem); + return OSA_ERR; + } + cur_end = ((end <= vma->vm_end) ? end : vma->vm_end); + + /* this vma is NOT mmap-ed and pfn-direct mapped */ + if (!(vma->vm_flags & (VM_IO | VM_PFNMAP))) { + write = ((vma->vm_flags & VM_WRITE) != 0); + err = get_user_pages(current, current->mm, + (ulong_t) cur, + (cur_end - cur) >> PAGE_SHIFT, + write, 0, NULL, NULL); + if (err < 0) { + up_read(¤t->mm->mmap_sem); + return OSA_ERR; + } + } + + cur = cur_end; + } while (cur_end < end); + + up_read(¤t->mm->mmap_sem); + + return OSA_OK; +} +OSA_EXPORT_SYMBOL(osa_validate_vmem); + +osa_err_t osa_invalidate_vmem(void __user *vir_addr, uint32_t size) +{ + return OSA_OK; +} +OSA_EXPORT_SYMBOL(osa_invalidate_vmem); + +#endif + +/* + * Name: osa_validate_string + * + * Description: validate the space of string in user space + * + * Params: string - the virtual address of the string + * + * Returns: status code + * OSA_OK - no error + * OSA_BAD_ARG - bad argument + * + * Notes: no size required in string + * when allocating a *real* block for it. + */ +osa_err_t osa_validate_string(void __user *string) +{ + OSA_ASSERT(string); + + return osa_validate_vmem(string, strlen_user(string) + 1); +} +OSA_EXPORT_SYMBOL(osa_validate_string); + +/* + * Name: osa_invalidate_string + * + * Description: invalidate the memory of string in user space. + * the memory is again suitable to be swapped by kswapd. + * + * Params: string - the virtual address of the string + * + * Returns: status code + * OSA_OK - no error + * OSA_BAD_ARG - bad argument + * + * Notes: since there is no swap action in arm linux, + * this function is set (almost) NULL. + */ +osa_err_t osa_invalidate_string(void __user *string) +{ + OSA_ASSERT(string); + + return osa_invalidate_vmem(string, strlen_user(string) + 1); +} +OSA_EXPORT_SYMBOL(osa_invalidate_string); diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/osa_sched.c b/arch/arm/mach-berlin/modules/tzdd/osa/osa_sched.c new file mode 100644 index 00000000..6e958ca7 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/osa_sched.c @@ -0,0 +1,26 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ + +#include + +void osa_wakeup_process(struct task_struct *tsk) +{ + wake_up_process(tsk); + return; +} diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/osa_sync.c b/arch/arm/mach-berlin/modules/tzdd/osa/osa_sync.c new file mode 100644 index 00000000..3404d80b --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/osa_sync.c @@ -0,0 +1,831 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +/* + ****************************** + * HEADERS + ****************************** + */ + +#include + +/* + ****************************** + * MACROS + ****************************** + */ + +#define INIT_SEM_MAGIC(s) \ +do { \ + ((struct _sem *)s)->magic[0] = 'S'; \ + ((struct _sem *)s)->magic[1] = 'e'; \ + ((struct _sem *)s)->magic[2] = 'M'; \ + ((struct _sem *)s)->magic[3] = 'a'; \ +} while (0) + +#define IS_SEM_VALID(s) \ + ('S' == ((struct _sem *)s)->magic[0] && \ + 'e' == ((struct _sem *)s)->magic[1] && \ + 'M' == ((struct _sem *)s)->magic[2] && \ + 'a' == ((struct _sem *)s)->magic[3]) + +#define CLEAN_SEM_MAGIC(s) \ +do { \ + ((struct _sem *)s)->magic[0] = 0; \ + ((struct _sem *)s)->magic[1] = 0; \ + ((struct _sem *)s)->magic[2] = 0; \ + ((struct _sem *)s)->magic[3] = 0; \ +} while (0) + +/* + ****************************** + * TYPES + ****************************** + */ + +struct _sem { + uint8_t magic[4]; + struct semaphore sem; +}; + +struct _timeout_arg { + struct _sem *sem; + struct task_struct *task; + + bool *sem_up; + bool *timeout; +}; + +struct _mutex { + /* no magic since there is one in struct _sem */ + struct _sem *osa_sem; + spinlock_t lock; /* to protect sem.counter */ +}; + +/* + ****************************** + * FUNCTIONS + ****************************** + */ + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)) + +/* + * Name: _osa_sem_timeout + * + * Description: callback function when timeout + * + * Params: data - the pointer to _sem structure + * + * Returns: none + * + * Notes: none + */ +static void _osa_sem_timeout(ulong_t data) +{ + struct _timeout_arg *arg = (struct _timeout_arg *)data; + struct _sem *sem; + struct task_struct *task; + bool *sem_up; + bool *timeout; + + OSA_ASSERT(arg); + + sem = arg->sem; + task = arg->task; + sem_up = arg->sem_up; + timeout = arg->timeout; + + OSA_ASSERT(sem); + OSA_ASSERT(IS_SEM_VALID(sem)); + OSA_ASSERT(task); + OSA_ASSERT(sem_up); + OSA_ASSERT(timeout); + + if (!*sem_up) { + struct list_head *entry = NULL; + wait_queue_t *wq = NULL; + + spin_lock(&(sem->sem.wait.lock)); + + /* iterate the list and find the entry of "task" */ + osa_list_iterate(&(sem->sem.wait.task_list), entry) { + OSA_LIST_ENTRY(entry, wait_queue_t, task_list, wq); + if ((struct task_struct *)(wq->private) == task) + break; + } + + /* + * the entry has to be found + * or someone else has up-ed the sem already + */ + if ((struct task_struct *)wq->private == task) { + /* + * here we need to set the entry of "task" + * the *first* member of the wait list + */ + __remove_wait_queue(&(sem->sem.wait), wq); + wq->flags |= WQ_FLAG_EXCLUSIVE; + __add_wait_queue(&(sem->sem.wait), wq); + + spin_unlock(&(sem->sem.wait.lock)); + + up(&(sem->sem)); + *timeout = true; + } else + spin_unlock(&(sem->sem.wait.lock)); + } +} + +/* + * Name: osa_create_sem + * + * Description: create a sempahore with timeout feature + * + * Params: init_val - the initial value of the semaphore to create + * + * Returns: osa_sem_t - the semaphore handle + * + * Notes: none + */ +osa_sem_t osa_create_sem(int32_t init_val) +{ + struct _sem *sem; + + sem = kmalloc(sizeof(struct _sem), GFP_KERNEL); + if (!sem) { + osa_dbg_print(DBG_ERR, + "ERROR - failed to kmalloc in osa_create_sem\n"); + return NULL; + } + + INIT_SEM_MAGIC(sem); + + sema_init(&(sem->sem), init_val); + + return (osa_sem_t) sem; +} +OSA_EXPORT_SYMBOL(osa_create_sem); + +/* + * Name: osa_destroy_sem + * + * Description: destroy the semaphore specified by handle + * + * Params: handle - handle of the semaphore to destroy + * + * Returns: none + * + * Notes: none + */ +void osa_destroy_sem(osa_sem_t handle) +{ + struct _sem *sem = (struct _sem *)handle; + + OSA_ASSERT(sem && IS_SEM_VALID(sem)); + + CLEAN_SEM_MAGIC(sem); + kfree(sem); +} +OSA_EXPORT_SYMBOL(osa_destroy_sem); + +/* + * Name: osa_wait_for_sem + * + * Description: wait for the semaphore + * + * Params: handle - handle of the semaphore to wait for + * msec - the number in the unit of micro-second + * wait forever if msec < 0 + * + * Returns: status code + * OSA_OK - no error + * OSA_SEM_WAIT_FAILED - failed to wait for the semaphore + * OSA_SEM_WAIT_TO - timeout when waiting for the semaphore + * + * Notes: timeout is implemented by timer in kernel + */ +osa_err_t osa_wait_for_sem(osa_sem_t handle, int32_t msec) +{ + struct _sem *sem = (struct _sem *)handle; + struct _timeout_arg to_arg; + struct timer_list timer; + bool sem_up = false; + bool timeout = false; + int ret; + + OSA_ASSERT(sem && IS_SEM_VALID(sem)); + + if (0 == msec) { + ret = down_trylock(&(sem->sem)); + if (ret) + return OSA_SEM_WAIT_FAILED; + else + return OSA_OK; + } else if (msec > 0) { + /* + * here we use an internal variable + * as the parameter of the timer's callback + * if the timer's callback is invoked, + * osa_wait_for_sem will be blocked + * so the internal variable is valid + * during timer's callback is invoked + */ + to_arg.sem = sem; + to_arg.task = current; + to_arg.sem_up = &sem_up; + to_arg.timeout = &timeout; + + init_timer(&timer); + + timer.function = _osa_sem_timeout; + timer.expires = jiffies + (msec * HZ + 500) / 1000; + timer.data = (uint32_t)&to_arg; + + add_timer(&timer); + } + + down(&(sem->sem)); + sem_up = true; + + if (msec > 0) + del_timer_sync(&timer); + + if (timeout) + return OSA_SEM_WAIT_TO; + else + return OSA_OK; +} +OSA_EXPORT_SYMBOL(osa_wait_for_sem); + +/* + * Name: osa_try_to_wait_for_sem + * + * Description: try to wait the semaphore + * + * Params: handle - handle of the semaphore to wait for + * + * Returns: status code + * OSA_OK - no error + * OSA_SEM_WAIT_FAILED - failed to wait for the semaphore + * + * Notes: none + */ +osa_err_t osa_try_to_wait_for_sem(osa_sem_t handle) +{ + struct _sem *sem = (struct _sem *)handle; + int ret; + + OSA_ASSERT(sem && IS_SEM_VALID(sem)); + + ret = down_trylock(&(sem->sem)); + + if (ret) + return OSA_SEM_WAIT_FAILED; + else + return OSA_OK; +} +OSA_EXPORT_SYMBOL(osa_try_to_wait_for_sem); + +/* + * Name: osa_release_sem + * + * Description: release the semaphore specified by handle + * + * Params: handle - handle of the semaphore to release + * + * Returns: none + * + * Notes: none + */ +void osa_release_sem(osa_sem_t handle) +{ + struct _sem *sem = (struct _sem *)handle; + + OSA_ASSERT(sem && IS_SEM_VALID(sem)); + + up(&(sem->sem)); +} +OSA_EXPORT_SYMBOL(osa_release_sem); + +#else + +/* + * Name: osa_create_sem + * + * Description: create a sempahore with timeout feature + * + * Params: init_val - the initial value of the semaphore to create + * + * Returns: osa_sem_t - the semaphore handle + * + * Notes: none + */ +osa_sem_t osa_create_sem(int32_t init_val) +{ + struct _sem *sem; + + sem = kmalloc(sizeof(struct _sem), GFP_KERNEL); + if (!sem) { + osa_dbg_print(DBG_ERR, + "ERROR - failed to kmalloc in osa_create_sem\n"); + return NULL; + } + + INIT_SEM_MAGIC(sem); + + sema_init(&(sem->sem), init_val); + + return (osa_sem_t) sem; +} +OSA_EXPORT_SYMBOL(osa_create_sem); + +/* + * Name: osa_destroy_sem + * + * Description: destroy the semaphore specified by handle + * + * Params: handle - handle of the semaphore to destroy + * + * Returns: none + * + * Notes: none + */ +void osa_destroy_sem(osa_sem_t handle) +{ + struct _sem *sem = (struct _sem *)handle; + + OSA_ASSERT(sem && IS_SEM_VALID(sem)); + + CLEAN_SEM_MAGIC(sem); + kfree(sem); +} +OSA_EXPORT_SYMBOL(osa_destroy_sem); + +/* + * Name: osa_wait_for_sem + * + * Description: wait for the semaphore + * + * Params: handle - handle of the semaphore to wait for + * msec - the number in the unit of micro-second + * wait forever if msec < 0 + * + * Returns: status code + * OSA_OK - no error + * OSA_SEM_WAIT_FAILED - failed to wait for the semaphore + * OSA_SEM_WAIT_TO - timeout when waiting for the semaphore + * + * Notes: timeout is implemented by timer in kernel + */ +osa_err_t osa_wait_for_sem(osa_sem_t handle, int32_t msec) +{ + struct _sem *sem = (struct _sem *)handle; + int ret; + + OSA_ASSERT(sem && IS_SEM_VALID(sem)); + + if (0 == msec) { + + ret = down_trylock(&(sem->sem)); + if (ret) + return OSA_SEM_WAIT_FAILED; + else + return OSA_OK; + + } else if (msec > 0) { + + ret = down_timeout(&(sem->sem), (msec * HZ + 500) / 1000); + if (ret < 0) + return OSA_SEM_WAIT_TO; + + } else { + + do { + ret = down_interruptible(&(sem->sem)); + } while (ret < 0); + + } + + return OSA_OK; +} +OSA_EXPORT_SYMBOL(osa_wait_for_sem); + +/* + * Name: osa_try_to_wait_for_sem + * + * Description: try to wait the semaphore + * + * Params: handle - handle of the semaphore to wait for + * + * Returns: status code + * OSA_OK - no error + * OSA_SEM_WAIT_FAILED - failed to wait for the semaphore + * + * Notes: none + */ +osa_err_t osa_try_to_wait_for_sem(osa_sem_t handle) +{ + struct _sem *sem = (struct _sem *)handle; + int ret; + + OSA_ASSERT(sem && IS_SEM_VALID(sem)); + + ret = down_trylock(&(sem->sem)); + + if (ret) + return OSA_SEM_WAIT_FAILED; + else + return OSA_OK; +} +OSA_EXPORT_SYMBOL(osa_try_to_wait_for_sem); + +/* + * Name: osa_release_sem + * + * Description: release the semaphore specified by handle + * + * Params: handle - handle of the semaphore to release + * + * Returns: none + * + * Notes: none + */ +void osa_release_sem(osa_sem_t handle) +{ + struct _sem *sem = (struct _sem *)handle; + + OSA_ASSERT(sem && IS_SEM_VALID(sem)); + + up(&(sem->sem)); +} +OSA_EXPORT_SYMBOL(osa_release_sem); + +#endif + +/* + * Name: _osa_create_mutex + * + * Description: create a mutex with timeout feature + * + * Params: init_val - initial value (0/1) + * + * Returns: osa_mutex_t - the mutex handle + * + * Notes: none + */ +static osa_mutex_t _osa_create_mutex(uint32_t init_val) +{ + struct _mutex *mutex; + + mutex = kmalloc(sizeof(struct _mutex), GFP_KERNEL); + if (!mutex) { + osa_dbg_print(DBG_ERR, + "ERROR - failed to kmalloc in osa_create_mutex\n"); + return NULL; + } + + mutex->osa_sem = (struct _sem *)osa_create_sem(init_val); + if (!mutex->osa_sem) { + /* error log will be printed in osa_create_sem */ + return NULL; + } + + spin_lock_init(&mutex->lock); + + return (osa_mutex_t) mutex; +} + +/* + * Name: osa_create_mutex + * + * Description: create a mutex with timeout feature + * + * Params: none + * + * Returns: osa_mutex_t - the mutex handle + * + * Notes: none + */ +osa_mutex_t osa_create_mutex(void) +{ + return _osa_create_mutex(1); +} +OSA_EXPORT_SYMBOL(osa_create_mutex); + +/* + * Name: osa_create_mutex_locked + * + * Description: create a mutex locked + * + * Params: none + * + * Returns: osa_mutex_t - the mutex handle + * + * Notes: none + */ +osa_mutex_t osa_create_mutex_locked(void) +{ + return _osa_create_mutex(0); +} +OSA_EXPORT_SYMBOL(osa_create_mutex_locked); + +/* + * Name: osa_destroy_mutex + * + * Description: destroy the mutex specified by handle + * + * Params: handle - handle of the mutex to destroy + * + * Returns: none + * + * Notes: none + */ +void osa_destroy_mutex(osa_mutex_t handle) +{ + struct _mutex *mutex = (struct _mutex *)handle; + + osa_destroy_sem(mutex->osa_sem); + + kfree(mutex); +} +OSA_EXPORT_SYMBOL(osa_destroy_mutex); + +/* + * Name: osa_wait_for_mutex + * + * Description: wait for the mutex + * + * Params: handle - handle of the mutex to wait for + * msec - the number in the unit of micro-second + * wait forever if msec < 0 + * + * Returns: status code + * OSA_OK - no error + * OSA_MUTEX_WAIT_FAILED - failed to wait for the mutex + * OSA_MUTEX_WAIT_TO - timeout when waiting for the mutex + * + * Notes: timeout is implemented by timer in kernel + */ +osa_err_t osa_wait_for_mutex(osa_mutex_t handle, int32_t msec) +{ + struct _mutex *mutex = (struct _mutex *)handle; + osa_err_t ret = osa_wait_for_sem(mutex->osa_sem, msec); + + switch (ret) { + case OSA_OK: + return OSA_OK; + case OSA_SEM_WAIT_FAILED: + return OSA_MUTEX_WAIT_FAILED; + case OSA_SEM_WAIT_TO: + return OSA_MUTEX_WAIT_TO; + default: + OSA_ASSERT(0); + /* return OSA_ERR to avoid warnings */ + return OSA_ERR; + } +} +OSA_EXPORT_SYMBOL(osa_wait_for_mutex); + +/* + * Name: osa_try_to_wait_for_mutex + * + * Description: try to wait the mutex + * + * Params: handle - handle of the mutex to wait for + * + * Returns: status code + * OSA_OK - no error + * OSA_MUTEX_WAIT_FAILED - failed to wait for the mutex + * + * Notes: none + */ +osa_err_t osa_try_to_wait_for_mutex(osa_mutex_t handle) +{ + struct _mutex *mutex = (struct _mutex *)handle; + osa_err_t ret = osa_try_to_wait_for_sem(mutex->osa_sem); + + switch (ret) { + case OSA_OK: + return OSA_OK; + case OSA_SEM_WAIT_FAILED: + return OSA_MUTEX_WAIT_FAILED; + default: + OSA_ASSERT(0); + /* return OSA_ERR to avoid warnings */ + return OSA_ERR; + } +} +OSA_EXPORT_SYMBOL(osa_try_to_wait_for_mutex); + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)) + +/* + * Name: osa_release_mutex + * + * Description: release the mutex specified by handle + * + * Params: handle - handle of the mutex to release + * + * Returns: none + * + * Notes: none + */ +void osa_release_mutex(osa_mutex_t handle) +{ + struct _mutex *mutex = (struct _mutex *)handle; + ulong_t flags; + + /* here we need to check sem's magic first */ + OSA_ASSERT(mutex->osa_sem && IS_SEM_VALID(mutex->osa_sem)); + + spin_lock_irqsave(&mutex->lock, flags); + + /* + * for "sleepers" and "count", please refer to + * "5.2. Synchronization Primitives, + * Understanding The Linux Kernel, 3rd Edition". + */ + if (mutex->osa_sem->sem.sleepers) + osa_release_sem(mutex->osa_sem); + else + if (atomic_read(&(mutex->osa_sem->sem.count)) == 0) + osa_release_sem(mutex->osa_sem); + + spin_unlock_irqrestore(&mutex->lock, flags); +} +OSA_EXPORT_SYMBOL(osa_release_mutex); + +#else + +/* + * Name: osa_release_mutex + * + * Description: release the mutex specified by handle + * + * Params: handle - handle of the mutex to release + * + * Returns: none + * + * Notes: none + */ +void osa_release_mutex(osa_mutex_t handle) +{ + struct _mutex *mutex = (struct _mutex *)handle; + + /* here we need to check sem's magic first */ + OSA_ASSERT(mutex->osa_sem && IS_SEM_VALID(mutex->osa_sem)); + + osa_release_sem(mutex->osa_sem); +} +OSA_EXPORT_SYMBOL(osa_release_mutex); + +#endif + +/* + * Name: osa_create_event + * + * Description: create an event with timeout feature + * + * Params: is_set - the event created is set or not. + * + * Returns: osa_event_t - the event handle + * + * Notes: none + */ +osa_event_t osa_create_event(bool is_set) +{ + osa_mutex_t ret; + + if (is_set) + ret = osa_create_mutex(); + else + ret = osa_create_mutex_locked(); + + if (!ret) + return (osa_event_t) NULL; + + return (osa_event_t) ret; +} +OSA_EXPORT_SYMBOL(osa_create_event); + +/* + * Name: osa_destroy_event + * + * Description: destroy the event specified by handle + * + * Params: handle - handle of the event to destroy + * + * Returns: none + * + * Notes: none + */ +void osa_destroy_event(osa_event_t handle) +{ + osa_mutex_t mutex = (osa_mutex_t) handle; + + return osa_destroy_mutex(mutex); +} +OSA_EXPORT_SYMBOL(osa_destroy_event); + +/* + * Name: osa_wait_for_event + * + * Description: wait for the event + * + * Params: handle - handle of the event to wait for + * msec - the number in the unit of micro-second + * wait forever if msec < 0 + * + * Returns: status code + * OSA_OK - no error + * OSA_EVENT_WAIT_TO - timeout when waiting for the event + * + * Notes: timeout is implemented by timer in kernel + */ +osa_err_t osa_wait_for_event(osa_event_t handle, int32_t msec) +{ + osa_err_t ret; + + osa_mutex_t mutex = (osa_mutex_t) handle; + + ret = osa_wait_for_mutex(mutex, msec); + + if (OSA_MUTEX_WAIT_TO == ret) + ret = OSA_EVENT_WAIT_TO; + + return ret; +} +OSA_EXPORT_SYMBOL(osa_wait_for_event); + +/* + * Name: osa_try_to_wait_for_event + * + * Description: try to wait the event + * + * Params: handle - handle of the event to wait for + * + * Returns: status code + * OSA_OK - no error + * OSA_EVENT_WAIT_FAILED - failed to wait for the event + * + * Notes: none + */ +osa_err_t osa_try_to_wait_for_event(osa_event_t handle) +{ + return osa_wait_for_event(handle, 0); +} +OSA_EXPORT_SYMBOL(osa_try_to_wait_for_event); + +/* + * Name: osa_set_event + * + * Description: set the event specified by handle + * + * Params: handle - handle of the event to release + * + * Returns: none + * + * Notes: none + */ +void osa_set_event(osa_event_t handle) +{ + osa_mutex_t mutex = handle; + + osa_release_mutex(mutex); +} +OSA_EXPORT_SYMBOL(osa_set_event); + +/* + * Name: osa_reset_event + * + * Description: reset the event specified by handle + * + * Params: handle - handle of the event to release + * + * Returns: none + * + * Notes: none + */ +void osa_reset_event(osa_event_t handle) +{ + osa_mutex_t mutex = handle; + + (void)osa_try_to_wait_for_mutex(mutex); +} +OSA_EXPORT_SYMBOL(osa_reset_event); diff --git a/arch/arm/mach-berlin/modules/tzdd/osa/osa_thread.c b/arch/arm/mach-berlin/modules/tzdd/osa/osa_thread.c new file mode 100644 index 00000000..13c84988 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/osa/osa_thread.c @@ -0,0 +1,459 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + * Filename : osa_thread.c + * Author : Dafu Lv + * Date Created : 21/03/08 + * Description : This is the source code of thread-related functions in osa. + * + */ + +/* + ****************************** + * HEADERS + ****************************** + */ + +#include + +/* + ****************************** + * MACROS + ****************************** + */ + +#define INIT_THREAD_MAGIC(t) \ +do { \ + ((struct _thread *)t)->magic[0] = 'T'; \ + ((struct _thread *)t)->magic[1] = 'h'; \ + ((struct _thread *)t)->magic[2] = 'R'; \ + ((struct _thread *)t)->magic[3] = 'd'; \ +} while (0) + +#define IS_THREAD_VALID(t) \ + ('T' == ((struct _thread *)t)->magic[0] && \ + 'h' == ((struct _thread *)t)->magic[1] && \ + 'R' == ((struct _thread *)t)->magic[2] && \ + 'd' == ((struct _thread *)t)->magic[3]) + +#define CLEAN_THREAD_MAGIC(t) \ +do { \ + ((struct _thread *)t)->magic[0] = 0; \ + ((struct _thread *)t)->magic[1] = 0; \ + ((struct _thread *)t)->magic[2] = 0; \ + ((struct _thread *)t)->magic[3] = 0; \ +} while (0) + +/* + ****************************** + * TYPES + ****************************** + */ + +enum _thread_status { + _THREAD_UNKNOWN, + _THREAD_READY, + _THREAD_RUNNING, + _THREAD_STOPPED +}; + +struct _thread { + uint8_t magic[4]; + + void (*func) (void *); + void *arg; + long_t nice; + + struct task_struct *task; + enum _thread_status status; + spinlock_t lock; +}; + +/* + ****************************** + * FUNCTIONS + ****************************** + */ + +/* + * local functions + */ +static void _stop_thread(struct _thread *_thrd); +static void _stop_thread_lock(struct _thread *_thrd); + +/* + * Name: _thread_func + * + * Description: the shell function of thread + * + * Params: param - the member "arg" in struct _thread + * + * Returns: int - 0 always + * + * Notes: none + */ +static int _thread_func(void *param) +{ + struct _thread *_thrd = (struct _thread *)param; + + OSA_ASSERT(_thrd); + OSA_ASSERT(IS_THREAD_VALID(_thrd)); + + /* 0~7 --> -20~19 */ + set_user_nice(current, (_thrd->nice - 3) << 2); + + spin_lock(&(_thrd->lock)); + if (_THREAD_STOPPED != _thrd->status) { + _thrd->status = _THREAD_READY; + spin_unlock(&(_thrd->lock)); + } else { + spin_unlock(&(_thrd->lock)); + return 0; + } + + /* further initialization here */ + + spin_lock(&(_thrd->lock)); + if (_THREAD_STOPPED != _thrd->status) { + _thrd->status = _THREAD_RUNNING; + spin_unlock(&(_thrd->lock)); + } else { + spin_unlock(&(_thrd->lock)); + return 0; + } + + if (_THREAD_STOPPED != _thrd->status) { + _thrd->func(_thrd->arg); + + spin_lock(&(_thrd->lock)); + _thrd->status = _THREAD_STOPPED; + spin_unlock(&(_thrd->lock)); + } + + /* + * kthread_stop is a sync way to stop thread. + * so here we need not send any event to show my stopping status. + */ + + return 0; +} + +/* + * Name: osa_create_thread + * + * Description: create a kernel thread + * + * Params: func - the function will be called in the kernel thread created + * arg - the argument of the function when called + * attr - os-specific attributes of the kernel thread + * attr->name - the name of the kernel thread, default "osa_thread" + * attr->prio - the static priority of the thread, will be changed + * dynamically. + * range: 0~7 (mapping from -20~19 in linux kernel) + * the default is the lowest priority (7) + * attr->stack_addr - no use in linux kernel + * attr->stack_size - no use in linux kernel + * + * Returns: osa_thread_t - handle of the kernel thread to create + * + * Notes: none + */ +osa_thread_t osa_create_thread(void (*func) (void *), void *arg, + struct osa_thread_attr *attr) +{ + struct _thread *ret = NULL; + + OSA_ASSERT(func); + OSA_ASSERT(attr && (attr->prio >= 0) && (attr->prio <= 7)); + + ret = kmalloc(sizeof(struct _thread), GFP_KERNEL); + if (!ret) { + osa_dbg_print(DBG_ERR, + "ERROR - failed to kmalloc in osa_create_thread\n"); + return ret; + } + + INIT_THREAD_MAGIC(ret); + + ret->func = func; + ret->arg = arg; + ret->nice = (long_t) attr->prio; + + spin_lock_init(&(ret->lock)); + + ret->status = _THREAD_UNKNOWN; + + if (NULL == attr->name) + ret->task = + kthread_run(_thread_func, (void *)ret, "osa_kthread"); + else + ret->task = kthread_run(_thread_func, (void *)ret, attr->name); + + if (!(ret->task)) { + osa_dbg_print(DBG_ERR, + "ERROR - failed to create a thread in osa_create_thread\n"); + CLEAN_THREAD_MAGIC(ret); + kfree(ret); + ret = NULL; + return ret; + } + + while (_THREAD_UNKNOWN == ret->status) + yield(); + + return (osa_thread_t) ret; +} +OSA_EXPORT_SYMBOL(osa_create_thread); + +/* + * Name: osa_destroy_thread + * + * Description: destroy the thread handle + * + * Params: handle - handle of the thread to destroy + * + * Returns: none + * + * Notes: if the thread is not stopped, + the function will call _stop_thread_lock + */ +void osa_destroy_thread(osa_thread_t handle) +{ + struct _thread *_thrd = (struct _thread *)handle; + + OSA_ASSERT(_thrd && IS_THREAD_VALID(_thrd)); + + if (_THREAD_STOPPED != _thrd->status) + _stop_thread_lock(_thrd); + + CLEAN_THREAD_MAGIC(_thrd); + + kfree(_thrd); +} +OSA_EXPORT_SYMBOL(osa_destroy_thread); + +/* + * Name: _stop_thread + * + * Description: stop the thread synchronously + * + * Params: _thrd - the thread structure + * + * Returns: none + * + * Notes: caller must NOT hold the spinlock in thread struct + */ +static void _stop_thread(struct _thread *_thrd) +{ + /* kthread_stop is a sync way to stop thread */ + kthread_stop(_thrd->task); + /* so here we need not wait for any stopped event */ +} + +/* + * Name: osa_stop_thread + * + * Description: stop the thread synchronously + * + * Params: handle - handle of the kernel thread to stop + * + * Returns: status code + * OSA_OK - no error + * OSA_THREAD_BAD_STATUS - invalid status of the thread + * + * Notes: none + */ +osa_err_t osa_stop_thread(osa_thread_t handle) +{ + struct _thread *_thrd = (struct _thread *)handle; + + OSA_ASSERT(_thrd && IS_THREAD_VALID(_thrd)); + + spin_lock(&(_thrd->lock)); + if (_THREAD_UNKNOWN == _thrd->status) { + _thrd->status = _THREAD_STOPPED; + spin_unlock(&(_thrd->lock)); + return OSA_OK; + } else if ((_THREAD_READY != _thrd->status) + && (_THREAD_RUNNING != _thrd->status)) { + spin_unlock(&(_thrd->lock)); + osa_dbg_print(DBG_ERR, + "ERROR - the status of thread is invalid when stopping\n"); + return OSA_THREAD_BAD_STATUS; + } else { + spin_unlock(&(_thrd->lock)); + _stop_thread(_thrd); + return OSA_OK; + } +} +OSA_EXPORT_SYMBOL(osa_stop_thread); + +/* + * Name: _stop_thread_lock + * + * Description: stop the thread synchronously with holding lock + * + * Params: _thrd - the thread structure + * + * Returns: none + * + * Notes: none + */ +static void _stop_thread_lock(struct _thread *_thrd) +{ + spin_lock(&(_thrd->lock)); + if (_THREAD_UNKNOWN == _thrd->status) { + _thrd->status = _THREAD_STOPPED; + spin_unlock(&(_thrd->lock)); + } else { + spin_unlock(&(_thrd->lock)); + _stop_thread(_thrd); + } +} + +/* + * Name: osa_stop_thread_async + * + * Description: stop the thread asynchronously + * + * Params: handle - handle of the kernel thread to stop + * + * Returns: status code + * OSA_OK - no error + * OSA_THREAD_BAD_STATUS - invalid status of the thread + * OSA_THREAD_STOP_FAILED - failed to invoke the stopping thread + * + * Notes: no support in linux kernel + */ +osa_err_t osa_stop_thread_async(osa_thread_t handle) +{ + struct _thread *_thrd = (struct _thread *)handle; + + OSA_ASSERT(_thrd && IS_THREAD_VALID(_thrd)); + + if ((_THREAD_UNKNOWN != _thrd->status) + && (_THREAD_READY != _thrd->status) + && (_THREAD_RUNNING != _thrd->status)) { + return OSA_THREAD_BAD_STATUS; + } + + if (kthread_run + ((int (*)(void *))_stop_thread_lock, _thrd, + "osa_thread_stop_func")) + return OSA_OK; + else + return OSA_THREAD_STOP_FAILED; +} +OSA_EXPORT_SYMBOL(osa_stop_thread_async); + +/* + * Name: osa_thread_should_stop + * + * Description: the function returns the flag to define + whether the thread should be stopped + * + * Params: none + * + * Returns: bool + * true - the thread should be stopped as soon as possible + * false - vice versa + * + * Notes: the function should be called in the main loop + * of the core function in kernel thread + */ +bool osa_thread_should_stop(void) +{ + return kthread_should_stop(); +} +OSA_EXPORT_SYMBOL(osa_thread_should_stop); + +/* + * Name: osa_get_thread_id + * + * Description: get the id of the kernel thread + * + * Params: handle - handle of the kernel thread + * + * Returns: osa_thread_id_t - the id number of the kernel thread + * + * Notes: none + */ +osa_thread_id_t osa_get_thread_id(osa_thread_t handle) +{ + struct _thread *_thrd = (struct _thread *)handle; + + OSA_ASSERT(_thrd && IS_THREAD_VALID(_thrd)); + + return (osa_thread_id_t) (_thrd->task->pid); +} +OSA_EXPORT_SYMBOL(osa_get_thread_id); + +/* + * Name: osa_get_thread_group_id + * + * Description: get the thread group id of the kernel thread + * + * Params: handle - handle of the kernel thread + * + * Returns: osa_thread_id_t - + the thread group id number of the kernel thread + * + * Notes: none + */ +osa_thread_id_t osa_get_thread_group_id(osa_thread_t handle) +{ + struct _thread *_thrd = (struct _thread *)handle; + + OSA_ASSERT(_thrd && IS_THREAD_VALID(_thrd)); + + return (osa_thread_id_t) (_thrd->task->tgid); +} +OSA_EXPORT_SYMBOL(osa_get_thread_group_id); + +/* + * Name: osa_get_current_thread_id + * + * Description: get the current thread id + * + * Params: none + * + * Returns: osa_thread_id_t - the thread id + * + * Notes: none + */ +osa_thread_id_t osa_get_current_thread_id(void) +{ + return (osa_thread_id_t) (current->pid); +} +OSA_EXPORT_SYMBOL(osa_get_current_thread_id); + +/* + * Name: osa_get_current_thread_group_id + * + * Description: get the current thread group id + * + * Params: none + * + * Returns: osa_thread_id_t - the thread group id + * + * Notes: none + */ +osa_thread_id_t osa_get_current_thread_group_id(void) +{ + return (osa_thread_id_t) (current->tgid); +} +OSA_EXPORT_SYMBOL(osa_get_current_thread_group_id); diff --git a/arch/arm/mach-berlin/modules/tzdd/perf/ntw/tee_perf_priv.h b/arch/arm/mach-berlin/modules/tzdd/perf/ntw/tee_perf_priv.h new file mode 100644 index 00000000..9e777ed0 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/perf/ntw/tee_perf_priv.h @@ -0,0 +1,22 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#ifndef _TEE_PERF_PRIV_H_ +#define _TEE_PERF_PRIV_H_ +#include "linux/types.h" +#endif diff --git a/arch/arm/mach-berlin/modules/tzdd/perf/parser/perf_parser.c b/arch/arm/mach-berlin/modules/tzdd/perf/parser/perf_parser.c new file mode 100644 index 00000000..af274c14 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/perf/parser/perf_parser.c @@ -0,0 +1,96 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#include +#include +#include "tee_perf.h" + +/* arg1: src name + arg2: dst name + arg3: first record name + */ +int main(int argc, char *argv[]) +{ + FILE *src_fd = NULL; + FILE *dst_fd = NULL; + unsigned int len; + unsigned int last_val = 0; + unsigned int total_val = 0; + tee_perf_desc head; + tee_perf_record current; + unsigned int found_header = 0; + unsigned int i = 0; + + if (argc != 4) { + printf("please use below command line:\n"); + printf(" ./perf_parser \n"); + return -1; + } + + src_fd = fopen(argv[1], "rb") + if (!src_fd) { + printf("open file src failed\n"); + return -1; + } + + dst_fd = fopen(argv[2], "wb") + if (!dst_fd) { + printf("open file dst failed\n"); + fclose(src_fd); + return -1; + } + fread(&head, sizeof(tee_perf_desc), 1, src_fd); + for (i = 0; i < head.total; i++) { + if (found_header == 0) { + len = + fread(¤t, sizeof(tee_perf_record), 1, src_fd); + if (len < 1) + break; + if (!memcmp(current.name, argv[3], 4)) { + fprintf(dst_fd, "| %s-", argv[3]); + total_val = 0; + last_val = current.value; + found_header = 1; + } else { + continue; + } + } + + len = fread(¤t, sizeof(tee_perf_record), 1, src_fd); + if (len < 1) + break; + if (memcmp(current.name, argv[3], 4)) { + fprintf(dst_fd, "-%d-->%c%c%c%c-", + current.value - last_val, current.name[0], + current.name[1], current.name[2], + current.name[3]); + total_val += current.value - last_val; + last_val = current.value; + } else { + fprintf(dst_fd, "->| total %d\n| %s-", total_val, + argv[3]); + last_val = current.value; + total_val = 0; + } + } + + fclose(dst_fd); + fclose(src_fd); + + return 0; +} diff --git a/arch/arm/mach-berlin/modules/tzdd/perf/tee_perf.c b/arch/arm/mach-berlin/modules/tzdd/perf/tee_perf.c new file mode 100644 index 00000000..9f63672e --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd/perf/tee_perf.c @@ -0,0 +1,177 @@ +/* + * Copyright (c) [2009-2013] Marvell International Ltd. and its affiliates. + * All rights reserved. + * This software file (the "File") is owned and distributed by Marvell + * International Ltd. and/or its affiliates ("Marvell") under the following + * licensing terms. + * If you received this File from Marvell, you may opt to use, redistribute + * and/or modify this File in accordance with the terms and conditions of + * the General Public License Version 2, June 1991 (the "GPL License"), a + * copy of which is available along with the File in the license.txt file + * or by writing to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 or on the worldwide web at + * http://www.gnu.org/licenses/gpl.txt. THE FILE IS DISTRIBUTED AS-IS, + * WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this + * warranty disclaimer. + */ +#include "tee_perf_priv.h" +#include "tee_perf.h" + +#define PMNC_MASK 0x3f /* Mask for writable bits */ +#define PMNC_E (1 << 0) /* Enable all counters */ +#define PMNC_P (1 << 1) /* Reset all counters */ +#define PMNC_C (1 << 2) /* Cycle counter reset */ +#define PMNC_D (1 << 3) /* CCNT counts every 64th cpu cycle */ +#define PMNC_X (1 << 4) /* Export to ETM */ +#define PMNC_DP (1 << 5) /* Disable CCNT if non-invasive debug */ + +#define FLAG_C (1 << 31) +#define FLAG_MASK 0x8000000f /* Mask for writable bits */ + +#define CNTENC_C (1 << 31) +#define CNTENC_MASK 0x8000000f /* Mask for writable bits */ + +#define CNTENS_C (1 << 31) +#define CNTENS_MASK 0x8000000f /* Mask for writable bits */ + +static inline uint32_t _tee_perf_pmnc_read(void) +{ + volatile uint32_t val; + + asm volatile ("mrc p15, 0, %0, c9, c12, 0" + : "=r" (val)); + return val; +} + +static inline void _tee_perf_pmnc_write(uint32_t val) +{ + val &= PMNC_MASK; + asm volatile ("mcr p15, 0, %0, c9, c12, 0" + : + : "r" (val)); +} + +static inline void _tee_perf_pmnc_disable_counter(void) +{ + volatile uint32_t val; + + val = CNTENC_C; + + val &= CNTENC_MASK; + asm volatile ("mcr p15, 0, %0, c9, c12, 2" + : + : "r" (val)); +} + +static void _tee_perf_pmnc_reset_counter(void) +{ + volatile uint32_t val = 0; + + asm volatile ("mcr p15, 0, %0, c9, c13, 0" + : + : "r" (val)); +} + +static inline void _tee_perf_pmnc_enable_counter(void) +{ + volatile uint32_t val; + + val = CNTENS_C; + val &= CNTENS_MASK; + asm volatile ("mcr p15, 0, %0, c9, c12, 1" + : + : "r" (val)); +} + +static inline void _tee_perf_start_pmnc(void) +{ + _tee_perf_pmnc_write(_tee_perf_pmnc_read() | PMNC_E); +} + +static inline void _tee_perf_stop_pmnc(void) +{ + _tee_perf_pmnc_write(_tee_perf_pmnc_read() & ~PMNC_E); +} + +static inline uint32_t _tee_perf_pmnc_getreset_flags(void) +{ + volatile uint32_t val; + + /* Read */ + asm volatile ("mrc p15, 0, %0, c9, c12, 3" + : "=r" (val)); + + /* Write to clear flags */ + val &= FLAG_MASK; + asm volatile ("mcr p15, 0, %0, c9, c12, 3" + : + : "r" (val)); + + return val; +} + +static uint32_t tee_perf_counter_read(void) +{ + volatile uint32_t val; + + asm volatile ("mrc p15, 0, %0, c9, c13, 0" + : "=r" (val)); + return val; +} + +static uint32_t tee_perf_start_counter(void) +{ + uint32_t val; + _tee_perf_pmnc_write(PMNC_P | PMNC_C); + _tee_perf_pmnc_disable_counter(); + _tee_perf_pmnc_reset_counter(); + _tee_perf_pmnc_enable_counter(); + val = tee_perf_counter_read(); + _tee_perf_start_pmnc(); + return val; +} + +static uint32_t tee_perf_stop_counter(void) +{ + uint32_t val; + _tee_perf_stop_pmnc(); + val = tee_perf_counter_read(); + return val; +} + +static tee_perf_desc *g_tee_perf_header; +static tee_perf_record *g_tee_perf_base; + +void tee_perf_init(uint32_t *buffer) +{ + g_tee_perf_header = (tee_perf_desc *)buffer; + g_tee_perf_base = + (tee_perf_record *) (buffer + + sizeof(tee_perf_desc) / sizeof(uint32_t)); + g_tee_perf_header->offset = 0; +} + +void tee_prepare_record_time(void) +{ + g_tee_perf_header->offset = 0; + tee_perf_start_counter(); +} + +void tee_add_time_record_point(char name[4]) +{ + tee_perf_record *current_record = + g_tee_perf_base + g_tee_perf_header->offset; + uint32_t *record_name = (uint32_t *) (current_record->name); + *record_name = *(uint32_t *) name; + current_record->value = tee_perf_counter_read(); + g_tee_perf_header->offset++; +} + +void tee_finish_record_time(void) +{ + tee_perf_stop_counter(); + g_tee_perf_header->total = g_tee_perf_header->offset; + g_tee_perf_header->offset = 0; +} diff --git a/arch/arm/mach-berlin/modules/tzdd_cb/Makefile b/arch/arm/mach-berlin/modules/tzdd_cb/Makefile new file mode 100644 index 00000000..83c429e0 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd_cb/Makefile @@ -0,0 +1,5 @@ +MODULE_PATH = $(srctree)/arch/arm/mach-berlin/modules/ + +ccflags-y += -Werror -I$(MODULE_PATH)/tzdd/inc_common + +obj-$(CONFIG_BERLIN_TZDD_CB) := tzdd_cb.o diff --git a/arch/arm/mach-berlin/modules/tzdd_cb/tzdd_cb.c b/arch/arm/mach-berlin/modules/tzdd_cb/tzdd_cb.c new file mode 100644 index 00000000..54332b49 --- /dev/null +++ b/arch/arm/mach-berlin/modules/tzdd_cb/tzdd_cb.c @@ -0,0 +1,365 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "teec_cb.h" + +MODULE_LICENSE("GPL"); + +#define KCB_VERSION "TZDD CB Version 0.0.1" +#define QDEPTH 20 + +/* extract from vmeta_cmd.h */ +#define TA_VEMATA_CB_UUID {0x79b77788, 0x9789, 0x4a7a,{'a', 'm', 'p', 'c', 'b', 'a', 'c', 'k'}} +enum{ + VDEC_ENABLE_CB = 1000, + VDEC_WAIT_CB = 1001, + VDEC_DISABLE_CB = 1002, +}; +/* extract end */ + +static const teec_cb_uuid_t _g_cb_uuid = TA_VEMATA_CB_UUID; + +int tzddCB_major; +int tzddCB_minor; + +typedef struct { + struct cdev cdev; +} tzddCB_dev_t; + +typedef struct _vmeta_cb_arg_t +{ + int32_t nbytes; /* sizeof(args), max = 4K - sizeof(uint32_t) */ + uint8_t *args; /* the arguments, sizeof(args) == nbytes */ +} vmeta_cb_arg_t; + + +typedef struct __CC_Q_{ + uint32_t num; + uint32_t w_index; + uint32_t r_index; + vmeta_cb_arg_t* base; +}CB_CC_Q; + +typedef struct __tzddCB_private_data_ { + struct semaphore sem; + teec_cb_handle_t hcb; + CB_CC_Q cbQ; +} tzddCB_private_data; + +tzddCB_dev_t *tzddCB_dev; + +static struct class* tzddCB_class; + +static int CC_Q_Init(CB_CC_Q *q){ + if(q == NULL) + return -1; + + q->num = QDEPTH; + q->w_index = 0; + q->r_index = 0; + q->base = (vmeta_cb_arg_t*)kmalloc(sizeof(vmeta_cb_arg_t)*QDEPTH, + GFP_KERNEL|__GFP_NOWARN); + if(q->base == NULL) + return -ENOMEM; + + return 0; +} + +static int CC_Q_Add(CB_CC_Q *q, vmeta_cb_arg_t* arg){ + int wr_offset; + + if(q == NULL || arg == NULL) + return -1; + + wr_offset = q->w_index - q->r_index; + if(wr_offset == -1 || wr_offset == (q->num - 2)) + return -2; + + memcpy((uint8_t*)(q->base+q->w_index), (uint8_t*)arg, + sizeof(vmeta_cb_arg_t)); + q->w_index++; + q->w_index %= q->num; + + return 0; +} + +static int CC_Q_Read_Try(CB_CC_Q *q, vmeta_cb_arg_t* arg){ + int rd_offset; + + if(q == NULL || arg == NULL) + return -1; + + rd_offset = q->r_index - q->w_index; + if(rd_offset != 0){ + memcpy((uint8_t*)arg,(uint8_t*)(q->base +q->r_index), + sizeof(vmeta_cb_arg_t)); + return 0; + } + return -2; +} + +static int CC_Q_ReadFinish(CB_CC_Q *q){ + int rd_offset; + + if(q == NULL) + return -1; + + rd_offset = q->r_index - q->w_index; + if (rd_offset != 0){ + q->r_index ++; + q->r_index %= q->num; + return 0; + } + return -2; +} + + +static void CC_Q_Destroy(CB_CC_Q *q){ + if(q == NULL) + return; + + if(q->base){ + vmeta_cb_arg_t arg; + + while(1){ + if(CC_Q_Read_Try(q, &arg)) + break; + kfree(arg.args); + if(CC_Q_ReadFinish(q)) + break; + } + kfree(q->base); + q->base = NULL; + } +} +static teec_cb_stat_t tzddCB_callback(tee_cb_arg_t *arg, teec_cb_cntx_t cntx){ + tzddCB_private_data* pri_data = NULL; + + pri_data = cntx; + if (NULL == pri_data){ + printk("%s,%d invalid pri data\n", __FUNCTION__, __LINE__); + return TEEC_ERROR_BAD_PARAMETERS; + } + + if(arg != NULL){ + vmeta_cb_arg_t p; + + p.nbytes = arg->nbytes; + p.args = (uint8_t*)kmalloc(arg->nbytes, GFP_KERNEL|__GFP_NOWARN); + if(p.args == NULL) + return TEEC_ERROR_OUT_OF_MEMORY; + + memcpy(p.args, arg->args, arg->nbytes); + if(CC_Q_Add(&pri_data->cbQ, &p)){ + kfree(p.args); + return TEEC_ERROR_GENERIC; + } + } + up(&(pri_data->sem)); + return TEEC_SUCCESS; +} + +static int tzddCB_open(struct inode *inode, struct file *filp){ + tzddCB_private_data* pri_data = NULL; + + if (NULL == filp) + return -EINVAL; + + pri_data = (tzddCB_private_data*)kmalloc(sizeof(tzddCB_private_data), + GFP_KERNEL|__GFP_NOWARN); + + if (NULL == pri_data) + return -ENOMEM; + + memset(pri_data, 0, sizeof(tzddCB_private_data)); + sema_init(&(pri_data->sem), 0); + + if(CC_Q_Init(&pri_data->cbQ)){ + kfree(pri_data); + return -ENOMEM; + } + + filp->private_data = pri_data; + + printk(KERN_NOTICE"%s\n", __FUNCTION__); + return 0; +} + +static int tzddCB_close(struct inode *inode, struct file *filp){ + tzddCB_private_data* pri_data; + + if (NULL == filp) + return -EINVAL; + + pri_data = (tzddCB_private_data*)filp->private_data; + + if(pri_data != NULL){ + if(pri_data->hcb != NULL){ + teec_unreg_cb(pri_data->hcb); + pri_data->hcb = NULL; + } + CC_Q_Destroy(&pri_data->cbQ); + kfree(pri_data); + filp->private_data = NULL; + } + return 0; +} + + +static long tzddCB_ioctl(struct file *filp, unsigned int cmd, unsigned long arg){ + tzddCB_private_data* pri_data = NULL; + vmeta_cb_arg_t teecb; + + if (NULL == filp) + return -EINVAL; + + pri_data = (tzddCB_private_data*)filp->private_data; + if (NULL == pri_data) + return -EINVAL; + + switch(cmd){ + case VDEC_ENABLE_CB: + //register callback + pri_data->hcb = teec_reg_cb(&_g_cb_uuid, + tzddCB_callback, (teec_cb_cntx_t)pri_data); + if (NULL == pri_data->hcb){ + printk(KERN_ERR"%s,%d fail to register callback\n", __FUNCTION__, __LINE__); + return -100; + } + printk(KERN_NOTICE"tzddCB_ioctl VDEC_ENABLE_CB\n"); + break; + case VDEC_DISABLE_CB: + teec_unreg_cb(pri_data->hcb); + pri_data->hcb = NULL; + printk(KERN_NOTICE"tzddCB_ioctl VDEC_DISABLE_CB\n"); + break; + case VDEC_WAIT_CB: + if(down_interruptible(&pri_data->sem)) + return -EAGAIN; + + if(CC_Q_Read_Try(&pri_data->cbQ,&teecb)) + return -EAGAIN; + if(CC_Q_ReadFinish(&pri_data->cbQ)) + return -EFAULT; + if (copy_to_user((void*)arg, teecb.args, teecb.nbytes)) + return -EFAULT; + kfree(teecb.args); + break; + default: + break; + } + return 0; +} + +static struct file_operations tzddCB_fops = { + .open = tzddCB_open, + .release = tzddCB_close, + .unlocked_ioctl = tzddCB_ioctl, + .owner = THIS_MODULE, +}; + +static struct platform_driver tzddCB_drv = { + .driver = { + .name = "tzddCB", + .owner = THIS_MODULE, + }, +}; + + +static int32_t tzddCB_cdev_init(tzddCB_dev_t *dev) +{ + int32_t err = 0, dev_nr; + + err = alloc_chrdev_region(&dev_nr, 0, 1, "tzddCB"); + tzddCB_major = MAJOR(dev_nr); + tzddCB_minor = MINOR(dev_nr); + + if (err < 0) + return err; + + printk("%s, %d MAJOR:%d, MINOR:%d\n", __FUNCTION__, __LINE__, + tzddCB_major, tzddCB_minor); + + cdev_init(&dev->cdev, &tzddCB_fops); + dev->cdev.owner = THIS_MODULE; + dev->cdev.ops = &tzddCB_fops; + + err = cdev_add(&dev->cdev, dev_nr, 1); + if (err){ + printk("%s, %d fail to add cdev\n", __FUNCTION__, __LINE__); + goto _error_1; + } + + err = platform_driver_register(&tzddCB_drv); + if (err){ + printk("%s, %d fail to platform_driver_register\n", __FUNCTION__, __LINE__); + goto _error_2; + } + + tzddCB_class = class_create(THIS_MODULE, "tzddCB"); + if (IS_ERR(tzddCB_class)){ + printk("%s,%d fail to create class\n", __FUNCTION__, __LINE__); + goto _error_3; + } + + device_create(tzddCB_class, NULL, MKDEV(tzddCB_major, tzddCB_minor), NULL, "tzddCB"); + + return 0; + +_error_3: + platform_driver_unregister(&tzddCB_drv); +_error_2: + cdev_del(&(dev->cdev)); +_error_1: + unregister_chrdev_region(MKDEV(tzddCB_major, tzddCB_minor), 1); + return err; +} + +static void tzddCB_cdev_cleanup(tzddCB_dev_t *dev) +{ + device_destroy(tzddCB_class, MKDEV(tzddCB_major, tzddCB_minor)); + class_destroy(tzddCB_class); + platform_driver_unregister(&tzddCB_drv); + cdev_del(&dev->cdev); + unregister_chrdev_region(MKDEV(tzddCB_major, tzddCB_minor), 1); + return; +} + + +static int32_t __init tzddCB_init(void){ + unsigned int ret = 0; + + tzddCB_dev = kmalloc(sizeof(tzddCB_dev_t), GFP_KERNEL); + if (NULL == tzddCB_dev) + return -ENOMEM; + + memset(tzddCB_dev, 0, sizeof(tzddCB_dev_t)); + + ret = tzddCB_cdev_init(tzddCB_dev); + if (ret < 0){ + kfree(tzddCB_dev); + tzddCB_dev = NULL; + return ret; + } + printk("%s\n", KCB_VERSION); + return 0; +} + +static void __exit tzddCB_cleanup(void){ + if (NULL == tzddCB_dev) + return; + + tzddCB_cdev_cleanup(tzddCB_dev); + kfree(tzddCB_dev); + tzddCB_dev = NULL; +} + +module_init(tzddCB_init); +module_exit(tzddCB_cleanup); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan.h index fb645c91..2b1d1a65 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan.h @@ -3,26 +3,20 @@ * @brief This file declares all APIs that will be called from MOAL module. * It also defines the data structures used for APIs between MLAN and MOAL. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /****************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11d.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11d.c index d9f52c71..96bf66f2 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11d.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11d.c @@ -2,25 +2,20 @@ * * @brief This file contains functions for 802.11D. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. * */ /******************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11h.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11h.c index 580b02bc..f0587018 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11h.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11h.c @@ -2,25 +2,20 @@ * * @brief This file contains functions for 802.11H. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved - * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * Copyright (C) 2008-2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. * */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11h.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11h.h index ab81572d..3a3b6c1d 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11h.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11h.h @@ -3,25 +3,20 @@ * @brief This header file contains data structures and * function declarations of 802.11h * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. * */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n.c index 78073c5d..b003910a 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n.c @@ -2,25 +2,20 @@ * * @brief This file contains functions for 11n handling. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved - * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * Copyright (C) 2008-2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. * */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n.h index cdca457f..02971273 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n.h @@ -5,25 +5,20 @@ * Driver interface functions and type declarations for the 11n module * implemented in mlan_11n.c. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. * */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n_aggr.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n_aggr.c index 9424082f..f55763cf 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n_aggr.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n_aggr.c @@ -2,25 +2,20 @@ * * @brief This file contains functions for 11n Aggregation. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. * */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n_aggr.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n_aggr.h index c23f05e1..4046e77c 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n_aggr.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n_aggr.h @@ -3,25 +3,20 @@ * @brief This file contains related macros, enum, and struct * of 11n aggregation functionalities * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. * */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n_rxreorder.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n_rxreorder.c index 27d85502..d80935de 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n_rxreorder.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n_rxreorder.c @@ -3,26 +3,20 @@ * @brief This file contains the handling of RxReordering in wlan * driver. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /******************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n_rxreorder.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n_rxreorder.h index 7659a181..72198d60 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n_rxreorder.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_11n_rxreorder.h @@ -3,26 +3,20 @@ * @brief This file contains related macros, enum, and struct * of 11n RxReordering functionalities * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /******************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_cfp.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_cfp.c old mode 100644 new mode 100755 index 0050b9d0..e8822cfa --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_cfp.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_cfp.c @@ -4,26 +4,20 @@ * @brief This file contains WLAN client mode channel, frequency and power * related code * - * (C) Copyright 2009-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2009-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /************************************************************* @@ -918,6 +912,34 @@ wlan_misc_country_2_cfp_table_code(pmlan_adapter pmadapter, t_u8 * country_code, return MLAN_STATUS_FAILURE; } +/** + * @brief This function adjust the rate index + * + * @param priv A pointer to mlan_private structure + * @param rx_rate rx rate + * @param rate_info rate info + * @return rate index + */ +t_u8 wlan_adjust_data_rate(mlan_private *priv, t_u8 rx_rate, t_u8 rate_info) +{ + t_u8 rate_index = 0; + t_bool sgi_enable = 0; + +#define MAX_MCS_NUM_SUPP 16 + + /** HT40 */ + sgi_enable = (rate_info & 0x04) >> 2; + if((rate_info & MBIT(0)) && (rate_info & MBIT(1))) + rate_index = MLAN_RATE_INDEX_MCS0 + + MAX_MCS_NUM_SUPP*2*sgi_enable + + MAX_MCS_NUM_SUPP + rx_rate; + else if (rate_info & MBIT(0)) /** HT20 */ + rate_index = MLAN_RATE_INDEX_MCS0 + + MAX_MCS_NUM_SUPP*2*sgi_enable + rx_rate; + else + rate_index = (rx_rate > MLAN_RATE_INDEX_OFDM0) ? rx_rate - 1 : rx_rate; + return rate_index; +} #ifdef STA_SUPPORT #endif /* STA_SUPPORT */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_cmdevt.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_cmdevt.c index d02a2953..162550e9 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_cmdevt.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_cmdevt.c @@ -3,26 +3,20 @@ * * @brief This file contains the handling of CMD/EVENT in MLAN * - * (C) Copyright 2009-2014 Marvell International Ltd. All Rights Reserved - * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. - * + * Copyright (C) 2009-2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /************************************************************* diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_decl.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_decl.h old mode 100644 new mode 100755 index 9fc03d0b..c4a16b55 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_decl.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_decl.h @@ -2,26 +2,20 @@ * * @brief This file declares the generic data structures and APIs. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /****************************************************** @@ -33,7 +27,7 @@ Change log: #define _MLAN_DECL_H_ /** MLAN release version */ -#define MLAN_RELEASE_VERSION "481.P2" +#define MLAN_RELEASE_VERSION "481.P3" /** Re-define generic data types for MLAN/MOAL */ /** Signed char (1-byte) */ @@ -240,12 +234,6 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH]; /** Maximum tx retry count */ #define MLAN_TX_RETRY_MAX (14) - -#define RX_RATE_MAX 24 -#define SNR_MAX 256 -#define NOISE_FLR_MAX 256 -#define SIG_STRENGTH_MAX 256 - /** define SDIO block size for data Tx/Rx */ /* We support up to 480-byte block size due to FW buffer limitation. */ #define MLAN_SDIO_BLOCK_SIZE 256 @@ -1061,6 +1049,15 @@ typedef struct _mlan_callbacks { /** moal_tcp_ack_tx_ind */ t_void(*moal_tcp_ack_tx_ind) (IN t_void * pmoal_handle, IN pmlan_buffer pmbuf); + /** moal_hist_data_add */ +t_void (*moal_hist_data_add) ( + IN t_void *pmoal_handle, + IN t_u32 bss_index, + IN t_u8 rx_rate, + IN t_s8 snr, + IN t_s8 nflr, + IN t_u8 antenna + ); } mlan_callbacks, *pmlan_callbacks; /** Interrupt Mode SDIO */ @@ -1178,14 +1175,6 @@ typedef int (*MOAL_PEER_MGMT_FRAME_CB) ( t_s8 snr, t_s8 sig_str, mlan_802_11_mac_addr mac); -/** api to get the histogram data */ -MLAN_API int mlan_hist_data_get( - OUT char *pBuf, - OUT unsigned int *pNumSamples); - -/** api to clear existing histogram data */ -MLAN_API int mlan_hist_data_clear(void); - /** memcpy implementation for mlan */ MLAN_API void* mlan_memcpy( IN void *pDest, diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_fw.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_fw.h old mode 100644 new mode 100755 index ecbd66f6..ded9f68a --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_fw.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_fw.h @@ -4,26 +4,20 @@ * structures and declares global function prototypes used * in MLAN module. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /****************************************************** @@ -1513,8 +1507,8 @@ typedef MLAN_PACK_START struct _RxPD { t_u8 reserved[3]; /** TDLS flags, bit 0: 0=InfraLink, 1=DirectLink */ t_u8 flags; - /** Reserved */ - t_u8 reserved_1; + /** Antenna info: 0 = 2.4G antenna a; 1 = 2.4G antenna b; 3 = 5G antenna; 0xff = invalid value */ + t_u8 antenna; } MLAN_PACK_END RxPD, *PRxPD; #ifdef UAP_SUPPORT @@ -1563,8 +1557,8 @@ typedef MLAN_PACK_START struct _UapRxPD { t_u16 seq_num; /** Packet Priority */ t_u8 priority; - /** Reserved */ - t_u8 reserved; + /** Antenna info: 0 = 2.4G antenna a; 1 = 2.4G antenna b; 3 = 5G antenna; 0xff = invalid value */ + t_u8 antenna; } MLAN_PACK_END UapRxPD, *PUapRxPD; /** Fixed size of station association event */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_ieee.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_ieee.h index e6e806e7..2f93eedd 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_ieee.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_ieee.h @@ -3,26 +3,20 @@ * @brief This file contains IEEE information element related * definitions used in MLAN and MOAL module. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /****************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_init.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_init.c index db7ed194..3f8c925c 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_init.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_init.c @@ -3,26 +3,20 @@ * @brief This file contains the initialization for FW * and HW. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /******************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_init.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_init.h index b9d330f9..cb060356 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_init.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_init.h @@ -3,26 +3,20 @@ * @brief This file defines the FW initialization data * structures. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /****************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_ioctl.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_ioctl.h index db70d527..1515ec03 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_ioctl.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_ioctl.h @@ -2,26 +2,20 @@ * * @brief This file declares the IOCTL data structures and APIs. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /****************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_join.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_join.c index 5ffdc101..8bfd8ba1 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_join.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_join.c @@ -6,27 +6,20 @@ * for sending adhoc start, adhoc join, and association commands * to the firmware. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. - * - * @sa mlan_join.h + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /****************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_join.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_join.h index 3a56be27..1d57ecad 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_join.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_join.h @@ -7,27 +7,20 @@ * implemented in mlan_join.c. Process all start/join requests for * both adhoc and infrastructure networks * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. - * - * @sa mlan_join.c + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /****************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_main.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_main.h old mode 100644 new mode 100755 index 9f21d426..6e6dbff5 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_main.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_main.h @@ -4,26 +4,20 @@ * structures and declares global function prototypes used * in MLAN module. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /****************************************************** @@ -2751,7 +2745,7 @@ t_u32 wlan_is_ext_capa_support(IN mlan_private * pmpriv); #ifdef STA_SUPPORT void wlan_add_ext_capa_info_ie(IN mlan_private * pmpriv, OUT t_u8 ** pptlv_out); #endif - +t_u8 wlan_adjust_data_rate(mlan_private *priv, t_u8 rx_rate, t_u8 rate_info); mlan_status wlan_misc_otp_user_data(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_meas.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_meas.c index 54632f54..d6a1d720 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_meas.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_meas.c @@ -11,26 +11,20 @@ * Requires use of the following preprocessor define: * - ENABLE_MEAS * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved - * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. - * + * Copyright (C) 2008-2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /************************************************************* diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_meas.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_meas.h index b979f85e..24c4719f 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_meas.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_meas.h @@ -8,25 +8,20 @@ * * @sa mlan_meas.c * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. * */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_misc.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_misc.c index 5f149284..da49444b 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_misc.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_misc.c @@ -1,28 +1,22 @@ /** * @file mlan_misc.c * - * @brief This file include Miscellaneous functions for MLAN module - * - * (C) Copyright 2009-2014 Marvell International Ltd. All Rights Reserved - * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. - * + * @brief This file include miscellaneous functions for MLAN module + * + * Copyright (C) 2009-2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /************************************************************* diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_module.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_module.c index b2af0fba..38377d7e 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_module.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_module.c @@ -2,7 +2,7 @@ * * @brief This file declares the exported symbols from MLAN. * - * Copyright (C) 2008-2011, Marvell International Ltd. + * Copyright (C) 2008-2014, Marvell International Ltd. * * This software file (the "File") is distributed by Marvell International * Ltd. under the terms of the GNU General Public License Version 2, June 1991 @@ -43,13 +43,11 @@ EXPORT_SYMBOL(mlan_interrupt); EXPORT_SYMBOL(mlan_pm_wakeup_card); -EXPORT_SYMBOL(mlan_hist_data_get); -EXPORT_SYMBOL(mlan_hist_data_clear); EXPORT_SYMBOL(mlan_memcpy); EXPORT_SYMBOL(mlan_register_peer_mac_cb); MODULE_DESCRIPTION("M-WLAN MLAN Driver"); MODULE_AUTHOR("Marvell International Ltd."); MODULE_VERSION(MLAN_RELEASE_VERSION); -MODULE_LICENSE("Marvell Proprietary"); +MODULE_LICENSE("GPL"); #endif /* LINUX */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_scan.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_scan.c index e3b37755..e167212c 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_scan.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_scan.c @@ -5,26 +5,20 @@ * IOCTL handlers as well as command preparation and response routines * for sending scan commands to the firmware. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /****************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sdio.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sdio.c index 4d96b153..0e4c22bd 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sdio.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sdio.c @@ -2,26 +2,20 @@ * * @brief This file contains SDIO specific code * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /******************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sdio.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sdio.h index ca658fc1..177558e3 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sdio.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sdio.h @@ -1,26 +1,22 @@ /** @file mlan_sdio.h * * @brief This file contains definitions for SDIO interface. + * driver. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. * */ /**************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_shim.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_shim.c old mode 100644 new mode 100755 index 933da72a..647df434 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_shim.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_shim.c @@ -2,57 +2,20 @@ * * @brief This file contains APIs to MOAL module. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. - * - */ - -/** - * @mainpage MLAN Driver - * - * @section overview_sec Overview - * - * The MLAN is an OS independent WLAN driver for Marvell 802.11 - * embedded chipset. - * - * @section copyright_sec Copyright - * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved - * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell International Ltd - * or its suppliers and licensors. The Material contains trade secrets and - * proprietary and confidential information of Marvell or its suppliers and - * licensors. The Material is protected by worldwide copyright and trade secret - * laws and treaty provisions. No part of the Material may be used, copied, - * reproduced, modified, published, uploaded, posted, transmitted, distributed, - * or disclosed in any way without Marvell's prior express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /******************************************************** @@ -266,6 +229,7 @@ mlan_register(IN pmlan_device pmdevice, OUT t_void ** ppmlan_adapter) MASSERT(pcb->moal_spin_lock); MASSERT(pcb->moal_spin_unlock); MASSERT(pcb->moal_tcp_ack_tx_ind); + MASSERT(pcb->moal_hist_data_add); /* Save pmoal_handle */ pmadapter->pmoal_handle = pmdevice->pmoal_handle; diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_cmd.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_cmd.c index 20969f5c..89dbfc94 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_cmd.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_cmd.c @@ -4,25 +4,20 @@ * it prepares command and sends it to firmware when * it is ready. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. * */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_cmdresp.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_cmdresp.c index e65ecf83..9a7c4037 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_cmdresp.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_cmdresp.c @@ -3,26 +3,20 @@ * @brief This file contains the handling of command * responses generated by firmware. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /****************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_event.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_event.c index 39a0c45e..2668acad 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_event.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_event.c @@ -2,26 +2,20 @@ * * @brief This file contains MLAN event handling. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /******************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_ioctl.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_ioctl.c index 9b3edb82..0f3b7837 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_ioctl.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_ioctl.c @@ -2,26 +2,20 @@ * * @brief This file contains the functions for station ioctl. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved - * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. - * + * Copyright (C) 2008-2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /****************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_rx.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_rx.c old mode 100644 new mode 100755 index a96b8f96..458d2ccd --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_rx.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_rx.c @@ -3,26 +3,20 @@ * @brief This file contains the handling of RX in MLAN * module. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /******************************************************** @@ -44,29 +38,10 @@ Change log: #include "mlan_decl.h" -static void mlan_hist_data_reset(); -static void mlan_hist_data_set(t_s8 rxRate, t_s8 snr, t_s8 nflr); - - /******************************************************** Local Variables ********************************************************/ -//Number of samples in histogram (/proc/mwlan/mlan0/histogram). -#define MLAN_HIST_MAX_SAMPLES 1048576 - -typedef struct _hgm_data -{ - atomic_t rx_rate[RX_RATE_MAX]; - atomic_t snr[SNR_MAX]; - atomic_t noise_flr[NOISE_FLR_MAX]; - atomic_t sig_str[SIG_STRENGTH_MAX]; - atomic_t num_samples; - -} mlan_hgm_data; - -static mlan_hgm_data *pmlan_hist = 0; - /** Ethernet II header */ typedef struct { /** Ethernet II header destination address */ @@ -144,78 +119,9 @@ void* mlan_memcpy(void *pDest, void *pSrc, unsigned int count) return pDest; } -int mlan_hist_data_get(char *pBuf, unsigned int *pNumSamples) -{ - char *d = pBuf; - char *s; - unsigned int temp; - int ix, dest_ix = 0; - if (pmlan_hist) - { - *pNumSamples = atomic_read(&(pmlan_hist->num_samples)); - for (ix = 0; ix < RX_RATE_MAX; ix++){ - temp = atomic_read(&(pmlan_hist->rx_rate[ix])); - s = &temp; - mlan_memcpy((void *) (pBuf + dest_ix), (void *) s, sizeof(unsigned int)); - dest_ix += sizeof(unsigned int); - } - for (ix = 0; ix < SNR_MAX; ix++){ - temp = atomic_read(&(pmlan_hist->snr[ix])); - s = &temp; - mlan_memcpy((void *) (pBuf + dest_ix), (void *) s, sizeof(unsigned int)); - dest_ix += sizeof(unsigned int); - } - for (ix = 0; ix < NOISE_FLR_MAX; ix++){ - temp = atomic_read(&(pmlan_hist->noise_flr[ix])); - s = &temp; - mlan_memcpy((void *) (pBuf + dest_ix), (void *) s, sizeof(unsigned int)); - dest_ix += sizeof(unsigned int); - } - for (ix = 0; ix < SIG_STRENGTH_MAX; ix++){ - temp = atomic_read(&(pmlan_hist->sig_str[ix])); - s = &temp; - mlan_memcpy((void *) (pBuf + dest_ix), (void *) s, sizeof(unsigned int)); - dest_ix += sizeof(unsigned int); - } - return 0; - } - - *pNumSamples = 0; - return -1; -} - -int mlan_hist_data_clear() -{ - if (pmlan_hist){ - mlan_hist_data_reset(); - return 0; - } - return -1; -} - /******************************************************** Local Functions ********************************************************/ -static void mlan_hist_data_reset() -{ - int ix; - - atomic_set(&(pmlan_hist->num_samples), 0); - for (ix = 0; ix < RX_RATE_MAX; ix++) atomic_set(&(pmlan_hist->rx_rate[ix]), 0); - for (ix = 0; ix < SNR_MAX; ix++) atomic_set(&(pmlan_hist->snr[ix]), 0); - for (ix = 0; ix < NOISE_FLR_MAX; ix++) atomic_set(&(pmlan_hist->noise_flr[ix]), 0); - for (ix = 0; ix < SIG_STRENGTH_MAX; ix++) atomic_set(&(pmlan_hist->sig_str[ix]), 0); - -} - -static void mlan_hist_data_set(t_s8 rxRate, t_s8 snr, t_s8 nflr) -{ - atomic_inc(&(pmlan_hist->num_samples)); - atomic_inc(&(pmlan_hist->rx_rate[rxRate])); - atomic_inc(&(pmlan_hist->snr[snr])); - atomic_inc(&(pmlan_hist->noise_flr[128 + nflr])); - atomic_inc(&(pmlan_hist->sig_str[nflr - snr])); -} /******************************************************** Global functions @@ -433,7 +339,7 @@ wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf) t_u8 appletalk_aarp_type[2] = { 0x80, 0xf3 }; t_u8 ipx_snap_type[2] = { 0x81, 0x37 }; t_u8 tdls_action_type[2] = { 0x89, 0x0d }; - t_u8 adj_rx_rate = 0; + t_u8 adj_rx_rate = 0; ENTER(); @@ -540,37 +446,11 @@ wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf) priv->rxpd_rate = prx_pd->rx_rate; priv->rxpd_htinfo = prx_pd->ht_info; - if (priv->rxpd_htinfo & MBIT(0)){ //Check for 11n HT20 rates - adj_rx_rate = priv->rxpd_rate + MLAN_RATE_INDEX_MCS0; - PRINTM(MDATA,"wlan_process_rx_packet(): HT20 Rate! ht_info:%x Rx Rate:%d adj_rate:%d\n", - priv->rxpd_htinfo,priv->rxpd_rate,adj_rx_rate); - } - else { //BG rates - adj_rx_rate = (priv->rxpd_rate > MLAN_RATE_INDEX_OFDM0) ? priv->rxpd_rate - 1 : priv->rxpd_rate; - PRINTM(MDATA,"wlan_process_rx_packet(): HT20 Rate! ht_info:%x Rx Rate:%d adj_rate:%d\n", - priv->rxpd_htinfo,priv->rxpd_rate,adj_rx_rate); - } - - if (pmlan_hist) - { - unsigned long curr_size; - curr_size = atomic_read(&(pmlan_hist->num_samples)); - if (curr_size > MLAN_HIST_MAX_SAMPLES) - { - mlan_hist_data_reset(); - } - - mlan_hist_data_set( adj_rx_rate, prx_pd->snr, prx_pd->nf); - } - else - { - pmlan_hist = (mlan_hgm_data *) kmalloc(sizeof(mlan_hgm_data),GFP_KERNEL); - - if (pmlan_hist){ - mlan_hist_data_reset(); - mlan_hist_data_set( adj_rx_rate, prx_pd->snr, prx_pd->nf); - } - } + if(priv->bss_type == MLAN_BSS_TYPE_STA){ + adj_rx_rate = wlan_adjust_data_rate(priv, priv->rxpd_rate, priv->rxpd_htinfo); + pmadapter->callbacks.moal_hist_data_add(pmadapter->pmoal_handle, + pmbuf->bss_index, adj_rx_rate, prx_pd->snr, prx_pd->nf, prx_pd->antenna); + } pmadapter->callbacks.moal_get_system_time(pmadapter->pmoal_handle, &pmbuf->out_ts_sec, diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_tx.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_tx.c index e2d2437a..9b5be981 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_tx.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_sta_tx.c @@ -3,26 +3,20 @@ * @brief This file contains the handling of data packet * transmission in MLAN module. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /******************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_txrx.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_txrx.c index cfa1de16..b6260942 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_txrx.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_txrx.c @@ -3,26 +3,20 @@ * * @brief This file contains the handling of TX/RX in MLAN * - * (C) Copyright 2009-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2009-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /************************************************************* diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_uap.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_uap.h index bb10bc05..cb3d3e34 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_uap.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_uap.h @@ -3,26 +3,20 @@ * @brief This file contains related macros, enum, and struct * of uap functionalities * - * (C) Copyright 2009-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2009-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /******************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_uap_cmdevent.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_uap_cmdevent.c index bae31ff8..d01298ba 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_uap_cmdevent.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_uap_cmdevent.c @@ -2,26 +2,20 @@ * * @brief This file contains the handling of AP mode command and event * - * (C) Copyright 2009-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2009-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /******************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_uap_ioctl.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_uap_ioctl.c index 84f7ae28..6f1bb486 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_uap_ioctl.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_uap_ioctl.c @@ -2,26 +2,20 @@ * * @brief This file contains the handling of AP mode ioctls * - * (C) Copyright 2009-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2009-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /******************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_uap_txrx.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_uap_txrx.c index 22900fa4..892d7fad 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_uap_txrx.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_uap_txrx.c @@ -2,26 +2,20 @@ * * @brief This file contains AP mode transmit and receive functions * - * (C) Copyright 2009-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2009-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /******************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_util.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_util.h index 45287460..ce04875b 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_util.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_util.h @@ -3,26 +3,20 @@ * @brief This file contains wrappers for linked-list, * spinlock and timer defines. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved - * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. - * + * Copyright (C) 2008-2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /****************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_wmm.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_wmm.c index 62ddeaf5..0b25be1b 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_wmm.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_wmm.c @@ -2,26 +2,20 @@ * * @brief This file contains functions for WMM. * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved - * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. - * + * Copyright (C) 2008-2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /******************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_wmm.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_wmm.h index f029d855..b1b4ea7b 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_wmm.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlan/mlan_wmm.h @@ -3,26 +3,20 @@ * @brief This file contains related macros, enum, and struct * of wmm functionalities * - * (C) Copyright 2008-2014 Marvell International Ltd. All Rights Reserved + * Copyright (C) 2008-2014, Marvell International Ltd. * - * MARVELL CONFIDENTIAL - * The source code contained or described herein and all documents related to - * the source code ("Material") are owned by Marvell International Ltd or its - * suppliers or licensors. Title to the Material remains with Marvell - * International Ltd or its suppliers and licensors. The Material contains - * trade secrets and proprietary and confidential information of Marvell or its - * suppliers and licensors. The Material is protected by worldwide copyright - * and trade secret laws and treaty provisions. No part of the Material may be - * used, copied, reproduced, modified, published, uploaded, posted, - * transmitted, distributed, or disclosed in any way without Marvell's prior - * express written permission. - * - * No license under any patent, copyright, trade secret or other intellectual - * property right is granted to or conferred upon you by disclosure or delivery - * of the Materials, either expressly, by implication, inducement, estoppel or - * otherwise. Any license under such intellectual property rights must be - * express and approved by Marvell in writing. + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. */ /**************************************************** diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/mlan_decl.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/mlan_decl.h old mode 100644 new mode 100755 index 88d67704..c4a16b55 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/mlan_decl.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/mlan_decl.h @@ -27,7 +27,7 @@ Change log: #define _MLAN_DECL_H_ /** MLAN release version */ -#define MLAN_RELEASE_VERSION "481.P2" +#define MLAN_RELEASE_VERSION "481.P3" /** Re-define generic data types for MLAN/MOAL */ /** Signed char (1-byte) */ @@ -234,12 +234,6 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH]; /** Maximum tx retry count */ #define MLAN_TX_RETRY_MAX (14) - -#define RX_RATE_MAX 24 -#define SNR_MAX 256 -#define NOISE_FLR_MAX 256 -#define SIG_STRENGTH_MAX 256 - /** define SDIO block size for data Tx/Rx */ /* We support up to 480-byte block size due to FW buffer limitation. */ #define MLAN_SDIO_BLOCK_SIZE 256 @@ -1055,6 +1049,15 @@ typedef struct _mlan_callbacks { /** moal_tcp_ack_tx_ind */ t_void(*moal_tcp_ack_tx_ind) (IN t_void * pmoal_handle, IN pmlan_buffer pmbuf); + /** moal_hist_data_add */ +t_void (*moal_hist_data_add) ( + IN t_void *pmoal_handle, + IN t_u32 bss_index, + IN t_u8 rx_rate, + IN t_s8 snr, + IN t_s8 nflr, + IN t_u8 antenna + ); } mlan_callbacks, *pmlan_callbacks; /** Interrupt Mode SDIO */ @@ -1172,14 +1175,6 @@ typedef int (*MOAL_PEER_MGMT_FRAME_CB) ( t_s8 snr, t_s8 sig_str, mlan_802_11_mac_addr mac); -/** api to get the histogram data */ -MLAN_API int mlan_hist_data_get( - OUT char *pBuf, - OUT unsigned int *pNumSamples); - -/** api to clear existing histogram data */ -MLAN_API int mlan_hist_data_clear(void); - /** memcpy implementation for mlan */ MLAN_API void* mlan_memcpy( IN void *pDest, diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_debug.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_debug.c index 27f694b2..b12a5c9d 100755 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_debug.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_debug.c @@ -425,189 +425,228 @@ static struct debug_data uap_items[] = { }; #endif /* UAP_SUPPORT */ -/* Histogram support*/ -struct _hgm_seq_data { - int histDataSize; - int pos; - int numHgmSamples; - char *pHgmData; -}; - -static struct _hgm_seq_data hgm_seq_data; -static unsigned int woal_debug_get_uint(char *pBuf); - -static void -hgm_seq_init_globals() +/** + * @brief This function reset histogram data + * + * @param priv A pointer to moal_private + * + * @return N/A + */ +void woal_hist_do_reset(void *data) { - int i; - ENTER(); + hgm_data *phist_data = (hgm_data *)data; + int ix; - if (!hgm_seq_data.pHgmData){ - hgm_seq_data.histDataSize = (RX_RATE_MAX+SNR_MAX+NOISE_FLR_MAX+SIG_STRENGTH_MAX) * sizeof(unsigned int); - hgm_seq_data.pHgmData = (char *) kmalloc(hgm_seq_data.histDataSize, GFP_KERNEL); + if(!phist_data) return; + atomic_set(&(phist_data->num_samples), 0); + for (ix = 0; ix < RX_RATE_MAX; ix++) atomic_set(&(phist_data->rx_rate[ix]), 0); + for (ix = 0; ix < SNR_MAX; ix++) atomic_set(&(phist_data->snr[ix]), 0); + for (ix = 0; ix < NOISE_FLR_MAX; ix++) atomic_set(&(phist_data->noise_flr[ix]), 0); + for (ix = 0; ix < SIG_STRENGTH_MAX; ix++) atomic_set(&(phist_data->sig_str[ix]), 0); +} - if (!hgm_seq_data.pHgmData){ - printk(KERN_ERR "hgm_seq_init_globals: Could not allocate memory\n"); - LEAVE(); - return; - } +/** + * @brief This function reset all histogram data + * + * @param priv A pointer to moal_private + * + * @return N/A + */ +void woal_hist_data_reset(moal_private *priv) +{ + int i = 0; + for(i = 0; i < priv->phandle->histogram_table_num; i++) + woal_hist_do_reset(priv->hist_data[i]); +} - for (i = 0; i < hgm_seq_data.histDataSize; i++) - hgm_seq_data.pHgmData[i] = 0; - } +/** + * @brief This function reset histogram data according to antenna + * + * @param priv A pointer to moal_private + * + * @return N/A + */ +void woal_hist_reset_table(moal_private *priv, t_u8 antenna) +{ + hgm_data *phist_data = priv->hist_data[antenna]; - LEAVE(); - return; + woal_hist_do_reset(phist_data); } -static void * -hgm_seq_start(struct seq_file *s, loff_t *pos) +/** + * @brief This function set histogram data + * + * @param priv A pointer to moal_private + * @param rx_rate rx rate + * @param snr snr + * @param nflr NF + * + * @return N/A + */ +static void woal_hist_data_set(moal_private *priv, t_u8 rx_rate, t_s8 snr, t_s8 nflr, t_u8 antenna) { + hgm_data *phist_data = NULL; - ENTER(); + phist_data = priv->hist_data[antenna]; - if (unlikely(!hgm_seq_data.pHgmData)){ - LEAVE(); - return NULL; - } - else if (0 == *pos) { - if (0 != mlan_hist_data_get( hgm_seq_data.pHgmData, &(hgm_seq_data.numHgmSamples) )){ - LEAVE(); - return NULL; - } - } + atomic_inc(&(phist_data->num_samples)); + atomic_inc(&(phist_data->rx_rate[rx_rate])); + atomic_inc(&(phist_data->snr[snr])); + atomic_inc(&(phist_data->noise_flr[128 + nflr])); + atomic_inc(&(phist_data->sig_str[nflr - snr])); +} - hgm_seq_data.pos = *pos; - if ((*pos) >= hgm_seq_data.histDataSize) { // are we done? - LEAVE(); - return NULL; - } - LEAVE(); - return (void *) &hgm_seq_data; +/** + * @brief This function add histogram data + * + * @param priv A pointer to moal_private + * @param rx_rate rx rate + * @param snr snr + * @param nflr NF + * + * @return N/A + */ +void woal_hist_data_add(moal_private *priv, t_u8 rx_rate, t_s8 snr, t_s8 nflr, t_u8 antenna) +{ + hgm_data *phist_data = NULL; + unsigned long curr_size; + + if((antenna + 1) > priv->phandle->histogram_table_num) + antenna = 0; + phist_data = priv->hist_data[antenna]; + curr_size = atomic_read(&(phist_data->num_samples)); + if (curr_size > HIST_MAX_SAMPLES) + woal_hist_reset_table(priv, antenna); + woal_hist_data_set(priv, rx_rate, snr, nflr, antenna); } +#define MAX_MCS_NUM_SUPP 16 +#define MAX_MCS_NUM_AC 10 +#define RATE_INDEX_MCS0 12 -static int -hgm_seq_show(struct seq_file *s, void *v) +/** + * @brief histogram info in proc + * + * @param sfp pointer to seq_file structure + * @param data + * + * @return Number of output data or MLAN_STATUS_FAILURE + */ +static int woal_histogram_info(struct seq_file *sfp, void *data) { - struct _hgm_seq_data *hgm = (struct _hgm_seq_data *) v; - int pos; - int rx_max = RX_RATE_MAX; - int snr_max = rx_max + SNR_MAX; - int nflr_max = snr_max + NOISE_FLR_MAX; - int sigs_max = nflr_max + SIG_STRENGTH_MAX; - int i,nTemp; - struct debug_data_priv *pdbg_data_priv; - struct debug_data *pdbg_data; - moal_private *pmoal_priv=NULL; + hgm_data *phist_data = (hgm_data *)data; + int i = 0; + int value = 0; + t_bool sgi_enable = 0; + t_u8 bw = 0; + t_u8 mcs_index = 0; - if (s){ - pdbg_data_priv = (struct debug_data_priv *)s->private; - pdbg_data = pdbg_data_priv->items; - pmoal_priv = pdbg_data_priv->priv; + ENTER(); + if (MODULE_GET == 0) { + LEAVE(); + return -EFAULT; } - else - PRINTM(MERROR,"hgm_seq_show(): s == NULL!\n"); - - pos = hgm->pos; - - if (unlikely(pos == 0)){ - // Position 0, print banner, num items and first entry. - seq_printf(s, "total samples = %d \n", hgm->numHgmSamples); - seq_printf(s, "rx rates (in Mbps): 0=1M 1=2M 2=5.5M 3=11M 4=6M 5=9M 6=12M\n"); - seq_printf(s, " 7=18M 8=24M 9=36M 10=48M 11=54M 12-19 == MCS0-7(BW20)\n\n"); - - i = woal_debug_get_uint((char *) (pos + hgm->pHgmData)); - if (i){ - seq_printf(s, "rx_rate[%02d] = %d\n", pos, i); - } - } - else if (pos < rx_max*sizeof(unsigned int)){ - i = woal_debug_get_uint((char *) (pos + hgm->pHgmData)); - if (i){ - seq_printf(s, "rx_rate[%02d] = %d\n", pos/sizeof(unsigned int), i); - } - } - else if (pos < snr_max*sizeof(unsigned int)){ - i = woal_debug_get_uint((char *) (pos + hgm->pHgmData)); - if (i){ - seq_printf(s, "snr[%02ddB] = %d\n", (pos/sizeof(unsigned int)) - rx_max, i); + seq_printf(sfp, "total samples = %d \n", atomic_read(&(phist_data->num_samples))); + seq_printf(sfp, "rx rates (in Mbps):\n"); + seq_printf(sfp, "\t0-3: B-MCS 0-3\n"); + seq_printf(sfp, "\t4-11: G-MCS 0-7\n"); + seq_printf(sfp, "\t12-27: N-MCS 0-15(BW20) 28-43: N-MCS 0-15(BW40)\n"); + seq_printf(sfp, "\t44-59: N-MCS 0-15(BW20:SGI) 60-75: N-MCS 0-15(BW40:SGI)\n"); + seq_printf(sfp, "\n"); + for (i = 0; i < RX_RATE_MAX; i++){ + value = atomic_read(&(phist_data->rx_rate[i])); + if(value) { + if (i <= 11) + seq_printf(sfp, "rx_rate[%03d] = %d\n", i, value); + else if (i <= 75) { + sgi_enable = (i-12)/(MAX_MCS_NUM_SUPP*2);//0:LGI, 1:SGI + bw = ((i-12)%(MAX_MCS_NUM_SUPP*2))/MAX_MCS_NUM_SUPP;//0:20MHz, 1:40MHz + mcs_index = (i-12)%MAX_MCS_NUM_SUPP; + seq_printf(sfp, + "rx_rate[%03d] = %d (MCS:%d HT BW:%dMHz%s)\n", + i, value, mcs_index, (1 << bw) * 20, + sgi_enable ? " SGI" : ""); + } } } - else if (pos < nflr_max*sizeof(unsigned int)){ - i = woal_debug_get_uint((char *) (pos + hgm->pHgmData)); - if (i){ - seq_printf(s, "noise_flr[-%02ddBm] = %d\n", ((pos/sizeof(unsigned int))-snr_max)-128, i); - } + for (i = 0; i < SNR_MAX; i++){ + value = atomic_read(&(phist_data->snr[i])); + if(value) + seq_printf(sfp, "snr[%02ddB] = %d\n", i, value); } - else if (pos < sigs_max*sizeof(unsigned int)){ - i = woal_debug_get_uint((char *) (pos + hgm->pHgmData)); - if (i){ - seq_printf(s, "sig_strength[-%02ddBm] = %d\n", (pos/sizeof(unsigned int)) - nflr_max, i); - } + for (i = 0; i < NOISE_FLR_MAX; i++){ + value = atomic_read(&(phist_data->noise_flr[i])); + if(value) + seq_printf(sfp, "noise_flr[-%02ddBm] = %d\n", (int)(i-128), value); } - else{ - return 0; + for (i = 0; i < SIG_STRENGTH_MAX; i++){ + value = atomic_read(&(phist_data->sig_str[i])); + if(value) + seq_printf(sfp, "sig_strength[-%02ddBm] = %d\n", i, value); } + MODULE_PUT; + LEAVE(); return 0; } -static void * -hgm_seq_next(struct seq_file *s, void *v, loff_t *pos) +/** + * @brief Proc read function for histogram + * + * @param sfp pointer to seq_file structure + * @param data + * + * @return Number of output data or MLAN_STATUS_FAILURE + */ +static int woal_histogram_read(struct seq_file *sfp, void *data) { - struct _hgm_seq_data *hgm = (struct _hgm_seq_data *) v; + wlan_hist_proc_data * hist_data = (wlan_hist_proc_data *)sfp->private; + moal_private *priv = (moal_private *)hist_data->priv; - if ((*pos) >= hgm->histDataSize) // we are done - return NULL; - - (*pos) += sizeof(unsigned int); // increase my position counter - hgm->pos = *pos; + ENTER(); + if (!priv){ + LEAVE(); + return -EFAULT; + } - return v; -} + if(!priv->hist_data){ + LEAVE(); + return -EFAULT; + } + if(hist_data->ant_idx < priv->phandle->histogram_table_num) + woal_histogram_info(sfp,priv->hist_data[hist_data->ant_idx]); -static void -hgm_seq_stop(struct seq_file *s, void *v) -{ - return; + LEAVE(); + return 0; } -static struct seq_operations hgm_seq_ops = { - .start = hgm_seq_start, - .next = hgm_seq_next, - .stop = hgm_seq_stop, - .show = hgm_seq_show -}; - -static int hgm_seq_open(struct inode *inode, struct file *file) +static int woal_histogram_proc_open(struct inode *inode, struct file *file) { - int ret; - ret = seq_open(file, &hgm_seq_ops); - if (!ret){ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) - ((struct seq_file *)file->private_data)->private = PDE_DATA(inode); + return single_open(file, woal_histogram_read, PDE_DATA(inode)); #else - ((struct seq_file *)file->private_data)->private = PDE(inode)->data; + return single_open(file, woal_histogram_read, PDE(inode)->data); #endif - } - return ret; } -static unsigned int woal_debug_get_uint(char *pBuf) -{ - unsigned int n; - mlan_memcpy((void *) &n, (void *) pBuf, sizeof(unsigned int)); - return n; -} - -static int -woal_debug_write_histogram(struct file *filp, const char __user *buf, - size_t count, loff_t *ppos) +/** + * @brief Proc write function for histogram + * + * @param f file pointer + * @param buf pointer to data buffer + * @param count data number to write + * @param off Offset + * + * @return number of data + */ +static ssize_t woal_histogram_write(struct file *f, const char __user *buf, size_t count, loff_t *off) { - mlan_hist_data_clear(); + struct seq_file *sfp = f->private_data; + wlan_hist_proc_data * hist_data = (wlan_hist_proc_data *)sfp->private; + moal_private *priv = (moal_private *)hist_data->priv; + woal_hist_reset_table(priv,hist_data->ant_idx); return count; } @@ -1382,15 +1421,6 @@ static const struct file_operations debug_proc_fops = { .write = woal_debug_write, }; -static struct file_operations hgm_file_ops = { - .owner = THIS_MODULE, - .open = hgm_seq_open, - .write = woal_debug_write_histogram, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release -}; - static struct file_operations peers_file_ops = { .owner = THIS_MODULE, .open = peers_seq_open, @@ -1409,6 +1439,14 @@ static const struct file_operations log_proc_fops = { }; +static const struct file_operations histogram_proc_fops = { + .owner = THIS_MODULE, + .open = woal_histogram_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, + .write = woal_histogram_write, +}; /******************************************************** Global Functions ********************************************************/ @@ -1423,10 +1461,11 @@ void woal_debug_entry(moal_private * priv) { struct proc_dir_entry *r; - struct proc_dir_entry *r2; - struct proc_dir_entry *r3; + struct proc_dir_entry *r2; + struct proc_dir_entry *r3; int i; int handle_items; + char hist_entry[50]; ENTER(); @@ -1440,24 +1479,23 @@ woal_debug_entry(moal_private * priv) (struct debug_data *)kmalloc(sizeof(items), GFP_KERNEL); if (!priv->items_priv.items) { PRINTM(MERROR, - "Failed to allocate memory for debug data\n"); + "Failed to allocate memory for debug data\n"); LEAVE(); return; } memcpy(priv->items_priv.items, items, sizeof(items)); priv->items_priv.num_of_items = ARRAY_SIZE(items); - priv->items_priv_hist.num_of_items = 0; - priv->items_priv_peers.num_of_items = 0; + priv->items_priv_peers.num_of_items = 0; } #endif #ifdef UAP_SUPPORT if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { priv->items_priv.items = (struct debug_data *)kmalloc(sizeof(uap_items), - GFP_KERNEL); + GFP_KERNEL); if (!priv->items_priv.items) { PRINTM(MERROR, - "Failed to allocate memory for debug data\n"); + "Failed to allocate memory for debug data\n"); LEAVE(); return; } @@ -1467,8 +1505,7 @@ woal_debug_entry(moal_private * priv) #endif priv->items_priv.priv = priv; - priv->items_priv_hist.priv = priv; - priv->items_priv_peers.priv = priv; + priv->items_priv_peers.priv = priv; handle_items = 9; #ifdef SDIO_MMC_DEBUG handle_items += 2; @@ -1478,15 +1515,15 @@ woal_debug_entry(moal_private * priv) #endif for (i = 1; i <= handle_items; i++) priv->items_priv.items[priv->items_priv.num_of_items - - i].addr += (t_ptr) (priv->phandle); + i].addr += (t_ptr) (priv->phandle); /* Create proc entry */ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) r = proc_create_data("debug", 0644, priv->proc_entry, &debug_proc_fops, - &priv->items_priv); + &priv->items_priv); if (r == NULL) #else - r = create_proc_entry("debug", 0644, priv->proc_entry); + r = create_proc_entry("debug", 0644, priv->proc_entry); if (r) { r->data = &priv->items_priv; r->proc_fops = &debug_proc_fops; @@ -1498,61 +1535,75 @@ woal_debug_entry(moal_private * priv) return; } - /* Initialize hgm data structure */ - hgm_seq_init_globals(); - - /* Create proc entry for driver histogram data */ - r2 = create_proc_entry("histogram", 0664, priv->proc_entry); - if (r2 == NULL) { - LEAVE(); - return; - } - r2->data = &priv->items_priv_hist; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) - r2->owner = THIS_MODULE; -#endif - r2->proc_fops = &hgm_file_ops; - r2->uid = 0; - r2->gid = 1008; // wifi group - mlan_hist_data_clear(); - - r3 = create_proc_entry("peers", 0664, priv->proc_entry); - if (r3 == NULL) { - LEAVE(); - return; - } - r3->data = &priv->items_priv_peers; + r3 = create_proc_entry("peers", 0664, priv->proc_entry); + if (r3 == NULL) { + LEAVE(); + return; + } + r3->data = &priv->items_priv_peers; #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) - r3->owner = THIS_MODULE; + r3->owner = THIS_MODULE; #endif - r3->proc_fops = &peers_file_ops; - r3->uid = 0; - r3->gid = 1008; // wifi group + r3->proc_fops = &peers_file_ops; + r3->uid = 0; + r3->gid = 1008; // wifi group - //Register the peer mgmt frame callback function. - mlan_register_peer_mac_cb((MOAL_PEER_MGMT_FRAME_CB) &woal_peer_mgmt_frame_callback); - woal_peer_list_size = 0; - sema_init(&woal_peer_sem,1); + //Register the peer mgmt frame callback function. + mlan_register_peer_mac_cb((MOAL_PEER_MGMT_FRAME_CB) &woal_peer_mgmt_frame_callback); + woal_peer_list_size = 0; + sema_init(&woal_peer_sem,1); - if(priv->bss_type == MLAN_BSS_TYPE_STA || priv->bss_type == MLAN_BSS_TYPE_UAP){ + if(priv->bss_type == MLAN_BSS_TYPE_STA || priv->bss_type == MLAN_BSS_TYPE_UAP){ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) - r = proc_create_data("log", 0644, priv->proc_entry, &log_proc_fops, priv); - if (r == NULL) + r = proc_create_data("log", 0644, priv->proc_entry, &log_proc_fops, priv); + if (r == NULL) #else - r = create_proc_entry("log", 0644, priv->proc_entry); - if (r) { - r->data = priv; - r->proc_fops = &log_proc_fops; - } else + r = create_proc_entry("log", 0644, priv->proc_entry); + if (r) { + r->data = priv; + r->proc_fops = &log_proc_fops; + } else #endif - { - PRINTM(MMSG,"Fail to create proc log entry\n"); - LEAVE(); - return; - } - } + { + PRINTM(MMSG,"Fail to create proc log entry\n"); + LEAVE(); + return; + } + } + + if(priv->bss_type == MLAN_BSS_TYPE_STA || priv->bss_type == MLAN_BSS_TYPE_UAP){ + priv->hist_entry = proc_mkdir("histogram", priv->proc_entry); + if(!priv->hist_entry){ + PRINTM(MERROR, "Fail to mkdir histogram!\n"); + LEAVE(); + return; + } + for (i = 0; i < priv->phandle->histogram_table_num; i++){ + priv->hist_proc[i].ant_idx = i; + priv->hist_proc[i].priv = priv; + snprintf(hist_entry, sizeof(hist_entry), "wlan-ant%d",i); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + r = proc_create_data(hist_entry, 0664, priv->hist_entry, &histogram_proc_fops, &priv->hist_proc[i]); + if (r == NULL) +#else + r = create_proc_entry("histogram", 0664, priv->hist_entry); + if (r) { + r->data = &priv->hist_proc[i]; + r->proc_fops = &histogram_proc_fops; + } else +#endif + { + PRINTM(MMSG,"Fail to create proc histogram entry %s\n", hist_entry); + LEAVE(); + return; + } + r->uid = 0; + r->gid = 1008; // wifi group + } + } - LEAVE(); + + LEAVE(); } /** @@ -1565,16 +1616,24 @@ woal_debug_entry(moal_private * priv) void woal_debug_remove(moal_private * priv) { + char hist_entry[50]; + int i; ENTER(); kfree(priv->items_priv.items); /* Remove proc entry */ remove_proc_entry("debug", priv->proc_entry); - remove_proc_entry("histogram", priv->proc_entry); + if(priv->bss_type == MLAN_BSS_TYPE_STA || priv->bss_type == MLAN_BSS_TYPE_UAP){ + for (i = 0; i < priv->phandle->histogram_table_num; i++){ + snprintf(hist_entry, sizeof(hist_entry), "wlan-ant%d",i); + remove_proc_entry(hist_entry, priv->hist_entry); + } + remove_proc_entry("histogram", priv->proc_entry); + } woal_peer_delete_peer_list(); remove_proc_entry("peers", priv->proc_entry); - if(priv->bss_type == MLAN_BSS_TYPE_STA || priv->bss_type == MLAN_BSS_TYPE_UAP) - remove_proc_entry("log", priv->proc_entry); + if(priv->bss_type == MLAN_BSS_TYPE_STA || priv->bss_type == MLAN_BSS_TYPE_UAP) + remove_proc_entry("log", priv->proc_entry); LEAVE(); } diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_main.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_main.c old mode 100644 new mode 100755 index a2395b23..3feeae84 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_main.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_main.c @@ -207,6 +207,7 @@ static mlan_callbacks woal_callbacks = { .moal_print_netintf = moal_print_netintf, .moal_assert = moal_assert, .moal_tcp_ack_tx_ind = moal_tcp_ack_tx_ind, + .moal_hist_data_add = moal_hist_data_add, }; #if defined(STA_SUPPORT) && defined(UAP_SUPPORT) @@ -1701,11 +1702,11 @@ woal_init_fw_dpc(moal_handle * handle) sdio_release_host(((struct sdio_mmc_card *)handle->card)->func); #endif if (ret == MLAN_STATUS_FAILURE) { - PRINTM(MERROR, "WLAN: Download FW with nowwait: %d\n", + printk("WLAN: Download FW with nowwait: %d\n", req_fw_nowait); goto done; } - PRINTM(MMSG, "WLAN FW is active\n"); + printk("WLAN FW is active\n"); } /** Cal data request */ @@ -1854,6 +1855,7 @@ woal_request_fw(moal_handle * handle) int err; ENTER(); + printk("%s():fw_name=%s request_fw=%d",__FUNCTION__,handle->drv_mode.fw_name,req_fw_nowait); if (req_fw_nowait) { #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) @@ -2171,7 +2173,7 @@ woal_add_interface(moal_handle * handle, t_u8 bss_index, t_u8 bss_type) struct net_device *dev = NULL; moal_private *priv = NULL; char name[256]; - + int i = 0; ENTER(); #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) @@ -2339,6 +2341,12 @@ woal_add_interface(moal_handle * handle, t_u8 bss_index, t_u8 bss_type) } memcpy(dev->dev_addr, priv->current_addr, ETH_ALEN); } + if(bss_type == MLAN_BSS_TYPE_STA || priv->bss_type == MLAN_BSS_TYPE_UAP){ + for(i = 0; i < handle->histogram_table_num; i++) + priv->hist_data[i] = kmalloc(sizeof(hgm_data), GFP_KERNEL); + if(priv->hist_data) + woal_hist_data_reset(priv); + } #ifdef CONFIG_PROC_FS woal_create_proc_entry(priv); #ifdef PROC_DEBUG @@ -2377,7 +2385,7 @@ woal_remove_interface(moal_handle * handle, t_u8 bss_index) struct net_device *dev = NULL; moal_private *priv = handle->priv[bss_index]; union iwreq_data wrqu; - + int i = 0; ENTER(); if (!priv || !priv->netdev) goto error; @@ -2395,6 +2403,12 @@ woal_remove_interface(moal_handle * handle, t_u8 bss_index) } woal_flush_tcp_sess_queue(priv); + if(priv->bss_type == MLAN_BSS_TYPE_STA || priv->bss_type == MLAN_BSS_TYPE_UAP){ + for(i = 0; i < handle->histogram_table_num; i++){ + kfree(priv->hist_data[i]); + priv->hist_data[i] = NULL; + } + } #ifdef CONFIG_PROC_FS #ifdef PROC_DEBUG /* Remove proc debug */ @@ -4249,6 +4263,8 @@ woal_send_disconnect_to_system(moal_private * priv) if (netif_carrier_ok(priv->netdev)) netif_carrier_off(priv->netdev); woal_flush_tcp_sess_queue(priv); + if(priv->bss_type == MLAN_BSS_TYPE_STA && priv->hist_data) + woal_hist_data_reset(priv); if (IS_STA_WEXT(cfg80211_wext)) { memset(wrqu.ap_addr.sa_data, 0x00, ETH_ALEN); wrqu.ap_addr.sa_family = ARPHRD_ETHER; @@ -5478,6 +5494,7 @@ woal_add_card(void *card) } } + handle->histogram_table_num = 1; ((struct sdio_mmc_card *)card)->handle = handle; #ifdef STA_SUPPORT diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_main.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_main.h old mode 100644 new mode 100755 index 9264e27f..fc64fed9 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_main.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_main.h @@ -781,6 +781,43 @@ struct tcp_sess { /** tcp ack buffer */ void *ack_skb; }; +/** Number of samples in histogram (/proc/mwlan/mlan0/histogram).*/ +#define HIST_MAX_SAMPLES 1048576 +#ifdef ENABLE_802_11AC +#define RX_RATE_MAX 196 +#else +#define RX_RATE_MAX 76 +#endif + +/** SRN MAX */ +#define SNR_MAX 256 +/** NOISE FLR MAX */ +#define NOISE_FLR_MAX 256 +/** SIG STRENTGH MAX */ +#define SIG_STRENGTH_MAX 256 +/** historgram data */ +typedef struct _hgm_data +{ + /** rx rate */ + atomic_t rx_rate[RX_RATE_MAX]; + /** snr */ + atomic_t snr[SNR_MAX]; + /** noise flr */ + atomic_t noise_flr[NOISE_FLR_MAX]; + /** sig_str */ + atomic_t sig_str[SIG_STRENGTH_MAX]; + /** num sample */ + atomic_t num_samples; +}hgm_data; +/** max antenna number */ +#define MAX_ANTENNA_NUM 1 +/* wlan_hist_proc_data */ +typedef struct _wlan_hist_proc_data { + /** antenna */ + u8 ant_idx; + /** Private structure */ + struct _moal_private *priv; +}wlan_hist_proc_data; /** Private structure for MOAL */ struct _moal_private { @@ -911,6 +948,10 @@ struct _moal_private { struct proc_dir_entry *proc_entry; /** Proc entry name */ char proc_entry_name[IFNAMSIZ]; + /** proc entry for hist */ + struct proc_dir_entry *hist_entry; + /** ant_hist_proc_data */ + wlan_hist_proc_data hist_proc[MAX_ANTENNA_NUM]; /** PROC wait queue */ wait_queue_head_t proc_wait_q __ATTRIB_ALIGN__; #endif /* CONFIG_PROC_FS */ @@ -961,7 +1002,6 @@ struct _moal_private { #ifdef PROC_DEBUG /** MLAN debug info */ struct debug_data_priv items_priv; - struct debug_data_priv items_priv_hist; struct debug_data_priv items_priv_peers; #endif @@ -987,6 +1027,7 @@ struct _moal_private { t_u8 last_tx_buf_len; /** cookie */ t_u64 last_tx_cookie; + hgm_data *hist_data[3]; }; /** Handle data structure for MOAL */ @@ -1178,7 +1219,7 @@ struct _moal_handle { spinlock_t ioctl_lock; /** Card specific driver version */ t_s8 driver_version[MLAN_MAX_VER_STR_LEN]; - + t_u8 histogram_table_num; }; /** @@ -1941,4 +1982,8 @@ int woal_is_connected(moal_private * priv, mlan_ssid_bssid * ssid_bssid); int woal_priv_hostcmd(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen); void woal_tcp_ack_tx_indication(moal_private * priv, mlan_buffer * pmbuf); mlan_status woal_request_country_power_table(moal_private * priv, char *region); +void woal_hist_do_reset(void *data); +void woal_hist_reset_table(moal_private *priv,t_u8 antenna); +void woal_hist_data_reset(moal_private *priv); +void woal_hist_data_add(moal_private *priv,t_u8 rx_rate, t_s8 snr, t_s8 nflr, t_u8 antenna); #endif /* _MOAL_MAIN_H */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_shim.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_shim.c old mode 100644 new mode 100755 index 5680fa30..0eddb24c --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_shim.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_shim.c @@ -1904,3 +1904,24 @@ moal_tcp_ack_tx_ind(IN t_void * pmoal_handle, IN pmlan_buffer pmbuf) pmbuf->flags &= ~MLAN_BUF_FLAG_TCP_ACK; woal_tcp_ack_tx_indication(phandle->priv[pmbuf->bss_index], pmbuf); } + +/** + * @brief This function save the histogram data + * + * @param pmoal_handle A pointer to moal_private structure + * @param bss_index BSS index + * @param rx_rate rx rate index + * @param snr snr + * @param nflr noise floor + * + * @return N/A + */ +t_void moal_hist_data_add(IN t_void *pmoal_handle, IN t_u32 bss_index, IN t_u8 rx_rate, IN t_s8 snr, IN t_s8 nflr, IN t_u8 antenna) +{ + moal_private *priv = NULL; + priv = woal_bss_index_to_priv(pmoal_handle, bss_index); + if(antenna >= priv->phandle->histogram_table_num) + antenna = 0; + if(priv && priv->hist_data[antenna]) + woal_hist_data_add(priv, rx_rate, snr, nflr, antenna); +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_shim.h b/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_shim.h old mode 100644 new mode 100755 index fd52bf97..b330f23d --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_shim.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_shim.h @@ -87,6 +87,7 @@ t_void moal_print_netintf(IN t_void * pmoal_handle, IN t_u32 bss_index, IN t_u32 level); t_void moal_assert(IN t_void * pmoal_handle, IN t_u32 cond); t_void moal_tcp_ack_tx_ind(IN t_void * pmoal_handle, IN pmlan_buffer pmbuf); +t_void moal_hist_data_add(IN t_void *pmoal_handle, IN t_u32 bss_index, IN t_u8 rx_rate, IN t_s8 snr, IN t_s8 nflr, IN t_u8 antenna); mlan_status moal_init_timer(IN t_void * pmoal_handle, OUT t_void ** pptimer, IN t_void(*callback) (t_void * pcontext), diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_uap.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_uap.c index 6b9a1484..22723cea 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_uap.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_uap.c @@ -2394,8 +2394,8 @@ woal_uap_bss_ctrl(moal_private * priv, t_u8 wait_option, int data) req->req_id = MLAN_IOCTL_BSS; req->action = MLAN_ACT_SET; - status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); - if (status != MLAN_STATUS_SUCCESS) { + status = woal_request_ioctl(priv, req, wait_option); + if (status == MLAN_STATUS_FAILURE) { ret = -EFAULT; goto done; } diff --git a/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_uap_cfg80211.c b/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_uap_cfg80211.c index e3b30bcd..0810d2ff 100644 --- a/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_uap_cfg80211.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8787/mlinux/moal_uap_cfg80211.c @@ -1611,7 +1611,7 @@ woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev) /* if the bss is still running, then stop it */ if (priv->bss_started == MTRUE) { if (MLAN_STATUS_SUCCESS != - woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, UAP_BSS_STOP)) { + woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT_TIMEOUT, UAP_BSS_STOP)) { ret = -EFAULT; goto done; } diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/Makefile b/arch/arm/mach-berlin/modules/wlan_sd8801/Makefile index 930c83b2..35e0d263 100755 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/Makefile +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/Makefile @@ -47,6 +47,7 @@ CONFIG_WIFI_DISPLAY_SUPPORT=y # Re-association in driver CONFIG_REASSOCIATION=y +CONFIG_802_11W=y # Manufacturing firmware support CONFIG_MFG_CMD_SUPPORT=y @@ -54,6 +55,15 @@ CONFIG_MFG_CMD_SUPPORT=y # Big-endian platform CONFIG_BIG_ENDIAN=n +# Enable driver based authenticator +#CONFIG_DRV_EMBEDDED_AUTHENTICATOR=y +#CONFIG_EMBEDDED_SUPP_AUTH=y + + +# Enable driver based supplicant +#CONFIG_DRV_EMBEDDED_SUPPLICANT=y +#CONFIG_EMBEDDED_SUPP_AUTH=y + # Enable SDIO multi-port Tx aggregation CONFIG_SDIO_MULTI_PORT_TX_AGGR=y @@ -70,6 +80,9 @@ CONFIG_SDIO_SUSPEND_RESUME=y CONFIG_ANDROID_KERNEL=n +#32bit app over 64bit kernel support +CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT=n + # Use static link for app build export CONFIG_STATIC_LINK=y @@ -80,6 +93,12 @@ export CONFIG_STATIC_LINK=y MODEXT = ko EXTRA_CFLAGS += -I$(srctree)/include EXTRA_CFLAGS += -I$(srctree)/arch/arm/mach-berlin/wlan_sd8801/mlan +EXTRA_CFLAGS += -I$(PWD)/mlan/esa +EXTRA_CFLAGS += -I$(PWD)/mlan/esa/common +EXTRA_CFLAGS += -I$(PWD)/arch/arm/mach-berlin/modules/wlan_sd8801/mlan +EXTRA_CFLAGS += -I$(PWD)/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa +EXTRA_CFLAGS += -I$(PWD)/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common + #EXTRA_CFLAGS += -I$(M)/mlan EXTRA_CFLAGS += -DLINUX @@ -146,6 +165,10 @@ ifeq ($(CONFIG_BIG_ENDIAN),y) EXTRA_CFLAGS += -DBIG_ENDIAN_SUPPORT endif +ifeq ($(CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT),y) + EXTRA_CFLAGS += -DUSERSPACE_32BIT_OVER_KERNEL_64BIT +endif + ifeq ($(CONFIG_SDIO_MULTI_PORT_TX_AGGR),y) EXTRA_CFLAGS += -DSDIO_MULTI_PORT_TX_AGGR endif @@ -168,6 +191,8 @@ ifeq ($(CONFIG_ANDROID_KERNEL), y) EXTRA_CFLAGS += -DANDROID_KERNEL endif + + ############################################################################# # Make Targets ############################################################################# @@ -258,6 +283,22 @@ endif endif endif + + +ifeq ($(CONFIG_EMBEDDED_SUPP_AUTH), y) + EXTRA_CFLAGS += -I$(M)/mlan/esa + EXTRA_CFLAGS += -I$(M)/mlan/esa/common +endif + +ifeq ($(CONFIG_DRV_EMBEDDED_AUTHENTICATOR), y) + EXTRA_CFLAGS += -DDRV_EMBEDDED_AUTHENTICATOR +endif + +ifeq ($(CONFIG_DRV_EMBEDDED_SUPPLICANT), y) + EXTRA_CFLAGS += -DDRV_EMBEDDED_SUPPLICANT +endif + + MOALOBJS = mlinux/moal_main.o \ mlinux/moal_ioctl.o \ mlinux/moal_shim.o \ @@ -275,7 +316,9 @@ MLANOBJS += mlan/mlan_11n_aggr.o MLANOBJS += mlan/mlan_11n_rxreorder.o MLANOBJS += mlan/mlan_11n.o MLANOBJS += mlan/mlan_11d.o +MLANOBJS += mlan/mlan_11h.o ifeq ($(CONFIG_STA_SUPPORT),y) +MLANOBJS += mlan/mlan_meas.o MLANOBJS += mlan/mlan_scan.o \ mlan/mlan_sta_ioctl.o \ mlan/mlan_sta_rx.o \ @@ -315,6 +358,38 @@ MOALOBJS += mlinux/moal_debug.o endif endif +ifeq ($(CONFIG_EMBEDDED_SUPP_AUTH), y) +MLANOBJS += mlan/esa/common/rc4.o \ + mlan/esa/common/aes_cmac_rom.o \ + mlan/esa/common/hmac_sha1.o \ + mlan/esa/common/md5.o \ + mlan/esa/common/mrvl_sha256_crypto.o \ + mlan/esa/common/hmac_md5.o \ + mlan/esa/common/crypt_new_rom.o \ + mlan/esa/common/rijndael.o \ + mlan/esa/common/sha1.o \ + mlan/esa/common/sha256.o \ + mlan/esa/common/pass_phrase.o \ + mlan/esa/common/pmkCache.o \ + mlan/esa/common/pmkCache_rom.o \ + mlan/esa/common/parser.o \ + mlan/esa/common/parser_rom.o \ + mlan/esa/keyMgmtApStaCommon.o \ + mlan/esa/hostsa_init.o \ + mlan/esa/authenticator_api.o +endif + +ifeq ($(CONFIG_DRV_EMBEDDED_SUPPLICANT),y) +MLANOBJS += mlan/esa/keyMgmtSta.o \ + mlan/esa/keyMgmtSta_rom.o \ + mlan/esa/supplicant.o +endif + +ifeq ($(CONFIG_DRV_EMBEDDED_AUTHENTICATOR),y) +MLANOBJS += mlan/esa/AssocAp_srv_rom.o \ + mlan/esa/keyMgmtAp_rom.o \ + mlan/esa/keyMgmtAp.o +endif obj-$(CONFIG_BERLIN_SDIO_WLAN_8801) := 88mlan.o diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/AssocAp_srv_rom.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/AssocAp_srv_rom.c new file mode 100644 index 00000000..2a939b9d --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/AssocAp_srv_rom.c @@ -0,0 +1,352 @@ +/** @file AssocAp_src_rom.c + * + * @brief This file defines the function for checking security type and ie + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#include "wltypes.h" +#include "hostsa_ext_def.h" +#include "IEEE_types.h" + +#include "authenticator.h" +#include "AssocAp_srv_rom.h" +#include "parser.h" +#include "keyMgmtAp.h" + +BOOLEAN +AssocSrvAp_checkCipherSupport(Cipher_t cipher, Cipher_t allowedCiphers) +{ + BOOLEAN match = FALSE; + + if (cipher.ccmp && (allowedCiphers.ccmp)) { + match = TRUE; + } else if (cipher.tkip && (allowedCiphers.tkip)) { + match = TRUE; + } else if (cipher.wep40 && (allowedCiphers.wep40)) { + match = TRUE; + } else if (cipher.wep104 && (allowedCiphers.wep104)) { + match = TRUE; + } + + return match; +} + +UINT16 +AssocSrvAp_checkAkm(phostsa_private priv, AkmSuite_t *pAkm, UINT16 allowedAkms) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + UINT16 matchedAkms; + + matchedAkms = 0; + + if ((memcmp(util_fns, pAkm->akmOui, wpa_oui, sizeof(wpa_oui)) != 0) && + ((memcmp(util_fns, pAkm->akmOui, kde_oui, sizeof(kde_oui)) != 0))) { + return matchedAkms; + } + + switch (pAkm->akmType) { + case IEEEtypes_RSN_AUTH_KEY_SUITE_8021X: + matchedAkms = (allowedAkms & UAP_HOSTCMD_KEYMGMT_EAP); + break; + + case IEEEtypes_RSN_AUTH_KEY_SUITE_PSK: + matchedAkms = (allowedAkms & UAP_HOSTCMD_KEYMGMT_PSK); + break; + case IEEEtypes_AKM_SUITE_PSK_SHA256: + matchedAkms = (allowedAkms & UAP_HOSTCMD_KEYMGMT_PSK_SHA256); + break; + default: + break; + } + + return matchedAkms; +} + +WL_STATUS +assocSrvAp_validate4WayHandshakeIe(phostsa_private priv, + SecurityMode_t secType, + Cipher_t pwCipher, + Cipher_t grpCipher, + apKeyMgmtInfoStaRom_t *pKeyMgmtInfo, + UINT8 akmType, + UINT16 rsnCap, Cipher_t config_mcstCipher) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + + if (memcmp + (util_fns, (void *)&secType, (void *)&pKeyMgmtInfo->staSecType, + sizeof(secType)) != 0) { + return FAIL; + } + + if (memcmp(util_fns, (void *)&grpCipher, + (void *)&config_mcstCipher, sizeof(grpCipher)) != 0) { + return FAIL; + } + + if (memcmp + (util_fns, (void *)&pwCipher, (void *)&pKeyMgmtInfo->staUcstCipher, + sizeof(pwCipher)) != 0) { + return FAIL; + } + + if (akmType != pKeyMgmtInfo->staAkmType) { + + return FAIL; + } + + return SUCCESS; +} + +void +AssocSrvAp_InitKeyMgmtInfo(phostsa_private priv, + apKeyMgmtInfoStaRom_t *pKeyMgmtInfo, + SecurityMode_t *secType, Cipher_t *pwCipher, + UINT16 staRsnCap, UINT8 akmType) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + pKeyMgmtInfo->keyMgmtState = HSK_NOT_STARTED; + memcpy(util_fns, (void *)&pKeyMgmtInfo->staSecType, (void *)secType, + sizeof(SecurityMode_t)); + memcpy(util_fns, (void *)&pKeyMgmtInfo->staUcstCipher, (void *)pwCipher, + sizeof(Cipher_t)); + pKeyMgmtInfo->staAkmType = akmType; + if (secType->wpa2) { + pKeyMgmtInfo->staRsnCap = staRsnCap; + } +} + +void +AssocSrvAp_InitStaKeyInfo(cm_Connection *connPtr, + SecurityMode_t *secType, + Cipher_t *pwCipher, UINT16 staRsnCap, UINT8 akmType) +{ + apKeyMgmtInfoSta_t *pKeyMgmtInfo; + + phostsa_private priv = (phostsa_private)connPtr->priv; + hostsa_util_fns *util_fns = &priv->util_fns; + + KeyMgmtStopHskTimer(connPtr); + + pKeyMgmtInfo = &connPtr->staData.keyMgmtInfo; + memset(util_fns, (void *)pKeyMgmtInfo, 0x00, + sizeof(apKeyMgmtInfoSta_t)); + AssocSrvAp_InitKeyMgmtInfo(priv, &pKeyMgmtInfo->rom, secType, pwCipher, + staRsnCap, akmType); + pKeyMgmtInfo->EAPOLProtoVersion = EAPOL_PROTOCOL_V1; +} + +WL_STATUS +assocSrvAp_checkRsnWpa(cm_Connection *connPtr, + apKeyMgmtInfoStaRom_t *pKeyMgmtInfo, + Cipher_t apWpaCipher, + Cipher_t apWpa2Cipher, + Cipher_t apMcstCipher, + UINT16 apAuthKey, + SecurityMode_t *pSecType, + IEEEtypes_RSNElement_t *pRsn, + IEEEtypes_WPAElement_t *pWpa, + BOOLEAN validate4WayHandshakeIE) +{ + phostsa_private priv = (phostsa_private)connPtr->priv; + hostsa_util_fns *util_fns = &priv->util_fns; + WL_STATUS result = SUCCESS; + Cipher_t apCipher; + Cipher_t pwCipher; + Cipher_t grpCipher; + SecurityMode_t wpaType; + AkmSuite_t akm[AKM_SUITE_MAX]; + UINT8 minimumRsnLen; + + /* staRsnCap field is only used to compare RsnCap received in + AssocRequest with rsnCap received in 4 way handshake PWKMsg2. + + we use 0xFFFF signature. If rsnCap is not present in pRsn, + signature 0xFFFF would be saved in pKeyMgmtInfo->staRsnCap. */ + + union { + UINT16 shortInt; + IEEEtypes_RSNCapability_t cfg; + } staRsnCap; + + memset(util_fns, &wpaType, 0x00, sizeof(wpaType)); + memset(util_fns, &apCipher, 0x00, sizeof(apCipher)); + staRsnCap.shortInt = 0xFFFF; + + if (pRsn && (pSecType->wpa2 == 1)) { + + /* + In pRsn , All elements after Ver field are optional per the + spec. + + we reject Assoc Request, if GrpKeyCipher, pwsKey and AuthKey + is not present. + + we can rely on minimum length check as we are rejecting + Assoc Request having pwsKeyCnt > 1 and AuthKeyCnt > 1 + + */ + + minimumRsnLen = (unsigned long)&pRsn->RsnCap - + (unsigned long)&pRsn->Ver; + + if (pRsn->Len < minimumRsnLen) { + PRINTM(MERROR, "pRsn->Len %x < minimumRsnLen %x\n", + pRsn->Len, minimumRsnLen); + return FAIL; + } + + if (pRsn->PwsKeyCnt == 1 && pRsn->AuthKeyCnt == 1) { + apCipher = apWpa2Cipher; + + supplicantParseRsnIe(priv, pRsn, + &wpaType, + &grpCipher, + &pwCipher, + akm, + NELEMENTS(akm), + &staRsnCap.cfg, NULL); + } else { + PRINTM(MERROR, + "pRsn->PwsKeyCnt %x pRsn->AuthKeyCnt %x\n", + pRsn->PwsKeyCnt, pRsn->AuthKeyCnt); + result = FAIL; + } + } else if (pWpa && (pSecType->wpa == 1)) { + if (pWpa->PwsKeyCnt == 1 && pWpa->AuthKeyCnt == 1) { + apCipher = apWpaCipher; + supplicantParseWpaIe(priv, pWpa, + &wpaType, + &grpCipher, + &pwCipher, akm, NELEMENTS(akm)); + } else { + PRINTM(MERROR, + "pWpa->PwsKeyCnt %x pWpa->AuthKeyCnt %x\n", + pWpa->PwsKeyCnt, pWpa->AuthKeyCnt); + result = FAIL; + } + } else { + PRINTM(MERROR, "No wpa or rsn\n"); + result = FAIL; + } + + if ((pwCipher.ccmp == 0) && (pwCipher.tkip == 0)) { + PRINTM(MERROR, + "(pwCipher.ccmp(%x) == 0) && (pwCipher.tkip(%x) == 0)\n", + pwCipher.ccmp, pwCipher.tkip); + result = FAIL; + } + + if ((grpCipher.ccmp == 0) && (grpCipher.tkip == 0)) { + PRINTM(MERROR, + "((grpCipher.ccmp(%x) == 0) && (grpCipher.tkip(%x) == 0))\n", + grpCipher.ccmp, grpCipher.tkip); + result = FAIL; + } + DBG_HEXDUMP(MCMD_D, " akm", (t_u8 *)&akm[0], sizeof(AkmSuite_t)); + if (SUCCESS == result) { +#ifdef DOT11W + if (staRsnCap.shortInt != 0xFFFF) { + /* Save the peer STA PMF capability, which will later + used to enable PMF */ + connPtr->staData.peerPMFCapable = staRsnCap.cfg.MFPC; + } +#endif + if (validate4WayHandshakeIE == MFALSE) { + if ((AssocSrvAp_checkCipherSupport(pwCipher, apCipher) + == TRUE) && + (AssocSrvAp_checkCipherSupport + (grpCipher, apMcstCipher) + == TRUE) && + (AssocSrvAp_checkAkm(priv, akm, apAuthKey) != 0)) { + AssocSrvAp_InitStaKeyInfo(connPtr, &wpaType, + &pwCipher, + staRsnCap.shortInt, + akm[0].akmType); + } else { + result = FAIL; + } + } else { + result = assocSrvAp_validate4WayHandshakeIe(priv, + wpaType, + pwCipher, + grpCipher, + pKeyMgmtInfo, + akm[0]. + akmType, + staRsnCap. + shortInt, + apMcstCipher); + } + } + return result; +} + +SINT32 +assocSrvAp_CheckSecurity(cm_Connection *connPtr, + IEEEtypes_WPSElement_t *pWps, + IEEEtypes_RSNElement_t *pRsn, + IEEEtypes_WPAElement_t *pWpa, + IEEEtypes_WAPIElement_t *pWapi, + IEEEtypes_StatusCode_t *pResult) +{ + phostsa_private priv = (phostsa_private)connPtr->priv; + apInfo_t *pApInfo = &priv->apinfo; + BssConfig_t *pBssConfig = NULL; + SINT32 retval = MLME_FAILURE; + + *pResult = IEEEtypes_STATUS_INVALID_RSN_CAPABILITIES; + + pBssConfig = &pApInfo->bssConfig; + + PRINTM(MMSG, "assocSrvAp_CheckSecurity Sectyep wpa %x wpa2 %x\n", + pBssConfig->SecType.wpa, pBssConfig->SecType.wpa2); + if ((pBssConfig->SecType.wpa == 1) || (pBssConfig->SecType.wpa2 == 1)) { + apKeyMgmtInfoSta_t *pKeyMgmtInfo = + &connPtr->staData.keyMgmtInfo; + Cipher_t wpaUcastCipher = pBssConfig->RsnConfig.wpaUcstCipher; + Cipher_t wpa2UcastCipher = pBssConfig->RsnConfig.wpa2UcstCipher; + DBG_HEXDUMP(MCMD_D, " wpa2UcstCipher", + (t_u8 *)&wpa2UcastCipher, sizeof(Cipher_t)); + DBG_HEXDUMP(MCMD_D, " wpaUcastCipher", + (t_u8 *)&wpaUcastCipher, sizeof(Cipher_t)); + connPtr->staData.RSNEnabled = 0; + if (assocSrvAp_checkRsnWpa(connPtr, &pKeyMgmtInfo->rom, + wpaUcastCipher, + wpa2UcastCipher, + pBssConfig->RsnConfig.mcstCipher, + pBssConfig->RsnConfig.AuthKey, + &pBssConfig->SecType, pRsn, pWpa, + MFALSE) == SUCCESS) { + retval = MLME_SUCCESS; + connPtr->staData.RSNEnabled = 1; + } + } else if (pBssConfig->SecType.wepStatic == 1) { + if (!pRsn || !pWpa) { + retval = MLME_SUCCESS; + } + } else if (pBssConfig->SecType.wapi) { + /* if (wapi_ie_check(pBssConfig, pWapi, pResult)) { *pResult = + 0; retval = MLME_SUCCESS; } */ + } + + return retval; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/AssocAp_srv_rom.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/AssocAp_srv_rom.h new file mode 100644 index 00000000..af99c0ce --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/AssocAp_srv_rom.h @@ -0,0 +1,51 @@ +/** @file AssocAp_src_rom.h + * + * @brief This file contains define check rsn/wpa ie + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef ASSOCAP_SRV_ROM_H_ +#define ASSOCAP_SRV_ROM_H_ + +#include "wltypes.h" +#include "IEEE_types.h" +#include "keyMgmtStaTypes.h" +#include "keyMgmtApTypes_rom.h" +#include "authenticator.h" + +WL_STATUS assocSrvAp_checkRsnWpa(cm_Connection *connPtr, + apKeyMgmtInfoStaRom_t *pKeyMgmtInfo, + Cipher_t apWpaCipher, + Cipher_t apWpa2Cipher, + Cipher_t apMcstCipher, + UINT16 apAuthKey, + SecurityMode_t *pSecType, + IEEEtypes_RSNElement_t *pRsn, + IEEEtypes_WPAElement_t *pWpa, + BOOLEAN validate4WayHandshakeIE); + +SINT32 assocSrvAp_CheckSecurity(cm_Connection *connPtr, + IEEEtypes_WPSElement_t *pWps, + IEEEtypes_RSNElement_t *pRsn, + IEEEtypes_WPAElement_t *pWpa, + IEEEtypes_WAPIElement_t *pWapi, + IEEEtypes_StatusCode_t *pResult); +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/KeyApiStaDefs.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/KeyApiStaDefs.h new file mode 100644 index 00000000..ff751fad --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/KeyApiStaDefs.h @@ -0,0 +1,126 @@ +/** @file KeyApiStaDefs.h + * + * @brief This file Contains data structures and defines related to key material. + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _KEY_API_STA_DEFS_H +#define _KEY_API_STA_DEFS_H +/******************************************************************/ +/*! + * \ingroup wpa_supplicant + * \file keyApiStaDefs.h + * \brief Contains data structures and defines related to key material + * + *******************************************************************/ + +/* Key Material for TKIP type key */ +#define CRYPTO_TKIP_KEY_LEN_MAX 16 +#define CRYPTO_KEY_LEN_MAX 16 +#define MIC_KEY_LEN_MAX 8 + +/* Key Material for AES type key */ +#define CRYPTO_AES_KEY_LEN_MAX 16 + +#define WAPI_KEY_LEN 16 +#define WAPI_MIC_LEN 16 +#define WAPI_PN_LEN 16 + +#define CRYPTO_AES_CMAC_KEY_LEN 16 +#define CRYPTO_AES_CMAC_IPN_LEN 6 +#define CRYPTO_WEP_KEY_LEN_MAX 13 + +/* + WIN7 softAP (uAP) : + BIT14 and BIT15 of keyInfo is used to pass keyID for broadcast frame +*/ + +#define KEYDATA_KEY_ID_MASK (BIT14 | BIT15) +#define KEYDATA_KEY_ID_OFFSET 14 + +#define KEY_INFO_MULTICAST 0x1 +#define KEY_INFO_UNICAST 0x2 +#define KEY_INFO_ENABLED 0x4 +#define KEY_INFO_DEFAULT 0x8 +#define KEY_INFO_TX 0x10 +#define KEY_INFO_RX 0x20 +#define KEY_INFO_MULTICAST_IGTK 0x400 + +typedef MLAN_PACK_START struct { + UINT8 key[CRYPTO_TKIP_KEY_LEN_MAX]; + UINT8 txMicKey[MIC_KEY_LEN_MAX]; + UINT8 rxMicKey[MIC_KEY_LEN_MAX]; +} MLAN_PACK_END key_Type_TKIP_t; + +/* This struct is used in ROM and existing fields should not be changed. + * New fields can be added at the end. + */ +typedef MLAN_PACK_START struct { + UINT8 keyIndex; + UINT8 isDefaultTx; + UINT8 key[CRYPTO_WEP_KEY_LEN_MAX]; +} MLAN_PACK_END key_Type_WEP_t; + +typedef MLAN_PACK_START struct { + UINT8 key[CRYPTO_AES_KEY_LEN_MAX]; +} MLAN_PACK_END key_Type_AES_t; + +typedef MLAN_PACK_START struct { + UINT8 keyIndex; + UINT8 isDefKey; + UINT8 key[WAPI_KEY_LEN]; + UINT8 mickey[WAPI_MIC_LEN]; + UINT8 rxPN[WAPI_PN_LEN]; +} MLAN_PACK_END key_Type_WAPI_t; + +typedef MLAN_PACK_START struct { + UINT8 ipn[CRYPTO_AES_CMAC_IPN_LEN]; + UINT8 reserved[2]; + UINT8 key[CRYPTO_AES_CMAC_KEY_LEN]; +} MLAN_PACK_END key_Type_AES_CMAC_t; + +typedef MLAN_PACK_START struct { + UINT16 keyType; + UINT16 keyInfo; + UINT16 keyLen; + MLAN_PACK_START union { + key_Type_TKIP_t TKIP; + key_Type_AES_t AES; + key_Type_WEP_t WEP; + +//#if defined(WAPI_HW_SUPPORT) || defined(WAPI_FW_SUPPORT) +// key_Type_WAPI_t WAPI; +//#endif + key_Type_AES_CMAC_t iGTK; + + } MLAN_PACK_END keyEncypt; +} MLAN_PACK_END key_MgtMaterial_t; + +/* deprecated but still around for backwards compatibility */ +#define KEY_INFO_TKIP_MULTICAST 0x1 +#define KEY_INFO_TKIP_UNICAST 0x2 +#define KEY_INFO_TKIP_ENABLED 0x4 + +#define KEY_INFO_AES_MULTICAST 0x1 +#define KEY_INFO_AES_UNICAST 0x2 +#define KEY_INFO_AES_ENABLED 0x4 + +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/authenticator.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/authenticator.h new file mode 100644 index 00000000..b2bb87a7 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/authenticator.h @@ -0,0 +1,370 @@ +/** @file authenticator.h + * + * @brief This file contains the data structure for authenticator and supplicant. + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _AUTHENTICATOR_H +#define _AUTHENTICATOR_H + +#include "wltypes.h" +#include "IEEE_types.h" +#include "wl_mib_rom.h" +#include "KeyApiStaDefs.h" +#include "keyApiStaTypes.h" +#include "keyCommonDef.h" +#include "keyMgmtApTypes.h" +#include "pmkCache_rom.h" + +#include "hostsa_def.h" + +extern const uint8 wpa_oui02[4]; /* WPA TKIP */ +extern const uint8 wpa_oui04[4]; /* WPA AES */ +extern const uint8 wpa_oui01[4]; /* WPA WEP-40 */ +extern const uint8 wpa_oui05[4]; /* WPA WEP-104 */ +extern const uint8 wpa_oui_none[4]; /* WPA NONE */ + +extern const uint8 wpa2_oui02[4]; /* WPA2 TKIP */ +extern const uint8 wpa2_oui04[4]; /* WPA2 AES */ +extern const uint8 wpa2_oui01[4]; /* WPA2 WEP-40 */ +extern const uint8 wpa2_oui05[4]; /* WPA2 WEP-104 */ + +extern const uint8 wpa_oui[3]; +extern const uint8 kde_oui[3]; + +typedef enum { + NO_MIC_FAILURE, + FIRST_MIC_FAIL_IN_60_SEC, + SECOND_MIC_FAIL_IN_60_SEC +} MIC_Fail_State_e; + +typedef struct { + MIC_Fail_State_e status; + BOOLEAN MICCounterMeasureEnabled; + UINT32 disableStaAsso; +} MIC_Error_t; + +typedef struct { + UINT8 TKIPICVErrors; + UINT8 TKIPLocalMICFailures; + UINT8 TKIPCounterMeasuresInvoked; + +} customMIB_RSNStats_t; + +typedef struct { + UINT8 kck[16]; /* PTK_KCK = L(PTK, 0, 128); */ + UINT8 kek[16]; /* PTK_KEK = L(PTK, 128, 128); */ + UINT8 tk[16]; /* PTK_TK = L(PTK, 256, 128); */ + +} CcmPtk_t; + +typedef struct { + UINT8 kck[16]; /* PTK_KCK = L(PTK, 0, 128); */ + UINT8 kek[16]; /* PTK_KEK = L(PTK, 128, 128); */ + UINT8 tk[16]; /* PTK_TK = L(PTK, 256, 128); */ + UINT8 rxMicKey[8]; + UINT8 txMicKey[8]; + +} TkipPtk_t; + +typedef struct { + MIC_Error_t apMicError; + t_void *apMicTimer; + + UINT32 ageOutCnt; + UINT32 stateInfo; + // key mgmt data + apKeyMgmtInfoSta_t keyMgmtInfo; + + t_u8 RSNEnabled; + UINT16 deauthReason; + + UINT8 txPauseState; + // RateChangeInfo[] is used by MAC HW to decide the start TX rate. + // It should be placed in SQ. If staData_t is placed in ITCM/DTCM then + // put + // staRateTable in SQ and use a pointer here + // staRateTable RateChangeInfo; + UINT16 stickyTimCount; + BOOLEAN stickyTimEnabled; + +#ifdef DOT11W + /* Peer STA PMF capability */ + BOOLEAN peerPMFCapable; +#endif + +} staData_t; +/**connectioninfo*/ +typedef struct _cm_Connection { + /**Hand shake timer*/ + t_void *HskTimer; + /** Timer set flag */ + t_u8 timer_is_set; + /** authenticator Private pointer */ + t_void *priv; + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; + /**sta data for authenticator*/ + staData_t staData; + /**handshake data*/ + eapolHskData_t hskData; +} cm_Connection; + +typedef struct { + IEEEtypes_CapInfo_t CapInfo; + UINT32 AssocStationsCnt; + + BOOLEAN updatePassPhrase; + + KeyData_t grpKeyData; + UINT8 GNonce[32]; + + /* Following two variables contain that multiple of BI which is just + ** greater than user configured ageout time in normal and PS mode. + These ** variables get updated at bss_start, and then are used + whenever FW ** resets STA age. */ + UINT32 staAgeOutBcnCnt; + UINT32 psStaAgeOutBcnCnt; + + // Store group rekey time as a multiple of beacon interval. + UINT32 grpRekeyCntConfigured; + UINT32 grpRekeyCntRemaining; + +} BssData_t; + +typedef struct { + UINT16 keyExchange:1; + UINT16 authenticate:1; + UINT16 reserved:14; +} Operation_t; + +typedef struct { + Cipher_t mcstCipher; + UINT8 mcstCipherCount; + + Cipher_t wpaUcstCipher; + UINT8 wpaUcstCipherCount; + + Cipher_t wpa2UcstCipher; + UINT8 wpa2UcstCipherCount; + + UINT16 AuthKey; + UINT16 AuthKeyCount; + Operation_t Akmp; + UINT32 GrpReKeyTime; + UINT8 PSKPassPhrase[PSK_PASS_PHRASE_LEN_MAX]; + UINT8 PSKPassPhraseLen; + UINT8 PSKValue[PMK_LEN_MAX]; + UINT8 MaxPwsHskRetries; + UINT8 MaxGrpHskRetries; + UINT32 PwsHskTimeOut; + UINT32 GrpHskTimeOut; + UINT8 RSNReplayProtEn; /* RSN Replay Attack Protection flag */ +} apRsnConfig_t; + +typedef struct { + UINT8 ieSet; + UINT8 version; +/* UINT8 akmCnt ; */ + UINT8 akmTypes; +/* UINT8 uCastCnt ; */ + UINT8 uCastTypes; + UINT8 mCastTypes; + UINT8 capInfo; +} wapi_ie_cfg_t; + +typedef struct { + /* The This section only used for initialization of the connPtr */ + IEEEtypes_SsId_t SsId; + IEEEtypes_Len_t SsIdLen; + // odd-sized ele clubbed together to keep even alignment + IEEEtypes_DtimPeriod_t DtimPeriod; + IEEEtypes_BcnInterval_t BcnPeriod; + + IEEEtypes_MacAddr_t BssId; + UINT16 RtsThresh; + UINT16 FragThresh; + UINT8 ShortRetryLim; + UINT8 LongRetryLim; + + // Used in MBSS mode for software beacon suppression + UINT8 MbssBcnIntFac; + UINT8 MbssCurBcnIntCnt; + UINT16 Reserved; +} CommonMlmeData_t; + +typedef struct { + IEEEtypes_SsId_t SsId; + IEEEtypes_Len_t SsIdLen; + + UINT8 wpa_ie[MAX_IE_SIZE]; + UINT16 wpa_ielen; + UINT8 rsn_ie[MAX_IE_SIZE]; + UINT16 rsn_ielen; + UINT32 StaAgeOutTime; + UINT32 PsStaAgeOutTime; + + /* If the BssAddr field is not aligned on word boundary the hal + functions which update mac registers are unsafe for non-word + aligned pointers. Avoid direct use of the pointer to BssId field in + the hal functions */ + /* this field is no longer used and we use mibOpdata_p->StaMacAddr in + its place now */ + IEEEtypes_MacAddr_t EepromMacAddr_defunct; + IEEEtypes_DataRate_t OpRateSet[IEEEtypes_MAX_DATA_RATES_G]; + + // odd-sized ele clubbed together to keep even alignment + UINT8 AuthType; + UINT8 TxPowerLevel; + IEEEtypes_DataRate_t TxDataRate; + IEEEtypes_DataRate_t TxMCBCDataRate; + UINT8 MaxStaSupported; + + SecurityMode_t SecType; + UINT8 Padding1[1]; // ****** Use this for adding new members + // ******* + BOOLEAN apWmmEn; + IEEEtypes_WMM_ParamElement_t apWmmParamSet; + + BOOLEAN ap11nEn; + + cipher_key_buf_t *pWepKeyBuf; + cipher_key_buf_t *pGtkKeyBuf; + UINT8 ScanChanCount; + UINT8 AclStaCnt; + + UINT8 Padding3[1]; // ****** Use this for adding new members + // ******* + apRsnConfig_t RsnConfig; + BOOLEAN apWmmPsEn; + channelInfo_t ScanChanList[IEEEtypes_MAX_CHANNELS]; /* Channels to + scan */ + CommonMlmeData_t comData; + IEEEtypes_OBSS_ScanParam_t ObssScanParam; + + cipher_key_buf_t *piGtkKeyBuf; + UINT32 mgmtFrameSubtypeFwdEn; + UINT8 Ht2040CoexEn; // Enable/Disable 2040 Coex feature in uAP + + UINT8 Padding4[1]; // ****** Use this for adding new members + // ******* + + wapi_ie_cfg_t wapiCfg; + IEEEtypes_ExtCapability_t ExtCap; + UINT8 Padding6[1]; // ****** Use this for adding new members + // ******* +} BssConfig_t; + +typedef struct { + BssConfig_t bssConfig; + BssData_t bssData; +} apInfo_t; +#ifdef DRV_EMBEDDED_SUPPLICANT +typedef struct { + /* This structure is ROM'd */ + + UINT8 RSNEnabled:1; /* WPA, WPA2 */ + UINT8 pmkidValid:1; /* PMKID valid */ + UINT8 rsnCapValid:1; + UINT8 grpMgmtCipherValid:1; + UINT8 rsvd:4; /* rsvd */ + + SecurityMode_t wpaType; + Cipher_t mcstCipher; + Cipher_t ucstCipher; + AkmSuite_t AKM; + UINT8 PMKID[16]; + + IEEEtypes_RSNCapability_t rsnCap; + + Cipher_t grpMgmtCipher; + +} RSNConfig_t; + +typedef struct { + UINT8 ANonce[NONCE_SIZE]; + UINT8 SNonce[NONCE_SIZE]; + UINT8 EAPOL_MIC_Key[EAPOL_MIC_KEY_SIZE]; + UINT8 EAPOL_Encr_Key[EAPOL_ENCR_KEY_SIZE]; + UINT32 apCounterLo; /* last valid replay counter from authenticator */ + UINT32 apCounterHi; + UINT32 apCounterZeroDone; /* have we processed replay == 0? */ + UINT32 staCounterLo; /* counter used in request EAPOL frames */ + UINT32 staCounterHi; + + BOOLEAN RSNDataTrafficEnabled; /* Enabled after 4way handshake */ + BOOLEAN RSNSecured; /* Enabled after group key is established */ + BOOLEAN pwkHandshakeComplete; + cipher_key_t *pRxDecryptKey; + + KeyData_t PWKey; + KeyData_t GRKey; + + KeyData_t newPWKey; + + MIC_Error_t sta_MIC_Error; + t_void *rsnTimer; + t_void *micTimer; + t_void *deauthDelayTimer; /* hacked in to delay the deauth */ + + // phostsa_private psapriv; + + KeyData_t IGtk; + +} keyMgmtInfoSta_t; + +typedef struct supplicantData { + BOOLEAN inUse; + BOOLEAN suppInitialized; + IEEEtypes_SsIdElement_t hashSsId; + IEEEtypes_MacAddr_t localBssid; + IEEEtypes_MacAddr_t localStaAddr; + customMIB_RSNStats_t customMIB_RSNStats; + RSNConfig_t customMIB_RSNConfig; + keyMgmtInfoSta_t keyMgmtInfoSta; + SecurityParams_t currParams; + UINT8 wpa_rsn_ie[MAX_IE_SIZE]; +} supplicantData_t; +#endif + +/** supplicant/authenticator private structure */ +typedef struct _hostsa_private { + /** pmlan_private */ + t_void *pmlan_private; + /** pmlan_adapter */ + t_void *pmlan_adapter; + /** Utility functions table */ + hostsa_util_fns util_fns; + /** MLAN APIs table */ + hostsa_mlan_fns mlan_fns; + /**apinf_t*/ + apInfo_t apinfo; + /**group rekey timer*/ + t_void *GrpRekeytimer; + /**Group rekey timer set flag*/ + t_u8 GrpRekeyTimerIsSet; + /**local mac address*/ + t_u8 curr_addr[MLAN_MAC_ADDR_LENGTH]; +#ifdef DRV_EMBEDDED_SUPPLICANT + /**supplicant data*/ + supplicantData_t *suppData; +#endif +} hostsa_private, *phostsa_private; +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/authenticator_api.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/authenticator_api.c new file mode 100644 index 00000000..34201049 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/authenticator_api.c @@ -0,0 +1,862 @@ +/** @file Authenticator_api.c + * + * @brief This file defines the main APIs for authenticator. + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +//Authenticator related function definitions +#include "wltypes.h" +#include "IEEE_types.h" + +#include "hostsa_ext_def.h" +#include "authenticator.h" + +#include "wl_macros.h" +#include "wlpd.h" +#include "pass_phrase.h" +#include "sha1.h" +#include "crypt_new.h" +#include "parser.h" +#include "keyCommonDef.h" +#include "keyMgmtStaTypes.h" +#include "AssocAp_srv_rom.h" +#include "pmkCache.h" +#include "keyMgmtApTypes.h" +#include "keyMgmtAp.h" +#include "rc4.h" +#include "keyMgmtAp.h" + +/********************* + Local Variables + *********************/ + +/********************* + Global Variables + *********************/ + +/********************* + Local Functions + *********************/ + +/********************* + Global Functions + *********************/ +#ifdef DRV_EMBEDDED_SUPPLICANT +extern void allocSupplicantData(void *phostsa_priv); +extern void freeSupplicantData(void *phostsa_priv); +extern mlan_status initSupplicantTimer(void *priv); +extern void keyMgmtSta_RomInit(void); +extern void freeSupplicantTimer(void *priv); +#endif + +/********************* + Utility Handler + *********************/ +#ifdef DRV_EMBEDDED_AUTHENTICATOR +static UINT32 +util_CountBits(UINT32 val) +{ + UINT32 count = 0; + + for (count = 0; val; count++) { + val &= (val - 1); + } + return count; +} + +static void +initMicErrorParams(UINT32 wpa, MIC_Error_t *pApMicError) +{ + if (wpa) { + pApMicError->MICCounterMeasureEnabled = 1; + pApMicError->disableStaAsso = 0; + pApMicError->status = NO_MIC_FAILURE; + } +} + +/** + * @brief whether authenticator is enabled or not + * + * @param priv A void pointer to phostsa private struct + * + * @return + */ +t_u8 +IsAuthenticatorEnabled(void *priv) +{ + phostsa_private psapriv = (phostsa_private)priv; + apInfo_t *pApInfo = &psapriv->apinfo; + apRsnConfig_t *pRsnConfig = NULL; + t_u8 ret = 0; + + ENTER(); + + if (pApInfo == NULL) { + LEAVE(); + return ret; + } + + pRsnConfig = &pApInfo->bssConfig.RsnConfig; + + // If Passphrase lengh is nonozero then + // authenticator in the driver is to be used, + // otherwise authenticator in the host is not to be used. + if (pRsnConfig->PSKPassPhraseLen != 0) { + ret = 1; + } + + LEAVE(); + return ret; +} + +/** + * @brief BSS configure initialized + * + * @param priv A void pointer to phostsa private struct + * + * @return + */ +void +AuthenitcatorInitBssConfig(void *priv) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + apInfo_t *pApInfo = &psapriv->apinfo; + BssConfig_t *pBssConfig = MNULL; + apRsnConfig_t *pRsnConfig = MNULL; + + ENTER(); + + pBssConfig = &pApInfo->bssConfig; + pRsnConfig = &pBssConfig->RsnConfig; + + memset(util_fns, pBssConfig, 0x00, sizeof(BssConfig_t)); + /**default ap ssid*/ + pBssConfig->SsIdLen = wlan_strlen(AP_DEFAULT_SSID); + memset(util_fns, pBssConfig->SsId, 0x00, IEEEtypes_SSID_SIZE); + memcpy(util_fns, pBssConfig->SsId, AP_DEFAULT_SSID, + IEEEtypes_SSID_SIZE); + /**default retry times ans timeout*/ + pRsnConfig->PwsHskTimeOut = PWS_HSK_TIMEOUT; + pRsnConfig->MaxPwsHskRetries = PWS_HSK_RETRIES; + pRsnConfig->GrpHskTimeOut = GRP_HSK_TIMEOUT; + pRsnConfig->MaxGrpHskRetries = GRP_HSK_RETRIES; + /**Group key rekey time*/ + pRsnConfig->GrpReKeyTime = GRP_REKEY_TIME; + + LEAVE(); +} + +/** + * @brief get bss config + * + * @param priv A void pointer to phostsa private struct + * @param pbss_config a pointer to mlan_uap_bss_param + * @param SetConfigToMlan 1 set releated config to mlan , 0 get related config from mlan + * + * @return + */ +void +AuthenticatorGetBssConfig(hostsa_private *psapriv, t_u8 *pbss_config, + t_u8 SetConfigToMlan) +{ + hostsa_util_fns *util_fns = &psapriv->util_fns; + apInfo_t *pApInfo = &psapriv->apinfo; + mlan_uap_bss_param *bss_config = (mlan_uap_bss_param *)pbss_config; + BssConfig_t *pBssConfig = MNULL; + apRsnConfig_t *pRsnConfig = MNULL; + t_u8 zero_mac[] = { 0, 0, 0, 0, 0, 0 }; + + ENTER(); + + pBssConfig = &pApInfo->bssConfig; + pRsnConfig = &pBssConfig->RsnConfig; + + /**set bss config to mlan*/ + if (SetConfigToMlan) { + if ((pRsnConfig->PwsHskTimeOut != 0) && + (pRsnConfig->PwsHskTimeOut < (MAX_VALID_DWORD))) { + bss_config->pairwise_update_timeout = + pRsnConfig->PwsHskTimeOut; + } + + if ((pRsnConfig->MaxPwsHskRetries != 0) && + (pRsnConfig->MaxPwsHskRetries < (MAX_VALID_DWORD))) + bss_config->pwk_retries = pRsnConfig->MaxPwsHskRetries; + + if ((pRsnConfig->GrpHskTimeOut != 0) && + (pRsnConfig->GrpHskTimeOut < (MAX_VALID_DWORD))) + bss_config->groupwise_update_timeout = + pRsnConfig->GrpHskTimeOut; + + if ((pRsnConfig->MaxGrpHskRetries != 0) && + (pRsnConfig->MaxGrpHskRetries < (MAX_VALID_DWORD))) + bss_config->gwk_retries = pRsnConfig->MaxGrpHskRetries; + + if (pRsnConfig->PSKPassPhraseLen != 0) { + bss_config->wpa_cfg.length = + pRsnConfig->PSKPassPhraseLen; + memcpy(util_fns, bss_config->wpa_cfg.passphrase, + pRsnConfig->PSKPassPhrase, + pRsnConfig->PSKPassPhraseLen); + } + + if ((pRsnConfig->GrpReKeyTime != 0) && + (pRsnConfig->GrpReKeyTime < MAX_GRP_TIMER)) + bss_config->wpa_cfg.gk_rekey_time = + pRsnConfig->GrpReKeyTime; + + LEAVE(); + return; + } + + if (((pBssConfig->SsIdLen != bss_config->ssid.ssid_len) || + (memcmp(util_fns, pBssConfig->SsId, + bss_config->ssid.ssid, bss_config->ssid.ssid_len) != 0)) && + bss_config->ssid.ssid_len) { + pApInfo->bssData.updatePassPhrase = 1; + memcpy(util_fns, pBssConfig->SsId, bss_config->ssid.ssid, + bss_config->ssid.ssid_len); + pBssConfig->SsIdLen = bss_config->ssid.ssid_len; + } + + if (memcmp + (util_fns, zero_mac, &bss_config->mac_addr, MLAN_MAC_ADDR_LENGTH)) { + memset(util_fns, psapriv->curr_addr, 0x00, + MLAN_MAC_ADDR_LENGTH); + memcpy(util_fns, psapriv->curr_addr, &bss_config->mac_addr, + MLAN_MAC_ADDR_LENGTH); + } + + if ((bss_config->max_sta_count != 0) && + (bss_config->max_sta_count <= MAX_STA_COUNT)) + pBssConfig->MaxStaSupported = bss_config->max_sta_count; + + if ((bss_config->pairwise_update_timeout != 0) && + (bss_config->pairwise_update_timeout < (MAX_VALID_DWORD))) { + pRsnConfig->PwsHskTimeOut = bss_config->pairwise_update_timeout; + } + + if ((bss_config->pwk_retries != 0) && + (bss_config->pwk_retries < (MAX_VALID_DWORD))) + pRsnConfig->MaxPwsHskRetries = bss_config->pwk_retries; + + if ((bss_config->groupwise_update_timeout != 0) && + (bss_config->groupwise_update_timeout < (MAX_VALID_DWORD))) + pRsnConfig->GrpHskTimeOut = + bss_config->groupwise_update_timeout; + + if ((bss_config->gwk_retries != 0) && + (bss_config->gwk_retries < (MAX_VALID_DWORD))) + pRsnConfig->MaxGrpHskRetries = bss_config->gwk_retries; + + if ((bss_config->auth_mode <= MLAN_AUTH_MODE_SHARED) || + (bss_config->auth_mode == MLAN_AUTH_MODE_AUTO)) + pBssConfig->AuthType = bss_config->auth_mode; + + memcpy(util_fns, &pBssConfig->SecType, &bss_config->protocol, + sizeof(pBssConfig->SecType)); + + if ((bss_config->protocol & PROTOCOL_WPA) || + (bss_config->protocol & PROTOCOL_WPA2) || + (bss_config->protocol & PROTOCOL_EAP)) { + pRsnConfig->AuthKey = bss_config->key_mgmt; + pRsnConfig->AuthKeyCount = util_CountBits(pRsnConfig->AuthKey); + memcpy(util_fns, (char *)&pRsnConfig->Akmp, + (char *)&bss_config->key_mgmt_operation, + sizeof(bss_config->key_mgmt_operation)); + + if ((bss_config->wpa_cfg. + pairwise_cipher_wpa & VALID_CIPHER_BITMAP) && + (bss_config->wpa_cfg.pairwise_cipher_wpa != 0xff)) { + memset(util_fns, (t_u8 *)&pRsnConfig->wpaUcstCipher, + 0x00, sizeof(Cipher_t)); + memcpy(util_fns, (t_u8 *)&pRsnConfig->wpaUcstCipher, + (t_u8 *)&bss_config->wpa_cfg.pairwise_cipher_wpa, + sizeof(Cipher_t)); + pRsnConfig->wpaUcstCipherCount = + util_CountBits(bss_config->wpa_cfg. + pairwise_cipher_wpa); + } + + if ((bss_config->wpa_cfg. + pairwise_cipher_wpa2 & VALID_CIPHER_BITMAP) && + (bss_config->wpa_cfg.pairwise_cipher_wpa2 != 0xff)) { + memset(util_fns, (t_u8 *)&pRsnConfig->wpa2UcstCipher, + 0x00, sizeof(Cipher_t)); + memcpy(util_fns, (t_u8 *)&pRsnConfig->wpa2UcstCipher, + (t_u8 *)&bss_config->wpa_cfg. + pairwise_cipher_wpa2, sizeof(Cipher_t)); + pRsnConfig->wpa2UcstCipherCount = + util_CountBits(bss_config->wpa_cfg. + pairwise_cipher_wpa2); + } + DBG_HEXDUMP(MCMD_D, " wpa2UcstCipher", + (t_u8 *)&pRsnConfig->wpa2UcstCipher, + sizeof(Cipher_t)); + DBG_HEXDUMP(MCMD_D, " wpaUcastCipher", + (t_u8 *)&pRsnConfig->wpaUcstCipher, + sizeof(Cipher_t)); + + if (bss_config->wpa_cfg.group_cipher & VALID_CIPHER_BITMAP) { + memset(util_fns, (t_u8 *)&pRsnConfig->mcstCipher, 0x00, + sizeof(Cipher_t)); + memcpy(util_fns, (t_u8 *)&pRsnConfig->mcstCipher, + (t_u8 *)&bss_config->wpa_cfg.group_cipher, + sizeof(Cipher_t)); + pRsnConfig->mcstCipherCount = + util_CountBits(bss_config->wpa_cfg. + group_cipher); + } + + if (bss_config->wpa_cfg.rsn_protection <= MTRUE) + pRsnConfig->RSNReplayProtEn = + bss_config->wpa_cfg. + rsn_protection ? MTRUE : MFALSE; + + } + + if (((pRsnConfig->PSKPassPhraseLen != bss_config->wpa_cfg.length) || + (memcmp(util_fns, pRsnConfig->PSKPassPhrase, + bss_config->wpa_cfg.passphrase, + bss_config->wpa_cfg.length) != 0)) && + bss_config->wpa_cfg.length) { + pApInfo->bssData.updatePassPhrase = 1; + pRsnConfig->PSKPassPhraseLen = bss_config->wpa_cfg.length; + memset(util_fns, pRsnConfig->PSKPassPhrase, + 0x00, PSK_PASS_PHRASE_LEN_MAX); + memcpy(util_fns, pRsnConfig->PSKPassPhrase, + bss_config->wpa_cfg.passphrase, + bss_config->wpa_cfg.length); + } + + if ((bss_config->wpa_cfg.gk_rekey_time != 0) && + (bss_config->wpa_cfg.gk_rekey_time < MAX_GRP_TIMER)) + pRsnConfig->GrpReKeyTime = bss_config->wpa_cfg.gk_rekey_time; + + LEAVE(); +} + +/** + * @brief get bss config for authenticator and append wpa/rsn ie to FW + * + * @param priv A void pointer to phostsa private struct + * @param pbss_config a pointer to mlan_uap_bss_param + * @param appendIE 1 append rsn/wpa ie to fw, 0 not append + * @param clearIE 1 clear rsn/wpa ie to fw, 0 not clear + * @param SetConfigToMlan 1 set releated config to mlan , 0 get related config from mlan +* + * + * @return + */ +t_u8 +AuthenticatorBssConfig(void *priv, t_u8 *pbss_config, t_u8 appendIE, + t_u8 clearIE, t_u8 SetConfigToMlan) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + hostsa_mlan_fns *pm_fns = &psapriv->mlan_fns; + apInfo_t *pApInfo = &psapriv->apinfo; + BssConfig_t *pBssConfig = MNULL; + apRsnConfig_t *pRsnConfig = MNULL; + t_u16 ielen = 0; + t_u8 ret = 0; + + ENTER(); + + pBssConfig = &pApInfo->bssConfig; + pRsnConfig = &pBssConfig->RsnConfig; + + if (pbss_config) + AuthenticatorGetBssConfig(psapriv, pbss_config, + SetConfigToMlan); + + if (appendIE && pRsnConfig->PSKPassPhraseLen && + (pBssConfig->SecType.wpa || pBssConfig->SecType.wpa2 || + pBssConfig->SecType.wpaNone)) { + PRINTM(MMSG, "authenticator set mgmt IE\n"); + if (pBssConfig->wpa_ielen) { + pm_fns->Hostsa_set_mgmt_ie(psapriv->pmlan_private, + pBssConfig->wpa_ie, + pBssConfig->wpa_ielen, 1); + pBssConfig->wpa_ielen = 0; + memset(util_fns, pBssConfig->wpa_ie, 0x00, MAX_IE_SIZE); + } + /**construct wpa or RSN ie*/ + if (pBssConfig->SecType.wpa) { + memset(util_fns, pBssConfig->wpa_ie, 0x00, MAX_IE_SIZE); + ielen = keyMgmtAp_FormatWPARSN_IE(psapriv, + (IEEEtypes_InfoElementHdr_t + *)pBssConfig->wpa_ie, + 0, + &pBssConfig-> + RsnConfig. + wpaUcstCipher, + pBssConfig->RsnConfig. + wpaUcstCipherCount, + &pBssConfig-> + RsnConfig.mcstCipher, + pBssConfig->RsnConfig. + AuthKey, + pBssConfig->RsnConfig. + AuthKeyCount); + pBssConfig->wpa_ielen = ielen; + pm_fns->Hostsa_set_mgmt_ie(psapriv->pmlan_private, + pBssConfig->wpa_ie, ielen, + 0); + } + + if (pBssConfig->rsn_ielen) { + pm_fns->Hostsa_set_mgmt_ie(psapriv->pmlan_private, + pBssConfig->rsn_ie, + pBssConfig->rsn_ielen, 1); + pBssConfig->rsn_ielen = 0; + memset(util_fns, pBssConfig->rsn_ie, 0x00, MAX_IE_SIZE); + } + + if (pBssConfig->SecType.wpa2) { + memset(util_fns, pBssConfig->rsn_ie, 0x00, MAX_IE_SIZE); + ielen = keyMgmtAp_FormatWPARSN_IE(psapriv, + (IEEEtypes_InfoElementHdr_t + *)pBssConfig->rsn_ie, + 1, + &pBssConfig-> + RsnConfig. + wpa2UcstCipher, + pBssConfig->RsnConfig. + wpa2UcstCipherCount, + &pBssConfig-> + RsnConfig.mcstCipher, + pBssConfig->RsnConfig. + AuthKey, + pBssConfig->RsnConfig. + AuthKeyCount); + pBssConfig->rsn_ielen = ielen; + pm_fns->Hostsa_set_mgmt_ie(psapriv->pmlan_private, + pBssConfig->rsn_ie, ielen, + 0); + } + } + + if (clearIE) { + PRINTM(MMSG, "authenticator clear mgmt IE\n"); + if (pBssConfig->wpa_ielen) { + pm_fns->Hostsa_set_mgmt_ie(psapriv->pmlan_private, + pBssConfig->wpa_ie, + pBssConfig->wpa_ielen, 1); + pBssConfig->wpa_ielen = 0; + memset(util_fns, pBssConfig->wpa_ie, 0x00, MAX_IE_SIZE); + } + if (pBssConfig->rsn_ielen) { + pm_fns->Hostsa_set_mgmt_ie(psapriv->pmlan_private, + pBssConfig->rsn_ie, + pBssConfig->rsn_ielen, 1); + pBssConfig->rsn_ielen = 0; + memset(util_fns, pBssConfig->rsn_ie, 0x00, MAX_IE_SIZE); + } + } + LEAVE(); + return ret; +} + +/** + * @brief initialize key + * + * @param priv A void pointer to phostsa private struct + * + * @return + */ +void +AuthenticatorKeyMgmtInit(void *priv, t_u8 *addr) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + apInfo_t *pApInfo = &psapriv->apinfo; + BssConfig_t *pBssConfig = MNULL; + + ENTER(); + + pBssConfig = &pApInfo->bssConfig; + /**mac address */ + memcpy(util_fns, psapriv->curr_addr, addr, MLAN_MAC_ADDR_LENGTH); + /**Reset Group Key*/ + memset(util_fns, &pBssConfig->pGtkKeyBuf, 0x00, + sizeof(pBssConfig->pGtkKeyBuf)); + /**key init */ + KeyMgmtInit(priv); + /**Group key update time,*/ + if (pBssConfig->RsnConfig.GrpReKeyTime) { + pApInfo->bssData.grpRekeyCntConfigured = pApInfo->bssConfig.RsnConfig.GrpReKeyTime / 60; + /**every 60s grpRekeyCntRemaining -- */ + + pApInfo->bssData.grpRekeyCntRemaining + = pApInfo->bssData.grpRekeyCntConfigured; + } + + keyApi_ApUpdateKeyMaterial(priv, MNULL, MTRUE); + + /**start Group rekey timer*/ + if (pBssConfig->RsnConfig.GrpReKeyTime && !psapriv->GrpRekeyTimerIsSet) { + util_fns->moal_start_timer(util_fns->pmoal_handle, + psapriv->GrpRekeytimer, + MFALSE, MRVDRV_TIMER_60S); + psapriv->GrpRekeyTimerIsSet = MTRUE; + } + + LEAVE(); +} + +/** + * @brief clear key + * + * @param priv A void pointer to phostsa private struct + * + * @return + */ +void +AuthenticatorkeyClear(void *priv) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *putil_fns = &psapriv->util_fns; + apInfo_t *pApInfo = &psapriv->apinfo; + BssConfig_t *pBssConfig = &pApInfo->bssConfig; + + if (psapriv->GrpRekeyTimerIsSet) { + psapriv->GrpRekeyTimerIsSet = MFALSE; + putil_fns->moal_stop_timer(putil_fns->pmoal_handle, + psapriv->GrpRekeytimer); + /**Reset Group Key*/ + memset(putil_fns, &pBssConfig->pGtkKeyBuf, 0x00, + sizeof(pBssConfig->pGtkKeyBuf)); + } +} + +/** + * @brief process received eapol packet + * + * @param psapriv A void pointer to phostsa private struct + * @param pbuf a pointer to packet buf + * @param len buffer len + * @ + * @return + */ +t_u8 +AuthenticatorProcessEapolPacket(t_void *psapriv, t_u8 *pbuf, t_u32 len) +{ + phostsa_private priv = (phostsa_private)psapriv; + hostsa_mlan_fns *pm_fns = &priv->mlan_fns; + EAPOL_KeyMsg_t *rx_eapol_ptr; + Status_e status = FAIL; + cm_Connection *connPtr = MNULL; + cm_Connection *pconnPtr = MNULL; + t_u8 *sta_addr = pbuf + MLAN_MAC_ADDR_LENGTH; + t_u8 ret = 0; + + ENTER(); + + rx_eapol_ptr = (EAPOL_KeyMsg_t *)(pbuf + ETHII_HEADER_LEN); + + if (rx_eapol_ptr->hdr_8021x.pckt_type != + IEEE_8021X_PACKET_TYPE_EAPOL_KEY) { + ret = 1; + return ret; + + } + + pm_fns->Hostsa_get_station_entry(priv->pmlan_private, sta_addr, + (t_void *)&pconnPtr); + connPtr = (cm_Connection *)pconnPtr; + if (connPtr) { + // rx_eapol_ptr = (EAPOL_KeyMsg_t *)(pbuf + ETHII_HEADER_LEN); + + if (rx_eapol_ptr->key_info.Error) { + ApMicCounterMeasureInvoke((t_void *)connPtr); + return ret; + } + + if (!isValidReplayCount(priv, &connPtr->staData.keyMgmtInfo, + (UINT8 *)&rx_eapol_ptr->replay_cnt[0])) + { + return ret; + } + + if (connPtr->staData.keyMgmtInfo.rom.keyMgmtState == + WAITING_4_MSG2) { + status = ProcessPWKMsg2(priv, connPtr, pbuf, len); + } else if (connPtr->staData.keyMgmtInfo.rom.keyMgmtState == + WAITING_4_MSG4) { + status = ProcessPWKMsg4(priv, connPtr, pbuf, len); + } else if ((connPtr->staData.keyMgmtInfo.rom.keyMgmtState + == WAITING_4_GRPMSG2) + || (connPtr->staData.keyMgmtInfo.rom.keyMgmtState + == WAITING_4_GRP_REKEY_MSG2)) { + status = ProcessGrpMsg2(priv, connPtr, pbuf, len); + } + } + LEAVE(); + return ret; +} + +/** + * @brief send eapol packet + * + * @param psapriv A void pointer to phostsa private struct + * @param pconnPtr a pointer to connection + * @ + * @return + */ +t_void +AuthenticatorSendEapolPacket(t_void *priv, t_void *pconnPtr) +{ + phostsa_private psapriv = (phostsa_private)priv; + cm_Connection *connPtr = (cm_Connection *)pconnPtr; + apInfo_t *pApInfo = &psapriv->apinfo; + + ENTER(); + /**check whether wpa/rsn is used*/ + if (!connPtr->staData.RSNEnabled) + return; + + /**init Mic error parameters*/ + initMicErrorParams(pApInfo->bssConfig.SecType.wpa, + &connPtr->staData.apMicError); + connPtr->staData.keyMgmtInfo.rom.keyMgmtState = MSG1_PENDING; + // If it is in **_pending state + if (((connPtr->staData.keyMgmtInfo.rom.keyMgmtState) & 0x1) != 0) { + GenerateApEapolMsg(psapriv, connPtr, + connPtr->staData.keyMgmtInfo.rom. + keyMgmtState); + + } + + LEAVE(); +} + +/** + * @brief get station security infor from (re)assocaite request + * + * @param priv A void pointer to phostsa private struct + * @param pconnPtr a pointer to connection + * @param pIe a pointer to associate request + * @param ieLen len of ie + * + * @return + */ +void +authenticator_get_sta_security_info(void *priv, + t_void *pconnPtr, t_u8 *pIe, t_u8 ieLen) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + cm_Connection *connPtr = (cm_Connection *)pconnPtr; + IEPointers_t iePointers; + IEEEtypes_StatusCode_t retcode; + + ENTER(); + + ieLen = GetIEPointers((t_void *)priv, pIe, ieLen, &iePointers); + + assocSrvAp_CheckSecurity(connPtr, iePointers.pWps, + iePointers.pRsn, iePointers.pWpa, + iePointers.pWapi, &retcode); + /* clean key */ + memset(util_fns, (t_u8 *)&connPtr->hskData, 0x00, + sizeof(eapolHskData_t)); + + LEAVE(); +} + +/** + * @brief initialize client + * + * @param priv A void pointer to phostsa private struct + * @param pconnPtr a pointer to pointer to connection + * @param mac a pointer to mac address + * + * @return + */ +void +authenticator_init_client(void *priv, void **ppconnPtr, t_u8 *mac) +{ + phostsa_private psapriv = (hostsa_private *)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + cm_Connection *connPtr = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + ret = malloc(util_fns, sizeof(cm_Connection), (t_u8 **)&connPtr); + if ((ret != MLAN_STATUS_SUCCESS) || (!connPtr)) { + PRINTM(MERROR, "%s: could not allocate hostsa_private.\n", + __FUNCTION__); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + memset(util_fns, connPtr, 0x00, sizeof(cm_Connection)); + connPtr->priv = priv; + memcpy(util_fns, connPtr->mac_addr, mac, MLAN_MAC_ADDR_LENGTH); + + util_fns->moal_init_timer(util_fns->pmoal_handle, &connPtr->HskTimer, + KeyMgmtHskTimeout, connPtr); + util_fns->moal_init_timer(util_fns->pmoal_handle, + &connPtr->staData.apMicTimer, + ApMicErrTimerExpCb, connPtr); + +done: + if (ret == MLAN_STATUS_SUCCESS) + *ppconnPtr = (void *)connPtr; + else + *ppconnPtr = MNULL; + LEAVE(); + +} + +/** + * @brief free client + * + * @param priv A void pointer to phostsa private struct + * @param pconnPtr a pointer to connection + * + * @return + */ +void +authenticator_free_client(void *priv, void *ppconnPtr) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + cm_Connection *connPtr = (cm_Connection *)ppconnPtr; + + ENTER(); + + if (connPtr) { + util_fns->moal_stop_timer(util_fns->pmoal_handle, + connPtr->HskTimer); + util_fns->moal_stop_timer(util_fns->pmoal_handle, + connPtr->staData.apMicTimer); + + util_fns->moal_free_timer(util_fns->pmoal_handle, + connPtr->HskTimer); + util_fns->moal_free_timer(util_fns->pmoal_handle, + connPtr->staData.apMicTimer); + free(util_fns, (t_u8 *)connPtr); + } + LEAVE(); +} +#endif + +/** + * @brief Init hostsa data + * + * @param pphostsa_priv A pointer to pointer to a hostsa private data structure + * @param psa_util_fns A pointer to hostsa utility functions table + * @param psa_mlan_fns A pointer to MLAN APIs table + * @param addr a pointer to address + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +supplicant_authenticator_init(t_void **pphostsa_priv, t_void *psa_util_fns, + t_void *psa_mlan_fns, t_u8 *addr) +{ + hostsa_util_fns *putil_fns = (hostsa_util_fns *)psa_util_fns; + hostsa_mlan_fns *pmlan_fns = (hostsa_mlan_fns *)psa_mlan_fns; + mlan_status ret; + hostsa_private *priv = MNULL; + + ENTER(); + + ret = malloc(putil_fns, sizeof(hostsa_private), (t_u8 **)&priv); + if ((ret != MLAN_STATUS_SUCCESS) || (!priv)) { + PRINTM(MERROR, "%s: could not allocate hostsa_private.\n", + __FUNCTION__); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + memset(putil_fns, priv, 0x00, sizeof(hostsa_private)); + memset(putil_fns, &priv->apinfo, 0x00, sizeof(apInfo_t)); + + memcpy(putil_fns, &priv->util_fns, putil_fns, sizeof(hostsa_util_fns)); + memcpy(putil_fns, &priv->mlan_fns, pmlan_fns, sizeof(hostsa_mlan_fns)); + + priv->pmlan_adapter = pmlan_fns->pmlan_adapter; + priv->pmlan_private = pmlan_fns->pmlan_private; + + memcpy(putil_fns, priv->curr_addr, addr, MLAN_MAC_ADDR_LENGTH); +#ifdef DRV_EMBEDDED_AUTHENTICATOR + putil_fns->moal_init_timer(putil_fns->pmoal_handle, + &priv->GrpRekeytimer, + KeyMgmtGrpRekeyCountUpdate, priv); + /**Bss configure initialize*/ + AuthenitcatorInitBssConfig(priv); +#endif +#ifdef DRV_EMBEDDED_SUPPLICANT + priv->suppData = MNULL; + allocSupplicantData(priv); + ret = initSupplicantTimer(priv); + if (ret != MLAN_STATUS_SUCCESS) { + goto done; + } + pmkCacheInit(priv); + pmkCacheRomInit(); + keyMgmtSta_RomInit(); +#endif + +done: + if (ret == MLAN_STATUS_SUCCESS) + *pphostsa_priv = (t_void *)priv; + else + *pphostsa_priv = MNULL; + LEAVE(); + return ret; +} + +/** + * @brief Cleanup hostsa data + * + * @param phostsa_priv A pointer to a hostsa private data structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +supplicant_authenticator_free(t_void *phostsa_priv) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + phostsa_private priv = (hostsa_private *)phostsa_priv; + hostsa_util_fns *putil_fns = &priv->util_fns; + + ENTER(); +#ifdef DRV_EMBEDDED_SUPPLICANT + freeSupplicantData(priv); + freeSupplicantTimer(priv); +#endif +#ifdef DRV_EMBEDDED_AUTHENTICATOR + putil_fns->moal_stop_timer(putil_fns->pmoal_handle, + priv->GrpRekeytimer); + putil_fns->moal_free_timer(putil_fns->pmoal_handle, + priv->GrpRekeytimer); +#endif + free(putil_fns, (t_u8 *)priv); + + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/authenticator_api.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/authenticator_api.h new file mode 100644 index 00000000..052ee759 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/authenticator_api.h @@ -0,0 +1,69 @@ +/** @file Authenticator_api.h + * + * @brief This file delare the main APIs for authenticator. + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _AUTHENTICATORAPI_H +#define _AUTHENTICATORAPI_H + +/****************************************************** +Change log: + 03/01/2014: Initial version +******************************************************/ +#ifdef DRV_EMBEDDED_AUTHENTICATOR +extern t_u8 IsAuthenticatorEnabled(void *priv); +extern void AuthenitcatorInitBssConfig(void *priv); +extern void AuthenticatorKeyMgmtInit(void *priv, t_u8 *addr); +extern void AuthenticatorkeyClear(void *priv); +extern void authenticator_init_client(void *priv, void **ppconnPtr, t_u8 *mac); +extern void authenticator_free_client(void *priv, void *ppconnPtr); +extern void authenticator_get_sta_security_info(void *priv, + t_void *pconnPtr, t_u8 *pIe, + t_u8 ieLen); +extern t_void AuthenticatorSendEapolPacket(t_void *priv, t_void *pconnPtr); +extern t_u8 AuthenticatorProcessEapolPacket(void *priv, t_u8 *pbuf, t_u32 len); +extern t_u8 AuthenticatorBssConfig(void *priv, t_u8 *pbss_config, t_u8 appendIE, + t_u8 clearIE, t_u8 SetConfigToMlan); +#endif +mlan_status supplicant_authenticator_init(t_void **pphostsa_priv, + t_void *psa_util_fns, + t_void *psa_mlan_fns, t_u8 *addr); +mlan_status supplicant_authenticator_free(t_void *phostsa_priv); +#ifdef DRV_EMBEDDED_SUPPLICANT +extern void supplicantClrEncryptKey(void *priv); +extern void *processRsnWpaInfo(void *priv, void *prsnwpa_ie); +extern void pmkCacheDeletePMK(void *priv, t_u8 *pBssid); +extern void supplicantInitSession(void *priv, + t_u8 *pSsid, + t_u16 len, t_u8 *pBssid, t_u8 *pStaAddr); +extern void supplicantStopSessionTimer(void *priv); +extern t_u8 supplicantIsEnabled(void *priv); +extern void supplicantQueryPassphraseAndEnable(void *priv, t_u8 *pbuf); +extern void supplicantDisable(void *priv); +extern t_u8 ProcessEAPoLPkt(void *priv, mlan_buffer *pmbuf); +extern void SupplicantClearPMK(void *priv, void *pPassphrase); +extern t_u16 SupplicantSetPassphrase(void *priv, void *pPassphraseBuf); +extern void SupplicantQueryPassphrase(void *priv, void *pPassphraseBuf); +extern t_u8 supplicantFormatRsnWpaTlv(void *priv, void *rsn_wpa_ie, + void *rsn_ie_tlv); +#endif +#endif /**_AUTHENTICATORAPI_H*/ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/IEEE_types.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/IEEE_types.h new file mode 100644 index 00000000..e98e2480 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/IEEE_types.h @@ -0,0 +1,3192 @@ +/** @file IEEE_types.h + * + * @brief This file contains definitions relating to messages specified in the + * IEEE 802.11 spec. + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _IEEE_TYPES_H_ +#define _IEEE_TYPES_H_ + +/*==========================================================================*/ +/* INCLUDE FILES */ +/*==========================================================================*/ +#include "wltypes.h" + +/*==========================================================================*/ +/* PUBLIC DEFINITIONS */ +/*==========================================================================*/ + +#define IS_BROADCAST(macaddr) ((*(UINT16 *)macaddr == 0xffff) && \ + (*(UINT16 *)((UINT8 *)macaddr+2) == 0xffff) && \ + (*(UINT16 *)((UINT8 *)macaddr+4) == 0xffff)) + +#define IS_MULTICAST(macaddr) ((*(UINT8*)macaddr & 0x01) == 0x01) + +#define IS_GROUP(macaddr) ((*(UINT8*)macaddr & 0x01) == 0x01) + +#define ADDR_NOT_EQUAL(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])) + +#define LLC_SNAP_SIZE 6 +#define ETHERTYPE_LEN 2 + +#define IEEE_MSG_TYPE(Hdr_p) ((Hdr_p)->FrmCtl.Type) +#define IEEE_MSG_SUBTYPE(Hdr_p) ((Hdr_p)->FrmCtl.Subtype) + +/*--------------------------------------------------------------*/ +/* Reason Codes - these codes are used in management message */ +/* frame bodies to indicate why an action is taking place (such */ +/* as a disassociation or deauthentication). */ +/*--------------------------------------------------------------*/ +#define IEEEtypes_REASON_RSVD 0 +#define IEEEtypes_REASON_UNSPEC 1 +#define IEEEtypes_REASON_PRIOR_AUTH_INVALID 2 +#define IEEEtypes_REASON_DEAUTH_LEAVING 3 +#define IEEEtypes_REASON_DISASSOC_INACTIVE 4 +#define IEEEtypes_REASON_DISASSOC_AP_BUSY 5 +#define IEEEtypes_REASON_CLASS2_NONAUTH 6 +#define IEEEtypes_REASON_CLASS3_NONASSOC 7 +#define IEEEtypes_REASON_DISASSOC_STA_HASLEFT 8 +#define IEEEtypes_REASON_CANT_ASSOC_NONAUTH 9 +/***************802.11h Reasons***************/ +#define IEEEtypes_REASON_DISASSOC_BAD_POWERCAP 10 +#define IEEEtypes_REASON_DISASSOC_BAD_SUPPCHAN 11 +/***************802.11v Reasons***************/ +#define IEEEtypes_REASON_BSS_TRANSITION_MGMT 12 +/***************WPA Reasons*******************/ +#define IEEEtypes_REASON_INVALID_IE 13 +#define IEEEtypes_REASON_MIC_FAILURE 14 +#define IEEEtypes_REASON_4WAY_HANDSHK_TIMEOUT 15 +#define IEEEtypes_REASON_GRP_KEY_UPD_TIMEOUT 16 +#define IEEEtypes_REASON_IE_4WAY_DIFF 17 +#define IEEEtypes_REASON_INVALID_MCAST_CIPHER 18 +#define IEEEtypes_REASON_INVALID_UNICAST_CIPHER 19 +#define IEEEtypes_REASON_INVALID_AKMP 20 +#define IEEEtypes_REASON_UNSUPT_RSN_VER 21 +#define IEEEtypes_REASON_INVALID_RSN_CAP 22 +#define IEEEtypes_REASON_8021X_AUTH_FAIL 23 +#define IEEEtypes_REASON_CIPHER_POLICY_REJECT 24 +/*************** 802.11z(TDLS) Reasons*************/ +#define IEEEtypes_REASON_TDLS_TEARDOWN_TDLSPEER_UNREACHABLE 25 +#define IEEEtypes_REASON_TDLS_TEARDOWN_UNSPEC 26 +/***************802.11e Reasons***************/ +#define IEEEtypes_REASON_DISASSOC_UNSPEC_QOS 32 +#define IEEEtypes_REASON_DISASSOC_QAP_NO_BNDWDTH 33 +#define IEEEtypes_REASON_DISASSOC_FRM_LOSS_BAD_CH 34 +#define IEEEtypes_REASON_DISASSOC_QSTA_VIOL_TXOP 35 +#define IEEEtypes_REASON_REQ_PEER_LEAVE_QBSS 36 +#define IEEEtypes_REASON_REQ_PEER_NO_THANKS 37 +#define IEEEtypes_REASON_REQ_PEER_ACM_MISMATCH 38 +#define IEEEtypes_REASON_REQ_PEER_TIMEOUT 39 +#define IEEEtypes_REASON_PEER_QSTA_NO_SUPP_CIPHER 45 +/*********************************************/ + +/*------------------------------------------------------------*/ +/* Status Codes - these codes are used in management message */ +/* frame bodies to indicate the results of an operation (such */ +/* as association, reassociation, and authentication). */ +/*------------------------------------------------------------*/ +#define IEEEtypes_STATUS_SUCCESS 0 +#define IEEEtypes_STATUS_UNSPEC_FAILURE 1 + +/****************BEGIN: 802.11z(TDLS) status codes********/ +#define IEEEtypes_STATUS_TDLS_WAKEUPSCHEDULE_REJECTED_BUT_ALT_PROVIDED 2 +#define IEEEtypes_STATUS_TDLS_WAKEUPSCHEDULE_REJECTED 3 +#define IEEEtypes_STATUS_SECURITY_DISABLED 5 +#define IEEEtypes_STATUS_UNACCEPTABLE_LIFETIME 6 +#define IEEEtypes_STATUS_NOT_IN_SAME_BSS 7 +/****************END: 802.11z(TDLS) status codes********/ +#define IEEEtypes_STATUS_CAPS_UNSUPPORTED 10 +#define IEEEtypes_STATUS_REASSOC_NO_ASSOC 11 +#define IEEEtypes_STATUS_ASSOC_DENIED_UNSPEC 12 +#define IEEEtypes_STATUS_UNSUPPORTED_AUTHALG 13 +#define IEEEtypes_STATUS_RX_AUTH_NOSEQ 14 +#define IEEEtypes_STATUS_CHALLENGE_FAIL 15 +#define IEEEtypes_STATUS_AUTH_TIMEOUT 16 +#define IEEEtypes_STATUS_ASSOC_DENIED_BUSY 17 +#define IEEEtypes_STATUS_ASSOC_DENIED_RATES 18 +#define IEEEtypes_STATUS_ASSOC_DENIED_NOSHORT 19 +#define IEEEtypes_STATUS_ASSOC_DENIED_NOPBCC 20 +#define IEEEtypes_STATUS_ASSOC_DENIED_NOAGILITY 21 +#define IEEEtypes_STATUS_ASSOC_DENIED_SPECMGMT_REQD 22 +#define IEEEtypes_STATUS_ASSOC_DENIED_BAD_POWERCAP 23 +#define IEEEtypes_STATUS_ASSOC_DENIED_BAD_SUPPCHAN 24 +#define IEEEtypes_STATUS_ASSOC_DENIED_NOSHORTSLOTTIME 25 +#define IEEEtypes_STATUS_ASSOC_DENIED_NODSSSOFDM 26 + +#define IEEEtypes_STATUS_R0KH_UNAVAILABLE 28 + +#define IEEEtypes_STATUS_TEMP_REJECTION 30 +#define IEEEtypes_STATUS_ROBUST_MGMT_VIOLAION 31 +#define IEEEtypes_STATUS_UNSPEC_QOS_FAILURE 32 +#define IEEEtypes_STATUS_ASSOC_DENIED_QAP_INSUFF_BNDWDTH 33 +#define IEEEtypes_STATUS_ASSOC_DENIED_EXC_FRM_LOSS_BAD_CH 34 +#define IEEEtypes_STATUS_ASSOC_DENIED_STA_NO_QOS_SUPP 35 + +#define IEEEtypes_STATUS_REQ_DECLINED 37 +#define IEEEtypes_STATUS_REQ_FAIL_INVALID_PARAMS 38 +#define IEEEtypes_STATUS_FAIL_TS_AP_THINKS_ITS_SMART_THO 39 +#define IEEEtypes_STATUS_INVALID_IE 40 +#define IEEEtypes_STATUS_INVALID_GROUP_CIPHER 41 +#define IEEEtypes_STATUS_INVALID_PAIRWISE_CIPHER 42 +#define IEEEtypes_STATUS_INVALID_AKMP 43 +#define IEEEtypes_STATUS_UNSUPPORTED_RSN_VER 44 +#define IEEEtypes_STATUS_INVALID_RSN_CAPABILITIES 45 +#define IEEEtypes_STATUS_CIPHER_POLICY_REJECT 46 +#define IEEEtypes_STATUS_FAIL_TS_TRY_LATER_AFTER_TS_DELAY 47 +#define IEEEtypes_STATUS_DIRECT_LINK_NOT_ALLOWED 48 +#define IEEEtypes_STATUS_DEST_STA_NOT_IN_QBSS 49 +#define IEEEtypes_STATUS_DEST_STA_NOT_A_QSTA 50 +#define IEEEtypes_STATUS_LISTEN_INTERVAL_TOO_LARGE 51 +#define IEEEtypes_STATUS_INVALID_FT_ACT_FRAME_COUNT 52 +#define IEEEtypes_STATUS_INVALID_PMKID 53 +#define IEEEtypes_STATUS_INVALID_MDIE 54 +#define IEEEtypes_STATUS_INVALID_FTIE 55 +#define IEEEtypes_STATUS_REQ_TCLAS_NOT_SUPPORTED 56 +#define IEEEtypes_STATUS_INSF_TCLAS_RSOURCES 57 +#define IEEEtypes_STATUS_TS_FAIL_TRANS_SUGGESTED 58 +#define IEEEtypes_STATUS_UAPSD_COEX_NOT_SUPPORTED 59 +#define IEEEtypes_STATUS_REQ_UAPSD_COEX_MODE_NOT_SUP 60 +#define IEEEtypes_STATUS_REQ_INVL_WITH_UAPSD_COEX_NOT_SUP 61 +#define IEEEtypes_STATUS_INVALID_CONTENTS_OF_RSNIE 72 + +/*--------------------------------------------*/ +/* Various sizes used in IEEE 802.11 messages */ +/*--------------------------------------------*/ +#define IEEEtypes_ADDRESS_SIZE 6 +#define IEEEtypes_BITMAP_SIZE 251 +#define IEEEtypes_CHALLENGE_TEXT_SIZE 128 +#define IEEEtypes_CHALLENGE_TEXT_LEN 128 +#define IEEEtypes_MAX_DATA_RATES 8 +#define IEEEtypes_MAX_DATA_BODY_LEN 2312 +#define IEEEtypes_MAX_MGMT_BODY_LEN 2312 +#define IEEEtypes_SSID_SIZE 32 +#define IEEEtypes_TIME_STAMP_SIZE 8 +#define IEEEtypes_MAX_CHANNELS 14 +#define IEEEtypes_MAX_BSS_DESCRIPTS 16 +#define IEEEtypes_MAX_DATA_RATES_G 14 +#define IEEEtypes_COUNTRY_CODE_SIZE 3 +#define IEEEtypes_COUNTRY_MAX_TRIPLETS 83 + +/*---------------------------------------------------------------------*/ +/* Define masks used to extract fields from the capability information */ +/* structure in a beacon message. */ +/*---------------------------------------------------------------------*/ +#define IEEEtypes_CAP_INFO_ESS 1 +#define IEEEtypes_CAP_INFO_IBSS 2 +#define IEEEtypes_CAP_INFO_CF_POLLABLE 4 +#define IEEEtypes_CAP_INFO_CF_POLL_RQST 8 +#define IEEEtypes_CAP_INFO_PRIVACY 16 +#define IEEEtypes_CAP_INFO_SHORT_PREAMB 32 +#define IEEEtypes_CAP_INFO_PBCC 64 +#define IEEEtypes_CAP_INFO_CHANGE_AGILITY 128 +#define IEEEtypes_CAP_INFO_SHORT_SLOT_TIME 0x0400 +#define IEEEtypes_CAP_INFO_DSSS_OFDM 0x2000 + +/*---------------------------*/ +/* Miscellaneous definitions */ +/*---------------------------*/ +#define IEEEtypes_PROTOCOL_VERSION 0 + +#define IEEEtypes_BASIC_RATE_FLAG 0x80 +/* */ +/* Used to determine which rates in a list are designated as basic rates */ +/* */ + +#define IEEEtypes_SUPP_RATE_MASK 0x7F + +#define IEEE_DATA_RATE_1Mbps 2 +#define IEEE_DATA_RATE_2Mbps 4 +#define IEEE_DATA_RATE_5_5Mbps 11 +#define IEEE_DATA_RATE_11Mbps 22 + +#define IEEE_DATA_RATE_6Mbps 12 +#define IEEE_DATA_RATE_9Mbps 18 +#define IEEE_DATA_RATE_12Mbps 24 +#define IEEE_DATA_RATE_18Mbps 36 +#define IEEE_DATA_RATE_24Mbps 48 +#define IEEE_DATA_RATE_36Mbps 72 +#define IEEE_DATA_RATE_48Mbps 96 +#define IEEE_DATA_RATE_54Mbps 108 + +/* */ +/* Used to mask off the basic rate flag, if one exists, for given */ +/* data rates */ +/* */ + +#define IEEEtypes_RATE_MIN 2 +/* */ +/* The minimum allowable data rate in units of kb/s */ +/* */ + +#define IEEEtypes_RATE_MAX 127 +/* */ +/* The maximum allowable data rate in units of kb/s */ +/* */ + +#define IEEEtypes_TIME_UNIT 1024 +/* */ +/* The number of microseconds in 1 time unit, as specified in the */ +/* 802.11 spec */ +/* */ +#define CONVERT_TU_TO_MILLISECOND(x) (x * 1024 / 1000) +#define CONVERT_TU_TO_MICROSECOND(x) (x * 1024) + +/** + * 802.11 frame classes + */ +#define IEEEtypes_CLASS1_FRAME 1 +#define IEEEtypes_CLASS2_FRAME 2 +#define IEEEtypes_CLASS3_FRAME 3 + +/* + * Structure of an internet header, naked of options. + * + * ip_len and ip_off are sint16, rather than UINT16 + * pragmatically since otherwise unsigned comparisons can result + * against negative integers quite easily, and fail in subtle ways. + */ +typedef MLAN_PACK_START struct { +#if 1 // BYTE_ORDER == LITTLE_ENDIAN + UINT8 ip_hl:4; /* header length */ + UINT8 ip_v:4; /* version */ +#endif + UINT8 ip_tos; /* type of service */ + sint16 ip_len; /* total length */ + UINT16 ip_id; /* identification */ + sint16 ip_off; /* fragment offset field */ + UINT8 ip_ttl; /* time to live */ + UINT8 ip_p; /* protocol */ + UINT16 ip_sum; /* checksum */ + UINT32 ip_src; // source ip addr + UINT32 ip_dst; // dest ip address +} MLAN_PACK_END ip_hdr_t; +#define IP_DF 0x4000 /* dont fragment flag */ +#define IP_MF 0x2000 /* more fragments flag */ +#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */ + +#define IP_V4 4 +#define IP_V6 6 +#define IP_PROT_TCP 0x06 +#define IP_PROT_UDP 0x11 + +typedef MLAN_PACK_START struct { + UINT8 priority:4; + UINT8 ip_v:4; + UINT8 flow_lbl[3]; + UINT16 payload_len; + UINT8 next_hdr; + UINT8 hop_limit; + UINT8 ip_src[16]; /* source ip addr */ + UINT8 ip_dst[16]; /* dest ip address */ +} MLAN_PACK_END ipv6_hdr_t; + +#define ETHTYPE_ARP 0x0806 +#define ETHTYPE_IP 0x0800 +#define ARP_OP_REQ 1 +#define ARP_OP_RESP 2 +#define ETHTYPE_IPV6 0x86DD +#define ICMPV6_TYPE 0x3a + +/* See RFC 826 for ARP protocol description. */ +typedef MLAN_PACK_START struct { + UINT16 ar_hrd; // hardware address space + UINT16 ar_pro; // prototcol address space + UINT8 ar_hln; // byte length of hardware addr + UINT8 ar_pln; // byte length of protocol addr + UINT16 ar_op; // ARP opcode +} MLAN_PACK_END arp_hdr_t; + +typedef MLAN_PACK_START struct { + arp_hdr_t hdr; // arp header + UINT8 ar_sha[IEEEtypes_ADDRESS_SIZE]; // sender hardware addr + UINT8 ar_spa[4]; // sender protocol addr + UINT8 ar_tha[IEEEtypes_ADDRESS_SIZE]; // target hardware addr + UINT8 ar_tpa[4]; // target protocol addr +} MLAN_PACK_END arp_t; + +/* icmp header struct of echo request and echo reply */ +typedef MLAN_PACK_START struct { + UINT8 type; + UINT8 code; + UINT16 sum; + UINT16 id; + UINT16 seq; +} MLAN_PACK_END icmp_hdr_t; +#define ICMP_ECHO_REQ 8 +#define ICMP_ECHO_REPLY 0 + +typedef MLAN_PACK_START struct { + UINT8 type; + UINT8 icode; + UINT16 csum; + UINT32 reserved; + UINT8 target_addr[16]; +} MLAN_PACK_END icmpv6_nsol_t; +#define ICMPV6_TYPE_NSOL 0x87 +#define ICMPV6_TYPE_NADV 0x88 + +#define ICMPV6_NADV_FLAG_RTR (1<<31) +#define ICMPV6_NADV_FLAG_SOL (1<<30) +#define ICMPV6_NADV_FLAG_OVR (1<<29) + +#define ICMPV6_OPT_TYPE_TLA (0x2) +#define ICMPV6_OPT_TYPE_TLA_LEN (0x1) + +typedef MLAN_PACK_START struct { + UINT8 type; + UINT8 icode; + UINT16 csum; + UINT32 reserved; + UINT8 target_addr[16]; + UINT8 icmp_option_type; + UINT8 icmp_option_length; + UINT8 macAddr[6]; +} MLAN_PACK_END icmpv6_nadv_t; + +/* +***************************************************************************** +** +** +** 802.1x Types +** +** +***************************************************************************** +*/ +typedef MLAN_PACK_START enum { + IEEE_8021X_PACKET_TYPE_EAP_PACKET = 0, + IEEE_8021X_PACKET_TYPE_EAPOL_START = 1, + IEEE_8021X_PACKET_TYPE_EAPOL_LOGOFF = 2, + IEEE_8021X_PACKET_TYPE_EAPOL_KEY = 3, + IEEE_8021X_PACKET_TYPE_ASF_ALERT = 4, + +} MLAN_PACK_END IEEEtypes_8021x_PacketType_e; + +typedef MLAN_PACK_START enum { + IEEE_8021X_CODE_TYPE_REQUEST = 1, + IEEE_8021X_CODE_TYPE_RESPONSE = 2, + IEEE_8021X_CODE_TYPE_SUCCESS = 3, + IEEE_8021X_CODE_TYPE_FAILURE = 4, + +} MLAN_PACK_END IEEEtypes_8021x_CodeType_e; + +/* +***************************************************************************** +** +** +** 802.11 PHY Types +** +** +***************************************************************************** +*/ +typedef MLAN_PACK_START enum { + IEEE_PHY_TYPE_UNKNOWN = 0, + + IEEE_PHY_TYPE_FHSS_2_4_GHz = 1, + IEEE_PHY_TYPE_DSSS_2_4_GHz = 2, + IEEE_PHY_TYPE_IR_BASEBAND = 3, + IEEE_PHY_TYPE_OFDM_5GHz = 4, + IEEE_PHY_TYPE_HRDSSS = 5, + IEEE_PHY_TYPE_ERP = 6, + +} MLAN_PACK_END IEEEtypes_PhyType_e; + +/* +***************************************************************************** +** +** +** 802.11 Message Types +** +** +***************************************************************************** +*/ +typedef enum { + IEEE_TYPE_MANAGEMENT = 0, + IEEE_TYPE_CONTROL, + IEEE_TYPE_DATA +} IEEEtypes_MsgType_e; + +/* +***************************************************************************** +** +** +** 802.11 Mangagement SubTypes +** +** +***************************************************************************** +*/ +typedef enum { + IEEE_MSG_ASSOCIATE_RQST = 0, + IEEE_MSG_ASSOCIATE_RSP, + IEEE_MSG_REASSOCIATE_RQST, + IEEE_MSG_REASSOCIATE_RSP, + IEEE_MSG_PROBE_RQST, + IEEE_MSG_PROBE_RSP, + IEEE_MSG_BEACON = 8, + IEEE_MSG_ATIM, + IEEE_MSG_DISASSOCIATE, + IEEE_MSG_AUTHENTICATE, + IEEE_MSG_DEAUTHENTICATE, + IEEE_MSG_ACTION +} IEEEtypes_MgmtSubType_e; + +/* +***************************************************************************** +** +** +** 802.11 Control Frame SubTypes +** +** +***************************************************************************** +*/ +typedef enum { + BF_RPRT_POLL = 4, + NDPA = 5, + BAR = 8, + BA = 9, + PS_POLL = 10, + RTS = 11, + CTS = 12, + ACK = 13, + CF_END = 14, + CF_END_CF_ACK = 15, +} IEEEtypes_CtlSubType_e; + +/* +***************************************************************************** +** +** +** 802.11 Data Frame SubTypes +** +** +***************************************************************************** +*/ +typedef enum { + DATA = 0, + DATA_CF_ACK = 1, + DATA_CF_POLL = 2, + DATA_CF_ACK_CF_POLL = 3, + NULL_DATA = 4, + CF_ACK = 5, + CF_POLL = 6, + CF_ACK_CF_POLL = 7, + QOS_DATA = 8, + QOS_DATA_CF_ACK = 9, + QOS_DATA_CF_POLL = 10, + QOS_DATA_CF_ACK_CF_POLL = 11, + QOS_NULL = 12, + RESERVED_13 = 13, + QOS_CF_POLL_NO_DATA = 14, + QOS_CF_ACK_CF_POLL_NO_DATA = 15 +} IEEEtypes_DataSubType_e; + +/* +***************************************************************************** +** +** +** 802.11 Action Frame Categories +** +** +***************************************************************************** +*/ +typedef MLAN_PACK_START enum { + IEEE_MGMT_ACTION_CATEGORY_SPECTRUM_MGMT = 0, + IEEE_MGMT_ACTION_CATEGORY_QOS = 1, + IEEE_MGMT_ACTION_CATEGORY_DLS = 2, + IEEE_MGMT_ACTION_CATEGORY_BLOCK_ACK = 3, + IEEE_MGMT_ACTION_CATEGORY_UNPROTECT_PUBLIC = 4, + IEEE_MGMT_ACTION_CATEGORY_RADIO_RSRC = 5, + IEEE_MGMT_ACTION_CATEGORY_FAST_BSS_TRANS = 6, + IEEE_MGMT_ACTION_CATEGORY_HT = 7, + IEEE_MGMT_ACTION_CATEGORY_SA_QUERY = 8, + IEEE_MGMT_ACTION_CATEGORY_PROTECT_PUBLIC = 9, + IEEE_MGMT_ACTION_CATEGORY_PROTECT_WNM = 10, + IEEE_MGMT_ACTION_CATEGORY_UNPROTECT_WNM = 11, + IEEE_MGMT_ACTION_CATEGORY_TDLS = 12, + + IEEE_MGMT_ACTION_CATEGORY_WMM_TSPEC = 17, + IEEE_MGMT_ACTION_CATEGORY_VHT = 21, + IEEE_MGMT_ACTION_CATEGORY_PROTECT_VENDOR_SPECIFIC = 126, + IEEE_MGMT_ACTION_CATEGORY_VENDOR_SPECIFIC = 127 +} MLAN_PACK_END IEEEtypes_ActionCategory_e; + +/* +** The possible types of commands sent from the SME +*/ +typedef enum { + SME_CMD_NONE, + + SME_CMD_AUTHENTICATE, + SME_CMD_ASSOCIATE, + SME_CMD_REASSOCIATE, + + SME_CMD_DEAUTHENTICATE, + SME_CMD_DISASSOCIATE, + + SME_CMD_START, + SME_CMD_JOIN, + + SME_CMD_RESET, + SME_CMD_SCAN, + +} IEEEtypes_SmeCmd_e; + +/* +** The possible types of Basic Service Sets +*/ +typedef enum { + BSS_INFRASTRUCTURE = 1, + BSS_INDEPENDENT, + BSS_ANY, + BSS_TDLS, + // Firmware internal BSS types only + BSS_BT_AMP = 0xF0, + BSS_LAST = 0xFF +} IEEEtypes_Bss_e; + +/* +** 802.11 Element and Subelement IDs +*/ +typedef MLAN_PACK_START enum { + ELEM_ID_SSID = 0, + ELEM_ID_SUPPORTED_RATES = 1, + ELEM_ID_FH_PARAM_SET = 2, + ELEM_ID_DS_PARAM_SET = 3, + ELEM_ID_CF_PARAM_SET = 4, + ELEM_ID_TIM = 5, + ELEM_ID_IBSS_PARAM_SET = 6, + ELEM_ID_COUNTRY = 7, + ELEM_ID_HOP_PARAM = 8, + ELEM_ID_HOP_TABLE = 9, + ELEM_ID_REQUEST = 10, + ELEM_ID_BSS_LOAD = 11, + ELEM_ID_EDCA_PARAM_SET = 12, + ELEM_ID_TSPEC = 13, + ELEM_ID_TCLAS = 14, + ELEM_ID_SCHEDULE = 15, + ELEM_ID_CHALLENGE_TEXT = 16, + + ELEM_ID_POWER_CONSTRAINT = 32, + ELEM_ID_POWER_CAPABILITY = 33, + ELEM_ID_TPC_REQUEST = 34, + ELEM_ID_TPC_REPORT = 35, + ELEM_ID_SUPPORTED_CHANNELS = 36, + ELEM_ID_CHANNEL_SWITCH_ANN = 37, + ELEM_ID_MEASUREMENT_REQ = 38, + ELEM_ID_MEASUREMENT_RPT = 39, + ELEM_ID_QUIET = 40, + ELEM_ID_IBSS_DFS = 41, + ELEM_ID_ERP_INFO = 42, + ELEM_ID_TS_DELAY = 43, + ELEM_ID_TCLAS_PROCESS = 44, + ELEM_ID_HT_CAPABILITY = 45, + ELEM_ID_QOS_CAPABILITY = 46, + + ELEM_ID_RSN = 48, + + ELEM_ID_EXT_SUPPORTED_RATES = 50, + ELEM_ID_AP_CHANNEL_REPORT = 51, + ELEM_ID_NEIGHBOR_REPORT = 52, + ELEM_ID_RCPI = 53, + ELEM_ID_MOBILITY_DOMAIN = 54, + ELEM_ID_FAST_BSS_TRANS = 55, + ELEM_ID_TIMEOUT_INTERVAL = 56, + ELEM_ID_RIC_DATA = 57, + ELEM_ID_DSE_REGISTERED_LOC = 58, + ELEM_ID_SUPPORTED_REGCLASS = 59, + ELEM_ID_EXT_CHAN_SWITCH_ANN = 60, + ELEM_ID_HT_INFORMATION = 61, + ELEM_ID_SECONDARY_CHAN_OFFSET = 62, + ELEM_ID_BSS_ACCESS_DELAY = 63, + ELEM_ID_ANTENNA_INFO = 64, + ELEM_ID_RSNI = 65, + ELEM_ID_MEAS_PILOT_TX_INFO = 66, + ELEM_ID_BSS_AVAIL_ADM_CAP = 67, + ELEM_ID_BSS_AC_ACCESS_DELAY = 68, + + ELEM_ID_RRM_ENABLED_CAP = 70, + ELEM_ID_MULTI_BSSID = 71, + ELEM_ID_2040_BSS_COEXISTENCE = 72, + ELEM_ID_2040_BSS_INTOL_CHRPT = 73, + ELEM_ID_OBSS_SCAN_PARAM = 74, + ELEM_ID_RIC_DESCRIPTOR = 75, + ELEM_ID_MANAGEMENT_MIC = 76, + + ELEM_ID_EVENT_REQUEST = 78, + ELEM_ID_EVENT_REPORT = 79, + ELEM_ID_DIAG_REQUEST = 80, + ELEM_ID_DIAG_REPORT = 81, + ELEM_ID_LOCATION_PARAM = 82, + ELEM_ID_NONTRANS_BSSID_CAP = 83, + ELEM_ID_SSID_LIST = 84, + ELEM_ID_MBSSID_INDEX = 85, + ELEM_ID_FMS_DESCRIPTOR = 86, + ELEM_ID_FMS_REQUEST = 87, + ELEM_ID_FMS_RESPONSE = 88, + ELEM_ID_QOS_TRAFFIC_CAP = 89, + ELEM_ID_BSS_MAX_IDLE_PERIOD = 90, + ELEM_ID_TFS_REQUEST = 91, + ELEM_ID_TFS_RESPONSE = 92, + ELEM_ID_WNM_SLEEP_MODE = 93, + ELEM_ID_TIM_BCAST_REQUEST = 94, + ELEM_ID_TIM_BCAST_RESPONSE = 95, + ELEM_ID_COLLOC_INTF_REPORT = 96, + ELEM_ID_CHANNEL_USAGE = 97, + ELEM_ID_TIME_ZONE = 98, + ELEM_ID_DMS_REQUEST = 99, + ELEM_ID_DMS_RESPONSE = 100, + ELEM_ID_LINK_ID = 101, + ELEM_ID_WAKEUP_SCHEDULE = 102, + ELEM_ID_TDLS_CS_TIMING = 104, + ELEM_ID_PTI_CONTROL = 105, + ELEM_ID_PU_BUFFER_STATUS = 106, + + ELEM_ID_EXT_CAPABILITIES = 127, + ELEM_ID_VHT_CAPABILITIES = 191, + ELEM_ID_VHT_OPERATION = 192, + ELEM_ID_WIDE_BAND_CHAN_SW = 193, + ELEM_ID_AID = 197, + ELEM_ID_VHT_OP_MODE_NOTIFICATION = 199, + + ELEM_ID_VENDOR_SPECIFIC = 221, + + /* Subelement IDs */ + SUBELEM_ID_REPORTED_FRAME_BODY = 1, + SUBELEM_ID_REPORTING_DETAIL = 2, + + SUBELEM_ID_PMK_R1_KEY_HOLDER_ID = 1, + SUBELEM_ID_GTK = 2, + SUBELEM_ID_PMK_R0_KEY_HOLDER_ID = 3, + SUBELEM_ID_IGTK = 4, + + /* Non-IEEE IDs */ + ELEM_ID_WAPI = 68, + +} MLAN_PACK_END IEEEtypes_ElementId_e; + +/* The KDE data types */ +typedef enum { + KDE_DATA_TYPE_RESERVED, + KDE_DATA_TYPE_GTK = 1, + KDE_DATA_TYPE_RESERVED2, + KDE_DATA_TYPE_MACADDR = 3, + KDE_DATA_TYPE_PMKID = 4, + KDE_DATA_TYPE_SMK = 5, + KDE_DATA_TYPE_NONCE = 6, + KDE_DATA_TYPE_LIFETIME = 7, + KDE_DATA_TYPE_ERROR = 8, + KDE_DATA_TYPE_IGTK = 9 +} IEEEtypes_KDEDataType_e; + +/* The possible power management modes */ +typedef enum { + PWR_MODE_ACTIVE, + PWR_MODE_PWR_SAVE +} IEEEtypes_PwrMgmtMode_e; + +/* The possible types of authentication */ +typedef enum { + AUTH_OPEN_SYSTEM = 0, + AUTH_SHARED_KEY = 1, + AUTH_FAST_BSS_TRANSITION = 2, + + AUTH_NETWORK_EAP = 0x80, + + AUTH_NOT_SUPPORTED, + + AUTH_AUTO_OPEN_OR_SHARED = 0xFF +} IEEEtypes_AuthType_e; + +/* The possible responses to a request to scan */ +typedef enum { + SCAN_RESULT_SUCCESS, + SCAN_RESULT_INVALID_PARAMETERS, + SCAN_RESULT_INTERNAL_ERROR, + SCAN_RESULT_PARTIAL_RESULTS, + +} IEEEtypes_ScanResult_e; + +/* The possible responses to a request to join a BSS */ +typedef enum { + JOIN_RESULT_SUCCESS, + JOIN_RESULT_INTERNAL_ERROR, + JOIN_RESULT_TIMEOUT +} IEEEtypes_JoinResult_e; + +/* The possible results to a request to authenticate */ +typedef enum { + AUTH_RESULT_SUCCESS, + AUTH_RESULT_INTERNAL_ERROR, + AUTH_RESULT_TIMEOUT, + AUTH_RESULT_UNUSED, /* Do not reuse, maps to refused assoc result */ + AUTH_RESULT_UNHANDLED_MSG, + AUTH_RESULT_REFUSED, + AUTH_RESULT_INVALID_PARAMETER +} IEEEtypes_AuthResult_e; + +/* The possible results to a request to deauthenticate */ +typedef enum { + DEAUTH_RESULT_SUCCESS, + DEAUTH_RESULT_INVALID_PARAMETERS, + DEAUTH_RESULT_TOO_MANY_SIMULTANEOUS_RQSTS, + DEAUTH_RESULT_TIMEOUT +} IEEEtypes_DeauthResult_e; + +/* The possible results to a request to associate */ +typedef enum { + ASSOC_RESULT_SUCCESS, + ASSOC_RESULT_INTERNAL_ERROR, + ASSOC_RESULT_TIMEOUT, + ASSOC_RESULT_REFUSED, + ASSOC_RESULT_AUTH_UNHANDLED_MSG, + ASSOC_RESULT_AUTH_REFUSED, + ASSOC_RESULT_INVALID_PARAMETER, + +} IEEEtypes_AssocResult_e; + +typedef enum { + /* Failure enumerations must be non-zero since they map to the * IEEE + status field in the assoc response. The SUCCESS code is left * in + here as a place holder but is never used. The remaining enums * + cannot be assigned a value of 0. */ + ASSOC_CMD_SUCCESS = 0, + + ASSOC_CMD_FAILURE_ASSOC, + ASSOC_CMD_FAILURE_AUTH, + ASSOC_CMD_FAILURE_JOIN +} IEEEtypes_AssocCmdFailurePoint_e; + +typedef enum { + DISASSOC_RESULT_SUCCESS, + DISASSOC_RESULT_INVALID_PARAMETERS, + DISASSOC_RESULT_TIMEOUT, + DISASSOC_RESULT_REFUSED +} IEEEtypes_DisassocResult_e; +/* */ +/* The possible results to a request to disassociate */ +/* */ + +typedef enum { + PWR_MGMT_RESULT_SUCCESS, + PWR_MGMT_RESULT_INVALID_PARAMETERS, + PWR_MGMT_RESULT_NOT_SUPPORTED +} IEEEtypes_PwrMgmtResult_e; +/* */ +/* The possible results to a request to change the power management mode */ +/* */ + +typedef enum { + RESET_RESULT_SUCCESS +} IEEEtypes_ResetResult_e; +/* */ +/* The possible results to a request to reset */ +/* */ + +typedef enum { + START_RESULT_SUCCESS, + START_RESULT_INVALID_PARAMETERS, + START_RESULT_BSS_ALREADY_STARTED_OR_JOINED, + START_RESULT_RESET_REQUIRED_BEFORE_START, + START_RESULT_NOT_SUPPORTED, + START_RESULT_ACS_ENABLED +} IEEEtypes_StartResult_e; +/* */ +/* The possible results to a request to start */ +/* */ + +typedef enum { + TPCADAPT_RESULT_SUCCESS, + TPCADAPT_RESULT_INVALID_PARAMETERS, + TPCADAPT_RESULT_UNSPECIFIED_FAILURE +} IEEEtypes_TPCAdaptResult_e; + +typedef enum { + STATE_IDLE, + STATE_SCANNING, + STATE_JOINING, + + STATE_ASSOCIATING, + STATE_ASSOCIATED, + STATE_ROAMING, + + STATE_IBSS_ACTIVE, + STATE_BSS_ACTIVE, + STATE_TDLS_SETUP_REQ_RCVD, + STATE_TDLS_SETUP_REQ_SENT, + STATE_TDLS_SETUP_RSP_SENT, + STATE_TDLS_ACTIVE, +} IEEEtypes_MacMgmtStates_e; + +/* */ +/* The possible states the MAC Management Service Task can be in */ +/* */ + +/*---------------------------------------------------------------------------*/ +/* Types Used In IEEE 802.11 MAC Message Data Structures */ +/*---------------------------------------------------------------------------*/ +typedef UINT8 IEEEtypes_Len_t; +/* */ +/* Length type */ +/* */ + +typedef UINT8 IEEEtypes_Addr_t; +/* */ +/* Address type */ +/* */ + +typedef IEEEtypes_Addr_t IEEEtypes_MacAddr_t[IEEEtypes_ADDRESS_SIZE]; +/* */ +/* MAC address type */ +/* */ + +typedef UINT8 IEEEtypes_DataRate_t; +/* */ +/* Type used to specify the supported data rates */ +/* */ + +typedef UINT8 IEEEtypes_SsId_t[IEEEtypes_SSID_SIZE]; +/* */ +/* SS ID type */ +/* */ + +/*---------------------------------------------------------------------------*/ +/* IEEE 802.11 MAC Message Data Structures */ +/* */ +/* Each IEEE 802.11 MAC message includes a MAC header, a frame body (which */ +/* can be empty), and a frame check sequence field. This section gives the */ +/* structures that used for the MAC message headers and frame bodies that */ +/* can exist in the three types of MAC messages - 1) Control messages, */ +/* 2) Data messages, and 3) Management messages. */ +/*---------------------------------------------------------------------------*/ +typedef MLAN_PACK_START struct { + UINT16 ProtocolVersion:2; + UINT16 Type:2; + UINT16 Subtype:4; + UINT16 ToDs:1; + UINT16 FromDs:1; + UINT16 MoreFrag:1; + UINT16 Retry:1; + UINT16 PwrMgmt:1; + UINT16 MoreData:1; + UINT16 Protected:1; + UINT16 Order:1; + +} MLAN_PACK_END IEEEtypes_FrameCtl_t; + +typedef MLAN_PACK_START struct { + UINT16 FragNum:4; + UINT16 SeqNum:12; + +} MLAN_PACK_END IEEEtypes_SeqCtl_t; + +typedef struct { + UINT16 FrmBodyLen; + IEEEtypes_FrameCtl_t FrmCtl; + UINT16 DurationId; + IEEEtypes_MacAddr_t Addr1; + IEEEtypes_MacAddr_t Addr2; + IEEEtypes_MacAddr_t Addr3; + IEEEtypes_SeqCtl_t SeqCtl; + IEEEtypes_MacAddr_t Addr4; + +} IEEEtypes_GenHdr_t; + +typedef MLAN_PACK_START struct { + UINT16 FrmBodyLen; + IEEEtypes_FrameCtl_t FrmCtl; + UINT16 Duration; + IEEEtypes_MacAddr_t DestAddr; + IEEEtypes_MacAddr_t SrcAddr; + IEEEtypes_MacAddr_t BssId; + IEEEtypes_SeqCtl_t SeqCtl; + IEEEtypes_MacAddr_t Rsrvd; + +} MLAN_PACK_END IEEEtypes_MgmtHdr_t; + +typedef struct { + IEEEtypes_GenHdr_t Hdr; + UINT8 FrmBody[IEEEtypes_MAX_DATA_BODY_LEN]; + UINT32 FCS; + +} IEEEtypes_DataFrame_t; + +typedef struct { + UINT8 UserPriority:4; + UINT8 Management:1; + UINT8 Reserved:3; + +} IEEEtypes_NonceFlags_t; + +typedef MLAN_PACK_START struct { + UINT8 PN0; + UINT8 PN1; + UINT8 Reserved1; + UINT8 Reserved2:5; + UINT8 ExtIV:1; + UINT8 KeyId:2; + UINT8 PN2; + UINT8 PN3; + UINT8 PN4; + UINT8 PN5; + +} MLAN_PACK_END IEEEtypes_CcmpHeader_t; + +typedef MLAN_PACK_START struct { + UINT8 TSC1; + UINT8 WepSeed; + UINT8 TSC0; + UINT8 Reserved:5; + UINT8 ExtIV:1; + UINT8 KeyId:2; + UINT8 TSC2; + UINT8 TSC3; + UINT8 TSC4; + UINT8 TSC5; + +} MLAN_PACK_END IEEEtypes_TkipHeader_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_FrameCtl_t frameCtl; + IEEEtypes_MacAddr_t addr1; + IEEEtypes_MacAddr_t addr2; + IEEEtypes_MacAddr_t addr3; + +} MLAN_PACK_END IEEEtypes_BIP_AAD_t; + +/************************************************************************/ +/* Control Frame Types */ +/************************************************************************/ +typedef MLAN_PACK_START struct { + UINT16 FrmBodyLen; + IEEEtypes_FrameCtl_t FrmCtl; + UINT16 DurationId; + IEEEtypes_MacAddr_t DestAddr; + IEEEtypes_MacAddr_t SrcAddr; + UINT8 Reserved[14]; /* Header MAC HW is 32 bytes */ + +} MLAN_PACK_END IEEEtypes_CtlHdr_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_CtlHdr_t Hdr; + UINT32 FCS; + +} MLAN_PACK_END IEEEtypes_PsPoll_t; + +typedef MLAN_PACK_START struct { + UINT16 BARAckPolicy:1; + UINT16 Multi_TID:1; + UINT16 CompressedBitmap:1; + UINT16 Reserved:9; + UINT16 TID:4; + +} MLAN_PACK_END IEEEtypes_BARCtl_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_CtlHdr_t Hdr; + + IEEEtypes_BARCtl_t BARCtl; + IEEEtypes_SeqCtl_t SeqCtl; + UINT32 FCS; + +} MLAN_PACK_END IEEEtypes_BlockAckReq_t; + +//NDPA frame components +typedef MLAN_PACK_START struct { + UINT16 AID:12; + UINT16 FbType:1; + UINT16 NcIndex:3; + +} MLAN_PACK_END IEEEtypes_StaInfo_t; + +typedef MLAN_PACK_START struct { + UINT8 Rsvd:2; // [0:1] Reserved + UINT8 SoundingSeq:6; // [2:7]Seq no. + IEEEtypes_StaInfo_t StaInfo; // Currently only 1 sta_info support + +} MLAN_PACK_END IEEEtypes_NDPAFrameBody_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_CtlHdr_t Hdr; + IEEEtypes_NDPAFrameBody_t FrameBody; + UINT32 FCS; + +} MLAN_PACK_END IEEEtypes_NDPAFrame_t; +/*-------------------------------------------------*/ +/* Management Frame Body Components - Fixed Fields */ +/*-------------------------------------------------*/ +typedef UINT16 IEEEtypes_AId_t; +/* */ +/* Association ID assigned by an AP during the association process */ +/* */ + +typedef UINT16 IEEEtypes_AuthAlg_t; +/* */ +/* Number indicating the authentication algorithm used (it can take */ +/* on the values given by IEEEtypes_AuthType_e): */ +/* 0 = Open system */ +/* 1 = Shared key */ +/* All other values reserved */ +/* */ + +typedef UINT16 IEEEtypes_AuthTransSeq_t; +/* */ +/* Authentication transaction sequence number that indicates the current */ +/* state of progress through a multistep transaction */ +/* */ + +typedef UINT16 IEEEtypes_BcnInterval_t; +/* */ +/* Beacon interval that represents the number of time units between */ +/* target beacon transmission times */ +/* */ + +typedef UINT8 IEEEtypes_DtimPeriod_t; +/* + * Interval that represents the number of time units between DTIMs. + */ + +typedef MLAN_PACK_START struct { + UINT16 Ess:1; + UINT16 Ibss:1; + UINT16 CfPollable:1; + UINT16 CfPollRqst:1; + UINT16 Privacy:1; + UINT16 ShortPreamble:1; + UINT16 Pbcc:1; + UINT16 ChanAgility:1; + UINT16 SpectrumMgmt:1; + UINT16 Qos:1; + UINT16 ShortSlotTime:1; + UINT16 APSD:1; + UINT16 RadioMeasurement:1; + UINT16 DsssOfdm:1; + UINT16 DelayedBlockAck:1; + UINT16 ImmediateBlockAck:1; +} MLAN_PACK_END IEEEtypes_CapInfo_t; + +typedef UINT16 IEEEtypes_ListenInterval_t; +/* */ +/* Listen interval to indicate to an AP how often a STA wakes to listen */ +/* to beacon management frames */ +/* */ + +typedef UINT16 IEEEtypes_ReasonCode_t; +/* */ +/* Reason code to indicate the reason that an unsolicited notification */ +/* management frame of type Disassociation or Deauthentication was */ +/* generated */ +/* */ + +typedef UINT16 IEEEtypes_StatusCode_t; +/* */ +/* Status code used in a response management frame to indicate the */ +/* success or failure of a requested operation */ +/* */ + +typedef UINT8 IEEEtypes_TimeStamp_t[IEEEtypes_TIME_STAMP_SIZE]; + +/*-------------------------------------------------------*/ +/* Management Frame Body Components - Information Fields */ +/*-------------------------------------------------------*/ + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; +} MLAN_PACK_END IEEEtypes_InfoElementHdr_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + UINT8 Data[255]; +} MLAN_PACK_END IEEEtypes_IE_Param_t; + +/* +** SSID element that idicates the identity of an ESS or IBSS +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + IEEEtypes_SsId_t SsId; +} MLAN_PACK_END IEEEtypes_SsIdElement_t; + +/* +** Supported rates element that specifies the rates in the operational +** rate set in the MLME join request and the MLME start request +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + IEEEtypes_DataRate_t Rates[IEEEtypes_MAX_DATA_RATES]; +} MLAN_PACK_END IEEEtypes_SuppRatesElement_t; + +/* +** FH parameter set that conatins the set of parameters necessary to +** allow sychronization for stations using a frequency hopping PHY +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + UINT16 DwellTime; + UINT8 HopSet; + UINT8 HopPattern; + UINT8 HopIndex; +} MLAN_PACK_END IEEEtypes_FhParamElement_t; + +/* +** DS parameter set that contains information to allow channel number +** identification for stations using a direct sequence spread spectrum PHY +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + UINT8 CurrentChan; +} MLAN_PACK_END IEEEtypes_DsParamElement_t; + +/* +** CF parameter set that contains the set of parameters necessary to +** support the PCF +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + UINT8 CfpCnt; + UINT8 CfpPeriod; + UINT16 CfpMaxDuration; + UINT16 CfpDurationRemaining; +} MLAN_PACK_END IEEEtypes_CfParamElement_t; + +/* Since uAP is the only one that holds the TIM statically, we'll +** define a max size for the PVB that accomodates a max AID of 32 +** used by the uAP. Size is 5 to account for broadcast. +*/ +#define MAX_TIM_ELEMENT_PVB_LENGTH 5 +/* +** TIM, which contains: +** 1) DTIM count - how many beacons (including the current beacon +** frame) appear before the next DTIM; a count of 0 indicates the +** current TIM is the DTIM +** +** 2) DTIM period - indicates the number of beacon intervals between +** successive DTIMs +** +** 3) Bitmap control - contains the traffic indicator bit associated +** with association ID 0 - this is set to 1 for TIM elements with a +** a value of 0 in the DTIM count field when one or more broadcast +** or multicast frames are buffered at the AP. The remaining bits +** of the field form the bitmap offset +** +** 4) Partial virtual bitmap - indicates which stations have messages +** buffered at the AP, for which the AP is prepared to deliver at +* the time the beacon frame is transmitted +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + UINT8 DtimCnt; + UINT8 DtimPeriod; + UINT8 BitmapCtl; + UINT8 PartialVirtualBitmap[MAX_TIM_ELEMENT_PVB_LENGTH]; +} MLAN_PACK_END IEEEtypes_TimElement_t; + +/* +** IBSS parameters necessary to support an IBSS +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + UINT16 AtimWindow; +} MLAN_PACK_END IEEEtypes_IbssParamElement_t; + +/* +** The challenge text used in authentication exchanges +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + UINT8 Text[IEEEtypes_CHALLENGE_TEXT_SIZE]; +} MLAN_PACK_END IEEEtypes_ChallengeText_t; + +typedef MLAN_PACK_START struct { + UINT8 ExtCapability; + UINT32 Capability; + + UINT8 SsIdLength; + IEEEtypes_SsId_t SsId; + +} MLAN_PACK_END IEEEtypes_SsIdL_HidSsId_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + UINT8 OuiType[4]; /* 00:50:f2:05 */ + + UINT8 PrimarySsIdExtCapability; + + /* Start optional fields */ + + UINT8 SsIdCount; + + /* SsIdCount # of hidden SSIDs, not a fixed size substructure */ + IEEEtypes_SsIdL_HidSsId_t hidSsid[1]; + +} MLAN_PACK_END IEEEtypes_SsIdLElement_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + UINT8 OuiType[4]; + UINT8 Data[1]; + +} MLAN_PACK_END IEEEtypes_WPS_DataElement_t; + +/* This structure is a member of BssConfig_t which is referenced by ROMed code. +** Any increase in the size of this structure will cause the subsequent elements +** of BssConfig_t to move forward, in turn affecting the ROM code. Therefore, +** any changes to this structure should be done taking into account its effect +** on BssConfig_t and ROM code. +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + UINT8 BSS_CoexistSupport:1; /* bit 0 */ + UINT8 Reserved1:1; /* bit 1 */ + UINT8 ExtChanSwitching:1; /* bit 2 */ + UINT8 RejectUnadmFrame:1; /* bit 3 */ + UINT8 PSMP_Capable:1; /* bit 4 */ + UINT8 Reserved5:1; /* bit 5 */ + UINT8 SPSMP_Support:1; /* bit 6 */ + UINT8 Event:1; /* bit 7 */ + UINT8 Diagnostics:1; /* bit 8 */ + UINT8 MulticastDiagnostics:1; /* bit 9 */ + UINT8 LocationTracking:1; /* bit 10 */ + UINT8 FMS:1; /* bit 11 */ + UINT8 ProxyARPService:1; /* bit 12 */ + UINT8 CollocatedIntf:1; /* bit 13 */ + UINT8 CivicLocation:1; /* bit 14 */ + UINT8 GeospatialLocation:1; /* bit 15 */ + UINT8 TFS:1; /* bit 16 */ + UINT8 WNM_Sleep:1; /* bit 17 */ + UINT8 TIM_Broadcast:1; /* bit 18 */ + UINT8 BSS_Transition:1; /* bit 19 */ + UINT8 QoSTrafficCap:1; /* bit 20 */ + UINT8 AC_StationCount:1; /* bit 21 */ + UINT8 MultipleBSSID:1; /* bit 22 */ + UINT8 TimingMeasurement:1; /* bit 23 */ + UINT8 ChannelUsage:1; /* bit 24 */ + UINT8 SSID_List:1; /* bit 25 */ + UINT8 DMS:1; /* bit 26 */ + UINT8 UTC:1; /* bit 27 */ + UINT8 TDLSPeerUAPSDSupport:1; /* bit 28 */ + UINT8 TDLSPeerPSMSupport:1; /* bit 29 */ + UINT8 TDLSChannelSwitching:1; /* bit 30 */ + UINT8 Reserved31:1; + UINT8 Reserved32_36:5; + UINT8 TDLSSupport:1; /* bit 37 */ + UINT8 TDLSProhibited:1; /* bit 38 */ + UINT8 TDLSChlSwitchProhib:1; /* bit 39 */ + UINT8 Reserved40_47:8; + UINT8 Reserved48_55:8; + UINT8 Reserved56_60:5; + UINT8 TDLSWiderBandSupport:1; + UINT8 OpModeNotification:1; /* bit 62 */ + UINT8 Reserved63:1; /* bit 63 */ +/* This structure is a member of BssConfig_t which is referenced by ROMed code. +** Any increase in the size of this structure will cause the subsequent elements +** of BssConfig_t to move forward, in turn affecting the ROM code. Therefore, +** any changes to this structure should be done taking into account its effect +** on BssConfig_t and ROM code. +*/ +} MLAN_PACK_END IEEEtypes_ExtCapability_t; + +/* +** The HT Capability Element +*/ + +typedef enum { + STATIC_SM_PS, + DYNAMIC_SM_PS, + RESERVED_SM_PS, + DISABLE_SM_PS +} IEEEtypes_HtCap_SMPS_e; + +typedef MLAN_PACK_START struct { + UINT16 LdpcCoding:1; + UINT16 SuppChanWidth:1; + UINT16 MIMOPowerSave:2; + UINT16 GFPreamble:1; + UINT16 ShortGI20MHZ:1; + UINT16 ShortGI40MHZ:1; + UINT16 TxSTBC:1; + UINT16 RxSTBC:2; + UINT16 DelayedBA:1; + UINT16 MaximalAMSDUSize:1; + UINT16 DsssCck40MHzMode:1; + UINT16 Psmp:1; + UINT16 FortyMHzIntolerant:1; + UINT16 L_SIG_TXOP_Protection:1; +} MLAN_PACK_END IEEEtypes_HT_Cap_Info_t; + +typedef MLAN_PACK_START struct { + UINT8 MaxRxAMpduFactor:2; + UINT8 MpduDensity:3; + UINT8 Reserved_5_7:3; +} MLAN_PACK_END IEEEtypes_HT_Mac_Params_t; + +typedef MLAN_PACK_START struct { + UINT16 Pco:1; + UINT16 TransitionTime:2; + UINT16 Reserved:5; + + UINT16 McsFeedback:2; + UINT16 HtcSupport:1; + UINT16 RdResponder:1; + UINT16 Reserved2:4; +} MLAN_PACK_END IEEEtypes_HT_Ext_Cap_t; + +typedef MLAN_PACK_START struct { + UINT32 TxBFCapable:1; /* B0 */ + UINT32 RxStaggeredSounding:1; + UINT32 TxStaggeredSounding:1; + UINT32 RxNDPCap:1; + UINT32 TxNDPCap:1; + UINT32 ImplicitTxBF:1; + UINT32 Calibration:2; + UINT32 ExplCSITxBF:1; /* B8 */ + + UINT32 ExplUcompSteerMatrix:1; + UINT32 ExplCompSteerMatrix:1; + UINT32 ExplBFCSIFeedback:2; + UINT32 ExplUcompSteerFeedback:2; + UINT32 ExplCompSteerMatrixFeedback:2; + UINT32 MinimalGrouping:2; + UINT32 CSINumMFAntennae:2; /* B20 */ + + UINT32 UcompSteerMatrixBFAntennae:2; + UINT32 CompSteerMatrixBFAntennae:2; + UINT32 CSIMaxMaxBeamSupported:2; + UINT32 ChanEstCapability:2; + UINT32 Reserved:3; /* B31 */ + +} MLAN_PACK_END IEEEtypes_HT_TXBF_Cap_t; + +typedef MLAN_PACK_START struct { + UINT8 ASCapable:1; + UINT8 ExplCSITxASCapable:1; + UINT8 IndicesFeedbackTxAS:1; + UINT8 ExplicitCSIFeedback:1; + UINT8 AntIndicesFeedback:1; + UINT8 RxASCapable:1; + UINT8 TxSoundingPPDUs:1; + UINT8 Reserved:1; + +} MLAN_PACK_END IEEEtypes_HT_AS_Cap_t; + +typedef enum { + HTC_NO_FEEDBACK = 0, + HTC_CSI, + HTC_UCOMP_BF, + HTC_COMP_BF +} IEEEtypes_HTC_CSI_Types_e; + +typedef MLAN_PACK_START struct { + UINT16 Nc:2; + UINT16 Nr:2; + UINT16 ChanW:1; + UINT16 Ng:2; + UINT16 Coeff_size:2; + UINT16 Codebook_info:2; + UINT16 Re_segments:2; + UINT16 Reserved:2; + + UINT32 SndTimestamp; + +} MLAN_PACK_END IEEEtypes_MIMOCtrl_t; + +typedef MLAN_PACK_START struct { + UINT16 Reserved:1; + UINT16 TRQ:1; + UINT16 MAI:4; + UINT16 MFSI:3; + UINT16 MFB_ASELC:7; + +} MLAN_PACK_END IEEEtypes_LinkAdaptCtrl_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_LinkAdaptCtrl_t LA_Ctrl; + UINT16 CalibPos:2; + UINT16 CalibSeq:2; + UINT16 Reserved:2; + UINT16 CSI:2; + UINT16 NDPAnnounce:1; + UINT16 Reserved2:5; + UINT16 ACConst:1; + UINT16 RDG_MorePPDU:1; + +} MLAN_PACK_END IEEEtypes_HTCtrl_t; + +#define HTC_NDP_ANNOUNCE BIT24 + +#define IEEEtypes_MCS_BITMAP_SIZE 16 +typedef UINT8 IEEEtypes_Supported_MCS_Bitmap_t[IEEEtypes_MCS_BITMAP_SIZE]; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + IEEEtypes_HT_Cap_Info_t HtCapInfo; + IEEEtypes_HT_Mac_Params_t HtMacParams; + IEEEtypes_Supported_MCS_Bitmap_t SupportedMcsBitmap; + IEEEtypes_HT_Ext_Cap_t ExtHTCaps; + IEEEtypes_HT_TXBF_Cap_t TxBFCaps; + IEEEtypes_HT_AS_Cap_t ASCaps; + +} MLAN_PACK_END IEEEtypes_HT_Capability_t; + +/* +** The HT Information Element +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + UINT8 PrimaryChan; + /*-----------------------------------------------*/ + UINT8 SecChanOffset:2; + UINT8 ChanWidth:1; + UINT8 RifsMode:1; + UINT8 CtrlLedAccessOnly:1; + UINT8 SrvIntrvlGran:3; + /*-----------------------------------------------*/ + UINT16 HtProtection:2; + UINT16 NonGfHtStaPresent:1; + UINT16 Reserved1:1; + UINT16 ObssNonHtStaPresent:1; + UINT16 Reserved2:11; + /*-----------------------------------------------*/ + UINT16 Reserved3:6; + UINT16 DualBeacon:1; + UINT16 DualCtsProtection:1; + UINT16 StbcBeacon:1; + UINT16 L_SIGTxopProtectionAllowed:1; + UINT16 PcoActive:1; + UINT16 PcoPhase:1; + UINT16 Reserved4:4; + /*-----------------------------------------------*/ + IEEEtypes_Supported_MCS_Bitmap_t BasicMcsSetBitmap; + +} MLAN_PACK_END IEEEtypes_HT_Information_t; + +/* secondary channel offset */ +/* 20/40 BSS Coexistence */ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + UINT8 InfoResuest:1; + UINT8 FortyMHzIntolerant:1; + UINT8 Width20MHzRequest:1; + UINT8 Reserved:5; + +} MLAN_PACK_END IEEEtypes_20N40_BSS_Coexist_t; + +/* overlapping BSS Scan Parameters */ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + UINT16 OBSSScanPassiveDwell; + UINT16 OBSSScanActiveDwel; + UINT16 BSSChanWidthTriggerScanInt; + UINT16 OBSSScanPassiveTotal; + UINT16 OBSSScanActiveTotal; + UINT16 BSSWidthChanTransDelay; + UINT16 OBSSScanActiveThreshold; + +} MLAN_PACK_END IEEEtypes_OBSS_ScanParam_t; + +typedef MLAN_PACK_START struct { + UINT8 htSupported; + IEEEtypes_HT_Capability_t htCap; + IEEEtypes_HT_Information_t htInfo; + UINT8 secChanOffset; + IEEEtypes_20N40_BSS_Coexist_t coexist; + IEEEtypes_OBSS_ScanParam_t scanParam; + +} MLAN_PACK_END HtEntry_t; + +#define DOT11AC_VHTCAP_MAX_MPDU_LEN_0 3895 +#define DOT11AC_VHTCAP_MAX_MPDU_LEN_1 7991 +#define DOT11AC_VHTCAP_MAX_MPDU_LEN_2 11454 +#define DOT11AC_VHTCAP_MAX_MPDU_LEN_3 3895 // reserved value + + /* IE definitions based on draft 1.4. */ +typedef MLAN_PACK_START struct { + UINT32 MaxMpduLen:2; + UINT32 SuppChanWidthSet:2; + UINT32 RxLDPC:1; + UINT32 ShortGI_80:1; + UINT32 ShortGI_160:1; + UINT32 TxSTBC:1; + /*------------------------*/ + UINT32 RxSTBC:3; + UINT32 SUBFerCap:1; + UINT32 SUBFeeCap:1; + UINT32 NumBFerAnt:3; + /*------------------------*/ + UINT32 NumSoundingDim:3; + UINT32 MUBFerCap:1; + UINT32 MUBFeeCap:1; + UINT32 VHTTxOPPs:1; + UINT32 HTC_VHT_Cap:1; + UINT32 MaxAMPDULenExp:3; + UINT32 VHTLinkAdaptCap:2; + UINT32 Reserved:4; + +} MLAN_PACK_END IEEEtypes_VHT_Cap_Info_t; + +typedef MLAN_PACK_START struct { + UINT16 RxMCSMap; + UINT16 RxHighestDataRate:13; + UINT16 Reserved1:3; + + UINT16 TxMCSMap; + UINT16 TxHighestDataRate:13; + UINT16 Reserved2:3; + +} MLAN_PACK_END IEEEtypes_VHT_Supp_MCS_Set_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + IEEEtypes_VHT_Cap_Info_t VhtCap; + IEEEtypes_VHT_Supp_MCS_Set_t VhtSuppMcsSet; + +} MLAN_PACK_END IEEEtypes_VHT_Capability_t; + +typedef MLAN_PACK_START struct { + UINT8 ChanWidth; + UINT8 ChanCenterFreq1; + UINT8 ChanCenterFreq2; + +} MLAN_PACK_END IEEEtypes_VHT_Op_Info_t; + +/* +** The VHT Operation Element +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + IEEEtypes_VHT_Op_Info_t VhtOpInfo; + UINT16 VhtBasicMcsSet; + +} MLAN_PACK_END IEEEtypes_VHT_Operation_t; + +typedef MLAN_PACK_START struct { + UINT8 chanWidth:2; + UINT8 reserved:2; + UINT8 rxNss:3; + UINT8 rxNssType:1; + +} MLAN_PACK_END IEEEtypes_VHT_OpMode_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + IEEEtypes_VHT_OpMode_t VhtOpMode; +} MLAN_PACK_END IEEEtypes_VHT_OpModeNotification_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + /** WideBW has same structure as VHT_OP_INFO*/ + IEEEtypes_VHT_Op_Info_t wideBwCs; +} MLAN_PACK_END IEEEtypes_WIde_BW_CS_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + IEEEtypes_AId_t Aid; +} MLAN_PACK_END IEEEtypes_AIDElement_t; + +/* +***************************************************************************** +** +** +** 802.11k RRM definitions +** +** +***************************************************************************** +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + /* First byte */ + UINT8 LinkMeas:1; + UINT8 NborRpt:1; + UINT8 ParallelMeas:1; + UINT8 RepeatMeas:1; + UINT8 BcnPassiveMeas:1; + UINT8 BcnActiveMeas:1; + UINT8 BcnTableMeas:1; + UINT8 BcnMeasRptCond:1; + + /* Second byte */ + UINT8 FrameMeas:1; + UINT8 ChanLoadMeas:1; + UINT8 NoiseHistMeas:1; + UINT8 StatsMeas:1; + UINT8 LciMeas:1; + UINT8 LciAzimuth:1; + UINT8 TxStreamMeas:1; + UINT8 TrigTxStreamMeas:1; + + /* Third byte */ + UINT8 ApChanRpt:1; + UINT8 RrmMib:1; + UINT8 OpChanMaxMeas:3; + UINT8 NonOpChanMaxMeas:3; + + /* Fourth byte */ + UINT8 MeasPilot:3; + UINT8 MeasPilotTxInfo:1; + UINT8 NborRptTsfOffset:1; + UINT8 RcpiMeas:1; + UINT8 RsniMeas:1; + UINT8 BssAvgAccessDelay:1; + + /* Fifth byte */ + UINT8 BssAvailAdmCap:1; + UINT8 AntennaInfo:1; + UINT8 Reserved:6; + +} MLAN_PACK_END IEEEtypes_RrmEnabledCapabilities_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + UINT8 RegulatoryClass; + + UINT8 ChannelList[1]; + +} MLAN_PACK_END IEEEtypes_ApChanRptElement_t; + +typedef enum { + RPT_DTL_NO_FIX_OR_IE = 0, + RPT_DTL_ALL_FIX_AND_REQ_IES = 1, + RPT_DTL_ALL_FIX_AND_ALL_IES = 2, + +} IEEEtypes_ReportDetailLevel_e; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + MLAN_PACK_START IEEEtypes_ReportDetailLevel_e MLAN_PACK_END + RptDetailLevel; + +} MLAN_PACK_END IEEEtypes_ReportingDetailElement_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + IEEEtypes_ElementId_e IeList[1]; + +} MLAN_PACK_END IEEEtypes_RequestElement_t; + +/* +***************************************************************************** +** +** +** 802.11d and 802.11j Country IE definitions +** +** +***************************************************************************** +*/ + +/** Regulatory Triplet component in the country IE */ +typedef MLAN_PACK_START struct { + UINT8 RegulatoryExtensionId; + UINT8 RegulatoryClass; + UINT8 CoverageClass; + +} MLAN_PACK_END IEEEtypes_RegulatoryTriplet_t; + +/** Subband Triplet component in the country IE */ +typedef MLAN_PACK_START struct { + UINT8 FirstChan; + UINT8 NumChans; + UINT8 MaxTxPower; + +} MLAN_PACK_END IEEEtypes_SubbandTriplet_t; + +/* Country Info Triplet union comprised of subband and potentially regulatory + * triplets + */ +typedef MLAN_PACK_START union { + UINT8 TripletIdentifier; + IEEEtypes_SubbandTriplet_t Subband; + IEEEtypes_RegulatoryTriplet_t Regulatory; + +} MLAN_PACK_END IEEEtypes_CountryInfoTriplet_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + UINT8 CountryCode[IEEEtypes_COUNTRY_CODE_SIZE]; + IEEEtypes_CountryInfoTriplet_t Triplets[IEEEtypes_COUNTRY_MAX_TRIPLETS]; + +} MLAN_PACK_END IEEEtypes_CountryInfoElement_t; + +/* +***************************************************************************** +** +** +** 802.11h TPC definitions +** +** +***************************************************************************** +*/ + +/* +** Power Constraint IE - for 802.11h TPC. Specifies a Local +** Power Constraint in a channel. +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + UINT8 localConstraint; +} MLAN_PACK_END IEEEtypes_PowerConstraintElement_t; + +/* +** Power Capability IE - for 802.11h TPC. Specifies the +** min and max power the station is capable of transmitting with. +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + UINT8 minTxPwr; + UINT8 maxTxPwr; +} MLAN_PACK_END IEEEtypes_PowerCapabilityElement_t; + +/* +** 802.11h TPC Request IE - used for requesting a peer station +** to send Tx power and Link Margin. +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; +} MLAN_PACK_END IEEEtypes_TPCRequestElement_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + UINT8 TxPwr; + UINT8 LinkMargin; +} MLAN_PACK_END IEEEtypes_TPCReportElement_t; + +#define WIFI_TPCRPT_OUI_SUBTYPE 0x08 + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + UINT8 OuiType[4]; /* 00:50:f2:08 */ + UINT8 OuiSubType; + + UINT8 TxPwr; + UINT8 LinkMargin; + +} MLAN_PACK_END IEEEtypes_WiFi_TPCReportElement_t; + +/* +***************************************************************************** +** +** +** 802.11h DFS definitions +** +** +***************************************************************************** +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + UINT8 ChannelSwitchMode; + UINT8 ChannelNumber; + UINT8 ChannelSwitchCount; +} MLAN_PACK_END IEEEtypes_ChannelSwitchElement_t; + +typedef MLAN_PACK_START struct { + UINT8 BSS:1; + UINT8 OFDM_Preamble:1; + UINT8 Unidentified:1; + UINT8 Radar:1; + UINT8 Unmeasured:1; + UINT8 Reserved:3; +} MLAN_PACK_END IEEEtypes_DFS_Map_t; + +typedef MLAN_PACK_START struct { + UINT8 ChannelNumber; + IEEEtypes_DFS_Map_t DFS_Map; +} MLAN_PACK_END IEEEtypes_ChannelMap_t; + +#define MAX_NUMBER_OF_DFS_CHANNELS 25 +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + IEEEtypes_MacAddr_t DFS_Owner; + UINT8 DFS_Recovery_Interval; + + /* For the channels in .11a */ + IEEEtypes_ChannelMap_t Channel_Map[MAX_NUMBER_OF_DFS_CHANNELS]; +} MLAN_PACK_END IEEEtypes_IbssDfsElement_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + UINT8 QuietCount; + UINT8 QuietPeriod; + UINT16 QuietDuration; + UINT16 QuietOffset; +} MLAN_PACK_END IEEEtypes_QuietElement_t; + +typedef MLAN_PACK_START struct { + UINT8 FirstChannelNumber; + UINT8 NumberOfChannels; +} MLAN_PACK_END ChannelsTuple_t; + +#define MAX_CHANNEL_TUPLES 20 +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + ChannelsTuple_t ChannelTuple[MAX_CHANNEL_TUPLES]; +} MLAN_PACK_END IEEEtypes_SupportedChannelsElement_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + UINT8 currRegClass; + UINT8 suppRegClass; +} MLAN_PACK_END IEEEtypes_SupportedRegClasses_t; + +/* +***************************************************************************** +** +** +** 802.11y definitions +** +** +***************************************************************************** +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + UINT8 ChannelSwitchMode; + UINT8 RegClass; + UINT8 ChannelNumber; + UINT8 ChannelSwitchCount; +} MLAN_PACK_END IEEEtypes_ExtChannelSwitchElement_t; + +/* +***************************************************************************** +** +** +** 802.11e definitions +** +** +***************************************************************************** +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + UINT16 StaCount; + UINT8 ChnlUtil; + UINT16 AdmCap; +} MLAN_PACK_END IEEEtypes_BSSLoadElement_t; + +/* +***************************************************************************** +** +** +** 802.11i and WPA definitions +** +** +***************************************************************************** +*/ +typedef enum { + IEEEtypes_RSN_AUTH_KEY_SUITE_RSVD = 0, + IEEEtypes_RSN_AUTH_KEY_SUITE_8021X = 1, + IEEEtypes_RSN_AUTH_KEY_SUITE_PSK = 2, + IEEEtypes_AKM_SUITE_FT_1X = 3, + IEEEtypes_AKM_SUITE_FT_PSK = 4, + IEEEtypes_AKM_SUITE_1X_SHA256 = 5, + IEEEtypes_AKM_SUITE_PSK_SHA256 = 6 +} IEEEtypes_RSN_Auth_Key_Suite; + +/* Cipher Suite Selector */ +typedef enum { + IEEEtypes_RSN_CIPHER_SUITE_NONE = 0, + IEEEtypes_RSN_CIPHER_SUITE_WEP40, + IEEEtypes_RSN_CIPHER_SUITE_TKIP, + IEEEtypes_RSN_CIPHER_SUITE_WRAP, + IEEEtypes_RSN_CIPHER_SUITE_CCMP, + IEEEtypes_RSN_CIPHER_SUITE_WEP104 +} IEEEtypes_RSN_Cipher_Suite; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + UINT8 OuiType[4]; /* 00:50:f2:01 */ + UINT16 Ver; + UINT8 GrpKeyCipher[4]; + UINT16 PwsKeyCnt; + UINT8 PwsKeyCipherList[4]; + UINT16 AuthKeyCnt; + UINT8 AuthKeyList[4]; +} MLAN_PACK_END IEEEtypes_WPAElement_t; + +typedef MLAN_PACK_START struct { + UINT8 PreAuth:1; /* B0 */ + UINT8 NoPairwise:1; + UINT8 PtksaReplayCtr:2; + UINT8 GtksaReplayCtr:2; + UINT8 MFPR:1; + UINT8 MFPC:1; + + UINT8 Reserved_8:1; /* B8 */ + UINT8 PeerkeyEnabled:1; + UINT8 SppAmsduCap:1; + UINT8 SppAmsduReq:1; + UINT8 PBAC:1; + UINT8 Reserved_13_15:3; +} MLAN_PACK_END IEEEtypes_RSNCapability_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + /* All elements after Ver field are optional per the spec. ** ** - + AuthKeyList and PwsKeyCipherList can have multiple elements so ** + static parsing of this structure is not possible. ** ** - RsnCap, + PMKIDCnt/List, and GrpMgmtCipher are often not included ** ** - If + any optional element is included, all preceding elements must ** + also be included. Once an optional element is not inserted, the ** + IE construction ends. (i.e. RsnCap must be included if PMKIDCnt/List + ** is needed). */ + + UINT16 Ver; + UINT8 GrpKeyCipher[4]; + UINT16 PwsKeyCnt; + UINT8 PwsKeyCipherList[4]; + UINT16 AuthKeyCnt; + UINT8 AuthKeyList[4]; + + IEEEtypes_RSNCapability_t RsnCap; + + UINT16 PMKIDCnt; + UINT8 PMKIDList[16]; + + UINT8 GrpMgmtCipher[4]; +} MLAN_PACK_END IEEEtypes_RSNElement_t; + +/* +***************************************************************************** +** +** +** 802.11r definitions +** +** +***************************************************************************** +*/ + +typedef MLAN_PACK_START struct { + UINT8 FtOverBss:1; + UINT8 FtOverAir:1; + + UINT8 Reserved:6; + +} MLAN_PACK_END IEEEtypes_FT_CapabilityPolicy_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + UINT16 MobilityDomainId; + + IEEEtypes_FT_CapabilityPolicy_t FtCapPol; + +} MLAN_PACK_END IEEEtypes_MobilityDomainElement_t; + +typedef MLAN_PACK_START struct { + UINT8 KeyId:2; + + UINT8 Reserved1:6; + UINT8 Reserved2:8; + +} MLAN_PACK_END IEEEtypes_GtkKeyInfo_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + IEEEtypes_GtkKeyInfo_t KeyInfo; + UINT8 KeyLen; + UINT8 RSC[8]; + + UINT8 Key[32]; /* Variable length from 5 to 32 */ + +} IEEEtypes_GtkElement_t; + +typedef MLAN_PACK_START struct { + UINT8 Reserved; + UINT8 InfoElementCount; + +} MLAN_PACK_END IEEEtypes_FT_MICControl_t; + +#define FTIE_MIC_LEN 16 +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + IEEEtypes_FT_MICControl_t MicControl; + + UINT8 MIC[FTIE_MIC_LEN]; + UINT8 ANonce[32]; + UINT8 SNonce[32]; + + UINT8 SubElem[1]; + +} MLAN_PACK_END IEEEtypes_FastBssTransElement_t; + +typedef MLAN_PACK_START enum { + TI_TYPE_RESERVED = 0, + TI_TYPE_REASSOC_DEADLINE_TUS = 1, + TI_TYPE_KEY_LIFETIME_SECS = 2, + TI_TYPE_ASSOCIATION_COMEBACK_TIME = 3, + +} IEEEtypes_TimeoutInterval_e; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + IEEEtypes_TimeoutInterval_e TimeoutIntervalType; + UINT32 TimeoutInterval; + +} MLAN_PACK_END IEEEtypes_TimeoutIntervalElement_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + UINT8 Identifier; + UINT8 DescCount; + + IEEEtypes_StatusCode_t StatusCode; + +} MLAN_PACK_END IEEEtypes_RICDataElement_t; + +typedef MLAN_PACK_START enum { + RIC_RESOURCE_BLOCK_ACK = 1, + +} MLAN_PACK_END IEEEtypes_RICResource_e; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + IEEEtypes_RICResource_e ResourceType; + + UINT8 Data[1]; + +} MLAN_PACK_END IEEEtypes_RICDescElement_t; + +/* +***************************************************************************** +** +** +** 802.11w definitions +** +** +***************************************************************************** +*/ +#define MMIE_MIC_LEN 8 +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + UINT8 KeyId[2]; + UINT8 IPN[6]; + + UINT8 MIC[MMIE_MIC_LEN]; + +} MLAN_PACK_END IEEEtypes_ManagementMICElement_t; + +/* +***************************************************************************** +** +** +** Management Frame Bodies +** +** +***************************************************************************** +*/ + +/* +** The parameter set relevant to the PHY +*/ +typedef MLAN_PACK_START union { + IEEEtypes_FhParamElement_t FhParamSet; + IEEEtypes_DsParamElement_t DsParamSet; + +} MLAN_PACK_END IEEEtypes_PhyParamElement_t; + +/* +** Service set parameters - for a BSS supporting, PCF, the +** CF parameter set is used; for an independent BSS, the IBSS +** parameter set is used. +*/ +typedef MLAN_PACK_START union { + IEEEtypes_CfParamElement_t CfParamSet; + IEEEtypes_IbssParamElement_t IbssParamSet; +} MLAN_PACK_END IEEEtypes_SsParamElement_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + IEEEtypes_DataRate_t Rates[IEEEtypes_MAX_DATA_RATES]; +} MLAN_PACK_END IEEEtypes_ExtSuppRatesElement_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + MLAN_PACK_START union { + MLAN_PACK_START struct { + UINT8 NonERPPresent:1; + UINT8 UseProtection:1; + UINT8 BarkerPreamble:1; + UINT8 Reserved:5; + } bf; + UINT8 erpInfo; + } u; +} MLAN_PACK_END IEEEtypes_ERPInfoElement_t; + +#define IEEEtypes_BCN_FIXED_FIELD_SZ (sizeof(IEEEtypes_TimeStamp_t) \ + + sizeof(IEEEtypes_BcnInterval_t) \ + + sizeof(IEEEtypes_CapInfo_t)) + +typedef MLAN_PACK_START struct { + IEEEtypes_TimeStamp_t TimeStamp; + IEEEtypes_BcnInterval_t BcnInterval; + IEEEtypes_CapInfo_t CapInfo; + IEEEtypes_SsIdElement_t SsId; + IEEEtypes_SuppRatesElement_t SuppRates; + IEEEtypes_PhyParamElement_t PhyParamSet; + IEEEtypes_SsParamElement_t SsParamSet; + IEEEtypes_TimElement_t Tim; + IEEEtypes_ERPInfoElement_t ERPInfo; + IEEEtypes_ExtSuppRatesElement_t ExtSuppRates; +} MLAN_PACK_END IEEEtypes_Bcn_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ReasonCode_t ReasonCode; +} MLAN_PACK_END IEEEtypes_DisAssoc_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_CapInfo_t CapInfo; + IEEEtypes_ListenInterval_t ListenInterval; + UINT8 IEBuffer[1]; +} MLAN_PACK_END IEEEtypes_AssocRqst_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_CapInfo_t CapInfo; + IEEEtypes_StatusCode_t StatusCode; + IEEEtypes_AId_t AId; +} MLAN_PACK_END IEEEtypes_AssocRsp_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_CapInfo_t CapInfo; + IEEEtypes_ListenInterval_t ListenInterval; + IEEEtypes_MacAddr_t CurrentApAddr; + UINT8 IEBuffer[1]; +} MLAN_PACK_END IEEEtypes_ReAssocRqst_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_CapInfo_t CapInfo; + IEEEtypes_StatusCode_t StatusCode; + IEEEtypes_AId_t AId; +} MLAN_PACK_END IEEEtypes_ReAssocRsp_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_SsIdElement_t SsId; + IEEEtypes_SuppRatesElement_t SuppRates; + IEEEtypes_ExtSuppRatesElement_t ExtSuppRates; +} MLAN_PACK_END IEEEtypes_ProbeRqst_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_TimeStamp_t TimeStamp; + IEEEtypes_BcnInterval_t BcnInterval; + IEEEtypes_CapInfo_t CapInfo; + IEEEtypes_SsIdElement_t SsId; + IEEEtypes_SuppRatesElement_t SuppRates; + IEEEtypes_PhyParamElement_t PhyParamSet; + IEEEtypes_SsParamElement_t SsParamSet; + IEEEtypes_TimElement_t Tim; + IEEEtypes_ERPInfoElement_t ERPInfo; + IEEEtypes_ExtSuppRatesElement_t ExtSuppRates; +} MLAN_PACK_END IEEEtypes_ProbeRsp_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_AuthAlg_t AuthAlg; + IEEEtypes_AuthTransSeq_t AuthTransSeq; + IEEEtypes_StatusCode_t StatusCode; + IEEEtypes_ChallengeText_t ChallengeText; +} MLAN_PACK_END IEEEtypes_Auth_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ReasonCode_t ReasonCode; +} MLAN_PACK_END IEEEtypes_Deauth_t; + +/*---------------------------------------------------------------------------*/ +/* IEEE 802.11 MLME SAP Interface Data Structures */ +/* */ +/* According to IEEE 802.11, services are provided by the MLME to the SME. */ +/* In the current architecture, the services are provided to the SME by the */ +/* MAC Management Service Task. This section describes data structures */ +/* needed for these services. */ +/*---------------------------------------------------------------------------*/ + +/* +** BSS Description Set +** +** A description of a BSS, providing the following: +** BssId: The ID of the BSS +** SsId: The SSID of the BSS +** BssType: The type of the BSS (INFRASTRUCTURE or INDEPENDENT) +** BcnPeriod: The beacon period (in time units) +** DtimPeriod: The DTIM period (in beacon periods) +** Tstamp: Timestamp of a received frame from the BSS; this is an 8 +** byte string from a probe response or beacon +** StartTs: The value of a station's timing synchronization function +** at the start of reception of the first octet of the +** timestamp field of a received frame (probe response or +** beacon) from a BSS; this is an 8 byte string +** PhyParamSet: The parameter set relevant to the PHY (empty if not +** needed by the PHY) +** SsParamSet: The service set parameters. These can consist of either +** the parameter set for CF periods or for an IBSS. +** Cap: The advertised capabilities of the BSS +** DataRates: The set of data rates that must be supported by all +** stations (the BSS basic rate set) +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_MacAddr_t BssId; + IEEEtypes_SsId_t SsId; + IEEEtypes_Bss_e BssType; + IEEEtypes_BcnInterval_t BcnPeriod; + IEEEtypes_DtimPeriod_t DtimPeriod; + IEEEtypes_TimeStamp_t Tstamp; + IEEEtypes_TimeStamp_t StartTs; + IEEEtypes_PhyParamElement_t PhyParamSet; + IEEEtypes_SsParamElement_t SsParamSet; + IEEEtypes_CapInfo_t Cap; + IEEEtypes_DataRate_t DataRates[IEEEtypes_MAX_DATA_RATES_G]; + /* + ** DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used in the middle of + ** the adhoc join command. Any changes will shift the binary layout + ** of the following fields in the command from the driver + */ +} MLAN_PACK_END IEEEtypes_BssDesc_t; + +typedef enum { + Band_2_4_GHz = 0, + Band_5_GHz = 1, + Band_4_GHz = 2, + +} ChanBand_e; + +#define NUM_CHAN_BAND_ENUMS 3 + +typedef enum { + ChanWidth_20_MHz = 0, + ChanWidth_10_MHz = 1, + ChanWidth_40_MHz = 2, + ChanWidth_80_MHz = 3, +} ChanWidth_e; + +typedef enum { + SECONDARY_CHAN_NONE = 0, + SECONDARY_CHAN_ABOVE = 1, + SECONDARY_CHAN_BELOW = 3, + // reserved 2, 4~255 +} Chan2Offset_e; + +typedef enum { + MANUAL_MODE = 0, + ACS_MODE = 1, +} ScanMode_e; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + UINT8 chan2Offset; +} MLAN_PACK_END IEEEtypes_SecondaryChannelOffset_t; + +/* This struct is used in ROM and existing fields should not be changed. */ +typedef MLAN_PACK_START struct { + ChanBand_e chanBand:2; + ChanWidth_e chanWidth:2; + Chan2Offset_e chan2Offset:2; + ScanMode_e scanMode:2; +} MLAN_PACK_END BandConfig_t; + +#define MASK_SCAN_MODE(pBandConfig) (*(UINT8*)(pBandConfig) &= 0x3f) + +#define BC_2_4_GHZ {Band_2_4_GHz, ChanWidth_20_MHz, SECONDARY_CHAN_NONE, MANUAL_MODE} +#define BC_5_GHZ {Band_5_GHz, ChanWidth_20_MHz, SECONDARY_CHAN_NONE, MANUAL_MODE} + +typedef MLAN_PACK_START struct { + BandConfig_t bandConfig; + UINT8 chanNum; + +} MLAN_PACK_END ChanBandInfo_t; + +typedef MLAN_PACK_START struct { + UINT8 passiveScan:1; + UINT8 disableChanFilt:1; + UINT8 multiDomainScan:1; + UINT8 rspTimeoutEn:1; + UINT8 hiddenSsidReport:1; + UINT8 firstScanCmd:1; + UINT8 reserved_6_7:2; + +} MLAN_PACK_END ChanScanMode_t; + +typedef MLAN_PACK_START struct { + BandConfig_t bandConfig; + UINT8 chanNum; + ChanScanMode_t scanMode; + UINT16 minScanTime; // unused - not removed since shared with + // host + UINT16 maxScanTime; + +} MLAN_PACK_END channelInfo_t; + +/* +** Join request message from the SME to establish synchronization with +** a BSS +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_BssDesc_t BssDesc; +#ifdef OLD_DFS + IEEEtypes_QuietElement_t Quiet_Element; + IEEEtypes_IbssDfsElement_t IBSS_DFS_Element; +#endif + channelInfo_t JoinChannel; + + UINT8 *pIeBuf; + UINT16 ieBufLen; +} MLAN_PACK_END IEEEtypes_JoinCmd_t; + +/* +** Join confirm message sent from the MLME as a result of a join request; +** it reports the result of the join +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_JoinResult_e Result; +} MLAN_PACK_END IEEEtypes_JoinCfrm_t; + +/* +** Authenticate request message sent from the SME to establish +** authentication with a specified peer MAC entity +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_MacAddr_t PeerStaAddr; + IEEEtypes_AuthType_e AuthType; + IEEEtypes_AuthTransSeq_t AuthTransSeq; +} MLAN_PACK_END IEEEtypes_AuthCmd_t; + +/* +** Authenticate confirm message sent from the MLME as a result of an +** authenticate request; it reports the result of the authentication +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_MacAddr_t PeerStaAddr; + IEEEtypes_AuthType_e AuthType; + IEEEtypes_AuthResult_e Result; +} MLAN_PACK_END IEEEtypes_AuthCfrm_t; + +/* +** Authenticate indication message sent from the MLME to report +** authentication with a peer MAC entity that resulted from an +** authentication procedure that was initiated by that MAC entity +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_MacAddr_t PeerStaAddr; + IEEEtypes_AuthType_e AuthType; +} MLAN_PACK_END IEEEtypes_AuthInd_t; + +/* +** Deauthenticate request message sent from the SME to invalidate +** authentication with a specified peer MAC entity +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_MacAddr_t PeerStaAddr; + channelInfo_t DeauthChanInfo; + IEEEtypes_ReasonCode_t Reason; +} MLAN_PACK_END IEEEtypes_DeauthCmd_t; + +/* +** Deauthenticate confirm message sent from the MLME as a result of a +** deauthenticate request message; it reports the result of the +** deauthentication +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_MacAddr_t PeerStaAddr; + IEEEtypes_DeauthResult_e Result; +} MLAN_PACK_END IEEEtypes_DeauthCfrm_t; + +/* +** Deauthentication indication message sent from the MLME to report +** invalidation of an authentication with a peer MAC entity; the message +** is generated as a result of an invalidation of the authentication +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_MacAddr_t PeerStaAddr; + IEEEtypes_ReasonCode_t Reason; +} MLAN_PACK_END IEEEtypes_DeauthInd_t; + +/* +** Internal Association command constructed from the TLV based host +** command struct +*/ +typedef struct { + IEEEtypes_MacAddr_t PeerStaAddr; + IEEEtypes_CapInfo_t CapInfo; + IEEEtypes_ListenInterval_t ListenInterval; + IEEEtypes_SsId_t SsId; + IEEEtypes_DataRate_t RateSet[IEEEtypes_MAX_DATA_RATES_G]; + + UINT8 *pIeBuf; + UINT16 ieBufLen; + +} IEEEtypes_AssocCmd_t; + +/* +** Association confirm message sent from the MLME as a result of an +** association request message; it reports the result of the assoication +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_AssocResult_e Result; + IEEEtypes_AssocCmdFailurePoint_e FailurePoint; +} MLAN_PACK_END IEEEtypes_AssocCfrm_t; + +/* +** Disassociate request message sent from the SME to establish +** disassociation with an AP +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_MacAddr_t PeerStaAddr; + IEEEtypes_ReasonCode_t Reason; +} MLAN_PACK_END IEEEtypes_DisassocCmd_t; + +/* +** Disassociate confirm message sent from the MLME as a result of a +** disassociate request message; it reports the result of the +** disassociation +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_DisassocResult_e Result; +} MLAN_PACK_END IEEEtypes_DisassocCfrm_t; + +/* +** Disassociate indication message sent from the MLME to report the +** invalidation of an association relationship with a peer MAC entity; +** the message is generated as a result of an invalidation of an +** association relationship +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_MacAddr_t PeerStaAddr; + IEEEtypes_ReasonCode_t Reason; +} MLAN_PACK_END IEEEtypes_DisassocInd_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + IEEEtypes_MacAddr_t MacAddr; +} MLAN_PACK_END IEEEtypes_BssId_t; + +/* +** Start request message sent from the SME to start a new BSS; the BSS +** may be either an infrastructure BSS (with the MAC entity acting as the +** AP) or an independent BSS (with the MAC entity acting as the first +** station in the IBSS) +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_SsId_t SsId; + IEEEtypes_Bss_e BssType; + IEEEtypes_BcnInterval_t BcnPeriod; + IEEEtypes_DtimPeriod_t DtimPeriod; + IEEEtypes_SsParamElement_t SsParamSet; + IEEEtypes_PhyParamElement_t PhyParamSet; + UINT16 Reserved; + IEEEtypes_CapInfo_t CapInfo; + IEEEtypes_DataRate_t OpRateSet[IEEEtypes_MAX_DATA_RATES_G]; +#ifdef OLD_DFS + IEEEtypes_QuietElement_t Quiet_Element; + IEEEtypes_IbssDfsElement_t IBSS_DFS_Element; +#endif + channelInfo_t JoinChannel; + UINT8 *pIeBuf; + UINT16 ieBufLen; + IEEEtypes_BssId_t BssId; +} MLAN_PACK_END IEEEtypes_StartCmd_t; + +/* +** Start confirm message sent from the MLME as a result of a start request +** message; it reports the results of the BSS creation procedure +*/ +typedef MLAN_PACK_START struct { + IEEEtypes_StartResult_e Result; +} MLAN_PACK_END IEEEtypes_StartCfrm_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_MacAddr_t PeerStaAddr; +} MLAN_PACK_END IEEEtypes_TPCAdaptCmd_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_TPCAdaptResult_e Result; +} MLAN_PACK_END IEEEtypes_TPCAdaptCfrm_t; + +typedef struct { + IEEEtypes_GenHdr_t Hdr; + UINT8 Body[8]; +} IEEEtypes_Frame_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_MacAddr_t da; + IEEEtypes_MacAddr_t sa; + UINT16 type; +} MLAN_PACK_END ether_hdr_t; + +typedef MLAN_PACK_START struct { + ether_hdr_t Hdr; + UINT8 Body[1600 - 14]; +} MLAN_PACK_END IEEEtypes_8023_Frame_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElemId; + IEEEtypes_Len_t Len; + UINT8 Oui[4]; + UINT8 Data[1]; +} MLAN_PACK_END IEEEtypes_WPSElement_t; + +/*---------------------------------*/ +/* IEEE 802.11 Management Messages */ +/*---------------------------------*/ + +#define WMM_STATS_PKTS_HIST_BINS 7 + +typedef MLAN_PACK_START enum { + AckPolicy_ImmediateAck = 0, + AckPolicy_NoAck = 1, + AckPolicy_ExplicitAck = 2, + AckPolicy_BlockAck = 3, + +} MLAN_PACK_END IEEEtypes_AckPolicy_e; + +typedef MLAN_PACK_START struct { + UINT16 userPriority:3; + UINT16 reserved1:1; + UINT16 eosp:1; + IEEEtypes_AckPolicy_e ackPolicy:2; + UINT16 amsdu:1; + UINT16 reserved2:8; + +} MLAN_PACK_END IEEEtypes_QosCtl_t; + +typedef MLAN_PACK_START struct { + UINT8 Version; + UINT8 SourceIpAddr[4]; + UINT8 DestIpAddr[4]; + UINT8 SourcePort[2]; + UINT8 DestPort[2]; + UINT8 DSCP; + UINT8 Protocol; + UINT8 Reserved; + +} MLAN_PACK_END IEEEtypes_TCLAS_IPv4_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + + UINT8 UserPriority; + + UINT8 ClassifierType; + UINT8 ClassifierMask; + + MLAN_PACK_START union { + IEEEtypes_TCLAS_IPv4_t ipv4; + + } MLAN_PACK_END classifier; + +} MLAN_PACK_END IEEEtypes_TCLAS_t; + +typedef enum { + AC_BE = 0x0, + AC_BK, + AC_VI, + AC_VO, + + AC_MAX_TYPES +} IEEEtypes_WMM_AC_e; + +#define WMM_MAX_TIDS 8 +#define WMM_MAX_RX_PN_SUPPORTED 4 + +typedef MLAN_PACK_START struct { + UINT8 Aifsn:4; + UINT8 Acm:1; + UINT8 Aci:2; + UINT8 Rsvd1:1; + +} MLAN_PACK_END IEEEtypes_WMM_AC_ACI_AIFSN_t; + +typedef MLAN_PACK_START struct { + UINT8 EcwMin:4; + UINT8 EcwMax:4; + +} MLAN_PACK_END IEEEtypes_ECW_Min_Max_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_WMM_AC_ACI_AIFSN_t AciAifsn; + IEEEtypes_ECW_Min_Max_t EcwMinMax; + UINT16 TxopLimit; + +} MLAN_PACK_END IEEEtypes_WMM_AC_Parameters_t; + +typedef MLAN_PACK_START struct { + UINT8 ParamSetCount:4; + UINT8 Reserved1:3; + UINT8 QosInfoUAPSD:1; + +} MLAN_PACK_END IEEEtypes_QAP_QOS_Info_t; + +typedef MLAN_PACK_START struct { + UINT8 AC_VO:1; + UINT8 AC_VI:1; + UINT8 AC_BK:1; + UINT8 AC_BE:1; + UINT8 QAck:1; + UINT8 MaxSP:2; + UINT8 MoreDataAck:1; + +} MLAN_PACK_END IEEEtypes_QSTA_QOS_Info_t; + +typedef MLAN_PACK_START union { + IEEEtypes_QAP_QOS_Info_t QAp; + IEEEtypes_QSTA_QOS_Info_t QSta; + +} MLAN_PACK_END IEEEtypes_QOS_Info_t; + +//added for TDLS +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + IEEEtypes_QOS_Info_t QosInfo; +} MLAN_PACK_END IEEEtypes_QOS_Capability_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + UINT8 OuiType[4]; /* 00:50:f2:02 */ + UINT8 OuiSubType; /* 01 */ + UINT8 Version; + + IEEEtypes_QOS_Info_t QosInfo; + UINT8 Reserved1; + IEEEtypes_WMM_AC_Parameters_t AcParams[AC_MAX_TYPES]; + +} MLAN_PACK_END IEEEtypes_WMM_ParamElement_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + UINT8 OuiType[4]; /* 00:50:f2:02 */ + UINT8 OuiSubType; /* 00 */ + UINT8 Version; + + IEEEtypes_QOS_Info_t QosInfo; + +} MLAN_PACK_END IEEEtypes_WMM_InfoElement_t; + +typedef MLAN_PACK_START enum { + TSPEC_DIR_UPLINK = 0, + TSPEC_DIR_DOWNLINK = 1, + /* 2 is a reserved value */ + TSPEC_DIR_BIDIRECT = 3, + +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_Info_Direction_e; + +typedef MLAN_PACK_START enum { + TSPEC_PSB_LEGACY = 0, + TSPEC_PSB_TRIG = 1, + +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_Info_PSB_e; + +typedef MLAN_PACK_START enum { + /* 0 is reserved */ + TSPEC_ACCESS_EDCA = 1, + TSPEC_ACCESS_HCCA = 2, + TSPEC_ACCESS_HEMM = 3, + +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_Info_AccessPolicy_e; + +typedef MLAN_PACK_START enum { + TSPEC_ACKPOLICY_NORMAL = 0, + TSPEC_ACKPOLICY_NOACK = 1, + /* 2 is reserved */ + TSPEC_ACKPOLICY_BLOCKACK = 3, + +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e; + +typedef MLAN_PACK_START enum { + TSPEC_TRAFFIC_APERIODIC = 0, + TSPEC_TRAFFIC_PERIODIC = 1, + +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e; + +typedef MLAN_PACK_START struct { + IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType:1; + UINT8 TID:4; // ! Unique identifier + IEEEtypes_WMM_TSPEC_TS_Info_Direction_e Direction:2; + UINT8 acp_1:1; + + UINT8 acp_2:1; + UINT8 Aggregation:1; + IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PSB:1; // ! Legacy/Trigg + UINT8 UserPriority:3; // ! 802.1d User Priority + IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy:2; + + UINT8 tsinfo_0:8; +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_Info_t; + +typedef MLAN_PACK_START struct { + UINT16 Size:15; // ! Nominal size in octets + UINT16 Fixed:1; // ! 1: Fixed size given in Size, 0: Var, size + // is nominal + +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_NomMSDUSize_t; + +typedef MLAN_PACK_START struct { + UINT16 Fractional:13; // ! Fractional portion + UINT16 Whole:3; // ! Whole portion + +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_SBWA; + +typedef MLAN_PACK_START struct { + IEEEtypes_WMM_TSPEC_TS_Info_t TSInfo; + IEEEtypes_WMM_TSPEC_NomMSDUSize_t NomMSDUSize; + UINT16 MaximumMSDUSize; + UINT32 MinServiceInterval; + UINT32 MaxServiceInterval; + UINT32 InactivityInterval; + UINT32 SuspensionInterval; + UINT32 ServiceStartTime; + UINT32 MinimumDataRate; + UINT32 MeanDataRate; + UINT32 PeakDataRate; + UINT32 MaxBurstSize; + UINT32 DelayBound; + UINT32 MinPHYRate; + IEEEtypes_WMM_TSPEC_SBWA SurplusBWAllowance; + UINT16 MediumTime; +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_Body_t; + +typedef MLAN_PACK_START struct { + UINT8 ElementId; + UINT8 Len; + UINT8 OuiType[4]; /* 00:50:f2:02 */ + UINT8 OuiSubType; /* 01 */ + UINT8 Version; + + IEEEtypes_WMM_TSPEC_Body_t TspecBody; + +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_t; + +typedef MLAN_PACK_START enum { + TSPEC_ACTION_CODE_ADDTS_REQ = 0, + TSPEC_ACTION_CODE_ADDTS_RSP = 1, + TSPEC_ACTION_CODE_DELTS = 2, + +} MLAN_PACK_END IEEEtypes_WMM_Tspec_Action_e; + +typedef MLAN_PACK_START struct { + IEEEtypes_ActionCategory_e category; + IEEEtypes_WMM_Tspec_Action_e action; + UINT8 dialogToken; + +} MLAN_PACK_END IEEEtypes_WMM_Tspec_Action_Base_Tspec_t; + +/* Allocate enough space for a V4 TCLASS + a small CCX or VendSpec IE */ +#define WMM_TSPEC_EXTRA_IE_BUF_MAX (sizeof(IEEEtypes_TCLAS_t) + 6) + +typedef MLAN_PACK_START struct { + IEEEtypes_WMM_Tspec_Action_Base_Tspec_t tspecAct; + UINT8 statusCode; + IEEEtypes_WMM_TSPEC_t tspecIE; + + /* Place holder for additional elements after the TSPEC */ + UINT8 subElem[WMM_TSPEC_EXTRA_IE_BUF_MAX]; + +} MLAN_PACK_END IEEEtypes_Action_WMM_AddTsReq_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_WMM_Tspec_Action_Base_Tspec_t tspecAct; + UINT8 statusCode; + IEEEtypes_WMM_TSPEC_t tspecIE; + + /* Place holder for additional elements after the TSPEC */ + UINT8 subElem[256]; + +} MLAN_PACK_END IEEEtypes_Action_WMM_AddTsRsp_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_WMM_Tspec_Action_Base_Tspec_t tspecAct; + UINT8 reasonCode; + IEEEtypes_WMM_TSPEC_t tspecIE; + +} MLAN_PACK_END IEEEtypes_Action_WMM_DelTs_t; + +typedef MLAN_PACK_START union { + IEEEtypes_WMM_Tspec_Action_Base_Tspec_t tspecAct; + + IEEEtypes_Action_WMM_AddTsReq_t addTsReq; + IEEEtypes_Action_WMM_AddTsRsp_t addTsRsp; + IEEEtypes_Action_WMM_DelTs_t delTs; + +} MLAN_PACK_END IEEEtypes_Action_WMMAC_t; + +typedef MLAN_PACK_START struct { + IEEEtypes_MgmtHdr_t Hdr; + MLAN_PACK_START union { + IEEEtypes_Bcn_t Bcn; + IEEEtypes_DisAssoc_t DisAssoc; + IEEEtypes_AssocRqst_t AssocRqst; + IEEEtypes_AssocRsp_t AssocRsp; + IEEEtypes_ReAssocRqst_t ReAssocRqst; + IEEEtypes_ReAssocRsp_t ReAssocRsp; + IEEEtypes_ProbeRqst_t ProbeRqst; + IEEEtypes_ProbeRsp_t ProbeRsp; + IEEEtypes_Auth_t Auth; + IEEEtypes_Deauth_t Deauth; + UINT8 BodyStart; + } MLAN_PACK_END Body; + + UINT32 FCS; +} MLAN_PACK_END dot11MgtFrame_t; + +#define FCS_SIZE (4) + +#define IV_SIZE (4) +#define EIV_SIZE (4) +#define MIC_SIZE (8) +#define MIC_KEY_SIZE (8) +#define ICV_SIZE (4) +#define EXT_IV (0x20) + +#define IEEE80211_HEADER_SIZE (24) +#define QOS_CTRL_SIZE (2) +#define IEEE80211_QOSHEADER_SIZE (IEEE80211_HEADER_SIZE+QOS_CTRL_SIZE) + +#define MACHDR_n_FCS_SIZE (IEEE80211_HEADER_SIZE+FCS_SIZE) +#define QOS_MACHDR_n_FCS_SIZE (IEEE80211_QOSHEADER_SIZE+FCS_SIZE) + +#define WEPOVERHEAD (IV_SIZE+ICV_SIZE) + +#define IEEE80211_SIFS_11b (10) /* us */ +#define IEEE80211_SIFS_11g (IEEE80211_SIFS_11b) /* us */ +#define IEEE80211_SIFS_11a (16) /* us */ + +#define IEEE80211b_SHORT_PREAM (96) /* us */ +#define IEEE80211b_LONG_PREAM (192) /* us */ + +#define SIGNAL_EXTENSION (6) /* us */ + +#define TPREAMBLE (16) /* us */ +#define TSIGNAL (4) /* us */ +#define IEEE80211g_PREAM (TPREAMBLE+TSIGNAL) /* us */ +#define IEEE80211a_PREAM (IEEE80211g_PREAM ) /* us */ +#define IEEE80211n_PREAM (40) /* us */ +#define IEEE80211ac_PREAM (40) /* us */ // TBD + +#define TSYM (4) /* us */ + +#define IEEE80211_BSS_CLOCK_PPM (100) // ppm + +enum { + OTHER = 0x00, + FCC = 0x10, + IC = 0x20, + ETSI = 0x30, + SPAIN = 0x31, + FRANCE = 0x32, + JAPAN = 0x40, + JAPAN1 = 0x41, + CHINA = 0x50 +}; + +typedef enum { + RegDomain_Null = 0x00, + + RegDomain_FCC = 0x01, + RegDomain_ETSI = 0x02, + RegDomain_MIC = 0x03, + + RegDomain_Other = 0xFF, + +} RegDomain_e; + +#define IEEE_PHY_RATE_CODE_1Mbps (10) // it's the same as + // IEEE_PHY_RATE_CODE_12Mbps +#define IEEE_PHY_RATE_CODE_2Mbps (20) +#define IEEE_PHY_RATE_CODE_5_5Mbps (55) +#define IEEE_PHY_RATE_CODE_11Mbps (110) +#define IEEE_PHY_RATE_CODE_22Mbps (220) +#define IEEE_PHY_RATE_CODE_6Mbps (0x0B) +#define IEEE_PHY_RATE_CODE_9Mbps (0x0F) +#define IEEE_PHY_RATE_CODE_12Mbps (0x0A) // it's the same as + // IEEE_PHY_RATE_CODE_1Mbps +#define IEEE_PHY_RATE_CODE_18Mbps (0x0E) +#define IEEE_PHY_RATE_CODE_24Mbps (0x09) +#define IEEE_PHY_RATE_CODE_36Mbps (0x0D) +#define IEEE_PHY_RATE_CODE_48Mbps (0x08) +#define IEEE_PHY_RATE_CODE_54Mbps (0x0C) +#define IEEE_PHY_RATE_CODE_72Mbps (0x07) + +#define IEEE_PHY_RATE_CODE_1Mbps (10) // it's the same as + // IEEE_PHY_RATE_CODE_12Mbps +#define IEEE_PHY_RATE_CODE_2Mbps (20) +#define IEEE_PHY_RATE_CODE_5_5Mbps (55) +#define IEEE_PHY_RATE_CODE_11Mbps (110) +#define IEEE_PHY_RATE_CODE_22Mbps (220) + +#define IEEE_PHY_RATE_CODE_6Mbps (0x0B) +#define IEEE_PHY_RATE_CODE_9Mbps (0x0F) +#define IEEE_PHY_RATE_CODE_12Mbps (0x0A) // it's the same as + // IEEE_PHY_RATE_CODE_1Mbps +#define IEEE_PHY_RATE_CODE_18Mbps (0x0E) +#define IEEE_PHY_RATE_CODE_24Mbps (0x09) +#define IEEE_PHY_RATE_CODE_36Mbps (0x0D) +#define IEEE_PHY_RATE_CODE_48Mbps (0x08) +#define IEEE_PHY_RATE_CODE_54Mbps (0x0C) +#define IEEE_PHY_RATE_CODE_72Mbps (0x07) + +#define IEEE_PHY_RATE_CODE_MCS0 (0x00) +#define IEEE_PHY_RATE_CODE_MCS1 (0x01) +#define IEEE_PHY_RATE_CODE_MCS2 (0x02) +#define IEEE_PHY_RATE_CODE_MCS3 (0x03) +#define IEEE_PHY_RATE_CODE_MCS4 (0x04) +#define IEEE_PHY_RATE_CODE_MCS5 (0x05) +#define IEEE_PHY_RATE_CODE_MCS6 (0x06) +#define IEEE_PHY_RATE_CODE_MCS7 (0x07) + +#define IEEE_PHY_RATE_CODE_MCS8 (0x08) +#define IEEE_PHY_RATE_CODE_MCS9 (0x09) +#define IEEE_PHY_RATE_CODE_MCS10 (0x0A) +#define IEEE_PHY_RATE_CODE_MCS11 (0x0B) +#define IEEE_PHY_RATE_CODE_MCS12 (0x0C) +#define IEEE_PHY_RATE_CODE_MCS13 (0x0D) +#define IEEE_PHY_RATE_CODE_MCS14 (0x0E) +#define IEEE_PHY_RATE_CODE_MCS15 (0x0F) + +#define IEEE_PHY_RATE_CODE_MCS32 (0x20) + +typedef enum { + MOD_CLASS_INFRA = 1, + MOD_CLASS_FHSS = 2, + MOD_CLASS_HR_DSSS = 3, + MOD_CLASS_ERP_PBCC = 4, + MOD_CLASS_DSSS_OFDM = 5, + MOD_CLASS_ERP_OFDM = 6, + MOD_CLASS_OFDM = 7, + MOD_CLASS_HT = 8, + MOD_CLASS_VHT = 9, +} MOD_CLASS_e; + +typedef enum { + DSSS_1Mbps = 0 + (MOD_CLASS_HR_DSSS << 8), + DSSS_2Mbps, + DSSS_5d5Mbps, + DSSS_11Mbps, +} HR_DSSS_e; + +typedef enum { + OFDM_6Mbps = 0 + (MOD_CLASS_OFDM << 8), + OFDM_9Mbps, + OFDM_12Mbps, + OFDM_18Mbps, + OFDM_24Mbps, + OFDM_36Mbps, + OFDM_48Mbps, + OFDM_54Mbps, +} OFDM_e; + +typedef enum { + // 1x1 EM + MCS_0 = 0 + (MOD_CLASS_HT << 8), + MCS_1, + MCS_2, + MCS_3, + MCS_4, + MCS_5, + MCS_6, + MCS_7, + + // 2x2 EM + MCS_8, + MCS_9, + MCS_10, + MCS_11, + MCS_12, + MCS_13, + MCS_14, + MCS_15, + + // 3x3 EM + MCS_16, + MCS_17, + MCS_18, + MCS_19, + MCS_20, + MCS_21, + MCS_22, + MCS_23, + + // 4x4 EM + MCS_24, + MCS_25, + MCS_26, + MCS_27, + MCS_28, + MCS_29, + MCS_30, + MCS_31, + + // 1x1 EM 40MHz only + MCS_32, + + // 2x2 UEM + MCS_33, + MCS_34, + MCS_35, + MCS_36, + MCS_37, + MCS_38, + + // 3x3 UEM + MCS_39, + MCS_40, + MCS_41, + MCS_42, + MCS_43, + MCS_44, + MCS_45, + MCS_46, + MCS_47, + MCS_48, + MCS_49, + MCS_50, + MCS_51, + MCS_52, + + // 4x4 UEM + MCS_53, + MCS_54, + MCS_55, + MCS_56, + MCS_57, + MCS_58, + MCS_59, + MCS_60, + MCS_61, + MCS_62, + MCS_63, + MCS_64, + MCS_65, + MCS_66, + MCS_67, + MCS_68, + MCS_69, + MCS_70, + MCS_71, + MCS_72, + MCS_73, + MCS_74, + MCS_75, + MCS_76, + +} MCS_e; + +typedef union { + UINT16 u16; + HR_DSSS_e dsss; + OFDM_e ofdm; + MCS_e mcs; +} RATE_CODE_u; + +#define RATECODE_to_RATEID(x) (x & 0xff) + +#define IEEEtypes_STATUS_INVALID_INFO_ELEMENT 40 +#define IEEEtypes_STATUS_INVALID_AKMP 43 +#define IEEEtypes_STATUS_CIPHER_POLICY_REJECT 46 +#define IEEEtypes_STATUS_INVALID_MCAST_CIPHER 47 +#define IEEEtypes_STATUS_INVALID_UCAST_CIPHER 48 +#define IEEEtypes_STATUS_UNSUPPORT_WAPI_VERSION 49 +#define IEEEtypes_STATUS_INVALID_WAPI_CAPS 50 + +typedef MLAN_PACK_START struct { + IEEEtypes_ElementId_e ElementId; + IEEEtypes_Len_t Len; + UINT8 Data[1]; +} MLAN_PACK_END IEEEtypes_WAPIElement_t; + +#endif /* _IEEE_TYPES_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/aes_cmac.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/aes_cmac.h new file mode 100644 index 00000000..fb9c7806 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/aes_cmac.h @@ -0,0 +1,34 @@ +/** @file aes_cmac.h + * + * @brief This file contains defines for aes_cmac + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _AES_CMAC_H_ +#define _AES_CMAC_H_ + +#include "wltypes.h" +#include "aes_cmac_rom.h" + +/* ROM Pointers Init */ +extern void aes_cmacRomInit(void); + +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/aes_cmac_rom.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/aes_cmac_rom.c new file mode 100644 index 00000000..c659274b --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/aes_cmac_rom.c @@ -0,0 +1,183 @@ +/** @file aes_cmac_rom.c + * + * @brief This file defines aes cmac related function + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#include "wl_macros.h" +#include "wltypes.h" +#include "hostsa_ext_def.h" +#include "authenticator.h" + +#include "crypt_new_rom.h" +#include "aes_cmac_rom.h" + +//#pragma diag_default 144 +//#pragma arm section rwdata +// End - patch table entries + +/* For CMAC Calculation */ +static UINT8 const_Rb[16] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87 +}; + +void +mrvl_aes_128(UINT8 *key, UINT8 *input, UINT8 *output) +{ +// BOOLEAN weuEnabled; + +#if 0 + if (IS_AEU_CLK_ENBLD()) { + weuEnabled = TRUE; + } else { + weuEnabled = FALSE; + } +#endif + /* keyLen = 128 bit / 8 bits/byte / 8 for MRVL API encoding == 2 */ + MRVL_AesEncrypt(key, (128 / 8) / 8, input, output); + +} + +/* Basic Functions */ +void +xor_128(UINT8 *a, UINT8 *b, UINT8 *out) +{ + int i; + for (i = 0; i < 16; i++) { + out[i] = a[i] ^ b[i]; + } +} + +/* AES-CMAC Generation Function */ + +void +leftshift_onebit(UINT8 *input, UINT8 *output) +{ + int i; + UINT8 overflow = 0; + + for (i = 15; i >= 0; i--) { + output[i] = input[i] << 1; + output[i] |= overflow; + overflow = (input[i] & 0x80) ? 1 : 0; + } +} + +void +generate_subkey(phostsa_private priv, UINT8 *key, UINT8 *K1, UINT8 *K2) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + + UINT8 L[16]; + UINT8 Z[16]; + UINT8 tmp[16]; + + memset(util_fns, Z, 0x00, sizeof(Z)); + + mrvl_aes_128(key, Z, L); + + if ((L[0] & 0x80) == 0) { + /* If MSB(L) = 0, then K1 = L << 1 */ + leftshift_onebit(L, K1); + } else { + /* Else K1 = ( L << 1 ) (+) Rb */ + leftshift_onebit(L, tmp); + xor_128(tmp, const_Rb, K1); + } + + if ((K1[0] & 0x80) == 0) { + leftshift_onebit(K1, K2); + } else { + leftshift_onebit(K1, tmp); + xor_128(tmp, const_Rb, K2); + } +} + +void +padding(UINT8 *lastb, UINT8 *pad, int length) +{ + int j; + + /* original last block */ + for (j = 0; j < 16; j++) { + if (j < length) { + pad[j] = lastb[j]; + } else if (j == length) { + pad[j] = 0x80; + } else { + pad[j] = 0x00; + } + } +} + +void +mrvl_aes_cmac(phostsa_private priv, UINT8 *key, UINT8 *input, int length, + UINT8 *mac) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + UINT8 X[16]; + UINT8 Y[16]; + UINT8 M_last[16]; + UINT8 padded[16]; + UINT8 K1[16]; + UINT8 K2[16]; + int n, i, flag; + + generate_subkey(priv, key, K1, K2); + + n = (length + 15) / 16; /* n is number of rounds */ + + if (n == 0) { + n = 1; + flag = 0; + } else { + if ((length % 16) == 0) { + /* last block is a complete block */ + flag = 1; + } else { + /* last block is not complete block */ + flag = 0; + } + } + + if (flag) { + /* last block is complete block */ + xor_128(&input[16 * (n - 1)], K1, M_last); + } else { + padding(&input[16 * (n - 1)], padded, length % 16); + xor_128(padded, K2, M_last); + } + + memset(util_fns, X, 0x00, sizeof(X)); + + for (i = 0; i < n - 1; i++) { + xor_128(X, &input[16 * i], Y); /* Y := Mi (+) X */ + mrvl_aes_128(key, Y, X); /* X := AES-128(KEY, Y); */ + } + + xor_128(X, M_last, Y); + mrvl_aes_128(key, Y, X); + + for (i = 0; i < 16; i++) { + mac[i] = X[i]; + } +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/aes_cmac_rom.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/aes_cmac_rom.h new file mode 100644 index 00000000..3325175d --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/aes_cmac_rom.h @@ -0,0 +1,46 @@ +/** @file aes_cmac_rom.h + * + * @brief This file contains the define for aes_cmac_rom + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _AES_CMAC_ROM_H_ +#define _AES_CMAC_ROM_H_ + +#include "wltypes.h" + +extern BOOLEAN (*mrvl_aes_cmac_hook) (UINT8 *key, UINT8 *input, int length, + UINT8 *mac); +extern void mrvl_aes_cmac(phostsa_private priv, UINT8 *key, UINT8 *input, + int length, UINT8 *mac); + +extern BOOLEAN (*mrvl_aes_128_hook) (UINT8 *key, UINT8 *input, UINT8 *output); +extern void mrvl_aes_128(UINT8 *key, UINT8 *input, UINT8 *output); + +/* RAM Linkages */ +extern void (*rom_hal_EnableWEU) (void); +extern void (*rom_hal_DisableWEU) (void); + +extern void xor_128(UINT8 *a, UINT8 *b, UINT8 *out); +extern void leftshift_onebit(UINT8 *input, UINT8 *output); +extern void padding(UINT8 *lastb, UINT8 *pad, int length); + +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/crypt_new.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/crypt_new.h new file mode 100644 index 00000000..de716cfb --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/crypt_new.h @@ -0,0 +1,77 @@ +/** @file crypt_new.h + * + * @brief This file contains define for rc4 decrypt/encrypt + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +/* + * AES API header file + * + */ + +#ifndef _CRYPT_NEW_H_ +#define _CRYPT_NEW_H_ + +#include "crypt_new_rom.h" + +/* forward decl */ +typedef void (*MRVL_ENDECRYPT_FUNC_p) (MRVL_ENDECRYPT_t *enDeCrypt, int *pErr); +#if 0 +#if (HW_IP_AEU_VERSION < 100000) + +#ifdef WAPI_HW_SUPPORT +extern void MRVL_WapiEncrypt(MRVL_ENDECRYPT_t *crypt, int *pErr); +extern void MRVL_WapiDecrypt(MRVL_ENDECRYPT_t *crypt, int *pErr); + +#define MRVL_WAPI_ENCRYPT MRVL_WapiEncrypt +#define MRVL_WAPI_DECRYPT MRVL_WapiDecrypt +#endif + +#ifdef DIAG_AES_CCM +#define MRVL_AES_CCM_ENCRYPT MRVL_AesCCMEncrypt +#define MRVL_AES_CCM_DECRYPT MRVL_AesCCMDecrypt +#endif + +#endif /* (HW_IP_AEU_VERSION < 100000) */ +#endif +#define MRVL_AES_PRIMITIVE_ENCRYPT MRVL_AesPrimitiveEncrypt +#define MRVL_AES_PRIMITIVE_DECRYPT MRVL_AesPrimitiveDecrypt +#define MRVL_AES_WRAP_ENCRYPT MRVL_AesWrapEncrypt +#define MRVL_AES_WRAP_DECRYPT MRVL_AesWrapDecrypt + +#ifdef RC4 + +#define MRVL_RC4_ENCRYPT MRVL_Rc4Cryption +#define MRVL_RC4_DECRYPT MRVL_Rc4Cryption + +#endif /* RC4 */ + +typedef struct { + MRVL_ENDECRYPT_e action; + MRVL_ENDECRYPT_FUNC_p pActionFunc; + +} MRVL_ENDECRYPT_SETUP_t; + +extern MRVL_ENDECRYPT_SETUP_t mrvlEnDecryptSetup[2][6]; + +extern void cryptNewRomInit(void); + +#endif /* _CRYPT_NEW_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/crypt_new_rom.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/crypt_new_rom.c new file mode 100644 index 00000000..d4d08290 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/crypt_new_rom.c @@ -0,0 +1,879 @@ +/** @file crypt_new_rom.c + * + * @brief This file defines AES based functions. + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +/* + * AES based functions + * + * - AES Key Wrap algorithm (128-bit KEK) (RFC-3394) + * - AES primitive algorithm + * - AES CCM algorithm + * + * Date: 11/01/2005 + */ +#include "wltypes.h" +#include "crypt_new_rom.h" +#include "rc4_rom.h" +#include "rijndael.h" + +#include "hostsa_ext_def.h" +#include "authenticator.h" + +static const UINT8 MRVL_DEFAULT_IV[8] = { 0xA6, 0xA6, 0xA6, 0xA6, + 0xA6, 0xA6, 0xA6, 0xA6 +}; + +UINT8 aesResult[32]; + +/* MRVL_AES_MEMCMP + * : similiar to memcmp in std c lib + * @dst : dst ptr to be compared to + * @src : src ptr to be compared from + * @len : size of the comparison + * + * ASSUMPTION : dst/src has to be valid data ptrs + */ +int +MRVL_AES_MEMCMP(UINT8 *dst, UINT8 *src, int len) +{ + int cnt = len; + + while (len--) { + if (*dst++ == *src++) { + cnt--; + } + } + + if (0 == cnt) { + return 0; /* dst == src */ + } + + return -1; /* dst != src */ +} + +/* MRVL_AES_MEMSET + * : similiar to memset in std c lib + * @dst : dst starting pointer + * @val : val to be set + * @size : size of dst buffer to be set + * + * ASSUMPTION : dst buffer must always have larger than the value of size + */ +void +MRVL_AES_MEMSET(UINT8 *dst, UINT8 val, int size) +{ + while (size--) { + *dst++ = val; + } +} + +/* MRVL_AES_MEMCPY + * : similar to memcpy in std c lib + * @dst : dst buffer starting ptr + * @src : src buffer starting ptr + * @size : size of copy + * + * ASSUMPTION : + * 1: dst buffer must be larger than src + size of copy + * 2: dst buffer isn't overlapping src buffer + */ +void +MRVL_AES_MEMCPY(UINT8 *dst, UINT8 *src, int size) +{ + if (dst < src) { + while (size) { + *dst++ = *src++; + size--; + } + } else { + while (size) { + *(dst + size - 1) = *(src + size - 1); + size--; + } + } +} + +int +MRVL_AesInterCheck(UINT8 *inter, UINT8 *d) +{ + if (0 == MRVL_AES_MEMCMP(inter, d, 16)) { + return 0; + } + + return -1; +} + +#ifdef WAR_ROM_BUG64609_SUPPORT_24_32_BYTES_KEY_LENGTH +extern const u8 Te4[256]; +extern const u32 rcon[]; +extern const u32 Td0[256]; +extern const u32 Td1[256]; +extern const u32 Td2[256]; +extern const u32 Td3[256]; +#define GETU32(pt) (((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ ((u32)(pt)[2] << 8) ^ ((u32)(pt)[3])) + +static int +rijndaelKeySetupEnc_2(u32 rk[ /* 4*(Nr + 1) */ ], const u8 cipherKey[], + int keyBits) +{ + int i = 0; + u32 temp; + + rk[0] = GETU32(cipherKey); + rk[1] = GETU32(cipherKey + 4); + rk[2] = GETU32(cipherKey + 8); + rk[3] = GETU32(cipherKey + 12); + if (keyBits == 128) { + for (;;) { + temp = rk[3]; + rk[4] = rk[0] ^ + (Te4[(temp >> 16) & 0xff] << 24) ^ + (Te4[(temp >> 8) & 0xff] << 16) ^ + (Te4[(temp) & 0xff] << 8) ^ + (Te4[(temp >> 24)]) ^ rcon[i]; + rk[5] = rk[1] ^ rk[4]; + rk[6] = rk[2] ^ rk[5]; + rk[7] = rk[3] ^ rk[6]; + if (++i == 10) { + return 10; + } + rk += 4; + } + } + + /** Handle 24 bytes key length */ + rk[4] = GETU32(cipherKey + 16); + rk[5] = GETU32(cipherKey + 20); + if (keyBits == 192) { + for (;;) { + temp = rk[5]; + rk[6] = rk[0] ^ + (Te4[(temp >> 16) & 0xff] << 24) ^ + (Te4[(temp >> 8) & 0xff] << 16) ^ + (Te4[(temp) & 0xff] << 8) ^ + (Te4[(temp >> 24)]) ^ rcon[i]; + rk[7] = rk[1] ^ rk[6]; + rk[8] = rk[2] ^ rk[7]; + rk[9] = rk[3] ^ rk[8]; + if (++i == 8) { + return 12; + } + rk[10] = rk[4] ^ rk[9]; + rk[11] = rk[5] ^ rk[10]; + rk += 6; + } + } + + /** Handle 32 bytes key length */ + rk[6] = GETU32(cipherKey + 24); + rk[7] = GETU32(cipherKey + 28); + if (keyBits == 256) { + for (;;) { + temp = rk[7]; + rk[8] = rk[0] ^ + (Te4[(temp >> 16) & 0xff] << 24) ^ + (Te4[(temp >> 8) & 0xff] << 16) ^ + (Te4[(temp) & 0xff] << 8) ^ + (Te4[(temp >> 24)]) ^ rcon[i]; + rk[9] = rk[1] ^ rk[8]; + rk[10] = rk[2] ^ rk[9]; + rk[11] = rk[3] ^ rk[10]; + if (++i == 7) { + return 14; + } + temp = rk[11]; + rk[12] = rk[4] ^ + (Te4[(temp >> 24)] << 24) ^ + (Te4[(temp >> 16) & 0xff] << 16) ^ + (Te4[(temp >> 8) & 0xff] << 8) ^ + (Te4[(temp) & 0xff]); + rk[13] = rk[5] ^ rk[12]; + rk[14] = rk[6] ^ rk[13]; + rk[15] = rk[7] ^ rk[14]; + rk += 8; + } + } + return 0; +} + +static int +rijndaelKeySetupDec_2(u32 rk[ /* 4*(Nr + 1) */ ], const u8 cipherKey[], + int keyBits, int have_encrypt) +{ + int Nr, i, j; + u32 temp; + + if (have_encrypt) { + Nr = have_encrypt; + } else { + /* expand the cipher key: */ + Nr = rijndaelKeySetupEnc_2(rk, cipherKey, keyBits); + } + /* invert the order of the round keys: */ + for (i = 0, j = 4 * Nr; i < j; i += 4, j -= 4) { + temp = rk[i]; + rk[i] = rk[j]; + rk[j] = temp; + temp = rk[i + 1]; + rk[i + 1] = rk[j + 1]; + rk[j + 1] = temp; + temp = rk[i + 2]; + rk[i + 2] = rk[j + 2]; + rk[j + 2] = temp; + temp = rk[i + 3]; + rk[i + 3] = rk[j + 3]; + rk[j + 3] = temp; + } + /* apply the inverse MixColumn transform to all round keys but the + first and the last: */ + for (i = 1; i < Nr; i++) { + rk += 4; + rk[0] = Td0[Te4[(rk[0] >> 24)]] ^ + Td1[Te4[(rk[0] >> 16) & 0xff]] ^ + Td2[Te4[(rk[0] >> 8) & 0xff]] ^ + Td3[Te4[(rk[0]) & 0xff]]; + rk[1] = Td0[Te4[(rk[1] >> 24)]] ^ + Td1[Te4[(rk[1] >> 16) & 0xff]] ^ + Td2[Te4[(rk[1] >> 8) & 0xff]] ^ + Td3[Te4[(rk[1]) & 0xff]]; + rk[2] = Td0[Te4[(rk[2] >> 24)]] ^ + Td1[Te4[(rk[2] >> 16) & 0xff]] ^ + Td2[Te4[(rk[2] >> 8) & 0xff]] ^ + Td3[Te4[(rk[2]) & 0xff]]; + rk[3] = Td0[Te4[(rk[3] >> 24)]] ^ + Td1[Te4[(rk[3] >> 16) & 0xff]] ^ + Td2[Te4[(rk[3] >> 8) & 0xff]] ^ + Td3[Te4[(rk[3]) & 0xff]]; + } + return Nr; +} + +static void +rijndael_set_key_2(rijndael_ctx *ctx, u8 *key, int bits, int encrypt) +{ + ctx->Nr = rijndaelKeySetupEnc_2(ctx->key, key, bits); + if (encrypt) { + ctx->decrypt = 0; + } else { + ctx->decrypt = 1; + rijndaelKeySetupDec_2(ctx->key, key, bits, ctx->Nr); + /**bt_test :: TBD */ + } +} +#endif /** WAR_ROM_BUG64609_SUPPORT_24_32_BYTES_KEY_LENGTH */ + +/* + * AesEncrypt : aes primitive encryption + * + * @kek : key encryption key + * @kekLen : kek len + * @data : data pointer + * + * ASSUMPTION : both src and dst buffer has to be 16 bytes or 128-bit + */ +int +MRVL_AesEncrypt(UINT8 *kek, UINT8 kekLen, UINT8 *data, UINT8 *ret) +{ + // BufferDesc_t * pDesc = NULL; + UINT8 buf[400] = { 0 }; + rijndael_ctx *ctx; +#if 0 // !defined(REMOVE_PATCH_HOOKS) + int ptr_val; + + if (MRVL_AesEncrypt_hook(kek, kekLen, data, ret, &ptr_val)) { + return ptr_val; + } +#endif +#if 0 + /* Wait forever ensures a buffer */ + pDesc = (BufferDesc_t *) bml_AllocBuffer(ramHook_encrPoolConfig, + 400, BML_WAIT_FOREVER); +#endif + // ctx = (rijndael_ctx *)BML_DATA_PTR(pDesc); + ctx = (rijndael_ctx *)buf; +#ifdef WAR_ROM_BUG64609_SUPPORT_24_32_BYTES_KEY_LENGTH + rijndael_set_key_2(ctx, (UINT8 *)kek, kekLen * 64, 1); +#else + rijndael_set_key(ctx, (UINT8 *)kek, kekLen * 64, 1); +#endif /** WAR_ROM_BUG64609_SUPPORT_24_32_BYTES_KEY_LENGTH */ + rijndael_encrypt(ctx, data, ret); +// bml_FreeBuffer((UINT32)pDesc); + + return 0; +} + +/**************************************************************** + * AES_WRAP : AES_WRAP is specified by RFC 3394 section 2.2.1 + * + * Inputs : plaintest, n 64-bit values {P1, P2, ..., Pn}, and + * Key, K (the KEK) + * Outputs : ciphertext, (n+1) 64-bit values {C0, ..., Cn} + * + * NOTE: this function is ported over from WPA_SUPPLICANT + **************************************************************** + * + * @kek : key encryption key + * @kekLen : kek len, in unit of 64-bit, has to be 2, 3, or 4 + * @n : length of the wrapped key in 64-bit + * unit; e.g.: 2 = 128-bit = 16 bytes + * @plain : plaintext key to be wrapped, has to be n * (64-bit) + * or n * 8 bytes + * @cipher : wrapped key, (n + 1) * 64-bit or (n+1) * 8 bytes + */ + +/* debugging */ + +int +MRVL_AesWrap(UINT8 *kek, UINT8 kekLen, UINT32 n, + UINT8 *plain, UINT8 *keyIv, UINT8 *cipher) +{ + UINT8 a[8]; + UINT8 b[16]; + int i = 0; + int j = 0; + UINT8 *r = NULL; +#if 0 // !defined(REMOVE_PATCH_HOOKS) + int ptr_val; + + if (MRVL_AesWrap_hook(kek, kekLen, n, plain, keyIv, cipher, &ptr_val)) { + return ptr_val; + } +#endif + + /* 0: before everything, check n value */ + if (1 > n) { + return -1; + } + + r = cipher + 8; + + /* 1: initialize variables */ + MRVL_AES_MEMSET(b, 0x0, 16); + if (keyIv) { + MRVL_AES_MEMCPY(a, keyIv, 8); + } else { + MRVL_AES_MEMCPY(a, (UINT8 *)MRVL_DEFAULT_IV, 8); + } + MRVL_AES_MEMCPY(r, plain, (8 * n)); + + /* 2: calculate intermediate values For j = 0 to 5 For i=1 to n B = + AES(K, A | R[i]) A = MSB(64, B) ^ t where t = (n*j)+i R[i] = LSB(64, + B) */ + for (j = 0; j <= 5; j++) { + r = cipher + 8; + for (i = 1; i <= n; i++) { + MRVL_AES_MEMCPY(b, a, 8); + MRVL_AES_MEMCPY(b + 8, r, 8); + MRVL_AesEncrypt(kek, kekLen, b, b); + MRVL_AES_MEMCPY(a, b, 8); + a[7] ^= n * j + i; + MRVL_AES_MEMCPY(r, b + 8, 8); + r += 8; + } + } + + MRVL_AES_MEMCPY(cipher, a, 8); + + /* 3: output the results these are already in @cipher */ + + return 0; +} + +/**************************************************************** + * AES_UNWRAP : AES_UNWRAP is specified by RFC 3394 section 2.2.2 + * + * Inputs : ciphertext, (n+1) 64-bit values {C0, ..., Cn}, and + * Key, K (the KEK) + * + * Outputs : plaintest, n 64-bit values {P1, P2, ..., Pn} + first 8 bytes + * for KEYIV + * + * + **************************************************************** + * + * @kek : key encryption key + * @kekLen : kek len, in unit of 64-bit, has to be 2, 3, or 4 + * @n : length of the wrapped key in 64-bit + * unit; e.g.: 2 = 128-bit = 16 bytes + * @cipher : wrapped data, (n + 1) * 64-bit or (n+1) * 8 bytes + * @plain : plaintext being unwrapped, has to be n * (64-bit) + * or n * 8 bytes + extra 8 bytes for KEYIV + */ +int +MRVL_AesUnWrap(UINT8 *kek, UINT8 kekLen, UINT32 n, + UINT8 *cipher, UINT8 *keyIv, UINT8 *plain) +{ + UINT8 b[16]; + int i = 0; + int j = 0; + UINT8 a[8]; + UINT8 *r = NULL; + // BufferDesc_t * pDesc = NULL; + UINT8 buf[400] = { 0 }; + + rijndael_ctx *ctx; +#if 0 // !defined(REMOVE_PATCH_HOOKS) + int ptr_val; + + if (MRVL_AesUnWrap_hook(kek, kekLen, n, cipher, keyIv, plain, &ptr_val)) { + return ptr_val; + } +#endif + + /* 0: before everything, check n value */ + if (1 > n) { + return -1; + } + + /* 1: initialize variables */ + MRVL_AES_MEMSET(a, 0x0, 8); + MRVL_AES_MEMSET(b, 0x0, 16); + MRVL_AES_MEMCPY(a, cipher, 8); + r = plain; + MRVL_AES_MEMCPY(r, cipher + 8, 8 * n); +#if 0 + /* Wait forever ensures a buffer */ + pDesc = (BufferDesc_t *) bml_AllocBuffer(ramHook_encrPoolConfig, + 400, BML_WAIT_FOREVER); +#endif + // ctx = (rijndael_ctx *)BML_DATA_PTR(pDesc); + ctx = (rijndael_ctx *)buf; +#ifdef WAR_ROM_BUG64609_SUPPORT_24_32_BYTES_KEY_LENGTH + rijndael_set_key_2(ctx, (UINT8 *)kek, kekLen * 64, 0); +#else + rijndael_set_key(ctx, (UINT8 *)kek, kekLen * 64, 0); +#endif /** WAR_ROM_BUG64609_SUPPORT_24_32_BYTES_KEY_LENGTH */ + + /* 2: compute intermediate values For j = 5 to 0 For i = n to 1 B = + AES-1(K, (A ^ t) | R[i]) where t = n*j+i A = MSB(64, B) R[i] = + LSB(64, B) */ + for (j = 5; j >= 0; j--) { + r = plain + (n - 1) * 8; + for (i = n; i >= 1; i--) { + MRVL_AES_MEMCPY(b, a, 8); + b[7] ^= n * j + i; + MRVL_AES_MEMCPY(b + 8, r, 8); + + rijndael_decrypt(ctx, b, b); + + MRVL_AES_MEMCPY(a, b, 8); + MRVL_AES_MEMCPY(r, b + 8, 8); + r -= 8; + } + } + +// bml_FreeBuffer((UINT32)pDesc); + + /* 3: copy decrypted KeyIV to keyIv array */ + if (keyIv) { + if (MRVL_AES_MEMCMP(keyIv, a, 8)) { + return -1; + } + } else { + if (MRVL_AES_MEMCMP((UINT8 *)MRVL_DEFAULT_IV, a, 8)) { + return -1; + } + } + + return 0; +} + +#if 0 +/***** + * AES CRYPTION HELPER FUNCTIONS + * + */ +int +MRVL_AesValidateHostRequest(UINT32 *pBitMap, UINT8 *pCmdPtr, + UINT8 *pCryptData, SINT8 *AESwrapEnc) +{ + host_MRVL_AES_CRYPT_t *pLocal = NULL; + MrvlIEParamSet_t *pLocalIEParam = NULL; +#if 0 // !defined(REMOVE_PATCH_HOOKS) + int ptr_val; + + if (MRVL_AesValidateHostRequest_hook(pBitMap, + pCmdPtr, + pCryptData, + AESwrapEnc, &ptr_val)) { + return ptr_val; + } +#endif + + if (NULL == pBitMap || NULL == pCmdPtr) { + return -1; + } + + pLocal = (host_MRVL_AES_CRYPT_t *) pCmdPtr; + pLocalIEParam = (MrvlIEParamSet_t *)&(pLocal->aesTlv); + if ((0 != pLocal->action) && (0x1 != pLocal->action)) { + *pBitMap |= MRVL_AES_NOT_EN_AND_DECRYPT; + } + + if (0 == pLocal->action) { + ((MRVL_ENDECRYPT_t *)pCryptData)->enDeAction = CRYPT_DECRYPT; + } else if (1 == pLocal->action) { + ((MRVL_ENDECRYPT_t *)pCryptData)->enDeAction = CRYPT_ENCRYPT; + } + switch (pLocal->algorithm) { + case MRVL_CRYPTO_TEST_RC4: + if ((1 > (pLocal->keyIVLen + pLocal->keyLen)) || + (256 < (pLocal->keyIVLen + pLocal->keyLen))) { + *pBitMap |= MRVL_AES_KEY_IV_INVALID_RC4; + } + break; + case MRVL_CRYPTO_TEST_AES_ECB: + if ((16 != pLocal->keyLen) && + (24 != pLocal->keyLen) && (32 != pLocal->keyLen)) { + *pBitMap |= MRVL_AES_KEY_SIZE_INVALID; + } + + if ((16 != pLocalIEParam->Length)) { + *pBitMap |= MRVL_AES_DATA_SIZE_INVALID; + } + break; + case MRVL_CRYPTO_TEST_AES_WRAP: + if (8 != pLocal->keyIVLen) { + *pBitMap |= MRVL_AES_KEY_IV_INVALID_AES_WRAP; + } + + if ((16 != pLocal->keyLen) && + (24 != pLocal->keyLen) && (32 != pLocal->keyLen)) { + *pBitMap |= MRVL_AES_KEY_SIZE_INVALID; + } + + if ((1016 < pLocalIEParam->Length) || + (8 > pLocalIEParam->Length)) { + *pBitMap |= MRVL_AES_DATA_SIZE_INVALID; + } + + if (1 == pLocal->action) { /* Encryption */ + *AESwrapEnc = 8; + } else if (0 == pLocal->action) { /* Decryption */ + *AESwrapEnc = -8; + } + break; +#ifdef DIAG_AES_CCM + case MRVL_CRYPTO_TEST_AEC_CCM: + { + host_MRVL_AES_CCM_CRYPT_t *pLocalCCM + = (host_MRVL_AES_CCM_CRYPT_t *) pCmdPtr; + + pLocalIEParam = + (MrvlIEParamSet_t *)&(pLocalCCM->aesTlv); + + /* key length should be 16 */ + if ((16 != pLocalCCM->keyLen) && + (24 != pLocalCCM->keyLen) && + (32 != pLocalCCM->keyLen)) { + *pBitMap |= MRVL_AES_KEY_SIZE_INVALID; + } + + /* nonce length 7 ~ 13 bytes */ + if ((pLocalCCM->nonceLen < 7) || + (pLocalCCM->nonceLen > 13)) { + *pBitMap |= MRVL_AES_NONCE_INVALID; + } + + /* AAD length 0 ~ 30 bytes */ + if (pLocalCCM->aadLen > 30) { + *pBitMap |= MRVL_AES_AAD_INVALID; + } + + /* payload length 0 ~ 32 bytes */ + if (40 < pLocalIEParam->Length) { + *pBitMap |= MRVL_AES_DATA_SIZE_INVALID; + } + } + break; +#endif +#ifdef WAPI_HW_SUPPORT + case MRVL_CRYPTO_TEST_WAPI: + { + host_MRVL_WAPI_CRYPT_t *pLocalWAPI + = (host_MRVL_WAPI_CRYPT_t *) pCmdPtr; + + /* key length should be 16 */ + if (pLocalWAPI->keyLen != 32) { + *pBitMap |= MRVL_AES_KEY_SIZE_INVALID; + } + + /* nonce length 16 bytes */ + if (pLocalWAPI->nonceLen != 16) { + *pBitMap |= MRVL_AES_NONCE_INVALID; + } + + /* AAD length 32 or 48 bytes */ + if ((pLocalWAPI->aadLen != 32) && + (pLocalWAPI->aadLen != 48)) { + *pBitMap |= MRVL_AES_AAD_INVALID; + } + } + break; +#endif + default: + *pBitMap |= MRVL_AES_ALGORITHM_INVALID; + break; + } + + /* put the buffer ptr to cryptdata */ + ((MRVL_ENDECRYPT_t *)pCryptData)->pData = pCmdPtr; + + return 0; +} + +/************** + * WRAPPER to do AES primitive encryption + */ +void +MRVL_AesPrimitiveEncrypt(MRVL_ENDECRYPT_t *crypt, int *pErr) +{ + UINT8 *kek = NULL; + UINT8 *data = NULL; + UINT8 kekLen = 0; + host_MRVL_AES_CRYPT_t *pLocal = NULL; + MrvlIEAesCrypt_t *pLocalIEParam = NULL; + +#if 0 // !defined(REMOVE_PATCH_HOOKS) + if (MRVL_AesPrimitiveEncrypt_hook(crypt, pErr)) { + return; + } +#endif + + if ((NULL == pErr) || (NULL == crypt)) { + *pErr = -1; + return; + } + + *pErr = 0; + + if ((CRYPT_ENCRYPT != crypt->enDeAction)) { + *pErr = -1; + return; + } + + pLocal = (host_MRVL_AES_CRYPT_t *) (crypt->pData); + pLocalIEParam = (MrvlIEAesCrypt_t *)&(pLocal->aesTlv); + + kek = (UINT8 *)(pLocal->key); + kekLen = pLocal->keyLen; + data = (UINT8 *)(pLocalIEParam->payload); + + if (-1 == MRVL_AesEncrypt(kek, kekLen / 8, data, data)) { + *pErr = -1; + return; + } +} + +void +MRVL_AesPrimitiveDecrypt(MRVL_ENDECRYPT_t *crypt, int *pErr) +{ + UINT8 *kek = NULL; + UINT8 *data = NULL; + UINT8 kekLen = 0; + host_MRVL_AES_CRYPT_t *pLocal = NULL; + MrvlIEAesCrypt_t *pLocalIEParam = NULL; + BufferDesc_t *pDesc; + rijndael_ctx *ctx; + +#if 0 // !defined(REMOVE_PATCH_HOOKS) + if (MRVL_AesPrimitiveDecrypt_hook(crypt, pErr)) { + return; + } +#endif + + if ((NULL == pErr) || (NULL == crypt)) { + *pErr = -1; + return; + } + + if ((CRYPT_DECRYPT != crypt->enDeAction)) { + *pErr = -1; + return; + } + + pLocal = (host_MRVL_AES_CRYPT_t *) (crypt->pData); + pLocalIEParam = (MrvlIEAesCrypt_t *)&(pLocal->aesTlv); + + kek = (UINT8 *)(pLocal->key); + kekLen = pLocal->keyLen; + data = (UINT8 *)(pLocalIEParam->payload); +#if 0 + /* Wait forever ensures a buffer */ + pDesc = (BufferDesc_t *) bml_AllocBuffer(ramHook_encrPoolConfig, + 400, BML_WAIT_FOREVER); +#endif + ctx = (rijndael_ctx *)BML_DATA_PTR(pDesc); + +#ifdef WAR_ROM_BUG64609_SUPPORT_24_32_BYTES_KEY_LENGTH + rijndael_set_key_2(ctx, (UINT8 *)kek, kekLen * 8, 0); +#else + rijndael_set_key(ctx, (UINT8 *)kek, kekLen * 8, 0); +#endif /** WAR_ROM_BUG64609_SUPPORT_24_32_BYTES_KEY_LENGTH */ + + rijndael_decrypt(ctx, data, data); + bml_FreeBuffer((UINT32)pDesc); + + *pErr = 0; + +} + +void +MRVL_AesWrapEncrypt(MRVL_ENDECRYPT_t *crypt, int *pErr) +{ + UINT8 *kek = NULL; + UINT8 *data = NULL; + UINT8 *keyIV = NULL; + UINT8 kekLen = 0; + UINT32 dataLen = 0; + host_MRVL_AES_CRYPT_t *pLocal = NULL; + MrvlIEAesCrypt_t *pLocalIEParam = NULL; + +#if 0 // !defined(REMOVE_PATCH_HOOKS) + if (MRVL_AesWrapEncrypt_hook(crypt, pErr)) { + return; + } +#endif + + if ((NULL == pErr) || (NULL == crypt)) { + *pErr = -1; + return; + } + + *pErr = 0; + + if ((CRYPT_ENCRYPT != crypt->enDeAction)) { + *pErr = -1; + return; + } + + pLocal = (host_MRVL_AES_CRYPT_t *) (crypt->pData); + pLocalIEParam = (MrvlIEAesCrypt_t *)&(pLocal->aesTlv); + + kek = (UINT8 *)(pLocal->key); + keyIV = (UINT8 *)(pLocal->keyIV); + kekLen = pLocal->keyLen; + data = (UINT8 *)(pLocalIEParam->payload); + dataLen = pLocalIEParam->hdr.Length; + /* need to add one more 8-bytes for return length */ + pLocalIEParam->hdr.Length = dataLen + 8; + + if (-1 == + MRVL_AesWrap(kek, kekLen / 8, dataLen / 8, data, keyIV, + aesResult)) { + *pErr = -2; + return; + } + + MRVL_AES_MEMCPY(data, aesResult, pLocalIEParam->hdr.Length); +} + +void +MRVL_AesWrapDecrypt(MRVL_ENDECRYPT_t *crypt, int *pErr) +{ + UINT8 *kek = NULL; + UINT8 *keyIV = NULL; + UINT8 *data = NULL; + UINT8 kekLen = 0; + UINT32 dataLen = 0; + host_MRVL_AES_CRYPT_t *pLocal = NULL; + MrvlIEAesCrypt_t *pLocalIEParam = NULL; + +#if 0 // !defined(REMOVE_PATCH_HOOKS) + if (MRVL_AesWrapDecrypt_hook(crypt, pErr)) { + return; + } +#endif + + if ((NULL == pErr) || (NULL == crypt)) { + *pErr = -1; + return; + } + + *pErr = 0; + + if ((CRYPT_DECRYPT != crypt->enDeAction)) { + *pErr = -1; + return; + } + + pLocal = (host_MRVL_AES_CRYPT_t *) (crypt->pData); + pLocalIEParam = (MrvlIEAesCrypt_t *)&(pLocal->aesTlv); + + kek = (UINT8 *)(pLocal->key); + keyIV = (UINT8 *)(pLocal->keyIV); + kekLen = pLocal->keyLen; + data = (UINT8 *)(pLocalIEParam->payload); + dataLen = pLocalIEParam->hdr.Length; + + if (-1 == MRVL_AesUnWrap(kek, kekLen / 8, dataLen / 8 - 1, + data, keyIV, aesResult)) { + *pErr = -2; + return; + } + + dataLen -= 8; + pLocalIEParam->hdr.Length = dataLen; + MRVL_AES_MEMCPY(data, aesResult, dataLen); + +} +#endif +#ifdef RC4 + +void +MRVL_Rc4Cryption(void *priv, MRVL_ENDECRYPT_t *crypt, int *pErr) +{ + host_MRVL_AES_CRYPT_t *pLocal = NULL; + MrvlIEAesCrypt_t *pLocalIEParam = NULL; + UINT8 *key = NULL; + UINT8 *keyIV = NULL; + UINT8 *data = NULL; + UINT32 dataLen = 0; + + if ((NULL == pErr) || (NULL == crypt)) { + *pErr = -1; + return; + } + + *pErr = 0; + + /* since RC4 encrypt/decrypt are the same */ + if ((CRYPT_DECRYPT != crypt->enDeAction) && + (CRYPT_ENCRYPT != crypt->enDeAction)) { + *pErr = -2; + return; + } + + pLocal = (host_MRVL_AES_CRYPT_t *) (crypt->pData); + pLocalIEParam = (MrvlIEAesCrypt_t *)&(pLocal->aesTlv); + + key = (UINT8 *)(pLocal->key); + data = (UINT8 *)(pLocalIEParam->payload); + keyIV = (UINT8 *)(pLocal->keyIV); + dataLen = pLocalIEParam->hdr.Length; + + RC4_Encrypt(priv, key, keyIV, pLocal->keyIVLen, data, dataLen, 0); + + return; +} +#endif /* RC4 */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/crypt_new_rom.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/crypt_new_rom.h new file mode 100644 index 00000000..f9ce4fd2 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/crypt_new_rom.h @@ -0,0 +1,167 @@ +/** @file crypt_new_rom.c + * + * @brief This file contains the api for AES based functions + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _CRYPT_NEW_ROM_H_ +#define _CRYPT_NEW_ROM_H_ + +#define MRVL_AES_CMD_REQUEST_TYPE_INVALID (1) +#define MRVL_AES_ALGORITHM_INVALID (1<<1) +#define MRVL_AES_KEY_SIZE_INVALID (1<<2) +#define MRVL_AES_KEY_IV_SIZE_INVALID (1<<3) +#define MRVL_AES_ENCRYPT_DATA_OVER_127 (1<<4) +#define MRVL_AES_ENCRYPT_DATA_LESS_2 (1<<5) +#define MRVL_AES_NOT_EN_AND_DECRYPT (1<<6) +#define MRVL_AES_KEY_IV_INVALID_AES (1<<7) +#define MRVL_AES_KEY_IV_INVALID_AES_WRAP (1<<8) +#define MRVL_AES_KEY_IV_INVALID_RC4 (1<<9) +#define MRVL_AES_DATA_SIZE_INVALID (1<<10) + +#define MRVL_AES_NONCE_INVALID (1<<11) +#define MRVL_AES_AAD_INVALID (1<<12) + +#define host_AES_ENCRYPT 0x1 +#define host_AES_DECRYPT 0x0 + +#define MRVL_CRYPTO_TEST_RC4 1 +#define MRVL_CRYPTO_TEST_AES_ECB 2 +#define MRVL_CRYPTO_TEST_AES_WRAP 3 +#define MRVL_CRYPTO_TEST_AEC_CCM 4 +#define MRVL_CRYPTO_TEST_WAPI 5 + +/* basic data structs to support AES feature */ +/* enum for encrypt/decrypt */ +typedef enum { + CRYPT_DECRYPT = 0, + CRYPT_ENCRYPT = 1, + CRYPT_UNKNOWN +} MRVL_ENDECRYPT_e; + +/* data strcut to hold action type and data to be processed */ +typedef struct { + UINT8 enDeAction; /* encrypt or decrypt */ + UINT8 *pData; +} MRVL_ENDECRYPT_t; + +#ifdef WAPI_HW_SUPPORT +extern void MRVL_WapiEncrypt(MRVL_ENDECRYPT_t *crypt, int *pErr); +extern void MRVL_WapiDecrypt(MRVL_ENDECRYPT_t *crypt, int *pErr); +#endif + +extern BOOLEAN (*MRVL_AesPrimitiveEncrypt_hook) (MRVL_ENDECRYPT_t *crypt, + int *pErr); +extern void MRVL_AesPrimitiveEncrypt(MRVL_ENDECRYPT_t *crypt, int *pErr); + +extern BOOLEAN (*MRVL_AesPrimitiveDecrypt_hook) (MRVL_ENDECRYPT_t *crypt, + int *pErr); +extern void MRVL_AesPrimitiveDecrypt(MRVL_ENDECRYPT_t *crypt, int *pErr); + +extern BOOLEAN (*MRVL_AesWrapEncrypt_hook) (MRVL_ENDECRYPT_t *crypt, int *pErr); +extern void MRVL_AesWrapEncrypt(MRVL_ENDECRYPT_t *crypt, int *pErr); + +extern BOOLEAN (*MRVL_AesWrapDecrypt_hook) (MRVL_ENDECRYPT_t *crypt, int *pErr); +extern void MRVL_AesWrapDecrypt(MRVL_ENDECRYPT_t *crypt, int *pErr); + +#ifdef DIAG_AES_CCM +extern BOOLEAN (*MRVL_AesCCMPollingMode_hook) (MRVL_ENDECRYPT_t *crypt, + int *pErr, int decEnable); +extern void MRVL_AesCCMPollingMode(MRVL_ENDECRYPT_t *crypt, int *pErr, + int decEnable); +#endif + +extern BOOLEAN (*MRVL_AesEncrypt_hook) (UINT8 *kek, UINT8 kekLen, UINT8 *data, + UINT8 *ret, int *ptr_val); +extern int MRVL_AesEncrypt(UINT8 *kek, UINT8 kekLen, UINT8 *data, UINT8 *ret); + +extern BOOLEAN (*MRVL_AesValidateHostRequest_hook) (UINT32 *pBitMap, + UINT8 *pCmdPtr, + UINT8 *pCryptData, + SINT8 *pAESWrapEnc, + int *ptr_val); +extern int MRVL_AesValidateHostRequest(UINT32 *pBitMap, UINT8 *pCmdPtr, + UINT8 *pCryptData, SINT8 *pAESWrapEnc); + +#ifdef RC4 +extern BOOLEAN (*MRVL_Rc4Cryption_hook) (MRVL_ENDECRYPT_t *crypt, int *pErr); +extern void MRVL_Rc4Cryption(void *priv, MRVL_ENDECRYPT_t *crypt, int *pErr); +#endif + +extern BOOLEAN (*MRVL_AesWrap_hook) (UINT8 *kek, UINT8 kekLen, UINT32 n, + UINT8 *plain, UINT8 *keyIv, UINT8 *cipher, + int *ptr_val); +extern int MRVL_AesWrap(UINT8 *kek, UINT8 kekLen, UINT32 n, UINT8 *plain, + UINT8 *keyIv, UINT8 *cipher); + +extern BOOLEAN (*MRVL_AesUnWrap_hook) (UINT8 *kek, UINT8 kekLen, UINT32 n, + UINT8 *cipher, UINT8 *keyIv, + UINT8 *plain, int *ptr_val); +extern int MRVL_AesUnWrap(UINT8 *kek, UINT8 kekLen, UINT32 n, UINT8 *cipher, + UINT8 *keyIv, UINT8 *plain); + +extern BOOLEAN (*MRVL_AesSetKey_hook) (const UINT8 *kek, UINT8 kekLen, + int *ptr_val); +extern int MRVL_AesSetKey(const UINT8 *kek, UINT8 kekLen); + +/* AES related defines */ +#define MRVL_AES_KEY_UPDATE_DONE 5 +#define MRVL_AES_DONE 6 +#define MRVL_AES_ENGINE_BITS_POS 12 + +#define MRVL_AES_KEYUPDATE_LOC 0x00000900 +#define MRVL_AES_ENABLE_ENCR_LOC 0x00000500 +#define MRVL_AES_ENABLE_DECR_LOC 0x00000700 + +/* convert 4 individual bytes into a 4 byte unsigned int */ +#define MRVL_AES_GET_UINT32(x) ((x[3]<<24)|(x[2]<<16)|(x[1]<<8)|x[0]) + +/* convert 4 byte unsigned int back to a 4 individual bytes */ +#define MRVL_AES_CONVERT_UINT32_UINT8(x,u) \ + *u = (UINT8)((((UINT32)x)&0x000000ff)); \ + *(u + 1)= (UINT8)((((UINT32)x)&0x0000ff00)>>8); \ + *(u + 2)= (UINT8)((((UINT32)x)&0x00ff0000)>>16); \ + *(u + 3)= (UINT8)((((UINT32)x)&0xff000000)>>24) \ + + +/* HW register read macros */ +#define MRVL_AES_READ32(x) (WL_REGS32(x)) +#define MRVL_AES_READ16(x) (WL_REGS16(x)) +#define MRVL_AES_READ8(x) (WL_REGS8(x) ) + +/* HW register write macros */ +#define MRVL_AES_WRITE32(reg,val) (WL_WRITE_REGS32(reg,val)) +#define MRVL_AES_WRITE16(reg,val) (WL_WRITE_REGS16(reg,val)) +#define MRVL_AES_WRITE8(reg,val) (WL_WRITE_REGS8(reg,val)) + +extern UINT32 (*ramHook_CryptNew_EnterCritical) (void); +extern void (*ramHook_CryptNew_ExitCritical) (UINT32 intSave); + +extern int MRVL_AES_MEMCMP(UINT8 *dst, UINT8 *src, int len); +extern void MRVL_AES_MEMSET(UINT8 *dst, UINT8 val, int size); +extern void MRVL_AES_MEMCPY(UINT8 *dst, UINT8 *src, int size); +extern int MRVL_AesInterCheck(UINT8 *inter, UINT8 *d); +#ifdef DIAG_AES_CCM +extern void MRVL_AesCCMEncrypt(MRVL_ENDECRYPT_t *crypt, int *pErr); +extern void MRVL_AesCCMDecrypt(MRVL_ENDECRYPT_t *crypt, int *pErr); +#endif + +#endif /* _CRYPT_NEW_ROM_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/hmac_md5.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/hmac_md5.c new file mode 100644 index 00000000..d1cba07c --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/hmac_md5.c @@ -0,0 +1,111 @@ +/** @file hmac_md5.c + * + * @brief This file defines algorithm for hmac md5 + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ + +#include "wltypes.h" +#include "md5.h" + +#include "hostsa_ext_def.h" +#include "authenticator.h" + +void +Mrvl_hmac_md5(void *priv, UINT8 *text_data, int text_len, UINT8 *key, + int key_len, void *digest) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + // BufferDesc_t * pDesc = NULL; + UINT8 buf[400] = { 0 }; + Mrvl_MD5_CTX *context; + unsigned char *k_pad; /* padding - key XORd with i/opad */ + int i; +#if 0 + /* Wait forever ensures a buffer */ + pDesc = (BufferDesc_t *) bml_AllocBuffer(ramHook_encrPoolConfig, + 400, BML_WAIT_FOREVER); +#endif + /* WLAN buffers are aligned, so k_pad start at a UINT32 boundary */ + // k_pad = (unsigned char *)BML_DATA_PTR(pDesc); + k_pad = (unsigned char *)buf; + context = (Mrvl_MD5_CTX *)(k_pad + 64); + + /* if key is longer than 64 bytes reset it to key=MD5(key) */ + if (key_len > 64) { + Mrvl_MD5_CTX tctx; + + wpa_MD5Init(&tctx); + wpa_MD5Update((void *)priv, &tctx, key, key_len); + wpa_MD5Final((void *)priv, context->buffer, &tctx); + + key = context->buffer; + key_len = 16; + } + + /* the HMAC_MD5 transform looks like: */ + /* */ + /* MD5(K XOR opad, MD5(K XOR ipad, text)) */ + /* */ + /* where K is an n byte key */ + /* ipad is the byte 0x36 repeated 64 times */ + /* opad is the byte 0x5c repeated 64 times */ + /* and text is the data being protected */ + + /* start out by storing key in pads */ + memset(util_fns, k_pad, 0, 64); + memcpy(util_fns, k_pad, key, key_len); + + /* XOR key with ipad and opad values */ + for (i = 0; i < 16; i++) { + ((UINT32 *)k_pad)[i] ^= 0x36363636; + } + + /* perform inner MD5 */ + wpa_MD5Init(context); /* init context for 1st pass */ + wpa_MD5Update((void *)priv, context, k_pad, 64); /* start with + inner pad */ + wpa_MD5Update((void *)priv, context, text_data, text_len); /* then + text + of + datagram + */ + wpa_MD5Final((void *)priv, digest, context); /* finish up 1st pass */ + + /* start out by storing key in pads */ + memset(util_fns, k_pad, 0, 64); + memcpy(util_fns, k_pad, key, key_len); + + for (i = 0; i < 16; i++) { + ((UINT32 *)k_pad)[i] ^= 0x5c5c5c5c; + } + + /* perform outer MD5 */ + wpa_MD5Init(context); /* init context for 2nd pass */ + wpa_MD5Update((void *)priv, context, k_pad, 64); + /* start with outer pad */ + wpa_MD5Update((void *)priv, context, digest, 16); + /* then results of 1st hash */ + wpa_MD5Final((void *)priv, digest, context); /* finish up 2nd pass */ + +// bml_FreeBuffer((UINT32)pDesc); +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/hmac_sha1.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/hmac_sha1.c new file mode 100644 index 00000000..dfbd7f07 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/hmac_sha1.c @@ -0,0 +1,163 @@ +/** @file hmac_sha1.c + * + * @brief This file defines algorithm for hmac sha1 + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#include "wltypes.h" +#include "wl_macros.h" +#include "sha1.h" +#include "hostsa_ext_def.h" +#include "authenticator.h" + +void +Mrvl_hmac_sha1(void *priv, unsigned char **ppText, + int *pTextLen, + int textNum, + unsigned char *key, + int key_len, unsigned char *output, int outputLen) +{ + /* + Note- Some of the variables are made static in this function + becuase currently this function executes in the idle task. The idle + task dosent have enough stack space to accomodate these varables. + In the future if this function in executed in a different task or + if we increase the stack size of the idle task then we can put + these variables on the stack */ + // BufferDesc_t * pDesc = NULL; + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + UINT8 buf[400] = { 0 }; + Mrvl_SHA1_CTX *context; + unsigned char *k_pad; /* padding - key XORd with i/opad */ + unsigned char *digest; + int i; + + k_pad = (unsigned char *)buf; + digest = k_pad + 64; + context = (Mrvl_SHA1_CTX *)(k_pad + 64 + 20); + + /* if key is longer than 64 bytes reset it to key=SHA1(key) */ + if (key_len > 64) { + Mrvl_SHA1Init(context); + Mrvl_SHA1Update(context, key, key_len); + Mrvl_SHA1Final((void *)priv, context, key); + + key_len = 20; + } + + /* + * the HMAC_SHA1 transform looks like: + * + * SHA1(K XOR opad, SHA1(K XOR ipad, text)) + * + * where K is an n byte key + * ipad is the byte 0x36 repeated 64 times + * opad is the byte 0x5c repeated 64 times + * and text is the data being protected + */ + + /* perform inner SHA1 */ + /* start out by storing key in pads */ + memset(util_fns, k_pad, 0, 64); + memcpy(util_fns, k_pad, key, key_len); + + /* XOR key with ipad and opad values */ + for (i = 0; i < 8; i++) { + ((UINT64 *)k_pad)[i] ^= 0x3636363636363636; + } + + Mrvl_SHA1Init(context); /* init context for 1st pass */ + Mrvl_SHA1Update(context, k_pad, 64); /* start with inner pad */ + for (i = 0; i < textNum; i++) { + /* then text of datagram */ + Mrvl_SHA1Update(context, ppText[i], pTextLen[i]); + } + + Mrvl_SHA1Final((void *)priv, context, digest); /* finish up 1st pass */ + + /* perform outer SHA1 */ + /* start out by storing key in pads */ + memset(util_fns, k_pad, 0, 64); + memcpy(util_fns, k_pad, key, key_len); + + /* XOR key with ipad and opad values */ + for (i = 0; i < 8; i++) { + ((UINT64 *)k_pad)[i] ^= 0x5c5c5c5c5c5c5c5c; + } + + Mrvl_SHA1Init(context); /* init context for 2nd pass */ + Mrvl_SHA1Update(context, k_pad, 64); /* start with outer pad */ + Mrvl_SHA1Update(context, digest, 20); /* then results of 1st hash */ + Mrvl_SHA1Final((void *)priv, context, digest); /* finish up 2nd pass */ + memcpy(util_fns, output, digest, outputLen); + +// bml_FreeBuffer((UINT32)pDesc); +} + +/* + * PRF -- Length of output is in octets rather than bits + * since length is always a multiple of 8 output array is + * organized so first N octets starting from 0 contains PRF output + * + * supported inputs are 16, 32, 48, 64 + * output array must be 80 octets to allow for sha1 overflow + */ +void +Mrvl_PRF(void *priv, unsigned char *key, int key_len, + unsigned char *prefix, int prefix_len, + unsigned char *data, int data_len, unsigned char *output, int len) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + int i; + int currentindex = 0; + int total_len; + UINT8 prf_input[120]; /* concatenated input */ + unsigned char *pText = prf_input; + SINT8 remain = len; + + memset(util_fns, prf_input, 0x00, sizeof(prf_input)); + + if (prefix) { + memcpy(util_fns, prf_input, prefix, prefix_len); + prf_input[prefix_len] = 0; /* single octet 0 */ + memcpy(util_fns, &prf_input[prefix_len + 1], data, data_len); + total_len = prefix_len + 1 + data_len; + } else { + memcpy(util_fns, prf_input, data, data_len); + total_len = data_len; + } + + prf_input[total_len] = 0; /* single octet count, starts at 0 */ + total_len++; + for (i = 0; i < (len + 19) / 20; i++) { + Mrvl_hmac_sha1(priv, (UINT8 **)&pText, + &total_len, + 1, + key, + key_len, &output[currentindex], MIN(20, remain)); + currentindex += MIN(20, remain); /* next concatenation + location */ + remain -= 20; + prf_input[total_len - 1]++; /* increment octet count */ + } +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/md5.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/md5.c new file mode 100644 index 00000000..b397c329 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/md5.c @@ -0,0 +1,277 @@ +/** @file md5.c + * + * @brief This file defines the function for md5 + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#include "wltypes.h" +#include "md5.h" + +#include "hostsa_ext_def.h" +#include "authenticator.h" + +/* Constants for wpa_MD5Transform routine. + */ +#define S11 7 +#define S12 12 +#define S13 17 +#define S14 22 +#define S21 5 +#define S22 9 +#define S23 14 +#define S24 20 +#define S31 4 +#define S32 11 +#define S33 16 +#define S34 23 +#define S41 6 +#define S42 10 +#define S43 15 +#define S44 21 + +#define Mrvl_MD5_memcpy(utils, output, input, len) memcpy(utils, output, input, len) +#define Mrvl_MD5_memset(utils, output, value, len) memset(utils, output, value, len) +#define Encode(utils, output, input, len) memcpy(utils, output, input, len) + +static void wpa_MD5Transform(void *priv, UINT32 *state, unsigned int *block); + +static const unsigned char PADDING[64] = { + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +/* F, G, H and I are basic MD5 functions. + */ +#define F(x, y, z) (((x) & (y)) | ((~x) & (z))) +#define G(x, y, z) (((x) & (z)) | ((y) & (~z))) +#define H(x, y, z) ((x) ^ (y) ^ (z)) +#define I(x, y, z) ((y) ^ ((x) | (~z))) + +/* ROTATE_LEFT rotates x left n bits. + */ +#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) + +/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. +Rotation is separate from addition to prevent recomputation. + */ +#define FF(a, b, c, d, x, s, ac) { \ + (a) += F ((b), (c), (d)) + (x) + (UINT32)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b);} + +#define GG(a, b, c, d, x, s, ac) { \ + (a) += G ((b), (c), (d)) + (x) + (UINT32)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } +#define HH(a, b, c, d, x, s, ac) { \ + (a) += H ((b), (c), (d)) + (x) + (UINT32)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } +#define II(a, b, c, d, x, s, ac) { \ + (a) += I ((b), (c), (d)) + (x) + (UINT32)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } + +/* MD5 initialization. Begins an MD5 operation, writing a new context. + */ +void +wpa_MD5Init(Mrvl_MD5_CTX *context) +{ + context->count[0] = context->count[1] = 0; + /* Load magic initialization constants. */ + context->state[0] = 0x67452301; + context->state[1] = 0xefcdab89; + context->state[2] = 0x98badcfe; + context->state[3] = 0x10325476; +} + +/* MD5 block update operation. Continues an MD5 message-digest + operation, processing another message block, and updating the + context. + */ +void +wpa_MD5Update(void *priv, Mrvl_MD5_CTX *context, UINT8 *input, UINT32 inputLen) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + unsigned int i, index, partLen; + + /* Compute number of bytes mod 64 */ + index = (unsigned int)((context->count[0] >> 3) & 0x3F); + + /* Update number of bits */ + if ((context->count[0] += ((UINT32)inputLen << 3)) + < ((UINT32)inputLen << 3)) { + context->count[1]++; + } + context->count[1] += ((UINT32)inputLen >> 29); + + partLen = 64 - index; + + /* Transform as many times as possible. */ + if (inputLen >= partLen) { + Mrvl_MD5_memcpy(util_fns, &context->buffer[index], input, + partLen); + wpa_MD5Transform((void *)priv, context->state, + (UINT32 *)context->buffer); + + for (i = partLen; i + 63 < inputLen; i += 64) { + Mrvl_MD5_memcpy(util_fns, context->scratch, (input + i), + 64); + wpa_MD5Transform((void *)priv, context->state, + context->scratch); + } + index = 0; + } else { + i = 0; + } + + /* Buffer remaining input */ + Mrvl_MD5_memcpy(util_fns, &context->buffer[index], &input[i], + inputLen - i); +} + +/* MD5 finalization. Ends an MD5 message-digest operation, writing the + the message digest and zeroizing the context. + */ +void +wpa_MD5Final(void *priv, unsigned char digest[16], Mrvl_MD5_CTX *context) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + unsigned char bits[8]; + unsigned int index, padLen; + + /* Save number of bits */ + Encode(util_fns, bits, context->count, 8); + + /* Pad out to 56 mod 64. */ + index = (unsigned int)((context->count[0] >> 3) & 0x3f); + padLen = (index < 56) ? (56 - index) : (120 - index); + wpa_MD5Update(priv, context, (UINT8 *)PADDING, padLen); + + /* Append length (before padding) */ + wpa_MD5Update(priv, context, bits, 8); + + /* Store state in digest */ + Encode(util_fns, digest, context->state, 16); + + /* Zeroize sensitive information. */ + Mrvl_MD5_memset(util_fns, context, 0, sizeof(*context)); +} + +/* MD5 basic transformation. Transforms state based on block. + */ +static void +wpa_MD5Transform(void *priv, UINT32 *state, unsigned int *block) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + UINT32 a = state[0], b = state[1], c = state[2], d = state[3], *x; + + /* Decode (x, block, 64); */ + x = block; + + /* Round 1 */ + FF(a, b, c, d, x[0], S11, 0xd76aa478); /* 1 */ + FF(d, a, b, c, x[1], S12, 0xe8c7b756); /* 2 */ + FF(c, d, a, b, x[2], S13, 0x242070db); /* 3 */ + FF(b, c, d, a, x[3], S14, 0xc1bdceee); /* 4 */ + FF(a, b, c, d, x[4], S11, 0xf57c0faf); /* 5 */ + FF(d, a, b, c, x[5], S12, 0x4787c62a); /* 6 */ + FF(c, d, a, b, x[6], S13, 0xa8304613); /* 7 */ + FF(b, c, d, a, x[7], S14, 0xfd469501); /* 8 */ + FF(a, b, c, d, x[8], S11, 0x698098d8); /* 9 */ + FF(d, a, b, c, x[9], S12, 0x8b44f7af); /* 10 */ + FF(c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ + FF(b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ + FF(a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ + FF(d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ + FF(c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ + FF(b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ + + /* Round 2 */ + GG(a, b, c, d, x[1], S21, 0xf61e2562); /* 17 */ + GG(d, a, b, c, x[6], S22, 0xc040b340); /* 18 */ + GG(c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ + GG(b, c, d, a, x[0], S24, 0xe9b6c7aa); /* 20 */ + GG(a, b, c, d, x[5], S21, 0xd62f105d); /* 21 */ + GG(d, a, b, c, x[10], S22, 0x2441453); /* 22 */ + GG(c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ + GG(b, c, d, a, x[4], S24, 0xe7d3fbc8); /* 24 */ + GG(a, b, c, d, x[9], S21, 0x21e1cde6); /* 25 */ + GG(d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ + GG(c, d, a, b, x[3], S23, 0xf4d50d87); /* 27 */ + + GG(b, c, d, a, x[8], S24, 0x455a14ed); /* 28 */ + GG(a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ + GG(d, a, b, c, x[2], S22, 0xfcefa3f8); /* 30 */ + GG(c, d, a, b, x[7], S23, 0x676f02d9); /* 31 */ + GG(b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ + + /* Round 3 */ + HH(a, b, c, d, x[5], S31, 0xfffa3942); /* 33 */ + HH(d, a, b, c, x[8], S32, 0x8771f681); /* 34 */ + HH(c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ + HH(b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ + HH(a, b, c, d, x[1], S31, 0xa4beea44); /* 37 */ + HH(d, a, b, c, x[4], S32, 0x4bdecfa9); /* 38 */ + HH(c, d, a, b, x[7], S33, 0xf6bb4b60); /* 39 */ + HH(b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ + HH(a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ + HH(d, a, b, c, x[0], S32, 0xeaa127fa); /* 42 */ + HH(c, d, a, b, x[3], S33, 0xd4ef3085); /* 43 */ + HH(b, c, d, a, x[6], S34, 0x4881d05); /* 44 */ + HH(a, b, c, d, x[9], S31, 0xd9d4d039); /* 45 */ + HH(d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ + HH(c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ + HH(b, c, d, a, x[2], S34, 0xc4ac5665); /* 48 */ + + /* Round 4 */ + II(a, b, c, d, x[0], S41, 0xf4292244); /* 49 */ + II(d, a, b, c, x[7], S42, 0x432aff97); /* 50 */ + II(c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ + II(b, c, d, a, x[5], S44, 0xfc93a039); /* 52 */ + II(a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ + II(d, a, b, c, x[3], S42, 0x8f0ccc92); /* 54 */ + II(c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ + II(b, c, d, a, x[1], S44, 0x85845dd1); /* 56 */ + II(a, b, c, d, x[8], S41, 0x6fa87e4f); /* 57 */ + II(d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ + II(c, d, a, b, x[6], S43, 0xa3014314); /* 59 */ + II(b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ + II(a, b, c, d, x[4], S41, 0xf7537e82); /* 61 */ + II(d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ + II(c, d, a, b, x[2], S43, 0x2ad7d2bb); /* 63 */ + II(b, c, d, a, x[9], S44, 0xeb86d391); /* 64 */ + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + + /* Zeroize sensitive information. */ + Mrvl_MD5_memset(util_fns, x, 0, sizeof(x)); +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/md5.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/md5.h new file mode 100644 index 00000000..0ce024ea --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/md5.h @@ -0,0 +1,44 @@ +/** @file md5.h + * + * @brief This file contains define for md5. + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _MD5_H_ +#define _MD5_H_ + +typedef struct { + unsigned int state[4]; /* state (ABCD) */ + unsigned int count[2]; /* number of bits, modulo 2^64 (lsb first) */ + unsigned int scratch[16]; /* This is used to reduce the memory * + requirements of the transform * + function */ + unsigned char buffer[64]; /* input buffer */ +} Mrvl_MD5_CTX; + +void wpa_MD5Init(Mrvl_MD5_CTX *context); +void wpa_MD5Update(void *priv, Mrvl_MD5_CTX *context, UINT8 *input, + UINT32 inputLen); +void wpa_MD5Final(void *priv, unsigned char digest[16], Mrvl_MD5_CTX *context); +void Mrvl_hmac_md5(void *priv, UINT8 *text, int text_len, UINT8 *key, + int key_len, void *digest); + +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/mrvl_sha256_crypto.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/mrvl_sha256_crypto.c new file mode 100644 index 00000000..85560289 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/mrvl_sha256_crypto.c @@ -0,0 +1,118 @@ +/** @file Mrvl_sha256_crypto.c + * + * @brief This file defines sha256 crypto + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#include + +#include "wltypes.h" +#include "wl_macros.h" + +#include "sha_256.h" +#include "mrvl_sha256_crypto.h" + +#include "hostsa_ext_def.h" +#include "authenticator.h" + +/* Helper function to allocate scratch memory and call sha256_vector() */ +void +mrvl_sha256_crypto_vector(void *priv, size_t num_elem, + UINT8 *addr[], size_t * len, UINT8 *mac) +{ + + // BufferDesc_t* pBufDesc = NULL; + UINT8 buf[SHA256_MIN_SCRATCH_BUF] = { 0 }; + + sha256_vector((void *)priv, num_elem, addr, len, mac, (UINT8 *)buf); + +// bml_FreeBuffer((UINT32)pBufDesc); +} + +void +mrvl_sha256_crypto_kdf(void *priv, UINT8 *pKey, + UINT8 key_len, + char *label, + UINT8 label_len, + UINT8 *pContext, + UINT16 context_len, UINT8 *pOutput, UINT16 output_len) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + UINT8 *vectors[4 + 1]; + size_t vectLen[NELEMENTS(vectors)]; + UINT8 *pResult; + UINT8 *pLoopResult; + UINT8 iterations; + UINT16 i; + // BufferDesc_t* pBufDesc = NULL; + UINT8 buf[HMAC_SHA256_MIN_SCRATCH_BUF] = { 0 }; + + pResult = pContext + context_len; + + /* + ** Working memory layout: + ** | KDF-Len output --- > + ** | + ** [KDF Input][HMAC output#1][HMAC output#2][...] + ** + */ + + /* Number of SHA256 digests needed to meet the bit length output_len */ + iterations = (output_len + 255) / 256; + + pLoopResult = pResult; + + for (i = 1; i <= iterations; i++) { + /* Skip vectors[0]; Used internally in hmac_sha256_vector + function */ + vectors[1] = (UINT8 *)&i; + vectLen[1] = sizeof(i); + + vectors[2] = (UINT8 *)label; + vectLen[2] = label_len; + + vectors[3] = pContext; + vectLen[3] = context_len; + + vectors[4] = (UINT8 *)&output_len; + vectLen[4] = sizeof(output_len); + + /* + ** + ** KDF input = (K, i || label || Context || Length) + ** + */ + hmac_sha256_vector(priv, pKey, key_len, + NELEMENTS(vectors), vectors, vectLen, + pLoopResult, (UINT8 *)buf); + + /* Move the hmac output pointer so another digest can be + appended ** if more loop iterations are needed to get the + output_len key ** bit total */ + pLoopResult += SHA256_MAC_LEN; + } + +// bml_FreeBuffer((UINT32)pBufDesc); + + memcpy(util_fns, pOutput, pResult, output_len / 8); + +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/mrvl_sha256_crypto.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/mrvl_sha256_crypto.h new file mode 100644 index 00000000..dae92e7f --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/mrvl_sha256_crypto.h @@ -0,0 +1,40 @@ +/** @file Mrvl_sha256_crypto.h + * + * @brief This file contains the define for sha256 + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ + +#ifndef _MRVL_SHA256_CRYPTO_H +#define _MRVL_SHA256_CRYPTO_H + +extern void mrvl_sha256_crypto_vector(void *priv, size_t num_elem, + UINT8 *addr[], size_t * len, UINT8 *mac); + +extern void mrvl_sha256_crypto_kdf(void *priv, UINT8 *pKey, + UINT8 key_len, + char *label, + UINT8 label_len, + UINT8 *pContext, + UINT16 context_len, + UINT8 *pOutput, UINT16 output_len); + +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/packetType.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/packetType.h new file mode 100644 index 00000000..78d68350 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/packetType.h @@ -0,0 +1,72 @@ +/** @file packetType.h + * + * @brief This file defines Packet Type enumeration used for PacketType fields in RX and TX + * packet descriptors + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _PACKETTYPE_H_ +#define _PACKETTYPE_H_ + +/** +*** @brief Enumeration of different Packets Types. +**/ + +typedef enum { + PKT_TYPE_802DOT3_DEFAULT = 0, /* !< For RX packets it represents ** + IEEE 802.3 SNAP frame . For ** TX + Packets. This Field is for ** + backwards compatibility only and ** + should not be used going ** forward. */ + PKT_TYPE_802DOT3_LLC = 1, // !< IEEE 802.3 frame with LLC header + PKT_TYPE_ETHERNET_V2 = 2, // !< Ethernet version 2 frame + PKT_TYPE_802DOT3_SNAP = 3, // !< IEEE 802.3 SNAP frame + PKT_TYPE_802DOT3 = 4, // !< IEEE 802.3 frame + PKT_TYPE_802DOT11 = 5, // !< IEEE 802.11 frame + PKT_TYPE_ETCP_SOCKET_DATA = 7, // !< eTCP Socket Data + PKT_TYPE_RAW_DATA = 8, // !< Non socket data when using eTCP + PKT_TYPE_MRVL_MESH = 9, // !< Marvell Mesh frame + + /* Marvell Internal firmware packet types ** Range from 0x0E to 0xEE ** + These internal Packet types should grow from ** 0xEE down. This + will leave room incase the packet ** types between the driver & + firmware need to be expanded */ + PKT_TYPE_MRVL_EAPOL_MSG = 0xDF, + PKT_TYPE_MRVL_BT_AMP = 0xE0, + PKT_TYPE_FWD_MGT = 0xE2, + PKT_TYPE_MGT = 0xE5, + PKT_TYPE_MRVL_AMSDU = 0xE6, + PKT_TYPE_MRVL_BAR = 0xE7, + PKT_TYPE_MRVL_LOOPBACK = 0xE8, + PKT_TYPE_MRVL_DATA_MORE = 0xE9, + PKT_TYPE_MRVL_DATA_LAST = 0xEA, + PKT_TYPE_MRVL_DATA_NULL = 0xEB, + PKT_TYPE_MRVL_UNKNOWN = 0xEC, + PKT_TYPE_MRVL_SEND_TO_DATASWITCH = 0xED, + PKT_TYPE_MRVL_SEND_TO_HOST = 0xEE, + + PKT_TYPE_DEBUG = 0xEF, + + // Customer range for Packet Types + // Range 0xF0 to 0xFF +} PacketType; + +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/parser.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/parser.c new file mode 100644 index 00000000..517dc31d --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/parser.c @@ -0,0 +1,284 @@ +/** @file parser.c + * + * @brief This file defines function for 802.11 Management Frames Parsing + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +/***************************************************************************** +* +* File: parser.c +* +* +* +* Author(s): Rajesh Bhagwat +* Date: 2005-02-04 +* Description: 802.11 Management Frames Parsing +* +******************************************************************************/ +#include "wltypes.h" +#include "wl_mib.h" +#include "IEEE_types.h" +#include "parser.h" +#include "parser_rom.h" + +#include "hostsa_ext_def.h" +#include "authenticator.h" + +VendorSpecificIEType_e +IsEpigramHTElement(void *priv, uint8 *pBuffer) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + VendorSpecificIEType_e retVal = VendSpecIE_Other; + const uint8 szMatchingCapElement[] = { 0x00, 0x90, 0x4c, 0x33 }; + const uint8 szMatchingInfoElement[] = { 0x00, 0x90, 0x4c, 0x34 }; + + if (!memcmp(util_fns, pBuffer, + szMatchingInfoElement, sizeof(szMatchingInfoElement))) { + retVal = VendSpecIE_HT_Info; + } else if (!memcmp(util_fns, pBuffer, + szMatchingCapElement, + sizeof(szMatchingCapElement))) { + retVal = VendSpecIE_HT_Cap; + } + + return retVal; +} + +VendorSpecificIEType_e +IsWPSElement(void *priv, UINT8 *pBuffer) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + VendorSpecificIEType_e retVal = VendSpecIE_Other; + const UINT8 szMatchingInfoElement[] = { 0x00, 0x50, 0xf2, 0x04 }; + + if (!memcmp(util_fns, pBuffer, + szMatchingInfoElement, sizeof(szMatchingInfoElement))) { + retVal = VendSpecIE_WPS; + } + + return retVal; +} + +VendorSpecificIEType_e +IsSsIdLElement(void *priv, UINT8 *pBuffer) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + VendorSpecificIEType_e retVal = VendSpecIE_Other; + const UINT8 szMatchingInfoElement[] = { 0x00, 0x50, 0xf2, 0x05, 0x00 }; + + if (!memcmp(util_fns, pBuffer, + szMatchingInfoElement, sizeof(szMatchingInfoElement))) { + retVal = VendSpecIE_SsIdL; + } + + return retVal; +} + +int +ieBufValidate(UINT8 *pIe, int bufLen) +{ + while (bufLen) { + UINT8 ieLen = *(pIe + 1); + if (bufLen < (ieLen + 2)) { + return MLME_FAILURE; + } + bufLen -= ieLen + 2; + pIe += ieLen + 2; + } + + return MLME_SUCCESS; +} + +int +GetIEPointers(void *priv, UINT8 *pIe, int bufLen, IEPointers_t *pIePointers) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + memset(util_fns, pIePointers, 0x00, sizeof(IEPointers_t)); + + while (bufLen) { + if (bufLen < (*(pIe + 1) + 2)) { + break; + } + + /* Handle IEs not processed by ROM functions. */ + switch (*pIe) { + case ELEM_ID_RSN: + pIePointers->pRsn = (IEEEtypes_RSNElement_t *)pIe; + break; + case ELEM_ID_WAPI: + pIePointers->pWapi = (IEEEtypes_WAPIElement_t *)pIe; + break; + + /* Add element not handled by ROM_parser_getIEPtr or ** + override element processing in ROM_parser_getIEPtr + ** here. */ + case ELEM_ID_VENDOR_SPECIFIC: + default: + if (ROM_parser_getIEPtr(priv, pIe, pIePointers) == + FALSE) { + if ((*pIe) == ELEM_ID_VENDOR_SPECIFIC) { + if (IsWPSElement(priv, (pIe + 2))) { + pIePointers->pWps = + (IEEEtypes_WPSElement_t + *)pIe; + } + } + // Add your code to process vendor specific + // elements not + // processed by above ROM_paser_getAssocIEPtr + // function. + } + break; + } + bufLen -= *(pIe + 1) + 2; + pIe += *(pIe + 1) + 2; + } + return bufLen; +} + +BOOLEAN +parser_getAssocIEs(void *priv, UINT8 *pIe, + int bufLen, AssocIePointers_t *pIePointers) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + BOOLEAN ieParseSuccessful = TRUE; + + memset(util_fns, pIePointers, 0x00, sizeof(AssocIePointers_t)); + + while (bufLen) { + UINT8 ieType = *pIe; + UINT8 ieLen = *(pIe + 1); + + if (bufLen < (ieLen + 2)) { + ieParseSuccessful = FALSE; + break; + } + + switch (ieType) { + // add code for elements not handled in ROM function. + case ELEM_ID_AP_CHANNEL_REPORT: + pIePointers->pApChanRpt = + (IEEEtypes_ApChanRptElement_t *)pIe; + break; +#ifdef TDLS + case ELEM_ID_SUPPORTED_REGCLASS: + pIePointers->pSuppRegClass = + (IEEEtypes_SupportedRegClasses_t *)pIe; + break; +#endif + + /* The following 5 elements, HT CAP, HT INFO, 20/40 + Coex, OBSS SCAN PARAM, and EXTENDED CAP, are + ignored here if 11n is not compiled. When 11n is + compiled these 5 elements would be handled in + ROM_parser_getAssocIEPtr routine. + + */ + case ELEM_ID_HT_CAPABILITY: + case ELEM_ID_HT_INFORMATION: + case ELEM_ID_2040_BSS_COEXISTENCE: + case ELEM_ID_OBSS_SCAN_PARAM: + case ELEM_ID_EXT_CAPABILITIES: + /* Do not process these elements in ROM routine + ROM_parser_getAssocIEPtr Note: a break here. */ + break; + + /* Add element not handled by ROM_parser_getAssocIEPtr + or override element processing in + ROM_parser_getAssocIEPtr here. \ */ + + case ELEM_ID_VENDOR_SPECIFIC: + default: + if (ROM_parser_getAssocIEPtr(priv, pIe, pIePointers) == + FALSE) { + // Add your code to process vendor specific + // elements not + // processed by above ROM_paser_getAssocIEPtr + // function. + if (!pIePointers->pHtCap || + !pIePointers->pHtInfo) { + switch (IsEpigramHTElement + (priv, (pIe + 2))) { + + case VendSpecIE_HT_Cap: + if (!pIePointers->pHtCap) { + *(pIe + 4) = + ELEM_ID_HT_CAPABILITY; + *(pIe + 5) = + sizeof + (IEEEtypes_HT_Capability_t); + pIePointers->pHtCap = + (IEEEtypes_HT_Capability_t + *)(pIe + 4); + } + break; + + case VendSpecIE_HT_Info: + if (!pIePointers->pHtInfo) { + *(pIe + 4) = + ELEM_ID_HT_INFORMATION; + *(pIe + 5) = + sizeof + (IEEEtypes_HT_Information_t); + pIePointers->pHtInfo = + (IEEEtypes_HT_Information_t + *)(pIe + 4); + } + break; + + case VendSpecIE_Other: + default: + break; + } + } + } + break; + + } + bufLen -= ieLen + 2; + pIe += ieLen + 2; + } + return ieParseSuccessful; +} + +UINT8 +parser_countNumInfoElements(UINT8 *pIe, int bufLen) +{ + UINT8 ieCount = 0; + + while (bufLen) { + if (bufLen < (*(pIe + 1) + 2)) { + break; + } + + ieCount++; + + bufLen -= *(pIe + 1) + 2; + pIe += *(pIe + 1) + 2; + } + + return ieCount; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/parser.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/parser.h new file mode 100644 index 00000000..5c5ffb1c --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/parser.h @@ -0,0 +1,74 @@ +/** @file parser.h + * + * @brief This file contains definitions of 802.11 Management Frames + * and Information Element Parsing + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _PARSER_H_ +#define _PARSER_H_ + +#include "IEEE_types.h" +#include "parser_rom.h" + +typedef struct { + IEEEtypes_HT_Capability_t *pHtCap; + IEEEtypes_HT_Information_t *pHtInfo; + IEEEtypes_20N40_BSS_Coexist_t *p2040Coexist; + IEEEtypes_OBSS_ScanParam_t *pHtScanParam; + IEEEtypes_ExtCapability_t *pHtExtCap; +} dot11nIEPointers_t; + +#ifdef DOT11AC +typedef struct { + IEEEtypes_VHT_Capability_t *pVhtCap; + IEEEtypes_VHT_Operation_t *pVhtOper; +} dot11acIEPointers_t; +#endif + +#ifdef TDLS +typedef struct { + IEEEtypes_MobilityDomainElement_t *pMdie; + IEEEtypes_FastBssTransElement_t *pFtie; + IEEEtypes_RSNElement_t *pRsn; + IEEEtypes_TimeoutIntervalElement_t *pTie[2]; + IEEEtypes_RICDataElement_t *pFirstRdie; + +} Dot11rIePointers_t; +#endif +extern VendorSpecificIEType_e IsWMMElement(void *priv, UINT8 *pBuffer); +extern VendorSpecificIEType_e IsWPAElement(void *priv, UINT8 *pBuffer); + +extern int ieBufValidate(UINT8 *pIe, int bufLen); + +extern int GetIEPointers(void *priv, UINT8 *pIe, + int bufLen, IEPointers_t *pIePointers); + +extern BOOLEAN parser_getAssocIEs(void *priv, UINT8 *pIe, + int bufLen, AssocIePointers_t *pIePointers); + +extern +IEEEtypes_InfoElementHdr_t *parser_getSpecificIE(IEEEtypes_ElementId_e elemId, + UINT8 *pIe, int bufLen); + +extern UINT8 parser_countNumInfoElements(UINT8 *pIe, int bufLen); + +#endif // _PARSER_H_ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/parser_rom.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/parser_rom.c new file mode 100644 index 00000000..05e4f325 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/parser_rom.c @@ -0,0 +1,241 @@ +/** @file parser_rom.c + * + * @brief This file define the function for 802.11 Management Frames Parsing + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#include "parser_rom.h" + +#include "hostsa_ext_def.h" +#include "authenticator.h" + +#define WMM_IE_MIN_LEN 7 + +VendorSpecificIEType_e +IsWMMElement(void *priv, uint8 *pBuffer) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + + VendorSpecificIEType_e retVal = VendSpecIE_Other; + const uint8 szMatchingInfoElement[] = { 0x00, 0x50, 0xf2, + 0x02, 0x00, 0x01 + }; + const uint8 szMatchingParamElement[] = { 0x00, 0x50, 0xf2, + 0x02, 0x01, 0x01 + }; + const uint8 szMatchingTspecElement[] = { 0x00, 0x50, 0xf2, + 0x02, 0x02, 0x01 + }; + + if (!memcmp(util_fns, pBuffer, + szMatchingInfoElement, sizeof(szMatchingInfoElement))) { + retVal = VendSpecIE_WMM_Info; + } else if (!memcmp(util_fns, pBuffer, + szMatchingParamElement, + sizeof(szMatchingParamElement))) { + retVal = VendSpecIE_WMM_Param; + } else if (!memcmp(util_fns, pBuffer, + szMatchingTspecElement, + sizeof(szMatchingTspecElement))) { + retVal = VendSpecIE_TSPEC; + } + + return retVal; +} + +VendorSpecificIEType_e +IsWPAElement(void *priv, uint8 *pBuffer) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + + VendorSpecificIEType_e retVal = VendSpecIE_Other; + const uint8 szMatchingInfoElement[] = { 0x00, 0x50, 0xf2, + 0x01, 0x01, 0x00 + }; + + if (!memcmp(util_fns, pBuffer, + szMatchingInfoElement, sizeof(szMatchingInfoElement))) { + retVal = VendSpecIE_WPA; + } + + return retVal; +} + +BOOLEAN +ROM_parser_getIEPtr(void *priv, uint8 *pIe, IEPointers_t *pIePointers) +{ + BOOLEAN status = TRUE; + switch (*pIe) { + case ELEM_ID_SSID: + pIePointers->pSsid = (IEEEtypes_SsIdElement_t *)pIe; + break; + + case ELEM_ID_DS_PARAM_SET: + pIePointers->pDsParam = (IEEEtypes_DsParamElement_t *)pIe; + break; + + case ELEM_ID_TIM: + pIePointers->pTim = (IEEEtypes_TimElement_t *)pIe; + break; + + case ELEM_ID_SUPPORTED_RATES: + pIePointers->pSupportedRates = + (IEEEtypes_SuppRatesElement_t *)pIe; + break; + + case ELEM_ID_EXT_SUPPORTED_RATES: + pIePointers->pExtSupportedRates + = (IEEEtypes_ExtSuppRatesElement_t *)pIe; + break; + + case ELEM_ID_ERP_INFO: + pIePointers->pErpInfo = (IEEEtypes_ERPInfoElement_t *)pIe; + break; + + case ELEM_ID_IBSS_PARAM_SET: + pIePointers->pIbssParam = (IEEEtypes_IbssParamElement_t *)pIe; + break; + + case ELEM_ID_COUNTRY: + pIePointers->pCountry = (IEEEtypes_CountryInfoElement_t *)pIe; + break; + + case ELEM_ID_RSN: + pIePointers->pRsn = (IEEEtypes_RSNElement_t *)pIe; + break; + + case ELEM_ID_VENDOR_SPECIFIC: + + if (IsWPAElement(priv, (pIe + 2))) { + pIePointers->pWpa = (IEEEtypes_WPAElement_t *)pIe; + } else { + switch (IsWMMElement(priv, (pIe + 2))) { + case VendSpecIE_Other: + case VendSpecIE_TSPEC: + default: + status = FALSE; + break; + + case VendSpecIE_WMM_Info: + pIePointers->pWmmInfo = + (IEEEtypes_WMM_InfoElement_t *)pIe; + break; + + case VendSpecIE_WMM_Param: + pIePointers->pWmmParam + = (IEEEtypes_WMM_ParamElement_t *)pIe; + break; + } + + } + break; + default: + status = FALSE; + break; + } + + return status; +} + +BOOLEAN +ROM_parser_getAssocIEPtr(void *priv, uint8 *pIe, AssocIePointers_t *pIePointers) +{ + BOOLEAN status = TRUE; + switch (*pIe) { + case ELEM_ID_SSID: + pIePointers->pSsid = (IEEEtypes_SsIdElement_t *)pIe; + break; + + case ELEM_ID_COUNTRY: + pIePointers->pCountry = (IEEEtypes_CountryInfoElement_t *)pIe; + break; + + case ELEM_ID_DS_PARAM_SET: + pIePointers->pDsParam = (IEEEtypes_DsParamElement_t *)pIe; + break; + + case ELEM_ID_SUPPORTED_RATES: + pIePointers->pSupportedRates = + (IEEEtypes_SuppRatesElement_t *)pIe; + break; + + case ELEM_ID_EXT_SUPPORTED_RATES: + pIePointers->pExtSupportedRates + = (IEEEtypes_ExtSuppRatesElement_t *)pIe; + break; + + case ELEM_ID_RSN: + pIePointers->pRsn = (IEEEtypes_RSNElement_t *)pIe; + break; + + case ELEM_ID_VENDOR_SPECIFIC: + if (IsWPAElement(priv, (pIe + 2))) { + pIePointers->pWpa = (IEEEtypes_WPAElement_t *)pIe; + } else { + switch (IsWMMElement(priv, (pIe + 2))) { + case VendSpecIE_Other: + case VendSpecIE_TSPEC: + default: + status = FALSE; + break; + + case VendSpecIE_WMM_Info: + pIePointers->pWmmInfo + = (IEEEtypes_WMM_InfoElement_t *)pIe; + break; + + case VendSpecIE_WMM_Param: + pIePointers->pWmmParam + = (IEEEtypes_WMM_ParamElement_t *)pIe; + break; + } + } + break; + default: + status = FALSE; + break; + } + + return status; +} + +IEEEtypes_InfoElementHdr_t * +parser_getSpecificIE(IEEEtypes_ElementId_e elemId, UINT8 *pIe, int bufLen) +{ + if (!pIe) { + return NULL; + } + + while (bufLen) { + if (bufLen < (*(pIe + 1) + 2)) { + break; + } + + if (*pIe == elemId) { + return (IEEEtypes_InfoElementHdr_t *)pIe; + } + + bufLen -= *(pIe + 1) + 2; + pIe += *(pIe + 1) + 2; + } + + return NULL; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/parser_rom.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/parser_rom.h new file mode 100644 index 00000000..1783dafc --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/parser_rom.h @@ -0,0 +1,129 @@ +/** @file parser_rom.h + * + * @brief This file contains the data structrue for iepointer and declare the parse function + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef PARSER_ROM_H__ +#define PARSER_ROM_H__ +#include "IEEE_types.h" + +typedef enum { + VendSpecIE_Other = 0, + VendSpecIE_WMM_Info, + VendSpecIE_WMM_Param, + VendSpecIE_WPA, + VendSpecIE_WPS, + VendSpecIE_TSPEC, + VendSpecIE_SsIdL, + VendSpecIE_WFD, + + VendSpecIE_HT_Cap, + VendSpecIE_HT_Info, + +} VendorSpecificIEType_e; + +typedef struct { + /* IMPORTANT: please read before you modify this struct: Some of the + members of this struct are used in ROM code. Therefore, please do + not change any existing field, including its name and type. If you + want to add a new element into this struct add it at the end. */ + IEEEtypes_SsIdElement_t *pSsid; + IEEEtypes_TimElement_t *pTim; + IEEEtypes_WPAElement_t *pWpa; + IEEEtypes_WMM_InfoElement_t *pWmmInfo; + IEEEtypes_WMM_ParamElement_t *pWmmParam; + IEEEtypes_DsParamElement_t *pDsParam; + IEEEtypes_SuppRatesElement_t *pSupportedRates; + IEEEtypes_ExtSuppRatesElement_t *pExtSupportedRates; + IEEEtypes_ERPInfoElement_t *pErpInfo; + IEEEtypes_IbssParamElement_t *pIbssParam; + IEEEtypes_CountryInfoElement_t *pCountry; + + IEEEtypes_MobilityDomainElement_t *pMdie; + + IEEEtypes_RSNElement_t *pRsn; + + IEEEtypes_HT_Capability_t *pHtCap; + IEEEtypes_HT_Information_t *pHtInfo; + IEEEtypes_20N40_BSS_Coexist_t *p2040Coexist; + IEEEtypes_OBSS_ScanParam_t *pHtScanParam; + IEEEtypes_ExtCapability_t *pExtCap; + + IEEEtypes_WPSElement_t *pWps; + IEEEtypes_WAPIElement_t *pWapi; + +} IEPointers_t; + +typedef struct { + /* IMPORTANT: please read before you modify this struct: Some of the + members of this struct are used in ROM code. Therefore, please do + not change any existing field, including its name and type. If you + want to add a new element into this struct add it at the end. */ + IEEEtypes_SsIdElement_t *pSsid; + IEEEtypes_TimElement_t *pTim; + IEEEtypes_DsParamElement_t *pDsParam; + + IEEEtypes_CountryInfoElement_t *pCountry; + + UINT8 numSsIdLs; + IEEEtypes_SsIdLElement_t *pSsIdL; /* Only the first SSIDL found, + ** need iterator to get next + since ** multiple may be in + beacon */ +} ScanIePointers_t; + +typedef struct { + /* IMPORTANT: please read before you modify this struct: Some of the + members of this struct are used in ROM code. Therefore, please do + not change any existing field, including its name and type. If you + want to add a new element into this struct add it at the end. */ + IEEEtypes_SsIdElement_t *pSsid; + IEEEtypes_DsParamElement_t *pDsParam; + + IEEEtypes_CountryInfoElement_t *pCountry; + IEEEtypes_ApChanRptElement_t *pApChanRpt; + IEEEtypes_PowerConstraintElement_t *pPwrCon; + + IEEEtypes_SuppRatesElement_t *pSupportedRates; + IEEEtypes_ExtSuppRatesElement_t *pExtSupportedRates; + + IEEEtypes_WPAElement_t *pWpa; + IEEEtypes_WMM_InfoElement_t *pWmmInfo; + IEEEtypes_WMM_ParamElement_t *pWmmParam; + + IEEEtypes_MobilityDomainElement_t *pMdie; + + IEEEtypes_RSNElement_t *pRsn; + + IEEEtypes_HT_Information_t *pHtInfo; + IEEEtypes_HT_Capability_t *pHtCap; + IEEEtypes_20N40_BSS_Coexist_t *p2040Coexist; + IEEEtypes_OBSS_ScanParam_t *pHtScanParam; + IEEEtypes_ExtCapability_t *pExtCap; + +} AssocIePointers_t; +extern BOOLEAN ROM_parser_getIEPtr(void *priv, uint8 *pIe, + IEPointers_t *pIePointers); +extern BOOLEAN ROM_parser_getAssocIEPtr(void *priv, uint8 *pIe, + AssocIePointers_t *pIePointers); + +#endif // _PARSER_ROM_H_ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/pass_phrase.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/pass_phrase.c new file mode 100644 index 00000000..3002d49a --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/pass_phrase.c @@ -0,0 +1,115 @@ +/** @file pass_phrase.c + * + * @brief This file defines passphase hash + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#include "wl_macros.h" +#include "pass_phrase.h" +//#include "keyMgmtSta.h" +#include "sha1.h" +#include "hostsa_ext_def.h" +#include "authenticator.h" + +static INLINE t_u32 +pass_strlen(const char *str) +{ + t_u32 i; + + for (i = 0; str[i] != 0; i++) { + } + return i; +} + +/* + * F(P, S, c, i) = U1 xor U2 xor ... Uc + * U1 = PRF(P, S || Int(i)) + * U2 = PRF(P, U1) + * Uc = PRF(P, Uc-1) + */ +void +Mrvl_F(void *priv, char *password, unsigned char *ssid, int ssidlength, + int iterations, int count, unsigned char *output) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + static unsigned char digest[36], digest1[A_SHA_DIGEST_LEN]; + int i, j; + int len = pass_strlen(password); + int tmpLen = ssidlength + 4; + unsigned char *pTemp = digest; + + /* U1 = PRF(P, S || int(i)) */ + memcpy(util_fns, digest, ssid, ssidlength); + digest[ssidlength] = (unsigned char)((count >> 24) & 0xff); + digest[ssidlength + 1] = (unsigned char)((count >> 16) & 0xff); + digest[ssidlength + 2] = (unsigned char)((count >> 8) & 0xff); + digest[ssidlength + 3] = (unsigned char)(count & 0xff); + + Mrvl_hmac_sha1((void *)priv, &pTemp, + &tmpLen, + 1, + (unsigned char *)password, + len, digest1, A_SHA_DIGEST_LEN); + + /* output = U1 */ + memcpy(util_fns, output, digest1, A_SHA_DIGEST_LEN); + pTemp = digest1; + for (i = 1; i < iterations; i++) { + tmpLen = A_SHA_DIGEST_LEN; + + /* Un = PRF(P, Un-1) */ + Mrvl_hmac_sha1((void *)priv, &pTemp, + &tmpLen, + 1, + (unsigned char *)password, + len, digest, A_SHA_DIGEST_LEN); + + memcpy(util_fns, digest1, digest, A_SHA_DIGEST_LEN); + + /* output = output xor Un */ + for (j = 0; j < A_SHA_DIGEST_LEN; j++) { + output[j] ^= digest[j]; + } + } +} + +/* + * password - ascii string up to 63 characters in length + * ssid - octet string up to 32 octets + * ssidlength - length of ssid in octets + * output must be 32 octets in length and outputs 256 bits of key + */ +int +Mrvl_PasswordHash(void *priv, char *password, unsigned char *ssid, + int ssidlength, unsigned char *output) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + if ((pass_strlen(password) > 63) || (ssidlength > 32)) { + return 0; + } + + Mrvl_F((void *)priv, password, ssid, ssidlength, 4096, 2, output); + memcpy(util_fns, output + A_SHA_DIGEST_LEN, output, 12); + Mrvl_F((void *)priv, password, ssid, ssidlength, 4096, 1, output); + return 1; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/pass_phrase.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/pass_phrase.h new file mode 100644 index 00000000..805db91f --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/pass_phrase.h @@ -0,0 +1,31 @@ +/** @file pass_phrase.h + * + * @brief This file contains define for passphase hash + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef PASS_PHRASE_H__ +#define PASS_PHRASE_H__ + +extern int Mrvl_PasswordHash(void *priv, char *password, unsigned char *ssid, + int ssidlength, unsigned char *output); + +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/pmkCache.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/pmkCache.c new file mode 100644 index 00000000..d9aaf465 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/pmkCache.c @@ -0,0 +1,291 @@ +/** @file pmkcache.c + * + * @brief This file defines pmk cache functions + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#include "wl_macros.h" +#include "pass_phrase.h" +#include "pmkCache.h" +#include "hostsa_ext_def.h" +#include "authenticator.h" +#include "tlv.h" +#include "keyMgmtApStaCommon.h" + +#define MAX_PMK_CACHE_ENTRIES 10 + +pmkElement_t pmkCache[MAX_PMK_CACHE_ENTRIES]; + +char PSKPassPhrase[PSK_PASS_PHRASE_LEN_MAX]; +/* +** Replacement rank is used to determine which cache entry to replace +** once the cache is full. The rank order is determined by usage. The +** least recently used cache element is the first to be replaced. +** +** replacementRankMax is an indication of the number of cache entries used. +** It is used to determine the rank of the current cache entry used. +** +** Rank order goes from 1 to MAX_PMK_CACHE_ENTRIES. If the cache is full, +** the element with rank 1 is first to be replaced. +** +** Replacement rank of zero indicates that the entry is invalid. +*/ + +UINT8 * +pmkCacheFindPSK(void *priv, UINT8 *pSsid, UINT8 ssidLen) +{ + UINT8 *pPMK = NULL; + pmkElement_t *pPMKElement; + + if (!pPMK) { + /* extract the PSK from the cache entry */ + pPMKElement = + pmkCacheFindPSKElement((void *)priv, pSsid, ssidLen); + if (pPMKElement) { + pPMK = pPMKElement->PMK; + } else if ('\0' != PSKPassPhrase[0]) { + /* Generate a new PSK entry with the ** provided + passphrase. */ + pmkCacheAddPSK((void *)priv, pSsid, ssidLen, NULL, + PSKPassPhrase); + pPMKElement = + pmkCacheFindPSKElement((void *)priv, pSsid, + ssidLen); + pmkCacheGeneratePSK((void *)priv, pSsid, ssidLen, + PSKPassPhrase, pPMKElement->PMK); + pPMK = pPMKElement->PMK; + } + } + + return pPMK; +} + +UINT8 * +pmkCacheFindPassphrase(void *priv, UINT8 *pSsid, UINT8 ssidLen) +{ + UINT8 *pPassphrase = NULL; + pmkElement_t *pPMKElement; + + if (!pPassphrase) { + /* extract the PSK from the cache entry */ + pPMKElement = + pmkCacheFindPSKElement((void *)priv, pSsid, ssidLen); + if (pPMKElement) { + pPassphrase = pPMKElement->passphrase; + } + + } + + return pPassphrase; +} + +void +pmkCacheSetPassphrase(void *priv, char *pPassphrase) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + + if (pPassphrase != NULL) { + memcpy(util_fns, PSKPassPhrase, + pPassphrase, sizeof(PSKPassPhrase)); + } +} + +void +pmkCacheGetPassphrase(void *priv, char *pPassphrase) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + + if (pPassphrase != NULL) { + memcpy(util_fns, pPassphrase, + PSKPassPhrase, sizeof(PSKPassPhrase)); + } +} + +void +pmkCacheInit(void *priv) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + + memset(util_fns, pmkCache, 0x00, sizeof(pmkCache)); + memset(util_fns, PSKPassPhrase, 0x00, sizeof(PSKPassPhrase)); + replacementRankMax = 0; +} + +void +pmkCacheFlush(void *priv) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + + memset(util_fns, pmkCache, 0x00, sizeof(pmkCache)); + replacementRankMax = 0; +} + +//#pragma arm section code = ".init" +void +pmkCacheRomInit(void) +{ + ramHook_MAX_PMK_CACHE_ENTRIES = MAX_PMK_CACHE_ENTRIES; + ramHook_pmkCache = &pmkCache[0]; + ramHook_PSKPassPhrase = &PSKPassPhrase[0]; +// ramHook_hal_SetCpuMaxSpeed = hal_SetCpuOpToSecuritySpeed; +// ramHook_hal_RestoreCpuSpeed = cm_SetPerformanceParams; +} + +//#pragma arm section code + +#ifdef DRV_EMBEDDED_SUPPLICANT + +t_u16 +SupplicantSetPassphrase(void *priv, void *pPassphraseBuf) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + mlan_ds_passphrase *psk = (mlan_ds_passphrase *)pPassphraseBuf; + IEEEtypes_MacAddr_t *pBssid = NULL; + UINT8 *pPMK = NULL; + UINT8 Passphrase[PSK_PASS_PHRASE_LEN_MAX], *pPassphrase = NULL; + UINT8 *pSsid = NULL; + UINT8 ssidLen = 0; + UINT16 retVal = 0; + t_u8 zero_mac[] = { 0, 0, 0, 0, 0, 0 }; + + if (memcmp(util_fns, (t_u8 *)&psk->bssid, zero_mac, sizeof(zero_mac))) + pBssid = (IEEEtypes_MacAddr_t *)&psk->bssid; + + ssidLen = psk->ssid.ssid_len; + if (ssidLen > 0) + pSsid = psk->ssid.ssid; + + if (psk->psk_type == MLAN_PSK_PASSPHRASE) { + pPassphrase = psk->psk.passphrase.passphrase; + memset(util_fns, Passphrase, 0x00, sizeof(Passphrase)); + memcpy(util_fns, Passphrase, pPassphrase, + MIN(MLAN_MAX_PASSPHRASE_LENGTH, + psk->psk.passphrase.passphrase_len)); + } + + if (psk->psk_type == MLAN_PSK_PMK) + pPMK = psk->psk.pmk.pmk; + + /* Always enable the supplicant on a set */ + // supplicantEnable(priv); + + if (pBssid && pPMK) { + pmkCacheAddPMK(priv, pBssid, pPMK); + } else if (pSsid) { + if (pPMK) { + pmkCacheAddPSK(priv, pSsid, ssidLen, pPMK, NULL); + } else if (pPassphrase) { + pmkCacheAddPSK(priv, pSsid, ssidLen, NULL, Passphrase); + pPMK = pmkCacheFindPSK(priv, pSsid, ssidLen); + pmkCacheGeneratePSK(priv, pSsid, ssidLen, + (char *)Passphrase, pPMK); + } else { + /* Just an SSID so we can't set anything in the cache */ + retVal = 1; + } + } else if (pPassphrase) { + memcpy(util_fns, PSKPassPhrase, Passphrase, sizeof(Passphrase)); + } else { + /* Not enough data to set anything in the cache */ + retVal = 1; + } + + return retVal; +} + +BOOLEAN +SupplicantClearPMK_internal(void *priv, void *pPassphraseBuf) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + mlan_ds_passphrase *psk = (mlan_ds_passphrase *)pPassphraseBuf; + IEEEtypes_MacAddr_t *pBssid = NULL; + UINT8 *pPassphrase = NULL; + UINT8 *pSsid = NULL; + UINT8 ssidLen = 0; + t_u8 zero_mac[] = { 0, 0, 0, 0, 0, 0 }; + + if (memcmp(util_fns, (t_u8 *)&psk->bssid, zero_mac, sizeof(zero_mac))) + pBssid = (IEEEtypes_MacAddr_t *)&psk->bssid; + + ssidLen = psk->ssid.ssid_len; + if (ssidLen > 0) + pSsid = psk->ssid.ssid; + + if (psk->psk_type == MLAN_PSK_PASSPHRASE) + pPassphrase = psk->psk.passphrase.passphrase; + + if (pBssid) { + pmkCacheDeletePMK(priv, (UINT8 *)pBssid); + } else if (pSsid) { + pmkCacheDeletePSK(priv, pSsid, ssidLen); + } else if (pPassphrase) { + /* Clear the global passphrase by setting it to blank */ + memset(util_fns, ramHook_PSKPassPhrase, 0x00, + PSK_PASS_PHRASE_LEN_MAX); + } else { + return FALSE; + } + + return TRUE; +} + +void +SupplicantClearPMK(void *priv, void *pPassphrase) +{ + if (!SupplicantClearPMK_internal(priv, pPassphrase)) { + /* Always disable the supplicant on a flush */ + supplicantDisable(priv); + pmkCacheFlush(priv); + } +} + +void +SupplicantQueryPassphrase(void *priv, void *pPassphraseBuf) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + mlan_ds_passphrase *psk = (mlan_ds_passphrase *)pPassphraseBuf; + UINT8 *pPassphrase = NULL; + UINT8 *pSsid = NULL; + UINT8 ssidLen = 0; + + ssidLen = psk->ssid.ssid_len; + pSsid = psk->ssid.ssid; + + if (ssidLen) { + pPassphrase = pmkCacheFindPassphrase(priv, pSsid, ssidLen); + if (pPassphrase) { + psk->psk_type = MLAN_PSK_PASSPHRASE; + memcpy(util_fns, psk->psk.passphrase.passphrase, + pPassphrase, PSK_PASS_PHRASE_LEN_MAX); + psk->psk.passphrase.passphrase_len = + wlan_strlen(pPassphrase); + } + } + +} +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/pmkCache.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/pmkCache.h new file mode 100644 index 00000000..51423b04 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/pmkCache.h @@ -0,0 +1,58 @@ +/** @file pmkcache.h + * + * @brief This file contains define for pmk cache + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef PMK_CACHE_H__ +#define PMK_CACHE_H__ + +#include "wltypes.h" +#include "IEEE_types.h" +#include "pmkCache_rom.h" + +/*! +** \brief If a matching SSID entry is present in the PMK Cache, returns a +** pointer to the PSK. If no entry is found in the cache, a +** new PSK entry will be generated if a PassPhrase is set. +** \param pSsid pointer to string containing desired SSID. +** \param ssidLen length of the SSID string *pSsid. +** \exception Does not handle the case when multiple matching SSID entries are +** found. Returns the first match. +** \return pointer to PSK with matching SSID entry from PMK cache, +** NULL if no matching entry found. +*/ +extern UINT8 *pmkCacheFindPSK(void *priv, UINT8 *pSsid, UINT8 ssidLen); + +/*! +** \brief Flushes all entries in PMK cache +*/ +extern void pmkCacheFlush(void *priv); + +extern void pmkCacheGetPassphrase(void *priv, char *pPassphrase); + +extern void pmkCacheSetPassphrase(void *priv, char *pPassphrase); +extern void pmkCacheInit(void *priv); +extern void pmkCacheRomInit(void); + +extern void supplicantDisable(void *priv); + +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/pmkCache_rom.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/pmkCache_rom.c new file mode 100644 index 00000000..dff07691 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/pmkCache_rom.c @@ -0,0 +1,372 @@ +/** @file pmkcache_rom.c + * + * @brief This file defines function for pmk cache + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#include "wl_macros.h" +#include "wltypes.h" +#include "pass_phrase.h" +#include "pmkCache_rom.h" + +#include "hostsa_ext_def.h" +#include "authenticator.h" + +#define BSSID_FLAG 0xff + +SINT8 replacementRankMax; + +SINT32 ramHook_MAX_PMK_CACHE_ENTRIES; + +pmkElement_t *ramHook_pmkCache; +char *ramHook_PSKPassPhrase; + +//void (*ramHook_hal_SetCpuMaxSpeed)(void); +//void (*ramHook_hal_RestoreCpuSpeed)(void); + +/*! +** \brief creates a new PMK cache entry with given SSID. +** \param pSsid pointer to desired SSID. +** \param ssidLen length of the desired SSID string. +** \return pointer to newly created PMK cache entry, +** NULL if PMK cache is full. +*/ +pmkElement_t * +pmkCacheNewElement(void *priv) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + UINT8 index; + pmkElement_t *pPMK = NULL; + +#if 0 // !defined(REMOVE_PATCH_HOOKS) + if (pmkCacheNewElement_hook(&pPMK)) { + return pPMK; + } +#endif + + for (index = 0; index < ramHook_MAX_PMK_CACHE_ENTRIES; index++) { + /* If the cache is full the least recently used entry ** will + be replaced. Decrement all the replacement ranks ** to have + a free cache entry. */ + if (ramHook_MAX_PMK_CACHE_ENTRIES == replacementRankMax) { + (ramHook_pmkCache[index].replacementRank)--; + } + + /* Either the entry is free or it can be replaced */ + if (NULL == pPMK && + 0 == ramHook_pmkCache[index].replacementRank) { + /* empty entry found */ + pPMK = &ramHook_pmkCache[index]; + + /* clear the entry in case this is a replacement */ + memset(util_fns, pPMK, 0x00, sizeof(pmkElement_t)); + + if (ramHook_MAX_PMK_CACHE_ENTRIES > replacementRankMax) { + /* Cache isn't full so increment the max + possible rank */ + replacementRankMax++; + } + + /* Set the rank so it is the last to be replaced */ + ramHook_pmkCache[index].replacementRank = + replacementRankMax; + } + } + + return pPMK; +} + +void +pmkCacheUpdateReplacementRank(pmkElement_t *pPMKElement) +{ + UINT8 index; + + /* Update the replacementRank field if the PMK is found */ + if (pPMKElement && pPMKElement->replacementRank != replacementRankMax) { + /* + ** The cache entry with a larger rank value needs to + ** to be adjusted. The cache entry given will have the + ** largest rank value + */ + for (index = 0; index < ramHook_MAX_PMK_CACHE_ENTRIES; index++) { + if (ramHook_pmkCache[index].replacementRank + > pPMKElement->replacementRank) { + (ramHook_pmkCache[index].replacementRank)--; + } + } + + pPMKElement->replacementRank = replacementRankMax; + } +} + +/*! +** \brief Finds a PMK entry matching given BSSID +** \param pBssid pointer to the desired BSSID +** \return pointer to key data field of the matching PMK cache entry. +** NULL, if no matching PMK entry is found +*/ +pmkElement_t * +pmkCacheFindPMKElement(void *priv, IEEEtypes_MacAddr_t *pBssid) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + UINT8 index = 0; + pmkElement_t *pPMKElement = NULL; + +#if 0 // !defined(REMOVE_PATCH_HOOKS) + if (pmkCacheFindPMKElement_hook(pBssid, &pPMKElement)) { + return pPMKElement; + } +#endif + + for (index = 0; index < ramHook_MAX_PMK_CACHE_ENTRIES; index++) { + /* See if the entry is valid. ** See if the entry is a PMK ** + See if the BSSID matches */ + if (ramHook_pmkCache[index].replacementRank > 0 + && ramHook_pmkCache[index].length == BSSID_FLAG + && (0 == memcmp(util_fns, ramHook_pmkCache[index].key.Bssid, + pBssid, + sizeof(ramHook_pmkCache[index].key.Bssid)))) + { + pPMKElement = (ramHook_pmkCache + index); + } + } + + /* Update the rank if an entry is found. Null is an accepted ** input + for the function */ + pmkCacheUpdateReplacementRank(pPMKElement); + + return pPMKElement; +} + +/*! +** \brief If a matching SSID entry is present in the PMK Cache, returns a +** pointer to its key field. +** \param pSsid pointer to string containing desired SSID. +** \param ssidLen length of the SSID string *pSsid. +** \exception Does not handle the case when multiple matching SSID entries are +** found. Returns the first match. +** \return pointer to pmkElement with matching SSID entry from PMK cache, +** NULL if no matching entry found. +*/ +pmkElement_t * +pmkCacheFindPSKElement(void *priv, UINT8 *pSsid, UINT8 ssidLen) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + UINT8 index = 0; + pmkElement_t *pPMKElement = NULL; + +#if 0 // !defined(REMOVE_PATCH_HOOKS) + if (pmkCacheFindPSKElement_hook(pSsid, ssidLen, &pPMKElement)) { + return pPMKElement; + } +#endif + + for (index = 0; index < ramHook_MAX_PMK_CACHE_ENTRIES; index++) { + /* See if the entry is valid. ** See if the entry is a PSK ** + See if the SSID matches */ + if (ramHook_pmkCache[index].replacementRank + && ramHook_pmkCache[index].length == ssidLen + && (0 == memcmp(util_fns, ramHook_pmkCache[index].key.Ssid, + pSsid, ssidLen))) { + pPMKElement = (ramHook_pmkCache + index); + } + } + + /* Update the rank if an entry is found. Null is an accepted ** input + for the function */ + pmkCacheUpdateReplacementRank(pPMKElement); + + return pPMKElement; +} + +UINT8 * +pmkCacheFindPMK(void *priv, IEEEtypes_MacAddr_t *pBssid) +{ + UINT8 *pPMK = NULL; + pmkElement_t *pPMKElement = pmkCacheFindPMKElement(priv, pBssid); + + /* extract the PMK from the cache entry */ + if (pPMKElement) { + pPMK = pPMKElement->PMK; + } + + return pPMK; +} + +void +pmkCacheAddPMK(void *priv, IEEEtypes_MacAddr_t *pBssid, UINT8 *pPMK) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + pmkElement_t *pPMKElement; + +#if 0 // !defined(REMOVE_PATCH_HOOKS) + if (pmkCacheAddPMK_hook(pBssid, pPMK)) { + return; + } +#endif + + pPMKElement = pmkCacheFindPMKElement(priv, pBssid); + + if (!pPMKElement) { + /* Entry not found. Create a new entry and fill it in */ + pPMKElement = pmkCacheNewElement(priv); + + /* Update the key union with the BSSID */ + memcpy(util_fns, pPMKElement->key.Bssid, + pBssid, sizeof(pPMKElement->key.Bssid)); + + /* Set the length to a value that is invalid for ** an SSID. + The invalid value will flag the entry as a PMK */ + pPMKElement->length = BSSID_FLAG; + } + + if (pPMK) { + memcpy(util_fns, pPMKElement->PMK, pPMK, MAX_PMK_SIZE); + } +} + +void +pmkCacheAddPSK(void *priv, UINT8 *pSsid, UINT8 ssidLen, UINT8 *pPSK, + UINT8 *pPassphrase) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + pmkElement_t *pPMKElement; + +#if 0 // !defined(REMOVE_PATCH_HOOKS) + if (pmkCacheAddPSK_hook(pSsid, ssidLen, pPSK)) { + return; + } +#endif + + pPMKElement = pmkCacheFindPSKElement(priv, pSsid, ssidLen); + + if (NULL == pPMKElement) { + /* Entry not found. Create a new entry and fill it in */ + pPMKElement = pmkCacheNewElement(priv); + + /* Update the key portion with the SSID */ + memcpy(util_fns, pPMKElement->key.Ssid, pSsid, ssidLen); + + pPMKElement->length = ssidLen; + } + + if (pPSK) { + memcpy(util_fns, pPMKElement->PMK, pPSK, MAX_PMK_SIZE); + } + + if (pPassphrase) + memcpy(util_fns, pPMKElement->passphrase, pPassphrase, + PSK_PASS_PHRASE_LEN_MAX); + +} + +void +pmkCacheDeletePMK(void *priv, t_u8 *pBssid) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + pmkElement_t *pPMKElement = + pmkCacheFindPMKElement(priv, (IEEEtypes_MacAddr_t *)pBssid); + + if (pPMKElement) { + /* Invalidate the enrty by setting the memory for the ** cache + entry to zero. ** This will ensure that the replacementRank + is zero */ + memset(util_fns, pPMKElement, 0x00, sizeof(pmkElement_t)); + replacementRankMax--; + } +} + +void +pmkCacheDeletePSK(void *priv, UINT8 *pSsid, UINT8 ssidLen) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + pmkElement_t *pPMKElement = + pmkCacheFindPSKElement(priv, pSsid, ssidLen); + + if (pPMKElement) { + /* Invalidate the enrty by setting the memory for the ** cache + entry to zero. ** This will ensure that the replacementRank + is zero */ + memset(util_fns, pPMKElement, 0x00, sizeof(pmkElement_t)); + replacementRankMax--; + } +} + +UINT8 +pmkCacheGetHexNibble(UINT8 nibble) +{ + if (nibble >= 'a') { + return (nibble - 'a' + 10); + } + + if (nibble >= 'A') { + return (nibble - 'A' + 10); + } + + return (nibble - '0'); +} + +void +pmkCacheGeneratePSK(void *priv, UINT8 *pSsid, + UINT8 ssidLen, char *pPassphrase, UINT8 *pPSK) +{ + int i; + +#if 0 // !defined(REMOVE_PATCH_HOOKS) + if (pmkCacheGeneratePSK_hook(pSsid, ssidLen, pPassphrase, pPSK)) { + return; + } +#endif + + if (pPSK && pPassphrase) { + for (i = 0; i < PSK_PASS_PHRASE_LEN_MAX; i++) { + if (pPassphrase[i] == 0) { + break; + } + } + + if (i > 7 && i < PSK_PASS_PHRASE_LEN_MAX) { + /* bump the CPU speed for the PSK generation */ + // ramHook_hal_SetCpuMaxSpeed(); + Mrvl_PasswordHash((void *)priv, pPassphrase, + (UINT8 *)pSsid, ssidLen, pPSK); + // ramHook_hal_RestoreCpuSpeed(); + } else if (i == PSK_PASS_PHRASE_LEN_MAX) { + /* Convert ASCII to binary */ + for (i = 0; i < PSK_PASS_PHRASE_LEN_MAX; i += 2) { + pPSK[i / 2] = + ((pmkCacheGetHexNibble(pPassphrase[i]) + << 4) + | + pmkCacheGetHexNibble(pPassphrase + [i + 1])); + + } + } + } +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/pmkCache_rom.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/pmkCache_rom.h new file mode 100644 index 00000000..249414dc --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/pmkCache_rom.h @@ -0,0 +1,125 @@ +/** @file pmkcache_rom.h + * + * @brief This file contains the defien for pmk cache + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef PMK_CACHE_ROM_H__ +#define PMK_CACHE_ROM_H__ + +#include "wltypes.h" +#include "IEEE_types.h" +#include "hostsa_ext_def.h" + +#define PSK_PASS_PHRASE_LEN_MAX 63 +#define PMK_LEN_MAX 32 +#define MAX_PMK_SIZE 32 + +typedef struct { + union { + IEEEtypes_MacAddr_t Bssid; + char Ssid[32]; + } key; + UINT8 PMK[MAX_PMK_SIZE]; /* PMK / PSK */ + UINT8 length; + UINT8 passphrase[PSK_PASS_PHRASE_LEN_MAX]; + SINT8 replacementRank; +} pmkElement_t; + +/*! +** \brief Finds a PMK matching a given BSSID +** \param pBssid pointer to the desired BSSID +** \return pointer to the matching PMK. +** NULL, if no matching PMK entry is found +*/ +extern UINT8 *pmkCacheFindPMK(void *priv, IEEEtypes_MacAddr_t *pBssid); +#if 0 +extern BOOLEAN (*pmkCacheFindPSKElement_hook) (UINT8 *pSsid, + UINT8 ssidLen, + pmkElement_t **ptr_val); +#endif +extern pmkElement_t *pmkCacheFindPSKElement(void *priv, UINT8 *pSsid, + UINT8 ssidLen); + +/*! +** \brief adds a new PMK entry to PMK cache. +** \param pBssid pointer to Bssid for which to add the PMK +** \param pPMK pointer to PMK data +*/ +//extern BOOLEAN (*pmkCacheAddPMK_hook)(IEEEtypes_MacAddr_t * pBssid, +// UINT8 *pPMK); +extern void pmkCacheAddPMK(void *priv, IEEEtypes_MacAddr_t *pBssid, + UINT8 *pPMK); + +/*! +** \brief Adds a new PSK to PMK cache. +** \param pSsid pointer to desired SSID for which to add the PSK entry. +** \param ssidLen length of the SSID string. +** \param pPSK pointer to PSK to store. +*/ +#if 0 +extern BOOLEAN (*pmkCacheAddPSK_hook) (UINT8 *pSsid, + UINT8 ssidLen, UINT8 *pPSK); +#endif +extern void pmkCacheAddPSK(void *priv, UINT8 *pSsid, + UINT8 ssidLen, UINT8 *pPSK, UINT8 *pPassphrase); + +/*! +** \brief Delete a particular PMK entry from PMK cache. +** \param pBssid pointer to BSSID that needs to be deleted +*/ +extern void pmkCacheDeletePMK(void *priv, t_u8 *pBssid); + +/*! +** \brief delete a particular PSK entry from PMK cache +** \param Ssid pointer to SSID that needs to be deleted +** \param ssidLen length of the string pointed to by Ssid +*/ +extern void pmkCacheDeletePSK(void *priv, UINT8 *ssid, UINT8 ssidLen); +#if 0 +extern BOOLEAN (*pmkCacheGeneratePSK_hook) (UINT8 *pSsid, + UINT8 ssidLen, + char *pPassphrase, UINT8 *pPSK); +#endif +extern void pmkCacheGeneratePSK(void *priv, UINT8 *pSsid, + UINT8 ssidLen, char *pPassphrase, UINT8 *pPSK); + +//extern BOOLEAN (*pmkCacheNewElement_hook)(pmkElement_t ** ptr_val); +extern pmkElement_t *pmkCacheNewElement(void *priv); + +//extern BOOLEAN (*pmkCacheFindPMKElement_hook)(IEEEtypes_MacAddr_t * pBssid, +// pmkElement_t ** ptr_val); +extern pmkElement_t *pmkCacheFindPMKElement(void *priv, + IEEEtypes_MacAddr_t *pBssid); + +extern void pmkCacheUpdateReplacementRank(pmkElement_t *pPMKElement); + +extern SINT8 replacementRankMax; + +/* ROM linkages */ +extern SINT32 ramHook_MAX_PMK_CACHE_ENTRIES; +extern pmkElement_t *ramHook_pmkCache; +extern char *ramHook_PSKPassPhrase; + +//extern void (*ramHook_hal_SetCpuMaxSpeed)(void); +//extern void (*ramHook_hal_RestoreCpuSpeed)(void); + +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/rc4.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/rc4.c new file mode 100644 index 00000000..b4fba7de --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/rc4.c @@ -0,0 +1,127 @@ +/** @file rc4.c + * + * @brief This file defines rc4 encrypt algorithm + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#include "wltypes.h" +#include "rc4_rom.h" +#include "hostsa_ext_def.h" +#include "authenticator.h" + +typedef struct rc4_key { + unsigned char state[256]; + unsigned char x; + unsigned char y; +} rc4_key; + +static rc4_key rc4key; + +static void swap_byte(unsigned char *a, unsigned char *b); + +void +prepare_key(unsigned char *key_data_ptr, int key_data_len, rc4_key *key) +{ + unsigned char index1; + unsigned char index2; + unsigned char *state; + short counter; + + state = &key->state[0]; + for (counter = 0; counter < 256; counter++) { + state[counter] = counter; + } + key->x = 0; + key->y = 0; + index1 = 0; + index2 = 0; + for (counter = 0; counter < 256; counter++) { + index2 = (key_data_ptr[index1] + state[counter] + index2) % 256; + swap_byte(&state[counter], &state[index2]); + + index1 = (index1 + 1) % key_data_len; + } +} + +void +rc4(unsigned char *buffer_ptr, int buffer_len, int skip, rc4_key *key) +{ + unsigned char x; + unsigned char y; + unsigned char *state; + unsigned char xorIndex; + short counter; + + x = key->x; + y = key->y; + + state = &key->state[0]; + + for (counter = 0; counter < skip; counter++) { + x = (x + 1) % 256; + y = (state[x] + y) % 256; + swap_byte(&state[x], &state[y]); + } + + for (counter = 0; counter < buffer_len; counter++) { + x = (x + 1) % 256; + y = (state[x] + y) % 256; + swap_byte(&state[x], &state[y]); + + xorIndex = (state[x] + state[y]) % 256; + + buffer_ptr[counter] ^= state[xorIndex]; + } + key->x = x; + key->y = y; +} + +static void +swap_byte(unsigned char *a, unsigned char *b) +{ + unsigned char swapByte; + + swapByte = *a; + *a = *b; + *b = swapByte; +} + +void +RC4_Encrypt(void *priv, unsigned char *Encr_Key, + unsigned char *IV, + unsigned short iv_length, + unsigned char *Data, + unsigned short data_length, unsigned short skipBytes) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + unsigned char key[32]; + + if (iv_length + 16 > sizeof(key)) { + return; + } + + memcpy(util_fns, key, IV, iv_length); + memcpy(util_fns, key + iv_length, Encr_Key, 16); + + prepare_key(key, iv_length + 16, &rc4key); + rc4(Data, data_length, skipBytes, &rc4key); +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/rc4.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/rc4.h new file mode 100644 index 00000000..7b7b5294 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/rc4.h @@ -0,0 +1,30 @@ +/** @file rc4.h + * + * @brief This file include rc4_rom.h + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _RC4_H +#define _RC4_H + +#include "rc4_rom.h" + +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/rc4_rom.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/rc4_rom.h new file mode 100644 index 00000000..568cac3d --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/rc4_rom.h @@ -0,0 +1,33 @@ +/** @file rc4._rom.h + * + * @brief This file contains the define for rc4 + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _RC4_ROM_H +#define _RC4_ROM_H + +extern void RC4_Encrypt(void *pmpriv, unsigned char *Encr_Key, + unsigned char *IV, + unsigned short iv_length, + unsigned char *Data, + unsigned short data_length, unsigned short skipBytes); +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/rijndael.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/rijndael.c new file mode 100644 index 00000000..5704c706 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/rijndael.c @@ -0,0 +1,1353 @@ +/** @file rijndael.c + * + * @brief This file Optimised ANSI C code for the Rijndael cipher (now AES) + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ + +#include + +#include "rijndael.h" +#include "wltypes.h" +//#define FULL_UNROLL + +/* +Te0[x] = S [x].[02, 01, 01, 03]; +Te1[x] = S [x].[03, 02, 01, 01]; +Te2[x] = S [x].[01, 03, 02, 01]; +Te3[x] = S [x].[01, 01, 03, 02]; +Te4[x] = S [x].[01, 01, 01, 01]; + +Td0[x] = Si[x].[0e, 09, 0d, 0b]; +Td1[x] = Si[x].[0b, 0e, 09, 0d]; +Td2[x] = Si[x].[0d, 0b, 0e, 09]; +Td3[x] = Si[x].[09, 0d, 0b, 0e]; +Td4[x] = Si[x].[01, 01, 01, 01]; +*/ + +//#ifdef AES_WRAP_FUNCTION +static const u32 Te0[256] = { + 0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU, + 0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U, + 0x60303050U, 0x02010103U, 0xce6767a9U, 0x562b2b7dU, + 0xe7fefe19U, 0xb5d7d762U, 0x4dababe6U, 0xec76769aU, + 0x8fcaca45U, 0x1f82829dU, 0x89c9c940U, 0xfa7d7d87U, + 0xeffafa15U, 0xb25959ebU, 0x8e4747c9U, 0xfbf0f00bU, + 0x41adadecU, 0xb3d4d467U, 0x5fa2a2fdU, 0x45afafeaU, + 0x239c9cbfU, 0x53a4a4f7U, 0xe4727296U, 0x9bc0c05bU, + 0x75b7b7c2U, 0xe1fdfd1cU, 0x3d9393aeU, 0x4c26266aU, + 0x6c36365aU, 0x7e3f3f41U, 0xf5f7f702U, 0x83cccc4fU, + 0x6834345cU, 0x51a5a5f4U, 0xd1e5e534U, 0xf9f1f108U, + 0xe2717193U, 0xabd8d873U, 0x62313153U, 0x2a15153fU, + 0x0804040cU, 0x95c7c752U, 0x46232365U, 0x9dc3c35eU, + 0x30181828U, 0x379696a1U, 0x0a05050fU, 0x2f9a9ab5U, + 0x0e070709U, 0x24121236U, 0x1b80809bU, 0xdfe2e23dU, + 0xcdebeb26U, 0x4e272769U, 0x7fb2b2cdU, 0xea75759fU, + 0x1209091bU, 0x1d83839eU, 0x582c2c74U, 0x341a1a2eU, + 0x361b1b2dU, 0xdc6e6eb2U, 0xb45a5aeeU, 0x5ba0a0fbU, + 0xa45252f6U, 0x763b3b4dU, 0xb7d6d661U, 0x7db3b3ceU, + 0x5229297bU, 0xdde3e33eU, 0x5e2f2f71U, 0x13848497U, + 0xa65353f5U, 0xb9d1d168U, 0x00000000U, 0xc1eded2cU, + 0x40202060U, 0xe3fcfc1fU, 0x79b1b1c8U, 0xb65b5bedU, + 0xd46a6abeU, 0x8dcbcb46U, 0x67bebed9U, 0x7239394bU, + 0x944a4adeU, 0x984c4cd4U, 0xb05858e8U, 0x85cfcf4aU, + 0xbbd0d06bU, 0xc5efef2aU, 0x4faaaae5U, 0xedfbfb16U, + 0x864343c5U, 0x9a4d4dd7U, 0x66333355U, 0x11858594U, + 0x8a4545cfU, 0xe9f9f910U, 0x04020206U, 0xfe7f7f81U, + 0xa05050f0U, 0x783c3c44U, 0x259f9fbaU, 0x4ba8a8e3U, + 0xa25151f3U, 0x5da3a3feU, 0x804040c0U, 0x058f8f8aU, + 0x3f9292adU, 0x219d9dbcU, 0x70383848U, 0xf1f5f504U, + 0x63bcbcdfU, 0x77b6b6c1U, 0xafdada75U, 0x42212163U, + 0x20101030U, 0xe5ffff1aU, 0xfdf3f30eU, 0xbfd2d26dU, + 0x81cdcd4cU, 0x180c0c14U, 0x26131335U, 0xc3ecec2fU, + 0xbe5f5fe1U, 0x359797a2U, 0x884444ccU, 0x2e171739U, + 0x93c4c457U, 0x55a7a7f2U, 0xfc7e7e82U, 0x7a3d3d47U, + 0xc86464acU, 0xba5d5de7U, 0x3219192bU, 0xe6737395U, + 0xc06060a0U, 0x19818198U, 0x9e4f4fd1U, 0xa3dcdc7fU, + 0x44222266U, 0x542a2a7eU, 0x3b9090abU, 0x0b888883U, + 0x8c4646caU, 0xc7eeee29U, 0x6bb8b8d3U, 0x2814143cU, + 0xa7dede79U, 0xbc5e5ee2U, 0x160b0b1dU, 0xaddbdb76U, + 0xdbe0e03bU, 0x64323256U, 0x743a3a4eU, 0x140a0a1eU, + 0x924949dbU, 0x0c06060aU, 0x4824246cU, 0xb85c5ce4U, + 0x9fc2c25dU, 0xbdd3d36eU, 0x43acacefU, 0xc46262a6U, + 0x399191a8U, 0x319595a4U, 0xd3e4e437U, 0xf279798bU, + 0xd5e7e732U, 0x8bc8c843U, 0x6e373759U, 0xda6d6db7U, + 0x018d8d8cU, 0xb1d5d564U, 0x9c4e4ed2U, 0x49a9a9e0U, + 0xd86c6cb4U, 0xac5656faU, 0xf3f4f407U, 0xcfeaea25U, + 0xca6565afU, 0xf47a7a8eU, 0x47aeaee9U, 0x10080818U, + 0x6fbabad5U, 0xf0787888U, 0x4a25256fU, 0x5c2e2e72U, + 0x381c1c24U, 0x57a6a6f1U, 0x73b4b4c7U, 0x97c6c651U, + 0xcbe8e823U, 0xa1dddd7cU, 0xe874749cU, 0x3e1f1f21U, + 0x964b4bddU, 0x61bdbddcU, 0x0d8b8b86U, 0x0f8a8a85U, + 0xe0707090U, 0x7c3e3e42U, 0x71b5b5c4U, 0xcc6666aaU, + 0x904848d8U, 0x06030305U, 0xf7f6f601U, 0x1c0e0e12U, + 0xc26161a3U, 0x6a35355fU, 0xae5757f9U, 0x69b9b9d0U, + 0x17868691U, 0x99c1c158U, 0x3a1d1d27U, 0x279e9eb9U, + 0xd9e1e138U, 0xebf8f813U, 0x2b9898b3U, 0x22111133U, + 0xd26969bbU, 0xa9d9d970U, 0x078e8e89U, 0x339494a7U, + 0x2d9b9bb6U, 0x3c1e1e22U, 0x15878792U, 0xc9e9e920U, + 0x87cece49U, 0xaa5555ffU, 0x50282878U, 0xa5dfdf7aU, + 0x038c8c8fU, 0x59a1a1f8U, 0x09898980U, 0x1a0d0d17U, + 0x65bfbfdaU, 0xd7e6e631U, 0x844242c6U, 0xd06868b8U, + 0x824141c3U, 0x299999b0U, 0x5a2d2d77U, 0x1e0f0f11U, + 0x7bb0b0cbU, 0xa85454fcU, 0x6dbbbbd6U, 0x2c16163aU, +}; + +static const u32 Te1[256] = { + 0xa5c66363U, 0x84f87c7cU, 0x99ee7777U, 0x8df67b7bU, + 0x0dfff2f2U, 0xbdd66b6bU, 0xb1de6f6fU, 0x5491c5c5U, + 0x50603030U, 0x03020101U, 0xa9ce6767U, 0x7d562b2bU, + 0x19e7fefeU, 0x62b5d7d7U, 0xe64dababU, 0x9aec7676U, + 0x458fcacaU, 0x9d1f8282U, 0x4089c9c9U, 0x87fa7d7dU, + 0x15effafaU, 0xebb25959U, 0xc98e4747U, 0x0bfbf0f0U, + 0xec41adadU, 0x67b3d4d4U, 0xfd5fa2a2U, 0xea45afafU, + 0xbf239c9cU, 0xf753a4a4U, 0x96e47272U, 0x5b9bc0c0U, + 0xc275b7b7U, 0x1ce1fdfdU, 0xae3d9393U, 0x6a4c2626U, + 0x5a6c3636U, 0x417e3f3fU, 0x02f5f7f7U, 0x4f83ccccU, + 0x5c683434U, 0xf451a5a5U, 0x34d1e5e5U, 0x08f9f1f1U, + 0x93e27171U, 0x73abd8d8U, 0x53623131U, 0x3f2a1515U, + 0x0c080404U, 0x5295c7c7U, 0x65462323U, 0x5e9dc3c3U, + 0x28301818U, 0xa1379696U, 0x0f0a0505U, 0xb52f9a9aU, + 0x090e0707U, 0x36241212U, 0x9b1b8080U, 0x3ddfe2e2U, + 0x26cdebebU, 0x694e2727U, 0xcd7fb2b2U, 0x9fea7575U, + 0x1b120909U, 0x9e1d8383U, 0x74582c2cU, 0x2e341a1aU, + 0x2d361b1bU, 0xb2dc6e6eU, 0xeeb45a5aU, 0xfb5ba0a0U, + 0xf6a45252U, 0x4d763b3bU, 0x61b7d6d6U, 0xce7db3b3U, + 0x7b522929U, 0x3edde3e3U, 0x715e2f2fU, 0x97138484U, + 0xf5a65353U, 0x68b9d1d1U, 0x00000000U, 0x2cc1ededU, + 0x60402020U, 0x1fe3fcfcU, 0xc879b1b1U, 0xedb65b5bU, + 0xbed46a6aU, 0x468dcbcbU, 0xd967bebeU, 0x4b723939U, + 0xde944a4aU, 0xd4984c4cU, 0xe8b05858U, 0x4a85cfcfU, + 0x6bbbd0d0U, 0x2ac5efefU, 0xe54faaaaU, 0x16edfbfbU, + 0xc5864343U, 0xd79a4d4dU, 0x55663333U, 0x94118585U, + 0xcf8a4545U, 0x10e9f9f9U, 0x06040202U, 0x81fe7f7fU, + 0xf0a05050U, 0x44783c3cU, 0xba259f9fU, 0xe34ba8a8U, + 0xf3a25151U, 0xfe5da3a3U, 0xc0804040U, 0x8a058f8fU, + 0xad3f9292U, 0xbc219d9dU, 0x48703838U, 0x04f1f5f5U, + 0xdf63bcbcU, 0xc177b6b6U, 0x75afdadaU, 0x63422121U, + 0x30201010U, 0x1ae5ffffU, 0x0efdf3f3U, 0x6dbfd2d2U, + 0x4c81cdcdU, 0x14180c0cU, 0x35261313U, 0x2fc3ececU, + 0xe1be5f5fU, 0xa2359797U, 0xcc884444U, 0x392e1717U, + 0x5793c4c4U, 0xf255a7a7U, 0x82fc7e7eU, 0x477a3d3dU, + 0xacc86464U, 0xe7ba5d5dU, 0x2b321919U, 0x95e67373U, + 0xa0c06060U, 0x98198181U, 0xd19e4f4fU, 0x7fa3dcdcU, + 0x66442222U, 0x7e542a2aU, 0xab3b9090U, 0x830b8888U, + 0xca8c4646U, 0x29c7eeeeU, 0xd36bb8b8U, 0x3c281414U, + 0x79a7dedeU, 0xe2bc5e5eU, 0x1d160b0bU, 0x76addbdbU, + 0x3bdbe0e0U, 0x56643232U, 0x4e743a3aU, 0x1e140a0aU, + 0xdb924949U, 0x0a0c0606U, 0x6c482424U, 0xe4b85c5cU, + 0x5d9fc2c2U, 0x6ebdd3d3U, 0xef43acacU, 0xa6c46262U, + 0xa8399191U, 0xa4319595U, 0x37d3e4e4U, 0x8bf27979U, + 0x32d5e7e7U, 0x438bc8c8U, 0x596e3737U, 0xb7da6d6dU, + 0x8c018d8dU, 0x64b1d5d5U, 0xd29c4e4eU, 0xe049a9a9U, + 0xb4d86c6cU, 0xfaac5656U, 0x07f3f4f4U, 0x25cfeaeaU, + 0xafca6565U, 0x8ef47a7aU, 0xe947aeaeU, 0x18100808U, + 0xd56fbabaU, 0x88f07878U, 0x6f4a2525U, 0x725c2e2eU, + 0x24381c1cU, 0xf157a6a6U, 0xc773b4b4U, 0x5197c6c6U, + 0x23cbe8e8U, 0x7ca1ddddU, 0x9ce87474U, 0x213e1f1fU, + 0xdd964b4bU, 0xdc61bdbdU, 0x860d8b8bU, 0x850f8a8aU, + 0x90e07070U, 0x427c3e3eU, 0xc471b5b5U, 0xaacc6666U, + 0xd8904848U, 0x05060303U, 0x01f7f6f6U, 0x121c0e0eU, + 0xa3c26161U, 0x5f6a3535U, 0xf9ae5757U, 0xd069b9b9U, + 0x91178686U, 0x5899c1c1U, 0x273a1d1dU, 0xb9279e9eU, + 0x38d9e1e1U, 0x13ebf8f8U, 0xb32b9898U, 0x33221111U, + 0xbbd26969U, 0x70a9d9d9U, 0x89078e8eU, 0xa7339494U, + 0xb62d9b9bU, 0x223c1e1eU, 0x92158787U, 0x20c9e9e9U, + 0x4987ceceU, 0xffaa5555U, 0x78502828U, 0x7aa5dfdfU, + 0x8f038c8cU, 0xf859a1a1U, 0x80098989U, 0x171a0d0dU, + 0xda65bfbfU, 0x31d7e6e6U, 0xc6844242U, 0xb8d06868U, + 0xc3824141U, 0xb0299999U, 0x775a2d2dU, 0x111e0f0fU, + 0xcb7bb0b0U, 0xfca85454U, 0xd66dbbbbU, 0x3a2c1616U, +}; + +static const u32 Te2[256] = { + 0x63a5c663U, 0x7c84f87cU, 0x7799ee77U, 0x7b8df67bU, + 0xf20dfff2U, 0x6bbdd66bU, 0x6fb1de6fU, 0xc55491c5U, + 0x30506030U, 0x01030201U, 0x67a9ce67U, 0x2b7d562bU, + 0xfe19e7feU, 0xd762b5d7U, 0xabe64dabU, 0x769aec76U, + 0xca458fcaU, 0x829d1f82U, 0xc94089c9U, 0x7d87fa7dU, + 0xfa15effaU, 0x59ebb259U, 0x47c98e47U, 0xf00bfbf0U, + 0xadec41adU, 0xd467b3d4U, 0xa2fd5fa2U, 0xafea45afU, + 0x9cbf239cU, 0xa4f753a4U, 0x7296e472U, 0xc05b9bc0U, + 0xb7c275b7U, 0xfd1ce1fdU, 0x93ae3d93U, 0x266a4c26U, + 0x365a6c36U, 0x3f417e3fU, 0xf702f5f7U, 0xcc4f83ccU, + 0x345c6834U, 0xa5f451a5U, 0xe534d1e5U, 0xf108f9f1U, + 0x7193e271U, 0xd873abd8U, 0x31536231U, 0x153f2a15U, + 0x040c0804U, 0xc75295c7U, 0x23654623U, 0xc35e9dc3U, + 0x18283018U, 0x96a13796U, 0x050f0a05U, 0x9ab52f9aU, + 0x07090e07U, 0x12362412U, 0x809b1b80U, 0xe23ddfe2U, + 0xeb26cdebU, 0x27694e27U, 0xb2cd7fb2U, 0x759fea75U, + 0x091b1209U, 0x839e1d83U, 0x2c74582cU, 0x1a2e341aU, + 0x1b2d361bU, 0x6eb2dc6eU, 0x5aeeb45aU, 0xa0fb5ba0U, + 0x52f6a452U, 0x3b4d763bU, 0xd661b7d6U, 0xb3ce7db3U, + 0x297b5229U, 0xe33edde3U, 0x2f715e2fU, 0x84971384U, + 0x53f5a653U, 0xd168b9d1U, 0x00000000U, 0xed2cc1edU, + 0x20604020U, 0xfc1fe3fcU, 0xb1c879b1U, 0x5bedb65bU, + 0x6abed46aU, 0xcb468dcbU, 0xbed967beU, 0x394b7239U, + 0x4ade944aU, 0x4cd4984cU, 0x58e8b058U, 0xcf4a85cfU, + 0xd06bbbd0U, 0xef2ac5efU, 0xaae54faaU, 0xfb16edfbU, + 0x43c58643U, 0x4dd79a4dU, 0x33556633U, 0x85941185U, + 0x45cf8a45U, 0xf910e9f9U, 0x02060402U, 0x7f81fe7fU, + 0x50f0a050U, 0x3c44783cU, 0x9fba259fU, 0xa8e34ba8U, + 0x51f3a251U, 0xa3fe5da3U, 0x40c08040U, 0x8f8a058fU, + 0x92ad3f92U, 0x9dbc219dU, 0x38487038U, 0xf504f1f5U, + 0xbcdf63bcU, 0xb6c177b6U, 0xda75afdaU, 0x21634221U, + 0x10302010U, 0xff1ae5ffU, 0xf30efdf3U, 0xd26dbfd2U, + 0xcd4c81cdU, 0x0c14180cU, 0x13352613U, 0xec2fc3ecU, + 0x5fe1be5fU, 0x97a23597U, 0x44cc8844U, 0x17392e17U, + 0xc45793c4U, 0xa7f255a7U, 0x7e82fc7eU, 0x3d477a3dU, + 0x64acc864U, 0x5de7ba5dU, 0x192b3219U, 0x7395e673U, + 0x60a0c060U, 0x81981981U, 0x4fd19e4fU, 0xdc7fa3dcU, + 0x22664422U, 0x2a7e542aU, 0x90ab3b90U, 0x88830b88U, + 0x46ca8c46U, 0xee29c7eeU, 0xb8d36bb8U, 0x143c2814U, + 0xde79a7deU, 0x5ee2bc5eU, 0x0b1d160bU, 0xdb76addbU, + 0xe03bdbe0U, 0x32566432U, 0x3a4e743aU, 0x0a1e140aU, + 0x49db9249U, 0x060a0c06U, 0x246c4824U, 0x5ce4b85cU, + 0xc25d9fc2U, 0xd36ebdd3U, 0xacef43acU, 0x62a6c462U, + 0x91a83991U, 0x95a43195U, 0xe437d3e4U, 0x798bf279U, + 0xe732d5e7U, 0xc8438bc8U, 0x37596e37U, 0x6db7da6dU, + 0x8d8c018dU, 0xd564b1d5U, 0x4ed29c4eU, 0xa9e049a9U, + 0x6cb4d86cU, 0x56faac56U, 0xf407f3f4U, 0xea25cfeaU, + 0x65afca65U, 0x7a8ef47aU, 0xaee947aeU, 0x08181008U, + 0xbad56fbaU, 0x7888f078U, 0x256f4a25U, 0x2e725c2eU, + 0x1c24381cU, 0xa6f157a6U, 0xb4c773b4U, 0xc65197c6U, + 0xe823cbe8U, 0xdd7ca1ddU, 0x749ce874U, 0x1f213e1fU, + 0x4bdd964bU, 0xbddc61bdU, 0x8b860d8bU, 0x8a850f8aU, + 0x7090e070U, 0x3e427c3eU, 0xb5c471b5U, 0x66aacc66U, + 0x48d89048U, 0x03050603U, 0xf601f7f6U, 0x0e121c0eU, + 0x61a3c261U, 0x355f6a35U, 0x57f9ae57U, 0xb9d069b9U, + 0x86911786U, 0xc15899c1U, 0x1d273a1dU, 0x9eb9279eU, + 0xe138d9e1U, 0xf813ebf8U, 0x98b32b98U, 0x11332211U, + 0x69bbd269U, 0xd970a9d9U, 0x8e89078eU, 0x94a73394U, + 0x9bb62d9bU, 0x1e223c1eU, 0x87921587U, 0xe920c9e9U, + 0xce4987ceU, 0x55ffaa55U, 0x28785028U, 0xdf7aa5dfU, + 0x8c8f038cU, 0xa1f859a1U, 0x89800989U, 0x0d171a0dU, + 0xbfda65bfU, 0xe631d7e6U, 0x42c68442U, 0x68b8d068U, + 0x41c38241U, 0x99b02999U, 0x2d775a2dU, 0x0f111e0fU, + 0xb0cb7bb0U, 0x54fca854U, 0xbbd66dbbU, 0x163a2c16U, +}; + +static const u32 Te3[256] = { + + 0x6363a5c6U, 0x7c7c84f8U, 0x777799eeU, 0x7b7b8df6U, + 0xf2f20dffU, 0x6b6bbdd6U, 0x6f6fb1deU, 0xc5c55491U, + 0x30305060U, 0x01010302U, 0x6767a9ceU, 0x2b2b7d56U, + 0xfefe19e7U, 0xd7d762b5U, 0xababe64dU, 0x76769aecU, + 0xcaca458fU, 0x82829d1fU, 0xc9c94089U, 0x7d7d87faU, + 0xfafa15efU, 0x5959ebb2U, 0x4747c98eU, 0xf0f00bfbU, + 0xadadec41U, 0xd4d467b3U, 0xa2a2fd5fU, 0xafafea45U, + 0x9c9cbf23U, 0xa4a4f753U, 0x727296e4U, 0xc0c05b9bU, + 0xb7b7c275U, 0xfdfd1ce1U, 0x9393ae3dU, 0x26266a4cU, + 0x36365a6cU, 0x3f3f417eU, 0xf7f702f5U, 0xcccc4f83U, + 0x34345c68U, 0xa5a5f451U, 0xe5e534d1U, 0xf1f108f9U, + 0x717193e2U, 0xd8d873abU, 0x31315362U, 0x15153f2aU, + 0x04040c08U, 0xc7c75295U, 0x23236546U, 0xc3c35e9dU, + 0x18182830U, 0x9696a137U, 0x05050f0aU, 0x9a9ab52fU, + 0x0707090eU, 0x12123624U, 0x80809b1bU, 0xe2e23ddfU, + 0xebeb26cdU, 0x2727694eU, 0xb2b2cd7fU, 0x75759feaU, + 0x09091b12U, 0x83839e1dU, 0x2c2c7458U, 0x1a1a2e34U, + 0x1b1b2d36U, 0x6e6eb2dcU, 0x5a5aeeb4U, 0xa0a0fb5bU, + 0x5252f6a4U, 0x3b3b4d76U, 0xd6d661b7U, 0xb3b3ce7dU, + 0x29297b52U, 0xe3e33eddU, 0x2f2f715eU, 0x84849713U, + 0x5353f5a6U, 0xd1d168b9U, 0x00000000U, 0xeded2cc1U, + 0x20206040U, 0xfcfc1fe3U, 0xb1b1c879U, 0x5b5bedb6U, + 0x6a6abed4U, 0xcbcb468dU, 0xbebed967U, 0x39394b72U, + 0x4a4ade94U, 0x4c4cd498U, 0x5858e8b0U, 0xcfcf4a85U, + 0xd0d06bbbU, 0xefef2ac5U, 0xaaaae54fU, 0xfbfb16edU, + 0x4343c586U, 0x4d4dd79aU, 0x33335566U, 0x85859411U, + 0x4545cf8aU, 0xf9f910e9U, 0x02020604U, 0x7f7f81feU, + 0x5050f0a0U, 0x3c3c4478U, 0x9f9fba25U, 0xa8a8e34bU, + 0x5151f3a2U, 0xa3a3fe5dU, 0x4040c080U, 0x8f8f8a05U, + 0x9292ad3fU, 0x9d9dbc21U, 0x38384870U, 0xf5f504f1U, + 0xbcbcdf63U, 0xb6b6c177U, 0xdada75afU, 0x21216342U, + 0x10103020U, 0xffff1ae5U, 0xf3f30efdU, 0xd2d26dbfU, + 0xcdcd4c81U, 0x0c0c1418U, 0x13133526U, 0xecec2fc3U, + 0x5f5fe1beU, 0x9797a235U, 0x4444cc88U, 0x1717392eU, + 0xc4c45793U, 0xa7a7f255U, 0x7e7e82fcU, 0x3d3d477aU, + 0x6464acc8U, 0x5d5de7baU, 0x19192b32U, 0x737395e6U, + 0x6060a0c0U, 0x81819819U, 0x4f4fd19eU, 0xdcdc7fa3U, + 0x22226644U, 0x2a2a7e54U, 0x9090ab3bU, 0x8888830bU, + 0x4646ca8cU, 0xeeee29c7U, 0xb8b8d36bU, 0x14143c28U, + 0xdede79a7U, 0x5e5ee2bcU, 0x0b0b1d16U, 0xdbdb76adU, + 0xe0e03bdbU, 0x32325664U, 0x3a3a4e74U, 0x0a0a1e14U, + 0x4949db92U, 0x06060a0cU, 0x24246c48U, 0x5c5ce4b8U, + 0xc2c25d9fU, 0xd3d36ebdU, 0xacacef43U, 0x6262a6c4U, + 0x9191a839U, 0x9595a431U, 0xe4e437d3U, 0x79798bf2U, + 0xe7e732d5U, 0xc8c8438bU, 0x3737596eU, 0x6d6db7daU, + 0x8d8d8c01U, 0xd5d564b1U, 0x4e4ed29cU, 0xa9a9e049U, + 0x6c6cb4d8U, 0x5656faacU, 0xf4f407f3U, 0xeaea25cfU, + 0x6565afcaU, 0x7a7a8ef4U, 0xaeaee947U, 0x08081810U, + 0xbabad56fU, 0x787888f0U, 0x25256f4aU, 0x2e2e725cU, + 0x1c1c2438U, 0xa6a6f157U, 0xb4b4c773U, 0xc6c65197U, + 0xe8e823cbU, 0xdddd7ca1U, 0x74749ce8U, 0x1f1f213eU, + 0x4b4bdd96U, 0xbdbddc61U, 0x8b8b860dU, 0x8a8a850fU, + 0x707090e0U, 0x3e3e427cU, 0xb5b5c471U, 0x6666aaccU, + 0x4848d890U, 0x03030506U, 0xf6f601f7U, 0x0e0e121cU, + 0x6161a3c2U, 0x35355f6aU, 0x5757f9aeU, 0xb9b9d069U, + 0x86869117U, 0xc1c15899U, 0x1d1d273aU, 0x9e9eb927U, + 0xe1e138d9U, 0xf8f813ebU, 0x9898b32bU, 0x11113322U, + 0x6969bbd2U, 0xd9d970a9U, 0x8e8e8907U, 0x9494a733U, + 0x9b9bb62dU, 0x1e1e223cU, 0x87879215U, 0xe9e920c9U, + 0xcece4987U, 0x5555ffaaU, 0x28287850U, 0xdfdf7aa5U, + 0x8c8c8f03U, 0xa1a1f859U, 0x89898009U, 0x0d0d171aU, + 0xbfbfda65U, 0xe6e631d7U, 0x4242c684U, 0x6868b8d0U, + 0x4141c382U, 0x9999b029U, 0x2d2d775aU, 0x0f0f111eU, + 0xb0b0cb7bU, 0x5454fca8U, 0xbbbbd66dU, 0x16163a2cU, +}; + +//#endif +static const u8 Te4[256] = { + 0x63U, 0x7cU, 0x77U, 0x7bU, + 0xf2U, 0x6bU, 0x6fU, 0xc5U, + 0x30U, 0x01U, 0x67U, 0x2bU, + 0xfeU, 0xd7U, 0xabU, 0x76U, + 0xcaU, 0x82U, 0xc9U, 0x7dU, + 0xfaU, 0x59U, 0x47U, 0xf0U, + 0xadU, 0xd4U, 0xa2U, 0xafU, + 0x9cU, 0xa4U, 0x72U, 0xc0U, + 0xb7U, 0xfdU, 0x93U, 0x26U, + 0x36U, 0x3fU, 0xf7U, 0xccU, + 0x34U, 0xa5U, 0xe5U, 0xf1U, + 0x71U, 0xd8U, 0x31U, 0x15U, + 0x04U, 0xc7U, 0x23U, 0xc3U, + 0x18U, 0x96U, 0x05U, 0x9aU, + 0x07U, 0x12U, 0x80U, 0xe2U, + 0xebU, 0x27U, 0xb2U, 0x75U, + 0x09U, 0x83U, 0x2cU, 0x1aU, + 0x1bU, 0x6eU, 0x5aU, 0xa0U, + 0x52U, 0x3bU, 0xd6U, 0xb3U, + 0x29U, 0xe3U, 0x2fU, 0x84U, + 0x53U, 0xd1U, 0x00U, 0xedU, + 0x20U, 0xfcU, 0xb1U, 0x5bU, + 0x6aU, 0xcbU, 0xbeU, 0x39U, + 0x4aU, 0x4cU, 0x58U, 0xcfU, + 0xd0U, 0xefU, 0xaaU, 0xfbU, + 0x43U, 0x4dU, 0x33U, 0x85U, + 0x45U, 0xf9U, 0x02U, 0x7fU, + 0x50U, 0x3cU, 0x9fU, 0xa8U, + 0x51U, 0xa3U, 0x40U, 0x8fU, + 0x92U, 0x9dU, 0x38U, 0xf5U, + 0xbcU, 0xb6U, 0xdaU, 0x21U, + 0x10U, 0xffU, 0xf3U, 0xd2U, + 0xcdU, 0x0cU, 0x13U, 0xecU, + 0x5fU, 0x97U, 0x44U, 0x17U, + 0xc4U, 0xa7U, 0x7eU, 0x3dU, + 0x64U, 0x5dU, 0x19U, 0x73U, + 0x60U, 0x81U, 0x4fU, 0xdcU, + 0x22U, 0x2aU, 0x90U, 0x88U, + 0x46U, 0xeeU, 0xb8U, 0x14U, + 0xdeU, 0x5eU, 0x0bU, 0xdbU, + 0xe0U, 0x32U, 0x3aU, 0x0aU, + 0x49U, 0x06U, 0x24U, 0x5cU, + 0xc2U, 0xd3U, 0xacU, 0x62U, + 0x91U, 0x95U, 0xe4U, 0x79U, + 0xe7U, 0xc8U, 0x37U, 0x6dU, + 0x8dU, 0xd5U, 0x4eU, 0xa9U, + 0x6cU, 0x56U, 0xf4U, 0xeaU, + 0x65U, 0x7aU, 0xaeU, 0x08U, + 0xbaU, 0x78U, 0x25U, 0x2eU, + 0x1cU, 0xa6U, 0xb4U, 0xc6U, + 0xe8U, 0xddU, 0x74U, 0x1fU, + 0x4bU, 0xbdU, 0x8bU, 0x8aU, + 0x70U, 0x3eU, 0xb5U, 0x66U, + 0x48U, 0x03U, 0xf6U, 0x0eU, + 0x61U, 0x35U, 0x57U, 0xb9U, + 0x86U, 0xc1U, 0x1dU, 0x9eU, + 0xe1U, 0xf8U, 0x98U, 0x11U, + 0x69U, 0xd9U, 0x8eU, 0x94U, + 0x9bU, 0x1eU, 0x87U, 0xe9U, + 0xceU, 0x55U, 0x28U, 0xdfU, + 0x8cU, 0xa1U, 0x89U, 0x0dU, + 0xbfU, 0xe6U, 0x42U, 0x68U, + 0x41U, 0x99U, 0x2dU, 0x0fU, + 0xb0U, 0x54U, 0xbbU, 0x16U, +}; + +static const u32 Td0[256] = { + 0x51f4a750U, 0x7e416553U, 0x1a17a4c3U, 0x3a275e96U, + 0x3bab6bcbU, 0x1f9d45f1U, 0xacfa58abU, 0x4be30393U, + 0x2030fa55U, 0xad766df6U, 0x88cc7691U, 0xf5024c25U, + 0x4fe5d7fcU, 0xc52acbd7U, 0x26354480U, 0xb562a38fU, + 0xdeb15a49U, 0x25ba1b67U, 0x45ea0e98U, 0x5dfec0e1U, + 0xc32f7502U, 0x814cf012U, 0x8d4697a3U, 0x6bd3f9c6U, + 0x038f5fe7U, 0x15929c95U, 0xbf6d7aebU, 0x955259daU, + 0xd4be832dU, 0x587421d3U, 0x49e06929U, 0x8ec9c844U, + 0x75c2896aU, 0xf48e7978U, 0x99583e6bU, 0x27b971ddU, + 0xbee14fb6U, 0xf088ad17U, 0xc920ac66U, 0x7dce3ab4U, + 0x63df4a18U, 0xe51a3182U, 0x97513360U, 0x62537f45U, + 0xb16477e0U, 0xbb6bae84U, 0xfe81a01cU, 0xf9082b94U, + 0x70486858U, 0x8f45fd19U, 0x94de6c87U, 0x527bf8b7U, + 0xab73d323U, 0x724b02e2U, 0xe31f8f57U, 0x6655ab2aU, + 0xb2eb2807U, 0x2fb5c203U, 0x86c57b9aU, 0xd33708a5U, + 0x302887f2U, 0x23bfa5b2U, 0x02036abaU, 0xed16825cU, + 0x8acf1c2bU, 0xa779b492U, 0xf307f2f0U, 0x4e69e2a1U, + 0x65daf4cdU, 0x0605bed5U, 0xd134621fU, 0xc4a6fe8aU, + 0x342e539dU, 0xa2f355a0U, 0x058ae132U, 0xa4f6eb75U, + 0x0b83ec39U, 0x4060efaaU, 0x5e719f06U, 0xbd6e1051U, + 0x3e218af9U, 0x96dd063dU, 0xdd3e05aeU, 0x4de6bd46U, + 0x91548db5U, 0x71c45d05U, 0x0406d46fU, 0x605015ffU, + 0x1998fb24U, 0xd6bde997U, 0x894043ccU, 0x67d99e77U, + 0xb0e842bdU, 0x07898b88U, 0xe7195b38U, 0x79c8eedbU, + 0xa17c0a47U, 0x7c420fe9U, 0xf8841ec9U, 0x00000000U, + 0x09808683U, 0x322bed48U, 0x1e1170acU, 0x6c5a724eU, + 0xfd0efffbU, 0x0f853856U, 0x3daed51eU, 0x362d3927U, + 0x0a0fd964U, 0x685ca621U, 0x9b5b54d1U, 0x24362e3aU, + 0x0c0a67b1U, 0x9357e70fU, 0xb4ee96d2U, 0x1b9b919eU, + 0x80c0c54fU, 0x61dc20a2U, 0x5a774b69U, 0x1c121a16U, + 0xe293ba0aU, 0xc0a02ae5U, 0x3c22e043U, 0x121b171dU, + 0x0e090d0bU, 0xf28bc7adU, 0x2db6a8b9U, 0x141ea9c8U, + 0x57f11985U, 0xaf75074cU, 0xee99ddbbU, 0xa37f60fdU, + 0xf701269fU, 0x5c72f5bcU, 0x44663bc5U, 0x5bfb7e34U, + 0x8b432976U, 0xcb23c6dcU, 0xb6edfc68U, 0xb8e4f163U, + 0xd731dccaU, 0x42638510U, 0x13972240U, 0x84c61120U, + 0x854a247dU, 0xd2bb3df8U, 0xaef93211U, 0xc729a16dU, + 0x1d9e2f4bU, 0xdcb230f3U, 0x0d8652ecU, 0x77c1e3d0U, + 0x2bb3166cU, 0xa970b999U, 0x119448faU, 0x47e96422U, + 0xa8fc8cc4U, 0xa0f03f1aU, 0x567d2cd8U, 0x223390efU, + 0x87494ec7U, 0xd938d1c1U, 0x8ccaa2feU, 0x98d40b36U, + 0xa6f581cfU, 0xa57ade28U, 0xdab78e26U, 0x3fadbfa4U, + 0x2c3a9de4U, 0x5078920dU, 0x6a5fcc9bU, 0x547e4662U, + 0xf68d13c2U, 0x90d8b8e8U, 0x2e39f75eU, 0x82c3aff5U, + 0x9f5d80beU, 0x69d0937cU, 0x6fd52da9U, 0xcf2512b3U, + 0xc8ac993bU, 0x10187da7U, 0xe89c636eU, 0xdb3bbb7bU, + 0xcd267809U, 0x6e5918f4U, 0xec9ab701U, 0x834f9aa8U, + 0xe6956e65U, 0xaaffe67eU, 0x21bccf08U, 0xef15e8e6U, + 0xbae79bd9U, 0x4a6f36ceU, 0xea9f09d4U, 0x29b07cd6U, + 0x31a4b2afU, 0x2a3f2331U, 0xc6a59430U, 0x35a266c0U, + 0x744ebc37U, 0xfc82caa6U, 0xe090d0b0U, 0x33a7d815U, + 0xf104984aU, 0x41ecdaf7U, 0x7fcd500eU, 0x1791f62fU, + 0x764dd68dU, 0x43efb04dU, 0xccaa4d54U, 0xe49604dfU, + 0x9ed1b5e3U, 0x4c6a881bU, 0xc12c1fb8U, 0x4665517fU, + 0x9d5eea04U, 0x018c355dU, 0xfa877473U, 0xfb0b412eU, + 0xb3671d5aU, 0x92dbd252U, 0xe9105633U, 0x6dd64713U, + 0x9ad7618cU, 0x37a10c7aU, 0x59f8148eU, 0xeb133c89U, + 0xcea927eeU, 0xb761c935U, 0xe11ce5edU, 0x7a47b13cU, + 0x9cd2df59U, 0x55f2733fU, 0x1814ce79U, 0x73c737bfU, + 0x53f7cdeaU, 0x5ffdaa5bU, 0xdf3d6f14U, 0x7844db86U, + 0xcaaff381U, 0xb968c43eU, 0x3824342cU, 0xc2a3405fU, + 0x161dc372U, 0xbce2250cU, 0x283c498bU, 0xff0d9541U, + 0x39a80171U, 0x080cb3deU, 0xd8b4e49cU, 0x6456c190U, + 0x7bcb8461U, 0xd532b670U, 0x486c5c74U, 0xd0b85742U, +}; + +static const u32 Td1[256] = { + 0x5051f4a7U, 0x537e4165U, 0xc31a17a4U, 0x963a275eU, + 0xcb3bab6bU, 0xf11f9d45U, 0xabacfa58U, 0x934be303U, + 0x552030faU, 0xf6ad766dU, 0x9188cc76U, 0x25f5024cU, + 0xfc4fe5d7U, 0xd7c52acbU, 0x80263544U, 0x8fb562a3U, + 0x49deb15aU, 0x6725ba1bU, 0x9845ea0eU, 0xe15dfec0U, + 0x02c32f75U, 0x12814cf0U, 0xa38d4697U, 0xc66bd3f9U, + 0xe7038f5fU, 0x9515929cU, 0xebbf6d7aU, 0xda955259U, + 0x2dd4be83U, 0xd3587421U, 0x2949e069U, 0x448ec9c8U, + 0x6a75c289U, 0x78f48e79U, 0x6b99583eU, 0xdd27b971U, + 0xb6bee14fU, 0x17f088adU, 0x66c920acU, 0xb47dce3aU, + 0x1863df4aU, 0x82e51a31U, 0x60975133U, 0x4562537fU, + 0xe0b16477U, 0x84bb6baeU, 0x1cfe81a0U, 0x94f9082bU, + 0x58704868U, 0x198f45fdU, 0x8794de6cU, 0xb7527bf8U, + 0x23ab73d3U, 0xe2724b02U, 0x57e31f8fU, 0x2a6655abU, + 0x07b2eb28U, 0x032fb5c2U, 0x9a86c57bU, 0xa5d33708U, + 0xf2302887U, 0xb223bfa5U, 0xba02036aU, 0x5ced1682U, + 0x2b8acf1cU, 0x92a779b4U, 0xf0f307f2U, 0xa14e69e2U, + 0xcd65daf4U, 0xd50605beU, 0x1fd13462U, 0x8ac4a6feU, + 0x9d342e53U, 0xa0a2f355U, 0x32058ae1U, 0x75a4f6ebU, + 0x390b83ecU, 0xaa4060efU, 0x065e719fU, 0x51bd6e10U, + 0xf93e218aU, 0x3d96dd06U, 0xaedd3e05U, 0x464de6bdU, + 0xb591548dU, 0x0571c45dU, 0x6f0406d4U, 0xff605015U, + 0x241998fbU, 0x97d6bde9U, 0xcc894043U, 0x7767d99eU, + 0xbdb0e842U, 0x8807898bU, 0x38e7195bU, 0xdb79c8eeU, + 0x47a17c0aU, 0xe97c420fU, 0xc9f8841eU, 0x00000000U, + 0x83098086U, 0x48322bedU, 0xac1e1170U, 0x4e6c5a72U, + 0xfbfd0effU, 0x560f8538U, 0x1e3daed5U, 0x27362d39U, + 0x640a0fd9U, 0x21685ca6U, 0xd19b5b54U, 0x3a24362eU, + 0xb10c0a67U, 0x0f9357e7U, 0xd2b4ee96U, 0x9e1b9b91U, + 0x4f80c0c5U, 0xa261dc20U, 0x695a774bU, 0x161c121aU, + 0x0ae293baU, 0xe5c0a02aU, 0x433c22e0U, 0x1d121b17U, + 0x0b0e090dU, 0xadf28bc7U, 0xb92db6a8U, 0xc8141ea9U, + 0x8557f119U, 0x4caf7507U, 0xbbee99ddU, 0xfda37f60U, + 0x9ff70126U, 0xbc5c72f5U, 0xc544663bU, 0x345bfb7eU, + 0x768b4329U, 0xdccb23c6U, 0x68b6edfcU, 0x63b8e4f1U, + 0xcad731dcU, 0x10426385U, 0x40139722U, 0x2084c611U, + 0x7d854a24U, 0xf8d2bb3dU, 0x11aef932U, 0x6dc729a1U, + 0x4b1d9e2fU, 0xf3dcb230U, 0xec0d8652U, 0xd077c1e3U, + 0x6c2bb316U, 0x99a970b9U, 0xfa119448U, 0x2247e964U, + 0xc4a8fc8cU, 0x1aa0f03fU, 0xd8567d2cU, 0xef223390U, + 0xc787494eU, 0xc1d938d1U, 0xfe8ccaa2U, 0x3698d40bU, + 0xcfa6f581U, 0x28a57adeU, 0x26dab78eU, 0xa43fadbfU, + 0xe42c3a9dU, 0x0d507892U, 0x9b6a5fccU, 0x62547e46U, + 0xc2f68d13U, 0xe890d8b8U, 0x5e2e39f7U, 0xf582c3afU, + 0xbe9f5d80U, 0x7c69d093U, 0xa96fd52dU, 0xb3cf2512U, + 0x3bc8ac99U, 0xa710187dU, 0x6ee89c63U, 0x7bdb3bbbU, + 0x09cd2678U, 0xf46e5918U, 0x01ec9ab7U, 0xa8834f9aU, + 0x65e6956eU, 0x7eaaffe6U, 0x0821bccfU, 0xe6ef15e8U, + 0xd9bae79bU, 0xce4a6f36U, 0xd4ea9f09U, 0xd629b07cU, + 0xaf31a4b2U, 0x312a3f23U, 0x30c6a594U, 0xc035a266U, + 0x37744ebcU, 0xa6fc82caU, 0xb0e090d0U, 0x1533a7d8U, + 0x4af10498U, 0xf741ecdaU, 0x0e7fcd50U, 0x2f1791f6U, + 0x8d764dd6U, 0x4d43efb0U, 0x54ccaa4dU, 0xdfe49604U, + 0xe39ed1b5U, 0x1b4c6a88U, 0xb8c12c1fU, 0x7f466551U, + 0x049d5eeaU, 0x5d018c35U, 0x73fa8774U, 0x2efb0b41U, + 0x5ab3671dU, 0x5292dbd2U, 0x33e91056U, 0x136dd647U, + 0x8c9ad761U, 0x7a37a10cU, 0x8e59f814U, 0x89eb133cU, + 0xeecea927U, 0x35b761c9U, 0xede11ce5U, 0x3c7a47b1U, + 0x599cd2dfU, 0x3f55f273U, 0x791814ceU, 0xbf73c737U, + 0xea53f7cdU, 0x5b5ffdaaU, 0x14df3d6fU, 0x867844dbU, + 0x81caaff3U, 0x3eb968c4U, 0x2c382434U, 0x5fc2a340U, + 0x72161dc3U, 0x0cbce225U, 0x8b283c49U, 0x41ff0d95U, + 0x7139a801U, 0xde080cb3U, 0x9cd8b4e4U, 0x906456c1U, + 0x617bcb84U, 0x70d532b6U, 0x74486c5cU, 0x42d0b857U, +}; + +static const u32 Td2[256] = { + 0xa75051f4U, 0x65537e41U, 0xa4c31a17U, 0x5e963a27U, + 0x6bcb3babU, 0x45f11f9dU, 0x58abacfaU, 0x03934be3U, + 0xfa552030U, 0x6df6ad76U, 0x769188ccU, 0x4c25f502U, + 0xd7fc4fe5U, 0xcbd7c52aU, 0x44802635U, 0xa38fb562U, + 0x5a49deb1U, 0x1b6725baU, 0x0e9845eaU, 0xc0e15dfeU, + 0x7502c32fU, 0xf012814cU, 0x97a38d46U, 0xf9c66bd3U, + 0x5fe7038fU, 0x9c951592U, 0x7aebbf6dU, 0x59da9552U, + 0x832dd4beU, 0x21d35874U, 0x692949e0U, 0xc8448ec9U, + 0x896a75c2U, 0x7978f48eU, 0x3e6b9958U, 0x71dd27b9U, + 0x4fb6bee1U, 0xad17f088U, 0xac66c920U, 0x3ab47dceU, + 0x4a1863dfU, 0x3182e51aU, 0x33609751U, 0x7f456253U, + 0x77e0b164U, 0xae84bb6bU, 0xa01cfe81U, 0x2b94f908U, + 0x68587048U, 0xfd198f45U, 0x6c8794deU, 0xf8b7527bU, + 0xd323ab73U, 0x02e2724bU, 0x8f57e31fU, 0xab2a6655U, + 0x2807b2ebU, 0xc2032fb5U, 0x7b9a86c5U, 0x08a5d337U, + 0x87f23028U, 0xa5b223bfU, 0x6aba0203U, 0x825ced16U, + 0x1c2b8acfU, 0xb492a779U, 0xf2f0f307U, 0xe2a14e69U, + 0xf4cd65daU, 0xbed50605U, 0x621fd134U, 0xfe8ac4a6U, + 0x539d342eU, 0x55a0a2f3U, 0xe132058aU, 0xeb75a4f6U, + 0xec390b83U, 0xefaa4060U, 0x9f065e71U, 0x1051bd6eU, + + 0x8af93e21U, 0x063d96ddU, 0x05aedd3eU, 0xbd464de6U, + 0x8db59154U, 0x5d0571c4U, 0xd46f0406U, 0x15ff6050U, + 0xfb241998U, 0xe997d6bdU, 0x43cc8940U, 0x9e7767d9U, + 0x42bdb0e8U, 0x8b880789U, 0x5b38e719U, 0xeedb79c8U, + 0x0a47a17cU, 0x0fe97c42U, 0x1ec9f884U, 0x00000000U, + 0x86830980U, 0xed48322bU, 0x70ac1e11U, 0x724e6c5aU, + 0xfffbfd0eU, 0x38560f85U, 0xd51e3daeU, 0x3927362dU, + 0xd9640a0fU, 0xa621685cU, 0x54d19b5bU, 0x2e3a2436U, + 0x67b10c0aU, 0xe70f9357U, 0x96d2b4eeU, 0x919e1b9bU, + 0xc54f80c0U, 0x20a261dcU, 0x4b695a77U, 0x1a161c12U, + 0xba0ae293U, 0x2ae5c0a0U, 0xe0433c22U, 0x171d121bU, + 0x0d0b0e09U, 0xc7adf28bU, 0xa8b92db6U, 0xa9c8141eU, + 0x198557f1U, 0x074caf75U, 0xddbbee99U, 0x60fda37fU, + 0x269ff701U, 0xf5bc5c72U, 0x3bc54466U, 0x7e345bfbU, + 0x29768b43U, 0xc6dccb23U, 0xfc68b6edU, 0xf163b8e4U, + 0xdccad731U, 0x85104263U, 0x22401397U, 0x112084c6U, + 0x247d854aU, 0x3df8d2bbU, 0x3211aef9U, 0xa16dc729U, + 0x2f4b1d9eU, 0x30f3dcb2U, 0x52ec0d86U, 0xe3d077c1U, + 0x166c2bb3U, 0xb999a970U, 0x48fa1194U, 0x642247e9U, + 0x8cc4a8fcU, 0x3f1aa0f0U, 0x2cd8567dU, 0x90ef2233U, + 0x4ec78749U, 0xd1c1d938U, 0xa2fe8ccaU, 0x0b3698d4U, + 0x81cfa6f5U, 0xde28a57aU, 0x8e26dab7U, 0xbfa43fadU, + 0x9de42c3aU, 0x920d5078U, 0xcc9b6a5fU, 0x4662547eU, + 0x13c2f68dU, 0xb8e890d8U, 0xf75e2e39U, 0xaff582c3U, + 0x80be9f5dU, 0x937c69d0U, 0x2da96fd5U, 0x12b3cf25U, + 0x993bc8acU, 0x7da71018U, 0x636ee89cU, 0xbb7bdb3bU, + 0x7809cd26U, 0x18f46e59U, 0xb701ec9aU, 0x9aa8834fU, + 0x6e65e695U, 0xe67eaaffU, 0xcf0821bcU, 0xe8e6ef15U, + 0x9bd9bae7U, 0x36ce4a6fU, 0x09d4ea9fU, 0x7cd629b0U, + 0xb2af31a4U, 0x23312a3fU, 0x9430c6a5U, 0x66c035a2U, + 0xbc37744eU, 0xcaa6fc82U, 0xd0b0e090U, 0xd81533a7U, + 0x984af104U, 0xdaf741ecU, 0x500e7fcdU, 0xf62f1791U, + 0xd68d764dU, 0xb04d43efU, 0x4d54ccaaU, 0x04dfe496U, + 0xb5e39ed1U, 0x881b4c6aU, 0x1fb8c12cU, 0x517f4665U, + 0xea049d5eU, 0x355d018cU, 0x7473fa87U, 0x412efb0bU, + 0x1d5ab367U, 0xd25292dbU, 0x5633e910U, 0x47136dd6U, + 0x618c9ad7U, 0x0c7a37a1U, 0x148e59f8U, 0x3c89eb13U, + 0x27eecea9U, 0xc935b761U, 0xe5ede11cU, 0xb13c7a47U, + 0xdf599cd2U, 0x733f55f2U, 0xce791814U, 0x37bf73c7U, + 0xcdea53f7U, 0xaa5b5ffdU, 0x6f14df3dU, 0xdb867844U, + 0xf381caafU, 0xc43eb968U, 0x342c3824U, 0x405fc2a3U, + 0xc372161dU, 0x250cbce2U, 0x498b283cU, 0x9541ff0dU, + 0x017139a8U, 0xb3de080cU, 0xe49cd8b4U, 0xc1906456U, + 0x84617bcbU, 0xb670d532U, 0x5c74486cU, 0x5742d0b8U, +}; + +static const u32 Td3[256] = { + 0xf4a75051U, 0x4165537eU, 0x17a4c31aU, 0x275e963aU, + 0xab6bcb3bU, 0x9d45f11fU, 0xfa58abacU, 0xe303934bU, + 0x30fa5520U, 0x766df6adU, 0xcc769188U, 0x024c25f5U, + 0xe5d7fc4fU, 0x2acbd7c5U, 0x35448026U, 0x62a38fb5U, + 0xb15a49deU, 0xba1b6725U, 0xea0e9845U, 0xfec0e15dU, + 0x2f7502c3U, 0x4cf01281U, 0x4697a38dU, 0xd3f9c66bU, + 0x8f5fe703U, 0x929c9515U, 0x6d7aebbfU, 0x5259da95U, + 0xbe832dd4U, 0x7421d358U, 0xe0692949U, 0xc9c8448eU, + 0xc2896a75U, 0x8e7978f4U, 0x583e6b99U, 0xb971dd27U, + 0xe14fb6beU, 0x88ad17f0U, 0x20ac66c9U, 0xce3ab47dU, + 0xdf4a1863U, 0x1a3182e5U, 0x51336097U, 0x537f4562U, + 0x6477e0b1U, 0x6bae84bbU, 0x81a01cfeU, 0x082b94f9U, + 0x48685870U, 0x45fd198fU, 0xde6c8794U, 0x7bf8b752U, + 0x73d323abU, 0x4b02e272U, 0x1f8f57e3U, 0x55ab2a66U, + 0xeb2807b2U, 0xb5c2032fU, 0xc57b9a86U, 0x3708a5d3U, + 0x2887f230U, 0xbfa5b223U, 0x036aba02U, 0x16825cedU, + 0xcf1c2b8aU, 0x79b492a7U, 0x07f2f0f3U, 0x69e2a14eU, + 0xdaf4cd65U, 0x05bed506U, 0x34621fd1U, 0xa6fe8ac4U, + 0x2e539d34U, 0xf355a0a2U, 0x8ae13205U, 0xf6eb75a4U, + 0x83ec390bU, 0x60efaa40U, 0x719f065eU, 0x6e1051bdU, + 0x218af93eU, 0xdd063d96U, 0x3e05aeddU, 0xe6bd464dU, + 0x548db591U, 0xc45d0571U, 0x06d46f04U, 0x5015ff60U, + 0x98fb2419U, 0xbde997d6U, 0x4043cc89U, 0xd99e7767U, + 0xe842bdb0U, 0x898b8807U, 0x195b38e7U, 0xc8eedb79U, + 0x7c0a47a1U, 0x420fe97cU, 0x841ec9f8U, 0x00000000U, + 0x80868309U, 0x2bed4832U, 0x1170ac1eU, 0x5a724e6cU, + 0x0efffbfdU, 0x8538560fU, 0xaed51e3dU, 0x2d392736U, + 0x0fd9640aU, 0x5ca62168U, 0x5b54d19bU, 0x362e3a24U, + 0x0a67b10cU, 0x57e70f93U, 0xee96d2b4U, 0x9b919e1bU, + 0xc0c54f80U, 0xdc20a261U, 0x774b695aU, 0x121a161cU, + 0x93ba0ae2U, 0xa02ae5c0U, 0x22e0433cU, 0x1b171d12U, + 0x090d0b0eU, 0x8bc7adf2U, 0xb6a8b92dU, 0x1ea9c814U, + 0xf1198557U, 0x75074cafU, 0x99ddbbeeU, 0x7f60fda3U, + 0x01269ff7U, 0x72f5bc5cU, 0x663bc544U, 0xfb7e345bU, + 0x4329768bU, 0x23c6dccbU, 0xedfc68b6U, 0xe4f163b8U, + 0x31dccad7U, 0x63851042U, 0x97224013U, 0xc6112084U, + 0x4a247d85U, 0xbb3df8d2U, 0xf93211aeU, 0x29a16dc7U, + 0x9e2f4b1dU, 0xb230f3dcU, 0x8652ec0dU, 0xc1e3d077U, + 0xb3166c2bU, 0x70b999a9U, 0x9448fa11U, 0xe9642247U, + 0xfc8cc4a8U, 0xf03f1aa0U, 0x7d2cd856U, 0x3390ef22U, + 0x494ec787U, 0x38d1c1d9U, 0xcaa2fe8cU, 0xd40b3698U, + 0xf581cfa6U, 0x7ade28a5U, 0xb78e26daU, 0xadbfa43fU, + 0x3a9de42cU, 0x78920d50U, 0x5fcc9b6aU, 0x7e466254U, + 0x8d13c2f6U, 0xd8b8e890U, 0x39f75e2eU, 0xc3aff582U, + 0x5d80be9fU, 0xd0937c69U, 0xd52da96fU, 0x2512b3cfU, + 0xac993bc8U, 0x187da710U, 0x9c636ee8U, 0x3bbb7bdbU, + 0x267809cdU, 0x5918f46eU, 0x9ab701ecU, 0x4f9aa883U, + 0x956e65e6U, 0xffe67eaaU, 0xbccf0821U, 0x15e8e6efU, + 0xe79bd9baU, 0x6f36ce4aU, 0x9f09d4eaU, 0xb07cd629U, + 0xa4b2af31U, 0x3f23312aU, 0xa59430c6U, 0xa266c035U, + 0x4ebc3774U, 0x82caa6fcU, 0x90d0b0e0U, 0xa7d81533U, + 0x04984af1U, 0xecdaf741U, 0xcd500e7fU, 0x91f62f17U, + 0x4dd68d76U, 0xefb04d43U, 0xaa4d54ccU, 0x9604dfe4U, + 0xd1b5e39eU, 0x6a881b4cU, 0x2c1fb8c1U, 0x65517f46U, + 0x5eea049dU, 0x8c355d01U, 0x877473faU, 0x0b412efbU, + 0x671d5ab3U, 0xdbd25292U, 0x105633e9U, 0xd647136dU, + 0xd7618c9aU, 0xa10c7a37U, 0xf8148e59U, 0x133c89ebU, + 0xa927eeceU, 0x61c935b7U, 0x1ce5ede1U, 0x47b13c7aU, + 0xd2df599cU, 0xf2733f55U, 0x14ce7918U, 0xc737bf73U, + 0xf7cdea53U, 0xfdaa5b5fU, 0x3d6f14dfU, 0x44db8678U, + 0xaff381caU, 0x68c43eb9U, 0x24342c38U, 0xa3405fc2U, + 0x1dc37216U, 0xe2250cbcU, 0x3c498b28U, 0x0d9541ffU, + 0xa8017139U, 0x0cb3de08U, 0xb4e49cd8U, 0x56c19064U, + 0xcb84617bU, 0x32b670d5U, 0x6c5c7448U, 0xb85742d0U, +}; + +static const u8 Td4[256] = { + 0x52U, 0x09U, 0x6aU, 0xd5U, + 0x30U, 0x36U, 0xa5U, 0x38U, + 0xbfU, 0x40U, 0xa3U, 0x9eU, + 0x81U, 0xf3U, 0xd7U, 0xfbU, + 0x7cU, 0xe3U, 0x39U, 0x82U, + 0x9bU, 0x2fU, 0xffU, 0x87U, + 0x34U, 0x8eU, 0x43U, 0x44U, + 0xc4U, 0xdeU, 0xe9U, 0xcbU, + 0x54U, 0x7bU, 0x94U, 0x32U, + 0xa6U, 0xc2U, 0x23U, 0x3dU, + 0xeeU, 0x4cU, 0x95U, 0x0bU, + 0x42U, 0xfaU, 0xc3U, 0x4eU, + 0x08U, 0x2eU, 0xa1U, 0x66U, + 0x28U, 0xd9U, 0x24U, 0xb2U, + 0x76U, 0x5bU, 0xa2U, 0x49U, + 0x6dU, 0x8bU, 0xd1U, 0x25U, + 0x72U, 0xf8U, 0xf6U, 0x64U, + 0x86U, 0x68U, 0x98U, 0x16U, + 0xd4U, 0xa4U, 0x5cU, 0xccU, + 0x5dU, 0x65U, 0xb6U, 0x92U, + 0x6cU, 0x70U, 0x48U, 0x50U, + 0xfdU, 0xedU, 0xb9U, 0xdaU, + 0x5eU, 0x15U, 0x46U, 0x57U, + 0xa7U, 0x8dU, 0x9dU, 0x84U, + 0x90U, 0xd8U, 0xabU, 0x00U, + 0x8cU, 0xbcU, 0xd3U, 0x0aU, + 0xf7U, 0xe4U, 0x58U, 0x05U, + 0xb8U, 0xb3U, 0x45U, 0x06U, + 0xd0U, 0x2cU, 0x1eU, 0x8fU, + 0xcaU, 0x3fU, 0x0fU, 0x02U, + 0xc1U, 0xafU, 0xbdU, 0x03U, + 0x01U, 0x13U, 0x8aU, 0x6bU, + 0x3aU, 0x91U, 0x11U, 0x41U, + 0x4fU, 0x67U, 0xdcU, 0xeaU, + 0x97U, 0xf2U, 0xcfU, 0xceU, + 0xf0U, 0xb4U, 0xe6U, 0x73U, + 0x96U, 0xacU, 0x74U, 0x22U, + 0xe7U, 0xadU, 0x35U, 0x85U, + 0xe2U, 0xf9U, 0x37U, 0xe8U, + 0x1cU, 0x75U, 0xdfU, 0x6eU, + 0x47U, 0xf1U, 0x1aU, 0x71U, + 0x1dU, 0x29U, 0xc5U, 0x89U, + 0x6fU, 0xb7U, 0x62U, 0x0eU, + 0xaaU, 0x18U, 0xbeU, 0x1bU, + 0xfcU, 0x56U, 0x3eU, 0x4bU, + 0xc6U, 0xd2U, 0x79U, 0x20U, + 0x9aU, 0xdbU, 0xc0U, 0xfeU, + 0x78U, 0xcdU, 0x5aU, 0xf4U, + 0x1fU, 0xddU, 0xa8U, 0x33U, + 0x88U, 0x07U, 0xc7U, 0x31U, + 0xb1U, 0x12U, 0x10U, 0x59U, + 0x27U, 0x80U, 0xecU, 0x5fU, + 0x60U, 0x51U, 0x7fU, 0xa9U, + 0x19U, 0xb5U, 0x4aU, 0x0dU, + 0x2dU, 0xe5U, 0x7aU, 0x9fU, + 0x93U, 0xc9U, 0x9cU, 0xefU, + 0xa0U, 0xe0U, 0x3bU, 0x4dU, + 0xaeU, 0x2aU, 0xf5U, 0xb0U, + 0xc8U, 0xebU, 0xbbU, 0x3cU, + 0x83U, 0x53U, 0x99U, 0x61U, + 0x17U, 0x2bU, 0x04U, 0x7eU, + 0xbaU, 0x77U, 0xd6U, 0x26U, + 0xe1U, 0x69U, 0x14U, 0x63U, + 0x55U, 0x21U, 0x0cU, 0x7dU, +}; + +static const u32 rcon[] = { + 0x01000000, 0x02000000, 0x04000000, 0x08000000, + 0x10000000, 0x20000000, 0x40000000, 0x80000000, + 0x1B000000, 0x36000000, /* for 128-bit blocks, Rijndael never uses more + than 10 rcon values */ +}; + +#define GETU32(pt) (((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ ((u32)(pt)[2] << 8) ^ ((u32)(pt)[3])) +#define PUTU32(ct, st) { (ct)[0] = (u8)((st) >> 24); (ct)[1] = (u8)((st) >> 16); (ct)[2] = (u8)((st) >> 8); (ct)[3] = (u8)(st); } + +/** + * Expand the cipher key into the encryption key schedule. + * + * @return the number of rounds for the given cipher key size. + */ +static int +rijndaelKeySetupEnc(UINT rk[ /* 4*(Nr + 1) */ ], const UINT8 cipherKey[], + int keyBits) +{ + int i = 0; + u32 temp; + + rk[0] = GETU32(cipherKey); + rk[1] = GETU32(cipherKey + 4); + rk[2] = GETU32(cipherKey + 8); + rk[3] = GETU32(cipherKey + 12); + if (keyBits == 128) { + for (;;) { + temp = rk[3]; + rk[4] = rk[0] ^ + (Te4[(temp >> 16) & 0xff] << 24) ^ + (Te4[(temp >> 8) & 0xff] << 16) ^ + (Te4[(temp) & 0xff] << 8) ^ + (Te4[(temp >> 24)]) ^ rcon[i]; + rk[5] = rk[1] ^ rk[4]; + rk[6] = rk[2] ^ rk[5]; + rk[7] = rk[3] ^ rk[6]; + if (++i == 10) { + return 10; + } + rk += 4; + } + } + + /** Handle 24 bytes key length */ + rk[4] = GETU32(cipherKey + 16); + rk[5] = GETU32(cipherKey + 20); + if (keyBits == 192) { + for (;;) { + temp = rk[5]; + rk[6] = rk[0] ^ + (Te4[(temp >> 16) & 0xff] << 24) ^ + (Te4[(temp >> 8) & 0xff] << 16) ^ + (Te4[(temp) & 0xff] << 8) ^ + (Te4[(temp >> 24)]) ^ rcon[i]; + rk[7] = rk[1] ^ rk[6]; + rk[8] = rk[2] ^ rk[7]; + rk[9] = rk[3] ^ rk[8]; + if (++i == 8) { + return 12; + } + rk[10] = rk[4] ^ rk[9]; + rk[11] = rk[5] ^ rk[10]; + rk += 6; + } + } + + /** Handle 32 bytes key length */ + rk[6] = GETU32(cipherKey + 24); + rk[7] = GETU32(cipherKey + 28); + if (keyBits == 256) { + for (;;) { + temp = rk[7]; + rk[8] = rk[0] ^ + (Te4[(temp >> 16) & 0xff] << 24) ^ + (Te4[(temp >> 8) & 0xff] << 16) ^ + (Te4[(temp) & 0xff] << 8) ^ + (Te4[(temp >> 24)]) ^ rcon[i]; + rk[9] = rk[1] ^ rk[8]; + rk[10] = rk[2] ^ rk[9]; + rk[11] = rk[3] ^ rk[10]; + if (++i == 7) { + return 14; + } + temp = rk[11]; + rk[12] = rk[4] ^ + (Te4[(temp >> 24)] << 24) ^ + (Te4[(temp >> 16) & 0xff] << 16) ^ + (Te4[(temp >> 8) & 0xff] << 8) ^ + (Te4[(temp) & 0xff]); + rk[13] = rk[5] ^ rk[12]; + rk[14] = rk[6] ^ rk[13]; + rk[15] = rk[7] ^ rk[14]; + rk += 8; + } + } + return 0; +} + +/** + * Expand the cipher key into the decryption key schedule. + * + * @return the number of rounds for the given cipher key size. + */ +static int +rijndaelKeySetupDec(u32 rk[ /* 4*(Nr + 1) */ ], const u8 cipherKey[], + int keyBits, + int have_encrypt) +{ + int Nr, i, j; + u32 temp; + + if (have_encrypt) { + Nr = have_encrypt; + } else { + /* expand the cipher key: */ + Nr = rijndaelKeySetupEnc(rk, cipherKey, keyBits); + } + /* invert the order of the round keys: */ + for (i = 0, j = 4 * Nr; i < j; i += 4, j -= 4) { + temp = rk[i]; + rk[i] = rk[j]; + rk[j] = temp; + temp = rk[i + 1]; + rk[i + 1] = rk[j + 1]; + rk[j + 1] = temp; + temp = rk[i + 2]; + rk[i + 2] = rk[j + 2]; + rk[j + 2] = temp; + temp = rk[i + 3]; + rk[i + 3] = rk[j + 3]; + rk[j + 3] = temp; + } + /* apply the inverse MixColumn transform to all round keys but the + first and the last: */ + for (i = 1; i < Nr; i++) { + rk += 4; + rk[0] = Td0[Te4[(rk[0] >> 24)]] ^ + Td1[Te4[(rk[0] >> 16) & 0xff]] ^ + Td2[Te4[(rk[0] >> 8) & 0xff]] ^ + Td3[Te4[(rk[0]) & 0xff]]; + rk[1] = Td0[Te4[(rk[1] >> 24)]] ^ + Td1[Te4[(rk[1] >> 16) & 0xff]] ^ + Td2[Te4[(rk[1] >> 8) & 0xff]] ^ + Td3[Te4[(rk[1]) & 0xff]]; + rk[2] = Td0[Te4[(rk[2] >> 24)]] ^ + Td1[Te4[(rk[2] >> 16) & 0xff]] ^ + Td2[Te4[(rk[2] >> 8) & 0xff]] ^ + Td3[Te4[(rk[2]) & 0xff]]; + rk[3] = Td0[Te4[(rk[3] >> 24)]] ^ + Td1[Te4[(rk[3] >> 16) & 0xff]] ^ + Td2[Te4[(rk[3] >> 8) & 0xff]] ^ + Td3[Te4[(rk[3]) & 0xff]]; + } + return Nr; +} + +//#ifdef AES_WRAP_FUNCTION +static void +rijndaelEncrypt(const u32 rk[ /* 4*(Nr + 1) */ ], int Nr, const u8 pt[16], + u8 ct[16]) +{ + u32 s0, s1, s2, s3, t0, t1, t2, t3; +#ifndef FULL_UNROLL + int r; +#endif /* ?FULL_UNROLL */ + + /* + * map byte array block to cipher state + * and add initial round key: + */ + s0 = GETU32(pt) ^ rk[0]; + s1 = GETU32(pt + 4) ^ rk[1]; + s2 = GETU32(pt + 8) ^ rk[2]; + s3 = GETU32(pt + 12) ^ rk[3]; +#ifdef FULL_UNROLL + /* round 1: */ + t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ + Te3[s3 & 0xff] ^ rk[4]; + t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ + Te3[s0 & 0xff] ^ rk[5]; + t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ + Te3[s1 & 0xff] ^ rk[6]; + t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ + Te3[s2 & 0xff] ^ rk[7]; + /* round 2: */ + s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ + Te3[t3 & 0xff] ^ rk[8]; + s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ + Te3[t0 & 0xff] ^ rk[9]; + s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ + Te3[t1 & 0xff] ^ rk[10]; + s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ + Te3[t2 & 0xff] ^ rk[11]; + /* round 3: */ + t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ + Te3[s3 & 0xff] ^ rk[12]; + t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ + Te3[s0 & 0xff] ^ rk[13]; + t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ + Te3[s1 & 0xff] ^ rk[14]; + t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ + Te3[s2 & 0xff] ^ rk[15]; + /* round 4: */ + s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ + Te3[t3 & 0xff] ^ rk[16]; + s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ + Te3[t0 & 0xff] ^ rk[17]; + s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ + Te3[t1 & 0xff] ^ rk[18]; + s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ + Te3[t2 & 0xff] ^ rk[19]; + /* round 5: */ + t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ + Te3[s3 & 0xff] ^ rk[20]; + t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ + Te3[s0 & 0xff] ^ rk[21]; + t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ + Te3[s1 & 0xff] ^ rk[22]; + t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ + Te3[s2 & 0xff] ^ rk[23]; + /* round 6: */ + s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ + Te3[t3 & 0xff] ^ rk[24]; + s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ + Te3[t0 & 0xff] ^ rk[25]; + s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ + Te3[t1 & 0xff] ^ rk[26]; + s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ + Te3[t2 & 0xff] ^ rk[27]; + /* round 7: */ + t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ + Te3[s3 & 0xff] ^ rk[28]; + t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ + Te3[s0 & 0xff] ^ rk[29]; + t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ + Te3[s1 & 0xff] ^ rk[30]; + t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ + Te3[s2 & 0xff] ^ rk[31]; + /* round 8: */ + s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ + Te3[t3 & 0xff] ^ rk[32]; + s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ + Te3[t0 & 0xff] ^ rk[33]; + s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ + Te3[t1 & 0xff] ^ rk[34]; + s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ + Te3[t2 & 0xff] ^ rk[35]; + /* round 9: */ + t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ + Te3[s3 & 0xff] ^ rk[36]; + t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ + Te3[s0 & 0xff] ^ rk[37]; + t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ + Te3[s1 & 0xff] ^ rk[38]; + t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ + Te3[s2 & 0xff] ^ rk[39]; + if (Nr > 10) { + /* round 10: */ + s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & + 0xff] ^ Te3[t3 + & + 0xff] + ^ rk[40]; + s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & + 0xff] ^ Te3[t0 + & + 0xff] + ^ rk[41]; + s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & + 0xff] ^ Te3[t1 + & + 0xff] + ^ rk[42]; + s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & + 0xff] ^ Te3[t2 + & + 0xff] + ^ rk[43]; + /* round 11: */ + t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & + 0xff] ^ Te3[s3 + & + 0xff] + ^ rk[44]; + t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & + 0xff] ^ Te3[s0 + & + 0xff] + ^ rk[45]; + t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & + 0xff] ^ Te3[s1 + & + 0xff] + ^ rk[46]; + t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & + 0xff] ^ Te3[s2 + & + 0xff] + ^ rk[47]; + if (Nr > 12) { + /* round 12: */ + s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ + Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[48]; + s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ + Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[49]; + s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ + Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[50]; + s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ + Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[51]; + /* round 13: */ + t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ + Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[52]; + t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ + Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[53]; + t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ + Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[54]; + t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ + Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[55]; + } + } + rk += Nr << 2; +#else /* !FULL_UNROLL */ + /* + * Nr - 1 full rounds: + */ + r = Nr >> 1; + for (;;) { + t0 = Te0[(s0 >> 24)] ^ + Te1[(s1 >> 16) & 0xff] ^ + Te2[(s2 >> 8) & 0xff] ^ Te3[(s3) & 0xff] ^ rk[4]; + t1 = Te0[(s1 >> 24)] ^ + Te1[(s2 >> 16) & 0xff] ^ + Te2[(s3 >> 8) & 0xff] ^ Te3[(s0) & 0xff] ^ rk[5]; + t2 = Te0[(s2 >> 24)] ^ + Te1[(s3 >> 16) & 0xff] ^ + Te2[(s0 >> 8) & 0xff] ^ Te3[(s1) & 0xff] ^ rk[6]; + t3 = Te0[(s3 >> 24)] ^ + Te1[(s0 >> 16) & 0xff] ^ + Te2[(s1 >> 8) & 0xff] ^ Te3[(s2) & 0xff] ^ rk[7]; + + rk += 8; + if (--r == 0) { + break; + } + + s0 = Te0[(t0 >> 24)] ^ + Te1[(t1 >> 16) & 0xff] ^ + Te2[(t2 >> 8) & 0xff] ^ Te3[(t3) & 0xff] ^ rk[0]; + s1 = Te0[(t1 >> 24)] ^ + Te1[(t2 >> 16) & 0xff] ^ + Te2[(t3 >> 8) & 0xff] ^ Te3[(t0) & 0xff] ^ rk[1]; + s2 = Te0[(t2 >> 24)] ^ + Te1[(t3 >> 16) & 0xff] ^ + Te2[(t0 >> 8) & 0xff] ^ Te3[(t1) & 0xff] ^ rk[2]; + s3 = Te0[(t3 >> 24)] ^ + Te1[(t0 >> 16) & 0xff] ^ + Te2[(t1 >> 8) & 0xff] ^ Te3[(t2) & 0xff] ^ rk[3]; + } +#endif /* ?FULL_UNROLL */ + /* + * apply last round and + * map cipher state to byte array block: + */ + s0 = (Te4[(t0 >> 24)] << 24) ^ + (Te4[(t1 >> 16) & 0xff] << 16) ^ + (Te4[(t2 >> 8) & 0xff] << 8) ^ (Te4[(t3) & 0xff]) ^ rk[0]; + PUTU32(ct, s0); + s1 = (Te4[(t1 >> 24)] << 24) ^ + (Te4[(t2 >> 16) & 0xff] << 16) ^ + (Te4[(t3 >> 8) & 0xff] << 8) ^ (Te4[(t0) & 0xff]) ^ rk[1]; + PUTU32(ct + 4, s1); + s2 = (Te4[(t2 >> 24)] << 24) ^ + (Te4[(t3 >> 16) & 0xff] << 16) ^ + (Te4[(t0 >> 8) & 0xff] << 8) ^ (Te4[(t1) & 0xff]) ^ rk[2]; + PUTU32(ct + 8, s2); + s3 = (Te4[(t3 >> 24)] << 24) ^ + (Te4[(t0 >> 16) & 0xff] << 16) ^ + (Te4[(t1 >> 8) & 0xff] << 8) ^ (Te4[(t2) & 0xff]) ^ rk[3]; + PUTU32(ct + 12, s3); +} + +//#endif + +static void +rijndaelDecrypt(const u32 rk[ /* 4*(Nr + 1) */ ], int Nr, const UINT8 ct[16], + UINT8 pt[16]) +{ + u32 s0, s1, s2, s3, t0, t1, t2, t3; +#ifndef FULL_UNROLL + int r; +#endif /* ?FULL_UNROLL */ + + /* + * map byte array block to cipher state + * and add initial round key: + */ + s0 = GETU32(ct) ^ rk[0]; + s1 = GETU32(ct + 4) ^ rk[1]; + s2 = GETU32(ct + 8) ^ rk[2]; + s3 = GETU32(ct + 12) ^ rk[3]; +#ifdef FULL_UNROLL + /* round 1: */ + t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ + Td3[s1 & 0xff] ^ rk[4]; + t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ + Td3[s2 & 0xff] ^ rk[5]; + t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ + Td3[s3 & 0xff] ^ rk[6]; + t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ + Td3[s0 & 0xff] ^ rk[7]; + /* round 2: */ + s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ + Td3[t1 & 0xff] ^ rk[8]; + s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ + Td3[t2 & 0xff] ^ rk[9]; + s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ + Td3[t3 & 0xff] ^ rk[10]; + s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ + Td3[t0 & 0xff] ^ rk[11]; + /* round 3: */ + t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ + Td3[s1 & 0xff] ^ rk[12]; + t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ + Td3[s2 & 0xff] ^ rk[13]; + t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ + Td3[s3 & 0xff] ^ rk[14]; + t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ + Td3[s0 & 0xff] ^ rk[15]; + /* round 4: */ + s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ + Td3[t1 & 0xff] ^ rk[16]; + s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ + Td3[t2 & 0xff] ^ rk[17]; + s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ + Td3[t3 & 0xff] ^ rk[18]; + s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ + Td3[t0 & 0xff] ^ rk[19]; + /* round 5: */ + t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ + Td3[s1 & 0xff] ^ rk[20]; + t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ + Td3[s2 & 0xff] ^ rk[21]; + t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ + Td3[s3 & 0xff] ^ rk[22]; + t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ + Td3[s0 & 0xff] ^ rk[23]; + /* round 6: */ + s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ + Td3[t1 & 0xff] ^ rk[24]; + s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ + Td3[t2 & 0xff] ^ rk[25]; + s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ + Td3[t3 & 0xff] ^ rk[26]; + s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ + Td3[t0 & 0xff] ^ rk[27]; + /* round 7: */ + t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ + Td3[s1 & 0xff] ^ rk[28]; + t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ + Td3[s2 & 0xff] ^ rk[29]; + t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ + Td3[s3 & 0xff] ^ rk[30]; + t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ + Td3[s0 & 0xff] ^ rk[31]; + /* round 8: */ + s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ + Td3[t1 & 0xff] ^ rk[32]; + s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ + Td3[t2 & 0xff] ^ rk[33]; + s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ + Td3[t3 & 0xff] ^ rk[34]; + s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ + Td3[t0 & 0xff] ^ rk[35]; + /* round 9: */ + t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ + Td3[s1 & 0xff] ^ rk[36]; + t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ + Td3[s2 & 0xff] ^ rk[37]; + t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ + Td3[s3 & 0xff] ^ rk[38]; + t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ + Td3[s0 & 0xff] ^ rk[39]; + if (Nr > 10) { + /* round 10: */ + s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & + 0xff] ^ Td3[t1 + & + 0xff] + ^ rk[40]; + s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & + 0xff] ^ Td3[t2 + & + 0xff] + ^ rk[41]; + s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & + 0xff] ^ Td3[t3 + & + 0xff] + ^ rk[42]; + s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & + 0xff] ^ Td3[t0 + & + 0xff] + ^ rk[43]; + /* round 11: */ + t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & + 0xff] ^ Td3[s1 + & + 0xff] + ^ rk[44]; + t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & + 0xff] ^ Td3[s2 + & + 0xff] + ^ rk[45]; + t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & + 0xff] ^ Td3[s3 + & + 0xff] + ^ rk[46]; + t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & + 0xff] ^ Td3[s0 + & + 0xff] + ^ rk[47]; + if (Nr > 12) { + /* round 12: */ + s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ + Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[48]; + s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ + Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[49]; + s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ + Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[50]; + s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ + Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[51]; + /* round 13: */ + t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ + Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[52]; + t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ + Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[53]; + t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ + Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[54]; + t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ + Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[55]; + } + } + rk += Nr << 2; +#else /* !FULL_UNROLL */ + /* + * Nr - 1 full rounds: + */ + r = Nr >> 1; + for (;;) { + t0 = Td0[(s0 >> 24)] ^ + Td1[(s3 >> 16) & 0xff] ^ + Td2[(s2 >> 8) & 0xff] ^ Td3[(s1) & 0xff] ^ rk[4]; + t1 = Td0[(s1 >> 24)] ^ + Td1[(s0 >> 16) & 0xff] ^ + Td2[(s3 >> 8) & 0xff] ^ Td3[(s2) & 0xff] ^ rk[5]; + t2 = Td0[(s2 >> 24)] ^ + Td1[(s1 >> 16) & 0xff] ^ + Td2[(s0 >> 8) & 0xff] ^ Td3[(s3) & 0xff] ^ rk[6]; + t3 = Td0[(s3 >> 24)] ^ + Td1[(s2 >> 16) & 0xff] ^ + Td2[(s1 >> 8) & 0xff] ^ Td3[(s0) & 0xff] ^ rk[7]; + + rk += 8; + if (--r == 0) { + break; + } + + s0 = Td0[(t0 >> 24)] ^ + Td1[(t3 >> 16) & 0xff] ^ + Td2[(t2 >> 8) & 0xff] ^ Td3[(t1) & 0xff] ^ rk[0]; + s1 = Td0[(t1 >> 24)] ^ + Td1[(t0 >> 16) & 0xff] ^ + Td2[(t3 >> 8) & 0xff] ^ Td3[(t2) & 0xff] ^ rk[1]; + s2 = Td0[(t2 >> 24)] ^ + Td1[(t1 >> 16) & 0xff] ^ + Td2[(t0 >> 8) & 0xff] ^ Td3[(t3) & 0xff] ^ rk[2]; + s3 = Td0[(t3 >> 24)] ^ + Td1[(t2 >> 16) & 0xff] ^ + Td2[(t1 >> 8) & 0xff] ^ Td3[(t0) & 0xff] ^ rk[3]; + } +#endif /* ?FULL_UNROLL */ + /* + * apply last round and + * map cipher state to byte array block: + */ + s0 = (Td4[(t0 >> 24)] << 24) ^ + (Td4[(t3 >> 16) & 0xff] << 16) ^ + (Td4[(t2 >> 8) & 0xff] << 8) ^ (Td4[(t1) & 0xff]) ^ rk[0]; + PUTU32(pt, s0); + s1 = (Td4[(t1 >> 24)] << 24) ^ + (Td4[(t0 >> 16) & 0xff] << 16) ^ + (Td4[(t3 >> 8) & 0xff] << 8) ^ (Td4[(t2) & 0xff]) ^ rk[1]; + PUTU32(pt + 4, s1); + s2 = (Td4[(t2 >> 24)] << 24) ^ + (Td4[(t1 >> 16) & 0xff] << 16) ^ + (Td4[(t0 >> 8) & 0xff] << 8) ^ (Td4[(t3) & 0xff]) ^ rk[2]; + PUTU32(pt + 8, s2); + s3 = (Td4[(t3 >> 24)] << 24) ^ + (Td4[(t2 >> 16) & 0xff] << 16) ^ + (Td4[(t1 >> 8) & 0xff] << 8) ^ (Td4[(t0) & 0xff]) ^ rk[3]; + PUTU32(pt + 12, s3); +} + +void +rijndael_set_key(rijndael_ctx *ctx, UINT8 *key, int bits, int encrypt) +{ + ctx->Nr = rijndaelKeySetupEnc(ctx->key, key, bits); + if (encrypt) { + ctx->decrypt = 0; + } else { + ctx->decrypt = 1; + rijndaelKeySetupDec(ctx->key, key, bits, ctx->Nr); + } +} + +void +rijndael_decrypt(rijndael_ctx *ctx, UINT8 *src, UINT8 *dst) +{ + rijndaelDecrypt(ctx->key, ctx->Nr, src, dst); +} + +//#ifdef AES_WRAP_FUNCTION +void +rijndael_encrypt(rijndael_ctx *ctx, UINT8 *src, UINT8 *dst) +{ + rijndaelEncrypt(ctx->key, ctx->Nr, src, dst); +} + +//#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/rijndael.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/rijndael.h new file mode 100644 index 00000000..ff0d7ad5 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/rijndael.h @@ -0,0 +1,49 @@ +/** @file rijndael.h + * + * @brief This file contains the function optimised ANSI C code for the Rijndael cipher (now AES) + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ + +#ifndef __RIJNDAEL_H +#define __RIJNDAEL_H +#include "wltypes.h" + +#define MAXKC (256/32) +#define MAXKB (256/8) +#define MAXNR 14 +/* +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +*/ +/* The structure for key information */ +typedef struct { + int decrypt; + int Nr; /* key-length-dependent number of rounds */ + UINT key[4 * (MAXNR + 1)]; /* encrypt or decrypt key schedule */ +} rijndael_ctx; + +void rijndael_set_key(rijndael_ctx *, UINT8 *, int, int); +void rijndael_decrypt(rijndael_ctx *, UINT8 *, UINT8 *); +void rijndael_encrypt(rijndael_ctx *, UINT8 *, UINT8 *); + +#endif /* __RIJNDAEL_H */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/sha1.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/sha1.c new file mode 100644 index 00000000..24889d0d --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/sha1.c @@ -0,0 +1,402 @@ +/** @file sha1.c + * + * @brief This file defines the sha1 functions + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#include "wltypes.h" +#include "sha1.h" +#include "hostsa_ext_def.h" +#include "authenticator.h" + +/* + * Define the SHA1 circular left shift macro + */ + +#define Mrvl_SHA1CircularShift(bits,word) \ + (((word) << (bits)) | ((word) >> (32-(bits)))) + +/* Local Function Prototyptes */ +static void Mrvl_SHA1PadMessage(Mrvl_SHA1_CTX *); +static void Mrvl_SHA1ProcessMessageBlock(Mrvl_SHA1_CTX *); +/* + * SHA1Init + * + * Description: + * This function will initialize the SHA1_CTX in preparation + * for computing a new SHA1 message digest. + * + * Parameters: + * context: [in/out] + * The context to reset. + * + * Returns: + * sha Error Code. + * + */ +/*int SHA1Init(SHA1_CTX *context) */ +int +Mrvl_SHA1Init(Mrvl_SHA1_CTX *context) +{ + if (!context) { + return shaNull; + } + + context->Length_Low = 0; + context->Length_High = 0; + context->Message_Block_Index = 0; + + context->Intermediate_Hash[0] = 0x67452301; + context->Intermediate_Hash[1] = 0xEFCDAB89; + context->Intermediate_Hash[2] = 0x98BADCFE; + context->Intermediate_Hash[3] = 0x10325476; + context->Intermediate_Hash[4] = 0xC3D2E1F0; + + context->Computed = 0; + context->Corrupted = 0; + + return shaSuccess; +} + +/* + * SHA1Final + * + * Description: + * This function will return the 160-bit message digest into the + * Message_Digest array provided by the caller. + * NOTE: The first octet of hash is stored in the 0th element, + * the last octet of hash in the 19th element. + * + * Parameters: + * context: [in/out] + * The context to use to calculate the SHA-1 hash. + * Message_Digest: [out] + * Where the digest is returned. + * + * Returns: + * sha Error Code. + * + */ +int +Mrvl_SHA1Final(void *priv, Mrvl_SHA1_CTX *context, + UINT8 Message_Digest[A_SHA_DIGEST_LEN]) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + int i; + + if (!context || !Message_Digest) { + return shaNull; + } + + if (context->Corrupted) { + return context->Corrupted; + } + + if (!context->Computed) { + Mrvl_SHA1PadMessage(context); + for (i = 0; i < 64; ++i) { + /* message may be sensitive, clear it out */ + context->Message_Block[i] = 0; + } + context->Length_Low = 0; /* and clear length */ + context->Length_High = 0; + context->Computed = 1; + + } + + for (i = 0; i < A_SHA_DIGEST_LEN; ++i) { + Message_Digest[i] = context->Intermediate_Hash[i >> 2] + >> 8 * (3 - (i & 0x03)); + } + + memset(util_fns, context, 0x00, sizeof(Mrvl_SHA1_CTX)); + + return shaSuccess; +} + +/* + * SHA1Update + * + * Description: + * This function accepts an array of octets as the next portion + * of the message. + * + * Parameters: + * context: [in/out] + * The SHA context to update + * message_array: [in] + * An array of characters representing the next portion of + * the message. + * length: [in] + * The length of the message in message_array + * + * Returns: + * sha Error Code. + * + */ +int +Mrvl_SHA1Update(Mrvl_SHA1_CTX *context, + const UINT8 *message_array, unsigned length) +{ + if (!length) { + return shaSuccess; + } + + if (!context || !message_array) { + return shaNull; + } + + if (context->Computed) { + context->Corrupted = shaStateError; + + return shaStateError; + } + + if (context->Corrupted) { + return context->Corrupted; + } + while (length-- && !context->Corrupted) { + context->Message_Block[context->Message_Block_Index++] = + (*message_array & 0xFF); + + context->Length_Low += 8; + if (context->Length_Low == 0) { + context->Length_High++; + if (context->Length_High == 0) { + /* Message is too long */ + context->Corrupted = 1; + } + } + + if (context->Message_Block_Index == 64) { + Mrvl_SHA1ProcessMessageBlock(context); + } + + message_array++; + } + + return shaSuccess; +} + +/* + * SHA1ProcessMessageBlock + * + * Description: + * This function will process the next 512 bits of the message + * stored in the Message_Block array. + * + * Parameters: + * None. + * + * Returns: + * Nothing. + * + * Comments: + + + +Eastlake & Jones Informational [Page 14] + +RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001 + + + * Many of the variable names in this code, especially the + * single character names, were used because those were the + * names used in the publication. + * + * + */ + +#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) + +/* blk0() and blk() perform the initial expand. */ +/* I got the idea of expanding during the round function from SSLeay */ +#define blk(i) (W[i&15] = rol(W[(i+13)&15]^W[(i+8)&15]^W[(i+2)&15]^W[i&15],1)) +#define blk0(i) ((i & 0x30)? blk(i) : W[i]) + +/* +NOte- Some of the variables are made static in this file because +this function runs in the idle task. The idle task dosent have +enough stack space to accomodate these variables. In the future +if this function is run in a different task with large stack space +or if the stack space of the idle task is increased then we can +remove the static defination from these variables. +*/ +void +Mrvl_SHA1ProcessMessageBlock(Mrvl_SHA1_CTX *context) +{ + static const UINT32 K[] = { /* Constants defined in SHA-1 */ + 0x5A827999, + 0x6ED9EBA1, + 0x8F1BBCDC, + 0xCA62C1D6 + }; + int t; /* Loop counter */ + UINT32 temp; /* Temporary word value */ + UINT32 *W; + UINT32 A, B, C, D, E; /* Word buffers */ + + /* WLAN buffers are aligned, so the context starts at a UINT32 boundary + */ + W = context->Scratch; + + for (t = 0; t < 16; t++) { + W[t] = context->Message_Block[t * 4] << 24; + W[t] |= context->Message_Block[t * 4 + 1] << 16; + W[t] |= context->Message_Block[t * 4 + 2] << 8; + W[t] |= context->Message_Block[t * 4 + 3]; + } + + A = context->Intermediate_Hash[0]; + B = context->Intermediate_Hash[1]; + C = context->Intermediate_Hash[2]; + D = context->Intermediate_Hash[3]; + E = context->Intermediate_Hash[4]; + + for (t = 0; t < 20; t++) { + temp = Mrvl_SHA1CircularShift(5, A) + + ((B & C) | ((~B) & D)) + E + blk0(t) + K[0]; + E = D; + D = C; + C = Mrvl_SHA1CircularShift(30, B); + + B = A; + A = temp; + } + + for (t = 20; t < 40; t++) { + temp = Mrvl_SHA1CircularShift(5, + A) + (B ^ C ^ D) + E + blk(t) + + K[1]; + E = D; + D = C; + C = Mrvl_SHA1CircularShift(30, B); + B = A; + A = temp; + } + + for (t = 40; t < 60; t++) { + temp = Mrvl_SHA1CircularShift(5, A) + + ((B & C) | (B & D) | (C & D)) + E + blk(t) + K[2]; + E = D; + D = C; + C = Mrvl_SHA1CircularShift(30, B); + B = A; + A = temp; + } + + for (t = 60; t < 80; t++) { + temp = Mrvl_SHA1CircularShift(5, + A) + (B ^ C ^ D) + E + blk(t) + + K[3]; + E = D; + D = C; + C = Mrvl_SHA1CircularShift(30, B); + B = A; + A = temp; + } + + context->Intermediate_Hash[0] += A; + context->Intermediate_Hash[1] += B; + context->Intermediate_Hash[2] += C; + context->Intermediate_Hash[3] += D; + context->Intermediate_Hash[4] += E; + + context->Message_Block_Index = 0; +} + +/* + * SHA1PadMessage + * + + + +Eastlake & Jones Informational [Page 16] + +RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001 + + + * Description: + * According to the standard, the message must be padded to an even + * 512 bits. The first padding bit must be a '1'. The last 64 + * bits represent the length of the original message. All bits in + * between should be 0. This function will pad the message + * according to those rules by filling the Message_Block array + * accordingly. It will also call the ProcessMessageBlock function + * provided appropriately. When it returns, it can be assumed that + * the message digest has been computed. + * + * Parameters: + * context: [in/out] + * The context to pad + * ProcessMessageBlock: [in] + * The appropriate SHA*ProcessMessageBlock function + * Returns: + * Nothing. + * + */ + +void +Mrvl_SHA1PadMessage(Mrvl_SHA1_CTX *context) +{ + /* + * Check to see if the current message block is too small to hold + * the initial padding bits and length. If so, we will pad the + * block, process it, and then continue padding into a second + * block. + */ + if (context->Message_Block_Index > 55) { + context->Message_Block[context->Message_Block_Index++] = 0x80; + while (context->Message_Block_Index < 64) { + context->Message_Block[context->Message_Block_Index++] = + 0; + } + + Mrvl_SHA1ProcessMessageBlock(context); + + while (context->Message_Block_Index < 56) { + context->Message_Block[context->Message_Block_Index++] = + 0; + } + } else { + context->Message_Block[context->Message_Block_Index++] = 0x80; + while (context->Message_Block_Index < 56) { + + context->Message_Block[context->Message_Block_Index++] = + 0; + } + } + + /* + * Store the message length as the last 8 octets + */ + context->Message_Block[56] = context->Length_High >> 24; + context->Message_Block[57] = context->Length_High >> 16; + context->Message_Block[58] = context->Length_High >> 8; + context->Message_Block[59] = context->Length_High; + context->Message_Block[60] = context->Length_Low >> 24; + context->Message_Block[61] = context->Length_Low >> 16; + context->Message_Block[62] = context->Length_Low >> 8; + context->Message_Block[63] = context->Length_Low; + + Mrvl_SHA1ProcessMessageBlock(context); +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/sha1.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/sha1.h new file mode 100644 index 00000000..03189711 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/sha1.h @@ -0,0 +1,80 @@ +/** @file sha1.h + * + * @brief This file contains the sha1 functions + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _SHA1_H_ +#define _SHA1_H_ + +#include "wltypes.h" + +enum { + shaSuccess = 0, + shaNull, /* Null pointer parameter */ + shaInputTooLong, /* input data too long */ + shaStateError /* called Input after Result */ +}; + +#define A_SHA_DIGEST_LEN 20 + +/* + * This structure will hold context information for the SHA-1 + * hashing operation + */ +typedef struct { + UINT32 Intermediate_Hash[A_SHA_DIGEST_LEN / 4]; /* Message Digest */ + + UINT32 Length_Low; /* Message length in bits */ + UINT32 Length_High; /* Message length in bits */ + + UINT32 Scratch[16]; /* This is used to reduce the memory ** + requirements of the transform **function */ + UINT8 Message_Block[64]; /* 512-bit message blocks */ + /* Index into message block array */ + SINT16 Message_Block_Index; + UINT8 Computed; /* Is the digest computed? */ + UINT8 Corrupted; /* Is the message digest corrupted? */ +} Mrvl_SHA1_CTX; + +/* + * Function Prototypes + */ + +extern int Mrvl_SHA1Init(Mrvl_SHA1_CTX *); +extern int Mrvl_SHA1Update(Mrvl_SHA1_CTX *, const UINT8 *, unsigned int); +extern int Mrvl_SHA1Final(void *priv, Mrvl_SHA1_CTX *, + UINT8 Message_Digest[A_SHA_DIGEST_LEN]); + +extern void Mrvl_PRF(void *priv, unsigned char *key, + int key_len, + unsigned char *prefix, + int prefix_len, + unsigned char *data, + int data_len, unsigned char *output, int len); + +extern void Mrvl_hmac_sha1(void *priv, unsigned char **ppText, + int *pTextLen, + int textNum, + unsigned char *key, + int key_len, unsigned char *output, int outputLen); + +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/sha256.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/sha256.c new file mode 100644 index 00000000..553961d2 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/sha256.c @@ -0,0 +1,449 @@ +/** @file sha_256.c + * + * @brief This file defines the SHA256 hash implementation and interface functions + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +/* + * SHA-256 hash implementation and interface functions + * + * Copyright © 2003-2006, Jouni Malinen + * + * Copyright © 2006-2007, Marvell International Ltd. and its affiliates + * All rights reserved. + * + * 1. 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. + * 2. Neither the name of Jouni Malinen, Marvell 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. + */ +#include "sha_256.h" +#include "hostsa_ext_def.h" +#include "authenticator.h" + +#define WPA_GET_BE32(a) ((((UINT32) (a)[0]) << 24) | \ + (((UINT32) (a)[1]) << 16) | \ + (((UINT32) (a)[2]) << 8) | \ + ((UINT32) (a)[3])) + +#define WPA_PUT_BE32(a, val) \ + do { \ + (a)[0] = (UINT8) (((UINT32) (val)) >> 24); \ + (a)[1] = (UINT8) (((UINT32) (val)) >> 16); \ + (a)[2] = (UINT8) (((UINT32) (val)) >> 8); \ + (a)[3] = (UINT8) (((UINT32) (val)) & 0xff); \ + } while (0) + +#define WPA_PUT_BE64(a, val) \ + do { \ + (a)[0] = (UINT8) (((UINT64) (val)) >> 56); \ + (a)[1] = (UINT8) (((UINT64) (val)) >> 48); \ + (a)[2] = (UINT8) (((UINT64) (val)) >> 40); \ + (a)[3] = (UINT8) (((UINT64) (val)) >> 32); \ + (a)[4] = (UINT8) (((UINT64) (val)) >> 24); \ + (a)[5] = (UINT8) (((UINT64) (val)) >> 16); \ + (a)[6] = (UINT8) (((UINT64) (val)) >> 8); \ + (a)[7] = (UINT8) (((UINT64) (val)) & 0xff); \ + } while (0) + +/** + * hmac_sha256_vector - HMAC-SHA256 over data vector (RFC 2104) + * @key: Key for HMAC operations + * @key_len: Length of the key in bytes + * @num_elem: Number of elements in the data vector; including [0] spare + * @addr: Pointers to the data areas, [0] element must be left as spare + * @len: Lengths of the data blocks, [0] element must be left as spare + * @mac: Buffer for the hash (32 bytes) + * @pScratchMem: Scratch Memory; At least a 492 byte buffer. + */ +void +hmac_sha256_vector(void *priv, UINT8 *key, + size_t key_len, + size_t num_elem, + UINT8 *addr[], size_t * len, UINT8 *mac, UINT8 *pScratchMem) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + size_t i; + UINT8 *pKpad; /* was UINT8 k_pad[64], padding - key XORd with + ipad/opad */ + UINT8 *pTk; /* was UINT8 tk[32] */ + UINT8 *pTmpBuf; + UINT32 *ptrU32; + + pKpad = pScratchMem; /* kpad = 64 bytes */ + pTk = pKpad + 64; /* tk = 32 bytes */ + pTmpBuf = pTk + 32; /* offset into the scratch buf = +96 bytes */ + + /* if key is longer than 64 bytes reset it to key = SHA256(key) */ + if (key_len > 64) { + /* pTmpBuf = At least 396 bytes */ + sha256_vector(priv, 1, &key, &key_len, pTk, pTmpBuf); + key = pTk; + key_len = 32; + } + + /* the HMAC_SHA256 transform looks like: SHA256(K XOR opad, SHA256(K + XOR ipad, text)) where K is an n byte key ipad is the byte 0x36 + repeated 64 times opad is the byte 0x5c repeated 64 times and text + is the data being protected */ + + /* start out by storing key in ipad */ + memset(util_fns, pKpad, 0x00, 64); + memcpy(util_fns, pKpad, key, key_len); + + /* XOR key with ipad values */ + ptrU32 = (UINT32 *)pKpad; + for (i = 16; i > 0; i--) { + *ptrU32++ ^= 0x36363636; + } + + /* perform inner SHA256 */ + addr[0] = pKpad; + len[0] = 64; + + /* pTmpBuf = At least 396 bytes */ + sha256_vector((void *)priv, num_elem, addr, len, mac, pTmpBuf); + memset(util_fns, pKpad, 0x00, 64); + memcpy(util_fns, pKpad, key, key_len); + + /* XOR key with opad values */ + ptrU32 = (UINT32 *)pKpad; + for (i = 16; i > 0; i--) { + *ptrU32++ ^= 0x5C5C5C5C; + } + + /* perform outer SHA256 */ + addr[0] = pKpad; + len[0] = 64; + addr[1] = mac; + len[1] = SHA256_MAC_LEN; + + /* pTmpBuf = At least 396 bytes */ + sha256_vector((void *)priv, 2, addr, len, mac, pTmpBuf); +} + +static int sha256_process(void *priv, struct sha256_state *md, + const UINT8 *in, + unsigned int inlen, UINT8 *pScratchMem); + +static int sha256_done(void *priv, struct sha256_state *md, + UINT8 *out, UINT8 *pScratchMem); + +/** + * sha256_vector - SHA256 hash for data vector + * @num_elem: Number of elements in the data vector + * @addr: Pointers to the data areas + * @len: Lengths of the data blocks + * @mac: Buffer for the hash + * @pScratchMem: Scratch memory; At least (108 + 288) = 396 bytes. + */ +void +sha256_vector(void *priv, size_t num_elem, + UINT8 *addr[], size_t * len, UINT8 *mac, UINT8 *pScratchMem) +{ + UINT8 *pTmpBuf; + size_t i; + struct sha256_state *pCtx; + + /* + ** sizeof(struct sha256_state) + ** + ** UINT64 length = 8 + ** UINT32 state[8], curlen; = (9 * 4) = 36 + ** UINT8 buf[64]; = 64 + ** ----- + ** 108 + */ + pCtx = (struct sha256_state *)pScratchMem; + pTmpBuf = pScratchMem + sizeof(struct sha256_state); + + sha256_init(pCtx); + + for (i = 0; i < num_elem; i++) { + /* pTmpBuf = At least 288 bytes of memory */ + sha256_process((void *)priv, pCtx, addr[i], len[i], pTmpBuf); + } + sha256_done((void *)priv, pCtx, mac, pTmpBuf); +} + +/* ===== start - public domain SHA256 implementation ===== */ + +/* This is based on SHA256 implementation in LibTomCrypt that was released into + * public domain by Tom St Denis. */ + +/* the K array */ +static const unsigned int K[64] = { + 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, 0x3956c25bUL, + 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL, 0xd807aa98UL, 0x12835b01UL, + 0x243185beUL, 0x550c7dc3UL, 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, + 0xc19bf174UL, 0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL, + 0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL, 0x983e5152UL, + 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL, 0xc6e00bf3UL, 0xd5a79147UL, + 0x06ca6351UL, 0x14292967UL, 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL, + 0x53380d13UL, 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL, + 0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL, 0xd192e819UL, + 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL, 0x19a4c116UL, 0x1e376c08UL, + 0x2748774cUL, 0x34b0bcb5UL, 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL, + 0x682e6ff3UL, 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL, + 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL +}; + +/* Various logical functions */ +#define RORc(x, y) \ + (((((unsigned int)(x) & 0xFFFFFFFFUL) >> (unsigned int)((y) & 31)) | \ + ((unsigned int)(x) << (unsigned int)(32 - ((y) & 31)))) & 0xFFFFFFFFUL) + +#define Ch(x,y,z) (z ^ (x & (y ^ z))) +#define Maj(x,y,z) (((x | y) & z) | (x & y)) +#define S(x, n) RORc((x), (n)) +#define R(x, n) (((x)&0xFFFFFFFFUL)>>(n)) +#define Sigma0(x) (S(x, 2) ^ S(x, 13) ^ S(x, 22)) +#define Sigma1(x) (S(x, 6) ^ S(x, 11) ^ S(x, 25)) +#define Gamma0(x) (S(x, 7) ^ S(x, 18) ^ R(x, 3)) +#define Gamma1(x) (S(x, 17) ^ S(x, 19) ^ R(x, 10)) +#ifndef MIN +#define MIN(x, y) (((x) < (y)) ? (x) : (y)) +#endif + +/** + * sha256_compress - Compress 512-bits. + * @md: Pointer to the element holding hash state. + * @msgBuf: Pointer to the buffer containing the data to be hashed. + * @pScratchMem: Scratch memory; At least 288 bytes of free memory * + * + */ +int +sha256_compress(void *priv, struct sha256_state *md, + UINT8 *msgBuf, UINT8 *pScratchMem) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + UINT32 *pW; /* was UINT32 W[64] */ + UINT32 *pS; /* was UINT32 S[8] */ + UINT32 t0; + UINT32 t1; + UINT32 t; + UINT32 i; + UINT32 *ptrU32; + + /* pW = (64 * 4) = 256 ** pS = (8 * 4) = 32 ** ----- ** 288 */ + ptrU32 = pW = (UINT32 *)pScratchMem; + pS = pW + 64; + + /* copy state into S */ + memcpy(util_fns, (UINT8 *)pS, (UINT8 *)md->state, 32); + + /* copy the a message block of 512-bits into pW[0..15] */ + for (i = 16; i > 0; i--) { + int a0, a1; + a0 = *msgBuf++; + a1 = *msgBuf++; + a0 <<= 8; + a0 |= a1; + a1 = *msgBuf++; + a0 <<= 8; + a0 |= a1; + a1 = *msgBuf++; + a0 <<= 8; + *ptrU32++ = a0 | a1; + } + + /* fill pW[16..63] */ + for (i = 48; i > 0; i--) { + *ptrU32 = + (Gamma1(ptrU32[-2]) + ptrU32[-7] + Gamma0(ptrU32[-15]) + + ptrU32[-16]); + ptrU32++; + } + + /* Compress */ +#define RND(a,b,c,d,e,f,g,h,i) \ + t0 = h + Sigma1(e) + Ch(e, f, g) + K[i] + pW[i]; \ + t1 = Sigma0(a) + Maj(a, b, c); \ + d += t0; \ + h = t0 + t1; + + for (i = 0; i < 64; ++i) { + RND(pS[0], pS[1], pS[2], pS[3], pS[4], pS[5], pS[6], pS[7], i); + t = pS[7]; + pS[7] = pS[6]; + pS[6] = pS[5]; + pS[5] = pS[4]; + pS[4] = pS[3]; + pS[3] = pS[2]; + pS[2] = pS[1]; + pS[1] = pS[0]; + pS[0] = t; + } + + /* feedback */ + for (i = 0; i < 8; i++) { + md->state[i] = md->state[i] + pS[i]; + } + return 0; +} + +/* Initialize the hash state */ +void +sha256_init(struct sha256_state *md) +{ + md->curlen = 0; + md->length = 0; + md->state[0] = 0x6A09E667UL; + md->state[1] = 0xBB67AE85UL; + md->state[2] = 0x3C6EF372UL; + md->state[3] = 0xA54FF53AUL; + md->state[4] = 0x510E527FUL; + md->state[5] = 0x9B05688CUL; + md->state[6] = 0x1F83D9ABUL; + md->state[7] = 0x5BE0CD19UL; +} + +/** + Process a block of memory though the hash + @param md The hash state + @param in The data to hash + @param inlen The length of the data (octets) + @param pScratchMem Temporary Memory Buf; At least 288 bytes. + @return CRYPT_OK if successful +*/ +static int +sha256_process(void *priv, struct sha256_state *md, + const unsigned char *in, unsigned int inlen, UINT8 *pScratchMem) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + unsigned int n; +#define block_size 64 + + if (md->curlen > sizeof(md->buf)) { + return -1; + } + + while (inlen > 0) { + if (md->curlen == 0 && inlen >= block_size) { + /* pScratchMem = At least 288 bytes of memory */ + if (sha256_compress + ((void *)priv, md, (UINT8 *)in, pScratchMem) < 0) { + return -1; + } + md->length += block_size * 8; + in += block_size; + inlen -= block_size; + } else { + n = MIN(inlen, (block_size - md->curlen)); + memcpy(util_fns, md->buf + md->curlen, in, n); + md->curlen += n; + in += n; + inlen -= n; + if (md->curlen == block_size) { + /* pScratchMem = At least 288 bytes of memory */ + if (sha256_compress + ((void *)priv, md, md->buf, + pScratchMem) < 0) { + return -1; + } + md->length += 8 * block_size; + md->curlen = 0; + } + } + } + + return 0; +} + +/** + Terminate the hash to get the digest + @param md The hash state + @param out [out] The destination of the hash (32 bytes) + @param pScratchMem [in] Scratch memory; At least 288 bytes + @return CRYPT_OK if successful +*/ +static int +sha256_done(void *priv, struct sha256_state *md, UINT8 *out, UINT8 *pScratchMem) +{ + int i; + UINT32 *ptrU32; + UINT32 tmpU32; + + if (md->curlen >= sizeof(md->buf)) { + return -1; + } + + /* increase the length of the message */ + md->length += md->curlen * 8; + + /* append the '1' bit */ + md->buf[md->curlen++] = (unsigned char)0x80; + + /* if the length is currently above 56 bytes we append zeros then + compress. Then we can fall back to padding zeros and length + encoding like normal. */ + if (md->curlen > 56) { + while (md->curlen < 64) { + md->buf[md->curlen++] = (unsigned char)0; + } + /* pScratchMem = At least 288 bytes of memory */ + sha256_compress((void *)priv, md, md->buf, pScratchMem); + md->curlen = 0; + } + + /* pad upto 56 bytes of zeroes */ + while (md->curlen < 56) { + md->buf[md->curlen++] = (unsigned char)0; + } + + /* store length */ + ptrU32 = (UINT32 *)&md->length; + for (i = 0; i < 2; i++) { + tmpU32 = *ptrU32++; + WPA_PUT_BE32(md->buf + 60 - 4 * i, tmpU32); + } + + /* pScratchMem = At least 288 bytes of memory */ + sha256_compress((void *)priv, md, md->buf, pScratchMem); + + ptrU32 = md->state; + /* copy output */ + for (i = 8; i > 0; i--) { + tmpU32 = *ptrU32++; + WPA_PUT_BE32(out, tmpU32); + out += sizeof(UINT32); + } + return 0; +} + +/* ===== end - public domain SHA256 implementation ===== */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/sha_256.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/sha_256.h new file mode 100644 index 00000000..48405c81 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/sha_256.h @@ -0,0 +1,79 @@ +/** @file sha_256.h + * + * @brief This file contains the SHA256 hash implementation and interface functions + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef SHA256_H +#define SHA256_H + +#include "wltypes.h" + +#define SHA256_MAC_LEN 32 +#define HMAC_SHA256_MIN_SCRATCH_BUF (500) +#define SHA256_MIN_SCRATCH_BUF (400) + +struct sha256_state { + UINT64 length; + UINT32 state[8], curlen; + UINT8 buf[64]; +}; + +void sha256_init(struct sha256_state *md); + +/** + * sha256_compress - Compress 512-bits. + * @md: Pointer to the element holding hash state. + * @msgBuf: Pointer to the buffer containing the data to be hashed. + * @pScratchMem: Scratch memory; At least 288 bytes of free memory * + * + */ +int sha256_compress(void *priv, struct sha256_state *md, + UINT8 *msgBuf, UINT8 *pScratchMem); + +/** + * sha256_vector - SHA256 hash for data vector + * @num_elem: Number of elements in the data vector + * @addr: Pointers to the data areas + * @len: Lengths of the data blocks + * @mac: Buffer for the hash + * @pScratchMem: Scratch memory; Buffer of SHA256_MIN_SCRATCH_BUF size + */ +void sha256_vector(void *priv, size_t num_elem, + UINT8 *addr[], size_t * len, UINT8 *mac, UINT8 *pScratchMem); + +/** + * hmac_sha256_vector - HMAC-SHA256 over data vector (RFC 2104) + * @key: Key for HMAC operations + * @key_len: Length of the key in bytes + * @num_elem: Number of elements in the data vector; including [0] + * @addr: Pointers to the data areas, [0] element must be left as spare + * @len: Lengths of the data blocks, [0] element must be left as spare + * @mac: Buffer for the hash (32 bytes) + * @pScratchMem: Scratch Memory; Buffer of HMAC_SHA256_MIN_SCRATCH_BUF size + */ +void hmac_sha256_vector(void *priv, UINT8 *key, + size_t key_len, + size_t num_elem, + UINT8 *addr[], + size_t * len, UINT8 *mac, UINT8 *pScratchMem); + +#endif /* SHA256_H */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/tlv.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/tlv.h new file mode 100644 index 00000000..67e17b9a --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/tlv.h @@ -0,0 +1,854 @@ +/***************************************************************************** + * + * File: tlv.h + * + * + * + * Author(s): Kapil Chhabra + * Date: 2005-01-27 + * Description: Definitions of the Marvell TLV and parsing functions. + * + *****************************************************************************/ +#ifndef TLV_H__ +#define TLV_H__ + +#include "IEEE_types.h" + +#define PROPRIETARY_TLV_BASE_ID 0x0100 + +/* Terminating TLV Type */ +#define MRVL_TERMINATE_TLV_ID 0xffff + +/* Defines for MRVL TLV IDs*/ + +/* IEEE TLVs*/ +#define MRVL_SSID_TLV_ID 0x0000 +#define MRVL_RATES_TLV_ID 0x0001 +#define MRVL_PHYPARAMFHSET_TLV_ID 0x0002 +#define MRVL_PHYPARAMDSSET_TLV_ID 0x0003 +#define MRVL_CFPARAMSET_TLV_ID 0x0004 +#define MRVL_IBSSPARAMSET_TLV_ID 0x0006 +#define MRVL_COUNTRY_TLV_ID 0x0007 +#define MRVL_PWR_CONSTRAINT_TLV_ID 0x0020 +#define MRVL_PWR_CAPABILITY_TLV_ID 0x0021 +#define MRVL_SUPPORTEDCHANNELS_TLV_ID 0x0024 +#define MRVL_QUIET_TLV_ID 0x0028 +#define MRVL_IBSSDFS_TLV_ID 0x0029 +#define MRVL_HT_CAPABILITY_TLV_ID 0x002d +#define MRVL_QOSCAPABILITY_TLV_ID 0x002e +#define MRVL_RSN_TLV_ID 0x0030 +#define MRVL_SUPPORTED_REGCLASS_TLV_ID 0x003b +#define MRVL_HT_INFORMATION_TLV_ID 0x003d +#define MRVL_SECONDARY_CHAN_OFFSET 0x003e +#define MRVL_2040_BSS_COEX_TLV_ID 0x0048 +#define MRVL_OVERLAP_BSS_SCAN_TLV_ID 0x004a +#define MRVL_EXTENDED_CAP_TLV_ID 0x007f +#define MRVL_VHT_CAPABILITIES_TLV_ID 0x00bf +#define MRVL_VHT_OPERATION_TLV_ID 0x00c0 +#define MRVL_AID_TLV_ID 0x00c5 +#define MRVL_VHT_OPMODENTF_TLV_ID 0x00c7 +#define MRVL_VENDORSPECIFIC_TLV_ID 0x00dd + +/* Some of these TLV ids are used in ROM and should not be updated. +** You can confirm if it is not being used in rom then it can be updated. +*/ +/* Proprietary TLVs */ +#define MRVL_KEYPARAMSET_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x00) +#define MRVL_CHANNELLIST_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x01) +#define MRVL_NUMPROBES_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x02) +#define MRVL_OMNI_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x03) +#define MRVL_RSSITHRESHOLD_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x04) +#define MRVL_SNRTHRESHOLD_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x05) +#define MRVL_BCNLOWRSSITHRESHOLD_TLV_ID MRVL_RSSITHRESHOLD_TLV_ID +#define MRVL_BCNLOWSNRTHRESHOLD_TLV_ID MRVL_SNRTHRESHOLD_TLV_ID +#define MRVL_FAILURECOUNT_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x06) +#define MRVL_BEACONMISSED_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x07) +#define MRVL_LEDGPIO_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x08) +#define MRVL_LEDBEHAVIOR_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x09) +#define MRVL_PASSTHROUGH_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x0a) +#define MRVL_REASSOCAP_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x0b) +#define MRVL_POWER_TBL_2_4GHZ_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x0c) +#define MRVL_POWER_TBL_5GHZ_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x0d) +/* sending Brocast SSID */ +#define MRVL_BCASTPROBE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x0e) +/* number of SSIDs for which directed probes need to be generated */ +#define MRVL_NUMSSIDPROBE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x0f) +#define MRVL_WMMQSTATUS_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x10) +#define MRVL_CRYPTO_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x11) +#define MRVL_WILDCARD_SSID_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x12) +#define MRVL_TSFTIMESTAMP_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x13) +#define MRVL_POWER_ADAPT_CFG_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x14) +#define MRVL_HOSTSLEEP_FILTER_TYPE1_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x15) +#define MRVL_BCNHIGHRSSITHRESHOLD_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x16) +#define MRVL_BCNHIGHSNRTHRESHOLD_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x17) +#define MRVL_AUTOTX_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x18) +#define MRVL_WSC_SELECTED_REGISTRAR_TLV (PROPRIETARY_TLV_BASE_ID + 0x19) +#define MRVL_WSC_ENROLLEE_TMO_TLV (PROPRIETARY_TLV_BASE_ID + 0x1a) +#define MRVL_WSC_ENROLLEE_PROBE_REQ_TLV (PROPRIETARY_TLV_BASE_ID + 0x1b) +#define MRVL_WSC_REGISTRAR_BEACON_TLV (PROPRIETARY_TLV_BASE_ID + 0x1c) +#define MRVL_WSC_REGISTRAR_PROBE_RESP_TLV (PROPRIETARY_TLV_BASE_ID + 0x1d) +#define MRVL_STARTBGSCANLATER_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x1e) +#define MRVL_AUTHTYPE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x1f) +#define MRVL_STA_MAC_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x20) +#define MRVL_CUSTOM_ADHOC_PROBE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x21) +#define MRVL_CUSTOM_ADHOC_PYXIS_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x22) +#define MRVL_CUSTOM_BSSID_LIST_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x23) +#define MRVL_CUSTOM_LINK_INDICATION_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x24) +#define MRVL_MESHIE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x25) +#define MRVL_DATA_LOWRSSITHRESHOLD_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x26) +#define MRVL_DATA_LOWSNRTHRESHOLD_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x27) +#define MRVL_DATA_HIGHRSSITHRESHOLD_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x28) +#define MRVL_DATA_HIGHSNRTHRESHOLD_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x29) +#define MRVL_CHANNELBANDLIST_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x2a) +#define MRVL_AP_MAC_ADDRESS_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x2b) +#define MRVL_BEACON_PERIOD_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x2c) +#define MRVL_DTIM_PERIOD_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x2d) +#define MRVL_BASIC_RATES_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x2e) +#define MRVL_TX_POWER_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x2f) +#define MRVL_BCAST_SSID_CTL_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x30) +#define MRVL_PREAMBLE_CTL_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x31) +#define MRVL_ANTENNA_CTL_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x32) +#define MRVL_RTS_THRESHOLD_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x33) +#define MRVL_RADIO_CTL_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x34) +#define MRVL_TX_DATA_RATE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x35) +#define MRVL_PKT_FWD_CTL_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x36) +#define MRVL_STA_INFO_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x37) +#define MRVL_STA_MAC_ADDR_FILTER_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x38) +#define MRVL_STA_AGEOUT_TIMER_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x39) +#define MRVL_SECURITY_CFG_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x3a) +#define MRVL_WEP_KEY_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x3b) +#define MRVL_WPA_PASSPHRASE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x3c) +#define MRVL_SCAN_TIMING_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x3d) +#define MRVL_NEIGHBOR_ENTRY_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x3e) +#define MRVL_NEIGHBOR_SCAN_PERIOD_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x3f) +#define MRVL_ENCRYPTION_PROTOCOL_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x40) +#define MRVL_AKMP_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x41) +#define MRVL_CIPHER_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x42) +#define MRVL_OFFLOAD_ENABLE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x43) +#define MRVL_SUPPLICANT_PMK_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x44) +#define MRVL_SUPPLICANT_PASSPHRASE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x45) +#define MRVL_FRAG_THRESHOLD_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x46) +#define MRVL_GRP_REKEY_TIME_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x47) +#define MRVL_ICV_ERROR_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x48) +#define MRVL_PRE_BEACONMISSED_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x49) +#define MRVL_OLD_HT_CAPABILITY_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x4a) +#define MRVL_OLD_HT_INFORMATION_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x4b) +#define MRVL_OLD_SECONDARY_CHAN_OFFSET_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x4c) +#define MRVL_OLD_2040_BSS_COEX_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x4d) +#define MRVL_OLD_OVERLAP_BSS_SCAN_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x4e) +#define MRVL_OLD_EXTENDED_CAP_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x4f) +#define MRVL_HT_OPERATIONAL_MCSSET_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x50) +#define MRVL_RATEDROPPATTERN_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x51) +#define MRVL_RATEDROPCONTROL_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x52) +#define MRVL_RATESCOPE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x53) +#define MRVL_TYPES_POWER_GROUP_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x54) +#define MRVL_MAX_STA_CNT_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x55) +#define MRVL_BSS_SCAN_RSP_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x56) +#define MRVL_BSS_SCAN_INFO_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x57) +#define MRVL_CHANRPT_BCN_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x58) +#define MRVL_CHANRPT_CHAN_LOAD_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x59) +#define MRVL_CHANRPT_NOISE_HIST_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x5a) +#define MRVL_CHANRPT_11H_BASIC_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x5b) +#define MRVL_CHANRPT_FRAME_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x5c) +#define MRVL_RETRY_LIMIT_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x5d) +#define MRVL_WAPI_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x5e) +#define MRVL_ASSOC_REASON_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x5f) +#define MRVL_ROBUST_COEX_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x60) +#define MRVL_ROBUST_COEX_PERIOD_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x61) +#define MRVL_MCBC_DATA_RATE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x62) +#define MRVL_MEASUREMENT_TIMING_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x63) +#define MRVL_RSN_REPLAY_PROT_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x64) +#define MRVL_WAPI_INFO_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x67) +#define MRVL_MGMT_FRAME_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x68) +#define MRVL_MGMT_IE_LIST_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x69) +#define MRVL_AP_SLEEP_PARAM_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x6a) +#define MRVL_AP_INACT_SLEEP_PARAM_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x6b) +#define MRVL_AP_BT_COEX_COMMON_CFG_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x6c) +#define MRVL_AP_BT_COEX_SCO_CFG_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x6d) +#define MRVL_AP_BT_COEX_ACL_CFG_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x6e) +#define MRVL_AP_BT_COEX_STATS_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x6f) +#define MRVL_MGMT_PASSTHRU_MASK_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x70) +#define MRVL_AUTO_DEEP_SLEEP_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x71) +#define MRVL_ENHANCED_STA_POWER_SAVE_MODE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x72) +#define MRVL_HOSTWAKE_STADB_CFG_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x73) +#define MRVL_HOSTWAKE_OUI_CFG_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x74) +#define MRVL_EAPOL_PWK_HSK_TIMEOUT_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x75) +#define MRVL_EAPOL_PWK_HSK_RETRIES_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x76) +#define MRVL_EAPOL_GWK_HSK_TIMEOUT_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x77) +#define MRVL_EAPOL_GWK_HSK_RETRIES_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x78) + +#define MRVL_OPCHAN_CONTROL_DESC_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x79) +#define MRVL_OPCHAN_CHANGRP_CTRL_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x7a) +#define MRVL_PS_STA_AGEOUT_TIMER_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x7b) + +#define MRVL_WFD_DISC_PERIOD_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x7c) +#define MRVL_WFD_SCAN_ENABLE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x7d) +#define MRVL_WFD_SCAN_PEER_DEVICE_ID_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x7e) +#define MRVL_WFD_REQ_DEVICE_TYPE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x7f) +#define MRVL_WFD_DEVICE_STATE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x80) +#define MRVL_WFD_INTENT_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x81) +#define MRVL_WFD_CAPABILITY_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x82) +#define MRVL_WFD_NOA_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x83) +#define MRVL_WFD_OPP_PS_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x84) +#define MRVL_WFD_INVITATION_LIST_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x85) +#define MRVL_WFD_LISTEN_CHANNEL_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x86) +#define MRVL_WFD_OPERATING_CHANNEL_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x87) +#define MRVL_WFD_PERSISTENT_GROUP_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x88) +#define MRVL_CHANNEL_TRPC_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x89) + +#define MRVL_IEEE_ACTION_FRAME_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x8c) +#define MRVL_WIFI_DIRECT_PRESENCE_REQ_PARAMS_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x8d) +#define MRVL_WIFI_DIRECT_EXTENDED_LISTEN_TIME_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x8e) +#define MRVL_WIFI_DIRECT_PROVISIONING_PARAMS_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x8f) +#define MRVL_WIFI_DIRECT_WPS_PARAMS_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x90) +#define MRVL_WIFI_DIRECT_ACTION_FRAME_SEND_TIMEOUT_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0xb3) + +#define MRVL_CIPHER_PWK_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x91) +#define MRVL_CIPHER_GWK_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x92) +#define MRVL_AP_BSS_STATUS_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x93) +#define MRVL_TX_DATA_PAUSE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x94) +#define MRVL_STICKY_TIM_CONFIG_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x96) +#define MRVL_STICKY_TIM_STA_MAC_ADDR_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x97) +#define MRVL_2040_BSS_COEX_CONTROL_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x98) +#define MRVL_KEYPARAMSET_V2_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x9c) +#define MRVL_RXBA_SYNC_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x99) +#define MRVL_PKT_COALESCE_RULE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x9a) +#define MRVL_NETWORK_LIST_CFG_TLV (PROPRIETARY_TLV_BASE_ID + 0X9b) +#define MRVL_MEF_CFG_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x9d) + +#define MRVL_WFD_SCAN_CFG_TLV (PROPRIETARY_TLV_BASE_ID + 158) +#define MRVL_WFD_SENDTIMEOUT_TLV_ID (PROPRIETARY_TLV_BASE_ID + 159) +#define MRVL_WFD_GROUPID_TLV_ID (PROPRIETARY_TLV_BASE_ID + 160) +#define MRVL_WFD_DEVICE_ID_TLV_ID (PROPRIETARY_TLV_BASE_ID + 161) +#define MRVL_WFD_INTENDEDINTF_ADDR_TLV_ID (PROPRIETARY_TLV_BASE_ID + 162) +#define MRVL_WFD_STATUS_TLV_ID (PROPRIETARY_TLV_BASE_ID + 163) +#define MRVL_WFD_DEVICE_INFO_TLV_ID (PROPRIETARY_TLV_BASE_ID + 164) +#define MRVL_WFD_CFG_TIMEOUT_TLV_ID (PROPRIETARY_TLV_BASE_ID + 165) +#define MRVL_WFD_INVITATION_TLV_ID (PROPRIETARY_TLV_BASE_ID + 166) +#define MRVL_WFD_GROUP_BSSID_TLV_ID (PROPRIETARY_TLV_BASE_ID + 167) +#define MRVL_WFD_WPA_PSK_TLV_ID (PROPRIETARY_TLV_BASE_ID + 168) +#define MRVL_MAX_MGMT_IE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 170) +#define MRVL_REGION_DOMAIN_CODE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 171) +#define MRVL_AOIP_IBSS_MODE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 172) +#define MRVL_AOIP_MANAGE_PEERS_TLV_ID (PROPRIETARY_TLV_BASE_ID + 173) +#define MRVL_AOIP_STA_INFO_TLV_ID (PROPRIETARY_TLV_BASE_ID + 174) +#define MRVL_AOIP_REMOTE_ADDR_MODE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 175) +#define MRVL_BGSCAN_REPEAT_CNT_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0xb0) + +#define MRVL_TLV_USB_AGGR_PARAM (PROPRIETARY_TLV_BASE_ID + 177) + +#define MRVL_PS_PARAMS_IN_HS_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0xb5) +#define MRVL_HS_WAKE_HOLDOFF_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0xb6) + +#define MRVL_MULTI_CHAN_INFO_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0xb7) +#define MRVL_MULTI_CHAN_GROUP_INFO_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0xb8) +#define MRVL_RESTRICT_CLIENT_MODE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0xc1) + +#define MRVL_WFD_SERVICE_HASH_TLV_ID (PROPRIETARY_TLV_BASE_ID + 195) +#define MRVL_WFD_SERVICES_LIST_TLV_ID (PROPRIETARY_TLV_BASE_ID + 196) +#define MRVL_API_VER_INFO_TLV_ID (PROPRIETARY_TLV_BASE_ID + 199) + +#define MRVL_FLOOR_RATE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0xb9) +#define MRVL_SCAN_CHAN_GAP_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0xC5) +#define MRVL_CHAN_STATS_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0xC6) + +/* This struct is used in ROM and should not be changed at all */ +typedef MLAN_PACK_START struct { + UINT16 Type; + UINT16 Length; +} MLAN_PACK_END MrvlIEParamSet_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT8 Value[1]; +} MLAN_PACK_END MrvlIEGeneric_t; + +/* MultiChannel TLV*/ +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT16 Status; // 1 = Active, 0 = Inactive + UINT8 TlvBuffer[1]; +} MLAN_PACK_END MrvlIEMultiChanInfo_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT8 ChanGroupId; + UINT8 ChanBufWt; + ChanBandInfo_t ChanBandInfo; + UINT32 ChanTime; + UINT32 Reserved; + UINT8 HidPortNum; + UINT8 NumIntf; + UINT8 BssTypeNumList[1]; +} MLAN_PACK_END MrvlIEMultiChanGroupInfo_t; + +/* Key Material TLV */ +typedef MLAN_PACK_START struct MrvlIEKeyParamSet_t { + MrvlIEParamSet_t hdr; + UINT16 keyMgtId; +} MLAN_PACK_END MrvlIEKeyParamSet_t; + +#ifdef KEY_MATERIAL_V2 + +typedef MLAN_PACK_START struct wep_key_t { + UINT16 len; + UINT8 key[1]; +} MLAN_PACK_END wep_key_t; + +typedef MLAN_PACK_START struct wpax_key_t { + UINT8 pn[8]; + UINT16 len; + UINT8 key[1]; +} MLAN_PACK_END wpax_key_t; + +typedef MLAN_PACK_START struct wapi_key_t { + UINT8 pn[16]; + UINT16 len; + UINT8 key[16]; + UINT8 micKey[16]; +} MLAN_PACK_END wapi_key_t; + +typedef MLAN_PACK_START struct MrvlIEKeyParamSet_v2_t { + MrvlIEParamSet_t hdr; + IEEEtypes_MacAddr_t macAddr; + UINT8 keyIdx; + UINT8 keyType; + UINT16 keyInfo; + + MLAN_PACK_START union { + wep_key_t wep; + wpax_key_t wpax; + wapi_key_t wapi; + } MLAN_PACK_END keySet; + +} MLAN_PACK_END MrvlIEKeyParamSet_v2_t; +#endif + +/* Marvell Power Constraint TLV */ +typedef MLAN_PACK_START struct MrvlIEPowerConstraint_t { + MrvlIEParamSet_t IEParam; + UINT8 channel; + UINT8 dBm; +} MLAN_PACK_END MrvlIEPowerConstraint_t; + +/* Marvell WSC Selected Registar TLV */ +typedef MLAN_PACK_START struct MrvlIEWSCSelectedRegistrar_t { + MrvlIEParamSet_t IEParam; + UINT16 devPwdID; +} MLAN_PACK_END MrvlIEWSCSelectedRegistrar_t; + +/* Marvell WSC Enrollee TMO TLV */ +typedef MLAN_PACK_START struct MrvlIEWSCEnrolleeTmo_t { + MrvlIEParamSet_t IEParam; + UINT16 tmo; +} MLAN_PACK_END MrvlIEWSCEnrolleeTmo_t; + +/**************** + * AES CRYPTION FEATURE + * + * DEFINE STARTS -------------- + */ +typedef MLAN_PACK_START struct MrvlIEAesCrypt_t { + MrvlIEParamSet_t hdr; + UINT8 payload[40]; +} MLAN_PACK_END MrvlIEAesCrypt_t; + +/* DEFINE ENDS ---------------- + */ + +/* Marvell Power Capability TLV */ +typedef MLAN_PACK_START struct MrvlIEPowerCapability_t { + MrvlIEParamSet_t IEParam; + UINT8 minPwr; + UINT8 maxPwr; +} MLAN_PACK_END MrvlIEPowerCapability_t; + +/* Marvell TLV for OMNI Serial Number and Hw Revision Information. */ +typedef MLAN_PACK_START struct MrvlIE_OMNI_t { + MrvlIEParamSet_t IEParam; + UINT8 SerialNumber[16]; + UINT8 HWRev; + UINT8 Reserved[3]; +} MLAN_PACK_END MrvlIE_OMNI_t; + +/* Marvell LED Behavior TLV */ +typedef MLAN_PACK_START struct MrvlIELedBehavior_t { + MrvlIEParamSet_t IEParam; + UINT8 FirmwareState; + UINT8 LedNumber; + UINT8 LedState; + UINT8 LedArgs; +} MLAN_PACK_END MrvlIELedBehavior_t; + +/* Marvell LED GPIO Mapping TLV */ +typedef MLAN_PACK_START struct MrvlIELedGpio_t { + MrvlIEParamSet_t IEParam; + UINT8 LEDNumber; + UINT8 GPIONumber; +} MLAN_PACK_END MrvlIELedGpio_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + /* + ** Set a place holder for the TSF values. Sized to max BSS for message + ** allocation. The TLV will return a variable number of TSF values. + */ + UINT64 TSFValue[IEEEtypes_MAX_BSS_DESCRIPTS]; +} MLAN_PACK_END MrvlIETsfArray_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT8 maxLen; + IEEEtypes_SsId_t ssid; +} MLAN_PACK_END MrvlIEWildcardSsid_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT8 snrThreshold; + UINT8 reportFrequency; +} MLAN_PACK_END MrvlIELowSnrThreshold_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT8 rssiThreshold; + UINT8 reportFrequency; +} MLAN_PACK_END MrvlIELowRssiThreshold_t; + +/* Marvell AutoTx TLV */ +#define MAX_KEEPALIVE_PKT_LEN (0x60) +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT16 Interval; /* in seconds */ + UINT8 Priority; + UINT8 Reserved; + UINT16 EtherFrmLen; + UINT8 DestAddr[6]; + UINT8 SrcAddr[6]; + UINT8 EtherFrmBody[MAX_KEEPALIVE_PKT_LEN]; // Last 4 bytes are + // 32bit FCS +} MLAN_PACK_END MrvlIEAutoTx_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + IEEEtypes_DFS_Map_t map; +} MLAN_PACK_END MrvlIEChanRpt11hBasic_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT8 scanReqId; +} MLAN_PACK_END MrvlIEChanRptBeacon_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT8 ccaBusyFraction; +} MLAN_PACK_END MrvlIEChanRptChanLoad_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + SINT16 anpi; + UINT8 rpiDensities[11]; +} MLAN_PACK_END MrvlIEChanRptNoiseHist_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + IEEEtypes_MacAddr_t sourceAddr; + IEEEtypes_MacAddr_t bssid; + SINT16 rssi; + UINT16 frameCnt; +} MLAN_PACK_END MrvlIEChanRptFrame_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + SINT16 rssi; + SINT16 anpi; + UINT8 ccaBusyFraction; +#ifdef SCAN_REPORT_THROUGH_EVENT + BandConfig_t band; + UINT8 channel; + UINT8 reserved; + UINT64 tsf; +#endif +} MLAN_PACK_END MrvlIEBssScanStats_t; + +typedef MLAN_PACK_START struct { + /** Header */ + MrvlIEParamSet_t IEParam; + UINT32 mode; + UINT32 maxOff; + UINT32 maxOn; +} MLAN_PACK_END MrvlIETypes_MeasurementTiming_t; + +typedef MLAN_PACK_START struct { + /** Header */ + MrvlIEParamSet_t IEParam; + UINT32 mode; + UINT32 dwell; + UINT32 maxOff; + UINT32 minLink; + UINT32 rspTimeout; +} MLAN_PACK_END MrvlIETypes_ConfigScanTiming_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT8 KeyIndex; + UINT8 IsDefaultIndex; + UINT8 Value[1]; +} MLAN_PACK_END MrvlIETypes_WepKey_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT8 PMK[32]; +} MLAN_PACK_END MrvlIETypes_PMK_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT8 ssid[1]; +} MLAN_PACK_END MrvlIETypes_Ssid_Param_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT8 Passphrase[64]; +} MLAN_PACK_END MrvlIETypes_Passphrase_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT8 BSSID[6]; +} MLAN_PACK_END MrvlIETypes_BSSID_t; + +typedef MLAN_PACK_START struct { + UINT16 Type; + UINT16 Length; + IEEEtypes_MacAddr_t Bssid; + UINT16 Rsvd; + SINT16 Rssi; // Signal strength + UINT16 Age; + UINT32 QualifiedNeighborBitmap; + UINT32 BlackListDuration; +} MLAN_PACK_END MrvlIETypes_NeighbourEntry_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT16 SearchMode; + UINT16 State; + UINT32 ScanPeriod; +} MLAN_PACK_END MrvlIETypes_NeighbourScanPeriod_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT8 Rssi; + UINT8 Frequency; +} MLAN_PACK_END MrvlIETypes_BeaconHighRssiThreshold_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT8 Rssi; + UINT8 Frequency; +} MLAN_PACK_END MrvlIETypes_BeaconLowRssiThreshold_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT8 Value; + UINT8 Frequency; +} MLAN_PACK_END MrvlIETypes_RoamingAgent_Threshold_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT8 AssocReason; +} MLAN_PACK_END MrvlIETypes_AssocReason_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + IEEEtypes_MacAddr_t macAddr; + UINT8 txPauseState; + UINT8 totalQueued; +} MLAN_PACK_END MrvlIETypes_TxDataPause_t; + +typedef MLAN_PACK_START struct { + UINT16 startFreq; + UINT8 chanWidth; + UINT8 chanNum; +} MLAN_PACK_END MrvlIEChannelDesc_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + MrvlIEChannelDesc_t chanDesc; + UINT16 controlFlags; + UINT16 reserved; + UINT8 activePower; + UINT8 mdMinPower; + UINT8 mdMaxPower; + UINT8 mdPower; +} MLAN_PACK_END MrvlIETypes_OpChanControlDesc_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT32 chanGroupBitmap; + ChanScanMode_t scanMode; + UINT8 numChan; + MrvlIEChannelDesc_t chanDesc[50]; +} MLAN_PACK_END MrvlIETypes_ChanGroupControl_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + ChanBandInfo_t ChanBandInfo[IEEEtypes_MAX_BSS_DESCRIPTS]; +} MLAN_PACK_END MrvlIEChanBandList_t; +#if 0 +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + IEEEtypes_MacAddr_t srcAddr; + IEEEtypes_MacAddr_t dstAddr; + IEEEtypes_ActionFrame_t actionFrame; +} MLAN_PACK_END MrvlIEActionFrame_t; +#endif +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + HtEntry_t htEntry[IEEEtypes_MAX_BSS_DESCRIPTS]; +} MLAN_PACK_END MrvlIEHtList_t; + +/* This struct is used in ROM code and all the fields of +** this should be kept intact +*/ +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT16 bmpRateOfHRDSSS; + UINT16 bmpRateOfOFDM; + UINT32 bmpRateOfHT_DW0; + UINT32 bmpRateOfHT_DW1; + UINT32 bmpRateOfHT_DW2; + UINT32 bmpRateOfHT_DW3; +#ifdef DOT11AC + UINT16 bmpRateOfVHT[8]; // per SS +#endif +} MLAN_PACK_END MrvlIE_TxRateScope_t; + +typedef MLAN_PACK_START struct { + UINT8 mod_class; + UINT8 rate; + UINT8 attemptLimit; + UINT8 reserved; +} MLAN_PACK_END MrvlIE_RateInfoEntry_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + MrvlIE_RateInfoEntry_t rate_info[8]; +} MLAN_PACK_END MrvlIE_RateDropTable_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT32 mode; + // for 1x1 11n, 9 HT rate, 8 OFDM rate, 4 DSSS rate + MrvlIE_RateDropTable_t rateDropTbls[9 + 8 + 4]; +} MLAN_PACK_END MrvlIE_RateDropPattern_t; + +#ifdef USB_FRAME_AGGR + +#define USB_TX_AGGR_ENABLE ( 1 << 1 ) +#define USB_RX_AGGR_ENABLE ( 1 << 0 ) + +#define USB_RX_AGGR_MODE_MASK ( 1 << 0 ) +#define USB_RX_AGGR_MODE_SIZE (1) +#define USB_RX_AGGR_MODE_NUM (0) + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT16 enable; + UINT16 rx_mode; + UINT16 rx_align; + UINT16 rx_max; + UINT16 rx_timeout; + UINT16 tx_mode; + UINT16 tx_align; +} MLAN_PACK_END MrvlIE_USBAggrTLV_t; + +extern MrvlIE_USBAggrTLV_t g_Aggr_Conf; + +#endif + +typedef MLAN_PACK_START struct { + UINT8 mod_class; + UINT8 firstRateCode; + UINT8 lastRateCode; + SINT8 power_step; + SINT8 min_power; + SINT8 max_power; + UINT8 ht_bandwidth; + UINT8 reserved[1]; +} MLAN_PACK_END MrvlIE_PowerGroupEntry_t; + +#define MRVL_MAX_PWR_GROUP 15 +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + MrvlIE_PowerGroupEntry_t PowerGroup[MRVL_MAX_PWR_GROUP]; +} MLAN_PACK_END MrvlIE_PowerGroup_t; + +#ifdef AP_STA_PS +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT16 NullPktInterval; + UINT16 numDtims; + UINT16 BCNMissTimeOut; + UINT16 LocalListenInterval; + UINT16 AdhocAwakePeriod; + UINT16 PS_mode; + UINT16 DelayToPS; +} MrvlIETypes_StaSleepParams_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT16 idleTime; +} MrvlIETypes_AutoDeepSleepParams_t; +#endif + +#ifdef MESH +typedef MLAN_PACK_START struct _MrvlMeshIE_Tlv_t { + MrvlIEParamSet_t hdr; + IEEEtypes_VendorSpecific_MeshIE_t meshIE; + +} MLAN_PACK_END MrvlMeshIE_Tlv_t; +#endif + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT8 RBCMode; + UINT8 Reserved[3]; +} MLAN_PACK_END MrvlIERobustCoex_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT16 Mode; + UINT16 Reserved; + UINT32 BTTime; + UINT32 Period; +} MLAN_PACK_END MrvlIERobustCoexPeriod_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT8 staMacAddr[IEEEtypes_ADDRESS_SIZE]; + IEEEtypes_IE_Param_t IeBuf; +} MLAN_PACK_END MrvlIEHostWakeStaDBCfg; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT16 ouiCmpLen; + UINT8 ouiBuf[6]; +} MLAN_PACK_END MrvlIEHostWakeOuiCfg; + +#ifdef MICRO_AP_MODE +/* This struct is used in ROM and should not be changed at all */ +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t hdr; + IEEEtypes_MacAddr_t macAddr; + UINT8 pwrMode; + SINT8 rssi; +} MLAN_PACK_END MrvlIEStaInfo_t; +#endif + +typedef struct { + MrvlIEParamSet_t Hdr; + uint16 protocol; + uint8 cipher; + uint8 reserved; +} MrvlIETypes_PwkCipher_t; + +typedef struct { + MrvlIEParamSet_t Hdr; + uint8 cipher; + uint8 reserved; +} MrvlIETypes_GwkCipher_t; + +typedef MLAN_PACK_START struct { + uint8 modGroup; + uint8 txPower; +} MLAN_PACK_END MrvlIE_ChanTrpcEntry_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t Hdr; + MrvlIEChannelDesc_t chanDesc; + MrvlIE_ChanTrpcEntry_t data[1]; +} MLAN_PACK_END MrvlIETypes_ChanTrpcCfg_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + IEEEtypes_MacAddr_t mac[IEEEtypes_MAX_BSS_DESCRIPTS]; +} MLAN_PACK_END MrvlIETypes_MacAddr_t; + +#ifdef AP_BTCOEX +typedef enum _tagScoCoexBtTraffic { + ONLY_SCO, + ACL_BEFORE_SCO, + ACL_AFTER_SCO, + BT_TRAFFIC_RESERVED, + BT_TRAFFIC_MAX +} ScoCoexBtTraffic_e; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT32 configBitmap; /* Bit 0 : overrideCts2SelfProtection ** Bit + 1-31 : Reserved */ + UINT32 apStaBtCoexEnabled; + UINT32 reserved[3]; /* For future use. */ +} MLAN_PACK_END MrvlIETypes_ApBTCoexCommonConfig_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT16 protectionFrmQTime[BT_TRAFFIC_MAX]; /* Index 0 for ONLY_SCO + ** 1 for + ACL_BEFORE_SCO ** 2 + for ACL_AFTER_SCO ** + 3 is Reserved */ + UINT16 protectionFrmRate; + UINT16 aclFrequency; + UINT32 reserved[4]; /* For future use. */ +} MLAN_PACK_END MrvlIETypes_ApBTCoexScoConfig_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT16 enabled; + UINT16 btTime; + UINT16 wlanTime; + UINT16 protectionFrmRate; + UINT32 reserved[4]; /* For future use. */ +} MLAN_PACK_END MrvlIETypes_ApBTCoexAclConfig_t; + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t IEParam; + UINT32 nullNotSent; + UINT32 numOfNullQueued; + UINT32 nullNotQueued; + UINT32 numOfCfEndQueued; + UINT32 cfEndNotQueued; + UINT32 nullAllocationFail; + UINT32 cfEndAllocationFail; + UINT32 reserved[8]; /* For future use. */ +} MLAN_PACK_END MrvlIETypes_ApBTCoexStats_t; +#endif // AP_BTCOEX + +typedef MLAN_PACK_START struct { + MrvlIEParamSet_t Hdr; + + IEEEtypes_MacAddr_t macAddr; + UINT8 tid; + UINT8 reserved; + UINT16 startSeqNum; + + UINT16 bitMapLen; + UINT8 bitMap[1]; +} MLAN_PACK_END MrvlIETypes_RxBaSync_t; + +#ifdef SCAN_CHAN_STATISTICS +typedef MLAN_PACK_START struct MrvlIEChannelStats { + MrvlIEParamSet_t IEParam; + UINT8 chanStat[1]; +} MLAN_PACK_END MrvlIEChannelStats_t; +#endif + +/* API Version Info Entry for MRVL_API_VER_INFO_TLV_ID */ +typedef MLAN_PACK_START struct MrvlIE_ApiVersionEntry_t { + UINT16 apiId; + UINT8 major; + UINT8 minor; +} MLAN_PACK_END MrvlIE_ApiVersionEntry_t; + +/** API Version Ids */ +#define KEY_API_VER_ID 0x1 +#endif // _TLV_H_ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/wl_macros.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/wl_macros.h new file mode 100644 index 00000000..7a13fa06 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/wl_macros.h @@ -0,0 +1,140 @@ +/** @file wl_macros.h + * + * @brief Common macros are defined here. Must include "wltypes.h" before this file + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#if !defined(WL_MACROS_H__) +#define WL_MACROS_H__ + +#define MACRO_START do { +#define MACRO_END } while (0) + +#define WL_REGS8(x) (*(volatile unsigned char *)(x)) +#define WL_REGS16(x) (*(volatile unsigned short *)(x)) +#define WL_REGS32(x) (*(volatile unsigned int *)(x)) + +#define WL_READ_REGS8(reg,val) ((val) = WL_REGS8(reg)) +#define WL_READ_REGS16(reg,val) ((val) = WL_REGS16(reg)) +#define WL_READ_REGS32(reg,val) ((val) = WL_REGS32(reg)) +#define WL_READ_BYTE(reg,val) ((val) = WL_REGS8(reg)) +#define WL_READ_HWORD(reg,val) ((val) = WL_REGS16(reg)) /* half word; */ +/*16bits */ +#define WL_READ_WORD(reg,val) ((val) = WL_REGS32(reg)) /* 32 bits */ +#define WL_WRITE_REGS8(reg,val) (WL_REGS8(reg) = (val)) +#define WL_WRITE_REGS16(reg,val) (WL_REGS16(reg) = (val)) +#define WL_WRITE_REGS32(reg,val) (WL_REGS32(reg) = (val)) +#define WL_WRITE_BYTE(reg,val) (WL_REGS8(reg) = (val)) +#define WL_WRITE_HWORD(reg,val) (WL_REGS16(reg) = (val)) /* half word; */ +/*16bits */ +#define WL_WRITE_WORD(reg,val) (WL_REGS32(reg) = (val)) /* 32 bits */ +#define WL_REGS8_SETBITS(reg, val) (WL_REGS8(reg) |= (UINT8)(val)) +#define WL_REGS16_SETBITS(reg, val) (WL_REGS16(reg) |= (UINT16)(val)) +#define WL_REGS32_SETBITS(reg, val) (WL_REGS32(reg) |= (val)) + +#define WL_REGS8_CLRBITS(reg, val) (WL_REGS8(reg) = \ + (UINT8)(WL_REGS8(reg)&~(val))) + +#define WL_REGS16_CLRBITS(reg, val) (WL_REGS16(reg) = \ + (UINT16)(WL_REGS16(reg)&~(val))) + +#define WL_REGS32_CLRBITS(reg, val) (WL_REGS32(reg) = \ + (WL_REGS32(reg)&~(val))) + +#define WL_WRITE_CHUNK(dst, src, length) (memcpy((void*) (dst), \ + (void*) (src), (length))) +/*! + * Bitmask macros + */ +#define WL_BITMASK(nbits) ((0x1 << nbits) - 1) + +/*! + * Macro to put the WLAN SoC into sleep mode + */ +#define WL_GO_TO_SLEEP asm volatile ("MCR p15, 0, r3, c7, c0, 4;") + +/*! + * BE vs. LE macros + */ +#ifdef BE /* Big Endian */ +#define SHORT_SWAP(X) (X) +#define WORD_SWAP(X) (X) +#define LONG_SWAP(X) ((l64)(X)) +#else /* Little Endian */ + +#define SHORT_SWAP(X) ((X <<8 ) | (X >> 8)) // !< swap bytes in a 16 bit + // short + +#define WORD_SWAP(X) (((X)&0xff)<<24)+ \ + (((X)&0xff00)<<8)+ \ + (((X)&0xff0000)>>8)+ \ + (((X)&0xff000000)>>24) // !< swap bytes in a 32 bit + // word + +#define LONG_SWAP(X) ( (l64) (((X)&0xffULL)<<56)+ \ + (((X)&0xff00ULL)<<40)+ \ + (((X)&0xff0000ULL)<<24)+ \ + (((X)&0xff000000ULL)<<8)+ \ + (((X)&0xff00000000ULL)>>8)+ \ + (((X)&0xff0000000000ULL)>>24)+ \ + (((X)&0xff000000000000ULL)>>40)+ \ + (((X)&0xff00000000000000ULL)>>56)) // !< swap + // bytes in a + // 64 bit long +#endif + +/*! + * Alignment macros + */ +#define ALIGN4(x) (((x) + 3) & ~3) +#define ALIGN4BYTE(x) (x=ALIGN4(x)) +#define ROUNDUP4US(x) (ALIGN4(x)) + +#ifndef min +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif +#ifndef max +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#endif + +#ifndef MIN +#define MIN(a,b) (((a) < (b)) ? (a) : (b)) +#endif +#ifndef MAX +#define MAX(a,b) (((a) > (b)) ? (a) : (b)) +#endif + +#ifndef NELEMENTS +#define NELEMENTS(x) (sizeof(x)/sizeof(x[0])) +#endif + +#define HWORD_LOW_BYTE(x) ((x) & 0xFF) +#define HWORD_HIGH_BYTE(x) (((x) >> 8) & 0xFF) + +#define htons(x) (UINT16)SHORT_SWAP(x) +#define htonl(x) (UINT32)WORD_SWAP(x) + +#define ntohs(x) (UINT16)SHORT_SWAP(x) +#define ntohl(x) (UINT32)WORD_SWAP(x) + +#define CEIL_aByb(a, b) ((a + b - 1) / b) + +#endif /* _WL_MACROS_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/wl_mib.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/wl_mib.h new file mode 100644 index 00000000..30bd6799 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/wl_mib.h @@ -0,0 +1,585 @@ +/** @file wl_mib.h + * + * @brief This file contains the MIB structure definitions based on IEEE 802.11 specification. + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#if !defined(WL_MIB_H__) + +#define WL_MIB_H__ +#include "wl_mib_rom.h" + +/*============================================================================= */ +/* Management Information Base STRUCTURES (IEEE 802.11) */ +/*============================================================================= */ + +/*-----------------------------*/ +/* Station Configuration Table */ +/*-----------------------------*/ + +typedef struct MIB_StaCfg_s +{ + UINT8 CfPeriod; /* 0 to 255 */ + UINT16 CfpMax; /* 0 to 65535 */ + UINT8 PwrMgtMode; /* PwrMgmtMode_e values */ + UINT8 OpRateSet[16]; /* 16 byte array is sufficient for 14 rate */ +#ifdef DOT11H + Boolean dot11SpectrumManagementRequired; +#endif + Boolean dot11WWSenabled; +} MIB_STA_CFG; + +/*------------------------*/ +/* WEP Key Mappings Table */ +/*------------------------*/ + +/* This struct is used in ROM and it should not be changed at all */ +typedef struct MIB_WepKeyMappings_s { + UINT32 WepKeyMappingIdx; + IEEEtypes_MacAddr_t WepKeyMappingAddr; + UINT8 WepKeyMappingWepOn; /* SNMP_Boolean_e values */ + UINT8 WepKeyMappingVal[WEP_KEY_USER_INPUT]; /* 5 byte string */ + UINT8 WepKeyMappingStatus; /* SNMP_Rowstatus_e values */ +} MIB_WEP_KEY_MAPPINGS; + +/*---------------*/ +/* Privacy Table */ +/*---------------*/ + +typedef struct MIB_PrivacyTable_s { + UINT8 PrivInvoked; /* SNMP_Boolean_e values */ + UINT8 WepDefaultKeyId; /* 0 to 3 */ + UINT32 WepKeyMappingLen; /* 10 to 4294967295 */ + UINT8 ExcludeUnencrypt; /* SNMP_Boolean_e values */ + UINT32 WepIcvErrCnt; + UINT32 WepExcludedCnt; + UINT8 RSNEnabled; /* SNMP_Boolean_e values */ +} MIB_PRIVACY_TABLE; + +/*============================================================================= */ +/* MAC ATTRIBUTES */ +/*============================================================================= */ + +/*---------------------*/ +/* MAC Operation Table */ +/*---------------------*/ + +typedef struct MIB_OpData_s +{ + IEEEtypes_MacAddr_t StaMacAddr; + UINT16 RtsThresh; /* 0 to 2347 */ + UINT8 ShortRetryLim; /* 1 to 255 */ + UINT8 LongRetryLim; /* 1 to 255 */ + UINT16 FragThresh; /* 256 to 2346 */ + UINT32 MaxTxMsduLife; /* 1 to 4294967295 */ + UINT32 MaxRxLife; /* 1 to 4294967295 */ +#ifdef IN_USE + UINT8 ManufId[128]; /* 128 byte string */ + UINT8 ProdId[128]; /* 128 byte string */ +#endif +} MIB_OP_DATA; + +/*----------------*/ +/* Counters Table */ +/*----------------*/ + +typedef struct MIB_Counters_s { + UINT32 RxFrmCnt; + UINT32 MulticastTxFrmCnt; + UINT32 FailedCnt; + UINT32 RetryCnt; + UINT32 MultRetryCnt; + UINT32 FrmDupCnt; + UINT32 RtsSuccessCnt; + UINT32 RtsFailCnt; + UINT32 AckFailCnt; + UINT32 RxFragCnt; + UINT32 MulticastRxFrmCnt; + UINT32 FcsErrCnt; + UINT32 TxFrmCnt; + UINT32 WepUndecryptCnt; +} MIB_COUNTERS; + +/*-----------------------*/ +/* Group Addresses Table */ +/*-----------------------*/ + +typedef struct MIB_GroupAddr_s { + UINT32 GroupAddrIdx; + IEEEtypes_MacAddr_t Addr; + UINT8 GroupAddrStatus; /* SNMP_Rowstatus_e values */ +} MIB_GROUP_ADDR; + +/*----------------------------*/ +/* Resource Information Table */ +/*----------------------------*/ + +typedef struct MIB_RsrcInfo_s { + UINT8 ManufOui[3]; /* 3 byte string */ + UINT8 ManufName[128]; /* 128 byte string */ + UINT8 ManufProdName[128]; /* 128 byte string */ + UINT8 ManufProdVer[128]; /* 128 byte string */ +} MIB_RESOURCE_INFO; + +/*============================================================================= */ +/* PHY ATTRIBUTES */ +/*============================================================================= */ + +/*---------------------*/ +/* PHY Operation Table */ +/*---------------------*/ +typedef struct MIB_PhyOpTable_s { + UINT8 PhyType; /* SNMP_PhyType_e values */ + UINT32 CurrRegDomain; + UINT8 TempType; /* SNMP_TempType_e values */ +} MIB_PHY_OP_TABLE; + +/*-------------------*/ + +/* PHY Antenna Table */ + +/*-------------------*/ + +typedef struct MIB_PhyAntTable_s { + UINT8 CurrTxAnt; /* 1 to 255 */ + UINT8 DivSupport; /* SNMP_DivSupp_e values */ + UINT8 CurrRxAnt; /* 1 to 255 */ +} MIB_PHY_ANT_TABLE; + +typedef struct MIB_PhyAntSelect_s { + UINT8 SelectRxAnt; /* 0 to 1 */ + UINT8 SelectTxAnt; /* 0 to 1 */ + UINT8 DiversityRxAnt; /* Boolean */ + UINT8 DiversityTxAnt; /* Boolean */ +} MIB_PHY_ANT_SELECT; + +/*--------------------------*/ +/* PHY Transmit Power Table */ +/*--------------------------*/ + +typedef struct MIB_PhyTxPwrTable_s { + UINT8 NumSuppPwrLevels; /* 1 to 8 */ + UINT16 TxPwrLevel1; /* 0 to 10000 */ + UINT16 TxPwrLevel2; /* 0 to 10000 */ + UINT16 TxPwrLevel3; /* 0 to 10000 */ + UINT16 TxPwrLevel4; /* 0 to 10000 */ + UINT16 TxPwrLevel5; /* 0 to 10000 */ + UINT16 TxPwrLevel6; /* 0 to 10000 */ + UINT16 TxPwrLevel7; /* 0 to 10000 */ + UINT16 TxPwrLevel8; /* 0 to 10000 */ + UINT8 CurrTxPwrLevel; /* 1 to 8 */ +} MIB_PHY_TX_POWER_TABLE; + +/*---------------------------------------------*/ + +/* PHY Frequency Hopping Spread Spectrum Table */ + +/*---------------------------------------------*/ + +typedef struct MIB_PhyFHSSTable_s { + + UINT8 HopTime; /* 224? */ + UINT8 CurrChanNum; /* 0 to 99 */ + UINT16 MaxDwellTime; /* 0 to 65535 */ + UINT16 CurrDwellTime; /* 0 to 65535 */ + UINT16 CurrSet; /* 0 to 255 */ + UINT16 CurrPattern; /* 0 to 255 */ + UINT16 CurrIdx; /* 0 to 255 */ + +} MIB_PHY_FHSS_TABLE; + +/*-------------------------------------------*/ + +/* PHY Direct Sequence Spread Spectrum Table */ + +/*-------------------------------------------*/ + +typedef enum MIB_CCAMode_s { + ENERGY_DETECT_ONLY = 1, + CARRIER_SENSE_ONLY = 2, + CARRIER_SENSE_AND_ENERGY_DETECT = 4 +} MIB_CCA_MODE; + +typedef struct MIB_PhyDSSSTable_s { + UINT8 CurrChan; /* 0 to 14 */ + UINT8 CcaModeSupp; /* 1 to 7 */ + UINT16 CurrCcaMode; /* MIB_CCA_MODE values only */ + UINT32 EdThresh; +} MIB_PHY_DSSS_TABLE; + +/*--------------*/ + +/* PHY IR Table */ + +/*--------------*/ + +typedef struct MIB_PhyIRTable_s { + UINT32 CcaWatchDogTmrMax; + UINT32 CcaWatchDogCntMax; + UINT32 CcaWatchDogTmrMin; + UINT32 CcaWatchDogCntMin; +} MIB_PHY_IR_TABLE; + +/*----------------------------------------*/ + +/* PHY Regulatory Domains Supported Table */ + +/*----------------------------------------*/ + +typedef struct MIB_PhyRegDomainsSupp_s { + UINT32 RegDomainsSuppIdx; + UINT8 RegDomainsSuppVal; /* SNMP_RegDomainsSuppVal_e values */ +} MIB_PHY_REG_DOMAINS_SUPPPORTED; + +/*-------------------------*/ + +/* PHY Antennas List Table */ + +/*-------------------------*/ + +typedef struct MIB_PhyAntList_s { + UINT8 AntListIdx; + UINT8 SuppTxAnt; /* SNMP_Boolean_e values */ + UINT8 SuppRxAnt; /* SNMP_Boolean_e values */ + UINT8 RxDiv; /* SNMP_Boolean_e values */ +} MIB_PHY_ANT_LIST; + +/*----------------------------------------*/ + +/* PHY Supported Receive Data Rates Table */ + +/*----------------------------------------*/ + +typedef struct MIB_PhySuppDataRatesRx_s { + UINT8 SuppDataRatesRxIdx; /* 1 to 8 */ + UINT8 SuppDataRatesRxVal; /* 2 to 127 */ +} MIB_PHY_SUPP_DATA_RATES_RX; + +typedef struct MIB_DHCP_s { + UINT32 IPAddr; + UINT32 SubnetMask; + UINT32 GwyAddr; + +#ifdef GATEWAY + UINT32 PrimaryDNS; + UINT32 SecondaryDNS; +#endif + +} MIB_DHCP; + +#if defined(GATEWAY) + +typedef struct MIB_IP_LAN_s { + UINT32 IPAddr; + UINT32 SubnetMask; +} MIB_IP_LAN; + +#endif + +/* Added for WB31 */ + +typedef struct _MIB_WB { + UINT8 devName[16]; // Must be a string: + // 15 Max characters + UINT8 cloneMacAddr[6]; // cloned MAC Address + UINT8 opMode; // 0 for infrastructure, + // 1 for ad-hoc + UINT8 macCloneEnable; // boolean +} MIB_WB; + +/* Added for WB31 end */ + +/*---------------------*/ + +/* RSN Config Table */ + +/*---------------------*/ + +typedef struct MIB_RSNConfig_s { + UINT32 Index; + UINT32 Version; + UINT32 PairwiseKeysSupported; + UINT8 MulticastCipher[4]; + UINT8 GroupRekeyMethod; + UINT32 GroupRekeyTime; + UINT32 GroupRekeyPackets; + UINT8 GroupRekeyStrict; + UINT8 PSKValue[40]; + UINT8 PSKPassPhrase[64]; + UINT8 TSNEnabled; + UINT32 GroupMasterRekeyTime; + UINT32 GroupUpdateTimeOut; + UINT32 GroupUpdateCount; + UINT32 PairwiseUpdateTimeOut; + UINT32 PairwiseUpdateCount; +} MIB_RSNCONFIG; + +/*---------------------*/ + +/* RSN Unicast Cipher Suites Config Table */ + +/*---------------------*/ + +typedef struct MIB_RSNConfigUnicastCiphers_s { + UINT32 Index; + UINT8 UnicastCipher[4]; + UINT8 Enabled; +} MIB_RSNCONFIG_UNICAST_CIPHERS; + +/*---------------------*/ + +/* RSN Authentication Suites Config Table */ + +/*---------------------*/ + +typedef struct MIB_RSNConfigAuthSuites_s { + UINT32 Index; + UINT8 AuthSuites[4]; + UINT8 Enabled; +} MIB_RSNCONFIG_AUTH_SUITES; + +typedef struct Mrvl_MIB_RSN_GrpKey_s { + UINT8 GrpMasterKey[32]; + UINT8 EncryptKey[16]; + UINT32 TxMICKey[2]; + UINT32 RxMICKey[2]; + UINT32 g_IV32; + UINT16 g_IV16; + UINT16 g_Phase1Key[5]; + UINT8 g_KeyIndex; +} MRVL_MIB_RSN_GRP_KEY; + +#ifdef MIB_STATS + +typedef struct Mrvl_MIB_StatsDetails { + /* WARNING: Do not change the order of variables in this structure */ + UINT32 TKIPLocalMICFailures; /* OID: 0x0b -> 0 */ + UINT32 CCMPDecryptErrors; /* OID: 0x0c -> 1 */ + UINT32 WEPUndecryptableCount; /* OID: 0x0d -> 2 */ + UINT32 WEPICVErrorCount; /* OID: 0x0e -> 3 */ + UINT32 DecryptFailureCount; /* OID: 0x0f -> 4 */ + UINT32 failed; /* OID: 0x12 -> 5 */ + UINT32 retry; /* OID: 0x13 -> 6 */ + UINT32 multiretry; /* OID: 0x14 -> 7 */ + UINT32 framedup; /* OID: 0x15 -> 8 */ + UINT32 rtssuccess; /* OID: 0x16 -> 9 */ + UINT32 rtsfailure; /* OID: 0x17 -> 10 */ + UINT32 ackfailure; /* OID: 0x18 -> 11 */ + UINT32 rxfrag; /* OID: 0x19 -> 12 */ + UINT32 mcastrxframe; /* OID: 0x1a -> 13 */ + UINT32 fcserror; /* OID: 0x1b -> 14 */ + UINT32 txframe; /* OID: 0x1c -> 15 */ + UINT32 rsntkipcminvoked; /* OID: 0x1d -> 16 */ + UINT32 rsn4wayhandshakefailure; /* OID: 0x1e -> 17 */ + UINT32 mcasttxframe; /* OID: 0x1f -> 18 */ + UINT32 TKIPICVErrors; /* Not in the OID list */ + UINT32 TKIPReplays; /* Not in the OID list */ + UINT32 CCMPReplays; /* Not in the OID list */ + UINT32 CMACICVErrors; /* Not in the OID list */ + UINT32 CMACReplays; /* Not in the OID list */ + UINT32 WEPFragError; /* Not in the OID list */ + UINT32 DecryptSuccessCount; /* Not in the OID list */ + UINT32 wepicverrCnt[4]; /* Not in the OID list */ + + /* EAPoL Tx Stats */ + UINT16 eapolSentTotalCnt; + UINT16 eapolSentFrmFwCnt; + UINT16 eapolSentSuccessCnt; + UINT16 eapolSentFailCnt; + + /* EAPoL Rx Stats */ + UINT16 eapolRxTotalCnt; + UINT16 eapolRxForESUPPCnt; + + /* Key Stats */ + UINT16 PTKRecvdTotalCnt; + UINT16 PTKSentFrmESUPPCnt; + + UINT16 GTKRecvdTotalCnt; + UINT16 GTKSentFrmESUPPCnt; +} MRVL_MIB_STATSDETAILS; + +#define NUM_OF_STATS_OIDS (19) + +#define INC_MIB_STAT(x, a) if (x && x->pMibStats) { x->pMibStats->data.mib.a++; } +#define INC_MIB_STAT2(x, a, b) if (x && x->pMibStats) { x->pMibStats->data.mib.a++; x->pMibStats->data.mib.b++;} +#define INC_MIB_STAT3(x, a, b, c) if (x && x->pMibStats) { x->pMibStats->data.mib.a++; x->pMibStats->data.mib.b++; x->pMibStats->data.mib.c++;} +#define CLR_MIB_STAT(x, a) if (x && x->pMibStats) { x->pMibStats->data.mib.a = 0; } + +typedef struct Mrvl_MIB_Stats { + union { + MRVL_MIB_STATSDETAILS mib; + UINT32 mib_stats[NUM_OF_STATS_OIDS]; + } data; +} MRVL_MIB_STATS; +#endif + +typedef struct MIB_BURST_MODE { + UINT8 mib_burstmode; + UINT32 mib_burstrate; +} MIB_BURST_MODE; + +#ifdef BRIDGE_STP + +typedef struct mib_dot1dPortEntry_s { + UINT8 mib_dot1dStpPortPriority; /* (0..255) */ + UINT8 mib_dot1dStpPortEnable; /* 1: enable; 2: disable */ + UINT16 mib_dot1dStpPortPathCost; /* (1..65535) */ +} mib_dot1dPortEntry_t; + +typedef struct mib_dot1dStp_s { + UINT8 mib_dot1dStpPortPriority; /* (0..255) */ + UINT8 mib_dot1dStpPortEnable; /* 1: enable; 2: disable */ + UINT16 mib_dot1dStpPortPathCost; /* (1..65535) */ + UINT32 mib_dot1dTpAgingTime; /* (10..1000000) */ + UINT16 mib_dot1dStpPriority; + UINT16 mib_dot1dStpBridgeMaxAge; + UINT16 mib_dot1dStpBridgeHelloTime; + UINT16 mib_dot1dStpBridgeForwardDelay; +} mib_dot1dStp_t; + +typedef struct mib_priv_dot1dStp_s { + UINT8 mib_priv_dot1dStpEnable; /* 1 or 0 */ +} mib_priv_dot1dStp_t; + +#endif + +typedef struct MIB_802DOT11_s { + + /*-----------------------------------------*/ + + /* Station Management Attributes */ + + /*-----------------------------------------*/ + + MIB_STA_CFG StationConfig; /* station configuration table */ + + MIB_WEP_DEFAULT_KEYS WepDefaultKeys[4]; /* wep default keys table */ + + MIB_WEP_KEY_MAPPINGS WepKeyMappings; /* wep key mappings table */ + + MIB_PRIVACY_TABLE Privacy; /* privacy table */ + + /* SMT Notification Objects */ + +#ifdef AP_SW + + MIB_DISASSOC_NOT NoteDisassoc; /* disassociate notification */ + + MIB_DEAUTH_NOT NoteDeauth; /* deauthentication notification */ + + MIB_AUTH_FAIL_NOT NoteAuthFail; /* authentication fail notification */ + +#endif + + /*-----------------------------------------*/ + + /* MAC Attributes */ + + /*-----------------------------------------*/ + + MIB_OP_DATA OperationTable; + +#ifdef WMM_IMPLEMENTED + MIB_EDCA_CONFIG EdcaConfigTable[WMM_MAX_TIDS]; +#endif + +#ifdef AP_SW + + MIB_COUNTERS CountersTable; + + MIB_GROUP_ADDR GroupAddrTable; + + /*-----------------------------------------*/ + + /* Resource Type */ + + /*-----------------------------------------*/ + + MIB_RESOURCE_INFO ResourceInfo; + + /*-----------------------------------------*/ + + /* PHY Attributes */ + + /*-----------------------------------------*/ + + MIB_PHY_OP_TABLE PhyOpTable; + + MIB_PHY_TX_POWER_TABLE PhyPowerTable; + + MIB_PHY_FHSS_TABLE PhyFHSSTable; + + MIB_PHY_IR_TABLE PhyIRTable; + + MIB_PHY_REG_DOMAINS_SUPPPORTED PhyRegDomainsSupp; + + MIB_PHY_ANT_LIST AntennasListTable; + +#endif + + MIB_PHY_ANT_TABLE PhyAntTable; + + MIB_PHY_DSSS_TABLE PhyDSSSTable; + + MIB_PHY_SUPP_DATA_RATES_TX SuppDataRatesTx[IEEEtypes_MAX_DATA_RATES_G]; + + MIB_PHY_SUPP_DATA_RATES_RX SuppDataRatesRx; + +#if defined(AP_SW) + MIB_RSNCONFIG RSNConfig; +#endif + + // MIB_RSNCONFIG_UNICAST_CIPHERS UnicastCiphers; + + // MIB_RSNCONFIG_AUTH_SUITES RSNConfigAuthSuites; + +#ifdef AP_WPA2 + + MIB_RSNCONFIGWPA2 RSNConfigWPA2; + + MIB_RSNCONFIGWPA2_UNICAST_CIPHERS WPA2UnicastCiphers; + + MIB_RSNCONFIGWPA2_UNICAST_CIPHERS WPA2UnicastCiphers2; + + MIB_RSNCONFIGWPA2_AUTH_SUITES WPA2AuthSuites; + +#endif + +#ifdef BURST_MODE + + MIB_BURST_MODE BurstMode; + +#endif + + MIB_PHY_ANT_SELECT PhyAntSelect; + +#ifdef WEP_RSN_STATS_MIB + MIB_RSNSTATS RSNStats; +#endif + +} MIB_802DOT11; + +extern BOOLEAN mib_InitSta(MIB_802DOT11 *mib); + +extern BOOLEAN mib_InitAp(MIB_802DOT11 *mib); + +#endif /* _WL_MIB_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/wl_mib_rom.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/wl_mib_rom.h new file mode 100644 index 00000000..a36c5e04 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/wl_mib_rom.h @@ -0,0 +1,60 @@ +/** @file wl_mib_rom.h + * + * @brieThis file contains the MIB structure definitions + * based on IEEE 802.11 specification. + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#if !defined(WL_MIB_ROM_H__) + +#define WL_MIB_ROM_H__ +#include "IEEE_types.h" + +#define MIB_EDCA_MSDU_LIFETIME_DEFAULT 512 +#define WEP_KEY_USER_INPUT 13 /** Also defined in keyApiStaTypes.h */ + +/*-----------------------------------------*/ + +/* PHY Supported Transmit Data Rates Table */ + +/*-----------------------------------------*/ + +typedef struct MIB_PhySuppDataRatesTx_s { + UINT8 SuppDataRatesTxIdx; /* 1 to IEEEtypes_MAX_DATA_RATES_G */ + UINT8 SuppDataRatesTxVal; /* 2 to 127 */ +} MIB_PHY_SUPP_DATA_RATES_TX; + +/*------------------------*/ +/* WEP Default Keys Table */ +/*------------------------*/ +/* This struct is used in ROM and it should not be changed at all */ +typedef struct MIB_WepDefaultKeys_s { + UINT8 WepDefaultKeyIdx; /* 1 to 4 */ + UINT8 WepDefaultKeyType; /* */ + UINT8 WepDefaultKeyValue[WEP_KEY_USER_INPUT]; /* 5 byte string */ +} MIB_WEP_DEFAULT_KEYS; + +typedef struct { + /* Maximum lifetime of an MSDU from when it enters the MAC, 802.11e */ + UINT16 MSDULifetime; /* 0 to 500, 500 default */ +} MIB_EDCA_CONFIG; + +#endif /* _WL_MIB_ROM_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/wlpd.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/wlpd.h new file mode 100644 index 00000000..3aea2c2b --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/wlpd.h @@ -0,0 +1,163 @@ +/** @file wlpd.h + * + * @brief RX and TX packet descriptor + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef WLPD_H__ +#define WLPD_H__ + +/** include files **/ +#include "packetType.h" +#include "wltypes.h" + + /** @defgroup PacketTypes Tx Rx Data Packet Types + * Functions exported by wlpd.h + * @{ + */ + +/*****************************************************************************/ +typedef MLAN_PACK_START struct { + UINT8 tdlsPkt:1; + UINT8 rsvd:7; +} MLAN_PACK_END rxFlags_t; +/** +*** @brief Enumeration of action to be take for returned Rx Packets. +**/ + +/** +*** @brief Receive Packet Descriptor +**/ +typedef MLAN_PACK_START struct RxPD_t { + /* TODO: Port EMBEDDED_TCPIP and VISTA_802_11_DRIVER_INTERFACE members + to W8786 */ + UINT8 RxBSSType; + UINT8 RxBSSNum; + UINT16 RxPacketLength; // !< Rx Packet Length + SINT16 RxPacketOffset; // !< Offset to the Rx Data + UINT16 RxPacketType; + UINT16 SeqNum; + UINT8 userPriority; + UINT8 RxRate; // LG 0-3 (11b), 5-12(11g), HT :MCS# (11n) + SINT8 SNR; + SINT8 RxSQ2; // defined to RxNF + UINT8 RxHTInfo; // [Bit o] RxRate format : Legacy = 0 , HT =1 + // [Bit 1] HT Bandwidth :BW20 =0 , BW40 = 1 + // [Bit 2] HT Guard Interval : LGI = 0, SGI = 1 +#if defined(VISTA_802_11_DRIVER_INTERFACE) || defined(SNIFFER_MODE_ENABLE) + UINT8 PacketType; + UINT8 NumFragments; + UINT8 EncryptionStatus; +#else + UINT8 Reserved2[3]; +#endif + rxFlags_t flags; + UINT8 Reserved3; +} MLAN_PACK_END RxPD_t; + +#define PACKET_TYPE_802_3 0 +#define PACKET_TYPE_802_11 1 +#define PACKET_TYPE_802_11_QOS 2 +#define PACKET_TYPE_802_11_MRVL_MESH 3 +#define PACKET_TYPE_TDLS 4 + +#define MESH_FWD_PACKET_MASK (1 << 0) +#define MESH_OLPC_PKT_MASK (1 << 1) + +#define PACKET_DECRYPTED 0 +#define PACKET_NOT_DECRYPTED 1 + +#if defined(VISTA_802_11_DRIVER_INTERFACE) + +#define PACKET_NO_DECRYPT_NEEDED 2 +#define MAGIC_PACKET_MARKER_BITMASK (1<<3) +#define COALESCED_PACKET_MARKER_BITMASK (1<<2) + +#endif + +#define RxNF RxSQ2 + +// Since Small Debug print and Myung's Debug Facility both use +// PKT_TYPE_DEBUG rx pkt, the following debug header is required to distinguish +// Small Debug from Myung's. +// +typedef MLAN_PACK_START struct { + UINT8 dbg_type; + UINT8 reserve[3]; +} MLAN_PACK_END to_host_dbg_hdr_t; +#define DBG_TYPE_SMALL 2 + +/* The following fields have been added for Null frame handling + in Power Save Mode. + */ +typedef MLAN_PACK_START struct { + UINT8 nullPkt:1; + UINT8 overRideFwPM:1; + UINT8 pmVal:1; + UINT8 lastTxPkt:1; + UINT8 tdlsPkt:1; + UINT8 rsvd:3; +} MLAN_PACK_END wcb_flags_t; + +/** +*** @brief Transmit Packet Descriptor +**/ +typedef MLAN_PACK_START struct { + /* TODO: Port EMBEDDED_TCPIP and VISTA_802_11_DRIVER_INTERFACE members + to W8786 */ + UINT8 TxBSSType; + UINT8 TxBSSNum; + UINT16 TxPacketLength; // !< Tx Packet Length + UINT16 TxPacketOffset; // !< Offset to Tx Data + UINT16 TxPacketType; // !< Tx Packet Type + UINT32 TxControl; // b3-0: RateID; b4:HostRateCtrl; + // b11-8: RetryLimit; b12:HostRetryCtrl; + // b14-13: Ack Policy, 10 ACK_IMMD + // 11 NO_ACK 0x ACK_PER_FRM + UINT8 userPriority; + wcb_flags_t flags; // These BitFields are for Null Frame Handling + // and + // other Power Save requirements. + UINT8 PktDelay_2ms; /* Driver queue delay used in stats and MSDU ** + lifetime expiry calcs; value is represented + ** by 2ms units (ms bit shifted by 1) */ +#ifdef VISTA_802_11_DRIVER_INTERFACE + /* Include Packet type for NWF */ + UINT8 PacketType; + UINT8 EncrOpt; +#else + UINT8 Reserved[2]; +#endif + UINT8 TxTokenId; + +} MLAN_PACK_END wcb_t; + +// Encryption Option is an 8 bit field +#define ENCR_OPT_NORMAL 0x00 // Normal packet. Follows Enc rules in + // FW +#define ENCR_OPT_FORCE_PTEXT 0x01 // Force plain text. No encryption. +#define ENCR_OPT_FW_KEY_MAP 0x02 // Encrypt using key mapping table in + // FW +#define ENCR_OPT_PTEXT_80211_PKT 0x03 // No encryption for 802.11 pkt + +/*@}*/ + +#endif /* _WLPD_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/wltypes.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/wltypes.h new file mode 100644 index 00000000..fd8f3b7e --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/common/wltypes.h @@ -0,0 +1,574 @@ +/** @file wltypes.h + * + * @brief Basic types common to all the modules must be defined in this file. + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#if !defined(WLTYPES_H__) +#define WLTYPES_H__ +/* +* Copyright 2003, Marvell Semiconductor, Inc. +* This code contains confidential information of Marvell Semiconductor, Inc. +* No rights are granted herein under any patent, mask work right or copyright +* of Marvell or any third party. +* Marvell reserves the right at its sole discretion to request that this code +* be immediately returned to Marvell. This code is provided "as is". +* Marvell makes no warranties, express, implied or otherwise, regarding its +* accuracy, completeness or performance. +*/ + +/*! + * \file wltypes.h + * \brief Basic types common to all the modules must be defined in this file. + * +*/ + /** @defgroup DataTypes Data Types used in SDK + * Functions exported by wltypes.h + * @{ + */ +/*! Create type names for native C types for portability reasons */ +typedef unsigned long long UINT64; // !< 64 bit unsigned +typedef signed long long SINT64; // !< 64 bit signed +typedef unsigned int UINT32; // !< 32 bit unsigned +typedef signed int SINT32; // !< 32 bit signed +typedef unsigned short UINT16; // !< 16 bit unsigned +typedef signed short SINT16; // !< 16 bit signed +typedef unsigned char UINT8; // !< 8 bit unsigned +typedef signed char SINT8; // !< 8 bit signed + +typedef unsigned long long uint64; // !< 64 bit unsigned +typedef signed long long sint64; // !< 64 bit signed +typedef unsigned int uint32; // !< 32 bit unsigned + +typedef signed int sint32; // !< 32 bit signed +typedef unsigned short uint16; // !< 16 bit unsigned +typedef signed short sint16; // !< 16 bit signed +typedef unsigned char uint8; // !< 8 bit unsigned +typedef signed char sint8; // !< 8 bit signed +typedef signed char int8; // !< 8 bit signed +typedef int BOOLEAN; // !< boolean +typedef int Boolean; // !< boolean +typedef signed int BIT_FIELD; // !< bit field + +typedef unsigned int UINT; // !< unsigned integer + +//From dwc_os.h +#define size_t uint32 + +extern SINT8 SINT8_minus_SINT8(SINT8 x, SINT8 y); +extern SINT8 SINT8_plus_SINT8(SINT8 x, SINT8 y); + +#ifdef __GNUC__ +/** Structure packing begins */ +#define MLAN_PACK_START +/** Structure packeing end */ +#define MLAN_PACK_END __attribute__((packed)) +#else /* !__GNUC__ */ +#ifdef PRAGMA_PACK +/** Structure packing begins */ +#define MLAN_PACK_START +/** Structure packeing end */ +#define MLAN_PACK_END +#else /* !PRAGMA_PACK */ +/** Structure packing begins */ +#define MLAN_PACK_START __packed +/** Structure packing end */ +#define MLAN_PACK_END +#endif /* PRAGMA_PACK */ +#endif /* __GNUC__ */ + +#ifndef INLINE +#ifdef __GNUC__ +/** inline directive */ +#define INLINE inline +#else +/** inline directive */ +#define INLINE __inline +#endif +#endif + +typedef struct _REFCLK_VAL8_REG7F { + UINT8 refClk; + UINT8 val; +} REFCLK_VAL8_REG7F; + +#define REG8_TERMINATOR (0xFF) +typedef struct _ADDR8_VAL8_REG { + UINT8 reg; + UINT8 val; +} ADDR8_VAL8_REG; + +#define REG16_TERMINATOR (0xFFFF) +typedef struct _ADDR16_VAL8_REG { + UINT16 reg; + UINT8 val; +} ADDR16_VAL8_REG; + +#define REG32_TERMINATOR (0xFFFFFFFF) +typedef struct _ADDR32_VAL32_REG { + UINT32 reg; + UINT32 val; +} ADDR32_VAL32_REG; + +#if defined(BBP_9BIT_ADDR) +#define BBP_TERMINATOR REG16_TERMINATOR +#else +#define BBP_TERMINATOR REG8_TERMINATOR +#endif + +/*! Generic status code */ +#define WL_STATUS_OK 0 // !< ok +#define WL_STATUS_ERR -1 // !< error +#define WL_STATUS_BAD_PARAM -2 // !< bad parameter + +/* Some BT files require access to wltypes.h file which result in duplicate definition of FALSE & TRUE + * undef TRUE and FALSE to avoid these warnings */ +#undef FALSE +#undef TRUE +#undef INLINE + +/*! BOOLEAN values */ +#define FALSE 0 // !< False +#define TRUE 1 // !< True + +/** +*** @brief Enumeration of Status type +**/ +typedef enum { + SUCCESS, // !< 0 + FAIL // !< 1 +} Status_e; + +typedef Status_e WL_STATUS; + +/*! Value for NULL pointer */ +#undef NULL +#define NULL ((void *)0) // !< null +#if 0 +#ifndef LINT +#define MLAN_PACK_START __packed // !< packed structure +#define MLAN_PACK_END // !< end of packed structure + +#define ALIGNED_START(x) __align(x) // !< allignment macro +#define ALIGNED_END(x) // !< allignment end +#else +#define MLAN_PACK_START +#define MLAN_PACK_END + +#define ALIGNED_START(x) +#define ALIGNED_END(x) +#endif +#endif +#define INLINE + +#define BIT0 (0x00000001 << 0) +#define BIT1 (0x00000001 << 1) +#define BIT2 (0x00000001 << 2) +#define BIT3 (0x00000001 << 3) +#define BIT4 (0x00000001 << 4) +#define BIT5 (0x00000001 << 5) +#define BIT6 (0x00000001 << 6) +#define BIT7 (0x00000001 << 7) +#define BIT8 (0x00000001 << 8) +#define BIT9 (0x00000001 << 9) +#define BIT10 (0x00000001 << 10) +#define BIT11 (0x00000001 << 11) +#define BIT12 (0x00000001 << 12) +#define BIT13 (0x00000001 << 13) +#define BIT14 (0x00000001 << 14) +#define BIT15 (0x00000001 << 15) +#define BIT16 (0x00000001 << 16) +#define BIT17 (0x00000001 << 17) +#define BIT18 (0x00000001 << 18) +#define BIT19 (0x00000001 << 19) +#define BIT20 (0x00000001 << 20) +#define BIT21 (0x00000001 << 21) +#define BIT22 (0x00000001 << 22) +#define BIT23 (0x00000001 << 23) +#define BIT24 (0x00000001 << 24) +#define BIT25 (0x00000001 << 25) +#define BIT26 (0x00000001 << 26) +#define BIT27 (0x00000001 << 27) +#define BIT28 (0x00000001 << 28) +#define BIT29 (0x00000001 << 29) +#define BIT30 (0x00000001 << 30) +#define BIT31 (0x00000001UL << 31) + +// VOLT_RESOLUTION_50mV +#define VOLT_0_5 10 // 10x50mV = 5x100mV +#define VOLT_0_6 12 // 12x50mV = 6x100mV +#define VOLT_0_7 14 // 14x50mV = 7x100mV +#define VOLT_0_7_5 15 // 15x50mV = 7.5x100mV +#define VOLT_0_8 16 // 16x50mV = 8x100mV +#define VOLT_0_8_5 17 // 17x50mV = 8.5x100mV +#define VOLT_0_9 18 // 18x50mV = 9x100mV +#define VOLT_1_0 20 // 20x50mV = 10x100mV +#define VOLT_1_0_5 21 // 21x50mV +#define VOLT_1_1 22 // 22x50mV = 11x100mV +#define VOLT_1_1_5 23 // 23x50mV +#define VOLT_1_2 24 // 24x50mV = 12x100mV +#define VOLT_1_2_5 25 // 25x50mV +#define VOLT_1_3 26 // 26x50mV = 13x100mV +#define VOLT_1_4 28 // 28x50mV = 14x100mV +#define VOLT_1_5 30 // 30x50mV = 15x100mV +#define VOLT_1_5_5 31 // 31x50mV = 15.5x100mV +#define VOLT_1_6 32 // 32x50mV = 16x100mV +#define VOLT_1_6_5 33 // 33x50mV = 16.5x100mV +#define VOLT_1_7 34 // 34x50mV = 17x100mV +#define VOLT_1_7_5 35 // 35x50mV = 17.5x100mV +#define VOLT_1_8 36 // 36x50mV = 18x100mV +#define VOLT_1_8_5 37 // 37x50mV = 18.5x100mV +#define VOLT_1_9 38 // 38x50mV = 19x100mV +#define VOLT_1_9_5 39 // 39x50mV = 19.5x100mV +#define VOLT_2_0 40 // 40x50mV = 20x100mV +#define VOLT_2_1 42 // 42x50mV = 21x100mV +#define VOLT_2_2 44 // 44x50mV = 22x100mV +#define VOLT_2_3 46 // 46x50mV = 23x100mV +#define VOLT_2_4 48 // 48x50mV = 24x100mV +#define VOLT_2_5 50 // 50x50mV = 25x100mV +#define VOLT_2_6 52 // 52x50mV = 26x100mV +#define VOLT_2_7 54 // 54x50mV = 27x100mV +#define VOLT_2_8 56 // 56x50mV = 28x100mV +#define VOLT_2_9 58 // 58x50mV = 29x100mV +#define VOLT_3_0 60 // 60x50mV = 30x100mV +#define VOLT_3_1 62 // 62x50mV = 31x100mV +#define VOLT_3_2 64 // 64x50mV = 32x100mV +#define VOLT_3_3 66 // 66x50mV = 33x100mV +#define VOLT_3_4 68 // 68x50mV = 34x100mV +#define VOLT_3_5 70 // 70x50mV = 35x100mV +#define VOLT_3_6 72 // 72x50mV = 36x100mV + +typedef enum { + OFF = 0, + ON = 1, + UNKOWN = 0xFF +} ON_OFF_UNKOWN_e; + +typedef unsigned char MRVL_RATEID; + +#if defined(DOT11AC) && defined(STREAM_2x2) +typedef unsigned long long MRVL_RATEID_BITMAP_UNIT; +typedef struct { + unsigned long long bitmap[2]; +} MRVL_RATEID_BITMAP; +#define MRVL_RATEID_BIT(rateId) (1ULL << (rateId)) +#else +#if defined(STREAM_2x2) || defined(DOT11AC) +typedef unsigned long long MRVL_RATEID_BITMAP_UNIT; +typedef unsigned long long MRVL_RATEID_BITMAP; +#define MRVL_RATEID_BIT(rateId) (1ULL << (rateId)) +#else +typedef unsigned int MRVL_RATEID_BITMAP_UNIT; +typedef unsigned int MRVL_RATEID_BITMAP; +#define MRVL_RATEID_BIT(rateId) (1UL << (rateId)) +#endif +#endif + +#define NUM_RATE_BITMAP_UNIT (sizeof(MRVL_RATEID_BITMAP_UNIT)*8) + +enum { + RATEID_DBPSK1Mbps, // (0) + RATEID_DQPSK2Mbps, // (1) + RATEID_CCK5_5Mbps, // (2) + RATEID_CCK11Mbps, // (3) + RATEID_CCK22Mbps, // (4) + RATEID_OFDM6Mbps, // (5) + RATEID_OFDM9Mbps, // (6) + RATEID_OFDM12Mbps, // (7) + RATEID_OFDM18Mbps, // (8) + RATEID_OFDM24Mbps, // (9) + RATEID_OFDM36Mbps, // (10) + RATEID_OFDM48Mbps, // (11) + RATEID_OFDM54Mbps, // (12) + RATEID_OFDM72Mbps, // (13) + + RATEID_MCS0_6d5Mbps, // (14) //RATEID_OFDM72Mbps + 1 + RATEID_MCS1_13Mbps, // (15) + RATEID_MCS2_19d5Mbps, // (16) + RATEID_MCS3_26Mbps, // (17) + RATEID_MCS4_39Mbps, // (18) + RATEID_MCS5_52Mbps, // (19) + RATEID_MCS6_58d5Mbps, // (20) + RATEID_MCS7_65Mbps, // (21) + +#ifdef STREAM_2x2 + RATEID_MCS8_13Mbps, // (22) + RATEID_MCS9_26Mbps, // (23) + RATEID_MCS10_39Mbps, // (24) + RATEID_MCS11_52Mbps, // (25) + RATEID_MCS12_78Mbps, // (26) + RATEID_MCS13_104Mbps, // (27) + RATEID_MCS14_117Mbps, // (28) + RATEID_MCS15_130Mbps, // (29) +#endif + + RATEID_MCS32BW40_6Mbps, // (30), (22) + RATEID_MCS0BW40_13d5Mbps, // (31), (23) + RATEID_MCS1BW40_27Mbps, // (32), (24) + RATEID_MCS2BW40_40d5Mbps, // (33), (25) + RATEID_MCS3BW40_54Mbps, // (34), (26) + RATEID_MCS4BW40_81Mbps, // (35), (27) + RATEID_MCS5BW40_108Mbps, // (36), (28) + RATEID_MCS6BW40_121d5Mbps, // (37), (29) + RATEID_MCS7BW40_135Mbps, // (38), (30) + +#ifdef STREAM_2x2 + RATEID_MCS8BW40_27Mbps, // (39) + RATEID_MCS9BW40_54Mbps, // (40) + RATEID_MCS10BW40_81Mbps, // (41) + RATEID_MCS11BW40_108Mbps, // (42) + RATEID_MCS12BW40_162Mbps, // (43) + RATEID_MCS13BW40_216Mbps, // (44) + RATEID_MCS14BW40_243Mbps, // (45) + RATEID_MCS15BW40_270Mbps, // (46) +#endif + +#if defined(DOT11AC) + RATEID_VHT_MCS0_1SS_BW20, // (47), (31) //6.5 Mbps + RATEID_VHT_MCS1_1SS_BW20, // (48), (32) //13 Mbps + RATEID_VHT_MCS2_1SS_BW20, // (49), (33) //19.5 Mbps + RATEID_VHT_MCS3_1SS_BW20, // (50), (34) //26 Mbps + RATEID_VHT_MCS4_1SS_BW20, // (51), (35) //39 Mbps + RATEID_VHT_MCS5_1SS_BW20, // (52), (36) //52 Mbps + RATEID_VHT_MCS6_1SS_BW20, // (53), (37) //58.5 Mbps + RATEID_VHT_MCS7_1SS_BW20, // (54), (38) //65 Mbps + RATEID_VHT_MCS8_1SS_BW20, // (55), (39) //78 Mbps + RATEID_VHT_MCS9_1SS_BW20, // (56), (40) //86.7 Mbps(INVALID) + +#ifdef STREAM_2x2 + RATEID_VHT_MCS0_2SS_BW20, // (57) //13 Mbps + RATEID_VHT_MCS1_2SS_BW20, // (58) //26 Mbps + RATEID_VHT_MCS2_2SS_BW20, // (59) //39 Mbps + RATEID_VHT_MCS3_2SS_BW20, // (60) //52 Mbps + RATEID_VHT_MCS4_2SS_BW20, // (61) //78 Mbps + RATEID_VHT_MCS5_2SS_BW20, // (62) //104 Mbps + RATEID_VHT_MCS6_2SS_BW20, // (63) //117 Mbps + RATEID_VHT_MCS7_2SS_BW20, // (64) //130 Mbps + RATEID_VHT_MCS8_2SS_BW20, // (65) //156 Mbps + RATEID_VHT_MCS9_2SS_BW20, // (66) //173.3 Mbps(INVALID) +#endif + + RATEID_VHT_MCS0_1SS_BW40, // (67), (41) //13.5 Mbps + RATEID_VHT_MCS1_1SS_BW40, // (68), (42) //27 Mbps + RATEID_VHT_MCS2_1SS_BW40, // (69), (43) //40.5 Mbps + RATEID_VHT_MCS3_1SS_BW40, // (70), (44) //54 Mbps + RATEID_VHT_MCS4_1SS_BW40, // (71), (45) //81 Mbps + RATEID_VHT_MCS5_1SS_BW40, // (72), (46) //108 Mbps + RATEID_VHT_MCS6_1SS_BW40, // (73), (47) //121.5 Mbps + RATEID_VHT_MCS7_1SS_BW40, // (74), (48) //135 Mbps + RATEID_VHT_MCS8_1SS_BW40, // (75), (49) //162 Mbps + RATEID_VHT_MCS9_1SS_BW40, // (76), (50) //180 Mbps + +#ifdef STREAM_2x2 + RATEID_VHT_MCS0_2SS_BW40, // (77) //27 Mbps + RATEID_VHT_MCS1_2SS_BW40, // (78) //54 Mbps + RATEID_VHT_MCS2_2SS_BW40, // (79) //81 Mbps + RATEID_VHT_MCS3_2SS_BW40, // (80) //108 Mbps + RATEID_VHT_MCS4_2SS_BW40, // (81) //162 Mbps + RATEID_VHT_MCS5_2SS_BW40, // (82) //216 Mbps + RATEID_VHT_MCS6_2SS_BW40, // (83) //243 Mbps + RATEID_VHT_MCS7_2SS_BW40, // (84) //270 Mbps + RATEID_VHT_MCS8_2SS_BW40, // (85) //324 Mbps + RATEID_VHT_MCS9_2SS_BW40, // (86) //360 Mbps +#endif + + RATEID_VHT_MCS0_1SS_BW80, // (87), (51) //29.3 Mbps + RATEID_VHT_MCS1_1SS_BW80, // (88), (52) //58.5 Mbps + RATEID_VHT_MCS2_1SS_BW80, // (89), (53) //87.8 Mbps + RATEID_VHT_MCS3_1SS_BW80, // (90), (54) //117 Mbps + RATEID_VHT_MCS4_1SS_BW80, // (91), (55) //175.5 Mbps + RATEID_VHT_MCS5_1SS_BW80, // (92), (56) //234 Mbps + RATEID_VHT_MCS6_1SS_BW80, // (93), (57) //263.3 Mbps + RATEID_VHT_MCS7_1SS_BW80, // (94), (58) //292.5 Mbps + RATEID_VHT_MCS8_1SS_BW80, // (95), (59) //351 Mbps + RATEID_VHT_MCS9_1SS_BW80, // (96), (60) //390 Mbps + +#ifdef STREAM_2x2 + RATEID_VHT_MCS0_2SS_BW80, // (97) //58.5 Mbps + RATEID_VHT_MCS1_2SS_BW80, // (98) //117 Mbps + RATEID_VHT_MCS2_2SS_BW80, // (99) //175 Mbps + RATEID_VHT_MCS3_2SS_BW80, // (100) //234 Mbps + RATEID_VHT_MCS4_2SS_BW80, // (101) //351 Mbps + RATEID_VHT_MCS5_2SS_BW80, // (102) //468 Mbps + RATEID_VHT_MCS6_2SS_BW80, // (103) //526.5 Mbps + RATEID_VHT_MCS7_2SS_BW80, // (104) //585 Mbps + RATEID_VHT_MCS8_2SS_BW80, // (105) //702 Mbps + RATEID_VHT_MCS9_2SS_BW80, // (106) //780 Mbps +#endif +#endif // DOT11AC + + RATEID_AUTO = 0xFE, + RATEID_UNKNOWN = 0xFF +}; + +//MAX RATE DEFINITION +#define RATEID_DSSSMAX RATEID_DQPSK2Mbps + +#define RATEID_CCKMAX RATEID_CCK11Mbps + +#define RATEID_OFDMMAX RATEID_OFDM54Mbps +#define RATEID_OFDMMIN RATEID_OFDM6Mbps + +#define RATEID_HTBW20MIN RATEID_MCS0_6d5Mbps +#ifdef STREAM_2x2 +#define RATEID_HTBW20MAX RATEID_MCS15_130Mbps +#else +#define RATEID_HTBW20MAX RATEID_MCS7_65Mbps +#endif + +#define RATEID_HTBW40MIN RATEID_MCS32BW40_6Mbps +#ifdef STREAM_2x2 +#define RATEID_HTBW40MAX RATEID_MCS15BW40_270Mbps +#else +#define RATEID_HTBW40MAX RATEID_MCS7BW40_135Mbps +#endif + +#define RATEID_HTMIN RATEID_HTBW20MIN +#define RATEID_HTMAX RATEID_HTBW40MAX + +#if defined(DOT11AC) +#define RATEID_VHTBW20MIN RATEID_VHT_MCS0_1SS_BW20 +#define RATEID_VHTBW40MIN RATEID_VHT_MCS0_1SS_BW40 +#define RATEID_VHTBW80MIN RATEID_VHT_MCS0_1SS_BW80 + +#define RATEID_VHTMIN RATEID_VHT_MCS0_1SS_BW20 +#ifdef STREAM_2x2 +#define RATEID_VHTBW20MAX RATEID_VHT_MCS9_2SS_BW20 +#define RATEID_VHTBW40MAX RATEID_VHT_MCS9_2SS_BW40 +#define RATEID_VHTMAX RATEID_VHT_MCS9_2SS_BW80 +#else +#define RATEID_VHTBW20MAX RATEID_VHT_MCS9_1SS_BW20 +#define RATEID_VHTBW40MAX RATEID_VHT_MCS9_1SS_BW40 +#define RATEID_VHTMAX RATEID_VHT_MCS9_1SS_BW80 +#endif +#define RATEID_VHTBW80MAX RATEID_VHTMAX + +/* 160 is not supported yet; define them correctly when supported */ +#define RATEID_VHTBW160MIN 0xFF +#define RATEID_VHTBW160MAX 0xFF + +#endif // DOT11AC + +#define MLME_SUCCESS 0 +#define MLME_INPROCESS 1 +#define MLME_FAILURE -1 + +#define RATEID_9_6_MASK (((1<<(1+RATEID_OFDM9Mbps-RATEID_OFDM6Mbps))-1) \ + << RATEID_OFDM6Mbps) + +#define RATEID_12_6_MASK (((1<<(1+RATEID_OFDM12Mbps-RATEID_OFDM6Mbps))-1) \ + << RATEID_OFDM6Mbps) + +#define RATEID_18_6_MASK (((1<<(1+RATEID_OFDM18Mbps-RATEID_OFDM6Mbps))-1) \ + << RATEID_OFDM6Mbps) + +#define RATEID_24_6_MASK (((1<<(1+RATEID_OFDM24Mbps-RATEID_OFDM6Mbps))-1) \ + << RATEID_OFDM6Mbps) + +#define RATEID_36_6_MASK (((1<<(1+RATEID_OFDM36Mbps-RATEID_OFDM6Mbps))-1) \ + << RATEID_OFDM6Mbps) + +#define RATEID_48_6_MASK (((1<<(1+RATEID_OFDM48Mbps-RATEID_OFDM6Mbps))-1) \ + << RATEID_OFDM6Mbps) + +#define RATEID_54_6_MASK (((1<<(1+RATEID_OFDM54Mbps-RATEID_OFDM6Mbps))-1) \ + << RATEID_OFDM6Mbps) + +#define RATEID_CCK_MASK ( (1 << RATEID_DBPSK1Mbps) \ + | (1 << RATEID_DQPSK2Mbps) \ + | (1 << RATEID_CCK5_5Mbps) \ + | (1 << RATEID_CCK11Mbps) ) + +#define HT_RATE_MASK_MCS0_7 ( (1ULL << RATEID_MCS0_6d5Mbps) \ + | (1ULL << RATEID_MCS1_13Mbps) \ + | (1ULL << RATEID_MCS2_19d5Mbps) \ + | (1ULL << RATEID_MCS3_26Mbps) \ + | (1ULL << RATEID_MCS4_39Mbps) \ + | (1ULL << RATEID_MCS5_52Mbps) \ + | (1ULL << RATEID_MCS6_58d5Mbps) \ + | (1ULL << RATEID_MCS7_65Mbps) ) +#ifdef STREAM_2x2 +#define HT_RATE_MASK_MCS8_15 ( (1ULL << RATEID_MCS8_13Mbps) \ + | (1ULL << RATEID_MCS9_26Mbps) \ + | (1ULL << RATEID_MCS10_39Mbps) \ + | (1ULL << RATEID_MCS11_52Mbps) \ + | (1ULL << RATEID_MCS12_78Mbps) \ + | (1ULL << RATEID_MCS13_104Mbps) \ + | (1ULL << RATEID_MCS14_117Mbps) \ + | (1ULL << RATEID_MCS15_130Mbps) ) + +#else // 1x1 +#define HT_RATE_MASK_MCS8_15 (0) +#endif + +#define HT_RATE_MASK_MCS0_7_32_40MHZ ( (1ULL << RATEID_MCS32BW40_6Mbps) \ + | (1ULL << RATEID_MCS0BW40_13d5Mbps) \ + | (1ULL << RATEID_MCS1BW40_27Mbps) \ + | (1ULL << RATEID_MCS2BW40_40d5Mbps) \ + | (1ULL << RATEID_MCS3BW40_54Mbps) \ + | (1ULL << RATEID_MCS4BW40_81Mbps) \ + | (1ULL << RATEID_MCS5BW40_108Mbps) \ + | (1ULL << RATEID_MCS6BW40_121d5Mbps) \ + | (1ULL << RATEID_MCS7BW40_135Mbps) ) + +#ifdef STREAM_2x2 +#define HT_RATE_MASK_MCS8_15_40MHZ ( (1ULL << RATEID_MCS8BW40_27Mbps) \ + | (1ULL << RATEID_MCS9BW40_54Mbps) \ + | (1ULL << RATEID_MCS10BW40_81Mbps) \ + | (1ULL << RATEID_MCS11BW40_108Mbps) \ + | (1ULL << RATEID_MCS12BW40_162Mbps) \ + | (1ULL << RATEID_MCS13BW40_216Mbps) \ + | (1ULL << RATEID_MCS14BW40_243Mbps) \ + | (1ULL << RATEID_MCS15BW40_270Mbps) ) + +#else // 1x1 +#define HT_RATE_MASK_MCS8_15_40MHZ (0) +#endif + +#define RATEID_MCS_MASK ( HT_RATE_MASK_MCS0_7 \ + | HT_RATE_MASK_MCS8_15 \ + | HT_RATE_MASK_MCS0_7_32_40MHZ \ + | HT_RATE_MASK_MCS8_15_40MHZ ) + +#define RATEID_MCSBW40_MASK ( HT_RATE_MASK_MCS0_7_32_40MHZ \ + | HT_RATE_MASK_MCS8_15_40MHZ ) + +#define RATEID_MCS1x1_MASK ( HT_RATE_MASK_MCS0_7 \ + | HT_RATE_MASK_MCS0_7_32_40MHZ) + +#define RATEID_MCS2x2_MASK ( HT_RATE_MASK_MCS8_15 \ + | HT_RATE_MASK_MCS8_15_40MHZ ) + +#define IS_DSSS_FRAME(rateid) (rateid < RATEID_OFDM6Mbps) +#define IS_OFDM_FRAME(rateid) (rateid >= RATEID_OFDM6Mbps) + +typedef unsigned char MRVL_TRPCID; +typedef signed long PWR_in_dBm; + +#if 0 +#define ASSERT_RATEID(rateid) {while(rateid > RATEID_MAX);} +#define ASSERT_NonZero(x) {while(x == 0);} +#else +#define ASSERT_RATEID(rateid) +#define ASSERT_NonZero(x) +#endif + +#endif /* _WLTYPES_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/hostsa_def.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/hostsa_def.h new file mode 100644 index 00000000..8ec8a48c --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/hostsa_def.h @@ -0,0 +1,136 @@ +/** @file hostsa_def.h + * + * @brief This file contains data structrue for authenticator/supplicant. + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _HOSTSA_DEF_H +#define _HOSTSA_DEF_H +/* subset of mlan_callbacks data structure */ +/** hostsa_util_fns data structure */ +typedef struct _hostsa_util_fns { + /** pmoal_handle */ + t_void *pmoal_handle; + /** moal_malloc */ + mlan_status (*moal_malloc) (IN t_void *pmoal_handle, + IN t_u32 size, + IN t_u32 flag, OUT t_u8 **ppbuf); + /** moal_mfree */ + mlan_status (*moal_mfree) (IN t_void *pmoal_handle, IN t_u8 *pbuf); + /** moal_memset */ + t_void *(*moal_memset) (IN t_void *pmoal_handle, + IN t_void *pmem, IN t_u8 byte, IN t_u32 num); + /** moal_memcpy */ + t_void *(*moal_memcpy) (IN t_void *pmoal_handle, + IN t_void *pdest, + IN const t_void *psrc, IN t_u32 num); + /** moal_memmove */ + t_void *(*moal_memmove) (IN t_void *pmoal_handle, + IN t_void *pdest, + IN const t_void *psrc, IN t_u32 num); + /** moal_memcmp */ + t_s32 (*moal_memcmp) (IN t_void *pmoal_handle, + IN const t_void *pmem1, + IN const t_void *pmem2, IN t_u32 num); + /** moal_udelay */ + t_void (*moal_udelay) (IN t_void *pmoal_handle, IN t_u32 udelay); + /** moal_get_system_time */ + mlan_status (*moal_get_system_time) (IN t_void *pmoal_handle, + OUT t_u32 *psec, OUT t_u32 *pusec); + /** moal_init_timer*/ + mlan_status (*moal_init_timer) (IN t_void *pmoal_handle, + OUT t_void **pptimer, + IN t_void (*callback) (t_void + *pcontext), + IN t_void *pcontext); + /** moal_free_timer */ + mlan_status (*moal_free_timer) (IN t_void *pmoal_handle, + IN t_void *ptimer); + /** moal_start_timer*/ + mlan_status (*moal_start_timer) (IN t_void *pmoal_handle, + IN t_void *ptimer, + IN t_u8 periodic, IN t_u32 msec); + /** moal_stop_timer*/ + mlan_status (*moal_stop_timer) (IN t_void *pmoal_handle, + IN t_void *ptimer); + /** moal_init_lock */ + mlan_status (*moal_init_lock) (IN t_void *pmoal_handle, + OUT t_void **pplock); + /** moal_free_lock */ + mlan_status (*moal_free_lock) (IN t_void *pmoal_handle, + IN t_void *plock); + /** moal_spin_lock */ + mlan_status (*moal_spin_lock) (IN t_void *pmoal_handle, + IN t_void *plock); + /** moal_spin_unlock */ + mlan_status (*moal_spin_unlock) (IN t_void *pmoal_handle, + IN t_void *plock); + /** moal_print */ + t_void (*moal_print) (IN t_void *pmoal_handle, + IN t_u32 level, IN char *pformat, IN ... + ); + /** moal_print_netintf */ + t_void (*moal_print_netintf) (IN t_void *pmoal_handle, + IN t_u32 bss_index, IN t_u32 level); +} hostsa_util_fns, *phostsa_util_fns; +/* Required functions from mlan */ +/** hostsa_mlan_fns data structure */ +typedef struct _hostsa_mlan_fns { + /** pmlan_private */ + t_void *pmlan_private; + /** pmlan_adapter */ + t_void *pmlan_adapter; + /** BSS index */ + t_u8 bss_index; + /** BSS type */ + t_u8 bss_type; + + pmlan_buffer (*hostsa_alloc_mlan_buffer) (t_void *pmlan_adapter, + t_u32 data_len, + t_u32 head_room, + t_u32 malloc_flag); + void (*hostsa_tx_packet) (t_void *pmlan_private, + pmlan_buffer pmbuf, t_u16 frameLen); + void (*hostsa_set_encrypt_key) (t_void *pmlan_private, + mlan_ds_encrypt_key *encrypt_key); + void (*hostsa_clr_encrypt_key) (t_void *pmlan_private); + void (*hostsa_SendDeauth) (t_void *pmlan_private, + t_u8 *addr, t_u16 reason); + void (*Hostsa_DisAssocAllSta) (void *pmlan_private, t_u16 reason); + void (*hostsa_free_mlan_buffer) (t_void *pmlan_adapter, + mlan_buffer *pmbuf); + void (*Hostsa_get_station_entry) (t_void *pmlan_private, + t_u8 *mac, t_void **ppconPtr); + void (*Hostsa_set_mgmt_ie) (t_void *pmlan_private, + t_u8 *pbuf, t_u16 len, t_u8 clearIE); + void (*Hostsa_find_connection) (t_void *pmlan_private, + t_void **ppconPtr, t_void **ppsta_node); + void (*Hostsa_find_next_connection) (t_void *pmlan_private, + t_void **ppconPtr, + t_void **ppsta_node); + t_void (*Hostsa_StaControlledPortOpen) (t_void *pmlan_private); + void (*hostsa_StaSendDeauth) (t_void *pmlan_private, + t_u8 *addr, t_u16 reason); + t_u8 (*Hostsa_get_bss_role) (t_void *pmlan_private); + t_void (*Hostsa_sendEventRsnConnect) (t_void *pmlan_private, + t_u8 *addr); +} hostsa_mlan_fns, *phostsa_mlan_fns; +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/hostsa_ext_def.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/hostsa_ext_def.h new file mode 100644 index 00000000..294151a4 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/hostsa_ext_def.h @@ -0,0 +1,1086 @@ +/** @file hostsa_ext_def.h + * + * @brief This file declares the generic data structures and APIs. + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: initial version +******************************************************/ + +#ifndef _HOSTSA_EXT_DEF_H_ +#define _HOSTSA_EXT_DEF_H_ + +/* #################### + From mlan_decl.h + #################### */ + +/** Re-define generic data types for MLAN/MOAL */ +/** Signed char (1-byte) */ +typedef signed char t_s8; +/** Unsigned char (1-byte) */ +typedef unsigned char t_u8; +/** Signed short (2-bytes) */ +typedef short t_s16; +/** Unsigned short (2-bytes) */ +typedef unsigned short t_u16; +/** Signed long (4-bytes) */ +typedef int t_s32; +/** Unsigned long (4-bytes) */ +typedef unsigned int t_u32; +/** Signed long long 8-bytes) */ +typedef long long t_s64; +/** Unsigned long long 8-bytes) */ +typedef unsigned long long t_u64; +/** Void pointer (4-bytes) */ +typedef void t_void; +/** Size type */ +typedef t_u32 t_size; +/** Boolean type */ +typedef t_u8 t_bool; + +#ifdef MLAN_64BIT +/** Pointer type (64-bit) */ +typedef t_u64 t_ptr; +/** Signed value (64-bit) */ +typedef t_s64 t_sval; +#else +/** Pointer type (32-bit) */ +typedef t_u32 t_ptr; +/** Signed value (32-bit) */ +typedef t_s32 t_sval; +#endif + +/** MLAN MNULL pointer */ +#define MNULL (0) + +/** MLAN TRUE */ +#define MTRUE (1) +/** MLAN FALSE */ +#define MFALSE (0) + +/** MLAN MAC Address Length */ +#define MLAN_MAC_ADDR_LENGTH (6) + +/** MLAN_MEM_DEF */ +#define MLAN_MEM_DEF (0) + +/** MLAN BSS type */ +typedef enum _mlan_bss_type { + MLAN_BSS_TYPE_STA = 0, + MLAN_BSS_TYPE_UAP = 1, +#ifdef WIFI_DIRECT_SUPPORT + MLAN_BSS_TYPE_WIFIDIRECT = 2, +#endif + MLAN_BSS_TYPE_ANY = 0xff, +} mlan_bss_type; + +/** MLAN BSS role */ +typedef enum _mlan_bss_role { + MLAN_BSS_ROLE_STA = 0, + MLAN_BSS_ROLE_UAP = 1, + MLAN_BSS_ROLE_ANY = 0xff, +} mlan_bss_role; + +/** mlan_status */ +typedef enum _mlan_status { + MLAN_STATUS_FAILURE = 0xffffffff, + MLAN_STATUS_SUCCESS = 0, + MLAN_STATUS_PENDING, + MLAN_STATUS_RESOURCE, +} mlan_status; + +/** mlan_buf_type */ +typedef enum _mlan_buf_type { + MLAN_BUF_TYPE_CMD = 1, + MLAN_BUF_TYPE_DATA, + MLAN_BUF_TYPE_EVENT, + MLAN_BUF_TYPE_RAW_DATA, +} mlan_buf_type; + +/** mlan_buffer data structure */ +typedef struct _mlan_buffer { + /** Pointer to previous mlan_buffer */ + struct _mlan_buffer *pprev; + /** Pointer to next mlan_buffer */ + struct _mlan_buffer *pnext; + /** Status code from firmware/driver */ + t_u32 status_code; + /** Flags for this buffer */ + t_u32 flags; + /** BSS index number for multiple BSS support */ + t_u32 bss_index; + /** Buffer descriptor, e.g. skb in Linux */ + t_void *pdesc; + /** Pointer to buffer */ + t_u8 *pbuf; + /** Offset to data */ + t_u32 data_offset; + /** Data length */ + t_u32 data_len; + /** Buffer type: data, cmd, event etc. */ + mlan_buf_type buf_type; + + /** Fields below are valid for data packet only */ + /** QoS priority */ + t_u32 priority; + /** Time stamp when packet is received (seconds) */ + t_u32 in_ts_sec; + /** Time stamp when packet is received (micro seconds) */ + t_u32 in_ts_usec; + /** Time stamp when packet is processed (seconds) */ + t_u32 out_ts_sec; + /** Time stamp when packet is processed (micro seconds) */ + t_u32 out_ts_usec; + + /** Fields below are valid for MLAN module only */ + /** Pointer to parent mlan_buffer */ + struct _mlan_buffer *pparent; + /** Use count for this buffer */ + t_u32 use_count; +} mlan_buffer, *pmlan_buffer; +/** Maximum data rates */ +#define MAX_DATA_RATES 14 +/** Maximum key length */ +#define MLAN_MAX_KEY_LENGTH 32 +/** Maximum data rates */ +#define MAX_DATA_RATES 14 +/** Maximum number of AC QOS queues available in the driver/firmware */ +#define MAX_AC_QUEUES 4 + +/** MLAN Maximum SSID Length */ +#define MLAN_MAX_SSID_LENGTH (32) + +/** Max Ie length */ +#define MAX_IE_SIZE 256 + +/** Max channel */ +#define MLAN_MAX_CHANNEL 165 +#ifdef UAP_SUPPORT +/** Maximum packet forward control value */ +#define MAX_PKT_FWD_CTRL 15 +/** Maximum BEACON period */ +#define MAX_BEACON_PERIOD 4000 +/** Minimum BEACON period */ +#define MIN_BEACON_PERIOD 50 +/** Maximum DTIM period */ +#define MAX_DTIM_PERIOD 100 +/** Minimum DTIM period */ +#define MIN_DTIM_PERIOD 1 +/** Maximum TX Power Limit */ +#define MAX_TX_POWER 20 +/** Minimum TX Power Limit */ +#define MIN_TX_POWER 0 +/** MAX station count */ +#define MAX_STA_COUNT 10 +/** Maximum RTS threshold */ +#define MAX_RTS_THRESHOLD 2347 +/** Maximum fragmentation threshold */ +#define MAX_FRAG_THRESHOLD 2346 +/** Minimum fragmentation threshold */ +#define MIN_FRAG_THRESHOLD 256 +/** data rate 54 M */ +#define DATA_RATE_54M 108 +/** antenna A */ +#define ANTENNA_MODE_A 0 +/** antenna B */ +#define ANTENNA_MODE_B 1 +/** transmit antenna */ +#define TX_ANTENNA 1 +/** receive antenna */ +#define RX_ANTENNA 0 +/** Maximum stage out time */ +#define MAX_STAGE_OUT_TIME 864000 +/** Minimum stage out time */ +#define MIN_STAGE_OUT_TIME 300 +/** Maximum Retry Limit */ +#define MAX_RETRY_LIMIT 14 + +/** Maximum group key timer in seconds */ +#define MAX_GRP_TIMER 86400 +/**Default ssid for micro AP*/ +#define AP_DEFAULT_SSID "Marvell Micro AP" +/**Default pairwise key handshake retry times*/ +#define PWS_HSK_RETRIES 3 +/**Default group key handshake retry times*/ +#define GRP_HSK_RETRIES 3 +/**Default pairwise key handshake timeout*/ +#define PWS_HSK_TIMEOUT 100 // 100 ms +/**Default group key handshake timeout*/ +#define GRP_HSK_TIMEOUT 100 // 100 ms +/**Default Group key rekey time*/ +#define GRP_REKEY_TIME 86400 // 86400 sec + +/** Maximum value of 4 byte configuration */ +#define MAX_VALID_DWORD 0x7FFFFFFF /* (1 << 31) - 1 */ + +/** Band config ACS mode */ +#define BAND_CONFIG_ACS_MODE 0x40 +/** Band config manual */ +#define BAND_CONFIG_MANUAL 0x00 + +/** Maximum data rates */ +#define MAX_DATA_RATES 14 + +/** auto data rate */ +#define DATA_RATE_AUTO 0 + +/**filter mode: disable */ +#define MAC_FILTER_MODE_DISABLE 0 +/**filter mode: block mac address */ +#define MAC_FILTER_MODE_ALLOW_MAC 1 +/**filter mode: block mac address */ +#define MAC_FILTER_MODE_BLOCK_MAC 2 +/** Maximum mac filter num */ +#define MAX_MAC_FILTER_NUM 16 + +/* Bitmap for protocol to use */ +/** No security */ +#define PROTOCOL_NO_SECURITY 0x01 +/** Static WEP */ +#define PROTOCOL_STATIC_WEP 0x02 +/** WPA */ +#define PROTOCOL_WPA 0x08 +/** WPA2 */ +#define PROTOCOL_WPA2 0x20 +/** WP2 Mixed */ +#define PROTOCOL_WPA2_MIXED 0x28 +/** EAP */ +#define PROTOCOL_EAP 0x40 +/** WAPI */ +#define PROTOCOL_WAPI 0x80 + +/** Key_mgmt_psk */ +#define KEY_MGMT_NONE 0x04 +/** Key_mgmt_none */ +#define KEY_MGMT_PSK 0x02 +/** Key_mgmt_eap */ +#define KEY_MGMT_EAP 0x01 +/** Key_mgmt_psk_sha256 */ +#define KEY_MGMT_PSK_SHA256 0x100 + +/** TKIP */ +#define CIPHER_TKIP 0x04 +/** AES CCMP */ +#define CIPHER_AES_CCMP 0x08 + +/** Valid cipher bitmap */ +#define VALID_CIPHER_BITMAP 0x0c +/** 60 seconds */ +#define MRVDRV_TIMER_60S 60000 +/** 10 seconds */ +#define MRVDRV_TIMER_10S 10000 +/** 5 seconds */ +#define MRVDRV_TIMER_5S 5000 +/** 1 second */ +#define MRVDRV_TIMER_1S 1000 +/** DMA alignment */ +#define DMA_ALIGNMENT 64 +/** max size of TxPD */ +#define MAX_TXPD_SIZE 32 +/** Interface header length */ +#define INTF_HEADER_LEN 4 + +typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH]; + +/** mlan_802_11_ssid data structure */ +typedef struct _mlan_802_11_ssid { + /** SSID Length */ + t_u32 ssid_len; + /** SSID information field */ + t_u8 ssid[MLAN_MAX_SSID_LENGTH]; +} mlan_802_11_ssid, *pmlan_802_11_ssid; + +/** mac_filter data structure */ +typedef struct _mac_filter { + /** mac filter mode */ + t_u16 filter_mode; + /** mac adress count */ + t_u16 mac_count; + /** mac address list */ + mlan_802_11_mac_addr mac_list[MAX_MAC_FILTER_NUM]; +} mac_filter; + +/** wpa parameter */ +typedef struct _wpa_param { + /** Pairwise cipher WPA */ + t_u8 pairwise_cipher_wpa; + /** Pairwise cipher WPA2 */ + t_u8 pairwise_cipher_wpa2; + /** group cipher */ + t_u8 group_cipher; + /** RSN replay protection */ + t_u8 rsn_protection; + /** passphrase length */ + t_u32 length; + /** passphrase */ + t_u8 passphrase[64]; + /**group key rekey time in seconds */ + t_u32 gk_rekey_time; +} wpa_param; + +/** wep key */ +typedef struct _wep_key { + /** key index 0-3 */ + t_u8 key_index; + /** is default */ + t_u8 is_default; + /** length */ + t_u16 length; + /** key data */ + t_u8 key[26]; +} wep_key; + +/** wep param */ +typedef struct _wep_param { + /** key 0 */ + wep_key key0; + /** key 1 */ + wep_key key1; + /** key 2 */ + wep_key key2; + /** key 3 */ + wep_key key3; +} wep_param; + +/** Data structure of WMM QoS information */ +typedef struct _wmm_qos_info_t { +#ifdef BIG_ENDIAN_SUPPORT + /** QoS UAPSD */ + t_u8 qos_uapsd:1; + /** Reserved */ + t_u8 reserved:3; + /** Parameter set count */ + t_u8 para_set_count:4; +#else + /** Parameter set count */ + t_u8 para_set_count:4; + /** Reserved */ + t_u8 reserved:3; + /** QoS UAPSD */ + t_u8 qos_uapsd:1; +#endif /* BIG_ENDIAN_SUPPORT */ +} wmm_qos_info_t, *pwmm_qos_info_t; + +/** Data structure of WMM ECW */ +typedef struct _wmm_ecw_t { +#ifdef BIG_ENDIAN_SUPPORT + /** Maximum Ecw */ + t_u8 ecw_max:4; + /** Minimum Ecw */ + t_u8 ecw_min:4; +#else + /** Minimum Ecw */ + t_u8 ecw_min:4; + /** Maximum Ecw */ + t_u8 ecw_max:4; +#endif /* BIG_ENDIAN_SUPPORT */ +} wmm_ecw_t, *pwmm_ecw_t; + +/** 5G band */ +#define BAND_CONFIG_5G 0x01 +/** 2.4 G band */ +#define BAND_CONFIG_2G 0x00 +/** MAX BG channel */ +#define MAX_BG_CHANNEL 14 +/** mlan_bss_param + * Note: For each entry you must enter an invalid value + * in the MOAL function woal_set_sys_config_invalid_data(). + * Otherwise for a valid data an unwanted TLV will be + * added to that command. + */ + +/**ethernet II header len*/ +#define ETHII_HEADER_LEN (14) + +/** The bit to indicate the key is for unicast */ +#define MLAN_KEY_INDEX_UNICAST 0x40000000 +/** The key index to indicate default key */ +#define MLAN_KEY_INDEX_DEFAULT 0x000000ff +/** Maximum key length */ +/* #define MLAN_MAX_KEY_LENGTH 32 */ +/** Minimum passphrase length */ +#define MLAN_MIN_PASSPHRASE_LENGTH 8 +/** Maximum passphrase length */ +#define MLAN_MAX_PASSPHRASE_LENGTH 63 +/** PMK length */ +#define MLAN_PMK_HEXSTR_LENGTH 64 +/* A few details needed for WEP (Wireless Equivalent Privacy) */ +/** 104 bits */ +#define MAX_WEP_KEY_SIZE 13 +/** 40 bits RC4 - WEP */ +#define MIN_WEP_KEY_SIZE 5 +/** packet number size */ +#define PN_SIZE 16 +/** max seq size of wpa/wpa2 key */ +#define SEQ_MAX_SIZE 8 + +/** key flag for tx_seq */ +#define KEY_FLAG_TX_SEQ_VALID 0x00000001 +/** key flag for rx_seq */ +#define KEY_FLAG_RX_SEQ_VALID 0x00000002 +/** key flag for group key */ +#define KEY_FLAG_GROUP_KEY 0x00000004 +/** key flag for tx */ +#define KEY_FLAG_SET_TX_KEY 0x00000008 +/** key flag for mcast IGTK */ +#define KEY_FLAG_AES_MCAST_IGTK 0x00000010 +/** key flag for remove key */ +#define KEY_FLAG_REMOVE_KEY 0x80000000 +/** Type definition of mlan_ds_encrypt_key for MLAN_OID_SEC_CFG_ENCRYPT_KEY */ +typedef struct _mlan_ds_encrypt_key { + /** Key disabled, all other fields will be + * ignore when this flag set to MTRUE + */ + t_u32 key_disable; + /** key removed flag, when this flag is set + * to MTRUE, only key_index will be check + */ + t_u32 key_remove; + /** Key index, used as current tx key index + * when is_current_wep_key is set to MTRUE + */ + t_u32 key_index; + /** Current Tx key flag */ + t_u32 is_current_wep_key; + /** Key length */ + t_u32 key_len; + /** Key */ + t_u8 key_material[MLAN_MAX_KEY_LENGTH]; + /** mac address */ + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** wapi key flag */ + t_u32 is_wapi_key; + /** Initial packet number */ + t_u8 pn[PN_SIZE]; + /** key flags */ + t_u32 key_flags; +} mlan_ds_encrypt_key, *pmlan_ds_encrypt_key; + +/** mlan_deauth_param */ +typedef struct _mlan_deauth_param { + /** STA mac addr */ + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** deauth reason */ + t_u16 reason_code; +} mlan_deauth_param; + +/** Enumeration for PSK */ +enum _mlan_psk_type { + MLAN_PSK_PASSPHRASE = 1, + MLAN_PSK_PMK, + MLAN_PSK_CLEAR, + MLAN_PSK_QUERY, +}; +/** Type definition of mlan_passphrase_t */ +typedef struct _mlan_passphrase_t { + /** Length of passphrase */ + t_u32 passphrase_len; + /** Passphrase */ + t_u8 passphrase[MLAN_MAX_PASSPHRASE_LENGTH]; +} mlan_passphrase_t; + +/** Type defnition of mlan_pmk_t */ +typedef struct _mlan_pmk_t { + /** PMK */ + t_u8 pmk[MLAN_MAX_KEY_LENGTH]; +} mlan_pmk_t; + +/** Type definition of mlan_ds_passphrase for MLAN_OID_SEC_CFG_PASSPHRASE */ +typedef struct _mlan_ds_passphrase { + /** SSID may be used */ + mlan_802_11_ssid ssid; + /** BSSID may be used */ + mlan_802_11_mac_addr bssid; + /** Flag for passphrase or pmk used */ + t_u16 psk_type; + /** Passphrase or PMK */ + union { + /** Passphrase */ + mlan_passphrase_t passphrase; + /** PMK */ + mlan_pmk_t pmk; + } psk; +} mlan_ds_passphrase, *pmlan_ds_passphrase; + +/** mlan_ssid_bssid data structure for + * MLAN_OID_BSS_START and MLAN_OID_BSS_FIND_BSS + */ +typedef struct _mlan_ssid_bssid { + /** SSID */ + mlan_802_11_ssid ssid; + /** BSSID */ + mlan_802_11_mac_addr bssid; + /** index in BSSID list, start from 1 */ + t_u32 idx; + /** Receive signal strength in dBm */ + t_s32 rssi; +} mlan_ssid_bssid; + +/** Channel List Entry */ +typedef struct _channel_list { + /** Channel Number */ + t_u8 chan_number; + /** Band Config */ + t_u8 band_config_type; +} scan_chan_list; + +/** Data structure of WMM Aci/Aifsn */ +typedef struct _wmm_aci_aifsn_t { +#ifdef BIG_ENDIAN_SUPPORT + /** Reserved */ + t_u8 reserved:1; + /** Aci */ + t_u8 aci:2; + /** Acm */ + t_u8 acm:1; + /** Aifsn */ + t_u8 aifsn:4; +#else + /** Aifsn */ + t_u8 aifsn:4; + /** Acm */ + t_u8 acm:1; + /** Aci */ + t_u8 aci:2; + /** Reserved */ + t_u8 reserved:1; +#endif /* BIG_ENDIAN_SUPPORT */ +} wmm_aci_aifsn_t, *pwmm_aci_aifsn_t; + +/** Data structure of WMM AC parameters */ +typedef struct _wmm_ac_parameters_t { + wmm_aci_aifsn_t aci_aifsn; /**< AciAifSn */ + wmm_ecw_t ecw; /**< Ecw */ + t_u16 tx_op_limit; /**< Tx op limit */ +} wmm_ac_parameters_t, *pwmm_ac_parameters_t; + +/** Data structure of WMM parameter IE */ +typedef struct _wmm_parameter_t { + /** OuiType: 00:50:f2:02 */ + t_u8 ouitype[4]; + /** Oui subtype: 01 */ + t_u8 ouisubtype; + /** version: 01 */ + t_u8 version; + /** QoS information */ + t_u8 qos_info; + /** Reserved */ + t_u8 reserved; + /** AC Parameters Record WMM_AC_BE, WMM_AC_BK, WMM_AC_VI, WMM_AC_VO */ + wmm_ac_parameters_t ac_params[MAX_AC_QUEUES]; +} wmm_parameter_t, *pwmm_parameter_t; + +typedef struct _mlan_uap_bss_param { + /** AP mac addr */ + mlan_802_11_mac_addr mac_addr; + /** SSID */ + mlan_802_11_ssid ssid; + /** Broadcast ssid control */ + t_u8 bcast_ssid_ctl; + /** Radio control: on/off */ + t_u8 radio_ctl; + /** dtim period */ + t_u8 dtim_period; + /** beacon period */ + t_u16 beacon_period; + /** rates */ + t_u8 rates[MAX_DATA_RATES]; + /** Tx data rate */ + t_u16 tx_data_rate; + /** multicast/broadcast data rate */ + t_u16 mcbc_data_rate; + /** Tx power level in dBm */ + t_u8 tx_power_level; + /** Tx antenna */ + t_u8 tx_antenna; + /** Rx antenna */ + t_u8 rx_antenna; + /** packet forward control */ + t_u8 pkt_forward_ctl; + /** max station count */ + t_u16 max_sta_count; + /** mac filter */ + mac_filter filter; + /** station ageout timer in unit of 100ms */ + t_u32 sta_ageout_timer; + /** PS station ageout timer in unit of 100ms */ + t_u32 ps_sta_ageout_timer; + /** RTS threshold */ + t_u16 rts_threshold; + /** fragmentation threshold */ + t_u16 frag_threshold; + /** retry_limit */ + t_u16 retry_limit; + /** pairwise update timeout in milliseconds */ + t_u32 pairwise_update_timeout; + /** pairwise handshake retries */ + t_u32 pwk_retries; + /** groupwise update timeout in milliseconds */ + t_u32 groupwise_update_timeout; + /** groupwise handshake retries */ + t_u32 gwk_retries; + /** preamble type */ + t_u8 preamble_type; + /** band cfg */ + t_u8 band_cfg; + /** channel */ + t_u8 channel; + /** auth mode */ + t_u16 auth_mode; + /** encryption protocol */ + t_u16 protocol; + /** key managment type */ + t_u16 key_mgmt; + /** wep param */ + wep_param wep_cfg; + /** wpa param */ + wpa_param wpa_cfg; + /** Mgmt IE passthru mask */ + t_u32 mgmt_ie_passthru_mask; + /* + * 11n HT Cap HTCap_t ht_cap + */ + /** HT Capabilities Info field */ + t_u16 ht_cap_info; + /** A-MPDU Parameters field */ + t_u8 ampdu_param; + /** Supported MCS Set field */ + t_u8 supported_mcs_set[16]; + /** HT Extended Capabilities field */ + t_u16 ht_ext_cap; + /** Transmit Beamforming Capabilities field */ + t_u32 tx_bf_cap; + /** Antenna Selection Capability field */ + t_u8 asel; + /** Enable 2040 Coex */ + t_u8 enable_2040coex; + /** key management operation */ + t_u16 key_mgmt_operation; + /** BSS status */ + t_u16 bss_status; +#ifdef WIFI_DIRECT_SUPPORT + /* pre shared key */ + t_u8 psk[MLAN_MAX_KEY_LENGTH]; +#endif /* WIFI_DIRECT_SUPPORT */ + /** Number of channels in scan_channel_list */ + t_u32 num_of_chan; + /** scan channel list in ACS mode */ + scan_chan_list chan_list[MLAN_MAX_CHANNEL]; + /** Wmm parameters */ + wmm_parameter_t wmm_para; +} mlan_uap_bss_param; +#endif + +/** Enumeration for authentication mode */ +enum _mlan_auth_mode { + MLAN_AUTH_MODE_OPEN = 0x00, + MLAN_AUTH_MODE_SHARED = 0x01, + MLAN_AUTH_MODE_FT = 0x02, + MLAN_AUTH_MODE_NETWORKEAP = 0x80, + MLAN_AUTH_MODE_AUTO = 0xFF, +}; + +/** TxPD descriptor */ +typedef MLAN_PACK_START struct _UapTxPD { + /** BSS type */ + t_u8 bss_type; + /** BSS number */ + t_u8 bss_num; + /** Tx packet length */ + t_u16 tx_pkt_length; + /** Tx packet offset */ + t_u16 tx_pkt_offset; + /** Tx packet type */ + t_u16 tx_pkt_type; + /** Tx Control */ + t_u32 tx_control; + /** Pkt Priority */ + t_u8 priority; + /** Transmit Pkt Flags*/ + t_u8 flags; + /** Amount of time the packet has been queued in the driver (units = 2ms)*/ + t_u8 pkt_delay_2ms; + /** Reserved */ + t_u8 reserved1[2]; + /** Trasnit Pkt Token Id*/ + t_u8 tx_token_id; + /** reserverd */ + t_u8 reserved[2]; +} MLAN_PACK_END UapTxPD, *PUapTxPD; + +/** RxPD Descriptor */ +typedef MLAN_PACK_START struct _UapRxPD { + /** BSS Type */ + t_u8 bss_type; + /** BSS number*/ + t_u8 bss_num; + /** Rx packet length */ + t_u16 rx_pkt_length; + /** Rx packet offset */ + t_u16 rx_pkt_offset; + /** Rx packet type */ + t_u16 rx_pkt_type; + /** Sequence number */ + t_u16 seq_num; + /** Packet Priority */ + t_u8 priority; + /** Reserved */ + t_u8 reserved; +} MLAN_PACK_END UapRxPD, *PUapRxPD; + +/* #################### + From mlan_main.h + #################### */ + +#ifdef BIG_ENDIAN_SUPPORT +/** Convert ulong n/w to host */ +#define mlan_ntohl(x) x +/** Convert host ulong to n/w */ +#define mlan_htonl(x) x +/** Convert n/w to host */ +#define mlan_ntohs(x) x +/** Convert host to n/w */ +#define mlan_htons(x) x +/** Convert from 16 bit little endian format to CPU format */ +#define wlan_le16_to_cpu(x) swap_byte_16(x) +/** Convert from 32 bit little endian format to CPU format */ +#define wlan_le32_to_cpu(x) swap_byte_32(x) +/** Convert from 64 bit little endian format to CPU format */ +#define wlan_le64_to_cpu(x) swap_byte_64(x) +/** Convert to 16 bit little endian format from CPU format */ +#define wlan_cpu_to_le16(x) swap_byte_16(x) +/** Convert to 32 bit little endian format from CPU format */ +#define wlan_cpu_to_le32(x) swap_byte_32(x) +/** Convert to 64 bit little endian format from CPU format */ +#define wlan_cpu_to_le64(x) swap_byte_64(x) + +/** Convert TxPD to little endian format from CPU format */ +#define endian_convert_TxPD(x) \ + { \ + (x)->tx_pkt_length = wlan_cpu_to_le16((x)->tx_pkt_length); \ + (x)->tx_pkt_offset = wlan_cpu_to_le16((x)->tx_pkt_offset); \ + (x)->tx_pkt_type = wlan_cpu_to_le16((x)->tx_pkt_type); \ + (x)->tx_control = wlan_cpu_to_le32((x)->tx_control); \ + } + +/** Convert RxPD from little endian format to CPU format */ +#define endian_convert_RxPD(x) \ + { \ + (x)->rx_pkt_length = wlan_le16_to_cpu((x)->rx_pkt_length); \ + (x)->rx_pkt_offset = wlan_le16_to_cpu((x)->rx_pkt_offset); \ + (x)->rx_pkt_type = wlan_le16_to_cpu((x)->rx_pkt_type); \ + (x)->seq_num = wlan_le16_to_cpu((x)->seq_num); \ + } +#else +/** Convert ulong n/w to host */ +#define mlan_ntohl(x) swap_byte_32(x) +/** Convert host ulong to n/w */ +#define mlan_htonl(x) swap_byte_32(x) +/** Convert n/w to host */ +#define mlan_ntohs(x) swap_byte_16(x) +/** Convert host to n/w */ +#define mlan_htons(x) swap_byte_16(x) +/** Do nothing */ +#define wlan_le16_to_cpu(x) x +/** Do nothing */ +#define wlan_le32_to_cpu(x) x +/** Do nothing */ +#define wlan_le64_to_cpu(x) x +/** Do nothing */ +#define wlan_cpu_to_le16(x) x +/** Do nothing */ +#define wlan_cpu_to_le32(x) x +/** Do nothing */ +#define wlan_cpu_to_le64(x) x + +/** Convert TxPD to little endian format from CPU format */ +#define endian_convert_TxPD(x) do {} while (0) +/** Convert RxPD from little endian format to CPU format */ +#define endian_convert_RxPD(x) do {} while (0) +#endif /* BIG_ENDIAN_SUPPORT */ + +/** Find minimum */ +#ifndef MIN +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif + +/** Find maximum */ +#ifndef MAX +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#endif + +#ifdef memset +#undef memset +#endif +/** Memset routine */ +#define memset(mpl_utils, s, c, len) \ + (mpl_utils->moal_memset(mpl_utils->pmoal_handle, s, c, len)) + +#ifdef memmove +#undef memmove +#endif +/** Memmove routine */ +#define memmove(mpl_utils, dest, src, len) \ + (mpl_utils->moal_memmove(mpl_utils->pmoal_handle, dest, src, len)) + +#ifdef memcpy +#undef memcpy +#endif +/** Memcpy routine */ +#define memcpy(mpl_utils, to, from, len) \ + (mpl_utils->moal_memcpy(mpl_utils->pmoal_handle, to, from, len)) + +#ifdef memcmp +#undef memcmp +#endif +/** Memcmp routine */ +#define memcmp(mpl_utils, s1, s2, len) \ + (mpl_utils->moal_memcmp(mpl_utils->pmoal_handle, s1, s2, len)) + +/** Find number of elements */ +#ifndef NELEMENTS +#define NELEMENTS(x) (sizeof(x)/sizeof(x[0])) +#endif + +#define MOAL_ALLOC_MLAN_BUFFER (0) +#define MOAL_MALLOC_BUFFER (1) + +/* ################## + From mlan_fw.h + ################## */ +/** TxPD descriptor */ +typedef MLAN_PACK_START struct _TxPD { + /** BSS type */ + t_u8 bss_type; + /** BSS number */ + t_u8 bss_num; + /** Tx packet length */ + t_u16 tx_pkt_length; + /** Tx packet offset */ + t_u16 tx_pkt_offset; + /** Tx packet type */ + t_u16 tx_pkt_type; + /** Tx Control */ + t_u32 tx_control; + /** Pkt Priority */ + t_u8 priority; + /** Transmit Pkt Flags*/ + t_u8 flags; + /** Amount of time the packet has been queued in the driver (units = 2ms)*/ + t_u8 pkt_delay_2ms; + /** Reserved */ + t_u8 reserved1[2]; + /** Trasnit Pkt Token Id*/ + t_u8 tx_token_id; + /** reserverd */ + t_u8 reserved[2]; +} MLAN_PACK_END TxPD, *PTxPD; + +/** 2K buf size */ +#define MLAN_TX_DATA_BUF_SIZE_2K 2048 + +/* #################### + From mlan_decl.h + #################### */ + +/** IN parameter */ +#define IN +/** OUT parameter */ +#define OUT + +/** BIT value */ +#define MBIT(x) (((t_u32)1) << (x)) + +#ifdef DEBUG_LEVEL1 +/** Debug level bit definition */ +#define MMSG MBIT(0) +#define MFATAL MBIT(1) +#define MERROR MBIT(2) +#define MDATA MBIT(3) +#define MCMND MBIT(4) +#define MEVENT MBIT(5) +#define MINTR MBIT(6) +#define MIOCTL MBIT(7) + +#define MDAT_D MBIT(16) +#define MCMD_D MBIT(17) +#define MEVT_D MBIT(18) +#define MFW_D MBIT(19) +#define MIF_D MBIT(20) + +#define MENTRY MBIT(28) +#define MWARN MBIT(29) +#define MINFO MBIT(30) +#define MHEX_DUMP MBIT(31) +#endif /* DEBUG_LEVEL1 */ + +/** Wait until a condition becomes true */ +#define MASSERT(cond) \ +do { \ + if (!(cond)) { \ + PRINTM(MFATAL, "ASSERT: %s: %i\n", __FUNCTION__, __LINE__); \ + } \ +} while (0) + +/** Log entry point for debugging */ +#define ENTER() PRINTM(MENTRY, "Enter: %s\n", __FUNCTION__) +/** Log exit point for debugging */ +#define LEAVE() PRINTM(MENTRY, "Leave: %s\n", __FUNCTION__) + +/* #################### + From mlan_main.h + #################### */ + +#ifdef DEBUG_LEVEL1 +extern t_void (*print_callback) (IN t_void *pmoal_handle, + IN t_u32 level, IN char *pformat, IN ... + ); + +extern mlan_status (*get_sys_time_callback) (IN t_void *pmoal_handle, + OUT t_u32 *psec, OUT t_u32 *pusec); + +extern t_u32 mlan_drvdbg; + +#ifdef DEBUG_LEVEL2 +#define PRINTM_MINFO(msg...) do {if ((mlan_drvdbg & MINFO) && (print_callback)) \ + print_callback(MNULL, MINFO, msg); } while (0) +#define PRINTM_MWARN(msg...) do {if ((mlan_drvdbg & MWARN) && (print_callback)) \ + print_callback(MNULL, MWARN, msg); } while (0) +#define PRINTM_MENTRY(msg...) do {if ((mlan_drvdbg & MENTRY) && (print_callback)) \ + print_callback(MNULL, MENTRY, msg); } while (0) +#define PRINTM_GET_SYS_TIME(level, psec, pusec) \ +do { \ + if ((level & mlan_drvdbg) && (get_sys_time_callback)) \ + get_sys_time_callback(MNULL, psec, pusec); \ +} while (0) + +/** Hexdump for level-2 debugging */ +#define HEXDUMP(x, y, z) \ +do { \ + if ((mlan_drvdbg & (MHEX_DUMP | MINFO)) && (print_callback)) \ + print_callback(MNULL, MHEX_DUMP | MINFO, x, y, z); \ +} while (0) + +#else + +#define PRINTM_MINFO(msg...) do {} while (0) +#define PRINTM_MWARN(msg...) do {} while (0) +#define PRINTM_MENTRY(msg...) do {} while (0) + +#define PRINTM_GET_SYS_TIME(level, psec, pusec) \ +do { \ + if ((level & mlan_drvdbg) && (get_sys_time_callback) \ + && (level != MINFO) && (level != MWARN)) \ + get_sys_time_callback(MNULL, psec, pusec); \ +} while (0) + +/** Hexdump for debugging */ +#define HEXDUMP(x, y, z) do {} while (0) + +#endif /* DEBUG_LEVEL2 */ + +#define PRINTM_MFW_D(msg...) do {if ((mlan_drvdbg & MFW_D) && (print_callback)) \ + print_callback(MNULL, MFW_D, msg); } while (0) +#define PRINTM_MCMD_D(msg...) do {if ((mlan_drvdbg & MCMD_D) && (print_callback)) \ + print_callback(MNULL, MCMD_D, msg); } while (0) +#define PRINTM_MDAT_D(msg...) do {if ((mlan_drvdbg & MDAT_D) && (print_callback)) \ + print_callback(MNULL, MDAT_D, msg); } while (0) +#define PRINTM_MIF_D(msg...) do {if ((mlan_drvdbg & MIF_D) && (print_callback)) \ + print_callback(MNULL, MIF_D, msg); } while (0) + +#define PRINTM_MIOCTL(msg...) do {if ((mlan_drvdbg & MIOCTL) && (print_callback)) \ + print_callback(MNULL, MIOCTL, msg); } while (0) +#define PRINTM_MINTR(msg...) do {if ((mlan_drvdbg & MINTR) && (print_callback)) \ + print_callback(MNULL, MINTR, msg); } while (0) +#define PRINTM_MEVENT(msg...) do {if ((mlan_drvdbg & MEVENT) && (print_callback)) \ + print_callback(MNULL, MEVENT, msg); } while (0) +#define PRINTM_MCMND(msg...) do {if ((mlan_drvdbg & MCMND) && (print_callback)) \ + print_callback(MNULL, MCMND, msg); } while (0) +#define PRINTM_MDATA(msg...) do {if ((mlan_drvdbg & MDATA) && (print_callback)) \ + print_callback(MNULL, MDATA, msg); } while (0) +#define PRINTM_MERROR(msg...) do {if ((mlan_drvdbg & MERROR) && (print_callback)) \ + print_callback(MNULL, MERROR, msg); } while (0) +#define PRINTM_MFATAL(msg...) do {if ((mlan_drvdbg & MFATAL) && (print_callback)) \ + print_callback(MNULL, MFATAL, msg); } while (0) +#define PRINTM_MMSG(msg...) do {if ((mlan_drvdbg & MMSG) && (print_callback)) \ + print_callback(MNULL, MMSG, msg); } while (0) + +#define PRINTM(level, msg...) PRINTM_##level((char *)msg) + +/** Log debug message */ +#ifdef __GNUC__ +#define PRINTM_NETINTF(level, pmu, pml) \ +do { \ + if ((mlan_drvdbg & level) && pmu && pml \ + && pmu->moal_print_netintf) \ + pmu->moal_print_netintf( \ + pmu->pmoal_handle, \ + pml->bss_index, level); \ +} while (0) +#endif /* __GNUC__ */ + +/** Max hex dump data length */ +#define MAX_DATA_DUMP_LEN 64 + +/** Debug hexdump for level-1 debugging */ +#define DBG_HEXDUMP(level, x, y, z) \ +do { \ + if ((mlan_drvdbg & level) && print_callback) \ + print_callback(MNULL, MHEX_DUMP | level, x, y, z); \ +} while (0) + +#else /* DEBUG_LEVEL1 */ + +#define PRINTM(level, msg...) do {} while (0) + +#define PRINTM_NETINTF(level, pmpriv) do {} while (0) + +/** Debug hexdump for level-1 debugging */ +#define DBG_HEXDUMP(level, x, y, z) do {} while (0) + +/** Hexdump for debugging */ +#define HEXDUMP(x, y, z) do {} while (0) + +#define PRINTM_GET_SYS_TIME(level, psec, pusec) do { } while (0) + +#endif /* DEBUG_LEVEL1 */ + +/* ####################################################### + embedded authenticator and supplicant specific + ################ ########################################*/ + +/** Get_system_time routine */ +#define get_system_time(mpl_utils, psec, pusec) \ + (mpl_utils->moal_get_system_time(mpl_utils->pmoal_handle, psec, pusec)) + +/** malloc routine */ +#ifdef malloc +#undef malloc +#endif +#define malloc(mpl_utils, len, pptr) \ + (mpl_utils->moal_malloc(mpl_utils->pmoal_handle, len, MLAN_MEM_DEF, pptr)) + +/** free routine */ +#ifdef free +#undef free +#endif +#define free(mpl_utils, ptr) \ + (mpl_utils->moal_mfree(mpl_utils->pmoal_handle, ptr)) + +#endif /* _HOSTSA_EXT_DEF_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/hostsa_init.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/hostsa_init.c new file mode 100644 index 00000000..62a2a325 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/hostsa_init.c @@ -0,0 +1,641 @@ +/** @file hostsa_init.c + * + * @brief This file defines the initialize /free APIs for authenticator and supplicant. + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#include "mlan.h" +#ifdef STA_SUPPORT +#include "mlan_join.h" +#endif +#include "mlan_ioctl.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_init.h" +#include "mlan_wmm.h" +#include "hostsa_def.h" + +#include "authenticator_api.h" + +/********************* + Local Variables + *********************/ + +/********************* + Global Variables + *********************/ + +/********************* + Local Functions + *********************/ + +/********************* + Global Functions + *********************/ + +/********************* + Utility Handler + *********************/ + +/** + * @brief alloc mlan buffer + * + * @param pmlan_adapter A void pointer + * @param data_len request buffer len + * @param head_room head room len + * @param malloc_flag flag for mlan buffer + + * @return pointer to mlan buffer + */ +pmlan_buffer +hostsa_alloc_mlan_buffer(t_void *pmlan_adapter, + t_u32 data_len, t_u32 head_room, t_u32 malloc_flag) +{ + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; + pmlan_buffer newbuf = MNULL; + + newbuf = wlan_alloc_mlan_buffer(pmadapter, data_len, head_room, + malloc_flag); + + return newbuf; +} + +/** + * @brief free mlan buffer + * + * @param pmlan_adapter A void pointer + * @param pmbuf a pointer to mlan buffer + * + * @return + */ +void +hostsa_free_mlan_buffer(t_void *pmlan_adapter, mlan_buffer *pmbuf) +{ + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; + + ENTER(); + + wlan_free_mlan_buffer(pmadapter, pmbuf); + + LEAVE(); +} + +/** + * @brief send packet + * + * @param pmlan_private A void pointer + * @param pmbuf a pointer to mlan buffer + * @param frameLen paket len + * + * @return + */ +void +hostsa_tx_packet(t_void *pmlan_private, pmlan_buffer pmbuf, t_u16 frameLen) +{ + mlan_private *pmpriv = (mlan_private *)pmlan_private; + mlan_adapter *pmadapter = pmpriv->adapter; + t_u8 bss_role = GET_BSS_ROLE(pmpriv); + + ENTER(); + + pmbuf->bss_index = pmpriv->bss_index; + pmbuf->data_len = frameLen; + + wlan_add_buf_bypass_txqueue(pmadapter, pmbuf); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_DEFER_HANDLING, MNULL); + + LEAVE(); +} + +/** + * @brief set key to fw + * + * @param pmlan_private A void pointer + * @param encrypt_key key structure + * + * @return + */ +void +wlan_set_encrypt_key(t_void *pmlan_private, mlan_ds_encrypt_key *encrypt_key) +{ + mlan_private *priv = (mlan_private *)pmlan_private; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (!encrypt_key->key_len) { + PRINTM(MCMND, "Skip set key with key_len = 0\n"); + LEAVE(); + return; + } + + ret = wlan_prepare_cmd(priv, + HostCmd_CMD_802_11_KEY_MATERIAL, + HostCmd_ACT_GEN_SET, + KEY_INFO_ENABLED, MNULL, encrypt_key); + + if (ret == MLAN_STATUS_SUCCESS) + wlan_recv_event(priv, MLAN_EVENT_ID_DRV_DEFER_HANDLING, MNULL); + + LEAVE(); + +} + +/** + * @brief clear key to fw + * + * @param pmlan_private A void pointer + * + * @return + */ +void +wlan_clr_encrypt_key(t_void *pmlan_private) +{ + mlan_private *priv = (mlan_private *)pmlan_private; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_encrypt_key encrypt_key; + + ENTER(); + + memset(priv->adapter, &encrypt_key, 0, sizeof(mlan_ds_encrypt_key)); + encrypt_key.key_disable = MTRUE; + encrypt_key.key_flags = KEY_FLAG_REMOVE_KEY; + + ret = wlan_prepare_cmd(priv, + HostCmd_CMD_802_11_KEY_MATERIAL, + HostCmd_ACT_GEN_SET, + KEY_INFO_ENABLED, MNULL, &encrypt_key); + + if (ret == MLAN_STATUS_SUCCESS) + wlan_recv_event(priv, MLAN_EVENT_ID_DRV_DEFER_HANDLING, MNULL); + + LEAVE(); + +} + +/** + * @brief send deauth frame + * + * @param pmlan_private A void pointer + * @param addr destination mac address + * @param reason deauth reason + * + * @return + */ +void +hostsa_SendDeauth(t_void *pmlan_private, t_u8 *addr, t_u16 reason) +{ + mlan_private *pmpriv = (mlan_private *)pmlan_private; + mlan_adapter *pmadapter = pmpriv->adapter; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_deauth_param deauth; + + ENTER(); + + memcpy(pmadapter, deauth.mac_addr, addr, MLAN_MAC_ADDR_LENGTH); + deauth.reason_code = reason; + + ret = wlan_prepare_cmd(pmpriv, + HOST_CMD_APCMD_STA_DEAUTH, + HostCmd_ACT_GEN_SET, + 0, MNULL, (t_void *)&deauth); + if (ret == MLAN_STATUS_SUCCESS) + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_DEFER_HANDLING, + MNULL); + + LEAVE(); +} + +/** + * @brief deauth all connected stations + * + * @param pmlan_private A void pointer + * @param reason deauth reason + * + * @return + */ +void +ApDisAssocAllSta(void *pmlan_private, t_u16 reason) +{ + mlan_private *pmpriv = (mlan_private *)pmlan_private; + mlan_adapter *pmadapter = pmpriv->adapter; + sta_node *sta_ptr; + + ENTER(); + + sta_ptr = (sta_node *)util_peek_list(pmadapter->pmoal_handle, + &pmpriv->sta_list, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + + if (!sta_ptr) { + LEAVE(); + return; + } + + while (sta_ptr != (sta_node *)&pmpriv->sta_list) { + hostsa_SendDeauth((t_void *)pmpriv, sta_ptr->mac_addr, reason); + sta_ptr = sta_ptr->pnext; + } + + LEAVE(); +} + +/** + * @brief get station entry + * + * @param pmlan_private A void pointer + * @param mac pointer to station mac address + * @param ppconPtr pointer to pointer to connection + * + * @return + */ +void +Hostsa_get_station_entry(t_void *pmlan_private, t_u8 *mac, t_void **ppconPtr) +{ + mlan_private *priv = (mlan_private *)pmlan_private; + sta_node *sta_ptr = MNULL; + + ENTER(); + + sta_ptr = wlan_get_station_entry(priv, mac); + *ppconPtr = sta_ptr->cm_connectioninfo; + + LEAVE(); +} + +/** + * @brief find a connection + * + * @param pmlan_private A void pointer + * @param ppconPtr a pointer to pointer to connection + * @param ppsta_node a pointer to pointer to sta node + * + * @return + */ +void +Hostsa_find_connection(t_void *pmlan_private, t_void **ppconPtr, + t_void **ppsta_node) +{ + mlan_private *priv = (mlan_private *)pmlan_private; + sta_node *sta_ptr = MNULL; + + ENTER(); + + sta_ptr = (sta_node *)util_peek_list(priv->adapter->pmoal_handle, + &priv->sta_list, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); + + if (!sta_ptr) { + LEAVE(); + return; + } + + *ppsta_node = (t_void *)sta_ptr; + *ppconPtr = sta_ptr->cm_connectioninfo; + + LEAVE(); +} + +/** + * @brief find next connection + * + * @param pmlan_private A void pointer + * @param ppconPtr a pointer to pointer to connection + * @param ppsta_node a pointer to pointer to sta node + * + * @return + */ +void +Hostsa_find_next_connection(t_void *pmlan_private, t_void **ppconPtr, + t_void **ppsta_node) +{ + mlan_private *priv = (mlan_private *)pmlan_private; + sta_node *sta_ptr = (sta_node *)*ppsta_node; + + ENTER(); + if (sta_ptr != (sta_node *)&priv->sta_list) + sta_ptr = sta_ptr->pnext; + + *ppsta_node = MNULL; + *ppconPtr = MNULL; + if ((sta_ptr != MNULL) && (sta_ptr != (sta_node *)&priv->sta_list)) { + *ppsta_node = (t_void *)sta_ptr; + *ppconPtr = sta_ptr->cm_connectioninfo; + } + LEAVE(); +} + +/** + * @brief set management ie for beacon or probe response + * + * @param pmlan_private A void pointer + * @param pbuf ie buf + * @param len ie len + * @param clearIE clear ie + * + * @return + */ +void +Hostsa_set_mgmt_ie(t_void *pmlan_private, t_u8 *pbuf, t_u16 len, t_u8 clearIE) +{ + mlan_private *priv = (mlan_private *)pmlan_private; + mlan_adapter *pmadapter = priv->adapter; + mlan_ioctl_req *pioctl_req = MNULL; + mlan_ds_misc_cfg *pds_misc_cfg = MNULL; + custom_ie *pmgmt_ie = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (pmadapter == MNULL) { + LEAVE(); + return; + } + + /* allocate buffer for mlan_ioctl_req and mlan_ds_misc_cfg */ + /* FYI - will be freed as part of cmd_response handler */ + ret = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle, + sizeof(mlan_ioctl_req) + + sizeof(mlan_ds_misc_cfg), + MLAN_MEM_DEF, + (t_u8 **)&pioctl_req); + if ((ret != MLAN_STATUS_SUCCESS) || !pioctl_req) { + PRINTM(MERROR, "%s(): Could not allocate ioctl req\n", + __func__); + LEAVE(); + return; + } + pds_misc_cfg = (mlan_ds_misc_cfg *)((t_u8 *)pioctl_req + + sizeof(mlan_ioctl_req)); + + /* prepare mlan_ioctl_req */ + memset(pmadapter, pioctl_req, 0x00, sizeof(mlan_ioctl_req)); + pioctl_req->req_id = MLAN_IOCTL_MISC_CFG; + pioctl_req->action = MLAN_ACT_SET; + pioctl_req->bss_index = priv->bss_index; + pioctl_req->pbuf = (t_u8 *)pds_misc_cfg; + pioctl_req->buf_len = sizeof(mlan_ds_misc_cfg); + + /* prepare mlan_ds_misc_cfg */ + memset(pmadapter, pds_misc_cfg, 0x00, sizeof(mlan_ds_misc_cfg)); + pds_misc_cfg->sub_command = MLAN_OID_MISC_CUSTOM_IE; + pds_misc_cfg->param.cust_ie.type = TLV_TYPE_MGMT_IE; + pds_misc_cfg->param.cust_ie.len = (sizeof(custom_ie) - MAX_IE_SIZE); + + /* configure custom_ie api settings */ + pmgmt_ie = (custom_ie *)&pds_misc_cfg->param.cust_ie.ie_data_list[0]; + pmgmt_ie->ie_index = 0xffff; /* Auto index */ + pmgmt_ie->ie_length = len; + pmgmt_ie->mgmt_subtype_mask = MBIT(8) | MBIT(5); /* add IE for + BEACON | + PROBE_RSP */ + if (clearIE) + pmgmt_ie->mgmt_subtype_mask = 0; + memcpy(pmadapter, pmgmt_ie->ie_buffer, pbuf, len); + + pds_misc_cfg->param.cust_ie.len += pmgmt_ie->ie_length; + + DBG_HEXDUMP(MCMD_D, "authenticator: RSN or WPA IE", + (t_u8 *)pmgmt_ie, pds_misc_cfg->param.cust_ie.len); + + ret = wlan_misc_ioctl_custom_ie_list(pmadapter, pioctl_req, MFALSE); + + if (ret != MLAN_STATUS_SUCCESS && ret != MLAN_STATUS_PENDING) { + PRINTM(MERROR, + "%s(): Could not set IE for priv=%p [priv_bss_idx=%d]!\n", + __func__, priv, priv->bss_index); + /* TODO: how to handle this error case?? ignore & continue? */ + } + /* free ioctl buffer memory before we leave */ + pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pioctl_req); + +} + +t_void +StaControlledPortOpen(t_void *pmlan_private) +{ + mlan_private *priv = (mlan_private *)pmlan_private; + + PRINTM(MERROR, "StaControlledPortOpen\n"); + if (priv->port_ctrl_mode == MTRUE) { + PRINTM(MINFO, "PORT_REL: port_status = OPEN\n"); + priv->port_open = MTRUE; + } + priv->adapter->scan_block = MFALSE; + wlan_recv_event(priv, MLAN_EVENT_ID_FW_PORT_RELEASE, MNULL); +} + +void +hostsa_StaSendDeauth(t_void *pmlan_private, t_u8 *addr, t_u16 reason) +{ + mlan_private *pmpriv = (mlan_private *)pmlan_private; + mlan_adapter *pmadapter = pmpriv->adapter; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_deauth_param deauth; + + ENTER(); + + memcpy(pmadapter, deauth.mac_addr, addr, MLAN_MAC_ADDR_LENGTH); + deauth.reason_code = reason; + + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_DEAUTHENTICATE, + HostCmd_ACT_GEN_SET, + 0, MNULL, (t_void *)&deauth); + if (ret == MLAN_STATUS_SUCCESS) + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_DEFER_HANDLING, + MNULL); + + LEAVE(); +} + +t_u8 +Hostsa_get_bss_role(t_void *pmlan_private) +{ + mlan_private *pmpriv = (mlan_private *)pmlan_private; + + return GET_BSS_ROLE(pmpriv); +} + +/** + * @brief send event to moal to notice that 4 way handshake complete + * + * @param pmlan_private A void pointer + * @param addr pointer to station mac address + * + * @return + */ +t_void +Hostsa_sendEventRsnConnect(t_void *pmlan_private, t_u8 *addr) +{ + mlan_private *pmpriv = (mlan_private *)pmlan_private; + mlan_adapter *pmadapter = pmpriv->adapter; + t_u8 *event_buf = MNULL, *pos = MNULL; + t_u32 event_cause = 0; + mlan_event *pevent = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + ret = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle, + MAX_EVENT_SIZE, MLAN_MEM_DEF, + &event_buf); + if ((ret != MLAN_STATUS_SUCCESS) || !event_buf) { + PRINTM(MERROR, "Could not allocate buffer for event buf\n"); + goto done; + } + pevent = (pmlan_event)event_buf; + memset(pmadapter, event_buf, 0, MAX_EVENT_SIZE); + + pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; + pevent->bss_index = pmpriv->bss_index; + event_cause = wlan_cpu_to_le32(0x51); /* MICRO_AP_EV_ID_RSN_CONNECT */ + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + (t_u8 *)&event_cause, sizeof(event_cause)); + pos = pevent->event_buf + sizeof(event_cause) + 2; /* reserved 2 + byte */ + memcpy(pmadapter, (t_u8 *)pos, addr, MLAN_MAC_ADDR_LENGTH); + + pevent->event_len = MLAN_MAC_ADDR_LENGTH + sizeof(event_cause) + 2; + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_PASSTHRU, event_buf); + +done: + if (event_buf) + pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, + event_buf); + + LEAVE(); +} + +/** + * @brief This function initializes callbacks that hostsa interface uses. + * + * @param pmpriv A pointer to mlan_private structure + * @param putil_fns A pointer to hostsa_util_fns structure + * @param pmlan_fns A pointer to hostsa_mlan_fns structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static t_void +hostsa_mlan_callbacks(IN pmlan_private pmpriv, + IN hostsa_util_fns *putil_fns, + IN hostsa_mlan_fns *pmlan_fns) +{ + pmlan_adapter pmadapter = pmpriv->adapter; + pmlan_callbacks pcb = &pmadapter->callbacks; + + putil_fns->pmoal_handle = pmadapter->pmoal_handle; + putil_fns->moal_malloc = pcb->moal_malloc; + putil_fns->moal_mfree = pcb->moal_mfree; + putil_fns->moal_memset = pcb->moal_memset; + putil_fns->moal_memcpy = pcb->moal_memcpy; + putil_fns->moal_memmove = pcb->moal_memmove; + putil_fns->moal_memcmp = pcb->moal_memcmp; + putil_fns->moal_udelay = pcb->moal_udelay; + putil_fns->moal_get_system_time = pcb->moal_get_system_time; + putil_fns->moal_init_timer = pcb->moal_init_timer; + putil_fns->moal_free_timer = pcb->moal_free_timer; + putil_fns->moal_start_timer = pcb->moal_start_timer; + putil_fns->moal_stop_timer = pcb->moal_stop_timer; + putil_fns->moal_init_lock = pcb->moal_init_lock; + putil_fns->moal_free_lock = pcb->moal_free_lock; + putil_fns->moal_spin_lock = pcb->moal_spin_lock; + putil_fns->moal_spin_unlock = pcb->moal_spin_unlock; + putil_fns->moal_print = pcb->moal_print; + putil_fns->moal_print_netintf = pcb->moal_print_netintf; + + pmlan_fns->pmlan_private = pmpriv; + pmlan_fns->pmlan_adapter = pmpriv->adapter; + pmlan_fns->bss_index = pmpriv->bss_index; + pmlan_fns->bss_type = pmpriv->bss_type; +#if 0 + pmlan_fns->mlan_add_buf_txqueue = mlan_add_buf_txqueue; + pmlan_fns->mlan_select_wmm_queue = mlan_select_wmm_queue; + pmlan_fns->mlan_write_data_complete = mlan_write_data_complete; +#endif + pmlan_fns->hostsa_alloc_mlan_buffer = hostsa_alloc_mlan_buffer; + pmlan_fns->hostsa_tx_packet = hostsa_tx_packet; + pmlan_fns->hostsa_set_encrypt_key = wlan_set_encrypt_key; + pmlan_fns->hostsa_clr_encrypt_key = wlan_clr_encrypt_key; + pmlan_fns->hostsa_SendDeauth = hostsa_SendDeauth; + pmlan_fns->Hostsa_DisAssocAllSta = ApDisAssocAllSta; + pmlan_fns->hostsa_free_mlan_buffer = hostsa_free_mlan_buffer; + pmlan_fns->Hostsa_get_station_entry = Hostsa_get_station_entry; + pmlan_fns->Hostsa_set_mgmt_ie = Hostsa_set_mgmt_ie; + pmlan_fns->Hostsa_find_connection = Hostsa_find_connection; + pmlan_fns->Hostsa_find_next_connection = Hostsa_find_next_connection; + pmlan_fns->Hostsa_StaControlledPortOpen = StaControlledPortOpen; + pmlan_fns->hostsa_StaSendDeauth = hostsa_StaSendDeauth; + pmlan_fns->Hostsa_get_bss_role = Hostsa_get_bss_role; + pmlan_fns->Hostsa_sendEventRsnConnect = Hostsa_sendEventRsnConnect; +}; + +/** + * @brief Init hostsa data + * + * @param pmlan_private A pointer to mlan private data structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +hostsa_init(pmlan_private pmpriv) +{ + hostsa_util_fns util_fns; + hostsa_mlan_fns mlan_fns; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + hostsa_mlan_callbacks(pmpriv, &util_fns, &mlan_fns); + ret = supplicant_authenticator_init(&pmpriv->psapriv, &util_fns, + &mlan_fns, pmpriv->curr_addr); + + LEAVE(); + return ret; +} + +/** + * @brief Cleanup hostsa data + * + * @param pmlan_private A pointer to a mlan private data structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +hostsa_cleanup(pmlan_private pmpriv) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + supplicant_authenticator_free(pmpriv->psapriv); + + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/hostsa_init.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/hostsa_init.h new file mode 100644 index 00000000..c654e1c2 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/hostsa_init.h @@ -0,0 +1,42 @@ +/** @file hostsa_init.h + * + * @brief This file contains definitions the APIs. + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ + +#ifndef _HOSTSA_INIT_H_ +#define _HOSTSA_INIT_H_ + +#ifndef MACSTR +/** MAC address security format */ +#define MACSTR "%02x:XX:XX:XX:%02x:%02x" +#endif + +#ifndef MAC2STR +/** MAC address security print arguments */ +#define MAC2STR(a) (a)[0], (a)[4], (a)[5] +#endif + +extern mlan_status hostsa_init(pmlan_private pmpriv); +extern mlan_status hostsa_cleanup(pmlan_private pmpriv); + +#endif /* _MPL_MAIN_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyApiStaTypes.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyApiStaTypes.h new file mode 100644 index 00000000..c321520b --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyApiStaTypes.h @@ -0,0 +1,165 @@ +/** @file KeyApiStaTypes.h + * + * @brief This file defines some of the macros and types + * Please do not change those macros and types. + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef KEY_API_STA_TYPES_H__ +#define KEY_API_STA_TYPES_H__ + +#include "KeyApiStaDefs.h" +#include "wl_mib.h" +#include "keyCommonDef.h" + +/******************************** Pool ID 11 ********************************/ +#define POOL_ID11_BLOCK_POOL_CNT 1 +#define POOL_ID11_BUF0_SZ CIPHER_KEYS_BUF_SIZE +#define POOL_ID11_BUF0_CNT CIPHER_KEYS_BUF_NUM +#define POOL_ID11_BUF0_REAL_SZ (POOL_ID11_BUF0_SZ) +#define POOL_ID11_BUF0_TOT_SZ (POOL_ID11_BUF0_REAL_SZ * POOL_ID11_BUF0_CNT) +#define POOL_ID11_SZ (POOL_ID11_BUF0_TOT_SZ) +#define POOL_ID11_OVERHEAD ((POOL_ID11_BUF0_CNT) * sizeof(uint32)) + +#define KEY_STATE_ENABLE 0x01 +#define KEY_STATE_FORCE_EAPOL_UNENCRYPTED 0x02 + +#define KEY_ACTION_ADD 0x01 +#define KEY_ACTION_DELETE 0x02 +#define KEY_ACTION_FLUSHALL 0xFF + +#define KEY_DIRECTION_UNSPEC (0x0) +#define KEY_DIRECTION_RX (0x1) +#define KEY_DIRECTION_TX (0x2) +#define KEY_DIRECTION_RXTX (KEY_DIRECTION_RX \ + | KEY_DIRECTION_TX) + +#define KEY_INFO_PWK (0x1) +#define KEY_INFO_GWK (0x2) +#define KEY_INFO_IGWK (0x40) +#define KEY_INFO_KEY_MAPPING_KEY (0x4) +#define KEY_INFO_WEP_SUBTYPE (0x8) +#define KEY_INFO_GLOBAL (0x10) + +/* + we use BIT6 and BIT7 of + keyInfo field of cipher_key_hdr_t to pass keyID. +*/ + +#define CIPHERKEY_KEY_ID_MASK (BIT6 | BIT7) +#define CIPHERKEY_KEY_ID_OFFSET 6 + +#define KEY_INFO_DEFAULT_KEY (~KEY_INFO_KEY_MAPPING_KEY) + +#define VERSION_0 0 +#define VERSION_2 2 + +#define IS_KEY_INFO_WEP_SUBTYPE_104BIT(x) \ + ( (x) ? \ + ((x)->hdr.keyInfo & KEY_INFO_WEP_SUBTYPE) : 0 ) + +#define IS_KEY_INFO_WEP_SUBTYPE_40BIT(x) \ + ( (x) ? \ + (!((x)->hdr.keyInfo & KEY_INFO_WEP_SUBTYPE)) : 0 ) + +#define SET_KEY_INFO_WEP_SUBTYPE_104BIT(x) \ + ( (x) ? ((x)->hdr.keyInfo |= KEY_INFO_WEP_SUBTYPE) : 0 ) + +#define SET_KEY_INFO_WEP_SUBTYPE_40BIT(x) \ + ( (x) ? ((x)->hdr.keyInfo &= ~KEY_INFO_WEP_SUBTYPE) : 0 ) + +#define SET_KEY_INFO_PWKGWK(x) \ + ( (x) ? \ + ((x)->hdr.keyInfo |= KEY_INFO_PWK|KEY_INFO_GWK) : 0) + +#define SET_KEY_INFO_PWK(x) \ + ( (x) ? ((x)->hdr.keyInfo |= KEY_INFO_PWK, \ + ((x)->hdr.keyInfo &= ~KEY_INFO_GWK)) : 0 ) + +#define SET_KEY_INFO_GWK(x) \ + ( (x) ? ((x)->hdr.keyInfo |= KEY_INFO_GWK, \ + ((x)->hdr.keyInfo &= ~KEY_INFO_PWK)): 0 ) + +#define SET_KEY_INFO_GLOBAL(x) \ + ( (x) ? ((x)->hdr.keyInfo |= KEY_INFO_GLOBAL) : 0 ) + +#define IS_KEY_INFO_GLOBAL(x) \ + ( (x) ? ((x)->hdr.keyInfo & KEY_INFO_GLOBAL) : 0 ) + +#define SET_KEY_STATE_ENABLED(x, state) (((state) == TRUE) ? \ + ((x)->hdr.keyState |= KEY_STATE_ENABLE) \ + : ((x)->hdr.keyState &= ~KEY_STATE_ENABLE) ) + +#define IS_KEY_STATE_ENABLED(x) \ + ( (x) ? ((x)->hdr.keyState & KEY_STATE_ENABLE) : 0 ) + +#define IS_KEY_STATE_FORCE_EAPOL_UNENCRYPTED(x) \ + ( (x) ? \ + ((x)->hdr.keyState & KEY_STATE_FORCE_EAPOL_UNENCRYPTED) : 0) + +#define SET_KEY_STATE_FORCE_EAPOL_UNENCRYPTED(x,state) \ + (((state) == TRUE) ? \ + ((x)->hdr.keyState |= KEY_STATE_FORCE_EAPOL_UNENCRYPTED) \ + : ((x)->hdr.keyState &= ~KEY_STATE_FORCE_EAPOL_UNENCRYPTED) ) + +typedef MLAN_PACK_START struct { + IEEEtypes_MacAddr_t macAddr; + UINT8 keyDirection; + UINT8 keyType; + UINT16 keyLen; + UINT8 keyAction; + UINT8 keyInfo; +} MLAN_PACK_END nwf_key_mgthdr_t; + +/* host command for GET/SET Key Material */ +typedef MLAN_PACK_START struct { + UINT16 Action; + nwf_key_mgthdr_t key_material; +} MLAN_PACK_END host_802_11_NWF_Key_Material_t; + +/* host command for set wep parameters in Vista uses different struct + from the one we use in FW */ + +typedef MLAN_PACK_START struct host_802_11_wep_key { + UINT8 WepDefaultKeyIdx; /* 1 to 4 */ + UINT8 WepDefaultKeyValue[WEP_KEY_USER_INPUT]; /* 5 byte string */ +} MLAN_PACK_END host_802_11_wep_key_t; + +typedef struct host_802_11_wep_key_data_t { + host_802_11_wep_key_t WepDefaultKeys[MAX_WEP_KEYS]; + UINT8 default_key_idx; + UINT8 Reserved1[3]; +} host_802_11_wep_key_data_t; + +typedef UINT32 buffer_t; + +typedef struct cipher_key_buf { + struct cipher_key_buf_t *prev; + struct cipher_key_buf_t *next; + + cipher_key_t cipher_key; +} cipher_key_buf_t; + +#define CIPHER_KEYS_BUF_SIZE (sizeof(cipher_key_buf_t)) + +#define CIPHER_KEYS_BUF_NUM (CM_MAX_CONNECTIONS) + +#endif /* KEY_API_STA_H__ end */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyCommonDef.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyCommonDef.h new file mode 100644 index 00000000..c338a8e7 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyCommonDef.h @@ -0,0 +1,228 @@ +/** @file keyCommonDef.h + * + * @brief This file contains normal data type for key management + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _KEYMGMT_COMMON_H_ +#define _KEYMGMT_COMMON_H_ + +#include "wltypes.h" +#include "IEEE_types.h" +#include "wl_mib_rom.h" +#include "KeyApiStaDefs.h" + +#define NONCE_SIZE 32 +#define EAPOL_MIC_KEY_SIZE 16 +#define EAPOL_MIC_SIZE 16 +#define EAPOL_ENCR_KEY_SIZE 16 +#define MAC_ADDR_SIZE 6 +#define TK_SIZE 16 +#define HDR_8021x_LEN 4 +#define KEYMGMTTIMEOUTVAL 10 +#define TDLS_MIC_KEY_SIZE 16 + +#define EAPOL_PROTOCOL_V1 1 +#define EAPOL_PROTOCOL_V2 2 + +#define UAP_HOSTCMD_KEYMGMT_EAP BIT0 +#define UAP_HOSTCMD_KEYMGMT_PSK BIT1 +#define UAP_HOSTCMD_KEYMGMT_NONE BIT2 +#define UAP_HOSTCMD_KEYMGMT_PSK_SHA256 BIT8 + +#define UAP_HOSTCMD_CIPHER_WEP40 0x01 +#define UAP_HOSTCMD_CIPHER_WEP104 0x02 +#define UAP_HOSTCMD_CIPHER_TKIP 0x04 +#define UAP_HOSTCMD_CIPHER_CCMP 0x08 +#define UAP_HOSTCMD_CIPHER_MASK 0x0F + +typedef struct { + UINT8 Key[TK_SIZE]; + UINT8 RxMICKey[8]; + UINT8 TxMICKey[8]; + UINT32 TxIV32; + UINT16 TxIV16; + UINT16 KeyIndex; +} KeyData_t; + +#define MAX_WEP_KEYS 4 +/* This structure is used in rom and existing fields should not be changed */ +/* This structure is already aligned and hence packing is not needed */ + +typedef struct cipher_key_hdr_t { + IEEEtypes_MacAddr_t macAddr; + UINT8 keyDirection; + UINT8 keyType:4; + UINT8 version:4; + UINT16 keyLen; + UINT8 keyState; + UINT8 keyInfo; +} cipher_key_hdr_t; + +/* This structure is used in rom and existing fields should not be changed */ +typedef struct tkip_aes_key_data_t { + // key material information (TKIP/AES/WEP) + UINT8 key[CRYPTO_KEY_LEN_MAX]; + UINT8 txMICKey[MIC_KEY_LEN_MAX]; + UINT8 rxMICKey[MIC_KEY_LEN_MAX]; + UINT32 hiReplayCounter32; // !< initialized by host + UINT16 loReplayCounter16; // !< initialized by host + UINT32 txIV32; // !< controlled by FW + UINT16 txIV16; // !< controlled by FW + UINT32 TKIPMicLeftValue; + UINT32 TKIPMicRightValue; + + /* HW new design for 8682 only to support interleaving FW need to save + these value and restore for next fragment */ + UINT32 TKIPMicData0Value; + UINT32 TKIPMicData1Value; + UINT32 TKIPMicData2Value; + UINT8 keyIdx; + UINT8 reserved[3]; + +} tkip_aes_key_data_t; + +/* This structure is used in rom and existing fields should not be changed */ +typedef struct wep_key_data_t { + MIB_WEP_DEFAULT_KEYS WepDefaultKeys[MAX_WEP_KEYS]; + UINT8 default_key_idx; + UINT8 keyCfg; + UINT8 Reserved; +} wep_key_data_t; + +/* This structure is used in rom and existing fields should not be changed */ +typedef struct { + UINT8 key_idx; + UINT8 mickey[WAPI_MIC_LEN]; + UINT8 rawkey[WAPI_KEY_LEN]; +} wapi_key_detail_t; + +/* cipher_key_t -> tkip_aes is much bigger than wapi_key_data_t and + * since wapi_key_data_t is not used by ROM it is ok to change this size. */ + +typedef struct { + wapi_key_detail_t key; + UINT8 pn_inc; + UINT8 TxPN[WAPI_PN_LEN]; + UINT8 RxPN[WAPI_PN_LEN]; + UINT8 *pLastKey; // keep the orig cipher_key_t pointer +} wapi_key_data_t; + +typedef struct { + UINT8 ANonce[NONCE_SIZE]; + KeyData_t pwsKeyData; +} eapolHskData_t; + +/* This structure is used in rom and existing fields should not be changed */ +typedef struct cipher_key_t { + cipher_key_hdr_t hdr; + + union ckd { + tkip_aes_key_data_t tkip_aes; + wep_key_data_t wep; + wapi_key_data_t wapi; + eapolHskData_t hskData; + } ckd; +} cipher_key_t; + +typedef MLAN_PACK_START struct { + UINT8 protocol_ver; + IEEEtypes_8021x_PacketType_e pckt_type; + UINT16 pckt_body_len; +} MLAN_PACK_END Hdr_8021x_t; + +typedef MLAN_PACK_START struct { + /* don't change this order. It is set to match the ** endianness of + the message */ + + /* Byte 1 */ + UINT16 KeyMIC:1; /* Bit 8 */ + UINT16 Secure:1; /* Bit 9 */ + UINT16 Error:1; /* Bit 10 */ + UINT16 Request:1; /* Bit 11 */ + UINT16 EncryptedKeyData:1; /* Bit 12 */ + UINT16 Reserved:3; /* Bits 13-15 */ + + /* Byte 0 */ + UINT16 KeyDescriptorVersion:3; /* Bits 0-2 */ + UINT16 KeyType:1; /* Bit 3 */ + UINT16 KeyIndex:2; /* Bits 4-5 */ + UINT16 Install:1; /* Bit 6 */ + UINT16 KeyAck:1; /* Bit 7 */ + +} MLAN_PACK_END key_info_t; + +#define KEY_DESCRIPTOR_HMAC_MD5_RC4 (1U << 0) +#define KEY_DESCRIPTOR_HMAC_SHA1_AES (1U << 1) +#define EAPOL_KeyMsg_Len (100) +/* WPA2 GTK IE */ +typedef MLAN_PACK_START struct { + UINT8 KeyID:2; + UINT8 Tx:1; + UINT8 rsvd:5; + UINT8 rsvd1; + UINT8 GTK[1]; +} MLAN_PACK_END GTK_KDE_t; + +/* WPA2 Key Data */ +typedef MLAN_PACK_START struct { + UINT8 type; + UINT8 length; + UINT8 OUI[3]; + UINT8 dataType; + UINT8 data[1]; +} MLAN_PACK_END KDE_t; + +typedef MLAN_PACK_START struct { + uint8 llc[3]; + uint8 snap_oui[3]; + uint16 snap_type; +} MLAN_PACK_END llc_snap_t; + +typedef MLAN_PACK_START struct { + Hdr_8021x_t hdr_8021x; + UINT8 desc_type; + key_info_t key_info; + UINT16 key_length; + UINT32 replay_cnt[2]; + UINT8 key_nonce[NONCE_SIZE]; /* 32 bytes */ + UINT8 EAPOL_key_IV[16]; + UINT8 key_RSC[8]; + UINT8 key_ID[8]; + UINT8 key_MIC[EAPOL_MIC_KEY_SIZE]; + UINT16 key_material_len; + UINT8 key_data[1]; +} MLAN_PACK_END EAPOL_KeyMsg_t; + +typedef MLAN_PACK_START struct { + Hdr_8021x_t hdr_8021x; + IEEEtypes_8021x_CodeType_e code; + UINT8 identifier; + UINT16 length; + UINT8 data[1]; +} MLAN_PACK_END EAP_PacketMsg_t; + +typedef MLAN_PACK_START struct { + ether_hdr_t ethHdr; + EAPOL_KeyMsg_t keyMsg; +} MLAN_PACK_END EAPOL_KeyMsg_Tx_t; + +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtAp.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtAp.c new file mode 100644 index 00000000..6be441c8 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtAp.c @@ -0,0 +1,952 @@ +/** @file keyMgntAP.c + * + * @brief This file defined the eapol paket process and key management for authenticator + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +//Authenticator related function definitions +#include "wltypes.h" +#include "IEEE_types.h" + +#include "hostsa_ext_def.h" +#include "authenticator.h" + +#include "wl_macros.h" +#include "wlpd.h" +#include "pass_phrase.h" +#include "sha1.h" +#include "crypt_new.h" +#include "parser.h" +#include "keyCommonDef.h" +#include "keyMgmtStaTypes.h" +#include "AssocAp_srv_rom.h" +#include "pmkCache.h" +#include "keyMgmtApTypes.h" +#include "keyMgmtAp.h" +#include "rc4.h" +#include "authenticator_api.h" + +////////////////////// +// STATIC FUNCTIONS +////////////////////// + +//#ifdef AUTHENTICATOR +//////////////////////// +// FORWARD DECLARATIONS +//////////////////////// +Status_e GeneratePWKMsg3(hostsa_private *priv, cm_Connection *connPtr); +Status_e GenerateGrpMsg1(hostsa_private *priv, cm_Connection *connPtr); +Status_e GenerateApEapolMsg(hostsa_private *priv, + t_void *pconnPtr, keyMgmtState_e msgState); + +static void +handleFailedHSK(t_void *priv, t_void *pconnPtr, IEEEtypes_ReasonCode_t reason) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_mlan_fns *pm_fns = &psapriv->mlan_fns; + cm_Connection *connPtr = (cm_Connection *)pconnPtr; + + KeyMgmtStopHskTimer(connPtr); + pm_fns->hostsa_SendDeauth(pm_fns->pmlan_private, connPtr->mac_addr, + (t_u16)reason); +} + +static void +incrementReplayCounter(apKeyMgmtInfoSta_t *pKeyMgmtInfo) +{ + if (++pKeyMgmtInfo->counterLo == 0) { + pKeyMgmtInfo->counterHi++; + } +} + +int +isValidReplayCount(t_void *priv, apKeyMgmtInfoSta_t *pKeyMgmtInfo, + UINT8 *pRxReplayCount) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + UINT32 rxCounterHi; + UINT32 rxCounterLo; + + memcpy(util_fns, &rxCounterHi, pRxReplayCount, 4); + memcpy(util_fns, &rxCounterLo, pRxReplayCount + 4, 4); + + if ((pKeyMgmtInfo->counterHi == WORD_SWAP(rxCounterHi)) && + (pKeyMgmtInfo->counterLo == WORD_SWAP(rxCounterLo))) { + return 1; + } + return 0; +} + +void +KeyMgmtSendGrpKeyMsgToAllSta(hostsa_private *priv) +{ + hostsa_mlan_fns *pm_fns = &priv->mlan_fns; + apKeyMgmtInfoSta_t *pKeyMgmtInfo; + cm_Connection *connPtr = MNULL; + t_void *sta_node = MNULL; + + ENTER(); + + pm_fns->Hostsa_find_connection(priv->pmlan_private, (t_void *)&connPtr, + &sta_node); + + while (connPtr != MNULL) { + pKeyMgmtInfo = &connPtr->staData.keyMgmtInfo; + + if (pKeyMgmtInfo->rom.keyMgmtState == HSK_END) { + GenerateApEapolMsg(priv, connPtr, + GRP_REKEY_MSG1_PENDING); + } else if ((pKeyMgmtInfo->rom.keyMgmtState == WAITING_4_GRPMSG2) + || (pKeyMgmtInfo->rom.staSecType.wpa2 && + (pKeyMgmtInfo->rom.keyMgmtState == + WAITING_4_MSG4)) || + (pKeyMgmtInfo->rom.keyMgmtState == + WAITING_4_GRP_REKEY_MSG2)) { + // TODO:How to handle group rekey if either Groupwise + // handshake + // Group rekey is already in progress for this STA? + } + + pm_fns->Hostsa_find_next_connection(priv->pmlan_private, + (t_void *)&connPtr, + &sta_node); + } + + LEAVE(); +} + +UINT32 +keyApi_ApUpdateKeyMaterial(void *priv, cm_Connection *connPtr, + BOOLEAN updateGrpKey) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + hostsa_mlan_fns *pm_fns = &psapriv->mlan_fns; + BssConfig_t *pBssConfig = MNULL; + KeyData_t *pKeyData = MNULL; + // cipher_key_buf_t *pCipherKeyBuf; + Cipher_t *pCipher = MNULL; + // KeyData_t pwsKeyData; + mlan_ds_encrypt_key encrypt_key; + t_u8 bcast_addr[MAC_ADDR_SIZE] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + apInfo_t *pApInfo = &psapriv->apinfo; + + pBssConfig = &pApInfo->bssConfig; + + if (pBssConfig->SecType.wpa || pBssConfig->SecType.wpa2) { + memset(util_fns, &encrypt_key, 0, sizeof(mlan_ds_encrypt_key)); + + // connPtr->cmFlags.RSNEnabled = TRUE; + if (updateGrpKey == TRUE) { + pKeyData = &pApInfo->bssData.grpKeyData; + pCipher = &pBssConfig->RsnConfig.mcstCipher; + } else if (connPtr) { + /* pCipherKeyBuf = connPtr->pwTxRxCipherKeyBuf; + memcpy((void*)&pwsKeyData, + (void*)&pCipherKeyBuf->cipher_key.ckd.hskData.pwsKeyData, + sizeof(KeyData_t)); */ + pKeyData = &connPtr->hskData.pwsKeyData; + pCipher = + &connPtr->staData.keyMgmtInfo.rom.staUcstCipher; + } + + if (updateGrpKey == TRUE) { + memcpy(util_fns, encrypt_key.mac_addr, bcast_addr, + MAC_ADDR_SIZE); + encrypt_key.key_flags |= KEY_FLAG_GROUP_KEY; + } else if (connPtr) { + memcpy(util_fns, encrypt_key.mac_addr, + connPtr->mac_addr, MAC_ADDR_SIZE); + encrypt_key.key_flags |= KEY_FLAG_SET_TX_KEY; + } + + if (pCipher->ccmp) { + /**AES*/ + encrypt_key.key_len = TK_SIZE; + memcpy(util_fns, encrypt_key.key_material, + pKeyData->Key, TK_SIZE); + } else if (pCipher->tkip) { + /**TKIP*/ + encrypt_key.key_len = + TK_SIZE + MIC_KEY_SIZE + MIC_KEY_SIZE; + memcpy(util_fns, encrypt_key.key_material, + pKeyData->Key, TK_SIZE); + memcpy(util_fns, &encrypt_key.key_material[TK_SIZE], + pKeyData->TxMICKey, MIC_KEY_SIZE); + memcpy(util_fns, + &encrypt_key.key_material[TK_SIZE + + MIC_KEY_SIZE], + pKeyData->RxMICKey, MIC_KEY_SIZE); + } + /**set pn 0*/ + memset(util_fns, encrypt_key.pn, 0, PN_SIZE); + + /**key flag*/ + encrypt_key.key_flags |= KEY_FLAG_RX_SEQ_VALID; + /**key index*/ + encrypt_key.key_index = pKeyData->KeyIndex; + /**set command to fw update key*/ + pm_fns->hostsa_set_encrypt_key(psapriv->pmlan_private, + &encrypt_key); + + } + + return 0; +} + +void +GenerateGTK(void *priv) +{ + phostsa_private psapriv = (phostsa_private)priv; + apInfo_t *pApInfo = &psapriv->apinfo; + BssData_t *pBssData = MNULL; + + pBssData = &pApInfo->bssData; + + GenerateGTK_internal(psapriv, &pBssData->grpKeyData, + pBssData->GNonce, psapriv->curr_addr); +} + +void +ReInitGTK(t_void *priv) +{ + phostsa_private psapriv = (phostsa_private)priv; + apInfo_t *pApInfo = &psapriv->apinfo; + BssData_t *pBssData; + + pBssData = &pApInfo->bssData; + + /* + Disabled for interop Not all clients like this + pBssData->grpKeyData.KeyIndex = (pBssData->grpKeyData.KeyIndex & 3) + + 1; */ + + ROM_InitGTK(psapriv, &pBssData->grpKeyData, + pBssData->GNonce, psapriv->curr_addr); + + keyApi_ApUpdateKeyMaterial(priv, MNULL, MTRUE); +} + +void +KeyMgmtGrpRekeyCountUpdate(t_void *context) +{ + phostsa_private psapriv = (phostsa_private)context; + apInfo_t *pApInfo = &psapriv->apinfo; + hostsa_util_fns *putil_fns = &psapriv->util_fns; + + ENTER(); + + if (psapriv->GrpRekeyTimerIsSet && + pApInfo->bssData.grpRekeyCntRemaining) { + // Periodic group rekey is configured. + pApInfo->bssData.grpRekeyCntRemaining--; + if (!pApInfo->bssData.grpRekeyCntRemaining) { + // Group rekey timeout hit. + pApInfo->bssData.grpRekeyCntRemaining + = pApInfo->bssData.grpRekeyCntConfigured; + + ReInitGTK((t_void *)psapriv); + + KeyMgmtSendGrpKeyMsgToAllSta(psapriv); + } + + /**start Group rekey timer*/ + putil_fns->moal_start_timer(putil_fns->pmoal_handle, + psapriv->GrpRekeytimer, + MFALSE, MRVDRV_TIMER_60S); + } + + LEAVE(); +} + +void +KeyMgmtInit(void *priv) +{ + phostsa_private psapriv = (phostsa_private)priv; + apInfo_t *pApInfo = &psapriv->apinfo; + UINT8 *pPassPhrase; + UINT8 *pPskValue; + UINT8 passPhraseLen; + + pPassPhrase = pApInfo->bssConfig.RsnConfig.PSKPassPhrase; + pPskValue = pApInfo->bssConfig.RsnConfig.PSKValue; + passPhraseLen = pApInfo->bssConfig.RsnConfig.PSKPassPhraseLen; + + ROM_InitGTK(psapriv, &pApInfo->bssData.grpKeyData, + pApInfo->bssData.GNonce, psapriv->curr_addr); + + if (pApInfo->bssData.updatePassPhrase == MTRUE) { + pmkCacheGeneratePSK(priv, pApInfo->bssConfig.SsId, + pApInfo->bssConfig.SsIdLen, + (char *)pPassPhrase, pPskValue); + + pApInfo->bssData.updatePassPhrase = MFALSE; + } +} + +void +KeyMgmtHskTimeout(t_void *context) +{ + cm_Connection *connPtr = (cm_Connection *)context; + phostsa_private priv = (phostsa_private)connPtr->priv; + hostsa_mlan_fns *pm_fns = &priv->mlan_fns; + apKeyMgmtInfoSta_t *pKeyMgmtInfo; + apRsnConfig_t *pRsnConfig; + IEEEtypes_ReasonCode_t reason; + BOOLEAN maxRetriesDone = MFALSE; + apInfo_t *pApInfo = &priv->apinfo; + + PRINTM(MMSG, "ENTER: %s\n", __FUNCTION__); + + pKeyMgmtInfo = &connPtr->staData.keyMgmtInfo; + pRsnConfig = &pApInfo->bssConfig.RsnConfig; + + connPtr->timer_is_set = 0; + /* Assume when this function gets called pKeyMgmtInfo->keyMgmtState ** + will not be in HSK_NOT_STARTED or HSK_END */ + if (pKeyMgmtInfo->rom.keyMgmtState <= WAITING_4_MSG4) { + if (pKeyMgmtInfo->numHskTries >= pRsnConfig->MaxPwsHskRetries) { + maxRetriesDone = MTRUE; + reason = IEEEtypes_REASON_4WAY_HANDSHK_TIMEOUT; + } + } else { + if (pKeyMgmtInfo->numHskTries >= pRsnConfig->MaxGrpHskRetries) { + maxRetriesDone = MTRUE; + reason = IEEEtypes_REASON_GRP_KEY_UPD_TIMEOUT; + } + } + + if (maxRetriesDone) { + // Some STAs do not respond to PWK Msg1 if the EAPOL Proto + // Version is 1 + // in 802.1X header, hence switch to v2 after all attempts with + // v1 fail + // for PWK Msg1. Set the HskTimeoutCtn to 1 to get the same + // "retries" + // as with v1. + if (((WAITING_4_MSG2 == pKeyMgmtInfo->rom.keyMgmtState) + || (MSG1_PENDING == pKeyMgmtInfo->rom.keyMgmtState)) + && (EAPOL_PROTOCOL_V1 == pKeyMgmtInfo->EAPOLProtoVersion)) { + pKeyMgmtInfo->numHskTries = 1; + pKeyMgmtInfo->EAPOLProtoVersion = EAPOL_PROTOCOL_V2; + GenerateApEapolMsg(priv, connPtr, + pKeyMgmtInfo->rom.keyMgmtState); + } else { + pm_fns->hostsa_SendDeauth(priv->pmlan_private, + connPtr->mac_addr, + (t_u16)reason); + pKeyMgmtInfo->rom.keyMgmtState = HSK_END; + } + } else { + GenerateApEapolMsg(priv, connPtr, + pKeyMgmtInfo->rom.keyMgmtState); + } + + return; +} + +void +KeyMgmtStartHskTimer(void *context) +{ + cm_Connection *connPtr = (cm_Connection *)context; + phostsa_private psapriv = (phostsa_private)(connPtr->priv); + hostsa_util_fns *util_fns = &psapriv->util_fns; + apInfo_t *pApInfo = MNULL; + UINT32 timeoutInms; + apRsnConfig_t *pRsnConfig; + + PRINTM(MMSG, "ENTER: %s\n", __FUNCTION__); + + pApInfo = &psapriv->apinfo; + pRsnConfig = &pApInfo->bssConfig.RsnConfig; + if ((connPtr->staData.keyMgmtInfo.rom.keyMgmtState >= MSG1_PENDING) + && (connPtr->staData.keyMgmtInfo.rom.keyMgmtState <= + WAITING_4_MSG4)) { + timeoutInms = pRsnConfig->PwsHskTimeOut; + } else if ((connPtr->staData.keyMgmtInfo.rom.keyMgmtState >= + GRPMSG1_PENDING) + && (connPtr->staData.keyMgmtInfo.rom.keyMgmtState <= + WAITING_4_GRP_REKEY_MSG2)) { + timeoutInms = pRsnConfig->GrpHskTimeOut; + } else { + // EAPOL HSK is not in progress. No need to start HSK timer + return; + } + + // Retry happen, increase timeout to at least 1 sec + if (connPtr->staData.keyMgmtInfo.numHskTries > 0) { + timeoutInms = MAX(AP_RETRY_EAPOL_HSK_TIMEOUT, timeoutInms); + } + + /* if STA is in PS1 then we are using max(STA_PS_EAPOL_HSK_TIMEOUT, + HSKtimeout)for timeout instead of configured timeout value */ + /* if(PWR_MODE_PWR_SAVE == connPtr->staData.pwrSaveInfo.mode) { + timeoutInms = MAX(STA_PS_EAPOL_HSK_TIMEOUT, timeoutInms); } */ + util_fns->moal_start_timer(util_fns->pmoal_handle, + connPtr->HskTimer, MFALSE, timeoutInms); + connPtr->timer_is_set = 1; +} + +void +KeyMgmtStopHskTimer(t_void *pconnPtr) +{ + cm_Connection *connPtr = (cm_Connection *)pconnPtr; + phostsa_private priv = (phostsa_private)connPtr->priv; + hostsa_util_fns *util_fns = &priv->util_fns; + + util_fns->moal_stop_timer(util_fns->pmoal_handle, connPtr->HskTimer); + + connPtr->timer_is_set = 0; +} + +void +PrepDefaultEapolMsg(phostsa_private priv, cm_Connection *connPtr, + EAPOL_KeyMsg_Tx_t **pTxEapolPtr, pmlan_buffer pmbuf) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + apInfo_t *pApInfo = &priv->apinfo; + EAPOL_KeyMsg_Tx_t *tx_eapol_ptr; + apKeyMgmtInfoSta_t *pKeyMgmtInfo; +#define UAP_EAPOL_PRIORITY 7 /* Voice */ + + ENTER(); + + pmbuf->priority = UAP_EAPOL_PRIORITY; + pmbuf->buf_type = MLAN_BUF_TYPE_DATA; + pmbuf->data_offset = + (sizeof(UapTxPD) + INTF_HEADER_LEN + DMA_ALIGNMENT); + tx_eapol_ptr = + (EAPOL_KeyMsg_Tx_t *)((UINT8 *)pmbuf->pbuf + + pmbuf->data_offset); + memset(util_fns, (UINT8 *)tx_eapol_ptr, 0x00, + sizeof(EAPOL_KeyMsg_Tx_t)); + + formEAPOLEthHdr(priv, tx_eapol_ptr, connPtr->mac_addr, priv->curr_addr); + + pKeyMgmtInfo = &connPtr->staData.keyMgmtInfo; + + SetEAPOLKeyDescTypeVersion(tx_eapol_ptr, + pKeyMgmtInfo->rom.staSecType.wpa2, + MFALSE, + (pKeyMgmtInfo->rom.staUcstCipher.ccmp || + pApInfo->bssConfig.RsnConfig.mcstCipher. + ccmp)); + + *pTxEapolPtr = tx_eapol_ptr; + + LEAVE(); +} + +Status_e +GeneratePWKMsg1(hostsa_private *priv, cm_Connection *connPtr) +{ + hostsa_mlan_fns *pm_fns = &priv->mlan_fns; + EAPOL_KeyMsg_Tx_t *tx_eapol_ptr; + UINT16 frameLen = 0, packet_len = 0; + apKeyMgmtInfoSta_t *pKeyMgmtInfo; + UINT32 replay_cnt[2]; + eapolHskData_t *pHskData; + pmlan_buffer pmbuf = MNULL; + + PRINTM(MMSG, "ENTER: %s\n", __FUNCTION__); + + pmbuf = pm_fns->hostsa_alloc_mlan_buffer(priv->pmlan_adapter, + MLAN_TX_DATA_BUF_SIZE_2K, 0, + MOAL_MALLOC_BUFFER); + if (pmbuf == NULL) { + PRINTM(MERROR, "allocate buffer fail for eapol \n"); + return FAIL; + } + + PrepDefaultEapolMsg(priv, connPtr, &tx_eapol_ptr, pmbuf); + + pKeyMgmtInfo = &connPtr->staData.keyMgmtInfo; + pHskData = &connPtr->hskData; + + incrementReplayCounter(pKeyMgmtInfo); + replay_cnt[0] = pKeyMgmtInfo->counterHi; + replay_cnt[1] = pKeyMgmtInfo->counterLo; + + supplicantGenerateRand(priv, pHskData->ANonce, NONCE_SIZE); + + PopulateKeyMsg(priv, tx_eapol_ptr, + &pKeyMgmtInfo->rom.staUcstCipher, + PAIRWISE_KEY_MSG, replay_cnt, pHskData->ANonce); + + frameLen = EAPOL_KeyMsg_Len - sizeof(Hdr_8021x_t) + - sizeof(tx_eapol_ptr->keyMsg.key_data) + + tx_eapol_ptr->keyMsg.key_material_len; // key_mtr_len + // is 0 here + + packet_len = frameLen + sizeof(Hdr_8021x_t) + sizeof(ether_hdr_t); + + tx_eapol_ptr->keyMsg.hdr_8021x.protocol_ver + = pKeyMgmtInfo->EAPOLProtoVersion; + tx_eapol_ptr->keyMsg.hdr_8021x.pckt_type + = IEEE_8021X_PACKET_TYPE_EAPOL_KEY; + tx_eapol_ptr->keyMsg.hdr_8021x.pckt_body_len = htons(frameLen); + + UpdateEAPOLWcbLenAndTransmit(priv, pmbuf, packet_len); + return SUCCESS; +} + +// returns 0 on success, or error code +Status_e +ProcessPWKMsg2(hostsa_private *priv, + cm_Connection *connPtr, t_u8 *pbuf, t_u32 len) +{ + EAPOL_KeyMsg_t *rx_eapol_ptr; + UINT8 *PMK; + apKeyMgmtInfoSta_t *pKeyMgmtInfo; + BssConfig_t *pBssConfig = NULL; + IEPointers_t iePointers; + UINT32 ieLen; + UINT8 *pIe = NULL; + apInfo_t *pApInfo = &priv->apinfo; + Cipher_t wpaUcastCipher; + Cipher_t wpa2UcastCipher; + eapolHskData_t *pHskData = &connPtr->hskData; + + pKeyMgmtInfo = &connPtr->staData.keyMgmtInfo; + rx_eapol_ptr = (EAPOL_KeyMsg_t *)(pbuf + ETHII_HEADER_LEN); + + pBssConfig = &pApInfo->bssConfig; + // compare the RSN IE from assoc req to current + pIe = (UINT8 *)rx_eapol_ptr->key_data; + ieLen = pIe[1] + sizeof(IEEEtypes_InfoElementHdr_t); + GetIEPointers((void *)priv, pIe, ieLen, &iePointers); + wpaUcastCipher = pBssConfig->RsnConfig.wpaUcstCipher; + wpa2UcastCipher = pBssConfig->RsnConfig.wpa2UcstCipher; + PRINTM(MMSG, "ENTER: %s\n", __FUNCTION__); + + if (assocSrvAp_checkRsnWpa(connPtr, &pKeyMgmtInfo->rom, + wpaUcastCipher, + wpa2UcastCipher, + pBssConfig->RsnConfig.mcstCipher, + pBssConfig->RsnConfig.AuthKey, + &pKeyMgmtInfo->rom.staSecType, + iePointers.pRsn, + iePointers.pWpa, TRUE) == FAIL) { + handleFailedHSK(priv, connPtr, IEEEtypes_REASON_IE_4WAY_DIFF); + return FAIL; + } + + PMK = pApInfo->bssConfig.RsnConfig.PSKValue; + + KeyMgmtAp_DerivePTK(priv, PMK, + connPtr->mac_addr, + priv->curr_addr, + pHskData->ANonce, + rx_eapol_ptr->key_nonce, + pKeyMgmtInfo->EAPOL_MIC_Key, + pKeyMgmtInfo->EAPOL_Encr_Key, + &pHskData->pwsKeyData, MFALSE); + + if (!IsEAPOL_MICValid(priv, rx_eapol_ptr, pKeyMgmtInfo->EAPOL_MIC_Key)) { + return FAIL; + } + + KeyMgmtStopHskTimer(connPtr); + connPtr->staData.keyMgmtInfo.numHskTries = 0; + + return GenerateApEapolMsg(priv, connPtr, MSG3_PENDING); +} + +Status_e +GeneratePWKMsg3(hostsa_private *priv, cm_Connection *connPtr) +{ + hostsa_mlan_fns *pm_fns = &priv->mlan_fns; + EAPOL_KeyMsg_Tx_t *tx_eapol_ptr; + UINT16 frameLen = 0, packet_len = 0; + apKeyMgmtInfoSta_t *pKeyMgmtInfo; + apInfo_t *pApInfo = &priv->apinfo; + BssConfig_t *pBssConfig = MNULL; + UINT32 replay_cnt[2]; + eapolHskData_t *pHskData; + pmlan_buffer pmbuf = MNULL; + + PRINTM(MMSG, "ENTER: %s\n", __FUNCTION__); + + pmbuf = pm_fns->hostsa_alloc_mlan_buffer(priv->pmlan_adapter, + MLAN_TX_DATA_BUF_SIZE_2K, 0, + MOAL_MALLOC_BUFFER); + if (pmbuf == NULL) { + PRINTM(MERROR, "allocate buffer fail for eapol \n"); + return FAIL; + } + + PrepDefaultEapolMsg(priv, connPtr, &tx_eapol_ptr, pmbuf); + + pBssConfig = &pApInfo->bssConfig; + + pKeyMgmtInfo = &connPtr->staData.keyMgmtInfo; + pHskData = &connPtr->hskData; + + incrementReplayCounter(pKeyMgmtInfo); + + replay_cnt[0] = pKeyMgmtInfo->counterHi; + replay_cnt[1] = pKeyMgmtInfo->counterLo; + + PopulateKeyMsg(priv, tx_eapol_ptr, + &pKeyMgmtInfo->rom.staUcstCipher, + ((PAIRWISE_KEY_MSG | SECURE_HANDSHAKE_FLAG) | + ((pKeyMgmtInfo->rom.staSecType. + wpa2) ? WPA2_HANDSHAKE : 0)), replay_cnt, + pHskData->ANonce); + + /* if (pKeyMgmtInfo->staSecType.wpa2) { // Netgear WAG511 and USB55 + cards don't like this field set to // anything other than zero. + Hence hard code this value to zero // in all outbound EAPOL + frames... // The client is now vulnerable to replay attacks from the + point // it receives EAP-message3 till reception of first + management // frame from uAP. + + tx_eapol_ptr->keyMsg.key_RSC[0] = + pApInfo->bssConfig.grpKeyData.TxIV16 & 0x00FF; + tx_eapol_ptr->keyMsg.key_RSC[1] = + (pApInfo->bssConfig.grpKeyData.TxIV16 >> 8) & 0x00FF; + memcpy((void*)(tx_eapol_ptr->keyMsg.key_RSC + 2), + &pApInfo->bssData.grpKeyData.TxIV32, 4); } */ +/* + pBcnFrame = (dot11MgtFrame_t *)BML_DATA_PTR(connPtr->pBcnBufferDesc); + if (pKeyMgmtInfo->rom.staSecType.wpa) + { + pWpaIE = syncSrv_ParseAttrib(pBcnFrame, + ELEM_ID_VENDOR_SPECIFIC, + IEEE_MSG_BEACON, + (UINT8 *)wpa_oui01, + sizeof(wpa_oui01)); + } + else if (pKeyMgmtInfo->rom.staSecType.wpa2) + { + pWpa2IE = syncSrv_ParseAttrib(pBcnFrame, + ELEM_ID_RSN, + IEEE_MSG_BEACON, + NULL, + 0); + }*/ + if (!KeyData_UpdateKeyMaterial(priv, tx_eapol_ptr, + &pKeyMgmtInfo->rom.staSecType, + pBssConfig->wpa_ie, + pBssConfig->rsn_ie)) { + /* We have WPA/WPA2 enabled but no corresponding IE */ + pm_fns->hostsa_free_mlan_buffer(pm_fns->pmlan_adapter, pmbuf); + return FAIL; + } + + if (pKeyMgmtInfo->rom.staSecType.wpa2) { // WPA2 + prepareKDE(priv, tx_eapol_ptr, + &pApInfo->bssData.grpKeyData, + &pApInfo->bssConfig.RsnConfig.mcstCipher); + + if (!Encrypt_keyData((t_void *)priv, tx_eapol_ptr, + pKeyMgmtInfo->EAPOL_Encr_Key, + &pKeyMgmtInfo->rom.staUcstCipher)) + { + pm_fns->hostsa_free_mlan_buffer(pm_fns->pmlan_adapter, + pmbuf); + return FAIL; + } + } + + frameLen = KeyMgmtSta_PopulateEAPOLLengthMic(priv, + tx_eapol_ptr, + pKeyMgmtInfo-> + EAPOL_MIC_Key, + pKeyMgmtInfo-> + EAPOLProtoVersion, + tx_eapol_ptr->keyMsg. + key_info. + KeyDescriptorVersion); + + packet_len = frameLen + sizeof(Hdr_8021x_t) + sizeof(ether_hdr_t); + UpdateEAPOLWcbLenAndTransmit(priv, pmbuf, packet_len); + return SUCCESS; +} + +Status_e +ProcessPWKMsg4(hostsa_private *priv, + cm_Connection *connPtr, t_u8 *pbuf, t_u32 len) +{ + hostsa_mlan_fns *pm_fns = &priv->mlan_fns; + EAPOL_KeyMsg_t *rx_eapol_ptr; + apKeyMgmtInfoSta_t *pKeyMgmtInfo; + eapolHskData_t *pHskData = &connPtr->hskData; + + pKeyMgmtInfo = &connPtr->staData.keyMgmtInfo; + rx_eapol_ptr = (EAPOL_KeyMsg_t *)(pbuf + ETHII_HEADER_LEN); + PRINTM(MMSG, "ENTER: %s\n", __FUNCTION__); + + if (!IsEAPOL_MICValid(priv, rx_eapol_ptr, pKeyMgmtInfo->EAPOL_MIC_Key)) { + return FAIL; + } + pHskData->pwsKeyData.TxIV16 = 0x0001; + pHskData->pwsKeyData.TxIV32 = 0; + + if (keyApi_ApUpdateKeyMaterial(priv, connPtr, FALSE)) { + handleFailedHSK(priv, connPtr, IEEEtypes_REASON_UNSPEC); + return FAIL; + } + + KeyMgmtStopHskTimer(connPtr); + connPtr->staData.keyMgmtInfo.numHskTries = 0; + if (pKeyMgmtInfo->rom.staSecType.wpa2) { + pm_fns->Hostsa_sendEventRsnConnect(priv->pmlan_private, + connPtr->mac_addr); + pKeyMgmtInfo->rom.keyMgmtState = HSK_END; + } else { + return GenerateApEapolMsg(priv, connPtr, GRPMSG1_PENDING); + } + + return SUCCESS; +} + +Status_e +GenerateGrpMsg1(hostsa_private *priv, cm_Connection *connPtr) +{ + hostsa_mlan_fns *pm_fns = &priv->mlan_fns; + EAPOL_KeyMsg_Tx_t *tx_eapol_ptr; + UINT16 frameLen = 0, packet_len = 0; + apKeyMgmtInfoSta_t *pKeyMgmtInfo; + apInfo_t *pApInfo = &priv->apinfo; + UINT32 replay_cnt[2]; + pmlan_buffer pmbuf = MNULL; + + PRINTM(MMSG, "ENTER: %s\n", __FUNCTION__); + + pmbuf = pm_fns->hostsa_alloc_mlan_buffer(priv->pmlan_adapter, + MLAN_TX_DATA_BUF_SIZE_2K, 0, + MOAL_MALLOC_BUFFER); + if (pmbuf == NULL) { + PRINTM(MERROR, "allocate buffer fail for eapol \n"); + return FAIL; + } + + PrepDefaultEapolMsg(priv, connPtr, &tx_eapol_ptr, pmbuf); + + pKeyMgmtInfo = &connPtr->staData.keyMgmtInfo; + + incrementReplayCounter(pKeyMgmtInfo); + + replay_cnt[0] = pKeyMgmtInfo->counterHi; + replay_cnt[1] = pKeyMgmtInfo->counterLo; + + PopulateKeyMsg(priv, tx_eapol_ptr, + &pApInfo->bssConfig.RsnConfig.mcstCipher, + (SECURE_HANDSHAKE_FLAG | + ((pKeyMgmtInfo->rom.staSecType. + wpa2) ? WPA2_HANDSHAKE : 0)), replay_cnt, + pApInfo->bssData.GNonce); + + KeyData_AddKey(priv, + tx_eapol_ptr, + &pKeyMgmtInfo->rom.staSecType, + &pApInfo->bssData.grpKeyData, + &pApInfo->bssConfig.RsnConfig.mcstCipher); + if (!Encrypt_keyData(priv, tx_eapol_ptr, + pKeyMgmtInfo->EAPOL_Encr_Key, + &pKeyMgmtInfo->rom.staUcstCipher)) + { + // nothing here. + } + + frameLen = KeyMgmtSta_PopulateEAPOLLengthMic(priv, + tx_eapol_ptr, + pKeyMgmtInfo-> + EAPOL_MIC_Key, + pKeyMgmtInfo-> + EAPOLProtoVersion, + tx_eapol_ptr->keyMsg. + key_info. + KeyDescriptorVersion); + + packet_len = frameLen + sizeof(Hdr_8021x_t) + sizeof(ether_hdr_t); + + UpdateEAPOLWcbLenAndTransmit(priv, pmbuf, packet_len); + return SUCCESS; +} + +Status_e +ProcessGrpMsg2(hostsa_private *priv, + cm_Connection *connPtr, t_u8 *pbuf, t_u32 len) +{ + hostsa_mlan_fns *pm_fns = &priv->mlan_fns; + EAPOL_KeyMsg_t *rx_eapol_ptr; + apKeyMgmtInfoSta_t *pKeyMgmtInfo; + + PRINTM(MMSG, "ENTER: %s\n", __FUNCTION__); + + rx_eapol_ptr = (EAPOL_KeyMsg_t *)(pbuf + ETHII_HEADER_LEN); + + pKeyMgmtInfo = &connPtr->staData.keyMgmtInfo; + + if (!IsEAPOL_MICValid(priv, rx_eapol_ptr, pKeyMgmtInfo->EAPOL_MIC_Key)) { + handleFailedHSK(priv, connPtr, IEEEtypes_REASON_IE_4WAY_DIFF); + return FAIL; + } + KeyMgmtStopHskTimer(connPtr); + connPtr->staData.keyMgmtInfo.numHskTries = 0; + + if (WAITING_4_GRPMSG2 == pKeyMgmtInfo->rom.keyMgmtState) { + /* sendEventRsnConnect(connPtr, pKeyMgmtInfo); */ + pm_fns->Hostsa_sendEventRsnConnect(priv->pmlan_private, + connPtr->mac_addr); + } + + pKeyMgmtInfo->rom.keyMgmtState = HSK_END; + + return SUCCESS; +} + +Status_e +GenerateApEapolMsg(hostsa_private *priv, + t_void *pconnPtr, keyMgmtState_e msgState) +{ + cm_Connection *connPtr = (cm_Connection *)pconnPtr; + Status_e status; + // OSASysContext prevContext; + + if (connPtr->timer_is_set) { + KeyMgmtStopHskTimer((t_void *)connPtr); + } + /* If msgState is any waiting_** state, ** it will decrease to + corresponding **_pending state. */ + /* Note: it will reduce the if checks */ + if ((msgState & 0x1) == 0) { + msgState--; + } + connPtr->staData.keyMgmtInfo.rom.keyMgmtState = msgState; + + if (msgState == MSG1_PENDING) { + status = GeneratePWKMsg1(priv, connPtr); + } else if (msgState == MSG3_PENDING) { + status = GeneratePWKMsg3(priv, connPtr); + } else if ((msgState == GRPMSG1_PENDING) + || (msgState == GRP_REKEY_MSG1_PENDING)) { + status = GenerateGrpMsg1(priv, connPtr); + } else { + // This should not happen + return FAIL; + } + if (SUCCESS == status) { + connPtr->staData.keyMgmtInfo.rom.keyMgmtState++; + } + + if (SUCCESS == status) { + connPtr->staData.keyMgmtInfo.numHskTries++; + /* we are starting the timer irrespective of whether the msg + generation is sucessful or not. This is because, if the msg + generation fails because of buffer unavailabilty then we can + re-try the msg after the timeout period. */ + if (!connPtr->timer_is_set) + KeyMgmtStartHskTimer(connPtr); + } + + return status; +} + +//#endif // AUTHENTICATOR + +void +ApMicErrTimerExpCb(t_void *context) +{ + cm_Connection *connPtr = (cm_Connection *)context; + phostsa_private priv = (phostsa_private)connPtr->priv; + // UINT32 int_save; + apInfo_t *pApInfo = &priv->apinfo; + + if (connPtr == NULL) { + // no AP connection. Do nothing, just return + return; + } + + switch (connPtr->staData.apMicError.status) { + case FIRST_MIC_FAIL_IN_60_SEC: + connPtr->staData.apMicError.status = NO_MIC_FAILURE; + break; + case SECOND_MIC_FAIL_IN_60_SEC: + if ((pApInfo->bssConfig.RsnConfig.mcstCipher.tkip) && + IsAuthenticatorEnabled(priv)) { + // re-enable the group re-key timer + pApInfo->bssData.grpRekeyCntRemaining + = pApInfo->bssData.grpRekeyCntConfigured; + } + connPtr->staData.apMicError.status = NO_MIC_FAILURE; + connPtr->staData.apMicError.disableStaAsso = 0; + + break; + default: + break; + } +} + +void +ApMicCounterMeasureInvoke(t_void *pconnPtr) +{ + cm_Connection *connPtr = (cm_Connection *)pconnPtr; + phostsa_private priv = (phostsa_private)connPtr->priv; + hostsa_mlan_fns *pm_fns = &priv->mlan_fns; + hostsa_util_fns *util_fns = &priv->util_fns; + apInfo_t *pApInfo = &priv->apinfo; + + if (connPtr->staData.apMicError.MICCounterMeasureEnabled) { + switch (connPtr->staData.apMicError.status) { + case NO_MIC_FAILURE: + util_fns->moal_start_timer(util_fns->pmoal_handle, + connPtr->staData.apMicTimer, + MFALSE, MRVDRV_TIMER_60S); + connPtr->staData.apMicError.status = + FIRST_MIC_FAIL_IN_60_SEC; + break; + + case FIRST_MIC_FAIL_IN_60_SEC: + connPtr->staData.apMicError.disableStaAsso = 1; + connPtr->staData.apMicError.status = + SECOND_MIC_FAIL_IN_60_SEC; + // start timer for 60 seconds + util_fns->moal_stop_timer(util_fns->pmoal_handle, + connPtr->staData.apMicTimer); + util_fns->moal_start_timer(util_fns->pmoal_handle, + connPtr->staData.apMicTimer, + MFALSE, MRVDRV_TIMER_60S); + + /* smeAPStateMgr_sendSmeMsg(connPtr, + MlmeApBcastDisassoc); */ + pm_fns->Hostsa_DisAssocAllSta(priv->pmlan_private, + IEEEtypes_REASON_MIC_FAILURE); + // if current GTK is tkip + if ((pApInfo->bssConfig.RsnConfig.mcstCipher.tkip) && + IsAuthenticatorEnabled(priv)) { + // Disable periodic group rekey and re-init + // GTK. + priv->GrpRekeyTimerIsSet = MFALSE; + pApInfo->bssData.grpRekeyCntRemaining = 0; + ReInitGTK(priv); + } + break; + + default: + break; + } + } + return; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtAp.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtAp.h new file mode 100644 index 00000000..5b2d577d --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtAp.h @@ -0,0 +1,64 @@ +/** @file keyMgntAP.h + * + * @brief This file contains the eapol paket process and key management for authenticator + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _KEYMGMTAP_H_ +#define _KEYMGMTAP_H_ +//Authenticator related data structures, function prototypes + +#include "wltypes.h" +#include "keyMgmtAp_rom.h" + +#define STA_PS_EAPOL_HSK_TIMEOUT 3000 // ms +#define AP_RETRY_EAPOL_HSK_TIMEOUT 1000 // ms + +extern void KeyMgmtInit(void *priv); +extern void ReInitGTK(void *priv); +int isValidReplayCount(t_void *priv, apKeyMgmtInfoSta_t *pKeyMgmtInfo, + UINT8 *pRxReplayCount); + +extern void KeyMgmtGrpRekeyCountUpdate(t_void *context); +extern void KeyMgmtStartHskTimer(void *context); +extern void KeyMgmtStopHskTimer(void *context); +extern void KeyMgmtHskTimeout(t_void *context); +extern UINT32 keyApi_ApUpdateKeyMaterial(void *priv, cm_Connection *connPtr, + BOOLEAN updateGrpKey); + +extern Status_e ProcessPWKMsg2(hostsa_private *priv, + cm_Connection *connPtr, t_u8 *pbuf, t_u32 len); +extern Status_e ProcessPWKMsg4(hostsa_private *priv, + cm_Connection *connPtr, t_u8 *pbuf, t_u32 len); +extern Status_e ProcessGrpMsg2(hostsa_private *priv, + cm_Connection *connPtr, t_u8 *pbuf, t_u32 len); +extern Status_e GenerateApEapolMsg(hostsa_private *priv, + t_void *pconnPtr, keyMgmtState_e msgState); +extern void ApMicErrTimerExpCb(t_void *context); +extern void ApMicCounterMeasureInvoke(t_void *pconnPtr); +extern t_u16 keyMgmtAp_FormatWPARSN_IE(void *priv, + IEEEtypes_InfoElementHdr_t *pIe, + UINT8 isRsn, + Cipher_t *pCipher, + UINT8 cipherCount, + Cipher_t *pMcastCipher, + UINT16 authKey, UINT16 authKeyCount); +#endif // _KEYMGMTAP_H_ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtApStaCommon.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtApStaCommon.c new file mode 100644 index 00000000..c1a9f600 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtApStaCommon.c @@ -0,0 +1,677 @@ +/** @file keyMgmtApStaCommon.c + * + * @brief This file defines common api for authenticator and supplicant. + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +//Authenticator related function definitions +#include "wltypes.h" +#include "IEEE_types.h" + +#include "hostsa_ext_def.h" +#include "authenticator.h" + +#include "keyMgmtAp_rom.h" +#include "crypt_new_rom.h" +#include "keyCommonDef.h" +#include "pmkCache_rom.h" +#include "crypt_new_rom.h" +#include "rc4_rom.h" +#include "aes_cmac_rom.h" +#include "sha1.h" +#include "md5.h" +#include "mrvl_sha256_crypto.h" + +const UINT8 wpa_oui_none[4] = { 0x00, 0x50, 0xf2, 0x00 }; +const UINT8 wpa_oui01[4] = { 0x00, 0x50, 0xf2, 0x01 }; +const UINT8 wpa_oui02[4] = { 0x00, 0x50, 0xf2, 0x02 }; +const UINT8 wpa_oui03[4] = { 0x00, 0x50, 0xf2, 0x03 }; +const UINT8 wpa_oui04[4] = { 0x00, 0x50, 0xf2, 0x04 }; +const UINT8 wpa_oui05[4] = { 0x00, 0x50, 0xf2, 0x05 }; +const UINT8 wpa_oui06[4] = { 0x00, 0x50, 0xf2, 0x06 }; + +const UINT8 wpa2_oui01[4] = { 0x00, 0x0f, 0xac, 0x01 }; +const UINT8 wpa2_oui02[4] = { 0x00, 0x0f, 0xac, 0x02 }; +const UINT8 wpa2_oui03[4] = { 0x00, 0x0f, 0xac, 0x03 }; +const UINT8 wpa2_oui04[4] = { 0x00, 0x0f, 0xac, 0x04 }; +const UINT8 wpa2_oui05[4] = { 0x00, 0x0f, 0xac, 0x05 }; +const UINT8 wpa2_oui06[4] = { 0x00, 0x0f, 0xac, 0x06 }; + +const UINT8 wpa_oui[3] = { 0x00, 0x50, 0xf2 }; +const UINT8 kde_oui[3] = { 0x00, 0x0f, 0xac }; + +/** + * @brief strlen + * + * @param str A pointer to string + * + * @return Length of string + */ +t_u32 +wlan_strlen(const char *str) +{ + t_u32 i; + + for (i = 0; str[i] != 0; i++) { + } + return i; +} + +static t_u32 +srand_new(void *priv) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + t_u32 sec, usec; + + ENTER(); + get_system_time(util_fns, &sec, &usec); + sec = (sec & 0xFFFF) + (sec >> 16); + usec = (usec & 0xFFFF) + (usec >> 16); + + LEAVE(); + return (usec << 16) | sec; +} + +static unsigned int +rand_new(unsigned int seed, UINT32 randvaule) +{ + unsigned int next = seed; + unsigned int result; + + next *= (3515245 * randvaule + randvaule * next); + next += 12345 + randvaule * 7; + result = (unsigned int)(next / 65536) % 2048; + + next *= (39018768 * randvaule + randvaule * next); + next += 56789 + randvaule * 4; + result <<= 10; + result ^= (unsigned int)(next / 65536) % 1024; + + next *= (89042053 * randvaule + randvaule * next); + next += 43728 + randvaule * 9; + result <<= 10; + result ^= (unsigned int)(next / 65536) % 1024; + + return result; +} + +void +supplicantGenerateRand(hostsa_private *priv, UINT8 *dataOut, UINT32 length) +{ + UINT32 i; + // UINT32 valueHi, valueLo; + + /* Read mac 0 timer. ** Doesn't matter which one we read. We just need + a good seed. */ + // msi_wl_GetMCUCoreTimerTxTSF(&valueHi, &valueLo); + // srand(valueLo); + for (i = 0; i < length; i++) { + // dataOut[i] = rand(); + dataOut[i] = rand_new(srand_new(priv), i + 1); + } +} + +void +SetEAPOLKeyDescTypeVersion(EAPOL_KeyMsg_Tx_t *pTxEapol, + BOOLEAN isWPA2, BOOLEAN isKDF, BOOLEAN nonTKIP) +{ + if (isWPA2) { + /* WPA2 */ + pTxEapol->keyMsg.desc_type = 2; + } else { + /* WPA */ + pTxEapol->keyMsg.desc_type = 254; + } + + if (isKDF) { + /* 802.11r and 802.11w use SHA256-KDF and a different + KeyDescVer */ + pTxEapol->keyMsg.key_info.KeyDescriptorVersion = 3; + } else if (nonTKIP) { + /* CCMP */ + pTxEapol->keyMsg.key_info.KeyDescriptorVersion = 2; + } else { + /* TKIP OR WEP */ + pTxEapol->keyMsg.key_info.KeyDescriptorVersion = 1; + } +} + +void +ComputeEAPOL_MIC(phostsa_private priv, EAPOL_KeyMsg_t *pKeyMsg, + UINT16 data_length, + UINT8 *MIC_Key, UINT8 MIC_Key_length, UINT8 micKeyDescVersion) +{ + int len = data_length; + UINT8 *pMicData; + + pMicData = (UINT8 *)pKeyMsg; + + /* Allow the caller to override the algorithm used to get by some Cisco + ** CCX bugs where the wrong MIC algorithm is used */ + if (micKeyDescVersion == 0) { + /* Algorithm not specified, use proper one from key_info */ + micKeyDescVersion = pKeyMsg->key_info.KeyDescriptorVersion; + } + + switch (micKeyDescVersion) { + case 3: + /* AES-128-CMAC */ + mrvl_aes_cmac(priv, MIC_Key, pMicData, len, + (UINT8 *)pKeyMsg->key_MIC); + break; + + case 2: + /* CCMP */ + Mrvl_hmac_sha1((t_void *)priv, &pMicData, + &len, + 1, + MIC_Key, + (int)MIC_Key_length, + (UINT8 *)pKeyMsg->key_MIC, EAPOL_MIC_SIZE); + break; + + default: + case 1: + /* TKIP or WEP */ + Mrvl_hmac_md5((t_void *)priv, pMicData, + data_length, + MIC_Key, + (int)MIC_Key_length, (UINT8 *)pKeyMsg->key_MIC); + break; + } +} + +/* Returns TRUE if EAPOL MIC check passes, FALSE otherwise. */ +BOOLEAN +IsEAPOL_MICValid(phostsa_private priv, EAPOL_KeyMsg_t *pKeyMsg, UINT8 *pMICKey) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + UINT8 msgMIC[EAPOL_MIC_SIZE]; + + /* pull the MIC */ + memcpy(util_fns, (UINT8 *)msgMIC, (UINT8 *)pKeyMsg->key_MIC, + EAPOL_MIC_SIZE); + + /* zero the MIC key field before calculating the data */ + memset(util_fns, (UINT8 *)pKeyMsg->key_MIC, 0x00, EAPOL_MIC_SIZE); + + ComputeEAPOL_MIC(priv, pKeyMsg, (ntohs(pKeyMsg->hdr_8021x.pckt_body_len) + + sizeof(pKeyMsg->hdr_8021x)), + pMICKey, EAPOL_MIC_KEY_SIZE, 0); + + if (memcmp(util_fns, (UINT8 *)pKeyMsg->key_MIC, msgMIC, EAPOL_MIC_SIZE)) { +#ifdef KEYMSG_DEBUG + hostEventPrintf(assocAgent_getConnPtr(), + "EAPOL MIC Failure: cmac(%d), sha1(%d), md5(%d)", + (pKeyMsg->key_info.KeyDescriptorVersion == 3), + (pKeyMsg->key_info.KeyDescriptorVersion == 2), + (pKeyMsg->key_info.KeyDescriptorVersion == 1)); +#endif + /* MIC Failure */ + return FALSE; + } + + return TRUE; +} + +void +supplicantConstructContext(phostsa_private priv, UINT8 *pAddr1, + UINT8 *pAddr2, + UINT8 *pNonce1, UINT8 *pNonce2, UINT8 *pContext) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + if (memcmp(util_fns, pAddr1, pAddr2, 6) < 0) { + memcpy(util_fns, pContext, pAddr1, sizeof(IEEEtypes_MacAddr_t)); + memcpy(util_fns, (pContext + 6), pAddr2, + sizeof(IEEEtypes_MacAddr_t)); + } else { + memcpy(util_fns, pContext, pAddr2, sizeof(IEEEtypes_MacAddr_t)); + memcpy(util_fns, (pContext + 6), pAddr1, + sizeof(IEEEtypes_MacAddr_t)); + } + + if (memcmp(util_fns, pNonce1, pNonce2, NONCE_SIZE) < 0) { + memcpy(util_fns, pContext + 6 + 6, pNonce1, NONCE_SIZE); + memcpy(util_fns, pContext + 6 + 6 + NONCE_SIZE, pNonce2, + NONCE_SIZE); + } else { + memcpy(util_fns, pContext + 6 + 6, pNonce2, NONCE_SIZE); + memcpy(util_fns, pContext + 6 + 6 + NONCE_SIZE, pNonce1, + NONCE_SIZE); + } +} + +UINT16 +KeyMgmtSta_PopulateEAPOLLengthMic(phostsa_private priv, + EAPOL_KeyMsg_Tx_t *pTxEapol, + UINT8 *pEAPOLMICKey, + UINT8 eapolProtocolVersion, + UINT8 forceKeyDescVersion) +{ + UINT16 frameLen; + +#if 0 // !defined(REMOVE_PATCH_HOOKS) + if (KeyMgmtSta_PopulateEAPOLLengthMic_hook(pTxEapol, + pEAPOLMICKey, + eapolProtocolVersion, + forceKeyDescVersion, + &frameLen)) { + return frameLen; + } +#endif + + if (!pTxEapol) { + return 0; + } + + frameLen = sizeof(pTxEapol->keyMsg); + frameLen -= sizeof(pTxEapol->keyMsg.hdr_8021x); + frameLen -= sizeof(pTxEapol->keyMsg.key_data); + frameLen += pTxEapol->keyMsg.key_material_len; + + pTxEapol->keyMsg.hdr_8021x.protocol_ver = eapolProtocolVersion; + pTxEapol->keyMsg.hdr_8021x.pckt_type = IEEE_8021X_PACKET_TYPE_EAPOL_KEY; + pTxEapol->keyMsg.hdr_8021x.pckt_body_len = htons(frameLen); + + pTxEapol->keyMsg.key_material_len + = htons(pTxEapol->keyMsg.key_material_len); + + ComputeEAPOL_MIC(priv, &pTxEapol->keyMsg, + frameLen + sizeof(pTxEapol->keyMsg.hdr_8021x), + pEAPOLMICKey, EAPOL_MIC_KEY_SIZE, forceKeyDescVersion); + + return frameLen; +} + +/* +** This function generates the Pairwise transient key +*/ +void +KeyMgmt_DerivePTK(phostsa_private priv, UINT8 *pAddr1, + UINT8 *pAddr2, + UINT8 *pNonce1, + UINT8 *pNonce2, UINT8 *pPTK, UINT8 *pPMK, BOOLEAN use_kdf) +{ + UINT8 *pContext; + char *prefix; + + /* pPTK is expected to be an encryption pool buffer (at least 500 + bytes). ** ** Use the first portion for the ptk output. Use memory + in the end of ** the buffer for the context construction (76 bytes). + ** ** The sha256 routine assumes available memory after the context + for its ** own sha256 output. Space after the context (76 bytes) is + required ** for 2 digests (2 * 32). pContext must have at least 76 + + 64 bytes ** available. */ + pContext = pPTK + 200; + + supplicantConstructContext(priv, pAddr1, pAddr2, pNonce1, pNonce2, + pContext); + + prefix = "Pairwise key expansion"; + + if (use_kdf) { + mrvl_sha256_crypto_kdf((t_void *)priv, pPMK, PMK_LEN_MAX, prefix, 22, /* strlen(prefix) + */ + pContext, 76, /* sizeof constructed + context */ + pPTK, 384); + } else { + Mrvl_PRF((void *)priv, pPMK, PMK_LEN_MAX, (UINT8 *)prefix, 22, /* strlen(prefix) + */ + pContext, 76, /* sizeof constructed context */ + pPTK, 64); + } +} + +void +KeyMgmtSta_DeriveKeys(hostsa_private *priv, UINT8 *pPMK, + UINT8 *da, + UINT8 *sa, + UINT8 *ANonce, + UINT8 *SNonce, + UINT8 *EAPOL_MIC_Key, + UINT8 *EAPOL_Encr_Key, + KeyData_t *newPWKey, BOOLEAN use_kdf) +{ + hostsa_util_fns *util_fns = &priv->util_fns; +// phostsa_private psapriv = (phostsa_private) priv; + // hostsa_util_fns *util_fns = &psapriv->util_fns; + // BufferDesc_t* pBufDesc = NULL; + UINT8 buf[500] = { 0 }; + TkipPtk_t *pPtk; + +#if 0 +#if !defined(REMOVE_PATCH_HOOKS) + if (KeyMgmtSta_DeriveKeys_hook(pPMK, + da, + sa, + ANonce, + SNonce, + EAPOL_MIC_Key, + EAPOL_Encr_Key, newPWKey, use_kdf)) { + return; + } +#endif +#endif + if (!pPMK || !EAPOL_MIC_Key || !newPWKey) { + return; + } +#if 0 + /* Wait forever ensures a buffer */ + pBufDesc = (BufferDesc_t *) bml_AllocBuffer(ramHook_encrPoolConfig, + 500, BML_WAIT_FOREVER); + pPtk = (TkipPtk_t *)BML_DATA_PTR(pBufDesc); +#endif + pPtk = (TkipPtk_t *)buf; + + KeyMgmt_DerivePTK(priv, sa, da, ANonce, SNonce, (UINT8 *)pPtk, pPMK, + use_kdf); + + memcpy(util_fns, EAPOL_MIC_Key, pPtk->kck, sizeof(pPtk->kck)); + memcpy(util_fns, EAPOL_Encr_Key, pPtk->kek, sizeof(pPtk->kek)); + memcpy(util_fns, newPWKey->Key, pPtk->tk, sizeof(pPtk->tk)); + + memcpy(util_fns, newPWKey->RxMICKey, + pPtk->rxMicKey, sizeof(pPtk->rxMicKey)); + + memcpy(util_fns, newPWKey->TxMICKey, + pPtk->txMicKey, sizeof(pPtk->txMicKey)); + +// bml_FreeBuffer((UINT32)pBufDesc); +} + +void +UpdateEAPOLWcbLenAndTransmit(hostsa_private *priv, pmlan_buffer pmbuf, + UINT16 frameLen) +{ + hostsa_mlan_fns *pm_fns = &priv->mlan_fns; + + pm_fns->hostsa_tx_packet(priv->pmlan_private, pmbuf, frameLen); +} + +void +formEAPOLEthHdr(phostsa_private priv, EAPOL_KeyMsg_Tx_t *pTxEapol, + t_u8 *da, t_u8 *sa) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + memcpy(util_fns, (void *)pTxEapol->ethHdr.da, da, + IEEEtypes_ADDRESS_SIZE); + memcpy(util_fns, (void *)pTxEapol->ethHdr.sa, sa, + IEEEtypes_ADDRESS_SIZE); + pTxEapol->ethHdr.type = 0x8E88; +} + +void +supplicantParseWpaIe(phostsa_private priv, IEEEtypes_WPAElement_t *pIe, + SecurityMode_t *pWpaType, + Cipher_t *pMcstCipher, + Cipher_t *pUcstCipher, + AkmSuite_t *pAkmList, UINT8 akmOutMax) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + IEEEtypes_WPAElement_t *pTemp = pIe; + int count; + int akmCount = akmOutMax; + AkmSuite_t *pAkm = pAkmList; + + memset(util_fns, pMcstCipher, 0x00, sizeof(Cipher_t)); + memset(util_fns, pUcstCipher, 0x00, sizeof(Cipher_t)); + memset(util_fns, pAkmList, 0x00, akmOutMax * sizeof(AkmSuite_t)); + memset(util_fns, pWpaType, 0x00, sizeof(SecurityMode_t)); + + pWpaType->wpa = 1; + + /* record the AP's multicast cipher */ + if (!memcmp + (util_fns, (char *)pTemp->GrpKeyCipher, wpa_oui02, + sizeof(wpa_oui02))) { + /* WPA TKIP */ + pMcstCipher->tkip = 1; + } else if (!memcmp + (util_fns, (char *)pTemp->GrpKeyCipher, wpa_oui04, + sizeof(wpa_oui04))) { + /* WPA AES */ + pMcstCipher->ccmp = 1; + } else if (!memcmp + (util_fns, (char *)pTemp->GrpKeyCipher, wpa_oui01, + sizeof(wpa_oui01))) { + /* WPA WEP 40 */ + pMcstCipher->wep40 = 1; + } else if (!memcmp + (util_fns, (char *)pTemp->GrpKeyCipher, wpa_oui05, + sizeof(wpa_oui05))) { + /* WPA WEP 104 */ + pMcstCipher->wep104 = 1; + } + + count = pTemp->PwsKeyCnt; + + while (count) { + /* record the AP's unicast cipher */ + if (!memcmp(util_fns, (char *)pTemp->PwsKeyCipherList, + wpa_oui02, sizeof(wpa_oui02))) { + /* WPA TKIP */ + pUcstCipher->tkip = 1; + } else if (!memcmp(util_fns, (char *)pTemp->PwsKeyCipherList, + wpa_oui04, sizeof(wpa_oui04))) { + /* WPA AES */ + pUcstCipher->ccmp = 1; + } + count--; + + if (count) { + pTemp = (IEEEtypes_WPAElement_t *)((UINT8 *)pTemp + + sizeof(pTemp-> + PwsKeyCipherList)); + } + } + + count = pTemp->AuthKeyCnt; + + while (count) { + if (akmCount) { + /* Store the AKM */ + memcpy(util_fns, pAkm, + (char *)pTemp->AuthKeyList, + sizeof(pTemp->AuthKeyList)); + pAkm++; + akmCount--; + } + + count--; + + if (count) { + pTemp = (IEEEtypes_WPAElement_t *)((UINT8 *)pTemp + + + sizeof(pTemp-> + AuthKeyList)); + } + } + + if (!memcmp(util_fns, pAkmList, wpa_oui_none, sizeof(wpa_oui_none))) { + pWpaType->wpaNone = 1; + } +} + +void +supplicantParseMcstCipher(phostsa_private priv, Cipher_t *pMcstCipherOut, + UINT8 *pGrpKeyCipher) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + memset(util_fns, pMcstCipherOut, 0x00, sizeof(Cipher_t)); + + /* record the AP's multicast cipher */ + if (!memcmp(util_fns, pGrpKeyCipher, wpa2_oui02, sizeof(wpa2_oui02))) { + /* WPA2 TKIP */ + pMcstCipherOut->tkip = 1; + } else if (!memcmp + (util_fns, pGrpKeyCipher, wpa2_oui04, sizeof(wpa2_oui04))) { + /* WPA2 AES */ + pMcstCipherOut->ccmp = 1; + } else if (!memcmp + (util_fns, pGrpKeyCipher, wpa2_oui01, sizeof(wpa2_oui01))) { + /* WPA2 WEP 40 */ + pMcstCipherOut->wep40 = 1; + } else if (!memcmp + (util_fns, pGrpKeyCipher, wpa2_oui05, sizeof(wpa2_oui05))) { + /* WPA2 WEP 104 */ + pMcstCipherOut->wep104 = 1; + } +} + +void +supplicantParseUcstCipher(phostsa_private priv, Cipher_t *pUcstCipherOut, + UINT8 pwsKeyCnt, UINT8 *pPwsKeyCipherList) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + UINT8 count; + + memset(util_fns, pUcstCipherOut, 0x00, sizeof(Cipher_t)); + + /* Cycle through the PwsKeyCipherList and record each unicast cipher */ + for (count = 0; count < pwsKeyCnt; count++) { + /* record the AP's unicast cipher */ + if (!memcmp(util_fns, pPwsKeyCipherList + (count * 4), + wpa2_oui02, sizeof(wpa2_oui02))) { + /* WPA2 TKIP */ + pUcstCipherOut->tkip = 1; + } else if (!memcmp(util_fns, pPwsKeyCipherList + (count * 4), + wpa2_oui04, sizeof(wpa2_oui04))) { + /* WPA2 AES */ + pUcstCipherOut->ccmp = 1; + } + } +} + +void +supplicantParseRsnIe(phostsa_private priv, IEEEtypes_RSNElement_t *pRsnIe, + SecurityMode_t *pWpaTypeOut, + Cipher_t *pMcstCipherOut, + Cipher_t *pUcstCipherOut, + AkmSuite_t *pAkmListOut, + UINT8 akmOutMax, + IEEEtypes_RSNCapability_t *pRsnCapOut, + Cipher_t *pGrpMgmtCipherOut) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + UINT8 *pIeData; + UINT8 *pIeEnd; + UINT8 *pGrpKeyCipher; + UINT16 pwsKeyCnt; + UINT8 *pPwsKeyCipherList; + UINT16 authKeyCnt; + UINT8 *pAuthKeyList; + + IEEEtypes_RSNCapability_t *pRsnCap; + + UINT16 *pPMKIDCnt; + + UINT8 *pGrpMgmtCipher; +#if 0 +#if !defined(REMOVE_PATCH_HOOKS) + if (supplicantParseRsnIe_hook(pRsnIe, + pWpaTypeOut, + pMcstCipherOut, + pUcstCipherOut, + pAkmListOut, + akmOutMax, + pRsnCapOut, pGrpMgmtCipherOut)) { + return; + } +#endif +#endif + memset(util_fns, pWpaTypeOut, 0x00, sizeof(SecurityMode_t)); + + pWpaTypeOut->wpa2 = 1; + + /* Set the start and end of the IE data */ + pIeData = (UINT8 *)&pRsnIe->Ver; + pIeEnd = pIeData + pRsnIe->Len; + + /* Skip past the version field */ + pIeData += sizeof(pRsnIe->Ver); + + /* Parse the group key cipher list */ + pGrpKeyCipher = pIeData; + pIeData += sizeof(pRsnIe->GrpKeyCipher); + supplicantParseMcstCipher(priv, pMcstCipherOut, pGrpKeyCipher); + + /* Parse the pairwise key cipher list */ + memcpy(util_fns, &pwsKeyCnt, pIeData, sizeof(pwsKeyCnt)); + pIeData += sizeof(pRsnIe->PwsKeyCnt); + + pPwsKeyCipherList = pIeData; + pIeData += pwsKeyCnt * sizeof(pRsnIe->PwsKeyCipherList); + supplicantParseUcstCipher(priv, pUcstCipherOut, pwsKeyCnt, + pPwsKeyCipherList); + + /* Parse and return the AKM list */ + memcpy(util_fns, &authKeyCnt, pIeData, sizeof(authKeyCnt)); + pIeData += sizeof(pRsnIe->AuthKeyCnt); + + pAuthKeyList = pIeData; + pIeData += authKeyCnt * sizeof(pRsnIe->AuthKeyList); + memset(util_fns, pAkmListOut, 0x00, akmOutMax * sizeof(AkmSuite_t)); + memcpy(util_fns, pAkmListOut, + pAuthKeyList, + MIN(authKeyCnt, akmOutMax) * sizeof(pRsnIe->AuthKeyList)); + + DBG_HEXDUMP(MCMD_D, " pAuthKeyList", + (t_u8 *)pAuthKeyList, MIN(authKeyCnt, + akmOutMax) * + sizeof(pRsnIe->AuthKeyList)); + DBG_HEXDUMP(MCMD_D, " pAuthKeyList", (t_u8 *)pAkmListOut, + MIN(authKeyCnt, akmOutMax) * sizeof(pRsnIe->AuthKeyList)); + /* Check if the RSN Capability is included */ + if (pIeData < pIeEnd) { + pRsnCap = (IEEEtypes_RSNCapability_t *)pIeData; + pIeData += sizeof(pRsnIe->RsnCap); + + if (pRsnCapOut) { + memcpy(util_fns, pRsnCapOut, pRsnCap, + sizeof(IEEEtypes_RSNCapability_t)); + } + } + + /* Check if the PMKID count is included */ + if (pIeData < pIeEnd) { + pPMKIDCnt = (UINT16 *)pIeData; + pIeData += sizeof(pRsnIe->PMKIDCnt); + + /* Check if the PMKID List is included */ + if (pIeData < pIeEnd) { + /* pPMKIDList = pIeData; <-- Currently not used in + parsing */ + pIeData += *pPMKIDCnt * sizeof(pRsnIe->PMKIDList); + } + } + + /* Check if the Group Mgmt Cipher is included */ + if (pIeData < pIeEnd) { + pGrpMgmtCipher = pIeData; + + if (pGrpMgmtCipherOut) { + memcpy(util_fns, pGrpMgmtCipherOut, + pGrpMgmtCipher, sizeof(pRsnIe->GrpMgmtCipher)); + } + } +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtApStaCommon.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtApStaCommon.h new file mode 100644 index 00000000..d1e92258 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtApStaCommon.h @@ -0,0 +1,83 @@ +/** @file keyMgmtApStaCommon.h + * + * @brief This file contains common api for authenticator and supplicant. + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef KEYMGMTAPSTACOMMON_H__ +#define KEYMGMTAPSTACOMMON_H__ +//Authenticator related data structures, function prototypes + +#include "wltypes.h" +#include "IEEE_types.h" +#include "sha1.h" +#include "keyMgmtStaTypes.h" +#include "wl_macros.h" +#include "keyMgmtApTypes.h" +#include "rc4_rom.h" + +#include "keyCommonDef.h" +#include "authenticator.h" + +extern t_u32 wlan_strlen(const char *str); +extern void supplicantGenerateRand(hostsa_private *priv, UINT8 *dataOut, + UINT32 length); +extern void SetEAPOLKeyDescTypeVersion(EAPOL_KeyMsg_Tx_t *pTxEapol, + BOOLEAN isWPA2, BOOLEAN isKDF, + BOOLEAN nonTKIP); +extern void ComputeEAPOL_MIC(phostsa_private priv, EAPOL_KeyMsg_t *pKeyMsg, + UINT16 data_length, UINT8 *MIC_Key, + UINT8 MIC_Key_length, UINT8 micKeyDescVersion); +extern BOOLEAN IsEAPOL_MICValid(phostsa_private priv, EAPOL_KeyMsg_t *pKeyMsg, + UINT8 *pMICKey); +extern void supplicantConstructContext(phostsa_private priv, UINT8 *pAddr1, + UINT8 *pAddr2, UINT8 *pNonce1, + UINT8 *pNonce2, UINT8 *pContext); +extern UINT16 KeyMgmtSta_PopulateEAPOLLengthMic(phostsa_private priv, + EAPOL_KeyMsg_Tx_t *pTxEapol, + UINT8 *pEAPOLMICKey, + UINT8 eapolProtocolVersion, + UINT8 forceKeyDescVersion); +extern void KeyMgmt_DerivePTK(phostsa_private priv, UINT8 *pAddr1, + UINT8 *pAddr2, UINT8 *pNonce1, UINT8 *pNonce2, + UINT8 *pPTK, UINT8 *pPMK, BOOLEAN use_kdf); +extern void KeyMgmtSta_DeriveKeys(hostsa_private *priv, UINT8 *pPMK, UINT8 *da, + UINT8 *sa, UINT8 *ANonce, UINT8 *SNonce, + UINT8 *EAPOL_MIC_Key, UINT8 *EAPOL_Encr_Key, + KeyData_t *newPWKey, BOOLEAN use_kdf); +extern void UpdateEAPOLWcbLenAndTransmit(hostsa_private *priv, + pmlan_buffer pmbuf, UINT16 frameLen); +extern void formEAPOLEthHdr(phostsa_private priv, EAPOL_KeyMsg_Tx_t *pTxEapol, + t_u8 *da, t_u8 *sa); +extern void supplicantParseWpaIe(phostsa_private priv, + IEEEtypes_WPAElement_t *pIe, + SecurityMode_t *pWpaType, + Cipher_t *pMcstCipher, Cipher_t *pUcstCipher, + AkmSuite_t *pAkmList, UINT8 akmOutMax); +extern void supplicantParseRsnIe(phostsa_private priv, + IEEEtypes_RSNElement_t *pRsnIe, + SecurityMode_t *pWpaTypeOut, + Cipher_t *pMcstCipherOut, + Cipher_t *pUcstCipherOut, + AkmSuite_t *pAkmListOut, UINT8 akmOutMax, + IEEEtypes_RSNCapability_t *pRsnCapOut, + Cipher_t *pGrpMgmtCipherOut); +#endif // KEYMGMTAPSTACOMMON_H__ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtApTypes.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtApTypes.h new file mode 100644 index 00000000..66090706 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtApTypes.h @@ -0,0 +1,68 @@ +/** @file KeyMgmtApTypes.h + * + * @brief This file contains the key management type for ap + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _KEYMGMTAPTYPES_H_ +#define _KEYMGMTAPTYPES_H_ + +#include "wltypes.h" +#include "IEEE_types.h" +#include "keyMgmtStaTypes.h" +#include "keyMgmtApTypes_rom.h" +#include "keyCommonDef.h" + +typedef enum { + STA_ASSO_EVT, + MSGRECVD_EVT, + KEYMGMTTIMEOUT_EVT, + GRPKEYTIMEOUT_EVT, + UPDATEKEYS_EVT +} keyMgmt_HskEvent_e; + +/* Fields till keyMgmtState are being accessed in rom code and + * should be kept intact. Fields after keyMgmtState can be changed + * safely. + */ +typedef struct { + apKeyMgmtInfoStaRom_t rom; + UINT8 numHskTries; + UINT32 counterLo; + UINT32 counterHi; + UINT8 EAPOL_MIC_Key[EAPOL_MIC_KEY_SIZE]; + UINT8 EAPOL_Encr_Key[EAPOL_ENCR_KEY_SIZE]; + UINT8 EAPOLProtoVersion; + UINT8 rsvd[3]; +} apKeyMgmtInfoSta_t; + +/* Convert an Ascii character to a hex nibble + e.g. Input is 'b' : Output will be 0xb + Input is 'E' : Output will be 0xE + Input is '8' : Output will be 0x8 + Assumption is that input is a-f or A-F or 0-9 +*/ +#define ASCII2HEX(Asc) (((Asc) >= 'a') ? (Asc - 'a' + 0xA)\ + : ( (Asc) >= 'A' ? ( (Asc) - 'A' + 0xA ) : ((Asc) - '0') )) + +#define ETH_P_EAPOL 0x8E88 + +#endif // _KEYMGMTAPTYPES_H_ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtApTypes_rom.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtApTypes_rom.h new file mode 100644 index 00000000..1fff322d --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtApTypes_rom.h @@ -0,0 +1,63 @@ +/** @file KeyMgmtApTypes_rom.h + * + * @brief This file contains the key management type for ap + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _KEYMGMTAPTYPES_ROM_H_ +#define _KEYMGMTAPTYPES_ROM_H_ + +#include "wltypes.h" +#include "keyMgmtStaTypes.h" + +#define KDE_IE_SIZE (2) // type+length of KDE_t +#define KDE_SIZE (KDE_IE_SIZE + 4 ) // OUI+datatype of KDE_t +#define GTK_IE_SIZE (2) +#define KEYDATA_SIZE (4 + GTK_IE_SIZE + TK_SIZE) // OUI+datatype+ + // GTK_IE+ GTK + +typedef enum { + HSK_NOT_STARTED, + MSG1_PENDING, + WAITING_4_MSG2, + MSG3_PENDING, + WAITING_4_MSG4, + GRPMSG1_PENDING, + WAITING_4_GRPMSG2, + GRP_REKEY_MSG1_PENDING, + WAITING_4_GRP_REKEY_MSG2, + /* the relative positions of the different enum elements ** should not + be changed since FW code checks for even/odd ** values at certain + places. */ + HSK_DUMMY_STATE, + HSK_END +} keyMgmtState_e; + +/* This sturcture is being accessed in rom code and should be kept intact. */ +typedef struct { + UINT16 staRsnCap; + SecurityMode_t staSecType; + Cipher_t staUcstCipher; + UINT8 staAkmType; + keyMgmtState_e keyMgmtState; +} apKeyMgmtInfoStaRom_t; + +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtAp_rom.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtAp_rom.c new file mode 100644 index 00000000..4221b4ca --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtAp_rom.c @@ -0,0 +1,574 @@ +/** @file keyMgmtAp_rom.c + * + * @brief This file defines api for key managment + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +//Authenticator related function definitions +#include "wltypes.h" +#include "IEEE_types.h" + +#include "hostsa_ext_def.h" +#include "authenticator.h" + +#include "keyMgmtAp_rom.h" +#include "crypt_new_rom.h" +#include "keyCommonDef.h" +#include "pmkCache_rom.h" +#include "crypt_new_rom.h" +#include "rc4_rom.h" +#include "aes_cmac_rom.h" +#include "sha1.h" +#include "md5.h" +#include "mrvl_sha256_crypto.h" + +UINT32 +util_FindLowestBitSet(UINT32 val) +{ + UINT32 bitmap = 1; + + while (bitmap && (!(bitmap & val))) { + bitmap <<= 1; + } + + return bitmap; +} + +UINT8 +convertMrvlAuthToIEEEAuth(UINT32 mrvlauth) +{ + UINT8 auth; + + switch (mrvlauth) { + case UAP_HOSTCMD_KEYMGMT_EAP: + auth = IEEEtypes_RSN_AUTH_KEY_SUITE_8021X; + break; + case UAP_HOSTCMD_KEYMGMT_PSK: + auth = IEEEtypes_RSN_AUTH_KEY_SUITE_PSK; + break; + case UAP_HOSTCMD_KEYMGMT_NONE: + default: + auth = IEEEtypes_RSN_AUTH_KEY_SUITE_RSVD; + break; + } + return auth; +} + +UINT32 +convertIEEEAuthToMrvlAuth(UINT8 auth) +{ + UINT32 MrvlAuth = 0; + switch (auth) { + case IEEEtypes_RSN_AUTH_KEY_SUITE_8021X: + MrvlAuth |= UAP_HOSTCMD_KEYMGMT_EAP; + break; + case IEEEtypes_RSN_AUTH_KEY_SUITE_PSK: + MrvlAuth |= UAP_HOSTCMD_KEYMGMT_PSK; + break; + case IEEEtypes_RSN_AUTH_KEY_SUITE_RSVD: + default: + MrvlAuth = 0; + break; + } + return MrvlAuth; +} + +UINT8 +convertMrvlCipherToIEEECipher(UINT8 mrvlcipher) +{ + UINT8 Cipher; + switch (mrvlcipher) { + case UAP_HOSTCMD_CIPHER_WEP40: + Cipher = IEEEtypes_RSN_CIPHER_SUITE_WEP40; + break; + case UAP_HOSTCMD_CIPHER_WEP104: + Cipher = IEEEtypes_RSN_CIPHER_SUITE_WEP104; + break; + case UAP_HOSTCMD_CIPHER_TKIP: + Cipher = IEEEtypes_RSN_CIPHER_SUITE_TKIP; + break; + case UAP_HOSTCMD_CIPHER_CCMP: + Cipher = IEEEtypes_RSN_CIPHER_SUITE_CCMP; + break; + default: + Cipher = IEEEtypes_RSN_CIPHER_SUITE_NONE; + break; + } + return Cipher; +} + +UINT32 +convertIEEECipherToMrvlCipher(UINT8 cipher) +{ + UINT32 MrvlCipher = 0; + switch (cipher) { + case IEEEtypes_RSN_CIPHER_SUITE_WEP40: + MrvlCipher |= UAP_HOSTCMD_CIPHER_WEP40; + break; + case IEEEtypes_RSN_CIPHER_SUITE_TKIP: + MrvlCipher |= UAP_HOSTCMD_CIPHER_TKIP; + break; + case IEEEtypes_RSN_CIPHER_SUITE_CCMP: + MrvlCipher |= UAP_HOSTCMD_CIPHER_CCMP; + break; + case IEEEtypes_RSN_CIPHER_SUITE_WEP104: + MrvlCipher |= UAP_HOSTCMD_CIPHER_WEP104; + break; + case IEEEtypes_RSN_CIPHER_SUITE_NONE: + case IEEEtypes_RSN_CIPHER_SUITE_WRAP: + default: + MrvlCipher = 0; + break; + } + return MrvlCipher; +} + +void +GenerateGTK_internal(hostsa_private *priv, KeyData_t *grpKeyData, + UINT8 *nonce, UINT8 *StaMacAddr) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + UINT8 inp_data[NONCE_SIZE + sizeof(IEEEtypes_MacAddr_t)]; + UINT8 prefix[] = "Group key expansion"; + UINT8 GTK[32]; // group transient key + UINT8 grpMasterKey[32]; + + if (!grpKeyData || !nonce) { + return; + } + + memcpy(util_fns, inp_data, StaMacAddr, sizeof(IEEEtypes_MacAddr_t)); + supplicantGenerateRand(priv, nonce, NONCE_SIZE); + memcpy(util_fns, inp_data + sizeof(IEEEtypes_MacAddr_t), nonce, + NONCE_SIZE); + supplicantGenerateRand(priv, grpMasterKey, sizeof(grpMasterKey)); + Mrvl_PRF((void *)priv, grpMasterKey, + sizeof(grpMasterKey), + prefix, + wlan_strlen((char *)prefix), + inp_data, sizeof(inp_data), GTK, sizeof(GTK)); + memcpy(util_fns, grpKeyData->Key, GTK, TK_SIZE); + memcpy(util_fns, grpKeyData->TxMICKey, GTK + TK_SIZE, MIC_KEY_SIZE); + memcpy(util_fns, grpKeyData->RxMICKey, GTK + TK_SIZE + MIC_KEY_SIZE, + MIC_KEY_SIZE); + +} + +/* + Populates EAPOL frame based on Cipher, given Nonce, replay counters, + and type, which encodes whether this is secure, part of WPA2 or WPA + handshake. + This is currently used for EAPOL sent from AP, msg1, msg3 and group + key msg. +*/ +void +PopulateKeyMsg(hostsa_private *priv, EAPOL_KeyMsg_Tx_t *tx_eapol_ptr, + Cipher_t *Cipher, + UINT16 Type, UINT32 replay_cnt[2], UINT8 *Nonce) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + key_info_t *pKeyInfo; + + if (!tx_eapol_ptr || !Cipher) { + return; + } + + pKeyInfo = &tx_eapol_ptr->keyMsg.key_info; + + if (Cipher->tkip) { + // TKIP unicast + tx_eapol_ptr->keyMsg.key_length = + SHORT_SWAP((TK_SIZE + TK_SIZE)); + } else if (Cipher->ccmp) { + // CCMP unicast + tx_eapol_ptr->keyMsg.key_length = SHORT_SWAP(TK_SIZE); + } + + pKeyInfo->KeyAck = 1; + + if (Type & PAIRWISE_KEY_MSG) { + pKeyInfo->KeyType = 1; + if (Type & SECURE_HANDSHAKE_FLAG) { + pKeyInfo->KeyMIC = 1; + pKeyInfo->Install = 1; + pKeyInfo->EncryptedKeyData = pKeyInfo->Secure = + (Type & WPA2_HANDSHAKE) ? 1 : 0; + } + } else { + pKeyInfo->Secure = 1; + pKeyInfo->KeyMIC = 1; + pKeyInfo->EncryptedKeyData = (Type & WPA2_HANDSHAKE) ? 1 : 0; + } + + tx_eapol_ptr->keyMsg.replay_cnt[0] = WORD_SWAP(replay_cnt[0]); + tx_eapol_ptr->keyMsg.replay_cnt[1] = WORD_SWAP(replay_cnt[1]); + memcpy(util_fns, (void *)tx_eapol_ptr->keyMsg.key_nonce, Nonce, + NONCE_SIZE); + + DBG_HEXDUMP(MCMD_D, " nonce ", + (t_u8 *)tx_eapol_ptr->keyMsg.key_nonce, NONCE_SIZE); +} + +/* + Function to prepare KDE in EAPOL frame . + Used by the AP to encapsulate GTK +*/ + +void +prepareKDE(hostsa_private *priv, EAPOL_KeyMsg_Tx_t *tx_eapol_ptr, + KeyData_t *grKey, Cipher_t *cipher) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + KDE_t *pKeyDataWPA2; + GTK_KDE_t *pGTK_IE; + UINT8 RsnIE_len = 0, PadLen = 0; + UINT8 *buf_p; + + if (!tx_eapol_ptr || !grKey || !cipher) { + return; + } + + RsnIE_len = tx_eapol_ptr->keyMsg.key_material_len; + buf_p = (UINT8 *)(tx_eapol_ptr->keyMsg.key_data + RsnIE_len); + + pKeyDataWPA2 = (KDE_t *)buf_p; + pKeyDataWPA2->type = 0xdd; + pKeyDataWPA2->length = KEYDATA_SIZE; + pKeyDataWPA2->OUI[0] = kde_oui[0]; + pKeyDataWPA2->OUI[1] = kde_oui[1]; + pKeyDataWPA2->OUI[2] = kde_oui[2]; + pKeyDataWPA2->dataType = 1; + buf_p = buf_p + KDE_SIZE; + + pGTK_IE = (GTK_KDE_t *)buf_p; + pGTK_IE->KeyID = 1; + buf_p = buf_p + GTK_IE_SIZE; + + // copy over GTK + memcpy(util_fns, (void *)buf_p, (void *)grKey->Key, TK_SIZE); + buf_p = buf_p + TK_SIZE; + + if (cipher->tkip) { + pKeyDataWPA2->length += (MIC_KEY_SIZE + MIC_KEY_SIZE); + memcpy(util_fns, (void *)buf_p, (void *)grKey->TxMICKey, + MIC_KEY_SIZE); + buf_p = buf_p + MIC_KEY_SIZE; + memcpy(util_fns, (void *)buf_p, (void *)grKey->RxMICKey, + MIC_KEY_SIZE); + buf_p = buf_p + MIC_KEY_SIZE; + } + + tx_eapol_ptr->keyMsg.key_material_len += (pKeyDataWPA2->length + + KDE_IE_SIZE); + + PadLen = ((8 - ((tx_eapol_ptr->keyMsg.key_material_len) % 8)) % 8); + if (PadLen) { + *(buf_p) = 0xdd; + memset(util_fns, (void *)(buf_p + 1), 0, PadLen - 1); + tx_eapol_ptr->keyMsg.key_material_len += PadLen; + } + +} + +BOOLEAN +Encrypt_keyData(hostsa_private *priv, EAPOL_KeyMsg_Tx_t *tx_eapol_ptr, + UINT8 *EAPOL_Encr_Key, Cipher_t *cipher) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + UINT8 key[16]; + UINT8 cipherText[400] = { 0 }; + + if (!tx_eapol_ptr || !EAPOL_Encr_Key || !cipher) { + return FALSE; + } + + if (cipher->ccmp) { + // Pairwise is CCMP + memcpy(util_fns, (void *)key, EAPOL_Encr_Key, 16); + + // use AES-only mode from AEU HW to perform AES wrap + MRVL_AesWrap(key, 2, tx_eapol_ptr->keyMsg.key_material_len / 8, + tx_eapol_ptr->keyMsg.key_data, NULL, cipherText); + + tx_eapol_ptr->keyMsg.key_material_len += 8; + memcpy(util_fns, (void *)tx_eapol_ptr->keyMsg.key_data, + cipherText, tx_eapol_ptr->keyMsg.key_material_len); + } else if (cipher->tkip) { + // Pairwise is TKIP + supplicantGenerateRand(priv, + (UINT8 *)tx_eapol_ptr->keyMsg. + EAPOL_key_IV, 16); + RC4_Encrypt((t_void *)priv, (unsigned char *)EAPOL_Encr_Key, + (unsigned char *)&tx_eapol_ptr->keyMsg.EAPOL_key_IV, + 16, (unsigned char *)&tx_eapol_ptr->keyMsg.key_data, + (unsigned short)tx_eapol_ptr->keyMsg. + key_material_len, 256); + } else { + return FALSE; + } + + return TRUE; +} + +void +KeyMgmtAp_DerivePTK(hostsa_private *priv, + UINT8 *pPMK, + t_u8 *da, + t_u8 *sa, + UINT8 *ANonce, + UINT8 *SNonce, + UINT8 *EAPOL_MIC_Key, + UINT8 *EAPOL_Encr_Key, KeyData_t *newPWKey, BOOLEAN use_kdf) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + UINT8 tmp[MIC_KEY_SIZE]; + + // call STA PTK generation funciton first + KeyMgmtSta_DeriveKeys(priv, pPMK, + da, + sa, + ANonce, + SNonce, + EAPOL_MIC_Key, EAPOL_Encr_Key, newPWKey, use_kdf); + + // We need to swap Rx/Tx Keys for AP + + memcpy(util_fns, tmp, newPWKey->RxMICKey, MIC_KEY_SIZE); + memcpy(util_fns, newPWKey->RxMICKey, newPWKey->TxMICKey, MIC_KEY_SIZE); + memcpy(util_fns, newPWKey->TxMICKey, tmp, MIC_KEY_SIZE); + +} + +BOOLEAN +KeyData_CopyWPAWP2(hostsa_private *priv, EAPOL_KeyMsg_Tx_t *pTxEAPOL, void *pIe) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + IEEEtypes_InfoElementHdr_t *pElement = + (IEEEtypes_InfoElementHdr_t *)pIe; + + if (!pIe) { + return FALSE; + } + + pTxEAPOL->keyMsg.key_material_len = + pElement->Len + sizeof(IEEEtypes_InfoElementHdr_t); + + memcpy(util_fns, (void *)pTxEAPOL->keyMsg.key_data, + pIe, pTxEAPOL->keyMsg.key_material_len); + + return TRUE; +} + +BOOLEAN +KeyData_UpdateKeyMaterial(hostsa_private *priv, EAPOL_KeyMsg_Tx_t *pTxEAPOL, + SecurityMode_t *pSecType, void *pWPA, void *pWPA2) +{ + + if (pSecType->wpa || pSecType->wpaNone) { + if (KeyData_CopyWPAWP2(priv, pTxEAPOL, pWPA) == FALSE) { + return FALSE; + } + } else if (pSecType->wpa2) { + if (KeyData_CopyWPAWP2(priv, pTxEAPOL, pWPA2) == FALSE) { + return FALSE; + } + } + + return TRUE; +} + +void +KeyData_AddGTK(hostsa_private *priv, EAPOL_KeyMsg_Tx_t *pTxEAPOL, + KeyData_t *grKey, Cipher_t *cipher) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + UINT8 *buf_p; + buf_p = (UINT8 *)pTxEAPOL->keyMsg.key_data; + memcpy(util_fns, (void *)buf_p, (void *)grKey, TK_SIZE); + + buf_p = buf_p + TK_SIZE; + + pTxEAPOL->keyMsg.key_material_len += TK_SIZE; + + if (cipher->tkip) { + memcpy(util_fns, (void *)buf_p, (void *)grKey->TxMICKey, + MIC_KEY_SIZE); + buf_p = buf_p + MIC_KEY_SIZE; + memcpy(util_fns, (void *)buf_p, (void *)grKey->RxMICKey, + MIC_KEY_SIZE); + pTxEAPOL->keyMsg.key_material_len += (MIC_KEY_SIZE + + MIC_KEY_SIZE); + } +} + +/* Returns FALSE if security type is other than WPA* */ +BOOLEAN +KeyData_AddKey(hostsa_private *priv, EAPOL_KeyMsg_Tx_t *pTxEAPOL, + SecurityMode_t *pSecType, KeyData_t *grKey, Cipher_t *cipher) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + BOOLEAN status = FALSE; + + pTxEAPOL->keyMsg.key_info.KeyIndex = grKey->KeyIndex; + + pTxEAPOL->keyMsg.key_RSC[0] = grKey->TxIV16 & 0x00FF; + pTxEAPOL->keyMsg.key_RSC[1] = (grKey->TxIV16 >> 8) & 0x00FF; + memcpy(util_fns, (void *)(pTxEAPOL->keyMsg.key_RSC + 2), + &grKey->TxIV32, 4); + + if (pSecType->wpa || pSecType->wpaNone) { + KeyData_AddGTK(priv, pTxEAPOL, grKey, cipher); + status = TRUE; + } else if (pSecType->wpa2) { + prepareKDE(priv, pTxEAPOL, grKey, cipher); + status = TRUE; + } + return status; +} + +void +ROM_InitGTK(hostsa_private *priv, KeyData_t *grpKeyData, UINT8 *nonce, + UINT8 *StaMacAddr) +{ + grpKeyData->KeyIndex = 1; + grpKeyData->TxIV16 = 1; + grpKeyData->TxIV32 = 0; + + GenerateGTK_internal(priv, grpKeyData, nonce, StaMacAddr); +} + +t_u16 +keyMgmtAp_FormatWPARSN_IE_internal(phostsa_private priv, + IEEEtypes_InfoElementHdr_t *pIe, + UINT8 isRsn, + Cipher_t *pCipher, + UINT8 cipherCnt, + Cipher_t *pMcastCipher, + UINT16 authKey, UINT16 authKeyCnt) +{ + phostsa_util_fns util_fns = &priv->util_fns; + int i; + UINT8 *pBuf = NULL; + IEEEtypes_RSNElement_t *pRsn = (IEEEtypes_RSNElement_t *)pIe; + IEEEtypes_WPAElement_t *pWpa = (IEEEtypes_WPAElement_t *)pIe; + + UINT16 bitPos = 0; + UINT16 authKeyBitmap = authKey; + UINT8 ucastBitmap = *((UINT8 *)pCipher); + UINT8 mcastBitmap = *((UINT8 *)pMcastCipher); + UINT8 oui[3]; + UINT16 ieLength = 0; + + pIe->ElementId = (isRsn == 1) ? ELEM_ID_RSN : ELEM_ID_VENDOR_SPECIFIC; + + if (isRsn) { + memcpy(util_fns, (void *)&oui, (void *)&kde_oui, sizeof(oui)); + pBuf = (UINT8 *)&pRsn->Ver; + } else { + memcpy(util_fns, (void *)&oui, (void *)&wpa_oui01, sizeof(oui)); + memcpy(util_fns, (void *)&pWpa->OuiType, (void *)&wpa_oui01, + sizeof(wpa_oui01)); + pBuf = (UINT8 *)&pWpa->Ver; + } + + pBuf[0] = 0x1; + pBuf[1] = 0x0; + pBuf += 2; + + // filling group cipher + memcpy(util_fns, (void *)pBuf, (void *)&oui, sizeof(oui)); + + if (mcastBitmap) { + bitPos = util_FindLowestBitSet(mcastBitmap); + } + + pBuf[3] = convertMrvlCipherToIEEECipher(bitPos); + pBuf += 4; + + pBuf[0] = (cipherCnt >> 0) & 0xFF; + pBuf[1] = (cipherCnt >> 16) & 0xFF; + pBuf += 2; + + for (i = 0; i < cipherCnt; i++) { + pBuf[0] = oui[0]; + pBuf[1] = oui[1]; + pBuf[2] = oui[2]; + + bitPos = util_FindLowestBitSet(ucastBitmap); + + pBuf[3] = convertMrvlCipherToIEEECipher(bitPos); + + ucastBitmap &= ~bitPos; + + pBuf += 4; + } + + pBuf[0] = (authKeyCnt >> 0) & 0xFF; + pBuf[1] = (authKeyCnt >> 16) & 0xFF; + pBuf += 2; + + for (i = 0; i < authKeyCnt; i++) { + pBuf[0] = oui[0]; + pBuf[1] = oui[1]; + pBuf[2] = oui[2]; + + bitPos = util_FindLowestBitSet(authKeyBitmap); + + pBuf[3] = convertMrvlAuthToIEEEAuth(bitPos); + + authKeyBitmap &= ~bitPos; + pBuf += 4; + } + + if (isRsn) { + pBuf[0] = 0x0; + pBuf[1] = 0x0; + pBuf += 2; + } + + ieLength = (unsigned long)pBuf - (unsigned long)pIe; + pIe->Len = ieLength - sizeof(IEEEtypes_InfoElementHdr_t); + DBG_HEXDUMP(MCMD_D, "RSN or WPA IE", (t_u8 *)pIe, ieLength); + return ieLength; +} + +/* Ideally one day this function should re-use client code */ +t_u16 +keyMgmtAp_FormatWPARSN_IE(hostsa_private *priv, + IEEEtypes_InfoElementHdr_t *pIe, + UINT8 isRsn, + Cipher_t *pCipher, + UINT8 cipherCount, + Cipher_t *pMcastCipher, + UINT16 authKey, UINT16 authKeyCount) +{ + + UINT16 ieLength; + + ieLength = keyMgmtAp_FormatWPARSN_IE_internal(priv, pIe, + isRsn, + pCipher, + cipherCount, + pMcastCipher, + authKey, authKeyCount); + + return ieLength; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtAp_rom.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtAp_rom.h new file mode 100644 index 00000000..bf67ac38 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtAp_rom.h @@ -0,0 +1,84 @@ +/** @file keyMgmtAp_rom.h + * + * @brief This file contains define for key management + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef KEYMGMTAP_ROM_H__ +#define KEYMGMTAP_ROM_H__ +//Authenticator related data structures, function prototypes + +#include "wltypes.h" +#include "IEEE_types.h" +#include "sha1.h" +#include "keyMgmtStaTypes.h" +#include "wl_macros.h" +#include "keyMgmtApTypes.h" +#include "rc4_rom.h" + +#include "keyCommonDef.h" +#include "authenticator.h" +#include "keyMgmtApStaCommon.h" + +/* This flags if the Secure flag in EAPOL key frame must be set */ +#define SECURE_HANDSHAKE_FLAG 0x0080 +/* Whether the EAPOL frame is for pairwise or group Key */ +#define PAIRWISE_KEY_MSG 0x0800 +/* Flags when WPA2 is enabled, not used for WPA */ +#define WPA2_HANDSHAKE 0x8000 + +extern void GenerateGTK_internal(hostsa_private *priv, KeyData_t *grpKeyData, + UINT8 *nonce, UINT8 *StaMacAddr); + +extern void PopulateKeyMsg(hostsa_private *priv, + EAPOL_KeyMsg_Tx_t *tx_eapol_ptr, Cipher_t *Cipher, + UINT16 Type, UINT32 replay_cnt[2], UINT8 *Nonce); + +extern void prepareKDE(hostsa_private *priv, EAPOL_KeyMsg_Tx_t *tx_eapol_ptr, + KeyData_t *grKey, Cipher_t *cipher); + +extern BOOLEAN Encrypt_keyData(hostsa_private *priv, + EAPOL_KeyMsg_Tx_t *tx_eapol_ptr, + UINT8 *EAPOL_Encr_Key, Cipher_t *cipher); + +extern void ROM_InitGTK(hostsa_private *priv, KeyData_t *grpKeyData, + UINT8 *nonce, UINT8 *StaMacAddr); + +extern void KeyData_AddGTK(hostsa_private *priv, EAPOL_KeyMsg_Tx_t *pTxEAPOL, + KeyData_t *grKey, Cipher_t *cipher); + +extern BOOLEAN KeyData_AddKey(hostsa_private *priv, EAPOL_KeyMsg_Tx_t *pTxEAPOL, + SecurityMode_t *pSecType, + KeyData_t *grKey, Cipher_t *cipher); + +extern BOOLEAN KeyData_CopyWPAWP2(hostsa_private *priv, + EAPOL_KeyMsg_Tx_t *pTxEAPOL, void *pIe); + +extern BOOLEAN KeyData_UpdateKeyMaterial(hostsa_private *priv, + EAPOL_KeyMsg_Tx_t *pTxEAPOL, + SecurityMode_t *pSecType, void *pWPA, + void *pWPA2); +extern void KeyMgmtAp_DerivePTK(hostsa_private *priv, UINT8 *pPMK, t_u8 *da, + t_u8 *sa, UINT8 *ANonce, UINT8 *SNonce, + UINT8 *EAPOL_MIC_Key, UINT8 *EAPOL_Encr_Key, + KeyData_t *newPWKey, BOOLEAN use_kdf); + +#endif // _KEYMGMTAP_ROM_H_ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtSta.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtSta.c new file mode 100644 index 00000000..aa089a4d --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtSta.c @@ -0,0 +1,2345 @@ +/** @file keyMgmtSta.c + * + * @brief This file defines key management API for sta + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ + +#include "wltypes.h" +#include "IEEE_types.h" +#include "hostsa_ext_def.h" +#include "authenticator.h" +#include "wl_macros.h" +#include "keyMgmtSta.h" +#include "pass_phrase.h" +#include "wlpd.h" +#include "KeyApiStaDefs.h" +#include "crypt_new.h" +#include "pmkCache.h" +#include "sha1.h" +#include "md5.h" +#include "rc4.h" +#include "aes_cmac.h" +#include "mrvl_sha256_crypto.h" + +#include "keyMgmtSta_rom.h" +#include "tlv.h" + +#define DEAUTH_DELAY_TIME_INTERVAL 40000 /* 40 ms */ + +#define PWK_MSG1_RETRIES 7 + +/* 10 seconds timeout for completing RSN key handshake */ +//#define RSNSECUREDTIMEOUT 10000000 +#define RSNSECUREDTIMEOUT MRVDRV_TIMER_10S + +//static void SendMICFailReport_sta(cm_ConnectionInfo_t* connPtr, +// keyMgmtInfoSta_t* pKeyMgmtInfoSta, +// BOOLEAN isUnicast); +#if 0 +static BufferReturnNotify_t keyMgmtKeyGroupTxDone(phostsa_private priv); +static BufferReturnNotify_t keyMgmtKeyPairwiseTxDone(phostsa_private priv); +static BufferReturnNotify_t keyMgmtKeyPairAndGroupTxDone(phostsa_private priv); +#endif +static void keyMgmtKeyGroupTxDone(phostsa_private priv); +static void keyMgmtKeyPairwiseTxDone(phostsa_private priv); +static void keyMgmtKeyPairAndGroupTxDone(phostsa_private priv); + +static supplicantData_t keyMgmt_SuppData[MAX_SUPPLICANT_SESSIONS]; + +void FillKeyMaterialStruct(phostsa_private priv, + UINT16 key_len, UINT8 isPairwise, KeyData_t *pKey); +void FillGrpKeyMaterialStruct(phostsa_private priv, + UINT16 keyType, + UINT8 *pn, + UINT8 keyIdx, UINT8 keyLen, KeyData_t *pKey); +UINT16 keyMgmtFormatWpaRsnIe(phostsa_private priv, + UINT8 *pos, + IEEEtypes_MacAddr_t *pBssid, + IEEEtypes_MacAddr_t *pStaAddr, + UINT8 *pPmkid, BOOLEAN addPmkid); +t_u8 supplicantIsEnabled(void *priv); + +void +allocSupplicantData(void *priv) +{ + phostsa_private psapriv = (phostsa_private)priv; + int i = 0; + + if (psapriv->suppData) { + return; + } + // if (pm_fns->bss_type == MLAN_BSS_TYPE_STA) + { + +// int_sta = os_if_save_EnterCriticalSection(); + for (i = 0; i < MAX_SUPPLICANT_SESSIONS; i++) { + if (keyMgmt_SuppData[i].inUse == FALSE) { + keyMgmt_SuppData[i].inUse = TRUE; + supplicantInit((void *)psapriv, + &keyMgmt_SuppData[i]); + psapriv->suppData = + (void *)&keyMgmt_SuppData[i]; + break; + } + } +// os_if_save_ExitCriticalSection(int_sta); + +// os_ASSERT(connPtr->suppData); + } + +} + +void +freeSupplicantData(void *priv) +{ + phostsa_private psapriv = (phostsa_private)priv; + struct supplicantData *suppData = psapriv->suppData; + + if (suppData != NULL) { + suppData->inUse = FALSE; + suppData = NULL; + } +} + +mlan_status +initSupplicantTimer(void *priv) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + mlan_status ret = MLAN_STATUS_SUCCESS; + + if (util_fns->moal_init_timer(util_fns->pmoal_handle, + &psapriv->suppData->keyMgmtInfoSta. + rsnTimer, + keyMgmtStaRsnSecuredTimeoutHandler, + psapriv) != MLAN_STATUS_SUCCESS) { + ret = MLAN_STATUS_FAILURE; + return ret; + } + + return ret; +} + +void +freeSupplicantTimer(void *priv) +{ + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + + if (psapriv->suppData->keyMgmtInfoSta.rsnTimer) { + util_fns->moal_free_timer(util_fns->pmoal_handle, + psapriv->suppData->keyMgmtInfoSta. + rsnTimer); + psapriv->suppData->keyMgmtInfoSta.rsnTimer = NULL; + } +} + +//#if defined(PSK_SUPPLICANT) || defined (WPA_NONE) +void +keyMgmtSendDeauth2Peer(phostsa_private priv, UINT16 reason) +{ + hostsa_mlan_fns *pm_fns = &priv->mlan_fns; + + /* Assumes we are sending to AP */ + // keyMgmtSendDeauth((cm_ConnectionInfo_t*)connPtr, + // &((cm_ConnectionInfo_t*)connPtr)->suppData->localBssid, + // reason); +#if 0 + ret = wlan_prepare_cmd(priv, + HostCmd_CMD_802_11_DEAUTHENTICATE, + HostCmd_ACT_GEN_SET, + 0, NULL, &priv->suppData->localBssid); + + if (ret == MLAN_STATUS_SUCCESS) + wlan_recv_event(priv, MLAN_EVENT_ID_DRV_DEFER_HANDLING, MNULL); +#endif + pm_fns->hostsa_StaSendDeauth(pm_fns->pmlan_private, + (t_u8 *)&priv->suppData->localBssid, + reason); +} + +BOOLEAN +keyMgmtProcessMsgExt(phostsa_private priv, keyMgmtInfoSta_t *pKeyMgmtInfoSta, + EAPOL_KeyMsg_t *pKeyMsg) +{ + if (pKeyMsg->key_info.KeyType && pKeyMsg->key_info.KeyMIC) { + /* PWK Msg #3 processing */ +#ifdef DOT11R + if (supplicantAkmWpa2Ft + (priv, + &pKeyMgmtInfoSta->connPtr->suppData->customMIB_RSNConfig. + AKM)) { + if (dot11r_process_pwk_msg3(pKeyMsg) == FALSE) { + return FALSE; + } + } +#endif + +#ifdef CCX_MFP + if (ccx_mfp_process_pwk_msg3(pKeyMsg) == FALSE) { + return FALSE; + } +#endif + } + + /* + ** KDE processing for Msg#3 and for any Group Key rotations + */ + if (pKeyMsg->key_info.EncryptedKeyData) { +#ifdef DOT11W + KDE_t *pKde; + + /* Parse IGTK for 11w */ + pKde = parseKeyKDE_DataType(priv, pKeyMsg->key_data, + pKeyMsg->key_material_len, + KDE_DATA_TYPE_IGTK); + if (pKde) { + keyMgmtSetIGtk(priv, pKeyMgmtInfoSta, + (IGtkKde_t *)pKde->data, pKde->length); +#if 0 + hostEventPrintHex(assocAgent_getConnPtr(), + "SetIGTK", keyMgmtGetIGtk(), 16); +#endif + } +#endif + } + + return TRUE; +} + +#ifdef WAR_ROM_BUG50312_SIMUL_INFRA_WFD +EAPOL_KeyMsg_t * +patch_ProcessRxEAPOL_GrpMsg1(phostsa_private priv, mlan_buffer *pmbuf, + keyMgmtInfoSta_t *pKeyMgmtInfoSta) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + EAPOL_KeyMsg_t *pKeyMsg; + pKeyMsg = GetKeyMsgNonceFromEAPOL(priv, pmbuf, pKeyMgmtInfoSta); + if (!pKeyMsg) { + return NULL; + } + + KeyMgmtSta_ApplyKEK(priv, pKeyMsg, + &pKeyMgmtInfoSta->GRKey, + pKeyMgmtInfoSta->EAPOL_Encr_Key); + + pKeyMgmtInfoSta->RSNDataTrafficEnabled = 1; +// microTimerStop(pKeyMgmtInfoSta->rsnTimer); + util_fns->moal_stop_timer(util_fns->pmoal_handle, + pKeyMgmtInfoSta->rsnTimer); + // pKeyMgmtInfoSta->rsnTimer = 0; + + /* Decrypt the group key */ + if (pKeyMsg->desc_type == 2) { + /* WPA2 */ + /* handle it according to 802.11i GTK frame format */ + parseKeyDataGTK(priv, pKeyMsg->key_data, + pKeyMsg->key_material_len, + &pKeyMgmtInfoSta->GRKey); + + if (keyMgmtProcessMsgExt(priv, pKeyMgmtInfoSta, pKeyMsg) == + FALSE) { + return NULL; + } + } else { + /* WPA or Dynamic WEP */ + memcpy(util_fns, pKeyMgmtInfoSta->GRKey.Key, + pKeyMsg->key_data, pKeyMsg->key_material_len); + + pKeyMgmtInfoSta->GRKey.KeyIndex = pKeyMsg->key_info.KeyIndex; + } + + return pKeyMsg; +} +#endif + +#ifdef WAR_ROM_BUG50312_SIMUL_INFRA_WFD +EAPOL_KeyMsg_t * +patch_ProcessRxEAPOL_PwkMsg3(phostsa_private priv, mlan_buffer *pmbuf, + keyMgmtInfoSta_t *pKeyMgmtInfoSta) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + EAPOL_KeyMsg_t *pKeyMsg; + + pKeyMsg = GetKeyMsgNonceFromEAPOL(priv, pmbuf, pKeyMgmtInfoSta); + if (!pKeyMsg) { + return NULL; + } + pKeyMgmtInfoSta->newPWKey.TxIV16 = 1; + pKeyMgmtInfoSta->newPWKey.TxIV32 = 0; + + /* look for group key once the pairwise has been plumbed */ + if (pKeyMsg->key_info.EncryptedKeyData) { + /* I think the timer stop should be moved later on in case + ramHook_Process_CCX_MFP_11r returns FALSE */ + +// microTimerStop(pKeyMgmtInfoSta->rsnTimer); + util_fns->moal_stop_timer(util_fns->pmoal_handle, + pKeyMgmtInfoSta->rsnTimer); +// pKeyMgmtInfoSta->rsnTimer = 0; + + KeyMgmtSta_ApplyKEK(priv, pKeyMsg, + &pKeyMgmtInfoSta->GRKey, + pKeyMgmtInfoSta->EAPOL_Encr_Key); + + if (keyMgmtProcessMsgExt(priv, pKeyMgmtInfoSta, pKeyMsg) == + FALSE) { + return NULL; + } + + parseKeyDataGTK(priv, pKeyMsg->key_data, + pKeyMsg->key_material_len, + &pKeyMgmtInfoSta->GRKey); + + } + return pKeyMsg; +} +#endif + +/* This routine must be called after mlmeStaInit_UR +** It assumes that parent session structures are initialized +** (vmacEntry_ur and mlmeStaInfo_URepeater) +*/ +void +KeyMgmtInitSta(phostsa_private priv) +{ + KeyMgmtSta_InitSession(priv, &priv->suppData->keyMgmtInfoSta); +} + +Status_e +GeneratePWKMsg2(phostsa_private priv, mlan_buffer *pmbuf, + UINT8 *pSNonce, UINT8 *pEAPOLMICKey, UINT8 forceKeyDescVersion) +{ + hostsa_mlan_fns *pm_fns = &priv->mlan_fns; + EAPOL_KeyMsg_Tx_t *pTxEapol = MNULL; + UINT16 frameLen; + UINT16 packet_len = 0; + BOOLEAN rsnIeAdded = FALSE; + EAPOL_KeyMsg_t *pRxEapol = + (EAPOL_KeyMsg_t *)(pmbuf->pbuf + pmbuf->data_offset + + sizeof(ether_hdr_t)); + struct supplicantData *suppData = priv->suppData; + pmlan_buffer newbuf = MNULL; + + PRINTM(MMSG, "ENTER: %s\n", __FUNCTION__); + + newbuf = pm_fns->hostsa_alloc_mlan_buffer(pm_fns->pmlan_adapter, + MLAN_TX_DATA_BUF_SIZE_2K, 0, + MOAL_MALLOC_BUFFER); + if (newbuf) { + newbuf->bss_index = pmbuf->bss_index; + newbuf->buf_type = pmbuf->buf_type; + newbuf->priority = pmbuf->priority; + newbuf->in_ts_sec = pmbuf->in_ts_sec; + newbuf->in_ts_usec = pmbuf->in_ts_usec; + newbuf->data_offset = + (sizeof(TxPD) + INTF_HEADER_LEN + DMA_ALIGNMENT); + } + + if (newbuf == NULL) { + PRINTM(MERROR, "GeneratePWKMsg2 newbuf=NULL\n"); + return FAIL; + } + + pTxEapol = (EAPOL_KeyMsg_Tx_t *)(newbuf->pbuf + newbuf->data_offset); + KeyMgmtSta_PrepareEAPOLFrame(priv, pTxEapol, + pRxEapol, + (t_u8 *)&suppData->localBssid, + (t_u8 *)&suppData->localStaAddr, pSNonce); + +#ifdef DOT11R + if (dot11r_is_ft_akm(&connPtr->suppData->customMIB_RSNConfig.AKM)) { + dot11r_process_pwk_msg2(connPtr, &pTxEapol->keyMsg); + rsnIeAdded = TRUE; + } +#endif + + if (!rsnIeAdded && (pTxEapol->keyMsg.desc_type != 1)) { + /* Add the RSN/WPA IE if not dynamic WEP */ + pTxEapol->keyMsg.key_material_len + = keyMgmtFormatWpaRsnIe(priv, + (UINT8 *)&pTxEapol->keyMsg. + key_data, &suppData->localBssid, + &suppData->localStaAddr, NULL, + FALSE); + } +#ifdef CCX_MFP + ccx_mfp_process_pwk_msg2(&pTxEapol->keyMsg); +#endif + + frameLen = KeyMgmtSta_PopulateEAPOLLengthMic(priv, pTxEapol, + pEAPOLMICKey, + EAPOL_PROTOCOL_V1, + forceKeyDescVersion); + + packet_len = frameLen + sizeof(Hdr_8021x_t) + sizeof(ether_hdr_t); + UpdateEAPOLWcbLenAndTransmit(priv, newbuf, packet_len); + + PRINTM(MMSG, "LEAVE: %s\n", __FUNCTION__); + return SUCCESS; +} + +Status_e +GeneratePWKMsg4(phostsa_private priv, mlan_buffer *pmbuf, + keyMgmtInfoSta_t *pKeyMgmtInfoSta, BOOLEAN groupKeyReceived) +{ + hostsa_mlan_fns *pm_fns = &priv->mlan_fns; + struct supplicantData *suppData = priv->suppData; + EAPOL_KeyMsg_Tx_t *pTxEapol; + UINT16 frameLen; + UINT16 packet_len = 0; + EAPOL_KeyMsg_t *pRxEapol = + (EAPOL_KeyMsg_t *)(pmbuf->pbuf + pmbuf->data_offset + + sizeof(ether_hdr_t)); + pmlan_buffer newbuf = MNULL; + + PRINTM(MMSG, "Enter GeneratePWKMsg4\n"); + + newbuf = pm_fns->hostsa_alloc_mlan_buffer(pm_fns->pmlan_adapter, + MLAN_TX_DATA_BUF_SIZE_2K, 0, + MOAL_MALLOC_BUFFER); + if (newbuf) { + newbuf->bss_index = pmbuf->bss_index; + newbuf->buf_type = pmbuf->buf_type; + newbuf->priority = pmbuf->priority; + newbuf->in_ts_sec = pmbuf->in_ts_sec; + newbuf->in_ts_usec = pmbuf->in_ts_usec; + newbuf->data_offset = + (sizeof(TxPD) + INTF_HEADER_LEN + DMA_ALIGNMENT); + } + + if (newbuf == NULL) { + PRINTM(MERROR, "GeneratePWKMsg4 newbuf=NULL\n"); + return FAIL; + } + + pTxEapol = (EAPOL_KeyMsg_Tx_t *)(newbuf->pbuf + newbuf->data_offset); + + KeyMgmtSta_PrepareEAPOLFrame(priv, pTxEapol, + pRxEapol, + (t_u8 *)&suppData->localBssid, + (t_u8 *)&suppData->localStaAddr, NULL); + + frameLen = KeyMgmtSta_PopulateEAPOLLengthMic(priv, pTxEapol, + pKeyMgmtInfoSta-> + EAPOL_MIC_Key, + EAPOL_PROTOCOL_V1, 0); + + /* Set the BuffDesc free callback so the PSK supplicant can determine + ** if the 4th message was successfully received by the AP. Allows + ** the supplicant to hold off switching/setting the new key until ** + it is sure the AP has acknowledged the handshake completion */ +#if 0 + if (pKeyMgmtInfoSta->RSNDataTrafficEnabled) { + pBufDesc->isCB = 1; + if (groupKeyReceived) { + pBufDesc->freeCallback = keyMgmtKeyPairAndGroupTxDone; + } else { + pBufDesc->freeCallback = keyMgmtKeyPairwiseTxDone; + } + } else { +#endif + + if (groupKeyReceived) { + keyMgmtKeyPairAndGroupTxDone(priv); + } else { + keyMgmtKeyPairwiseTxDone(priv); + } +// } + + packet_len = + frameLen + sizeof(Hdr_8021x_t) + sizeof(ether_hdr_t); + UpdateEAPOLWcbLenAndTransmit(priv, newbuf, packet_len); + + PRINTM(MMSG, "Leave GeneratePWKMsg4\n"); + return SUCCESS; + } + + Status_e GenerateGrpMsg2(phostsa_private priv, mlan_buffer *pmbuf, + keyMgmtInfoSta_t *pKeyMgmtInfoSta) { + hostsa_mlan_fns *pm_fns = &priv->mlan_fns; + EAPOL_KeyMsg_t *pRxEapol = + (EAPOL_KeyMsg_t *)(pmbuf->pbuf + pmbuf->data_offset + + sizeof(ether_hdr_t)); + EAPOL_KeyMsg_Tx_t *pTxEapol; + UINT16 frameLen; + UINT16 packet_len = 0; + struct supplicantData *suppData = priv->suppData; + pmlan_buffer newbuf = MNULL; + + PRINTM(MMSG, "ENTER: %s\n", __FUNCTION__); + + newbuf = pm_fns->hostsa_alloc_mlan_buffer(pm_fns->pmlan_adapter, + MLAN_TX_DATA_BUF_SIZE_2K, + 0, + MOAL_MALLOC_BUFFER); + if (newbuf) { + newbuf->bss_index = pmbuf->bss_index; + newbuf->buf_type = pmbuf->buf_type; + newbuf->priority = pmbuf->priority; + newbuf->in_ts_sec = pmbuf->in_ts_sec; + newbuf->in_ts_usec = pmbuf->in_ts_usec; + newbuf->data_offset = + (sizeof(TxPD) + INTF_HEADER_LEN + + DMA_ALIGNMENT); + } + + if (newbuf == NULL) { + PRINTM(MERROR, "GenerateGrpMsg2 newbuf=NULL\n"); + return FAIL; + } + + pTxEapol = + (EAPOL_KeyMsg_Tx_t *)(newbuf->pbuf + + newbuf->data_offset); + + KeyMgmtSta_PrepareEAPOLFrame(priv, pTxEapol, + pRxEapol, + (t_u8 *)&suppData->localBssid, + (t_u8 *)&suppData->localStaAddr, + NULL); + + frameLen = KeyMgmtSta_PopulateEAPOLLengthMic(priv, pTxEapol, + pKeyMgmtInfoSta-> + EAPOL_MIC_Key, + EAPOL_PROTOCOL_V1, + 0); +// pBufDesc->isCB = 1; +// pBufDesc->freeCallback = keyMgmtKeyGroupTxDone; + keyMgmtKeyGroupTxDone(priv); + + packet_len = + frameLen + sizeof(Hdr_8021x_t) + sizeof(ether_hdr_t); + UpdateEAPOLWcbLenAndTransmit(priv, newbuf, packet_len); + + PRINTM(MMSG, "LEAVE: %s\n", __FUNCTION__); + return SUCCESS; + } + + BOOLEAN KeyMgmtStaHsk_Recvd_PWKMsg1(phostsa_private priv, + mlan_buffer *pmbuf, + IEEEtypes_MacAddr_t *sa, + IEEEtypes_MacAddr_t *da) { + EAPOL_KeyMsg_t *pKeyMsg = NULL; + struct supplicantData *suppData = priv->suppData; + keyMgmtInfoSta_t *pKeyMgmtInfoSta = &suppData->keyMgmtInfoSta; + UINT8 *pPmk; + BOOLEAN msgProcessed; + BOOLEAN genPwkMsg2; + BOOLEAN retval; + UINT32 uMaxRetry = 5; // MAX_SUPPLICANT_INIT_TIMEOUT + + PRINTM(MMSG, "ENTER: %s\n", __FUNCTION__); + + msgProcessed = FALSE; + genPwkMsg2 = TRUE; + retval = FALSE; + +//#ifdef PSK_SUPPLICANT + /* Wait for supplicant data to be initialized, which will + complete after set channel/DPD trainign is complete */ + while (uMaxRetry-- && (suppData->suppInitialized != TRUE)) { +// OSATaskSleep(1); + } +//#endif + + pKeyMsg = GetKeyMsgNonceFromEAPOL(priv, pmbuf, pKeyMgmtInfoSta); + if (!pKeyMsg) { + PRINTM(MERROR, + "KeyMgmtStaHsk_Recvd_PWKMsg1 pKeyMsg is NULL\n"); + return FALSE; + } +#ifdef DOT11R + if (!msgProcessed && + dot11r_is_ft_akm(&connPtr->suppData->customMIB_RSNConfig. + AKM)) { + dot11r_process_pwk_msg1(connPtr, sa, da, + pKeyMgmtInfoSta->SNonce, + pKeyMgmtInfoSta->ANonce); + + msgProcessed = TRUE; + retval = TRUE; + } +#endif +#ifdef PSK_SUPPLICANT_CCKM + if (!msgProcessed && ccx_is_cckm_enabled(connPtr)) { + retval = cckm_Recvd_PWKMsg1(connPtr, + sa, + da, + pEAPoLBufDesc, + pKeyMgmtInfoSta->SNonce, + (UINT8 *)connPtr->suppData-> + hashSsId.SsId, + connPtr->suppData->hashSsId. + Len); + genPwkMsg2 = FALSE; + msgProcessed = TRUE; + } +#endif + + if (!msgProcessed + && supplicantAkmIsWpaWpa2(priv, + &suppData->customMIB_RSNConfig. + AKM)) { + if (supplicantAkmIsWpaWpa2Psk + (priv, &suppData->customMIB_RSNConfig.AKM)) { + /* Selected AKM Suite is PSK based */ + pPmk = pmkCacheFindPSK((void *)priv, + (UINT8 *)suppData-> + hashSsId.SsId, + suppData->hashSsId.Len); + } else { + pPmk = pmkCacheFindPMK(priv, + &suppData->localBssid); + } + + if (!pPmk) { + PRINTM(MERROR, + "KeyMgmtStaHsk_Recvd_PWKMsg1 pPmk is NULL\n"); + return FALSE; + } + + KeyMgmtSta_DeriveKeys(priv, pPmk, + (UINT8 *)da, + (UINT8 *)sa, + pKeyMgmtInfoSta->ANonce, + pKeyMgmtInfoSta->SNonce, + pKeyMgmtInfoSta->EAPOL_MIC_Key, + pKeyMgmtInfoSta->EAPOL_Encr_Key, + &pKeyMgmtInfoSta->newPWKey, + supplicantAkmUsesKdf(priv, + &suppData-> + customMIB_RSNConfig. + AKM)); + + retval = TRUE; + + /* PMKID checking not used by embedded supplicant. ** + Commenting out the code in case it needs to be ** + readded later. */ +#if 0 + /* Need to check for PMKID response */ + if (pKeyMsg->desc_type == 2) { + if (keyLen) { + KDE_t *pKde; + + /* Parse PMKID though it's _not used_ + now */ + pKde = parseKeyKDE_DataType(pKeyMsg-> + key_data, + keyLen, + KDE_DATA_TYPE_PMKID); + + if (pKde + && gcustomMIB_RSNConfig.pmkidValid + && memcmp(pKde->data, + gcustomMIB_RSNConfig. + PMKID, + sizeof + (gcustomMIB_RSNConfig. + PMKID))) { + /* PMKID could be invalid if + generated based on an ** old + key. A new key should have + been negotiated ** We + should regenerate PMKID and + check it. */ + } + } + } +#endif + } + + if (genPwkMsg2) { + /* construct Message 2 */ + if (GeneratePWKMsg2(priv, pmbuf, + pKeyMgmtInfoSta->SNonce, + pKeyMgmtInfoSta->EAPOL_MIC_Key, + 0) != SUCCESS) { + PRINTM(MERROR, + "KeyMgmtStaHsk_Recvd_PWKMsg1 GeneratePWKMsg2 Fail\n"); + retval = FALSE; + } + } + + if (retval == TRUE) { +#ifdef MIB_STATS + INC_MIB_STAT(connPtr, eapolSentFrmFwCnt); +#endif + updateApReplayCounter(priv, pKeyMgmtInfoSta, + (UINT8 *)pKeyMsg->replay_cnt); + + pKeyMgmtInfoSta->RSNSecured = FALSE; + } + + PRINTM(MMSG, "LEAVE: %s\n", __FUNCTION__); + return retval; + } + + EAPOL_KeyMsg_t const *KeyMgmtStaHsk_Recvd_PWKMsg3(phostsa_private priv, + mlan_buffer *pmbuf) { + EAPOL_KeyMsg_t *pKeyMsg; +// cm_ConnectionInfo_t* connPtr = pEAPoLBufDesc->intf.connPtr; + struct supplicantData *suppData = priv->suppData; + keyMgmtInfoSta_t *pKeyMgmtInfoSta = &suppData->keyMgmtInfoSta; + + PRINTM(MMSG, "ENTER: %s\n", __FUNCTION__); + +#ifdef WAR_ROM_BUG50312_SIMUL_INFRA_WFD + pKeyMsg = + patch_ProcessRxEAPOL_PwkMsg3(pEAPoLBufDesc, + pKeyMgmtInfoSta); +#else + pKeyMsg = ProcessRxEAPOL_PwkMsg3(priv, pmbuf, pKeyMgmtInfoSta); +#endif + if (!pKeyMsg) { + PRINTM(MERROR, + "KeyMgmtStaHsk_Recvd_PWKMsg3 pKeyMsg is NULL\n"); + return NULL; + } + + /* construct Message 4 */ + if (GeneratePWKMsg4(priv, pmbuf, + pKeyMgmtInfoSta, + (pKeyMsg->desc_type == 2)) != SUCCESS) { + PRINTM(MERROR, + "KeyMgmtStaHsk_Recvd_PWKMsg3 GeneratePWKMsg4 Fail\n"); + return pKeyMsg; + } +#ifdef MIB_STATS + INC_MIB_STAT(connPtr, eapolSentFrmFwCnt); +#endif + + updateApReplayCounter(priv, pKeyMgmtInfoSta, + (UINT8 *)pKeyMsg->replay_cnt); + + PRINTM(MMSG, "LEAVE: %s\n", __FUNCTION__); + return NULL; + } + + EAPOL_KeyMsg_t const *KeyMgmtStaHsk_Recvd_GrpMsg1(phostsa_private priv, + mlan_buffer *pmbuf) { + EAPOL_KeyMsg_t *pKeyMsg; + struct supplicantData *suppData = priv->suppData; + keyMgmtInfoSta_t *pKeyMgmtInfoSta = &suppData->keyMgmtInfoSta; + + PRINTM(MMSG, "ENTER: %s\n", __FUNCTION__); + +#ifdef WAR_ROM_BUG50312_SIMUL_INFRA_WFD + pKeyMsg = patch_ProcessRxEAPOL_GrpMsg1(priv, pKeyMgmtInfoSta); +#else + pKeyMsg = ProcessRxEAPOL_GrpMsg1(priv, pmbuf, pKeyMgmtInfoSta); +#endif + if (!pKeyMsg) { + PRINTM(MERROR, + "KeyMgmtStaHsk_Recvd_GrpMsg1 pKeyMsg is NULL\n"); + return NULL; + } + /* construct Message Grp Msg2 */ + if (GenerateGrpMsg2(priv, pmbuf, pKeyMgmtInfoSta) != SUCCESS) { + PRINTM(MERROR, + "KeyMgmtStaHsk_Recvd_GrpMsg1 GenerateGrpMsg2 Fail\n"); + return NULL; + } +#ifdef MIB_STATS + INC_MIB_STAT(connPtr, eapolSentFrmFwCnt); +#endif + + updateApReplayCounter(priv, pKeyMgmtInfoSta, + (UINT8 *)pKeyMsg->replay_cnt); + + PRINTM(MMSG, "LEAVE: %s\n", __FUNCTION__); + return pKeyMsg; + } + + void ProcessKeyMgmtDataSta(phostsa_private priv, mlan_buffer *pmbuf, + IEEEtypes_MacAddr_t *sa, + IEEEtypes_MacAddr_t *da) { + UINT8 retry; + EAPOL_KeyMsg_t *pKeyMsg = + (EAPOL_KeyMsg_t *)(pmbuf->pbuf + pmbuf->data_offset + + sizeof(ether_hdr_t)); + + retry = 0; + + if (pKeyMsg->key_info.KeyType) { + /* PWK */ + if (pKeyMsg->key_info.KeyMIC) { + /* 3rd msg in seq */ + KeyMgmtStaHsk_Recvd_PWKMsg3(priv, pmbuf); + } else { + while ((KeyMgmtStaHsk_Recvd_PWKMsg1 + (priv, pmbuf, sa, da) == FALSE) + && (retry < PWK_MSG1_RETRIES)) { + /* Delay and retry Msg1 processing in + case failure was ** due to the host + not having time to program a PMK ** + yet for 802.1x AKMPs */ + // hal_WaitInUs(100); + retry++; + } + // KeyMgmtStaHsk_Recvd_PWKMsg1(priv, pmbuf, sa, + // da); + + } + } else { + /* GRP */ + if (!KeyMgmtStaHsk_Recvd_GrpMsg1(priv, pmbuf)) { +#if defined(MEF_ENH) && defined(VISTA_802_11_DRIVER_INTERFACE) + hostsleep_initiate_wakeup_with_reason + (WOL_GRP_KEY_REFRESH_ERROR, + WOL_VACUOUS_PATTERN_ID); +#endif + } + } + + } +#if 0 +/* +** This function send a MIC failure event to the AP +*/ + void SendMICFailReport_sta(cm_ConnectionInfo_t * connPtr, + keyMgmtInfoSta_t *pKeyMgmtInfoSta, + BOOLEAN isUnicast) { + EAPOL_KeyMsg_Tx_t *pTxEapol; + UINT16 frameLen; + UINT32 int_sta; + BufferDesc_t *pBufDesc; + + if (pKeyMgmtInfoSta->staCounterHi == 0xffffffff + && pKeyMgmtInfoSta->staCounterLo == 0xffffffff) { + KeyMgmtResetCounter(pKeyMgmtInfoSta); + return; + } + + int_sta = os_if_save_EnterCriticalSection(); + + /* Since there is a MIC failure drop all packets in Tx queue. */ + while ((pBufDesc = (BufferDesc_t *) getq(&wlan_data_q)) != NULL) { + /* Do nothing here. We are just dropping the packet ** + and releasing the queue. */ + mrvl_HandleTxDone(pBufDesc, 0); + } + + os_if_save_ExitCriticalSection(int_sta); + + pBufDesc = GetTxEAPOLBuffer(connPtr, &pTxEapol, NULL); + + if (pBufDesc == NULL) { + return; + } + KeyMgmtSta_PrepareEAPOLMicErrFrame(pTxEapol, + isUnicast, + &connPtr->suppData-> + localBssid, + &connPtr->suppData-> + localStaAddr, + pKeyMgmtInfoSta); + SetEAPOLKeyDescTypeVersion(pTxEapol, + connPtr->suppData-> + customMIB_RSNConfig.wpaType.wpa2, + supplicantAkmUsesKdf(&connPtr-> + suppData-> + customMIB_RSNConfig. + AKM), + connPtr->suppData-> + customMIB_RSNConfig.ucstCipher.ccmp); + + if (pKeyMgmtInfoSta->staCounterLo++ == 0) { + pKeyMgmtInfoSta->staCounterHi++; + } + + frameLen = KeyMgmtSta_PopulateEAPOLLengthMic(pTxEapol, + pKeyMgmtInfoSta-> + EAPOL_MIC_Key, + EAPOL_PROTOCOL_V1, + 0); + + UpdateEAPOLWcbLenAndTransmit(pBufDesc, frameLen); + } +#endif + +#ifdef WAR_ROM_BUG57216_QUIET_TIME_INTERVAL +/* This function assumes that argument state would be either + NO_MIC_FAILURE or FIRST_MIC_FAIL_IN_60_SEC + It must not be called with state othe than these two +*/ +#define MIC_ERROR_QUIET_TIME_INTERVAL 60000000 /* 60 sec */ +#define MIC_ERROR_CHECK_TIME_INTERVAL 60000000 + + void KeyMgmtSta_handleMICErr(MIC_Fail_State_e state, + keyMgmtInfoSta_t *pKeyMgmtInfoSta, + MicroTimerCallback_t callback, + UINT8 flags) { + UINT32 expiry; + UINT32 int_save = tx_interrupt_control(TX_INT_DISABLE); + + if (state == NO_MIC_FAILURE) { + /* First MIC failure */ + pKeyMgmtInfoSta->sta_MIC_Error.status = + FIRST_MIC_FAIL_IN_60_SEC; + expiry = MIC_ERROR_CHECK_TIME_INTERVAL; + } else { + /* Received 2 MIC failures within 60 sec. Do deauth + from AP */ + pKeyMgmtInfoSta->sta_MIC_Error.disableStaAsso = 1; + pKeyMgmtInfoSta->sta_MIC_Error.status = + SECOND_MIC_FAIL_IN_60_SEC; + pKeyMgmtInfoSta->apCounterHi = 0; + pKeyMgmtInfoSta->apCounterLo = 0; + expiry = MIC_ERROR_QUIET_TIME_INTERVAL; + } + tx_interrupt_control(int_save); +#if 0 + microTimerStop(pKeyMgmtInfoSta->micTimer); + + microTimerStart(callback, + (UINT32)pKeyMgmtInfoSta, + expiry, &pKeyMgmtInfoSta->micTimer, flags); +#endif + } +#endif + +#if 0 + void supplicantMICCounterMeasureInvoke(cm_ConnectionInfo_t * connPtr, + BOOLEAN isUnicast) { + MIC_Fail_State_e state; + keyMgmtInfoSta_t *pKeyMgmtInfoSta = + &connPtr->suppData->keyMgmtInfoSta; + + if (pKeyMgmtInfoSta->sta_MIC_Error.MICCounterMeasureEnabled) { + state = pKeyMgmtInfoSta->sta_MIC_Error.status; + + /* Watchdog and clear any pending TX packets to ensure + that ** We are able to get a TX buffer */ + tx_watchdog_recovery(); + SendMICFailReport_sta(connPtr, pKeyMgmtInfoSta, + isUnicast); + + switch (state) { + case NO_MIC_FAILURE: + /* Received 1st MIC failure */ + /* Noneed to check if timer is active. It will + not be active ** cause this is the first + state */ + KeyMgmtSta_handleMICErr(state, + pKeyMgmtInfoSta, + MicErrTimerExp_Sta, + MICRO_TIMER_FLAG_KILL_ON_PS_ENTRY); + + connPtr->suppData->customMIB_RSNStats. + TKIPLocalMICFailures++; + + break; + + case FIRST_MIC_FAIL_IN_60_SEC: + /* Received 2 MIC failures within 60 sec. Do + deauth from AP */ + connPtr->suppData->customMIB_RSNStats. + TKIPCounterMeasuresInvoked++; + + KeyMgmtSta_handleMICErr(state, + pKeyMgmtInfoSta, + MicErrTimerExp_Sta, + MICRO_TIMER_FLAG_KILL_ON_PS_ENTRY); + + /* Is this really needed? */ + pKeyMgmtInfoSta->connPtr = connPtr; + + KeyMgmtSta_handleMICDeauthTimer(pKeyMgmtInfoSta, + DeauthDelayTimerExp_Sta, + DEAUTH_DELAY_TIME_INTERVAL, + MICRO_TIMER_FLAG_KILL_ON_PS_ENTRY); + + break; + + case SECOND_MIC_FAIL_IN_60_SEC: + /* No need to do anything. Everything has been + taken care of by ** the above state */ + + default: + break; + } + } + return; + } +#endif +/* + Start the key Management session +*/ + void keyMgmtSta_StartSession(phostsa_private priv, + IEEEtypes_MacAddr_t *pBssid, + IEEEtypes_MacAddr_t *pStaAddr) { + hostsa_util_fns *util_fns = &priv->util_fns; + keyMgmtInfoSta_t *pKeyMgmtInfoSta = + &priv->suppData->keyMgmtInfoSta; + + // pKeyMgmtInfoSta->psapriv = priv; + + memcpy(util_fns, &priv->suppData->localStaAddr, + pStaAddr, sizeof(priv->suppData->localStaAddr)); + memcpy(util_fns, &priv->suppData->localBssid, + pBssid, sizeof(priv->suppData->localBssid)); + + keyMgmtSta_StartSession_internal(priv, pKeyMgmtInfoSta, + // keyMgmtStaRsnSecuredTimeoutHandler, + RSNSECUREDTIMEOUT, 0); // MICRO_TIMER_FLAG_KILL_ON_PS_ENTRY); + + } + + void supplicantClrEncryptKey(void *priv) { + phostsa_private psapriv = (phostsa_private)priv; + hostsa_mlan_fns *pm_fns = &psapriv->mlan_fns; + + pm_fns->hostsa_clr_encrypt_key(psapriv->pmlan_private); + } + + UINT32 keyApi_UpdateKeyMaterial(void *priv, + key_MgtMaterial_t *keyMgtData_p) { + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + hostsa_mlan_fns *pm_fns = &psapriv->mlan_fns; + // UINT8 wepKeyIndex; + mlan_ds_encrypt_key encrypt_key; + t_u8 bcast_addr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + + memset(util_fns, &encrypt_key, 0, sizeof(mlan_ds_encrypt_key)); + + PRINTM(MMSG, "keyApi_UpdateKeyMaterial keyType=%x keyLen=%x\n", + keyMgtData_p->keyType, keyMgtData_p->keyLen); + switch (keyMgtData_p->keyType) { + case KEY_TYPE_TKIP: + case KEY_TYPE_AES: + /* The Key Info definition for TKIP and AES is the same + */ + if (keyMgtData_p->keyInfo & KEY_INFO_UNICAST) { + /* Unicast Key */ + // SET_KEY_STATE_ENABLED(pwkey, + // (keyMgtData_p->keyInfo + // & KEY_INFO_ENABLED)? TRUE : FALSE); + // pwkey->hdr.keyType = keyMgtData_p->keyType; + // pwkey->hdr.keyDirection = + // KEY_DIRECTION_RXTX; + // pwkey->hdr.keyLen = keyMgtData_p->keyLen; + + // if (IS_KEY_STATE_ENABLED(pwkey)) + // { + // ramHook_keyApiSta_setConnDataTrafficEnabled(connPtr, + // TRUE); + // ramHook_keyApiSta_setConnCurPktTxEnabled(connPtr, + // TRUE); + // SET_KEY_STATE_FORCE_EAPOL_UNENCRYPTED(pwkey, + // TRUE); + // } + encrypt_key.key_flags |= KEY_FLAG_SET_TX_KEY; + encrypt_key.key_len = keyMgtData_p->keyLen; + memcpy(util_fns, encrypt_key.mac_addr, + psapriv->suppData->localBssid, + MAC_ADDR_SIZE); + + /* The Key Material is different */ + if (keyMgtData_p->keyLen && + (keyMgtData_p->keyType == KEY_TYPE_TKIP)) { + /* Update key if included */ + memcpy(util_fns, + (void *)encrypt_key.key_material, + (const void *)keyMgtData_p-> + keyEncypt.TKIP.key, TK_SIZE); + memcpy(util_fns, + (void *)&encrypt_key. + key_material[TK_SIZE], + (const void *)keyMgtData_p-> + keyEncypt.TKIP.txMicKey, + MIC_KEY_SIZE); + memcpy(util_fns, + (void *)&encrypt_key. + key_material[TK_SIZE + + MIC_KEY_SIZE], + (const void *)keyMgtData_p-> + keyEncypt.TKIP.rxMicKey, + MIC_KEY_SIZE); + } else if (keyMgtData_p->keyLen && + (keyMgtData_p->keyType == + KEY_TYPE_AES)) { + /* Update key if included */ + memcpy(util_fns, + (uint8 *)encrypt_key. + key_material, + (uint8 *)keyMgtData_p->keyEncypt. + AES.key, TK_SIZE); + + /* duplicate to group key, for adhoc + aes to use. */ + // if (!IS_KEY_STATE_ENABLED(gwkey)) + // { + /* Multicast Key */ + // SET_KEY_STATE_ENABLED(gwkey, + // (keyMgtData_p->keyInfo + // & KEY_INFO_ENABLED) ? TRUE : FALSE); + // gwkey->hdr.keyType = + // keyMgtData_p->keyType; + // gwkey->hdr.keyDirection = + // KEY_DIRECTION_RXTX; + // gwkey->hdr.keyLen = + // keyMgtData_p->keyLen; + // if (IS_KEY_STATE_ENABLED(gwkey)) + // { + // gwkey->ckd.tkip_aes.loReplayCounter16 + // = 0; + // gwkey->ckd.tkip_aes.hiReplayCounter32 + // = 0xffffffff; + // } + // memcpy((uint8*)gwkey->ckd.tkip_aes.key, + // (uint8*)keyMgtData_p->keyEncypt.AES.key, + // TK_SIZE); + // } + } + } + + if (keyMgtData_p->keyInfo & KEY_INFO_MULTICAST) { + /* Multicast Key */ + // SET_KEY_STATE_ENABLED(gwkey, + // (keyMgtData_p-> + // keyInfo & KEY_INFO_ENABLED) ? TRUE : + // FALSE); + // gwkey->hdr.keyType = keyMgtData_p->keyType; + // gwkey->hdr.keyDirection = + // KEY_DIRECTION_RXTX; + // gwkey->hdr.keyLen = keyMgtData_p->keyLen; + // if (IS_KEY_STATE_ENABLED(gwkey)) + // { + // gwkey->ckd.tkip_aes.loReplayCounter16 = 0; + // gwkey->ckd.tkip_aes.hiReplayCounter32 = + // 0xffffffff; + + // if (!IS_KEY_STATE_ENABLED(pwkey)) + // { + // gwkey->ckd.tkip_aes.txIV32 = 0x0; + // gwkey->ckd.tkip_aes.txIV16 = 0x1; + // ramHook_keyApiSta_setConnDataTrafficEnabled(connPtr, + // TRUE); + // ramHook_keyApiSta_setConnCurPktTxEnabled(connPtr, + // TRUE); + // } + // } + encrypt_key.key_flags |= KEY_FLAG_GROUP_KEY; + encrypt_key.key_len = keyMgtData_p->keyLen; + memcpy(util_fns, encrypt_key.mac_addr, + bcast_addr, MAC_ADDR_SIZE); + + if (keyMgtData_p->keyLen && + (keyMgtData_p->keyType == KEY_TYPE_TKIP)) { + /* Update key if included */ + memcpy(util_fns, + (void *)encrypt_key.key_material, + (const void *)keyMgtData_p-> + keyEncypt.TKIP.key, TK_SIZE); + memcpy(util_fns, + (void *)&encrypt_key. + key_material[TK_SIZE], + (const void *)keyMgtData_p-> + keyEncypt.TKIP.txMicKey, + MIC_KEY_SIZE); + memcpy(util_fns, + (void *)&encrypt_key. + key_material[TK_SIZE + + MIC_KEY_SIZE], + (const void *)keyMgtData_p-> + keyEncypt.TKIP.rxMicKey, + MIC_KEY_SIZE); + } else if (keyMgtData_p->keyLen && + (keyMgtData_p->keyType == + KEY_TYPE_AES)) { + /* Update key if included */ + memcpy(util_fns, + (uint8 *)encrypt_key. + key_material, + (uint8 *)keyMgtData_p->keyEncypt. + AES.key, TK_SIZE); + } + } + /**set pn 0*/ + memset(util_fns, encrypt_key.pn, 0, + sizeof(encrypt_key.pn)); + /**key flag*/ + encrypt_key.key_flags |= KEY_FLAG_RX_SEQ_VALID; + + // ramHook_keyApi_PalladiumHook1(connPtr); + /**set command to fw update key*/ + pm_fns->hostsa_set_encrypt_key((void *)psapriv-> + pmlan_private, + &encrypt_key); + + break; + +#ifndef WAR_ROM_BUG54733_PMF_SUPPORT + case KEY_TYPE_AES_CMAC: + if ( /* NULL != igwkey && */ + (keyMgtData_p-> + keyInfo & KEY_INFO_MULTICAST_IGTK)) { + /* Multicast Key */ + // SET_KEY_STATE_ENABLED(igwkey, + // (keyMgtData_p->keyInfo + // & KEY_INFO_ENABLED) ? TRUE : FALSE); + // igwkey->hdr.keyType = keyMgtData_p->keyType; + // igwkey->hdr.keyDirection = + // KEY_DIRECTION_RXTX; + // igwkey->hdr.keyLen = keyMgtData_p->keyLen; + if (keyMgtData_p->keyLen) { + /* Update IPN if included */ + // memcpy((UINT8 + // *)&igwkey->ckd.tkip_aes.loReplayCounter16, + // (UINT8 + // *)&keyMgtData_p->keyEncypt.iGTK.ipn[0], + // sizeof(igwkey->ckd.tkip_aes.loReplayCounter16)); + + // memcpy((UINT8 + // *)&igwkey->ckd.tkip_aes.hiReplayCounter32, + // + // (UINT8 + // *)&keyMgtData_p->keyEncypt.iGTK.ipn[2], + // sizeof(igwkey->ckd.tkip_aes.hiReplayCounter32)); + + /* Update key if included */ + // memcpy((UINT8 + // *)igwkey->ckd.tkip_aes.key, + // (UINT8 + // *)keyMgtData_p->keyEncypt.iGTK.key, + // CRYPTO_AES_CMAC_KEY_LEN); + memcpy(util_fns, + (uint8 *)encrypt_key. + key_material, + (UINT8 *)keyMgtData_p->keyEncypt. + iGTK.key, + CRYPTO_AES_CMAC_KEY_LEN); + } + /**set pn 0*/ + memset(util_fns, encrypt_key.pn, 0, + sizeof(encrypt_key.pn)); + /**key flag*/ + encrypt_key.key_flags |= KEY_FLAG_RX_SEQ_VALID; + + // ramHook_keyApi_PalladiumHook1(connPtr); + /**set command to fw update key*/ + pm_fns->hostsa_set_encrypt_key(psapriv-> + pmlan_private, + &encrypt_key); + } + break; +#endif + } + + return 0; + } + + void FillKeyMaterialStruct(phostsa_private priv, + UINT16 key_len, + UINT8 isPairwise, KeyData_t *pKey) { + key_MgtMaterial_t keyMgtData; + +#ifdef MIB_STATS + if (isPairwise) { + INC_MIB_STAT(connPtr, PTKSentFrmESUPPCnt); + } else { + INC_MIB_STAT(connPtr, GTKSentFrmESUPPCnt); + } +#endif + + FillKeyMaterialStruct_internal(priv, &keyMgtData, key_len, + isPairwise, pKey); + keyApi_UpdateKeyMaterial(priv, &keyMgtData); + } + + void FillGrpKeyMaterialStruct(phostsa_private priv, + UINT16 keyType, + UINT8 *pn, + UINT8 keyIdx, + UINT8 keyLen, KeyData_t *pKey) { + hostsa_util_fns *util_fns = &priv->util_fns; + key_MgtMaterial_t keyMgtData; + + if (keyType == KDE_DATA_TYPE_IGTK) { + memset(util_fns, (void *)&keyMgtData, 0x00, + sizeof(keyMgtData)); + + keyMgtData.keyType = KEY_TYPE_AES_CMAC; + keyMgtData.keyInfo = + KEY_INFO_MULTICAST_IGTK | KEY_INFO_ENABLED; + keyMgtData.keyLen = keyLen; + + memcpy(util_fns, keyMgtData.keyEncypt.iGTK.ipn, pn, + CRYPTO_AES_CMAC_IPN_LEN); + memcpy(util_fns, keyMgtData.keyEncypt.iGTK.key, + pKey->Key, keyLen); + } else { + FillKeyMaterialStruct_internal(priv, &keyMgtData, + keyLen, FALSE, pKey); + } + + keyApi_UpdateKeyMaterial(priv, &keyMgtData); + } + + void supplicantInitSession(void *priv, + t_u8 *pSsid, + t_u16 len, t_u8 *pBssid, t_u8 *pStaAddr) { + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + + if (supplicantIsEnabled((void *)psapriv)) { + KeyMgmtInitSta(psapriv); + memcpy(util_fns, + (void *)psapriv->suppData->hashSsId.SsId, pSsid, + len); + psapriv->suppData->hashSsId.Len = len; + keyMgmtSta_StartSession(psapriv, + (IEEEtypes_MacAddr_t *)pBssid, + (IEEEtypes_MacAddr_t *) + pStaAddr); + psapriv->suppData->suppInitialized = TRUE; + } + } + + UINT8 supplicantIsCounterMeasuresActive(phostsa_private priv) { + return priv->suppData->keyMgmtInfoSta.sta_MIC_Error. + disableStaAsso; + } +//#endif + + void init_customApp_mibs(phostsa_private priv, + supplicantData_t *suppData) { + hostsa_util_fns *util_fns = &priv->util_fns; + + memset(util_fns, &suppData->customMIB_RSNStats, + 0x00, sizeof(suppData->customMIB_RSNStats)); + memset(util_fns, &suppData->customMIB_RSNConfig, + 0x00, sizeof(suppData->customMIB_RSNConfig)); + /* keep noRsn = 1 as default setting */ + suppData->customMIB_RSNConfig.wpaType.noRsn = 1; + + } + + SecurityMode_t supplicantCurrentSecurityMode(phostsa_private priv) { + return (priv->suppData->customMIB_RSNConfig.wpaType); + } + + AkmSuite_t *supplicantCurrentAkmSuite(phostsa_private priv) { + return &priv->suppData->customMIB_RSNConfig.AKM; + } + +//#pragma arm section code = ".wlandatapathcode" + t_u8 supplicantIsEnabled(void *priv) { + phostsa_private psapriv = (phostsa_private)priv; + + if (psapriv->suppData == NULL) { + return 0; + } + + return (psapriv->suppData->customMIB_RSNConfig.RSNEnabled); + } +//#pragma arm section code + + void supplicantDisable(void *priv) { + phostsa_private psapriv = (phostsa_private)priv; + + if (!supplicantIsEnabled((void *)psapriv)) { + return; + } + psapriv->suppData->customMIB_RSNConfig.RSNEnabled = 0; + init_customApp_mibs(psapriv, psapriv->suppData); + + PRINTM(MMSG, "supplicantDisable RSNEnabled=%x\n", + psapriv->suppData->customMIB_RSNConfig.RSNEnabled); + } + + void supplicantQueryPassphraseAndEnable(void *priv, t_u8 *pbuf) { + phostsa_private psapriv = (phostsa_private)priv; + pmkElement_t *pPMKElement = MNULL; + mlan_ssid_bssid *ssid_bssid = (mlan_ssid_bssid *)pbuf; + mlan_802_11_ssid *pssid = &ssid_bssid->ssid; + + if (psapriv->suppData == NULL) + return; + if (!ssid_bssid) + return; + if (!pssid->ssid_len) + return; + /* extract the PSK from the cache entry */ + pPMKElement = + pmkCacheFindPSKElement((void *)psapriv, pssid->ssid, + pssid->ssid_len); + if (pPMKElement) + psapriv->suppData->customMIB_RSNConfig.RSNEnabled = 1; + else + psapriv->suppData->customMIB_RSNConfig.RSNEnabled = 0; + + PRINTM(MMSG, + "supplicantQueryPassphraseAndEnable RSNEnabled=%x ssid=%s\n", + psapriv->suppData->customMIB_RSNConfig.RSNEnabled, + pssid->ssid); + } + + void supplicantSetAssocRsn(phostsa_private priv, + SecurityMode_t wpaType, + Cipher_t *pMcstCipher, + Cipher_t *pUcstCipher, + AkmSuite_t *pAkm, + IEEEtypes_RSNCapability_t *pRsnCap, + Cipher_t *pGrpMgmtCipher) { + hostsa_util_fns *util_fns = &priv->util_fns; + IEEEtypes_RSNCapability_t rsnCap; + + if (pRsnCap == NULL) { + /* It is being added as an IOT workaround for APs that + do not properly handle association requests that omit + * the RSN Capability field in the RSN IE */ + memset(util_fns, &rsnCap, 0x00, sizeof(rsnCap)); + pRsnCap = &rsnCap; + } + + supplicantSetAssocRsn_internal(priv, + &priv->suppData-> + customMIB_RSNConfig, + &priv->suppData->currParams, + wpaType, pMcstCipher, + pUcstCipher, pAkm, pRsnCap, + pGrpMgmtCipher); + } + + UINT16 keyMgmtFormatWpaRsnIe(phostsa_private priv, + UINT8 *pos, + IEEEtypes_MacAddr_t *pBssid, + IEEEtypes_MacAddr_t *pStaAddr, + UINT8 *pPmkid, BOOLEAN addPmkid) { + struct supplicantData *suppData = priv->suppData; + + return keyMgmtFormatWpaRsnIe_internal(priv, + &suppData-> + customMIB_RSNConfig, pos, + pBssid, pStaAddr, pPmkid, + addPmkid); + } + + static void install_wpa_none_keys(phostsa_private priv, + UINT8 type, UINT8 unicast) { + UINT8 *pPMK; + key_MgtMaterial_t keyMgtData; + + pPMK = pmkCacheFindPSK((void *)priv, + (UINT8 *)priv->suppData->hashSsId.SsId, + priv->suppData->hashSsId.Len); + if (pPMK == NULL) { + return; + } + + install_wpa_none_keys_internal(priv, &keyMgtData, + pPMK, type, unicast); + + keyApi_UpdateKeyMaterial(priv, &keyMgtData); + + /* there's no timer or other to initialize */ + KeyMgmtInitSta(priv); + priv->suppData->keyMgmtInfoSta.RSNSecured = TRUE; + } + + void supplicantInstallWpaNoneKeys(phostsa_private priv) { + if (priv->suppData->customMIB_RSNConfig.RSNEnabled + && priv->suppData->customMIB_RSNConfig.wpaType.wpaNone) { + install_wpa_none_keys(priv, + priv->suppData-> + customMIB_RSNConfig.mcstCipher. + ccmp, 0); + install_wpa_none_keys(priv, + priv->suppData-> + customMIB_RSNConfig.mcstCipher. + ccmp, 1); + } + } + + void supplicantSetProfile(phostsa_private priv, + SecurityMode_t wpaType, + Cipher_t mcstCipher, Cipher_t ucstCipher) { + priv->suppData->currParams.wpaType = wpaType; + priv->suppData->currParams.mcstCipher = mcstCipher; + priv->suppData->currParams.ucstCipher = ucstCipher; + } + + void supplicantGetProfile(phostsa_private priv, + SecurityMode_t *pWpaType, + Cipher_t *pMcstCipher, + Cipher_t *pUcstCipher) { + *pWpaType = priv->suppData->currParams.wpaType; + *pMcstCipher = priv->suppData->currParams.mcstCipher; + *pUcstCipher = priv->suppData->currParams.ucstCipher; + } + + void supplicantGetProfileCurrent(phostsa_private priv, + SecurityMode_t *pWpaType, + Cipher_t *pMcstCipher, + Cipher_t *pUcstCipher) { + *pWpaType = priv->suppData->customMIB_RSNConfig.wpaType; + *pMcstCipher = priv->suppData->customMIB_RSNConfig.mcstCipher; + *pUcstCipher = priv->suppData->customMIB_RSNConfig.ucstCipher; + } + + void supplicantInit(void *priv, supplicantData_t *suppData) { + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + + init_customApp_mibs(priv, suppData); + + memset(util_fns, &suppData->currParams, 0xff, + sizeof(SecurityParams_t)); + memset(util_fns, &suppData->keyMgmtInfoSta, 0, + sizeof(keyMgmtInfoSta_t)); + suppData->keyMgmtInfoSta.sta_MIC_Error.disableStaAsso = 0; + suppData->keyMgmtInfoSta.sta_MIC_Error. + MICCounterMeasureEnabled = 1; + suppData->keyMgmtInfoSta.sta_MIC_Error.status = NO_MIC_FAILURE; + KeyMgmtResetCounter(&suppData->keyMgmtInfoSta); + } + + void supplicantStopSessionTimer(void *priv) { + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + + if (psapriv->suppData == NULL) { + return; + } + + if (psapriv->suppData->keyMgmtInfoSta.rsnTimer) { + util_fns->moal_stop_timer(util_fns->pmoal_handle, + psapriv->suppData-> + keyMgmtInfoSta.rsnTimer); + // priv->suppData->keyMgmtInfoSta.rsnTimer = 0; + } + } + + void supplicantSmeResetNotification(phostsa_private priv) { + supplicantStopSessionTimer(priv); + } + + UINT16 keyMgmtGetKeySize(phostsa_private priv, UINT8 isPairwise) { + return keyMgmtGetKeySize_internal(&priv->suppData-> + customMIB_RSNConfig, + isPairwise); + } + + void keyMgmtSetMICKey(phostsa_private priv, UINT8 *pKey) { + hostsa_util_fns *util_fns = &priv->util_fns; + + memcpy(util_fns, priv->suppData->keyMgmtInfoSta.EAPOL_MIC_Key, + pKey, + sizeof(priv->suppData->keyMgmtInfoSta.EAPOL_MIC_Key)); + } + + UINT8 *keyMgmtGetMICKey(phostsa_private priv) { + return (priv->suppData->keyMgmtInfoSta.EAPOL_MIC_Key); + } + + void keyMgmtSetEAPOLEncrKey(phostsa_private priv, UINT8 *pKey) { + hostsa_util_fns *util_fns = &priv->util_fns; + + memcpy(util_fns, priv->suppData->keyMgmtInfoSta.EAPOL_Encr_Key, + pKey, + sizeof(priv->suppData->keyMgmtInfoSta.EAPOL_Encr_Key)); + } + + void keyMgmtSetTemporalKeyOnly(phostsa_private priv, UINT8 *pTk) { + hostsa_util_fns *util_fns = &priv->util_fns; + + memcpy(util_fns, &priv->suppData->keyMgmtInfoSta.newPWKey.Key, + pTk, + sizeof(priv->suppData->keyMgmtInfoSta.newPWKey.Key)); + } + + UINT8 *keyMgmtGetEAPOLEncrKey(phostsa_private priv) { + return (priv->suppData->keyMgmtInfoSta.EAPOL_Encr_Key); + } + + void keyMgmtSetPairwiseKey(phostsa_private priv, KeyData_t *pKey) { + hostsa_util_fns *util_fns = &priv->util_fns; + + memcpy(util_fns, &priv->suppData->keyMgmtInfoSta.newPWKey, + pKey, sizeof(priv->suppData->keyMgmtInfoSta.newPWKey)); + } + + void keyMgmtSetGroupKey(phostsa_private priv, KeyData_t *pKey) { + hostsa_util_fns *util_fns = &priv->util_fns; + + memcpy(util_fns, &priv->suppData->keyMgmtInfoSta.GRKey, + pKey, sizeof(priv->suppData->keyMgmtInfoSta.GRKey)); + + FillKeyMaterialStruct(priv, + keyMgmtGetKeySize(priv, FALSE), FALSE, + pKey); + } + + void keyMgmtSetGtk(phostsa_private priv, + IEEEtypes_GtkElement_t * pGtk, UINT8 *pKek) { + hostsa_util_fns *util_fns = &priv->util_fns; + UINT8 encrKeyLen; + + /* Determine the encrypted key field length from the IE length */ + encrKeyLen = pGtk->Len - (sizeof(pGtk->KeyInfo) + + sizeof(pGtk->KeyLen) + + sizeof(pGtk->RSC)); + + MRVL_AesUnWrap(pKek, + 2, + encrKeyLen / 8 - 1, + (UINT8 *)pGtk->Key, NULL, (UINT8 *)pGtk->Key); + + memcpy(util_fns, &priv->suppData->keyMgmtInfoSta.GRKey.Key, + (UINT8 *)pGtk->Key, + sizeof(priv->suppData->keyMgmtInfoSta.GRKey.Key)); + + FillGrpKeyMaterialStruct(priv, + KDE_DATA_TYPE_GTK, + pGtk->RSC, + pGtk->KeyInfo.KeyId, + pGtk->KeyLen, + &priv->suppData->keyMgmtInfoSta.GRKey); + } + + void keyMgmtSetIGtk(phostsa_private priv, + keyMgmtInfoSta_t *pKeyMgmtInfoSta, + IGtkKde_t *pIGtkKde, UINT8 iGtkKdeLen) { + hostsa_util_fns *util_fns = &priv->util_fns; + UINT8 iGtkLen; + + iGtkLen = iGtkKdeLen - 12; /* OUI + dataType + keyId + IPN + = 12 bytes */ + + memcpy(util_fns, &pKeyMgmtInfoSta->IGtk.Key, + (UINT8 *)pIGtkKde->IGtk, + MIN(sizeof(pKeyMgmtInfoSta->IGtk.Key), iGtkLen)); + + FillGrpKeyMaterialStruct(priv, + KDE_DATA_TYPE_IGTK, + pIGtkKde->IPN, + pIGtkKde->keyId[0], + iGtkLen, &pKeyMgmtInfoSta->IGtk); + + } + + UINT8 *keyMgmtGetIGtk(phostsa_private priv) { + return (priv->suppData->keyMgmtInfoSta.IGtk.Key); + } + + void keyMgmtPlumbPairwiseKey(phostsa_private priv) { + hostsa_util_fns *util_fns = &priv->util_fns; + + memcpy(util_fns, &priv->suppData->keyMgmtInfoSta.PWKey, + &priv->suppData->keyMgmtInfoSta.newPWKey, + sizeof(priv->suppData->keyMgmtInfoSta.PWKey)); + + FillKeyMaterialStruct(priv, + keyMgmtGetKeySize(priv, TRUE), + TRUE, + &priv->suppData->keyMgmtInfoSta.PWKey); + } +#if 0 +#pragma arm section code = ".wlandatapathcode" + void keyMgmtSuccessfulDecryptNotify(cm_ConnectionInfo_t * connPtr, + cipher_key_t *pRxCipherKey) { + if (supplicantIsEnabled(connPtr)) { + connPtr->suppData->keyMgmtInfoSta.pRxDecryptKey = + pRxCipherKey; + + if (connPtr->suppData->keyMgmtInfoSta.pRxDecryptKey && + (!connPtr->suppData->customMIB_RSNConfig.RSNEnabled + || (connPtr->suppData->customMIB_RSNConfig. + RSNEnabled && + connPtr->suppData->keyMgmtInfoSta. + pwkHandshakeComplete))) { + SET_KEY_STATE_FORCE_EAPOL_UNENCRYPTED(connPtr-> + suppData-> + keyMgmtInfoSta. + pRxDecryptKey, + FALSE); + } + } else { + if (pRxCipherKey && + (!connPtr->cmFlags.RSNEnabled || + (connPtr->cmFlags.RSNEnabled && + connPtr->cmFlags.gDataTrafficEnabled))) { + SET_KEY_STATE_FORCE_EAPOL_UNENCRYPTED + (pRxCipherKey, FALSE); + } + } + } + +#pragma arm section code +#endif + static void keyMgmtKeyGroupTxDone(phostsa_private priv) { + /* + ** if (!pBufDesc || (pBufDesc->rsvd & 0x00FF == 0)) + ** + ** Removed check to verify the 4th message was a success. If we + ** miss the ACK from the 4th(WPA2)/2nd(WPA) message, but the AP + ** received it, then it won't retry and we will be stuck waiting for + ** a session timeout. + ** + ** Could add back later if we retry the message in case of TX failure. + */ + FillKeyMaterialStruct(priv, + keyMgmtGetKeySize(priv, FALSE), + FALSE, + &priv->suppData->keyMgmtInfoSta.GRKey); + + priv->suppData->keyMgmtInfoSta.RSNDataTrafficEnabled = TRUE; + + if (priv->suppData->keyMgmtInfoSta.RSNSecured == FALSE) { + priv->suppData->keyMgmtInfoSta.RSNSecured = TRUE; + + keyMgmtControlledPortOpen(priv); + } +#ifdef MULTI_CH_SW + chmgr_UnlockCh(connPtr, 0); +#endif + + // return NULL; + } + + static void keyMgmtKeyPairwiseTxDone(phostsa_private priv) { + /* + ** if (!pBufDesc || (pBufDesc->rsvd & 0x00FF == 0)) + ** + ** Removed check to verify the 4th message was a success. If we + ** miss the ACK from the 4th(WPA2) message, but the AP + ** received it, then it won't retry and we will be stuck waiting for + ** a session timeout. + ** + ** Could add back later if we retry the message in case of TX failure. + */ + keyMgmtPlumbPairwiseKey(priv); + + priv->suppData->keyMgmtInfoSta.pwkHandshakeComplete = TRUE; + + if (priv->suppData->keyMgmtInfoSta.pRxDecryptKey && + priv->suppData->keyMgmtInfoSta.pwkHandshakeComplete) { + SET_KEY_STATE_FORCE_EAPOL_UNENCRYPTED(priv->suppData-> + keyMgmtInfoSta. + pRxDecryptKey, + FALSE); + } + + } + + static + void keyMgmtKeyPairAndGroupTxDone(phostsa_private priv) { + keyMgmtKeyPairwiseTxDone(priv); + keyMgmtKeyGroupTxDone(priv); + } + + void keyMgmtControlledPortOpen(phostsa_private priv) { + hostsa_mlan_fns *pm_fns = &priv->mlan_fns; + + supplicantStopSessionTimer((void *)priv); + + pm_fns->Hostsa_StaControlledPortOpen(pm_fns->pmlan_private); + } + +#ifdef WAR_ROM_BUG42707_RSN_IE_LEN_CHECK + + BOOLEAN patch_supplicantParseRsnIe(phostsa_private priv, + IEEEtypes_RSNElement_t *pRsnIe, + SecurityMode_t *pWpaTypeOut, + Cipher_t *pMcstCipherOut, + Cipher_t *pUcstCipherOut, + AkmSuite_t *pAkmListOut, + UINT8 akmOutMax, + IEEEtypes_RSNCapability_t + *pRsnCapOut, + Cipher_t *pGrpMgmtCipherOut) { + hostsa_util_fns *util_fns = &priv->util_fns; + UINT8 *pIeData; + UINT8 *pIeEnd; + UINT8 *pGrpKeyCipher; + UINT16 pwsKeyCnt; + UINT8 *pPwsKeyCipherList; + UINT16 authKeyCnt; + UINT8 *pAuthKeyList; + + IEEEtypes_RSNCapability_t *pRsnCap; + + UINT16 *pPMKIDCnt; + + UINT8 *pGrpMgmtCipher; + + memset(util_fns, pWpaTypeOut, 0x00, sizeof(SecurityMode_t)); + + pWpaTypeOut->wpa2 = 1; + + /* Set the start and end of the IE data */ + pIeData = (UINT8 *)&pRsnIe->Ver; + pIeEnd = pIeData + pRsnIe->Len; + + /* Skip past the version field */ + pIeData += sizeof(pRsnIe->Ver); + + /* Parse the group key cipher list */ + pGrpKeyCipher = pIeData; + pIeData += sizeof(pRsnIe->GrpKeyCipher); + supplicantParseMcstCipher(priv, pMcstCipherOut, pGrpKeyCipher); + + /* Parse the pairwise key cipher list */ + memcpy(util_fns, &pwsKeyCnt, pIeData, sizeof(pwsKeyCnt)); + pIeData += sizeof(pRsnIe->PwsKeyCnt); + + pPwsKeyCipherList = pIeData; + pIeData += pwsKeyCnt * sizeof(pRsnIe->PwsKeyCipherList); + supplicantParseUcstCipher(priv, pUcstCipherOut, pwsKeyCnt, + pPwsKeyCipherList); + + /* Parse and return the AKM list */ + memcpy(util_fns, &authKeyCnt, pIeData, sizeof(authKeyCnt)); + pIeData += sizeof(pRsnIe->AuthKeyCnt); + + pAuthKeyList = pIeData; + pIeData += authKeyCnt * sizeof(pRsnIe->AuthKeyList); + memset(util_fns, pAkmListOut, 0x00, + akmOutMax * sizeof(AkmSuite_t)); + memcpy(util_fns, pAkmListOut, pAuthKeyList, + MIN(authKeyCnt, + akmOutMax) * sizeof(pRsnIe->AuthKeyList)); + + /* Check if the RSN Capability is included */ + if (pIeData < pIeEnd) { + pRsnCap = (IEEEtypes_RSNCapability_t *)pIeData; + pIeData += sizeof(pRsnIe->RsnCap); + + if (pRsnCapOut) { + memcpy(util_fns, pRsnCapOut, pRsnCap, + sizeof(IEEEtypes_RSNCapability_t)); + } + } + + /* Check if the PMKID count is included */ + if (pIeData < pIeEnd) { + pPMKIDCnt = (UINT16 *)pIeData; + pIeData += sizeof(pRsnIe->PMKIDCnt); + + /* Check if the PMKID List is included */ + if (pIeData < pIeEnd) { + /* pPMKIDList = pIeData; <-- Currently not used + in parsing */ + pIeData += + *pPMKIDCnt * sizeof(pRsnIe->PMKIDList); + } + } + + /* Check if the Group Mgmt Cipher is included */ + if (pIeData < pIeEnd) { + pGrpMgmtCipher = pIeData; + + if (pGrpMgmtCipherOut) { + memcpy(util_fns, pGrpMgmtCipherOut, + pGrpMgmtCipher, + sizeof(pRsnIe->GrpMgmtCipher)); + } + } + + return TRUE; + } + +#endif + +//#pragma arm section code = ".init" + void keyMgmtSta_RomInit(void) { +//#if defined(PSK_SUPPLICANT) || defined (WPA_NONE) + // ramHook_keyMgmtProcessMsgExt = keyMgmtProcessMsgExt; + // ramHook_keyMgmtSendDeauth = keyMgmtSendDeauth2Peer; +//#endif + +#ifdef WAR_ROM_BUG42707_RSN_IE_LEN_CHECK + supplicantParseRsnIe_hook = patch_supplicantParseRsnIe; +#endif + + } +//#pragma arm section code + +#if defined(BTAMP) + UINT8 *parseKeyDataField(cm_ConnectionInfo_t * connPtr, + UINT8 *pKey, UINT16 len) { + keyMgmtInfoSta_t *pKeyMgmtInfoSta; + KDE_t *pKde; + + pKeyMgmtInfoSta = &connPtr->suppData->keyMgmtInfoSta; + + /* parse KDE GTK */ + pKde = parseKeyDataGTK(pKey, len, &pKeyMgmtInfoSta->GRKey); + + /* Parse PMKID though it's _not used_ now */ + + pKde = parseKeyKDE_DataType(pKey, len, KDE_DATA_TYPE_PMKID); + + if (pKde) { + /* PMKID KDE */ + return (UINT8 *)pKde->data; + } + + return NULL; + } + +/* Add RSN IE to a frame body */ + UINT16 btampAddRsnIe(cm_ConnectionInfo_t * connPtr, + IEEEtypes_RSNElement_t *pRsnIe) { + const uint8 wpa2_psk[4] = { 0x00, 0x0f, 0xac, 0x02 }; /* WPA2 + PSK */ + UINT16 ieSize; + IEEEtypes_RSNCapability_t rsncap; + SecurityMode_t securityMode; + Cipher_t mcstWpa2; + Cipher_t ucstWpa2; + AkmSuite_t *pAkmWpa2; + + memset(util_fns, &securityMode, 0x00, sizeof(securityMode)); + memset(util_fns, &mcstWpa2, 0x00, sizeof(mcstWpa2)); + memset(util_fns, &ucstWpa2, 0x00, sizeof(ucstWpa2)); + memset(util_fns, &rsncap, 0, sizeof(rsncap)); + + mcstWpa2.ccmp = 1; + ucstWpa2.ccmp = 1; + securityMode.wpa2 = 1; + + pAkmWpa2 = (AkmSuite_t *)wpa2_psk; + + supplicantSetProfile(connPtr, securityMode, mcstWpa2, ucstWpa2); + + supplicantSetAssocRsn(connPtr, securityMode, &mcstWpa2, + &ucstWpa2, pAkmWpa2, &rsncap, NULL); + + ieSize = keyMgmtFormatWpaRsnIe(connPtr, + (UINT8 *)pRsnIe, + NULL, NULL, NULL, FALSE); + return ieSize; + } +#endif +#if 0 + void supplicantParseAndFormatRsnIe(phostsa_private priv, + IEEEtypes_RSNElement_t *pRsnIe, + SecurityMode_t *pWpaTypeOut, + Cipher_t *pMcstCipherOut, + Cipher_t *pUcstCipherOut, + AkmSuite_t *pAkmListOut, + UINT8 akmOutMax, + IEEEtypes_RSNCapability_t + *pRsnCapOut, + Cipher_t *pGrpMgmtCipherOut) { + hostsa_util_fns *util_fns = &priv->util_fns; + UINT8 *pIeData; + UINT8 *pIeEnd; + UINT8 *pGrpKeyCipher; + UINT16 pwsKeyCnt; + UINT8 *pPwsKeyCipherList; + UINT16 authKeyCnt; + UINT8 *pAuthKeyList; + + IEEEtypes_RSNCapability_t *pRsnCap; + + UINT16 *pPMKIDCnt; + + UINT8 *pGrpMgmtCipher; + +//longl add + UINT8 *pos = NULL; + UINT8 cp_size = 0; +#if 0 +#if !defined(REMOVE_PATCH_HOOKS) + if (supplicantParseRsnIe_hook(pRsnIe, + pWpaTypeOut, + pMcstCipherOut, + pUcstCipherOut, + pAkmListOut, + akmOutMax, + pRsnCapOut, pGrpMgmtCipherOut)) { + return; + } +#endif +#endif + memset(util_fns, pWpaTypeOut, 0x00, sizeof(SecurityMode_t)); + memset(util_fns, (UINT8 *)priv->suppData->wpa_rsn_ie, 0x00, + MAX_IE_SIZE); + pos = (UINT8 *)priv->suppData->wpa_rsn_ie; + + pWpaTypeOut->wpa2 = 1; + + /* Set the start and end of the IE data */ + pIeData = (UINT8 *)&pRsnIe->Ver; + pIeEnd = pIeData + pRsnIe->Len; + + /* Skip past the version field */ + pIeData += sizeof(pRsnIe->Ver); + + /* Parse the group key cipher list */ + pGrpKeyCipher = pIeData; + pIeData += sizeof(pRsnIe->GrpKeyCipher); + supplicantParseMcstCipher(priv, pMcstCipherOut, pGrpKeyCipher); + + cp_size = pIeData - (UINT8 *)pRsnIe; + memcpy(util_fns, pos, (UINT8 *)pRsnIe, cp_size); + pos += cp_size; + + /* Parse the pairwise key cipher list */ + memcpy(util_fns, &pwsKeyCnt, pIeData, sizeof(pwsKeyCnt)); + pIeData += sizeof(pRsnIe->PwsKeyCnt); + + if (pwsKeyCnt > 0) { + (*(UINT16 *)pos) = (UINT16)1; + pos += sizeof(UINT16); + } + + pPwsKeyCipherList = pIeData; + pIeData += pwsKeyCnt * sizeof(pRsnIe->PwsKeyCipherList); + supplicantParseUcstCipher(priv, pUcstCipherOut, pwsKeyCnt, + pPwsKeyCipherList); + + if (pUcstCipherOut->ccmp == 1) { + memcpy(util_fns, pos, wpa2_oui04, sizeof(wpa2_oui04)); + pos += sizeof(wpa2_oui04); + } else if (pUcstCipherOut->tkip == 1) { + memcpy(util_fns, pos, wpa2_oui02, sizeof(wpa2_oui02)); + pos += sizeof(wpa2_oui02); + } + if ((pUcstCipherOut->ccmp == 1) && (pUcstCipherOut->tkip == 1)) + pUcstCipherOut->tkip = 0; + + cp_size = pIeEnd - pIeData; + memcpy(util_fns, pos, pIeData, cp_size); + pos += cp_size; + ((IEEEtypes_RSNElement_t *)(priv->suppData->wpa_rsn_ie))->Len = + pos - (UINT8 *)priv->suppData->wpa_rsn_ie - + sizeof(IEEEtypes_InfoElementHdr_t); + + /* Parse and return the AKM list */ + memcpy(util_fns, &authKeyCnt, pIeData, sizeof(authKeyCnt)); + pIeData += sizeof(pRsnIe->AuthKeyCnt); + + pAuthKeyList = pIeData; + pIeData += authKeyCnt * sizeof(pRsnIe->AuthKeyList); + memset(util_fns, pAkmListOut, 0x00, + akmOutMax * sizeof(AkmSuite_t)); + memcpy(util_fns, pAkmListOut, pAuthKeyList, + MIN(authKeyCnt, + akmOutMax) * sizeof(pRsnIe->AuthKeyList)); + + DBG_HEXDUMP(MCMD_D, " pAuthKeyList", + (t_u8 *)pAuthKeyList, MIN(authKeyCnt, + akmOutMax) * + sizeof(pRsnIe->AuthKeyList)); + DBG_HEXDUMP(MCMD_D, " pAuthKeyList", (t_u8 *)pAkmListOut, + MIN(authKeyCnt, + akmOutMax) * sizeof(pRsnIe->AuthKeyList)); + /* Check if the RSN Capability is included */ + if (pIeData < pIeEnd) { + pRsnCap = (IEEEtypes_RSNCapability_t *)pIeData; + pIeData += sizeof(pRsnIe->RsnCap); + + if (pRsnCapOut) { + memcpy(util_fns, pRsnCapOut, pRsnCap, + sizeof(IEEEtypes_RSNCapability_t)); + } + } + + /* Check if the PMKID count is included */ + if (pIeData < pIeEnd) { + pPMKIDCnt = (UINT16 *)pIeData; + pIeData += sizeof(pRsnIe->PMKIDCnt); + + /* Check if the PMKID List is included */ + if (pIeData < pIeEnd) { + /* pPMKIDList = pIeData; <-- Currently not used + in parsing */ + pIeData += + *pPMKIDCnt * sizeof(pRsnIe->PMKIDList); + } + } + + /* Check if the Group Mgmt Cipher is included */ + if (pIeData < pIeEnd) { + pGrpMgmtCipher = pIeData; + + if (pGrpMgmtCipherOut) { + memcpy(util_fns, pGrpMgmtCipherOut, + pGrpMgmtCipher, + sizeof(pRsnIe->GrpMgmtCipher)); + } + } + } + + void supplicantParseAndFormatWpaIe(phostsa_private priv, + IEEEtypes_WPAElement_t *pIe, + SecurityMode_t *pWpaType, + Cipher_t *pMcstCipher, + Cipher_t *pUcstCipher, + AkmSuite_t *pAkmList, + UINT8 akmOutMax) { + hostsa_util_fns *util_fns = &priv->util_fns; + IEEEtypes_WPAElement_t *pTemp = pIe; + int count; + int akmCount = akmOutMax; + AkmSuite_t *pAkm = pAkmList; + UINT8 *pos = NULL; + UINT8 cp_size = 0; + UINT8 *pIeEnd = + (UINT8 *)pIe + sizeof(IEEEtypes_InfoElementHdr_t) + + pIe->Len; + + PRINTM(MMSG, "ENTER: %s\n", __FUNCTION__); + + memset(util_fns, pMcstCipher, 0x00, sizeof(Cipher_t)); + memset(util_fns, pUcstCipher, 0x00, sizeof(Cipher_t)); + memset(util_fns, pAkmList, 0x00, + akmOutMax * sizeof(AkmSuite_t)); + memset(util_fns, pWpaType, 0x00, sizeof(SecurityMode_t)); + memset(util_fns, (UINT8 *)priv->suppData->wpa_rsn_ie, 0x00, + MAX_IE_SIZE); + pos = (UINT8 *)priv->suppData->wpa_rsn_ie; + + pWpaType->wpa = 1; + + /* record the AP's multicast cipher */ + if (!memcmp + (util_fns, (char *)pTemp->GrpKeyCipher, wpa_oui02, + sizeof(wpa_oui02))) { + /* WPA TKIP */ + pMcstCipher->tkip = 1; + } else if (!memcmp + (util_fns, (char *)pTemp->GrpKeyCipher, wpa_oui04, + sizeof(wpa_oui04))) { + /* WPA AES */ + pMcstCipher->ccmp = 1; + } else if (!memcmp + (util_fns, (char *)pTemp->GrpKeyCipher, wpa_oui01, + sizeof(wpa_oui01))) { + /* WPA WEP 40 */ + pMcstCipher->wep40 = 1; + } else if (!memcmp + (util_fns, (char *)pTemp->GrpKeyCipher, wpa_oui05, + sizeof(wpa_oui05))) { + /* WPA WEP 104 */ + pMcstCipher->wep104 = 1; + } + + cp_size = (UINT8 *)(&pTemp->PwsKeyCnt) - (UINT8 *)pIe; + memcpy(util_fns, pos, (UINT8 *)pIe, cp_size); + pos += cp_size; + + count = pTemp->PwsKeyCnt; + + if (count > 0) { + (*(UINT16 *)pos) = (UINT16)1; + pos += sizeof(UINT16); + } + + while (count) { + /* record the AP's unicast cipher */ + if (!memcmp(util_fns, (char *)pTemp->PwsKeyCipherList, + wpa_oui02, sizeof(wpa_oui02))) { + /* WPA TKIP */ + pUcstCipher->tkip = 1; + } else if (!memcmp + (util_fns, (char *)pTemp->PwsKeyCipherList, + wpa_oui04, sizeof(wpa_oui04))) { + /* WPA AES */ + pUcstCipher->ccmp = 1; + } + count--; + + if (count) { + pTemp = (IEEEtypes_WPAElement_t *)((UINT8 *) + pTemp + + sizeof + (pTemp-> + PwsKeyCipherList)); + } + } + + if (pUcstCipher->ccmp == 1) { + memcpy(util_fns, pos, wpa_oui04, sizeof(wpa_oui04)); + pos += sizeof(wpa_oui04); + } else if (pUcstCipher->tkip == 1) { + memcpy(util_fns, pos, wpa_oui02, sizeof(wpa_oui02)); + pos += sizeof(wpa_oui02); + } + if ((pUcstCipher->ccmp == 1) && (pUcstCipher->tkip == 1)) + pUcstCipher->tkip = 0; + + cp_size = pIeEnd - (UINT8 *)(&pTemp->AuthKeyCnt); + memcpy(util_fns, pos, &pTemp->AuthKeyCnt, cp_size); + pos += cp_size; + ((IEEEtypes_RSNElement_t *)(priv->suppData->wpa_rsn_ie))->Len = + pos - (UINT8 *)priv->suppData->wpa_rsn_ie - + sizeof(IEEEtypes_InfoElementHdr_t); + + count = pTemp->AuthKeyCnt; + + while (count) { + if (akmCount) { + /* Store the AKM */ + memcpy(util_fns, pAkm, + (char *)pTemp->AuthKeyList, + sizeof(pTemp->AuthKeyList)); + pAkm++; + akmCount--; + } + + count--; + + if (count) { + pTemp = (IEEEtypes_WPAElement_t *)((UINT8 *) + pTemp + + sizeof + (pTemp-> + AuthKeyList)); + } + } + + if (!memcmp + (util_fns, pAkmList, wpa_oui_none, sizeof(wpa_oui_none))) { + pWpaType->wpaNone = 1; + } + + } +#endif + + void *processRsnWpaInfo(void *priv, void *prsnwpa_ie) { + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + Cipher_t mcstCipher; + Cipher_t ucstCipher; + SecurityMode_t wpaType; + AkmSuite_t akmList[AKM_SUITE_MAX]; + IEEEtypes_RSNCapability_t rsnCap; + t_u8 type = + ((IEEEtypes_InfoElementHdr_t *)prsnwpa_ie)->ElementId; + + if (supplicantIsEnabled((void *)psapriv)) { + + memset(util_fns, &wpaType, 0x00, sizeof(wpaType)); + + if (type == ELEM_ID_RSN || + type == ELEM_ID_VENDOR_SPECIFIC) { + if (type == ELEM_ID_RSN) { + supplicantParseRsnIe(psapriv, + (IEEEtypes_RSNElement_t + *)prsnwpa_ie, + &wpaType, + &mcstCipher, + &ucstCipher, + akmList, + NELEMENTS(akmList), + &rsnCap, NULL); + } else if (type == ELEM_ID_VENDOR_SPECIFIC) { + supplicantParseWpaIe(psapriv, + (IEEEtypes_WPAElement_t + *)prsnwpa_ie, + &wpaType, + &mcstCipher, + &ucstCipher, + akmList, + NELEMENTS + (akmList)); + } + + if (wpaType.wpa2 || wpaType.wpa) { + memset(util_fns, &rsnCap, 0x00, + sizeof(rsnCap)); + + supplicantSetProfile(psapriv, wpaType, + mcstCipher, + ucstCipher); + + supplicantSetAssocRsn(psapriv, + wpaType, + &mcstCipher, + &ucstCipher, + akmList, + &rsnCap, NULL); + + memset(util_fns, + (UINT8 *)psapriv->suppData-> + wpa_rsn_ie, 0x00, MAX_IE_SIZE); + if (keyMgmtFormatWpaRsnIe + (psapriv, + (UINT8 *)&psapriv->suppData-> + wpa_rsn_ie, + &psapriv->suppData->localBssid, + &psapriv->suppData->localStaAddr, + NULL, FALSE)) ; + + return (void *)(psapriv->suppData-> + wpa_rsn_ie); + } + } + + } + + return NULL; + } + + t_u8 supplicantFormatRsnWpaTlv(void *priv, void *rsn_wpa_ie, + void *rsn_ie_tlv) { + phostsa_private psapriv = (phostsa_private)priv; + hostsa_util_fns *util_fns = &psapriv->util_fns; + void *supp_rsn_wpa_ie = NULL; + MrvlIEGeneric_t *prsn_ie = (MrvlIEGeneric_t *)rsn_ie_tlv; + t_u8 total_len = 0; + + if (rsn_wpa_ie) { + supp_rsn_wpa_ie = + processRsnWpaInfo((void *)psapriv, rsn_wpa_ie); + if (!supp_rsn_wpa_ie) + return total_len; + + /* WPA_IE or RSN_IE */ + prsn_ie->IEParam.Type = + (t_u16)(((IEEEtypes_InfoElementHdr_t *) + supp_rsn_wpa_ie)->ElementId); + prsn_ie->IEParam.Type = prsn_ie->IEParam.Type & 0x00FF; + prsn_ie->IEParam.Type = + wlan_cpu_to_le16(prsn_ie->IEParam.Type); + prsn_ie->IEParam.Length = + (t_u16)(((IEEEtypes_InfoElementHdr_t *) + supp_rsn_wpa_ie)->Len); + prsn_ie->IEParam.Length = + prsn_ie->IEParam.Length & 0x00FF; + if (prsn_ie->IEParam.Length <= MAX_IE_SIZE) { + memcpy(util_fns, + rsn_ie_tlv + sizeof(prsn_ie->IEParam), + (t_u8 *)supp_rsn_wpa_ie + + sizeof(IEEEtypes_InfoElementHdr_t), + prsn_ie->IEParam.Length); + } else + return total_len; + + HEXDUMP("ASSOC_CMD: RSN IE", (t_u8 *)rsn_ie_tlv, + sizeof(prsn_ie->IEParam) + + prsn_ie->IEParam.Length); + total_len += + sizeof(prsn_ie->IEParam) + + prsn_ie->IEParam.Length; + prsn_ie->IEParam.Length = + wlan_cpu_to_le16(prsn_ie->IEParam.Length); + } + return total_len; + } diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtSta.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtSta.h new file mode 100644 index 00000000..706393ee --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtSta.h @@ -0,0 +1,79 @@ +/** @file keyMgmtSta.h + * + * @brief This file contains the defines for key management. + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _KEY_MGMT_STA_H_ +#define _KEY_MGMT_STA_H_ + +#include "keyCommonDef.h" +#include "KeyApiStaDefs.h" +#include "IEEE_types.h" +#include "keyMgmtStaTypes.h" +#include "keyMgmtSta_rom.h" + +#ifdef BTAMP +#include "btamp_config.h" +#define BTAMP_SUPPLICATNT_SESSIONS AMPHCI_MAX_PHYSICAL_LINK_SUPPORTED +#else +#define BTAMP_SUPPLICATNT_SESSIONS 0 +#endif + +//longl test +#define MAX_SUPPLICANT_SESSIONS (10) + +void keyMgmtControlledPortOpen(phostsa_private priv); + +extern BOOLEAN supplicantAkmIsWpaWpa2(phostsa_private priv, AkmSuite_t *pAkm); +extern BOOLEAN supplicantAkmIsWpaWpa2Psk(phostsa_private priv, + AkmSuite_t *pAkm); +extern BOOLEAN supplicantAkmUsesKdf(phostsa_private priv, AkmSuite_t *pAkm); +extern BOOLEAN supplicantGetPmkid(phostsa_private priv, + IEEEtypes_MacAddr_t *pBssid, + IEEEtypes_MacAddr_t *pSta, AkmSuite_t *pAkm, + UINT8 *pPMKID); + +extern void keyMgmtSetIGtk(phostsa_private priv, + keyMgmtInfoSta_t *pKeyMgmtInfoSta, + IGtkKde_t *pIGtkKde, UINT8 iGtkKdeLen); + +extern UINT8 *keyMgmtGetIGtk(phostsa_private priv); + +extern void keyMgmtSta_RomInit(void); + +#if 0 +extern BufferDesc_t *GetTxEAPOLBuffer(struct cm_ConnectionInfo *connPtr, + EAPOL_KeyMsg_Tx_t **ppTxEapol, + BufferDesc_t * pBufDesc); +#endif +extern void allocSupplicantData(void *priv); +extern void freeSupplicantData(void *priv); +extern void supplicantInit(void *priv, supplicantData_t *suppData); +extern BOOLEAN keyMgmtProcessMsgExt(phostsa_private priv, + keyMgmtInfoSta_t *pKeyMgmtInfoSta, + EAPOL_KeyMsg_t *pKeyMsg); + +extern void ProcessKeyMgmtDataSta(phostsa_private priv, mlan_buffer *pmbuf, + IEEEtypes_MacAddr_t *sa, + IEEEtypes_MacAddr_t *da); + +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtStaTypes.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtStaTypes.h new file mode 100644 index 00000000..fa749a78 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtStaTypes.h @@ -0,0 +1,109 @@ +/** @file keyMgmtstaType.h + * + * @brief This file defines data types structrue for key managment. + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _KEYMGMTSTATYPES_H_ +#define _KEYMGMTSTATYPES_H_ + +#define WPA_AES_KEY_LEN 16 +#define WPA_TKIP_KEY_LEN 32 +#define WPA_WEP104_KEY_LEN 13 +#define WPA_WEP40_KEY_LEN 5 + +#define KEY_TYPE_WEP 0 +#define KEY_TYPE_TKIP 1 +#define KEY_TYPE_AES 2 +#define KEY_TYPE_WAPI 3 +#define KEY_TYPE_AES_CMAC 4 + +/* This struct definition is used in ROM and should be kept intact */ +typedef struct { + UINT8 wep40:1; + UINT8 wep104:1; + UINT8 tkip:1; + UINT8 ccmp:1; + + UINT8 rsvd:4; + +} Cipher_t; + +/* This struct definition is used in ROM and should be kept intact */ +typedef MLAN_PACK_START struct { + UINT16 noRsn:1; + UINT16 wepStatic:1; + UINT16 wepDynamic:1; + UINT16 wpa:1; + UINT16 wpaNone:1; + UINT16 wpa2:1; + UINT16 cckm:1; + UINT16 wapi:1; + UINT16 rsvd:8; + +} MLAN_PACK_END SecurityMode_t; + +typedef MLAN_PACK_START enum { + AKM_NONE = 0, + + AKM_1X = 1, + AKM_PSK = 2, + AKM_FT_1X = 3, + AKM_FT_PSK = 4, + AKM_SHA256_1X = 5, + AKM_SHA256_PSK = 6, + AKM_TDLS = 7, + + AKM_CCKM = 99, /* Make CCKM a unique AKM enumeration */ + + AKM_WPA_MAX = 2, /* Only AKM types 1 and 2 are expected for WPA */ + AKM_RSN_MAX = 6, /* AKM types 1 to 6 are valid for RSN */ + + AKM_SUITE_MAX = 5 /* Used to size max parsing of AKMs from a BCN */ +} MLAN_PACK_END AkmType_e; + +typedef AkmType_e AkmTypePacked_e; + +typedef struct { + UINT8 akmOui[3]; + AkmTypePacked_e akmType; + +} AkmSuite_t; + +typedef struct { + SecurityMode_t wpaType; + Cipher_t mcstCipher; + Cipher_t ucstCipher; + +} SecurityParams_t; + +typedef enum { + host_PSK_SUPP_MIC_FAIL_TIMEOUT = 0x0001, + host_PSK_SUPP_FOURWAY_HANDSHAKE_FAIL = 0x0002 +} host_psk_suppMsg_e; + +typedef struct { + UINT8 keyId[2]; + UINT8 IPN[6]; + UINT8 IGtk[32]; +} IGtkKde_t; + +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtSta_rom.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtSta_rom.c new file mode 100644 index 00000000..4380ca48 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtSta_rom.c @@ -0,0 +1,1279 @@ +/** @file keyMgmtsta_rom.c + * + * @brief This file defines key management function for sta + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#include "wltypes.h" +#include "IEEE_types.h" +#include "hostsa_ext_def.h" +#include "authenticator.h" + +#include "keyMgmtSta_rom.h" +#include "pmkCache_rom.h" +#include "crypt_new_rom.h" +#include "rc4_rom.h" +#include "aes_cmac_rom.h" +#include "sha1.h" +#include "md5.h" +#include "mrvl_sha256_crypto.h" +#include "wl_macros.h" + +#define MIC_ERROR_QUIET_TIME_INTERVAL 60000000 /* 60 sec */ +#define MIC_ERROR_CHECK_TIME_INTERVAL 60000000 + +void +supplicantSetAssocRsn_internal(phostsa_private priv, RSNConfig_t *pRsnConfig, + SecurityParams_t *pSecurityParams, + SecurityMode_t wpaType, + Cipher_t *pMcstCipher, + Cipher_t *pUcstCipher, + AkmSuite_t *pAkm, + IEEEtypes_RSNCapability_t *pRsnCap, + Cipher_t *pGrpMgmtCipher) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + memset(util_fns, &pRsnConfig->wpaType, + 0x00, sizeof(pRsnConfig->wpaType)); + memset(util_fns, &pRsnConfig->ucstCipher, + 0x00, sizeof(pRsnConfig->ucstCipher)); + memset(util_fns, &pRsnConfig->mcstCipher, + 0x00, sizeof(pRsnConfig->mcstCipher)); + + pRsnConfig->pmkidValid = 0; + pRsnConfig->rsnCapValid = 0; + pRsnConfig->grpMgmtCipherValid = 0; + pRsnConfig->rsvd = 0; + + if (pSecurityParams->wpaType.wpa2 && wpaType.wpa2) { + /* encryption mode is WPA2 */ + memcpy(util_fns, &pRsnConfig->AKM, (UINT8 *)pAkm, + sizeof(pRsnConfig->AKM)); + + pRsnConfig->wpaType.wpa2 = 1; + + if (pRsnCap) { + pRsnConfig->rsnCapValid = 1; + memcpy(util_fns, &pRsnConfig->rsnCap, pRsnCap, + sizeof(pRsnConfig->rsnCap)); + } + + if (pGrpMgmtCipher) { + pRsnConfig->grpMgmtCipherValid = 1; + memcpy(util_fns, &pRsnConfig->grpMgmtCipher, + pGrpMgmtCipher, + sizeof(pRsnConfig->grpMgmtCipher)); + } + } else if (pSecurityParams->wpaType.wpaNone && wpaType.wpaNone) { + memcpy(util_fns, &pRsnConfig->AKM, + wpa_oui_none, sizeof(pRsnConfig->AKM)); + + /* encryption mode is WPA None */ + pRsnConfig->wpaType.wpaNone = 1; + + if (pSecurityParams->mcstCipher.ccmp && pMcstCipher->ccmp) { + pRsnConfig->mcstCipher.ccmp = 1; + } else { + pRsnConfig->mcstCipher.tkip = 1; + } + } else if (pSecurityParams->wpaType.wpa && wpaType.wpa) { + /* encryption mode is WPA */ + memcpy(util_fns, &pRsnConfig->AKM, (UINT8 *)pAkm, + sizeof(pRsnConfig->AKM)); + + pRsnConfig->wpaType.wpa = 1; + } else if (pSecurityParams->wpaType.noRsn) { + /* No encryption */ + pRsnConfig->wpaType.noRsn = 1; + } + + if (pRsnConfig->wpaType.wpa || pRsnConfig->wpaType.wpa2) { + if (pSecurityParams->ucstCipher.ccmp && pUcstCipher->ccmp) { + pRsnConfig->ucstCipher.ccmp = 1; + } else { + pRsnConfig->ucstCipher.tkip = 1; + } + + if (pSecurityParams->mcstCipher.ccmp && pMcstCipher->ccmp) { + pRsnConfig->mcstCipher.ccmp = 1; + } else if (pSecurityParams->mcstCipher.tkip && + pMcstCipher->tkip) { + pRsnConfig->mcstCipher.tkip = 1; + } else if (pSecurityParams->mcstCipher.wep104 && + pMcstCipher->wep104) { + pRsnConfig->mcstCipher.wep104 = 1; + } else { + pRsnConfig->mcstCipher.wep40 = 1; + } + } + +} + +UINT16 +keyMgmtFormatWpaRsnIe_internal(phostsa_private priv, RSNConfig_t *pRsnConfig, + UINT8 *pos, + IEEEtypes_MacAddr_t *pBssid, + IEEEtypes_MacAddr_t *pStaAddr, + UINT8 *pPmkid, BOOLEAN addPmkid) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + IEEEtypes_WPAElement_t *pWpaIe = (IEEEtypes_WPAElement_t *)pos; + IEEEtypes_RSNElement_t *pRsnIe = (IEEEtypes_RSNElement_t *)pos; + + UINT32 ieSize = 0; +#if 0 // !defined(REMOVE_PATCH_HOOKS) + UINT16 ptr_val; + + if (keyMgmtFormatWpaRsnIe_internal_hook(pRsnConfig, + pos, + pBssid, + pStaAddr, + pPmkid, addPmkid, &ptr_val)) { + return ptr_val; + } +#endif + + if (pRsnConfig->wpaType.wpa2) { + /* encryption mode is WPA2 */ + pRsnIe->ElementId = ELEM_ID_RSN; + pRsnIe->Len = (sizeof(pRsnIe->Ver) + + sizeof(pRsnIe->GrpKeyCipher) + + sizeof(pRsnIe->PwsKeyCnt) + + sizeof(pRsnIe->PwsKeyCipherList) + + sizeof(pRsnIe->AuthKeyCnt) + + sizeof(pRsnIe->AuthKeyList)); + + memcpy(util_fns, (void *)pRsnIe->AuthKeyList, + &pRsnConfig->AKM, sizeof(pRsnIe->AuthKeyList)); + + pRsnIe->Ver = 1; + + pRsnIe->PwsKeyCnt = 1; + pRsnIe->AuthKeyCnt = 1; + + if (pRsnConfig->ucstCipher.ccmp) { + /* unicast cipher is aes */ + memcpy(util_fns, (void *)pRsnIe->PwsKeyCipherList, + wpa2_oui04, sizeof(pRsnIe->PwsKeyCipherList)); + } else { + /* if not AES the TKIP */ + memcpy(util_fns, (void *)pRsnIe->PwsKeyCipherList, + wpa2_oui02, sizeof(pRsnIe->PwsKeyCipherList)); + } + + if (pRsnConfig->mcstCipher.ccmp) { + /* multicast cipher is aes */ + memcpy(util_fns, (void *)pRsnIe->GrpKeyCipher, + wpa2_oui04, sizeof(pRsnIe->GrpKeyCipher)); + } else if (pRsnConfig->mcstCipher.tkip) { + /* multicast cipher is tkip */ + memcpy(util_fns, (void *)pRsnIe->GrpKeyCipher, + wpa2_oui02, sizeof(pRsnIe->GrpKeyCipher)); + } else if (pRsnConfig->mcstCipher.wep104) { + /* multicast cipher is WEP 104 */ + memcpy(util_fns, (void *)pRsnIe->GrpKeyCipher, + wpa2_oui05, sizeof(pRsnIe->GrpKeyCipher)); + } else { + /* multicast cipher is WEP 40 */ + memcpy(util_fns, (void *)pRsnIe->GrpKeyCipher, + wpa2_oui01, sizeof(pRsnIe->GrpKeyCipher)); + } + if (addPmkid && ((!pRsnConfig->pmkidValid && pBssid) || pPmkid)) { + if (pPmkid) { + memcpy(util_fns, pRsnConfig->PMKID, pPmkid, + sizeof(pRsnConfig->PMKID)); + pRsnConfig->pmkidValid = TRUE; + } else { + pRsnConfig->pmkidValid = + supplicantGetPmkid(priv, pBssid, + pStaAddr, + &pRsnConfig->AKM, + pRsnConfig->PMKID); + } + } + + if (pRsnConfig->rsnCapValid + || pRsnConfig->pmkidValid + || pRsnConfig->grpMgmtCipherValid) { + memcpy(util_fns, &pRsnIe->RsnCap, + &pRsnConfig->rsnCap, sizeof(pRsnIe->RsnCap)); + + pRsnIe->Len += sizeof(pRsnIe->RsnCap); + } + + if (pRsnConfig->pmkidValid || pRsnConfig->grpMgmtCipherValid) { + pRsnIe->PMKIDCnt = 0; + pRsnIe->Len += sizeof(pRsnIe->PMKIDCnt); + + if (pRsnConfig->pmkidValid) { + /* Add PMKID to the RSN if not an EAPOL msg */ + pRsnIe->PMKIDCnt = 1; + + memcpy(util_fns, (UINT8 *)pRsnIe->PMKIDList, + pRsnConfig->PMKID, + sizeof(pRsnIe->PMKIDList)); + + pRsnIe->Len += sizeof(pRsnIe->PMKIDList); + } + } + + if (pRsnConfig->grpMgmtCipherValid) { + memcpy(util_fns, pRsnIe->GrpMgmtCipher, + &pRsnConfig->grpMgmtCipher, + sizeof(pRsnIe->GrpMgmtCipher)); + + pRsnIe->Len += sizeof(pRsnIe->GrpMgmtCipher); + } + + ieSize = sizeof(pRsnIe->ElementId) + sizeof(pRsnIe->Len); + ieSize += pRsnIe->Len; + } else if (pRsnConfig->wpaType.wpaNone || pRsnConfig->wpaType.wpa) { + /* encryption mode is WPA */ + pWpaIe->ElementId = ELEM_ID_VENDOR_SPECIFIC; + pWpaIe->Len = (sizeof(IEEEtypes_WPAElement_t) + - sizeof(pWpaIe->ElementId) + - sizeof(pWpaIe->Len)); + + memcpy(util_fns, pWpaIe->OuiType, wpa_oui01, + sizeof(pWpaIe->OuiType)); + + pWpaIe->Ver = 1; + + pWpaIe->PwsKeyCnt = 1; + pWpaIe->AuthKeyCnt = 1; + + memcpy(util_fns, (void *)pWpaIe->AuthKeyList, + &pRsnConfig->AKM, sizeof(pWpaIe->AuthKeyList)); + + if (pRsnConfig->wpaType.wpaNone) { + memcpy(util_fns, (void *)pWpaIe->PwsKeyCipherList, + wpa_oui_none, sizeof(pWpaIe->PwsKeyCipherList)); + + if (pRsnConfig->mcstCipher.tkip) { + /* multicast cipher is tkip */ + memcpy(util_fns, (void *)pWpaIe->GrpKeyCipher, + wpa_oui02, sizeof(pWpaIe->GrpKeyCipher)); + } else if (pRsnConfig->mcstCipher.ccmp) { + /* multicast cipher is aes */ + memcpy(util_fns, (void *)pWpaIe->GrpKeyCipher, + wpa_oui04, sizeof(pWpaIe->GrpKeyCipher)); + } + } else { + if (pRsnConfig->ucstCipher.ccmp) { + /* unicast cipher is aes */ + memcpy(util_fns, + (void *)pWpaIe->PwsKeyCipherList, + wpa_oui04, + sizeof(pWpaIe->PwsKeyCipherList)); + } else { + /* unicast cipher is tkip */ + memcpy(util_fns, + (void *)pWpaIe->PwsKeyCipherList, + wpa_oui02, + sizeof(pWpaIe->PwsKeyCipherList)); + } + + if (pRsnConfig->mcstCipher.ccmp) { + /* multicast cipher is aes */ + memcpy(util_fns, (void *)pWpaIe->GrpKeyCipher, + wpa_oui04, sizeof(pWpaIe->GrpKeyCipher)); + } else if (pRsnConfig->mcstCipher.tkip) { + /* multicast cipher is tkip */ + memcpy(util_fns, (void *)pWpaIe->GrpKeyCipher, + wpa_oui02, sizeof(pWpaIe->GrpKeyCipher)); + } else if (pRsnConfig->mcstCipher.wep104) { + /* multicast cipher is wep 104 */ + memcpy(util_fns, (void *)pWpaIe->GrpKeyCipher, + wpa_oui05, sizeof(pWpaIe->GrpKeyCipher)); + } else { + /* multicast cipher is wep 40 */ + memcpy(util_fns, (void *)pWpaIe->GrpKeyCipher, + wpa_oui01, sizeof(pWpaIe->GrpKeyCipher)); + } + } + + ieSize = sizeof(pWpaIe->ElementId) + sizeof(pWpaIe->Len); + ieSize += pWpaIe->Len; + } + + return ieSize; +} + +void +install_wpa_none_keys_internal(phostsa_private priv, + key_MgtMaterial_t *pKeyMgtData, UINT8 *pPMK, + UINT8 type, UINT8 unicast) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + +#if 0 // !defined(REMOVE_PATCH_HOOKS) + if (install_wpa_none_keys_internal_hook(pKeyMgtData, + pPMK, type, unicast)) { + return; + } +#endif + + memset(util_fns, (void *)pKeyMgtData, 0, sizeof(key_MgtMaterial_t)); + + if (unicast) { + pKeyMgtData->keyInfo = (KEY_INFO_MULTICAST | KEY_INFO_ENABLED); + } else { + pKeyMgtData->keyInfo = (KEY_INFO_UNICAST | KEY_INFO_ENABLED); + } + + if (type) { + memcpy(util_fns, (UINT8 *)pKeyMgtData->keyEncypt.AES.key, pPMK, + 16); + pKeyMgtData->keyType = KEY_TYPE_AES; + pKeyMgtData->keyLen = WPA_AES_KEY_LEN; + } else { + memcpy(util_fns, (UINT8 *)pKeyMgtData->keyEncypt.TKIP.key, pPMK, + 16); + pPMK += 16; + pKeyMgtData->keyType = KEY_TYPE_TKIP; + + /* in WPA none the TX & RX MIC key is the same */ + memcpy(util_fns, (UINT8 *)pKeyMgtData->keyEncypt.TKIP.txMicKey, + pPMK, 8); + memcpy(util_fns, (UINT8 *)pKeyMgtData->keyEncypt.TKIP.rxMicKey, + pPMK, 8); + + pKeyMgtData->keyLen = WPA_TKIP_KEY_LEN; + } + +} + +UINT16 +keyMgmtGetKeySize_internal(RSNConfig_t *pRsnConfig, UINT8 isPairwise) +{ + /* default to TKIP key size */ + UINT16 retval = 32; + +#if 0 // !defined(REMOVE_PATCH_HOOKS) + if (keyMgmtGetKeySize_internal_hook(pRsnConfig, isPairwise, &retval)) { + return retval; + } +#endif + + if (isPairwise) { + if (pRsnConfig->ucstCipher.ccmp) { + retval = 16; + } + } else { + if (pRsnConfig->mcstCipher.ccmp) { + retval = 16; + } else if (pRsnConfig->mcstCipher.wep104) { + retval = 13; + } else if (pRsnConfig->mcstCipher.wep40) { + retval = 5; + } + } + return retval; +} + +//#if defined(PSK_SUPPLICANT) || defined (WPA_NONE) +void +supplicantGenerateSha1Pmkid(phostsa_private priv, UINT8 *pPMK, + IEEEtypes_MacAddr_t *pBssid, + IEEEtypes_MacAddr_t *pSta, UINT8 *pPMKID) +{ + char pmkidString[] = "PMK Name"; + void *pText[3]; + + int len[3] = { 8, 6, 6 }; + + pText[0] = pmkidString; + pText[1] = pBssid; + pText[2] = pSta; + + Mrvl_hmac_sha1((void *)priv, (UINT8 **)pText, len, 3, pPMK, 32, /* PMK + size + is + always + 32 + bytes + */ + pPMKID, 16); +} + +int +isApReplayCounterFresh(phostsa_private priv, keyMgmtInfoSta_t *pKeyMgmtInfoSta, + UINT8 *pRxReplayCount) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + UINT32 tmpHi; + UINT32 tmpLo; + UINT32 rxCountHi; + UINT32 rxCountLo; + + /* initialize the value as stale */ + int retVal = 0; + + memcpy(util_fns, &tmpHi, pRxReplayCount, 4); + memcpy(util_fns, &tmpLo, pRxReplayCount + 4, 4); + + rxCountHi = ntohl(tmpHi); + rxCountLo = ntohl(tmpLo); + + /* check hi dword first */ + if (rxCountHi > pKeyMgmtInfoSta->apCounterHi) { + retVal = 1; + } else if (rxCountHi == pKeyMgmtInfoSta->apCounterHi) { + /* hi dword is equal, check lo dword */ + if (rxCountLo > pKeyMgmtInfoSta->apCounterLo) { + retVal = 1; + } else if (rxCountLo == pKeyMgmtInfoSta->apCounterLo) { + + /* Counters are equal. Check special case of zero. */ + if ((rxCountHi == 0) && (rxCountLo == 0)) { + if (!pKeyMgmtInfoSta->apCounterZeroDone) { + retVal = 1; + } + } + } + } + + return retVal; +} + +void +updateApReplayCounter(phostsa_private priv, keyMgmtInfoSta_t *pKeyMgmtStaInfo, + UINT8 *pRxReplayCount) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + UINT32 tmpHi; + UINT32 tmpLo; + UINT32 rxCountHi; + UINT32 rxCountLo; + + memcpy(util_fns, &tmpHi, pRxReplayCount, 4); + memcpy(util_fns, &tmpLo, pRxReplayCount + 4, 4); + + rxCountHi = ntohl(tmpHi); + rxCountLo = ntohl(tmpLo); + + pKeyMgmtStaInfo->apCounterHi = rxCountHi; + pKeyMgmtStaInfo->apCounterLo = rxCountLo; + + if ((rxCountHi == 0) && (rxCountLo == 0)) { + pKeyMgmtStaInfo->apCounterZeroDone = 1; + } +} + +void +FillKeyMaterialStruct_internal(phostsa_private priv, + key_MgtMaterial_t *pKeyMgtData, UINT16 key_len, + UINT8 isPairwise, KeyData_t *pKey) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + UINT8 keyInfo; + +#if 0 // !defined(REMOVE_PATCH_HOOKS) + if (FillKeyMaterialStruct_internal_hook(pKeyMgtData, + key_len, isPairwise, pKey)) { + return; + } +#endif + + /* Update key material */ + memset(util_fns, (void *)pKeyMgtData, 0x00, sizeof(key_MgtMaterial_t)); + + /* check the key type is pairwise */ + if (isPairwise) { + keyInfo = KEY_INFO_UNICAST; + } else { + keyInfo = KEY_INFO_MULTICAST; + } + + if (key_len == (UINT16)WPA_AES_KEY_LEN) { + /* AES */ + pKeyMgtData->keyType = KEY_TYPE_AES; + pKeyMgtData->keyInfo = keyInfo | KEY_INFO_ENABLED; + + memcpy(util_fns, (UINT8 *)pKeyMgtData->keyEncypt.AES.key, + pKey->Key, key_len); + + } else if (key_len == WPA_TKIP_KEY_LEN) { + pKeyMgtData->keyType = KEY_TYPE_TKIP; + pKeyMgtData->keyInfo = keyInfo | KEY_INFO_ENABLED; + + memcpy(util_fns, (UINT8 *)pKeyMgtData->keyEncypt.TKIP.key, + pKey->Key, TK_SIZE); + memcpy(util_fns, (UINT8 *)pKeyMgtData->keyEncypt.TKIP.txMicKey, + pKey->TxMICKey, 8); + memcpy(util_fns, (UINT8 *)pKeyMgtData->keyEncypt.TKIP.rxMicKey, + pKey->RxMICKey, 8); + } else if (key_len == WPA_WEP104_KEY_LEN || + key_len == WPA_WEP40_KEY_LEN) { + pKeyMgtData->keyType = KEY_TYPE_WEP; + pKeyMgtData->keyInfo = keyInfo | KEY_INFO_ENABLED; + + if (isPairwise) { + pKeyMgtData->keyEncypt.WEP.keyIndex = 0; + pKeyMgtData->keyEncypt.WEP.isDefaultTx = 1; + } else { + /* use the Key index provided */ + pKeyMgtData->keyEncypt.WEP.keyIndex = pKey->KeyIndex; + pKeyMgtData->keyEncypt.WEP.isDefaultTx = 0; + } + memcpy(util_fns, (UINT8 *)(pKeyMgtData->keyEncypt.WEP.key), + pKey->Key, key_len); + } else { + /* Key length does not match ** don't send down anything */ + return; + } + + pKeyMgtData->keyLen = key_len; +} + +//#endif + +/* +** This function checks if the given element pointer parameter +** is a KDE or not (returns NULL) +*/ +KDE_t * +parseKeyKDE(phostsa_private priv, IEEEtypes_InfoElementHdr_t *pIe) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + KDE_t *pKde = NULL; + + if (pIe->ElementId == ELEM_ID_VENDOR_SPECIFIC) { + pKde = (KDE_t *)pIe; + + if (pKde->length > sizeof(KDE_t) && + !memcmp(util_fns, (void *)pKde->OUI, kde_oui, + sizeof(kde_oui))) { + return pKde; + } + } + + return NULL; + +} + +/* This function searches KDE_DATA_TYPE_XXX in KDE. We can collect all such +** KDE_DATA_TYPE_XXX in one pass, however, there seems not much benefit +** as in general there would not be many KDE_DATA_TYPE_XXX present. +** Returns NULL, when KDE_DATA_TYPE_XXX not found. +*/ + +KDE_t * +parseKeyKDE_DataType(phostsa_private priv, UINT8 *pData, + SINT32 dataLen, IEEEtypes_KDEDataType_e KDEDataType) +{ + + IEEEtypes_InfoElementHdr_t *pIe; + KDE_t *pKde; +#if 0 // !defined(REMOVE_PATCH_HOOKS) + UINT32 ptr_val; + + if (parseKeyKDE_DataType_hook(pData, dataLen, KDEDataType, &ptr_val)) { + return (KDE_t *)ptr_val; + } +#endif + + if (pData == NULL) { + return NULL; + } + + while (dataLen > (SINT32)sizeof(IEEEtypes_InfoElementHdr_t)) { + pIe = (IEEEtypes_InfoElementHdr_t *)pData; + + if (pIe->ElementId == ELEM_ID_VENDOR_SPECIFIC) { + pKde = parseKeyKDE(priv, pIe); + + if ((pKde != NULL) && (pKde->dataType == KDEDataType)) { + return pKde; + } else if (pIe->Len == 0) { + /* the rest is padding, so adjust the length ** + to stop the processing loop */ + dataLen = sizeof(IEEEtypes_InfoElementHdr_t); + } + } + + dataLen -= (pIe->Len + sizeof(IEEEtypes_InfoElementHdr_t)); + pData += (pIe->Len + sizeof(IEEEtypes_InfoElementHdr_t)); + } + + return NULL; +} + +KDE_t * +parseKeyDataGTK(phostsa_private priv, UINT8 *pKey, UINT16 len, + KeyData_t *pGRKey) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + GTK_KDE_t *pGtk; + KDE_t *pKde; +#if 0 // !defined(REMOVE_PATCH_HOOKS) + UINT32 ptr_val; + + if (parseKeyDataGTK_hook(pKey, len, pGRKey, &ptr_val)) { + return (KDE_t *)ptr_val; + } +#endif + + /* parse KDE GTK */ + pKde = parseKeyKDE_DataType(priv, pKey, len, KDE_DATA_TYPE_GTK); + + if (pKde) { + /* GTK KDE */ + pGtk = (GTK_KDE_t *)pKde->data; + + /* The KDE overhead is 6 bytes */ + memcpy(util_fns, pGRKey->Key, (void *)pGtk->GTK, + pKde->length - 6); + + /* save the group key index */ + pGRKey->KeyIndex = pGtk->KeyID; + } + + return pKde; +} + +void +KeyMgmtSta_ApplyKEK(phostsa_private priv, EAPOL_KeyMsg_t *pKeyMsg, + KeyData_t *pGRKey, UINT8 *EAPOL_Encr_Key) +{ +#if 0 +#if !defined(REMOVE_PATCH_HOOKS) + if (KeyMgmtSta_ApplyKEK_hook(pKeyMsg, pGRKey, EAPOL_Encr_Key)) { + return; + } +#endif +#endif + pGRKey->TxIV16 = pKeyMsg->key_RSC[1] << 8; + pGRKey->TxIV16 |= pKeyMsg->key_RSC[0]; + pGRKey->TxIV32 = 0xFFFFFFFF; + + pKeyMsg->key_material_len = ntohs(pKeyMsg->key_material_len) & 0xFFFF; + + switch (pKeyMsg->key_info.KeyDescriptorVersion) { + /* + ** Key Descriptor Version 2 or 3: AES key wrap, defined in IETF + ** RFC 3394, shall be used to encrypt the Key Data field using + ** the KEK field from the derived PTK. + */ + case 3: + case 2: + /* CCMP */ + MRVL_AesUnWrap(EAPOL_Encr_Key, + 2, + pKeyMsg->key_material_len / 8 - 1, + (UINT8 *)pKeyMsg->key_data, + NULL, (UINT8 *)pKeyMsg->key_data); + + /* AES key wrap has 8 extra bytes that come out ** due to the + default IV */ + pKeyMsg->key_material_len -= 8; + break; + + /* + ** Key Descriptor Version 1: ARC4 is used to encrypt the Key Data + ** field using the KEK field from the derived PTK + */ + default: + case 1: + /* TKIP or WEP */ + /* Skip the first 256 bytes of the RC4 Stream */ + RC4_Encrypt((void *)priv, EAPOL_Encr_Key, + (UINT8 *)pKeyMsg->EAPOL_key_IV, + sizeof(pKeyMsg->EAPOL_key_IV), + (UINT8 *)pKeyMsg->key_data, + pKeyMsg->key_material_len, 256); + break; + } + +} + +/* +** Verifies the received EAPOL frame during 4-way handshake or +** group key handshake +*/ +BOOLEAN +KeyMgmtSta_IsRxEAPOLValid(phostsa_private priv, + keyMgmtInfoSta_t *pKeyMgmtInfoSta, + EAPOL_KeyMsg_t *pKeyMsg) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + +#if 0 // !defined(REMOVE_PATCH_HOOKS) + BOOLEAN ptr_val; + + if (KeyMgmtSta_IsRxEAPOLValid_hook(pKeyMgmtInfoSta, pKeyMsg, &ptr_val)) { + return ptr_val; + } +#endif + + if (!pKeyMgmtInfoSta || !pKeyMsg) { + PRINTM(MERROR, "KeyMgmtSta_IsRxEAPOLValid input not valid\n"); + return FALSE; + } + + if (!isApReplayCounterFresh + (priv, pKeyMgmtInfoSta, (UINT8 *)pKeyMsg->replay_cnt)) { + PRINTM(MERROR, + "KeyMgmtSta_IsRxEAPOLValid isApReplayCounterFresh Fail\n"); + return FALSE; + } + + /* Check if we have to verify MIC */ + + if (pKeyMsg->key_info.KeyMIC) { + /* We have to verify MIC, if keyType is 1 it's the 3rd message + in 4-way handshake, in that case verify ANonce. */ + + if ((pKeyMsg->key_info.KeyType == 1) && + memcmp(util_fns, (UINT8 *)&pKeyMsg->key_nonce, + (UINT8 *)pKeyMgmtInfoSta->ANonce, NONCE_SIZE) != 0) { + /* Dropping the packet, return some error msg. */ + PRINTM(MERROR, + "KeyMgmtSta_IsRxEAPOLValid Nonce check Fail\n"); + return FALSE; + } + + if (!IsEAPOL_MICValid + (priv, pKeyMsg, pKeyMgmtInfoSta->EAPOL_MIC_Key)) { + /* MIC failed */ + PRINTM(MERROR, + "KeyMgmtSta_IsRxEAPOLValid MIC check Fail\n"); + return FALSE; + } + + } + return TRUE; + +} + +/* +** This function populates EAPOL frame fileds that are common +** to message 2, 4 of 4-way handshake and group key hadshake +** message 2. +** Any of these fields in general should not change, and if needed +** can be overwritten in the caller function. +*/ +void +KeyMgmtSta_PrepareEAPOLFrame(phostsa_private priv, EAPOL_KeyMsg_Tx_t *pTxEapol, + EAPOL_KeyMsg_t *pRxEapol, + t_u8 *da, t_u8 *sa, UINT8 *pSNonce) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + + if (!pTxEapol || !pRxEapol) { + return; + } + memset(util_fns, (UINT8 *)pTxEapol, 0x00, sizeof(EAPOL_KeyMsg_Tx_t)); + + formEAPOLEthHdr(priv, pTxEapol, da, sa); + + pTxEapol->keyMsg.desc_type = pRxEapol->desc_type; + pTxEapol->keyMsg.key_info.KeyType = pRxEapol->key_info.KeyType; + pTxEapol->keyMsg.key_info.KeyMIC = 1; + pTxEapol->keyMsg.key_info.Secure = pRxEapol->key_info.Secure; + pTxEapol->keyMsg.replay_cnt[0] = pRxEapol->replay_cnt[0]; + pTxEapol->keyMsg.replay_cnt[1] = pRxEapol->replay_cnt[1]; + + pTxEapol->keyMsg.key_info.KeyDescriptorVersion + = pRxEapol->key_info.KeyDescriptorVersion; + + // Only for 4-w handshake message 2. + if (pSNonce) { + memcpy(util_fns, (UINT8 *)pTxEapol->keyMsg.key_nonce, pSNonce, + NONCE_SIZE); + } +} + +void +KeyMgmtSta_PrepareEAPOLMicErrFrame(phostsa_private priv, + EAPOL_KeyMsg_Tx_t *pTxEapol, + BOOLEAN isUnicast, IEEEtypes_MacAddr_t *da, + IEEEtypes_MacAddr_t *sa, + keyMgmtInfoSta_t *pKeyMgmtInfoSta) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + + if (!pTxEapol || !pKeyMgmtInfoSta) { + return; + } + + memset(util_fns, (UINT8 *)pTxEapol, 0x00, sizeof(EAPOL_KeyMsg_Tx_t)); + + formEAPOLEthHdr(priv, pTxEapol, (t_u8 *)da, (t_u8 *)sa); + + pTxEapol->keyMsg.key_info.KeyType = isUnicast; + pTxEapol->keyMsg.key_info.KeyMIC = 1; + pTxEapol->keyMsg.key_info.Secure = 1; + pTxEapol->keyMsg.key_info.Error = 1; + pTxEapol->keyMsg.key_info.Request = 1; + pTxEapol->keyMsg.replay_cnt[0] = htonl(pKeyMgmtInfoSta->staCounterHi); + pTxEapol->keyMsg.replay_cnt[1] = htonl(pKeyMgmtInfoSta->staCounterLo); + +} + +BOOLEAN +supplicantAkmIsWpaWpa2(phostsa_private priv, AkmSuite_t *pAkm) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + + if (!memcmp(util_fns, pAkm->akmOui, wpa_oui, sizeof(wpa_oui)) || + !memcmp(util_fns, pAkm->akmOui, kde_oui, sizeof(kde_oui))) { + return TRUE; + } + + return FALSE; +} + +BOOLEAN +supplicantAkmIsWpa2(phostsa_private priv, AkmSuite_t *pAkm) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + + if (memcmp(util_fns, pAkm->akmOui, kde_oui, sizeof(kde_oui)) == 0) { + return TRUE; + } + + return FALSE; +} + +BOOLEAN +supplicantAkmIsWpaWpa2Psk(phostsa_private priv, AkmSuite_t *pAkm) +{ + if (supplicantAkmIsWpaWpa2(priv, pAkm)) { + return ((pAkm->akmType == AKM_PSK) || + (pAkm->akmType == AKM_SHA256_PSK) || + (pAkm->akmType == AKM_FT_PSK)); + } + + return FALSE; +} + +BOOLEAN +supplicantAkmUsesKdf(phostsa_private priv, AkmSuite_t *pAkm) +{ + if (supplicantAkmIsWpa2(priv, pAkm)) { + if ((pAkm->akmType == AKM_SHA256_PSK) || + (pAkm->akmType == AKM_SHA256_1X) || + (pAkm->akmType == AKM_FT_PSK) || + (pAkm->akmType == AKM_FT_1X)) { + return TRUE; + } + } + + return FALSE; +} + +BOOLEAN +supplicantAkmWpa2Ft(phostsa_private priv, AkmSuite_t *pAkm) +{ + if (supplicantAkmIsWpa2(priv, pAkm)) { + if ((pAkm->akmType == AKM_FT_PSK) || + (pAkm->akmType == AKM_FT_1X)) { + return TRUE; + } + } + + return FALSE; +} + +BOOLEAN +supplicantAkmUsesSha256Pmkid(phostsa_private priv, AkmSuite_t *pAkm) +{ + if (supplicantAkmIsWpa2(priv, pAkm)) { + if ((pAkm->akmType == AKM_SHA256_PSK) || + (pAkm->akmType == AKM_SHA256_1X)) { + return TRUE; + } + } + + return FALSE; +} + +void +supplicantGenerateSha256Pmkid(phostsa_private priv, UINT8 *pPMK, + IEEEtypes_MacAddr_t *pBssid, + IEEEtypes_MacAddr_t *pSta, UINT8 *pPMKID) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + UINT8 *pOutput; + UINT8 *vectors[3]; + size_t vectLen[NELEMENTS(vectors)]; + UINT8 buf[500] = { 0 }; + + pOutput = (UINT8 *)buf; + + /* + ** PMKID = Truncate-128(SHA-256("PMK Name" || AA || SPA) + */ + vectors[0] = (UINT8 *)"PMK Name"; + vectLen[0] = 8; /* strlen("PMK Name") */ + + vectors[1] = (UINT8 *)pBssid; + vectLen[1] = sizeof(IEEEtypes_MacAddr_t); + + vectors[2] = (UINT8 *)pSta; + vectLen[2] = sizeof(IEEEtypes_MacAddr_t); + + mrvl_sha256_crypto_vector((void *)priv, NELEMENTS(vectors), vectors, + vectLen, pOutput); + + memcpy(util_fns, pPMKID, pOutput, PMKID_LEN); + +} + +BOOLEAN +supplicantGetPmkid(phostsa_private priv, IEEEtypes_MacAddr_t *pBssid, + IEEEtypes_MacAddr_t *pStaAddr, + AkmSuite_t *pAkm, UINT8 *pPMKID) +{ + BOOLEAN retval; + UINT8 *pPMK; + + retval = FALSE; + + if (!supplicantAkmIsWpaWpa2Psk(priv, pAkm)) { + pPMK = pmkCacheFindPMK((void *)priv, pBssid); + + /* found the PMK so generate the PMKID */ + if (pPMK) { + if (supplicantAkmUsesSha256Pmkid(priv, pAkm)) { + supplicantGenerateSha256Pmkid(priv, pPMK, + pBssid, pStaAddr, + pPMKID); + } else { + supplicantGenerateSha1Pmkid(priv, pPMK, pBssid, + pStaAddr, pPMKID); + } + + retval = TRUE; + } + } + + return retval; +} + +EAPOL_KeyMsg_t * +GetKeyMsgNonceFromEAPOL(phostsa_private priv, mlan_buffer *pmbuf, + keyMgmtInfoSta_t *pKeyMgmtInfoSta) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + EAPOL_KeyMsg_t *pKeyMsg = + (EAPOL_KeyMsg_t *)(pmbuf->pbuf + pmbuf->data_offset + + sizeof(ether_hdr_t));; + + if (!KeyMgmtSta_IsRxEAPOLValid(priv, pKeyMgmtInfoSta, pKeyMsg)) { + PRINTM(MERROR, "KeyMgmtSta_IsRxEAPOLValid Fail\n"); + return NULL; + } + /* Generate Nonce if this is first PWK Message */ + if (pKeyMsg->key_info.KeyMIC == 0) { + memcpy(util_fns, pKeyMgmtInfoSta->ANonce, + pKeyMsg->key_nonce, NONCE_SIZE); + + supplicantGenerateRand(priv, pKeyMgmtInfoSta->SNonce, + NONCE_SIZE); + } + return pKeyMsg; +} + +#ifndef WAR_ROM_BUG50312_SIMUL_INFRA_WFD +EAPOL_KeyMsg_t * +ProcessRxEAPOL_PwkMsg3(phostsa_private priv, mlan_buffer *pmbuf, + keyMgmtInfoSta_t *pKeyMgmtInfoSta) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + + EAPOL_KeyMsg_t *pKeyMsg; + + pKeyMsg = GetKeyMsgNonceFromEAPOL(priv, pmbuf, pKeyMgmtInfoSta); + if (!pKeyMsg) { + PRINTM(MERROR, "ProcessRxEAPOL_PwkMsg3 pKeyMsg is NULL\n"); + return NULL; + } + pKeyMgmtInfoSta->newPWKey.TxIV16 = 1; + pKeyMgmtInfoSta->newPWKey.TxIV32 = 0; + + /* look for group key once the pairwise has been plumbed */ + if (pKeyMsg->key_info.EncryptedKeyData) { + /* I think the timer stop should be moved later on in case + ramHook_Process_CCX_MFP_11r returns FALSE */ + +// microTimerStop(pKeyMgmtInfoSta->rsnTimer); + util_fns->moal_stop_timer(util_fns->pmoal_handle, + pKeyMgmtInfoSta->rsnTimer); + // pKeyMgmtInfoSta->rsnTimer = 0; + + KeyMgmtSta_ApplyKEK(priv, pKeyMsg, + &pKeyMgmtInfoSta->GRKey, + pKeyMgmtInfoSta->EAPOL_Encr_Key); +#if 0 + if (ramHook_keyMgmtProcessMsgExt(pKeyMgmtInfoSta, pKeyMsg) == + FALSE) { + return NULL; + } +#endif + parseKeyDataGTK(priv, pKeyMsg->key_data, + pKeyMsg->key_material_len, + &pKeyMgmtInfoSta->GRKey); + + } + return pKeyMsg; +} +#endif + +#ifndef WAR_ROM_BUG50312_SIMUL_INFRA_WFD +EAPOL_KeyMsg_t * +ProcessRxEAPOL_GrpMsg1(phostsa_private priv, mlan_buffer *pmbuf, + keyMgmtInfoSta_t *pKeyMgmtInfoSta) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + EAPOL_KeyMsg_t *pKeyMsg; + pKeyMsg = GetKeyMsgNonceFromEAPOL(priv, pmbuf, pKeyMgmtInfoSta); + if (!pKeyMsg) { + return NULL; + } + + KeyMgmtSta_ApplyKEK(priv, pKeyMsg, + &pKeyMgmtInfoSta->GRKey, + pKeyMgmtInfoSta->EAPOL_Encr_Key); + + pKeyMgmtInfoSta->RSNDataTrafficEnabled = 1; +// microTimerStop(pKeyMgmtInfoSta->rsnTimer); + util_fns->moal_stop_timer(util_fns->pmoal_handle, + pKeyMgmtInfoSta->rsnTimer); + // pKeyMgmtInfoSta->rsnTimer = 0; + + /* Decrypt the group key */ + if (pKeyMsg->desc_type == 2) { + /* WPA2 */ + /* handle it according to 802.11i GTK frame format */ + parseKeyDataGTK(priv, pKeyMsg->key_data, + pKeyMsg->key_material_len, + &pKeyMgmtInfoSta->GRKey); +#if 0 + if (ramHook_keyMgmtProcessMsgExt(pKeyMgmtInfoSta, pKeyMsg) == + FALSE) { + return NULL; + } +#endif + } else { + /* WPA or Dynamic WEP */ + memcpy(util_fns, pKeyMgmtInfoSta->GRKey.Key, + pKeyMsg->key_data, pKeyMsg->key_material_len); + + pKeyMgmtInfoSta->GRKey.KeyIndex = pKeyMsg->key_info.KeyIndex; + } + + return pKeyMsg; +} +#endif + +void +KeyMgmtResetCounter(keyMgmtInfoSta_t *pKeyMgmtInfo) +{ + if (pKeyMgmtInfo) { + pKeyMgmtInfo->staCounterHi = 0; + pKeyMgmtInfo->staCounterLo = 0; + } +} + +/* +** This code executes when the MIC failure timer timesout +*/ +void +MicErrTimerExp_Sta(t_void *context) +{ + phostsa_private psapriv = (phostsa_private)context; + keyMgmtInfoSta_t *pKeyMgmtInfo = &psapriv->suppData->keyMgmtInfoSta; + + if (pKeyMgmtInfo) { + // if (pKeyMgmtInfo->micTimer == timerId) + { + if (pKeyMgmtInfo->sta_MIC_Error.status + == SECOND_MIC_FAIL_IN_60_SEC) { + // ramHook_keyMgmtSendTkipQuietOver(data); + } + + pKeyMgmtInfo->sta_MIC_Error.status = NO_MIC_FAILURE; + pKeyMgmtInfo->sta_MIC_Error.disableStaAsso = 0; + } + + pKeyMgmtInfo->micTimer = 0; + } +} + +void +DeauthDelayTimerExp_Sta(t_void *context) +{ + phostsa_private psapriv = (phostsa_private)context; + keyMgmtInfoSta_t *pKeyMgmtInfoSta = &psapriv->suppData->keyMgmtInfoSta; + + if (pKeyMgmtInfoSta) { + // if (pKeyMgmtInfoSta->deauthDelayTimer == timerId) + { + if (pKeyMgmtInfoSta->sta_MIC_Error.status + == SECOND_MIC_FAIL_IN_60_SEC) { + // ramHook_keyMgmtSendDeauth(psapriv, + // IEEEtypes_REASON_MIC_FAILURE); + keyMgmtSendDeauth2Peer(psapriv, + IEEEtypes_REASON_MIC_FAILURE); + } + } + + pKeyMgmtInfoSta->deauthDelayTimer = 0; + } +} + +/* +** Key Management timeout handler +*/ +void +keyMgmtStaRsnSecuredTimeoutHandler(t_void *context) +{ + phostsa_private psapriv = (phostsa_private)context; + keyMgmtInfoSta_t *pKeyMgmtInfoSta = &psapriv->suppData->keyMgmtInfoSta; + + if (pKeyMgmtInfoSta) { + // if (pKeyMgmtInfoSta->rsnTimer == timerId) + { + if (pKeyMgmtInfoSta->RSNSecured == FALSE) { + /* Clear timer before calling the timeout so + the rsnTimer ** can't be cancelled during + the sme state clearing. ** (caused timer + re-entrancy failure). */ + // pKeyMgmtInfoSta->rsnTimer = 0; + // ramHook_keyMgmtSendDeauth( + // psapriv, + // IEEEtypes_REASON_4WAY_HANDSHK_TIMEOUT); + keyMgmtSendDeauth2Peer(psapriv, + IEEEtypes_REASON_4WAY_HANDSHK_TIMEOUT); + } + } + // pKeyMgmtInfoSta->rsnTimer = 0; + } +} + +void +keyMgmtSta_StartSession_internal(phostsa_private priv, + keyMgmtInfoSta_t *pKeyMgmtInfoSta, + // MicroTimerCallback_t callback, + UINT32 expiry, UINT8 flags) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + + if (!pKeyMgmtInfoSta->sta_MIC_Error.disableStaAsso) { + // microTimerStop(pKeyMgmtInfoSta->rsnTimer); + util_fns->moal_stop_timer(util_fns->pmoal_handle, + pKeyMgmtInfoSta->rsnTimer); + // pKeyMgmtInfoSta->rsnTimer = 0; + // microTimerStart(callback, + // (UINT32)pKeyMgmtInfoSta, + // expiry, + // &pKeyMgmtInfoSta->rsnTimer, + // flags); + util_fns->moal_start_timer(util_fns->pmoal_handle, + pKeyMgmtInfoSta->rsnTimer, MFALSE, + expiry); + } + + /* reset the authenticator replay counter */ + pKeyMgmtInfoSta->apCounterLo = 0; + pKeyMgmtInfoSta->apCounterHi = 0; + pKeyMgmtInfoSta->apCounterZeroDone = 0; +} + +void +KeyMgmtSta_handleMICDeauthTimer(keyMgmtInfoSta_t *pKeyMgmtInfoSta, + MicroTimerCallback_t callback, + UINT32 expiry, UINT8 flags) +{ +#if 0 + microTimerStop(pKeyMgmtInfoSta->deauthDelayTimer); + + microTimerStart(callback, + (UINT32)pKeyMgmtInfoSta, + expiry, &pKeyMgmtInfoSta->deauthDelayTimer, flags); +#endif +} + +#ifndef WAR_ROM_BUG57216_QUIET_TIME_INTERVAL +/* This function assumes that argument state would be either + NO_MIC_FAILURE or FIRST_MIC_FAIL_IN_60_SEC + It must not be called with state othe than these two +*/ +void +KeyMgmtSta_handleMICErr(MIC_Fail_State_e state, + keyMgmtInfoSta_t *pKeyMgmtInfoSta, + MicroTimerCallback_t callback, UINT8 flags) +{ + UINT32 expiry; +// UINT32 int_save = tx_interrupt_control(TX_INT_DISABLE); + + if (state == NO_MIC_FAILURE) { + /* First MIC failure */ + pKeyMgmtInfoSta->sta_MIC_Error.status = + FIRST_MIC_FAIL_IN_60_SEC; + expiry = MIC_ERROR_CHECK_TIME_INTERVAL; + } else { + /* Received 2 MIC failures within 60 sec. Do deauth from AP */ + pKeyMgmtInfoSta->sta_MIC_Error.disableStaAsso = 1; + pKeyMgmtInfoSta->sta_MIC_Error.status = + SECOND_MIC_FAIL_IN_60_SEC; + pKeyMgmtInfoSta->apCounterHi = 0; + pKeyMgmtInfoSta->apCounterLo = 0; + expiry = MIC_ERROR_QUIET_TIME_INTERVAL; + } +// tx_interrupt_control(int_save); +#if 0 + microTimerStop(pKeyMgmtInfoSta->micTimer); + + microTimerStart(callback, + (UINT32)pKeyMgmtInfoSta, + expiry, &pKeyMgmtInfoSta->micTimer, flags); +#endif +} +#endif + +/* +** Initialize the Key Mgmt session +*/ +void +KeyMgmtSta_InitSession(phostsa_private priv, keyMgmtInfoSta_t *pKeyMgmtInfoSta) +{ + hostsa_util_fns *util_fns = &priv->util_fns; + + pKeyMgmtInfoSta->RSNDataTrafficEnabled = FALSE; + pKeyMgmtInfoSta->RSNSecured = FALSE; + pKeyMgmtInfoSta->pRxDecryptKey = NULL; + pKeyMgmtInfoSta->pwkHandshakeComplete = FALSE; + + if (!pKeyMgmtInfoSta->sta_MIC_Error.disableStaAsso) { +// microTimerStop(pKeyMgmtInfoSta->micTimer); + pKeyMgmtInfoSta->micTimer = 0; +// microTimerStop(pKeyMgmtInfoSta->deauthDelayTimer); + pKeyMgmtInfoSta->deauthDelayTimer = 0; + } +// microTimerStop(pKeyMgmtInfoSta->rsnTimer); + util_fns->moal_stop_timer(util_fns->pmoal_handle, + pKeyMgmtInfoSta->rsnTimer); + + // pKeyMgmtInfoSta->rsnTimer = 0; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtSta_rom.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtSta_rom.h new file mode 100644 index 00000000..1e0c0b40 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/keyMgmtSta_rom.h @@ -0,0 +1,243 @@ +/** @file keyMgntsta_rom.h + * + * @brief This file contains key management function for sta + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ +#ifndef _KEY_MGMT_STA_ROM_H_ +#define _KEY_MGMT_STA_ROM_H_ + +#include "keyCommonDef.h" +#include "KeyApiStaDefs.h" +#include "IEEE_types.h" +#include "keyApiStaTypes.h" +//#include "keyMgmtStaHostTypes.h" +#include "authenticator.h" +#include "keyMgmtApStaCommon.h" + +/* Timer ID passed back to the caller when starting a timer. */ +typedef UINT32 MicroTimerId_t; + +/* Callback function registered when starting a timer */ +typedef void (*MicroTimerCallback_t) (MicroTimerId_t, UINT32); +#define PMKID_LEN 16 + +extern void updateApReplayCounter(phostsa_private priv, + keyMgmtInfoSta_t *pKeyMgmtStaInfo, + UINT8 *pRxReplayCount); + +extern KDE_t *parseKeyKDE(phostsa_private priv, + IEEEtypes_InfoElementHdr_t *pIe); + +extern void supplicantGenerateSha1Pmkid(phostsa_private priv, UINT8 *pPMK, + IEEEtypes_MacAddr_t *pBssid, + IEEEtypes_MacAddr_t *pSta, + UINT8 *pPMKID); + +extern void FillKeyMaterialStruct_internal(phostsa_private priv, + key_MgtMaterial_t *p_keyMgtData, + UINT16 key_len, UINT8 isPairwise, + KeyData_t *pKey); + +extern BOOLEAN (*supplicantSetAssocRsn_internal_hook) (RSNConfig_t *pRsnConfig, + SecurityParams_t + *pSecurityParams, + SecurityMode_t wpaType, + Cipher_t *pMcstCipher, + Cipher_t *pUcstCipher, + AkmSuite_t *pAkm, + IEEEtypes_RSNCapability_t + *pRsnCap, + Cipher_t + *pGrpMgmtCipher); + +extern void supplicantSetAssocRsn_internal(phostsa_private priv, + RSNConfig_t *pRsnConfig, + SecurityParams_t *pSecurityParams, + SecurityMode_t wpaType, + Cipher_t *pMcstCipher, + Cipher_t *pUcstCipher, + AkmSuite_t *pAkm, + IEEEtypes_RSNCapability_t *pRsnCap, + Cipher_t *pGrpMgmtCipher); +#if 0 +extern BOOLEAN (*keyMgmtFormatWpaRsnIe_internal_hook) (RSNConfig_t *pRsnConfig, + UINT8 *pos, + IEEEtypes_MacAddr_t + *pBssid, + IEEEtypes_MacAddr_t + *pStaAddr, UINT8 *pPmkid, + BOOLEAN addPmkid, + UINT16 *ptr_val); +#endif +extern UINT16 keyMgmtFormatWpaRsnIe_internal(phostsa_private priv, + RSNConfig_t *pRsnConfig, + UINT8 *pos, + IEEEtypes_MacAddr_t *pBssid, + IEEEtypes_MacAddr_t *pStaAddr, + UINT8 *pPmkid, BOOLEAN addPmkid); +#if 0 +extern BOOLEAN (*install_wpa_none_keys_internal_hook) (key_MgtMaterial_t + *p_keyMgtData, + UINT8 *pPMK, UINT8 type, + UINT8 unicast); +#endif +extern void install_wpa_none_keys_internal(phostsa_private priv, + key_MgtMaterial_t *p_keyMgtData, + UINT8 *pPMK, UINT8 type, + UINT8 unicast); +#if 0 +extern BOOLEAN (*keyMgmtGetKeySize_internal_hook) (RSNConfig_t *pRsnConfig, + UINT8 isPairwise, + UINT16 *ptr_val); +#endif +extern UINT16 keyMgmtGetKeySize_internal(RSNConfig_t *pRsnConfig, + UINT8 isPairwise); +extern BOOLEAN supplicantAkmIsWpaWpa2(phostsa_private priv, AkmSuite_t *pAkm); +extern BOOLEAN supplicantAkmIsWpaWpa2Psk(phostsa_private priv, + AkmSuite_t *pAkm); +extern BOOLEAN supplicantAkmUsesKdf(phostsa_private priv, AkmSuite_t *pAkm); +#if 0 +extern +BOOLEAN (*parseKeyKDE_DataType_hook) (UINT8 *pData, + SINT32 dataLen, + IEEEtypes_KDEDataType_e KDEDataType, + UINT32 *ptr_val); +#endif +extern KDE_t *parseKeyKDE_DataType(phostsa_private priv, UINT8 *pData, + SINT32 dataLen, + IEEEtypes_KDEDataType_e KDEDataType); +#if 0 +extern BOOLEAN (*parseKeyDataGTK_hook) (UINT8 *pKey, + UINT16 len, + KeyData_t *pGRKey, UINT32 *ptr_val); +#endif +extern KDE_t *parseKeyDataGTK(phostsa_private priv, UINT8 *pKey, UINT16 len, + KeyData_t *pGRKey); + +extern BOOLEAN IsEAPOL_MICValid(phostsa_private priv, EAPOL_KeyMsg_t *pKeyMsg, + UINT8 *pMICKey); +#if 0 +extern BOOLEAN (*KeyMgmtSta_ApplyKEK_hook) (EAPOL_KeyMsg_t *pKeyMsg, + KeyData_t *pGRKey, + UINT8 *EAPOL_Encr_Key); +#endif +extern void KeyMgmtSta_ApplyKEK(phostsa_private priv, EAPOL_KeyMsg_t *pKeyMsg, + KeyData_t *pGRKey, UINT8 *EAPOL_Encr_Key); +#if 0 +extern +BOOLEAN (*KeyMgmtSta_IsRxEAPOLValid_hook) (keyMgmtInfoSta_t *pKeyMgmtInfoSta, + EAPOL_KeyMsg_t *pKeyMsg, + BOOLEAN *ptr_val); +#endif +extern BOOLEAN KeyMgmtSta_IsRxEAPOLValid(phostsa_private priv, + keyMgmtInfoSta_t *pKeyMgmtInfoSta, + EAPOL_KeyMsg_t *pKeyMsg); +extern void KeyMgmtSta_PrepareEAPOLFrame(phostsa_private priv, + EAPOL_KeyMsg_Tx_t *pTxEapol, + EAPOL_KeyMsg_t *pRxEapol, t_u8 *da, + t_u8 *sa, UINT8 *pSNonce); +extern UINT16 KeyMgmtSta_PopulateEAPOLLengthMic(phostsa_private priv, + EAPOL_KeyMsg_Tx_t *pTxEapol, + UINT8 *pEAPOLMICKey, + UINT8 eapolProtocolVersion, + UINT8 forceKeyDescVersion); +extern +void KeyMgmtSta_PrepareEAPOLMicErrFrame(phostsa_private priv, + EAPOL_KeyMsg_Tx_t *pTxEapol, + BOOLEAN isUnicast, + IEEEtypes_MacAddr_t *da, + IEEEtypes_MacAddr_t *sa, + keyMgmtInfoSta_t *pKeyMgmtInfoSta); + +extern BOOLEAN supplicantAkmWpa2Ft(phostsa_private priv, AkmSuite_t *pAkm); + +extern BOOLEAN supplicantAkmUsesSha256Pmkid(phostsa_private priv, + AkmSuite_t *pAkm); + +extern void supplicantGenerateSha256Pmkid(phostsa_private priv, UINT8 *pPMK, + IEEEtypes_MacAddr_t *pBssid, + IEEEtypes_MacAddr_t *pSta, + UINT8 *pPMKID); + +extern BOOLEAN supplicantGetPmkid(phostsa_private priv, + IEEEtypes_MacAddr_t *pBssid, + IEEEtypes_MacAddr_t *pStaAddr, + AkmSuite_t *pAkm, UINT8 *pPMKID); + +extern void KeyMgmt_DerivePTK(phostsa_private priv, UINT8 *pAddr1, + UINT8 *pAddr2, + UINT8 *pNonce1, + UINT8 *pNonce2, + UINT8 *pPTK, UINT8 *pPMK, BOOLEAN use_kdf); + +extern void SetEAPOLKeyDescTypeVersion(EAPOL_KeyMsg_Tx_t *pTxEapol, + BOOLEAN isWPA2, + BOOLEAN isKDF, BOOLEAN nonTKIP); + +extern void KeyMgmtResetCounter(keyMgmtInfoSta_t *pKeyMgmtInfo); + +extern void keyMgmtSta_StartSession_internal(phostsa_private priv, + keyMgmtInfoSta_t *pKeyMgmtInfoSta, + // MicroTimerCallback_t callback, + UINT32 expiry, UINT8 flags); + +extern void KeyMgmtSta_handleMICDeauthTimer(keyMgmtInfoSta_t *pKeyMgmtInfoSta, + MicroTimerCallback_t callback, + UINT32 expiry, UINT8 flags); + +extern void KeyMgmtSta_handleMICErr(MIC_Fail_State_e state, + keyMgmtInfoSta_t *pKeyMgmtInfoSta, + MicroTimerCallback_t callback, UINT8 flags); + +extern void DeauthDelayTimerExp_Sta(t_void *context); +extern void keyMgmtStaRsnSecuredTimeoutHandler(t_void *context); +extern void keyMgmtSendDeauth2Peer(phostsa_private priv, UINT16 reason); +extern void supplicantGenerateRand(hostsa_private *priv, UINT8 *dataOut, + UINT32 length); + +extern EAPOL_KeyMsg_t *GetKeyMsgNonceFromEAPOL(phostsa_private priv, + mlan_buffer *pmbuf, + keyMgmtInfoSta_t + *pKeyMgmtInfoSta); + +extern EAPOL_KeyMsg_t *ProcessRxEAPOL_PwkMsg3(phostsa_private priv, + mlan_buffer *pmbuf, + keyMgmtInfoSta_t + *pKeyMgmtInfoSta); + +extern EAPOL_KeyMsg_t *ProcessRxEAPOL_GrpMsg1(phostsa_private priv, + mlan_buffer *pmbuf, + keyMgmtInfoSta_t + *pKeyMgmtInfoSta); + +extern void KeyMgmtSta_InitSession(phostsa_private priv, + keyMgmtInfoSta_t *pKeyMgmtInfoSta); + +extern void supplicantParseMcstCipher(phostsa_private priv, + Cipher_t *pMcstCipherOut, + UINT8 *pGrpKeyCipher); + +extern void supplicantParseUcstCipher(phostsa_private priv, + Cipher_t *pUcstCipherOut, UINT8 pwsKeyCnt, + UINT8 *pPwsKeyCipherList); + +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/supplicant.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/supplicant.c new file mode 100644 index 00000000..d7605c15 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/esa/supplicant.c @@ -0,0 +1,123 @@ +/** @file supplicant.c + * + * @brief This file defines the API for supplicant + * + * Copyright (C) 2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 03/07/2014: Initial version +******************************************************/ + +#include "wltypes.h" +#include "keyMgmtSta.h" +#include "keyCommonDef.h" +#include "keyMgmtSta.h" +#include "pmkCache.h" + +static __inline void +ProcessEAPoLKeyPkt(phostsa_private priv, mlan_buffer *pmbuf, + IEEEtypes_MacAddr_t *sa, IEEEtypes_MacAddr_t *da) +{ + hostsa_mlan_fns *pm_fns = &priv->mlan_fns; + t_u8 bss_role = pm_fns->Hostsa_get_bss_role(pm_fns->pmlan_private); + + PRINTM(MMSG, "ProcessEAPoLKeyPk bss_type=%x bss_role=%x\n", + pm_fns->bss_type, bss_role); + +#ifdef MIB_STATS + INC_MIB_STAT(connPtr, eapolRxForESUPPCnt); +#endif + + switch (bss_role) { +#ifdef BTAMP + case CONNECTION_TYPE_BTAMP: + ProcessKeyMgmtDataAmp(bufDesc); + break; +#endif + + case MLAN_BSS_ROLE_STA: + /* key data */ + ProcessKeyMgmtDataSta(priv, pmbuf, sa, da); + break; + + default: +#ifdef AUTHENTICATOR + if (WIFI_DIRECT_MODE_GO == connPtr->DeviceMode) { + ProcessKeyMgmtDataAp(bufDesc); + } +#endif + + break; + } +} + +t_u8 +ProcessEAPoLPkt(void *priv, mlan_buffer *pmbuf) +{ + phostsa_private psapriv = (phostsa_private)priv; + ether_hdr_t *pEthHdr = + (ether_hdr_t *)(pmbuf->pbuf + pmbuf->data_offset); + EAP_PacketMsg_t *pEapPkt = NULL; + UINT8 fPacketProcessed = 0; + + pEapPkt = (EAP_PacketMsg_t *)((t_u8 *)pEthHdr + sizeof(ether_hdr_t)); + switch (pEapPkt->hdr_8021x.pckt_type) { + case IEEE_8021X_PACKET_TYPE_EAPOL_KEY: + ProcessEAPoLKeyPkt(psapriv, pmbuf, + (IEEEtypes_MacAddr_t *)pEthHdr->sa, + (IEEEtypes_MacAddr_t *)pEthHdr->da); + fPacketProcessed = 1; + break; + +#if 0 + case IEEE_8021X_PACKET_TYPE_EAP_PACKET: + { + if (WIFI_DIRECT_MODE_CLIENT == connPtr->DeviceMode + || WIFI_DIRECT_MODE_DEVICE == connPtr->DeviceMode) { + if (pEapPkt->code == + IEEE_8021X_CODE_TYPE_REQUEST) { + assocAgent_eapRequestRx(sa); + } + } + } + break; +#endif + default: + break; + } +// CLEAN_FLUSH_CACHED_SQMEM((UINT32)(pEapPkt), bufDesc->DataLen); + return fPacketProcessed; +} + +Status_e +supplicantRestoreDefaults(void *priv) +{ + pmkCacheInit(priv); + return SUCCESS; +} + +/* This can also be removed*/ +//#pragma arm section code = ".init" +void +supplicantFuncInit(void *priv) +{ + supplicantRestoreDefaults(priv); +} + +//#pragma arm section code +//#endif /* PSK_SUPPLICANT */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan.h old mode 100755 new mode 100644 diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11d.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11d.c old mode 100755 new mode 100644 index 33ace138..ae5186f2 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11d.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11d.c @@ -28,6 +28,7 @@ Change log: #include "mlan_util.h" #include "mlan_fw.h" #include "mlan_main.h" +#include "mlan_11h.h" /******************************************************** Local Variables @@ -83,6 +84,45 @@ static chan_freq_power_t channel_freq_power_UN_BG[] = { {14, 2484, TX_PWR_DEFAULT} }; +/** Channels for 802.11a/j */ +static chan_freq_power_t channel_freq_power_UN_AJ[] = { + {8, 5040, TX_PWR_DEFAULT}, + {12, 5060, TX_PWR_DEFAULT}, + {16, 5080, TX_PWR_DEFAULT}, + {34, 5170, TX_PWR_DEFAULT}, + {38, 5190, TX_PWR_DEFAULT}, + {42, 5210, TX_PWR_DEFAULT}, + {46, 5230, TX_PWR_DEFAULT}, + {36, 5180, TX_PWR_DEFAULT}, + {40, 5200, TX_PWR_DEFAULT}, + {44, 5220, TX_PWR_DEFAULT}, + {48, 5240, TX_PWR_DEFAULT}, + {52, 5260, TX_PWR_DEFAULT}, + {56, 5280, TX_PWR_DEFAULT}, + {60, 5300, TX_PWR_DEFAULT}, + {64, 5320, TX_PWR_DEFAULT}, + {100, 5500, TX_PWR_DEFAULT}, + {104, 5520, TX_PWR_DEFAULT}, + {108, 5540, TX_PWR_DEFAULT}, + {112, 5560, TX_PWR_DEFAULT}, + {116, 5580, TX_PWR_DEFAULT}, + {120, 5600, TX_PWR_DEFAULT}, + {124, 5620, TX_PWR_DEFAULT}, + {128, 5640, TX_PWR_DEFAULT}, + {132, 5660, TX_PWR_DEFAULT}, + {136, 5680, TX_PWR_DEFAULT}, + {140, 5700, TX_PWR_DEFAULT}, + {149, 5745, TX_PWR_DEFAULT}, + {153, 5765, TX_PWR_DEFAULT}, + {157, 5785, TX_PWR_DEFAULT}, + {161, 5805, TX_PWR_DEFAULT}, + {165, 5825, TX_PWR_DEFAULT}, +/* {240, 4920, TX_PWR_DEFAULT}, + {244, 4940, TX_PWR_DEFAULT}, + {248, 4960, TX_PWR_DEFAULT}, + {252, 4980, TX_PWR_DEFAULT}, +channels for 11J JP 10M channel gap */ +}; #endif /* STA_SUPPORT */ /******************************************************** @@ -134,16 +174,17 @@ wlan_11d_code_2_region(pmlan_adapter pmadapter, t_u8 code) static t_u8 wlan_11d_channel_known(pmlan_adapter pmadapter, t_u8 band, - t_u8 chan, parsed_region_chan_11d_t * parsed_region_chan) + t_u8 chan, parsed_region_chan_11d_t *parsed_region_chan) { chan_power_11d_t *pchan_pwr = parsed_region_chan->chan_pwr; t_u8 no_of_chan = parsed_region_chan->no_of_chan; t_u8 i = 0; t_u8 ret = MFALSE; + mlan_private *pmpriv; ENTER(); - HEXDUMP("11D: parsed_region_chan", (t_u8 *) pchan_pwr, + HEXDUMP("11D: parsed_region_chan", (t_u8 *)pchan_pwr, sizeof(chan_power_11d_t) * no_of_chan); /* Search channel */ @@ -153,6 +194,21 @@ wlan_11d_channel_known(pmlan_adapter pmadapter, band); ret = MTRUE; + if (band & BAND_A) { + /* If chan is a DFS channel, we need to see an + AP on it */ + pmpriv = wlan_get_priv(pmadapter, + MLAN_BSS_ROLE_STA); + if (pmpriv && + wlan_11h_radar_detect_required(pmpriv, + chan)) { + PRINTM(MINFO, + "11H: DFS channel %d, and ap_seen=%d\n", + chan, pchan_pwr[i].ap_seen); + ret = pchan_pwr[i].ap_seen; + } + } + LEAVE(); return ret; } @@ -175,9 +231,9 @@ wlan_11d_channel_known(pmlan_adapter pmadapter, */ static t_void wlan_11d_generate_parsed_region_chan(pmlan_adapter pmadapter, - region_chan_t * region_chan, - parsed_region_chan_11d_t * - parsed_region_chan) + region_chan_t *region_chan, + parsed_region_chan_11d_t + *parsed_region_chan) { chan_freq_power_t *cfp; t_u8 i; @@ -201,9 +257,9 @@ wlan_11d_generate_parsed_region_chan(pmlan_adapter pmadapter, /* Set channel, band and power */ for (i = 0; i < region_chan->num_cfp; i++, cfp++) { - parsed_region_chan->chan_pwr[i].chan = (t_u8) cfp->channel; + parsed_region_chan->chan_pwr[i].chan = (t_u8)cfp->channel; parsed_region_chan->chan_pwr[i].band = region_chan->band; - parsed_region_chan->chan_pwr[i].pwr = (t_u8) cfp->max_tx_power; + parsed_region_chan->chan_pwr[i].pwr = (t_u8)cfp->max_tx_power; PRINTM(MINFO, "11D: Chan[%d] Band[%d] Pwr[%d]\n", parsed_region_chan->chan_pwr[i].chan, parsed_region_chan->chan_pwr[i].band, @@ -227,7 +283,7 @@ wlan_11d_generate_parsed_region_chan(pmlan_adapter pmadapter, */ static mlan_status wlan_11d_generate_domain_info(pmlan_adapter pmadapter, - parsed_region_chan_11d_t * parsed_region_chan) + parsed_region_chan_11d_t *parsed_region_chan) { t_u8 no_of_sub_band = 0; t_u8 no_of_chan = parsed_region_chan->no_of_chan; @@ -243,11 +299,11 @@ wlan_11d_generate_domain_info(pmlan_adapter pmadapter, /* Set country code */ memcpy(pmadapter, domain_info->country_code, - wlan_11d_code_2_region(pmadapter, (t_u8) pmadapter->region_code), + wlan_11d_code_2_region(pmadapter, (t_u8)pmadapter->region_code), COUNTRY_CODE_LEN); PRINTM(MINFO, "11D: Number of channel = %d\n", no_of_chan); - HEXDUMP("11D: parsed_region_chan", (t_u8 *) parsed_region_chan, + HEXDUMP("11D: parsed_region_chan", (t_u8 *)parsed_region_chan, sizeof(parsed_region_chan_11d_t)); /* Set channel and power */ @@ -291,7 +347,7 @@ wlan_11d_generate_domain_info(pmlan_adapter pmadapter, PRINTM(MINFO, "11D: Number of sub-band =0x%x\n", domain_info->no_of_sub_band); - HEXDUMP("11D: domain_info", (t_u8 *) domain_info, + HEXDUMP("11D: domain_info", (t_u8 *)domain_info, COUNTRY_CODE_LEN + 1 + sizeof(IEEEtypes_SubbandSet_t) * no_of_sub_band); LEAVE(); @@ -308,8 +364,7 @@ wlan_11d_generate_domain_info(pmlan_adapter pmadapter, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_11d_update_chan_pwr_table(mlan_private * pmpriv, - BSSDescriptor_t * pbss_desc) +wlan_11d_update_chan_pwr_table(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc) { mlan_adapter *pmadapter = pmpriv->adapter; parsed_region_chan_11d_t *parsed_region_chan = @@ -352,7 +407,7 @@ wlan_11d_update_chan_pwr_table(mlan_private * pmpriv, table */ parsed_region_chan->chan_pwr[i].chan = chan; parsed_region_chan->chan_pwr[i].band = - (t_u8) pbss_desc->bss_band; + (t_u8)pbss_desc->bss_band; parsed_region_chan->chan_pwr[i].pwr = tx_power; parsed_region_chan->chan_pwr[i].ap_seen = MTRUE; parsed_region_chan->no_of_chan++; @@ -375,7 +430,7 @@ wlan_11d_update_chan_pwr_table(mlan_private * pmpriv, */ static t_u8 wlan_11d_get_chan(pmlan_adapter pmadapter, t_u8 band, t_u8 first_chan, - t_u8 no_of_chan, t_u8 * chan) + t_u8 no_of_chan, t_u8 *chan) { chan_freq_power_t *cfp = MNULL; t_u8 i; @@ -385,6 +440,9 @@ wlan_11d_get_chan(pmlan_adapter pmadapter, t_u8 band, t_u8 first_chan, if (band & (BAND_B | BAND_G | BAND_GN)) { cfp = channel_freq_power_UN_BG; cfp_no = NELEMENTS(channel_freq_power_UN_BG); + } else if (band & (BAND_A | BAND_AN)) { + cfp = channel_freq_power_UN_AJ; + cfp_no = NELEMENTS(channel_freq_power_UN_AJ); } else { PRINTM(MERROR, "11D: Wrong Band[%d]\n", band); LEAVE(); @@ -402,7 +460,7 @@ wlan_11d_get_chan(pmlan_adapter pmadapter, t_u8 band, t_u8 first_chan, /* Check if beyond the boundary */ if (i + no_of_chan < cfp_no) { /* Get first_chan + no_of_chan */ - *chan = (t_u8) (cfp + i + no_of_chan)->channel; + *chan = (t_u8)(cfp + i + no_of_chan)->channel; LEAVE(); return MTRUE; } @@ -421,8 +479,7 @@ wlan_11d_get_chan(pmlan_adapter pmadapter, t_u8 band, t_u8 first_chan, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_11d_process_country_info(mlan_private * pmpriv, - BSSDescriptor_t * pbss_desc) +wlan_11d_process_country_info(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc) { mlan_adapter *pmadapter = pmpriv->adapter; parsed_region_chan_11d_t region_chan; @@ -436,7 +493,7 @@ wlan_11d_process_country_info(mlan_private * pmpriv, /* Parse 11D country info */ if (wlan_11d_parse_domain_info(pmadapter, &pbss_desc->country_info, - (t_u8) pbss_desc->bss_band, + (t_u8)pbss_desc->bss_band, ®ion_chan) != MLAN_STATUS_SUCCESS) { LEAVE(); return MLAN_STATUS_FAILURE; @@ -453,8 +510,9 @@ wlan_11d_process_country_info(mlan_private * pmpriv, (j < parsed_region_chan->no_of_chan && j < MAX_NO_OF_CHAN); j++) { /* - * Channel already exists, update the tx power with new tx - * power, since country IE is valid here. + * Channel already exists, update the tx power + * with new tx power, since country IE is valid + * here. */ if (region_chan.chan_pwr[i].chan == parsed_region_chan->chan_pwr[j].chan && @@ -469,8 +527,9 @@ wlan_11d_process_country_info(mlan_private * pmpriv, if (j == parsed_region_chan->no_of_chan && j < MAX_NO_OF_CHAN) { /* - * Channel does not exist in the channel power table, - * update this new chan and tx_power to the channel power table + * Channel does not exist in the channel power + * table, update this new chan and tx_power + * to the channel power table */ parsed_region_chan-> chan_pwr[parsed_region_chan-> @@ -515,8 +574,7 @@ wlan_11d_process_country_info(mlan_private * pmpriv, * @return N/A */ static t_void -wlan_11d_copy_chan_power(chan_power_11d_t * chan_dst, - chan_power_11d_t * chan_src) +wlan_11d_copy_chan_power(chan_power_11d_t *chan_dst, chan_power_11d_t *chan_src) { ENTER(); @@ -538,7 +596,7 @@ wlan_11d_copy_chan_power(chan_power_11d_t * chan_dst, * @return N/A */ static t_void -wlan_11d_sort_parsed_region_chan(parsed_region_chan_11d_t * parsed_region_chan) +wlan_11d_sort_parsed_region_chan(parsed_region_chan_11d_t *parsed_region_chan) { int i, j; chan_power_11d_t temp; @@ -559,7 +617,7 @@ wlan_11d_sort_parsed_region_chan(parsed_region_chan_11d_t * parsed_region_chan) wlan_11d_copy_chan_power(pchan_power + j, &temp); } - HEXDUMP("11D: parsed_region_chan", (t_u8 *) parsed_region_chan, + HEXDUMP("11D: parsed_region_chan", (t_u8 *)parsed_region_chan, sizeof(parsed_region_chan_11d_t)); LEAVE(); @@ -576,7 +634,7 @@ wlan_11d_sort_parsed_region_chan(parsed_region_chan_11d_t * parsed_region_chan) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_11d_send_domain_info(mlan_private * pmpriv, t_void * pioctl_buf) +wlan_11d_send_domain_info(mlan_private *pmpriv, t_void *pioctl_buf) { mlan_status ret = MLAN_STATUS_SUCCESS; @@ -586,7 +644,7 @@ wlan_11d_send_domain_info(mlan_private * pmpriv, t_void * pioctl_buf) ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11D_DOMAIN_INFO, HostCmd_ACT_GEN_SET, - 0, (t_void *) pioctl_buf, MNULL); + 0, (t_void *)pioctl_buf, MNULL); if (ret) PRINTM(MERROR, "11D: Failed to download domain Info\n"); @@ -606,11 +664,11 @@ wlan_11d_send_domain_info(mlan_private * pmpriv, t_void * pioctl_buf) * @return MLAN_STATUS_SUCCESS */ static mlan_status -wlan_11d_set_domain_info(mlan_private * pmpriv, +wlan_11d_set_domain_info(mlan_private *pmpriv, t_u8 band, t_u8 country_code[COUNTRY_CODE_LEN], t_u8 num_sub_band, - IEEEtypes_SubbandSet_t * sub_band_list) + IEEEtypes_SubbandSet_t *sub_band_list) { mlan_adapter *pmadapter = pmpriv->adapter; wlan_802_11d_domain_reg_t *pdomain = &pmadapter->domain_reg; @@ -643,7 +701,7 @@ wlan_11d_set_domain_info(mlan_private * pmpriv, * @return MTRUE or MFALSE */ t_bool -wlan_is_station(mlan_private * pmpriv) +wlan_is_station(mlan_private *pmpriv) { ENTER(); LEAVE(); @@ -658,7 +716,7 @@ wlan_is_station(mlan_private * pmpriv) * @return MTRUE or MFALSE */ t_bool -wlan_11d_is_enabled(mlan_private * pmpriv) +wlan_11d_is_enabled(mlan_private *pmpriv) { ENTER(); LEAVE(); @@ -673,7 +731,7 @@ wlan_11d_is_enabled(mlan_private * pmpriv) * @return N/A */ t_void -wlan_11d_priv_init(mlan_private * pmpriv) +wlan_11d_priv_init(mlan_private *pmpriv) { wlan_802_11d_state_t *state = &pmpriv->state_11d; @@ -700,7 +758,7 @@ wlan_11d_priv_init(mlan_private * pmpriv) * @return N/A */ t_void -wlan_11d_init(mlan_adapter * pmadapter) +wlan_11d_init(mlan_adapter *pmadapter) { ENTER(); @@ -727,7 +785,7 @@ wlan_11d_init(mlan_adapter * pmadapter) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_11d_enable(mlan_private * pmpriv, t_void * pioctl_buf, state_11d_t flag) +wlan_11d_enable(mlan_private *pmpriv, t_void *pioctl_buf, state_11d_t flag) { #ifdef STA_SUPPORT mlan_adapter *pmadapter = pmpriv->adapter; @@ -741,7 +799,7 @@ wlan_11d_enable(mlan_private * pmpriv, t_void * pioctl_buf, state_11d_t flag) ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_SNMP_MIB, HostCmd_ACT_GEN_SET, - Dot11D_i, (t_void *) pioctl_buf, &enable); + Dot11D_i, (t_void *)pioctl_buf, &enable); if (ret) { PRINTM(MERROR, "11D: Failed to %s 11D\n", @@ -770,8 +828,8 @@ wlan_11d_enable(mlan_private * pmpriv, t_void * pioctl_buf, state_11d_t flag) * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_cmd_802_11d_domain_info(mlan_private * pmpriv, - HostCmd_DS_COMMAND * pcmd, t_u16 cmd_action) +wlan_cmd_802_11d_domain_info(mlan_private *pmpriv, + HostCmd_DS_COMMAND *pcmd, t_u16 cmd_action) { mlan_adapter *pmadapter = pmpriv->adapter; HostCmd_DS_802_11D_DOMAIN_INFO *pdomain_info = @@ -790,7 +848,7 @@ wlan_cmd_802_11d_domain_info(mlan_private * pmpriv, pcmd->size = wlan_cpu_to_le16(sizeof(pdomain_info->action) + S_DS_GEN); - HEXDUMP("11D: 802_11D_DOMAIN_INFO", (t_u8 *) pcmd, + HEXDUMP("11D: 802_11D_DOMAIN_INFO", (t_u8 *)pcmd, wlan_le16_to_cpu(pcmd->size)); LEAVE(); return MLAN_STATUS_SUCCESS; @@ -823,7 +881,7 @@ wlan_cmd_802_11d_domain_info(mlan_private * pmpriv, } domain->header.len = wlan_cpu_to_le16(domain->header.len); - HEXDUMP("11D: 802_11D_DOMAIN_INFO", (t_u8 *) pcmd, + HEXDUMP("11D: 802_11D_DOMAIN_INFO", (t_u8 *)pcmd, wlan_le16_to_cpu(pcmd->size)); LEAVE(); @@ -839,7 +897,7 @@ wlan_cmd_802_11d_domain_info(mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_ret_802_11d_domain_info(mlan_private * pmpriv, HostCmd_DS_COMMAND * resp) +wlan_ret_802_11d_domain_info(mlan_private *pmpriv, HostCmd_DS_COMMAND *resp) { mlan_status ret = MLAN_STATUS_SUCCESS; HostCmd_DS_802_11D_DOMAIN_INFO_RSP *domain_info = @@ -851,12 +909,11 @@ wlan_ret_802_11d_domain_info(mlan_private * pmpriv, HostCmd_DS_COMMAND * resp) ENTER(); /* Dump domain info response data */ - HEXDUMP("11D: DOMAIN Info Rsp Data", (t_u8 *) resp, resp->size); + HEXDUMP("11D: DOMAIN Info Rsp Data", (t_u8 *)resp, resp->size); no_of_sub_band = - (t_u8) ((wlan_le16_to_cpu(domain->header.len) - - COUNTRY_CODE_LEN) - / sizeof(IEEEtypes_SubbandSet_t)); + (t_u8)((wlan_le16_to_cpu(domain->header.len) - COUNTRY_CODE_LEN) + / sizeof(IEEEtypes_SubbandSet_t)); PRINTM(MINFO, "11D Domain Info Resp: number of sub-band=%d\n", no_of_sub_band); @@ -896,9 +953,9 @@ wlan_ret_802_11d_domain_info(mlan_private * pmpriv, HostCmd_DS_COMMAND * resp) */ mlan_status wlan_11d_parse_domain_info(pmlan_adapter pmadapter, - IEEEtypes_CountryInfoFullSet_t * country_info, + IEEEtypes_CountryInfoFullSet_t *country_info, t_u8 band, - parsed_region_chan_11d_t * parsed_region_chan) + parsed_region_chan_11d_t *parsed_region_chan) { t_u8 no_of_sub_band, no_of_chan; t_u8 last_chan, first_chan, cur_chan = 0; @@ -917,7 +974,7 @@ wlan_11d_parse_domain_info(pmlan_adapter pmadapter, * 6. Others */ - HEXDUMP("country_info", (t_u8 *) country_info, 30); + HEXDUMP("country_info", (t_u8 *)country_info, 30); /* Step 1: Check region_code */ if (!(*(country_info->country_code)) || @@ -973,8 +1030,7 @@ wlan_11d_parse_domain_info(pmlan_adapter pmadapter, PRINTM(MINFO, "11D: number of channel=0x%x\n", parsed_region_chan->no_of_chan); - HEXDUMP("11D: parsed_region_chan", - (t_u8 *) parsed_region_chan->chan_pwr, + HEXDUMP("11D: parsed_region_chan", (t_u8 *)parsed_region_chan->chan_pwr, sizeof(chan_power_11d_t) * idx); LEAVE(); @@ -1001,7 +1057,10 @@ wlan_11d_chan_2_freq(pmlan_adapter pmadapter, t_u8 chan, t_u8 band) ENTER(); /* Get channel-frequency-power trios */ - { + if (band & (BAND_A | BAND_AN)) { + cf = channel_freq_power_UN_AJ; + cnt = NELEMENTS(channel_freq_power_UN_AJ); + } else { cf = channel_freq_power_UN_BG; cnt = NELEMENTS(channel_freq_power_UN_BG); } @@ -1025,7 +1084,7 @@ wlan_11d_chan_2_freq(pmlan_adapter pmadapter, t_u8 chan, t_u8 band) * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_11d_set_universaltable(mlan_private * pmpriv, t_u8 band) +wlan_11d_set_universaltable(mlan_private *pmpriv, t_u8 band) { mlan_adapter *pmadapter = pmpriv->adapter; t_u16 i = 0; @@ -1059,6 +1118,27 @@ wlan_11d_set_universaltable(mlan_private * pmpriv, t_u8 band) i++; } + if (band & (BAND_A | BAND_AN)) { + /* If band A */ + + /* Set channel-frequency-power */ + pmadapter->universal_channel[i].num_cfp = + NELEMENTS(channel_freq_power_UN_AJ); + PRINTM(MINFO, "11D: AJ-band num_cfp=%d\n", + pmadapter->universal_channel[i].num_cfp); + + pmadapter->universal_channel[i].pcfp = channel_freq_power_UN_AJ; + + pmadapter->universal_channel[i].valid = MTRUE; + + /* Set region code */ + pmadapter->universal_channel[i].region = UNIVERSAL_REGION_CODE; + + /* Set band */ + pmadapter->universal_channel[i].band = BAND_A; + i++; + } + LEAVE(); return MLAN_STATUS_SUCCESS; } @@ -1071,12 +1151,13 @@ wlan_11d_set_universaltable(mlan_private * pmpriv, t_u8 band) * @param chan Chan number * @param parsed_region_chan Pointer to parsed_region_chan_11d_t * - * @return PASSIVE if chan is unknown; ACTIVE if chan is known + * @return PASSIVE if chan is unknown; ACTIVE + * if chan is known */ t_u8 wlan_11d_get_scan_type(pmlan_adapter pmadapter, t_u8 band, - t_u8 chan, parsed_region_chan_11d_t * parsed_region_chan) + t_u8 chan, parsed_region_chan_11d_t *parsed_region_chan) { t_u8 scan_type = MLAN_SCAN_TYPE_PASSIVE; @@ -1102,7 +1183,7 @@ wlan_11d_get_scan_type(pmlan_adapter pmadapter, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_11d_clear_parsedtable(mlan_private * pmpriv) +wlan_11d_clear_parsedtable(mlan_private *pmpriv) { mlan_adapter *pmadapter = pmpriv->adapter; mlan_status ret = MLAN_STATUS_SUCCESS; @@ -1129,7 +1210,7 @@ wlan_11d_clear_parsedtable(mlan_private * pmpriv) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_11d_create_dnld_countryinfo(mlan_private * pmpriv, t_u8 band) +wlan_11d_create_dnld_countryinfo(mlan_private *pmpriv, t_u8 band) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_adapter *pmadapter = pmpriv->adapter; @@ -1157,6 +1238,16 @@ wlan_11d_create_dnld_countryinfo(mlan_private * pmpriv, t_u8 band) !region_chan->pcfp) continue; switch (region_chan->band) { + case BAND_A: + switch (band) { + case BAND_A: + case BAND_AN: + case BAND_A | BAND_AN: + break; + default: + continue; + } + break; case BAND_B: case BAND_G: switch (band) { @@ -1216,8 +1307,8 @@ wlan_11d_create_dnld_countryinfo(mlan_private * pmpriv, t_u8 band) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_11d_parse_dnld_countryinfo(mlan_private * pmpriv, - BSSDescriptor_t * pbss_desc) +wlan_11d_parse_dnld_countryinfo(mlan_private *pmpriv, + BSSDescriptor_t *pbss_desc) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_adapter *pmadapter = pmpriv->adapter; @@ -1243,7 +1334,9 @@ wlan_11d_parse_dnld_countryinfo(mlan_private * pmpriv, /* Parse domain info if available */ ret = wlan_11d_parse_domain_info(pmadapter, &pbss_desc-> - country_info, 0, + country_info, + (t_u8)pbss_desc-> + bss_band, &bssdesc_region_chan); if (ret == MLAN_STATUS_SUCCESS) { @@ -1256,9 +1349,10 @@ wlan_11d_parse_dnld_countryinfo(mlan_private * pmpriv, ((j < region_chan.no_of_chan) && (j < MAX_NO_OF_CHAN)); j++) { /* - * Channel already exists, use minimum of existing - * tx power and tx_power received from - * country info of the current AP + * Channel already exists, use minimum + * of existing tx power and tx_power + * received from country info of the + * current AP */ if (region_chan.chan_pwr[i]. chan == @@ -1307,7 +1401,7 @@ wlan_11d_parse_dnld_countryinfo(mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_11d_prepare_dnld_domain_info_cmd(mlan_private * pmpriv) +wlan_11d_prepare_dnld_domain_info_cmd(mlan_private *pmpriv) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_adapter *pmadapter = pmpriv->adapter; @@ -1365,7 +1459,7 @@ wlan_11d_prepare_dnld_domain_info_cmd(mlan_private * pmpriv) */ mlan_status wlan_11d_cfg_domain_info(IN pmlan_adapter pmadapter, - IN mlan_ioctl_req * pioctl_req) + IN mlan_ioctl_req *pioctl_req) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; @@ -1375,14 +1469,14 @@ wlan_11d_cfg_domain_info(IN pmlan_adapter pmadapter, ENTER(); - cfg_11d = (mlan_ds_11d_cfg *) pioctl_req->pbuf; + cfg_11d = (mlan_ds_11d_cfg *)pioctl_req->pbuf; domain_info = &cfg_11d->param.domain_info; memcpy(pmadapter, pmadapter->country_code, domain_info->country_code, COUNTRY_CODE_LEN); wlan_11d_set_domain_info(pmpriv, domain_info->band, domain_info->country_code, domain_info->no_of_sub_band, - (IEEEtypes_SubbandSet_t *) domain_info-> + (IEEEtypes_SubbandSet_t *)domain_info-> sub_band); ret = wlan_11d_send_domain_info(pmpriv, pioctl_req); @@ -1399,8 +1493,9 @@ wlan_11d_cfg_domain_info(IN pmlan_adapter pmadapter, goto done; } pmadapter->cfp_code_bg = cfp_bg; - if (cfp_bg) - pmadapter->region_code = cfp_bg; + pmadapter->cfp_code_a = cfp_a; + if (cfp_bg && cfp_a && (cfp_bg == cfp_a)) + pmadapter->region_code = cfp_a; else pmadapter->region_code = 0; if (wlan_set_regiontable(pmpriv, pmadapter->region_code, @@ -1428,9 +1523,8 @@ wlan_11d_cfg_domain_info(IN pmlan_adapter pmadapter, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_11d_handle_uap_domain_info(mlan_private * pmpriv, - t_u8 band, - t_u8 * domain_tlv, t_void * pioctl_buf) +wlan_11d_handle_uap_domain_info(mlan_private *pmpriv, + t_u8 band, t_u8 *domain_tlv, t_void *pioctl_buf) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_adapter *pmadapter = pmpriv->adapter; @@ -1440,7 +1534,7 @@ wlan_11d_handle_uap_domain_info(mlan_private * pmpriv, ENTER(); - pdomain_tlv = (MrvlIEtypes_DomainParamSet_t *) domain_tlv; + pdomain_tlv = (MrvlIEtypes_DomainParamSet_t *)domain_tlv; /* update region code & table based on country string */ if (wlan_misc_country_2_cfp_table_code(pmadapter, @@ -1448,8 +1542,9 @@ wlan_11d_handle_uap_domain_info(mlan_private * pmpriv, &cfp_bg, &cfp_a) == MLAN_STATUS_SUCCESS) { pmadapter->cfp_code_bg = cfp_bg; - if (cfp_bg) - pmadapter->region_code = cfp_bg; + pmadapter->cfp_code_a = cfp_a; + if (cfp_bg && cfp_a && (cfp_bg == cfp_a)) + pmadapter->region_code = cfp_a; else pmadapter->region_code = 0; if (wlan_set_regiontable(pmpriv, pmadapter->region_code, diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11h.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11h.c new file mode 100644 index 00000000..49136d63 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11h.c @@ -0,0 +1,3517 @@ +/** @file mlan_11h.c + * + * @brief This file contains functions for 802.11H. + * + * Copyright (C) 2008-2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/************************************************************* +Change Log: + 03/26/2009: initial version +************************************************************/ + +#include "mlan.h" +#include "mlan_join.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_ioctl.h" +#include "mlan_11h.h" +#ifdef UAP_SUPPORT +#include "mlan_uap.h" +#endif + +/******************************************************** + Local Variables +********************************************************/ + +/** Default IBSS DFS recovery interval (in TBTTs); used for adhoc start */ +#define WLAN_11H_DEFAULT_DFS_RECOVERY_INTERVAL 100 + +/** Default 11h power constraint used to offset the maximum transmit power */ +#define WLAN_11H_TPC_POWERCONSTRAINT 0 + +/** 11h TPC Power capability minimum setting, sent in TPC_INFO command to fw */ +#define WLAN_11H_TPC_POWERCAPABILITY_MIN 5 + +/** 11h TPC Power capability maximum setting, sent in TPC_INFO command to fw */ +#define WLAN_11H_TPC_POWERCAPABILITY_MAX 20 + +/** Regulatory requirement for the duration of a channel availability check */ +#define WLAN_11H_CHANNEL_AVAIL_CHECK_DURATION 60000 /* in ms */ + +/** Starting Frequency for 11A band */ +#define START_FREQ_11A_BAND 5000 /* in MHz */ + +/** DFS Channel Move Time */ +#define DFS_CHAN_MOVE_TIME 10 /* in sec */ + +/** Regulatory requirement for the duration of a non-occupancy period */ +#define WLAN_11H_NON_OCCUPANCY_PERIOD 1800 /* in sec (30mins) */ + +/** Maximum allowable age (seconds) on DFS report data */ +#define MAX_DFS_REPORT_USABLE_AGE_SEC (120) /* 2 minutes */ + +/** Minimum delay for CHAN_SW IE to broadcast by FW */ +#define MIN_RDH_CHAN_SW_IE_PERIOD_MSEC (500) /* 5 beacons @ 100ms */ + +/** Maximum delay for CHAN_SW IE to broadcast by FW */ +#define MAX_RDH_CHAN_SW_IE_PERIOD_MSEC (3000) /* 5 beacons @ 600ms */ + +/** Maximum retries on selecting new random channel */ +#define MAX_RANDOM_CHANNEL_RETRIES (20) + +/** Maximum retries on selecting new random non-dfs channel */ +#define MAX_SWITCH_CHANNEL_RETRIES (30) + +/** Value for undetermined priv_curr_idx on first entry to new RDH stage */ +#define RDH_STAGE_FIRST_ENTRY_PRIV_IDX (0xff) + +/** Region codes 0x10, 0x20: channels 1 thru 11 supported */ +static const +IEEEtypes_SupportChan_Subband_t wlan_11h_2_4G_region_FCC = { 1, 11 }; + +/** Region codes 0x30, 0x32, 0x41, 0x50: channels 1 thru 13 supported */ +static const +IEEEtypes_SupportChan_Subband_t wlan_11h_2_4G_region_EU = { 1, 13 }; + +/** Region code 0x40: only channel 14 supported */ +static const +IEEEtypes_SupportChan_Subband_t wlan_11h_2_4G_region_JPN40 = { 14, 1 }; + +/** JPN sub-band config : Start Channel = 8, NumChans = 3 */ +static const +IEEEtypes_SupportChan_Subband_t wlan_11h_JPN_bottom_band = { 8, 3 }; + +/** U-NII sub-band config : Start Channel = 36, NumChans = 4 */ +static const +IEEEtypes_SupportChan_Subband_t wlan_11h_unii_lower_band = { 36, 4 }; + +/** U-NII sub-band config : Start Channel = 52, NumChans = 4 */ +static const +IEEEtypes_SupportChan_Subband_t wlan_11h_unii_middle_band = { 52, 4 }; + +/** U-NII sub-band config : Start Channel = 100, NumChans = 11 */ +static const +IEEEtypes_SupportChan_Subband_t wlan_11h_unii_mid_upper_band = { 100, 11 }; + +/** U-NII sub-band config : Start Channel = 149, NumChans = 5 */ +static const +IEEEtypes_SupportChan_Subband_t wlan_11h_unii_upper_band = { 149, 5 }; + +/** Internally passed structure used to send a CMD_802_11_TPC_INFO command */ +typedef struct { + t_u8 chan; + /**< Channel to which the power constraint applies */ + t_u8 power_constraint; + /**< Local power constraint to send to firmware */ +} wlan_11h_tpc_info_param_t; + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ + +/** + * @brief Utility function to get a random number based on the underlying OS + * + * @param pmadapter Pointer to mlan_adapter + * @return random integer + */ +static t_u32 +wlan_11h_get_random_num(pmlan_adapter pmadapter) +{ + t_u32 sec, usec; + + ENTER(); + pmadapter->callbacks.moal_get_system_time(pmadapter->pmoal_handle, &sec, + &usec); + sec = (sec & 0xFFFF) + (sec >> 16); + usec = (usec & 0xFFFF) + (usec >> 16); + + LEAVE(); + return (usec << 16) | sec; +} + +/** + * @brief Convert an IEEE formatted IE to 16-bit ID/Len Marvell + * proprietary format + * + * @param pmadapter Pointer to mlan_adapter + * @param pout_buf Output parameter: Buffer to output Marvell formatted IE + * @param pin_ie Pointer to IEEE IE to be converted to Marvell format + * + * @return Number of bytes output to pout_buf parameter return + */ +static t_u32 +wlan_11h_convert_ieee_to_mrvl_ie(mlan_adapter *pmadapter, + t_u8 *pout_buf, const t_u8 *pin_ie) +{ + MrvlIEtypesHeader_t mrvl_ie_hdr; + t_u8 *ptmp_buf = pout_buf; + + ENTER(); + /* Assign the Element Id and Len to the Marvell struct attributes */ + mrvl_ie_hdr.type = wlan_cpu_to_le16(pin_ie[0]); + mrvl_ie_hdr.len = wlan_cpu_to_le16(pin_ie[1]); + + /* If the element ID is zero, return without doing any copying */ + if (!mrvl_ie_hdr.type) { + LEAVE(); + return 0; + } + + /* Copy the header to the buffer pointer */ + memcpy(pmadapter, ptmp_buf, &mrvl_ie_hdr, sizeof(mrvl_ie_hdr)); + + /* Increment the temp buffer pointer by the size appended */ + ptmp_buf += sizeof(mrvl_ie_hdr); + + /* Append the data section of the IE; length given by the IEEE IE + length */ + memcpy(pmadapter, ptmp_buf, pin_ie + 2, pin_ie[1]); + + LEAVE(); + /* Return the number of bytes appended to pout_buf */ + return sizeof(mrvl_ie_hdr) + pin_ie[1]; +} + +#ifdef STA_SUPPORT +/** + * @brief Setup the IBSS DFS element passed to the firmware in adhoc start + * and join commands + * + * The DFS Owner and recovery fields are set to be our MAC address and + * a predetermined constant recovery value. If we are joining an adhoc + * network, these values are replaced with the existing IBSS values. + * They are valid only when starting a new IBSS. + * + * The IBSS DFS Element is variable in size based on the number of + * channels supported in our current region. + * + * @param priv Private driver information structure + * @param pdfs Output parameter: Pointer to the IBSS DFS element setup by + * this function. + * + * @return + * - Length of the returned element in pdfs output parameter + * - 0 if returned element is not setup + */ +static t_u32 +wlan_11h_set_ibss_dfs_ie(mlan_private *priv, IEEEtypes_IBSS_DFS_t *pdfs) +{ + t_u8 num_chans = 0; + MeasRptBasicMap_t initial_map; + mlan_adapter *adapter = priv->adapter; + + ENTER(); + + memset(adapter, pdfs, 0x00, sizeof(IEEEtypes_IBSS_DFS_t)); + + /* + * A basic measurement report is included with each channel in the + * map field. Initial value for the map for each supported channel + * is with only the unmeasured bit set. + */ + memset(adapter, &initial_map, 0x00, sizeof(initial_map)); + initial_map.unmeasured = 1; + + /* Set the DFS Owner and recovery interval fields */ + memcpy(adapter, pdfs->dfs_owner, priv->curr_addr, + sizeof(pdfs->dfs_owner)); + pdfs->dfs_recovery_interval = WLAN_11H_DEFAULT_DFS_RECOVERY_INTERVAL; + + for (; (num_chans < adapter->parsed_region_chan.no_of_chan) + && (num_chans < WLAN_11H_MAX_IBSS_DFS_CHANNELS); num_chans++) { + pdfs->channel_map[num_chans].channel_number = + adapter->parsed_region_chan.chan_pwr[num_chans].chan; + + /* + * Set the initial map field with a basic measurement + */ + pdfs->channel_map[num_chans].rpt_map = initial_map; + } + + /* + * If we have an established channel map, include it and return + * a valid DFS element + */ + if (num_chans) { + PRINTM(MINFO, "11h: Added %d channels to IBSS DFS Map\n", + num_chans); + + pdfs->element_id = IBSS_DFS; + pdfs->len = + (sizeof(pdfs->dfs_owner) + + sizeof(pdfs->dfs_recovery_interval) + + num_chans * sizeof(IEEEtypes_ChannelMap_t)); + + LEAVE(); + return pdfs->len + sizeof(pdfs->len) + sizeof(pdfs->element_id); + } + + /* Ensure the element is zeroed out for an invalid return */ + memset(adapter, pdfs, 0x00, sizeof(IEEEtypes_IBSS_DFS_t)); + + LEAVE(); + return 0; +} +#endif + +/** + * @brief Setup the Supported Channel IE sent in association requests + * + * The Supported Channels IE is required to be sent when the spectrum + * management capability (11h) is enabled. The element contains a + * starting channel and number of channels tuple for each sub-band + * the STA supports. This information is based on the operating region. + * + * @param priv Private driver information structure + * @param band Band in use + * @param psup_chan Output parameter: Pointer to the Supported Chan element + * setup by this function. + * + * @return + * - Length of the returned element in psup_chan output parameter + * - 0 if returned element is not setup + */ +static + t_u16 +wlan_11h_set_supp_channels_ie(mlan_private *priv, + t_u8 band, + IEEEtypes_SupportedChannels_t *psup_chan) +{ + t_u16 num_subbands = 0; + t_u16 ret_len = 0; + t_u8 cfp_bg, cfp_a; + + ENTER(); + memset(priv->adapter, psup_chan, 0x00, + sizeof(IEEEtypes_SupportedChannels_t)); + + cfp_bg = cfp_a = priv->adapter->region_code; + if (!priv->adapter->region_code) { + /* Invalid region code, use CFP code */ + cfp_bg = priv->adapter->cfp_code_bg; + cfp_a = priv->adapter->cfp_code_a; + } + + if ((band & BAND_B) || (band & BAND_G)) { + /* + * Channels are contiguous in 2.4GHz, usually only one subband. + */ + switch (cfp_bg) { + case 0x10: /* USA FCC */ + case 0x20: /* Canada IC */ + default: + psup_chan->subband[num_subbands++] = + wlan_11h_2_4G_region_FCC; + break; + case 0x30: /* Europe ETSI */ + case 0x32: /* France */ + case 0x41: /* Japan */ + case 0x50: /* China */ + psup_chan->subband[num_subbands++] = + wlan_11h_2_4G_region_EU; + break; + case 0x40: /* Japan */ + psup_chan->subband[num_subbands++] = + wlan_11h_2_4G_region_JPN40; + break; + case 0xff: /* Japan special */ + psup_chan->subband[num_subbands++] = + wlan_11h_2_4G_region_EU; + psup_chan->subband[num_subbands++] = + wlan_11h_2_4G_region_JPN40; + break; + } + } else if (band & BAND_A) { + /* + * Set the supported channel elements based on the region code, + * incrementing num_subbands for each sub-band we append to the + * element. + */ + switch (cfp_a) { + case 0x10: /* USA FCC */ + case 0x20: /* Canada IC */ + case 0x32: /* France */ + psup_chan->subband[num_subbands++] = + wlan_11h_unii_lower_band; + psup_chan->subband[num_subbands++] = + wlan_11h_unii_middle_band; + psup_chan->subband[num_subbands++] = + wlan_11h_unii_mid_upper_band; + psup_chan->subband[num_subbands++] = + wlan_11h_unii_upper_band; + break; + case 0x30: /* Europe ETSI */ + default: + psup_chan->subband[num_subbands++] = + wlan_11h_unii_lower_band; + psup_chan->subband[num_subbands++] = + wlan_11h_unii_middle_band; + psup_chan->subband[num_subbands++] = + wlan_11h_unii_mid_upper_band; + break; + case 0x50: /* China */ + psup_chan->subband[num_subbands++] = + wlan_11h_unii_upper_band; + break; + case 0x40: /* Japan */ + case 0x41: /* Japan */ + case 0xff: /* Japan special */ + psup_chan->subband[num_subbands++] = + wlan_11h_JPN_bottom_band; + psup_chan->subband[num_subbands++] = + wlan_11h_unii_lower_band; + psup_chan->subband[num_subbands++] = + wlan_11h_unii_middle_band; + psup_chan->subband[num_subbands++] = + wlan_11h_unii_mid_upper_band; + break; + case 0x1: /* Low band (5150-5250 MHz) channels */ + psup_chan->subband[num_subbands++] = + wlan_11h_unii_lower_band; + break; + case 0x2: /* Lower middle band (5250-5350 MHz) channels */ + psup_chan->subband[num_subbands++] = + wlan_11h_unii_middle_band; + break; + case 0x3: /* Upper middle band (5470-5725 MHz) channels */ + psup_chan->subband[num_subbands++] = + wlan_11h_unii_mid_upper_band; + break; + case 0x4: /* High band (5725-5850 MHz) channels */ + psup_chan->subband[num_subbands++] = + wlan_11h_unii_upper_band; + break; + case 0x5: /* Low band (5150-5250 MHz) and High band + (5725-5850 MHz) channels */ + psup_chan->subband[num_subbands++] = + wlan_11h_unii_lower_band; + psup_chan->subband[num_subbands++] = + wlan_11h_unii_upper_band; + break; + } + } + + /* + * If we have setup any supported subbands in the element, return a + * valid IE along with its size, else return 0. + */ + if (num_subbands) { + psup_chan->element_id = SUPPORTED_CHANNELS; + psup_chan->len = + num_subbands * sizeof(IEEEtypes_SupportChan_Subband_t); + + ret_len = (t_u16)(psup_chan->len + + sizeof(psup_chan->len) + + sizeof(psup_chan->element_id)); + + HEXDUMP("11h: SupChan", (t_u8 *)psup_chan, ret_len); + } + + LEAVE(); + return ret_len; +} + +/** + * @brief Prepare CMD_802_11_TPC_ADAPT_REQ firmware command + * + * @param priv Private driver information structure + * @param pcmd_ptr Output parameter: Pointer to the command being prepared + * for the firmware + * @param pinfo_buf HostCmd_DS_802_11_TPC_ADAPT_REQ passed as void data block + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_11h_cmd_tpc_request(mlan_private *priv, + HostCmd_DS_COMMAND *pcmd_ptr, const t_void *pinfo_buf) +{ + ENTER(); + + memcpy(priv->adapter, &pcmd_ptr->params.tpc_req, pinfo_buf, + sizeof(HostCmd_DS_802_11_TPC_ADAPT_REQ)); + + pcmd_ptr->params.tpc_req.req.timeout = + wlan_cpu_to_le16(pcmd_ptr->params.tpc_req.req.timeout); + + /* Converted to little endian in wlan_11h_cmd_process */ + pcmd_ptr->size = sizeof(HostCmd_DS_802_11_TPC_ADAPT_REQ) + S_DS_GEN; + + HEXDUMP("11h: 11_TPC_ADAPT_REQ:", (t_u8 *)pcmd_ptr, + (t_u32)pcmd_ptr->size); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Prepare CMD_802_11_TPC_INFO firmware command + * + * @param priv Private driver information structure + * @param pcmd_ptr Output parameter: Pointer to the command being prepared + * for the firmware + * @param pinfo_buf wlan_11h_tpc_info_param_t passed as void data block + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_11h_cmd_tpc_info(mlan_private *priv, + HostCmd_DS_COMMAND *pcmd_ptr, const t_void *pinfo_buf) +{ + HostCmd_DS_802_11_TPC_INFO *ptpc_info = &pcmd_ptr->params.tpc_info; + MrvlIEtypes_LocalPowerConstraint_t *pconstraint = + &ptpc_info->local_constraint; + MrvlIEtypes_PowerCapability_t *pcap = &ptpc_info->power_cap; + + wlan_11h_device_state_t *pstate = &priv->adapter->state_11h; + const wlan_11h_tpc_info_param_t *ptpc_info_param = + (wlan_11h_tpc_info_param_t *)pinfo_buf; + + ENTER(); + + pcap->min_power = pstate->min_tx_power_capability; + pcap->max_power = pstate->max_tx_power_capability; + pcap->header.len = wlan_cpu_to_le16(2); + pcap->header.type = wlan_cpu_to_le16(TLV_TYPE_POWER_CAPABILITY); + + pconstraint->chan = ptpc_info_param->chan; + pconstraint->constraint = ptpc_info_param->power_constraint; + pconstraint->header.type = wlan_cpu_to_le16(TLV_TYPE_POWER_CONSTRAINT); + pconstraint->header.len = wlan_cpu_to_le16(2); + + /* Converted to little endian in wlan_11h_cmd_process */ + pcmd_ptr->size = sizeof(HostCmd_DS_802_11_TPC_INFO) + S_DS_GEN; + + HEXDUMP("11h: TPC INFO", (t_u8 *)pcmd_ptr, (t_u32)pcmd_ptr->size); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Prepare CMD_802_11_CHAN_SW_ANN firmware command + * + * @param priv Private driver information structure + * @param pcmd_ptr Output parameter: Pointer to the command being + * prepared to for firmware + * @param pinfo_buf HostCmd_DS_802_11_CHAN_SW_ANN passed as void data block + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_11h_cmd_chan_sw_ann(mlan_private *priv, + HostCmd_DS_COMMAND *pcmd_ptr, const t_void *pinfo_buf) +{ + const HostCmd_DS_802_11_CHAN_SW_ANN *pch_sw_ann = + (HostCmd_DS_802_11_CHAN_SW_ANN *)pinfo_buf; + + ENTER(); + + /* Converted to little endian in wlan_11h_cmd_process */ + pcmd_ptr->size = sizeof(HostCmd_DS_802_11_CHAN_SW_ANN) + S_DS_GEN; + + memcpy(priv->adapter, &pcmd_ptr->params.chan_sw_ann, pch_sw_ann, + sizeof(HostCmd_DS_802_11_CHAN_SW_ANN)); + + PRINTM(MINFO, "11h: ChSwAnn: %#x-%u, Seq=%u, Ret=%u\n", + pcmd_ptr->command, pcmd_ptr->size, pcmd_ptr->seq_num, + pcmd_ptr->result); + PRINTM(MINFO, "11h: ChSwAnn: Ch=%d, Cnt=%d, Mode=%d\n", + pch_sw_ann->new_chan, pch_sw_ann->switch_count, + pch_sw_ann->switch_mode); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Prepare CMD_CHAN_REPORT_REQUEST firmware command + * + * @param priv Private driver information structure + * @param pcmd_ptr Output parameter: Pointer to the command being + * prepared to for firmware + * @param pinfo_buf HostCmd_DS_CHAN_RPT_REQ passed as void data block + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_PENDING + */ +static mlan_status +wlan_11h_cmd_chan_rpt_req(mlan_private *priv, + HostCmd_DS_COMMAND *pcmd_ptr, const t_void *pinfo_buf) +{ + const HostCmd_DS_CHAN_RPT_REQ *pchan_rpt_req = + (HostCmd_DS_CHAN_RPT_REQ *)pinfo_buf; + wlan_dfs_device_state_t *pstate_dfs = &priv->adapter->state_dfs; + MrvlIEtypes_ChanRpt11hBasic_t *ptlv_basic; + + ENTER(); + + if (pstate_dfs->dfs_check_pending) { + PRINTM(MERROR, + "11h: ChanRptReq - previous CMD_CHAN_REPORT_REQUEST has" + " not returned its result yet (as EVENT_CHANNEL_READY)." + " This command will be dropped.\n"); + LEAVE(); + return MLAN_STATUS_PENDING; + } + + /* Converted to little endian in wlan_11h_cmd_process */ + pcmd_ptr->size = sizeof(HostCmd_DS_CHAN_RPT_REQ) + S_DS_GEN; + + memcpy(priv->adapter, &pcmd_ptr->params.chan_rpt_req, pchan_rpt_req, + sizeof(HostCmd_DS_CHAN_RPT_REQ)); + + /* if DFS channel, add BASIC report TLV, and set radar bit */ + if (wlan_11h_radar_detect_required + (priv, pchan_rpt_req->chan_desc.chanNum)) { + ptlv_basic = + (MrvlIEtypes_ChanRpt11hBasic_t *)(((t_u8 *)(pcmd_ptr)) + + pcmd_ptr->size); + ptlv_basic->Header.type = + wlan_cpu_to_le16(TLV_TYPE_CHANRPT_11H_BASIC); + ptlv_basic->Header.len = + wlan_cpu_to_le16(sizeof(MeasRptBasicMap_t)); + memset(priv->adapter, &ptlv_basic->map, 0, + sizeof(MeasRptBasicMap_t)); + ptlv_basic->map.radar = 1; + pcmd_ptr->size += sizeof(MrvlIEtypes_ChanRpt11hBasic_t); + } + + /* update dfs sturcture. dfs_check_pending is set when we receive + CMD_RESP == SUCCESS */ + pstate_dfs->dfs_check_pending = MFALSE; + pstate_dfs->dfs_radar_found = MFALSE; + pstate_dfs->dfs_check_channel = pchan_rpt_req->chan_desc.chanNum; + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Set the local power capability and constraint TLV + * + * @param ppbuffer The buffer to add these two TLVs + * @param channel Channel to which the power constraint applies + * @param power_constraint Power constraint to be applied on the channel + * @param min_tx_power_capability Min. Tx Power in Power Capability IE + * @param max_tx_power_capability Max. Tx Power in Power Capability IE + * + * @return The len increased + */ +static t_u32 +wlan_11h_set_local_power_constraint_tlv(t_u8 **ppbuffer, + t_u8 channel, + t_u8 power_constraint, + t_u8 min_tx_power_capability, + t_u8 max_tx_power_capability) +{ + MrvlIEtypes_PowerCapability_t *pcap; + MrvlIEtypes_LocalPowerConstraint_t *pconstraint; + t_u8 *start_ptr = MNULL; + + ENTER(); + + /* Null Checks */ + if ((ppbuffer == MNULL) || (((t_u8 *)(*ppbuffer)) == MNULL)) { + LEAVE(); + return 0; + } + + start_ptr = (t_u8 *)(*ppbuffer); + + PRINTM(MINFO, + "11h: Set local power constraint = %d channel=%d min_tx_pwr=%d max_tx_pwr=%d\n", + power_constraint, channel, min_tx_power_capability, + max_tx_power_capability); + + pcap = (MrvlIEtypes_PowerCapability_t *)*ppbuffer; + pcap->header.type = wlan_cpu_to_le16(TLV_TYPE_POWER_CAPABILITY); + pcap->header.len = wlan_cpu_to_le16(2); + pcap->min_power = min_tx_power_capability; + pcap->max_power = max_tx_power_capability; + *ppbuffer += sizeof(MrvlIEtypesHeader_t) + 2; + + pconstraint = (MrvlIEtypes_LocalPowerConstraint_t *)*ppbuffer; + pconstraint->header.type = wlan_cpu_to_le16(TLV_TYPE_POWER_CONSTRAINT); + pconstraint->header.len = wlan_cpu_to_le16(2); + pconstraint->chan = channel; + pconstraint->constraint = power_constraint; + *ppbuffer += sizeof(MrvlIEtypesHeader_t) + 2; + + LEAVE(); + return (t_u32)(*ppbuffer - start_ptr); +} + +/** + * @brief Utility function to process a join to an infrastructure BSS + * + * @param priv Private driver information structure + * @param ppbuffer Output parameter: Pointer to the TLV output buffer, + * modified on return to point after the appended 11h TLVs + * @param band Band on which we are joining the BSS + * @param channel Channel on which we are joining the BSS + * @param p11h_bss_info Pointer to the 11h BSS information for this network + * that was parsed out of the scan response. + * + * @return Integer number of bytes appended to the TLV output + * buffer (ppbuffer) + */ +static t_u32 +wlan_11h_process_infra_join(mlan_private *priv, + t_u8 **ppbuffer, + t_u8 band, + t_u32 channel, wlan_11h_bss_info_t *p11h_bss_info) +{ + MrvlIEtypesHeader_t ie_header; + IEEEtypes_SupportedChannels_t sup_chan_ie; + t_u32 ret_len = 0; + t_u16 sup_chan_len = 0; + + ENTER(); + + /* Null Checks */ + if ((ppbuffer == MNULL) || (((t_u8 *)(*ppbuffer)) == MNULL)) { + LEAVE(); + return 0; + } + + ret_len += + wlan_11h_set_local_power_constraint_tlv(ppbuffer, (t_u8)channel, + (t_u8)p11h_bss_info-> + power_constraint. + local_constraint, + (t_u8)priv->adapter-> + state_11h. + min_tx_power_capability, + (t_u8)priv->adapter-> + state_11h. + max_tx_power_capability); + + /* Setup the Supported Channels IE */ + sup_chan_len = wlan_11h_set_supp_channels_ie(priv, band, &sup_chan_ie); + + /* + * If we returned a valid Supported Channels IE, wrap and append it + */ + if (sup_chan_len) { + /* Wrap the supported channels IE with a passthrough TLV type */ + ie_header.type = wlan_cpu_to_le16(TLV_TYPE_PASSTHROUGH); + ie_header.len = sup_chan_len; + memcpy(priv->adapter, *ppbuffer, &ie_header, sizeof(ie_header)); + + /* + * Increment the return size and the return buffer + * pointer param + */ + *ppbuffer += sizeof(ie_header); + ret_len += sizeof(ie_header); + + /* + * Copy the supported channels IE to the output buf, + * advance pointer + */ + memcpy(priv->adapter, *ppbuffer, &sup_chan_ie, sup_chan_len); + *ppbuffer += sup_chan_len; + ret_len += sup_chan_len; + } + + LEAVE(); + return ret_len; +} + +/** + * @brief Utility function to process a start or join to an adhoc network + * + * Add the elements to the TLV buffer needed in the start/join adhoc commands: + * - IBSS DFS IE + * - Quiet IE + * + * Also send the local constraint to the firmware in a TPC_INFO command. + * + * @param priv Private driver information structure + * @param ppbuffer Output parameter: Pointer to the TLV output buffer, + * modified on return to point after the appended 11h TLVs + * @param channel Channel on which we are starting/joining the IBSS + * @param p11h_bss_info Pointer to the 11h BSS information for this network + * that was parsed out of the scan response. NULL + * indicates we are starting the adhoc network + * + * @return Integer number of bytes appended to the TLV output + * buffer (ppbuffer) + */ +static t_u32 +wlan_11h_process_adhoc(mlan_private *priv, + t_u8 **ppbuffer, + t_u32 channel, wlan_11h_bss_info_t *p11h_bss_info) +{ + IEEEtypes_IBSS_DFS_t dfs_elem; + t_u32 size_appended; + t_u32 ret_len = 0; + t_s8 local_constraint = 0; + mlan_adapter *adapter = priv->adapter; + + ENTER(); + +#ifdef STA_SUPPORT + /* Format our own IBSS DFS Element. Include our channel map fields */ + wlan_11h_set_ibss_dfs_ie(priv, &dfs_elem); +#endif + + if (p11h_bss_info) { + /* + * Copy the DFS Owner/Recovery Interval from the BSS + * we are joining + */ + memcpy(adapter, dfs_elem.dfs_owner, + p11h_bss_info->ibss_dfs.dfs_owner, + sizeof(dfs_elem.dfs_owner)); + dfs_elem.dfs_recovery_interval = + p11h_bss_info->ibss_dfs.dfs_recovery_interval; + } + + /* Append the dfs element to the TLV buffer */ + size_appended = wlan_11h_convert_ieee_to_mrvl_ie(adapter, + (t_u8 *)*ppbuffer, + (t_u8 *)&dfs_elem); + + HEXDUMP("11h: IBSS-DFS", (t_u8 *)*ppbuffer, size_appended); + *ppbuffer += size_appended; + ret_len += size_appended; + + /* + * Check to see if we are joining a network. Join is indicated by the + * BSS Info pointer being valid (not NULL) + */ + if (p11h_bss_info) { + /* + * If there was a quiet element, include it in + * adhoc join command + */ + if (p11h_bss_info->quiet.element_id == QUIET) { + size_appended + = + wlan_11h_convert_ieee_to_mrvl_ie(adapter, + (t_u8 *) + *ppbuffer, + (t_u8 *) + &p11h_bss_info-> + quiet); + HEXDUMP("11h: Quiet", (t_u8 *)*ppbuffer, size_appended); + *ppbuffer += size_appended; + ret_len += size_appended; + } + + /* Copy the local constraint from the network */ + local_constraint = + p11h_bss_info->power_constraint.local_constraint; + } else { + /* + * If we are the adhoc starter, we can add a quiet element + */ + if (adapter->state_11h.quiet_ie.quiet_period) { + size_appended = + wlan_11h_convert_ieee_to_mrvl_ie(adapter, + (t_u8 *) + *ppbuffer, + (t_u8 *) + &adapter-> + state_11h. + quiet_ie); + HEXDUMP("11h: Quiet", (t_u8 *)*ppbuffer, size_appended); + *ppbuffer += size_appended; + ret_len += size_appended; + } + /* Use the local_constraint configured in the driver state */ + local_constraint = adapter->state_11h.usr_def_power_constraint; + } + + PRINTM(MINFO, "WEILIE 1: ppbuffer = %p\n", *ppbuffer); + + ret_len += + wlan_11h_set_local_power_constraint_tlv(ppbuffer, (t_u8)channel, + (t_u8)local_constraint, + (t_u8)priv->adapter-> + state_11h. + min_tx_power_capability, + (t_u8)priv->adapter-> + state_11h. + max_tx_power_capability); + PRINTM(MINFO, "WEILIE 2: ppbuffer = %p\n", *ppbuffer); + + LEAVE(); + return ret_len; +} + +/** + * @brief Return whether the driver has enabled 11h for the interface + * + * Association/Join commands are dynamic in that they enable 11h in the + * driver/firmware when they are detected in the existing BSS. + * + * @param priv Private driver information structure + * + * @return + * - MTRUE if 11h is enabled + * - MFALSE otherwise + */ +static t_bool +wlan_11h_is_enabled(mlan_private *priv) +{ + ENTER(); + LEAVE(); + return priv->intf_state_11h.is_11h_enabled; +} + +/** + * @brief Return whether the device has activated slave radar detection. + * + * @param priv Private driver information structure + * + * @return + * - MTRUE if slave radar detection is enabled in firmware + * - MFALSE otherwise + */ +static t_bool +wlan_11h_is_slave_radar_det_active(mlan_private *priv) +{ + ENTER(); + LEAVE(); + return priv->adapter->state_11h.is_slave_radar_det_active; +} + +/** + * @brief Return whether the slave interface is active, and on DFS channel. + * priv is assumed to already be a dfs slave interface, doesn't check this. + * + * @param priv Private driver information structure + * + * @return + * - MTRUE if priv is slave, and meets both conditions + * - MFALSE otherwise + */ +static t_bool +wlan_11h_is_slave_active_on_dfs_chan(mlan_private *priv) +{ + t_bool ret = MFALSE; + + ENTER(); + if ((priv->media_connected == MTRUE) && + (priv->curr_bss_params.band & BAND_A) && + wlan_11h_radar_detect_required(priv, + priv->curr_bss_params.bss_descriptor. + channel)) + ret = MTRUE; + + LEAVE(); + return ret; +} + +/** + * @brief Return whether the master interface is active, and on DFS channel. + * priv is assumed to already be a dfs master interface, doesn't check this. + * + * @param priv Private driver information structure + * + * @return + * - MTRUE if priv is master, and meets both conditions + * - MFALSE otherwise + */ +static t_bool +wlan_11h_is_master_active_on_dfs_chan(mlan_private *priv) +{ + t_bool ret = MFALSE; + + ENTER(); + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) { + /* Ad-hoc creator */ + if (((priv->media_connected == MTRUE) + || (priv->adhoc_state == ADHOC_STARTING)) && + (priv->adapter->adhoc_start_band & BAND_A) && + wlan_11h_radar_detect_required(priv, priv->adhoc_channel)) + ret = MTRUE; + } else if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + /* UAP */ +#ifdef UAP_SUPPORT + if ((priv->uap_bss_started == MTRUE) && + (priv->uap_state_chan_cb.band_config & BAND_CONFIG_5GHZ) && + wlan_11h_radar_detect_required(priv, + priv->uap_state_chan_cb. + channel)) + ret = MTRUE; +#endif + } + LEAVE(); + return ret; +} + +/** + * @brief Determine if priv is DFS Master interface + * + * @param priv Pointer to mlan_private + * + * @return MTRUE or MFALSE + */ +static t_bool +wlan_11h_is_dfs_master(mlan_private *priv) +{ + t_bool ret = MFALSE; + + ENTER(); + /* UAP: all are master */ + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) + ret = MTRUE; + + /* STA: only ad-hoc creator is master */ + else if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) && + (priv->bss_mode == MLAN_BSS_MODE_IBSS) && + (priv->adhoc_state == ADHOC_STARTED || + priv->adhoc_state == ADHOC_STARTING)) + ret = MTRUE; + + /* all other cases = slave interface */ + LEAVE(); + return ret; +} + +/* Need this as function to pass to wlan_count_priv_cond() */ +/** + * @brief Determine if priv is DFS Slave interface + * + * @param priv Pointer to mlan_private + * + * @return MTRUE or MFALSE + */ + +static t_bool +wlan_11h_is_dfs_slave(mlan_private *priv) +{ + t_bool ret = MFALSE; + ENTER(); + ret = !wlan_11h_is_dfs_master(priv); + LEAVE(); + return ret; +} + +/** + * @brief This function checks if interface is active. + * + * @param pmpriv A pointer to mlan_private structure + * + * @return MTRUE or MFALSE + */ +static t_bool +wlan_is_intf_active(mlan_private *pmpriv) +{ + t_bool ret = MFALSE; + ENTER(); + +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_UAP) + /* + * NOTE: UAP's media_connected == true only after first STA + * associated. Need different variable to tell if UAP + * has been started. + */ + ret = pmpriv->uap_bss_started; + else +#endif + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_STA) + ret = pmpriv->media_connected; + + LEAVE(); + return ret; +} + +/** + * @brief This function gets current radar detect flags + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return 11H MIB setting for radar detect + */ +static t_u32 +wlan_11h_get_current_radar_detect_flags(mlan_adapter *pmadapter) +{ + t_u32 radar_det_flags = 0; + + ENTER(); + if (pmadapter->state_11h.is_master_radar_det_active) + radar_det_flags |= MASTER_RADAR_DET_MASK; + if (pmadapter->state_11h.is_slave_radar_det_active) + radar_det_flags |= SLAVE_RADAR_DET_MASK; + + PRINTM(MINFO, "%s: radar_det_state_curr=0x%x\n", + __func__, radar_det_flags); + + LEAVE(); + return radar_det_flags; +} + +/** + * @brief This function checks if radar detect flags have/should be changed. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pnew_state Output param with new state, if return MTRUE. + * + * @return MTRUE (need update) or MFALSE (no change in flags) + */ +static t_bool +wlan_11h_check_radar_det_state(mlan_adapter *pmadapter, OUT t_u32 *pnew_state) +{ + t_u32 radar_det_state_new = 0; + t_bool ret; + + ENTER(); + PRINTM(MINFO, "%s: master_radar_det_pending=%d, " + " slave_radar_det_pending=%d\n", __func__, + pmadapter->state_11h.master_radar_det_enable_pending, + pmadapter->state_11h.slave_radar_det_enable_pending); + + /* new state comes from evaluating interface states & pending starts */ + if (pmadapter->state_11h.master_radar_det_enable_pending || + (wlan_count_priv_cond(pmadapter, + wlan_11h_is_master_active_on_dfs_chan, + wlan_11h_is_dfs_master) > 0)) + radar_det_state_new |= MASTER_RADAR_DET_MASK; + if (pmadapter->state_11h.slave_radar_det_enable_pending || + (wlan_count_priv_cond(pmadapter, + wlan_11h_is_slave_active_on_dfs_chan, + wlan_11h_is_dfs_slave) > 0)) + radar_det_state_new |= SLAVE_RADAR_DET_MASK; + + PRINTM(MINFO, "%s: radar_det_state_new=0x%x\n", + __func__, radar_det_state_new); + + /* now compare flags with current state */ + ret = (wlan_11h_get_current_radar_detect_flags(pmadapter) + != radar_det_state_new) ? MTRUE : MFALSE; + if (ret) + *pnew_state = radar_det_state_new; + + LEAVE(); + return ret; +} + +/** + * @brief Determine if mlan_private list only contains UAP interface(s) + * + * @param priv_list List of mlan_private pointers + * @param priv_list_count Number of mlan_privates in above list + * + * @return MTRUE or MFALSE + */ +static t_bool +wlan_only_uap_priv_in_list(mlan_private **priv_list, t_u8 priv_list_count) +{ +#if defined(STA_SUPPORT) && !defined(UAP_SUPPORT) + return MFALSE; +#else + t_u8 uap_count = 0; + t_u8 sta_count = 0; + t_u8 i; + + ENTER(); + for (i = 0; i < priv_list_count; i++) { + if (GET_BSS_ROLE(priv_list[i]) == MLAN_BSS_ROLE_UAP) + uap_count++; + else + sta_count++; + } + + LEAVE(); + return ((uap_count > 0) && (sta_count == 0)) ? MTRUE : MFALSE; +#endif +} + +/** + * @brief Prepare ioctl for add/remove CHAN_SW IE - RADAR_DETECTED event handling + * + * @param pmadapter Pointer to mlan_adapter + * @param pioctl_req Pointer to completed mlan_ioctl_req (allocated inside) + * @param is_adding_ie CHAN_SW IE is to be added (MTRUE), or removed (MFALSE) + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_11h_prepare_custom_ie_chansw(IN mlan_adapter *pmadapter, + OUT mlan_ioctl_req **ppioctl_req, + IN t_bool is_adding_ie) +{ + mlan_ioctl_req *pioctl_req = MNULL; + mlan_ds_misc_cfg *pds_misc_cfg = MNULL; + custom_ie *pcust_chansw_ie = MNULL; + IEEEtypes_ChanSwitchAnn_t *pchansw_ie = MNULL; + mlan_status ret; + + ENTER(); + + if (pmadapter == MNULL || ppioctl_req == MNULL) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + /* allocate buffer for mlan_ioctl_req and mlan_ds_misc_cfg */ + /* FYI - will be freed as part of cmd_response handler */ + ret = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle, + sizeof(mlan_ioctl_req) + + sizeof(mlan_ds_misc_cfg), + MLAN_MEM_DEF, + (t_u8 **)&pioctl_req); + if ((ret != MLAN_STATUS_SUCCESS) || !pioctl_req) { + PRINTM(MERROR, "%s(): Could not allocate ioctl req\n", + __func__); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + pds_misc_cfg = (mlan_ds_misc_cfg *)((t_u8 *)pioctl_req + + sizeof(mlan_ioctl_req)); + + /* prepare mlan_ioctl_req */ + memset(pmadapter, pioctl_req, 0x00, sizeof(mlan_ioctl_req)); + pioctl_req->req_id = MLAN_IOCTL_MISC_CFG; + pioctl_req->action = MLAN_ACT_SET; + pioctl_req->pbuf = (t_u8 *)pds_misc_cfg; + pioctl_req->buf_len = sizeof(mlan_ds_misc_cfg); + + /* prepare mlan_ds_misc_cfg */ + memset(pmadapter, pds_misc_cfg, 0x00, sizeof(mlan_ds_misc_cfg)); + pds_misc_cfg->sub_command = MLAN_OID_MISC_CUSTOM_IE; + pds_misc_cfg->param.cust_ie.type = TLV_TYPE_MGMT_IE; + pds_misc_cfg->param.cust_ie.len = (sizeof(custom_ie) - MAX_IE_SIZE); + + /* configure custom_ie api settings */ + pcust_chansw_ie = + (custom_ie *)&pds_misc_cfg->param.cust_ie.ie_data_list[0]; + pcust_chansw_ie->ie_index = 0xffff; /* Auto index */ + pcust_chansw_ie->ie_length = sizeof(IEEEtypes_ChanSwitchAnn_t); + pcust_chansw_ie->mgmt_subtype_mask = (is_adding_ie) + ? MBIT(8) | MBIT(5) /* add IE for BEACON | PROBE_RSP */ + : 0; /* remove IE */ + + /* prepare CHAN_SW IE inside ioctl */ + pchansw_ie = (IEEEtypes_ChanSwitchAnn_t *)pcust_chansw_ie->ie_buffer; + pchansw_ie->element_id = CHANNEL_SWITCH_ANN; + pchansw_ie->len = + sizeof(IEEEtypes_ChanSwitchAnn_t) - sizeof(IEEEtypes_Header_t); + pchansw_ie->chan_switch_mode = 1; /* STA should not transmit */ + pchansw_ie->new_channel_num = pmadapter->state_rdh.new_channel; + pchansw_ie->chan_switch_count = 0; /* simplification */ + + pds_misc_cfg->param.cust_ie.len += pcust_chansw_ie->ie_length; + DBG_HEXDUMP(MCMD_D, "11h: custom_ie containing CHAN_SW IE", + (t_u8 *)pcust_chansw_ie, pds_misc_cfg->param.cust_ie.len); + + /* assign output pointer before returning */ + *ppioctl_req = pioctl_req; + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +#ifdef UAP_SUPPORT +/** + * @brief Retrieve a randomly selected starting channel if needed for 11h + * + * If 11h is enabled and 5GHz band is selected in band_config + * return a random channel in A band, else one from BG band. + * + * @param priv Private driver information structure + * @param uap_band_cfg Private driver information structure + * + * @return Starting channel + */ +static t_u8 +wlan_11h_get_uap_start_channel(mlan_private *priv, t_u8 uap_band_cfg) +{ + t_u8 start_chn; + mlan_adapter *adapter = priv->adapter; + t_u32 region; + t_u32 rand_entry; + region_chan_t *chn_tbl; + t_u8 rand_tries = 0; + + /* TODO: right now mostly a copy of wlan_11h_get_adhoc_start_channel. + Improve to be more specfic to UAP, e.g. 1. take into account + COUNTRY_CODE -> region_code 2. check domain_info for value channels */ + ENTER(); + + /* + * Set start_chn to the Default. + * Used if 11h is disabled or the band + * does not require 11h support. + */ + start_chn = DEFAULT_AD_HOC_CHANNEL; + + /* + * Check that we are looking for a channel in the A Band + */ + if (uap_band_cfg & BAND_CONFIG_5GHZ) { + /* + * Set default to the A Band default. + * Used if random selection fails + * or if 11h is not enabled + */ + start_chn = DEFAULT_AD_HOC_CHANNEL_A; + + /* + * Check that 11h is enabled in the driver + */ + if (wlan_11h_is_enabled(priv)) { + /* + * Search the region_channel tables for a channel table + * that is marked for the A Band. + */ + for (region = 0; (region < MAX_REGION_CHANNEL_NUM); + region++) { + chn_tbl = &adapter->region_channel[region]; + + /* Check if table is valid and marked for A + Band */ + if (chn_tbl->valid + && chn_tbl->region == adapter->region_code + && chn_tbl->band & BAND_A) { + /* + * Set the start channel. Get a random + * number and use it to pick an entry + * in the table between 0 and the number + * of channels in the table (NumCFP). + */ + do { + rand_entry = + wlan_11h_get_random_num + (adapter) % + chn_tbl->num_cfp; + start_chn = + (t_u8)chn_tbl-> + pcfp[rand_entry]. + channel; + } while ((wlan_11h_is_channel_under_nop + (adapter, start_chn) || + ((adapter->state_rdh.stage == + RDH_GET_INFO_CHANNEL) && + wlan_11h_radar_detect_required + (priv, start_chn))) + && (++rand_tries < + MAX_RANDOM_CHANNEL_RETRIES)); + } + } + } + } + + PRINTM(MCMD_D, "11h: UAP Get Start Channel %d\n", start_chn); + LEAVE(); + return start_chn; +} +#endif /* UAP_SUPPORT */ + +#ifdef DEBUG_LEVEL1 +static const char *DFS_TS_REPR_STRINGS[] = { "", + "NOP_start", + "CAC_completed" +}; +#endif + +/** + * @brief Search for a dfs timestamp in the list with desired channel. + * + * Assumes there will only be one timestamp per channel in the list. + * + * @param pmadapter Pointer to mlan_adapter + * @param channel Channel number + * + * @return Pointer to timestamp if found, or MNULL + */ +static wlan_dfs_timestamp_t * +wlan_11h_find_dfs_timestamp(mlan_adapter *pmadapter, t_u8 channel) +{ + wlan_dfs_timestamp_t *pts = MNULL, *pts_found = MNULL; + + ENTER(); + pts = (wlan_dfs_timestamp_t *)util_peek_list(pmadapter->pmoal_handle, + &pmadapter->state_dfs. + dfs_ts_head, MNULL, MNULL); + + while (pts && + pts != + (wlan_dfs_timestamp_t *)&pmadapter->state_dfs.dfs_ts_head) { + PRINTM(MINFO, + "dfs_timestamp(@ %p) - chan=%d, repr=%d(%s)," + " time(sec.usec)=%lu.%06lu\n", pts, pts->channel, + pts->represents, DFS_TS_REPR_STRINGS[pts->represents], + pts->ts_sec, pts->ts_usec); + + if (pts->channel == channel) { + pts_found = pts; + break; + } + pts = pts->pnext; + } + + LEAVE(); + return pts_found; +} + +/** + * @brief Removes dfs timestamp from list. + * + * @param pmadapter Pointer to mlan_adapter + * @param pdfs_ts Pointer to dfs_timestamp to remove + */ +static t_void +wlan_11h_remove_dfs_timestamp(mlan_adapter *pmadapter, + wlan_dfs_timestamp_t *pdfs_ts) +{ + ENTER(); + /* dequeue and delete timestamp */ + util_unlink_list(pmadapter->pmoal_handle, + &pmadapter->state_dfs.dfs_ts_head, + (pmlan_linked_list)pdfs_ts, MNULL, MNULL); + pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pdfs_ts); + LEAVE(); +} + +/** + * @brief Add a dfs timestamp to the list + * + * Assumes there will only be one timestamp per channel in the list, + * and that timestamp modes (represents) are mutually exclusive. + * + * @param pmadapter Pointer to mlan_adapter + * @param repr Timestamp 'represents' value (see _dfs_timestamp_repr_e) + * @param channel Channel number + * + * @return Pointer to timestamp if found, or MNULL + */ +static mlan_status +wlan_11h_add_dfs_timestamp(mlan_adapter *pmadapter, t_u8 repr, t_u8 channel) +{ + wlan_dfs_timestamp_t *pdfs_ts = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + pdfs_ts = wlan_11h_find_dfs_timestamp(pmadapter, channel); + + if (!pdfs_ts) { + /* need to allocate new timestamp */ + ret = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle, + sizeof + (wlan_dfs_timestamp_t), + MLAN_MEM_DEF, + (t_u8 **)&pdfs_ts); + if ((ret != MLAN_STATUS_SUCCESS) || !pdfs_ts) { + PRINTM(MERROR, "%s(): Could not allocate dfs_ts\n", + __func__); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + memset(pmadapter, (t_u8 *)pdfs_ts, 0, + sizeof(wlan_dfs_timestamp_t)); + + util_enqueue_list_tail(pmadapter->pmoal_handle, + &pmadapter->state_dfs.dfs_ts_head, + (pmlan_linked_list)pdfs_ts, MNULL, + MNULL); + pdfs_ts->channel = channel; + } + /* (else, use existing timestamp for channel; see assumptions above) */ + + /* update params */ + pmadapter->callbacks.moal_get_system_time(pmadapter->pmoal_handle, + &pdfs_ts->ts_sec, + &pdfs_ts->ts_usec); + pdfs_ts->represents = repr; + + PRINTM(MCMD_D, "11h: add/update dfs_timestamp - chan=%d, repr=%d(%s)," + " time(sec.usec)=%lu.%06lu\n", pdfs_ts->channel, + pdfs_ts->represents, DFS_TS_REPR_STRINGS[pdfs_ts->represents], + pdfs_ts->ts_sec, pdfs_ts->ts_usec); + + LEAVE(); + return ret; +} + +/******************************************************** + Global functions +********************************************************/ + +/** + * @brief Return whether the device has activated master radar detection. + * + * @param priv Private driver information structure + * + * @return + * - MTRUE if master radar detection is enabled in firmware + * - MFALSE otherwise + */ +t_bool +wlan_11h_is_master_radar_det_active(mlan_private *priv) +{ + ENTER(); + LEAVE(); + return priv->adapter->state_11h.is_master_radar_det_active; +} + +/** + * @brief Configure master radar detection. + * Call wlan_11h_check_update_radar_det_state() afterwards + * to push this to firmware. + * + * @param priv Private driver information structure + * @param enable Whether to enable or disable master radar detection + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + * + * @sa wlan_11h_check_update_radar_det_state + */ +mlan_status +wlan_11h_config_master_radar_det(mlan_private *priv, t_bool enable) +{ + mlan_status ret = MLAN_STATUS_FAILURE; + + ENTER(); + if (wlan_11h_is_dfs_master(priv) && + priv->adapter->init_para.dfs_master_radar_det_en) { + priv->adapter->state_11h.master_radar_det_enable_pending = + enable; + ret = MLAN_STATUS_SUCCESS; + } + + LEAVE(); + return ret; +} + +/** + * @brief Configure slave radar detection. + * Call wlan_11h_check_update_radar_det_state() afterwards + * to push this to firmware. + * + * @param priv Private driver information structure + * @param enable Whether to enable or disable slave radar detection + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + * + * @sa wlan_11h_check_update_radar_det_state + */ +mlan_status +wlan_11h_config_slave_radar_det(mlan_private *priv, t_bool enable) +{ + mlan_status ret = MLAN_STATUS_FAILURE; + + ENTER(); + if (wlan_11h_is_dfs_slave(priv) && + priv->adapter->init_para.dfs_slave_radar_det_en) { + priv->adapter->state_11h.slave_radar_det_enable_pending = + enable; + ret = MLAN_STATUS_SUCCESS; + } + LEAVE(); + return ret; +} + +/** + * @brief Checks all interfaces and determines if radar_detect flag states + * have/should be changed. If so, sends SNMP_MIB 11H command to FW. + * Call this function on any interface enable/disable/channel change. + * + * @param pmpriv Pointer to mlan_private structure + * + * @return MLAN_STATUS_SUCCESS (update or not) + * or MLAN_STATUS_FAILURE (cmd failure) + * + * @sa wlan_11h_check_radar_det_state + */ +mlan_status +wlan_11h_check_update_radar_det_state(mlan_private *pmpriv) +{ + t_u32 new_radar_det_state = 0; + t_u32 mib_11h = 0; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (wlan_11h_check_radar_det_state(pmpriv->adapter, + &new_radar_det_state)) { + PRINTM(MCMD_D, "%s: radar_det_state being updated.\n", + __func__); + + mib_11h |= new_radar_det_state; + /* keep priv's existing 11h state */ + if (pmpriv->intf_state_11h.is_11h_active) + mib_11h |= ENABLE_11H_MASK; + + /* Send cmd to FW to enable/disable 11h function in firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_SNMP_MIB, + HostCmd_ACT_GEN_SET, + Dot11H_i, MNULL, &mib_11h); + if (ret) + ret = MLAN_STATUS_FAILURE; + } + + /* updated state sent OR no change, thus no longer pending */ + pmpriv->adapter->state_11h.master_radar_det_enable_pending = MFALSE; + pmpriv->adapter->state_11h.slave_radar_det_enable_pending = MFALSE; + + LEAVE(); + return ret; +} + +/** + * @brief Query 11h firmware enabled state. + * + * Return whether the firmware currently has 11h extensions enabled + * + * @param priv Private driver information structure + * + * @return + * - MTRUE if 11h has been activated in the firmware + * - MFALSE otherwise + * + * @sa wlan_11h_activate + */ +t_bool +wlan_11h_is_active(mlan_private *priv) +{ + ENTER(); + LEAVE(); + return priv->intf_state_11h.is_11h_active; +} + +/** + * @brief Enable the transmit interface and record the state. + * + * @param priv Private driver information structure + * + * @return N/A + */ +t_void +wlan_11h_tx_enable(mlan_private *priv) +{ + ENTER(); + if (priv->intf_state_11h.tx_disabled) { + wlan_recv_event(priv, MLAN_EVENT_ID_FW_START_TX, MNULL); + priv->intf_state_11h.tx_disabled = MFALSE; + } + LEAVE(); +} + +/** + * @brief Disable the transmit interface and record the state. + * + * @param priv Private driver information structure + * + * @return N/A + */ +t_void +wlan_11h_tx_disable(mlan_private *priv) +{ + ENTER(); + if (!priv->intf_state_11h.tx_disabled) { + priv->intf_state_11h.tx_disabled = MTRUE; + wlan_recv_event(priv, MLAN_EVENT_ID_FW_STOP_TX, MNULL); + } + LEAVE(); +} + +/** + * @brief Enable or Disable the 11h extensions in the firmware + * + * @param priv Private driver information structure + * @param pioctl_buf A pointer to MLAN IOCTL Request buffer + * @param flag Enable 11h if MTRUE, disable otherwise + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11h_activate(mlan_private *priv, t_void *pioctl_buf, t_bool flag) +{ + t_u32 enable = flag & ENABLE_11H_MASK; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + /* add bits for master/slave radar detect into enable. */ + enable |= wlan_11h_get_current_radar_detect_flags(priv->adapter); + + /* + * Send cmd to FW to enable/disable 11h function in firmware + */ + ret = wlan_prepare_cmd(priv, + HostCmd_CMD_802_11_SNMP_MIB, + HostCmd_ACT_GEN_SET, + Dot11H_i, (t_void *)pioctl_buf, &enable); + if (ret) + ret = MLAN_STATUS_FAILURE; + else + /* Set boolean flag in driver 11h state */ + priv->intf_state_11h.is_11h_active = flag; + + PRINTM(MINFO, "11h: %s\n", flag ? "Activate" : "Deactivate"); + + LEAVE(); + return ret; +} + +/** + * @brief Initialize the 11h parameters and enable 11h when starting an IBSS + * + * @param adapter mlan_adapter structure + * + * @return N/A + */ +t_void +wlan_11h_init(mlan_adapter *adapter) +{ + wlan_11h_device_state_t *pstate_11h = &adapter->state_11h; + IEEEtypes_Quiet_t *pquiet = &adapter->state_11h.quiet_ie; + wlan_dfs_device_state_t *pstate_dfs = &adapter->state_dfs; + wlan_radar_det_hndlg_state_t *pstate_rdh = &adapter->state_rdh; +#ifdef DFS_TESTING_SUPPORT + wlan_dfs_testing_settings_t *pdfs_test = &adapter->dfs_test_params; +#endif + + ENTER(); + + /* Initialize 11H struct */ + pstate_11h->usr_def_power_constraint = WLAN_11H_TPC_POWERCONSTRAINT; + pstate_11h->min_tx_power_capability = WLAN_11H_TPC_POWERCAPABILITY_MIN; + pstate_11h->max_tx_power_capability = WLAN_11H_TPC_POWERCAPABILITY_MAX; + + pstate_11h->recvd_chanswann_event = MFALSE; + pstate_11h->master_radar_det_enable_pending = MFALSE; + pstate_11h->slave_radar_det_enable_pending = MFALSE; + pstate_11h->is_master_radar_det_active = MFALSE; + pstate_11h->is_slave_radar_det_active = MFALSE; + + /* Initialize quiet_ie */ + memset(adapter, pquiet, 0, sizeof(IEEEtypes_Quiet_t)); + pquiet->element_id = QUIET; + pquiet->len = + (sizeof(pquiet->quiet_count) + sizeof(pquiet->quiet_period) + + sizeof(pquiet->quiet_duration) + + sizeof(pquiet->quiet_offset)); + + /* Initialize DFS struct */ + pstate_dfs->dfs_check_pending = MFALSE; + pstate_dfs->dfs_radar_found = MFALSE; + pstate_dfs->dfs_check_channel = 0; + pstate_dfs->dfs_report_time_sec = 0; + util_init_list((pmlan_linked_list)&pstate_dfs->dfs_ts_head); + + /* Initialize RDH struct */ + pstate_rdh->stage = RDH_OFF; + pstate_rdh->priv_list_count = 0; + pstate_rdh->priv_curr_idx = 0; + pstate_rdh->curr_channel = 0; + pstate_rdh->new_channel = 0; + pstate_rdh->uap_band_cfg = 0; + pstate_rdh->max_bcn_dtim_ms = 0; + memset(adapter, pstate_rdh->priv_list, 0, + sizeof(pstate_rdh->priv_list)); + +#ifdef DFS_TESTING_SUPPORT + /* Initialize DFS testing struct */ + pdfs_test->user_cac_period_msec = 0; + pdfs_test->user_nop_period_sec = 0; + pdfs_test->no_channel_change_on_radar = MFALSE; + pdfs_test->fixed_new_channel_on_radar = 0; +#endif + + LEAVE(); +} + +/** + * @brief Cleanup for the 11h parameters that allocated memory, etc. + * + * @param adapter mlan_adapter structure + * + * @return N/A + */ +t_void +wlan_11h_cleanup(mlan_adapter *adapter) +{ + wlan_dfs_device_state_t *pstate_dfs = &adapter->state_dfs; + wlan_dfs_timestamp_t *pdfs_ts; + + ENTER(); + + /* cleanup dfs_timestamp list */ + pdfs_ts = (wlan_dfs_timestamp_t *)util_peek_list(adapter->pmoal_handle, + &pstate_dfs-> + dfs_ts_head, MNULL, + MNULL); + while (pdfs_ts) { + util_unlink_list(adapter->pmoal_handle, + &pstate_dfs->dfs_ts_head, + (pmlan_linked_list)pdfs_ts, MNULL, MNULL); + adapter->callbacks.moal_mfree(adapter->pmoal_handle, + (t_u8 *)pdfs_ts); + + pdfs_ts = + (wlan_dfs_timestamp_t *)util_peek_list(adapter-> + pmoal_handle, + &pstate_dfs-> + dfs_ts_head, + MNULL, MNULL); + } + + LEAVE(); +} + +/** + * @brief Initialize the 11h parameters and enable 11h when starting an IBSS + * + * @param pmpriv Pointer to mlan_private structure + * + * @return N/A + */ +t_void +wlan_11h_priv_init(mlan_private *pmpriv) +{ + wlan_11h_interface_state_t *pistate_11h = &pmpriv->intf_state_11h; + + ENTER(); + + pistate_11h->is_11h_enabled = MTRUE; + pistate_11h->is_11h_active = MFALSE; + pistate_11h->adhoc_auto_sel_chan = MTRUE; + pistate_11h->tx_disabled = MFALSE; + pistate_11h->dfs_slave_csa_chan = 0; + pistate_11h->dfs_slave_csa_expire_at_sec = 0; + + LEAVE(); +} + +/** + * @brief Retrieve a randomly selected starting channel if needed for 11h + * + * If 11h is enabled and an A-Band channel start band preference + * configured in the driver, the start channel must be random in order + * to meet with + * + * @param priv Private driver information structure + * + * @return Starting channel + */ +t_u8 +wlan_11h_get_adhoc_start_channel(mlan_private *priv) +{ + t_u8 start_chn; + mlan_adapter *adapter = priv->adapter; + t_u32 region; + t_u32 rand_entry; + region_chan_t *chn_tbl; + t_u8 rand_tries = 0; + + ENTER(); + + /* + * Set start_chn to the Default. Used if 11h is disabled or the band + * does not require 11h support. + */ + start_chn = DEFAULT_AD_HOC_CHANNEL; + + /* + * Check that we are looking for a channel in the A Band + */ + if ((adapter->adhoc_start_band & BAND_A) + || (adapter->adhoc_start_band & BAND_AN) + ) { + /* + * Set default to the A Band default. + * Used if random selection fails + * or if 11h is not enabled + */ + start_chn = DEFAULT_AD_HOC_CHANNEL_A; + + /* + * Check that 11h is enabled in the driver + */ + if (wlan_11h_is_enabled(priv)) { + /* + * Search the region_channel tables for a channel table + * that is marked for the A Band. + */ + for (region = 0; (region < MAX_REGION_CHANNEL_NUM); + region++) { + chn_tbl = &adapter->region_channel[region]; + + /* Check if table is valid and marked for A + Band */ + if (chn_tbl->valid + && chn_tbl->region == adapter->region_code + && chn_tbl->band & BAND_A) { + /* + * Set the start channel. Get a random + * number and use it to pick an entry + * in the table between 0 and the number + * of channels in the table (NumCFP). + */ + do { + rand_entry = + wlan_11h_get_random_num + (adapter) % + chn_tbl->num_cfp; + start_chn = + (t_u8)chn_tbl-> + pcfp[rand_entry]. + channel; + } while ((wlan_11h_is_channel_under_nop + (adapter, start_chn) || + ((adapter->state_rdh.stage == + RDH_GET_INFO_CHANNEL) && + wlan_11h_radar_detect_required + (priv, start_chn))) + && (++rand_tries < + MAX_RANDOM_CHANNEL_RETRIES)); + } + } + } + } + + PRINTM(MINFO, "11h: %s: AdHoc Channel set to %u\n", + wlan_11h_is_enabled(priv) ? "Enabled" : "Disabled", start_chn); + + LEAVE(); + return start_chn; +} + +/** + * @brief Retrieve channel closed for operation by Channel Switch Announcement + * + * After receiving CSA, we must not transmit in any form on the original + * channel for a certain duration. This checks the time, and returns + * the channel if valid. + * + * @param priv Private driver information structure + * + * @return Closed channel, else 0 + */ +t_u8 +wlan_11h_get_csa_closed_channel(mlan_private *priv) +{ + t_u32 sec, usec; + + ENTER(); + + if (!priv->intf_state_11h.dfs_slave_csa_chan) { + LEAVE(); + return 0; + } + + /* have csa channel, check if expired or not */ + priv->adapter->callbacks.moal_get_system_time(priv->adapter-> + pmoal_handle, &sec, + &usec); + if (sec > priv->intf_state_11h.dfs_slave_csa_expire_at_sec) { + /* expired: remove channel from blacklist table, and clear vars + */ + wlan_set_chan_blacklist(priv, BAND_A, + priv->intf_state_11h.dfs_slave_csa_chan, + MFALSE); + priv->intf_state_11h.dfs_slave_csa_chan = 0; + priv->intf_state_11h.dfs_slave_csa_expire_at_sec = 0; + } + + LEAVE(); + return priv->intf_state_11h.dfs_slave_csa_chan; +} + +/** + * @brief Check if the current region's regulations require the input channel + * to be scanned for radar. + * + * Based on statically defined requirements for sub-bands per regulatory + * agency requirements. + * + * Used in adhoc start to determine if channel availability check is required + * + * @param priv Private driver information structure + * @param channel Channel to determine radar detection requirements + * + * @return + * - MTRUE if radar detection is required + * - MFALSE otherwise + */ +/** @sa wlan_11h_issue_radar_detect + */ +t_bool +wlan_11h_radar_detect_required(mlan_private *priv, t_u8 channel) +{ + t_bool required = MFALSE; + + ENTER(); + + /* + * No checks for 11h or measurement code being enabled is placed here + * since regulatory requirements exist whether we support them or not. + */ + + required = wlan_get_cfp_radar_detect(priv, channel); + + if (!priv->adapter->region_code) + PRINTM(MINFO, "11h: Radar detection in CFP code[BG:%#x, A:%#x] " + "is %srequired for channel %d\n", + priv->adapter->cfp_code_bg, priv->adapter->cfp_code_a, + (required ? "" : "not "), channel); + else + PRINTM(MINFO, "11h: Radar detection in region %#02x " + "is %srequired for channel %d\n", + priv->adapter->region_code, (required ? "" : "not "), + channel); + + if (required == MTRUE && priv->media_connected == MTRUE + && priv->curr_bss_params.bss_descriptor.channel == channel) { + required = MFALSE; + + PRINTM(MINFO, "11h: Radar detection not required. " + "Already operating on the channel\n"); + } + + LEAVE(); + return required; +} + +/** + * @brief Perform a radar measurement if required on given channel + * + * Check to see if the provided channel requires a channel availability + * check (60 second radar detection measurement). If required, perform + * measurement, stalling calling thread until the measurement completes + * and then report result. + * + * Used when starting an adhoc or AP network. + * + * @param priv Private driver information structure + * @param pioctl_req Pointer to IOCTL request buffer + * @param channel Channel on which to perform radar measurement + * @param chan_width Width of channel on which to perform radar measurement + * + * @return + * - MTRUE if radar measurement request was successfully issued + * - MFALSE if radar detection is not required + * - < 0 for error during radar detection (if performed) + * + * @sa wlan_11h_radar_detect_required + */ +t_s32 +wlan_11h_issue_radar_detect(mlan_private *priv, + pmlan_ioctl_req pioctl_req, + t_u8 channel, t_u8 chan_width) +{ + t_s32 ret; + HostCmd_DS_CHAN_RPT_REQ chan_rpt_req; + + ENTER(); + + ret = wlan_11h_radar_detect_required(priv, channel); + if (ret) { + /* Prepare and issue CMD_CHAN_RPT_REQ. */ + memset(priv->adapter, &chan_rpt_req, 0x00, + sizeof(chan_rpt_req)); + + chan_rpt_req.chan_desc.startFreq = START_FREQ_11A_BAND; + chan_rpt_req.chan_desc.chanWidth = chan_width; + chan_rpt_req.chan_desc.chanNum = channel; + chan_rpt_req.millisec_dwell_time = + WLAN_11H_CHANNEL_AVAIL_CHECK_DURATION; +#ifdef DFS_TESTING_SUPPORT + if (priv->adapter->dfs_test_params.user_cac_period_msec) { + PRINTM(MCMD_D, + "dfs_testing - user CAC period=%d (msec)\n", + priv->adapter->dfs_test_params. + user_cac_period_msec); + chan_rpt_req.millisec_dwell_time = + priv->adapter->dfs_test_params. + user_cac_period_msec; + } +#endif + + PRINTM(MMSG, "11h: issuing DFS Radar check for channel=%d." + " Please wait for response...\n", channel); + + ret = wlan_prepare_cmd(priv, HostCmd_CMD_CHAN_REPORT_REQUEST, + HostCmd_ACT_GEN_SET, 0, + (t_void *)pioctl_req, + (t_void *)&chan_rpt_req); + } + + LEAVE(); + return ret; +} + +/** + * @brief Checks if a radar measurement was performed on channel, + * and if so, whether radar was detected on it. + * + * Used when starting an adhoc network. + * + * @param priv Private driver information structure + * @param chan Channel to check upon + * + * @return + * - MLAN_STATUS_SUCCESS if no radar on channel + * - MLAN_STATUS_FAILURE if radar was found on channel + * - (TBD??) MLAN_STATUS_PENDING if radar report NEEDS TO BE REISSUED + * + * @sa wlan_11h_issue_radar_detect + * @sa wlan_11h_process_start + */ +mlan_status +wlan_11h_check_chan_report(mlan_private *priv, t_u8 chan) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + wlan_dfs_device_state_t *pstate_dfs = &priv->adapter->state_dfs; + t_u32 sec, usec; + + ENTER(); + + /* check report we hold is valid or not */ + priv->adapter->callbacks.moal_get_system_time(priv->adapter-> + pmoal_handle, &sec, + &usec); + + PRINTM(MINFO, "11h: %s()\n", __func__); + PRINTM(MINFO, "- sec_now=%d, sec_report=%d.\n", + sec, pstate_dfs->dfs_report_time_sec); + PRINTM(MINFO, "- rpt_channel=%d, rpt_radar=%d.\n", + pstate_dfs->dfs_check_channel, pstate_dfs->dfs_radar_found); + + if ((!pstate_dfs->dfs_check_pending) && + (chan == pstate_dfs->dfs_check_channel) && + ((sec - pstate_dfs->dfs_report_time_sec) < + MAX_DFS_REPORT_USABLE_AGE_SEC)) { + /* valid and not out-dated, check if radar */ + if (pstate_dfs->dfs_radar_found) { + PRINTM(MMSG, "Radar was detected on channel %d.\n", + chan); + ret = MLAN_STATUS_FAILURE; + } + } else { + /* TODO: reissue report request if not pending. BUT HOW to + make the code wait for it??? For now, just fail since we + don't have the info. */ + ret = MLAN_STATUS_PENDING; + } + + LEAVE(); + return ret; +} + +/** + * @brief Process an TLV buffer for a pending BSS Adhoc start command. + * + * Activate 11h functionality in the firmware if driver has is enabled + * for 11h (configured by the application via IOCTL). + * + * @param priv Private driver information structure + * @param ppbuffer Output parameter: Pointer to the TLV output buffer, + * modified on return to point after the appended 11h TLVs + * @param pcap_info Pointer to the capability info for the BSS to join + * @param channel Channel on which we are starting the IBSS + * @param p11h_bss_info Input/Output parameter: Pointer to the 11h BSS + * information for this network that we are establishing. + * 11h sensed flag set on output if warranted. + * + * @return + * - MLAN_STATUS_SUCCESS if 11h is disabled + * - Integer number of bytes appended to the TLV output buffer (ppbuffer) + * - < 0 for error (e.g. radar detected on channel) + */ +t_s32 +wlan_11h_process_start(mlan_private *priv, + t_u8 **ppbuffer, + IEEEtypes_CapInfo_t *pcap_info, + t_u32 channel, wlan_11h_bss_info_t *p11h_bss_info) +{ + mlan_adapter *adapter = priv->adapter; + t_s32 ret = MLAN_STATUS_SUCCESS; + t_bool is_dfs_chan = MFALSE; + + ENTER(); + if (wlan_11h_is_enabled(priv) + && ((adapter->adhoc_start_band & BAND_A) + || (adapter->adhoc_start_band & BAND_AN) + ) + ) { + if (!wlan_11d_is_enabled(priv)) { + /* No use having 11h enabled without 11d enabled */ + wlan_11d_enable(priv, MNULL, ENABLE_11D); +#ifdef STA_SUPPORT + wlan_11d_create_dnld_countryinfo(priv, + adapter-> + adhoc_start_band); +#endif + } + + /* + * Activate 11h functions in firmware, + * turns on capability bit + */ + wlan_11h_activate(priv, MNULL, MTRUE); + pcap_info->spectrum_mgmt = MTRUE; + + /* If using a DFS channel, enable radar detection. */ + is_dfs_chan = wlan_11h_radar_detect_required(priv, channel); + if (is_dfs_chan) { + if (!wlan_11h_is_master_radar_det_active(priv)) + wlan_11h_config_master_radar_det(priv, MTRUE); + } + wlan_11h_check_update_radar_det_state(priv); + + /* Set flag indicating this BSS we are starting is using 11h */ + p11h_bss_info->sensed_11h = MTRUE; + + if (is_dfs_chan) { + /* check if this channel is under NOP */ + if (wlan_11h_is_channel_under_nop(adapter, channel)) + ret = MLAN_STATUS_FAILURE; + /* check last channel report, if this channel is free + of radar */ + if (ret == MLAN_STATUS_SUCCESS) + ret = wlan_11h_check_chan_report(priv, channel); + } + if (ret == MLAN_STATUS_SUCCESS) + ret = wlan_11h_process_adhoc(priv, ppbuffer, channel, + MNULL); + else + ret = MLAN_STATUS_FAILURE; + } else { + /* Deactivate 11h functions in the firmware */ + wlan_11h_activate(priv, MNULL, MFALSE); + pcap_info->spectrum_mgmt = MFALSE; + wlan_11h_check_update_radar_det_state(priv); + } + LEAVE(); + return ret; +} + +/** + * @brief Process an TLV buffer for a pending BSS Join command for + * both adhoc and infra networks + * + * The TLV command processing for a BSS join for either adhoc or + * infrastructure network is performed with this function. The + * capability bits are inspected for the IBSS flag and the appropriate + * local routines are called to setup the necessary TLVs. + * + * Activate 11h functionality in the firmware if the spectrum management + * capability bit is found in the network information for the BSS we are + * joining. + * + * @param priv Private driver information structure + * @param ppbuffer Output parameter: Pointer to the TLV output buffer, + * modified on return to point after the appended 11h TLVs + * @param pcap_info Pointer to the capability info for the BSS to join + * @param band Band on which we are joining the BSS + * @param channel Channel on which we are joining the BSS + * @param p11h_bss_info Pointer to the 11h BSS information for this + * network that was parsed out of the scan response. + * + * @return Integer number of bytes appended to the TLV output + * buffer (ppbuffer), MLAN_STATUS_FAILURE (-1), + * or MLAN_STATUS_SUCCESS (0) + */ +t_s32 +wlan_11h_process_join(mlan_private *priv, + t_u8 **ppbuffer, + IEEEtypes_CapInfo_t *pcap_info, + t_u8 band, + t_u32 channel, wlan_11h_bss_info_t *p11h_bss_info) +{ + t_s32 ret = 0; + + ENTER(); + + if (priv->media_connected == MTRUE) { + if (wlan_11h_is_active(priv) == p11h_bss_info->sensed_11h) { + /* + * Assume DFS parameters are the same for roaming as long as + * the current & next APs have the same spectrum mgmt capability + * bit setting + */ + ret = MLAN_STATUS_SUCCESS; + + } else { + /* No support for roaming between DFS/non-DFS yet */ + ret = MLAN_STATUS_FAILURE; + } + + LEAVE(); + return ret; + } + + if (p11h_bss_info->sensed_11h) { + if (!wlan_11d_is_enabled(priv)) { + /* No use having 11h enabled without 11d enabled */ + wlan_11d_enable(priv, MNULL, ENABLE_11D); +#ifdef STA_SUPPORT + wlan_11d_parse_dnld_countryinfo(priv, + priv-> + pattempted_bss_desc); +#endif + } + /* + * Activate 11h functions in firmware, + * turns on capability bit + */ + wlan_11h_activate(priv, MNULL, MTRUE); + pcap_info->spectrum_mgmt = MTRUE; + + /* If using a DFS channel, enable radar detection. */ + if ((band & BAND_A) && + wlan_11h_radar_detect_required(priv, channel)) { + if (!wlan_11h_is_slave_radar_det_active(priv)) + wlan_11h_config_slave_radar_det(priv, MTRUE); + } + wlan_11h_check_update_radar_det_state(priv); + + if (pcap_info->ibss) { + PRINTM(MINFO, "11h: Adhoc join: Sensed\n"); + ret = wlan_11h_process_adhoc(priv, ppbuffer, channel, + p11h_bss_info); + } else { + PRINTM(MINFO, "11h: Infra join: Sensed\n"); + ret = wlan_11h_process_infra_join(priv, ppbuffer, band, + channel, + p11h_bss_info); + } + } else { + /* Deactivate 11h functions in the firmware */ + wlan_11h_activate(priv, MNULL, MFALSE); + pcap_info->spectrum_mgmt = MFALSE; + wlan_11h_check_update_radar_det_state(priv); + } + + LEAVE(); + return ret; +} + +/** + * + * @brief Prepare the HostCmd_DS_Command structure for an 11h command. + * + * Use the Command field to determine if the command being set up is for + * 11h and call one of the local command handlers accordingly for: + * + * - HostCmd_CMD_802_11_TPC_ADAPT_REQ + * - HostCmd_CMD_802_11_TPC_INFO + * - HostCmd_CMD_802_11_CHAN_SW_ANN + */ +/** - HostCmd_CMD_CHAN_REPORT_REQUEST + */ +/** + * @param priv Private driver information structure + * @param pcmd_ptr Output parameter: Pointer to the command being prepared + * for the firmware + * @param pinfo_buf Void buffer pass through with data necessary for a + * specific command type + */ +/** @return MLAN_STATUS_SUCCESS, MLAN_STATUS_FAILURE + * or MLAN_STATUS_PENDING + */ +/** @sa wlan_11h_cmd_tpc_request + * @sa wlan_11h_cmd_tpc_info + * @sa wlan_11h_cmd_chan_sw_ann + */ +/** @sa wlan_11h_cmd_chan_report_req + */ +mlan_status +wlan_11h_cmd_process(mlan_private *priv, + HostCmd_DS_COMMAND *pcmd_ptr, const t_void *pinfo_buf) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + switch (pcmd_ptr->command) { + case HostCmd_CMD_802_11_TPC_ADAPT_REQ: + ret = wlan_11h_cmd_tpc_request(priv, pcmd_ptr, pinfo_buf); + break; + case HostCmd_CMD_802_11_TPC_INFO: + ret = wlan_11h_cmd_tpc_info(priv, pcmd_ptr, pinfo_buf); + break; + case HostCmd_CMD_802_11_CHAN_SW_ANN: + ret = wlan_11h_cmd_chan_sw_ann(priv, pcmd_ptr, pinfo_buf); + break; + case HostCmd_CMD_CHAN_REPORT_REQUEST: + ret = wlan_11h_cmd_chan_rpt_req(priv, pcmd_ptr, pinfo_buf); + break; + default: + ret = MLAN_STATUS_FAILURE; + } + + pcmd_ptr->command = wlan_cpu_to_le16(pcmd_ptr->command); + pcmd_ptr->size = wlan_cpu_to_le16(pcmd_ptr->size); + + LEAVE(); + return ret; +} + +/** + * @brief Handle the command response from the firmware if from an 11h command + * + * Use the Command field to determine if the command response being + * is for 11h. Call the local command response handler accordingly for: + * + * - HostCmd_CMD_802_11_TPC_ADAPT_REQ + * - HostCmd_CMD_802_11_TPC_INFO + * - HostCmd_CMD_802_11_CHAN_SW_ANN + */ +/** - HostCmd_CMD_CHAN_REPORT_REQUEST + */ +/** + * @param priv Private driver information structure + * @param resp HostCmd_DS_COMMAND struct returned from the firmware + * command + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11h_cmdresp_process(mlan_private *priv, const HostCmd_DS_COMMAND *resp) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + switch (resp->command) { + case HostCmd_CMD_802_11_TPC_ADAPT_REQ: + HEXDUMP("11h: TPC REQUEST Rsp:", (t_u8 *)resp, + (t_u32)resp->size); + memcpy(priv->adapter, priv->adapter->curr_cmd->pdata_buf, + &resp->params.tpc_req, + sizeof(HostCmd_DS_802_11_TPC_ADAPT_REQ)); + break; + + case HostCmd_CMD_802_11_TPC_INFO: + HEXDUMP("11h: TPC INFO Rsp Data:", (t_u8 *)resp, + (t_u32)resp->size); + break; + + case HostCmd_CMD_802_11_CHAN_SW_ANN: + PRINTM(MINFO, "11h: Ret ChSwAnn: Sz=%u, Seq=%u, Ret=%u\n", + resp->size, resp->seq_num, resp->result); + break; + + case HostCmd_CMD_CHAN_REPORT_REQUEST: + PRINTM(MINFO, + "11h: Ret ChanRptReq. Set dfs_check_pending and wait" + " for EVENT_CHANNEL_REPORT.\n"); + priv->adapter->state_dfs.dfs_check_pending = MTRUE; + break; + + default: + ret = MLAN_STATUS_FAILURE; + } + + LEAVE(); + return ret; +} + +/** + * @brief Process an element from a scan response, copy relevant info for 11h + * + * @param pmadapter Pointer to mlan_adapter + * @param p11h_bss_info Output parameter: Pointer to the 11h BSS information + * for the network that is being processed + * @param pelement Pointer to the current IE we are inspecting for 11h + * relevance + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11h_process_bss_elem(mlan_adapter *pmadapter, + wlan_11h_bss_info_t *p11h_bss_info, + const t_u8 *pelement) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u8 element_len = *((t_u8 *)pelement + 1); + + ENTER(); + switch (*pelement) { + case POWER_CONSTRAINT: + PRINTM(MINFO, "11h: Power Constraint IE Found\n"); + p11h_bss_info->sensed_11h = MTRUE; + memcpy(pmadapter, &p11h_bss_info->power_constraint, pelement, + MIN((element_len + sizeof(IEEEtypes_Header_t)), + sizeof(IEEEtypes_PowerConstraint_t))); + p11h_bss_info->power_constraint.len = + MIN(element_len, (sizeof(IEEEtypes_PowerConstraint_t) + - sizeof(IEEEtypes_Header_t))); + break; + + case POWER_CAPABILITY: + PRINTM(MINFO, "11h: Power Capability IE Found\n"); + p11h_bss_info->sensed_11h = MTRUE; + memcpy(pmadapter, &p11h_bss_info->power_capability, pelement, + MIN((element_len + sizeof(IEEEtypes_Header_t)), + sizeof(IEEEtypes_PowerCapability_t))); + p11h_bss_info->power_capability.len = + MIN(element_len, (sizeof(IEEEtypes_PowerCapability_t) + - sizeof(IEEEtypes_Header_t))); + break; + + case TPC_REPORT: + PRINTM(MINFO, "11h: Tpc Report IE Found\n"); + p11h_bss_info->sensed_11h = MTRUE; + memcpy(pmadapter, &p11h_bss_info->tpc_report, pelement, + MIN((element_len + sizeof(IEEEtypes_Header_t)), + sizeof(IEEEtypes_TPCReport_t))); + p11h_bss_info->tpc_report.len = + MIN(element_len, (sizeof(IEEEtypes_TPCReport_t) + - sizeof(IEEEtypes_Header_t))); + break; + + case CHANNEL_SWITCH_ANN: + PRINTM(MINFO, "11h: Channel Switch Ann IE Found\n"); + p11h_bss_info->sensed_11h = MTRUE; + memcpy(pmadapter, &p11h_bss_info->chan_switch_ann, pelement, + MIN((element_len + sizeof(IEEEtypes_Header_t)), + sizeof(IEEEtypes_ChanSwitchAnn_t))); + p11h_bss_info->chan_switch_ann.len = + MIN(element_len, (sizeof(IEEEtypes_ChanSwitchAnn_t) + - sizeof(IEEEtypes_Header_t))); + break; + + case QUIET: + PRINTM(MINFO, "11h: Quiet IE Found\n"); + p11h_bss_info->sensed_11h = MTRUE; + memcpy(pmadapter, &p11h_bss_info->quiet, pelement, + MIN((element_len + sizeof(IEEEtypes_Header_t)), + sizeof(IEEEtypes_Quiet_t))); + p11h_bss_info->quiet.len = + MIN(element_len, (sizeof(IEEEtypes_Quiet_t) + - sizeof(IEEEtypes_Header_t))); + break; + + case IBSS_DFS: + PRINTM(MINFO, "11h: Ibss Dfs IE Found\n"); + p11h_bss_info->sensed_11h = MTRUE; + memcpy(pmadapter, &p11h_bss_info->ibss_dfs, pelement, + MIN((element_len + sizeof(IEEEtypes_Header_t)), + sizeof(IEEEtypes_IBSS_DFS_t))); + p11h_bss_info->ibss_dfs.len = + MIN(element_len, (sizeof(IEEEtypes_IBSS_DFS_t) + - sizeof(IEEEtypes_Header_t))); + break; + + case SUPPORTED_CHANNELS: + case TPC_REQUEST: + /* + * These elements are not in beacons/probe responses. + * Included here to cover set of enumerated 11h elements. + */ + break; + + default: + ret = MLAN_STATUS_FAILURE; + } + + LEAVE(); + return ret; +} + +/** + * @brief Driver handling for CHANNEL_SWITCH_ANN event + * + * @param priv Pointer to mlan_private + * + * @return MLAN_STATUS_SUCCESS, MLAN_STATUS_FAILURE or MLAN_STATUS_PENDING + */ +mlan_status +wlan_11h_handle_event_chanswann(mlan_private *priv) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u32 sec, usec; + + ENTER(); + priv->adapter->state_11h.recvd_chanswann_event = MTRUE; + + /* unlikely: clean up previous csa if still on-going */ + if (priv->intf_state_11h.dfs_slave_csa_chan) { + wlan_set_chan_blacklist(priv, BAND_A, + priv->intf_state_11h.dfs_slave_csa_chan, + MFALSE); + } + + /* record channel and time of occurence */ + priv->intf_state_11h.dfs_slave_csa_chan = + priv->curr_bss_params.bss_descriptor.channel; + priv->adapter->callbacks.moal_get_system_time(priv->adapter-> + pmoal_handle, &sec, + &usec); + priv->intf_state_11h.dfs_slave_csa_expire_at_sec = + sec + DFS_CHAN_MOVE_TIME; + +#ifdef STA_SUPPORT + /* do directed deauth. recvd_chanswann_event flag will cause different + reason code */ + PRINTM(MINFO, "11h: handle_event_chanswann() - sending deauth\n"); + ret = wlan_disconnect(priv, MNULL, + &priv->curr_bss_params.bss_descriptor. + mac_address); + + /* clear region table so next scan will be all passive */ + PRINTM(MINFO, "11h: handle_event_chanswann() - clear region table\n"); + wlan_11d_clear_parsedtable(priv); + + /* add channel to blacklist table */ + PRINTM(MINFO, + "11h: handle_event_chanswann() - scan blacklist csa channel\n"); + wlan_set_chan_blacklist(priv, BAND_A, + priv->intf_state_11h.dfs_slave_csa_chan, MTRUE); +#endif + + priv->adapter->state_11h.recvd_chanswann_event = MFALSE; + LEAVE(); + return ret; +} + +#ifdef DFS_TESTING_SUPPORT +/** + * @brief 802.11h DFS Testing configuration + * + * @param pmadapter Pointer to mlan_adapter + * @param pioctl_req Pointer to mlan_ioctl_req + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11h_ioctl_dfs_testing(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req) +{ + mlan_ds_11h_cfg *ds_11hcfg = MNULL; + mlan_ds_11h_dfs_testing *dfs_test = MNULL; + wlan_dfs_testing_settings_t *pdfs_test_params = MNULL; + + ENTER(); + + ds_11hcfg = (mlan_ds_11h_cfg *)pioctl_req->pbuf; + dfs_test = &ds_11hcfg->param.dfs_testing; + pdfs_test_params = &pmadapter->dfs_test_params; + + if (pioctl_req->action == MLAN_ACT_GET) { + dfs_test->usr_cac_period_msec = + pdfs_test_params->user_cac_period_msec; + dfs_test->usr_nop_period_sec = + pdfs_test_params->user_nop_period_sec; + dfs_test->usr_no_chan_change = + pdfs_test_params->no_channel_change_on_radar; + dfs_test->usr_fixed_new_chan = + pdfs_test_params->fixed_new_channel_on_radar; + } else { + pdfs_test_params->user_cac_period_msec = + dfs_test->usr_cac_period_msec; + pdfs_test_params->user_nop_period_sec = + dfs_test->usr_nop_period_sec; + pdfs_test_params->no_channel_change_on_radar = + dfs_test->usr_no_chan_change; + pdfs_test_params->fixed_new_channel_on_radar = + dfs_test->usr_fixed_new_chan; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} +#endif /* DFS_TESTING_SUPPORT */ + +/** + * @brief Check if channel is under NOP (Non-Occupancy Period) + * If so, the channel should not be used until the period expires. + * + * @param pmadapter Pointer to mlan_adapter + * @param channel Channel number + * + * @return MTRUE or MFALSE + */ +t_bool +wlan_11h_is_channel_under_nop(mlan_adapter *pmadapter, t_u8 channel) +{ + wlan_dfs_timestamp_t *pdfs_ts = MNULL; + t_u32 now_sec, now_usec; + t_bool ret = MFALSE; + + ENTER(); + pdfs_ts = wlan_11h_find_dfs_timestamp(pmadapter, channel); + + if (pdfs_ts && (pdfs_ts->channel == channel) + && (pdfs_ts->represents == DFS_TS_REPR_NOP_START)) { + /* found NOP_start timestamp entry on channel */ + pmadapter->callbacks.moal_get_system_time(pmadapter-> + pmoal_handle, + &now_sec, &now_usec); +#ifdef DFS_TESTING_SUPPORT + if (pmadapter->dfs_test_params.user_nop_period_sec) { + PRINTM(MCMD_D, + "dfs_testing - user NOP period=%d (sec)\n", + pmadapter->dfs_test_params.user_nop_period_sec); + if ((now_sec - pdfs_ts->ts_sec) <= + pmadapter->dfs_test_params.user_nop_period_sec) { + ret = MTRUE; + } + } else +#endif + { + if ((now_sec - pdfs_ts->ts_sec) <= + WLAN_11H_NON_OCCUPANCY_PERIOD) + ret = MTRUE; + } + + /* if entry is expired, remove it */ + if (!ret) + wlan_11h_remove_dfs_timestamp(pmadapter, pdfs_ts); + else + PRINTM(MMSG, + "11h: channel %d is under NOP - can't use.\n", + channel); + } + + LEAVE(); + return ret; +} + +/** + * @brief Driver handling for CHANNEL_REPORT_RDY event + * This event will have the channel report data appended. + * + * @param priv Pointer to mlan_private + * @param pevent Pointer to mlan_event + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11h_handle_event_chanrpt_ready(mlan_private *priv, mlan_event *pevent) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + HostCmd_DS_CHAN_RPT_RSP *pchan_rpt_rsp; + MrvlIEtypes_Data_t *ptlv; + MeasRptBasicMap_t *pmeas_rpt_basic; + t_u8 *pbuffer; + t_s32 evt_len; + t_u16 tlv_len; + t_u32 sec, usec; + wlan_dfs_device_state_t *pstate_dfs = &priv->adapter->state_dfs; + + ENTER(); + pchan_rpt_rsp = (HostCmd_DS_CHAN_RPT_RSP *)&pevent->event_buf; + DBG_HEXDUMP(MCMD_D, "11h: Event ChanRptReady (HostCmd_DS_CHAN_RPT_RSP)", + (t_u8 *)pchan_rpt_rsp, wlan_le32_to_cpu(pevent->event_len)); + + if (wlan_le32_to_cpu(pchan_rpt_rsp->cmd_result) == + MLAN_CMD_RESULT_SUCCESS) { + pbuffer = (t_u8 *)&pchan_rpt_rsp->tlv_buffer; + evt_len = wlan_le32_to_cpu(pevent->event_len); + evt_len -= + sizeof(HostCmd_DS_CHAN_RPT_RSP) - + sizeof(pchan_rpt_rsp->tlv_buffer); + + while (evt_len >= sizeof(MrvlIEtypesHeader_t)) { + ptlv = (MrvlIEtypes_Data_t *)pbuffer; + tlv_len = wlan_le16_to_cpu(ptlv->header.len); + + switch (wlan_le16_to_cpu(ptlv->header.type)) { + case TLV_TYPE_CHANRPT_11H_BASIC: + pmeas_rpt_basic = + (MeasRptBasicMap_t *)&ptlv->data; + if (pmeas_rpt_basic->radar) { + pstate_dfs->dfs_radar_found = MTRUE; + PRINTM(MMSG, + "RADAR Detected on channel %d!\n", + pstate_dfs->dfs_check_channel); + /* add channel to NOP list */ + wlan_11h_add_dfs_timestamp(priv-> + adapter, + DFS_TS_REPR_NOP_START, + pstate_dfs-> + dfs_check_channel); + } + break; + + default: + break; + } + + pbuffer += (tlv_len + sizeof(ptlv->header)); + evt_len -= (tlv_len + sizeof(ptlv->header)); + evt_len = (evt_len > 0) ? evt_len : 0; + } + } else { + ret = MLAN_STATUS_FAILURE; + } + + /* Update DFS structure. */ + priv->adapter->callbacks.moal_get_system_time(priv->adapter-> + pmoal_handle, &sec, + &usec); + pstate_dfs->dfs_report_time_sec = sec; + pstate_dfs->dfs_check_pending = MFALSE; + + LEAVE(); + return ret; +} + +/** + * @brief Check if RADAR_DETECTED handling is blocking data tx + * + * @param pmadapter Pointer to mlan_adapter + * + * @return MTRUE or MFALSE + */ +t_bool +wlan_11h_radar_detected_tx_blocked(mlan_adapter *pmadapter) +{ + switch (pmadapter->state_rdh.stage) { + case RDH_OFF: + case RDH_CHK_INTFS: + case RDH_STOP_TRAFFIC: + return MFALSE; + } + return MTRUE; +} + +/** + * @brief Callback for RADAR_DETECTED event driver handling + * + * @param priv Void pointer to mlan_private + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11h_radar_detected_callback(t_void *priv) +{ + mlan_status ret; + ENTER(); + ret = wlan_11h_radar_detected_handling(((mlan_private *)(priv))-> + adapter); + LEAVE(); + return ret; +} + +/** + * @brief Driver handling for RADAR_DETECTED event + * + * @param pmadapter Pointer to mlan_adapter + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE or MLAN_STATUS_PENDING + */ +mlan_status +wlan_11h_radar_detected_handling(mlan_adapter *pmadapter) +{ +#ifdef DEBUG_LEVEL1 + const char *rdh_stage_str[] = { + "RDH_OFF", + "RDH_CHK_INTFS", + "RDH_STOP_TRAFFIC", + "RDH_GET_INFO_CHANNEL", + "RDH_GET_INFO_BEACON_DTIM", + "RDH_SET_CUSTOM_IE", + "RDH_REM_CUSTOM_IE", + "RDH_STOP_INTFS", + "RDH_SET_NEW_CHANNEL", + "RDH_RESTART_INTFS", + "RDH_RESTART_TRAFFIC" + }; +#endif + + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = MNULL; + t_u32 i; + wlan_radar_det_hndlg_state_t *pstate_rdh = &pmadapter->state_rdh; + + ENTER(); + + switch (pstate_rdh->stage) { + case RDH_CHK_INTFS: + PRINTM(MCMD_D, "%s(): stage(%d)=%s\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage]); + + /* get active interfaces */ + memset(pmadapter, pstate_rdh->priv_list, 0x00, + sizeof(pstate_rdh->priv_list)); + pstate_rdh->priv_list_count = wlan_get_privs_by_cond(pmadapter, + wlan_is_intf_active, + pstate_rdh-> + priv_list); + PRINTM(MCMD_D, "%s(): priv_list_count = %d\n", __func__, + pstate_rdh->priv_list_count); + for (i = 0; i < pstate_rdh->priv_list_count; i++) + PRINTM(MINFO, "%s(): priv_list[%d] = %p\n", + __func__, i, pstate_rdh->priv_list[i]); + + if (pstate_rdh->priv_list_count == 0) { + /* no interfaces active... nothing to do */ + PRINTM(MMSG, "11h: Radar Detected - no active priv's," + " skip event handling.\n"); + pstate_rdh->stage = RDH_OFF; + PRINTM(MCMD_D, "%s(): finished - stage(%d)=%s\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage]); + break; /* EXIT CASE */ + } + /* else: start handling */ + pstate_rdh->curr_channel = 0; + pstate_rdh->new_channel = 0; + pstate_rdh->uap_band_cfg = 0; + pstate_rdh->max_bcn_dtim_ms = 0; + pstate_rdh->priv_curr_idx = RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_STOP_TRAFFIC; + /* FALL THROUGH TO NEXT STAGE */ + + case RDH_STOP_TRAFFIC: + PRINTM(MCMD_D, "%s(): stage(%d)=%s\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage]); + + PRINTM(MMSG, + "11h: Radar Detected - stopping host tx traffic.\n"); + for (i = 0; i < pstate_rdh->priv_list_count; i++) + wlan_11h_tx_disable(pstate_rdh->priv_list[i]); + + pstate_rdh->priv_curr_idx = RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_GET_INFO_CHANNEL; + /* FALL THROUGH TO NEXT STAGE */ + + case RDH_GET_INFO_CHANNEL: + PRINTM(MCMD_D, "%s(): stage(%d)=%s, priv_idx=%d\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage], + pstate_rdh->priv_curr_idx); + + /* here, prefer STA info over UAP info - one less CMD to send */ + if (pstate_rdh->priv_curr_idx == RDH_STAGE_FIRST_ENTRY_PRIV_IDX) { + if (wlan_only_uap_priv_in_list(pstate_rdh->priv_list, + pstate_rdh-> + priv_list_count)) { +#ifdef UAP_SUPPORT + /* Assume all UAPs on same channel, use first + UAP */ + pmpriv = pstate_rdh->priv_list[0]; + pstate_rdh->priv_curr_idx = 0; + /* send cmd to get first UAP's info */ + pmpriv->uap_state_chan_cb.pioctl_req_curr = + MNULL; + pmpriv->uap_state_chan_cb.get_chan_callback = + wlan_11h_radar_detected_callback; + ret = wlan_uap_get_channel(pmpriv); + break; /* EXIT CASE */ +#endif + } else { + /* Assume all STAs on same channel, find first + STA */ + MASSERT(pstate_rdh->priv_list_count > 0); + for (i = 0; i < pstate_rdh->priv_list_count; + i++) { + pmpriv = pstate_rdh->priv_list[i]; + if (GET_BSS_ROLE(pmpriv) == + MLAN_BSS_ROLE_STA) + break; + } + /* STA info kept in driver, just copy */ + pstate_rdh->curr_channel = + pmpriv->curr_bss_params.bss_descriptor. + channel; + } + } +#ifdef UAP_SUPPORT + else if (pstate_rdh->priv_curr_idx < + pstate_rdh->priv_list_count) { + /* repeat entry: UAP return with info */ + pmpriv = pstate_rdh->priv_list[pstate_rdh-> + priv_curr_idx]; + pstate_rdh->curr_channel = + pmpriv->uap_state_chan_cb.channel; + pstate_rdh->uap_band_cfg = + pmpriv->uap_state_chan_cb.band_config; + PRINTM(MCMD_D, "%s(): uap_band_cfg=0x%02x\n", __func__, + pstate_rdh->uap_band_cfg); + } +#endif + + /* add channel to NOP list */ + wlan_11h_add_dfs_timestamp(pmadapter, DFS_TS_REPR_NOP_START, + pstate_rdh->curr_channel); + + /* choose new channel (!= curr channel) and move on */ + i = 0; + do { +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_UAP) + pstate_rdh->new_channel = + wlan_11h_get_uap_start_channel(pmpriv, + pmpriv-> + uap_state_chan_cb. + band_config); + else +#endif + pstate_rdh->new_channel = + wlan_11h_get_adhoc_start_channel + (pmpriv); + } while ((pstate_rdh->new_channel == pstate_rdh->curr_channel) && (++i < MAX_RANDOM_CHANNEL_RETRIES)); /* avoid + deadloop + */ + if (i >= MAX_RANDOM_CHANNEL_RETRIES) /* report error */ + PRINTM(MERROR, + "%s(): ERROR - could not choose new_chan" + " (!= curr_chan) !!\n", __func__); + +#ifdef DFS_TESTING_SUPPORT + if (pmadapter->dfs_test_params.fixed_new_channel_on_radar) { + PRINTM(MCMD_D, "dfs_testing - user fixed new_chan=%d\n", + pmadapter->dfs_test_params. + fixed_new_channel_on_radar); + pstate_rdh->new_channel = + pmadapter->dfs_test_params. + fixed_new_channel_on_radar; + } +#endif + PRINTM(MCMD_D, "%s(): curr_chan=%d, new_chan=%d\n", + __func__, pstate_rdh->curr_channel, + pstate_rdh->new_channel); + + pstate_rdh->priv_curr_idx = RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_GET_INFO_BEACON_DTIM; + /* FALL THROUGH TO NEXT STAGE */ + + case RDH_GET_INFO_BEACON_DTIM: + PRINTM(MCMD_D, "%s(): stage(%d)=%s, priv_idx=%d\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage], + pstate_rdh->priv_curr_idx); + +#ifdef UAP_SUPPORT + /* check all intfs in this stage to find longest period */ + /* UAP intf callback returning with info */ + if (pstate_rdh->priv_curr_idx < pstate_rdh->priv_list_count) { + t_u16 bcn_dtim_msec; + pmpriv = pstate_rdh->priv_list[pstate_rdh-> + priv_curr_idx]; + PRINTM(MCMD_D, "%s(): uap.bcn_pd=%d, uap.dtim_pd=%d\n", + __func__, + pmpriv->uap_state_chan_cb.beacon_period, + pmpriv->uap_state_chan_cb.dtim_period); + bcn_dtim_msec = + (pmpriv->uap_state_chan_cb.beacon_period * + pmpriv->uap_state_chan_cb.dtim_period); + if (bcn_dtim_msec > pstate_rdh->max_bcn_dtim_ms) + pstate_rdh->max_bcn_dtim_ms = bcn_dtim_msec; + } +#endif + + /* check next intf */ + while ((++pstate_rdh->priv_curr_idx) < + pstate_rdh->priv_list_count) { + pmpriv = pstate_rdh->priv_list[pstate_rdh-> + priv_curr_idx]; + +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_UAP) { + pmpriv->uap_state_chan_cb.pioctl_req_curr = + MNULL; + pmpriv->uap_state_chan_cb.get_chan_callback = + wlan_11h_radar_detected_callback; + ret = wlan_uap_get_beacon_dtim(pmpriv); + break; /* leads to exit case */ + } else +#endif + { /* get STA info from driver and compare here */ + t_u16 bcn_pd_msec = 100; + t_u16 dtim_pd_msec = 1; + t_u16 bcn_dtim_msec; + + /* adhoc creator */ + if (wlan_11h_is_dfs_master(pmpriv)) { + bcn_pd_msec = pmpriv->beacon_period; + } else { + bcn_pd_msec = + pmpriv->curr_bss_params. + bss_descriptor.beacon_period; + /* if (priv->bss_mode != + MLAN_BSS_MODE_IBSS) */ + /* TODO: mlan_scan.c needs to parse TLV + 0x05 (TIM) for dtim_period */ + } + PRINTM(MCMD_D, + "%s(): sta.bcn_pd=%d, sta.dtim_pd=%d\n", + __func__, bcn_pd_msec, dtim_pd_msec); + bcn_dtim_msec = (bcn_pd_msec * dtim_pd_msec); + if (bcn_dtim_msec > pstate_rdh->max_bcn_dtim_ms) + pstate_rdh->max_bcn_dtim_ms = + bcn_dtim_msec; + } + } + + if (pstate_rdh->priv_curr_idx < pstate_rdh->priv_list_count) + break; /* EXIT CASE (for UAP) */ + /* else */ + pstate_rdh->priv_curr_idx = RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_SET_CUSTOM_IE; + /* FALL THROUGH TO NEXT STAGE */ + + case RDH_SET_CUSTOM_IE: + PRINTM(MCMD_D, "%s(): stage(%d)=%s, priv_idx=%d\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage], + pstate_rdh->priv_curr_idx); + + /* add CHAN_SW IE - firmware will accept on any interface, and + apply to all */ + if (pstate_rdh->priv_curr_idx == RDH_STAGE_FIRST_ENTRY_PRIV_IDX) { + mlan_ioctl_req *pioctl_req = MNULL; + + ret = wlan_11h_prepare_custom_ie_chansw(pmadapter, + &pioctl_req, + MTRUE); + if ((ret != MLAN_STATUS_SUCCESS) || !pioctl_req) { + PRINTM(MERROR, + "%s(): Error in preparing CHAN_SW IE.\n", + __func__); + break; /* EXIT CASE */ + } + + PRINTM(MMSG, + "11h: Radar Detected - adding CHAN_SW IE to interfaces.\n"); + pmpriv = pstate_rdh->priv_list[0]; + pstate_rdh->priv_curr_idx = 0; + pioctl_req->bss_index = pmpriv->bss_index; + ret = wlan_misc_ioctl_custom_ie_list(pmadapter, + pioctl_req, + MFALSE); + if (ret != MLAN_STATUS_SUCCESS && + ret != MLAN_STATUS_PENDING) { + PRINTM(MERROR, + "%s(): Could not set IE for priv=%p [priv_bss_idx=%d]!\n", + __func__, pmpriv, pmpriv->bss_index); + /* TODO: how to handle this error case?? ignore + & continue? */ + } + /* free ioctl buffer memory before we leave */ + pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pioctl_req); + break; /* EXIT CASE */ + } + /* else */ + pstate_rdh->priv_curr_idx = RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_REM_CUSTOM_IE; + /* FALL THROUGH TO NEXT STAGE */ + + case RDH_REM_CUSTOM_IE: + PRINTM(MCMD_D, "%s(): stage(%d)=%s, priv_idx=%d\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage], + pstate_rdh->priv_curr_idx); + + /* remove CHAN_SW IE - firmware will accept on any interface, + and apply to all */ + if (pstate_rdh->priv_curr_idx == RDH_STAGE_FIRST_ENTRY_PRIV_IDX) { + mlan_ioctl_req *pioctl_req = MNULL; + + /* + * first entry to this stage, do delay + * DFS requires a minimum of 5 chances for clients to hear this IE. + * Use delay: 5 beacons <= (BCN_DTIM_MSEC*5) <= 3 seconds). + */ + t_u16 delay_ms = MAX(MIN_RDH_CHAN_SW_IE_PERIOD_MSEC, + MIN((5 * + pstate_rdh->max_bcn_dtim_ms), + MAX_RDH_CHAN_SW_IE_PERIOD_MSEC)); + PRINTM(MMSG, + "11h: Radar Detected - delay %d ms for FW to" + " broadcast CHAN_SW IE.\n", delay_ms); + wlan_mdelay(pmadapter, delay_ms); + PRINTM(MMSG, + "11h: Radar Detected - delay over, removing" + " CHAN_SW IE from interfaces.\n"); + + ret = wlan_11h_prepare_custom_ie_chansw(pmadapter, + &pioctl_req, + MFALSE); + if ((ret != MLAN_STATUS_SUCCESS) || !pioctl_req) { + PRINTM(MERROR, + "%s(): Error in preparing CHAN_SW IE.\n", + __func__); + break; /* EXIT CASE */ + } + + pmpriv = pstate_rdh->priv_list[0]; + pstate_rdh->priv_curr_idx = 0; + pioctl_req->bss_index = pmpriv->bss_index; + ret = wlan_misc_ioctl_custom_ie_list(pmadapter, + pioctl_req, + MFALSE); + if (ret != MLAN_STATUS_SUCCESS && + ret != MLAN_STATUS_PENDING) { + PRINTM(MERROR, + "%s(): Could not set IE for priv=%p [priv_bss_idx=%d]!\n", + __func__, pmpriv, pmpriv->bss_index); + /* TODO: hiow to handle this error case?? + ignore & continue? */ + } + /* free ioctl buffer memory before we leave */ + pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pioctl_req); + break; /* EXIT CASE */ + } + /* else */ + pstate_rdh->priv_curr_idx = RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_STOP_INTFS; + /* FALL THROUGH TO NEXT STAGE */ + + case RDH_STOP_INTFS: + PRINTM(MCMD_D, "%s(): stage(%d)=%s, priv_idx=%d\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage], + pstate_rdh->priv_curr_idx); + + /* issues one cmd (DEAUTH/ADHOC_STOP/BSS_STOP) to each intf */ + while ((++pstate_rdh->priv_curr_idx) < + pstate_rdh->priv_list_count) { + pmpriv = pstate_rdh->priv_list[pstate_rdh-> + priv_curr_idx]; +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_UAP) { + ret = wlan_prepare_cmd(pmpriv, + HOST_CMD_APCMD_BSS_STOP, + HostCmd_ACT_GEN_SET, 0, + MNULL, MNULL); + break; /* leads to exit case */ + } +#endif +#ifdef STA_SUPPORT + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_STA) { + if (wlan_11h_is_dfs_master(pmpriv)) { + /* Save ad-hoc creator state before + stop clears it */ + pmpriv->adhoc_state_prev = + pmpriv->adhoc_state; + } + if (pmpriv->media_connected == MTRUE) { + wlan_disconnect(pmpriv, MNULL, MNULL); + break; /* leads to exit case */ + } + } +#endif + } + + if (pstate_rdh->priv_curr_idx < pstate_rdh->priv_list_count || + ret == MLAN_STATUS_FAILURE) + break; /* EXIT CASE */ + /* else */ + pstate_rdh->priv_curr_idx = RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_SET_NEW_CHANNEL; + +#ifdef DFS_TESTING_SUPPORT + if (pmadapter->dfs_test_params.no_channel_change_on_radar) { + PRINTM(MCMD_D, + "dfs_testing - no channel change on radar." + " Overwrite new_chan = curr_chan.\n"); + pstate_rdh->new_channel = pstate_rdh->curr_channel; + pstate_rdh->priv_curr_idx = + RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_RESTART_INTFS; + goto rdh_restart_intfs; /* skip next stage */ + } +#endif + /* FALL THROUGH TO NEXT STAGE */ + + case RDH_SET_NEW_CHANNEL: + PRINTM(MCMD_D, "%s(): stage(%d)=%s, priv_idx=%d\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage], + pstate_rdh->priv_curr_idx); + + /* only set new channel for UAP intfs */ + while ((++pstate_rdh->priv_curr_idx) < + pstate_rdh->priv_list_count) { + pmpriv = pstate_rdh->priv_list[pstate_rdh-> + priv_curr_idx]; +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_UAP) { + pmpriv->uap_state_chan_cb.pioctl_req_curr = + MNULL; + pmpriv->uap_state_chan_cb.get_chan_callback = + wlan_11h_radar_detected_callback; + /* DFS only in 5GHz */ + pstate_rdh->uap_band_cfg |= BAND_CONFIG_5GHZ; + ret = wlan_uap_set_channel(pmpriv, + pstate_rdh-> + uap_band_cfg, + pstate_rdh-> + new_channel); + break; /* leads to exit case */ + } +#endif + } + + if (pstate_rdh->priv_curr_idx < pstate_rdh->priv_list_count || + ret == MLAN_STATUS_FAILURE) + break; /* EXIT CASE (for UAP) */ + /* else */ + pstate_rdh->priv_curr_idx = RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_RESTART_INTFS; + /* FALL THROUGH TO NEXT STAGE */ + + case RDH_RESTART_INTFS: +#ifdef DFS_TESTING_SUPPORT +rdh_restart_intfs: +#endif + PRINTM(MCMD_D, "%s(): stage(%d)=%s, priv_idx=%d\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage], + pstate_rdh->priv_curr_idx); + + /* can only restart master intfs */ + while ((++pstate_rdh->priv_curr_idx) < + pstate_rdh->priv_list_count) { + pmpriv = pstate_rdh->priv_list[pstate_rdh-> + priv_curr_idx]; +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_UAP) { + if (wlan_11h_radar_detect_required(pmpriv, + pstate_rdh-> + new_channel)) + { + /* Radar detection is required for this + channel, make sure 11h is activated + in the firmware */ + ret = wlan_11h_activate(pmpriv, MNULL, + MTRUE); + ret = wlan_11h_config_master_radar_det + (pmpriv, MTRUE); + ret = wlan_11h_check_update_radar_det_state(pmpriv); + } + ret = wlan_prepare_cmd(pmpriv, + HOST_CMD_APCMD_BSS_START, + HostCmd_ACT_GEN_SET, 0, + MNULL, MNULL); + break; /* leads to exit case */ + } +#endif +#ifdef STA_SUPPORT + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_STA) { + /* Check previous state to find former Ad-hoc + creator interface. Set new state to + Starting, so it'll be seen as a DFS master. */ + if (pmpriv->adhoc_state_prev == ADHOC_STARTED) { + pmpriv->adhoc_state = ADHOC_STARTING; + pmpriv->adhoc_state_prev = ADHOC_IDLE; + } + if (wlan_11h_is_dfs_master(pmpriv)) { + /* set new adhoc channel here */ + pmpriv->adhoc_channel = + pstate_rdh->new_channel; + if (wlan_11h_radar_detect_required + (pmpriv, pstate_rdh->new_channel)) { + /* Radar detection is required + for this channel, make sure + 11h is activated in the + firmware */ + ret = wlan_11h_activate(pmpriv, + MNULL, + MTRUE); + if (ret) + break; + ret = wlan_11h_config_master_radar_det(pmpriv, MTRUE); + if (ret) + break; + ret = wlan_11h_check_update_radar_det_state(pmpriv); + if (ret) + break; + } + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_AD_HOC_START, + HostCmd_ACT_GEN_SET, + 0, MNULL, + &pmpriv-> + adhoc_last_start_ssid); + break; /* leads to exit case */ + } + + /* NOTE: DON'T reconnect slave STA intfs - + infra/adhoc_joiner Do we want to return to + same AP/network (on radar channel)? If want + to connect back, depend on either: 1. + driver's reassoc thread 2. wpa_supplicant, + or other user-space app */ + } +#endif + } + + if (pstate_rdh->priv_curr_idx < pstate_rdh->priv_list_count || + ret == MLAN_STATUS_FAILURE) + break; /* EXIT CASE (for UAP) */ + /* else */ + pstate_rdh->priv_curr_idx = RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_RESTART_TRAFFIC; + /* FALL THROUGH TO NEXT STAGE */ + + case RDH_RESTART_TRAFFIC: + PRINTM(MCMD_D, "%s(): stage(%d)=%s\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage]); + + /* continue traffic for reactivated interfaces */ + PRINTM(MMSG, + "11h: Radar Detected - restarting host tx traffic.\n"); + for (i = 0; i < pstate_rdh->priv_list_count; i++) + wlan_11h_tx_enable(pstate_rdh->priv_list[i]); + + pstate_rdh->stage = RDH_OFF; /* DONE! */ + PRINTM(MCMD_D, "%s(): finished - stage(%d)=%s\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage]); + + break; + + default: + pstate_rdh->stage = RDH_OFF; /* cancel RDH to unblock Tx + packets */ + break; + } + + LEAVE(); + return ret; +} + +/** + * @brief DFS Event Preprocessing. + * Operates directly on pmadapter variables. + * + * 1. EVENT_RADAR_DETECTED comes from firmware without specific + * bss_num/bss_type. Find it an appropriate interface and + * update event_cause field in event_buf. + * + * @param pmadapter Pointer to mlan_adapter + * + * @return MLAN_STATUS_SUCCESS (update successful) + * or MLAN_STATUS_FAILURE (no change) + */ +mlan_status +wlan_11h_dfs_event_preprocessing(mlan_adapter *pmadapter) +{ + mlan_status ret = MLAN_STATUS_FAILURE; + mlan_private *pmpriv = MNULL; + mlan_private *priv_list[MLAN_MAX_BSS_NUM]; + + ENTER(); + switch (pmadapter->event_cause & EVENT_ID_MASK) { + case EVENT_RADAR_DETECTED: + /* find active intf: prefer dfs_master over dfs_slave */ + if (wlan_get_privs_by_two_cond(pmadapter, + wlan_11h_is_master_active_on_dfs_chan, + wlan_11h_is_dfs_master, + MTRUE, priv_list)) { + pmpriv = priv_list[0]; + PRINTM(MINFO, "%s: found dfs_master priv=%p\n", + __func__, pmpriv); + } else if (wlan_get_privs_by_two_cond(pmadapter, + wlan_11h_is_slave_active_on_dfs_chan, + wlan_11h_is_dfs_slave, + MTRUE, priv_list)) { + pmpriv = priv_list[0]; + PRINTM(MINFO, "%s: found dfs_slave priv=%p\n", + __func__, pmpriv); + } + + /* update event_cause if we found an appropriate priv */ + if (pmpriv) { + pmlan_buffer pmevbuf = pmadapter->pmlan_buffer_event; + t_u32 new_event_cause = + pmadapter->event_cause & EVENT_ID_MASK; + new_event_cause |= + ((GET_BSS_NUM(pmpriv) & 0xff) << 16) | + ((pmpriv->bss_type & 0xff) << 24); + PRINTM(MINFO, "%s: priv - bss_num=%d, bss_type=%d\n", + __func__, GET_BSS_NUM(pmpriv), pmpriv->bss_type); + memcpy(pmadapter, pmevbuf->pbuf + pmevbuf->data_offset, + &new_event_cause, sizeof(new_event_cause)); + ret = MLAN_STATUS_SUCCESS; + } + break; + } + + LEAVE(); + return ret; +} + +/** + * @brief try to switch to a non-dfs channel + * + * @param priv Void pointer to mlan_private + * + * @param chan pointer to channel + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE or MLAN_STATUS_PENDING + */ +mlan_status +wlan_11h_switch_non_dfs_chan(mlan_private *priv, t_u8 *chan) +{ + mlan_status ret = MLAN_STATUS_FAILURE; + t_u32 i; + t_u32 rand_entry; + t_u8 def_chan; + t_u8 rand_tries = 0; + region_chan_t *chn_tbl = MNULL; + pmlan_adapter pmadapter = priv->adapter; + + ENTER(); + + /* get the channel table first */ + for (i = 0; i < MAX_REGION_CHANNEL_NUM; i++) { + if (pmadapter->region_channel[i].band == BAND_A + && pmadapter->region_channel[i].valid) { + chn_tbl = &pmadapter->region_channel[i]; + break; + } + } + + if (!chn_tbl || !chn_tbl->pcfp) + goto done; + + do { + rand_entry = + wlan_11h_get_random_num(pmadapter) % chn_tbl->num_cfp; + def_chan = (t_u8)chn_tbl->pcfp[rand_entry].channel; + rand_tries++; + } while ((wlan_11h_is_channel_under_nop(pmadapter, def_chan) || + chn_tbl->pcfp[rand_entry].passive_scan_or_radar_detect == + MTRUE) && (rand_tries < MAX_SWITCH_CHANNEL_RETRIES)); + + /* meet max retries, use the lowest non-dfs channel */ + if (rand_tries == MAX_SWITCH_CHANNEL_RETRIES) { + for (i = 0; i < chn_tbl->num_cfp; i++) { + if (chn_tbl->pcfp[i].passive_scan_or_radar_detect == + MFALSE && + !wlan_11h_is_channel_under_nop(pmadapter, + (t_u8)chn_tbl-> + pcfp[i].channel)) { + def_chan = (t_u8)chn_tbl->pcfp[i].channel; + break; + } + } + if (i == chn_tbl->num_cfp) + goto done; + } + + *chan = def_chan; + ret = MLAN_STATUS_SUCCESS; +done: + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11h.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11h.h new file mode 100644 index 00000000..72a32b6d --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11h.h @@ -0,0 +1,162 @@ +/** @file mlan_11h.h + * + * @brief This header file contains data structures and + * function declarations of 802.11h + * + * Copyright (C) 2008-2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/************************************************************* +Change Log: + 03/26/2009: initial creation +*************************************************************/ + +#ifndef _MLAN_11H_ +#define _MLAN_11H_ + +/** 11H OID bitmasks */ +#define ENABLE_11H_MASK MBIT(0) +#define MASTER_RADAR_DET_MASK MBIT(1) +#define SLAVE_RADAR_DET_MASK MBIT(2) + +/** DFS Master Radar Detect global enable */ +#define DFS_MASTER_RADAR_DETECT_EN (MTRUE) +/** DFS Slave Radar Detect global enable */ +#define DFS_SLAVE_RADAR_DETECT_EN (MFALSE) + +/** + * 11H APIs + */ + +/* Is master radar detection enabled in firmware? */ +extern t_bool wlan_11h_is_master_radar_det_active(mlan_private *priv); + +/** Configure master radar detection. + * Need call wlan_11h_check_update_radar_det_state() after. + */ +extern mlan_status wlan_11h_config_master_radar_det(mlan_private *priv, + t_bool enable); + +/** Configure slave radar detection. + * Need call wlan_11h_check_update_radar_det_state() after. + */ +extern mlan_status wlan_11h_config_slave_radar_det(mlan_private *priv, + t_bool enable); + +/** Checks all interfaces and updates radar detect flags if necessary */ +extern mlan_status wlan_11h_check_update_radar_det_state(mlan_private *pmpriv); + +/** Return 1 if 11h is active in the firmware, 0 if it is inactive */ +extern t_bool wlan_11h_is_active(mlan_private *priv); + +/** Enable the tx interface and record the new transmit state */ +extern void wlan_11h_tx_enable(mlan_private *priv); + +/** Disable the tx interface and record the new transmit state */ +extern void wlan_11h_tx_disable(mlan_private *priv); + +/** Activate 11h extensions in the firmware */ +extern mlan_status wlan_11h_activate(mlan_private *priv, t_void *pioctl_buf, + t_bool flag); + +/** Initialize the 11h device structure */ +extern void wlan_11h_init(mlan_adapter *pmadapter); + +/** Cleanup for the 11h device structure */ +extern void wlan_11h_cleanup(mlan_adapter *pmadapter); + +/** Initialize the 11h interface structure */ +extern void wlan_11h_priv_init(mlan_private *pmpriv); + +/** Get an initial random channel to start an adhoc network on */ +extern t_u8 wlan_11h_get_adhoc_start_channel(mlan_private *priv); + +/** Get channel that has been closed via Channel Switch Announcement */ +extern t_u8 wlan_11h_get_csa_closed_channel(mlan_private *priv); + +/** Check if radar detection is required on the specified channel */ +extern t_bool wlan_11h_radar_detect_required(mlan_private *priv, t_u8 channel); + +/** Perform a standard availibility check on the specified channel */ +extern t_s32 wlan_11h_issue_radar_detect(mlan_private *priv, + pmlan_ioctl_req pioctl_req, + t_u8 channel, t_u8 chan_width); + +/** Check previously issued radar report for a channel */ +extern mlan_status wlan_11h_check_chan_report(mlan_private *priv, t_u8 chan); + +/** Add any 11h TLVs necessary to complete an adhoc start command */ +extern t_s32 wlan_11h_process_start(mlan_private *priv, + t_u8 **ppbuffer, + IEEEtypes_CapInfo_t *pcap_info, + t_u32 channel, + wlan_11h_bss_info_t *p11h_bss_info); + +/** Add any 11h TLVs necessary to complete a join command (adhoc or infra) */ +extern t_s32 wlan_11h_process_join(mlan_private *priv, + t_u8 **ppbuffer, + IEEEtypes_CapInfo_t *pcap_info, + t_u8 band, + t_u32 channel, + wlan_11h_bss_info_t *p11h_bss_info); + +/** Complete the firmware command preparation for an 11h command function */ +extern mlan_status wlan_11h_cmd_process(mlan_private *priv, + HostCmd_DS_COMMAND *pcmd_ptr, + const t_void *pinfo_buf); + +/** Process the response of an 11h firmware command */ +extern mlan_status wlan_11h_cmdresp_process(mlan_private *priv, + const HostCmd_DS_COMMAND *resp); + +/** Receive IEs from scan processing and record any needed info for 11h */ +extern mlan_status wlan_11h_process_bss_elem(mlan_adapter *pmadapter, + wlan_11h_bss_info_t *p11h_bss_info, + const t_u8 *pelement); + +/** Handler for EVENT_CHANNEL_SWITCH_ANN */ +extern mlan_status wlan_11h_handle_event_chanswann(mlan_private *priv); + +/** Handler for EVENT_CHANNEL_REPORT_RDY */ +extern mlan_status wlan_11h_handle_event_chanrpt_ready(mlan_private *priv, + mlan_event *pevent); + +#ifdef DFS_TESTING_SUPPORT +/** Handler for DFS_TESTING IOCTL */ +extern mlan_status wlan_11h_ioctl_dfs_testing(pmlan_adapter pmadapter, + pmlan_ioctl_req pioctl_req); +#endif + +/** Check if channel is under a NOP duration (should not be used) */ +extern t_bool wlan_11h_is_channel_under_nop(mlan_adapter *pmadapter, + t_u8 channel); + +/** Check if RADAR_DETECTED handling is blocking data tx */ +extern t_bool wlan_11h_radar_detected_tx_blocked(mlan_adapter *pmadapter); + +/** Callback for RADAR_DETECTED (for UAP cmdresp) */ +extern mlan_status wlan_11h_radar_detected_callback(t_void *priv); + +/** Handler for RADAR_DETECTED */ +extern mlan_status wlan_11h_radar_detected_handling(mlan_adapter *pmadapter); +/** DFS Event pre-processing */ +extern mlan_status wlan_11h_dfs_event_preprocessing(mlan_adapter *pmadapter); + +/** DFS switch to non-DFS channel */ +extern mlan_status wlan_11h_switch_non_dfs_chan(mlan_private *priv, t_u8 *chan); + +#endif /*_MLAN_11H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n.c old mode 100755 new mode 100644 index 74babdff..33e6779b --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n.c @@ -59,10 +59,25 @@ wlan_11n_ioctl_max_tx_buf_size(IN pmlan_adapter pmadapter, { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ds_11n_cfg *cfg = MNULL; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; ENTER(); - cfg = (mlan_ds_11n_cfg *) pioctl_req->pbuf; - cfg->param.tx_buf_size = (t_u32) pmadapter->max_tx_buf_size; + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) { + if (cfg->param.tx_buf_size == 0xffff) { + PRINTM(MIOCTL, "Send reconfigure tx buf to FW\n"); + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_RECONFIGURE_TX_BUFF, + HostCmd_ACT_GEN_SET, 0, + (t_void *)pioctl_req, + &cfg->param.tx_buf_size); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + LEAVE(); + return ret; + } + } + cfg->param.tx_buf_size = (t_u32)pmadapter->max_tx_buf_size; pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; LEAVE(); @@ -87,7 +102,7 @@ wlan_11n_ioctl_htusrcfg(IN pmlan_adapter pmadapter, ENTER(); - cfg = (mlan_ds_11n_cfg *) pioctl_req->pbuf; + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) { if (((cfg->param.htcap_cfg.htcap & ~IGN_HW_DEV_CAP) & @@ -103,9 +118,18 @@ wlan_11n_ioctl_htusrcfg(IN pmlan_adapter pmadapter, "Set: UsrDot11nCap for 2.4GHz 0x%x\n", pmadapter->usr_dot_11n_dev_cap_bg); } + if (cfg->param.htcap_cfg.misc_cfg == BAND_SELECT_A) { + pmadapter->usr_dot_11n_dev_cap_a = + cfg->param.htcap_cfg.htcap; + PRINTM(MINFO, + "Set: UsrDot11nCap for 5GHz 0x%x\n", + pmadapter->usr_dot_11n_dev_cap_a); + } if (cfg->param.htcap_cfg.misc_cfg == BAND_SELECT_BOTH) { pmadapter->usr_dot_11n_dev_cap_bg = cfg->param.htcap_cfg.htcap; + pmadapter->usr_dot_11n_dev_cap_a = + cfg->param.htcap_cfg.htcap; PRINTM(MINFO, "Set: UsrDot11nCap for 2.4GHz and 5GHz 0x%x\n", cfg->param.htcap_cfg.htcap); @@ -124,6 +148,13 @@ wlan_11n_ioctl_htusrcfg(IN pmlan_adapter pmadapter, "Get: UsrDot11nCap for 2.4GHz 0x%x\n", cfg->param.htcap_cfg.htcap); } + if (cfg->param.htcap_cfg.misc_cfg == BAND_SELECT_A) { + cfg->param.htcap_cfg.htcap = + pmadapter->usr_dot_11n_dev_cap_a; + PRINTM(MINFO, + "Get: UsrDot11nCap for 5GHz 0x%x\n", + cfg->param.htcap_cfg.htcap); + } } } @@ -150,7 +181,7 @@ wlan_11n_ioctl_amsdu_aggr_ctrl(IN pmlan_adapter pmadapter, ENTER(); - cfg = (mlan_ds_11n_cfg *) pioctl_req->pbuf; + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) cmd_action = HostCmd_ACT_GEN_SET; else @@ -161,8 +192,8 @@ wlan_11n_ioctl_amsdu_aggr_ctrl(IN pmlan_adapter pmadapter, HostCmd_CMD_AMSDU_AGGR_CTRL, cmd_action, 0, - (t_void *) pioctl_req, - (t_void *) & cfg->param.amsdu_aggr_ctrl); + (t_void *)pioctl_req, + (t_void *)&cfg->param.amsdu_aggr_ctrl); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -189,7 +220,7 @@ wlan_11n_ioctl_httxcfg(IN pmlan_adapter pmadapter, ENTER(); - cfg = (mlan_ds_11n_cfg *) pioctl_req->pbuf; + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) cmd_action = HostCmd_ACT_GEN_SET; else @@ -200,8 +231,8 @@ wlan_11n_ioctl_httxcfg(IN pmlan_adapter pmadapter, HostCmd_CMD_11N_CFG, cmd_action, 0, - (t_void *) pioctl_req, - (t_void *) & cfg->param.tx_cfg); + (t_void *)pioctl_req, + (t_void *)&cfg->param.tx_cfg); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -227,7 +258,7 @@ wlan_11n_ioctl_tx_bf_cap(IN pmlan_adapter pmadapter, ENTER(); - cfg = (mlan_ds_11n_cfg *) pioctl_req->pbuf; + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) pmpriv->tx_bf_cap = cfg->param.tx_bf_cap; else @@ -237,6 +268,113 @@ wlan_11n_ioctl_tx_bf_cap(IN pmlan_adapter pmadapter, return ret; } +/** + * @brief Set/get control to coex RX window size configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_11n_ioctl_coex_rx_winsize(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_11n_cfg *cfg = MNULL; + + ENTER(); + + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) + cfg->param.coex_rx_winsize = pmadapter->coex_rx_winsize; + else if (pioctl_req->action == MLAN_ACT_SET) + pmadapter->coex_rx_winsize = (t_u8)cfg->param.coex_rx_winsize; + + LEAVE(); + return ret; +} + +/** + * @brief This function will send delba request to + * the peer in the TxBAStreamTbl + * + * @param priv A pointer to mlan_private + * @param ra MAC Address to send DELBA + * + * @return N/A + */ +void +wlan_11n_send_delba_to_peer(mlan_private *priv, t_u8 *ra) +{ + + TxBAStreamTbl *ptx_tbl; + + ENTER(); + + ptx_tbl = (TxBAStreamTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); + if (!ptx_tbl) { + LEAVE(); + return; + } + + while (ptx_tbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { + if (!memcmp + (priv->adapter, ptx_tbl->ra, ra, MLAN_MAC_ADDR_LENGTH)) { + PRINTM(MIOCTL, "Tx:Send delba to tid=%d, " MACSTR "\n", + ptx_tbl->tid, MAC2STR(ptx_tbl->ra)); + wlan_send_delba(priv, MNULL, ptx_tbl->tid, ptx_tbl->ra, + 1); + } + ptx_tbl = ptx_tbl->pnext; + } + /* Signal MOAL to trigger mlan_main_process */ + wlan_recv_event(priv, MLAN_EVENT_ID_DRV_DEFER_HANDLING, MNULL); + LEAVE(); + return; +} + +/** + * @brief Set/Get control to TX AMPDU configuration on infra link + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_11n_ioctl_txaggrctrl(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_11n_cfg *cfg = MNULL; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) + cfg->param.txaggrctrl = pmpriv->txaggrctrl; + else if (pioctl_req->action == MLAN_ACT_SET) + pmpriv->txaggrctrl = (t_u8)cfg->param.txaggrctrl; + + if (pmpriv->media_connected == MTRUE) { + if (pioctl_req->action == MLAN_ACT_SET + && !pmpriv->txaggrctrl + && pmpriv->adapter->tdls_status != TDLS_NOT_SETUP) + wlan_11n_send_delba_to_peer(pmpriv, + pmpriv->curr_bss_params. + bss_descriptor.mac_address); + } + LEAVE(); + return ret; +} + /** * @brief This function will resend addba request to all * the peer in the TxBAStreamTbl @@ -246,25 +384,25 @@ wlan_11n_ioctl_tx_bf_cap(IN pmlan_adapter pmadapter, * @return N/A */ static void -wlan_11n_update_addba_request(mlan_private * priv) +wlan_11n_update_addba_request(mlan_private *priv) { TxBAStreamTbl *ptx_tbl; ENTER(); - ptx_tbl = (TxBAStreamTbl *) util_peek_list(priv->adapter->pmoal_handle, - &priv->tx_ba_stream_tbl_ptr, - priv->adapter->callbacks. - moal_spin_lock, - priv->adapter->callbacks. - moal_spin_unlock); + ptx_tbl = (TxBAStreamTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); if (!ptx_tbl) { LEAVE(); return; } - while (ptx_tbl != (TxBAStreamTbl *) & priv->tx_ba_stream_tbl_ptr) { + while (ptx_tbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { wlan_send_addba(priv, ptx_tbl->tid, ptx_tbl->ra); ptx_tbl = ptx_tbl->pnext; } @@ -293,7 +431,7 @@ wlan_11n_ioctl_addba_param(IN pmlan_adapter pmadapter, ENTER(); - cfg = (mlan_ds_11n_cfg *) pioctl_req->pbuf; + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) { cfg->param.addba_param.timeout = pmpriv->add_ba_param.timeout; cfg->param.addba_param.txwinsize = @@ -324,28 +462,28 @@ wlan_11n_ioctl_addba_param(IN pmlan_adapter pmadapter, * * @param priv A pointer to mlan_priv * @param tid tid - * @return N/A + * @return N/A */ void -wlan_11n_delba(mlan_private * priv, int tid) +wlan_11n_delba(mlan_private *priv, int tid) { RxReorderTbl *rx_reor_tbl_ptr; ENTER(); rx_reor_tbl_ptr = - (RxReorderTbl *) util_peek_list(priv->adapter->pmoal_handle, - &priv->rx_reorder_tbl_ptr, - priv->adapter->callbacks. - moal_spin_lock, - priv->adapter->callbacks. - moal_spin_unlock); + (RxReorderTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->rx_reorder_tbl_ptr, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); if (!rx_reor_tbl_ptr) { LEAVE(); return; } - while (rx_reor_tbl_ptr != (RxReorderTbl *) & priv->rx_reorder_tbl_ptr) { + while (rx_reor_tbl_ptr != (RxReorderTbl *)&priv->rx_reorder_tbl_ptr) { if (rx_reor_tbl_ptr->tid == tid) { PRINTM(MIOCTL, "Send delba to tid=%d, " MACSTR "\n", tid, MAC2STR(rx_reor_tbl_ptr->ta)); @@ -380,7 +518,7 @@ wlan_11n_ioctl_addba_reject(IN pmlan_adapter pmadapter, ENTER(); - cfg = (mlan_ds_11n_cfg *) pioctl_req->pbuf; + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) { PRINTM(MINFO, "Get Addba reject\n"); @@ -434,8 +572,8 @@ wlan_11n_ioctl_addba_reject(IN pmlan_adapter pmadapter, static mlan_status wlan_send_delba_to_entry_in_txbastream_tbl(pmlan_private priv, pmlan_ioctl_req pioctl_req, t_u8 tid, - t_u8 * peer_address, - TxBAStreamTbl * last_tx_ba_to_delete) + t_u8 *peer_address, + TxBAStreamTbl *last_tx_ba_to_delete) { pmlan_adapter pmadapter = priv->adapter; TxBAStreamTbl *tx_ba_stream_tbl_ptr; @@ -445,19 +583,19 @@ wlan_send_delba_to_entry_in_txbastream_tbl(pmlan_private priv, ENTER(); tx_ba_stream_tbl_ptr = - (TxBAStreamTbl *) util_peek_list(pmadapter->pmoal_handle, - &priv->tx_ba_stream_tbl_ptr, - pmadapter->callbacks. - moal_spin_lock, - pmadapter->callbacks. - moal_spin_unlock); + (TxBAStreamTbl *)util_peek_list(pmadapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); if (!tx_ba_stream_tbl_ptr) { LEAVE(); return ret; } while (tx_ba_stream_tbl_ptr != - (TxBAStreamTbl *) & priv->tx_ba_stream_tbl_ptr) { + (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { if (tx_ba_stream_tbl_ptr->ba_status == BA_STREAM_SETUP_COMPLETE) { if (((tid == DELBA_ALL_TIDS) || (tid == tx_ba_stream_tbl_ptr->tid)) && @@ -505,8 +643,8 @@ wlan_send_delba_to_entry_in_txbastream_tbl(pmlan_private priv, static mlan_status wlan_send_delba_to_entry_in_reorder_tbl(pmlan_private priv, pmlan_ioctl_req pioctl_req, t_u8 tid, - t_u8 * peer_address, - RxReorderTbl * last_rx_ba_to_delete) + t_u8 *peer_address, + RxReorderTbl *last_rx_ba_to_delete) { pmlan_adapter pmadapter = priv->adapter; RxReorderTbl *rx_reor_tbl_ptr; @@ -516,18 +654,18 @@ wlan_send_delba_to_entry_in_reorder_tbl(pmlan_private priv, ENTER(); rx_reor_tbl_ptr = - (RxReorderTbl *) util_peek_list(pmadapter->pmoal_handle, - &priv->rx_reorder_tbl_ptr, - pmadapter->callbacks. - moal_spin_lock, - pmadapter->callbacks. - moal_spin_unlock); + (RxReorderTbl *)util_peek_list(pmadapter->pmoal_handle, + &priv->rx_reorder_tbl_ptr, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); if (!rx_reor_tbl_ptr) { LEAVE(); return ret; } - while (rx_reor_tbl_ptr != (RxReorderTbl *) & priv->rx_reorder_tbl_ptr) { + while (rx_reor_tbl_ptr != (RxReorderTbl *)&priv->rx_reorder_tbl_ptr) { if (rx_reor_tbl_ptr->ba_status == BA_STREAM_SETUP_COMPLETE) { if (((tid == DELBA_ALL_TIDS) || (tid == rx_reor_tbl_ptr->tid)) && @@ -580,7 +718,7 @@ wlan_11n_ioctl_delba(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) ENTER(); - cfg = (mlan_ds_11n_cfg *) pioctl_req->pbuf; + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; tid = cfg->param.del_ba.tid; peer_address = cfg->param.del_ba.peer_mac_addr; @@ -589,17 +727,17 @@ wlan_11n_ioctl_delba(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) if (cfg->param.del_ba.direction & DELBA_RX) { rx_reor_tbl_ptr = - (RxReorderTbl *) util_peek_list(pmadapter->pmoal_handle, - &pmpriv-> - rx_reorder_tbl_ptr, - pmadapter->callbacks. - moal_spin_lock, - pmadapter->callbacks. - moal_spin_unlock); + (RxReorderTbl *)util_peek_list(pmadapter->pmoal_handle, + &pmpriv-> + rx_reorder_tbl_ptr, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); if (rx_reor_tbl_ptr) { while (rx_reor_tbl_ptr != - (RxReorderTbl *) & pmpriv->rx_reorder_tbl_ptr) { + (RxReorderTbl *)&pmpriv->rx_reorder_tbl_ptr) { if (rx_reor_tbl_ptr->ba_status == BA_STREAM_SETUP_COMPLETE) { if (((tid == DELBA_ALL_TIDS) || @@ -623,19 +761,17 @@ wlan_11n_ioctl_delba(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) if ((last_rx_ba_to_delete == MNULL) && (cfg->param.del_ba.direction & DELBA_TX)) { tx_ba_stream_tbl_ptr = - (TxBAStreamTbl *) util_peek_list(pmadapter-> - pmoal_handle, - &pmpriv-> - tx_ba_stream_tbl_ptr, - pmadapter->callbacks. - moal_spin_lock, - pmadapter->callbacks. - moal_spin_unlock); + (TxBAStreamTbl *)util_peek_list(pmadapter->pmoal_handle, + &pmpriv-> + tx_ba_stream_tbl_ptr, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); if (tx_ba_stream_tbl_ptr) { while (tx_ba_stream_tbl_ptr != - (TxBAStreamTbl *) & pmpriv-> - tx_ba_stream_tbl_ptr) { + (TxBAStreamTbl *)&pmpriv->tx_ba_stream_tbl_ptr) { if (tx_ba_stream_tbl_ptr->ba_status == BA_STREAM_SETUP_COMPLETE) { if (((tid == DELBA_ALL_TIDS) || @@ -702,7 +838,7 @@ wlan_11n_ioctl_rejectaddbareq(IN pmlan_adapter pmadapter, ENTER(); - cfg = (mlan_ds_11n_cfg *) pioctl_req->pbuf; + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) cmd_action = HostCmd_ACT_GEN_SET; else @@ -713,7 +849,7 @@ wlan_11n_ioctl_rejectaddbareq(IN pmlan_adapter pmadapter, HostCmd_CMD_REJECT_ADDBA_REQ, cmd_action, 0, - (t_void *) pioctl_req, + (t_void *)pioctl_req, &cfg->param.reject_addba_req); if (ret == MLAN_STATUS_SUCCESS) @@ -741,19 +877,19 @@ wlan_send_delba_txbastream_tbl(pmlan_private priv, t_u8 tid) ENTER(); tx_ba_stream_tbl_ptr = - (TxBAStreamTbl *) util_peek_list(pmadapter->pmoal_handle, - &priv->tx_ba_stream_tbl_ptr, - pmadapter->callbacks. - moal_spin_lock, - pmadapter->callbacks. - moal_spin_unlock); + (TxBAStreamTbl *)util_peek_list(pmadapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); if (!tx_ba_stream_tbl_ptr) { LEAVE(); return; } while (tx_ba_stream_tbl_ptr != - (TxBAStreamTbl *) & priv->tx_ba_stream_tbl_ptr) { + (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { if (tx_ba_stream_tbl_ptr->ba_status == BA_STREAM_SETUP_COMPLETE) { if (tid == tx_ba_stream_tbl_ptr->tid) { PRINTM(MIOCTL, @@ -792,7 +928,7 @@ wlan_11n_ioctl_aggr_prio_tbl(IN pmlan_adapter pmadapter, ENTER(); - cfg = (mlan_ds_11n_cfg *) pioctl_req->pbuf; + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) { for (i = 0; i < MAX_NUM_TID; i++) { @@ -804,9 +940,10 @@ wlan_11n_ioctl_aggr_prio_tbl(IN pmlan_adapter pmadapter, } else { for (i = 0; i < MAX_NUM_TID; i++) { /* For AMPDU */ - if ((cfg->param.aggr_prio_tbl.ampdu[i] > HIGH_PRIO_TID) - && (cfg->param.aggr_prio_tbl.ampdu[i] != - BA_STREAM_NOT_ALLOWED)) { + if ((cfg->param.aggr_prio_tbl.ampdu[i] > + HIGH_PRIO_TID)&&(cfg->param.aggr_prio_tbl. + ampdu[i] != + BA_STREAM_NOT_ALLOWED)) { pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; ret = MLAN_STATUS_FAILURE; @@ -851,6 +988,63 @@ wlan_11n_ioctl_aggr_prio_tbl(IN pmlan_adapter pmadapter, return ret; } +/** + * @brief This function update all the tx_win_size + * + * @param pmadapter A pointer to mlan_adapter + * + * + * @return N/A + */ +void +wlan_update_ampdu_txwinsize(pmlan_adapter pmadapter) +{ + t_u8 i; + t_u32 tx_win_size = 0; + pmlan_private priv = MNULL; + + ENTER(); + + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) { + priv = pmadapter->priv[i]; + tx_win_size = priv->add_ba_param.tx_win_size; +#ifdef STA_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_STA) + priv->add_ba_param.tx_win_size = + MLAN_STA_AMPDU_DEF_TXWINSIZE; +#endif +#ifdef WIFI_DIRECT_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) + priv->add_ba_param.tx_win_size = + MLAN_WFD_AMPDU_DEF_TXRXWINSIZE; +#endif +#ifdef UAP_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_UAP) + priv->add_ba_param.tx_win_size = + MLAN_UAP_AMPDU_DEF_TXWINSIZE; +#endif + if (pmadapter->coex_win_size && + pmadapter->coex_tx_win_size) + priv->add_ba_param.tx_win_size = + pmadapter->coex_tx_win_size; + + if (tx_win_size != priv->add_ba_param.tx_win_size) { + if (priv->media_connected == MTRUE) { + for (i = 0; i < MAX_NUM_TID; i++) + wlan_send_delba_txbastream_tbl + (priv, i); + wlan_recv_event(priv, + MLAN_EVENT_ID_DRV_DEFER_HANDLING, + MNULL); + } + } + } + } + LEAVE(); + return; +} + /** * @brief Get supported MCS set * @@ -877,16 +1071,17 @@ wlan_11n_ioctl_supported_mcs_set(IN pmlan_adapter pmadapter, } rx_mcs_supp = GET_RXMCSSUPP(pmadapter->usr_dev_mcs_support); /* Set MCS for 1x1/2x2 */ - memset(pmadapter, (t_u8 *) mcs_set, 0xff, rx_mcs_supp); + memset(pmadapter, (t_u8 *)mcs_set, 0xff, rx_mcs_supp); /* Clear all the other values */ - memset(pmadapter, (t_u8 *) & mcs_set[rx_mcs_supp], 0, + memset(pmadapter, (t_u8 *)&mcs_set[rx_mcs_supp], 0, NUM_MCS_FIELD - rx_mcs_supp); /* Set MCS32 with 40MHz support */ if (ISSUPP_CHANWIDTH40(pmadapter->usr_dot_11n_dev_cap_bg) + || ISSUPP_CHANWIDTH40(pmadapter->usr_dot_11n_dev_cap_a) ) SETHT_MCS32(mcs_set); - cfg = (mlan_ds_11n_cfg *) pioctl_req->pbuf; + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; memcpy(pmadapter, cfg->param.supported_mcs_set, mcs_set, NUM_MCS_FIELD); LEAVE(); @@ -903,21 +1098,21 @@ wlan_11n_ioctl_supported_mcs_set(IN pmlan_adapter pmadapter, * @return MTRUE or MFALSE */ static int -wlan_is_txbastreamptr_valid(mlan_private * priv, TxBAStreamTbl * ptxtblptr) +wlan_is_txbastreamptr_valid(mlan_private *priv, TxBAStreamTbl *ptxtblptr) { TxBAStreamTbl *ptx_tbl; ENTER(); - ptx_tbl = (TxBAStreamTbl *) util_peek_list(priv->adapter->pmoal_handle, - &priv->tx_ba_stream_tbl_ptr, - MNULL, MNULL); + ptx_tbl = (TxBAStreamTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + MNULL, MNULL); if (!ptx_tbl) { LEAVE(); return MFALSE; } - while (ptx_tbl != (TxBAStreamTbl *) & priv->tx_ba_stream_tbl_ptr) { + while (ptx_tbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { if (ptx_tbl == ptxtblptr) { LEAVE(); return MTRUE; @@ -932,33 +1127,33 @@ wlan_is_txbastreamptr_valid(mlan_private * priv, TxBAStreamTbl * ptxtblptr) /** * @brief This function will return the pointer to a entry in BA Stream - * table which matches the ba_status requested + * table which matches the ba_status requested * - * @param priv A pointer to mlan_private + * @param priv A pointer to mlan_private * @param ba_status Current status of the BA stream * * @return A pointer to first entry matching status in BA stream * NULL if not found */ static TxBAStreamTbl * -wlan_11n_get_txbastream_status(mlan_private * priv, baStatus_e ba_status) +wlan_11n_get_txbastream_status(mlan_private *priv, baStatus_e ba_status) { TxBAStreamTbl *ptx_tbl; ENTER(); - ptx_tbl = (TxBAStreamTbl *) util_peek_list(priv->adapter->pmoal_handle, - &priv->tx_ba_stream_tbl_ptr, - priv->adapter->callbacks. - moal_spin_lock, - priv->adapter->callbacks. - moal_spin_unlock); + ptx_tbl = (TxBAStreamTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); if (!ptx_tbl) { LEAVE(); return MNULL; } - while (ptx_tbl != (TxBAStreamTbl *) & priv->tx_ba_stream_tbl_ptr) { + while (ptx_tbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { if (ptx_tbl->ba_status == ba_status) { LEAVE(); return ptx_tbl; @@ -986,14 +1181,17 @@ wlan_11n_get_txbastream_status(mlan_private * priv, baStatus_e ba_status) * @return N/A */ static void -wlan_fill_cap_info(mlan_private * priv, HTCap_t * ht_cap, t_u8 bands) +wlan_fill_cap_info(mlan_private *priv, HTCap_t *ht_cap, t_u8 bands) { mlan_adapter *pmadapter = priv->adapter; t_u32 usr_dot_11n_dev_cap; ENTER(); - usr_dot_11n_dev_cap = pmadapter->usr_dot_11n_dev_cap_bg; + if (bands & BAND_A) + usr_dot_11n_dev_cap = pmadapter->usr_dot_11n_dev_cap_a; + else + usr_dot_11n_dev_cap = pmadapter->usr_dot_11n_dev_cap_bg; if (ISSUPP_CHANWIDTH40(usr_dot_11n_dev_cap)) SETHT_SUPPCHANWIDTH(ht_cap->ht_cap_info); @@ -1059,8 +1257,8 @@ wlan_fill_cap_info(mlan_private * priv, HTCap_t * ht_cap, t_u8 bands) * @return N/A */ void -wlan_fill_ht_cap_tlv(mlan_private * priv, - MrvlIETypes_HTCap_t * pht_cap, t_u8 bands) +wlan_fill_ht_cap_tlv(mlan_private *priv, + MrvlIETypes_HTCap_t *pht_cap, t_u8 bands) { mlan_adapter *pmadapter = priv->adapter; int rx_mcs_supp; @@ -1068,7 +1266,10 @@ wlan_fill_ht_cap_tlv(mlan_private * priv, ENTER(); - usr_dot_11n_dev_cap = pmadapter->usr_dot_11n_dev_cap_bg; + if (bands & BAND_A) + usr_dot_11n_dev_cap = pmadapter->usr_dot_11n_dev_cap_a; + else + usr_dot_11n_dev_cap = pmadapter->usr_dot_11n_dev_cap_bg; /* Fill HT cap info */ wlan_fill_cap_info(priv, &pht_cap->ht_cap, bands); @@ -1083,7 +1284,7 @@ wlan_fill_ht_cap_tlv(mlan_private * priv, /* Clear all the other values to get the minimum mcs set btw STA and AP */ memset(pmadapter, - (t_u8 *) & pht_cap->ht_cap.supported_mcs_set[rx_mcs_supp], 0, + (t_u8 *)&pht_cap->ht_cap.supported_mcs_set[rx_mcs_supp], 0, NUM_MCS_FIELD - rx_mcs_supp); /* Set MCS32 with 40MHz support */ if (ISSUPP_CHANWIDTH40(usr_dot_11n_dev_cap)) @@ -1111,8 +1312,7 @@ wlan_fill_ht_cap_tlv(mlan_private * priv, * @return N/A */ void -wlan_fill_ht_cap_ie(mlan_private * priv, IEEEtypes_HTCap_t * pht_cap, - t_u8 bands) +wlan_fill_ht_cap_ie(mlan_private *priv, IEEEtypes_HTCap_t *pht_cap, t_u8 bands) { mlan_adapter *pmadapter = priv->adapter; int rx_mcs_supp; @@ -1122,7 +1322,10 @@ wlan_fill_ht_cap_ie(mlan_private * priv, IEEEtypes_HTCap_t * pht_cap, pht_cap->ieee_hdr.element_id = HT_CAPABILITY; pht_cap->ieee_hdr.len = sizeof(HTCap_t); - usr_dot_11n_dev_cap = pmadapter->usr_dot_11n_dev_cap_bg; + if (bands & BAND_A) + usr_dot_11n_dev_cap = pmadapter->usr_dot_11n_dev_cap_a; + else + usr_dot_11n_dev_cap = pmadapter->usr_dot_11n_dev_cap_bg; /* Fill HT cap info */ wlan_fill_cap_info(priv, &pht_cap->ht_cap, bands); @@ -1132,12 +1335,12 @@ wlan_fill_ht_cap_ie(mlan_private * priv, IEEEtypes_HTCap_t * pht_cap, SETAMPDU_SPACING(pht_cap->ht_cap.ampdu_param, 0); rx_mcs_supp = GET_RXMCSSUPP(pmadapter->usr_dev_mcs_support); - memset(pmadapter, (t_u8 *) pht_cap->ht_cap.supported_mcs_set, 0xff, + memset(pmadapter, (t_u8 *)pht_cap->ht_cap.supported_mcs_set, 0xff, rx_mcs_supp); /* Clear all the other values to get the minimum mcs set btw STA and AP */ memset(pmadapter, - (t_u8 *) & pht_cap->ht_cap.supported_mcs_set[rx_mcs_supp], 0, + (t_u8 *)&pht_cap->ht_cap.supported_mcs_set[rx_mcs_supp], 0, NUM_MCS_FIELD - rx_mcs_supp); /* Set MCS32 with 40MHz support */ if (ISSUPP_CHANWIDTH40(usr_dot_11n_dev_cap)) @@ -1187,6 +1390,7 @@ wlan_show_dot11ndevcap(pmlan_adapter pmadapter, t_u32 cap) (ISSUPP_SHORTGI20(cap) ? "supported" : "not supported")); PRINTM(MINFO, "GET_HW_SPEC: LDPC coded packet receive %s\n", (ISSUPP_RXLDPC(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: Number of Delayed Block Ack streams = %d\n", GET_DELAYEDBACK(cap)); PRINTM(MINFO, @@ -1250,12 +1454,12 @@ wlan_show_devmcssupport(pmlan_adapter pmadapter, t_u8 support) * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_ret_11n_delba(mlan_private * priv, HostCmd_DS_COMMAND * resp) +wlan_ret_11n_delba(mlan_private *priv, HostCmd_DS_COMMAND *resp) { int tid; TxBAStreamTbl *ptx_ba_tbl; HostCmd_DS_11N_DELBA *pdel_ba = - (HostCmd_DS_11N_DELBA *) & resp->params.del_ba; + (HostCmd_DS_11N_DELBA *)&resp->params.del_ba; ENTER(); @@ -1274,8 +1478,9 @@ wlan_ret_11n_delba(mlan_private * priv, HostCmd_DS_COMMAND * resp) if (ptx_ba_tbl) wlan_send_addba(priv, ptx_ba_tbl->tid, ptx_ba_tbl->ra); } else { /* - * In case of failure, recreate the deleted stream in - * case we initiated the ADDBA + * In case of failure, recreate + * the deleted stream in case + * we initiated the ADDBA */ if (INITIATOR_BIT(pdel_ba->del_ba_param_set)) { wlan_11n_create_txbastream_tbl(priv, @@ -1309,11 +1514,11 @@ wlan_ret_11n_delba(mlan_private * priv, HostCmd_DS_COMMAND * resp) * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_ret_11n_addba_req(mlan_private * priv, HostCmd_DS_COMMAND * resp) +wlan_ret_11n_addba_req(mlan_private *priv, HostCmd_DS_COMMAND *resp) { t_u8 tid; HostCmd_DS_11N_ADDBA_RSP *padd_ba_rsp = - (HostCmd_DS_11N_ADDBA_RSP *) & resp->params.add_ba_rsp; + (HostCmd_DS_11N_ADDBA_RSP *)&resp->params.add_ba_rsp; TxBAStreamTbl *ptx_ba_tbl; raListTbl *ra_list = MNULL; @@ -1402,12 +1607,12 @@ wlan_ret_11n_addba_req(mlan_private * priv, HostCmd_DS_COMMAND * resp) * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_cmd_recfg_tx_buf(mlan_private * priv, - HostCmd_DS_COMMAND * cmd, int cmd_action, void *pdata_buf) +wlan_cmd_recfg_tx_buf(mlan_private *priv, + HostCmd_DS_COMMAND *cmd, int cmd_action, void *pdata_buf) { HostCmd_DS_TXBUF_CFG *ptx_buf = &cmd->params.tx_buf; - t_u16 action = (t_u16) cmd_action; - t_u16 buf_size = *((t_u16 *) pdata_buf); + t_u16 action = (t_u16)cmd_action; + t_u16 buf_size = *((t_u16 *)pdata_buf); ENTER(); cmd->command = wlan_cpu_to_le16(HostCmd_CMD_RECONFIGURE_TX_BUFF); @@ -1439,12 +1644,12 @@ wlan_cmd_recfg_tx_buf(mlan_private * priv, * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_cmd_amsdu_aggr_ctrl(mlan_private * priv, - HostCmd_DS_COMMAND * cmd, +wlan_cmd_amsdu_aggr_ctrl(mlan_private *priv, + HostCmd_DS_COMMAND *cmd, int cmd_action, void *pdata_buf) { HostCmd_DS_AMSDU_AGGR_CTRL *pamsdu_ctrl = &cmd->params.amsdu_aggr_ctrl; - t_u16 action = (t_u16) cmd_action; + t_u16 action = (t_u16)cmd_action; mlan_ds_11n_amsdu_aggr_ctrl *aa_ctrl = (mlan_ds_11n_amsdu_aggr_ctrl *) pdata_buf; @@ -1479,8 +1684,8 @@ wlan_cmd_amsdu_aggr_ctrl(mlan_private * priv, */ mlan_status wlan_ret_amsdu_aggr_ctrl(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { mlan_ds_11n_cfg *cfg = MNULL; HostCmd_DS_AMSDU_AGGR_CTRL *amsdu_ctrl = &resp->params.amsdu_aggr_ctrl; @@ -1488,7 +1693,7 @@ wlan_ret_amsdu_aggr_ctrl(IN pmlan_private pmpriv, ENTER(); if (pioctl_buf) { - cfg = (mlan_ds_11n_cfg *) pioctl_buf->pbuf; + cfg = (mlan_ds_11n_cfg *)pioctl_buf->pbuf; cfg->param.amsdu_aggr_ctrl.enable = wlan_le16_to_cpu(amsdu_ctrl->enable); cfg->param.amsdu_aggr_ctrl.curr_buf_size = @@ -1509,11 +1714,11 @@ wlan_ret_amsdu_aggr_ctrl(IN pmlan_private pmpriv, */ mlan_status wlan_cmd_11n_cfg(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { HostCmd_DS_11N_CFG *htcfg = &cmd->params.htcfg; - mlan_ds_11n_tx_cfg *txcfg = (mlan_ds_11n_tx_cfg *) pdata_buf; + mlan_ds_11n_tx_cfg *txcfg = (mlan_ds_11n_tx_cfg *)pdata_buf; ENTER(); cmd->command = wlan_cpu_to_le16(HostCmd_CMD_11N_CFG); @@ -1537,7 +1742,7 @@ wlan_cmd_11n_cfg(IN pmlan_private pmpriv, */ mlan_status wlan_ret_11n_cfg(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) { mlan_ds_11n_cfg *cfg = MNULL; HostCmd_DS_11N_CFG *htcfg = &resp->params.htcfg; @@ -1545,7 +1750,7 @@ wlan_ret_11n_cfg(IN pmlan_private pmpriv, ENTER(); if (pioctl_buf && (wlan_le16_to_cpu(htcfg->action) == HostCmd_ACT_GEN_GET)) { - cfg = (mlan_ds_11n_cfg *) pioctl_buf->pbuf; + cfg = (mlan_ds_11n_cfg *)pioctl_buf->pbuf; cfg->param.tx_cfg.httxcap = wlan_le16_to_cpu(htcfg->ht_tx_cap); cfg->param.tx_cfg.httxinfo = wlan_le16_to_cpu(htcfg->ht_tx_info); @@ -1567,13 +1772,13 @@ wlan_ret_11n_cfg(IN pmlan_private pmpriv, */ mlan_status wlan_cmd_reject_addba_req(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { HostCmd_DS_REJECT_ADDBA_REQ *preject_addba_req = &cmd->params.rejectaddbareq; mlan_ds_reject_addba_req *prejaddbareq = - (mlan_ds_reject_addba_req *) pdata_buf; + (mlan_ds_reject_addba_req *)pdata_buf; ENTER(); cmd->command = wlan_cpu_to_le16(HostCmd_CMD_REJECT_ADDBA_REQ); @@ -1598,8 +1803,8 @@ wlan_cmd_reject_addba_req(IN pmlan_private pmpriv, */ mlan_status wlan_ret_reject_addba_req(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { mlan_ds_11n_cfg *cfg = MNULL; HostCmd_DS_REJECT_ADDBA_REQ *preject_addba_req = @@ -1609,7 +1814,7 @@ wlan_ret_reject_addba_req(IN pmlan_private pmpriv, if (pioctl_buf && (wlan_le16_to_cpu(preject_addba_req->action) == HostCmd_ACT_GEN_GET)) { - cfg = (mlan_ds_11n_cfg *) pioctl_buf->pbuf; + cfg = (mlan_ds_11n_cfg *)pioctl_buf->pbuf; cfg->param.reject_addba_req.conditions = wlan_le32_to_cpu(preject_addba_req->conditions); } @@ -1620,7 +1825,7 @@ wlan_ret_reject_addba_req(IN pmlan_private pmpriv, /** * @brief Get second channel offset * - * @param chan channel num + * @param chan channel num * @return second channel offset */ t_u8 @@ -1675,8 +1880,8 @@ wlan_get_second_channel_offset(int chan) * @return bytes added to the buffer */ int -wlan_cmd_append_11n_tlv(IN mlan_private * pmpriv, - IN BSSDescriptor_t * pbss_desc, OUT t_u8 ** ppbuffer) +wlan_cmd_append_11n_tlv(IN mlan_private *pmpriv, + IN BSSDescriptor_t *pbss_desc, OUT t_u8 **ppbuffer) { pmlan_adapter pmadapter = pmpriv->adapter; MrvlIETypes_HTCap_t *pht_cap; @@ -1699,16 +1904,18 @@ wlan_cmd_append_11n_tlv(IN mlan_private * pmpriv, return 0; } - usr_dot_11n_dev_cap = pmadapter->usr_dot_11n_dev_cap_bg; + if (pbss_desc->bss_band & BAND_A) + usr_dot_11n_dev_cap = pmadapter->usr_dot_11n_dev_cap_a; + else + usr_dot_11n_dev_cap = pmadapter->usr_dot_11n_dev_cap_bg; if (pbss_desc->pht_cap) { - pht_cap = (MrvlIETypes_HTCap_t *) * ppbuffer; + pht_cap = (MrvlIETypes_HTCap_t *)*ppbuffer; memset(pmadapter, pht_cap, 0, sizeof(MrvlIETypes_HTCap_t)); pht_cap->header.type = wlan_cpu_to_le16(HT_CAPABILITY); pht_cap->header.len = sizeof(HTCap_t); - memcpy(pmadapter, - (t_u8 *) pht_cap + sizeof(MrvlIEtypesHeader_t), - (t_u8 *) pbss_desc->pht_cap + sizeof(IEEEtypes_Header_t), + memcpy(pmadapter, (t_u8 *)pht_cap + sizeof(MrvlIEtypesHeader_t), + (t_u8 *)pbss_desc->pht_cap + sizeof(IEEEtypes_Header_t), pht_cap->header.len); pht_cap->ht_cap.ht_cap_info = @@ -1717,7 +1924,7 @@ wlan_cmd_append_11n_tlv(IN mlan_private * pmpriv, wlan_le16_to_cpu(pht_cap->ht_cap.ht_ext_cap); wlan_fill_ht_cap_tlv(pmpriv, pht_cap, pbss_desc->bss_band); - HEXDUMP("HT_CAPABILITIES IE", (t_u8 *) pht_cap, + HEXDUMP("HT_CAPABILITIES IE", (t_u8 *)pht_cap, sizeof(MrvlIETypes_HTCap_t)); *ppbuffer += sizeof(MrvlIETypes_HTCap_t); ret_len += sizeof(MrvlIETypes_HTCap_t); @@ -1726,21 +1933,20 @@ wlan_cmd_append_11n_tlv(IN mlan_private * pmpriv, if (pbss_desc->pht_info) { if (pmpriv->bss_mode == MLAN_BSS_MODE_IBSS) { - pht_info = (MrvlIETypes_HTInfo_t *) * ppbuffer; + pht_info = (MrvlIETypes_HTInfo_t *)*ppbuffer; memset(pmadapter, pht_info, 0, sizeof(MrvlIETypes_HTInfo_t)); pht_info->header.type = wlan_cpu_to_le16(HT_OPERATION); pht_info->header.len = sizeof(HTInfo_t); memcpy(pmadapter, - (t_u8 *) pht_info + sizeof(MrvlIEtypesHeader_t), - (t_u8 *) pbss_desc->pht_info + + (t_u8 *)pht_info + sizeof(MrvlIEtypesHeader_t), + (t_u8 *)pbss_desc->pht_info + sizeof(IEEEtypes_Header_t), pht_info->header.len); - if (!ISSUPP_CHANWIDTH40(usr_dot_11n_dev_cap)) { + if (!ISSUPP_CHANWIDTH40(usr_dot_11n_dev_cap)) RESET_CHANWIDTH40(pht_info->ht_info.field2); - } *ppbuffer += sizeof(MrvlIETypes_HTInfo_t); ret_len += sizeof(MrvlIETypes_HTInfo_t); @@ -1748,7 +1954,7 @@ wlan_cmd_append_11n_tlv(IN mlan_private * pmpriv, wlan_cpu_to_le16(pht_info->header.len); } - pchan_list = (MrvlIEtypes_ChanListParamSet_t *) * ppbuffer; + pchan_list = (MrvlIEtypes_ChanListParamSet_t *)*ppbuffer; memset(pmadapter, pchan_list, 0, sizeof(MrvlIEtypes_ChanListParamSet_t)); pchan_list->header.type = wlan_cpu_to_le16(TLV_TYPE_CHANLIST); @@ -1758,7 +1964,7 @@ wlan_cmd_append_11n_tlv(IN mlan_private * pmpriv, pchan_list->chan_scan_param[0].chan_number = pbss_desc->pht_info->ht_info.pri_chan; pchan_list->chan_scan_param[0].radio_type = - wlan_band_to_radio_type((t_u8) pbss_desc->bss_band); + wlan_band_to_radio_type((t_u8)pbss_desc->bss_band); if (ISSUPP_CHANWIDTH40(usr_dot_11n_dev_cap) && ISALLOWED_CHANWIDTH40(pbss_desc->pht_info->ht_info. field2)) { @@ -1769,9 +1975,9 @@ wlan_cmd_append_11n_tlv(IN mlan_private * pmpriv, field2)); } - HEXDUMP("ChanList", (t_u8 *) pchan_list, + HEXDUMP("ChanList", (t_u8 *)pchan_list, sizeof(MrvlIEtypes_ChanListParamSet_t)); - HEXDUMP("pht_info", (t_u8 *) pbss_desc->pht_info, + HEXDUMP("pht_info", (t_u8 *)pbss_desc->pht_info, sizeof(MrvlIETypes_HTInfo_t) - 2); *ppbuffer += sizeof(MrvlIEtypes_ChanListParamSet_t); ret_len += sizeof(MrvlIEtypes_ChanListParamSet_t); @@ -1780,18 +1986,18 @@ wlan_cmd_append_11n_tlv(IN mlan_private * pmpriv, } if (pbss_desc->pbss_co_2040) { - p2040_bss_co = (MrvlIETypes_2040BSSCo_t *) * ppbuffer; + p2040_bss_co = (MrvlIETypes_2040BSSCo_t *)*ppbuffer; memset(pmadapter, p2040_bss_co, 0, sizeof(MrvlIETypes_2040BSSCo_t)); p2040_bss_co->header.type = wlan_cpu_to_le16(BSSCO_2040); p2040_bss_co->header.len = sizeof(BSSCo2040_t); memcpy(pmadapter, - (t_u8 *) p2040_bss_co + sizeof(MrvlIEtypesHeader_t), - (t_u8 *) pbss_desc->pbss_co_2040 + + (t_u8 *)p2040_bss_co + sizeof(MrvlIEtypesHeader_t), + (t_u8 *)pbss_desc->pbss_co_2040 + sizeof(IEEEtypes_Header_t), p2040_bss_co->header.len); - HEXDUMP("20/40 BSS Coexistence IE", (t_u8 *) p2040_bss_co, + HEXDUMP("20/40 BSS Coexistence IE", (t_u8 *)p2040_bss_co, sizeof(MrvlIETypes_2040BSSCo_t)); *ppbuffer += sizeof(MrvlIETypes_2040BSSCo_t); ret_len += sizeof(MrvlIETypes_2040BSSCo_t); @@ -1800,21 +2006,20 @@ wlan_cmd_append_11n_tlv(IN mlan_private * pmpriv, } if (pbss_desc->pext_cap) { - pext_cap = (MrvlIETypes_ExtCap_t *) * ppbuffer; + pext_cap = (MrvlIETypes_ExtCap_t *)*ppbuffer; memset(pmadapter, pext_cap, 0, sizeof(MrvlIETypes_ExtCap_t)); pext_cap->header.type = wlan_cpu_to_le16(EXT_CAPABILITY); pext_cap->header.len = sizeof(ExtCap_t); memcpy(pmadapter, - (t_u8 *) pext_cap + sizeof(MrvlIEtypesHeader_t), - (t_u8 *) pbss_desc->pext_cap + - sizeof(IEEEtypes_Header_t), + (t_u8 *)pext_cap + sizeof(MrvlIEtypesHeader_t), + (t_u8 *)pbss_desc->pext_cap + sizeof(IEEEtypes_Header_t), pbss_desc->pext_cap->ieee_hdr.len); if (!ISSUPP_EXTCAP_TDLS(pmpriv->ext_cap)) RESET_EXTCAP_TDLS(pext_cap->ext_cap); if (!ISSUPP_EXTCAP_INTERWORKING(pmpriv->ext_cap)) RESET_EXTCAP_INTERWORKING(pext_cap->ext_cap); - HEXDUMP("Extended Capabilities IE", (t_u8 *) pext_cap, + HEXDUMP("Extended Capabilities IE", (t_u8 *)pext_cap, sizeof(MrvlIETypes_ExtCap_t)); *ppbuffer += sizeof(MrvlIETypes_ExtCap_t); ret_len += sizeof(MrvlIETypes_ExtCap_t); @@ -1850,7 +2055,7 @@ wlan_11n_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) LEAVE(); return MLAN_STATUS_RESOURCE; } - cfg = (mlan_ds_11n_cfg *) pioctl_req->pbuf; + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; switch (cfg->sub_command) { case MLAN_OID_11N_CFG_TX: status = wlan_11n_ioctl_httxcfg(pmadapter, pioctl_req); @@ -1886,6 +2091,12 @@ wlan_11n_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) case MLAN_OID_11N_CFG_TX_BF_CAP: status = wlan_11n_ioctl_tx_bf_cap(pmadapter, pioctl_req); break; + case MLAN_OID_11N_CFG_COEX_RX_WINSIZE: + status = wlan_11n_ioctl_coex_rx_winsize(pmadapter, pioctl_req); + break; + case MLAN_OID_11N_CFG_TX_AGGR_CTRL: + status = wlan_11n_ioctl_txaggrctrl(pmadapter, pioctl_req); + break; default: pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; status = MLAN_STATUS_FAILURE; @@ -1904,8 +2115,7 @@ wlan_11n_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) * @return N/A */ void -wlan_11n_delete_txbastream_tbl_entry(mlan_private * priv, - TxBAStreamTbl * ptx_tbl) +wlan_11n_delete_txbastream_tbl_entry(mlan_private *priv, TxBAStreamTbl *ptx_tbl) { pmlan_adapter pmadapter = priv->adapter; @@ -1920,10 +2130,10 @@ wlan_11n_delete_txbastream_tbl_entry(mlan_private * priv, PRINTM(MINFO, "Delete BA stream table entry: %p\n", ptx_tbl); util_unlink_list(pmadapter->pmoal_handle, &priv->tx_ba_stream_tbl_ptr, - (pmlan_linked_list) ptx_tbl, MNULL, MNULL); + (pmlan_linked_list)ptx_tbl, MNULL, MNULL); pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) ptx_tbl); + (t_u8 *)ptx_tbl); exit: pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, @@ -1939,7 +2149,7 @@ wlan_11n_delete_txbastream_tbl_entry(mlan_private * priv, * @return N/A */ void -wlan_11n_deleteall_txbastream_tbl(mlan_private * priv) +wlan_11n_deleteall_txbastream_tbl(mlan_private *priv) { int i; TxBAStreamTbl *del_tbl_ptr = MNULL; @@ -1954,7 +2164,7 @@ wlan_11n_deleteall_txbastream_tbl(mlan_private * priv) wlan_11n_delete_txbastream_tbl_entry(priv, del_tbl_ptr); } - util_init_list((pmlan_linked_list) & priv->tx_ba_stream_tbl_ptr); + util_init_list((pmlan_linked_list)&priv->tx_ba_stream_tbl_ptr); for (i = 0; i < MAX_NUM_TID; ++i) { priv->aggr_prio_tbl[i].ampdu_ap = @@ -1969,32 +2179,32 @@ wlan_11n_deleteall_txbastream_tbl(mlan_private * priv) * table which matches the give RA/TID pair * * @param priv A pointer to mlan_private - * @param tid TID to find in reordering table + * @param tid TID to find in reordering table * @param ra RA to find in reordering table * * @return A pointer to first entry matching RA/TID in BA stream * NULL if not found */ TxBAStreamTbl * -wlan_11n_get_txbastream_tbl(mlan_private * priv, int tid, t_u8 * ra) +wlan_11n_get_txbastream_tbl(mlan_private *priv, int tid, t_u8 *ra) { TxBAStreamTbl *ptx_tbl; pmlan_adapter pmadapter = priv->adapter; ENTER(); - ptx_tbl = (TxBAStreamTbl *) util_peek_list(pmadapter->pmoal_handle, - &priv->tx_ba_stream_tbl_ptr, - pmadapter->callbacks. - moal_spin_lock, - pmadapter->callbacks. - moal_spin_unlock); + ptx_tbl = (TxBAStreamTbl *)util_peek_list(pmadapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); if (!ptx_tbl) { LEAVE(); return MNULL; } - while (ptx_tbl != (TxBAStreamTbl *) & priv->tx_ba_stream_tbl_ptr) { + while (ptx_tbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { PRINTM(MDAT_D, "get_txbastream_tbl TID %d\n", ptx_tbl->tid); DBG_HEXDUMP(MDAT_D, "RA", ptx_tbl->ra, MLAN_MAC_ADDR_LENGTH); @@ -2018,14 +2228,14 @@ wlan_11n_get_txbastream_tbl(mlan_private * priv, int tid, t_u8 * ra) * * @param priv A pointer to mlan_private * @param ra RA to find in reordering table - * @param tid TID to find in reordering table + * @param tid TID to find in reordering table * @param ba_status BA stream status to create the stream with * * @return N/A */ void -wlan_11n_create_txbastream_tbl(mlan_private * priv, - t_u8 * ra, int tid, baStatus_e ba_status) +wlan_11n_create_txbastream_tbl(mlan_private *priv, + t_u8 *ra, int tid, baStatus_e ba_status) { TxBAStreamTbl *new_node = MNULL; pmlan_adapter pmadapter = priv->adapter; @@ -2038,13 +2248,13 @@ wlan_11n_create_txbastream_tbl(mlan_private * priv, if (pmadapter->callbacks. moal_malloc(pmadapter->pmoal_handle, sizeof(TxBAStreamTbl), - MLAN_MEM_DEF, (t_u8 **) & new_node)) { + MLAN_MEM_DEF, (t_u8 **)&new_node)) { PRINTM(MERROR, "wlan_11n_create_txbastream_tbl Failed to allocate new_node\n"); LEAVE(); return; } - util_init_list((pmlan_linked_list) new_node); + util_init_list((pmlan_linked_list)new_node); new_node->tid = tid; new_node->ba_status = ba_status; @@ -2052,7 +2262,7 @@ wlan_11n_create_txbastream_tbl(mlan_private * priv, util_enqueue_list_tail(pmadapter->pmoal_handle, &priv->tx_ba_stream_tbl_ptr, - (pmlan_linked_list) new_node, + (pmlan_linked_list)new_node, pmadapter->callbacks.moal_spin_lock, pmadapter->callbacks.moal_spin_unlock); } @@ -2064,13 +2274,13 @@ wlan_11n_create_txbastream_tbl(mlan_private * priv, * @brief This function will send a block ack to given tid/ra * * @param priv A pointer to mlan_private - * @param tid TID to send the ADDBA + * @param tid TID to send the ADDBA * @param peer_mac MAC address to send the ADDBA * * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ int -wlan_send_addba(mlan_private * priv, int tid, t_u8 * peer_mac) +wlan_send_addba(mlan_private *priv, int tid, t_u8 *peer_mac) { HostCmd_DS_11N_ADDBA_REQ add_ba_req; static t_u8 dialog_tok; @@ -2082,15 +2292,15 @@ wlan_send_addba(mlan_private * priv, int tid, t_u8 * peer_mac) DBG_HEXDUMP(MCMD_D, "Send addba RA", peer_mac, MLAN_MAC_ADDR_LENGTH); add_ba_req.block_ack_param_set = - (t_u16) ((tid << BLOCKACKPARAM_TID_POS) | - (priv->add_ba_param. - tx_win_size << BLOCKACKPARAM_WINSIZE_POS) | - IMMEDIATE_BLOCK_ACK); + (t_u16)((tid << BLOCKACKPARAM_TID_POS) | + (priv->add_ba_param. + tx_win_size << BLOCKACKPARAM_WINSIZE_POS) | + IMMEDIATE_BLOCK_ACK); /** enable AMSDU inside AMPDU */ if (priv->add_ba_param.tx_amsdu && (priv->aggr_prio_tbl[tid].amsdu != BA_STREAM_NOT_ALLOWED)) add_ba_req.block_ack_param_set |= BLOCKACKPARAM_AMSDU_SUPP_MASK; - add_ba_req.block_ack_tmo = (t_u16) priv->add_ba_param.timeout; + add_ba_req.block_ack_tmo = (t_u16)priv->add_ba_param.timeout; ++dialog_tok; @@ -2121,8 +2331,8 @@ wlan_send_addba(mlan_private * priv, int tid, t_u8 * peer_mac) * @return MLAN_STATUS_PENDING --success, otherwise fail */ int -wlan_send_delba(mlan_private * priv, pmlan_ioctl_req pioctl_req, int tid, - t_u8 * peer_mac, int initiator) +wlan_send_delba(mlan_private *priv, pmlan_ioctl_req pioctl_req, int tid, + t_u8 *peer_mac, int initiator) { HostCmd_DS_11N_DELBA delba; mlan_status ret; @@ -2141,8 +2351,8 @@ wlan_send_delba(mlan_private * priv, pmlan_ioctl_req pioctl_req, int tid, MLAN_MAC_ADDR_LENGTH); ret = wlan_prepare_cmd(priv, HostCmd_CMD_11N_DELBA, - HostCmd_ACT_GEN_SET, 0, (t_void *) pioctl_req, - (t_void *) & delba); + HostCmd_ACT_GEN_SET, 0, (t_void *)pioctl_req, + (t_void *)&delba); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -2153,7 +2363,7 @@ wlan_send_delba(mlan_private * priv, pmlan_ioctl_req pioctl_req, int tid, /** * @brief This function handles the command response of - * delete a block ack request + * delete a block ack request * * @param priv A pointer to mlan_private structure * @param del_ba A pointer to command response buffer @@ -2161,14 +2371,14 @@ wlan_send_delba(mlan_private * priv, pmlan_ioctl_req pioctl_req, int tid, * @return N/A */ void -wlan_11n_delete_bastream(mlan_private * priv, t_u8 * del_ba) +wlan_11n_delete_bastream(mlan_private *priv, t_u8 *del_ba) { - HostCmd_DS_11N_DELBA *pdel_ba = (HostCmd_DS_11N_DELBA *) del_ba; + HostCmd_DS_11N_DELBA *pdel_ba = (HostCmd_DS_11N_DELBA *)del_ba; int tid; ENTER(); - DBG_HEXDUMP(MCMD_D, "Delba:", (t_u8 *) pdel_ba, 20); + DBG_HEXDUMP(MCMD_D, "Delba:", (t_u8 *)pdel_ba, 20); pdel_ba->del_ba_param_set = wlan_le16_to_cpu(pdel_ba->del_ba_param_set); pdel_ba->reason_code = wlan_le16_to_cpu(pdel_ba->reason_code); @@ -2189,7 +2399,7 @@ wlan_11n_delete_bastream(mlan_private * priv, t_u8 * del_ba) * @return number of rx reorder table entry */ int -wlan_get_rxreorder_tbl(mlan_private * priv, rx_reorder_tbl * buf) +wlan_get_rxreorder_tbl(mlan_private *priv, rx_reorder_tbl *buf) { int i; rx_reorder_tbl *ptbl = buf; @@ -2197,19 +2407,18 @@ wlan_get_rxreorder_tbl(mlan_private * priv, rx_reorder_tbl * buf) int count = 0; ENTER(); rx_reorder_tbl_ptr = - (RxReorderTbl *) util_peek_list(priv->adapter->pmoal_handle, - &priv->rx_reorder_tbl_ptr, - priv->adapter->callbacks. - moal_spin_lock, - priv->adapter->callbacks. - moal_spin_unlock); + (RxReorderTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->rx_reorder_tbl_ptr, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); if (!rx_reorder_tbl_ptr) { LEAVE(); return count; } - while (rx_reorder_tbl_ptr != - (RxReorderTbl *) & priv->rx_reorder_tbl_ptr) { - ptbl->tid = (t_u16) rx_reorder_tbl_ptr->tid; + while (rx_reorder_tbl_ptr != (RxReorderTbl *)&priv->rx_reorder_tbl_ptr) { + ptbl->tid = (t_u16)rx_reorder_tbl_ptr->tid; memcpy(priv->adapter, ptbl->ta, rx_reorder_tbl_ptr->ta, MLAN_MAC_ADDR_LENGTH); ptbl->start_win = rx_reorder_tbl_ptr->start_win; @@ -2239,7 +2448,7 @@ wlan_get_rxreorder_tbl(mlan_private * priv, rx_reorder_tbl * buf) * @return number of ba stream table entry */ int -wlan_get_txbastream_tbl(mlan_private * priv, tx_ba_stream_tbl * buf) +wlan_get_txbastream_tbl(mlan_private *priv, tx_ba_stream_tbl *buf) { TxBAStreamTbl *ptxtbl; tx_ba_stream_tbl *ptbl = buf; @@ -2247,19 +2456,19 @@ wlan_get_txbastream_tbl(mlan_private * priv, tx_ba_stream_tbl * buf) ENTER(); - ptxtbl = (TxBAStreamTbl *) util_peek_list(priv->adapter->pmoal_handle, - &priv->tx_ba_stream_tbl_ptr, - priv->adapter->callbacks. - moal_spin_lock, - priv->adapter->callbacks. - moal_spin_unlock); + ptxtbl = (TxBAStreamTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); if (!ptxtbl) { LEAVE(); return count; } - while (ptxtbl != (TxBAStreamTbl *) & priv->tx_ba_stream_tbl_ptr) { - ptbl->tid = (t_u16) ptxtbl->tid; + while (ptxtbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { + ptbl->tid = (t_u16)ptxtbl->tid; PRINTM(MINFO, "tid=%d\n", ptbl->tid); memcpy(priv->adapter, ptbl->ra, ptxtbl->ra, MLAN_MAC_ADDR_LENGTH); @@ -2283,7 +2492,7 @@ wlan_get_txbastream_tbl(mlan_private * priv, tx_ba_stream_tbl * buf) * @return N/A */ void -wlan_11n_cleanup_txbastream_tbl(mlan_private * priv, t_u8 * ra) +wlan_11n_cleanup_txbastream_tbl(mlan_private *priv, t_u8 *ra) { TxBAStreamTbl *ptx_tbl = MNULL; t_u8 i; diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n.h old mode 100755 new mode 100644 index 2717189d..7097d26a --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n.h @@ -39,103 +39,104 @@ void wlan_show_dot11ndevcap(pmlan_adapter pmadapter, t_u32 cap); /** Print the 802.11n device MCS */ void wlan_show_devmcssupport(pmlan_adapter pmadapter, t_u8 support); /** Handle the command response of a delete block ack request */ -mlan_status wlan_ret_11n_delba(mlan_private * priv, HostCmd_DS_COMMAND * resp); +mlan_status wlan_ret_11n_delba(mlan_private *priv, HostCmd_DS_COMMAND *resp); /** Handle the command response of an add block ack request */ -mlan_status wlan_ret_11n_addba_req(mlan_private * priv, - HostCmd_DS_COMMAND * resp); +mlan_status wlan_ret_11n_addba_req(mlan_private *priv, + HostCmd_DS_COMMAND *resp); /** Handle the command response of 11ncfg command */ mlan_status wlan_ret_11n_cfg(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); /** Prepare 11ncfg command */ mlan_status wlan_cmd_11n_cfg(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, IN t_u16 cmd_action, - IN t_void * pdata_buf); + IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action, + IN t_void *pdata_buf); /** Prepare reject addba requst command */ mlan_status wlan_cmd_reject_addba_req(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, + IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action, - IN t_void * pdata_buf); + IN t_void *pdata_buf); /** Handle the command response of rejecting addba request */ mlan_status wlan_ret_reject_addba_req(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); /** Prepare TX BF configuration command */ mlan_status wlan_cmd_tx_bf_cfg(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf); + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf); /** Handle the command response TX BF configuration */ mlan_status wlan_ret_tx_bf_cfg(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); #ifdef STA_SUPPORT /** Append the 802_11N tlv */ -int wlan_cmd_append_11n_tlv(IN mlan_private * pmpriv, - IN BSSDescriptor_t * pbss_desc, - OUT t_u8 ** ppbuffer); +int wlan_cmd_append_11n_tlv(IN mlan_private *pmpriv, + IN BSSDescriptor_t *pbss_desc, OUT t_u8 **ppbuffer); /** wlan fill HT cap tlv */ -void wlan_fill_ht_cap_tlv(mlan_private * priv, MrvlIETypes_HTCap_t * pht_cap, +void wlan_fill_ht_cap_tlv(mlan_private *priv, MrvlIETypes_HTCap_t *pht_cap, t_u8 band); /** wlan fill HT cap IE */ -void wlan_fill_ht_cap_ie(mlan_private * priv, IEEEtypes_HTCap_t * pht_cap, +void wlan_fill_ht_cap_ie(mlan_private *priv, IEEEtypes_HTCap_t *pht_cap, t_u8 bands); #endif /* STA_SUPPORT */ /** Miscellaneous configuration handler */ mlan_status wlan_11n_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); /** Delete Tx BA stream table entry */ -void wlan_11n_delete_txbastream_tbl_entry(mlan_private * priv, - TxBAStreamTbl * ptx_tbl); +void wlan_11n_delete_txbastream_tbl_entry(mlan_private *priv, + TxBAStreamTbl *ptx_tbl); /** Delete all Tx BA stream table entries */ -void wlan_11n_deleteall_txbastream_tbl(mlan_private * priv); +void wlan_11n_deleteall_txbastream_tbl(mlan_private *priv); /** Get Tx BA stream table */ -TxBAStreamTbl *wlan_11n_get_txbastream_tbl(mlan_private * priv, int tid, - t_u8 * ra); +TxBAStreamTbl *wlan_11n_get_txbastream_tbl(mlan_private *priv, int tid, + t_u8 *ra); /** Create Tx BA stream table */ -void wlan_11n_create_txbastream_tbl(mlan_private * priv, t_u8 * ra, int tid, +void wlan_11n_create_txbastream_tbl(mlan_private *priv, t_u8 *ra, int tid, baStatus_e ba_status); /** Send ADD BA request */ -int wlan_send_addba(mlan_private * priv, int tid, t_u8 * peer_mac); +int wlan_send_addba(mlan_private *priv, int tid, t_u8 *peer_mac); /** Send DEL BA request */ -int wlan_send_delba(mlan_private * priv, pmlan_ioctl_req pioctl_req, int tid, - t_u8 * peer_mac, int initiator); +int wlan_send_delba(mlan_private *priv, pmlan_ioctl_req pioctl_req, int tid, + t_u8 *peer_mac, int initiator); /** This function handles the command response of delete a block ack request*/ -void wlan_11n_delete_bastream(mlan_private * priv, t_u8 * del_ba); +void wlan_11n_delete_bastream(mlan_private *priv, t_u8 *del_ba); /** get rx reorder table */ -int wlan_get_rxreorder_tbl(mlan_private * priv, rx_reorder_tbl * buf); +int wlan_get_rxreorder_tbl(mlan_private *priv, rx_reorder_tbl *buf); /** get tx ba stream table */ -int wlan_get_txbastream_tbl(mlan_private * priv, tx_ba_stream_tbl * buf); +int wlan_get_txbastream_tbl(mlan_private *priv, tx_ba_stream_tbl *buf); /** send delba */ -void wlan_11n_delba(mlan_private * priv, int tid); +void wlan_11n_delba(mlan_private *priv, int tid); +/** update amdpdu tx win size */ +void wlan_update_ampdu_txwinsize(pmlan_adapter pmadapter); /** Minimum number of AMSDU */ #define MIN_NUM_AMSDU 2 /** AMSDU Aggr control cmd resp */ mlan_status wlan_ret_amsdu_aggr_ctrl(pmlan_private pmpriv, - HostCmd_DS_COMMAND * resp, - mlan_ioctl_req * pioctl_buf); + HostCmd_DS_COMMAND *resp, + mlan_ioctl_req *pioctl_buf); /** reconfigure tx buf size */ -mlan_status wlan_cmd_recfg_tx_buf(mlan_private * priv, - HostCmd_DS_COMMAND * cmd, +mlan_status wlan_cmd_recfg_tx_buf(mlan_private *priv, + HostCmd_DS_COMMAND *cmd, int cmd_action, void *pdata_buf); /** AMSDU aggr control cmd */ -mlan_status wlan_cmd_amsdu_aggr_ctrl(mlan_private * priv, - HostCmd_DS_COMMAND * cmd, +mlan_status wlan_cmd_amsdu_aggr_ctrl(mlan_private *priv, + HostCmd_DS_COMMAND *cmd, int cmd_action, void *pdata_buf); /** get channel offset */ t_u8 wlan_get_second_channel_offset(int chan); /** clean up txbastream_tbl */ -void wlan_11n_cleanup_txbastream_tbl(mlan_private * priv, t_u8 * ra); +void wlan_11n_cleanup_txbastream_tbl(mlan_private *priv, t_u8 *ra); /** * @brief This function checks whether a station has 11N enabled or not * * @param priv A pointer to mlan_private * @param mac station mac address - * @return MTRUE or MFALSE + * @return MTRUE or MFALSE */ static INLINE t_u8 -is_station_11n_enabled(mlan_private * priv, t_u8 * mac) +is_station_11n_enabled(mlan_private *priv, t_u8 *mac) { sta_node *sta_ptr = MNULL; sta_ptr = wlan_get_station_entry(priv, mac); @@ -152,7 +153,7 @@ is_station_11n_enabled(mlan_private * priv, t_u8 * mac) * @return max amsdu size statio supported */ static INLINE t_u16 -get_station_max_amsdu_size(mlan_private * priv, t_u8 * mac) +get_station_max_amsdu_size(mlan_private *priv, t_u8 *mac) { sta_node *sta_ptr = MNULL; sta_ptr = wlan_get_station_entry(priv, mac); @@ -170,7 +171,7 @@ get_station_max_amsdu_size(mlan_private * priv, t_u8 * mac) * @return MTRUE or MFALSE */ static INLINE t_u8 -is_station_ampdu_allowed(mlan_private * priv, raListTbl * ptr, int tid) +is_station_ampdu_allowed(mlan_private *priv, raListTbl *ptr, int tid) { sta_node *sta_ptr = MNULL; sta_ptr = wlan_get_station_entry(priv, ptr->ra); @@ -195,7 +196,7 @@ is_station_ampdu_allowed(mlan_private * priv, raListTbl * ptr, int tid) * @return N/A */ static INLINE void -disable_station_ampdu(mlan_private * priv, t_u8 tid, t_u8 * ra) +disable_station_ampdu(mlan_private *priv, t_u8 tid, t_u8 *ra) { sta_node *sta_ptr = MNULL; sta_ptr = wlan_get_station_entry(priv, ra); @@ -213,22 +214,22 @@ disable_station_ampdu(mlan_private * priv, t_u8 tid, t_u8 * ra) * @return MTRUE or MFALSE */ static INLINE t_u8 -wlan_is_cur_bastream_high_prio(mlan_private * priv, int tid) +wlan_is_cur_bastream_high_prio(mlan_private *priv, int tid) { TxBAStreamTbl *ptx_tbl; ENTER(); - ptx_tbl = (TxBAStreamTbl *) util_peek_list(priv->adapter->pmoal_handle, - &priv->tx_ba_stream_tbl_ptr, - priv->adapter->callbacks. - moal_spin_lock, - priv->adapter->callbacks. - moal_spin_unlock); + ptx_tbl = (TxBAStreamTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); if (!ptx_tbl) return MFALSE; - while (ptx_tbl != (TxBAStreamTbl *) & priv->tx_ba_stream_tbl_ptr) { + while (ptx_tbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { if (priv->aggr_prio_tbl[tid].ampdu_user > priv->aggr_prio_tbl[ptx_tbl->tid].ampdu_user) { LEAVE(); @@ -252,7 +253,7 @@ wlan_is_cur_bastream_high_prio(mlan_private * priv, int tid) * @return MTRUE or MFALSE */ static INLINE t_u8 -wlan_is_ampdu_allowed(mlan_private * priv, raListTbl * ptr, int tid) +wlan_is_ampdu_allowed(mlan_private *priv, raListTbl *ptr, int tid) { #ifdef UAP_SUPPORT if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) @@ -262,6 +263,8 @@ wlan_is_ampdu_allowed(mlan_private * priv, raListTbl * ptr, int tid) return MFALSE; if (ptr->is_tdls_link) return is_station_ampdu_allowed(priv, ptr, tid); + if (priv->adapter->tdls_status != TDLS_NOT_SETUP && !priv->txaggrctrl) + return MFALSE; return (priv->aggr_prio_tbl[tid].ampdu_ap != BA_STREAM_NOT_ALLOWED) ? MTRUE : MFALSE; @@ -277,7 +280,7 @@ wlan_is_ampdu_allowed(mlan_private * priv, raListTbl * ptr, int tid) * @return MTRUE or MFALSE */ static int INLINE -wlan_is_amsdu_in_ampdu_allowed(mlan_private * priv, raListTbl * ptr, int tid) +wlan_is_amsdu_in_ampdu_allowed(mlan_private *priv, raListTbl *ptr, int tid) { TxBAStreamTbl *ptx_tbl; ENTER(); @@ -300,7 +303,7 @@ wlan_is_amsdu_in_ampdu_allowed(mlan_private * priv, raListTbl * ptr, int tid) * @return MTRUE or MFALSE */ static INLINE t_u8 -wlan_is_amsdu_allowed(mlan_private * priv, raListTbl * ptr, int tid) +wlan_is_amsdu_allowed(mlan_private *priv, raListTbl *ptr, int tid) { #ifdef UAP_SUPPORT sta_node *sta_ptr = MNULL; @@ -315,9 +318,9 @@ wlan_is_amsdu_allowed(mlan_private * priv, raListTbl * ptr, int tid) #endif /* UAP_SUPPORT */ #define TXRATE_BITMAP_INDEX_MCS0_7 2 return ((priv->aggr_prio_tbl[tid].amsdu != BA_STREAM_NOT_ALLOWED) - && ((priv->is_data_rate_auto) - || !((priv->bitmap_rates[TXRATE_BITMAP_INDEX_MCS0_7]) & - 0x03))) ? MTRUE : MFALSE; + &&((priv->is_data_rate_auto) + || !((priv->bitmap_rates[TXRATE_BITMAP_INDEX_MCS0_7]) & + 0x03))) ? MTRUE : MFALSE; } /** @@ -328,7 +331,7 @@ wlan_is_amsdu_allowed(mlan_private * priv, raListTbl * ptr, int tid) * @return MTRUE or MFALSE */ static INLINE t_u8 -wlan_is_bastream_avail(mlan_private * priv) +wlan_is_bastream_avail(mlan_private *priv) { mlan_private *pmpriv = MNULL; t_u8 i = 0; @@ -338,7 +341,7 @@ wlan_is_bastream_avail(mlan_private * priv) if (pmpriv) bastream_num += wlan_wmm_list_len(priv->adapter, - (pmlan_list_head) & pmpriv-> + (pmlan_list_head)&pmpriv-> tx_ba_stream_tbl_ptr); } return (bastream_num < MLAN_MAX_TX_BASTREAM_SUPPORTED) ? MTRUE : MFALSE; @@ -356,8 +359,8 @@ wlan_is_bastream_avail(mlan_private * priv) * @return MTRUE or MFALSE */ static INLINE t_u8 -wlan_find_stream_to_delete(mlan_private * priv, - raListTbl * ptr, int ptr_tid, int *ptid, t_u8 * ra) +wlan_find_stream_to_delete(mlan_private *priv, + raListTbl *ptr, int ptr_tid, int *ptid, t_u8 *ra) { int tid; t_u8 ret = MFALSE; @@ -365,12 +368,12 @@ wlan_find_stream_to_delete(mlan_private * priv, ENTER(); - ptx_tbl = (TxBAStreamTbl *) util_peek_list(priv->adapter->pmoal_handle, - &priv->tx_ba_stream_tbl_ptr, - priv->adapter->callbacks. - moal_spin_lock, - priv->adapter->callbacks. - moal_spin_unlock); + ptx_tbl = (TxBAStreamTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); if (!ptx_tbl) { LEAVE(); return ret; @@ -378,7 +381,7 @@ wlan_find_stream_to_delete(mlan_private * priv, tid = priv->aggr_prio_tbl[ptr_tid].ampdu_user; - while (ptx_tbl != (TxBAStreamTbl *) & priv->tx_ba_stream_tbl_ptr) { + while (ptx_tbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { if (tid > priv->aggr_prio_tbl[ptx_tbl->tid].ampdu_user) { tid = priv->aggr_prio_tbl[ptx_tbl->tid].ampdu_user; *ptid = ptx_tbl->tid; @@ -404,7 +407,7 @@ wlan_find_stream_to_delete(mlan_private * priv, * @return MTRUE or MFALSE */ static int INLINE -wlan_is_bastream_setup(mlan_private * priv, raListTbl * ptr, int tid) +wlan_is_bastream_setup(mlan_private *priv, raListTbl *ptr, int tid) { TxBAStreamTbl *ptx_tbl; @@ -429,7 +432,7 @@ wlan_is_bastream_setup(mlan_private * priv, raListTbl * ptr, int tid) * @return MTRUE or MFALSE */ static int INLINE -wlan_is_11n_enabled(mlan_private * priv, t_u8 * ra) +wlan_is_11n_enabled(mlan_private *priv, t_u8 *ra) { int ret = MFALSE; ENTER(); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n_aggr.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n_aggr.c old mode 100755 new mode 100644 index a60869a9..aa703d79 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n_aggr.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n_aggr.c @@ -58,7 +58,7 @@ Change log: * @return Final packet size */ static int -wlan_11n_form_amsdu_pkt(pmlan_adapter pmadapter, t_u8 * amsdu_buf, t_u8 * data, +wlan_11n_form_amsdu_pkt(pmlan_adapter pmadapter, t_u8 *amsdu_buf, t_u8 *data, int pkt_len, int *pad) { int dt_offset, amsdu_buf_offset; @@ -79,14 +79,14 @@ wlan_11n_form_amsdu_pkt(pmlan_adapter pmadapter, t_u8 * amsdu_buf, t_u8 * data, memcpy(pmadapter, amsdu_buf, data, (MLAN_MAC_ADDR_LENGTH) * 2); dt_offset = amsdu_buf_offset = (MLAN_MAC_ADDR_LENGTH) * 2; - snap.snap_type = *(t_u16 *) (data + dt_offset); + snap.snap_type = *(t_u16 *)(data + dt_offset); dt_offset += sizeof(t_u16); - *(t_u16 *) (amsdu_buf + amsdu_buf_offset) = mlan_htons(pkt_len + - LLC_SNAP_LEN - - ((2 * - MLAN_MAC_ADDR_LENGTH) - + - sizeof(t_u16))); + *(t_u16 *)(amsdu_buf + amsdu_buf_offset) = mlan_htons(pkt_len + + LLC_SNAP_LEN - + ((2 * + MLAN_MAC_ADDR_LENGTH) + + + sizeof(t_u16))); amsdu_buf_offset += sizeof(t_u16); memcpy(pmadapter, amsdu_buf + amsdu_buf_offset, &snap, LLC_SNAP_LEN); amsdu_buf_offset += LLC_SNAP_LEN; @@ -110,20 +110,20 @@ wlan_11n_form_amsdu_pkt(pmlan_adapter pmadapter, t_u8 * amsdu_buf, t_u8 * data, * @return N/A */ static void -wlan_11n_form_amsdu_txpd(mlan_private * priv, mlan_buffer * mbuf) +wlan_11n_form_amsdu_txpd(mlan_private *priv, mlan_buffer *mbuf) { TxPD *ptx_pd; mlan_adapter *pmadapter = priv->adapter; ENTER(); - ptx_pd = (TxPD *) mbuf->pbuf; + ptx_pd = (TxPD *)mbuf->pbuf; memset(pmadapter, ptx_pd, 0, sizeof(TxPD)); /* * Original priority has been overwritten */ - ptx_pd->priority = (t_u8) mbuf->priority; + ptx_pd->priority = (t_u8)mbuf->priority; ptx_pd->pkt_delay_2ms = wlan_wmm_compute_driver_packet_delay(priv, mbuf); ptx_pd->bss_num = GET_BSS_NUM(priv); @@ -131,7 +131,8 @@ wlan_11n_form_amsdu_txpd(mlan_private * priv, mlan_buffer * mbuf) /* Always zero as the data is followed by TxPD */ ptx_pd->tx_pkt_offset = sizeof(TxPD); ptx_pd->tx_pkt_type = PKT_TYPE_AMSDU; - + if (mbuf->flags & MLAN_BUF_FLAG_TDLS) + ptx_pd->flags = MRVDRV_TxPD_FLAGS_TDLS_PACKET; if (ptx_pd->tx_control == 0) /* TxCtrl set by user or default */ ptx_pd->tx_control = priv->pkt_tx_ctrl; @@ -151,20 +152,20 @@ wlan_11n_form_amsdu_txpd(mlan_private * priv, mlan_buffer * mbuf) * @return N/A */ static INLINE void -wlan_11n_update_pktlen_amsdu_txpd(mlan_private * priv, pmlan_buffer mbuf) +wlan_11n_update_pktlen_amsdu_txpd(mlan_private *priv, pmlan_buffer mbuf) { TxPD *ptx_pd; ENTER(); - ptx_pd = (TxPD *) mbuf->pbuf; + ptx_pd = (TxPD *)mbuf->pbuf; ptx_pd->tx_pkt_length = - (t_u16) wlan_cpu_to_le16(mbuf->data_len - sizeof(TxPD)); + (t_u16)wlan_cpu_to_le16(mbuf->data_len - sizeof(TxPD)); #ifdef STA_SUPPORT if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) && (priv->adapter->pps_uapsd_mode)) { if (MTRUE == wlan_check_last_packet_indication(priv)) { priv->adapter->tx_lock_flag = MTRUE; - ptx_pd->flags = MRVDRV_TxPD_POWER_MGMT_LAST_PACKET; + ptx_pd->flags |= MRVDRV_TxPD_POWER_MGMT_LAST_PACKET; } } #endif /* STA_SUPPORT */ @@ -180,7 +181,7 @@ wlan_11n_update_pktlen_amsdu_txpd(mlan_private * priv, pmlan_buffer mbuf) * @return Number of packets */ static int -wlan_11n_get_num_aggrpkts(t_u8 * data, int total_pkt_len) +wlan_11n_get_num_aggrpkts(t_u8 *data, int total_pkt_len) { int pkt_count = 0, pkt_len, pad; t_u8 hdr_len = sizeof(Eth803Hdr_t); @@ -188,8 +189,8 @@ wlan_11n_get_num_aggrpkts(t_u8 * data, int total_pkt_len) ENTER(); while (total_pkt_len >= hdr_len) { /* Length will be in network format, change it to host */ - pkt_len = mlan_ntohs((*(t_u16 *) (data + (2 * - MLAN_MAC_ADDR_LENGTH)))); + pkt_len = mlan_ntohs((*(t_u16 *)(data + (2 * + MLAN_MAC_ADDR_LENGTH)))); if (pkt_len > total_pkt_len) { PRINTM(MERROR, "Error in packet length.\n"); break; @@ -218,7 +219,7 @@ wlan_11n_get_num_aggrpkts(t_u8 * data, int total_pkt_len) * @return MLAN_STATUS_SUCCESS --success, otherwise fail */ mlan_status -wlan_11n_deaggregate_pkt(mlan_private * priv, pmlan_buffer pmbuf) +wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf) { t_u16 pkt_len; int total_pkt_len; @@ -236,7 +237,7 @@ wlan_11n_deaggregate_pkt(mlan_private * priv, pmlan_buffer pmbuf) ENTER(); - data = (t_u8 *) (pmbuf->pbuf + pmbuf->data_offset); + data = (t_u8 *)(pmbuf->pbuf + pmbuf->data_offset); total_pkt_len = pmbuf->data_len; /* Sanity test */ @@ -249,10 +250,10 @@ wlan_11n_deaggregate_pkt(mlan_private * priv, pmlan_buffer pmbuf) pmbuf->use_count = wlan_11n_get_num_aggrpkts(data, total_pkt_len); while (total_pkt_len >= hdr_len) { - prx_pkt = (RxPacketHdr_t *) data; + prx_pkt = (RxPacketHdr_t *)data; /* Length will be in network format, change it to host */ - pkt_len = mlan_ntohs((*(t_u16 *) (data + (2 * - MLAN_MAC_ADDR_LENGTH)))); + pkt_len = mlan_ntohs((*(t_u16 *)(data + (2 * + MLAN_MAC_ADDR_LENGTH)))); if (pkt_len > total_pkt_len) { PRINTM(MERROR, "Error in packet length: total_pkt_len = %d, pkt_len = %d\n", @@ -272,8 +273,8 @@ wlan_11n_deaggregate_pkt(mlan_private * priv, pmlan_buffer pmbuf) data += LLC_SNAP_LEN; pkt_len += sizeof(Eth803Hdr_t) - LLC_SNAP_LEN; } else { - *(t_u16 *) (data + (2 * MLAN_MAC_ADDR_LENGTH)) - = (t_u16) 0; + *(t_u16 *)(data + (2 * MLAN_MAC_ADDR_LENGTH)) + = (t_u16)0; pkt_len += sizeof(Eth803Hdr_t); } daggr_mbuf = @@ -329,17 +330,17 @@ wlan_11n_deaggregate_pkt(mlan_private * priv, pmlan_buffer pmbuf) /** * @brief Aggregate multiple packets into one single AMSDU packet * - * @param priv A pointer to mlan_private structure - * @param pra_list Pointer to the RA List table containing the pointers + * @param priv A pointer to mlan_private structure + * @param pra_list Pointer to the RA List table containing the pointers * to packets. - * @param headroom Any interface specific headroom that may be need. TxPD + * @param headroom Any interface specific headroom that may be need. TxPD * will be formed leaving this headroom. - * @param ptrindex Pointer index + * @param ptrindex Pointer index * - * @return Final packet size or MLAN_STATUS_FAILURE + * @return Final packet size or MLAN_STATUS_FAILURE */ int -wlan_11n_aggregate_pkt(mlan_private * priv, raListTbl * pra_list, +wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list, int headroom, int ptrindex) { int pkt_size = 0; @@ -361,9 +362,8 @@ wlan_11n_aggregate_pkt(mlan_private * priv, raListTbl * pra_list, PRINTM(MDAT_D, "Handling Aggr packet\n"); pmbuf_src = - (pmlan_buffer) util_peek_list(pmadapter->pmoal_handle, - &pra_list->buf_head, MNULL, - MNULL); + (pmlan_buffer)util_peek_list(pmadapter->pmoal_handle, + &pra_list->buf_head, MNULL, MNULL); if (pmbuf_src) { pmbuf_aggr = wlan_alloc_mlan_buffer(pmadapter, pmadapter->tx_buf_size, 0, @@ -386,13 +386,15 @@ wlan_11n_aggregate_pkt(mlan_private * priv, raListTbl * pra_list, pmbuf_aggr->data_offset = 0; pmbuf_aggr->in_ts_sec = pmbuf_src->in_ts_sec; pmbuf_aggr->in_ts_usec = pmbuf_src->in_ts_usec; + if (pmbuf_src->flags & MLAN_BUF_FLAG_TDLS) + pmbuf_aggr->flags |= MLAN_BUF_FLAG_TDLS; /* Form AMSDU */ wlan_11n_form_amsdu_txpd(priv, pmbuf_aggr); pkt_size = sizeof(TxPD); #ifdef STA_SUPPORT if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) - ptx_pd = (TxPD *) pmbuf_aggr->pbuf; + ptx_pd = (TxPD *)pmbuf_aggr->pbuf; #endif } else { pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, @@ -448,9 +450,9 @@ wlan_11n_aggregate_pkt(mlan_private * priv, raListTbl * pra_list, } pmbuf_src = - (pmlan_buffer) util_peek_list(pmadapter->pmoal_handle, - &pra_list->buf_head, - MNULL, MNULL); + (pmlan_buffer)util_peek_list(pmadapter->pmoal_handle, + &pra_list->buf_head, MNULL, + MNULL); } pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, @@ -493,7 +495,7 @@ wlan_11n_aggregate_pkt(mlan_private * priv, raListTbl * pra_list, #endif util_enqueue_list_head(pmadapter->pmoal_handle, &pra_list->buf_head, - (pmlan_linked_list) pmbuf_aggr, MNULL, + (pmlan_linked_list)pmbuf_aggr, MNULL, MNULL); pra_list->total_pkts++; @@ -517,7 +519,6 @@ wlan_11n_aggregate_pkt(mlan_private * priv, raListTbl * pra_list, wlan_write_data_complete(pmadapter, pmbuf_aggr, ret); goto exit; case MLAN_STATUS_PENDING: - pmadapter->data_sent = MFALSE; break; case MLAN_STATUS_SUCCESS: wlan_write_data_complete(pmadapter, pmbuf_aggr, ret); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n_aggr.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n_aggr.h old mode 100755 new mode 100644 index 4046e77c..402a9cc3 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n_aggr.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n_aggr.h @@ -31,7 +31,7 @@ Change log: /** Aggregate 11N packets */ mlan_status wlan_11n_deaggregate_pkt(pmlan_private priv, pmlan_buffer pmbuf); /** Deaggregate 11N packets */ -int wlan_11n_aggregate_pkt(mlan_private * priv, raListTbl * ptr, +int wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *ptr, int headroom, int ptrindex); #endif /* !_MLAN_11N_AGGR_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n_rxreorder.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n_rxreorder.c old mode 100755 new mode 100644 index d0effd01..f5db9037 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n_rxreorder.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n_rxreorder.c @@ -54,10 +54,10 @@ Change log: * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_11n_dispatch_amsdu_pkt(mlan_private * priv, pmlan_buffer pmbuf) +wlan_11n_dispatch_amsdu_pkt(mlan_private *priv, pmlan_buffer pmbuf) { RxPD *prx_pd; - prx_pd = (RxPD *) (pmbuf->pbuf + pmbuf->data_offset); + prx_pd = (RxPD *)(pmbuf->pbuf + pmbuf->data_offset); ENTER(); if (prx_pd->rx_pkt_type == PKT_TYPE_AMSDU) { @@ -81,26 +81,26 @@ wlan_11n_dispatch_amsdu_pkt(mlan_private * priv, pmlan_buffer pmbuf) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_11n_dispatch_pkt(t_void * priv, t_void * payload) +wlan_11n_dispatch_pkt(t_void *priv, t_void *payload) { mlan_status ret = MLAN_STATUS_SUCCESS; #ifdef STA_SUPPORT - pmlan_adapter pmadapter = ((pmlan_private) priv)->adapter; + pmlan_adapter pmadapter = ((pmlan_private)priv)->adapter; #endif ENTER(); - if (payload == (t_void *) RX_PKT_DROPPED_IN_FW) { + if (payload == (t_void *)RX_PKT_DROPPED_IN_FW) { LEAVE(); return ret; } #ifdef UAP_SUPPORT - if (GET_BSS_ROLE((mlan_private *) priv) == MLAN_BSS_ROLE_UAP) { + if (GET_BSS_ROLE((mlan_private *)priv) == MLAN_BSS_ROLE_UAP) { if (MLAN_STATUS_SUCCESS == - wlan_11n_dispatch_amsdu_pkt((mlan_private *) priv, - (pmlan_buffer) payload)) { + wlan_11n_dispatch_amsdu_pkt((mlan_private *)priv, + (pmlan_buffer)payload)) { LEAVE(); return ret; } - ret = wlan_process_uap_rx_packet(priv, (pmlan_buffer) payload); + ret = wlan_process_uap_rx_packet(priv, (pmlan_buffer)payload); LEAVE(); return ret; } @@ -108,12 +108,12 @@ wlan_11n_dispatch_pkt(t_void * priv, t_void * payload) #ifdef STA_SUPPORT if (MLAN_STATUS_SUCCESS == - wlan_11n_dispatch_amsdu_pkt((mlan_private *) priv, - (pmlan_buffer) payload)) { + wlan_11n_dispatch_amsdu_pkt((mlan_private *)priv, + (pmlan_buffer)payload)) { LEAVE(); return ret; } - ret = wlan_process_rx_packet(pmadapter, (pmlan_buffer) payload); + ret = wlan_process_rx_packet(pmadapter, (pmlan_buffer)payload); #endif /* STA_SUPPORT */ LEAVE(); return ret; @@ -129,7 +129,7 @@ wlan_11n_dispatch_pkt(t_void * priv, t_void * payload) */ static void mlan_11n_rxreorder_timer_restart(pmlan_adapter pmadapter, - RxReorderTbl * rx_reor_tbl_ptr) + RxReorderTbl *rx_reor_tbl_ptr) { t_u16 min_flush_time = 0; ENTER(); @@ -165,14 +165,14 @@ mlan_11n_rxreorder_timer_restart(pmlan_adapter pmadapter, * @return MLAN_STATUS_SUCCESS */ static mlan_status -wlan_11n_dispatch_pkt_until_start_win(t_void * priv, - RxReorderTbl * rx_reor_tbl_ptr, +wlan_11n_dispatch_pkt_until_start_win(t_void *priv, + RxReorderTbl *rx_reor_tbl_ptr, int start_win) { int no_pkt_to_send, i, xchg; mlan_status ret = MLAN_STATUS_SUCCESS; void *rx_tmp_ptr = MNULL; - mlan_private *pmpriv = (mlan_private *) priv; + mlan_private *pmpriv = (mlan_private *)priv; ENTER(); @@ -228,8 +228,7 @@ wlan_11n_dispatch_pkt_until_start_win(t_void * priv, * @return N/A */ static t_void -wlan_11n_display_tbl_ptr(pmlan_adapter pmadapter, - RxReorderTbl * rx_reor_tbl_ptr) +wlan_11n_display_tbl_ptr(pmlan_adapter pmadapter, RxReorderTbl *rx_reor_tbl_ptr) { ENTER(); @@ -250,12 +249,12 @@ wlan_11n_display_tbl_ptr(pmlan_adapter pmadapter, * @return MLAN_STATUS_SUCCESS */ static mlan_status -wlan_11n_scan_and_dispatch(t_void * priv, RxReorderTbl * rx_reor_tbl_ptr) +wlan_11n_scan_and_dispatch(t_void *priv, RxReorderTbl *rx_reor_tbl_ptr) { int i, j, xchg; mlan_status ret = MLAN_STATUS_SUCCESS; void *rx_tmp_ptr = MNULL; - mlan_private *pmpriv = (mlan_private *) priv; + mlan_private *pmpriv = (mlan_private *)priv; ENTER(); @@ -315,8 +314,8 @@ wlan_11n_scan_and_dispatch(t_void * priv, RxReorderTbl * rx_reor_tbl_ptr) * @return N/A */ static t_void -wlan_11n_delete_rxreorder_tbl_entry(mlan_private * priv, - RxReorderTbl * rx_reor_tbl_ptr) +wlan_11n_delete_rxreorder_tbl_entry(mlan_private *priv, + RxReorderTbl *rx_reor_tbl_ptr) { pmlan_adapter pmadapter = priv->adapter; @@ -362,15 +361,15 @@ wlan_11n_delete_rxreorder_tbl_entry(mlan_private * priv, PRINTM(MDAT_D, "Delete rx_reor_tbl_ptr: %p\n", rx_reor_tbl_ptr); util_unlink_list(pmadapter->pmoal_handle, &priv->rx_reorder_tbl_ptr, - (pmlan_linked_list) rx_reor_tbl_ptr, + (pmlan_linked_list)rx_reor_tbl_ptr, pmadapter->callbacks.moal_spin_lock, pmadapter->callbacks.moal_spin_unlock); pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) rx_reor_tbl_ptr-> + (t_u8 *)rx_reor_tbl_ptr-> rx_reorder_ptr); pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) rx_reor_tbl_ptr); + (t_u8 *)rx_reor_tbl_ptr); pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, pmadapter->prx_proc_lock); @@ -388,7 +387,7 @@ wlan_11n_delete_rxreorder_tbl_entry(mlan_private * priv, * @return Last used sequence number */ static int -wlan_11n_find_last_seqnum(RxReorderTbl * rx_reorder_tbl_ptr) +wlan_11n_find_last_seqnum(RxReorderTbl *rx_reorder_tbl_ptr) { int i; @@ -406,34 +405,48 @@ wlan_11n_find_last_seqnum(RxReorderTbl * rx_reorder_tbl_ptr) /** * @brief This function flushes all data * - * @param context Reorder context pointer + * @param priv A pointer to mlan_private structure + * @param rx_reor_tbl_ptr A pointer to RxReorderTbl * * @return N/A */ static t_void -wlan_flush_data(t_void * context) +wlan_start_flush_data(mlan_private *priv, RxReorderTbl *rx_reor_tbl_ptr) { - reorder_tmr_cnxt_t *reorder_cnxt = (reorder_tmr_cnxt_t *) context; + int startWin; ENTER(); - reorder_cnxt->timer_is_set = MFALSE; - wlan_11n_display_tbl_ptr(reorder_cnxt->priv->adapter, - reorder_cnxt->ptr); + wlan_11n_display_tbl_ptr(priv->adapter, rx_reor_tbl_ptr); - startWin = wlan_11n_find_last_seqnum(reorder_cnxt->ptr); + startWin = wlan_11n_find_last_seqnum(rx_reor_tbl_ptr); if (startWin >= 0) { PRINTM(MINFO, "Flush data %d\n", startWin); - wlan_11n_dispatch_pkt_until_start_win(reorder_cnxt->priv, - reorder_cnxt->ptr, - ((reorder_cnxt->ptr-> + wlan_11n_dispatch_pkt_until_start_win(priv, rx_reor_tbl_ptr, + ((rx_reor_tbl_ptr-> start_win + startWin + 1) & (MAX_TID_VALUE - 1))); } + wlan_11n_display_tbl_ptr(priv->adapter, rx_reor_tbl_ptr); + LEAVE(); +} - wlan_11n_display_tbl_ptr(reorder_cnxt->priv->adapter, - reorder_cnxt->ptr); +/** + * @brief This function set the flag to flushes data + * + * @param context Reorder context pointer + * + * @return N/A + */ +static t_void +wlan_flush_data(t_void *context) +{ + reorder_tmr_cnxt_t *reorder_cnxt = (reorder_tmr_cnxt_t *)context; + ENTER(); + /* Set the flag to flush data */ + reorder_cnxt->ptr->flush_data = MTRUE; + reorder_cnxt->timer_is_set = MFALSE; LEAVE(); } @@ -450,7 +463,7 @@ wlan_flush_data(t_void * context) * @return N/A */ static t_void -wlan_11n_create_rxreorder_tbl(mlan_private * priv, t_u8 * ta, int tid, +wlan_11n_create_rxreorder_tbl(mlan_private *priv, t_u8 *ta, int tid, int win_size, int seq_num) { int i; @@ -475,13 +488,13 @@ wlan_11n_create_rxreorder_tbl(mlan_private * priv, t_u8 * ta, int tid, seq_num, tid, MAC2STR(ta), win_size); if (pmadapter->callbacks. moal_malloc(pmadapter->pmoal_handle, sizeof(RxReorderTbl), - MLAN_MEM_DEF, (t_u8 **) & new_node)) { + MLAN_MEM_DEF, (t_u8 **)&new_node)) { PRINTM(MERROR, "Rx reorder memory allocation failed\n"); LEAVE(); return; } - util_init_list((pmlan_linked_list) new_node); + util_init_list((pmlan_linked_list)new_node); new_node->tid = tid; memcpy(pmadapter, new_node->ta, ta, MLAN_MAC_ADDR_LENGTH); new_node->start_win = seq_num; @@ -509,11 +522,11 @@ wlan_11n_create_rxreorder_tbl(mlan_private * priv, t_u8 * ta, int tid, if (pmadapter->callbacks. moal_malloc(pmadapter->pmoal_handle, sizeof(t_void *) * win_size, MLAN_MEM_DEF, - (t_u8 **) & new_node->rx_reorder_ptr)) { + (t_u8 **)&new_node->rx_reorder_ptr)) { PRINTM(MERROR, "Rx reorder table memory allocation" "failed\n"); pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) new_node); + (t_u8 *)new_node); LEAVE(); return; } @@ -537,7 +550,7 @@ wlan_11n_create_rxreorder_tbl(mlan_private * priv, t_u8 * ta, int tid, util_enqueue_list_tail(pmadapter->pmoal_handle, &priv->rx_reorder_tbl_ptr, - (pmlan_linked_list) new_node, + (pmlan_linked_list)new_node, pmadapter->callbacks.moal_spin_lock, pmadapter->callbacks.moal_spin_unlock); } @@ -555,30 +568,30 @@ wlan_11n_create_rxreorder_tbl(mlan_private * priv, t_u8 * ta, int tid, * * @param priv A pointer to mlan_private * @param ta ta to find in reordering table - * @param tid tid to find in reordering table + * @param tid tid to find in reordering table * * @return A pointer to structure RxReorderTbl */ RxReorderTbl * -wlan_11n_get_rxreorder_tbl(mlan_private * priv, int tid, t_u8 * ta) +wlan_11n_get_rxreorder_tbl(mlan_private *priv, int tid, t_u8 *ta) { RxReorderTbl *rx_reor_tbl_ptr; ENTER(); rx_reor_tbl_ptr = - (RxReorderTbl *) util_peek_list(priv->adapter->pmoal_handle, - &priv->rx_reorder_tbl_ptr, - priv->adapter->callbacks. - moal_spin_lock, - priv->adapter->callbacks. - moal_spin_unlock); + (RxReorderTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->rx_reorder_tbl_ptr, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); if (!rx_reor_tbl_ptr) { LEAVE(); return MNULL; } - while (rx_reor_tbl_ptr != (RxReorderTbl *) & priv->rx_reorder_tbl_ptr) { + while (rx_reor_tbl_ptr != (RxReorderTbl *)&priv->rx_reorder_tbl_ptr) { if ((!memcmp (priv->adapter, rx_reor_tbl_ptr->ta, ta, MLAN_MAC_ADDR_LENGTH)) && (rx_reor_tbl_ptr->tid == tid)) { @@ -604,11 +617,11 @@ wlan_11n_get_rxreorder_tbl(mlan_private * priv, int tid, t_u8 * ta) * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_cmd_11n_addba_req(mlan_private * priv, - HostCmd_DS_COMMAND * cmd, t_void * pdata_buf) +wlan_cmd_11n_addba_req(mlan_private *priv, + HostCmd_DS_COMMAND *cmd, t_void *pdata_buf) { HostCmd_DS_11N_ADDBA_REQ *padd_ba_req = (HostCmd_DS_11N_ADDBA_REQ *) - & cmd->params.add_ba_req; + &cmd->params.add_ba_req; ENTER(); cmd->command = wlan_cpu_to_le16(HostCmd_CMD_11N_ADDBA_REQ); @@ -639,13 +652,13 @@ wlan_cmd_11n_addba_req(mlan_private * priv, * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_cmd_11n_addba_rspgen(mlan_private * priv, - HostCmd_DS_COMMAND * cmd, void *pdata_buf) +wlan_cmd_11n_addba_rspgen(mlan_private *priv, + HostCmd_DS_COMMAND *cmd, void *pdata_buf) { HostCmd_DS_11N_ADDBA_RSP *padd_ba_rsp = (HostCmd_DS_11N_ADDBA_RSP *) - & cmd->params.add_ba_rsp; + &cmd->params.add_ba_rsp; HostCmd_DS_11N_ADDBA_REQ *pevt_addba_req = - (HostCmd_DS_11N_ADDBA_REQ *) pdata_buf; + (HostCmd_DS_11N_ADDBA_REQ *)pdata_buf; t_u8 tid = 0; int win_size = 0; @@ -728,11 +741,10 @@ wlan_cmd_11n_addba_rspgen(mlan_private * priv, * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_cmd_11n_delba(mlan_private * priv, - HostCmd_DS_COMMAND * cmd, void *pdata_buf) +wlan_cmd_11n_delba(mlan_private *priv, HostCmd_DS_COMMAND *cmd, void *pdata_buf) { HostCmd_DS_11N_DELBA *pdel_ba = (HostCmd_DS_11N_DELBA *) - & cmd->params.del_ba; + &cmd->params.del_ba; ENTER(); @@ -763,17 +775,17 @@ wlan_cmd_11n_delba(mlan_private * priv, */ mlan_status mlan_11n_rxreorder_pkt(void *priv, t_u16 seq_num, t_u16 tid, - t_u8 * ta, t_u8 pkt_type, void *payload) + t_u8 *ta, t_u8 pkt_type, void *payload) { RxReorderTbl *rx_reor_tbl_ptr; int prev_start_win, start_win, end_win, win_size; mlan_status ret = MLAN_STATUS_SUCCESS; - pmlan_adapter pmadapter = ((mlan_private *) priv)->adapter; + pmlan_adapter pmadapter = ((mlan_private *)priv)->adapter; ENTER(); rx_reor_tbl_ptr = - wlan_11n_get_rxreorder_tbl((mlan_private *) priv, tid, ta); + wlan_11n_get_rxreorder_tbl((mlan_private *)priv, tid, ta); if (!rx_reor_tbl_ptr) { if (pkt_type != PKT_TYPE_BAR) wlan_11n_dispatch_pkt(priv, payload); @@ -782,6 +794,10 @@ mlan_11n_rxreorder_pkt(void *priv, t_u16 seq_num, t_u16 tid, return ret; } else { + if (rx_reor_tbl_ptr->flush_data) { + rx_reor_tbl_ptr->flush_data = MFALSE; + wlan_start_flush_data(priv, rx_reor_tbl_ptr); + } if ((pkt_type == PKT_TYPE_AMSDU) && !rx_reor_tbl_ptr->amsdu) { wlan_11n_dispatch_pkt(priv, payload); LEAVE(); @@ -858,20 +874,29 @@ mlan_11n_rxreorder_pkt(void *priv, t_u16 seq_num, t_u16 tid, * If seq_num is less then starting win then ignore and drop * the packet */ - if (rx_reor_tbl_ptr->force_no_drop || pkt_type == PKT_TYPE_BAR) { + if (rx_reor_tbl_ptr->force_no_drop) { PRINTM(MDAT_D, "No drop packet\n"); rx_reor_tbl_ptr->force_no_drop = MFALSE; } else { - if ((start_win + TWOPOW11) > (MAX_TID_VALUE - 1)) { /* Wrap - */ + /* Wrap */ + if ((start_win + TWOPOW11) > (MAX_TID_VALUE - 1)) { if (seq_num >= ((start_win + (TWOPOW11)) & (MAX_TID_VALUE - 1)) && (seq_num < start_win)) { + if (pkt_type == PKT_TYPE_BAR) + PRINTM(MDAT_D, + "BAR: start_win=%d, end_win=%d, seq_num=%d\n", + start_win, end_win, + seq_num); ret = MLAN_STATUS_FAILURE; goto done; } } else if ((seq_num < start_win) || - (seq_num > (start_win + (TWOPOW11)))) { + (seq_num >= (start_win + (TWOPOW11)))) { + if (pkt_type == PKT_TYPE_BAR) + PRINTM(MDAT_D, + "BAR: start_win=%d, end_win=%d, seq_num=%d\n", + start_win, end_win, seq_num); ret = MLAN_STATUS_FAILURE; goto done; } @@ -977,8 +1002,8 @@ mlan_11n_rxreorder_pkt(void *priv, t_u16 seq_num, t_u16 tid, * @return N/A */ void -mlan_11n_delete_bastream_tbl(mlan_private * priv, int tid, - t_u8 * peer_mac, t_u8 type, int initiator) +mlan_11n_delete_bastream_tbl(mlan_private *priv, int tid, + t_u8 *peer_mac, t_u8 type, int initiator) { RxReorderTbl *rx_reor_tbl_ptr; TxBAStreamTbl *ptxtbl; @@ -1027,10 +1052,10 @@ mlan_11n_delete_bastream_tbl(mlan_private * priv, int tid, * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_ret_11n_addba_resp(mlan_private * priv, HostCmd_DS_COMMAND * resp) +wlan_ret_11n_addba_resp(mlan_private *priv, HostCmd_DS_COMMAND *resp) { HostCmd_DS_11N_ADDBA_RSP *padd_ba_rsp = (HostCmd_DS_11N_ADDBA_RSP *) - & resp->params.add_ba_rsp; + &resp->params.add_ba_rsp; int tid; RxReorderTbl *rx_reor_tbl_ptr = MNULL; @@ -1098,22 +1123,21 @@ wlan_ret_11n_addba_resp(mlan_private * priv, HostCmd_DS_COMMAND * resp) * @return N/A */ void -wlan_11n_ba_stream_timeout(mlan_private * priv, - HostCmd_DS_11N_BATIMEOUT * event) +wlan_11n_ba_stream_timeout(mlan_private *priv, HostCmd_DS_11N_BATIMEOUT *event) { HostCmd_DS_11N_DELBA delba; ENTER(); - DBG_HEXDUMP(MCMD_D, "Event:", (t_u8 *) event, 20); + DBG_HEXDUMP(MCMD_D, "Event:", (t_u8 *)event, 20); memset(priv->adapter, &delba, 0, sizeof(HostCmd_DS_11N_DELBA)); memcpy(priv->adapter, delba.peer_mac_addr, event->peer_mac_addr, MLAN_MAC_ADDR_LENGTH); - delba.del_ba_param_set |= (t_u16) event->tid << DELBA_TID_POS; + delba.del_ba_param_set |= (t_u16)event->tid << DELBA_TID_POS; delba.del_ba_param_set |= - (t_u16) event->origninator << DELBA_INITIATOR_POS; + (t_u16)event->origninator << DELBA_INITIATOR_POS; delba.reason_code = REASON_CODE_STA_TIMEOUT; wlan_prepare_cmd(priv, HostCmd_CMD_11N_DELBA, 0, 0, MNULL, &delba); @@ -1129,7 +1153,7 @@ wlan_11n_ba_stream_timeout(mlan_private * priv, * @return N/A */ void -wlan_11n_cleanup_reorder_tbl(mlan_private * priv) +wlan_11n_cleanup_reorder_tbl(mlan_private *priv) { RxReorderTbl *del_tbl_ptr; @@ -1143,7 +1167,7 @@ wlan_11n_cleanup_reorder_tbl(mlan_private * priv) wlan_11n_delete_rxreorder_tbl_entry(priv, del_tbl_ptr); } - util_init_list((pmlan_linked_list) & priv->rx_reorder_tbl_ptr); + util_init_list((pmlan_linked_list)&priv->rx_reorder_tbl_ptr); memset(priv->adapter, priv->rx_seq, 0xff, sizeof(priv->rx_seq)); LEAVE(); @@ -1158,9 +1182,9 @@ wlan_11n_cleanup_reorder_tbl(mlan_private * priv) * @return N/A */ void -wlan_11n_rxba_sync_event(mlan_private * priv, t_u8 * event_buf, t_u16 len) +wlan_11n_rxba_sync_event(mlan_private *priv, t_u8 *event_buf, t_u16 len) { - MrvlIEtypes_RxBaSync_t *tlv_rxba = (MrvlIEtypes_RxBaSync_t *) event_buf; + MrvlIEtypes_RxBaSync_t *tlv_rxba = (MrvlIEtypes_RxBaSync_t *)event_buf; t_u16 tlv_type, tlv_len; RxReorderTbl *rx_reor_tbl_ptr = MNULL; t_u8 i, j; @@ -1222,10 +1246,8 @@ wlan_11n_rxba_sync_event(mlan_private * priv, t_u8 * event_buf, t_u16 len) } tlv_buf_left -= (sizeof(MrvlIEtypesHeader_t) + tlv_len); tlv_rxba = - (MrvlIEtypes_RxBaSync_t *) ((t_u8 *) tlv_rxba + - tlv_len + - sizeof - (MrvlIEtypesHeader_t)); + (MrvlIEtypes_RxBaSync_t *)((t_u8 *)tlv_rxba + tlv_len + + sizeof(MrvlIEtypesHeader_t)); } done: LEAVE(); @@ -1240,7 +1262,7 @@ wlan_11n_rxba_sync_event(mlan_private * priv, t_u8 * event_buf, t_u16 len) * @return N/A */ void -wlan_cleanup_reorder_tbl(mlan_private * priv, t_u8 * ta) +wlan_cleanup_reorder_tbl(mlan_private *priv, t_u8 *ta) { RxReorderTbl *rx_reor_tbl_ptr = MNULL; t_u8 i; @@ -1264,25 +1286,25 @@ wlan_cleanup_reorder_tbl(mlan_private * priv, t_u8 * ta) * @return N/A */ void -wlan_set_rxreorder_tbl_no_drop_flag(mlan_private * priv, t_u8 flag) +wlan_set_rxreorder_tbl_no_drop_flag(mlan_private *priv, t_u8 flag) { RxReorderTbl *rx_reor_tbl_ptr; ENTER(); rx_reor_tbl_ptr = - (RxReorderTbl *) util_peek_list(priv->adapter->pmoal_handle, - &priv->rx_reorder_tbl_ptr, - priv->adapter->callbacks. - moal_spin_lock, - priv->adapter->callbacks. - moal_spin_unlock); + (RxReorderTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->rx_reorder_tbl_ptr, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); if (!rx_reor_tbl_ptr) { LEAVE(); return; } - while (rx_reor_tbl_ptr != (RxReorderTbl *) & priv->rx_reorder_tbl_ptr) { + while (rx_reor_tbl_ptr != (RxReorderTbl *)&priv->rx_reorder_tbl_ptr) { rx_reor_tbl_ptr->force_no_drop = flag; rx_reor_tbl_ptr = rx_reor_tbl_ptr->pnext; } @@ -1311,3 +1333,125 @@ wlan_update_rxreorder_tbl(pmlan_adapter pmadapter, t_u8 flag) } return; } + +/** + * @brief This function update all the rx_win_size based on coex flag + * + * @param pmadapter A pointer to mlan_adapter + * @param coex_flag coex flag + * + * @return N/A + */ +void +wlan_update_ampdu_rxwinsize(pmlan_adapter pmadapter, t_u8 coex_flag) +{ + t_u8 i; + t_u32 rx_win_size = 0; + pmlan_private priv = MNULL; + + ENTER(); + if (!pmadapter->coex_rx_winsize) { + LEAVE(); + return; + } + PRINTM(MEVENT, "Update rxwinsize %d\n", coex_flag); + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) { + priv = pmadapter->priv[i]; + rx_win_size = priv->add_ba_param.rx_win_size; + if (coex_flag == MTRUE) { +#ifdef STA_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_STA) + priv->add_ba_param.rx_win_size = + MLAN_STA_COEX_AMPDU_DEF_RXWINSIZE; +#endif +#ifdef WIFI_DIRECT_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) + priv->add_ba_param.rx_win_size = + MLAN_WFD_COEX_AMPDU_DEF_RXWINSIZE; +#endif +#ifdef UAP_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_UAP) + priv->add_ba_param.rx_win_size = + MLAN_UAP_COEX_AMPDU_DEF_RXWINSIZE; +#endif + + } else { +#ifdef STA_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_STA) + priv->add_ba_param.rx_win_size = + MLAN_STA_AMPDU_DEF_RXWINSIZE; +#endif +#ifdef WIFI_DIRECT_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) + priv->add_ba_param.rx_win_size = + pmadapter->psdio_device-> + ampdu_info-> + ampdu_wfd_txrxwinsize; +#endif +#ifdef UAP_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_UAP) + priv->add_ba_param.rx_win_size = + pmadapter->psdio_device-> + ampdu_info->ampdu_uap_rxwinsize; +#endif + } + if (pmadapter->coex_win_size && + pmadapter->coex_rx_win_size) + priv->add_ba_param.rx_win_size = + pmadapter->coex_rx_win_size; + if (rx_win_size != priv->add_ba_param.rx_win_size) { + if (priv->media_connected == MTRUE) { + for (i = 0; i < MAX_NUM_TID; i++) + wlan_11n_delba(priv, i); + wlan_recv_event(priv, + MLAN_EVENT_ID_DRV_DEFER_HANDLING, + MNULL); + } + } + } + } + LEAVE(); + return; +} + +/** + * @brief check coex for + * + * @param pmadapter A pointer to mlan_adapter + * + * @return N/A + */ +void +wlan_coex_ampdu_rxwinsize(pmlan_adapter pmadapter) +{ + t_u8 i; + pmlan_private priv = MNULL; + t_u8 count = 0; + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) { + priv = pmadapter->priv[i]; +#ifdef STA_SUPPORT + if (GET_BSS_ROLE((mlan_private *)priv) == + MLAN_BSS_ROLE_STA) { + if (priv->media_connected == MTRUE) + count++; + } +#endif +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE((mlan_private *)priv) == + MLAN_BSS_ROLE_UAP) { + if (priv->uap_bss_started) + count++; + } +#endif + } + if (count >= 2) + break; + } + if (count >= 2) + wlan_update_ampdu_rxwinsize(pmadapter, MTRUE); + else + wlan_update_ampdu_rxwinsize(pmadapter, MFALSE); + return; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n_rxreorder.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n_rxreorder.h old mode 100755 new mode 100644 index 49de7aa0..18018ead --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n_rxreorder.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_11n_rxreorder.h @@ -46,7 +46,8 @@ Change log: #define DELBA_TID_POS 12 /** Position of INITIATOR in DelBA Param set */ #define DELBA_INITIATOR_POS 11 -/** Reason code: Requested from peer STA as it does not want to use the mechanism */ +/** Reason code: Requested from peer STA as it does not want to + * use the mechanism */ #define REASON_CODE_STA_DONT_WANT 37 /** Reason code: Requested from peer STA due to timeout*/ #define REASON_CODE_STA_TIMEOUT 39 @@ -75,26 +76,25 @@ Change log: #define RX_PKT_DROPPED_IN_FW 0xffffffff mlan_status mlan_11n_rxreorder_pkt(void *priv, t_u16 seqNum, t_u16 tid, - t_u8 * ta, t_u8 pkttype, void *payload); -void mlan_11n_delete_bastream_tbl(mlan_private * priv, int tid, - t_u8 * PeerMACAddr, t_u8 type, int initiator); -void wlan_11n_ba_stream_timeout(mlan_private * priv, - HostCmd_DS_11N_BATIMEOUT * event); -mlan_status wlan_ret_11n_addba_resp(mlan_private * priv, - HostCmd_DS_COMMAND * resp); -mlan_status wlan_cmd_11n_delba(mlan_private * priv, HostCmd_DS_COMMAND * cmd, + t_u8 *ta, t_u8 pkttype, void *payload); +void mlan_11n_delete_bastream_tbl(mlan_private *priv, int tid, + t_u8 *PeerMACAddr, t_u8 type, int initiator); +void wlan_11n_ba_stream_timeout(mlan_private *priv, + HostCmd_DS_11N_BATIMEOUT *event); +mlan_status wlan_ret_11n_addba_resp(mlan_private *priv, + HostCmd_DS_COMMAND *resp); +mlan_status wlan_cmd_11n_delba(mlan_private *priv, HostCmd_DS_COMMAND *cmd, void *pdata_buf); -mlan_status wlan_cmd_11n_addba_rspgen(mlan_private * priv, - HostCmd_DS_COMMAND * cmd, - void *pdata_buf); -mlan_status wlan_cmd_11n_addba_req(mlan_private * priv, - HostCmd_DS_COMMAND * cmd, void *pdata_buf); -void wlan_11n_cleanup_reorder_tbl(mlan_private * priv); -RxReorderTbl *wlan_11n_get_rxreorder_tbl(mlan_private * priv, int tid, - t_u8 * ta); -void wlan_11n_rxba_sync_event(mlan_private * priv, t_u8 * event_buf, t_u16 len); +mlan_status wlan_cmd_11n_addba_rspgen(mlan_private *priv, + HostCmd_DS_COMMAND *cmd, void *pdata_buf); +mlan_status wlan_cmd_11n_addba_req(mlan_private *priv, HostCmd_DS_COMMAND *cmd, + void *pdata_buf); +void wlan_11n_cleanup_reorder_tbl(mlan_private *priv); +RxReorderTbl *wlan_11n_get_rxreorder_tbl(mlan_private *priv, int tid, t_u8 *ta); +void wlan_11n_rxba_sync_event(mlan_private *priv, t_u8 *event_buf, t_u16 len); void wlan_update_rxreorder_tbl(pmlan_adapter pmadapter, t_u8 flag); +void wlan_coex_ampdu_rxwinsize(pmlan_adapter pmadapter); /** clean up reorder_tbl */ -void wlan_cleanup_reorder_tbl(mlan_private * priv, t_u8 * ta); +void wlan_cleanup_reorder_tbl(mlan_private *priv, t_u8 *ta); #endif /* _MLAN_11N_RXREORDER_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_cfp.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_cfp.c old mode 100755 new mode 100644 index 3b263eb9..aff895df --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_cfp.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_cfp.c @@ -280,18 +280,399 @@ static cfp_table_t cfp_table_BG[] = { /** Number of the CFP tables for 2.4GHz */ #define MLAN_CFP_TABLE_SIZE_BG (NELEMENTS(cfp_table_BG)) +/* Format { Channel, Frequency (MHz), MaxTxPower, DFS } */ +/** Band: 'A', Region: USA FCC, Spain, France */ +static chan_freq_power_t channel_freq_power_A[] = { + {36, 5180, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {40, 5200, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {44, 5220, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {48, 5240, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {52, 5260, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {56, 5280, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {60, 5300, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {64, 5320, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {100, 5500, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {104, 5520, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {108, 5540, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {112, 5560, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {116, 5580, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {120, 5600, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {124, 5620, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {128, 5640, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {132, 5660, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {136, 5680, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {140, 5700, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {149, 5745, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {153, 5765, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {157, 5785, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {161, 5805, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {165, 5825, WLAN_TX_PWR_US_DEFAULT, MFALSE} +}; + +/** Band: 'A', Region: Canada IC */ +static chan_freq_power_t channel_freq_power_CAN_A[] = { + {36, 5180, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {40, 5200, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {44, 5220, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {48, 5240, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {52, 5260, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {56, 5280, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {60, 5300, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {64, 5320, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {100, 5500, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {104, 5520, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {108, 5540, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {112, 5560, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {116, 5580, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {132, 5660, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {136, 5680, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {140, 5700, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {149, 5745, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {153, 5765, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {157, 5785, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {161, 5805, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {165, 5825, WLAN_TX_PWR_US_DEFAULT, MFALSE} +}; + +/** Band: 'A', Region: Europe ETSI */ +static chan_freq_power_t channel_freq_power_EU_A[] = { + {36, 5180, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {40, 5200, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {44, 5220, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {48, 5240, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {52, 5260, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {56, 5280, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {60, 5300, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {64, 5320, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {100, 5500, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {104, 5520, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {108, 5540, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {112, 5560, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {116, 5580, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {120, 5600, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {124, 5620, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {128, 5640, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {132, 5660, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {136, 5680, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {140, 5700, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE} +}; + +/** Band: 'A', Region: Japan */ +static chan_freq_power_t channel_freq_power_JPN_A[] = { + {36, 5180, WLAN_TX_PWR_JP_A_DEFAULT, MFALSE}, + {40, 5200, WLAN_TX_PWR_JP_A_DEFAULT, MFALSE}, + {44, 5220, WLAN_TX_PWR_JP_A_DEFAULT, MFALSE}, + {48, 5240, WLAN_TX_PWR_JP_A_DEFAULT, MFALSE}, + {52, 5260, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {56, 5280, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {60, 5300, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {64, 5320, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {100, 5500, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {104, 5520, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {108, 5540, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {112, 5560, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {116, 5580, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {120, 5600, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {124, 5620, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {128, 5640, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {132, 5660, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {136, 5680, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {140, 5700, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE} +}; + +/** Band: 'A', Region: China */ +static chan_freq_power_t channel_freq_power_CN_A[] = { + {149, 5745, WLAN_TX_PWR_CN_2000MW, MFALSE}, + {153, 5765, WLAN_TX_PWR_CN_2000MW, MFALSE}, + {157, 5785, WLAN_TX_PWR_CN_2000MW, MFALSE}, + {161, 5805, WLAN_TX_PWR_CN_2000MW, MFALSE}, + {165, 5825, WLAN_TX_PWR_CN_2000MW, MFALSE} +}; + +/** Band: 'A', NULL */ +static chan_freq_power_t channel_freq_power_NULL_A[] = { +}; + +/** Band: 'A', Region: Germany */ +static chan_freq_power_t channel_freq_power_GRM_A[] = { + {36, 5180, WLAN_TX_PWR_200MW, MFALSE}, + {40, 5200, WLAN_TX_PWR_200MW, MFALSE}, + {44, 5220, WLAN_TX_PWR_200MW, MFALSE}, + {48, 5240, WLAN_TX_PWR_200MW, MFALSE}, + {52, 5260, WLAN_TX_PWR_200MW, MTRUE}, + {56, 5280, WLAN_TX_PWR_200MW, MTRUE}, + {60, 5300, WLAN_TX_PWR_200MW, MTRUE}, + {64, 5320, WLAN_TX_PWR_200MW, MTRUE}, + {100, 5500, WLAN_TX_PWR_1000MW, MTRUE}, + {104, 5520, WLAN_TX_PWR_1000MW, MTRUE}, + {108, 5540, WLAN_TX_PWR_1000MW, MTRUE}, + {112, 5560, WLAN_TX_PWR_1000MW, MTRUE}, + {116, 5580, WLAN_TX_PWR_1000MW, MTRUE}, + {120, 5600, WLAN_TX_PWR_1000MW, MTRUE}, + {124, 5620, WLAN_TX_PWR_1000MW, MTRUE}, + {128, 5640, WLAN_TX_PWR_1000MW, MTRUE}, + {132, 5660, WLAN_TX_PWR_1000MW, MTRUE}, + {136, 5680, WLAN_TX_PWR_1000MW, MTRUE}, + {140, 5700, WLAN_TX_PWR_1000MW, MTRUE}, +}; + +/** Band: 'A', Region: Spain */ +static chan_freq_power_t channel_freq_power_SPN0_A[] = { + {36, 5180, WLAN_TX_PWR_SP_30MW, MFALSE}, + {40, 5200, WLAN_TX_PWR_SP_30MW, MFALSE}, + {44, 5220, WLAN_TX_PWR_SP_30MW, MFALSE}, + {48, 5240, WLAN_TX_PWR_SP_30MW, MFALSE}, +}; + +/** Band: 'A', Region: Spain */ +static chan_freq_power_t channel_freq_power_SPN1_A[] = { + {36, 5180, WLAN_TX_PWR_SP_60MW, MFALSE}, + {40, 5200, WLAN_TX_PWR_SP_60MW, MFALSE}, + {44, 5220, WLAN_TX_PWR_SP_60MW, MFALSE}, + {48, 5240, WLAN_TX_PWR_SP_60MW, MFALSE}, +}; + +/** Band: 'A', Region: Spain/Austria/Brazil */ +static chan_freq_power_t channel_freq_power_SPN2_A[] = { + {36, 5180, WLAN_TX_PWR_200MW, MFALSE}, + {40, 5200, WLAN_TX_PWR_200MW, MFALSE}, + {44, 5220, WLAN_TX_PWR_200MW, MFALSE}, + {48, 5240, WLAN_TX_PWR_200MW, MFALSE}, + {52, 5260, WLAN_TX_PWR_200MW, MTRUE}, + {56, 5280, WLAN_TX_PWR_200MW, MTRUE}, + {60, 5300, WLAN_TX_PWR_200MW, MTRUE}, + {64, 5320, WLAN_TX_PWR_200MW, MTRUE}, +}; + +/** Band: 'A', Region: Spain/Austria */ +static chan_freq_power_t channel_freq_power_SPN3_A[] = { + {100, 5500, WLAN_TX_PWR_1000MW, MTRUE}, + {104, 5520, WLAN_TX_PWR_1000MW, MTRUE}, + {108, 5540, WLAN_TX_PWR_1000MW, MTRUE}, + {112, 5560, WLAN_TX_PWR_1000MW, MTRUE}, + {116, 5580, WLAN_TX_PWR_1000MW, MTRUE}, + {120, 5600, WLAN_TX_PWR_1000MW, MTRUE}, + {124, 5620, WLAN_TX_PWR_1000MW, MTRUE}, + {128, 5640, WLAN_TX_PWR_1000MW, MTRUE}, + {132, 5660, WLAN_TX_PWR_1000MW, MTRUE}, + {136, 5680, WLAN_TX_PWR_1000MW, MTRUE}, + {140, 5700, WLAN_TX_PWR_1000MW, MTRUE}, +}; + +/** Band: 'A', Region: Austria */ +static chan_freq_power_t channel_freq_power_AT_A[] = { + {149, 5745, WLAN_TX_PWR_25MW, MFALSE}, + {153, 5765, WLAN_TX_PWR_25MW, MFALSE}, + {157, 5785, WLAN_TX_PWR_25MW, MFALSE}, + {161, 5805, WLAN_TX_PWR_25MW, MFALSE}, + {165, 5825, WLAN_TX_PWR_25MW, MFALSE} +}; + +/** Band: 'A', Region: Brazil */ +static chan_freq_power_t channel_freq_power_BR1_A[] = { + {100, 5500, WLAN_TX_PWR_250MW, MTRUE}, + {104, 5520, WLAN_TX_PWR_250MW, MTRUE}, + {108, 5540, WLAN_TX_PWR_250MW, MTRUE}, + {112, 5560, WLAN_TX_PWR_250MW, MTRUE}, + {116, 5580, WLAN_TX_PWR_250MW, MTRUE}, + {120, 5600, WLAN_TX_PWR_250MW, MTRUE}, + {124, 5620, WLAN_TX_PWR_250MW, MTRUE}, + {128, 5640, WLAN_TX_PWR_250MW, MTRUE}, + {132, 5660, WLAN_TX_PWR_250MW, MTRUE}, + {136, 5680, WLAN_TX_PWR_250MW, MTRUE}, + {140, 5700, WLAN_TX_PWR_250MW, MTRUE}, +}; + +/** Band: 'A', Region: Brazil */ +static chan_freq_power_t channel_freq_power_BR2_A[] = { + {149, 5745, WLAN_TX_PWR_1000MW, MFALSE}, + {153, 5765, WLAN_TX_PWR_1000MW, MFALSE}, + {157, 5785, WLAN_TX_PWR_1000MW, MFALSE}, + {161, 5805, WLAN_TX_PWR_1000MW, MFALSE}, + {165, 5825, WLAN_TX_PWR_1000MW, MFALSE} +}; + +/** Band: 'A', Region: Russia */ +static chan_freq_power_t channel_freq_power_RU_A[] = { + {149, 5745, WLAN_TX_PWR_DEFAULT, MFALSE}, + {153, 5765, WLAN_TX_PWR_DEFAULT, MFALSE}, + {157, 5785, WLAN_TX_PWR_DEFAULT, MFALSE}, + {161, 5805, WLAN_TX_PWR_DEFAULT, MFALSE}, +}; + +/** Band: 'A', Code: 1, Low band (5150-5250 MHz) channels */ +static chan_freq_power_t channel_freq_power_low_band[] = { + {36, 5180, WLAN_TX_PWR_DEFAULT, MFALSE}, + {40, 5200, WLAN_TX_PWR_DEFAULT, MFALSE}, + {44, 5220, WLAN_TX_PWR_DEFAULT, MFALSE}, + {48, 5240, WLAN_TX_PWR_DEFAULT, MFALSE}, +}; + +/** Band: 'A', Code: 2, Lower middle band (5250-5350 MHz) channels */ +static chan_freq_power_t channel_freq_power_lower_middle_band[] = { + {52, 5260, WLAN_TX_PWR_DEFAULT, MTRUE}, + {56, 5280, WLAN_TX_PWR_DEFAULT, MTRUE}, + {60, 5300, WLAN_TX_PWR_DEFAULT, MTRUE}, + {64, 5320, WLAN_TX_PWR_DEFAULT, MTRUE}, +}; + +/** Band: 'A', Code: 3, Upper middle band (5470-5725 MHz) channels */ +static chan_freq_power_t channel_freq_power_upper_middle_band[] = { + {100, 5500, WLAN_TX_PWR_DEFAULT, MTRUE}, + {104, 5520, WLAN_TX_PWR_DEFAULT, MTRUE}, + {108, 5540, WLAN_TX_PWR_DEFAULT, MTRUE}, + {112, 5560, WLAN_TX_PWR_DEFAULT, MTRUE}, + {116, 5580, WLAN_TX_PWR_DEFAULT, MTRUE}, + {120, 5600, WLAN_TX_PWR_DEFAULT, MTRUE}, + {124, 5620, WLAN_TX_PWR_DEFAULT, MTRUE}, + {128, 5640, WLAN_TX_PWR_DEFAULT, MTRUE}, + {132, 5660, WLAN_TX_PWR_DEFAULT, MTRUE}, + {136, 5680, WLAN_TX_PWR_DEFAULT, MTRUE}, + {140, 5700, WLAN_TX_PWR_DEFAULT, MTRUE}, +}; + +/** Band: 'A', Code: 4, High band (5725-5850 MHz) channels */ +static chan_freq_power_t channel_freq_power_high_band[] = { + {149, 5745, WLAN_TX_PWR_DEFAULT, MFALSE}, + {153, 5765, WLAN_TX_PWR_DEFAULT, MFALSE}, + {157, 5785, WLAN_TX_PWR_DEFAULT, MFALSE}, + {161, 5805, WLAN_TX_PWR_DEFAULT, MFALSE}, + {165, 5825, WLAN_TX_PWR_DEFAULT, MFALSE} +}; + +/** Band: 'A', Code: 5, Low band (5150-5250 MHz) and + * High band (5725-5850 MHz) channels */ +static chan_freq_power_t channel_freq_power_low_high_band[] = { + {36, 5180, WLAN_TX_PWR_DEFAULT, MFALSE}, + {40, 5200, WLAN_TX_PWR_DEFAULT, MFALSE}, + {44, 5220, WLAN_TX_PWR_DEFAULT, MFALSE}, + {48, 5240, WLAN_TX_PWR_DEFAULT, MFALSE}, + {149, 5745, WLAN_TX_PWR_DEFAULT, MFALSE}, + {153, 5765, WLAN_TX_PWR_DEFAULT, MFALSE}, + {157, 5785, WLAN_TX_PWR_DEFAULT, MFALSE}, + {161, 5805, WLAN_TX_PWR_DEFAULT, MFALSE}, + {165, 5825, WLAN_TX_PWR_DEFAULT, MFALSE} +}; + +/** + * The 5GHz CFP tables + */ +static cfp_table_t cfp_table_A[] = { + {0x1, /* Low band (5150-5250 MHz) channels */ + channel_freq_power_low_band, + NELEMENTS(channel_freq_power_low_band) + }, + {0x2, /* Lower middle band (5250-5350 MHz) channels */ + channel_freq_power_lower_middle_band, + NELEMENTS(channel_freq_power_lower_middle_band) + }, + {0x3, /* Upper middle band (5470-5725 MHz) channels */ + channel_freq_power_upper_middle_band, + NELEMENTS(channel_freq_power_upper_middle_band) + }, + {0x4, /* High band (5725-5850 MHz) channels */ + channel_freq_power_high_band, + NELEMENTS(channel_freq_power_high_band) + }, + {0x5, /* Low band (5150-5250 MHz) and High band + (5725-5850 MHz) channels */ + channel_freq_power_low_high_band, + NELEMENTS(channel_freq_power_low_high_band) + }, + {0x06, /* GERMANY */ + channel_freq_power_GRM_A, + NELEMENTS(channel_freq_power_GRM_A), + }, + {0x07, /* SPAIN */ + channel_freq_power_SPN0_A, + NELEMENTS(channel_freq_power_SPN0_A), + }, + {0x08, /* SPAIN */ + channel_freq_power_SPN1_A, + NELEMENTS(channel_freq_power_SPN1_A), + }, + {0x09, /* SPAIN/Austria/Brazil */ + channel_freq_power_SPN2_A, + NELEMENTS(channel_freq_power_SPN2_A), + }, + {0x0a, /* SPAIN/Austria */ + channel_freq_power_SPN3_A, + NELEMENTS(channel_freq_power_SPN3_A), + }, + {0x0b, /* Austria */ + channel_freq_power_AT_A, + NELEMENTS(channel_freq_power_AT_A), + }, + {0x0c, /* Brazil */ + channel_freq_power_BR1_A, + NELEMENTS(channel_freq_power_BR1_A), + }, + {0x0e, /* Brazil */ + channel_freq_power_BR2_A, + NELEMENTS(channel_freq_power_BR2_A), + }, + {0x0f, /* Russia */ + channel_freq_power_RU_A, + NELEMENTS(channel_freq_power_RU_A), + }, + {0x10, /* US FCC */ + channel_freq_power_A, + NELEMENTS(channel_freq_power_A), + }, + {0x20, /* CANADA IC */ + channel_freq_power_CAN_A, + NELEMENTS(channel_freq_power_CAN_A), + }, + {0x30, /* EU */ + channel_freq_power_EU_A, + NELEMENTS(channel_freq_power_EU_A), + }, + {0x32, /* FRANCE */ + channel_freq_power_A, + NELEMENTS(channel_freq_power_A), + }, + {0x40, /* JAPAN */ + channel_freq_power_JPN_A, + NELEMENTS(channel_freq_power_JPN_A), + }, + {0x41, /* JAPAN */ + channel_freq_power_JPN_A, + NELEMENTS(channel_freq_power_JPN_A), + }, + {0x50, /* China */ + channel_freq_power_CN_A, + NELEMENTS(channel_freq_power_CN_A), + }, + {0xfe, /* JAPAN */ + channel_freq_power_NULL_A, + NELEMENTS(channel_freq_power_NULL_A), + }, + {0xff, /* Special */ + channel_freq_power_JPN_A, + NELEMENTS(channel_freq_power_JPN_A), + }, +/* Add new region here */ +}; + +/** Number of the CFP tables for 5GHz */ +#define MLAN_CFP_TABLE_SIZE_A (NELEMENTS(cfp_table_A)) + /******************************************************** Global Variables ********************************************************/ /** * The table to keep region code */ -t_u16 region_code_index[MRVDRV_MAX_REGION_CODE] = - { 0x10, 0x20, 0x30, 0x32, 0x40, 0x41, 0x50, 0xfe, 0xff }; +t_u16 region_code_index[MRVDRV_MAX_REGION_CODE] = { + 0x10, 0x20, 0x30, 0x32, 0x40, 0x41, 0x50, 0xfe, 0xff +}; /** The table to keep CFP code for BG */ t_u16 cfp_code_index_bg[MRVDRV_MAX_CFP_CODE_BG] = { }; +/** The table to keep CFP code for A */ +t_u16 cfp_code_index_a[MRVDRV_MAX_CFP_CODE_A] = { 0x1, 0x2, 0x3, 0x4, 0x5 }; + /** * The rates supported for ad-hoc B mode */ @@ -300,22 +681,37 @@ t_u8 AdhocRates_B[B_SUPPORTED_RATES] = { 0x82, 0x84, 0x8b, 0x96, 0 }; /** * The rates supported for ad-hoc G mode */ -t_u8 AdhocRates_G[G_SUPPORTED_RATES] = - { 0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6c, 0 }; +t_u8 AdhocRates_G[G_SUPPORTED_RATES] = { + 0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6c, 0x00 +}; /** * The rates supported for ad-hoc BG mode */ -t_u8 AdhocRates_BG[BG_SUPPORTED_RATES] = - { 0x82, 0x84, 0x8b, 0x96, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, - 0x60, 0x6c, 0 +t_u8 AdhocRates_BG[BG_SUPPORTED_RATES] = { + 0x82, 0x84, 0x8b, 0x96, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, + 0x60, 0x6c, 0x00 +}; + +/** + * The rates supported in A mode for ad-hoc + */ +t_u8 AdhocRates_A[A_SUPPORTED_RATES] = { + 0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6c, 0x00 +}; + +/** + * The rates supported in A mode (used for BAND_A) + */ +t_u8 SupportedRates_A[A_SUPPORTED_RATES] = { + 0x0c, 0x12, 0x18, 0x24, 0xb0, 0x48, 0x60, 0x6c, 0x00 }; /** * The rates supported by the card */ -t_u16 WlanDataRates[WLAN_SUPPORTED_RATES_EXT] = - { 0x02, 0x04, 0x0B, 0x16, 0x00, 0x0C, 0x12, +t_u16 WlanDataRates[WLAN_SUPPORTED_RATES_EXT] = { + 0x02, 0x04, 0x0B, 0x16, 0x00, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90, 0x0D, 0x1A, 0x27, 0x34, 0x4E, 0x68, 0x75, 0x82, 0x0C, 0x1B, 0x36, 0x51, 0x6C, 0xA2, @@ -325,20 +721,23 @@ t_u16 WlanDataRates[WLAN_SUPPORTED_RATES_EXT] = /** * The rates supported in B mode */ -t_u8 SupportedRates_B[B_SUPPORTED_RATES] = { 0x02, 0x04, 0x0b, 0x16, 0 }; +t_u8 SupportedRates_B[B_SUPPORTED_RATES] = { + 0x02, 0x04, 0x0b, 0x16, 0x00 +}; /** * The rates supported in G mode (BAND_G, BAND_G|BAND_GN) */ -t_u8 SupportedRates_G[G_SUPPORTED_RATES] = - { 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6c, 0 }; +t_u8 SupportedRates_G[G_SUPPORTED_RATES] = { + 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6c, 0x00 +}; /** * The rates supported in BG mode (BAND_B|BAND_G, BAND_B|BAND_G|BAND_GN) */ -t_u8 SupportedRates_BG[BG_SUPPORTED_RATES] = - { 0x02, 0x04, 0x0b, 0x0c, 0x12, 0x16, 0x18, 0x24, 0x30, 0x48, - 0x60, 0x6c, 0 +t_u8 SupportedRates_BG[BG_SUPPORTED_RATES] = { + 0x02, 0x04, 0x0b, 0x0c, 0x12, 0x16, 0x18, 0x24, 0x30, 0x48, + 0x60, 0x6c, 0x00 }; /** @@ -362,12 +761,12 @@ t_u8 SupportedRates_N[N_SUPPORTED_RATES] = { 0x02, 0x04, 0 }; static void * wlan_memchr(pmlan_adapter pmadapter, void *s, int c, int n) { - const t_u8 *p = (t_u8 *) s; + const t_u8 *p = (t_u8 *)s; ENTER(); while (n--) { - if ((t_u8) c == *p++) { + if ((t_u8)c == *p++) { LEAVE(); return (void *)(p - 1); } @@ -401,6 +800,7 @@ wlan_get_region_cfp_table(pmlan_adapter pmadapter, t_u8 region, t_u8 band, if (!region) { /* Invalid region code, use CFP code */ cfp_bg = pmadapter->cfp_code_bg; + cfp_a = pmadapter->cfp_code_a; } if (band & (BAND_B | BAND_G | BAND_GN)) { @@ -416,6 +816,19 @@ wlan_get_region_cfp_table(pmlan_adapter pmadapter, t_u8 region, t_u8 band, } } } + if (band & (BAND_A | BAND_AN)) { + for (i = 0; i < MLAN_CFP_TABLE_SIZE_A; i++) { + PRINTM(MINFO, "cfp_table_A[%d].code=%d\n", i, + cfp_table_A[i].code); + /* Check if region/code matches for A bands */ + if (cfp_table_A[i].code == cfp_a) { + /* Select by band */ + *cfp_no = cfp_table_A[i].cfp_no; + LEAVE(); + return cfp_table_A[i].cfp; + } + } + } if (!region) PRINTM(MERROR, "Error Band[0x%x] or code[BG:%#x, A:%#x]\n", @@ -440,8 +853,8 @@ wlan_get_region_cfp_table(pmlan_adapter pmadapter, t_u8 region, t_u8 band, */ static t_void wlan_cfp_copy_dynamic(pmlan_adapter pmadapter, - chan_freq_power_t * cfp, t_u8 num_cfp, - chan_freq_power_t * cfp_src, t_u8 num_cfp_src) + chan_freq_power_t *cfp, t_u8 num_cfp, + chan_freq_power_t *cfp_src, t_u8 num_cfp_src) { int i, j; ENTER(); @@ -477,8 +890,8 @@ wlan_cfp_copy_dynamic(pmlan_adapter pmadapter, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_misc_country_2_cfp_table_code(pmlan_adapter pmadapter, t_u8 * country_code, - t_u8 * cfp_bg, t_u8 * cfp_a) +wlan_misc_country_2_cfp_table_code(pmlan_adapter pmadapter, t_u8 *country_code, + t_u8 *cfp_bg, t_u8 *cfp_a) { t_u8 i; @@ -499,6 +912,33 @@ wlan_misc_country_2_cfp_table_code(pmlan_adapter pmadapter, t_u8 * country_code, return MLAN_STATUS_FAILURE; } +/** + * @brief This function adjust the rate index + * + * @param priv A pointer to mlan_private structure + * @param rx_rate rx rate + * @param rate_info rate info + * @return rate index + */ +t_u8 +wlan_adjust_data_rate(mlan_private *priv, t_u8 rx_rate, t_u8 rate_info) +{ + t_u8 rate_index = 0; + +#define MAX_MCS_NUM_SUPP 16 + + /** HT40 */ + if ((rate_info & MBIT(0)) && (rate_info & MBIT(1))) + rate_index = MLAN_RATE_INDEX_MCS0 + rx_rate + MAX_MCS_NUM_SUPP; + else if (rate_info & MBIT(0)) /** HT20 */ + rate_index = MLAN_RATE_INDEX_MCS0 + rx_rate; + else + rate_index = + (rx_rate > + MLAN_RATE_INDEX_OFDM0) ? rx_rate - 1 : rx_rate; + return rate_index; +} + #ifdef STA_SUPPORT #endif /* STA_SUPPORT */ @@ -516,13 +956,10 @@ wlan_index_to_data_rate(pmlan_adapter pmadapter, t_u8 index, t_u8 ht_info) { #define MCS_NUM_SUPP 8 t_u16 mcs_num_supp = MCS_NUM_SUPP; - t_u16 mcs_rate[4][MCS_NUM_SUPP] = - { {0x1b, 0x36, 0x51, 0x6c, 0xa2, 0xd8, 0xf3, 0x10e} - , /* LG 40M */ - {0x1e, 0x3c, 0x5a, 0x78, 0xb4, 0xf0, 0x10e, 0x12c} - , /* SG 40M */ - {0x0d, 0x1a, 0x27, 0x34, 0x4e, 0x68, 0x75, 0x82} - , /* LG 20M */ + t_u16 mcs_rate[4][MCS_NUM_SUPP] = { {0x1b, 0x36, 0x51, 0x6c, 0xa2, 0xd8, 0xf3, 0x10e}, /* LG + 40M */ + {0x1e, 0x3c, 0x5a, 0x78, 0xb4, 0xf0, 0x10e, 0x12c}, /* SG 40M */ + {0x0d, 0x1a, 0x27, 0x34, 0x4e, 0x68, 0x75, 0x82}, /* LG 20M */ {0x0e, 0x1c, 0x2b, 0x39, 0x56, 0x73, 0x82, 0x90} }; /* SG 20M */ t_u32 rate = 0; @@ -578,11 +1015,11 @@ wlan_data_rate_to_index(pmlan_adapter pmadapter, t_u32 rate) ENTER(); if (rate) { - ptr = wlan_memchr(pmadapter, WlanDataRates, (t_u8) rate, + ptr = wlan_memchr(pmadapter, WlanDataRates, (t_u8)rate, sizeof(WlanDataRates)); if (ptr) { LEAVE(); - return (t_u8) (ptr - WlanDataRates); + return (t_u8)(ptr - WlanDataRates); } } LEAVE(); @@ -600,7 +1037,7 @@ wlan_data_rate_to_index(pmlan_adapter pmadapter, t_u32 rate) * @return The number of Rates */ t_u32 -wlan_get_active_data_rates(mlan_private * pmpriv, t_u32 bss_mode, +wlan_get_active_data_rates(mlan_private *pmpriv, t_u32 bss_mode, t_u8 config_bands, WLAN_802_11_RATES rates) { t_u32 k; @@ -632,13 +1069,15 @@ wlan_get_active_data_rates(mlan_private * pmpriv, t_u32 bss_mode, * @return The Tx power */ t_u8 -wlan_get_txpwr_of_chan_from_cfp(mlan_private * pmpriv, t_u8 channel) +wlan_get_txpwr_of_chan_from_cfp(mlan_private *pmpriv, t_u8 channel) { t_u8 i = 0; t_u8 j = 0; t_u8 tx_power = 0; t_u32 cfp_no; chan_freq_power_t *cfp = MNULL; + chan_freq_power_t *cfp_a = MNULL; + t_u32 cfp_no_a; ENTER(); @@ -655,7 +1094,26 @@ wlan_get_txpwr_of_chan_from_cfp(mlan_private * pmpriv, t_u8 channel) (cfp + j)->max_tx_power); else tx_power = - (t_u8) (cfp + j)->max_tx_power; + (t_u8)(cfp + j)->max_tx_power; + break; + } + } + } + + for (i = 0; i < MLAN_CFP_TABLE_SIZE_A; i++) { + /* Get CFP */ + cfp_a = cfp_table_A[i].cfp; + cfp_no_a = cfp_table_A[i].cfp_no; + for (j = 0; j < cfp_no_a; j++) { + if ((cfp_a + j)->channel == channel) { + if (tx_power != 0) + tx_power = + MIN(tx_power, + (cfp_a + j)->max_tx_power); + else + tx_power = + (t_u8)((cfp_a + + j)->max_tx_power); break; } } @@ -679,7 +1137,7 @@ wlan_get_txpwr_of_chan_from_cfp(mlan_private * pmpriv, t_u8 channel) chan_freq_power_t * wlan_get_cfp_by_band_and_channel(pmlan_adapter pmadapter, t_u8 band, - t_u16 channel, region_chan_t * region_channel) + t_u16 channel, region_chan_t *region_channel) { region_chan_t *rc; chan_freq_power_t *cfp = MNULL; @@ -693,6 +1151,17 @@ wlan_get_cfp_by_band_and_channel(pmlan_adapter pmadapter, if (!rc->valid || !rc->pcfp) continue; switch (rc->band) { + case BAND_A: + switch (band) { + case BAND_AN: + case BAND_A | BAND_AN: + case BAND_A: /* Matching BAND_A */ + break; + + default: + continue; + } + break; case BAND_B: case BAND_G: switch (band) { @@ -741,7 +1210,7 @@ wlan_get_cfp_by_band_and_channel(pmlan_adapter pmadapter, * @return A pointer to chan_freq_power_t structure or MNULL if not found. */ chan_freq_power_t * -wlan_find_cfp_by_band_and_channel(mlan_adapter * pmadapter, +wlan_find_cfp_by_band_and_channel(mlan_adapter *pmadapter, t_u8 band, t_u16 channel) { chan_freq_power_t *cfp = MNULL; @@ -773,7 +1242,7 @@ wlan_find_cfp_by_band_and_channel(mlan_adapter * pmadapter, * @return Pointer to chan_freq_power_t structure; MNULL if not found */ chan_freq_power_t * -wlan_find_cfp_by_band_and_freq(mlan_adapter * pmadapter, t_u8 band, t_u32 freq) +wlan_find_cfp_by_band_and_freq(mlan_adapter *pmadapter, t_u8 band, t_u32 freq) { chan_freq_power_t *cfp = MNULL; region_chan_t *rc; @@ -792,6 +1261,16 @@ wlan_find_cfp_by_band_and_freq(mlan_adapter * pmadapter, t_u8 band, t_u32 freq) if (!rc->valid || !rc->pcfp) continue; switch (rc->band) { + case BAND_A: + switch (band) { + case BAND_AN: + case BAND_A | BAND_AN: + case BAND_A: /* Matching BAND_A */ + break; + default: + continue; + } + break; case BAND_B: case BAND_G: switch (band) { @@ -836,7 +1315,7 @@ wlan_find_cfp_by_band_and_freq(mlan_adapter * pmadapter, t_u8 band, t_u32 freq) * @return MTRUE or MFALSE */ t_u8 -wlan_is_rate_auto(mlan_private * pmpriv) +wlan_is_rate_auto(mlan_private *pmpriv) { t_u32 i; int rate_num = 0; @@ -864,7 +1343,7 @@ wlan_is_rate_auto(mlan_private * pmpriv) * @return Rate index */ int -wlan_get_rate_index(pmlan_adapter pmadapter, t_u16 * rate_bitmap, int size) +wlan_get_rate_index(pmlan_adapter pmadapter, t_u16 *rate_bitmap, int size) { int i; @@ -892,7 +1371,7 @@ wlan_get_rate_index(pmlan_adapter pmadapter, t_u16 * rate_bitmap, int size) * @return The number of Rates */ t_u32 -wlan_get_supported_rates(mlan_private * pmpriv, t_u32 bss_mode, +wlan_get_supported_rates(mlan_private *pmpriv, t_u32 bss_mode, t_u8 config_bands, WLAN_802_11_RATES rates) { t_u32 k = 0; @@ -916,6 +1395,9 @@ wlan_get_supported_rates(mlan_private * pmpriv, t_u32 bss_mode, sizeof(SupportedRates_G)); break; case BAND_B | BAND_G: + case BAND_A | BAND_B | BAND_G: + case BAND_A | BAND_B: + case BAND_A | BAND_B | BAND_G | BAND_GN | BAND_AN: case BAND_B | BAND_G | BAND_GN: PRINTM(MINFO, "Infra band=%d SupportedRates_BG\n", config_bands); @@ -931,6 +1413,21 @@ wlan_get_supported_rates(mlan_private * pmpriv, t_u32 bss_mode, sizeof(SupportedRates_BG)); #endif break; + case BAND_A: + case BAND_A | BAND_G: + PRINTM(MINFO, "Infra band=%d SupportedRates_A\n", + config_bands); + k = wlan_copy_rates(rates, k, SupportedRates_A, + sizeof(SupportedRates_A)); + break; + case BAND_AN: + case BAND_A | BAND_AN: + case BAND_A | BAND_G | BAND_AN | BAND_GN: + PRINTM(MINFO, "Infra band=%d SupportedRates_A\n", + config_bands); + k = wlan_copy_rates(rates, k, SupportedRates_A, + sizeof(SupportedRates_A)); + break; case BAND_GN: PRINTM(MINFO, "Infra band=%d SupportedRates_N\n", config_bands); @@ -958,6 +1455,13 @@ wlan_get_supported_rates(mlan_private * pmpriv, t_u32 bss_mode, k = wlan_copy_rates(rates, k, AdhocRates_BG, sizeof(AdhocRates_BG)); break; + case BAND_A: + case BAND_AN: + case BAND_A | BAND_AN: + PRINTM(MINFO, "Band: Adhoc A\n"); + k = wlan_copy_rates(rates, k, AdhocRates_A, + sizeof(AdhocRates_A)); + break; } } @@ -975,7 +1479,7 @@ wlan_get_supported_rates(mlan_private * pmpriv, t_u32 bss_mode, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_set_regiontable(mlan_private * pmpriv, t_u8 region, t_u8 band) +wlan_set_regiontable(mlan_private *pmpriv, t_u8 region, t_u8 band) { mlan_adapter *pmadapter = pmpriv->adapter; int i = 0, j; @@ -995,7 +1499,7 @@ wlan_set_regiontable(mlan_private * pmpriv, t_u8 region, t_u8 band) BAND_G | BAND_B | BAND_GN, &cfp_no); if (cfp) { - pmadapter->region_channel[i].num_cfp = (t_u8) cfp_no; + pmadapter->region_channel[i].num_cfp = (t_u8)cfp_no; pmadapter->region_channel[i].pcfp = cfp; } else { PRINTM(MERROR, "wrong region code %#x in Band B-G\n", @@ -1024,10 +1528,83 @@ wlan_set_regiontable(mlan_private * pmpriv, t_u8 region, t_u8 band) i++; } + if (band & (BAND_A | BAND_AN)) { + cfp = wlan_get_region_cfp_table(pmadapter, region, BAND_A, + &cfp_no); + if (cfp) { + pmadapter->region_channel[i].num_cfp = (t_u8)cfp_no; + pmadapter->region_channel[i].pcfp = cfp; + } else { + PRINTM(MERROR, "wrong region code %#x in Band A\n", + region); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + pmadapter->region_channel[i].valid = MTRUE; + pmadapter->region_channel[i].region = region; + pmadapter->region_channel[i].band = BAND_A; + + for (j = 0; j < MAX_REGION_CHANNEL_NUM; j++) { + if (region_chan_old[j].band & BAND_A) + break; + } + if ((j < MAX_REGION_CHANNEL_NUM) && region_chan_old[j].valid) + wlan_cfp_copy_dynamic(pmadapter, cfp, cfp_no, + region_chan_old[j].pcfp, + region_chan_old[j].num_cfp); + else + wlan_cfp_copy_dynamic(pmadapter, cfp, cfp_no, MNULL, 0); + } LEAVE(); return MLAN_STATUS_SUCCESS; } +/** + * @brief Get if radar detection is enabled or not on a certain channel + * + * @param priv Private driver information structure + * @param chnl Channel to determine radar detection requirements + * + * @return + * - MTRUE if radar detection is required + * - MFALSE otherwise + */ +t_bool +wlan_get_cfp_radar_detect(mlan_private *priv, t_u8 chnl) +{ + int i, j; + t_bool required = MFALSE; + chan_freq_power_t *pcfp = MNULL; + + ENTER(); + + /* get the cfp table first */ + for (i = 0; i < MAX_REGION_CHANNEL_NUM; i++) { + if (priv->adapter->region_channel[i].band == BAND_A) { + pcfp = priv->adapter->region_channel[i].pcfp; + break; + } + } + + if (!pcfp) { + /* This means operation in BAND-A is not support, we can just + return false here, it's harmless */ + goto done; + } + + /* get the radar detection requirements according to chan num */ + for (j = 0; j < priv->adapter->region_channel[i].num_cfp; j++) { + if (pcfp[j].channel == chnl) { + required = pcfp[j].passive_scan_or_radar_detect; + break; + } + } + +done: + LEAVE(); + return required; +} + /** * @brief Get if scan type is passive or not on a certain channel for b/g band * @@ -1040,7 +1617,7 @@ wlan_set_regiontable(mlan_private * pmpriv, t_u8 region, t_u8 band) */ t_bool -wlan_bg_scan_type_is_passive(mlan_private * priv, t_u8 chnl) +wlan_bg_scan_type_is_passive(mlan_private *priv, t_u8 chnl) { int i, j; t_bool passive = MFALSE; @@ -1088,7 +1665,7 @@ wlan_bg_scan_type_is_passive(mlan_private * priv, t_u8 chnl) */ t_bool -wlan_is_chan_blacklisted(mlan_private * priv, t_u8 band, t_u8 chan) +wlan_is_chan_blacklisted(mlan_private *priv, t_u8 band, t_u8 chan) { int i, j; t_bool blacklist = MFALSE; @@ -1132,7 +1709,7 @@ wlan_is_chan_blacklisted(mlan_private * priv, t_u8 band, t_u8 chan) */ t_bool -wlan_set_chan_blacklist(mlan_private * priv, t_u8 band, t_u8 chan, t_bool bl) +wlan_set_chan_blacklist(mlan_private *priv, t_u8 band, t_u8 chan, t_bool bl) { int i, j; t_bool set_bl = MFALSE; diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_cmdevt.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_cmdevt.c old mode 100755 new mode 100644 index b62ddab2..a6b400d1 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_cmdevt.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_cmdevt.c @@ -32,6 +32,7 @@ Change Log: #include "mlan_main.h" #include "mlan_wmm.h" #include "mlan_11n.h" +#include "mlan_11h.h" #include "mlan_sdio.h" /******************************************************** Local Variables @@ -59,17 +60,17 @@ wlan_check_scan_queue(IN pmlan_adapter pmadapter) t_u16 num = 0; pcmd_node = - (cmd_ctrl_node *) util_peek_list(pmadapter->pmoal_handle, - &pmadapter->scan_pending_q, - pmadapter->callbacks. - moal_spin_lock, - pmadapter->callbacks. - moal_spin_unlock); + (cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle, + &pmadapter->scan_pending_q, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); if (!pcmd_node) { PRINTM(MERROR, "No pending scan command\n"); return; } - while (pcmd_node != (cmd_ctrl_node *) & pmadapter->scan_pending_q) { + while (pcmd_node != (cmd_ctrl_node *)&pmadapter->scan_pending_q) { num++; pcmd_node = pcmd_node->pnext; } @@ -91,25 +92,27 @@ wlan_dump_pending_commands(pmlan_adapter pmadapter) HostCmd_DS_COMMAND *pcmd; ENTER(); - + wlan_request_cmd_lock(pmadapter); pcmd_node = - (cmd_ctrl_node *) util_peek_list(pmadapter->pmoal_handle, - &pmadapter->cmd_pending_q, - pmadapter->callbacks. - moal_spin_lock, - pmadapter->callbacks. - moal_spin_unlock); + (cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); if (!pcmd_node) { + wlan_release_cmd_lock(pmadapter); LEAVE(); return; } - while (pcmd_node != (cmd_ctrl_node *) & pmadapter->cmd_pending_q) { - pcmd = (HostCmd_DS_COMMAND *) (pcmd_node->cmdbuf->pbuf + - pcmd_node->cmdbuf->data_offset); + while (pcmd_node != (cmd_ctrl_node *)&pmadapter->cmd_pending_q) { + pcmd = (HostCmd_DS_COMMAND *)(pcmd_node->cmdbuf->pbuf + + pcmd_node->cmdbuf->data_offset); PRINTM(MERROR, "pending command id: 0x%x ioctl_buf=%p\n", wlan_le16_to_cpu(pcmd->command), pcmd_node->pioctl_buf); pcmd_node = pcmd_node->pnext; } + wlan_release_cmd_lock(pmadapter); #ifdef STA_SUPPORT wlan_check_scan_queue(pmadapter); #endif @@ -119,6 +122,7 @@ wlan_dump_pending_commands(pmlan_adapter pmadapter) #define REASON_CODE_NO_CMD_NODE 1 #define REASON_CODE_CMD_TIMEOUT 2 +#define REASON_CODE_CMD_TO_CARD_FAILURE 3 /** * @brief This function dump debug info @@ -126,7 +130,7 @@ wlan_dump_pending_commands(pmlan_adapter pmadapter) * @return N/A */ t_void -wlan_dump_info(mlan_adapter * pmadapter, t_u8 reason) +wlan_dump_info(mlan_adapter *pmadapter, t_u8 reason) { cmd_ctrl_node *pcmd_node = MNULL; #ifdef DEBUG_LEVEL1 @@ -135,6 +139,7 @@ wlan_dump_info(mlan_adapter * pmadapter, t_u8 reason) t_u8 i; #ifdef SDIO_MULTI_PORT_TX_AGGR t_u8 j; + t_u8 mp_aggr_pkt_limit = pmadapter->psdio_device->mp_aggr_pkt_limit; #endif t_u16 cmd_id, cmd_act; mlan_private *pmpriv = MNULL; @@ -150,9 +155,21 @@ wlan_dump_info(mlan_adapter * pmadapter, t_u8 reason) case REASON_CODE_CMD_TIMEOUT: PRINTM(MERROR, "Commmand Timeout\n"); break; + case REASON_CODE_CMD_TO_CARD_FAILURE: + PRINTM(MERROR, "Command to card failure\n"); + break; default: break; } + if ((reason == REASON_CODE_NO_CMD_NODE) && + (pmadapter->dbg.num_no_cmd_node > 1)) { + if (pmadapter->dbg.num_no_cmd_node >= 5) + wlan_recv_event(wlan_get_priv + (pmadapter, MLAN_BSS_ROLE_ANY), + MLAN_EVENT_ID_DRV_DBG_DUMP, MNULL); + LEAVE(); + return; + } wlan_dump_pending_commands(pmadapter); if (reason != REASON_CODE_CMD_TIMEOUT) { if (!pmadapter->curr_cmd) { @@ -192,7 +209,8 @@ wlan_dump_info(mlan_adapter * pmadapter, t_u8 reason) &pmadapter->rx_pkts_queued, MNULL, MNULL)); PRINTM(MERROR, "more_task_flag = %d\n", pmadapter->more_task_flag); - PRINTM(MERROR, "num_cmd_timeout = %d\n", + PRINTM(MERROR, "num_cmd_timeout = %d\n", pmadapter->num_cmd_timeout); + PRINTM(MERROR, "dbg.num_cmd_timeout = %d\n", pmadapter->dbg.num_cmd_timeout); PRINTM(MERROR, "last_cmd_index = %d\n", pmadapter->dbg.last_cmd_index); PRINTM(MERROR, "last_cmd_id = "); @@ -265,6 +283,7 @@ wlan_dump_info(mlan_adapter * pmadapter, t_u8 reason) pmadapter->mp_rd_bitmap, pmadapter->curr_rd_port); PRINTM(MERROR, "mp_wr_bitmap=0x%x curr_wr_port=0x%x\n", pmadapter->mp_wr_bitmap, pmadapter->curr_wr_port); + PRINTM(MERROR, "mp_invalid_update=%d\n", pmadapter->mp_invalid_update); #ifdef SDIO_MULTI_PORT_TX_AGGR PRINTM(MERROR, "last_recv_wr_bitmap=0x%x last_mp_index=%d\n", pmadapter->last_recv_wr_bitmap, pmadapter->last_mp_index); @@ -275,15 +294,19 @@ wlan_dump_info(mlan_adapter * pmadapter, t_u8 reason) pmadapter->last_mp_wr_ports[i], pmadapter->last_mp_wr_len[i], pmadapter->last_curr_wr_port[i]); - for (j = 0; j < SDIO_MP_AGGR_DEF_PKT_LIMIT; j++) { + for (j = 0; j < mp_aggr_pkt_limit; j++) { PRINTM(MERROR, "0x%02x ", pmadapter->last_mp_wr_info[i * - SDIO_MP_AGGR_DEF_PKT_LIMIT - + j]); + mp_aggr_pkt_limit + + j]); } PRINTM(MERROR, "\n"); } #endif + for (i = 0; i < pmadapter->priv_num; ++i) { + if (pmadapter->priv[i]) + wlan_dump_ralist(pmadapter->priv[i]); + } if (reason != REASON_CODE_CMD_TIMEOUT) { if ((pmadapter->dbg.num_no_cmd_node >= 5) || (pmadapter->pm_wakeup_card_req && @@ -333,7 +356,7 @@ wlan_hexval(t_u8 chr) * @return The converted hex value if param a is a valid hex, else 0 */ int -wlan_atox(t_u8 * a) +wlan_atox(t_u8 *a) { int i = 0; @@ -356,7 +379,7 @@ wlan_atox(t_u8 * a) * @return The parsed hex data length */ static t_u32 -wlan_parse_cal_cfg(t_u8 * src, t_size len, t_u8 * dst) +wlan_parse_cal_cfg(t_u8 *src, t_size len, t_u8 *dst) { t_u8 *ptr; t_u8 *dptr; @@ -395,9 +418,9 @@ wlan_parse_cal_cfg(t_u8 * src, t_size len, t_u8 * dst) */ static void wlan_init_cmd_node(IN pmlan_private pmpriv, - IN cmd_ctrl_node * pcmd_node, + IN cmd_ctrl_node *pcmd_node, IN t_u32 cmd_oid, - IN t_void * pioctl_buf, IN t_void * pdata_buf) + IN t_void *pioctl_buf, IN t_void *pdata_buf) { mlan_adapter *pmadapter = pmpriv->adapter; @@ -435,7 +458,7 @@ wlan_init_cmd_node(IN pmlan_private pmpriv, * @return cmd_ctrl_node A pointer to cmd_ctrl_node structure or MNULL */ static cmd_ctrl_node * -wlan_get_cmd_node(mlan_adapter * pmadapter) +wlan_get_cmd_node(mlan_adapter *pmadapter) { cmd_ctrl_node *pcmd_node; @@ -450,16 +473,14 @@ wlan_get_cmd_node(mlan_adapter * pmadapter) pmadapter->callbacks.moal_spin_lock, pmadapter->callbacks.moal_spin_unlock)) { pcmd_node = - (cmd_ctrl_node *) util_dequeue_list(pmadapter-> - pmoal_handle, - &pmadapter-> - cmd_free_q, - pmadapter-> - callbacks. - moal_spin_lock, - pmadapter-> - callbacks. - moal_spin_unlock); + (cmd_ctrl_node *)util_dequeue_list(pmadapter-> + pmoal_handle, + &pmadapter-> + cmd_free_q, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); } else { PRINTM(MERROR, "GET_CMD_NODE: cmd_ctrl_node is not available\n"); @@ -479,7 +500,7 @@ wlan_get_cmd_node(mlan_adapter * pmadapter) * @return N/A */ static t_void -wlan_clean_cmd_node(pmlan_adapter pmadapter, cmd_ctrl_node * pcmd_node) +wlan_clean_cmd_node(pmlan_adapter pmadapter, cmd_ctrl_node *pcmd_node) { ENTER(); @@ -504,39 +525,34 @@ wlan_clean_cmd_node(pmlan_adapter pmadapter, cmd_ctrl_node * pcmd_node) #ifdef STA_SUPPORT /** * @brief This function will return the pointer to the first entry in - * pending cmd which matches the given req_id + * pending cmd which is scan command * * @param pmadapter A pointer to mlan_adapter - * @param req_id ioctl req_id. * * @return A pointer to first entry match pioctl_req */ static cmd_ctrl_node * -wlan_get_pending_ioctl_by_id(pmlan_adapter pmadapter, t_u32 req_id) +wlan_get_pending_scan_cmd(pmlan_adapter pmadapter) { cmd_ctrl_node *pcmd_node = MNULL; - mlan_ioctl_req *pioctl_buf = MNULL; ENTER(); pcmd_node = - (cmd_ctrl_node *) util_peek_list(pmadapter->pmoal_handle, - &pmadapter->cmd_pending_q, - pmadapter->callbacks. - moal_spin_lock, - pmadapter->callbacks. - moal_spin_unlock); + (cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); if (!pcmd_node) { LEAVE(); return MNULL; } - while (pcmd_node != (cmd_ctrl_node *) & pmadapter->cmd_pending_q) { - if (pcmd_node->pioctl_buf) { - pioctl_buf = (mlan_ioctl_req *) pcmd_node->pioctl_buf; - if (pioctl_buf->req_id == req_id) { - LEAVE(); - return pcmd_node; - } + while (pcmd_node != (cmd_ctrl_node *)&pmadapter->cmd_pending_q) { + if (pcmd_node->cmd_flag & CMD_F_SCAN) { + LEAVE(); + return pcmd_node; } pcmd_node = pcmd_node->pnext; } @@ -562,17 +578,17 @@ wlan_get_pending_ioctl_cmd(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req) ENTER(); pcmd_node = - (cmd_ctrl_node *) util_peek_list(pmadapter->pmoal_handle, - &pmadapter->cmd_pending_q, - pmadapter->callbacks. - moal_spin_lock, - pmadapter->callbacks. - moal_spin_unlock); + (cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); if (!pcmd_node) { LEAVE(); return MNULL; } - while (pcmd_node != (cmd_ctrl_node *) & pmadapter->cmd_pending_q) { + while (pcmd_node != (cmd_ctrl_node *)&pmadapter->cmd_pending_q) { if (pcmd_node->pioctl_buf && (pcmd_node->pioctl_buf == pioctl_req)) { LEAVE(); @@ -601,19 +617,19 @@ wlan_get_bss_pending_ioctl_cmd(pmlan_adapter pmadapter, t_u32 bss_index) ENTER(); pcmd_node = - (cmd_ctrl_node *) util_peek_list(pmadapter->pmoal_handle, - &pmadapter->cmd_pending_q, - pmadapter->callbacks. - moal_spin_lock, - pmadapter->callbacks. - moal_spin_unlock); + (cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); if (!pcmd_node) { LEAVE(); return MNULL; } - while (pcmd_node != (cmd_ctrl_node *) & pmadapter->cmd_pending_q) { + while (pcmd_node != (cmd_ctrl_node *)&pmadapter->cmd_pending_q) { if (pcmd_node->pioctl_buf) { - pioctl_buf = (mlan_ioctl_req *) pcmd_node->pioctl_buf; + pioctl_buf = (mlan_ioctl_req *)pcmd_node->pioctl_buf; if (pioctl_buf->bss_index == bss_index) { LEAVE(); return pcmd_node; @@ -636,7 +652,7 @@ wlan_get_bss_pending_ioctl_cmd(pmlan_adapter pmadapter, t_u32 bss_index) */ static mlan_status wlan_ret_host_cmd(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) { mlan_ds_misc_cfg *misc; t_u16 size = wlan_le16_to_cpu(resp->size); @@ -646,7 +662,7 @@ wlan_ret_host_cmd(IN pmlan_private pmpriv, PRINTM(MINFO, "host command response size = %d\n", size); size = MIN(size, MRVDRV_SIZE_OF_CMD_BUFFER); if (pioctl_buf) { - misc = (mlan_ds_misc_cfg *) pioctl_buf->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; misc->param.hostcmd.len = size; memcpy(pmpriv->adapter, misc->param.hostcmd.cmd, (void *)resp, size); @@ -666,9 +682,9 @@ wlan_ret_host_cmd(IN pmlan_private pmpriv, */ static mlan_status wlan_cmd_host_cmd(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) { - mlan_ds_misc_cmd *pcmd_ptr = (mlan_ds_misc_cmd *) pdata_buf; + mlan_ds_misc_cmd *pcmd_ptr = (mlan_ds_misc_cmd *)pdata_buf; ENTER(); @@ -689,11 +705,11 @@ wlan_cmd_host_cmd(IN pmlan_private pmpriv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_dnld_cmd_to_fw(IN mlan_private * pmpriv, IN cmd_ctrl_node * pcmd_node) +wlan_dnld_cmd_to_fw(IN mlan_private *pmpriv, IN cmd_ctrl_node *pcmd_node) { mlan_adapter *pmadapter = pmpriv->adapter; - mlan_callbacks *pcb = (mlan_callbacks *) & pmadapter->callbacks; + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; mlan_status ret = MLAN_STATUS_SUCCESS; HostCmd_DS_COMMAND *pcmd; mlan_ioctl_req *pioctl_buf = MNULL; @@ -708,7 +724,7 @@ wlan_dnld_cmd_to_fw(IN mlan_private * pmpriv, IN cmd_ctrl_node * pcmd_node) if (pcmd_node) if (pcmd_node->pioctl_buf != MNULL) - pioctl_buf = (mlan_ioctl_req *) pcmd_node->pioctl_buf; + pioctl_buf = (mlan_ioctl_req *)pcmd_node->pioctl_buf; if (!pmadapter || !pcmd_node) { if (pioctl_buf) pioctl_buf->status_code = MLAN_ERROR_CMD_DNLD_FAIL; @@ -716,8 +732,8 @@ wlan_dnld_cmd_to_fw(IN mlan_private * pmpriv, IN cmd_ctrl_node * pcmd_node) goto done; } - pcmd = (HostCmd_DS_COMMAND *) (pcmd_node->cmdbuf->pbuf + - pcmd_node->cmdbuf->data_offset); + pcmd = (HostCmd_DS_COMMAND *)(pcmd_node->cmdbuf->pbuf + + pcmd_node->cmdbuf->data_offset); /* Sanity test */ if (pcmd == MNULL || pcmd->size == 0) { @@ -752,9 +768,9 @@ wlan_dnld_cmd_to_fw(IN mlan_private * pmpriv, IN cmd_ctrl_node * pcmd_node) PRINTM(MCMND, "DNLD_CMD (%lu.%06lu): 0x%x, act 0x%x, len %d, seqno 0x%x\n", sec, usec, cmd_code, - wlan_le16_to_cpu(*(t_u16 *) ((t_u8 *) pcmd + S_DS_GEN)), - cmd_size, wlan_le16_to_cpu(pcmd->seq_num)); - DBG_HEXDUMP(MCMD_D, "DNLD_CMD", (t_u8 *) pcmd, cmd_size); + wlan_le16_to_cpu(*(t_u16 *)((t_u8 *)pcmd + S_DS_GEN)), cmd_size, + wlan_le16_to_cpu(pcmd->seq_num)); + DBG_HEXDUMP(MCMD_D, "DNLD_CMD", (t_u8 *)pcmd, cmd_size); /* Send the command to lower layer */ @@ -767,7 +783,7 @@ wlan_dnld_cmd_to_fw(IN mlan_private * pmpriv, IN cmd_ctrl_node * pcmd_node) if (ret == MLAN_STATUS_FAILURE) { PRINTM(MERROR, "DNLD_CMD: Host to Card Failed\n"); if (pcmd_node->pioctl_buf) { - pioctl_buf = (mlan_ioctl_req *) pcmd_node->pioctl_buf; + pioctl_buf = (mlan_ioctl_req *)pcmd_node->pioctl_buf; pioctl_buf->status_code = MLAN_ERROR_CMD_DNLD_FAIL; } wlan_insert_cmd_to_free_q(pmadapter, pmadapter->curr_cmd); @@ -777,6 +793,7 @@ wlan_dnld_cmd_to_fw(IN mlan_private * pmpriv, IN cmd_ctrl_node * pcmd_node) wlan_release_cmd_lock(pmadapter); pmadapter->dbg.num_cmd_host_to_card_failure++; + wlan_dump_info(pmadapter, REASON_CODE_CMD_TO_CARD_FAILURE); ret = MLAN_STATUS_FAILURE; goto done; } @@ -786,7 +803,7 @@ wlan_dnld_cmd_to_fw(IN mlan_private * pmpriv, IN cmd_ctrl_node * pcmd_node) (pmadapter->dbg.last_cmd_index + 1) % DBG_CMD_NUM; pmadapter->dbg.last_cmd_id[pmadapter->dbg.last_cmd_index] = cmd_code; pmadapter->dbg.last_cmd_act[pmadapter->dbg.last_cmd_index] = - wlan_le16_to_cpu(*(t_u16 *) ((t_u8 *) pcmd + S_DS_GEN)); + wlan_le16_to_cpu(*(t_u16 *)((t_u8 *)pcmd + S_DS_GEN)); /* Clear BSS_NO_BITS from HostCmd */ cmd_code &= HostCmd_CMD_ID_MASK; @@ -794,7 +811,7 @@ wlan_dnld_cmd_to_fw(IN mlan_private * pmpriv, IN cmd_ctrl_node * pcmd_node) if (cmd_code == HostCmd_CMD_SOFT_RESET) { PRINTM(MCMND, "DNLD_CMD: SoftReset\n"); if (pcmd_node->pioctl_buf) { - pioctl_buf = (mlan_ioctl_req *) pcmd_node->pioctl_buf; + pioctl_buf = (mlan_ioctl_req *)pcmd_node->pioctl_buf; wlan_request_cmd_lock(pmadapter); pmadapter->curr_cmd->pioctl_buf = MNULL; wlan_release_cmd_lock(pmadapter); @@ -830,15 +847,15 @@ wlan_dnld_cmd_to_fw(IN mlan_private * pmpriv, IN cmd_ctrl_node * pcmd_node) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_dnld_sleep_confirm_cmd(mlan_adapter * pmadapter) +wlan_dnld_sleep_confirm_cmd(mlan_adapter *pmadapter) { mlan_status ret = MLAN_STATUS_SUCCESS; static t_u32 i; t_u16 cmd_len = 0; opt_sleep_confirm_buffer *sleep_cfm_buf = - (opt_sleep_confirm_buffer *) (pmadapter->psleep_cfm->pbuf + - pmadapter->psleep_cfm-> - data_offset); + (opt_sleep_confirm_buffer *)(pmadapter->psleep_cfm->pbuf + + pmadapter->psleep_cfm-> + data_offset); ENTER(); @@ -917,7 +934,7 @@ wlan_dnld_sleep_confirm_cmd(mlan_adapter * pmadapter) * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_recv_event(pmlan_private priv, mlan_event_id event_id, t_void * pmevent) +wlan_recv_event(pmlan_private priv, mlan_event_id event_id, t_void *pmevent) { pmlan_callbacks pcb = &priv->adapter->callbacks; @@ -926,7 +943,7 @@ wlan_recv_event(pmlan_private priv, mlan_event_id event_id, t_void * pmevent) if (pmevent) /* The caller has provided the event. */ pcb->moal_recv_event(priv->adapter->pmoal_handle, - (pmlan_event) pmevent); + (pmlan_event)pmevent); else { mlan_event mevent; @@ -951,10 +968,10 @@ wlan_recv_event(pmlan_private priv, mlan_event_id event_id, t_void * pmevent) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_alloc_cmd_buffer(IN mlan_adapter * pmadapter) +wlan_alloc_cmd_buffer(IN mlan_adapter *pmadapter) { mlan_status ret = MLAN_STATUS_SUCCESS; - mlan_callbacks *pcb = (mlan_callbacks *) & pmadapter->callbacks; + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; cmd_ctrl_node *pcmd_array = MNULL; t_u32 buf_size; t_u32 i; @@ -965,7 +982,7 @@ wlan_alloc_cmd_buffer(IN mlan_adapter * pmadapter) buf_size = sizeof(cmd_ctrl_node) * MRVDRV_NUM_OF_CMD_BUFFER; ret = pcb->moal_malloc(pmadapter->pmoal_handle, buf_size, MLAN_MEM_DEF | MLAN_MEM_DMA, - (t_u8 **) & pcmd_array); + (t_u8 **)&pcmd_array); if (ret != MLAN_STATUS_SUCCESS || !pcmd_array) { PRINTM(MERROR, "ALLOC_CMD_BUF: Failed to allocate pcmd_array\n"); @@ -1006,9 +1023,9 @@ wlan_alloc_cmd_buffer(IN mlan_adapter * pmadapter) * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_free_cmd_buffer(IN mlan_adapter * pmadapter) +wlan_free_cmd_buffer(IN mlan_adapter *pmadapter) { - mlan_callbacks *pcb = (mlan_callbacks *) & pmadapter->callbacks; + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; cmd_ctrl_node *pcmd_array; t_u32 i; @@ -1038,7 +1055,7 @@ wlan_free_cmd_buffer(IN mlan_adapter * pmadapter) if (pmadapter->cmd_pool) { PRINTM(MINFO, "Free command pool.\n"); pcb->moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) pmadapter->cmd_pool); + (t_u8 *)pmadapter->cmd_pool); pmadapter->cmd_pool = MNULL; } @@ -1070,8 +1087,16 @@ wlan_process_event(pmlan_adapter pmadapter) pmadapter->dbg.last_event_index = (pmadapter->dbg.last_event_index + 1) % DBG_CMD_NUM; pmadapter->dbg.last_event[pmadapter->dbg.last_event_index] = - (t_u16) eventcause; - + (t_u16)eventcause; + + if ((eventcause & EVENT_ID_MASK) == EVENT_RADAR_DETECTED) { + if (wlan_11h_dfs_event_preprocessing(pmadapter) == + MLAN_STATUS_SUCCESS) { + memcpy(pmadapter, (t_u8 *)&eventcause, + pmbuf->pbuf + pmbuf->data_offset, + sizeof(eventcause)); + } + } /* Get BSS number and corresponding priv */ priv = wlan_get_priv_by_id(pmadapter, EVENT_GET_BSS_NUM(eventcause), EVENT_GET_BSS_TYPE(eventcause)); @@ -1086,7 +1111,7 @@ wlan_process_event(pmlan_adapter pmadapter) pmbuf->bss_index = priv->bss_index; memcpy(pmadapter, pmbuf->pbuf + pmbuf->data_offset, - (t_u8 *) & eventcause, sizeof(eventcause)); + (t_u8 *)&eventcause, sizeof(eventcause)); } if (MTRUE @@ -1102,9 +1127,8 @@ wlan_process_event(pmlan_adapter pmadapter) pmadapter->event_cause = 0; pmadapter->pmlan_buffer_event = MNULL; - if (pmbuf) { + if (pmbuf) wlan_free_mlan_buffer(pmadapter, pmbuf); - } LEAVE(); return ret; @@ -1118,9 +1142,9 @@ wlan_process_event(pmlan_adapter pmadapter) * @return N/A */ t_void -wlan_request_cmd_lock(IN mlan_adapter * pmadapter) +wlan_request_cmd_lock(IN mlan_adapter *pmadapter) { - mlan_callbacks *pcb = (mlan_callbacks *) & pmadapter->callbacks; + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; ENTER(); @@ -1139,9 +1163,9 @@ wlan_request_cmd_lock(IN mlan_adapter * pmadapter) * @return N/A */ t_void -wlan_release_cmd_lock(IN mlan_adapter * pmadapter) +wlan_release_cmd_lock(IN mlan_adapter *pmadapter) { - mlan_callbacks *pcb = (mlan_callbacks *) & pmadapter->callbacks; + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; ENTER(); @@ -1166,17 +1190,16 @@ wlan_release_cmd_lock(IN mlan_adapter * pmadapter) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_prepare_cmd(IN mlan_private * pmpriv, +wlan_prepare_cmd(IN mlan_private *pmpriv, IN t_u16 cmd_no, IN t_u16 cmd_action, - IN t_u32 cmd_oid, - IN t_void * pioctl_buf, IN t_void * pdata_buf) + IN t_u32 cmd_oid, IN t_void *pioctl_buf, IN t_void *pdata_buf) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_adapter *pmadapter = pmpriv->adapter; cmd_ctrl_node *pcmd_node = MNULL; HostCmd_DS_COMMAND *cmd_ptr = MNULL; - pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *) pioctl_buf; + pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *)pioctl_buf; ENTER(); @@ -1212,6 +1235,8 @@ wlan_prepare_cmd(IN mlan_private * pmpriv, ret = MLAN_STATUS_FAILURE; goto done; } + /** reset num no cmd node */ + pmadapter->dbg.num_no_cmd_node = 0; /* Initialize the command node */ wlan_init_cmd_node(pmpriv, pcmd_node, cmd_oid, pioctl_buf, pdata_buf); @@ -1225,8 +1250,8 @@ wlan_prepare_cmd(IN mlan_private * pmpriv, } cmd_ptr = - (HostCmd_DS_COMMAND *) (pcmd_node->cmdbuf->pbuf + - pcmd_node->cmdbuf->data_offset); + (HostCmd_DS_COMMAND *)(pcmd_node->cmdbuf->pbuf + + pcmd_node->cmdbuf->data_offset); cmd_ptr->command = cmd_no; cmd_ptr->result = 0; @@ -1285,17 +1310,17 @@ wlan_prepare_cmd(IN mlan_private * pmpriv, * @return N/A */ t_void -wlan_insert_cmd_to_free_q(IN mlan_adapter * pmadapter, - IN cmd_ctrl_node * pcmd_node) +wlan_insert_cmd_to_free_q(IN mlan_adapter *pmadapter, + IN cmd_ctrl_node *pcmd_node) { - mlan_callbacks *pcb = (mlan_callbacks *) & pmadapter->callbacks; + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; mlan_ioctl_req *pioctl_req = MNULL; ENTER(); if (pcmd_node == MNULL) goto done; if (pcmd_node->pioctl_buf) { - pioctl_req = (mlan_ioctl_req *) pcmd_node->pioctl_buf; + pioctl_req = (mlan_ioctl_req *)pcmd_node->pioctl_buf; if (pioctl_req->status_code != MLAN_ERROR_NO_ERROR) pcb->moal_ioctl_complete(pmadapter->pmoal_handle, pioctl_req, @@ -1310,7 +1335,7 @@ wlan_insert_cmd_to_free_q(IN mlan_adapter * pmadapter, /* Insert node into cmd_free_q */ util_enqueue_list_tail(pmadapter->pmoal_handle, &pmadapter->cmd_free_q, - (pmlan_linked_list) pcmd_node, + (pmlan_linked_list)pcmd_node, pmadapter->callbacks.moal_spin_lock, pmadapter->callbacks.moal_spin_unlock); done: @@ -1327,8 +1352,8 @@ wlan_insert_cmd_to_free_q(IN mlan_adapter * pmadapter, * @return N/A */ t_void -wlan_insert_cmd_to_pending_q(IN mlan_adapter * pmadapter, - IN cmd_ctrl_node * pcmd_node, IN t_u32 add_tail) +wlan_insert_cmd_to_pending_q(IN mlan_adapter *pmadapter, + IN cmd_ctrl_node *pcmd_node, IN t_u32 add_tail) { HostCmd_DS_COMMAND *pcmd = MNULL; t_u16 command; @@ -1340,8 +1365,8 @@ wlan_insert_cmd_to_pending_q(IN mlan_adapter * pmadapter, goto done; } - pcmd = (HostCmd_DS_COMMAND *) (pcmd_node->cmdbuf->pbuf + - pcmd_node->cmdbuf->data_offset); + pcmd = (HostCmd_DS_COMMAND *)(pcmd_node->cmdbuf->pbuf + + pcmd_node->cmdbuf->data_offset); command = wlan_le16_to_cpu(pcmd->command); @@ -1357,13 +1382,13 @@ wlan_insert_cmd_to_pending_q(IN mlan_adapter * pmadapter, if (add_tail) { util_enqueue_list_tail(pmadapter->pmoal_handle, &pmadapter->cmd_pending_q, - (pmlan_linked_list) pcmd_node, + (pmlan_linked_list)pcmd_node, pmadapter->callbacks.moal_spin_lock, pmadapter->callbacks.moal_spin_unlock); } else { util_enqueue_list_head(pmadapter->pmoal_handle, &pmadapter->cmd_pending_q, - (pmlan_linked_list) pcmd_node, + (pmlan_linked_list)pcmd_node, pmadapter->callbacks.moal_spin_lock, pmadapter->callbacks.moal_spin_unlock); } @@ -1386,7 +1411,7 @@ wlan_insert_cmd_to_pending_q(IN mlan_adapter * pmadapter, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_exec_next_cmd(mlan_adapter * pmadapter) +wlan_exec_next_cmd(mlan_adapter *pmadapter) { mlan_private *priv = MNULL; cmd_ctrl_node *pcmd_node = MNULL; @@ -1412,16 +1437,16 @@ wlan_exec_next_cmd(mlan_adapter * pmadapter) wlan_request_cmd_lock(pmadapter); /* Check if any command is pending */ pcmd_node = - (cmd_ctrl_node *) util_peek_list(pmadapter->pmoal_handle, - &pmadapter->cmd_pending_q, - pmadapter->callbacks. - moal_spin_lock, - pmadapter->callbacks. - moal_spin_unlock); + (cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); if (pcmd_node) { - pcmd = (HostCmd_DS_COMMAND *) (pcmd_node->cmdbuf->pbuf + - pcmd_node->cmdbuf->data_offset); + pcmd = (HostCmd_DS_COMMAND *)(pcmd_node->cmdbuf->pbuf + + pcmd_node->cmdbuf->data_offset); priv = pcmd_node->priv; if (pmadapter->ps_state != PS_STATE_AWAKE) { @@ -1433,7 +1458,7 @@ wlan_exec_next_cmd(mlan_adapter * pmadapter) util_unlink_list(pmadapter->pmoal_handle, &pmadapter->cmd_pending_q, - (pmlan_linked_list) pcmd_node, + (pmlan_linked_list)pcmd_node, pmadapter->callbacks.moal_spin_lock, pmadapter->callbacks.moal_spin_unlock); wlan_release_cmd_lock(pmadapter); @@ -1469,7 +1494,7 @@ wlan_exec_next_cmd(mlan_adapter * pmadapter) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_process_cmdresp(mlan_adapter * pmadapter) +wlan_process_cmdresp(mlan_adapter *pmadapter) { HostCmd_DS_COMMAND *resp = MNULL; mlan_private *pmpriv = wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY); @@ -1479,7 +1504,7 @@ wlan_process_cmdresp(mlan_adapter * pmadapter) t_u16 cmdresp_no; t_u16 cmdresp_result; mlan_ioctl_req *pioctl_buf = MNULL; - mlan_callbacks *pcb = (mlan_callbacks *) & pmadapter->callbacks; + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; #ifdef DEBUG_LEVEL1 t_u32 sec = 0, usec = 0; #endif @@ -1499,12 +1524,12 @@ wlan_process_cmdresp(mlan_adapter * pmadapter) if (pmadapter->curr_cmd) if (pmadapter->curr_cmd->pioctl_buf != MNULL) { pioctl_buf = - (mlan_ioctl_req *) pmadapter->curr_cmd-> + (mlan_ioctl_req *)pmadapter->curr_cmd-> pioctl_buf; } if (!pmadapter->curr_cmd || !pmadapter->curr_cmd->respbuf) { - resp = (HostCmd_DS_COMMAND *) pmadapter->upld_buf; + resp = (HostCmd_DS_COMMAND *)pmadapter->upld_buf; resp->command = wlan_le16_to_cpu(resp->command); PRINTM(MERROR, "CMD_RESP: No curr_cmd, 0x%x\n", resp->command); if (pioctl_buf) @@ -1520,9 +1545,9 @@ wlan_process_cmdresp(mlan_adapter * pmadapter) pmadapter->curr_cmd->respbuf->data_offset, pmadapter->curr_cmd->respbuf->data_len); - resp = (HostCmd_DS_COMMAND *) (pmadapter->curr_cmd->respbuf->pbuf + - pmadapter->curr_cmd->respbuf-> - data_offset); + resp = (HostCmd_DS_COMMAND *)(pmadapter->curr_cmd->respbuf->pbuf + + pmadapter->curr_cmd->respbuf-> + data_offset); wlan_request_cmd_lock(pmadapter); if (pmadapter->curr_cmd->cmd_flag & CMD_F_CANCELED) { cmd_ctrl_node *free_cmd = pmadapter->curr_cmd; @@ -1623,7 +1648,7 @@ wlan_process_cmdresp(mlan_adapter * pmadapter) wlan_request_cmd_lock(pmadapter); if (pmadapter->curr_cmd) { cmd_ctrl_node *free_cmd = pmadapter->curr_cmd; - pioctl_buf = (mlan_ioctl_req *) pmadapter->curr_cmd->pioctl_buf; + pioctl_buf = (mlan_ioctl_req *)pmadapter->curr_cmd->pioctl_buf; pmadapter->curr_cmd = MNULL; wlan_release_cmd_lock(pmadapter); @@ -1680,9 +1705,9 @@ wlan_process_cmdresp(mlan_adapter * pmadapter) * @return N/A */ t_void -wlan_cmd_timeout_func(t_void * function_context) +wlan_cmd_timeout_func(t_void *function_context) { - mlan_adapter *pmadapter = (mlan_adapter *) function_context; + mlan_adapter *pmadapter = (mlan_adapter *)function_context; cmd_ctrl_node *pcmd_node = MNULL; mlan_ioctl_req *pioctl_buf = MNULL; #ifdef DEBUG_LEVEL1 @@ -1702,7 +1727,7 @@ wlan_cmd_timeout_func(t_void * function_context) } pcmd_node = pmadapter->curr_cmd; if (pcmd_node->pioctl_buf != MNULL) { - pioctl_buf = (mlan_ioctl_req *) pcmd_node->pioctl_buf; + pioctl_buf = (mlan_ioctl_req *)pcmd_node->pioctl_buf; pioctl_buf->status_code = MLAN_ERROR_CMD_TIMEOUT; } @@ -1760,19 +1785,19 @@ wlan_cmd_timeout_func(t_void * function_context) t_void wlan_flush_scan_queue(IN pmlan_adapter pmadapter) { - mlan_callbacks *pcb = (pmlan_callbacks) & pmadapter->callbacks; + mlan_callbacks *pcb = (pmlan_callbacks)&pmadapter->callbacks; cmd_ctrl_node *pcmd_node = MNULL; ENTER(); while ((pcmd_node = - (cmd_ctrl_node *) util_peek_list(pmadapter->pmoal_handle, - &pmadapter->scan_pending_q, - pcb->moal_spin_lock, - pcb->moal_spin_unlock))) { + (cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle, + &pmadapter->scan_pending_q, + pcb->moal_spin_lock, + pcb->moal_spin_unlock))) { util_unlink_list(pmadapter->pmoal_handle, &pmadapter->scan_pending_q, - (pmlan_linked_list) pcmd_node, + (pmlan_linked_list)pcmd_node, pcb->moal_spin_lock, pcb->moal_spin_unlock); pcmd_node->pioctl_buf = MNULL; wlan_insert_cmd_to_free_q(pmadapter, pcmd_node); @@ -1812,7 +1837,7 @@ wlan_cancel_pending_scan_cmd(pmlan_adapter pmadapter) } if (pmadapter->curr_cmd && pmadapter->curr_cmd->pioctl_buf) { - pioctl_buf = (mlan_ioctl_req *) pmadapter->curr_cmd->pioctl_buf; + pioctl_buf = (mlan_ioctl_req *)pmadapter->curr_cmd->pioctl_buf; if (pioctl_buf->req_id == MLAN_IOCTL_SCAN) { PRINTM(MIOCTL, "wlan_cancel_scan: current command\n"); pcmd_node = pmadapter->curr_cmd; @@ -1824,21 +1849,14 @@ wlan_cancel_pending_scan_cmd(pmlan_adapter pmadapter) MLAN_STATUS_FAILURE); } } - while ((pcmd_node = - wlan_get_pending_ioctl_by_id(pmadapter, - MLAN_IOCTL_SCAN)) != MNULL) { + while ((pcmd_node = wlan_get_pending_scan_cmd(pmadapter)) != MNULL) { PRINTM(MIOCTL, "wlan_cancel_scan: find scan command in cmd_pending_q\n"); util_unlink_list(pmadapter->pmoal_handle, &pmadapter->cmd_pending_q, - (pmlan_linked_list) pcmd_node, + (pmlan_linked_list)pcmd_node, pmadapter->callbacks.moal_spin_lock, pmadapter->callbacks.moal_spin_unlock); - pioctl_buf = (mlan_ioctl_req *) pcmd_node->pioctl_buf; - pcmd_node->pioctl_buf = MNULL; - pioctl_buf->status_code = MLAN_ERROR_CMD_CANCEL; - pcb->moal_ioctl_complete(pmadapter->pmoal_handle, pioctl_buf, - MLAN_STATUS_FAILURE); wlan_release_cmd_lock(pmadapter); wlan_insert_cmd_to_free_q(pmadapter, pcmd_node); wlan_request_cmd_lock(pmadapter); @@ -1880,7 +1898,7 @@ wlan_cancel_all_pending_cmd(pmlan_adapter pmadapter) } #endif if ((pmadapter->curr_cmd) && (pmadapter->curr_cmd->pioctl_buf)) { - pioctl_buf = (mlan_ioctl_req *) pmadapter->curr_cmd->pioctl_buf; + pioctl_buf = (mlan_ioctl_req *)pmadapter->curr_cmd->pioctl_buf; pmadapter->curr_cmd->pioctl_buf = MNULL; wlan_release_cmd_lock(pmadapter); pioctl_buf->status_code = MLAN_ERROR_CMD_CANCEL; @@ -1891,16 +1909,16 @@ wlan_cancel_all_pending_cmd(pmlan_adapter pmadapter) } /* Cancel all pending command */ while ((pcmd_node = - (cmd_ctrl_node *) util_peek_list(pmadapter->pmoal_handle, - &pmadapter->cmd_pending_q, - pcb->moal_spin_lock, - pcb->moal_spin_unlock))) { + (cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + pcb->moal_spin_lock, + pcb->moal_spin_unlock))) { util_unlink_list(pmadapter->pmoal_handle, &pmadapter->cmd_pending_q, - (pmlan_linked_list) pcmd_node, + (pmlan_linked_list)pcmd_node, pcb->moal_spin_lock, pcb->moal_spin_unlock); if (pcmd_node->pioctl_buf) { - pioctl_buf = (mlan_ioctl_req *) pcmd_node->pioctl_buf; + pioctl_buf = (mlan_ioctl_req *)pcmd_node->pioctl_buf; pioctl_buf->status_code = MLAN_ERROR_CMD_CANCEL; pcb->moal_ioctl_complete(pmadapter->pmoal_handle, pioctl_buf, @@ -1951,7 +1969,7 @@ wlan_cancel_bss_pending_cmd(pmlan_adapter pmadapter, t_u32 bss_index) } #endif if (pmadapter->curr_cmd && pmadapter->curr_cmd->pioctl_buf) { - pioctl_buf = (mlan_ioctl_req *) pmadapter->curr_cmd->pioctl_buf; + pioctl_buf = (mlan_ioctl_req *)pmadapter->curr_cmd->pioctl_buf; if (pioctl_buf->bss_index == bss_index) { pcmd_node = pmadapter->curr_cmd; pcmd_node->pioctl_buf = MNULL; @@ -1971,10 +1989,10 @@ wlan_cancel_bss_pending_cmd(pmlan_adapter pmadapter, t_u32 bss_index) bss_index)) != MNULL) { util_unlink_list(pmadapter->pmoal_handle, &pmadapter->cmd_pending_q, - (pmlan_linked_list) pcmd_node, + (pmlan_linked_list)pcmd_node, pmadapter->callbacks.moal_spin_lock, pmadapter->callbacks.moal_spin_unlock); - pioctl_buf = (mlan_ioctl_req *) pcmd_node->pioctl_buf; + pioctl_buf = (mlan_ioctl_req *)pcmd_node->pioctl_buf; pcmd_node->pioctl_buf = MNULL; #ifdef STA_SUPPORT if (pioctl_buf->req_id == MLAN_IOCTL_SCAN) @@ -2016,7 +2034,7 @@ wlan_cancel_pending_ioctl(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req) ENTER(); PRINTM(MIOCTL, "MOAL Cancel IOCTL: 0x%x sub_id=0x%x action=%d\n", - pioctl_req->req_id, *((t_u32 *) pioctl_req->pbuf), + pioctl_req->req_id, *((t_u32 *)pioctl_req->pbuf), (int)pioctl_req->action); wlan_request_cmd_lock(pmadapter); @@ -2040,7 +2058,7 @@ wlan_cancel_pending_ioctl(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req) wlan_get_pending_ioctl_cmd(pmadapter, pioctl_req)) != MNULL) { util_unlink_list(pmadapter->pmoal_handle, &pmadapter->cmd_pending_q, - (pmlan_linked_list) pcmd_node, + (pmlan_linked_list)pcmd_node, pmadapter->callbacks.moal_spin_lock, pmadapter->callbacks.moal_spin_unlock); pcmd_node->pioctl_buf = MNULL; @@ -2077,13 +2095,13 @@ wlan_cancel_pending_ioctl(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req) */ mlan_status wlan_ret_ver_ext(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_VERSION_EXT *ver_ext = &resp->params.verext; mlan_ds_get_info *info; ENTER(); if (pioctl_buf) { - info = (mlan_ds_get_info *) pioctl_buf->pbuf; + info = (mlan_ds_get_info *)pioctl_buf->pbuf; info->param.ver_ext.version_str_sel = ver_ext->version_str_sel; memcpy(pmpriv->adapter, info->param.ver_ext.version_str, ver_ext->version_str, sizeof(char) * 128); @@ -2103,14 +2121,13 @@ wlan_ret_ver_ext(IN pmlan_private pmpriv, */ mlan_status wlan_ret_rx_mgmt_ind(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) { mlan_ds_misc_cfg *misc = MNULL; ENTER(); if (pioctl_buf) { - misc = (mlan_ds_misc_cfg *) pioctl_buf->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; misc->param.mgmt_subtype_mask = wlan_le32_to_cpu(resp->params.rx_mgmt_ind. mgmt_subtype_mask); @@ -2129,7 +2146,7 @@ wlan_ret_rx_mgmt_ind(IN pmlan_private pmpriv, * @return N/A */ t_void -wlan_check_ps_cond(mlan_adapter * pmadapter) +wlan_check_ps_cond(mlan_adapter *pmadapter) { ENTER(); @@ -2208,8 +2225,8 @@ wlan_host_sleep_wakeup_event(pmlan_private priv) */ mlan_status wlan_ret_802_11_hs_cfg(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { pmlan_adapter pmadapter = pmpriv->adapter; HostCmd_DS_802_11_HS_CFG_ENH *phs_cfg = &resp->params.opt_hs_cfg; @@ -2276,7 +2293,7 @@ wlan_process_hs_config(pmlan_adapter pmadapter) * @return N/A */ void -wlan_process_sleep_confirm_resp(pmlan_adapter pmadapter, t_u8 * pbuf, +wlan_process_sleep_confirm_resp(pmlan_adapter pmadapter, t_u8 *pbuf, t_u32 upld_len) { HostCmd_DS_COMMAND *cmd; @@ -2288,7 +2305,7 @@ wlan_process_sleep_confirm_resp(pmlan_adapter pmadapter, t_u8 * pbuf, LEAVE(); return; } - cmd = (HostCmd_DS_COMMAND *) pbuf; + cmd = (HostCmd_DS_COMMAND *)pbuf; cmd->result = wlan_le16_to_cpu(cmd->result); cmd->command = wlan_le16_to_cpu(cmd->command); cmd->seq_num = wlan_le16_to_cpu(cmd->seq_num); @@ -2336,9 +2353,9 @@ wlan_process_sleep_confirm_resp(pmlan_adapter pmadapter, t_u8 * pbuf, */ mlan_status wlan_cmd_enh_power_mode(pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, + IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action, - IN t_u16 ps_bitmap, IN t_void * pdata_buf) + IN t_u16 ps_bitmap, IN t_void *pdata_buf) { HostCmd_DS_802_11_PS_MODE_ENH *psmode_enh = &cmd->params.psmode_enh; t_u8 *tlv = MNULL; @@ -2363,11 +2380,11 @@ wlan_cmd_enh_power_mode(pmlan_private pmpriv, psmode_enh->params.auto_ps.ps_bitmap = wlan_cpu_to_le16(ps_bitmap); cmd_size = S_DS_GEN + AUTO_PS_FIX_SIZE; - tlv = (t_u8 *) cmd + cmd_size; + tlv = (t_u8 *)cmd + cmd_size; if (ps_bitmap & BITMAP_STA_PS) { pmlan_adapter pmadapter = pmpriv->adapter; MrvlIEtypes_ps_param_t *ps_tlv = - (MrvlIEtypes_ps_param_t *) tlv; + (MrvlIEtypes_ps_param_t *)tlv; ps_param *ps_mode = &ps_tlv->param; ps_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_PS_PARAM); @@ -2394,7 +2411,7 @@ wlan_cmd_enh_power_mode(pmlan_private pmpriv, } if (ps_bitmap & BITMAP_AUTO_DS) { MrvlIEtypes_auto_ds_param_t *auto_ps_tlv = - (MrvlIEtypes_auto_ds_param_t *) tlv; + (MrvlIEtypes_auto_ds_param_t *)tlv; auto_ds_param *auto_ds = &auto_ps_tlv->param; t_u16 idletime = 0; auto_ps_tlv->header.type = @@ -2407,7 +2424,7 @@ wlan_cmd_enh_power_mode(pmlan_private pmpriv, tlv += sizeof(MrvlIEtypes_auto_ds_param_t); if (pdata_buf) idletime = - ((mlan_ds_auto_ds *) pdata_buf)-> + ((mlan_ds_auto_ds *)pdata_buf)-> idletime; auto_ds->deep_sleep_timeout = wlan_cpu_to_le16(idletime); @@ -2415,12 +2432,11 @@ wlan_cmd_enh_power_mode(pmlan_private pmpriv, #if defined(UAP_SUPPORT) if (pdata_buf && (ps_bitmap & (BITMAP_UAP_INACT_PS | BITMAP_UAP_DTIM_PS))) { - mlan_ds_ps_mgmt *ps_mgmt = - (mlan_ds_ps_mgmt *) pdata_buf; + mlan_ds_ps_mgmt *ps_mgmt = (mlan_ds_ps_mgmt *)pdata_buf; MrvlIEtypes_sleep_param_t *sleep_tlv = MNULL; MrvlIEtypes_inact_sleep_param_t *inact_tlv = MNULL; if (ps_mgmt->flags & PS_FLAG_SLEEP_PARAM) { - sleep_tlv = (MrvlIEtypes_sleep_param_t *) tlv; + sleep_tlv = (MrvlIEtypes_sleep_param_t *)tlv; sleep_tlv->header.type = wlan_cpu_to_le16 (TLV_TYPE_AP_SLEEP_PARAM); @@ -2444,7 +2460,7 @@ wlan_cmd_enh_power_mode(pmlan_private pmpriv, } if (ps_mgmt->flags & PS_FLAG_INACT_SLEEP_PARAM) { inact_tlv = - (MrvlIEtypes_inact_sleep_param_t *) tlv; + (MrvlIEtypes_inact_sleep_param_t *)tlv; inact_tlv->header.type = wlan_cpu_to_le16 (TLV_TYPE_AP_INACT_SLEEP_PARAM); @@ -2487,8 +2503,8 @@ wlan_cmd_enh_power_mode(pmlan_private pmpriv, */ mlan_status wlan_ret_enh_power_mode(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { pmlan_adapter pmadapter = pmpriv->adapter; MrvlIEtypesHeader_t *mrvl_tlv = MNULL; @@ -2507,20 +2523,20 @@ wlan_ret_enh_power_mode(IN pmlan_private pmpriv, PRINTM(MCMND, "Enabled auto deep sleep\n"); pmpriv->adapter->is_deep_sleep = MTRUE; mrvl_tlv = - (MrvlIEtypesHeader_t *) ((t_u8 *) ps_mode + - AUTO_PS_FIX_SIZE); + (MrvlIEtypesHeader_t *)((t_u8 *)ps_mode + + AUTO_PS_FIX_SIZE); while (wlan_le16_to_cpu(mrvl_tlv->type) != TLV_TYPE_AUTO_DS_PARAM) { mrvl_tlv = - (MrvlIEtypesHeader_t *) ((t_u8 *) - mrvl_tlv + - wlan_le16_to_cpu - (mrvl_tlv->len) - + - sizeof - (MrvlIEtypesHeader_t)); + (MrvlIEtypesHeader_t *)((t_u8 *)mrvl_tlv + + + wlan_le16_to_cpu + (mrvl_tlv->len) + + + sizeof + (MrvlIEtypesHeader_t)); } - auto_ds_tlv = (MrvlIEtypes_auto_ds_param_t *) mrvl_tlv; + auto_ds_tlv = (MrvlIEtypes_auto_ds_param_t *)mrvl_tlv; pmpriv->adapter->idle_time = wlan_le16_to_cpu(auto_ds_tlv->param. deep_sleep_timeout); @@ -2573,7 +2589,7 @@ wlan_ret_enh_power_mode(IN pmlan_private pmpriv, PRINTM(MCMND, "ps_bitmap=0x%x\n", ps_mode->params.ps_bitmap); if (pioctl_buf) { mlan_ds_pm_cfg *pm_cfg = - (mlan_ds_pm_cfg *) pioctl_buf->pbuf; + (mlan_ds_pm_cfg *)pioctl_buf->pbuf; if (pm_cfg->sub_command == MLAN_OID_PM_CFG_IEEE_PS) { if (ps_mode->params.auto_ps. ps_bitmap & BITMAP_STA_PS) @@ -2605,9 +2621,8 @@ wlan_ret_enh_power_mode(IN pmlan_private pmpriv, tlv_buf_left = resp->size - (S_DS_GEN + AUTO_PS_FIX_SIZE); - tlv = (MrvlIEtypesHeader_t *) ((t_u8 *) ps_mode - + - AUTO_PS_FIX_SIZE); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)ps_mode + + AUTO_PS_FIX_SIZE); while (tlv_buf_left >= sizeof(MrvlIEtypesHeader_t)) { tlv_type = wlan_le16_to_cpu(tlv->type); @@ -2616,7 +2631,7 @@ wlan_ret_enh_power_mode(IN pmlan_private pmpriv, case TLV_TYPE_AP_SLEEP_PARAM: sleep_tlv = (MrvlIEtypes_sleep_param_t - *) tlv; + *)tlv; pm_cfg->param.ps_mgmt.flags |= PS_FLAG_SLEEP_PARAM; pm_cfg->param.ps_mgmt. @@ -2637,7 +2652,7 @@ wlan_ret_enh_power_mode(IN pmlan_private pmpriv, case TLV_TYPE_AP_INACT_SLEEP_PARAM: inact_tlv = (MrvlIEtypes_inact_sleep_param_t - *) tlv; + *)tlv; pm_cfg->param.ps_mgmt.flags |= PS_FLAG_INACT_SLEEP_PARAM; pm_cfg->param.ps_mgmt. @@ -2659,11 +2674,11 @@ wlan_ret_enh_power_mode(IN pmlan_private pmpriv, tlv_buf_left -= tlv_len + sizeof(MrvlIEtypesHeader_t); - tlv = (MrvlIEtypesHeader_t *) ((t_u8 *) - tlv + - tlv_len + - sizeof - (MrvlIEtypesHeader_t)); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *) + tlv + + tlv_len + + sizeof + (MrvlIEtypesHeader_t)); } } #endif @@ -2685,8 +2700,8 @@ wlan_ret_enh_power_mode(IN pmlan_private pmpriv, */ mlan_status wlan_ret_802_11_tx_rate_query(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { mlan_adapter *pmadapter = pmpriv->adapter; mlan_ds_rate *rate = MNULL; @@ -2701,7 +2716,7 @@ wlan_ret_802_11_tx_rate_query(IN pmlan_private pmpriv, } if (pioctl_buf) { - rate = (mlan_ds_rate *) pioctl_buf->pbuf; + rate = (mlan_ds_rate *)pioctl_buf->pbuf; if (rate->sub_command == MLAN_OID_RATE_CFG) { if (rate->param.rate_cfg.rate_type == MLAN_RATE_INDEX) { if (pmpriv->tx_htinfo & MBIT(0)) @@ -2794,14 +2809,14 @@ wlan_ret_802_11_tx_rate_query(IN pmlan_private pmpriv, */ mlan_status wlan_cmd_tx_rate_cfg(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { HostCmd_DS_TX_RATE_CFG *rate_cfg = - (HostCmd_DS_TX_RATE_CFG *) & (cmd->params.tx_rate_cfg); + (HostCmd_DS_TX_RATE_CFG *)&(cmd->params.tx_rate_cfg); MrvlRateScope_t *rate_scope; MrvlRateDropPattern_t *rate_drop; - t_u16 *pbitmap_rates = (t_u16 *) pdata_buf; + t_u16 *pbitmap_rates = (t_u16 *)pdata_buf; t_u32 i; @@ -2812,8 +2827,8 @@ wlan_cmd_tx_rate_cfg(IN pmlan_private pmpriv, rate_cfg->action = wlan_cpu_to_le16(cmd_action); rate_cfg->cfg_index = 0; - rate_scope = (MrvlRateScope_t *) ((t_u8 *) rate_cfg + - sizeof(HostCmd_DS_TX_RATE_CFG)); + rate_scope = (MrvlRateScope_t *)((t_u8 *)rate_cfg + + sizeof(HostCmd_DS_TX_RATE_CFG)); rate_scope->type = wlan_cpu_to_le16(TLV_TYPE_RATE_SCOPE); rate_scope->length = wlan_cpu_to_le16(sizeof(MrvlRateScope_t) - sizeof(MrvlIEtypesHeader_t)); @@ -2835,8 +2850,8 @@ wlan_cmd_tx_rate_cfg(IN pmlan_private pmpriv, wlan_cpu_to_le16(pmpriv->bitmap_rates[2 + i]); } - rate_drop = (MrvlRateDropPattern_t *) ((t_u8 *) rate_scope + - sizeof(MrvlRateScope_t)); + rate_drop = (MrvlRateDropPattern_t *)((t_u8 *)rate_scope + + sizeof(MrvlRateScope_t)); rate_drop->type = wlan_cpu_to_le16(TLV_TYPE_RATE_DROP_PATTERN); rate_drop->length = wlan_cpu_to_le16(sizeof(rate_drop->rate_drop_mode)); rate_drop->rate_drop_mode = 0; @@ -2860,8 +2875,7 @@ wlan_cmd_tx_rate_cfg(IN pmlan_private pmpriv, */ mlan_status wlan_ret_tx_rate_cfg(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) { mlan_adapter *pmadapter = pmpriv->adapter; mlan_ds_rate *ds_rate = MNULL; @@ -2880,12 +2894,11 @@ wlan_ret_tx_rate_cfg(IN pmlan_private pmpriv, LEAVE(); return MLAN_STATUS_FAILURE; } - prate_cfg = (HostCmd_DS_TX_RATE_CFG *) & (resp->params.tx_rate_cfg); + prate_cfg = (HostCmd_DS_TX_RATE_CFG *)&(resp->params.tx_rate_cfg); - tlv_buf = - (t_u8 *) ((t_u8 *) prate_cfg) + sizeof(HostCmd_DS_TX_RATE_CFG); + tlv_buf = (t_u8 *)((t_u8 *)prate_cfg) + sizeof(HostCmd_DS_TX_RATE_CFG); if (tlv_buf) { - tlv_buf_len = *(t_u16 *) (tlv_buf + sizeof(t_u16)); + tlv_buf_len = *(t_u16 *)(tlv_buf + sizeof(t_u16)); tlv_buf_len = wlan_le16_to_cpu(tlv_buf_len); } @@ -2895,7 +2908,7 @@ wlan_ret_tx_rate_cfg(IN pmlan_private pmpriv, switch (tlv) { case TLV_TYPE_RATE_SCOPE: - prate_scope = (MrvlRateScope_t *) tlv_buf; + prate_scope = (MrvlRateScope_t *)tlv_buf; pmpriv->bitmap_rates[0] = wlan_le16_to_cpu(prate_scope-> hr_dsss_rate_bitmap); @@ -2911,7 +2924,7 @@ wlan_ret_tx_rate_cfg(IN pmlan_private pmpriv, /* Add RATE_DROP tlv here */ } - head = (MrvlIEtypesHeader_t *) tlv_buf; + head = (MrvlIEtypesHeader_t *)tlv_buf; head->len = wlan_le16_to_cpu(head->len); tlv_buf += head->len + sizeof(MrvlIEtypesHeader_t); tlv_buf_len -= head->len; @@ -2929,7 +2942,7 @@ wlan_ret_tx_rate_cfg(IN pmlan_private pmpriv, } if (pioctl_buf) { - ds_rate = (mlan_ds_rate *) pioctl_buf->pbuf; + ds_rate = (mlan_ds_rate *)pioctl_buf->pbuf; if (ds_rate == MNULL) { PRINTM(MERROR, "Request buffer not found!\n"); LEAVE(); @@ -2974,7 +2987,7 @@ wlan_ret_tx_rate_cfg(IN pmlan_private pmpriv, /** * @brief This function issues adapter specific commands - * to initialize firmware + * to initialize firmware * * @param pmadapter A pointer to mlan_adapter structure * @@ -3082,6 +3095,18 @@ wlan_adapter_init_cmd(IN pmlan_adapter pmadapter) goto done; } } +#define DEF_AUTO_NULL_PKT_PERIOD 30 + if (pmpriv_sta) { + t_u32 value = DEF_AUTO_NULL_PKT_PERIOD; + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_SNMP_MIB, + HostCmd_ACT_GEN_SET, + NullPktPeriod_i, MNULL, &value); + if (ret) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + } ret = MLAN_STATUS_PENDING; done: @@ -3089,6 +3114,330 @@ wlan_adapter_init_cmd(IN pmlan_adapter pmadapter) return ret; } +#ifdef RX_PACKET_COALESCE +mlan_status +wlan_cmd_rx_pkt_coalesce_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + + mlan_ds_misc_rx_packet_coalesce *rx_pkt_cfg = + (mlan_ds_misc_rx_packet_coalesce *)pdata_buf; + HostCmd_DS_RX_PKT_COAL_CFG *prx_coal_cfg = + (HostCmd_DS_RX_PKT_COAL_CFG *)&cmd->params.rx_pkt_coal_cfg; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_RX_PKT_COALESCE_CFG); + prx_coal_cfg->action = wlan_cpu_to_le16(cmd_action); + + if (cmd_action == HostCmd_ACT_GEN_SET) { + prx_coal_cfg->packet_threshold = + wlan_cpu_to_le32(rx_pkt_cfg->packet_threshold); + prx_coal_cfg->delay = wlan_cpu_to_le16(rx_pkt_cfg->delay); + PRINTM(MCMND, + "Set RX coal config: packet threshold=%d delay=%d\n", + prx_coal_cfg->packet_threshold, prx_coal_cfg->delay); + cmd->size = + wlan_cpu_to_le16(S_DS_GEN + + sizeof(HostCmd_DS_RX_PKT_COAL_CFG)); + } else { + cmd->size = wlan_cpu_to_le16(S_DS_GEN + sizeof(cmd_action)); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; + +} + +/** + * @brief This function handles the command response of RX_PACKET_COAL_CFG + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_rx_pkt_coalesce_cfg(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_misc_cfg *pcfg = MNULL; + const HostCmd_DS_RX_PKT_COAL_CFG *presp_cfg = + &resp->params.rx_pkt_coal_cfg; + + ENTER(); + + if (pioctl_buf) { + pcfg = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + pcfg->param.rx_coalesce.packet_threshold = + wlan_le32_to_cpu(presp_cfg->packet_threshold); + pcfg->param.rx_coalesce.delay = + wlan_le16_to_cpu(presp_cfg->delay); + PRINTM(MCMND, + "Get rx pkt coalesce info: packet threshold=%d delay=%d\n", + pcfg->param.rx_coalesce.packet_threshold, + pcfg->param.rx_coalesce.delay); + pioctl_buf->buf_len = sizeof(mlan_ds_misc_rx_packet_coalesce); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +#endif +/** + * @brief This function handle the multi_chan info event + * + * @param pmpriv A pointer to mlan_private structure + * @param pevent A pointer to event buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_handle_event_multi_chan_info(IN pmlan_private pmpriv, pmlan_buffer pevent) +{ + pmlan_adapter pmadapter = pmpriv->adapter; + t_u32 interfaces = 0; + MrvlIEtypes_multi_chan_info_t *pmulti_chan_info = MNULL; + MrvlIEtypes_multi_chan_group_info_t *pmulti_chan_grp_info = MNULL; + int tlv_buf_left = pevent->data_len - sizeof(mlan_event_id); + t_u16 tlv_type, tlv_len; + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private intf_priv = MNULL; + int num_intf = 0, bss_type = 0, bss_num = 0; + MrvlIEtypesHeader_t *tlv = MNULL; + + ENTER(); + + PRINTM(MEVENT, "multi channel event\n"); + pmulti_chan_info = + (MrvlIEtypes_multi_chan_info_t *)(pevent->pbuf + + pevent->data_offset + + sizeof(mlan_event_id)); + if (tlv_buf_left < sizeof(MrvlIEtypes_multi_chan_info_t) || + wlan_le16_to_cpu(pmulti_chan_info->header.type) != + TLV_TYPE_MULTI_CHAN_INFO) { + PRINTM(MERROR, "Invalid multi channel event\n"); + goto done; + } + + pmadapter->mc_status = wlan_le16_to_cpu(pmulti_chan_info->status); + PRINTM(MEVENT, "mc_status=%d\n", pmadapter->mc_status); + tlv_buf_left -= sizeof(MrvlIEtypes_multi_chan_info_t); + tlv = (MrvlIEtypesHeader_t *)pmulti_chan_info->tlv_buffer; + + while (tlv_buf_left >= (int)sizeof(MrvlIEtypesHeader_t)) { + tlv_type = wlan_le16_to_cpu(tlv->type); + tlv_len = wlan_le16_to_cpu(tlv->len); + if ((sizeof(MrvlIEtypesHeader_t) + tlv_len) > + (unsigned int)tlv_buf_left) { + PRINTM(MERROR, "wrong tlv: tlvLen=%d, tlvBufLeft=%d\n", + tlv_len, tlv_buf_left); + break; + } + if (tlv_type != TLV_TYPE_MULTI_CHAN_GROUP_INFO_TLV_ID) { + PRINTM(MERROR, "wrong tlv type:0x%x\n", tlv_type); + break; + } + pmulti_chan_grp_info = + (MrvlIEtypes_multi_chan_group_info_t *)tlv; + PRINTM(MEVENT, "mc_info: groupid=%d chan=%d, numintf=%d\n", + pmulti_chan_grp_info->chan_group_id, + pmulti_chan_grp_info->chan_band_info.chan_num, + pmulti_chan_grp_info->num_intf); + num_intf = pmulti_chan_grp_info->num_intf; + for (interfaces = 0; interfaces < num_intf; interfaces++) { + bss_type = + pmulti_chan_grp_info-> + bss_type_numlist[interfaces] >> 4; + bss_num = + pmulti_chan_grp_info-> + bss_type_numlist[interfaces] & BSS_NUM_MASK; + PRINTM(MEVENT, "intf%d: bss_type=%d bss_num=%d\n", + interfaces, bss_type, bss_num); + intf_priv = + wlan_get_priv_by_id(pmadapter, bss_num, + bss_type); + if (intf_priv) { + } else { + PRINTM(MERROR, + "Invalid bss_type, bss_num in multi_channel event\n"); + } + } + + tlv_buf_left -= (sizeof(MrvlIEtypesHeader_t) + tlv_len); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len + + sizeof(MrvlIEtypesHeader_t)); + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief This function prepares the command MULTI_CHAN_CFG + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to command buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_multi_chan_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + mlan_ds_multi_chan_cfg *multi_chan_cfg = + (mlan_ds_multi_chan_cfg *)pdata_buf; + HostCmd_DS_MULTI_CHAN_CFG *pmchan_cfg = + (HostCmd_DS_MULTI_CHAN_CFG *)&cmd->params.multi_chan_cfg; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_MULTI_CHAN_CONFIG); + pmchan_cfg->action = wlan_cpu_to_le16(cmd_action); + + if (cmd_action == HostCmd_ACT_GEN_SET) { + pmchan_cfg->buffer_weight = multi_chan_cfg->buffer_weight; + pmchan_cfg->channel_time = + wlan_cpu_to_le32(multi_chan_cfg->channel_time); + PRINTM(MCMND, + "Set multi-channel: buffer_weight=%d channel_time=%d\n", + multi_chan_cfg->buffer_weight, + multi_chan_cfg->channel_time); + cmd->size = + wlan_cpu_to_le16(S_DS_GEN + + sizeof(HostCmd_DS_MULTI_CHAN_CFG)); + } else { + cmd->size = wlan_cpu_to_le16(S_DS_GEN + sizeof(cmd_action)); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of MULTI_CHAN_CFG + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_multi_chan_cfg(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_misc_cfg *pcfg = MNULL; + const HostCmd_DS_MULTI_CHAN_CFG *presp_cfg = + &resp->params.multi_chan_cfg; + + ENTER(); + + if (pioctl_buf) { + pcfg = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + pcfg->param.multi_chan_cfg.channel_time = + wlan_le32_to_cpu(presp_cfg->channel_time); + pcfg->param.multi_chan_cfg.buffer_weight = + presp_cfg->buffer_weight; + pcfg->param.multi_chan_cfg.tlv_len = + resp->size - (sizeof(HostCmd_DS_GEN) + + sizeof(HostCmd_DS_MULTI_CHAN_CFG)); + PRINTM(MCMND, + "Get multi-channel: buffer_weight=%d channel_time=%d tlv_len=%d\n", + pcfg->param.multi_chan_cfg.buffer_weight, + pcfg->param.multi_chan_cfg.channel_time, + pcfg->param.multi_chan_cfg.tlv_len); + memcpy(pmpriv->adapter, pcfg->param.multi_chan_cfg.tlv_buf, + presp_cfg->tlv_buf, pcfg->param.multi_chan_cfg.tlv_len); + pioctl_buf->buf_len = + sizeof(mlan_ds_multi_chan_cfg) + + pcfg->param.multi_chan_cfg.tlv_len; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares the command MULTI_CHAN_POLICY + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to command buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_multi_chan_policy(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + t_u16 policy = 0; + HostCmd_DS_MULTI_CHAN_POLICY *pmulti_chan_policy = + (HostCmd_DS_MULTI_CHAN_POLICY *)&cmd->params.multi_chan_policy; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_MULTI_CHAN_POLICY); + pmulti_chan_policy->action = wlan_cpu_to_le16(cmd_action); + cmd->size = + wlan_cpu_to_le16(S_DS_GEN + + sizeof(HostCmd_DS_MULTI_CHAN_POLICY)); + if (cmd_action == HostCmd_ACT_GEN_SET) { + policy = *((t_u16 *)pdata_buf); + pmulti_chan_policy->policy = wlan_cpu_to_le16(policy); + PRINTM(MCMND, "Set multi-channel policy: %d\n", + pmulti_chan_policy->policy); + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of MULTI_CHAN_POLICY + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_multi_chan_policy(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_misc_cfg *pcfg = MNULL; + const HostCmd_DS_MULTI_CHAN_POLICY *presp_cfg = + &resp->params.multi_chan_policy; + + ENTER(); + + if (pioctl_buf) { + pcfg = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + pcfg->param.multi_chan_policy = + wlan_le16_to_cpu(presp_cfg->policy); + + if (pioctl_buf->action == HostCmd_ACT_GEN_SET) { + if (pcfg->param.multi_chan_policy) + pmpriv->adapter->mc_policy = MTRUE; + else + pmpriv->adapter->mc_policy = MFALSE; + } + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + /** * @brief This function prepares command of get_hw_spec. * @@ -3098,7 +3447,7 @@ wlan_adapter_init_cmd(IN pmlan_adapter pmadapter) * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_cmd_get_hw_spec(IN pmlan_private pmpriv, IN HostCmd_DS_COMMAND * pcmd) +wlan_cmd_get_hw_spec(IN pmlan_private pmpriv, IN HostCmd_DS_COMMAND *pcmd) { HostCmd_DS_GET_HW_SPEC *hw_spec = &pcmd->params.hw_spec; @@ -3126,24 +3475,23 @@ wlan_cmd_get_hw_spec(IN pmlan_private pmpriv, IN HostCmd_DS_COMMAND * pcmd) */ mlan_status wlan_cmd_cfg_data(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * pcmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *pcmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { mlan_status ret = MLAN_STATUS_SUCCESS; HostCmd_DS_802_11_CFG_DATA *pcfg_data = &(pcmd->params.cfg_data); pmlan_adapter pmadapter = pmpriv->adapter; t_u32 len; t_u32 cal_data_offset; - t_u8 *temp_pcmd = (t_u8 *) pcmd; + t_u8 *temp_pcmd = (t_u8 *)pcmd; ENTER(); cal_data_offset = S_DS_GEN + sizeof(HostCmd_DS_802_11_CFG_DATA); if ((pmadapter->pcal_data) && (pmadapter->cal_data_len > 0)) { - len = wlan_parse_cal_cfg((t_u8 *) pmadapter->pcal_data, + len = wlan_parse_cal_cfg((t_u8 *)pmadapter->pcal_data, pmadapter->cal_data_len, - (t_u8 *) (temp_pcmd + - cal_data_offset)); + (t_u8 *)(temp_pcmd + cal_data_offset)); } else { ret = MLAN_STATUS_FAILURE; goto done; @@ -3179,7 +3527,7 @@ wlan_cmd_cfg_data(IN pmlan_private pmpriv, */ mlan_status wlan_ret_cfg_data(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, IN t_void * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, IN t_void *pioctl_buf) { mlan_status ret = MLAN_STATUS_SUCCESS; @@ -3205,11 +3553,11 @@ wlan_ret_cfg_data(IN pmlan_private pmpriv, */ mlan_status wlan_cmd_mac_control(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * pcmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *pcmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { HostCmd_DS_MAC_CONTROL *pmac = &pcmd->params.mac_ctrl; - t_u32 action = *((t_u32 *) pdata_buf); + t_u32 action = *((t_u32 *)pdata_buf); ENTER(); @@ -3239,8 +3587,7 @@ wlan_cmd_mac_control(IN pmlan_private pmpriv, */ mlan_status wlan_ret_mac_control(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) { ENTER(); LEAVE(); @@ -3258,13 +3605,13 @@ wlan_ret_mac_control(IN pmlan_private pmpriv, */ mlan_status wlan_ret_get_hw_spec(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, IN t_void * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, IN t_void *pioctl_buf) { HostCmd_DS_GET_HW_SPEC *hw_spec = &resp->params.hw_spec; mlan_adapter *pmadapter = pmpriv->adapter; mlan_status ret = MLAN_STATUS_SUCCESS; t_u32 i; - pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *) pioctl_buf; + pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *)pioctl_buf; ENTER(); @@ -3276,7 +3623,7 @@ wlan_ret_get_hw_spec(IN pmlan_private pmpriv, pmadapter->init_para.dev_cap_mask); #ifdef STA_SUPPORT if (IS_SUPPORT_MULTI_BANDS(pmadapter)) - pmadapter->fw_bands = (t_u8) GET_FW_DEFAULT_BANDS(pmadapter); + pmadapter->fw_bands = (t_u8)GET_FW_DEFAULT_BANDS(pmadapter); else pmadapter->fw_bands = BAND_B; @@ -3286,7 +3633,25 @@ wlan_ret_get_hw_spec(IN pmlan_private pmpriv, pmadapter->priv[i]->config_bands = pmadapter->fw_bands; } - if ((pmadapter->fw_bands & BAND_GN) + if (pmadapter->fw_bands & BAND_A) { + if (pmadapter->fw_bands & BAND_GN) { + pmadapter->config_bands |= BAND_AN; + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) + pmadapter->priv[i]->config_bands |= + BAND_AN; + } + + pmadapter->fw_bands |= BAND_AN; + } + if ((pmadapter->fw_bands & BAND_AN) + ) { + pmadapter->adhoc_start_band = BAND_A | BAND_AN; + pmadapter->adhoc_11n_enabled = MTRUE; + } else + pmadapter->adhoc_start_band = BAND_A; + pmpriv->adhoc_channel = DEFAULT_AD_HOC_CHANNEL_A; + } else if ((pmadapter->fw_bands & BAND_GN) ) { pmadapter->adhoc_start_band = BAND_G | BAND_B | BAND_GN; pmpriv->adhoc_channel = DEFAULT_AD_HOC_CHANNEL; @@ -3320,13 +3685,19 @@ wlan_ret_get_hw_spec(IN pmlan_private pmpriv, wlan_le32_to_cpu(hw_spec->dot_11n_dev_cap); pmadapter->usr_dot_11n_dev_cap_bg = pmadapter->hw_dot_11n_dev_cap & DEFAULT_11N_CAP_MASK_BG; + pmadapter->usr_dot_11n_dev_cap_a = + pmadapter->hw_dot_11n_dev_cap & DEFAULT_11N_CAP_MASK_A; pmadapter->usr_dev_mcs_support = pmadapter->hw_dev_mcs_support = hw_spec->dev_mcs_support; wlan_show_dot11ndevcap(pmadapter, pmadapter->hw_dot_11n_dev_cap); wlan_show_devmcssupport(pmadapter, pmadapter->hw_dev_mcs_support); if (ISSUPP_BEAMFORMING(pmadapter->hw_dot_11n_dev_cap)) { PRINTM(MCMND, "Enable Beamforming\n"); - pmpriv->tx_bf_cap = DEFAULT_11N_TX_BF_CAP; + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) + pmadapter->priv[i]->tx_bf_cap = + DEFAULT_11N_TX_BF_CAP; + } } pmadapter->mp_end_port = wlan_le16_to_cpu(hw_spec->mp_end_port); @@ -3355,8 +3726,9 @@ wlan_ret_get_hw_spec(IN pmlan_private pmpriv, } /* Synchronize CFP code with region code */ pmadapter->cfp_code_bg = pmadapter->region_code; + pmadapter->cfp_code_a = pmadapter->region_code; - if (wlan_set_regiontable(pmpriv, (t_u8) pmadapter->region_code, + if (wlan_set_regiontable(pmpriv, (t_u8)pmadapter->region_code, pmadapter->fw_bands)) { if (pioctl_req) pioctl_req->status_code = MLAN_ERROR_CMD_SCAN_FAIL; @@ -3389,8 +3761,8 @@ wlan_ret_get_hw_spec(IN pmlan_private pmpriv, */ mlan_status wlan_cmd_802_11_radio_control(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { HostCmd_DS_802_11_RADIO_CONTROL *pradio_control = &cmd->params.radio; t_u32 radio_ctl; @@ -3400,7 +3772,7 @@ wlan_cmd_802_11_radio_control(IN pmlan_private pmpriv, cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_RADIO_CONTROL); pradio_control->action = wlan_cpu_to_le16(cmd_action); memcpy(pmpriv->adapter, &radio_ctl, pdata_buf, sizeof(t_u32)); - pradio_control->control = wlan_cpu_to_le16((t_u16) radio_ctl); + pradio_control->control = wlan_cpu_to_le16((t_u16)radio_ctl); LEAVE(); return MLAN_STATUS_SUCCESS; } @@ -3416,19 +3788,19 @@ wlan_cmd_802_11_radio_control(IN pmlan_private pmpriv, */ mlan_status wlan_ret_802_11_radio_control(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_802_11_RADIO_CONTROL *pradio_ctrl = - (HostCmd_DS_802_11_RADIO_CONTROL *) & resp->params.radio; + (HostCmd_DS_802_11_RADIO_CONTROL *)&resp->params.radio; mlan_ds_radio_cfg *radio_cfg = MNULL; mlan_adapter *pmadapter = pmpriv->adapter; ENTER(); pmadapter->radio_on = wlan_le16_to_cpu(pradio_ctrl->control); if (pioctl_buf) { - radio_cfg = (mlan_ds_radio_cfg *) pioctl_buf->pbuf; - radio_cfg->param.radio_on_off = (t_u32) pmadapter->radio_on; + radio_cfg = (mlan_ds_radio_cfg *)pioctl_buf->pbuf; + radio_cfg->param.radio_on_off = (t_u32)pmadapter->radio_on; pioctl_buf->data_read_written = sizeof(mlan_ds_radio_cfg); } LEAVE(); @@ -3448,12 +3820,12 @@ wlan_ret_802_11_radio_control(IN pmlan_private pmpriv, */ mlan_status wlan_cmd_remain_on_channel(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { HostCmd_DS_REMAIN_ON_CHANNEL *remain_channel = &cmd->params.remain_on_chan; - mlan_ds_remain_chan *cfg = (mlan_ds_remain_chan *) pdata_buf; + mlan_ds_remain_chan *cfg = (mlan_ds_remain_chan *)pdata_buf; ENTER(); cmd->size = wlan_cpu_to_le16((sizeof(HostCmd_DS_REMAIN_ON_CHANNEL)) + S_DS_GEN); @@ -3486,8 +3858,8 @@ wlan_cmd_remain_on_channel(IN pmlan_private pmpriv, */ mlan_status wlan_ret_remain_on_channel(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_REMAIN_ON_CHANNEL *remain_channel = &resp->params.remain_on_chan; @@ -3495,7 +3867,7 @@ wlan_ret_remain_on_channel(IN pmlan_private pmpriv, ENTER(); if (pioctl_buf) { - radio_cfg = (mlan_ds_radio_cfg *) pioctl_buf->pbuf; + radio_cfg = (mlan_ds_radio_cfg *)pioctl_buf->pbuf; radio_cfg->param.remain_chan.status = remain_channel->status; radio_cfg->param.remain_chan.bandcfg = remain_channel->bandcfg; radio_cfg->param.remain_chan.channel = remain_channel->channel; @@ -3519,11 +3891,11 @@ wlan_ret_remain_on_channel(IN pmlan_private pmpriv, */ mlan_status wlan_cmd_wifi_direct_mode(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { HostCmd_DS_WIFI_DIRECT_MODE *wfd_mode = &cmd->params.wifi_direct_mode; - t_u16 mode = *((t_u16 *) pdata_buf); + t_u16 mode = *((t_u16 *)pdata_buf); ENTER(); cmd->size = wlan_cpu_to_le16((sizeof(HostCmd_DS_WIFI_DIRECT_MODE)) + S_DS_GEN); @@ -3547,15 +3919,15 @@ wlan_cmd_wifi_direct_mode(IN pmlan_private pmpriv, */ mlan_status wlan_ret_wifi_direct_mode(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_WIFI_DIRECT_MODE *wfd_mode = &resp->params.wifi_direct_mode; mlan_ds_bss *bss = MNULL; ENTER(); if (pioctl_buf) { - bss = (mlan_ds_bss *) pioctl_buf->pbuf; + bss = (mlan_ds_bss *)pioctl_buf->pbuf; bss->param.wfd_mode = wlan_le16_to_cpu(wfd_mode->mode); pioctl_buf->data_read_written = sizeof(mlan_ds_bss); } @@ -3575,13 +3947,13 @@ wlan_ret_wifi_direct_mode(IN pmlan_private pmpriv, */ mlan_status wlan_cmd_p2p_params_config(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG *p2p_config = &cmd->params.p2p_params_config; mlan_ds_wifi_direct_config *cfg = - (mlan_ds_wifi_direct_config *) pdata_buf; + (mlan_ds_wifi_direct_config *)pdata_buf; MrvlIEtypes_NoA_setting_t *pnoa_tlv = MNULL; MrvlIEtypes_OPP_PS_setting_t *popp_ps_tlv = MNULL; t_u8 *tlv = MNULL; @@ -3591,10 +3963,10 @@ wlan_cmd_p2p_params_config(IN pmlan_private pmpriv, cmd->command = wlan_cpu_to_le16(HOST_CMD_P2P_PARAMS_CONFIG); p2p_config->action = wlan_cpu_to_le16(cmd_action); if (cmd_action == HostCmd_ACT_GEN_SET) { - tlv = (t_u8 *) p2p_config + + tlv = (t_u8 *)p2p_config + sizeof(HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG); if (cfg->flags & WIFI_DIRECT_NOA) { - pnoa_tlv = (MrvlIEtypes_NoA_setting_t *) tlv; + pnoa_tlv = (MrvlIEtypes_NoA_setting_t *)tlv; pnoa_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_WIFI_DIRECT_NOA); pnoa_tlv->header.len = @@ -3616,7 +3988,7 @@ wlan_cmd_p2p_params_config(IN pmlan_private pmpriv, (int)cfg->noa_duration, (int)cfg->noa_interval); } if (cfg->flags & WIFI_DIRECT_OPP_PS) { - popp_ps_tlv = (MrvlIEtypes_OPP_PS_setting_t *) tlv; + popp_ps_tlv = (MrvlIEtypes_OPP_PS_setting_t *)tlv; popp_ps_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_WIFI_DIRECT_OPP_PS); popp_ps_tlv->header.len = @@ -3646,8 +4018,8 @@ wlan_cmd_p2p_params_config(IN pmlan_private pmpriv, */ mlan_status wlan_ret_p2p_params_config(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG *p2p_config = &resp->params.p2p_params_config; @@ -3662,10 +4034,10 @@ wlan_ret_p2p_params_config(IN pmlan_private pmpriv, ENTER(); if (wlan_le16_to_cpu(p2p_config->action) == HostCmd_ACT_GEN_GET) { if (pioctl_buf) { - cfg = (mlan_ds_misc_cfg *) pioctl_buf->pbuf; - tlv = (MrvlIEtypesHeader_t *) ((t_u8 *) p2p_config + - sizeof - (HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG)); + cfg = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)p2p_config + + sizeof + (HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG)); tlv_buf_left = resp->size - (sizeof(HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG) + @@ -3730,10 +4102,10 @@ wlan_ret_p2p_params_config(IN pmlan_private pmpriv, } tlv_buf_left -= tlv_len + sizeof(MrvlIEtypesHeader_t); - tlv = (MrvlIEtypesHeader_t *) ((t_u8 *) tlv + - tlv_len + - sizeof - (MrvlIEtypesHeader_t)); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + + tlv_len + + sizeof + (MrvlIEtypesHeader_t)); } pioctl_buf->data_read_written = sizeof(mlan_ds_wifi_direct_config); @@ -3754,7 +4126,7 @@ wlan_ret_p2p_params_config(IN pmlan_private pmpriv, */ mlan_status wlan_cmd_hs_wakeup_reason(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) { ENTER(); @@ -3779,16 +4151,16 @@ wlan_cmd_hs_wakeup_reason(IN pmlan_private pmpriv, */ mlan_status wlan_ret_hs_wakeup_reason(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_HS_WAKEUP_REASON *hs_wakeup_reason = - (HostCmd_DS_HS_WAKEUP_REASON *) & resp->params.hs_wakeup_reason; + (HostCmd_DS_HS_WAKEUP_REASON *)&resp->params.hs_wakeup_reason; mlan_ds_pm_cfg *pm_cfg = MNULL; ENTER(); - pm_cfg = (mlan_ds_pm_cfg *) pioctl_buf->pbuf; + pm_cfg = (mlan_ds_pm_cfg *)pioctl_buf->pbuf; pm_cfg->param.wakeup_reason.hs_wakeup_reason = wlan_le16_to_cpu(hs_wakeup_reason->wakeup_reason); pioctl_buf->data_read_written = sizeof(mlan_ds_pm_cfg); @@ -3809,8 +4181,8 @@ wlan_ret_hs_wakeup_reason(IN pmlan_private pmpriv, */ mlan_status wlan_cmd_802_11_rf_antenna(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { HostCmd_DS_802_11_RF_ANTENNA *pantenna = &cmd->params.antenna; @@ -3822,7 +4194,7 @@ wlan_cmd_802_11_rf_antenna(IN pmlan_private pmpriv, if (cmd_action == HostCmd_ACT_GEN_SET) { pantenna->action = wlan_cpu_to_le16(HostCmd_ACT_SET_BOTH); - pantenna->antenna_mode = wlan_cpu_to_le16(*(t_u16 *) pdata_buf); + pantenna->antenna_mode = wlan_cpu_to_le16(*(t_u16 *)pdata_buf); } else { pantenna->action = wlan_cpu_to_le16(HostCmd_ACT_GET_BOTH); } @@ -3841,8 +4213,8 @@ wlan_cmd_802_11_rf_antenna(IN pmlan_private pmpriv, */ mlan_status wlan_ret_802_11_rf_antenna(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_802_11_RF_ANTENNA *pantenna = &resp->params.antenna; t_u16 ant_mode = wlan_le16_to_cpu(pantenna->antenna_mode); @@ -3854,7 +4226,7 @@ wlan_ret_802_11_rf_antenna(IN pmlan_private pmpriv, wlan_le16_to_cpu(pantenna->action), ant_mode); if (pioctl_buf) { - radio = (mlan_ds_radio_cfg *) pioctl_buf->pbuf; + radio = (mlan_ds_radio_cfg *)pioctl_buf->pbuf; radio->param.antenna = ant_mode; } @@ -3871,14 +4243,14 @@ wlan_ret_802_11_rf_antenna(IN pmlan_private pmpriv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_cmd_reg_access(IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) +wlan_cmd_reg_access(IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { mlan_ds_reg_rw *reg_rw; ENTER(); - reg_rw = (mlan_ds_reg_rw *) pdata_buf; + reg_rw = (mlan_ds_reg_rw *)pdata_buf; switch (cmd->command) { case HostCmd_CMD_MAC_REG_ACCESS: { @@ -3888,11 +4260,11 @@ wlan_cmd_reg_access(IN HostCmd_DS_COMMAND * cmd, (HostCmd_DS_MAC_REG_ACCESS) + S_DS_GEN); mac_reg = - (HostCmd_DS_MAC_REG_ACCESS *) & cmd->params. + (HostCmd_DS_MAC_REG_ACCESS *)&cmd->params. mac_reg; mac_reg->action = wlan_cpu_to_le16(cmd_action); mac_reg->offset = - wlan_cpu_to_le16((t_u16) reg_rw->offset); + wlan_cpu_to_le16((t_u16)reg_rw->offset); mac_reg->value = wlan_cpu_to_le32(reg_rw->value); break; } @@ -3904,12 +4276,12 @@ wlan_cmd_reg_access(IN HostCmd_DS_COMMAND * cmd, (HostCmd_DS_BBP_REG_ACCESS) + S_DS_GEN); bbp_reg = - (HostCmd_DS_BBP_REG_ACCESS *) & cmd->params. + (HostCmd_DS_BBP_REG_ACCESS *)&cmd->params. bbp_reg; bbp_reg->action = wlan_cpu_to_le16(cmd_action); bbp_reg->offset = - wlan_cpu_to_le16((t_u16) reg_rw->offset); - bbp_reg->value = (t_u8) reg_rw->value; + wlan_cpu_to_le16((t_u16)reg_rw->offset); + bbp_reg->value = (t_u8)reg_rw->value; break; } case HostCmd_CMD_RF_REG_ACCESS: @@ -3919,12 +4291,12 @@ wlan_cmd_reg_access(IN HostCmd_DS_COMMAND * cmd, wlan_cpu_to_le16(sizeof (HostCmd_DS_RF_REG_ACCESS) + S_DS_GEN); - rf_reg = (HostCmd_DS_RF_REG_ACCESS *) & cmd->params. + rf_reg = (HostCmd_DS_RF_REG_ACCESS *)&cmd->params. rf_reg; rf_reg->action = wlan_cpu_to_le16(cmd_action); rf_reg->offset = - wlan_cpu_to_le16((t_u16) reg_rw->offset); - rf_reg->value = (t_u8) reg_rw->value; + wlan_cpu_to_le16((t_u16)reg_rw->offset); + rf_reg->value = (t_u8)reg_rw->value; break; } case HostCmd_CMD_CAU_REG_ACCESS: @@ -3935,21 +4307,37 @@ wlan_cmd_reg_access(IN HostCmd_DS_COMMAND * cmd, (HostCmd_DS_RF_REG_ACCESS) + S_DS_GEN); cau_reg = - (HostCmd_DS_RF_REG_ACCESS *) & cmd->params. - rf_reg; + (HostCmd_DS_RF_REG_ACCESS *)&cmd->params.rf_reg; cau_reg->action = wlan_cpu_to_le16(cmd_action); cau_reg->offset = - wlan_cpu_to_le16((t_u16) reg_rw->offset); - cau_reg->value = (t_u8) reg_rw->value; + wlan_cpu_to_le16((t_u16)reg_rw->offset); + cau_reg->value = (t_u8)reg_rw->value; + break; + } + case HostCmd_CMD_TARGET_ACCESS: + { + HostCmd_DS_TARGET_ACCESS *target; + cmd->size = + wlan_cpu_to_le16(sizeof + (HostCmd_DS_TARGET_ACCESS) + + S_DS_GEN); + target = (HostCmd_DS_TARGET_ACCESS *)&cmd->params. + target; + target->action = wlan_cpu_to_le16(cmd_action); + target->csu_target = + wlan_cpu_to_le16(MLAN_CSU_TARGET_PSU); + target->address = + wlan_cpu_to_le16((t_u16)reg_rw->offset); + target->data = (t_u8)reg_rw->value; break; } case HostCmd_CMD_802_11_EEPROM_ACCESS: { mlan_ds_read_eeprom *rd_eeprom = - (mlan_ds_read_eeprom *) pdata_buf; + (mlan_ds_read_eeprom *)pdata_buf; HostCmd_DS_802_11_EEPROM_ACCESS *cmd_eeprom = - (HostCmd_DS_802_11_EEPROM_ACCESS *) & cmd-> - params.eeprom; + (HostCmd_DS_802_11_EEPROM_ACCESS *)&cmd->params. + eeprom; cmd->size = wlan_cpu_to_le16(sizeof (HostCmd_DS_802_11_EEPROM_ACCESS) @@ -3983,10 +4371,9 @@ wlan_cmd_reg_access(IN HostCmd_DS_COMMAND * cmd, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_ret_reg_access(mlan_adapter * pmadapter, +wlan_ret_reg_access(mlan_adapter *pmadapter, t_u16 type, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) { mlan_ds_reg_mem *reg_mem = MNULL; mlan_ds_reg_rw *reg_rw = MNULL; @@ -3994,48 +4381,58 @@ wlan_ret_reg_access(mlan_adapter * pmadapter, ENTER(); if (pioctl_buf) { - reg_mem = (mlan_ds_reg_mem *) pioctl_buf->pbuf; + reg_mem = (mlan_ds_reg_mem *)pioctl_buf->pbuf; reg_rw = ®_mem->param.reg_rw; switch (type) { case HostCmd_CMD_MAC_REG_ACCESS: { HostCmd_DS_MAC_REG_ACCESS *reg; - reg = (HostCmd_DS_MAC_REG_ACCESS *) & resp-> + reg = (HostCmd_DS_MAC_REG_ACCESS *)&resp-> params.mac_reg; reg_rw->offset = - (t_u32) wlan_le16_to_cpu(reg->offset); + (t_u32)wlan_le16_to_cpu(reg->offset); reg_rw->value = wlan_le32_to_cpu(reg->value); break; } case HostCmd_CMD_BBP_REG_ACCESS: { HostCmd_DS_BBP_REG_ACCESS *reg; - reg = (HostCmd_DS_BBP_REG_ACCESS *) & resp-> + reg = (HostCmd_DS_BBP_REG_ACCESS *)&resp-> params.bbp_reg; reg_rw->offset = - (t_u32) wlan_le16_to_cpu(reg->offset); - reg_rw->value = (t_u32) reg->value; + (t_u32)wlan_le16_to_cpu(reg->offset); + reg_rw->value = (t_u32)reg->value; break; } case HostCmd_CMD_RF_REG_ACCESS: { HostCmd_DS_RF_REG_ACCESS *reg; - reg = (HostCmd_DS_RF_REG_ACCESS *) & resp-> - params.rf_reg; + reg = (HostCmd_DS_RF_REG_ACCESS *)&resp->params. + rf_reg; reg_rw->offset = - (t_u32) wlan_le16_to_cpu(reg->offset); - reg_rw->value = (t_u32) reg->value; + (t_u32)wlan_le16_to_cpu(reg->offset); + reg_rw->value = (t_u32)reg->value; break; } case HostCmd_CMD_CAU_REG_ACCESS: { HostCmd_DS_RF_REG_ACCESS *reg; - reg = (HostCmd_DS_RF_REG_ACCESS *) & resp-> - params.rf_reg; + reg = (HostCmd_DS_RF_REG_ACCESS *)&resp->params. + rf_reg; + reg_rw->offset = + (t_u32)wlan_le16_to_cpu(reg->offset); + reg_rw->value = (t_u32)reg->value; + break; + } + case HostCmd_CMD_TARGET_ACCESS: + { + HostCmd_DS_TARGET_ACCESS *reg; + reg = (HostCmd_DS_TARGET_ACCESS *)&resp->params. + target; reg_rw->offset = - (t_u32) wlan_le16_to_cpu(reg->offset); - reg_rw->value = (t_u32) reg->value; + (t_u32)wlan_le16_to_cpu(reg->address); + reg_rw->value = (t_u32)reg->data; break; } case HostCmd_CMD_802_11_EEPROM_ACCESS: @@ -4043,8 +4440,8 @@ wlan_ret_reg_access(mlan_adapter * pmadapter, mlan_ds_read_eeprom *eeprom = ®_mem->param.rd_eeprom; HostCmd_DS_802_11_EEPROM_ACCESS *cmd_eeprom = - (HostCmd_DS_802_11_EEPROM_ACCESS *) & - resp->params.eeprom; + (HostCmd_DS_802_11_EEPROM_ACCESS *) + &resp->params.eeprom; cmd_eeprom->byte_count = wlan_le16_to_cpu(cmd_eeprom-> byte_count); @@ -4094,12 +4491,12 @@ wlan_ret_reg_access(mlan_adapter * pmadapter, * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_cmd_mem_access(IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) +wlan_cmd_mem_access(IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { - mlan_ds_mem_rw *mem_rw = (mlan_ds_mem_rw *) pdata_buf; + mlan_ds_mem_rw *mem_rw = (mlan_ds_mem_rw *)pdata_buf; HostCmd_DS_MEM_ACCESS *mem_access = - (HostCmd_DS_MEM_ACCESS *) & cmd->params.mem; + (HostCmd_DS_MEM_ACCESS *)&cmd->params.mem; ENTER(); @@ -4125,18 +4522,16 @@ wlan_cmd_mem_access(IN HostCmd_DS_COMMAND * cmd, */ mlan_status wlan_ret_mem_access(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) { mlan_ds_reg_mem *reg_mem = MNULL; mlan_ds_mem_rw *mem_rw = MNULL; - HostCmd_DS_MEM_ACCESS *mem = - (HostCmd_DS_MEM_ACCESS *) & resp->params.mem; + HostCmd_DS_MEM_ACCESS *mem = (HostCmd_DS_MEM_ACCESS *)&resp->params.mem; ENTER(); if (pioctl_buf) { - reg_mem = (mlan_ds_reg_mem *) pioctl_buf->pbuf; + reg_mem = (mlan_ds_reg_mem *)pioctl_buf->pbuf; mem_rw = ®_mem->param.mem_rw; mem_rw->addr = wlan_le32_to_cpu(mem->addr); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_decl.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_decl.h old mode 100755 new mode 100644 index 99f4de45..5aece1a9 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_decl.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_decl.h @@ -27,7 +27,7 @@ Change log: #define _MLAN_DECL_H_ /** MLAN release version */ -#define MLAN_RELEASE_VERSION "467" +#define MLAN_RELEASE_VERSION "C066.r2" /** Re-define generic data types for MLAN/MOAL */ /** Signed char (1-byte) */ @@ -146,9 +146,18 @@ typedef t_s32 t_sval; /** This is current limit on Maximum Rx AMPDU allowed */ #define MLAN_MAX_RX_BASTREAM_SUPPORTED 16 +/** station ampdu tx win size */ +#define MLAN_STA_AMPDU_DEF_TXWINSIZE_NOV15 32 +/** uap ampdu tx win size */ +#define MLAN_UAP_AMPDU_DEF_TXWINSIZE_NOV15 32 +/** uap ampdu rx win size */ +#define MLAN_UAP_AMPDU_DEF_RXWINSIZE_NOV15 32 +/** wfd ampdu tx/rx win size */ +#define MLAN_WFD_AMPDU_DEF_TXRXWINSIZE_NOV15 32 + #ifdef STA_SUPPORT /** Default Win size attached during ADDBA request */ -#define MLAN_STA_AMPDU_DEF_TXWINSIZE 16 +#define MLAN_STA_AMPDU_DEF_TXWINSIZE 32 /** Default Win size attached during ADDBA response */ #define MLAN_STA_AMPDU_DEF_RXWINSIZE 64 /** RX winsize for COEX */ @@ -158,14 +167,14 @@ typedef t_s32 t_sval; /** Default Win size attached during ADDBA request */ #define MLAN_UAP_AMPDU_DEF_TXWINSIZE 32 /** Default Win size attached during ADDBA response */ -#define MLAN_UAP_AMPDU_DEF_RXWINSIZE 16 +#define MLAN_UAP_AMPDU_DEF_RXWINSIZE 32 /** RX winsize for COEX */ #define MLAN_UAP_COEX_AMPDU_DEF_RXWINSIZE 16 #endif /* UAP_SUPPORT */ #ifdef WIFI_DIRECT_SUPPORT /** WFD use the same window size for tx/rx */ -#define MLAN_WFD_AMPDU_DEF_TXRXWINSIZE 16 +#define MLAN_WFD_AMPDU_DEF_TXRXWINSIZE 32 /** RX winsize for COEX */ #define MLAN_WFD_COEX_AMPDU_DEF_RXWINSIZE 16 #endif @@ -234,12 +243,6 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH]; /** Maximum tx retry count */ #define MLAN_TX_RETRY_MAX (14) - -#define RX_RATE_MAX 24 -#define SNR_MAX 256 -#define NOISE_FLR_MAX 256 -#define SIG_STRENGTH_MAX 256 - /** define SDIO block size for data Tx/Rx */ /* We support up to 480-byte block size due to FW buffer limitation. */ #define MLAN_SDIO_BLOCK_SIZE 256 @@ -250,7 +253,13 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH]; /** define allocated buffer size */ #define ALLOC_BUF_SIZE (4 * 1024) /** SDIO MP aggr pkt limit */ -#define SDIO_MP_AGGR_DEF_PKT_LIMIT (8) +#define SDIO_MP_AGGR_DEF_PKT_LIMIT (16) +/** SDIO MP aggr pkt limit 8 */ +#define SDIO_MP_AGGR_DEF_PKT_LIMIT_8 (8) +/** SDIO MP aggr pkt limit 16*/ +#define SDIO_MP_AGGR_DEF_PKT_LIMIT_16 (16) +/** max SDIO MP aggr pkt limit */ +#define SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX (16) /** SDIO IO Port mask */ #define MLAN_SDIO_IO_PORT_MASK 0xfffff @@ -284,6 +293,9 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH]; /** Buffer flag for TCP_ACK */ #define MLAN_BUF_FLAG_TCP_ACK MBIT(9) +/** Buffer flag for TX_STATUS */ +#define MLAN_BUF_FLAG_TX_STATUS MBIT(10) + #ifdef DEBUG_LEVEL1 /** Debug level bit definition */ #define MMSG MBIT(0) @@ -295,6 +307,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH]; #define MINTR MBIT(6) #define MIOCTL MBIT(7) +#define MMPA_D MBIT(15) #define MDAT_D MBIT(16) #define MCMD_D MBIT(17) #define MEVT_D MBIT(18) @@ -319,6 +332,7 @@ typedef enum _mlan_status { MLAN_STATUS_SUCCESS = 0, MLAN_STATUS_PENDING, MLAN_STATUS_RESOURCE, + MLAN_STATUS_COMPLETE, } mlan_status; /** mlan_error_code */ @@ -414,6 +428,11 @@ typedef enum _mlan_event_id { MLAN_EVENT_ID_FW_BG_SCAN = 0x0000001D, MLAN_EVENT_ID_FW_BG_SCAN_STOPPED = 0x0000001E, MLAN_EVENT_ID_FW_WEP_ICV_ERR = 0x00000020, + MLAN_EVENT_ID_FW_STOP_TX = 0x00000021, + MLAN_EVENT_ID_FW_START_TX = 0x00000022, + MLAN_EVENT_ID_FW_CHANNEL_SWITCH_ANN = 0x00000023, + MLAN_EVENT_ID_FW_RADAR_DETECTED = 0x00000024, + MLAN_EVENT_ID_FW_CHANNEL_REPORT_RDY = 0x00000025, MLAN_EVENT_ID_FW_BW_CHANGED = 0x00000026, #ifdef WIFI_DIRECT_SUPPORT MLAN_EVENT_ID_FW_REMAIN_ON_CHAN_EXPIRED = 0x0000002B, @@ -427,6 +446,7 @@ typedef enum _mlan_event_id { MLAN_EVENT_ID_UAP_FW_STA_DISCONNECT = 0x00000031, #endif + MLAN_EVENT_ID_FW_TX_STATUS = 0x00000034, /* Event generated by MLAN driver (MSB=1) */ MLAN_EVENT_ID_DRV_CONNECTED = 0x80000001, MLAN_EVENT_ID_DRV_DEFER_HANDLING = 0x80000002, @@ -436,6 +456,7 @@ typedef enum _mlan_event_id { MLAN_EVENT_ID_DRV_OBSS_SCAN_PARAM = 0x80000006, MLAN_EVENT_ID_DRV_PASSTHRU = 0x80000007, MLAN_EVENT_ID_DRV_SCAN_REPORT = 0x80000009, + MLAN_EVENT_ID_DRV_MEAS_REPORT = 0x8000000A, MLAN_EVENT_ID_DRV_ASSOC_FAILURE_REPORT = 0x8000000B, MLAN_EVENT_ID_DRV_REPORT_STRING = 0x8000000F, MLAN_EVENT_ID_DRV_DBG_DUMP = 0x80000012, @@ -553,6 +574,8 @@ typedef struct _mlan_buffer { t_u32 out_ts_sec; /** Time stamp when packet is processed (micro seconds) */ t_u32 out_ts_usec; + /** tx_seq_num */ + t_u32 tx_seq_num; /** Fields below are valid for MLAN module only */ /** Pointer to parent mlan_buffer */ @@ -636,7 +659,7 @@ typedef MLAN_PACK_START struct { t_u16 medium_time; } MLAN_PACK_END wlan_ioctl_wmm_ts_status_t, /** Type definition of mlan_ds_wmm_ts_status for MLAN_OID_WMM_CFG_TS_STATUS */ - mlan_ds_wmm_ts_status, *pmlan_ds_wmm_ts_status; +mlan_ds_wmm_ts_status, *pmlan_ds_wmm_ts_status; /** Max Ie length */ #define MAX_IE_SIZE 256 @@ -786,7 +809,6 @@ typedef MLAN_PACK_START struct _tdls_all_config { /** enable or disable */ t_u16 enable; } MLAN_PACK_END tdls_config; - /** TDLS set info */ MLAN_PACK_START struct _tdls_set_data { /** (tlv + capInfo) length */ @@ -921,129 +943,144 @@ typedef struct _tdls_tear_down_event { /** mlan_callbacks data structure */ typedef struct _mlan_callbacks { /** moal_get_fw_data */ - mlan_status(*moal_get_fw_data) (IN t_void * pmoal_handle, - IN t_u32 offset, - IN t_u32 len, OUT t_u8 * pbuf); + mlan_status (*moal_get_fw_data) (IN t_void *pmoal_handle, + IN t_u32 offset, + IN t_u32 len, OUT t_u8 *pbuf); /** moal_init_fw_complete */ - mlan_status(*moal_init_fw_complete) (IN t_void * pmoal_handle, - IN mlan_status status); + mlan_status (*moal_init_fw_complete) (IN t_void *pmoal_handle, + IN mlan_status status); /** moal_shutdown_fw_complete */ - mlan_status(*moal_shutdown_fw_complete) (IN t_void * pmoal_handle, - IN mlan_status status); + mlan_status (*moal_shutdown_fw_complete) (IN t_void *pmoal_handle, + IN mlan_status status); /** moal_send_packet_complete */ - mlan_status(*moal_send_packet_complete) (IN t_void * pmoal_handle, - IN pmlan_buffer pmbuf, - IN mlan_status status); + mlan_status (*moal_send_packet_complete) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf, + IN mlan_status status); /** moal_recv_complete */ - mlan_status(*moal_recv_complete) (IN t_void * pmoal_handle, - IN pmlan_buffer pmbuf, - IN t_u32 port, IN mlan_status status); + mlan_status (*moal_recv_complete) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf, + IN t_u32 port, + IN mlan_status status); /** moal_recv_packet */ - mlan_status(*moal_recv_packet) (IN t_void * pmoal_handle, - IN pmlan_buffer pmbuf); + mlan_status (*moal_recv_packet) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf); /** moal_recv_event */ - mlan_status(*moal_recv_event) (IN t_void * pmoal_handle, - IN pmlan_event pmevent); + mlan_status (*moal_recv_event) (IN t_void *pmoal_handle, + IN pmlan_event pmevent); /** moal_ioctl_complete */ - mlan_status(*moal_ioctl_complete) (IN t_void * pmoal_handle, - IN pmlan_ioctl_req pioctl_req, - IN mlan_status status); + mlan_status (*moal_ioctl_complete) (IN t_void *pmoal_handle, + IN pmlan_ioctl_req pioctl_req, + IN mlan_status status); /** moal_alloc_mlan_buffer */ - mlan_status(*moal_alloc_mlan_buffer) (IN t_void * pmoal_handle, - IN t_u32 size, - OUT pmlan_buffer * pmbuf); + mlan_status (*moal_alloc_mlan_buffer) (IN t_void *pmoal_handle, + IN t_u32 size, + OUT pmlan_buffer *pmbuf); /** moal_free_mlan_buffer */ - mlan_status(*moal_free_mlan_buffer) (IN t_void * pmoal_handle, - IN pmlan_buffer pmbuf); + mlan_status (*moal_free_mlan_buffer) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf); /** moal_write_reg */ - mlan_status(*moal_write_reg) (IN t_void * pmoal_handle, - IN t_u32 reg, IN t_u32 data); + mlan_status (*moal_write_reg) (IN t_void *pmoal_handle, + IN t_u32 reg, IN t_u32 data); /** moal_read_reg */ - mlan_status(*moal_read_reg) (IN t_void * pmoal_handle, - IN t_u32 reg, OUT t_u32 * data); + mlan_status (*moal_read_reg) (IN t_void *pmoal_handle, + IN t_u32 reg, OUT t_u32 *data); /** moal_write_data_sync */ - mlan_status(*moal_write_data_sync) (IN t_void * pmoal_handle, - IN pmlan_buffer pmbuf, - IN t_u32 port, IN t_u32 timeout); + mlan_status (*moal_write_data_sync) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf, + IN t_u32 port, IN t_u32 timeout); /** moal_read_data_sync */ - mlan_status(*moal_read_data_sync) (IN t_void * pmoal_handle, - IN OUT pmlan_buffer pmbuf, - IN t_u32 port, IN t_u32 timeout); + mlan_status (*moal_read_data_sync) (IN t_void *pmoal_handle, + IN OUT pmlan_buffer pmbuf, + IN t_u32 port, IN t_u32 timeout); /** moal_malloc */ - mlan_status(*moal_malloc) (IN t_void * pmoal_handle, - IN t_u32 size, - IN t_u32 flag, OUT t_u8 ** ppbuf); + mlan_status (*moal_malloc) (IN t_void *pmoal_handle, + IN t_u32 size, + IN t_u32 flag, OUT t_u8 **ppbuf); /** moal_mfree */ - mlan_status(*moal_mfree) (IN t_void * pmoal_handle, IN t_u8 * pbuf); + mlan_status (*moal_mfree) (IN t_void *pmoal_handle, IN t_u8 *pbuf); /** moal_vmalloc */ - mlan_status(*moal_vmalloc) (IN t_void * pmoal_handle, - IN t_u32 size, OUT t_u8 ** ppbuf); + mlan_status (*moal_vmalloc) (IN t_void *pmoal_handle, + IN t_u32 size, OUT t_u8 **ppbuf); /** moal_vfree */ - mlan_status(*moal_vfree) (IN t_void * pmoal_handle, IN t_u8 * pbuf); + mlan_status (*moal_vfree) (IN t_void *pmoal_handle, IN t_u8 *pbuf); /** moal_memset */ - t_void *(*moal_memset) (IN t_void * pmoal_handle, - IN t_void * pmem, IN t_u8 byte, IN t_u32 num); + t_void *(*moal_memset) (IN t_void *pmoal_handle, + IN t_void *pmem, IN t_u8 byte, IN t_u32 num); /** moal_memcpy */ - t_void *(*moal_memcpy) (IN t_void * pmoal_handle, - IN t_void * pdest, - IN const t_void * psrc, IN t_u32 num); + t_void *(*moal_memcpy) (IN t_void *pmoal_handle, + IN t_void *pdest, + IN const t_void *psrc, IN t_u32 num); /** moal_memmove */ - t_void *(*moal_memmove) (IN t_void * pmoal_handle, - IN t_void * pdest, - IN const t_void * psrc, IN t_u32 num); + t_void *(*moal_memmove) (IN t_void *pmoal_handle, + IN t_void *pdest, + IN const t_void *psrc, IN t_u32 num); /** moal_memcmp */ - t_s32(*moal_memcmp) (IN t_void * pmoal_handle, - IN const t_void * pmem1, - IN const t_void * pmem2, IN t_u32 num); + t_s32 (*moal_memcmp) (IN t_void *pmoal_handle, + IN const t_void *pmem1, + IN const t_void *pmem2, IN t_u32 num); /** moal_udelay */ - t_void(*moal_udelay) (IN t_void * pmoal_handle, IN t_u32 udelay); + t_void (*moal_udelay) (IN t_void *pmoal_handle, IN t_u32 udelay); /** moal_get_system_time */ - mlan_status(*moal_get_system_time) (IN t_void * pmoal_handle, - OUT t_u32 * psec, - OUT t_u32 * pusec); + mlan_status (*moal_get_system_time) (IN t_void *pmoal_handle, + OUT t_u32 *psec, OUT t_u32 *pusec); /** moal_init_timer*/ - mlan_status(*moal_init_timer) (IN t_void * pmoal_handle, - OUT t_void ** pptimer, - IN t_void(*callback) (t_void * - pcontext), - IN t_void * pcontext); + mlan_status (*moal_init_timer) (IN t_void *pmoal_handle, + OUT t_void **pptimer, + IN t_void (*callback) (t_void + *pcontext), + IN t_void *pcontext); /** moal_free_timer */ - mlan_status(*moal_free_timer) (IN t_void * pmoal_handle, - IN t_void * ptimer); + mlan_status (*moal_free_timer) (IN t_void *pmoal_handle, + IN t_void *ptimer); /** moal_start_timer*/ - mlan_status(*moal_start_timer) (IN t_void * pmoal_handle, - IN t_void * ptimer, + mlan_status (*moal_start_timer) (IN t_void *pmoal_handle, + IN t_void *ptimer, IN t_u8 periodic, IN t_u32 msec); /** moal_stop_timer*/ - mlan_status(*moal_stop_timer) (IN t_void * pmoal_handle, - IN t_void * ptimer); + mlan_status (*moal_stop_timer) (IN t_void *pmoal_handle, + IN t_void *ptimer); /** moal_init_lock */ - mlan_status(*moal_init_lock) (IN t_void * pmoal_handle, - OUT t_void ** pplock); + mlan_status (*moal_init_lock) (IN t_void *pmoal_handle, + OUT t_void **pplock); /** moal_free_lock */ - mlan_status(*moal_free_lock) (IN t_void * pmoal_handle, - IN t_void * plock); + mlan_status (*moal_free_lock) (IN t_void *pmoal_handle, + IN t_void *plock); /** moal_spin_lock */ - mlan_status(*moal_spin_lock) (IN t_void * pmoal_handle, - IN t_void * plock); + mlan_status (*moal_spin_lock) (IN t_void *pmoal_handle, + IN t_void *plock); /** moal_spin_unlock */ - mlan_status(*moal_spin_unlock) (IN t_void * pmoal_handle, - IN t_void * plock); + mlan_status (*moal_spin_unlock) (IN t_void *pmoal_handle, + IN t_void *plock); /** moal_print */ - t_void(*moal_print) (IN t_void * pmoal_handle, + t_void (*moal_print) (IN t_void *pmoal_handle, IN t_u32 level, IN char *pformat, IN ... ); /** moal_print_netintf */ - t_void(*moal_print_netintf) (IN t_void * pmoal_handle, + t_void (*moal_print_netintf) (IN t_void *pmoal_handle, IN t_u32 bss_index, IN t_u32 level); /** moal_assert */ - t_void(*moal_assert) (IN t_void * pmoal_handle, IN t_u32 cond); + t_void (*moal_assert) (IN t_void *pmoal_handle, IN t_u32 cond); /** moal_tcp_ack_tx_ind */ - t_void(*moal_tcp_ack_tx_ind) (IN t_void * pmoal_handle, + t_void (*moal_tcp_ack_tx_ind) (IN t_void *pmoal_handle, IN pmlan_buffer pmbuf); + /** moal_hist_data_add */ + t_void (*moal_hist_data_add) (IN t_void *pmoal_handle, + IN t_u32 bss_index, + IN t_s8 rx_rate, + IN t_s8 snr, IN t_s8 nflr, IN t_u8 antenna); + /** moal_peer_mgmt_frame */ + t_void(*moal_peer_mgmt_frame) (IN t_void * pmoal_handle, + IN t_u32 bss_index, + IN t_s8 snr, IN t_s8 nf, IN t_s8 sig_str, + IN mlan_802_11_mac_addr mac); + + t_void (*moal_updata_peer_signal) (IN t_void *pmoal_handle, + IN t_u32 bss_index, + IN t_u8 *peer_addr, + IN t_s8 snr, IN t_s8 nflr); } mlan_callbacks, *pmlan_callbacks; /** Interrupt Mode SDIO */ @@ -1085,6 +1122,12 @@ typedef struct _mlan_device { #ifdef SDIO_MULTI_PORT_RX_AGGR /** SDIO MPA Rx */ t_u32 mpa_rx_cfg; +#endif +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + /* see blk_queue_max_segment_size */ + t_u32 max_seg_size; + /* see blk_queue_max_segments */ + t_u16 max_segs; #endif /** Auto deep sleep */ t_u32 auto_ds; @@ -1096,10 +1139,14 @@ typedef struct _mlan_device { /** 802.11d configuration */ t_u32 cfg_11d; #endif + /** FW download CRC check flag */ + t_u32 fw_crc_check; /** enable/disable rx work */ t_u8 rx_work; /** dev cap mask */ t_u32 dev_cap_mask; + /** card type */ + t_u16 card_type; } mlan_device, *pmlan_device; /** MLAN API function prototype */ @@ -1107,48 +1154,55 @@ typedef struct _mlan_device { /** Registration */ MLAN_API mlan_status mlan_register(IN pmlan_device pmdevice, - OUT t_void ** ppmlan_adapter); + OUT t_void **ppmlan_adapter); /** Un-registration */ -MLAN_API mlan_status mlan_unregister(IN t_void * pmlan_adapter); +MLAN_API mlan_status mlan_unregister(IN t_void *pmlan_adapter + ); /** Firmware Downloading */ -MLAN_API mlan_status mlan_dnld_fw(IN t_void * pmlan_adapter, +MLAN_API mlan_status mlan_dnld_fw(IN t_void *pmlan_adapter, IN pmlan_fw_image pmfw); /** Custom data pass API */ -MLAN_API mlan_status mlan_set_init_param(IN t_void * pmlan_adapter, +MLAN_API mlan_status mlan_set_init_param(IN t_void *pmlan_adapter, IN pmlan_init_param pparam); /** Firmware Initialization */ -MLAN_API mlan_status mlan_init_fw(IN t_void * pmlan_adapter); +MLAN_API mlan_status mlan_init_fw(IN t_void *pmlan_adapter + ); /** Firmware Shutdown */ -MLAN_API mlan_status mlan_shutdown_fw(IN t_void * pmlan_adapter); +MLAN_API mlan_status mlan_shutdown_fw(IN t_void *pmlan_adapter + ); /** Main Process */ -MLAN_API mlan_status mlan_main_process(IN t_void * pmlan_adapter); +MLAN_API mlan_status mlan_main_process(IN t_void *pmlan_adapter + ); /** Rx process */ -mlan_status mlan_rx_process(IN t_void * pmlan_adapter); +mlan_status mlan_rx_process(IN t_void *pmlan_adapter + ); /** Packet Transmission */ -MLAN_API mlan_status mlan_send_packet(IN t_void * pmlan_adapter, +MLAN_API mlan_status mlan_send_packet(IN t_void *pmlan_adapter, IN pmlan_buffer pmbuf); /** Packet Reception complete callback */ -MLAN_API mlan_status mlan_recv_packet_complete(IN t_void * pmlan_adapter, +MLAN_API mlan_status mlan_recv_packet_complete(IN t_void *pmlan_adapter, IN pmlan_buffer pmbuf, IN mlan_status status); /** interrupt handler */ -MLAN_API t_void mlan_interrupt(IN t_void * pmlan_adapter); +MLAN_API t_void mlan_interrupt(IN t_void *pmlan_adapter); + +MLAN_API t_void mlan_pm_wakeup_card(IN t_void *pmlan_adapter); /** mlan ioctl */ -MLAN_API mlan_status mlan_ioctl(IN t_void * pmlan_adapter, +MLAN_API mlan_status mlan_ioctl(IN t_void *pmlan_adapter, IN pmlan_ioctl_req pioctl_req); /** mlan select wmm queue */ -MLAN_API t_u8 mlan_select_wmm_queue(IN t_void * pmlan_adapter, +MLAN_API t_u8 mlan_select_wmm_queue(IN t_void *pmlan_adapter, IN t_u8 bss_num, IN t_u8 tid); /** Callback for Probe Request Mgmt frame */ @@ -1157,20 +1211,6 @@ typedef int (*MOAL_PEER_MGMT_FRAME_CB) ( t_s8 snr, t_s8 sig_str, mlan_802_11_mac_addr mac); -/** api to get the histogram data */ -MLAN_API int mlan_hist_data_get( - OUT char *pBuf, - OUT unsigned int *pNumSamples); - -/** api to clear existing histogram data */ -MLAN_API int mlan_hist_data_clear(void); - -/** memcpy implementation for mlan */ -MLAN_API void* mlan_memcpy( - IN void *pDest, - IN void *pSrc, - IN unsigned int count); - /** api to register peer mgmt frame callback function*/ MLAN_API int mlan_register_peer_mac_cb(MOAL_PEER_MGMT_FRAME_CB fn); #endif /* !_MLAN_DECL_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_fw.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_fw.h old mode 100755 new mode 100644 index 1486106a..695db0b4 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_fw.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_fw.h @@ -77,6 +77,9 @@ typedef MLAN_PACK_START struct { /** Rates supported in band BG */ #define BG_SUPPORTED_RATES 13 +/** Setup the number of rates passed in the driver/firmware API */ +#define A_SUPPORTED_RATES 9 + /** CapInfo Short Slot Time Disabled */ /* #define SHORT_SLOT_TIME_DISABLED(CapInfo) ((IEEEtypes_CapInfo_t)(CapInfo).short_slot_time = 0) */ #define SHORT_SLOT_TIME_DISABLED(CapInfo) (CapInfo &= ~MBIT(10)) @@ -90,10 +93,10 @@ typedef MLAN_PACK_START struct { #define N_SUPPORTED_RATES 3 #ifdef STA_SUPPORT /** All bands (B, G, N) */ -#define ALL_802_11_BANDS (BAND_B | BAND_G | BAND_GN) +#define ALL_802_11_BANDS (BAND_A | BAND_B | BAND_G | BAND_GN) #else -/** Both B and G bands */ -#define ALL_802_11_BANDS (BAND_B | BAND_G) +/** All bands (B, G, A) */ +#define ALL_802_11_BANDS (BAND_B | BAND_G | BAND_A) #endif /* STA_SUPPORT */ #ifdef STA_SUPPORT @@ -113,10 +116,12 @@ typedef MLAN_PACK_START struct { extern t_u8 SupportedRates_B[B_SUPPORTED_RATES]; extern t_u8 SupportedRates_G[G_SUPPORTED_RATES]; extern t_u8 SupportedRates_BG[BG_SUPPORTED_RATES]; +extern t_u8 SupportedRates_A[A_SUPPORTED_RATES]; extern t_u8 SupportedRates_N[N_SUPPORTED_RATES]; extern t_u8 AdhocRates_G[G_SUPPORTED_RATES]; extern t_u8 AdhocRates_B[B_SUPPORTED_RATES]; extern t_u8 AdhocRates_BG[BG_SUPPORTED_RATES]; +extern t_u8 AdhocRates_A[A_SUPPORTED_RATES]; /** Default auto deep sleep mode */ #define DEFAULT_AUTO_DS_MODE MTRUE @@ -268,6 +273,9 @@ typedef enum _WLAN_802_11_WEP_STATUS { /** TLV type : Domain */ #define TLV_TYPE_DOMAIN 0x0007 +/** TLV type : Power constraint */ +#define TLV_TYPE_POWER_CONSTRAINT 0x0020 + /** TLV type : Power capability */ #define TLV_TYPE_POWER_CAPABILITY 0x0021 @@ -316,6 +324,9 @@ typedef enum _WLAN_802_11_WEP_STATUS { /** TLV type : TSF timestamp */ #define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 0x13) /* 0x0113 */ +/** TLV type : ARP filter */ +#define TLV_TYPE_ARP_FILTER (PROPRIETARY_TLV_BASE_ID + 0x15) /* 0x0115 + */ /** TLV type : Beacon RSSI high */ #define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 0x16) /* 0x0116 */ @@ -360,6 +371,16 @@ typedef enum _WLAN_802_11_WEP_STATUS { #define TLV_TYPE_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 0x3c) /* 0x013c */ +/** TLV type : Encryption Protocol TLV */ +#define TLV_TYPE_ENCRYPTION_PROTO (PROPRIETARY_TLV_BASE_ID + 0x40) /* 0x0140 + */ +/** TLV type : Cipher TLV */ +#define TLV_TYPE_CIPHER (PROPRIETARY_TLV_BASE_ID + 0x42) /* 0x0142 + */ +/** TLV type : PMK */ +#define TLV_TYPE_PMK (PROPRIETARY_TLV_BASE_ID + 0x44) /* 0x0144 + */ + /** TLV type : BCN miss */ #define TLV_TYPE_PRE_BCNMISS (PROPRIETARY_TLV_BASE_ID + 0x49) /* 0x0149 */ @@ -384,33 +405,52 @@ typedef enum _WLAN_802_11_WEP_STATUS { */ /** TLV type : TDLS IDLE TIMEOUT */ -#define TLV_TYPE_TDLS_IDLE_TIMEOUT (PROPRIETARY_TLV_BASE_ID + 0xC2) /* 0x01C2 - */ +#define TLV_TYPE_TDLS_IDLE_TIMEOUT (PROPRIETARY_TLV_BASE_ID + 0xC2) /* 0x01C2 + */ /** TLV type : HT Capabilities */ -#define TLV_TYPE_HT_CAP (PROPRIETARY_TLV_BASE_ID + 0x4a) /* 0x014a - */ +#define TLV_TYPE_HT_CAP (PROPRIETARY_TLV_BASE_ID + 0x4a) /* 0x014a + */ /** TLV type : HT Information */ -#define TLV_TYPE_HT_INFO (PROPRIETARY_TLV_BASE_ID + 0x4b) /* 0x014b - */ +#define TLV_TYPE_HT_INFO (PROPRIETARY_TLV_BASE_ID + 0x4b) /* 0x014b + */ /** TLV type : Secondary Channel Offset */ -#define TLV_SECONDARY_CHANNEL_OFFSET (PROPRIETARY_TLV_BASE_ID + 0x4c) /* 0x014c - */ +#define TLV_SECONDARY_CHANNEL_OFFSET (PROPRIETARY_TLV_BASE_ID + 0x4c) /* 0x014c + */ /** TLV type : 20/40 BSS Coexistence */ -#define TLV_TYPE_2040BSS_COEXISTENCE (PROPRIETARY_TLV_BASE_ID + 0x4d) /* 0x014d - */ +#define TLV_TYPE_2040BSS_COEXISTENCE (PROPRIETARY_TLV_BASE_ID + 0x4d) /* 0x014d + */ /** TLV type : Overlapping BSS Scan Parameters */ -#define TLV_TYPE_OVERLAP_BSS_SCAN_PARAM (PROPRIETARY_TLV_BASE_ID + 0x4e) /* 0x014e +#define TLV_TYPE_OVERLAP_BSS_SCAN_PARAM (PROPRIETARY_TLV_BASE_ID + 0x4e) /* 0x014e */ /** TLV type : Extended capabilities */ -#define TLV_TYPE_EXTCAP (PROPRIETARY_TLV_BASE_ID + 0x4f) /* 0x014f - */ +#define TLV_TYPE_EXTCAP (PROPRIETARY_TLV_BASE_ID + 0x4f) /* 0x014f + */ /** TLV type : Set of MCS values that STA desires to use within the BSS */ -#define TLV_TYPE_HT_OPERATIONAL_MCS_SET (PROPRIETARY_TLV_BASE_ID + 0x50) /* 0x0150 +#define TLV_TYPE_HT_OPERATIONAL_MCS_SET (PROPRIETARY_TLV_BASE_ID + 0x50) /* 0x0150 */ /** TLV type : RXBA_SYNC */ -#define TLV_TYPE_RXBA_SYNC (PROPRIETARY_TLV_BASE_ID + 0x99) /* 0x0199 - */ +#define TLV_TYPE_RXBA_SYNC (PROPRIETARY_TLV_BASE_ID + 0x99) /* 0x0199 + */ + +#ifdef WIFI_DIRECT_SUPPORT +/** TLV type : AP PSK */ +#define TLV_TYPE_UAP_PSK (PROPRIETARY_TLV_BASE_ID + 0xa8) /* 0x01a8 */ +/** TLV type : p2p NOA */ +#define TLV_TYPE_WIFI_DIRECT_NOA (PROPRIETARY_TLV_BASE_ID + 0x83) +/** TLV type : p2p opp ps */ +#define TLV_TYPE_WIFI_DIRECT_OPP_PS (PROPRIETARY_TLV_BASE_ID + 0x84) +#endif /* WIFI_DIRECT_SUPPORT */ + +/** TLV : 20/40 coex config */ +#define TLV_TYPE_2040_BSS_COEX_CONTROL\ + (PROPRIETARY_TLV_BASE_ID + 0x98) /* 0x0198 */ + +/** TLV type : aggr win size */ +#define TLV_BTCOEX_WL_AGGR_WINSIZE (PROPRIETARY_TLV_BASE_ID + 0xca) +/** TLV type : scan time */ +#define TLV_BTCOEX_WL_SCANTIME (PROPRIETARY_TLV_BASE_ID + 0Xcb) + /** ADDBA TID mask */ #define ADDBA_TID_MASK (MBIT(2) | MBIT(3) | MBIT(4) | MBIT(5)) /** DELBA TID mask */ @@ -437,7 +477,8 @@ typedef enum _WLAN_802_11_WEP_STATUS { #define BA_STREAM_NOT_ALLOWED 0xff /** Test if 11n is enabled by checking the HTCap IE */ -#define IS_11N_ENABLED(priv) ((priv->config_bands & BAND_GN) && priv->curr_bss_params.bss_descriptor.pht_cap) +#define IS_11N_ENABLED(priv) ((priv->config_bands & BAND_GN || priv->config_bands & BAND_AN) \ + && priv->curr_bss_params.bss_descriptor.pht_cap) /** Find out if we are the initiator or not */ #define INITIATOR_BIT(DelBAParamSet) (((DelBAParamSet) & \ MBIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS) @@ -452,15 +493,15 @@ typedef enum _WLAN_802_11_WEP_STATUS { #define NON_GREENFIELD_STAS 0x04 /** Greenfield support */ -#define HWSPEC_GREENFIELD_SUPP MBIT(29) +#define HWSPEC_GREENFIELD_SUPP MBIT(29) /** RX STBC support */ -#define HWSPEC_RXSTBC_SUPP MBIT(26) +#define HWSPEC_RXSTBC_SUPP MBIT(26) /** ShortGI @ 40Mhz support */ -#define HWSPEC_SHORTGI40_SUPP MBIT(24) +#define HWSPEC_SHORTGI40_SUPP MBIT(24) /** ShortGI @ 20Mhz support */ -#define HWSPEC_SHORTGI20_SUPP MBIT(23) +#define HWSPEC_SHORTGI20_SUPP MBIT(23) /** Channel width 40Mhz support */ -#define HWSPEC_CHANBW40_SUPP MBIT(17) +#define HWSPEC_CHANBW40_SUPP MBIT(17) /** 40Mhz intolarent enable */ #define CAPINFO_40MHZ_INTOLARENT MBIT(8) @@ -468,13 +509,13 @@ typedef enum _WLAN_802_11_WEP_STATUS { #define DEFAULT_11N_CAP_MASK_BG (HWSPEC_SHORTGI20_SUPP | HWSPEC_RXSTBC_SUPP) /** Default 11n capability mask for 5GHz */ #define DEFAULT_11N_CAP_MASK_A (HWSPEC_CHANBW40_SUPP | HWSPEC_SHORTGI20_SUPP | \ - HWSPEC_SHORTGI40_SUPP | HWSPEC_RXSTBC_SUPP) + HWSPEC_SHORTGI40_SUPP | HWSPEC_RXSTBC_SUPP) /** Default 11n TX BF capability **/ #define DEFAULT_11N_TX_BF_CAP 0x09E1E008 /** Bits to ignore in hw_dev_cap as these bits are set in get_hw_spec */ -#define IGN_HW_DEV_CAP (CAPINFO_40MHZ_INTOLARENT) +#define IGN_HW_DEV_CAP (CAPINFO_40MHZ_INTOLARENT) /** HW_SPEC FwCapInfo */ #define ISSUPP_11NENABLED(FwCapInfo) (FwCapInfo & MBIT(11)) @@ -713,10 +754,21 @@ typedef enum _WLAN_802_11_WEP_STATUS { #define TLV_TYPE_BSS_SCAN_INFO (PROPRIETARY_TLV_BASE_ID + 0x57) /* 0x0157 */ +/** TLV type : 11h Basic Rpt */ +#define TLV_TYPE_CHANRPT_11H_BASIC (PROPRIETARY_TLV_BASE_ID + 0x5b) /* 0x015b + */ + /** TLV type : Action frame */ #define TLV_TYPE_IEEE_ACTION_FRAME (PROPRIETARY_TLV_BASE_ID + 0x8c) /* 0x018c */ +/** TLV type : SCAN channel gap */ +#define TLV_TYPE_SCAN_CHANNEL_GAP (PROPRIETARY_TLV_BASE_ID + 0xc5) /* 0x01c5 + */ +/** TLV type : Channel statistics */ +#define TLV_TYPE_CHANNEL_STATS (PROPRIETARY_TLV_BASE_ID + 0xc6) /* 0x01c6 + */ + /** Firmware Host Command ID Constants */ /** Host Command ID : Get hardware specifications */ #define HostCmd_CMD_GET_HW_SPEC 0x0003 @@ -776,6 +828,18 @@ typedef enum _WLAN_802_11_WEP_STATUS { /** Host Command ID : 802.11 D domain information */ #define HostCmd_CMD_802_11D_DOMAIN_INFO 0x005b +/** Host Command ID : 802.11 TPC information */ +#define HostCmd_CMD_802_11_TPC_INFO 0x005f +/** Host Command ID : 802.11 TPC adapt req */ +#define HostCmd_CMD_802_11_TPC_ADAPT_REQ 0x0060 +/** Host Command ID : 802.11 channel SW ann */ +#define HostCmd_CMD_802_11_CHAN_SW_ANN 0x0061 + +/** Host Command ID : Measurement request */ +#define HostCmd_CMD_MEASUREMENT_REQUEST 0x0062 +/** Host Command ID : Measurement report */ +#define HostCmd_CMD_MEASUREMENT_REPORT 0x0063 + /** Host Command ID : 802.11 sleep parameters */ #define HostCmd_CMD_802_11_SLEEP_PARAMS 0x0066 @@ -783,7 +847,7 @@ typedef enum _WLAN_802_11_WEP_STATUS { #define HostCmd_CMD_802_11_SLEEP_PERIOD 0x0068 /** Host Command ID: 802.11 BG scan config */ -#define HostCmd_CMD_802_11_BG_SCAN_CONFIG 0x006b +#define HostCmd_CMD_802_11_BG_SCAN_CONFIG 0x006b /** Host Command ID : 802.11 BG scan query */ #define HostCmd_CMD_802_11_BG_SCAN_QUERY 0x006c @@ -849,6 +913,28 @@ typedef enum _WLAN_802_11_WEP_STATUS { /** Host Command ID : Function shutdown */ #define HostCmd_CMD_FUNC_SHUTDOWN 0x00aa +/** Host Command ID: Multi chan config */ +#define HostCmd_CMD_MULTI_CHAN_CONFIG 0x011e +/** Host Command ID: Multi chan policy */ +#define HostCmd_CMD_MULTI_CHAN_POLICY 0x0121 +/** TLV ID for multi chan info */ +#define TLV_TYPE_MULTI_CHAN_INFO (PROPRIETARY_TLV_BASE_ID + 0xb7) +/** TLV ID for multi chan group info */ +#define TLV_TYPE_MULTI_CHAN_GROUP_INFO_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0xb8) + +#ifdef RX_PACKET_COALESCE +/** TLV ID for RX pkt coalesce config */ +#define TLV_TYPE_RX_PKT_COAL_CONFIG (PROPRIETARY_TLV_BASE_ID + 0xC9) +#endif + +/** Host Command ID : Channel report request */ +#define HostCmd_CMD_CHAN_REPORT_REQUEST 0x00dd + +/** Host Command ID: SUPPLICANT_PMK */ +#define HostCmd_CMD_SUPPLICANT_PMK 0x00c4 +/** Host Command ID: SUPPLICANT_PROFILE */ +#define HostCmd_CMD_SUPPLICANT_PROFILE 0x00c5 + /** Host Command ID : Add Block Ack Request */ #define HostCmd_CMD_11N_ADDBA_REQ 0x00ce /** Host Command ID : Delete a Block Ack Request */ @@ -860,13 +946,13 @@ typedef enum _WLAN_802_11_WEP_STATUS { /** Host Command ID: Configure Tx Buf size */ #define HostCmd_CMD_RECONFIGURE_TX_BUFF 0x00d9 /** Host Command ID: AMSDU Aggr Ctrl */ -#define HostCmd_CMD_AMSDU_AGGR_CTRL 0x00df +#define HostCmd_CMD_AMSDU_AGGR_CTRL 0x00df /** Host Command ID : 802.11 TX power configuration */ #define HostCmd_CMD_TXPWR_CFG 0x00d1 /** Host Command ID : Soft Reset */ -#define HostCmd_CMD_SOFT_RESET 0x00d5 +#define HostCmd_CMD_SOFT_RESET 0x00d5 /** Host Command ID : 802.11 b/g/n rate configration */ #define HostCmd_CMD_TX_RATE_CFG 0x00d6 @@ -886,7 +972,12 @@ typedef enum _WLAN_802_11_WEP_STATUS { /** Host Command ID : TDLS configuration */ #define HostCmd_CMD_TDLS_CONFIG 0x0100 /** Host Command ID : TDLS operation */ -#define HostCmd_CMD_TDLS_OPERATION 0x0122 +#define HostCmd_CMD_TDLS_OPERATION 0x0122 + +#ifdef RX_PACKET_COALESCE +/** Host Command ID : Rx packet coalescing configuration */ +#define HostCmd_CMD_RX_PKT_COALESCE_CFG 0x012c +#endif /** Host Command ID : Extended scan support */ #define HostCmd_CMD_802_11_SCAN_EXT 0x0107 @@ -924,7 +1015,7 @@ typedef enum _WLAN_802_11_WEP_STATUS { /** Host Command ID: P2P PARAMS CONFIG */ #define HOST_CMD_P2P_PARAMS_CONFIG 0x00ea /** Host Command ID: WIFI_DIRECT_MODE_CONFIG */ -#define HOST_CMD_WIFI_DIRECT_MODE_CONFIG 0x00eb +#define HOST_CMD_WIFI_DIRECT_MODE_CONFIG 0x00eb /** Host Command ID: Remain On Channel */ #define HostCmd_CMD_802_11_REMAIN_ON_CHANNEL 0x010d #endif @@ -938,7 +1029,10 @@ typedef enum _WLAN_802_11_WEP_STATUS { /** Host Command ID: reject addba request */ #define HostCmd_CMD_REJECT_ADDBA_REQ 0x0119 -#define HostCMD_CONFIG_LOW_POWER_MODE 0x0128 +#define HostCMD_CONFIG_LOW_POWER_MODE 0x0128 + +/** Host Command ID : Target device access */ +#define HostCmd_CMD_TARGET_ACCESS 0x012a /** Enhanced PS modes */ typedef enum _ENH_PS_MODES { @@ -1030,7 +1124,7 @@ typedef enum _ENH_PS_MODES { /** Buffer Constants */ /** Number of command buffers */ -#define MRVDRV_NUM_OF_CMD_BUFFER 15 +#define MRVDRV_NUM_OF_CMD_BUFFER 30 /** Size of command buffer */ #define MRVDRV_SIZE_OF_CMD_BUFFER (2 * 1024) @@ -1041,6 +1135,8 @@ typedef enum _ENH_PS_MODES { #define CMD_F_HOSTCMD (1 << 0) /** command cancel flag in command */ #define CMD_F_CANCELED (1 << 1) +/** scan command flag */ +#define CMD_F_SCAN (1 << 2) /** Host Command ID bit mask (bit 11:0) */ #define HostCmd_CMD_ID_MASK 0x0fff @@ -1098,13 +1194,23 @@ typedef enum _ENH_PS_MODES { /** Card Event definition : Ad-Hoc BCN lost */ #define EVENT_ADHOC_BCN_LOST 0x00000011 +/** Card Event definition : Stop Tx */ +#define EVENT_STOP_TX 0x00000013 +/** Card Event definition : Start Tx */ +#define EVENT_START_TX 0x00000014 +/** Card Event definition : Channel switch */ +#define EVENT_CHANNEL_SWITCH 0x00000015 + +/** Card Event definition : MEAS report ready */ +#define EVENT_MEAS_REPORT_RDY 0x00000016 + /** Card Event definition : WMM status change */ #define EVENT_WMM_STATUS_CHANGE 0x00000017 /** Card Event definition : BG scan report */ #define EVENT_BG_SCAN_REPORT 0x00000018 /** Card Event definition : BG scan stopped */ -#define EVENT_BG_SCAN_STOPPED 0x00000065 +#define EVENT_BG_SCAN_STOPPED 0x00000065 /** Card Event definition : Beacon RSSI low */ #define EVENT_RSSI_LOW 0x00000019 @@ -1169,6 +1275,15 @@ typedef enum _ENH_PS_MODES { /** TDLS generic event */ #define EVENT_TDLS_GENERIC_EVENT 0x00000052 +/** Card Event definition: Channel switch pending announcment */ +#define EVENT_CHANNEL_SWITCH_ANN 0x00000050 + +/** Event definition: Radar Detected by card */ +#define EVENT_RADAR_DETECTED 0x00000053 + +/** Event definition: Radar Detected by card */ +#define EVENT_CHANNEL_REPORT_RDY 0x00000054 + /** Event definition: Scan results through event */ #define EVENT_EXT_SCAN_REPORT 0x00000058 @@ -1200,6 +1315,14 @@ typedef enum _ENH_PS_MODES { /** Event ID: SAD Report */ #define EVENT_SAD_REPORT 0x00000066 +/** Event ID: Multi Chan Info*/ +#define EVENT_MULTI_CHAN_INFO 0x0000006a + +/** Event ID: Tx status */ +#define EVENT_TX_STATUS_REPORT 0x00000074 + +#define EVENT_BT_COEX_WLAN_PARA_CHANGE 0x00000076 + /** Event ID mask */ #define EVENT_ID_MASK 0xffff @@ -1217,7 +1340,7 @@ typedef enum _ENH_PS_MODES { /** event type for tdls setup failure */ #define TDLS_EVENT_TYPE_SETUP_FAILURE 1 /** event type for tdls setup request received */ -#define TDLS_EVENT_TYPE_SETUP_REQ 2 +#define TDLS_EVENT_TYPE_SETUP_REQ 2 /** event type for tdls link torn down */ #define TDLS_EVENT_TYPE_LINK_TORN_DOWN 3 /** event type for tdls link established */ @@ -1236,9 +1359,9 @@ typedef enum _ENH_PS_MODES { /** Packet received on direct link */ #define RXPD_FLAG_PKT_DIRECT_LINK 1 /** TDLS base channel */ -#define TDLS_BASE_CHANNEL 0 +#define TDLS_BASE_CHANNEL 0 /** TDLS off channel */ -#define TDLS_OFF_CHANNEL 1 +#define TDLS_OFF_CHANNEL 1 /** structure for channel switch result from TDLS FW */ typedef MLAN_PACK_START struct _chan_switch_result { @@ -1362,6 +1485,9 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_TDLS_Idle_Timeout_t { /** Bit mask for TxPD flags field for TDLS packet */ #define MRVDRV_TxPD_FLAGS_TDLS_PACKET MBIT(4) +/** Bit mask for TxPD flags field for Tx status report */ +#define MRVDRV_TxPD_FLAGS_TX_PACKET_STATUS MBIT(5) + /** Packet type: 802.11 */ #define PKT_TYPE_802DOT11 0x05 #define PKT_TYPE_MGMT_FRAME 0xE5 @@ -1391,10 +1517,15 @@ typedef MLAN_PACK_START struct _TxPD { t_u8 priority; /** Transmit Pkt Flags*/ t_u8 flags; - /** Amount of time the packet has been queued in the driver (units = 2ms)*/ + /** Amount of time the packet has been queued + * in the driver (units = 2ms)*/ t_u8 pkt_delay_2ms; /** Reserved */ - t_u8 reserved[5]; + t_u8 reserved1[2]; + /** Trasnit Pkt Token Id*/ + t_u8 tx_token_id; + /** reserverd */ + t_u8 reserved[2]; } MLAN_PACK_END TxPD, *PTxPD; /** RxPD Descriptor */ @@ -1427,8 +1558,7 @@ typedef MLAN_PACK_START struct _RxPD { t_u8 reserved[3]; /** TDLS flags, bit 0: 0=InfraLink, 1=DirectLink */ t_u8 flags; - /** Reserved */ - t_u8 reserved_1; + t_u8 antenna; } MLAN_PACK_END RxPD, *PRxPD; #ifdef UAP_SUPPORT @@ -1450,12 +1580,15 @@ typedef MLAN_PACK_START struct _UapTxPD { t_u8 priority; /** Transmit Pkt Flags*/ t_u8 flags; - /** Amount of time the packet has been queued in the driver (units = 2ms)*/ + /** Amount of time the packet has been queued + * in the driver (units = 2ms)*/ t_u8 pkt_delay_2ms; - /** Reserved */ - t_u8 reserved1; - /** Reserved */ - t_u32 reserved; + /** Reserved */ + t_u8 reserved1[2]; + /** Trasnit Pkt Token Id*/ + t_u8 tx_token_id; + /** reserverd */ + t_u8 reserved[2]; } MLAN_PACK_END UapTxPD, *PUapTxPD; /** RxPD Descriptor */ @@ -1474,8 +1607,17 @@ typedef MLAN_PACK_START struct _UapRxPD { t_u16 seq_num; /** Packet Priority */ t_u8 priority; - /** Reserved */ - t_u8 reserved; + /** Rx Packet Rate */ + t_u8 rx_rate; + /** SNR */ + t_s8 snr; + /** Noise Floor */ + t_s8 nf; + /** Ht Info [Bit 0] RxRate format: LG=0, HT=1 + * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1 + * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 */ + t_u8 ht_info; + t_u8 antenna; } MLAN_PACK_END UapRxPD, *PUapRxPD; /** Fixed size of station association event */ @@ -1829,6 +1971,23 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_AuthType_t { t_u16 auth_type; } MLAN_PACK_END MrvlIEtypes_AuthType_t; +/** MrvlIEtypes_ScanChanGap_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_ScanChanGap_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Time gap in units to TUs to be used between + * two consecutive channels scan */ + t_u16 gap; +} MLAN_PACK_END MrvlIEtypes_ScanChanGap_t; + +/** channel statictics tlv */ +typedef MLAN_PACK_START struct _MrvlIEtypes_ChannelStats_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** channel statictics */ + ChanStatistics_t chanStat[0]; +} MLAN_PACK_END MrvlIEtypes_ChannelStats_t; + /** MrvlIETypes_ActionFrame_t */ typedef MLAN_PACK_START struct { MrvlIEtypesHeader_t header; @@ -2066,11 +2225,45 @@ typedef MLAN_PACK_START struct _HostCmd_DS_GEN { t_u16 seq_num; /** Result */ t_u16 result; -} MLAN_PACK_END HostCmd_DS_GEN; +} MLAN_PACK_END HostCmd_DS_GEN +; /** Size of HostCmd_DS_GEN */ #define S_DS_GEN sizeof(HostCmd_DS_GEN) +/** Address type: broadcast */ +#define ADDR_TYPE_BROADCAST 1 +/* Address type: unicast */ +#define ADDR_TYPE_UNICAST 2 +/* Address type: multicast */ +#define ADDR_TYPE_MULTICAST 3 + +/** Ether type: any */ +#define ETHER_TYPE_ANY 0xffff +/** Ether type: ARP */ +#define ETHER_TYPE_ARP 0x0608 + +/** IPv4 address any */ +#define IPV4_ADDR_ANY 0xffffffff + +/** Header structure for ARP filter */ +typedef MLAN_PACK_START struct _arpfilter_header { + /** Type */ + t_u16 type; + /** TLV length */ + t_u16 len; +} MLAN_PACK_END arpfilter_header; + +/** Filter entry structure */ +typedef MLAN_PACK_START struct _filter_entry { + /** Address type */ + t_u16 addr_type; + /** Ether type */ + t_u16 eth_type; + /** IPv4 address */ + t_u32 ipv4_addr; +} MLAN_PACK_END filter_entry; + typedef MLAN_PACK_START struct _HostCmd_DS_MEF_CFG { /** Criteria */ t_u32 criteria; @@ -2600,6 +2793,7 @@ typedef enum _SNMP_MIB_INDEX { Dot11H_i = 10, WwsMode_i = 17, Thermal_i = 34, + NullPktPeriod_i = 37, } SNMP_MIB_INDEX; /** max SNMP buf size */ @@ -2725,14 +2919,14 @@ typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RF_TX_POWER { } MLAN_PACK_END HostCmd_DS_802_11_RF_TX_POWER; /** Connection type infra */ -#define CONNECTION_TYPE_INFRA 0 +#define CONNECTION_TYPE_INFRA 0 /** Connection type adhoc */ -#define CONNECTION_TYPE_ADHOC 1 +#define CONNECTION_TYPE_ADHOC 1 #ifdef WIFI_DIRECT_SUPPORT /** BSS Mode: WIFIDIRECT Client */ -#define BSS_MODE_WIFIDIRECT_CLIENT 0 +#define BSS_MODE_WIFIDIRECT_CLIENT 0 /** BSS Mode: WIFIDIRECT GO */ -#define BSS_MODE_WIFIDIRECT_GO 2 +#define BSS_MODE_WIFIDIRECT_GO 2 #endif /** HostCmd_DS_SET_BSS_MODE */ typedef MLAN_PACK_START struct _HostCmd_DS_SET_BSS_MODE { @@ -3214,8 +3408,7 @@ typedef MLAN_PACK_START struct { * MAX_AC_QUEUES]; /** WMM parameter TLV */ t_u8 wmm_param_tlv[sizeof(IEEEtypes_WmmParameter_t) + 2]; -} -MLAN_PACK_END HostCmd_DS_WMM_GET_STATUS; +} MLAN_PACK_END HostCmd_DS_WMM_GET_STATUS; /** * @brief Command structure for the HostCmd_CMD_WMM_ADDTS_REQ firmware command @@ -3332,6 +3525,16 @@ typedef MLAN_PACK_START struct { t_u8 flow_created; } MLAN_PACK_END WmmAcStatus_t; +/** Local Power Capability */ +typedef MLAN_PACK_START struct _MrvlIEtypes_PowerCapability_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Minmum power */ + t_s8 min_power; + /** Maximum power */ + t_s8 max_power; +} MLAN_PACK_END MrvlIEtypes_PowerCapability_t; + /** HT Capabilities element */ typedef MLAN_PACK_START struct _MrvlIETypes_HTCap_t { /** Header */ @@ -3404,6 +3607,118 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_psk_t { } MLAN_PACK_END MrvlIEtypes_psk_t; #endif /* WIFI_DIRECT_SUPPORT */ +/** MrvlIEtypes_PMK_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_PMK_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** PMK */ + t_u8 pmk[1]; +} MLAN_PACK_END MrvlIEtypes_PMK_t; + +/** MrvlIEtypes_Passphrase_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_Passphrase_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Passphrase */ + char passphrase[1]; +} MLAN_PACK_END MrvlIEtypes_Passphrase_t; + +/* unicastCipher - + * Bit 0 : RFU + * Bit 1 : RFU + * Bit 2 : TKIP + * Bit 3 : AES CCKM + * Bit 2-7 : RFU + * multicastCipher - + * Bit 0 : WEP40 + * Bit 1 : WEP104 + * Bit 2 : TKIP + * Bit 3 : AES + * Bit 4-7 : Reserved for now + */ +/** MrvlIEtypes_Cipher_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_Cipher_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** PairCipher */ + t_u8 pair_cipher; + /** GroupCipher */ + t_u8 group_cipher; +} MLAN_PACK_END MrvlIEtypes_Cipher_t; + +/* rsnMode - + * Bit 0 : No RSN + * Bit 1-2 : RFU + * Bit 3 : WPA + * Bit 4 : WPA-NONE + * Bit 5 : WPA2 + * Bit 6 : AES CCKM + * Bit 7-15 : RFU + */ +/** MrvlIEtypes_EncrProto_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_EncrProto_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** EncrProto */ + t_u16 rsn_mode; +} MLAN_PACK_END MrvlIEtypes_EncrProto_t; + +/** MrvlIEtypes_Bssid_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_Bssid_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Bssid */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; +} MLAN_PACK_END MrvlIEtypes_Bssid_t; + +/** Data structure for Link ID */ +typedef MLAN_PACK_START struct _MrvlIETypes_LinkIDElement_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Bssid */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; + /** initial sta address*/ + t_u8 init_sta[MLAN_MAC_ADDR_LENGTH]; + /** respose sta address */ + t_u8 resp_sta[MLAN_MAC_ADDR_LENGTH]; +} MLAN_PACK_END MrvlIETypes_LinkIDElement_t; + +/* + * This struct will handle GET,SET,CLEAR function for embedded + * supplicant. + * Define data structure for HostCmd_CMD_802_11_SUPPLICANT_PMK + */ +/** HostCmd_DS_802_11_SUPPLICANT_PMK */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SUPPLICANT_PMK { + /** CMD Action GET/SET/CLEAR */ + t_u16 action; + /** CacheResult initialized to 0 */ + t_u16 cache_result; + /** TLV Buffer */ + t_u8 tlv_buffer[1]; + /** MrvlIEtypes_SsidParamSet_t SsidParamSet; + * MrvlIEtypes_PMK_t Pmk; + * MrvlIEtypes_Passphrase_t Passphrase; + * MrvlIEtypes_Bssid_t Bssid; + **/ +} MLAN_PACK_END HostCmd_DS_802_11_SUPPLICANT_PMK; + +/* + * This struct will GET the Supplicant supported bitmaps + * The GET_CURRENT action will get the network profile used + * for the current assocation. + * Define data structure for HostCmd_CMD_802_11_SUPPLICANT_PROFILE + */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SUPPLICANT_PROFILE { + /** GET/SET/GET_CURRENT */ + t_u16 action; + /** Reserved */ + t_u16 reserved; + /** TLVBuffer */ + t_u8 tlv_buf[1]; + /* MrvlIEtypes_EncrProto_t */ +} MLAN_PACK_END HostCmd_DS_802_11_SUPPLICANT_PROFILE; + /** HostCmd_CMD_802_11_RF_CHANNEL */ typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RF_CHANNEL { /** Action */ @@ -3544,6 +3859,18 @@ typedef MLAN_PACK_START struct _HostCmd_DS_MEM_ACCESS { t_u32 value; } MLAN_PACK_END HostCmd_DS_MEM_ACCESS; +/** HostCmd_DS_TARGET_ACCESS */ +typedef MLAN_PACK_START struct _HostCmd_DS_TARGET_ACCESS { + /** Action */ + t_u16 action; + /** CSU Target Device. 1: CSU, 2: PSU */ + t_u16 csu_target; + /** Target Device Address */ + t_u16 address; + /** Data */ + t_u8 data; +} MLAN_PACK_END HostCmd_DS_TARGET_ACCESS; + /** HostCmd_DS_SUBSCRIBE_EVENT */ typedef MLAN_PACK_START struct _HostCmd_DS_SUBSCRIBE_EVENT { /** Action */ @@ -3708,14 +4035,11 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_MacAddr_t { /** TLV ID : Management Frame */ #define TLV_TYPE_UAP_MGMT_FRAME\ (PROPRIETARY_TLV_BASE_ID + 0x68) /* 0x0168 */ -#ifdef UAP_SUPPORT + /**TLV type: AP mgmt IE passthru mask */ #define TLV_TYPE_UAP_MGMT_IE_PASSTHRU_MASK\ (PROPRIETARY_TLV_BASE_ID + 0x70) /* 0x0170 */ -#endif -/** TLV : 20/40 coex config */ -#define TLV_TYPE_2040_BSS_COEX_CONTROL\ - (PROPRIETARY_TLV_BASE_ID + 0x98) /* 0x0198 */ + /**TLV type: AP pairwise handshake timeout */ #define TLV_TYPE_UAP_EAPOL_PWK_HSK_TIMEOUT\ (PROPRIETARY_TLV_BASE_ID + 0x75) /* 0x0175 */ @@ -3741,15 +4065,6 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_MacAddr_t { #define TLV_TYPE_BSS_STATUS\ (PROPRIETARY_TLV_BASE_ID + 0x93) /* 0x0193 */ -#ifdef WIFI_DIRECT_SUPPORT -/** TLV type : AP PSK */ -#define TLV_TYPE_UAP_PSK (PROPRIETARY_TLV_BASE_ID + 0xa8) /* 0x01a8 */ -/** TLV type : p2p NOA */ -#define TLV_TYPE_WIFI_DIRECT_NOA (PROPRIETARY_TLV_BASE_ID + 0x83) -/** TLV type : p2p opp ps */ -#define TLV_TYPE_WIFI_DIRECT_OPP_PS (PROPRIETARY_TLV_BASE_ID + 0x84) -#endif /* WIFI_DIRECT_SUPPORT */ - /** MrvlIEtypes_beacon_period_t */ typedef MLAN_PACK_START struct _MrvlIEtypes_beacon_period_t { /** Header */ @@ -3888,7 +4203,6 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_eapol_gwk_hsk_retries_t { t_u32 gwk_retries; } MLAN_PACK_END MrvlIEtypes_eapol_gwk_hsk_retries_t; -#ifdef UAP_SUPPORT /** MrvlIEtypes_mgmt_ie_passthru_t */ typedef MLAN_PACK_START struct _MrvlIEtypes_mgmt_ie_passthru_t { /** Header */ @@ -3896,15 +4210,6 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_mgmt_ie_passthru_t { /** mgmt IE mask value */ t_u32 mgmt_ie_mask; } MLAN_PACK_END MrvlIEtypes_mgmt_ie_passthru_t; -#endif - -/** TLV buffer : 2040 coex config */ -typedef MLAN_PACK_START struct _MrvlIEtypes_2040_coex_enable_t { - /** Header */ - MrvlIEtypesHeader_t header; - /** Enable */ - t_u8 enable_2040coex; -} MLAN_PACK_END MrvlIEtypes_2040_coex_enable_t; /** MrvlIEtypes_mac_filter_t */ typedef MLAN_PACK_START struct _MrvlIEtypes_mac_filter_t { @@ -4203,12 +4508,391 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_wapi_info_t { } MLAN_PACK_END MrvlIEtypes_wapi_info_t; #endif /* UAP_SUPPORT */ +/** TLV buffer : 2040 coex config */ +typedef MLAN_PACK_START struct _MrvlIEtypes_2040_coex_enable_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Enable */ + t_u8 enable_2040coex; +} MLAN_PACK_END MrvlIEtypes_2040_coex_enable_t; + +/**BT coexit scan time setting*/ +typedef MLAN_PACK_START struct _MrvlIEtypes_BtCoexScanTime_t { + /** Header */ + MrvlIEtypesHeader_t header; + /**coex scan state 0: disable 1: enable*/ + t_u8 coex_scan; + /**reserved*/ + t_u8 reserved; + /**min scan time*/ + t_u16 min_scan_time; + /**max scan time*/ + t_u16 max_scan_time; +} MLAN_PACK_END MrvlIEtypes_BtCoexScanTime_t; + +/**BT coexit aggr win size */ +typedef MLAN_PACK_START struct _MrvlIETypes_BtCoexAggrWinSize_t { + /** Header */ + MrvlIEtypesHeader_t header; + /**winsize 0: restore default winsize, 1: use below winsize */ + t_u8 coex_win_size; + /**tx win size*/ + t_u8 tx_win_size; + /**rx win size*/ + t_u8 rx_win_size; + /**reserved*/ + t_u8 reserved; +} MLAN_PACK_END MrvlIETypes_BtCoexAggrWinSize_t; + +#ifdef RX_PACKET_COALESCE +typedef MLAN_PACK_START struct _HostCmd_DS_RX_PKT_COAL_CFG { + /** Action */ + t_u16 action; + /** Packet threshold */ + t_u32 packet_threshold; + /** Timeout */ + t_u16 delay; +} MLAN_PACK_END HostCmd_DS_RX_PKT_COAL_CFG; +#endif + +typedef MLAN_PACK_START struct _HostCmd_DS_MULTI_CHAN_CFG { + /** Action */ + t_u16 action; + /** Channel time */ + t_u32 channel_time; + /** Buffer weight */ + t_u8 buffer_weight; + /** TLV buffer */ + t_u8 tlv_buf[0]; + /* t_u8 *tlv_buf; */ +} MLAN_PACK_END HostCmd_DS_MULTI_CHAN_CFG; + +typedef MLAN_PACK_START struct _HostCmd_DS_MULTI_CHAN_POLICY { + /** Action */ + t_u16 action; + /** Multi-channel Policy */ + t_u16 policy; +} MLAN_PACK_END HostCmd_DS_MULTI_CHAN_POLICY; + +/** Channel band info */ +typedef MLAN_PACK_START struct _ChannelBandInfo { + /* band config */ + t_u8 band_config; + /** channel num for specificed band */ + t_u8 chan_num; +} MLAN_PACK_END ChannelBandInfo; + +/** MrvlIETypes_mutli_chan_group_info_t */ +typedef MLAN_PACK_START struct _MrvlIETypes_mutli_chan_group_info_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** channel group id */ + t_u8 chan_group_id; + /** buffer weight for this channel group */ + t_u8 chan_buff_weight; + /** channel number and band information */ + ChannelBandInfo chan_band_info; + /** Max channel time (us) */ + t_u32 channel_time; + /** Reserved */ + t_u32 reserved; + MLAN_PACK_START union { + t_u8 sdio_func_num; + t_u8 usb_epnum; + } MLAN_PACK_END hid_num; + /** interface number in this group */ + t_u8 num_intf; + /** bss_type list */ + t_u8 bss_type_numlist[0]; +} MLAN_PACK_END MrvlIEtypes_multi_chan_group_info_t; + +/** MrvlIEtypes_multi_chan_info_t */ +typedef MLAN_PACK_START struct _MrvlIETypes_mutli_chan_info_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** multi channel operation status */ + t_u16 status; + /** Tlv buffer */ + t_u8 tlv_buffer[0]; +} MLAN_PACK_END MrvlIEtypes_multi_chan_info_t; + /** HostCmd_CONFIG_LOW_PWR_MODE */ typedef MLAN_PACK_START struct _HostCmd_CONFIG_LOW_PWR_MODE { /** Enable LPM */ t_u8 enable; } MLAN_PACK_END HostCmd_CONFIG_LOW_PWR_MODE; +/** + * @brief 802.11h Local Power Constraint Marvell extended TLV + */ +typedef MLAN_PACK_START struct { + MrvlIEtypesHeader_t header; + /**< Marvell TLV header: ID/Len */ + t_u8 chan; /**< Channel local constraint applies to */ + + /** Power constraint included in beacons + * and used by fw to offset 11d info + */ + t_u8 constraint; + +} MLAN_PACK_END MrvlIEtypes_LocalPowerConstraint_t; + +/* + * + * Data structures for driver/firmware command processing + * + */ + +/** TPC Info structure sent in CMD_802_11_TPC_INFO command to firmware */ +typedef MLAN_PACK_START struct { + /**< Local constraint */ + MrvlIEtypes_LocalPowerConstraint_t local_constraint; + /**< Power Capability */ + MrvlIEtypes_PowerCapability_t power_cap; + +} MLAN_PACK_END HostCmd_DS_802_11_TPC_INFO; + +/** TPC Request structure sent in CMD_802_11_TPC_ADAPT_REQ + * command to firmware + */ +typedef MLAN_PACK_START struct { + t_u8 dest_mac[MLAN_MAC_ADDR_LENGTH]; /**< Destination STA address */ + t_u16 timeout; /**< Response timeout in ms */ + t_u8 rate_index; /**< IEEE Rate index to send request */ + +} MLAN_PACK_END HostCmd_TpcRequest; + +/** TPC Response structure received from the + * CMD_802_11_TPC_ADAPT_REQ command + */ +typedef MLAN_PACK_START struct { + t_u8 tpc_ret_code; + /**< Firmware command result status code */ + t_s8 tx_power; /**< Reported TX Power from the TPC Report element */ + t_s8 link_margin; + /**< Reported link margin from the TPC Report element */ + t_s8 rssi; /**< RSSI of the received TPC Report frame */ + +} MLAN_PACK_END HostCmd_TpcResponse; + +/** CMD_802_11_TPC_ADAPT_REQ substruct. + * Union of the TPC request and response + */ +typedef MLAN_PACK_START union { + HostCmd_TpcRequest req; + /**< Request struct sent to firmware */ + HostCmd_TpcResponse resp; + /**< Response struct received from firmware */ + +} MLAN_PACK_END HostCmd_DS_802_11_TPC_ADAPT_REQ; + +/** CMD_802_11_CHAN_SW_ANN firmware command substructure */ +typedef MLAN_PACK_START struct { + t_u8 switch_mode; + /**< Set to 1 for a quiet switch request, no STA tx */ + t_u8 new_chan; /**< Requested new channel */ + t_u8 switch_count; + /**< Number of TBTTs until the switch is to occur */ +} MLAN_PACK_END HostCmd_DS_802_11_CHAN_SW_ANN; + +/** + * @brief Enumeration of measurement types, including max supported + * enum for 11h/11k + */ +typedef MLAN_PACK_START enum _MeasType_t { + WLAN_MEAS_BASIC = 0, /**< 11h: Basic */ + WLAN_MEAS_NUM_TYPES, /**< Number of enumerated measurements */ + WLAN_MEAS_11H_MAX_TYPE = WLAN_MEAS_BASIC, /**< Max 11h measurement */ + +} MLAN_PACK_END MeasType_t; + +/** + * @brief Mode octet of the measurement request element (7.3.2.21) + */ +typedef MLAN_PACK_START struct { +#ifdef BIG_ENDIAN_SUPPORT + /**< Reserved */ + t_u8 rsvd5_7:3; + /**< 11k: duration spec. for meas. is mandatory */ + t_u8 duration_mandatory:1; + /**< 11h: en/disable report rcpt. of spec. type */ + t_u8 report:1; + /**< 11h: en/disable requests of specified type */ + t_u8 request:1; + /**< 11h: enable report/request bits */ + t_u8 enable:1; + /**< 11k: series or parallel with previous meas */ + t_u8 parallel:1; +#else + /**< 11k: series or parallel with previous meas */ + t_u8 parallel:1; + /**< 11h: enable report/request bits */ + t_u8 enable:1; + /**< 11h: en/disable requests of specified type */ + t_u8 request:1; + /**< 11h: en/disable report rcpt. of spec. type */ + t_u8 report:1; + /**< 11k: duration spec. for meas. is mandatory */ + t_u8 duration_mandatory:1; + /**< Reserved */ + t_u8 rsvd5_7:3; +#endif /* BIG_ENDIAN_SUPPORT */ + +} MLAN_PACK_END MeasReqMode_t; + +/** + * @brief Common measurement request structure (7.3.2.21.1 to 7.3.2.21.3) + */ +typedef MLAN_PACK_START struct { + t_u8 channel; /**< Channel to measure */ + t_u64 start_time; + /**< TSF Start time of measurement (0 for immediate) */ + t_u16 duration;/**< TU duration of the measurement */ + +} MLAN_PACK_END MeasReqCommonFormat_t; + +/** + * @brief Basic measurement request structure (7.3.2.21.1) + */ +typedef MeasReqCommonFormat_t MeasReqBasic_t; + +/** + * @brief CCA measurement request structure (7.3.2.21.2) + */ +typedef MeasReqCommonFormat_t MeasReqCCA_t; + +/** + * @brief RPI measurement request structure (7.3.2.21.3) + */ +typedef MeasReqCommonFormat_t MeasReqRPI_t; + +/** + * @brief Union of the availble measurement request types. Passed in the + * driver/firmware interface. + */ +typedef union { + MeasReqBasic_t basic; + /**< Basic measurement request */ + MeasReqCCA_t cca; /**< CCA measurement request */ + MeasReqRPI_t rpi; /**< RPI measurement request */ + +} MeasRequest_t; + +/** + * @brief Mode octet of the measurement report element (7.3.2.22) + */ +typedef MLAN_PACK_START struct { +#ifdef BIG_ENDIAN_SUPPORT + t_u8 rsvd3_7:5; /**< Reserved */ + t_u8 refused:1; /**< Measurement refused */ + t_u8 incapable:1; /**< Incapable of performing measurement */ + t_u8 late:1; /**< Start TSF time missed for measurement */ +#else + t_u8 late:1; /**< Start TSF time missed for measurement */ + t_u8 incapable:1; /**< Incapable of performing measurement */ + t_u8 refused:1; /**< Measurement refused */ + t_u8 rsvd3_7:5; /**< Reserved */ +#endif /* BIG_ENDIAN_SUPPORT */ + +} MLAN_PACK_END MeasRptMode_t; + +/** + * @brief Basic measurement report (7.3.2.22.1) + */ +typedef MLAN_PACK_START struct { + t_u8 channel; /**< Channel to measured */ + t_u64 start_time; /**< Start time (TSF) of measurement */ + t_u16 duration; /**< Duration of measurement in TUs */ + MeasRptBasicMap_t map; /**< Basic measurement report */ + +} MLAN_PACK_END MeasRptBasic_t; + +/** + * @brief CCA measurement report (7.3.2.22.2) + */ +typedef MLAN_PACK_START struct { + t_u8 channel; /**< Channel to measured */ + t_u64 start_time; /**< Start time (TSF) of measurement */ + t_u16 duration; /**< Duration of measurement in TUs */ + t_u8 busy_fraction; /**< Fractional duration CCA indicated chan busy */ + +} MLAN_PACK_END MeasRptCCA_t; + +/** + * @brief RPI measurement report (7.3.2.22.3) + */ +typedef MLAN_PACK_START struct { + t_u8 channel; /**< Channel to measured */ + t_u64 start_time; /**< Start time (TSF) of measurement */ + t_u16 duration; /**< Duration of measurement in TUs */ + t_u8 density[8]; /**< RPI Density histogram report */ + +} MLAN_PACK_END MeasRptRPI_t; + +/** + * @brief Union of the availble measurement report types. Passed in the + * driver/firmware interface. + */ +typedef union { + MeasRptBasic_t basic;/**< Basic measurement report */ + MeasRptCCA_t cca; /**< CCA measurement report */ + MeasRptRPI_t rpi; /**< RPI measurement report */ + +} MeasReport_t; + +/** + * @brief Structure passed to firmware to perform a measurement + */ +typedef MLAN_PACK_START struct { + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; /**< Reporting STA address */ + t_u8 dialog_token; /**< Measurement dialog toke */ + MeasReqMode_t req_mode; /**< Report mode */ + MeasType_t meas_type; /**< Measurement type */ + MeasRequest_t req; /**< Measurement request data */ + +} MLAN_PACK_END HostCmd_DS_MEASUREMENT_REQUEST; + +/** + * @brief Structure passed back from firmware with a measurement report, + * also can be to send a measurement report to another STA + */ +typedef MLAN_PACK_START struct { + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; /**< Reporting STA address */ + t_u8 dialog_token; /**< Measurement dialog token */ + MeasRptMode_t rpt_mode; /**< Report mode */ + MeasType_t meas_type; /**< Measurement type */ + MeasReport_t rpt; /**< Measurement report data */ + +} MLAN_PACK_END HostCmd_DS_MEASUREMENT_REPORT; + +typedef MLAN_PACK_START struct { + t_u16 startFreq; + t_u8 chanWidth; + t_u8 chanNum; + +} MLAN_PACK_END MrvlChannelDesc_t; + +typedef MLAN_PACK_START struct { + MrvlIEtypesHeader_t Header; /**< Header */ + + MeasRptBasicMap_t map; /**< IEEE 802.11h basic meas report */ +} MLAN_PACK_END MrvlIEtypes_ChanRpt11hBasic_t; + +typedef MLAN_PACK_START struct { + MrvlChannelDesc_t chan_desc; + /**< Channel band, number */ + t_u32 millisec_dwell_time; + /**< Channel dwell time in milliseconds */ +} MLAN_PACK_END HostCmd_DS_CHAN_RPT_REQ; + +typedef MLAN_PACK_START struct { + t_u32 cmd_result; /**< Rpt request command result (0 == SUCCESS) */ + t_u64 start_tsf; /**< TSF Measurement started */ + t_u32 duration; /**< Duration of measurement in microsecs */ + t_u8 tlv_buffer[1]; + /**< TLV Buffer */ +} MLAN_PACK_END HostCmd_DS_CHAN_RPT_RSP; + /** statistics threshold */ typedef MLAN_PACK_START struct { /** Header */ @@ -4328,6 +5012,12 @@ typedef struct MLAN_PACK_START _HostCmd_DS_COMMAND { HostCmd_DS_802_11D_DOMAIN_INFO domain_info; /** Domain information response */ HostCmd_DS_802_11D_DOMAIN_INFO_RSP domain_info_resp; + HostCmd_DS_802_11_TPC_ADAPT_REQ tpc_req; + HostCmd_DS_802_11_TPC_INFO tpc_info; + HostCmd_DS_802_11_CHAN_SW_ANN chan_sw_ann; + HostCmd_DS_CHAN_RPT_REQ chan_rpt_req; + HostCmd_DS_MEASUREMENT_REQUEST meas_req; + HostCmd_DS_MEASUREMENT_REPORT meas_rpt; /** Add BA request */ HostCmd_DS_11N_ADDBA_REQ add_ba_req; /** Add BA response */ @@ -4356,6 +5046,10 @@ typedef struct MLAN_PACK_START _HostCmd_DS_COMMAND { HostCmd_DS_WMM_TS_STATUS ts_status; /** Key material */ HostCmd_DS_802_11_KEY_MATERIAL key_material; + /** E-Supplicant PSK */ + HostCmd_DS_802_11_SUPPLICANT_PMK esupplicant_psk; + /** E-Supplicant profile */ + HostCmd_DS_802_11_SUPPLICANT_PROFILE esupplicant_profile; /** Extended version */ HostCmd_DS_VERSION_EXT verext; /** Adhoc Coalescing */ @@ -4378,6 +5072,8 @@ typedef struct MLAN_PACK_START _HostCmd_DS_COMMAND { HostCmd_DS_802_11_EEPROM_ACCESS eeprom; /** Memory access */ HostCmd_DS_MEM_ACCESS mem; + /** Target device access */ + HostCmd_DS_TARGET_ACCESS target; /** Inactivity timeout extend */ HostCmd_DS_INACTIVITY_TIMEOUT_EXT inactivity_to; @@ -4406,7 +5102,12 @@ typedef struct MLAN_PACK_START _HostCmd_DS_COMMAND { HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG p2p_params_config; #endif HostCmd_DS_HS_WAKEUP_REASON hs_wakeup_reason; + HostCmd_DS_MULTI_CHAN_CFG multi_chan_cfg; + HostCmd_DS_MULTI_CHAN_POLICY multi_chan_policy; HostCmd_CONFIG_LOW_PWR_MODE low_pwr_mode_cfg; +#ifdef RX_PACKET_COALESCE + HostCmd_DS_RX_PKT_COAL_CFG rx_pkt_coal_cfg; +#endif } params; } MLAN_PACK_END HostCmd_DS_COMMAND; diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_ieee.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_ieee.h old mode 100755 new mode 100644 index c812162c..ec73e61f --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_ieee.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_ieee.h @@ -78,12 +78,22 @@ typedef MLAN_PACK_START enum _IEEEtypes_ElementId_e { COUNTRY_INFO = 7, #endif /* STA_SUPPORT */ + POWER_CONSTRAINT = 32, + POWER_CAPABILITY = 33, + TPC_REQUEST = 34, + TPC_REPORT = 35, + CHANNEL_SWITCH_ANN = 37, + QUIET = 40, + IBSS_DFS = 41, + SUPPORTED_CHANNELS = 36, + REGULATORY_CLASS = 59, HT_CAPABILITY = 45, QOS_INFO = 46, HT_OPERATION = 61, BSSCO_2040 = 72, OVERLAPBSSSCANPARAM = 74, EXT_CAPABILITY = 127, + LINK_ID = 101, ERP_INFO = 42, @@ -130,8 +140,7 @@ typedef MLAN_PACK_START struct _IEEEtypes_VendorSpecific_t { IEEEtypes_VendorHeader_t vend_hdr; /** IE Max - size of previous fields */ t_u8 data[IEEE_MAX_IE_SIZE - sizeof(IEEEtypes_VendorHeader_t)]; -} -MLAN_PACK_END IEEEtypes_VendorSpecific_t, *pIEEEtypes_VendorSpecific_t; +} MLAN_PACK_END IEEEtypes_VendorSpecific_t, *pIEEEtypes_VendorSpecific_t; /** IEEE IE */ typedef MLAN_PACK_START struct _IEEEtypes_Generic_t { @@ -139,8 +148,7 @@ typedef MLAN_PACK_START struct _IEEEtypes_Generic_t { IEEEtypes_Header_t ieee_hdr; /** IE Max - size of previous fields */ t_u8 data[IEEE_MAX_IE_SIZE - sizeof(IEEEtypes_Header_t)]; -} -MLAN_PACK_END IEEEtypes_Generic_t, *pIEEEtypes_Generic_t; +} MLAN_PACK_END IEEEtypes_Generic_t, *pIEEEtypes_Generic_t; /** TLV header */ typedef MLAN_PACK_START struct _TLV_Generic_t { @@ -151,8 +159,8 @@ typedef MLAN_PACK_START struct _TLV_Generic_t { } MLAN_PACK_END TLV_Generic_t, *pTLV_Generic_t; /** Capability information mask */ -#define CAPINFO_MASK (~(MBIT(15) | MBIT(14) | \ - MBIT(12) | MBIT(11) | MBIT(9))) +#define CAPINFO_MASK \ +(~(MBIT(15) | MBIT(14) | MBIT(12) | MBIT(11) | MBIT(9))) /** Capability Bit Map*/ #ifdef BIG_ENDIAN_SUPPORT @@ -315,9 +323,21 @@ typedef t_u8 WLAN_802_11_RATES[WLAN_SUPPORTED_RATES]; /** AKM: 8021x */ #define RSN_AKM_8021X 1 /** AKM: PSK */ -#define RSN_AKM_PSK 2 +#define RSN_AKM_PSK 2 /** AKM: PSK SHA256 */ #define RSN_AKM_PSK_SHA256 6 +#if defined(STA_SUPPORT) +/** Pairwise Cipher Suite length */ +#define PAIRWISE_CIPHER_SUITE_LEN 4 +/** AKM Suite length */ +#define AKM_SUITE_LEN 4 +/** MFPC bit in RSN capability */ +#define MFPC_BIT 7 +/** MFPR bit in RSN capability */ +#define MFPR_BIT 6 +/** PMF ORing mask */ +#define PMF_MASK 0x00c0 +#endif /** wpa_suite_t */ typedef MLAN_PACK_START struct _wpa_suite_t { @@ -722,6 +742,20 @@ typedef MLAN_PACK_START struct _IEEEtypes_CountryInfoFullSet_t { #endif /* STA_SUPPORT */ +/** Data structure for Link ID */ +typedef MLAN_PACK_START struct _IEEEtypes_LinkIDElement_t { + /** Element ID */ + t_u8 element_id; + /** Length */ + t_u8 len; + /** bssid */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; + /** initial sta address */ + t_u8 init_sta[MLAN_MAC_ADDR_LENGTH]; + /** respose sta address */ + t_u8 resp_sta[MLAN_MAC_ADDR_LENGTH]; +} MLAN_PACK_END IEEEtypes_LinkIDElement_t, *pIEEEtypes_LinkIDElement_t; + /** HT Capabilities Data */ typedef struct MLAN_PACK_START _HTCap_t { /** HT Capabilities Info field */ @@ -957,8 +991,183 @@ typedef MLAN_PACK_START struct _IEEEtypes_OverlapBSSScanParam_t { } MLAN_PACK_END IEEEtypes_OverlapBSSScanParam_t, *pIEEEtypes_OverlapBSSScanParam_t; +/** Maximum number of subbands in the IEEEtypes_SupportedChannels_t structure */ +#define WLAN_11H_MAX_SUBBANDS 5 + +/** Maximum number of DFS channels configured in IEEEtypes_IBSS_DFS_t */ +#define WLAN_11H_MAX_IBSS_DFS_CHANNELS 25 + +/** IEEE Power Constraint element (7.3.2.15) */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 32 */ + t_u8 len; /**< Element length after id and len */ + t_u8 local_constraint; + /**< Local power constraint applied to 11d + chan info */ +} MLAN_PACK_END IEEEtypes_PowerConstraint_t; + +/** IEEE Power Capability element (7.3.2.16) */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 33 */ + t_u8 len; /**< Element length after id and len */ + t_s8 min_tx_power_capability; + /**< Minimum Transmit power (dBm) */ + t_s8 max_tx_power_capability; + /**< Maximum Transmit power (dBm) */ +} MLAN_PACK_END IEEEtypes_PowerCapability_t; + +/** IEEE TPC Report element (7.3.2.18) */ +typedef MLAN_PACK_START struct { + t_u8 element_id;/**< IEEE Element ID = 35 */ + t_u8 len; /**< Element length after id and len */ + t_s8 tx_power; /**< Max power used to transmit the TPC Report frame (dBm) */ + t_s8 link_margin; + /**< Link margin when TPC Request received (dB) */ +} MLAN_PACK_END IEEEtypes_TPCReport_t; + +/* IEEE Supported Channel sub-band description (7.3.2.19) */ +/** + * Sub-band description used in the supported channels element. + */ +typedef MLAN_PACK_START struct { + t_u8 start_chan;/**< Starting channel in the subband */ + t_u8 num_chans; /**< Number of channels in the subband */ + +} MLAN_PACK_END IEEEtypes_SupportChan_Subband_t; + +/* IEEE Supported Channel element (7.3.2.19) */ +/** + * Sent in association requests. Details the sub-bands and number + * of channels supported in each subband + */ +typedef MLAN_PACK_START struct { + t_u8 element_id;/**< IEEE Element ID = 36 */ + t_u8 len; /**< Element length after id and len */ + + /** Configured sub-bands information in the element */ + IEEEtypes_SupportChan_Subband_t subband[WLAN_11H_MAX_SUBBANDS]; + +} MLAN_PACK_END IEEEtypes_SupportedChannels_t; + +/* IEEE Channel Switch Announcement Element (7.3.2.20) */ +/** + * Provided in beacons and probe responses. Used to advertise when + * and to which channel it is changing to. Only starting STAs in + * an IBSS and APs are allowed to originate a chan switch element. + */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 37 */ + t_u8 len; /**< Element length after id and len */ + t_u8 chan_switch_mode; /**< STA should not transmit any frames if 1 */ + t_u8 new_channel_num; /**< Channel # that AP/IBSS is moving to */ + t_u8 chan_switch_count; /**< # of TBTTs before channel switch */ + +} MLAN_PACK_END IEEEtypes_ChanSwitchAnn_t; + +/* IEEE Quiet Period Element (7.3.2.23) */ +/** + * Provided in beacons and probe responses. Indicates times during + * which the STA should not be transmitting data. Only starting STAs in + * an IBSS and APs are allowed to originate a quiet element. + */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 40 */ + t_u8 len; /**< Element length after id and len */ + t_u8 quiet_count; /**< Number of TBTTs until beacon with the quiet period */ + t_u8 quiet_period; /**< Regular quiet period, # of TBTTS between periods */ + t_u16 quiet_duration; + /**< Duration of the quiet period in TUs */ + t_u16 quiet_offset; /**< Offset in TUs from the TBTT for the quiet period */ + +} MLAN_PACK_END IEEEtypes_Quiet_t; + +/** +*** @brief Map octet of the basic measurement report (7.3.2.22.1) +**/ +typedef MLAN_PACK_START struct { +#ifdef BIG_ENDIAN_SUPPORT + /**< Reserved */ + t_u8 rsvd5_7:3; + /**< Channel is unmeasured */ + t_u8 unmeasured:1; + /**< Radar detected on channel */ + t_u8 radar:1; + /**< Unidentified signal found on channel */ + t_u8 unidentified_sig:1; + /**< OFDM preamble detected on channel */ + t_u8 ofdm_preamble:1; + /**< At least one valid MPDU received on channel */ + t_u8 bss:1; +#else + /**< At least one valid MPDU received on channel */ + t_u8 bss:1; + /**< OFDM preamble detected on channel */ + t_u8 ofdm_preamble:1; + /**< Unidentified signal found on channel */ + t_u8 unidentified_sig:1; + /**< Radar detected on channel */ + t_u8 radar:1; + /**< Channel is unmeasured */ + t_u8 unmeasured:1; + /**< Reserved */ + t_u8 rsvd5_7:3; +#endif /* BIG_ENDIAN_SUPPORT */ + +} MLAN_PACK_END MeasRptBasicMap_t; + +/* IEEE DFS Channel Map field (7.3.2.24) */ +/** + * Used to list supported channels and provide a octet "map" field which + * contains a basic measurement report for that channel in the + * IEEEtypes_IBSS_DFS_t element + */ +typedef MLAN_PACK_START struct { + t_u8 channel_number; /**< Channel number */ + MeasRptBasicMap_t rpt_map; + /**< Basic measurement report for the channel */ + +} MLAN_PACK_END IEEEtypes_ChannelMap_t; + +/* IEEE IBSS DFS Element (7.3.2.24) */ +/** + * IBSS DFS element included in ad hoc beacons and probe responses. + * Provides information regarding the IBSS DFS Owner as well as the + * originating STAs supported channels and basic measurement results. + */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 41 */ + t_u8 len; /**< Element length after id and len */ + t_u8 dfs_owner[MLAN_MAC_ADDR_LENGTH]; + /**< DFS Owner STA Address */ + t_u8 dfs_recovery_interval; /**< DFS Recovery time in TBTTs */ + + /** Variable length map field, one Map entry for each supported channel */ + IEEEtypes_ChannelMap_t channel_map[WLAN_11H_MAX_IBSS_DFS_CHANNELS]; + +} MLAN_PACK_END IEEEtypes_IBSS_DFS_t; + +/* 802.11h BSS information kept for each BSSID received in scan results */ +/** + * IEEE BSS information needed from scan results for later processing in + * join commands + */ +typedef struct { + t_u8 sensed_11h; + /**< Capability bit set or 11h IE found in this BSS */ + + IEEEtypes_PowerConstraint_t power_constraint; + /**< Power Constraint IE */ + IEEEtypes_PowerCapability_t power_capability; + /**< Power Capability IE */ + IEEEtypes_TPCReport_t tpc_report; /**< TPC Report IE */ + IEEEtypes_ChanSwitchAnn_t chan_switch_ann;/**< Channel Switch Announcement IE */ + IEEEtypes_Quiet_t quiet; /**< Quiet IE */ + IEEEtypes_IBSS_DFS_t ibss_dfs; /**< IBSS DFS Element IE */ + +} wlan_11h_bss_info_t; + /** Ethernet packet type for TDLS */ -#define MLAN_ETHER_PKT_TYPE_TDLS_ACTION (0x890D) +#define MLAN_ETHER_PKT_TYPE_TDLS_ACTION (0x890D) /*802.11z TDLS action frame type and strcuct */ typedef MLAN_PACK_START struct { @@ -998,6 +1207,8 @@ typedef MLAN_PACK_START struct { #define TDLS_DISCOVERY_REQUEST 10 /** action code for TDLS discovery response */ #define TDLS_DISCOVERY_RESPONSE 14 +/** category public */ +#define CATEGORY_PUBLIC 4 #ifdef STA_SUPPORT /** Macro for maximum size of scan response buffer */ @@ -1044,6 +1255,24 @@ typedef MLAN_PACK_START struct _wlan_user_scan_chan { t_u32 scan_time; } MLAN_PACK_END wlan_user_scan_chan; +/** channel statictics */ +typedef MLAN_PACK_START struct _ChanStatistics_t { + /** channle number */ + t_u8 chan_num; + /** band info */ + t_u8 bandconfig; + /** flags */ + t_u8 flags; + /** noise */ + t_s8 noise; + /** total network */ + t_u16 total_networks; + /** scan duration */ + t_u16 cca_scan_duration; + /** busy duration */ + t_u16 cca_busy_duration; +} MLAN_PACK_END ChanStatistics_t; + /** * Input structure to configure an immediate scan cmd to firmware * @@ -1090,6 +1319,8 @@ typedef MLAN_PACK_START struct { * Variable number (fixed maximum) of channels to scan up */ wlan_user_scan_chan chan_list[WLAN_USER_SCAN_CHAN_MAX]; + /** scan channel gap */ + t_u16 scan_chan_gap; } MLAN_PACK_END wlan_user_scan_cfg; /** Default scan interval in millisecond*/ @@ -1109,6 +1340,8 @@ typedef MLAN_PACK_START struct { #define BG_SCAN_SSID_MATCH 0x0001 /** ssid match and RSSI exceeded */ #define BG_SCAN_SSID_RSSI_MATCH 0x0004 +/**wait for all channel scan to complete to report scan result*/ +#define BG_SCAN_WAIT_ALL_CHAN_DONE 0x80000000 /** Maximum number of channels that can be sent in bg scan config */ #define WLAN_BG_SCAN_CHAN_MAX 38 @@ -1149,6 +1382,8 @@ typedef MLAN_PACK_START struct { wlan_user_scan_ssid ssid_list[MRVDRV_MAX_SSID_LIST_LENGTH]; /** Variable number (fixed maximum) of channels to scan up */ wlan_user_scan_chan chan_list[WLAN_BG_SCAN_CHAN_MAX]; + /** scan channel gap */ + t_u16 scan_chan_gap; } MLAN_PACK_END wlan_bgscan_cfg; #endif /* STA_SUPPORT */ @@ -1224,6 +1459,9 @@ typedef struct _BSSDescriptor_t { /** WMM IE */ IEEEtypes_WmmParameter_t wmm_ie; + /** 802.11h BSS information */ + wlan_11h_bss_info_t wlan_11h_bss_info; + /** Indicate disabling 11n when associate with AP */ t_u8 disable_11n; /** 802.11n BSS information */ @@ -1267,6 +1505,10 @@ typedef struct _BSSDescriptor_t { /** WAPI IE offset in the beacon buffer */ t_u16 wapi_offset; #endif + /* Hotspot 2.0 OSEN AKM IE */ + IEEEtypes_Generic_t *posen_ie; + /** osen IE offset in the beacon buffer */ + t_u16 osen_offset; /** Pointer to the returned scan response */ t_u8 *pbeacon_buf; diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_init.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_init.c old mode 100755 new mode 100644 index 4c1b7d10..a4556d31 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_init.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_init.c @@ -34,7 +34,12 @@ Change log: #include "mlan_init.h" #include "mlan_wmm.h" #include "mlan_11n.h" +#include "mlan_11h.h" +#include "mlan_meas.h" #include "mlan_sdio.h" +#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT) +#include "hostsa_init.h" +#endif /******************************************************** Global Variables @@ -63,7 +68,7 @@ wlan_add_bsspriotbl(pmlan_private priv) status = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle, sizeof(mlan_bssprio_node), MLAN_MEM_DEF, - (t_u8 **) & pbssprio); + (t_u8 **)&pbssprio); if (status) { PRINTM(MERROR, "Failed to allocate bsspriotbl\n"); LEAVE(); @@ -72,7 +77,7 @@ wlan_add_bsspriotbl(pmlan_private priv) pbssprio->priv = priv; - util_init_list((pmlan_linked_list) pbssprio); + util_init_list((pmlan_linked_list)pbssprio); if (!pmadapter->bssprio_tbl[priv->bss_priority].bssprio_cur) pmadapter->bssprio_tbl[priv->bss_priority].bssprio_cur @@ -80,7 +85,7 @@ wlan_add_bsspriotbl(pmlan_private priv) util_enqueue_list_tail(pmadapter->pmoal_handle, &pmadapter->bssprio_tbl[priv->bss_priority]. - bssprio_head, (pmlan_linked_list) pbssprio, + bssprio_head, (pmlan_linked_list)pbssprio, pmadapter->callbacks.moal_spin_lock, pmadapter->callbacks.moal_spin_unlock); @@ -114,17 +119,17 @@ wlan_delete_bsspriotbl(pmlan_private priv) priv->bss_index, i, phead, *ppcur); if (*ppcur) { pbssprio_node = - (mlan_bssprio_node *) util_peek_list(pmadapter-> - pmoal_handle, - phead, - pmadapter-> - callbacks. - moal_spin_lock, - pmadapter-> - callbacks. - moal_spin_unlock); + (mlan_bssprio_node *)util_peek_list(pmadapter-> + pmoal_handle, + phead, + pmadapter-> + callbacks. + moal_spin_lock, + pmadapter-> + callbacks. + moal_spin_unlock); while (pbssprio_node && - ((pmlan_list_head) pbssprio_node != phead)) { + ((pmlan_list_head)pbssprio_node != phead)) { ptmp_node = pbssprio_node->pnext; if (pbssprio_node->priv == priv) { PRINTM(MINFO, @@ -146,7 +151,7 @@ wlan_delete_bsspriotbl(pmlan_private priv) } pbssprio_node = ptmp_node; } - *ppcur = (mlan_bssprio_node *) phead; + *ppcur = (mlan_bssprio_node *)phead; } } @@ -172,6 +177,21 @@ wlan_allocate_adapter(pmlan_adapter pmadapter) #ifdef STA_SUPPORT t_u32 buf_size; BSSDescriptor_t *ptemp_scan_table = MNULL; + t_u8 i = 0; + t_u8 chan_2g[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; + t_u8 chan_5g[] = { + 12, 16, 34, 38, 42, 46, 36, 40, 44, + 48, 52, 56, 60, 64, 100, 104, 108, + 112, 116, 120, 124, 128, 132, 136, + 140, 144, 149, 153, 157, 161, 165 + }; +#endif + t_u32 max_mp_regs = pmadapter->psdio_device->reg->max_mp_regs; +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + t_u32 mp_tx_aggr_buf_size = + pmadapter->psdio_device->mp_tx_aggr_buf_size; + t_u32 mp_rx_aggr_buf_size = + pmadapter->psdio_device->mp_rx_aggr_buf_size; #endif ENTER(); @@ -183,13 +203,13 @@ wlan_allocate_adapter(pmlan_adapter pmadapter) pmadapter->callbacks.moal_vfree) ret = pmadapter->callbacks.moal_vmalloc(pmadapter->pmoal_handle, buf_size, - (t_u8 **) & - ptemp_scan_table); + (t_u8 **) + &ptemp_scan_table); else ret = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle, buf_size, MLAN_MEM_DEF, - (t_u8 **) & - ptemp_scan_table); + (t_u8 **) + &ptemp_scan_table); if (ret != MLAN_STATUS_SUCCESS || !ptemp_scan_table) { PRINTM(MERROR, "Failed to allocate scan table\n"); LEAVE(); @@ -200,13 +220,13 @@ wlan_allocate_adapter(pmlan_adapter pmadapter) pmadapter->callbacks.moal_vfree) ret = pmadapter->callbacks.moal_vmalloc(pmadapter->pmoal_handle, DEFAULT_SCAN_BEACON_BUFFER, - (t_u8 **) & pmadapter-> + (t_u8 **)&pmadapter-> bcn_buf); else ret = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle, DEFAULT_SCAN_BEACON_BUFFER, MLAN_MEM_DEF, - (t_u8 **) & pmadapter-> + (t_u8 **)&pmadapter-> bcn_buf); if (ret != MLAN_STATUS_SUCCESS || !pmadapter->bcn_buf) { PRINTM(MERROR, "Failed to allocate bcn buf\n"); @@ -215,6 +235,32 @@ wlan_allocate_adapter(pmlan_adapter pmadapter) } pmadapter->bcn_buf_size = DEFAULT_SCAN_BEACON_BUFFER; + pmadapter->num_in_chan_stats = sizeof(chan_2g); + pmadapter->num_in_chan_stats += sizeof(chan_5g); + buf_size = sizeof(ChanStatistics_t) * pmadapter->num_in_chan_stats; + if (pmadapter->callbacks.moal_vmalloc && + pmadapter->callbacks.moal_vfree) + ret = pmadapter->callbacks.moal_vmalloc(pmadapter->pmoal_handle, + buf_size, + (t_u8 **)&pmadapter-> + pchan_stats); + else + ret = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle, + buf_size, MLAN_MEM_DEF, + (t_u8 **)&pmadapter-> + pchan_stats); + if (ret != MLAN_STATUS_SUCCESS || !pmadapter->pchan_stats) { + PRINTM(MERROR, "Failed to allocate channel statistics\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + for (i = 0; i < pmadapter->num_in_chan_stats; i++) { + if (i < sizeof(chan_2g)) + pmadapter->pchan_stats[i].chan_num = chan_2g[i]; + else + pmadapter->pchan_stats[i].chan_num = + chan_5g[i - sizeof(chan_2g)]; + } #endif /* Allocate command buffer */ @@ -226,9 +272,9 @@ wlan_allocate_adapter(pmlan_adapter pmadapter) } ret = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle, - MAX_MP_REGS + DMA_ALIGNMENT, + max_mp_regs + DMA_ALIGNMENT, MLAN_MEM_DEF | MLAN_MEM_DMA, - (t_u8 **) & pmadapter-> + (t_u8 **)&pmadapter-> mp_regs_buf); if (ret != MLAN_STATUS_SUCCESS || !pmadapter->mp_regs_buf) { PRINTM(MERROR, "Failed to allocate mp_regs_buf\n"); @@ -236,17 +282,45 @@ wlan_allocate_adapter(pmlan_adapter pmadapter) return MLAN_STATUS_FAILURE; } pmadapter->mp_regs = - (t_u8 *) ALIGN_ADDR(pmadapter->mp_regs_buf, DMA_ALIGNMENT); + (t_u8 *)ALIGN_ADDR(pmadapter->mp_regs_buf, DMA_ALIGNMENT); #if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) - ret = wlan_alloc_sdio_mpa_buffers(pmadapter, - SDIO_MP_TX_AGGR_DEF_BUF_SIZE, - SDIO_MP_RX_AGGR_DEF_BUF_SIZE); + ret = wlan_alloc_sdio_mpa_buffers(pmadapter, mp_tx_aggr_buf_size, + mp_rx_aggr_buf_size); if (ret != MLAN_STATUS_SUCCESS) { PRINTM(MERROR, "Failed to allocate sdio mp-a buffers\n"); LEAVE(); return MLAN_STATUS_FAILURE; } + if (mlan_drvdbg & MMPA_D) { + pmadapter->mpa_buf_size = + SDIO_MP_DBG_NUM * + pmadapter->psdio_device->mp_aggr_pkt_limit * + MLAN_SDIO_BLOCK_SIZE; + if (pmadapter->callbacks.moal_vmalloc && + pmadapter->callbacks.moal_vfree) + ret = pmadapter->callbacks.moal_vmalloc(pmadapter-> + pmoal_handle, + pmadapter-> + mpa_buf_size, + (t_u8 **) + &pmadapter-> + mpa_buf); + else + ret = pmadapter->callbacks.moal_malloc(pmadapter-> + pmoal_handle, + pmadapter-> + mpa_buf_size, + MLAN_MEM_DEF, + (t_u8 **) + &pmadapter-> + mpa_buf); + if (ret != MLAN_STATUS_SUCCESS || !pmadapter->mpa_buf) { + PRINTM(MERROR, "Failed to allocate mpa buf\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + } #endif pmadapter->psleep_cfm = @@ -292,6 +366,7 @@ wlan_init_priv(pmlan_private priv) for (i = 0; i < MRVL_NUM_WEP_KEY; i++) memset(pmadapter, &priv->wep_key[i], 0, sizeof(mrvl_wep_key_t)); priv->wep_key_curr_index = 0; + priv->ewpa_query = MFALSE; priv->adhoc_aes_enabled = MFALSE; priv->curr_pkt_filter = HostCmd_ACT_MAC_RTS_CTS_ENABLE | @@ -308,6 +383,7 @@ wlan_init_priv(pmlan_private priv) priv->assoc_rsp_size = 0; wlan_11d_priv_init(priv); + wlan_11h_priv_init(priv); #ifdef UAP_SUPPORT priv->uap_bss_started = MFALSE; memset(pmadapter, &priv->uap_state_chan_cb, 0, @@ -315,6 +391,11 @@ wlan_init_priv(pmlan_private priv) #endif #if defined(UAP_SUPPORT) priv->num_drop_pkts = 0; +#endif +#if defined(STA_SUPPORT) + priv->adhoc_state_prev = ADHOC_IDLE; + memset(pmadapter, &priv->adhoc_last_start_ssid, 0, + sizeof(priv->adhoc_last_start_ssid)); #endif priv->adhoc_channel = DEFAULT_AD_HOC_CHANNEL; priv->atim_window = 0; @@ -335,12 +416,17 @@ wlan_init_priv(pmlan_private priv) priv->bcn_nf_avg = 0; priv->bcn_nf_last = 0; + priv->sec_info.ewpa_enabled = MFALSE; priv->sec_info.wpa_enabled = MFALSE; priv->sec_info.wpa2_enabled = MFALSE; memset(pmadapter, &priv->wpa_ie, 0, sizeof(priv->wpa_ie)); memset(pmadapter, &priv->aes_key, 0, sizeof(priv->aes_key)); priv->wpa_ie_len = 0; priv->wpa_is_gtk_set = MFALSE; +#if defined(STA_SUPPORT) + priv->pmfcfg.mfpc = 0; + priv->pmfcfg.mfpr = 0; +#endif priv->sec_info.wapi_enabled = MFALSE; priv->wapi_ie_len = 0; priv->sec_info.wapi_key_on = MFALSE; @@ -349,12 +435,11 @@ wlan_init_priv(pmlan_private priv) memset(pmadapter, &priv->gen_ie_buf, 0, sizeof(priv->gen_ie_buf)); priv->gen_ie_buf_len = 0; #endif /* STA_SUPPORT */ - - priv->tx_bf_cap = 0; priv->wmm_required = MTRUE; priv->wmm_enabled = MFALSE; priv->wmm_qosinfo = 0; priv->saved_wmm_qosinfo = 0; + priv->txaggrctrl = MTRUE; #ifdef STA_SUPPORT priv->pcurr_bcn_buf = MNULL; priv->curr_bcn_size = 0; @@ -366,13 +451,44 @@ wlan_init_priv(pmlan_private priv) priv->addba_reject[6] = ADDBA_RSP_STATUS_REJECT; priv->addba_reject[7] = ADDBA_RSP_STATUS_REJECT; priv->max_amsdu = 0; +#ifdef STA_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_STA) { + priv->add_ba_param.tx_win_size = + pmadapter->psdio_device->ampdu_info-> + ampdu_sta_txwinsize; + priv->add_ba_param.rx_win_size = MLAN_STA_AMPDU_DEF_RXWINSIZE; + } +#endif +#ifdef WIFI_DIRECT_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) { + priv->add_ba_param.tx_win_size = + pmadapter->psdio_device->ampdu_info-> + ampdu_wfd_txrxwinsize; + priv->add_ba_param.rx_win_size = + pmadapter->psdio_device->ampdu_info-> + ampdu_wfd_txrxwinsize; + } +#endif +#ifdef UAP_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_UAP) { + priv->add_ba_param.tx_win_size = + pmadapter->psdio_device->ampdu_info-> + ampdu_uap_txwinsize; + priv->add_ba_param.rx_win_size = + pmadapter->psdio_device->ampdu_info-> + ampdu_uap_rxwinsize; + } +#endif priv->port_ctrl_mode = MTRUE; priv->port_open = MFALSE; ret = wlan_add_bsspriotbl(priv); - +#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT) + if (priv->adapter->psdio_device->driver_supplicant_auth) + hostsa_init(priv); +#endif LEAVE(); return ret; } @@ -392,9 +508,9 @@ wlan_init_adapter(pmlan_adapter pmadapter) ENTER(); sleep_cfm_buf = - (opt_sleep_confirm_buffer *) (pmadapter->psleep_cfm->pbuf + - pmadapter->psleep_cfm-> - data_offset); + (opt_sleep_confirm_buffer *)(pmadapter->psleep_cfm->pbuf + + pmadapter->psleep_cfm-> + data_offset); #ifdef MFG_CMD_SUPPORT if (pmadapter->init_para.mfg_mode == MLAN_INIT_PARA_DISABLED) @@ -413,10 +529,18 @@ wlan_init_adapter(pmlan_adapter pmadapter) pmadapter->data_sent = MTRUE; pmadapter->mp_rd_bitmap = 0; pmadapter->mp_wr_bitmap = 0; - pmadapter->curr_rd_port = 1; - pmadapter->curr_wr_port = 1; - pmadapter->mp_data_port_mask = DATA_PORT_MASK; - + if (pmadapter->psdio_device->supports_sdio_new_mode) { + pmadapter->curr_rd_port = 0; + pmadapter->curr_wr_port = 0; + } else { + pmadapter->curr_rd_port = 1; + pmadapter->curr_wr_port = 1; + } + pmadapter->mp_data_port_mask = + pmadapter->psdio_device->reg->data_port_mask; + pmadapter->mp_invalid_update = 0; + memset(pmadapter, pmadapter->mp_update, 0, + sizeof(pmadapter->mp_update)); #ifdef SDIO_MULTI_PORT_TX_AGGR pmadapter->mpa_tx.buf_len = 0; pmadapter->mpa_tx.pkt_cnt = 0; @@ -428,7 +552,8 @@ wlan_init_adapter(pmlan_adapter pmadapter) pmadapter->mpa_tx.enabled = MFALSE; else pmadapter->mpa_tx.enabled = MTRUE; - pmadapter->mpa_tx.pkt_aggr_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT; + pmadapter->mpa_tx.pkt_aggr_limit = + pmadapter->psdio_device->mp_aggr_pkt_limit; #endif /* SDIO_MULTI_PORT_TX_AGGR */ #ifdef SDIO_MULTI_PORT_RX_AGGR @@ -442,7 +567,9 @@ wlan_init_adapter(pmlan_adapter pmadapter) pmadapter->mpa_rx.enabled = MFALSE; else pmadapter->mpa_rx.enabled = MTRUE; - pmadapter->mpa_rx.pkt_aggr_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT; + pmadapter->mpa_rx.pkt_aggr_limit = + pmadapter->psdio_device->mp_aggr_pkt_limit; + #endif /* SDIO_MULTI_PORT_RX_AGGR */ pmadapter->cmd_resp_received = MFALSE; @@ -459,11 +586,10 @@ wlan_init_adapter(pmlan_adapter pmadapter) if (!pmadapter->init_para.ps_mode) { pmadapter->ps_mode = DEFAULT_PS_MODE; - } else if (pmadapter->init_para.ps_mode == MLAN_INIT_PARA_DISABLED) { + } else if (pmadapter->init_para.ps_mode == MLAN_INIT_PARA_DISABLED) pmadapter->ps_mode = Wlan802_11PowerModeCAM; - } else { + else pmadapter->ps_mode = Wlan802_11PowerModePSP; - } pmadapter->ps_state = PS_STATE_AWAKE; pmadapter->need_to_wakeup = MFALSE; @@ -481,7 +607,7 @@ wlan_init_adapter(pmlan_adapter pmadapter) pmadapter->num_in_scan_table = 0; memset(pmadapter, pmadapter->pscan_table, 0, (sizeof(BSSDescriptor_t) * MRVDRV_MAX_BSSID_LIST)); - pmadapter->ext_scan = 0; + pmadapter->ext_scan = pmadapter->psdio_device->ext_scan; pmadapter->scan_probes = DEFAULT_PROBES; memset(pmadapter, pmadapter->bcn_buf, 0, pmadapter->bcn_buf_size); @@ -496,13 +622,12 @@ wlan_init_adapter(pmlan_adapter pmadapter) pmadapter->is_deep_sleep = MFALSE; pmadapter->idle_time = DEEP_SLEEP_IDLE_TIME; - if (!pmadapter->init_para.auto_ds) { + if (!pmadapter->init_para.auto_ds) pmadapter->init_auto_ds = DEFAULT_AUTO_DS_MODE; - } else if (pmadapter->init_para.auto_ds == MLAN_INIT_PARA_DISABLED) { + else if (pmadapter->init_para.auto_ds == MLAN_INIT_PARA_DISABLED) pmadapter->init_auto_ds = MFALSE; - } else { + else pmadapter->init_auto_ds = MTRUE; - } pmadapter->delay_null_pkt = MFALSE; pmadapter->delay_to_ps = DELAY_TO_PS_DEFAULT; @@ -521,7 +646,7 @@ wlan_init_adapter(pmlan_adapter pmadapter) pmadapter->max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K; else pmadapter->max_tx_buf_size = - (t_u16) pmadapter->init_para.max_tx_buf; + (t_u16)pmadapter->init_para.max_tx_buf; pmadapter->tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K; pmadapter->curr_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K; @@ -539,6 +664,7 @@ wlan_init_adapter(pmlan_adapter pmadapter) pmadapter->usr_dot_11n_dev_cap_bg = 0; pmadapter->usr_dot_11n_dev_cap_a = 0; pmadapter->usr_dev_mcs_support = 0; + pmadapter->coex_rx_winsize = 1; #ifdef STA_SUPPORT pmadapter->chan_bandwidth = 0; pmadapter->adhoc_11n_enabled = MFALSE; @@ -548,6 +674,8 @@ wlan_init_adapter(pmlan_adapter pmadapter) /* Initialize 802.11d */ wlan_11d_init(pmadapter); + wlan_11h_init(pmadapter); + wlan_wmm_init(pmadapter); pmadapter->bypass_pkt_count = 0; if (pmadapter->psleep_cfm) { @@ -590,6 +718,13 @@ wlan_init_adapter(pmlan_adapter pmadapter) COUNTRY_CODE_LEN); pmadapter->bcn_miss_time_out = DEFAULT_BCN_MISS_TIMEOUT; pmadapter->adhoc_awake_period = 0; +#ifdef STA_SUPPORT + memset(pmadapter, &pmadapter->arp_filter, 0, + sizeof(pmadapter->arp_filter)); + pmadapter->arp_filter_size = 0; +#endif /* STA_SUPPORT */ + + pmadapter->mc_status = MFALSE; LEAVE(); return; @@ -673,28 +808,28 @@ wlan_init_lock_list(IN pmlan_adapter pmadapter) } } - util_init_list_head((t_void *) pmadapter->pmoal_handle, + util_init_list_head((t_void *)pmadapter->pmoal_handle, &pmadapter->rx_data_queue, MTRUE, pmadapter->callbacks.moal_init_lock); - util_scalar_init((t_void *) pmadapter->pmoal_handle, + util_scalar_init((t_void *)pmadapter->pmoal_handle, &pmadapter->rx_pkts_queued, 0, MNULL, pmadapter->callbacks.moal_init_lock); /* Initialize cmd_free_q */ - util_init_list_head((t_void *) pmadapter->pmoal_handle, + util_init_list_head((t_void *)pmadapter->pmoal_handle, &pmadapter->cmd_free_q, MTRUE, pmadapter->callbacks.moal_init_lock); /* Initialize cmd_pending_q */ - util_init_list_head((t_void *) pmadapter->pmoal_handle, + util_init_list_head((t_void *)pmadapter->pmoal_handle, &pmadapter->cmd_pending_q, MTRUE, pmadapter->callbacks.moal_init_lock); /* Initialize scan_pending_q */ - util_init_list_head((t_void *) pmadapter->pmoal_handle, + util_init_list_head((t_void *)pmadapter->pmoal_handle, &pmadapter->scan_pending_q, MTRUE, pmadapter->callbacks.moal_init_lock); for (i = 0; i < pmadapter->priv_num; ++i) { - util_init_list_head((t_void *) pmadapter->pmoal_handle, + util_init_list_head((t_void *)pmadapter->pmoal_handle, &pmadapter->bssprio_tbl[i].bssprio_head, MTRUE, pmadapter->callbacks.moal_init_lock); pmadapter->bssprio_tbl[i].bssprio_cur = MNULL; @@ -704,41 +839,41 @@ wlan_init_lock_list(IN pmlan_adapter pmadapter) if (pmadapter->priv[i]) { priv = pmadapter->priv[i]; for (j = 0; j < MAX_NUM_TID; ++j) { - util_init_list_head((t_void *) pmadapter-> + util_init_list_head((t_void *)pmadapter-> pmoal_handle, &priv->wmm.tid_tbl_ptr[j]. ra_list, MTRUE, priv->adapter->callbacks. moal_init_lock); } - util_init_list_head((t_void *) pmadapter->pmoal_handle, + util_init_list_head((t_void *)pmadapter->pmoal_handle, &priv->tx_ba_stream_tbl_ptr, MTRUE, pmadapter->callbacks. moal_init_lock); - util_init_list_head((t_void *) pmadapter->pmoal_handle, + util_init_list_head((t_void *)pmadapter->pmoal_handle, &priv->rx_reorder_tbl_ptr, MTRUE, pmadapter->callbacks. moal_init_lock); - util_scalar_init((t_void *) pmadapter->pmoal_handle, + util_scalar_init((t_void *)pmadapter->pmoal_handle, &priv->wmm.tx_pkts_queued, 0, priv->wmm.ra_list_spinlock, pmadapter->callbacks.moal_init_lock); - util_scalar_init((t_void *) pmadapter->pmoal_handle, + util_scalar_init((t_void *)pmadapter->pmoal_handle, &priv->wmm.highest_queued_prio, HIGH_PRIO_TID, priv->wmm.ra_list_spinlock, pmadapter->callbacks.moal_init_lock); - util_init_list_head((t_void *) pmadapter->pmoal_handle, + util_init_list_head((t_void *)pmadapter->pmoal_handle, &priv->sta_list, MTRUE, pmadapter->callbacks. moal_init_lock); /* Initialize tdls_pending_txq */ - util_init_list_head((t_void *) pmadapter->pmoal_handle, + util_init_list_head((t_void *)pmadapter->pmoal_handle, &priv->tdls_pending_txq, MTRUE, pmadapter->callbacks. moal_init_lock); /* Initialize bypass_txq */ - util_init_list_head((t_void *) pmadapter->pmoal_handle, + util_init_list_head((t_void *)pmadapter->pmoal_handle, &priv->bypass_txq, MTRUE, pmadapter->callbacks. moal_init_lock); @@ -802,67 +937,67 @@ wlan_free_lock_list(IN pmlan_adapter pmadapter) } /* Free lists */ - util_free_list_head((t_void *) pmadapter->pmoal_handle, + util_free_list_head((t_void *)pmadapter->pmoal_handle, &pmadapter->rx_data_queue, pcb->moal_free_lock); - util_scalar_free((t_void *) pmadapter->pmoal_handle, + util_scalar_free((t_void *)pmadapter->pmoal_handle, &pmadapter->rx_pkts_queued, pcb->moal_free_lock); - util_free_list_head((t_void *) pmadapter->pmoal_handle, + util_free_list_head((t_void *)pmadapter->pmoal_handle, &pmadapter->cmd_free_q, pmadapter->callbacks.moal_free_lock); - util_free_list_head((t_void *) pmadapter->pmoal_handle, + util_free_list_head((t_void *)pmadapter->pmoal_handle, &pmadapter->cmd_pending_q, pmadapter->callbacks.moal_free_lock); - util_free_list_head((t_void *) pmadapter->pmoal_handle, + util_free_list_head((t_void *)pmadapter->pmoal_handle, &pmadapter->scan_pending_q, pmadapter->callbacks.moal_free_lock); for (i = 0; i < pmadapter->priv_num; i++) - util_free_list_head((t_void *) pmadapter->pmoal_handle, + util_free_list_head((t_void *)pmadapter->pmoal_handle, &pmadapter->bssprio_tbl[i].bssprio_head, pcb->moal_free_lock); for (i = 0; i < pmadapter->priv_num; i++) { if (pmadapter->priv[i]) { priv = pmadapter->priv[i]; - util_free_list_head((t_void *) pmadapter->pmoal_handle, + util_free_list_head((t_void *)pmadapter->pmoal_handle, &priv->sta_list, priv->adapter->callbacks. moal_free_lock); - util_free_list_head((t_void *) pmadapter->pmoal_handle, + util_free_list_head((t_void *)pmadapter->pmoal_handle, &priv->tdls_pending_txq, pmadapter->callbacks. moal_free_lock); - util_free_list_head((t_void *) pmadapter->pmoal_handle, + util_free_list_head((t_void *)pmadapter->pmoal_handle, &priv->bypass_txq, pmadapter->callbacks. moal_free_lock); for (j = 0; j < MAX_NUM_TID; ++j) - util_free_list_head((t_void *) priv->adapter-> + util_free_list_head((t_void *)priv->adapter-> pmoal_handle, &priv->wmm.tid_tbl_ptr[j]. ra_list, priv->adapter->callbacks. moal_free_lock); - util_free_list_head((t_void *) priv->adapter-> + util_free_list_head((t_void *)priv->adapter-> pmoal_handle, &priv->tx_ba_stream_tbl_ptr, priv->adapter->callbacks. moal_free_lock); - util_free_list_head((t_void *) priv->adapter-> + util_free_list_head((t_void *)priv->adapter-> pmoal_handle, &priv->rx_reorder_tbl_ptr, priv->adapter->callbacks. moal_free_lock); - util_scalar_free((t_void *) priv->adapter->pmoal_handle, + util_scalar_free((t_void *)priv->adapter->pmoal_handle, &priv->wmm.tx_pkts_queued, priv->adapter->callbacks. moal_free_lock); - util_scalar_free((t_void *) priv->adapter->pmoal_handle, + util_scalar_free((t_void *)priv->adapter->pmoal_handle, &priv->wmm.highest_queued_prio, priv->adapter->callbacks. moal_free_lock); @@ -995,7 +1130,7 @@ wlan_init_fw(IN pmlan_adapter pmadapter) t_void wlan_free_adapter(pmlan_adapter pmadapter) { - mlan_callbacks *pcb = (mlan_callbacks *) & pmadapter->callbacks; + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; ENTER(); if (!pmadapter) { @@ -1018,28 +1153,39 @@ wlan_free_adapter(pmlan_adapter pmadapter) #ifdef STA_SUPPORT PRINTM(MINFO, "Free ScanTable\n"); if (pmadapter->pscan_table) { - if (pcb->moal_vmalloc && pcb->moal_vfree) { + if (pcb->moal_vmalloc && pcb->moal_vfree) pcb->moal_vfree(pmadapter->pmoal_handle, - (t_u8 *) pmadapter->pscan_table); - } else + (t_u8 *)pmadapter->pscan_table); + else pcb->moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) pmadapter->pscan_table); + (t_u8 *)pmadapter->pscan_table); pmadapter->pscan_table = MNULL; } + if (pmadapter->pchan_stats) { + if (pcb->moal_vmalloc && pcb->moal_vfree) + pcb->moal_vfree(pmadapter->pmoal_handle, + (t_u8 *)pmadapter->pchan_stats); + else + pcb->moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pmadapter->pchan_stats); + pmadapter->pchan_stats = MNULL; + } if (pmadapter->bcn_buf) { if (pcb->moal_vmalloc && pcb->moal_vfree) pcb->moal_vfree(pmadapter->pmoal_handle, - (t_u8 *) pmadapter->bcn_buf); + (t_u8 *)pmadapter->bcn_buf); else pcb->moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) pmadapter->bcn_buf); + (t_u8 *)pmadapter->bcn_buf); pmadapter->bcn_buf = MNULL; } #endif + wlan_11h_cleanup(pmadapter); + if (pmadapter->mp_regs_buf) { pcb->moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) pmadapter->mp_regs_buf); + (t_u8 *)pmadapter->mp_regs_buf); pmadapter->mp_regs_buf = MNULL; pmadapter->mp_regs = MNULL; } @@ -1061,7 +1207,7 @@ wlan_free_adapter(pmlan_adapter pmadapter) * @return N/A */ t_void -wlan_free_priv(mlan_private * pmpriv) +wlan_free_priv(mlan_private *pmpriv) { ENTER(); wlan_clean_txrx(pmpriv); @@ -1071,6 +1217,11 @@ wlan_free_priv(mlan_private * pmpriv) wlan_free_curr_bcn(pmpriv); #endif /* STA_SUPPORT */ +#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT) + if (pmpriv->adapter->psdio_device->driver_supplicant_auth) + hostsa_cleanup(pmpriv); +#endif /* EMBEDDED AUTHENTICATOR */ + wlan_delete_station_list(pmpriv); LEAVE(); } @@ -1081,7 +1232,7 @@ wlan_free_priv(mlan_private * pmpriv) * @param pmadapter A pointer to mlan_adapter structure * * @return MLAN_STATUS_SUCCESS - * The firmware initialization callback succeeded. + * The firmware initialization callback succeeded. */ mlan_status wlan_init_fw_complete(IN pmlan_adapter pmadapter) @@ -1095,7 +1246,6 @@ wlan_init_fw_complete(IN pmlan_adapter pmadapter) /* Check if hardware is ready */ if (pmadapter->hw_status != WlanHardwareStatusReady) status = MLAN_STATUS_FAILURE; - /* Invoke callback */ ret = pcb->moal_init_fw_complete(pmadapter->pmoal_handle, status); LEAVE(); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_init.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_init.h old mode 100755 new mode 100644 index 9b44db71..cb060356 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_init.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_init.h @@ -38,7 +38,7 @@ Change log: #define FW_HAS_LAST_BLOCK 0x00000004 /** Firmware data transmit size */ -#define FW_DATA_XMIT_SIZE (sizeof(FWHeader) + DataLength + sizeof(t_u32)) +#define FW_DATA_XMIT_SIZE (sizeof(FWHeader) + DataLength + sizeof(t_u32)) /** FWHeader */ typedef struct _FWHeader { diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_ioctl.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_ioctl.h old mode 100755 new mode 100644 index 7d9136d1..b93ce2b3 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_ioctl.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_ioctl.h @@ -81,6 +81,10 @@ enum _mlan_ioctl_req_id { MLAN_OID_SNMP_MIB_RTS_THRESHOLD = 0x00040001, MLAN_OID_SNMP_MIB_FRAG_THRESHOLD = 0x00040002, MLAN_OID_SNMP_MIB_RETRY_COUNT = 0x00040003, +#if defined(UAP_SUPPORT) + MLAN_OID_SNMP_MIB_DOT11D = 0x00040004, + MLAN_OID_SNMP_MIB_DOT11H = 0x00040005, +#endif MLAN_OID_SNMP_MIB_DTIM_PERIOD = 0x00040006, /* Status Information Group */ @@ -101,11 +105,15 @@ enum _mlan_ioctl_req_id { MLAN_OID_SEC_CFG_ENCRYPT_MODE = 0x00060002, MLAN_OID_SEC_CFG_WPA_ENABLED = 0x00060003, MLAN_OID_SEC_CFG_ENCRYPT_KEY = 0x00060004, + MLAN_OID_SEC_CFG_PASSPHRASE = 0x00060005, + MLAN_OID_SEC_CFG_EWPA_ENABLED = 0x00060006, + MLAN_OID_SEC_CFG_ESUPP_MODE = 0x00060007, MLAN_OID_SEC_CFG_WAPI_ENABLED = 0x00060009, MLAN_OID_SEC_CFG_PORT_CTRL_ENABLED = 0x0006000A, #ifdef UAP_SUPPORT MLAN_OID_SEC_CFG_REPORT_MIC_ERR = 0x0006000B, #endif + MLAN_OID_SEC_QUERY_KEY = 0x0006000C, /* Rate Group */ MLAN_IOCTL_RATE = 0x00070000, @@ -159,8 +167,11 @@ enum _mlan_ioctl_req_id { MLAN_OID_11N_CFG_AMSDU_AGGR_CTRL = 0x000C0007, MLAN_OID_11N_CFG_SUPPORTED_MCS_SET = 0x000C0008, MLAN_OID_11N_CFG_TX_BF_CAP = 0x000C0009, + MLAN_OID_11N_CFG_STREAM_CFG = 0x000C000B, MLAN_OID_11N_CFG_DELBA = 0x000C000C, MLAN_OID_11N_CFG_REJECT_ADDBA_REQ = 0x000C000D, + MLAN_OID_11N_CFG_COEX_RX_WINSIZE = 0x000C000E, + MLAN_OID_11N_CFG_TX_AGGR_CTRL = 0x000C000F, /* 802.11d Configuration Group */ MLAN_IOCTL_11D_CFG = 0x000D0000, @@ -179,6 +190,14 @@ enum _mlan_ioctl_req_id { /* Multi-Radio Configuration Group */ MLAN_IOCTL_MFR_CFG = 0x00100000, + /* 802.11h Configuration Group */ + MLAN_IOCTL_11H_CFG = 0x00110000, + MLAN_OID_11H_CHANNEL_CHECK = 0x00110001, + MLAN_OID_11H_LOCAL_POWER_CONSTRAINT = 0x00110002, +#if defined(DFS_TESTING_SUPPORT) + MLAN_OID_11H_DFS_TESTING = 0x00110003, +#endif + /* Miscellaneous Configuration Group */ MLAN_IOCTL_MISC_CFG = 0x00200000, MLAN_OID_MISC_GEN_IE = 0x00200001, @@ -193,6 +212,7 @@ enum _mlan_ioctl_req_id { MLAN_OID_MISC_WWS = 0x0020000B, MLAN_OID_MISC_ASSOC_RSP = 0x0020000C, MLAN_OID_MISC_INIT_SHUTDOWN = 0x0020000D, + MLAN_OID_MISC_COALESCING_STATUS = 0x0020000E, MLAN_OID_MISC_CUSTOM_IE = 0x0020000F, MLAN_OID_MISC_TDLS_CONFIG = 0x00200010, MLAN_OID_MISC_TX_DATAPAUSE = 0x00200012, @@ -207,6 +227,7 @@ enum _mlan_ioctl_req_id { #ifdef DEBUG_LEVEL1 MLAN_OID_MISC_DRVDBG = 0x0020001B, #endif + MLAN_OID_MISC_HOTSPOT_CFG = 0x0020001C, MLAN_OID_MISC_OTP_USER_DATA = 0x0020001D, MLAN_OID_MISC_TXCONTROL = 0x00200020, #ifdef STA_SUPPORT @@ -215,12 +236,17 @@ enum _mlan_ioctl_req_id { #if defined(STA_SUPPORT) MLAN_OID_MISC_PMFCFG = 0x00200022, #endif + MLAN_OID_MISC_MULTI_CHAN_CFG = 0x00200023, + MLAN_OID_MISC_MULTI_CHAN_POLICY = 0x00200024, #ifdef WIFI_DIRECT_SUPPORT MLAN_OID_MISC_WIFI_DIRECT_CONFIG = 0x00200025, #endif MLAN_OID_MISC_TDLS_OPER = 0x00200026, MLAN_OID_MISC_GET_TDLS_IES = 0x00200027, MLAN_OID_MISC_LOW_PWR_MODE = 0x00200029, +#ifdef RX_PACKET_COALESCE + MLAN_OID_MISC_RX_PACKET_COALESCE = 0x0020002C, +#endif }; /** Sub command size */ @@ -297,6 +323,15 @@ typedef struct _mlan_802_11_ssid { t_u8 ssid[MLAN_MAX_SSID_LENGTH]; } mlan_802_11_ssid, *pmlan_802_11_ssid; +typedef MLAN_PACK_START struct _tx_status_event { + /** packet type */ + t_u8 packet_type; + /** tx_token_id */ + t_u8 tx_token_id; + /** 0--success, 1--fail, 2--watchdogtimeout */ + t_u8 status; +} MLAN_PACK_END tx_status_event; + /** * Sructure to retrieve the scan table */ @@ -339,14 +374,14 @@ typedef struct _wlan_ioctl_get_scan_table_entry { wlan_get_scan_table_fixed fixed_fields; /* - * Probe response or beacon scanned for the BSS. + * Probe response or beacon scanned for the BSS. * - * Field layout: - * - TSF 8 octets - * - Beacon Interval 2 octets - * - Capability Info 2 octets + * Field layout: + * - TSF 8 octets + * - Beacon Interval 2 octets + * - Capability Info 2 octets * - * - IEEE Infomation Elements; variable number & length per 802.11 spec + * - IEEE Infomation Elements; variable number & length per 802.11 spec */ /* t_u8 bss_info_buffer[0]; */ } wlan_ioctl_get_scan_table_entry; @@ -391,6 +426,10 @@ typedef struct _mlan_scan_resp { t_u8 *pscan_table; /* Age in seconds */ t_u32 age_in_secs; + /** channel statstics */ + t_u8 *pchan_stats; + /** Number of records in the chan_stats */ + t_u32 num_in_chan_stats; } mlan_scan_resp, *pmlan_scan_resp; /** Type definition of mlan_scan_cfg */ @@ -455,7 +494,7 @@ enum _mlan_bss_mode { /** Receive multicast packets in multicast list */ #define MLAN_MULTICAST_MODE 2 /** Receive all multicast packets */ -#define MLAN_ALL_MULTI_MODE 4 +#define MLAN_ALL_MULTI_MODE 4 /** Maximum size of multicast list */ #define MLAN_MAX_MULTICAST_LIST_SIZE 32 @@ -471,7 +510,7 @@ typedef struct _mlan_multicast_list { } mlan_multicast_list, *pmlan_multicast_list; /** Max channel */ -#define MLAN_MAX_CHANNEL 14 +#define MLAN_MAX_CHANNEL 165 /** Maximum number of channels in table */ #define MLAN_MAX_CHANNEL_NUM 128 @@ -748,7 +787,7 @@ typedef struct _wmm_parameter_t { /** 5G band */ #define BAND_CONFIG_5G 0x01 /** 2.4 G band */ -#define BAND_CONFIG_2G 0x00 +#define BAND_CONFIG_2G 0x00 /** MAX BG channel */ #define MAX_BG_CHANNEL 14 /** mlan_bss_param @@ -872,7 +911,7 @@ typedef struct _mlan_deauth_param { /** mode: listen */ #define WIFI_DIRECT_MODE_LISTEN 1 /** mode: GO */ -#define WIFI_DIRECT_MODE_GO 2 +#define WIFI_DIRECT_MODE_GO 2 /** mode: client */ #define WIFI_DIRECT_MODE_CLIENT 3 /** mode: find */ @@ -933,7 +972,9 @@ typedef struct _mlan_ds_bss { enum _mlan_band_def { BAND_B = 1, BAND_G = 2, + BAND_A = 4, BAND_GN = 8, + BAND_AN = 16, }; /** NO secondary channel */ @@ -1016,6 +1057,10 @@ typedef struct _mlan_ds_snmp_mib { t_u32 frag_threshold; /** Retry count for MLAN_OID_SNMP_MIB_RETRY_COUNT */ t_u32 retry_count; +#if defined(UAP_SUPPORT) + /** OID value for MLAN_OID_SNMP_MIB_DOT11D/H */ + t_u32 oid_value; +#endif /** DTIM period for MLAN_OID_SNMP_MIB_DTIM_PERIOD */ t_u32 dtim_period; } param; @@ -1029,7 +1074,7 @@ enum _mlan_adhoc_status { ADHOC_IDLE, ADHOC_STARTED, ADHOC_JOINED, - ADHOC_COALESCED + ADHOC_COALESCED, ADHOC_STARTING }; /** Type definition of mlan_ds_get_stats for MLAN_OID_GET_STATS */ @@ -1316,6 +1361,20 @@ typedef struct _tdls_peer_info { t_u8 ht_cap[IEEE_MAX_IE_SIZE]; } tdls_peer_info; +/** max ralist num */ +#define MLAN_MAX_RALIST_NUM 8 +/** ralist info */ +typedef struct _ralist_info { + /** RA list buffer */ + t_u8 ra[MLAN_MAC_ADDR_LENGTH]; + /** total packets in RA list */ + t_u16 total_pkts; + /** tid num */ + t_u8 tid; + /** tx_pause flag */ + t_u8 tx_pause; +} ralist_info; + /** mlan_debug_info data structure for MLAN_OID_GET_DEBUG_INFO */ typedef struct _mlan_debug_info { /* WMM AC_BK count */ @@ -1344,6 +1403,10 @@ typedef struct _mlan_debug_info { t_u32 tdls_peer_num; /** TDLS peer list*/ tdls_peer_info tdls_peer_list[MLAN_MAX_TDLS_PEER_SUPPORTED]; + /** ralist num */ + t_u32 ralist_num; + /** ralist info */ + ralist_info ralist[MLAN_MAX_RALIST_NUM]; /** Corresponds to ps_mode member of mlan_adapter */ t_u16 ps_mode; /** Corresponds to ps_state member of mlan_adapter */ @@ -1390,9 +1453,15 @@ typedef struct _mlan_debug_info { t_u32 num_int_read_failure; /** Last interrupt status */ t_u32 last_int_status; + /** number of interrupt receive */ + t_u32 num_of_irq; + /** FW update port number */ + t_u32 mp_update[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX * 2]; + /** Invalid port update count */ + t_u32 mp_invalid_update; #ifdef SDIO_MULTI_PORT_TX_AGGR /** Number of packets tx aggr */ - t_u32 mpa_tx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT]; + t_u32 mpa_tx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; /** no more packets count*/ t_u32 mpa_sent_last_pkt; /** no write_ports count */ @@ -1408,13 +1477,21 @@ typedef struct _mlan_debug_info { /** last curr_wr_port */ t_u8 last_curr_wr_port[SDIO_MP_DBG_NUM]; /** length info for cmd53 write data */ - t_u16 last_mp_wr_info[SDIO_MP_DBG_NUM * SDIO_MP_AGGR_DEF_PKT_LIMIT]; + t_u16 last_mp_wr_info[SDIO_MP_DBG_NUM * SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; /** last mp_index */ t_u8 last_mp_index; + /** buffer for mp debug */ + t_u8 *mpa_buf; + /** length info for mp buf size */ + t_u32 mpa_buf_size; #endif #ifdef SDIO_MULTI_PORT_RX_AGGR /** Number of packets rx aggr */ - t_u32 mpa_rx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT]; + t_u32 mpa_rx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; +#endif +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + /** mp aggr_pkt limit */ + t_u8 mp_aggr_pkt_limit; #endif /** Number of deauthentication events */ t_u32 num_event_deauth; @@ -1432,6 +1509,8 @@ typedef struct _mlan_debug_info { t_u32 num_tx_timeout; /** Number of command timeouts */ t_u32 num_cmd_timeout; + /** Number of command timeouts */ + t_u32 dbg_num_cmd_timeout; /** Timeout command ID */ t_u16 timeout_cmd_id; /** Timeout command action */ @@ -1556,10 +1635,21 @@ typedef struct _mlan_ds_get_info { enum _mlan_auth_mode { MLAN_AUTH_MODE_OPEN = 0x00, MLAN_AUTH_MODE_SHARED = 0x01, + MLAN_AUTH_MODE_FT = 0x02, MLAN_AUTH_MODE_NETWORKEAP = 0x80, MLAN_AUTH_MODE_AUTO = 0xFF, }; +/**Enumeration for AssocAgent authentication mode, sync from FW.*/ +typedef enum { + AssocAgentAuth_Open, + AssocAgentAuth_Shared, + AssocAgentAuth_FastBss, + AssocAgentAuth_FastBss_Skip, + AssocAgentAuth_Network_EAP, + AssocAgentAuth_Auto, +} AssocAgentAuthType_e; + /** Enumeration for encryption mode */ enum _mlan_encryption_mode { MLAN_ENCRYPTION_MODE_NONE = 0, @@ -1656,6 +1746,51 @@ typedef struct _mlan_pmk_t { t_u8 pmk[MLAN_MAX_KEY_LENGTH]; } mlan_pmk_t; +/** Embedded supplicant RSN type: No RSN */ +#define RSN_TYPE_NO_RSN MBIT(0) +/** Embedded supplicant RSN type: WPA */ +#define RSN_TYPE_WPA MBIT(3) +/** Embedded supplicant RSN type: WPA-NONE */ +#define RSN_TYPE_WPANONE MBIT(4) +/** Embedded supplicant RSN type: WPA2 */ +#define RSN_TYPE_WPA2 MBIT(5) +/** Embedded supplicant RSN type: RFU */ +#define RSN_TYPE_VALID_BITS (RSN_TYPE_NO_RSN | RSN_TYPE_WPA | RSN_TYPE_WPANONE | RSN_TYPE_WPA2) + +/** Embedded supplicant cipher type: TKIP */ +#define EMBED_CIPHER_TKIP MBIT(2) +/** Embedded supplicant cipher type: AES */ +#define EMBED_CIPHER_AES MBIT(3) +/** Embedded supplicant cipher type: RFU */ +#define EMBED_CIPHER_VALID_BITS (EMBED_CIPHER_TKIP | EMBED_CIPHER_AES) + +/** Type definition of mlan_ds_passphrase for MLAN_OID_SEC_CFG_PASSPHRASE */ +typedef struct _mlan_ds_passphrase { + /** SSID may be used */ + mlan_802_11_ssid ssid; + /** BSSID may be used */ + mlan_802_11_mac_addr bssid; + /** Flag for passphrase or pmk used */ + t_u16 psk_type; + /** Passphrase or PMK */ + union { + /** Passphrase */ + mlan_passphrase_t passphrase; + /** PMK */ + mlan_pmk_t pmk; + } psk; +} mlan_ds_passphrase, *pmlan_ds_passphrase; + +/** Type definition of mlan_ds_esupp_mode for MLAN_OID_SEC_CFG_ESUPP_MODE */ +typedef struct _mlan_ds_ewpa_mode { + /** RSN mode */ + t_u32 rsn_mode; + /** Active pairwise cipher */ + t_u32 act_paircipher; + /** Active pairwise cipher */ + t_u32 act_groupcipher; +} mlan_ds_esupp_mode, *pmlan_ds_esupp_mode; + /** Type definition of mlan_ds_sec_cfg for MLAN_IOCTL_SEC_CFG */ typedef struct _mlan_ds_sec_cfg { /** Sub-command */ @@ -1674,6 +1809,14 @@ typedef struct _mlan_ds_sec_cfg { t_u32 port_ctrl_enabled; /** Encryption key for MLAN_OID_SEC_CFG_ENCRYPT_KEY */ mlan_ds_encrypt_key encrypt_key; + /** Passphrase for MLAN_OID_SEC_CFG_PASSPHRASE */ + mlan_ds_passphrase passphrase; + /** Embedded supplicant WPA enabled flag for + * MLAN_OID_SEC_CFG_EWPA_ENABLED + */ + t_u32 ewpa_enabled; + /** Embedded supplicant mode for MLAN_OID_SEC_CFG_ESUPP_MODE */ + mlan_ds_esupp_mode esupp_mode; #ifdef UAP_SUPPORT t_u8 sta_mac[MLAN_MAC_ADDR_LENGTH]; #endif @@ -1778,9 +1921,9 @@ typedef struct _mlan_power_cfg_t { } mlan_power_cfg_t; /** max power table size */ -#define MAX_POWER_TABLE_SIZE 128 +#define MAX_POWER_TABLE_SIZE 128 /** The HT BW40 bit in Tx rate index */ -#define TX_RATE_HT_BW40_BIT MBIT(7) +#define TX_RATE_HT_BW40_BIT MBIT(7) /** Type definition of mlan_power_cfg_ext for MLAN_OID_POWER_CFG_EXT */ typedef struct _mlan_power_cfg_ext { @@ -2053,6 +2196,17 @@ typedef struct _mlan_ds_pm_cfg { } param; } mlan_ds_pm_cfg, *pmlan_ds_pm_cfg; +#ifdef RX_PACKET_COALESCE +typedef struct { + mlan_cmd_result_e cmd_result; /**< Firmware execution result */ + + t_u32 pkt_threshold; + /** Packet threshold */ + t_u16 delay; + /** Timeout value in milliseconds */ +} wlan_ioctl_rx_pkt_coalesce_config_t; +#endif + /*-----------------------------------------------------------------*/ /** WMM Configuration Group */ /*-----------------------------------------------------------------*/ @@ -2163,7 +2317,7 @@ typedef struct { /** Type definition of mlan_ds_wmm_queue_stats * for MLAN_OID_WMM_CFG_QUEUE_STATS */ - mlan_ds_wmm_queue_stats, *pmlan_ds_wmm_queue_stats; +mlan_ds_wmm_queue_stats, *pmlan_ds_wmm_queue_stats; /** * @brief IOCTL sub structure for a specific WMM AC Status @@ -2195,7 +2349,7 @@ typedef struct { /** Type definition of mlan_ds_wmm_queue_status * for MLAN_OID_WMM_CFG_QUEUE_STATUS */ - mlan_ds_wmm_queue_status, *pmlan_ds_wmm_queue_status; +mlan_ds_wmm_queue_status, *pmlan_ds_wmm_queue_status; /** Type definition of mlan_ds_wmm_addts for MLAN_OID_WMM_CFG_ADDTS */ typedef struct _mlan_ds_wmm_addts { @@ -2406,6 +2560,10 @@ typedef struct _mlan_ds_11n_cfg { mlan_ds_11n_delba del_ba; /** Reject Addba Req for MLAN_OID_11N_CFG_REJECT_ADDBA_REQ */ mlan_ds_reject_addba_req reject_addba_req; + /** Control coex RX window size configuration */ + t_u32 coex_rx_winsize; + /** Control TX AMPDU configuration */ + t_u32 txaggrctrl; } param; } mlan_ds_11n_cfg, *pmlan_ds_11n_cfg; @@ -2464,12 +2622,19 @@ typedef struct _mlan_ds_11d_cfg { /*-----------------------------------------------------------------*/ /** Register Memory Access Group */ /*-----------------------------------------------------------------*/ +/** Enumeration for CSU target device type */ +enum _mlan_csu_target_type { + MLAN_CSU_TARGET_CAU = 1, + MLAN_CSU_TARGET_PSU, +}; + /** Enumeration for register type */ enum _mlan_reg_type { MLAN_REG_MAC = 1, MLAN_REG_BBP, MLAN_REG_RF, MLAN_REG_CAU = 5, + MLAN_REG_PSU = 6, }; /** Type definition of mlan_ds_reg_rw for MLAN_OID_REG_RW */ @@ -2522,6 +2687,37 @@ typedef struct _mlan_ds_reg_mem { /** Multi-Radio Configuration Group */ /*-----------------------------------------------------------------*/ +/*-----------------------------------------------------------------*/ +/** 802.11h Configuration Group */ +/*-----------------------------------------------------------------*/ +#if defined(DFS_TESTING_SUPPORT) +/** Type definition of mlan_ds_11h_dfs_testing for MLAN_OID_11H_DFS_TESTING */ +typedef struct _mlan_ds_11h_dfs_testing { + /** User-configured CAC period in milliseconds, 0 to use default */ + t_u16 usr_cac_period_msec; + /** User-configured NOP period in seconds, 0 to use default */ + t_u16 usr_nop_period_sec; + /** User-configured skip channel change, 0 to disable */ + t_u8 usr_no_chan_change; + /** User-configured fixed channel to change to, 0 to use random channel */ + t_u8 usr_fixed_new_chan; +} mlan_ds_11h_dfs_testing, *pmlan_ds_11h_dfs_testing; +#endif + +/** Type definition of mlan_ds_11h_cfg for MLAN_IOCTL_11H_CFG */ +typedef struct _mlan_ds_11h_cfg { + /** Sub-command */ + t_u32 sub_command; + union { + /** Local power constraint for MLAN_OID_11H_LOCAL_POWER_CONSTRAINT */ + t_s8 usr_local_power_constraint; +#if defined(DFS_TESTING_SUPPORT) + /** User-configuation for MLAN_OID_11H_DFS_TESTING */ + mlan_ds_11h_dfs_testing dfs_testing; +#endif + } param; +} mlan_ds_11h_cfg, *pmlan_ds_11h_cfg; + /*-----------------------------------------------------------------*/ /** Miscellaneous Configuration Group */ /*-----------------------------------------------------------------*/ @@ -2537,6 +2733,9 @@ typedef struct _mlan_ds_reg_mem { /** Enumeration for IE type */ enum _mlan_ie_type { MLAN_IE_TYPE_GEN_IE = 0, +#ifdef STA_SUPPORT + MLAN_IE_TYPE_ARP_FILTER, +#endif /* STA_SUPPORT */ }; /** Type definition of mlan_ds_misc_gen_ie for MLAN_OID_MISC_GEN_IE */ @@ -2614,6 +2813,12 @@ enum _mlan_func_cmd { MLAN_FUNC_SHUTDOWN, }; +/** Enumeration for Coalescing status */ +enum _mlan_coal_status { + MLAN_MISC_COALESCING_ENABLE = 1, + MLAN_MISC_COALESCING_DISABLE = 0 +}; + /** Type definition of mlan_ds_misc_tx_datapause * for MLAN_OID_MISC_TX_DATAPAUSE */ @@ -2634,6 +2839,8 @@ typedef struct _mlan_ds_misc_tx_datapause { #define IPADDR_TYPE_IPV4 (1) /** IP operation remove */ #define MLAN_IPADDR_OP_IP_REMOVE (0) +/** IP operation ARP filter */ +#define MLAN_IPADDR_OP_ARP_FILTER MBIT(0) /** IP operation ARP response */ #define MLAN_IPADDR_OP_AUTO_ARP_RESP MBIT(1) @@ -2690,31 +2897,31 @@ typedef struct _mlan_ds_misc_country_code { /** action for clear */ #define SUBSCRIBE_EVT_ACT_BITWISE_CLR 0x0003 /** BITMAP for subscribe event rssi low */ -#define SUBSCRIBE_EVT_RSSI_LOW MBIT(0) +#define SUBSCRIBE_EVT_RSSI_LOW MBIT(0) /** BITMAP for subscribe event snr low */ -#define SUBSCRIBE_EVT_SNR_LOW MBIT(1) +#define SUBSCRIBE_EVT_SNR_LOW MBIT(1) /** BITMAP for subscribe event max fail */ -#define SUBSCRIBE_EVT_MAX_FAIL MBIT(2) +#define SUBSCRIBE_EVT_MAX_FAIL MBIT(2) /** BITMAP for subscribe event beacon missed */ -#define SUBSCRIBE_EVT_BEACON_MISSED MBIT(3) +#define SUBSCRIBE_EVT_BEACON_MISSED MBIT(3) /** BITMAP for subscribe event rssi high */ -#define SUBSCRIBE_EVT_RSSI_HIGH MBIT(4) +#define SUBSCRIBE_EVT_RSSI_HIGH MBIT(4) /** BITMAP for subscribe event snr high */ -#define SUBSCRIBE_EVT_SNR_HIGH MBIT(5) +#define SUBSCRIBE_EVT_SNR_HIGH MBIT(5) /** BITMAP for subscribe event data rssi low */ -#define SUBSCRIBE_EVT_DATA_RSSI_LOW MBIT(6) +#define SUBSCRIBE_EVT_DATA_RSSI_LOW MBIT(6) /** BITMAP for subscribe event data snr low */ -#define SUBSCRIBE_EVT_DATA_SNR_LOW MBIT(7) +#define SUBSCRIBE_EVT_DATA_SNR_LOW MBIT(7) /** BITMAP for subscribe event data rssi high */ -#define SUBSCRIBE_EVT_DATA_RSSI_HIGH MBIT(8) +#define SUBSCRIBE_EVT_DATA_RSSI_HIGH MBIT(8) /** BITMAP for subscribe event data snr high */ -#define SUBSCRIBE_EVT_DATA_SNR_HIGH MBIT(9) +#define SUBSCRIBE_EVT_DATA_SNR_HIGH MBIT(9) /** BITMAP for subscribe event link quality */ -#define SUBSCRIBE_EVT_LINK_QUALITY MBIT(10) +#define SUBSCRIBE_EVT_LINK_QUALITY MBIT(10) /** BITMAP for subscribe event pre_beacon_lost */ -#define SUBSCRIBE_EVT_PRE_BEACON_LOST MBIT(11) +#define SUBSCRIBE_EVT_PRE_BEACON_LOST MBIT(11) /** default PRE_BEACON_MISS_COUNT */ -#define DEFAULT_PRE_BEACON_MISS 30 +#define DEFAULT_PRE_BEACON_MISS 30 /** Type definition of mlan_ds_subscribe_evt for MLAN_OID_MISC_CFP_CODE */ typedef struct _mlan_ds_subscribe_evt { @@ -2841,6 +3048,26 @@ typedef struct _mlan_ds_wifi_direct_config { } mlan_ds_wifi_direct_config; #endif +#if defined(STA_SUPPORT) +typedef struct _mlan_ds_misc_pmfcfg { + /** Management Frame Protection Capable */ + t_u8 mfpc; + /** Management Frame Protection Required */ + t_u8 mfpr; +} mlan_ds_misc_pmfcfg; +#endif + +typedef MLAN_PACK_START struct _mlan_ds_multi_chan_cfg { + /** Channel Time */ + t_u32 channel_time; + /** Buffer Weight */ + t_u8 buffer_weight; + /** tlv len */ + t_u16 tlv_len; + /** TLV buffer */ + t_u8 tlv_buf[0]; +} MLAN_PACK_END mlan_ds_multi_chan_cfg; + /**Action ID for TDLS disable link*/ #define WLAN_TDLS_DISABLE_LINK 0x00 /**Action ID for TDLS enable link*/ @@ -2857,7 +3084,7 @@ typedef struct _mlan_ds_misc_tdls_oper { t_u16 tdls_action; /** TDLS peer address */ t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; - /** peer capability */ + /** peer capability */ t_u16 capability; /** peer qos info */ t_u8 qos_info; @@ -2879,6 +3106,8 @@ typedef struct _mlan_ds_misc_tdls_oper { #define TDLS_IE_FLAGS_HTCAP 0x0002 /** flag for TDLS HTINFO */ #define TDLS_IE_FLAGS_HTINFO 0x0004 +/** flag for TDLS Supported channels and regulatory class IE*/ +#define TDLS_IE_FLAGS_SUPP_CS_IE 0x0040 /** TDLS ie buffer */ typedef struct _mlan_ds_misc_tdls_ies { @@ -2894,6 +3123,15 @@ typedef struct _mlan_ds_misc_tdls_ies { t_u8 ht_info[IEEE_MAX_IE_SIZE]; } mlan_ds_misc_tdls_ies; +#ifdef RX_PACKET_COALESCE +typedef struct _mlan_ds_misc_rx_packet_coalesce { + /** packet threshold */ + t_u32 packet_threshold; + /** timeout value */ + t_u16 delay; +} mlan_ds_misc_rx_packet_coalesce; +#endif + /** Type definition of mlan_ds_misc_cfg for MLAN_IOCTL_MISC_CFG */ typedef struct _mlan_ds_misc_cfg { /** Sub-command */ @@ -2918,6 +3156,8 @@ typedef struct _mlan_ds_misc_cfg { mlan_ds_misc_assoc_rsp assoc_resp; /** Function init/shutdown for MLAN_OID_MISC_INIT_SHUTDOWN */ t_u32 func_init_shutdown; + /** Coalescing status for MLAN_OID_MISC_COALESCING_STATUS */ + t_u16 coalescing_status; /** Custom IE for MLAN_OID_MISC_CUSTOM_IE */ mlan_ds_misc_custom_ie cust_ie; /** TDLS configuration for MLAN_OID_MISC_TDLS_CONFIG */ @@ -2948,17 +3188,35 @@ typedef struct _mlan_ds_misc_cfg { /** Driver debug bit masks */ t_u32 drvdbg; #endif + /** Hotspot config param set */ + t_u32 hotspot_cfg; #ifdef STA_SUPPORT t_u8 ext_cap[8]; #endif mlan_ds_misc_otp_user_data otp_user_data; /** Tx control */ t_u32 tx_control; +#if defined(STA_SUPPORT) + mlan_ds_misc_pmfcfg pmfcfg; +#endif + /** Multi-channel config for MLAN_OID_MISC_MULTI_CHAN_CFG */ + mlan_ds_multi_chan_cfg multi_chan_cfg; + /** Multi-channel policy for MLAN_OID_MISC_MULTI_CHAN_POLICY */ + t_u16 multi_chan_policy; #ifdef WIFI_DIRECT_SUPPORT mlan_ds_wifi_direct_config p2p_config; #endif t_u8 low_pwr_mode; +#ifdef RX_PACKET_COALESCE + mlan_ds_misc_rx_packet_coalesce rx_coalesce; +#endif } param; } mlan_ds_misc_cfg, *pmlan_ds_misc_cfg; +/** Hotspot status enable */ +#define HOTSPOT_ENABLED MBIT(0) +/** Hotspot status disable */ +#define HOTSPOT_DISABLED MFALSE +/** Keep Hotspot2.0 compatible in mwu and wpa_supplicant */ +#define HOTSPOT_BY_SUPPLICANT MBIT(1) #endif /* !_MLAN_IOCTL_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_join.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_join.c old mode 100755 new mode 100644 index 82766b35..bba23ea1 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_join.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_join.c @@ -34,7 +34,10 @@ Change log: #include "mlan_main.h" #include "mlan_wmm.h" #include "mlan_11n.h" - +#include "mlan_11h.h" +#ifdef DRV_EMBEDDED_SUPPLICANT +#include "authenticator_api.h" +#endif /******************************************************** Local Constants ********************************************************/ @@ -63,7 +66,7 @@ Change log: * @return bytes added to the buffer */ static int -wlan_cmd_append_generic_ie(mlan_private * priv, t_u8 ** ppbuffer) +wlan_cmd_append_generic_ie(mlan_private *priv, t_u8 **ppbuffer) { int ret_len = 0; MrvlIEtypesHeader_t ie_header; @@ -137,8 +140,8 @@ wlan_cmd_append_generic_ie(mlan_private * priv, t_u8 ** ppbuffer) * @return bytes added to the buffer */ static int -wlan_cmd_append_tsf_tlv(mlan_private * pmriv, t_u8 ** ppbuffer, - BSSDescriptor_t * pbss_desc) +wlan_cmd_append_tsf_tlv(mlan_private *pmriv, t_u8 **ppbuffer, + BSSDescriptor_t *pbss_desc) { MrvlIEtypes_TsfTimestamp_t tsf_tlv; t_u64 tsf_val; @@ -200,12 +203,12 @@ wlan_cmd_append_tsf_tlv(mlan_private * pmriv, t_u8 ** ppbuffer, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_get_common_rates(IN mlan_private * pmpriv, - IN t_u8 * rate1, - IN t_u32 rate1_size, IN t_u8 * rate2, IN t_u32 rate2_size) +wlan_get_common_rates(IN mlan_private *pmpriv, + IN t_u8 *rate1, + IN t_u32 rate1_size, IN t_u8 *rate2, IN t_u32 rate2_size) { mlan_status ret = MLAN_STATUS_SUCCESS; - mlan_callbacks *pcb = (mlan_callbacks *) & pmpriv->adapter->callbacks; + mlan_callbacks *pcb = (mlan_callbacks *)&pmpriv->adapter->callbacks; t_u8 *ptr = rate1; t_u8 *tmp = MNULL; t_u32 i, j; @@ -275,10 +278,9 @@ wlan_get_common_rates(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_setup_rates_from_bssdesc(IN mlan_private * pmpriv, - IN BSSDescriptor_t * pbss_desc, - OUT t_u8 * pout_rates, - OUT t_u32 * pout_rates_size) +wlan_setup_rates_from_bssdesc(IN mlan_private *pmpriv, + IN BSSDescriptor_t *pbss_desc, + OUT t_u8 *pout_rates, OUT t_u32 *pout_rates_size) { t_u8 card_rates[WLAN_SUPPORTED_RATES]; t_u32 card_rates_size = 0; @@ -326,8 +328,8 @@ wlan_setup_rates_from_bssdesc(IN mlan_private * pmpriv, * @return N/A */ static t_void -wlan_update_tsf_timestamps(IN mlan_private * pmpriv, - IN BSSDescriptor_t * pnew_bss_desc) +wlan_update_tsf_timestamps(IN mlan_private *pmpriv, + IN BSSDescriptor_t *pnew_bss_desc) { mlan_adapter *pmadapter = pmpriv->adapter; t_u32 table_idx; @@ -365,7 +367,7 @@ wlan_update_tsf_timestamps(IN mlan_private * pmpriv, * @return bytes added to the buffer */ static int -wlan_cmd_append_wapi_ie(mlan_private * priv, t_u8 ** ppbuffer) +wlan_cmd_append_wapi_ie(mlan_private *priv, t_u8 **ppbuffer) { int retlen = 0; MrvlIEtypesHeader_t ie_header; @@ -416,9 +418,178 @@ wlan_cmd_append_wapi_ie(mlan_private * priv, t_u8 ** ppbuffer) return retlen; } +/** + * @brief Append a osen IE + * + * This function is called from the network join command prep. routine. + * If the IE buffer has been setup by the application, this routine appends + * the buffer as a osen TLV type to the request. + * + * @param priv A pointer to mlan_private structure + * @param ppbuffer pointer to command buffer pointer + * + * @return bytes added to the buffer + */ +static int +wlan_cmd_append_osen_ie(mlan_private *priv, t_u8 **ppbuffer) +{ + int retlen = 0; + MrvlIEtypesHeader_t ie_header; + + ENTER(); + + /* Null Checks */ + if (ppbuffer == MNULL) { + LEAVE(); + return 0; + } + if (*ppbuffer == MNULL) { + LEAVE(); + return 0; + } + + /* + * If there is a osen ie buffer setup, append it to the return + * parameter buffer pointer. + */ + if (priv->osen_ie_len) { + PRINTM(MCMND, "append osen ie %d to %p\n", priv->osen_ie_len, + *ppbuffer); + + /* Wrap the generic IE buffer with a pass through TLV type */ + ie_header.type = wlan_cpu_to_le16(TLV_TYPE_VENDOR_SPECIFIC_IE); + ie_header.len = wlan_cpu_to_le16(priv->osen_ie[1]); + memcpy(priv->adapter, *ppbuffer, &ie_header, sizeof(ie_header)); + + /* Increment the return size and the return buffer pointer + param */ + *ppbuffer += sizeof(ie_header); + retlen += sizeof(ie_header); + + /* Copy the osen IE buffer to the output buffer, advance + pointer */ + memcpy(priv->adapter, *ppbuffer, &priv->osen_ie[2], + priv->osen_ie[1]); + + /* Increment the return size and the return buffer pointer + param */ + *ppbuffer += priv->osen_ie[1]; + retlen += priv->osen_ie[1]; + + } + /* return the length appended to the buffer */ + LEAVE(); + return retlen; +} + /******************************************************** Global Functions ********************************************************/ +/** + * @brief This function updates RSN IE in the association request. + * + * @param pmpriv A pointer to mlan_private structure + * + * @param ptlv_rsn_ie A pointer to rsn_ie TLV + */ +void +wlan_update_rsn_ie(mlan_private *pmpriv, MrvlIEtypes_RsnParamSet_t *ptlv_rsn_ie) +{ + t_u16 *prsn_cap; + t_u16 *ptr; + t_u16 *akm_suite_count_ptr; + t_u16 pmf_mask = 0x00; + t_u8 *temp; + int pairwise_cipher_count = 0; + int akm_suite_count = 0; + int temp_akm_suite_count = 0; + int found = 0; + t_u8 sha_256_oui[4] = { 0x00, 0x0f, 0xac, 0x06 }; + mlan_adapter *pmadapter = pmpriv->adapter; + + pmf_mask = + (((pmpriv->pmfcfg.mfpc << MFPC_BIT) | (pmpriv->pmfcfg. + mfpr << MFPR_BIT)) | + (~PMF_MASK)); + /* prsn_cap = prsn_ie->rsn_ie + 2 bytes version + 4 bytes + group_cipher_suite + 2 bytes pairwise_cipher_count + + pairwise_cipher_count * PAIRWISE_CIPHER_SUITE_LEN + 2 bytes + akm_suite_count + akm_suite_count * AKM_SUITE_LEN */ + ptr = (t_u16 *)(ptlv_rsn_ie->rsn_ie + sizeof(t_u16) + 4 * sizeof(t_u8)); + pairwise_cipher_count = *ptr; + ptr = (t_u16 *)(ptlv_rsn_ie->rsn_ie + sizeof(t_u16) + 4 * sizeof(t_u8) + + sizeof(t_u16) + + pairwise_cipher_count * PAIRWISE_CIPHER_SUITE_LEN); + temp_akm_suite_count = *ptr; + akm_suite_count = *ptr; + /* Save pointer to akm_suite_count in RSN IE to update it later */ + akm_suite_count_ptr = ptr; + temp = ptlv_rsn_ie->rsn_ie + sizeof(t_u16) + 4 * sizeof(t_u8) + + sizeof(t_u16) + pairwise_cipher_count + * PAIRWISE_CIPHER_SUITE_LEN + sizeof(t_u16); + /* ptr now points to the 1st AKM suite */ + if (temp_akm_suite_count > 1) { + while (temp_akm_suite_count) { + if (!memcmp + (pmadapter, temp, sha_256_oui, AKM_SUITE_LEN)) { + found = 1; + break; + } + temp += AKM_SUITE_LEN; + temp_akm_suite_count--; + } + if (found) { + /* Copy SHA256 as AKM suite */ + memcpy(pmadapter, + ptlv_rsn_ie->rsn_ie + (sizeof(t_u16) + + 4 * sizeof(t_u8) + + sizeof(t_u16) + + pairwise_cipher_count * + PAIRWISE_CIPHER_SUITE_LEN + + sizeof(t_u16)), + sha_256_oui, AKM_SUITE_LEN); + /* Shift remaining bytes of RSN IE after this */ + memmove(pmadapter, + ptlv_rsn_ie->rsn_ie + (sizeof(t_u16) + + 4 * sizeof(t_u8) + + sizeof(t_u16) + + pairwise_cipher_count * + PAIRWISE_CIPHER_SUITE_LEN + + sizeof(t_u16) + + AKM_SUITE_LEN), + ptlv_rsn_ie->rsn_ie + (sizeof(t_u16) + + 4 * sizeof(t_u8) + + sizeof(t_u16) + + pairwise_cipher_count * + PAIRWISE_CIPHER_SUITE_LEN + + sizeof(t_u16) + + akm_suite_count * + AKM_SUITE_LEN), + ptlv_rsn_ie->header.len - (sizeof(t_u16) + + 4 * sizeof(t_u8) + + sizeof(t_u16) + + pairwise_cipher_count + * + PAIRWISE_CIPHER_SUITE_LEN + + sizeof(t_u16) + + akm_suite_count * + AKM_SUITE_LEN)); + ptlv_rsn_ie->header.len = + ptlv_rsn_ie->header.len - (akm_suite_count - + 1) * AKM_SUITE_LEN; + /* Update akm suite count */ + akm_suite_count = 1; + *akm_suite_count_ptr = akm_suite_count; + } + } + ptr = (t_u16 *)(ptlv_rsn_ie->rsn_ie + sizeof(t_u16) + 4 * sizeof(t_u8) + + sizeof(t_u16) + + pairwise_cipher_count * PAIRWISE_CIPHER_SUITE_LEN + + sizeof(t_u16) + akm_suite_count * AKM_SUITE_LEN); + prsn_cap = ptr; + *prsn_cap |= PMF_MASK; + *prsn_cap &= pmf_mask; +} /** * @brief This function prepares command of association. @@ -431,8 +602,8 @@ wlan_cmd_append_wapi_ie(mlan_private * priv, t_u8 ** ppbuffer) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_cmd_802_11_associate(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * cmd, IN t_void * pdata_buf) +wlan_cmd_802_11_associate(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_adapter *pmadapter = pmpriv->adapter; @@ -443,17 +614,20 @@ wlan_cmd_802_11_associate(IN mlan_private * pmpriv, MrvlIEtypes_SsParamSet_t *pss_tlv; MrvlIEtypes_RatesParamSet_t *prates_tlv; MrvlIEtypes_AuthType_t *pauth_tlv; - MrvlIEtypes_RsnParamSet_t *prsn_ie_tlv; + MrvlIEtypes_RsnParamSet_t *prsn_ie_tlv = MNULL; MrvlIEtypes_ChanListParamSet_t *pchan_tlv; WLAN_802_11_RATES rates; t_u32 rates_size; t_u16 tmp_cap; t_u8 *pos; +#ifdef DRV_EMBEDDED_SUPPLICANT + void *rsn_wpa_ie_tmp = MNULL; +#endif ENTER(); - pbss_desc = (BSSDescriptor_t *) pdata_buf; - pos = (t_u8 *) passo; + pbss_desc = (BSSDescriptor_t *)pdata_buf; + pos = (t_u8 *)passo; cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_ASSOCIATE); @@ -474,15 +648,15 @@ wlan_cmd_802_11_associate(IN mlan_private * pmpriv, pos += sizeof(passo->beacon_period); pos += sizeof(passo->dtim_period); - pssid_tlv = (MrvlIEtypes_SsIdParamSet_t *) pos; + pssid_tlv = (MrvlIEtypes_SsIdParamSet_t *)pos; pssid_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_SSID); - pssid_tlv->header.len = (t_u16) pbss_desc->ssid.ssid_len; + pssid_tlv->header.len = (t_u16)pbss_desc->ssid.ssid_len; memcpy(pmadapter, pssid_tlv->ssid, pbss_desc->ssid.ssid, pssid_tlv->header.len); pos += sizeof(pssid_tlv->header) + pssid_tlv->header.len; pssid_tlv->header.len = wlan_cpu_to_le16(pssid_tlv->header.len); - pphy_tlv = (MrvlIEtypes_PhyParamSet_t *) pos; + pphy_tlv = (MrvlIEtypes_PhyParamSet_t *)pos; pphy_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_PHY_DS); pphy_tlv->header.len = sizeof(pphy_tlv->fh_ds.ds_param_set); memcpy(pmadapter, &pphy_tlv->fh_ds.ds_param_set, @@ -491,7 +665,7 @@ wlan_cmd_802_11_associate(IN mlan_private * pmpriv, pos += sizeof(pphy_tlv->header) + pphy_tlv->header.len; pphy_tlv->header.len = wlan_cpu_to_le16(pphy_tlv->header.len); - pss_tlv = (MrvlIEtypes_SsParamSet_t *) pos; + pss_tlv = (MrvlIEtypes_SsParamSet_t *)pos; pss_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_CF); pss_tlv->header.len = sizeof(pss_tlv->cf_ibss.cf_param_set); pos += sizeof(pss_tlv->header) + pss_tlv->header.len; @@ -510,23 +684,23 @@ wlan_cmd_802_11_associate(IN mlan_private * pmpriv, rates_size); /* Setup the Rates TLV in the association command */ - prates_tlv = (MrvlIEtypes_RatesParamSet_t *) pos; + prates_tlv = (MrvlIEtypes_RatesParamSet_t *)pos; prates_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_RATES); - prates_tlv->header.len = wlan_cpu_to_le16((t_u16) rates_size); + prates_tlv->header.len = wlan_cpu_to_le16((t_u16)rates_size); memcpy(pmadapter, prates_tlv->rates, rates, rates_size); pos += sizeof(prates_tlv->header) + rates_size; PRINTM(MINFO, "ASSOC_CMD: Rates size = %d\n", rates_size); /* Add the Authentication type to be used for Auth frames if needed */ if (pmpriv->sec_info.authentication_mode != MLAN_AUTH_MODE_AUTO) { - pauth_tlv = (MrvlIEtypes_AuthType_t *) pos; + pauth_tlv = (MrvlIEtypes_AuthType_t *)pos; pauth_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_AUTH_TYPE); pauth_tlv->header.len = sizeof(pauth_tlv->auth_type); if ((pmpriv->sec_info.wep_status == Wlan802_11WEPEnabled) || (pmpriv->sec_info.authentication_mode == MLAN_AUTH_MODE_NETWORKEAP)) pauth_tlv->auth_type = - wlan_cpu_to_le16((t_u16) pmpriv->sec_info. + wlan_cpu_to_le16((t_u16)pmpriv->sec_info. authentication_mode); else pauth_tlv->auth_type = @@ -539,13 +713,14 @@ wlan_cmd_802_11_associate(IN mlan_private * pmpriv, && (pbss_desc->bss_band & pmpriv->config_bands) && !(ISSUPP_11NENABLED(pmadapter->fw_cap_info) && (!pbss_desc->disable_11n) - && (pmpriv->config_bands & BAND_GN) + && (pmpriv->config_bands & BAND_GN + || pmpriv->config_bands & BAND_AN) && (pbss_desc->pht_cap) ) ) { /* Append a channel TLV for the channel the attempted AP was found on */ - pchan_tlv = (MrvlIEtypes_ChanListParamSet_t *) pos; + pchan_tlv = (MrvlIEtypes_ChanListParamSet_t *)pos; pchan_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_CHANLIST); pchan_tlv->header.len = wlan_cpu_to_le16(sizeof(ChanScanParamSet_t)); @@ -558,7 +733,7 @@ wlan_cmd_802_11_associate(IN mlan_private * pmpriv, pchan_tlv->chan_scan_param[0].chan_number); pchan_tlv->chan_scan_param[0].radio_type = - wlan_band_to_radio_type((t_u8) pbss_desc->bss_band); + wlan_band_to_radio_type((t_u8)pbss_desc->bss_band); PRINTM(MINFO, "Assoc: TLV Band = %d\n", pchan_tlv->chan_scan_param[0].radio_type); @@ -567,14 +742,14 @@ wlan_cmd_802_11_associate(IN mlan_private * pmpriv, if (!pmpriv->wps.session_enable) { if ((pmpriv->sec_info.wpa_enabled || pmpriv->sec_info.wpa2_enabled)) { - prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *) pos; + prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *)pos; /* WPA_IE or RSN_IE */ - prsn_ie_tlv->header.type = (t_u16) pmpriv->wpa_ie[0]; + prsn_ie_tlv->header.type = (t_u16)pmpriv->wpa_ie[0]; prsn_ie_tlv->header.type = prsn_ie_tlv->header.type & 0x00FF; prsn_ie_tlv->header.type = wlan_cpu_to_le16(prsn_ie_tlv->header.type); - prsn_ie_tlv->header.len = (t_u16) pmpriv->wpa_ie[1]; + prsn_ie_tlv->header.len = (t_u16)pmpriv->wpa_ie[1]; prsn_ie_tlv->header.len = prsn_ie_tlv->header.len & 0x00FF; if (prsn_ie_tlv->header.len <= @@ -586,7 +761,7 @@ wlan_cmd_802_11_associate(IN mlan_private * pmpriv, ret = MLAN_STATUS_FAILURE; goto done; } - HEXDUMP("ASSOC_CMD: RSN IE", (t_u8 *) prsn_ie_tlv, + HEXDUMP("ASSOC_CMD: RSN IE", (t_u8 *)prsn_ie_tlv, sizeof(prsn_ie_tlv->header) + prsn_ie_tlv->header.len); pos += sizeof(prsn_ie_tlv->header) + @@ -594,24 +769,124 @@ wlan_cmd_802_11_associate(IN mlan_private * pmpriv, prsn_ie_tlv->header.len = wlan_cpu_to_le16(prsn_ie_tlv->header.len); } +#ifdef DRV_EMBEDDED_SUPPLICANT + else if (pmpriv->adapter->psdio_device->driver_supplicant_auth + && supplicantIsEnabled(pmpriv->psapriv)) { + supplicantClrEncryptKey(pmpriv->psapriv); + + if (pbss_desc->prsn_ie) + rsn_wpa_ie_tmp = pbss_desc->prsn_ie; + else if (pbss_desc->pwpa_ie) + rsn_wpa_ie_tmp = pbss_desc->pwpa_ie; + prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *)pos; + pos += supplicantFormatRsnWpaTlv(pmpriv->psapriv, + rsn_wpa_ie_tmp, + prsn_ie_tlv); + } +#endif + else if (pmpriv->sec_info.ewpa_enabled) { + prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *)pos; + if (pbss_desc->pwpa_ie) { + prsn_ie_tlv->header.type = + (t_u16)(*(pbss_desc->pwpa_ie)).vend_hdr. + element_id; + prsn_ie_tlv->header.type = + prsn_ie_tlv->header.type & 0x00FF; + prsn_ie_tlv->header.type = + wlan_cpu_to_le16(prsn_ie_tlv->header. + type); + prsn_ie_tlv->header.len = + (t_u16)(*(pbss_desc->pwpa_ie)).vend_hdr. + len; + prsn_ie_tlv->header.len = + prsn_ie_tlv->header.len & 0x00FF; + if (prsn_ie_tlv->header.len <= + (sizeof(pmpriv->wpa_ie))) { + memcpy(pmadapter, prsn_ie_tlv->rsn_ie, + &((*(pbss_desc->pwpa_ie)). + vend_hdr.oui[0]), + prsn_ie_tlv->header.len); + } else { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + HEXDUMP("ASSOC_CMD: RSN IE", + (t_u8 *)prsn_ie_tlv, + sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len); + pos += sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len; + prsn_ie_tlv->header.len = + wlan_cpu_to_le16(prsn_ie_tlv->header. + len); + } + if (pbss_desc->prsn_ie) { + prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *)pos; + prsn_ie_tlv->header.type = + (t_u16)(*(pbss_desc->prsn_ie)).ieee_hdr. + element_id; + prsn_ie_tlv->header.type = + prsn_ie_tlv->header.type & 0x00FF; + prsn_ie_tlv->header.type = + wlan_cpu_to_le16(prsn_ie_tlv->header. + type); + prsn_ie_tlv->header.len = + (t_u16)(*(pbss_desc->prsn_ie)).ieee_hdr. + len; + prsn_ie_tlv->header.len = + prsn_ie_tlv->header.len & 0x00FF; + if (prsn_ie_tlv->header.len <= + (sizeof(pmpriv->wpa_ie))) { + memcpy(pmadapter, prsn_ie_tlv->rsn_ie, + &((*(pbss_desc->prsn_ie)). + data[0]) + , prsn_ie_tlv->header.len); + if (pmpriv->pmfcfg.mfpc || + pmpriv->pmfcfg.mfpr) { + wlan_update_rsn_ie(pmpriv, + prsn_ie_tlv); + } + } else { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + HEXDUMP("ASSOC_CMD: RSN IE", + (t_u8 *)prsn_ie_tlv, + sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len); + pos += sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len; + prsn_ie_tlv->header.len = + wlan_cpu_to_le16(prsn_ie_tlv->header. + len); + } + } } if (ISSUPP_11NENABLED(pmadapter->fw_cap_info) && (!pbss_desc->disable_11n) - && (pmpriv->config_bands & BAND_GN)) + && (pmpriv->config_bands & BAND_GN + || pmpriv->config_bands & BAND_AN)) wlan_cmd_append_11n_tlv(pmpriv, pbss_desc, &pos); + else if ((pmpriv->hotspot_cfg & HOTSPOT_ENABLED) && + !(pmpriv->hotspot_cfg & HOTSPOT_BY_SUPPLICANT)) + wlan_add_ext_capa_info_ie(pmpriv, &pos); wlan_wmm_process_association_req(pmpriv, &pos, &pbss_desc->wmm_ie, pbss_desc->pht_cap); if (pmpriv->sec_info.wapi_enabled && pmpriv->wapi_ie_len) wlan_cmd_append_wapi_ie(pmpriv, &pos); + if (pmpriv->sec_info.osen_enabled && pmpriv->osen_ie_len) + wlan_cmd_append_osen_ie(pmpriv, &pos); + wlan_cmd_append_generic_ie(pmpriv, &pos); wlan_cmd_append_tsf_tlv(pmpriv, &pos, pbss_desc); - if (wlan_11d_create_dnld_countryinfo - (pmpriv, (t_u8) pbss_desc->bss_band)) { + if (wlan_11d_create_dnld_countryinfo(pmpriv, (t_u8)pbss_desc->bss_band)) { PRINTM(MERROR, "Dnld_countryinfo_11d failed\n"); ret = MLAN_STATUS_FAILURE; goto done; @@ -622,7 +897,16 @@ wlan_cmd_802_11_associate(IN mlan_private * pmpriv, goto done; } - cmd->size = wlan_cpu_to_le16((t_u16) (pos - (t_u8 *) passo) + S_DS_GEN); + /* + * Call 11h join API after capability bits are set so adhoc/infra 11h + * behavior can be properly triggered. pos modified if data is appended + */ + wlan_11h_process_join(pmpriv, &pos, &passo->cap_info, + (t_u8)pbss_desc->bss_band, + pbss_desc->phy_param_set.ds_param_set. + current_chan, &pbss_desc->wlan_11h_bss_info); + + cmd->size = wlan_cpu_to_le16((t_u16)(pos - (t_u8 *)passo) + S_DS_GEN); /* Set the Capability info at last */ memcpy(pmadapter, &tmp_cap, &pbss_desc->cap_info, @@ -719,31 +1003,30 @@ wlan_cmd_802_11_associate(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_ret_802_11_associate(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * resp, IN t_void * pioctl_buf) +wlan_ret_802_11_associate(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, IN t_void *pioctl_buf) { mlan_status ret = MLAN_STATUS_SUCCESS; - mlan_ioctl_req *pioctl_req = (mlan_ioctl_req *) pioctl_buf; + mlan_ioctl_req *pioctl_req = (mlan_ioctl_req *)pioctl_buf; IEEEtypes_AssocRsp_t *passoc_rsp; BSSDescriptor_t *pbss_desc; t_u8 enable_data = MTRUE; t_u8 event_buf[100]; - mlan_event *pevent = (mlan_event *) event_buf; + mlan_event *pevent = (mlan_event *)event_buf; t_u8 cur_mac[MLAN_MAC_ADDR_LENGTH]; t_u8 media_connected = pmpriv->media_connected; mlan_adapter *pmadapter = pmpriv->adapter; ENTER(); - passoc_rsp = (IEEEtypes_AssocRsp_t *) & resp->params; + passoc_rsp = (IEEEtypes_AssocRsp_t *)&resp->params; passoc_rsp->status_code = wlan_le16_to_cpu(passoc_rsp->status_code); if (pmpriv->media_connected == MTRUE) memcpy(pmpriv->adapter, cur_mac, pmpriv->curr_bss_params.bss_descriptor.mac_address, MLAN_MAC_ADDR_LENGTH); - HEXDUMP("ASSOC_RESP:", (t_u8 *) & resp->params, - (resp->size - S_DS_GEN)); + HEXDUMP("ASSOC_RESP:", (t_u8 *)&resp->params, (resp->size - S_DS_GEN)); pmpriv->assoc_rsp_size = MIN(resp->size - S_DS_GEN, sizeof(pmpriv->assoc_rsp_buf)); @@ -770,7 +1053,7 @@ wlan_ret_802_11_associate(IN mlan_private * pmpriv, PRINTM(MERROR, "ASSOC_RESP: Association Failed, " "status code = %d, error = 0x%x, a_id = 0x%x\n", wlan_le16_to_cpu(passoc_rsp->status_code), - wlan_le16_to_cpu(*(t_u16 *) & passoc_rsp->capability), + wlan_le16_to_cpu(*(t_u16 *)&passoc_rsp->capability), wlan_le16_to_cpu(passoc_rsp->a_id)); ret = MLAN_STATUS_FAILURE; @@ -798,7 +1081,7 @@ wlan_ret_802_11_associate(IN mlan_private * pmpriv, pmpriv->curr_bss_params.bss_descriptor.channel = pbss_desc->phy_param_set.ds_param_set.current_chan; - pmpriv->curr_bss_params.band = (t_u8) pbss_desc->bss_band; + pmpriv->curr_bss_params.band = (t_u8)pbss_desc->bss_band; /* * Adjust the timestamps in the scan table to be relative to the newly @@ -868,8 +1151,8 @@ wlan_ret_802_11_associate(IN mlan_private * pmpriv, pevent->bss_index = pmpriv->bss_index; pevent->event_id = MLAN_EVENT_ID_DRV_CONNECTED; pevent->event_len = MLAN_MAC_ADDR_LENGTH; - memcpy(pmpriv->adapter, (t_u8 *) pevent->event_buf, - (t_u8 *) pmpriv->curr_bss_params.bss_descriptor.mac_address, + memcpy(pmpriv->adapter, (t_u8 *)pevent->event_buf, + (t_u8 *)pmpriv->curr_bss_params.bss_descriptor.mac_address, MLAN_MAC_ADDR_LENGTH); /* Add the ra_list here for infra mode as there will be only 1 ra @@ -901,10 +1184,18 @@ wlan_ret_802_11_associate(IN mlan_private * pmpriv, /* Send OBSS scan param to the application if available */ wlan_2040_coex_event(pmpriv); + wlan_coex_ampdu_rxwinsize(pmadapter); if (!pmpriv->sec_info.wpa_enabled && !pmpriv->sec_info.wpa2_enabled - && !pmpriv->sec_info.wapi_enabled && !pmpriv->wps.session_enable) { + && !pmpriv->sec_info.ewpa_enabled + && !pmpriv->sec_info.wapi_enabled + && !pmpriv->wps.session_enable && !pmpriv->sec_info.osen_enabled +#ifdef DRV_EMBEDDED_SUPPLICANT + && (pmpriv->adapter->psdio_device->driver_supplicant_auth && + !supplicantIsEnabled(pmpriv->psapriv)) +#endif + ) { /* We are in Open/WEP mode, open port immediately */ if (pmpriv->port_ctrl_mode == MTRUE) { pmpriv->port_open = MTRUE; @@ -914,9 +1205,28 @@ wlan_ret_802_11_associate(IN mlan_private * pmpriv, if (pmpriv->sec_info.wpa_enabled || pmpriv->sec_info.wpa2_enabled - || pmpriv->sec_info.wapi_enabled || pmpriv->wps.session_enable) + || pmpriv->sec_info.ewpa_enabled + || pmpriv->sec_info.wapi_enabled + || pmpriv->wps.session_enable || pmpriv->sec_info.osen_enabled +#ifdef DRV_EMBEDDED_SUPPLICANT + || (pmpriv->adapter->psdio_device->driver_supplicant_auth && + supplicantIsEnabled(pmpriv->psapriv)) +#endif + ) pmpriv->adapter->scan_block = MTRUE; +#ifdef DRV_EMBEDDED_SUPPLICANT + if (pmpriv->adapter->psdio_device->driver_supplicant_auth) + supplicantInitSession(pmpriv->psapriv, + (t_u8 *)&pmpriv->curr_bss_params. + bss_descriptor.ssid.ssid, + pmpriv->curr_bss_params.bss_descriptor. + ssid.ssid_len, + (t_u8 *)&pmpriv->curr_bss_params. + bss_descriptor.mac_address, + (t_u8 *)&pmpriv->curr_addr); +#endif + done: /* Need to indicate IOCTL complete */ if (pioctl_req != MNULL) { @@ -924,7 +1234,7 @@ wlan_ret_802_11_associate(IN mlan_private * pmpriv, if (passoc_rsp->status_code) pioctl_req->status_code = (wlan_le16_to_cpu - (*(t_u16 *) & passoc_rsp-> + (*(t_u16 *)&passoc_rsp-> capability) << 16) + wlan_le16_to_cpu(passoc_rsp-> status_code); @@ -950,8 +1260,8 @@ wlan_ret_802_11_associate(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_cmd_802_11_ad_hoc_start(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * cmd, IN t_void * pdata_buf) +wlan_cmd_802_11_ad_hoc_start(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_adapter *pmadapter = pmpriv->adapter; @@ -966,8 +1276,15 @@ wlan_cmd_802_11_ad_hoc_start(IN mlan_private * pmpriv, MrvlIETypes_HTCap_t *pht_cap; MrvlIETypes_HTInfo_t *pht_info; t_u32 rx_mcs_supp = 0; + /* wpa ie for WPA_NONE AES */ + const t_u8 wpa_ie[24] = + { 0xdd, 0x16, 0x00, 0x50, 0xf2, 0x01, 0x01, 0x00, + 0x00, 0x50, 0xf2, 0x04, 0x01, 0x00, 0x00, 0x50, + 0xf2, 0x00, 0x01, 0x00, 0x00, 0x50, 0xf2, 0x00 + }; + t_s32 append_size_11h = 0; t_u8 *pos = - (t_u8 *) padhoc_start + sizeof(HostCmd_DS_802_11_AD_HOC_START); + (t_u8 *)padhoc_start + sizeof(HostCmd_DS_802_11_AD_HOC_START); ENTER(); @@ -994,21 +1311,21 @@ wlan_cmd_802_11_ad_hoc_start(IN mlan_private * pmpriv, memset(pmadapter, padhoc_start->ssid, 0, MLAN_MAX_SSID_LENGTH); memcpy(pmadapter, padhoc_start->ssid, - ((mlan_802_11_ssid *) pdata_buf)->ssid, + ((mlan_802_11_ssid *)pdata_buf)->ssid, MIN(MLAN_MAX_SSID_LENGTH, - ((mlan_802_11_ssid *) pdata_buf)->ssid_len)); + ((mlan_802_11_ssid *)pdata_buf)->ssid_len)); PRINTM(MINFO, "ADHOC_S_CMD: SSID = %s\n", padhoc_start->ssid); memset(pmadapter, pbss_desc->ssid.ssid, 0, MLAN_MAX_SSID_LENGTH); memcpy(pmadapter, pbss_desc->ssid.ssid, - ((mlan_802_11_ssid *) pdata_buf)->ssid, + ((mlan_802_11_ssid *)pdata_buf)->ssid, MIN(MLAN_MAX_SSID_LENGTH, - ((mlan_802_11_ssid *) pdata_buf)->ssid_len)); + ((mlan_802_11_ssid *)pdata_buf)->ssid_len)); pbss_desc->ssid.ssid_len = MIN(MLAN_MAX_SSID_LENGTH, - ((mlan_802_11_ssid *) pdata_buf)->ssid_len); + ((mlan_802_11_ssid *)pdata_buf)->ssid_len); /* Set the BSS mode */ padhoc_start->bss_mode = HostCmd_BSS_MODE_IBSS; @@ -1027,7 +1344,7 @@ wlan_cmd_802_11_ad_hoc_start(IN mlan_private * pmpriv, if (!wlan_get_cfp_by_band_and_channel (pmadapter, pmadapter->adhoc_start_band, - (t_u16) pmpriv->adhoc_channel, pmadapter->region_channel)) { + (t_u16)pmpriv->adhoc_channel, pmadapter->region_channel)) { chan_freq_power_t *cfp; cfp = wlan_get_cfp_by_band_and_channel(pmadapter, @@ -1037,7 +1354,7 @@ wlan_cmd_802_11_ad_hoc_start(IN mlan_private * pmpriv, pmadapter-> region_channel); if (cfp) - pmpriv->adhoc_channel = (t_u8) cfp->channel; + pmpriv->adhoc_channel = (t_u8)cfp->channel; } MASSERT(pmpriv->adhoc_channel); @@ -1078,7 +1395,8 @@ wlan_cmd_802_11_ad_hoc_start(IN mlan_private * pmpriv, /* Set up privacy in pbss_desc */ if (pmpriv->sec_info.wep_status == Wlan802_11WEPEnabled - || pmpriv->adhoc_aes_enabled || pmpriv->sec_info.wpa_enabled) { + || pmpriv->adhoc_aes_enabled + || pmpriv->sec_info.wpa_enabled || pmpriv->sec_info.ewpa_enabled) { /** Ad-Hoc capability privacy on */ #define AD_HOC_CAP_PRIVACY_ON 1 PRINTM(MINFO, "ADHOC_S_CMD: wep_status set, Privacy to WEP\n"); @@ -1138,7 +1456,7 @@ wlan_cmd_802_11_ad_hoc_start(IN mlan_private * pmpriv, if (IS_SUPPORT_MULTI_BANDS(pmadapter)) { /* Append a channel TLV */ - pchan_tlv = (MrvlIEtypes_ChanListParamSet_t *) pos; + pchan_tlv = (MrvlIEtypes_ChanListParamSet_t *)pos; pchan_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_CHANLIST); pchan_tlv->header.len = wlan_cpu_to_le16(sizeof(ChanScanParamSet_t)); @@ -1146,14 +1464,15 @@ wlan_cmd_802_11_ad_hoc_start(IN mlan_private * pmpriv, memset(pmadapter, pchan_tlv->chan_scan_param, 0x00, sizeof(ChanScanParamSet_t)); pchan_tlv->chan_scan_param[0].chan_number = - (t_u8) pmpriv->curr_bss_params.bss_descriptor.channel; + (t_u8)pmpriv->curr_bss_params.bss_descriptor.channel; PRINTM(MINFO, "ADHOC_S_CMD: TLV Chan = %d\n", pchan_tlv->chan_scan_param[0].chan_number); pchan_tlv->chan_scan_param[0].radio_type = wlan_band_to_radio_type(pmpriv->curr_bss_params.band); - if (pmadapter->adhoc_start_band & BAND_GN) { + if (pmadapter->adhoc_start_band & BAND_GN + || pmadapter->adhoc_start_band & BAND_AN) { if (pmadapter->chan_bandwidth == CHANNEL_BW_40MHZ_ABOVE) { pchan_tlv->chan_scan_param[0].radio_type |= SECOND_CHANNEL_ABOVE; @@ -1181,14 +1500,33 @@ wlan_cmd_802_11_ad_hoc_start(IN mlan_private * pmpriv, goto done; } - if (pmpriv->sec_info.wpa_enabled) { - prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *) pos; - prsn_ie_tlv->header.type = (t_u16) pmpriv->wpa_ie[0]; + /* + * Call 11h start API to add any 11h flags/elements as TLV parameters + */ + append_size_11h = + wlan_11h_process_start(pmpriv, &pos, &padhoc_start->cap, + pmpriv->adhoc_channel, + &pbss_desc->wlan_11h_bss_info); + if (append_size_11h >= 0) + cmd_append_size += append_size_11h; + else { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + if (pmpriv->sec_info.ewpa_enabled) { + memcpy(pmadapter, pmpriv->wpa_ie, wpa_ie, sizeof(wpa_ie)); + pmpriv->wpa_ie_len = sizeof(wpa_ie); + } + + if (pmpriv->sec_info.wpa_enabled || pmpriv->sec_info.ewpa_enabled) { + prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *)pos; + prsn_ie_tlv->header.type = (t_u16)pmpriv->wpa_ie[0]; /* WPA_IE or RSN_IE */ prsn_ie_tlv->header.type = prsn_ie_tlv->header.type & 0x00FF; prsn_ie_tlv->header.type = wlan_cpu_to_le16(prsn_ie_tlv->header.type); - prsn_ie_tlv->header.len = (t_u16) pmpriv->wpa_ie[1]; + prsn_ie_tlv->header.len = (t_u16)pmpriv->wpa_ie[1]; prsn_ie_tlv->header.len = prsn_ie_tlv->header.len & 0x00FF; if (prsn_ie_tlv->header.len <= (sizeof(pmpriv->wpa_ie) - 2)) memcpy(pmadapter, prsn_ie_tlv->rsn_ie, @@ -1198,7 +1536,7 @@ wlan_cmd_802_11_ad_hoc_start(IN mlan_private * pmpriv, goto done; } - DBG_HEXDUMP(MCMD_D, "ADHOC_S_CMD: RSN IE", (t_u8 *) prsn_ie_tlv, + DBG_HEXDUMP(MCMD_D, "ADHOC_S_CMD: RSN IE", (t_u8 *)prsn_ie_tlv, sizeof(prsn_ie_tlv->header) + prsn_ie_tlv->header.len); pos += sizeof(prsn_ie_tlv->header) + prsn_ie_tlv->header.len; @@ -1210,7 +1548,7 @@ wlan_cmd_802_11_ad_hoc_start(IN mlan_private * pmpriv, if (pmadapter->adhoc_11n_enabled == MTRUE) { { - pht_cap = (MrvlIETypes_HTCap_t *) pos; + pht_cap = (MrvlIETypes_HTCap_t *)pos; memset(pmadapter, pht_cap, 0, sizeof(MrvlIETypes_HTCap_t)); pht_cap->header.type = wlan_cpu_to_le16(HT_CAPABILITY); @@ -1219,25 +1557,25 @@ wlan_cmd_802_11_ad_hoc_start(IN mlan_private * pmpriv, GET_RXMCSSUPP(pmadapter->usr_dev_mcs_support); /* Set MCS for 1x1/2x2 */ memset(pmadapter, - (t_u8 *) pht_cap->ht_cap.supported_mcs_set, 0xff, + (t_u8 *)pht_cap->ht_cap.supported_mcs_set, 0xff, rx_mcs_supp); wlan_fill_ht_cap_tlv(pmpriv, pht_cap, pmpriv->curr_bss_params.band); HEXDUMP("ADHOC_START: HT_CAPABILITIES IE", - (t_u8 *) pht_cap, sizeof(MrvlIETypes_HTCap_t)); + (t_u8 *)pht_cap, sizeof(MrvlIETypes_HTCap_t)); pos += sizeof(MrvlIETypes_HTCap_t); cmd_append_size += sizeof(MrvlIETypes_HTCap_t); pht_cap->header.len = wlan_cpu_to_le16(pht_cap->header.len); } { - pht_info = (MrvlIETypes_HTInfo_t *) pos; + pht_info = (MrvlIETypes_HTInfo_t *)pos; memset(pmadapter, pht_info, 0, sizeof(MrvlIETypes_HTInfo_t)); pht_info->header.type = wlan_cpu_to_le16(HT_OPERATION); pht_info->header.len = sizeof(HTInfo_t); pht_info->ht_info.pri_chan = - (t_u8) pmpriv->curr_bss_params.bss_descriptor. + (t_u8)pmpriv->curr_bss_params.bss_descriptor. channel; if (pmadapter->chan_bandwidth) { pht_info->ht_info.field2 = @@ -1247,8 +1585,7 @@ wlan_cmd_802_11_ad_hoc_start(IN mlan_private * pmpriv, pht_info->ht_info.field3 = NON_GREENFIELD_STAS; pht_info->ht_info.basic_mcs_set[0] = 0xff; HEXDUMP("ADHOC_START: HT_INFORMATION IE", - (t_u8 *) pht_info, - sizeof(MrvlIETypes_HTInfo_t)); + (t_u8 *)pht_info, sizeof(MrvlIETypes_HTInfo_t)); pos += sizeof(MrvlIETypes_HTInfo_t); cmd_append_size += sizeof(MrvlIETypes_HTInfo_t); pht_info->header.len = @@ -1258,8 +1595,8 @@ wlan_cmd_802_11_ad_hoc_start(IN mlan_private * pmpriv, cmd->size = (t_u16) - wlan_cpu_to_le16((t_u16) (sizeof(HostCmd_DS_802_11_AD_HOC_START) - + S_DS_GEN + cmd_append_size)); + wlan_cpu_to_le16((t_u16)(sizeof(HostCmd_DS_802_11_AD_HOC_START) + + S_DS_GEN + cmd_append_size)); memcpy(pmadapter, &tmp_cap, &padhoc_start->cap, sizeof(t_u16)); @@ -1288,21 +1625,20 @@ wlan_cmd_802_11_ad_hoc_start(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_cmd_802_11_ad_hoc_join(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * cmd, IN t_void * pdata_buf) +wlan_cmd_802_11_ad_hoc_join(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_adapter *pmadapter = pmpriv->adapter; HostCmd_DS_802_11_AD_HOC_JOIN *padhoc_join = &cmd->params.adhoc_join; - BSSDescriptor_t *pbss_desc = (BSSDescriptor_t *) pdata_buf; + BSSDescriptor_t *pbss_desc = (BSSDescriptor_t *)pdata_buf; MrvlIEtypes_ChanListParamSet_t *pchan_tlv; MrvlIEtypes_RsnParamSet_t *prsn_ie_tlv; t_u32 cmd_append_size = 0; t_u16 tmp_cap; t_u32 i, rates_size = 0; t_u32 curr_pkt_filter; - t_u8 *pos = - (t_u8 *) padhoc_join + sizeof(HostCmd_DS_802_11_AD_HOC_JOIN); + t_u8 *pos = (t_u8 *)padhoc_join + sizeof(HostCmd_DS_802_11_AD_HOC_JOIN); ENTER(); @@ -1346,6 +1682,7 @@ wlan_cmd_802_11_ad_hoc_join(IN mlan_private * pmpriv, memcpy(pmadapter, &padhoc_join->bss_descriptor.ss_param_set, &pbss_desc->ss_param_set, sizeof(IEEEtypes_SsParamSet_t)); + padhoc_join->bss_descriptor.ss_param_set.ibss_param_set.atim_window = 0; memcpy(pmadapter, &tmp_cap, &pbss_desc->cap_info, sizeof(IEEEtypes_CapInfo_t)); @@ -1385,15 +1722,16 @@ wlan_cmd_802_11_ad_hoc_join(IN mlan_private * pmpriv, /* Copy the channel information */ pmpriv->curr_bss_params.bss_descriptor.channel = pbss_desc->channel; - pmpriv->curr_bss_params.band = (t_u8) pbss_desc->bss_band; + pmpriv->curr_bss_params.band = (t_u8)pbss_desc->bss_band; if (pmpriv->sec_info.wep_status == Wlan802_11WEPEnabled - || pmpriv->adhoc_aes_enabled || pmpriv->sec_info.wpa_enabled) + || pmpriv->adhoc_aes_enabled + || pmpriv->sec_info.wpa_enabled || pmpriv->sec_info.ewpa_enabled) padhoc_join->bss_descriptor.cap.privacy = AD_HOC_CAP_PRIVACY_ON; if (IS_SUPPORT_MULTI_BANDS(pmadapter)) { /* Append a channel TLV */ - pchan_tlv = (MrvlIEtypes_ChanListParamSet_t *) pos; + pchan_tlv = (MrvlIEtypes_ChanListParamSet_t *)pos; pchan_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_CHANLIST); pchan_tlv->header.len = wlan_cpu_to_le16(sizeof(ChanScanParamSet_t)); @@ -1406,7 +1744,7 @@ wlan_cmd_802_11_ad_hoc_join(IN mlan_private * pmpriv, pchan_tlv->chan_scan_param[0].chan_number); pchan_tlv->chan_scan_param[0].radio_type - = wlan_band_to_radio_type((t_u8) pbss_desc->bss_band); + = wlan_band_to_radio_type((t_u8)pbss_desc->bss_band); PRINTM(MINFO, "ADHOC_J_CMD: TLV Band = %d\n", pchan_tlv->chan_scan_param[0].radio_type); @@ -1415,8 +1753,7 @@ wlan_cmd_802_11_ad_hoc_join(IN mlan_private * pmpriv, sizeof(pchan_tlv->header) + sizeof(ChanScanParamSet_t); } - if (wlan_11d_create_dnld_countryinfo - (pmpriv, (t_u8) pbss_desc->bss_band)) { + if (wlan_11d_create_dnld_countryinfo(pmpriv, (t_u8)pbss_desc->bss_band)) { PRINTM(MERROR, "Dnld_countryinfo_11d failed\n"); ret = MLAN_STATUS_FAILURE; goto done; @@ -1427,14 +1764,25 @@ wlan_cmd_802_11_ad_hoc_join(IN mlan_private * pmpriv, goto done; } + /* + * Call 11h join API after capability bits are set so + * adhoc/infra 11h behavior can be properly triggered. + * pos modified if data is appended + */ + cmd_append_size += wlan_11h_process_join(pmpriv, &pos, + &padhoc_join->bss_descriptor. + cap, (t_u8)pbss_desc->bss_band, + pbss_desc->channel, + &pbss_desc->wlan_11h_bss_info); + if (pmpriv->sec_info.wpa_enabled) { - prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *) pos; + prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *)pos; /* WPA_IE or RSN_IE */ - prsn_ie_tlv->header.type = (t_u16) pmpriv->wpa_ie[0]; + prsn_ie_tlv->header.type = (t_u16)pmpriv->wpa_ie[0]; prsn_ie_tlv->header.type = prsn_ie_tlv->header.type & 0x00FF; prsn_ie_tlv->header.type = wlan_cpu_to_le16(prsn_ie_tlv->header.type); - prsn_ie_tlv->header.len = (t_u16) pmpriv->wpa_ie[1]; + prsn_ie_tlv->header.len = (t_u16)pmpriv->wpa_ie[1]; prsn_ie_tlv->header.len = prsn_ie_tlv->header.len & 0x00FF; if (prsn_ie_tlv->header.len <= (sizeof(pmpriv->wpa_ie) - 2)) memcpy(pmadapter, prsn_ie_tlv->rsn_ie, @@ -1444,13 +1792,80 @@ wlan_cmd_802_11_ad_hoc_join(IN mlan_private * pmpriv, goto done; } - HEXDUMP("ADHOC_JOIN: RSN IE", (t_u8 *) prsn_ie_tlv, + HEXDUMP("ADHOC_JOIN: RSN IE", (t_u8 *)prsn_ie_tlv, sizeof(prsn_ie_tlv->header) + prsn_ie_tlv->header.len); pos += sizeof(prsn_ie_tlv->header) + prsn_ie_tlv->header.len; cmd_append_size += sizeof(prsn_ie_tlv->header) + prsn_ie_tlv->header.len; prsn_ie_tlv->header.len = wlan_cpu_to_le16(prsn_ie_tlv->header.len); + } else if (pmpriv->sec_info.ewpa_enabled) { + prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *)pos; + if (pbss_desc->pwpa_ie) { + prsn_ie_tlv->header.type = + (t_u16)(*(pbss_desc->pwpa_ie)).vend_hdr. + element_id; + prsn_ie_tlv->header.type = + prsn_ie_tlv->header.type & 0x00FF; + prsn_ie_tlv->header.type = + wlan_cpu_to_le16(prsn_ie_tlv->header.type); + prsn_ie_tlv->header.len = + (t_u16)(*(pbss_desc->pwpa_ie)).vend_hdr.len; + prsn_ie_tlv->header.len = + prsn_ie_tlv->header.len & 0x00FF; + if (prsn_ie_tlv->header.len <= (sizeof(pmpriv->wpa_ie))) { + memcpy(pmadapter, prsn_ie_tlv->rsn_ie, + &((*(pbss_desc->pwpa_ie)).vend_hdr. + oui[0]), prsn_ie_tlv->header.len); + } else { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + HEXDUMP("ADHOC_JOIN: RSN IE", (t_u8 *)prsn_ie_tlv, + sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len); + pos += sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len; + cmd_append_size += + sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len; + prsn_ie_tlv->header.len = + wlan_cpu_to_le16(prsn_ie_tlv->header.len); + } + if (pbss_desc->prsn_ie) { + prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *)pos; + prsn_ie_tlv->header.type = + (t_u16)(*(pbss_desc->prsn_ie)).ieee_hdr. + element_id; + prsn_ie_tlv->header.type = + prsn_ie_tlv->header.type & 0x00FF; + prsn_ie_tlv->header.type = + wlan_cpu_to_le16(prsn_ie_tlv->header.type); + prsn_ie_tlv->header.len = + (t_u16)(*(pbss_desc->prsn_ie)).ieee_hdr.len; + prsn_ie_tlv->header.len = + prsn_ie_tlv->header.len & 0x00FF; + if (prsn_ie_tlv->header.len <= (sizeof(pmpriv->wpa_ie))) { + memcpy(pmadapter, prsn_ie_tlv->rsn_ie, + &((*(pbss_desc->prsn_ie)).data[0]) + , prsn_ie_tlv->header.len); + } else { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + HEXDUMP("ADHOC_JOIN: RSN IE", (t_u8 *)prsn_ie_tlv, + sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len); + pos += sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len; + cmd_append_size += + sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len; + prsn_ie_tlv->header.len = + wlan_cpu_to_le16(prsn_ie_tlv->header.len); + } } if (ISSUPP_11NENABLED(pmadapter->fw_cap_info) @@ -1460,8 +1875,8 @@ wlan_cmd_802_11_ad_hoc_join(IN mlan_private * pmpriv, cmd->size = (t_u16) - wlan_cpu_to_le16((t_u16) (sizeof(HostCmd_DS_802_11_AD_HOC_JOIN) - + S_DS_GEN + cmd_append_size)); + wlan_cpu_to_le16((t_u16)(sizeof(HostCmd_DS_802_11_AD_HOC_JOIN) + + S_DS_GEN + cmd_append_size)); memcpy(pmadapter, &tmp_cap, &padhoc_join->bss_descriptor.cap, sizeof(IEEEtypes_CapInfo_t)); @@ -1486,11 +1901,11 @@ wlan_cmd_802_11_ad_hoc_join(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_ret_802_11_ad_hoc(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * resp, IN t_void * pioctl_buf) +wlan_ret_802_11_ad_hoc(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, IN t_void *pioctl_buf) { mlan_status ret = MLAN_STATUS_SUCCESS; - mlan_ioctl_req *pioctl_req = (mlan_ioctl_req *) pioctl_buf; + mlan_ioctl_req *pioctl_req = (mlan_ioctl_req *)pioctl_buf; HostCmd_DS_802_11_AD_HOC_START_RESULT *padhoc_start_result = &resp->params.adhoc_start_result; HostCmd_DS_802_11_AD_HOC_JOIN_RESULT *padhoc_join_result = @@ -1499,7 +1914,7 @@ wlan_ret_802_11_ad_hoc(IN mlan_private * pmpriv, t_u16 command = resp->command; t_u8 result = 0; t_u8 event_buf[100]; - mlan_event *pevent = (mlan_event *) event_buf; + mlan_event *pevent = (mlan_event *)event_buf; ENTER(); @@ -1517,6 +1932,8 @@ wlan_ret_802_11_ad_hoc(IN mlan_private * pmpriv, PRINTM(MERROR, "ADHOC_RESP Failed 0x%x\n", result); if (pmpriv->media_connected == MTRUE) wlan_reset_connect_state(pmpriv, MTRUE); + if (pmpriv->adhoc_state == ADHOC_STARTING) + pmpriv->adhoc_state = ADHOC_IDLE; memset(pmpriv->adapter, &pmpriv->curr_bss_params.bss_descriptor, 0x00, sizeof(BSSDescriptor_t)); @@ -1536,6 +1953,8 @@ wlan_ret_802_11_ad_hoc(IN mlan_private * pmpriv, padhoc_start_result->bssid, MLAN_MAC_ADDR_LENGTH); pmpriv->adhoc_state = ADHOC_STARTED; + if (pmpriv->adapter->state_rdh.stage == RDH_RESTART_INTFS) + wlan_11h_radar_detected_callback((t_void *)pmpriv); } else { /* * Now the join cmd should be successful. @@ -1544,8 +1963,9 @@ wlan_ret_802_11_ad_hoc(IN mlan_private * pmpriv, PRINTM(MINFO, "ADHOC_J_RESP %s\n", pbss_desc->ssid.ssid); /* - * Make a copy of current BSSID descriptor, only needed for join since - * the current descriptor is already being used for adhoc start + * Make a copy of current BSSID descriptor, only needed + * for join since the current descriptor is already + * being used for adhoc start */ memcpy(pmpriv->adapter, &pmpriv->curr_bss_params.bss_descriptor, pbss_desc, sizeof(BSSDescriptor_t)); @@ -1560,8 +1980,8 @@ wlan_ret_802_11_ad_hoc(IN mlan_private * pmpriv, pevent->bss_index = pmpriv->bss_index; pevent->event_id = MLAN_EVENT_ID_DRV_CONNECTED; pevent->event_len = MLAN_MAC_ADDR_LENGTH; - memcpy(pmpriv->adapter, (t_u8 *) pevent->event_buf, - (t_u8 *) pmpriv->curr_bss_params.bss_descriptor.mac_address, + memcpy(pmpriv->adapter, (t_u8 *)pevent->event_buf, + (t_u8 *)pmpriv->curr_bss_params.bss_descriptor.mac_address, MLAN_MAC_ADDR_LENGTH); wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_CONNECTED, pevent); wlan_save_curr_bcn(pmpriv); @@ -1589,12 +2009,12 @@ wlan_ret_802_11_ad_hoc(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_associate(IN mlan_private * pmpriv, - IN t_void * pioctl_buf, IN BSSDescriptor_t * pbss_desc) +wlan_associate(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, IN BSSDescriptor_t *pbss_desc) { mlan_status ret = MLAN_STATUS_SUCCESS; t_u8 current_bssid[MLAN_MAC_ADDR_LENGTH]; - pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *) pioctl_buf; + pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *)pioctl_buf; ENTER(); @@ -1633,13 +2053,33 @@ wlan_associate(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS--success, MLAN_STATUS_FAILURE--fail */ mlan_status -wlan_adhoc_start(IN mlan_private * pmpriv, - IN t_void * pioctl_buf, IN mlan_802_11_ssid * padhoc_ssid) +wlan_adhoc_start(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, IN mlan_802_11_ssid *padhoc_ssid) { mlan_status ret = MLAN_STATUS_SUCCESS; + wlan_meas_state_t *pmeas_state = &pmpriv->adapter->state_meas; + t_u8 radar = MFALSE; + pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *)pioctl_buf; ENTER(); + /* + * If the report indicates no measurement was done, leave the default + * return value alone. + */ + if (!pmeas_state->meas_rpt_returned.rpt.basic.map.unmeasured) { + radar = pmeas_state->meas_rpt_returned.rpt.basic.map. + radar ? MTRUE : MFALSE; + } + + if (radar) { + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + ret = MLAN_STATUS_FAILURE; + LEAVE(); + return ret; + } + PRINTM(MINFO, "Adhoc Channel = %d\n", pmpriv->adhoc_channel); PRINTM(MINFO, "curr_bss_params.channel = %d\n", pmpriv->curr_bss_params.bss_descriptor.channel); @@ -1649,6 +2089,11 @@ wlan_adhoc_start(IN mlan_private * pmpriv, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_AD_HOC_START, HostCmd_ACT_GEN_SET, 0, pioctl_buf, padhoc_ssid); +#if defined(STA_SUPPORT) + if (ret == MLAN_STATUS_SUCCESS) + memcpy(pmpriv->adapter, &pmpriv->adhoc_last_start_ssid, + padhoc_ssid, sizeof(mlan_802_11_ssid)); +#endif LEAVE(); return ret; @@ -1665,12 +2110,12 @@ wlan_adhoc_start(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS--success, MLAN_STATUS_FAILURE--fail */ mlan_status -wlan_adhoc_join(IN mlan_private * pmpriv, - IN t_void * pioctl_buf, IN BSSDescriptor_t * pbss_desc) +wlan_adhoc_join(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, IN BSSDescriptor_t *pbss_desc) { pmlan_adapter pmadapter = pmpriv->adapter; mlan_status ret = MLAN_STATUS_SUCCESS; - pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *) pioctl_buf; + pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *)pioctl_buf; ENTER(); @@ -1722,8 +2167,8 @@ wlan_adhoc_join(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS--success, MLAN_STATUS_FAILURE--fail, MLAN_STATUS_PENDING--pending */ mlan_status -wlan_disconnect(IN mlan_private * pmpriv, - IN mlan_ioctl_req * pioctl_req, IN mlan_802_11_mac_addr * mac) +wlan_disconnect(IN mlan_private *pmpriv, + IN mlan_ioctl_req *pioctl_req, IN mlan_802_11_mac_addr *mac) { mlan_802_11_mac_addr mac_address; mlan_status ret = MLAN_STATUS_SUCCESS; @@ -1738,20 +2183,19 @@ wlan_disconnect(IN mlan_private * pmpriv, (pmpriv->adapter, mac, zero_mac, sizeof(zero_mac))) memcpy(pmpriv->adapter, - (t_u8 *) & mac_address, - (t_u8 *) & pmpriv-> - curr_bss_params.bss_descriptor. - mac_address, + (t_u8 *)&mac_address, + (t_u8 *)&pmpriv->curr_bss_params. + bss_descriptor.mac_address, MLAN_MAC_ADDR_LENGTH); else { memcpy(pmpriv->adapter, - (t_u8 *) & mac_address, - (t_u8 *) mac, + (t_u8 *)&mac_address, + (t_u8 *)mac, MLAN_MAC_ADDR_LENGTH); } } else { - memcpy(pmpriv->adapter, (t_u8 *) & mac_address, - (t_u8 *) & pmpriv->curr_bss_params. + memcpy(pmpriv->adapter, (t_u8 *)&mac_address, + (t_u8 *)&pmpriv->curr_bss_params. bss_descriptor.mac_address, MLAN_MAC_ADDR_LENGTH); } @@ -1761,7 +2205,7 @@ wlan_disconnect(IN mlan_private * pmpriv, HostCmd_CMD_802_11_DISASSOCIATE, HostCmd_ACT_GEN_SET, 0, - (t_void *) pioctl_req, + (t_void *)pioctl_req, &mac_address); else #endif @@ -1769,7 +2213,7 @@ wlan_disconnect(IN mlan_private * pmpriv, HostCmd_CMD_802_11_DEAUTHENTICATE, HostCmd_ACT_GEN_SET, 0, - (t_void *) pioctl_req, + (t_void *)pioctl_req, &mac_address); if (ret == MLAN_STATUS_SUCCESS && pioctl_req) @@ -1779,7 +2223,7 @@ wlan_disconnect(IN mlan_private * pmpriv, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_AD_HOC_STOP, HostCmd_ACT_GEN_SET, - 0, (t_void *) pioctl_req, MNULL); + 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS && pioctl_req) ret = MLAN_STATUS_PENDING; @@ -1805,6 +2249,11 @@ wlan_band_to_radio_type(IN t_u8 band) ENTER(); switch (band) { + case BAND_A: + case BAND_AN: + case BAND_A | BAND_AN: + ret_radio_type = HostCmd_SCAN_RADIO_TYPE_A; + break; case BAND_B: case BAND_G: case BAND_B | BAND_G: diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_join.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_join.h old mode 100755 new mode 100644 diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_main.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_main.h old mode 100755 new mode 100644 index 0475eb06..31cbc2d2 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_main.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_main.h @@ -29,23 +29,28 @@ Change log: #define _MLAN_MAIN_H_ #ifdef DEBUG_LEVEL1 -extern t_void(*print_callback) (IN t_void * pmoal_handle, - IN t_u32 level, IN char *pformat, IN ... +extern t_void (*print_callback) (IN t_void *pmoal_handle, + IN t_u32 level, IN char *pformat, IN ... ); -extern mlan_status(*get_sys_time_callback) (IN t_void * pmoal_handle, - OUT t_u32 * psec, - OUT t_u32 * pusec); +extern mlan_status (*get_sys_time_callback) (IN t_void *pmoal_handle, + OUT t_u32 *psec, OUT t_u32 *pusec); extern t_u32 mlan_drvdbg; #ifdef DEBUG_LEVEL2 -#define PRINTM_MINFO(msg...) do {if ((mlan_drvdbg & MINFO) && (print_callback)) \ - print_callback(MNULL, MINFO, msg); } while (0) -#define PRINTM_MWARN(msg...) do {if ((mlan_drvdbg & MWARN) && (print_callback)) \ - print_callback(MNULL, MWARN, msg); } while (0) -#define PRINTM_MENTRY(msg...) do {if ((mlan_drvdbg & MENTRY) && (print_callback)) \ - print_callback(MNULL, MENTRY, msg); } while (0) +#define PRINTM_MINFO(msg...) do { \ + if ((mlan_drvdbg & MINFO) && (print_callback)) \ + print_callback(MNULL, MINFO, msg); \ + } while (0) +#define PRINTM_MWARN(msg...) do { \ + if ((mlan_drvdbg & MWARN) && (print_callback)) \ + print_callback(MNULL, MWARN, msg); \ + } while (0) +#define PRINTM_MENTRY(msg...) do { \ + if ((mlan_drvdbg & MENTRY) && (print_callback)) \ + print_callback(MNULL, MENTRY, msg); \ +} while (0) #define PRINTM_GET_SYS_TIME(level, psec, pusec) \ do { \ if ((level & mlan_drvdbg) && (get_sys_time_callback))\ @@ -77,31 +82,55 @@ do { \ #endif /* DEBUG_LEVEL2 */ -#define PRINTM_MFW_D(msg...) do {if ((mlan_drvdbg & MFW_D) && (print_callback)) \ - print_callback(MNULL, MFW_D, msg); } while (0) -#define PRINTM_MCMD_D(msg...) do {if ((mlan_drvdbg & MCMD_D) && (print_callback)) \ - print_callback(MNULL, MCMD_D, msg); } while (0) -#define PRINTM_MDAT_D(msg...) do {if ((mlan_drvdbg & MDAT_D) && (print_callback)) \ - print_callback(MNULL, MDAT_D, msg); } while (0) -#define PRINTM_MIF_D(msg...) do {if ((mlan_drvdbg & MIF_D) && (print_callback)) \ - print_callback(MNULL, MIF_D, msg); } while (0) - -#define PRINTM_MIOCTL(msg...) do {if ((mlan_drvdbg & MIOCTL) && (print_callback)) \ - print_callback(MNULL, MIOCTL, msg); } while (0) -#define PRINTM_MINTR(msg...) do {if ((mlan_drvdbg & MINTR) && (print_callback)) \ - print_callback(MNULL, MINTR, msg); } while (0) -#define PRINTM_MEVENT(msg...) do {if ((mlan_drvdbg & MEVENT) && (print_callback)) \ - print_callback(MNULL, MEVENT, msg); } while (0) -#define PRINTM_MCMND(msg...) do {if ((mlan_drvdbg & MCMND) && (print_callback)) \ - print_callback(MNULL, MCMND, msg); } while (0) -#define PRINTM_MDATA(msg...) do {if ((mlan_drvdbg & MDATA) && (print_callback)) \ - print_callback(MNULL, MDATA, msg); } while (0) -#define PRINTM_MERROR(msg...) do {if ((mlan_drvdbg & MERROR) && (print_callback)) \ - print_callback(MNULL, MERROR, msg); } while (0) -#define PRINTM_MFATAL(msg...) do {if ((mlan_drvdbg & MFATAL) && (print_callback)) \ - print_callback(MNULL, MFATAL, msg); } while (0) -#define PRINTM_MMSG(msg...) do {if ((mlan_drvdbg & MMSG) && (print_callback)) \ - print_callback(MNULL, MMSG, msg); } while (0) +#define PRINTM_MFW_D(msg...) do { \ + if ((mlan_drvdbg & MFW_D) && (print_callback)) \ + print_callback(MNULL, MFW_D, msg); \ + } while (0) +#define PRINTM_MCMD_D(msg...) do { \ + if ((mlan_drvdbg & MCMD_D) && (print_callback)) \ + print_callback(MNULL, MCMD_D, msg); \ + } while (0) +#define PRINTM_MDAT_D(msg...) do { \ + if ((mlan_drvdbg & MDAT_D) && (print_callback)) \ + print_callback(MNULL, MDAT_D, msg); \ + } while (0) +#define PRINTM_MIF_D(msg...) do { \ + if ((mlan_drvdbg & MIF_D) && (print_callback)) \ + print_callback(MNULL, MIF_D, msg); \ + } while (0) + +#define PRINTM_MIOCTL(msg...) do { \ + if ((mlan_drvdbg & MIOCTL) && (print_callback)) \ + print_callback(MNULL, MIOCTL, msg); \ + } while (0) +#define PRINTM_MINTR(msg...) do { \ + if ((mlan_drvdbg & MINTR) && (print_callback)) \ + print_callback(MNULL, MINTR, msg); \ + } while (0) +#define PRINTM_MEVENT(msg...) do { \ + if ((mlan_drvdbg & MEVENT) && (print_callback)) \ + print_callback(MNULL, MEVENT, msg); \ + } while (0) +#define PRINTM_MCMND(msg...) do { \ + if ((mlan_drvdbg & MCMND) && (print_callback)) \ + print_callback(MNULL, MCMND, msg); \ + } while (0) +#define PRINTM_MDATA(msg...) do { \ + if ((mlan_drvdbg & MDATA) && (print_callback)) \ + print_callback(MNULL, MDATA, msg); \ + } while (0) +#define PRINTM_MERROR(msg...) do { \ + if ((mlan_drvdbg & MERROR) && (print_callback)) \ + print_callback(MNULL, MERROR, msg); \ + } while (0) +#define PRINTM_MFATAL(msg...) do { \ + if ((mlan_drvdbg & MFATAL) && (print_callback)) \ + print_callback(MNULL, MFATAL, msg); \ + } while (0) +#define PRINTM_MMSG(msg...) do { \ + if ((mlan_drvdbg & MMSG) && (print_callback)) \ + print_callback(MNULL, MMSG, msg); \ + } while (0) #define PRINTM(level, msg...) PRINTM_##level((char *)msg) @@ -298,7 +327,7 @@ do { \ #endif /* BIG_ENDIAN_SUPPORT */ /** Global moal_assert_callback */ -extern t_void(*assert_callback) (IN t_void * pmoal_handle, IN t_u32 cond); +extern t_void (*assert_callback) (IN t_void *pmoal_handle, IN t_u32 cond); /** Assertion */ #define MASSERT(cond) \ @@ -319,6 +348,11 @@ do { \ /** Maximum event buffer size */ #define MAX_EVENT_SIZE 2048 +#ifdef STA_SUPPORT +/** Maximum buffer size for ARP filter */ +#define ARP_FILTER_MAX_BUF_SIZE 68 +#endif /* STA_SUPPORT */ + /** 60 seconds */ #define MRVDRV_TIMER_60S 60000 /** 10 seconds */ @@ -348,6 +382,8 @@ do { \ /** Maximum number of CFP codes for BG */ #define MRVDRV_MAX_CFP_CODE_BG 0 +/** Maximum number of CFP codes for A */ +#define MRVDRV_MAX_CFP_CODE_A 5 /** high rx pending packets */ #define HIGH_RX_PENDING 50 @@ -374,6 +410,8 @@ do { \ #define FIRST_VALID_CHANNEL 0xff /** Default Ad-Hoc channel */ #define DEFAULT_AD_HOC_CHANNEL 6 +/** Default Ad-Hoc channel A */ +#define DEFAULT_AD_HOC_CHANNEL_A 36 /** Number of WEP keys */ #define MRVL_NUM_WEP_KEY (4) @@ -430,8 +468,8 @@ do { \ /** Is cmd_resp, event or data packet received? */ #define IS_CARD_RX_RCVD(adapter) (adapter->cmd_resp_received || \ - adapter->event_received || \ - adapter->data_received) + adapter->event_received || \ + adapter->data_received) /** Type command */ #define MLAN_TYPE_CMD 1 /** Type data */ @@ -440,18 +478,22 @@ do { \ #define MLAN_TYPE_EVENT 3 /** Maximum numbfer of registers to read for multiple port */ -#define MAX_MP_REGS 64 +/* upto 0xB7 */ +#define MAX_MP_REGS 184 /** Maximum port */ -#define MAX_PORT 16 +#define MAX_PORT 32 + +/** max MP REGS */ +#define MAX_MP_REGS_MAX (196) #ifdef SDIO_MULTI_PORT_TX_AGGR /** Multi port TX aggregation buffer size */ -#define SDIO_MP_TX_AGGR_DEF_BUF_SIZE (16384) /* 16K */ +#define SDIO_MP_TX_AGGR_DEF_BUF_SIZE (32768) /* 32K */ #endif /* SDIO_MULTI_PORT_TX_AGGR */ #ifdef SDIO_MULTI_PORT_RX_AGGR /** Multi port RX aggregation buffer size */ -#define SDIO_MP_RX_AGGR_DEF_BUF_SIZE (16384) /* 16K */ +#define SDIO_MP_RX_AGGR_DEF_BUF_SIZE (32768) /* 32K */ #endif /* SDIO_MULTI_PORT_RX_AGGR */ /** High threshold at which to start drop packets */ @@ -625,7 +667,7 @@ typedef struct _tidTbl { #define NO_PKT_PRIO_TID -1 /** Max driver packet delay in msec */ -#define WMM_DRV_DELAY_MAX 510 +#define WMM_DRV_DELAY_MAX 0 /** Struct of WMM DESC */ typedef struct _wmm_desc { @@ -663,6 +705,8 @@ typedef struct _wmm_desc { typedef struct _wlan_802_11_security_t { /** WPA enabled flag */ t_u8 wpa_enabled; + /** E-Supplicant enabled flag */ + t_u8 ewpa_enabled; /** WPA2 enabled flag */ t_u8 wpa2_enabled; /** WAPI enabled flag */ @@ -675,6 +719,8 @@ typedef struct _wlan_802_11_security_t { t_u32 authentication_mode; /** Encryption mode */ t_u32 encryption_mode; + /** Hotspot OSEN enabled */ + t_u8 osen_enabled; } wlan_802_11_security_t; /** Current Basic Service Set State Structure */ @@ -795,18 +841,38 @@ typedef struct _wlan_802_11d_state { state_11d_t user_enable_11d; } wlan_802_11d_state_t; +/** 802.11h State information kept in the 'mlan_private' driver structure */ +typedef struct { + /** Indicates whether 11h is enabled in the driver */ + t_bool is_11h_enabled; + /** Indicates whether 11h is active in the firmware */ + t_bool is_11h_active; + /** Master device using automatic channel select */ + t_bool adhoc_auto_sel_chan; + /** Set when driver receives a STOP TX event from fw */ + t_bool tx_disabled; + /** Channel that ChanSwAnn was received for, non-zero = active */ + t_u8 dfs_slave_csa_chan; + /** Expiry for above variable, seconds in system time */ + t_u32 dfs_slave_csa_expire_at_sec; +} wlan_11h_interface_state_t; + #if defined(UAP_SUPPORT) /** UAP get info callback state kept in the 'mlan_private' driver structure */ typedef struct { /** UAP internal callback after wlan_uap_get_channel */ /** (parameter is really pointer to mlan_private) */ - mlan_status(*get_chan_callback) (t_void *); + mlan_status (*get_chan_callback) (t_void *); /** current ioctl_req (to be completed in callback) */ pmlan_ioctl_req pioctl_req_curr; /** band config from MrvlIEtypes_channel_band_t */ t_u8 band_config; /** channel from MrvlIEtypes_channel_band_t */ t_u8 channel; + /** beacon period (in msec) from MrvlIEtypes_beacon_period_t */ + t_u16 beacon_period; + /** dtim period (no unit) from MrvlIEtypes_dtim_period_t */ + t_u8 dtim_period; } wlan_uap_get_info_cb_t; #endif @@ -821,28 +887,27 @@ typedef struct { /** mlan_operations data structure */ typedef struct _mlan_operations { /** cmd init handler */ - mlan_status(*init_cmd) (IN t_void * priv, IN t_u8 first_bss); + mlan_status (*init_cmd) (IN t_void *priv, IN t_u8 first_bss); /** ioctl handler */ - mlan_status(*ioctl) (t_void * adapter, pmlan_ioctl_req pioctl_req); + mlan_status (*ioctl) (t_void *adapter, pmlan_ioctl_req pioctl_req); /** cmd handler */ - mlan_status(*prepare_cmd) (IN t_void * priv, - IN t_u16 cmd_no, - IN t_u16 cmd_action, - IN t_u32 cmd_oid, - IN t_void * pioctl_buf, - IN t_void * pdata_buf, IN t_void * pcmd_buf); + mlan_status (*prepare_cmd) (IN t_void *priv, + IN t_u16 cmd_no, + IN t_u16 cmd_action, + IN t_u32 cmd_oid, + IN t_void *pioctl_buf, + IN t_void *pdata_buf, IN t_void *pcmd_buf); /** cmdresp handler */ - mlan_status(*process_cmdresp) (IN t_void * priv, - IN t_u16 cmdresp_no, - IN t_void * pcmd_buf, - IN t_void * pioctl); + mlan_status (*process_cmdresp) (IN t_void *priv, + IN t_u16 cmdresp_no, + IN t_void *pcmd_buf, IN t_void *pioctl); /** rx handler */ - mlan_status(*process_rx_packet) (IN t_void * adapter, - IN pmlan_buffer pmbuf); + mlan_status (*process_rx_packet) (IN t_void *adapter, + IN pmlan_buffer pmbuf); /** event handler */ - mlan_status(*process_event) (IN t_void * priv); + mlan_status (*process_event) (IN t_void *priv); /** txpd handler */ - t_void *(*process_txpd) (IN t_void * priv, IN pmlan_buffer pmbuf); + t_void *(*process_txpd) (IN t_void *priv, IN pmlan_buffer pmbuf); /** BSS role */ mlan_bss_role bss_role; } mlan_operations; @@ -959,8 +1024,16 @@ typedef struct _mlan_private { t_u8 adhoc_is_link_sensed; /** AdHoc operating state */ t_u8 adhoc_state; +#if defined(STA_SUPPORT) + /** AdHoc operating state backup */ + t_u8 adhoc_state_prev; + /** AdHoc previous ssid used for Start */ + mlan_802_11_ssid adhoc_last_start_ssid; +#endif /** FSM variable for 11d support */ wlan_802_11d_state_t state_11d; + /** FSM variable for 11h support */ + wlan_11h_interface_state_t intf_state_11h; #ifdef UAP_SUPPORT /** Whether UAP interface has started */ t_bool uap_bss_started; @@ -977,6 +1050,8 @@ typedef struct _mlan_private { mrvl_wep_key_t wep_key[MRVL_NUM_WEP_KEY]; /** Current WEP key index */ t_u16 wep_key_curr_index; + /** EWPA query 0: disable, 1: enable */ + t_u8 ewpa_query; /** Encryption Key*/ t_u8 wpa_ie[256]; /** WPA IE length */ @@ -984,10 +1059,18 @@ typedef struct _mlan_private { /** GTK set flag */ t_u8 wpa_is_gtk_set; mlan_ds_encrypt_key aes_key; +#if defined(STA_SUPPORT) + /* Mgmt Frame Protection config */ + mlan_ds_misc_pmfcfg pmfcfg; +#endif /** WAPI IE */ t_u8 wapi_ie[256]; /** WAPI IE length */ t_u8 wapi_ie_len; + /** OSEN IE */ + t_u8 osen_ie[256]; + /** OSEN IE length */ + t_u8 osen_ie_len; /** Pointer to the station table */ mlan_list_head sta_list; /** tdls pending queue */ @@ -1063,8 +1146,14 @@ typedef struct _mlan_private { t_u32 op_code; /** IP address */ t_u8 ip_addr[IPADDR_LEN]; + t_u32 hotspot_cfg; #ifdef STA_SUPPORT ExtCap_t ext_cap; +#endif + /** Control TX AMPDU on infra link */ + t_u8 txaggrctrl; +#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT) + t_void *psapriv; #endif } mlan_private, *pmlan_private; @@ -1131,6 +1220,8 @@ struct _RxReorderTbl { t_u8 force_no_drop; /** flag for check start win */ t_u8 check_start_win; + /** flush data flag */ + t_u8 flush_data; }; /** BSS priority node */ @@ -1247,12 +1338,175 @@ struct _sta_node { IEEEtypes_ExtCap_t ExtCap; /* RSN IE */ IEEEtypes_Generic_t rsn_ie; + /**Link ID*/ + IEEEtypes_LinkIDElement_t link_ie; /** wapi key on off flag */ t_u8 wapi_key_on; /** tx pause status */ t_u8 tx_pause; +#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT) + t_void *cm_connectioninfo; +#endif +}; + +/** 802.11h State information kept in the 'mlan_adapter' driver structure */ +typedef struct { + /** Min TX Power capability sent to FW for 11h use and fw power control */ + t_s8 min_tx_power_capability; + /** Max TX Power capability sent to FW for 11h use and fw power control */ + t_s8 max_tx_power_capability; + /** User provisioned local power constraint sent in association requests */ + t_s8 usr_def_power_constraint; + /** Received CHANNEL_SWITCH_ANN event */ + t_bool recvd_chanswann_event; + /** Indicates an interface wants to enable master radar detection */ + t_bool master_radar_det_enable_pending; + /** Indicates an interface wants to enable slave radar detection */ + t_bool slave_radar_det_enable_pending; + /** Indicates whether master radar detection active in the firmware */ + t_bool is_master_radar_det_active; + /** Indicates whether slave radar detection active in the firmware */ + t_bool is_slave_radar_det_active; + /** Quiet IE */ + IEEEtypes_Quiet_t quiet_ie; +} wlan_11h_device_state_t; + +/** Enumeration for DFS Timestamp represents field */ +enum _dfs_timestamp_repr_e { + /** Ignore entry */ + DFS_TS_REPR_NOT_IN_USE = 0, + /** NOP (Non-Occupancy Period) start time */ + DFS_TS_REPR_NOP_START = 1, + /** CAC (Channel Availability Check) completion time */ + DFS_TS_REPR_CAC_COMPLETION +}; + +/** DFS Timestamp type used for marking NOP/CAC events */ +typedef struct _wlan_dfs_timestamp_t wlan_dfs_timestamp_t; + +/** DFS Timestamp type used for marking NOP/CAC events */ +struct _wlan_dfs_timestamp_t { + /** Pointer to previous node */ + wlan_dfs_timestamp_t *pprev; + /** Pointer to next node */ + wlan_dfs_timestamp_t *pnext; + /** WLAN Channel number */ + t_u8 channel; + /** What this timestamp represents */ + t_u8 represents; + /** reserved field */ + t_u16 reserved; + /** timestamp - seconds */ + t_u32 ts_sec; + /** timestamp - microseconds */ + t_u32 ts_usec; }; +/** DFS State information kept in the 'mlan_adapter' driver structure */ +typedef struct { + /** Indicates whether DFS channel check is occurring in firmware */ + t_bool dfs_check_pending; + /** Indicates whether DFS channel check found radar */ + t_bool dfs_radar_found; + /** Channel radar is being checked on. BAND_A is assumed. */ + t_u8 dfs_check_channel; + /** Timestamp when we got last report, + * to determine if data is old or not. + */ + t_u32 dfs_report_time_sec; + /** List for holding dfs_timestamps for NOP/CAC events */ + mlan_list_head dfs_ts_head; +} wlan_dfs_device_state_t; + +/** Enumeration for mlan_ds_11h_radar_det_hndlg stages */ +enum _mlan_ds_11h_rdh_stages { + RDH_OFF = 0, + RDH_CHK_INTFS = 1, + RDH_STOP_TRAFFIC, + RDH_GET_INFO_CHANNEL, + RDH_GET_INFO_BEACON_DTIM, + RDH_SET_CUSTOM_IE, + RDH_REM_CUSTOM_IE, + RDH_STOP_INTFS, + RDH_SET_NEW_CHANNEL, + RDH_RESTART_INTFS, + RDH_RESTART_TRAFFIC +}; + +/** State info for Radar Detected Handling kept in 'mlan_adapter' */ +typedef struct { + /** Stage (of Operation) */ + t_u8 stage; + /** Number of interfaces to handle */ + t_u8 priv_list_count; + /** Index of interface in process (used by some stages) */ + t_u8 priv_curr_idx; + /** Current Channel (to leave) */ + t_u8 curr_channel; + /** New Channel (to switch to) */ + t_u8 new_channel; + /** UAP band_config */ + t_u8 uap_band_cfg; + /** BEACON*DTIM period (in msec; max of STA/UAP) */ + t_u16 max_bcn_dtim_ms; + /** List of interfaces to handle */ + mlan_private *priv_list[MLAN_MAX_BSS_NUM]; +} wlan_radar_det_hndlg_state_t; + +#ifdef DFS_TESTING_SUPPORT +/** DFS/RDH testing exception settings kept in 'mlan_adapter' */ +typedef struct { + /** user-configured CAC period (in msec) */ + t_u16 user_cac_period_msec; + /** user-configured NOP period (in sec) */ + t_u16 user_nop_period_sec; + /** user-configured skip channel change on radar */ + t_bool no_channel_change_on_radar; + /** user-configured new channel to change to on radar */ + t_u8 fixed_new_channel_on_radar; +} wlan_dfs_testing_settings_t; +#endif /* DFS_SUPPORT_TESTING */ + +/** + * @brief Driver measurement state held in 'mlan_adapter' structure + * + * Used to record a measurement request that the driver is pending on + * the result (received measurement report). + */ +typedef struct { + /** + * Dialog token of a pending measurement request/report. Used to + * block execution while waiting for the specific dialog token + */ + t_u8 meas_rpt_pend_on; + + /** + * Measurement report received from the firmware that we were pending on + */ + HostCmd_DS_MEASUREMENT_REPORT meas_rpt_returned; + +} wlan_meas_state_t; + +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) +/** + * @brief Link buffer into aggregate head buffer + * + * @param pmbuf_aggr Pointer to aggregation buffer + * @param pmbuf Pointer to buffer to copy + */ +static inline t_void +wlan_link_buf_to_aggr(pmlan_buffer pmbuf_aggr, pmlan_buffer pmbuf) +{ + /* link new buf at end of list */ + pmbuf->pnext = pmbuf_aggr; + pmbuf->pprev = pmbuf_aggr->pprev; + pmbuf->pparent = pmbuf_aggr; + pmbuf_aggr->pprev->pnext = pmbuf; + pmbuf_aggr->pprev = pmbuf; + pmbuf_aggr->use_count++; +} +#endif + #ifdef SDIO_MULTI_PORT_TX_AGGR /** data structure for SDIO MPA TX */ typedef struct _sdio_mpa_tx { @@ -1274,8 +1528,10 @@ typedef struct _sdio_mpa_tx { t_u32 buf_size; /** multiport tx aggregation pkt aggr limit */ t_u32 pkt_aggr_limit; - /** multiport write info */ - t_u16 mp_wr_info[SDIO_MP_AGGR_DEF_PKT_LIMIT]; + /** multiport write info */ + t_u16 mp_wr_info[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; + /** multiport rx aggregation mbuf array */ + pmlan_buffer mbuf_arr[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; } sdio_mpa_tx; #endif @@ -1296,9 +1552,9 @@ typedef struct _sdio_mpa_rx { t_u16 start_port; /** multiport rx aggregation mbuf array */ - pmlan_buffer mbuf_arr[SDIO_MP_AGGR_DEF_PKT_LIMIT]; + pmlan_buffer mbuf_arr[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; /** multiport rx aggregation pkt len array */ - t_u32 len_arr[SDIO_MP_AGGR_DEF_PKT_LIMIT]; + t_u32 len_arr[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; /** multiport rx aggregation enable/disable flag */ t_u8 enabled; @@ -1335,9 +1591,88 @@ typedef struct _mlan_init_para { t_u32 max_tx_buf; /** 802.11d configuration */ t_u32 cfg_11d; + /** 802.11H DFS Master Radar Detect */ + t_u32 dfs_master_radar_det_en; + /** 802.11H DFS Slave Radar Detect */ + t_u32 dfs_slave_radar_det_en; + /** FW download CRC check flag */ + t_u32 fw_crc_check; /** dev cap mask */ t_u32 dev_cap_mask; } mlan_init_para, *pmlan_init_para; +typedef struct _mlan_sdio_card_reg { + t_u8 start_rd_port; + t_u8 start_wr_port; + t_u8 base_0_reg; + t_u8 base_1_reg; + t_u8 poll_reg; + t_u8 host_int_enable; + t_u8 host_int_status; + t_u8 status_reg_0; + t_u8 status_reg_1; + t_u8 sdio_int_mask; + t_u32 data_port_mask; + t_u8 max_mp_regs; + t_u8 rd_bitmap_l; + t_u8 rd_bitmap_u; + t_u8 rd_bitmap_1l; + t_u8 rd_bitmap_1u; + t_u8 wr_bitmap_l; + t_u8 wr_bitmap_u; + t_u8 wr_bitmap_1l; + t_u8 wr_bitmap_1u; + t_u8 rd_len_p0_l; + t_u8 rd_len_p0_u; + t_u8 card_misc_cfg_reg; +} mlan_sdio_card_reg, *pmlan_sdio_card_reg; + +/** ampdu info */ +typedef struct _ampdu_info { + /** staion tx win_size */ + t_u32 ampdu_sta_txwinsize; + /** uap tx win_size */ + t_u32 ampdu_uap_txwinsize; + /** uap rx win_size */ + t_u32 ampdu_uap_rxwinsize; + /** wfd tx/rx winsize */ + t_u32 ampdu_wfd_txrxwinsize; +} ampdu_info; + +typedef struct _mlan_sdio_device { + const mlan_sdio_card_reg *reg; + t_u8 max_ports; + t_u8 mp_aggr_pkt_limit; + t_bool supports_sdio_new_mode; + t_bool has_control_mask; + /** more option */ + t_u8 card_config_2_1_reg; // 8897:0xCD, 8887:0xD9 + t_u8 cmd_config_0; // CMD_CONFIG_0 8897:0xB8 8887:0xC4 + t_u8 cmd_config_1; // CMD_CONFIG_1 8897:0xB9, 8887:0xC5 + t_u8 cmd_rd_len_0; // CMD_RD_LEN_0 8897:0xB4, 8887:0xC0 + t_u8 cmd_rd_len_1; // CMD_RD_LEN_1 8897:0xB5, 8887:0xC1 + t_u8 io_port_0_reg; // IO_PORT_0_REG + t_u8 io_port_1_reg; // IO_PORT_1_REG + t_u8 io_port_2_reg; // IO_PORT_2_REG + t_u8 host_int_rsr_reg; // HOST_INT_RSR_REG + t_u8 card_rx_len_reg; // CARD_RX_LEN_REG + t_u8 card_rx_unit_reg; // CARD_RX_UNIT_REG + t_u8 host_int_mask_reg; // HOST_INT_MASK_REG + t_u8 host_int_status_reg; // HOST_INT_STATUS_REG + t_u32 mp_tx_aggr_buf_size; + t_u32 mp_rx_aggr_buf_size; + /** Max Tx buffer size */ + t_u32 max_tx_buf_size; + /** support driver_supplicant_auth */ + t_u8 driver_supplicant_auth; + /** support V15_UPDATE */ + t_u8 v15_update; + /** support V15_FW_API */ + t_u8 v15_fw_api; + /** support ext_scan */ + t_u8 ext_scan; + /** ampdu info*/ + ampdu_info *ampdu_info; +} mlan_sdio_device, *pmlan_sdio_device; /** Adapter data structure for MLAN */ typedef struct _mlan_adapter { @@ -1399,8 +1734,12 @@ typedef struct _mlan_adapter { t_u32 fw_cap_info; /** pint_lock for interrupt handling */ t_void *pint_lock; + const mlan_sdio_device *psdio_device; + t_u16 card_type; /** Interrupt status */ t_u8 sdio_ireg; + /** number of interrupt receive */ + t_u32 num_of_irq; /** SDIO multiple port read bitmap */ t_u32 mp_rd_bitmap; /** SDIO multiple port write bitmap */ @@ -1413,18 +1752,28 @@ typedef struct _mlan_adapter { t_u8 curr_rd_port; /** Current available port for write */ t_u8 curr_wr_port; + /** FW update port number */ + t_u32 mp_update[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX * 2]; + /** Invalid port update count */ + t_u32 mp_invalid_update; /** last SDIO multiple port group registers */ - t_u8 last_mp_regs[MAX_MP_REGS]; + t_u8 last_mp_regs[MAX_MP_REGS_MAX]; /** Array to store values of SDIO multiple port group registers */ t_u8 *mp_regs; /** allocated buf to read SDIO multiple port group registers */ t_u8 *mp_regs_buf; +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + /* see blk_queue_max_segment_size */ + t_u32 max_seg_size; + /* see blk_queue_max_segments */ + t_u16 max_segs; +#endif #ifdef SDIO_MULTI_PORT_TX_AGGR /** data structure for SDIO MPA TX */ sdio_mpa_tx mpa_tx; /** packet number for tx aggr */ - t_u32 mpa_tx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT]; + t_u32 mpa_tx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; /** no more packets count*/ t_u32 mpa_sent_last_pkt; /** no write_ports count */ @@ -1438,9 +1787,15 @@ typedef struct _mlan_adapter { /** last length for cmd53 write data */ t_u32 last_mp_wr_len[SDIO_MP_DBG_NUM]; /** length info for cmd53 write data */ - t_u16 last_mp_wr_info[SDIO_MP_DBG_NUM * SDIO_MP_AGGR_DEF_PKT_LIMIT]; + t_u16 last_mp_wr_info[SDIO_MP_DBG_NUM * SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; /** last curr_wr_port */ t_u8 last_curr_wr_port[SDIO_MP_DBG_NUM]; + + /** buffer for mp debug */ + t_u8 *mpa_buf; + /** length info for mp buf size */ + t_u32 mpa_buf_size; + /** last mp_index */ t_u8 last_mp_index; #endif /* SDIO_MULTI_PORT_TX_AGGR */ @@ -1449,7 +1804,7 @@ typedef struct _mlan_adapter { /** data structure for SDIO MPA RX */ sdio_mpa_rx mpa_rx; /** packet number for tx aggr */ - t_u32 mpa_rx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT]; + t_u32 mpa_rx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; #endif /* SDIO_MULTI_PORT_RX_AGGR */ /** SDIO interrupt mode (0: INT_MODE_SDIO, 1: INT_MODE_GPIO) */ @@ -1521,13 +1876,26 @@ typedef struct _mlan_adapter { mlan_list_head scan_pending_q; /** mlan_processing */ t_u32 scan_processing; - + /** coex scan flag */ + t_u8 coex_scan; + /** coex min scan time */ + t_u8 coex_min_scan_time; + /** coex max scan time */ + t_u8 coex_max_scan_time; + /** coex win size flag */ + t_u8 coex_win_size; + /** coex amdpdu tx win size */ + t_u8 coex_tx_win_size; + /** coex ampdu rx win size */ + t_u8 coex_rx_win_size; /** Region code */ t_u16 region_code; /** Region Channel data */ region_chan_t region_channel[MAX_REGION_CHANNEL_NUM]; /** CFP table code for 2.4GHz */ t_u8 cfp_code_bg; + /** CFP table code for 5GHz */ + t_u8 cfp_code_a; #ifdef STA_SUPPORT /** Universal Channel data */ region_chan_t universal_channel[MAX_REGION_CHANNEL_NUM]; @@ -1538,10 +1906,26 @@ typedef struct _mlan_adapter { wlan_802_11d_domain_reg_t domain_reg; /** Country Code */ t_u8 country_code[COUNTRY_CODE_LEN]; + /** FSM variable for 11h support */ + wlan_11h_device_state_t state_11h; + /** FSM variable for DFS support */ + wlan_dfs_device_state_t state_dfs; + /** FSM variable for RDH support */ + wlan_radar_det_hndlg_state_t state_rdh; +#ifdef DFS_TESTING_SUPPORT + /** User configured settings for DFS testing */ + wlan_dfs_testing_settings_t dfs_test_params; +#endif + /** FSM variable for MEAS support */ + wlan_meas_state_t state_meas; /** Scan table */ BSSDescriptor_t *pscan_table; /** scan age in secs */ t_u32 age_in_secs; + /** channel statstics */ + ChanStatistics_t *pchan_stats; + /** Number of records in the chan_stats */ + t_u32 num_in_chan_stats; t_u8 bgscan_reported; /** Number of records in the scan table */ @@ -1582,6 +1966,8 @@ typedef struct _mlan_adapter { t_u8 tx_lock_flag; /** Rx lock flag */ t_u8 rx_lock_flag; + /** Multi channel status */ + t_u8 mc_status; /** sleep_params_t */ sleep_params_t sleep_params; @@ -1680,6 +2066,12 @@ typedef struct _mlan_adapter { /** RX pending for forwarding packets */ t_u16 pending_bridge_pkts; +#ifdef STA_SUPPORT + /** ARP filter buffer */ + t_u8 arp_filter[ARP_FILTER_MAX_BUF_SIZE]; + /** ARP filter buffer size */ + t_u32 arp_filter_size; +#endif /* STA_SUPPORT */ /** Minimum delay between HsActive and HostWake (in msec) */ t_u16 min_wake_holdoff; @@ -1699,6 +2091,9 @@ typedef struct _mlan_adapter { /* TDLS_NOT_SETUP|TDLS_SWITCHING_CHANNEL|TDLS_IN_BASE_CHANNEL|TDLS_IN_SWITCH_CHANNEL */ tdlsStatus_e tdls_status; + /** Control coex RX window size configuration */ + t_u8 coex_rx_winsize; + t_bool mc_policy; } mlan_adapter, *pmlan_adapter; /** Ethernet packet type for EAPOL */ @@ -1728,7 +2123,7 @@ mlan_status wlan_shutdown_fw_complete(IN pmlan_adapter pmadapter); /** Receive event */ mlan_status wlan_recv_event(pmlan_private priv, - mlan_event_id event_id, t_void * pmevent); + mlan_event_id event_id, t_void *pmevent); /** Initialize mlan_adapter structure */ t_void wlan_init_adapter(IN pmlan_adapter pmadapter); @@ -1744,10 +2139,10 @@ mlan_status wlan_prepare_cmd(IN pmlan_private priv, IN t_u16 cmd_no, IN t_u16 cmd_action, IN t_u32 cmd_oid, - IN t_void * pioctl_buf, IN t_void * pdata_buf); + IN t_void *pioctl_buf, IN t_void *pdata_buf); /** cmd timeout handler */ -t_void wlan_cmd_timeout_func(t_void * function_context); +t_void wlan_cmd_timeout_func(t_void *function_context); /** process host cmd */ mlan_status wlan_misc_ioctl_host_cmd(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); @@ -1764,22 +2159,23 @@ mlan_status wlan_bss_ioctl_bss_role(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); #endif -mlan_status wlan_find_bss(mlan_private * pmpriv, pmlan_ioctl_req pioctl_req); +mlan_status wlan_set_ewpa_mode(mlan_private *priv, mlan_ds_passphrase *psec_pp); +mlan_status wlan_find_bss(mlan_private *pmpriv, pmlan_ioctl_req pioctl_req); /** Allocate memory for adapter structure members */ mlan_status wlan_allocate_adapter(pmlan_adapter pmadapter); /** Free adapter */ t_void wlan_free_adapter(pmlan_adapter pmadapter); /** Free priv */ -t_void wlan_free_priv(mlan_private * pmpriv); +t_void wlan_free_priv(mlan_private *pmpriv); /** Allocate command buffer */ -mlan_status wlan_alloc_cmd_buffer(IN mlan_adapter * pmadapter); +mlan_status wlan_alloc_cmd_buffer(IN mlan_adapter *pmadapter); /** Free command buffer */ -mlan_status wlan_free_cmd_buffer(IN mlan_adapter * pmadapter); +mlan_status wlan_free_cmd_buffer(IN mlan_adapter *pmadapter); /** Request command lock */ -t_void wlan_request_cmd_lock(mlan_adapter * pmadapter); +t_void wlan_request_cmd_lock(mlan_adapter *pmadapter); /** Release command lock */ -t_void wlan_release_cmd_lock(mlan_adapter * pmadapter); +t_void wlan_release_cmd_lock(mlan_adapter *pmadapter); #ifdef STA_SUPPORT /** Flush the scan pending queue */ t_void wlan_flush_scan_queue(pmlan_adapter pmadapter); @@ -1794,32 +2190,32 @@ t_void wlan_cancel_pending_ioctl(pmlan_adapter pmadapter, t_void wlan_cancel_bss_pending_cmd(pmlan_adapter pmadapter, t_u32 bss_index); /** Insert command to free queue */ -t_void wlan_insert_cmd_to_free_q(IN mlan_adapter * pmadapter, - IN cmd_ctrl_node * pcmd_node); +t_void wlan_insert_cmd_to_free_q(IN mlan_adapter *pmadapter, + IN cmd_ctrl_node *pcmd_node); /** Insert command to pending queue */ -t_void wlan_insert_cmd_to_pending_q(IN mlan_adapter * pmadapter, - IN cmd_ctrl_node * pcmd_node, +t_void wlan_insert_cmd_to_pending_q(IN mlan_adapter *pmadapter, + IN cmd_ctrl_node *pcmd_node, IN t_u32 addtail); /** Execute next command */ -mlan_status wlan_exec_next_cmd(mlan_adapter * pmadapter); +mlan_status wlan_exec_next_cmd(mlan_adapter *pmadapter); /** Proecess command response */ -mlan_status wlan_process_cmdresp(mlan_adapter * pmadapter); +mlan_status wlan_process_cmdresp(mlan_adapter *pmadapter); /** Handle received packet, has extra handling for aggregate packets */ mlan_status wlan_handle_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf); /** Process transmission */ mlan_status wlan_process_tx(pmlan_private priv, pmlan_buffer pmbuf, - mlan_tx_param * tx_param); + mlan_tx_param *tx_param); /** Transmit a null data packet */ mlan_status wlan_send_null_packet(pmlan_private priv, t_u8 flags); #if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) -mlan_status wlan_alloc_sdio_mpa_buffers(IN mlan_adapter * pmadapter, +mlan_status wlan_alloc_sdio_mpa_buffers(IN mlan_adapter *pmadapter, t_u32 mpa_tx_buf_size, t_u32 mpa_rx_buf_size); -mlan_status wlan_free_sdio_mpa_buffers(IN mlan_adapter * pmadapter); +mlan_status wlan_free_sdio_mpa_buffers(IN mlan_adapter *pmadapter); #endif /** Process write data complete */ @@ -1831,11 +2227,10 @@ mlan_status wlan_recv_packet_complete(pmlan_adapter pmadapter, /** Clean Tx Rx queues */ t_void wlan_clean_txrx(pmlan_private priv); -t_void wlan_add_buf_bypass_txqueue(mlan_adapter * pmadapter, - pmlan_buffer pmbuf); -t_void wlan_process_bypass_tx(mlan_adapter * pmadapter); +t_void wlan_add_buf_bypass_txqueue(mlan_adapter *pmadapter, pmlan_buffer pmbuf); +t_void wlan_process_bypass_tx(mlan_adapter *pmadapter); t_void wlan_cleanup_bypass_txq(pmlan_private priv); -t_u8 wlan_bypass_tx_list_empty(mlan_adapter * pmadapter); +t_u8 wlan_bypass_tx_list_empty(mlan_adapter *pmadapter); /** Check if this is the last packet */ t_u8 wlan_check_last_packet_indication(pmlan_private priv); @@ -1844,44 +2239,43 @@ t_u8 wlan_check_last_packet_indication(pmlan_private priv); #define MOAL_MALLOC_BUFFER (1) /** function to allocate a mlan_buffer */ -pmlan_buffer wlan_alloc_mlan_buffer(mlan_adapter * pmadapter, t_u32 data_len, +pmlan_buffer wlan_alloc_mlan_buffer(mlan_adapter *pmadapter, t_u32 data_len, t_u32 head_room, t_u32 malloc_flag); /** function to free a mlan_buffer */ -t_void wlan_free_mlan_buffer(mlan_adapter * pmadapter, pmlan_buffer pmbuf); +t_void wlan_free_mlan_buffer(mlan_adapter *pmadapter, pmlan_buffer pmbuf); /** command resp handler for version ext */ -mlan_status wlan_ret_ver_ext(pmlan_private pmpriv, HostCmd_DS_COMMAND * resp, - mlan_ioctl_req * pioctl_buf); +mlan_status wlan_ret_ver_ext(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp, + mlan_ioctl_req *pioctl_buf); /** command resp handler for rx mgmt forward registration */ -mlan_status wlan_ret_rx_mgmt_ind(pmlan_private pmpriv, - HostCmd_DS_COMMAND * resp, - mlan_ioctl_req * pioctl_buf); +mlan_status wlan_ret_rx_mgmt_ind(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp, + mlan_ioctl_req *pioctl_buf); /** Check Power Save condition */ -t_void wlan_check_ps_cond(mlan_adapter * pmadapter); +t_void wlan_check_ps_cond(mlan_adapter *pmadapter); /** handle command for enhanced power save mode */ mlan_status wlan_cmd_enh_power_mode(pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, + IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action, - IN t_u16 ps_bitmap, IN t_void * pdata_buf); + IN t_u16 ps_bitmap, IN t_void *pdata_buf); /** handle command resp for enhanced power save mode */ mlan_status wlan_ret_enh_power_mode(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); /** handle commnand for cfg data */ mlan_status wlan_cmd_cfg_data(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * pcmd, - IN t_u16 cmd_action, IN t_void * pdata_buf); + IN HostCmd_DS_COMMAND *pcmd, + IN t_u16 cmd_action, IN t_void *pdata_buf); /** handle command resp for cfg data */ mlan_status wlan_ret_cfg_data(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN t_void * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN t_void *pioctl_buf); /** Process sleep confirm command response */ -void wlan_process_sleep_confirm_resp(pmlan_adapter pmadapter, t_u8 * pbuf, +void wlan_process_sleep_confirm_resp(pmlan_adapter pmadapter, t_u8 *pbuf, t_u32 len); /** Perform hs related activities on receving the power up interrupt */ @@ -1890,8 +2284,8 @@ void wlan_process_hs_config(pmlan_adapter pmadapter); mlan_status wlan_pm_reset_card(pmlan_adapter adapter); mlan_status wlan_pm_wakeup_card(pmlan_adapter pmadapter); -mlan_status wlan_process_802dot11_mgmt_pkt(mlan_private * priv, t_u8 * payload, - t_u32 payload_len); +mlan_status wlan_process_802dot11_mgmt_pkt(mlan_private *priv, t_u8 *payload, + t_u32 payload_len, RxPD *prx_pd); mlan_status wlan_pm_ioctl_hscfg(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req); @@ -1901,32 +2295,36 @@ mlan_status wlan_bss_ioctl_wifi_direct_mode(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); mlan_status wlan_cmd_wifi_direct_mode(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, + IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action, - IN t_void * pdata_buf); + IN t_void *pdata_buf); mlan_status wlan_ret_wifi_direct_mode(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); mlan_status wlan_radio_ioctl_remain_chan_cfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); mlan_status wlan_cmd_remain_on_channel(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, + IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action, - IN t_void * pdata_buf); + IN t_void *pdata_buf); mlan_status wlan_ret_remain_on_channel(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); mlan_status wlan_cmd_p2p_params_config(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, + IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action, - IN t_void * pdata_buf); + IN t_void *pdata_buf); mlan_status wlan_ret_p2p_params_config(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); mlan_status wlan_misc_p2p_config(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); #endif +/** get ralist info */ +int wlan_get_ralist_info(mlan_private *priv, ralist_info *buf); +/** dump ralist */ +void wlan_dump_ralist(mlan_private *priv); /** get pm info */ mlan_status wlan_get_pm_info(IN pmlan_adapter pmadapter, @@ -1939,12 +2337,12 @@ mlan_status wlan_get_hs_wakeup_reason(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); mlan_status wlan_cmd_hs_wakeup_reason(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_void * pdata_buf); + IN HostCmd_DS_COMMAND *cmd, + IN t_void *pdata_buf); mlan_status wlan_ret_hs_wakeup_reason(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); mlan_status wlan_radio_ioctl_radio_ctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); @@ -1953,17 +2351,17 @@ mlan_status wlan_radio_ioctl_ant_cfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); mlan_status wlan_cmd_tx_rate_cfg(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf); + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf); mlan_status wlan_ret_tx_rate_cfg(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); mlan_status wlan_rate_ioctl_cfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); mlan_status wlan_ret_802_11_tx_rate_query(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); mlan_status wlan_rate_ioctl_get_data_rate(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); @@ -1971,122 +2369,132 @@ mlan_status wlan_rate_ioctl_get_data_rate(IN pmlan_adapter pmadapter, t_void wlan_host_sleep_activated_event(pmlan_private priv, t_u8 activated); /** Handles the command response of hs_cfg */ mlan_status wlan_ret_802_11_hs_cfg(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); /** Sends HS_WAKEUP event to applications */ t_void wlan_host_sleep_wakeup_event(pmlan_private priv); /** send adapter specific init cmd to firmware */ mlan_status wlan_adapter_init_cmd(IN pmlan_adapter pmadapter); +#ifdef RX_PACKET_COALESCE +mlan_status wlan_cmd_rx_pkt_coalesce_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, + IN t_void *pdata_buf); +mlan_status wlan_ret_rx_pkt_coalesce_cfg(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf); +#endif +mlan_status wlan_handle_event_multi_chan_info(IN pmlan_private pmpriv, + pmlan_buffer pevent); + #ifdef STA_SUPPORT /** Process received packet */ mlan_status wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf); /** ioctl handler for station mode */ -mlan_status wlan_ops_sta_ioctl(t_void * adapter, pmlan_ioctl_req pioctl_req); +mlan_status wlan_ops_sta_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req); /** cmd handler for station mode */ -mlan_status wlan_ops_sta_prepare_cmd(IN t_void * priv, +mlan_status wlan_ops_sta_prepare_cmd(IN t_void *priv, IN t_u16 cmd_no, IN t_u16 cmd_action, IN t_u32 cmd_oid, - IN t_void * pioctl_buf, - IN t_void * pdata_buf, - IN t_void * pcmd_buf); + IN t_void *pioctl_buf, + IN t_void *pdata_buf, IN t_void *pcmd_buf); /** cmdresp handler for station mode */ -mlan_status wlan_ops_sta_process_cmdresp(IN t_void * priv, +mlan_status wlan_ops_sta_process_cmdresp(IN t_void *priv, IN t_u16 cmdresp_no, - IN t_void * pcmd_buf, - IN t_void * pioctl); + IN t_void *pcmd_buf, + IN t_void *pioctl); /** rx handler for station mode */ -mlan_status wlan_ops_sta_process_rx_packet(IN t_void * adapter, +mlan_status wlan_ops_sta_process_rx_packet(IN t_void *adapter, IN pmlan_buffer pmbuf); /** event handler for station mode */ -mlan_status wlan_ops_sta_process_event(IN t_void * priv); +mlan_status wlan_ops_sta_process_event(IN t_void *priv); /** fill txpd for station mode */ -t_void *wlan_ops_sta_process_txpd(IN t_void * priv, IN pmlan_buffer pmbuf); +t_void *wlan_ops_sta_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf); /** send init cmd to firmware for station mode */ -mlan_status wlan_ops_sta_init_cmd(IN t_void * priv, IN t_u8 first_bss); +mlan_status wlan_ops_sta_init_cmd(IN t_void *priv, IN t_u8 first_bss); /** Flush the scan table */ mlan_status wlan_flush_scan_table(IN pmlan_adapter pmadapter); /** Scan for networks */ -mlan_status wlan_scan_networks(IN mlan_private * pmpriv, - IN t_void * pioctl_buf, - IN const wlan_user_scan_cfg * puser_scan_in); +mlan_status wlan_scan_networks(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, + IN const wlan_user_scan_cfg *puser_scan_in); /** Scan for specific SSID */ -mlan_status wlan_scan_specific_ssid(IN mlan_private * pmpriv, - IN t_void * pioctl_buf, - IN mlan_802_11_ssid * preq_ssid); +mlan_status wlan_scan_specific_ssid(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, + IN mlan_802_11_ssid *preq_ssid); /** Scan command handler */ mlan_status wlan_cmd_802_11_scan(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * pcmd, - IN t_void * pdata_buf); + IN HostCmd_DS_COMMAND *pcmd, + IN t_void *pdata_buf); /** Queue scan command handler */ -t_void wlan_queue_scan_cmd(IN mlan_private * pmpriv, - IN cmd_ctrl_node * pcmd_node); +t_void wlan_queue_scan_cmd(IN mlan_private *pmpriv, + IN cmd_ctrl_node *pcmd_node); /** Handler for scan command response */ mlan_status wlan_ret_802_11_scan(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN t_void * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN t_void *pioctl_buf); /** Extended scan command handler */ mlan_status wlan_cmd_802_11_scan_ext(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * pcmd, - IN t_void * pdata_buf); + IN HostCmd_DS_COMMAND *pcmd, + IN t_void *pdata_buf); /** Handler for extended scan command response */ mlan_status wlan_ret_802_11_scan_ext(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN t_void * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN t_void *pioctl_buf); /** Handler event for extended scan report */ -mlan_status wlan_handle_event_ext_scan_report(IN mlan_private * pmpriv, - IN mlan_buffer * pmbuf); +mlan_status wlan_handle_event_ext_scan_report(IN mlan_private *pmpriv, + IN mlan_buffer *pmbuf); /** check network compatibility */ -t_s32 wlan_is_network_compatible(IN mlan_private * pmpriv, +t_s32 wlan_is_network_compatible(IN mlan_private *pmpriv, IN t_u32 index, IN t_u32 mode); /** Find an SSID in a list */ t_s32 wlan_find_ssid_in_list(IN pmlan_private pmpriv, - IN mlan_802_11_ssid * ssid, - IN t_u8 * bssid, IN t_u32 mode); + IN mlan_802_11_ssid *ssid, + IN t_u8 *bssid, IN t_u32 mode); /** Find a BSSID in a list */ -t_s32 wlan_find_bssid_in_list(IN mlan_private * pmpriv, - IN t_u8 * bssid, IN t_u32 mode); +t_s32 wlan_find_bssid_in_list(IN mlan_private *pmpriv, + IN t_u8 *bssid, IN t_u32 mode); /** Find best network */ -mlan_status wlan_find_best_network(IN mlan_private * pmpriv, - OUT mlan_ssid_bssid * preq_ssid_bssid); +mlan_status wlan_find_best_network(IN mlan_private *pmpriv, + OUT mlan_ssid_bssid *preq_ssid_bssid); /** Compare two SSIDs */ t_s32 wlan_ssid_cmp(IN pmlan_adapter pmadapter, - IN mlan_802_11_ssid * ssid1, IN mlan_802_11_ssid * ssid2); + IN mlan_802_11_ssid *ssid1, IN mlan_802_11_ssid *ssid2); /** Associate */ -mlan_status wlan_associate(IN mlan_private * pmpriv, - IN t_void * pioctl_buf, - IN BSSDescriptor_t * pBSSDesc); +mlan_status wlan_associate(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, IN BSSDescriptor_t *pBSSDesc); /** Associate command handler */ -mlan_status wlan_cmd_802_11_associate(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_void * pdata_buf); +mlan_status wlan_cmd_802_11_associate(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_void *pdata_buf); /** Handler for association command response */ -mlan_status wlan_ret_802_11_associate(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN t_void * pioctl_buf); +mlan_status wlan_ret_802_11_associate(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN t_void *pioctl_buf); /** Reset connected state */ t_void wlan_reset_connect_state(IN pmlan_private priv, IN t_u8 drv_disconnect); @@ -2097,71 +2505,71 @@ t_void wlan_2040_coex_event(pmlan_private pmpriv); t_u8 wlan_band_to_radio_type(IN t_u8 band); /** Disconnect */ -mlan_status wlan_disconnect(IN mlan_private * pmpriv, - IN mlan_ioctl_req * pioctl_req, - IN mlan_802_11_mac_addr * mac); +mlan_status wlan_disconnect(IN mlan_private *pmpriv, + IN mlan_ioctl_req *pioctl_req, + IN mlan_802_11_mac_addr *mac); /** Ad-Hoc start */ -mlan_status wlan_adhoc_start(IN mlan_private * pmpriv, - IN t_void * pioctl_buf, - IN mlan_802_11_ssid * padhoc_ssid); +mlan_status wlan_adhoc_start(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, + IN mlan_802_11_ssid *padhoc_ssid); /** Ad-Hoc join */ -mlan_status wlan_adhoc_join(IN mlan_private * pmpriv, - IN t_void * pioctl_buf, - IN BSSDescriptor_t * pBSSDesc); +mlan_status wlan_adhoc_join(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, + IN BSSDescriptor_t *pBSSDesc); /** Ad-Hoc start command handler */ -mlan_status wlan_cmd_802_11_ad_hoc_start(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_void * pdata_buf); +mlan_status wlan_cmd_802_11_ad_hoc_start(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_void *pdata_buf); /** Ad-Hoc command handler */ -mlan_status wlan_cmd_802_11_ad_hoc_join(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_void * pdata_buf); +mlan_status wlan_cmd_802_11_ad_hoc_join(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_void *pdata_buf); /** Handler for Ad-Hoc commands */ -mlan_status wlan_ret_802_11_ad_hoc(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN t_void * pioctl_buf); +mlan_status wlan_ret_802_11_ad_hoc(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN t_void *pioctl_buf); /** Handler for bgscan query commands */ -mlan_status wlan_cmd_802_11_bg_scan_query(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * pcmd, - IN t_void * pdata_buf); +mlan_status wlan_cmd_802_11_bg_scan_query(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *pcmd, + IN t_void *pdata_buf); /** Handler for bgscan config command */ -mlan_status wlan_cmd_bgscan_config(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * pcmd, - IN t_void * pdata_buf); +mlan_status wlan_cmd_bgscan_config(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *pcmd, + IN t_void *pdata_buf); /** Hander for bgscan config command response */ -mlan_status wlan_ret_bgscan_config(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf); -mlan_status wlan_ret_802_11_bgscan_query(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf); +mlan_status wlan_ret_bgscan_config(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); +mlan_status wlan_ret_802_11_bgscan_query(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); /** Get Channel-Frequency-Power by band and channel */ chan_freq_power_t *wlan_get_cfp_by_band_and_channel(pmlan_adapter pmadapter, t_u8 band, t_u16 channel, - region_chan_t * - region_channel); + region_chan_t + *region_channel); /** Find Channel-Frequency-Power by band and channel */ -chan_freq_power_t *wlan_find_cfp_by_band_and_channel(mlan_adapter * pmadapter, +chan_freq_power_t *wlan_find_cfp_by_band_and_channel(mlan_adapter *pmadapter, t_u8 band, t_u16 channel); /** Find Channel-Frequency-Power by band and frequency */ -chan_freq_power_t *wlan_find_cfp_by_band_and_freq(mlan_adapter * pmadapter, +chan_freq_power_t *wlan_find_cfp_by_band_and_freq(mlan_adapter *pmadapter, t_u8 band, t_u32 freq); /** Get Tx power of channel from Channel-Frequency-Power */ -t_u8 wlan_get_txpwr_of_chan_from_cfp(mlan_private * pmpriv, t_u8 channel); +t_u8 wlan_get_txpwr_of_chan_from_cfp(mlan_private *pmpriv, t_u8 channel); /** find frequency from band and channel */ t_u32 wlan_find_freq_from_band_chan(t_u8, t_u8); /* Save a beacon buffer of the current bss descriptor */ -t_void wlan_save_curr_bcn(IN mlan_private * pmpriv); +t_void wlan_save_curr_bcn(IN mlan_private *pmpriv); /* Free a beacon buffer of the current bss descriptor */ -t_void wlan_free_curr_bcn(IN mlan_private * pmpriv); +t_void wlan_free_curr_bcn(IN mlan_private *pmpriv); #endif /* STA_SUPPORT */ @@ -2170,127 +2578,129 @@ t_void wlan_free_curr_bcn(IN mlan_private * pmpriv); t_u32 wlan_index_to_data_rate(pmlan_adapter pmadapter, t_u8 index, t_u8 ht_info); /** Get active data rates */ -t_u32 wlan_get_active_data_rates(mlan_private * pmpriv, t_u32 bss_mode, +t_u32 wlan_get_active_data_rates(mlan_private *pmpriv, t_u32 bss_mode, t_u8 config_bands, WLAN_802_11_RATES rates); /** Get supported data rates */ -t_u32 wlan_get_supported_rates(mlan_private * pmpriv, t_u32 bss_mode, +t_u32 wlan_get_supported_rates(mlan_private *pmpriv, t_u32 bss_mode, t_u8 config_bands, WLAN_802_11_RATES rates); /** Convert data rate to index */ t_u8 wlan_data_rate_to_index(pmlan_adapter pmadapter, t_u32 rate); /** Check if rate is auto */ -t_u8 wlan_is_rate_auto(mlan_private * pmpriv); +t_u8 wlan_is_rate_auto(mlan_private *pmpriv); /** Get rate index */ -int wlan_get_rate_index(pmlan_adapter pmadapter, t_u16 * rateBitmap, int size); +int wlan_get_rate_index(pmlan_adapter pmadapter, t_u16 *rateBitmap, int size); /* CFP related functions */ /** Region code index table */ extern t_u16 region_code_index[MRVDRV_MAX_REGION_CODE]; /** The table to keep CFP code for BG */ extern t_u16 cfp_code_index_bg[MRVDRV_MAX_CFP_CODE_BG]; +/** The table to keep CFP code for A */ +extern t_u16 cfp_code_index_a[MRVDRV_MAX_CFP_CODE_A]; /** Set region table */ -mlan_status wlan_set_regiontable(mlan_private * pmpriv, t_u8 region, t_u8 band); +mlan_status wlan_set_regiontable(mlan_private *pmpriv, t_u8 region, t_u8 band); +/** Get radar detection requirements*/ +t_bool wlan_get_cfp_radar_detect(mlan_private *priv, t_u8 chnl); /** check if scan type is passive for b/g band*/ -t_bool wlan_bg_scan_type_is_passive(mlan_private * priv, t_u8 chnl); +t_bool wlan_bg_scan_type_is_passive(mlan_private *priv, t_u8 chnl); /** check if channel is blacklisted */ -t_bool wlan_is_chan_blacklisted(mlan_private * priv, t_u8 band, t_u8 chan); +t_bool wlan_is_chan_blacklisted(mlan_private *priv, t_u8 band, t_u8 chan); /** set blacklist setting for a channel */ -t_bool wlan_set_chan_blacklist(mlan_private * priv, t_u8 band, t_u8 chan, +t_bool wlan_set_chan_blacklist(mlan_private *priv, t_u8 band, t_u8 chan, t_bool bl); /* 802.11D related functions */ /** Initialize 11D */ -t_void wlan_11d_priv_init(mlan_private * pmpriv); +t_void wlan_11d_priv_init(mlan_private *pmpriv); /** Initialize 11D */ -t_void wlan_11d_init(mlan_adapter * pmadapter); +t_void wlan_11d_init(mlan_adapter *pmadapter); /** Enable 11D */ -mlan_status wlan_11d_enable(mlan_private * pmpriv, t_void * pioctl_buf, +mlan_status wlan_11d_enable(mlan_private *pmpriv, t_void *pioctl_buf, state_11d_t flag); /** Get if 11D is enabled */ -t_bool wlan_11d_is_enabled(mlan_private * pmpriv); +t_bool wlan_11d_is_enabled(mlan_private *pmpriv); /** Get if priv is station */ -t_bool wlan_is_station(mlan_private * pmpriv); +t_bool wlan_is_station(mlan_private *pmpriv); /** Command handler for 11D country info */ -mlan_status wlan_cmd_802_11d_domain_info(mlan_private * pmpriv, - HostCmd_DS_COMMAND * pcmd, +mlan_status wlan_cmd_802_11d_domain_info(mlan_private *pmpriv, + HostCmd_DS_COMMAND *pcmd, t_u16 cmd_action); /** Handler for 11D country info command response */ -mlan_status wlan_ret_802_11d_domain_info(mlan_private * pmpriv, - HostCmd_DS_COMMAND * resp); +mlan_status wlan_ret_802_11d_domain_info(mlan_private *pmpriv, + HostCmd_DS_COMMAND *resp); #ifdef STA_SUPPORT /** Convert channel to frequency */ t_u32 wlan_11d_chan_2_freq(pmlan_adapter pmadapter, t_u8 chan, t_u8 band); /** Set 11D universal table */ -mlan_status wlan_11d_set_universaltable(mlan_private * pmpriv, t_u8 band); +mlan_status wlan_11d_set_universaltable(mlan_private *pmpriv, t_u8 band); /** Clear 11D region table */ -mlan_status wlan_11d_clear_parsedtable(mlan_private * pmpriv); +mlan_status wlan_11d_clear_parsedtable(mlan_private *pmpriv); /** Create 11D country information for downloading */ -mlan_status wlan_11d_create_dnld_countryinfo(mlan_private * pmpriv, t_u8 band); +mlan_status wlan_11d_create_dnld_countryinfo(mlan_private *pmpriv, t_u8 band); /** Get scan type from 11D info */ t_u8 wlan_11d_get_scan_type(pmlan_adapter pmadapter, t_u8 band, t_u8 chan, - parsed_region_chan_11d_t * parsed_region_chan); + parsed_region_chan_11d_t *parsed_region_chan); /** Parse 11D country info */ -mlan_status wlan_11d_parse_dnld_countryinfo(mlan_private * pmpriv, - BSSDescriptor_t * pBSSDesc); +mlan_status wlan_11d_parse_dnld_countryinfo(mlan_private *pmpriv, + BSSDescriptor_t *pBSSDesc); /** Prepare 11D domain information for download */ -mlan_status wlan_11d_prepare_dnld_domain_info_cmd(mlan_private * pmpriv); +mlan_status wlan_11d_prepare_dnld_domain_info_cmd(mlan_private *pmpriv); /** Parse 11D country information into domain info */ mlan_status wlan_11d_parse_domain_info(pmlan_adapter pmadapter, - IEEEtypes_CountryInfoFullSet_t * - country_info, t_u8 band, - parsed_region_chan_11d_t * - parsed_region_chan); + IEEEtypes_CountryInfoFullSet_t + *country_info, t_u8 band, + parsed_region_chan_11d_t + *parsed_region_chan); /** Configure 11D domain info command */ mlan_status wlan_11d_cfg_domain_info(IN pmlan_adapter pmadapter, - IN mlan_ioctl_req * pioctl_req); + IN mlan_ioctl_req *pioctl_req); #endif /* STA_SUPPORT */ #ifdef UAP_SUPPORT /** Handle 11D domain information from UAP */ -mlan_status wlan_11d_handle_uap_domain_info(mlan_private * pmpriv, +mlan_status wlan_11d_handle_uap_domain_info(mlan_private *pmpriv, t_u8 band, - t_u8 * domain_tlv, - t_void * pioctl_buf); + t_u8 *domain_tlv, + t_void *pioctl_buf); #endif /** This function converts region string to CFP table code */ mlan_status wlan_misc_country_2_cfp_table_code(IN pmlan_adapter pmadapter, - IN t_u8 * country_code, - OUT t_u8 * cfp_bg, - OUT t_u8 * cfp_a); + IN t_u8 *country_code, + OUT t_u8 *cfp_bg, + OUT t_u8 *cfp_a); /** check if station list is empty */ -t_u8 wlan_is_station_list_empty(mlan_private * priv); +t_u8 wlan_is_station_list_empty(mlan_private *priv); /** get station node */ -sta_node *wlan_get_station_entry(mlan_private * priv, t_u8 * mac); +sta_node *wlan_get_station_entry(mlan_private *priv, t_u8 *mac); /** delete station list */ t_void wlan_delete_station_list(pmlan_private priv); /** delete station entry */ -t_void wlan_delete_station_entry(mlan_private * priv, t_u8 * mac); +t_void wlan_delete_station_entry(mlan_private *priv, t_u8 *mac); /** add station entry */ -sta_node *wlan_add_station_entry(mlan_private * priv, t_u8 * mac); +sta_node *wlan_add_station_entry(mlan_private *priv, t_u8 *mac); /** process uap rx packet */ /** find specific ie */ -t_u8 *wlan_get_specific_ie(pmlan_private priv, t_u8 * ie_buf, t_u8 ie_len, +t_u8 *wlan_get_specific_ie(pmlan_private priv, t_u8 *ie_buf, t_u8 ie_len, IEEEtypes_ElementId_e id); -t_u8 wlan_is_wmm_ie_present(pmlan_adapter pmadapter, t_u8 * pbuf, - t_u16 buf_len); +t_u8 wlan_is_wmm_ie_present(pmlan_adapter pmadapter, t_u8 *pbuf, t_u16 buf_len); /** * @brief This function checks whether a station TDLS link is enabled or not * * @param priv A pointer to mlan_private * @param mac station mac address - * @return TDLS_NOT_SETUP/TDLS_SETUP_INPROGRESS/TDLS_SETUP_COMPLETE/TDLS_SETUP_FAILURE/TDLS_TEAR_DOWN + * @return TDLS_NOT_SETUP/TDLS_SETUP_INPROGRESS/TDLS_SETUP_COMPLETE/TDLS_SETUP_FAILURE/TDLS_TEAR_DOWN */ static INLINE tdlsStatus_e -wlan_get_tdls_link_status(mlan_private * priv, t_u8 * mac) +wlan_get_tdls_link_status(mlan_private *priv, t_u8 *mac) { sta_node *sta_ptr = MNULL; sta_ptr = wlan_get_station_entry(priv, mac); - if (sta_ptr) { + if (sta_ptr) return sta_ptr->status; - } return TDLS_NOT_SETUP; } @@ -2298,7 +2708,7 @@ wlan_get_tdls_link_status(mlan_private * priv, t_u8 * mac) * @brief This function checks if TDLS link is in channel switching * * @param status tdls link status - * @return MTRUE/MFALSE + * @return MTRUE/MFALSE */ static INLINE int wlan_is_tdls_link_chan_switching(tdlsStatus_e status) @@ -2310,7 +2720,7 @@ wlan_is_tdls_link_chan_switching(tdlsStatus_e status) * @brief This function checks if send command to firmware is allowed * * @param status tdls link status - * @return MTRUE/MFALSE + * @return MTRUE/MFALSE */ static INLINE int wlan_is_send_cmd_allowed(tdlsStatus_e status) @@ -2331,7 +2741,7 @@ wlan_is_send_cmd_allowed(tdlsStatus_e status) * @brief This function checks if TDLS link is setup * * @param status tdls link status - * @return MTRUE/MFALSE + * @return MTRUE/MFALSE */ static INLINE int wlan_is_tdls_link_setup(tdlsStatus_e status) @@ -2359,7 +2769,7 @@ wlan_is_tdls_link_setup(tdlsStatus_e status) * @return MTRUE or MFALSE */ static int INLINE -wlan_is_tx_pause(mlan_private * priv, t_u8 * ra) +wlan_is_tx_pause(mlan_private *priv, t_u8 *ra) { sta_node *sta_ptr = MNULL; sta_ptr = wlan_get_station_entry(priv, ra); @@ -2368,62 +2778,65 @@ wlan_is_tx_pause(mlan_private * priv, t_u8 * ra) return MFALSE; } -t_void wlan_update_ralist_tx_pause(pmlan_private priv, t_u8 * mac, +t_void wlan_update_ralist_tx_pause(pmlan_private priv, t_u8 *mac, t_u8 tx_pause); #ifdef UAP_SUPPORT -mlan_status wlan_process_uap_rx_packet(IN mlan_private * priv, +mlan_status wlan_process_uap_rx_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf); t_void wlan_drop_tx_pkts(pmlan_private priv); #endif /* UAP_SUPPORT */ #ifdef UAP_SUPPORT /* process the recevied packet and bridge the packet */ -mlan_status wlan_uap_recv_packet(IN mlan_private * priv, IN pmlan_buffer pmbuf); +mlan_status wlan_uap_recv_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf); #endif /* UAP_SUPPORT */ +mlan_status wlan_misc_ioctl_coalescing_status(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + mlan_status wlan_misc_ioctl_custom_ie_list(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req, IN t_bool send_ioctl); mlan_status wlan_cmd_get_hw_spec(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * pcmd); + IN HostCmd_DS_COMMAND *pcmd); mlan_status wlan_ret_get_hw_spec(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN t_void * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN t_void *pioctl_buf); mlan_status wlan_misc_ioctl_mac_control(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); mlan_status wlan_cmd_mac_control(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * pcmd, - IN t_u16 cmd_action, IN t_void * pdata_buf); + IN HostCmd_DS_COMMAND *pcmd, + IN t_u16 cmd_action, IN t_void *pdata_buf); mlan_status wlan_ret_mac_control(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); mlan_status wlan_cmd_802_11_radio_control(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, + IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action, - IN t_void * pdata_buf); + IN t_void *pdata_buf); mlan_status wlan_ret_802_11_radio_control(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); mlan_status wlan_cmd_802_11_rf_antenna(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, + IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action, - IN t_void * pdata_buf); + IN t_void *pdata_buf); mlan_status wlan_ret_802_11_rf_antenna(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); -mlan_status wlan_ret_reg_access(mlan_adapter * pmadapter, +mlan_status wlan_ret_reg_access(mlan_adapter *pmadapter, t_u16 type, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); mlan_status wlan_ret_mem_access(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); mlan_status wlan_reg_mem_ioctl_reg_rw(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); @@ -2431,25 +2844,28 @@ mlan_status wlan_reg_mem_ioctl_read_eeprom(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); mlan_status wlan_reg_mem_ioctl_mem_rw(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); -mlan_status wlan_cmd_reg_access(IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf); -mlan_status wlan_cmd_mem_access(IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf); - -int wlan_get_tdls_list(mlan_private * priv, tdls_peer_info * buf); -t_void wlan_hold_tdls_packets(pmlan_private priv, t_u8 * mac); -t_void wlan_restore_tdls_packets(pmlan_private priv, t_u8 * mac, +mlan_status wlan_cmd_reg_access(IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf); +mlan_status wlan_cmd_mem_access(IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf); + +int wlan_get_tdls_list(mlan_private *priv, tdls_peer_info *buf); +t_void wlan_hold_tdls_packets(pmlan_private priv, t_u8 *mac); +t_void wlan_restore_tdls_packets(pmlan_private priv, t_u8 *mac, tdlsStatus_e status); -t_void wlan_update_non_tdls_ralist(mlan_private * priv, t_u8 * mac, +t_void wlan_update_non_tdls_ralist(mlan_private *priv, t_u8 *mac, t_u8 tx_pause); mlan_status wlan_misc_ioctl_tdls_config(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); +void wlan_11n_send_delba_to_peer(mlan_private *priv, t_u8 *ra); mlan_status wlan_misc_ioctl_tdls_oper(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); mlan_status + wlan_misc_ioctl_tdls_get_ies(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); + mlan_status wlan_get_info_ver_ext(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); @@ -2461,23 +2877,60 @@ mlan_status wlan_set_drvdbg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); #endif +mlan_status wlan_misc_hotspot_cfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); #ifdef STA_SUPPORT mlan_status wlan_misc_ext_capa_cfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); -t_u32 wlan_is_ext_capa_support(IN mlan_private * pmpriv); +t_u32 wlan_is_ext_capa_support(IN mlan_private *pmpriv); #endif #ifdef STA_SUPPORT -void wlan_add_ext_capa_info_ie(IN mlan_private * pmpriv, OUT t_u8 ** pptlv_out); +void wlan_add_ext_capa_info_ie(IN mlan_private *pmpriv, OUT t_u8 **pptlv_out); #endif +t_u8 wlan_adjust_data_rate(mlan_private *priv, t_u8 rx_rate, t_u8 rate_info); + mlan_status wlan_misc_otp_user_data(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); mlan_status wlan_misc_ioctl_txcontrol(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); +#ifdef RX_PACKET_COALESCE +mlan_status + +wlan_misc_ioctl_rx_pkt_coalesce_config(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); +#endif + +mlan_status wlan_misc_ioctl_multi_chan_config(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +mlan_status wlan_cmd_multi_chan_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf); + +mlan_status wlan_ret_multi_chan_cfg(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf); + +mlan_status wlan_misc_ioctl_multi_chan_policy(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +mlan_status wlan_cmd_multi_chan_policy(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, + IN t_void *pdata_buf); + +mlan_status wlan_ret_multi_chan_policy(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf); + +void wlan_bt_coex_wlan_param_update_event(pmlan_private priv, + pmlan_buffer pevent); + mlan_status wlan_misc_ioctl_low_pwr_mode(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); @@ -2513,7 +2966,7 @@ queuing_ra_based(pmlan_private priv) * @return Number of Rates copied */ static INLINE t_u32 -wlan_copy_rates(t_u8 * dest, t_u32 pos, t_u8 * src, int len) +wlan_copy_rates(t_u8 *dest, t_u32 pos, t_u8 *src, int len) { int i; @@ -2538,8 +2991,8 @@ wlan_strlen(const char *str) { t_u32 i; - for (i = 0; str[i] != 0; i++) { - } + for (i = 0; str[i] != 0; i++) ; + return i; } @@ -2578,7 +3031,7 @@ typedef enum _delay_unit { } t_delay_unit; /** delay function */ -t_void wlan_delay_func(mlan_adapter * pmadapter, t_u32 delay, t_delay_unit u); +t_void wlan_delay_func(mlan_adapter *pmadapter, t_u32 delay, t_delay_unit u); /** delay function wrapper */ #define wlan_delay(p, n) wlan_delay_func(p, n, SEC) @@ -2589,10 +3042,10 @@ t_void wlan_delay_func(mlan_adapter * pmadapter, t_u32 delay, t_delay_unit u); /** Function to check if any command is pending in the queue */ #define IS_COMMAND_PENDING(pmadapter) \ - ((cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle, \ - &pmadapter->cmd_pending_q,\ - pmadapter->callbacks.moal_spin_lock,\ - pmadapter->callbacks.moal_spin_unlock)) + ((cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle, \ + &pmadapter->cmd_pending_q,\ + pmadapter->callbacks.moal_spin_lock,\ + pmadapter->callbacks.moal_spin_unlock)) /** Get BSS number from priv */ #define GET_BSS_NUM(priv) ((priv)->bss_num) @@ -2607,7 +3060,7 @@ t_void wlan_delay_func(mlan_adapter * pmadapter, t_u32 delay, t_delay_unit u); * @return Pointer to mlan_private */ static INLINE mlan_private * -wlan_get_priv_by_id(mlan_adapter * pmadapter, t_u32 bss_num, t_u32 bss_type) +wlan_get_priv_by_id(mlan_adapter *pmadapter, t_u32 bss_num, t_u32 bss_type) { int i; @@ -2631,7 +3084,7 @@ wlan_get_priv_by_id(mlan_adapter * pmadapter, t_u32 bss_num, t_u32 bss_type) * @return Pointer to mlan_private */ static INLINE mlan_private * -wlan_get_priv(mlan_adapter * pmadapter, mlan_bss_role bss_role) +wlan_get_priv(mlan_adapter *pmadapter, mlan_bss_role bss_role) { int i; @@ -2658,9 +3111,9 @@ wlan_get_priv(mlan_adapter * pmadapter, mlan_bss_role bss_role) * @return Count of privs where count_cond returned MTRUE. */ static int INLINE -wlan_count_priv_cond(mlan_adapter * pmadapter, - t_bool(*count_cond) (IN pmlan_private pmpriv), - t_bool(*check_cond) (IN pmlan_private pmpriv)) +wlan_count_priv_cond(mlan_adapter *pmadapter, + t_bool (*count_cond) (IN pmlan_private pmpriv), + t_bool (*check_cond) (IN pmlan_private pmpriv)) { pmlan_private pmpriv; int count = 0; @@ -2683,4 +3136,130 @@ wlan_count_priv_cond(mlan_adapter * pmadapter, return count; } +/** + * @brief This function runs a procedure on each priv. + * Which privs it is run on can be configured via a condition. + * + * @param pmadapter A pointer to mlan_adapter + * @param operation Function pointer to produedure to operate on priv + * @param check_cond Function pointer to condition to decide whether priv + * operated on or not. Use MNULL to run on all privs. + * + * @return Number of privs that operation was run on. + */ +static int INLINE +wlan_do_task_on_privs(mlan_adapter *pmadapter, + t_void (*operation) (IN pmlan_private pmpriv), + t_bool (*check_cond) (IN pmlan_private pmpriv)) +{ + pmlan_private pmpriv; + int count = 0; + int i; + + if (pmadapter == MNULL || operation == MNULL) + return 0; + + for (i = 0; i < pmadapter->priv_num; i++) { + pmpriv = pmadapter->priv[i]; + if (pmpriv) { + if ((check_cond == MNULL) || + (check_cond && check_cond(pmpriv))) { + operation(pmpriv); + count++; + } + } + } + + return count; +} + +/** + * @brief This function builds a list of privs that test for a condition + * This is useful if you need to do a number of operations on the same set + * of privs. For one-off tasks, the above two functions might be better. + * + * @param pmadapter A pointer to mlan_adapter + * @param check_cond Function pointer to condition to decide whether priv + * should be placed in the list. + * @param ppriv_list Output param. Externally supplied array of mlan_private* + * to hold priv's that test positive with check_cond. + * Array size should be at least pmadapter->priv_num. + * + * @return Number of privs in ppriv_list + * + * @sa wlan_count_priv_cond + */ +static int INLINE +wlan_get_privs_by_cond(mlan_adapter *pmadapter, + t_bool (*check_cond) (IN pmlan_private pmpriv), + mlan_private **ppriv_list) +{ + pmlan_private pmpriv; + int count = 0; + int i; + + if (pmadapter == MNULL || check_cond == MNULL || ppriv_list == MNULL) + return 0; + + for (i = 0; i < pmadapter->priv_num; i++) { + pmpriv = pmadapter->priv[i]; + if (pmpriv) { + if (check_cond(pmpriv)) + ppriv_list[count++] = pmpriv; + } + } + + return count; +} + +/** + * @brief This function builds a list of privs that test against two conditions + * This is useful if you need to do a number of operations on the same set + * of privs. Can choose whether both conditions (AND) or either condition (OR) + * is required. + * + * @param pmadapter A pointer to mlan_adapter + * @param check_cond Function pointer to condition to decide whether priv + * should be placed in the list. + * @param check_cond_2 Function pointer to second condition to check. + * @param and_conditions If MTRUE, both conditions must be met (AND), + * else either condition can be met (OR). + * @param ppriv_list Output param. Externally supplied array of mlan_private* + * to hold priv's that test positive with check_cond. + * Array size should be at least pmadapter->priv_num. + * + * @return Number of privs in ppriv_list + * + * @sa wlan_count_priv_cond, wlan_get_privs_by_cond + */ +static int INLINE +wlan_get_privs_by_two_cond(mlan_adapter *pmadapter, + t_bool (*check_cond) (IN pmlan_private pmpriv), + t_bool (*check_cond_2) (IN pmlan_private pmpriv), + t_bool and_conditions, mlan_private **ppriv_list) +{ + pmlan_private pmpriv; + int count = 0; + int i; + + if (pmadapter == MNULL || check_cond == MNULL || + check_cond_2 == MNULL || ppriv_list == MNULL) + return 0; + + for (i = 0; i < pmadapter->priv_num; i++) { + pmpriv = pmadapter->priv[i]; + if (pmpriv) { + if (and_conditions) { + if (check_cond(pmpriv) && check_cond_2(pmpriv)) + ppriv_list[count++] = pmpriv; + } else { + if (check_cond(pmpriv) || check_cond_2(pmpriv)) + ppriv_list[count++] = pmpriv; + } + } + } + + return count; +} + #endif /* !_MLAN_MAIN_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_meas.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_meas.c new file mode 100644 index 00000000..0c7a0200 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_meas.c @@ -0,0 +1,463 @@ +/** + * @file mlan_meas.c + * + * @brief Implementation of measurement interface code with the app/firmware + * + * Driver implementation for sending and retrieving measurement requests + * and responses. + * + * Current use is limited to 802.11h. + * + * Requires use of the following preprocessor define: + * - ENABLE_MEAS + * + * Copyright (C) 2008-2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/************************************************************* +Change Log: + 03/24/2009: initial version +************************************************************/ + +#include "mlan.h" +#include "mlan_join.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_ioctl.h" +#include "mlan_meas.h" + +/** Default measurement duration when not provided by the application */ +#define WLAN_MEAS_DEFAULT_MEAS_DURATION 1000U /* TUs */ + +#ifdef DEBUG_LEVEL2 +/** String descriptions of the different measurement enums. Debug display */ +static const char *meas_type_str[WLAN_MEAS_NUM_TYPES] = { + "basic", +}; + +/******************************************************** + Local Functions +********************************************************/ + +/** + * @brief Retrieve the measurement string representation of a meas_type enum + * Used for debug display only + * + * @param meas_type Measurement type enumeration input for string lookup + * + * @return Constant string representing measurement type + */ +static const char * +wlan_meas_get_meas_type_str(MeasType_t meas_type) +{ + if (meas_type <= WLAN_MEAS_11H_MAX_TYPE) + return meas_type_str[meas_type]; + + return "Invld"; +} +#endif + +/** + * @brief Debug print display of the input measurement request + * + * @param pmeas_req Pointer to the measurement request to display + * + * @return N/A + */ +static + void +wlan_meas_dump_meas_req(const HostCmd_DS_MEASUREMENT_REQUEST *pmeas_req) +{ + ENTER(); + + PRINTM(MINFO, "Meas: Req: ------------------------------\n"); + + PRINTM(MINFO, "Meas: Req: mac_addr: " MACSTR "\n", + MAC2STR(pmeas_req->mac_addr)); + + PRINTM(MINFO, "Meas: Req: dlgTkn: %d\n", pmeas_req->dialog_token); + PRINTM(MINFO, "Meas: Req: mode: dm[%c] rpt[%c] req[%c]\n", + pmeas_req->req_mode.duration_mandatory ? 'X' : ' ', + pmeas_req->req_mode.report ? 'X' : ' ', + pmeas_req->req_mode.request ? 'X' : ' '); + PRINTM(MINFO, "Meas: Req: : en[%c] par[%c]\n", + pmeas_req->req_mode.enable ? 'X' : ' ', + pmeas_req->req_mode.parallel ? 'X' : ' '); +#ifdef DEBUG_LEVEL2 + PRINTM(MINFO, "Meas: Req: measTyp: %s\n", + wlan_meas_get_meas_type_str(pmeas_req->meas_type)); +#endif + + switch (pmeas_req->meas_type) { + case WLAN_MEAS_BASIC: + /* Lazy cheat, fields of bas, cca, rpi union match on the + request */ + PRINTM(MINFO, "Meas: Req: chan: %u\n", + pmeas_req->req.basic.channel); + PRINTM(MINFO, "Meas: Req: strt: %llu\n", + wlan_le64_to_cpu(pmeas_req->req.basic.start_time)); + PRINTM(MINFO, "Meas: Req: dur: %u\n", + wlan_le16_to_cpu(pmeas_req->req.basic.duration)); + break; + default: + PRINTM(MINFO, "Meas: Req: \n"); + break; + } + + PRINTM(MINFO, "Meas: Req: ------------------------------\n"); + LEAVE(); +} + +/** + * @brief Debug print display of the input measurement report + * + * @param pmeas_rpt Pointer to measurement report to display + * + * @return N/A + */ +static + void +wlan_meas_dump_meas_rpt(const HostCmd_DS_MEASUREMENT_REPORT *pmeas_rpt) +{ + ENTER(); + + PRINTM(MINFO, "Meas: Rpt: ------------------------------\n"); + PRINTM(MINFO, "Meas: Rpt: mac_addr: " MACSTR "\n", + MAC2STR(pmeas_rpt->mac_addr)); + + PRINTM(MINFO, "Meas: Rpt: dlgTkn: %d\n", pmeas_rpt->dialog_token); + + PRINTM(MINFO, "Meas: Rpt: rptMode: (%x): Rfs[%c] ICp[%c] Lt[%c]\n", + *(t_u8 *)&pmeas_rpt->rpt_mode, + pmeas_rpt->rpt_mode.refused ? 'X' : ' ', + pmeas_rpt->rpt_mode.incapable ? 'X' : ' ', + pmeas_rpt->rpt_mode.late ? 'X' : ' '); +#ifdef DEBUG_LEVEL2 + PRINTM(MINFO, "Meas: Rpt: measTyp: %s\n", + wlan_meas_get_meas_type_str(pmeas_rpt->meas_type)); +#endif + + switch (pmeas_rpt->meas_type) { + case WLAN_MEAS_BASIC: + PRINTM(MINFO, "Meas: Rpt: chan: %u\n", + pmeas_rpt->rpt.basic.channel); + PRINTM(MINFO, "Meas: Rpt: strt: %llu\n", + wlan_le64_to_cpu(pmeas_rpt->rpt.basic.start_time)); + PRINTM(MINFO, "Meas: Rpt: dur: %u\n", + wlan_le16_to_cpu(pmeas_rpt->rpt.basic.duration)); + PRINTM(MINFO, "Meas: Rpt: bas: (%x): unmsd[%c], radar[%c]\n", + *(t_u8 *)&(pmeas_rpt->rpt.basic.map), + pmeas_rpt->rpt.basic.map.unmeasured ? 'X' : ' ', + pmeas_rpt->rpt.basic.map.radar ? 'X' : ' '); + PRINTM(MINFO, "Meas: Rpt: bas: unidSig[%c] ofdm[%c] bss[%c]\n", + pmeas_rpt->rpt.basic.map.unidentified_sig ? 'X' : ' ', + pmeas_rpt->rpt.basic.map.ofdm_preamble ? 'X' : ' ', + pmeas_rpt->rpt.basic.map.bss ? 'X' : ' '); + break; + default: + PRINTM(MINFO, "Meas: Rpt: \n"); + break; + } + + PRINTM(MINFO, "Meas: Rpt: ------------------------------\n"); + LEAVE(); +} + +/** + * @brief Retrieve a measurement report from the firmware + * + * Callback from command processing when a measurement report is received + * from the firmware. Perform the following when a report is received: + * + * -# Debug displays the report if compiled with the appropriate flags + * -# If we are pending on a specific measurement report token, and it + * matches the received report's token, store the report and wake up + * any pending threads + * + * @param pmpriv Private driver information structure + * @param resp HostCmd_DS_COMMAND struct returned from the firmware command + * passing a HostCmd_DS_MEASUREMENT_REPORT structure. + * + * @return MLAN_STATUS_SUCCESS + */ +static int +wlan_meas_cmdresp_get_report(mlan_private *pmpriv, + const HostCmd_DS_COMMAND *resp) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + const HostCmd_DS_MEASUREMENT_REPORT *pmeas_rpt = &resp->params.meas_rpt; + + ENTER(); + + PRINTM(MINFO, "Meas: Rpt: %#x-%u, Seq=%u, Ret=%u\n", + resp->command, resp->size, resp->seq_num, resp->result); + + /* Debug displays the measurement report */ + wlan_meas_dump_meas_rpt(pmeas_rpt); + + /* + * Check if we are pending on a measurement report and it matches + * the dialog token of the received report: + */ + if (pmadapter->state_meas.meas_rpt_pend_on + && pmadapter->state_meas.meas_rpt_pend_on == + pmeas_rpt->dialog_token) { + PRINTM(MINFO, "Meas: Rpt: RCV'd Pend on meas #%d\n", + pmadapter->state_meas.meas_rpt_pend_on); + + /* Clear the pending report indicator */ + pmadapter->state_meas.meas_rpt_pend_on = 0; + + /* Copy the received report into the measurement state for + retrieval */ + memcpy(pmadapter, &pmadapter->state_meas.meas_rpt_returned, + pmeas_rpt, + sizeof(pmadapter->state_meas.meas_rpt_returned)); + + /* + * Wake up any threads pending on the wait queue + */ + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_MEAS_REPORT, MNULL); + } + + LEAVE(); + + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Prepare CMD_MEASURMENT_REPORT firmware command + * + * @param pmpriv Private driver information structure + * @param pcmd_ptr Output parameter: Pointer to the command being prepared + * for the firmware + * @param pinfo_buf HostCmd_DS_MEASUREMENT_REQUEST passed as void data block + * + * @return MLAN_STATUS_SUCCESS + */ +static int +wlan_meas_cmd_request(mlan_private *pmpriv, + HostCmd_DS_COMMAND *pcmd_ptr, const void *pinfo_buf) +{ + const HostCmd_DS_MEASUREMENT_REQUEST *pmeas_req = + (HostCmd_DS_MEASUREMENT_REQUEST *)pinfo_buf; + + ENTER(); + + pcmd_ptr->command = HostCmd_CMD_MEASUREMENT_REQUEST; + pcmd_ptr->size = sizeof(HostCmd_DS_MEASUREMENT_REQUEST) + S_DS_GEN; + + memcpy(pmpriv->adapter, &pcmd_ptr->params.meas_req, pmeas_req, + sizeof(pcmd_ptr->params.meas_req)); + + PRINTM(MINFO, "Meas: Req: %#x-%u, Seq=%u, Ret=%u\n", + pcmd_ptr->command, pcmd_ptr->size, pcmd_ptr->seq_num, + pcmd_ptr->result); + + wlan_meas_dump_meas_req(pmeas_req); + + LEAVE(); + + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Retrieve a measurement report from the firmware + * + * The firmware will send a EVENT_MEAS_REPORT_RDY event when it + * completes or receives a measurement report. The event response + * handler will then start a HostCmd_CMD_MEASUREMENT_REPORT firmware command + * which gets completed for transmission to the firmware in this routine. + * + * @param pmpriv Private driver information structure + * @param pcmd_ptr Output parameter: Pointer to the command being prepared + * for the firmware + * + * @return MLAN_STATUS_SUCCESS + */ +static int +wlan_meas_cmd_get_report(mlan_private *pmpriv, HostCmd_DS_COMMAND *pcmd_ptr) +{ + ENTER(); + + pcmd_ptr->command = HostCmd_CMD_MEASUREMENT_REPORT; + pcmd_ptr->size = sizeof(HostCmd_DS_MEASUREMENT_REPORT) + S_DS_GEN; + + memset(pmpriv->adapter, &pcmd_ptr->params.meas_rpt, 0x00, + sizeof(pcmd_ptr->params.meas_rpt)); + + /* + * Set the meas_rpt.mac_addr to our mac address to get a meas report, + * setting the mac to another STA address instructs the firmware + * to transmit this measurement report frame instead + */ + memcpy(pmpriv->adapter, pcmd_ptr->params.meas_rpt.mac_addr, + pmpriv->curr_addr, sizeof(pcmd_ptr->params.meas_rpt.mac_addr)); + + LEAVE(); + + return MLAN_STATUS_SUCCESS; +} + +/******************************************************** + Global functions +********************************************************/ + +/** + * @brief Send the input measurement request to the firmware. + * + * If the dialog token in the measurement request is set to 0, the function + * will use an local static auto-incremented token in the measurement + * request. This ensures the dialog token is always set. + * + * If wait_for_resp_timeout is set, the function will block its return on + * a timeout or returned measurement report that matches the requests + * dialog token. + * + * @param pmpriv Private driver information structure + * @param pmeas_req Pointer to the measurement request to send + * @param wait_for_resp_timeout Timeout value of the measurement request + * in ms. + * @param pioctl_req Pointer to IOCTL request buffer + * @param pmeas_rpt Output parameter: Pointer for the resulting + * measurement report + * + * @return + * - 0 for success + * - -ETIMEDOUT if the measurement report does not return before + * the timeout expires + * - Error return from wlan_prepare_cmd routine otherwise + */ +int +wlan_meas_util_send_req(mlan_private *pmpriv, + HostCmd_DS_MEASUREMENT_REQUEST *pmeas_req, + t_u32 wait_for_resp_timeout, pmlan_ioctl_req pioctl_req, + HostCmd_DS_MEASUREMENT_REPORT *pmeas_rpt) +{ + static t_u8 auto_dialog_tok; + wlan_meas_state_t *pmeas_state = &pmpriv->adapter->state_meas; + int ret; + + ENTER(); + + /* If dialogTok was set to 0 or not provided, autoset */ + pmeas_req->dialog_token = (pmeas_req->dialog_token ? + pmeas_req->dialog_token : ++auto_dialog_tok); + + /* Check for rollover of the dialog token. Avoid using 0 as a token */ + pmeas_req->dialog_token = (pmeas_req->dialog_token ? + pmeas_req->dialog_token : 1); + + /* + * If the request is to pend waiting for the result, set the dialog token + * of this measurement request in the state structure. The measurement + * report handling routines can then check the incoming measurement + * reports for a match with this dialog token. + */ + if (wait_for_resp_timeout) { + pmeas_state->meas_rpt_pend_on = pmeas_req->dialog_token; + PRINTM(MINFO, "Meas: Req: START Pend on meas #%d\n", + pmeas_req->dialog_token); + } + + /* Send the measurement request to the firmware */ + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_MEASUREMENT_REQUEST, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_req, (void *)pmeas_req); + + LEAVE(); + return ret; +} + +/** + * @brief Prepare the HostCmd_DS_Command structure for a measurement command. + * + * Use the Command field to determine if the command being set up is for + * 11h and call one of the local command handlers accordingly for: + * + * - HostCmd_CMD_MEASUREMENT_REQUEST + * - HostCmd_CMD_MEASUREMENT_REPORT + * + * @param pmpriv Private driver information structure + * @param pcmd_ptr Output parameter: Pointer to the command being prepared + * for the firmware + * @param pinfo_buf Void buffer passthrough with data necessary for a + * specific command type + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + * + */ +int +wlan_meas_cmd_process(mlan_private *pmpriv, + HostCmd_DS_COMMAND *pcmd_ptr, const void *pinfo_buf) +{ + int ret = MLAN_STATUS_SUCCESS; + + ENTER(); + switch (pcmd_ptr->command) { + case HostCmd_CMD_MEASUREMENT_REQUEST: + ret = wlan_meas_cmd_request(pmpriv, pcmd_ptr, pinfo_buf); + break; + case HostCmd_CMD_MEASUREMENT_REPORT: + ret = wlan_meas_cmd_get_report(pmpriv, pcmd_ptr); + break; + default: + ret = MLAN_STATUS_FAILURE; + } + + pcmd_ptr->command = wlan_cpu_to_le16(pcmd_ptr->command); + pcmd_ptr->size = wlan_cpu_to_le16(pcmd_ptr->size); + LEAVE(); + return ret; +} + +/** + * @brief Handle the command response from the firmware for a measurement + * command + * + * Use the Command field to determine if the command response being + * is for meas. Call the local command response handler accordingly for: + * + * - HostCmd_CMD_802_MEASUREMENT_REQUEST + * - HostCmd_CMD_802_MEASUREMENT_REPORT + * + * @param pmpriv Private driver information structure + * @param resp HostCmd_DS_COMMAND struct returned from the firmware command + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +int +wlan_meas_cmdresp_process(mlan_private *pmpriv, const HostCmd_DS_COMMAND *resp) +{ + int ret = MLAN_STATUS_SUCCESS; + + ENTER(); + switch (resp->command) { + case HostCmd_CMD_MEASUREMENT_REQUEST: + PRINTM(MINFO, "Meas: Req Resp: Sz=%u, Seq=%u, Ret=%u\n", + resp->size, resp->seq_num, resp->result); + break; + case HostCmd_CMD_MEASUREMENT_REPORT: + ret = wlan_meas_cmdresp_get_report(pmpriv, resp); + break; + default: + ret = MLAN_STATUS_FAILURE; + } + + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_meas.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_meas.h new file mode 100644 index 00000000..0f3e734c --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_meas.h @@ -0,0 +1,55 @@ +/** + * @file mlan_meas.h + * + * @brief Interface for the measurement module implemented in mlan_meas.c + * + * Driver interface functions and type declarations for the measurement module + * implemented in mlan_meas.c + * + * @sa mlan_meas.c + * + * Copyright (C) 2008-2014, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/************************************************************* +Change Log: + 03/25/2009: initial version +************************************************************/ + +#ifndef _MLAN_MEAS_H_ +#define _MLAN_MEAS_H_ + +#include "mlan_fw.h" + +/* Send a given measurement request to the firmware, report back the result */ +extern int + +wlan_meas_util_send_req(mlan_private *pmpriv, + HostCmd_DS_MEASUREMENT_REQUEST *pmeas_req, + t_u32 wait_for_resp_timeout, pmlan_ioctl_req pioctl_req, + HostCmd_DS_MEASUREMENT_REPORT *pmeas_rpt); + +/* Setup a measurement command before it is sent to the firmware */ +extern int wlan_meas_cmd_process(mlan_private *pmpriv, + HostCmd_DS_COMMAND *pcmd_ptr, + const t_void *pinfo_buf); + +/* Handle a given measurement command response from the firmware */ +extern int wlan_meas_cmdresp_process(mlan_private *pmpriv, + const HostCmd_DS_COMMAND *resp); + +#endif /* _MLAN_MEAS_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_misc.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_misc.c old mode 100755 new mode 100644 index e5da5209..289c8999 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_misc.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_misc.c @@ -36,7 +36,9 @@ Change Log: #ifdef UAP_SUPPORT #include "mlan_uap.h" #endif - +#ifdef DRV_EMBEDDED_AUTHENTICATOR +#include "authenticator_api.h" +#endif /******************************************************** Local Variables ********************************************************/ @@ -110,7 +112,7 @@ static mlan_status wlan_custom_ioctl_get_autoidx(IN pmlan_private pmpriv, IN pmlan_ioctl_req pioctl_req, IN t_u16 mask, - IN custom_ie * ie_data, OUT t_u16 * idx) + IN custom_ie *ie_data, OUT t_u16 *idx) { t_u16 index = 0, insert = MFALSE; mlan_status ret = MLAN_STATUS_SUCCESS; @@ -157,8 +159,9 @@ wlan_custom_ioctl_get_autoidx(IN pmlan_private pmpriv, index++) { if (pmpriv->mgmt_ie[index].ie_length == 0) { /* - * Check if this index is in use by other interface - * If yes, move ahead to next index + * Check if this index is in use + * by other interface If yes, + * move ahead to next index */ if (MLAN_STATUS_SUCCESS == wlan_is_custom_ie_index_unused @@ -202,7 +205,7 @@ wlan_custom_ioctl_get_autoidx(IN pmlan_private pmpriv, static mlan_status wlan_custom_ioctl_auto_delete(IN pmlan_private pmpriv, IN pmlan_ioctl_req pioctl_req, - IN custom_ie * ie_data, IN t_u16 idx) + IN custom_ie *ie_data, IN t_u16 idx) { mlan_status ret = MLAN_STATUS_SUCCESS; pmlan_adapter pmadapter = pmpriv->adapter; @@ -250,7 +253,7 @@ wlan_custom_ioctl_auto_delete(IN pmlan_private pmpriv, /* set a bit to indicate caller about update */ ie_data->ie_index |= - (((t_u16) 1) << index); + (((t_u16)1) << index); insert = MTRUE; tmp_ie = pmpriv->mgmt_ie[index].ie_buffer; tmp_len = pmpriv->mgmt_ie[index].ie_length; @@ -296,15 +299,15 @@ wlan_misc_ioctl_host_cmd(IN pmlan_adapter pmadapter, ENTER(); - misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; /* Send request to firmware */ ret = wlan_prepare_cmd(pmpriv, 0, 0, 0, - (t_void *) pioctl_req, - (t_void *) & misc->param.hostcmd); + (t_void *)pioctl_req, + (t_void *)&misc->param.hostcmd); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -331,7 +334,7 @@ wlan_misc_ioctl_init_shutdown(IN pmlan_adapter pmadapter, ENTER(); - misc_cfg = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + misc_cfg = (mlan_ds_misc_cfg *)pioctl_req->pbuf; if (misc_cfg->param.func_init_shutdown == MLAN_FUNC_INIT) cmd = HostCmd_CMD_FUNC_INIT; else if (misc_cfg->param.func_init_shutdown == MLAN_FUNC_SHUTDOWN) @@ -347,7 +350,7 @@ wlan_misc_ioctl_init_shutdown(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, cmd, HostCmd_ACT_GEN_SET, - 0, (t_void *) pioctl_req, MNULL); + 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -378,91 +381,10 @@ wlan_get_info_debug_info(IN pmlan_adapter pmadapter, ENTER(); - info = (mlan_ds_get_info *) pioctl_req->pbuf; - debug_info = (mlan_debug_info *) info->param.debug_info; + info = (mlan_ds_get_info *)pioctl_req->pbuf; + debug_info = (mlan_debug_info *)info->param.debug_info; - if (pioctl_req->action == MLAN_ACT_SET) { - pmadapter->max_tx_buf_size = - (t_u16) debug_info->max_tx_buf_size; - pmadapter->tx_buf_size = (t_u16) debug_info->tx_buf_size; - pmadapter->curr_tx_buf_size = - (t_u16) debug_info->curr_tx_buf_size; - pmadapter->ps_mode = debug_info->ps_mode; - pmadapter->ps_state = debug_info->ps_state; -#ifdef STA_SUPPORT - pmadapter->is_deep_sleep = debug_info->is_deep_sleep; -#endif /* STA_SUPPORT */ - pmadapter->pm_wakeup_card_req = debug_info->pm_wakeup_card_req; - pmadapter->pm_wakeup_fw_try = debug_info->pm_wakeup_fw_try; - pmadapter->pm_wakeup_in_secs = debug_info->pm_wakeup_in_secs; - pmadapter->is_hs_configured = debug_info->is_hs_configured; - pmadapter->hs_activated = debug_info->hs_activated; - pmadapter->pps_uapsd_mode = debug_info->pps_uapsd_mode; - pmadapter->sleep_period.period = debug_info->sleep_pd; - pmpriv->wmm_qosinfo = debug_info->qos_cfg; - pmadapter->tx_lock_flag = debug_info->tx_lock_flag; - pmpriv->port_open = debug_info->port_open; - pmadapter->bypass_pkt_count = debug_info->bypass_pkt_count; - pmadapter->scan_processing = debug_info->scan_processing; - pmadapter->dbg.num_cmd_host_to_card_failure = - debug_info->num_cmd_host_to_card_failure; - pmadapter->dbg.num_cmd_sleep_cfm_host_to_card_failure = - debug_info->num_cmd_sleep_cfm_host_to_card_failure; - pmadapter->dbg.num_tx_host_to_card_failure = - debug_info->num_tx_host_to_card_failure; - pmadapter->dbg.num_cmdevt_card_to_host_failure = - debug_info->num_cmdevt_card_to_host_failure; - pmadapter->dbg.num_rx_card_to_host_failure = - debug_info->num_rx_card_to_host_failure; - pmadapter->dbg.num_int_read_failure = - debug_info->num_int_read_failure; - pmadapter->dbg.last_int_status = debug_info->last_int_status; - pmadapter->dbg.num_event_deauth = debug_info->num_event_deauth; - pmadapter->dbg.num_event_disassoc = - debug_info->num_event_disassoc; - pmadapter->dbg.num_event_link_lost = - debug_info->num_event_link_lost; - pmadapter->dbg.num_cmd_deauth = debug_info->num_cmd_deauth; - pmadapter->dbg.num_cmd_assoc_success = - debug_info->num_cmd_assoc_success; - pmadapter->dbg.num_cmd_assoc_failure = - debug_info->num_cmd_assoc_failure; - pmadapter->dbg.num_tx_timeout = debug_info->num_tx_timeout; - pmadapter->dbg.num_cmd_timeout = debug_info->num_cmd_timeout; - pmadapter->dbg.timeout_cmd_id = debug_info->timeout_cmd_id; - pmadapter->dbg.timeout_cmd_act = debug_info->timeout_cmd_act; - memcpy(pmadapter, pmadapter->dbg.last_cmd_id, - debug_info->last_cmd_id, - sizeof(pmadapter->dbg.last_cmd_id)); - memcpy(pmadapter, pmadapter->dbg.last_cmd_act, - debug_info->last_cmd_act, - sizeof(pmadapter->dbg.last_cmd_act)); - pmadapter->dbg.last_cmd_index = debug_info->last_cmd_index; - memcpy(pmadapter, pmadapter->dbg.last_cmd_resp_id, - debug_info->last_cmd_resp_id, - sizeof(pmadapter->dbg.last_cmd_resp_id)); - pmadapter->dbg.last_cmd_resp_index = - debug_info->last_cmd_resp_index; - memcpy(pmadapter, pmadapter->dbg.last_event, - debug_info->last_event, - sizeof(pmadapter->dbg.last_event)); - pmadapter->dbg.last_event_index = debug_info->last_event_index; - pmadapter->dbg.num_no_cmd_node = debug_info->num_no_cmd_node; - pmadapter->dnld_cmd_in_secs = debug_info->dnld_cmd_in_secs; - pmadapter->data_sent = debug_info->data_sent; - pmadapter->cmd_sent = debug_info->cmd_sent; - pmadapter->mp_rd_bitmap = debug_info->mp_rd_bitmap; - pmadapter->mp_wr_bitmap = debug_info->mp_wr_bitmap; - pmadapter->curr_rd_port = debug_info->curr_rd_port; - pmadapter->curr_wr_port = debug_info->curr_wr_port; - pmadapter->cmd_resp_received = debug_info->cmd_resp_received; -#ifdef UAP_SUPPORT - pmadapter->pending_bridge_pkts = debug_info->num_bridge_pkts; - pmpriv->num_drop_pkts = debug_info->num_drop_pkts; -#endif - pmadapter->mlan_processing = debug_info->mlan_processing; - pmadapter->mlan_rx_processing = debug_info->mlan_rx_processing; - } else { /* MLAN_ACT_GET */ + if (pioctl_req->action == MLAN_ACT_GET) { ptid = ac_to_tid[WMM_AC_BK]; debug_info->wmm_ac_bk = pmpriv->wmm.packets_out[ptid[0]] + @@ -479,15 +401,16 @@ wlan_get_info_debug_info(IN pmlan_adapter pmadapter, debug_info->wmm_ac_vo = pmpriv->wmm.packets_out[ptid[0]] + pmpriv->wmm.packets_out[ptid[1]]; - debug_info->max_tx_buf_size = - (t_u32) pmadapter->max_tx_buf_size; - debug_info->tx_buf_size = (t_u32) pmadapter->tx_buf_size; + debug_info->max_tx_buf_size = (t_u32)pmadapter->max_tx_buf_size; + debug_info->tx_buf_size = (t_u32)pmadapter->tx_buf_size; debug_info->curr_tx_buf_size = - (t_u32) pmadapter->curr_tx_buf_size; + (t_u32)pmadapter->curr_tx_buf_size; debug_info->rx_tbl_num = wlan_get_rxreorder_tbl(pmpriv, debug_info->rx_tbl); debug_info->tx_tbl_num = wlan_get_txbastream_tbl(pmpriv, debug_info->tx_tbl); + debug_info->ralist_num = + wlan_get_ralist_info(pmpriv, debug_info->ralist); debug_info->tdls_peer_num = wlan_get_tdls_list(pmpriv, debug_info->tdls_peer_list); debug_info->ps_mode = pmadapter->ps_mode; @@ -531,7 +454,9 @@ wlan_get_info_debug_info(IN pmlan_adapter pmadapter, debug_info->num_cmd_assoc_failure = pmadapter->dbg.num_cmd_assoc_failure; debug_info->num_tx_timeout = pmadapter->dbg.num_tx_timeout; - debug_info->num_cmd_timeout = pmadapter->dbg.num_cmd_timeout; + debug_info->num_cmd_timeout = pmadapter->num_cmd_timeout; + debug_info->dbg_num_cmd_timeout = + pmadapter->dbg.num_cmd_timeout; debug_info->timeout_cmd_id = pmadapter->dbg.timeout_cmd_id; debug_info->timeout_cmd_act = pmadapter->dbg.timeout_cmd_act; memcpy(pmadapter, debug_info->last_cmd_id, @@ -559,6 +484,10 @@ wlan_get_info_debug_info(IN pmlan_adapter pmadapter, debug_info->mp_wr_bitmap = pmadapter->mp_wr_bitmap; debug_info->curr_rd_port = pmadapter->curr_rd_port; debug_info->curr_wr_port = pmadapter->curr_wr_port; + debug_info->mp_invalid_update = pmadapter->mp_invalid_update; + debug_info->num_of_irq = pmadapter->num_of_irq; + memcpy(pmadapter, debug_info->mp_update, pmadapter->mp_update, + sizeof(pmadapter->mp_update)); #ifdef SDIO_MULTI_PORT_TX_AGGR memcpy(pmadapter, debug_info->mpa_tx_count, pmadapter->mpa_tx_count, @@ -583,11 +512,17 @@ wlan_get_info_debug_info(IN pmlan_adapter pmadapter, memcpy(pmadapter, debug_info->last_curr_wr_port, pmadapter->last_curr_wr_port, sizeof(pmadapter->last_curr_wr_port)); -#endif + debug_info->mpa_buf = pmadapter->mpa_buf; + debug_info->mpa_buf_size = pmadapter->mpa_buf_size; +#endif /* SDIO_MULTI_PORT_TX_AGGR */ #ifdef SDIO_MULTI_PORT_RX_AGGR memcpy(pmadapter, debug_info->mpa_rx_count, pmadapter->mpa_rx_count, sizeof(pmadapter->mpa_rx_count)); +#endif +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + debug_info->mp_aggr_pkt_limit = + pmadapter->psdio_device->mp_aggr_pkt_limit; #endif debug_info->data_sent = pmadapter->data_sent; debug_info->cmd_sent = pmadapter->cmd_sent; @@ -635,13 +570,13 @@ wlan_misc_ioctl_mac_control(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) { mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; - mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; mlan_status ret = MLAN_STATUS_SUCCESS; t_u16 cmd_action = 0; ENTER(); - misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) { misc->param.mac_ctrl = pmpriv->curr_pkt_filter; @@ -653,7 +588,7 @@ wlan_misc_ioctl_mac_control(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_MAC_CONTROL, cmd_action, 0, - (t_void *) pioctl_req, + (t_void *)pioctl_req, &misc->param.mac_ctrl); if (ret == MLAN_STATUS_SUCCESS) @@ -730,7 +665,7 @@ wlan_pm_ioctl_hscfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) ENTER(); - pm = (mlan_ds_pm_cfg *) pioctl_req->pbuf; + pm = (mlan_ds_pm_cfg *)pioctl_req->pbuf; switch (pioctl_req->action) { case MLAN_ACT_SET: @@ -766,9 +701,9 @@ wlan_pm_ioctl_hscfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) status = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_HS_CFG_ENH, HostCmd_ACT_GEN_SET, - 0, (t_void *) pioctl_req, - (t_void *) (&pmadapter-> - hs_cfg)); + 0, (t_void *)pioctl_req, + (t_void *)(&pmadapter-> + hs_cfg)); if (status == MLAN_STATUS_SUCCESS) status = MLAN_STATUS_PENDING; if (pm->param.hs_cfg.conditions == @@ -779,8 +714,8 @@ wlan_pm_ioctl_hscfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) } else { pmadapter->hs_cfg.conditions = pm->param.hs_cfg.conditions; - pmadapter->hs_cfg.gpio = (t_u8) pm->param.hs_cfg.gpio; - pmadapter->hs_cfg.gap = (t_u8) pm->param.hs_cfg.gap; + pmadapter->hs_cfg.gpio = (t_u8)pm->param.hs_cfg.gpio; + pmadapter->hs_cfg.gap = (t_u8)pm->param.hs_cfg.gap; } break; case MLAN_ACT_GET: @@ -808,8 +743,8 @@ wlan_pm_ioctl_hscfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) * @return mlan_buffer pointer or MNULL */ pmlan_buffer -wlan_alloc_mlan_buffer(mlan_adapter * pmadapter, t_u32 data_len, - t_u32 head_room, t_u32 malloc_flag) +wlan_alloc_mlan_buffer(mlan_adapter *pmadapter, t_u32 data_len, t_u32 head_room, + t_u32 malloc_flag) { mlan_status ret = MLAN_STATUS_SUCCESS; pmlan_buffer pmbuf = MNULL; @@ -820,7 +755,9 @@ wlan_alloc_mlan_buffer(mlan_adapter * pmadapter, t_u32 data_len, ENTER(); /* make sure that the data length is at least SDIO block size */ - data_len = ALIGN_SZ(data_len, MLAN_SDIO_BLOCK_SIZE); + data_len = + (data_len + MLAN_SDIO_BLOCK_SIZE - + 1) / MLAN_SDIO_BLOCK_SIZE * MLAN_SDIO_BLOCK_SIZE; /* head_room is not implemented for malloc mlan buffer */ @@ -829,7 +766,7 @@ wlan_alloc_mlan_buffer(mlan_adapter * pmadapter, t_u32 data_len, buf_size = sizeof(mlan_buffer) + data_len + DMA_ALIGNMENT; ret = pcb->moal_malloc(pmadapter->pmoal_handle, buf_size, MLAN_MEM_DEF | MLAN_MEM_DMA, - (t_u8 **) & pmbuf); + (t_u8 **)&pmbuf); if ((ret != MLAN_STATUS_SUCCESS) || !pmbuf) { pmbuf = MNULL; goto exit; @@ -839,8 +776,8 @@ wlan_alloc_mlan_buffer(mlan_adapter * pmadapter, t_u32 data_len, pmbuf->pdesc = MNULL; /* Align address */ pmbuf->pbuf = - (t_u8 *) ALIGN_ADDR((t_u8 *) pmbuf + - sizeof(mlan_buffer), DMA_ALIGNMENT); + (t_u8 *)ALIGN_ADDR((t_u8 *)pmbuf + sizeof(mlan_buffer), + DMA_ALIGNMENT); pmbuf->data_offset = 0; pmbuf->data_len = data_len; pmbuf->flags |= MLAN_BUF_FLAG_MALLOC_BUF; @@ -857,10 +794,10 @@ wlan_alloc_mlan_buffer(mlan_adapter * pmadapter, t_u32 data_len, } pmbuf->data_offset = head_room; tmp_buf = - (t_u8 *) ALIGN_ADDR(pmbuf->pbuf + pmbuf->data_offset, - DMA_ALIGNMENT); + (t_u8 *)ALIGN_ADDR(pmbuf->pbuf + pmbuf->data_offset, + DMA_ALIGNMENT); pmbuf->data_offset += - (t_u32) (tmp_buf - (pmbuf->pbuf + pmbuf->data_offset)); + (t_u32)(tmp_buf - (pmbuf->pbuf + pmbuf->data_offset)); pmbuf->data_len = data_len; pmbuf->flags = 0; break; @@ -880,7 +817,7 @@ wlan_alloc_mlan_buffer(mlan_adapter * pmadapter, t_u32 data_len, * @return N/A */ t_void -wlan_free_mlan_buffer(mlan_adapter * pmadapter, pmlan_buffer pmbuf) +wlan_free_mlan_buffer(mlan_adapter *pmadapter, pmlan_buffer pmbuf) { pmlan_callbacks pcb = &pmadapter->callbacks; ENTER(); @@ -889,8 +826,7 @@ wlan_free_mlan_buffer(mlan_adapter * pmadapter, pmlan_buffer pmbuf) if (pmbuf->flags & MLAN_BUF_FLAG_BRIDGE_BUF) pmadapter->pending_bridge_pkts--; if (pmbuf->flags & MLAN_BUF_FLAG_MALLOC_BUF) - pcb->moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) pmbuf); + pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)pmbuf); else pcb->moal_free_mlan_buffer(pmadapter->pmoal_handle, pmbuf); @@ -910,7 +846,7 @@ wlan_free_mlan_buffer(mlan_adapter * pmadapter, pmlan_buffer pmbuf) * @return N/A */ t_void -wlan_delay_func(mlan_adapter * pmadapter, t_u32 delay, t_delay_unit u) +wlan_delay_func(mlan_adapter *pmadapter, t_u32 delay, t_delay_unit u) { t_u32 now_tv_sec, now_tv_usec; t_u32 upto_tv_sec, upto_tv_usec; @@ -961,6 +897,46 @@ wlan_delay_func(mlan_adapter * pmadapter, t_u32 delay, t_delay_unit u) return; } +/** + * @brief Send coalescing status command to firmware + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_misc_ioctl_coalescing_status(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc = MNULL; + t_u16 cmd_action = 0; + + ENTER(); + + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_IBSS_COALESCING_STATUS, + cmd_action, + 0, + (t_void *)pioctl_req, + &misc->param.coalescing_status); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + /** * @brief BSS remove * @@ -1004,7 +980,7 @@ wlan_bss_ioctl_bss_role(IN pmlan_adapter pmadapter, ENTER(); - bss = (mlan_ds_bss *) pioctl_req->pbuf; + bss = (mlan_ds_bss *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) { bss->param.bss_role = GET_BSS_ROLE(pmpriv); } else { @@ -1041,7 +1017,7 @@ wlan_bss_ioctl_bss_role(IN pmlan_adapter pmadapter, if (global_band != pmadapter->config_bands) { if (wlan_set_regiontable - (pmpriv, (t_u8) pmadapter->region_code, + (pmpriv, (t_u8)pmadapter->region_code, global_band | pmadapter->adhoc_start_band)) { pioctl_req->status_code = MLAN_ERROR_IOCTL_FAIL; LEAVE(); @@ -1078,8 +1054,7 @@ wlan_bss_ioctl_bss_role(IN pmlan_adapter pmadapter, memset(pmadapter, &dummy, 0, sizeof(HostCmd_DS_VERSION_EXT)); ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_VERSION_EXT, HostCmd_ACT_GEN_GET, 0, - (t_void *) pioctl_req, - (t_void *) & dummy); + (t_void *)pioctl_req, (t_void *)&dummy); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; } @@ -1107,7 +1082,7 @@ wlan_misc_ioctl_custom_ie_list(IN pmlan_adapter pmadapter, { mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; mlan_status ret = MLAN_STATUS_SUCCESS; - mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; custom_ie *ie_data = MNULL; t_u16 cmd_action = 0, index, mask, i, len, app_data_len; t_s32 ioctl_len; @@ -1131,9 +1106,8 @@ wlan_misc_ioctl_custom_ie_list(IN pmlan_adapter pmadapter, misc->param.cust_ie.len = 0; while (ioctl_len > 0) { - ie_data = - (custom_ie *) (((t_u8 *) & misc->param.cust_ie) - + app_data_len); + ie_data = (custom_ie *)(((t_u8 *)&misc->param.cust_ie) + + app_data_len); ioctl_len -= (ie_data->ie_length + MLAN_CUSTOM_IE_HDR_SIZE); app_data_len += @@ -1142,14 +1116,10 @@ wlan_misc_ioctl_custom_ie_list(IN pmlan_adapter pmadapter, index = ie_data->ie_index; mask = ie_data->mgmt_subtype_mask; - if (MLAN_CUSTOM_IE_AUTO_IDX_MASK == index) { /* Need - to - be - Autohandled - */ - if (mask == MLAN_CUSTOM_IE_DELETE_MASK) { /* Automatic - Deletion - */ + /* Need to be Autohandled */ + if (MLAN_CUSTOM_IE_AUTO_IDX_MASK == index) { + /* Automatic Deletion */ + if (mask == MLAN_CUSTOM_IE_DELETE_MASK) { ret = wlan_custom_ioctl_auto_delete (pmpriv, pioctl_req, ie_data, index); @@ -1167,17 +1137,17 @@ wlan_misc_ioctl_custom_ie_list(IN pmlan_adapter pmadapter, i++) { /* Check if index is updated before sending to FW */ - if (index & ((t_u16) 1) << i) { + if (index & ((t_u16)1) << i) { memcpy(pmadapter, - (t_u8 *) ie_data - + len, &i, + (t_u8 *)ie_data + + len, &i, sizeof(ie_data-> ie_index)); len += sizeof(ie_data-> ie_index); memcpy(pmadapter, - (t_u8 *) ie_data - + len, + (t_u8 *)ie_data + + len, &pmpriv-> mgmt_ie[i]. mgmt_subtype_mask, @@ -1186,8 +1156,8 @@ wlan_misc_ioctl_custom_ie_list(IN pmlan_adapter pmadapter, len += sizeof(ie_data-> mgmt_subtype_mask); memcpy(pmadapter, - (t_u8 *) ie_data - + len, + (t_u8 *)ie_data + + len, &pmpriv-> mgmt_ie[i]. ie_length, @@ -1197,7 +1167,7 @@ wlan_misc_ioctl_custom_ie_list(IN pmlan_adapter pmadapter, ie_length); if (pmpriv->mgmt_ie[i]. ie_length) { - memcpy(pmadapter, (t_u8 *) ie_data + len, &pmpriv->mgmt_ie[i].ie_buffer, pmpriv->mgmt_ie[i].ie_length); + memcpy(pmadapter, (t_u8 *)ie_data + len, &pmpriv->mgmt_ie[i].ie_buffer, pmpriv->mgmt_ie[i].ie_length); len += pmpriv-> mgmt_ie [i]. @@ -1224,7 +1194,7 @@ wlan_misc_ioctl_custom_ie_list(IN pmlan_adapter pmadapter, ret = MLAN_STATUS_SUCCESS; goto done; } - tmp_ie = (t_u8 *) & pmpriv-> + tmp_ie = (t_u8 *)&pmpriv-> mgmt_ie[index].ie_buffer; memcpy(pmadapter, tmp_ie + @@ -1276,15 +1246,16 @@ wlan_misc_ioctl_custom_ie_list(IN pmlan_adapter pmadapter, memset(pmadapter, ie_data, 0, sizeof(custom_ie) * MAX_MGMT_IE_INDEX_TO_FW); - memcpy(pmadapter, (t_u8 *) ie_data, + memcpy(pmadapter, (t_u8 *)ie_data, &pmpriv->mgmt_ie[index], pmpriv->mgmt_ie[index]. ie_length + MLAN_CUSTOM_IE_HDR_SIZE); } else { /* - * Check if this index is being used on any other - * interfaces. If yes, then the request needs to be rejected. + * Check if this index is being used on + * any other interfaces. If yes, then + * the request needs to be rejected. */ ret = wlan_is_custom_ie_index_unused (pmpriv, index); @@ -1332,7 +1303,7 @@ wlan_misc_ioctl_custom_ie_list(IN pmlan_adapter pmadapter, ie_length + MLAN_CUSTOM_IE_HDR_SIZE; - memmove(pmadapter, (t_u8 *) ie_data, ie_data->ie_buffer + ie_data->ie_length, ioctl_len); + memmove(pmadapter, (t_u8 *)ie_data, ie_data->ie_buffer + ie_data->ie_length, ioctl_len); continue; } } @@ -1360,7 +1331,7 @@ wlan_misc_ioctl_custom_ie_list(IN pmlan_adapter pmadapter, HostCmd_CMD_MGMT_IE_LIST, cmd_action, 0, - (send_ioctl) ? (t_void *) pioctl_req : + (send_ioctl) ? (t_void *)pioctl_req : MNULL, &misc->param.cust_ie); } #ifdef UAP_SUPPORT @@ -1369,7 +1340,7 @@ wlan_misc_ioctl_custom_ie_list(IN pmlan_adapter pmadapter, HOST_CMD_APCMD_SYS_CONFIGURE, cmd_action, 0, - (send_ioctl) ? (t_void *) pioctl_req : + (send_ioctl) ? (t_void *)pioctl_req : MNULL, (send_ioctl) ? MNULL : &misc->param. cust_ie); @@ -1401,7 +1372,7 @@ wlan_reg_mem_ioctl_reg_rw(IN pmlan_adapter pmadapter, ENTER(); - reg_mem = (mlan_ds_reg_mem *) pioctl_req->pbuf; + reg_mem = (mlan_ds_reg_mem *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) cmd_action = HostCmd_ACT_GEN_GET; else @@ -1420,6 +1391,9 @@ wlan_reg_mem_ioctl_reg_rw(IN pmlan_adapter pmadapter, case MLAN_REG_CAU: cmd_no = HostCmd_CMD_CAU_REG_ACCESS; break; + case MLAN_REG_PSU: + cmd_no = HostCmd_CMD_TARGET_ACCESS; + break; default: pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; ret = MLAN_STATUS_FAILURE; @@ -1428,8 +1402,8 @@ wlan_reg_mem_ioctl_reg_rw(IN pmlan_adapter pmadapter, /* Send request to firmware */ ret = wlan_prepare_cmd(pmpriv, cmd_no, cmd_action, - 0, (t_void *) pioctl_req, - (t_void *) & reg_mem->param.reg_rw); + 0, (t_void *)pioctl_req, + (t_void *)®_mem->param.reg_rw); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -1458,15 +1432,15 @@ wlan_reg_mem_ioctl_read_eeprom(IN pmlan_adapter pmadapter, ENTER(); - reg_mem = (mlan_ds_reg_mem *) pioctl_req->pbuf; + reg_mem = (mlan_ds_reg_mem *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) cmd_action = HostCmd_ACT_GEN_GET; /* Send request to firmware */ ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_EEPROM_ACCESS, - cmd_action, 0, (t_void *) pioctl_req, - (t_void *) & reg_mem->param.rd_eeprom); + cmd_action, 0, (t_void *)pioctl_req, + (t_void *)®_mem->param.rd_eeprom); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -1494,7 +1468,7 @@ wlan_reg_mem_ioctl_mem_rw(IN pmlan_adapter pmadapter, ENTER(); - reg_mem = (mlan_ds_reg_mem *) pioctl_req->pbuf; + reg_mem = (mlan_ds_reg_mem *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) cmd_action = HostCmd_ACT_GEN_GET; else @@ -1504,8 +1478,8 @@ wlan_reg_mem_ioctl_mem_rw(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_MEM_ACCESS, cmd_action, 0, - (t_void *) pioctl_req, - (t_void *) & reg_mem->param.mem_rw); + (t_void *)pioctl_req, + (t_void *)®_mem->param.mem_rw); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -1522,7 +1496,7 @@ wlan_reg_mem_ioctl_mem_rw(IN pmlan_adapter pmadapter, * @return MFALSE/MTRUE */ t_u8 -wlan_is_station_list_empty(mlan_private * priv) +wlan_is_station_list_empty(mlan_private *priv) { ENTER(); if (!(util_peek_list(priv->adapter->pmoal_handle, @@ -1546,7 +1520,7 @@ wlan_is_station_list_empty(mlan_private * priv) * @return A pointer to structure sta_node */ sta_node * -wlan_get_station_entry(mlan_private * priv, t_u8 * mac) +wlan_get_station_entry(mlan_private *priv, t_u8 *mac) { sta_node *sta_ptr; @@ -1556,17 +1530,17 @@ wlan_get_station_entry(mlan_private * priv, t_u8 * mac) LEAVE(); return MNULL; } - sta_ptr = (sta_node *) util_peek_list(priv->adapter->pmoal_handle, - &priv->sta_list, - priv->adapter->callbacks. - moal_spin_lock, - priv->adapter->callbacks. - moal_spin_unlock); + sta_ptr = (sta_node *)util_peek_list(priv->adapter->pmoal_handle, + &priv->sta_list, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); if (!sta_ptr) { LEAVE(); return MNULL; } - while (sta_ptr != (sta_node *) & priv->sta_list) { + while (sta_ptr != (sta_node *)&priv->sta_list) { if (!memcmp (priv->adapter, sta_ptr->mac_addr, mac, MLAN_MAC_ADDR_LENGTH)) { @@ -1589,7 +1563,7 @@ wlan_get_station_entry(mlan_private * priv, t_u8 * mac) * @return A pointer to structure sta_node */ sta_node * -wlan_add_station_entry(mlan_private * priv, t_u8 * mac) +wlan_add_station_entry(mlan_private *priv, t_u8 *mac) { sta_node *sta_ptr = MNULL; mlan_adapter *pmadapter = priv->adapter; @@ -1603,7 +1577,7 @@ wlan_add_station_entry(mlan_private * priv, t_u8 * mac) goto done; if (priv->adapter->callbacks. moal_malloc(priv->adapter->pmoal_handle, sizeof(sta_node), - MLAN_MEM_DEF, (t_u8 **) & sta_ptr)) { + MLAN_MEM_DEF, (t_u8 **)&sta_ptr)) { PRINTM(MERROR, "Failed to allocate memory for station node\n"); LEAVE(); return MNULL; @@ -1611,9 +1585,17 @@ wlan_add_station_entry(mlan_private * priv, t_u8 * mac) memset(priv->adapter, sta_ptr, 0, sizeof(sta_node)); memcpy(priv->adapter, sta_ptr->mac_addr, mac, MLAN_MAC_ADDR_LENGTH); util_enqueue_list_tail(priv->adapter->pmoal_handle, &priv->sta_list, - (pmlan_linked_list) sta_ptr, + (pmlan_linked_list)sta_ptr, priv->adapter->callbacks.moal_spin_lock, priv->adapter->callbacks.moal_spin_unlock); +#ifdef DRV_EMBEDDED_AUTHENTICATOR + if (priv->adapter->psdio_device->driver_supplicant_auth) + if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) && + IsAuthenticatorEnabled(priv->psapriv)) + authenticator_init_client(priv->psapriv, + &sta_ptr->cm_connectioninfo, + mac); +#endif done: pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, priv->wmm.ra_list_spinlock); @@ -1631,7 +1613,7 @@ wlan_add_station_entry(mlan_private * priv, t_u8 * mac) * @return N/A */ t_void -wlan_delete_station_entry(mlan_private * priv, t_u8 * mac) +wlan_delete_station_entry(mlan_private *priv, t_u8 *mac) { sta_node *sta_ptr = MNULL; mlan_adapter *pmadapter = priv->adapter; @@ -1640,12 +1622,20 @@ wlan_delete_station_entry(mlan_private * priv, t_u8 * mac) priv->wmm.ra_list_spinlock); sta_ptr = wlan_get_station_entry(priv, mac); if (sta_ptr) { +#ifdef DRV_EMBEDDED_AUTHENTICATOR + if (priv->adapter->psdio_device->driver_supplicant_auth) + if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) && + IsAuthenticatorEnabled(priv->psapriv)) + authenticator_free_client(priv->psapriv, + sta_ptr-> + cm_connectioninfo); +#endif util_unlink_list(priv->adapter->pmoal_handle, &priv->sta_list, - (pmlan_linked_list) sta_ptr, + (pmlan_linked_list)sta_ptr, priv->adapter->callbacks.moal_spin_lock, priv->adapter->callbacks.moal_spin_unlock); priv->adapter->callbacks.moal_mfree(priv->adapter->pmoal_handle, - (t_u8 *) sta_ptr); + (t_u8 *)sta_ptr); } pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, priv->wmm.ra_list_spinlock); @@ -1667,14 +1657,22 @@ wlan_delete_station_list(pmlan_private priv) ENTER(); while ((sta_ptr = - (sta_node *) util_dequeue_list(priv->adapter->pmoal_handle, - &priv->sta_list, - priv->adapter->callbacks. - moal_spin_lock, - priv->adapter->callbacks. - moal_spin_unlock))) { + (sta_node *)util_dequeue_list(priv->adapter->pmoal_handle, + &priv->sta_list, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock))) { +#ifdef DRV_EMBEDDED_AUTHENTICATOR + if (priv->adapter->psdio_device->driver_supplicant_auth) + if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) && + IsAuthenticatorEnabled(priv->psapriv)) + authenticator_free_client(priv->psapriv, + sta_ptr-> + cm_connectioninfo); +#endif priv->adapter->callbacks.moal_mfree(priv->adapter->pmoal_handle, - (t_u8 *) sta_ptr); + (t_u8 *)sta_ptr); } LEAVE(); return; @@ -1688,7 +1686,7 @@ wlan_delete_station_list(pmlan_private priv) * @return number of tdls peer */ int -wlan_get_tdls_list(mlan_private * priv, tdls_peer_info * buf) +wlan_get_tdls_list(mlan_private *priv, tdls_peer_info *buf) { tdls_peer_info *peer_info = buf; sta_node *sta_ptr = MNULL; @@ -1698,28 +1696,30 @@ wlan_get_tdls_list(mlan_private * priv, tdls_peer_info * buf) LEAVE(); return count; } - sta_ptr = (sta_node *) util_peek_list(priv->adapter->pmoal_handle, - &priv->sta_list, - priv->adapter->callbacks. - moal_spin_lock, - priv->adapter->callbacks. - moal_spin_unlock); + sta_ptr = (sta_node *)util_peek_list(priv->adapter->pmoal_handle, + &priv->sta_list, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); if (!sta_ptr) { LEAVE(); return count; } - while (sta_ptr != (sta_node *) & priv->sta_list) { - peer_info->snr = sta_ptr->snr; - peer_info->nf = sta_ptr->nf; - memcpy(priv->adapter, peer_info->mac_addr, sta_ptr->mac_addr, - MLAN_MAC_ADDR_LENGTH); - memcpy(priv->adapter, peer_info->ht_cap, &sta_ptr->HTcap, - sizeof(IEEEtypes_HTCap_t)); - memcpy(priv->adapter, peer_info->ext_cap, &sta_ptr->ExtCap, - sizeof(IEEEtypes_ExtCap_t)); + while (sta_ptr != (sta_node *)&priv->sta_list) { + if (sta_ptr->status == TDLS_SETUP_COMPLETE) { + peer_info->snr = sta_ptr->snr; + peer_info->nf = sta_ptr->nf; + memcpy(priv->adapter, peer_info->mac_addr, + sta_ptr->mac_addr, MLAN_MAC_ADDR_LENGTH); + memcpy(priv->adapter, peer_info->ht_cap, + &sta_ptr->HTcap, sizeof(IEEEtypes_HTCap_t)); + memcpy(priv->adapter, peer_info->ext_cap, + &sta_ptr->ExtCap, sizeof(IEEEtypes_ExtCap_t)); + peer_info++; + count++; + } sta_ptr = sta_ptr->pnext; - peer_info++; - count++; if (count >= MLAN_MAX_TDLS_PEER_SUPPORTED) break; } @@ -1741,13 +1741,13 @@ wlan_misc_ioctl_tdls_config(IN pmlan_adapter pmadapter, { mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; mlan_status ret = MLAN_STATUS_SUCCESS; - mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; tdls_all_config *tdls_all_cfg = - (tdls_all_config *) misc->param.tdls_config.tdls_data; + (tdls_all_config *)misc->param.tdls_config.tdls_data; t_u8 event_buf[100]; - mlan_event *pevent = (mlan_event *) event_buf; + mlan_event *pevent = (mlan_event *)event_buf; tdls_tear_down_event *tdls_evt = - (tdls_tear_down_event *) pevent->event_buf; + (tdls_tear_down_event *)pevent->event_buf; sta_node *sta_ptr = MNULL; ENTER(); @@ -1761,8 +1761,7 @@ wlan_misc_ioctl_tdls_config(IN pmlan_adapter pmadapter, pevent->bss_index = pmpriv->bss_index; pevent->event_id = MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ; pevent->event_len = sizeof(tdls_tear_down_event); - memcpy(pmpriv->adapter, - (t_u8 *) tdls_evt->peer_mac_addr, + memcpy(pmpriv->adapter, (t_u8 *)tdls_evt->peer_mac_addr, tdls_all_cfg->u.tdls_tear_down.peer_mac_addr, MLAN_MAC_ADDR_LENGTH); tdls_evt->reason_code = @@ -1781,7 +1780,7 @@ wlan_misc_ioctl_tdls_config(IN pmlan_adapter pmadapter, HostCmd_CMD_TDLS_CONFIG, HostCmd_ACT_GEN_SET, 0, - (t_void *) pioctl_req, &misc->param.tdls_config); + (t_void *)pioctl_req, &misc->param.tdls_config); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -1803,12 +1802,12 @@ wlan_misc_ioctl_tdls_oper(IN pmlan_adapter pmadapter, { mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; mlan_status ret = MLAN_STATUS_SUCCESS; - mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; mlan_ds_misc_tdls_oper *ptdls_oper = &misc->param.tdls_oper; t_u8 event_buf[100]; - mlan_event *ptdls_event = (mlan_event *) event_buf; + mlan_event *ptdls_event = (mlan_event *)event_buf; tdls_tear_down_event *tdls_evt = - (tdls_tear_down_event *) ptdls_event->event_buf; + (tdls_tear_down_event *)ptdls_event->event_buf; sta_node *sta_ptr = MNULL; t_u8 i = 0; @@ -1821,6 +1820,12 @@ wlan_misc_ioctl_tdls_oper(IN pmlan_adapter pmadapter, MAC2STR(ptdls_oper->peer_mac)); sta_ptr->status = TDLS_SETUP_COMPLETE; pmadapter->tdls_status = TDLS_IN_BASE_CHANNEL; + if (!pmpriv->txaggrctrl) + wlan_11n_send_delba_to_peer(pmpriv, + pmpriv-> + curr_bss_params. + bss_descriptor. + mac_address); if (sta_ptr->HTcap.ieee_hdr.element_id == HT_CAPABILITY) { sta_ptr->is_11n_enabled = MTRUE; if (GETHT_MAXAMSDU @@ -1859,7 +1864,7 @@ wlan_misc_ioctl_tdls_oper(IN pmlan_adapter pmadapter, ptdls_event->event_len = sizeof(tdls_tear_down_event); memcpy(pmpriv->adapter, - (t_u8 *) tdls_evt->peer_mac_addr, + (t_u8 *)tdls_evt->peer_mac_addr, ptdls_oper->peer_mac, MLAN_MAC_ADDR_LENGTH); tdls_evt->reason_code = @@ -1902,38 +1907,11 @@ wlan_misc_ioctl_tdls_oper(IN pmlan_adapter pmadapter, MNULL); break; case WLAN_TDLS_DISABLE_LINK: - if (sta_ptr) { - wlan_restore_tdls_packets(pmpriv, ptdls_oper->peer_mac, - TDLS_TEAR_DOWN); - if (sta_ptr->is_11n_enabled) { - wlan_cleanup_reorder_tbl(pmpriv, - ptdls_oper->peer_mac); - pmadapter->callbacks.moal_spin_lock(pmadapter-> - pmoal_handle, - pmpriv->wmm. - ra_list_spinlock); - wlan_11n_cleanup_txbastream_tbl(pmpriv, - ptdls_oper-> - peer_mac); - pmadapter->callbacks. - moal_spin_unlock(pmadapter-> - pmoal_handle, - pmpriv->wmm. - ra_list_spinlock); - } - if (sta_ptr->status >= TDLS_SETUP_INPROGRESS) - wlan_delete_station_entry(pmpriv, - ptdls_oper->peer_mac); - } - if (MTRUE == wlan_is_station_list_empty(pmpriv)) - pmadapter->tdls_status = TDLS_NOT_SETUP; - else - pmadapter->tdls_status = TDLS_IN_BASE_CHANNEL; /* Send command to firmware to delete tdls link */ ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_TDLS_OPERATION, HostCmd_ACT_GEN_SET, - 0, (t_void *) pioctl_req, ptdls_oper); + 0, (t_void *)pioctl_req, ptdls_oper); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; break; @@ -1957,7 +1935,7 @@ wlan_misc_ioctl_tdls_oper(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_TDLS_OPERATION, HostCmd_ACT_GEN_SET, - 0, (t_void *) pioctl_req, ptdls_oper); + 0, (t_void *)pioctl_req, ptdls_oper); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; break; @@ -1970,7 +1948,7 @@ wlan_misc_ioctl_tdls_oper(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_TDLS_OPERATION, HostCmd_ACT_GEN_SET, - 0, (t_void *) pioctl_req, ptdls_oper); + 0, (t_void *)pioctl_req, ptdls_oper); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; break; @@ -1994,7 +1972,7 @@ wlan_misc_ioctl_tdls_get_ies(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) { mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; - mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; mlan_ds_misc_tdls_ies *tdls_ies = &misc->param.tdls_ies; mlan_status ret = MLAN_STATUS_SUCCESS; BSSDescriptor_t *pbss_desc; @@ -2007,24 +1985,27 @@ wlan_misc_ioctl_tdls_get_ies(IN pmlan_adapter pmadapter, sta_ptr = wlan_get_station_entry(pmpriv, tdls_ies->peer_mac); pbss_desc = &pmpriv->curr_bss_params.bss_descriptor; - usr_dot_11n_dev_cap = pmadapter->usr_dot_11n_dev_cap_bg; + if (pbss_desc->bss_band & BAND_A) + usr_dot_11n_dev_cap = pmadapter->usr_dot_11n_dev_cap_a; + else + usr_dot_11n_dev_cap = pmadapter->usr_dot_11n_dev_cap_bg; /** fill the extcap */ if (tdls_ies->flags & TDLS_IE_FLAGS_EXTCAP) { - ext_cap = (IEEEtypes_ExtCap_t *) tdls_ies->ext_cap; + ext_cap = (IEEEtypes_ExtCap_t *)tdls_ies->ext_cap; ext_cap->ieee_hdr.element_id = EXT_CAPABILITY; ext_cap->ieee_hdr.len = sizeof(ExtCap_t); SET_EXTCAP_TDLS(ext_cap->ext_cap); - // TODO UAPSD need be enabled RESET_EXTCAP_TDLS_UAPSD(ext_cap->ext_cap); RESET_EXTCAP_TDLS_CHAN_SWITCH(ext_cap->ext_cap); + DBG_HEXDUMP(MCMD_D, "TDLS extcap", tdls_ies->ext_cap, sizeof(IEEEtypes_ExtCap_t)); } /** fill the htcap based on hwspec */ if (tdls_ies->flags & TDLS_IE_FLAGS_HTCAP) { - ht_cap = (IEEEtypes_HTCap_t *) tdls_ies->ht_cap; + ht_cap = (IEEEtypes_HTCap_t *)tdls_ies->ht_cap; memset(pmadapter, ht_cap, 0, sizeof(IEEEtypes_HTCap_t)); wlan_fill_ht_cap_ie(pmpriv, ht_cap, pbss_desc->bss_band); DBG_HEXDUMP(MCMD_D, "TDLS htcap", tdls_ies->ht_cap, @@ -2032,7 +2013,7 @@ wlan_misc_ioctl_tdls_get_ies(IN pmlan_adapter pmadapter, } /** fill the htinfo */ if (tdls_ies->flags & TDLS_IE_FLAGS_HTINFO) { - ht_info = (IEEEtypes_HTInfo_t *) tdls_ies->ht_info; + ht_info = (IEEEtypes_HTInfo_t *)tdls_ies->ht_info; pbss_desc = &pmpriv->curr_bss_params.bss_descriptor; ht_info->ieee_hdr.element_id = HT_OPERATION; ht_info->ieee_hdr.len = sizeof(HTInfo_t); @@ -2044,6 +2025,10 @@ wlan_misc_ioctl_tdls_get_ies(IN pmlan_adapter pmadapter, field2)) { ht_info->ht_info.field2 = pbss_desc->pht_info->ht_info.field2; + } else { + ht_info->ht_info.field2 = + wlan_get_second_channel_offset(pbss_desc-> + channel); } if (sta_ptr) memcpy(pmadapter, &sta_ptr->HTInfo, tdls_ies->ht_info, @@ -2068,7 +2053,7 @@ mlan_status wlan_get_info_ver_ext(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) { pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; - mlan_ds_get_info *pinfo = (mlan_ds_get_info *) pioctl_req->pbuf; + mlan_ds_get_info *pinfo = (mlan_ds_get_info *)pioctl_req->pbuf; mlan_status ret = MLAN_STATUS_SUCCESS; ENTER(); @@ -2078,7 +2063,7 @@ wlan_get_info_ver_ext(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) HostCmd_CMD_VERSION_EXT, HostCmd_ACT_GEN_GET, 0, - (t_void *) pioctl_req, + (t_void *)pioctl_req, &pinfo->param.ver_ext.version_str_sel); if (ret == MLAN_STATUS_SUCCESS) @@ -2100,7 +2085,7 @@ wlan_get_info_ver_ext(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) mlan_status wlan_set_drvdbg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) { - mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; mlan_status ret = MLAN_STATUS_SUCCESS; ENTER(); @@ -2125,7 +2110,7 @@ mlan_status wlan_reg_rx_mgmt_ind(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) { pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; - mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; mlan_status ret = MLAN_STATUS_SUCCESS; ENTER(); @@ -2138,7 +2123,7 @@ wlan_reg_rx_mgmt_ind(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) HostCmd_CMD_RX_MGMT_IND, pioctl_req->action, 0, - (t_void *) pioctl_req, + (t_void *)pioctl_req, &misc->param.mgmt_subtype_mask); if (ret == MLAN_STATUS_SUCCESS) @@ -2151,16 +2136,18 @@ wlan_reg_rx_mgmt_ind(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) /** * @brief This function processes the 802.11 mgmt Frame * - * @param priv A pointer to mlan_private + * @param priv A pointer to mlan_private * - * @param payload A pointer to the received buffer - * @param payload_len Length of the received buffer + * @param payload A pointer to the received buffer + * @param payload_len Length of the received buffer + * @param prx_pd A pointer to RxPD * - * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_process_802dot11_mgmt_pkt(IN mlan_private * priv, - IN t_u8 * payload, IN t_u32 payload_len) +wlan_process_802dot11_mgmt_pkt(IN mlan_private *priv, + IN t_u8 *payload, + IN t_u32 payload_len, IN RxPD *prx_pd) { pmlan_adapter pmadapter = priv->adapter; pmlan_callbacks pcb = &pmadapter->callbacks; @@ -2170,6 +2157,8 @@ wlan_process_802dot11_mgmt_pkt(IN mlan_private * priv, t_u8 *event_buf = MNULL; mlan_event *pevent = MNULL; t_u8 unicast = 0; + t_u8 category; + t_u8 action_code; ENTER(); if (payload_len > (MAX_EVENT_SIZE - sizeof(mlan_event))) { @@ -2180,11 +2169,11 @@ wlan_process_802dot11_mgmt_pkt(IN mlan_private * priv, } /* Check packet type-subtype and compare with mgmt_passthru_mask If event is needed to host, just eventify it */ - pieee_pkt_hdr = (wlan_802_11_header *) payload; + pieee_pkt_hdr = (wlan_802_11_header *)payload; sub_type = IEEE80211_GET_FC_MGMT_FRAME_SUBTYPE(pieee_pkt_hdr->frm_ctl); if (((1 << sub_type) & priv->mgmt_frame_passthru_mask) == 0) { - PRINTM(MINFO, "Dropping mgmt frame for subtype %d.\n", - sub_type); + PRINTM(MINFO, "Dropping mgmt frame for subtype %d snr=%d.\n", + sub_type, prx_pd->snr); LEAVE(); return ret; } @@ -2193,11 +2182,25 @@ wlan_process_802dot11_mgmt_pkt(IN mlan_private * priv, case SUBTYPE_REASSOC_REQUEST: case SUBTYPE_DISASSOC: case SUBTYPE_DEAUTH: - case SUBTYPE_ACTION: case SUBTYPE_AUTH: case SUBTYPE_PROBE_RESP: unicast = MTRUE; break; + case SUBTYPE_ACTION: + category = *(payload + sizeof(wlan_802_11_header)); + action_code = *(payload + sizeof(wlan_802_11_header) + 1); + if ((category == CATEGORY_PUBLIC) && + (action_code == TDLS_DISCOVERY_RESPONSE)) { + pcb->moal_updata_peer_signal(pmadapter->pmoal_handle, + priv->bss_index, + pieee_pkt_hdr->addr2, + prx_pd->snr, prx_pd->nf); + PRINTM(MINFO, + "Rx: TDLS discovery response, nf=%d, snr=%d\n", + prx_pd->nf, prx_pd->snr); + } + unicast = MTRUE; + break; default: break; } @@ -2220,17 +2223,16 @@ wlan_process_802dot11_mgmt_pkt(IN mlan_private * priv, LEAVE(); return MLAN_STATUS_FAILURE; } - pevent = (pmlan_event) event_buf; + pevent = (pmlan_event)event_buf; pevent->bss_index = priv->bss_index; pevent->event_id = MLAN_EVENT_ID_DRV_MGMT_FRAME; pevent->event_len = payload_len + sizeof(pevent->event_id); - memcpy(pmadapter, (t_u8 *) pevent->event_buf, - (t_u8 *) & pevent->event_id, sizeof(pevent->event_id)); + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + (t_u8 *)&pevent->event_id, sizeof(pevent->event_id)); memcpy(pmadapter, - (t_u8 *) (pevent->event_buf + sizeof(pevent->event_id)), payload, + (t_u8 *)(pevent->event_buf + sizeof(pevent->event_id)), payload, payload_len); - wlan_recv_event(priv, MLAN_EVENT_ID_DRV_MGMT_FRAME, pevent); - + wlan_recv_event(priv, pevent->event_id, pevent); if (event_buf) pcb->moal_mfree(pmadapter->pmoal_handle, event_buf); LEAVE(); @@ -2251,7 +2253,7 @@ wlan_misc_ext_capa_cfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) { pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; - mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; mlan_status ret = MLAN_STATUS_SUCCESS; ENTER(); @@ -2276,7 +2278,7 @@ wlan_misc_ext_capa_cfg(IN pmlan_adapter pmadapter, * @return MTRUE or MFALSE; */ t_u32 -wlan_is_ext_capa_support(mlan_private * pmpriv) +wlan_is_ext_capa_support(mlan_private *pmpriv) { ENTER(); @@ -2293,6 +2295,32 @@ wlan_is_ext_capa_support(mlan_private * pmpriv) } #endif +/** + * @brief Set hotspot enable/disable + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_misc_hotspot_cfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (MLAN_ACT_GET == pioctl_req->action) + misc->param.hotspot_cfg = pmpriv->hotspot_cfg; + else if (MLAN_ACT_SET == pioctl_req->action) + pmpriv->hotspot_cfg = misc->param.hotspot_cfg; + + LEAVE(); + return ret; +} + #ifdef STA_SUPPORT /** * @brief Add Extended Capabilities IE @@ -2303,13 +2331,13 @@ wlan_is_ext_capa_support(mlan_private * pmpriv) * @return N/A */ void -wlan_add_ext_capa_info_ie(IN mlan_private * pmpriv, OUT t_u8 ** pptlv_out) +wlan_add_ext_capa_info_ie(IN mlan_private *pmpriv, OUT t_u8 **pptlv_out) { MrvlIETypes_ExtCap_t *pext_cap = MNULL; ENTER(); - pext_cap = (MrvlIETypes_ExtCap_t *) * pptlv_out; + pext_cap = (MrvlIETypes_ExtCap_t *)*pptlv_out; memset(pmpriv->adapter, pext_cap, 0, sizeof(MrvlIETypes_ExtCap_t)); pext_cap->header.type = wlan_cpu_to_le16(EXT_CAPABILITY); pext_cap->header.len = wlan_cpu_to_le16(sizeof(ExtCap_t)); @@ -2334,7 +2362,7 @@ wlan_misc_otp_user_data(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) { pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; - mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; mlan_status ret = MLAN_STATUS_FAILURE; ENTER(); @@ -2350,7 +2378,7 @@ wlan_misc_otp_user_data(IN pmlan_adapter pmadapter, HostCmd_CMD_OTP_READ_USER_DATA, HostCmd_ACT_GEN_GET, 0, - (t_void *) pioctl_req, + (t_void *)pioctl_req, &misc->param.otp_user_data); if (ret == MLAN_STATUS_SUCCESS) @@ -2370,7 +2398,7 @@ wlan_misc_otp_user_data(IN pmlan_adapter pmadapter, * @return MTRUE/MFALSE */ t_u8 -wlan_is_wmm_ie_present(pmlan_adapter pmadapter, t_u8 * pbuf, t_u16 buf_len) +wlan_is_wmm_ie_present(pmlan_adapter pmadapter, t_u8 *pbuf, t_u16 buf_len) { t_u16 bytes_left = buf_len; IEEEtypes_ElementId_e element_id; @@ -2385,8 +2413,8 @@ wlan_is_wmm_ie_present(pmlan_adapter pmadapter, t_u8 * pbuf, t_u16 buf_len) /* Process variable IE */ while (bytes_left >= 2) { - element_id = (IEEEtypes_ElementId_e) (*((t_u8 *) pcurrent_ptr)); - element_len = *((t_u8 *) pcurrent_ptr + 1); + element_id = (IEEEtypes_ElementId_e)(*((t_u8 *)pcurrent_ptr)); + element_len = *((t_u8 *)pcurrent_ptr + 1); total_ie_len = element_len + sizeof(IEEEtypes_Header_t); if (bytes_left < total_ie_len) { @@ -2397,8 +2425,7 @@ wlan_is_wmm_ie_present(pmlan_adapter pmadapter, t_u8 * pbuf, t_u16 buf_len) } switch (element_id) { case VENDOR_SPECIFIC_221: - pvendor_ie = - (IEEEtypes_VendorSpecific_t *) pcurrent_ptr; + pvendor_ie = (IEEEtypes_VendorSpecific_t *)pcurrent_ptr; if (!memcmp (pmadapter, pvendor_ie->vend_hdr.oui, wmm_oui, sizeof(wmm_oui))) { @@ -2432,7 +2459,7 @@ wlan_is_wmm_ie_present(pmlan_adapter pmadapter, t_u8 * pbuf, t_u16 buf_len) * @return ie's poiner or MNULL */ t_u8 * -wlan_get_specific_ie(pmlan_private priv, t_u8 * ie_buf, t_u8 ie_len, +wlan_get_specific_ie(pmlan_private priv, t_u8 *ie_buf, t_u8 ie_len, IEEEtypes_ElementId_e id) { t_u32 bytes_left = ie_len; @@ -2446,8 +2473,8 @@ wlan_get_specific_ie(pmlan_private priv, t_u8 * ie_buf, t_u8 ie_len, DBG_HEXDUMP(MCMD_D, "ie", ie_buf, ie_len); while (bytes_left >= 2) { - element_id = (IEEEtypes_ElementId_e) (*((t_u8 *) pcurrent_ptr)); - element_len = *((t_u8 *) pcurrent_ptr + 1); + element_id = (IEEEtypes_ElementId_e)(*((t_u8 *)pcurrent_ptr)); + element_len = *((t_u8 *)pcurrent_ptr + 1); total_ie_len = element_len + sizeof(IEEEtypes_Header_t); if (bytes_left < total_ie_len) { PRINTM(MERROR, "InterpretIE: Error in processing IE, " @@ -2487,7 +2514,7 @@ wlan_get_pm_info(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) ENTER(); - pm_cfg = (mlan_ds_pm_cfg *) pioctl_req->pbuf; + pm_cfg = (mlan_ds_pm_cfg *)pioctl_req->pbuf; pm_cfg->param.ps_info.is_suspend_allowed = MTRUE; if (util_peek_list(pmadapter->pmoal_handle, &pmadapter->cmd_pending_q, pcb->moal_spin_lock, pcb->moal_spin_unlock) @@ -2527,14 +2554,14 @@ wlan_get_hs_wakeup_reason(IN pmlan_adapter pmadapter, ENTER(); - pm_cfg = (mlan_ds_pm_cfg *) pioctl_req->pbuf; + pm_cfg = (mlan_ds_pm_cfg *)pioctl_req->pbuf; /* Send command to firmware */ ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_HS_WAKEUP_REASON, HostCmd_ACT_GEN_GET, 0, - (t_void *) pioctl_req, + (t_void *)pioctl_req, &pm_cfg->param.wakeup_reason); if (ret == MLAN_STATUS_SUCCESS) @@ -2564,7 +2591,7 @@ wlan_radio_ioctl_radio_ctl(IN pmlan_adapter pmadapter, ENTER(); - radio_cfg = (mlan_ds_radio_cfg *) pioctl_req->pbuf; + radio_cfg = (mlan_ds_radio_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) { if (pmadapter->radio_on == radio_cfg->param.radio_on_off) { ret = MLAN_STATUS_SUCCESS; @@ -2584,7 +2611,7 @@ wlan_radio_ioctl_radio_ctl(IN pmlan_adapter pmadapter, HostCmd_CMD_802_11_RADIO_CONTROL, cmd_action, 0, - (t_void *) pioctl_req, + (t_void *)pioctl_req, &radio_cfg->param.radio_on_off); if (ret == MLAN_STATUS_SUCCESS) @@ -2615,15 +2642,15 @@ wlan_radio_ioctl_ant_cfg(IN pmlan_adapter pmadapter, ENTER(); - radio_cfg = (mlan_ds_radio_cfg *) pioctl_req->pbuf; + radio_cfg = (mlan_ds_radio_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) { /* User input validation */ if ((!radio_cfg->param.antenna || - radio_cfg->param.antenna & ~RF_ANTENNA_MASK(pmadapter-> - number_of_antenna)) - && (radio_cfg->param.antenna != RF_ANTENNA_AUTO || - pmadapter->number_of_antenna <= 1)) { + bitcount(radio_cfg->param.antenna & 0xFFFF) > + pmadapter->number_of_antenna) && + (radio_cfg->param.antenna != RF_ANTENNA_AUTO || + pmadapter->number_of_antenna <= 1)) { PRINTM(MERROR, "Invalid antenna setting\n"); pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; ret = MLAN_STATUS_FAILURE; @@ -2635,13 +2662,13 @@ wlan_radio_ioctl_ant_cfg(IN pmlan_adapter pmadapter, /* Cast it to t_u16, antenna mode for command HostCmd_CMD_802_11_RF_ANTENNA requires 2 bytes */ - ant_cfg = (t_u16 *) & radio_cfg->param.antenna; + ant_cfg = (t_u16 *)&radio_cfg->param.antenna; /* Send request to firmware */ ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_RF_ANTENNA, cmd_action, - 0, (t_void *) pioctl_req, (t_void *) ant_cfg); + 0, (t_void *)pioctl_req, (t_void *)ant_cfg); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -2672,7 +2699,7 @@ wlan_rate_ioctl_get_rate_bitmap(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_TX_RATE_CFG, HostCmd_ACT_GEN_GET, - 0, (t_void *) pioctl_req, MNULL); + 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -2699,7 +2726,7 @@ wlan_rate_ioctl_set_rate_bitmap(IN pmlan_adapter pmadapter, ENTER(); - ds_rate = (mlan_ds_rate *) pioctl_req->pbuf; + ds_rate = (mlan_ds_rate *)pioctl_req->pbuf; bitmap_rates = ds_rate->param.rate_cfg.bitmap_rates; PRINTM(MINFO, "RateBitmap=%04x%04x%04x%04x%04x%04x%04x%04x%04x%04x, " @@ -2715,8 +2742,7 @@ wlan_rate_ioctl_set_rate_bitmap(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_TX_RATE_CFG, HostCmd_ACT_GEN_SET, - 0, - (t_void *) pioctl_req, (t_void *) bitmap_rates); + 0, (t_void *)pioctl_req, (t_void *)bitmap_rates); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -2742,7 +2768,7 @@ wlan_rate_ioctl_get_rate_value(IN pmlan_adapter pmadapter, ENTER(); - rate = (mlan_ds_rate *) pioctl_req->pbuf; + rate = (mlan_ds_rate *)pioctl_req->pbuf; rate->param.rate_cfg.is_rate_auto = pmpriv->is_data_rate_auto; pioctl_req->data_read_written = sizeof(mlan_rate_cfg_t) + MLAN_SUB_COMMAND_SIZE; @@ -2752,6 +2778,12 @@ wlan_rate_ioctl_get_rate_value(IN pmlan_adapter pmadapter, if (pmpriv->config_bands & (BAND_B | BAND_G)) { /* Return the lowest supported rate for BG band */ rate->param.rate_cfg.rate = SupportedRates_BG[0] & 0x7f; + } else if (pmpriv->config_bands & (BAND_A | BAND_B)) { + /* Return the lowest supported rate for A band */ + rate->param.rate_cfg.rate = SupportedRates_BG[0] & 0x7f; + } else if (pmpriv->config_bands & BAND_A) { + /* Return the lowest supported rate for A band */ + rate->param.rate_cfg.rate = SupportedRates_A[0] & 0x7f; } else if (pmpriv->config_bands & BAND_G) { /* Return the lowest supported rate for G band */ rate->param.rate_cfg.rate = SupportedRates_G[0] & 0x7f; @@ -2771,7 +2803,7 @@ wlan_rate_ioctl_get_rate_value(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_TX_RATE_QUERY, HostCmd_ACT_GEN_GET, - 0, (t_void *) pioctl_req, MNULL); + 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; } @@ -2803,7 +2835,7 @@ wlan_rate_ioctl_set_rate_value(IN pmlan_adapter pmadapter, ENTER(); - ds_rate = (mlan_ds_rate *) pioctl_req->pbuf; + ds_rate = (mlan_ds_rate *)pioctl_req->pbuf; if (ds_rate->param.rate_cfg.is_rate_auto) { memset(pmadapter, bitmap_rates, 0, sizeof(bitmap_rates)); @@ -2862,7 +2894,7 @@ wlan_rate_ioctl_set_rate_value(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_TX_RATE_CFG, HostCmd_ACT_GEN_SET, - 0, (t_void *) pioctl_req, bitmap_rates); + 0, (t_void *)pioctl_req, bitmap_rates); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -2892,7 +2924,7 @@ wlan_rate_ioctl_get_rate_index(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_TX_RATE_CFG, HostCmd_ACT_GEN_GET, - 0, (t_void *) pioctl_req, MNULL); + 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -2921,7 +2953,7 @@ wlan_rate_ioctl_set_rate_index(IN pmlan_adapter pmadapter, ENTER(); - ds_rate = (mlan_ds_rate *) pioctl_req->pbuf; + ds_rate = (mlan_ds_rate *)pioctl_req->pbuf; rate_index = ds_rate->param.rate_cfg.rate; if (ds_rate->param.rate_cfg.is_rate_auto) { @@ -2979,8 +3011,7 @@ wlan_rate_ioctl_set_rate_index(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_TX_RATE_CFG, HostCmd_ACT_GEN_SET, - 0, - (t_void *) pioctl_req, (t_void *) bitmap_rates); + 0, (t_void *)pioctl_req, (t_void *)bitmap_rates); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -3004,7 +3035,7 @@ wlan_rate_ioctl_cfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) ENTER(); - rate = (mlan_ds_rate *) pioctl_req->pbuf; + rate = (mlan_ds_rate *)pioctl_req->pbuf; if (rate->param.rate_cfg.rate_type == MLAN_RATE_BITMAP) { if (pioctl_req->action == MLAN_ACT_GET) status = wlan_rate_ioctl_get_rate_bitmap(pmadapter, @@ -3058,7 +3089,7 @@ wlan_rate_ioctl_get_data_rate(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_TX_RATE_QUERY, HostCmd_ACT_GEN_GET, - 0, (t_void *) pioctl_req, MNULL); + 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -3088,7 +3119,7 @@ wlan_bss_ioctl_wifi_direct_mode(IN pmlan_adapter pmadapter, ENTER(); - bss = (mlan_ds_bss *) pioctl_req->pbuf; + bss = (mlan_ds_bss *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) cmd_action = HostCmd_ACT_GEN_SET; @@ -3099,7 +3130,7 @@ wlan_bss_ioctl_wifi_direct_mode(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HOST_CMD_WIFI_DIRECT_MODE_CONFIG, cmd_action, - 0, (t_void *) pioctl_req, &bss->param.wfd_mode); + 0, (t_void *)pioctl_req, &bss->param.wfd_mode); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -3127,7 +3158,7 @@ wlan_radio_ioctl_remain_chan_cfg(IN pmlan_adapter pmadapter, ENTER(); - radio_cfg = (mlan_ds_radio_cfg *) pioctl_req->pbuf; + radio_cfg = (mlan_ds_radio_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) cmd_action = HostCmd_ACT_GEN_SET; else @@ -3138,7 +3169,7 @@ wlan_radio_ioctl_remain_chan_cfg(IN pmlan_adapter pmadapter, HostCmd_CMD_802_11_REMAIN_ON_CHANNEL, cmd_action, 0, - (t_void *) pioctl_req, + (t_void *)pioctl_req, &radio_cfg->param.remain_chan); if (ret == MLAN_STATUS_SUCCESS) @@ -3166,7 +3197,7 @@ wlan_misc_p2p_config(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) ENTER(); - misc_cfg = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + misc_cfg = (mlan_ds_misc_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) cmd_action = HostCmd_ACT_GEN_SET; else @@ -3177,7 +3208,7 @@ wlan_misc_p2p_config(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) HOST_CMD_P2P_PARAMS_CONFIG, cmd_action, 0, - (t_void *) pioctl_req, + (t_void *)pioctl_req, &misc_cfg->param.p2p_config); if (ret == MLAN_STATUS_SUCCESS) @@ -3206,7 +3237,7 @@ wlan_misc_ioctl_txcontrol(IN pmlan_adapter pmadapter, ENTER(); - misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) pmpriv->pkt_tx_ctrl = misc->param.tx_control; else @@ -3216,6 +3247,129 @@ wlan_misc_ioctl_txcontrol(IN pmlan_adapter pmadapter, return ret; } +#ifdef RX_PACKET_COALESCE +/** + * @brief Get/Set RX packet coalescing configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_misc_ioctl_rx_pkt_coalesce_config(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc = MNULL; + t_u16 cmd_action = 0; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_RX_PKT_COALESCE_CFG, + cmd_action, + 0, + (t_void *)pioctl_req, &misc->param.rx_coalesce); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} +#endif +/** + * @brief Get/Set channel time and buffer weight configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_misc_ioctl_multi_chan_config(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc = MNULL; + t_u16 cmd_action = 0; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_MULTI_CHAN_CONFIG, + cmd_action, + 0, + (t_void *)pioctl_req, + &misc->param.multi_chan_cfg); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Get/Set multi-channel policy setting + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_misc_ioctl_multi_chan_policy(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc = MNULL; + t_u16 cmd_action = 0; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_SET) { + cmd_action = HostCmd_ACT_GEN_SET; + } else { + cmd_action = HostCmd_ACT_GEN_GET; + } + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_MULTI_CHAN_POLICY, + cmd_action, + 0, + (t_void *)pioctl_req, + &misc->param.multi_chan_policy); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + LEAVE(); + return ret; +} + /** * @brief Set/Get Low Power Mode * @@ -3234,15 +3388,14 @@ wlan_misc_ioctl_low_pwr_mode(IN pmlan_adapter pmadapter, ENTER(); - misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; /* Send request to firmware */ ret = wlan_prepare_cmd(pmpriv, HostCMD_CONFIG_LOW_POWER_MODE, HostCmd_ACT_GEN_SET, 0, - (t_void *) pioctl_req, - &misc->param.low_pwr_mode); + (t_void *)pioctl_req, &misc->param.low_pwr_mode); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_module.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_module.c old mode 100755 new mode 100644 index 2337514f..af098712 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_module.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_module.c @@ -41,9 +41,8 @@ EXPORT_SYMBOL(mlan_rx_process); EXPORT_SYMBOL(mlan_select_wmm_queue); EXPORT_SYMBOL(mlan_interrupt); -EXPORT_SYMBOL(mlan_hist_data_get); -EXPORT_SYMBOL(mlan_hist_data_clear); -EXPORT_SYMBOL(mlan_memcpy); +EXPORT_SYMBOL(mlan_pm_wakeup_card); + EXPORT_SYMBOL(mlan_register_peer_mac_cb); MODULE_DESCRIPTION("M-WLAN MLAN Driver"); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_scan.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_scan.c old mode 100755 new mode 100644 index cb144fe2..6fd02f19 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_scan.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_scan.c @@ -32,7 +32,10 @@ Change log: #include "mlan_fw.h" #include "mlan_main.h" #include "mlan_11n.h" - +#include "mlan_11h.h" +#ifdef DRV_EMBEDDED_SUPPLICANT +#include "authenticator_api.h" +#endif /******************************************************** Local Constants ********************************************************/ @@ -56,15 +59,18 @@ Change log: /** Memory needed to store supported rate */ #define RATE_TLV_MAX_SIZE (sizeof(MrvlIEtypes_RatesParamSet_t) + HOSTCMD_SUPPORTED_RATES) -/** Memory needed to store a max number/size WildCard SSID TLV for a firmware scan */ +/** Memory needed to store a max number/size WildCard + * SSID TLV for a firmware scan */ #define WILDCARD_SSID_TLV_MAX_SIZE \ (MRVDRV_MAX_SSID_LIST_LENGTH * \ (sizeof(MrvlIEtypes_WildCardSsIdParamSet_t) + \ MRVDRV_MAX_SSID_LENGTH)) -/** WPS TLV MAX size is MAX IE size plus 2 bytes for t_u16 MRVL TLV extension */ +/** WPS TLV MAX size is MAX IE size plus 2 bytes for + * t_u16 MRVL TLV extension */ #define WPS_TLV_MAX_SIZE (sizeof(IEEEtypes_VendorSpecific_t) + 2) -/** Maximum memory needed for a wlan_scan_cmd_config with all TLVs at max */ +/** Maximum memory needed for a wlan_scan_cmd_config + * with all TLVs at max */ #define MAX_SCAN_CFG_ALLOC (sizeof(wlan_scan_cmd_config) \ + sizeof(MrvlIEtypes_NumProbes_t) \ + sizeof(MrvlIETypes_HTCap_t) \ @@ -78,7 +84,8 @@ Change log: ********************************************************/ /** - * Interally used to send a configured scan cmd between driver routines + * Interally used to send a configured scan cmd between + * driver routines */ typedef union { /** Scan configuration (variable length) */ @@ -117,6 +124,60 @@ static t_u8 rsn_oui[CIPHER_SUITE_MAX][4] = { {0x00, 0x0f, 0xac, 0x05}, /* WEP104 */ }; +/** + * @brief This function will update the channel statistics from scan result + * + * @param pmpriv A pointer to mlan_private structure + * @param pchanstats_tlv A pointer to MrvlIEtypes_ChannelStats_t tlv + * + * @return NA + */ +void +wlan_update_chan_statistics(mlan_private *pmpriv, + MrvlIEtypes_ChannelStats_t *pchanstats_tlv) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + t_u8 i, j; + ChanStatistics_t *pchan_stats = + (ChanStatistics_t *)((t_u8 *)pchanstats_tlv + + sizeof(MrvlIEtypesHeader_t)); + t_u8 num_chan = + wlan_le16_to_cpu(pchanstats_tlv->header.len) / + sizeof(ChanStatistics_t); + + ENTER(); + + for (j = 0; j < num_chan; j++) { + for (i = 0; i < pmadapter->num_in_chan_stats; i++) { + if (pmadapter->pchan_stats[i].chan_num == + pchan_stats->chan_num) { + pchan_stats->total_networks = + wlan_le16_to_cpu(pchan_stats-> + total_networks); + pchan_stats->cca_scan_duration = + wlan_le16_to_cpu(pchan_stats-> + cca_scan_duration); + pchan_stats->cca_busy_duration = + wlan_le16_to_cpu(pchan_stats-> + cca_busy_duration); + PRINTM(MCMND, + "chan=%d, noise=%d, total_network=%d scan_duration=%d, busy_duration=%d\n", + pchan_stats->chan_num, + pchan_stats->noise, + pchan_stats->total_networks, + pchan_stats->cca_scan_duration, + pchan_stats->cca_busy_duration); + memcpy(pmadapter, &pmadapter->pchan_stats[i], + pchan_stats, sizeof(ChanStatistics_t)); + break; + } + } + pchan_stats++; + } + LEAVE(); + return; +} + /** * @brief This function will parse a given IE for a given OUI * @@ -127,7 +188,7 @@ static t_u8 rsn_oui[CIPHER_SUITE_MAX][4] = { * @return 0 on failure to find OUI, 1 on success. */ static t_u8 -search_oui_in_ie(mlan_adapter * pmadapter, IEBody * ie_body, t_u8 * oui) +search_oui_in_ie(mlan_adapter *pmadapter, IEBody *ie_body, t_u8 *oui) { t_u8 count; @@ -147,8 +208,8 @@ search_oui_in_ie(mlan_adapter * pmadapter, IEBody * ie_body, t_u8 * oui) --count; if (count) { - ie_body = (IEBody *) ((t_u8 *) ie_body + - sizeof(ie_body->PtkBody)); + ie_body = (IEBody *)((t_u8 *)ie_body + + sizeof(ie_body->PtkBody)); } } @@ -168,7 +229,7 @@ search_oui_in_ie(mlan_adapter * pmadapter, IEBody * ie_body, t_u8 * oui) * @return 0 on failure to find AES OUI, 1 on success. */ static t_u8 -is_rsn_oui_present(mlan_adapter * pmadapter, BSSDescriptor_t * pbss_desc, +is_rsn_oui_present(mlan_adapter *pmadapter, BSSDescriptor_t *pbss_desc, t_u32 cipher_suite) { t_u8 *oui = MNULL; @@ -179,8 +240,8 @@ is_rsn_oui_present(mlan_adapter * pmadapter, BSSDescriptor_t * pbss_desc, if (((pbss_desc->prsn_ie) && ((*(pbss_desc->prsn_ie)).ieee_hdr.element_id == RSN_IE))) { ie_body = - (IEBody *) (((t_u8 *) pbss_desc->prsn_ie->data) + - RSN_GTK_OUI_OFFSET); + (IEBody *)(((t_u8 *)pbss_desc->prsn_ie->data) + + RSN_GTK_OUI_OFFSET); oui = &rsn_oui[cipher_suite][0]; ret = search_oui_in_ie(pmadapter, ie_body, oui); if (ret) { @@ -202,7 +263,7 @@ is_rsn_oui_present(mlan_adapter * pmadapter, BSSDescriptor_t * pbss_desc, * @return 0 on failure to find AES OUI, 1 on success. */ static t_u8 -is_wpa_oui_present(mlan_adapter * pmadapter, BSSDescriptor_t * pbss_desc, +is_wpa_oui_present(mlan_adapter *pmadapter, BSSDescriptor_t *pbss_desc, t_u32 cipher_suite) { t_u8 *oui = MNULL; @@ -212,7 +273,7 @@ is_wpa_oui_present(mlan_adapter * pmadapter, BSSDescriptor_t * pbss_desc, ENTER(); if (((pbss_desc->pwpa_ie) && ((*(pbss_desc->pwpa_ie)).vend_hdr.element_id == WPA_IE))) { - ie_body = (IEBody *) pbss_desc->pwpa_ie->data; + ie_body = (IEBody *)pbss_desc->pwpa_ie->data; oui = &wpa_oui[cipher_suite][0]; ret = search_oui_in_ie(pmadapter, ie_body, oui); if (ret) { @@ -239,6 +300,9 @@ wlan_is_band_compatible(t_u8 cfg_band, t_u8 scan_band) { t_u8 band; switch (scan_band) { + case BAND_A: + band = BAND_A | BAND_AN; + break; case BAND_G: default: band = BAND_B | BAND_G | BAND_GN; @@ -261,6 +325,9 @@ radio_type_to_band(t_u8 radio_type) t_u8 ret_band; switch (radio_type) { + case HostCmd_SCAN_RADIO_TYPE_A: + ret_band = BAND_A; + break; case HostCmd_SCAN_RADIO_TYPE_BG: default: ret_band = BAND_G; @@ -280,7 +347,7 @@ radio_type_to_band(t_u8 radio_type) * @return index in BSSID list */ static t_s32 -wlan_find_best_network_in_list(IN mlan_private * pmpriv) +wlan_find_best_network_in_list(IN mlan_private *pmpriv) { mlan_adapter *pmadapter = pmpriv->adapter; t_u32 mode = pmpriv->bss_mode; @@ -342,9 +409,9 @@ wlan_find_best_network_in_list(IN mlan_private * pmpriv) * @return N/A */ static t_void -wlan_scan_create_channel_list(IN mlan_private * pmpriv, - IN const wlan_user_scan_cfg * puser_scan_in, - OUT ChanScanParamSet_t * pscan_chan_list, +wlan_scan_create_channel_list(IN mlan_private *pmpriv, + IN const wlan_user_scan_cfg *puser_scan_in, + OUT ChanScanParamSet_t *pscan_chan_list, IN t_u8 filtered_scan) { mlan_adapter *pmadapter = pmpriv->adapter; @@ -382,6 +449,8 @@ wlan_scan_create_channel_list(IN mlan_private * pmpriv, if (!radio_type && (pscan_region->band != BAND_B) && (pscan_region->band != BAND_G)) continue; + if (radio_type && (pscan_region->band != BAND_A)) + continue; } if (!wlan_is_band_compatible (pmpriv->config_bands | pmadapter->adhoc_start_band, @@ -402,18 +471,30 @@ wlan_scan_create_channel_list(IN mlan_private * pmpriv, scan_type = wlan_11d_get_scan_type(pmadapter, pscan_region-> band, - (t_u8) cfp-> + (t_u8)cfp-> channel, &pmadapter-> parsed_region_chan); } switch (pscan_region->band) { + case BAND_A: + pscan_chan_list[chan_idx].radio_type = + HostCmd_SCAN_RADIO_TYPE_A; + if (!wlan_11d_is_enabled(pmpriv)) { + /* 11D not available... play it safe on + DFS channels */ + if (wlan_11h_radar_detect_required + (pmpriv, (t_u8)cfp->channel)) + scan_type = + MLAN_SCAN_TYPE_PASSIVE; + } + break; case BAND_B: case BAND_G: if (!wlan_11d_is_enabled(pmpriv)) if (wlan_bg_scan_type_is_passive - (pmpriv, (t_u8) cfp->channel)) { + (pmpriv, (t_u8)cfp->channel)) { scan_type = MLAN_SCAN_TYPE_PASSIVE; } @@ -429,7 +510,7 @@ wlan_scan_create_channel_list(IN mlan_private * pmpriv, if (puser_scan_in && puser_scan_in->chan_list[0].scan_time) { pscan_chan_list[chan_idx].max_scan_time = - wlan_cpu_to_le16((t_u16) puser_scan_in-> + wlan_cpu_to_le16((t_u16)puser_scan_in-> chan_list[0]. scan_time); } else if (scan_type == MLAN_SCAN_TYPE_PASSIVE) { @@ -455,7 +536,7 @@ wlan_scan_create_channel_list(IN mlan_private * pmpriv, } pscan_chan_list[chan_idx].chan_number = - (t_u8) cfp->channel; + (t_u8)cfp->channel; if (filtered_scan) { pscan_chan_list[chan_idx].chan_scan_mode. @@ -476,14 +557,14 @@ wlan_scan_create_channel_list(IN mlan_private * pmpriv, * @return N/A */ static void -wlan_add_wps_probe_request_ie(IN mlan_private * pmpriv, OUT t_u8 ** pptlv_out) +wlan_add_wps_probe_request_ie(IN mlan_private *pmpriv, OUT t_u8 **pptlv_out) { MrvlIEtypesHeader_t *tlv; ENTER(); if (pmpriv->wps.wps_ie.vend_hdr.len) { - tlv = (MrvlIEtypesHeader_t *) * pptlv_out; + tlv = (MrvlIEtypesHeader_t *)*pptlv_out; tlv->type = wlan_cpu_to_le16(VENDOR_SPECIFIC_221); tlv->len = wlan_cpu_to_le16(pmpriv->wps.wps_ie.vend_hdr.len); *pptlv_out += sizeof(MrvlIEtypesHeader_t); @@ -520,19 +601,19 @@ wlan_add_wps_probe_request_ie(IN mlan_private * pmpriv, OUT t_u8 ** pptlv_out) * @return MLAN_STATUS_SUCCESS or error return otherwise */ static mlan_status -wlan_scan_channel_list(IN mlan_private * pmpriv, - IN t_void * pioctl_buf, +wlan_scan_channel_list(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, IN t_u32 max_chan_per_scan, IN t_u8 filtered_scan, - OUT wlan_scan_cmd_config * pscan_cfg_out, - OUT MrvlIEtypes_ChanListParamSet_t * pchan_tlv_out, - IN ChanScanParamSet_t * pscan_chan_list) + OUT wlan_scan_cmd_config *pscan_cfg_out, + OUT MrvlIEtypes_ChanListParamSet_t *pchan_tlv_out, + IN ChanScanParamSet_t *pscan_chan_list) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_adapter *pmadapter = pmpriv->adapter; ChanScanParamSet_t *ptmp_chan_list; ChanScanParamSet_t *pstart_chan; - pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *) pioctl_buf; + pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *)pioctl_buf; t_u8 *pchan_tlv_out_temp = MNULL; t_u8 *ptlv_temp = MNULL; t_bool foundJPch14 = MFALSE; @@ -542,7 +623,7 @@ wlan_scan_channel_list(IN mlan_private * pmpriv, t_u32 done_early; t_u32 cmd_no; t_u32 first_chan = 1; - mlan_callbacks *pcb = (mlan_callbacks *) & pmadapter->callbacks; + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; ENTER(); @@ -562,15 +643,20 @@ wlan_scan_channel_list(IN mlan_private * pmpriv, return MLAN_STATUS_FAILURE; } + /* check expiry before preparing scan list - may affect blacklist */ + wlan_11h_get_csa_closed_channel(pmpriv); + pchan_tlv_out->header.type = wlan_cpu_to_le16(TLV_TYPE_CHANLIST); /* Set the temp channel struct pointer to the start of the desired list */ ptmp_chan_list = pscan_chan_list; - /* Loop through the desired channel list, sending a new firmware scan - commands for each max_chan_per_scan channels (or for 1,6,11 - individually if configured accordingly) */ + /* + * Loop through the desired channel list, sending a new firmware scan + * commands for each max_chan_per_scan channels (or for 1,6,11 + * individually if configured accordingly) + */ while (ptmp_chan_list->chan_number) { tlv_idx = 0; @@ -583,8 +669,10 @@ wlan_scan_channel_list(IN mlan_private * pmpriv, * Construct the Channel TLV for the scan command. Continue to * insert channel TLVs until: * - the tlv_idx hits the maximum configured per scan command - * - the next channel to insert is 0 (end of desired channel list) - * - done_early is set (controlling individual scanning of 1,6,11) + * - the next channel to insert is 0 (end of desired + * channel list) + * - done_early is set (controlling individual + * scanning of 1,6,11) */ while (tlv_idx < max_chan_per_scan && ptmp_chan_list->chan_number && !done_early) { @@ -649,7 +737,7 @@ wlan_scan_channel_list(IN mlan_private * pmpriv, MAX_SCAN_CFG_ALLOC - CHAN_TLV_MAX_SIZE, MLAN_MEM_DEF, - (t_u8 **) & ptlv_temp); + (t_u8 **)&ptlv_temp); if (ret != MLAN_STATUS_SUCCESS || !ptlv_temp) { PRINTM(MERROR, "Memory allocation for pscan_cfg_out failed!\n"); @@ -659,10 +747,10 @@ wlan_scan_channel_list(IN mlan_private * pmpriv, LEAVE(); return MLAN_STATUS_FAILURE; } - pchan_tlv_out_temp = (t_u8 *) pchan_tlv_out; + pchan_tlv_out_temp = (t_u8 *)pchan_tlv_out; tlv_buf_len = - (t_u32) (pchan_tlv_out_temp - - pscan_cfg_out->tlv_buf); + (t_u32)(pchan_tlv_out_temp - + pscan_cfg_out->tlv_buf); memcpy(pmadapter, ptlv_temp, ptlv_pos, tlv_buf_len); @@ -710,9 +798,9 @@ wlan_scan_channel_list(IN mlan_private * pmpriv, memmove(pmadapter, ptlv_pos + new_ratetlv_len, ptlv_pos + old_ratetlv_len, - (t_u32) (pchan_tlv_out_temp - - (ptlv_pos + - old_ratetlv_len))); + (t_u32)(pchan_tlv_out_temp - + (ptlv_pos + + old_ratetlv_len))); pchan_tlv_out = (MrvlIEtypes_ChanListParamSet_t *) @@ -739,14 +827,15 @@ wlan_scan_channel_list(IN mlan_private * pmpriv, sizeof(pchan_tlv_out->chan_scan_param); /* - * The tlv buffer length is set to the number of bytes of the - * between the channel tlv pointer and the start of the - * tlv buffer. This compensates for any TLVs that were appended - * before the channel list. + * The tlv buffer length is set to the number of + * bytes of the between the channel tlv pointer + * and the start of the tlv buffer. This + * compensates for any TLVs that were appended + * before the channel list. */ pscan_cfg_out->tlv_buf_len = - (t_u32) ((t_u8 *) pchan_tlv_out - - pscan_cfg_out->tlv_buf); + (t_u32)((t_u8 *)pchan_tlv_out - + pscan_cfg_out->tlv_buf); /* Add the size of the channel tlv header and the data length */ @@ -764,9 +853,10 @@ wlan_scan_channel_list(IN mlan_private * pmpriv, done_early = MFALSE; - /* Stop the loop if the *current* channel is in the - 1,6,11 set and we are not filtering on a BSSID or - SSID. */ + /* + * Stop the loop if the *current* channel is in the 1,6,11 set + * and we are not filtering on a BSSID or SSID. + */ if (!filtered_scan && (ptmp_chan_list->chan_number == 1 || ptmp_chan_list->chan_number == 6 || @@ -774,8 +864,10 @@ wlan_scan_channel_list(IN mlan_private * pmpriv, done_early = MTRUE; } - /* Stop the loop if the *current* channel is 14 and - region code is Japan (0x40 or 0xFF) */ + /* + * Stop the loop if the *current* channel is 14 + * and region code is Japan (0x40 or 0xFF) + */ if ((pmadapter->region_code == COUNTRY_CODE_JP_40 || pmadapter->region_code == COUNTRY_CODE_JP_FF) && (ptmp_chan_list->chan_number == 14)) { @@ -786,9 +878,11 @@ wlan_scan_channel_list(IN mlan_private * pmpriv, scanned */ ptmp_chan_list++; - /* Stop the loop if the *next* channel is in the 1,6,11 - set. This will cause it to be the only channel - scanned on the next interation */ + /* + * Stop the loop if the *next* channel is in the 1,6,11 set. + * This will cause it to be the only channel scanned on the next + * interation + */ if (!filtered_scan && (ptmp_chan_list->chan_number == 1 || ptmp_chan_list->chan_number == 6 || @@ -796,8 +890,10 @@ wlan_scan_channel_list(IN mlan_private * pmpriv, done_early = MTRUE; } - /* Stop the loop if the *next* channel is 14 and region - code is Japan (0x40 or 0xFF) */ + /* + * Stop the loop if the *next* channel is 14 + * and region code is Japan (0x40 or 0xFF) + */ if ((pmadapter->region_code == COUNTRY_CODE_JP_40 || pmadapter->region_code == COUNTRY_CODE_JP_FF) && (ptmp_chan_list->chan_number == 14)) { @@ -888,15 +984,15 @@ wlan_scan_channel_list(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_scan_setup_scan_config(IN mlan_private * pmpriv, - IN const wlan_user_scan_cfg * puser_scan_in, - OUT wlan_scan_cmd_config * pscan_cfg_out, - OUT MrvlIEtypes_ChanListParamSet_t ** - ppchan_list_out, - OUT ChanScanParamSet_t * pscan_chan_list, - OUT t_u8 * pmax_chan_per_scan, - OUT t_u8 * pfiltered_scan, - OUT t_u8 * pscan_current_only) +wlan_scan_setup_scan_config(IN mlan_private *pmpriv, + IN const wlan_user_scan_cfg *puser_scan_in, + OUT wlan_scan_cmd_config *pscan_cfg_out, + OUT MrvlIEtypes_ChanListParamSet_t + **ppchan_list_out, + OUT ChanScanParamSet_t *pscan_chan_list, + OUT t_u8 *pmax_chan_per_scan, + OUT t_u8 *pfiltered_scan, + OUT t_u8 *pscan_current_only) { mlan_adapter *pmadapter = pmpriv->adapter; mlan_status ret = MLAN_STATUS_SUCCESS; @@ -920,6 +1016,7 @@ wlan_scan_setup_scan_config(IN mlan_private * pmpriv, t_u32 rates_size; MrvlIETypes_HTCap_t *pht_cap; + MrvlIEtypes_ScanChanGap_t *pscan_gap_tlv; ENTER(); /* The tlv_buf_len is calculated for each scan command. The TLVs added @@ -949,8 +1046,8 @@ wlan_scan_setup_scan_config(IN mlan_private * pmpriv, /* Set the bss type scan filter, use Adapter setting if unset */ pscan_cfg_out->bss_mode = (puser_scan_in->bss_mode - ? (t_u8) puser_scan_in->bss_mode : - (t_u8) pmadapter->scan_mode); + ? (t_u8)puser_scan_in->bss_mode : + (t_u8)pmadapter->scan_mode); /* Set the number of probes to send, use Adapter setting if unset */ @@ -959,7 +1056,8 @@ wlan_scan_setup_scan_config(IN mlan_private * pmpriv, num_probes : pmadapter->scan_probes); /* * Set the BSSID filter to the incoming configuration, - * if non-zero. If not set, it will remain disabled (all zeros). + * if non-zero. If not set, it will remain disabled + * (all zeros). */ memcpy(pmadapter, pscan_cfg_out->specific_bssid, puser_scan_in->specific_bssid, @@ -968,7 +1066,7 @@ wlan_scan_setup_scan_config(IN mlan_private * pmpriv, if (pmadapter->ext_scan && memcmp(pmadapter, pscan_cfg_out->specific_bssid, &zero_mac, sizeof(zero_mac))) { - pbssid_tlv = (MrvlIEtypes_Bssid_List_t *) ptlv_pos; + pbssid_tlv = (MrvlIEtypes_Bssid_List_t *)ptlv_pos; pbssid_tlv->header.type = TLV_TYPE_BSSID; pbssid_tlv->header.len = MLAN_MAC_ADDR_LENGTH; memcpy(pmadapter, pbssid_tlv->bssid, @@ -989,13 +1087,13 @@ wlan_scan_setup_scan_config(IN mlan_private * pmpriv, pwildcard_ssid_tlv = - (MrvlIEtypes_WildCardSsIdParamSet_t *) ptlv_pos; + (MrvlIEtypes_WildCardSsIdParamSet_t *)ptlv_pos; pwildcard_ssid_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_WILDCARDSSID); pwildcard_ssid_tlv->header.len = - (t_u16) (ssid_len + - sizeof(pwildcard_ssid_tlv-> - max_ssid_length)); + (t_u16)(ssid_len + + sizeof(pwildcard_ssid_tlv-> + max_ssid_length)); pwildcard_ssid_tlv->max_ssid_length = puser_scan_in->ssid_list[ssid_idx].max_len; @@ -1022,9 +1120,9 @@ wlan_scan_setup_scan_config(IN mlan_private * pmpriv, /* * The default number of channels sent in the command is low to - * ensure the response buffer from the firmware does not truncate - * scan results. That is not an issue with an SSID or BSSID - * filter applied to the scan results in the firmware. + * ensure the response buffer from the firmware does not + * truncate scan results. That is not an issue with an SSID or + * BSSID filter applied to the scan results in the firmware. */ if ((ssid_idx && ssid_filter) || memcmp(pmadapter, pscan_cfg_out->specific_bssid, &zero_mac, @@ -1033,32 +1131,48 @@ wlan_scan_setup_scan_config(IN mlan_private * pmpriv, } } else { - pscan_cfg_out->bss_mode = (t_u8) pmadapter->scan_mode; + pscan_cfg_out->bss_mode = (t_u8)pmadapter->scan_mode; num_probes = pmadapter->scan_probes; } /* - * If a specific BSSID or SSID is used, the number of channels in the - * scan command will be increased to the absolute maximum. + * If a specific BSSID or SSID is used, the number of channels in + * the scan command will be increased to the absolute maximum. */ if (*pfiltered_scan) *pmax_chan_per_scan = MRVDRV_MAX_CHANNELS_PER_SPECIFIC_SCAN; else *pmax_chan_per_scan = MRVDRV_CHANNELS_PER_SCAN_CMD; + if (puser_scan_in && puser_scan_in->scan_chan_gap) { + *pmax_chan_per_scan = MRVDRV_MAX_CHANNELS_PER_SPECIFIC_SCAN; + PRINTM(MINFO, "Scan: channel gap = %d\n", + puser_scan_in->scan_chan_gap); + pscan_gap_tlv = (MrvlIEtypes_ScanChanGap_t *)ptlv_pos; + pscan_gap_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_SCAN_CHANNEL_GAP); + pscan_gap_tlv->header.len = sizeof(pscan_gap_tlv->gap); + pscan_gap_tlv->gap = + wlan_cpu_to_le16((t_u16)puser_scan_in->scan_chan_gap); + ptlv_pos += + sizeof(pscan_gap_tlv->header) + + pscan_gap_tlv->header.len; + pscan_gap_tlv->header.len = + wlan_cpu_to_le16(pscan_gap_tlv->header.len); + } /* If the input config or adapter has the number of Probes set, add tlv */ if (num_probes) { PRINTM(MINFO, "Scan: num_probes = %d\n", num_probes); - pnum_probes_tlv = (MrvlIEtypes_NumProbes_t *) ptlv_pos; + pnum_probes_tlv = (MrvlIEtypes_NumProbes_t *)ptlv_pos; pnum_probes_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_NUMPROBES); pnum_probes_tlv->header.len = sizeof(pnum_probes_tlv->num_probes); pnum_probes_tlv->num_probes = - wlan_cpu_to_le16((t_u16) num_probes); + wlan_cpu_to_le16((t_u16)num_probes); ptlv_pos += sizeof(pnum_probes_tlv->header) + @@ -1077,22 +1191,23 @@ wlan_scan_setup_scan_config(IN mlan_private * pmpriv, config_bands : pmadapter-> adhoc_start_band, rates); - prates_tlv = (MrvlIEtypes_RatesParamSet_t *) ptlv_pos; + prates_tlv = (MrvlIEtypes_RatesParamSet_t *)ptlv_pos; prates_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_RATES); - prates_tlv->header.len = wlan_cpu_to_le16((t_u16) rates_size); + prates_tlv->header.len = wlan_cpu_to_le16((t_u16)rates_size); memcpy(pmadapter, prates_tlv->rates, rates, rates_size); ptlv_pos += sizeof(prates_tlv->header) + rates_size; PRINTM(MINFO, "SCAN_CMD: Rates size = %d\n", rates_size); if (ISSUPP_11NENABLED(pmpriv->adapter->fw_cap_info) - && (pmpriv->config_bands & BAND_GN)) { - pht_cap = (MrvlIETypes_HTCap_t *) ptlv_pos; + && (pmpriv->config_bands & BAND_GN + || pmpriv->config_bands & BAND_AN)) { + pht_cap = (MrvlIETypes_HTCap_t *)ptlv_pos; memset(pmadapter, pht_cap, 0, sizeof(MrvlIETypes_HTCap_t)); pht_cap->header.type = wlan_cpu_to_le16(HT_CAPABILITY); pht_cap->header.len = sizeof(HTCap_t); wlan_fill_ht_cap_tlv(pmpriv, pht_cap, pmpriv->config_bands); - HEXDUMP("SCAN: HT_CAPABILITIES IE", (t_u8 *) pht_cap, + HEXDUMP("SCAN: HT_CAPABILITIES IE", (t_u8 *)pht_cap, sizeof(MrvlIETypes_HTCap_t)); ptlv_pos += sizeof(MrvlIETypes_HTCap_t); pht_cap->header.len = wlan_cpu_to_le16(pht_cap->header.len); @@ -1105,10 +1220,10 @@ wlan_scan_setup_scan_config(IN mlan_private * pmpriv, /* * Set the output for the channel TLV to the address in the tlv buffer * past any TLVs that were added in this function (SSID, num_probes). - * Channel TLVs will be added past this for each scan command, preserving - * the TLVs that were previously added. + * Channel TLVs will be added past this for each scan command, + * preserving the TLVs that were previously added. */ - *ppchan_list_out = (MrvlIEtypes_ChanListParamSet_t *) ptlv_pos; + *ppchan_list_out = (MrvlIEtypes_ChanListParamSet_t *)ptlv_pos; if (puser_scan_in && puser_scan_in->chan_list[0].chan_number) { @@ -1133,14 +1248,28 @@ wlan_scan_setup_scan_config(IN mlan_private * pmpriv, scan_type = pmadapter->scan_type; if (radio_type == HostCmd_SCAN_RADIO_TYPE_A) { - PRINTM(MERROR, - "Scan in A band is not allowed!!\n"); - ret = MLAN_STATUS_FAILURE; - LEAVE(); - return ret; + if (pmadapter->fw_bands & BAND_A) + PRINTM(MINFO, + "UserScan request for A Band channel %d!!\n", + channel); + else { + PRINTM(MERROR, + "Scan in A band is not allowed!!\n"); + ret = MLAN_STATUS_FAILURE; + LEAVE(); + return ret; + } } + /* Prevent active scanning on a radar controlled + channel */ + if (radio_type == HostCmd_SCAN_RADIO_TYPE_A) { + if (wlan_11h_radar_detect_required + (pmpriv, channel)) { + scan_type = MLAN_SCAN_TYPE_PASSIVE; + } + } if (radio_type == HostCmd_SCAN_RADIO_TYPE_BG) { if (wlan_bg_scan_type_is_passive (pmpriv, channel)) { @@ -1158,7 +1287,7 @@ wlan_scan_setup_scan_config(IN mlan_private * pmpriv, if (puser_scan_in->chan_list[chan_idx].scan_time) { scan_dur = - (t_u16) puser_scan_in-> + (t_u16)puser_scan_in-> chan_list[chan_idx].scan_time; } else { if (scan_type == MLAN_SCAN_TYPE_PASSIVE) { @@ -1170,7 +1299,10 @@ wlan_scan_setup_scan_config(IN mlan_private * pmpriv, scan_dur = pmadapter->active_scan_time; } } - + if (pmadapter->coex_scan && + pmadapter->coex_min_scan_time && + (pmadapter->coex_min_scan_time > scan_dur)) + scan_dur = pmadapter->coex_min_scan_time; (pscan_chan_list + chan_idx)->min_scan_time = wlan_cpu_to_le16(scan_dur); (pscan_chan_list + chan_idx)->max_scan_time = @@ -1217,10 +1349,10 @@ wlan_scan_setup_scan_config(IN mlan_private * pmpriv, */ static t_void wlan_ret_802_11_scan_get_tlv_ptrs(IN pmlan_adapter pmadapter, - IN MrvlIEtypes_Data_t * ptlv, + IN MrvlIEtypes_Data_t *ptlv, IN t_u32 tlv_buf_size, IN t_u32 req_tlv_type, - OUT MrvlIEtypes_Data_t ** pptlv) + OUT MrvlIEtypes_Data_t **pptlv) { MrvlIEtypes_Data_t *pcurrent_tlv; t_u32 tlv_buf_left; @@ -1251,13 +1383,19 @@ wlan_ret_802_11_scan_get_tlv_ptrs(IN pmlan_adapter pmadapter, PRINTM(MINFO, "SCAN_RESP: TSF Timestamp TLV, len = %d\n", tlv_len); - *pptlv = (MrvlIEtypes_Data_t *) pcurrent_tlv; + *pptlv = (MrvlIEtypes_Data_t *)pcurrent_tlv; break; case TLV_TYPE_CHANNELBANDLIST: PRINTM(MINFO, "SCAN_RESP: CHANNEL BAND LIST TLV, len = %d\n", tlv_len); - *pptlv = (MrvlIEtypes_Data_t *) pcurrent_tlv; + *pptlv = (MrvlIEtypes_Data_t *)pcurrent_tlv; + break; + case TLV_TYPE_CHANNEL_STATS: + PRINTM(MINFO, + "SCAN_RESP: CHANNEL STATS TLV, len = %d\n", + tlv_len); + *pptlv = (MrvlIEtypes_Data_t *)pcurrent_tlv; break; default: PRINTM(MERROR, @@ -1277,7 +1415,7 @@ wlan_ret_802_11_scan_get_tlv_ptrs(IN pmlan_adapter pmadapter, tlv_buf_left -= (sizeof(ptlv->header) + tlv_len); pcurrent_tlv = - (MrvlIEtypes_Data_t *) (pcurrent_tlv->data + tlv_len); + (MrvlIEtypes_Data_t *)(pcurrent_tlv->data + tlv_len); } /* while */ @@ -1301,9 +1439,9 @@ wlan_ret_802_11_scan_get_tlv_ptrs(IN pmlan_adapter pmadapter, */ static mlan_status wlan_interpret_bss_desc_with_ie(IN pmlan_adapter pmadapter, - OUT BSSDescriptor_t * pbss_entry, - IN t_u8 ** pbeacon_info, - IN t_u32 * bytes_left, IN t_u8 ext_scan) + OUT BSSDescriptor_t *pbss_entry, + IN t_u8 **pbeacon_info, + IN t_u32 *bytes_left, IN t_u8 ext_scan) { mlan_status ret = MLAN_STATUS_SUCCESS; IEEEtypes_ElementId_e element_id; @@ -1327,6 +1465,7 @@ wlan_interpret_bss_desc_with_ie(IN pmlan_adapter pmadapter, IEEEtypes_VendorSpecific_t *pvendor_ie; const t_u8 wpa_oui[4] = { 0x00, 0x50, 0xf2, 0x01 }; const t_u8 wmm_oui[4] = { 0x00, 0x50, 0xf2, 0x02 }; + const t_u8 osen_oui[] = { 0x50, 0x6f, 0x9a, 0x12 }; IEEEtypes_CountryInfoSet_t *pcountry_info; @@ -1386,7 +1525,7 @@ wlan_interpret_bss_desc_with_ie(IN pmlan_adapter pmadapter, */ if (!ext_scan) { /* RSSI is 1 byte long */ - pbss_entry->rssi = (t_s32) (*pcurrent_ptr); + pbss_entry->rssi = (t_s32)(*pcurrent_ptr); PRINTM(MINFO, "InterpretIE: RSSI=%02X\n", *pcurrent_ptr); pcurrent_ptr += 1; bytes_left_for_current_beacon -= 1; @@ -1417,7 +1556,7 @@ wlan_interpret_bss_desc_with_ie(IN pmlan_adapter pmadapter, PRINTM(MINFO, "InterpretIE: fixed_ie.capabilities=0x%X\n", fixed_ie.capabilities); fixed_ie.capabilities = wlan_le16_to_cpu(fixed_ie.capabilities); - pcap_info = (IEEEtypes_CapInfo_t *) & fixed_ie.capabilities; + pcap_info = (IEEEtypes_CapInfo_t *)&fixed_ie.capabilities; memcpy(pmadapter, &pbss_entry->cap_info, pcap_info, sizeof(IEEEtypes_CapInfo_t)); pcurrent_ptr += 2; @@ -1427,7 +1566,7 @@ wlan_interpret_bss_desc_with_ie(IN pmlan_adapter pmadapter, PRINTM(MINFO, "InterpretIE: IELength for this AP = %d\n", bytes_left_for_current_beacon); - HEXDUMP("InterpretIE: IE info", (t_u8 *) pcurrent_ptr, + HEXDUMP("InterpretIE: IE info", (t_u8 *)pcurrent_ptr, bytes_left_for_current_beacon); if (pcap_info->privacy) { @@ -1442,10 +1581,16 @@ wlan_interpret_bss_desc_with_ie(IN pmlan_adapter pmadapter, else pbss_entry->bss_mode = MLAN_BSS_MODE_INFRA; + if (pcap_info->spectrum_mgmt == 1) { + PRINTM(MINFO, "InterpretIE: 11h- Spectrum Management " + "capability bit found\n"); + pbss_entry->wlan_11h_bss_info.sensed_11h = 1; + } + /* Process variable IE */ while (bytes_left_for_current_beacon >= 2) { - element_id = (IEEEtypes_ElementId_e) (*((t_u8 *) pcurrent_ptr)); - element_len = *((t_u8 *) pcurrent_ptr + 1); + element_id = (IEEEtypes_ElementId_e)(*((t_u8 *)pcurrent_ptr)); + element_len = *((t_u8 *)pcurrent_ptr + 1); total_ie_len = element_len + sizeof(IEEEtypes_Header_t); if (bytes_left_for_current_beacon < total_ie_len) { @@ -1487,7 +1632,7 @@ wlan_interpret_bss_desc_with_ie(IN pmlan_adapter pmadapter, break; case FH_PARAM_SET: - pfh_param_set = (IEEEtypes_FhParamSet_t *) pcurrent_ptr; + pfh_param_set = (IEEEtypes_FhParamSet_t *)pcurrent_ptr; pbss_entry->network_type_use = Wlan802_11FH; memcpy(pmadapter, &pbss_entry->phy_param_set.fh_param_set, @@ -1504,7 +1649,7 @@ wlan_interpret_bss_desc_with_ie(IN pmlan_adapter pmadapter, break; case DS_PARAM_SET: - pds_param_set = (IEEEtypes_DsParamSet_t *) pcurrent_ptr; + pds_param_set = (IEEEtypes_DsParamSet_t *)pcurrent_ptr; pbss_entry->network_type_use = Wlan802_11DS; pbss_entry->channel = pds_param_set->current_chan; @@ -1521,7 +1666,7 @@ wlan_interpret_bss_desc_with_ie(IN pmlan_adapter pmadapter, break; case CF_PARAM_SET: - pcf_param_set = (IEEEtypes_CfParamSet_t *) pcurrent_ptr; + pcf_param_set = (IEEEtypes_CfParamSet_t *)pcurrent_ptr; memcpy(pmadapter, &pbss_entry->ss_param_set.cf_param_set, pcf_param_set, MIN(total_ie_len, @@ -1535,7 +1680,7 @@ wlan_interpret_bss_desc_with_ie(IN pmlan_adapter pmadapter, case IBSS_PARAM_SET: pibss_param_set = - (IEEEtypes_IbssParamSet_t *) pcurrent_ptr; + (IEEEtypes_IbssParamSet_t *)pcurrent_ptr; pbss_entry->atim_window = wlan_le16_to_cpu(pibss_param_set->atim_window); memcpy(pmadapter, @@ -1552,7 +1697,7 @@ wlan_interpret_bss_desc_with_ie(IN pmlan_adapter pmadapter, /* Handle Country Info IE */ case COUNTRY_INFO: pcountry_info = - (IEEEtypes_CountryInfoSet_t *) pcurrent_ptr; + (IEEEtypes_CountryInfoSet_t *)pcurrent_ptr; if (pcountry_info->len < sizeof(pcountry_info->country_code) || @@ -1571,15 +1716,28 @@ wlan_interpret_bss_desc_with_ie(IN pmlan_adapter pmadapter, memcpy(pmadapter, &pbss_entry->country_info, pcountry_info, pcountry_info->len + 2); HEXDUMP("InterpretIE: 11D- country_info:", - (t_u8 *) pcountry_info, - (t_u32) (pcountry_info->len + 2)); + (t_u8 *)pcountry_info, + (t_u32)(pcountry_info->len + 2)); break; case ERP_INFO: - perp_info = (IEEEtypes_ERPInfo_t *) pcurrent_ptr; + perp_info = (IEEEtypes_ERPInfo_t *)pcurrent_ptr; pbss_entry->erp_flags = perp_info->erp_flags; break; + case POWER_CONSTRAINT: + case POWER_CAPABILITY: + case TPC_REPORT: + case CHANNEL_SWITCH_ANN: + case QUIET: + case IBSS_DFS: + case SUPPORTED_CHANNELS: + case TPC_REQUEST: + wlan_11h_process_bss_elem(pmadapter, + &pbss_entry-> + wlan_11h_bss_info, + pcurrent_ptr); + break; case EXTENDED_SUPPORTED_RATES: /* * Only process extended supported rate @@ -1597,12 +1755,12 @@ wlan_interpret_bss_desc_with_ie(IN pmlan_adapter pmadapter, bytes_to_copy = element_len; } - prate = (t_u8 *) pbss_entry->data_rates; + prate = (t_u8 *)pbss_entry->data_rates; prate += rate_size; memcpy(pmadapter, prate, pcurrent_ptr + 2, bytes_to_copy); - prate = (t_u8 *) pbss_entry->supported_rates; + prate = (t_u8 *)pbss_entry->supported_rates; prate += rate_size; memcpy(pmadapter, prate, pcurrent_ptr + 2, bytes_to_copy); @@ -1613,8 +1771,7 @@ wlan_interpret_bss_desc_with_ie(IN pmlan_adapter pmadapter, break; case VENDOR_SPECIFIC_221: - pvendor_ie = - (IEEEtypes_VendorSpecific_t *) pcurrent_ptr; + pvendor_ie = (IEEEtypes_VendorSpecific_t *)pcurrent_ptr; if (!memcmp (pmadapter, pvendor_ie->vend_hdr.oui, wpa_oui, @@ -1623,10 +1780,10 @@ wlan_interpret_bss_desc_with_ie(IN pmlan_adapter pmadapter, (IEEEtypes_VendorSpecific_t *) pcurrent_ptr; pbss_entry->wpa_offset = - (t_u16) (pcurrent_ptr - - pbss_entry->pbeacon_buf); + (t_u16)(pcurrent_ptr - + pbss_entry->pbeacon_buf); HEXDUMP("InterpretIE: Resp WPA_IE", - (t_u8 *) pbss_entry->pwpa_ie, + (t_u8 *)pbss_entry->pwpa_ie, ((*(pbss_entry->pwpa_ie)).vend_hdr.len + sizeof(IEEEtypes_Header_t))); } else if (!memcmp @@ -1638,94 +1795,96 @@ wlan_interpret_bss_desc_with_ie(IN pmlan_adapter pmadapter, sizeof(IEEEtypes_WmmInfo_t)) { /* - * Only accept and copy the WMM IE if it matches - * the size expected for the WMM Info IE or the - * WMM Parameter IE. + * Only accept and copy the WMM IE if + * it matches the size expected for the + * WMM Info IE or the WMM Parameter IE. */ memcpy(pmadapter, - (t_u8 *) & pbss_entry->wmm_ie, + (t_u8 *)&pbss_entry->wmm_ie, pcurrent_ptr, total_ie_len); HEXDUMP("InterpretIE: Resp WMM_IE", - (t_u8 *) & pbss_entry->wmm_ie, + (t_u8 *)&pbss_entry->wmm_ie, total_ie_len); } + } else if (!memcmp(pmadapter, pvendor_ie->vend_hdr.oui, + osen_oui, sizeof(osen_oui))) { + pbss_entry->posen_ie = + (IEEEtypes_Generic_t *)pcurrent_ptr; + pbss_entry->osen_offset = + (t_u16)(pcurrent_ptr - + pbss_entry->pbeacon_buf); + HEXDUMP("InterpretIE: Resp OSEN_IE", + (t_u8 *)pbss_entry->posen_ie, + (*(pbss_entry->posen_ie)).ieee_hdr.len + + sizeof(IEEEtypes_Header_t)); } break; case RSN_IE: pbss_entry->prsn_ie = - (IEEEtypes_Generic_t *) pcurrent_ptr; + (IEEEtypes_Generic_t *)pcurrent_ptr; pbss_entry->rsn_offset = - (t_u16) (pcurrent_ptr - - pbss_entry->pbeacon_buf); + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); HEXDUMP("InterpretIE: Resp RSN_IE", - (t_u8 *) pbss_entry->prsn_ie, + (t_u8 *)pbss_entry->prsn_ie, (*(pbss_entry->prsn_ie)).ieee_hdr.len + sizeof(IEEEtypes_Header_t)); break; case WAPI_IE: pbss_entry->pwapi_ie = - (IEEEtypes_Generic_t *) pcurrent_ptr; + (IEEEtypes_Generic_t *)pcurrent_ptr; pbss_entry->wapi_offset = - (t_u16) (pcurrent_ptr - - pbss_entry->pbeacon_buf); + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); HEXDUMP("InterpretIE: Resp WAPI_IE", - (t_u8 *) pbss_entry->pwapi_ie, + (t_u8 *)pbss_entry->pwapi_ie, (*(pbss_entry->pwapi_ie)).ieee_hdr.len + sizeof(IEEEtypes_Header_t)); break; case HT_CAPABILITY: - pbss_entry->pht_cap = - (IEEEtypes_HTCap_t *) pcurrent_ptr; + pbss_entry->pht_cap = (IEEEtypes_HTCap_t *)pcurrent_ptr; pbss_entry->ht_cap_offset = - (t_u16) (pcurrent_ptr - - pbss_entry->pbeacon_buf); + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); HEXDUMP("InterpretIE: Resp HTCAP_IE", - (t_u8 *) pbss_entry->pht_cap, + (t_u8 *)pbss_entry->pht_cap, (*(pbss_entry->pht_cap)).ieee_hdr.len + sizeof(IEEEtypes_Header_t)); break; case HT_OPERATION: pbss_entry->pht_info = - (IEEEtypes_HTInfo_t *) pcurrent_ptr; + (IEEEtypes_HTInfo_t *)pcurrent_ptr; pbss_entry->ht_info_offset = - (t_u16) (pcurrent_ptr - - pbss_entry->pbeacon_buf); + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); HEXDUMP("InterpretIE: Resp HTINFO_IE", - (t_u8 *) pbss_entry->pht_info, + (t_u8 *)pbss_entry->pht_info, (*(pbss_entry->pht_info)).ieee_hdr.len + sizeof(IEEEtypes_Header_t)); break; case BSSCO_2040: pbss_entry->pbss_co_2040 = - (IEEEtypes_2040BSSCo_t *) pcurrent_ptr; + (IEEEtypes_2040BSSCo_t *)pcurrent_ptr; pbss_entry->bss_co_2040_offset = - (t_u16) (pcurrent_ptr - - pbss_entry->pbeacon_buf); + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); HEXDUMP("InterpretIE: Resp 2040BSSCOEXISTANCE_IE", - (t_u8 *) pbss_entry->pbss_co_2040, + (t_u8 *)pbss_entry->pbss_co_2040, (*(pbss_entry->pbss_co_2040)).ieee_hdr.len + sizeof(IEEEtypes_Header_t)); break; case EXT_CAPABILITY: pbss_entry->pext_cap = - (IEEEtypes_ExtCap_t *) pcurrent_ptr; + (IEEEtypes_ExtCap_t *)pcurrent_ptr; pbss_entry->ext_cap_offset = - (t_u16) (pcurrent_ptr - - pbss_entry->pbeacon_buf); + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); HEXDUMP("InterpretIE: Resp EXTCAP_IE", - (t_u8 *) pbss_entry->pext_cap, + (t_u8 *)pbss_entry->pext_cap, (*(pbss_entry->pext_cap)).ieee_hdr.len + sizeof(IEEEtypes_Header_t)); break; case OVERLAPBSSSCANPARAM: pbss_entry->poverlap_bss_scan_param = - (IEEEtypes_OverlapBSSScanParam_t *) - pcurrent_ptr; + (IEEEtypes_OverlapBSSScanParam_t *)pcurrent_ptr; pbss_entry->overlap_bss_offset = - (t_u16) (pcurrent_ptr - - pbss_entry->pbeacon_buf); + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); HEXDUMP("InterpretIE: Resp OBSS_IE", - (t_u8 *) pbss_entry->poverlap_bss_scan_param, + (t_u8 *)pbss_entry->poverlap_bss_scan_param, (*(pbss_entry->poverlap_bss_scan_param)). ieee_hdr.len + sizeof(IEEEtypes_Header_t)); break; @@ -1753,8 +1912,8 @@ wlan_interpret_bss_desc_with_ie(IN pmlan_adapter pmadapter, * @return N/A */ static t_void -wlan_adjust_ie_in_bss_entry(IN mlan_private * pmpriv, - IN BSSDescriptor_t * pbss_entry) +wlan_adjust_ie_in_bss_entry(IN mlan_private *pmpriv, + IN BSSDescriptor_t *pbss_entry) { ENTER(); if (pbss_entry->pbeacon_buf) { @@ -1773,6 +1932,11 @@ wlan_adjust_ie_in_bss_entry(IN mlan_private * pmpriv, (pbss_entry->pbeacon_buf + pbss_entry->wapi_offset); } + if (pbss_entry->posen_ie) { + pbss_entry->posen_ie = (IEEEtypes_Generic_t *) + (pbss_entry->pbeacon_buf + + pbss_entry->osen_offset); + } if (pbss_entry->pht_cap) { pbss_entry->pht_cap = (IEEEtypes_HTCap_t *) (pbss_entry->pbeacon_buf + @@ -1806,6 +1970,8 @@ wlan_adjust_ie_in_bss_entry(IN mlan_private * pmpriv, pbss_entry->rsn_offset = 0; pbss_entry->pwapi_ie = MNULL; pbss_entry->wapi_offset = 0; + pbss_entry->posen_ie = MNULL; + pbss_entry->osen_offset = 0; pbss_entry->pht_cap = MNULL; pbss_entry->ht_cap_offset = 0; pbss_entry->pht_info = MNULL; @@ -1847,10 +2013,10 @@ wlan_adjust_ie_in_bss_entry(IN mlan_private * pmpriv, * @return N/A */ static t_void -wlan_ret_802_11_scan_store_beacon(IN mlan_private * pmpriv, +wlan_ret_802_11_scan_store_beacon(IN mlan_private *pmpriv, IN t_u32 beacon_idx, IN t_u32 num_of_ent, - IN BSSDescriptor_t * pnew_beacon) + IN BSSDescriptor_t *pnew_beacon) { mlan_adapter *pmadapter = pmpriv->adapter; t_u8 *pbcn_store; @@ -1898,17 +2064,19 @@ wlan_ret_802_11_scan_store_beacon(IN mlan_private * pmpriv, new_bcn_size); /* - * If the old beacon size was less than the maximum - * we had allotted for the entry, and the new entry - * is even smaller, reset the max size to the old beacon - * entry and compress the storage space (leaving a new - * pad space of (old_bcn_size - new_bcn_size). + * If the old beacon size was less than the + * maximum we had allotted for the entry, and + * the new entry is even smaller, reset the + * max size to the old beacon entry and compress + * the storage space (leaving a new pad space of + * (old_bcn_size - new_bcn_size). */ if (old_bcn_size < bcn_space && new_bcn_size <= old_bcn_size) { /* - * Old Beacon size is smaller than the allotted storage size. - * Shrink the allotted storage space. + * Old Beacon size is smaller than the + * allotted storage size. Shrink the + * allotted storage space. */ PRINTM(MINFO, "AppControl: Smaller Duplicate Beacon (%d), " @@ -1920,32 +2088,34 @@ wlan_ret_802_11_scan_store_beacon(IN mlan_private * pmpriv, pmadapter->bcn_buf))); /* - * memmove (since the memory overlaps) the data - * after the beacon we just stored to the end of - * the current beacon. This cleans up any unused - * space the old larger beacon was using in the buffer + * memmove (since the memory overlaps) the data + * after the beacon we just stored to the end + * of the current beacon. This cleans up any + * unused space the old larger beacon was using + * in the buffer */ memmove(pmadapter, - (void *)((t_ptr) pbcn_store + - (t_ptr) old_bcn_size), - (void *)((t_ptr) pbcn_store + - (t_ptr) bcn_space), - (t_u32) ((t_ptr) pmadapter-> - pbcn_buf_end - - ((t_ptr) pbcn_store + - (t_ptr) bcn_space))); + (void *)((t_ptr)pbcn_store + + (t_ptr)old_bcn_size), + (void *)((t_ptr)pbcn_store + + (t_ptr)bcn_space), + (t_u32)((t_ptr)pmadapter->pbcn_buf_end - + ((t_ptr)pbcn_store + + (t_ptr)bcn_space))); /* - * Decrement the end pointer by the difference between - * the old larger size and the new smaller size since - * we are using less space due to the new beacon being - * smaller + * Decrement the end pointer by the difference + * between the old larger size and the new + * smaller size since we are using less space + * due to the new beacon being smaller */ pmadapter->pbcn_buf_end -= (bcn_space - old_bcn_size); - /* Set the maximum storage size to the old - beacon size */ + /* + * Set the maximum storage size to the old + * beacon size + */ pnew_beacon->beacon_buf_size_max = old_bcn_size; /* Adjust beacon buffer pointers that are past @@ -1968,9 +2138,9 @@ wlan_ret_802_11_scan_store_beacon(IN mlan_private * pmpriv, } else if (pmadapter->pbcn_buf_end + (new_bcn_size - bcn_space) < (pmadapter->bcn_buf + pmadapter->bcn_buf_size)) { /* - * Beacon is larger than space previously allocated (bcn_space) - * and there is enough space left in the beaconBuffer to store - * the additional data + * Beacon is larger than space previously allocated + * (bcn_space) and there is enough space left in the + * beaconBuffer to store the additional data */ PRINTM(MINFO, "AppControl: Larger Duplicate Beacon (%d), " @@ -1990,20 +2160,21 @@ wlan_ret_802_11_scan_store_beacon(IN mlan_private * pmpriv, * about to copy in. */ memmove(pmadapter, - (void *)((t_ptr) pbcn_store + - (t_ptr) new_bcn_size), - (void *)((t_ptr) pbcn_store + - (t_ptr) bcn_space), - (t_u32) ((t_ptr) pmadapter->pbcn_buf_end - - ((t_ptr) pbcn_store + - (t_ptr) bcn_space))); + (void *)((t_ptr)pbcn_store + + (t_ptr)new_bcn_size), + (void *)((t_ptr)pbcn_store + (t_ptr)bcn_space), + (t_u32)((t_ptr)pmadapter->pbcn_buf_end - + ((t_ptr)pbcn_store + + (t_ptr)bcn_space))); /* Copy the new beacon buffer entry over the old one */ memcpy(pmadapter, pbcn_store, pnew_beacon->pbeacon_buf, new_bcn_size); - /* Move the beacon end pointer by the amount of new - beacon data we are adding */ + /* + * Move the beacon end pointer by the amount of new + * beacon data we are adding + */ pmadapter->pbcn_buf_end += (new_bcn_size - bcn_space); /* @@ -2029,8 +2200,9 @@ wlan_ret_802_11_scan_store_beacon(IN mlan_private * pmpriv, } } else { /* - * Beacon is larger than the previously allocated space, but - * there is not enough free space to store the additional data + * Beacon is larger than the previously allocated + * space, but there is not enough free space to + * store the additional data */ PRINTM(MERROR, "AppControl: Failed: Larger Duplicate Beacon (%d)," @@ -2055,6 +2227,10 @@ wlan_ret_802_11_scan_store_beacon(IN mlan_private * pmpriv, pnew_beacon->wapi_offset = pmadapter->pscan_table[beacon_idx]. wapi_offset; + if (pnew_beacon->posen_ie) + pnew_beacon->osen_offset = + pmadapter->pscan_table[beacon_idx]. + osen_offset; if (pnew_beacon->pht_cap) pnew_beacon->ht_cap_offset = pmadapter->pscan_table[beacon_idx]. @@ -2091,14 +2267,14 @@ wlan_ret_802_11_scan_store_beacon(IN mlan_private * pmpriv, moal_vmalloc(pmadapter->pmoal_handle, pmadapter->bcn_buf_size + DEFAULT_SCAN_BEACON_BUFFER, - (t_u8 **) & tmp_buf); + (t_u8 **)&tmp_buf); else ret = pmadapter->callbacks. moal_malloc(pmadapter->pmoal_handle, pmadapter->bcn_buf_size + DEFAULT_SCAN_BEACON_BUFFER, MLAN_MEM_DEF, - (t_u8 **) & tmp_buf); + (t_u8 **)&tmp_buf); if ((ret == MLAN_STATUS_SUCCESS) && (tmp_buf)) { PRINTM(MCMND, @@ -2133,13 +2309,13 @@ wlan_ret_802_11_scan_store_beacon(IN mlan_private * pmpriv, pmadapter->callbacks. moal_vfree(pmadapter-> pmoal_handle, - (t_u8 *) pmadapter-> + (t_u8 *)pmadapter-> bcn_buf); else pmadapter->callbacks. moal_mfree(pmadapter-> pmoal_handle, - (t_u8 *) pmadapter-> + (t_u8 *)pmadapter-> bcn_buf); pmadapter->bcn_buf = tmp_buf; pmadapter->bcn_buf_size += @@ -2155,16 +2331,19 @@ wlan_ret_802_11_scan_store_beacon(IN mlan_private * pmpriv, pmadapter->bcn_buf_size)) { /* - * Copy the beacon buffer data from the local entry to the - * adapter dev struct buffer space used to store the raw - * beacon data for each entry in the scan table + * Copy the beacon buffer data from the local entry + * to the adapter dev struct buffer space used to + * store the raw beacon data for each entry in the + * scan table */ memcpy(pmadapter, pmadapter->pbcn_buf_end, pnew_beacon->pbeacon_buf, pnew_beacon->beacon_buf_size); - /* Update the beacon ptr to point to the table save - area */ + /* + * Update the beacon ptr to point to the table + * save area + */ pnew_beacon->pbeacon_buf = pmadapter->pbcn_buf_end; pnew_beacon->beacon_buf_size_max = (pnew_beacon->beacon_buf_size + @@ -2196,7 +2375,10 @@ wlan_ret_802_11_scan_store_beacon(IN mlan_private * pmpriv, (pmadapter->pbcn_buf_end - pmadapter->bcn_buf))); - /* Storage failure; clear storage records for this bcn */ + /* + * Storage failure; clear storage records + * for this bcn + */ pnew_beacon->pbeacon_buf = MNULL; pnew_beacon->beacon_buf_size = 0; pnew_beacon->beacon_buf_size_max = 0; @@ -2208,34 +2390,24 @@ wlan_ret_802_11_scan_store_beacon(IN mlan_private * pmpriv, } /** - * @brief Restore a beacon buffer of the current bss descriptor + * @brief update beacon buffer of the current bss descriptor * * @param pmpriv A pointer to mlan_private structure * - * @return N/A + * @return MLAN_STATUS_SUCCESS, otherwise failure */ -static t_void -wlan_restore_curr_bcn(IN mlan_private * pmpriv) +static mlan_status +wlan_update_curr_bcn(IN mlan_private *pmpriv) { - mlan_adapter *pmadapter = pmpriv->adapter; - mlan_callbacks *pcb = (pmlan_callbacks) & pmadapter->callbacks; BSSDescriptor_t *pcurr_bss = &pmpriv->curr_bss_params.bss_descriptor; + mlan_status ret = MLAN_STATUS_SUCCESS; ENTER(); - if (pmpriv->pcurr_bcn_buf && - ((pmadapter->pbcn_buf_end + pmpriv->curr_bcn_size) < - (pmadapter->bcn_buf + pmadapter->bcn_buf_size))) { - - pcb->moal_spin_lock(pmadapter->pmoal_handle, - pmpriv->curr_bcn_buf_lock); - - /* restore the current beacon buffer */ - memcpy(pmadapter, pmadapter->pbcn_buf_end, - pmpriv->pcurr_bcn_buf, pmpriv->curr_bcn_size); - pcurr_bss->pbeacon_buf = pmadapter->pbcn_buf_end; + if (pmpriv->pcurr_bcn_buf && pmpriv->curr_bcn_size) { + pcurr_bss->pbeacon_buf = pmpriv->pcurr_bcn_buf; pcurr_bss->beacon_buf_size = pmpriv->curr_bcn_size; - pmadapter->pbcn_buf_end += pmpriv->curr_bcn_size; + pcurr_bss->beacon_buf_size_max = pmpriv->curr_bcn_size; /* adjust the pointers in the current bss descriptor */ if (pcurr_bss->pwpa_ie) { @@ -2279,17 +2451,15 @@ wlan_restore_curr_bcn(IN mlan_private * pmpriv) pcurr_bss->overlap_bss_offset); } - pcb->moal_spin_unlock(pmadapter->pmoal_handle, - pmpriv->curr_bcn_buf_lock); - PRINTM(MINFO, "current beacon restored %d\n", pmpriv->curr_bcn_size); } else { - PRINTM(MWARN, - "curr_bcn_buf not saved or bcn_buf has no space\n"); + PRINTM(MERROR, "curr_bcn_buf not saved\n"); + ret = MLAN_STATUS_FAILURE; } LEAVE(); + return ret; } /** @@ -2307,7 +2477,7 @@ wlan_restore_curr_bcn(IN mlan_private * pmpriv) * @return N/A */ static t_void -wlan_scan_process_results(IN mlan_private * pmpriv) +wlan_scan_process_results(IN mlan_private *pmpriv) { mlan_adapter *pmadapter = pmpriv->adapter; t_s32 j; @@ -2335,6 +2505,8 @@ wlan_scan_process_results(IN mlan_private * pmpriv) pmpriv->curr_bss_params.bss_descriptor.rsn_offset = 0; pmpriv->curr_bss_params.bss_descriptor.pwapi_ie = MNULL; pmpriv->curr_bss_params.bss_descriptor.wapi_offset = 0; + pmpriv->curr_bss_params.bss_descriptor.posen_ie = MNULL; + pmpriv->curr_bss_params.bss_descriptor.osen_offset = 0; pmpriv->curr_bss_params.bss_descriptor.pht_cap = MNULL; pmpriv->curr_bss_params.bss_descriptor.ht_cap_offset = 0; @@ -2368,14 +2540,13 @@ wlan_scan_process_results(IN mlan_private * pmpriv) &pmadapter->pscan_table[j], sizeof(pmpriv->curr_bss_params.bss_descriptor)); - wlan_save_curr_bcn(pmpriv); pmadapter->callbacks.moal_spin_unlock(pmadapter-> pmoal_handle, pmpriv-> curr_bcn_buf_lock); + wlan_save_curr_bcn(pmpriv); } else { - wlan_restore_curr_bcn(pmpriv); - /** append current AP to the end of scan table */ + // Apend to the end of scan table. if (pmadapter->num_in_scan_table < MRVDRV_MAX_BSSID_LIST) pmadapter->num_in_scan_table++; @@ -2393,7 +2564,7 @@ wlan_scan_process_results(IN mlan_private * pmpriv) "RSSI[%03d], SSID[%s]\n", i, MAC2STR(pmadapter->pscan_table[i].mac_address), - (t_s32) pmadapter->pscan_table[i].rssi, + (t_s32)pmadapter->pscan_table[i].rssi, pmadapter->pscan_table[i].ssid.ssid); /* @@ -2421,7 +2592,7 @@ wlan_scan_process_results(IN mlan_private * pmpriv) * @pre table_idx must be an index to a valid entry */ static t_void -wlan_scan_delete_table_entry(IN mlan_private * pmpriv, IN t_s32 table_idx) +wlan_scan_delete_table_entry(IN mlan_private *pmpriv, IN t_s32 table_idx) { mlan_adapter *pmadapter = pmpriv->adapter; t_u32 del_idx; @@ -2447,8 +2618,8 @@ wlan_scan_delete_table_entry(IN mlan_private * pmpriv, IN t_s32 table_idx) pbeacon_buf = pmadapter->pscan_table[table_idx].pbeacon_buf; /* - * Remove the entry's buffer space, decrement the table end pointer - * by the amount we are removing + * Remove the entry's buffer space, decrement the table + * end pointer by the amount we are removing */ pmadapter->pbcn_buf_end -= beacon_buf_adj; @@ -2470,16 +2641,18 @@ wlan_scan_delete_table_entry(IN mlan_private * pmpriv, IN t_s32 table_idx) * Use memmove since the dest/src memory regions overlap. */ memmove(pmadapter, pbeacon_buf, - (void *)((t_ptr) pbeacon_buf + (t_ptr) beacon_buf_adj), - (t_u32) ((t_ptr) pmadapter->pbcn_buf_end - - (t_ptr) pbeacon_buf)); + (void *)((t_ptr)pbeacon_buf + (t_ptr)beacon_buf_adj), + (t_u32)((t_ptr)pmadapter->pbcn_buf_end - + (t_ptr)pbeacon_buf)); } PRINTM(MINFO, "Scan: Delete Entry %d, num_in_scan_table = %d\n", table_idx, pmadapter->num_in_scan_table); - /* Shift all of the entries after the table_idx back by one, compacting - the table and removing the requested entry */ + /* + * Shift all of the entries after the table_idx back by one, compacting + * the table and removing the requested entry + */ for (del_idx = table_idx; (del_idx + 1) < pmadapter->num_in_scan_table; del_idx++) { /* Copy the next entry over this one */ @@ -2519,60 +2692,68 @@ wlan_scan_delete_table_entry(IN mlan_private * pmpriv, IN t_s32 table_idx) pmadapter->pscan_table[del_idx]. wapi_offset); } + if (pmadapter->pscan_table[del_idx].posen_ie) { + pmadapter->pscan_table[del_idx].posen_ie = + (IEEEtypes_Generic_t *) + (pmadapter->pscan_table[del_idx]. + pbeacon_buf + + pmadapter->pscan_table[del_idx]. + osen_offset); + } if (pmadapter->pscan_table[del_idx].pht_cap) { pmadapter->pscan_table[del_idx].pht_cap = - (IEEEtypes_HTCap_t *) (pmadapter-> + (IEEEtypes_HTCap_t *)(pmadapter-> + pscan_table + [del_idx]. + pbeacon_buf + + pmadapter-> + pscan_table + [del_idx]. + ht_cap_offset); + } + + if (pmadapter->pscan_table[del_idx].pht_info) { + pmadapter->pscan_table[del_idx].pht_info = + (IEEEtypes_HTInfo_t *)(pmadapter-> pscan_table [del_idx]. pbeacon_buf + pmadapter-> pscan_table [del_idx]. - ht_cap_offset); - } - - if (pmadapter->pscan_table[del_idx].pht_info) { - pmadapter->pscan_table[del_idx].pht_info = - (IEEEtypes_HTInfo_t *) (pmadapter-> - pscan_table - [del_idx]. - pbeacon_buf + - pmadapter-> - pscan_table - [del_idx]. - ht_info_offset); + ht_info_offset); } if (pmadapter->pscan_table[del_idx].pbss_co_2040) { pmadapter->pscan_table[del_idx].pbss_co_2040 = - (IEEEtypes_2040BSSCo_t *) (pmadapter-> - pscan_table - [del_idx]. - pbeacon_buf + - pmadapter-> - pscan_table - [del_idx]. - bss_co_2040_offset); + (IEEEtypes_2040BSSCo_t *)(pmadapter-> + pscan_table + [del_idx]. + pbeacon_buf + + pmadapter-> + pscan_table + [del_idx]. + bss_co_2040_offset); } if (pmadapter->pscan_table[del_idx].pext_cap) { pmadapter->pscan_table[del_idx].pext_cap = - (IEEEtypes_ExtCap_t *) (pmadapter-> - pscan_table - [del_idx]. - pbeacon_buf + - pmadapter-> - pscan_table - [del_idx]. - ext_cap_offset); + (IEEEtypes_ExtCap_t *)(pmadapter-> + pscan_table + [del_idx]. + pbeacon_buf + + pmadapter-> + pscan_table + [del_idx]. + ext_cap_offset); } if (pmadapter->pscan_table[del_idx]. poverlap_bss_scan_param) { pmadapter->pscan_table[del_idx]. poverlap_bss_scan_param = (IEEEtypes_OverlapBSSScanParam_t - *) (pmadapter->pscan_table[del_idx]. - pbeacon_buf + - pmadapter->pscan_table[del_idx]. - overlap_bss_offset); + *)(pmadapter->pscan_table[del_idx]. + pbeacon_buf + + pmadapter->pscan_table[del_idx]. + overlap_bss_offset); } } @@ -2602,8 +2783,8 @@ wlan_scan_delete_table_entry(IN mlan_private * pmpriv, IN t_s32 table_idx) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_scan_delete_ssid_table_entry(IN mlan_private * pmpriv, - IN mlan_802_11_ssid * pdel_ssid) +wlan_scan_delete_ssid_table_entry(IN mlan_private *pmpriv, + IN mlan_802_11_ssid *pdel_ssid) { mlan_status ret = MLAN_STATUS_FAILURE; t_s32 table_idx; @@ -2612,9 +2793,11 @@ wlan_scan_delete_ssid_table_entry(IN mlan_private * pmpriv, PRINTM(MINFO, "Scan: Delete Ssid Entry: %-32s\n", pdel_ssid->ssid); - /* If the requested SSID is found in the table, delete it. Then keep - searching the table for multiple entries for the SSID until no more - are found */ + /* + * If the requested SSID is found in the table, delete it. Then keep + * searching the table for multiple entries for the SSID until no + * more are found + */ while ((table_idx = wlan_find_ssid_in_list(pmpriv, pdel_ssid, MNULL, @@ -2652,7 +2835,7 @@ wlan_scan_delete_ssid_table_entry(IN mlan_private * pmpriv, * @return Index in ScanTable, or negative value if error */ t_s32 -wlan_is_network_compatible(IN mlan_private * pmpriv, +wlan_is_network_compatible(IN mlan_private *pmpriv, IN t_u32 index, IN t_u32 mode) { mlan_adapter *pmadapter = pmpriv->adapter; @@ -2671,12 +2854,78 @@ wlan_is_network_compatible(IN mlan_private * pmpriv, return index; } + if (pbss_desc->wlan_11h_bss_info.chan_switch_ann.element_id == + CHANNEL_SWITCH_ANN) { + PRINTM(MINFO, + "Don't connect to AP with CHANNEL_SWITCH_ANN IE.\n"); + LEAVE(); + return -1; + } + if (pmpriv->wps.session_enable == MTRUE) { PRINTM(MINFO, "Return success directly in WPS period\n"); LEAVE(); return index; } + if (pmpriv->sec_info.osen_enabled && + pbss_desc->posen_ie && + ((*(pbss_desc->posen_ie)).ieee_hdr.element_id == + VENDOR_SPECIFIC_221) + ) { + /* Hotspot 2.0 OSEN AKM */ + PRINTM(MMSG, + "Return success directly in Hotspot OSEN: index=%d " + "encryption_mode=%#x\n", index, + pmpriv->sec_info.encryption_mode); + LEAVE(); + return index; + } + + if ((pbss_desc->bss_mode == mode) && + (pmpriv->sec_info.ewpa_enabled == MTRUE +#ifdef DRV_EMBEDDED_SUPPLICANT + || (pmpriv->adapter->psdio_device->driver_supplicant_auth && + supplicantIsEnabled(pmpriv->psapriv)) +#endif + )) { + if (((pbss_desc->pwpa_ie) && + ((*(pbss_desc->pwpa_ie)).vend_hdr.element_id == WPA_IE)) || + ((pbss_desc->prsn_ie) && + ((*(pbss_desc->prsn_ie)).ieee_hdr.element_id == RSN_IE))) { + if (((pmpriv->adapter->config_bands & BAND_GN || + pmpriv->adapter->config_bands & BAND_AN) && + pbss_desc->pht_cap) + && (pmpriv->bss_mode == MLAN_BSS_MODE_INFRA) + && !is_wpa_oui_present(pmpriv->adapter, pbss_desc, + CIPHER_SUITE_CCMP) + && !is_rsn_oui_present(pmpriv->adapter, pbss_desc, + CIPHER_SUITE_CCMP)) { + + if (is_wpa_oui_present + (pmpriv->adapter, pbss_desc, + CIPHER_SUITE_TKIP) + || is_rsn_oui_present(pmpriv->adapter, + pbss_desc, + CIPHER_SUITE_TKIP)) { + PRINTM(MINFO, + "Disable 11n if AES is not supported by AP\n"); + pbss_desc->disable_11n = MTRUE; + } else { + LEAVE(); + return -1; + } + } + LEAVE(); + return index; + } else { + PRINTM(MINFO, + "ewpa_enabled: Ignore none WPA/WPA2 AP\n"); + LEAVE(); + return -1; + } + } + if (pmpriv->sec_info.wapi_enabled && (pbss_desc->pwapi_ie && ((*(pbss_desc->pwapi_ie)).ieee_hdr.element_id == WAPI_IE))) { @@ -2708,9 +2957,11 @@ wlan_is_network_compatible(IN mlan_private * pmpriv, PRINTM(MINFO, "Disable 11n in WEP mode\n"); pbss_desc->disable_11n = MTRUE; /* Reject the following cases: */ - /* case 1: RSN IE w/o WEP OUI and WPA IE w/o WEP OUI - case 2: RSN IE w/o WEP OUI and No WPA IE case 3: WPA - IE w/o WEP OUI and No RSN IE * */ + /* + * case 1: RSN IE w/o WEP OUI and WPA IE w/o WEP OUI + * case 2: RSN IE w/o WEP OUI and No WPA IE + * case 3: WPA IE w/o WEP OUI and No RSN IE + */ if (((pbss_desc->prsn_ie) && ((*(pbss_desc->prsn_ie)).ieee_hdr.element_id == RSN_IE)) || ((pbss_desc->pwpa_ie) && @@ -2741,8 +2992,8 @@ wlan_is_network_compatible(IN mlan_private * pmpriv, WPA_IE)) && !pmpriv->adhoc_aes_enabled /* - * Privacy bit may NOT be set in some APs like LinkSys WRT54G - * && pbss_desc->privacy + * Privacy bit may NOT be set in some APs like + * LinkSys WRT54G && pbss_desc->privacy */ ) { /* WPA enabled */ @@ -2760,7 +3011,8 @@ wlan_is_network_compatible(IN mlan_private * pmpriv, (pmpriv->sec_info.wpa2_enabled) ? "e" : "d", pmpriv->sec_info.encryption_mode, pbss_desc->privacy); - if (((pmpriv->adapter->config_bands & BAND_GN) && + if (((pmpriv->adapter->config_bands & BAND_GN || + pmpriv->adapter->config_bands & BAND_AN) && pbss_desc->pht_cap) && (pmpriv->bss_mode == MLAN_BSS_MODE_INFRA) && !is_wpa_oui_present(pmpriv->adapter, pbss_desc, @@ -2786,8 +3038,8 @@ wlan_is_network_compatible(IN mlan_private * pmpriv, RSN_IE)) && !pmpriv->adhoc_aes_enabled /* - * Privacy bit may NOT be set in some APs like LinkSys WRT54G - * && pbss_desc->privacy + * Privacy bit may NOT be set in some APs like + * LinkSys WRT54G && pbss_desc->privacy */ ) { /* WPA2 enabled */ @@ -2805,7 +3057,8 @@ wlan_is_network_compatible(IN mlan_private * pmpriv, (pmpriv->sec_info.wpa2_enabled) ? "e" : "d", pmpriv->sec_info.encryption_mode, pbss_desc->privacy); - if (((pmpriv->adapter->config_bands & BAND_GN) && + if (((pmpriv->adapter->config_bands & BAND_GN || + pmpriv->adapter->config_bands & BAND_AN) && pbss_desc->pht_cap) && (pmpriv->bss_mode == MLAN_BSS_MODE_INFRA) && !is_rsn_oui_present(pmpriv->adapter, pbss_desc, @@ -2898,6 +3151,7 @@ wlan_is_network_compatible(IN mlan_private * pmpriv, mlan_status wlan_flush_scan_table(IN pmlan_adapter pmadapter) { + t_u8 i = 0; ENTER(); PRINTM(MINFO, "Flushing scan table\n"); @@ -2909,6 +3163,9 @@ wlan_flush_scan_table(IN pmlan_adapter pmadapter) memset(pmadapter, pmadapter->bcn_buf, 0, pmadapter->bcn_buf_size); pmadapter->pbcn_buf_end = pmadapter->bcn_buf; + for (i = 0; i < pmadapter->num_in_chan_stats; i++) + pmadapter->pchan_stats[i].cca_scan_duration = 0; + LEAVE(); return MLAN_STATUS_SUCCESS; } @@ -2928,15 +3185,15 @@ wlan_flush_scan_table(IN pmlan_adapter pmadapter) * @return MLAN_STATUS_SUCCESS or < 0 if error */ mlan_status -wlan_scan_networks(IN mlan_private * pmpriv, - IN t_void * pioctl_buf, - IN const wlan_user_scan_cfg * puser_scan_in) +wlan_scan_networks(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, + IN const wlan_user_scan_cfg *puser_scan_in) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_adapter *pmadapter = pmpriv->adapter; - mlan_callbacks *pcb = (mlan_callbacks *) & pmadapter->callbacks; + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; cmd_ctrl_node *pcmd_node = MNULL; - pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *) pioctl_buf; + pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *)pioctl_buf; wlan_scan_cmd_config_tlv *pscan_cfg_out = MNULL; MrvlIEtypes_ChanListParamSet_t *pchan_list_out; @@ -2947,12 +3204,13 @@ wlan_scan_networks(IN mlan_private * pmpriv, t_u8 filtered_scan; t_u8 scan_current_chan_only; t_u8 max_chan_per_scan; + t_u8 i; ENTER(); ret = pcb->moal_malloc(pmadapter->pmoal_handle, sizeof(wlan_scan_cmd_config_tlv), MLAN_MEM_DEF, - (t_u8 **) & pscan_cfg_out); + (t_u8 **)&pscan_cfg_out); if (ret != MLAN_STATUS_SUCCESS || !pscan_cfg_out) { PRINTM(MERROR, "Memory allocation for pscan_cfg_out failed!\n"); if (pioctl_req) @@ -2963,12 +3221,12 @@ wlan_scan_networks(IN mlan_private * pmpriv, buf_size = sizeof(ChanScanParamSet_t) * WLAN_USER_SCAN_CHAN_MAX; ret = pcb->moal_malloc(pmadapter->pmoal_handle, buf_size, MLAN_MEM_DEF, - (t_u8 **) & pscan_chan_list); + (t_u8 **)&pscan_chan_list); if (ret != MLAN_STATUS_SUCCESS || !pscan_chan_list) { PRINTM(MERROR, "Failed to allocate scan_chan_list\n"); if (pscan_cfg_out) pcb->moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) pscan_cfg_out); + (t_u8 *)pscan_cfg_out); if (pioctl_req) pioctl_req->status_code = MLAN_ERROR_NO_MEM; LEAVE(); @@ -2994,10 +3252,10 @@ wlan_scan_networks(IN mlan_private * pmpriv, PRINTM(MERROR, "Failed to setup scan config\n"); if (pscan_cfg_out) pcb->moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) pscan_cfg_out); + (t_u8 *)pscan_cfg_out); if (pscan_chan_list) pcb->moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) pscan_chan_list); + (t_u8 *)pscan_chan_list); if (pioctl_req) pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; LEAVE(); @@ -3012,6 +3270,8 @@ wlan_scan_networks(IN mlan_private * pmpriv, sizeof(BSSDescriptor_t) * MRVDRV_MAX_BSSID_LIST); pmadapter->num_in_scan_table = 0; pmadapter->pbcn_buf_end = pmadapter->bcn_buf; + for (i = 0; i < pmadapter->num_in_chan_stats; i++) + pmadapter->pchan_stats[i].cca_scan_duration = 0; } ret = wlan_scan_channel_list(pmpriv, @@ -3027,14 +3287,14 @@ wlan_scan_networks(IN mlan_private * pmpriv, (pmadapter->pmoal_handle, &pmadapter->scan_pending_q, pcb->moal_spin_lock, pcb->moal_spin_unlock)) { pcmd_node = - (cmd_ctrl_node *) util_dequeue_list(pmadapter-> - pmoal_handle, - &pmadapter-> - scan_pending_q, - pcb-> - moal_spin_lock, - pcb-> - moal_spin_unlock); + (cmd_ctrl_node *)util_dequeue_list(pmadapter-> + pmoal_handle, + &pmadapter-> + scan_pending_q, + pcb-> + moal_spin_lock, + pcb-> + moal_spin_unlock); wlan_request_cmd_lock(pmadapter); pmadapter->pscan_ioctl_req = pioctl_req; pmadapter->scan_processing = MTRUE; @@ -3044,12 +3304,11 @@ wlan_scan_networks(IN mlan_private * pmpriv, } } if (pscan_cfg_out) - pcb->moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) pscan_cfg_out); + pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)pscan_cfg_out); if (pscan_chan_list) pcb->moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) pscan_chan_list); + (t_u8 *)pscan_chan_list); LEAVE(); return ret; @@ -3074,15 +3333,15 @@ wlan_scan_networks(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_cmd_802_11_scan(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * pcmd, IN t_void * pdata_buf) +wlan_cmd_802_11_scan(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *pcmd, IN t_void *pdata_buf) { HostCmd_DS_802_11_SCAN *pscan_cmd = &pcmd->params.scan; wlan_scan_cmd_config *pscan_cfg; ENTER(); - pscan_cfg = (wlan_scan_cmd_config *) pdata_buf; + pscan_cfg = (wlan_scan_cmd_config *)pdata_buf; /* Set fixed field variables in scan command */ pscan_cmd->bss_mode = pscan_cfg->bss_mode; @@ -3094,11 +3353,10 @@ wlan_cmd_802_11_scan(IN mlan_private * pmpriv, pcmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_SCAN); /* Size is equal to the sizeof(fixed portions) + the TLV len + header */ - pcmd->size = - (t_u16) wlan_cpu_to_le16((t_u16) (sizeof(pscan_cmd->bss_mode) - + sizeof(pscan_cmd->bssid) - + pscan_cfg->tlv_buf_len - + S_DS_GEN)); + pcmd->size = (t_u16)wlan_cpu_to_le16((t_u16)(sizeof(pscan_cmd->bss_mode) + + sizeof(pscan_cmd->bssid) + + pscan_cfg->tlv_buf_len + + S_DS_GEN)); LEAVE(); return MLAN_STATUS_SUCCESS; @@ -3130,8 +3388,8 @@ wlan_cmd_802_11_scan(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_ret_802_11_scan(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * resp, IN t_void * pioctl_buf) +wlan_ret_802_11_scan(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, IN t_void *pioctl_buf) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_adapter *pmadapter = pmpriv->adapter; @@ -3141,6 +3399,7 @@ wlan_ret_802_11_scan(IN mlan_private * pmpriv, BSSDescriptor_t *bss_new_entry = MNULL; MrvlIEtypes_Data_t *ptlv; MrvlIEtypes_TsfTimestamp_t *ptsf_tlv = MNULL; + MrvlIEtypes_ChannelStats_t *pchanstats_tlv = MNULL; t_u8 *pbss_info; t_u32 scan_resp_size; t_u32 bytes_left; @@ -3160,7 +3419,7 @@ wlan_ret_802_11_scan(IN mlan_private * pmpriv, pmlan_ioctl_req pscan_ioctl_req = MNULL; ENTER(); - pcb = (pmlan_callbacks) & pmadapter->callbacks; + pcb = (pmlan_callbacks)&pmadapter->callbacks; is_bgscan_resp = (resp->command == HostCmd_CMD_802_11_BG_SCAN_QUERY); if (is_bgscan_resp) @@ -3203,32 +3462,45 @@ wlan_ret_802_11_scan(IN mlan_private * pmpriv, sizeof(resp->params.bg_scan_query_resp. report_condition); - ptlv = (MrvlIEtypes_Data_t *) (pscan_rsp->bss_desc_and_tlv_buffer + - bytes_left); + ptlv = (MrvlIEtypes_Data_t *)(pscan_rsp->bss_desc_and_tlv_buffer + + bytes_left); - /* Search the TLV buffer space in the scan response for any valid TLVs */ + /* + * Search the TLV buffer space in the scan response + * for any valid TLVs + */ wlan_ret_802_11_scan_get_tlv_ptrs(pmadapter, ptlv, tlv_buf_size, TLV_TYPE_TSFTIMESTAMP, - (MrvlIEtypes_Data_t **) & ptsf_tlv); + (MrvlIEtypes_Data_t **)&ptsf_tlv); - /* Search the TLV buffer space in the scan response for any valid TLVs */ + /* + * Search the TLV buffer space in the scan response + * for any valid TLVs + */ wlan_ret_802_11_scan_get_tlv_ptrs(pmadapter, ptlv, tlv_buf_size, TLV_TYPE_CHANNELBANDLIST, - (MrvlIEtypes_Data_t **) & - pchan_band_tlv); + (MrvlIEtypes_Data_t **) + &pchan_band_tlv); + wlan_ret_802_11_scan_get_tlv_ptrs(pmadapter, ptlv, tlv_buf_size, + TLV_TYPE_CHANNEL_STATS, + (MrvlIEtypes_Data_t **) + &pchanstats_tlv); + + if (pchanstats_tlv) + wlan_update_chan_statistics(pmpriv, pchanstats_tlv); /* - * Process each scan response returned (pscan_rsp->number_of_sets). Save - * the information in the bss_new_entry and then insert into the - * driver scan table either as an update to an existing entry - * or as an addition at the end of the table + * Process each scan response returned (pscan_rsp->number_of_sets). + * Save the information in the bss_new_entry and then insert into + * the driver scan table either as an update to an existing entry + * or as an addition at the end of the table */ ret = pcb->moal_malloc(pmadapter->pmoal_handle, sizeof(BSSDescriptor_t), - MLAN_MEM_DEF, (t_u8 **) & bss_new_entry); + MLAN_MEM_DEF, (t_u8 **)&bss_new_entry); if (ret != MLAN_STATUS_SUCCESS || !bss_new_entry) { PRINTM(MERROR, "Memory allocation for bss_new_entry failed!\n"); @@ -3264,8 +3536,10 @@ wlan_ret_802_11_scan(IN mlan_private * pmpriv, bss_new_entry->channel = pchan_band->chan_number; } - /* Save the band designation for this entry for use in - join */ + /* + * Save the band designation for this entry + * for use in join + */ bss_new_entry->bss_band = band; cfp = wlan_find_cfp_by_band_and_channel(pmadapter, @@ -3297,9 +3571,10 @@ wlan_ret_802_11_scan(IN mlan_private * pmpriv, mac_address, sizeof(bss_new_entry->mac_address))) { /* - * If the SSID matches as well, it is a duplicate of - * this entry. Keep the bss_idx set to this - * entry so we replace the old contents in the table + * If the SSID matches as well, it is a + * duplicate of this entry. Keep the + * bss_idx set to this entry so we + * replace the old contents in the table */ if ((bss_new_entry->ssid.ssid_len == pmadapter->pscan_table[bss_idx]. @@ -3318,8 +3593,10 @@ wlan_ret_802_11_scan(IN mlan_private * pmpriv, break; } /* - * If the SSID is NULL for same BSSID keep the bss_idx set - * to this entry so we replace the old contents in the table + * If the SSID is NULL for same BSSID + * keep the bss_idx set to this entry + * so we replace the old contents in + * the table */ if (!memcmp (pmadapter, @@ -3335,13 +3612,15 @@ wlan_ret_802_11_scan(IN mlan_private * pmpriv, } } /* - * If the bss_idx is equal to the number of entries in the table, - * the new entry was not a duplicate; append it to the scan - * table + * If the bss_idx is equal to the number of entries + * in the table, the new entry was not a duplicate; + * append it to the scan table */ if (bss_idx == num_in_table) { - /* Range check the bss_idx, keep it limited to - the last entry */ + /* + * Range check the bss_idx, keep it limited + * to the last entry + */ if (bss_idx == MRVDRV_MAX_BSSID_LIST) bss_idx--; else @@ -3349,9 +3628,9 @@ wlan_ret_802_11_scan(IN mlan_private * pmpriv, } /* - * Save the beacon/probe response returned for later application - * retrieval. Duplicate beacon/probe responses are updated if - * possible + * Save the beacon/probe response returned for later + * application retrieval. Duplicate beacon/probe + * responses are updated if possible */ wlan_ret_802_11_scan_store_beacon(pmpriv, bss_idx, @@ -3365,9 +3644,9 @@ wlan_ret_802_11_scan(IN mlan_private * pmpriv, } /* * If the TSF TLV was appended to the scan results, save - * this entry's TSF value in the networkTSF field. The - * networkTSF is the firmware's TSF value at the time the - * beacon or probe response was received. + * this entry's TSF value in the networkTSF field. The + * networkTSF is the firmware's TSF value at the time + * the beacon or probe response was received. */ if (ptsf_tlv) { memcpy(pmpriv->adapter, &tsf_val, @@ -3441,14 +3720,14 @@ wlan_ret_802_11_scan(IN mlan_private * pmpriv, /* Get scan command from scan_pending_q and put to cmd_pending_q */ pcmd_node = - (cmd_ctrl_node *) util_dequeue_list(pmadapter-> - pmoal_handle, - &pmadapter-> - scan_pending_q, - pcb-> - moal_spin_lock, - pcb-> - moal_spin_unlock); + (cmd_ctrl_node *)util_dequeue_list(pmadapter-> + pmoal_handle, + &pmadapter-> + scan_pending_q, + pcb-> + moal_spin_lock, + pcb-> + moal_spin_unlock); wlan_insert_cmd_to_pending_q(pmadapter, pcmd_node, MTRUE); @@ -3457,8 +3736,7 @@ wlan_ret_802_11_scan(IN mlan_private * pmpriv, done: if (bss_new_entry) - pcb->moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) bss_new_entry); + pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)bss_new_entry); if (ret) { /* Flush all pending scan commands */ wlan_flush_scan_queue(pmadapter); @@ -3495,15 +3773,15 @@ wlan_ret_802_11_scan(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_cmd_802_11_scan_ext(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * pcmd, IN t_void * pdata_buf) +wlan_cmd_802_11_scan_ext(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *pcmd, IN t_void *pdata_buf) { HostCmd_DS_802_11_SCAN_EXT *pext_scan_cmd = &pcmd->params.ext_scan; wlan_scan_cmd_config *pscan_cfg = MNULL; ENTER(); - pscan_cfg = (wlan_scan_cmd_config *) pdata_buf; + pscan_cfg = (wlan_scan_cmd_config *)pdata_buf; memcpy(pmpriv->adapter, pext_scan_cmd->tlv_buffer, pscan_cfg->tlv_buf, pscan_cfg->tlv_buf_len); @@ -3511,9 +3789,9 @@ wlan_cmd_802_11_scan_ext(IN mlan_private * pmpriv, pcmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_SCAN_EXT); /* Size is equal to the sizeof(fixed portions) + the TLV len + header */ - pcmd->size = wlan_cpu_to_le16((t_u16) (sizeof(pext_scan_cmd->reserved) - + pscan_cfg->tlv_buf_len - + S_DS_GEN)); + pcmd->size = wlan_cpu_to_le16((t_u16)(sizeof(pext_scan_cmd->reserved) + + pscan_cfg->tlv_buf_len + + S_DS_GEN)); LEAVE(); return MLAN_STATUS_SUCCESS; @@ -3529,12 +3807,42 @@ wlan_cmd_802_11_scan_ext(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_ret_802_11_scan_ext(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * resp, IN t_void * pioctl_buf) +wlan_ret_802_11_scan_ext(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, IN t_void *pioctl_buf) { + HostCmd_DS_802_11_SCAN_EXT *pext_scan_cmd = &(resp->params.ext_scan); + MrvlIEtypesHeader_t *tlv = MNULL; + MrvlIEtypes_ChannelStats_t *tlv_chanstats = MNULL; + t_u16 tlv_buf_left = 0; + t_u16 tlv_type = 0; + t_u16 tlv_len = 0; ENTER(); PRINTM(MINFO, "EXT scan returns successfully\n"); + tlv = (MrvlIEtypesHeader_t *)pext_scan_cmd->tlv_buffer; + tlv_buf_left = + resp->size - (sizeof(HostCmd_DS_802_11_SCAN_EXT) - 1 + + S_DS_GEN); + while (tlv_buf_left >= sizeof(MrvlIEtypesHeader_t)) { + tlv_type = wlan_le16_to_cpu(tlv->type); + tlv_len = wlan_le16_to_cpu(tlv->len); + if (tlv_buf_left < (tlv_len + sizeof(MrvlIEtypesHeader_t))) { + PRINTM(MERROR, + "Error processing uAP sys config TLVs, bytes left < TLV length\n"); + break; + } + switch (tlv_type) { + case TLV_TYPE_CHANNEL_STATS: + tlv_chanstats = (MrvlIEtypes_ChannelStats_t *)tlv; + wlan_update_chan_statistics(pmpriv, tlv_chanstats); + break; + default: + break; + } + tlv_buf_left -= tlv_len + sizeof(MrvlIEtypesHeader_t); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len + + sizeof(MrvlIEtypesHeader_t)); + } LEAVE(); return MLAN_STATUS_SUCCESS; } @@ -3550,9 +3858,9 @@ wlan_ret_802_11_scan_ext(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_parse_ext_scan_result(IN mlan_private * pmpriv, +wlan_parse_ext_scan_result(IN mlan_private *pmpriv, IN t_u8 number_of_sets, - IN t_u8 * pscan_resp, IN t_u16 scan_resp_size) + IN t_u8 *pscan_resp, IN t_u16 scan_resp_size) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_adapter *pmadapter = pmpriv->adapter; @@ -3575,7 +3883,7 @@ wlan_parse_ext_scan_result(IN mlan_private * pmpriv, t_u8 null_ssid[MLAN_MAX_SSID_LENGTH] = { 0 }; ENTER(); - pcb = (pmlan_callbacks) & pmadapter->callbacks; + pcb = (pmlan_callbacks)&pmadapter->callbacks; if (number_of_sets > MRVDRV_MAX_BSSID_LIST) { PRINTM(MERROR, @@ -3591,7 +3899,7 @@ wlan_parse_ext_scan_result(IN mlan_private * pmpriv, number_of_sets); num_in_table = pmadapter->num_in_scan_table; - ptlv = (MrvlIEtypes_Data_t *) pscan_resp; + ptlv = (MrvlIEtypes_Data_t *)pscan_resp; /* * Process each scan response returned number_of_sets. Save @@ -3600,7 +3908,7 @@ wlan_parse_ext_scan_result(IN mlan_private * pmpriv, * or as an addition at the end of the table */ ret = pcb->moal_malloc(pmadapter->pmoal_handle, sizeof(BSSDescriptor_t), - MLAN_MEM_DEF, (t_u8 **) & bss_new_entry); + MLAN_MEM_DEF, (t_u8 **)&bss_new_entry); if (ret != MLAN_STATUS_SUCCESS || !bss_new_entry) { PRINTM(MERROR, "Memory allocation for bss_new_entry failed!\n"); @@ -3620,12 +3928,14 @@ wlan_parse_ext_scan_result(IN mlan_private * pmpriv, pscan_rsp_tlv = MNULL; pscan_info_tlv = MNULL; bytes_left_for_tlv = bytes_left; - /* BSS response TLV with beacon or probe response buffer at the - initial position of each descriptor */ + /* + * BSS response TLV with beacon or probe response buffer + * at the initial position of each descriptor + */ if (tlv_type == TLV_TYPE_BSS_SCAN_RSP) { - pbss_info = (t_u8 *) ptlv; - pscan_rsp_tlv = (MrvlIEtypes_Bss_Scan_Rsp_t *) ptlv; - ptlv = (MrvlIEtypes_Data_t *) (ptlv->data + tlv_len); + pbss_info = (t_u8 *)ptlv; + pscan_rsp_tlv = (MrvlIEtypes_Bss_Scan_Rsp_t *)ptlv; + ptlv = (MrvlIEtypes_Data_t *)(ptlv->data + tlv_len); bytes_left_for_tlv -= (tlv_len + sizeof(MrvlIEtypesHeader_t)); } else @@ -3649,7 +3959,7 @@ wlan_parse_ext_scan_result(IN mlan_private * pmpriv, switch (tlv_type) { case TLV_TYPE_BSS_SCAN_INFO: pscan_info_tlv = - (MrvlIEtypes_Bss_Scan_Info_t *) ptlv; + (MrvlIEtypes_Bss_Scan_Info_t *)ptlv; if (tlv_len != sizeof(MrvlIEtypes_Bss_Scan_Info_t) - sizeof(MrvlIEtypesHeader_t)) { @@ -3660,7 +3970,7 @@ wlan_parse_ext_scan_result(IN mlan_private * pmpriv, default: break; } - ptlv = (MrvlIEtypes_Data_t *) (ptlv->data + tlv_len); + ptlv = (MrvlIEtypes_Data_t *)(ptlv->data + tlv_len); bytes_left -= (tlv_len + sizeof(MrvlIEtypesHeader_t)); bytes_left_for_tlv -= (tlv_len + sizeof(MrvlIEtypesHeader_t)); @@ -3669,10 +3979,12 @@ wlan_parse_ext_scan_result(IN mlan_private * pmpriv, if (pscan_rsp_tlv == MNULL) break; - /* Advance pointer to the beacon buffer length and update the - bytes count so that the function - wlan_interpret_bss_desc_with_ie() can handle the scan buffer - withut any change */ + /* + * Advance pointer to the beacon buffer length and + * update the bytes count so that the function + * wlan_interpret_bss_desc_with_ie() can handle the + * scan buffer withut any change + */ pbss_info += sizeof(t_u16); bytes_left -= sizeof(t_u16); @@ -3691,16 +4003,16 @@ wlan_parse_ext_scan_result(IN mlan_private * pmpriv, band = BAND_G; /* - * If the BSS info TLV was appended to the scan results, save - * this entry's TSF value in the networkTSF field. The - * networkTSF is the firmware's TSF value at the time the - * beacon or probe response was received. + * If the BSS info TLV was appended to the scan results, + * save this entry's TSF value in the networkTSF field. + * The networkTSF is the firmware's TSF value at the + * time the beacon or probe response was received. */ if (pscan_info_tlv) { /* RSSI is 2 byte long */ bss_new_entry->rssi = - -(t_s32) (wlan_le16_to_cpu - (pscan_info_tlv->rssi)); + -(t_s32)(wlan_le16_to_cpu + (pscan_info_tlv->rssi)); PRINTM(MINFO, "EXT_SCAN: RSSI=%d\n", bss_new_entry->rssi); memcpy(pmpriv->adapter, &tsf_val, @@ -3744,9 +4056,10 @@ wlan_parse_ext_scan_result(IN mlan_private * pmpriv, mac_address, sizeof(bss_new_entry->mac_address))) { /* - * If the SSID matches as well, it is a duplicate of - * this entry. Keep the bss_idx set to this - * entry so we replace the old contents in the table + * If the SSID matches as well, it is a + * duplicate of this entry. Keep the + * bss_idx set to this entry so we + * replace the old contents in the table */ if ((bss_new_entry->ssid.ssid_len == pmadapter->pscan_table[bss_idx]. @@ -3764,8 +4077,10 @@ wlan_parse_ext_scan_result(IN mlan_private * pmpriv, break; } /* - * If the SSID is NULL for same BSSID keep the bss_idx set - * to this entry so we replace the old contents in the table + * If the SSID is NULL for same BSSID + * keep the bss_idx set to this entry + * so we replace the old contents in + * the table */ if (!memcmp (pmadapter, @@ -3781,9 +4096,9 @@ wlan_parse_ext_scan_result(IN mlan_private * pmpriv, } } /* - * If the bss_idx is equal to the number of entries in the table, - * the new entry was not a duplicate; append it to the scan - * table + * If the bss_idx is equal to the number of entries + * in the table, the new entry was not a duplicate; + * append it to the scan table */ if (bss_idx == num_in_table) { /* Range check the bss_idx, keep it limited to @@ -3795,9 +4110,9 @@ wlan_parse_ext_scan_result(IN mlan_private * pmpriv, } /* - * Save the beacon/probe response returned for later application - * retrieval. Duplicate beacon/probe responses are updated if - * possible + * Save the beacon/probe response returned for later + * application retrieval. Duplicate beacon/probe + * responses are updated if possible */ wlan_ret_802_11_scan_store_beacon(pmpriv, bss_idx, @@ -3836,8 +4151,7 @@ wlan_parse_ext_scan_result(IN mlan_private * pmpriv, done: if (bss_new_entry) - pcb->moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) bss_new_entry); + pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)bss_new_entry); LEAVE(); return ret; @@ -3852,8 +4166,8 @@ wlan_parse_ext_scan_result(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_handle_event_ext_scan_report(IN mlan_private * pmpriv, - IN mlan_buffer * pmbuf) +wlan_handle_event_ext_scan_report(IN mlan_private *pmpriv, + IN mlan_buffer *pmbuf) { mlan_adapter *pmadapter = pmpriv->adapter; mlan_callbacks *pcb = &pmadapter->callbacks; @@ -3959,9 +4273,8 @@ wlan_handle_event_ext_scan_report(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_cmd_802_11_bg_scan_query(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * pcmd, - IN t_void * pdata_buf) +wlan_cmd_802_11_bg_scan_query(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *pcmd, IN t_void *pdata_buf) { HostCmd_DS_802_11_BG_SCAN_QUERY *bg_query = &pcmd->params.bg_scan_query; @@ -3992,9 +4305,9 @@ wlan_cmd_802_11_bg_scan_query(IN mlan_private * pmpriv, * @return channel number */ static t_u8 -wlan_bgscan_create_channel_list(IN mlan_private * pmpriv, - IN const wlan_bgscan_cfg * pbg_scan_in, - MrvlIEtypes_ChanListParamSet_t * tlv_chan_list) +wlan_bgscan_create_channel_list(IN mlan_private *pmpriv, + IN const wlan_bgscan_cfg *pbg_scan_in, + MrvlIEtypes_ChanListParamSet_t *tlv_chan_list) { mlan_adapter *pmadapter = pmpriv->adapter; region_chan_t *pscan_region; @@ -4031,6 +4344,8 @@ wlan_bgscan_create_channel_list(IN mlan_private * pmpriv, if (!radio_type && (pscan_region->band != BAND_B) && (pscan_region->band != BAND_G)) continue; + if (radio_type && (pscan_region->band != BAND_A)) + continue; } if (!wlan_is_band_compatible (pmpriv->config_bands | pmadapter->adhoc_start_band, @@ -4041,10 +4356,11 @@ wlan_bgscan_create_channel_list(IN mlan_private * pmpriv, next_chan++, chan_idx++) { if (chan_idx >= WLAN_BG_SCAN_CHAN_MAX) break; - /* Set the default scan type to ACTIVE SCAN type, will - later be changed to passive on a per channel basis - if restricted by regulatory requirements (11d or - 11h) */ + /* + * Set the default scan type to ACTIVE SCAN type, will + * later be changed to passive on a per channel basis + * if restricted by regulatory requirements (11d or 11h) + */ scan_type = MLAN_SCAN_TYPE_ACTIVE; cfp = pscan_region->pcfp + next_chan; if (scan_type == MLAN_SCAN_TYPE_ACTIVE @@ -4052,17 +4368,29 @@ wlan_bgscan_create_channel_list(IN mlan_private * pmpriv, scan_type = wlan_11d_get_scan_type(pmadapter, pscan_region-> band, - (t_u8) cfp-> + (t_u8)cfp-> channel, &pmadapter-> parsed_region_chan); } switch (pscan_region->band) { + case BAND_A: + tlv_chan_list->chan_scan_param[chan_idx]. + radio_type = HostCmd_SCAN_RADIO_TYPE_A; + if (!wlan_11d_is_enabled(pmpriv)) { + /* 11D not available... play it safe on + DFS channels */ + if (wlan_11h_radar_detect_required + (pmpriv, (t_u8)cfp->channel)) + scan_type = + MLAN_SCAN_TYPE_PASSIVE; + } + break; case BAND_B: case BAND_G: if (!wlan_11d_is_enabled(pmpriv)) if (wlan_bg_scan_type_is_passive - (pmpriv, (t_u8) cfp->channel)) + (pmpriv, (t_u8)cfp->channel)) scan_type = MLAN_SCAN_TYPE_PASSIVE; tlv_chan_list->chan_scan_param[chan_idx]. @@ -4077,12 +4405,12 @@ wlan_bgscan_create_channel_list(IN mlan_private * pmpriv, if (pbg_scan_in && pbg_scan_in->chan_list[0].scan_time) { tlv_chan_list->chan_scan_param[chan_idx]. max_scan_time = - wlan_cpu_to_le16((t_u16) pbg_scan_in-> + wlan_cpu_to_le16((t_u16)pbg_scan_in-> chan_list[0]. scan_time); tlv_chan_list->chan_scan_param[chan_idx]. min_scan_time = - wlan_cpu_to_le16((t_u16) pbg_scan_in-> + wlan_cpu_to_le16((t_u16)pbg_scan_in-> chan_list[0]. scan_time); } else if (scan_type == MLAN_SCAN_TYPE_PASSIVE) { @@ -4114,7 +4442,7 @@ wlan_bgscan_create_channel_list(IN mlan_private * pmpriv, } tlv_chan_list->chan_scan_param[chan_idx].chan_number = - (t_u8) cfp->channel; + (t_u8)cfp->channel; tlv_chan_list->chan_scan_param[chan_idx].chan_scan_mode. disable_chan_filt = MTRUE; } @@ -4135,13 +4463,13 @@ wlan_bgscan_create_channel_list(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_cmd_bgscan_config(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * pcmd, IN t_void * pdata_buf) +wlan_cmd_bgscan_config(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *pcmd, IN t_void *pdata_buf) { mlan_adapter *pmadapter = pmpriv->adapter; HostCmd_DS_802_11_BG_SCAN_CONFIG *bg_scan = &pcmd->params.bg_scan_config; - wlan_bgscan_cfg *bg_scan_in = (wlan_bgscan_cfg *) pdata_buf; + wlan_bgscan_cfg *bg_scan_in = (wlan_bgscan_cfg *)pdata_buf; t_u16 cmd_size = 0; MrvlIEtypes_NumProbes_t *pnum_probes_tlv = MNULL; MrvlIEtypes_BeaconLowRssiThreshold_t *rssi_tlv = MNULL; @@ -4167,10 +4495,6 @@ wlan_cmd_bgscan_config(IN mlan_private * pmpriv, bg_scan->enable = bg_scan_in->enable; bg_scan->bss_type = bg_scan_in->bss_type; cmd_size = sizeof(HostCmd_DS_802_11_BG_SCAN_CONFIG) + S_DS_GEN; - if (bg_scan_in->chan_per_scan) - bg_scan->chan_per_scan = bg_scan_in->chan_per_scan; - else - bg_scan->chan_per_scan = MRVDRV_MAX_CHANNELS_PER_SPECIFIC_SCAN; if (bg_scan_in->scan_interval) bg_scan->scan_interval = wlan_cpu_to_le32(bg_scan_in->scan_interval); @@ -4185,22 +4509,22 @@ wlan_cmd_bgscan_config(IN mlan_private * pmpriv, (!bg_scan->enable)) goto done; - tlv = (t_u8 *) bg_scan + sizeof(HostCmd_DS_802_11_BG_SCAN_CONFIG); + tlv = (t_u8 *)bg_scan + sizeof(HostCmd_DS_802_11_BG_SCAN_CONFIG); num_probes = (bg_scan_in->num_probes ? bg_scan_in->num_probes : pmadapter->scan_probes); if (num_probes) { - pnum_probes_tlv = (MrvlIEtypes_NumProbes_t *) tlv; + pnum_probes_tlv = (MrvlIEtypes_NumProbes_t *)tlv; pnum_probes_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_NUMPROBES); pnum_probes_tlv->header.len = wlan_cpu_to_le16(sizeof(pnum_probes_tlv->num_probes)); pnum_probes_tlv->num_probes = - wlan_cpu_to_le16((t_u16) num_probes); + wlan_cpu_to_le16((t_u16)num_probes); tlv += sizeof(MrvlIEtypes_NumProbes_t); cmd_size += sizeof(MrvlIEtypes_NumProbes_t); } if (bg_scan_in->rssi_threshold) { - rssi_tlv = (MrvlIEtypes_BeaconLowRssiThreshold_t *) tlv; + rssi_tlv = (MrvlIEtypes_BeaconLowRssiThreshold_t *)tlv; rssi_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_RSSI_LOW); rssi_tlv->header.len = wlan_cpu_to_le16(sizeof @@ -4212,7 +4536,7 @@ wlan_cmd_bgscan_config(IN mlan_private * pmpriv, cmd_size += sizeof(MrvlIEtypes_BeaconLowRssiThreshold_t); } if (bg_scan_in->snr_threshold) { - snr_tlv = (MrvlIEtypes_BeaconLowSnrThreshold_t *) tlv; + snr_tlv = (MrvlIEtypes_BeaconLowSnrThreshold_t *)tlv; snr_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_SNR_LOW); snr_tlv->header.len = wlan_cpu_to_le16(sizeof @@ -4224,7 +4548,7 @@ wlan_cmd_bgscan_config(IN mlan_private * pmpriv, cmd_size += sizeof(MrvlIEtypes_BeaconLowRssiThreshold_t); } if (bg_scan_in->repeat_count) { - tlv_repeat = (MrvlIEtypes_RepeatCount_t *) tlv; + tlv_repeat = (MrvlIEtypes_RepeatCount_t *)tlv; tlv_repeat->header.type = wlan_cpu_to_le16(TLV_TYPE_REPEAT_COUNT); tlv_repeat->header.len = @@ -4242,12 +4566,12 @@ wlan_cmd_bgscan_config(IN mlan_private * pmpriv, ssid_len = wlan_strlen((char *)bg_scan_in->ssid_list[ssid_idx]. ssid); - pwildcard_ssid_tlv = (MrvlIEtypes_WildCardSsIdParamSet_t *) tlv; + pwildcard_ssid_tlv = (MrvlIEtypes_WildCardSsIdParamSet_t *)tlv; pwildcard_ssid_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_WILDCARDSSID); pwildcard_ssid_tlv->header.len = - (t_u16) (ssid_len + - sizeof(pwildcard_ssid_tlv->max_ssid_length)); + (t_u16)(ssid_len + + sizeof(pwildcard_ssid_tlv->max_ssid_length)); pwildcard_ssid_tlv->max_ssid_length = bg_scan_in->ssid_list[ssid_idx].max_len; memcpy(pmadapter, pwildcard_ssid_tlv->ssid, @@ -4265,7 +4589,7 @@ wlan_cmd_bgscan_config(IN mlan_private * pmpriv, pwildcard_ssid_tlv->max_ssid_length); } if (bg_scan_in->chan_list[0].chan_number) { - tlv_chan_list = (MrvlIEtypes_ChanListParamSet_t *) tlv; + tlv_chan_list = (MrvlIEtypes_ChanListParamSet_t *)tlv; PRINTM(MINFO, "Scan: Using supplied channel list\n"); chan_num = 0; for (chan_idx = 0; chan_idx < WLAN_BG_SCAN_CHAN_MAX @@ -4277,6 +4601,16 @@ wlan_cmd_bgscan_config(IN mlan_private * pmpriv, radio_type_to_band(radio_type))) continue; scan_type = bg_scan_in->chan_list[chan_idx].scan_type; + /* Prevent active scanning on a radar controlled + channel */ + if (radio_type == HostCmd_SCAN_RADIO_TYPE_A) { + if (wlan_11h_radar_detect_required + (pmpriv, + bg_scan_in->chan_list[chan_idx]. + chan_number)) { + scan_type = MLAN_SCAN_TYPE_PASSIVE; + } + } if (radio_type == HostCmd_SCAN_RADIO_TYPE_BG) { if (wlan_bg_scan_type_is_passive (pmpriv, @@ -4299,7 +4633,7 @@ wlan_cmd_bgscan_config(IN mlan_private * pmpriv, } if (bg_scan_in->chan_list[chan_idx].scan_time) { scan_dur = - (t_u16) bg_scan_in->chan_list[chan_idx]. + (t_u16)bg_scan_in->chan_list[chan_idx]. scan_time; } else { if (scan_type == MLAN_SCAN_TYPE_PASSIVE) { @@ -4325,7 +4659,7 @@ wlan_cmd_bgscan_config(IN mlan_private * pmpriv, sizeof(MrvlIEtypesHeader_t) + sizeof(ChanScanParamSet_t) * chan_num; } else { - tlv_chan_list = (MrvlIEtypes_ChanListParamSet_t *) tlv; + tlv_chan_list = (MrvlIEtypes_ChanListParamSet_t *)tlv; chan_num = wlan_bgscan_create_channel_list(pmpriv, bg_scan_in, tlv_chan_list); @@ -4339,8 +4673,17 @@ wlan_cmd_bgscan_config(IN mlan_private * pmpriv, sizeof(MrvlIEtypesHeader_t) + sizeof(ChanScanParamSet_t) * chan_num; } + if (bg_scan_in->chan_per_scan) { + bg_scan->chan_per_scan = bg_scan_in->chan_per_scan; + } else { + if (bg_scan_in->report_condition & BG_SCAN_WAIT_ALL_CHAN_DONE) + bg_scan->chan_per_scan = chan_num; + else + bg_scan->chan_per_scan = + MRVDRV_MAX_CHANNELS_PER_SPECIFIC_SCAN; + } - tlv_start_later = (MrvlIEtypes_StartLater_t *) tlv; + tlv_start_later = (MrvlIEtypes_StartLater_t *)tlv; tlv_start_later->header.type = wlan_cpu_to_le16(TLV_TYPE_STARTBGSCANLATER); tlv_start_later->header.len = @@ -4365,9 +4708,9 @@ wlan_cmd_bgscan_config(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_ret_bgscan_config(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) +wlan_ret_bgscan_config(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { mlan_ds_scan *pscan = MNULL; HostCmd_DS_802_11_BG_SCAN_CONFIG *bg_scan = @@ -4376,9 +4719,9 @@ wlan_ret_bgscan_config(IN mlan_private * pmpriv, ENTER(); if (pioctl_buf) { - pscan = (mlan_ds_scan *) pioctl_buf->pbuf; + pscan = (mlan_ds_scan *)pioctl_buf->pbuf; bg_scan_out = - (wlan_bgscan_cfg *) pscan->param.user_scan.scan_cfg_buf; + (wlan_bgscan_cfg *)pscan->param.user_scan.scan_cfg_buf; bg_scan_out->action = wlan_le16_to_cpu(bg_scan->action); if ((bg_scan_out->action == BG_SCAN_ACT_GET) && (bg_scan_out->action == BG_SCAN_ACT_GET_PPS_UAPSD)) { @@ -4406,21 +4749,25 @@ wlan_ret_bgscan_config(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_ret_802_11_bgscan_query(IN mlan_private * pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) +wlan_ret_802_11_bgscan_query(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { mlan_ds_scan *pscan = MNULL; mlan_adapter *pmadapter = pmpriv->adapter; ENTER(); wlan_ret_802_11_scan(pmpriv, resp, MNULL); if (pioctl_buf) { - pscan = (mlan_ds_scan *) pioctl_buf->pbuf; + pscan = (mlan_ds_scan *)pioctl_buf->pbuf; pscan->param.scan_resp.pscan_table = - (t_u8 *) pmadapter->pscan_table; + (t_u8 *)pmadapter->pscan_table; pscan->param.scan_resp.num_in_scan_table = pmadapter->num_in_scan_table; pscan->param.scan_resp.age_in_secs = pmadapter->age_in_secs; + pscan->param.scan_resp.pchan_stats = + (t_u8 *)pmadapter->pchan_stats; + pscan->param.scan_resp.num_in_chan_stats = + pmadapter->num_in_chan_stats; pioctl_buf->data_read_written = sizeof(mlan_scan_resp) + MLAN_SUB_COMMAND_SIZE; @@ -4441,9 +4788,8 @@ wlan_ret_802_11_bgscan_query(IN mlan_private * pmpriv, * @return index in BSSID list or < 0 if error */ t_s32 -wlan_find_ssid_in_list(IN mlan_private * pmpriv, - IN mlan_802_11_ssid * ssid, - IN t_u8 * bssid, IN t_u32 mode) +wlan_find_ssid_in_list(IN mlan_private *pmpriv, + IN mlan_802_11_ssid *ssid, IN t_u8 *bssid, IN t_u32 mode) { mlan_adapter *pmadapter = pmpriv->adapter; t_s32 net = -1, j; @@ -4526,8 +4872,7 @@ wlan_find_ssid_in_list(IN mlan_private * pmpriv, * @return index in BSSID list or < 0 if error */ t_s32 -wlan_find_bssid_in_list(IN mlan_private * pmpriv, - IN t_u8 * bssid, IN t_u32 mode) +wlan_find_bssid_in_list(IN mlan_private *pmpriv, IN t_u8 *bssid, IN t_u32 mode) { mlan_adapter *pmadapter = pmpriv->adapter; t_s32 net = -1; @@ -4587,7 +4932,7 @@ wlan_find_bssid_in_list(IN mlan_private * pmpriv, */ t_s32 wlan_ssid_cmp(IN pmlan_adapter pmadapter, - IN mlan_802_11_ssid * ssid1, IN mlan_802_11_ssid * ssid2) + IN mlan_802_11_ssid *ssid1, IN mlan_802_11_ssid *ssid2) { ENTER(); @@ -4613,7 +4958,7 @@ wlan_ssid_cmp(IN pmlan_adapter pmadapter, * @return N/A */ t_void -wlan_queue_scan_cmd(IN mlan_private * pmpriv, IN cmd_ctrl_node * pcmd_node) +wlan_queue_scan_cmd(IN mlan_private *pmpriv, IN cmd_ctrl_node *pcmd_node) { mlan_adapter *pmadapter = pmpriv->adapter; @@ -4621,9 +4966,10 @@ wlan_queue_scan_cmd(IN mlan_private * pmpriv, IN cmd_ctrl_node * pcmd_node) if (pcmd_node == MNULL) goto done; + pcmd_node->cmd_flag |= CMD_F_SCAN; util_enqueue_list_tail(pmadapter->pmoal_handle, &pmadapter->scan_pending_q, - (pmlan_linked_list) pcmd_node, + (pmlan_linked_list)pcmd_node, pmadapter->callbacks.moal_spin_lock, pmadapter->callbacks.moal_spin_unlock); @@ -4640,8 +4986,8 @@ wlan_queue_scan_cmd(IN mlan_private * pmpriv, IN cmd_ctrl_node * pcmd_node) * @return MLAN_STATUS_SUCCESS--success, otherwise--fail */ mlan_status -wlan_find_best_network(IN mlan_private * pmpriv, - OUT mlan_ssid_bssid * preq_ssid_bssid) +wlan_find_best_network(IN mlan_private *pmpriv, + OUT mlan_ssid_bssid *preq_ssid_bssid) { mlan_adapter *pmadapter = pmpriv->adapter; mlan_status ret = MLAN_STATUS_SUCCESS; @@ -4658,8 +5004,8 @@ wlan_find_best_network(IN mlan_private * pmpriv, preq_bss = &pmadapter->pscan_table[i]; memcpy(pmadapter, &preq_ssid_bssid->ssid, &preq_bss->ssid, sizeof(mlan_802_11_ssid)); - memcpy(pmadapter, (t_u8 *) & preq_ssid_bssid->bssid, - (t_u8 *) & preq_bss->mac_address, MLAN_MAC_ADDR_LENGTH); + memcpy(pmadapter, (t_u8 *)&preq_ssid_bssid->bssid, + (t_u8 *)&preq_bss->mac_address, MLAN_MAC_ADDR_LENGTH); /* Make sure we are in the right mode */ if (pmpriv->bss_mode == MLAN_BSS_MODE_AUTO) @@ -4690,13 +5036,13 @@ wlan_find_best_network(IN mlan_private * pmpriv, * @return MLAN_STATUS_SUCCESS--success, otherwise--fail */ mlan_status -wlan_scan_specific_ssid(IN mlan_private * pmpriv, - IN t_void * pioctl_buf, IN mlan_802_11_ssid * preq_ssid) +wlan_scan_specific_ssid(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, IN mlan_802_11_ssid *preq_ssid) { mlan_status ret = MLAN_STATUS_SUCCESS; - mlan_callbacks *pcb = (mlan_callbacks *) & pmpriv->adapter->callbacks; + mlan_callbacks *pcb = (mlan_callbacks *)&pmpriv->adapter->callbacks; wlan_user_scan_cfg *pscan_cfg; - pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *) pioctl_buf; + pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *)pioctl_buf; ENTER(); @@ -4706,12 +5052,11 @@ wlan_scan_specific_ssid(IN mlan_private * pmpriv, ret = MLAN_STATUS_FAILURE; goto done; } - wlan_scan_delete_ssid_table_entry(pmpriv, preq_ssid); ret = pcb->moal_malloc(pmpriv->adapter->pmoal_handle, sizeof(wlan_user_scan_cfg), MLAN_MEM_DEF, - (t_u8 **) & pscan_cfg); + (t_u8 **)&pscan_cfg); if (ret != MLAN_STATUS_SUCCESS || !pscan_cfg) { PRINTM(MERROR, "Memory allocation for pscan_cfg failed!\n"); @@ -4731,7 +5076,7 @@ wlan_scan_specific_ssid(IN mlan_private * pmpriv, if (pscan_cfg) pcb->moal_mfree(pmpriv->adapter->pmoal_handle, - (t_u8 *) pscan_cfg); + (t_u8 *)pscan_cfg); done: LEAVE(); @@ -4750,14 +5095,15 @@ wlan_scan_specific_ssid(IN mlan_private * pmpriv, * @return N/A */ t_void -wlan_save_curr_bcn(IN mlan_private * pmpriv) +wlan_save_curr_bcn(IN mlan_private *pmpriv) { mlan_adapter *pmadapter = pmpriv->adapter; - mlan_callbacks *pcb = (pmlan_callbacks) & pmadapter->callbacks; + mlan_callbacks *pcb = (pmlan_callbacks)&pmadapter->callbacks; BSSDescriptor_t *pcurr_bss = &pmpriv->curr_bss_params.bss_descriptor; mlan_status ret = MLAN_STATUS_SUCCESS; ENTER(); + pcb->moal_spin_lock(pmadapter->pmoal_handle, pmpriv->curr_bcn_buf_lock); /* save the beacon buffer if it is not saved or updated */ if ((pmpriv->pcurr_bcn_buf == MNULL) || (pmpriv->curr_bcn_size != pcurr_bss->beacon_buf_size) || @@ -4788,6 +5134,10 @@ wlan_save_curr_bcn(IN mlan_private * pmpriv) } } } + wlan_update_curr_bcn(pmpriv); + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmpriv->curr_bcn_buf_lock); + LEAVE(); } @@ -4799,10 +5149,10 @@ wlan_save_curr_bcn(IN mlan_private * pmpriv) * @return N/A */ t_void -wlan_free_curr_bcn(IN mlan_private * pmpriv) +wlan_free_curr_bcn(IN mlan_private *pmpriv) { mlan_adapter *pmadapter = pmpriv->adapter; - mlan_callbacks *pcb = (pmlan_callbacks) & pmadapter->callbacks; + mlan_callbacks *pcb = (pmlan_callbacks)&pmadapter->callbacks; ENTER(); if (pmpriv->pcurr_bcn_buf) { diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sdio.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sdio.c old mode 100755 new mode 100644 index ec49cee5..05ea523a --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sdio.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sdio.c @@ -39,6 +39,28 @@ Change log: Local Variables ********************************************************/ +/** FW header length for CRC check disable */ +#define FW_CRC_HEADER_RB2 28 +/** FW header for CRC check disable */ +static t_u8 fw_crc_header_rb2[FW_CRC_HEADER_RB2] = { + 0x05, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, + 0x9d, 0x32, 0xbb, 0x11, + 0x01, 0x00, 0x00, 0x7f, + 0x00, 0x00, 0x00, 0x00, + 0x67, 0xd6, 0xfc, 0x25 +}; + +/** FW header length for CRC check disable */ +#define FW_CRC_HEADER_RB 24 +/** FW header for CRC check disable */ +static t_u8 fw_crc_header_rb[FW_CRC_HEADER_RB] = { + 0x01, 0x00, 0x00, 0x00, 0x04, 0xfd, 0x00, 0x04, + 0x08, 0x00, 0x00, 0x00, 0x26, 0x52, 0x2a, 0x7b, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + /******************************************************** Global Variables ********************************************************/ @@ -54,47 +76,97 @@ Change log: * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_sdio_init_ioport(mlan_adapter * pmadapter) +wlan_sdio_init_ioport(mlan_adapter *pmadapter) { t_u32 reg; pmlan_callbacks pcb = &pmadapter->callbacks; + const mlan_sdio_device *psdio_device = pmadapter->psdio_device; + t_u8 host_int_rsr_reg = psdio_device->host_int_rsr_reg; + t_u8 host_int_rsr_mask = psdio_device->reg->sdio_int_mask; + t_u8 card_misc_cfg_reg = psdio_device->reg->card_misc_cfg_reg; + t_u8 card_config_2_1_reg = psdio_device->card_config_2_1_reg; + t_u8 cmd_config_0 = psdio_device->cmd_config_0; + t_u8 cmd_config_1 = psdio_device->cmd_config_1; + ENTER(); pmadapter->ioport = 0; - /* Read the IO port */ - if (MLAN_STATUS_SUCCESS == - pcb->moal_read_reg(pmadapter->pmoal_handle, IO_PORT_0_REG, ®)) - pmadapter->ioport |= (reg & 0xff); - else { - LEAVE(); - return MLAN_STATUS_FAILURE; - } - - if (MLAN_STATUS_SUCCESS == - pcb->moal_read_reg(pmadapter->pmoal_handle, IO_PORT_1_REG, ®)) - pmadapter->ioport |= ((reg & 0xff) << 8); - else { - LEAVE(); - return MLAN_STATUS_FAILURE; - } - - if (MLAN_STATUS_SUCCESS == - pcb->moal_read_reg(pmadapter->pmoal_handle, IO_PORT_2_REG, ®)) - pmadapter->ioport |= ((reg & 0xff) << 16); - else { - LEAVE(); - return MLAN_STATUS_FAILURE; + if (psdio_device->supports_sdio_new_mode) { + pmadapter->ioport = MEM_PORT; + } else { + if (MLAN_STATUS_SUCCESS == + pcb->moal_read_reg(pmadapter->pmoal_handle, + psdio_device->io_port_0_reg, ®)) + pmadapter->ioport |= (reg & 0xff); + else { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + if (MLAN_STATUS_SUCCESS == + pcb->moal_read_reg(pmadapter->pmoal_handle, + psdio_device->io_port_1_reg, ®)) + pmadapter->ioport |= ((reg & 0xff) << 8); + else { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + if (MLAN_STATUS_SUCCESS == + pcb->moal_read_reg(pmadapter->pmoal_handle, + psdio_device->io_port_2_reg, ®)) + pmadapter->ioport |= ((reg & 0xff) << 16); + else { + LEAVE(); + return MLAN_STATUS_FAILURE; + } } PRINTM(MINFO, "SDIO FUNC1 IO port: 0x%x\n", pmadapter->ioport); + if (psdio_device->supports_sdio_new_mode) { + /* enable sdio cmd53 new mode */ + if (MLAN_STATUS_SUCCESS == + pcb->moal_read_reg(pmadapter->pmoal_handle, + card_config_2_1_reg, ®)) { + pcb->moal_write_reg(pmadapter->pmoal_handle, + card_config_2_1_reg, + reg | CMD53_NEW_MODE); + } else { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + /* configure cmd port */ + /* enable reading rx length from the register */ + if (MLAN_STATUS_SUCCESS == + pcb->moal_read_reg(pmadapter->pmoal_handle, cmd_config_0, + ®)) { + pcb->moal_write_reg(pmadapter->pmoal_handle, + cmd_config_0, + reg | CMD_PORT_RD_LEN_EN); + } else { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + /* enable Dnld/Upld ready auto reset for cmd port after cmd53 + is completed */ + if (MLAN_STATUS_SUCCESS == + pcb->moal_read_reg(pmadapter->pmoal_handle, cmd_config_1, + ®)) { + pcb->moal_write_reg(pmadapter->pmoal_handle, + cmd_config_1, + reg | CMD_PORT_AUTO_EN); + } else { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + } /* Set Host interrupt reset to read to clear */ if (MLAN_STATUS_SUCCESS == - pcb->moal_read_reg(pmadapter->pmoal_handle, HOST_INT_RSR_REG, + pcb->moal_read_reg(pmadapter->pmoal_handle, host_int_rsr_reg, ®)) { - pcb->moal_write_reg(pmadapter->pmoal_handle, HOST_INT_RSR_REG, - reg | HOST_INT_RSR_MASK); + pcb->moal_write_reg(pmadapter->pmoal_handle, host_int_rsr_reg, + reg | host_int_rsr_mask); } else { LEAVE(); return MLAN_STATUS_FAILURE; @@ -102,9 +174,9 @@ wlan_sdio_init_ioport(mlan_adapter * pmadapter) /* Dnld/Upld ready set to auto reset */ if (MLAN_STATUS_SUCCESS == - pcb->moal_read_reg(pmadapter->pmoal_handle, CARD_MISC_CFG_REG, + pcb->moal_read_reg(pmadapter->pmoal_handle, card_misc_cfg_reg, ®)) { - pcb->moal_write_reg(pmadapter->pmoal_handle, CARD_MISC_CFG_REG, + pcb->moal_write_reg(pmadapter->pmoal_handle, card_misc_cfg_reg, reg | AUTO_RE_ENABLE_INT); } else { LEAVE(); @@ -123,7 +195,7 @@ wlan_sdio_init_ioport(mlan_adapter * pmadapter) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_write_data_sync(mlan_adapter * pmadapter, mlan_buffer * pmbuf, t_u32 port) +wlan_write_data_sync(mlan_adapter *pmadapter, mlan_buffer *pmbuf, t_u32 port) { t_u32 i = 0; pmlan_callbacks pcb = &pmadapter->callbacks; @@ -165,34 +237,44 @@ wlan_write_data_sync(mlan_adapter * pmadapter, mlan_buffer * pmbuf, t_u32 port) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_get_rd_port(mlan_adapter * pmadapter, t_u8 * pport) +wlan_get_rd_port(mlan_adapter *pmadapter, t_u8 *pport) { t_u32 rd_bitmap = pmadapter->mp_rd_bitmap; + const mlan_sdio_device *psdio_device = pmadapter->psdio_device; + const mlan_sdio_card_reg *reg = psdio_device->reg; + t_bool new_mode = psdio_device->supports_sdio_new_mode; + t_u8 max_ports = psdio_device->max_ports; ENTER(); PRINTM(MIF_D, "wlan_get_rd_port: mp_rd_bitmap=0x%08x\n", rd_bitmap); - if (!(rd_bitmap & (CTRL_PORT_MASK | DATA_PORT_MASK))) { - LEAVE(); - return MLAN_STATUS_FAILURE; + if (new_mode) { + if (!(rd_bitmap & reg->data_port_mask)) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + } else { + if (!(rd_bitmap & (CTRL_PORT_MASK | reg->data_port_mask))) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } } - if (pmadapter->mp_rd_bitmap & CTRL_PORT_MASK) { - pmadapter->mp_rd_bitmap &= (t_u32) (~CTRL_PORT_MASK); + if (!new_mode && (pmadapter->mp_rd_bitmap & CTRL_PORT_MASK)) { + pmadapter->mp_rd_bitmap &= (t_u32)(~CTRL_PORT_MASK); *pport = CTRL_PORT; PRINTM(MIF_D, "wlan_get_rd_port: port=%d mp_rd_bitmap=0x%08x\n", *pport, pmadapter->mp_rd_bitmap); } else { if (pmadapter->mp_rd_bitmap & (1 << pmadapter->curr_rd_port)) { pmadapter->mp_rd_bitmap &= - (t_u32) (~(1 << pmadapter->curr_rd_port)); + (t_u32)(~(1 << pmadapter->curr_rd_port)); *pport = pmadapter->curr_rd_port; /* hw rx wraps round only after port (MAX_PORT-1) */ - if (++pmadapter->curr_rd_port == MAX_PORT) - /* port 0 is reserved for cmd port */ - pmadapter->curr_rd_port = 1; + if (++pmadapter->curr_rd_port == max_ports) + pmadapter->curr_rd_port = reg->start_rd_port; } else { LEAVE(); return MLAN_STATUS_FAILURE; @@ -213,9 +295,12 @@ wlan_get_rd_port(mlan_adapter * pmadapter, t_u8 * pport) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_get_wr_port_data(mlan_adapter * pmadapter, t_u8 * pport) +wlan_get_wr_port_data(mlan_adapter *pmadapter, t_u8 *pport) { t_u32 wr_bitmap = pmadapter->mp_wr_bitmap; + const mlan_sdio_device *psdio_device = pmadapter->psdio_device; + const mlan_sdio_card_reg *reg = psdio_device->reg; + t_bool new_mode = psdio_device->supports_sdio_new_mode; ENTER(); @@ -230,17 +315,17 @@ wlan_get_wr_port_data(mlan_adapter * pmadapter, t_u8 * pport) if (pmadapter->mp_wr_bitmap & (1 << pmadapter->curr_wr_port)) { pmadapter->mp_wr_bitmap &= - (t_u32) (~(1 << pmadapter->curr_wr_port)); + (t_u32)(~(1 << pmadapter->curr_wr_port)); *pport = pmadapter->curr_wr_port; if (++pmadapter->curr_wr_port == pmadapter->mp_end_port) - pmadapter->curr_wr_port = 1; + pmadapter->curr_wr_port = reg->start_wr_port; } else { pmadapter->data_sent = MTRUE; LEAVE(); return MLAN_STATUS_RESOURCE; } - if (*pport == CTRL_PORT) { + if ((!new_mode) && (*pport == CTRL_PORT)) { PRINTM(MERROR, "Invalid data port=%d cur port=%d mp_wr_bitmap=0x%08x -> 0x%08x\n", *pport, pmadapter->curr_wr_port, wr_bitmap, @@ -263,7 +348,7 @@ wlan_get_wr_port_data(mlan_adapter * pmadapter, t_u8 * pport) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_sdio_poll_card_status(mlan_adapter * pmadapter, t_u8 bits) +wlan_sdio_poll_card_status(mlan_adapter *pmadapter, t_u8 bits) { pmlan_callbacks pcb = &pmadapter->callbacks; t_u32 tries; @@ -272,10 +357,9 @@ wlan_sdio_poll_card_status(mlan_adapter * pmadapter, t_u8 bits) ENTER(); for (tries = 0; tries < MAX_POLL_TRIES; tries++) { - if (pcb-> - moal_read_reg(pmadapter->pmoal_handle, - CARD_TO_HOST_EVENT_REG, - &cs) != MLAN_STATUS_SUCCESS) + if (pcb->moal_read_reg(pmadapter->pmoal_handle, + pmadapter->psdio_device->reg->poll_reg, + &cs) != MLAN_STATUS_SUCCESS) break; else if ((cs & bits) == bits) { LEAVE(); @@ -295,31 +379,33 @@ wlan_sdio_poll_card_status(mlan_adapter * pmadapter, t_u8 bits) * @brief This function reads firmware status registers * * @param pmadapter A pointer to mlan_adapter structure - * @param dat A pointer to keep returned data + * @param dat A pointer to keep returned data * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_sdio_read_fw_status(mlan_adapter * pmadapter, t_u16 * dat) +wlan_sdio_read_fw_status(mlan_adapter *pmadapter, t_u16 *dat) { pmlan_callbacks pcb = &pmadapter->callbacks; t_u32 fws0 = 0, fws1 = 0; ENTER(); - if (MLAN_STATUS_SUCCESS != - pcb->moal_read_reg(pmadapter->pmoal_handle, CARD_FW_STATUS0_REG, - &fws0)) { + if (MLAN_STATUS_SUCCESS != pcb->moal_read_reg(pmadapter->pmoal_handle, + pmadapter->psdio_device-> + reg->status_reg_0, + &fws0)) { LEAVE(); return MLAN_STATUS_FAILURE; } - if (MLAN_STATUS_SUCCESS != - pcb->moal_read_reg(pmadapter->pmoal_handle, CARD_FW_STATUS1_REG, - &fws1)) { + if (MLAN_STATUS_SUCCESS != pcb->moal_read_reg(pmadapter->pmoal_handle, + pmadapter->psdio_device-> + reg->status_reg_1, + &fws1)) { LEAVE(); return MLAN_STATUS_FAILURE; } - *dat = (t_u16) ((fws1 << 8) | fws0); + *dat = (t_u16)((fws1 << 8) | fws0); LEAVE(); return MLAN_STATUS_SUCCESS; } @@ -327,7 +413,7 @@ wlan_sdio_read_fw_status(mlan_adapter * pmadapter, t_u16 * dat) /** @brief This function disables the host interrupts mask. * * @param pmadapter A pointer to mlan_adapter structure - * @param mask the interrupt mask + * @param mask the interrupt mask * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status @@ -339,9 +425,10 @@ wlan_sdio_disable_host_int_mask(pmlan_adapter pmadapter, t_u8 mask) ENTER(); /* Read back the host_int_mask register */ - if (MLAN_STATUS_SUCCESS != - pcb->moal_read_reg(pmadapter->pmoal_handle, HOST_INT_MASK_REG, - &host_int_mask)) { + if (MLAN_STATUS_SUCCESS != pcb->moal_read_reg(pmadapter->pmoal_handle, + pmadapter->psdio_device-> + host_int_mask_reg, + &host_int_mask)) { LEAVE(); return MLAN_STATUS_FAILURE; } @@ -349,9 +436,10 @@ wlan_sdio_disable_host_int_mask(pmlan_adapter pmadapter, t_u8 mask) /* Update with the mask and write back to the register */ host_int_mask &= ~mask; - if (MLAN_STATUS_SUCCESS != - pcb->moal_write_reg(pmadapter->pmoal_handle, HOST_INT_MASK_REG, - host_int_mask)) { + if (MLAN_STATUS_SUCCESS != pcb->moal_write_reg(pmadapter->pmoal_handle, + pmadapter->psdio_device-> + host_int_mask_reg, + host_int_mask)) { PRINTM(MWARN, "Disable host interrupt failed\n"); LEAVE(); return MLAN_STATUS_FAILURE; @@ -365,7 +453,7 @@ wlan_sdio_disable_host_int_mask(pmlan_adapter pmadapter, t_u8 mask) * @brief This function enables the host interrupts mask * * @param pmadapter A pointer to mlan_adapter structure - * @param mask the interrupt mask + * @param mask the interrupt mask * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status @@ -376,9 +464,10 @@ wlan_sdio_enable_host_int_mask(pmlan_adapter pmadapter, t_u8 mask) ENTER(); /* Simply write the mask to the register */ - if (MLAN_STATUS_SUCCESS != - pcb->moal_write_reg(pmadapter->pmoal_handle, HOST_INT_MASK_REG, - mask)) { + if (MLAN_STATUS_SUCCESS != pcb->moal_write_reg(pmadapter->pmoal_handle, + pmadapter->psdio_device-> + host_int_mask_reg, + mask)) { PRINTM(MWARN, "Enable host interrupt failed\n"); LEAVE(); return MLAN_STATUS_FAILURE; @@ -391,7 +480,7 @@ wlan_sdio_enable_host_int_mask(pmlan_adapter pmadapter, t_u8 mask) /** * @brief This function reads data from the card. * - * @param pmadapter A pointer to mlan_adapter structure + * @param pmadapter A pointer to mlan_adapter structure * @param type A pointer to keep type as data or command * @param nb A pointer to keep the data/cmd length returned in buffer * @param pmbuf A pointer to the SDIO data/cmd buffer @@ -400,8 +489,8 @@ wlan_sdio_enable_host_int_mask(pmlan_adapter pmadapter, t_u8 mask) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_sdio_card_to_host(mlan_adapter * pmadapter, - t_u32 * type, t_u32 * nb, pmlan_buffer pmbuf, +wlan_sdio_card_to_host(mlan_adapter *pmadapter, + t_u32 *type, t_u32 *nb, pmlan_buffer pmbuf, t_u32 npayload, t_u32 ioport) { mlan_status ret = MLAN_STATUS_SUCCESS; @@ -424,7 +513,7 @@ wlan_sdio_card_to_host(mlan_adapter * pmadapter, ret = MLAN_STATUS_FAILURE; goto exit; } - *nb = wlan_le16_to_cpu(*(t_u16 *) (pmbuf->pbuf + pmbuf->data_offset)); + *nb = wlan_le16_to_cpu(*(t_u16 *)(pmbuf->pbuf + pmbuf->data_offset)); if (*nb > npayload) { PRINTM(MERROR, "invalid packet, *nb=%d, npayload=%d\n", *nb, npayload); @@ -454,7 +543,7 @@ wlan_sdio_card_to_host(mlan_adapter * pmadapter, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_prog_fw_w_helper(IN pmlan_adapter pmadapter, t_u8 * fw, t_u32 fw_len) +wlan_prog_fw_w_helper(IN pmlan_adapter pmadapter, t_u8 *fw, t_u32 fw_len) { mlan_status ret = MLAN_STATUS_SUCCESS; pmlan_callbacks pcb = &pmadapter->callbacks; @@ -469,6 +558,20 @@ wlan_prog_fw_w_helper(IN pmlan_adapter pmadapter, t_u8 * fw, t_u32 fw_len) t_u16 len = 0; t_u32 txlen = 0, tx_blocks = 0, tries = 0; t_u32 i = 0; + t_u16 card_type = pmadapter->card_type; + const mlan_sdio_card_reg *reg = pmadapter->psdio_device->reg; + t_u32 read_base_0_reg = reg->base_0_reg; + t_u32 read_base_1_reg = reg->base_1_reg; + t_u8 crc_buffer = 0; + t_u8 *header_crc_fw; + t_u8 header_crc_fw_len = 0; + if (IS_SD8787(card_type)) { + header_crc_fw = fw_crc_header_rb; + header_crc_fw_len = FW_CRC_HEADER_RB; + } else { + header_crc_fw = fw_crc_header_rb2; + header_crc_fw_len = FW_CRC_HEADER_RB2; + } ENTER(); @@ -482,8 +585,7 @@ wlan_prog_fw_w_helper(IN pmlan_adapter pmadapter, t_u8 * fw, t_u32 fw_len) tmpfwbufsz = ALIGN_SZ(WLAN_UPLD_SIZE, DMA_ALIGNMENT); ret = pcb->moal_malloc(pmadapter->pmoal_handle, tmpfwbufsz, - MLAN_MEM_DEF | MLAN_MEM_DMA, - (t_u8 **) & tmpfwbuf); + MLAN_MEM_DEF | MLAN_MEM_DMA, (t_u8 **)&tmpfwbuf); if ((ret != MLAN_STATUS_SUCCESS) || !tmpfwbuf) { PRINTM(MERROR, "Unable to allocate buffer for firmware. Terminating download\n"); @@ -492,7 +594,18 @@ wlan_prog_fw_w_helper(IN pmlan_adapter pmadapter, t_u8 * fw, t_u32 fw_len) } memset(pmadapter, tmpfwbuf, 0, tmpfwbufsz); /* Ensure 8-byte aligned firmware buffer */ - fwbuf = (t_u8 *) ALIGN_ADDR(tmpfwbuf, DMA_ALIGNMENT); + fwbuf = (t_u8 *)ALIGN_ADDR(tmpfwbuf, DMA_ALIGNMENT); + + if (!pmadapter->init_para.fw_crc_check + && (IS_SD8777(card_type) || (IS_SD8787(card_type))) + ) { + /* CRC check not required, use custom header first */ + + firmware = header_crc_fw; + firmwarelen = header_crc_fw_len; + + crc_buffer = 1; + } /* Perform firmware data transfer */ do { @@ -508,13 +621,16 @@ wlan_prog_fw_w_helper(IN pmlan_adapter pmadapter, t_u8 * fw, t_u32 fw_len) goto done; } - /* More data? */ - if (firmwarelen && offset >= firmwarelen) - break; + if (!crc_buffer + && (IS_SD8777(card_type) || (IS_SD8787(card_type))) + ) + /* More data? */ + if (firmwarelen && offset >= firmwarelen) + break; for (tries = 0; tries < MAX_POLL_TRIES; tries++) { ret = pcb->moal_read_reg(pmadapter->pmoal_handle, - READ_BASE_0_REG, &base0); + read_base_0_reg, &base0); if (ret != MLAN_STATUS_SUCCESS) { PRINTM(MERROR, "Dev BASE0 register read failed:" " base0=0x%04X(%d). Terminating download\n", @@ -522,14 +638,14 @@ wlan_prog_fw_w_helper(IN pmlan_adapter pmadapter, t_u8 * fw, t_u32 fw_len) goto done; } ret = pcb->moal_read_reg(pmadapter->pmoal_handle, - READ_BASE_1_REG, &base1); + read_base_1_reg, &base1); if (ret != MLAN_STATUS_SUCCESS) { PRINTM(MERROR, "Dev BASE1 register read failed:" " base1=0x%04X(%d). Terminating download\n", base1, base1); goto done; } - len = (t_u16) (((base1 & 0xff) << 8) | (base0 & 0xff)); + len = (t_u16)(((base1 & 0xff) << 8) | (base0 & 0xff)); if (len) break; @@ -591,7 +707,7 @@ wlan_prog_fw_w_helper(IN pmlan_adapter pmadapter, t_u8 * fw, t_u32 fw_len) /* Send data */ memset(pmadapter, &mbuf, 0, sizeof(mlan_buffer)); - mbuf.pbuf = (t_u8 *) fwbuf; + mbuf.pbuf = (t_u8 *)fwbuf; mbuf.data_len = tx_blocks * MLAN_SDIO_BLOCK_SIZE_FW_DNLD; ret = pcb->moal_write_data_sync(pmadapter->pmoal_handle, &mbuf, @@ -612,6 +728,16 @@ wlan_prog_fw_w_helper(IN pmlan_adapter pmadapter, t_u8 * fw, t_u32 fw_len) } offset += txlen; + if (crc_buffer && offset >= header_crc_fw_len + && (IS_SD8777(card_type) || (IS_SD8787(card_type))) + ) { + /* Custom header download complete, restore original FW + */ + offset = 0; + firmware = fw; + firmwarelen = fw_len; + crc_buffer = 0; + } } while (MTRUE); PRINTM(MMSG, "Wlan: FW download over, firmwarelen=%d downloaded %d\n", @@ -620,7 +746,7 @@ wlan_prog_fw_w_helper(IN pmlan_adapter pmadapter, t_u8 * fw, t_u32 fw_len) ret = MLAN_STATUS_SUCCESS; done: if (tmpfwbuf) - pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *) tmpfwbuf); + pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)tmpfwbuf); LEAVE(); return ret; @@ -653,7 +779,7 @@ wlan_disable_host_int(pmlan_adapter pmadapter) * @return MLAN_STATUS_SUCCESS */ static mlan_status -wlan_decode_rx_packet(mlan_adapter * pmadapter, mlan_buffer * pmbuf, +wlan_decode_rx_packet(mlan_adapter *pmadapter, mlan_buffer *pmbuf, t_u32 upld_typ) { t_u8 *cmd_buf; @@ -669,7 +795,7 @@ wlan_decode_rx_packet(mlan_adapter * pmadapter, mlan_buffer * pmbuf, if (pmadapter->rx_work_flag) { util_enqueue_list_tail(pmadapter->pmoal_handle, &pmadapter->rx_data_queue, - (pmlan_linked_list) pmbuf, + (pmlan_linked_list)pmbuf, pmadapter->callbacks. moal_spin_lock, pmadapter->callbacks. @@ -714,13 +840,20 @@ wlan_decode_rx_packet(mlan_adapter * pmadapter, mlan_buffer * pmbuf, pmbuf->data_len = pmadapter->upld_len; pmbuf->data_offset += INTF_HEADER_LEN; pmadapter->curr_cmd->respbuf = pmbuf; + if (pmadapter->upld_len >= MRVDRV_SIZE_OF_CMD_BUFFER) { + PRINTM(MMSG, "Invalid CmdResp len=%d\n", + pmadapter->upld_len); + DBG_HEXDUMP(MERROR, "Invalid CmdResp", + pmbuf->pbuf + pmbuf->data_offset, + MAX_DATA_DUMP_LEN); + } } break; case MLAN_TYPE_EVENT: PRINTM(MINFO, "--- Rx: Event ---\n"); - event = *(t_u32 *) & pmbuf->pbuf[pmbuf->data_offset + - INTF_HEADER_LEN]; + event = *(t_u32 *)&pmbuf->pbuf[pmbuf->data_offset + + INTF_HEADER_LEN]; pmadapter->event_cause = wlan_le32_to_cpu(event); if ((pmadapter->upld_len > MLAN_EVENT_HEADER_LEN) && ((pmadapter->upld_len - MLAN_EVENT_HEADER_LEN) < @@ -759,7 +892,7 @@ wlan_decode_rx_packet(mlan_adapter * pmadapter, mlan_buffer * pmbuf, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_receive_mp_aggr_buf(mlan_adapter * pmadapter) +wlan_receive_mp_aggr_buf(mlan_adapter *pmadapter) { mlan_status ret = MLAN_STATUS_SUCCESS; pmlan_callbacks pcb = &pmadapter->callbacks; @@ -769,6 +902,9 @@ wlan_receive_mp_aggr_buf(mlan_adapter * pmadapter) t_u32 pkt_len, pkt_type = 0; t_u8 *curr_ptr; t_u32 cmd53_port = 0; + t_u32 port_count = 0; + t_bool new_mode = pmadapter->psdio_device->supports_sdio_new_mode; + t_u8 mp_aggr_pkt_limit = pmadapter->psdio_device->mp_aggr_pkt_limit; /* do aggr RX now */ PRINTM(MINFO, "do_rx_aggr: num of packets: %d\n", @@ -776,50 +912,92 @@ wlan_receive_mp_aggr_buf(mlan_adapter * pmadapter) memset(pmadapter, &mbuf_aggr, 0, sizeof(mlan_buffer)); - mbuf_aggr.pbuf = (t_u8 *) pmadapter->mpa_rx.buf; - mbuf_aggr.data_len = pmadapter->mpa_rx.buf_len; + if (pmadapter->max_segs >= mp_aggr_pkt_limit && + pmadapter->mpa_rx.pkt_cnt > 1) { + mbuf_aggr.data_len = pmadapter->mpa_rx.buf_len; + mbuf_aggr.pnext = mbuf_aggr.pprev = &mbuf_aggr; + mbuf_aggr.use_count = 0; + for (pind = 0; pind < pmadapter->mpa_rx.pkt_cnt; pind++) { + pmadapter->mpa_rx.mbuf_arr[pind]->data_len = + pmadapter->mpa_rx.len_arr[pind]; + wlan_link_buf_to_aggr(&mbuf_aggr, + pmadapter->mpa_rx.mbuf_arr[pind]); + } + } else { + mbuf_aggr.pbuf = (t_u8 *)pmadapter->mpa_rx.buf; + mbuf_aggr.data_len = pmadapter->mpa_rx.buf_len; + } - cmd53_port = (pmadapter->ioport | SDIO_MPA_ADDR_BASE | - (pmadapter->mpa_rx.ports << 4)) + - pmadapter->mpa_rx.start_port; + if (new_mode) { + port_count = bitcount(pmadapter->mpa_rx.ports) - 1; + /* port_count = pmadapter->mpa_rx.pkt_cnt - 1; */ + cmd53_port = + (pmadapter-> + ioport | SDIO_MPA_ADDR_BASE | (port_count << 8)) + + pmadapter->mpa_rx.start_port; + } else { + cmd53_port = (pmadapter->ioport | SDIO_MPA_ADDR_BASE | + (pmadapter->mpa_rx.ports << 4)) + + pmadapter->mpa_rx.start_port; + } if (MLAN_STATUS_SUCCESS != pcb->moal_read_data_sync(pmadapter->pmoal_handle, &mbuf_aggr, cmd53_port, 0)) { ret = MLAN_STATUS_FAILURE; goto done; } - DBG_HEXDUMP(MIF_D, "SDIO MP-A Blk Rd", pmadapter->mpa_rx.buf, - MIN(pmadapter->mpa_rx.buf_len, MAX_DATA_DUMP_LEN)); - - curr_ptr = pmadapter->mpa_rx.buf; - - for (pind = 0; pind < pmadapter->mpa_rx.pkt_cnt; pind++) { - - /* get curr PKT len & type */ - pkt_len = wlan_le16_to_cpu(*(t_u16 *) & curr_ptr[0]); - pkt_type = wlan_le16_to_cpu(*(t_u16 *) & curr_ptr[2]); - - PRINTM(MINFO, "RX: [%d] pktlen: %d pkt_type: 0x%x\n", pind, - pkt_len, pkt_type); - - /* copy pkt to deaggr buf */ - mbuf_deaggr = pmadapter->mpa_rx.mbuf_arr[pind]; - if ((pkt_type == MLAN_TYPE_DATA) && - (pkt_len <= pmadapter->mpa_rx.len_arr[pind])) { - memcpy(pmadapter, - mbuf_deaggr->pbuf + mbuf_deaggr->data_offset, - curr_ptr, pkt_len); + if (pmadapter->max_segs >= mp_aggr_pkt_limit && + pmadapter->mpa_rx.pkt_cnt > 1) { + for (pind = 0; pind < pmadapter->mpa_rx.pkt_cnt; pind++) { + mbuf_deaggr = pmadapter->mpa_rx.mbuf_arr[pind]; + pkt_len = + wlan_le16_to_cpu(*(t_u16 *) + (mbuf_deaggr->pbuf + + mbuf_deaggr->data_offset)); + pkt_type = + wlan_le16_to_cpu(*(t_u16 *) + (mbuf_deaggr->pbuf + + mbuf_deaggr->data_offset + + 2)); pmadapter->upld_len = pkt_len; - /* Process de-aggr packet */ wlan_decode_rx_packet(pmadapter, mbuf_deaggr, pkt_type); - } else { - PRINTM(MERROR, - "Wrong aggr packet: type=%d, len=%d, max_len=%d\n", - pkt_type, pkt_len, - pmadapter->mpa_rx.len_arr[pind]); - wlan_free_mlan_buffer(pmadapter, mbuf_deaggr); } - curr_ptr += pmadapter->mpa_rx.len_arr[pind]; + } else { + DBG_HEXDUMP(MIF_D, "SDIO MP-A Blk Rd", pmadapter->mpa_rx.buf, + MIN(pmadapter->mpa_rx.buf_len, MAX_DATA_DUMP_LEN)); + + curr_ptr = pmadapter->mpa_rx.buf; + + for (pind = 0; pind < pmadapter->mpa_rx.pkt_cnt; pind++) { + + /* get curr PKT len & type */ + pkt_len = wlan_le16_to_cpu(*(t_u16 *)&curr_ptr[0]); + pkt_type = wlan_le16_to_cpu(*(t_u16 *)&curr_ptr[2]); + + PRINTM(MINFO, "RX: [%d] pktlen: %d pkt_type: 0x%x\n", + pind, pkt_len, pkt_type); + + /* copy pkt to deaggr buf */ + mbuf_deaggr = pmadapter->mpa_rx.mbuf_arr[pind]; + if ((pkt_type == MLAN_TYPE_DATA) && + (pkt_len <= pmadapter->mpa_rx.len_arr[pind])) { + memcpy(pmadapter, + mbuf_deaggr->pbuf + + mbuf_deaggr->data_offset, curr_ptr, + pkt_len); + pmadapter->upld_len = pkt_len; + /* Process de-aggr packet */ + wlan_decode_rx_packet(pmadapter, mbuf_deaggr, + pkt_type); + } else { + PRINTM(MERROR, + "Wrong aggr packet: type=%d, len=%d, max_len=%d\n", + pkt_type, pkt_len, + pmadapter->mpa_rx.len_arr[pind]); + wlan_free_mlan_buffer(pmadapter, mbuf_deaggr); + } + curr_ptr += pmadapter->mpa_rx.len_arr[pind]; + } } pmadapter->mpa_rx_count[pmadapter->mpa_rx.pkt_cnt - 1]++; MP_RX_AGGR_BUF_RESET(pmadapter); @@ -837,8 +1015,8 @@ wlan_receive_mp_aggr_buf(mlan_adapter * pmadapter) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_sdio_card_to_host_mp_aggr(mlan_adapter * pmadapter, mlan_buffer - * pmbuf, t_u8 port, t_u16 rx_len) +wlan_sdio_card_to_host_mp_aggr(mlan_adapter *pmadapter, mlan_buffer + *pmbuf, t_u8 port, t_u16 rx_len) { mlan_status ret = MLAN_STATUS_SUCCESS; t_s32 f_do_rx_aggr = 0; @@ -846,10 +1024,13 @@ wlan_sdio_card_to_host_mp_aggr(mlan_adapter * pmadapter, mlan_buffer t_s32 f_aggr_cur = 0; t_u32 pind = 0; t_u32 pkt_type = 0; + const mlan_sdio_device *psdio_device = pmadapter->psdio_device; + const mlan_sdio_card_reg *reg = psdio_device->reg; + t_bool new_mode = psdio_device->supports_sdio_new_mode; ENTER(); - if (port == CTRL_PORT) { + if (!new_mode && (port == CTRL_PORT)) { /* Read the command response or event without aggr */ PRINTM(MINFO, "card_2_host_mp_aggr: No aggr for control port\n"); @@ -866,7 +1047,10 @@ wlan_sdio_card_to_host_mp_aggr(mlan_adapter * pmadapter, mlan_buffer goto rx_curr_single; } - if (pmadapter->mp_rd_bitmap & (~((t_u32) CTRL_PORT_MASK))) { + if ((new_mode && + (pmadapter->mp_rd_bitmap & reg->data_port_mask)) || + (!new_mode && + (pmadapter->mp_rd_bitmap & (~((t_u32)CTRL_PORT_MASK))))) { /* Some more data RX pending */ PRINTM(MINFO, "card_2_host_mp_aggr: Not last packet\n"); @@ -904,10 +1088,20 @@ wlan_sdio_card_to_host_mp_aggr(mlan_adapter * pmadapter, mlan_buffer if (f_aggr_cur) { PRINTM(MINFO, "Current packet aggregation.\n"); /* Curr pkt can be aggregated */ - MP_RX_AGGR_SETUP(pmadapter, pmbuf, port, rx_len); + if (pmadapter->psdio_device->supports_sdio_new_mode) { + MP_RX_AGGR_SETUP_NEWMODE(pmadapter, pmbuf, port, + rx_len); + } else { + MP_RX_AGGR_SETUP_NONEWMODE(pmadapter, pmbuf, port, + rx_len); + } if (MP_RX_AGGR_PKT_LIMIT_REACHED(pmadapter) || - MP_RX_AGGR_PORT_LIMIT_REACHED(pmadapter)) { + (((pmadapter->psdio_device->supports_sdio_new_mode) && + (MP_RX_AGGR_PORT_LIMIT_REACHED_NEWMODE(pmadapter))) || + ((!pmadapter->psdio_device->supports_sdio_new_mode) && + (MP_RX_AGGR_PORT_LIMIT_REACHED_NONEWMODE(pmadapter)))) + ) { PRINTM(MINFO, "card_2_host_mp_aggr: Aggregation Packet limit reached\n"); /* No more pkts allowed in Aggr buf, rx it */ @@ -929,23 +1123,30 @@ wlan_sdio_card_to_host_mp_aggr(mlan_adapter * pmadapter, mlan_buffer if (MLAN_STATUS_SUCCESS != wlan_sdio_card_to_host(pmadapter, &pkt_type, - (t_u32 *) & pmadapter->upld_len, - pmbuf, rx_len, - pmadapter->ioport + port)) { + (t_u32 *)&pmadapter->upld_len, pmbuf, + rx_len, pmadapter->ioport + port)) { ret = MLAN_STATUS_FAILURE; goto done; } - if ((port == CTRL_PORT) && ((pkt_type != MLAN_TYPE_EVENT) && - (pkt_type != MLAN_TYPE_CMD))) { - PRINTM(MERROR, - "Wrong pkt from CTRL PORT: type=%d, len=%dd\n", - pkt_type, pmbuf->data_len); + if ((new_mode && (pkt_type != MLAN_TYPE_DATA)) || + (!new_mode && + ((port == CTRL_PORT) && + ((pkt_type != MLAN_TYPE_EVENT) && + (pkt_type != MLAN_TYPE_CMD))))) { + if (new_mode) + PRINTM(MERROR, + "receive a wrong pkt from DATA PORT: type=%d, len=%dd\n", + pkt_type, pmbuf->data_len); + else + PRINTM(MERROR, + "Wrong pkt from CTRL PORT: type=%d, len=%dd\n", + pkt_type, pmbuf->data_len); pmbuf->status_code = MLAN_ERROR_DATA_RX_FAIL; ret = MLAN_STATUS_FAILURE; goto done; } - if (port != CTRL_PORT) + if (!new_mode && (port != CTRL_PORT)) pmadapter->mpa_rx_count[0]++; wlan_decode_rx_packet(pmadapter, pmbuf, pkt_type); @@ -984,31 +1185,84 @@ wlan_sdio_card_to_host_mp_aggr(mlan_adapter * pmadapter, mlan_buffer * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_send_mp_aggr_buf(mlan_adapter * pmadapter) +wlan_send_mp_aggr_buf(mlan_adapter *pmadapter) { mlan_status ret = MLAN_STATUS_SUCCESS; t_u32 cmd53_port = 0; + t_u32 port_count = 0; mlan_buffer mbuf_aggr; + t_u8 i = 0; + t_bool new_mode = pmadapter->psdio_device->supports_sdio_new_mode; + t_u8 mp_aggr_pkt_limit = pmadapter->psdio_device->mp_aggr_pkt_limit; ENTER(); + + if (!pmadapter->mpa_tx.pkt_cnt) { + LEAVE(); + return ret; + } PRINTM(MINFO, "host_2_card_mp_aggr: Send aggregation buffer." "%d %d\n", pmadapter->mpa_tx.start_port, pmadapter->mpa_tx.ports); memset(pmadapter, &mbuf_aggr, 0, sizeof(mlan_buffer)); - mbuf_aggr.pbuf = (t_u8 *) pmadapter->mpa_tx.buf; - mbuf_aggr.data_len = pmadapter->mpa_tx.buf_len; + if (pmadapter->max_segs >= mp_aggr_pkt_limit && + pmadapter->mpa_tx.pkt_cnt > 1) { + mbuf_aggr.data_len = pmadapter->mpa_tx.buf_len; + mbuf_aggr.pnext = mbuf_aggr.pprev = &mbuf_aggr; + mbuf_aggr.use_count = 0; + for (i = 0; i < pmadapter->mpa_tx.pkt_cnt; i++) { + wlan_link_buf_to_aggr(&mbuf_aggr, + pmadapter->mpa_tx.mbuf_arr[i]); + if (pmadapter->mpa_tx.mbuf_arr[i]-> + flags & MLAN_BUF_FLAG_TCP_ACK) { + pmadapter->mpa_tx.mbuf_arr[i]->flags &= + ~MLAN_BUF_FLAG_TCP_ACK; + pmadapter->callbacks. + moal_tcp_ack_tx_ind(pmadapter-> + pmoal_handle, + pmadapter->mpa_tx. + mbuf_arr[i]); + } + } + } else { + mbuf_aggr.pbuf = (t_u8 *)pmadapter->mpa_tx.buf; + mbuf_aggr.data_len = pmadapter->mpa_tx.buf_len; + } + + if (new_mode) { + port_count = bitcount(pmadapter->mpa_tx.ports) - 1; + cmd53_port = + (pmadapter-> + ioport | SDIO_MPA_ADDR_BASE | (port_count << 8)) + + pmadapter->mpa_tx.start_port; + } else { + cmd53_port = (pmadapter->ioport | SDIO_MPA_ADDR_BASE | + (pmadapter->mpa_tx.ports << 4)) + + pmadapter->mpa_tx.start_port; + } - cmd53_port = (pmadapter->ioport | SDIO_MPA_ADDR_BASE | - (pmadapter->mpa_tx.ports << 4)) + - pmadapter->mpa_tx.start_port; if (pmadapter->mpa_tx.pkt_cnt == 1) cmd53_port = pmadapter->ioport + pmadapter->mpa_tx.start_port; - - ret = wlan_write_data_sync(pmadapter, &mbuf_aggr, cmd53_port); + /** only one packet */ + if (pmadapter->max_segs >= mp_aggr_pkt_limit && + pmadapter->mpa_tx.pkt_cnt == 1) + ret = wlan_write_data_sync(pmadapter, + pmadapter->mpa_tx.mbuf_arr[0], + cmd53_port); + else + ret = wlan_write_data_sync(pmadapter, &mbuf_aggr, cmd53_port); + if (pmadapter->max_segs >= mp_aggr_pkt_limit) { + /** free mlan buffer */ + for (i = 0; i < pmadapter->mpa_tx.pkt_cnt; i++) { + wlan_write_data_complete(pmadapter, + pmadapter->mpa_tx.mbuf_arr[i], + MLAN_STATUS_SUCCESS); + } + } if (!(pmadapter->mp_wr_bitmap & (1 << pmadapter->curr_wr_port)) - && (pmadapter->mpa_tx.pkt_cnt < SDIO_MP_AGGR_DEF_PKT_LIMIT)) + && (pmadapter->mpa_tx.pkt_cnt < mp_aggr_pkt_limit)) pmadapter->mpa_sent_no_ports++; pmadapter->mpa_tx_count[pmadapter->mpa_tx.pkt_cnt - 1]++; pmadapter->last_mp_wr_bitmap[pmadapter->last_mp_index] = @@ -1019,10 +1273,11 @@ wlan_send_mp_aggr_buf(mlan_adapter * pmadapter) pmadapter->last_curr_wr_port[pmadapter->last_mp_index] = pmadapter->curr_wr_port; memcpy(pmadapter, - (t_u8 *) & pmadapter->last_mp_wr_info[pmadapter->last_mp_index * - SDIO_MP_AGGR_DEF_PKT_LIMIT], - (t_u8 *) pmadapter->mpa_tx.mp_wr_info, - sizeof(pmadapter->mpa_tx.mp_wr_info)); + (t_u8 *)&pmadapter->last_mp_wr_info[pmadapter->last_mp_index * + mp_aggr_pkt_limit], + (t_u8 *)pmadapter->mpa_tx.mp_wr_info, + mp_aggr_pkt_limit * sizeof(t_u16) + ); pmadapter->last_mp_index++; if (pmadapter->last_mp_index >= SDIO_MP_DBG_NUM) pmadapter->last_mp_index = 0; @@ -1041,14 +1296,16 @@ wlan_send_mp_aggr_buf(mlan_adapter * pmadapter) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -wlan_host_to_card_mp_aggr(mlan_adapter * pmadapter, mlan_buffer * mbuf, - t_u8 port, t_u32 next_pkt_len) +wlan_host_to_card_mp_aggr(mlan_adapter *pmadapter, mlan_buffer *mbuf, t_u8 port, + t_u32 next_pkt_len) { mlan_status ret = MLAN_STATUS_SUCCESS; t_s32 f_send_aggr_buf = 0; t_s32 f_send_cur_buf = 0; t_s32 f_precopy_cur_buf = 0; t_s32 f_postcopy_cur_buf = 0; + t_u8 aggr_sg = 0; + t_u8 mp_aggr_pkt_limit = pmadapter->psdio_device->mp_aggr_pkt_limit; ENTER(); @@ -1126,15 +1383,39 @@ wlan_host_to_card_mp_aggr(mlan_adapter * pmadapter, mlan_buffer * mbuf, if (f_precopy_cur_buf) { PRINTM(MINFO, "host_2_card_mp_aggr: Precopy current buffer\n"); - if (mbuf->flags & MLAN_BUF_FLAG_TCP_ACK) { - mbuf->flags &= ~MLAN_BUF_FLAG_TCP_ACK; - pmadapter->callbacks.moal_tcp_ack_tx_ind(pmadapter-> - pmoal_handle, - mbuf); + if (pmadapter->mpa_buf) + memcpy(pmadapter, pmadapter->mpa_buf + + (pmadapter->last_mp_index * mp_aggr_pkt_limit + + pmadapter->mpa_tx.pkt_cnt) * + MLAN_SDIO_BLOCK_SIZE, + mbuf->pbuf + mbuf->data_offset, + MLAN_SDIO_BLOCK_SIZE); + if (pmadapter->max_segs >= mp_aggr_pkt_limit) { + if (pmadapter->psdio_device->supports_sdio_new_mode) + MP_TX_AGGR_BUF_PUT_SG_NEWMODE(pmadapter, mbuf, + port); + else + MP_TX_AGGR_BUF_PUT_SG_NONEWMODE(pmadapter, mbuf, + port); + aggr_sg = MTRUE; + } else { + if (mbuf->flags & MLAN_BUF_FLAG_TCP_ACK) { + mbuf->flags &= ~MLAN_BUF_FLAG_TCP_ACK; + pmadapter->callbacks. + moal_tcp_ack_tx_ind(pmadapter-> + pmoal_handle, mbuf); + } + if (pmadapter->psdio_device->supports_sdio_new_mode) + MP_TX_AGGR_BUF_PUT_NEWMODE(pmadapter, mbuf, + port); + else + MP_TX_AGGR_BUF_PUT_NONEWMODE(pmadapter, mbuf, + port); } - MP_TX_AGGR_BUF_PUT(pmadapter, mbuf, port); if (MP_TX_AGGR_PKT_LIMIT_REACHED(pmadapter) || - MP_TX_AGGR_PORT_LIMIT_REACHED(pmadapter)) { + (!pmadapter->psdio_device->supports_sdio_new_mode && + MP_TX_AGGR_PORT_LIMIT_REACHED(pmadapter)) + ) { PRINTM(MIF_D, "host_2_card_mp_aggr: Aggregation Pkt limit reached\n"); /* No more pkts allowed in Aggr buf, send it */ @@ -1166,15 +1447,22 @@ wlan_host_to_card_mp_aggr(mlan_adapter * pmadapter, mlan_buffer * mbuf, pmadapter->last_mp_wr_len[pmadapter->last_mp_index] = mbuf->data_len; memset(pmadapter, - (t_u8 *) & pmadapter->last_mp_wr_info[pmadapter-> - last_mp_index * - SDIO_MP_AGGR_DEF_PKT_LIMIT], - 0, sizeof(t_u16) * SDIO_MP_AGGR_DEF_PKT_LIMIT); + (t_u8 *)&pmadapter->last_mp_wr_info[pmadapter-> + last_mp_index * + mp_aggr_pkt_limit], + 0, sizeof(t_u16) * mp_aggr_pkt_limit); pmadapter->last_mp_wr_info[pmadapter->last_mp_index * - SDIO_MP_AGGR_DEF_PKT_LIMIT] = - *(t_u16 *) (mbuf->pbuf + mbuf->data_offset); + mp_aggr_pkt_limit] = + *(t_u16 *)(mbuf->pbuf + mbuf->data_offset); pmadapter->last_curr_wr_port[pmadapter->last_mp_index] = pmadapter->curr_wr_port; + if (pmadapter->mpa_buf) + memcpy(pmadapter, + pmadapter->mpa_buf + + (pmadapter->last_mp_index * mp_aggr_pkt_limit * + MLAN_SDIO_BLOCK_SIZE), + mbuf->pbuf + mbuf->data_offset, + MLAN_SDIO_BLOCK_SIZE); pmadapter->last_mp_index++; if (pmadapter->last_mp_index >= SDIO_MP_DBG_NUM) pmadapter->last_mp_index = 0; @@ -1182,14 +1470,39 @@ wlan_host_to_card_mp_aggr(mlan_adapter * pmadapter, mlan_buffer * mbuf, } if (f_postcopy_cur_buf) { PRINTM(MINFO, "host_2_card_mp_aggr: Postcopy current buffer\n"); - if (mbuf->flags & MLAN_BUF_FLAG_TCP_ACK) { - mbuf->flags &= ~MLAN_BUF_FLAG_TCP_ACK; - pmadapter->callbacks.moal_tcp_ack_tx_ind(pmadapter-> - pmoal_handle, - mbuf); + if (pmadapter->mpa_buf) + memcpy(pmadapter, pmadapter->mpa_buf + + (pmadapter->last_mp_index * mp_aggr_pkt_limit + + pmadapter->mpa_tx.pkt_cnt) * + MLAN_SDIO_BLOCK_SIZE, + mbuf->pbuf + mbuf->data_offset, + MLAN_SDIO_BLOCK_SIZE); + if (pmadapter->max_segs >= mp_aggr_pkt_limit) { + if (pmadapter->psdio_device->supports_sdio_new_mode) + MP_TX_AGGR_BUF_PUT_SG_NEWMODE(pmadapter, mbuf, + port); + else + MP_TX_AGGR_BUF_PUT_SG_NONEWMODE(pmadapter, mbuf, + port); + aggr_sg = MTRUE; + } else { + if (mbuf->flags & MLAN_BUF_FLAG_TCP_ACK) { + mbuf->flags &= ~MLAN_BUF_FLAG_TCP_ACK; + pmadapter->callbacks. + moal_tcp_ack_tx_ind(pmadapter-> + pmoal_handle, mbuf); + } + if (pmadapter->psdio_device->supports_sdio_new_mode) + MP_TX_AGGR_BUF_PUT_NEWMODE(pmadapter, mbuf, + port); + else + MP_TX_AGGR_BUF_PUT_NONEWMODE(pmadapter, mbuf, + port); } - MP_TX_AGGR_BUF_PUT(pmadapter, mbuf, port); } + /* Always return PENDING in SG mode */ + if (aggr_sg) + ret = MLAN_STATUS_PENDING; LEAVE(); return ret; @@ -1210,17 +1523,18 @@ wlan_host_to_card_mp_aggr(mlan_adapter * pmadapter, mlan_buffer * mbuf, * */ mlan_status -wlan_check_winner_status(mlan_adapter * pmadapter, t_u32 * val) +wlan_check_winner_status(mlan_adapter *pmadapter, t_u32 *val) { t_u32 winner = 0; pmlan_callbacks pcb; + t_u8 card_fw_status0_reg = pmadapter->psdio_device->reg->status_reg_0; ENTER(); pcb = &pmadapter->callbacks; if (MLAN_STATUS_SUCCESS != - pcb->moal_read_reg(pmadapter->pmoal_handle, CARD_FW_STATUS0_REG, + pcb->moal_read_reg(pmadapter->pmoal_handle, card_fw_status0_reg, &winner)) { LEAVE(); return MLAN_STATUS_FAILURE; @@ -1240,7 +1554,7 @@ wlan_check_winner_status(mlan_adapter * pmadapter, t_u32 * val) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_check_fw_status(mlan_adapter * pmadapter, t_u32 pollnum) +wlan_check_fw_status(mlan_adapter *pmadapter, t_u32 pollnum) { mlan_status ret = MLAN_STATUS_SUCCESS; t_u16 firmwarestat = 0; @@ -1320,7 +1634,8 @@ wlan_sdio_probe(pmlan_adapter pmadapter) * from the bootloader. If we don't do this we get a interrupt * as soon as we register the irq. */ - pcb->moal_read_reg(pmadapter->pmoal_handle, HOST_INT_STATUS_REG, + pcb->moal_read_reg(pmadapter->pmoal_handle, + pmadapter->psdio_device->host_int_status_reg, &sdio_ireg); /* Disable host interrupt mask register for SDIO */ @@ -1335,6 +1650,49 @@ wlan_sdio_probe(pmlan_adapter pmadapter) return ret; } +/** + * @brief This function get sdio device from card type + * + * @param pmadapter A pointer to mlan_adapter structure + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_get_sdio_device(pmlan_adapter pmadapter) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 card_type = pmadapter->card_type; + + ENTER(); + + switch (card_type) { + case CARD_TYPE_SD8777: + pmadapter->psdio_device = &mlan_sdio_sd8777; + break; + case CARD_TYPE_SD8787: + pmadapter->psdio_device = &mlan_sdio_sd8787; + break; + case CARD_TYPE_SD8887: + pmadapter->psdio_device = &mlan_sdio_sd8887; + break; + case CARD_TYPE_SD8801: + pmadapter->psdio_device = &mlan_sdio_sd8801; + break; + case CARD_TYPE_SD8897: + pmadapter->psdio_device = &mlan_sdio_sd8897; + break; + case CARD_TYPE_SD8797: + pmadapter->psdio_device = &mlan_sdio_sd8797; + break; + default: + PRINTM(MERROR, "can't get right card type \n"); + ret = MLAN_STATUS_FAILURE; + break; + } + + LEAVE(); + return ret; +} + /** * @brief This function gets interrupt status. * @@ -1348,10 +1706,14 @@ wlan_interrupt(pmlan_adapter pmadapter) mlan_buffer mbuf; t_u32 sdio_ireg = 0; + t_u8 max_mp_regs = pmadapter->psdio_device->reg->max_mp_regs; + t_u8 host_int_status_reg = pmadapter->psdio_device->host_int_status_reg; + ENTER(); + memset(pmadapter, &mbuf, 0, sizeof(mlan_buffer)); mbuf.pbuf = pmadapter->mp_regs; - mbuf.data_len = MAX_MP_REGS; + mbuf.data_len = max_mp_regs; if (MLAN_STATUS_SUCCESS != pcb->moal_read_data_sync(pmadapter->pmoal_handle, &mbuf, @@ -1362,8 +1724,8 @@ wlan_interrupt(pmlan_adapter pmadapter) } DBG_HEXDUMP(MIF_D, "SDIO MP Registers", pmadapter->mp_regs, - MAX_MP_REGS); - sdio_ireg = pmadapter->mp_regs[HOST_INT_STATUS_REG]; + max_mp_regs); + sdio_ireg = pmadapter->mp_regs[host_int_status_reg]; pmadapter->dbg.last_int_status = pmadapter->sdio_ireg | sdio_ireg; if (sdio_ireg) { /* @@ -1373,6 +1735,7 @@ wlan_interrupt(pmlan_adapter pmadapter) * Clear the interrupt status register */ //PRINTM(MINTR, "wlan_interrupt: sdio_ireg = 0x%x\n", sdio_ireg); + pmadapter->num_of_irq++; pcb->moal_spin_lock(pmadapter->pmoal_handle, pmadapter->pint_lock); pmadapter->sdio_ireg |= sdio_ireg; @@ -1380,6 +1743,7 @@ wlan_interrupt(pmlan_adapter pmadapter) sizeof(pmadapter->last_mp_regs)); pcb->moal_spin_unlock(pmadapter->pmoal_handle, pmadapter->pint_lock); + } else { //PRINTM(MMSG, "wlan_interrupt: sdio_ireg = 0x%x\n", sdio_ireg); } @@ -1397,9 +1761,11 @@ mlan_status wlan_enable_host_int(pmlan_adapter pmadapter) { mlan_status ret; + t_u8 mask = HIM_ENABLE; + mask = pmadapter->psdio_device->reg->host_int_enable; ENTER(); - ret = wlan_sdio_enable_host_int_mask(pmadapter, HIM_ENABLE); + ret = wlan_sdio_enable_host_int_mask(pmadapter, mask); LEAVE(); return ret; } @@ -1411,23 +1777,29 @@ wlan_enable_host_int(pmlan_adapter pmadapter) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_process_int_status(mlan_adapter * pmadapter) +wlan_process_int_status(mlan_adapter *pmadapter) { mlan_status ret = MLAN_STATUS_SUCCESS; pmlan_callbacks pcb = &pmadapter->callbacks; t_u8 sdio_ireg; mlan_buffer *pmbuf = MNULL; - t_u8 mp_regs[MAX_MP_REGS]; + + t_u8 mp_regs[MAX_MP_REGS_MAX]; t_u8 port = 0; t_u32 len_reg_l, len_reg_u; t_u32 rx_blocks; - t_u32 mp_wr_bitmap; + t_u8 bit_count = 0; t_u32 ps_state = pmadapter->ps_state; t_u16 rx_len; -#if !defined(SDIO_MULTI_PORT_RX_AGGR) t_u32 upld_typ = 0; -#endif t_u32 cr = 0; + const mlan_sdio_device *psdio_device = pmadapter->psdio_device; + const mlan_sdio_card_reg *reg = psdio_device->reg; + t_bool new_mode = psdio_device->supports_sdio_new_mode; + t_u8 rd_len_p0_l = reg->rd_len_p0_l; + t_u8 rd_len_p0_u = reg->rd_len_p0_u; + t_u8 cmd_rd_len_0 = psdio_device->cmd_rd_len_0; + t_u8 cmd_rd_len_1 = psdio_device->cmd_rd_len_1; ENTER(); @@ -1439,26 +1811,96 @@ wlan_process_int_status(mlan_adapter * pmadapter) if (!sdio_ireg) goto done; + if (new_mode) { + /* check the command port */ + if (sdio_ireg & DN_LD_CMD_PORT_HOST_INT_STATUS) { + if (pmadapter->cmd_sent) + pmadapter->cmd_sent = MFALSE; + PRINTM(MINFO, "cmd_sent=%d\n", pmadapter->cmd_sent); + } + + if (sdio_ireg & UP_LD_CMD_PORT_HOST_INT_STATUS) { + /* read the len of control packet */ + rx_len = ((t_u16)mp_regs[cmd_rd_len_1]) << 8; + rx_len |= (t_u16)mp_regs[cmd_rd_len_0]; + PRINTM(MINFO, "RX: cmd port rx_len=%u\n", rx_len); + rx_blocks = + (rx_len + MLAN_SDIO_BLOCK_SIZE - + 1) / MLAN_SDIO_BLOCK_SIZE; + if (rx_len <= INTF_HEADER_LEN || + (rx_blocks * MLAN_SDIO_BLOCK_SIZE) > + ALLOC_BUF_SIZE) { + PRINTM(MERROR, "invalid rx_len=%d\n", rx_len); + ret = MLAN_STATUS_FAILURE; + goto done; + } + rx_len = (t_u16)(rx_blocks * MLAN_SDIO_BLOCK_SIZE); + pmbuf = wlan_alloc_mlan_buffer(pmadapter, rx_len, 0, + MOAL_MALLOC_BUFFER); + if (pmbuf == MNULL) { + PRINTM(MERROR, + "Failed to allocate 'mlan_buffer'\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + PRINTM(MINFO, "cmd rx buffer rx_len = %d\n", rx_len); + + /* Transfer data from card */ + if (MLAN_STATUS_SUCCESS != + wlan_sdio_card_to_host(pmadapter, &upld_typ, + (t_u32 *)&pmadapter-> + upld_len, pmbuf, rx_len, + pmadapter-> + ioport | CMD_PORT_SLCT)) { + pmadapter->dbg. + num_cmdevt_card_to_host_failure++; + PRINTM(MERROR, + "Card-to-host cmd failed: int status=0x%x\n", + sdio_ireg); + wlan_free_mlan_buffer(pmadapter, pmbuf); + ret = MLAN_STATUS_FAILURE; + goto term_cmd53; + } + + if ((upld_typ != MLAN_TYPE_CMD) && + (upld_typ != MLAN_TYPE_EVENT)) + PRINTM(MERROR, + "receive a wrong packet from CMD PORT. type =0x%d\n", + upld_typ); + + wlan_decode_rx_packet(pmadapter, pmbuf, upld_typ); + + /* We might receive data/sleep_cfm at the same time */ + /* reset data_receive flag to avoid ps_state change */ + if ((ps_state == PS_STATE_SLEEP_CFM) && + (pmadapter->ps_state == PS_STATE_SLEEP)) + pmadapter->data_received = MFALSE; + } + } if (sdio_ireg & DN_LD_HOST_INT_STATUS) { - mp_wr_bitmap = pmadapter->mp_wr_bitmap; - pmadapter->mp_wr_bitmap = (t_u32) mp_regs[WR_BITMAP_L]; - pmadapter->mp_wr_bitmap |= ((t_u32) mp_regs[WR_BITMAP_U]) << 8; - if ((mp_wr_bitmap & pmadapter->mp_data_port_mask) && - (mp_wr_bitmap != pmadapter->mp_wr_bitmap)) { - PRINTM(MINTR, - "wlan: Unexpected TxDn, old mp_wr_bitmap=0x%08x, new mp_wr_bitmap=0x%08x\n", - mp_wr_bitmap, pmadapter->mp_wr_bitmap); + if (pmadapter->mp_wr_bitmap & pmadapter->mp_data_port_mask) + pmadapter->mp_invalid_update++; + pmadapter->mp_wr_bitmap = (t_u32)mp_regs[reg->wr_bitmap_l]; + pmadapter->mp_wr_bitmap |= + ((t_u32)mp_regs[reg->wr_bitmap_u]) << 8; + if (psdio_device->supports_sdio_new_mode) { + pmadapter->mp_wr_bitmap |= + ((t_u32)mp_regs[reg->wr_bitmap_1l]) << 16; + pmadapter->mp_wr_bitmap |= + ((t_u32)mp_regs[reg->wr_bitmap_1u]) << 24; } + bit_count = + bitcount(pmadapter->mp_wr_bitmap & pmadapter-> + mp_data_port_mask); + pmadapter->mp_update[bit_count - 1]++; + if (pmadapter->mp_update[bit_count - 1] == 0xffffffff) + memset(pmadapter, pmadapter->mp_update, 0, + sizeof(pmadapter->mp_update)); + pmadapter->last_recv_wr_bitmap = pmadapter->mp_wr_bitmap; PRINTM(MINTR, "DNLD: wr_bitmap=0x%08x\n", pmadapter->mp_wr_bitmap); - if (!(pmadapter->mp_wr_bitmap & (1 << pmadapter->curr_wr_port)) - && pmadapter->data_sent) - PRINTM(MINTR, - "wlan: TxDn without port: wr_bitmap=0x%08x curr_wr_port=%d\n", - pmadapter->mp_wr_bitmap, - pmadapter->curr_wr_port); if (pmadapter->data_sent && (pmadapter-> mp_wr_bitmap & (1 << pmadapter->curr_wr_port))) { @@ -1467,24 +1909,28 @@ wlan_process_int_status(mlan_adapter * pmadapter) } } - /* As firmware will not generate download ready interrupt if the port - updated is command port only, cmd_sent should be done for any SDIO - interrupt. */ - if (pmadapter->cmd_sent == MTRUE) { + if ((!psdio_device->supports_sdio_new_mode) && + (pmadapter->cmd_sent == MTRUE)) { /* Check if firmware has attach buffer at command port and update just that in wr_bit_map. */ pmadapter->mp_wr_bitmap |= - (t_u32) mp_regs[WR_BITMAP_L] & CTRL_PORT_MASK; + (t_u32)mp_regs[reg->wr_bitmap_l] & CTRL_PORT_MASK; if (pmadapter->mp_wr_bitmap & CTRL_PORT_MASK) pmadapter->cmd_sent = MFALSE; } PRINTM(MINFO, "cmd_sent=%d, data_sent=%d\n", pmadapter->cmd_sent, pmadapter->data_sent); - if (sdio_ireg & UP_LD_HOST_INT_STATUS) { - pmadapter->mp_rd_bitmap = (t_u32) mp_regs[RD_BITMAP_L]; - pmadapter->mp_rd_bitmap |= ((t_u32) mp_regs[RD_BITMAP_U]) << 8; + pmadapter->mp_rd_bitmap = (t_u32)mp_regs[reg->rd_bitmap_l]; + pmadapter->mp_rd_bitmap |= + ((t_u32)mp_regs[reg->rd_bitmap_u]) << 8; + if (psdio_device->supports_sdio_new_mode) { + pmadapter->mp_rd_bitmap |= + ((t_u32)mp_regs[reg->rd_bitmap_1l]) << 16; + pmadapter->mp_rd_bitmap |= + ((t_u32)mp_regs[reg->rd_bitmap_1u]) << 24; + } PRINTM(MINTR, "UPLD: rd_bitmap=0x%08x\n", pmadapter->mp_rd_bitmap); @@ -1495,10 +1941,10 @@ wlan_process_int_status(mlan_adapter * pmadapter) "no more rd_port to be handled\n"); break; } - len_reg_l = RD_LEN_P0_L + (port << 1); - len_reg_u = RD_LEN_P0_U + (port << 1); - rx_len = ((t_u16) mp_regs[len_reg_u]) << 8; - rx_len |= (t_u16) mp_regs[len_reg_l]; + len_reg_l = rd_len_p0_l + (port << 1); + len_reg_u = rd_len_p0_u + (port << 1); + rx_len = ((t_u16)mp_regs[len_reg_u]) << 8; + rx_len |= (t_u16)mp_regs[len_reg_l]; PRINTM(MINFO, "RX: port=%d rx_len=%u\n", port, rx_len); rx_blocks = (rx_len + MLAN_SDIO_BLOCK_SIZE - @@ -1510,8 +1956,8 @@ wlan_process_int_status(mlan_adapter * pmadapter) ret = MLAN_STATUS_FAILURE; goto done; } - rx_len = (t_u16) (rx_blocks * MLAN_SDIO_BLOCK_SIZE); - if (port == CTRL_PORT) + rx_len = (t_u16)(rx_blocks * MLAN_SDIO_BLOCK_SIZE); + if ((!new_mode) && (port == CTRL_PORT)) pmbuf = wlan_alloc_mlan_buffer(pmadapter, rx_len, 0, MOAL_MALLOC_BUFFER); @@ -1535,12 +1981,12 @@ wlan_process_int_status(mlan_adapter * pmadapter) /* Transfer data from card */ if (MLAN_STATUS_SUCCESS != wlan_sdio_card_to_host(pmadapter, &upld_typ, - (t_u32 *) & pmadapter-> + (t_u32 *)&pmadapter-> upld_len, pmbuf, rx_len, pmadapter->ioport + port)) { #endif /* SDIO_MULTI_PORT_RX_AGGR */ - if (port == CTRL_PORT) + if ((!new_mode) && (port == CTRL_PORT)) pmadapter->dbg. num_cmdevt_card_to_host_failure++; else @@ -1597,14 +2043,14 @@ wlan_process_int_status(mlan_adapter * pmadapter) * @brief This function sends data to the card. * * @param pmadapter A pointer to mlan_adapter structure - * @param type data or command + * @param type data or command * @param pmbuf A pointer to mlan_buffer (pmbuf->data_len should include SDIO header) * @param tx_param A pointer to mlan_tx_param * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_sdio_host_to_card(mlan_adapter * pmadapter, t_u8 type, mlan_buffer * pmbuf, - mlan_tx_param * tx_param) +wlan_sdio_host_to_card(mlan_adapter *pmadapter, t_u8 type, mlan_buffer *pmbuf, + mlan_tx_param *tx_param) { mlan_status ret = MLAN_STATUS_SUCCESS; t_u32 buf_block_len; @@ -1618,8 +2064,8 @@ wlan_sdio_host_to_card(mlan_adapter * pmadapter, t_u8 type, mlan_buffer * pmbuf, /* Allocate buffer and copy payload */ blksz = MLAN_SDIO_BLOCK_SIZE; buf_block_len = (pmbuf->data_len + blksz - 1) / blksz; - *(t_u16 *) & payload[0] = wlan_cpu_to_le16((t_u16) pmbuf->data_len); - *(t_u16 *) & payload[2] = wlan_cpu_to_le16(type); + *(t_u16 *)&payload[0] = wlan_cpu_to_le16((t_u16)pmbuf->data_len); + *(t_u16 *)&payload[2] = wlan_cpu_to_le16(type); /* * This is SDIO specific header @@ -1660,8 +2106,8 @@ wlan_sdio_host_to_card(mlan_adapter * pmadapter, t_u8 type, mlan_buffer * pmbuf, } else { /* Type must be MLAN_TYPE_CMD */ pmadapter->cmd_sent = MTRUE; - /* clear CTRL PORT */ - pmadapter->mp_wr_bitmap &= (t_u32) (~(1 << CTRL_PORT)); + if (!pmadapter->psdio_device->supports_sdio_new_mode) + pmadapter->mp_wr_bitmap &= (t_u32)(~(1 << CTRL_PORT)); if (pmbuf->data_len <= INTF_HEADER_LEN || pmbuf->data_len > WLAN_UPLD_SIZE) PRINTM(MWARN, @@ -1669,7 +2115,10 @@ wlan_sdio_host_to_card(mlan_adapter * pmadapter, t_u8 type, mlan_buffer * pmbuf, payload, pmbuf->data_len); /* Transfer data to card */ pmbuf->data_len = buf_block_len * blksz; - cmd53_port = pmadapter->ioport + CTRL_PORT; + if (pmadapter->psdio_device->supports_sdio_new_mode) + cmd53_port = (pmadapter->ioport) | CMD_PORT_SLCT; + else + cmd53_port = pmadapter->ioport + CTRL_PORT; ret = wlan_write_data_sync(pmadapter, pmbuf, cmd53_port); } @@ -1708,43 +2157,56 @@ wlan_sdio_host_to_card(mlan_adapter * pmadapter, t_u8 type, mlan_buffer * pmbuf, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_alloc_sdio_mpa_buffers(IN mlan_adapter * pmadapter, +wlan_alloc_sdio_mpa_buffers(IN mlan_adapter *pmadapter, t_u32 mpa_tx_buf_size, t_u32 mpa_rx_buf_size) { mlan_status ret = MLAN_STATUS_SUCCESS; pmlan_callbacks pcb = &pmadapter->callbacks; + t_u8 mp_aggr_pkt_limit = pmadapter->psdio_device->mp_aggr_pkt_limit; ENTER(); #ifdef SDIO_MULTI_PORT_TX_AGGR - ret = pcb->moal_malloc(pmadapter->pmoal_handle, - mpa_tx_buf_size + DMA_ALIGNMENT, - MLAN_MEM_DEF | MLAN_MEM_DMA, - (t_u8 **) & pmadapter->mpa_tx.head_ptr); - if (ret != MLAN_STATUS_SUCCESS || !pmadapter->mpa_tx.head_ptr) { - PRINTM(MERROR, - "Could not allocate buffer for SDIO MP TX aggr\n"); - ret = MLAN_STATUS_FAILURE; - goto error; + if (pmadapter->max_segs < mp_aggr_pkt_limit) { + ret = pcb->moal_malloc(pmadapter->pmoal_handle, + mpa_tx_buf_size + DMA_ALIGNMENT, + MLAN_MEM_DEF | MLAN_MEM_DMA, + (t_u8 **)&pmadapter->mpa_tx.head_ptr); + if (ret != MLAN_STATUS_SUCCESS || !pmadapter->mpa_tx.head_ptr) { + PRINTM(MERROR, + "Could not allocate buffer for SDIO MP TX aggr\n"); + ret = MLAN_STATUS_FAILURE; + goto error; + } + pmadapter->mpa_tx.buf = + (t_u8 *)ALIGN_ADDR(pmadapter->mpa_tx.head_ptr, + DMA_ALIGNMENT); + } else { + pmadapter->mpa_tx.head_ptr = MNULL; + pmadapter->mpa_tx.buf = MNULL; } - pmadapter->mpa_tx.buf = - (t_u8 *) ALIGN_ADDR(pmadapter->mpa_tx.head_ptr, DMA_ALIGNMENT); pmadapter->mpa_tx.buf_size = mpa_tx_buf_size; #endif /* SDIO_MULTI_PORT_TX_AGGR */ #ifdef SDIO_MULTI_PORT_RX_AGGR - ret = pcb->moal_malloc(pmadapter->pmoal_handle, - mpa_rx_buf_size + DMA_ALIGNMENT, - MLAN_MEM_DEF | MLAN_MEM_DMA, - (t_u8 **) & pmadapter->mpa_rx.head_ptr); - if (ret != MLAN_STATUS_SUCCESS || !pmadapter->mpa_rx.head_ptr) { - PRINTM(MERROR, - "Could not allocate buffer for SDIO MP RX aggr\n"); - ret = MLAN_STATUS_FAILURE; - goto error; + if (pmadapter->max_segs < mp_aggr_pkt_limit) { + ret = pcb->moal_malloc(pmadapter->pmoal_handle, + mpa_rx_buf_size + DMA_ALIGNMENT, + MLAN_MEM_DEF | MLAN_MEM_DMA, + (t_u8 **)&pmadapter->mpa_rx.head_ptr); + if (ret != MLAN_STATUS_SUCCESS || !pmadapter->mpa_rx.head_ptr) { + PRINTM(MERROR, + "Could not allocate buffer for SDIO MP RX aggr\n"); + ret = MLAN_STATUS_FAILURE; + goto error; + } + pmadapter->mpa_rx.buf = + (t_u8 *)ALIGN_ADDR(pmadapter->mpa_rx.head_ptr, + DMA_ALIGNMENT); + } else { + pmadapter->mpa_rx.head_ptr = MNULL; + pmadapter->mpa_rx.buf = MNULL; } - pmadapter->mpa_rx.buf = - (t_u8 *) ALIGN_ADDR(pmadapter->mpa_rx.head_ptr, DMA_ALIGNMENT); pmadapter->mpa_rx.buf_size = mpa_rx_buf_size; #endif /* SDIO_MULTI_PORT_RX_AGGR */ error: @@ -1763,7 +2225,7 @@ wlan_alloc_sdio_mpa_buffers(IN mlan_adapter * pmadapter, * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_free_sdio_mpa_buffers(IN mlan_adapter * pmadapter) +wlan_free_sdio_mpa_buffers(IN mlan_adapter *pmadapter) { pmlan_callbacks pcb = &pmadapter->callbacks; @@ -1772,7 +2234,7 @@ wlan_free_sdio_mpa_buffers(IN mlan_adapter * pmadapter) #ifdef SDIO_MULTI_PORT_TX_AGGR if (pmadapter->mpa_tx.buf) { pcb->moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) pmadapter->mpa_tx.head_ptr); + (t_u8 *)pmadapter->mpa_tx.head_ptr); pmadapter->mpa_tx.head_ptr = MNULL; pmadapter->mpa_tx.buf = MNULL; pmadapter->mpa_tx.buf_size = 0; @@ -1782,7 +2244,7 @@ wlan_free_sdio_mpa_buffers(IN mlan_adapter * pmadapter) #ifdef SDIO_MULTI_PORT_RX_AGGR if (pmadapter->mpa_rx.buf) { pcb->moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) pmadapter->mpa_rx.head_ptr); + (t_u8 *)pmadapter->mpa_rx.head_ptr); pmadapter->mpa_rx.head_ptr = MNULL; pmadapter->mpa_rx.buf = MNULL; pmadapter->mpa_rx.buf_size = 0; @@ -1844,8 +2306,8 @@ wlan_set_sdio_gpio_int(IN pmlan_private priv) */ mlan_status wlan_cmd_sdio_gpio_int(pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { HostCmd_DS_SDIO_GPIO_INT_CONFIG *psdio_gpio_int = &cmd->params.sdio_gpio_int; diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sdio.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sdio.h old mode 100755 new mode 100644 index f36dc729..16f330a7 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sdio.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sdio.h @@ -53,7 +53,7 @@ Change log: /** Host Control Registers : Upload host interrupt RSR */ #define UP_LD_HOST_INT_RSR (0x1U) -#define HOST_INT_RSR_MASK 0x3F +#define HOST_INT_RSR_MASK 0xFF /** Host Control Registers : Host interrupt mask */ #define HOST_INT_MASK_REG 0x02 @@ -62,14 +62,26 @@ Change log: #define UP_LD_HOST_INT_MASK (0x1U) /** Host Control Registers : Download host interrupt mask */ #define DN_LD_HOST_INT_MASK (0x2U) +/** Host Control Registers : Cmd port upload interrupt mask */ +#define CMD_PORT_UPLD_INT_MASK (0x1U << 6) +/** Host Control Registers : Cmd port download interrupt mask */ +#define CMD_PORT_DNLD_INT_MASK (0x1U << 7) /** Enable Host interrupt mask */ -#define HIM_ENABLE (UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK) +#define HIM_ENABLE (UP_LD_HOST_INT_MASK | \ + DN_LD_HOST_INT_MASK | \ + CMD_PORT_UPLD_INT_MASK | \ + CMD_PORT_DNLD_INT_MASK) /** Disable Host interrupt mask */ #define HIM_DISABLE 0xff /** Host Control Registers : Host interrupt status */ #define HOST_INT_STATUS_REG 0x03 +/** Host Control Registers : Upload command port host interrupt status */ +#define UP_LD_CMD_PORT_HOST_INT_STATUS (0x40U) +/** Host Control Registers : Download command port host interrupt status */ +#define DN_LD_CMD_PORT_HOST_INT_STATUS (0x80U) + /** Host Control Registers : Upload host interrupt status */ #define UP_LD_HOST_INT_STATUS (0x1U) /** Host Control Registers : Download host interrupt status */ @@ -196,6 +208,35 @@ Change log: /** Host Control Registers : I/O port 2 */ #define IO_PORT_2_REG 0x7A +/** Port for memory */ +#define MEM_PORT 0x10000 +/** Card Control Registers : cmd53 new mode */ +#define CMD53_NEW_MODE (0x1U << 0) +#define CMD_PORT_RD_LEN_EN (0x1U << 2) +#define CMD_PORT_AUTO_EN (0x1U << 0) +#define CMD_PORT_SLCT 0x8000 +/** Ctrl port mask */ +#define CTRL_PORT_MASK 0x0001 + +/** SD8787 card type */ +#define CARD_TYPE_SD8787 0x01 +/** SD8777 card type */ +#define CARD_TYPE_SD8777 0x02 +/** SD8887 card type */ +#define CARD_TYPE_SD8887 0x03 +/** SD8801 card type */ +#define CARD_TYPE_SD8801 0x04 +/** SD8897 card type */ +#define CARD_TYPE_SD8897 0x05 +/** SD8797 card type */ +#define CARD_TYPE_SD8797 0x06 + +#define IS_SD8777(ct) (CARD_TYPE_SD8777 == (ct)) +#define IS_SD8787(ct) (CARD_TYPE_SD8787 == (ct)) +#define IS_SD8887(ct) (CARD_TYPE_SD8887 == (ct)) +#define IS_SD8801(ct) (CARD_TYPE_SD8801 == (ct)) +#define IS_SD8897(ct) (CARD_TYPE_SD8897 == (ct)) +#define IS_SD8797(ct) (CARD_TYPE_SD8797 == (ct)) /** Event header Len*/ #define MLAN_EVENT_HEADER_LEN 8 @@ -217,7 +258,30 @@ Change log: (((a->mpa_tx.buf_len) + len) <= (a->mpa_tx.buf_size)) /** Copy current packet (SDIO Tx aggregation buffer) to SDIO buffer */ -#define MP_TX_AGGR_BUF_PUT(a, mbuf, port) do { \ +#define MP_TX_AGGR_BUF_PUT_NEWMODE(a, mbuf, port) do { \ + pmadapter->callbacks.moal_memmove(a->pmoal_handle, \ + &a->mpa_tx.buf[a->mpa_tx.buf_len], \ + mbuf->pbuf+mbuf->data_offset, mbuf->data_len);\ + a->mpa_tx.buf_len += mbuf->data_len; \ + a->mpa_tx.mp_wr_info[a->mpa_tx.pkt_cnt] = *(t_u16 *)(mbuf->pbuf+mbuf->data_offset); \ + if (!a->mpa_tx.pkt_cnt) { \ + a->mpa_tx.start_port = port; \ + } \ + a->mpa_tx.ports |= (1 << port); \ + a->mpa_tx.pkt_cnt++; \ +} while (0) + +#define MP_TX_AGGR_BUF_PUT_SG_NEWMODE(a, mbuf, port) do { \ + a->mpa_tx.buf_len += mbuf->data_len; \ + a->mpa_tx.mp_wr_info[a->mpa_tx.pkt_cnt] = *(t_u16 *)(mbuf->pbuf+mbuf->data_offset); \ + a->mpa_tx.mbuf_arr[a->mpa_tx.pkt_cnt] = mbuf; \ + if (!a->mpa_tx.pkt_cnt) { \ + a->mpa_tx.start_port = port; \ + } \ + a->mpa_tx.ports |= (1 << port); \ + a->mpa_tx.pkt_cnt++; \ +} while (0) +#define MP_TX_AGGR_BUF_PUT_NONEWMODE(a, mbuf, port) do { \ pmadapter->callbacks.moal_memmove(a->pmoal_handle, \ &a->mpa_tx.buf[a->mpa_tx.buf_len], \ mbuf->pbuf+mbuf->data_offset, mbuf->data_len);\ @@ -230,29 +294,44 @@ Change log: a->mpa_tx.ports |= (1 << (a->mpa_tx.pkt_cnt)); \ } else { \ a->mpa_tx.ports |= (1 << (a->mpa_tx.pkt_cnt \ - + 1 + (MAX_PORT - a->mp_end_port))); \ + + 1 + (a->psdio_device->max_ports - a->mp_end_port))); \ + } \ + a->mpa_tx.pkt_cnt++; \ +} while (0) +#define MP_TX_AGGR_BUF_PUT_SG_NONEWMODE(a, mbuf, port) do { \ + a->mpa_tx.buf_len += mbuf->data_len; \ + a->mpa_tx.mp_wr_info[a->mpa_tx.pkt_cnt] = *(t_u16 *)(mbuf->pbuf+mbuf->data_offset); \ + a->mpa_tx.mbuf_arr[a->mpa_tx.pkt_cnt] = mbuf; \ + if (!a->mpa_tx.pkt_cnt) { \ + a->mpa_tx.start_port = port; \ + } \ + if (a->mpa_tx.start_port <= port) { \ + a->mpa_tx.ports |= (1 << (a->mpa_tx.pkt_cnt)); \ + } else { \ + a->mpa_tx.ports |= (1 << (a->mpa_tx.pkt_cnt \ + + 1 + (a->psdio_device->max_ports - a->mp_end_port))); \ } \ a->mpa_tx.pkt_cnt++; \ } while (0) - /** SDIO Tx aggregation limit ? */ #define MP_TX_AGGR_PKT_LIMIT_REACHED(a) ((a->mpa_tx.pkt_cnt) \ - == (a->mpa_tx.pkt_aggr_limit)) + == (a->mpa_tx.pkt_aggr_limit)) /** SDIO Tx aggregation port limit ? */ + #define MP_TX_AGGR_PORT_LIMIT_REACHED(a) ((a->curr_wr_port < \ - a->mpa_tx.start_port) && (((MAX_PORT - \ - a->mpa_tx.start_port) + a->curr_wr_port) >= \ - SDIO_MP_AGGR_DEF_PKT_LIMIT)) + a->mpa_tx.start_port) && (((a->psdio_device->max_ports - \ + a->mpa_tx.start_port) + a->curr_wr_port) >= \ + a->psdio_device->mp_aggr_pkt_limit)) /** Reset SDIO Tx aggregation buffer parameters */ #define MP_TX_AGGR_BUF_RESET(a) do { \ - memset(a, a->mpa_tx.mp_wr_info, 0, sizeof(a->mpa_tx.mp_wr_info)); \ + memset(a, a->mpa_tx.mp_wr_info, 0, sizeof(a->mpa_tx.mp_wr_info)); \ a->mpa_tx.pkt_cnt = 0; \ a->mpa_tx.buf_len = 0; \ a->mpa_tx.ports = 0; \ a->mpa_tx.start_port = 0; \ -} while (0); +} while (0) #endif /* SDIO_MULTI_PORT_TX_AGGR */ @@ -260,13 +339,19 @@ Change log: /** SDIO Rx aggregation limit ? */ #define MP_RX_AGGR_PKT_LIMIT_REACHED(a) (a->mpa_rx.pkt_cnt \ - == a->mpa_rx.pkt_aggr_limit) + == a->mpa_rx.pkt_aggr_limit) /** SDIO Rx aggregation port limit ? */ -#define MP_RX_AGGR_PORT_LIMIT_REACHED(a) ((a->curr_rd_port < \ - a->mpa_rx.start_port) && (((MAX_PORT - \ - a->mpa_rx.start_port) + a->curr_rd_port) >= \ - SDIO_MP_AGGR_DEF_PKT_LIMIT)) +#define MP_RX_AGGR_PORT_LIMIT_REACHED_NEWMODE(a) \ + (((a->curr_rd_port < a->mpa_rx.start_port) && \ + (((a->psdio_device->max_ports - a->mpa_rx.start_port) + a->curr_rd_port) \ + >= (a->mp_end_port >> 1))) || \ + ((a->curr_rd_port - a->mpa_rx.start_port) >= \ + (a->mp_end_port >> 1))) +#define MP_RX_AGGR_PORT_LIMIT_REACHED_NONEWMODE(a) ((a->curr_rd_port < \ + a->mpa_rx.start_port) && (((a->psdio_device->max_ports - \ + a->mpa_rx.start_port) + a->curr_rd_port) >= \ + a->psdio_device->mp_aggr_pkt_limit)) /** SDIO Rx aggregation in progress ? */ #define MP_RX_AGGR_IN_PROGRESS(a) (a->mpa_rx.pkt_cnt > 0) @@ -276,7 +361,18 @@ Change log: ((a->mpa_rx.buf_len + rx_len) <= a->mpa_rx.buf_size) /** Prepare to copy current packet from card to SDIO Rx aggregation buffer */ -#define MP_RX_AGGR_SETUP(a, mbuf, port, rx_len) do { \ +#define MP_RX_AGGR_SETUP_NEWMODE(a, mbuf, port, rx_len) do { \ + a->mpa_rx.buf_len += rx_len; \ + if (!a->mpa_rx.pkt_cnt) { \ + a->mpa_rx.start_port = port; \ + } \ + a->mpa_rx.ports |= (1 << port); \ + a->mpa_rx.mbuf_arr[a->mpa_rx.pkt_cnt] = mbuf; \ + a->mpa_rx.len_arr[a->mpa_rx.pkt_cnt] = rx_len; \ + a->mpa_rx.pkt_cnt++; \ +} while (0); + +#define MP_RX_AGGR_SETUP_NONEWMODE(a, mbuf, port, rx_len) do { \ a->mpa_rx.buf_len += rx_len; \ if (!a->mpa_rx.pkt_cnt) { \ a->mpa_rx.start_port = port; \ @@ -297,29 +393,280 @@ Change log: a->mpa_rx.buf_len = 0; \ a->mpa_rx.ports = 0; \ a->mpa_rx.start_port = 0; \ -} while (0); +} while (0) #endif /* SDIO_MULTI_PORT_RX_AGGR */ +static const struct _mlan_sdio_card_reg mlan_reg_sd87xx = { + .start_rd_port = 1, + .start_wr_port = 1, + .base_0_reg = 0x40, // 0x0040, + .base_1_reg = 0x41, // 0x0041, + .poll_reg = 0x30, + .host_int_enable = UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK, + .host_int_status = DN_LD_HOST_INT_STATUS | UP_LD_HOST_INT_STATUS, + .status_reg_0 = 0x60, + .status_reg_1 = 0x61, + .sdio_int_mask = 0x3f, + .data_port_mask = 0x0000fffe, + .max_mp_regs = 64, + .rd_bitmap_l = 0x04, + .rd_bitmap_u = 0x05, + .wr_bitmap_l = 0x06, + .wr_bitmap_u = 0x07, + .rd_len_p0_l = 0x08, + .rd_len_p0_u = 0x09, + .card_misc_cfg_reg = 0x6c, +}; + +static const struct _mlan_sdio_card_reg mlan_reg_sd8887 = { + .start_rd_port = 0, + .start_wr_port = 0, + .base_0_reg = 0x6C, + .base_1_reg = 0x6D, + .poll_reg = 0x5C, + .host_int_enable = UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK | + CMD_PORT_UPLD_INT_MASK | CMD_PORT_DNLD_INT_MASK, + .host_int_status = DN_LD_HOST_INT_STATUS | UP_LD_HOST_INT_STATUS | + DN_LD_CMD_PORT_HOST_INT_STATUS | UP_LD_CMD_PORT_HOST_INT_STATUS, + .status_reg_0 = 0x90, + .status_reg_1 = 0x91, + .sdio_int_mask = 0xff, + .data_port_mask = 0xffffffff, + .max_mp_regs = 196, + .rd_bitmap_l = 0x10, + .rd_bitmap_u = 0x11, + .rd_bitmap_1l = 0x12, + .rd_bitmap_1u = 0x13, + .wr_bitmap_l = 0x14, + .wr_bitmap_u = 0x15, + .wr_bitmap_1l = 0x16, + .wr_bitmap_1u = 0x17, + .rd_len_p0_l = 0x18, + .rd_len_p0_u = 0x19, + .card_misc_cfg_reg = 0xD8, +}; + +static const struct _mlan_sdio_card_reg mlan_reg_sd8897 = { + .start_rd_port = 0, + .start_wr_port = 0, + .base_0_reg = 0x60, + .base_1_reg = 0x61, + .poll_reg = 0x50, + .host_int_enable = UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK | + CMD_PORT_UPLD_INT_MASK | CMD_PORT_DNLD_INT_MASK, + .host_int_status = DN_LD_HOST_INT_STATUS | UP_LD_HOST_INT_STATUS | + DN_LD_CMD_PORT_HOST_INT_STATUS | UP_LD_CMD_PORT_HOST_INT_STATUS, + .status_reg_0 = 0xC0, + .status_reg_1 = 0xC1, + .sdio_int_mask = 0xff, + .data_port_mask = 0xffffffff, + .max_mp_regs = 184, + .rd_bitmap_l = 0x04, + .rd_bitmap_u = 0x05, + .rd_bitmap_1l = 0x06, + .rd_bitmap_1u = 0x07, + .wr_bitmap_l = 0x08, + .wr_bitmap_u = 0x09, + .wr_bitmap_1l = 0x0A, + .wr_bitmap_1u = 0x0B, + .rd_len_p0_l = 0x0C, + .rd_len_p0_u = 0x0D, + .card_misc_cfg_reg = 0xCC, +}; + +/** ampdu info for general card */ +static struct _ampdu_info ampdu_info_nov15 = { + .ampdu_sta_txwinsize = MLAN_STA_AMPDU_DEF_TXWINSIZE_NOV15, + .ampdu_uap_txwinsize = MLAN_UAP_AMPDU_DEF_TXWINSIZE_NOV15, + .ampdu_uap_rxwinsize = MLAN_UAP_AMPDU_DEF_RXWINSIZE_NOV15, + .ampdu_wfd_txrxwinsize = MLAN_WFD_AMPDU_DEF_TXRXWINSIZE_NOV15, +}; + +/** ampdu info for sd8887 and sd8897 */ +static struct _ampdu_info ampdu_info_v15 = { + .ampdu_sta_txwinsize = MLAN_STA_AMPDU_DEF_TXWINSIZE, + .ampdu_uap_txwinsize = MLAN_UAP_AMPDU_DEF_TXWINSIZE, + .ampdu_uap_rxwinsize = MLAN_UAP_AMPDU_DEF_RXWINSIZE, + .ampdu_wfd_txrxwinsize = MLAN_WFD_AMPDU_DEF_TXRXWINSIZE, +}; + +static const struct _mlan_sdio_device mlan_sdio_sd8777 = { + .reg = &mlan_reg_sd87xx, + .max_ports = 16, + .mp_aggr_pkt_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT_8, + .supports_sdio_new_mode = MFALSE, + .has_control_mask = MTRUE, + .io_port_0_reg = 0x78, + .io_port_1_reg = 0x79, + .io_port_2_reg = 0x7A, + .host_int_rsr_reg = 0x01, + .card_rx_len_reg = 0x62, + .card_rx_unit_reg = 0x63, + .host_int_mask_reg = 0x02, + .host_int_status_reg = 0x03, + .mp_tx_aggr_buf_size = 16384, + .mp_rx_aggr_buf_size = 16384, + .max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K, + .driver_supplicant_auth = 0, + .v15_update = 0, + .v15_fw_api = 0, + .ext_scan = 1, + .ampdu_info = &du_info_nov15, +}; + +static const struct _mlan_sdio_device mlan_sdio_sd8787 = { + .reg = &mlan_reg_sd87xx, + .max_ports = 16, + .mp_aggr_pkt_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT_8, + .supports_sdio_new_mode = MFALSE, + .has_control_mask = MTRUE, + .io_port_0_reg = 0x78, + .io_port_1_reg = 0x79, + .io_port_2_reg = 0x7A, + .host_int_rsr_reg = 0x01, + .card_rx_len_reg = 0x62, + .card_rx_unit_reg = 0x63, + .host_int_mask_reg = 0x02, + .host_int_status_reg = 0x03, + .mp_tx_aggr_buf_size = 16384, + .mp_rx_aggr_buf_size = 16384, + .max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K, + .driver_supplicant_auth = 0, + .v15_update = 0, + .v15_fw_api = 0, + .ext_scan = 1, + .ampdu_info = &du_info_nov15, +}; + +static const struct _mlan_sdio_device mlan_sdio_sd8797 = { + .reg = &mlan_reg_sd87xx, + .max_ports = 16, + .mp_aggr_pkt_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT_8, + .supports_sdio_new_mode = MFALSE, + .has_control_mask = MTRUE, + .io_port_0_reg = 0x78, + .io_port_1_reg = 0x79, + .io_port_2_reg = 0x7A, + .host_int_rsr_reg = 0x01, + .card_rx_len_reg = 0x62, + .card_rx_unit_reg = 0x63, + .host_int_mask_reg = 0x02, + .host_int_status_reg = 0x03, + .mp_tx_aggr_buf_size = 16384, + .mp_rx_aggr_buf_size = 16384, + .max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K, + .driver_supplicant_auth = 0, + .v15_update = 0, + .v15_fw_api = 0, + .ext_scan = 1, + .ampdu_info = &du_info_nov15, +}; + +static const struct _mlan_sdio_device mlan_sdio_sd8887 = { + .reg = &mlan_reg_sd8887, + .max_ports = 32, + .mp_aggr_pkt_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT_16, + .supports_sdio_new_mode = MTRUE, + .has_control_mask = MFALSE, + .card_config_2_1_reg = 0xD9, + .cmd_config_0 = 0xC4, + .cmd_config_1 = 0xC5, + .cmd_rd_len_0 = 0xC0, + .cmd_rd_len_1 = 0xC1, + .io_port_0_reg = 0xE4, + .io_port_1_reg = 0xE5, + .io_port_2_reg = 0xE6, + .host_int_rsr_reg = 0x04, + .card_rx_len_reg = 0x92, + .card_rx_unit_reg = 0x93, + .host_int_mask_reg = 0x08, + .host_int_status_reg = 0x0C, + .mp_tx_aggr_buf_size = 32768, + .mp_rx_aggr_buf_size = 32768, + .max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K, + .driver_supplicant_auth = 0, + .v15_update = 1, + .v15_fw_api = 1, + .ext_scan = 1, + .ampdu_info = &du_info_v15, +}; + +static const struct _mlan_sdio_device mlan_sdio_sd8801 = { + .reg = &mlan_reg_sd87xx, + .max_ports = 16, + .mp_aggr_pkt_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT_8, + .supports_sdio_new_mode = MFALSE, + .has_control_mask = MTRUE, + .io_port_0_reg = 0x78, + .io_port_1_reg = 0x79, + .io_port_2_reg = 0x7A, + .host_int_rsr_reg = 0x01, + .card_rx_len_reg = 0x62, + .card_rx_unit_reg = 0x63, + .host_int_mask_reg = 0x02, + .host_int_status_reg = 0x03, + .mp_tx_aggr_buf_size = 16384, + .mp_rx_aggr_buf_size = 16384, + .max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K, + .driver_supplicant_auth = 1, + .v15_update = 0, + .v15_fw_api = 0, + .ext_scan = 1, + .ampdu_info = &du_info_nov15, +}; + +static const struct _mlan_sdio_device mlan_sdio_sd8897 = { + .reg = &mlan_reg_sd8897, + .max_ports = 32, + .mp_aggr_pkt_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT_16, + .supports_sdio_new_mode = MTRUE, + .has_control_mask = MFALSE, + .card_config_2_1_reg = 0xCD, + .cmd_config_0 = 0xB8, + .cmd_config_1 = 0xB9, + .cmd_rd_len_0 = 0xB4, + .cmd_rd_len_1 = 0xB5, + .io_port_0_reg = 0xD8, + .io_port_1_reg = 0xD9, + .io_port_2_reg = 0xDA, + .host_int_rsr_reg = 0x01, + .card_rx_len_reg = 0xC2, + .card_rx_unit_reg = 0xC3, + .host_int_mask_reg = 0x02, + .host_int_status_reg = 0x03, + .mp_tx_aggr_buf_size = 32768, + .mp_rx_aggr_buf_size = 32768, + .max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_4K, + .driver_supplicant_auth = 0, + .v15_update = 1, + .v15_fw_api = 1, + .ext_scan = 1, + .ampdu_info = &du_info_v15, +}; + /** Enable host interrupt */ mlan_status wlan_enable_host_int(pmlan_adapter pmadapter); /** Probe and initialization function */ mlan_status wlan_sdio_probe(pmlan_adapter pmadapter); +mlan_status wlan_get_sdio_device(pmlan_adapter pmadapter); /** multi interface download check */ -mlan_status wlan_check_winner_status(mlan_adapter * pmadapter, t_u32 * val); +mlan_status wlan_check_winner_status(mlan_adapter *pmadapter, t_u32 *val); +#ifdef SDIO_MULTI_PORT_TX_AGGR +mlan_status wlan_send_mp_aggr_buf(mlan_adapter *pmadapter); +#endif /** Firmware status check */ -mlan_status wlan_check_fw_status(mlan_adapter * pmadapter, t_u32 pollnum); +mlan_status wlan_check_fw_status(mlan_adapter *pmadapter, t_u32 pollnum); /** Read interrupt status */ t_void wlan_interrupt(pmlan_adapter pmadapter); /** Process Interrupt Status */ -mlan_status wlan_process_int_status(mlan_adapter * pmadapter); +mlan_status wlan_process_int_status(mlan_adapter *pmadapter); /** Transfer data to card */ -mlan_status wlan_sdio_host_to_card(mlan_adapter * pmadapter, t_u8 type, - mlan_buffer * mbuf, - mlan_tx_param * tx_param); +mlan_status wlan_sdio_host_to_card(mlan_adapter *pmadapter, t_u8 type, + mlan_buffer *mbuf, mlan_tx_param *tx_param); mlan_status wlan_set_sdio_gpio_int(IN pmlan_private priv); mlan_status wlan_cmd_sdio_gpio_int(pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf); + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf); #endif /* _MLAN_SDIO_H */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_shim.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_shim.c old mode 100755 new mode 100644 index 56cca048..d04d6392 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_shim.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_shim.c @@ -35,6 +35,7 @@ Change log: #ifdef UAP_SUPPORT #include "mlan_uap.h" #endif +#include "mlan_11h.h" /******************************************************** Local Variables @@ -96,7 +97,7 @@ mlan_operations *mlan_ops[] = { }; /** Global moal_assert callback */ -t_void(*assert_callback) (IN t_void * pmoal_handle, IN t_u32 cond) = MNULL; +t_void (*assert_callback) (IN t_void *pmoal_handle, IN t_u32 cond) = MNULL; #ifdef DEBUG_LEVEL1 #ifdef DEBUG_LEVEL2 #define DEFAULT_DEBUG_MASK (0xffffffff) @@ -105,13 +106,14 @@ t_void(*assert_callback) (IN t_void * pmoal_handle, IN t_u32 cond) = MNULL; #endif /** Global moal_print callback */ -t_void(*print_callback) (IN t_void * pmoal_handle, - IN t_u32 level, IN char *pformat, IN ...) = MNULL; +t_void (*print_callback) (IN t_void *pmoal_handle, + IN t_u32 level, IN char *pformat, IN ... + ) = MNULL; /** Global moal_get_system_time callback */ -mlan_status(*get_sys_time_callback) (IN t_void * pmoal_handle, - OUT t_u32 * psec, - OUT t_u32 * pusec) = MNULL; +mlan_status (*get_sys_time_callback) (IN t_void *pmoal_handle, + OUT t_u32 *psec, + OUT t_u32 *pusec) = MNULL; /** Global driver debug mit masks */ t_u32 mlan_drvdbg = DEFAULT_DEBUG_MASK; @@ -153,7 +155,7 @@ t_u32 mlan_drvdbg = DEFAULT_DEBUG_MASK; * mlan_unregister */ mlan_status -mlan_register(IN pmlan_device pmdevice, OUT t_void ** ppmlan_adapter) +mlan_register(IN pmlan_device pmdevice, OUT t_void **ppmlan_adapter) { mlan_status ret = MLAN_STATUS_SUCCESS; pmlan_adapter pmadapter = MNULL; @@ -180,12 +182,12 @@ mlan_register(IN pmlan_device pmdevice, OUT t_void ** ppmlan_adapter) if (pmdevice->callbacks.moal_vmalloc && pmdevice->callbacks.moal_vfree) ret = pmdevice->callbacks.moal_vmalloc(pmdevice->pmoal_handle, sizeof(mlan_adapter), - (t_u8 **) & pmadapter); + (t_u8 **)&pmadapter); else ret = pmdevice->callbacks.moal_malloc(pmdevice->pmoal_handle, sizeof(mlan_adapter), MLAN_MEM_DEF, - (t_u8 **) & pmadapter); + (t_u8 **)&pmadapter); if ((ret != MLAN_STATUS_SUCCESS) || !pmadapter) { ret = MLAN_STATUS_FAILURE; goto exit_register; @@ -228,7 +230,9 @@ mlan_register(IN pmlan_device pmdevice, OUT t_void ** ppmlan_adapter) MASSERT(pcb->moal_spin_lock); MASSERT(pcb->moal_spin_unlock); MASSERT(pcb->moal_tcp_ack_tx_ind); - + MASSERT(pcb->moal_hist_data_add); + MASSERT(pcb->moal_peer_mgmt_frame); + MASSERT(pcb->moal_updata_peer_signal); /* Save pmoal_handle */ pmadapter->pmoal_handle = pmdevice->pmoal_handle; @@ -239,6 +243,13 @@ mlan_register(IN pmlan_device pmdevice, OUT t_void ** ppmlan_adapter) } pmadapter->init_para.int_mode = pmdevice->int_mode; pmadapter->init_para.gpio_pin = pmdevice->gpio_pin; + pmadapter->card_type = pmdevice->card_type; + + ret = wlan_get_sdio_device(pmadapter); + if (MLAN_STATUS_SUCCESS != ret) { + ret = MLAN_STATUS_FAILURE; + goto error; + } /* card specific probing has been deferred until now .. */ ret = wlan_sdio_probe(pmadapter); if (MLAN_STATUS_SUCCESS != ret) { @@ -252,6 +263,10 @@ mlan_register(IN pmlan_device pmdevice, OUT t_void ** ppmlan_adapter) #ifdef MFG_CMD_SUPPORT pmadapter->init_para.mfg_mode = pmdevice->mfg_mode; #endif +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + pmadapter->max_segs = pmdevice->max_segs; + pmadapter->max_seg_size = pmdevice->max_seg_size; +#endif #ifdef SDIO_MULTI_PORT_TX_AGGR pmadapter->init_para.mpa_tx_cfg = pmdevice->mpa_tx_cfg; @@ -270,6 +285,11 @@ mlan_register(IN pmlan_device pmdevice, OUT t_void ** ppmlan_adapter) #else pmadapter->init_para.cfg_11d = 0; #endif + pmadapter->init_para.dfs_master_radar_det_en = + DFS_MASTER_RADAR_DETECT_EN; + pmadapter->init_para.dfs_slave_radar_det_en = DFS_SLAVE_RADAR_DETECT_EN; + if (IS_SD8777(pmadapter->card_type) || IS_SD8787(pmadapter->card_type)) + pmadapter->init_para.fw_crc_check = pmdevice->fw_crc_check; pmadapter->init_para.dev_cap_mask = pmdevice->dev_cap_mask; pmadapter->rx_work_flag = pmdevice->rx_work; @@ -282,13 +302,13 @@ mlan_register(IN pmlan_device pmdevice, OUT t_void ** ppmlan_adapter) if (pcb->moal_vmalloc && pcb->moal_vfree) ret = pcb->moal_vmalloc(pmadapter->pmoal_handle, sizeof(mlan_private), - (t_u8 **) & pmadapter-> + (t_u8 **)&pmadapter-> priv[i]); else ret = pcb->moal_malloc(pmadapter->pmoal_handle, sizeof(mlan_private), MLAN_MEM_DEF, - (t_u8 **) & pmadapter-> + (t_u8 **)&pmadapter-> priv[i]); if (ret != MLAN_STATUS_SUCCESS || !pmadapter->priv[i]) { ret = MLAN_STATUS_FAILURE; @@ -303,11 +323,11 @@ mlan_register(IN pmlan_device pmdevice, OUT t_void ** ppmlan_adapter) /* Save bss_type, frame_type & bss_priority */ pmadapter->priv[i]->bss_type = - (t_u8) pmdevice->bss_attr[i].bss_type; + (t_u8)pmdevice->bss_attr[i].bss_type; pmadapter->priv[i]->frame_type = - (t_u8) pmdevice->bss_attr[i].frame_type; + (t_u8)pmdevice->bss_attr[i].frame_type; pmadapter->priv[i]->bss_priority = - (t_u8) pmdevice->bss_attr[i].bss_priority; + (t_u8)pmdevice->bss_attr[i].bss_priority; if (pmdevice->bss_attr[i].bss_type == MLAN_BSS_TYPE_STA) pmadapter->priv[i]->bss_role = MLAN_BSS_ROLE_STA; @@ -327,7 +347,7 @@ mlan_register(IN pmlan_device pmdevice, OUT t_void ** ppmlan_adapter) /* Save bss_index and bss_num */ pmadapter->priv[i]->bss_index = i; pmadapter->priv[i]->bss_num = - (t_u8) pmdevice->bss_attr[i].bss_num; + (t_u8)pmdevice->bss_attr[i].bss_num; /* init function table */ for (j = 0; mlan_ops[j]; j++) { @@ -376,16 +396,16 @@ mlan_register(IN pmlan_device pmdevice, OUT t_void ** ppmlan_adapter) if (pmadapter->priv[i]) { if (pcb->moal_vmalloc && pcb->moal_vfree) pcb->moal_vfree(pmadapter->pmoal_handle, - (t_u8 *) pmadapter->priv[i]); + (t_u8 *)pmadapter->priv[i]); else pcb->moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) pmadapter->priv[i]); + (t_u8 *)pmadapter->priv[i]); } } if (pcb->moal_vmalloc && pcb->moal_vfree) - pcb->moal_vfree(pmadapter->pmoal_handle, (t_u8 *) pmadapter); + pcb->moal_vfree(pmadapter->pmoal_handle, (t_u8 *)pmadapter); else - pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *) pmadapter); + pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)pmadapter); exit_register: LEAVE(); @@ -402,10 +422,11 @@ mlan_register(IN pmlan_device pmdevice, OUT t_void ** ppmlan_adapter) * The deregistration succeeded. */ mlan_status -mlan_unregister(IN t_void * pmlan_adapter) +mlan_unregister(IN t_void *pmlan_adapter + ) { mlan_status ret = MLAN_STATUS_SUCCESS; - mlan_adapter *pmadapter = (mlan_adapter *) pmlan_adapter; + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; pmlan_callbacks pcb; t_s32 i = 0; @@ -429,18 +450,18 @@ mlan_unregister(IN t_void * pmlan_adapter) if (pmadapter->priv[i]) { if (pcb->moal_vmalloc && pcb->moal_vfree) pcb->moal_vfree(pmadapter->pmoal_handle, - (t_u8 *) pmadapter->priv[i]); + (t_u8 *)pmadapter->priv[i]); else pcb->moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) pmadapter->priv[i]); + (t_u8 *)pmadapter->priv[i]); } } /* Free mlan_adapter */ if (pcb->moal_vmalloc && pcb->moal_vfree) - pcb->moal_vfree(pmadapter->pmoal_handle, (t_u8 *) pmadapter); + pcb->moal_vfree(pmadapter->pmoal_handle, (t_u8 *)pmadapter); else - pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *) pmadapter); + pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)pmadapter); LEAVE(); return ret; @@ -459,10 +480,10 @@ mlan_unregister(IN t_void * pmlan_adapter) * The firmware download failed. */ mlan_status -mlan_dnld_fw(IN t_void * pmlan_adapter, IN pmlan_fw_image pmfw) +mlan_dnld_fw(IN t_void *pmlan_adapter, IN pmlan_fw_image pmfw) { mlan_status ret = MLAN_STATUS_SUCCESS; - mlan_adapter *pmadapter = (mlan_adapter *) pmlan_adapter; + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; t_u32 poll_num = 1; t_u32 winner = 0; @@ -538,10 +559,10 @@ mlan_dnld_fw(IN t_void * pmlan_adapter, IN pmlan_fw_image pmfw) * */ mlan_status -mlan_set_init_param(IN t_void * pmlan_adapter, IN pmlan_init_param pparam) +mlan_set_init_param(IN t_void *pmlan_adapter, IN pmlan_init_param pparam) { mlan_status ret = MLAN_STATUS_SUCCESS; - mlan_adapter *pmadapter = (mlan_adapter *) pmlan_adapter; + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; ENTER(); MASSERT(pmlan_adapter); @@ -570,10 +591,11 @@ mlan_set_init_param(IN t_void * pmlan_adapter, IN pmlan_init_param pparam) * The firmware initialization failed. */ mlan_status -mlan_init_fw(IN t_void * pmlan_adapter) +mlan_init_fw(IN t_void *pmlan_adapter + ) { mlan_status ret = MLAN_STATUS_SUCCESS; - mlan_adapter *pmadapter = (mlan_adapter *) pmlan_adapter; + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; ENTER(); MASSERT(pmlan_adapter); @@ -595,16 +617,17 @@ mlan_init_fw(IN t_void * pmlan_adapter) * * @return MLAN_STATUS_SUCCESS * The firmware shutdown call succeeded. - * MLAN_STATUS_PENDING + * MLAN_STATUS_PENDING * The firmware shutdown call is pending. - * MLAN_STATUS_FAILURE + * MLAN_STATUS_FAILURE * The firmware shutdown call failed. */ mlan_status -mlan_shutdown_fw(IN t_void * pmlan_adapter) +mlan_shutdown_fw(IN t_void *pmlan_adapter + ) { mlan_status ret = MLAN_STATUS_PENDING; - mlan_adapter *pmadapter = (mlan_adapter *) pmlan_adapter; + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; pmlan_buffer pmbuf; pmlan_callbacks pcb; t_s32 i = 0; @@ -640,11 +663,12 @@ mlan_shutdown_fw(IN t_void * pmlan_adapter) pcb = &pmadapter->callbacks; - while ((pmbuf = - (pmlan_buffer) util_dequeue_list(pmadapter->pmoal_handle, - &pmadapter->rx_data_queue, - pcb->moal_spin_lock, - pcb->moal_spin_unlock))) { + while ((pmbuf = (pmlan_buffer)util_dequeue_list(pmadapter->pmoal_handle, + &pmadapter-> + rx_data_queue, + pcb->moal_spin_lock, + pcb-> + moal_spin_unlock))) { wlan_free_mlan_buffer(pmadapter, pmbuf); } util_scalar_write(pmadapter->pmoal_handle, &pmadapter->rx_pkts_queued, @@ -666,10 +690,11 @@ mlan_shutdown_fw(IN t_void * pmlan_adapter) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -mlan_rx_process(IN t_void * pmlan_adapter) +mlan_rx_process(IN t_void *pmlan_adapter + ) { mlan_status ret = MLAN_STATUS_SUCCESS; - mlan_adapter *pmadapter = (mlan_adapter *) pmlan_adapter; + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; pmlan_callbacks pcb; pmlan_buffer pmbuf; @@ -688,13 +713,13 @@ mlan_rx_process(IN t_void * pmlan_adapter) pmadapter->prx_proc_lock); } /* Check for Rx data */ - while ((pmbuf = - (pmlan_buffer) util_dequeue_list(pmadapter->pmoal_handle, - &pmadapter->rx_data_queue, - pmadapter->callbacks. - moal_spin_lock, - pmadapter->callbacks. - moal_spin_unlock))) { + while ((pmbuf = (pmlan_buffer)util_dequeue_list(pmadapter->pmoal_handle, + &pmadapter-> + rx_data_queue, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock))) { util_scalar_decrement(pmadapter->pmoal_handle, &pmadapter->rx_pkts_queued, pmadapter->callbacks.moal_spin_lock, @@ -731,10 +756,11 @@ mlan_rx_process(IN t_void * pmlan_adapter) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -mlan_main_process(IN t_void * pmlan_adapter) +mlan_main_process(IN t_void *pmlan_adapter + ) { mlan_status ret = MLAN_STATUS_SUCCESS; - mlan_adapter *pmadapter = (mlan_adapter *) pmlan_adapter; + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; pmlan_callbacks pcb; ENTER(); @@ -752,9 +778,9 @@ mlan_main_process(IN t_void * pmlan_adapter) pcb->moal_spin_unlock(pmadapter->pmoal_handle, pmadapter->pmain_proc_lock); goto exit_main_proc; - } else { + } else pmadapter->mlan_processing = MTRUE; - } + process_start: do { pmadapter->more_task_flag = MFALSE; @@ -825,11 +851,11 @@ mlan_main_process(IN t_void * pmlan_adapter) break; if (pmadapter->data_sent - || pmadapter->scan_processing || wlan_is_tdls_link_chan_switching(pmadapter-> tdls_status) || (wlan_bypass_tx_list_empty(pmadapter) && wlan_wmm_lists_empty(pmadapter)) + || wlan_11h_radar_detected_tx_blocked(pmadapter) ) { if (pmadapter->cmd_sent || pmadapter->curr_cmd || !wlan_is_send_cmd_allowed(pmadapter-> @@ -864,11 +890,9 @@ mlan_main_process(IN t_void * pmlan_adapter) /* Check if we need to confirm Sleep Request received previously */ - if (pmadapter->ps_state == PS_STATE_PRE_SLEEP) { - if (!pmadapter->cmd_sent && !pmadapter->curr_cmd) { + if (pmadapter->ps_state == PS_STATE_PRE_SLEEP) + if (!pmadapter->cmd_sent && !pmadapter->curr_cmd) wlan_check_ps_cond(pmadapter); - } - } /* * The ps_state may have been changed during processing of @@ -895,7 +919,7 @@ mlan_main_process(IN t_void * pmlan_adapter) } if (!pmadapter->data_sent && - !pmadapter->scan_processing && + !wlan_11h_radar_detected_tx_blocked(pmadapter) && !wlan_is_tdls_link_chan_switching(pmadapter->tdls_status) && !wlan_bypass_tx_list_empty(pmadapter)) { PRINTM(MINFO, "mlan_send_pkt(): deq(bybass_txq)\n"); @@ -909,9 +933,8 @@ mlan_main_process(IN t_void * pmlan_adapter) } } - if (!pmadapter->data_sent - && !pmadapter->scan_processing - && !wlan_wmm_lists_empty(pmadapter) + if (!pmadapter->data_sent && !wlan_wmm_lists_empty(pmadapter) + && !wlan_11h_radar_detected_tx_blocked(pmadapter) && !wlan_is_tdls_link_chan_switching(pmadapter->tdls_status) ) { wlan_wmm_process_tx(pmadapter); @@ -969,24 +992,24 @@ mlan_main_process(IN t_void * pmlan_adapter) * @return MLAN_STATUS_PENDING */ mlan_status -mlan_send_packet(IN t_void * pmlan_adapter, IN pmlan_buffer pmbuf) +mlan_send_packet(IN t_void *pmlan_adapter, IN pmlan_buffer pmbuf) { mlan_status ret = MLAN_STATUS_PENDING; - mlan_adapter *pmadapter = (mlan_adapter *) pmlan_adapter; + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; mlan_private *pmpriv; t_u16 eth_type = 0; t_u8 ra[MLAN_MAC_ADDR_LENGTH]; tdlsStatus_e tdls_status; ENTER(); - MASSERT(pmlan_adapter && pmbuf); + MASSERT(pmlan_adapter &&pmbuf); MASSERT(pmbuf->bss_index < pmadapter->priv_num); pmbuf->flags |= MLAN_BUF_FLAG_MOAL_TX_BUF; pmpriv = pmadapter->priv[pmbuf->bss_index]; eth_type = - mlan_ntohs(*(t_u16 *) & pmbuf-> + mlan_ntohs(*(t_u16 *)&pmbuf-> pbuf[pmbuf->data_offset + MLAN_ETHER_PKT_TYPE_OFFSET]); if (((pmadapter->priv[pmbuf->bss_index]->port_ctrl_mode == MTRUE) && @@ -1025,10 +1048,10 @@ mlan_send_packet(IN t_void * pmlan_adapter, IN pmlan_buffer pmbuf) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail */ mlan_status -mlan_ioctl(IN t_void * adapter, IN pmlan_ioctl_req pioctl_req) +mlan_ioctl(IN t_void *adapter, IN pmlan_ioctl_req pioctl_req) { mlan_status ret = MLAN_STATUS_SUCCESS; - pmlan_adapter pmadapter = (pmlan_adapter) adapter; + pmlan_adapter pmadapter = (pmlan_adapter)adapter; pmlan_private pmpriv = MNULL; ENTER(); @@ -1060,10 +1083,10 @@ mlan_ioctl(IN t_void * adapter, IN pmlan_ioctl_req pioctl_req) * @return MLAN_STATUS_SUCCESS */ mlan_status -mlan_recv_packet_complete(IN t_void * pmlan_adapter, +mlan_recv_packet_complete(IN t_void *pmlan_adapter, IN pmlan_buffer pmbuf, IN mlan_status status) { - mlan_adapter *pmadapter = (mlan_adapter *) pmlan_adapter; + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; ENTER(); wlan_recv_packet_complete(pmadapter, pmbuf, status); @@ -1081,9 +1104,9 @@ mlan_recv_packet_complete(IN t_void * pmlan_adapter, * @return wmm queue priority (0 - 3) */ t_u8 -mlan_select_wmm_queue(IN t_void * pmlan_adapter, IN t_u8 bss_num, IN t_u8 tid) +mlan_select_wmm_queue(IN t_void *pmlan_adapter, IN t_u8 bss_num, IN t_u8 tid) { - mlan_adapter *pmadapter = (mlan_adapter *) pmlan_adapter; + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; pmlan_private pmpriv = pmadapter->priv[bss_num]; t_u8 ret; ENTER(); @@ -1099,9 +1122,9 @@ mlan_select_wmm_queue(IN t_void * pmlan_adapter, IN t_u8 bss_num, IN t_u8 tid) * @return N/A */ t_void -mlan_interrupt(IN t_void * adapter) +mlan_interrupt(IN t_void *adapter) { - mlan_adapter *pmadapter = (mlan_adapter *) adapter; + mlan_adapter *pmadapter = (mlan_adapter *)adapter; ENTER(); if (!pmadapter->pps_uapsd_mode && pmadapter->ps_state == PS_STATE_SLEEP) { @@ -1111,3 +1134,18 @@ mlan_interrupt(IN t_void * adapter) wlan_interrupt(pmadapter); LEAVE(); } + +/** + * @brief This function wakeup firmware. + * + * @param adapter A pointer to mlan_adapter structure + * @return N/A + */ +t_void +mlan_pm_wakeup_card(IN t_void *adapter) +{ + mlan_adapter *pmadapter = (mlan_adapter *)adapter; + ENTER(); + wlan_pm_wakeup_card(pmadapter); + LEAVE(); +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_cmd.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_cmd.c old mode 100755 new mode 100644 index fd3e4d62..a9a2ba75 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_cmd.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_cmd.c @@ -33,7 +33,9 @@ Change log: #include "mlan_main.h" #include "mlan_wmm.h" #include "mlan_11n.h" +#include "mlan_11h.h" #include "mlan_sdio.h" +#include "mlan_meas.h" /******************************************************** Local Variables @@ -58,7 +60,7 @@ Change log: */ static mlan_status wlan_cmd_802_11_rssi_info(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * pcmd, IN t_u16 cmd_action) + IN HostCmd_DS_COMMAND *pcmd, IN t_u16 cmd_action) { ENTER(); @@ -98,9 +100,9 @@ wlan_cmd_802_11_rssi_info(IN pmlan_private pmpriv, */ static mlan_status wlan_cmd_802_11_snmp_mib(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, + IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action, - IN t_u32 cmd_oid, IN t_void * pdata_buf) + IN t_u32 cmd_oid, IN t_void *pdata_buf) { HostCmd_DS_802_11_SNMP_MIB *psnmp_mib = &cmd->params.smib; t_u32 ul_temp; @@ -118,79 +120,104 @@ wlan_cmd_802_11_snmp_mib(IN pmlan_private pmpriv, switch (cmd_oid) { case DtimPeriod_i: - psnmp_mib->oid = wlan_cpu_to_le16((t_u16) DtimPeriod_i); + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)DtimPeriod_i); if (cmd_action == HostCmd_ACT_GEN_SET) { psnmp_mib->query_type = wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u8)); - ul_temp = *((t_u32 *) pdata_buf); - psnmp_mib->value[0] = (t_u8) ul_temp; + ul_temp = *((t_u32 *)pdata_buf); + psnmp_mib->value[0] = (t_u8)ul_temp; cmd->size += sizeof(t_u8); } break; case FragThresh_i: - psnmp_mib->oid = wlan_cpu_to_le16((t_u16) FragThresh_i); + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)FragThresh_i); if (cmd_action == HostCmd_ACT_GEN_SET) { psnmp_mib->query_type = wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u16)); - ul_temp = *((t_u32 *) pdata_buf); - *((t_u16 *) (psnmp_mib->value)) = - wlan_cpu_to_le16((t_u16) ul_temp); + ul_temp = *((t_u32 *)pdata_buf); + *((t_u16 *)(psnmp_mib->value)) = + wlan_cpu_to_le16((t_u16)ul_temp); cmd->size += sizeof(t_u16); } break; case RtsThresh_i: - psnmp_mib->oid = wlan_cpu_to_le16((t_u16) RtsThresh_i); + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)RtsThresh_i); if (cmd_action == HostCmd_ACT_GEN_SET) { psnmp_mib->query_type = wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u16)); - ul_temp = *((t_u32 *) pdata_buf); - *(t_u16 *) (psnmp_mib->value) = - wlan_cpu_to_le16((t_u16) ul_temp); + ul_temp = *((t_u32 *)pdata_buf); + *(t_u16 *)(psnmp_mib->value) = + wlan_cpu_to_le16((t_u16)ul_temp); cmd->size += sizeof(t_u16); } break; case ShortRetryLim_i: - psnmp_mib->oid = wlan_cpu_to_le16((t_u16) ShortRetryLim_i); + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)ShortRetryLim_i); if (cmd_action == HostCmd_ACT_GEN_SET) { psnmp_mib->query_type = wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u16)); - ul_temp = (*(t_u32 *) pdata_buf); - *((t_u16 *) (psnmp_mib->value)) = - wlan_cpu_to_le16((t_u16) ul_temp); + ul_temp = (*(t_u32 *)pdata_buf); + *((t_u16 *)(psnmp_mib->value)) = + wlan_cpu_to_le16((t_u16)ul_temp); cmd->size += sizeof(t_u16); } break; case Dot11D_i: - psnmp_mib->oid = wlan_cpu_to_le16((t_u16) Dot11D_i); + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)Dot11D_i); if (cmd_action == HostCmd_ACT_GEN_SET) { psnmp_mib->query_type = wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u16)); - ul_temp = *(t_u32 *) pdata_buf; - *((t_u16 *) (psnmp_mib->value)) = - wlan_cpu_to_le16((t_u16) ul_temp); + ul_temp = *(t_u32 *)pdata_buf; + *((t_u16 *)(psnmp_mib->value)) = + wlan_cpu_to_le16((t_u16)ul_temp); + cmd->size += sizeof(t_u16); + } + break; + case Dot11H_i: + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)Dot11H_i); + if (cmd_action == HostCmd_ACT_GEN_SET) { + psnmp_mib->query_type = + wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); + psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u16)); + ul_temp = *(t_u32 *)pdata_buf; + *((t_u16 *)(psnmp_mib->value)) = + wlan_cpu_to_le16((t_u16)ul_temp); cmd->size += sizeof(t_u16); } break; case WwsMode_i: - psnmp_mib->oid = wlan_cpu_to_le16((t_u16) WwsMode_i); + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)WwsMode_i); if (cmd_action == HostCmd_ACT_GEN_SET) { psnmp_mib->query_type = wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u16)); - ul_temp = *((t_u32 *) pdata_buf); - *((t_u16 *) (psnmp_mib->value)) = - wlan_cpu_to_le16((t_u16) ul_temp); + ul_temp = *((t_u32 *)pdata_buf); + *((t_u16 *)(psnmp_mib->value)) = + wlan_cpu_to_le16((t_u16)ul_temp); cmd->size += sizeof(t_u16); } break; case Thermal_i: - psnmp_mib->oid = wlan_cpu_to_le16((t_u16) Thermal_i); + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)Thermal_i); + break; + case NullPktPeriod_i: + /** keep alive null data pkt interval in full power mode */ + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)NullPktPeriod_i); + if (cmd_action == HostCmd_ACT_GEN_SET) { + psnmp_mib->query_type = + wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); + psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u32)); + ul_temp = *((t_u32 *)pdata_buf); + *((t_u32 *)(psnmp_mib->value)) = + wlan_cpu_to_le32((t_u32)ul_temp); + cmd->size += sizeof(t_u32); + } break; default: break; @@ -199,7 +226,7 @@ wlan_cmd_802_11_snmp_mib(IN pmlan_private pmpriv, PRINTM(MINFO, "SNMP_CMD: Action=0x%x, OID=0x%x, OIDSize=0x%x, Value=0x%x\n", cmd_action, cmd_oid, wlan_le16_to_cpu(psnmp_mib->buf_size), - wlan_le16_to_cpu(*(t_u16 *) psnmp_mib->value)); + wlan_le16_to_cpu(*(t_u16 *)psnmp_mib->value)); LEAVE(); return MLAN_STATUS_SUCCESS; } @@ -213,7 +240,7 @@ wlan_cmd_802_11_snmp_mib(IN pmlan_private pmpriv, * @return MLAN_STATUS_SUCCESS */ static mlan_status -wlan_cmd_802_11_get_log(IN pmlan_private pmpriv, IN HostCmd_DS_COMMAND * cmd) +wlan_cmd_802_11_get_log(IN pmlan_private pmpriv, IN HostCmd_DS_COMMAND *cmd) { ENTER(); cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_GET_LOG); @@ -235,8 +262,8 @@ wlan_cmd_802_11_get_log(IN pmlan_private pmpriv, IN HostCmd_DS_COMMAND * cmd) */ static mlan_status wlan_cmd_tx_power_cfg(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { MrvlTypes_Power_Group_t *ppg_tlv = MNULL; HostCmd_DS_TXPWR_CFG *ptxp = MNULL; @@ -248,22 +275,20 @@ wlan_cmd_tx_power_cfg(IN pmlan_private pmpriv, cmd->size = wlan_cpu_to_le16(S_DS_GEN + sizeof(HostCmd_DS_TXPWR_CFG)); switch (cmd_action) { case HostCmd_ACT_GEN_SET: - ptxp = (HostCmd_DS_TXPWR_CFG *) pdata_buf; + ptxp = (HostCmd_DS_TXPWR_CFG *)pdata_buf; if (ptxp->mode) { ppg_tlv = - (MrvlTypes_Power_Group_t *) ((t_u8 *) pdata_buf - + - sizeof - (HostCmd_DS_TXPWR_CFG)); + (MrvlTypes_Power_Group_t *)((t_u8 *)pdata_buf + + sizeof + (HostCmd_DS_TXPWR_CFG)); memmove(pmpriv->adapter, ptxp_cfg, pdata_buf, sizeof(HostCmd_DS_TXPWR_CFG) + sizeof(MrvlTypes_Power_Group_t) + ppg_tlv->length); - ppg_tlv = - (MrvlTypes_Power_Group_t *) ((t_u8 *) ptxp_cfg + - sizeof - (HostCmd_DS_TXPWR_CFG)); + ppg_tlv = (MrvlTypes_Power_Group_t *)((t_u8 *)ptxp_cfg + + sizeof + (HostCmd_DS_TXPWR_CFG)); cmd->size += wlan_cpu_to_le16(sizeof(MrvlTypes_Power_Group_t) + ppg_tlv->length); @@ -297,8 +322,8 @@ wlan_cmd_tx_power_cfg(IN pmlan_private pmpriv, */ static mlan_status wlan_cmd_802_11_rf_tx_power(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { HostCmd_DS_802_11_RF_TX_POWER *prtp = &cmd->params.txp; @@ -321,7 +346,7 @@ wlan_cmd_802_11_rf_tx_power(IN pmlan_private pmpriv, case HostCmd_ACT_GEN_SET: prtp->action = wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); - prtp->current_level = wlan_cpu_to_le16(*((t_s16 *) pdata_buf)); + prtp->current_level = wlan_cpu_to_le16(*((t_s16 *)pdata_buf)); break; } LEAVE(); @@ -376,13 +401,13 @@ wlan_is_p2p_connected(IN pmlan_adapter pmadapter) */ static mlan_status wlan_cmd_802_11_hs_cfg(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN hs_config_param * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN hs_config_param *pdata_buf) { pmlan_adapter pmadapter = pmpriv->adapter; HostCmd_DS_802_11_HS_CFG_ENH *phs_cfg = &cmd->params.opt_hs_cfg; t_u16 hs_activate = MFALSE; - t_u8 *tlv = (t_u8 *) phs_cfg + sizeof(HostCmd_DS_802_11_HS_CFG_ENH); + t_u8 *tlv = (t_u8 *)phs_cfg + sizeof(HostCmd_DS_802_11_HS_CFG_ENH); MrvlIEtypes_HsWakeHoldoff_t *holdoff_tlv = MNULL; ENTER(); @@ -393,7 +418,21 @@ wlan_cmd_802_11_hs_cfg(IN pmlan_private pmpriv, } cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_HS_CFG_ENH); - cmd->size = S_DS_GEN + sizeof(HostCmd_DS_802_11_HS_CFG_ENH); + if (!hs_activate && (pdata_buf->conditions != HOST_SLEEP_CFG_CANCEL) + && ((pmadapter->arp_filter_size > 0) + && (pmadapter->arp_filter_size <= ARP_FILTER_MAX_BUF_SIZE))) { + PRINTM(MINFO, "Attach %d bytes ArpFilter to HSCfg cmd\n", + pmadapter->arp_filter_size); + memcpy(pmpriv->adapter, + ((t_u8 *)phs_cfg) + sizeof(HostCmd_DS_802_11_HS_CFG_ENH), + pmadapter->arp_filter, pmadapter->arp_filter_size); + cmd->size = + pmadapter->arp_filter_size + + sizeof(HostCmd_DS_802_11_HS_CFG_ENH) + S_DS_GEN; + tlv = (t_u8 *)phs_cfg + sizeof(HostCmd_DS_802_11_HS_CFG_ENH) + + pmadapter->arp_filter_size; + } else + cmd->size = S_DS_GEN + sizeof(HostCmd_DS_802_11_HS_CFG_ENH); if (hs_activate) { cmd->size = wlan_cpu_to_le16(cmd->size); @@ -416,7 +455,7 @@ wlan_cmd_802_11_hs_cfg(IN pmlan_private pmpriv, phs_cfg->params.hs_config.gap = pdata_buf->gap; if (pmadapter->min_wake_holdoff) { cmd->size += sizeof(MrvlIEtypes_HsWakeHoldoff_t); - holdoff_tlv = (MrvlIEtypes_HsWakeHoldoff_t *) tlv; + holdoff_tlv = (MrvlIEtypes_HsWakeHoldoff_t *)tlv; holdoff_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_HS_WAKE_HOLDOFF); holdoff_tlv->header.len = @@ -452,7 +491,7 @@ wlan_cmd_802_11_hs_cfg(IN pmlan_private pmpriv, */ static mlan_status wlan_cmd_802_11_mac_address(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, IN t_u16 cmd_action) + IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action) { ENTER(); cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_MAC_ADDRESS); @@ -483,8 +522,8 @@ wlan_cmd_802_11_mac_address(IN pmlan_private pmpriv, */ static mlan_status wlan_cmd_802_11_sleep_period(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_u16 * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_u16 *pdata_buf) { HostCmd_DS_802_11_SLEEP_PERIOD *pcmd_sleep_pd = &cmd->params.sleep_pd; @@ -495,8 +534,7 @@ wlan_cmd_802_11_sleep_period(IN pmlan_private pmpriv, wlan_cpu_to_le16(sizeof(HostCmd_DS_802_11_SLEEP_PERIOD) + S_DS_GEN); if (cmd_action == HostCmd_ACT_GEN_SET) { - pcmd_sleep_pd->sleep_pd = - wlan_cpu_to_le16(*(t_u16 *) pdata_buf); + pcmd_sleep_pd->sleep_pd = wlan_cpu_to_le16(*(t_u16 *)pdata_buf); } pcmd_sleep_pd->action = wlan_cpu_to_le16(cmd_action); @@ -516,11 +554,11 @@ wlan_cmd_802_11_sleep_period(IN pmlan_private pmpriv, */ static mlan_status wlan_cmd_802_11_sleep_params(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_u16 * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_u16 *pdata_buf) { HostCmd_DS_802_11_SLEEP_PARAMS *pcmd_sp = &cmd->params.sleep_param; - mlan_ds_sleep_params *psp = (mlan_ds_sleep_params *) pdata_buf; + mlan_ds_sleep_params *psp = (mlan_ds_sleep_params *)pdata_buf; ENTER(); @@ -529,12 +567,12 @@ wlan_cmd_802_11_sleep_params(IN pmlan_private pmpriv, wlan_cpu_to_le16(sizeof(HostCmd_DS_802_11_SLEEP_PARAMS) + S_DS_GEN); if (cmd_action == HostCmd_ACT_GEN_SET) { - pcmd_sp->reserved = (t_u16) psp->reserved; - pcmd_sp->error = (t_u16) psp->error; - pcmd_sp->offset = (t_u16) psp->offset; - pcmd_sp->stable_time = (t_u16) psp->stable_time; - pcmd_sp->cal_control = (t_u8) psp->cal_control; - pcmd_sp->external_sleep_clk = (t_u8) psp->ext_sleep_clk; + pcmd_sp->reserved = (t_u16)psp->reserved; + pcmd_sp->error = (t_u16)psp->error; + pcmd_sp->offset = (t_u16)psp->offset; + pcmd_sp->stable_time = (t_u16)psp->stable_time; + pcmd_sp->cal_control = (t_u8)psp->cal_control; + pcmd_sp->external_sleep_clk = (t_u8)psp->ext_sleep_clk; pcmd_sp->reserved = wlan_cpu_to_le16(pcmd_sp->reserved); pcmd_sp->error = wlan_cpu_to_le16(pcmd_sp->error); @@ -559,10 +597,10 @@ wlan_cmd_802_11_sleep_params(IN pmlan_private pmpriv, */ static mlan_status wlan_cmd_mac_multicast_adr(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { - mlan_multicast_list *pmcast_list = (mlan_multicast_list *) pdata_buf; + mlan_multicast_list *pmcast_list = (mlan_multicast_list *)pdata_buf; HostCmd_DS_MAC_MULTICAST_ADR *pmc_addr = &cmd->params.mc_addr; ENTER(); @@ -573,7 +611,7 @@ wlan_cmd_mac_multicast_adr(IN pmlan_private pmpriv, pmc_addr->action = wlan_cpu_to_le16(cmd_action); pmc_addr->num_of_adrs = - wlan_cpu_to_le16((t_u16) pmcast_list->num_multicast_addr); + wlan_cpu_to_le16((t_u16)pmcast_list->num_multicast_addr); memcpy(pmpriv->adapter, pmc_addr->mac_list, pmcast_list->mac_list, pmcast_list->num_multicast_addr * MLAN_MAC_ADDR_LENGTH); @@ -594,8 +632,7 @@ wlan_cmd_mac_multicast_adr(IN pmlan_private pmpriv, static mlan_status wlan_cmd_802_11_deauthenticate(IN pmlan_private pmpriv, IN t_u16 cmd_no, - IN HostCmd_DS_COMMAND * cmd, - IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) { HostCmd_DS_802_11_DEAUTHENTICATE *pdeauth = &cmd->params.deauth; @@ -607,7 +644,7 @@ wlan_cmd_802_11_deauthenticate(IN pmlan_private pmpriv, S_DS_GEN); /* Set AP MAC address */ - memcpy(pmpriv->adapter, pdeauth->mac_addr, (t_u8 *) pdata_buf, + memcpy(pmpriv->adapter, pdeauth->mac_addr, (t_u8 *)pdata_buf, MLAN_MAC_ADDR_LENGTH); if (cmd_no == HostCmd_CMD_802_11_DEAUTHENTICATE) PRINTM(MCMND, "Deauth: " MACSTR "\n", @@ -616,7 +653,12 @@ wlan_cmd_802_11_deauthenticate(IN pmlan_private pmpriv, PRINTM(MCMND, "Disassociate: " MACSTR "\n", MAC2STR(pdeauth->mac_addr)); - { + if (pmpriv->adapter->state_11h.recvd_chanswann_event) { +/** Reason code 36 = Requested from peer station as it is leaving the BSS */ +#define REASON_CODE_PEER_STA_LEAVING 36 + pdeauth->reason_code = + wlan_cpu_to_le16(REASON_CODE_PEER_STA_LEAVING); + } else { /** Reason code 3 = Station is leaving */ #define REASON_CODE_STA_LEAVING 3 pdeauth->reason_code = @@ -636,14 +678,16 @@ wlan_cmd_802_11_deauthenticate(IN pmlan_private pmpriv, * @return MLAN_STATUS_SUCCESS */ static mlan_status -wlan_cmd_802_11_ad_hoc_stop(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd) +wlan_cmd_802_11_ad_hoc_stop(IN pmlan_private pmpriv, IN HostCmd_DS_COMMAND *cmd) { ENTER(); cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_AD_HOC_STOP); cmd->size = wlan_cpu_to_le16(S_DS_GEN); + if (wlan_11h_is_active(pmpriv)) + wlan_11h_activate(pmpriv, MNULL, MFALSE); + LEAVE(); return MLAN_STATUS_SUCCESS; } @@ -661,13 +705,13 @@ wlan_cmd_802_11_ad_hoc_stop(IN pmlan_private pmpriv, */ static mlan_status wlan_cmd_802_11_key_material(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, + IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action, - IN t_u32 cmd_oid, IN t_void * pdata_buf) + IN t_u32 cmd_oid, IN t_void *pdata_buf) { HostCmd_DS_802_11_KEY_MATERIAL *pkey_material = &cmd->params.key_material; - mlan_ds_encrypt_key *pkey = (mlan_ds_encrypt_key *) pdata_buf; + mlan_ds_encrypt_key *pkey = (mlan_ds_encrypt_key *)pdata_buf; mlan_status ret = MLAN_STATUS_SUCCESS; ENTER(); @@ -716,7 +760,8 @@ wlan_cmd_802_11_key_material(IN pmlan_private pmpriv, pkey_material->key_param_set.key_idx = pkey->key_index & KEY_INDEX_MASK; pkey_material->key_param_set.key_info = - KEY_INFO_MCAST_KEY | KEY_INFO_UCAST_KEY; + wlan_cpu_to_le16(KEY_INFO_MCAST_KEY | + KEY_INFO_UCAST_KEY); memcpy(pmpriv->adapter, pkey_material->key_param_set.mac_addr, pkey->mac_addr, MLAN_MAC_ADDR_LENGTH); cmd->size = @@ -854,7 +899,8 @@ wlan_cmd_802_11_key_material(IN pmlan_private pmpriv, memcpy(pmpriv->adapter, pkey_material->key_param_set.key_params.cmac_aes. ipn, pkey->pn, SEQ_MAX_SIZE); - pkey_material->key_param_set.key_info &= ~KEY_INFO_MCAST_KEY; + pkey_material->key_param_set.key_info &= + ~(wlan_cpu_to_le16(KEY_INFO_MCAST_KEY)); pkey_material->key_param_set.key_info |= wlan_cpu_to_le16(KEY_INFO_AES_MCAST_IGTK); pkey_material->key_param_set.key_type = KEY_TYPE_ID_AES_CMAC; @@ -901,6 +947,212 @@ wlan_cmd_802_11_key_material(IN pmlan_private pmpriv, return ret; } +/** + * @brief This function prepares command of supplicant pmk + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_cmd_802_11_supplicant_pmk(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + MrvlIEtypes_PMK_t *ppmk_tlv = MNULL; + MrvlIEtypes_Passphrase_t *ppassphrase_tlv = MNULL; + MrvlIEtypes_SsIdParamSet_t *pssid_tlv = MNULL; + MrvlIEtypes_Bssid_t *pbssid_tlv = MNULL; + HostCmd_DS_802_11_SUPPLICANT_PMK *pesupplicant_psk = + &cmd->params.esupplicant_psk; + t_u8 *ptlv_buffer = (t_u8 *)pesupplicant_psk->tlv_buffer; + mlan_ds_passphrase *psk = (mlan_ds_passphrase *)pdata_buf; + t_u8 zero_mac[] = { 0, 0, 0, 0, 0, 0 }; + + ENTER(); + /* + * Parse the rest of the buf here + * 1) - This will get the passphrase, AKMP + * for specified ssid, if none specified then it will get all. + * Eg: iwpriv passphrase 0:ssid=marvell + * 2) :: + * - passphrase and psk cannot be provided to + * the same SSID, Takes one SSID at a time, If ssid= is present + * the it should contain a passphrase or psk. If no arguments are + * provided then AKMP=802.1x, and passphrase should be provided + * after association. + * End of each parameter should be followed by a ':'(except for the + * last parameter) as the delimiter. If ':' has to be used in + * an SSID then a '/' should be preceded to ':' as a escape. + * Eg:iwpriv passphrase + * "1:ssid=mrvl AP:psk=abcdefgh:bssid=00:50:43:ef:23:f3" + * iwpriv passphrase + * "1:ssid=mrvl/: AP:psk=abcdefgd:bssid=00:50:43:ef:23:f3" + * iwpriv passphrase "1:ssid=mrvlAP:psk=abcdefgd" + * 3) - This will clear the passphrase + * for specified ssid, if none specified then it will clear all. + * Eg: iwpriv passphrase 2:ssid=marvell + */ + + /* -1 is for t_u8 TlvBuffer[1] as this should not be included */ + cmd->size = sizeof(HostCmd_DS_802_11_SUPPLICANT_PMK) + S_DS_GEN - 1; + if (psk->ssid.ssid_len) { + pssid_tlv = (MrvlIEtypes_SsIdParamSet_t *)ptlv_buffer; + pssid_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_SSID); + pssid_tlv->header.len = + (t_u16)MIN(MLAN_MAX_SSID_LENGTH, psk->ssid.ssid_len); + memcpy(pmpriv->adapter, (char *)pssid_tlv->ssid, psk->ssid.ssid, + MIN(MLAN_MAX_SSID_LENGTH, psk->ssid.ssid_len)); + ptlv_buffer += + (pssid_tlv->header.len + sizeof(MrvlIEtypesHeader_t)); + cmd->size += + (pssid_tlv->header.len + sizeof(MrvlIEtypesHeader_t)); + pssid_tlv->header.len = wlan_cpu_to_le16(pssid_tlv->header.len); + } + if (memcmp + (pmpriv->adapter, (t_u8 *)&psk->bssid, zero_mac, + sizeof(zero_mac))) { + pbssid_tlv = (MrvlIEtypes_Bssid_t *)ptlv_buffer; + pbssid_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_BSSID); + pbssid_tlv->header.len = MLAN_MAC_ADDR_LENGTH; + memcpy(pmpriv->adapter, pbssid_tlv->bssid, (t_u8 *)&psk->bssid, + MLAN_MAC_ADDR_LENGTH); + ptlv_buffer += + (pbssid_tlv->header.len + sizeof(MrvlIEtypesHeader_t)); + cmd->size += + (pbssid_tlv->header.len + sizeof(MrvlIEtypesHeader_t)); + pbssid_tlv->header.len = + wlan_cpu_to_le16(pbssid_tlv->header.len); + } + if (psk->psk_type == MLAN_PSK_PASSPHRASE) { + ppassphrase_tlv = (MrvlIEtypes_Passphrase_t *)ptlv_buffer; + ppassphrase_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_PASSPHRASE); + ppassphrase_tlv->header.len = + (t_u16)MIN(MLAN_MAX_PASSPHRASE_LENGTH, + psk->psk.passphrase.passphrase_len); + memcpy(pmpriv->adapter, ppassphrase_tlv->passphrase, + psk->psk.passphrase.passphrase, + MIN(MLAN_MAX_PASSPHRASE_LENGTH, + psk->psk.passphrase.passphrase_len)); + ptlv_buffer += + (ppassphrase_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + cmd->size += + (ppassphrase_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + ppassphrase_tlv->header.len = + wlan_cpu_to_le16(ppassphrase_tlv->header.len); + } + if (psk->psk_type == MLAN_PSK_PMK) { + ppmk_tlv = (MrvlIEtypes_PMK_t *)ptlv_buffer; + ppmk_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_PMK); + ppmk_tlv->header.len = MLAN_MAX_KEY_LENGTH; + memcpy(pmpriv->adapter, ppmk_tlv->pmk, psk->psk.pmk.pmk, + MLAN_MAX_KEY_LENGTH); + ptlv_buffer += + (ppmk_tlv->header.len + sizeof(MrvlIEtypesHeader_t)); + cmd->size += + (ppmk_tlv->header.len + sizeof(MrvlIEtypesHeader_t)); + ppmk_tlv->header.len = wlan_cpu_to_le16(ppmk_tlv->header.len); + } + if ((cmd_action == HostCmd_ACT_GEN_SET) && + ((pssid_tlv || pbssid_tlv) && (!ppmk_tlv && !ppassphrase_tlv))) { + PRINTM(MERROR, + "Invalid case,ssid/bssid present without pmk or passphrase\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_SUPPLICANT_PMK); + pesupplicant_psk->action = wlan_cpu_to_le16(cmd_action); + pesupplicant_psk->cache_result = 0; + cmd->size = wlan_cpu_to_le16(cmd->size); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Handle the supplicant profile command + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_802_11_supplicant_profile(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + HostCmd_DS_802_11_SUPPLICANT_PROFILE *sup_profile = + (HostCmd_DS_802_11_SUPPLICANT_PROFILE *)&(cmd->params. + esupplicant_profile); + MrvlIEtypes_EncrProto_t *encr_proto_tlv = MNULL; + MrvlIEtypes_Cipher_t *pcipher_tlv = MNULL; + t_u8 *ptlv_buffer = (t_u8 *)sup_profile->tlv_buf; + mlan_ds_esupp_mode *esupp = MNULL; + + ENTER(); + + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_802_11_SUPPLICANT_PROFILE) + + S_DS_GEN - 1); + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_SUPPLICANT_PROFILE); + sup_profile->action = wlan_cpu_to_le16(cmd_action); + if ((cmd_action == HostCmd_ACT_GEN_SET) && pdata_buf) { + esupp = (mlan_ds_esupp_mode *)pdata_buf; + if (esupp->rsn_mode) { + encr_proto_tlv = (MrvlIEtypes_EncrProto_t *)ptlv_buffer; + encr_proto_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_ENCRYPTION_PROTO); + encr_proto_tlv->header.len = + (t_u16)sizeof(encr_proto_tlv->rsn_mode); + encr_proto_tlv->rsn_mode = + wlan_cpu_to_le16(esupp->rsn_mode); + ptlv_buffer += + (encr_proto_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + cmd->size += + (encr_proto_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + encr_proto_tlv->header.len = + wlan_cpu_to_le16(encr_proto_tlv->header.len); + } + if (esupp->act_paircipher || esupp->act_groupcipher) { + pcipher_tlv = (MrvlIEtypes_Cipher_t *)ptlv_buffer; + pcipher_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_CIPHER); + pcipher_tlv->header.len = + (t_u16)(sizeof(pcipher_tlv->pair_cipher) + + sizeof(pcipher_tlv->group_cipher)); + if (esupp->act_paircipher) { + pcipher_tlv->pair_cipher = + wlan_cpu_to_le16(esupp->act_paircipher); + } + if (esupp->act_groupcipher) { + pcipher_tlv->group_cipher = + wlan_cpu_to_le16(esupp-> + act_groupcipher); + } + ptlv_buffer += + (pcipher_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + cmd->size += + (pcipher_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + pcipher_tlv->header.len = + wlan_cpu_to_le16(pcipher_tlv->header.len); + } + } + cmd->size = wlan_cpu_to_le16(cmd->size); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + /** * @brief This function prepares command of rf_channel. * @@ -913,8 +1165,8 @@ wlan_cmd_802_11_key_material(IN pmlan_private pmpriv, */ static mlan_status wlan_cmd_802_11_rf_channel(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { HostCmd_DS_802_11_RF_CHANNEL *prf_chan = &cmd->params.rf_channel; @@ -925,11 +1177,15 @@ wlan_cmd_802_11_rf_channel(IN pmlan_private pmpriv, + S_DS_GEN); if (cmd_action == HostCmd_ACT_GEN_SET) { + if ((pmpriv->adapter->adhoc_start_band & BAND_A) + || (pmpriv->adapter->adhoc_start_band & BAND_AN) + ) + prf_chan->rf_type = HostCmd_SCAN_RADIO_TYPE_A; SET_SECONDARYCHAN(prf_chan->rf_type, pmpriv->adapter->chan_bandwidth); prf_chan->rf_type = wlan_cpu_to_le16(prf_chan->rf_type); prf_chan->current_channel = - wlan_cpu_to_le16(*((t_u16 *) pdata_buf)); + wlan_cpu_to_le16(*((t_u16 *)pdata_buf)); } prf_chan->action = wlan_cpu_to_le16(cmd_action); LEAVE(); @@ -948,8 +1204,8 @@ wlan_cmd_802_11_rf_channel(IN pmlan_private pmpriv, */ static mlan_status wlan_cmd_ibss_coalescing_status(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { HostCmd_DS_802_11_IBSS_STATUS *pibss_coal = &(cmd->params.ibss_coalescing); @@ -968,7 +1224,7 @@ wlan_cmd_ibss_coalescing_status(IN pmlan_private pmpriv, switch (cmd_action) { case HostCmd_ACT_GEN_SET: if (pdata_buf != MNULL) - enable = *(t_u16 *) pdata_buf; + enable = *(t_u16 *)pdata_buf; pibss_coal->enable = wlan_cpu_to_le16(enable); break; @@ -994,8 +1250,8 @@ wlan_cmd_ibss_coalescing_status(IN pmlan_private pmpriv, */ static mlan_status wlan_cmd_mgmt_ie_list(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { t_u16 req_len = 0, travel_len = 0; custom_ie *cptr = MNULL; @@ -1010,7 +1266,7 @@ wlan_cmd_mgmt_ie_list(IN pmlan_private pmpriv, cmd->result = 0; pmgmt_ie_list->action = wlan_cpu_to_le16(cmd_action); - cust_ie = (mlan_ds_misc_custom_ie *) pdata_buf; + cust_ie = (mlan_ds_misc_custom_ie *)pdata_buf; pmgmt_ie_list->ds_mgmt_ie.type = wlan_cpu_to_le16(cust_ie->type); pmgmt_ie_list->ds_mgmt_ie.len = wlan_cpu_to_le16(cust_ie->len); @@ -1024,8 +1280,8 @@ wlan_cmd_mgmt_ie_list(IN pmlan_private pmpriv, ie_index); while (req_len > sizeof(t_u16)) { - cptr = (custom_ie *) (((t_u8 *) cust_ie->ie_data_list) + - travel_len); + cptr = (custom_ie *)(((t_u8 *)cust_ie->ie_data_list) + + travel_len); travel_len += cptr->ie_length + sizeof(custom_ie) - MAX_IE_SIZE; @@ -1065,8 +1321,8 @@ wlan_cmd_mgmt_ie_list(IN pmlan_private pmpriv, */ static mlan_status wlan_cmd_tdls_config(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { t_u16 travel_len = 0; mlan_ds_misc_tdls_config *tdls_config = MNULL; @@ -1081,11 +1337,11 @@ wlan_cmd_tdls_config(IN pmlan_private pmpriv, cmd->size = sizeof(HostCmd_DS_TDLS_CONFIG) + S_DS_GEN; cmd->result = 0; - tdls_config = (mlan_ds_misc_tdls_config *) pdata_buf; + tdls_config = (mlan_ds_misc_tdls_config *)pdata_buf; ptdls_config_data->tdls_info.tdls_action = wlan_cpu_to_le16(tdls_config->tdls_action); - tdls_all_cfg = (tdls_all_config *) tdls_config->tdls_data; + tdls_all_cfg = (tdls_all_config *)tdls_config->tdls_data; switch (tdls_config->tdls_action) { case WLAN_TDLS_CONFIG: @@ -1104,10 +1360,10 @@ wlan_cmd_tdls_config(IN pmlan_private pmpriv, return MLAN_STATUS_FAILURE; } memcpy(pmpriv->adapter, ptdls_config_data->tdls_info.tdls_data, - (t_u8 *) & tdls_all_cfg->u.tdls_set.cap_info, + (t_u8 *)&tdls_all_cfg->u.tdls_set.cap_info, sizeof(t_u16)); memcpy(pmpriv->adapter, - (t_u8 *) ptdls_config_data->tdls_info.tdls_data + + (t_u8 *)ptdls_config_data->tdls_info.tdls_data + sizeof(t_u16), &tdls_all_cfg->u.tdls_set.tlv_buffer, travel_len); travel_len += sizeof(t_u16); @@ -1234,8 +1490,8 @@ wlan_cmd_tdls_config(IN pmlan_private pmpriv, */ static mlan_status wlan_cmd_tdls_oper(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { t_u16 travel_len = 0; mlan_ds_misc_tdls_oper *tdls_oper = MNULL; @@ -1248,7 +1504,7 @@ wlan_cmd_tdls_oper(IN pmlan_private pmpriv, MrvlIETypes_2040BSSCo_t *BSSCo = MNULL; MrvlIETypes_ExtCap_t *ExCap = MNULL; MrvlIEtypes_RsnParamSet_t *Rsn_ie = MNULL; - MrvlIETypes_qosinfo_t *qos_info = MNULL; + MrvlIETypes_LinkIDElement_t *LinkID = MNULL; BSSDescriptor_t *pbss_desc = &pmpriv->curr_bss_params.bss_descriptor; MrvlIEtypes_TDLS_Idle_Timeout_t *TdlsIdleTimeout = MNULL; @@ -1258,12 +1514,12 @@ wlan_cmd_tdls_oper(IN pmlan_private pmpriv, cmd->size = sizeof(HostCmd_DS_TDLS_OPER) + S_DS_GEN; cmd->result = 0; - tdls_oper = (mlan_ds_misc_tdls_oper *) pdata_buf; + tdls_oper = (mlan_ds_misc_tdls_oper *)pdata_buf; ptdls_oper->reason = 0; memcpy(pmpriv->adapter, ptdls_oper->peer_mac, tdls_oper->peer_mac, MLAN_MAC_ADDR_LENGTH); sta_ptr = wlan_get_station_entry(pmpriv, tdls_oper->peer_mac); - pos = (t_u8 *) ptdls_oper + sizeof(HostCmd_DS_TDLS_OPER); + pos = (t_u8 *)ptdls_oper + sizeof(HostCmd_DS_TDLS_OPER); switch (tdls_oper->tdls_action) { case WLAN_TDLS_CREATE_LINK: if (sta_ptr) @@ -1275,27 +1531,17 @@ wlan_cmd_tdls_oper(IN pmlan_private pmpriv, ptdls_oper->tdls_action = wlan_cpu_to_le16(TDLS_CONFIG); /* capability */ if (tdls_oper->capability) - *(t_u16 *) pos = + *(t_u16 *)pos = wlan_cpu_to_le16(tdls_oper->capability); else - *(t_u16 *) pos = + *(t_u16 *)pos = wlan_cpu_to_le16(sta_ptr->capability); travel_len += sizeof(sta_ptr->capability); - /* qos_info */ - qos_info = (MrvlIETypes_qosinfo_t *) (pos + travel_len); - qos_info->header.type = wlan_cpu_to_le16(QOS_INFO); - qos_info->header.len = wlan_cpu_to_le16(sizeof(t_u8)); - if (tdls_oper->qos_info) - qos_info->qos_info = tdls_oper->qos_info; - else - qos_info->qos_info = sta_ptr->qos_info; - travel_len += sizeof(MrvlIETypes_qosinfo_t); - /* supported rate */ Rate_tlv = - (MrvlIEtypes_RatesParamSet_t *) (pos + - travel_len); + (MrvlIEtypes_RatesParamSet_t *)(pos + + travel_len); Rate_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_RATES); if (tdls_oper->supported_rates && @@ -1326,8 +1572,8 @@ wlan_cmd_tdls_oper(IN pmlan_private pmpriv, /* Extended capability */ if (tdls_oper->ext_capab && tdls_oper->ext_capab_len) { - ExCap = (MrvlIETypes_ExtCap_t *) (pos + - travel_len); + ExCap = (MrvlIETypes_ExtCap_t *)(pos + + travel_len); ExCap->header.type = wlan_cpu_to_le16(TLV_TYPE_EXTCAP); ExCap->header.len = @@ -1343,8 +1589,8 @@ wlan_cmd_tdls_oper(IN pmlan_private pmpriv, tdls_oper->ext_capab_len; } else if (sta_ptr->ExtCap.ieee_hdr.element_id == EXT_CAPABILITY) { - ExCap = (MrvlIETypes_ExtCap_t *) (pos + - travel_len); + ExCap = (MrvlIETypes_ExtCap_t *)(pos + + travel_len); ExCap->header.type = wlan_cpu_to_le16(TLV_TYPE_EXTCAP); ExCap->header.len = @@ -1356,12 +1602,13 @@ wlan_cmd_tdls_oper(IN pmlan_private pmpriv, travel_len += sta_ptr->ExtCap.ieee_hdr.len + sizeof(MrvlIEtypesHeader_t); + } /* RSN ie */ if (sta_ptr->rsn_ie.ieee_hdr.element_id == RSN_IE) { - Rsn_ie = (MrvlIEtypes_RsnParamSet_t *) (pos + - travel_len); + Rsn_ie = (MrvlIEtypes_RsnParamSet_t *)(pos + + travel_len); Rsn_ie->header.type = wlan_cpu_to_le16(sta_ptr->rsn_ie. ieee_hdr.element_id); @@ -1375,12 +1622,25 @@ wlan_cmd_tdls_oper(IN pmlan_private pmpriv, sta_ptr->rsn_ie.ieee_hdr.len + sizeof(MrvlIEtypesHeader_t); } - + /* Link ID */ + if (sta_ptr->link_ie.element_id == LINK_ID) { + LinkID = (MrvlIETypes_LinkIDElement_t *)(pos + + travel_len); + LinkID->header.type = wlan_cpu_to_le16(LINK_ID); + LinkID->header.len = + wlan_cpu_to_le16(sta_ptr->link_ie.len); + memcpy(pmpriv->adapter, &LinkID->bssid, + &sta_ptr->link_ie.bssid, + sta_ptr->link_ie.len); + travel_len += + sta_ptr->link_ie.len + + sizeof(MrvlIEtypesHeader_t); + } /* HT capability */ if (tdls_oper->ht_capa) { HTcap_tlv = - (MrvlIETypes_HTCap_t *) (pos + - travel_len); + (MrvlIETypes_HTCap_t *)(pos + + travel_len); HTcap_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_HT_CAP); HTcap_tlv->header.len = @@ -1393,8 +1653,8 @@ wlan_cmd_tdls_oper(IN pmlan_private pmpriv, } else if (sta_ptr->HTcap.ieee_hdr.element_id == HT_CAPABILITY) { HTcap_tlv = - (MrvlIETypes_HTCap_t *) (pos + - travel_len); + (MrvlIETypes_HTCap_t *)(pos + + travel_len); HTcap_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_HT_CAP); HTcap_tlv->header.len = @@ -1411,15 +1671,15 @@ wlan_cmd_tdls_oper(IN pmlan_private pmpriv, wlan_fill_ht_cap_tlv(pmpriv, HTcap_tlv, pbss_desc->bss_band); DBG_HEXDUMP(MCMD_D, "FW htcap", - (t_u8 *) HTcap_tlv, + (t_u8 *)HTcap_tlv, sizeof(MrvlIETypes_HTCap_t)); } /* HT info */ if (sta_ptr->HTInfo.ieee_hdr.element_id == HT_OPERATION) { HTInfo_tlv = - (MrvlIETypes_HTInfo_t *) (pos + - travel_len); + (MrvlIETypes_HTInfo_t *)(pos + + travel_len); HTInfo_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_HT_INFO); HTInfo_tlv->header.len = @@ -1432,14 +1692,14 @@ wlan_cmd_tdls_oper(IN pmlan_private pmpriv, sta_ptr->HTInfo.ieee_hdr.len + sizeof(MrvlIEtypesHeader_t); DBG_HEXDUMP(MCMD_D, "HT Info", - (t_u8 *) HTInfo_tlv, + (t_u8 *)HTInfo_tlv, sizeof(MrvlIETypes_HTInfo_t)); } /* 20/40 BSS co-exist */ if (sta_ptr->BSSCO_20_40.ieee_hdr.element_id == BSSCO_2040) { - BSSCo = (MrvlIETypes_2040BSSCo_t *) (pos + - travel_len); + BSSCo = (MrvlIETypes_2040BSSCo_t *)(pos + + travel_len); BSSCo->header.type = wlan_cpu_to_le16 (TLV_TYPE_2040BSS_COEXISTENCE); @@ -1454,8 +1714,8 @@ wlan_cmd_tdls_oper(IN pmlan_private pmpriv, sizeof(MrvlIEtypesHeader_t); } TdlsIdleTimeout = - (MrvlIEtypes_TDLS_Idle_Timeout_t *) (pos + - travel_len); + (MrvlIEtypes_TDLS_Idle_Timeout_t *)(pos + + travel_len); TdlsIdleTimeout->header.type = wlan_cpu_to_le16(TLV_TYPE_TDLS_IDLE_TIMEOUT); TdlsIdleTimeout->header.len = @@ -1493,11 +1753,11 @@ wlan_cmd_tdls_oper(IN pmlan_private pmpriv, */ static mlan_status wlan_cmd_sysclock_cfg(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG *cfg = &cmd->params.sys_clock_cfg; - mlan_ds_misc_sys_clock *clk_cfg = (mlan_ds_misc_sys_clock *) pdata_buf; + mlan_ds_misc_sys_clock *clk_cfg = (mlan_ds_misc_sys_clock *)pdata_buf; int i = 0; ENTER(); @@ -1530,12 +1790,12 @@ wlan_cmd_sysclock_cfg(IN pmlan_private pmpriv, */ static mlan_status wlan_cmd_subscribe_event(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { - mlan_ds_subscribe_evt *sub_evt = (mlan_ds_subscribe_evt *) pdata_buf; + mlan_ds_subscribe_evt *sub_evt = (mlan_ds_subscribe_evt *)pdata_buf; HostCmd_DS_SUBSCRIBE_EVENT *evt = - (HostCmd_DS_SUBSCRIBE_EVENT *) & cmd->params.subscribe_event; + (HostCmd_DS_SUBSCRIBE_EVENT *)&cmd->params.subscribe_event; t_u16 cmd_size = 0; t_u8 *tlv = MNULL; MrvlIEtypes_BeaconLowRssiThreshold_t *rssi_low = MNULL; @@ -1560,9 +1820,9 @@ wlan_cmd_subscribe_event(IN pmlan_private pmpriv, goto done; evt->action = wlan_cpu_to_le16(sub_evt->evt_action); evt->event_bitmap = wlan_cpu_to_le16(sub_evt->evt_bitmap); - tlv = (t_u8 *) cmd + cmd_size; + tlv = (t_u8 *)cmd + cmd_size; if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_RSSI_LOW) { - rssi_low = (MrvlIEtypes_BeaconLowRssiThreshold_t *) tlv; + rssi_low = (MrvlIEtypes_BeaconLowRssiThreshold_t *)tlv; rssi_low->header.type = wlan_cpu_to_le16(TLV_TYPE_RSSI_LOW); rssi_low->header.len = wlan_cpu_to_le16(sizeof @@ -1574,7 +1834,7 @@ wlan_cmd_subscribe_event(IN pmlan_private pmpriv, cmd_size += sizeof(MrvlIEtypes_BeaconLowRssiThreshold_t); } if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_SNR_LOW) { - snr_low = (MrvlIEtypes_BeaconLowSnrThreshold_t *) tlv; + snr_low = (MrvlIEtypes_BeaconLowSnrThreshold_t *)tlv; snr_low->header.type = wlan_cpu_to_le16(TLV_TYPE_SNR_LOW); snr_low->header.len = wlan_cpu_to_le16(sizeof @@ -1586,7 +1846,7 @@ wlan_cmd_subscribe_event(IN pmlan_private pmpriv, cmd_size += sizeof(MrvlIEtypes_BeaconLowSnrThreshold_t); } if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_MAX_FAIL) { - fail_count = (MrvlIEtypes_FailureCount_t *) tlv; + fail_count = (MrvlIEtypes_FailureCount_t *)tlv; fail_count->header.type = wlan_cpu_to_le16(TLV_TYPE_FAILCOUNT); fail_count->header.len = wlan_cpu_to_le16(sizeof(MrvlIEtypes_FailureCount_t) - @@ -1597,7 +1857,7 @@ wlan_cmd_subscribe_event(IN pmlan_private pmpriv, cmd_size += sizeof(MrvlIEtypes_FailureCount_t); } if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_BEACON_MISSED) { - beacon_missed = (MrvlIEtypes_BeaconsMissed_t *) tlv; + beacon_missed = (MrvlIEtypes_BeaconsMissed_t *)tlv; beacon_missed->header.type = wlan_cpu_to_le16(TLV_TYPE_BCNMISS); beacon_missed->header.len = wlan_cpu_to_le16(sizeof(MrvlIEtypes_BeaconsMissed_t) - @@ -1608,7 +1868,7 @@ wlan_cmd_subscribe_event(IN pmlan_private pmpriv, cmd_size += sizeof(MrvlIEtypes_BeaconsMissed_t); } if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_RSSI_HIGH) { - rssi_high = (MrvlIEtypes_BeaconHighRssiThreshold_t *) tlv; + rssi_high = (MrvlIEtypes_BeaconHighRssiThreshold_t *)tlv; rssi_high->header.type = wlan_cpu_to_le16(TLV_TYPE_RSSI_HIGH); rssi_high->header.len = wlan_cpu_to_le16(sizeof @@ -1620,7 +1880,7 @@ wlan_cmd_subscribe_event(IN pmlan_private pmpriv, cmd_size += sizeof(MrvlIEtypes_BeaconHighRssiThreshold_t); } if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_SNR_HIGH) { - snr_high = (MrvlIEtypes_BeaconHighSnrThreshold_t *) tlv; + snr_high = (MrvlIEtypes_BeaconHighSnrThreshold_t *)tlv; snr_high->header.type = wlan_cpu_to_le16(TLV_TYPE_SNR_HIGH); snr_high->header.len = wlan_cpu_to_le16(sizeof @@ -1632,7 +1892,7 @@ wlan_cmd_subscribe_event(IN pmlan_private pmpriv, cmd_size += sizeof(MrvlIEtypes_BeaconHighSnrThreshold_t); } if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_DATA_RSSI_LOW) { - data_rssi_low = (MrvlIEtypes_DataLowRssiThreshold_t *) tlv; + data_rssi_low = (MrvlIEtypes_DataLowRssiThreshold_t *)tlv; data_rssi_low->header.type = wlan_cpu_to_le16(TLV_TYPE_RSSI_LOW_DATA); data_rssi_low->header.len = @@ -1645,7 +1905,7 @@ wlan_cmd_subscribe_event(IN pmlan_private pmpriv, cmd_size += sizeof(MrvlIEtypes_DataLowRssiThreshold_t); } if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_DATA_SNR_LOW) { - data_snr_low = (MrvlIEtypes_DataLowSnrThreshold_t *) tlv; + data_snr_low = (MrvlIEtypes_DataLowSnrThreshold_t *)tlv; data_snr_low->header.type = wlan_cpu_to_le16(TLV_TYPE_SNR_LOW_DATA); data_snr_low->header.len = @@ -1658,7 +1918,7 @@ wlan_cmd_subscribe_event(IN pmlan_private pmpriv, cmd_size += sizeof(MrvlIEtypes_DataLowSnrThreshold_t); } if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_DATA_RSSI_HIGH) { - data_rssi_high = (MrvlIEtypes_DataHighRssiThreshold_t *) tlv; + data_rssi_high = (MrvlIEtypes_DataHighRssiThreshold_t *)tlv; data_rssi_high->header.type = wlan_cpu_to_le16(TLV_TYPE_RSSI_HIGH_DATA); data_rssi_high->header.len = @@ -1671,7 +1931,7 @@ wlan_cmd_subscribe_event(IN pmlan_private pmpriv, cmd_size += sizeof(MrvlIEtypes_DataHighRssiThreshold_t); } if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_DATA_SNR_HIGH) { - data_snr_high = (MrvlIEtypes_DataHighSnrThreshold_t *) tlv; + data_snr_high = (MrvlIEtypes_DataHighSnrThreshold_t *)tlv; data_snr_high->header.type = wlan_cpu_to_le16(TLV_TYPE_SNR_HIGH_DATA); data_snr_high->header.len = @@ -1684,7 +1944,7 @@ wlan_cmd_subscribe_event(IN pmlan_private pmpriv, cmd_size += sizeof(MrvlIEtypes_DataHighSnrThreshold_t); } if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_LINK_QUALITY) { - link_quality = (MrvlIEtypes_LinkQualityThreshold_t *) tlv; + link_quality = (MrvlIEtypes_LinkQualityThreshold_t *)tlv; link_quality->header.type = wlan_cpu_to_le16(TLV_TYPE_LINK_QUALITY); link_quality->header.len = @@ -1705,7 +1965,7 @@ wlan_cmd_subscribe_event(IN pmlan_private pmpriv, cmd_size += sizeof(MrvlIEtypes_LinkQualityThreshold_t); } if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_PRE_BEACON_LOST) { - pre_bcn_missed = (MrvlIETypes_PreBeaconMissed_t *) tlv; + pre_bcn_missed = (MrvlIETypes_PreBeaconMissed_t *)tlv; pre_bcn_missed->header.type = wlan_cpu_to_le16(TLV_TYPE_PRE_BCNMISS); pre_bcn_missed->header.len = @@ -1733,13 +1993,13 @@ wlan_cmd_subscribe_event(IN pmlan_private pmpriv, */ static mlan_status wlan_cmd_otp_user_data(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { mlan_ds_misc_otp_user_data *user_data = - (mlan_ds_misc_otp_user_data *) pdata_buf; + (mlan_ds_misc_otp_user_data *)pdata_buf; HostCmd_DS_OTP_USER_DATA *cmd_user_data = - (HostCmd_DS_OTP_USER_DATA *) & cmd->params.otp_user_data; + (HostCmd_DS_OTP_USER_DATA *)&cmd->params.otp_user_data; t_u16 cmd_size = 0; ENTER(); @@ -1767,8 +2027,8 @@ wlan_cmd_otp_user_data(IN pmlan_private pmpriv, * @return MLAN_STATUS_SUCCESS */ static mlan_status -wlan_cmd_inactivity_timeout(IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) +wlan_cmd_inactivity_timeout(IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { pmlan_ds_inactivity_to inac_to; HostCmd_DS_INACTIVITY_TIMEOUT_EXT *cmd_inac_to = @@ -1776,7 +2036,7 @@ wlan_cmd_inactivity_timeout(IN HostCmd_DS_COMMAND * cmd, ENTER(); - inac_to = (mlan_ds_inactivity_to *) pdata_buf; + inac_to = (mlan_ds_inactivity_to *)pdata_buf; cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_INACTIVITY_TIMEOUT_EXT) + @@ -1785,13 +2045,13 @@ wlan_cmd_inactivity_timeout(IN HostCmd_DS_COMMAND * cmd, cmd_inac_to->action = wlan_cpu_to_le16(cmd_action); if (cmd_action == HostCmd_ACT_GEN_SET) { cmd_inac_to->timeout_unit = - wlan_cpu_to_le16((t_u16) inac_to->timeout_unit); + wlan_cpu_to_le16((t_u16)inac_to->timeout_unit); cmd_inac_to->unicast_timeout = - wlan_cpu_to_le16((t_u16) inac_to->unicast_timeout); + wlan_cpu_to_le16((t_u16)inac_to->unicast_timeout); cmd_inac_to->mcast_timeout = - wlan_cpu_to_le16((t_u16) inac_to->mcast_timeout); + wlan_cpu_to_le16((t_u16)inac_to->mcast_timeout); cmd_inac_to->ps_entry_timeout = - wlan_cpu_to_le16((t_u16) inac_to->ps_entry_timeout); + wlan_cpu_to_le16((t_u16)inac_to->ps_entry_timeout); } LEAVE(); @@ -1810,7 +2070,7 @@ wlan_cmd_inactivity_timeout(IN HostCmd_DS_COMMAND * cmd, */ static mlan_status wlan_cmd_low_pwr_mode(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) { HostCmd_CONFIG_LOW_PWR_MODE *cmd_lpm_cfg = &cmd->params.low_pwr_mode_cfg; @@ -1820,7 +2080,7 @@ wlan_cmd_low_pwr_mode(IN pmlan_private pmpriv, cmd->size = S_DS_GEN + sizeof(HostCmd_CONFIG_LOW_PWR_MODE); - enable = (t_u8 *) pdata_buf; + enable = (t_u8 *)pdata_buf; cmd->size = wlan_cpu_to_le16(cmd->size); cmd->command = wlan_cpu_to_le16(cmd->command); cmd_lpm_cfg->enable = *enable; @@ -1847,15 +2107,15 @@ wlan_cmd_low_pwr_mode(IN pmlan_private pmpriv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_ops_sta_prepare_cmd(IN t_void * priv, +wlan_ops_sta_prepare_cmd(IN t_void *priv, IN t_u16 cmd_no, IN t_u16 cmd_action, IN t_u32 cmd_oid, - IN t_void * pioctl_buf, - IN t_void * pdata_buf, IN t_void * pcmd_buf) + IN t_void *pioctl_buf, + IN t_void *pdata_buf, IN t_void *pcmd_buf) { - HostCmd_DS_COMMAND *cmd_ptr = (HostCmd_DS_COMMAND *) pcmd_buf; - mlan_private *pmpriv = (mlan_private *) priv; + HostCmd_DS_COMMAND *cmd_ptr = (HostCmd_DS_COMMAND *)pcmd_buf; + mlan_private *pmpriv = (mlan_private *)priv; mlan_status ret = MLAN_STATUS_SUCCESS; ENTER(); @@ -1897,21 +2157,21 @@ wlan_ops_sta_prepare_cmd(IN t_void * priv, break; case HostCmd_CMD_802_11_PS_MODE_ENH: ret = wlan_cmd_enh_power_mode(pmpriv, cmd_ptr, cmd_action, - (t_u16) cmd_oid, pdata_buf); + (t_u16)cmd_oid, pdata_buf); break; case HostCmd_CMD_802_11_HS_CFG_ENH: ret = wlan_cmd_802_11_hs_cfg(pmpriv, cmd_ptr, cmd_action, - (hs_config_param *) pdata_buf); + (hs_config_param *)pdata_buf); break; case HostCmd_CMD_802_11_SLEEP_PERIOD: ret = wlan_cmd_802_11_sleep_period(pmpriv, cmd_ptr, cmd_action, - (t_u16 *) pdata_buf); + (t_u16 *)pdata_buf); break; case HostCmd_CMD_802_11_SLEEP_PARAMS: ret = wlan_cmd_802_11_sleep_params(pmpriv, cmd_ptr, cmd_action, - (t_u16 *) pdata_buf); + (t_u16 *)pdata_buf); break; case HostCmd_CMD_802_11_SCAN: ret = wlan_cmd_802_11_scan(pmpriv, cmd_ptr, pdata_buf); @@ -1965,7 +2225,7 @@ wlan_ops_sta_prepare_cmd(IN t_void * priv, case HostCmd_CMD_VERSION_EXT: cmd_ptr->command = wlan_cpu_to_le16(cmd_no); cmd_ptr->params.verext.version_str_sel = - (t_u8) (*((t_u32 *) pdata_buf)); + (t_u8)(*((t_u32 *)pdata_buf)); cmd_ptr->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_VERSION_EXT) + S_DS_GEN); @@ -1976,7 +2236,7 @@ wlan_ops_sta_prepare_cmd(IN t_void * priv, cmd_ptr->params.rx_mgmt_ind.action = wlan_cpu_to_le16(cmd_action); cmd_ptr->params.rx_mgmt_ind.mgmt_subtype_mask = - wlan_cpu_to_le32((t_u32) (*((t_u32 *) pdata_buf))); + wlan_cpu_to_le32((t_u32)(*((t_u32 *)pdata_buf))); cmd_ptr->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_RX_MGMT_IND) + S_DS_GEN); @@ -2015,9 +2275,24 @@ wlan_ops_sta_prepare_cmd(IN t_void * priv, cmd_oid, pdata_buf); break; + case HostCmd_CMD_SUPPLICANT_PMK: + ret = wlan_cmd_802_11_supplicant_pmk(pmpriv, cmd_ptr, + cmd_action, pdata_buf); + break; + case HostCmd_CMD_SUPPLICANT_PROFILE: + ret = wlan_cmd_802_11_supplicant_profile(pmpriv, cmd_ptr, + cmd_action, pdata_buf); + break; + case HostCmd_CMD_802_11D_DOMAIN_INFO: ret = wlan_cmd_802_11d_domain_info(pmpriv, cmd_ptr, cmd_action); break; + case HostCmd_CMD_802_11_TPC_ADAPT_REQ: + case HostCmd_CMD_802_11_TPC_INFO: + case HostCmd_CMD_802_11_CHAN_SW_ANN: + case HostCmd_CMD_CHAN_REPORT_REQUEST: + ret = wlan_11h_cmd_process(pmpriv, cmd_ptr, pdata_buf); + break; case HostCmd_CMD_RECONFIGURE_TX_BUFF: ret = wlan_cmd_recfg_tx_buf(pmpriv, cmd_ptr, cmd_action, pdata_buf); @@ -2079,6 +2354,7 @@ wlan_ops_sta_prepare_cmd(IN t_void * priv, case HostCmd_CMD_BBP_REG_ACCESS: case HostCmd_CMD_RF_REG_ACCESS: case HostCmd_CMD_CAU_REG_ACCESS: + case HostCmd_CMD_TARGET_ACCESS: case HostCmd_CMD_802_11_EEPROM_ACCESS: ret = wlan_cmd_reg_access(cmd_ptr, cmd_action, pdata_buf); break; @@ -2097,7 +2373,7 @@ wlan_ops_sta_prepare_cmd(IN t_void * priv, cmd_ptr->command = wlan_cpu_to_le16(cmd_no); #ifdef WIFI_DIRECT_SUPPORT if (pdata_buf) { - cmd_ptr->params.bss_mode.con_type = *(t_u8 *) pdata_buf; + cmd_ptr->params.bss_mode.con_type = *(t_u8 *)pdata_buf; } else #endif if (pmpriv->bss_mode == MLAN_BSS_MODE_IBSS) @@ -2111,6 +2387,10 @@ wlan_ops_sta_prepare_cmd(IN t_void * priv, S_DS_GEN); ret = MLAN_STATUS_SUCCESS; break; + case HostCmd_CMD_MEASUREMENT_REQUEST: + case HostCmd_CMD_MEASUREMENT_REPORT: + ret = wlan_meas_cmd_process(pmpriv, cmd_ptr, pdata_buf); + break; #ifdef WIFI_DIRECT_SUPPORT case HostCmd_CMD_802_11_REMAIN_ON_CHANNEL: ret = wlan_cmd_remain_on_channel(pmpriv, cmd_ptr, cmd_action, @@ -2136,6 +2416,20 @@ wlan_ops_sta_prepare_cmd(IN t_void * priv, ret = wlan_cmd_reject_addba_req(pmpriv, cmd_ptr, cmd_action, pdata_buf); break; +#ifdef RX_PACKET_COALESCE + case HostCmd_CMD_RX_PKT_COALESCE_CFG: + ret = wlan_cmd_rx_pkt_coalesce_cfg(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; +#endif + case HostCmd_CMD_MULTI_CHAN_CONFIG: + ret = wlan_cmd_multi_chan_cfg(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_MULTI_CHAN_POLICY: + ret = wlan_cmd_multi_chan_policy(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; case HostCMD_CONFIG_LOW_POWER_MODE: ret = wlan_cmd_low_pwr_mode(pmpriv, cmd_ptr, pdata_buf); break; @@ -2152,16 +2446,17 @@ wlan_ops_sta_prepare_cmd(IN t_void * priv, /** * @brief This function issues commands to initialize firmware * - * @param priv A pointer to mlan_private structure - * @param first_bss flag for first BSS + * @param priv A pointer to mlan_private structure + * @param first_bss flag for first BSS * * @return MLAN_STATUS_PENDING or MLAN_STATUS_FAILURE */ mlan_status -wlan_ops_sta_init_cmd(IN t_void * priv, IN t_u8 first_bss) +wlan_ops_sta_init_cmd(IN t_void *priv, IN t_u8 first_bss) { - pmlan_private pmpriv = (pmlan_private) priv; + pmlan_private pmpriv = (pmlan_private)priv; mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 enable = MTRUE; mlan_ds_11n_amsdu_aggr_ctrl amsdu_aggr_ctrl; ENTER(); @@ -2191,12 +2486,21 @@ wlan_ops_sta_init_cmd(IN t_void * priv, IN t_u8 first_bss) goto done; } + /* set ibss coalescing_status */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_IBSS_COALESCING_STATUS, + HostCmd_ACT_GEN_SET, 0, MNULL, &enable); + if (ret) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + memset(pmpriv->adapter, &amsdu_aggr_ctrl, 0, sizeof(amsdu_aggr_ctrl)); amsdu_aggr_ctrl.enable = MLAN_ACT_ENABLE; /* Send request to firmware */ ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_AMSDU_AGGR_CTRL, HostCmd_ACT_GEN_SET, 0, MNULL, - (t_void *) & amsdu_aggr_ctrl); + (t_void *)&amsdu_aggr_ctrl); if (ret) { ret = MLAN_STATUS_FAILURE; goto done; diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_cmdresp.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_cmdresp.c old mode 100755 new mode 100644 index 8ea03834..8651718b --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_cmdresp.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_cmdresp.c @@ -31,7 +31,9 @@ Change log: #include "mlan_main.h" #include "mlan_wmm.h" #include "mlan_11n.h" +#include "mlan_11h.h" #include "mlan_sdio.h" +#include "mlan_meas.h" /******************************************************** Local Variables @@ -53,9 +55,10 @@ Change log: * @return N/A */ static void -wlan_process_cmdreps_error_tdls_operation(mlan_private * pmpriv, - HostCmd_DS_COMMAND * resp) +wlan_process_cmdreps_error_tdls_operation(mlan_private *pmpriv, + HostCmd_DS_COMMAND *resp) { + mlan_adapter *pmadapter = pmpriv->adapter; HostCmd_DS_TDLS_OPER *ptdls_oper_data = &(resp->params.tdls_oper_data); sta_node *sta_ptr = MNULL; t_u16 reason; @@ -84,6 +87,35 @@ wlan_process_cmdreps_error_tdls_operation(mlan_private * pmpriv, break; case TDLS_DELETE: /* TDLS delete command error */ + wlan_restore_tdls_packets(pmpriv, ptdls_oper_data->peer_mac, + TDLS_TEAR_DOWN); + if (sta_ptr) { + if (sta_ptr->is_11n_enabled) { + wlan_cleanup_reorder_tbl(pmpriv, + ptdls_oper_data-> + peer_mac); + pmadapter->callbacks.moal_spin_lock(pmadapter-> + pmoal_handle, + pmpriv->wmm. + ra_list_spinlock); + wlan_11n_cleanup_txbastream_tbl(pmpriv, + ptdls_oper_data-> + peer_mac); + pmadapter->callbacks. + moal_spin_unlock(pmadapter-> + pmoal_handle, + pmpriv->wmm. + ra_list_spinlock); + } + if (sta_ptr->status >= TDLS_SETUP_INPROGRESS) + wlan_delete_station_entry(pmpriv, + ptdls_oper_data-> + peer_mac); + } + if (MTRUE == wlan_is_station_list_empty(pmpriv)) + pmadapter->tdls_status = TDLS_NOT_SETUP; + else + pmadapter->tdls_status = TDLS_IN_BASE_CHANNEL; PRINTM(MERROR, "TDLS DELETE operation: command error, reason %d\n", reason); @@ -103,8 +135,8 @@ wlan_process_cmdreps_error_tdls_operation(mlan_private * pmpriv, * @return N/A */ static void -wlan_process_cmdresp_error(mlan_private * pmpriv, HostCmd_DS_COMMAND * resp, - mlan_ioctl_req * pioctl_buf) +wlan_process_cmdresp_error(mlan_private *pmpriv, HostCmd_DS_COMMAND *resp, + mlan_ioctl_req *pioctl_buf) { mlan_adapter *pmadapter = pmpriv->adapter; pmlan_ioctl_req pscan_ioctl_req = MNULL; @@ -143,7 +175,7 @@ wlan_process_cmdresp_error(mlan_private * pmpriv, HostCmd_DS_COMMAND * resp, /* Cancel all pending scan command */ wlan_flush_scan_queue(pmadapter); - pcb = (pmlan_callbacks) & pmadapter->callbacks; + pcb = (pmlan_callbacks)&pmadapter->callbacks; wlan_request_cmd_lock(pmadapter); pmadapter->scan_processing = MFALSE; @@ -173,16 +205,16 @@ wlan_process_cmdresp_error(mlan_private * pmpriv, HostCmd_DS_COMMAND * resp, case WLAN_TDLS_SETUP_REQ: /* TDLS link setup error ;display error in logs */ tdls_all_cfg = - (tdls_all_config *) ptdls_config_data-> - tdls_info.tdls_data; + (tdls_all_config *)ptdls_config_data->tdls_info. + tdls_data; PRINTM(MERROR, "TDLS Setup Failed, error %d\n", wlan_le16_to_cpu(tdls_all_cfg->u.tdls_cmd_resp. reason_code)); break; case WLAN_TDLS_INIT_CHAN_SWITCH: tdls_all_cfg = - (tdls_all_config *) ptdls_config_data-> - tdls_info.tdls_data; + (tdls_all_config *)ptdls_config_data->tdls_info. + tdls_data; PRINTM(MERROR, "TDLS init channel switch failed," MACSTR ": reason=%d\n", @@ -213,7 +245,7 @@ wlan_process_cmdresp_error(mlan_private * pmpriv, HostCmd_DS_COMMAND * resp, break; cust_ie = - (mlan_ds_misc_custom_ie *) & pmgmt_ie_list-> + (mlan_ds_misc_custom_ie *)&pmgmt_ie_list-> ds_mgmt_ie; if (cust_ie) { cust_ie->type = wlan_le16_to_cpu(cust_ie->type); @@ -229,9 +261,8 @@ wlan_process_cmdresp_error(mlan_private * pmpriv, HostCmd_DS_COMMAND * resp, while (resp_len > sizeof(t_u16)) { cptr = (custom_ie - *) (((t_u8 *) cust_ie-> - ie_data_list) + - travel_len); + *)(((t_u8 *)cust_ie-> + ie_data_list) + travel_len); index = cptr->ie_index = wlan_le16_to_cpu(cptr-> ie_index); @@ -294,8 +325,8 @@ wlan_process_cmdresp_error(mlan_private * pmpriv, HostCmd_DS_COMMAND * resp, */ static mlan_status wlan_ret_802_11_rssi_info(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_802_11_RSSI_INFO_RSP *prssi_info_rsp = &resp->params.rssi_info_rsp; @@ -332,7 +363,7 @@ wlan_ret_802_11_rssi_info(IN pmlan_private pmpriv, /* Need to indicate IOCTL complete */ if (pioctl_buf != MNULL) { - pget_info = (mlan_ds_get_info *) pioctl_buf->pbuf; + pget_info = (mlan_ds_get_info *)pioctl_buf->pbuf; memset(pmpriv->adapter, &pget_info->param.signal, 0, sizeof(mlan_ds_get_signal)); @@ -379,8 +410,8 @@ wlan_ret_802_11_rssi_info(IN pmlan_private pmpriv, */ static mlan_status wlan_ret_802_11_snmp_mib(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_802_11_SNMP_MIB *psmib = &resp->params.smib; t_u16 oid = wlan_le16_to_cpu(psmib->oid); @@ -391,7 +422,7 @@ wlan_ret_802_11_snmp_mib(IN pmlan_private pmpriv, ENTER(); if (pioctl_buf) - mib = (mlan_ds_snmp_mib *) pioctl_buf->pbuf; + mib = (mlan_ds_snmp_mib *)pioctl_buf->pbuf; PRINTM(MINFO, "SNMP_RESP: value of the oid = 0x%x, query_type=0x%x\n", oid, query_type); @@ -406,53 +437,72 @@ wlan_ret_802_11_snmp_mib(IN pmlan_private pmpriv, mib->param.dtim_period = ul_temp; break; case FragThresh_i: - ul_temp = wlan_le16_to_cpu(*((t_u16 *) (psmib->value))); + ul_temp = wlan_le16_to_cpu(*((t_u16 *)(psmib->value))); PRINTM(MINFO, "SNMP_RESP: FragThsd =%u\n", ul_temp); if (mib) mib->param.frag_threshold = ul_temp; break; case RtsThresh_i: - ul_temp = wlan_le16_to_cpu(*((t_u16 *) (psmib->value))); + ul_temp = wlan_le16_to_cpu(*((t_u16 *)(psmib->value))); PRINTM(MINFO, "SNMP_RESP: RTSThsd =%u\n", ul_temp); if (mib) mib->param.rts_threshold = ul_temp; break; case ShortRetryLim_i: - ul_temp = wlan_le16_to_cpu(*((t_u16 *) (psmib->value))); + ul_temp = wlan_le16_to_cpu(*((t_u16 *)(psmib->value))); PRINTM(MINFO, "SNMP_RESP: TxRetryCount=%u\n", ul_temp); if (mib) mib->param.retry_count = ul_temp; break; case WwsMode_i: - ul_temp = wlan_le16_to_cpu(*((t_u16 *) (psmib->value))); + ul_temp = wlan_le16_to_cpu(*((t_u16 *)(psmib->value))); PRINTM(MINFO, "SNMP_RESP: WWSCfg =%u\n", ul_temp); if (pioctl_buf) - ((mlan_ds_misc_cfg *) pioctl_buf->pbuf)->param. + ((mlan_ds_misc_cfg *)pioctl_buf->pbuf)->param. wws_cfg = ul_temp; break; case Thermal_i: - ul_temp = wlan_le32_to_cpu(*((t_u32 *) (psmib->value))); + ul_temp = wlan_le32_to_cpu(*((t_u32 *)(psmib->value))); PRINTM(MINFO, "SNMP_RESP: Thermal =%u\n", ul_temp); if (pioctl_buf) - ((mlan_ds_misc_cfg *) pioctl_buf->pbuf)->param. + ((mlan_ds_misc_cfg *)pioctl_buf->pbuf)->param. thermal = ul_temp; break; - + case NullPktPeriod_i: + ul_temp = psmib->value[0]; + PRINTM(MINFO, "SNMP_RESP: Auto NULL Pkt Period =%u\n", + ul_temp); + break; default: break; } } else { /* (query_type == HostCmd_ACT_GEN_SET) */ /* Update state for 11d */ if (oid == Dot11D_i) { - ul_temp = wlan_le16_to_cpu(*((t_u16 *) (psmib->value))); + ul_temp = wlan_le16_to_cpu(*((t_u16 *)(psmib->value))); /* Set 11d state to private */ pmpriv->state_11d.enable_11d = ul_temp; /* Set user enable flag if called from ioctl */ if (pioctl_buf) pmpriv->state_11d.user_enable_11d = ul_temp; } + /* Update state for 11h */ + if (oid == Dot11H_i) { + ul_temp = wlan_le16_to_cpu(*((t_u16 *)(psmib->value))); + /* Set 11h state to priv */ + pmpriv->intf_state_11h.is_11h_active = + (ul_temp & ENABLE_11H_MASK); + /* Set radar_det state to adapter */ + pmpriv->adapter->state_11h.is_master_radar_det_active + = + (ul_temp & MASTER_RADAR_DET_MASK) ? MTRUE : + MFALSE; + pmpriv->adapter->state_11h.is_slave_radar_det_active = + (ul_temp & SLAVE_RADAR_DET_MASK) ? MTRUE : + MFALSE; + } } if (pioctl_buf) { @@ -475,16 +525,16 @@ wlan_ret_802_11_snmp_mib(IN pmlan_private pmpriv, */ static mlan_status wlan_ret_get_log(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_802_11_GET_LOG *pget_log = - (HostCmd_DS_802_11_GET_LOG *) & resp->params.get_log; + (HostCmd_DS_802_11_GET_LOG *)&resp->params.get_log; mlan_ds_get_info *pget_info = MNULL; ENTER(); if (pioctl_buf) { - pget_info = (mlan_ds_get_info *) pioctl_buf->pbuf; + pget_info = (mlan_ds_get_info *)pioctl_buf->pbuf; pget_info->param.stats.mcast_tx_frame = wlan_le32_to_cpu(pget_log->mcast_tx_frame); pget_info->param.stats.failed = @@ -548,11 +598,11 @@ wlan_get_power_level(pmlan_private pmpriv, void *pdata_buf) if (pdata_buf) { ppg_tlv = - (MrvlTypes_Power_Group_t *) ((t_u8 *) pdata_buf + - sizeof - (HostCmd_DS_TXPWR_CFG)); - pg = (Power_Group_t *) ((t_u8 *) ppg_tlv + - sizeof(MrvlTypes_Power_Group_t)); + (MrvlTypes_Power_Group_t *)((t_u8 *)pdata_buf + + sizeof + (HostCmd_DS_TXPWR_CFG)); + pg = (Power_Group_t *)((t_u8 *)ppg_tlv + + sizeof(MrvlTypes_Power_Group_t)); length = ppg_tlv->length; if (length > 0) { max_power = pg->power_max; @@ -591,8 +641,8 @@ wlan_get_power_level(pmlan_private pmpriv, void *pdata_buf) */ static mlan_status wlan_ret_tx_power_cfg(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_TXPWR_CFG *ptxp_cfg = &resp->params.txp_cfg; MrvlTypes_Power_Group_t *ppg_tlv = MNULL; @@ -603,10 +653,10 @@ wlan_ret_tx_power_cfg(IN pmlan_private pmpriv, ENTER(); - ppg_tlv = (MrvlTypes_Power_Group_t *) ((t_u8 *) ptxp_cfg - + sizeof(HostCmd_DS_TXPWR_CFG)); - pg = (Power_Group_t *) ((t_u8 *) ppg_tlv + - sizeof(MrvlTypes_Power_Group_t)); + ppg_tlv = (MrvlTypes_Power_Group_t *)((t_u8 *)ptxp_cfg + + sizeof(HostCmd_DS_TXPWR_CFG)); + pg = (Power_Group_t *)((t_u8 *)ppg_tlv + + sizeof(MrvlTypes_Power_Group_t)); switch (action) { case HostCmd_ACT_GEN_GET: @@ -614,13 +664,13 @@ wlan_ret_tx_power_cfg(IN pmlan_private pmpriv, if (pmpriv->adapter->hw_status == WlanHardwareStatusInitializing) wlan_get_power_level(pmpriv, ptxp_cfg); - pmpriv->tx_power_level = (t_s16) pg->power_min; + pmpriv->tx_power_level = (t_s16)pg->power_min; break; case HostCmd_ACT_GEN_SET: if (wlan_le32_to_cpu(ptxp_cfg->mode)) { if (pg->power_max == pg->power_min) - pmpriv->tx_power_level = (t_s16) pg->power_min; + pmpriv->tx_power_level = (t_s16)pg->power_min; } break; @@ -635,7 +685,7 @@ wlan_ret_tx_power_cfg(IN pmlan_private pmpriv, pmpriv->max_tx_power_level, pmpriv->min_tx_power_level); if (pioctl_buf) { - power = (mlan_ds_power_cfg *) pioctl_buf->pbuf; + power = (mlan_ds_power_cfg *)pioctl_buf->pbuf; if (action == HostCmd_ACT_GEN_GET) { if (power->sub_command == MLAN_OID_POWER_CFG) { pioctl_buf->data_read_written @@ -677,13 +727,11 @@ wlan_ret_tx_power_cfg(IN pmlan_private pmpriv, data[3] = pg->power_max; data[4] = pg->power_step; memcpy(pmpriv->adapter, - (t_u8 *) (&power->param. - power_ext. - power_data[power-> - param. - power_ext. - len]), - (t_u8 *) data, sizeof(data)); + (t_u8 *)(&power->param.power_ext. + power_data[power->param. + power_ext. + len]), + (t_u8 *)data, sizeof(data)); power->param.power_ext.len += 5; pg++; ppg_tlv->length -= @@ -711,8 +759,8 @@ wlan_ret_tx_power_cfg(IN pmlan_private pmpriv, */ static mlan_status wlan_ret_802_11_rf_tx_power(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_802_11_RF_TX_POWER *rtp = &resp->params.txp; t_u16 action = wlan_le16_to_cpu(rtp->action); @@ -726,7 +774,7 @@ wlan_ret_802_11_rf_tx_power(IN pmlan_private pmpriv, pmpriv->max_tx_power_level = rtp->max_power; pmpriv->min_tx_power_level = rtp->min_power; if (pioctl_buf) { - power = (mlan_ds_power_cfg *) pioctl_buf->pbuf; + power = (mlan_ds_power_cfg *)pioctl_buf->pbuf; if (power->sub_command == MLAN_OID_POWER_CFG) { pioctl_buf->data_read_written = @@ -756,8 +804,8 @@ wlan_ret_802_11_rf_tx_power(IN pmlan_private pmpriv, */ static mlan_status wlan_ret_802_11_sleep_period(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_802_11_SLEEP_PERIOD *pcmd_sleep_pd = &resp->params.sleep_pd; mlan_ds_pm_cfg *pm_cfg = MNULL; @@ -767,8 +815,8 @@ wlan_ret_802_11_sleep_period(IN pmlan_private pmpriv, sleep_pd = wlan_le16_to_cpu(pcmd_sleep_pd->sleep_pd); if (pioctl_buf) { - pm_cfg = (mlan_ds_pm_cfg *) pioctl_buf->pbuf; - pm_cfg->param.sleep_period = (t_u32) sleep_pd; + pm_cfg = (mlan_ds_pm_cfg *)pioctl_buf->pbuf; + pm_cfg->param.sleep_period = (t_u32)sleep_pd; pioctl_buf->data_read_written = sizeof(pm_cfg->param.sleep_period) + MLAN_SUB_COMMAND_SIZE; @@ -800,8 +848,8 @@ wlan_ret_802_11_sleep_period(IN pmlan_private pmpriv, */ static mlan_status wlan_ret_802_11_sleep_params(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_802_11_SLEEP_PARAMS *presp_sp = &resp->params.sleep_param; mlan_ds_pm_cfg *pm_cfg = MNULL; @@ -818,15 +866,15 @@ wlan_ret_802_11_sleep_params(IN pmlan_private pmpriv, psleep_params->sp_ext_sleep_clk = presp_sp->external_sleep_clk; if (pioctl_buf) { - pm_cfg = (mlan_ds_pm_cfg *) pioctl_buf->pbuf; - psp = (mlan_ds_sleep_params *) & pm_cfg->param.sleep_params; + pm_cfg = (mlan_ds_pm_cfg *)pioctl_buf->pbuf; + psp = (mlan_ds_sleep_params *)&pm_cfg->param.sleep_params; - psp->error = (t_u32) psleep_params->sp_error; - psp->offset = (t_u32) psleep_params->sp_offset; - psp->stable_time = (t_u32) psleep_params->sp_stable_time; - psp->cal_control = (t_u32) psleep_params->sp_cal_control; - psp->ext_sleep_clk = (t_u32) psleep_params->sp_ext_sleep_clk; - psp->reserved = (t_u32) psleep_params->sp_reserved; + psp->error = (t_u32)psleep_params->sp_error; + psp->offset = (t_u32)psleep_params->sp_offset; + psp->stable_time = (t_u32)psleep_params->sp_stable_time; + psp->cal_control = (t_u32)psleep_params->sp_cal_control; + psp->ext_sleep_clk = (t_u32)psleep_params->sp_ext_sleep_clk; + psp->reserved = (t_u32)psleep_params->sp_reserved; pioctl_buf->data_read_written = sizeof(pm_cfg->param.sleep_params) @@ -848,8 +896,8 @@ wlan_ret_802_11_sleep_params(IN pmlan_private pmpriv, */ static mlan_status wlan_ret_802_11_mac_address(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_802_11_MAC_ADDRESS *pmac_addr = &resp->params.mac_addr; mlan_ds_bss *bss = MNULL; @@ -861,7 +909,7 @@ wlan_ret_802_11_mac_address(IN pmlan_private pmpriv, PRINTM(MINFO, "MAC address: " MACSTR "\n", MAC2STR(pmpriv->curr_addr)); if (pioctl_buf) { - bss = (mlan_ds_bss *) pioctl_buf->pbuf; + bss = (mlan_ds_bss *)pioctl_buf->pbuf; memcpy(pmpriv->adapter, &bss->param.mac_addr, pmpriv->curr_addr, MLAN_MAC_ADDR_LENGTH); pioctl_buf->data_read_written = @@ -882,8 +930,8 @@ wlan_ret_802_11_mac_address(IN pmlan_private pmpriv, */ static mlan_status wlan_ret_mac_multicast_adr(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { ENTER(); if (pioctl_buf) { @@ -905,8 +953,8 @@ wlan_ret_mac_multicast_adr(IN pmlan_private pmpriv, */ static mlan_status wlan_ret_802_11_deauthenticate(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { mlan_adapter *pmadapter = pmpriv->adapter; ENTER(); @@ -919,6 +967,8 @@ wlan_ret_802_11_deauthenticate(IN pmlan_private pmpriv, wlan_reset_connect_state(pmpriv, MTRUE); } + if (pmpriv->adapter->state_rdh.stage == RDH_STOP_INTFS) + wlan_11h_radar_detected_callback((t_void *)pmpriv); LEAVE(); return MLAN_STATUS_SUCCESS; } @@ -934,12 +984,14 @@ wlan_ret_802_11_deauthenticate(IN pmlan_private pmpriv, */ static mlan_status wlan_ret_802_11_ad_hoc_stop(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { ENTER(); wlan_reset_connect_state(pmpriv, MTRUE); + if (pmpriv->adapter->state_rdh.stage == RDH_STOP_INTFS) + wlan_11h_radar_detected_callback((t_void *)pmpriv); LEAVE(); return MLAN_STATUS_SUCCESS; } @@ -955,8 +1007,8 @@ wlan_ret_802_11_ad_hoc_stop(IN pmlan_private pmpriv, */ static mlan_status wlan_ret_802_11_key_material(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_802_11_KEY_MATERIAL *pkey = &resp->params.key_material; mlan_ds_sec_cfg *sec = MNULL; @@ -980,7 +1032,7 @@ wlan_ret_802_11_key_material(IN pmlan_private pmpriv, if (pioctl_buf && (wlan_le16_to_cpu(pkey->key_param_set.type) == TLV_TYPE_KEY_PARAM_V2)) { - sec = (mlan_ds_sec_cfg *) pioctl_buf->pbuf; + sec = (mlan_ds_sec_cfg *)pioctl_buf->pbuf; memcpy(pmpriv->adapter, sec->param.encrypt_key.mac_addr, pkey->key_param_set.mac_addr, MLAN_MAC_ADDR_LENGTH); @@ -1067,6 +1119,218 @@ wlan_ret_802_11_key_material(IN pmlan_private pmpriv, return MLAN_STATUS_SUCCESS; } +/** + * @brief Handle the supplicant pmk response + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_ret_802_11_supplicant_pmk(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_802_11_SUPPLICANT_PMK *supplicant_pmk_resp = + &resp->params.esupplicant_psk; + mlan_ds_sec_cfg sec_buf; + mlan_ds_sec_cfg *sec = MNULL; + MrvlIEtypes_PMK_t *ppmk_tlv = MNULL; + MrvlIEtypes_Passphrase_t *passphrase_tlv = MNULL; + MrvlIEtypes_SsIdParamSet_t *pssid_tlv = MNULL; + MrvlIEtypes_Bssid_t *pbssid_tlv = MNULL; + t_u8 *tlv_buf = (t_u8 *)supplicant_pmk_resp->tlv_buffer; + t_u16 action = wlan_le16_to_cpu(supplicant_pmk_resp->action); + int tlv_buf_len = 0; + t_u16 tlv; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + tlv_buf_len = resp->size - (sizeof(HostCmd_DS_802_11_SUPPLICANT_PMK) + + S_DS_GEN - 1); + if (pioctl_buf) { + if (((mlan_ds_bss *)pioctl_buf->pbuf)->sub_command == + MLAN_OID_BSS_FIND_BSS) + sec = &sec_buf; + else + sec = (mlan_ds_sec_cfg *)pioctl_buf->pbuf; + if (action == HostCmd_ACT_GEN_GET) { + while (tlv_buf_len > 0) { + tlv = (*tlv_buf) | (*(tlv_buf + 1) << 8); + if ((tlv != TLV_TYPE_SSID) && + (tlv != TLV_TYPE_BSSID) && + (tlv != TLV_TYPE_PASSPHRASE) + && (tlv != TLV_TYPE_PMK)) + break; + switch (tlv) { + case TLV_TYPE_SSID: + pssid_tlv = + (MrvlIEtypes_SsIdParamSet_t *) + tlv_buf; + pssid_tlv->header.len = + wlan_le16_to_cpu(pssid_tlv-> + header.len); + memcpy(pmpriv->adapter, + sec->param.passphrase.ssid.ssid, + pssid_tlv->ssid, + MIN(MLAN_MAX_SSID_LENGTH, + pssid_tlv->header.len)); + sec->param.passphrase.ssid.ssid_len = + MIN(MLAN_MAX_SSID_LENGTH, + pssid_tlv->header.len); + tlv_buf += + pssid_tlv->header.len + + sizeof(MrvlIEtypesHeader_t); + tlv_buf_len -= + (pssid_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + break; + case TLV_TYPE_BSSID: + pbssid_tlv = + (MrvlIEtypes_Bssid_t *)tlv_buf; + pbssid_tlv->header.len = + wlan_le16_to_cpu(pbssid_tlv-> + header.len); + memcpy(pmpriv->adapter, + &sec->param.passphrase.bssid, + pbssid_tlv->bssid, + MLAN_MAC_ADDR_LENGTH); + tlv_buf += + pbssid_tlv->header.len + + sizeof(MrvlIEtypesHeader_t); + tlv_buf_len -= + (pbssid_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + break; + case TLV_TYPE_PASSPHRASE: + passphrase_tlv = + (MrvlIEtypes_Passphrase_t *) + tlv_buf; + passphrase_tlv->header.len = + wlan_le16_to_cpu + (passphrase_tlv->header.len); + sec->param.passphrase.psk_type = + MLAN_PSK_PASSPHRASE; + sec->param.passphrase.psk.passphrase. + passphrase_len = + passphrase_tlv->header.len; + memcpy(pmpriv->adapter, + sec->param.passphrase.psk. + passphrase.passphrase, + passphrase_tlv->passphrase, + MIN(MLAN_MAX_PASSPHRASE_LENGTH, + passphrase_tlv->header.len)); + tlv_buf += + passphrase_tlv->header.len + + sizeof(MrvlIEtypesHeader_t); + tlv_buf_len -= + (passphrase_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + break; + case TLV_TYPE_PMK: + ppmk_tlv = (MrvlIEtypes_PMK_t *)tlv_buf; + ppmk_tlv->header.len = + wlan_le16_to_cpu(ppmk_tlv-> + header.len); + sec->param.passphrase.psk_type = + MLAN_PSK_PMK; + memcpy(pmpriv->adapter, + sec->param.passphrase.psk.pmk. + pmk, ppmk_tlv->pmk, + MIN(MLAN_MAX_KEY_LENGTH, + ppmk_tlv->header.len)); + tlv_buf += + ppmk_tlv->header.len + + sizeof(MrvlIEtypesHeader_t); + tlv_buf_len -= + (ppmk_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + break; + + } + } + if (((mlan_ds_bss *)pioctl_buf->pbuf)->sub_command == + MLAN_OID_BSS_FIND_BSS) { + wlan_set_ewpa_mode(pmpriv, + &sec->param.passphrase); + ret = wlan_find_bss(pmpriv, pioctl_buf); + } + } else if (action == HostCmd_ACT_GEN_SET) { + PRINTM(MINFO, "Esupp PMK set: enable ewpa query\n"); + pmpriv->ewpa_query = MTRUE; + } + } + + LEAVE(); + return ret; +} + +/** + * @brief Handle the supplicant profile response + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_802_11_supplicant_profile(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_802_11_SUPPLICANT_PROFILE *psup_profile = + &resp->params.esupplicant_profile; + MrvlIEtypesHeader_t *head; + MrvlIEtypes_EncrProto_t *encr_proto_tlv = MNULL; + MrvlIEtypes_Cipher_t *pcipher_tlv = MNULL; + mlan_ds_sec_cfg *sec = MNULL; + t_u8 *tlv; + int len; + + ENTER(); + + len = resp->size - S_DS_GEN - sizeof(t_u16); + tlv = psup_profile->tlv_buf; + if (pioctl_buf) { + sec = (mlan_ds_sec_cfg *)pioctl_buf->pbuf; + while (len > 0) { + head = (MrvlIEtypesHeader_t *)tlv; + head->type = wlan_le16_to_cpu(head->type); + head->len = wlan_le16_to_cpu(head->len); + switch (head->type) { + case TLV_TYPE_ENCRYPTION_PROTO: + encr_proto_tlv = + (MrvlIEtypes_EncrProto_t *)head; + sec->param.esupp_mode.rsn_mode = + wlan_le16_to_cpu(encr_proto_tlv-> + rsn_mode); + PRINTM(MINFO, "rsn_mode=0x%x\n", + sec->param.esupp_mode.rsn_mode); + break; + case TLV_TYPE_CIPHER: + pcipher_tlv = (MrvlIEtypes_Cipher_t *)head; + sec->param.esupp_mode.act_paircipher = + pcipher_tlv->pair_cipher; + sec->param.esupp_mode.act_groupcipher = + pcipher_tlv->group_cipher; + PRINTM(MINFO, + "paircipher=0x%x, groupcipher=0x%x\n", + sec->param.esupp_mode.act_paircipher, + sec->param.esupp_mode.act_groupcipher); + break; + } + len -= (head->len - sizeof(MrvlIEtypesHeader_t)); + tlv = tlv + (head->len + sizeof(MrvlIEtypesHeader_t)); + } + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + /** * @brief This function handles the command response of rf_channel * @@ -1078,8 +1342,8 @@ wlan_ret_802_11_key_material(IN pmlan_private pmpriv, */ static mlan_status wlan_ret_802_11_rf_channel(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_802_11_RF_CHANNEL *prf_channel = &resp->params.rf_channel; t_u16 new_channel = wlan_le16_to_cpu(prf_channel->current_channel); @@ -1093,7 +1357,7 @@ wlan_ret_802_11_rf_channel(IN pmlan_private pmpriv, pmpriv->curr_bss_params.bss_descriptor.channel = new_channel; } if (pioctl_buf) { - bss = (mlan_ds_bss *) pioctl_buf->pbuf; + bss = (mlan_ds_bss *)pioctl_buf->pbuf; bss->param.bss_chan.channel = new_channel; } LEAVE(); @@ -1110,7 +1374,7 @@ wlan_ret_802_11_rf_channel(IN pmlan_private pmpriv, */ static mlan_status wlan_ret_ibss_coalescing_status(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp) + IN HostCmd_DS_COMMAND *resp) { HostCmd_DS_802_11_IBSS_STATUS *pibss_coal_resp = &(resp->params.ibss_coalescing); @@ -1154,8 +1418,8 @@ wlan_ret_ibss_coalescing_status(IN pmlan_private pmpriv, /* ERP Information */ pmpriv->curr_bss_params.bss_descriptor.erp_flags = - (t_u8) wlan_le16_to_cpu(pibss_coal_resp-> - use_g_rate_protect); + (t_u8)wlan_le16_to_cpu(pibss_coal_resp-> + use_g_rate_protect); pmpriv->adhoc_state = ADHOC_COALESCED; } @@ -1175,8 +1439,8 @@ wlan_ret_ibss_coalescing_status(IN pmlan_private pmpriv, */ static mlan_status wlan_ret_mgmt_ie_list(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - OUT mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) { t_u16 resp_len = 0, travel_len = 0; int i = 0; @@ -1190,15 +1454,18 @@ wlan_ret_mgmt_ie_list(IN pmlan_private pmpriv, ENTER(); if (wlan_le16_to_cpu(pmgmt_ie_list->action) == HostCmd_ACT_GEN_SET) { + if ((pmpriv->adapter->state_rdh.stage == RDH_SET_CUSTOM_IE) || + (pmpriv->adapter->state_rdh.stage == RDH_REM_CUSTOM_IE)) + wlan_11h_radar_detected_callback((t_void *)pmpriv); LEAVE(); return MLAN_STATUS_SUCCESS; } - misc = (mlan_ds_misc_cfg *) pioctl_buf->pbuf; - cust_ie = (mlan_ds_misc_custom_ie *) & pmgmt_ie_list->ds_mgmt_ie; + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + cust_ie = (mlan_ds_misc_custom_ie *)&pmgmt_ie_list->ds_mgmt_ie; max_mgmt_ie = - (tlvbuf_max_mgmt_ie *) ((t_u8 *) cust_ie + cust_ie->len + - sizeof(MrvlIEtypesHeader_t)); + (tlvbuf_max_mgmt_ie *)((t_u8 *)cust_ie + cust_ie->len + + sizeof(MrvlIEtypesHeader_t)); if (cust_ie) { cust_ie->type = wlan_le16_to_cpu(cust_ie->type); resp_len = cust_ie->len = wlan_le16_to_cpu(cust_ie->len); @@ -1210,8 +1477,8 @@ wlan_ret_mgmt_ie_list(IN pmlan_private pmpriv, ie_index); while (resp_len > sizeof(t_u16)) { - cptr = (custom_ie *) (((t_u8 *) cust_ie->ie_data_list) + - travel_len); + cptr = (custom_ie *)(((t_u8 *)cust_ie->ie_data_list) + + travel_len); cptr->ie_index = wlan_le16_to_cpu(cptr->ie_index); cptr->mgmt_subtype_mask = wlan_le16_to_cpu(cptr->mgmt_subtype_mask); @@ -1244,7 +1511,7 @@ wlan_ret_mgmt_ie_list(IN pmlan_private pmpriv, } /* Append max_mgmt_ie TLV after custom_ie */ memcpy(pmpriv->adapter, - (t_u8 *) & misc->param.cust_ie + + (t_u8 *)&misc->param.cust_ie + (cust_ie->len + sizeof(MrvlIEtypesHeader_t)), max_mgmt_ie, @@ -1305,8 +1572,8 @@ wlan_set_tdls_powermode(IN pmlan_private pmpriv, t_u8 powermode) */ static mlan_status wlan_ret_tdls_config(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - OUT mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) { t_u8 i = 0; t_u16 link_length = 0, final_data_rate = 0; @@ -1324,9 +1591,9 @@ wlan_ret_tdls_config(IN pmlan_private pmpriv, wlan_le16_to_cpu(ptdls_config_data->tdls_info.tdls_action); switch (ptdls_config_data->tdls_info.tdls_action) { case WLAN_TDLS_CONFIG: - misc = (mlan_ds_misc_cfg *) pioctl_buf->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; tdls_all_cfg = - (tdls_all_config *) ptdls_config_data->tdls_info. + (tdls_all_config *)ptdls_config_data->tdls_info. tdls_data; if (wlan_le16_to_cpu(tdls_all_cfg->u.tdls_config.enable) == 0) { PRINTM(MINFO, "TDLS disable successful.\n"); @@ -1344,9 +1611,9 @@ wlan_ret_tdls_config(IN pmlan_private pmpriv, break; case WLAN_TDLS_DISCOVERY_REQ: - misc = (mlan_ds_misc_cfg *) pioctl_buf->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; tdls_all_cfg = - (tdls_all_config *) ptdls_config_data->tdls_info. + (tdls_all_config *)ptdls_config_data->tdls_info. tdls_data; tdls_all_cfg->u.tdls_discovery_resp.payload_len = wlan_le16_to_cpu(tdls_all_cfg->u.tdls_discovery_resp. @@ -1368,7 +1635,7 @@ wlan_ret_tdls_config(IN pmlan_private pmpriv, * TDLS link being setup, block all data for this Peer */ tdls_all_cfg = - (tdls_all_config *) ptdls_config_data->tdls_info. + (tdls_all_config *)ptdls_config_data->tdls_info. tdls_data; PRINTM(MCMND, "TDLS_SETUP_REQ: " MACSTR "\n", MAC2STR(tdls_all_cfg->u.tdls_setup.peer_mac_addr)); @@ -1397,7 +1664,7 @@ wlan_ret_tdls_config(IN pmlan_private pmpriv, * TDLS link torn down, open data ports if blocked */ tdls_all_cfg = - (tdls_all_config *) ptdls_config_data->tdls_info. + (tdls_all_config *)ptdls_config_data->tdls_info. tdls_data; wlan_restore_tdls_packets(pmpriv, tdls_all_cfg->u.tdls_tear_down. @@ -1440,7 +1707,7 @@ wlan_ret_tdls_config(IN pmlan_private pmpriv, break; case WLAN_TDLS_INIT_CHAN_SWITCH: tdls_all_cfg = - (tdls_all_config *) ptdls_config_data->tdls_info. + (tdls_all_config *)ptdls_config_data->tdls_info. tdls_data; PRINTM(MCMND, "TDLS_INIT_CHANNEL_SWITCH: " MACSTR @@ -1451,9 +1718,9 @@ wlan_ret_tdls_config(IN pmlan_private pmpriv, break; case WLAN_TDLS_LINK_STATUS: - misc = (mlan_ds_misc_cfg *) pioctl_buf->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; tdls_all_cfg = - (tdls_all_config *) ptdls_config_data->tdls_info. + (tdls_all_config *)ptdls_config_data->tdls_info. tdls_data; tdls_all_cfg->u.tdls_link_status_resp.payload_len = wlan_le16_to_cpu(tdls_all_cfg->u.tdls_link_status_resp. @@ -1486,18 +1753,18 @@ wlan_ret_tdls_config(IN pmlan_private pmpriv, sizeof(link_ptr->key_length); } final_data_rate = - (t_u16) wlan_index_to_data_rate(pmadapter, - link_ptr->u. - rate_info. - tx_data_rate, - link_ptr->u. - rate_info. - tx_rate_htinfo); + (t_u16)wlan_index_to_data_rate(pmadapter, + link_ptr->u. + rate_info. + tx_data_rate, + link_ptr->u. + rate_info. + tx_rate_htinfo); link_ptr->u.final_data_rate = final_data_rate / 2; link_ptr = - (tdls_each_link_status *) (((t_u8 *) link_ptr) + - link_length); + (tdls_each_link_status *)(((t_u8 *)link_ptr) + + link_length); } memcpy(pmpriv->adapter, &misc->param.tdls_config, &ptdls_config_data->tdls_info, @@ -1505,17 +1772,17 @@ wlan_ret_tdls_config(IN pmlan_private pmpriv, (resp->size - S_DS_GEN))); break; case WLAN_TDLS_POWER_MODE: - misc = (mlan_ds_misc_cfg *) pioctl_buf->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; tdls_all_cfg = - (tdls_all_config *) ptdls_config_data->tdls_info. + (tdls_all_config *)ptdls_config_data->tdls_info. tdls_data; wlan_set_tdls_powermode(pmpriv, - (t_u8) tdls_all_cfg->u.tdls_power_mode. + (t_u8)tdls_all_cfg->u.tdls_power_mode. power_mode); break; case WLAN_TDLS_STOP_CHAN_SWITCH: tdls_all_cfg = - (tdls_all_config *) ptdls_config_data->tdls_info. + (tdls_all_config *)ptdls_config_data->tdls_info. tdls_data; PRINTM(MCMND, "TDLS_STOP_CHANNEL_SWITCH: " MACSTR "\n", MAC2STR(tdls_all_cfg->u.tdls_stop_chan_switch. @@ -1555,12 +1822,12 @@ wlan_ret_tdls_config(IN pmlan_private pmpriv, */ static mlan_status wlan_ret_tdls_oper(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - OUT mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, OUT mlan_ioctl_req *pioctl_buf) { HostCmd_DS_TDLS_OPER *ptdls_oper = &(resp->params.tdls_oper_data); sta_node *sta_ptr = MNULL; t_u16 reason = 0; + pmlan_adapter pmadapter = pmpriv->adapter; ENTER(); @@ -1594,6 +1861,34 @@ wlan_ret_tdls_oper(IN pmlan_private pmpriv, } break; case TDLS_DELETE: + wlan_restore_tdls_packets(pmpriv, ptdls_oper->peer_mac, + TDLS_TEAR_DOWN); + if (sta_ptr) { + if (sta_ptr->is_11n_enabled) { + wlan_cleanup_reorder_tbl(pmpriv, + ptdls_oper->peer_mac); + pmadapter->callbacks.moal_spin_lock(pmadapter-> + pmoal_handle, + pmpriv->wmm. + ra_list_spinlock); + wlan_11n_cleanup_txbastream_tbl(pmpriv, + ptdls_oper-> + peer_mac); + pmadapter->callbacks. + moal_spin_unlock(pmadapter-> + pmoal_handle, + pmpriv->wmm. + ra_list_spinlock); + } + if (sta_ptr->status >= TDLS_SETUP_INPROGRESS) + wlan_delete_station_entry(pmpriv, + ptdls_oper->peer_mac); + } + if (MTRUE == wlan_is_station_list_empty(pmpriv)) + pmadapter->tdls_status = TDLS_NOT_SETUP; + else + pmadapter->tdls_status = TDLS_IN_BASE_CHANNEL; + if (reason) PRINTM(MMSG, "TDLS: Delete link " MACSTR " fail, reason=%d\n", @@ -1621,8 +1916,8 @@ wlan_ret_tdls_oper(IN pmlan_private pmpriv, */ static mlan_status wlan_ret_sysclock_cfg(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { mlan_ds_misc_cfg *mis_ccfg = MNULL; HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG *clk_cfg = @@ -1632,7 +1927,7 @@ wlan_ret_sysclock_cfg(IN pmlan_private pmpriv, ENTER(); if (pioctl_buf) { - mis_ccfg = (mlan_ds_misc_cfg *) pioctl_buf->pbuf; + mis_ccfg = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; mis_ccfg->param.sys_clock.cur_sys_clk = wlan_le16_to_cpu(clk_cfg->cur_sys_clk); mis_ccfg->param.sys_clock.sys_clk_type = @@ -1652,26 +1947,26 @@ wlan_ret_sysclock_cfg(IN pmlan_private pmpriv, * @brief This function handles the command response of inactivity timeout * * @param pmpriv A pointer to mlan_private structure - * @param resp A pointer to HostCmd_DS_COMMAND + * @param resp A pointer to HostCmd_DS_COMMAND * @param pioctl_buf A pointer to command buffer * * @return MLAN_STATUS_SUCCESS */ static mlan_status wlan_ret_inactivity_timeout(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { mlan_ds_pm_cfg *pmcfg = MNULL; mlan_ds_inactivity_to *inac_to = MNULL; HostCmd_DS_INACTIVITY_TIMEOUT_EXT *cmd_inac_to = - (HostCmd_DS_INACTIVITY_TIMEOUT_EXT *) & resp->params. + (HostCmd_DS_INACTIVITY_TIMEOUT_EXT *)&resp->params. inactivity_to; ENTER(); if (pioctl_buf) { - pmcfg = (mlan_ds_pm_cfg *) pioctl_buf->pbuf; + pmcfg = (mlan_ds_pm_cfg *)pioctl_buf->pbuf; inac_to = &pmcfg->param.inactivity_to; inac_to->timeout_unit = wlan_le16_to_cpu(cmd_inac_to->timeout_unit); @@ -1699,18 +1994,18 @@ wlan_ret_inactivity_timeout(IN pmlan_private pmpriv, */ static mlan_status wlan_ret_subscribe_event(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_SUBSCRIBE_EVENT *evt = - (HostCmd_DS_SUBSCRIBE_EVENT *) & resp->params.subscribe_event; + (HostCmd_DS_SUBSCRIBE_EVENT *)&resp->params.subscribe_event; mlan_ds_subscribe_evt *sub_evt = MNULL; mlan_ds_misc_cfg *misc = MNULL; ENTER(); if (pioctl_buf && (pioctl_buf->action == MLAN_ACT_GET)) { - misc = (mlan_ds_misc_cfg *) pioctl_buf->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; sub_evt = &misc->param.subscribe_event; sub_evt->evt_bitmap = wlan_le16_to_cpu(evt->event_bitmap); pioctl_buf->data_read_written = sizeof(mlan_ds_misc_cfg); @@ -1731,17 +2026,17 @@ wlan_ret_subscribe_event(IN pmlan_private pmpriv, */ static mlan_status wlan_ret_otp_user_data(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_OTP_USER_DATA *cmd_user_data = - (HostCmd_DS_OTP_USER_DATA *) & resp->params.otp_user_data; + (HostCmd_DS_OTP_USER_DATA *)&resp->params.otp_user_data; mlan_ds_misc_otp_user_data *user_data = MNULL; ENTER(); if (pioctl_buf && (pioctl_buf->action == MLAN_ACT_GET)) { - user_data = (mlan_ds_misc_otp_user_data *) pioctl_buf->pbuf; + user_data = (mlan_ds_misc_otp_user_data *)pioctl_buf->pbuf; user_data->user_data_length = MIN(MAX_OTP_USER_DATA_LEN, wlan_le16_to_cpu (cmd_user_data-> @@ -1771,14 +2066,14 @@ wlan_ret_otp_user_data(IN pmlan_private pmpriv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_ops_sta_process_cmdresp(IN t_void * priv, +wlan_ops_sta_process_cmdresp(IN t_void *priv, IN t_u16 cmdresp_no, - IN t_void * pcmd_buf, IN t_void * pioctl) + IN t_void *pcmd_buf, IN t_void *pioctl) { mlan_status ret = MLAN_STATUS_SUCCESS; - mlan_private *pmpriv = (mlan_private *) priv; - HostCmd_DS_COMMAND *resp = (HostCmd_DS_COMMAND *) pcmd_buf; - mlan_ioctl_req *pioctl_buf = (mlan_ioctl_req *) pioctl; + mlan_private *pmpriv = (mlan_private *)priv; + HostCmd_DS_COMMAND *resp = (HostCmd_DS_COMMAND *)pcmd_buf; + mlan_ioctl_req *pioctl_buf = (mlan_ioctl_req *)pioctl; mlan_adapter *pmadapter = pmpriv->adapter; int ctr; @@ -1897,9 +2192,22 @@ wlan_ops_sta_process_cmdresp(IN t_void * priv, case HostCmd_CMD_802_11_KEY_MATERIAL: ret = wlan_ret_802_11_key_material(pmpriv, resp, pioctl_buf); break; + case HostCmd_CMD_SUPPLICANT_PMK: + ret = wlan_ret_802_11_supplicant_pmk(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_SUPPLICANT_PROFILE: + ret = wlan_ret_802_11_supplicant_profile(pmpriv, resp, + pioctl_buf); + break; case HostCmd_CMD_802_11D_DOMAIN_INFO: ret = wlan_ret_802_11d_domain_info(pmpriv, resp); break; + case HostCmd_CMD_802_11_TPC_ADAPT_REQ: + case HostCmd_CMD_802_11_TPC_INFO: + case HostCmd_CMD_802_11_CHAN_SW_ANN: + case HostCmd_CMD_CHAN_REPORT_REQUEST: + ret = wlan_11h_cmdresp_process(pmpriv, resp); + break; case HostCmd_CMD_11N_ADDBA_REQ: ret = wlan_ret_11n_addba_req(pmpriv, resp); break; @@ -1911,21 +2219,33 @@ wlan_ops_sta_process_cmdresp(IN t_void * priv, break; case HostCmd_CMD_RECONFIGURE_TX_BUFF: pmadapter->tx_buf_size = - (t_u16) wlan_le16_to_cpu(resp->params.tx_buf.buff_size); + (t_u16)wlan_le16_to_cpu(resp->params.tx_buf.buff_size); pmadapter->tx_buf_size = (pmadapter->tx_buf_size / MLAN_SDIO_BLOCK_SIZE) * MLAN_SDIO_BLOCK_SIZE; pmadapter->curr_tx_buf_size = pmadapter->tx_buf_size; pmadapter->mp_end_port = wlan_le16_to_cpu(resp->params.tx_buf.mp_end_port); - pmadapter->mp_data_port_mask = DATA_PORT_MASK; + pmadapter->mp_data_port_mask = + pmadapter->psdio_device->reg->data_port_mask; - for (ctr = 1; ctr <= MAX_PORT - pmadapter->mp_end_port; ctr++) { + for (ctr = 1; + ctr <= + pmadapter->psdio_device->max_ports - + pmadapter->mp_end_port; ctr++) { pmadapter->mp_data_port_mask &= - ~(1 << (MAX_PORT - ctr)); + ~(1 << + (pmadapter->psdio_device->max_ports - ctr)); } - pmadapter->curr_wr_port = 1; + if (pmadapter->psdio_device->supports_sdio_new_mode) { + pmadapter->curr_wr_port = 0; + pmadapter->mpa_tx.pkt_aggr_limit = + MIN(pmadapter->psdio_device->mp_aggr_pkt_limit, + (pmadapter->mp_end_port >> 1)); + } else { + pmadapter->curr_wr_port = 1; + } PRINTM(MCMND, "end port %d, data port mask %x\n", wlan_le16_to_cpu(resp->params.tx_buf.mp_end_port), pmadapter->mp_data_port_mask); @@ -1978,6 +2298,7 @@ wlan_ops_sta_process_cmdresp(IN t_void * priv, case HostCmd_CMD_BBP_REG_ACCESS: case HostCmd_CMD_RF_REG_ACCESS: case HostCmd_CMD_CAU_REG_ACCESS: + case HostCmd_CMD_TARGET_ACCESS: case HostCmd_CMD_802_11_EEPROM_ACCESS: ret = wlan_ret_reg_access(pmpriv->adapter, cmdresp_no, resp, pioctl_buf); @@ -1992,6 +2313,10 @@ wlan_ops_sta_process_cmdresp(IN t_void * priv, break; case HostCmd_CMD_SET_BSS_MODE: break; + case HostCmd_CMD_MEASUREMENT_REQUEST: + case HostCmd_CMD_MEASUREMENT_REPORT: + ret = wlan_meas_cmdresp_process(pmpriv, resp); + break; #ifdef WIFI_DIRECT_SUPPORT case HostCmd_CMD_802_11_REMAIN_ON_CHANNEL: ret = wlan_ret_remain_on_channel(pmpriv, resp, pioctl_buf); @@ -2012,6 +2337,17 @@ wlan_ops_sta_process_cmdresp(IN t_void * priv, case HostCmd_CMD_REJECT_ADDBA_REQ: ret = wlan_ret_reject_addba_req(pmpriv, resp, pioctl_buf); break; +#ifdef RX_PACKET_COALESCE + case HostCmd_CMD_RX_PKT_COALESCE_CFG: + ret = wlan_ret_rx_pkt_coalesce_cfg(pmpriv, resp, pioctl_buf); + break; +#endif + case HostCmd_CMD_MULTI_CHAN_CONFIG: + ret = wlan_ret_multi_chan_cfg(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_MULTI_CHAN_POLICY: + ret = wlan_ret_multi_chan_policy(pmpriv, resp, pioctl_buf); + break; case HostCMD_CONFIG_LOW_POWER_MODE: break; default: diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_event.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_event.c old mode 100755 new mode 100644 index 121810d9..c7d0bb56 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_event.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_event.c @@ -30,6 +30,10 @@ Change log: #include "mlan_main.h" #include "mlan_wmm.h" #include "mlan_11n.h" +#include "mlan_11h.h" +#ifdef DRV_EMBEDDED_SUPPLICANT +#include "authenticator_api.h" +#endif /******************************************************** Global Variables @@ -77,9 +81,9 @@ wlan_parse_tdls_event(pmlan_private priv, pmlan_buffer pevent) t_u16 ie_len = 0; mlan_ds_misc_tdls_oper tdls_oper; t_u8 event_buf[100]; - mlan_event *ptdls_event = (mlan_event *) event_buf; + mlan_event *ptdls_event = (mlan_event *)event_buf; tdls_tear_down_event *tdls_evt = - (tdls_tear_down_event *) ptdls_event->event_buf; + (tdls_tear_down_event *)ptdls_event->event_buf; ENTER(); /* reason code is not mandatory, hence less by sizeof(t_u16) */ @@ -180,14 +184,14 @@ wlan_parse_tdls_event(pmlan_private priv, pmlan_buffer pevent) HostCmd_CMD_TDLS_OPERATION, HostCmd_ACT_GEN_SET, 0, - (t_void *) MNULL, &tdls_oper); + (t_void *)MNULL, &tdls_oper); ptdls_event->bss_index = priv->bss_index; ptdls_event->event_id = MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ; ptdls_event->event_len = sizeof(tdls_tear_down_event); memcpy(priv->adapter, - (t_u8 *) tdls_evt->peer_mac_addr, + (t_u8 *)tdls_evt->peer_mac_addr, tdls_event->peer_mac_addr, MLAN_MAC_ADDR_LENGTH); tdls_evt->reason_code = @@ -200,6 +204,8 @@ wlan_parse_tdls_event(pmlan_private priv, pmlan_buffer pevent) wlan_recv_event(priv, MLAN_EVENT_ID_DRV_DEFER_HANDLING, MNULL); + LEAVE(); + return; } wlan_restore_tdls_packets(priv, tdls_event->peer_mac_addr, @@ -294,36 +300,36 @@ wlan_parse_tdls_event(pmlan_private priv, pmlan_buffer pevent) * * @param priv A pointer to mlan_private * - * @return N/A + * @return N/A */ void wlan_send_tdls_tear_down_request(pmlan_private priv) { t_u8 event_buf[100]; - mlan_event *ptdls_event = (mlan_event *) event_buf; + mlan_event *ptdls_event = (mlan_event *)event_buf; tdls_tear_down_event *tdls_evt = - (tdls_tear_down_event *) ptdls_event->event_buf; + (tdls_tear_down_event *)ptdls_event->event_buf; sta_node *sta_ptr = MNULL; ENTER(); - sta_ptr = (sta_node *) util_peek_list(priv->adapter->pmoal_handle, - &priv->sta_list, - priv->adapter->callbacks. - moal_spin_lock, - priv->adapter->callbacks. - moal_spin_unlock); + sta_ptr = (sta_node *)util_peek_list(priv->adapter->pmoal_handle, + &priv->sta_list, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); if (!sta_ptr) { LEAVE(); return; } - while (sta_ptr != (sta_node *) & priv->sta_list) { + while (sta_ptr != (sta_node *)&priv->sta_list) { if (sta_ptr->external_tdls) { ptdls_event->bss_index = priv->bss_index; ptdls_event->event_id = MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ; ptdls_event->event_len = sizeof(tdls_tear_down_event); - memcpy(priv->adapter, (t_u8 *) tdls_evt->peer_mac_addr, + memcpy(priv->adapter, (t_u8 *)tdls_evt->peer_mac_addr, sta_ptr->mac_addr, MLAN_MAC_ADDR_LENGTH); tdls_evt->reason_code = WLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED; @@ -364,6 +370,7 @@ wlan_reset_connect_state(pmlan_private priv, t_u8 drv_disconnect) if (drv_disconnect) { priv->media_connected = MFALSE; + wlan_11h_check_update_radar_det_state(priv); } if (priv->port_ctrl_mode == MTRUE) { @@ -385,18 +392,29 @@ wlan_reset_connect_state(pmlan_private priv, t_u8 drv_disconnect) priv->rxpd_rate = 0; priv->rxpd_htinfo = 0; priv->max_amsdu = 0; + wlan_coex_ampdu_rxwinsize(pmadapter); + priv->sec_info.ewpa_enabled = MFALSE; priv->sec_info.wpa_enabled = MFALSE; priv->sec_info.wpa2_enabled = MFALSE; priv->wpa_ie_len = 0; +#ifdef DRV_EMBEDDED_SUPPLICANT + if (priv->adapter->psdio_device->driver_supplicant_auth) { + supplicantStopSessionTimer(priv->psapriv); + supplicantClrEncryptKey(priv->psapriv); + supplicantDisable(priv->psapriv); + } +#endif priv->sec_info.wapi_enabled = MFALSE; priv->wapi_ie_len = 0; priv->sec_info.wapi_key_on = MFALSE; priv->wps.session_enable = MFALSE; - memset(priv->adapter, (t_u8 *) & priv->wps.wps_ie, 0x00, + memset(priv->adapter, (t_u8 *)&priv->wps.wps_ie, 0x00, sizeof(priv->wps.wps_ie)); + priv->sec_info.osen_enabled = MFALSE; + priv->osen_ie_len = 0; priv->sec_info.encryption_mode = MLAN_ENCRYPTION_MODE_NONE; @@ -407,6 +425,7 @@ wlan_reset_connect_state(pmlan_private priv, t_u8 drv_disconnect) if (priv->bss_mode == MLAN_BSS_MODE_IBSS) { priv->adhoc_state = ADHOC_IDLE; priv->adhoc_is_link_sensed = MFALSE; + priv->intf_state_11h.adhoc_auto_sel_chan = MTRUE; } if (drv_disconnect) { @@ -463,7 +482,7 @@ t_void wlan_2040_coex_event(pmlan_private pmpriv) { t_u8 event_buf[100]; - mlan_event *pevent = (mlan_event *) event_buf; + mlan_event *pevent = (mlan_event *)event_buf; t_u8 ele_len; ENTER(); @@ -477,8 +496,8 @@ wlan_2040_coex_event(pmlan_private pmpriv) pevent->bss_index = pmpriv->bss_index; pevent->event_id = MLAN_EVENT_ID_DRV_OBSS_SCAN_PARAM; /* Copy OBSS scan parameters */ - memcpy(pmpriv->adapter, (t_u8 *) pevent->event_buf, - (t_u8 *) & pmpriv->curr_bss_params.bss_descriptor. + memcpy(pmpriv->adapter, (t_u8 *)pevent->event_buf, + (t_u8 *)&pmpriv->curr_bss_params.bss_descriptor. poverlap_bss_scan_param->obss_scan_param, ele_len); pevent->event_len = ele_len; wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_OBSS_SCAN_PARAM, @@ -491,11 +510,10 @@ wlan_2040_coex_event(pmlan_private pmpriv) /** * @brief This function will process tx pause event * - * * @param priv A pointer to mlan_private * @param pevent A pointer to event buf * - * @return N/A + * @return N/A */ static void wlan_process_sta_tx_pause_event(pmlan_private priv, pmlan_buffer pevent) @@ -503,8 +521,8 @@ wlan_process_sta_tx_pause_event(pmlan_private priv, pmlan_buffer pevent) t_u16 tlv_type, tlv_len; int tlv_buf_left = pevent->data_len - sizeof(t_u32); MrvlIEtypesHeader_t *tlv = - (MrvlIEtypesHeader_t *) (pevent->pbuf + pevent->data_offset + - sizeof(t_u32)); + (MrvlIEtypesHeader_t *)(pevent->pbuf + pevent->data_offset + + sizeof(t_u32)); MrvlIEtypes_tx_pause_t *tx_pause_tlv; sta_node *sta_ptr = MNULL; tdlsStatus_e status; @@ -522,7 +540,7 @@ wlan_process_sta_tx_pause_event(pmlan_private priv, pmlan_buffer pevent) break; } if (tlv_type == TLV_TYPE_TX_PAUSE) { - tx_pause_tlv = (MrvlIEtypes_tx_pause_t *) tlv; + tx_pause_tlv = (MrvlIEtypes_tx_pause_t *)tlv; PRINTM(MCMND, "TxPause: " MACSTR " pause=%d, pkts=%d\n", MAC2STR(tx_pause_tlv->peermac), tx_pause_tlv->tx_pause, tx_pause_tlv->pkt_cnt); @@ -560,14 +578,72 @@ wlan_process_sta_tx_pause_event(pmlan_private priv, pmlan_buffer pevent) } } tlv_buf_left -= (sizeof(MrvlIEtypesHeader_t) + tlv_len); - tlv = (MrvlIEtypesHeader_t *) ((t_u8 *) tlv + tlv_len + - sizeof(MrvlIEtypesHeader_t)); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len + + sizeof(MrvlIEtypesHeader_t)); } LEAVE(); return; } +/** +* +* @brief This function handles coex events generated by firmware +* +* @param priv A pointer to mlan_private structure +* @param pevent A pointer to event buf +* +* @return N/A +*/ +void +wlan_bt_coex_wlan_param_update_event(pmlan_private priv, pmlan_buffer pevent) +{ + pmlan_adapter pmadapter = priv->adapter; + MrvlIEtypesHeader_t *tlv = MNULL; + MrvlIETypes_BtCoexAggrWinSize_t *pCoexWinsize = MNULL; + MrvlIEtypes_BtCoexScanTime_t *pScantlv = MNULL; + t_s32 len = pevent->data_len - sizeof(t_u32); + t_u8 *pCurrent_ptr = pevent->pbuf + pevent->data_offset + sizeof(t_u32); + t_u16 tlv_type, tlv_len; + + ENTER(); + + while (len >= sizeof(MrvlIEtypesHeader_t)) { + tlv = (MrvlIEtypesHeader_t *)pCurrent_ptr; + tlv_len = wlan_le16_to_cpu(tlv->len); + tlv_type = wlan_le16_to_cpu(tlv->type); + if ((tlv_len + sizeof(MrvlIEtypesHeader_t)) > len) + break; + switch (tlv_type) { + case TLV_BTCOEX_WL_AGGR_WINSIZE: + pCoexWinsize = (MrvlIETypes_BtCoexAggrWinSize_t *) tlv; + pmadapter->coex_win_size = pCoexWinsize->coex_win_size; + pmadapter->coex_tx_win_size = pCoexWinsize->tx_win_size; + pmadapter->coex_rx_win_size = pCoexWinsize->rx_win_size; + wlan_coex_ampdu_rxwinsize(pmadapter); + wlan_update_ampdu_txwinsize(pmadapter); + break; + case TLV_BTCOEX_WL_SCANTIME: + pScantlv = (MrvlIEtypes_BtCoexScanTime_t *) tlv; + pmadapter->coex_scan = pScantlv->coex_scan; + pmadapter->coex_min_scan_time = pScantlv->min_scan_time; + pmadapter->coex_max_scan_time = pScantlv->max_scan_time; + break; + default: + break; + } + len -= tlv_len + sizeof(MrvlIEtypesHeader_t); + pCurrent_ptr += tlv_len + sizeof(MrvlIEtypesHeader_t); + } + PRINTM(MEVENT, + "coex_scan=%d min_scan=%d coex_win=%d, tx_win=%d rx_win=%d\n", + pmadapter->coex_scan, pmadapter->coex_min_scan_time, + pmadapter->coex_win_size, pmadapter->coex_tx_win_size, + pmadapter->coex_rx_win_size); + + LEAVE(); +} + /** * @brief This function handles events generated by firmware * @@ -576,9 +652,9 @@ wlan_process_sta_tx_pause_event(pmlan_private priv, pmlan_buffer pevent) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_ops_sta_process_event(IN t_void * priv) +wlan_ops_sta_process_event(IN t_void *priv) { - pmlan_private pmpriv = (pmlan_private) priv; + pmlan_private pmpriv = (pmlan_private)priv; pmlan_adapter pmadapter = pmpriv->adapter; mlan_status ret = MLAN_STATUS_SUCCESS; t_u32 eventcause = pmadapter->event_cause; @@ -587,7 +663,7 @@ wlan_ops_sta_process_event(IN t_void * priv) pmlan_buffer pmbuf = pmadapter->pmlan_buffer_event; t_u16 reason_code; pmlan_callbacks pcb = &pmadapter->callbacks; - mlan_event *pevent = (mlan_event *) event_buf; + mlan_event *pevent = (mlan_event *)event_buf; ENTER(); @@ -622,8 +698,8 @@ wlan_ops_sta_process_event(IN t_void * priv) break; } reason_code = - *(t_u16 *) (pmbuf->pbuf + pmbuf->data_offset + - sizeof(eventcause)); + *(t_u16 *)(pmbuf->pbuf + pmbuf->data_offset + + sizeof(eventcause)); PRINTM(MMSG, "wlan: EVENT: Deauthenticated (reason 0x%x)\n", reason_code); pmadapter->dbg.num_event_deauth++; @@ -638,8 +714,8 @@ wlan_ops_sta_process_event(IN t_void * priv) break; } reason_code = - *(t_u16 *) (pmbuf->pbuf + pmbuf->data_offset + - sizeof(eventcause)); + *(t_u16 *)(pmbuf->pbuf + pmbuf->data_offset + + sizeof(eventcause)); PRINTM(MMSG, "wlan: EVENT: Disassociated (reason 0x%x)\n", reason_code); pmadapter->dbg.num_event_disassoc++; @@ -648,8 +724,8 @@ wlan_ops_sta_process_event(IN t_void * priv) case EVENT_LINK_LOST: reason_code = - *(t_u16 *) (pmbuf->pbuf + pmbuf->data_offset + - sizeof(eventcause)); + *(t_u16 *)(pmbuf->pbuf + pmbuf->data_offset + + sizeof(eventcause)); PRINTM(MMSG, "wlan: EVENT: Link lost (reason 0x%x)\n", reason_code); pmadapter->dbg.num_event_link_lost++; @@ -734,13 +810,13 @@ wlan_ops_sta_process_event(IN t_void * priv) ret = pcb->moal_malloc(pmadapter->pmoal_handle, MAX_EVENT_SIZE, MLAN_MEM_DEF, &evt_buf); if ((ret == MLAN_STATUS_SUCCESS) && evt_buf) { - pevent = (pmlan_event) evt_buf; + pevent = (pmlan_event)evt_buf; pevent->bss_index = pmpriv->bss_index; PRINTM(MEVENT, "EVENT: FW Debug Info\n"); pevent->event_id = MLAN_EVENT_ID_FW_DEBUG_INFO; pevent->event_len = pmbuf->data_len - sizeof(eventcause); - memcpy(pmadapter, (t_u8 *) pevent->event_buf, + memcpy(pmadapter, (t_u8 *)pevent->event_buf, pmbuf->pbuf + pmbuf->data_offset + sizeof(eventcause), pevent->event_len); wlan_recv_event(pmpriv, pevent->event_id, pevent); @@ -770,12 +846,95 @@ wlan_ops_sta_process_event(IN t_void * priv) wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_PORT_RELEASE, MNULL); break; + case EVENT_STOP_TX: + PRINTM(MEVENT, "EVENT: Stop Tx (%#x)\n", eventcause); + wlan_11h_tx_disable(pmpriv); /* this fn will send event up + to MOAL */ + break; + case EVENT_START_TX: + PRINTM(MEVENT, "EVENT: Start Tx (%#x)\n", eventcause); + wlan_11h_tx_enable(pmpriv); /* this fn will send event up + to MOAL */ + break; + case EVENT_CHANNEL_SWITCH: + PRINTM(MEVENT, "EVENT: Channel Switch (%#x)\n", eventcause); + /* To be handled for 'chanswann' private command */ + break; + case EVENT_CHANNEL_SWITCH_ANN: + PRINTM(MEVENT, "EVENT: Channel Switch Announcement\n"); + /* Here, pass up event first, as handling will send deauth */ + wlan_recv_event(pmpriv, + MLAN_EVENT_ID_FW_CHANNEL_SWITCH_ANN, MNULL); + wlan_11h_handle_event_chanswann(pmpriv); + break; + case EVENT_RADAR_DETECTED: + PRINTM(MEVENT, "EVENT: Radar Detected\n"); + + /* Send as passthru first, this event can cause other events */ + memset(pmadapter, pevent, 0x00, sizeof(event_buf)); + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; + pevent->event_len = pmbuf->data_len; + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset, pevent->event_len); + wlan_recv_event(pmpriv, pevent->event_id, pevent); + + if (pmadapter->state_rdh.stage == RDH_OFF) { + pmadapter->state_rdh.stage = RDH_CHK_INTFS; + wlan_11h_radar_detected_handling(pmadapter); + } else { + PRINTM(MEVENT, "Ignore Event Radar Detected - handling" + " already in progress.\n"); + } + + break; + + case EVENT_CHANNEL_REPORT_RDY: + PRINTM(MEVENT, "EVENT: Channel Report Ready\n"); + /* Allocate memory for event buffer */ + ret = pcb->moal_malloc(pmadapter->pmoal_handle, + MAX_EVENT_SIZE, MLAN_MEM_DEF, &evt_buf); + if ((ret == MLAN_STATUS_SUCCESS) && evt_buf) { + memset(pmadapter, evt_buf, 0x00, MAX_EVENT_SIZE); + /* Setup event buffer */ + pevent = (pmlan_event)evt_buf; + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_FW_CHANNEL_REPORT_RDY; + pevent->event_len = + pmbuf->data_len - sizeof(eventcause); + /* Copy event data */ + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset + + sizeof(eventcause), pevent->event_len); + /* Handle / pass event data */ + ret = wlan_11h_handle_event_chanrpt_ready(pmpriv, + pevent); + + /* Also send this event as passthru */ + pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; + pevent->event_len = pmbuf->data_len; + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset, + pevent->event_len); + wlan_recv_event(pmpriv, pevent->event_id, pevent); + /* Now done with buffer */ + pcb->moal_mfree(pmadapter->pmoal_handle, evt_buf); + } + /* Send up this Event to unblock MOAL waitqueue */ + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_MEAS_REPORT, MNULL); + break; case EVENT_EXT_SCAN_REPORT: PRINTM(MEVENT, "EVENT: EXT_SCAN Report (%d)\n", pmbuf->data_len); if (pmadapter->pscan_ioctl_req && pmadapter->ext_scan) ret = wlan_handle_event_ext_scan_report(priv, pmbuf); break; + case EVENT_MEAS_REPORT_RDY: + PRINTM(MEVENT, "EVENT: Measurement Report Ready (%#x)\n", + eventcause); + ret = wlan_prepare_cmd(priv, HostCmd_CMD_MEASUREMENT_REPORT, + HostCmd_ACT_GEN_SET, 0, 0, MNULL); + break; case EVENT_WMM_STATUS_CHANGE: if (pmbuf && pmbuf->data_len > sizeof(eventcause) + sizeof(MrvlIEtypesHeader_t)) { @@ -881,10 +1040,10 @@ wlan_ops_sta_process_event(IN t_void * priv) break; case EVENT_AMSDU_AGGR_CTRL: PRINTM(MEVENT, "EVENT: AMSDU_AGGR_CTRL %d\n", - *(t_u16 *) pmadapter->event_body); + *(t_u16 *)pmadapter->event_body); pmadapter->tx_buf_size = MIN(pmadapter->curr_tx_buf_size, - wlan_le16_to_cpu(*(t_u16 *) pmadapter->event_body)); + wlan_le16_to_cpu(*(t_u16 *)pmadapter->event_body)); PRINTM(MEVENT, "tx_buf_size %d\n", pmadapter->tx_buf_size); break; @@ -893,7 +1052,7 @@ wlan_ops_sta_process_event(IN t_void * priv) pevent->bss_index = pmpriv->bss_index; pevent->event_id = MLAN_EVENT_ID_FW_WEP_ICV_ERR; pevent->event_len = sizeof(Event_WEP_ICV_ERR); - memcpy(pmadapter, (t_u8 *) pevent->event_buf, + memcpy(pmadapter, (t_u8 *)pevent->event_buf, pmadapter->event_body, pevent->event_len); wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_WEP_ICV_ERR, pevent); break; @@ -904,7 +1063,7 @@ wlan_ops_sta_process_event(IN t_void * priv) pevent->event_id = MLAN_EVENT_ID_FW_BW_CHANGED; pevent->event_len = sizeof(t_u8); /* Copy event body from the event buffer */ - memcpy(pmadapter, (t_u8 *) pevent->event_buf, + memcpy(pmadapter, (t_u8 *)pevent->event_buf, pmadapter->event_body, pevent->event_len); wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_BW_CHANGED, pevent); break; @@ -916,11 +1075,11 @@ wlan_ops_sta_process_event(IN t_void * priv) ret = pcb->moal_malloc(pmadapter->pmoal_handle, MAX_EVENT_SIZE, MLAN_MEM_DEF, &evt_buf); if ((ret == MLAN_STATUS_SUCCESS) && evt_buf) { - pevent = (pmlan_event) evt_buf; + pevent = (pmlan_event)evt_buf; pevent->bss_index = pmpriv->bss_index; pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; pevent->event_len = pmbuf->data_len; - memcpy(pmadapter, (t_u8 *) pevent->event_buf, + memcpy(pmadapter, (t_u8 *)pevent->event_buf, pmbuf->pbuf + pmbuf->data_offset, pevent->event_len); wlan_recv_event(pmpriv, pevent->event_id, pevent); @@ -940,11 +1099,11 @@ wlan_ops_sta_process_event(IN t_void * priv) MAX_EVENT_SIZE * 2, MLAN_MEM_DEF, &evt_buf); if ((ret == MLAN_STATUS_SUCCESS) && evt_buf) { - pevent = (pmlan_event) evt_buf; + pevent = (pmlan_event)evt_buf; pevent->bss_index = pmpriv->bss_index; pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; pevent->event_len = pmbuf->data_len; - memcpy(pmadapter, (t_u8 *) pevent->event_buf, + memcpy(pmadapter, (t_u8 *)pevent->event_buf, pmbuf->pbuf + pmbuf->data_offset, pevent->event_len); wlan_recv_event(pmpriv, pevent->event_id, pevent); @@ -953,7 +1112,7 @@ wlan_ops_sta_process_event(IN t_void * priv) break; case EVENT_REMAIN_ON_CHANNEL_EXPIRED: PRINTM(MEVENT, "EVENT: REMAIN_ON_CHANNEL_EXPIRED reason=%d\n", - *(t_u16 *) pmadapter->event_body); + *(t_u16 *)pmadapter->event_body); wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_FLUSH_RX_WORK, MNULL); wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_REMAIN_ON_CHAN_EXPIRED, MNULL); @@ -967,11 +1126,11 @@ wlan_ops_sta_process_event(IN t_void * priv) ret = pcb->moal_malloc(pmadapter->pmoal_handle, MAX_EVENT_SIZE, MLAN_MEM_DEF, &evt_buf); if ((ret == MLAN_STATUS_SUCCESS) && evt_buf) { - pevent = (pmlan_event) evt_buf; + pevent = (pmlan_event)evt_buf; pevent->bss_index = pmpriv->bss_index; pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; pevent->event_len = pmbuf->data_len; - memcpy(pmadapter, (t_u8 *) pevent->event_buf, + memcpy(pmadapter, (t_u8 *)pevent->event_buf, pmbuf->pbuf + pmbuf->data_offset, pevent->event_len); wlan_recv_event(pmpriv, pevent->event_id, pevent); @@ -995,7 +1154,26 @@ wlan_ops_sta_process_event(IN t_void * priv) pevt_dat[2], pevt_dat[3]); } break; + case EVENT_MULTI_CHAN_INFO: + PRINTM(MEVENT, "EVENT: MULTI_CHAN_INFO\n"); + wlan_handle_event_multi_chan_info(pmpriv, pmbuf); + break; + case EVENT_TX_STATUS_REPORT: + PRINTM(MINFO, "EVENT: TX_STATUS\n"); + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_FW_TX_STATUS; + pevent->event_len = pmbuf->data_len; + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset, MIN(pevent->event_len, + sizeof + (event_buf))); + wlan_recv_event(pmpriv, pevent->event_id, pevent); + break; + case EVENT_BT_COEX_WLAN_PARA_CHANGE: + PRINTM(MEVENT, "EVENT: BT coex wlan param update\n"); + wlan_bt_coex_wlan_param_update_event(pmpriv, pmbuf); + break; default: PRINTM(MEVENT, "EVENT: unknown event id: %#x\n", eventcause); wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_UNKNOWN, MNULL); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_ioctl.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_ioctl.c old mode 100755 new mode 100644 index ec8eb154..0144cb88 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_ioctl.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_ioctl.c @@ -31,6 +31,10 @@ Change log: #include "mlan_wmm.h" #include "mlan_11n.h" #include "mlan_sdio.h" +#include "mlan_11h.h" +#ifdef DRV_EMBEDDED_SUPPLICANT +#include "authenticator_api.h" +#endif /******************************************************** Local Variables @@ -114,7 +118,7 @@ wlan_get_info_signal(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_RSSI_INFO, HostCmd_ACT_GEN_GET, - 0, (t_void *) pioctl_req, MNULL); + 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -163,7 +167,7 @@ wlan_get_info_stats(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_GET_LOG, HostCmd_ACT_GEN_GET, - 0, (t_void *) pioctl_req, MNULL); + 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -195,7 +199,7 @@ wlan_get_info_bss_info(IN pmlan_adapter pmadapter, /* Get current BSS info */ pbss_desc = &pmpriv->curr_bss_params.bss_descriptor; - info = (mlan_ds_get_info *) pioctl_req->pbuf; + info = (mlan_ds_get_info *)pioctl_req->pbuf; /* BSS mode */ info->param.bss_info.bss_mode = pmpriv->bss_mode; @@ -215,7 +219,7 @@ wlan_get_info_bss_info(IN pmlan_adapter pmadapter, info->param.bss_info.beacon_interval = pbss_desc->beacon_period; /* Band */ - info->param.bss_info.bss_band = (t_u8) pbss_desc->bss_band; + info->param.bss_info.bss_band = (t_u8)pbss_desc->bss_band; /* Region code */ info->param.bss_info.region_code = pmadapter->region_code; @@ -269,8 +273,8 @@ wlan_get_info_bss_info(IN pmlan_adapter pmadapter, /* Association ID */ if (pmpriv->assoc_rsp_buf) info->param.bss_info.assoc_id = - (t_u16) ((IEEEtypes_AssocRsp_t *) pmpriv-> - assoc_rsp_buf)->a_id; + (t_u16)((IEEEtypes_AssocRsp_t *)pmpriv->assoc_rsp_buf)-> + a_id; else info->param.bss_info.assoc_id = 0; @@ -281,7 +285,6 @@ wlan_get_info_bss_info(IN pmlan_adapter pmadapter, pbss_desc->supported_rates, MIN(sizeof(info->param.bss_info.peer_supp_rates), sizeof(pbss_desc->supported_rates))); - pioctl_req->data_read_written = sizeof(mlan_bss_info) + MLAN_SUB_COMMAND_SIZE; @@ -306,7 +309,7 @@ wlan_get_info_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) ENTER(); - pget_info = (mlan_ds_get_info *) pioctl_req->pbuf; + pget_info = (mlan_ds_get_info *)pioctl_req->pbuf; switch (pget_info->sub_command) { case MLAN_OID_GET_STATS: @@ -377,7 +380,7 @@ wlan_snmp_mib_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) goto exit; } - mib = (mlan_ds_snmp_mib *) pioctl_req->pbuf; + mib = (mlan_ds_snmp_mib *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) cmd_action = HostCmd_ACT_GEN_SET; else @@ -406,7 +409,7 @@ wlan_snmp_mib_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_SNMP_MIB, cmd_action, - cmd_oid, (t_void *) pioctl_req, &value); + cmd_oid, (t_void *)pioctl_req, &value); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -437,10 +440,10 @@ wlan_radio_ioctl_band_cfg(IN pmlan_adapter pmadapter, ENTER(); - radio_cfg = (mlan_ds_radio_cfg *) pioctl_req->pbuf; + radio_cfg = (mlan_ds_radio_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) { - infra_band = (t_u8) radio_cfg->param.band_cfg.config_bands; - adhoc_band = (t_u8) radio_cfg->param.band_cfg.adhoc_start_band; + infra_band = (t_u8)radio_cfg->param.band_cfg.config_bands; + adhoc_band = (t_u8)radio_cfg->param.band_cfg.adhoc_start_band; adhoc_channel = radio_cfg->param.band_cfg.adhoc_channel; /* SET Infra band */ @@ -468,7 +471,7 @@ wlan_radio_ioctl_band_cfg(IN pmlan_adapter pmadapter, global_band |= infra_band; if (wlan_set_regiontable - (pmpriv, (t_u8) pmadapter->region_code, + (pmpriv, (t_u8)pmadapter->region_code, global_band | adhoc_band)) { pioctl_req->status_code = MLAN_ERROR_IOCTL_FAIL; LEAVE(); @@ -485,11 +488,12 @@ wlan_radio_ioctl_band_cfg(IN pmlan_adapter pmadapter, pmadapter->config_bands = global_band; pmadapter->adhoc_start_band = adhoc_band; + pmpriv->intf_state_11h.adhoc_auto_sel_chan = MFALSE; pmadapter->chan_bandwidth = - (t_u8) radio_cfg->param.band_cfg.sec_chan_offset; + (t_u8)radio_cfg->param.band_cfg.sec_chan_offset; /* - * If no adhoc_channel is supplied verify if the existing adhoc channel - * compiles with new adhoc_band + * If no adhoc_channel is supplied verify if the existing + * adhoc channel compiles with new adhoc_band */ if (!adhoc_channel) { if (!wlan_find_cfp_by_band_and_channel @@ -498,22 +502,30 @@ wlan_radio_ioctl_band_cfg(IN pmlan_adapter pmadapter, /* Pass back the default channel */ radio_cfg->param.band_cfg.adhoc_channel = DEFAULT_AD_HOC_CHANNEL; + if ((pmadapter->adhoc_start_band & BAND_A) + || (pmadapter->adhoc_start_band & BAND_AN) + ) { + radio_cfg->param.band_cfg. + adhoc_channel = + DEFAULT_AD_HOC_CHANNEL_A; + } } } else { /* Return error if adhoc_band and adhoc_channel combination is invalid */ if (!wlan_find_cfp_by_band_and_channel (pmadapter, pmadapter->adhoc_start_band, - (t_u16) adhoc_channel)) { + (t_u16)adhoc_channel)) { pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; LEAVE(); return MLAN_STATUS_FAILURE; } - pmpriv->adhoc_channel = (t_u8) adhoc_channel; + pmpriv->adhoc_channel = (t_u8)adhoc_channel; } if ((adhoc_band & BAND_GN) + || (adhoc_band & BAND_AN) ) { pmadapter->adhoc_11n_enabled = MTRUE; } else { @@ -566,7 +578,7 @@ wlan_radio_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) LEAVE(); return MLAN_STATUS_RESOURCE; } - radio_cfg = (mlan_ds_radio_cfg *) pioctl_req->pbuf; + radio_cfg = (mlan_ds_radio_cfg *)pioctl_req->pbuf; switch (radio_cfg->sub_command) { case MLAN_OID_RADIO_CTRL: status = wlan_radio_ioctl_radio_ctl(pmadapter, pioctl_req); @@ -609,7 +621,7 @@ wlan_bss_ioctl_mac_address(IN pmlan_adapter pmadapter, mlan_ds_bss *bss = MNULL; mlan_status ret = MLAN_STATUS_SUCCESS; ENTER(); - bss = (mlan_ds_bss *) pioctl_req->pbuf; + bss = (mlan_ds_bss *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) { pioctl_req->data_read_written = MLAN_MAC_ADDR_LENGTH + MLAN_SUB_COMMAND_SIZE; @@ -626,7 +638,7 @@ wlan_bss_ioctl_mac_address(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_MAC_ADDRESS, HostCmd_ACT_GEN_SET, - 0, (t_void *) pioctl_req, MNULL); + 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; exit: @@ -654,7 +666,7 @@ wlan_bss_ioctl_set_multicast_list(IN pmlan_adapter pmadapter, ENTER(); old_pkt_filter = pmpriv->curr_pkt_filter; - bss = (mlan_ds_bss *) pioctl_req->pbuf; + bss = (mlan_ds_bss *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) { pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; ret = MLAN_STATUS_FAILURE; @@ -715,7 +727,7 @@ wlan_bss_ioctl_set_multicast_list(IN pmlan_adapter pmadapter, HostCmd_CMD_MAC_CONTROL, HostCmd_ACT_GEN_SET, 0, - (t_void *) pioctl_req, + (t_void *)pioctl_req, &pmpriv->curr_pkt_filter); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -746,7 +758,7 @@ wlan_bss_ioctl_get_channel_list(IN pmlan_adapter pmadapter, ENTER(); - bss = (mlan_ds_bss *) pioctl_req->pbuf; + bss = (mlan_ds_bss *)pioctl_req->pbuf; if (pioctl_req->action != MLAN_ACT_GET) { pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; LEAVE(); @@ -776,7 +788,7 @@ wlan_bss_ioctl_get_channel_list(IN pmlan_adapter pmadapter, if (wlan_11d_parse_domain_info (pmadapter, &pbss_desc->country_info, - (t_u8) pbss_desc->bss_band, + (t_u8)pbss_desc->bss_band, ®ion_chan) == MLAN_STATUS_SUCCESS) { parsed_region_chan = ®ion_chan; @@ -794,11 +806,11 @@ wlan_bss_ioctl_get_channel_list(IN pmlan_adapter pmadapter, band = parsed_region_chan->chan_pwr[i].band; PRINTM(MINFO, "band=%d, chan_no=%d\n", band, chan_no); bss->param.chanlist.cf[bss->param.chanlist.num_of_chan]. - channel = (t_u32) chan_no; + channel = (t_u32)chan_no; bss->param.chanlist.cf[bss->param.chanlist.num_of_chan]. freq = - (t_u32) wlan_11d_chan_2_freq(pmadapter, chan_no, - band); + (t_u32)wlan_11d_chan_2_freq(pmadapter, chan_no, + band); bss->param.chanlist.num_of_chan++; } } else { @@ -813,10 +825,10 @@ wlan_bss_ioctl_get_channel_list(IN pmlan_adapter pmadapter, (i < pmadapter->region_channel[j].num_cfp); i++) { bss->param.chanlist.cf[bss->param.chanlist. num_of_chan].channel = - (t_u32) cfp->channel; + (t_u32)cfp->channel; bss->param.chanlist.cf[bss->param.chanlist. num_of_chan].freq = - (t_u32) cfp->freq; + (t_u32)cfp->freq; bss->param.chanlist.num_of_chan++; cfp++; } @@ -859,12 +871,12 @@ wlan_bss_ioctl_channel(IN pmlan_adapter pmadapter, return MLAN_STATUS_FAILURE; } pmpriv = pmadapter->priv[pioctl_req->bss_index]; - bss = (mlan_ds_bss *) pioctl_req->pbuf; + bss = (mlan_ds_bss *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) { cfp = wlan_find_cfp_by_band_and_channel(pmadapter, pmpriv->curr_bss_params. band, - (t_u16) pmpriv-> + (t_u16)pmpriv-> curr_bss_params. bss_descriptor.channel); if (cfp) { @@ -884,18 +896,48 @@ wlan_bss_ioctl_channel(IN pmlan_adapter pmadapter, LEAVE(); return MLAN_STATUS_FAILURE; } + if (pmadapter->adhoc_start_band & BAND_AN) + pmadapter->adhoc_start_band = BAND_G | BAND_B | BAND_GN; + else if (pmadapter->adhoc_start_band & BAND_A) + pmadapter->adhoc_start_band = BAND_G | BAND_B; if (bss->param.bss_chan.channel) { if (bss->param.bss_chan.channel <= MAX_CHANNEL_BAND_B) cfp = wlan_find_cfp_by_band_and_channel(pmadapter, BAND_B, - (t_u16) bss-> + (t_u16)bss-> param.bss_chan. channel); + if (!cfp) { + cfp = wlan_find_cfp_by_band_and_channel(pmadapter, + BAND_A, + (t_u16)bss-> + param.bss_chan. + channel); + if (cfp) { + if (pmadapter->adhoc_11n_enabled) + pmadapter->adhoc_start_band = + BAND_A | BAND_AN; + else + pmadapter->adhoc_start_band = BAND_A; + } + } } else { if (bss->param.bss_chan.freq <= MAX_FREQUENCY_BAND_B) cfp = wlan_find_cfp_by_band_and_freq(pmadapter, BAND_B, bss->param. bss_chan.freq); + if (!cfp) { + cfp = wlan_find_cfp_by_band_and_freq(pmadapter, BAND_A, + bss->param. + bss_chan.freq); + if (cfp) { + if (pmadapter->adhoc_11n_enabled) + pmadapter->adhoc_start_band = + BAND_A | BAND_AN; + else + pmadapter->adhoc_start_band = BAND_A; + } + } } if (!cfp || !cfp->channel) { PRINTM(MERROR, "Invalid channel/freq\n"); @@ -905,7 +947,8 @@ wlan_bss_ioctl_channel(IN pmlan_adapter pmadapter, return MLAN_STATUS_FAILURE; } - pmpriv->adhoc_channel = (t_u8) cfp->channel; + pmpriv->adhoc_channel = (t_u8)cfp->channel; + pmpriv->intf_state_11h.adhoc_auto_sel_chan = MFALSE; bss->param.bss_chan.channel = cfp->channel; bss->param.bss_chan.freq = cfp->freq; @@ -927,7 +970,7 @@ wlan_bss_ioctl_mode(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; mlan_ds_bss *bss = MNULL; mlan_status ret = MLAN_STATUS_SUCCESS; - bss = (mlan_ds_bss *) pioctl_req->pbuf; + bss = (mlan_ds_bss *)pioctl_req->pbuf; ENTER(); @@ -964,7 +1007,7 @@ wlan_bss_ioctl_mode(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_SET_BSS_MODE, HostCmd_ACT_GEN_SET, - 0, (t_void *) pioctl_req, MNULL); + 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; } @@ -986,7 +1029,7 @@ wlan_bss_ioctl_start(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; - mlan_ds_bss *bss = (mlan_ds_bss *) pioctl_req->pbuf; + mlan_ds_bss *bss = (mlan_ds_bss *)pioctl_req->pbuf; t_s32 i = -1; t_u8 zero_mac[] = { 0, 0, 0, 0, 0, 0 }; @@ -1013,8 +1056,8 @@ wlan_bss_ioctl_start(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) &bss->param. ssid_bssid. ssid, - (t_u8 *) & - bss->param. + (t_u8 *) + &bss->param. ssid_bssid. bssid, MLAN_BSS_MODE_INFRA); @@ -1026,9 +1069,8 @@ wlan_bss_ioctl_start(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) MLAN_BSS_MODE_INFRA); } else { i = wlan_find_bssid_in_list(pmpriv, - (t_u8 *) & bss-> - param.ssid_bssid. - bssid, + (t_u8 *)&bss->param. + ssid_bssid.bssid, MLAN_BSS_MODE_INFRA); } } else { @@ -1039,6 +1081,18 @@ wlan_bss_ioctl_start(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) pmpriv->bss_mode); } if (i >= 0) { + /* block if upper-layer tries to reconnect before new + scan */ + if (wlan_11h_get_csa_closed_channel(pmpriv) == + (t_u8)pmadapter->pscan_table[i].channel) { + PRINTM(MINFO, + "Attempt to reconnect on csa_closed_chan(%d)\n", + pmadapter->pscan_table[i].channel); + pioctl_req->status_code = + MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto start_ssid_done; + } PRINTM(MINFO, "SSID found in scan list ... associating...\n"); @@ -1089,9 +1143,8 @@ wlan_bss_ioctl_start(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) MLAN_BSS_MODE_IBSS); } else { i = wlan_find_bssid_in_list(pmpriv, - (t_u8 *) & bss-> - param.ssid_bssid. - bssid, + (t_u8 *)&bss->param. + ssid_bssid.bssid, MLAN_BSS_MODE_IBSS); } } else { @@ -1145,7 +1198,7 @@ wlan_bss_ioctl_stop(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) { mlan_status ret = MLAN_STATUS_SUCCESS; pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; - mlan_ds_bss *bss = (mlan_ds_bss *) pioctl_req->pbuf; + mlan_ds_bss *bss = (mlan_ds_bss *)pioctl_req->pbuf; ENTER(); @@ -1174,7 +1227,7 @@ wlan_bss_ioctl_ibss_channel(IN pmlan_adapter pmadapter, ENTER(); - bss = (mlan_ds_bss *) pioctl_req->pbuf; + bss = (mlan_ds_bss *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) { if (pmpriv->media_connected == MFALSE) { bss->param.bss_chan.channel = pmpriv->adhoc_channel; @@ -1183,7 +1236,8 @@ wlan_bss_ioctl_ibss_channel(IN pmlan_adapter pmadapter, cmd_action = HostCmd_ACT_GEN_GET; } else { cmd_action = HostCmd_ACT_GEN_SET; - pmpriv->adhoc_channel = (t_u8) bss->param.bss_chan.channel; + pmpriv->adhoc_channel = (t_u8)bss->param.bss_chan.channel; + pmpriv->intf_state_11h.adhoc_auto_sel_chan = MFALSE; } /* Send request to firmware */ @@ -1191,7 +1245,7 @@ wlan_bss_ioctl_ibss_channel(IN pmlan_adapter pmadapter, HostCmd_CMD_802_11_RF_CHANNEL, cmd_action, 0, - (t_void *) pioctl_req, + (t_void *)pioctl_req, &bss->param.bss_chan.channel); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -1218,7 +1272,7 @@ wlan_bss_ioctl_listen_interval(IN pmlan_adapter pmadapter, ENTER(); - bss = (mlan_ds_bss *) pioctl_req->pbuf; + bss = (mlan_ds_bss *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) bss->param.listen_interval = pmpriv->listen_interval; else @@ -1244,7 +1298,7 @@ wlan_bss_ioctl_beacon_interval(IN pmlan_adapter pmadapter, mlan_ds_bss *bss = MNULL; mlan_status ret = MLAN_STATUS_SUCCESS; ENTER(); - bss = (mlan_ds_bss *) pioctl_req->pbuf; + bss = (mlan_ds_bss *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) { bss->param.bcn_interval = pmpriv->beacon_period; if (pmpriv->media_connected == MTRUE) @@ -1252,7 +1306,7 @@ wlan_bss_ioctl_beacon_interval(IN pmlan_adapter pmadapter, pmpriv->curr_bss_params.bss_descriptor. beacon_period; } else - pmpriv->beacon_period = (t_u16) bss->param.bcn_interval; + pmpriv->beacon_period = (t_u16)bss->param.bcn_interval; pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; LEAVE(); return ret; @@ -1274,7 +1328,7 @@ wlan_bss_ioctl_atim_window(IN pmlan_adapter pmadapter, mlan_ds_bss *bss = MNULL; mlan_status ret = MLAN_STATUS_SUCCESS; ENTER(); - bss = (mlan_ds_bss *) pioctl_req->pbuf; + bss = (mlan_ds_bss *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) { bss->param.atim_window = pmpriv->atim_window; if (pmpriv->media_connected == MTRUE) @@ -1282,13 +1336,64 @@ wlan_bss_ioctl_atim_window(IN pmlan_adapter pmadapter, pmpriv->curr_bss_params.bss_descriptor. atim_window; } else - pmpriv->atim_window = (t_u16) bss->param.atim_window; + pmpriv->atim_window = (t_u16)bss->param.atim_window; pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; LEAVE(); return ret; } +/** + * @brief Query embe + * + * @param priv A pointer to mlan_private structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +static mlan_status +wlan_query_passphrase(mlan_private *priv, pmlan_ioctl_req pioctl_req) +{ + mlan_adapter *pmadapter = priv->adapter; + mlan_ds_bss *bss = MNULL; + mlan_ssid_bssid *ssid_bssid = MNULL; + mlan_ds_passphrase sec_pp; + int i = 0; + BSSDescriptor_t *pbss_desc; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + bss = (mlan_ds_bss *)pioctl_req->pbuf; + ssid_bssid = &bss->param.ssid_bssid; + + memset(pmadapter, &sec_pp, 0, sizeof(mlan_ds_passphrase)); + sec_pp.psk_type = MLAN_PSK_QUERY; + if (ssid_bssid->ssid.ssid_len == 0) { + i = wlan_find_bssid_in_list(priv, (t_u8 *)&ssid_bssid->bssid, + MLAN_BSS_MODE_AUTO); + if (i >= 0) { + pbss_desc = &pmadapter->pscan_table[i]; + memcpy(pmadapter, &sec_pp.ssid, &pbss_desc->ssid, + sizeof(mlan_802_11_ssid)); + } else + memcpy(pmadapter, &sec_pp.bssid, &ssid_bssid->bssid, + MLAN_MAC_ADDR_LENGTH); + } else { + memcpy(pmadapter, &sec_pp.ssid, &ssid_bssid->ssid, + sizeof(mlan_802_11_ssid)); + } + + /* Send request to firmware */ + ret = wlan_prepare_cmd(priv, + HostCmd_CMD_SUPPLICANT_PMK, + HostCmd_ACT_GEN_GET, + 0, (t_void *)pioctl_req, &sec_pp); + + LEAVE(); + return ret; +} + /** * @brief Search for a BSS * @@ -1303,9 +1408,30 @@ wlan_bss_ioctl_find_bss(IN pmlan_adapter pmadapter, { mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; mlan_status ret = MLAN_STATUS_SUCCESS; +#ifdef DRV_EMBEDDED_SUPPLICANT + mlan_ds_bss *bss = MNULL; + mlan_ssid_bssid *ssid_bssid = MNULL; +#endif ENTER(); + if (pmpriv->ewpa_query) { + if (wlan_query_passphrase(pmpriv, pioctl_req) == + MLAN_STATUS_SUCCESS) { + PRINTM(MINFO, "Find BSS ioctl: query passphrase\n"); + LEAVE(); + return MLAN_STATUS_PENDING; + } + } +#ifdef DRV_EMBEDDED_SUPPLICANT + if (pmpriv->adapter->psdio_device->driver_supplicant_auth) { + bss = (mlan_ds_bss *)pioctl_req->pbuf; + ssid_bssid = &bss->param.ssid_bssid; + supplicantQueryPassphraseAndEnable(pmpriv->psapriv, + (t_u8 *)ssid_bssid); + } +#endif + ret = wlan_find_bss(pmpriv, pioctl_req); LEAVE(); @@ -1337,7 +1463,7 @@ wlan_bss_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) return MLAN_STATUS_RESOURCE; } - bss = (mlan_ds_bss *) pioctl_req->pbuf; + bss = (mlan_ds_bss *)pioctl_req->pbuf; switch (bss->sub_command) { case MLAN_OID_BSS_START: @@ -1421,7 +1547,7 @@ wlan_rate_ioctl_get_supported_rate(IN pmlan_adapter pmadapter, LEAVE(); return MLAN_STATUS_FAILURE; } - rate = (mlan_ds_rate *) pioctl_req->pbuf; + rate = (mlan_ds_rate *)pioctl_req->pbuf; if (rate->param.rate_band_cfg.config_bands && rate->param.rate_band_cfg.bss_mode) wlan_get_active_data_rates(pmpriv, @@ -1464,7 +1590,7 @@ wlan_rate_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) LEAVE(); return MLAN_STATUS_RESOURCE; } - rate = (mlan_ds_rate *) pioctl_req->pbuf; + rate = (mlan_ds_rate *)pioctl_req->pbuf; switch (rate->sub_command) { case MLAN_OID_RATE_CFG: status = wlan_rate_ioctl_cfg(pmadapter, pioctl_req); @@ -1507,7 +1633,7 @@ wlan_power_ioctl_get_power(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, cmd_no, HostCmd_ACT_GEN_GET, - 0, (t_void *) pioctl_req, MNULL); + 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -1541,9 +1667,9 @@ wlan_power_ioctl_set_power(IN pmlan_adapter pmadapter, ENTER(); - power = (mlan_ds_power_cfg *) pioctl_req->pbuf; + power = (mlan_ds_power_cfg *)pioctl_req->pbuf; if (!power->param.power_cfg.is_power_auto) { - dbm = (t_s8) power->param.power_cfg.power_level; + dbm = (t_s8)power->param.power_cfg.power_level; if ((dbm < pmpriv->min_tx_power_level) || (dbm > pmpriv->max_tx_power_level)) { PRINTM(MERROR, @@ -1566,40 +1692,40 @@ wlan_power_ioctl_set_power(IN pmlan_adapter pmadapter, goto exit; } memset(pmadapter, buf, 0, MRVDRV_SIZE_OF_CMD_BUFFER); - txp_cfg = (HostCmd_DS_TXPWR_CFG *) buf; + txp_cfg = (HostCmd_DS_TXPWR_CFG *)buf; txp_cfg->action = HostCmd_ACT_GEN_SET; if (!power->param.power_cfg.is_power_auto) { txp_cfg->mode = 1; - pg_tlv = (MrvlTypes_Power_Group_t *) (buf + - sizeof - (HostCmd_DS_TXPWR_CFG)); + pg_tlv = (MrvlTypes_Power_Group_t *)(buf + + sizeof + (HostCmd_DS_TXPWR_CFG)); pg_tlv->type = TLV_TYPE_POWER_GROUP; pg_tlv->length = 4 * sizeof(Power_Group_t); - pg = (Power_Group_t *) (buf + sizeof(HostCmd_DS_TXPWR_CFG) + - sizeof(MrvlTypes_Power_Group_t)); + pg = (Power_Group_t *)(buf + sizeof(HostCmd_DS_TXPWR_CFG) + + sizeof(MrvlTypes_Power_Group_t)); /* Power group for modulation class HR/DSSS */ pg->first_rate_code = 0x00; pg->last_rate_code = 0x03; pg->modulation_class = MOD_CLASS_HR_DSSS; pg->power_step = 0; - pg->power_min = (t_s8) dbm; - pg->power_max = (t_s8) dbm; + pg->power_min = (t_s8)dbm; + pg->power_max = (t_s8)dbm; pg++; /* Power group for modulation class OFDM */ pg->first_rate_code = 0x00; pg->last_rate_code = 0x07; pg->modulation_class = MOD_CLASS_OFDM; pg->power_step = 0; - pg->power_min = (t_s8) dbm; - pg->power_max = (t_s8) dbm; + pg->power_min = (t_s8)dbm; + pg->power_max = (t_s8)dbm; pg++; /* Power group for modulation class HTBW20 */ pg->first_rate_code = 0x00; pg->last_rate_code = 0x20; pg->modulation_class = MOD_CLASS_HT; pg->power_step = 0; - pg->power_min = (t_s8) dbm; - pg->power_max = (t_s8) dbm; + pg->power_min = (t_s8)dbm; + pg->power_max = (t_s8)dbm; pg->ht_bandwidth = HT_BW_20; pg++; /* Power group for modulation class HTBW40 */ @@ -1607,8 +1733,8 @@ wlan_power_ioctl_set_power(IN pmlan_adapter pmadapter, pg->last_rate_code = 0x20; pg->modulation_class = MOD_CLASS_HT; pg->power_step = 0; - pg->power_min = (t_s8) dbm; - pg->power_max = (t_s8) dbm; + pg->power_min = (t_s8)dbm; + pg->power_max = (t_s8)dbm; pg->ht_bandwidth = HT_BW_40; } @@ -1616,7 +1742,7 @@ wlan_power_ioctl_set_power(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_TXPWR_CFG, HostCmd_ACT_GEN_SET, - 0, (t_void *) pioctl_req, buf); + 0, (t_void *)pioctl_req, buf); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -1686,7 +1812,7 @@ wlan_power_ioctl_set_power_ext(IN pmlan_adapter pmadapter, ENTER(); - power = (mlan_ds_power_cfg *) pioctl_req->pbuf; + power = (mlan_ds_power_cfg *)pioctl_req->pbuf; ret = pcb->moal_malloc(pmadapter->pmoal_handle, MRVDRV_SIZE_OF_CMD_BUFFER, MLAN_MEM_DEF, &buf); if (ret != MLAN_STATUS_SUCCESS || buf == MNULL) { @@ -1697,10 +1823,10 @@ wlan_power_ioctl_set_power_ext(IN pmlan_adapter pmadapter, goto exit; } memset(pmadapter, buf, 0, MRVDRV_SIZE_OF_CMD_BUFFER); - txp_cfg = (HostCmd_DS_TXPWR_CFG *) buf; + txp_cfg = (HostCmd_DS_TXPWR_CFG *)buf; txp_cfg->action = HostCmd_ACT_GEN_SET; - memcpy(pmadapter, (t_u8 *) & data, - (t_u8 *) power->param.power_ext.power_data, sizeof(data)); + memcpy(pmadapter, (t_u8 *)&data, + (t_u8 *)power->param.power_ext.power_data, sizeof(data)); switch (power->param.power_ext.len) { case 1: if (data[0] == 0xFF) @@ -1726,33 +1852,33 @@ wlan_power_ioctl_set_power_ext(IN pmlan_adapter pmadapter, break; } txp_cfg->mode = 1; - pg_tlv = (MrvlTypes_Power_Group_t *) (buf + - sizeof - (HostCmd_DS_TXPWR_CFG)); + pg_tlv = (MrvlTypes_Power_Group_t *)(buf + + sizeof + (HostCmd_DS_TXPWR_CFG)); pg_tlv->type = TLV_TYPE_POWER_GROUP; pg_tlv->length = sizeof(Power_Group_t); - pg = (Power_Group_t *) (buf + sizeof(HostCmd_DS_TXPWR_CFG) + - sizeof(MrvlTypes_Power_Group_t)); - pg->modulation_class = (t_u8) mod_class; - pg->first_rate_code = (t_u8) data[0]; - pg->last_rate_code = (t_u8) data[0]; + pg = (Power_Group_t *)(buf + sizeof(HostCmd_DS_TXPWR_CFG) + + sizeof(MrvlTypes_Power_Group_t)); + pg->modulation_class = (t_u8)mod_class; + pg->first_rate_code = (t_u8)data[0]; + pg->last_rate_code = (t_u8)data[0]; if (mod_class == MOD_CLASS_OFDM) { pg->first_rate_code = - (t_u8) (data[0] - MLAN_RATE_INDEX_OFDM0); + (t_u8)(data[0] - MLAN_RATE_INDEX_OFDM0); pg->last_rate_code = - (t_u8) (data[0] - MLAN_RATE_INDEX_OFDM0); + (t_u8)(data[0] - MLAN_RATE_INDEX_OFDM0); } else if (mod_class == MOD_CLASS_HT) { pg->first_rate_code = - (t_u8) (data[0] - MLAN_RATE_INDEX_MCS0); + (t_u8)(data[0] - MLAN_RATE_INDEX_MCS0); pg->last_rate_code = - (t_u8) (data[0] - MLAN_RATE_INDEX_MCS0); + (t_u8)(data[0] - MLAN_RATE_INDEX_MCS0); pg->ht_bandwidth = ht_bw; } - pg->power_min = (t_s8) data[1]; - pg->power_max = (t_s8) data[1]; + pg->power_min = (t_s8)data[1]; + pg->power_max = (t_s8)data[1]; if (power->param.power_ext.len == 4) { - pg->power_max = (t_s8) data[2]; - pg->power_step = (t_s8) data[3]; + pg->power_max = (t_s8)data[2]; + pg->power_step = (t_s8)data[3]; } break; default: @@ -1770,7 +1896,7 @@ wlan_power_ioctl_set_power_ext(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_TXPWR_CFG, HostCmd_ACT_GEN_SET, - 0, (t_void *) pioctl_req, buf); + 0, (t_void *)pioctl_req, buf); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; if (buf) @@ -1805,7 +1931,7 @@ wlan_power_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) LEAVE(); return MLAN_STATUS_RESOURCE; } - power = (mlan_ds_power_cfg *) pioctl_req->pbuf; + power = (mlan_ds_power_cfg *)pioctl_req->pbuf; switch (power->sub_command) { case MLAN_OID_POWER_CFG: if (pioctl_req->action == MLAN_ACT_GET) @@ -1859,7 +1985,7 @@ wlan_pm_ioctl_ps_mode(IN pmlan_adapter pmadapter, EN_AUTO_PS : DIS_AUTO_PS; ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_PS_MODE_ENH, sub_cmd, - BITMAP_STA_PS, (t_void *) pioctl_req, + BITMAP_STA_PS, (t_void *)pioctl_req, MNULL); if ((ret == MLAN_STATUS_SUCCESS) && (sub_cmd == DIS_AUTO_PS)) { ret = wlan_prepare_cmd(pmpriv, @@ -1869,7 +1995,7 @@ wlan_pm_ioctl_ps_mode(IN pmlan_adapter pmadapter, } else { ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_PS_MODE_ENH, GET_PS, - 0, (t_void *) pioctl_req, MNULL); + 0, (t_void *)pioctl_req, MNULL); } if (ret == MLAN_STATUS_SUCCESS) @@ -1898,7 +2024,7 @@ wlan_pm_ioctl_inactivity_timeout(IN pmlan_adapter pmadapter, ENTER(); - pmcfg = (mlan_ds_pm_cfg *) pioctl_req->pbuf; + pmcfg = (mlan_ds_pm_cfg *)pioctl_req->pbuf; cmd_action = HostCmd_ACT_GEN_GET; if (pioctl_req->action == MLAN_ACT_SET) cmd_action = HostCmd_ACT_GEN_SET; @@ -1906,8 +2032,8 @@ wlan_pm_ioctl_inactivity_timeout(IN pmlan_adapter pmadapter, /* Send request to firmware */ ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_INACTIVITY_TIMEOUT_EXT, - cmd_action, 0, (t_void *) pioctl_req, - (t_void *) & pmcfg->param.inactivity_to); + cmd_action, 0, (t_void *)pioctl_req, + (t_void *)&pmcfg->param.inactivity_to); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -1930,13 +2056,13 @@ wlan_set_auto_deep_sleep(IN pmlan_adapter pmadapter, { mlan_status ret = MLAN_STATUS_SUCCESS; pmlan_private pmpriv = - (pmlan_private) pmadapter->priv[pioctl_req->bss_index]; + (pmlan_private)pmadapter->priv[pioctl_req->bss_index]; mlan_ds_auto_ds auto_ds; t_u32 mode; ENTER(); - if (((mlan_ds_pm_cfg *) pioctl_req->pbuf)->param.auto_deep_sleep. + if (((mlan_ds_pm_cfg *)pioctl_req->pbuf)->param.auto_deep_sleep. auto_ds == DEEP_SLEEP_ON) { auto_ds.auto_ds = DEEP_SLEEP_ON; PRINTM(MINFO, "Auto Deep Sleep: on\n"); @@ -1946,10 +2072,10 @@ wlan_set_auto_deep_sleep(IN pmlan_adapter pmadapter, PRINTM(MINFO, "Auto Deep Sleep: off\n"); mode = DIS_AUTO_PS; } - if (((mlan_ds_pm_cfg *) pioctl_req->pbuf)->param.auto_deep_sleep. + if (((mlan_ds_pm_cfg *)pioctl_req->pbuf)->param.auto_deep_sleep. idletime) auto_ds.idletime = - ((mlan_ds_pm_cfg *) pioctl_req->pbuf)->param. + ((mlan_ds_pm_cfg *)pioctl_req->pbuf)->param. auto_deep_sleep.idletime; else auto_ds.idletime = pmadapter->idle_time; @@ -1957,8 +2083,8 @@ wlan_set_auto_deep_sleep(IN pmlan_adapter pmadapter, command in progress. */ ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_PS_MODE_ENH, - (t_u16) mode, - BITMAP_AUTO_DS, (t_void *) pioctl_req, &auto_ds); + (t_u16)mode, + BITMAP_AUTO_DS, (t_void *)pioctl_req, &auto_ds); if (ret) { LEAVE(); return ret; @@ -1986,15 +2112,15 @@ wlan_set_get_sleep_pd(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) ENTER(); - pm_cfg = (mlan_ds_pm_cfg *) pioctl_req->pbuf; + pm_cfg = (mlan_ds_pm_cfg *)pioctl_req->pbuf; cmd_action = HostCmd_ACT_GEN_GET; if (pioctl_req->action == MLAN_ACT_SET) { cmd_action = HostCmd_ACT_GEN_SET; - sleep_pd = (t_u16) pm_cfg->param.sleep_period; + sleep_pd = (t_u16)pm_cfg->param.sleep_period; } ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_SLEEP_PERIOD, - cmd_action, 0, (t_void *) pioctl_req, &sleep_pd); + cmd_action, 0, (t_void *)pioctl_req, &sleep_pd); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -2018,69 +2144,69 @@ wlan_set_get_ps_cfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) ENTER(); - pm_cfg = (mlan_ds_pm_cfg *) pioctl_req->pbuf; + pm_cfg = (mlan_ds_pm_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) { pm_cfg->param.ps_cfg.ps_null_interval = - (t_u32) pmadapter->null_pkt_interval; + (t_u32)pmadapter->null_pkt_interval; pm_cfg->param.ps_cfg.multiple_dtim_interval = - (t_u32) pmadapter->multiple_dtim; + (t_u32)pmadapter->multiple_dtim; pm_cfg->param.ps_cfg.listen_interval = - (t_u32) pmadapter->local_listen_interval; + (t_u32)pmadapter->local_listen_interval; pm_cfg->param.ps_cfg.adhoc_awake_period = - (t_u32) pmadapter->adhoc_awake_period; + (t_u32)pmadapter->adhoc_awake_period; pm_cfg->param.ps_cfg.bcn_miss_timeout = - (t_u32) pmadapter->bcn_miss_time_out; + (t_u32)pmadapter->bcn_miss_time_out; pm_cfg->param.ps_cfg.delay_to_ps = - (t_u32) pmadapter->delay_to_ps; + (t_u32)pmadapter->delay_to_ps; pm_cfg->param.ps_cfg.ps_mode = - (t_u32) pmadapter->enhanced_ps_mode; + (t_u32)pmadapter->enhanced_ps_mode; } else { if (pm_cfg->param.ps_cfg.ps_null_interval) pmadapter->null_pkt_interval = - (t_u16) pm_cfg->param.ps_cfg.ps_null_interval; + (t_u16)pm_cfg->param.ps_cfg.ps_null_interval; else pm_cfg->param.ps_cfg.ps_null_interval = - (t_u32) pmadapter->null_pkt_interval; + (t_u32)pmadapter->null_pkt_interval; if (pm_cfg->param.ps_cfg.multiple_dtim_interval) pmadapter->multiple_dtim = - (t_u16) pm_cfg->param.ps_cfg. + (t_u16)pm_cfg->param.ps_cfg. multiple_dtim_interval; else pm_cfg->param.ps_cfg.multiple_dtim_interval = - (t_u32) pmadapter->multiple_dtim; - if (((t_s32) pm_cfg->param.ps_cfg.listen_interval) == + (t_u32)pmadapter->multiple_dtim; + if (((t_s32)pm_cfg->param.ps_cfg.listen_interval) == MRVDRV_LISTEN_INTERVAL_DISABLE) pmadapter->local_listen_interval = 0; else if (pm_cfg->param.ps_cfg.listen_interval) pmadapter->local_listen_interval = - (t_u16) pm_cfg->param.ps_cfg.listen_interval; + (t_u16)pm_cfg->param.ps_cfg.listen_interval; else pm_cfg->param.ps_cfg.listen_interval = - (t_u32) pmadapter->local_listen_interval; + (t_u32)pmadapter->local_listen_interval; if (pm_cfg->param.ps_cfg.adhoc_awake_period) pmadapter->adhoc_awake_period = - (t_u16) pm_cfg->param.ps_cfg.adhoc_awake_period; + (t_u16)pm_cfg->param.ps_cfg.adhoc_awake_period; else pm_cfg->param.ps_cfg.adhoc_awake_period = - (t_u32) pmadapter->adhoc_awake_period; + (t_u32)pmadapter->adhoc_awake_period; if (pm_cfg->param.ps_cfg.bcn_miss_timeout) pmadapter->bcn_miss_time_out = - (t_u16) pm_cfg->param.ps_cfg.bcn_miss_timeout; + (t_u16)pm_cfg->param.ps_cfg.bcn_miss_timeout; else pm_cfg->param.ps_cfg.bcn_miss_timeout = - (t_u32) pmadapter->bcn_miss_time_out; + (t_u32)pmadapter->bcn_miss_time_out; if (pm_cfg->param.ps_cfg.delay_to_ps != DELAY_TO_PS_UNCHANGED) pmadapter->delay_to_ps = - (t_u16) pm_cfg->param.ps_cfg.delay_to_ps; + (t_u16)pm_cfg->param.ps_cfg.delay_to_ps; else pm_cfg->param.ps_cfg.delay_to_ps = - (t_u32) pmadapter->delay_to_ps; + (t_u32)pmadapter->delay_to_ps; if (pm_cfg->param.ps_cfg.ps_mode) pmadapter->enhanced_ps_mode = - (t_u16) pm_cfg->param.ps_cfg.ps_mode; + (t_u16)pm_cfg->param.ps_cfg.ps_mode; else pm_cfg->param.ps_cfg.ps_mode = - (t_u32) pmadapter->enhanced_ps_mode; + (t_u32)pmadapter->enhanced_ps_mode; } pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; @@ -2107,14 +2233,14 @@ wlan_set_get_sleep_params(IN pmlan_adapter pmadapter, ENTER(); - pm_cfg = (mlan_ds_pm_cfg *) pioctl_req->pbuf; + pm_cfg = (mlan_ds_pm_cfg *)pioctl_req->pbuf; cmd_action = HostCmd_ACT_GEN_GET; if (pioctl_req->action == MLAN_ACT_SET) cmd_action = HostCmd_ACT_GEN_SET; /* Send command to firmware */ ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_SLEEP_PARAMS, - cmd_action, 0, (t_void *) pioctl_req, + cmd_action, 0, (t_void *)pioctl_req, &pm_cfg->param.sleep_params); if (ret == MLAN_STATUS_SUCCESS) @@ -2147,7 +2273,7 @@ wlan_pm_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) LEAVE(); return MLAN_STATUS_RESOURCE; } - pm = (mlan_ds_pm_cfg *) pioctl_req->pbuf; + pm = (mlan_ds_pm_cfg *)pioctl_req->pbuf; switch (pm->sub_command) { case MLAN_OID_PM_CFG_IEEE_PS: switch (pioctl_req->action) { @@ -2247,7 +2373,7 @@ wlan_pm_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) * @return MLAN_STATUS_SUCCESS --success, otherwise fail */ static mlan_status -wlan_set_wpa_ie_helper(mlan_private * priv, t_u8 * ie_data_ptr, t_u16 ie_len) +wlan_set_wpa_ie_helper(mlan_private *priv, t_u8 *ie_data_ptr, t_u16 ie_len) { ENTER(); @@ -2258,7 +2384,7 @@ wlan_set_wpa_ie_helper(mlan_private * priv, t_u8 * ie_data_ptr, t_u16 ie_len) return MLAN_STATUS_FAILURE; } memcpy(priv->adapter, priv->wpa_ie, ie_data_ptr, ie_len); - priv->wpa_ie_len = (t_u8) ie_len; + priv->wpa_ie_len = (t_u8)ie_len; PRINTM(MIOCTL, "Set Wpa_ie_len=%d IE=%#x\n", priv->wpa_ie_len, priv->wpa_ie[0]); DBG_HEXDUMP(MCMD_D, "Wpa_ie", priv->wpa_ie, priv->wpa_ie_len); @@ -2283,6 +2409,43 @@ wlan_set_wpa_ie_helper(mlan_private * priv, t_u8 * ie_data_ptr, t_u16 ie_len) return MLAN_STATUS_SUCCESS; } +/** + * @brief Set OSEN IE + * + * @param priv A pointer to mlan_private structure + * @param ie_data_ptr A pointer to IE + * @param ie_len Length of the IE + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_set_osen_ie(mlan_private *priv, t_u8 *ie_data_ptr, t_u16 ie_len) +{ + ENTER(); + if (ie_len) { + if (ie_len > sizeof(priv->osen_ie)) { + PRINTM(MWARN, "failed to copy, WAPI IE is too big\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + memcpy(priv->adapter, priv->osen_ie, ie_data_ptr, ie_len); + priv->osen_ie_len = (t_u8)ie_len; + PRINTM(MIOCTL, "Set osen_ie_len=%d IE=%#x\n", priv->osen_ie_len, + priv->osen_ie[0]); + DBG_HEXDUMP(MCMD_D, "osen_ie", priv->osen_ie, + priv->osen_ie_len); + priv->sec_info.osen_enabled = MTRUE; + } else { + memset(priv->adapter, priv->osen_ie, 0, sizeof(priv->osen_ie)); + priv->osen_ie_len = (t_u8)ie_len; + PRINTM(MINFO, "Reset osen_ie_len=%d IE=%#x\n", + priv->osen_ie_len, priv->osen_ie[0]); + priv->sec_info.osen_enabled = MFALSE; + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + /** * @brief Set WAPI IE * @@ -2293,7 +2456,7 @@ wlan_set_wpa_ie_helper(mlan_private * priv, t_u8 * ie_data_ptr, t_u16 ie_len) * @return MLAN_STATUS_SUCCESS --success, otherwise fail */ static mlan_status -wlan_set_wapi_ie(mlan_private * priv, t_u8 * ie_data_ptr, t_u16 ie_len) +wlan_set_wapi_ie(mlan_private *priv, t_u8 *ie_data_ptr, t_u16 ie_len) { ENTER(); if (ie_len) { @@ -2303,7 +2466,7 @@ wlan_set_wapi_ie(mlan_private * priv, t_u8 * ie_data_ptr, t_u16 ie_len) return MLAN_STATUS_FAILURE; } memcpy(priv->adapter, priv->wapi_ie, ie_data_ptr, ie_len); - priv->wapi_ie_len = (t_u8) ie_len; + priv->wapi_ie_len = (t_u8)ie_len; PRINTM(MIOCTL, "Set wapi_ie_len=%d IE=%#x\n", priv->wapi_ie_len, priv->wapi_ie[0]); DBG_HEXDUMP(MCMD_D, "wapi_ie", priv->wapi_ie, @@ -2312,7 +2475,7 @@ wlan_set_wapi_ie(mlan_private * priv, t_u8 * ie_data_ptr, t_u16 ie_len) priv->sec_info.wapi_enabled = MTRUE; } else { memset(priv->adapter, priv->wapi_ie, 0, sizeof(priv->wapi_ie)); - priv->wapi_ie_len = (t_u8) ie_len; + priv->wapi_ie_len = (t_u8)ie_len; PRINTM(MINFO, "Reset wapi_ie_len=%d IE=%#x\n", priv->wapi_ie_len, priv->wapi_ie[0]); priv->sec_info.wapi_enabled = MFALSE; @@ -2337,7 +2500,7 @@ wlan_sec_ioctl_wapi_enable(IN pmlan_adapter pmadapter, mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; mlan_ds_sec_cfg *sec = MNULL; ENTER(); - sec = (mlan_ds_sec_cfg *) pioctl_req->pbuf; + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) { if (pmpriv->wapi_ie_len) sec->param.wapi_enabled = MTRUE; @@ -2369,12 +2532,12 @@ wlan_sec_ioctl_set_wapi_key(IN pmlan_adapter pmadapter, mlan_ds_sec_cfg *sec = MNULL; ENTER(); - sec = (mlan_ds_sec_cfg *) pioctl_req->pbuf; + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_KEY_MATERIAL, HostCmd_ACT_GEN_SET, KEY_INFO_ENABLED, - (t_void *) pioctl_req, &sec->param.encrypt_key); + (t_void *)pioctl_req, &sec->param.encrypt_key); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -2400,7 +2563,7 @@ wlan_sec_ioctl_port_ctrl_enable(IN pmlan_adapter pmadapter, ENTER(); - sec = (mlan_ds_sec_cfg *) pioctl_req->pbuf; + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) { if (pmpriv->port_ctrl_mode) sec->param.port_ctrl_enabled = MTRUE; @@ -2441,12 +2604,12 @@ wlan_sec_ioctl_auth_mode(IN pmlan_adapter pmadapter, mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; mlan_ds_sec_cfg *sec = MNULL; ENTER(); - sec = (mlan_ds_sec_cfg *) pioctl_req->pbuf; + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) sec->param.auth_mode = pmpriv->sec_info.authentication_mode; - else { + else pmpriv->sec_info.authentication_mode = sec->param.auth_mode; - } + pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; LEAVE(); return ret; @@ -2468,12 +2631,12 @@ wlan_sec_ioctl_encrypt_mode(IN pmlan_adapter pmadapter, mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; mlan_ds_sec_cfg *sec = MNULL; ENTER(); - sec = (mlan_ds_sec_cfg *) pioctl_req->pbuf; + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) sec->param.encrypt_mode = pmpriv->sec_info.encryption_mode; - else { + else pmpriv->sec_info.encryption_mode = sec->param.encrypt_mode; - } + pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; LEAVE(); return ret; @@ -2519,7 +2682,7 @@ wlan_sec_ioctl_wpa_enable(IN pmlan_adapter pmadapter, mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; mlan_ds_sec_cfg *sec = MNULL; ENTER(); - sec = (mlan_ds_sec_cfg *) pioctl_req->pbuf; + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) { if (pmpriv->wpa_ie_len) sec->param.wpa_enabled = MTRUE; @@ -2561,13 +2724,13 @@ wlan_sec_ioctl_set_wep_key(IN pmlan_adapter pmadapter, if (pmpriv->wep_key_curr_index >= MRVL_NUM_WEP_KEY) pmpriv->wep_key_curr_index = 0; pwep_key = &pmpriv->wep_key[pmpriv->wep_key_curr_index]; - sec = (mlan_ds_sec_cfg *) pioctl_req->pbuf; + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; if (sec->param.encrypt_key.key_index == MLAN_KEY_INDEX_DEFAULT) { index = pmpriv->wep_key_curr_index; sec->param.encrypt_key.key_index = index; } else { if (sec->param.encrypt_key.key_index >= MRVL_NUM_WEP_KEY) { - if ((sec->param.encrypt_key.key_remove == MTRUE) && + if ((sec->param.encrypt_key.key_remove == MTRUE)&& (sec->param.encrypt_key.key_index <= 5)) { /* call firmware remove key */ ret = wlan_prepare_cmd(pmpriv, @@ -2585,7 +2748,7 @@ wlan_sec_ioctl_set_wep_key(IN pmlan_adapter pmadapter, index = sec->param.encrypt_key.key_index; } - if ((sec->param.encrypt_key.key_disable == MTRUE) || + if ((sec->param.encrypt_key.key_disable == MTRUE)|| (sec->param.encrypt_key.key_remove == MTRUE)) { pmpriv->sec_info.wep_status = Wlan802_11WEPDisabled; /* remove key */ @@ -2603,9 +2766,9 @@ wlan_sec_ioctl_set_wep_key(IN pmlan_adapter pmadapter, } } else { if (sec->param.encrypt_key.key_len) { - if ((sec->param.encrypt_key.key_len != WEP_104_BIT_LEN) - && (sec->param.encrypt_key.key_len != - WEP_40_BIT_LEN)) { + if ((sec->param.encrypt_key.key_len != + WEP_104_BIT_LEN)&&(sec->param.encrypt_key. + key_len != WEP_40_BIT_LEN)) { PRINTM(MERROR, "Invalid wep key len=%d\n", sec->param.encrypt_key.key_len); /* We will use random key to clear the key @@ -2662,12 +2825,24 @@ wlan_sec_ioctl_set_wep_key(IN pmlan_adapter pmadapter, ret = MLAN_STATUS_FAILURE; goto exit; } - pmpriv->wep_key_curr_index = (t_u16) index; + pmpriv->wep_key_curr_index = (t_u16)index; pmpriv->sec_info.wep_status = Wlan802_11WEPEnabled; } if (sec->param.encrypt_key.key_flags && pwep_key->key_length) { - pmpriv->wep_key_curr_index = (t_u16) index; - pmpriv->sec_info.wep_status = Wlan802_11WEPEnabled; + pmpriv->wep_key_curr_index = (t_u16)index; + // Only do this if the key is an xmit key. If the key + // is a group key, + // we might be in wpa/wep mixed mode in which case we + // don't want to + // set wep_status = Wlan802_11WEPEnabled because that + // enables WEP + // at the MAC controller level and WPA stops working + // properly. + if (sec->param.encrypt_key. + key_flags & KEY_FLAG_SET_TX_KEY) { + pmpriv->sec_info.wep_status = + Wlan802_11WEPEnabled; + } } } if (pmpriv->sec_info.wep_status == Wlan802_11WEPEnabled) @@ -2695,7 +2870,7 @@ wlan_sec_ioctl_set_wep_key(IN pmlan_adapter pmadapter, HostCmd_CMD_802_11_KEY_MATERIAL, HostCmd_ACT_GEN_SET, 0, - (t_void *) pioctl_req, + (t_void *)pioctl_req, &sec->param.encrypt_key); } else { if (pwep_key->key_length) { @@ -2721,7 +2896,7 @@ wlan_sec_ioctl_set_wep_key(IN pmlan_adapter pmadapter, HostCmd_CMD_MAC_CONTROL, HostCmd_ACT_GEN_SET, 0, - (t_void *) pioctl_req, + (t_void *)pioctl_req, &pmpriv->curr_pkt_filter); } if (ret == MLAN_STATUS_SUCCESS) @@ -2750,7 +2925,7 @@ wlan_sec_ioctl_set_wpa_key(IN pmlan_adapter pmadapter, ENTER(); - sec = (mlan_ds_sec_cfg *) pioctl_req->pbuf; + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; /* Current driver only supports key length of up to 32 bytes */ if (sec->param.encrypt_key.key_len > MLAN_MAX_KEY_LENGTH) { PRINTM(MERROR, "Key length is incorrect\n"); @@ -2763,8 +2938,8 @@ wlan_sec_ioctl_set_wpa_key(IN pmlan_adapter pmadapter, /** back up adhoc AES key */ memset(pmpriv->adapter, &pmpriv->aes_key, 0, sizeof(pmpriv->aes_key)); - memcpy(pmpriv->adapter, (t_u8 *) & pmpriv->aes_key, - (t_u8 *) & sec->param.encrypt_key, + memcpy(pmpriv->adapter, (t_u8 *)&pmpriv->aes_key, + (t_u8 *)&sec->param.encrypt_key, sizeof(pmpriv->aes_key)); } @@ -2792,7 +2967,7 @@ wlan_sec_ioctl_set_wpa_key(IN pmlan_adapter pmadapter, HostCmd_CMD_802_11_KEY_MATERIAL, HostCmd_ACT_GEN_SET, 0, - (t_void *) pioctl_req, &sec->param.encrypt_key); + (t_void *)pioctl_req, &sec->param.encrypt_key); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -2820,9 +2995,9 @@ wlan_sec_ioctl_get_key(IN pmlan_adapter pmadapter, int index; ENTER(); - sec = (mlan_ds_sec_cfg *) pioctl_req->pbuf; + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; - if ((sec->param.encrypt_key.key_index == MLAN_KEY_INDEX_UNICAST) && + if ((sec->param.encrypt_key.key_index == MLAN_KEY_INDEX_UNICAST)&& (sec->param.encrypt_key.key_len == WPA_AES_KEY_LEN)) { if (pmpriv->adhoc_aes_enabled == MTRUE && (pmpriv->aes_key.key_len == WPA_AES_KEY_LEN)) { @@ -2845,6 +3020,7 @@ wlan_sec_ioctl_get_key(IN pmlan_adapter pmadapter, if ((pmpriv->sec_info.wep_status == Wlan802_11WEPEnabled) || (pmpriv->sec_info.wep_status == Wlan802_11WEPKeyAbsent) + || pmpriv->sec_info.ewpa_enabled || pmpriv->sec_info.wpa_enabled || pmpriv->sec_info.wpa2_enabled || pmpriv->adhoc_aes_enabled) { sec->param.encrypt_key.key_disable = MFALSE; @@ -2852,7 +3028,7 @@ wlan_sec_ioctl_get_key(IN pmlan_adapter pmadapter, sec->param.encrypt_key.key_disable = MTRUE; } if (sec->param.encrypt_key.key_index == MLAN_KEY_INDEX_DEFAULT) { - if ((pmpriv->wep_key[pmpriv->wep_key_curr_index].key_length) && + if ((pmpriv->wep_key[pmpriv->wep_key_curr_index].key_length)&& (pmpriv->sec_info.wep_status == Wlan802_11WEPEnabled)) { index = pmpriv->wep_key_curr_index; sec->param.encrypt_key.key_index = @@ -2865,6 +3041,7 @@ wlan_sec_ioctl_get_key(IN pmlan_adapter pmadapter, MIN(MLAN_MAX_KEY_LENGTH, pmpriv->wep_key[index].key_length); } else if ((pmpriv->sec_info.wpa_enabled) + || (pmpriv->sec_info.ewpa_enabled) || (pmpriv->sec_info.wpa2_enabled) || (pmpriv->sec_info.wapi_enabled) || (pmpriv->adhoc_aes_enabled) @@ -2895,6 +3072,7 @@ wlan_sec_ioctl_get_key(IN pmlan_adapter pmadapter, MIN(MLAN_MAX_KEY_LENGTH, pmpriv->wep_key[index].key_length); } else if ((pmpriv->sec_info.wpa_enabled) + || (pmpriv->sec_info.ewpa_enabled) || (pmpriv->sec_info.wpa2_enabled) || (pmpriv->sec_info.wapi_enabled) || (pmpriv->adhoc_aes_enabled) @@ -2925,7 +3103,7 @@ wlan_sec_ioctl_encrypt_key(IN pmlan_adapter pmadapter, mlan_status status = MLAN_STATUS_SUCCESS; mlan_ds_sec_cfg *sec = MNULL; ENTER(); - sec = (mlan_ds_sec_cfg *) pioctl_req->pbuf; + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) { if (sec->param.encrypt_key.is_wapi_key) status = wlan_sec_ioctl_set_wapi_key(pmadapter, @@ -2943,6 +3121,236 @@ wlan_sec_ioctl_encrypt_key(IN pmlan_adapter pmadapter, return status; } +/** + * @brief Query Encrpyt key + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_sec_ioctl_query_key(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_sec_cfg *sec = MNULL; + + ENTER(); + + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + /* Current driver only supports get PTK/GTK */ + if (pmpriv->port_open && (pmpriv->sec_info.wpa_enabled + || pmpriv->sec_info.wpa2_enabled + || pmpriv->sec_info.wapi_enabled)) { + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_KEY_MATERIAL, + HostCmd_ACT_GEN_GET, + KEY_INFO_ENABLED, + (t_void *)pioctl_req, + &sec->param.encrypt_key); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + } + LEAVE(); + return ret; +} + +/** + * @brief Set/Get WPA passphrase for esupplicant + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_sec_ioctl_passphrase(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_sec_cfg *sec = MNULL; + t_u16 cmd_action = 0; + BSSDescriptor_t *pbss_desc; + int i = 0; + ENTER(); + + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; +#ifdef DRV_EMBEDDED_SUPPLICANT + if (pmpriv->adapter->psdio_device->driver_supplicant_auth) { + if (sec->param.passphrase.psk_type == MLAN_PSK_QUERY) + SupplicantQueryPassphrase(pmpriv->psapriv, + (void *)&sec->param. + passphrase); + else if (sec->param.passphrase.psk_type == MLAN_PSK_CLEAR) + SupplicantClearPMK(pmpriv->psapriv, + (void *)&sec->param.passphrase); + else + SupplicantSetPassphrase(pmpriv->psapriv, + (void *)&sec->param.passphrase); + LEAVE(); + return ret; + } +#endif + + if (pioctl_req->action == MLAN_ACT_SET) { + if (sec->param.passphrase.psk_type == MLAN_PSK_CLEAR) + cmd_action = HostCmd_ACT_GEN_REMOVE; + else + cmd_action = HostCmd_ACT_GEN_SET; + } else { + if (sec->param.passphrase.psk_type == MLAN_PSK_QUERY) { + if (sec->param.passphrase.ssid.ssid_len == 0) { + i = wlan_find_bssid_in_list(pmpriv, + (t_u8 *)&sec->param. + passphrase.bssid, + MLAN_BSS_MODE_AUTO); + if (i >= 0) { + pbss_desc = &pmadapter->pscan_table[i]; + memcpy(pmadapter, + &sec->param.passphrase.ssid, + &pbss_desc->ssid, + sizeof(mlan_802_11_ssid)); + memset(pmadapter, + &sec->param.passphrase.bssid, 0, + MLAN_MAC_ADDR_LENGTH); + PRINTM(MINFO, + "PSK_QUERY: found ssid=%s\n", + sec->param.passphrase.ssid.ssid); + } + } else + memset(pmadapter, &sec->param.passphrase.bssid, + 0, MLAN_MAC_ADDR_LENGTH); + } + cmd_action = HostCmd_ACT_GEN_GET; + } + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_SUPPLICANT_PMK, + cmd_action, + 0, (t_void *)pioctl_req, &sec->param.passphrase); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get esupplicant status + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_sec_ioctl_ewpa_enable(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_sec_cfg *sec = MNULL; + ENTER(); + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) { + sec->param.ewpa_enabled = pmpriv->sec_info.ewpa_enabled; + } else { + pmpriv->sec_info.ewpa_enabled = (t_u8)sec->param.ewpa_enabled; + PRINTM(MINFO, "Set: ewpa_enabled = %d\n", + (int)pmpriv->sec_info.ewpa_enabled); + } + pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; + LEAVE(); + return ret; +} + +/** + * @brief Get esupplicant mode + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_sec_ioctl_esupp_mode(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + t_u16 cmd_action = 0; + mlan_ds_sec_cfg *sec = MNULL; + + ENTER(); + + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) { + cmd_action = HostCmd_ACT_GEN_SET; + if (pmpriv->media_connected == MTRUE) { + PRINTM(MERROR, + "Cannot set esupplicant mode configuration while connected.\n"); + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + if (!sec->param.esupp_mode.rsn_mode || + (sec->param.esupp_mode.rsn_mode & RSN_TYPE_VALID_BITS) + != sec->param.esupp_mode.rsn_mode) { + PRINTM(MERROR, "Invalid RSN mode\n"); + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + if (!sec->param.esupp_mode.act_paircipher || + (sec->param.esupp_mode. + act_paircipher & EMBED_CIPHER_VALID_BITS) + != sec->param.esupp_mode.act_paircipher) { + PRINTM(MERROR, "Invalid pairwise cipher\n"); + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + if (!sec->param.esupp_mode.act_groupcipher || + (sec->param.esupp_mode. + act_groupcipher & EMBED_CIPHER_VALID_BITS) + != sec->param.esupp_mode.act_groupcipher) { + PRINTM(MERROR, "Invalid group cipher\n"); + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + } else { + cmd_action = HostCmd_ACT_GEN_GET_CURRENT; + } + + /* Send request to firmware */ + if (sec) { + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_SUPPLICANT_PROFILE, + cmd_action, + 0, + (t_void *)pioctl_req, + &sec->param.esupp_mode); + } else { + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_SUPPLICANT_PROFILE, + cmd_action, + 0, (t_void *)pioctl_req, MNULL); + } + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + +exit: + LEAVE(); + return ret; +} + /** * @brief Security configuration handler * @@ -2967,7 +3375,7 @@ wlan_sec_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) LEAVE(); return MLAN_STATUS_RESOURCE; } - sec = (mlan_ds_sec_cfg *) pioctl_req->pbuf; + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; switch (sec->sub_command) { case MLAN_OID_SEC_CFG_AUTH_MODE: status = wlan_sec_ioctl_auth_mode(pmadapter, pioctl_req); @@ -2987,6 +3395,18 @@ wlan_sec_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) case MLAN_OID_SEC_CFG_ENCRYPT_KEY: status = wlan_sec_ioctl_encrypt_key(pmadapter, pioctl_req); break; + case MLAN_OID_SEC_QUERY_KEY: + status = wlan_sec_ioctl_query_key(pmadapter, pioctl_req); + break; + case MLAN_OID_SEC_CFG_PASSPHRASE: + status = wlan_sec_ioctl_passphrase(pmadapter, pioctl_req); + break; + case MLAN_OID_SEC_CFG_EWPA_ENABLED: + status = wlan_sec_ioctl_ewpa_enable(pmadapter, pioctl_req); + break; + case MLAN_OID_SEC_CFG_ESUPP_MODE: + status = wlan_sec_ioctl_esupp_mode(pmadapter, pioctl_req); + break; default: pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; @@ -3016,12 +3436,13 @@ wlan_sec_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) * @return MLAN_STATUS_SUCCESS --success, otherwise fail */ static int -wlan_set_gen_ie_helper(mlan_private * priv, t_u8 * ie_data_ptr, t_u16 ie_len) +wlan_set_gen_ie_helper(mlan_private *priv, t_u8 *ie_data_ptr, t_u16 ie_len) { mlan_status ret = MLAN_STATUS_SUCCESS; IEEEtypes_VendorHeader_t *pvendor_ie; const t_u8 wpa_oui[] = { 0x00, 0x50, 0xf2, 0x01 }; const t_u8 wps_oui[] = { 0x00, 0x50, 0xf2, 0x04 }; + const t_u8 osen_oui[] = { 0x50, 0x6f, 0x9a, 0x12 }; ENTER(); @@ -3031,12 +3452,13 @@ wlan_set_gen_ie_helper(mlan_private * priv, t_u8 * ie_data_ptr, t_u16 ie_len) priv->wps.session_enable = MFALSE; wlan_set_wpa_ie_helper(priv, MNULL, 0); wlan_set_wapi_ie(priv, MNULL, 0); + wlan_set_osen_ie(priv, MNULL, 0); } else if (!ie_data_ptr) { /* MNULL check */ ret = MLAN_STATUS_FAILURE; } else { - pvendor_ie = (IEEEtypes_VendorHeader_t *) ie_data_ptr; + pvendor_ie = (IEEEtypes_VendorHeader_t *)ie_data_ptr; /* Test to see if it is a WPA IE, if not, then it is a gen IE */ if (((pvendor_ie->element_id == WPA_IE) && @@ -3052,6 +3474,13 @@ wlan_set_gen_ie_helper(mlan_private * priv, t_u8 * ie_data_ptr, t_u16 ie_len) } else if (pvendor_ie->element_id == WAPI_IE) { /* IE is a WAPI IE so call set_wapi function */ ret = wlan_set_wapi_ie(priv, ie_data_ptr, ie_len); + } else if ((pvendor_ie->element_id == VENDOR_SPECIFIC_221) && + (!memcmp + (priv->adapter, pvendor_ie->oui, osen_oui, + sizeof(osen_oui)))) { + /* IE is a OSEN IE so call set_osen function */ + ret = wlan_set_osen_ie(priv, ie_data_ptr, ie_len); + } else if ((pvendor_ie->element_id == WPS_IE) && (priv->wps.session_enable == MFALSE) && (!memcmp @@ -3059,25 +3488,24 @@ wlan_set_gen_ie_helper(mlan_private * priv, t_u8 * ie_data_ptr, t_u16 ie_len) sizeof(wps_oui)))) { /* * Discard first two byte (Element ID and Length) - * because they are not needed in the case of setting WPS_IE + * because they are not needed in the case of setting + * WPS_IE */ if (pvendor_ie->len > 4) { - memcpy(priv->adapter, - (t_u8 *) & priv->wps.wps_ie, ie_data_ptr, - ie_len); - HEXDUMP("wps_ie", (t_u8 *) & priv->wps.wps_ie, + memcpy(priv->adapter, (t_u8 *)&priv->wps.wps_ie, + ie_data_ptr, ie_len); + HEXDUMP("wps_ie", (t_u8 *)&priv->wps.wps_ie, priv->wps.wps_ie.vend_hdr.len + 2); } else { /* Only wps oui exist, reset driver wps buffer */ - memset(priv->adapter, - (t_u8 *) & priv->wps.wps_ie, 0x00, - sizeof(priv->wps.wps_ie)); + memset(priv->adapter, (t_u8 *)&priv->wps.wps_ie, + 0x00, sizeof(priv->wps.wps_ie)); PRINTM(MINFO, "wps_ie cleared\n"); } } else { /* - * Verify that the passed length is not larger than the available - * space remaining in the buffer + * Verify that the passed length is not larger than + * the available space remaining in the buffer */ if (ie_len < (sizeof(priv->gen_ie_buf) - priv->gen_ie_buf_len)) { @@ -3085,8 +3513,7 @@ wlan_set_gen_ie_helper(mlan_private * priv, t_u8 * ie_data_ptr, t_u16 ie_len) /* Test to see if it is a WPS IE, if so, enable wps session flag */ pvendor_ie = - (IEEEtypes_VendorHeader_t *) - ie_data_ptr; + (IEEEtypes_VendorHeader_t *)ie_data_ptr; if ((pvendor_ie->element_id == WPS_IE) && (!memcmp @@ -3147,7 +3574,7 @@ wlan_misc_ioctl_wws_cfg(IN pmlan_adapter pmadapter, goto exit; } - misc_cfg = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + misc_cfg = (mlan_ds_misc_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) cmd_action = HostCmd_ACT_GEN_SET; else @@ -3159,7 +3586,7 @@ wlan_misc_ioctl_wws_cfg(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_SNMP_MIB, cmd_action, - WwsMode_i, (t_void *) pioctl_req, &enable); + WwsMode_i, (t_void *)pioctl_req, &enable); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -3188,9 +3615,15 @@ wlan_11d_cfg_ioctl_enable(IN pmlan_adapter pmadapter, ENTER(); - pcfg_11d = (mlan_ds_11d_cfg *) pioctl_req->pbuf; + pcfg_11d = (mlan_ds_11d_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) { + if (pmpriv->media_connected == MTRUE) { + PRINTM(MIOCTL, + "11D setting cannot be changed while interface is active.\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } PRINTM(MINFO, "11D: 11dcfg SET=%d\n", pcfg_11d->param.enable_11d); @@ -3199,7 +3632,7 @@ wlan_11d_cfg_ioctl_enable(IN pmlan_adapter pmadapter, if (pmpriv->state_11d.user_enable_11d != pcfg_11d->param.enable_11d) { ret = wlan_11d_enable(pmpriv, pioctl_req, - (state_11d_t) pcfg_11d->param. + (state_11d_t)pcfg_11d->param. enable_11d); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -3209,13 +3642,14 @@ wlan_11d_cfg_ioctl_enable(IN pmlan_adapter pmadapter, } } else { pcfg_11d->param.enable_11d = - (t_u32) pmpriv->state_11d.user_enable_11d; + (t_u32)pmpriv->state_11d.user_enable_11d; pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; PRINTM(MINFO, "11D: 11dcfg GET=%d\n", pcfg_11d->param.enable_11d); } +done: LEAVE(); return ret; } @@ -3275,7 +3709,7 @@ wlan_11d_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) goto exit; } - pcfg_11d = (mlan_ds_11d_cfg *) pioctl_req->pbuf; + pcfg_11d = (mlan_ds_11d_cfg *)pioctl_req->pbuf; switch (pcfg_11d->sub_command) { case MLAN_OID_11D_CFG_ENABLE: status = wlan_11d_cfg_ioctl_enable(pmadapter, pioctl_req); @@ -3323,7 +3757,7 @@ wlan_wps_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) return MLAN_STATUS_RESOURCE; } - pwps = (mlan_ds_wps_cfg *) pioctl_req->pbuf; + pwps = (mlan_ds_wps_cfg *)pioctl_req->pbuf; switch (pwps->sub_command) { case MLAN_OID_WPS_CFG_SESSION: if (pioctl_req->action == MLAN_ACT_SET) { @@ -3334,7 +3768,7 @@ wlan_wps_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) pmpriv->wps.session_enable = MFALSE; } else { pwps->param.wps_session = - (t_u32) pmpriv->wps.session_enable; + (t_u32)pmpriv->wps.session_enable; pioctl_req->data_read_written = sizeof(t_u32); PRINTM(MINFO, "wpscfg GET=%d\n", pwps->param.wps_session); @@ -3374,7 +3808,7 @@ wlan_reg_mem_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) LEAVE(); return MLAN_STATUS_RESOURCE; } - reg_mem = (mlan_ds_reg_mem *) pioctl_req->pbuf; + reg_mem = (mlan_ds_reg_mem *)pioctl_req->pbuf; switch (reg_mem->sub_command) { case MLAN_OID_REG_RW: status = wlan_reg_mem_ioctl_reg_rw(pmadapter, pioctl_req); @@ -3394,6 +3828,153 @@ wlan_reg_mem_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) return status; } +/** + * @brief 802.11h ad-hoc start channel check + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_11h_channel_check_req(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + pmlan_private pmpriv = MNULL; + mlan_status ret = MLAN_STATUS_FAILURE; + t_u8 chan_width = CHAN_BW_20MHZ; + + ENTER(); + + if (pioctl_req != MNULL) { + pmpriv = pmadapter->priv[pioctl_req->bss_index]; + } else { + PRINTM(MERROR, "MLAN IOCTL information is not present\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + pmpriv->adhoc_state = ADHOC_STARTING; + + if ((pmadapter->adhoc_start_band & BAND_A) + || (pmadapter->adhoc_start_band & BAND_AN) + ) { + if (pmpriv->intf_state_11h.adhoc_auto_sel_chan) + pmpriv->adhoc_channel = + wlan_11h_get_adhoc_start_channel(pmpriv); + + /* + * Check if the region and channel requires a channel availability + * check. + */ + if (wlan_11h_radar_detect_required + (pmpriv, pmpriv->adhoc_channel) + && !wlan_11h_is_channel_under_nop(pmadapter, + pmpriv->adhoc_channel) + ) { + /* + * Radar detection is required for this channel, make sure + * 11h is activated in the firmware + */ + ret = wlan_11h_activate(pmpriv, MNULL, MTRUE); + ret = wlan_11h_config_master_radar_det(pmpriv, MTRUE); + ret = wlan_11h_check_update_radar_det_state(pmpriv); + + /* Check for radar on the channel */ + if ((pmadapter->chan_bandwidth == + CHANNEL_BW_40MHZ_ABOVE) || + (pmadapter->chan_bandwidth == + CHANNEL_BW_40MHZ_BELOW)) + chan_width = CHAN_BW_40MHZ; + ret = wlan_11h_issue_radar_detect(pmpriv, pioctl_req, + pmpriv->adhoc_channel, + chan_width); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + } + } + + LEAVE(); + return ret; +} + +/** + * @brief 802.11h set/get local power constraint + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_11h_ioctl_local_power_constraint(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_ds_11h_cfg *ds_11hcfg = MNULL; + t_s8 *plocalpower = &pmadapter->state_11h.usr_def_power_constraint; + + ENTER(); + + ds_11hcfg = (mlan_ds_11h_cfg *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_GET) + ds_11hcfg->param.usr_local_power_constraint = *plocalpower; + else + *plocalpower = ds_11hcfg->param.usr_local_power_constraint; + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief 11h configuration handler + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_11h_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_ds_11h_cfg *ds_11hcfg = MNULL; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_11h_cfg)) { + PRINTM(MWARN, "MLAN 11H IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_11h_cfg); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + ds_11hcfg = (mlan_ds_11h_cfg *)pioctl_req->pbuf; + + switch (ds_11hcfg->sub_command) { + case MLAN_OID_11H_CHANNEL_CHECK: + status = wlan_11h_channel_check_req(pmadapter, pioctl_req); + break; + case MLAN_OID_11H_LOCAL_POWER_CONSTRAINT: + status = wlan_11h_ioctl_local_power_constraint(pmadapter, + pioctl_req); + break; +#if defined(DFS_TESTING_SUPPORT) + case MLAN_OID_11H_DFS_TESTING: + status = wlan_11h_ioctl_dfs_testing(pmadapter, pioctl_req); + break; +#endif + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + + LEAVE(); + return status; +} + /** * @brief Set/Get generic IE * @@ -3412,7 +3993,7 @@ wlan_misc_ioctl_gen_ie(IN pmlan_adapter pmadapter, ENTER(); - misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; switch (misc->param.gen_ie.type) { case MLAN_IE_TYPE_GEN_IE: if (pioctl_req->action == MLAN_ACT_GET) { @@ -3422,7 +4003,28 @@ wlan_misc_ioctl_gen_ie(IN pmlan_adapter pmadapter, } else { wlan_set_gen_ie_helper(pmpriv, misc->param.gen_ie.ie_data, - (t_u16) misc->param.gen_ie.len); + (t_u16)misc->param.gen_ie.len); + } + break; + case MLAN_IE_TYPE_ARP_FILTER: + memset(pmadapter, pmadapter->arp_filter, 0, + sizeof(pmadapter->arp_filter)); + if (misc->param.gen_ie.len > ARP_FILTER_MAX_BUF_SIZE) { + pmadapter->arp_filter_size = 0; + PRINTM(MERROR, "Invalid ARP Filter Size\n"); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + } else if (misc->param.gen_ie.len <= + sizeof(MrvlIEtypesHeader_t)) { + pmadapter->arp_filter_size = 0; + PRINTM(MINFO, "Clear ARP filter\n"); + } else { + memcpy(pmadapter, pmadapter->arp_filter, + misc->param.gen_ie.ie_data, + misc->param.gen_ie.len); + pmadapter->arp_filter_size = misc->param.gen_ie.len; + HEXDUMP("ArpFilter", pmadapter->arp_filter, + pmadapter->arp_filter_size); } break; default: @@ -3455,7 +4057,7 @@ wlan_misc_ioctl_region(IN pmlan_adapter pmadapter, ENTER(); - misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) { misc->param.region_code = pmadapter->region_code; } else { @@ -3463,7 +4065,7 @@ wlan_misc_ioctl_region(IN pmlan_adapter pmadapter, /* Use the region code to search for the index */ if (misc->param.region_code == region_code_index[i]) { pmadapter->region_code = - (t_u16) misc->param.region_code; + (t_u16)misc->param.region_code; break; } } @@ -3475,7 +4077,8 @@ wlan_misc_ioctl_region(IN pmlan_adapter pmadapter, return MLAN_STATUS_FAILURE; } pmadapter->cfp_code_bg = misc->param.region_code; - if (wlan_set_regiontable(pmpriv, (t_u8) pmadapter->region_code, + pmadapter->cfp_code_a = misc->param.region_code; + if (wlan_set_regiontable(pmpriv, (t_u8)pmadapter->region_code, pmadapter->config_bands | pmadapter-> adhoc_start_band)) { pioctl_req->status_code = MLAN_ERROR_IOCTL_FAIL; @@ -3512,11 +4115,12 @@ wlan_misc_ioctl_warm_reset(IN pmlan_adapter pmadapter, for (i = 0; i < pmadapter->priv_num; i++) wlan_free_priv(pmadapter->priv[i]); - while ((pmbuf = - (pmlan_buffer) util_dequeue_list(pmadapter->pmoal_handle, - &pmadapter->rx_data_queue, - pcb->moal_spin_lock, - pcb->moal_spin_unlock))) { + while ((pmbuf = (pmlan_buffer)util_dequeue_list(pmadapter->pmoal_handle, + &pmadapter-> + rx_data_queue, + pcb->moal_spin_lock, + pcb-> + moal_spin_unlock))) { wlan_free_mlan_buffer(pmadapter, pmbuf); } util_scalar_write(pmadapter->pmoal_handle, &pmadapter->rx_pkts_queued, @@ -3566,7 +4170,7 @@ wlan_misc_ioctl_sdio_mpa_ctrl(IN pmlan_adapter pmadapter, { mlan_status ret = MLAN_STATUS_SUCCESS; pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; - mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; mlan_ds_misc_sdio_mpa_ctrl *mpa_ctrl = MNULL; ENTER(); @@ -3640,18 +4244,18 @@ wlan_misc_ioctl_sdio_mpa_ctrl(IN pmlan_adapter pmadapter, pmadapter->mpa_rx.pkt_aggr_limit = mpa_ctrl->rx_max_ports; - pmadapter->mpa_tx.enabled = (t_u8) mpa_ctrl->tx_enable; - pmadapter->mpa_rx.enabled = (t_u8) mpa_ctrl->rx_enable; + pmadapter->mpa_tx.enabled = (t_u8)mpa_ctrl->tx_enable; + pmadapter->mpa_rx.enabled = (t_u8)mpa_ctrl->rx_enable; } else { - mpa_ctrl->tx_enable = (t_u16) pmadapter->mpa_tx.enabled; - mpa_ctrl->rx_enable = (t_u16) pmadapter->mpa_rx.enabled; - mpa_ctrl->tx_buf_size = (t_u16) pmadapter->mpa_tx.buf_size; - mpa_ctrl->rx_buf_size = (t_u16) pmadapter->mpa_rx.buf_size; + mpa_ctrl->tx_enable = (t_u16)pmadapter->mpa_tx.enabled; + mpa_ctrl->rx_enable = (t_u16)pmadapter->mpa_rx.enabled; + mpa_ctrl->tx_buf_size = (t_u16)pmadapter->mpa_tx.buf_size; + mpa_ctrl->rx_buf_size = (t_u16)pmadapter->mpa_rx.buf_size; mpa_ctrl->tx_max_ports = - (t_u16) pmadapter->mpa_tx.pkt_aggr_limit; + (t_u16)pmadapter->mpa_tx.pkt_aggr_limit; mpa_ctrl->rx_max_ports = - (t_u16) pmadapter->mpa_rx.pkt_aggr_limit; + (t_u16)pmadapter->mpa_rx.pkt_aggr_limit; } exit: @@ -3679,7 +4283,7 @@ wlan_misc_ioctl_sysclock(IN pmlan_adapter pmadapter, ENTER(); - misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) cmd_action = HostCmd_ACT_GEN_GET; else @@ -3690,8 +4294,8 @@ wlan_misc_ioctl_sysclock(IN pmlan_adapter pmadapter, HostCmd_CMD_ECL_SYSTEM_CLOCK_CONFIG, cmd_action, 0, - (t_void *) pioctl_req, - (t_void *) & misc->param.sys_clock); + (t_void *)pioctl_req, + (t_void *)&misc->param.sys_clock); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -3718,7 +4322,7 @@ wlan_misc_ioctl_get_assoc_rsp(IN pmlan_adapter pmadapter, ENTER(); - misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; if ((pioctl_req->action == MLAN_ACT_GET) && pmpriv->assoc_rsp_size) { memcpy(pmadapter, misc->param.assoc_resp.assoc_resp_buf, pmpriv->assoc_rsp_buf, MIN(ASSOC_RSP_BUF_SIZE, @@ -3754,7 +4358,7 @@ wlan_misc_ioctl_soft_reset(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_SOFT_RESET, HostCmd_ACT_GEN_SET, - 0, (t_void *) pioctl_req, MNULL); + 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -3791,7 +4395,7 @@ wlan_misc_ioctl_thermal(IN pmlan_adapter pmadapter, return MLAN_STATUS_RESOURCE; } - misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) { PRINTM(MERROR, "Thermal reading setting is not allowed!\n"); LEAVE(); @@ -3804,7 +4408,7 @@ wlan_misc_ioctl_thermal(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_SNMP_MIB, cmd_action, - Thermal_i, (t_void *) pioctl_req, MNULL); + Thermal_i, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -3832,7 +4436,7 @@ wlan_misc_ioctl_subscribe_evt(IN pmlan_adapter pmadapter, ENTER(); - misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) cmd_action = HostCmd_ACT_GEN_SET; else @@ -3843,7 +4447,7 @@ wlan_misc_ioctl_subscribe_evt(IN pmlan_adapter pmadapter, HostCmd_CMD_802_11_SUBSCRIBE_EVENT, cmd_action, 0, - (t_void *) pioctl_req, + (t_void *)pioctl_req, &misc->param.subscribe_event); if (ret == MLAN_STATUS_SUCCESS) @@ -3853,6 +4457,83 @@ wlan_misc_ioctl_subscribe_evt(IN pmlan_adapter pmadapter, return ret; } +/** + * @brief Set ARP filter based on IP address + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * @param ipv4_addr ipv4 Address + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_ipaddr_arp_filter(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req, IN t_u32 ipv4_addr) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_callbacks pcb = &pmadapter->callbacks; + t_u8 *buf; + arpfilter_header *arpfilter = MNULL; + filter_entry *entry = MNULL; + t_u32 len; + + ENTER(); + + pcb->moal_malloc(pmadapter->pmoal_handle, MRVDRV_SIZE_OF_CMD_BUFFER, + MLAN_MEM_DEF, &buf); + if (!buf) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Construct the ARP filter TLV */ + arpfilter = (arpfilter_header *)buf; + arpfilter->type = wlan_cpu_to_le16(TLV_TYPE_ARP_FILTER); + + if (ipv4_addr) { + arpfilter->len = wlan_cpu_to_le16(sizeof(filter_entry) * 3); + entry = (filter_entry *)(buf + sizeof(arpfilter_header)); + entry->addr_type = wlan_cpu_to_le16(ADDR_TYPE_BROADCAST); + entry->eth_type = wlan_cpu_to_le16(ETHER_TYPE_ARP); + entry->ipv4_addr = wlan_cpu_to_le32(ipv4_addr); + entry++; + entry->addr_type = wlan_cpu_to_le16(ADDR_TYPE_UNICAST); + entry->eth_type = wlan_cpu_to_le16(ETHER_TYPE_ANY); + entry->ipv4_addr = wlan_cpu_to_le32(IPV4_ADDR_ANY); + entry++; + entry->addr_type = wlan_cpu_to_le16(ADDR_TYPE_MULTICAST); + entry->eth_type = wlan_cpu_to_le16(ETHER_TYPE_ANY); + entry->ipv4_addr = wlan_cpu_to_le32(IPV4_ADDR_ANY); + } else + arpfilter->len = 0; + + /* Update the total length */ + len = sizeof(arpfilter_header) + wlan_le16_to_cpu(arpfilter->len); + + memset(pmadapter, pmadapter->arp_filter, 0, + sizeof(pmadapter->arp_filter)); + if (len > ARP_FILTER_MAX_BUF_SIZE) { + pmadapter->arp_filter_size = 0; + PRINTM(MERROR, "Invalid ARP Filter Size\n"); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + } else if (len <= sizeof(MrvlIEtypesHeader_t)) { + pmadapter->arp_filter_size = 0; + PRINTM(MINFO, "Clear ARP filter\n"); + } else { + memcpy(pmadapter, pmadapter->arp_filter, buf, len); + pmadapter->arp_filter_size = len; + HEXDUMP("ArpFilter", pmadapter->arp_filter, + pmadapter->arp_filter_size); + } + +done: + if (buf) + pcb->moal_mfree(pmadapter->pmoal_handle, buf); + LEAVE(); + return ret; +} + #define FLTR_BUF_IP_OFFSET 24 #define FLTR_BUF_IP_OFFSET_2_IP_1 9 #define FLTR_BUF_IP_OFFSET_2_IP_2 26 @@ -3870,7 +4551,7 @@ wlan_misc_ioctl_subscribe_evt(IN pmlan_adapter pmadapter, mlan_status wlan_ipaddr_auto_arp_resp(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req, - IN t_u32 * ipv4_addr, IN t_u8 num_ipv4) + IN t_u32 *ipv4_addr, IN t_u8 num_ipv4) { mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; mlan_status ret = MLAN_STATUS_SUCCESS; @@ -3900,7 +4581,7 @@ wlan_ipaddr_auto_arp_resp(IN pmlan_adapter pmadapter, ret = pcb->moal_malloc(pmadapter->pmoal_handle, sizeof(mlan_ds_misc_cmd), - MLAN_MEM_DEF, (t_u8 **) & hostcmd); + MLAN_MEM_DEF, (t_u8 **)&hostcmd); if (ret != MLAN_STATUS_SUCCESS || hostcmd == MNULL) { PRINTM(MERROR, "Failed to allocate hostcmd buffer\n"); @@ -3913,9 +4594,9 @@ wlan_ipaddr_auto_arp_resp(IN pmlan_adapter pmadapter, buf = hostcmd->cmd; /* Prepare hostcmd buffer */ - hostcmd_hdr = (HostCmd_DS_GEN *) (buf); + hostcmd_hdr = (HostCmd_DS_GEN *)(buf); hostcmd_hdr->command = wlan_cpu_to_le16(HostCmd_CMD_MEF_CFG); - mefcmd = (HostCmd_DS_MEF_CFG *) (buf + S_DS_GEN); + mefcmd = (HostCmd_DS_MEF_CFG *)(buf + S_DS_GEN); buf_len = S_DS_GEN; if (!ipv4_addr) { @@ -3955,11 +4636,11 @@ wlan_ipaddr_auto_arp_resp(IN pmlan_adapter pmadapter, /* Send command to firmware */ ret = wlan_prepare_cmd(pmpriv, 0, - 0, 0, (t_void *) pioctl_req, (t_void *) hostcmd); + 0, 0, (t_void *)pioctl_req, (t_void *)hostcmd); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; - pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *) hostcmd); + pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)hostcmd); LEAVE(); return ret; @@ -3980,7 +4661,7 @@ wlan_misc_ioctl_mef_cfg(IN pmlan_adapter pmadapter, mlan_status ret = MLAN_STATUS_SUCCESS; mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; mlan_ds_misc_mef_cfg *mef_cfg = - &((mlan_ds_misc_cfg *) pioctl_req->pbuf)->param.mef_cfg; + &((mlan_ds_misc_cfg *)pioctl_req->pbuf)->param.mef_cfg; pmlan_callbacks pcb = &pmadapter->callbacks; HostCmd_DS_GEN *hostcmd_hdr; HostCmd_DS_MEF_CFG *mefcmd; @@ -4006,7 +4687,7 @@ wlan_misc_ioctl_mef_cfg(IN pmlan_adapter pmadapter, ret = pcb->moal_malloc(pmadapter->pmoal_handle, sizeof(mlan_ds_misc_cmd), - MLAN_MEM_DEF, (t_u8 **) & hostcmd); + MLAN_MEM_DEF, (t_u8 **)&hostcmd); if (ret != MLAN_STATUS_SUCCESS || hostcmd == MNULL) { PRINTM(MERROR, "Failed to allocate hostcmd buffer\n"); @@ -4019,9 +4700,9 @@ wlan_misc_ioctl_mef_cfg(IN pmlan_adapter pmadapter, buf = hostcmd->cmd; /* Prepare hostcmd buffer */ - hostcmd_hdr = (HostCmd_DS_GEN *) (buf); + hostcmd_hdr = (HostCmd_DS_GEN *)(buf); hostcmd_hdr->command = wlan_cpu_to_le16(HostCmd_CMD_MEF_CFG); - mefcmd = (HostCmd_DS_MEF_CFG *) (buf + S_DS_GEN); + mefcmd = (HostCmd_DS_MEF_CFG *)(buf + S_DS_GEN); buf_len = S_DS_GEN; switch (mef_cfg->sub_id) { @@ -4064,13 +4745,13 @@ wlan_misc_ioctl_mef_cfg(IN pmlan_adapter pmadapter, /* Send command to firmware */ ret = wlan_prepare_cmd(pmpriv, 0, - 0, 0, (t_void *) pioctl_req, (t_void *) hostcmd); + 0, 0, (t_void *)pioctl_req, (t_void *)hostcmd); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; done: if (hostcmd) - pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *) hostcmd); + pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)hostcmd); LEAVE(); return ret; @@ -4089,7 +4770,7 @@ wlan_misc_ioctl_ipaddr_cfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) { mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; - mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; mlan_status ret = MLAN_STATUS_SUCCESS; t_u32 ipv4_addr[MAX_IPADDR]; int i = 0; @@ -4116,6 +4797,13 @@ wlan_misc_ioctl_ipaddr_cfg(IN pmlan_adapter pmadapter, ret = MLAN_STATUS_FAILURE; goto done; } + if (misc->param.ipaddr_cfg.op_code & MLAN_IPADDR_OP_ARP_FILTER) + ret = wlan_ipaddr_arp_filter(pmadapter, pioctl_req, + ipv4_addr[0]); + else if (pmpriv->op_code & MLAN_IPADDR_OP_ARP_FILTER) + ret = wlan_ipaddr_arp_filter(pmadapter, pioctl_req, 0); + if (ret == MLAN_STATUS_FAILURE) + goto done; if (misc->param.ipaddr_cfg.op_code & MLAN_IPADDR_OP_AUTO_ARP_RESP) ret = wlan_ipaddr_auto_arp_resp(pmadapter, pioctl_req, ipv4_addr, @@ -4153,9 +4841,10 @@ wlan_misc_ioctl_cfp_code_cfg(IN pmlan_adapter pmadapter, { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; - mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; mlan_ds_misc_cfp_code *cfp_code = MNULL; t_u32 region_bg = 0; + t_u32 region_a = 0; int i; ENTER(); @@ -4172,12 +4861,37 @@ wlan_misc_ioctl_cfp_code_cfg(IN pmlan_adapter pmadapter, break; } } - pmadapter->cfp_code_bg = (t_u8) cfp_code->cfp_code_bg; - if (region_bg) - pmadapter->region_code = pmadapter->cfp_code_bg; + if (!cfp_code->cfp_code_a) + cfp_code->cfp_code_a = pmadapter->cfp_code_a; + for (i = 0; i < MRVDRV_MAX_REGION_CODE; i++) { + /* Use the region code to search for the index */ + if (cfp_code->cfp_code_a == region_code_index[i]) { + region_a = cfp_code->cfp_code_a; + break; + } + } + if (!region_a) { + for (i = 0; i < MRVDRV_MAX_CFP_CODE_A; i++) { + /* Use the CFP code to search for the index */ + if (cfp_code->cfp_code_a == cfp_code_index_a[i]) + break; + } + if (i >= MRVDRV_MAX_CFP_CODE_A) { + PRINTM(MERROR, + "CFP Code not identified for A\n"); + pioctl_req->status_code = + MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto done; + } + } + pmadapter->cfp_code_bg = (t_u8)cfp_code->cfp_code_bg; + pmadapter->cfp_code_a = (t_u8)cfp_code->cfp_code_a; + if (region_bg && region_a && (region_bg == region_a)) + pmadapter->region_code = pmadapter->cfp_code_a; else pmadapter->region_code = 0; - if (wlan_set_regiontable(pmpriv, (t_u8) pmadapter->region_code, + if (wlan_set_regiontable(pmpriv, (t_u8)pmadapter->region_code, pmadapter->config_bands | pmadapter-> adhoc_start_band)) { pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; @@ -4187,6 +4901,7 @@ wlan_misc_ioctl_cfp_code_cfg(IN pmlan_adapter pmadapter, } else { /* GET operation */ cfp_code->cfp_code_bg = pmadapter->cfp_code_bg; + cfp_code->cfp_code_a = pmadapter->cfp_code_a; } done: @@ -4204,7 +4919,7 @@ wlan_misc_ioctl_cfp_code_cfg(IN pmlan_adapter pmadapter, */ mlan_status wlan_misc_ioctl_country_code(IN pmlan_adapter pmadapter, - IN mlan_ioctl_req * pioctl_req) + IN mlan_ioctl_req *pioctl_req) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; @@ -4214,7 +4929,7 @@ wlan_misc_ioctl_country_code(IN pmlan_adapter pmadapter, ENTER(); - cfg_misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + cfg_misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; country_code = &cfg_misc->param.country_code; if (pioctl_req->action == MLAN_ACT_SET) { @@ -4229,8 +4944,9 @@ wlan_misc_ioctl_country_code(IN pmlan_adapter pmadapter, goto done; } pmadapter->cfp_code_bg = cfp_bg; - if (cfp_bg) - pmadapter->region_code = cfp_bg; + pmadapter->cfp_code_a = cfp_a; + if (cfp_bg && cfp_a && (cfp_bg == cfp_a)) + pmadapter->region_code = cfp_a; else pmadapter->region_code = 0; if (wlan_set_regiontable(pmpriv, pmadapter->region_code, @@ -4253,6 +4969,38 @@ wlan_misc_ioctl_country_code(IN pmlan_adapter pmadapter, return ret; } +/** + * @brief Configure MFPC and MFPR for management frame protection + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req Pointer to the IOCTL request buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_misc_pmfcfg(IN pmlan_adapter pmadapter, IN mlan_ioctl_req *pioctl_req) +{ + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *cfg_misc = MNULL; + mlan_ds_misc_pmfcfg *pmfcfg; + + cfg_misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + pmfcfg = &cfg_misc->param.pmfcfg; + + if (pioctl_req->action == MLAN_ACT_SET) { + pmpriv->pmfcfg.mfpc = pmfcfg->mfpc; + pmpriv->pmfcfg.mfpr = pmfcfg->mfpr; + } else { + /* GET operation */ + pmfcfg->mfpc = pmpriv->pmfcfg.mfpc; + pmfcfg->mfpr = pmpriv->pmfcfg.mfpr; + } + + LEAVE(); + return ret; +} + /** * @brief Miscellaneous configuration handler * @@ -4282,7 +5030,7 @@ wlan_misc_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) LEAVE(); return MLAN_STATUS_RESOURCE; } - misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; switch (misc->sub_command) { case MLAN_OID_MISC_GEN_IE: status = wlan_misc_ioctl_gen_ie(pmadapter, pioctl_req); @@ -4316,6 +5064,10 @@ wlan_misc_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) case MLAN_OID_MISC_SOFT_RESET: status = wlan_misc_ioctl_soft_reset(pmadapter, pioctl_req); break; + case MLAN_OID_MISC_COALESCING_STATUS: + status = wlan_misc_ioctl_coalescing_status(pmadapter, + pioctl_req); + break; case MLAN_OID_MISC_CUSTOM_IE: status = wlan_misc_ioctl_custom_ie_list(pmadapter, pioctl_req, MTRUE); @@ -4359,6 +5111,9 @@ wlan_misc_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) case MLAN_OID_MISC_SUBSCRIBE_EVENT: status = wlan_misc_ioctl_subscribe_evt(pmadapter, pioctl_req); break; + case MLAN_OID_MISC_HOTSPOT_CFG: + status = wlan_misc_hotspot_cfg(pmadapter, pioctl_req); + break; case MLAN_OID_MISC_OTP_USER_DATA: status = wlan_misc_otp_user_data(pmadapter, pioctl_req); break; @@ -4369,6 +5124,23 @@ wlan_misc_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) case MLAN_OID_MISC_EXT_CAP_CFG: status = wlan_misc_ext_capa_cfg(pmadapter, pioctl_req); break; +#endif + case MLAN_OID_MISC_PMFCFG: + status = wlan_misc_pmfcfg(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_MULTI_CHAN_CFG: + status = wlan_misc_ioctl_multi_chan_config(pmadapter, + pioctl_req); + break; + case MLAN_OID_MISC_MULTI_CHAN_POLICY: + status = wlan_misc_ioctl_multi_chan_policy(pmadapter, + pioctl_req); + break; +#ifdef RX_PACKET_COALESCE + case MLAN_OID_MISC_RX_PACKET_COALESCE: + status = wlan_misc_ioctl_rx_pkt_coalesce_config(pmadapter, + pioctl_req); + break; #endif case MLAN_OID_MISC_LOW_PWR_MODE: status = wlan_misc_ioctl_low_pwr_mode(pmadapter, pioctl_req); @@ -4400,39 +5172,38 @@ wlan_set_get_scan_cfg(IN pmlan_adapter pmadapter, ENTER(); - scan = (mlan_ds_scan *) pioctl_req->pbuf; + scan = (mlan_ds_scan *)pioctl_req->pbuf; if (action == MLAN_ACT_GET) { - scan->param.scan_cfg.scan_type = (t_u32) pmadapter->scan_type; + scan->param.scan_cfg.scan_type = (t_u32)pmadapter->scan_type; scan->param.scan_cfg.scan_mode = pmadapter->scan_mode; - scan->param.scan_cfg.scan_probe = - (t_u32) pmadapter->scan_probes; + scan->param.scan_cfg.scan_probe = (t_u32)pmadapter->scan_probes; scan->param.scan_cfg.scan_time.specific_scan_time = - (t_u32) pmadapter->specific_scan_time; + (t_u32)pmadapter->specific_scan_time; scan->param.scan_cfg.scan_time.active_scan_time = - (t_u32) pmadapter->active_scan_time; + (t_u32)pmadapter->active_scan_time; scan->param.scan_cfg.scan_time.passive_scan_time = - (t_u32) pmadapter->passive_scan_time; + (t_u32)pmadapter->passive_scan_time; scan->param.scan_cfg.ext_scan = pmadapter->ext_scan; } else { if (scan->param.scan_cfg.scan_type) pmadapter->scan_type = - (t_u8) scan->param.scan_cfg.scan_type; + (t_u8)scan->param.scan_cfg.scan_type; if (scan->param.scan_cfg.scan_mode) pmadapter->scan_mode = scan->param.scan_cfg.scan_mode; if (scan->param.scan_cfg.scan_probe) pmadapter->scan_probes = - (t_u16) scan->param.scan_cfg.scan_probe; + (t_u16)scan->param.scan_cfg.scan_probe; if (scan->param.scan_cfg.scan_time.specific_scan_time) pmadapter->specific_scan_time = - (t_u16) scan->param.scan_cfg.scan_time. + (t_u16)scan->param.scan_cfg.scan_time. specific_scan_time; if (scan->param.scan_cfg.scan_time.active_scan_time) pmadapter->active_scan_time = - (t_u16) scan->param.scan_cfg.scan_time. + (t_u16)scan->param.scan_cfg.scan_time. active_scan_time; if (scan->param.scan_cfg.scan_time.passive_scan_time) pmadapter->passive_scan_time = - (t_u16) scan->param.scan_cfg.scan_time. + (t_u16)scan->param.scan_cfg.scan_time. passive_scan_time; pmadapter->ext_scan = scan->param.scan_cfg.ext_scan; } @@ -4459,7 +5230,7 @@ wlan_scan_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) ENTER(); - pscan = (mlan_ds_scan *) pioctl_req->pbuf; + pscan = (mlan_ds_scan *)pioctl_req->pbuf; if (pscan->sub_command == MLAN_OID_SCAN_CONFIG || pscan->sub_command == MLAN_OID_SCAN_BGSCAN_CONFIG) goto start_config; @@ -4516,7 +5287,7 @@ wlan_scan_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) HostCmd_CMD_802_11_BG_SCAN_CONFIG, HostCmd_ACT_GEN_SET, 0, - (t_void *) pioctl_req, + (t_void *)pioctl_req, pscan->param.user_scan. scan_cfg_buf); break; @@ -4544,8 +5315,7 @@ wlan_scan_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) pscan->param.scan_resp.num_in_scan_table = pmadapter->num_in_scan_table; pscan->param.scan_resp.pscan_table = - (t_u8 *) & pmpriv->curr_bss_params. - bss_descriptor; + (t_u8 *)&pmpriv->curr_bss_params.bss_descriptor; pioctl_req->data_read_written = sizeof(mlan_scan_resp) + MLAN_SUB_COMMAND_SIZE; } else { @@ -4561,7 +5331,7 @@ wlan_scan_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) HostCmd_CMD_802_11_BG_SCAN_QUERY, HostCmd_ACT_GEN_GET, 0, - (t_void *) pioctl_req, + (t_void *)pioctl_req, MNULL); if (status == MLAN_STATUS_SUCCESS) { PRINTM(MINFO, @@ -4570,7 +5340,7 @@ wlan_scan_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) } } else { pscan->param.scan_resp.pscan_table = - (t_u8 *) pmadapter->pscan_table; + (t_u8 *)pmadapter->pscan_table; pscan->param.scan_resp.num_in_scan_table = pmadapter->num_in_scan_table; pscan->param.scan_resp.age_in_secs = @@ -4578,6 +5348,10 @@ wlan_scan_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) pioctl_req->data_read_written = sizeof(mlan_scan_resp) + MLAN_SUB_COMMAND_SIZE; + pscan->param.scan_resp.pchan_stats = + (t_u8 *)pmadapter->pchan_stats; + pscan->param.scan_resp.num_in_chan_stats = + pmadapter->num_in_chan_stats; } } } @@ -4590,6 +5364,32 @@ wlan_scan_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) Global Functions ********************************************************/ +/** + * @brief Set ewpa mode + * + * @param priv A pointer to mlan_private structure + * @param psec_pp A pointer to mlan_ds_passphrase structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_set_ewpa_mode(mlan_private *priv, mlan_ds_passphrase *psec_pp) +{ + ENTER(); + + if ((psec_pp->psk_type == MLAN_PSK_PASSPHRASE && + psec_pp->psk.passphrase.passphrase_len > 0) || + (psec_pp->psk_type == MLAN_PSK_PMK)) + priv->sec_info.ewpa_enabled = MTRUE; + else + priv->sec_info.ewpa_enabled = MFALSE; + + PRINTM(MINFO, "Set ewpa mode = %d\n", priv->sec_info.ewpa_enabled); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + /** * @brief Search for a BSS * @@ -4599,7 +5399,7 @@ wlan_scan_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) * @return MLAN_STATUS_SUCCESS --success, otherwise fail */ mlan_status -wlan_find_bss(mlan_private * pmpriv, pmlan_ioctl_req pioctl_req) +wlan_find_bss(mlan_private *pmpriv, pmlan_ioctl_req pioctl_req) { mlan_adapter *pmadapter = pmpriv->adapter; mlan_ds_bss *bss = MNULL; @@ -4611,7 +5411,7 @@ wlan_find_bss(mlan_private * pmpriv, pmlan_ioctl_req pioctl_req) ENTER(); - bss = (mlan_ds_bss *) pioctl_req->pbuf; + bss = (mlan_ds_bss *)pioctl_req->pbuf; if (memcmp (pmadapter, &bss->param.ssid_bssid.bssid, zero_mac, @@ -4620,12 +5420,12 @@ wlan_find_bss(mlan_private * pmpriv, pmlan_ioctl_req pioctl_req) */ i = wlan_find_ssid_in_list(pmpriv, &bss->param.ssid_bssid.ssid, - (t_u8 *) & bss->param. + (t_u8 *)&bss->param. ssid_bssid.bssid, pmpriv->bss_mode); else i = wlan_find_bssid_in_list(pmpriv, - (t_u8 *) & bss->param. + (t_u8 *)&bss->param. ssid_bssid.bssid, pmpriv->bss_mode); if (i < 0) { @@ -4654,8 +5454,8 @@ wlan_find_bss(mlan_private * pmpriv, pmlan_ioctl_req pioctl_req) return MLAN_STATUS_FAILURE; } pbss_desc = &pmadapter->pscan_table[i]; - memcpy(pmadapter, (t_u8 *) & bss->param.ssid_bssid.bssid, - (t_u8 *) & pbss_desc->mac_address, MLAN_MAC_ADDR_LENGTH); + memcpy(pmadapter, (t_u8 *)&bss->param.ssid_bssid.bssid, + (t_u8 *)&pbss_desc->mac_address, MLAN_MAC_ADDR_LENGTH); bss->param.ssid_bssid.rssi = pbss_desc->rssi; /* index in bss list, start from 1 */ bss->param.ssid_bssid.idx = i + 1; @@ -4670,15 +5470,15 @@ wlan_find_bss(mlan_private * pmpriv, pmlan_ioctl_req pioctl_req) /** * @brief MLAN station ioctl handler * - * @param adapter A pointer to mlan_adapter structure + * @param adapter A pointer to mlan_adapter structure * @param pioctl_req A pointer to ioctl request buffer * * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail */ mlan_status -wlan_ops_sta_ioctl(t_void * adapter, pmlan_ioctl_req pioctl_req) +wlan_ops_sta_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req) { - pmlan_adapter pmadapter = (pmlan_adapter) adapter; + pmlan_adapter pmadapter = (pmlan_adapter)adapter; mlan_status status = MLAN_STATUS_SUCCESS; ENTER(); @@ -4729,6 +5529,9 @@ wlan_ops_sta_ioctl(t_void * adapter, pmlan_ioctl_req pioctl_req) case MLAN_IOCTL_MISC_CFG: status = wlan_misc_cfg_ioctl(pmadapter, pioctl_req); break; + case MLAN_IOCTL_11H_CFG: + status = wlan_11h_cfg_ioctl(pmadapter, pioctl_req); + break; default: pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; status = MLAN_STATUS_FAILURE; diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_rx.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_rx.c old mode 100755 new mode 100644 index 27ac8c30..d87412f3 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_rx.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_rx.c @@ -35,32 +35,16 @@ Change log: #include "mlan_main.h" #include "mlan_11n_aggr.h" #include "mlan_11n_rxreorder.h" +#ifdef DRV_EMBEDDED_SUPPLICANT +#include "authenticator_api.h" +#endif #include "mlan_decl.h" -static void mlan_hist_data_reset(); -static void mlan_hist_data_set(t_s8 rxRate, t_s8 snr, t_s8 nflr); - - /******************************************************** Local Variables ********************************************************/ -//Number of samples in histogram (/proc/mwlan/mlan0/histogram). -#define MLAN_HIST_MAX_SAMPLES 1048576 - -typedef struct _hgm_data -{ - atomic_t rx_rate[RX_RATE_MAX]; - atomic_t snr[SNR_MAX]; - atomic_t noise_flr[NOISE_FLR_MAX]; - atomic_t sig_str[SIG_STRENGTH_MAX]; - atomic_t num_samples; - -} mlan_hgm_data; - -static mlan_hgm_data *pmlan_hist = 0; - /** Ethernet II header */ typedef struct { /** Ethernet II header destination address */ @@ -72,96 +56,116 @@ typedef struct { } EthII_Hdr_t; +/** IPv4 ARP request header */ +typedef MLAN_PACK_START struct { + /** Hardware type */ + t_u16 Htype; + /** Protocol type */ + t_u16 Ptype; + /** Hardware address length */ + t_u8 addr_len; + /** Protocol address length */ + t_u8 proto_len; + /** Operation code */ + t_u16 op_code; + /** Source mac address */ + t_u8 src_mac[MLAN_MAC_ADDR_LENGTH]; + /** Sender IP address */ + t_u8 src_ip[4]; + /** Destination mac address */ + t_u8 dst_mac[MLAN_MAC_ADDR_LENGTH]; + /** Destination IP address */ + t_u8 dst_ip[4]; +} MLAN_PACK_END IPv4_ARP_t; + +/** IPv6 Nadv packet header */ +typedef MLAN_PACK_START struct { + /** IP protocol version */ + t_u8 version; + /** flow label */ + t_u8 flow_lab[3]; + /** Payload length */ + t_u16 payload_len; + /** Next header type */ + t_u8 next_hdr; + /** Hot limit */ + t_u8 hop_limit; + /** Source address */ + t_u8 src_addr[16]; + /** Destination address */ + t_u8 dst_addr[16]; + /** ICMP type */ + t_u8 icmp_type; + /** IPv6 Code */ + t_u8 ipv6_code; + /** IPv6 Checksum */ + t_u16 ipv6_checksum; + /** Flags */ + t_u32 flags; + /** Target address */ + t_u8 taget_addr[16]; + /** Reserved */ + t_u8 rev[8]; +} MLAN_PACK_END IPv6_Nadv_t; + /******************************************************** Global Variables ********************************************************/ -void* mlan_memcpy(void *pDest, void *pSrc, unsigned int count) -{ - char *d = (char *) pDest; - char *s = (char *) pSrc; - while (count--){ - *d++ = *s++; - } -return pDest; -} - -int mlan_hist_data_get(char *pBuf, unsigned int *pNumSamples) -{ - char *d = pBuf; - char *s; - unsigned int temp; - int ix, dest_ix = 0; - if (pmlan_hist) - { - *pNumSamples = atomic_read(&(pmlan_hist->num_samples)); - for (ix = 0; ix < RX_RATE_MAX; ix++){ - temp = atomic_read(&(pmlan_hist->rx_rate[ix])); - s = &temp; - mlan_memcpy((void *) (pBuf + dest_ix), (void *) s, sizeof(unsigned int)); - dest_ix += sizeof(unsigned int); - } - for (ix = 0; ix < SNR_MAX; ix++){ - temp = atomic_read(&(pmlan_hist->snr[ix])); - s = &temp; - mlan_memcpy((void *) (pBuf + dest_ix), (void *) s, sizeof(unsigned int)); - dest_ix += sizeof(unsigned int); - } - for (ix = 0; ix < NOISE_FLR_MAX; ix++){ - temp = atomic_read(&(pmlan_hist->noise_flr[ix])); - s = &temp; - mlan_memcpy((void *) (pBuf + dest_ix), (void *) s, sizeof(unsigned int)); - dest_ix += sizeof(unsigned int); - } - for (ix = 0; ix < SIG_STRENGTH_MAX; ix++){ - temp = atomic_read(&(pmlan_hist->sig_str[ix])); - s = &temp; - mlan_memcpy((void *) (pBuf + dest_ix), (void *) s, sizeof(unsigned int)); - dest_ix += sizeof(unsigned int); - } - return 0; - } - - *pNumSamples = 0; - return -1; -} - -int mlan_hist_data_clear() -{ - if (pmlan_hist){ - mlan_hist_data_reset(); - return 0; - } - return -1; -} - /******************************************************** Local Functions ********************************************************/ -static void mlan_hist_data_reset() -{ - int ix; - - atomic_set(&(pmlan_hist->num_samples), 0); - for (ix = 0; ix < RX_RATE_MAX; ix++) atomic_set(&(pmlan_hist->rx_rate[ix]), 0); - for (ix = 0; ix < SNR_MAX; ix++) atomic_set(&(pmlan_hist->snr[ix]), 0); - for (ix = 0; ix < NOISE_FLR_MAX; ix++) atomic_set(&(pmlan_hist->noise_flr[ix]), 0); - for (ix = 0; ix < SIG_STRENGTH_MAX; ix++) atomic_set(&(pmlan_hist->sig_str[ix]), 0); - -} - -static void mlan_hist_data_set(t_s8 rxRate, t_s8 snr, t_s8 nflr) -{ - atomic_inc(&(pmlan_hist->num_samples)); - atomic_inc(&(pmlan_hist->rx_rate[rxRate])); - atomic_inc(&(pmlan_hist->snr[snr])); - atomic_inc(&(pmlan_hist->noise_flr[128 + nflr])); - atomic_inc(&(pmlan_hist->sig_str[nflr - snr])); -} /******************************************************** Global functions ********************************************************/ +/** + * @brief This function check and discard IPv4 and IPv6 gratuitous broadcast packets + * + * @param prx_pkt A pointer to RxPacketHdr_t structure of received packet + * @param pmadapter A pointer to pmlan_adapter structure + * @return TRUE if found such type of packets, FALSE not found + */ +static t_u8 +discard_gratuitous_ARP_msg(RxPacketHdr_t *prx_pkt, pmlan_adapter pmadapter) +{ + t_u8 proto_ARP_type[] = { 0x08, 0x06 }; + t_u8 proto_ARP_type_v6[] = { 0x86, 0xDD }; + IPv4_ARP_t *parp_hdr; + IPv6_Nadv_t *pNadv_hdr; + t_u8 ret = MFALSE; + + /* IPV4 pkt check * A gratuitous ARP is an ARP packet * where the + source and destination IP are both set to * the IP of the machine + issuing the packet. */ + if (memcmp + (pmadapter, proto_ARP_type, &prx_pkt->eth803_hdr.h803_len, + sizeof(proto_ARP_type)) == 0) { + parp_hdr = (IPv4_ARP_t *)(&prx_pkt->rfc1042_hdr); + /* Graguitous ARP can be ARP request or ARP reply */ + if ((parp_hdr->op_code == mlan_htons(0x01)) || + (parp_hdr->op_code == mlan_htons(0x02))) + if (memcmp + (pmadapter, parp_hdr->src_ip, parp_hdr->dst_ip, + 4) == 0) + ret = MTRUE; + } + + /* IPV6 pkt check * An unsolicited Neighbor Advertisement pkt is * + marked by a cleared Solicited Flag */ + if (memcmp + (pmadapter, proto_ARP_type_v6, &prx_pkt->eth803_hdr.h803_len, + sizeof(proto_ARP_type_v6)) == 0) { + pNadv_hdr = (IPv6_Nadv_t *)(&prx_pkt->rfc1042_hdr); + /* Check Nadv type: next header is ICMPv6 and icmp type is Nadv + */ + if (pNadv_hdr->next_hdr == 0x3A && pNadv_hdr->icmp_type == 0x88) + if ((pNadv_hdr->flags & mlan_htonl(0x40000000)) == 0) + ret = MTRUE; + } + + return ret; +} /** * @brief This function process tdls action frame @@ -172,7 +176,7 @@ static void mlan_hist_data_set(t_s8 rxRate, t_s8 snr, t_s8 nflr) * @return N/A */ void -wlan_process_tdls_action_frame(pmlan_private priv, t_u8 * pbuf, t_u32 len) +wlan_process_tdls_action_frame(pmlan_private priv, t_u8 *pbuf, t_u32 len) { sta_node *sta_ptr = MNULL; t_u8 *peer; @@ -188,15 +192,15 @@ wlan_process_tdls_action_frame(pmlan_private priv, t_u8 * pbuf, t_u32 len) #define TDLS_CONFIRM_FIX_LEN 6 if (len < (sizeof(EthII_Hdr_t) + 3)) return; - if (*(t_u8 *) (pbuf + sizeof(EthII_Hdr_t)) != TDLS_PAYLOAD_TYPE) + if (*(t_u8 *)(pbuf + sizeof(EthII_Hdr_t)) != TDLS_PAYLOAD_TYPE) /* TDLS payload type = 2 */ return; - if (*(t_u8 *) (pbuf + sizeof(EthII_Hdr_t) + 1) != TDLS_CATEGORY) + if (*(t_u8 *)(pbuf + sizeof(EthII_Hdr_t) + 1) != TDLS_CATEGORY) /* TDLS category = 0xc */ return; peer = pbuf + MLAN_MAC_ADDR_LENGTH; - action = *(t_u8 *) (pbuf + sizeof(EthII_Hdr_t) + 2); + action = *(t_u8 *)(pbuf + sizeof(EthII_Hdr_t) + 2); /* 2= payload type + category */ if (action > TDLS_SETUP_CONFIRM) { @@ -218,7 +222,7 @@ wlan_process_tdls_action_frame(pmlan_private priv, t_u8 * pbuf, t_u32 len) return; pos = pbuf + sizeof(EthII_Hdr_t) + 4; /* payload 1+ category 1 + action 1 +dialog 1 */ - sta_ptr->capability = mlan_ntohs(*(t_u16 *) pos); + sta_ptr->capability = mlan_ntohs(*(t_u16 *)pos); ie_len = len - sizeof(EthII_Hdr_t) - TDLS_REQ_FIX_LEN; pos += 2; } else if (action == 1) { /* setup respons */ @@ -228,7 +232,7 @@ wlan_process_tdls_action_frame(pmlan_private priv, t_u8 * pbuf, t_u32 len) return; pos = pbuf + sizeof(EthII_Hdr_t) + 6; /* payload 1+ category 1 + action 1 +dialog 1 +status 2 */ - sta_ptr->capability = mlan_ntohs(*(t_u16 *) pos); + sta_ptr->capability = mlan_ntohs(*(t_u16 *)pos); ie_len = len - sizeof(EthII_Hdr_t) - TDLS_RESP_FIX_LEN; pos += 2; } else { /* setup confirm */ @@ -256,11 +260,11 @@ wlan_process_tdls_action_frame(pmlan_private priv, t_u8 * pbuf, t_u32 len) sta_ptr->rate_len += pos[1]; break; case HT_CAPABILITY: - memcpy(priv->adapter, (t_u8 *) & sta_ptr->HTcap, pos, + memcpy(priv->adapter, (t_u8 *)&sta_ptr->HTcap, pos, sizeof(IEEEtypes_HTCap_t)); sta_ptr->is_11n_enabled = 1; DBG_HEXDUMP(MDAT_D, "TDLS HT capability", - (t_u8 *) (&sta_ptr->HTcap), + (t_u8 *)(&sta_ptr->HTcap), MIN(sizeof(IEEEtypes_HTCap_t), MAX_DATA_DUMP_LEN)); break; @@ -268,32 +272,37 @@ wlan_process_tdls_action_frame(pmlan_private priv, t_u8 * pbuf, t_u32 len) memcpy(priv->adapter, &sta_ptr->HTInfo, pos, sizeof(IEEEtypes_HTInfo_t)); DBG_HEXDUMP(MDAT_D, "TDLS HT info", - (t_u8 *) (&sta_ptr->HTInfo), + (t_u8 *)(&sta_ptr->HTInfo), MIN(sizeof(IEEEtypes_HTInfo_t), MAX_DATA_DUMP_LEN)); break; case BSSCO_2040: - memcpy(priv->adapter, (t_u8 *) & sta_ptr->BSSCO_20_40, + memcpy(priv->adapter, (t_u8 *)&sta_ptr->BSSCO_20_40, pos, sizeof(IEEEtypes_2040BSSCo_t)); break; case EXT_CAPABILITY: - memcpy(priv->adapter, (t_u8 *) & sta_ptr->ExtCap, pos, + memcpy(priv->adapter, (t_u8 *)&sta_ptr->ExtCap, pos, pos[1] + sizeof(IEEEtypes_Header_t)); DBG_HEXDUMP(MDAT_D, "TDLS Extended capability", - (t_u8 *) (&sta_ptr->ExtCap), + (t_u8 *)(&sta_ptr->ExtCap), sta_ptr->ExtCap.ieee_hdr.len + 2); break; case RSN_IE: - memcpy(priv->adapter, (t_u8 *) & sta_ptr->rsn_ie, pos, + memcpy(priv->adapter, (t_u8 *)&sta_ptr->rsn_ie, pos, pos[1] + sizeof(IEEEtypes_Header_t)); DBG_HEXDUMP(MDAT_D, "TDLS Rsn ie ", - (t_u8 *) (&sta_ptr->rsn_ie), + (t_u8 *)(&sta_ptr->rsn_ie), pos[1] + sizeof(IEEEtypes_Header_t)); break; case QOS_INFO: sta_ptr->qos_info = pos[2]; PRINTM(MDAT_D, "TDLS qos info %x\n", sta_ptr->qos_info); break; + case LINK_ID: + memcpy(priv->adapter, (t_u8 *)&sta_ptr->link_ie, pos, + sizeof(IEEEtypes_LinkIDElement_t)); + break; + default: break; } @@ -319,19 +328,24 @@ wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf) RxPD *prx_pd; int hdr_chop; EthII_Hdr_t *peth_hdr; - t_u8 rfc1042_eth_hdr[MLAN_MAC_ADDR_LENGTH] = - { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; - t_u8 snap_oui_802_h[MLAN_MAC_ADDR_LENGTH] = - { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; + t_u8 rfc1042_eth_hdr[MLAN_MAC_ADDR_LENGTH] = { + 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 + }; + t_u8 snap_oui_802_h[MLAN_MAC_ADDR_LENGTH] = { + 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 + }; t_u8 appletalk_aarp_type[2] = { 0x80, 0xf3 }; t_u8 ipx_snap_type[2] = { 0x81, 0x37 }; t_u8 tdls_action_type[2] = { 0x89, 0x0d }; - t_u8 adj_rx_rate = 0; +#ifdef DRV_EMBEDDED_SUPPLICANT + t_u8 eapol_type[2] = { 0x88, 0x8e }; +#endif + t_u8 adj_rx_rate = 0; ENTER(); - prx_pd = (RxPD *) (pmbuf->pbuf + pmbuf->data_offset); - prx_pkt = (RxPacketHdr_t *) ((t_u8 *) prx_pd + prx_pd->rx_pkt_offset); + prx_pd = (RxPD *)(pmbuf->pbuf + pmbuf->data_offset); + prx_pkt = (RxPacketHdr_t *)((t_u8 *)prx_pd + prx_pd->rx_pkt_offset); /** Small debug type */ #define DBG_TYPE_SMALL 2 @@ -339,11 +353,11 @@ wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf) #define SIZE_OF_DBG_STRUCT 4 if (prx_pd->rx_pkt_type == PKT_TYPE_DEBUG) { t_u8 dbg_type; - dbg_type = *(t_u8 *) & prx_pkt->eth803_hdr; + dbg_type = *(t_u8 *)&prx_pkt->eth803_hdr; if (dbg_type == DBG_TYPE_SMALL) { PRINTM(MFW_D, "\n"); DBG_HEXDUMP(MFW_D, "FWDBG", - (char *)((t_u8 *) & prx_pkt->eth803_hdr + + (char *)((t_u8 *)&prx_pkt->eth803_hdr + SIZE_OF_DBG_STRUCT), prx_pd->rx_pkt_length); PRINTM(MFW_D, "FWDBG::\n"); @@ -370,15 +384,15 @@ wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf) memcmp(pmadapter, &prx_pkt->rfc1042_hdr.snap_type, ipx_snap_type, sizeof(ipx_snap_type)))) { /* - * Replace the 803 header and rfc1042 header (llc/snap) with an - * EthernetII header, keep the src/dst and snap_type (ethertype). - * The firmware only passes up SNAP frames converting - * all RX Data from 802.11 to 802.2/LLC/SNAP frames. - * To create the Ethernet II, just move the src, dst address right - * before the snap_type. + * Replace the 803 header and rfc1042 header (llc/snap) with an + * EthernetII header, keep the src/dst and snap_type (ethertype). + * The firmware only passes up SNAP frames converting + * all RX Data from 802.11 to 802.2/LLC/SNAP frames. + * To create the Ethernet II, just move the src, dst address + * right before the snap_type. */ peth_hdr = (EthII_Hdr_t *) - ((t_u8 *) & prx_pkt->eth803_hdr + ((t_u8 *)&prx_pkt->eth803_hdr + sizeof(prx_pkt->eth803_hdr) + sizeof(prx_pkt->rfc1042_hdr) - sizeof(prx_pkt->eth803_hdr.dest_addr) @@ -394,23 +408,27 @@ wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf) /* Chop off the RxPD + the excess memory from the 802.2/llc/snap header that was removed. */ - hdr_chop = (t_u32) ((t_ptr) peth_hdr - (t_ptr) prx_pd); + hdr_chop = (t_u32)((t_ptr)peth_hdr - (t_ptr)prx_pd); } else { HEXDUMP("RX Data: LLC/SNAP", - (t_u8 *) & prx_pkt->rfc1042_hdr, + (t_u8 *)&prx_pkt->rfc1042_hdr, sizeof(prx_pkt->rfc1042_hdr)); - if (!memcmp - (pmadapter, &prx_pkt->eth803_hdr.h803_len, tdls_action_type, - sizeof(tdls_action_type))) { + if ((priv->hotspot_cfg & HOTSPOT_ENABLED) && + discard_gratuitous_ARP_msg(prx_pkt, pmadapter)) { + ret = MLAN_STATUS_SUCCESS; + PRINTM(MDATA, + "Bypass sending Gratuitous ARP frame to Kernel.\n"); + goto done; + } + if (!memcmp(pmadapter, &prx_pkt->eth803_hdr.h803_len, + tdls_action_type, sizeof(tdls_action_type))) { wlan_process_tdls_action_frame(priv, - ((t_u8 *) prx_pd + + ((t_u8 *)prx_pd + prx_pd->rx_pkt_offset), prx_pd->rx_pkt_length); } /* Chop off the RxPD */ - hdr_chop = - (t_u32) ((t_ptr) & prx_pkt->eth803_hdr - - (t_ptr) prx_pd); + hdr_chop = (t_u32)((t_ptr)&prx_pkt->eth803_hdr - (t_ptr)prx_pd); } /* Chop off the leading header bytes so the it points to the start of @@ -419,45 +437,24 @@ wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf) pmbuf->data_offset += hdr_chop; pmbuf->pparent = MNULL; - DBG_HEXDUMP(MDAT_D, "RxPD", (t_u8 *) prx_pd, + DBG_HEXDUMP(MDAT_D, "RxPD", (t_u8 *)prx_pd, MIN(sizeof(RxPD), MAX_DATA_DUMP_LEN)); DBG_HEXDUMP(MDAT_D, "Rx Payload", - ((t_u8 *) prx_pd + prx_pd->rx_pkt_offset), + ((t_u8 *)prx_pd + prx_pd->rx_pkt_offset), MIN(prx_pd->rx_pkt_length, MAX_DATA_DUMP_LEN)); priv->rxpd_rate = prx_pd->rx_rate; priv->rxpd_htinfo = prx_pd->ht_info; - - if (priv->rxpd_htinfo & MBIT(0)){ //Check for 11n HT20 rates - adj_rx_rate = priv->rxpd_rate + MLAN_RATE_INDEX_MCS0; - PRINTM(MDATA,"wlan_process_rx_packet(): HT20 Rate! ht_info:%x Rx Rate:%d adj_rate:%d\n", - priv->rxpd_htinfo,priv->rxpd_rate,adj_rx_rate); - } - else { //BG rates - adj_rx_rate = (priv->rxpd_rate > MLAN_RATE_INDEX_OFDM0) ? priv->rxpd_rate - 1 : priv->rxpd_rate; - PRINTM(MDATA,"wlan_process_rx_packet(): HT20 Rate! ht_info:%x Rx Rate:%d adj_rate:%d\n", - priv->rxpd_htinfo,priv->rxpd_rate,adj_rx_rate); - } - - if (pmlan_hist) - { - unsigned long curr_size; - curr_size = atomic_read(&(pmlan_hist->num_samples)); - if (curr_size > MLAN_HIST_MAX_SAMPLES) - { - mlan_hist_data_reset(); - } - - mlan_hist_data_set( adj_rx_rate, prx_pd->snr, prx_pd->nf); - } - else - { - pmlan_hist = (mlan_hgm_data *) kmalloc(sizeof(mlan_hgm_data),GFP_KERNEL); - - if (pmlan_hist){ - mlan_hist_data_reset(); - mlan_hist_data_set( adj_rx_rate, prx_pd->snr, prx_pd->nf); - } - } + if (priv->bss_type == MLAN_BSS_TYPE_STA) { + adj_rx_rate = + wlan_adjust_data_rate(priv, priv->rxpd_rate, + priv->rxpd_htinfo); + pmadapter->callbacks.moal_hist_data_add(pmadapter->pmoal_handle, + pmbuf->bss_index, + adj_rx_rate, + prx_pd->snr, + prx_pd->nf, + prx_pd->antenna); + } pmadapter->callbacks.moal_get_system_time(pmadapter->pmoal_handle, &pmbuf->out_ts_sec, @@ -467,6 +464,25 @@ wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf) pmbuf->out_ts_sec, pmbuf->out_ts_usec, prx_pd->seq_num, prx_pd->priority); +#ifdef DRV_EMBEDDED_SUPPLICANT + if (priv->adapter->psdio_device->driver_supplicant_auth && + supplicantIsEnabled(priv->psapriv) && + (!memcmp + (pmadapter, &prx_pkt->eth803_hdr.h803_len, eapol_type, + sizeof(eapol_type)))) { + // BML_SET_OFFSET(bufDesc, offset); + if (ProcessEAPoLPkt(priv->psapriv, pmbuf)) { + wlan_free_mlan_buffer(pmadapter, pmbuf); + ret = MLAN_STATUS_SUCCESS; + PRINTM(MMSG, + "host supplicant eapol pkt process done.\n"); + + LEAVE(); + return ret; + } + } +#endif + ret = pmadapter->callbacks.moal_recv_packet(pmadapter->pmoal_handle, pmbuf); if (ret == MLAN_STATUS_FAILURE) { @@ -502,7 +518,7 @@ int mlan_register_peer_mac_cb(MOAL_PEER_MGMT_FRAME_CB fn) mlan_status wlan_sta_check_mgmt_frame(mlan_private *priv, t_u8 *payload, t_u32 payload_len, RxPD *prxpd) { - + pmlan_adapter pmadapter = priv->adapter; pmlan_callbacks pcb = &pmadapter->callbacks; mlan_status ret = MLAN_STATUS_SUCCESS; @@ -528,9 +544,12 @@ mlan_status wlan_sta_check_mgmt_frame(mlan_private *priv, t_u8 *payload, t_u32 p PRINTM(MINFO,"PRB_REQ:snr:%d,nf:%d,mac:%02x:%02x:%02x:%02x:%02x:%02x fromDS:%d\n", snr,nf,ph->addr2[0],ph->addr2[1],ph->addr2[2], ph->addr2[3],ph->addr2[4],ph->addr2[5],fromDS); - if ((0 == fromDS) && (moal_peer_mgmt_frame_callback)) { + if ((0 == fromDS) && (moal_peer_mgmt_frame_callback) && + (priv->bss_type == MLAN_BSS_TYPE_STA)) { /* OK, add this to peer list*/ - moal_peer_mgmt_frame_callback(snr, nf, sig_st, ph->addr2); + //moal_peer_mgmt_frame_callback(snr, nf, sig_st, ph->addr2); + pmadapter->callbacks.moal_peer_mgmt_frame(pmadapter->pmoal_handle, + priv->bss_index, snr, nf, sig_st, ph->addr2); } else PRINTM(MERROR,"peer callback function not registered!\n"); @@ -560,9 +579,9 @@ mlan_status wlan_sta_check_mgmt_frame(mlan_private *priv, t_u8 *payload, t_u32 p * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_ops_sta_process_rx_packet(IN t_void * adapter, IN pmlan_buffer pmbuf) +wlan_ops_sta_process_rx_packet(IN t_void *adapter, IN pmlan_buffer pmbuf) { - pmlan_adapter pmadapter = (pmlan_adapter) adapter; + pmlan_adapter pmadapter = (pmlan_adapter)adapter; mlan_status ret = MLAN_STATUS_SUCCESS; RxPD *prx_pd; RxPacketHdr_t *prx_pkt; @@ -573,14 +592,14 @@ wlan_ops_sta_process_rx_packet(IN t_void * adapter, IN pmlan_buffer pmbuf) sta_node *sta_ptr = MNULL; ENTER(); - prx_pd = (RxPD *) (pmbuf->pbuf + pmbuf->data_offset); + prx_pd = (RxPD *)(pmbuf->pbuf + pmbuf->data_offset); /* Endian conversion */ endian_convert_RxPD(prx_pd); rx_pkt_type = prx_pd->rx_pkt_type; - prx_pkt = (RxPacketHdr_t *) ((t_u8 *) prx_pd + prx_pd->rx_pkt_offset); + prx_pkt = (RxPacketHdr_t *)((t_u8 *)prx_pd + prx_pd->rx_pkt_offset); if ((prx_pd->rx_pkt_offset + prx_pd->rx_pkt_length) > - (t_u16) pmbuf->data_len) { + (t_u16)pmbuf->data_len) { PRINTM(MERROR, "Wrong rx packet: len=%d,rx_pkt_offset=%d," " rx_pkt_length=%d\n", pmbuf->data_len, @@ -597,8 +616,8 @@ wlan_ops_sta_process_rx_packet(IN t_void * adapter, IN pmlan_buffer pmbuf) /* Check if this is mgmt packet and needs to forwarded to app as an event */ pmgmt_pkt_hdr = - (wlan_mgmt_pkt *) ((t_u8 *) prx_pd + - prx_pd->rx_pkt_offset); + (wlan_mgmt_pkt *)((t_u8 *)prx_pd + + prx_pd->rx_pkt_offset); pmgmt_pkt_hdr->frm_len = wlan_le16_to_cpu(pmgmt_pkt_hdr->frm_len); @@ -606,15 +625,14 @@ wlan_ops_sta_process_rx_packet(IN t_void * adapter, IN pmlan_buffer pmbuf) & IEEE80211_FC_MGMT_FRAME_TYPE_MASK) == 0){ wlan_process_802dot11_mgmt_pkt(pmadapter-> priv[pmbuf->bss_index], - (t_u8 *) & - pmgmt_pkt_hdr-> + (t_u8 *)&pmgmt_pkt_hdr-> wlan_header, pmgmt_pkt_hdr->frm_len + sizeof(wlan_mgmt_pkt) - sizeof(pmgmt_pkt_hdr-> - frm_len)); - + frm_len),prx_pd); + wlan_sta_check_mgmt_frame(pmadapter->priv[pmbuf->bss_index], (t_u8 *) &pmgmt_pkt_hdr->wlan_header, pmgmt_pkt_hdr->frm_len + @@ -652,6 +670,13 @@ wlan_ops_sta_process_rx_packet(IN t_void * adapter, IN pmlan_buffer pmbuf) prx_pd->seq_num; sta_ptr->snr = prx_pd->snr; sta_ptr->nf = prx_pd->nf; + pmadapter->callbacks. + moal_updata_peer_signal(pmadapter-> + pmoal_handle, + pmbuf-> + bss_index, ta, + prx_pd->snr, + prx_pd->nf); } } } else { @@ -666,8 +691,8 @@ wlan_ops_sta_process_rx_packet(IN t_void * adapter, IN pmlan_buffer pmbuf) if ((priv->port_ctrl_mode == MTRUE && priv->port_open == MFALSE) && (rx_pkt_type != PKT_TYPE_BAR)) { mlan_11n_rxreorder_pkt(priv, prx_pd->seq_num, prx_pd->priority, - ta, (t_u8) prx_pd->rx_pkt_type, - (t_void *) RX_PKT_DROPPED_IN_FW); + ta, (t_u8)prx_pd->rx_pkt_type, + (t_void *)RX_PKT_DROPPED_IN_FW); wlan_process_rx_packet(pmadapter, pmbuf); goto done; } @@ -675,7 +700,7 @@ wlan_ops_sta_process_rx_packet(IN t_void * adapter, IN pmlan_buffer pmbuf) /* Reorder and send to OS */ ret = mlan_11n_rxreorder_pkt(priv, prx_pd->seq_num, prx_pd->priority, ta, - (t_u8) prx_pd->rx_pkt_type, (void *)pmbuf); + (t_u8)prx_pd->rx_pkt_type, (void *)pmbuf); if (ret || (rx_pkt_type == PKT_TYPE_BAR) ) { wlan_free_mlan_buffer(pmadapter, pmbuf); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_tx.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_tx.c old mode 100755 new mode 100644 index eca67458..a649b71c --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_tx.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_sta_tx.c @@ -50,15 +50,15 @@ Change log: /** * @brief This function fill the txpd for tx packet * - * @param priv A pointer to mlan_private structure + * @param priv A pointer to mlan_private structure * @param pmbuf A pointer to the mlan_buffer for process * * @return headptr or MNULL */ t_void * -wlan_ops_sta_process_txpd(IN t_void * priv, IN pmlan_buffer pmbuf) +wlan_ops_sta_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf) { - mlan_private *pmpriv = (mlan_private *) priv; + mlan_private *pmpriv = (mlan_private *)priv; pmlan_adapter pmadapter = pmpriv->adapter; TxPD *plocal_tx_pd; t_u8 *head_ptr = MNULL; @@ -97,17 +97,17 @@ wlan_ops_sta_process_txpd(IN t_void * priv, IN pmlan_buffer pmbuf) head_ptr = pmbuf->pbuf + pmbuf->data_offset - sizeof(TxPD) - INTF_HEADER_LEN; - head_ptr = (t_u8 *) ((t_ptr) head_ptr & ~((t_ptr) (DMA_ALIGNMENT - 1))); + head_ptr = (t_u8 *)((t_ptr)head_ptr & ~((t_ptr)(DMA_ALIGNMENT - 1))); - plocal_tx_pd = (TxPD *) (head_ptr + INTF_HEADER_LEN); + plocal_tx_pd = (TxPD *)(head_ptr + INTF_HEADER_LEN); memset(pmadapter, plocal_tx_pd, 0, sizeof(TxPD)); /* Set the BSS number to TxPD */ plocal_tx_pd->bss_num = GET_BSS_NUM(pmpriv); plocal_tx_pd->bss_type = pmpriv->bss_type; - plocal_tx_pd->tx_pkt_length = (t_u16) pmbuf->data_len; + plocal_tx_pd->tx_pkt_length = (t_u16)pmbuf->data_len; - plocal_tx_pd->priority = (t_u8) pmbuf->priority; + plocal_tx_pd->priority = (t_u8)pmbuf->priority; plocal_tx_pd->pkt_delay_2ms = wlan_wmm_compute_driver_packet_delay(pmpriv, pmbuf); @@ -132,8 +132,8 @@ wlan_ops_sta_process_txpd(IN t_void * priv, IN pmlan_buffer pmbuf) plocal_tx_pd->flags |= MRVDRV_TxPD_FLAGS_TDLS_PACKET; /* Offset of actual data */ plocal_tx_pd->tx_pkt_offset = - (t_u16) ((t_ptr) pmbuf->pbuf + pmbuf->data_offset - - (t_ptr) plocal_tx_pd); + (t_u16)((t_ptr)pmbuf->pbuf + pmbuf->data_offset - + (t_ptr)plocal_tx_pd); if (!plocal_tx_pd->tx_control) { /* TxCtrl set by user or default */ @@ -141,15 +141,19 @@ wlan_ops_sta_process_txpd(IN t_void * priv, IN pmlan_buffer pmbuf) } if (pmbuf->buf_type == MLAN_BUF_TYPE_RAW_DATA) { - plocal_tx_pd->tx_pkt_type = (t_u16) pkt_type; + plocal_tx_pd->tx_pkt_type = (t_u16)pkt_type; plocal_tx_pd->tx_control = tx_control; } + if (pmbuf->flags & MLAN_BUF_FLAG_TX_STATUS) { + plocal_tx_pd->tx_token_id = (t_u8)pmbuf->tx_seq_num; + plocal_tx_pd->flags |= MRVDRV_TxPD_FLAGS_TX_PACKET_STATUS; + } endian_convert_TxPD(plocal_tx_pd); /* Adjust the data offset and length to include TxPD in pmbuf */ pmbuf->data_len += pmbuf->data_offset; - pmbuf->data_offset = (t_u32) (head_ptr - pmbuf->pbuf); + pmbuf->data_offset = (t_u32)(head_ptr - pmbuf->pbuf); pmbuf->data_len -= pmbuf->data_offset; done: @@ -208,7 +212,7 @@ wlan_send_null_packet(pmlan_private priv, t_u8 flags) pmbuf->buf_type = MLAN_BUF_TYPE_DATA; ptr = pmbuf->pbuf + pmbuf->data_offset; pmbuf->data_len = sizeof(TxPD) + INTF_HEADER_LEN; - ptx_pd = (TxPD *) (ptr + INTF_HEADER_LEN); + ptx_pd = (TxPD *)(ptr + INTF_HEADER_LEN); ptx_pd->tx_control = priv->pkt_tx_ctrl; ptx_pd->flags = flags; ptx_pd->priority = WMM_HIGHEST_PRIORITY; @@ -239,7 +243,6 @@ wlan_send_null_packet(pmlan_private priv, t_u8 flags) pmadapter->tx_lock_flag = MTRUE; break; case MLAN_STATUS_PENDING: - pmadapter->data_sent = MFALSE; pmadapter->tx_lock_flag = MTRUE; break; default: diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_txrx.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_txrx.c old mode 100755 new mode 100644 index b6260942..d9f0145f --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_txrx.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_txrx.c @@ -69,7 +69,7 @@ wlan_handle_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf) ENTER(); - prx_pd = (RxPD *) (pmbuf->pbuf + pmbuf->data_offset); + prx_pd = (RxPD *)(pmbuf->pbuf + pmbuf->data_offset); /* Get the BSS number from RxPD, get corresponding priv */ priv = wlan_get_priv_by_id(pmadapter, prx_pd->bss_num & BSS_NUM_MASK, prx_pd->bss_type); @@ -95,8 +95,7 @@ wlan_handle_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise failure */ mlan_status -wlan_process_tx(pmlan_private priv, pmlan_buffer pmbuf, - mlan_tx_param * tx_param) +wlan_process_tx(pmlan_private priv, pmlan_buffer pmbuf, mlan_tx_param *tx_param) { mlan_status ret = MLAN_STATUS_SUCCESS; pmlan_adapter pmadapter = priv->adapter; @@ -109,7 +108,7 @@ wlan_process_tx(pmlan_private priv, pmlan_buffer pmbuf, #endif ENTER(); - head_ptr = (t_u8 *) priv->ops.process_txpd(priv, pmbuf); + head_ptr = (t_u8 *)priv->ops.process_txpd(priv, pmbuf); if (!head_ptr) { pmbuf->status_code = MLAN_ERROR_PKT_INVALID; ret = MLAN_STATUS_FAILURE; @@ -117,7 +116,7 @@ wlan_process_tx(pmlan_private priv, pmlan_buffer pmbuf, } #ifdef STA_SUPPORT if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) - plocal_tx_pd = (TxPD *) (head_ptr + INTF_HEADER_LEN); + plocal_tx_pd = (TxPD *)(head_ptr + INTF_HEADER_LEN); #endif ret = wlan_sdio_host_to_card(pmadapter, MLAN_TYPE_DATA, pmbuf, tx_param); @@ -142,7 +141,6 @@ wlan_process_tx(pmlan_private priv, pmlan_buffer pmbuf, wlan_write_data_complete(pmadapter, pmbuf, ret); break; case MLAN_STATUS_PENDING: - pmadapter->data_sent = MFALSE; DBG_HEXDUMP(MDAT_D, "Tx", head_ptr + INTF_HEADER_LEN, MIN(pmbuf->data_len + sizeof(TxPD), MAX_DATA_DUMP_LEN)); @@ -270,7 +268,7 @@ wlan_recv_packet_complete(IN pmlan_adapter pmadapter, * @return N/A */ t_void -wlan_add_buf_bypass_txqueue(mlan_adapter * pmadapter, pmlan_buffer pmbuf) +wlan_add_buf_bypass_txqueue(mlan_adapter *pmadapter, pmlan_buffer pmbuf) { pmlan_private priv = pmadapter->priv[pmbuf->bss_index]; ENTER(); @@ -281,7 +279,7 @@ wlan_add_buf_bypass_txqueue(mlan_adapter * pmadapter, pmlan_buffer pmbuf) priv->bypass_txq.plock); pmadapter->bypass_pkt_count++; util_enqueue_list_tail(pmadapter->pmoal_handle, &priv->bypass_txq, - (pmlan_linked_list) pmbuf, MNULL, MNULL); + (pmlan_linked_list)pmbuf, MNULL, MNULL); pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, priv->bypass_txq.plock); LEAVE(); @@ -295,7 +293,7 @@ wlan_add_buf_bypass_txqueue(mlan_adapter * pmadapter, pmlan_buffer pmbuf) * @return MFALSE if not empty; MTRUE if empty */ INLINE t_u8 -wlan_bypass_tx_list_empty(mlan_adapter * pmadapter) +wlan_bypass_tx_list_empty(mlan_adapter *pmadapter) { return (pmadapter->bypass_pkt_count) ? MFALSE : MTRUE; } @@ -308,7 +306,7 @@ wlan_bypass_tx_list_empty(mlan_adapter * pmadapter) * @return N/A */ t_void -wlan_cleanup_bypass_txq(mlan_private * priv) +wlan_cleanup_bypass_txq(mlan_private *priv) { pmlan_buffer pmbuf; mlan_adapter *pmadapter = priv->adapter; @@ -316,11 +314,11 @@ wlan_cleanup_bypass_txq(mlan_private * priv) pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, priv->bypass_txq.plock); while ((pmbuf = - (pmlan_buffer) util_peek_list(pmadapter->pmoal_handle, - &priv->bypass_txq, MNULL, - MNULL))) { + (pmlan_buffer)util_peek_list(pmadapter->pmoal_handle, + &priv->bypass_txq, MNULL, + MNULL))) { util_unlink_list(pmadapter->pmoal_handle, &priv->bypass_txq, - (pmlan_linked_list) pmbuf, MNULL, MNULL); + (pmlan_linked_list)pmbuf, MNULL, MNULL); wlan_write_data_complete(pmadapter, pmbuf, MLAN_STATUS_FAILURE); pmadapter->bypass_pkt_count--; } @@ -348,16 +346,16 @@ wlan_process_bypass_tx(pmlan_adapter pmadapter) for (j = 0; j < pmadapter->priv_num; ++j) { priv = pmadapter->priv[j]; if (priv) { - pmbuf = (pmlan_buffer) util_dequeue_list(pmadapter-> - pmoal_handle, - &priv-> - bypass_txq, - pmadapter-> - callbacks. - moal_spin_lock, - pmadapter-> - callbacks. - moal_spin_unlock); + pmbuf = (pmlan_buffer)util_dequeue_list(pmadapter-> + pmoal_handle, + &priv-> + bypass_txq, + pmadapter-> + callbacks. + moal_spin_lock, + pmadapter-> + callbacks. + moal_spin_unlock); if (pmbuf) { PRINTM(MINFO, "Dequeuing bypassed packet %p\n", pmbuf); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_uap.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_uap.h old mode 100755 new mode 100644 index ecab9fac..dbf5600c --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_uap.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_uap.h @@ -69,28 +69,32 @@ Change log: mlan_status wlan_uap_get_channel(IN pmlan_private pmpriv); -mlan_status wlan_ops_uap_ioctl(t_void * adapter, pmlan_ioctl_req pioctl_req); +mlan_status wlan_uap_set_channel(IN pmlan_private pmpriv, + IN t_u8 uap_band_cfg, IN t_u8 channel); -mlan_status wlan_ops_uap_prepare_cmd(IN t_void * priv, +mlan_status wlan_uap_get_beacon_dtim(IN pmlan_private pmpriv); + +mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req); + +mlan_status wlan_ops_uap_prepare_cmd(IN t_void *priv, IN t_u16 cmd_no, IN t_u16 cmd_action, IN t_u32 cmd_oid, - IN t_void * pioctl_buf, - IN t_void * pdata_buf, - IN t_void * pcmd_buf); + IN t_void *pioctl_buf, + IN t_void *pdata_buf, IN t_void *pcmd_buf); -mlan_status wlan_ops_uap_process_cmdresp(IN t_void * priv, +mlan_status wlan_ops_uap_process_cmdresp(IN t_void *priv, IN t_u16 cmdresp_no, - IN t_void * pcmd_buf, - IN t_void * pioctl); + IN t_void *pcmd_buf, + IN t_void *pioctl); -mlan_status wlan_ops_uap_process_rx_packet(IN t_void * adapter, +mlan_status wlan_ops_uap_process_rx_packet(IN t_void *adapter, IN pmlan_buffer pmbuf); -mlan_status wlan_ops_uap_process_event(IN t_void * priv); +mlan_status wlan_ops_uap_process_event(IN t_void *priv); -t_void *wlan_ops_uap_process_txpd(IN t_void * priv, IN pmlan_buffer pmbuf); +t_void *wlan_ops_uap_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf); -mlan_status wlan_ops_uap_init_cmd(IN t_void * priv, IN t_u8 first_bss); +mlan_status wlan_ops_uap_init_cmd(IN t_void *priv, IN t_u8 first_bss); #endif /* _MLAN_UAP_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_uap_cmdevent.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_uap_cmdevent.c old mode 100755 new mode 100644 index 31949e58..ae24d76f --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_uap_cmdevent.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_uap_cmdevent.c @@ -33,6 +33,10 @@ Change log: #include "mlan_uap.h" #include "mlan_sdio.h" #include "mlan_11n.h" +#include "mlan_11h.h" +#ifdef DRV_EMBEDDED_AUTHENTICATOR +#include "authenticator_api.h" +#endif /******************************************************** Local Functions @@ -47,8 +51,8 @@ Change log: * @return N/A */ static void -uap_process_cmdresp_error(mlan_private * pmpriv, HostCmd_DS_COMMAND * resp, - mlan_ioctl_req * pioctl_buf) +uap_process_cmdresp_error(mlan_private *pmpriv, HostCmd_DS_COMMAND *resp, + mlan_ioctl_req *pioctl_buf) { mlan_adapter *pmadapter = pmpriv->adapter; @@ -65,7 +69,7 @@ uap_process_cmdresp_error(mlan_private * pmpriv, HostCmd_DS_COMMAND * resp, case HOST_CMD_APCMD_SYS_CONFIGURE: { HostCmd_DS_SYS_CONFIG *sys_config = - (HostCmd_DS_SYS_CONFIG *) & resp->params. + (HostCmd_DS_SYS_CONFIG *)&resp->params. sys_config; t_u16 resp_len = 0, travel_len = 0, index; mlan_ds_misc_custom_ie *cust_ie = MNULL; @@ -74,11 +78,11 @@ uap_process_cmdresp_error(mlan_private * pmpriv, HostCmd_DS_COMMAND * resp, if (pioctl_buf->req_id != MLAN_IOCTL_MISC_CFG) break; - misc = (mlan_ds_misc_cfg *) pioctl_buf->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; if ((pioctl_buf->action == MLAN_ACT_SET) && (misc->sub_command == MLAN_OID_MISC_CUSTOM_IE)) { cust_ie = - (mlan_ds_misc_custom_ie *) sys_config-> + (mlan_ds_misc_custom_ie *)sys_config-> tlv_buffer; if (cust_ie) { cust_ie->type = @@ -97,9 +101,9 @@ uap_process_cmdresp_error(mlan_private * pmpriv, HostCmd_DS_COMMAND * resp, while (resp_len > sizeof(t_u16)) { cptr = (custom_ie - *) (((t_u8 *) cust_ie-> - ie_data_list) + - travel_len); + *)(((t_u8 *)cust_ie-> + ie_data_list) + + travel_len); index = cptr->ie_index = wlan_le16_to_cpu(cptr-> ie_index); @@ -167,30 +171,30 @@ uap_process_cmdresp_error(mlan_private * pmpriv, HostCmd_DS_COMMAND * resp, * @return A pointer to structure sta_node */ void -wlan_notify_station_deauth(mlan_private * priv) +wlan_notify_station_deauth(mlan_private *priv) { sta_node *sta_ptr; t_u8 event_buf[100]; - mlan_event *pevent = (mlan_event *) event_buf; + mlan_event *pevent = (mlan_event *)event_buf; t_u8 *pbuf; ENTER(); - sta_ptr = (sta_node *) util_peek_list(priv->adapter->pmoal_handle, - &priv->sta_list, - priv->adapter->callbacks. - moal_spin_lock, - priv->adapter->callbacks. - moal_spin_unlock); + sta_ptr = (sta_node *)util_peek_list(priv->adapter->pmoal_handle, + &priv->sta_list, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); if (!sta_ptr) { LEAVE(); return; } - while (sta_ptr != (sta_node *) & priv->sta_list) { + while (sta_ptr != (sta_node *)&priv->sta_list) { memset(priv->adapter, event_buf, 0, sizeof(event_buf)); pevent->bss_index = priv->bss_index; pevent->event_id = MLAN_EVENT_ID_UAP_FW_STA_DISCONNECT; pevent->event_len = MLAN_MAC_ADDR_LENGTH + 2; - pbuf = (t_u8 *) pevent->event_buf; + pbuf = (t_u8 *)pevent->event_buf; /* reason field set to 0, Unspecified */ memcpy(priv->adapter, pbuf + 2, sta_ptr->mac_addr, MLAN_MAC_ADDR_LENGTH); @@ -213,12 +217,12 @@ wlan_notify_station_deauth(mlan_private * priv) */ static mlan_status wlan_uap_cmd_802_11_hs_cfg(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN hs_config_param * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN hs_config_param *pdata_buf) { HostCmd_DS_802_11_HS_CFG_ENH *phs_cfg = - (HostCmd_DS_802_11_HS_CFG_ENH *) & (cmd->params.opt_hs_cfg); - t_u8 *tlv = (t_u8 *) phs_cfg + sizeof(HostCmd_DS_802_11_HS_CFG_ENH); + (HostCmd_DS_802_11_HS_CFG_ENH *)&(cmd->params.opt_hs_cfg); + t_u8 *tlv = (t_u8 *)phs_cfg + sizeof(HostCmd_DS_802_11_HS_CFG_ENH); MrvlIEtypes_HsWakeHoldoff_t *holdoff_tlv = MNULL; ENTER(); @@ -245,7 +249,7 @@ wlan_uap_cmd_802_11_hs_cfg(IN pmlan_private pmpriv, + sizeof (MrvlIEtypes_HsWakeHoldoff_t)); - holdoff_tlv = (MrvlIEtypes_HsWakeHoldoff_t *) tlv; + holdoff_tlv = (MrvlIEtypes_HsWakeHoldoff_t *)tlv; holdoff_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_HS_WAKE_HOLDOFF); holdoff_tlv->header.len = @@ -271,20 +275,20 @@ wlan_uap_cmd_802_11_hs_cfg(IN pmlan_private pmpriv, * @brief This function prepares command of Tx data pause * * @param pmpriv A pointer to mlan_private structure - * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure * @param cmd_action the action: GET or SET * @param pdata_buf A pointer to data buffer * @return MLAN_STATUS_SUCCESS */ static mlan_status wlan_uap_cmd_txdatapause(pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, - IN t_u16 cmd_action, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) { HostCmd_DS_CMD_TX_DATA_PAUSE *pause_cmd = - (HostCmd_DS_CMD_TX_DATA_PAUSE *) & cmd->params.tx_data_pause; + (HostCmd_DS_CMD_TX_DATA_PAUSE *)&cmd->params.tx_data_pause; mlan_ds_misc_tx_datapause *data_pause = - (mlan_ds_misc_tx_datapause *) pdata_buf; + (mlan_ds_misc_tx_datapause *)pdata_buf; ENTER(); @@ -295,8 +299,8 @@ wlan_uap_cmd_txdatapause(pmlan_private pmpriv, pause_cmd->action = wlan_cpu_to_le16(cmd_action); if (cmd_action == HostCmd_ACT_GEN_SET) { - pause_cmd->enable_tx_pause = (t_u8) data_pause->tx_pause; - pause_cmd->pause_tx_count = (t_u8) data_pause->tx_buf_cnt; + pause_cmd->enable_tx_pause = (t_u8)data_pause->tx_pause; + pause_cmd->pause_tx_count = (t_u8)data_pause->tx_buf_cnt; } LEAVE(); @@ -314,17 +318,17 @@ wlan_uap_cmd_txdatapause(pmlan_private pmpriv, */ static mlan_status wlan_uap_ret_txdatapause(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_CMD_TX_DATA_PAUSE *pause_cmd = - (HostCmd_DS_CMD_TX_DATA_PAUSE *) & resp->params.tx_data_pause; + (HostCmd_DS_CMD_TX_DATA_PAUSE *)&resp->params.tx_data_pause; mlan_ds_misc_cfg *misc_cfg = MNULL; ENTER(); if (pioctl_buf) { - misc_cfg = (mlan_ds_misc_cfg *) pioctl_buf->pbuf; + misc_cfg = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; misc_cfg->param.tx_datapause.tx_pause = pause_cmd->enable_tx_pause; misc_cfg->param.tx_datapause.tx_buf_cnt = @@ -337,7 +341,6 @@ wlan_uap_ret_txdatapause(IN pmlan_private pmpriv, /** * @brief This function will process tx pause event * - * * @param priv A pointer to mlan_private * @param pevent A pointer to event buf * @@ -349,8 +352,8 @@ wlan_process_tx_pause_event(pmlan_private priv, pmlan_buffer pevent) t_u16 tlv_type, tlv_len; int tlv_buf_left = pevent->data_len - sizeof(t_u32); MrvlIEtypesHeader_t *tlv = - (MrvlIEtypesHeader_t *) (pevent->pbuf + pevent->data_offset + - sizeof(t_u32)); + (MrvlIEtypesHeader_t *)(pevent->pbuf + pevent->data_offset + + sizeof(t_u32)); MrvlIEtypes_tx_pause_t *tx_pause_tlv; sta_node *sta_ptr = MNULL; t_u8 bc_mac[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; @@ -367,22 +370,22 @@ wlan_process_tx_pause_event(pmlan_private priv, pmlan_buffer pevent) break; } if (tlv_type == TLV_TYPE_TX_PAUSE) { - tx_pause_tlv = (MrvlIEtypes_tx_pause_t *) tlv; + tx_pause_tlv = (MrvlIEtypes_tx_pause_t *)tlv; PRINTM(MCMND, "TxPause: " MACSTR " pause=%d, pkts=%d\n", MAC2STR(tx_pause_tlv->peermac), tx_pause_tlv->tx_pause, tx_pause_tlv->pkt_cnt); if (!memcmp (priv->adapter, bc_mac, tx_pause_tlv->peermac, - MLAN_MAC_ADDR_LENGTH)) { + MLAN_MAC_ADDR_LENGTH)) wlan_update_ralist_tx_pause(priv, tx_pause_tlv-> peermac, tx_pause_tlv-> tx_pause); - } else if (!memcmp - (priv->adapter, priv->curr_addr, - tx_pause_tlv->peermac, - MLAN_MAC_ADDR_LENGTH)) { + else if (!memcmp + (priv->adapter, priv->curr_addr, + tx_pause_tlv->peermac, + MLAN_MAC_ADDR_LENGTH)) { if (tx_pause_tlv->tx_pause) priv->port_open = MFALSE; else @@ -407,8 +410,8 @@ wlan_process_tx_pause_event(pmlan_private priv, pmlan_buffer pevent) } } tlv_buf_left -= (sizeof(MrvlIEtypesHeader_t) + tlv_len); - tlv = (MrvlIEtypesHeader_t *) ((t_u8 *) tlv + tlv_len + - sizeof(MrvlIEtypesHeader_t)); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len + + sizeof(MrvlIEtypesHeader_t)); } LEAVE(); @@ -426,12 +429,12 @@ wlan_process_tx_pause_event(pmlan_private priv, pmlan_buffer pevent) */ static mlan_status wlan_uap_cmd_ap_config(pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, + IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action, IN pmlan_ioctl_req pioctl_buf) { mlan_ds_bss *bss = MNULL; HostCmd_DS_SYS_CONFIG *sys_config = - (HostCmd_DS_SYS_CONFIG *) & cmd->params.sys_config; + (HostCmd_DS_SYS_CONFIG *)&cmd->params.sys_config; t_u8 *tlv = MNULL; MrvlIEtypes_MacAddr_t *tlv_mac = MNULL; MrvlIEtypes_SsIdParamSet_t *tlv_ssid = MNULL; @@ -482,17 +485,17 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, return MLAN_STATUS_FAILURE; } - bss = (mlan_ds_bss *) pioctl_buf->pbuf; + bss = (mlan_ds_bss *)pioctl_buf->pbuf; cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_SYS_CONFIGURE); sys_config->action = wlan_cpu_to_le16(cmd_action); cmd_size = sizeof(HostCmd_DS_SYS_CONFIG) - 1 + S_DS_GEN; - tlv = (t_u8 *) sys_config->tlv_buffer; + tlv = (t_u8 *)sys_config->tlv_buffer; if (memcmp (pmpriv->adapter, zero_mac, &bss->param.bss_config.mac_addr, MLAN_MAC_ADDR_LENGTH)) { - tlv_mac = (MrvlIEtypes_MacAddr_t *) tlv; + tlv_mac = (MrvlIEtypes_MacAddr_t *)tlv; tlv_mac->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_MAC_ADDRESS); tlv_mac->header.len = wlan_cpu_to_le16(MLAN_MAC_ADDR_LENGTH); @@ -503,10 +506,10 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, } if (bss->param.bss_config.ssid.ssid_len) { - tlv_ssid = (MrvlIEtypes_SsIdParamSet_t *) tlv; + tlv_ssid = (MrvlIEtypes_SsIdParamSet_t *)tlv; tlv_ssid->header.type = wlan_cpu_to_le16(TLV_TYPE_SSID); tlv_ssid->header.len = - wlan_cpu_to_le16((t_u16) bss->param.bss_config.ssid. + wlan_cpu_to_le16((t_u16)bss->param.bss_config.ssid. ssid_len); memcpy(pmpriv->adapter, tlv_ssid->ssid, bss->param.bss_config.ssid.ssid, @@ -520,7 +523,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, if ((bss->param.bss_config.beacon_period >= MIN_BEACON_PERIOD) && (bss->param.bss_config.beacon_period <= MAX_BEACON_PERIOD)) { - tlv_beacon_period = (MrvlIEtypes_beacon_period_t *) tlv; + tlv_beacon_period = (MrvlIEtypes_beacon_period_t *)tlv; tlv_beacon_period->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_BEACON_PERIOD); tlv_beacon_period->header.len = wlan_cpu_to_le16(sizeof(t_u16)); @@ -532,7 +535,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, if ((bss->param.bss_config.dtim_period >= MIN_DTIM_PERIOD) && (bss->param.bss_config.dtim_period <= MAX_DTIM_PERIOD)) { - tlv_dtim_period = (MrvlIEtypes_dtim_period_t *) tlv; + tlv_dtim_period = (MrvlIEtypes_dtim_period_t *)tlv; tlv_dtim_period->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_DTIM_PERIOD); tlv_dtim_period->header.len = wlan_cpu_to_le16(sizeof(t_u8)); @@ -543,7 +546,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, } if (bss->param.bss_config.rates[0]) { - tlv_rates = (MrvlIEtypes_RatesParamSet_t *) tlv; + tlv_rates = (MrvlIEtypes_RatesParamSet_t *)tlv; tlv_rates->header.type = wlan_cpu_to_le16(TLV_TYPE_RATES); for (i = 0; i < MAX_DATA_RATES && bss->param.bss_config.rates[i]; @@ -556,7 +559,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, } if (bss->param.bss_config.tx_data_rate <= DATA_RATE_54M) { - tlv_txrate = (MrvlIEtypes_tx_rate_t *) tlv; + tlv_txrate = (MrvlIEtypes_tx_rate_t *)tlv; tlv_txrate->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_TX_DATA_RATE); tlv_txrate->header.len = wlan_cpu_to_le16(sizeof(t_u16)); @@ -567,7 +570,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, } if (bss->param.bss_config.mcbc_data_rate <= DATA_RATE_54M) { - tlv_mcbc_rate = (MrvlIEtypes_mcbc_rate_t *) tlv; + tlv_mcbc_rate = (MrvlIEtypes_mcbc_rate_t *)tlv; tlv_mcbc_rate->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_MCBC_DATA_RATE); tlv_mcbc_rate->header.len = wlan_cpu_to_le16(sizeof(t_u16)); @@ -578,7 +581,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, } if (bss->param.bss_config.tx_power_level <= MAX_TX_POWER) { - tlv_tx_power = (MrvlIEtypes_tx_power_t *) tlv; + tlv_tx_power = (MrvlIEtypes_tx_power_t *)tlv; tlv_tx_power->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_TX_POWER); tlv_tx_power->header.len = wlan_cpu_to_le16(sizeof(t_u8)); @@ -588,7 +591,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, } if (bss->param.bss_config.bcast_ssid_ctl <= MTRUE) { - tlv_bcast_ssid = (MrvlIEtypes_bcast_ssid_t *) tlv; + tlv_bcast_ssid = (MrvlIEtypes_bcast_ssid_t *)tlv; tlv_bcast_ssid->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_BCAST_SSID_CTL); tlv_bcast_ssid->header.len = wlan_cpu_to_le16(sizeof(t_u8)); @@ -600,7 +603,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, if ((bss->param.bss_config.tx_antenna == ANTENNA_MODE_A) || (bss->param.bss_config.tx_antenna == ANTENNA_MODE_B)) { - tlv_antenna = (MrvlIEtypes_antenna_mode_t *) tlv; + tlv_antenna = (MrvlIEtypes_antenna_mode_t *)tlv; tlv_antenna->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_ANTENNA_CTL); tlv_antenna->header.len = @@ -613,7 +616,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, if ((bss->param.bss_config.rx_antenna == ANTENNA_MODE_A) || (bss->param.bss_config.rx_antenna == ANTENNA_MODE_B)) { - tlv_antenna = (MrvlIEtypes_antenna_mode_t *) tlv; + tlv_antenna = (MrvlIEtypes_antenna_mode_t *)tlv; tlv_antenna->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_ANTENNA_CTL); tlv_antenna->header.len = @@ -625,7 +628,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, } if (bss->param.bss_config.pkt_forward_ctl <= MAX_PKT_FWD_CTRL) { - tlv_pkt_forward = (MrvlIEtypes_pkt_forward_t *) tlv; + tlv_pkt_forward = (MrvlIEtypes_pkt_forward_t *)tlv; tlv_pkt_forward->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_PKT_FWD_CTL); tlv_pkt_forward->header.len = wlan_cpu_to_le16(sizeof(t_u8)); @@ -636,7 +639,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, } if (bss->param.bss_config.max_sta_count <= MAX_STA_COUNT) { - tlv_sta_count = (MrvlIEtypes_max_sta_count_t *) tlv; + tlv_sta_count = (MrvlIEtypes_max_sta_count_t *)tlv; tlv_sta_count->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_MAX_STA_CNT); tlv_sta_count->header.len = wlan_cpu_to_le16(sizeof(t_u16)); @@ -649,7 +652,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, if (((bss->param.bss_config.sta_ageout_timer >= MIN_STAGE_OUT_TIME) && (bss->param.bss_config.sta_ageout_timer <= MAX_STAGE_OUT_TIME)) || (bss->param.bss_config.sta_ageout_timer == 0)) { - tlv_sta_ageout = (MrvlIEtypes_sta_ageout_t *) tlv; + tlv_sta_ageout = (MrvlIEtypes_sta_ageout_t *)tlv; tlv_sta_ageout->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_STA_AGEOUT_TIMER); tlv_sta_ageout->header.len = wlan_cpu_to_le16(sizeof(t_u32)); @@ -664,7 +667,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, && (bss->param.bss_config.ps_sta_ageout_timer <= MAX_STAGE_OUT_TIME)) || (bss->param.bss_config.ps_sta_ageout_timer == 0)) { - tlv_ps_sta_ageout = (MrvlIEtypes_ps_sta_ageout_t *) tlv; + tlv_ps_sta_ageout = (MrvlIEtypes_ps_sta_ageout_t *)tlv; tlv_ps_sta_ageout->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_PS_STA_AGEOUT_TIMER); tlv_ps_sta_ageout->header.len = wlan_cpu_to_le16(sizeof(t_u32)); @@ -675,7 +678,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, tlv += sizeof(MrvlIEtypes_ps_sta_ageout_t); } if (bss->param.bss_config.rts_threshold <= MAX_RTS_THRESHOLD) { - tlv_rts_threshold = (MrvlIEtypes_rts_threshold_t *) tlv; + tlv_rts_threshold = (MrvlIEtypes_rts_threshold_t *)tlv; tlv_rts_threshold->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_RTS_THRESHOLD); tlv_rts_threshold->header.len = wlan_cpu_to_le16(sizeof(t_u16)); @@ -687,7 +690,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, if ((bss->param.bss_config.frag_threshold >= MIN_FRAG_THRESHOLD) && (bss->param.bss_config.frag_threshold <= MAX_FRAG_THRESHOLD)) { - tlv_frag_threshold = (MrvlIEtypes_frag_threshold_t *) tlv; + tlv_frag_threshold = (MrvlIEtypes_frag_threshold_t *)tlv; tlv_frag_threshold->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_FRAG_THRESHOLD); tlv_frag_threshold->header.len = @@ -699,74 +702,82 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, } if (bss->param.bss_config.retry_limit <= MAX_RETRY_LIMIT) { - tlv_retry_limit = (MrvlIEtypes_retry_limit_t *) tlv; + tlv_retry_limit = (MrvlIEtypes_retry_limit_t *)tlv; tlv_retry_limit->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_RETRY_LIMIT); tlv_retry_limit->header.len = wlan_cpu_to_le16(sizeof(t_u8)); tlv_retry_limit->retry_limit = - (t_u8) bss->param.bss_config.retry_limit; + (t_u8)bss->param.bss_config.retry_limit; cmd_size += sizeof(MrvlIEtypes_retry_limit_t); tlv += sizeof(MrvlIEtypes_retry_limit_t); } + if (!pmpriv->adapter->psdio_device->driver_supplicant_auth) { + if (bss->param.bss_config.pairwise_update_timeout < + (MAX_VALID_DWORD)) { + tlv_pairwise_timeout = + (MrvlIEtypes_eapol_pwk_hsk_timeout_t *)tlv; + tlv_pairwise_timeout->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_UAP_EAPOL_PWK_HSK_TIMEOUT); + tlv_pairwise_timeout->header.len = + wlan_cpu_to_le16(sizeof(t_u32)); + tlv_pairwise_timeout->pairwise_update_timeout = + wlan_cpu_to_le32(bss->param.bss_config. + pairwise_update_timeout); + cmd_size += sizeof(MrvlIEtypes_eapol_pwk_hsk_timeout_t); + tlv += sizeof(MrvlIEtypes_eapol_pwk_hsk_timeout_t); + } - if (bss->param.bss_config.pairwise_update_timeout < (MAX_VALID_DWORD)) { - tlv_pairwise_timeout = - (MrvlIEtypes_eapol_pwk_hsk_timeout_t *) tlv; - tlv_pairwise_timeout->header.type = - wlan_cpu_to_le16(TLV_TYPE_UAP_EAPOL_PWK_HSK_TIMEOUT); - tlv_pairwise_timeout->header.len = - wlan_cpu_to_le16(sizeof(t_u32)); - tlv_pairwise_timeout->pairwise_update_timeout = - wlan_cpu_to_le32(bss->param.bss_config. - pairwise_update_timeout); - cmd_size += sizeof(MrvlIEtypes_eapol_pwk_hsk_timeout_t); - tlv += sizeof(MrvlIEtypes_eapol_pwk_hsk_timeout_t); - } + if (bss->param.bss_config.pwk_retries < (MAX_VALID_DWORD)) { + tlv_pairwise_retries = + (MrvlIEtypes_eapol_pwk_hsk_retries_t *)tlv; + tlv_pairwise_retries->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_UAP_EAPOL_PWK_HSK_RETRIES); + tlv_pairwise_retries->header.len = + wlan_cpu_to_le16(sizeof(t_u32)); + tlv_pairwise_retries->pwk_retries = + wlan_cpu_to_le32(bss->param.bss_config. + pwk_retries); + cmd_size += sizeof(MrvlIEtypes_eapol_pwk_hsk_retries_t); + tlv += sizeof(MrvlIEtypes_eapol_pwk_hsk_retries_t); + } - if (bss->param.bss_config.pwk_retries < (MAX_VALID_DWORD)) { - tlv_pairwise_retries = - (MrvlIEtypes_eapol_pwk_hsk_retries_t *) tlv; - tlv_pairwise_retries->header.type = - wlan_cpu_to_le16(TLV_TYPE_UAP_EAPOL_PWK_HSK_RETRIES); - tlv_pairwise_retries->header.len = - wlan_cpu_to_le16(sizeof(t_u32)); - tlv_pairwise_retries->pwk_retries = - wlan_cpu_to_le32(bss->param.bss_config.pwk_retries); - cmd_size += sizeof(MrvlIEtypes_eapol_pwk_hsk_retries_t); - tlv += sizeof(MrvlIEtypes_eapol_pwk_hsk_retries_t); - } - - if (bss->param.bss_config.groupwise_update_timeout < (MAX_VALID_DWORD)) { - tlv_groupwise_timeout = - (MrvlIEtypes_eapol_gwk_hsk_timeout_t *) tlv; - tlv_groupwise_timeout->header.type = - wlan_cpu_to_le16(TLV_TYPE_UAP_EAPOL_GWK_HSK_TIMEOUT); - tlv_groupwise_timeout->header.len = - wlan_cpu_to_le16(sizeof(t_u32)); - tlv_groupwise_timeout->groupwise_update_timeout = - wlan_cpu_to_le32(bss->param.bss_config. - groupwise_update_timeout); - cmd_size += sizeof(MrvlIEtypes_eapol_gwk_hsk_timeout_t); - tlv += sizeof(MrvlIEtypes_eapol_gwk_hsk_timeout_t); - } + if (bss->param.bss_config.groupwise_update_timeout < + (MAX_VALID_DWORD)) { + tlv_groupwise_timeout = + (MrvlIEtypes_eapol_gwk_hsk_timeout_t *)tlv; + tlv_groupwise_timeout->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_UAP_EAPOL_GWK_HSK_TIMEOUT); + tlv_groupwise_timeout->header.len = + wlan_cpu_to_le16(sizeof(t_u32)); + tlv_groupwise_timeout->groupwise_update_timeout = + wlan_cpu_to_le32(bss->param.bss_config. + groupwise_update_timeout); + cmd_size += sizeof(MrvlIEtypes_eapol_gwk_hsk_timeout_t); + tlv += sizeof(MrvlIEtypes_eapol_gwk_hsk_timeout_t); + } - if (bss->param.bss_config.gwk_retries < (MAX_VALID_DWORD)) { - tlv_groupwise_retries = - (MrvlIEtypes_eapol_gwk_hsk_retries_t *) tlv; - tlv_groupwise_retries->header.type = - wlan_cpu_to_le16(TLV_TYPE_UAP_EAPOL_GWK_HSK_RETRIES); - tlv_groupwise_retries->header.len = - wlan_cpu_to_le16(sizeof(t_u32)); - tlv_groupwise_retries->gwk_retries = - wlan_cpu_to_le32(bss->param.bss_config.gwk_retries); - cmd_size += sizeof(MrvlIEtypes_eapol_gwk_hsk_retries_t); - tlv += sizeof(MrvlIEtypes_eapol_gwk_hsk_retries_t); + if (bss->param.bss_config.gwk_retries < (MAX_VALID_DWORD)) { + tlv_groupwise_retries = + (MrvlIEtypes_eapol_gwk_hsk_retries_t *)tlv; + tlv_groupwise_retries->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_UAP_EAPOL_GWK_HSK_RETRIES); + tlv_groupwise_retries->header.len = + wlan_cpu_to_le16(sizeof(t_u32)); + tlv_groupwise_retries->gwk_retries = + wlan_cpu_to_le32(bss->param.bss_config. + gwk_retries); + cmd_size += sizeof(MrvlIEtypes_eapol_gwk_hsk_retries_t); + tlv += sizeof(MrvlIEtypes_eapol_gwk_hsk_retries_t); + } } - if ((bss->param.bss_config.filter.filter_mode <= MAC_FILTER_MODE_BLOCK_MAC) && (bss->param.bss_config.filter.mac_count <= MAX_MAC_FILTER_NUM)) { - tlv_mac_filter = (MrvlIEtypes_mac_filter_t *) tlv; + tlv_mac_filter = (MrvlIEtypes_mac_filter_t *)tlv; tlv_mac_filter->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_STA_MAC_ADDR_FILTER); tlv_mac_filter->header.len = @@ -775,11 +786,11 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, bss->param.bss_config.filter. mac_count); tlv_mac_filter->count = - (t_u8) bss->param.bss_config.filter.mac_count; + (t_u8)bss->param.bss_config.filter.mac_count; tlv_mac_filter->filter_mode = - (t_u8) bss->param.bss_config.filter.filter_mode; + (t_u8)bss->param.bss_config.filter.filter_mode; memcpy(pmpriv->adapter, tlv_mac_filter->mac_address, - (t_u8 *) bss->param.bss_config.filter.mac_list, + (t_u8 *)bss->param.bss_config.filter.mac_list, MLAN_MAC_ADDR_LENGTH * bss->param.bss_config.filter.mac_count); cmd_size += @@ -795,7 +806,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, BAND_CONFIG_MANUAL) && (bss->param.bss_config.channel > 0) && (bss->param.bss_config.channel <= MLAN_MAX_CHANNEL)) || (bss->param.bss_config.band_cfg & BAND_CONFIG_ACS_MODE)) { - tlv_chan_band = (MrvlIEtypes_channel_band_t *) tlv; + tlv_chan_band = (MrvlIEtypes_channel_band_t *)tlv; tlv_chan_band->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_CHAN_BAND_CONFIG); tlv_chan_band->header.len = @@ -808,7 +819,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, if ((bss->param.bss_config.num_of_chan) && (bss->param.bss_config.num_of_chan <= MLAN_MAX_CHANNEL)) { - tlv_chan_list = (MrvlIEtypes_ChanListParamSet_t *) tlv; + tlv_chan_list = (MrvlIEtypes_ChanListParamSet_t *)tlv; tlv_chan_list->header.type = wlan_cpu_to_le16(TLV_TYPE_CHANLIST); tlv_chan_list->header.len = @@ -834,18 +845,18 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, if ((bss->param.bss_config.auth_mode <= MLAN_AUTH_MODE_SHARED) || (bss->param.bss_config.auth_mode == MLAN_AUTH_MODE_AUTO)) { - tlv_auth_type = (MrvlIEtypes_auth_type_t *) tlv; + tlv_auth_type = (MrvlIEtypes_auth_type_t *)tlv; tlv_auth_type->header.type = wlan_cpu_to_le16(TLV_TYPE_AUTH_TYPE); tlv_auth_type->header.len = wlan_cpu_to_le16(sizeof(t_u8)); tlv_auth_type->auth_type = - (t_u8) bss->param.bss_config.auth_mode; + (t_u8)bss->param.bss_config.auth_mode; cmd_size += sizeof(MrvlIEtypes_auth_type_t); tlv += sizeof(MrvlIEtypes_auth_type_t); } if (bss->param.bss_config.protocol) { - tlv_encrypt_protocol = (MrvlIEtypes_encrypt_protocol_t *) tlv; + tlv_encrypt_protocol = (MrvlIEtypes_encrypt_protocol_t *)tlv; tlv_encrypt_protocol->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_ENCRYPT_PROTOCOL); tlv_encrypt_protocol->header.len = @@ -859,7 +870,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, if ((bss->param.bss_config.protocol & PROTOCOL_WPA) || (bss->param.bss_config.protocol & PROTOCOL_WPA2) || (bss->param.bss_config.protocol & PROTOCOL_EAP)) { - tlv_akmp = (MrvlIEtypes_akmp_t *) tlv; + tlv_akmp = (MrvlIEtypes_akmp_t *)tlv; tlv_akmp->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_AKMP); tlv_akmp->key_mgmt = wlan_cpu_to_le16(bss->param.bss_config.key_mgmt); @@ -874,7 +885,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, if (bss->param.bss_config.wpa_cfg. pairwise_cipher_wpa & VALID_CIPHER_BITMAP) { - tlv_pwk_cipher = (MrvlIEtypes_pwk_cipher_t *) tlv; + tlv_pwk_cipher = (MrvlIEtypes_pwk_cipher_t *)tlv; tlv_pwk_cipher->header.type = wlan_cpu_to_le16(TLV_TYPE_PWK_CIPHER); tlv_pwk_cipher->header.len = @@ -891,7 +902,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, if (bss->param.bss_config.wpa_cfg. pairwise_cipher_wpa2 & VALID_CIPHER_BITMAP) { - tlv_pwk_cipher = (MrvlIEtypes_pwk_cipher_t *) tlv; + tlv_pwk_cipher = (MrvlIEtypes_pwk_cipher_t *)tlv; tlv_pwk_cipher->header.type = wlan_cpu_to_le16(TLV_TYPE_PWK_CIPHER); tlv_pwk_cipher->header.len = @@ -908,7 +919,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, if (bss->param.bss_config.wpa_cfg. group_cipher & VALID_CIPHER_BITMAP) { - tlv_gwk_cipher = (MrvlIEtypes_gwk_cipher_t *) tlv; + tlv_gwk_cipher = (MrvlIEtypes_gwk_cipher_t *)tlv; tlv_gwk_cipher->header.type = wlan_cpu_to_le16(TLV_TYPE_GWK_CIPHER); tlv_gwk_cipher->header.len = @@ -920,7 +931,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, } if (bss->param.bss_config.wpa_cfg.rsn_protection <= MTRUE) { - tlv_rsn_prot = (MrvlIEtypes_rsn_replay_prot_t *) tlv; + tlv_rsn_prot = (MrvlIEtypes_rsn_replay_prot_t *)tlv; tlv_rsn_prot->header.type = wlan_cpu_to_le16 (TLV_TYPE_UAP_RSN_REPLAY_PROTECT); @@ -931,35 +942,44 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, cmd_size += sizeof(MrvlIEtypes_rsn_replay_prot_t); tlv += sizeof(MrvlIEtypes_rsn_replay_prot_t); } + if (!pmpriv->adapter->psdio_device->driver_supplicant_auth) { + if (bss->param.bss_config.wpa_cfg.length) { + tlv_passphrase = + (MrvlIEtypes_passphrase_t *)tlv; + tlv_passphrase->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_UAP_WPA_PASSPHRASE); + tlv_passphrase->header.len = + (t_u16)wlan_cpu_to_le16(bss->param. + bss_config. + wpa_cfg.length); + memcpy(pmpriv->adapter, + tlv_passphrase->passphrase, + bss->param.bss_config.wpa_cfg.passphrase, + bss->param.bss_config.wpa_cfg.length); + cmd_size += + sizeof(MrvlIEtypesHeader_t) + + bss->param.bss_config.wpa_cfg.length; + tlv += sizeof(MrvlIEtypesHeader_t) + + bss->param.bss_config.wpa_cfg.length; + } - if (bss->param.bss_config.wpa_cfg.length) { - tlv_passphrase = (MrvlIEtypes_passphrase_t *) tlv; - tlv_passphrase->header.type = - wlan_cpu_to_le16(TLV_TYPE_UAP_WPA_PASSPHRASE); - tlv_passphrase->header.len = - (t_u16) wlan_cpu_to_le16(bss->param.bss_config. - wpa_cfg.length); - memcpy(pmpriv->adapter, tlv_passphrase->passphrase, - bss->param.bss_config.wpa_cfg.passphrase, - bss->param.bss_config.wpa_cfg.length); - cmd_size += - sizeof(MrvlIEtypesHeader_t) + - bss->param.bss_config.wpa_cfg.length; - tlv += sizeof(MrvlIEtypesHeader_t) + - bss->param.bss_config.wpa_cfg.length; - } - - if (bss->param.bss_config.wpa_cfg.gk_rekey_time < MAX_GRP_TIMER) { - tlv_rekey_time = (MrvlIEtypes_group_rekey_time_t *) tlv; - tlv_rekey_time->header.type = - wlan_cpu_to_le16(TLV_TYPE_UAP_GRP_REKEY_TIME); - tlv_rekey_time->header.len = - wlan_cpu_to_le16(sizeof(t_u32)); - tlv_rekey_time->gk_rekey_time = - wlan_cpu_to_le32(bss->param.bss_config.wpa_cfg. - gk_rekey_time); - cmd_size += sizeof(MrvlIEtypes_group_rekey_time_t); - tlv += sizeof(MrvlIEtypes_group_rekey_time_t); + if (bss->param.bss_config.wpa_cfg.gk_rekey_time < + MAX_GRP_TIMER) { + tlv_rekey_time = + (MrvlIEtypes_group_rekey_time_t *)tlv; + tlv_rekey_time->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_UAP_GRP_REKEY_TIME); + tlv_rekey_time->header.len = + wlan_cpu_to_le16(sizeof(t_u32)); + tlv_rekey_time->gk_rekey_time = + wlan_cpu_to_le32(bss->param.bss_config. + wpa_cfg.gk_rekey_time); + cmd_size += + sizeof(MrvlIEtypes_group_rekey_time_t); + tlv += sizeof(MrvlIEtypes_group_rekey_time_t); + } } } else { if ((bss->param.bss_config.wep_cfg.key0.length) && @@ -967,7 +987,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, (bss->param.bss_config.wep_cfg.key0.length == 10) || (bss->param.bss_config.wep_cfg.key0.length == 13) || (bss->param.bss_config.wep_cfg.key0.length == 26))) { - tlv_wep_key = (MrvlIEtypes_wep_key_t *) tlv; + tlv_wep_key = (MrvlIEtypes_wep_key_t *)tlv; tlv_wep_key->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_WEP_KEY); tlv_wep_key->header.len = @@ -993,7 +1013,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, (bss->param.bss_config.wep_cfg.key1.length == 10) || (bss->param.bss_config.wep_cfg.key1.length == 13) || (bss->param.bss_config.wep_cfg.key1.length == 26))) { - tlv_wep_key = (MrvlIEtypes_wep_key_t *) tlv; + tlv_wep_key = (MrvlIEtypes_wep_key_t *)tlv; tlv_wep_key->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_WEP_KEY); tlv_wep_key->header.len = @@ -1019,7 +1039,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, (bss->param.bss_config.wep_cfg.key2.length == 10) || (bss->param.bss_config.wep_cfg.key2.length == 13) || (bss->param.bss_config.wep_cfg.key2.length == 26))) { - tlv_wep_key = (MrvlIEtypes_wep_key_t *) tlv; + tlv_wep_key = (MrvlIEtypes_wep_key_t *)tlv; tlv_wep_key->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_WEP_KEY); tlv_wep_key->header.len = @@ -1045,7 +1065,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, (bss->param.bss_config.wep_cfg.key3.length == 10) || (bss->param.bss_config.wep_cfg.key3.length == 13) || (bss->param.bss_config.wep_cfg.key3.length == 26))) { - tlv_wep_key = (MrvlIEtypes_wep_key_t *) tlv; + tlv_wep_key = (MrvlIEtypes_wep_key_t *)tlv; tlv_wep_key->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_WEP_KEY); tlv_wep_key->header.len = @@ -1068,7 +1088,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, } if ((bss->param.bss_config.ht_cap_info) ) { - tlv_htcap = (MrvlIETypes_HTCap_t *) tlv; + tlv_htcap = (MrvlIETypes_HTCap_t *)tlv; tlv_htcap->header.type = wlan_cpu_to_le16(HT_CAPABILITY); tlv_htcap->header.len = wlan_cpu_to_le16(sizeof(HTCap_t)); tlv_htcap->ht_cap.ht_cap_info = @@ -1086,7 +1106,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, tlv += sizeof(MrvlIETypes_HTCap_t); } if (bss->param.bss_config.mgmt_ie_passthru_mask < (MAX_VALID_DWORD)) { - tlv_mgmt_ie_passthru = (MrvlIEtypes_mgmt_ie_passthru_t *) tlv; + tlv_mgmt_ie_passthru = (MrvlIEtypes_mgmt_ie_passthru_t *)tlv; tlv_mgmt_ie_passthru->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_MGMT_IE_PASSTHRU_MASK); tlv_mgmt_ie_passthru->header.len = @@ -1103,7 +1123,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, if (((bss->param.bss_config.enable_2040coex == 0) || (bss->param.bss_config.enable_2040coex == 1)) ) { - tlv_2040_coex_enable = (MrvlIEtypes_2040_coex_enable_t *) tlv; + tlv_2040_coex_enable = (MrvlIEtypes_2040_coex_enable_t *)tlv; tlv_2040_coex_enable->header.type = wlan_cpu_to_le16(TLV_TYPE_2040_BSS_COEX_CONTROL); tlv_2040_coex_enable->header.len = @@ -1115,7 +1135,7 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, } if (bss->param.bss_config.wmm_para.qos_info == 0x80 || bss->param.bss_config.wmm_para.qos_info == 0x00) { - tlv_wmm_parameter = (MrvlIEtypes_wmm_parameter_t *) tlv; + tlv_wmm_parameter = (MrvlIEtypes_wmm_parameter_t *)tlv; tlv_wmm_parameter->header.type = wlan_cpu_to_le16(TLV_TYPE_VENDOR_SPECIFIC_IE); tlv_wmm_parameter->header.len = @@ -1152,8 +1172,12 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, cmd_size += sizeof(MrvlIEtypes_wmm_parameter_t); tlv += sizeof(MrvlIEtypes_wmm_parameter_t); } - - cmd->size = (t_u16) wlan_cpu_to_le16(cmd_size); +#ifdef DRV_EMBEDDED_AUTHENTICATOR + if (pmpriv->adapter->psdio_device->driver_supplicant_auth) + AuthenticatorBssConfig(pmpriv->psapriv, + (t_u8 *)&bss->param.bss_config, 0, 0, 0); +#endif + cmd->size = (t_u16)wlan_cpu_to_le16(cmd_size); PRINTM(MCMND, "AP config: cmd_size=%d\n", cmd_size); LEAVE(); return MLAN_STATUS_SUCCESS; @@ -1170,20 +1194,24 @@ wlan_uap_cmd_ap_config(pmlan_private pmpriv, */ static mlan_status wlan_uap_cmd_sys_configure(pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, + IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action, - IN pmlan_ioctl_req pioctl_buf, IN t_void * pdata_buf) + IN pmlan_ioctl_req pioctl_buf, IN t_void *pdata_buf) { mlan_ds_bss *bss = MNULL; HostCmd_DS_SYS_CONFIG *sys_config = - (HostCmd_DS_SYS_CONFIG *) & cmd->params.sys_config; + (HostCmd_DS_SYS_CONFIG *)&cmd->params.sys_config; MrvlIEtypes_MacAddr_t *mac_tlv = MNULL; MrvlIEtypes_channel_band_t *chan_band_tlv = MNULL, *pdat_tlv_cb = MNULL; + MrvlIEtypes_beacon_period_t *bcn_pd_tlv = MNULL, *pdat_tlv_bcnpd = + MNULL; + MrvlIEtypes_dtim_period_t *dtim_pd_tlv = MNULL, *pdat_tlv_dtimpd = + MNULL; + mlan_ds_misc_custom_ie *cust_ie = MNULL; mlan_ds_misc_cfg *misc = MNULL; MrvlIEtypesHeader_t *ie_header = - (MrvlIEtypesHeader_t *) sys_config->tlv_buffer; - t_u8 *ie = - (t_u8 *) sys_config->tlv_buffer + sizeof(MrvlIEtypesHeader_t); + (MrvlIEtypesHeader_t *)sys_config->tlv_buffer; + t_u8 *ie = (t_u8 *)sys_config->tlv_buffer + sizeof(MrvlIEtypesHeader_t); t_u16 req_len = 0, travel_len = 0; custom_ie *cptr = MNULL; mlan_status ret = MLAN_STATUS_SUCCESS; @@ -1195,12 +1223,12 @@ wlan_uap_cmd_sys_configure(pmlan_private pmpriv, cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_SYS_CONFIG) - 1 + S_DS_GEN); if (pioctl_buf == MNULL) { + if (pdata_buf) { - switch (*(t_u16 *) pdata_buf) { + switch (*(t_u16 *)pdata_buf) { case TLV_TYPE_UAP_CHAN_BAND_CONFIG: pdat_tlv_cb = - (MrvlIEtypes_channel_band_t *) - pdata_buf; + (MrvlIEtypes_channel_band_t *)pdata_buf; chan_band_tlv = (MrvlIEtypes_channel_band_t *) sys_config->tlv_buffer; @@ -1227,17 +1255,130 @@ wlan_uap_cmd_sys_configure(pmlan_private pmpriv, } ret = MLAN_STATUS_SUCCESS; break; + case TLV_TYPE_UAP_BEACON_PERIOD: + pdat_tlv_bcnpd = + (MrvlIEtypes_beacon_period_t *) + pdata_buf; + bcn_pd_tlv = + (MrvlIEtypes_beacon_period_t *) + sys_config->tlv_buffer; + cmd->size = + sizeof(HostCmd_DS_SYS_CONFIG) - 1 + + S_DS_GEN + + sizeof(MrvlIEtypes_beacon_period_t); + bcn_pd_tlv->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_UAP_BEACON_PERIOD); + bcn_pd_tlv->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_beacon_period_t) + - + sizeof + (MrvlIEtypesHeader_t)); + if (cmd_action) { + bcn_pd_tlv->beacon_period = + wlan_cpu_to_le16 + (pdat_tlv_bcnpd->beacon_period); + } + /* Add TLV_UAP_DTIM_PERIOD if it follws in + pdata_buf */ + pdat_tlv_dtimpd = + (MrvlIEtypes_dtim_period_t + *)(((t_u8 *)pdata_buf) + + + sizeof + (MrvlIEtypes_beacon_period_t)); + if (TLV_TYPE_UAP_DTIM_PERIOD == + pdat_tlv_dtimpd->header.type) { + dtim_pd_tlv = + (MrvlIEtypes_dtim_period_t + *)(sys_config->tlv_buffer + + sizeof + (MrvlIEtypes_beacon_period_t)); + cmd->size += + sizeof + (MrvlIEtypes_dtim_period_t); + dtim_pd_tlv->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_UAP_DTIM_PERIOD); + dtim_pd_tlv->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_dtim_period_t) + - + sizeof + (MrvlIEtypesHeader_t)); + if (cmd_action) { + dtim_pd_tlv->dtim_period = + pdat_tlv_dtimpd-> + dtim_period; + } + } + /* Finalize cmd size */ + cmd->size = wlan_cpu_to_le16(cmd->size); + ret = MLAN_STATUS_SUCCESS; + break; + case TLV_TYPE_MGMT_IE: + cust_ie = (mlan_ds_misc_custom_ie *)pdata_buf; + cmd->size = + wlan_cpu_to_le16(sizeof + (HostCmd_DS_SYS_CONFIG) + - 1 + S_DS_GEN + + sizeof + (MrvlIEtypesHeader_t) + + cust_ie->len); + ie_header->type = + wlan_cpu_to_le16(TLV_TYPE_MGMT_IE); + ie_header->len = wlan_cpu_to_le16(cust_ie->len); + + if (ie && cust_ie->ie_data_list) { + req_len = cust_ie->len; + travel_len = 0; + /* conversion for index, mask, len */ + if (req_len == sizeof(t_u16)) + cust_ie->ie_data_list[0]. + ie_index = + wlan_cpu_to_le16 + (cust_ie-> + ie_data_list[0]. + ie_index); + while (req_len > sizeof(t_u16)) { + cptr = (custom_ie + *)(((t_u8 *)&cust_ie-> + ie_data_list) + + travel_len); + travel_len += + cptr->ie_length + + sizeof(custom_ie) - + MAX_IE_SIZE; + req_len -= + cptr->ie_length + + sizeof(custom_ie) - + MAX_IE_SIZE; + cptr->ie_index = + wlan_cpu_to_le16(cptr-> + ie_index); + cptr->mgmt_subtype_mask = + wlan_cpu_to_le16(cptr-> + mgmt_subtype_mask); + cptr->ie_length = + wlan_cpu_to_le16(cptr-> + ie_length); + } + memcpy(pmpriv->adapter, ie, + cust_ie->ie_data_list, + cust_ie->len); + } + break; default: PRINTM(MERROR, "Wrong data, or missing TLV_TYPE 0x%04x handler.\n", - *(t_u16 *) pdata_buf); + *(t_u16 *)pdata_buf); break; } goto done; } else { mac_tlv = - (MrvlIEtypes_MacAddr_t *) sys_config-> - tlv_buffer; + (MrvlIEtypes_MacAddr_t *)sys_config->tlv_buffer; cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_SYS_CONFIG) - 1 + S_DS_GEN + @@ -1251,11 +1392,10 @@ wlan_uap_cmd_sys_configure(pmlan_private pmpriv, } } if (pioctl_buf->req_id == MLAN_IOCTL_BSS) { - bss = (mlan_ds_bss *) pioctl_buf->pbuf; + bss = (mlan_ds_bss *)pioctl_buf->pbuf; if (bss->sub_command == MLAN_OID_BSS_MAC_ADDR) { mac_tlv = - (MrvlIEtypes_MacAddr_t *) sys_config-> - tlv_buffer; + (MrvlIEtypes_MacAddr_t *)sys_config->tlv_buffer; cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_SYS_CONFIG) - 1 + S_DS_GEN + @@ -1275,7 +1415,7 @@ wlan_uap_cmd_sys_configure(pmlan_private pmpriv, goto done; } } else if (pioctl_buf->req_id == MLAN_IOCTL_MISC_CFG) { - misc = (mlan_ds_misc_cfg *) pioctl_buf->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; if ((misc->sub_command == MLAN_OID_MISC_GEN_IE) && (misc->param.gen_ie.type == MLAN_IE_TYPE_GEN_IE) ) { @@ -1316,9 +1456,9 @@ wlan_uap_cmd_sys_configure(pmlan_private pmpriv, [0].ie_index); while (req_len > sizeof(t_u16)) { cptr = (custom_ie - *) (((t_u8 *) & misc->param. - cust_ie.ie_data_list) + - travel_len); + *)(((t_u8 *)&misc->param. + cust_ie.ie_data_list) + + travel_len); travel_len += cptr->ie_length + sizeof(custom_ie) - MAX_IE_SIZE; @@ -1358,11 +1498,11 @@ wlan_uap_cmd_sys_configure(pmlan_private pmpriv, */ static mlan_status wlan_uap_ret_cmd_ap_config(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_SYS_CONFIG *sys_config = - (HostCmd_DS_SYS_CONFIG *) & resp->params.sys_config; + (HostCmd_DS_SYS_CONFIG *)&resp->params.sys_config; mlan_ds_bss *bss = MNULL; MrvlIEtypesHeader_t *tlv = MNULL; t_u16 tlv_buf_left = 0; @@ -1418,8 +1558,8 @@ wlan_uap_ret_cmd_ap_config(IN pmlan_private pmpriv, ENTER(); - bss = (mlan_ds_bss *) pioctl_buf->pbuf; - tlv = (MrvlIEtypesHeader_t *) sys_config->tlv_buffer; + bss = (mlan_ds_bss *)pioctl_buf->pbuf; + tlv = (MrvlIEtypesHeader_t *)sys_config->tlv_buffer; tlv_buf_left = resp->size - (sizeof(HostCmd_DS_SYS_CONFIG) - 1 + S_DS_GEN); @@ -1436,12 +1576,12 @@ wlan_uap_ret_cmd_ap_config(IN pmlan_private pmpriv, switch (tlv_type) { case TLV_TYPE_UAP_MAC_ADDRESS: - tlv_mac = (MrvlIEtypes_MacAddr_t *) tlv; + tlv_mac = (MrvlIEtypes_MacAddr_t *)tlv; memcpy(pmpriv->adapter, &bss->param.bss_config.mac_addr, tlv_mac->mac, MLAN_MAC_ADDR_LENGTH); break; case TLV_TYPE_SSID: - tlv_ssid = (MrvlIEtypes_SsIdParamSet_t *) tlv; + tlv_ssid = (MrvlIEtypes_SsIdParamSet_t *)tlv; bss->param.bss_config.ssid.ssid_len = MIN(MLAN_MAX_SSID_LENGTH, tlv_len); memcpy(pmpriv->adapter, bss->param.bss_config.ssid.ssid, @@ -1449,43 +1589,48 @@ wlan_uap_ret_cmd_ap_config(IN pmlan_private pmpriv, tlv_len)); break; case TLV_TYPE_UAP_BEACON_PERIOD: - tlv_beacon_period = (MrvlIEtypes_beacon_period_t *) tlv; + tlv_beacon_period = (MrvlIEtypes_beacon_period_t *)tlv; bss->param.bss_config.beacon_period = wlan_le16_to_cpu(tlv_beacon_period-> beacon_period); + pmpriv->uap_state_chan_cb.beacon_period = + wlan_le16_to_cpu(tlv_beacon_period-> + beacon_period); break; case TLV_TYPE_UAP_DTIM_PERIOD: - tlv_dtim_period = (MrvlIEtypes_dtim_period_t *) tlv; + tlv_dtim_period = (MrvlIEtypes_dtim_period_t *)tlv; bss->param.bss_config.dtim_period = tlv_dtim_period->dtim_period; + pmpriv->uap_state_chan_cb.dtim_period = + tlv_dtim_period->dtim_period; break; case TLV_TYPE_RATES: - tlv_rates = (MrvlIEtypes_RatesParamSet_t *) tlv; + tlv_rates = (MrvlIEtypes_RatesParamSet_t *)tlv; memcpy(pmpriv->adapter, bss->param.bss_config.rates, tlv_rates->rates, MIN(MAX_DATA_RATES, tlv_len)); break; case TLV_TYPE_UAP_TX_DATA_RATE: - tlv_txrate = (MrvlIEtypes_tx_rate_t *) tlv; + tlv_txrate = (MrvlIEtypes_tx_rate_t *)tlv; bss->param.bss_config.tx_data_rate = wlan_le16_to_cpu(tlv_txrate->tx_data_rate); break; case TLV_TYPE_UAP_MCBC_DATA_RATE: - tlv_mcbc_rate = (MrvlIEtypes_mcbc_rate_t *) tlv; + tlv_mcbc_rate = (MrvlIEtypes_mcbc_rate_t *)tlv; bss->param.bss_config.mcbc_data_rate = wlan_le16_to_cpu(tlv_mcbc_rate->mcbc_data_rate); break; case TLV_TYPE_UAP_TX_POWER: - tlv_tx_power = (MrvlIEtypes_tx_power_t *) tlv; + tlv_tx_power = (MrvlIEtypes_tx_power_t *)tlv; bss->param.bss_config.tx_power_level = tlv_tx_power->tx_power; break; case TLV_TYPE_UAP_BCAST_SSID_CTL: - tlv_bcast_ssid = (MrvlIEtypes_bcast_ssid_t *) tlv; + tlv_bcast_ssid = (MrvlIEtypes_bcast_ssid_t *)tlv; bss->param.bss_config.bcast_ssid_ctl = tlv_bcast_ssid->bcast_ssid_ctl; break; case TLV_TYPE_UAP_ANTENNA_CTL: - tlv_antenna = (MrvlIEtypes_antenna_mode_t *) tlv; + tlv_antenna = (MrvlIEtypes_antenna_mode_t *)tlv; if (tlv_antenna->which_antenna == TX_ANTENNA) bss->param.bss_config.tx_antenna = tlv_antenna->antenna_mode; @@ -1494,100 +1639,100 @@ wlan_uap_ret_cmd_ap_config(IN pmlan_private pmpriv, tlv_antenna->antenna_mode; break; case TLV_TYPE_UAP_PKT_FWD_CTL: - tlv_pkt_forward = (MrvlIEtypes_pkt_forward_t *) tlv; + tlv_pkt_forward = (MrvlIEtypes_pkt_forward_t *)tlv; bss->param.bss_config.pkt_forward_ctl = tlv_pkt_forward->pkt_forward_ctl; break; case TLV_TYPE_UAP_MAX_STA_CNT: - tlv_sta_count = (MrvlIEtypes_max_sta_count_t *) tlv; + tlv_sta_count = (MrvlIEtypes_max_sta_count_t *)tlv; bss->param.bss_config.max_sta_count = wlan_le16_to_cpu(tlv_sta_count->max_sta_count); break; case TLV_TYPE_UAP_STA_AGEOUT_TIMER: - tlv_sta_ageout = (MrvlIEtypes_sta_ageout_t *) tlv; + tlv_sta_ageout = (MrvlIEtypes_sta_ageout_t *)tlv; bss->param.bss_config.sta_ageout_timer = wlan_le32_to_cpu(tlv_sta_ageout-> sta_ageout_timer); break; case TLV_TYPE_UAP_PS_STA_AGEOUT_TIMER: - tlv_ps_sta_ageout = (MrvlIEtypes_ps_sta_ageout_t *) tlv; + tlv_ps_sta_ageout = (MrvlIEtypes_ps_sta_ageout_t *)tlv; bss->param.bss_config.ps_sta_ageout_timer = wlan_le32_to_cpu(tlv_ps_sta_ageout-> ps_sta_ageout_timer); break; case TLV_TYPE_UAP_RTS_THRESHOLD: - tlv_rts_threshold = (MrvlIEtypes_rts_threshold_t *) tlv; + tlv_rts_threshold = (MrvlIEtypes_rts_threshold_t *)tlv; bss->param.bss_config.rts_threshold = wlan_le16_to_cpu(tlv_rts_threshold-> rts_threshold); break; case TLV_TYPE_UAP_FRAG_THRESHOLD: tlv_frag_threshold = - (MrvlIEtypes_frag_threshold_t *) tlv; + (MrvlIEtypes_frag_threshold_t *)tlv; bss->param.bss_config.frag_threshold = wlan_le16_to_cpu(tlv_frag_threshold-> frag_threshold); break; case TLV_TYPE_UAP_RETRY_LIMIT: - tlv_retry_limit = (MrvlIEtypes_retry_limit_t *) tlv; + tlv_retry_limit = (MrvlIEtypes_retry_limit_t *)tlv; bss->param.bss_config.retry_limit = tlv_retry_limit->retry_limit; break; case TLV_TYPE_UAP_EAPOL_PWK_HSK_TIMEOUT: tlv_pairwise_timeout = - (MrvlIEtypes_eapol_pwk_hsk_timeout_t *) tlv; + (MrvlIEtypes_eapol_pwk_hsk_timeout_t *)tlv; bss->param.bss_config.pairwise_update_timeout = wlan_le32_to_cpu(tlv_pairwise_timeout-> pairwise_update_timeout); break; case TLV_TYPE_UAP_EAPOL_PWK_HSK_RETRIES: tlv_pairwise_retries = - (MrvlIEtypes_eapol_pwk_hsk_retries_t *) tlv; + (MrvlIEtypes_eapol_pwk_hsk_retries_t *)tlv; bss->param.bss_config.pwk_retries = wlan_le32_to_cpu(tlv_pairwise_retries-> pwk_retries); break; case TLV_TYPE_UAP_EAPOL_GWK_HSK_TIMEOUT: tlv_groupwise_timeout = - (MrvlIEtypes_eapol_gwk_hsk_timeout_t *) tlv; + (MrvlIEtypes_eapol_gwk_hsk_timeout_t *)tlv; bss->param.bss_config.groupwise_update_timeout = wlan_le32_to_cpu(tlv_groupwise_timeout-> groupwise_update_timeout); break; case TLV_TYPE_UAP_EAPOL_GWK_HSK_RETRIES: tlv_groupwise_retries = - (MrvlIEtypes_eapol_gwk_hsk_retries_t *) tlv; + (MrvlIEtypes_eapol_gwk_hsk_retries_t *)tlv; bss->param.bss_config.gwk_retries = wlan_le32_to_cpu(tlv_groupwise_retries-> gwk_retries); break; case TLV_TYPE_UAP_MGMT_IE_PASSTHRU_MASK: tlv_mgmt_ie_passthru = - (MrvlIEtypes_mgmt_ie_passthru_t *) tlv; + (MrvlIEtypes_mgmt_ie_passthru_t *)tlv; bss->param.bss_config.mgmt_ie_passthru_mask = wlan_le32_to_cpu(tlv_mgmt_ie_passthru-> mgmt_ie_mask); break; case TLV_TYPE_2040_BSS_COEX_CONTROL: tlv_2040_coex_enable = - (MrvlIEtypes_2040_coex_enable_t *) tlv; + (MrvlIEtypes_2040_coex_enable_t *)tlv; bss->param.bss_config.enable_2040coex = tlv_2040_coex_enable->enable_2040coex; break; case TLV_TYPE_UAP_STA_MAC_ADDR_FILTER: - tlv_mac_filter = (MrvlIEtypes_mac_filter_t *) tlv; + tlv_mac_filter = (MrvlIEtypes_mac_filter_t *)tlv; bss->param.bss_config.filter.mac_count = MIN(MAX_MAC_FILTER_NUM, tlv_mac_filter->count); bss->param.bss_config.filter.filter_mode = tlv_mac_filter->filter_mode; memcpy(pmpriv->adapter, - (t_u8 *) bss->param.bss_config.filter.mac_list, + (t_u8 *)bss->param.bss_config.filter.mac_list, tlv_mac_filter->mac_address, MLAN_MAC_ADDR_LENGTH * bss->param.bss_config.filter.mac_count); break; case TLV_TYPE_UAP_CHAN_BAND_CONFIG: - tlv_chan_band = (MrvlIEtypes_channel_band_t *) tlv; + tlv_chan_band = (MrvlIEtypes_channel_band_t *)tlv; bss->param.bss_config.band_cfg = tlv_chan_band->band_config; bss->param.bss_config.channel = tlv_chan_band->channel; @@ -1597,7 +1742,7 @@ wlan_uap_ret_cmd_ap_config(IN pmlan_private pmpriv, tlv_chan_band->channel; break; case TLV_TYPE_CHANLIST: - tlv_chan_list = (MrvlIEtypes_ChanListParamSet_t *) tlv; + tlv_chan_list = (MrvlIEtypes_ChanListParamSet_t *)tlv; bss->param.bss_config.num_of_chan = tlv_len / sizeof(ChanScanParamSet_t); pscan_chan = tlv_chan_list->chan_scan_param; @@ -1611,19 +1756,19 @@ wlan_uap_ret_cmd_ap_config(IN pmlan_private pmpriv, } break; case TLV_TYPE_AUTH_TYPE: - tlv_auth_type = (MrvlIEtypes_auth_type_t *) tlv; + tlv_auth_type = (MrvlIEtypes_auth_type_t *)tlv; bss->param.bss_config.auth_mode = tlv_auth_type->auth_type; break; case TLV_TYPE_UAP_ENCRYPT_PROTOCOL: tlv_encrypt_protocol = - (MrvlIEtypes_encrypt_protocol_t *) tlv; + (MrvlIEtypes_encrypt_protocol_t *)tlv; bss->param.bss_config.protocol = wlan_le16_to_cpu(tlv_encrypt_protocol-> protocol); break; case TLV_TYPE_UAP_AKMP: - tlv_akmp = (MrvlIEtypes_akmp_t *) tlv; + tlv_akmp = (MrvlIEtypes_akmp_t *)tlv; bss->param.bss_config.key_mgmt = wlan_le16_to_cpu(tlv_akmp->key_mgmt); if (tlv_len > sizeof(t_u16)) @@ -1632,7 +1777,7 @@ wlan_uap_ret_cmd_ap_config(IN pmlan_private pmpriv, key_mgmt_operation); break; case TLV_TYPE_PWK_CIPHER: - tlv_pwk_cipher = (MrvlIEtypes_pwk_cipher_t *) tlv; + tlv_pwk_cipher = (MrvlIEtypes_pwk_cipher_t *)tlv; if (wlan_le16_to_cpu(tlv_pwk_cipher->protocol) & PROTOCOL_WPA) bss->param.bss_config.wpa_cfg. @@ -1645,17 +1790,17 @@ wlan_uap_ret_cmd_ap_config(IN pmlan_private pmpriv, tlv_pwk_cipher->pairwise_cipher; break; case TLV_TYPE_GWK_CIPHER: - tlv_gwk_cipher = (MrvlIEtypes_gwk_cipher_t *) tlv; + tlv_gwk_cipher = (MrvlIEtypes_gwk_cipher_t *)tlv; bss->param.bss_config.wpa_cfg.group_cipher = tlv_gwk_cipher->group_cipher; break; case TLV_TYPE_UAP_RSN_REPLAY_PROTECT: - tlv_rsn_prot = (MrvlIEtypes_rsn_replay_prot_t *) tlv; + tlv_rsn_prot = (MrvlIEtypes_rsn_replay_prot_t *)tlv; bss->param.bss_config.wpa_cfg.rsn_protection = tlv_rsn_prot->rsn_replay_prot; break; case TLV_TYPE_UAP_WPA_PASSPHRASE: - tlv_passphrase = (MrvlIEtypes_passphrase_t *) tlv; + tlv_passphrase = (MrvlIEtypes_passphrase_t *)tlv; bss->param.bss_config.wpa_cfg.length = MIN(MLAN_PMK_HEXSTR_LENGTH, tlv_len); memcpy(pmpriv->adapter, @@ -1665,18 +1810,18 @@ wlan_uap_ret_cmd_ap_config(IN pmlan_private pmpriv, break; #ifdef WIFI_DIRECT_SUPPORT case TLV_TYPE_UAP_PSK: - tlv_psk = (MrvlIEtypes_psk_t *) tlv; + tlv_psk = (MrvlIEtypes_psk_t *)tlv; memcpy(pmpriv->adapter, bss->param.bss_config.psk, tlv_psk->psk, MIN(MLAN_MAX_KEY_LENGTH, tlv_len)); break; #endif /* WIFI_DIRECT_SUPPORT */ case TLV_TYPE_UAP_GRP_REKEY_TIME: - tlv_rekey_time = (MrvlIEtypes_group_rekey_time_t *) tlv; + tlv_rekey_time = (MrvlIEtypes_group_rekey_time_t *)tlv; bss->param.bss_config.wpa_cfg.gk_rekey_time = wlan_le32_to_cpu(tlv_rekey_time->gk_rekey_time); break; case TLV_TYPE_UAP_WEP_KEY: - tlv_wep_key = (MrvlIEtypes_wep_key_t *) tlv; + tlv_wep_key = (MrvlIEtypes_wep_key_t *)tlv; pkey = MNULL; if (tlv_wep_key->key_index == 0) pkey = &bss->param.bss_config.wep_cfg.key0; @@ -1696,12 +1841,12 @@ wlan_uap_ret_cmd_ap_config(IN pmlan_private pmpriv, } break; case TLV_TYPE_UAP_PREAMBLE_CTL: - tlv_preamble = (MrvlIEtypes_preamble_t *) tlv; + tlv_preamble = (MrvlIEtypes_preamble_t *)tlv; bss->param.bss_config.preamble_type = tlv_preamble->preamble_type; break; case TLV_TYPE_BSS_STATUS: - tlv_bss_status = (MrvlIEtypes_bss_status_t *) tlv; + tlv_bss_status = (MrvlIEtypes_bss_status_t *)tlv; bss->param.bss_config.bss_status = wlan_le16_to_cpu(tlv_bss_status->bss_status); pmpriv->uap_bss_started = @@ -1709,7 +1854,7 @@ wlan_uap_ret_cmd_ap_config(IN pmlan_private pmpriv, bss_status) ? MTRUE : MFALSE; break; case HT_CAPABILITY: - tlv_htcap = (MrvlIETypes_HTCap_t *) tlv; + tlv_htcap = (MrvlIETypes_HTCap_t *)tlv; bss->param.bss_config.ht_cap_info = wlan_le16_to_cpu(tlv_htcap->ht_cap.ht_cap_info); bss->param.bss_config.ampdu_param = @@ -1724,7 +1869,7 @@ wlan_uap_ret_cmd_ap_config(IN pmlan_private pmpriv, bss->param.bss_config.asel = tlv_htcap->ht_cap.asel; break; case TLV_TYPE_VENDOR_SPECIFIC_IE: - tlv_wmm_parameter = (MrvlIEtypes_wmm_parameter_t *) tlv; + tlv_wmm_parameter = (MrvlIEtypes_wmm_parameter_t *)tlv; bss->param.bss_config.wmm_para.qos_info = tlv_wmm_parameter->wmm_para.qos_info; for (ac = 0; ac < 4; ac++) { @@ -1754,10 +1899,14 @@ wlan_uap_ret_cmd_ap_config(IN pmlan_private pmpriv, } tlv_buf_left -= tlv_len + sizeof(MrvlIEtypesHeader_t); - tlv = (MrvlIEtypesHeader_t *) ((t_u8 *) tlv + tlv_len + - sizeof(MrvlIEtypesHeader_t)); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len + + sizeof(MrvlIEtypesHeader_t)); } - +#ifdef DRV_EMBEDDED_AUTHENTICATOR + if (pmpriv->adapter->psdio_device->driver_supplicant_auth) + AuthenticatorBssConfig(pmpriv->psapriv, + (t_u8 *)&bss->param.bss_config, 0, 0, 1); +#endif LEAVE(); return MLAN_STATUS_SUCCESS; } @@ -1774,17 +1923,20 @@ wlan_uap_ret_cmd_ap_config(IN pmlan_private pmpriv, */ static mlan_status wlan_uap_ret_sys_reset(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { ENTER(); pmpriv->uap_state_chan_cb.band_config = 0; pmpriv->uap_state_chan_cb.channel = 0; + pmpriv->uap_state_chan_cb.beacon_period = 0; + pmpriv->uap_state_chan_cb.dtim_period = 0; /* assume default 11d/11h states are off, should check with FW */ /* currently don't clear domain_info... global, could be from STA */ wlan_11d_priv_init(pmpriv); + wlan_11h_priv_init(pmpriv); LEAVE(); return MLAN_STATUS_SUCCESS; @@ -1801,26 +1953,28 @@ wlan_uap_ret_sys_reset(IN pmlan_private pmpriv, */ static mlan_status wlan_uap_ret_sys_config(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { int resp_len = 0, travel_len = 0; int i = 0; custom_ie *cptr; HostCmd_DS_SYS_CONFIG *sys_config = - (HostCmd_DS_SYS_CONFIG *) & resp->params.sys_config; + (HostCmd_DS_SYS_CONFIG *)&resp->params.sys_config; mlan_ds_bss *bss = MNULL; mlan_ds_misc_cfg *misc = MNULL; MrvlIEtypes_MacAddr_t *tlv = - (MrvlIEtypes_MacAddr_t *) sys_config->tlv_buffer; + (MrvlIEtypes_MacAddr_t *)sys_config->tlv_buffer; mlan_ds_misc_custom_ie *cust_ie = MNULL; tlvbuf_max_mgmt_ie *max_mgmt_ie = MNULL; MrvlIEtypes_channel_band_t *tlv_cb = MNULL; + MrvlIEtypes_beacon_period_t *tlv_bcnpd = MNULL; + MrvlIEtypes_dtim_period_t *tlv_dtimpd = MNULL; ENTER(); if (pioctl_buf) { if (pioctl_buf->req_id == MLAN_IOCTL_BSS) { - bss = (mlan_ds_bss *) pioctl_buf->pbuf; + bss = (mlan_ds_bss *)pioctl_buf->pbuf; if (bss->sub_command == MLAN_OID_BSS_MAC_ADDR) { if (TLV_TYPE_UAP_MAC_ADDRESS == wlan_le16_to_cpu(tlv->header.type)) { @@ -1835,16 +1989,17 @@ wlan_uap_ret_sys_config(IN pmlan_private pmpriv, } } if (pioctl_buf->req_id == MLAN_IOCTL_MISC_CFG) { - misc = (mlan_ds_misc_cfg *) pioctl_buf->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; cust_ie = - (mlan_ds_misc_custom_ie *) sys_config-> + (mlan_ds_misc_custom_ie *)sys_config-> tlv_buffer; max_mgmt_ie = - (tlvbuf_max_mgmt_ie *) (sys_config->tlv_buffer + - cust_ie->len + - sizeof - (MrvlIEtypesHeader_t)); - if ((pioctl_buf->action == MLAN_ACT_GET) && + (tlvbuf_max_mgmt_ie *)(sys_config->tlv_buffer + + cust_ie->len + + sizeof + (MrvlIEtypesHeader_t)); + if ((pioctl_buf->action == MLAN_ACT_GET || + pioctl_buf->action == MLAN_ACT_SET) && (misc->sub_command == MLAN_OID_MISC_CUSTOM_IE)) { cust_ie->type = wlan_le16_to_cpu(cust_ie->type); @@ -1860,9 +2015,8 @@ wlan_uap_ret_sys_config(IN pmlan_private pmpriv, while (resp_len > sizeof(t_u16)) { cptr = (custom_ie - *) (((t_u8 *) cust_ie-> - ie_data_list) + - travel_len); + *)(((t_u8 *)cust_ie-> + ie_data_list) + travel_len); cptr->ie_index = wlan_le16_to_cpu(cptr-> ie_index); @@ -1916,7 +2070,7 @@ wlan_uap_ret_sys_config(IN pmlan_private pmpriv, /* Append max_mgmt_ie TLV after custom_ie */ memcpy(pmpriv->adapter, - (t_u8 *) & misc->param. + (t_u8 *)&misc->param. cust_ie + (cust_ie->len + sizeof (MrvlIEtypesHeader_t)), @@ -1937,7 +2091,7 @@ wlan_uap_ret_sys_config(IN pmlan_private pmpriv, MLAN_MAC_ADDR_LENGTH); break; case TLV_TYPE_UAP_CHAN_BAND_CONFIG: - tlv_cb = (MrvlIEtypes_channel_band_t *) tlv; + tlv_cb = (MrvlIEtypes_channel_band_t *)tlv; pmpriv->uap_state_chan_cb.band_config = tlv_cb->band_config; pmpriv->uap_state_chan_cb.channel = tlv_cb->channel; @@ -1946,6 +2100,32 @@ wlan_uap_ret_sys_config(IN pmlan_private pmpriv, pmpriv->uap_state_chan_cb. get_chan_callback(pmpriv); break; + case TLV_TYPE_UAP_BEACON_PERIOD: + tlv_bcnpd = (MrvlIEtypes_beacon_period_t *)tlv; + pmpriv->uap_state_chan_cb.beacon_period = + wlan_le16_to_cpu(tlv_bcnpd->beacon_period); + /* copy dtim_period as well if it follows */ + tlv_dtimpd = + (MrvlIEtypes_dtim_period_t *)(((t_u8 *)tlv) + + sizeof + (MrvlIEtypes_beacon_period_t)); + if (TLV_TYPE_UAP_DTIM_PERIOD == + wlan_le16_to_cpu(tlv_dtimpd->header.type)) + pmpriv->uap_state_chan_cb.dtim_period = + tlv_dtimpd->dtim_period; + /* call callback waiting for beacon/dtim info */ + if (pmpriv->uap_state_chan_cb.get_chan_callback) + pmpriv->uap_state_chan_cb. + get_chan_callback(pmpriv); + break; + case TLV_TYPE_MGMT_IE: + if ((pmpriv->adapter->state_rdh.stage == + RDH_SET_CUSTOM_IE) || + (pmpriv->adapter->state_rdh.stage == + RDH_REM_CUSTOM_IE)) + wlan_11h_radar_detected_callback((t_void *) + pmpriv); + break; } } LEAVE(); @@ -1965,14 +2145,15 @@ wlan_uap_ret_sys_config(IN pmlan_private pmpriv, */ static mlan_status wlan_uap_cmd_snmp_mib(pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, + IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action, IN t_u32 cmd_oid, - IN pmlan_ioctl_req pioctl_buf, IN t_void * pdata_buf) + IN pmlan_ioctl_req pioctl_buf, IN t_void *pdata_buf) { HostCmd_DS_802_11_SNMP_MIB *psnmp_mib = &cmd->params.smib; mlan_status ret = MLAN_STATUS_SUCCESS; t_u8 *psnmp_oid = MNULL; + t_u32 ul_temp; t_u8 i; t_u8 snmp_oids[] = { @@ -2006,13 +2187,13 @@ wlan_uap_cmd_snmp_mib(pmlan_private pmpriv, wlan_cpu_to_le16(sizeof(t_u16) + S_DS_GEN + sizeof(snmp_oids) * sizeof(MrvlIEtypes_snmp_oid_t)); - psnmp_oid = (t_u8 *) & psnmp_mib->oid; + psnmp_oid = (t_u8 *)&psnmp_mib->oid; for (i = 0; i < sizeof(snmp_oids); i++) { /* SNMP OID header type */ - *(t_u16 *) psnmp_oid = wlan_cpu_to_le16(snmp_oids[i]); + *(t_u16 *)psnmp_oid = wlan_cpu_to_le16(snmp_oids[i]); psnmp_oid += sizeof(t_u16); /* SNMP OID header length */ - *(t_u16 *) psnmp_oid = wlan_cpu_to_le16(sizeof(t_u32)); + *(t_u16 *)psnmp_oid = wlan_cpu_to_le16(sizeof(t_u32)); psnmp_oid += sizeof(t_u16) + sizeof(t_u32); } } else { /* cmd_action == ACT_SET */ @@ -2021,6 +2202,15 @@ wlan_uap_cmd_snmp_mib(pmlan_private pmpriv, psnmp_mib->query_type = wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); switch (cmd_oid) { + case Dot11D_i: + case Dot11H_i: + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)cmd_oid); + psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u16)); + ul_temp = *(t_u32 *)pdata_buf; + *((t_u16 *)(psnmp_mib->value)) = + wlan_cpu_to_le16((t_u16)ul_temp); + cmd->size += sizeof(t_u16); + break; default: PRINTM(MERROR, "Unsupported OID.\n"); ret = MLAN_STATUS_FAILURE; @@ -2044,12 +2234,12 @@ wlan_uap_cmd_snmp_mib(pmlan_private pmpriv, */ static mlan_status wlan_uap_ret_snmp_mib(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { pmlan_adapter pmadapter = pmpriv->adapter; HostCmd_DS_802_11_SNMP_MIB *psnmp_mib = - (HostCmd_DS_802_11_SNMP_MIB *) & resp->params.smib; + (HostCmd_DS_802_11_SNMP_MIB *)&resp->params.smib; mlan_ds_get_info *info; t_u8 *psnmp_oid = MNULL; t_u32 data; @@ -2062,11 +2252,11 @@ wlan_uap_ret_snmp_mib(IN pmlan_private pmpriv, LEAVE(); return MLAN_STATUS_SUCCESS; } - info = (mlan_ds_get_info *) pioctl_buf->pbuf; + info = (mlan_ds_get_info *)pioctl_buf->pbuf; tlv_buf_left = resp->size - (sizeof(t_u16) + S_DS_GEN); - psnmp_oid = (t_u8 *) & psnmp_mib->oid; + psnmp_oid = (t_u8 *)&psnmp_mib->oid; while (tlv_buf_left >= sizeof(MrvlIEtypes_snmp_oid_t)) { - tlv_type = wlan_le16_to_cpu(*(t_u16 *) psnmp_oid); + tlv_type = wlan_le16_to_cpu(*(t_u16 *)psnmp_oid); psnmp_oid += sizeof(t_u16) + sizeof(t_u16); memcpy(pmadapter, &data, psnmp_oid, sizeof(t_u32)); switch (tlv_type) { @@ -2150,6 +2340,29 @@ wlan_uap_ret_snmp_mib(IN pmlan_private pmpriv, tlv_buf_left -= sizeof(MrvlIEtypes_snmp_oid_t); psnmp_oid += sizeof(t_u32); } + } else { /* ACT_SET */ + switch (psnmp_mib->oid) { + case Dot11D_i: + data = wlan_le16_to_cpu(*((t_u16 *)(psnmp_mib->value))); + /* Set 11d state to private */ + pmpriv->state_11d.enable_11d = data; + /* Set user enable flag if called from ioctl */ + if (pioctl_buf) + pmpriv->state_11d.user_enable_11d = data; + break; + case Dot11H_i: + data = wlan_le16_to_cpu(*((t_u16 *)(psnmp_mib->value))); + /* Set 11h state to priv */ + pmpriv->intf_state_11h.is_11h_active = + (data & ENABLE_11H_MASK); + /* Set radar_det state to adapter */ + pmpriv->adapter->state_11h.is_master_radar_det_active + = + (data & MASTER_RADAR_DET_MASK) ? MTRUE : MFALSE; + pmpriv->adapter->state_11h.is_slave_radar_det_active = + (data & SLAVE_RADAR_DET_MASK) ? MTRUE : MFALSE; + break; + } } LEAVE(); @@ -2166,11 +2379,11 @@ wlan_uap_ret_snmp_mib(IN pmlan_private pmpriv, */ static mlan_status wlan_uap_cmd_sta_deauth(pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) { HostCmd_DS_STA_DEAUTH *pcmd_sta_deauth = - (HostCmd_DS_STA_DEAUTH *) & cmd->params.sta_deauth; - mlan_deauth_param *deauth = (mlan_deauth_param *) pdata_buf; + (HostCmd_DS_STA_DEAUTH *)&cmd->params.sta_deauth; + mlan_deauth_param *deauth = (mlan_deauth_param *)pdata_buf; ENTER(); cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_STA_DEAUTH); @@ -2192,10 +2405,10 @@ wlan_uap_cmd_sta_deauth(pmlan_private pmpriv, */ static mlan_status wlan_uap_cmd_report_mic(pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, IN t_void * pdata_buf) + IN HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) { HostCmd_DS_REPORT_MIC *pcmd_report_mic = - (HostCmd_DS_REPORT_MIC *) & cmd->params.report_mic; + (HostCmd_DS_REPORT_MIC *)&cmd->params.report_mic; ENTER(); cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_REPORT_MIC); @@ -2218,13 +2431,13 @@ wlan_uap_cmd_report_mic(pmlan_private pmpriv, */ static mlan_status wlan_uap_cmd_key_material(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * cmd, + IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action, - IN t_u16 cmd_oid, IN t_void * pdata_buf) + IN t_u16 cmd_oid, IN t_void *pdata_buf) { HostCmd_DS_802_11_KEY_MATERIAL *pkey_material = &cmd->params.key_material; - mlan_ds_encrypt_key *pkey = (mlan_ds_encrypt_key *) pdata_buf; + mlan_ds_encrypt_key *pkey = (mlan_ds_encrypt_key *)pdata_buf; mlan_status ret = MLAN_STATUS_SUCCESS; sta_node *sta_ptr = MNULL; @@ -2253,7 +2466,8 @@ wlan_uap_cmd_key_material(IN pmlan_private pmpriv, pkey_material->key_param_set.key_idx = pkey->key_index & KEY_INDEX_MASK; pkey_material->key_param_set.key_info = - KEY_INFO_MCAST_KEY | KEY_INFO_UCAST_KEY; + wlan_cpu_to_le16(KEY_INFO_MCAST_KEY | + KEY_INFO_UCAST_KEY); memcpy(pmpriv->adapter, pkey_material->key_param_set.mac_addr, pkey->mac_addr, MLAN_MAC_ADDR_LENGTH); cmd->size = @@ -2274,8 +2488,7 @@ wlan_uap_cmd_key_material(IN pmlan_private pmpriv, pkey_material->key_param_set.length = wlan_cpu_to_le16(KEY_PARAMS_FIXED_LEN + sizeof(wep_param_t)); - pkey_material->key_param_set.key_type = - wlan_cpu_to_le16(KEY_TYPE_ID_WEP); + pkey_material->key_param_set.key_type = KEY_TYPE_ID_WEP; pkey_material->key_param_set.key_info |= KEY_INFO_MCAST_KEY | KEY_INFO_UCAST_KEY; if (pkey_material->key_param_set.key_idx == @@ -2309,13 +2522,12 @@ wlan_uap_cmd_key_material(IN pmlan_private pmpriv, else pkey_material->key_param_set.key_info |= KEY_INFO_TX_KEY; if (pkey->is_wapi_key) { - pkey_material->key_param_set.key_type = - wlan_cpu_to_le16(KEY_TYPE_ID_WAPI); + pkey_material->key_param_set.key_type = KEY_TYPE_ID_WAPI; memcpy(pmpriv->adapter, pkey_material->key_param_set.key_params.wapi.pn, pkey->pn, PN_SIZE); pkey_material->key_param_set.key_params.wapi.key_len = - MIN(WAPI_KEY_SIZE, wlan_cpu_to_le16(pkey->key_len)); + wlan_cpu_to_le16(MIN(WAPI_KEY_SIZE, pkey->key_len)); memcpy(pmpriv->adapter, pkey_material->key_param_set.key_params.wapi.key, pkey->key_material, MIN(WAPI_KEY_SIZE, pkey->key_len)); @@ -2356,8 +2568,7 @@ wlan_uap_cmd_key_material(IN pmlan_private pmpriv, memcpy(pmpriv->adapter, pkey_material->key_param_set.key_params.aes.pn, pkey->pn, SEQ_MAX_SIZE); - pkey_material->key_param_set.key_type = - wlan_cpu_to_le16(KEY_TYPE_ID_AES); + pkey_material->key_param_set.key_type = KEY_TYPE_ID_AES; pkey_material->key_param_set.key_params.aes.key_len = wlan_cpu_to_le16(pkey->key_len); memcpy(pmpriv->adapter, @@ -2381,7 +2592,8 @@ wlan_uap_cmd_key_material(IN pmlan_private pmpriv, memcpy(pmpriv->adapter, pkey_material->key_param_set.key_params.cmac_aes. ipn, pkey->pn, SEQ_MAX_SIZE); - pkey_material->key_param_set.key_info &= ~KEY_INFO_MCAST_KEY; + pkey_material->key_param_set.key_info &= + ~(wlan_cpu_to_le16(KEY_INFO_MCAST_KEY)); pkey_material->key_param_set.key_info |= wlan_cpu_to_le16(KEY_INFO_AES_MCAST_IGTK); pkey_material->key_param_set.key_type = KEY_TYPE_ID_AES_CMAC; @@ -2407,8 +2619,7 @@ wlan_uap_cmd_key_material(IN pmlan_private pmpriv, memcpy(pmpriv->adapter, pkey_material->key_param_set.key_params.tkip.pn, pkey->pn, SEQ_MAX_SIZE); - pkey_material->key_param_set.key_type = - wlan_cpu_to_le16(KEY_TYPE_ID_TKIP); + pkey_material->key_param_set.key_type = KEY_TYPE_ID_TKIP; pkey_material->key_param_set.key_params.tkip.key_len = wlan_cpu_to_le16(pkey->key_len); memcpy(pmpriv->adapter, @@ -2440,22 +2651,22 @@ wlan_uap_cmd_key_material(IN pmlan_private pmpriv, */ static mlan_status wlan_uap_ret_sta_list(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - IN mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) { HostCmd_DS_STA_LIST *sta_list = - (HostCmd_DS_STA_LIST *) & resp->params.sta_list; + (HostCmd_DS_STA_LIST *)&resp->params.sta_list; mlan_ds_get_info *info; MrvlIEtypes_sta_info_t *tlv = MNULL; t_u8 i = 0; ENTER(); if (pioctl_buf) { - info = (mlan_ds_get_info *) pioctl_buf->pbuf; + info = (mlan_ds_get_info *)pioctl_buf->pbuf; info->param.sta_list.sta_count = wlan_le16_to_cpu(sta_list->sta_count); - tlv = (MrvlIEtypes_sta_info_t *) ((t_u8 *) sta_list + - sizeof(HostCmd_DS_STA_LIST)); + tlv = (MrvlIEtypes_sta_info_t *)((t_u8 *)sta_list + + sizeof(HostCmd_DS_STA_LIST)); info->param.sta_list.sta_count = MIN(info->param.sta_list.sta_count, MAX_NUM_CLIENTS); for (i = 0; i < info->param.sta_list.sta_count; i++) { @@ -2476,7 +2687,6 @@ wlan_uap_ret_sta_list(IN pmlan_private pmpriv, /** * @brief This function will search for the specific ie * - * * @param priv A pointer to mlan_private * @param pevent A pointer to event buf * @param sta_ptr A pointer to sta_node @@ -2485,7 +2695,7 @@ wlan_uap_ret_sta_list(IN pmlan_private pmpriv, */ static void wlan_check_sta_capability(pmlan_private priv, pmlan_buffer pevent, - sta_node * sta_ptr) + sta_node *sta_ptr) { t_u16 tlv_type, tlv_len; t_u16 frame_control, frame_sub_type = 0; @@ -2508,9 +2718,9 @@ wlan_check_sta_capability(pmlan_private priv, pmlan_buffer pevent, break; } if (tlv_type == TLV_TYPE_UAP_MGMT_FRAME) { - mgmt_tlv = (MrvlIETypes_MgmtFrameSet_t *) tlv; + mgmt_tlv = (MrvlIETypes_MgmtFrameSet_t *)tlv; memcpy(priv->adapter, &frame_control, - (t_u8 *) & (mgmt_tlv->frame_control), + (t_u8 *)&(mgmt_tlv->frame_control), sizeof(frame_control)); frame_sub_type = IEEE80211_GET_FC_MGMT_FRAME_SUBTYPE @@ -2531,7 +2741,7 @@ wlan_check_sta_capability(pmlan_private priv, pmlan_buffer pevent, sizeof(IEEEtypes_FrameCtl_t) - assoc_ie_len; assoc_req_ie = - (t_u8 *) tlv + + (t_u8 *)tlv + sizeof(MrvlIETypes_MgmtFrameSet_t) + assoc_ie_len; sta_ptr->is_wmm_enabled = @@ -2559,12 +2769,23 @@ wlan_check_sta_capability(pmlan_private priv, pmlan_buffer pevent, PRINTM(MCMND, "STA doesn't support 11n\n"); } +#ifdef DRV_EMBEDDED_AUTHENTICATOR + if (priv->adapter->psdio_device-> + driver_supplicant_auth) + if (IsAuthenticatorEnabled + (priv->psapriv)) + authenticator_get_sta_security_info + (priv->psapriv, + sta_ptr-> + cm_connectioninfo, + assoc_req_ie, ie_len); +#endif break; } } tlv_buf_left -= (sizeof(MrvlIEtypesHeader_t) + tlv_len); - tlv = (MrvlIEtypesHeader_t *) ((t_u8 *) tlv + tlv_len + - sizeof(MrvlIEtypesHeader_t)); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len + + sizeof(MrvlIEtypesHeader_t)); } LEAVE(); @@ -2577,7 +2798,6 @@ wlan_check_sta_capability(pmlan_private priv, pmlan_buffer pevent, /** * @brief This function will search for the specific ie * - * * @param priv A pointer to mlan_private * @param pevent A pointer to event buf * @@ -2589,8 +2809,8 @@ wlan_check_uap_capability(pmlan_private priv, pmlan_buffer pevent) t_u16 tlv_type, tlv_len; int tlv_buf_left = pevent->data_len - BSS_START_EVENT_FIX_SIZE; MrvlIEtypesHeader_t *tlv = - (MrvlIEtypesHeader_t *) (pevent->pbuf + pevent->data_offset + - BSS_START_EVENT_FIX_SIZE); + (MrvlIEtypesHeader_t *)(pevent->pbuf + pevent->data_offset + + BSS_START_EVENT_FIX_SIZE); const t_u8 wmm_oui[4] = { 0x00, 0x50, 0xf2, 0x02 }; IEEEtypes_WmmParameter_t wmm_param_ie; MrvlIEtypes_channel_band_t *pchan_info; @@ -2617,8 +2837,8 @@ wlan_check_uap_capability(pmlan_private priv, pmlan_buffer pevent) if (tlv_type == VENDOR_SPECIFIC_221) { if (!memcmp (priv->adapter, - (t_u8 *) tlv + sizeof(MrvlIEtypesHeader_t), - wmm_oui, sizeof(wmm_oui))) { + (t_u8 *)tlv + sizeof(MrvlIEtypesHeader_t), wmm_oui, + sizeof(wmm_oui))) { DBG_HEXDUMP(MCMD_D, "wmm ie tlv", tlv, tlv_len + sizeof(MrvlIEtypesHeader_t)); @@ -2626,9 +2846,9 @@ wlan_check_uap_capability(pmlan_private priv, pmlan_buffer pevent) wlan_wmm_setup_ac_downgrade(priv); priv->wmm_enabled = MTRUE; memcpy(priv->adapter, &wmm_param_ie, - ((t_u8 *) tlv + 2), + ((t_u8 *)tlv + 2), sizeof(IEEEtypes_WmmParameter_t)); - wmm_param_ie.vend_hdr.len = (t_u8) tlv_len; + wmm_param_ie.vend_hdr.len = (t_u8)tlv_len; wmm_param_ie.vend_hdr.element_id = WMM_IE; wlan_wmm_setup_queue_priorities(priv, &wmm_param_ie); @@ -2638,7 +2858,7 @@ wlan_check_uap_capability(pmlan_private priv, pmlan_buffer pevent) DBG_HEXDUMP(MCMD_D, "pkt_fwd tlv", tlv, tlv_len + sizeof(MrvlIEtypesHeader_t)); priv->pkt_fwd = - *((t_u8 *) tlv + sizeof(MrvlIEtypesHeader_t)); + *((t_u8 *)tlv + sizeof(MrvlIEtypesHeader_t)); PRINTM(MCMND, "pkt_fwd FW: 0x%x\n", priv->pkt_fwd); if (priv->pkt_fwd & PKT_FWD_FW_BIT) priv->pkt_fwd = MFALSE; @@ -2649,15 +2869,15 @@ wlan_check_uap_capability(pmlan_private priv, pmlan_buffer pevent) if (tlv_type == TLV_TYPE_UAP_CHAN_BAND_CONFIG) { DBG_HEXDUMP(MCMD_D, "chan_band_config tlv", tlv, tlv_len + sizeof(MrvlIEtypesHeader_t)); - pchan_info = (MrvlIEtypes_channel_band_t *) tlv; + pchan_info = (MrvlIEtypes_channel_band_t *)tlv; priv->uap_channel = pchan_info->channel; PRINTM(MCMND, "uap_channel FW: 0x%x\n", priv->uap_channel); } tlv_buf_left -= (sizeof(MrvlIEtypesHeader_t) + tlv_len); - tlv = (MrvlIEtypesHeader_t *) ((t_u8 *) tlv + tlv_len + - sizeof(MrvlIEtypesHeader_t)); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len + + sizeof(MrvlIEtypesHeader_t)); } if (priv->wmm_enabled == MFALSE) { /* Since WMM is not enabled, setup the queues with the defaults @@ -2671,7 +2891,6 @@ wlan_check_uap_capability(pmlan_private priv, pmlan_buffer pevent) /** * @brief This function will update WAPI PN in statation assoc event * - * * @param priv A pointer to mlan_private * @param pevent A pointer to event buf * @@ -2700,22 +2919,22 @@ wlan_update_wapi_info_tlv(pmlan_private priv, pmlan_buffer pevent) break; } if (tlv_type == TLV_TYPE_AP_WAPI_INFO) { - wapi_tlv = (MrvlIEtypes_wapi_info_t *) tlv; + wapi_tlv = (MrvlIEtypes_wapi_info_t *)tlv; DBG_HEXDUMP(MCMD_D, "Fw:multicast_PN", wapi_tlv->multicast_PN, PN_SIZE); - memcpy(priv->adapter, (t_u8 *) tx_pn, + memcpy(priv->adapter, (t_u8 *)tx_pn, wapi_tlv->multicast_PN, PN_SIZE); for (i = 0; i < 4; i++) tx_pn[i] = mlan_ntohl(tx_pn[i]); memcpy(priv->adapter, wapi_tlv->multicast_PN, - (t_u8 *) tx_pn, PN_SIZE); + (t_u8 *)tx_pn, PN_SIZE); DBG_HEXDUMP(MCMD_D, "Host:multicast_PN", wapi_tlv->multicast_PN, PN_SIZE); break; } tlv_buf_left -= (sizeof(MrvlIEtypesHeader_t) + tlv_len); - tlv = (MrvlIEtypesHeader_t *) ((t_u8 *) tlv + tlv_len + - sizeof(MrvlIEtypesHeader_t)); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len + + sizeof(MrvlIEtypesHeader_t)); } LEAVE(); @@ -2733,7 +2952,7 @@ wlan_update_wapi_info_tlv(pmlan_private priv, pmlan_buffer pevent) * @return MFALSE */ static t_u32 -wlan_process_sta_assoc_event(pmlan_private priv, mlan_event * pevent, +wlan_process_sta_assoc_event(pmlan_private priv, mlan_event *pevent, pmlan_buffer pmbuf) { t_u32 ret = MFALSE; @@ -2762,9 +2981,9 @@ wlan_process_sta_assoc_event(pmlan_private priv, mlan_event * pevent, break; } if (tlv_type == TLV_TYPE_UAP_MGMT_FRAME) { - mgmt_tlv = (MrvlIETypes_MgmtFrameSet_t *) tlv; + mgmt_tlv = (MrvlIETypes_MgmtFrameSet_t *)tlv; memcpy(priv->adapter, &frame_control, - (t_u8 *) & (mgmt_tlv->frame_control), + (t_u8 *)&(mgmt_tlv->frame_control), sizeof(frame_control)); frame_sub_type = IEEE80211_GET_FC_MGMT_FRAME_SUBTYPE @@ -2785,7 +3004,7 @@ wlan_process_sta_assoc_event(pmlan_private priv, mlan_event * pevent, sizeof(IEEEtypes_FrameCtl_t) - assoc_ie_len; assoc_req_ie = - (t_u8 *) tlv + + (t_u8 *)tlv + sizeof(MrvlIETypes_MgmtFrameSet_t) + assoc_ie_len; memcpy(priv->adapter, @@ -2796,8 +3015,8 @@ wlan_process_sta_assoc_event(pmlan_private priv, mlan_event * pevent, } } tlv_buf_left -= (sizeof(MrvlIEtypesHeader_t) + tlv_len); - tlv = (MrvlIEtypesHeader_t *) ((t_u8 *) tlv + tlv_len + - sizeof(MrvlIEtypesHeader_t)); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len + + sizeof(MrvlIEtypesHeader_t)); } PRINTM(MEVENT, "STA assoc event len=%d\n", pevent->event_len); DBG_HEXDUMP(MCMD_D, "STA assoc event", pevent->event_buf, @@ -2824,17 +3043,17 @@ wlan_process_sta_assoc_event(pmlan_private priv, mlan_event * pevent, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_ops_uap_prepare_cmd(IN t_void * priv, +wlan_ops_uap_prepare_cmd(IN t_void *priv, IN t_u16 cmd_no, IN t_u16 cmd_action, IN t_u32 cmd_oid, - IN t_void * pioctl_buf, - IN t_void * pdata_buf, IN t_void * pcmd_buf) + IN t_void *pioctl_buf, + IN t_void *pdata_buf, IN t_void *pcmd_buf) { - HostCmd_DS_COMMAND *cmd_ptr = (HostCmd_DS_COMMAND *) pcmd_buf; - mlan_private *pmpriv = (mlan_private *) priv; + HostCmd_DS_COMMAND *cmd_ptr = (HostCmd_DS_COMMAND *)pcmd_buf; + mlan_private *pmpriv = (mlan_private *)priv; mlan_status ret = MLAN_STATUS_SUCCESS; - pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *) pioctl_buf; + pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *)pioctl_buf; ENTER(); @@ -2848,15 +3067,22 @@ wlan_ops_uap_prepare_cmd(IN t_void * priv, case HOST_CMD_APCMD_STA_LIST: cmd_ptr->command = wlan_cpu_to_le16(cmd_no); cmd_ptr->size = wlan_cpu_to_le16(S_DS_GEN); +#ifdef DRV_EMBEDDED_AUTHENTICATOR + if (pmpriv->adapter->psdio_device->driver_supplicant_auth) + if ((HOST_CMD_APCMD_BSS_START == cmd_no) && + IsAuthenticatorEnabled(pmpriv->psapriv)) + AuthenticatorBssConfig(pmpriv->psapriv, MNULL, + 1, 0, 0); +#endif break; case HOST_CMD_APCMD_SYS_CONFIGURE: ret = wlan_uap_cmd_sys_configure(pmpriv, cmd_ptr, cmd_action, - (pmlan_ioctl_req) pioctl_buf, + (pmlan_ioctl_req)pioctl_buf, pdata_buf); break; case HostCmd_CMD_802_11_PS_MODE_ENH: ret = wlan_cmd_enh_power_mode(pmpriv, cmd_ptr, cmd_action, - (t_u16) cmd_oid, pdata_buf); + (t_u16)cmd_oid, pdata_buf); break; case HostCmd_CMD_SDIO_GPIO_INT_CONFIG: ret = wlan_cmd_sdio_gpio_int(pmpriv, cmd_ptr, cmd_action, @@ -2884,12 +3110,15 @@ wlan_ops_uap_prepare_cmd(IN t_void * priv, case HostCmd_CMD_802_11_SNMP_MIB: ret = wlan_uap_cmd_snmp_mib(pmpriv, cmd_ptr, cmd_action, cmd_oid, - (pmlan_ioctl_req) pioctl_buf, + (pmlan_ioctl_req)pioctl_buf, pdata_buf); break; case HostCmd_CMD_802_11D_DOMAIN_INFO: ret = wlan_cmd_802_11d_domain_info(pmpriv, cmd_ptr, cmd_action); break; + case HostCmd_CMD_CHAN_REPORT_REQUEST: + ret = wlan_11h_cmd_process(pmpriv, cmd_ptr, pdata_buf); + break; case HOST_CMD_APCMD_STA_DEAUTH: ret = wlan_uap_cmd_sta_deauth(pmpriv, cmd_ptr, pdata_buf); break; @@ -2905,7 +3134,7 @@ wlan_ops_uap_prepare_cmd(IN t_void * priv, break; case HostCmd_CMD_802_11_HS_CFG_ENH: ret = wlan_uap_cmd_802_11_hs_cfg(pmpriv, cmd_ptr, cmd_action, - (hs_config_param *) pdata_buf); + (hs_config_param *)pdata_buf); break; case HostCmd_CMD_HS_WAKEUP_REASON: ret = wlan_cmd_hs_wakeup_reason(pmpriv, cmd_ptr, pdata_buf); @@ -2938,7 +3167,7 @@ wlan_ops_uap_prepare_cmd(IN t_void * priv, case HostCmd_CMD_SET_BSS_MODE: cmd_ptr->command = wlan_cpu_to_le16(cmd_no); if (pdata_buf) - cmd_ptr->params.bss_mode.con_type = *(t_u8 *) pdata_buf; + cmd_ptr->params.bss_mode.con_type = *(t_u8 *)pdata_buf; else cmd_ptr->params.bss_mode.con_type = BSS_MODE_WIFIDIRECT_GO; @@ -2951,7 +3180,7 @@ wlan_ops_uap_prepare_cmd(IN t_void * priv, case HostCmd_CMD_VERSION_EXT: cmd_ptr->command = wlan_cpu_to_le16(cmd_no); cmd_ptr->params.verext.version_str_sel = - (t_u8) (*((t_u32 *) pdata_buf)); + (t_u8)(*((t_u32 *)pdata_buf)); cmd_ptr->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_VERSION_EXT) + S_DS_GEN); @@ -2962,7 +3191,7 @@ wlan_ops_uap_prepare_cmd(IN t_void * priv, cmd_ptr->params.rx_mgmt_ind.action = wlan_cpu_to_le16(cmd_action); cmd_ptr->params.rx_mgmt_ind.mgmt_subtype_mask = - (t_u32) (*((t_u32 *) pdata_buf)); + (t_u32)(*((t_u32 *)pdata_buf)); cmd_ptr->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_RX_MGMT_IND) + S_DS_GEN); @@ -3015,6 +3244,20 @@ wlan_ops_uap_prepare_cmd(IN t_void * priv, case HostCmd_CMD_WMM_QUEUE_CONFIG: ret = wlan_cmd_wmm_queue_config(pmpriv, cmd_ptr, pdata_buf); break; + case HostCmd_CMD_MULTI_CHAN_CONFIG: + ret = wlan_cmd_multi_chan_cfg(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_MULTI_CHAN_POLICY: + ret = wlan_cmd_multi_chan_policy(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; +#ifdef RX_PACKET_COALESCE + case HostCmd_CMD_RX_PKT_COALESCE_CFG: + ret = wlan_cmd_rx_pkt_coalesce_cfg(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; +#endif default: PRINTM(MERROR, "PREP_CMD: unknown command- %#x\n", cmd_no); if (pioctl_req) @@ -3037,16 +3280,17 @@ wlan_ops_uap_prepare_cmd(IN t_void * priv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_ops_uap_process_cmdresp(IN t_void * priv, +wlan_ops_uap_process_cmdresp(IN t_void *priv, IN t_u16 cmdresp_no, - IN t_void * pcmd_buf, IN t_void * pioctl) + IN t_void *pcmd_buf, IN t_void *pioctl) { mlan_status ret = MLAN_STATUS_SUCCESS; - mlan_private *pmpriv = (mlan_private *) priv; - HostCmd_DS_COMMAND *resp = (HostCmd_DS_COMMAND *) pcmd_buf; - mlan_ioctl_req *pioctl_buf = (mlan_ioctl_req *) pioctl; + mlan_private *pmpriv = (mlan_private *)priv; + HostCmd_DS_COMMAND *resp = (HostCmd_DS_COMMAND *)pcmd_buf; + mlan_ioctl_req *pioctl_buf = (mlan_ioctl_req *)pioctl; mlan_adapter *pmadapter = pmpriv->adapter; int ctr; + const mlan_sdio_device *psdio_device = pmadapter->psdio_device; ENTER(); @@ -3061,13 +3305,39 @@ wlan_ops_uap_process_cmdresp(IN t_void * priv, switch (cmdresp_no) { case HOST_CMD_APCMD_BSS_STOP: pmpriv->uap_bss_started = MFALSE; - + wlan_11h_check_update_radar_det_state(pmpriv); + + if (pmpriv->adapter->state_rdh.stage == RDH_STOP_INTFS) + wlan_11h_radar_detected_callback((t_void *)pmpriv); + wlan_coex_ampdu_rxwinsize(pmadapter); +#ifdef DRV_EMBEDDED_AUTHENTICATOR + if (pmpriv->adapter->psdio_device->driver_supplicant_auth) { + if (IsAuthenticatorEnabled(pmpriv->psapriv)) { + AuthenticatorBssConfig(pmpriv->psapriv, MNULL, + 0, 1, 0); + AuthenticatorkeyClear(pmpriv->psapriv); + } + } +#endif break; case HOST_CMD_APCMD_BSS_START: + if (pmpriv->adapter->state_rdh.stage == RDH_RESTART_INTFS) + wlan_11h_radar_detected_callback((t_void *)pmpriv); + /* Stop pps_uapsd_mode once bss_start */ + pmpriv->adapter->tx_lock_flag = MFALSE; + pmpriv->adapter->pps_uapsd_mode = MFALSE; + pmpriv->adapter->delay_null_pkt = MFALSE; + break; case HOST_CMD_APCMD_SYS_RESET: pmpriv->uap_bss_started = MFALSE; +#ifdef DRV_EMBEDDED_AUTHENTICATOR + if (pmpriv->adapter->psdio_device->driver_supplicant_auth) + AuthenitcatorInitBssConfig(pmpriv->psapriv); +#endif ret = wlan_uap_ret_sys_reset(pmpriv, resp, pioctl_buf); + wlan_11h_check_update_radar_det_state(pmpriv); + wlan_coex_ampdu_rxwinsize(pmadapter); break; case HOST_CMD_APCMD_SYS_INFO: break; @@ -3088,6 +3358,9 @@ wlan_ops_uap_process_cmdresp(IN t_void * priv, case HostCmd_CMD_802_11D_DOMAIN_INFO: ret = wlan_ret_802_11d_domain_info(pmpriv, resp); break; + case HostCmd_CMD_CHAN_REPORT_REQUEST: + ret = wlan_11h_cmdresp_process(pmpriv, resp); + break; case HOST_CMD_APCMD_STA_DEAUTH: break; case HOST_CMD_APCMD_REPORT_MIC: @@ -3125,20 +3398,31 @@ wlan_ops_uap_process_cmdresp(IN t_void * priv, break; case HostCmd_CMD_RECONFIGURE_TX_BUFF: pmadapter->tx_buf_size = - (t_u16) wlan_le16_to_cpu(resp->params.tx_buf.buff_size); + (t_u16)wlan_le16_to_cpu(resp->params.tx_buf.buff_size); pmadapter->tx_buf_size = (pmadapter->tx_buf_size / MLAN_SDIO_BLOCK_SIZE) * MLAN_SDIO_BLOCK_SIZE; pmadapter->curr_tx_buf_size = pmadapter->tx_buf_size; pmadapter->mp_end_port = wlan_le16_to_cpu(resp->params.tx_buf.mp_end_port); - pmadapter->mp_data_port_mask = DATA_PORT_MASK; + pmadapter->mp_data_port_mask = + psdio_device->reg->data_port_mask; - for (ctr = 1; ctr <= MAX_PORT - pmadapter->mp_end_port; ctr++) { + for (ctr = 1; + ctr <= psdio_device->max_ports - pmadapter->mp_end_port; + ctr++) { pmadapter->mp_data_port_mask &= - ~(1 << (MAX_PORT - ctr)); + ~(1 << (psdio_device->max_ports - ctr)); + } + + if (psdio_device->supports_sdio_new_mode) { + pmadapter->curr_wr_port = 0; + pmadapter->mpa_tx.pkt_aggr_limit = + MIN(psdio_device->mp_aggr_pkt_limit, + (pmadapter->mp_end_port >> 1)); + } else { + pmadapter->curr_wr_port = 1; } - pmadapter->curr_wr_port = 1; PRINTM(MCMND, "end port %d, data port mask %x\n", wlan_le16_to_cpu(resp->params.tx_buf.mp_end_port), pmadapter->mp_data_port_mask); @@ -3197,6 +3481,17 @@ wlan_ops_uap_process_cmdresp(IN t_void * priv, case HostCmd_CMD_WMM_QUEUE_CONFIG: ret = wlan_ret_wmm_queue_config(pmpriv, resp, pioctl_buf); break; + case HostCmd_CMD_MULTI_CHAN_CONFIG: + ret = wlan_ret_multi_chan_cfg(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_MULTI_CHAN_POLICY: + ret = wlan_ret_multi_chan_policy(pmpriv, resp, pioctl_buf); + break; +#ifdef RX_PACKET_COALESCE + case HostCmd_CMD_RX_PKT_COALESCE_CFG: + ret = wlan_ret_rx_pkt_coalesce_cfg(pmpriv, resp, pioctl_buf); + break; +#endif default: PRINTM(MERROR, "CMD_RESP: Unknown command response %#x\n", resp->command); @@ -3216,9 +3511,9 @@ wlan_ops_uap_process_cmdresp(IN t_void * priv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_ops_uap_process_event(IN t_void * priv) +wlan_ops_uap_process_event(IN t_void *priv) { - pmlan_private pmpriv = (pmlan_private) priv; + pmlan_private pmpriv = (pmlan_private)priv; pmlan_adapter pmadapter = pmpriv->adapter; pmlan_callbacks pcb = &pmadapter->callbacks; mlan_status ret = MLAN_STATUS_SUCCESS; @@ -3248,7 +3543,7 @@ wlan_ops_uap_process_event(IN t_void * priv) pmbuf->status_code = MLAN_ERROR_NO_MEM; goto done; } - pevent = (pmlan_event) event_buf; + pevent = (pmlan_event)event_buf; memset(pmadapter, &pevent->event_id, 0, sizeof(pevent->event_id)); if (eventcause != EVENT_PS_SLEEP && eventcause != EVENT_PS_AWAKE && @@ -3264,6 +3559,13 @@ wlan_ops_uap_process_event(IN t_void * priv) MLAN_MAC_ADDR_LENGTH); pevent->event_id = MLAN_EVENT_ID_UAP_FW_BSS_START; wlan_check_uap_capability(pmpriv, pmbuf); + wlan_coex_ampdu_rxwinsize(pmadapter); +#ifdef DRV_EMBEDDED_AUTHENTICATOR + if (pmpriv->adapter->psdio_device->driver_supplicant_auth) + if (IsAuthenticatorEnabled(pmpriv->psapriv)) + AuthenticatorKeyMgmtInit(pmpriv->psapriv, + pmpriv->curr_addr); +#endif break; case EVENT_MICRO_AP_BSS_ACTIVE: PRINTM(MEVENT, "EVENT: MICRO_AP_BSS_ACTIVE\n"); @@ -3310,7 +3612,12 @@ wlan_ops_uap_process_event(IN t_void * priv) sta_ptr = wlan_add_station_entry(pmpriv, sta_addr); PRINTM(MMSG, "wlan: EVENT: MICRO_AP_STA_ASSOC " MACSTR "\n", MAC2STR(sta_addr)); - if (pmpriv->is_11n_enabled) { + if (pmpriv->is_11n_enabled +#ifdef DRV_EMBEDDED_AUTHENTICATOR + || (pmpriv->adapter->psdio_device->driver_supplicant_auth && + IsAuthenticatorEnabled(pmpriv->psapriv)) +#endif + ) { wlan_check_sta_capability(pmpriv, pmbuf, sta_ptr); for (i = 0; i < MAX_NUM_TID; i++) { if (sta_ptr->is_11n_enabled) @@ -3326,6 +3633,14 @@ wlan_ops_uap_process_event(IN t_void * priv) } if (pmpriv->sec_info.wapi_enabled) wlan_update_wapi_info_tlv(pmpriv, pmbuf); +#ifdef DRV_EMBEDDED_AUTHENTICATOR + /**enter authenticator*/ + if (pmpriv->adapter->psdio_device->driver_supplicant_auth) + if (IsAuthenticatorEnabled(pmpriv->psapriv)) + AuthenticatorSendEapolPacket(pmpriv->psapriv, + sta_ptr-> + cm_connectioninfo); +#endif pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; break; case EVENT_MICRO_AP_STA_DEAUTH: @@ -3333,7 +3648,7 @@ wlan_ops_uap_process_event(IN t_void * priv) pevent->bss_index = pmpriv->bss_index; pevent->event_len = pmbuf->data_len - 4; /* skip event length field */ - memcpy(pmadapter, (t_u8 *) pevent->event_buf, + memcpy(pmadapter, (t_u8 *)pevent->event_buf, pmbuf->pbuf + pmbuf->data_offset + 4, pevent->event_len); wlan_recv_event(pmpriv, pevent->event_id, pevent); memcpy(pmadapter, sta_addr, pmadapter->event_body + 2, @@ -3397,24 +3712,68 @@ wlan_ops_uap_process_event(IN t_void * priv) break; case EVENT_AMSDU_AGGR_CTRL: PRINTM(MEVENT, "EVENT: AMSDU_AGGR_CTRL %d\n", - *(t_u16 *) pmadapter->event_body); + *(t_u16 *)pmadapter->event_body); pmadapter->tx_buf_size = MIN(pmadapter->curr_tx_buf_size, - wlan_le16_to_cpu(*(t_u16 *) pmadapter->event_body)); + wlan_le16_to_cpu(*(t_u16 *)pmadapter->event_body)); PRINTM(MEVENT, "tx_buf_size %d\n", pmadapter->tx_buf_size); break; case EVENT_TX_DATA_PAUSE: PRINTM(MEVENT, "EVENT: TX_DATA_PAUSE\n"); wlan_process_tx_pause_event(priv, pmbuf); break; + case EVENT_RADAR_DETECTED: + PRINTM(MEVENT, "EVENT: Radar Detected\n"); + + /* Send as passthru first, this event can cause other events */ + memset(pmadapter, event_buf, 0x00, MAX_EVENT_SIZE); + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; + pevent->event_len = pmbuf->data_len; + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset, pevent->event_len); + wlan_recv_event(pmpriv, pevent->event_id, pevent); + pevent->event_id = 0; /* clear to avoid resending at end of + fcn */ + + if (pmadapter->state_rdh.stage == RDH_OFF) { + pmadapter->state_rdh.stage = RDH_CHK_INTFS; + wlan_11h_radar_detected_handling(pmadapter); + } else { + PRINTM(MEVENT, "Ignore Event Radar Detected - handling" + " already in progress.\n"); + } + break; + case EVENT_CHANNEL_REPORT_RDY: + PRINTM(MEVENT, "EVENT: Channel Report Ready\n"); + memset(pmadapter, event_buf, 0x00, MAX_EVENT_SIZE); + /* Setup event buffer */ + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_FW_CHANNEL_REPORT_RDY; + pevent->event_len = pmbuf->data_len - sizeof(eventcause); + /* Copy event data */ + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset + sizeof(eventcause), + pevent->event_len); + /* Handle / pass event data, and free buffer */ + ret = wlan_11h_handle_event_chanrpt_ready(pmpriv, pevent); + + /* Send up this Event to unblock MOAL waitqueue */ + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_MEAS_REPORT, MNULL); + pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; + break; #ifdef WIFI_DIRECT_SUPPORT case EVENT_REMAIN_ON_CHANNEL_EXPIRED: PRINTM(MEVENT, "EVENT: REMAIN_ON_CHANNEL_EXPIRED reason=%d\n", - *(t_u16 *) pmadapter->event_body); + *(t_u16 *)pmadapter->event_body); wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_FLUSH_RX_WORK, MNULL); pevent->event_id = MLAN_EVENT_ID_FW_REMAIN_ON_CHAN_EXPIRED; break; #endif + case EVENT_MULTI_CHAN_INFO: + PRINTM(MEVENT, "EVENT: MULTI_CHAN_INFO\n"); + wlan_handle_event_multi_chan_info(pmpriv, pmbuf); + break; case EVENT_FW_DEBUG_INFO: PRINTM(MERROR, "EVENT: FW Debug Info\n"); @@ -3423,13 +3782,22 @@ wlan_ops_uap_process_event(IN t_void * priv) pevent->event_id = MLAN_EVENT_ID_FW_DEBUG_INFO; pevent->event_len = pmbuf->data_len - sizeof(eventcause); memcpy(pmadapter, - (t_u8 *) pevent->event_buf, + (t_u8 *)pevent->event_buf, pmbuf->pbuf + pmbuf->data_offset + sizeof(eventcause), pevent->event_len); wlan_recv_event(pmpriv, pevent->event_id, pevent); pevent->event_id = 0; /* clear to avoid resending at end of fcn */ break; + case EVENT_TX_STATUS_REPORT: + PRINTM(MINFO, "EVENT: TX_STATUS\n"); + pevent->event_id = MLAN_EVENT_ID_FW_TX_STATUS; + break; + case EVENT_BT_COEX_WLAN_PARA_CHANGE: + PRINTM(MEVENT, "EVENT: BT coex wlan param update\n"); + wlan_bt_coex_wlan_param_update_event(pmpriv, pmbuf); + break; + default: pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; break; @@ -3438,7 +3806,7 @@ wlan_ops_uap_process_event(IN t_void * priv) if (pevent->event_id) { pevent->bss_index = pmpriv->bss_index; pevent->event_len = pmbuf->data_len; - memcpy(pmadapter, (t_u8 *) pevent->event_buf, + memcpy(pmadapter, (t_u8 *)pevent->event_buf, pmbuf->pbuf + pmbuf->data_offset, pevent->event_len); wlan_recv_event(pmpriv, pevent->event_id, pevent); } @@ -3458,10 +3826,10 @@ wlan_ops_uap_process_event(IN t_void * priv) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_PENDING or MLAN_STATUS_FAILURE */ mlan_status -wlan_ops_uap_init_cmd(IN t_void * priv, IN t_u8 first_bss) +wlan_ops_uap_init_cmd(IN t_void *priv, IN t_u8 first_bss) { mlan_status ret = MLAN_STATUS_SUCCESS; - pmlan_private pmpriv = (pmlan_private) priv; + pmlan_private pmpriv = (pmlan_private)priv; t_u16 last_cmd = 0; ENTER(); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_uap_ioctl.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_uap_ioctl.c old mode 100755 new mode 100644 index 9eae74ef..8560479c --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_uap_ioctl.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_uap_ioctl.c @@ -34,6 +34,7 @@ Change log: #include "mlan_sdio.h" #include "mlan_11n.h" #include "mlan_fw.h" +#include "mlan_11h.h" /******************************************************** Global Variables @@ -63,7 +64,7 @@ wlan_uap_bss_ioctl_stop(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_BSS_STOP, HostCmd_ACT_GEN_SET, - 0, (t_void *) pioctl_req, MNULL); + 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -71,6 +72,118 @@ wlan_uap_bss_ioctl_stop(IN pmlan_adapter pmadapter, return ret; } +/** + * @brief Callback to finish BSS IOCTL START + * Not to be called directly to initiate bss_start + * + * @param priv A pointer to mlan_private structure (cast from t_void*) + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + * @sa wlan_uap_bss_ioctl_start + */ +static mlan_status +wlan_uap_callback_bss_ioctl_start(IN t_void *priv) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = (mlan_private *)priv; + mlan_callbacks *pcb = (mlan_callbacks *)&pmpriv->adapter->callbacks; + wlan_uap_get_info_cb_t *puap_state_chan_cb = &pmpriv->uap_state_chan_cb; + t_u8 old_channel; + + ENTER(); + /* clear callback now that we're here */ + puap_state_chan_cb->get_chan_callback = MNULL; + + /* + * Check if the region and channel requires we check for radar. + */ + if ((puap_state_chan_cb->band_config & BAND_CONFIG_5GHZ) && + wlan_11h_radar_detect_required(pmpriv, + puap_state_chan_cb->channel)) { + + /* first check if channel is under NOP */ + if (wlan_11h_is_channel_under_nop(pmpriv->adapter, + puap_state_chan_cb-> + channel)) { + /* recently we've seen radar on this channel */ + ret = MLAN_STATUS_FAILURE; + } + + /* Check cached radar check on the channel */ + if (ret == MLAN_STATUS_SUCCESS) + ret = wlan_11h_check_chan_report(pmpriv, + puap_state_chan_cb-> + channel); + + /* Found radar: try to switch to a non-dfs channel */ + if (ret != MLAN_STATUS_SUCCESS) { + old_channel = puap_state_chan_cb->channel; + ret = wlan_11h_switch_non_dfs_chan(pmpriv, + &puap_state_chan_cb-> + channel); + + if (ret == MLAN_STATUS_SUCCESS) { + ret = wlan_uap_set_channel(pmpriv, + pmpriv-> + uap_state_chan_cb. + band_config, + puap_state_chan_cb-> + channel); + if (ret == MLAN_STATUS_SUCCESS) { + PRINTM(MMSG, + "Radar found on channel %d," + "switch to new channel %d.\n", + old_channel, + puap_state_chan_cb->channel); + } else { + PRINTM(MMSG, + "Radar found on channel %d," + " switch to new channel %d failed.\n", + old_channel, + puap_state_chan_cb->channel); + pcb->moal_ioctl_complete(pmpriv-> + adapter-> + pmoal_handle, + puap_state_chan_cb-> + pioctl_req_curr, + MLAN_STATUS_FAILURE); + goto done; + } + } else { + PRINTM(MMSG, + "Radar found on channel %d, no switch channel available.\n", + old_channel); + /* No command sent with the ioctl, need + manually signal completion */ + pcb->moal_ioctl_complete(pmpriv->adapter-> + pmoal_handle, + puap_state_chan_cb-> + pioctl_req_curr, + MLAN_STATUS_FAILURE); + goto done; + } + } else { + PRINTM(MINFO, "No Radar found on channel %d\n", + puap_state_chan_cb->channel); + } + } + + /* else okay to send command: not DFS channel or no radar */ + ret = wlan_prepare_cmd(pmpriv, + HOST_CMD_APCMD_BSS_START, + HostCmd_ACT_GEN_SET, + 0, + (t_void *)puap_state_chan_cb->pioctl_req_curr, + MNULL); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + +done: + puap_state_chan_cb->pioctl_req_curr = MNULL; /* prevent re-use */ + LEAVE(); + return ret; +} + /** * @brief Start BSS * @@ -79,6 +192,9 @@ wlan_uap_bss_ioctl_stop(IN pmlan_adapter pmadapter, * * @return MLAN_STATUS_PENDING --success, otherwise fail */ +/** + * @sa wlan_uap_callback_bss_ioctl_start + */ static mlan_status wlan_uap_bss_ioctl_start(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) @@ -88,10 +204,14 @@ wlan_uap_bss_ioctl_start(IN pmlan_adapter pmadapter, ENTER(); - ret = wlan_prepare_cmd(pmpriv, - HOST_CMD_APCMD_BSS_START, - HostCmd_ACT_GEN_SET, - 0, (t_void *) pioctl_req, MNULL); + /* First check channel report, defer BSS_START CMD to callback. */ + /* store params, issue command to get UAP channel, whose CMD_RESP will + callback remainder of bss_start handling */ + pmpriv->uap_state_chan_cb.pioctl_req_curr = pioctl_req; + pmpriv->uap_state_chan_cb.get_chan_callback = + wlan_uap_callback_bss_ioctl_start; + + ret = wlan_uap_get_channel(pmpriv); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -123,8 +243,10 @@ wlan_uap_bss_ioctl_reset(IN pmlan_adapter pmadapter, for (i = 0; i < pmadapter->max_mgmt_ie_index; i++) memset(pmadapter, &pmpriv->mgmt_ie[i], 0, sizeof(custom_ie)); pmpriv->add_ba_param.timeout = MLAN_DEFAULT_BLOCK_ACK_TIMEOUT; - pmpriv->add_ba_param.tx_win_size = MLAN_UAP_AMPDU_DEF_TXWINSIZE; - pmpriv->add_ba_param.rx_win_size = MLAN_UAP_AMPDU_DEF_RXWINSIZE; + pmpriv->add_ba_param.tx_win_size = + pmadapter->psdio_device->ampdu_info->ampdu_uap_txwinsize; + pmpriv->add_ba_param.rx_win_size = + pmadapter->psdio_device->ampdu_info->ampdu_uap_rxwinsize; for (i = 0; i < MAX_NUM_TID; i++) { pmpriv->aggr_prio_tbl[i].ampdu_user = tos_to_tid_inv[i]; pmpriv->aggr_prio_tbl[i].amsdu = BA_STREAM_NOT_ALLOWED; @@ -141,7 +263,7 @@ wlan_uap_bss_ioctl_reset(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_RESET, HostCmd_ACT_GEN_SET, - 0, (t_void *) pioctl_req, MNULL); + 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -168,7 +290,7 @@ wlan_uap_bss_ioctl_mac_address(IN pmlan_adapter pmadapter, ENTER(); - bss = (mlan_ds_bss *) pioctl_req->pbuf; + bss = (mlan_ds_bss *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) { memcpy(pmadapter, pmpriv->curr_addr, &bss->param.mac_addr, MLAN_MAC_ADDR_LENGTH); @@ -177,7 +299,7 @@ wlan_uap_bss_ioctl_mac_address(IN pmlan_adapter pmadapter, cmd_action = HostCmd_ACT_GEN_GET; /* Send request to firmware */ ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, - cmd_action, 0, (t_void *) pioctl_req, MNULL); + cmd_action, 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -205,7 +327,7 @@ wlan_uap_get_stats(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_SNMP_MIB, HostCmd_ACT_GEN_GET, - 0, (t_void *) pioctl_req, MNULL); + 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -238,7 +360,7 @@ wlan_uap_bss_ioctl_config(IN pmlan_adapter pmadapter, /* Send request to firmware */ ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, - cmd_action, 0, (t_void *) pioctl_req, MNULL); + cmd_action, 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -265,13 +387,13 @@ wlan_uap_bss_ioctl_deauth_sta(IN pmlan_adapter pmadapter, ENTER(); - bss = (mlan_ds_bss *) pioctl_req->pbuf; + bss = (mlan_ds_bss *)pioctl_req->pbuf; ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_STA_DEAUTH, HostCmd_ACT_GEN_SET, 0, - (t_void *) pioctl_req, - (t_void *) & bss->param.deauth_param); + (t_void *)pioctl_req, + (t_void *)&bss->param.deauth_param); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -299,7 +421,7 @@ wlan_uap_get_sta_list(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_STA_LIST, HostCmd_ACT_GEN_GET, - 0, (t_void *) pioctl_req, MNULL); + 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -328,7 +450,7 @@ wlan_uap_misc_ioctl_soft_reset(IN pmlan_adapter pmadapter, ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_SOFT_RESET, HostCmd_ACT_GEN_SET, - 0, (t_void *) pioctl_req, MNULL); + 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -349,7 +471,7 @@ wlan_uap_misc_ioctl_txdatapause(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) { mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; - mlan_ds_misc_cfg *pmisc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + mlan_ds_misc_cfg *pmisc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; mlan_status ret = MLAN_STATUS_SUCCESS; t_u16 cmd_action = 0; @@ -363,7 +485,7 @@ wlan_uap_misc_ioctl_txdatapause(IN pmlan_adapter pmadapter, HostCmd_CMD_CFG_TX_DATA_PAUSE, cmd_action, 0, - (t_void *) pioctl_req, + (t_void *)pioctl_req, &(pmisc->param.tx_datapause)); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -392,7 +514,7 @@ wlan_uap_pm_ioctl_mode(IN pmlan_adapter pmadapter, ENTER(); - pm = (mlan_ds_pm_cfg *) pioctl_req->pbuf; + pm = (mlan_ds_pm_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_SET) { if (pm->param.ps_mgmt.ps_mode == PS_MODE_INACTIVITY) { cmd_action = EN_AUTO_PS; @@ -411,8 +533,8 @@ wlan_uap_pm_ioctl_mode(IN pmlan_adapter pmadapter, /* Send request to firmware */ ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_PS_MODE_ENH, - cmd_action, cmd_oid, (t_void *) pioctl_req, - (t_void *) & pm->param.ps_mgmt); + cmd_action, cmd_oid, (t_void *)pioctl_req, + (t_void *)&pm->param.ps_mgmt); if ((ret == MLAN_STATUS_SUCCESS) && (pioctl_req->action == MLAN_ACT_SET) && (cmd_action == DIS_AUTO_PS)) { @@ -436,13 +558,13 @@ wlan_uap_pm_ioctl_mode(IN pmlan_adapter pmadapter, * @return MLAN_STATUS_PENDING --success, otherwise fail */ static mlan_status -wlan_uap_set_wapi_ie(mlan_private * priv, pmlan_ioctl_req pioctl_req) +wlan_uap_set_wapi_ie(mlan_private *priv, pmlan_ioctl_req pioctl_req) { mlan_ds_misc_cfg *misc = MNULL; mlan_status ret = MLAN_STATUS_SUCCESS; ENTER(); - misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; if (misc->param.gen_ie.len) { if (misc->param.gen_ie.len > sizeof(priv->wapi_ie)) { PRINTM(MWARN, "failed to copy WAPI IE, too big\n"); @@ -469,7 +591,7 @@ wlan_uap_set_wapi_ie(mlan_private * priv, pmlan_ioctl_req pioctl_req) /* Send request to firmware */ ret = wlan_prepare_cmd(priv, HOST_CMD_APCMD_SYS_CONFIGURE, - HostCmd_ACT_GEN_SET, 0, (t_void *) pioctl_req, + HostCmd_ACT_GEN_SET, 0, (t_void *)pioctl_req, MNULL); if (ret == MLAN_STATUS_SUCCESS) @@ -498,13 +620,13 @@ wlan_uap_misc_ioctl_gen_ie(IN pmlan_adapter pmadapter, ENTER(); - misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; if ((misc->param.gen_ie.type == MLAN_IE_TYPE_GEN_IE) && (pioctl_req->action == MLAN_ACT_SET)) { if (misc->param.gen_ie.len) { pvendor_ie = - (IEEEtypes_VendorHeader_t *) misc->param.gen_ie. + (IEEEtypes_VendorHeader_t *)misc->param.gen_ie. ie_data; if (pvendor_ie->element_id == WAPI_IE) { /* IE is a WAPI IE so call set_wapi function */ @@ -535,7 +657,7 @@ wlan_uap_sec_ioctl_wapi_enable(IN pmlan_adapter pmadapter, mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; mlan_ds_sec_cfg *sec = MNULL; ENTER(); - sec = (mlan_ds_sec_cfg *) pioctl_req->pbuf; + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) { if (pmpriv->wapi_ie_len) sec->param.wapi_enabled = MTRUE; @@ -574,13 +696,13 @@ wlan_uap_sec_ioctl_report_mic_error(IN pmlan_adapter pmadapter, ENTER(); - sec = (mlan_ds_sec_cfg *) pioctl_req->pbuf; + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_REPORT_MIC, HostCmd_ACT_GEN_SET, 0, - (t_void *) pioctl_req, - (t_void *) sec->param.sta_mac); + (t_void *)pioctl_req, + (t_void *)sec->param.sta_mac); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -605,7 +727,7 @@ wlan_uap_sec_ioctl_set_encrypt_key(IN pmlan_adapter pmadapter, mlan_ds_sec_cfg *sec = MNULL; ENTER(); - sec = (mlan_ds_sec_cfg *) pioctl_req->pbuf; + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; if (pioctl_req->action != MLAN_ACT_SET) { pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; LEAVE(); @@ -621,7 +743,7 @@ wlan_uap_sec_ioctl_set_encrypt_key(IN pmlan_adapter pmadapter, HostCmd_CMD_802_11_KEY_MATERIAL, HostCmd_ACT_GEN_SET, KEY_INFO_ENABLED, - (t_void *) pioctl_req, &sec->param.encrypt_key); + (t_void *)pioctl_req, &sec->param.encrypt_key); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -646,7 +768,7 @@ wlan_uap_get_bss_info(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) ENTER(); - info = (mlan_ds_get_info *) pioctl_req->pbuf; + info = (mlan_ds_get_info *)pioctl_req->pbuf; /* Connection status */ info->param.bss_info.media_connected = pmpriv->media_connected; @@ -692,7 +814,7 @@ wlan_uap_pm_ioctl_deepsleep(IN pmlan_adapter pmadapter, LEAVE(); return MLAN_STATUS_RESOURCE; } - pm = (mlan_ds_pm_cfg *) pioctl_req->pbuf; + pm = (mlan_ds_pm_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) { if (pmadapter->is_deep_sleep) { @@ -708,8 +830,8 @@ wlan_uap_pm_ioctl_deepsleep(IN pmlan_adapter pmadapter, LEAVE(); return MLAN_STATUS_FAILURE; } - if (((mlan_ds_pm_cfg *) pioctl_req->pbuf)->param. - auto_deep_sleep.auto_ds == DEEP_SLEEP_ON) { + if (((mlan_ds_pm_cfg *)pioctl_req->pbuf)->param.auto_deep_sleep. + auto_ds == DEEP_SLEEP_ON) { auto_ds.auto_ds = DEEP_SLEEP_ON; mode = EN_AUTO_PS; PRINTM(MINFO, "Auto Deep Sleep: on\n"); @@ -718,18 +840,18 @@ wlan_uap_pm_ioctl_deepsleep(IN pmlan_adapter pmadapter, auto_ds.auto_ds = DEEP_SLEEP_OFF; PRINTM(MINFO, "Auto Deep Sleep: off\n"); } - if (((mlan_ds_pm_cfg *) pioctl_req->pbuf)->param. - auto_deep_sleep.idletime) + if (((mlan_ds_pm_cfg *)pioctl_req->pbuf)->param.auto_deep_sleep. + idletime) auto_ds.idletime = - ((mlan_ds_pm_cfg *) pioctl_req->pbuf)->param. + ((mlan_ds_pm_cfg *)pioctl_req->pbuf)->param. auto_deep_sleep.idletime; else auto_ds.idletime = pmadapter->idle_time; ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_PS_MODE_ENH, - (t_u16) mode, + (t_u16)mode, BITMAP_AUTO_DS, - (t_void *) pioctl_req, &auto_ds); + (t_void *)pioctl_req, &auto_ds); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; } @@ -737,6 +859,51 @@ wlan_uap_pm_ioctl_deepsleep(IN pmlan_adapter pmadapter, return ret; } +/** + * @brief Set SNMP MIB for 11D + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_snmp_mib_11d(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_snmp_mib *snmp = MNULL; + state_11d_t flag; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_snmp_mib)) { + PRINTM(MWARN, "MLAN snmp_mib IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_snmp_mib); + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + + if ((pioctl_req->action == MLAN_ACT_SET) && pmpriv->uap_bss_started) { + PRINTM(MIOCTL, + "11D setting cannot be changed while UAP bss is started.\n"); + pioctl_req->data_read_written = 0; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + snmp = (mlan_ds_snmp_mib *)pioctl_req->pbuf; + flag = (snmp->param.oid_value) ? ENABLE_11D : DISABLE_11D; + + ret = wlan_11d_enable(pmpriv, (t_void *)pioctl_req, flag); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + /** * @brief Callback to finish domain_info handling * Not to be called directly to initiate domain_info setting. @@ -747,10 +914,10 @@ wlan_uap_pm_ioctl_deepsleep(IN pmlan_adapter pmadapter, * @sa wlan_uap_domain_info */ static mlan_status -wlan_uap_callback_domain_info(IN t_void * priv) +wlan_uap_callback_domain_info(IN t_void *priv) { mlan_status ret = MLAN_STATUS_SUCCESS; - mlan_private *pmpriv = (mlan_private *) priv; + mlan_private *pmpriv = (mlan_private *)priv; wlan_uap_get_info_cb_t *puap_state_chan_cb = &pmpriv->uap_state_chan_cb; mlan_ds_11d_cfg *cfg11d; t_u8 band; @@ -766,8 +933,9 @@ wlan_uap_callback_domain_info(IN t_void * priv) LEAVE(); return ret; } - cfg11d = (mlan_ds_11d_cfg *) puap_state_chan_cb->pioctl_req_curr->pbuf; - band = BAND_B; + cfg11d = (mlan_ds_11d_cfg *)puap_state_chan_cb->pioctl_req_curr->pbuf; + band = (puap_state_chan_cb-> + band_config & BAND_CONFIG_5GHZ) ? BAND_A : BAND_B; ret = wlan_11d_handle_uap_domain_info(pmpriv, band, cfg11d->param.domain_tlv, @@ -835,6 +1003,211 @@ wlan_uap_domain_info(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) return ret; } +/** + * @brief Callback to finish 11H channel check handling. + * Not to be called directly to initiate channel check. + * + * @param priv A pointer to mlan_private structure (cast from t_void*) + * + * @return MLAN_STATUS_SUCCESS/PENDING --success, otherwise fail + * @sa wlan_uap_11h_channel_check_req + */ +static mlan_status +wlan_uap_callback_11h_channel_check_req(IN t_void *priv) +{ + mlan_status ret = MLAN_STATUS_FAILURE; + mlan_private *pmpriv = (mlan_private *)priv; + mlan_callbacks *pcb = (mlan_callbacks *)&pmpriv->adapter->callbacks; + wlan_uap_get_info_cb_t *puap_state_chan_cb = &pmpriv->uap_state_chan_cb; + Band_Config_t *pband_cfg = + (Band_Config_t *)(&puap_state_chan_cb->band_config); + /* keep copy as local variable */ + pmlan_ioctl_req pioctl = puap_state_chan_cb->pioctl_req_curr; + + ENTER(); + /* clear callback now that we're here */ + puap_state_chan_cb->get_chan_callback = MNULL; + /* clear early to avoid race condition */ + puap_state_chan_cb->pioctl_req_curr = MNULL; + + /* + * Check if the region and channel requires a channel availability + * check. + */ + if ((puap_state_chan_cb->band_config & BAND_CONFIG_5GHZ) && + wlan_11h_radar_detect_required(pmpriv, puap_state_chan_cb->channel) + && !wlan_11h_is_channel_under_nop(pmpriv->adapter, + puap_state_chan_cb->channel)) { + + /* + * Radar detection is required for this channel, make sure + * 11h is activated in the firmware + */ + ret = wlan_11h_activate(pmpriv, MNULL, MTRUE); + ret = wlan_11h_config_master_radar_det(pmpriv, MTRUE); + ret = wlan_11h_check_update_radar_det_state(pmpriv); + + /* Check for radar on the channel */ + ret = wlan_11h_issue_radar_detect(pmpriv, + pioctl, + puap_state_chan_cb->channel, + pband_cfg->chanWidth); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + } else { + /* No command sent with the ioctl, need manually signal + completion */ + pcb->moal_ioctl_complete(pmpriv->adapter->pmoal_handle, + pioctl, MLAN_STATUS_COMPLETE); + } + + LEAVE(); + return ret; +} + +/** + * @brief 802.11h uap start channel check + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + * @sa wlan_uap_callback_11h_channel_check_req + */ +static mlan_status +wlan_uap_11h_channel_check_req(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_11h_cfg)) { + PRINTM(MWARN, "MLAN 11h_cfg IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_11h_cfg); + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + + /* store params, issue command to get UAP channel, whose CMD_RESP will + callback remainder of 11H channel check handling */ + pmpriv->uap_state_chan_cb.pioctl_req_curr = pioctl_req; + pmpriv->uap_state_chan_cb.get_chan_callback = + wlan_uap_callback_11h_channel_check_req; + + ret = wlan_uap_get_channel(pmpriv); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Callback to finish 11H handling + * Not to be called directly to initiate 11H setting. + * + * @param pmpriv A pointer to mlan_private structure (cast from t_void*) + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + * @sa wlan_uap_snmp_mib_11h + */ +static mlan_status +wlan_uap_callback_snmp_mib_11h(IN t_void *priv) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = (mlan_private *)priv; + wlan_uap_get_info_cb_t *puap_state_chan_cb = &pmpriv->uap_state_chan_cb; + mlan_ds_snmp_mib *snmp; + t_bool enable_11h; + + ENTER(); + /* clear callback now that we're here */ + puap_state_chan_cb->get_chan_callback = MNULL; + + snmp = (mlan_ds_snmp_mib *)puap_state_chan_cb->pioctl_req_curr->pbuf; + enable_11h = (snmp->param.oid_value) ? MTRUE : MFALSE; + + if (enable_11h) { + if ((puap_state_chan_cb->band_config & BAND_CONFIG_5GHZ) && + wlan_11h_radar_detect_required(pmpriv, + puap_state_chan_cb-> + channel)) { + if (!wlan_11h_is_master_radar_det_active(pmpriv)) + wlan_11h_config_master_radar_det(pmpriv, MTRUE); + } + } + + ret = wlan_11h_activate(pmpriv, + (t_void *)puap_state_chan_cb->pioctl_req_curr, + enable_11h); + wlan_11h_check_update_radar_det_state(pmpriv); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + puap_state_chan_cb->pioctl_req_curr = MNULL; /* prevent re-use */ + LEAVE(); + return ret; +} + +/** + * @brief Set SNMP MIB for 11H + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + * @sa wlan_uap_callback_snmp_mib_11h + */ +static mlan_status +wlan_uap_snmp_mib_11h(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_snmp_mib *snmp = MNULL; + t_bool enable; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_snmp_mib)) { + PRINTM(MWARN, "MLAN snmp_mib IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_snmp_mib); + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + snmp = (mlan_ds_snmp_mib *)pioctl_req->pbuf; + enable = (snmp->param.oid_value) ? MTRUE : MFALSE; + + if (enable) { + /* first enable 11D if it is not enabled */ + if (!wlan_11d_is_enabled(pmpriv)) { + ret = wlan_11d_enable(pmpriv, MNULL, ENABLE_11D); + if (ret != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, + "Failed to first enable 11D before enabling 11H.\n"); + LEAVE(); + return ret; + } + } + } + + /* store params, issue command to get UAP channel, whose CMD_RESP will + callback remainder of 11H handling (and radar detect if DFS chan) */ + pmpriv->uap_state_chan_cb.pioctl_req_curr = pioctl_req; + pmpriv->uap_state_chan_cb.get_chan_callback = + wlan_uap_callback_snmp_mib_11h; + + ret = wlan_uap_get_channel(pmpriv); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + /******************************************************** Global Functions ********************************************************/ @@ -864,6 +1237,74 @@ wlan_uap_get_channel(IN pmlan_private pmpriv) return ret; } +/** + * @brief Issue CMD to UAP firmware to set current channel + * + * @param pmpriv A pointer to mlan_private structure + * @param uap_band_cfg UAP band configuration + * @param channel New channel + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +mlan_status +wlan_uap_set_channel(IN pmlan_private pmpriv, + IN t_u8 uap_band_cfg, IN t_u8 channel) +{ + MrvlIEtypes_channel_band_t tlv_chan_band; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + memset(pmpriv->adapter, &tlv_chan_band, 0, sizeof(tlv_chan_band)); + tlv_chan_band.header.type = TLV_TYPE_UAP_CHAN_BAND_CONFIG; + tlv_chan_band.header.len = sizeof(MrvlIEtypes_channel_band_t) + - sizeof(MrvlIEtypesHeader_t); + tlv_chan_band.band_config = uap_band_cfg; + tlv_chan_band.channel = channel; + + ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, + HostCmd_ACT_GEN_SET, 0, MNULL, &tlv_chan_band); + LEAVE(); + return ret; +} + +/** + * @brief Issue CMD to UAP firmware to get current beacon and dtim periods + * + * @param pmpriv A pointer to mlan_private structure + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +mlan_status +wlan_uap_get_beacon_dtim(IN pmlan_private pmpriv) +{ + t_u8 tlv_buffer[sizeof(MrvlIEtypes_beacon_period_t) + + sizeof(MrvlIEtypes_dtim_period_t)]; + MrvlIEtypes_beacon_period_t *ptlv_beacon_pd; + MrvlIEtypes_dtim_period_t *ptlv_dtim_pd; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(pmpriv->adapter, &tlv_buffer, 0, sizeof(tlv_buffer)); + ptlv_beacon_pd = (MrvlIEtypes_beacon_period_t *)tlv_buffer; + ptlv_beacon_pd->header.type = TLV_TYPE_UAP_BEACON_PERIOD; + ptlv_beacon_pd->header.len = sizeof(MrvlIEtypes_beacon_period_t) + - sizeof(MrvlIEtypesHeader_t); + + ptlv_dtim_pd = (MrvlIEtypes_dtim_period_t *)(tlv_buffer + + + sizeof + (MrvlIEtypes_beacon_period_t)); + ptlv_dtim_pd->header.type = TLV_TYPE_UAP_DTIM_PERIOD; + ptlv_dtim_pd->header.len = sizeof(MrvlIEtypes_dtim_period_t) + - sizeof(MrvlIEtypesHeader_t); + + ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, + HostCmd_ACT_GEN_GET, 0, MNULL, tlv_buffer); + LEAVE(); + return ret; +} + /** * @brief MLAN uap ioctl handler * @@ -873,9 +1314,9 @@ wlan_uap_get_channel(IN pmlan_private pmpriv) * @return MLAN_STATUS_SUCCESS --success, otherwise fail */ mlan_status -wlan_ops_uap_ioctl(t_void * adapter, pmlan_ioctl_req pioctl_req) +wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req) { - pmlan_adapter pmadapter = (pmlan_adapter) adapter; + pmlan_adapter pmadapter = (pmlan_adapter)adapter; mlan_status status = MLAN_STATUS_SUCCESS; mlan_ds_bss *bss = MNULL; mlan_ds_get_info *pget_info = MNULL; @@ -883,16 +1324,21 @@ wlan_ops_uap_ioctl(t_void * adapter, pmlan_ioctl_req pioctl_req) mlan_ds_sec_cfg *sec = MNULL; mlan_ds_pm_cfg *pm = MNULL; mlan_ds_11d_cfg *cfg11d = MNULL; + mlan_ds_snmp_mib *snmp = MNULL; + mlan_ds_11h_cfg *cfg11h = MNULL; mlan_ds_radio_cfg *radiocfg = MNULL; mlan_ds_rate *rate = MNULL; mlan_ds_reg_mem *reg_mem = MNULL; mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) + mlan_ds_scan *pscan; +#endif ENTER(); switch (pioctl_req->req_id) { case MLAN_IOCTL_BSS: - bss = (mlan_ds_bss *) pioctl_req->pbuf; + bss = (mlan_ds_bss *)pioctl_req->pbuf; if (bss->sub_command == MLAN_OID_BSS_MAC_ADDR) status = wlan_uap_bss_ioctl_mac_address(pmadapter, pioctl_req); @@ -923,8 +1369,29 @@ wlan_ops_uap_ioctl(t_void * adapter, pmlan_ioctl_req pioctl_req) status = wlan_bss_ioctl_bss_remove(pmadapter, pioctl_req); break; +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) + case MLAN_IOCTL_SCAN: + pscan = (mlan_ds_scan *)pioctl_req->pbuf; + if ((pscan->sub_command == MLAN_OID_SCAN_NORMAL) && + (pioctl_req->action == MLAN_ACT_GET)) { + PRINTM(MIOCTL, "Get scan table in uap\n"); + pscan->param.scan_resp.pscan_table = + (t_u8 *)pmadapter->pscan_table; + pscan->param.scan_resp.num_in_scan_table = + pmadapter->num_in_scan_table; + pscan->param.scan_resp.age_in_secs = + pmadapter->age_in_secs; + pioctl_req->data_read_written = + sizeof(mlan_scan_resp) + MLAN_SUB_COMMAND_SIZE; + pscan->param.scan_resp.pchan_stats = + (t_u8 *)pmadapter->pchan_stats; + pscan->param.scan_resp.num_in_chan_stats = + pmadapter->num_in_chan_stats; + } + break; +#endif case MLAN_IOCTL_GET_INFO: - pget_info = (mlan_ds_get_info *) pioctl_req->pbuf; + pget_info = (mlan_ds_get_info *)pioctl_req->pbuf; if (pget_info->sub_command == MLAN_OID_GET_VER_EXT) status = wlan_get_info_ver_ext(pmadapter, pioctl_req); else if (pget_info->sub_command == MLAN_OID_GET_DEBUG_INFO) @@ -953,7 +1420,7 @@ wlan_ops_uap_ioctl(t_void * adapter, pmlan_ioctl_req pioctl_req) } break; case MLAN_IOCTL_MISC_CFG: - misc = (mlan_ds_misc_cfg *) pioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; if (misc->sub_command == MLAN_OID_MISC_INIT_SHUTDOWN) status = wlan_misc_ioctl_init_shutdown(pmadapter, pioctl_req); @@ -985,13 +1452,25 @@ wlan_ops_uap_ioctl(t_void * adapter, pmlan_ioctl_req pioctl_req) if (misc->sub_command == MLAN_OID_MISC_MAC_CONTROL) status = wlan_misc_ioctl_mac_control(pmadapter, pioctl_req); + if (misc->sub_command == MLAN_OID_MISC_MULTI_CHAN_CFG) + status = wlan_misc_ioctl_multi_chan_config(pmadapter, + pioctl_req); + if (misc->sub_command == MLAN_OID_MISC_MULTI_CHAN_POLICY) + status = wlan_misc_ioctl_multi_chan_policy(pmadapter, + pioctl_req); +#ifdef RX_PACKET_COALESCE + if (misc->sub_command == MLAN_OID_MISC_RX_PACKET_COALESCE) + status = wlan_misc_ioctl_rx_pkt_coalesce_config + (pmadapter, pioctl_req); +#endif #ifdef WIFI_DIRECT_SUPPORT if (misc->sub_command == MLAN_OID_MISC_WIFI_DIRECT_CONFIG) status = wlan_misc_p2p_config(pmadapter, pioctl_req); #endif + break; case MLAN_IOCTL_PM_CFG: - pm = (mlan_ds_pm_cfg *) pioctl_req->pbuf; + pm = (mlan_ds_pm_cfg *)pioctl_req->pbuf; if (pm->sub_command == MLAN_OID_PM_CFG_PS_MODE) status = wlan_uap_pm_ioctl_mode(pmadapter, pioctl_req); if (pm->sub_command == MLAN_OID_PM_CFG_DEEP_SLEEP) @@ -1005,8 +1484,15 @@ wlan_ops_uap_ioctl(t_void * adapter, pmlan_ioctl_req pioctl_req) if (pm->sub_command == MLAN_OID_PM_INFO) status = wlan_get_pm_info(pmadapter, pioctl_req); break; + case MLAN_IOCTL_SNMP_MIB: + snmp = (mlan_ds_snmp_mib *)pioctl_req->pbuf; + if (snmp->sub_command == MLAN_OID_SNMP_MIB_DOT11D) + status = wlan_uap_snmp_mib_11d(pmadapter, pioctl_req); + if (snmp->sub_command == MLAN_OID_SNMP_MIB_DOT11H) + status = wlan_uap_snmp_mib_11h(pmadapter, pioctl_req); + break; case MLAN_IOCTL_SEC_CFG: - sec = (mlan_ds_sec_cfg *) pioctl_req->pbuf; + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; if (sec->sub_command == MLAN_OID_SEC_CFG_ENCRYPT_KEY) status = wlan_uap_sec_ioctl_set_encrypt_key(pmadapter, pioctl_req); @@ -1021,12 +1507,23 @@ wlan_ops_uap_ioctl(t_void * adapter, pmlan_ioctl_req pioctl_req) status = wlan_11n_cfg_ioctl(pmadapter, pioctl_req); break; case MLAN_IOCTL_11D_CFG: - cfg11d = (mlan_ds_11d_cfg *) pioctl_req->pbuf; + cfg11d = (mlan_ds_11d_cfg *)pioctl_req->pbuf; if (cfg11d->sub_command == MLAN_OID_11D_DOMAIN_INFO) status = wlan_uap_domain_info(pmadapter, pioctl_req); break; + case MLAN_IOCTL_11H_CFG: + cfg11h = (mlan_ds_11h_cfg *)pioctl_req->pbuf; + if (cfg11h->sub_command == MLAN_OID_11H_CHANNEL_CHECK) + status = wlan_uap_11h_channel_check_req(pmadapter, + pioctl_req); +#if defined(DFS_TESTING_SUPPORT) + if (cfg11h->sub_command == MLAN_OID_11H_DFS_TESTING) + status = wlan_11h_ioctl_dfs_testing(pmadapter, + pioctl_req); +#endif + break; case MLAN_IOCTL_RADIO_CFG: - radiocfg = (mlan_ds_radio_cfg *) pioctl_req->pbuf; + radiocfg = (mlan_ds_radio_cfg *)pioctl_req->pbuf; if (radiocfg->sub_command == MLAN_OID_RADIO_CTRL) status = wlan_radio_ioctl_radio_ctl(pmadapter, pioctl_req); @@ -1037,7 +1534,7 @@ wlan_ops_uap_ioctl(t_void * adapter, pmlan_ioctl_req pioctl_req) #endif break; case MLAN_IOCTL_RATE: - rate = (mlan_ds_rate *) pioctl_req->pbuf; + rate = (mlan_ds_rate *)pioctl_req->pbuf; if (rate->sub_command == MLAN_OID_RATE_CFG) status = wlan_rate_ioctl_cfg(pmadapter, pioctl_req); else if (rate->sub_command == MLAN_OID_GET_DATA_RATE) @@ -1045,7 +1542,7 @@ wlan_ops_uap_ioctl(t_void * adapter, pmlan_ioctl_req pioctl_req) pioctl_req); break; case MLAN_IOCTL_REG_MEM: - reg_mem = (mlan_ds_reg_mem *) pioctl_req->pbuf; + reg_mem = (mlan_ds_reg_mem *)pioctl_req->pbuf; if (reg_mem->sub_command == MLAN_OID_REG_RW) status = wlan_reg_mem_ioctl_reg_rw(pmadapter, pioctl_req); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_uap_txrx.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_uap_txrx.c old mode 100755 new mode 100644 index 893ce839..071e8f99 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_uap_txrx.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_uap_txrx.c @@ -35,6 +35,9 @@ Change log: #include "mlan_wmm.h" #include "mlan_11n_aggr.h" #include "mlan_11n_rxreorder.h" +#ifdef DRV_EMBEDDED_AUTHENTICATOR +#include "authenticator_api.h" +#endif /******************************************************** Local Functions @@ -56,17 +59,17 @@ wlan_upload_uap_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf) pmlan_private priv = pmadapter->priv[pmbuf->bss_index]; UapRxPD *prx_pd; ENTER(); - prx_pd = (UapRxPD *) (pmbuf->pbuf + pmbuf->data_offset); + prx_pd = (UapRxPD *)(pmbuf->pbuf + pmbuf->data_offset); /* Chop off RxPD */ pmbuf->data_len -= prx_pd->rx_pkt_offset; pmbuf->data_offset += prx_pd->rx_pkt_offset; pmbuf->pparent = MNULL; - DBG_HEXDUMP(MDAT_D, "uAP RxPD", (t_u8 *) prx_pd, + DBG_HEXDUMP(MDAT_D, "uAP RxPD", (t_u8 *)prx_pd, MIN(sizeof(UapRxPD), MAX_DATA_DUMP_LEN)); DBG_HEXDUMP(MDAT_D, "uAP Rx Payload", - ((t_u8 *) prx_pd + prx_pd->rx_pkt_offset), + ((t_u8 *)prx_pd + prx_pd->rx_pkt_offset), MIN(prx_pd->rx_pkt_length, MAX_DATA_DUMP_LEN)); pmadapter->callbacks.moal_get_system_time(pmadapter->pmoal_handle, @@ -101,7 +104,7 @@ wlan_upload_uap_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf) * @return MLAN_STATUS_FAILURE -- drop packet, otherwise forward to network stack */ static mlan_status -wlan_check_unicast_packet(mlan_private * priv, t_u8 * mac) +wlan_check_unicast_packet(mlan_private *priv, t_u8 *mac) { int j; sta_node *sta_ptr = MNULL; @@ -150,9 +153,9 @@ wlan_check_unicast_packet(mlan_private * priv, t_u8 * mac) * @return headptr or MNULL */ t_void * -wlan_ops_uap_process_txpd(IN t_void * priv, IN pmlan_buffer pmbuf) +wlan_ops_uap_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf) { - pmlan_private pmpriv = (pmlan_private) priv; + pmlan_private pmpriv = (pmlan_private)priv; UapTxPD *plocal_tx_pd; t_u8 *head_ptr = MNULL; t_u32 pkt_type; @@ -190,18 +193,18 @@ wlan_ops_uap_process_txpd(IN t_void * priv, IN pmlan_buffer pmbuf) head_ptr = pmbuf->pbuf + pmbuf->data_offset - sizeof(UapTxPD) - INTF_HEADER_LEN; - head_ptr = (t_u8 *) ((t_ptr) head_ptr & ~((t_ptr) (DMA_ALIGNMENT - 1))); + head_ptr = (t_u8 *)((t_ptr)head_ptr & ~((t_ptr)(DMA_ALIGNMENT - 1))); - plocal_tx_pd = (UapTxPD *) (head_ptr + INTF_HEADER_LEN); + plocal_tx_pd = (UapTxPD *)(head_ptr + INTF_HEADER_LEN); memset(pmpriv->adapter, plocal_tx_pd, 0, sizeof(UapTxPD)); /* Set the BSS number to TxPD */ plocal_tx_pd->bss_num = GET_BSS_NUM(pmpriv); plocal_tx_pd->bss_type = pmpriv->bss_type; - plocal_tx_pd->tx_pkt_length = (t_u16) pmbuf->data_len; + plocal_tx_pd->tx_pkt_length = (t_u16)pmbuf->data_len; - plocal_tx_pd->priority = (t_u8) pmbuf->priority; + plocal_tx_pd->priority = (t_u8)pmbuf->priority; plocal_tx_pd->pkt_delay_2ms = wlan_wmm_compute_driver_packet_delay(pmpriv, pmbuf); @@ -216,10 +219,15 @@ wlan_ops_uap_process_txpd(IN t_void * priv, IN pmlan_buffer pmbuf) pmpriv->wmm.user_pri_pkt_tx_ctrl[plocal_tx_pd-> priority]; + if (pmbuf->flags & MLAN_BUF_FLAG_TX_STATUS) { + plocal_tx_pd->tx_token_id = (t_u8)pmbuf->tx_seq_num; + plocal_tx_pd->flags |= MRVDRV_TxPD_FLAGS_TX_PACKET_STATUS; + } + /* Offset of actual data */ plocal_tx_pd->tx_pkt_offset = - (t_u16) ((t_ptr) pmbuf->pbuf + pmbuf->data_offset - - (t_ptr) plocal_tx_pd); + (t_u16)((t_ptr)pmbuf->pbuf + pmbuf->data_offset - + (t_ptr)plocal_tx_pd); if (!plocal_tx_pd->tx_control) { /* TxCtrl set by user or default */ @@ -227,14 +235,14 @@ wlan_ops_uap_process_txpd(IN t_void * priv, IN pmlan_buffer pmbuf) } if (pmbuf->buf_type == MLAN_BUF_TYPE_RAW_DATA) { - plocal_tx_pd->tx_pkt_type = (t_u16) pkt_type; + plocal_tx_pd->tx_pkt_type = (t_u16)pkt_type; plocal_tx_pd->tx_control = tx_control; } uap_endian_convert_TxPD(plocal_tx_pd); /* Adjust the data offset and length to include TxPD in pmbuf */ pmbuf->data_len += pmbuf->data_offset; - pmbuf->data_offset = (t_u32) ((t_ptr) head_ptr - (t_ptr) pmbuf->pbuf); + pmbuf->data_offset = (t_u32)((t_ptr)head_ptr - (t_ptr)pmbuf->pbuf); pmbuf->data_len -= pmbuf->data_offset; done: @@ -252,9 +260,9 @@ wlan_ops_uap_process_txpd(IN t_void * priv, IN pmlan_buffer pmbuf) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_ops_uap_process_rx_packet(IN t_void * adapter, IN pmlan_buffer pmbuf) +wlan_ops_uap_process_rx_packet(IN t_void *adapter, IN pmlan_buffer pmbuf) { - pmlan_adapter pmadapter = (pmlan_adapter) adapter; + pmlan_adapter pmadapter = (pmlan_adapter)adapter; mlan_status ret = MLAN_STATUS_SUCCESS; UapRxPD *prx_pd; wlan_mgmt_pkt *puap_pkt_hdr = MNULL; @@ -264,14 +272,34 @@ wlan_ops_uap_process_rx_packet(IN t_void * adapter, IN pmlan_buffer pmbuf) t_u8 ta[MLAN_MAC_ADDR_LENGTH]; t_u16 rx_pkt_type = 0; sta_node *sta_ptr = MNULL; +#ifdef DRV_EMBEDDED_AUTHENTICATOR + t_u8 eapol_type[2] = { 0x88, 0x8e }; +#endif + t_u8 adj_rx_rate = 0; ENTER(); - prx_pd = (UapRxPD *) (pmbuf->pbuf + pmbuf->data_offset); + prx_pd = (UapRxPD *)(pmbuf->pbuf + pmbuf->data_offset); /* Endian conversion */ uap_endian_convert_RxPD(prx_pd); + priv->rxpd_rate = prx_pd->rx_rate; + + priv->rxpd_htinfo = prx_pd->ht_info; + + if (priv->bss_type == MLAN_BSS_TYPE_UAP) { + adj_rx_rate = + wlan_adjust_data_rate(priv, priv->rxpd_rate, + priv->rxpd_htinfo); + pmadapter->callbacks.moal_hist_data_add(pmadapter->pmoal_handle, + pmbuf->bss_index, + adj_rx_rate, + prx_pd->snr, + prx_pd->nf, + prx_pd->antenna); + } + rx_pkt_type = prx_pd->rx_pkt_type; - prx_pkt = (RxPacketHdr_t *) ((t_u8 *) prx_pd + prx_pd->rx_pkt_offset); + prx_pkt = (RxPacketHdr_t *)((t_u8 *)prx_pd + prx_pd->rx_pkt_offset); PRINTM(MINFO, "RX Data: data_len - prx_pd->rx_pkt_offset = %d - %d = %d\n", @@ -279,7 +307,7 @@ wlan_ops_uap_process_rx_packet(IN t_void * adapter, IN pmlan_buffer pmbuf) pmbuf->data_len - prx_pd->rx_pkt_offset); if ((prx_pd->rx_pkt_offset + prx_pd->rx_pkt_length) > - (t_u16) pmbuf->data_len) { + (t_u16)pmbuf->data_len) { PRINTM(MERROR, "Wrong rx packet: len=%d,rx_pkt_offset=%d," " rx_pkt_length=%d\n", pmbuf->data_len, @@ -296,22 +324,42 @@ wlan_ops_uap_process_rx_packet(IN t_void * adapter, IN pmlan_buffer pmbuf) /* Check if this is mgmt packet and needs to forwarded to app as an event */ puap_pkt_hdr = - (wlan_mgmt_pkt *) ((t_u8 *) prx_pd + - prx_pd->rx_pkt_offset); + (wlan_mgmt_pkt *)((t_u8 *)prx_pd + + prx_pd->rx_pkt_offset); puap_pkt_hdr->frm_len = wlan_le16_to_cpu(puap_pkt_hdr->frm_len); if ((puap_pkt_hdr->wlan_header. frm_ctl & IEEE80211_FC_MGMT_FRAME_TYPE_MASK) == 0) wlan_process_802dot11_mgmt_pkt(pmadapter-> priv[pmbuf->bss_index], - (t_u8 *) & puap_pkt_hdr-> + (t_u8 *)&puap_pkt_hdr-> wlan_header, puap_pkt_hdr->frm_len + sizeof(wlan_mgmt_pkt) - sizeof(puap_pkt_hdr-> - frm_len)); + frm_len), + (RxPD *)prx_pd); wlan_free_mlan_buffer(pmadapter, pmbuf); goto done; } +#ifdef DRV_EMBEDDED_AUTHENTICATOR + if (priv->adapter->psdio_device->driver_supplicant_auth) { + /**process eapol packet for uap*/ + if (IsAuthenticatorEnabled(priv->psapriv) && + (!memcmp(pmadapter, &prx_pkt->eth803_hdr.h803_len, + eapol_type, sizeof(eapol_type)))) { + ret = AuthenticatorProcessEapolPacket(priv->psapriv, + ((t_u8 *)prx_pd + + prx_pd-> + rx_pkt_offset), + prx_pd-> + rx_pkt_length); + if (ret == MLAN_STATUS_SUCCESS) { + wlan_free_mlan_buffer(pmadapter, pmbuf); + goto done; + } + } + } +#endif pmbuf->priority = prx_pd->priority; memcpy(pmadapter, ta, prx_pkt->eth803_hdr.src_addr, @@ -324,7 +372,7 @@ wlan_ops_uap_process_rx_packet(IN t_void * adapter, IN pmlan_buffer pmbuf) /* check if UAP enable 11n */ if (!priv->is_11n_enabled || (!wlan_11n_get_rxreorder_tbl - ((mlan_private *) priv, prx_pd->priority, ta) + ((mlan_private *)priv, prx_pd->priority, ta) && (prx_pd->rx_pkt_type != PKT_TYPE_AMSDU) )) { if (priv->pkt_fwd) @@ -336,7 +384,7 @@ wlan_ops_uap_process_rx_packet(IN t_void * adapter, IN pmlan_buffer pmbuf) /* Reorder and send to OS */ ret = mlan_11n_rxreorder_pkt(priv, prx_pd->seq_num, prx_pd->priority, ta, - (t_u8) prx_pd->rx_pkt_type, (void *)pmbuf); + (t_u8)prx_pd->rx_pkt_type, (void *)pmbuf); if (ret || (rx_pkt_type == PKT_TYPE_BAR)) { wlan_free_mlan_buffer(pmadapter, pmbuf); } @@ -355,7 +403,7 @@ wlan_ops_uap_process_rx_packet(IN t_void * adapter, IN pmlan_buffer pmbuf) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_uap_recv_packet(IN mlan_private * priv, IN pmlan_buffer pmbuf) +wlan_uap_recv_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf) { pmlan_adapter pmadapter = priv->adapter; mlan_status ret = MLAN_STATUS_SUCCESS; @@ -364,7 +412,7 @@ wlan_uap_recv_packet(IN mlan_private * priv, IN pmlan_buffer pmbuf) ENTER(); - prx_pkt = (RxPacketHdr_t *) ((t_u8 *) pmbuf->pbuf + pmbuf->data_offset); + prx_pkt = (RxPacketHdr_t *)((t_u8 *)pmbuf->pbuf + pmbuf->data_offset); DBG_HEXDUMP(MDAT_D, "uap_recv_packet", pmbuf->pbuf + pmbuf->data_offset, MIN(pmbuf->data_len, MAX_DATA_DUMP_LEN)); @@ -397,7 +445,7 @@ wlan_uap_recv_packet(IN mlan_private * priv, IN pmlan_buffer pmbuf) /* copy the data */ memcpy(pmadapter, - (t_u8 *) newbuf->pbuf + + (t_u8 *)newbuf->pbuf + newbuf->data_offset, pmbuf->pbuf + pmbuf->data_offset, pmbuf->data_len); @@ -433,7 +481,7 @@ wlan_uap_recv_packet(IN mlan_private * priv, IN pmlan_buffer pmbuf) /* copy the data */ memcpy(pmadapter, - (t_u8 *) newbuf->pbuf + + (t_u8 *)newbuf->pbuf + newbuf->data_offset, pmbuf->pbuf + pmbuf->data_offset, pmbuf->data_len); @@ -476,7 +524,7 @@ wlan_uap_recv_packet(IN mlan_private * priv, IN pmlan_buffer pmbuf) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -wlan_process_uap_rx_packet(IN mlan_private * priv, IN pmlan_buffer pmbuf) +wlan_process_uap_rx_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf) { pmlan_adapter pmadapter = priv->adapter; mlan_status ret = MLAN_STATUS_SUCCESS; @@ -486,13 +534,13 @@ wlan_process_uap_rx_packet(IN mlan_private * priv, IN pmlan_buffer pmbuf) ENTER(); - prx_pd = (UapRxPD *) (pmbuf->pbuf + pmbuf->data_offset); - prx_pkt = (RxPacketHdr_t *) ((t_u8 *) prx_pd + prx_pd->rx_pkt_offset); + prx_pd = (UapRxPD *)(pmbuf->pbuf + pmbuf->data_offset); + prx_pkt = (RxPacketHdr_t *)((t_u8 *)prx_pd + prx_pd->rx_pkt_offset); DBG_HEXDUMP(MDAT_D, "uAP RxPD", prx_pd, MIN(sizeof(UapRxPD), MAX_DATA_DUMP_LEN)); DBG_HEXDUMP(MDAT_D, "uAP Rx Payload", - ((t_u8 *) prx_pd + prx_pd->rx_pkt_offset), + ((t_u8 *)prx_pd + prx_pd->rx_pkt_offset), MIN(prx_pd->rx_pkt_length, MAX_DATA_DUMP_LEN)); PRINTM(MINFO, @@ -528,7 +576,7 @@ wlan_process_uap_rx_packet(IN mlan_private * priv, IN pmlan_buffer pmbuf) /* copy the data, skip rxpd */ memcpy(pmadapter, - (t_u8 *) newbuf->pbuf + + (t_u8 *)newbuf->pbuf + newbuf->data_offset, pmbuf->pbuf + pmbuf->data_offset + prx_pd->rx_pkt_offset, diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_util.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_util.h old mode 100755 new mode 100644 index ce04875b..e418f1df --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_util.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_util.h @@ -56,7 +56,7 @@ static INLINE t_void util_init_list(pmlan_linked_list phead) { /* Both next and prev point to self */ - phead->pprev = phead->pnext = (pmlan_linked_list) phead; + phead->pprev = phead->pnext = (pmlan_linked_list)phead; } /** @@ -69,14 +69,14 @@ util_init_list(pmlan_linked_list phead) * @return N/A */ static INLINE t_void -util_init_list_head(t_void * pmoal_handle, +util_init_list_head(t_void *pmoal_handle, pmlan_list_head phead, t_u8 lock_required, - mlan_status(*moal_init_lock) (t_void * handle, - t_void ** pplock)) + mlan_status (*moal_init_lock) (t_void *handle, + t_void **pplock)) { /* Both next and prev point to self */ - util_init_list((pmlan_linked_list) phead); + util_init_list((pmlan_linked_list)phead); if (lock_required) moal_init_lock(pmoal_handle, &phead->plock); else @@ -92,10 +92,10 @@ util_init_list_head(t_void * pmoal_handle, * @return N/A */ static INLINE t_void -util_free_list_head(t_void * pmoal_handle, +util_free_list_head(t_void *pmoal_handle, pmlan_list_head phead, - mlan_status(*moal_free_lock) (t_void * handle, - t_void * plock)) + mlan_status (*moal_free_lock) (t_void *handle, + t_void *plock)) { phead->pprev = phead->pnext = 0; if (phead->plock) @@ -112,16 +112,16 @@ util_free_list_head(t_void * pmoal_handle, * @return List node */ static INLINE pmlan_linked_list -util_peek_list(t_void * pmoal_handle, +util_peek_list(t_void *pmoal_handle, pmlan_list_head phead, - mlan_status(*moal_spin_lock) (t_void * handle, t_void * plock), - mlan_status(*moal_spin_unlock) (t_void * handle, t_void * plock)) + mlan_status (*moal_spin_lock) (t_void *handle, t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, t_void *plock)) { pmlan_linked_list pnode = 0; if (moal_spin_lock) moal_spin_lock(pmoal_handle, phead->plock); - if (phead->pnext != (pmlan_linked_list) phead) + if (phead->pnext != (pmlan_linked_list)phead) pnode = phead->pnext; if (moal_spin_unlock) moal_spin_unlock(pmoal_handle, phead->plock); @@ -139,13 +139,13 @@ util_peek_list(t_void * pmoal_handle, * @return N/A */ static INLINE t_void -util_enqueue_list_tail(t_void * pmoal_handle, +util_enqueue_list_tail(t_void *pmoal_handle, pmlan_list_head phead, pmlan_linked_list pnode, - mlan_status(*moal_spin_lock) (t_void * handle, - t_void * plock), - mlan_status(*moal_spin_unlock) (t_void * handle, - t_void * plock)) + mlan_status (*moal_spin_lock) (t_void *handle, + t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) { pmlan_linked_list pold_last; @@ -153,7 +153,7 @@ util_enqueue_list_tail(t_void * pmoal_handle, moal_spin_lock(pmoal_handle, phead->plock); pold_last = phead->pprev; pnode->pprev = pold_last; - pnode->pnext = (pmlan_linked_list) phead; + pnode->pnext = (pmlan_linked_list)phead; phead->pprev = pold_last->pnext = pnode; if (moal_spin_unlock) @@ -171,20 +171,20 @@ util_enqueue_list_tail(t_void * pmoal_handle, * @return N/A */ static INLINE t_void -util_enqueue_list_head(t_void * pmoal_handle, +util_enqueue_list_head(t_void *pmoal_handle, pmlan_list_head phead, pmlan_linked_list pnode, - mlan_status(*moal_spin_lock) (t_void * handle, - t_void * plock), - mlan_status(*moal_spin_unlock) (t_void * handle, - t_void * plock)) + mlan_status (*moal_spin_lock) (t_void *handle, + t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) { pmlan_linked_list pold_first; if (moal_spin_lock) moal_spin_lock(pmoal_handle, phead->plock); pold_first = phead->pnext; - pnode->pprev = (pmlan_linked_list) phead; + pnode->pprev = (pmlan_linked_list)phead; pnode->pnext = pold_first; phead->pnext = pold_first->pprev = pnode; @@ -203,12 +203,12 @@ util_enqueue_list_head(t_void * pmoal_handle, * @return N/A */ static INLINE t_void -util_unlink_list(t_void * pmoal_handle, +util_unlink_list(t_void *pmoal_handle, pmlan_list_head phead, pmlan_linked_list pnode, - mlan_status(*moal_spin_lock) (t_void * handle, t_void * plock), - mlan_status(*moal_spin_unlock) (t_void * handle, - t_void * plock)) + mlan_status (*moal_spin_lock) (t_void *handle, t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) { pmlan_linked_list pmy_prev; pmlan_linked_list pmy_next; @@ -235,19 +235,18 @@ util_unlink_list(t_void * pmoal_handle, * @return List node */ static INLINE pmlan_linked_list -util_dequeue_list(t_void * pmoal_handle, +util_dequeue_list(t_void *pmoal_handle, pmlan_list_head phead, - mlan_status(*moal_spin_lock) (t_void * handle, - t_void * plock), - mlan_status(*moal_spin_unlock) (t_void * handle, - t_void * plock)) + mlan_status (*moal_spin_lock) (t_void *handle, t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) { pmlan_linked_list pnode; if (moal_spin_lock) moal_spin_lock(pmoal_handle, phead->plock); pnode = phead->pnext; - if (pnode && (pnode != (pmlan_linked_list) phead)) + if (pnode && (pnode != (pmlan_linked_list)phead)) util_unlink_list(pmoal_handle, phead, pnode, 0, 0); else pnode = 0; @@ -290,12 +289,12 @@ typedef enum _MLAN_SCALAR_CONDITIONAL { * @return N/A */ static INLINE t_void -util_scalar_init(t_void * pmoal_handle, +util_scalar_init(t_void *pmoal_handle, pmlan_scalar pscalar, t_s32 val, - t_void * plock_to_use, - mlan_status(*moal_init_lock) (t_void * handle, - t_void ** pplock)) + t_void *plock_to_use, + mlan_status (*moal_init_lock) (t_void *handle, + t_void **pplock)) { pscalar->value = val; pscalar->flags = 0; @@ -317,9 +316,9 @@ util_scalar_init(t_void * pmoal_handle, * @return N/A */ static INLINE t_void -util_scalar_free(t_void * pmoal_handle, +util_scalar_free(t_void *pmoal_handle, pmlan_scalar pscalar, - mlan_status(*moal_free_lock) (t_void * handle, t_void * plock)) + mlan_status (*moal_free_lock) (t_void *handle, t_void *plock)) { if (pscalar->flags & MLAN_SCALAR_FLAG_UNIQUE_LOCK) moal_free_lock(pmoal_handle, pscalar->plock); @@ -335,11 +334,11 @@ util_scalar_free(t_void * pmoal_handle, * @return Stored value */ static INLINE t_s32 -util_scalar_read(t_void * pmoal_handle, +util_scalar_read(t_void *pmoal_handle, pmlan_scalar pscalar, - mlan_status(*moal_spin_lock) (t_void * handle, t_void * plock), - mlan_status(*moal_spin_unlock) (t_void * handle, - t_void * plock)) + mlan_status (*moal_spin_lock) (t_void *handle, t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) { t_s32 val; @@ -363,13 +362,12 @@ util_scalar_read(t_void * pmoal_handle, * @return N/A */ static INLINE t_void -util_scalar_write(t_void * pmoal_handle, +util_scalar_write(t_void *pmoal_handle, pmlan_scalar pscalar, t_s32 val, - mlan_status(*moal_spin_lock) (t_void * handle, - t_void * plock), - mlan_status(*moal_spin_unlock) (t_void * handle, - t_void * plock)) + mlan_status (*moal_spin_lock) (t_void *handle, t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) { if (moal_spin_lock) moal_spin_lock(pmoal_handle, pscalar->plock); @@ -388,12 +386,12 @@ util_scalar_write(t_void * pmoal_handle, * @return N/A */ static INLINE t_void -util_scalar_increment(t_void * pmoal_handle, +util_scalar_increment(t_void *pmoal_handle, pmlan_scalar pscalar, - mlan_status(*moal_spin_lock) (t_void * handle, - t_void * plock), - mlan_status(*moal_spin_unlock) (t_void * handle, - t_void * plock)) + mlan_status (*moal_spin_lock) (t_void *handle, + t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) { if (moal_spin_lock) moal_spin_lock(pmoal_handle, pscalar->plock); @@ -412,12 +410,12 @@ util_scalar_increment(t_void * pmoal_handle, * @return N/A */ static INLINE t_void -util_scalar_decrement(t_void * pmoal_handle, +util_scalar_decrement(t_void *pmoal_handle, pmlan_scalar pscalar, - mlan_status(*moal_spin_lock) (t_void * handle, - t_void * plock), - mlan_status(*moal_spin_unlock) (t_void * handle, - t_void * plock)) + mlan_status (*moal_spin_lock) (t_void *handle, + t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) { if (moal_spin_lock) moal_spin_lock(pmoal_handle, pscalar->plock); @@ -438,13 +436,13 @@ util_scalar_decrement(t_void * pmoal_handle, * @return Value after offset */ static INLINE t_s32 -util_scalar_offset(t_void * pmoal_handle, +util_scalar_offset(t_void *pmoal_handle, pmlan_scalar pscalar, t_s32 offset, - mlan_status(*moal_spin_lock) (t_void * handle, - t_void * plock), - mlan_status(*moal_spin_unlock) (t_void * handle, - t_void * plock)) + mlan_status (*moal_spin_lock) (t_void *handle, + t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) { t_s32 newval; @@ -472,15 +470,15 @@ util_scalar_offset(t_void * pmoal_handle, * @return Comparison result (MTRUE or MFALSE) */ static INLINE t_u8 -util_scalar_conditional_write(t_void * pmoal_handle, +util_scalar_conditional_write(t_void *pmoal_handle, pmlan_scalar pscalar, MLAN_SCALAR_CONDITIONAL condition, t_s32 val_compare, t_s32 val_to_set, - mlan_status(*moal_spin_lock) (t_void * handle, - t_void * plock), - mlan_status(*moal_spin_unlock) (t_void * handle, - t_void * plock)) + mlan_status (*moal_spin_lock) (t_void *handle, + t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) { t_u8 update; if (moal_spin_lock) @@ -517,4 +515,23 @@ util_scalar_conditional_write(t_void * pmoal_handle, return (update) ? MTRUE : MFALSE; } +/** + * @brief This function counts the bits of unsigned int number + * + * @param num number + * @return number of bits + */ +static t_u32 INLINE +bitcount(t_u32 num) +{ + t_u32 count = 0; + static t_u32 nibblebits[] = { + 0, 1, 1, 2, 1, 2, 2, 3, + 1, 2, 2, 3, 2, 3, 3, 4 + }; + for (; num != 0; num >>= 4) + count += nibblebits[num & 0x0f]; + return count; +} + #endif /* !_MLAN_UTIL_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_wmm.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_wmm.c old mode 100755 new mode 100644 index b6b9aaa6..588f933a --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_wmm.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_wmm.c @@ -134,7 +134,7 @@ static const mlan_wmm_ac_e tos_to_ac[] = { WMM_AC_BE, }; raListTbl *wlan_wmm_get_ralist_node(pmlan_private priv, t_u8 tid, - t_u8 * ra_addr); + t_u8 *ra_addr); /******************************************************** Local Functions @@ -148,7 +148,7 @@ raListTbl *wlan_wmm_get_ralist_node(pmlan_private priv, t_u8 tid, * @return N/A */ static void -wlan_wmm_ac_debug_print(const IEEEtypes_WmmAcParameters_t * pac_param) +wlan_wmm_ac_debug_print(const IEEEtypes_WmmAcParameters_t *pac_param) { const char *ac_str[] = { "BK", "BE", "VI", "VO" }; @@ -182,7 +182,7 @@ wlan_wmm_ac_debug_print(const IEEEtypes_WmmAcParameters_t * pac_param) */ static raListTbl * -wlan_wmm_allocate_ralist_node(pmlan_adapter pmadapter, t_u8 * ra) +wlan_wmm_allocate_ralist_node(pmlan_adapter pmadapter, t_u8 *ra) { raListTbl *ra_list = MNULL; @@ -190,12 +190,12 @@ wlan_wmm_allocate_ralist_node(pmlan_adapter pmadapter, t_u8 * ra) if (pmadapter->callbacks. moal_malloc(pmadapter->pmoal_handle, sizeof(raListTbl), - MLAN_MEM_DEF, (t_u8 **) & ra_list)) { + MLAN_MEM_DEF, (t_u8 **)&ra_list)) { PRINTM(MERROR, "Fail to allocate ra_list\n"); goto done; } - util_init_list((pmlan_linked_list) ra_list); - util_init_list_head((t_void *) pmadapter->pmoal_handle, + util_init_list((pmlan_linked_list)ra_list); + util_init_list_head((t_void *)pmadapter->pmoal_handle, &ra_list->buf_head, MFALSE, pmadapter->callbacks.moal_init_lock); @@ -223,7 +223,7 @@ wlan_add_buf_tdls_txqueue(pmlan_private priv, pmlan_buffer pmbuf) mlan_adapter *pmadapter = priv->adapter; ENTER(); util_enqueue_list_tail(pmadapter->pmoal_handle, &priv->tdls_pending_txq, - (pmlan_linked_list) pmbuf, + (pmlan_linked_list)pmbuf, pmadapter->callbacks.moal_spin_lock, pmadapter->callbacks.moal_spin_unlock); LEAVE(); @@ -246,12 +246,12 @@ wlan_cleanup_tdls_txq(pmlan_private priv) pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, priv->tdls_pending_txq.plock); while ((pmbuf = - (pmlan_buffer) util_peek_list(pmadapter->pmoal_handle, - &priv->tdls_pending_txq, MNULL, - MNULL))) { + (pmlan_buffer)util_peek_list(pmadapter->pmoal_handle, + &priv->tdls_pending_txq, MNULL, + MNULL))) { util_unlink_list(pmadapter->pmoal_handle, &priv->tdls_pending_txq, - (pmlan_linked_list) pmbuf, MNULL, MNULL); + (pmlan_linked_list)pmbuf, MNULL, MNULL); wlan_write_data_complete(pmadapter, pmbuf, MLAN_STATUS_FAILURE); } pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, @@ -280,7 +280,7 @@ wlan_wmm_queue_priorities_tid(pmlan_private priv, t_u8 queue_priority[]) } for (i = 0; i < MAX_NUM_TID; i++) - tos_to_tid_inv[tos_to_tid[i]] = (t_u8) i; + tos_to_tid_inv[tos_to_tid[i]] = (t_u8)i; /* in case priorities have changed, force highest priority so next packet will check from top to re-establish the highest */ @@ -322,10 +322,10 @@ wlan_wmm_eval_downgrade_ac(pmlan_private priv, mlan_wmm_ac_e eval_ac) ret_ac = WMM_AC_BK; /* - * Find the highest AC that is enabled and does not require admission - * control. The spec disallows downgrading to an AC, which is enabled - * due to a completed admission control. Unadmitted traffic is not - * to be sent on an AC with admitted traffic. + * Find the highest AC that is enabled and does not require admission + * control. The spec disallows downgrading to an AC, which is enabled + * due to a completed admission control. Unadmitted traffic is not + * to be sent on an AC with admitted traffic. */ for (down_ac = WMM_AC_BK; down_ac < eval_ac; down_ac++) { pac_status = &priv->wmm.ac_status[down_ac]; @@ -334,7 +334,7 @@ wlan_wmm_eval_downgrade_ac(pmlan_private priv, mlan_wmm_ac_e eval_ac) && (pac_status->flow_required == MFALSE)) /* AC is enabled and does not require admission control */ - ret_ac = (mlan_wmm_ac_e) down_ac; + ret_ac = (mlan_wmm_ac_e)down_ac; } LEAVE(); @@ -367,7 +367,7 @@ wlan_wmm_convert_tos_to_ac(pmlan_adapter pmadapter, t_u32 tos) * @brief Evaluate a given TID and downgrade it to a lower TID if the * WMM Parameter IE received from the AP indicates that the AP * is disabled (due to call admission control (ACM bit). Mapping - * of TID to AC is taken care internally + * of TID to AC is taken care internally * * @param priv Pointer to the mlan_private data struct * @param tid tid to evaluate for downgrading @@ -408,21 +408,21 @@ wlan_wmm_downgrade_tid(pmlan_private priv, t_u32 tid) * @return N/A */ static INLINE void -wlan_wmm_del_pkts_in_ralist_node(pmlan_private priv, raListTbl * ra_list) +wlan_wmm_del_pkts_in_ralist_node(pmlan_private priv, raListTbl *ra_list) { pmlan_buffer pmbuf; pmlan_adapter pmadapter = priv->adapter; ENTER(); while ((pmbuf = - (pmlan_buffer) util_peek_list(pmadapter->pmoal_handle, - &ra_list->buf_head, MNULL, - MNULL))) { + (pmlan_buffer)util_peek_list(pmadapter->pmoal_handle, + &ra_list->buf_head, MNULL, + MNULL))) { util_unlink_list(pmadapter->pmoal_handle, &ra_list->buf_head, - (pmlan_linked_list) pmbuf, MNULL, MNULL); + (pmlan_linked_list)pmbuf, MNULL, MNULL); wlan_write_data_complete(pmadapter, pmbuf, MLAN_STATUS_FAILURE); } - util_free_list_head((t_void *) pmadapter->pmoal_handle, + util_free_list_head((t_void *)pmadapter->pmoal_handle, &ra_list->buf_head, pmadapter->callbacks.moal_free_lock); @@ -438,17 +438,17 @@ wlan_wmm_del_pkts_in_ralist_node(pmlan_private priv, raListTbl * ra_list) * @return N/A */ static INLINE void -wlan_wmm_del_pkts_in_ralist(pmlan_private priv, mlan_list_head * ra_list_head) +wlan_wmm_del_pkts_in_ralist(pmlan_private priv, mlan_list_head *ra_list_head) { raListTbl *ra_list; ENTER(); ra_list = - (raListTbl *) util_peek_list(priv->adapter->pmoal_handle, - ra_list_head, MNULL, MNULL); + (raListTbl *)util_peek_list(priv->adapter->pmoal_handle, + ra_list_head, MNULL, MNULL); - while (ra_list && ra_list != (raListTbl *) ra_list_head) { + while (ra_list && ra_list != (raListTbl *)ra_list_head) { wlan_wmm_del_pkts_in_ralist_node(priv, ra_list); ra_list = ra_list->pnext; @@ -505,20 +505,20 @@ wlan_wmm_delete_all_ralist(pmlan_private priv) for (i = 0; i < MAX_NUM_TID; ++i) { PRINTM(MINFO, "RAList: Freeing buffers for TID %d\n", i); while ((ra_list = - (raListTbl *) util_peek_list(pmadapter->pmoal_handle, - &priv->wmm.tid_tbl_ptr[i]. - ra_list, MNULL, MNULL))) { + (raListTbl *)util_peek_list(pmadapter->pmoal_handle, + &priv->wmm.tid_tbl_ptr[i]. + ra_list, MNULL, MNULL))) { util_unlink_list(pmadapter->pmoal_handle, &priv->wmm.tid_tbl_ptr[i].ra_list, - (pmlan_linked_list) ra_list, MNULL, + (pmlan_linked_list)ra_list, MNULL, MNULL); pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) ra_list); + (t_u8 *)ra_list); } util_init_list((pmlan_linked_list) - & priv->wmm.tid_tbl_ptr[i].ra_list); + &priv->wmm.tid_tbl_ptr[i].ra_list); priv->wmm.tid_tbl_ptr[i].ra_list_curr = MNULL; } @@ -535,7 +535,7 @@ wlan_wmm_delete_all_ralist(pmlan_private priv) * @return ra_list */ static raListTbl * -wlan_wmm_get_queue_raptr(pmlan_private priv, t_u8 tid, t_u8 * ra_addr) +wlan_wmm_get_queue_raptr(pmlan_private priv, t_u8 tid, t_u8 *ra_addr) { raListTbl *ra_list; #if defined(UAP_SUPPORT) @@ -582,7 +582,7 @@ wlan_wmm_get_queue_raptr(pmlan_private priv, t_u8 tid, t_u8 * ra_addr) static void wlan_send_wmmac_host_event(pmlan_private priv, char *type_str, - t_u8 * src_addr, t_u8 tid, t_u8 up, t_u8 status) + t_u8 *src_addr, t_u8 tid, t_u8 up, t_u8 status) { t_u8 event_buf[100]; mlan_event *pevent; @@ -593,13 +593,13 @@ wlan_send_wmmac_host_event(pmlan_private priv, /* Format one of the following two output strings: ** - TSPEC:ADDTS_RSP:[]:TID=X:UP=Y ** - TSPEC:DELTS_RX:[]:TID=X:UP=Y */ - pevent = (mlan_event *) event_buf; + pevent = (mlan_event *)event_buf; pout_buf = pevent->event_buf; - memcpy(priv->adapter, pout_buf, (t_u8 *) "TSPEC:", 6); + memcpy(priv->adapter, pout_buf, (t_u8 *)"TSPEC:", 6); pout_buf += 6; - memcpy(priv->adapter, pout_buf, (t_u8 *) type_str, + memcpy(priv->adapter, pout_buf, (t_u8 *)type_str, wlan_strlen(type_str)); pout_buf += wlan_strlen(type_str); @@ -618,11 +618,11 @@ wlan_send_wmmac_host_event(pmlan_private priv, *pout_buf++ = status + '0'; - memcpy(priv->adapter, pout_buf, (t_u8 *) "]:TID", 5); + memcpy(priv->adapter, pout_buf, (t_u8 *)"]:TID", 5); pout_buf += 5; *pout_buf++ = tid + '0'; - memcpy(priv->adapter, pout_buf, (t_u8 *) ":UP", 3); + memcpy(priv->adapter, pout_buf, (t_u8 *)":UP", 3); pout_buf += 3; *pout_buf++ = up + '0'; @@ -648,7 +648,7 @@ wlan_send_wmmac_host_event(pmlan_private priv, */ static raListTbl * wlan_wmm_get_highest_priolist_ptr(pmlan_adapter pmadapter, - pmlan_private * priv, int *tid) + pmlan_private *priv, int *tid) { pmlan_private priv_tmp; raListTbl *ptr, *head; @@ -669,7 +669,7 @@ wlan_wmm_get_highest_priolist_ptr(pmlan_adapter pmadapter, if (pmadapter->bssprio_tbl[j].bssprio_cur == (mlan_bssprio_node *) - & pmadapter->bssprio_tbl[j].bssprio_head) { + &pmadapter->bssprio_tbl[j].bssprio_head) { pmadapter->bssprio_tbl[j].bssprio_cur = pmadapter->bssprio_tbl[j].bssprio_cur->pnext; } @@ -715,7 +715,7 @@ wlan_wmm_get_highest_priolist_ptr(pmlan_adapter pmadapter, * round robin fashion. */ head = ptr = tid_ptr->ra_list_curr->pnext; - if (ptr == (raListTbl *) & tid_ptr->ra_list) + if (ptr == (raListTbl *)&tid_ptr->ra_list) head = ptr = ptr->pnext; do { @@ -773,7 +773,7 @@ wlan_wmm_get_highest_priolist_ptr(pmlan_adapter pmadapter, ptr = ptr->pnext; if (ptr == - (raListTbl *) & tid_ptr->ra_list) + (raListTbl *)&tid_ptr->ra_list) ptr = ptr->pnext; } while (ptr != head); } @@ -789,7 +789,7 @@ wlan_wmm_get_highest_priolist_ptr(pmlan_adapter pmadapter, HIGH_PRIO_TID, MNULL, MNULL); else /* No packet at any TID for this priv. Mark as - such to skip * checking TIDs for this priv + such to skip checking TIDs for this priv (until pkt is added). */ util_scalar_write(pmadapter->pmoal_handle, &priv_tmp->wmm. @@ -805,7 +805,7 @@ wlan_wmm_get_highest_priolist_ptr(pmlan_adapter pmadapter, next_intf: bssprio_node = bssprio_node->pnext; if (bssprio_node == (mlan_bssprio_node *) - & pmadapter->bssprio_tbl[j].bssprio_head) + &pmadapter->bssprio_tbl[j].bssprio_head) bssprio_node = bssprio_node->pnext; pmadapter->bssprio_tbl[j].bssprio_cur = bssprio_node; } while (bssprio_node != bssprio_head); @@ -825,15 +825,15 @@ wlan_wmm_get_highest_priolist_ptr(pmlan_adapter pmadapter, * @return Packet count */ static int -wlan_num_pkts_in_txq(mlan_private * priv, raListTbl * ptr, int max_buf_size) +wlan_num_pkts_in_txq(mlan_private *priv, raListTbl *ptr, int max_buf_size) { int count = 0, total_size = 0; pmlan_buffer pmbuf; ENTER(); - for (pmbuf = (pmlan_buffer) ptr->buf_head.pnext; - pmbuf != (pmlan_buffer) (&ptr->buf_head); pmbuf = pmbuf->pnext) { + for (pmbuf = (pmlan_buffer)ptr->buf_head.pnext; + pmbuf != (pmlan_buffer)(&ptr->buf_head); pmbuf = pmbuf->pnext) { total_size += pmbuf->data_len; if (total_size < max_buf_size) @@ -856,7 +856,7 @@ wlan_num_pkts_in_txq(mlan_private * priv, raListTbl * ptr, int max_buf_size) * @return N/A */ static void INLINE -wlan_send_single_packet(pmlan_private priv, raListTbl * ptr, int ptrindex) +wlan_send_single_packet(pmlan_private priv, raListTbl *ptr, int ptrindex) { pmlan_buffer pmbuf; pmlan_buffer pmbuf_next; @@ -866,8 +866,8 @@ wlan_send_single_packet(pmlan_private priv, raListTbl * ptr, int ptrindex) ENTER(); - pmbuf = (pmlan_buffer) util_dequeue_list(pmadapter->pmoal_handle, - &ptr->buf_head, MNULL, MNULL); + pmbuf = (pmlan_buffer)util_dequeue_list(pmadapter->pmoal_handle, + &ptr->buf_head, MNULL, MNULL); if (pmbuf) { PRINTM(MINFO, "Dequeuing the packet %p %p\n", ptr, pmbuf); priv->wmm.pkts_queued[ptrindex]--; @@ -875,9 +875,9 @@ wlan_send_single_packet(pmlan_private priv, raListTbl * ptr, int ptrindex) &priv->wmm.tx_pkts_queued, MNULL, MNULL); ptr->total_pkts--; pmbuf_next = - (pmlan_buffer) util_peek_list(pmadapter->pmoal_handle, - &ptr->buf_head, MNULL, - MNULL); + (pmlan_buffer)util_peek_list(pmadapter->pmoal_handle, + &ptr->buf_head, MNULL, + MNULL); pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, priv->wmm. ra_list_spinlock); @@ -913,7 +913,7 @@ wlan_send_single_packet(pmlan_private priv, raListTbl * ptr, int ptrindex) MNULL); util_enqueue_list_head(pmadapter->pmoal_handle, &ptr->buf_head, - (pmlan_linked_list) pmbuf, MNULL, + (pmlan_linked_list)pmbuf, MNULL, MNULL); ptr->total_pkts++; @@ -959,12 +959,12 @@ wlan_send_single_packet(pmlan_private priv, raListTbl * ptr, int ptrindex) * @return MTRUE or MFALSE */ static int INLINE -wlan_is_ptr_processed(mlan_private * priv, raListTbl * ptr) +wlan_is_ptr_processed(mlan_private *priv, raListTbl *ptr) { pmlan_buffer pmbuf; - pmbuf = (pmlan_buffer) util_peek_list(priv->adapter->pmoal_handle, - &ptr->buf_head, MNULL, MNULL); + pmbuf = (pmlan_buffer)util_peek_list(priv->adapter->pmoal_handle, + &ptr->buf_head, MNULL, MNULL); if (pmbuf && (pmbuf->flags & MLAN_BUF_FLAG_REQUEUED_PKT)) return MTRUE; @@ -981,7 +981,7 @@ wlan_is_ptr_processed(mlan_private * priv, raListTbl * ptr) * @return N/A */ static void INLINE -wlan_send_processed_packet(pmlan_private priv, raListTbl * ptr, int ptrindex) +wlan_send_processed_packet(pmlan_private priv, raListTbl *ptr, int ptrindex) { pmlan_buffer pmbuf_next = MNULL; mlan_tx_param tx_param; @@ -989,13 +989,13 @@ wlan_send_processed_packet(pmlan_private priv, raListTbl * ptr, int ptrindex) pmlan_adapter pmadapter = priv->adapter; mlan_status ret = MLAN_STATUS_FAILURE; - pmbuf = (pmlan_buffer) util_dequeue_list(pmadapter->pmoal_handle, - &ptr->buf_head, MNULL, MNULL); + pmbuf = (pmlan_buffer)util_dequeue_list(pmadapter->pmoal_handle, + &ptr->buf_head, MNULL, MNULL); if (pmbuf) { pmbuf_next = - (pmlan_buffer) util_peek_list(pmadapter->pmoal_handle, - &ptr->buf_head, MNULL, - MNULL); + (pmlan_buffer)util_peek_list(pmadapter->pmoal_handle, + &ptr->buf_head, MNULL, + MNULL); pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, priv->wmm. ra_list_spinlock); @@ -1025,7 +1025,7 @@ wlan_send_processed_packet(pmlan_private priv, raListTbl * ptr, int ptrindex) } util_enqueue_list_head(pmadapter->pmoal_handle, &ptr->buf_head, - (pmlan_linked_list) pmbuf, + (pmlan_linked_list)pmbuf, MNULL, MNULL); pmbuf->flags |= MLAN_BUF_FLAG_REQUEUED_PKT; @@ -1042,7 +1042,6 @@ wlan_send_processed_packet(pmlan_private priv, raListTbl * ptr, int ptrindex) wlan_write_data_complete(pmadapter, pmbuf, ret); break; case MLAN_STATUS_PENDING: - pmadapter->data_sent = MFALSE; break; case MLAN_STATUS_SUCCESS: DBG_HEXDUMP(MDAT_D, "Tx", @@ -1196,7 +1195,7 @@ wlan_dequeue_tx_packet(pmlan_adapter pmadapter) * @return N/A */ t_void -wlan_update_ralist_tx_pause(pmlan_private priv, t_u8 * mac, t_u8 tx_pause) +wlan_update_ralist_tx_pause(pmlan_private priv, t_u8 *mac, t_u8 tx_pause) { raListTbl *ra_list; int i; @@ -1250,7 +1249,7 @@ wlan_update_ralist_tx_pause(pmlan_private priv, t_u8 * mac, t_u8 tx_pause) * @return N/A */ t_void -wlan_update_non_tdls_ralist(mlan_private * priv, t_u8 * mac, t_u8 tx_pause) +wlan_update_non_tdls_ralist(mlan_private *priv, t_u8 *mac, t_u8 tx_pause) { raListTbl *ra_list; int i; @@ -1263,16 +1262,16 @@ wlan_update_non_tdls_ralist(mlan_private * priv, t_u8 * mac, t_u8 tx_pause) priv->wmm.ra_list_spinlock); for (i = 0; i < MAX_NUM_TID; ++i) { ra_list = - (raListTbl *) util_peek_list(priv->adapter-> - pmoal_handle, - &priv->wmm.tid_tbl_ptr[i]. - ra_list, MNULL, MNULL); + (raListTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->wmm.tid_tbl_ptr[i]. + ra_list, MNULL, MNULL); while (ra_list && (ra_list != - (raListTbl *) & priv->wmm.tid_tbl_ptr[i].ra_list)) { + (raListTbl *)&priv->wmm.tid_tbl_ptr[i].ra_list)) { if (memcmp (priv->adapter, ra_list->ra, mac, - MLAN_MAC_ADDR_LENGTH)) { + MLAN_MAC_ADDR_LENGTH) && + ra_list->tx_pause != tx_pause) { pkt_cnt += ra_list->total_pkts; ra_list->tx_pause = tx_pause; if (tx_pause) @@ -1316,19 +1315,19 @@ wlan_update_non_tdls_ralist(mlan_private * priv, t_u8 * mac, t_u8 tx_pause) * @return pmlan_buffer or MNULL */ static pmlan_buffer -wlan_find_tdls_packets(mlan_private * priv, raListTbl * ra_list, t_u8 * mac) +wlan_find_tdls_packets(mlan_private *priv, raListTbl *ra_list, t_u8 *mac) { pmlan_buffer pmbuf = MNULL; mlan_adapter *pmadapter = priv->adapter; t_u8 ra[MLAN_MAC_ADDR_LENGTH]; ENTER(); - pmbuf = (pmlan_buffer) util_peek_list(priv->adapter->pmoal_handle, - &ra_list->buf_head, MNULL, MNULL); + pmbuf = (pmlan_buffer)util_peek_list(priv->adapter->pmoal_handle, + &ra_list->buf_head, MNULL, MNULL); if (!pmbuf) { LEAVE(); return MNULL; } - while (pmbuf != (pmlan_buffer) & ra_list->buf_head) { + while (pmbuf != (pmlan_buffer)&ra_list->buf_head) { memcpy(pmadapter, ra, pmbuf->pbuf + pmbuf->data_offset, MLAN_MAC_ADDR_LENGTH); if (!memcmp(priv->adapter, ra, mac, MLAN_MAC_ADDR_LENGTH)) { @@ -1350,20 +1349,20 @@ wlan_find_tdls_packets(mlan_private * priv, raListTbl * ra_list, t_u8 * mac) * @return pmlan_buffer or MNULL */ static pmlan_buffer -wlan_find_packets_tdls_txq(mlan_private * priv, t_u8 * mac) +wlan_find_packets_tdls_txq(mlan_private *priv, t_u8 *mac) { pmlan_buffer pmbuf = MNULL; mlan_adapter *pmadapter = priv->adapter; t_u8 ra[MLAN_MAC_ADDR_LENGTH]; ENTER(); - pmbuf = (pmlan_buffer) util_peek_list(priv->adapter->pmoal_handle, - &priv->tdls_pending_txq, - MNULL, MNULL); + pmbuf = (pmlan_buffer)util_peek_list(priv->adapter->pmoal_handle, + &priv->tdls_pending_txq, + MNULL, MNULL); if (!pmbuf) { LEAVE(); return MNULL; } - while (pmbuf != (pmlan_buffer) & priv->tdls_pending_txq) { + while (pmbuf != (pmlan_buffer)&priv->tdls_pending_txq) { memcpy(pmadapter, ra, pmbuf->pbuf + pmbuf->data_offset, MLAN_MAC_ADDR_LENGTH); if (!memcmp(priv->adapter, ra, mac, MLAN_MAC_ADDR_LENGTH)) { @@ -1385,7 +1384,7 @@ wlan_find_packets_tdls_txq(mlan_private * priv, t_u8 * mac) * @return N/A */ static t_void -wlan_wmm_delete_tdls_ralist(pmlan_private priv, t_u8 * mac) +wlan_wmm_delete_tdls_ralist(pmlan_private priv, t_u8 *mac) { raListTbl *ra_list; raListTbl *ra_list_ap = MNULL; @@ -1399,40 +1398,39 @@ wlan_wmm_delete_tdls_ralist(pmlan_private priv, t_u8 * mac) if (ra_list) { PRINTM(MDATA, "delete TDLS ralist %p\n", ra_list); ra_list_ap = - (raListTbl *) util_peek_list(pmadapter-> - pmoal_handle, - &priv->wmm. - tid_tbl_ptr[i]. - ra_list, MNULL, - MNULL); + (raListTbl *)util_peek_list(pmadapter-> + pmoal_handle, + &priv->wmm. + tid_tbl_ptr[i]. + ra_list, MNULL, + MNULL); while ((pmbuf = - (pmlan_buffer) util_peek_list(pmadapter-> - pmoal_handle, - &ra_list-> - buf_head, MNULL, - MNULL))) { + (pmlan_buffer)util_peek_list(pmadapter-> + pmoal_handle, + &ra_list->buf_head, + MNULL, MNULL))) { util_unlink_list(pmadapter->pmoal_handle, &ra_list->buf_head, - (pmlan_linked_list) pmbuf, + (pmlan_linked_list)pmbuf, MNULL, MNULL); util_enqueue_list_tail(pmadapter->pmoal_handle, &ra_list_ap->buf_head, - (pmlan_linked_list) - pmbuf, MNULL, MNULL); + (pmlan_linked_list)pmbuf, + MNULL, MNULL); ra_list_ap->total_pkts++; ra_list_ap->packet_count++; } - util_free_list_head((t_void *) pmadapter->pmoal_handle, + util_free_list_head((t_void *)pmadapter->pmoal_handle, &ra_list->buf_head, pmadapter->callbacks. moal_free_lock); util_unlink_list(pmadapter->pmoal_handle, &priv->wmm.tid_tbl_ptr[i].ra_list, - (pmlan_linked_list) ra_list, MNULL, + (pmlan_linked_list)ra_list, MNULL, MNULL); pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) ra_list); + (t_u8 *)ra_list); if (priv->wmm.tid_tbl_ptr[i].ra_list_curr == ra_list) priv->wmm.tid_tbl_ptr[i].ra_list_curr = ra_list_ap; @@ -1523,13 +1521,18 @@ wlan_clean_txrx(pmlan_private priv) while (pmadapter->mpa_tx.pkt_cnt) { /* Decrement current write port to the last used port */ + if ((pmadapter->psdio_device->supports_sdio_new_mode) + && (pmadapter->curr_wr_port == 0)) + pmadapter->curr_wr_port = + pmadapter->psdio_device->max_ports; pmadapter->curr_wr_port--; - if (pmadapter->curr_wr_port == CTRL_PORT) + if ((!pmadapter->psdio_device->supports_sdio_new_mode) + && (pmadapter->curr_wr_port == CTRL_PORT)) pmadapter->curr_wr_port = (pmadapter->mp_end_port - 1); /* Mark the port as available in write bitmap */ pmadapter->mp_wr_bitmap |= - (t_u16) (1 << pmadapter->curr_wr_port); + (t_u16)(1 << pmadapter->curr_wr_port); pmadapter->mpa_tx.pkt_cnt--; } @@ -1538,7 +1541,7 @@ wlan_clean_txrx(pmlan_private priv) wlan_wmm_delete_all_ralist(priv); memcpy(pmadapter, tos_to_tid, ac_to_tid, sizeof(tos_to_tid)); for (i = 0; i < MAX_NUM_TID; i++) - tos_to_tid_inv[tos_to_tid[i]] = (t_u8) i; + tos_to_tid_inv[tos_to_tid[i]] = (t_u8)i; #if defined(UAP_SUPPORT) priv->num_drop_pkts = 0; #endif @@ -1589,7 +1592,7 @@ wlan_wmm_default_queue_priorities(pmlan_private priv) */ void wlan_wmm_setup_queue_priorities(pmlan_private priv, - IEEEtypes_WmmParameter_t * pwmm_ie) + IEEEtypes_WmmParameter_t *pwmm_ie) { t_u16 cw_min, avg_back_off, tmp[4]; t_u32 i, j, num_ac; @@ -1606,7 +1609,7 @@ wlan_wmm_setup_queue_priorities(pmlan_private priv, memset(priv->adapter, tmp, 0, sizeof(tmp)); HEXDUMP("WMM: setup_queue_priorities: param IE", - (t_u8 *) pwmm_ie, sizeof(IEEEtypes_WmmParameter_t)); + (t_u8 *)pwmm_ie, sizeof(IEEEtypes_WmmParameter_t)); PRINTM(MINFO, "WMM Parameter IE: version=%d, " "qos_info Parameter Set Count=%d, Reserved=%#x\n", @@ -1631,7 +1634,7 @@ wlan_wmm_setup_queue_priorities(pmlan_private priv, PRINTM_AC(&pwmm_ie->ac_params[num_ac]); } - HEXDUMP("WMM: avg_back_off", (t_u8 *) tmp, sizeof(tmp)); + HEXDUMP("WMM: avg_back_off", (t_u8 *)tmp, sizeof(tmp)); HEXDUMP("WMM: queue_priority", priv->wmm.queue_priority, sizeof(priv->wmm.queue_priority)); @@ -1654,7 +1657,7 @@ wlan_wmm_setup_queue_priorities(pmlan_private priv, wlan_wmm_queue_priorities_tid(priv, priv->wmm.queue_priority); - HEXDUMP("WMM: avg_back_off, sort", (t_u8 *) tmp, sizeof(tmp)); + HEXDUMP("WMM: avg_back_off, sort", (t_u8 *)tmp, sizeof(tmp)); DBG_HEXDUMP(MCMD_D, "WMM: queue_priority, sort", priv->wmm.queue_priority, sizeof(priv->wmm.queue_priority)); LEAVE(); @@ -1680,7 +1683,7 @@ wlan_wmm_setup_ac_downgrade(pmlan_private priv) /* WMM is not enabled, default priorities */ for (ac_val = WMM_AC_BK; ac_val <= WMM_AC_VO; ac_val++) { priv->wmm.ac_down_graded_vals[ac_val] = - (mlan_wmm_ac_e) ac_val; + (mlan_wmm_ac_e)ac_val; } } else { for (ac_val = WMM_AC_BK; ac_val <= WMM_AC_VO; ac_val++) { @@ -1705,7 +1708,7 @@ wlan_wmm_setup_ac_downgrade(pmlan_private priv) * @return N/A */ void -wlan_ralist_add(mlan_private * priv, t_u8 * ra) +wlan_ralist_add(mlan_private *priv, t_u8 *ra) { int i; raListTbl *ra_list; @@ -1757,7 +1760,7 @@ wlan_ralist_add(mlan_private * priv, t_u8 * ra) util_enqueue_list_tail(pmadapter->pmoal_handle, &priv->wmm.tid_tbl_ptr[i].ra_list, - (pmlan_linked_list) ra_list, MNULL, + (pmlan_linked_list)ra_list, MNULL, MNULL); if (!priv->wmm.tid_tbl_ptr[i].ra_list_curr) @@ -1786,8 +1789,13 @@ wlan_wmm_init(pmlan_adapter pmadapter) priv = pmadapter->priv[j]; if (priv) { for (i = 0; i < MAX_NUM_TID; ++i) { - priv->aggr_prio_tbl[i].amsdu = - BA_STREAM_NOT_ALLOWED; + if (pmadapter->max_tx_buf_size > + MLAN_TX_DATA_BUF_SIZE_2K) + priv->aggr_prio_tbl[i].amsdu = + tos_to_tid_inv[i]; + else + priv->aggr_prio_tbl[i].amsdu = + BA_STREAM_NOT_ALLOWED; priv->aggr_prio_tbl[i].ampdu_ap = priv->aggr_prio_tbl[i].ampdu_user = tos_to_tid_inv[i]; @@ -1797,6 +1805,8 @@ wlan_wmm_init(pmlan_adapter pmadapter) } priv->wmm.drv_pkt_delay_max = WMM_DRV_DELAY_MAX; + priv->aggr_prio_tbl[6].amsdu = BA_STREAM_NOT_ALLOWED; + priv->aggr_prio_tbl[7].amsdu = BA_STREAM_NOT_ALLOWED; priv->aggr_prio_tbl[6].ampdu_ap = priv->aggr_prio_tbl[6].ampdu_user = BA_STREAM_NOT_ALLOWED; @@ -1810,7 +1820,8 @@ wlan_wmm_init(pmlan_adapter pmadapter) #ifdef STA_SUPPORT if (priv->bss_type == MLAN_BSS_TYPE_STA) { priv->add_ba_param.tx_win_size = - MLAN_STA_AMPDU_DEF_TXWINSIZE; + pmadapter->psdio_device->ampdu_info-> + ampdu_sta_txwinsize; priv->add_ba_param.rx_win_size = MLAN_STA_AMPDU_DEF_RXWINSIZE; } @@ -1818,17 +1829,21 @@ wlan_wmm_init(pmlan_adapter pmadapter) #ifdef WIFI_DIRECT_SUPPORT if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) { priv->add_ba_param.tx_win_size = - MLAN_WFD_AMPDU_DEF_TXRXWINSIZE; + pmadapter->psdio_device->ampdu_info-> + ampdu_wfd_txrxwinsize; priv->add_ba_param.rx_win_size = - MLAN_WFD_AMPDU_DEF_TXRXWINSIZE; + pmadapter->psdio_device->ampdu_info-> + ampdu_wfd_txrxwinsize; } #endif #ifdef UAP_SUPPORT if (priv->bss_type == MLAN_BSS_TYPE_UAP) { priv->add_ba_param.tx_win_size = - MLAN_UAP_AMPDU_DEF_TXWINSIZE; + pmadapter->psdio_device->ampdu_info-> + ampdu_uap_txwinsize; priv->add_ba_param.rx_win_size = - MLAN_UAP_AMPDU_DEF_RXWINSIZE; + pmadapter->psdio_device->ampdu_info-> + ampdu_uap_rxwinsize; } #endif priv->add_ba_param.tx_amsdu = MTRUE; @@ -1934,16 +1949,16 @@ wlan_wmm_lists_empty(pmlan_adapter pmadapter) * @return ra_list or MNULL */ raListTbl * -wlan_wmm_get_ralist_node(pmlan_private priv, t_u8 tid, t_u8 * ra_addr) +wlan_wmm_get_ralist_node(pmlan_private priv, t_u8 tid, t_u8 *ra_addr) { raListTbl *ra_list; ENTER(); ra_list = - (raListTbl *) util_peek_list(priv->adapter->pmoal_handle, - &priv->wmm.tid_tbl_ptr[tid]. - ra_list, MNULL, MNULL); + (raListTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->wmm.tid_tbl_ptr[tid].ra_list, + MNULL, MNULL); while (ra_list && (ra_list != (raListTbl *) - & priv->wmm.tid_tbl_ptr[tid].ra_list)) { + &priv->wmm.tid_tbl_ptr[tid].ra_list)) { if (!memcmp (priv->adapter, ra_list->ra, ra_addr, MLAN_MAC_ADDR_LENGTH)) { @@ -1966,18 +1981,18 @@ wlan_wmm_get_ralist_node(pmlan_private priv, t_u8 tid, t_u8 * ra_addr) * @return MTRUE- valid. MFALSE- invalid. */ int -wlan_is_ralist_valid(mlan_private * priv, raListTbl * ra_list, int ptrindex) +wlan_is_ralist_valid(mlan_private *priv, raListTbl *ra_list, int ptrindex) { raListTbl *rlist; ENTER(); - rlist = (raListTbl *) util_peek_list(priv->adapter->pmoal_handle, - &priv->wmm.tid_tbl_ptr[ptrindex]. - ra_list, MNULL, MNULL); + rlist = (raListTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->wmm.tid_tbl_ptr[ptrindex]. + ra_list, MNULL, MNULL); while (rlist && (rlist != (raListTbl *) - & priv->wmm.tid_tbl_ptr[ptrindex].ra_list)) { + &priv->wmm.tid_tbl_ptr[ptrindex].ra_list)) { if (rlist == ra_list) { LEAVE(); return MTRUE; @@ -1999,7 +2014,7 @@ wlan_is_ralist_valid(mlan_private * priv, raListTbl * ra_list, int ptrindex) * @return integer count of updated nodes */ int -wlan_ralist_update(mlan_private * priv, t_u8 * old_ra, t_u8 * new_ra) +wlan_ralist_update(mlan_private *priv, t_u8 *old_ra, t_u8 *new_ra) { t_u8 tid; int update_count; @@ -2093,12 +2108,12 @@ wlan_wmm_add_buf_txqueue(pmlan_adapter pmadapter, pmlan_buffer pmbuf) return; } else ra_list = - (raListTbl *) util_peek_list(pmadapter-> - pmoal_handle, - &priv->wmm. - tid_tbl_ptr - [tid_down].ra_list, - MNULL, MNULL); + (raListTbl *)util_peek_list(pmadapter-> + pmoal_handle, + &priv->wmm. + tid_tbl_ptr + [tid_down].ra_list, + MNULL, MNULL); } else { memcpy(pmadapter, ra, pmbuf->pbuf + pmbuf->data_offset, MLAN_MAC_ADDR_LENGTH); @@ -2138,7 +2153,7 @@ wlan_wmm_add_buf_txqueue(pmlan_adapter pmadapter, pmlan_buffer pmbuf) "Adding pkt %p (priority=%d, tid_down=%d) to ra_list %p\n", pmbuf, pmbuf->priority, tid_down, ra_list); util_enqueue_list_tail(pmadapter->pmoal_handle, &ra_list->buf_head, - (pmlan_linked_list) pmbuf, MNULL, MNULL); + (pmlan_linked_list)pmbuf, MNULL, MNULL); ra_list->total_pkts++; ra_list->packet_count++; @@ -2191,7 +2206,7 @@ wlan_wmm_add_buf_txqueue(pmlan_adapter pmadapter, pmlan_buffer pmbuf) * @return MLAN_STATUS_SUCCESS */ mlan_status -wlan_ret_wmm_get_status(pmlan_private priv, t_u8 * ptlv, int resp_len) +wlan_ret_wmm_get_status(pmlan_private priv, t_u8 *ptlv, int resp_len) { t_u8 *pcurrent = ptlv; t_u32 tlv_len; @@ -2213,13 +2228,19 @@ wlan_ret_wmm_get_status(pmlan_private priv, t_u8 * ptlv, int resp_len) HEXDUMP("CMD_RESP: WMM_GET_STATUS", pcurrent, resp_len); while (resp_len >= sizeof(ptlv_hdr->header)) { - ptlv_hdr = (MrvlIEtypes_Data_t *) pcurrent; + ptlv_hdr = (MrvlIEtypes_Data_t *)pcurrent; tlv_len = wlan_le16_to_cpu(ptlv_hdr->header.len); + if ((tlv_len + sizeof(ptlv_hdr->header)) > resp_len) { + PRINTM(MERROR, + "WMM get status: Error in processing TLV buffer\n"); + resp_len = 0; + continue; + } switch (wlan_le16_to_cpu(ptlv_hdr->header.type)) { case TLV_TYPE_WMMQSTATUS: ptlv_wmm_q_status = - (MrvlIEtypes_WmmQueueStatus_t *) ptlv_hdr; + (MrvlIEtypes_WmmQueueStatus_t *)ptlv_hdr; PRINTM(MEVENT, "WMM_STATUS: QSTATUS TLV: %d\n", ptlv_wmm_q_status->queue_index); @@ -2247,12 +2268,11 @@ wlan_ret_wmm_get_status(pmlan_private priv, t_u8 * ptlv, int resp_len) PRINTM(MEVENT, "WMM STATUS: WMM IE\n"); - HEXDUMP("WMM: WMM TLV:", (t_u8 *) ptlv_hdr, - tlv_len + 4); + HEXDUMP("WMM: WMM TLV:", (t_u8 *)ptlv_hdr, tlv_len + 4); pwmm_param_ie = - (IEEEtypes_WmmParameter_t *) (pcurrent + 2); - pwmm_param_ie->vend_hdr.len = (t_u8) tlv_len; + (IEEEtypes_WmmParameter_t *)(pcurrent + 2); + pwmm_param_ie->vend_hdr.len = (t_u8)tlv_len; pwmm_param_ie->vend_hdr.element_id = WMM_IE; PRINTM(MINFO, @@ -2260,7 +2280,7 @@ wlan_ret_wmm_get_status(pmlan_private priv, t_u8 * ptlv, int resp_len) pwmm_param_ie->qos_info.para_set_count); memcpy(priv->adapter, - (t_u8 *) & priv->curr_bss_params.bss_descriptor. + (t_u8 *)&priv->curr_bss_params.bss_descriptor. wmm_ie, pwmm_param_ie, MIN(sizeof(IEEEtypes_WmmParameter_t), (pwmm_param_ie->vend_hdr.len + 2))); @@ -2269,7 +2289,7 @@ wlan_ret_wmm_get_status(pmlan_private priv, t_u8 * ptlv, int resp_len) case TLV_TYPE_IEEE_ACTION_FRAME: PRINTM(MEVENT, "WMM_STATUS: IEEE Action Frame\n"); - ptlv_action = (MrvlIETypes_ActionFrame_t *) pcurrent; + ptlv_action = (MrvlIETypes_ActionFrame_t *)pcurrent; if (ptlv_action->actionFrame.wmmAc.tspecAct.category == IEEE_MGMT_ACTION_CATEGORY_WMM_TSPEC) { @@ -2362,9 +2382,9 @@ wlan_ret_wmm_get_status(pmlan_private priv, t_u8 * ptlv, int resp_len) */ t_u32 wlan_wmm_process_association_req(pmlan_private priv, - t_u8 ** ppassoc_buf, - IEEEtypes_WmmParameter_t * pwmm_ie, - IEEEtypes_HTCap_t * pht_cap) + t_u8 **ppassoc_buf, + IEEEtypes_WmmParameter_t *pwmm_ie, + IEEEtypes_HTCap_t *pht_cap) { MrvlIEtypes_WmmParamSet_t *pwmm_tlv; t_u32 ret_len = 0; @@ -2391,26 +2411,27 @@ wlan_wmm_process_association_req(pmlan_private priv, if ((priv->wmm_required || (pht_cap && (pht_cap->ieee_hdr.element_id == HT_CAPABILITY) - && (priv->config_bands & BAND_GN)) + && (priv->config_bands & BAND_GN + || priv->config_bands & BAND_AN)) ) && pwmm_ie->vend_hdr.element_id == WMM_IE) { - pwmm_tlv = (MrvlIEtypes_WmmParamSet_t *) * ppassoc_buf; - pwmm_tlv->header.type = (t_u16) wmm_info_ie[0]; + pwmm_tlv = (MrvlIEtypes_WmmParamSet_t *)*ppassoc_buf; + pwmm_tlv->header.type = (t_u16)wmm_info_ie[0]; pwmm_tlv->header.type = wlan_cpu_to_le16(pwmm_tlv->header.type); - pwmm_tlv->header.len = (t_u16) wmm_info_ie[1]; + pwmm_tlv->header.len = (t_u16)wmm_info_ie[1]; memcpy(priv->adapter, pwmm_tlv->wmm_ie, &wmm_info_ie[2], pwmm_tlv->header.len); if (pwmm_ie->qos_info.qos_uapsd) memcpy(priv->adapter, - (t_u8 *) (pwmm_tlv->wmm_ie + - pwmm_tlv->header.len - - sizeof(priv->wmm_qosinfo)), + (t_u8 *)(pwmm_tlv->wmm_ie + + pwmm_tlv->header.len - + sizeof(priv->wmm_qosinfo)), &priv->wmm_qosinfo, sizeof(priv->wmm_qosinfo)); ret_len = sizeof(pwmm_tlv->header) + pwmm_tlv->header.len; pwmm_tlv->header.len = wlan_cpu_to_le16(pwmm_tlv->header.len); - HEXDUMP("ASSOC_CMD: WMM IE", (t_u8 *) pwmm_tlv, ret_len); + HEXDUMP("ASSOC_CMD: WMM IE", (t_u8 *)pwmm_tlv, ret_len); *ppassoc_buf += ret_len; } @@ -2446,8 +2467,8 @@ wlan_wmm_compute_driver_packet_delay(pmlan_private priv, pmoal_handle, &out_ts_sec, &out_ts_usec); - queue_delay = (t_s32) (out_ts_sec - pmbuf->in_ts_sec) * 1000; - queue_delay += (t_s32) (out_ts_usec - pmbuf->in_ts_usec) / 1000; + queue_delay = (t_s32)(out_ts_sec - pmbuf->in_ts_sec) * 1000; + queue_delay += (t_s32)(out_ts_usec - pmbuf->in_ts_usec) / 1000; /* * Queue delay is passed as a uint8 in units of 2ms (ms shifted @@ -2455,7 +2476,7 @@ wlan_wmm_compute_driver_packet_delay(pmlan_private priv, * * Pass max value if queue_delay is beyond the uint8 range */ - ret_val = (t_u8) (MIN(queue_delay, priv->wmm.drv_pkt_delay_max) >> 1); + ret_val = (t_u8)(MIN(queue_delay, priv->wmm.drv_pkt_delay_max) >> 1); PRINTM(MINFO, "WMM: Pkt Delay: %d ms, %d ms sent to FW\n", queue_delay, ret_val); @@ -2479,6 +2500,12 @@ wlan_wmm_process_tx(pmlan_adapter pmadapter) do { if (wlan_dequeue_tx_packet(pmadapter)) break; + if (pmadapter->sdio_ireg) { +#ifdef SDIO_MULTI_PORT_TX_AGGR + wlan_send_mp_aggr_buf(pmadapter); +#endif + break; + } /* Check if busy */ } while (!pmadapter->data_sent && !pmadapter->tx_lock_flag && !wlan_wmm_lists_empty(pmadapter)); @@ -2496,7 +2523,7 @@ wlan_wmm_process_tx(pmlan_adapter pmadapter) * @return wmm_queue priority (0-3) */ t_u8 -wlan_wmm_select_queue(mlan_private * pmpriv, t_u8 tid) +wlan_wmm_select_queue(mlan_private *pmpriv, t_u8 tid) { pmlan_adapter pmadapter = pmpriv->adapter; t_u8 i; @@ -2528,7 +2555,7 @@ wlan_wmm_select_queue(mlan_private * pmpriv, t_u8 tid) */ static INLINE t_u8 wlan_del_tx_pkts_in_ralist(pmlan_private priv, - mlan_list_head * ra_list_head, int tid) + mlan_list_head *ra_list_head, int tid) { raListTbl *ra_list = MNULL; pmlan_adapter pmadapter = priv->adapter; @@ -2536,17 +2563,17 @@ wlan_del_tx_pkts_in_ralist(pmlan_private priv, t_u8 ret = MFALSE; ENTER(); ra_list = - (raListTbl *) util_peek_list(priv->adapter->pmoal_handle, - ra_list_head, MNULL, MNULL); - while (ra_list && ra_list != (raListTbl *) ra_list_head) { + (raListTbl *)util_peek_list(priv->adapter->pmoal_handle, + ra_list_head, MNULL, MNULL); + while (ra_list && ra_list != (raListTbl *)ra_list_head) { if (ra_list->total_pkts && (ra_list->tx_pause || (ra_list->total_pkts > RX_LOW_THRESHOLD))) { - pmbuf = (pmlan_buffer) util_dequeue_list(pmadapter-> - pmoal_handle, - &ra_list-> - buf_head, - MNULL, MNULL); + pmbuf = (pmlan_buffer)util_dequeue_list(pmadapter-> + pmoal_handle, + &ra_list-> + buf_head, MNULL, + MNULL); if (pmbuf) { PRINTM(MDATA, "Drop pkts: tid=%d tx_pause=%d pkts=%d brd_pkts=%d " @@ -2616,7 +2643,7 @@ wlan_drop_tx_pkts(pmlan_private priv) * @return N/A */ t_void -wlan_wmm_delete_peer_ralist(pmlan_private priv, t_u8 * mac) +wlan_wmm_delete_peer_ralist(pmlan_private priv, t_u8 *mac) { raListTbl *ra_list; int i; @@ -2640,14 +2667,14 @@ wlan_wmm_delete_peer_ralist(pmlan_private priv, t_u8 * mac) util_unlink_list(pmadapter->pmoal_handle, &priv->wmm.tid_tbl_ptr[i].ra_list, - (pmlan_linked_list) ra_list, MNULL, + (pmlan_linked_list)ra_list, MNULL, MNULL); pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, - (t_u8 *) ra_list); + (t_u8 *)ra_list); if (priv->wmm.tid_tbl_ptr[i].ra_list_curr == ra_list) priv->wmm.tid_tbl_ptr[i].ra_list_curr = - (raListTbl *) & priv->wmm. - tid_tbl_ptr[i].ra_list; + (raListTbl *)&priv->wmm.tid_tbl_ptr[i]. + ra_list; } } if (pkt_cnt) { @@ -2678,7 +2705,7 @@ wlan_wmm_delete_peer_ralist(pmlan_private priv, t_u8 * mac) * @return N/A */ t_void -wlan_hold_tdls_packets(pmlan_private priv, t_u8 * mac) +wlan_hold_tdls_packets(pmlan_private priv, t_u8 *mac) { pmlan_buffer pmbuf; mlan_adapter *pmadapter = priv->adapter; @@ -2690,16 +2717,15 @@ wlan_hold_tdls_packets(pmlan_private priv, t_u8 * mac) priv->wmm.ra_list_spinlock); PRINTM(MDATA, "wlan_hold_tdls_packets: " MACSTR "\n", MAC2STR(mac)); for (i = 0; i < MAX_NUM_TID; ++i) { - ra_list = (raListTbl *) util_peek_list(pmadapter->pmoal_handle, - &priv->wmm. - tid_tbl_ptr[i].ra_list, - MNULL, MNULL); + ra_list = (raListTbl *)util_peek_list(pmadapter->pmoal_handle, + &priv->wmm.tid_tbl_ptr[i]. + ra_list, MNULL, MNULL); if (ra_list) { while ((pmbuf = wlan_find_tdls_packets(priv, ra_list, mac))) { util_unlink_list(pmadapter->pmoal_handle, &ra_list->buf_head, - (pmlan_linked_list) pmbuf, + (pmlan_linked_list)pmbuf, MNULL, MNULL); ra_list->total_pkts--; priv->wmm.pkts_queued[i]--; @@ -2727,7 +2753,7 @@ wlan_hold_tdls_packets(pmlan_private priv, t_u8 * mac) * @return pmlan_buffer or MNULL */ t_void -wlan_restore_tdls_packets(pmlan_private priv, t_u8 * mac, tdlsStatus_e status) +wlan_restore_tdls_packets(pmlan_private priv, t_u8 *mac, tdlsStatus_e status) { pmlan_buffer pmbuf; mlan_adapter *pmadapter = priv->adapter; @@ -2745,7 +2771,7 @@ wlan_restore_tdls_packets(pmlan_private priv, t_u8 * mac, tdlsStatus_e status) while ((pmbuf = wlan_find_packets_tdls_txq(priv, mac))) { util_unlink_list(pmadapter->pmoal_handle, &priv->tdls_pending_txq, - (pmlan_linked_list) pmbuf, MNULL, MNULL); + (pmlan_linked_list)pmbuf, MNULL, MNULL); tid = pmbuf->priority; tid_down = wlan_wmm_downgrade_tid(priv, tid); if (status == TDLS_SETUP_COMPLETE) { @@ -2753,12 +2779,12 @@ wlan_restore_tdls_packets(pmlan_private priv, t_u8 * mac, tdlsStatus_e status) pmbuf->flags |= MLAN_BUF_FLAG_TDLS; } else { ra_list = - (raListTbl *) util_peek_list(pmadapter-> - pmoal_handle, - &priv->wmm. - tid_tbl_ptr - [tid_down].ra_list, - MNULL, MNULL); + (raListTbl *)util_peek_list(pmadapter-> + pmoal_handle, + &priv->wmm. + tid_tbl_ptr + [tid_down].ra_list, + MNULL, MNULL); pmbuf->flags &= ~MLAN_BUF_FLAG_TDLS; } if (!ra_list) { @@ -2776,7 +2802,7 @@ wlan_restore_tdls_packets(pmlan_private priv, t_u8 * mac, tdlsStatus_e status) pmbuf, pmbuf->priority, ra_list); util_enqueue_list_tail(pmadapter->pmoal_handle, &ra_list->buf_head, - (pmlan_linked_list) pmbuf, MNULL, MNULL); + (pmlan_linked_list)pmbuf, MNULL, MNULL); ra_list->total_pkts++; ra_list->packet_count++; priv->wmm.pkts_queued[tid_down]++; @@ -2806,9 +2832,9 @@ wlan_restore_tdls_packets(pmlan_private priv, t_u8 * mac, tdlsStatus_e status) */ mlan_status wlan_cmd_wmm_addts_req(IN pmlan_private pmpriv, - OUT HostCmd_DS_COMMAND * cmd, IN t_void * pdata_buf) + OUT HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) { - mlan_ds_wmm_addts *paddts = (mlan_ds_wmm_addts *) pdata_buf; + mlan_ds_wmm_addts *paddts = (mlan_ds_wmm_addts *)pdata_buf; HostCmd_DS_WMM_ADDTS_REQ *pcmd_addts = &cmd->params.add_ts; ENTER(); @@ -2843,8 +2869,8 @@ wlan_cmd_wmm_addts_req(IN pmlan_private pmpriv, */ mlan_status wlan_ret_wmm_addts_req(IN pmlan_private pmpriv, - const IN HostCmd_DS_COMMAND * resp, - OUT mlan_ioctl_req * pioctl_buf) + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) { mlan_ds_wmm_cfg *pwmm = MNULL; mlan_ds_wmm_addts *paddts = MNULL; @@ -2853,11 +2879,11 @@ wlan_ret_wmm_addts_req(IN pmlan_private pmpriv, ENTER(); if (pioctl_buf) { - pwmm = (mlan_ds_wmm_cfg *) pioctl_buf->pbuf; - paddts = (mlan_ds_wmm_addts *) & pwmm->param.addts; + pwmm = (mlan_ds_wmm_cfg *)pioctl_buf->pbuf; + paddts = (mlan_ds_wmm_addts *)&pwmm->param.addts; paddts->result = presp_addts->command_result; paddts->dialog_tok = presp_addts->dialog_token; - paddts->status_code = (t_u32) presp_addts->ieee_status_code; + paddts->status_code = (t_u32)presp_addts->ieee_status_code; if (presp_addts->command_result == MLAN_CMD_RESULT_SUCCESS) { /* The tspecData field is potentially variable in size @@ -2865,13 +2891,12 @@ wlan_ret_wmm_addts_req(IN pmlan_private pmpriv, response action frame. Calculate the data length from the firmware command response. */ paddts->ie_data_len - = (t_u8) (resp->size - - sizeof(presp_addts->command_result) - - sizeof(presp_addts->timeout_ms) - - sizeof(presp_addts->dialog_token) - - - sizeof(presp_addts->ieee_status_code) - - S_DS_GEN); + = (t_u8)(resp->size + - sizeof(presp_addts->command_result) + - sizeof(presp_addts->timeout_ms) + - sizeof(presp_addts->dialog_token) + - sizeof(presp_addts->ieee_status_code) + - S_DS_GEN); /* Copy the TSPEC data include any extra IEs after the TSPEC */ @@ -2903,9 +2928,9 @@ wlan_ret_wmm_addts_req(IN pmlan_private pmpriv, */ mlan_status wlan_cmd_wmm_delts_req(IN pmlan_private pmpriv, - OUT HostCmd_DS_COMMAND * cmd, IN t_void * pdata_buf) + OUT HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) { - mlan_ds_wmm_delts *pdelts = (mlan_ds_wmm_delts *) pdata_buf; + mlan_ds_wmm_delts *pdelts = (mlan_ds_wmm_delts *)pdata_buf; HostCmd_DS_WMM_DELTS_REQ *pcmd_delts = &cmd->params.del_ts; ENTER(); @@ -2916,7 +2941,7 @@ wlan_cmd_wmm_delts_req(IN pmlan_private pmpriv, + sizeof(pcmd_delts->ieee_reason_code) + pdelts->ie_data_len + S_DS_GEN); cmd->result = 0; - pcmd_delts->ieee_reason_code = (t_u8) pdelts->status_code; + pcmd_delts->ieee_reason_code = (t_u8)pdelts->status_code; memcpy(pmpriv->adapter, pcmd_delts->tspec_data, pdelts->ie_data, MIN(WMM_TSPEC_SIZE, pdelts->ie_data_len)); @@ -2937,8 +2962,8 @@ wlan_cmd_wmm_delts_req(IN pmlan_private pmpriv, */ mlan_status wlan_ret_wmm_delts_req(IN pmlan_private pmpriv, - const IN HostCmd_DS_COMMAND * resp, - OUT mlan_ioctl_req * pioctl_buf) + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) { mlan_ds_wmm_cfg *pwmm; IEEEtypes_WMM_TSPEC_t *ptspec_ie; @@ -2947,7 +2972,7 @@ wlan_ret_wmm_delts_req(IN pmlan_private pmpriv, ENTER(); if (pioctl_buf) { - pwmm = (mlan_ds_wmm_cfg *) pioctl_buf->pbuf; + pwmm = (mlan_ds_wmm_cfg *)pioctl_buf->pbuf; pwmm->param.delts.result = presp_delts->command_result; PRINTM(MINFO, "TSPEC: DELTS result = %d\n", @@ -2955,7 +2980,7 @@ wlan_ret_wmm_delts_req(IN pmlan_private pmpriv, if (presp_delts->command_result == 0) { ptspec_ie = - (IEEEtypes_WMM_TSPEC_t *) presp_delts-> + (IEEEtypes_WMM_TSPEC_t *)presp_delts-> tspec_data; wlan_send_wmmac_host_event(pmpriv, "DELTS_TX", MNULL, ptspec_ie->TspecBody.TSInfo. @@ -2982,10 +3007,9 @@ wlan_ret_wmm_delts_req(IN pmlan_private pmpriv, */ mlan_status wlan_cmd_wmm_queue_stats(IN pmlan_private pmpriv, - OUT HostCmd_DS_COMMAND * cmd, IN t_void * pdata_buf) + OUT HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) { - mlan_ds_wmm_queue_stats *pqstats = - (mlan_ds_wmm_queue_stats *) pdata_buf; + mlan_ds_wmm_queue_stats *pqstats = (mlan_ds_wmm_queue_stats *)pdata_buf; HostCmd_DS_WMM_QUEUE_STATS *pcmd_qstats = &cmd->params.queue_stats; t_u8 id; @@ -3026,8 +3050,8 @@ wlan_cmd_wmm_queue_stats(IN pmlan_private pmpriv, */ mlan_status wlan_ret_wmm_queue_stats(IN pmlan_private pmpriv, - const IN HostCmd_DS_COMMAND * resp, - OUT mlan_ioctl_req * pioctl_buf) + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) { mlan_ds_wmm_cfg *pwmm = MNULL; mlan_ds_wmm_queue_stats *pqstats = MNULL; @@ -3038,8 +3062,8 @@ wlan_ret_wmm_queue_stats(IN pmlan_private pmpriv, ENTER(); if (pioctl_buf) { - pwmm = (mlan_ds_wmm_cfg *) pioctl_buf->pbuf; - pqstats = (mlan_ds_wmm_queue_stats *) & pwmm->param.q_stats; + pwmm = (mlan_ds_wmm_cfg *)pioctl_buf->pbuf; + pqstats = (mlan_ds_wmm_queue_stats *)&pwmm->param.q_stats; pqstats->action = presp_qstats->action; pqstats->user_priority = presp_qstats->select_bin; @@ -3073,9 +3097,9 @@ wlan_ret_wmm_queue_stats(IN pmlan_private pmpriv, */ mlan_status wlan_cmd_wmm_ts_status(IN pmlan_private pmpriv, - OUT HostCmd_DS_COMMAND * cmd, IN t_void * pdata_buf) + OUT HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) { - mlan_ds_wmm_ts_status *pts_status = (mlan_ds_wmm_ts_status *) pdata_buf; + mlan_ds_wmm_ts_status *pts_status = (mlan_ds_wmm_ts_status *)pdata_buf; HostCmd_DS_WMM_TS_STATUS *pcmd_ts_status = &cmd->params.ts_status; ENTER(); @@ -3085,8 +3109,8 @@ wlan_cmd_wmm_ts_status(IN pmlan_private pmpriv, + S_DS_GEN); cmd->result = 0; - memcpy(pmpriv->adapter, (t_void *) pcmd_ts_status, - (t_void *) pts_status, sizeof(HostCmd_DS_WMM_TS_STATUS)); + memcpy(pmpriv->adapter, (t_void *)pcmd_ts_status, (t_void *)pts_status, + sizeof(HostCmd_DS_WMM_TS_STATUS)); LEAVE(); return MLAN_STATUS_SUCCESS; @@ -3103,8 +3127,8 @@ wlan_cmd_wmm_ts_status(IN pmlan_private pmpriv, */ mlan_status wlan_ret_wmm_ts_status(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - OUT mlan_ioctl_req * pioctl_buf) + IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) { mlan_ds_wmm_cfg *pwmm = MNULL; HostCmd_DS_WMM_TS_STATUS *presp_ts_status = &resp->params.ts_status; @@ -3112,12 +3136,12 @@ wlan_ret_wmm_ts_status(IN pmlan_private pmpriv, ENTER(); if (pioctl_buf) { - pwmm = (mlan_ds_wmm_cfg *) pioctl_buf->pbuf; + pwmm = (mlan_ds_wmm_cfg *)pioctl_buf->pbuf; presp_ts_status->medium_time = wlan_le16_to_cpu(presp_ts_status->medium_time); memcpy(pmpriv->adapter, - (t_void *) & pwmm->param.ts_status, - (t_void *) presp_ts_status, + (t_void *)&pwmm->param.ts_status, + (t_void *)presp_ts_status, sizeof(mlan_ds_wmm_ts_status)); } @@ -3140,11 +3164,11 @@ wlan_wmm_ioctl_enable(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; mlan_ds_wmm_cfg *wmm = MNULL; ENTER(); - wmm = (mlan_ds_wmm_cfg *) pioctl_req->pbuf; + wmm = (mlan_ds_wmm_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) - wmm->param.wmm_enable = (t_u32) pmpriv->wmm_required; + wmm->param.wmm_enable = (t_u32)pmpriv->wmm_required; else - pmpriv->wmm_required = (t_u8) wmm->param.wmm_enable; + pmpriv->wmm_required = (t_u8)wmm->param.wmm_enable; pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; LEAVE(); return ret; @@ -3167,7 +3191,7 @@ wlan_wmm_ioctl_qos(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) ENTER(); - wmm = (mlan_ds_wmm_cfg *) pioctl_req->pbuf; + wmm = (mlan_ds_wmm_cfg *)pioctl_req->pbuf; if (pioctl_req->action == MLAN_ACT_GET) wmm->param.qos_cfg = pmpriv->wmm_qosinfo; @@ -3199,12 +3223,12 @@ wlan_wmm_ioctl_addts_req(IN pmlan_adapter pmadapter, mlan_ds_wmm_cfg *cfg = MNULL; ENTER(); - cfg = (mlan_ds_wmm_cfg *) pioctl_req->pbuf; + cfg = (mlan_ds_wmm_cfg *)pioctl_req->pbuf; /* Send request to firmware */ ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_WMM_ADDTS_REQ, - 0, 0, (t_void *) pioctl_req, - (t_void *) & cfg->param.addts); + 0, 0, (t_void *)pioctl_req, + (t_void *)&cfg->param.addts); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -3230,12 +3254,12 @@ wlan_wmm_ioctl_delts_req(IN pmlan_adapter pmadapter, mlan_ds_wmm_cfg *cfg = MNULL; ENTER(); - cfg = (mlan_ds_wmm_cfg *) pioctl_req->pbuf; + cfg = (mlan_ds_wmm_cfg *)pioctl_req->pbuf; /* Send request to firmware */ ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_WMM_DELTS_REQ, - 0, 0, (t_void *) pioctl_req, - (t_void *) & cfg->param.delts); + 0, 0, (t_void *)pioctl_req, + (t_void *)&cfg->param.delts); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -3261,12 +3285,12 @@ wlan_wmm_ioctl_queue_stats(IN pmlan_adapter pmadapter, mlan_ds_wmm_cfg *cfg = MNULL; ENTER(); - cfg = (mlan_ds_wmm_cfg *) pioctl_req->pbuf; + cfg = (mlan_ds_wmm_cfg *)pioctl_req->pbuf; /* Send request to firmware */ ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_WMM_QUEUE_STATS, - 0, 0, (t_void *) pioctl_req, - (t_void *) & cfg->param.q_stats); + 0, 0, (t_void *)pioctl_req, + (t_void *)&cfg->param.q_stats); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -3296,8 +3320,8 @@ wlan_wmm_ioctl_queue_status(IN pmlan_adapter pmadapter, ENTER(); - cfg = (mlan_ds_wmm_cfg *) pioctl_req->pbuf; - pqstatus = (mlan_ds_wmm_queue_status *) & cfg->param.q_status; + cfg = (mlan_ds_wmm_cfg *)pioctl_req->pbuf; + pqstatus = (mlan_ds_wmm_queue_status *)&cfg->param.q_status; for (ac_idx = WMM_AC_BK; ac_idx <= WMM_AC_VO; ac_idx++) { pac_status = &pmpriv->wmm.ac_status[ac_idx]; @@ -3335,12 +3359,12 @@ wlan_wmm_ioctl_ts_status(IN pmlan_adapter pmadapter, ENTER(); - cfg = (mlan_ds_wmm_cfg *) pioctl_req->pbuf; + cfg = (mlan_ds_wmm_cfg *)pioctl_req->pbuf; /* Send request to firmware */ ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_WMM_TS_STATUS, - 0, 0, (t_void *) pioctl_req, - (t_void *) & cfg->param.ts_status); + 0, 0, (t_void *)pioctl_req, + (t_void *)&cfg->param.ts_status); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -3360,10 +3384,9 @@ wlan_wmm_ioctl_ts_status(IN pmlan_adapter pmadapter, */ mlan_status wlan_cmd_wmm_queue_config(IN pmlan_private pmpriv, - OUT HostCmd_DS_COMMAND * cmd, IN t_void * pdata_buf) + OUT HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) { - mlan_ds_wmm_queue_config *pqcfg = - (mlan_ds_wmm_queue_config *) pdata_buf; + mlan_ds_wmm_queue_config *pqcfg = (mlan_ds_wmm_queue_config *)pdata_buf; HostCmd_DS_WMM_QUEUE_CONFIG *pcmd_qcfg = &cmd->params.queue_config; ENTER(); @@ -3395,8 +3418,8 @@ wlan_cmd_wmm_queue_config(IN pmlan_private pmpriv, */ mlan_status wlan_ret_wmm_queue_config(IN pmlan_private pmpriv, - const IN HostCmd_DS_COMMAND * resp, - OUT mlan_ioctl_req * pioctl_buf) + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) { mlan_ds_wmm_cfg *pwmm = MNULL; const HostCmd_DS_WMM_QUEUE_CONFIG *presp_qcfg = @@ -3405,7 +3428,7 @@ wlan_ret_wmm_queue_config(IN pmlan_private pmpriv, ENTER(); if (pioctl_buf) { - pwmm = (mlan_ds_wmm_cfg *) pioctl_buf->pbuf; + pwmm = (mlan_ds_wmm_cfg *)pioctl_buf->pbuf; pwmm->param.q_cfg.action = presp_qcfg->action; pwmm->param.q_cfg.access_category = presp_qcfg->access_category; pwmm->param.q_cfg.msdu_lifetime_expiry = @@ -3433,12 +3456,12 @@ wlan_wmm_ioctl_queue_config(IN pmlan_adapter pmadapter, mlan_ds_wmm_cfg *cfg = MNULL; ENTER(); - cfg = (mlan_ds_wmm_cfg *) pioctl_req->pbuf; + cfg = (mlan_ds_wmm_cfg *)pioctl_req->pbuf; /* Send request to firmware */ ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_WMM_QUEUE_CONFIG, - 0, 0, (t_void *) pioctl_req, - (t_void *) & cfg->param.q_cfg); + 0, 0, (t_void *)pioctl_req, + (t_void *)&cfg->param.q_cfg); if (ret == MLAN_STATUS_SUCCESS) ret = MLAN_STATUS_PENDING; @@ -3471,7 +3494,7 @@ wlan_wmm_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) LEAVE(); return MLAN_STATUS_RESOURCE; } - wmm = (mlan_ds_wmm_cfg *) pioctl_req->pbuf; + wmm = (mlan_ds_wmm_cfg *)pioctl_req->pbuf; switch (wmm->sub_command) { #ifdef STA_SUPPORT case MLAN_OID_WMM_CFG_ENABLE: @@ -3507,3 +3530,87 @@ wlan_wmm_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) LEAVE(); return status; } + +/** + * @brief Get ralist info + * + * @param priv A pointer to mlan_private structure + * @param buf A pointer to ralist_info structure + * @return number of ralist entry + * + */ +int +wlan_get_ralist_info(mlan_private *priv, ralist_info *buf) +{ + ralist_info *plist = buf; + mlan_list_head *ra_list_head = MNULL; + raListTbl *ra_list; + int i; + int count = 0; + for (i = 0; i < MAX_NUM_TID; i++) { + ra_list_head = &priv->wmm.tid_tbl_ptr[i].ra_list; + ra_list = + (raListTbl *)util_peek_list(priv->adapter->pmoal_handle, + ra_list_head, MNULL, MNULL); + while (ra_list && ra_list != (raListTbl *)ra_list_head) { + if (ra_list->total_pkts) { + plist->total_pkts = ra_list->total_pkts; + plist->tid = i; + plist->tx_pause = ra_list->tx_pause; + memcpy(priv->adapter, plist->ra, ra_list->ra, + MLAN_MAC_ADDR_LENGTH); + plist++; + count++; + if (count >= MLAN_MAX_RALIST_NUM) + break; + } + ra_list = ra_list->pnext; + } + } + LEAVE(); + return count; +} + +/** + * @brief dump ralist info + * + * @param priv A pointer to mlan_private structure + * + * @return N/A + * + */ +void +wlan_dump_ralist(mlan_private *priv) +{ + mlan_list_head *ra_list_head = MNULL; + raListTbl *ra_list; + mlan_adapter *pmadapter = priv->adapter; + int i; + t_u32 tx_pkts_queued; + + tx_pkts_queued = + util_scalar_read(pmadapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, MNULL, MNULL); + PRINTM(MERROR, "bss_index = %d, tx_pkts_queued = %d\n", priv->bss_index, + tx_pkts_queued); + if (!tx_pkts_queued) + return; + for (i = 0; i < MAX_NUM_TID; i++) { + ra_list_head = &priv->wmm.tid_tbl_ptr[i].ra_list; + ra_list = + (raListTbl *)util_peek_list(priv->adapter->pmoal_handle, + ra_list_head, MNULL, MNULL); + while (ra_list && ra_list != (raListTbl *)ra_list_head) { + if (ra_list->total_pkts) { + PRINTM(MERROR, + "ralist ra: %02x:%02x:%02x:%02x:%02x:%02x tid=%d pkts=%d pause=%d\n", + ra_list->ra[0], ra_list->ra[1], + ra_list->ra[2], ra_list->ra[3], + ra_list->ra[4], ra_list->ra[5], i, + ra_list->total_pkts, ra_list->tx_pause); + } + ra_list = ra_list->pnext; + } + } + return; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_wmm.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_wmm.h old mode 100755 new mode 100644 index b1b4ea7b..88ff225a --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_wmm.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlan/mlan_wmm.h @@ -36,13 +36,13 @@ Change log: * @return TID */ static INLINE int -wlan_get_tid(pmlan_adapter pmadapter, raListTbl * ptr) +wlan_get_tid(pmlan_adapter pmadapter, raListTbl *ptr) { pmlan_buffer mbuf; ENTER(); - mbuf = (pmlan_buffer) util_peek_list(pmadapter->pmoal_handle, - &ptr->buf_head, MNULL, MNULL); + mbuf = (pmlan_buffer)util_peek_list(pmadapter->pmoal_handle, + &ptr->buf_head, MNULL, MNULL); LEAVE(); return mbuf->priority; @@ -66,7 +66,7 @@ wlan_wmm_list_len(pmlan_adapter pmadapter, pmlan_list_head head) pos = head->pnext; - while (pos != (pmlan_linked_list) head) { + while (pos != (pmlan_linked_list)head) { ++count; pos = pos->pnext; } @@ -78,9 +78,9 @@ wlan_wmm_list_len(pmlan_adapter pmadapter, pmlan_list_head head) /** Add buffer to WMM Tx queue */ void wlan_wmm_add_buf_txqueue(pmlan_adapter pmadapter, pmlan_buffer pmbuf); /** Add to RA list */ -void wlan_ralist_add(mlan_private * priv, t_u8 * ra); +void wlan_ralist_add(mlan_private *priv, t_u8 *ra); /** Update the RA list */ -int wlan_ralist_update(mlan_private * priv, t_u8 * old_ra, t_u8 * new_ra); +int wlan_ralist_update(mlan_private *priv, t_u8 *old_ra, t_u8 *new_ra); /** WMM status change command handler */ mlan_status wlan_cmd_wmm_status_change(pmlan_private priv); @@ -89,10 +89,10 @@ int wlan_wmm_lists_empty(pmlan_adapter pmadapter); /** Process WMM transmission */ t_void wlan_wmm_process_tx(pmlan_adapter pmadapter); /** Test to see if the ralist ptr is valid */ -int wlan_is_ralist_valid(mlan_private * priv, raListTbl * ra_list, int tid); +int wlan_is_ralist_valid(mlan_private *priv, raListTbl *ra_list, int tid); raListTbl *wlan_wmm_get_ralist_node(pmlan_private priv, t_u8 tid, - t_u8 * ra_addr); + t_u8 *ra_addr); t_u8 wlan_get_random_ba_threshold(pmlan_adapter pmadapter); /** Compute driver packet delay */ @@ -108,21 +108,21 @@ void wlan_wmm_default_queue_priorities(pmlan_private priv); #ifdef STA_SUPPORT /** Process WMM association request */ extern t_u32 wlan_wmm_process_association_req(pmlan_private priv, - t_u8 ** ppAssocBuf, - IEEEtypes_WmmParameter_t * pWmmIE, - IEEEtypes_HTCap_t * pHTCap); + t_u8 **ppAssocBuf, + IEEEtypes_WmmParameter_t *pWmmIE, + IEEEtypes_HTCap_t *pHTCap); #endif /* STA_SUPPORT */ /** setup wmm queue priorities */ void wlan_wmm_setup_queue_priorities(pmlan_private priv, - IEEEtypes_WmmParameter_t * wmm_ie); + IEEEtypes_WmmParameter_t *wmm_ie); /** Downgrade WMM priority queue */ void wlan_wmm_setup_ac_downgrade(pmlan_private priv); /** select WMM queue */ -t_u8 wlan_wmm_select_queue(mlan_private * pmpriv, t_u8 tid); +t_u8 wlan_wmm_select_queue(mlan_private *pmpriv, t_u8 tid); #ifdef UAP_SUPPORT -t_void wlan_wmm_delete_peer_ralist(pmlan_private priv, t_u8 * mac); +t_void wlan_wmm_delete_peer_ralist(pmlan_private priv, t_u8 *mac); #endif #ifdef STA_SUPPORT @@ -131,54 +131,54 @@ t_void wlan_wmm_delete_peer_ralist(pmlan_private priv, t_u8 * mac); */ /** WMM ADDTS request command handler */ extern mlan_status wlan_cmd_wmm_addts_req(IN pmlan_private pmpriv, - OUT HostCmd_DS_COMMAND * cmd, - IN t_void * pdata_buf); + OUT HostCmd_DS_COMMAND *cmd, + IN t_void *pdata_buf); /** WMM DELTS request command handler */ extern mlan_status wlan_cmd_wmm_delts_req(IN pmlan_private pmpriv, - OUT HostCmd_DS_COMMAND * cmd, - IN t_void * pdata_buf); + OUT HostCmd_DS_COMMAND *cmd, + IN t_void *pdata_buf); /** WMM QUEUE_STATS command handler */ extern mlan_status wlan_cmd_wmm_queue_stats(IN pmlan_private pmpriv, - OUT HostCmd_DS_COMMAND * cmd, - IN t_void * pdata_buf); + OUT HostCmd_DS_COMMAND *cmd, + IN t_void *pdata_buf); /** WMM TS_STATUS command handler */ extern mlan_status wlan_cmd_wmm_ts_status(IN pmlan_private pmpriv, - OUT HostCmd_DS_COMMAND * cmd, - IN t_void * pdata_buf); + OUT HostCmd_DS_COMMAND *cmd, + IN t_void *pdata_buf); /* * Functions used in the cmdresp handling routine */ /** WMM get status command response handler */ extern mlan_status wlan_ret_wmm_get_status(IN pmlan_private priv, - IN t_u8 * ptlv, IN int resp_len); + IN t_u8 *ptlv, IN int resp_len); /** WMM ADDTS request command response handler */ extern mlan_status wlan_ret_wmm_addts_req(IN pmlan_private pmpriv, - const IN HostCmd_DS_COMMAND * resp, - OUT mlan_ioctl_req * pioctl_buf); + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf); /** WMM DELTS request command response handler */ extern mlan_status wlan_ret_wmm_delts_req(IN pmlan_private pmpriv, - const IN HostCmd_DS_COMMAND * resp, - OUT mlan_ioctl_req * pioctl_buf); + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf); /** WMM QUEUE_STATS command response handler */ extern mlan_status wlan_ret_wmm_queue_stats(IN pmlan_private pmpriv, - const IN HostCmd_DS_COMMAND * resp, - OUT mlan_ioctl_req * pioctl_buf); + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf); /** WMM TS_STATUS command response handler */ extern mlan_status wlan_ret_wmm_ts_status(IN pmlan_private pmpriv, - IN HostCmd_DS_COMMAND * resp, - OUT mlan_ioctl_req * pioctl_buf); + IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf); #endif /* STA_SUPPORT */ /** WMM QUEUE_CONFIG command handler */ extern mlan_status wlan_cmd_wmm_queue_config(IN pmlan_private pmpriv, - OUT HostCmd_DS_COMMAND * cmd, - IN t_void * pdata_buf); + OUT HostCmd_DS_COMMAND *cmd, + IN t_void *pdata_buf); /** WMM QUEUE_CONFIG command response handler */ extern mlan_status wlan_ret_wmm_queue_config(IN pmlan_private pmpriv, - const IN HostCmd_DS_COMMAND * resp, - OUT mlan_ioctl_req * pioctl_buf); + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf); mlan_status wlan_wmm_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/mlan.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/mlan.h old mode 100755 new mode 100644 diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/mlan_decl.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/mlan_decl.h old mode 100755 new mode 100644 index 99f4de45..97dcc1bf --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/mlan_decl.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/mlan_decl.h @@ -27,7 +27,7 @@ Change log: #define _MLAN_DECL_H_ /** MLAN release version */ -#define MLAN_RELEASE_VERSION "467" +#define MLAN_RELEASE_VERSION "C066.r2" /** Re-define generic data types for MLAN/MOAL */ /** Signed char (1-byte) */ @@ -146,9 +146,18 @@ typedef t_s32 t_sval; /** This is current limit on Maximum Rx AMPDU allowed */ #define MLAN_MAX_RX_BASTREAM_SUPPORTED 16 +/** station ampdu tx win size */ +#define MLAN_STA_AMPDU_DEF_TXWINSIZE_NOV15 32 +/** uap ampdu tx win size */ +#define MLAN_UAP_AMPDU_DEF_TXWINSIZE_NOV15 32 +/** uap ampdu rx win size */ +#define MLAN_UAP_AMPDU_DEF_RXWINSIZE_NOV15 32 +/** wfd ampdu tx/rx win size */ +#define MLAN_WFD_AMPDU_DEF_TXRXWINSIZE_NOV15 32 + #ifdef STA_SUPPORT /** Default Win size attached during ADDBA request */ -#define MLAN_STA_AMPDU_DEF_TXWINSIZE 16 +#define MLAN_STA_AMPDU_DEF_TXWINSIZE 32 /** Default Win size attached during ADDBA response */ #define MLAN_STA_AMPDU_DEF_RXWINSIZE 64 /** RX winsize for COEX */ @@ -158,14 +167,14 @@ typedef t_s32 t_sval; /** Default Win size attached during ADDBA request */ #define MLAN_UAP_AMPDU_DEF_TXWINSIZE 32 /** Default Win size attached during ADDBA response */ -#define MLAN_UAP_AMPDU_DEF_RXWINSIZE 16 +#define MLAN_UAP_AMPDU_DEF_RXWINSIZE 32 /** RX winsize for COEX */ #define MLAN_UAP_COEX_AMPDU_DEF_RXWINSIZE 16 #endif /* UAP_SUPPORT */ #ifdef WIFI_DIRECT_SUPPORT /** WFD use the same window size for tx/rx */ -#define MLAN_WFD_AMPDU_DEF_TXRXWINSIZE 16 +#define MLAN_WFD_AMPDU_DEF_TXRXWINSIZE 32 /** RX winsize for COEX */ #define MLAN_WFD_COEX_AMPDU_DEF_RXWINSIZE 16 #endif @@ -234,12 +243,6 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH]; /** Maximum tx retry count */ #define MLAN_TX_RETRY_MAX (14) - -#define RX_RATE_MAX 24 -#define SNR_MAX 256 -#define NOISE_FLR_MAX 256 -#define SIG_STRENGTH_MAX 256 - /** define SDIO block size for data Tx/Rx */ /* We support up to 480-byte block size due to FW buffer limitation. */ #define MLAN_SDIO_BLOCK_SIZE 256 @@ -250,7 +253,13 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH]; /** define allocated buffer size */ #define ALLOC_BUF_SIZE (4 * 1024) /** SDIO MP aggr pkt limit */ -#define SDIO_MP_AGGR_DEF_PKT_LIMIT (8) +#define SDIO_MP_AGGR_DEF_PKT_LIMIT (16) +/** SDIO MP aggr pkt limit 8 */ +#define SDIO_MP_AGGR_DEF_PKT_LIMIT_8 (8) +/** SDIO MP aggr pkt limit 16*/ +#define SDIO_MP_AGGR_DEF_PKT_LIMIT_16 (16) +/** max SDIO MP aggr pkt limit */ +#define SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX (16) /** SDIO IO Port mask */ #define MLAN_SDIO_IO_PORT_MASK 0xfffff @@ -284,6 +293,9 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH]; /** Buffer flag for TCP_ACK */ #define MLAN_BUF_FLAG_TCP_ACK MBIT(9) +/** Buffer flag for TX_STATUS */ +#define MLAN_BUF_FLAG_TX_STATUS MBIT(10) + #ifdef DEBUG_LEVEL1 /** Debug level bit definition */ #define MMSG MBIT(0) @@ -295,6 +307,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH]; #define MINTR MBIT(6) #define MIOCTL MBIT(7) +#define MMPA_D MBIT(15) #define MDAT_D MBIT(16) #define MCMD_D MBIT(17) #define MEVT_D MBIT(18) @@ -319,6 +332,7 @@ typedef enum _mlan_status { MLAN_STATUS_SUCCESS = 0, MLAN_STATUS_PENDING, MLAN_STATUS_RESOURCE, + MLAN_STATUS_COMPLETE, } mlan_status; /** mlan_error_code */ @@ -414,6 +428,11 @@ typedef enum _mlan_event_id { MLAN_EVENT_ID_FW_BG_SCAN = 0x0000001D, MLAN_EVENT_ID_FW_BG_SCAN_STOPPED = 0x0000001E, MLAN_EVENT_ID_FW_WEP_ICV_ERR = 0x00000020, + MLAN_EVENT_ID_FW_STOP_TX = 0x00000021, + MLAN_EVENT_ID_FW_START_TX = 0x00000022, + MLAN_EVENT_ID_FW_CHANNEL_SWITCH_ANN = 0x00000023, + MLAN_EVENT_ID_FW_RADAR_DETECTED = 0x00000024, + MLAN_EVENT_ID_FW_CHANNEL_REPORT_RDY = 0x00000025, MLAN_EVENT_ID_FW_BW_CHANGED = 0x00000026, #ifdef WIFI_DIRECT_SUPPORT MLAN_EVENT_ID_FW_REMAIN_ON_CHAN_EXPIRED = 0x0000002B, @@ -427,6 +446,7 @@ typedef enum _mlan_event_id { MLAN_EVENT_ID_UAP_FW_STA_DISCONNECT = 0x00000031, #endif + MLAN_EVENT_ID_FW_TX_STATUS = 0x00000034, /* Event generated by MLAN driver (MSB=1) */ MLAN_EVENT_ID_DRV_CONNECTED = 0x80000001, MLAN_EVENT_ID_DRV_DEFER_HANDLING = 0x80000002, @@ -436,6 +456,7 @@ typedef enum _mlan_event_id { MLAN_EVENT_ID_DRV_OBSS_SCAN_PARAM = 0x80000006, MLAN_EVENT_ID_DRV_PASSTHRU = 0x80000007, MLAN_EVENT_ID_DRV_SCAN_REPORT = 0x80000009, + MLAN_EVENT_ID_DRV_MEAS_REPORT = 0x8000000A, MLAN_EVENT_ID_DRV_ASSOC_FAILURE_REPORT = 0x8000000B, MLAN_EVENT_ID_DRV_REPORT_STRING = 0x8000000F, MLAN_EVENT_ID_DRV_DBG_DUMP = 0x80000012, @@ -553,6 +574,8 @@ typedef struct _mlan_buffer { t_u32 out_ts_sec; /** Time stamp when packet is processed (micro seconds) */ t_u32 out_ts_usec; + /** tx_seq_num */ + t_u32 tx_seq_num; /** Fields below are valid for MLAN module only */ /** Pointer to parent mlan_buffer */ @@ -636,7 +659,7 @@ typedef MLAN_PACK_START struct { t_u16 medium_time; } MLAN_PACK_END wlan_ioctl_wmm_ts_status_t, /** Type definition of mlan_ds_wmm_ts_status for MLAN_OID_WMM_CFG_TS_STATUS */ - mlan_ds_wmm_ts_status, *pmlan_ds_wmm_ts_status; +mlan_ds_wmm_ts_status, *pmlan_ds_wmm_ts_status; /** Max Ie length */ #define MAX_IE_SIZE 256 @@ -786,7 +809,6 @@ typedef MLAN_PACK_START struct _tdls_all_config { /** enable or disable */ t_u16 enable; } MLAN_PACK_END tdls_config; - /** TDLS set info */ MLAN_PACK_START struct _tdls_set_data { /** (tlv + capInfo) length */ @@ -921,129 +943,143 @@ typedef struct _tdls_tear_down_event { /** mlan_callbacks data structure */ typedef struct _mlan_callbacks { /** moal_get_fw_data */ - mlan_status(*moal_get_fw_data) (IN t_void * pmoal_handle, - IN t_u32 offset, - IN t_u32 len, OUT t_u8 * pbuf); + mlan_status (*moal_get_fw_data) (IN t_void *pmoal_handle, + IN t_u32 offset, + IN t_u32 len, OUT t_u8 *pbuf); /** moal_init_fw_complete */ - mlan_status(*moal_init_fw_complete) (IN t_void * pmoal_handle, - IN mlan_status status); + mlan_status (*moal_init_fw_complete) (IN t_void *pmoal_handle, + IN mlan_status status); /** moal_shutdown_fw_complete */ - mlan_status(*moal_shutdown_fw_complete) (IN t_void * pmoal_handle, - IN mlan_status status); + mlan_status (*moal_shutdown_fw_complete) (IN t_void *pmoal_handle, + IN mlan_status status); /** moal_send_packet_complete */ - mlan_status(*moal_send_packet_complete) (IN t_void * pmoal_handle, - IN pmlan_buffer pmbuf, - IN mlan_status status); + mlan_status (*moal_send_packet_complete) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf, + IN mlan_status status); /** moal_recv_complete */ - mlan_status(*moal_recv_complete) (IN t_void * pmoal_handle, - IN pmlan_buffer pmbuf, - IN t_u32 port, IN mlan_status status); + mlan_status (*moal_recv_complete) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf, + IN t_u32 port, + IN mlan_status status); /** moal_recv_packet */ - mlan_status(*moal_recv_packet) (IN t_void * pmoal_handle, - IN pmlan_buffer pmbuf); + mlan_status (*moal_recv_packet) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf); /** moal_recv_event */ - mlan_status(*moal_recv_event) (IN t_void * pmoal_handle, - IN pmlan_event pmevent); + mlan_status (*moal_recv_event) (IN t_void *pmoal_handle, + IN pmlan_event pmevent); /** moal_ioctl_complete */ - mlan_status(*moal_ioctl_complete) (IN t_void * pmoal_handle, - IN pmlan_ioctl_req pioctl_req, - IN mlan_status status); + mlan_status (*moal_ioctl_complete) (IN t_void *pmoal_handle, + IN pmlan_ioctl_req pioctl_req, + IN mlan_status status); /** moal_alloc_mlan_buffer */ - mlan_status(*moal_alloc_mlan_buffer) (IN t_void * pmoal_handle, - IN t_u32 size, - OUT pmlan_buffer * pmbuf); + mlan_status (*moal_alloc_mlan_buffer) (IN t_void *pmoal_handle, + IN t_u32 size, + OUT pmlan_buffer *pmbuf); /** moal_free_mlan_buffer */ - mlan_status(*moal_free_mlan_buffer) (IN t_void * pmoal_handle, - IN pmlan_buffer pmbuf); + mlan_status (*moal_free_mlan_buffer) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf); /** moal_write_reg */ - mlan_status(*moal_write_reg) (IN t_void * pmoal_handle, - IN t_u32 reg, IN t_u32 data); + mlan_status (*moal_write_reg) (IN t_void *pmoal_handle, + IN t_u32 reg, IN t_u32 data); /** moal_read_reg */ - mlan_status(*moal_read_reg) (IN t_void * pmoal_handle, - IN t_u32 reg, OUT t_u32 * data); + mlan_status (*moal_read_reg) (IN t_void *pmoal_handle, + IN t_u32 reg, OUT t_u32 *data); /** moal_write_data_sync */ - mlan_status(*moal_write_data_sync) (IN t_void * pmoal_handle, - IN pmlan_buffer pmbuf, - IN t_u32 port, IN t_u32 timeout); + mlan_status (*moal_write_data_sync) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf, + IN t_u32 port, IN t_u32 timeout); /** moal_read_data_sync */ - mlan_status(*moal_read_data_sync) (IN t_void * pmoal_handle, - IN OUT pmlan_buffer pmbuf, - IN t_u32 port, IN t_u32 timeout); + mlan_status (*moal_read_data_sync) (IN t_void *pmoal_handle, + IN OUT pmlan_buffer pmbuf, + IN t_u32 port, IN t_u32 timeout); /** moal_malloc */ - mlan_status(*moal_malloc) (IN t_void * pmoal_handle, - IN t_u32 size, - IN t_u32 flag, OUT t_u8 ** ppbuf); + mlan_status (*moal_malloc) (IN t_void *pmoal_handle, + IN t_u32 size, + IN t_u32 flag, OUT t_u8 **ppbuf); /** moal_mfree */ - mlan_status(*moal_mfree) (IN t_void * pmoal_handle, IN t_u8 * pbuf); + mlan_status (*moal_mfree) (IN t_void *pmoal_handle, IN t_u8 *pbuf); /** moal_vmalloc */ - mlan_status(*moal_vmalloc) (IN t_void * pmoal_handle, - IN t_u32 size, OUT t_u8 ** ppbuf); + mlan_status (*moal_vmalloc) (IN t_void *pmoal_handle, + IN t_u32 size, OUT t_u8 **ppbuf); /** moal_vfree */ - mlan_status(*moal_vfree) (IN t_void * pmoal_handle, IN t_u8 * pbuf); + mlan_status (*moal_vfree) (IN t_void *pmoal_handle, IN t_u8 *pbuf); /** moal_memset */ - t_void *(*moal_memset) (IN t_void * pmoal_handle, - IN t_void * pmem, IN t_u8 byte, IN t_u32 num); + t_void *(*moal_memset) (IN t_void *pmoal_handle, + IN t_void *pmem, IN t_u8 byte, IN t_u32 num); /** moal_memcpy */ - t_void *(*moal_memcpy) (IN t_void * pmoal_handle, - IN t_void * pdest, - IN const t_void * psrc, IN t_u32 num); + t_void *(*moal_memcpy) (IN t_void *pmoal_handle, + IN t_void *pdest, + IN const t_void *psrc, IN t_u32 num); /** moal_memmove */ - t_void *(*moal_memmove) (IN t_void * pmoal_handle, - IN t_void * pdest, - IN const t_void * psrc, IN t_u32 num); + t_void *(*moal_memmove) (IN t_void *pmoal_handle, + IN t_void *pdest, + IN const t_void *psrc, IN t_u32 num); /** moal_memcmp */ - t_s32(*moal_memcmp) (IN t_void * pmoal_handle, - IN const t_void * pmem1, - IN const t_void * pmem2, IN t_u32 num); + t_s32 (*moal_memcmp) (IN t_void *pmoal_handle, + IN const t_void *pmem1, + IN const t_void *pmem2, IN t_u32 num); /** moal_udelay */ - t_void(*moal_udelay) (IN t_void * pmoal_handle, IN t_u32 udelay); + t_void (*moal_udelay) (IN t_void *pmoal_handle, IN t_u32 udelay); /** moal_get_system_time */ - mlan_status(*moal_get_system_time) (IN t_void * pmoal_handle, - OUT t_u32 * psec, - OUT t_u32 * pusec); + mlan_status (*moal_get_system_time) (IN t_void *pmoal_handle, + OUT t_u32 *psec, OUT t_u32 *pusec); /** moal_init_timer*/ - mlan_status(*moal_init_timer) (IN t_void * pmoal_handle, - OUT t_void ** pptimer, - IN t_void(*callback) (t_void * - pcontext), - IN t_void * pcontext); + mlan_status (*moal_init_timer) (IN t_void *pmoal_handle, + OUT t_void **pptimer, + IN t_void (*callback) (t_void + *pcontext), + IN t_void *pcontext); /** moal_free_timer */ - mlan_status(*moal_free_timer) (IN t_void * pmoal_handle, - IN t_void * ptimer); + mlan_status (*moal_free_timer) (IN t_void *pmoal_handle, + IN t_void *ptimer); /** moal_start_timer*/ - mlan_status(*moal_start_timer) (IN t_void * pmoal_handle, - IN t_void * ptimer, + mlan_status (*moal_start_timer) (IN t_void *pmoal_handle, + IN t_void *ptimer, IN t_u8 periodic, IN t_u32 msec); /** moal_stop_timer*/ - mlan_status(*moal_stop_timer) (IN t_void * pmoal_handle, - IN t_void * ptimer); + mlan_status (*moal_stop_timer) (IN t_void *pmoal_handle, + IN t_void *ptimer); /** moal_init_lock */ - mlan_status(*moal_init_lock) (IN t_void * pmoal_handle, - OUT t_void ** pplock); + mlan_status (*moal_init_lock) (IN t_void *pmoal_handle, + OUT t_void **pplock); /** moal_free_lock */ - mlan_status(*moal_free_lock) (IN t_void * pmoal_handle, - IN t_void * plock); + mlan_status (*moal_free_lock) (IN t_void *pmoal_handle, + IN t_void *plock); /** moal_spin_lock */ - mlan_status(*moal_spin_lock) (IN t_void * pmoal_handle, - IN t_void * plock); + mlan_status (*moal_spin_lock) (IN t_void *pmoal_handle, + IN t_void *plock); /** moal_spin_unlock */ - mlan_status(*moal_spin_unlock) (IN t_void * pmoal_handle, - IN t_void * plock); + mlan_status (*moal_spin_unlock) (IN t_void *pmoal_handle, + IN t_void *plock); /** moal_print */ - t_void(*moal_print) (IN t_void * pmoal_handle, + t_void (*moal_print) (IN t_void *pmoal_handle, IN t_u32 level, IN char *pformat, IN ... ); /** moal_print_netintf */ - t_void(*moal_print_netintf) (IN t_void * pmoal_handle, + t_void (*moal_print_netintf) (IN t_void *pmoal_handle, IN t_u32 bss_index, IN t_u32 level); /** moal_assert */ - t_void(*moal_assert) (IN t_void * pmoal_handle, IN t_u32 cond); + t_void (*moal_assert) (IN t_void *pmoal_handle, IN t_u32 cond); /** moal_tcp_ack_tx_ind */ - t_void(*moal_tcp_ack_tx_ind) (IN t_void * pmoal_handle, + t_void (*moal_tcp_ack_tx_ind) (IN t_void *pmoal_handle, IN pmlan_buffer pmbuf); + /** moal_hist_data_add */ + t_void (*moal_hist_data_add) (IN t_void *pmoal_handle, + IN t_u32 bss_index, + IN t_s8 rx_rate, + IN t_s8 snr, IN t_s8 nflr, IN t_u8 antenna); + /** moal_peer_mgmt_frame */ + t_void(*moal_peer_mgmt_frame) (IN t_void * pmoal_handle, + IN t_u32 bss_index, + IN t_s8 snr, IN t_s8 nf, IN t_s8 sig_str, + IN mlan_802_11_mac_addr mac); + t_void (*moal_updata_peer_signal) (IN t_void *pmoal_handle, + IN t_u32 bss_index, + IN t_u8 *peer_addr, + IN t_s8 snr, IN t_s8 nflr); } mlan_callbacks, *pmlan_callbacks; /** Interrupt Mode SDIO */ @@ -1085,6 +1121,12 @@ typedef struct _mlan_device { #ifdef SDIO_MULTI_PORT_RX_AGGR /** SDIO MPA Rx */ t_u32 mpa_rx_cfg; +#endif +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + /* see blk_queue_max_segment_size */ + t_u32 max_seg_size; + /* see blk_queue_max_segments */ + t_u16 max_segs; #endif /** Auto deep sleep */ t_u32 auto_ds; @@ -1096,10 +1138,14 @@ typedef struct _mlan_device { /** 802.11d configuration */ t_u32 cfg_11d; #endif + /** FW download CRC check flag */ + t_u32 fw_crc_check; /** enable/disable rx work */ t_u8 rx_work; /** dev cap mask */ t_u32 dev_cap_mask; + /** card type */ + t_u16 card_type; } mlan_device, *pmlan_device; /** MLAN API function prototype */ @@ -1107,48 +1153,55 @@ typedef struct _mlan_device { /** Registration */ MLAN_API mlan_status mlan_register(IN pmlan_device pmdevice, - OUT t_void ** ppmlan_adapter); + OUT t_void **ppmlan_adapter); /** Un-registration */ -MLAN_API mlan_status mlan_unregister(IN t_void * pmlan_adapter); +MLAN_API mlan_status mlan_unregister(IN t_void *pmlan_adapter + ); /** Firmware Downloading */ -MLAN_API mlan_status mlan_dnld_fw(IN t_void * pmlan_adapter, +MLAN_API mlan_status mlan_dnld_fw(IN t_void *pmlan_adapter, IN pmlan_fw_image pmfw); /** Custom data pass API */ -MLAN_API mlan_status mlan_set_init_param(IN t_void * pmlan_adapter, +MLAN_API mlan_status mlan_set_init_param(IN t_void *pmlan_adapter, IN pmlan_init_param pparam); /** Firmware Initialization */ -MLAN_API mlan_status mlan_init_fw(IN t_void * pmlan_adapter); +MLAN_API mlan_status mlan_init_fw(IN t_void *pmlan_adapter + ); /** Firmware Shutdown */ -MLAN_API mlan_status mlan_shutdown_fw(IN t_void * pmlan_adapter); +MLAN_API mlan_status mlan_shutdown_fw(IN t_void *pmlan_adapter + ); /** Main Process */ -MLAN_API mlan_status mlan_main_process(IN t_void * pmlan_adapter); +MLAN_API mlan_status mlan_main_process(IN t_void *pmlan_adapter + ); /** Rx process */ -mlan_status mlan_rx_process(IN t_void * pmlan_adapter); +mlan_status mlan_rx_process(IN t_void *pmlan_adapter + ); /** Packet Transmission */ -MLAN_API mlan_status mlan_send_packet(IN t_void * pmlan_adapter, +MLAN_API mlan_status mlan_send_packet(IN t_void *pmlan_adapter, IN pmlan_buffer pmbuf); /** Packet Reception complete callback */ -MLAN_API mlan_status mlan_recv_packet_complete(IN t_void * pmlan_adapter, +MLAN_API mlan_status mlan_recv_packet_complete(IN t_void *pmlan_adapter, IN pmlan_buffer pmbuf, IN mlan_status status); /** interrupt handler */ -MLAN_API t_void mlan_interrupt(IN t_void * pmlan_adapter); +MLAN_API t_void mlan_interrupt(IN t_void *pmlan_adapter); + +MLAN_API t_void mlan_pm_wakeup_card(IN t_void *pmlan_adapter); /** mlan ioctl */ -MLAN_API mlan_status mlan_ioctl(IN t_void * pmlan_adapter, +MLAN_API mlan_status mlan_ioctl(IN t_void *pmlan_adapter, IN pmlan_ioctl_req pioctl_req); /** mlan select wmm queue */ -MLAN_API t_u8 mlan_select_wmm_queue(IN t_void * pmlan_adapter, +MLAN_API t_u8 mlan_select_wmm_queue(IN t_void *pmlan_adapter, IN t_u8 bss_num, IN t_u8 tid); /** Callback for Probe Request Mgmt frame */ @@ -1157,20 +1210,6 @@ typedef int (*MOAL_PEER_MGMT_FRAME_CB) ( t_s8 snr, t_s8 sig_str, mlan_802_11_mac_addr mac); -/** api to get the histogram data */ -MLAN_API int mlan_hist_data_get( - OUT char *pBuf, - OUT unsigned int *pNumSamples); - -/** api to clear existing histogram data */ -MLAN_API int mlan_hist_data_clear(void); - -/** memcpy implementation for mlan */ -MLAN_API void* mlan_memcpy( - IN void *pDest, - IN void *pSrc, - IN unsigned int count); - /** api to register peer mgmt frame callback function*/ MLAN_API int mlan_register_peer_mac_cb(MOAL_PEER_MGMT_FRAME_CB fn); #endif /* !_MLAN_DECL_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/mlan_ieee.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/mlan_ieee.h old mode 100755 new mode 100644 index c812162c..ec73e61f --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/mlan_ieee.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/mlan_ieee.h @@ -78,12 +78,22 @@ typedef MLAN_PACK_START enum _IEEEtypes_ElementId_e { COUNTRY_INFO = 7, #endif /* STA_SUPPORT */ + POWER_CONSTRAINT = 32, + POWER_CAPABILITY = 33, + TPC_REQUEST = 34, + TPC_REPORT = 35, + CHANNEL_SWITCH_ANN = 37, + QUIET = 40, + IBSS_DFS = 41, + SUPPORTED_CHANNELS = 36, + REGULATORY_CLASS = 59, HT_CAPABILITY = 45, QOS_INFO = 46, HT_OPERATION = 61, BSSCO_2040 = 72, OVERLAPBSSSCANPARAM = 74, EXT_CAPABILITY = 127, + LINK_ID = 101, ERP_INFO = 42, @@ -130,8 +140,7 @@ typedef MLAN_PACK_START struct _IEEEtypes_VendorSpecific_t { IEEEtypes_VendorHeader_t vend_hdr; /** IE Max - size of previous fields */ t_u8 data[IEEE_MAX_IE_SIZE - sizeof(IEEEtypes_VendorHeader_t)]; -} -MLAN_PACK_END IEEEtypes_VendorSpecific_t, *pIEEEtypes_VendorSpecific_t; +} MLAN_PACK_END IEEEtypes_VendorSpecific_t, *pIEEEtypes_VendorSpecific_t; /** IEEE IE */ typedef MLAN_PACK_START struct _IEEEtypes_Generic_t { @@ -139,8 +148,7 @@ typedef MLAN_PACK_START struct _IEEEtypes_Generic_t { IEEEtypes_Header_t ieee_hdr; /** IE Max - size of previous fields */ t_u8 data[IEEE_MAX_IE_SIZE - sizeof(IEEEtypes_Header_t)]; -} -MLAN_PACK_END IEEEtypes_Generic_t, *pIEEEtypes_Generic_t; +} MLAN_PACK_END IEEEtypes_Generic_t, *pIEEEtypes_Generic_t; /** TLV header */ typedef MLAN_PACK_START struct _TLV_Generic_t { @@ -151,8 +159,8 @@ typedef MLAN_PACK_START struct _TLV_Generic_t { } MLAN_PACK_END TLV_Generic_t, *pTLV_Generic_t; /** Capability information mask */ -#define CAPINFO_MASK (~(MBIT(15) | MBIT(14) | \ - MBIT(12) | MBIT(11) | MBIT(9))) +#define CAPINFO_MASK \ +(~(MBIT(15) | MBIT(14) | MBIT(12) | MBIT(11) | MBIT(9))) /** Capability Bit Map*/ #ifdef BIG_ENDIAN_SUPPORT @@ -315,9 +323,21 @@ typedef t_u8 WLAN_802_11_RATES[WLAN_SUPPORTED_RATES]; /** AKM: 8021x */ #define RSN_AKM_8021X 1 /** AKM: PSK */ -#define RSN_AKM_PSK 2 +#define RSN_AKM_PSK 2 /** AKM: PSK SHA256 */ #define RSN_AKM_PSK_SHA256 6 +#if defined(STA_SUPPORT) +/** Pairwise Cipher Suite length */ +#define PAIRWISE_CIPHER_SUITE_LEN 4 +/** AKM Suite length */ +#define AKM_SUITE_LEN 4 +/** MFPC bit in RSN capability */ +#define MFPC_BIT 7 +/** MFPR bit in RSN capability */ +#define MFPR_BIT 6 +/** PMF ORing mask */ +#define PMF_MASK 0x00c0 +#endif /** wpa_suite_t */ typedef MLAN_PACK_START struct _wpa_suite_t { @@ -722,6 +742,20 @@ typedef MLAN_PACK_START struct _IEEEtypes_CountryInfoFullSet_t { #endif /* STA_SUPPORT */ +/** Data structure for Link ID */ +typedef MLAN_PACK_START struct _IEEEtypes_LinkIDElement_t { + /** Element ID */ + t_u8 element_id; + /** Length */ + t_u8 len; + /** bssid */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; + /** initial sta address */ + t_u8 init_sta[MLAN_MAC_ADDR_LENGTH]; + /** respose sta address */ + t_u8 resp_sta[MLAN_MAC_ADDR_LENGTH]; +} MLAN_PACK_END IEEEtypes_LinkIDElement_t, *pIEEEtypes_LinkIDElement_t; + /** HT Capabilities Data */ typedef struct MLAN_PACK_START _HTCap_t { /** HT Capabilities Info field */ @@ -957,8 +991,183 @@ typedef MLAN_PACK_START struct _IEEEtypes_OverlapBSSScanParam_t { } MLAN_PACK_END IEEEtypes_OverlapBSSScanParam_t, *pIEEEtypes_OverlapBSSScanParam_t; +/** Maximum number of subbands in the IEEEtypes_SupportedChannels_t structure */ +#define WLAN_11H_MAX_SUBBANDS 5 + +/** Maximum number of DFS channels configured in IEEEtypes_IBSS_DFS_t */ +#define WLAN_11H_MAX_IBSS_DFS_CHANNELS 25 + +/** IEEE Power Constraint element (7.3.2.15) */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 32 */ + t_u8 len; /**< Element length after id and len */ + t_u8 local_constraint; + /**< Local power constraint applied to 11d + chan info */ +} MLAN_PACK_END IEEEtypes_PowerConstraint_t; + +/** IEEE Power Capability element (7.3.2.16) */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 33 */ + t_u8 len; /**< Element length after id and len */ + t_s8 min_tx_power_capability; + /**< Minimum Transmit power (dBm) */ + t_s8 max_tx_power_capability; + /**< Maximum Transmit power (dBm) */ +} MLAN_PACK_END IEEEtypes_PowerCapability_t; + +/** IEEE TPC Report element (7.3.2.18) */ +typedef MLAN_PACK_START struct { + t_u8 element_id;/**< IEEE Element ID = 35 */ + t_u8 len; /**< Element length after id and len */ + t_s8 tx_power; /**< Max power used to transmit the TPC Report frame (dBm) */ + t_s8 link_margin; + /**< Link margin when TPC Request received (dB) */ +} MLAN_PACK_END IEEEtypes_TPCReport_t; + +/* IEEE Supported Channel sub-band description (7.3.2.19) */ +/** + * Sub-band description used in the supported channels element. + */ +typedef MLAN_PACK_START struct { + t_u8 start_chan;/**< Starting channel in the subband */ + t_u8 num_chans; /**< Number of channels in the subband */ + +} MLAN_PACK_END IEEEtypes_SupportChan_Subband_t; + +/* IEEE Supported Channel element (7.3.2.19) */ +/** + * Sent in association requests. Details the sub-bands and number + * of channels supported in each subband + */ +typedef MLAN_PACK_START struct { + t_u8 element_id;/**< IEEE Element ID = 36 */ + t_u8 len; /**< Element length after id and len */ + + /** Configured sub-bands information in the element */ + IEEEtypes_SupportChan_Subband_t subband[WLAN_11H_MAX_SUBBANDS]; + +} MLAN_PACK_END IEEEtypes_SupportedChannels_t; + +/* IEEE Channel Switch Announcement Element (7.3.2.20) */ +/** + * Provided in beacons and probe responses. Used to advertise when + * and to which channel it is changing to. Only starting STAs in + * an IBSS and APs are allowed to originate a chan switch element. + */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 37 */ + t_u8 len; /**< Element length after id and len */ + t_u8 chan_switch_mode; /**< STA should not transmit any frames if 1 */ + t_u8 new_channel_num; /**< Channel # that AP/IBSS is moving to */ + t_u8 chan_switch_count; /**< # of TBTTs before channel switch */ + +} MLAN_PACK_END IEEEtypes_ChanSwitchAnn_t; + +/* IEEE Quiet Period Element (7.3.2.23) */ +/** + * Provided in beacons and probe responses. Indicates times during + * which the STA should not be transmitting data. Only starting STAs in + * an IBSS and APs are allowed to originate a quiet element. + */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 40 */ + t_u8 len; /**< Element length after id and len */ + t_u8 quiet_count; /**< Number of TBTTs until beacon with the quiet period */ + t_u8 quiet_period; /**< Regular quiet period, # of TBTTS between periods */ + t_u16 quiet_duration; + /**< Duration of the quiet period in TUs */ + t_u16 quiet_offset; /**< Offset in TUs from the TBTT for the quiet period */ + +} MLAN_PACK_END IEEEtypes_Quiet_t; + +/** +*** @brief Map octet of the basic measurement report (7.3.2.22.1) +**/ +typedef MLAN_PACK_START struct { +#ifdef BIG_ENDIAN_SUPPORT + /**< Reserved */ + t_u8 rsvd5_7:3; + /**< Channel is unmeasured */ + t_u8 unmeasured:1; + /**< Radar detected on channel */ + t_u8 radar:1; + /**< Unidentified signal found on channel */ + t_u8 unidentified_sig:1; + /**< OFDM preamble detected on channel */ + t_u8 ofdm_preamble:1; + /**< At least one valid MPDU received on channel */ + t_u8 bss:1; +#else + /**< At least one valid MPDU received on channel */ + t_u8 bss:1; + /**< OFDM preamble detected on channel */ + t_u8 ofdm_preamble:1; + /**< Unidentified signal found on channel */ + t_u8 unidentified_sig:1; + /**< Radar detected on channel */ + t_u8 radar:1; + /**< Channel is unmeasured */ + t_u8 unmeasured:1; + /**< Reserved */ + t_u8 rsvd5_7:3; +#endif /* BIG_ENDIAN_SUPPORT */ + +} MLAN_PACK_END MeasRptBasicMap_t; + +/* IEEE DFS Channel Map field (7.3.2.24) */ +/** + * Used to list supported channels and provide a octet "map" field which + * contains a basic measurement report for that channel in the + * IEEEtypes_IBSS_DFS_t element + */ +typedef MLAN_PACK_START struct { + t_u8 channel_number; /**< Channel number */ + MeasRptBasicMap_t rpt_map; + /**< Basic measurement report for the channel */ + +} MLAN_PACK_END IEEEtypes_ChannelMap_t; + +/* IEEE IBSS DFS Element (7.3.2.24) */ +/** + * IBSS DFS element included in ad hoc beacons and probe responses. + * Provides information regarding the IBSS DFS Owner as well as the + * originating STAs supported channels and basic measurement results. + */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 41 */ + t_u8 len; /**< Element length after id and len */ + t_u8 dfs_owner[MLAN_MAC_ADDR_LENGTH]; + /**< DFS Owner STA Address */ + t_u8 dfs_recovery_interval; /**< DFS Recovery time in TBTTs */ + + /** Variable length map field, one Map entry for each supported channel */ + IEEEtypes_ChannelMap_t channel_map[WLAN_11H_MAX_IBSS_DFS_CHANNELS]; + +} MLAN_PACK_END IEEEtypes_IBSS_DFS_t; + +/* 802.11h BSS information kept for each BSSID received in scan results */ +/** + * IEEE BSS information needed from scan results for later processing in + * join commands + */ +typedef struct { + t_u8 sensed_11h; + /**< Capability bit set or 11h IE found in this BSS */ + + IEEEtypes_PowerConstraint_t power_constraint; + /**< Power Constraint IE */ + IEEEtypes_PowerCapability_t power_capability; + /**< Power Capability IE */ + IEEEtypes_TPCReport_t tpc_report; /**< TPC Report IE */ + IEEEtypes_ChanSwitchAnn_t chan_switch_ann;/**< Channel Switch Announcement IE */ + IEEEtypes_Quiet_t quiet; /**< Quiet IE */ + IEEEtypes_IBSS_DFS_t ibss_dfs; /**< IBSS DFS Element IE */ + +} wlan_11h_bss_info_t; + /** Ethernet packet type for TDLS */ -#define MLAN_ETHER_PKT_TYPE_TDLS_ACTION (0x890D) +#define MLAN_ETHER_PKT_TYPE_TDLS_ACTION (0x890D) /*802.11z TDLS action frame type and strcuct */ typedef MLAN_PACK_START struct { @@ -998,6 +1207,8 @@ typedef MLAN_PACK_START struct { #define TDLS_DISCOVERY_REQUEST 10 /** action code for TDLS discovery response */ #define TDLS_DISCOVERY_RESPONSE 14 +/** category public */ +#define CATEGORY_PUBLIC 4 #ifdef STA_SUPPORT /** Macro for maximum size of scan response buffer */ @@ -1044,6 +1255,24 @@ typedef MLAN_PACK_START struct _wlan_user_scan_chan { t_u32 scan_time; } MLAN_PACK_END wlan_user_scan_chan; +/** channel statictics */ +typedef MLAN_PACK_START struct _ChanStatistics_t { + /** channle number */ + t_u8 chan_num; + /** band info */ + t_u8 bandconfig; + /** flags */ + t_u8 flags; + /** noise */ + t_s8 noise; + /** total network */ + t_u16 total_networks; + /** scan duration */ + t_u16 cca_scan_duration; + /** busy duration */ + t_u16 cca_busy_duration; +} MLAN_PACK_END ChanStatistics_t; + /** * Input structure to configure an immediate scan cmd to firmware * @@ -1090,6 +1319,8 @@ typedef MLAN_PACK_START struct { * Variable number (fixed maximum) of channels to scan up */ wlan_user_scan_chan chan_list[WLAN_USER_SCAN_CHAN_MAX]; + /** scan channel gap */ + t_u16 scan_chan_gap; } MLAN_PACK_END wlan_user_scan_cfg; /** Default scan interval in millisecond*/ @@ -1109,6 +1340,8 @@ typedef MLAN_PACK_START struct { #define BG_SCAN_SSID_MATCH 0x0001 /** ssid match and RSSI exceeded */ #define BG_SCAN_SSID_RSSI_MATCH 0x0004 +/**wait for all channel scan to complete to report scan result*/ +#define BG_SCAN_WAIT_ALL_CHAN_DONE 0x80000000 /** Maximum number of channels that can be sent in bg scan config */ #define WLAN_BG_SCAN_CHAN_MAX 38 @@ -1149,6 +1382,8 @@ typedef MLAN_PACK_START struct { wlan_user_scan_ssid ssid_list[MRVDRV_MAX_SSID_LIST_LENGTH]; /** Variable number (fixed maximum) of channels to scan up */ wlan_user_scan_chan chan_list[WLAN_BG_SCAN_CHAN_MAX]; + /** scan channel gap */ + t_u16 scan_chan_gap; } MLAN_PACK_END wlan_bgscan_cfg; #endif /* STA_SUPPORT */ @@ -1224,6 +1459,9 @@ typedef struct _BSSDescriptor_t { /** WMM IE */ IEEEtypes_WmmParameter_t wmm_ie; + /** 802.11h BSS information */ + wlan_11h_bss_info_t wlan_11h_bss_info; + /** Indicate disabling 11n when associate with AP */ t_u8 disable_11n; /** 802.11n BSS information */ @@ -1267,6 +1505,10 @@ typedef struct _BSSDescriptor_t { /** WAPI IE offset in the beacon buffer */ t_u16 wapi_offset; #endif + /* Hotspot 2.0 OSEN AKM IE */ + IEEEtypes_Generic_t *posen_ie; + /** osen IE offset in the beacon buffer */ + t_u16 osen_offset; /** Pointer to the returned scan response */ t_u8 *pbeacon_buf; diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/mlan_ioctl.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/mlan_ioctl.h old mode 100755 new mode 100644 index 7d9136d1..c1483fa7 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/mlan_ioctl.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/mlan_ioctl.h @@ -81,6 +81,10 @@ enum _mlan_ioctl_req_id { MLAN_OID_SNMP_MIB_RTS_THRESHOLD = 0x00040001, MLAN_OID_SNMP_MIB_FRAG_THRESHOLD = 0x00040002, MLAN_OID_SNMP_MIB_RETRY_COUNT = 0x00040003, +#if defined(UAP_SUPPORT) + MLAN_OID_SNMP_MIB_DOT11D = 0x00040004, + MLAN_OID_SNMP_MIB_DOT11H = 0x00040005, +#endif MLAN_OID_SNMP_MIB_DTIM_PERIOD = 0x00040006, /* Status Information Group */ @@ -101,11 +105,15 @@ enum _mlan_ioctl_req_id { MLAN_OID_SEC_CFG_ENCRYPT_MODE = 0x00060002, MLAN_OID_SEC_CFG_WPA_ENABLED = 0x00060003, MLAN_OID_SEC_CFG_ENCRYPT_KEY = 0x00060004, + MLAN_OID_SEC_CFG_PASSPHRASE = 0x00060005, + MLAN_OID_SEC_CFG_EWPA_ENABLED = 0x00060006, + MLAN_OID_SEC_CFG_ESUPP_MODE = 0x00060007, MLAN_OID_SEC_CFG_WAPI_ENABLED = 0x00060009, MLAN_OID_SEC_CFG_PORT_CTRL_ENABLED = 0x0006000A, #ifdef UAP_SUPPORT MLAN_OID_SEC_CFG_REPORT_MIC_ERR = 0x0006000B, #endif + MLAN_OID_SEC_QUERY_KEY = 0x0006000C, /* Rate Group */ MLAN_IOCTL_RATE = 0x00070000, @@ -161,6 +169,8 @@ enum _mlan_ioctl_req_id { MLAN_OID_11N_CFG_TX_BF_CAP = 0x000C0009, MLAN_OID_11N_CFG_DELBA = 0x000C000C, MLAN_OID_11N_CFG_REJECT_ADDBA_REQ = 0x000C000D, + MLAN_OID_11N_CFG_COEX_RX_WINSIZE = 0x000C000E, + MLAN_OID_11N_CFG_TX_AGGR_CTRL = 0x000C000F, /* 802.11d Configuration Group */ MLAN_IOCTL_11D_CFG = 0x000D0000, @@ -179,6 +189,14 @@ enum _mlan_ioctl_req_id { /* Multi-Radio Configuration Group */ MLAN_IOCTL_MFR_CFG = 0x00100000, + /* 802.11h Configuration Group */ + MLAN_IOCTL_11H_CFG = 0x00110000, + MLAN_OID_11H_CHANNEL_CHECK = 0x00110001, + MLAN_OID_11H_LOCAL_POWER_CONSTRAINT = 0x00110002, +#if defined(DFS_TESTING_SUPPORT) + MLAN_OID_11H_DFS_TESTING = 0x00110003, +#endif + /* Miscellaneous Configuration Group */ MLAN_IOCTL_MISC_CFG = 0x00200000, MLAN_OID_MISC_GEN_IE = 0x00200001, @@ -193,6 +211,7 @@ enum _mlan_ioctl_req_id { MLAN_OID_MISC_WWS = 0x0020000B, MLAN_OID_MISC_ASSOC_RSP = 0x0020000C, MLAN_OID_MISC_INIT_SHUTDOWN = 0x0020000D, + MLAN_OID_MISC_COALESCING_STATUS = 0x0020000E, MLAN_OID_MISC_CUSTOM_IE = 0x0020000F, MLAN_OID_MISC_TDLS_CONFIG = 0x00200010, MLAN_OID_MISC_TX_DATAPAUSE = 0x00200012, @@ -207,6 +226,7 @@ enum _mlan_ioctl_req_id { #ifdef DEBUG_LEVEL1 MLAN_OID_MISC_DRVDBG = 0x0020001B, #endif + MLAN_OID_MISC_HOTSPOT_CFG = 0x0020001C, MLAN_OID_MISC_OTP_USER_DATA = 0x0020001D, MLAN_OID_MISC_TXCONTROL = 0x00200020, #ifdef STA_SUPPORT @@ -215,12 +235,17 @@ enum _mlan_ioctl_req_id { #if defined(STA_SUPPORT) MLAN_OID_MISC_PMFCFG = 0x00200022, #endif + MLAN_OID_MISC_MULTI_CHAN_CFG = 0x00200023, + MLAN_OID_MISC_MULTI_CHAN_POLICY = 0x00200024, #ifdef WIFI_DIRECT_SUPPORT MLAN_OID_MISC_WIFI_DIRECT_CONFIG = 0x00200025, #endif MLAN_OID_MISC_TDLS_OPER = 0x00200026, MLAN_OID_MISC_GET_TDLS_IES = 0x00200027, MLAN_OID_MISC_LOW_PWR_MODE = 0x00200029, +#ifdef RX_PACKET_COALESCE + MLAN_OID_MISC_RX_PACKET_COALESCE = 0x0020002C, +#endif }; /** Sub command size */ @@ -297,6 +322,15 @@ typedef struct _mlan_802_11_ssid { t_u8 ssid[MLAN_MAX_SSID_LENGTH]; } mlan_802_11_ssid, *pmlan_802_11_ssid; +typedef MLAN_PACK_START struct _tx_status_event { + /** packet type */ + t_u8 packet_type; + /** tx_token_id */ + t_u8 tx_token_id; + /** 0--success, 1--fail, 2--watchdogtimeout */ + t_u8 status; +} MLAN_PACK_END tx_status_event; + /** * Sructure to retrieve the scan table */ @@ -339,14 +373,14 @@ typedef struct _wlan_ioctl_get_scan_table_entry { wlan_get_scan_table_fixed fixed_fields; /* - * Probe response or beacon scanned for the BSS. + * Probe response or beacon scanned for the BSS. * - * Field layout: - * - TSF 8 octets - * - Beacon Interval 2 octets - * - Capability Info 2 octets + * Field layout: + * - TSF 8 octets + * - Beacon Interval 2 octets + * - Capability Info 2 octets * - * - IEEE Infomation Elements; variable number & length per 802.11 spec + * - IEEE Infomation Elements; variable number & length per 802.11 spec */ /* t_u8 bss_info_buffer[0]; */ } wlan_ioctl_get_scan_table_entry; @@ -391,6 +425,10 @@ typedef struct _mlan_scan_resp { t_u8 *pscan_table; /* Age in seconds */ t_u32 age_in_secs; + /** channel statstics */ + t_u8 *pchan_stats; + /** Number of records in the chan_stats */ + t_u32 num_in_chan_stats; } mlan_scan_resp, *pmlan_scan_resp; /** Type definition of mlan_scan_cfg */ @@ -455,7 +493,7 @@ enum _mlan_bss_mode { /** Receive multicast packets in multicast list */ #define MLAN_MULTICAST_MODE 2 /** Receive all multicast packets */ -#define MLAN_ALL_MULTI_MODE 4 +#define MLAN_ALL_MULTI_MODE 4 /** Maximum size of multicast list */ #define MLAN_MAX_MULTICAST_LIST_SIZE 32 @@ -471,7 +509,7 @@ typedef struct _mlan_multicast_list { } mlan_multicast_list, *pmlan_multicast_list; /** Max channel */ -#define MLAN_MAX_CHANNEL 14 +#define MLAN_MAX_CHANNEL 165 /** Maximum number of channels in table */ #define MLAN_MAX_CHANNEL_NUM 128 @@ -748,7 +786,7 @@ typedef struct _wmm_parameter_t { /** 5G band */ #define BAND_CONFIG_5G 0x01 /** 2.4 G band */ -#define BAND_CONFIG_2G 0x00 +#define BAND_CONFIG_2G 0x00 /** MAX BG channel */ #define MAX_BG_CHANNEL 14 /** mlan_bss_param @@ -872,7 +910,7 @@ typedef struct _mlan_deauth_param { /** mode: listen */ #define WIFI_DIRECT_MODE_LISTEN 1 /** mode: GO */ -#define WIFI_DIRECT_MODE_GO 2 +#define WIFI_DIRECT_MODE_GO 2 /** mode: client */ #define WIFI_DIRECT_MODE_CLIENT 3 /** mode: find */ @@ -933,7 +971,9 @@ typedef struct _mlan_ds_bss { enum _mlan_band_def { BAND_B = 1, BAND_G = 2, + BAND_A = 4, BAND_GN = 8, + BAND_AN = 16, }; /** NO secondary channel */ @@ -1016,6 +1056,10 @@ typedef struct _mlan_ds_snmp_mib { t_u32 frag_threshold; /** Retry count for MLAN_OID_SNMP_MIB_RETRY_COUNT */ t_u32 retry_count; +#if defined(UAP_SUPPORT) + /** OID value for MLAN_OID_SNMP_MIB_DOT11D/H */ + t_u32 oid_value; +#endif /** DTIM period for MLAN_OID_SNMP_MIB_DTIM_PERIOD */ t_u32 dtim_period; } param; @@ -1029,7 +1073,7 @@ enum _mlan_adhoc_status { ADHOC_IDLE, ADHOC_STARTED, ADHOC_JOINED, - ADHOC_COALESCED + ADHOC_COALESCED, ADHOC_STARTING }; /** Type definition of mlan_ds_get_stats for MLAN_OID_GET_STATS */ @@ -1316,6 +1360,20 @@ typedef struct _tdls_peer_info { t_u8 ht_cap[IEEE_MAX_IE_SIZE]; } tdls_peer_info; +/** max ralist num */ +#define MLAN_MAX_RALIST_NUM 8 +/** ralist info */ +typedef struct _ralist_info { + /** RA list buffer */ + t_u8 ra[MLAN_MAC_ADDR_LENGTH]; + /** total packets in RA list */ + t_u16 total_pkts; + /** tid num */ + t_u8 tid; + /** tx_pause flag */ + t_u8 tx_pause; +} ralist_info; + /** mlan_debug_info data structure for MLAN_OID_GET_DEBUG_INFO */ typedef struct _mlan_debug_info { /* WMM AC_BK count */ @@ -1344,6 +1402,10 @@ typedef struct _mlan_debug_info { t_u32 tdls_peer_num; /** TDLS peer list*/ tdls_peer_info tdls_peer_list[MLAN_MAX_TDLS_PEER_SUPPORTED]; + /** ralist num */ + t_u32 ralist_num; + /** ralist info */ + ralist_info ralist[MLAN_MAX_RALIST_NUM]; /** Corresponds to ps_mode member of mlan_adapter */ t_u16 ps_mode; /** Corresponds to ps_state member of mlan_adapter */ @@ -1390,9 +1452,15 @@ typedef struct _mlan_debug_info { t_u32 num_int_read_failure; /** Last interrupt status */ t_u32 last_int_status; + /** number of interrupt receive */ + t_u32 num_of_irq; + /** FW update port number */ + t_u32 mp_update[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX * 2]; + /** Invalid port update count */ + t_u32 mp_invalid_update; #ifdef SDIO_MULTI_PORT_TX_AGGR /** Number of packets tx aggr */ - t_u32 mpa_tx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT]; + t_u32 mpa_tx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; /** no more packets count*/ t_u32 mpa_sent_last_pkt; /** no write_ports count */ @@ -1408,13 +1476,21 @@ typedef struct _mlan_debug_info { /** last curr_wr_port */ t_u8 last_curr_wr_port[SDIO_MP_DBG_NUM]; /** length info for cmd53 write data */ - t_u16 last_mp_wr_info[SDIO_MP_DBG_NUM * SDIO_MP_AGGR_DEF_PKT_LIMIT]; + t_u16 last_mp_wr_info[SDIO_MP_DBG_NUM * SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; /** last mp_index */ t_u8 last_mp_index; + /** buffer for mp debug */ + t_u8 *mpa_buf; + /** length info for mp buf size */ + t_u32 mpa_buf_size; #endif #ifdef SDIO_MULTI_PORT_RX_AGGR /** Number of packets rx aggr */ - t_u32 mpa_rx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT]; + t_u32 mpa_rx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; +#endif +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + /** mp aggr_pkt limit */ + t_u8 mp_aggr_pkt_limit; #endif /** Number of deauthentication events */ t_u32 num_event_deauth; @@ -1432,6 +1508,8 @@ typedef struct _mlan_debug_info { t_u32 num_tx_timeout; /** Number of command timeouts */ t_u32 num_cmd_timeout; + /** Number of command timeouts */ + t_u32 dbg_num_cmd_timeout; /** Timeout command ID */ t_u16 timeout_cmd_id; /** Timeout command action */ @@ -1556,10 +1634,21 @@ typedef struct _mlan_ds_get_info { enum _mlan_auth_mode { MLAN_AUTH_MODE_OPEN = 0x00, MLAN_AUTH_MODE_SHARED = 0x01, + MLAN_AUTH_MODE_FT = 0x02, MLAN_AUTH_MODE_NETWORKEAP = 0x80, MLAN_AUTH_MODE_AUTO = 0xFF, }; +/**Enumeration for AssocAgent authentication mode, sync from FW.*/ +typedef enum { + AssocAgentAuth_Open, + AssocAgentAuth_Shared, + AssocAgentAuth_FastBss, + AssocAgentAuth_FastBss_Skip, + AssocAgentAuth_Network_EAP, + AssocAgentAuth_Auto, +} AssocAgentAuthType_e; + /** Enumeration for encryption mode */ enum _mlan_encryption_mode { MLAN_ENCRYPTION_MODE_NONE = 0, @@ -1656,6 +1745,51 @@ typedef struct _mlan_pmk_t { t_u8 pmk[MLAN_MAX_KEY_LENGTH]; } mlan_pmk_t; +/** Embedded supplicant RSN type: No RSN */ +#define RSN_TYPE_NO_RSN MBIT(0) +/** Embedded supplicant RSN type: WPA */ +#define RSN_TYPE_WPA MBIT(3) +/** Embedded supplicant RSN type: WPA-NONE */ +#define RSN_TYPE_WPANONE MBIT(4) +/** Embedded supplicant RSN type: WPA2 */ +#define RSN_TYPE_WPA2 MBIT(5) +/** Embedded supplicant RSN type: RFU */ +#define RSN_TYPE_VALID_BITS (RSN_TYPE_NO_RSN | RSN_TYPE_WPA | RSN_TYPE_WPANONE | RSN_TYPE_WPA2) + +/** Embedded supplicant cipher type: TKIP */ +#define EMBED_CIPHER_TKIP MBIT(2) +/** Embedded supplicant cipher type: AES */ +#define EMBED_CIPHER_AES MBIT(3) +/** Embedded supplicant cipher type: RFU */ +#define EMBED_CIPHER_VALID_BITS (EMBED_CIPHER_TKIP | EMBED_CIPHER_AES) + +/** Type definition of mlan_ds_passphrase for MLAN_OID_SEC_CFG_PASSPHRASE */ +typedef struct _mlan_ds_passphrase { + /** SSID may be used */ + mlan_802_11_ssid ssid; + /** BSSID may be used */ + mlan_802_11_mac_addr bssid; + /** Flag for passphrase or pmk used */ + t_u16 psk_type; + /** Passphrase or PMK */ + union { + /** Passphrase */ + mlan_passphrase_t passphrase; + /** PMK */ + mlan_pmk_t pmk; + } psk; +} mlan_ds_passphrase, *pmlan_ds_passphrase; + +/** Type definition of mlan_ds_esupp_mode for MLAN_OID_SEC_CFG_ESUPP_MODE */ +typedef struct _mlan_ds_ewpa_mode { + /** RSN mode */ + t_u32 rsn_mode; + /** Active pairwise cipher */ + t_u32 act_paircipher; + /** Active pairwise cipher */ + t_u32 act_groupcipher; +} mlan_ds_esupp_mode, *pmlan_ds_esupp_mode; + /** Type definition of mlan_ds_sec_cfg for MLAN_IOCTL_SEC_CFG */ typedef struct _mlan_ds_sec_cfg { /** Sub-command */ @@ -1674,6 +1808,14 @@ typedef struct _mlan_ds_sec_cfg { t_u32 port_ctrl_enabled; /** Encryption key for MLAN_OID_SEC_CFG_ENCRYPT_KEY */ mlan_ds_encrypt_key encrypt_key; + /** Passphrase for MLAN_OID_SEC_CFG_PASSPHRASE */ + mlan_ds_passphrase passphrase; + /** Embedded supplicant WPA enabled flag for + * MLAN_OID_SEC_CFG_EWPA_ENABLED + */ + t_u32 ewpa_enabled; + /** Embedded supplicant mode for MLAN_OID_SEC_CFG_ESUPP_MODE */ + mlan_ds_esupp_mode esupp_mode; #ifdef UAP_SUPPORT t_u8 sta_mac[MLAN_MAC_ADDR_LENGTH]; #endif @@ -1778,9 +1920,9 @@ typedef struct _mlan_power_cfg_t { } mlan_power_cfg_t; /** max power table size */ -#define MAX_POWER_TABLE_SIZE 128 +#define MAX_POWER_TABLE_SIZE 128 /** The HT BW40 bit in Tx rate index */ -#define TX_RATE_HT_BW40_BIT MBIT(7) +#define TX_RATE_HT_BW40_BIT MBIT(7) /** Type definition of mlan_power_cfg_ext for MLAN_OID_POWER_CFG_EXT */ typedef struct _mlan_power_cfg_ext { @@ -2053,6 +2195,17 @@ typedef struct _mlan_ds_pm_cfg { } param; } mlan_ds_pm_cfg, *pmlan_ds_pm_cfg; +#ifdef RX_PACKET_COALESCE +typedef struct { + mlan_cmd_result_e cmd_result; /**< Firmware execution result */ + + t_u32 pkt_threshold; + /** Packet threshold */ + t_u16 delay; + /** Timeout value in milliseconds */ +} wlan_ioctl_rx_pkt_coalesce_config_t; +#endif + /*-----------------------------------------------------------------*/ /** WMM Configuration Group */ /*-----------------------------------------------------------------*/ @@ -2163,7 +2316,7 @@ typedef struct { /** Type definition of mlan_ds_wmm_queue_stats * for MLAN_OID_WMM_CFG_QUEUE_STATS */ - mlan_ds_wmm_queue_stats, *pmlan_ds_wmm_queue_stats; +mlan_ds_wmm_queue_stats, *pmlan_ds_wmm_queue_stats; /** * @brief IOCTL sub structure for a specific WMM AC Status @@ -2195,7 +2348,7 @@ typedef struct { /** Type definition of mlan_ds_wmm_queue_status * for MLAN_OID_WMM_CFG_QUEUE_STATUS */ - mlan_ds_wmm_queue_status, *pmlan_ds_wmm_queue_status; +mlan_ds_wmm_queue_status, *pmlan_ds_wmm_queue_status; /** Type definition of mlan_ds_wmm_addts for MLAN_OID_WMM_CFG_ADDTS */ typedef struct _mlan_ds_wmm_addts { @@ -2406,6 +2559,10 @@ typedef struct _mlan_ds_11n_cfg { mlan_ds_11n_delba del_ba; /** Reject Addba Req for MLAN_OID_11N_CFG_REJECT_ADDBA_REQ */ mlan_ds_reject_addba_req reject_addba_req; + /** Control coex RX window size configuration */ + t_u32 coex_rx_winsize; + /** Control TX AMPDU configuration */ + t_u32 txaggrctrl; } param; } mlan_ds_11n_cfg, *pmlan_ds_11n_cfg; @@ -2464,12 +2621,19 @@ typedef struct _mlan_ds_11d_cfg { /*-----------------------------------------------------------------*/ /** Register Memory Access Group */ /*-----------------------------------------------------------------*/ +/** Enumeration for CSU target device type */ +enum _mlan_csu_target_type { + MLAN_CSU_TARGET_CAU = 1, + MLAN_CSU_TARGET_PSU, +}; + /** Enumeration for register type */ enum _mlan_reg_type { MLAN_REG_MAC = 1, MLAN_REG_BBP, MLAN_REG_RF, MLAN_REG_CAU = 5, + MLAN_REG_PSU = 6, }; /** Type definition of mlan_ds_reg_rw for MLAN_OID_REG_RW */ @@ -2522,6 +2686,37 @@ typedef struct _mlan_ds_reg_mem { /** Multi-Radio Configuration Group */ /*-----------------------------------------------------------------*/ +/*-----------------------------------------------------------------*/ +/** 802.11h Configuration Group */ +/*-----------------------------------------------------------------*/ +#if defined(DFS_TESTING_SUPPORT) +/** Type definition of mlan_ds_11h_dfs_testing for MLAN_OID_11H_DFS_TESTING */ +typedef struct _mlan_ds_11h_dfs_testing { + /** User-configured CAC period in milliseconds, 0 to use default */ + t_u16 usr_cac_period_msec; + /** User-configured NOP period in seconds, 0 to use default */ + t_u16 usr_nop_period_sec; + /** User-configured skip channel change, 0 to disable */ + t_u8 usr_no_chan_change; + /** User-configured fixed channel to change to, 0 to use random channel */ + t_u8 usr_fixed_new_chan; +} mlan_ds_11h_dfs_testing, *pmlan_ds_11h_dfs_testing; +#endif + +/** Type definition of mlan_ds_11h_cfg for MLAN_IOCTL_11H_CFG */ +typedef struct _mlan_ds_11h_cfg { + /** Sub-command */ + t_u32 sub_command; + union { + /** Local power constraint for MLAN_OID_11H_LOCAL_POWER_CONSTRAINT */ + t_s8 usr_local_power_constraint; +#if defined(DFS_TESTING_SUPPORT) + /** User-configuation for MLAN_OID_11H_DFS_TESTING */ + mlan_ds_11h_dfs_testing dfs_testing; +#endif + } param; +} mlan_ds_11h_cfg, *pmlan_ds_11h_cfg; + /*-----------------------------------------------------------------*/ /** Miscellaneous Configuration Group */ /*-----------------------------------------------------------------*/ @@ -2537,6 +2732,9 @@ typedef struct _mlan_ds_reg_mem { /** Enumeration for IE type */ enum _mlan_ie_type { MLAN_IE_TYPE_GEN_IE = 0, +#ifdef STA_SUPPORT + MLAN_IE_TYPE_ARP_FILTER, +#endif /* STA_SUPPORT */ }; /** Type definition of mlan_ds_misc_gen_ie for MLAN_OID_MISC_GEN_IE */ @@ -2614,6 +2812,12 @@ enum _mlan_func_cmd { MLAN_FUNC_SHUTDOWN, }; +/** Enumeration for Coalescing status */ +enum _mlan_coal_status { + MLAN_MISC_COALESCING_ENABLE = 1, + MLAN_MISC_COALESCING_DISABLE = 0 +}; + /** Type definition of mlan_ds_misc_tx_datapause * for MLAN_OID_MISC_TX_DATAPAUSE */ @@ -2634,6 +2838,8 @@ typedef struct _mlan_ds_misc_tx_datapause { #define IPADDR_TYPE_IPV4 (1) /** IP operation remove */ #define MLAN_IPADDR_OP_IP_REMOVE (0) +/** IP operation ARP filter */ +#define MLAN_IPADDR_OP_ARP_FILTER MBIT(0) /** IP operation ARP response */ #define MLAN_IPADDR_OP_AUTO_ARP_RESP MBIT(1) @@ -2690,31 +2896,31 @@ typedef struct _mlan_ds_misc_country_code { /** action for clear */ #define SUBSCRIBE_EVT_ACT_BITWISE_CLR 0x0003 /** BITMAP for subscribe event rssi low */ -#define SUBSCRIBE_EVT_RSSI_LOW MBIT(0) +#define SUBSCRIBE_EVT_RSSI_LOW MBIT(0) /** BITMAP for subscribe event snr low */ -#define SUBSCRIBE_EVT_SNR_LOW MBIT(1) +#define SUBSCRIBE_EVT_SNR_LOW MBIT(1) /** BITMAP for subscribe event max fail */ -#define SUBSCRIBE_EVT_MAX_FAIL MBIT(2) +#define SUBSCRIBE_EVT_MAX_FAIL MBIT(2) /** BITMAP for subscribe event beacon missed */ -#define SUBSCRIBE_EVT_BEACON_MISSED MBIT(3) +#define SUBSCRIBE_EVT_BEACON_MISSED MBIT(3) /** BITMAP for subscribe event rssi high */ -#define SUBSCRIBE_EVT_RSSI_HIGH MBIT(4) +#define SUBSCRIBE_EVT_RSSI_HIGH MBIT(4) /** BITMAP for subscribe event snr high */ -#define SUBSCRIBE_EVT_SNR_HIGH MBIT(5) +#define SUBSCRIBE_EVT_SNR_HIGH MBIT(5) /** BITMAP for subscribe event data rssi low */ -#define SUBSCRIBE_EVT_DATA_RSSI_LOW MBIT(6) +#define SUBSCRIBE_EVT_DATA_RSSI_LOW MBIT(6) /** BITMAP for subscribe event data snr low */ -#define SUBSCRIBE_EVT_DATA_SNR_LOW MBIT(7) +#define SUBSCRIBE_EVT_DATA_SNR_LOW MBIT(7) /** BITMAP for subscribe event data rssi high */ -#define SUBSCRIBE_EVT_DATA_RSSI_HIGH MBIT(8) +#define SUBSCRIBE_EVT_DATA_RSSI_HIGH MBIT(8) /** BITMAP for subscribe event data snr high */ -#define SUBSCRIBE_EVT_DATA_SNR_HIGH MBIT(9) +#define SUBSCRIBE_EVT_DATA_SNR_HIGH MBIT(9) /** BITMAP for subscribe event link quality */ -#define SUBSCRIBE_EVT_LINK_QUALITY MBIT(10) +#define SUBSCRIBE_EVT_LINK_QUALITY MBIT(10) /** BITMAP for subscribe event pre_beacon_lost */ -#define SUBSCRIBE_EVT_PRE_BEACON_LOST MBIT(11) +#define SUBSCRIBE_EVT_PRE_BEACON_LOST MBIT(11) /** default PRE_BEACON_MISS_COUNT */ -#define DEFAULT_PRE_BEACON_MISS 30 +#define DEFAULT_PRE_BEACON_MISS 30 /** Type definition of mlan_ds_subscribe_evt for MLAN_OID_MISC_CFP_CODE */ typedef struct _mlan_ds_subscribe_evt { @@ -2841,6 +3047,26 @@ typedef struct _mlan_ds_wifi_direct_config { } mlan_ds_wifi_direct_config; #endif +#if defined(STA_SUPPORT) +typedef struct _mlan_ds_misc_pmfcfg { + /** Management Frame Protection Capable */ + t_u8 mfpc; + /** Management Frame Protection Required */ + t_u8 mfpr; +} mlan_ds_misc_pmfcfg; +#endif + +typedef MLAN_PACK_START struct _mlan_ds_multi_chan_cfg { + /** Channel Time */ + t_u32 channel_time; + /** Buffer Weight */ + t_u8 buffer_weight; + /** tlv len */ + t_u16 tlv_len; + /** TLV buffer */ + t_u8 tlv_buf[0]; +} MLAN_PACK_END mlan_ds_multi_chan_cfg; + /**Action ID for TDLS disable link*/ #define WLAN_TDLS_DISABLE_LINK 0x00 /**Action ID for TDLS enable link*/ @@ -2857,7 +3083,7 @@ typedef struct _mlan_ds_misc_tdls_oper { t_u16 tdls_action; /** TDLS peer address */ t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; - /** peer capability */ + /** peer capability */ t_u16 capability; /** peer qos info */ t_u8 qos_info; @@ -2879,6 +3105,8 @@ typedef struct _mlan_ds_misc_tdls_oper { #define TDLS_IE_FLAGS_HTCAP 0x0002 /** flag for TDLS HTINFO */ #define TDLS_IE_FLAGS_HTINFO 0x0004 +/** flag for TDLS Supported channels and regulatory class IE*/ +#define TDLS_IE_FLAGS_SUPP_CS_IE 0x0040 /** TDLS ie buffer */ typedef struct _mlan_ds_misc_tdls_ies { @@ -2894,6 +3122,15 @@ typedef struct _mlan_ds_misc_tdls_ies { t_u8 ht_info[IEEE_MAX_IE_SIZE]; } mlan_ds_misc_tdls_ies; +#ifdef RX_PACKET_COALESCE +typedef struct _mlan_ds_misc_rx_packet_coalesce { + /** packet threshold */ + t_u32 packet_threshold; + /** timeout value */ + t_u16 delay; +} mlan_ds_misc_rx_packet_coalesce; +#endif + /** Type definition of mlan_ds_misc_cfg for MLAN_IOCTL_MISC_CFG */ typedef struct _mlan_ds_misc_cfg { /** Sub-command */ @@ -2918,6 +3155,8 @@ typedef struct _mlan_ds_misc_cfg { mlan_ds_misc_assoc_rsp assoc_resp; /** Function init/shutdown for MLAN_OID_MISC_INIT_SHUTDOWN */ t_u32 func_init_shutdown; + /** Coalescing status for MLAN_OID_MISC_COALESCING_STATUS */ + t_u16 coalescing_status; /** Custom IE for MLAN_OID_MISC_CUSTOM_IE */ mlan_ds_misc_custom_ie cust_ie; /** TDLS configuration for MLAN_OID_MISC_TDLS_CONFIG */ @@ -2948,17 +3187,35 @@ typedef struct _mlan_ds_misc_cfg { /** Driver debug bit masks */ t_u32 drvdbg; #endif + /** Hotspot config param set */ + t_u32 hotspot_cfg; #ifdef STA_SUPPORT t_u8 ext_cap[8]; #endif mlan_ds_misc_otp_user_data otp_user_data; /** Tx control */ t_u32 tx_control; +#if defined(STA_SUPPORT) + mlan_ds_misc_pmfcfg pmfcfg; +#endif + /** Multi-channel config for MLAN_OID_MISC_MULTI_CHAN_CFG */ + mlan_ds_multi_chan_cfg multi_chan_cfg; + /** Multi-channel policy for MLAN_OID_MISC_MULTI_CHAN_POLICY */ + t_u16 multi_chan_policy; #ifdef WIFI_DIRECT_SUPPORT mlan_ds_wifi_direct_config p2p_config; #endif t_u8 low_pwr_mode; +#ifdef RX_PACKET_COALESCE + mlan_ds_misc_rx_packet_coalesce rx_coalesce; +#endif } param; } mlan_ds_misc_cfg, *pmlan_ds_misc_cfg; +/** Hotspot status enable */ +#define HOTSPOT_ENABLED MBIT(0) +/** Hotspot status disable */ +#define HOTSPOT_DISABLED MFALSE +/** Keep Hotspot2.0 compatible in mwu and wpa_supplicant */ +#define HOTSPOT_BY_SUPPLICANT MBIT(1) #endif /* !_MLAN_IOCTL_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_cfg80211.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_cfg80211.c old mode 100755 new mode 100644 index a644bd65..5178cb24 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_cfg80211.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_cfg80211.c @@ -155,6 +155,162 @@ extern const struct net_device_ops woal_netdev_ops; /******************************************************** Global Functions ********************************************************/ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) +/**marvell vendor command and event*/ +#define MRVL_VENDOR_ID 0x005043 +/** vendor events */ +const struct nl80211_vendor_cmd_info vendor_events[] = { + {.vendor_id = MRVL_VENDOR_ID,.subcmd = event_hang,}, /* event_id 0 */ + /**add vendor event here*/ +}; + +/** + * @brief get the event id of the events array + * + * @param event vendor event + * + * @return index of events array + */ +int +woal_get_event_id(int event) +{ + int i = 0; + + for (i = 0; i < ARRAY_SIZE(vendor_events); i++) { + if (vendor_events[i].subcmd == event) + return i; + } + + return event_max; +} + +/** + * @brief send vendor event to kernel + * + * @param priv A pointer to moal_private + * @param event vendor event + * @param data a pointer to data + * @param len data length + * + * @return 0: success 1: fail + */ +int +woal_cfg80211_vendor_event(IN moal_private *priv, + IN int event, IN t_u8 *data, IN int len) +{ + struct wiphy *wiphy = priv->wdev->wiphy; + struct sk_buff *skb = NULL; + int event_id = 0; + t_u8 *pos = NULL; + int ret = 0; + + ENTER(); + + PRINTM(MEVENT, "vendor event :0x%x\n", event); + event_id = woal_get_event_id(event); + if (event_max == event_id) { + PRINTM(MERROR, "Not find this event %d \n", event_id); + ret = 1; + LEAVE(); + return ret; + } + + /**allocate skb*/ + skb = cfg80211_vendor_event_alloc(wiphy, len, event_id, GFP_KERNEL); + if (!skb) { + PRINTM(MERROR, "allocate memory fail for vendor event\n"); + ret = 1; + LEAVE(); + return ret; + } + pos = skb_put(skb, len); + memcpy(pos, data, len); + /**send event*/ + cfg80211_vendor_event(skb, GFP_KERNEL); + + LEAVE(); + return ret; +} + +/** + * @brief vendor command to set drvdbg + * + * @param wiphy A pointer to wiphy struct + * @param wdev A pointer to wireless_dev struct + * @param data a pointer to data + * @param len data length + * + * @return 0: success 1: fail + */ +static int +woal_cfg80211_subcmd_set_drvdbg(struct wiphy *wiphy, + struct wireless_dev *wdev, + const void *data, int data_len) +{ + struct net_device *dev = wdev->netdev; + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + struct sk_buff *skb = NULL; + t_u8 *pos = NULL; + int ret = 0; + + ENTER(); + /**handle this sub command*/ + DBG_HEXDUMP(MCMD_D, "Vendor drvdbg", (t_u8 *)data, data_len); + + if (data_len) { + /* Get the driver debug bit masks from user */ + drvdbg = *((t_u32 *)data); + PRINTM(MIOCTL, "new drvdbg %x\n", drvdbg); + /* Set the driver debug bit masks into mlan */ + if (woal_set_drvdbg(priv, drvdbg)) { + PRINTM(MERROR, "Set drvdbg failed!\n"); + ret = 1; + } + } + /** Allocate skb for cmd reply*/ + skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, sizeof(drvdbg)); + if (!skb) { + PRINTM(MERROR, "allocate memory fail for vendor cmd\n"); + ret = 1; + LEAVE(); + return ret; + } + pos = skb_put(skb, sizeof(drvdbg)); + memcpy(pos, &drvdbg, sizeof(drvdbg)); + ret = cfg80211_vendor_cmd_reply(skb); + LEAVE(); + return ret; +} + +const struct wiphy_vendor_command vendor_commands[] = { + { + .info = {.vendor_id = MRVL_VENDOR_ID,.subcmd = sub_cmd_set_drvdbg,}, + .flags = WIPHY_VENDOR_CMD_NEED_WDEV | + WIPHY_VENDOR_CMD_NEED_NETDEV | WIPHY_VENDOR_CMD_NEED_RUNNING, + .doit = woal_cfg80211_subcmd_set_drvdbg, + }, + +}; + +/** + * @brief register vendor commands and events + * + * @param wiphy A pointer to wiphy struct + * + * @return + */ +void +woal_register_cfg80211_vendor_command(struct wiphy *wiphy) +{ + ENTER(); + wiphy->vendor_commands = vendor_commands; + wiphy->n_vendor_commands = ARRAY_SIZE(vendor_commands); + wiphy->vendor_events = vendor_events; + wiphy->n_vendor_events = ARRAY_SIZE(vendor_events); + LEAVE(); +} +#endif + /** * @brief Get the private structure from wiphy * @@ -190,7 +346,7 @@ woal_get_netdev_priv(struct net_device *dev) * @return MTRUE/MFALSE; */ t_u8 -woal_is_any_interface_active(moal_handle * handle) +woal_is_any_interface_active(moal_handle *handle) { int i; for (i = 0; i < handle->priv_num; i++) { @@ -218,7 +374,7 @@ woal_is_any_interface_active(moal_handle * handle) * @return channel frequency */ int -woal_get_active_intf_freq(moal_private * priv) +woal_get_active_intf_freq(moal_private *priv) { moal_handle *handle = priv->phandle; int i; @@ -285,6 +441,11 @@ woal_band_cfg_to_ieee_band(t_u32 band) ENTER(); switch (band) { + case BAND_A: + case BAND_AN: + case BAND_A | BAND_AN: + ret_radio_type = IEEE80211_BAND_5GHZ; + break; case BAND_B: case BAND_G: case BAND_B | BAND_G: @@ -312,14 +473,15 @@ woal_band_cfg_to_ieee_band(t_u32 band) * @param key_index Key index * @param addr Mac for which key is to be set * @param disable Key disabled or not + * @param wait_option wait option * * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_cfg80211_set_key(moal_private * priv, t_u8 is_enable_wep, - t_u32 cipher, const t_u8 * key, int key_len, - const t_u8 * seq, int seq_len, t_u8 key_index, - const t_u8 * addr, int disable) +woal_cfg80211_set_key(moal_private *priv, t_u8 is_enable_wep, + t_u32 cipher, const t_u8 *key, int key_len, + const t_u8 *seq, int seq_len, t_u8 key_index, + const t_u8 *addr, int disable, t_u8 wait_option) { mlan_ioctl_req *req = NULL; mlan_ds_sec_cfg *sec = NULL; @@ -361,7 +523,7 @@ woal_cfg80211_set_key(moal_private * priv, t_u8 is_enable_wep, } /* Fill request buffer */ - sec = (mlan_ds_sec_cfg *) req->pbuf; + sec = (mlan_ds_sec_cfg *)req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; req->req_id = MLAN_IOCTL_SEC_CFG; req->action = MLAN_ACT_SET; @@ -400,7 +562,7 @@ woal_cfg80211_set_key(moal_private * priv, t_u8 is_enable_wep, if (0 == memcmp(sec->param.encrypt_key.mac_addr, bcast_addr, ETH_ALEN)) - sec->param.encrypt_key.key_flags = + sec->param.encrypt_key.key_flags = KEY_FLAG_GROUP_KEY; else sec->param.encrypt_key.key_flags = @@ -433,7 +595,7 @@ woal_cfg80211_set_key(moal_private * priv, t_u8 is_enable_wep, } /* Send IOCTL request to MLAN */ - ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + ret = woal_request_ioctl(priv, req, wait_option); done: if (ret != MLAN_STATUS_PENDING) @@ -449,12 +611,13 @@ woal_cfg80211_set_key(moal_private * priv, t_u8 is_enable_wep, * @param key A pointer to key data * @param key_len Length of the key data * @param index Key index + * @param wait_option wait_option * * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -woal_cfg80211_set_wep_keys(moal_private * priv, const t_u8 * key, int key_len, - t_u8 index) +woal_cfg80211_set_wep_keys(moal_private *priv, const t_u8 *key, int key_len, + t_u8 index, t_u8 wait_option) { mlan_status ret = MLAN_STATUS_SUCCESS; t_u32 cipher = 0; @@ -467,12 +630,12 @@ woal_cfg80211_set_wep_keys(moal_private * priv, const t_u8 * key, int key_len, else cipher = WLAN_CIPHER_SUITE_WEP104; ret = woal_cfg80211_set_key(priv, 0, cipher, key, key_len, NULL, - 0, index, NULL, 0); + 0, index, NULL, 0, wait_option); } else { /* No key provided so it is enable key. We want to just set the transmit key index */ woal_cfg80211_set_key(priv, 1, cipher, key, key_len, NULL, 0, - index, NULL, 0); + index, NULL, 0, wait_option); } LEAVE(); @@ -483,17 +646,19 @@ woal_cfg80211_set_wep_keys(moal_private * priv, const t_u8 * key, int key_len, * @brief clear all mgmt ies * * @param priv A pointer to moal private structure + * @param wait_option wait_option * @return N/A */ void -woal_clear_all_mgmt_ies(moal_private * priv) +woal_clear_all_mgmt_ies(moal_private *priv, t_u8 wait_option) { t_u16 mask = 0; /* clear BEACON WPS/P2P IE */ if (priv->beacon_wps_index != MLAN_CUSTOM_IE_AUTO_IDX_MASK) { PRINTM(MCMND, "Clear BEACON WPS ie\n"); woal_cfg80211_mgmt_frame_ie(priv, NULL, 0, NULL, 0, NULL, 0, - NULL, 0, MGMT_MASK_BEACON_WPS_P2P); + NULL, 0, MGMT_MASK_BEACON_WPS_P2P, + wait_option); } /* clear mgmt frame ies */ if (priv->probereq_index != MLAN_CUSTOM_IE_AUTO_IDX_MASK) @@ -509,7 +674,7 @@ woal_clear_all_mgmt_ies(moal_private * priv) priv->beacon_index, priv->probereq_index, priv->proberesp_index, priv->assocresp_index); woal_cfg80211_mgmt_frame_ie(priv, NULL, 0, NULL, 0, NULL, 0, - NULL, 0, mask); + NULL, 0, mask, wait_option); } } @@ -524,7 +689,7 @@ woal_clear_all_mgmt_ies(moal_private * priv) * @return 0 -- success, otherwise fail */ int -woal_cfg80211_bss_role_cfg(moal_private * priv, t_u16 action, t_u8 * bss_role) +woal_cfg80211_bss_role_cfg(moal_private *priv, t_u16 action, t_u8 *bss_role) { int ret = 0; @@ -545,7 +710,7 @@ woal_cfg80211_bss_role_cfg(moal_private * priv, t_u16 action, t_u8 * bss_role) /* set back the mac address */ woal_request_set_mac_address(priv); /* clear the mgmt ies */ - woal_clear_all_mgmt_ies(priv); + woal_clear_all_mgmt_ies(priv, MOAL_IOCTL_WAIT); /* Initialize private structures */ woal_init_priv(priv, MOAL_IOCTL_WAIT); @@ -573,7 +738,7 @@ woal_cfg80211_bss_role_cfg(moal_private * priv, t_u16 action, t_u8 * bss_role) * @return N/A */ void -woal_cfg80211_display_p2p_actframe(const t_u8 * buf, int len, +woal_cfg80211_display_p2p_actframe(const t_u8 *buf, int len, struct ieee80211_channel *chan, const t_u8 flag) { @@ -667,7 +832,7 @@ woal_cfg80211_display_p2p_actframe(const t_u8 * buf, int len, * @return 0 -- success, otherwise fail */ int -woal_cfg80211_init_p2p_client(moal_private * priv) +woal_cfg80211_init_p2p_client(moal_private *priv) { int ret = MLAN_STATUS_SUCCESS; t_u16 wifi_direct_mode = WIFI_DIRECT_MODE_DISABLE; @@ -733,11 +898,13 @@ woal_cfg80211_init_p2p_client(moal_private * priv) * @return 0 -- success, otherwise fail */ int -woal_cfg80211_init_p2p_go(moal_private * priv) +woal_cfg80211_init_p2p_go(moal_private *priv) { int ret = MLAN_STATUS_SUCCESS; t_u16 wifi_direct_mode; t_u8 bss_role; + mlan_ds_wifi_direct_config p2p_config; + mlan_ds_ps_mgmt ps_mgmt; ENTER(); @@ -786,6 +953,25 @@ woal_cfg80211_init_p2p_go(moal_private * priv) goto done; } } +/* NoA:-- Interval = 100TUs and Duration= 50TUs, count=255*/ +#define DEF_NOA_COUNT 255 + if (priv->phandle->noa_duration && priv->phandle->card_info->go_noa) { + memset(&p2p_config, 0, sizeof(p2p_config)); + p2p_config.noa_enable = MTRUE; + p2p_config.index = 0; + p2p_config.noa_count = DEF_NOA_COUNT; + p2p_config.noa_duration = priv->phandle->noa_duration; + p2p_config.noa_interval = priv->phandle->noa_interval; + p2p_config.flags = WIFI_DIRECT_NOA; + woal_p2p_config(priv, MLAN_ACT_SET, &p2p_config); + memset(&ps_mgmt, 0, sizeof(ps_mgmt)); + ps_mgmt.flags = PS_FLAG_PS_MODE; + ps_mgmt.ps_mode = PS_MODE_INACTIVITY; + woal_set_get_uap_power_mode(priv, MLAN_ACT_SET, &ps_mgmt); + PRINTM(MMSG, "Enable NOA: duration=%d, interval=%d\n", + priv->phandle->noa_duration, + priv->phandle->noa_interval); + } done: LEAVE(); return ret; @@ -799,13 +985,14 @@ woal_cfg80211_init_p2p_go(moal_private * priv) * @return 0 -- success, otherwise fail */ int -woal_cfg80211_deinit_p2p(moal_private * priv) +woal_cfg80211_deinit_p2p(moal_private *priv) { int ret = MLAN_STATUS_SUCCESS; t_u16 wifi_direct_mode; t_u8 bss_role; t_u8 channel_status; moal_private *remain_priv = NULL; + mlan_ds_ps_mgmt ps_mgmt; ENTER(); @@ -815,7 +1002,6 @@ woal_cfg80211_deinit_p2p(moal_private * priv) ret = -EFAULT; goto done; } - /* cancel previous remain on channel */ if (priv->phandle->remain_on_channel) { remain_priv = @@ -870,6 +1056,10 @@ woal_cfg80211_deinit_p2p(moal_private * priv) /* reset bss role */ if (bss_role != MLAN_BSS_ROLE_STA) { + memset(&ps_mgmt, 0, sizeof(ps_mgmt)); + ps_mgmt.flags = PS_FLAG_PS_MODE; + ps_mgmt.ps_mode = PS_MODE_DISABLE; + woal_set_get_uap_power_mode(priv, MLAN_ACT_SET, &ps_mgmt); bss_role = MLAN_BSS_ROLE_STA; if (MLAN_STATUS_SUCCESS != woal_cfg80211_bss_role_cfg(priv, MLAN_ACT_SET, &bss_role)) { @@ -905,11 +1095,11 @@ woal_cfg80211_deinit_p2p(moal_private * priv) int woal_cfg80211_change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, - enum nl80211_iftype type, u32 * flags, + enum nl80211_iftype type, u32 *flags, struct vif_params *params) { int ret = 0; - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); mlan_ds_bss *bss = NULL; mlan_ioctl_req *req = NULL; #if defined(STA_SUPPORT) && defined(UAP_SUPPORT) @@ -989,7 +1179,7 @@ woal_cfg80211_change_virtual_intf(struct wiphy *wiphy, goto done; } - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_BSS_MODE; req->req_id = MLAN_IOCTL_BSS; req->action = MLAN_ACT_SET; @@ -1083,7 +1273,8 @@ woal_cfg80211_change_virtual_intf(struct wiphy *wiphy, MLAN_CUSTOM_IE_AUTO_IDX_MASK) woal_cfg80211_mgmt_frame_ie(priv, NULL, 0, NULL, 0, NULL, 0, NULL, 0, - MGMT_MASK_PROBE_REQ); + MGMT_MASK_PROBE_REQ, + MOAL_IOCTL_WAIT); bss_role = MLAN_BSS_ROLE_UAP; woal_cfg80211_bss_role_cfg(priv, MLAN_ACT_SET, &bss_role); @@ -1137,7 +1328,7 @@ int woal_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed) { moal_private *priv = NULL; - moal_handle *handle = (moal_handle *) woal_get_wiphy_priv(wiphy); + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); #ifdef UAP_CFG80211 #ifdef UAP_SUPPORT mlan_uap_bss_param sys_cfg; @@ -1240,15 +1431,14 @@ woal_cfg80211_add_key(struct wiphy *wiphy, struct net_device *netdev, #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) || defined(COMPAT_WIRELESS) bool pairwise, #endif - const t_u8 * mac_addr, struct key_params *params) + const t_u8 *mac_addr, struct key_params *params) { - moal_private *priv = (moal_private *) woal_get_netdev_priv(netdev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(netdev); ENTER(); - if (woal_cfg80211_set_key(priv, 0, params->cipher, params->key, params->key_len, params->seq, params->seq_len, - key_index, mac_addr, 0)) { + key_index, mac_addr, 0, MOAL_IOCTL_WAIT)) { PRINTM(MERROR, "Error adding the crypto keys\n"); LEAVE(); return -EFAULT; @@ -1290,9 +1480,9 @@ woal_cfg80211_del_key(struct wiphy *wiphy, struct net_device *netdev, #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) || defined(COMPAT_WIRELESS) bool pairwise, #endif - const t_u8 * mac_addr) + const t_u8 *mac_addr) { - moal_private *priv = (moal_private *) woal_get_netdev_priv(netdev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(netdev); ENTER(); priv->phandle->driver_state = woal_check_driver_status(priv->phandle); @@ -1303,8 +1493,9 @@ woal_cfg80211_del_key(struct wiphy *wiphy, struct net_device *netdev, return 0; } - if (woal_cfg80211_set_key(priv, 0, 0, NULL, 0, NULL, 0, key_index, - mac_addr, 1)) { + if (MLAN_STATUS_FAILURE == + woal_cfg80211_set_key(priv, 0, 0, NULL, 0, NULL, 0, key_index, + mac_addr, 1, MOAL_NO_WAIT)) { PRINTM(MERROR, "Error deleting the crypto keys\n"); LEAVE(); return -EFAULT; @@ -1347,7 +1538,7 @@ woal_cfg80211_set_default_key(struct wiphy *wiphy, ) { int ret = 0; - moal_private *priv = (moal_private *) woal_get_netdev_priv(netdev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(netdev); mlan_bss_info bss_info; ENTER(); @@ -1359,13 +1550,25 @@ woal_cfg80211_set_default_key(struct wiphy *wiphy, } } if (MLAN_STATUS_SUCCESS != - woal_cfg80211_set_wep_keys(priv, NULL, 0, key_index)) { + woal_cfg80211_set_wep_keys(priv, NULL, 0, key_index, + MOAL_IOCTL_WAIT)) { ret = -EFAULT; } LEAVE(); return ret; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30) || defined(COMPAT_WIRELESS) +int +woal_cfg80211_set_default_mgmt_key(struct wiphy *wiphy, + struct net_device *netdev, t_u8 key_index) +{ + PRINTM(MINFO, "set default mgmt key, key index=%d\n", key_index); + + return 0; +} +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 5, 0) #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 34) || defined(COMPAT_WIRELESS) /** @@ -1409,8 +1612,7 @@ woal_cfg80211_set_channel(struct wiphy *wiphy, #endif #endif if (!priv) { - moal_handle *handle = - (moal_handle *) woal_get_wiphy_priv(wiphy); + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); if (handle) priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY); } @@ -1425,7 +1627,8 @@ woal_cfg80211_set_channel(struct wiphy *wiphy, LEAVE(); return -EINVAL; } - ret = woal_set_rf_channel(priv, chan, channel_type); + ret = woal_set_rf_channel(priv, chan, channel_type, + MOAL_IOCTL_WAIT); } #endif #endif @@ -1452,12 +1655,12 @@ woal_cfg80211_set_channel(struct wiphy *wiphy, int woal_cfg80211_set_bitrate_mask(struct wiphy *wiphy, struct net_device *dev, - const u8 * peer, + const u8 *peer, const struct cfg80211_bitrate_mask *mask) { int ret = 0; mlan_status status = MLAN_STATUS_SUCCESS; - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); mlan_bss_info bss_info; enum ieee80211_band band; mlan_ioctl_req *req = NULL; @@ -1482,7 +1685,7 @@ woal_cfg80211_set_bitrate_mask(struct wiphy *wiphy, ret = -ENOMEM; goto done; } - rate = (mlan_ds_rate *) req->pbuf; + rate = (mlan_ds_rate *)req->pbuf; rate_cfg = &rate->param.rate_cfg; rate->sub_command = MLAN_OID_RATE_CFG; req->req_id = MLAN_IOCTL_RATE; @@ -1502,7 +1705,11 @@ woal_cfg80211_set_bitrate_mask(struct wiphy *wiphy, #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) /* Fill MCS rates */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) + rate_cfg->bitmap_rates[2] = mask->control[band].ht_mcs[0]; +#else rate_cfg->bitmap_rates[2] = mask->control[band].mcs[0]; +#endif #endif status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); @@ -1531,7 +1738,7 @@ woal_cfg80211_set_bitrate_mask(struct wiphy *wiphy, int woal_cfg80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant) { - moal_handle *handle = (moal_handle *) woal_get_wiphy_priv(wiphy); + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); moal_private *priv = NULL; mlan_ds_radio_cfg *radio = NULL; mlan_ioctl_req *req = NULL; @@ -1556,7 +1763,7 @@ woal_cfg80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant) ret = -ENOMEM; goto done; } - radio = (mlan_ds_radio_cfg *) req->pbuf; + radio = (mlan_ds_radio_cfg *)req->pbuf; radio->sub_command = MLAN_OID_ANT_CFG; req->req_id = MLAN_IOCTL_RADIO_CFG; req->action = MLAN_ACT_SET; @@ -1614,7 +1821,7 @@ woal_cfg80211_mgmt_frame_register(struct wiphy *wiphy, #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) struct net_device *dev = wdev->netdev; #endif - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); mlan_status status = MLAN_STATUS_SUCCESS; t_u32 mgmt_subtype_mask = 0x0; t_u32 last_mgmt_subtype_mask = priv->mgmt_subtype_mask; @@ -1658,6 +1865,18 @@ woal_cfg80211_mgmt_frame_register(struct wiphy *wiphy, #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) +/** + * @brief tx mgmt frame + * + * @param wiphy A pointer to wiphy structure + * @param wdev A pointer to wireless_dev structure + * @param params A pointer to cfg80211_mgmt_tx_params structure + * @param cookie A pointer to frame cookie + * + * @return 0 -- success, otherwise fail + */ +#else /** * @brief tx mgmt frame * @@ -1674,6 +1893,7 @@ woal_cfg80211_mgmt_frame_register(struct wiphy *wiphy, * * @return 0 -- success, otherwise fail */ +#endif #else /** * @brief tx mgmt frame @@ -1758,24 +1978,36 @@ woal_cfg80211_mgmt_tx(struct wiphy *wiphy, #else struct wireless_dev *wdev, #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) + struct cfg80211_mgmt_tx_params *params, +#else struct ieee80211_channel *chan, bool offchan, #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) enum nl80211_channel_type channel_type, bool channel_type_valid, #endif - unsigned int wait, const u8 * buf, size_t len, + unsigned int wait, const u8 *buf, size_t len, #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) bool no_cck, #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) bool dont_wait_for_ack, +#endif #endif u64 * cookie) { #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) struct net_device *dev = wdev->netdev; #endif - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) +#if defined(WIFI_DIRECT_SUPPORT) + struct ieee80211_channel *chan = params->chan; + unsigned int wait = params->wait; +#endif + const u8 *buf = params->buf; + size_t len = params->len; +#endif + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); int ret = 0; pmlan_buffer pmbuf = NULL; mlan_status status = MLAN_STATUS_SUCCESS; @@ -1789,6 +2021,12 @@ woal_cfg80211_mgmt_tx(struct wiphy *wiphy, t_u32 duration; moal_private *remain_priv = NULL; #endif +#endif +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + unsigned long flags; + t_u8 *last_tx_buf; +#endif #endif ENTER(); @@ -1812,10 +2050,10 @@ woal_cfg80211_mgmt_tx(struct wiphy *wiphy, } #if defined(WIFI_DIRECT_SUPPORT) #if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION - if ((priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) && - ieee80211_is_action(((struct ieee80211_mgmt *)buf)-> - frame_control)) { - woal_cfg80211_display_p2p_actframe(buf, len, chan, MTRUE); + if (ieee80211_is_action(((struct ieee80211_mgmt *)buf)->frame_control)) { + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) + woal_cfg80211_display_p2p_actframe(buf, len, chan, + MTRUE); if (priv->phandle->is_go_timer_set) { woal_cancel_timer(&priv->phandle->go_timer); priv->phandle->is_go_timer_set = MFALSE; @@ -1824,6 +2062,28 @@ woal_cfg80211_mgmt_tx(struct wiphy *wiphy, woal_cancel_timer(&priv->phandle->remain_timer); woal_remain_timer_func(priv->phandle); } + /** report previous tx status */ + spin_lock_irqsave(&priv->tx_stat_lock, flags); + if (priv->last_tx_buf && priv->last_tx_cookie) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + cfg80211_mgmt_tx_status(dev, priv->last_tx_cookie, + priv->last_tx_buf, + priv->last_tx_buf_len, true, + GFP_ATOMIC); +#else + cfg80211_mgmt_tx_status(priv->wdev, + priv->last_tx_cookie, + priv->last_tx_buf, + priv->last_tx_buf_len, true, + GFP_ATOMIC); +#endif +#endif + kfree(priv->last_tx_buf); + priv->last_tx_buf = NULL; + priv->last_tx_cookie = 0; + } + spin_unlock_irqrestore(&priv->tx_stat_lock, flags); /* With sd8777 We have difficulty to receive response packet in 500ms */ @@ -1834,11 +2094,15 @@ woal_cfg80211_mgmt_tx(struct wiphy *wiphy, remain_bss_index]; /** cancel previous remain on channel */ if (priv->phandle->remain_on_channel && remain_priv) { - if (woal_cfg80211_remain_on_channel_cfg - (remain_priv, MOAL_IOCTL_WAIT, MTRUE, - &channel_status, NULL, 0, 0)) - PRINTM(MERROR, - "mgmt_tx:Fail to cancel remain on channel\n"); + if ((priv->phandle->chan.center_freq != + chan->center_freq) + ) { + if (woal_cfg80211_remain_on_channel_cfg + (remain_priv, MOAL_IOCTL_WAIT, MTRUE, + &channel_status, NULL, 0, 0)) + PRINTM(MERROR, + "mgmt_tx:Fail to cancel remain on channel\n"); + } if (priv->phandle->cookie) { cfg80211_remain_on_channel_expired( #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) @@ -1936,7 +2200,7 @@ woal_cfg80211_mgmt_tx(struct wiphy *wiphy, /* pkt_type + tx_control */ #define HEADER_SIZE 8 - packet_len = (t_u16) len + MLAN_MAC_ADDR_LENGTH; + packet_len = (t_u16)len + MLAN_MAC_ADDR_LENGTH; pmbuf = woal_alloc_mlan_buffer(priv->phandle, MLAN_MIN_DATA_HEADER_LEN + HEADER_SIZE + packet_len + sizeof(packet_len)); @@ -1974,6 +2238,23 @@ woal_cfg80211_mgmt_tx(struct wiphy *wiphy, pmbuf->data_len = HEADER_SIZE + packet_len + sizeof(packet_len); pmbuf->buf_type = MLAN_BUF_TYPE_RAW_DATA; pmbuf->bss_index = priv->bss_index; +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (ieee80211_is_action(((struct ieee80211_mgmt *)buf)->frame_control)) { + pmbuf->flags = MLAN_BUF_FLAG_TX_STATUS; + pmbuf->tx_seq_num = ++priv->tx_seq_num; + last_tx_buf = kmalloc(len, GFP_KERNEL); + if (last_tx_buf) { + memcpy(last_tx_buf, buf, len); + spin_lock_irqsave(&priv->tx_stat_lock, flags); + priv->last_tx_cookie = *cookie; + priv->last_tx_buf = last_tx_buf; + priv->last_tx_buf_len = len; + spin_unlock_irqrestore(&priv->tx_stat_lock, flags); + } + } +#endif +#endif status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf); switch (status) { @@ -1988,10 +2269,12 @@ woal_cfg80211_mgmt_tx(struct wiphy *wiphy, then wpa_supplicant will call cancel_remain_on_channel(), which may affect the mgmt frame tx. Meanwhile it is only necessary for P2P action handshake to wait 30ms. */ - if ((priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) && - ieee80211_is_action(((struct ieee80211_mgmt *)buf)-> - frame_control)) { - woal_sched_timeout(30); + if (ieee80211_is_action + (((struct ieee80211_mgmt *)buf)->frame_control)) { + if (priv->last_tx_buf && priv->last_tx_cookie) + break; + else + woal_sched_timeout(30); } #endif #endif @@ -2018,6 +2301,19 @@ woal_cfg80211_mgmt_tx(struct wiphy *wiphy, } done: +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (status != MLAN_STATUS_PENDING) { + spin_lock_irqsave(&priv->tx_stat_lock, flags); + if (priv->last_tx_buf) { + kfree(priv->last_tx_buf); + priv->last_tx_buf = NULL; + priv->last_tx_cookie = 0; + } + spin_unlock_irqrestore(&priv->tx_stat_lock, flags); + } +#endif +#endif LEAVE(); return ret; } @@ -2033,16 +2329,18 @@ woal_cfg80211_mgmt_tx(struct wiphy *wiphy, * @param assocresp_ies_data Assoc resp ie * @param assocresp_index The index for assoc resp when auto index * @param probereq_ies_data Probe req ie - * @param probereq_index The index for probe req when auto index * + * @param probereq_index The index for probe req when auto index + * @param wait_option wait option * * @return 0 -- success, otherwise fail */ static int -woal_cfg80211_custom_ie(moal_private * priv, - custom_ie * beacon_ies_data, t_u16 * beacon_index, - custom_ie * proberesp_ies_data, t_u16 * proberesp_index, - custom_ie * assocresp_ies_data, t_u16 * assocresp_index, - custom_ie * probereq_ies_data, t_u16 * probereq_index) +woal_cfg80211_custom_ie(moal_private *priv, + custom_ie *beacon_ies_data, t_u16 *beacon_index, + custom_ie *proberesp_ies_data, t_u16 *proberesp_index, + custom_ie *assocresp_ies_data, t_u16 *assocresp_index, + custom_ie *probereq_ies_data, t_u16 *probereq_index, + t_u8 wait_option) { mlan_ioctl_req *ioctl_req = NULL; mlan_ds_misc_cfg *misc = NULL; @@ -2054,16 +2352,15 @@ woal_cfg80211_custom_ie(moal_private * priv, ENTER(); - custom_ie = kmalloc(sizeof(mlan_ds_misc_custom_ie), GFP_KERNEL); + custom_ie = kzalloc(sizeof(mlan_ds_misc_custom_ie), GFP_KERNEL); if (!custom_ie) { ret = -ENOMEM; goto done; } - memset(custom_ie, 0x00, sizeof(mlan_ds_misc_custom_ie)); custom_ie->type = TLV_TYPE_MGMT_IE; - pos = (t_u8 *) custom_ie->ie_data_list; + pos = (t_u8 *)custom_ie->ie_data_list; if (beacon_ies_data) { len = sizeof(*beacon_ies_data) - MAX_IE_SIZE + beacon_ies_data->ie_length; @@ -2100,21 +2397,21 @@ woal_cfg80211_custom_ie(moal_private * priv, goto done; } - misc = (mlan_ds_misc_cfg *) ioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; misc->sub_command = MLAN_OID_MISC_CUSTOM_IE; ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; ioctl_req->action = MLAN_ACT_SET; memcpy(&misc->param.cust_ie, custom_ie, sizeof(mlan_ds_misc_custom_ie)); - status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + status = woal_request_ioctl(priv, ioctl_req, wait_option); if (MLAN_STATUS_SUCCESS != status) { ret = -EFAULT; goto done; } /* get the assigned index */ - pos = (t_u8 *) (&misc->param.cust_ie.ie_data_list[0].ie_index); + pos = (t_u8 *)(&misc->param.cust_ie.ie_data_list[0].ie_index); if (beacon_ies_data && beacon_ies_data->ie_length && beacon_ies_data->ie_index == MLAN_CUSTOM_IE_AUTO_IDX_MASK) { /* save beacon ie index after auto-indexing */ @@ -2127,7 +2424,7 @@ woal_cfg80211_custom_ie(moal_private * priv, if (proberesp_ies_data && proberesp_ies_data->ie_length && proberesp_ies_data->ie_index == MLAN_CUSTOM_IE_AUTO_IDX_MASK) { /* save probe resp ie index after auto-indexing */ - *proberesp_index = *((t_u16 *) pos); + *proberesp_index = *((t_u16 *)pos); len = sizeof(*proberesp_ies_data) - MAX_IE_SIZE + proberesp_ies_data->ie_length; pos += len; @@ -2136,7 +2433,7 @@ woal_cfg80211_custom_ie(moal_private * priv, if (assocresp_ies_data && assocresp_ies_data->ie_length && assocresp_ies_data->ie_index == MLAN_CUSTOM_IE_AUTO_IDX_MASK) { /* save assoc resp ie index after auto-indexing */ - *assocresp_index = *((t_u16 *) pos); + *assocresp_index = *((t_u16 *)pos); len = sizeof(*assocresp_ies_data) - MAX_IE_SIZE + assocresp_ies_data->ie_length; pos += len; @@ -2144,7 +2441,7 @@ woal_cfg80211_custom_ie(moal_private * priv, if (probereq_ies_data && probereq_ies_data->ie_length && probereq_ies_data->ie_index == MLAN_CUSTOM_IE_AUTO_IDX_MASK) { /* save probe resp ie index after auto-indexing */ - *probereq_index = *((t_u16 *) pos); + *probereq_index = *((t_u16 *)pos); len = sizeof(*probereq_ies_data) - MAX_IE_SIZE + probereq_ies_data->ie_length; pos += len; @@ -2171,7 +2468,7 @@ woal_cfg80211_custom_ie(moal_private * priv, * @return out IE length */ static t_u16 -woal_get_first_p2p_ie(const t_u8 * ie, int len, t_u8 * ie_out) +woal_get_first_p2p_ie(const t_u8 *ie, int len, t_u8 *ie_out) { int left_len = len; const t_u8 *pos = ie; @@ -2187,7 +2484,7 @@ woal_get_first_p2p_ie(const t_u8 * ie, int len, t_u8 * ie_out) if ((length + 2) > left_len) break; if (id == VENDOR_SPECIFIC_221) { - pvendor_ie = (IEEEtypes_VendorSpecific_t *) pos; + pvendor_ie = (IEEEtypes_VendorSpecific_t *)pos; if (!memcmp (pvendor_ie->vend_hdr.oui, p2p_oui, sizeof(pvendor_ie->vend_hdr.oui)) && @@ -2214,7 +2511,7 @@ woal_get_first_p2p_ie(const t_u8 * ie, int len, t_u8 * ie_out) * @return out IE length */ static t_u16 -woal_filter_beacon_ies(const t_u8 * ie, int len, t_u8 * ie_out, t_u16 wps_flag) +woal_filter_beacon_ies(const t_u8 *ie, int len, t_u8 *ie_out, t_u16 wps_flag) { int left_len = len; const t_u8 *pos = ie; @@ -2243,7 +2540,7 @@ woal_filter_beacon_ies(const t_u8 * ie, int len, t_u8 * ie_out, t_u16 wps_flag) break; case VENDOR_SPECIFIC_221: /* filter out wmm ie */ - pvendor_ie = (IEEEtypes_VendorSpecific_t *) pos; + pvendor_ie = (IEEEtypes_VendorSpecific_t *)pos; if (!memcmp (pvendor_ie->vend_hdr.oui, wmm_oui, sizeof(pvendor_ie->vend_hdr.oui)) && @@ -2297,12 +2594,12 @@ woal_filter_beacon_ies(const t_u8 * ie, int len, t_u8 * ie_out, t_u16 wps_flag) * @return MTRUE/MFALSE */ t_u8 -is_selected_registrar_on(const t_u8 * ie, int len) +is_selected_registrar_on(const t_u8 *ie, int len) { #define WPS_IE_FIX_LEN 6 #define TLV_ID_SELECTED_REGISTRAR 0x1041 int left_len = len - WPS_IE_FIX_LEN; - TLV_Generic_t *tlv = (TLV_Generic_t *) (ie + WPS_IE_FIX_LEN); + TLV_Generic_t *tlv = (TLV_Generic_t *)(ie + WPS_IE_FIX_LEN); u16 tlv_type, tlv_len; u8 *pos = NULL; while (left_len > sizeof(TLV_Generic_t)) { @@ -2310,14 +2607,14 @@ is_selected_registrar_on(const t_u8 * ie, int len) tlv_len = ntohs(tlv->len); if (tlv_type == TLV_ID_SELECTED_REGISTRAR) { PRINTM(MIOCTL, "Selected Registrar found !"); - pos = (u8 *) tlv + sizeof(TLV_Generic_t); + pos = (u8 *)tlv + sizeof(TLV_Generic_t); if (*pos == 1) return MTRUE; else return MFALSE; } - tlv = (TLV_Generic_t *) ((u8 *) tlv + tlv_len + - sizeof(TLV_Generic_t)); + tlv = (TLV_Generic_t *)((u8 *)tlv + tlv_len + + sizeof(TLV_Generic_t)); left_len -= tlv_len + sizeof(TLV_Generic_t); } return MFALSE; @@ -2333,7 +2630,7 @@ is_selected_registrar_on(const t_u8 * ie, int len) * @return MTRUE/MFALSE */ static t_u16 -woal_is_selected_registrar_on(const t_u8 * ie, int len) +woal_is_selected_registrar_on(const t_u8 *ie, int len) { int left_len = len; const t_u8 *pos = ie; @@ -2349,7 +2646,7 @@ woal_is_selected_registrar_on(const t_u8 * ie, int len) break; switch (id) { case VENDOR_SPECIFIC_221: - pvendor_ie = (IEEEtypes_VendorSpecific_t *) pos; + pvendor_ie = (IEEEtypes_VendorSpecific_t *)pos; if (!memcmp (pvendor_ie->vend_hdr.oui, wps_oui, sizeof(pvendor_ie->vend_hdr.oui)) && @@ -2382,17 +2679,17 @@ woal_is_selected_registrar_on(const t_u8 * ie, int len) * @param probereq_ies A pointer to probe req ies * @param probereq_ies_len Probe req ies length * * @param mask Mgmt frame mask + * @param wait_option wait_option * * @return 0 -- success, otherwise fail */ int -woal_cfg80211_mgmt_frame_ie(moal_private * priv, - const t_u8 * beacon_ies, size_t beacon_ies_len, - const t_u8 * proberesp_ies, - size_t proberesp_ies_len, - const t_u8 * assocresp_ies, - size_t assocresp_ies_len, const t_u8 * probereq_ies, - size_t probereq_ies_len, t_u16 mask) +woal_cfg80211_mgmt_frame_ie(moal_private *priv, + const t_u8 *beacon_ies, size_t beacon_ies_len, + const t_u8 *proberesp_ies, size_t proberesp_ies_len, + const t_u8 *assocresp_ies, size_t assocresp_ies_len, + const t_u8 *probereq_ies, size_t probereq_ies_len, + t_u16 mask, t_u8 wait_option) { int ret = 0; t_u8 *pos = NULL; @@ -2412,12 +2709,11 @@ woal_cfg80211_mgmt_frame_ie(moal_private * priv, ENTER(); if (mask & MGMT_MASK_BEACON_WPS_P2P) { - beacon_ies_data = kmalloc(sizeof(custom_ie), GFP_KERNEL); + beacon_ies_data = kzalloc(sizeof(custom_ie), GFP_KERNEL); if (!beacon_ies_data) { ret = -ENOMEM; goto done; } - memset(beacon_ies_data, 0x00, sizeof(custom_ie)); if (beacon_ies && beacon_ies_len) { #ifdef WIFI_DIRECT_SUPPORT if (woal_is_selected_registrar_on @@ -2455,7 +2751,7 @@ woal_cfg80211_mgmt_frame_ie(moal_private * priv, &proberesp_index, assocresp_ies_data, &assocresp_index, probereq_ies_data, - &probereq_index)) { + &probereq_index, wait_option)) { PRINTM(MERROR, "Fail to set beacon wps IE\n"); ret = -EFAULT; } @@ -2465,7 +2761,7 @@ woal_cfg80211_mgmt_frame_ie(moal_private * priv, } if (mask & MGMT_MASK_BEACON) { - beacon_ies_data = kmalloc(sizeof(custom_ie), GFP_KERNEL); + beacon_ies_data = kzalloc(sizeof(custom_ie), GFP_KERNEL); if (!beacon_ies_data) { ret = -ENOMEM; goto done; @@ -2477,7 +2773,7 @@ woal_cfg80211_mgmt_frame_ie(moal_private * priv, if (proberesp_ies_len || (!proberesp_ies_len && !beacon_ies_len)) { proberesp_ies_data = - kmalloc(sizeof(custom_ie), GFP_KERNEL); + kzalloc(sizeof(custom_ie), GFP_KERNEL); if (!proberesp_ies_data) { ret = -ENOMEM; goto done; @@ -2490,7 +2786,7 @@ woal_cfg80211_mgmt_frame_ie(moal_private * priv, if (assocresp_ies_len || (!assocresp_ies_len && !beacon_ies_len)) { assocresp_ies_data = - kmalloc(sizeof(custom_ie), GFP_KERNEL); + kzalloc(sizeof(custom_ie), GFP_KERNEL); if (!assocresp_ies_data) { ret = -ENOMEM; goto done; @@ -2498,7 +2794,7 @@ woal_cfg80211_mgmt_frame_ie(moal_private * priv, } } if (mask & MGMT_MASK_PROBE_REQ) { - probereq_ies_data = kmalloc(sizeof(custom_ie), GFP_KERNEL); + probereq_ies_data = kzalloc(sizeof(custom_ie), GFP_KERNEL); if (!probereq_ies_data) { ret = -ENOMEM; goto done; @@ -2506,7 +2802,6 @@ woal_cfg80211_mgmt_frame_ie(moal_private * priv, } if (beacon_ies_data) { - memset(beacon_ies_data, 0x00, sizeof(custom_ie)); if (beacon_ies && beacon_ies_len) { /* set the beacon ies */ beacon_ies_data->ie_index = beacon_index; @@ -2536,7 +2831,6 @@ woal_cfg80211_mgmt_frame_ie(moal_private * priv, } if (proberesp_ies_data) { - memset(proberesp_ies_data, 0x00, sizeof(custom_ie)); if (proberesp_ies && proberesp_ies_len) { /* set the probe response p2p ies */ proberesp_ies_data->ie_index = proberesp_p2p_index; @@ -2565,7 +2859,7 @@ woal_cfg80211_mgmt_frame_ie(moal_private * priv, proberesp_ies_data, &proberesp_p2p_index, NULL, &assocresp_index, NULL, - &probereq_index)) { + &probereq_index, wait_option)) { PRINTM(MERROR, "Fail to set proberesp p2p IE\n"); ret = -EFAULT; goto done; @@ -2601,7 +2895,6 @@ woal_cfg80211_mgmt_frame_ie(moal_private * priv, } } if (assocresp_ies_data) { - memset(assocresp_ies_data, 0x00, sizeof(custom_ie)); if (assocresp_ies && assocresp_ies_len) { /* set the assoc response ies */ assocresp_ies_data->ie_index = assocresp_index; @@ -2627,7 +2920,6 @@ woal_cfg80211_mgmt_frame_ie(moal_private * priv, } if (probereq_ies_data) { - memset(probereq_ies_data, 0x00, sizeof(custom_ie)); if (probereq_ies && probereq_ies_len) { /* set the probe req ies */ probereq_ies_data->ie_index = probereq_index; @@ -2674,7 +2966,8 @@ woal_cfg80211_mgmt_frame_ie(moal_private * priv, woal_cfg80211_custom_ie(priv, beacon_ies_data, &beacon_index, proberesp_ies_data, &proberesp_index, assocresp_ies_data, &assocresp_index, - probereq_ies_data, &probereq_index)) { + probereq_ies_data, &probereq_index, + wait_option)) { PRINTM(MERROR, "Fail to set beacon proberesp assoc probereq IES\n"); ret = -EFAULT; @@ -2713,7 +3006,7 @@ woal_cfg80211_mgmt_frame_ie(moal_private * priv, */ void woal_cfg80211_setup_ht_cap(struct ieee80211_sta_ht_cap *ht_info, - t_u32 dev_cap, t_u8 * mcs_set) + t_u32 dev_cap, t_u8 *mcs_set) { ENTER(); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_cfg80211.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_cfg80211.h old mode 100755 new mode 100644 index 43a7b152..8de6f1bf --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_cfg80211.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_cfg80211.h @@ -37,7 +37,7 @@ /* define for custom ie operation */ #define MLAN_CUSTOM_IE_AUTO_IDX_MASK 0xffff #define MLAN_CUSTOM_IE_DELETE_MASK 0x0 -#define MLAN_CUSTOM_IE_NEW_MASK 0x8000 +#define MLAN_CUSTOM_IE_NEW_MASK 0x8000 #define TLV_TYPE_MGMT_IE 0x0169 #define MGMT_MASK_ASSOC_REQ 0x01 #define MGMT_MASK_REASSOC_REQ 0x04 @@ -73,7 +73,7 @@ t_u8 woal_band_cfg_to_ieee_band(t_u32 band); int woal_cfg80211_change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, enum nl80211_iftype type, - u32 * flags, struct vif_params *params); + u32 *flags, struct vif_params *params); int woal_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed); @@ -82,29 +82,30 @@ int woal_cfg80211_add_key(struct wiphy *wiphy, #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) || defined(COMPAT_WIRELESS) bool pairwise, #endif - const t_u8 * mac_addr, struct key_params *params); + const t_u8 *mac_addr, struct key_params *params); int woal_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev, t_u8 key_index, #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) || defined(COMPAT_WIRELESS) bool pairwise, #endif - const t_u8 * mac_addr); + const t_u8 *mac_addr); int woal_cfg80211_set_bitrate_mask(struct wiphy *wiphy, struct net_device *dev, - const u8 * peer, + const u8 *peer, const struct cfg80211_bitrate_mask *mask); int woal_cfg80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant); #ifdef STA_CFG80211 #ifdef STA_SUPPORT -int woal_set_rf_channel(moal_private * priv, +int woal_set_rf_channel(moal_private *priv, struct ieee80211_channel *chan, - enum nl80211_channel_type channel_type); -mlan_status woal_inform_bss_from_scan_result(moal_private * priv, - mlan_ssid_bssid * ssid_bssid, + enum nl80211_channel_type channel_type, + t_u8 wait_option); +mlan_status woal_inform_bss_from_scan_result(moal_private *priv, + mlan_ssid_bssid *ssid_bssid, t_u8 wait_option); #endif #endif @@ -127,6 +128,12 @@ int woal_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *dev, t_u8 key_index); #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30) || defined(COMPAT_WIRELESS) +int woal_cfg80211_set_default_mgmt_key(struct wiphy *wiphy, + struct net_device *netdev, + t_u8 key_index); +#endif + void woal_cfg80211_mgmt_frame_register(struct wiphy *wiphy, #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) struct wireless_dev *wdev, @@ -141,57 +148,78 @@ int woal_cfg80211_mgmt_tx(struct wiphy *wiphy, #else struct net_device *dev, #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) + struct cfg80211_mgmt_tx_params *params, +#else struct ieee80211_channel *chan, bool offchan, #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) enum nl80211_channel_type channel_type, bool channel_type_valid, #endif - unsigned int wait, const u8 * buf, size_t len, + unsigned int wait, const u8 *buf, size_t len, #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) bool no_cck, #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) bool dont_wait_for_ack, +#endif #endif u64 * cookie); -mlan_status woal_register_cfg80211(moal_private * priv); +mlan_status woal_register_cfg80211(moal_private *priv); extern struct ieee80211_supported_band cfg80211_band_2ghz; extern struct ieee80211_supported_band cfg80211_band_5ghz; extern const u32 cfg80211_cipher_suites[10]; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) +/**vendor event*/ +enum vendor_event { + event_hang = 0, + event_max, +}; +/**vendor sub command*/ +enum vendor_sub_command { + sub_cmd_set_drvdbg = 0, + sub_cmd_max, +}; +void woal_register_cfg80211_vendor_command(struct wiphy *wiphy); +int woal_cfg80211_vendor_event(IN moal_private *priv, + IN int event, IN t_u8 *data, IN int len); +#endif + #if defined(STA_SUPPORT) && defined(UAP_SUPPORT) -int woal_cfg80211_bss_role_cfg(moal_private * priv, t_u16 action, - t_u8 * bss_role); +int woal_cfg80211_bss_role_cfg(moal_private *priv, t_u16 action, + t_u8 *bss_role); #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0) struct wireless_dev *woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, const char *name, enum nl80211_iftype type, - u32 * flags, + u32 *flags, struct vif_params *params); #else #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) struct wireless_dev *woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, char *name, enum nl80211_iftype type, - u32 * flags, + u32 *flags, struct vif_params *params); #else #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) struct net_device *woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, char *name, enum nl80211_iftype type, - u32 * flags, + u32 *flags, struct vif_params *params); #else int woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, char *name, enum nl80211_iftype type, - u32 * flags, struct vif_params *params); + u32 *flags, struct vif_params *params); #endif #endif #endif +int woal_cfg80211_del_virt_if(struct wiphy *wiphy, struct net_device *dev); #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev); @@ -224,7 +252,7 @@ int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy, struct net_device *dev); #define P2P_ACT_FRAME_OUI_OFFSET 26 /** P2P subtype offset */ #define P2P_ACT_FRAME_OUI_SUBTYPE_OFFSET 30 -void woal_cfg80211_display_p2p_actframe(const t_u8 * buf, int len, +void woal_cfg80211_display_p2p_actframe(const t_u8 *buf, int len, struct ieee80211_channel *chan, const t_u8 flag); @@ -236,24 +264,29 @@ void woal_cfg80211_display_p2p_actframe(const t_u8 * buf, int len, #endif /* COMPAT_WIRELESS */ #if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION /** Define for remain on channel duration timer */ -#define MAX_REMAIN_ON_CHANNEL_DURATION (1000 * 5) +#define MAX_REMAIN_ON_CHANNEL_DURATION (1000) -int woal_cfg80211_init_p2p_client(moal_private * priv); +int woal_cfg80211_init_p2p_client(moal_private *priv); -int woal_cfg80211_init_p2p_go(moal_private * priv); +int woal_cfg80211_init_p2p_go(moal_private *priv); -int woal_cfg80211_deinit_p2p(moal_private * priv); +int woal_cfg80211_deinit_p2p(moal_private *priv); -int woal_cfg80211_remain_on_channel_cfg(moal_private * priv, +int woal_cfg80211_remain_on_channel_cfg(moal_private *priv, t_u8 wait_option, t_u8 remove, - t_u8 * status, + t_u8 *status, struct ieee80211_channel *chan, enum nl80211_channel_type channel_type, t_u32 duration); int woal_uap_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, - u8 * mac, struct station_info *stainfo); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *mac, +#else + u8 *mac, +#endif + struct station_info *stainfo); -void woal_remove_virtual_interface(moal_handle * handle); +void woal_remove_virtual_interface(moal_handle *handle); #endif /* KERNEL_VERSION */ #endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ @@ -278,25 +311,30 @@ int woal_cfg80211_set_beacon(struct wiphy *wiphy, #endif int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev); -int woal_cfg80211_del_station(struct wiphy *wiphy, - struct net_device *dev, u8 * mac_addr); +int woal_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *mac_addr); +#else + u8 *mac_addr); +#endif #endif -void woal_clear_all_mgmt_ies(moal_private * priv); -int woal_cfg80211_mgmt_frame_ie(moal_private * priv, - const t_u8 * beacon_ies, size_t beacon_ies_len, - const t_u8 * proberesp_ies, +void woal_clear_all_mgmt_ies(moal_private *priv, t_u8 wait_option); +int woal_cfg80211_mgmt_frame_ie(moal_private *priv, + const t_u8 *beacon_ies, size_t beacon_ies_len, + const t_u8 *proberesp_ies, size_t proberesp_ies_len, - const t_u8 * assocresp_ies, + const t_u8 *assocresp_ies, size_t assocresp_ies_len, - const t_u8 * probereq_ies, - size_t probereq_ies_len, t_u16 mask); + const t_u8 *probereq_ies, + size_t probereq_ies_len, t_u16 mask, + t_u8 wait_option); -t_u8 woal_is_any_interface_active(moal_handle * handle); +t_u8 woal_is_any_interface_active(moal_handle *handle); -int woal_get_active_intf_freq(moal_private * priv); +int woal_get_active_intf_freq(moal_private *priv); void woal_cfg80211_setup_ht_cap(struct ieee80211_sta_ht_cap *ht_info, - t_u32 dev_cap, t_u8 * mcs_set); -int woal_cfg80211_assoc(moal_private * priv, void *sme); + t_u32 dev_cap, t_u8 *mcs_set); +int woal_cfg80211_assoc(moal_private *priv, void *sme, t_u8 wait_option); #endif /* _MOAL_CFG80211_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_debug.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_debug.c old mode 100755 new mode 100644 index b8fa6956..965fa709 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_debug.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_debug.c @@ -58,197 +58,138 @@ extern mlan_debug_info info; #ifdef STA_SUPPORT static struct debug_data items[] = { #ifdef DEBUG_LEVEL1 - {"drvdbg", sizeof(drvdbg), (t_ptr) & drvdbg} - , + {"drvdbg", sizeof(drvdbg), (t_ptr)&drvdbg}, #endif - {"wmm_ac_vo", item_size(wmm_ac_vo), item_addr(wmm_ac_vo)} - , - {"wmm_ac_vi", item_size(wmm_ac_vi), item_addr(wmm_ac_vi)} - , - {"wmm_ac_be", item_size(wmm_ac_be), item_addr(wmm_ac_be)} - , - {"wmm_ac_bk", item_size(wmm_ac_bk), item_addr(wmm_ac_bk)} - , + {"wmm_ac_vo", item_size(wmm_ac_vo), item_addr(wmm_ac_vo)}, + {"wmm_ac_vi", item_size(wmm_ac_vi), item_addr(wmm_ac_vi)}, + {"wmm_ac_be", item_size(wmm_ac_be), item_addr(wmm_ac_be)}, + {"wmm_ac_bk", item_size(wmm_ac_bk), item_addr(wmm_ac_bk)}, {"max_tx_buf_size", item_size(max_tx_buf_size), - item_addr(max_tx_buf_size)} - , - {"tx_buf_size", item_size(tx_buf_size), item_addr(tx_buf_size)} - , + item_addr(max_tx_buf_size)}, + {"tx_buf_size", item_size(tx_buf_size), item_addr(tx_buf_size)}, {"curr_tx_buf_size", item_size(curr_tx_buf_size), - item_addr(curr_tx_buf_size)} - , - {"ps_mode", item_size(ps_mode), item_addr(ps_mode)} - , - {"ps_state", item_size(ps_state), item_addr(ps_state)} - , - {"is_deep_sleep", item_size(is_deep_sleep), item_addr(is_deep_sleep)} - , + item_addr(curr_tx_buf_size)}, + {"ps_mode", item_size(ps_mode), item_addr(ps_mode)}, + {"ps_state", item_size(ps_state), item_addr(ps_state)}, + {"is_deep_sleep", item_size(is_deep_sleep), item_addr(is_deep_sleep)}, {"wakeup_dev_req", item_size(pm_wakeup_card_req), - item_addr(pm_wakeup_card_req)} - , + item_addr(pm_wakeup_card_req)}, {"wakeup_tries", item_size(pm_wakeup_fw_try), - item_addr(pm_wakeup_fw_try)} - , + item_addr(pm_wakeup_fw_try)}, {"hs_configured", item_size(is_hs_configured), - item_addr(is_hs_configured)} - , - {"hs_activated", item_size(hs_activated), item_addr(hs_activated)} - , - {"rx_pkts_queued", item_size(rx_pkts_queued), item_addr(rx_pkts_queued)} - , - {"tx_pkts_queued", item_size(tx_pkts_queued), item_addr(tx_pkts_queued)} - , - {"pps_uapsd_mode", item_size(pps_uapsd_mode), item_addr(pps_uapsd_mode)} - , - {"sleep_pd", item_size(sleep_pd), item_addr(sleep_pd)} - , - {"qos_cfg", item_size(qos_cfg), item_addr(qos_cfg)} - , - {"tx_lock_flag", item_size(tx_lock_flag), item_addr(tx_lock_flag)} - , - {"port_open", item_size(port_open), item_addr(port_open)} - , + item_addr(is_hs_configured)}, + {"hs_activated", item_size(hs_activated), item_addr(hs_activated)}, + {"rx_pkts_queued", item_size(rx_pkts_queued), + item_addr(rx_pkts_queued)}, + {"tx_pkts_queued", item_size(tx_pkts_queued), + item_addr(tx_pkts_queued)}, + {"pps_uapsd_mode", item_size(pps_uapsd_mode), + item_addr(pps_uapsd_mode)}, + {"sleep_pd", item_size(sleep_pd), item_addr(sleep_pd)}, + {"qos_cfg", item_size(qos_cfg), item_addr(qos_cfg)}, + {"tx_lock_flag", item_size(tx_lock_flag), item_addr(tx_lock_flag)}, + {"port_open", item_size(port_open), item_addr(port_open)}, {"bypass_pkt_count", item_size(bypass_pkt_count), - item_addr(bypass_pkt_count)} - , + item_addr(bypass_pkt_count)}, {"scan_processing", item_size(scan_processing), - item_addr(scan_processing)} - , - {"num_tx_timeout", item_size(num_tx_timeout), item_addr(num_tx_timeout)} - , + item_addr(scan_processing)}, + {"num_tx_timeout", item_size(num_tx_timeout), + item_addr(num_tx_timeout)}, {"num_cmd_timeout", item_size(num_cmd_timeout), - item_addr(num_cmd_timeout)} - , - {"timeout_cmd_id", item_size(timeout_cmd_id), item_addr(timeout_cmd_id)} - , + item_addr(num_cmd_timeout)}, + {"dbg.num_cmd_timeout", item_size(dbg_num_cmd_timeout), + item_addr(dbg_num_cmd_timeout)}, + {"timeout_cmd_id", item_size(timeout_cmd_id), + item_addr(timeout_cmd_id)}, {"timeout_cmd_act", item_size(timeout_cmd_act), - item_addr(timeout_cmd_act)} - , - {"last_cmd_id", item_size(last_cmd_id), item_addr(last_cmd_id)} - , - {"last_cmd_act", item_size(last_cmd_act), item_addr(last_cmd_act)} - , - {"last_cmd_index", item_size(last_cmd_index), item_addr(last_cmd_index)} - , + item_addr(timeout_cmd_act)}, + {"last_cmd_id", item_size(last_cmd_id), item_addr(last_cmd_id)}, + {"last_cmd_act", item_size(last_cmd_act), item_addr(last_cmd_act)}, + {"last_cmd_index", item_size(last_cmd_index), + item_addr(last_cmd_index)}, {"last_cmd_resp_id", item_size(last_cmd_resp_id), - item_addr(last_cmd_resp_id)} - , + item_addr(last_cmd_resp_id)}, {"last_cmd_resp_index", item_size(last_cmd_resp_index), - item_addr(last_cmd_resp_index)} - , - {"last_event", item_size(last_event), item_addr(last_event)} - , + item_addr(last_cmd_resp_index)}, + {"last_event", item_size(last_event), item_addr(last_event)}, {"last_event_index", item_size(last_event_index), - item_addr(last_event_index)} - , + item_addr(last_event_index)}, {"num_no_cmd_node", item_size(num_no_cmd_node), - item_addr(num_no_cmd_node)} - , + item_addr(num_no_cmd_node)}, {"num_cmd_h2c_fail", item_size(num_cmd_host_to_card_failure), - item_addr(num_cmd_host_to_card_failure)} - , + item_addr(num_cmd_host_to_card_failure)}, {"num_cmd_sleep_cfm_fail", item_size(num_cmd_sleep_cfm_host_to_card_failure), - item_addr(num_cmd_sleep_cfm_host_to_card_failure)} - , + item_addr(num_cmd_sleep_cfm_host_to_card_failure)}, {"num_tx_h2c_fail", item_size(num_tx_host_to_card_failure), - item_addr(num_tx_host_to_card_failure)} - , + item_addr(num_tx_host_to_card_failure)}, {"num_cmdevt_c2h_fail", item_size(num_cmdevt_card_to_host_failure), - item_addr(num_cmdevt_card_to_host_failure)} - , + item_addr(num_cmdevt_card_to_host_failure)}, {"num_rx_c2h_fail", item_size(num_rx_card_to_host_failure), - item_addr(num_rx_card_to_host_failure)} - , + item_addr(num_rx_card_to_host_failure)}, {"num_int_read_fail", item_size(num_int_read_failure), - item_addr(num_int_read_failure)} - , + item_addr(num_int_read_failure)}, {"last_int_status", item_size(last_int_status), - item_addr(last_int_status)} - , + item_addr(last_int_status)}, + {"num_of_irq", item_size(num_of_irq), item_addr(num_of_irq)}, + {"mp_invalid_update", item_size(mp_invalid_update), + item_addr(mp_invalid_update)}, #ifdef SDIO_MULTI_PORT_TX_AGGR {"mpa_sent_last_pkt", item_size(mpa_sent_last_pkt), - item_addr(mpa_sent_last_pkt)} - , + item_addr(mpa_sent_last_pkt)}, {"mpa_sent_no_ports", item_size(mpa_sent_no_ports), - item_addr(mpa_sent_no_ports)} - , + item_addr(mpa_sent_no_ports)}, #endif {"num_evt_deauth", item_size(num_event_deauth), - item_addr(num_event_deauth)} - , + item_addr(num_event_deauth)}, {"num_evt_disassoc", item_size(num_event_disassoc), - item_addr(num_event_disassoc)} - , + item_addr(num_event_disassoc)}, {"num_evt_link_lost", item_size(num_event_link_lost), - item_addr(num_event_link_lost)} - , - {"num_cmd_deauth", item_size(num_cmd_deauth), item_addr(num_cmd_deauth)} - , + item_addr(num_event_link_lost)}, + {"num_cmd_deauth", item_size(num_cmd_deauth), + item_addr(num_cmd_deauth)}, {"num_cmd_assoc_ok", item_size(num_cmd_assoc_success), - item_addr(num_cmd_assoc_success)} - , + item_addr(num_cmd_assoc_success)}, {"num_cmd_assoc_fail", item_size(num_cmd_assoc_failure), - item_addr(num_cmd_assoc_failure)} - , - {"cmd_sent", item_size(cmd_sent), item_addr(cmd_sent)} - , - {"data_sent", item_size(data_sent), item_addr(data_sent)} - , - {"mp_rd_bitmap", item_size(mp_rd_bitmap), item_addr(mp_rd_bitmap)} - , - {"curr_rd_port", item_size(curr_rd_port), item_addr(curr_rd_port)} - , - {"mp_wr_bitmap", item_size(mp_wr_bitmap), item_addr(mp_wr_bitmap)} - , - {"curr_wr_port", item_size(curr_wr_port), item_addr(curr_wr_port)} - , + item_addr(num_cmd_assoc_failure)}, + {"cmd_sent", item_size(cmd_sent), item_addr(cmd_sent)}, + {"data_sent", item_size(data_sent), item_addr(data_sent)}, + {"mp_rd_bitmap", item_size(mp_rd_bitmap), item_addr(mp_rd_bitmap)}, + {"curr_rd_port", item_size(curr_rd_port), item_addr(curr_rd_port)}, + {"mp_wr_bitmap", item_size(mp_wr_bitmap), item_addr(mp_wr_bitmap)}, + {"curr_wr_port", item_size(curr_wr_port), item_addr(curr_wr_port)}, {"cmd_resp_received", item_size(cmd_resp_received), - item_addr(cmd_resp_received)} - , - {"event_received", item_size(event_received), item_addr(event_received)} - , + item_addr(cmd_resp_received)}, + {"event_received", item_size(event_received), + item_addr(event_received)}, {"ioctl_pending", item_handle_size(ioctl_pending), - item_handle_addr(ioctl_pending)} - , + item_handle_addr(ioctl_pending)}, {"tx_pending", item_handle_size(tx_pending), - item_handle_addr(tx_pending)} - , + item_handle_addr(tx_pending)}, {"rx_pending", item_handle_size(rx_pending), - item_handle_addr(rx_pending)} - , + item_handle_addr(rx_pending)}, {"lock_count", item_handle_size(lock_count), - item_handle_addr(lock_count)} - , + item_handle_addr(lock_count)}, {"malloc_count", item_handle_size(malloc_count), - item_handle_addr(malloc_count)} - , + item_handle_addr(malloc_count)}, {"vmalloc_count", item_handle_size(vmalloc_count), - item_handle_addr(vmalloc_count)} - , + item_handle_addr(vmalloc_count)}, {"mbufalloc_count", item_handle_size(mbufalloc_count), - item_handle_addr(mbufalloc_count)} - , + item_handle_addr(mbufalloc_count)}, {"main_state", item_handle_size(main_state), - item_handle_addr(main_state)} - , + item_handle_addr(main_state)}, {"driver_state", item_handle_size(driver_state), - item_handle_addr(driver_state)} - , + item_handle_addr(driver_state)}, #ifdef SDIO_MMC_DEBUG - {"sdiocmd53w", item_handle_size(cmd53w), item_handle_addr(cmd53w)} - , - {"sdiocmd53r", item_handle_size(cmd53r), item_handle_addr(cmd53r)} - , + {"sdiocmd53w", item_handle_size(cmd53w), item_handle_addr(cmd53w)}, + {"sdiocmd53r", item_handle_size(cmd53r), item_handle_addr(cmd53r)}, #endif #if defined(SDIO_SUSPEND_RESUME) {"hs_skip_count", item_handle_size(hs_skip_count), - item_handle_addr(hs_skip_count)} - , + item_handle_addr(hs_skip_count)}, {"hs_force_count", item_handle_size(hs_force_count), - item_handle_addr(hs_force_count)} - , + item_handle_addr(hs_force_count)}, #endif }; @@ -257,360 +198,398 @@ static struct debug_data items[] = { #ifdef UAP_SUPPORT static struct debug_data uap_items[] = { #ifdef DEBUG_LEVEL1 - {"drvdbg", sizeof(drvdbg), (t_ptr) & drvdbg} - , + {"drvdbg", sizeof(drvdbg), (t_ptr)&drvdbg}, #endif - {"wmm_ac_vo", item_size(wmm_ac_vo), item_addr(wmm_ac_vo)} - , - {"wmm_ac_vi", item_size(wmm_ac_vi), item_addr(wmm_ac_vi)} - , - {"wmm_ac_be", item_size(wmm_ac_be), item_addr(wmm_ac_be)} - , - {"wmm_ac_bk", item_size(wmm_ac_bk), item_addr(wmm_ac_bk)} - , + {"wmm_ac_vo", item_size(wmm_ac_vo), item_addr(wmm_ac_vo)}, + {"wmm_ac_vi", item_size(wmm_ac_vi), item_addr(wmm_ac_vi)}, + {"wmm_ac_be", item_size(wmm_ac_be), item_addr(wmm_ac_be)}, + {"wmm_ac_bk", item_size(wmm_ac_bk), item_addr(wmm_ac_bk)}, {"max_tx_buf_size", item_size(max_tx_buf_size), - item_addr(max_tx_buf_size)} - , - {"tx_buf_size", item_size(tx_buf_size), item_addr(tx_buf_size)} - , + item_addr(max_tx_buf_size)}, + {"tx_buf_size", item_size(tx_buf_size), item_addr(tx_buf_size)}, {"curr_tx_buf_size", item_size(curr_tx_buf_size), - item_addr(curr_tx_buf_size)} - , - {"ps_mode", item_size(ps_mode), item_addr(ps_mode)} - , - {"ps_state", item_size(ps_state), item_addr(ps_state)} - , + item_addr(curr_tx_buf_size)}, + {"ps_mode", item_size(ps_mode), item_addr(ps_mode)}, + {"ps_state", item_size(ps_state), item_addr(ps_state)}, {"wakeup_dev_req", item_size(pm_wakeup_card_req), - item_addr(pm_wakeup_card_req)} - , + item_addr(pm_wakeup_card_req)}, {"wakeup_tries", item_size(pm_wakeup_fw_try), - item_addr(pm_wakeup_fw_try)} - , + item_addr(pm_wakeup_fw_try)}, {"hs_configured", item_size(is_hs_configured), - item_addr(is_hs_configured)} - , - {"hs_activated", item_size(hs_activated), item_addr(hs_activated)} - , - {"rx_pkts_queued", item_size(rx_pkts_queued), item_addr(rx_pkts_queued)} - , - {"tx_pkts_queued", item_size(tx_pkts_queued), item_addr(tx_pkts_queued)} - , + item_addr(is_hs_configured)}, + {"hs_activated", item_size(hs_activated), item_addr(hs_activated)}, + {"rx_pkts_queued", item_size(rx_pkts_queued), + item_addr(rx_pkts_queued)}, + {"tx_pkts_queued", item_size(tx_pkts_queued), + item_addr(tx_pkts_queued)}, {"bypass_pkt_count", item_size(bypass_pkt_count), - item_addr(bypass_pkt_count)} - , + item_addr(bypass_pkt_count)}, {"num_bridge_pkts", item_size(num_bridge_pkts), - item_addr(num_bridge_pkts)} - , - {"num_drop_pkts", item_size(num_drop_pkts), item_addr(num_drop_pkts)} - , - {"num_tx_timeout", item_size(num_tx_timeout), item_addr(num_tx_timeout)} - , + item_addr(num_bridge_pkts)}, + {"num_drop_pkts", item_size(num_drop_pkts), item_addr(num_drop_pkts)}, + {"num_tx_timeout", item_size(num_tx_timeout), + item_addr(num_tx_timeout)}, {"num_cmd_timeout", item_size(num_cmd_timeout), - item_addr(num_cmd_timeout)} - , - {"timeout_cmd_id", item_size(timeout_cmd_id), item_addr(timeout_cmd_id)} - , + item_addr(num_cmd_timeout)}, + {"timeout_cmd_id", item_size(timeout_cmd_id), + item_addr(timeout_cmd_id)}, {"timeout_cmd_act", item_size(timeout_cmd_act), - item_addr(timeout_cmd_act)} - , - {"last_cmd_id", item_size(last_cmd_id), item_addr(last_cmd_id)} - , - {"last_cmd_act", item_size(last_cmd_act), item_addr(last_cmd_act)} - , - {"last_cmd_index", item_size(last_cmd_index), item_addr(last_cmd_index)} - , + item_addr(timeout_cmd_act)}, + {"last_cmd_id", item_size(last_cmd_id), item_addr(last_cmd_id)}, + {"last_cmd_act", item_size(last_cmd_act), item_addr(last_cmd_act)}, + {"last_cmd_index", item_size(last_cmd_index), + item_addr(last_cmd_index)}, {"last_cmd_resp_id", item_size(last_cmd_resp_id), - item_addr(last_cmd_resp_id)} - , + item_addr(last_cmd_resp_id)}, {"last_cmd_resp_index", item_size(last_cmd_resp_index), - item_addr(last_cmd_resp_index)} - , - {"last_event", item_size(last_event), item_addr(last_event)} - , + item_addr(last_cmd_resp_index)}, + {"last_event", item_size(last_event), item_addr(last_event)}, {"last_event_index", item_size(last_event_index), - item_addr(last_event_index)} - , + item_addr(last_event_index)}, {"num_no_cmd_node", item_size(num_no_cmd_node), - item_addr(num_no_cmd_node)} - , + item_addr(num_no_cmd_node)}, {"num_cmd_h2c_fail", item_size(num_cmd_host_to_card_failure), - item_addr(num_cmd_host_to_card_failure)} - , + item_addr(num_cmd_host_to_card_failure)}, {"num_cmd_sleep_cfm_fail", item_size(num_cmd_sleep_cfm_host_to_card_failure), - item_addr(num_cmd_sleep_cfm_host_to_card_failure)} - , + item_addr(num_cmd_sleep_cfm_host_to_card_failure)}, {"num_tx_h2c_fail", item_size(num_tx_host_to_card_failure), - item_addr(num_tx_host_to_card_failure)} - , + item_addr(num_tx_host_to_card_failure)}, {"num_cmdevt_c2h_fail", item_size(num_cmdevt_card_to_host_failure), - item_addr(num_cmdevt_card_to_host_failure)} - , + item_addr(num_cmdevt_card_to_host_failure)}, {"num_rx_c2h_fail", item_size(num_rx_card_to_host_failure), - item_addr(num_rx_card_to_host_failure)} - , + item_addr(num_rx_card_to_host_failure)}, {"num_int_read_fail", item_size(num_int_read_failure), - item_addr(num_int_read_failure)} - , + item_addr(num_int_read_failure)}, {"last_int_status", item_size(last_int_status), - item_addr(last_int_status)} - , + item_addr(last_int_status)}, + {"num_of_irq", item_size(num_of_irq), item_addr(num_of_irq)}, + {"mp_invalid_update", item_size(mp_invalid_update), + item_addr(mp_invalid_update)}, #ifdef SDIO_MULTI_PORT_TX_AGGR {"mpa_sent_last_pkt", item_size(mpa_sent_last_pkt), - item_addr(mpa_sent_last_pkt)} - , + item_addr(mpa_sent_last_pkt)}, {"mpa_sent_no_ports", item_size(mpa_sent_no_ports), - item_addr(mpa_sent_no_ports)} - , + item_addr(mpa_sent_no_ports)}, #endif - {"cmd_sent", item_size(cmd_sent), item_addr(cmd_sent)} - , - {"data_sent", item_size(data_sent), item_addr(data_sent)} - , - {"mp_rd_bitmap", item_size(mp_rd_bitmap), item_addr(mp_rd_bitmap)} - , - {"curr_rd_port", item_size(curr_rd_port), item_addr(curr_rd_port)} - , - {"mp_wr_bitmap", item_size(mp_wr_bitmap), item_addr(mp_wr_bitmap)} - , - {"curr_wr_port", item_size(curr_wr_port), item_addr(curr_wr_port)} - , + {"cmd_sent", item_size(cmd_sent), item_addr(cmd_sent)}, + {"data_sent", item_size(data_sent), item_addr(data_sent)}, + {"mp_rd_bitmap", item_size(mp_rd_bitmap), item_addr(mp_rd_bitmap)}, + {"curr_rd_port", item_size(curr_rd_port), item_addr(curr_rd_port)}, + {"mp_wr_bitmap", item_size(mp_wr_bitmap), item_addr(mp_wr_bitmap)}, + {"curr_wr_port", item_size(curr_wr_port), item_addr(curr_wr_port)}, {"cmd_resp_received", item_size(cmd_resp_received), - item_addr(cmd_resp_received)} - , - {"event_received", item_size(event_received), item_addr(event_received)} - , + item_addr(cmd_resp_received)}, + {"event_received", item_size(event_received), + item_addr(event_received)}, {"ioctl_pending", item_handle_size(ioctl_pending), - item_handle_addr(ioctl_pending)} - , + item_handle_addr(ioctl_pending)}, {"tx_pending", item_handle_size(tx_pending), - item_handle_addr(tx_pending)} - , + item_handle_addr(tx_pending)}, {"rx_pending", item_handle_size(rx_pending), - item_handle_addr(rx_pending)} - , + item_handle_addr(rx_pending)}, {"lock_count", item_handle_size(lock_count), - item_handle_addr(lock_count)} - , + item_handle_addr(lock_count)}, {"malloc_count", item_handle_size(malloc_count), - item_handle_addr(malloc_count)} - , + item_handle_addr(malloc_count)}, {"vmalloc_count", item_handle_size(vmalloc_count), - item_handle_addr(vmalloc_count)} - , + item_handle_addr(vmalloc_count)}, {"mbufalloc_count", item_handle_size(mbufalloc_count), - item_handle_addr(mbufalloc_count)} - , + item_handle_addr(mbufalloc_count)}, {"main_state", item_handle_size(main_state), - item_handle_addr(main_state)} - , + item_handle_addr(main_state)}, {"driver_state", item_handle_size(driver_state), - item_handle_addr(driver_state)} - , + item_handle_addr(driver_state)}, #ifdef SDIO_MMC_DEBUG - {"sdiocmd53w", item_handle_size(cmd53w), item_handle_addr(cmd53w)} - , - {"sdiocmd53r", item_handle_size(cmd53r), item_handle_addr(cmd53r)} - , + {"sdiocmd53w", item_handle_size(cmd53w), item_handle_addr(cmd53w)}, + {"sdiocmd53r", item_handle_size(cmd53r), item_handle_addr(cmd53r)}, #endif #if defined(SDIO_SUSPEND_RESUME) {"hs_skip_count", item_handle_size(hs_skip_count), - item_handle_addr(hs_skip_count)} - , + item_handle_addr(hs_skip_count)}, {"hs_force_count", item_handle_size(hs_force_count), - item_handle_addr(hs_force_count)} - , + item_handle_addr(hs_force_count)}, #endif }; #endif /* UAP_SUPPORT */ -/* Histogram support*/ -struct _hgm_seq_data { - int histDataSize; - int pos; - int numHgmSamples; - char *pHgmData; -}; - -static struct _hgm_seq_data hgm_seq_data; -static unsigned int woal_debug_get_uint(char *pBuf); - -static void -hgm_seq_init_globals() +/** + * @brief This function reset histogram data + * + * @param priv A pointer to moal_private + * + * @return N/A + */ +void +woal_hist_do_reset(void *data) { - int i; - ENTER(); - - if (!hgm_seq_data.pHgmData){ - hgm_seq_data.histDataSize = (RX_RATE_MAX+SNR_MAX+NOISE_FLR_MAX+SIG_STRENGTH_MAX) * sizeof(unsigned int); - hgm_seq_data.pHgmData = (char *) kmalloc(hgm_seq_data.histDataSize, GFP_KERNEL); - - if (!hgm_seq_data.pHgmData){ - printk(KERN_ERR "hgm_seq_init_globals: Could not allocate memory\n"); - LEAVE(); - return; - } - - for (i = 0; i < hgm_seq_data.histDataSize; i++) - hgm_seq_data.pHgmData[i] = 0; - } + hgm_data *phist_data = (hgm_data *)data; + int ix; - LEAVE(); - return; + if (!phist_data) + return; + atomic_set(&(phist_data->num_samples), 0); + for (ix = 0; ix < RX_RATE_MAX; ix++) + atomic_set(&(phist_data->rx_rate[ix]), 0); + for (ix = 0; ix < SNR_MAX; ix++) + atomic_set(&(phist_data->snr[ix]), 0); + for (ix = 0; ix < NOISE_FLR_MAX; ix++) + atomic_set(&(phist_data->noise_flr[ix]), 0); + for (ix = 0; ix < SIG_STRENGTH_MAX; ix++) + atomic_set(&(phist_data->sig_str[ix]), 0); } - -static void * -hgm_seq_start(struct seq_file *s, loff_t *pos) + /** + * @brief This function reset all histogram data + * + * @param priv A pointer to moal_private + * + * @return N/A + */ +void +woal_hist_data_reset(moal_private *priv) { + int i = 0; + for(i = 0; i < priv->phandle->histogram_table_num; i++) + woal_hist_do_reset(priv->hist_data[i]); +} +/** + * @brief This function reset histogram data according to antenna + * + * @param priv A pointer to moal_private + * + * @return N/A + */ +void +woal_hist_reset_table(moal_private *priv, t_u8 antenna) +{ + hgm_data *phist_data = priv->hist_data[antenna]; + + woal_hist_do_reset(phist_data); +} - ENTER(); - - if (unlikely(!hgm_seq_data.pHgmData)){ - LEAVE(); - return NULL; - } - else if (0 == *pos) { - if (0 != mlan_hist_data_get( hgm_seq_data.pHgmData, &(hgm_seq_data.numHgmSamples) )){ - LEAVE(); - return NULL; - } - } - hgm_seq_data.pos = *pos; - if ((*pos) >= hgm_seq_data.histDataSize) { // are we done? - LEAVE(); - return NULL; - } +/** + * @brief This function set histogram data + * + * @param priv A pointer to moal_private + * @param rx_rate rx rate + * @param snr snr + * @param nflr NF + * + * @return N/A + */ +static void +woal_hist_data_set(moal_private *priv, t_s8 rx_rate, t_s8 snr, t_s8 nflr, + t_u8 antenna) +{ + hgm_data *phist_data = priv->hist_data[antenna]; - LEAVE(); - return (void *) &hgm_seq_data; + atomic_inc(&(phist_data->num_samples)); + atomic_inc(&(phist_data->rx_rate[rx_rate])); + atomic_inc(&(phist_data->snr[snr])); + atomic_inc(&(phist_data->noise_flr[128 + nflr])); + atomic_inc(&(phist_data->sig_str[nflr - snr])); } +/** + * @brief This function add histogram data + * + * @param priv A pointer to moal_private + * @param rx_rate rx rate + * @param snr snr + * @param nflr NF + * + * @return N/A + */ +void +woal_hist_data_add(moal_private *priv, t_u8 rx_rate, t_s8 snr, t_s8 nflr, + t_u8 antenna) +{ + hgm_data *phist_data = NULL; + unsigned long curr_size; + + if((antenna + 1) > priv->phandle->histogram_table_num) + antenna = 0; + phist_data = priv->hist_data[antenna]; + curr_size = atomic_read(&(phist_data->num_samples)); + if (curr_size > HIST_MAX_SAMPLES) + woal_hist_reset_table(priv, antenna); + woal_hist_data_set(priv, rx_rate, snr, nflr, antenna); +} +#define MAX_MCS_NUM_SUPP 16 +#define MAX_MCS_NUM_AC 10 +#define RATE_INDEX_MCS0 12 +/** + * @brief histogram info in proc + * + * @param sfp pointer to seq_file structure + * @param data + * + * @return Number of output data or MLAN_STATUS_FAILURE + */ static int -hgm_seq_show(struct seq_file *s, void *v) +woal_histogram_info(struct seq_file *sfp, void *data) { - struct _hgm_seq_data *hgm = (struct _hgm_seq_data *) v; - int pos; - int rx_max = RX_RATE_MAX; - int snr_max = rx_max + SNR_MAX; - int nflr_max = snr_max + NOISE_FLR_MAX; - int sigs_max = nflr_max + SIG_STRENGTH_MAX; - int i,nTemp; - struct debug_data_priv *pdbg_data_priv; - struct debug_data *pdbg_data; - moal_private *pmoal_priv=NULL; + hgm_data *phist_data = (hgm_data *)data; + int i = 0; + int value = 0; + t_bool sgi_enable = 0; + t_u8 bw = 0; + t_u8 mcs_index = 0; + t_u8 nss = 0; - if (s){ - pdbg_data_priv = (struct debug_data_priv *)s->private; - pdbg_data = pdbg_data_priv->items; - pmoal_priv = pdbg_data_priv->priv; + ENTER(); + if (MODULE_GET == 0) { + LEAVE(); + return -EFAULT; } - else - PRINTM(MERROR,"hgm_seq_show(): s == NULL!\n"); - - - pos = hgm->pos; - - if (unlikely(pos == 0)){ - // Position 0, print banner, num items and first entry. - seq_printf(s, "total samples = %d \n", hgm->numHgmSamples); - seq_printf(s, "rx rates (in Mbps): 0=1M 1=2M 2=5.5M 3=11M 4=6M 5=9M 6=12M\n"); - seq_printf(s, " 7=18M 8=24M 9=36M 10=48M 11=54M 12-19 == MCS0-7(BW20)\n\n"); - i = woal_debug_get_uint((char *) (pos + hgm->pHgmData)); - if (i){ - seq_printf(s, "rx_rate[%02d] = %d\n", pos, i); - } - } - else if (pos < rx_max*sizeof(unsigned int)){ - i = woal_debug_get_uint((char *) (pos + hgm->pHgmData)); - if (i){ - seq_printf(s, "rx_rate[%02d] = %d\n", pos/sizeof(unsigned int), i); - } - } - else if (pos < snr_max*sizeof(unsigned int)){ - i = woal_debug_get_uint((char *) (pos + hgm->pHgmData)); - if (i){ - seq_printf(s, "snr[%02ddB] = %d\n", (pos/sizeof(unsigned int)) - rx_max, i); + seq_printf(sfp, "total samples = %d \n", + atomic_read(&(phist_data->num_samples))); + seq_printf(sfp, "rx rates (in Mbps):\n"); + seq_printf(sfp, "\t0-3: B-MCS 0-3\n"); + seq_printf(sfp, "\t4-11: G-MCS 0-7\n"); + seq_printf(sfp, + "\t12-27: N-MCS 0-15(BW20) 28-43: N-MCS 0-15(BW40)\n"); + seq_printf(sfp, + "\t44-59: N-MCS 0-15(BW20:SGI) 60-75: N-MCS 0-15(BW40:SGI)\n"); + seq_printf(sfp, + "\t76-85: AC-MCS 0-9(VHT:BW20:NSS1) 86-95: AC-MCS 0-9(VHT:BW20:NSS2)\n"); + seq_printf(sfp, + "\t96-105: AC-MCS 0-9(VHT:BW40:NSS1) 106-115: AC-MCS 0-9(VHT:BW40:NSS2)\n"); + seq_printf(sfp, + "\t116-125: AC-MCS 0-9(VHT:BW80:NSS1) 126-135: AC-MCS 0-9(VHT:BW80:NSS2)\n"); + seq_printf(sfp, + "\t136-145: AC-MCS 0-9(VHT:BW20:NSS1:SGI) 146-155: AC-MCS 0-9(VHT:BW20:NSS2:SGI)\n"); + seq_printf(sfp, + "\t156-165: AC-MCS 0-9(VHT:BW40:NSS1:SGI) 166-175: AC-MCS 0-9(VHT:BW40:NSS2:SGI)\n"); + seq_printf(sfp, + "\t176-185: AC-MCS 0-9(VHT:BW80:NSS1:SGI) 186-195: AC-MCS 0-9(VHT:BW80:NSS2:SGI)\n\n"); + + for (i = 0; i < RX_RATE_MAX; i++) { + value = atomic_read(&(phist_data->rx_rate[i])); + if (value) { + if (i <= 11) + seq_printf(sfp, "rx_rate[%03d] = %d\n", i, + value); + else if (i <= 75) { + sgi_enable = (i - 12) / (MAX_MCS_NUM_SUPP * 2); // 0:LGI, + // 1:SGI + bw = ((i - 12) % (MAX_MCS_NUM_SUPP * 2)) / MAX_MCS_NUM_SUPP; // 0:20MHz, + // 1:40MHz + mcs_index = (i - 12) % MAX_MCS_NUM_SUPP; + seq_printf(sfp, + "rx_rate[%03d] = %d (MCS:%d HT BW:%dMHz%s)\n", + i, value, mcs_index, (1 << bw) * 20, + sgi_enable ? " SGI" : ""); + } else if (i <= 195) { + sgi_enable = (i - 76) / (MAX_MCS_NUM_AC * 6); // 0:LGI, + // 1:SGI + bw = ((i - 76) % (MAX_MCS_NUM_AC * 6)) / (MAX_MCS_NUM_AC * 2); // 0:20MHz, + // 1:40MHz, + // 2:80MHz + nss = (((i - 76) % (MAX_MCS_NUM_AC * 6)) % (MAX_MCS_NUM_AC * 2)) / MAX_MCS_NUM_AC; // 0:NSS1, + // 1:NSS2 + mcs_index = (i - 76) % MAX_MCS_NUM_AC; + + seq_printf(sfp, + "rx_rate[%03d] = %d (MCS:%d VHT BW:%dMHz NSS:%d%s)\n", + i, value, mcs_index, (1 << bw) * 20, + nss + 1, sgi_enable ? " SGI" : ""); + } } } - else if (pos < nflr_max*sizeof(unsigned int)){ - i = woal_debug_get_uint((char *) (pos + hgm->pHgmData)); - if (i){ - seq_printf(s, "noise_flr[-%02ddBm] = %d\n", ((pos/sizeof(unsigned int))-snr_max)-128, i); - } + for (i = 0; i < SNR_MAX; i++) { + value = atomic_read(&(phist_data->snr[i])); + if (value) + seq_printf(sfp, "snr[%02ddB] = %d\n", i, value); } - else if (pos < sigs_max*sizeof(unsigned int)){ - i = woal_debug_get_uint((char *) (pos + hgm->pHgmData)); - if (i){ - seq_printf(s, "sig_strength[-%02ddBm] = %d\n", (pos/sizeof(unsigned int)) - nflr_max, i); - } + for (i = 0; i < NOISE_FLR_MAX; i++) { + value = atomic_read(&(phist_data->noise_flr[i])); + if (value) + seq_printf(sfp, "noise_flr[-%02ddBm] = %d\n", + (int)(i - 128), value); } - else{ - return 0; + for (i = 0; i < SIG_STRENGTH_MAX; i++) { + value = atomic_read(&(phist_data->sig_str[i])); + if (value) + seq_printf(sfp, "sig_strength[-%02ddBm] = %d\n", i, + value); } + MODULE_PUT; + LEAVE(); return 0; } -static void * -hgm_seq_next(struct seq_file *s, void *v, loff_t *pos) +/** + * @brief Proc read function for histogram + * + * @param sfp pointer to seq_file structure + * @param data + * + * @return Number of output data or MLAN_STATUS_FAILURE + */ +static int +woal_histogram_read(struct seq_file *sfp, void *data) { - struct _hgm_seq_data *hgm = (struct _hgm_seq_data *) v; + wlan_hist_proc_data *hist_data = (wlan_hist_proc_data *) sfp->private; + moal_private *priv = (moal_private *)hist_data->priv; - if ((*pos) >= hgm->histDataSize) // we are done - return NULL; - - (*pos) += sizeof(unsigned int); // increase my position counter - hgm->pos = *pos; + ENTER(); + if (!priv){ + LEAVE(); + return -EFAULT; + } - return v; -} + if(!priv->hist_data){ + LEAVE(); + return -EFAULT; + } + if (hist_data->ant_idx < priv->phandle->histogram_table_num) + woal_histogram_info(sfp, priv->hist_data[hist_data->ant_idx]); -static void -hgm_seq_stop(struct seq_file *s, void *v) -{ - return; + LEAVE(); + return 0; } -static struct seq_operations hgm_seq_ops = { - .start = hgm_seq_start, - .next = hgm_seq_next, - .stop = hgm_seq_stop, - .show = hgm_seq_show -}; - -static int hgm_seq_open(struct inode *inode, struct file *file) +static int +woal_histogram_proc_open(struct inode *inode, struct file *file) { - int ret; - ret = seq_open(file, &hgm_seq_ops); - if (!ret){ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) - ((struct seq_file *)file->private_data)->private = PDE_DATA(inode); + return single_open(file, woal_histogram_read, PDE_DATA(inode)); #else - ((struct seq_file *)file->private_data)->private = PDE(inode)->data; + return single_open(file, woal_histogram_read, PDE(inode)->data); #endif - } - return ret; -} - -static unsigned int woal_debug_get_uint(char *pBuf) -{ - unsigned int n; - mlan_memcpy((void *) &n, (void *) pBuf, sizeof(unsigned int)); - return n; } -static int -woal_debug_write_histogram(struct file *filp, const char __user *buf, - size_t count, loff_t *ppos) +/** + * @brief Proc write function for histogram + * + * @param f file pointer + * @param buf pointer to data buffer + * @param count data number to write + * @param off Offset + * + * @return number of data + */ +static ssize_t +woal_histogram_write(struct file *f, const char __user * buf, size_t count, + loff_t * off) { - mlan_hist_data_clear(); + struct seq_file *sfp = f->private_data; + wlan_hist_proc_data *hist_data = (wlan_hist_proc_data *) sfp->private; + moal_private *priv = (moal_private *)hist_data->priv; + woal_hist_reset_table(priv, hist_data->ant_idx); return count; } + + + + /**************** Peers Support ************************/ /* @@ -644,6 +623,16 @@ static t_u16 seq_read_numItemsDone; static int woal_peer_add_peer(t_s8 snr, t_s8 nf, t_s8 sig_str, mlan_802_11_mac_addr mac); static int woal_peer_delete_peer_list(); +void* mlan_memcpy(void *pDest, void *pSrc, unsigned int count) +{ + char *d = (char *) pDest; + char *s = (char *) pSrc; + while (count--){ + *d++ = *s++; + } + return pDest; +} + static int peer_get_mgmt_frame_mask(moal_private *priv, int *pmask, int get) { int ret = -1; @@ -686,31 +675,6 @@ int peer_seq_unlock() up(&woal_peer_sem); return 0; } -/* -static void -peers_seq_init_globals() -{ - int i; - ENTER(); - - if (!hgm_seq_data.pHgmData){ - hgm_seq_data.histDataSize = (RX_RATE_MAX+SNR_MAX+NOISE_FLR_MAX+SIG_STRENGTH_MAX) * sizeof(unsigned int); - hgm_seq_data.pHgmData = (char *) kmalloc(hgm_seq_data.histDataSize, GFP_KERNEL); - - if (!hgm_seq_data.pHgmData){ - printk(KERN_ERR "hgm_seq_init_globals: Could not allocate memory\n"); - LEAVE(); - return; - } - - for (i = 0; i < hgm_seq_data.histDataSize; i++) - hgm_seq_data.pHgmData[i] = 0; - } - - LEAVE(); - return; -} -*/ static void * peers_seq_start(struct seq_file *s, loff_t *pos) @@ -719,17 +683,14 @@ peers_seq_start(struct seq_file *s, loff_t *pos) if ( 0 == *pos) { seq_read_numItemsDone = 0; peer_seq_unlock(); - PRINTM(MINFO, "peers_seq_start: pos == 0, list_size = %d\n",woal_peer_list_size); return &seq_read_numItemsDone; } else if (*pos < woal_peer_list_size) { peer_seq_unlock(); - PRINTM(MINFO, "peers_seq_start pos = %d list_size = %d\n",*pos,woal_peer_list_size); return &seq_read_numItemsDone; } else { peer_seq_unlock(); - PRINTM(MINFO, "peers_seq_start DONE!! pos = %d\n",*pos); return NULL; } } @@ -791,7 +752,6 @@ peers_seq_show(struct seq_file *s, void *v) } - PRINTM(MINFO, "peers_seq_show RETURNING: v=%x, numDone=%d\n",v,*pnumItemsDone); peer_seq_unlock(); return 0; } @@ -810,12 +770,10 @@ peers_seq_next(struct seq_file *s, void *v, loff_t *pos) } if (*pnumItemsDone < woal_peer_list_size){ - PRINTM(MINFO, "peers_seq_next,retrying:v = %x num_done:%d, list size:%d\n",v,*pnumItemsDone, woal_peer_list_size); peer_seq_unlock(); return v; } - PRINTM(MINFO," peers_seq_next: Done printing (%d items),total=%d\n",*pnumItemsDone,woal_peer_list_size); peer_seq_unlock(); return NULL; } @@ -823,7 +781,6 @@ peers_seq_next(struct seq_file *s, void *v, loff_t *pos) static void peers_seq_stop(struct seq_file *s, void *v) { - PRINTM(MINFO, "peers_seq_stop\n"); return; } @@ -938,18 +895,35 @@ woal_debug_write_peers(struct file *filp, const char __user *buf, kfree(pdata); - //PRINTM(MINFO, "woal_debug_write_peers count=%d, r=%d\n",count,r); - return count; } int woal_peer_mgmt_frame_callback( t_s8 snr, t_s8 nf, t_s8 sig_str, mlan_802_11_mac_addr mac) { - woal_peer_add_peer(snr, nf, sig_str, mac); + //woal_peer_add_peer(snr, nf, sig_str, mac); return 0; } + +/** + * @brief This function adds management frame callback data + * + * @param priv A pointer to moal_private + * @param snr Signal to Noise ratio + * @param nf Noise Floor + * @param sig_str Signal strength + * @param mac MAC address + * + * @return N/A + */ +void +woal_peer_mgmt_frame(moal_private * priv, t_s8 snr, t_s8 nf, t_s8 sig_str, + mlan_802_11_mac_addr mac) +{ + woal_peer_add_peer(snr, nf, sig_str, mac); +} + static int is_mac_addr_same(t_u8 *a1, t_u8 *a2) { int ix; @@ -1054,29 +1028,108 @@ int woal_peer_mgmt_frame_ioctl(t_u16 mask) return 0; } +/******************* log entry *************************/ +/** + * @brief Proc read function for log + * + * @param sfp pointer to seq_file structure + * @param data + * + * @return Number of output data or MLAN_STATUS_FAILURE + */ +static int woal_log_read(struct seq_file *sfp, void *data) +{ + moal_private *priv = (moal_private *)sfp->private; + mlan_ds_get_stats stats; + ENTER(); + if (!priv){ + LEAVE(); + return -EFAULT; + } + if (MODULE_GET == 0) { + LEAVE(); + return -EFAULT; + } + if (GET_BSS_ROLE(priv) != MLAN_BSS_ROLE_STA){ + MODULE_PUT; + LEAVE(); + return 0; + } + + memset(&stats, 0x00, sizeof(stats)); + if(MLAN_STATUS_SUCCESS != woal_get_stats_info(priv, MOAL_IOCTL_WAIT, &stats)) { + PRINTM(MERROR, "woal_log_read: Get log: Failed to get stats info!"); + MODULE_PUT; + LEAVE(); + return -EFAULT; + } + + seq_printf(sfp, "mcasttxframe = %d\n", stats.mcast_tx_frame); + seq_printf(sfp, "failed = %d\n", stats.failed); + seq_printf(sfp, "retry = %d\n", stats.retry); + seq_printf(sfp, "multiretry = %d\n", stats.multi_retry); + seq_printf(sfp, "framedup = %d\n", stats.frame_dup); + seq_printf(sfp, "rtssuccess = %d\n", stats.rts_success); + seq_printf(sfp, "rtsfailure = %d\n", stats.rts_failure); + seq_printf(sfp, "ackfailure = %d\n", stats.ack_failure); + seq_printf(sfp, "rxfrag = %d\n", stats.rx_frag); + seq_printf(sfp, "mcastrxframe = %d\n", stats.mcast_rx_frame); + seq_printf(sfp, "fcserror = %d\n", stats.fcs_error); + seq_printf(sfp, "txframe = %d\n", stats.tx_frame); + seq_printf(sfp, "wepicverrcnt-1 = %d\n", stats.wep_icv_error[0]); + seq_printf(sfp, "wepicverrcnt-2 = %d\n", stats.wep_icv_error[1]); + seq_printf(sfp, "wepicverrcnt-3 = %d\n", stats.wep_icv_error[2]); + seq_printf(sfp, "wepicverrcnt-4 = %d\n", stats.wep_icv_error[3]); + seq_printf(sfp, "beacon_rcnt = %d\n", stats.bcn_rcv_cnt); + seq_printf(sfp, "beacon_mcnt = %d\n", stats.bcn_miss_cnt); + + MODULE_PUT; + LEAVE(); + return 0; +} + +/** + * @brief Proc read function for log + * + * @param inode pointer to inode + * @param file file pointer + * + * @return number of data + */ +static int woal_log_proc_open(struct inode *inode, struct file *file) +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) + return single_open(file, woal_log_read, PDE_DATA(inode)); +#else + return single_open(file, woal_log_read, PDE(inode)->data); +#endif +} + /******************************************************** Local Functions ********************************************************/ /** * @brief Proc read function * - * @param sfp pointer to seq_file structure + * @param sfp pointer to seq_file structure * @param data * - * @return Number of output data or MLAN_STATUS_FAILURE + * @return Number of output data or MLAN_STATUS_FAILURE */ static int woal_debug_read(struct seq_file *sfp, void *data) { int val = 0; unsigned int i; -#ifdef SDIO_MULTI_PORT_TX_AGGR - unsigned int j; -#endif + struct debug_data_priv *items_priv = (struct debug_data_priv *)sfp->private; struct debug_data *d = items_priv->items; moal_private *priv = items_priv->priv; +#ifdef SDIO_MULTI_PORT_TX_AGGR + unsigned int j; + t_u8 mp_aggr_pkt_limit = 0; +#endif ENTER(); @@ -1097,16 +1150,16 @@ woal_debug_read(struct seq_file *sfp, void *data) for (i = 0; i < (unsigned int)items_priv->num_of_items; i++) { if (d[i].size == 1) - val = *((t_u8 *) d[i].addr); + val = *((t_u8 *)d[i].addr); else if (d[i].size == 2) - val = *((t_u16 *) d[i].addr); + val = *((t_u16 *)d[i].addr); else if (d[i].size == 4) - val = *((t_ptr *) d[i].addr); + val = *((t_ptr *)d[i].addr); else { unsigned int j; seq_printf(sfp, "%s=", d[i].name); for (j = 0; j < d[i].size; j += 2) { - val = *(t_u16 *) (d[i].addr + j); + val = *(t_u16 *)(d[i].addr + j); seq_printf(sfp, "0x%x ", val); } seq_printf(sfp, "\n"); @@ -1120,6 +1173,7 @@ woal_debug_read(struct seq_file *sfp, void *data) seq_printf(sfp, "%s=%d\n", d[i].name, val); } #ifdef SDIO_MULTI_PORT_TX_AGGR + mp_aggr_pkt_limit = info.mp_aggr_pkt_limit; seq_printf(sfp, "last_recv_wr_bitmap=0x%x last_mp_index=%d\n", info.last_recv_wr_bitmap, info.last_mp_index); for (i = 0; i < SDIO_MP_DBG_NUM; i++) { @@ -1127,25 +1181,28 @@ woal_debug_read(struct seq_file *sfp, void *data) "mp_wr_bitmap: 0x%x mp_wr_ports=0x%x len=%d curr_wr_port=0x%x\n", info.last_mp_wr_bitmap[i], info.last_mp_wr_ports[i], info.last_mp_wr_len[i], info.last_curr_wr_port[i]); - for (j = 0; j < SDIO_MP_AGGR_DEF_PKT_LIMIT; j++) { + for (j = 0; j < mp_aggr_pkt_limit; j++) { seq_printf(sfp, "0x%02x ", - info.last_mp_wr_info[i * - SDIO_MP_AGGR_DEF_PKT_LIMIT - + j]); + info.last_mp_wr_info[i * mp_aggr_pkt_limit + + j]); } seq_printf(sfp, "\n"); } seq_printf(sfp, "SDIO MPA Tx: "); - for (i = 0; i < SDIO_MP_AGGR_DEF_PKT_LIMIT; i++) + for (i = 0; i < mp_aggr_pkt_limit; i++) seq_printf(sfp, "%d ", info.mpa_tx_count[i]); seq_printf(sfp, "\n"); #endif #ifdef SDIO_MULTI_PORT_RX_AGGR seq_printf(sfp, "SDIO MPA Rx: "); - for (i = 0; i < SDIO_MP_AGGR_DEF_PKT_LIMIT; i++) + for (i = 0; i < mp_aggr_pkt_limit; i++) seq_printf(sfp, "%d ", info.mpa_rx_count[i]); seq_printf(sfp, "\n"); #endif + seq_printf(sfp, "SDIO MP Update: "); + for (i = 0; i < (mp_aggr_pkt_limit * 2); i++) + seq_printf(sfp, "%d ", info.mp_update[i]); + seq_printf(sfp, "\n"); seq_printf(sfp, "tcp_ack_drop_cnt=%d\n", priv->tcp_ack_drop_cnt); seq_printf(sfp, "tcp_ack_cnt=%d\n", priv->tcp_ack_cnt); #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) @@ -1190,29 +1247,37 @@ woal_debug_read(struct seq_file *sfp, void *data) seq_printf(sfp, "\n"); } } - if (info.tdls_peer_list) { - for (i = 0; i < info.tdls_peer_num; i++) { - unsigned int j; - seq_printf(sfp, - "tdls peer: %02x:%02x:%02x:%02x:%02x:%02x snr=%d nf=%d\n", - info.tdls_peer_list[i].mac_addr[0], - info.tdls_peer_list[i].mac_addr[1], - info.tdls_peer_list[i].mac_addr[2], - info.tdls_peer_list[i].mac_addr[3], - info.tdls_peer_list[i].mac_addr[4], - info.tdls_peer_list[i].mac_addr[5], - info.tdls_peer_list[i].snr, - -info.tdls_peer_list[i].nf); - seq_printf(sfp, "htcap: "); - for (j = 0; j < sizeof(IEEEtypes_HTCap_t); j++) - seq_printf(sfp, "%02x ", - info.tdls_peer_list[i].ht_cap[j]); - seq_printf(sfp, "\nExtcap: "); - for (j = 0; j < sizeof(IEEEtypes_ExtCap_t); j++) - seq_printf(sfp, "%02x ", - info.tdls_peer_list[i].ext_cap[j]); - seq_printf(sfp, "\n"); - } + for (i = 0; i < info.ralist_num; i++) { + seq_printf(sfp, + "ralist ra: %02x:%02x:%02x:%02x:%02x:%02x tid=%d pkts=%d pause=%d\n", + info.ralist[i].ra[0], info.ralist[i].ra[1], + info.ralist[i].ra[2], info.ralist[i].ra[3], + info.ralist[i].ra[4], info.ralist[i].ra[5], + info.ralist[i].tid, info.ralist[i].total_pkts, + info.ralist[i].tx_pause); + } + + for (i = 0; i < info.tdls_peer_num; i++) { + unsigned int j; + seq_printf(sfp, + "tdls peer: %02x:%02x:%02x:%02x:%02x:%02x snr=%d nf=%d\n", + info.tdls_peer_list[i].mac_addr[0], + info.tdls_peer_list[i].mac_addr[1], + info.tdls_peer_list[i].mac_addr[2], + info.tdls_peer_list[i].mac_addr[3], + info.tdls_peer_list[i].mac_addr[4], + info.tdls_peer_list[i].mac_addr[5], + info.tdls_peer_list[i].snr, + -info.tdls_peer_list[i].nf); + seq_printf(sfp, "htcap: "); + for (j = 0; j < sizeof(IEEEtypes_HTCap_t); j++) + seq_printf(sfp, "%02x ", + info.tdls_peer_list[i].ht_cap[j]); + seq_printf(sfp, "\nExtcap: "); + for (j = 0; j < sizeof(IEEEtypes_ExtCap_t); j++) + seq_printf(sfp, "%02x ", + info.tdls_peer_list[i].ext_cap[j]); + seq_printf(sfp, "\n"); } exit: MODULE_PUT; @@ -1223,12 +1288,12 @@ woal_debug_read(struct seq_file *sfp, void *data) /** * @brief Proc write function * - * @param f file pointer + * @param f file pointer * @param buf pointer to data buffer * @param count data number to write * @param off Offset * - * @return number of data + * @return number of data */ static ssize_t woal_debug_write(struct file *f, const char __user * buf, size_t count, @@ -1248,6 +1313,7 @@ woal_debug_write(struct file *f, const char __user * buf, size_t count, #ifdef DEBUG_LEVEL1 t_u32 last_drvdbg = drvdbg; #endif + gfp_t flag; ENTER(); @@ -1255,14 +1321,13 @@ woal_debug_write(struct file *f, const char __user * buf, size_t count, LEAVE(); return MLAN_STATUS_FAILURE; } - - pdata = (char *)kmalloc(count + 1, GFP_KERNEL); + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + pdata = kzalloc(count + 1, flag); if (pdata == NULL) { MODULE_PUT; LEAVE(); return 0; } - memset(pdata, 0, count + 1); if (copy_from_user(pdata, buf, count)) { PRINTM(MERROR, "Copy from user failed\n"); @@ -1295,29 +1360,20 @@ woal_debug_write(struct file *f, const char __user * buf, size_t count, p2++; r = woal_string_to_number(p2); if (d[i].size == 1) - *((t_u8 *) d[i].addr) = (t_u8) r; + *((t_u8 *)d[i].addr) = (t_u8)r; else if (d[i].size == 2) - *((t_u16 *) d[i].addr) = (t_u16) r; + *((t_u16 *)d[i].addr) = (t_u16)r; else if (d[i].size == 4) - *((t_ptr *) d[i].addr) = (t_ptr) r; + *((t_ptr *)d[i].addr) = (t_ptr)r; break; } while (MTRUE); } kfree(pdata); #ifdef DEBUG_LEVEL1 - if (last_drvdbg != drvdbg) { + if (last_drvdbg != drvdbg) woal_set_drvdbg(priv, drvdbg); - } -#endif -#if 0 - /* Set debug information */ - if (woal_set_debug_info(priv, MOAL_PROC_WAIT, &info)) { - MODULE_PUT; - LEAVE(); - return 0; - } #endif MODULE_PUT; LEAVE(); @@ -1343,13 +1399,13 @@ static const struct file_operations debug_proc_fops = { .write = woal_debug_write, }; -static struct file_operations hgm_file_ops = { - .owner = THIS_MODULE, - .open = hgm_seq_open, - .write = woal_debug_write_histogram, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release +static const struct file_operations histogram_proc_fops = { + .owner = THIS_MODULE, + .open = woal_histogram_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, + .write = woal_histogram_write, }; static struct file_operations peers_file_ops = { @@ -1361,6 +1417,13 @@ static struct file_operations peers_file_ops = { .release = seq_release }; +static const struct file_operations log_proc_fops = { + .owner = THIS_MODULE, + .open = woal_log_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; /******************************************************** Global Functions @@ -1368,18 +1431,18 @@ static struct file_operations peers_file_ops = { /** * @brief Create debug proc file * - * @param priv A pointer to a moal_private structure + * @param priv A pointer to a moal_private structure * - * @return N/A + * @return N/A */ void -woal_debug_entry(moal_private * priv) +woal_debug_entry(moal_private *priv) { struct proc_dir_entry *r; - struct proc_dir_entry *r2; struct proc_dir_entry *r3; int i; int handle_items; + char hist_entry[50]; ENTER(); @@ -1389,8 +1452,7 @@ woal_debug_entry(moal_private * priv) } #ifdef STA_SUPPORT if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) { - priv->items_priv.items = - (struct debug_data *)kmalloc(sizeof(items), GFP_KERNEL); + priv->items_priv.items = kmalloc(sizeof(items), GFP_KERNEL); if (!priv->items_priv.items) { PRINTM(MERROR, "Failed to allocate memory for debug data\n"); @@ -1399,15 +1461,12 @@ woal_debug_entry(moal_private * priv) } memcpy(priv->items_priv.items, items, sizeof(items)); priv->items_priv.num_of_items = ARRAY_SIZE(items); - priv->items_priv_hist.num_of_items = 0; priv->items_priv_peers.num_of_items = 0; } #endif #ifdef UAP_SUPPORT if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { - priv->items_priv.items = - (struct debug_data *)kmalloc(sizeof(uap_items), - GFP_KERNEL); + priv->items_priv.items = kmalloc(sizeof(uap_items), GFP_KERNEL); if (!priv->items_priv.items) { PRINTM(MERROR, "Failed to allocate memory for debug data\n"); @@ -1420,7 +1479,6 @@ woal_debug_entry(moal_private * priv) #endif priv->items_priv.priv = priv; - priv->items_priv_hist.priv = priv; priv->items_priv_peers.priv = priv; handle_items = 9; #ifdef SDIO_MMC_DEBUG @@ -1431,7 +1489,7 @@ woal_debug_entry(moal_private * priv) #endif for (i = 1; i <= handle_items; i++) priv->items_priv.items[priv->items_priv.num_of_items - - i].addr += (t_ptr) (priv->phandle); + i].addr += (t_ptr)(priv->phandle); /* Create proc entry */ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) @@ -1450,25 +1508,45 @@ woal_debug_entry(moal_private * priv) LEAVE(); return; } - - /* Initialize hgm data structure */ - hgm_seq_init_globals(); - - /* Create proc entry for driver histogram data */ - r2 = create_proc_entry("histogram", 0664, priv->proc_entry); - if (r2 == NULL) { - LEAVE(); - return; - } - r2->data = &priv->items_priv_hist; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) - r2->owner = THIS_MODULE; + if (priv->bss_type == MLAN_BSS_TYPE_STA || + priv->bss_type == MLAN_BSS_TYPE_UAP) { + priv->hist_entry = proc_mkdir("histogram", priv->proc_entry); + if (!priv->hist_entry) { + PRINTM(MERROR, "Fail to mkdir histogram!\n"); + LEAVE(); + return; + } + PRINTM(MERROR,"%s():%d: Debug: hist_table_num=%d\n", + __FUNCTION__,__LINE__,priv->phandle->histogram_table_num); + for (i = 0; i < priv->phandle->histogram_table_num; i++) { + priv->hist_proc[i].ant_idx = i; + priv->hist_proc[i].priv = priv; + snprintf(hist_entry, sizeof(hist_entry), "wlan-ant%d", + i); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + r = proc_create_data(hist_entry, 0664, priv->hist_entry, + &histogram_proc_fops, + &priv->hist_proc[i]); + if (r == NULL) +#else + r = create_proc_entry("histogram", 0664, + priv->hist_entry); + if (r) { + r->data = &priv->hist_proc[i]; + r->proc_fops = &histogram_proc_fops; + } else #endif - r2->proc_fops = &hgm_file_ops; - r2->uid = 0; - r2->gid = 1008; // wifi group - mlan_hist_data_clear(); - + { + PRINTM(MMSG, + "Fail to create proc histogram entry %s\n", + hist_entry); + LEAVE(); + return; + } + r->uid = 0; + r->gid = 1008; // wifi group + } + } r3 = create_proc_entry("peers", 0664, priv->proc_entry); if (r3 == NULL) { LEAVE(); @@ -1487,27 +1565,58 @@ woal_debug_entry(moal_private * priv) woal_peer_list_size = 0; sema_init(&woal_peer_sem,1); + if(priv->bss_type == MLAN_BSS_TYPE_STA || priv->bss_type == MLAN_BSS_TYPE_UAP){ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + r = proc_create_data("log", 0644, priv->proc_entry, &log_proc_fops, priv); + if (r == NULL) +#else + r = create_proc_entry("log", 0644, priv->proc_entry); + if (r) { + r->data = priv; + r->proc_fops = &log_proc_fops; + } else +#endif + { + PRINTM(MMSG,"Fail to create proc log entry\n"); + LEAVE(); + return; + } + } LEAVE(); } /** * @brief Remove proc file * - * @param priv A pointer to a moal_private structure + * @param priv A pointer to a moal_private structure * - * @return N/A + * @return N/A */ void -woal_debug_remove(moal_private * priv) +woal_debug_remove(moal_private *priv) { + char hist_entry[50]; + int i; ENTER(); kfree(priv->items_priv.items); /* Remove proc entry */ remove_proc_entry("debug", priv->proc_entry); - remove_proc_entry("histogram", priv->proc_entry); + if (priv->bss_type == MLAN_BSS_TYPE_STA || + priv->bss_type == MLAN_BSS_TYPE_UAP) { + for (i = 0; i < priv->phandle->histogram_table_num; i++) { + snprintf(hist_entry, sizeof(hist_entry), "wlan-ant%d", + i); + remove_proc_entry(hist_entry, priv->hist_entry); + } + remove_proc_entry("histogram", priv->proc_entry); + } + if (priv->bss_type == MLAN_BSS_TYPE_STA || + priv->bss_type == MLAN_BSS_TYPE_UAP) woal_peer_delete_peer_list(); remove_proc_entry("peers", priv->proc_entry); + if(priv->bss_type == MLAN_BSS_TYPE_STA || priv->bss_type == MLAN_BSS_TYPE_UAP) + remove_proc_entry("log", priv->proc_entry); LEAVE(); } diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_eth_ioctl.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_eth_ioctl.c old mode 100755 new mode 100644 index ab0ed9e2..5d5e200f --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_eth_ioctl.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_eth_ioctl.c @@ -47,12 +47,17 @@ static t_u8 SupportedInfraBand[] = { BAND_B, BAND_B | BAND_G, BAND_G, BAND_GN, BAND_B | BAND_G | BAND_GN, BAND_G | BAND_GN, + BAND_A, BAND_B | BAND_A, BAND_B | BAND_G | BAND_A, BAND_G | BAND_A, + BAND_A | BAND_B | BAND_G | BAND_AN | BAND_GN, + BAND_A | BAND_G | BAND_AN | BAND_GN, BAND_A | BAND_AN, }; /** Bands supported in Ad-Hoc mode */ static t_u8 SupportedAdhocBand[] = { BAND_B, BAND_B | BAND_G, BAND_G, BAND_GN, BAND_B | BAND_G | BAND_GN, BAND_G | BAND_GN, + BAND_A, + BAND_AN, BAND_A | BAND_AN, }; /******************************************************** @@ -85,7 +90,7 @@ extern int hw_test; * @return MLAN_STATUS_SUCCESS */ mlan_status -parse_arguments(t_u8 * pos, int *data, int datalen, int *user_data_len) +parse_arguments(t_u8 *pos, int *data, int datalen, int *user_data_len) { unsigned int i, j, k; char cdata[10]; @@ -136,7 +141,7 @@ parse_arguments(t_u8 * pos, int *data, int datalen, int *user_data_len) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_set_ap_wps_p2p_ie(moal_private * priv, t_u8 * ie, size_t len) +woal_set_ap_wps_p2p_ie(moal_private *priv, t_u8 *ie, size_t len) { mlan_status ret = MLAN_STATUS_SUCCESS; t_u8 *pos = ie; @@ -160,7 +165,8 @@ woal_set_ap_wps_p2p_ie(moal_private * priv, t_u8 * ie, size_t len) if (MLAN_STATUS_SUCCESS != woal_cfg80211_mgmt_frame_ie(priv, pos, ie_len, NULL, 0, NULL, 0, NULL, 0, - MGMT_MASK_BEACON_WPS_P2P)) { + MGMT_MASK_BEACON_WPS_P2P, + MOAL_IOCTL_WAIT)) { PRINTM(MERROR, "Failed to set beacon wps/p2p ie\n"); ret = -EFAULT; goto done; @@ -171,7 +177,8 @@ woal_set_ap_wps_p2p_ie(moal_private * priv, t_u8 * ie, size_t len) if (MLAN_STATUS_SUCCESS != woal_cfg80211_mgmt_frame_ie(priv, NULL, 0, pos, ie_len, NULL, 0, NULL, 0, - MGMT_MASK_PROBE_RESP)) { + MGMT_MASK_PROBE_RESP, + MOAL_IOCTL_WAIT)) { PRINTM(MERROR, "Failed to set probe resp ie\n"); ret = -EFAULT; goto done; @@ -182,7 +189,8 @@ woal_set_ap_wps_p2p_ie(moal_private * priv, t_u8 * ie, size_t len) if (MLAN_STATUS_SUCCESS != woal_cfg80211_mgmt_frame_ie(priv, NULL, 0, NULL, 0, pos, ie_len, NULL, 0, - MGMT_MASK_ASSOC_RESP)) { + MGMT_MASK_ASSOC_RESP, + MOAL_IOCTL_WAIT)) { PRINTM(MERROR, "Failed to set assoc resp ie\n"); ret = -EFAULT; goto done; @@ -207,7 +215,7 @@ woal_set_ap_wps_p2p_ie(moal_private * priv, t_u8 * ie, size_t len) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_set_miracast_mode(moal_private * priv, t_u8 * pdata, size_t len) +woal_set_miracast_mode(moal_private *priv, t_u8 *pdata, size_t len) { mlan_status ret = MLAN_STATUS_SUCCESS; t_u8 *pos = pdata; @@ -256,7 +264,7 @@ woal_set_miracast_mode(moal_private * priv, t_u8 * pdata, size_t len) * @return Number of bytes written, negative for failure. */ int -woal_get_priv_driver_version(moal_private * priv, t_u8 * respbuf, +woal_get_priv_driver_version(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int len = 0, ret = -1; @@ -299,7 +307,7 @@ woal_get_priv_driver_version(moal_private * priv, t_u8 * respbuf, * @return Number of bytes written, negative for failure. */ int -woal_priv_hostcmd(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_hostcmd(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; t_u8 *data_ptr; @@ -312,7 +320,7 @@ woal_priv_hostcmd(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ENTER(); data_ptr = respbuf + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_HOSTCMD)); - buf_len = *((t_u32 *) data_ptr); + buf_len = *((t_u32 *)data_ptr); memcpy(&cmd_header, data_ptr + sizeof(buf_len), sizeof(HostCmd_Header)); PRINTM(MINFO, "Host command len = %d\n", @@ -327,7 +335,7 @@ woal_priv_hostcmd(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ret = -ENOMEM; goto error; } - misc_cfg = (mlan_ds_misc_cfg *) req->pbuf; + misc_cfg = (mlan_ds_misc_cfg *)req->pbuf; misc_cfg->sub_command = MLAN_OID_MISC_HOST_CMD; req->req_id = MLAN_IOCTL_MISC_CFG; req->action = MLAN_ACT_SET; @@ -345,7 +353,7 @@ woal_priv_hostcmd(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) misc_cfg->param.hostcmd.len); ret = misc_cfg->param.hostcmd.len + sizeof(buf_len) + strlen(CMD_MARVELL) + strlen(PRIV_CMD_HOSTCMD); - memcpy(data_ptr, (t_u8 *) & ret, sizeof(t_u32)); + memcpy(data_ptr, (t_u8 *)&ret, sizeof(t_u32)); error: if (status != MLAN_STATUS_PENDING) @@ -365,7 +373,7 @@ woal_priv_hostcmd(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_priv_customie(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_customie(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; t_u8 *data_ptr; @@ -377,18 +385,19 @@ woal_priv_customie(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ENTER(); data_ptr = respbuf + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_CUSTOMIE)); - custom_ie = (mlan_ds_misc_custom_ie *) data_ptr; + custom_ie = (mlan_ds_misc_custom_ie *)data_ptr; ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); if (ioctl_req == NULL) { ret = -ENOMEM; goto done; } - misc = (mlan_ds_misc_cfg *) ioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; misc->sub_command = MLAN_OID_MISC_CUSTOM_IE; ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; - if ((custom_ie->len == 0) || - (custom_ie->len == sizeof(custom_ie->ie_data_list[0].ie_index))) + if ((custom_ie->len == 0)||(custom_ie->len == + sizeof(custom_ie->ie_data_list[0]. + ie_index))) ioctl_req->action = MLAN_ACT_GET; else ioctl_req->action = MLAN_ACT_SET; @@ -400,7 +409,7 @@ woal_priv_customie(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ret = -EFAULT; goto done; } - custom_ie = (mlan_ds_misc_custom_ie *) data_ptr; + custom_ie = (mlan_ds_misc_custom_ie *)data_ptr; memcpy(custom_ie, &misc->param.cust_ie, sizeof(mlan_ds_misc_custom_ie)); ret = sizeof(mlan_ds_misc_custom_ie); if (ioctl_req->status_code == MLAN_ERROR_IOCTL_FAIL) { @@ -424,7 +433,7 @@ woal_priv_customie(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_setget_priv_bandcfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_setget_priv_bandcfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; unsigned int i; @@ -470,7 +479,7 @@ woal_setget_priv_bandcfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ret = -ENOMEM; goto error; } - radio_cfg = (mlan_ds_radio_cfg *) req->pbuf; + radio_cfg = (mlan_ds_radio_cfg *)req->pbuf; radio_cfg->sub_command = MLAN_OID_BAND_CFG; req->req_id = MLAN_IOCTL_RADIO_CFG; @@ -512,7 +521,7 @@ woal_setget_priv_bandcfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) } } if (user_data_len == 4) { - if (!(adhoc_band & (BAND_GN))) { + if (!(adhoc_band & (BAND_GN | BAND_AN))) { PRINTM(MERROR, "11n is not enabled for adhoc, can not set HT/VHT channel bandwidth\n"); ret = -EINVAL; @@ -546,7 +555,7 @@ woal_setget_priv_bandcfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto error; } - band_cfg = (mlan_ds_band_cfg *) respbuf; + band_cfg = (mlan_ds_band_cfg *)respbuf; memcpy(band_cfg, &radio_cfg->param.band_cfg, sizeof(mlan_ds_band_cfg)); @@ -570,7 +579,7 @@ woal_setget_priv_bandcfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_setget_priv_httxcfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_setget_priv_httxcfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { t_u32 data[2]; mlan_ioctl_req *req = NULL; @@ -603,7 +612,7 @@ woal_setget_priv_httxcfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_CFG_TX; req->req_id = MLAN_IOCTL_11N_CFG; @@ -637,6 +646,18 @@ woal_setget_priv_httxcfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) data[0] = cfg_11n->param.tx_cfg.httxcap; PRINTM(MINFO, "GET: httxcap:0x%x\n", data[0]); + if (req->action == MLAN_ACT_GET) { + cfg_11n->param.tx_cfg.httxcap = 0; + cfg_11n->param.tx_cfg.misc_cfg = BAND_SELECT_A; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + data[1] = cfg_11n->param.tx_cfg.httxcap; + PRINTM(MINFO, "GET: httxcap for 5GHz:0x%x\n", data[1]); + } + memcpy(respbuf, data, sizeof(data)); ret = sizeof(data); @@ -657,8 +678,7 @@ woal_setget_priv_httxcfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_setget_priv_htcapinfo(moal_private * priv, t_u8 * respbuf, - t_u32 respbuflen) +woal_setget_priv_htcapinfo(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data[2]; mlan_ioctl_req *req = NULL; @@ -693,7 +713,7 @@ woal_setget_priv_htcapinfo(moal_private * priv, t_u8 * respbuf, goto done; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_HTCAP_CFG; req->req_id = MLAN_IOCTL_11N_CFG; @@ -727,8 +747,21 @@ woal_setget_priv_htcapinfo(moal_private * priv, t_u8 * respbuf, data[0] = cfg_11n->param.htcap_cfg.htcap; PRINTM(MINFO, "GET: htcapinfo for 2.4GHz:0x%x\n", data[0]); - ht_cap = (woal_ht_cap_info *) respbuf; + if (req->action == MLAN_ACT_GET) { + cfg_11n->param.htcap_cfg.htcap = 0; + cfg_11n->param.htcap_cfg.misc_cfg = BAND_SELECT_A; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + data[1] = cfg_11n->param.htcap_cfg.htcap; + PRINTM(MINFO, "GET: htcapinfo for 5GHz:0x%x\n", data[1]); + } + + ht_cap = (woal_ht_cap_info *)respbuf; ht_cap->ht_cap_info_bg = data[0]; + ht_cap->ht_cap_info_a = data[1]; ret = sizeof(woal_ht_cap_info); done: @@ -748,8 +781,7 @@ woal_setget_priv_htcapinfo(moal_private * priv, t_u8 * respbuf, * @return Number of bytes written, negative for failure. */ int -woal_setget_priv_addbapara(moal_private * priv, t_u8 * respbuf, - t_u32 respbuflen) +woal_setget_priv_addbapara(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data[5]; mlan_ioctl_req *req = NULL; @@ -800,7 +832,7 @@ woal_setget_priv_addbapara(moal_private * priv, t_u8 * respbuf, goto done; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_CFG_ADDBA_PARAM; req->req_id = MLAN_IOCTL_11N_CFG; @@ -825,7 +857,7 @@ woal_setget_priv_addbapara(moal_private * priv, t_u8 * respbuf, goto done; } - addba = (woal_addba *) respbuf; + addba = (woal_addba *)respbuf; addba->time_out = cfg_11n->param.addba_param.timeout; addba->tx_win_size = cfg_11n->param.addba_param.txwinsize; @@ -857,7 +889,7 @@ woal_setget_priv_addbapara(moal_private * priv, t_u8 * respbuf, * @return Number of bytes written, negative for failure. */ int -woal_priv_delba(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_delba(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { t_u32 data[2] = { 0xFF, 0xFF }; mlan_ioctl_req *req = NULL; @@ -915,16 +947,16 @@ woal_priv_delba(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ret = -ENOMEM; goto done; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; req->req_id = MLAN_IOCTL_11N_CFG; cfg_11n->sub_command = MLAN_OID_11N_CFG_DELBA; del_ba = &cfg_11n->param.del_ba; memset(del_ba, 0, sizeof(mlan_ds_11n_delba)); - del_ba->direction = (t_u8) data[0]; + del_ba->direction = (t_u8)data[0]; del_ba->tid = DELBA_ALL_TIDS; if (user_data_len > 1) - del_ba->tid = (t_u8) data[1]; + del_ba->tid = (t_u8)data[1]; if (user_data_len > 2) memcpy(del_ba->peer_mac_addr, peer_mac, ETH_ALEN); @@ -954,7 +986,7 @@ woal_priv_delba(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_priv_rejectaddbareq(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_rejectaddbareq(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { t_u32 data[1]; mlan_ioctl_req *req = NULL; @@ -989,7 +1021,7 @@ woal_priv_rejectaddbareq(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_CFG_REJECT_ADDBA_REQ; req->req_id = MLAN_IOCTL_11N_CFG; @@ -1034,7 +1066,7 @@ woal_priv_rejectaddbareq(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_ioctl_addba_reject(moal_private * priv, t_u32 action, t_u8 * addba_reject) +woal_ioctl_addba_reject(moal_private *priv, t_u32 action, t_u8 *addba_reject) { mlan_ioctl_req *req = NULL; mlan_ds_11n_cfg *cfg_11n = NULL; @@ -1047,7 +1079,7 @@ woal_ioctl_addba_reject(moal_private * priv, t_u32 action, t_u8 * addba_reject) goto done; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_CFG_ADDBA_REJECT; req->req_id = MLAN_IOCTL_11N_CFG; @@ -1079,8 +1111,8 @@ woal_ioctl_addba_reject(moal_private * priv, t_u32 action, t_u8 * addba_reject) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_ioctl_aggr_prio_tbl(moal_private * priv, t_u32 action, - mlan_ds_11n_aggr_prio_tbl * aggr_prio_tbl) +woal_ioctl_aggr_prio_tbl(moal_private *priv, t_u32 action, + mlan_ds_11n_aggr_prio_tbl *aggr_prio_tbl) { mlan_ioctl_req *req = NULL; mlan_ds_11n_cfg *cfg_11n = NULL; @@ -1094,7 +1126,7 @@ woal_ioctl_aggr_prio_tbl(moal_private * priv, t_u32 action, goto done; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_CFG_AGGR_PRIO_TBL; req->req_id = MLAN_IOCTL_11N_CFG; @@ -1127,8 +1159,8 @@ woal_ioctl_aggr_prio_tbl(moal_private * priv, t_u32 action, * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_ioctl_addba_param(moal_private * priv, t_u32 action, - mlan_ds_11n_addba_param * addba_param) +woal_ioctl_addba_param(moal_private *priv, t_u32 action, + mlan_ds_11n_addba_param *addba_param) { mlan_ioctl_req *req = NULL; mlan_ds_11n_cfg *cfg_11n = NULL; @@ -1142,7 +1174,7 @@ woal_ioctl_addba_param(moal_private * priv, t_u32 action, goto done; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_CFG_ADDBA_PARAM; req->req_id = MLAN_IOCTL_11N_CFG; @@ -1175,9 +1207,9 @@ woal_ioctl_addba_param(moal_private * priv, t_u32 action, * @return 0 --success, otherwise failure */ int -woal_set_rx_ba_winsize(moal_private * priv, t_u8 * respbuf, int respbuflen) +woal_set_rx_ba_winsize(moal_private *priv, t_u8 *respbuf, int respbuflen) { - t_u32 data[2]; + int data[2]; t_u8 addba_reject[MAX_NUM_TID]; mlan_ds_11n_addba_param addba_param; int ret = 0; @@ -1238,7 +1270,7 @@ woal_set_rx_ba_winsize(moal_private * priv, t_u8 * respbuf, int respbuflen) if (MLAN_STATUS_SUCCESS != woal_ioctl_addba_param(priv, MLAN_ACT_SET, &addba_param)) - ret = -EFAULT; + ret = -EFAULT; } } @@ -1258,13 +1290,15 @@ woal_set_rx_ba_winsize(moal_private * priv, t_u8 * respbuf, int respbuflen) * @return 0 --success, otherwise failure */ int -woal_set_tx_ba_winsize(moal_private * priv, t_u8 * respbuf, int respbuflen) +woal_set_tx_ba_winsize(moal_private *priv, t_u8 *respbuf, int respbuflen) { - t_u32 data[2]; + int data[2]; mlan_ds_11n_aggr_prio_tbl aggr_prio_tbl; mlan_ds_11n_addba_param addba_param; - t_u8 tos_to_tid_inv[] = - { 0x02, 0x00, 0x01, 0x03, 0x04, 0x05, 0x06, 0x07 }; + t_u8 tos_to_tid_inv[] = { + 0x02, 0x00, 0x01, 0x03, + 0x04, 0x05, 0x06, 0x07 + }; int ret = 0; int user_data_len = 0; @@ -1303,7 +1337,7 @@ woal_set_tx_ba_winsize(moal_private * priv, t_u8 * respbuf, int respbuflen) if (MLAN_STATUS_SUCCESS != woal_ioctl_aggr_prio_tbl(priv, MLAN_ACT_SET, &aggr_prio_tbl)) - ret = -EFAULT; + ret = -EFAULT; } } else { if (aggr_prio_tbl.ampdu[data[0]] == 0xff) { @@ -1326,7 +1360,7 @@ woal_set_tx_ba_winsize(moal_private * priv, t_u8 * respbuf, int respbuflen) if (MLAN_STATUS_SUCCESS != woal_ioctl_addba_param(priv, MLAN_ACT_SET, &addba_param)) - ret = -EFAULT; + ret = -EFAULT; } } @@ -1346,7 +1380,7 @@ woal_set_tx_ba_winsize(moal_private * priv, t_u8 * respbuf, int respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_setget_priv_aggrpriotbl(moal_private * priv, t_u8 * respbuf, +woal_setget_priv_aggrpriotbl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data[MAX_NUM_TID * 2], i, j; @@ -1390,7 +1424,7 @@ woal_setget_priv_aggrpriotbl(moal_private * priv, t_u8 * respbuf, goto done; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_CFG_AGGR_PRIO_TBL; req->req_id = MLAN_IOCTL_11N_CFG; @@ -1436,7 +1470,7 @@ woal_setget_priv_aggrpriotbl(moal_private * priv, t_u8 * respbuf, * @return Number of bytes written, negative for failure. */ int -woal_setget_priv_addbareject(moal_private * priv, t_u8 * respbuf, +woal_setget_priv_addbareject(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data[MAX_NUM_TID], i; @@ -1479,7 +1513,7 @@ woal_setget_priv_addbareject(moal_private * priv, t_u8 * respbuf, goto done; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_CFG_ADDBA_REJECT; req->req_id = MLAN_IOCTL_11N_CFG; @@ -1487,9 +1521,8 @@ woal_setget_priv_addbareject(moal_private * priv, t_u8 * respbuf, /* Get add BA reject configuration from MLAN */ req->action = MLAN_ACT_GET; } else { - for (i = 0; i < user_data_len; i++) { + for (i = 0; i < user_data_len; i++) cfg_11n->param.addba_reject[i] = data[i]; - } /* Update add BA reject configuration in MLAN */ req->action = MLAN_ACT_SET; } @@ -1499,9 +1532,8 @@ woal_setget_priv_addbareject(moal_private * priv, t_u8 * respbuf, goto done; } - for (i = 0; i < MAX_NUM_TID; i++) { + for (i = 0; i < MAX_NUM_TID; i++) respbuf[i] = cfg_11n->param.addba_reject[i]; - } ret = sizeof(data); @@ -1523,7 +1555,7 @@ woal_setget_priv_addbareject(moal_private * priv, t_u8 * respbuf, * @return Number of bytes written, negative for failure. */ int -woal_get_priv_datarate(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_get_priv_datarate(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { mlan_ioctl_req *req = NULL; mlan_ds_rate *rate = NULL; @@ -1539,7 +1571,7 @@ woal_get_priv_datarate(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - rate = (mlan_ds_rate *) req->pbuf; + rate = (mlan_ds_rate *)req->pbuf; rate->sub_command = MLAN_OID_GET_DATA_RATE; req->req_id = MLAN_IOCTL_RATE; req->action = MLAN_ACT_GET; @@ -1550,7 +1582,7 @@ woal_get_priv_datarate(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - data_rate = (mlan_data_rate *) respbuf; + data_rate = (mlan_data_rate *)respbuf; memcpy(data_rate, &rate->param.data_rate, sizeof(mlan_data_rate)); @@ -1574,8 +1606,7 @@ woal_get_priv_datarate(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_setget_priv_txratecfg(moal_private * priv, t_u8 * respbuf, - t_u32 respbuflen) +woal_setget_priv_txratecfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { t_u32 data[3]; mlan_ioctl_req *req = NULL; @@ -1612,7 +1643,7 @@ woal_setget_priv_txratecfg(moal_private * priv, t_u8 * respbuf, } req->req_id = MLAN_IOCTL_RATE; - rate = (mlan_ds_rate *) req->pbuf; + rate = (mlan_ds_rate *)req->pbuf; rate->sub_command = MLAN_OID_RATE_CFG; rate->param.rate_cfg.rate_type = MLAN_RATE_INDEX; @@ -1659,10 +1690,9 @@ woal_setget_priv_txratecfg(moal_private * priv, t_u8 * respbuf, PRINTM(MINFO, "SET: txratefg index: 0x%x\n", data[1]); rate->param.rate_cfg.rate = data[1]; - if (data[0] == MLAN_RATE_FORMAT_HT) { + if (data[0] == MLAN_RATE_FORMAT_HT) rate->param.rate_cfg.rate = data[1] + MLAN_RATE_INDEX_MCS0; - } } } @@ -1673,7 +1703,7 @@ woal_setget_priv_txratecfg(moal_private * priv, t_u8 * respbuf, goto done; } - ratecfg = (woal_tx_rate_cfg *) respbuf; + ratecfg = (woal_tx_rate_cfg *)respbuf; if (rate->param.rate_cfg.is_rate_auto == MTRUE) { ratecfg->rate_format = 0xFF; } else { @@ -1710,8 +1740,8 @@ woal_setget_priv_txratecfg(moal_private * priv, t_u8 * respbuf, * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_get_stats_info(moal_private * priv, t_u8 wait_option, - mlan_ds_get_stats * stats) +woal_get_stats_info(moal_private *priv, t_u8 wait_option, + mlan_ds_get_stats *stats) { int ret = 0; mlan_ds_get_info *info = NULL; @@ -1727,7 +1757,7 @@ woal_get_stats_info(moal_private * priv, t_u8 wait_option, } /* Fill request buffer */ - info = (mlan_ds_get_info *) req->pbuf; + info = (mlan_ds_get_info *)req->pbuf; info->sub_command = MLAN_OID_GET_STATS; req->req_id = MLAN_IOCTL_GET_INFO; req->action = MLAN_ACT_GET; @@ -1761,7 +1791,7 @@ woal_get_stats_info(moal_private * priv, t_u8 wait_option, * @return Number of bytes written, negative for failure. */ int -woal_get_priv_getlog(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_get_priv_getlog(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; mlan_ds_get_stats *stats; @@ -1773,7 +1803,7 @@ woal_get_priv_getlog(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ret = -EFAULT; goto done; } - stats = (mlan_ds_get_stats *) respbuf; + stats = (mlan_ds_get_stats *)respbuf; if (MLAN_STATUS_SUCCESS != woal_get_stats_info(priv, MOAL_IOCTL_WAIT, stats)) { PRINTM(MERROR, "Get log: Failed to get stats info!"); @@ -1789,6 +1819,266 @@ woal_get_priv_getlog(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) } #endif +/** + * @brief Set/Get esupplicant mode configurations + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_setget_priv_esuppmode(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + t_u32 data[3]; + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + woal_esuppmode_cfg *esupp_mode = NULL; + int ret = 0; + int user_data_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (!priv->phandle->card_info->embedded_supp) { + PRINTM(MERROR, "Not supported cmd on this card\n"); + ret = -EOPNOTSUPP; + goto done; + } + if (strlen(respbuf) == + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_ESUPPMODE))) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_ESUPPMODE), data, + ARRAY_SIZE(data), &user_data_len); + } + + if (user_data_len >= 4 || user_data_len == 1 || user_data_len == 2) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + req->req_id = MLAN_IOCTL_SEC_CFG; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_ESUPP_MODE; + + if (user_data_len == 0) { + /* Get operation */ + req->action = MLAN_ACT_GET; + } else { + /* Set operation */ + req->action = MLAN_ACT_SET; + /* RSN mode */ + sec->param.esupp_mode.rsn_mode = data[0]; + /* Pairwise cipher */ + sec->param.esupp_mode.act_paircipher = (data[1] & 0xFF); + /* Group cipher */ + sec->param.esupp_mode.act_groupcipher = (data[2] & 0xFF); + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + esupp_mode = (woal_esuppmode_cfg *)respbuf; + esupp_mode->rsn_mode = + (t_u16)((sec->param.esupp_mode.rsn_mode) & 0xFFFF); + esupp_mode->pairwise_cipher = + (t_u8)((sec->param.esupp_mode.act_paircipher) & 0xFF); + esupp_mode->group_cipher = + (t_u8)((sec->param.esupp_mode.act_groupcipher) & 0xFF); + + ret = sizeof(woal_esuppmode_cfg); +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; + +} + +/** + * @brief Set/Get esupplicant passphrase configurations + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_setget_priv_passphrase(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + int ret = 0, action = -1, i = 0; + char *begin, *end, *opt; + t_u16 len = 0; + t_u8 zero_mac[] = { 0, 0, 0, 0, 0, 0 }; + t_u8 *mac = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + if (!priv->phandle->card_info->embedded_supp) { + PRINTM(MERROR, "Not supported cmd on this card\n"); + ret = -EOPNOTSUPP; + goto done; + } + + if (strlen(respbuf) == + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_PASSPHRASE))) { + PRINTM(MERROR, "No arguments provided\n"); + ret = -EINVAL; + goto done; + } + + /* Parse the buf to get the cmd_action */ + begin = respbuf + strlen(CMD_MARVELL) + strlen(PRIV_CMD_PASSPHRASE); + end = woal_strsep(&begin, ';', '/'); + if (end) + action = woal_atox(end); + if (action < 0 || action > 2 || end[1] != '\0') { + PRINTM(MERROR, "Invalid action argument %s\n", end); + ret = -EINVAL; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + req->req_id = MLAN_IOCTL_SEC_CFG; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_PASSPHRASE; + if (action == 0) + req->action = MLAN_ACT_GET; + else + req->action = MLAN_ACT_SET; + + while (begin) { + end = woal_strsep(&begin, ';', '/'); + opt = woal_strsep(&end, '=', '/'); + if (!opt || !end || !end[0]) { + PRINTM(MERROR, "Invalid option\n"); + ret = -EINVAL; + break; + } else if (!strnicmp(opt, "ssid", strlen(opt))) { + if (strlen(end) > MLAN_MAX_SSID_LENGTH) { + PRINTM(MERROR, + "SSID length exceeds max length\n"); + ret = -EFAULT; + break; + } + sec->param.passphrase.ssid.ssid_len = strlen(end); + strncpy((char *)sec->param.passphrase.ssid.ssid, end, + strlen(end)); + PRINTM(MINFO, "ssid=%s, len=%d\n", + sec->param.passphrase.ssid.ssid, + (int)sec->param.passphrase.ssid.ssid_len); + } else if (!strnicmp(opt, "bssid", strlen(opt))) { + woal_mac2u8((t_u8 *)&sec->param.passphrase.bssid, end); + } else if (!strnicmp(opt, "psk", strlen(opt)) && + req->action == MLAN_ACT_SET) { + if (strlen(end) != MLAN_PMK_HEXSTR_LENGTH) { + PRINTM(MERROR, "Invalid PMK length\n"); + ret = -EINVAL; + break; + } + woal_ascii2hex((t_u8 *)(sec->param.passphrase.psk.pmk. + pmk), end, + MLAN_PMK_HEXSTR_LENGTH / 2); + sec->param.passphrase.psk_type = MLAN_PSK_PMK; + } else if (!strnicmp(opt, "passphrase", strlen(opt)) && + req->action == MLAN_ACT_SET) { + if (strlen(end) < MLAN_MIN_PASSPHRASE_LENGTH || + strlen(end) > MLAN_MAX_PASSPHRASE_LENGTH) { + PRINTM(MERROR, + "Invalid length for passphrase\n"); + ret = -EINVAL; + break; + } + sec->param.passphrase.psk_type = MLAN_PSK_PASSPHRASE; + memcpy(sec->param.passphrase.psk.passphrase.passphrase, + end, + sizeof(sec->param.passphrase.psk.passphrase. + passphrase)); + sec->param.passphrase.psk.passphrase.passphrase_len = + strlen(end); + PRINTM(MINFO, "passphrase=%s, len=%d\n", + sec->param.passphrase.psk.passphrase.passphrase, + (int)sec->param.passphrase.psk.passphrase. + passphrase_len); + } else { + PRINTM(MERROR, "Invalid option %s\n", opt); + ret = -EINVAL; + break; + } + } + if (ret) + goto done; + + if (action == 2) + sec->param.passphrase.psk_type = MLAN_PSK_CLEAR; + else if (action == 0) + sec->param.passphrase.psk_type = MLAN_PSK_QUERY; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memset(respbuf, 0, respbuflen); + if (sec->param.passphrase.ssid.ssid_len) { + len += sprintf(respbuf + len, "ssid:"); + memcpy(respbuf + len, sec->param.passphrase.ssid.ssid, + sec->param.passphrase.ssid.ssid_len); + len += sec->param.passphrase.ssid.ssid_len; + len += sprintf(respbuf + len, " "); + } + if (memcmp(&sec->param.passphrase.bssid, zero_mac, sizeof(zero_mac))) { + mac = (t_u8 *)&sec->param.passphrase.bssid; + len += sprintf(respbuf + len, "bssid:"); + for (i = 0; i < ETH_ALEN - 1; ++i) + len += sprintf(respbuf + len, "%02x:", mac[i]); + len += sprintf(respbuf + len, "%02x ", mac[i]); + } + if (sec->param.passphrase.psk_type == MLAN_PSK_PMK) { + len += sprintf(respbuf + len, "psk:"); + for (i = 0; i < MLAN_MAX_KEY_LENGTH; ++i) + len += sprintf(respbuf + len, "%02x", + sec->param.passphrase.psk.pmk.pmk[i]); + len += sprintf(respbuf + len, "\n"); + } + if (sec->param.passphrase.psk_type == MLAN_PSK_PASSPHRASE) + len += sprintf(respbuf + len, "passphrase:%s\n", + sec->param.passphrase.psk.passphrase.passphrase); + + ret = len; +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; + +} + /** * @brief Deauthenticate * @@ -1799,7 +2089,7 @@ woal_get_priv_getlog(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_priv_deauth(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_deauth(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; t_u8 mac[ETH_ALEN]; @@ -1838,7 +2128,7 @@ woal_priv_deauth(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ static int -woal_priv_ap_deauth(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_ap_deauth(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { t_u8 *data_ptr; mlan_ioctl_req *ioctl_req = NULL; @@ -1861,7 +2151,7 @@ woal_priv_ap_deauth(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ret = -ENOMEM; goto done; } - bss = (mlan_ds_bss *) ioctl_req->pbuf; + bss = (mlan_ds_bss *)ioctl_req->pbuf; bss->sub_command = MLAN_OID_UAP_DEAUTH_STA; ioctl_req->req_id = MLAN_IOCTL_BSS; @@ -1892,7 +2182,7 @@ woal_priv_ap_deauth(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return 0 --success, otherwise fail */ static int -woal_priv_get_sta_list(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_get_sta_list(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; mlan_ds_get_info *info = NULL; @@ -1911,7 +2201,7 @@ woal_priv_get_sta_list(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - info = (mlan_ds_get_info *) ioctl_req->pbuf; + info = (mlan_ds_get_info *)ioctl_req->pbuf; info->sub_command = MLAN_OID_UAP_STA_LIST; ioctl_req->req_id = MLAN_IOCTL_GET_INFO; ioctl_req->action = MLAN_ACT_GET; @@ -1923,8 +2213,8 @@ woal_priv_get_sta_list(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) } sta_list = - (mlan_ds_sta_list *) (respbuf + strlen(CMD_MARVELL) + - strlen(PRIV_CMD_GET_STA_LIST)); + (mlan_ds_sta_list *)(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_GET_STA_LIST)); memcpy(sta_list, &info->param.sta_list, sizeof(mlan_ds_sta_list)); ret = sizeof(mlan_ds_sta_list); done: @@ -1942,7 +2232,7 @@ woal_priv_get_sta_list(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return 0 --success, otherwise fail */ static int -woal_priv_bss_config(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_bss_config(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; mlan_ds_bss *bss = NULL; @@ -1954,7 +2244,7 @@ woal_priv_bss_config(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ENTER(); offset = strlen(CMD_MARVELL) + strlen(PRIV_CMD_BSS_CONFIG); - memcpy((u8 *) & action, respbuf + offset, sizeof(action)); + memcpy((u8 *)&action, respbuf + offset, sizeof(action)); offset += sizeof(action); /* Allocate an IOCTL request buffer */ @@ -1966,7 +2256,7 @@ woal_priv_bss_config(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - bss = (mlan_ds_bss *) ioctl_req->pbuf; + bss = (mlan_ds_bss *)ioctl_req->pbuf; bss->sub_command = MLAN_OID_UAP_BSS_CONFIG; ioctl_req->req_id = MLAN_IOCTL_BSS; if (action == 1) { @@ -2009,7 +2299,7 @@ woal_priv_bss_config(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_priv_bssrole(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_bssrole(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { t_u32 data[1]; int ret = 0; @@ -2056,7 +2346,7 @@ woal_priv_bssrole(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) if (MLAN_STATUS_SUCCESS != woal_bss_role_cfg(priv, action, MOAL_IOCTL_WAIT, - (t_u8 *) data)) { + (t_u8 *)data)) { ret = -EFAULT; goto error; } @@ -2071,7 +2361,7 @@ woal_priv_bssrole(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) done: memset(respbuf, 0, respbuflen); - respbuf[0] = (t_u8) data[0]; + respbuf[0] = (t_u8)data[0]; ret = 1; error: @@ -2092,7 +2382,7 @@ woal_priv_bssrole(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_priv_setuserscan(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_setuserscan(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { wlan_user_scan_cfg scan_cfg; int ret = 0; @@ -2126,8 +2416,8 @@ woal_priv_setuserscan(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return MLAN_STATUS_SUCCESS --success, otherwise fail */ int -moal_ret_get_scan_table_ioctl(t_u8 * respbuf, t_u32 respbuflen, - mlan_scan_resp * scan_resp, t_u32 scan_start) +moal_ret_get_scan_table_ioctl(t_u8 *respbuf, t_u32 respbuflen, + mlan_scan_resp *scan_resp, t_u32 scan_start) { pBSSDescriptor_t pbss_desc, scan_table; wlan_ioctl_get_scan_table_info *prsp_info; @@ -2143,12 +2433,12 @@ moal_ret_get_scan_table_ioctl(t_u8 * respbuf, t_u32 respbuflen, num_scans_done = 0; ret_code = MLAN_STATUS_SUCCESS; - prsp_info = (wlan_ioctl_get_scan_table_info *) respbuf; - pcurrent = (t_u8 *) prsp_info->scan_table_entry_buf; + prsp_info = (wlan_ioctl_get_scan_table_info *)respbuf; + pcurrent = (t_u8 *)prsp_info->scan_table_entry_buf; pbuffer_end = respbuf + respbuflen - 1; space_left = pbuffer_end - pcurrent; - scan_table = (BSSDescriptor_t *) (scan_resp->pscan_table); + scan_table = (BSSDescriptor_t *)(scan_resp->pscan_table); PRINTM(MINFO, "GetScanTable: scan_start req = %d\n", scan_start); PRINTM(MINFO, "GetScanTable: length avail = %d\n", respbuflen); @@ -2163,9 +2453,9 @@ moal_ret_get_scan_table_ioctl(t_u8 * respbuf, t_u32 respbuflen, &pcurrent, &space_left); - if (ret_code == MLAN_STATUS_SUCCESS) { + if (ret_code == MLAN_STATUS_SUCCESS) num_scans_done = 1; - } + } else { scan_start--; @@ -2185,9 +2475,9 @@ moal_ret_get_scan_table_ioctl(t_u8 * respbuf, t_u32 respbuflen, &pcurrent, &space_left); - if (ret_code == MLAN_STATUS_SUCCESS) { + if (ret_code == MLAN_STATUS_SUCCESS) num_scans_done++; - } + } } @@ -2208,7 +2498,7 @@ moal_ret_get_scan_table_ioctl(t_u8 * respbuf, t_u32 respbuflen, * @return Number of bytes written, negative for failure. */ int -woal_priv_getscantable(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_getscantable(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; mlan_ioctl_req *req = NULL; @@ -2233,7 +2523,7 @@ woal_priv_getscantable(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) } /* Fill request buffer */ - scan = (mlan_ds_scan *) req->pbuf; + scan = (mlan_ds_scan *)req->pbuf; req->req_id = MLAN_IOCTL_SCAN; req->action = MLAN_ACT_GET; @@ -2241,11 +2531,11 @@ woal_priv_getscantable(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) memcpy(&scan_start, respbuf + strlen(CMD_MARVELL) + strlen(PRIV_CMD_GETSCANTABLE), sizeof(scan_start)); - if (scan_start) { + if (scan_start) scan->sub_command = MLAN_OID_SCAN_NORMAL; - } else { + else scan->sub_command = MLAN_OID_SCAN_GET_CURRENT_BSS; - } + /* Send IOCTL request to MLAN */ status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); if (status == MLAN_STATUS_SUCCESS) { @@ -2270,7 +2560,7 @@ woal_priv_getscantable(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_priv_extcapcfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_extcapcfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret, header; mlan_ioctl_req *req = NULL; @@ -2291,7 +2581,7 @@ woal_priv_extcapcfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - cfg = (mlan_ds_misc_cfg *) req->pbuf; + cfg = (mlan_ds_misc_cfg *)req->pbuf; cfg->sub_command = MLAN_OID_MISC_EXT_CAP_CFG; req->req_id = MLAN_IOCTL_MISC_CFG; header = strlen(CMD_MARVELL) + strlen(PRIV_CMD_EXTCAPCFG); @@ -2300,7 +2590,7 @@ woal_priv_extcapcfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) req->action = MLAN_ACT_GET; else { /* SET operation */ - ie = (IEEEtypes_Header_t *) (respbuf + header); + ie = (IEEEtypes_Header_t *)(respbuf + header); if (ie->len > sizeof(ExtCap_t)) { PRINTM(MERROR, "Extended Capability lenth is invalid\n"); @@ -2319,7 +2609,7 @@ woal_priv_extcapcfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) } memset(respbuf, 0, respbuflen); - ie = (IEEEtypes_Header_t *) respbuf; + ie = (IEEEtypes_Header_t *)respbuf; ie->element_id = EXT_CAPABILITY; ie->len = sizeof(ExtCap_t); memcpy(ie + 1, &cfg->param.ext_cap, sizeof(ExtCap_t)); @@ -2344,7 +2634,7 @@ woal_priv_extcapcfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_priv_setgetdeepsleep(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_setgetdeepsleep(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { t_u32 data[2]; int ret = 0; @@ -2420,7 +2710,7 @@ woal_priv_setgetdeepsleep(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_priv_setgetipaddr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_setgetipaddr(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { mlan_ioctl_req *req = NULL; mlan_ds_misc_cfg *misc = NULL; @@ -2444,7 +2734,7 @@ woal_priv_setgetipaddr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ret = -ENOMEM; goto done; } - misc = (mlan_ds_misc_cfg *) req->pbuf; + misc = (mlan_ds_misc_cfg *)req->pbuf; if (data_length < 1) { /* GET */ req->action = MLAN_ACT_GET; @@ -2473,7 +2763,7 @@ woal_priv_setgetipaddr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ret = -EINVAL; goto done; } - misc->param.ipaddr_cfg.op_code = (t_u32) op_code; + misc->param.ipaddr_cfg.op_code = (t_u32)op_code; } req->req_id = MLAN_IOCTL_MISC_CFG; @@ -2514,7 +2804,7 @@ woal_priv_setgetipaddr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_priv_setwpssession(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_setwpssession(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { mlan_ioctl_req *req = NULL; mlan_ds_wps_cfg *pwps = NULL; @@ -2548,7 +2838,7 @@ woal_priv_setwpssession(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ret = -ENOMEM; goto done; } - pwps = (mlan_ds_wps_cfg *) req->pbuf; + pwps = (mlan_ds_wps_cfg *)req->pbuf; req->req_id = MLAN_IOCTL_WPS_CFG; req->action = MLAN_ACT_SET; @@ -2583,7 +2873,7 @@ woal_priv_setwpssession(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_priv_otpuserdata(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_otpuserdata(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data[1]; int user_data_len = 0; @@ -2620,7 +2910,7 @@ woal_priv_otpuserdata(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) req->action = MLAN_ACT_GET; req->req_id = MLAN_IOCTL_MISC_CFG; - misc = (mlan_ds_misc_cfg *) req->pbuf; + misc = (mlan_ds_misc_cfg *)req->pbuf; misc->sub_command = MLAN_OID_MISC_OTP_USER_DATA; misc->param.otp_user_data.user_data_length = data[0]; @@ -2629,7 +2919,7 @@ woal_priv_otpuserdata(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ret = -EFAULT; goto done; } - otp = (mlan_ds_misc_otp_user_data *) req->pbuf; + otp = (mlan_ds_misc_otp_user_data *)req->pbuf; if (req->action == MLAN_ACT_GET) { ret = MIN(otp->user_data_length, data[0]); @@ -2653,7 +2943,7 @@ woal_priv_otpuserdata(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_priv_set_get_countrycode(moal_private * priv, t_u8 * respbuf, +woal_priv_set_get_countrycode(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; @@ -2683,7 +2973,7 @@ woal_priv_set_get_countrycode(moal_private * priv, t_u8 * respbuf, } /* Fill request buffer */ - pcfg_misc = (mlan_ds_misc_cfg *) req->pbuf; + pcfg_misc = (mlan_ds_misc_cfg *)req->pbuf; country_code = &pcfg_misc->param.country_code; pcfg_misc->sub_command = MLAN_OID_MISC_COUNTRY_CODE; req->req_id = MLAN_IOCTL_MISC_CFG; @@ -2728,7 +3018,7 @@ woal_priv_set_get_countrycode(moal_private * priv, t_u8 * respbuf, * @return Number of bytes written, negative for failure. */ int -woal_priv_setgettcpackenh(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_setgettcpackenh(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { t_u32 data[1]; int ret = 0; @@ -2793,7 +3083,7 @@ woal_priv_setgettcpackenh(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_priv_assocessid(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_assocessid(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { mlan_802_11_ssid req_ssid; mlan_ssid_bssid ssid_bssid; @@ -2887,7 +3177,7 @@ woal_priv_assocessid(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_priv_getwakeupreason(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_getwakeupreason(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { mlan_ioctl_req *req = NULL; mlan_ds_pm_cfg *pm_cfg = NULL; @@ -2900,13 +3190,13 @@ woal_priv_getwakeupreason(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) if (strlen(respbuf) == (strlen(CMD_MARVELL) + strlen(PRIV_CMD_WAKEUPREASON))) { /* GET operation */ - req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); if (req == NULL) { LEAVE(); return -ENOMEM; } - pm_cfg = (mlan_ds_pm_cfg *) req->pbuf; + pm_cfg = (mlan_ds_pm_cfg *)req->pbuf; pm_cfg->sub_command = MLAN_OID_PM_HS_WAKEUP_REASON; req->req_id = MLAN_IOCTL_PM_CFG; req->action = MLAN_ACT_GET; @@ -2946,7 +3236,7 @@ woal_priv_getwakeupreason(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_priv_set_get_listeninterval(moal_private * priv, t_u8 * respbuf, +woal_priv_set_get_listeninterval(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data[1]; @@ -2984,12 +3274,12 @@ woal_priv_set_get_listeninterval(moal_private * priv, t_u8 * respbuf, } /* Fill request buffer */ - pcfg_bss = (mlan_ds_bss *) req->pbuf; + pcfg_bss = (mlan_ds_bss *)req->pbuf; pcfg_bss->sub_command = MLAN_OID_BSS_LISTEN_INTERVAL; req->req_id = MLAN_IOCTL_BSS; if (user_data_len) { - pcfg_bss->param.listen_interval = (t_u16) data[0]; + pcfg_bss->param.listen_interval = (t_u16)data[0]; req->action = MLAN_ACT_SET; } else { req->action = MLAN_ACT_GET; @@ -3028,7 +3318,7 @@ woal_priv_set_get_listeninterval(moal_private * priv, t_u8 * respbuf, * @return Number of bytes written, negative for failure. */ int -woal_priv_set_get_drvdbg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_set_get_drvdbg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data[4]; int user_data_len = 0; @@ -3077,6 +3367,8 @@ woal_priv_set_get_drvdbg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) printk(KERN_ALERT "MENTRY (%08x) %s\n", MENTRY, (drvdbg & MENTRY) ? "X" : ""); #endif + printk(KERN_ALERT "MMPA_D (%08x) %s\n", MMPA_D, + (drvdbg & MMPA_D) ? "X" : ""); printk(KERN_ALERT "MIF_D (%08x) %s\n", MIF_D, (drvdbg & MIF_D) ? "X" : ""); printk(KERN_ALERT "MFW_D (%08x) %s\n", MFW_D, @@ -3117,12 +3409,12 @@ woal_priv_set_get_drvdbg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @param priv A pointer to moal_private structure * @param respbuf A pointer to response buffer * @param respbuflen Available length of response buffer - * @param invoke_hostcmd MTRUE --invoke HostCmd, otherwise MFALSE + * @param invoke_hostcmd MTRUE --invoke HostCmd, otherwise MFALSE * * @return 0 --success, otherwise fail */ int -woal_priv_hscfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen, +woal_priv_hscfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen, BOOLEAN invoke_hostcmd) { int data[3]; @@ -3245,7 +3537,7 @@ woal_priv_hscfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen, * @return 0 --success, otherwise fail */ int -woal_priv_hssetpara(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_hssetpara(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data[3]; int user_data_len = 0; @@ -3295,7 +3587,7 @@ woal_priv_hssetpara(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return 0 --success, otherwise fail */ int -woal_priv_set_get_scancfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_set_get_scancfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; int user_data_len = 0; @@ -3330,7 +3622,7 @@ woal_priv_set_get_scancfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ret = -ENOMEM; goto done; } - scan = (mlan_ds_scan *) req->pbuf; + scan = (mlan_ds_scan *)req->pbuf; scan->sub_command = MLAN_OID_SCAN_CONFIG; req->req_id = MLAN_IOCTL_SCAN; @@ -3397,7 +3689,7 @@ woal_priv_set_get_scancfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written if successful, otherwise fail */ static int -woal_priv_set_ap(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_set_ap(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; t_u8 *data_ptr; @@ -3422,7 +3714,7 @@ woal_priv_set_ap(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) awrq = (struct sockaddr *)&(mwr->u.ap_addr); PRINTM(MINFO, "ASSOC: WAP: sa_data: " MACSTR "\n", - MAC2STR((t_u8 *) awrq->sa_data)); + MAC2STR((t_u8 *)awrq->sa_data)); if (MLAN_STATUS_SUCCESS != woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info)) { @@ -3499,7 +3791,7 @@ woal_priv_set_ap(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written if successful, otherwise fail */ static int -woal_priv_set_bss_mode(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_set_bss_mode(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; mlan_ds_bss *bss = NULL; @@ -3521,7 +3813,7 @@ woal_priv_set_bss_mode(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ret = -ENOMEM; goto done; } - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_BSS_MODE; req->req_id = MLAN_IOCTL_BSS; req->action = MLAN_ACT_SET; @@ -3565,7 +3857,7 @@ woal_priv_set_bss_mode(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written if successful, otherwise fail */ static int -woal_priv_set_power(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_set_power(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { struct mwreq *mwr; t_u8 *data_ptr; @@ -3605,7 +3897,7 @@ woal_priv_set_power(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written if successful, otherwise fail */ static int -woal_priv_set_essid(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_set_essid(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { mlan_802_11_ssid req_ssid; mlan_ssid_bssid ssid_bssid; @@ -3647,9 +3939,7 @@ woal_priv_set_essid(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) req_ssid.ssid_len = mwr->u.essid.length; - /* - * Check if we asked for 'any' or 'particular' - */ + /* Check if we asked for 'any' or 'particular' */ if (!mwr->u.essid.flags) { #ifdef REASSOCIATION if (!req_ssid.ssid_len) { @@ -3687,7 +3977,8 @@ woal_priv_set_essid(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) if (mwr->u.essid.flags != 0xFFFF) { if (MLAN_STATUS_SUCCESS != - woal_find_essid(priv, &ssid_bssid)) { + woal_find_essid(priv, &ssid_bssid, + MOAL_IOCTL_WAIT)) { /* Do specific SSID scanning */ if (MLAN_STATUS_SUCCESS != woal_request_scan(priv, MOAL_IOCTL_WAIT, @@ -3709,7 +4000,10 @@ woal_priv_set_essid(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ret = -EFAULT; goto setessid_ret; } - } + } else if (MLAN_STATUS_SUCCESS != + woal_find_best_network(priv, MOAL_IOCTL_WAIT, &ssid_bssid)) + /* Adhoc start, Check the channel command */ + woal_11h_channel_check_ioctl(priv, MOAL_IOCTL_WAIT); /* Connect to BSS by ESSID */ memset(&ssid_bssid.bssid, 0, MLAN_MAC_ADDR_LENGTH); @@ -3754,7 +4048,7 @@ woal_priv_set_essid(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written if successful, otherwise fail */ static int -woal_priv_set_auth(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_set_auth(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { struct mwreq *mwr; t_u8 *data_ptr; @@ -3854,7 +4148,7 @@ woal_priv_set_auth(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written if successful else negative value */ static int -woal_priv_get_ap(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_get_ap(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { struct mwreq *mwr; t_u8 *data_ptr; @@ -3897,7 +4191,7 @@ woal_priv_get_ap(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written if successful else negative value */ static int -woal_priv_get_power(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_get_power(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { struct mwreq *mwr; t_u8 *data_ptr; @@ -3938,7 +4232,7 @@ woal_priv_get_power(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return 0 --success, otherwise fail */ static int -woal_priv_set_get_psmode(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_set_get_psmode(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; int data = 0; @@ -3978,7 +4272,7 @@ woal_priv_set_get_psmode(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) if (action == MLAN_ACT_SET) data = !data; - memcpy(respbuf, (t_u8 *) & data, sizeof(data)); + memcpy(respbuf, (t_u8 *)&data, sizeof(data)); ret = sizeof(data); done: @@ -3997,7 +4291,7 @@ woal_priv_set_get_psmode(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written if successful else negative value */ static int -woal_priv_warmreset(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_warmreset(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; int intf_num; @@ -4015,6 +4309,8 @@ woal_priv_warmreset(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ENTER(); + woal_cancel_cac_block(priv); + /* Reset all interfaces */ ret = woal_reset_intf(priv, MOAL_IOCTL_WAIT, MTRUE); @@ -4044,7 +4340,7 @@ woal_priv_warmreset(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) /* Restart the firmware */ req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); if (req) { - misc = (mlan_ds_misc_cfg *) req->pbuf; + misc = (mlan_ds_misc_cfg *)req->pbuf; misc->sub_command = MLAN_OID_MISC_WARM_RESET; req->req_id = MLAN_IOCTL_MISC_CFG; req->action = MLAN_ACT_SET; @@ -4079,7 +4375,7 @@ woal_priv_warmreset(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return 0 --success, otherwise fail */ static int -woal_priv_txpowercfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_txpowercfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data[4]; int user_data_len; @@ -4113,7 +4409,7 @@ woal_priv_txpowercfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ret = -ENOMEM; goto done; } - pcfg = (mlan_ds_power_cfg *) req->pbuf; + pcfg = (mlan_ds_power_cfg *)req->pbuf; pcfg->sub_command = MLAN_OID_POWER_CFG_EXT; req->req_id = MLAN_IOCTL_POWER_CFG; @@ -4183,8 +4479,8 @@ woal_priv_txpowercfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) if (ret) goto done; pcfg->param.power_ext.len = user_data_len; - memcpy((t_u8 *) & pcfg->param.power_ext.power_data, - (t_u8 *) data, sizeof(data)); + memcpy((t_u8 *)&pcfg->param.power_ext.power_data, + (t_u8 *)data, sizeof(data)); } status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); if (status != MLAN_STATUS_SUCCESS) { @@ -4193,7 +4489,7 @@ woal_priv_txpowercfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) } if (!user_data_len) { /* GET operation */ - memcpy(respbuf, (t_u8 *) & pcfg->param.power_ext, + memcpy(respbuf, (t_u8 *)&pcfg->param.power_ext, sizeof(pcfg->param.power_ext)); ret = sizeof(pcfg->param.power_ext); } @@ -4214,7 +4510,7 @@ woal_priv_txpowercfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return 0 --success, otherwise fail */ static int -woal_priv_pscfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_pscfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data[7] = { 0 }, ret = 0; mlan_ds_pm_cfg *pm_cfg = NULL; @@ -4225,6 +4521,7 @@ woal_priv_pscfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) t_u8 *arguments = NULL, *space_ind = NULL; t_u32 is_negative_1 = MFALSE, is_negative_2 = MFALSE; mlan_status status = MLAN_STATUS_SUCCESS; + gfp_t flag; ENTER(); @@ -4245,9 +4542,9 @@ woal_priv_pscfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) } else { /* SET operation */ memset((char *)data, 0, sizeof(data)); - arguments = - (t_u8 *) kzalloc(strlen(respbuf) * sizeof(char), - GFP_KERNEL); + flag = (in_atomic() || + irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + arguments = kzalloc(strlen(respbuf) * sizeof(char), flag); if (arguments == NULL) { ret = -ENOMEM; goto done; @@ -4280,7 +4577,7 @@ woal_priv_pscfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ret = -EINVAL; goto done; } - pm_cfg = (mlan_ds_pm_cfg *) req->pbuf; + pm_cfg = (mlan_ds_pm_cfg *)req->pbuf; pm_cfg->sub_command = MLAN_OID_PM_CFG_PS_CFG; req->req_id = MLAN_IOCTL_PM_CFG; if (user_data_len) { @@ -4354,10 +4651,10 @@ woal_priv_pscfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) } memcpy(data, &pm_cfg->param.ps_cfg, MIN((sizeof(int) * allowed), sizeof(pm_cfg->param.ps_cfg))); - memcpy(respbuf, (t_u8 *) data, sizeof(int) * allowed); + memcpy(respbuf, (t_u8 *)data, sizeof(int) * allowed); ret = sizeof(int) * allowed; if (req->action == MLAN_ACT_SET) { - pm_cfg = (mlan_ds_pm_cfg *) req->pbuf; + pm_cfg = (mlan_ds_pm_cfg *)req->pbuf; pm_cfg->sub_command = MLAN_OID_PM_CFG_IEEE_PS; pm_cfg->param.ps_mode = 1; req->req_id = MLAN_IOCTL_PM_CFG; @@ -4383,7 +4680,7 @@ woal_priv_pscfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return 0 --success, otherwise fail */ static int -woal_priv_sleeppd(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_sleeppd(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; mlan_ds_pm_cfg *pm_cfg = NULL; @@ -4399,7 +4696,7 @@ woal_priv_sleeppd(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ret = -ENOMEM; goto done; } - pm_cfg = (mlan_ds_pm_cfg *) req->pbuf; + pm_cfg = (mlan_ds_pm_cfg *)req->pbuf; pm_cfg->sub_command = MLAN_OID_PM_CFG_SLEEP_PD; req->req_id = MLAN_IOCTL_PM_CFG; @@ -4441,7 +4738,7 @@ woal_priv_sleeppd(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) } if (!user_data_len) { data = pm_cfg->param.sleep_period; - memcpy(respbuf, (t_u8 *) & data, sizeof(data)); + memcpy(respbuf, (t_u8 *)&data, sizeof(data)); ret = sizeof(data); } @@ -4462,7 +4759,7 @@ woal_priv_sleeppd(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return 0 --success, otherwise fail */ static int -woal_priv_txcontrol(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_txcontrol(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; mlan_ds_misc_cfg *misc_cfg = NULL; @@ -4478,7 +4775,7 @@ woal_priv_txcontrol(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ret = -ENOMEM; goto done; } - misc_cfg = (mlan_ds_misc_cfg *) req->pbuf; + misc_cfg = (mlan_ds_misc_cfg *)req->pbuf; misc_cfg->sub_command = MLAN_OID_MISC_TXCONTROL; req->req_id = MLAN_IOCTL_MISC_CFG; @@ -4501,7 +4798,7 @@ woal_priv_txcontrol(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) if (user_data_len) { req->action = MLAN_ACT_SET; - misc_cfg->param.tx_control = (t_u32) data; + misc_cfg->param.tx_control = (t_u32)data; } else { req->action = MLAN_ACT_GET; } @@ -4513,7 +4810,7 @@ woal_priv_txcontrol(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) } if (!user_data_len) { data = misc_cfg->param.tx_control; - memcpy(respbuf, (t_u8 *) & data, sizeof(data)); + memcpy(respbuf, (t_u8 *)&data, sizeof(data)); ret = sizeof(data); } @@ -4534,7 +4831,7 @@ woal_priv_txcontrol(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return 0 --success, otherwise fail */ static int -woal_priv_regrdwr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_regrdwr(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data[3]; int ret = 0; @@ -4544,6 +4841,7 @@ woal_priv_regrdwr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) t_u8 *arguments = NULL, *space_ind = NULL; t_u32 is_negative_val = MFALSE; mlan_status status = MLAN_STATUS_SUCCESS; + gfp_t flag; ENTER(); @@ -4553,7 +4851,7 @@ woal_priv_regrdwr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - reg_mem = (mlan_ds_reg_mem *) req->pbuf; + reg_mem = (mlan_ds_reg_mem *)req->pbuf; reg_mem->sub_command = MLAN_OID_REG_RW; req->req_id = MLAN_IOCTL_REG_MEM; @@ -4565,8 +4863,8 @@ woal_priv_regrdwr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) } /* SET operation */ memset((char *)data, 0, sizeof(data)); - arguments = - (t_u8 *) kzalloc(strlen(respbuf) * sizeof(char), GFP_KERNEL); + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + arguments = kzalloc(strlen(respbuf) * sizeof(char), flag); if (arguments == NULL) { ret = -ENOMEM; goto done; @@ -4595,10 +4893,10 @@ woal_priv_regrdwr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - reg_mem->param.reg_rw.type = (t_u32) data[0]; - reg_mem->param.reg_rw.offset = (t_u32) data[1]; + reg_mem->param.reg_rw.type = (t_u32)data[0]; + reg_mem->param.reg_rw.offset = (t_u32)data[1]; if (user_data_len == 3) - reg_mem->param.reg_rw.value = (t_u32) data[2]; + reg_mem->param.reg_rw.value = (t_u32)data[2]; status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); if (status != MLAN_STATUS_SUCCESS) { @@ -4630,7 +4928,7 @@ woal_priv_regrdwr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return 0 --success, otherwise fail */ static int -woal_priv_rdeeprom(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_rdeeprom(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data[2]; int ret = 0; @@ -4647,7 +4945,7 @@ woal_priv_rdeeprom(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - reg_mem = (mlan_ds_reg_mem *) req->pbuf; + reg_mem = (mlan_ds_reg_mem *)req->pbuf; reg_mem->sub_command = MLAN_OID_EEPROM_RD; req->req_id = MLAN_IOCTL_REG_MEM; @@ -4669,8 +4967,8 @@ woal_priv_rdeeprom(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - reg_mem->param.rd_eeprom.offset = (t_u16) data[0]; - reg_mem->param.rd_eeprom.byte_count = (t_u16) data[1]; + reg_mem->param.rd_eeprom.offset = (t_u16)data[0]; + reg_mem->param.rd_eeprom.byte_count = (t_u16)data[1]; status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); if (status != MLAN_STATUS_SUCCESS) { @@ -4701,7 +4999,7 @@ woal_priv_rdeeprom(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return 0 --success, otherwise fail */ static int -woal_priv_memrdwr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_memrdwr(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data[2]; int ret = 0; @@ -4711,6 +5009,7 @@ woal_priv_memrdwr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) t_u8 *arguments = NULL, *space_ind = NULL; t_u32 is_negative_1 = MFALSE, is_negative_2 = MFALSE; mlan_status status = MLAN_STATUS_SUCCESS; + gfp_t flag; ENTER(); @@ -4720,7 +5019,7 @@ woal_priv_memrdwr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - reg_mem = (mlan_ds_reg_mem *) req->pbuf; + reg_mem = (mlan_ds_reg_mem *)req->pbuf; reg_mem->sub_command = MLAN_OID_MEM_RW; req->req_id = MLAN_IOCTL_REG_MEM; @@ -4732,8 +5031,8 @@ woal_priv_memrdwr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) } /* SET operation */ memset((char *)data, 0, sizeof(data)); - arguments = - (t_u8 *) kzalloc(strlen(respbuf) * sizeof(char), GFP_KERNEL); + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + arguments = kzalloc(strlen(respbuf) * sizeof(char), flag); if (arguments == NULL) { ret = -ENOMEM; goto done; @@ -4768,9 +5067,9 @@ woal_priv_memrdwr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - reg_mem->param.mem_rw.addr = (t_u32) data[0]; + reg_mem->param.mem_rw.addr = (t_u32)data[0]; if (user_data_len == 2) - reg_mem->param.mem_rw.value = (t_u32) data[1]; + reg_mem->param.mem_rw.value = (t_u32)data[1]; status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); if (status != MLAN_STATUS_SUCCESS) { @@ -4802,7 +5101,7 @@ woal_priv_memrdwr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return MLAN_STATUS_SUCCESS --success, otherwise fail */ static int -woal_priv_sdcmd52rw(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_sdcmd52rw(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { t_u8 rw = 0, func, data = 0; int buf[3], reg, ret = MLAN_STATUS_SUCCESS; @@ -4811,7 +5110,7 @@ woal_priv_sdcmd52rw(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ENTER(); header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_SDCMD52RW); - memset((t_u8 *) buf, 0, sizeof(buf)); + memset((t_u8 *)buf, 0, sizeof(buf)); if (strlen(respbuf) == header_len) { PRINTM(MERROR, "Invalid number of arguments\n"); @@ -4827,20 +5126,20 @@ woal_priv_sdcmd52rw(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - func = (t_u8) buf[0]; + func = (t_u8)buf[0]; if (func > 7) { PRINTM(MERROR, "Invalid function number!\n"); ret = -EINVAL; goto done; } - reg = (t_u32) buf[1]; + reg = (t_u32)buf[1]; if (user_data_len == 2) { rw = 0; /* CMD52 read */ PRINTM(MINFO, "Cmd52 read, func=%d, reg=0x%08X\n", func, reg); } if (user_data_len == 3) { rw = 1; /* CMD52 write */ - data = (t_u8) buf[2]; + data = (t_u8)buf[2]; PRINTM(MINFO, "Cmd52 write, func=%d, reg=0x%08X, data=0x%02X\n", func, reg, data); } @@ -4892,11 +5191,60 @@ woal_priv_sdcmd52rw(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) return ret; } +#ifdef STA_SUPPORT +/** + * @brief arpfilter ioctl function + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +static int +woal_priv_arpfilter(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + mlan_ds_misc_cfg *misc = NULL; + mlan_ioctl_req *req = NULL; + t_u8 *data_ptr = NULL; + t_u32 buf_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); -extern int woal_peer_mgmt_frame_ioctl(t_u16 mask); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + misc = (mlan_ds_misc_cfg *)req->pbuf; + misc->sub_command = MLAN_OID_MISC_GEN_IE; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = MLAN_ACT_SET; + misc->param.gen_ie.type = MLAN_IE_TYPE_ARP_FILTER; + + data_ptr = respbuf + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_ARPFILTER)); + buf_len = *((t_u16 *)data_ptr); + misc->param.gen_ie.len = buf_len; + memcpy((void *)(misc->param.gen_ie.ie_data), data_ptr + sizeof(buf_len), + buf_len); + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} +#endif /* STA_SUPPORT */ /** - * @brief Set/Get Mgmt Frame passthru mask + * @brief Set/Get hotspot mode configurations * * @param priv A pointer to moal_private structure * @param respbuf A pointer to response buffer @@ -4905,18 +5253,18 @@ extern int woal_peer_mgmt_frame_ioctl(t_u16 mask); * @return 0 --success, otherwise fail */ int -woal_priv_mgmt_frame_passthru_ctrl(moal_private * priv, t_u8 * respbuf, - t_u32 respbuflen) +woal_priv_hotspotcfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *cfg = NULL; int data = 0; int user_data_len = 0, header_len = 0; - mlan_ioctl_req *req = NULL; - mlan_ds_misc_cfg *mgmt_cfg = NULL; mlan_status status = MLAN_STATUS_SUCCESS; ENTER(); - header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_MGMT_FRAME_CTRL); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_HOTSPOTCFG); if (strlen(respbuf) == header_len) { /* GET operation */ user_data_len = 0; @@ -4924,7 +5272,6 @@ woal_priv_mgmt_frame_passthru_ctrl(moal_private * priv, t_u8 * respbuf, /* SET operation */ parse_arguments(respbuf + header_len, &data, 1, &user_data_len); } - if (user_data_len >= 2) { PRINTM(MERROR, "Too many arguments\n"); ret = -EINVAL; @@ -4935,28 +5282,25 @@ woal_priv_mgmt_frame_passthru_ctrl(moal_private * priv, t_u8 * respbuf, ret = -ENOMEM; goto done; } - mgmt_cfg = (mlan_ds_misc_cfg *) req->pbuf; - req->req_id = MLAN_IOCTL_MISC_CFG; - mgmt_cfg->sub_command = MLAN_OID_MISC_RX_MGMT_IND; - if (user_data_len == 0) { /* Get */ + cfg = (mlan_ds_misc_cfg *)req->pbuf; + if (user_data_len == 0) { req->action = MLAN_ACT_GET; - } else { /* Set */ - mgmt_cfg->param.mgmt_subtype_mask = data; + } else { + cfg->param.hotspot_cfg = data; req->action = MLAN_ACT_SET; - //Set the proc variable 'enable' - woal_peer_mgmt_frame_ioctl((t_u16) mgmt_cfg->param.mgmt_subtype_mask); } } + cfg->sub_command = MLAN_OID_MISC_HOTSPOT_CFG; + req->req_id = MLAN_IOCTL_MISC_CFG; status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); if (status != MLAN_STATUS_SUCCESS) { ret = -EFAULT; goto done; } - - data = mgmt_cfg->param.mgmt_subtype_mask; - memcpy(respbuf, (t_u8 *) & data, sizeof(data)); + data = cfg->param.hotspot_cfg; + memcpy(respbuf, (t_u8 *)&data, sizeof(data)); ret = sizeof(data); done: @@ -4967,12 +5311,87 @@ woal_priv_mgmt_frame_passthru_ctrl(moal_private * priv, t_u8 * respbuf, } +extern int woal_peer_mgmt_frame_ioctl(t_u16 mask); + + /** - * @brief Private IOCTL entry to send an ADDTS TSPEC + * @brief Set/Get Mgmt Frame passthru mask * - * Receive a ADDTS command from the application. The command structure - * contains a TSPEC and timeout in milliseconds. The timeout is performed - * in the firmware after the ADDTS command frame is sent. + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +int +woal_priv_mgmt_frame_passthru_ctrl(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) +{ + int ret = 0; + int data = 0; + int user_data_len = 0, header_len = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *mgmt_cfg = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_MGMT_FRAME_CTRL); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, 1, &user_data_len); + } + + if (user_data_len >= 2) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } else { + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + mgmt_cfg = (mlan_ds_misc_cfg *)req->pbuf; + req->req_id = MLAN_IOCTL_MISC_CFG; + mgmt_cfg->sub_command = MLAN_OID_MISC_RX_MGMT_IND; + + if (user_data_len == 0) { /* Get */ + req->action = MLAN_ACT_GET; + } else { /* Set */ + mgmt_cfg->param.mgmt_subtype_mask = data; + req->action = MLAN_ACT_SET; + //Set the proc variable 'enable' + woal_peer_mgmt_frame_ioctl((t_u16) mgmt_cfg->param.mgmt_subtype_mask); + } + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + data = mgmt_cfg->param.mgmt_subtype_mask; + memcpy(respbuf, (t_u8 *)&data, sizeof(data)); + ret = sizeof(data); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; + +} + +/** + * @brief Private IOCTL entry to send an ADDTS TSPEC + * + * Receive a ADDTS command from the application. The command structure + * contains a TSPEC and timeout in milliseconds. The timeout is performed + * in the firmware after the ADDTS command frame is sent. * * The TSPEC is received in the API as an opaque block. The firmware will * send the entire data block, including the bytes after the TSPEC. This @@ -5003,7 +5422,7 @@ woal_priv_mgmt_frame_passthru_ctrl(moal_private * priv, t_u8 * respbuf, * @return Number of bytes written if successful else negative value */ static int -woal_priv_wmm_addts_req_ioctl(moal_private * priv, t_u8 * respbuf, +woal_priv_wmm_addts_req_ioctl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { mlan_ioctl_req *req = NULL; @@ -5024,12 +5443,12 @@ woal_priv_wmm_addts_req_ioctl(moal_private * priv, t_u8 * respbuf, } req->req_id = MLAN_IOCTL_WMM_CFG; - cfg = (mlan_ds_wmm_cfg *) req->pbuf; + cfg = (mlan_ds_wmm_cfg *)req->pbuf; cfg->sub_command = MLAN_OID_WMM_CFG_ADDTS; memset(&addts_ioctl, 0x00, sizeof(addts_ioctl)); - memcpy((t_u8 *) & addts_ioctl, data_ptr, sizeof(addts_ioctl)); + memcpy((t_u8 *)&addts_ioctl, data_ptr, sizeof(addts_ioctl)); cfg->param.addts.timeout = addts_ioctl.timeout_ms; cfg->param.addts.ie_data_len = addts_ioctl.ie_data_len; @@ -5043,7 +5462,7 @@ woal_priv_wmm_addts_req_ioctl(moal_private * priv, t_u8 * respbuf, goto done; } addts_ioctl.cmd_result = cfg->param.addts.result; - addts_ioctl.ieee_status_code = (t_u8) cfg->param.addts.status_code; + addts_ioctl.ieee_status_code = (t_u8)cfg->param.addts.status_code; addts_ioctl.ie_data_len = cfg->param.addts.ie_data_len; memcpy(addts_ioctl.ie_data, @@ -5053,7 +5472,7 @@ woal_priv_wmm_addts_req_ioctl(moal_private * priv, t_u8 * respbuf, - sizeof(addts_ioctl.ie_data) + cfg->param.addts.ie_data_len); - memcpy(respbuf, (t_u8 *) & addts_ioctl, copy_len); + memcpy(respbuf, (t_u8 *)&addts_ioctl, copy_len); ret = copy_len; done: @@ -5085,7 +5504,7 @@ woal_priv_wmm_addts_req_ioctl(moal_private * priv, t_u8 * respbuf, * @return Number of bytes written if successful else negative value */ static int -woal_priv_wmm_delts_req_ioctl(moal_private * priv, t_u8 * respbuf, +woal_priv_wmm_delts_req_ioctl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { mlan_ioctl_req *req = NULL; @@ -5106,18 +5525,18 @@ woal_priv_wmm_delts_req_ioctl(moal_private * priv, t_u8 * respbuf, } req->req_id = MLAN_IOCTL_WMM_CFG; - cfg = (mlan_ds_wmm_cfg *) req->pbuf; + cfg = (mlan_ds_wmm_cfg *)req->pbuf; cfg->sub_command = MLAN_OID_WMM_CFG_DELTS; memset(&delts_ioctl, 0x00, sizeof(delts_ioctl)); if (strlen(respbuf) > header_len) { copy_len = MIN(strlen(data_ptr), sizeof(delts_ioctl)); - memcpy((t_u8 *) & delts_ioctl, data_ptr, copy_len); + memcpy((t_u8 *)&delts_ioctl, data_ptr, copy_len); cfg->param.delts.status_code = - (t_u32) delts_ioctl.ieee_reason_code; - cfg->param.delts.ie_data_len = (t_u8) delts_ioctl.ie_data_len; + (t_u32)delts_ioctl.ieee_reason_code; + cfg->param.delts.ie_data_len = (t_u8)delts_ioctl.ie_data_len; memcpy(cfg->param.delts.ie_data, delts_ioctl.ie_data, cfg->param.delts.ie_data_len); @@ -5132,7 +5551,7 @@ woal_priv_wmm_delts_req_ioctl(moal_private * priv, t_u8 * respbuf, layer */ delts_ioctl.cmd_result = cfg->param.delts.result; copy_len = sizeof(delts_ioctl); - memcpy(respbuf, (t_u8 *) & delts_ioctl, copy_len); + memcpy(respbuf, (t_u8 *)&delts_ioctl, copy_len); ret = copy_len; } @@ -5156,7 +5575,7 @@ woal_priv_wmm_delts_req_ioctl(moal_private * priv, t_u8 * respbuf, * @return 0 --success, otherwise fail */ static int -woal_priv_qconfig(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_qconfig(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { mlan_ioctl_req *req = NULL; mlan_ds_wmm_cfg *pwmm = NULL; @@ -5175,14 +5594,14 @@ woal_priv_qconfig(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) } req->req_id = MLAN_IOCTL_WMM_CFG; - pwmm = (mlan_ds_wmm_cfg *) req->pbuf; + pwmm = (mlan_ds_wmm_cfg *)req->pbuf; pwmm->sub_command = MLAN_OID_WMM_CFG_QUEUE_CONFIG; memset(&qcfg_ioctl, 0x00, sizeof(qcfg_ioctl)); - pqcfg = (mlan_ds_wmm_queue_config *) & pwmm->param.q_cfg; + pqcfg = (mlan_ds_wmm_queue_config *)&pwmm->param.q_cfg; data_ptr = respbuf + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_QCONFIG)); - memcpy((t_u8 *) & qcfg_ioctl, data_ptr, sizeof(qcfg_ioctl)); + memcpy((t_u8 *)&qcfg_ioctl, data_ptr, sizeof(qcfg_ioctl)); pqcfg->action = qcfg_ioctl.action; pqcfg->access_category = qcfg_ioctl.access_category; pqcfg->msdu_lifetime_expiry = qcfg_ioctl.msdu_lifetime_expiry; @@ -5196,7 +5615,7 @@ woal_priv_qconfig(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) qcfg_ioctl.action = pqcfg->action; qcfg_ioctl.access_category = pqcfg->access_category; qcfg_ioctl.msdu_lifetime_expiry = pqcfg->msdu_lifetime_expiry; - memcpy(data_ptr, (t_u8 *) & qcfg_ioctl, sizeof(qcfg_ioctl)); + memcpy(data_ptr, (t_u8 *)&qcfg_ioctl, sizeof(qcfg_ioctl)); ret = strlen(CMD_MARVELL) + strlen(PRIV_CMD_QCONFIG) + sizeof(qcfg_ioctl); done: @@ -5224,7 +5643,7 @@ woal_priv_qconfig(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written if successful else negative value */ static int -woal_priv_wmm_queue_status_ioctl(moal_private * priv, t_u8 * respbuf, +woal_priv_wmm_queue_status_ioctl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { mlan_ioctl_req *req = NULL; @@ -5243,7 +5662,7 @@ woal_priv_wmm_queue_status_ioctl(moal_private * priv, t_u8 * respbuf, } req->req_id = MLAN_IOCTL_WMM_CFG; - pwmm = (mlan_ds_wmm_cfg *) req->pbuf; + pwmm = (mlan_ds_wmm_cfg *)req->pbuf; pwmm->sub_command = MLAN_OID_WMM_CFG_QUEUE_STATUS; if (strlen(respbuf) == header_len) { @@ -5256,8 +5675,7 @@ woal_priv_wmm_queue_status_ioctl(moal_private * priv, t_u8 * respbuf, memset(&qstatus_ioctl, 0x00, sizeof(qstatus_ioctl)); memcpy((void *)&qstatus_ioctl, (void *)&pwmm->param.q_status, sizeof(qstatus_ioctl)); - memcpy(respbuf, (t_u8 *) & qstatus_ioctl, - sizeof(qstatus_ioctl)); + memcpy(respbuf, (t_u8 *)&qstatus_ioctl, sizeof(qstatus_ioctl)); ret = sizeof(qstatus_ioctl); } @@ -5278,7 +5696,7 @@ woal_priv_wmm_queue_status_ioctl(moal_private * priv, t_u8 * respbuf, * @return Number of bytes written if successful else negative value */ static int -woal_priv_wmm_ts_status_ioctl(moal_private * priv, t_u8 * respbuf, +woal_priv_wmm_ts_status_ioctl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { mlan_ioctl_req *req = NULL; @@ -5299,12 +5717,12 @@ woal_priv_wmm_ts_status_ioctl(moal_private * priv, t_u8 * respbuf, } req->req_id = MLAN_IOCTL_WMM_CFG; - pwmm = (mlan_ds_wmm_cfg *) req->pbuf; + pwmm = (mlan_ds_wmm_cfg *)req->pbuf; pwmm->sub_command = MLAN_OID_WMM_CFG_TS_STATUS; memset(&ts_status_ioctl, 0x00, sizeof(ts_status_ioctl)); - memcpy((t_u8 *) & ts_status_ioctl, data_ptr, sizeof(ts_status_ioctl)); + memcpy((t_u8 *)&ts_status_ioctl, data_ptr, sizeof(ts_status_ioctl)); memset(&pwmm->param.ts_status, 0x00, sizeof(ts_status_ioctl)); pwmm->param.ts_status.tid = ts_status_ioctl.tid; @@ -5318,7 +5736,7 @@ woal_priv_wmm_ts_status_ioctl(moal_private * priv, t_u8 * respbuf, memset(&ts_status_ioctl, 0x00, sizeof(ts_status_ioctl)); memcpy((void *)&ts_status_ioctl, (void *)&pwmm->param.ts_status, sizeof(ts_status_ioctl)); - memcpy(respbuf, (t_u8 *) & ts_status_ioctl, sizeof(ts_status_ioctl)); + memcpy(respbuf, (t_u8 *)&ts_status_ioctl, sizeof(ts_status_ioctl)); ret = sizeof(ts_status_ioctl); done: @@ -5338,7 +5756,7 @@ woal_priv_wmm_ts_status_ioctl(moal_private * priv, t_u8 * respbuf, * @return Number of bytes written, negative for failure. */ int -woal_priv_macctrl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_macctrl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data = 0; mlan_ioctl_req *req = NULL; @@ -5369,14 +5787,14 @@ woal_priv_macctrl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - cfg = (mlan_ds_misc_cfg *) req->pbuf; + cfg = (mlan_ds_misc_cfg *)req->pbuf; cfg->sub_command = MLAN_OID_MISC_MAC_CONTROL; req->req_id = MLAN_IOCTL_MISC_CFG; if (user_data_len == 0) req->action = MLAN_ACT_GET; else { - cfg->param.mac_ctrl = (t_u32) data; + cfg->param.mac_ctrl = (t_u32)data; req->action = MLAN_ACT_SET; } @@ -5386,7 +5804,7 @@ woal_priv_macctrl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - memcpy(respbuf, (t_u8 *) & cfg->param.mac_ctrl, sizeof(data)); + memcpy(respbuf, (t_u8 *)&cfg->param.mac_ctrl, sizeof(data)); ret = sizeof(data); done: @@ -5406,7 +5824,7 @@ woal_priv_macctrl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return 0 --success, otherwise fail */ int -woal_priv_getwap(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_getwap(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; #ifdef STA_SUPPORT @@ -5422,7 +5840,7 @@ woal_priv_getwap(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); if (bss_info.media_connected == MTRUE) { - memcpy(respbuf, (t_u8 *) & bss_info.bssid, + memcpy(respbuf, (t_u8 *)&bss_info.bssid, MLAN_MAC_ADDR_LENGTH); } else { memset(respbuf, 0, MLAN_MAC_ADDR_LENGTH); @@ -5454,7 +5872,7 @@ woal_priv_getwap(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_priv_region_code(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_region_code(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data = 0; mlan_ioctl_req *req = NULL; @@ -5485,14 +5903,14 @@ woal_priv_region_code(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - cfg = (mlan_ds_misc_cfg *) req->pbuf; + cfg = (mlan_ds_misc_cfg *)req->pbuf; cfg->sub_command = MLAN_OID_MISC_REGION; req->req_id = MLAN_IOCTL_MISC_CFG; if (user_data_len == 0) req->action = MLAN_ACT_GET; else { - cfg->param.region_code = (t_u32) data; + cfg->param.region_code = (t_u32)data; req->action = MLAN_ACT_SET; } @@ -5502,7 +5920,7 @@ woal_priv_region_code(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - memcpy(respbuf, (t_u8 *) & cfg->param.region_code, sizeof(data)); + memcpy(respbuf, (t_u8 *)&cfg->param.region_code, sizeof(data)); ret = sizeof(data); done: @@ -5512,6 +5930,209 @@ woal_priv_region_code(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) return ret; } +/** + * @brief Set/Get channel time and buffer weight + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_multi_chan_config(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *cfg = NULL; + t_u8 *data_ptr; + int ret = 0; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + data_ptr = + respbuf + strlen(CMD_MARVELL) + strlen(PRIV_CMD_MULTI_CHAN_CFG); + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_MULTI_CHAN_CFG); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + user_data_len = sizeof(mlan_ds_multi_chan_cfg); + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg = (mlan_ds_misc_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_MISC_MULTI_CHAN_CFG; + req->req_id = MLAN_IOCTL_MISC_CFG; + + if (user_data_len == 0) { + req->action = MLAN_ACT_GET; + } else { + req->action = MLAN_ACT_SET; + memcpy(&cfg->param.multi_chan_cfg, data_ptr, + sizeof(mlan_ds_multi_chan_cfg)); + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memcpy(respbuf, (mlan_ds_multi_chan_cfg *)&cfg->param.multi_chan_cfg, + req->buf_len); + ret = req->buf_len; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get multi_channel policy setting + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_multi_chan_policy(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + int user_data_len = 0, header_len = 0; + int data = 0; + t_u16 enable; + t_u8 action; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_MULTI_CHAN_POLICY); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, 1, &user_data_len); + } + + if (user_data_len > 1) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + + if (user_data_len == 0) { + action = MLAN_ACT_GET; + } else { + action = MLAN_ACT_SET; + enable = (t_u16)data; + } + + if (MLAN_STATUS_SUCCESS != + woal_mc_policy_cfg(priv, &enable, MOAL_IOCTL_WAIT, action)) { + ret = -EFAULT; + goto done; + } + memcpy(respbuf, &enable, sizeof(t_u16)); + ret = sizeof(t_u16); + +done: + LEAVE(); + return ret; +} + +#ifdef RX_PACKET_COALESCE +/** + * @brief Set/Get RX packet coalesceing setting + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_rx_pkt_coalesce_cfg(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) +{ + int ret = 0; + t_u32 data[2]; + int user_data_len = 0, header_len = 0; + mlan_ds_misc_cfg *cfg = NULL; + t_u8 *data_ptr; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + data_ptr = respbuf + strlen(CMD_MARVELL) + strlen(PRIV_CMD_RX_COAL_CFG); + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_RX_COAL_CFG); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + } + + if (sizeof(int) * user_data_len > sizeof(data)) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + + if ((user_data_len != 0) && (user_data_len != 2)) { + PRINTM(MERROR, "Invalid arguments\n"); + ret = -EINVAL; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg = (mlan_ds_misc_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_MISC_RX_PACKET_COALESCE; + req->req_id = MLAN_IOCTL_MISC_CFG; + + if (user_data_len == 0) { + req->action = MLAN_ACT_GET; + } else { + req->action = MLAN_ACT_SET; + cfg->param.rx_coalesce.packet_threshold = data[0]; + cfg->param.rx_coalesce.delay = data[1]; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memcpy(respbuf, + (mlan_ds_misc_rx_packet_coalesce *)&cfg->param.rx_coalesce, + req->buf_len); + ret = req->buf_len; + +done: + LEAVE(); + return ret; +} +#endif /** * @brief Set/Get FW side mac address * @@ -5522,7 +6143,7 @@ woal_priv_region_code(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return 0 --success, otherwise fail */ int -woal_priv_fwmacaddr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_fwmacaddr(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { t_u8 data[ETH_ALEN]; int ret = 0; @@ -5536,13 +6157,13 @@ woal_priv_fwmacaddr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_FWMACADDR); /* Allocate an IOCTL request buffer */ - req = (mlan_ioctl_req *) woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + req = (mlan_ioctl_req *)woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); if (req == NULL) { ret = -ENOMEM; goto done; } /* Fill request buffer */ - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_BSS_MAC_ADDR; req->req_id = MLAN_IOCTL_BSS; @@ -5588,7 +6209,7 @@ woal_priv_fwmacaddr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return 0 --success, otherwise fail */ int -woal_priv_offchannel(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_offchannel(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data[3]; int ret = 0; @@ -5687,7 +6308,7 @@ woal_priv_offchannel(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) : IEEE80211_BAND_5GHZ) #endif - )), 0, (t_u32) data[2])) { + )), 0, (t_u32)data[2])) { PRINTM(MERROR, "remain_on_channel: Failed to start\n"); ret = -EFAULT; goto done; @@ -5721,8 +6342,7 @@ woal_priv_offchannel(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ int -woal_priv_get_driver_verext(moal_private * priv, t_u8 * respbuf, - t_u32 respbuflen) +woal_priv_get_driver_verext(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data = 0; mlan_ds_get_info *info = NULL; @@ -5740,7 +6360,7 @@ woal_priv_get_driver_verext(moal_private * priv, t_u8 * respbuf, goto done; } - info = (mlan_ds_get_info *) req->pbuf; + info = (mlan_ds_get_info *)req->pbuf; info->sub_command = MLAN_OID_GET_VER_EXT; req->req_id = MLAN_IOCTL_GET_INFO; req->action = MLAN_ACT_GET; @@ -5761,7 +6381,7 @@ woal_priv_get_driver_verext(moal_private * priv, t_u8 * respbuf, goto done; } info->param.ver_ext.version_str_sel = data; - if (((t_s32) (info->param.ver_ext.version_str_sel)) < 0) { + if (((t_s32)(info->param.ver_ext.version_str_sel)) < 0) { PRINTM(MERROR, "Invalid arguments!\n"); ret = -EINVAL; goto done; @@ -5801,7 +6421,7 @@ woal_priv_get_driver_verext(moal_private * priv, t_u8 * respbuf, * @return Number of bytes written, negative for failure. */ static int -woal_priv_radio_ctrl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_radio_ctrl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0, option = 0; int user_data_len = 0, header_len = 0; @@ -5834,7 +6454,7 @@ woal_priv_radio_ctrl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ret = -EINVAL; goto done; } - if (MLAN_STATUS_SUCCESS != woal_set_radio(priv, (t_u8) option)) + if (MLAN_STATUS_SUCCESS != woal_set_radio(priv, (t_u8)option)) ret = -EFAULT; goto done; } else { @@ -5859,7 +6479,7 @@ woal_priv_radio_ctrl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ static int -woal_priv_wmm_cfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_wmm_cfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data = 0; mlan_ds_wmm_cfg *wmm = NULL; @@ -5870,13 +6490,13 @@ woal_priv_wmm_cfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ENTER(); - req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info)); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wmm_cfg)); if (req == NULL) { ret = ENOMEM; goto done; } - wmm = (mlan_ds_wmm_cfg *) req->pbuf; + wmm = (mlan_ds_wmm_cfg *)req->pbuf; wmm->sub_command = MLAN_OID_WMM_CFG_ENABLE; req->req_id = MLAN_IOCTL_WMM_CFG; @@ -5934,7 +6554,7 @@ woal_priv_wmm_cfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ static int -woal_priv_11d_cfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_11d_cfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data = 0; mlan_ds_11d_cfg *pcfg_11d = NULL; @@ -5951,7 +6571,7 @@ woal_priv_11d_cfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - pcfg_11d = (mlan_ds_11d_cfg *) req->pbuf; + pcfg_11d = (mlan_ds_11d_cfg *)req->pbuf; pcfg_11d->sub_command = MLAN_OID_11D_CFG_ENABLE; req->req_id = MLAN_IOCTL_11D_CFG; @@ -6008,8 +6628,7 @@ woal_priv_11d_cfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return 0 --success, otherwise fail */ static int -woal_priv_11d_clr_chan_tbl(moal_private * priv, t_u8 * respbuf, - t_u32 respbuflen) +woal_priv_11d_clr_chan_tbl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { mlan_ds_11d_cfg *pcfg_11d = NULL; mlan_ioctl_req *req = NULL; @@ -6019,7 +6638,7 @@ woal_priv_11d_clr_chan_tbl(moal_private * priv, t_u8 * respbuf, ENTER(); - req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info)); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11d_cfg)); if (req == NULL) { ret = ENOMEM; goto done; @@ -6032,7 +6651,7 @@ woal_priv_11d_clr_chan_tbl(moal_private * priv, t_u8 * respbuf, ret = -EINVAL; goto done; } - pcfg_11d = (mlan_ds_11d_cfg *) req->pbuf; + pcfg_11d = (mlan_ds_11d_cfg *)req->pbuf; pcfg_11d->sub_command = MLAN_OID_11D_CLR_CHAN_TABLE; req->req_id = MLAN_IOCTL_11D_CFG; req->action = MLAN_ACT_SET; @@ -6061,7 +6680,7 @@ woal_priv_11d_clr_chan_tbl(moal_private * priv, t_u8 * respbuf, * @return Number of bytes written, negative for failure. */ static int -woal_priv_wws_cfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_wws_cfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data = 0; mlan_ds_misc_cfg *wws = NULL; @@ -6072,13 +6691,13 @@ woal_priv_wws_cfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ENTER(); - req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info)); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); if (req == NULL) { ret = ENOMEM; goto done; } - wws = (mlan_ds_misc_cfg *) req->pbuf; + wws = (mlan_ds_misc_cfg *)req->pbuf; wws->sub_command = MLAN_OID_MISC_WWS; req->req_id = MLAN_IOCTL_MISC_CFG; @@ -6099,7 +6718,7 @@ woal_priv_wws_cfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } req->action = MLAN_ACT_SET; - wws->param.wws_cfg = (t_u16) data; + wws->param.wws_cfg = (t_u16)data; } else { PRINTM(MERROR, "Too many arguments\n"); ret = -EINVAL; @@ -6133,7 +6752,7 @@ woal_priv_wws_cfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ static int -woal_priv_set_get_reassoc(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_set_get_reassoc(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { moal_handle *handle = priv->phandle; int data = 0; @@ -6192,7 +6811,7 @@ woal_priv_set_get_reassoc(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ static int -woal_priv_txbuf_cfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_txbuf_cfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { mlan_ds_11n_cfg *cfg_11n = NULL; mlan_ioctl_req *req = NULL; @@ -6202,13 +6821,13 @@ woal_priv_txbuf_cfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ENTER(); - req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info)); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); if (req == NULL) { ret = ENOMEM; goto done; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_CFG_MAX_TX_BUF_SIZE; req->req_id = MLAN_IOCTL_11N_CFG; @@ -6251,7 +6870,7 @@ woal_priv_txbuf_cfg(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ static int -woal_priv_auth_type(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_auth_type(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int auth_type; t_u32 auth_mode; @@ -6306,7 +6925,7 @@ woal_priv_auth_type(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) #endif /** - * @brief Get thermal reading + * @brief Set/get user provisioned local power constraint * * @param priv A pointer to moal_private structure * @param respbuf A pointer to response buffer @@ -6315,24 +6934,94 @@ woal_priv_auth_type(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ static int -woal_priv_thermal(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_11h_local_pwr_constraint(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) { - mlan_ds_misc_cfg *cfg = NULL; + int data = 0; + mlan_ds_11h_cfg *ds_11hcfg = NULL; mlan_ioctl_req *req = NULL; - int ret = 0, header_len = 0, data = 0; + int ret = 0; + int user_data_len = 0, header_len = 0; mlan_status status = MLAN_STATUS_SUCCESS; ENTER(); - req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info)); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11h_cfg)); if (req == NULL) { ret = ENOMEM; goto done; } - cfg = (mlan_ds_misc_cfg *) req->pbuf; - cfg->sub_command = MLAN_OID_MISC_THERMAL; - req->req_id = MLAN_IOCTL_MISC_CFG; + ds_11hcfg = (mlan_ds_11h_cfg *)req->pbuf; + ds_11hcfg->sub_command = MLAN_OID_11H_LOCAL_POWER_CONSTRAINT; + req->req_id = MLAN_IOCTL_11H_CFG; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_POWER_CONS); + + if (strlen(respbuf) == header_len) { + /* GET operation */ + req->action = MLAN_ACT_GET; + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, 1, &user_data_len); + if (user_data_len == 1) { + req->action = MLAN_ACT_SET; + ds_11hcfg->param.usr_local_power_constraint = + (t_s8)data; + } else { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (req->action == MLAN_ACT_GET) { + data = (int)ds_11hcfg->param.usr_local_power_constraint; + memcpy(respbuf, &data, sizeof(data)); + ret = sizeof(data); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Get thermal reading + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_thermal(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_ds_misc_cfg *cfg = NULL; + mlan_ioctl_req *req = NULL; + int ret = 0, header_len = 0, data = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = ENOMEM; + goto done; + } + + cfg = (mlan_ds_misc_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_MISC_THERMAL; + req->req_id = MLAN_IOCTL_MISC_CFG; header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_THERMAL); @@ -6370,7 +7059,7 @@ woal_priv_thermal(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ static int -woal_priv_beacon_interval(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_beacon_interval(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data = 0; mlan_ds_bss *bss = NULL; @@ -6381,13 +7070,13 @@ woal_priv_beacon_interval(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) ENTER(); - req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info)); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); if (req == NULL) { ret = ENOMEM; goto done; } - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_IBSS_BCN_INTERVAL; req->req_id = MLAN_IOCTL_BSS; @@ -6421,7 +7110,7 @@ woal_priv_beacon_interval(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - data = ((mlan_ds_bss *) req->pbuf)->param.bcn_interval; + data = ((mlan_ds_bss *)req->pbuf)->param.bcn_interval; memcpy(respbuf, &data, sizeof(data)); ret = sizeof(data); @@ -6443,7 +7132,7 @@ woal_priv_beacon_interval(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ static int -woal_priv_get_signal(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_get_signal(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { /** Input data size */ #define IN_DATA_SIZE 2 @@ -6626,30 +7315,35 @@ woal_priv_get_signal(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) } #endif +#if defined(STA_SUPPORT) /** - * @brief Get/Set inactivity timeout extend + * @brief Make PMF bit required/optional * @param priv Pointer to moal_private structure * @param respbuf Pointer to response buffer * @param resplen Response buffer length * - * @return Number of bytes written, negative for failure. + * @return 0 -- success, otherwise fail */ -static int -woal_priv_inactivity_timeout_ext(moal_private * priv, t_u8 * respbuf, - t_u32 respbuflen) +int +woal_priv_set_get_pmfcfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { - int data[4]; + int data[2] = { 0, 0 }; mlan_ioctl_req *req = NULL; - mlan_ds_pm_cfg *pmcfg = NULL; - pmlan_ds_inactivity_to inac_to = NULL; + mlan_ds_misc_cfg *cfg = NULL; + mlan_ds_misc_pmfcfg *pmfcfg; int ret = 0; int user_data_len = 0, header_len = 0; mlan_status status = MLAN_STATUS_SUCCESS; ENTER(); - header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_INACTIVITYTO); - memset(data, 0, sizeof(data)); + if (!priv->phandle->card_info->embedded_supp) { + PRINTM(MERROR, "Not supported cmd on this card\n"); + ret = -EOPNOTSUPP; + goto done; + } + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_PMFCFG); if (strlen(respbuf) == header_len) { /* GET operation */ user_data_len = 0; @@ -6659,8 +7353,8 @@ woal_priv_inactivity_timeout_ext(moal_private * priv, t_u8 * respbuf, &user_data_len); } - if (user_data_len != 0 && user_data_len != 3 && user_data_len != 4) { - PRINTM(MERROR, "Invalid number of parameters\n"); + if (user_data_len > 2) { + PRINTM(MERROR, "Invalid number of arguments\n"); ret = -EINVAL; goto done; } @@ -6670,11 +7364,18 @@ woal_priv_inactivity_timeout_ext(moal_private * priv, t_u8 * respbuf, goto done; } - pmcfg = (mlan_ds_pm_cfg *) req->pbuf; - inac_to = &pmcfg->param.inactivity_to; - pmcfg->sub_command = MLAN_OID_PM_CFG_INACTIVITY_TO; - req->req_id = MLAN_IOCTL_PM_CFG; - req->action = MLAN_ACT_GET; + cfg = (mlan_ds_misc_cfg *)req->pbuf; + pmfcfg = (mlan_ds_misc_pmfcfg *)&cfg->param.pmfcfg; + cfg->sub_command = MLAN_OID_MISC_PMFCFG; + req->req_id = MLAN_IOCTL_MISC_CFG; + + if (user_data_len == 0) + req->action = MLAN_ACT_GET; + else { + pmfcfg->mfpc = (t_u8)data[0]; + pmfcfg->mfpr = (t_u8)data[1]; + req->action = MLAN_ACT_SET; + } status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); if (status != MLAN_STATUS_SUCCESS) { @@ -6682,28 +7383,9 @@ woal_priv_inactivity_timeout_ext(moal_private * priv, t_u8 * respbuf, goto done; } - if (user_data_len) { - inac_to->timeout_unit = data[0]; - inac_to->unicast_timeout = data[1]; - inac_to->mcast_timeout = data[2]; - if (user_data_len == 4) - inac_to->ps_entry_timeout = data[3]; - req->action = MLAN_ACT_SET; - - status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); - if (status != MLAN_STATUS_SUCCESS) { - ret = -EFAULT; - goto done; - } - } else { - data[0] = inac_to->timeout_unit; - data[1] = inac_to->unicast_timeout; - data[2] = inac_to->mcast_timeout; - data[3] = inac_to->ps_entry_timeout; - - memcpy(respbuf, (t_u8 *) data, sizeof(data)); - ret = sizeof(data); - } + memcpy(respbuf, (t_u8 *)&cfg->param.pmfcfg, + sizeof(mlan_ds_misc_pmfcfg)); + ret = sizeof(mlan_ds_misc_pmfcfg); done: if (status != MLAN_STATUS_PENDING) @@ -6711,62 +7393,86 @@ woal_priv_inactivity_timeout_ext(moal_private * priv, t_u8 * respbuf, LEAVE(); return ret; } +#endif /** - * @brief Set/Get ATIM window + * @brief Get/Set inactivity timeout extend * @param priv Pointer to moal_private structure * @param respbuf Pointer to response buffer * @param resplen Response buffer length * - * @return Number of bytes written, negative for failure. + * @return Number of bytes written, negative for failure. */ static int -woal_priv_atim_window(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_inactivity_timeout_ext(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) { + int data[4]; mlan_ioctl_req *req = NULL; - mlan_ds_bss *bss = NULL; - int ret = 0, atim = 0; + mlan_ds_pm_cfg *pmcfg = NULL; + pmlan_ds_inactivity_to inac_to = NULL; + int ret = 0; int user_data_len = 0, header_len = 0; mlan_status status = MLAN_STATUS_SUCCESS; ENTER(); - header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_ATIM_WINDOW); - req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); - if (req == NULL) { - ret = -ENOMEM; - goto done; - } - - bss = (mlan_ds_bss *) req->pbuf; - bss->sub_command = MLAN_OID_IBSS_ATIM_WINDOW; - req->req_id = MLAN_IOCTL_BSS; - + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_INACTIVITYTO); + memset(data, 0, sizeof(data)); if (strlen(respbuf) == header_len) { /* GET operation */ user_data_len = 0; - req->action = MLAN_ACT_GET; } else { /* SET operation */ - parse_arguments(respbuf + header_len, &atim, 1, &user_data_len); + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + } - if (user_data_len != 1) { - PRINTM(MERROR, "Invalid number of parameters\n"); - ret = -EINVAL; - goto done; - } - req->action = MLAN_ACT_SET; - bss->param.atim_window = atim; + if (user_data_len != 0 && user_data_len != 3 && user_data_len != 4) { + PRINTM(MERROR, "Invalid number of parameters\n"); + ret = -EINVAL; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; } + pmcfg = (mlan_ds_pm_cfg *)req->pbuf; + inac_to = &pmcfg->param.inactivity_to; + pmcfg->sub_command = MLAN_OID_PM_CFG_INACTIVITY_TO; + req->req_id = MLAN_IOCTL_PM_CFG; + req->action = MLAN_ACT_GET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); if (status != MLAN_STATUS_SUCCESS) { ret = -EFAULT; goto done; } - memcpy(respbuf, (t_u8 *) & bss->param.atim_window, sizeof(int)); - ret = sizeof(int); + if (user_data_len) { + inac_to->timeout_unit = data[0]; + inac_to->unicast_timeout = data[1]; + inac_to->mcast_timeout = data[2]; + if (user_data_len == 4) + inac_to->ps_entry_timeout = data[3]; + req->action = MLAN_ACT_SET; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + } else { + data[0] = inac_to->timeout_unit; + data[1] = inac_to->unicast_timeout; + data[2] = inac_to->mcast_timeout; + data[3] = inac_to->ps_entry_timeout; + + memcpy(respbuf, (t_u8 *)data, sizeof(data)); + ret = sizeof(data); + } done: if (status != MLAN_STATUS_PENDING) @@ -6785,7 +7491,7 @@ woal_priv_atim_window(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ static int -woal_priv_11n_amsdu_aggr_ctrl(moal_private * priv, t_u8 * respbuf, +woal_priv_11n_amsdu_aggr_ctrl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { mlan_ioctl_req *req = NULL; @@ -6803,7 +7509,7 @@ woal_priv_11n_amsdu_aggr_ctrl(moal_private * priv, t_u8 * respbuf, goto done; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_CFG_AMSDU_AGGR_CTRL; req->req_id = MLAN_IOCTL_11N_CFG; @@ -6833,7 +7539,7 @@ woal_priv_11n_amsdu_aggr_ctrl(moal_private * priv, t_u8 * respbuf, data[0] = cfg_11n->param.amsdu_aggr_ctrl.enable; data[1] = cfg_11n->param.amsdu_aggr_ctrl.curr_buf_size; - memcpy(respbuf, (t_u8 *) data, sizeof(data)); + memcpy(respbuf, (t_u8 *)data, sizeof(data)); ret = sizeof(data); done: @@ -6853,7 +7559,7 @@ woal_priv_11n_amsdu_aggr_ctrl(moal_private * priv, t_u8 * respbuf, * @return Number of bytes written, negative for failure. */ static int -woal_priv_tx_bf_cap_ioctl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_tx_bf_cap_ioctl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { mlan_ioctl_req *req = NULL; mlan_ds_11n_cfg *bf_cfg = NULL; @@ -6870,7 +7576,7 @@ woal_priv_tx_bf_cap_ioctl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - bf_cfg = (mlan_ds_11n_cfg *) req->pbuf; + bf_cfg = (mlan_ds_11n_cfg *)req->pbuf; bf_cfg->sub_command = MLAN_OID_11N_CFG_TX_BF_CAP; req->req_id = MLAN_IOCTL_11N_CFG; @@ -6900,7 +7606,7 @@ woal_priv_tx_bf_cap_ioctl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) bf_cap = bf_cfg->param.tx_bf_cap; - memcpy(respbuf, (t_u8 *) & bf_cap, sizeof(bf_cap)); + memcpy(respbuf, (t_u8 *)&bf_cap, sizeof(bf_cap)); ret = sizeof(bf_cap); done: @@ -6920,8 +7626,7 @@ woal_priv_tx_bf_cap_ioctl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ static int -woal_priv_sdio_clock_ioctl(moal_private * priv, t_u8 * respbuf, - t_u32 respbuflen) +woal_priv_sdio_clock_ioctl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; int data = 2; @@ -6934,7 +7639,7 @@ woal_priv_sdio_clock_ioctl(moal_private * priv, t_u8 * respbuf, header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_SDIO_CLOCK); if (strlen(respbuf) == header_len) { /* GET operation */ - memcpy(respbuf, (t_u8 *) & clock_state, sizeof(clock_state)); + memcpy(respbuf, (t_u8 *)&clock_state, sizeof(clock_state)); ret = sizeof(clock_state); goto done; } else { @@ -6979,7 +7684,7 @@ woal_priv_sdio_clock_ioctl(moal_private * priv, t_u8 * respbuf, * @return Number of bytes written, negative for failure. */ static int -woal_priv_sdio_mpa_ctrl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_sdio_mpa_ctrl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { mlan_ioctl_req *req = NULL; mlan_ds_misc_cfg *misc = NULL; @@ -7011,7 +7716,7 @@ woal_priv_sdio_mpa_ctrl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - misc = (mlan_ds_misc_cfg *) req->pbuf; + misc = (mlan_ds_misc_cfg *)req->pbuf; misc->sub_command = MLAN_OID_MISC_SDIO_MPA_CTRL; req->req_id = MLAN_IOCTL_MISC_CFG; req->action = MLAN_ACT_GET; @@ -7036,7 +7741,7 @@ woal_priv_sdio_mpa_ctrl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) PRINTM(MINFO, "Get Param: %d %d %d %d %d %d\n", data[0], data[1], data[2], data[3], data[4], data[5]); - memcpy(respbuf, (t_u8 *) data, sizeof(data)); + memcpy(respbuf, (t_u8 *)data, sizeof(data)); ret = sizeof(data); goto done; } @@ -7091,7 +7796,7 @@ woal_priv_sdio_mpa_ctrl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ static int -woal_priv_sleep_params_ioctl(moal_private * priv, t_u8 * respbuf, +woal_priv_sleep_params_ioctl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; @@ -7115,10 +7820,10 @@ woal_priv_sleep_params_ioctl(moal_private * priv, t_u8 * respbuf, ret = -ENOMEM; goto done; } - pm = (mlan_ds_pm_cfg *) req->pbuf; + pm = (mlan_ds_pm_cfg *)req->pbuf; pm->sub_command = MLAN_OID_PM_CFG_SLEEP_PARAMS; req->req_id = MLAN_IOCTL_PM_CFG; - psleep_params = (pmlan_ds_sleep_params) & pm->param.sleep_params; + psleep_params = (pmlan_ds_sleep_params)&pm->param.sleep_params; header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_SLEEP_PARAMS); if (strlen(respbuf) == header_len) { @@ -7182,7 +7887,7 @@ woal_priv_sleep_params_ioctl(moal_private * priv, t_u8 * respbuf, data[4] = psleep_params->ext_sleep_clk; data[5] = psleep_params->reserved; - memcpy(respbuf, (t_u8 *) data, sizeof(data)); + memcpy(respbuf, (t_u8 *)data, sizeof(data)); ret = sizeof(data); done: @@ -7193,6 +7898,106 @@ woal_priv_sleep_params_ioctl(moal_private * priv, t_u8 * respbuf, return ret; } +#if defined(DFS_TESTING_SUPPORT) +/** + * @brief Set/Get DFS Testing settings + * + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_dfs_testing(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_11h_cfg *ds_11hcfg = NULL; + int ret = 0; + int data[4]; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_DFS_TESTING); + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11h_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + ds_11hcfg = (mlan_ds_11h_cfg *)req->pbuf; + ds_11hcfg->sub_command = MLAN_OID_11H_DFS_TESTING; + req->req_id = MLAN_IOCTL_11H_CFG; + + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + req->action = MLAN_ACT_GET; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + if (user_data_len != 4) { + PRINTM(MERROR, "Invalid number of args!\n"); + ret = -EINVAL; + goto done; + } + if ((unsigned)data[0] > 0xFFFF) { + PRINTM(MERROR, "The maximum user CAC is 65535 msec.\n"); + ret = -EINVAL; + goto done; + } + if ((unsigned)data[1] > 0xFFFF) { + PRINTM(MERROR, "The maximum user NOP is 65535 sec.\n"); + ret = -EINVAL; + goto done; + } + if ((unsigned)data[3] > 0xFF) { + PRINTM(MERROR, + "The maximum user fixed channel is 255.\n"); + ret = -EINVAL; + goto done; + } + ds_11hcfg->param.dfs_testing.usr_cac_period_msec = + (t_u16)data[0]; + ds_11hcfg->param.dfs_testing.usr_nop_period_sec = + (t_u16)data[1]; + ds_11hcfg->param.dfs_testing.usr_no_chan_change = + data[2] ? 1 : 0; + ds_11hcfg->param.dfs_testing.usr_fixed_new_chan = (t_u8)data[3]; + priv->phandle->cac_period_jiffies = (t_u16)data[0] * HZ / 1000; + req->action = MLAN_ACT_SET; + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (!user_data_len) { + data[0] = ds_11hcfg->param.dfs_testing.usr_cac_period_msec; + data[1] = ds_11hcfg->param.dfs_testing.usr_nop_period_sec; + data[2] = ds_11hcfg->param.dfs_testing.usr_no_chan_change; + data[3] = ds_11hcfg->param.dfs_testing.usr_fixed_new_chan; + memcpy(respbuf, (t_u8 *)data, sizeof(data)); + ret = sizeof(data); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} +#endif /* DFS_SUPPORT && DFS_TESTING_SUPPORT */ + /** * @brief Set/Get CFP table codes * @@ -7203,7 +8008,7 @@ woal_priv_sleep_params_ioctl(moal_private * priv, t_u8 * respbuf, * @return Number of bytes written, negative for failure. */ static int -woal_priv_cfp_code(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_cfp_code(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; int user_data_len = 0, header_len = 0; @@ -7225,7 +8030,7 @@ woal_priv_cfp_code(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) } /* Fill request buffer */ - misc_cfg = (mlan_ds_misc_cfg *) req->pbuf; + misc_cfg = (mlan_ds_misc_cfg *)req->pbuf; cfp_code = &misc_cfg->param.cfp_code; misc_cfg->sub_command = MLAN_OID_MISC_CFP_CODE; req->req_id = MLAN_IOCTL_MISC_CFG; @@ -7259,7 +8064,7 @@ woal_priv_cfp_code(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) if (!user_data_len) { data[0] = cfp_code->cfp_code_bg; data[1] = cfp_code->cfp_code_a; - memcpy(respbuf, (t_u8 *) data, sizeof(data)); + memcpy(respbuf, (t_u8 *)data, sizeof(data)); ret = sizeof(data); } @@ -7281,8 +8086,7 @@ woal_priv_cfp_code(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ static int -woal_priv_set_get_tx_rx_ant(moal_private * priv, t_u8 * respbuf, - t_u32 respbuflen) +woal_priv_set_get_tx_rx_ant(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0; int user_data_len = 0, header_len = 0; @@ -7299,7 +8103,7 @@ woal_priv_set_get_tx_rx_ant(moal_private * priv, t_u8 * respbuf, ret = -ENOMEM; goto done; } - radio = (mlan_ds_radio_cfg *) req->pbuf; + radio = (mlan_ds_radio_cfg *)req->pbuf; radio->sub_command = MLAN_OID_ANT_CFG; req->req_id = MLAN_IOCTL_RADIO_CFG; @@ -7325,7 +8129,7 @@ woal_priv_set_get_tx_rx_ant(moal_private * priv, t_u8 * respbuf, } if (!user_data_len) { data = radio->param.antenna; - memcpy(respbuf, (t_u8 *) & data, sizeof(data)); + memcpy(respbuf, (t_u8 *)&data, sizeof(data)); ret = sizeof(data); } done: @@ -7344,7 +8148,7 @@ woal_priv_set_get_tx_rx_ant(moal_private * priv, t_u8 * respbuf, * @return Number of bytes written, negative for failure. */ static int -woal_priv_sysclock(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_sysclock(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int data[65]; mlan_ioctl_req *req = NULL; @@ -7378,7 +8182,7 @@ woal_priv_sysclock(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) goto done; } - cfg = (mlan_ds_misc_cfg *) req->pbuf; + cfg = (mlan_ds_misc_cfg *)req->pbuf; cfg->sub_command = MLAN_OID_MISC_SYS_CLOCK; req->req_id = MLAN_IOCTL_MISC_CFG; @@ -7390,9 +8194,8 @@ woal_priv_sysclock(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) cfg->param.sys_clock.sys_clk_type = MLAN_CLK_CONFIGURABLE; cfg->param.sys_clock.sys_clk_num = MIN(MLAN_MAX_CLK_NUM, user_data_len); - for (i = 0; i < cfg->param.sys_clock.sys_clk_num; i++) { - cfg->param.sys_clock.sys_clk[i] = (t_u16) data[i]; - } + for (i = 0; i < cfg->param.sys_clock.sys_clk_num; i++) + cfg->param.sys_clock.sys_clk[i] = (t_u16)data[i]; status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); if (status != MLAN_STATUS_SUCCESS) { @@ -7419,10 +8222,10 @@ woal_priv_sysclock(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) MIN(cfg->param.sys_clock.sys_clk_num, MLAN_MAX_CLK_NUM); /* Configurable clocks */ - for (i = 1; i <= length_index; i++) { + for (i = 1; i <= length_index; i++) data[i + data_length] = (int)cfg->param.sys_clock.sys_clk[i - 1]; - } + data_length += length_index; /* Get supported clocks */ @@ -7437,10 +8240,9 @@ woal_priv_sysclock(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) MIN(cfg->param.sys_clock.sys_clk_num, MLAN_MAX_CLK_NUM); /* Supported clocks */ - for (i = 1; i <= length_index; i++) { + for (i = 1; i <= length_index; i++) data[i + data_length] = (int)cfg->param.sys_clock.sys_clk[i - 1]; - } data_length += length_index; @@ -7470,7 +8272,7 @@ woal_priv_sysclock(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ static int -woal_priv_adhoc_aes(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_adhoc_aes(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { static char buf[256]; int ret = 0, action = -1; @@ -7512,7 +8314,7 @@ woal_priv_adhoc_aes(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) /* Get Adhoc AES Key */ req->req_id = MLAN_IOCTL_SEC_CFG; req->action = MLAN_ACT_GET; - sec = (mlan_ds_sec_cfg *) req->pbuf; + sec = (mlan_ds_sec_cfg *)req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; sec->param.encrypt_key.key_len = AES_KEY_LEN; sec->param.encrypt_key.key_index = MLAN_KEY_INDEX_UNICAST; @@ -7549,7 +8351,7 @@ woal_priv_adhoc_aes(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) req->req_id = MLAN_IOCTL_SEC_CFG; req->action = MLAN_ACT_SET; - sec = (mlan_ds_sec_cfg *) req->pbuf; + sec = (mlan_ds_sec_cfg *)req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; if (action == 1) { @@ -7566,7 +8368,7 @@ woal_priv_adhoc_aes(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) sec->param.encrypt_key.key_flags = KEY_FLAG_SET_TX_KEY | KEY_FLAG_GROUP_KEY; memcpy(sec->param.encrypt_key.mac_addr, - (u8 *) bcast_addr, ETH_ALEN); + (u8 *)bcast_addr, ETH_ALEN); memcpy(sec->param.encrypt_key.key_material, key_hex, sec->param.encrypt_key.key_len); @@ -7582,7 +8384,7 @@ woal_priv_adhoc_aes(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) MLAN_KEY_INDEX_UNICAST; sec->param.encrypt_key.key_flags = KEY_FLAG_REMOVE_KEY; memcpy(sec->param.encrypt_key.mac_addr, - (u8 *) bcast_addr, ETH_ALEN); + (u8 *)bcast_addr, ETH_ALEN); memset(sec->param.encrypt_key.key_material, 0, sizeof(sec->param.encrypt_key.key_material)); @@ -7608,7 +8410,7 @@ woal_priv_adhoc_aes(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) } /** - * @brief Associate to a specific indexed entry in the ScanTable + * @brief Get GTK/PTK * @param priv Pointer to moal_private structure * @param respbuf Pointer to response buffer * @param resplen Response buffer length @@ -7616,7 +8418,123 @@ woal_priv_adhoc_aes(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ static int -woal_priv_associate_ssid_bssid(moal_private * priv, t_u8 * respbuf, +woal_priv_get_key(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0, copy_len = 0; + int header_len = 0; + unsigned int i; + t_u8 key_ascii[256]; + t_u8 *tmp; + mlan_ds_sec_cfg *sec = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_GET_KEY); + if (strlen(respbuf) != header_len) { + PRINTM(MERROR, "Invalid number of parameters\n"); + ret = -EINVAL; + goto done; + } + memset(key_ascii, 0x00, sizeof(key_ascii)); + tmp = key_ascii; + + if (priv->media_connected == MFALSE) { + PRINTM(MERROR, "Can't get key in un-associated state\n"); + ret = -EFAULT; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Get Unicast Key */ + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_QUERY_KEY; + sec->param.encrypt_key.key_index = 0; + sec->param.encrypt_key.key_flags = 0; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (sec->param.encrypt_key.key_len) { + sprintf((char *)tmp, "\n%s", "PTK: "); + tmp += 5; + for (i = 0; i < sec->param.encrypt_key.key_len; i++) + tmp += sprintf((char *)tmp, "%02x", + sec->param.encrypt_key.key_material[i]); + } + + /* Get Multicase Key */ + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_QUERY_KEY; + sec->param.encrypt_key.key_index = 0; + sec->param.encrypt_key.key_flags = KEY_FLAG_GROUP_KEY; + memset(sec->param.encrypt_key.mac_addr, 0x0, MLAN_MAC_ADDR_LENGTH); + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (sec->param.encrypt_key.key_len) { + sprintf((char *)tmp, "\n%s", "GTK: "); + tmp += 5; + for (i = 0; i < sec->param.encrypt_key.key_len; i++) + tmp += sprintf((char *)tmp, "%02x", + sec->param.encrypt_key.key_material[i]); + } + + /* Get IGTK Key */ + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_QUERY_KEY; + sec->param.encrypt_key.key_index = 0; + sec->param.encrypt_key.key_flags = KEY_FLAG_AES_MCAST_IGTK; + memset(sec->param.encrypt_key.mac_addr, 0x0, MLAN_MAC_ADDR_LENGTH); + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (sec->param.encrypt_key.key_len) { + sprintf((char *)tmp, "\n%s", "IGTK: "); + tmp += 6; + for (i = 0; i < sec->param.encrypt_key.key_len; i++) + tmp += sprintf((char *)tmp, "%02x", + sec->param.encrypt_key.key_material[i]); + } + + copy_len = tmp - key_ascii; + memcpy(respbuf, &key_ascii, copy_len); + ret = copy_len; +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} + +/** + * @brief Associate to a specific indexed entry in the ScanTable + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_associate_ssid_bssid(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int ret = 0, copy_len = 0; @@ -7655,16 +8573,15 @@ woal_priv_associate_ssid_bssid(moal_private * priv, t_u8 * respbuf, memcpy(buf, respbuf + header_len, buflen); - for (i = 0; (i < buflen) && (buf[i] == ' '); i++) { - /* Skip white space */ - } + /* Skip white space */ + for (i = 0; (i < buflen) && (buf[i] == ' '); i++) ; /* Copy/Convert the BSSID */ for (; (i < buflen) && (mac_idx < ETH_ALEN) && (buf[i] != ' '); i++) { if (buf[i] == ':') { mac_idx++; } else { - ssid_bssid.bssid[mac_idx] = (t_u8) woal_atox(buf + i); + ssid_bssid.bssid[mac_idx] = (t_u8)woal_atox(buf + i); while ((isxdigit(buf[i + 1]) && (i < buflen))) /* Skip entire hex value */ @@ -7715,7 +8632,7 @@ woal_priv_associate_ssid_bssid(moal_private * priv, t_u8 * respbuf, * @return Number of bytes written, negative for failure. */ static int -woal_priv_cmd53rdwr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_cmd53rdwr(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { int header_len = 0; int ret = 0; @@ -7726,12 +8643,14 @@ woal_priv_cmd53rdwr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) int reg = 0; t_u32 pattern_len = 0, total_len = 0; t_u16 cmd_len; + gfp_t flag; ENTER(); header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_SD_CMD53_RW); - data = (t_u8 *) kmalloc(WOAL_2K_BYTES, GFP_KERNEL); + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + data = kzalloc(WOAL_2K_BYTES, flag); if (!data) { PRINTM(MERROR, "Cannot allocate buffer for command!\n"); ret = -EFAULT; @@ -7752,11 +8671,11 @@ woal_priv_cmd53rdwr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) blknum = buf[10]; /* block number or byte number */ blknum = (blknum << 8) | buf[9]; - if (mode == BYTE_MODE) { + if (mode == BYTE_MODE) blklen = 1; - } else { + else mode = BLOCK_MODE; - } + total_len = (mode == BLOCK_MODE) ? blknum * blklen : blknum; if (total_len > WOAL_2K_BYTES) { PRINTM(MERROR, "Total data length is too large!\n"); @@ -7786,7 +8705,6 @@ woal_priv_cmd53rdwr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) pattern_len = cmd_len - 11; if (pattern_len > total_len) pattern_len = total_len; - memset(data, 0, WOAL_2K_BYTES); /* Copy/duplicate the pattern to data buffer */ for (pos = 0; pos < total_len; pos++) @@ -7804,13 +8722,456 @@ woal_priv_cmd53rdwr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) } done: - kfree(data); + kfree(data); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Port Control mode + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_port_ctrl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int header_len = 0, user_data_len = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + int ret = 0, data = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_PORT_CTRL_ENABLED; + req->req_id = MLAN_IOCTL_SEC_CFG; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_PORT_CTRL); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + req->action = MLAN_ACT_GET; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, + sizeof(data) / sizeof(int), &user_data_len); + if (user_data_len == 1) { + sec->param.port_ctrl_enabled = data; + req->action = MLAN_ACT_SET; + } else { + PRINTM(MERROR, "Invalid number of parameters\n"); + ret = -EINVAL; + goto done; + } + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (!user_data_len) { + memcpy(respbuf, &sec->param.port_ctrl_enabled, sizeof(int)); + ret = sizeof(int); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} + +/** + * @brief Private IOCTL entry to get the By-passed TX packet from upper layer + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_bypassed_packet(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int header_len = 0; + int ret = 0; + struct sk_buff *skb = NULL; + struct ethhdr *eth; + t_u16 moreLen = 0, copyLen = 0; + ENTER(); + +#define MLAN_BYPASS_PKT_EXTRA_OFFSET (4) + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_PB_BYPASS); + copyLen = strlen(respbuf) - header_len; + moreLen = MLAN_MIN_DATA_HEADER_LEN + MLAN_BYPASS_PKT_EXTRA_OFFSET + + sizeof(mlan_buffer); + + skb = alloc_skb(copyLen + moreLen, GFP_KERNEL); + if (skb == NULL) { + PRINTM(MERROR, "kmalloc no memory !!\n"); + LEAVE(); + return -ENOMEM; + } + + skb_reserve(skb, moreLen); + + memcpy(skb_put(skb, copyLen), respbuf + header_len, copyLen); + + eth = (struct ethhdr *)skb->data; + eth->h_proto = __constant_htons(eth->h_proto); + skb->dev = priv->netdev; + + HEXDUMP("Bypass TX Data", skb->data, MIN(skb->len, 100)); + + woal_hard_start_xmit(skb, priv->netdev); + + LEAVE(); + return ret; +} + +/** + * @brief Control Coalescing status Enable/Disable + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_coalescing_status(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int header_len = 0, user_data_len = 0; + int ret = 0, data = 0; + mlan_ds_misc_cfg *pcoal = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + pcoal = (mlan_ds_misc_cfg *)req->pbuf; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_COALESCE_STATUS); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + req->action = MLAN_ACT_GET; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, + sizeof(data) / sizeof(int), &user_data_len); + if (user_data_len == 1) { + if (data == 1) + pcoal->param.coalescing_status = + MLAN_MISC_COALESCING_ENABLE; + else + pcoal->param.coalescing_status = + MLAN_MISC_COALESCING_DISABLE; + req->action = MLAN_ACT_SET; + } else { + PRINTM(MERROR, "Invalid number of parameters\n"); + ret = -EINVAL; + goto done; + } + } + + req->req_id = MLAN_IOCTL_MISC_CFG; + pcoal->sub_command = MLAN_OID_MISC_COALESCING_STATUS; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + data = (int)(((mlan_ds_misc_cfg *)req->pbuf)->param.coalescing_status); + + memcpy(respbuf, &data, sizeof(int)); + ret = sizeof(int); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(UAP_CFG80211) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION +/** + * @brief Set/Get P2P NoA (Notice of Absence) parameters + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_noa_cfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int header_len = 0, user_data_len = 0; + int ret = 0, data[7]; + mlan_ds_wifi_direct_config noa_cfg; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_NOA_CFG); + memset(&noa_cfg, 0, sizeof(noa_cfg)); + if (woal_p2p_config(priv, MLAN_ACT_GET, &noa_cfg) != + MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "Could not get P2P noa config\n"); + ret = -EINVAL; + goto done; + } + + memset(data, 0, sizeof(data)); + if (strlen(respbuf) == header_len) { + /* GET operation */ + memcpy(respbuf, &noa_cfg, sizeof(noa_cfg)); + ret = sizeof(noa_cfg); + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + if (user_data_len > 7) { + ret = -EINVAL; + goto done; + } + switch (user_data_len) { + case 7: + noa_cfg.ct_window = (t_u8)data[6]; + case 6: + if (data[5] < 0 || data[5] > 1) { + PRINTM(MERROR, "Invalid ps enable\n"); + ret = -EINVAL; + goto done; + } + noa_cfg.opp_ps_enable = (t_u8)data[5]; + noa_cfg.flags |= WIFI_DIRECT_OPP_PS; + case 5: + noa_cfg.noa_interval = (t_u32)data[4]; + case 4: + noa_cfg.noa_duration = (t_u32)data[3]; + case 3: + if (data[2] < 1 || data[2] > 255) { + PRINTM(MERROR, + "Invalid number of absence intervals\n"); + ret = -EINVAL; + goto done; + } + noa_cfg.noa_count = (t_u8)data[2]; + case 2: + if (data[1] < 0 || data[1] > 255) { + PRINTM(MERROR, "Invalid Index\n"); + ret = -EINVAL; + goto done; + } + noa_cfg.index = (t_u16)data[1]; + case 1: + if (data[0] < 0 || data[0] > 1) { + PRINTM(MERROR, "Invalid noa enable\n"); + ret = -EINVAL; + goto done; + } + noa_cfg.noa_enable = (t_u8)data[0]; + noa_cfg.flags |= WIFI_DIRECT_NOA; + break; + default: + break; + } + woal_p2p_config(priv, MLAN_ACT_SET, &noa_cfg); + } +done: + + LEAVE(); + return ret; +} +#endif +#endif +#endif + +#if defined(STA_CFG80211) || defined(UAP_CFG80211) +#define DEF_NOA_INTERVAL 100 +/** + ** @brief Set/Get P2P NoA (Notice of Absence) parameters + ** @param priv Pointer to moal_private structure + ** @param respbuf Pointer to response buffer + ** @param resplen Response buffer length + ** + ** @return Number of bytes written, negative for failure. + **/ +static int +woal_p2p_ps_cfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int user_data_len = 0; + int ret = 0, data[2]; + u32 duration = priv->phandle->noa_duration; + u32 interval = 0; + + ENTER(); + if (strlen(respbuf) > strlen("P2P_PERIODIC_SLEEP")) { + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen("P2P_PERIODIC_SLEEP") + 1, + data, ARRAY_SIZE(data), &user_data_len); + } + if ((user_data_len != 1) && (user_data_len != 2)) { + PRINTM(MERROR, + " Invalid parameter number for P2P_PERIODIC_SLEEP"); + ret = -EINVAL; + goto done; + } + if (data[0] < DEF_NOA_INTERVAL) + interval = DEF_NOA_INTERVAL; + else + interval = + (data[0] + DEF_NOA_INTERVAL - + 1) / DEF_NOA_INTERVAL * DEF_NOA_INTERVAL; + + if (user_data_len == 2) + duration = data[1]; + if (duration >= interval) { + PRINTM(MERROR, + " Invalid noa duration/interval! duration=%d interval=%d\n", + duration, interval); + ret = -EINVAL; + goto done; + } + priv->phandle->noa_interval = interval; + priv->phandle->noa_duration = duration; + PRINTM(MIOCTL, "configure noa interval=%d, duration=%d\n", + priv->phandle->noa_interval, priv->phandle->noa_duration); +done: + LEAVE(); + return ret; +} +#endif + +#ifdef WIFI_DIRECT_SUPPORT +#if defined(STA_CFG80211) || defined(UAP_CFG80211) +/** + * @brief Set/Get MIRACAST configuration parameters + * + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_miracast_cfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + int user_data_len = 0, header_len = 0, data[3] = { 0, 0, 0 }; + + ENTER(); + + if (!priv || !priv->phandle) { + PRINTM(MERROR, "priv or handle is null\n"); + ret = -EFAULT; + goto done; + } + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_MIRACAST_CFG); + + if (strlen(respbuf) == header_len) { + /* GET operation */ + data[0] = priv->phandle->miracast_mode; + data[1] = priv->phandle->miracast_scan_time; + data[2] = priv->phandle->scan_chan_gap; + + memcpy(respbuf, (t_u8 *)data, sizeof(data)); + ret = sizeof(data); + } else { + /* SET operation */ + memset(data, 0, sizeof(data)); + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + + if (user_data_len > 3) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + if (data[0] < 0 || data[0] > 2 || data[1] < 0 || data[2] < 0) { + PRINTM(MERROR, "Invalid argument\n"); + ret = -EINVAL; + goto done; + } + } + + if (user_data_len >= 1) + priv->phandle->miracast_mode = (t_u8)data[0]; + if (user_data_len >= 2) + priv->phandle->miracast_scan_time = (t_u16)data[1]; + if (user_data_len == 3) + priv->phandle->scan_chan_gap = (t_u16)data[2]; + +done: + LEAVE(); + return ret; +} + +/** + * @brief Configuring scan gap for miracast mode + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise failure + */ +int +woal_set_scan_chan_gap(moal_private *priv, t_u8 *respbuf, int respbuflen) +{ + t_u32 data[2]; + int ret = 0; + int user_data_len = 0; + + ENTER(); + + if (strlen(respbuf) > strlen("SCAN_TIMING")) { + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen("SCAN_TIMING") + 1, data, + ARRAY_SIZE(data), &user_data_len); + } + + if (user_data_len != 2) { + PRINTM(MERROR, "Invalid arguments for scan timing\n"); + ret = -EINVAL; + goto done; + } + priv->phandle->miracast_scan_time = (t_u16)data[0]; + priv->phandle->scan_chan_gap = (t_u16)data[1]; +done: LEAVE(); return ret; + } +#endif +#endif /** - * @brief Set/Get Port Control mode + * @brief Set/Get control to coex RX window size configuration + * * @param priv Pointer to moal_private structure * @param respbuf Pointer to response buffer * @param resplen Response buffer length @@ -7818,28 +9179,36 @@ woal_priv_cmd53rdwr(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ static int -woal_priv_port_ctrl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_coex_rx_winsize(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { - int header_len = 0, user_data_len = 0; + int ret = 0; + int user_data_len = 0, header_len = 0, data; mlan_ioctl_req *req = NULL; - mlan_ds_sec_cfg *sec = NULL; - int ret = 0, data = 0; + mlan_ds_11n_cfg *cfg_11n = NULL; mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + if (!priv || !priv->phandle) { + PRINTM(MERROR, "priv or handle is null\n"); + ret = -EFAULT; + goto done; + } + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_COEX_RX_WINSIZE); + /* Allocate an IOCTL request buffer */ - req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); if (req == NULL) { ret = -ENOMEM; goto done; } /* Fill request buffer */ - sec = (mlan_ds_sec_cfg *) req->pbuf; - sec->sub_command = MLAN_OID_SEC_CFG_PORT_CTRL_ENABLED; - req->req_id = MLAN_IOCTL_SEC_CFG; + req->req_id = MLAN_IOCTL_11N_CFG; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_COEX_RX_WINSIZE; - header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_PORT_CTRL); if (strlen(respbuf) == header_len) { /* GET operation */ user_data_len = 0; @@ -7848,14 +9217,21 @@ woal_priv_port_ctrl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) /* SET operation */ parse_arguments(respbuf + header_len, &data, sizeof(data) / sizeof(int), &user_data_len); - if (user_data_len == 1) { - sec->param.port_ctrl_enabled = data; - req->action = MLAN_ACT_SET; - } else { - PRINTM(MERROR, "Invalid number of parameters\n"); + if (user_data_len != 1) { + PRINTM(MERROR, "Invalid number of args! %d\n", + user_data_len); + ret = -EINVAL; + goto done; + } + if ((data != MTRUE) && (data != MFALSE)) { + PRINTM(MERROR, + "Invalid coex RX window size parameter %d\n", + data); ret = -EINVAL; goto done; } + cfg_11n->param.coex_rx_winsize = data; + req->action = MLAN_ACT_SET; } /* Send IOCTL request to MLAN */ @@ -7866,8 +9242,9 @@ woal_priv_port_ctrl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) } if (!user_data_len) { - memcpy(respbuf, &sec->param.port_ctrl_enabled, sizeof(int)); - ret = sizeof(int); + memcpy(respbuf, (t_u8 *)&cfg_11n->param.coex_rx_winsize, + sizeof(t_u32)); + ret = sizeof(t_u32); } done: @@ -7879,7 +9256,8 @@ woal_priv_port_ctrl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) } /** - * @brief Private IOCTL entry to get the By-passed TX packet from upper layer + * @brief Set/Get control to TX AMPDU configuration on infra link + * * @param priv Pointer to moal_private structure * @param respbuf Pointer to response buffer * @param resplen Response buffer length @@ -7887,52 +9265,133 @@ woal_priv_port_ctrl(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) * @return Number of bytes written, negative for failure. */ static int -woal_priv_bypassed_packet(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen) +woal_priv_txaggrctrl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) { - int header_len = 0; int ret = 0; - struct sk_buff *skb = NULL; - struct ethhdr *eth; - t_u16 moreLen = 0, copyLen = 0; + int user_data_len = 0, header_len = 0, data; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); -#define MLAN_BYPASS_PKT_EXTRA_OFFSET (4) + if (!priv || !priv->phandle) { + PRINTM(MERROR, "priv or handle is null\n"); + ret = -EFAULT; + goto done; + } - header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_PB_BYPASS); - copyLen = strlen(respbuf) - header_len; - moreLen = MLAN_MIN_DATA_HEADER_LEN + MLAN_BYPASS_PKT_EXTRA_OFFSET - + sizeof(mlan_buffer); + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_TX_AGGR_CTRL); - skb = alloc_skb(copyLen + moreLen, GFP_KERNEL); - if (skb == NULL) { - PRINTM(MERROR, "kmalloc no memory !!\n"); - LEAVE(); - return -ENOMEM; + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; } - skb_reserve(skb, moreLen); + /* Fill request buffer */ + req->req_id = MLAN_IOCTL_11N_CFG; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_TX_AGGR_CTRL; - memcpy(skb_put(skb, copyLen), respbuf + header_len, copyLen); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + req->action = MLAN_ACT_GET; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, + sizeof(data) / sizeof(int), &user_data_len); + if (user_data_len != 1) { + PRINTM(MERROR, "Invalid number of args! %d\n", + user_data_len); + ret = -EINVAL; + goto done; + } + if ((data != MTRUE) && (data != MFALSE)) { + PRINTM(MERROR, "Invalid txaggrctrl parameter %d\n", + data); + ret = -EINVAL; + goto done; + } + cfg_11n->param.txaggrctrl = data; + req->action = MLAN_ACT_SET; + } - eth = (struct ethhdr *)skb->data; - eth->h_proto = __constant_htons(eth->h_proto); - skb->dev = priv->netdev; + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } - HEXDUMP("Bypass TX Data", skb->data, MIN(skb->len, 100)); + if (!user_data_len) { + memcpy(respbuf, (t_u8 *)&cfg_11n->param.txaggrctrl, + sizeof(t_u32)); + ret = sizeof(t_u32); + } - woal_hard_start_xmit(skb, priv->netdev); +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); LEAVE(); return ret; } -#if defined(WIFI_DIRECT_SUPPORT) -#endif +/** + * @brief Set/Get control to enable/disable auto TDLS + * + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_auto_tdls(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + int user_data_len = 0, header_len = 0, data; -#ifdef WIFI_DIRECT_SUPPORT -#if defined(STA_CFG80211) || defined(UAP_CFG80211) -#endif -#endif + ENTER(); + + if (!priv || !priv->phandle) { + PRINTM(MERROR, "priv or handle is null\n"); + ret = -EFAULT; + goto done; + } + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_AUTO_TDLS); + + if (strlen(respbuf) == header_len) { + /* GET operation */ + data = priv->enable_auto_tdls; + memcpy(respbuf, (t_u8 *)&data, sizeof(data)); + ret = sizeof(data); + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, + sizeof(data) / sizeof(int), &user_data_len); + if (user_data_len != 1) { + PRINTM(MERROR, "Invalid number of args! %d\n", + user_data_len); + ret = -EINVAL; + goto done; + } + if ((data != MTRUE) && (data != MFALSE)) { + PRINTM(MERROR, "Invalid autotdls parameter %d\n", data); + ret = -EINVAL; + goto done; + } + priv->enable_auto_tdls = (t_u8)data; + } + +done: + LEAVE(); + return ret; +} /** * @brief Set priv command for Android @@ -7946,7 +9405,7 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) { int ret = 0; android_wifi_priv_cmd priv_cmd; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); char *buf = NULL; char *pdata; #ifdef STA_SUPPORT @@ -7957,8 +9416,11 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) mlan_ds_get_signal signal; mlan_rate_cfg_t rate; t_u8 country_code[COUNTRY_CODE_LEN]; + int copy_len = 0; #endif int len = 0; + gfp_t flag; + char *cmd_buf = NULL; ENTER(); if (!priv || !priv->phandle) { @@ -7983,20 +9445,33 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) if (priv_cmd.total_len + 1 > CMD_BUF_LEN) priv_cmd.total_len = CMD_BUF_LEN - 1; - buf = kzalloc(priv_cmd.total_len + 1, GFP_KERNEL); + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + buf = kzalloc(CMD_BUF_LEN, flag); if (!buf) { PRINTM(MERROR, "%s: failed to allocate memory\n", __FUNCTION__); ret = -ENOMEM; goto done; } - if (copy_from_user(buf, priv_cmd.buf, priv_cmd.total_len)) { +#ifdef USERSPACE_32BIT_OVER_KERNEL_64BIT + memcpy(&cmd_buf, &priv_cmd.buf, sizeof(cmd_buf)); +#else + cmd_buf = priv_cmd.buf; +#endif + if (copy_from_user(buf, cmd_buf, priv_cmd.total_len)) { ret = -EFAULT; goto done; } - buf[priv_cmd.total_len] = '\0'; + buf[CMD_BUF_LEN - 1] = '\0'; PRINTM(MIOCTL, "Android priv cmd: [%s] on [%s]\n", buf, req->ifr_name); + if (strncmp(buf, CMD_MARVELL, strlen(CMD_MARVELL)) && + woal_check_driver_status(priv->phandle)) { + PRINTM(MERROR, "%s fail when driver hang\n", buf); + ret = -EFAULT; + goto done; + } + if (strncmp(buf, CMD_MARVELL, strlen(CMD_MARVELL)) == 0) { /* This command has come from mlanutl app */ @@ -8098,6 +9573,20 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) /* Custom IE configuration */ len = woal_priv_customie(priv, buf, priv_cmd.total_len); goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_ESUPPMODE, + strlen(PRIV_CMD_ESUPPMODE)) == 0) { + /* Esupplicant mode configuration */ + len = woal_setget_priv_esuppmode(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_PASSPHRASE, + strlen(PRIV_CMD_PASSPHRASE)) == 0) { + /* Esupplicant passphrase configuration */ + len = woal_setget_priv_passphrase(priv, buf, + priv_cmd.total_len); + goto handled; } else if (strnicmp (buf + strlen(CMD_MARVELL), PRIV_CMD_DEAUTH, strlen(PRIV_CMD_DEAUTH)) == 0) { @@ -8134,7 +9623,7 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) strlen(PRIV_CMD_BSSROLE)) == 0) { /* BSS Role */ len = woal_priv_bssrole(priv, buf, - (t_u32) priv_cmd.total_len); + (t_u32)priv_cmd.total_len); goto handled; #endif #endif @@ -8158,7 +9647,7 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) strlen(PRIV_CMD_EXTCAPCFG)) == 0) { /* Extended capabilities configure */ len = woal_priv_extcapcfg(priv, buf, - (t_u32) priv_cmd.total_len); + (t_u32)priv_cmd.total_len); goto handled; #endif } else if (strnicmp @@ -8173,8 +9662,7 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) strlen(PRIV_CMD_IPADDR)) == 0) { /* IP address */ len = woal_priv_setgetipaddr(priv, buf, - (t_u32) priv_cmd. - total_len); + (t_u32)priv_cmd.total_len); goto handled; } else if (strnicmp (buf + strlen(CMD_MARVELL), PRIV_CMD_WPSSESSION, @@ -8373,6 +9861,32 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) len = woal_priv_sdcmd52rw(priv, buf, priv_cmd.total_len); goto handled; +#ifdef STA_SUPPORT + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_ARPFILTER, + strlen(PRIV_CMD_ARPFILTER)) == 0) { + /* ARPFilter Configuration */ + len = woal_priv_arpfilter(priv, buf, + priv_cmd.total_len); + goto handled; +#endif + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_HOTSPOTCFG, + strlen(PRIV_CMD_HOTSPOTCFG)) == 0) { + /* Hotspot CFG */ + len = woal_priv_hotspotcfg(priv, buf, + priv_cmd.total_len); + goto handled; +#ifdef RX_PACKET_COALESCE + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_RX_COAL_CFG, + strlen(PRIV_CMD_RX_COAL_CFG)) == 0) { + /* RX packet coalescing Configuration */ + len = woal_priv_rx_pkt_coalesce_cfg(priv, buf, + priv_cmd.total_len); + goto handled; +#endif + } else if (strnicmp (buf + strlen(CMD_MARVELL), PRIV_CMD_MGMT_FRAME_CTRL, strlen(PRIV_CMD_MGMT_FRAME_CTRL)) == 0) { @@ -8457,6 +9971,21 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) len = woal_priv_region_code(priv, buf, priv_cmd.total_len); goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_MULTI_CHAN_CFG, + strlen(PRIV_CMD_MULTI_CHAN_CFG)) == 0) { + /* Channel time and buffer weight configuration */ + len = woal_priv_multi_chan_config(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), + PRIV_CMD_MULTI_CHAN_POLICY, + strlen(PRIV_CMD_MULTI_CHAN_POLICY)) == 0) { + /* Multi-channel Policy enable/disable */ + len = woal_priv_multi_chan_policy(priv, buf, + priv_cmd.total_len); + goto handled; } else if (strnicmp (buf + strlen(CMD_MARVELL), PRIV_CMD_FWMACADDR, strlen(PRIV_CMD_FWMACADDR)) == 0) { @@ -8549,6 +10078,14 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) priv_cmd.total_len); goto handled; #endif + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_POWER_CONS, + strlen(PRIV_CMD_POWER_CONS)) == 0) { + /* Set/get user provisioned local power constraint */ + len = woal_priv_11h_local_pwr_constraint(priv, buf, + priv_cmd. + total_len); + goto handled; } else if (strnicmp (buf + strlen(CMD_MARVELL), PRIV_CMD_THERMAL, strlen(PRIV_CMD_THERMAL)) == 0) { @@ -8570,6 +10107,15 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) len = woal_priv_get_signal(priv, buf, priv_cmd.total_len); goto handled; +#endif +#if defined(STA_SUPPORT) + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_PMFCFG, + strlen(PRIV_CMD_PMFCFG)) == 0) { + /* Configure PMF */ + len = woal_priv_set_get_pmfcfg(priv, buf, + priv_cmd.total_len); + goto handled; #endif } else if (strnicmp (buf + strlen(CMD_MARVELL), PRIV_CMD_INACTIVITYTO, @@ -8579,13 +10125,6 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) priv_cmd. total_len); goto handled; - } else if (strnicmp - (buf + strlen(CMD_MARVELL), PRIV_CMD_ATIM_WINDOW, - strlen(PRIV_CMD_ATIM_WINDOW)) == 0) { - /* Set/Get ATIM window */ - len = woal_priv_atim_window(priv, buf, - priv_cmd.total_len); - goto handled; } else if (strnicmp (buf + strlen(CMD_MARVELL), PRIV_CMD_AMSDU_AGGR_CTRL, strlen(PRIV_CMD_AMSDU_AGGR_CTRL)) == 0) { @@ -8623,6 +10162,15 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) len = woal_priv_sleep_params_ioctl(priv, buf, priv_cmd.total_len); goto handled; +#if defined(DFS_TESTING_SUPPORT) + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_DFS_TESTING, + strlen(PRIV_CMD_DFS_TESTING)) == 0) { + /* Set/Get DFS Testing settings */ + len = woal_priv_dfs_testing(priv, buf, + priv_cmd.total_len); + goto handled; +#endif } else if (strnicmp (buf + strlen(CMD_MARVELL), PRIV_CMD_CFP_CODE, strlen(PRIV_CMD_CFP_CODE)) == 0) { @@ -8649,6 +10197,12 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) len = woal_priv_adhoc_aes(priv, buf, priv_cmd.total_len); goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_GET_KEY, + strlen(PRIV_CMD_GET_KEY)) == 0) { + /* Get GTK/PTK */ + len = woal_priv_get_key(priv, buf, priv_cmd.total_len); + goto handled; } else if (strnicmp (buf + strlen(CMD_MARVELL), PRIV_CMD_ASSOCIATE, strlen(PRIV_CMD_ASSOCIATE)) == 0) { @@ -8680,12 +10234,57 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) len = woal_priv_bypassed_packet(priv, buf, priv_cmd.total_len); goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_COALESCE_STATUS, + strlen(PRIV_CMD_COALESCE_STATUS)) == 0) { + /* Control Coalescing status Enable/Disable */ + len = woal_priv_coalescing_status(priv, buf, + priv_cmd.total_len); + goto handled; #if defined(WIFI_DIRECT_SUPPORT) +#if defined(UAP_CFG80211) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_NOA_CFG, + strlen(PRIV_CMD_NOA_CFG)) == 0) { + /* Set/Get P2P NoA (Notice of Absence) parameters */ + len = woal_priv_noa_cfg(priv, buf, priv_cmd.total_len); + goto handled; +#endif +#endif #endif #ifdef WIFI_DIRECT_SUPPORT #if defined(STA_CFG80211) || defined(UAP_CFG80211) + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_MIRACAST_CFG, + strlen(PRIV_CMD_MIRACAST_CFG)) == 0) { + /* Set/Get MIRACAST configuration parameters */ + len = woal_priv_miracast_cfg(priv, buf, + priv_cmd.total_len); + goto handled; #endif #endif + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_COEX_RX_WINSIZE, + strlen(PRIV_CMD_COEX_RX_WINSIZE)) == 0) { + /* Set/Get control to coex RX window size */ + len = woal_priv_coex_rx_winsize(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_TX_AGGR_CTRL, + strlen(PRIV_CMD_TX_AGGR_CTRL)) == 0) { + /* Set/Get control to TX AMPDU on infra link */ + len = woal_priv_txaggrctrl(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_AUTO_TDLS, + strlen(PRIV_CMD_AUTO_TDLS)) == 0) { + /* Set/Get control to enable/disable auto TDLS */ + len = woal_priv_auto_tdls(priv, buf, + priv_cmd.total_len); + goto handled; } else { /* Fall through, after stripping off the custom header */ buf += strlen(CMD_MARVELL); @@ -8785,16 +10384,39 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) } } len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "SETROAMING", strlen("SETROAMING")) == 0) { + pdata = buf + strlen("SETROAMING") + 1; +#ifdef STA_CFG80211 + if (*pdata == '1') { + priv->roaming_enabled = MTRUE; + PRINTM(MIOCTL, "Roaming enabled\n"); + } else if (*pdata == '0') { + priv->roaming_enabled = MFALSE; + PRINTM(MIOCTL, "Roaming disabled\n"); + } +#endif + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "ROAM", strlen("ROAM")) == 0) { + pdata = buf + strlen("ROAM") + 1; +#ifdef STA_CFG80211 + if (*pdata == '1') { + priv->roaming_enabled = MTRUE; + PRINTM(MIOCTL, "Roaming enabled\n"); + } else if (*pdata == '0') { + priv->roaming_enabled = MFALSE; + PRINTM(MIOCTL, "Roaming disabled\n"); + } +#endif + len = sprintf(buf, "OK\n") + 1; } else if (strncmp(buf, "COUNTRY", strlen("COUNTRY")) == 0) { - if ((strlen(buf) - strlen("COUNTRY") - 1) > COUNTRY_CODE_LEN - || (strlen(buf) - strlen("COUNTRY") - 1) <= 0) { + copy_len = strlen(buf) - strlen("COUNTRY") - 1; + if (copy_len > COUNTRY_CODE_LEN || copy_len <= 0) { PRINTM(MERROR, "Invalid country length\n"); ret = -EFAULT; goto done; } memset(country_code, 0, sizeof(country_code)); - memcpy(country_code, buf + strlen("COUNTRY") + 1, - strlen(buf) - strlen("COUNTRY") - 1); + memcpy(country_code, buf + strlen("COUNTRY") + 1, copy_len); PRINTM(MIOCTL, "Set COUNTRY %s\n", country_code); if (MLAN_STATUS_SUCCESS != woal_request_country_power_table(priv, country_code)) { @@ -8857,9 +10479,11 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) goto done; len = sprintf(buf, "OK\n") + 1; } else if (strncmp(buf, "AP_SET_CFG", strlen("AP_SET_CFG")) == 0) { + if (priv_cmd.total_len <= strlen("AP_SET_CFG") + 1) + goto done; pdata = buf + strlen("AP_SET_CFG") + 1; ret = woal_uap_set_ap_cfg(priv, pdata, - priv_cmd.used_len - + priv_cmd.total_len - strlen("AP_SET_CFG") - 1); if (ret) goto done; @@ -8981,7 +10605,7 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) #if defined(STA_CFG80211) && defined(UAP_CFG80211) #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0) if (MLAN_STATUS_SUCCESS != - woal_set_ap_wps_p2p_ie(priv, (t_u8 *) pdata, + woal_set_ap_wps_p2p_ie(priv, (t_u8 *)pdata, priv_cmd.used_len - strlen("SET_AP_WPS_P2P_IE") - 1)) { ret = -EFAULT; @@ -9008,7 +10632,7 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) #ifdef WIFI_DIRECT_SUPPORT #if defined(STA_CFG80211) || defined(UAP_CFG80211) if (MLAN_STATUS_SUCCESS != - woal_set_miracast_mode(priv, (t_u8 *) pdata, + woal_set_miracast_mode(priv, (t_u8 *)pdata, priv_cmd.used_len - strlen("MIRACAST"))) { ret = -EFAULT; @@ -9020,6 +10644,11 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) } else if (strnicmp(buf, "SCAN_TIMING", strlen("SCAN_TIMING")) == 0) { #ifdef WIFI_DIRECT_SUPPORT #if defined(STA_CFG80211) || defined(UAP_CFG80211) + if (MLAN_STATUS_SUCCESS != + woal_set_scan_chan_gap(priv, buf, priv_cmd.total_len)) { + ret = -EFAULT; + goto done; + } #endif #endif len = sprintf(buf, "OK\n") + 1; @@ -9055,6 +10684,22 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) } #endif len = sprintf(buf, "OK\n") + 1; + } +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + else if (strncmp + (buf, "P2P_PERIODIC_SLEEP", + strlen("P2P_PERIODIC_SLEEP")) == 0) { + if (MLAN_STATUS_SUCCESS != + woal_p2p_ps_cfg(priv, buf, priv_cmd.total_len)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } +#endif + else if (strncmp(buf, "WLS_BATCHING", strlen("WLS_BATCHING")) == 0) { + /* TODO */ + len = sprintf(buf, "OK\n") + 1; } else { PRINTM(MIOCTL, "Unknown PRIVATE command: %s, ignored\n", buf); ret = -EFAULT; @@ -9067,10 +10712,10 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) if (len > 0) { priv_cmd.used_len = len; if (priv_cmd.used_len <= priv_cmd.total_len) { - memset(priv_cmd.buf + priv_cmd.used_len, 0, + memset(cmd_buf + priv_cmd.used_len, 0, (size_t) (priv_cmd.total_len - priv_cmd.used_len)); - if (copy_to_user(priv_cmd.buf, buf, priv_cmd.used_len)) { + if (copy_to_user(cmd_buf, buf, priv_cmd.used_len)) { PRINTM(MERROR, "%s: failed to copy data to user buffer\n", __FUNCTION__); @@ -9123,8 +10768,7 @@ woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) * @return N/A */ void -wlan_scan_create_brief_table_entry(t_u8 ** ppbuffer, - BSSDescriptor_t * pbss_desc) +wlan_scan_create_brief_table_entry(t_u8 **ppbuffer, BSSDescriptor_t *pbss_desc) { t_u8 *ptmp_buf = *ppbuffer; t_u8 tmp_ssid_hdr[2]; @@ -9196,8 +10840,8 @@ wlan_scan_create_brief_table_entry(t_u8 ** ppbuffer, * @return MLAN_STATUS_SUCCESS, or < 0 with IOCTL error code */ int -wlan_get_scan_table_ret_entry(BSSDescriptor_t * pbss_desc, - t_u8 ** ppbuffer, int *pspace_left) +wlan_get_scan_table_ret_entry(BSSDescriptor_t *pbss_desc, + t_u8 **ppbuffer, int *pspace_left) { wlan_ioctl_get_scan_table_entry *prsp_entry; wlan_ioctl_get_scan_table_entry tmp_rsp_entry; diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_eth_ioctl.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_eth_ioctl.h old mode 100755 new mode 100644 index 3f3c412d..ac6b7ec2 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_eth_ioctl.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_eth_ioctl.h @@ -31,11 +31,11 @@ Change log: #define _WOAL_ETH_PRIV_H_ /** Command disabled */ -#define CMD_DISABLED 0 +#define CMD_DISABLED 0 /** Command enabled */ -#define CMD_ENABLED 1 +#define CMD_ENABLED 1 /** Command get */ -#define CMD_GET 2 +#define CMD_GET 2 /** 2K bytes */ #define WOAL_2K_BYTES 2000 @@ -68,6 +68,8 @@ Change log: #define PRIV_CMD_DATARATE "getdatarate" #define PRIV_CMD_TXRATECFG "txratecfg" #define PRIV_CMD_GETLOG "getlog" +#define PRIV_CMD_ESUPPMODE "esuppmode" +#define PRIV_CMD_PASSPHRASE "passphrase" #define PRIV_CMD_DEAUTH "deauth" #ifdef UAP_SUPPORT #define PRIV_CMD_AP_DEAUTH "apdeauth" @@ -82,7 +84,7 @@ Change log: #ifdef STA_SUPPORT #define PRIV_CMD_GETSCANTABLE "getscantable" #define PRIV_CMD_SETUSERSCAN "setuserscan" -#define PRIV_CMD_EXTCAPCFG "extcapcfg" +#define PRIV_CMD_EXTCAPCFG "extcapcfg" #endif #define PRIV_CMD_DEEPSLEEP "deepsleep" #define PRIV_CMD_IPADDR "ipaddr" @@ -122,6 +124,8 @@ Change log: #define PRIV_CMD_RDEEPROM "rdeeprom" #define PRIV_CMD_MEMRDWR "memrdwr" #define PRIV_CMD_SDCMD52RW "sdcmd52rw" +#define PRIV_CMD_ARPFILTER "arpfilter" +#define PRIV_CMD_HOTSPOTCFG "hotspotcfg" #define PRIV_CMD_MGMT_FRAME_CTRL "mgmtframectrl" #define PRIV_CMD_QCONFIG "qconfig" #define PRIV_CMD_ADDTS "addts" @@ -137,7 +141,7 @@ Change log: #define PRIV_CMD_OFFCHANNEL "offchannel" #endif /** Private command: Verext */ -#define PRIV_CMD_VEREXT "verext" +#define PRIV_CMD_VEREXT "verext" #if defined(STA_SUPPORT) #define PRIV_CMD_RADIO_CTRL "radioctrl" #endif @@ -154,13 +158,16 @@ Change log: #ifdef STA_SUPPORT #define PRIV_CMD_AUTH_TYPE "authtype" #endif +#define PRIV_CMD_POWER_CONS "powercons" #define PRIV_CMD_THERMAL "thermal" #define PRIV_CMD_BCN_INTERVAL "bcninterval" #ifdef STA_SUPPORT #define PRIV_CMD_GET_SIGNAL "getsignal" #endif +#if defined(STA_SUPPORT) +#define PRIV_CMD_PMFCFG "pmfcfg" +#endif #define PRIV_CMD_INACTIVITYTO "inactivityto" -#define PRIV_CMD_ATIM_WINDOW "atimwindow" #define PRIV_CMD_AMSDU_AGGR_CTRL "amsduaggrctrl" #define PRIV_CMD_TX_BF_CAP "httxbfcap" #define PRIV_CMD_SDIO_CLOCK "sdioclock" @@ -168,26 +175,45 @@ Change log: #define PRIV_CMD_MPA_CTRL "mpactrl" #endif #define PRIV_CMD_SLEEP_PARAMS "sleepparams" +#if defined(DFS_TESTING_SUPPORT) +#define PRIV_CMD_DFS_TESTING "dfstesting" +#endif #define PRIV_CMD_CFP_CODE "cfpcode" #define PRIV_CMD_ANT_CFG "antcfg" #define PRIV_CMD_SYSCLOCK "sysclock" #define PRIV_CMD_ADHOC_AES "adhocaes" +#define PRIV_CMD_GET_KEY "getkey" #define PRIV_CMD_ASSOCIATE "associate" #define PRIV_CMD_PORT_CTRL "port_ctrl" #define PRIV_CMD_PB_BYPASS "pb_bypass" +#define PRIV_CMD_COALESCE_STATUS "coalesce_status" #define PRIV_CMD_SD_CMD53_RW "sdcmd53rw" +#ifdef RX_PACKET_COALESCE +#define PRIV_CMD_RX_COAL_CFG "rxpktcoal_cfg" +#endif +#define PRIV_CMD_MULTI_CHAN_CFG "mc_cfg" +#define PRIV_CMD_MULTI_CHAN_POLICY "mc_policy" #if defined(WIFI_DIRECT_SUPPORT) +#if defined(UAP_CFG80211) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION +#define PRIV_CMD_NOA_CFG "noacfg" +#endif +#endif #endif #ifdef WIFI_DIRECT_SUPPORT #if defined(STA_CFG80211) || defined(UAP_CFG80211) +#define PRIV_CMD_MIRACAST_CFG "miracastcfg" #endif #endif +#define PRIV_CMD_COEX_RX_WINSIZE "coex_rx_winsize" +#define PRIV_CMD_TX_AGGR_CTRL "txaggrctrl" +#define PRIV_CMD_AUTO_TDLS "autotdls" /** Private command ID for Android default commands */ -#define WOAL_ANDROID_DEF_CMD (SIOCDEVPRIVATE + 1) +#define WOAL_ANDROID_DEF_CMD (SIOCDEVPRIVATE + 1) /** Private command ID to send TLD configuration */ -#define WOAL_TDLS_CONFIG (SIOCDEVPRIVATE + 5) +#define WOAL_TDLS_CONFIG (SIOCDEVPRIVATE + 5) /** Private command ID to pass mgmt frame */ #define WOAL_MGMT_FRAME_TX WOAL_MGMT_FRAME_TX_IOCTL @@ -196,7 +222,7 @@ Change log: #define WOAL_CUSTOM_IE_CFG (SIOCDEVPRIVATE + 13) /** Private command ID for Android ICS priv CMDs */ -#define WOAL_ANDROID_PRIV_CMD (SIOCDEVPRIVATE + 14) +#define WOAL_ANDROID_PRIV_CMD (SIOCDEVPRIVATE + 14) /** Private command ID to get BSS type */ #define WOAL_GET_BSS_TYPE (SIOCDEVPRIVATE + 15) @@ -211,6 +237,17 @@ int woal_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd); * kernel updates "used_len" during copy_to_user */ /** Private command structure from app */ +#ifdef USERSPACE_32BIT_OVER_KERNEL_64BIT +typedef struct _android_wifi_priv_cmd { + /** Buffer pointer */ + t_u64 buf; + /** buffer updated by driver */ + int used_len; + /** buffer sent by application */ + int total_len; +} __attribute__ ((packed)) + android_wifi_priv_cmd; +#else typedef struct _android_wifi_priv_cmd { /** Buffer pointer */ char *buf; @@ -219,6 +256,7 @@ typedef struct _android_wifi_priv_cmd { /** buffer sent by application */ int total_len; } android_wifi_priv_cmd; +#endif #ifndef IFNAMSIZ #define IFNAMSIZ 16 @@ -314,6 +352,7 @@ struct mwreq { typedef struct woal_priv_ht_cap_info { t_u32 ht_cap_info_bg; + t_u32 ht_cap_info_a; } woal_ht_cap_info; typedef struct woal_priv_addba { @@ -332,7 +371,16 @@ typedef struct woal_priv_tx_rate_cfg { t_u32 rate_index; } woal_tx_rate_cfg; -mlan_status woal_set_ap_wps_p2p_ie(moal_private * priv, t_u8 * ie, size_t len); +typedef struct woal_priv_esuppmode_cfg { + /* RSN mode */ + t_u16 rsn_mode; + /* Pairwise cipher */ + t_u8 pairwise_cipher; + /* Group cipher */ + t_u8 group_cipher; +} woal_esuppmode_cfg; + +mlan_status woal_set_ap_wps_p2p_ie(moal_private *priv, t_u8 *ie, size_t len); int woal_android_priv_cmd(struct net_device *dev, struct ifreq *req); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_ioctl.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_ioctl.c old mode 100755 new mode 100644 index cf25d083..c7c2280c --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_ioctl.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_ioctl.c @@ -38,6 +38,24 @@ Change log: /******************************************************** Local Variables ********************************************************/ +/* CAC Measure report default time 60 seconds */ +#define MEAS_REPORT_TIME (60 * HZ) +#define MRVL_TLV_HEADER_SIZE 4 +/* Marvell Channel config TLV ID */ +#define MRVL_CHANNELCONFIG_TLV_ID (0x0100 + 0x2a) /* 0x012a */ + +typedef struct _hostcmd_header { + /** Command Header : Command */ + t_u16 command; + /** Command Header : Size */ + t_u16 size; + /** Command Header : Sequence number */ + t_u16 seq_num; + /** Command Header : Result */ + t_u16 result; + /** Command action */ + t_u16 action; +} hostcmd_header, *phostcmd_header; #ifdef STA_SUPPORT /** Region code mapping */ @@ -163,7 +181,7 @@ woal_is_valid_alpha2(char *alpha2) * @return N/A */ static inline void -woal_copy_mc_addr(mlan_multicast_list * mlist, mlan_802_11_mac_addr mac) +woal_copy_mc_addr(mlan_multicast_list *mlist, mlan_802_11_mac_addr mac) { int i = 0; for (i = 0; i < mlist->num_multicast_addr; i++) { @@ -186,7 +204,7 @@ woal_copy_mc_addr(mlan_multicast_list * mlist, mlan_802_11_mac_addr mac) * @return Number of multicast addresses */ static inline int -woal_copy_mcast_addr(mlan_multicast_list * mlist, struct net_device *dev) +woal_copy_mcast_addr(mlan_multicast_list *mlist, struct net_device *dev) { #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) struct dev_mc_list *mcptr = dev->mc_list; @@ -218,7 +236,7 @@ woal_copy_mcast_addr(mlan_multicast_list * mlist, struct net_device *dev) * @return total_mc_count */ static int -woal_copy_all_mc_list(moal_handle * handle, mlan_multicast_list * mlist) +woal_copy_all_mc_list(moal_handle *handle, mlan_multicast_list *mlist) { int i; moal_private *priv = NULL; @@ -257,7 +275,7 @@ woal_copy_all_mc_list(moal_handle * handle, mlan_multicast_list * mlist) * @return N/A */ static inline void -woal_fill_wait_queue(moal_private * priv, wait_queue * wait, t_u8 wait_option) +woal_fill_wait_queue(moal_private *priv, wait_queue *wait, t_u8 wait_option) { ENTER(); wait->start_time = jiffies; @@ -276,6 +294,10 @@ woal_fill_wait_queue(moal_private * priv, wait_queue * wait, t_u8 wait_option) case MOAL_CMD_WAIT: wait->wait = &priv->cmd_wait_q; break; + case MOAL_CMD_WAIT_TIMEOUT: + wait->wait = &priv->cmd_wait_q; + wait->wait_timeout = MTRUE; + break; #ifdef CONFIG_PROC_FS case MOAL_PROC_WAIT: wait->wait = &priv->proc_wait_q; @@ -302,15 +324,17 @@ woal_fill_wait_queue(moal_private * priv, wait_queue * wait, t_u8 wait_option) * @return N/A */ static inline mlan_status -woal_wait_ioctl_complete(moal_private * priv, mlan_ioctl_req * req, +woal_wait_ioctl_complete(moal_private *priv, mlan_ioctl_req *req, t_u8 wait_option) { mlan_status status; - wait_queue *wait = (wait_queue *) req->reserved_1; + wait_queue *wait = (wait_queue *)req->reserved_1; unsigned long flags; ENTER(); + priv->phandle->ioctl_timeout = MFALSE; + switch (wait_option) { case MOAL_NO_WAIT: break; @@ -326,6 +350,10 @@ woal_wait_ioctl_complete(moal_private * priv, mlan_ioctl_req * req, wait_event_interruptible_exclusive(priv->cmd_wait_q, wait->condition); break; + case MOAL_CMD_WAIT_TIMEOUT: + wait_event_timeout(priv->cmd_wait_q, wait->condition, + MOAL_IOCTL_TIMEOUT); + break; #ifdef CONFIG_PROC_FS case MOAL_PROC_WAIT: wait_event_interruptible_exclusive(priv->proc_wait_q, @@ -342,10 +370,19 @@ woal_wait_ioctl_complete(moal_private * priv, mlan_ioctl_req * req, } spin_lock_irqsave(&priv->phandle->driver_lock, flags); if (wait->condition == MFALSE) { - PRINTM(MMSG, - "wlan: IOCTL by signal %p id=0x%x, sub_id=0x%x, wait_option=%d, action=%d\n", - req, req->req_id, (*(t_u32 *) req->pbuf), wait_option, - (int)req->action); + if ((wait_option == MOAL_IOCTL_WAIT_TIMEOUT) || + (wait_option == MOAL_CMD_WAIT_TIMEOUT)) { + priv->phandle->ioctl_timeout = MTRUE; + PRINTM(MMSG, + "wlan: IOCTL timeout %p id=0x%x, sub_id=0x%x, wait_option=%d, action=%d\n", + req, req->req_id, (*(t_u32 *)req->pbuf), + wait_option, (int)req->action); + } else { + PRINTM(MMSG, + "wlan: IOCTL by signal %p id=0x%x, sub_id=0x%x, wait_option=%d, action=%d\n", + req, req->req_id, (*(t_u32 *)req->pbuf), + wait_option, (int)req->action); + } req->reserved_1 = 0; status = MLAN_STATUS_PENDING; } else { @@ -357,6 +394,105 @@ woal_wait_ioctl_complete(moal_private * priv, mlan_ioctl_req * req, return status; } +/** + * @brief CAC period block cmd handler + * + * @param priv A pointer to moal_private structure + * @param req A pointer to mlan_ioctl_req buffer + * + * @return MTRUE/MFALSE + */ +static inline t_bool +woal_cac_period_block_cmd(moal_private *priv, pmlan_ioctl_req req) +{ + mlan_status ret = MFALSE; + t_u32 sub_command; + + ENTER(); + if (req == NULL || req->pbuf == NULL) + goto done; + + sub_command = *(t_u32 *)req->pbuf; + + switch (req->req_id) { + case MLAN_IOCTL_SCAN: + if (sub_command == MLAN_OID_SCAN_NORMAL || + sub_command == MLAN_OID_SCAN_SPECIFIC_SSID || + sub_command == MLAN_OID_SCAN_USER_CONFIG) + ret = MTRUE; + break; + case MLAN_IOCTL_BSS: + if (sub_command == MLAN_OID_BSS_STOP || +#ifdef UAP_SUPPORT + sub_command == MLAN_OID_UAP_BSS_CONFIG || +#endif + sub_command == MLAN_OID_BSS_CHANNEL + /* sub_command == MLAN_OID_BSS_ROLE */ ) + ret = MTRUE; + break; + case MLAN_IOCTL_RADIO_CFG: + if (sub_command == MLAN_OID_BAND_CFG) + ret = MTRUE; + break; +#if defined(UAP_SUPPORT) + case MLAN_IOCTL_SNMP_MIB: + if (sub_command == MLAN_OID_SNMP_MIB_DOT11D || + sub_command == MLAN_OID_SNMP_MIB_DOT11H) + ret = MTRUE; + break; +#endif + case MLAN_IOCTL_11D_CFG: +#ifdef STA_SUPPORT + if (sub_command == MLAN_OID_11D_CFG_ENABLE) + ret = MTRUE; +#endif + if (sub_command == MLAN_OID_11D_DOMAIN_INFO) + ret = MTRUE; + break; + case MLAN_IOCTL_MISC_CFG: + if (sub_command == MLAN_OID_MISC_REGION) + ret = MTRUE; + if (sub_command == MLAN_OID_MISC_HOST_CMD) { + phostcmd_header phostcmd; + t_u8 *ptlv_buf; + t_u16 tag, length; + + phostcmd = + (phostcmd_header)((pmlan_ds_misc_cfg)req-> + pbuf)->param.hostcmd.cmd; + ptlv_buf = (t_u8 *)phostcmd + sizeof(hostcmd_header); + if (phostcmd->action == MLAN_ACT_SET) { + while (ptlv_buf < + (t_u8 *)phostcmd + phostcmd->size) { + tag = *(t_u16 *)ptlv_buf; + length = *(t_u16 *)(ptlv_buf + 2); + /* Check Blocking TLV here, should add + more... */ + if (tag == MRVL_CHANNELCONFIG_TLV_ID) { + ret = MTRUE; + break; + } + ptlv_buf += + (length + MRVL_TLV_HEADER_SIZE); + } + } + } + break; + case MLAN_IOCTL_11H_CFG: + /* Prevent execute more than once */ + if (sub_command == MLAN_OID_11H_CHANNEL_CHECK) + ret = MTRUE; + break; + default: + ret = MFALSE; + break; + } + +done: + LEAVE(); + return ret; +} + /******************************************************** Global Functions ********************************************************/ @@ -372,7 +508,7 @@ woal_wait_ioctl_complete(moal_private * priv, mlan_ioctl_req * req, * -- success, otherwise fail */ mlan_status -woal_request_ioctl(moal_private * priv, mlan_ioctl_req * req, t_u8 wait_option) +woal_request_ioctl(moal_private *priv, mlan_ioctl_req *req, t_u8 wait_option) { wait_queue *wait = NULL; mlan_status status; @@ -394,7 +530,88 @@ woal_request_ioctl(moal_private * priv, mlan_ioctl_req * req, t_u8 wait_option) } #endif - wait = (wait_queue *) req->reserved_1; + /* For MLAN_OID_MISC_HOST_CMD, action is 0, "action set" is checked + later */ + if ((req->action == MLAN_ACT_SET || req->action == 0) && + priv->phandle->cac_period == MTRUE) { + t_u32 sub_command; + /* CAC checking period left to complete jiffies */ + long cac_left_jiffies; + + sub_command = *(t_u32 *)req->pbuf; + + /* cac_left_jiffies will be negative if and only if * event + MLAN_EVENT_ID_DRV_MEAS_REPORT recieved from FW * after CAC + measure period ends, * usually this could be considered as a + FW bug */ + cac_left_jiffies = MEAS_REPORT_TIME - + (jiffies - priv->phandle->meas_start_jiffies); +#ifdef DFS_TESTING_SUPPORT + if (priv->phandle->cac_period_jiffies) { + cac_left_jiffies = priv->phandle->cac_period_jiffies - + (jiffies - priv->phandle->meas_start_jiffies); + } +#endif + if (cac_left_jiffies < 0) { + /* Avoid driver hang in FW died during CAC measure + period */ + priv->phandle->cac_period = MFALSE; + PRINTM(MERROR, + "CAC measure period spends longer than scheduled time " + "or meas done event never received\n"); + status = MLAN_STATUS_FAILURE; + goto done; + } + + /* Check BSS START first */ + if (sub_command == MLAN_OID_BSS_START) { + mlan_ds_bss *bss; + bss = (mlan_ds_bss *)req->pbuf; + /* + * Bss delay start after channel report received, + * not block the driver by delay executing. This is + * because a BSS_START cmd is always executed right + * after channel check issued. + */ + if (priv->phandle->delay_bss_start == MFALSE) { + PRINTM(MMSG, + "Received BSS Start command during CAC period, delay executing %ld seconds\n", + cac_left_jiffies / HZ); + priv->phandle->delay_bss_start = MTRUE; + memcpy(&priv->phandle->delay_ssid_bssid, + &bss->param.ssid_bssid, + sizeof(mlan_ssid_bssid)); + /* TODO: return success to allow the half below + of routines of which calling BSS start to + execute */ + status = MLAN_STATUS_SUCCESS; + goto done; + } else { + /* TODO: not blocking it, just return failure */ + PRINTM(MMSG, + "Only one BSS Start command allowed for delay executing!\n"); + status = MLAN_STATUS_FAILURE; + goto done; + } + } + if (woal_cac_period_block_cmd(priv, req)) { + priv->phandle->meas_wait_q_woken = MFALSE; + PRINTM(MMSG, + "CAC check is on going... Blocking Command %ld seconds\n", + cac_left_jiffies / HZ); + /* blocking timeout set to 1.5 * CAC checking period + left time */ + wait_event_interruptible_timeout(priv->phandle-> + meas_wait_q, + priv->phandle-> + meas_wait_q_woken, + cac_left_jiffies * 3 / + 2); + } + } else if (priv->phandle->cac_period) { + PRINTM(MINFO, "Operation during CAC check period.\n"); + } + wait = (wait_queue *)req->reserved_1; req->bss_index = priv->bss_index; if (wait_option) woal_fill_wait_queue(priv, wait, wait_option); @@ -408,10 +625,13 @@ woal_request_ioctl(moal_private * priv, mlan_ioctl_req * req, t_u8 wait_option) spin_unlock_irqrestore(&priv->phandle->ioctl_lock, flags); switch (status) { case MLAN_STATUS_PENDING: - PRINTM(MIOCTL, - "IOCTL pending: %p id=0x%x, sub_id=0x%x wait_option=%d, action=%d\n", - req, req->req_id, (*(t_u32 *) req->pbuf), wait_option, - (int)req->action); + if (wait_option == MOAL_NO_WAIT) + PRINTM(MIOCTL, "IOCTL MOAL_NO_WAIT: %p\n", req); + else + PRINTM(MIOCTL, + "IOCTL pending: %p id=0x%x, sub_id=0x%x wait_option=%d, action=%d\n", + req, req->req_id, (*(t_u32 *)req->pbuf), + wait_option, (int)req->action); /* Status pending, wake up main process */ queue_work(priv->phandle->workqueue, &priv->phandle->main_work); @@ -425,7 +645,7 @@ woal_request_ioctl(moal_private * priv, mlan_ioctl_req * req, t_u8 wait_option) case MLAN_STATUS_RESOURCE: PRINTM(MIOCTL, "IOCTL: %p id=0x%x, sub_id=0x%x wait_option=%d, action=%d status=%d\n", - req, req->req_id, (*(t_u32 *) req->pbuf), wait_option, + req, req->req_id, (*(t_u32 *)req->pbuf), wait_option, (int)req->action, status); atomic_dec(&priv->phandle->ioctl_pending); break; @@ -434,6 +654,7 @@ woal_request_ioctl(moal_private * priv, mlan_ioctl_req * req, t_u8 wait_option) break; } +done: LEAVE(); return status; } @@ -447,7 +668,7 @@ woal_request_ioctl(moal_private * priv, mlan_ioctl_req * req, t_u8 wait_option) * -- success, otherwise fail */ mlan_status -woal_request_set_mac_address(moal_private * priv) +woal_request_set_mac_address(moal_private *priv) { mlan_ioctl_req *req = NULL; mlan_ds_bss *bss = NULL; @@ -455,14 +676,14 @@ woal_request_set_mac_address(moal_private * priv) ENTER(); /* Allocate an IOCTL request buffer */ - req = (mlan_ioctl_req *) woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + req = (mlan_ioctl_req *)woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); if (req == NULL) { status = MLAN_STATUS_FAILURE; goto done; } /* Fill request buffer */ - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_BSS_MAC_ADDR; memcpy(&bss->param.mac_addr, priv->current_addr, sizeof(mlan_802_11_mac_addr)); @@ -495,7 +716,7 @@ woal_request_set_mac_address(moal_private * priv) * @return N/A */ void -woal_request_set_multicast_list(moal_private * priv, struct net_device *dev) +woal_request_set_multicast_list(moal_private *priv, struct net_device *dev) { mlan_ioctl_req *req = NULL; mlan_ds_bss *bss = NULL; @@ -505,7 +726,7 @@ woal_request_set_multicast_list(moal_private * priv, struct net_device *dev) ENTER(); /* Allocate an IOCTL request buffer */ - req = (mlan_ioctl_req *) woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + req = (mlan_ioctl_req *)woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); if (req == NULL) { PRINTM(MERROR, "%s:Fail to allocate ioctl req buffer\n", __func__); @@ -513,7 +734,7 @@ woal_request_set_multicast_list(moal_private * priv, struct net_device *dev) } /* Fill request buffer */ - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_BSS_MULTICAST_LIST; req->req_id = MLAN_IOCTL_BSS; req->action = MLAN_ACT_SET; @@ -549,7 +770,7 @@ woal_request_set_multicast_list(moal_private * priv, struct net_device *dev) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_disconnect(moal_private * priv, t_u8 wait_option, t_u8 * mac) +woal_disconnect(moal_private *priv, t_u8 wait_option, t_u8 *mac) { mlan_ioctl_req *req = NULL; mlan_ds_bss *bss = NULL; @@ -558,17 +779,17 @@ woal_disconnect(moal_private * priv, t_u8 wait_option, t_u8 * mac) ENTER(); /* Allocate an IOCTL request buffer */ - req = (mlan_ioctl_req *) woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + req = (mlan_ioctl_req *)woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); if (req == NULL) { status = MLAN_STATUS_FAILURE; goto done; } /* Fill request buffer */ - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_BSS_STOP; if (mac) - memcpy((t_u8 *) & bss->param.bssid, mac, + memcpy((t_u8 *)&bss->param.bssid, mac, sizeof(mlan_802_11_mac_addr)); req->req_id = MLAN_IOCTL_BSS; req->action = MLAN_ACT_SET; @@ -596,8 +817,8 @@ woal_disconnect(moal_private * priv, t_u8 wait_option, t_u8 * mac) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_bss_start(moal_private * priv, t_u8 wait_option, - mlan_ssid_bssid * ssid_bssid) +woal_bss_start(moal_private *priv, t_u8 wait_option, + mlan_ssid_bssid *ssid_bssid) { mlan_ioctl_req *req = NULL; mlan_ds_bss *bss = NULL; @@ -613,14 +834,14 @@ woal_bss_start(moal_private * priv, t_u8 wait_option, } /* Allocate an IOCTL request buffer */ - req = (mlan_ioctl_req *) woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + req = (mlan_ioctl_req *)woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); if (req == NULL) { status = MLAN_STATUS_FAILURE; goto done; } /* Fill request buffer */ - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_BSS_START; if (ssid_bssid) memcpy(&bss->param.ssid_bssid, ssid_bssid, @@ -652,8 +873,7 @@ woal_bss_start(moal_private * priv, t_u8 wait_option, * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_get_bss_info(moal_private * priv, t_u8 wait_option, - mlan_bss_info * bss_info) +woal_get_bss_info(moal_private *priv, t_u8 wait_option, mlan_bss_info *bss_info) { mlan_ioctl_req *req = NULL; mlan_ds_get_info *info = NULL; @@ -670,7 +890,7 @@ woal_get_bss_info(moal_private * priv, t_u8 wait_option, } /* Fill request buffer */ - info = (mlan_ds_get_info *) req->pbuf; + info = (mlan_ds_get_info *)req->pbuf; info->sub_command = MLAN_OID_GET_BSS_INFO; req->req_id = MLAN_IOCTL_GET_INFO; req->action = MLAN_ACT_GET; @@ -701,7 +921,7 @@ woal_get_bss_info(moal_private * priv, t_u8 wait_option, * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_set_get_retry(moal_private * priv, t_u32 action, +woal_set_get_retry(moal_private *priv, t_u32 action, t_u8 wait_option, int *value) { mlan_ioctl_req *req = NULL; @@ -717,7 +937,7 @@ woal_set_get_retry(moal_private * priv, t_u32 action, } /* Fill request buffer */ - mib = (mlan_ds_snmp_mib *) req->pbuf; + mib = (mlan_ds_snmp_mib *)req->pbuf; mib->sub_command = MLAN_OID_SNMP_MIB_RETRY_COUNT; req->req_id = MLAN_IOCTL_SNMP_MIB; req->action = action; @@ -740,8 +960,8 @@ woal_set_get_retry(moal_private * priv, t_u32 action, if (IS_STA_CFG80211(cfg80211_wext) && priv->wdev && priv->wdev->wiphy && (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) && (action == MLAN_ACT_SET)) { - priv->wdev->wiphy->retry_long = (t_u8) * value; - priv->wdev->wiphy->retry_short = (t_u8) * value; + priv->wdev->wiphy->retry_long = (t_u8)*value; + priv->wdev->wiphy->retry_short = (t_u8)*value; } #endif @@ -763,8 +983,7 @@ woal_set_get_retry(moal_private * priv, t_u32 action, * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_set_get_rts(moal_private * priv, t_u32 action, - t_u8 wait_option, int *value) +woal_set_get_rts(moal_private *priv, t_u32 action, t_u8 wait_option, int *value) { mlan_ioctl_req *req = NULL; mlan_ds_snmp_mib *mib = NULL; @@ -779,7 +998,7 @@ woal_set_get_rts(moal_private * priv, t_u32 action, } /* Fill request buffer */ - mib = (mlan_ds_snmp_mib *) req->pbuf; + mib = (mlan_ds_snmp_mib *)req->pbuf; mib->sub_command = MLAN_OID_SNMP_MIB_RTS_THRESHOLD; req->req_id = MLAN_IOCTL_SNMP_MIB; req->action = action; @@ -823,7 +1042,7 @@ woal_set_get_rts(moal_private * priv, t_u32 action, * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_set_get_frag(moal_private * priv, t_u32 action, +woal_set_get_frag(moal_private *priv, t_u32 action, t_u8 wait_option, int *value) { mlan_ioctl_req *req = NULL; @@ -839,7 +1058,7 @@ woal_set_get_frag(moal_private * priv, t_u32 action, } /* Fill request buffer */ - mib = (mlan_ds_snmp_mib *) req->pbuf; + mib = (mlan_ds_snmp_mib *)req->pbuf; mib->sub_command = MLAN_OID_SNMP_MIB_FRAG_THRESHOLD; req->req_id = MLAN_IOCTL_SNMP_MIB; req->action = action; @@ -880,11 +1099,13 @@ woal_set_get_frag(moal_private * priv, t_u32 action, * @param action Action set or get * @param ie Information element * @param ie_len Length of the IE + * @param wait_option wait option * * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_set_get_gen_ie(moal_private * priv, t_u32 action, t_u8 * ie, int *ie_len) +woal_set_get_gen_ie(moal_private *priv, t_u32 action, + t_u8 *ie, int *ie_len, t_u8 wait_option) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ds_misc_cfg *misc = NULL; @@ -908,7 +1129,7 @@ woal_set_get_gen_ie(moal_private * priv, t_u32 action, t_u8 * ie, int *ie_len) goto done; } - misc = (mlan_ds_misc_cfg *) req->pbuf; + misc = (mlan_ds_misc_cfg *)req->pbuf; misc->sub_command = MLAN_OID_MISC_GEN_IE; req->req_id = MLAN_IOCTL_MISC_CFG; req->action = action; @@ -920,7 +1141,7 @@ woal_set_get_gen_ie(moal_private * priv, t_u32 action, t_u8 * ie, int *ie_len) memcpy(misc->param.gen_ie.ie_data, ie, *ie_len); } - ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + ret = woal_request_ioctl(priv, req, wait_option); if (ret != MLAN_STATUS_SUCCESS) goto done; @@ -947,8 +1168,8 @@ woal_set_get_gen_ie(moal_private * priv, t_u32 action, t_u8 * ie, int *ie_len) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_set_get_tx_power(moal_private * priv, - t_u32 action, mlan_power_cfg_t * power_cfg) +woal_set_get_tx_power(moal_private *priv, + t_u32 action, mlan_power_cfg_t *power_cfg) { mlan_ds_power_cfg *pcfg = NULL; mlan_ioctl_req *req = NULL; @@ -960,7 +1181,7 @@ woal_set_get_tx_power(moal_private * priv, ret = MLAN_STATUS_FAILURE; goto done; } - pcfg = (mlan_ds_power_cfg *) req->pbuf; + pcfg = (mlan_ds_power_cfg *)req->pbuf; pcfg->sub_command = MLAN_OID_POWER_CFG; req->req_id = MLAN_IOCTL_POWER_CFG; req->action = action; @@ -995,7 +1216,7 @@ woal_set_get_tx_power(moal_private * priv, * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_set_get_power_mgmt(moal_private * priv, +woal_set_get_power_mgmt(moal_private *priv, t_u32 action, int *disabled, int power_type, t_u8 wait_option) { @@ -1010,7 +1231,7 @@ woal_set_get_power_mgmt(moal_private * priv, ret = MLAN_STATUS_FAILURE; goto done; } - pm_cfg = (mlan_ds_pm_cfg *) req->pbuf; + pm_cfg = (mlan_ds_pm_cfg *)req->pbuf; pm_cfg->sub_command = MLAN_OID_PM_CFG_IEEE_PS; req->req_id = MLAN_IOCTL_PM_CFG; req->action = action; @@ -1075,7 +1296,7 @@ woal_set_get_power_mgmt(moal_private * priv, * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail */ mlan_status -woal_set_region_code(moal_private * priv, char *region) +woal_set_region_code(moal_private *priv, char *region) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ds_misc_cfg *cfg = NULL; @@ -1087,7 +1308,7 @@ woal_set_region_code(moal_private * priv, char *region) ret = MLAN_STATUS_FAILURE; goto done; } - cfg = (mlan_ds_misc_cfg *) req->pbuf; + cfg = (mlan_ds_misc_cfg *)req->pbuf; cfg->sub_command = MLAN_OID_MISC_REGION; req->req_id = MLAN_IOCTL_MISC_CFG; req->action = MLAN_ACT_SET; @@ -1111,8 +1332,8 @@ woal_set_region_code(moal_private * priv, char *region) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_set_get_data_rate(moal_private * priv, - t_u8 action, mlan_rate_cfg_t * datarate) +woal_set_get_data_rate(moal_private *priv, + t_u8 action, mlan_rate_cfg_t *datarate) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ds_rate *rate = NULL; @@ -1126,7 +1347,7 @@ woal_set_get_data_rate(moal_private * priv, goto done; } - rate = (mlan_ds_rate *) req->pbuf; + rate = (mlan_ds_rate *)req->pbuf; rate->param.rate_cfg.rate_type = MLAN_RATE_VALUE; rate->sub_command = MLAN_OID_RATE_CFG; req->req_id = MLAN_IOCTL_RATE; @@ -1157,7 +1378,7 @@ woal_set_get_data_rate(moal_private * priv, * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_get_assoc_rsp(moal_private * priv, mlan_ds_misc_assoc_rsp * assoc_rsp) +woal_get_assoc_rsp(moal_private *priv, mlan_ds_misc_assoc_rsp *assoc_rsp) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ds_misc_cfg *misc = NULL; @@ -1173,7 +1394,7 @@ woal_get_assoc_rsp(moal_private * priv, mlan_ds_misc_assoc_rsp * assoc_rsp) } req->req_id = MLAN_IOCTL_MISC_CFG; - misc = (pmlan_ds_misc_cfg) req->pbuf; + misc = (pmlan_ds_misc_cfg)req->pbuf; misc->sub_command = MLAN_OID_MISC_ASSOC_RSP; req->action = MLAN_ACT_GET; @@ -1200,8 +1421,8 @@ woal_get_assoc_rsp(moal_private * priv, mlan_ds_misc_assoc_rsp * assoc_rsp) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_request_get_fw_info(moal_private * priv, t_u8 wait_option, - mlan_fw_info * fw_info) +woal_request_get_fw_info(moal_private *priv, t_u8 wait_option, + mlan_fw_info *fw_info) { mlan_ioctl_req *req = NULL; mlan_ds_get_info *info; @@ -1210,14 +1431,15 @@ woal_request_get_fw_info(moal_private * priv, t_u8 wait_option, memset(priv->current_addr, 0xff, ETH_ALEN); /* Allocate an IOCTL request buffer */ - req = (mlan_ioctl_req *) woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + req = (mlan_ioctl_req *) + woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info)); if (req == NULL) { status = MLAN_STATUS_FAILURE; goto done; } /* Fill request buffer */ - info = (mlan_ds_get_info *) req->pbuf; + info = (mlan_ds_get_info *)req->pbuf; req->req_id = MLAN_IOCTL_GET_INFO; req->action = MLAN_ACT_GET; info->sub_command = MLAN_OID_GET_FW_INFO; @@ -1257,8 +1479,8 @@ woal_request_get_fw_info(moal_private * priv, t_u8 wait_option, * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_get_debug_info(moal_private * priv, t_u8 wait_option, - mlan_debug_info * debug_info) +woal_get_debug_info(moal_private *priv, t_u8 wait_option, + mlan_debug_info *debug_info) { int ret = 0; mlan_ioctl_req *req = NULL; @@ -1275,7 +1497,7 @@ woal_get_debug_info(moal_private * priv, t_u8 wait_option, } /* Fill request buffer */ - info = (mlan_ds_get_info *) req->pbuf; + info = (mlan_ds_get_info *)req->pbuf; info->sub_command = MLAN_OID_GET_DEBUG_INFO; req->req_id = MLAN_IOCTL_GET_INFO; req->action = MLAN_ACT_GET; @@ -1294,56 +1516,6 @@ woal_get_debug_info(moal_private * priv, t_u8 wait_option, LEAVE(); return status; } - -/** - * @brief Set debug info - * - * @param priv A pointer to moal_private structure - * @param wait_option Wait option - * @param debug_info A pointer to mlan_debug_info structure - * - * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail - */ -mlan_status -woal_set_debug_info(moal_private * priv, t_u8 wait_option, - mlan_debug_info * debug_info) -{ - int ret = 0; - mlan_ioctl_req *req = NULL; - mlan_ds_get_info *info = NULL; - mlan_status status = MLAN_STATUS_SUCCESS; - - ENTER(); - - if (!debug_info) { - ret = -EINVAL; - LEAVE(); - return MLAN_STATUS_FAILURE; - } - - /* Allocate an IOCTL request buffer */ - req = woal_alloc_mlan_ioctl_req(sizeof(t_u32) + - sizeof(mlan_debug_info)); - if (req == NULL) { - ret = -ENOMEM; - goto done; - } - - /* Fill request buffer */ - info = (mlan_ds_get_info *) req->pbuf; - info->sub_command = MLAN_OID_GET_DEBUG_INFO; - memcpy(&info->param.debug_info, debug_info, sizeof(mlan_debug_info)); - req->req_id = MLAN_IOCTL_GET_INFO; - req->action = MLAN_ACT_SET; - - /* Send IOCTL request to MLAN */ - status = woal_request_ioctl(priv, req, wait_option); -done: - if (status != MLAN_STATUS_PENDING) - kfree(req); - LEAVE(); - return status; -} #endif /* PROC_DEBUG */ #if defined(STA_WEXT) || defined(UAP_WEXT) @@ -1355,7 +1527,7 @@ woal_set_debug_info(moal_private * priv, t_u8 wait_option, * @return 0 --success, otherwise fail */ int -woal_host_command(moal_private * priv, struct iwreq *wrq) +woal_host_command(moal_private *priv, struct iwreq *wrq) { HostCmd_Header cmd_header; int ret = 0; @@ -1376,7 +1548,7 @@ woal_host_command(moal_private * priv, struct iwreq *wrq) ret = -ENOMEM; goto done; } - misc = (mlan_ds_misc_cfg *) req->pbuf; + misc = (mlan_ds_misc_cfg *)req->pbuf; memset(&cmd_header, 0, sizeof(cmd_header)); /* get command header */ @@ -1414,7 +1586,7 @@ woal_host_command(moal_private * priv, struct iwreq *wrq) goto done; } if (copy_to_user - (wrq->u.data.pointer, (t_u8 *) misc->param.hostcmd.cmd, + (wrq->u.data.pointer, (t_u8 *)misc->param.hostcmd.cmd, misc->param.hostcmd.len)) { ret = -EFAULT; goto done; @@ -1447,7 +1619,7 @@ woal_host_command(moal_private * priv, struct iwreq *wrq) int woal_hostcmd_ioctl(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); t_u32 buf_len = 0; HostCmd_Header cmd_header; int ret = 0; @@ -1494,7 +1666,7 @@ woal_hostcmd_ioctl(struct net_device *dev, struct ifreq *req) ret = -ENOMEM; goto done; } - misc = (mlan_ds_misc_cfg *) ioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; misc->param.hostcmd.len = woal_le16_to_cpu(cmd_header.size); @@ -1522,7 +1694,7 @@ woal_hostcmd_ioctl(struct net_device *dev, struct ifreq *req) goto done; } if (copy_to_user - (req->ifr_data + sizeof(buf_len), (t_u8 *) misc->param.hostcmd.cmd, + (req->ifr_data + sizeof(buf_len), (t_u8 *)misc->param.hostcmd.cmd, misc->param.hostcmd.len)) { ret = -EFAULT; goto done; @@ -1545,12 +1717,13 @@ woal_hostcmd_ioctl(struct net_device *dev, struct ifreq *req) int woal_custom_ie_ioctl(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ioctl_req *ioctl_req = NULL; mlan_ds_misc_cfg *misc = NULL; mlan_ds_misc_custom_ie *custom_ie = NULL; int ret = 0; mlan_status status = MLAN_STATUS_SUCCESS; + gfp_t flag; ENTER(); @@ -1561,12 +1734,12 @@ woal_custom_ie_ioctl(struct net_device *dev, struct ifreq *req) goto done; } - custom_ie = kmalloc(sizeof(mlan_ds_misc_custom_ie), GFP_KERNEL); + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + custom_ie = kzalloc(sizeof(mlan_ds_misc_custom_ie), flag); if (!custom_ie) { ret = -ENOMEM; goto done; } - memset(custom_ie, 0, sizeof(mlan_ds_misc_custom_ie)); if (copy_from_user (custom_ie, req->ifr_data, sizeof(mlan_ds_misc_custom_ie))) { @@ -1581,11 +1754,12 @@ woal_custom_ie_ioctl(struct net_device *dev, struct ifreq *req) goto done; } - misc = (mlan_ds_misc_cfg *) ioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; misc->sub_command = MLAN_OID_MISC_CUSTOM_IE; ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; - if ((custom_ie->len == 0) || - (custom_ie->len == sizeof(custom_ie->ie_data_list[0].ie_index))) + if ((custom_ie->len == 0)||(custom_ie->len == + sizeof(custom_ie->ie_data_list[0]. + ie_index))) ioctl_req->action = MLAN_ACT_GET; else ioctl_req->action = MLAN_ACT_SET; @@ -1629,7 +1803,7 @@ woal_custom_ie_ioctl(struct net_device *dev, struct ifreq *req) int woal_send_host_packet(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); t_u32 packet_len = 0; int ret = 0; pmlan_buffer pmbuf = NULL; @@ -1718,7 +1892,7 @@ woal_send_host_packet(struct net_device *dev, struct ifreq *req) * @return 0 --success, otherwise fail */ int -woal_set_get_custom_ie(moal_private * priv, t_u16 mask, t_u8 * ie, int ie_len) +woal_set_get_custom_ie(moal_private *priv, t_u16 mask, t_u8 *ie, int ie_len) { mlan_ioctl_req *ioctl_req = NULL; mlan_ds_misc_cfg *misc = NULL; @@ -1735,7 +1909,7 @@ woal_set_get_custom_ie(moal_private * priv, t_u16 mask, t_u8 * ie, int ie_len) return -ENOMEM; } - misc = (mlan_ds_misc_cfg *) ioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; misc->sub_command = MLAN_OID_MISC_CUSTOM_IE; ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; ioctl_req->action = MLAN_ACT_SET; @@ -1773,12 +1947,13 @@ woal_set_get_custom_ie(moal_private * priv, t_u16 mask, t_u8 * ie, int ie_len) int woal_tdls_config_ioctl(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ioctl_req *ioctl_req = NULL; mlan_ds_misc_cfg *misc = NULL; mlan_ds_misc_tdls_config *tdls_data = NULL; int ret = 0; mlan_status status = MLAN_STATUS_SUCCESS; + gfp_t flag; ENTER(); @@ -1788,13 +1963,12 @@ woal_tdls_config_ioctl(struct net_device *dev, struct ifreq *req) ret = -EFAULT; goto done; } - - tdls_data = kmalloc(sizeof(mlan_ds_misc_tdls_config), GFP_KERNEL); + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + tdls_data = kzalloc(sizeof(mlan_ds_misc_tdls_config), flag); if (!tdls_data) { ret = -ENOMEM; goto done; } - memset(tdls_data, 0, sizeof(mlan_ds_misc_tdls_config)); if (copy_from_user (tdls_data, req->ifr_data, sizeof(mlan_ds_misc_tdls_config))) { @@ -1809,7 +1983,7 @@ woal_tdls_config_ioctl(struct net_device *dev, struct ifreq *req) goto done; } - misc = (mlan_ds_misc_cfg *) ioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; misc->sub_command = MLAN_OID_MISC_TDLS_CONFIG; ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; if (tdls_data->tdls_action == WLAN_TDLS_DISCOVERY_REQ @@ -1856,7 +2030,7 @@ int woal_get_bss_type(struct net_device *dev, struct ifreq *req) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); int bss_type; ENTER(); @@ -1883,8 +2057,8 @@ woal_get_bss_type(struct net_device *dev, struct ifreq *req) * @return 0 --success, otherwise fail */ mlan_status -woal_bss_role_cfg(moal_private * priv, t_u8 action, - t_u8 wait_option, t_u8 * bss_role) +woal_bss_role_cfg(moal_private *priv, t_u8 action, + t_u8 wait_option, t_u8 *bss_role) { int ret = 0; mlan_ds_bss *bss = NULL; @@ -1899,7 +2073,7 @@ woal_bss_role_cfg(moal_private * priv, t_u8 action, ret = -ENOMEM; goto done; } - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_BSS_ROLE; req->req_id = MLAN_IOCTL_BSS; req->action = action; @@ -1989,7 +2163,7 @@ woal_bss_role_cfg(moal_private * priv, t_u8 action, * @return 0 --success, otherwise fail */ int -woal_set_get_bss_role(moal_private * priv, struct iwreq *wrq) +woal_set_get_bss_role(moal_private *priv, struct iwreq *wrq) { int ret = 0; int bss_role = 0; @@ -2025,7 +2199,7 @@ woal_set_get_bss_role(moal_private * priv, struct iwreq *wrq) if (MLAN_STATUS_SUCCESS != woal_bss_role_cfg(priv, action, MOAL_IOCTL_WAIT, - (t_u8 *) & bss_role)) { + (t_u8 *)&bss_role)) { ret = -EFAULT; goto done; } @@ -2039,7 +2213,7 @@ woal_set_get_bss_role(moal_private * priv, struct iwreq *wrq) } else { #if defined(STA_CFG80211) || defined(UAP_CFG80211) if (IS_STA_OR_UAP_CFG80211(cfg80211_wext)) - woal_clear_all_mgmt_ies(priv); + woal_clear_all_mgmt_ies(priv, MOAL_IOCTL_WAIT); #endif /* Initialize private structures */ woal_init_priv(priv, MOAL_IOCTL_WAIT); @@ -2056,6 +2230,69 @@ woal_set_get_bss_role(moal_private * priv, struct iwreq *wrq) #endif /* STA_WEXT || UAP_WEXT */ #endif /* STA_SUPPORT && UAP_SUPPORT */ +/** + * @brief Set auto arp resp + * + * @param handle A pointer to moal_handle structure + * @param enable enable/disable + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +static mlan_status +woal_set_auto_arp(moal_handle *handle, t_u8 enable) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + int i = 0; + moal_private *priv = NULL; + mlan_ds_misc_cfg *misc = NULL; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_ipaddr_cfg ipaddr_cfg; + + ENTER(); + + memset(&ipaddr_cfg, 0, sizeof(ipaddr_cfg)); + for (i = 0; i < handle->priv_num && (priv = handle->priv[i]); i++) { + if (priv->ip_addr_type != IPADDR_TYPE_NONE) { + memcpy(ipaddr_cfg.ip_addr[ipaddr_cfg.ip_addr_num], + priv->ip_addr, IPADDR_LEN); + ipaddr_cfg.ip_addr_num++; + } + } + if (ipaddr_cfg.ip_addr_num == 0) { + PRINTM(MIOCTL, "No IP addr configured.\n"); + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + PRINTM(MIOCTL, "IOCTL req allocated failed!\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + misc = (mlan_ds_misc_cfg *)req->pbuf; + misc->sub_command = MLAN_OID_MISC_IP_ADDR; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = MLAN_ACT_SET; + memcpy(&misc->param.ipaddr_cfg, &ipaddr_cfg, sizeof(ipaddr_cfg)); + if (enable) { + misc->param.ipaddr_cfg.op_code = MLAN_IPADDR_OP_ARP_FILTER | + MLAN_IPADDR_OP_AUTO_ARP_RESP; + misc->param.ipaddr_cfg.ip_addr_type = IPADDR_TYPE_IPV4; + } else { + /** remove ip */ + misc->param.ipaddr_cfg.op_code = MLAN_IPADDR_OP_IP_REMOVE; + } + ret = woal_request_ioctl(woal_get_priv(handle, MLAN_BSS_ROLE_ANY), req, + MOAL_NO_WAIT); + if (ret != MLAN_STATUS_SUCCESS && ret != MLAN_STATUS_PENDING) + PRINTM(MIOCTL, "Set auto arp IOCTL failed!\n"); +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + /** * @brief Get Host Sleep parameters * @@ -2067,8 +2304,8 @@ woal_set_get_bss_role(moal_private * priv, struct iwreq *wrq) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_set_get_hs_params(moal_private * priv, t_u16 action, t_u8 wait_option, - mlan_ds_hs_cfg * hscfg) +woal_set_get_hs_params(moal_private *priv, t_u16 action, t_u8 wait_option, + mlan_ds_hs_cfg *hscfg) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ds_pm_cfg *pmcfg = NULL; @@ -2084,7 +2321,7 @@ woal_set_get_hs_params(moal_private * priv, t_u16 action, t_u8 wait_option, } /* Fill request buffer */ - pmcfg = (mlan_ds_pm_cfg *) req->pbuf; + pmcfg = (mlan_ds_pm_cfg *)req->pbuf; pmcfg->sub_command = MLAN_OID_PM_CFG_HS_CFG; req->req_id = MLAN_IOCTL_PM_CFG; req->action = action; @@ -2116,7 +2353,7 @@ woal_set_get_hs_params(moal_private * priv, t_u16 action, t_u8 wait_option, * or MLAN_STATUS_FAILURE */ mlan_status -woal_cancel_hs(moal_private * priv, t_u8 wait_option) +woal_cancel_hs(moal_private *priv, t_u8 wait_option) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ds_hs_cfg hscfg; @@ -2128,6 +2365,9 @@ woal_cancel_hs(moal_private * priv, t_u8 wait_option) hscfg.is_invoke_hostcmd = MTRUE; ret = woal_set_get_hs_params(priv, MLAN_ACT_SET, wait_option, &hscfg); + /* remove auto arp from FW */ + woal_set_auto_arp(priv->phandle, MFALSE); + LEAVE(); return ret; } @@ -2139,7 +2379,7 @@ woal_cancel_hs(moal_private * priv, t_u8 wait_option) * @return MTRUE or MFALSE */ int -woal_enable_hs(moal_private * priv) +woal_enable_hs(moal_private *priv) { mlan_ds_hs_cfg hscfg; moal_handle *handle = NULL; @@ -2212,6 +2452,8 @@ woal_enable_hs(moal_private * priv) woal_reconfig_bgscan(priv->phandle); #endif + /* Set auto arp response configuration to Fw */ + woal_set_auto_arp(handle, MTRUE); /* Enable Host Sleep */ handle->hs_activate_wait_q_woken = MFALSE; memset(&hscfg, 0, sizeof(mlan_ds_hs_cfg)); @@ -2275,7 +2517,7 @@ woal_enable_hs(moal_private * priv) * otherwise failure code */ mlan_status -woal_request_soft_reset(moal_handle * handle) +woal_request_soft_reset(moal_handle *handle) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ioctl_req *req = NULL; @@ -2284,7 +2526,7 @@ woal_request_soft_reset(moal_handle * handle) ENTER(); req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); if (req) { - misc = (mlan_ds_misc_cfg *) req->pbuf; + misc = (mlan_ds_misc_cfg *)req->pbuf; misc->sub_command = MLAN_OID_MISC_SOFT_RESET; req->req_id = MLAN_IOCTL_MISC_CFG; req->action = MLAN_ACT_SET; @@ -2312,7 +2554,7 @@ woal_request_soft_reset(moal_handle * handle) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_set_wapi_enable(moal_private * priv, t_u8 wait_option, t_u32 enable) +woal_set_wapi_enable(moal_private *priv, t_u8 wait_option, t_u32 enable) { int ret = 0; mlan_ioctl_req *req = NULL; @@ -2328,7 +2570,7 @@ woal_set_wapi_enable(moal_private * priv, t_u8 wait_option, t_u32 enable) } /* Fill request buffer */ - sec = (mlan_ds_sec_cfg *) req->pbuf; + sec = (mlan_ds_sec_cfg *)req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_WAPI_ENABLED; req->req_id = MLAN_IOCTL_SEC_CFG; req->action = MLAN_ACT_SET; @@ -2353,7 +2595,7 @@ woal_set_wapi_enable(moal_private * priv, t_u8 wait_option, t_u32 enable) * @return N/A */ void -woal_get_version(moal_handle * handle, char *version, int max_len) +woal_get_version(moal_handle *handle, char *version, int max_len) { union { t_u32 l; @@ -2382,7 +2624,7 @@ woal_get_version(moal_handle * handle, char *version, int max_len) * @return 0 --success, otherwise fail */ int -woal_get_driver_version(moal_private * priv, struct ifreq *req) +woal_get_driver_version(moal_private *priv, struct ifreq *req) { struct iwreq *wrq = (struct iwreq *)req; int len; @@ -2414,7 +2656,7 @@ woal_get_driver_version(moal_private * priv, struct ifreq *req) * @return 0 --success, otherwise fail */ int -woal_get_driver_verext(moal_private * priv, struct ifreq *ireq) +woal_get_driver_verext(moal_private *priv, struct ifreq *ireq) { struct iwreq *wrq = (struct iwreq *)ireq; mlan_ds_get_info *info = NULL; @@ -2430,7 +2672,7 @@ woal_get_driver_verext(moal_private * priv, struct ifreq *ireq) return -ENOMEM; } - info = (mlan_ds_get_info *) req->pbuf; + info = (mlan_ds_get_info *)req->pbuf; info->sub_command = MLAN_OID_GET_VER_EXT; req->req_id = MLAN_IOCTL_GET_INFO; req->action = MLAN_ACT_GET; @@ -2446,7 +2688,7 @@ woal_get_driver_verext(moal_private * priv, struct ifreq *ireq) ret = -EFAULT; goto done; } else { - if (((t_s32) (info->param.ver_ext.version_str_sel)) < 0) { + if (((t_s32)(info->param.ver_ext.version_str_sel)) < 0) { PRINTM(MERROR, "Invalid arguments!\n"); ret = -EINVAL; goto done; @@ -2492,7 +2734,7 @@ woal_get_driver_verext(moal_private * priv, struct ifreq *ireq) * @return 0 --success, otherwise fail */ int -woal_set_drvdbg(moal_private * priv, t_u32 drvdbg) +woal_set_drvdbg(moal_private *priv, t_u32 drvdbg) { mlan_ioctl_req *req = NULL; mlan_ds_misc_cfg *misc = NULL; @@ -2506,7 +2748,7 @@ woal_set_drvdbg(moal_private * priv, t_u32 drvdbg) return -ENOMEM; } - misc = (mlan_ds_misc_cfg *) req->pbuf; + misc = (mlan_ds_misc_cfg *)req->pbuf; misc->sub_command = MLAN_OID_MISC_DRVDBG; req->req_id = MLAN_IOCTL_MISC_CFG; req->action = MLAN_ACT_SET; @@ -2533,8 +2775,8 @@ woal_set_drvdbg(moal_private * priv, t_u32 drvdbg) * @return 0 --success, otherwise fail */ int -woal_reg_rx_mgmt_ind(moal_private * priv, t_u16 action, - t_u32 * pmgmt_subtype_mask, t_u8 wait_option) +woal_reg_rx_mgmt_ind(moal_private *priv, t_u16 action, + t_u32 *pmgmt_subtype_mask, t_u8 wait_option) { mlan_ioctl_req *req = NULL; mlan_ds_misc_cfg *misc = NULL; @@ -2548,7 +2790,7 @@ woal_reg_rx_mgmt_ind(moal_private * priv, t_u16 action, return -ENOMEM; } - misc = (mlan_ds_misc_cfg *) req->pbuf; + misc = (mlan_ds_misc_cfg *)req->pbuf; misc->sub_command = MLAN_OID_MISC_RX_MGMT_IND; req->req_id = MLAN_IOCTL_MISC_CFG; req->action = action; @@ -2571,6 +2813,59 @@ woal_reg_rx_mgmt_ind(moal_private * priv, t_u16 action, return ret; } +/** + * @brief Set/Get Transmit beamforming capabilities + * + * @param priv A pointer to moal_private structure + * @param action Action: set or get + * @param tx_bf_cap A pointer to tx_buf_cap buffer + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_set_get_tx_bf_cap(moal_private *priv, t_u16 action, t_u32 *tx_bf_cap) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *bf_cfg = NULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (!tx_bf_cap) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + bf_cfg = (mlan_ds_11n_cfg *)req->pbuf; + req->req_id = MLAN_IOCTL_11N_CFG; + bf_cfg->sub_command = MLAN_OID_11N_CFG_TX_BF_CAP; + req->action = action; + if (action == MLAN_ACT_SET) + bf_cfg->param.tx_bf_cap = *tx_bf_cap; + + /* Send IOCTL request to MLAN */ + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (ret != MLAN_STATUS_SUCCESS) { + goto done; + } + + if (action == MLAN_ACT_GET) + *tx_bf_cap = bf_cfg->param.tx_bf_cap; + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + /** * @brief Handle ioctl resp * @@ -2580,7 +2875,7 @@ woal_reg_rx_mgmt_ind(moal_private * priv, t_u16 action, * @return N/A */ void -woal_process_ioctl_resp(moal_private * priv, mlan_ioctl_req * req) +woal_process_ioctl_resp(moal_private *priv, mlan_ioctl_req *req) { ENTER(); @@ -2595,8 +2890,7 @@ woal_process_ioctl_resp(moal_private * priv, mlan_ioctl_req * req) if (IS_STA_WEXT(cfg80211_wext) && GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) woal_ioctl_get_info_resp(priv, - (mlan_ds_get_info *) req-> - pbuf); + (mlan_ds_get_info *)req->pbuf); #endif #endif #ifdef UAP_WEXT @@ -2604,7 +2898,7 @@ woal_process_ioctl_resp(moal_private * priv, mlan_ioctl_req * req) if (IS_UAP_WEXT(cfg80211_wext) && GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) woal_ioctl_get_uap_info_resp(priv, - (mlan_ds_get_info *) req-> + (mlan_ds_get_info *)req-> pbuf); #endif #endif @@ -2614,8 +2908,7 @@ woal_process_ioctl_resp(moal_private * priv, mlan_ioctl_req * req) case MLAN_IOCTL_BSS: if (IS_STA_WEXT(cfg80211_wext) && GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) - woal_ioctl_get_bss_resp(priv, - (mlan_ds_bss *) req->pbuf); + woal_ioctl_get_bss_resp(priv, (mlan_ds_bss *)req->pbuf); break; #endif #endif @@ -2636,7 +2929,7 @@ woal_process_ioctl_resp(moal_private * priv, mlan_ioctl_req * req) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_get_pm_info(moal_private * priv, mlan_ds_ps_info * pm_info) +woal_get_pm_info(moal_private *priv, mlan_ds_ps_info *pm_info) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ds_pm_cfg *pmcfg = NULL; @@ -2653,7 +2946,7 @@ woal_get_pm_info(moal_private * priv, mlan_ds_ps_info * pm_info) } /* Fill request buffer */ - pmcfg = (mlan_ds_pm_cfg *) req->pbuf; + pmcfg = (mlan_ds_pm_cfg *)req->pbuf; pmcfg->sub_command = MLAN_OID_PM_INFO; req->req_id = MLAN_IOCTL_PM_CFG; req->action = MLAN_ACT_GET; @@ -2682,7 +2975,7 @@ woal_get_pm_info(moal_private * priv, mlan_ds_ps_info * pm_info) * @return 0 --success, otherwise fail */ int -woal_get_deep_sleep(moal_private * priv, t_u32 * data) +woal_get_deep_sleep(moal_private *priv, t_u32 *data) { int ret = 0; mlan_ioctl_req *req = NULL; @@ -2696,7 +2989,7 @@ woal_get_deep_sleep(moal_private * priv, t_u32 * data) LEAVE(); return -ENOMEM; } - pm = (mlan_ds_pm_cfg *) req->pbuf; + pm = (mlan_ds_pm_cfg *)req->pbuf; pm->sub_command = MLAN_OID_PM_CFG_DEEP_SLEEP; req->req_id = MLAN_IOCTL_PM_CFG; @@ -2727,7 +3020,7 @@ woal_get_deep_sleep(moal_private * priv, t_u32 * data) * @return 0 --success, otherwise fail */ int -woal_set_deep_sleep(moal_private * priv, t_u8 wait_option, BOOLEAN bdeep_sleep, +woal_set_deep_sleep(moal_private *priv, t_u8 wait_option, BOOLEAN bdeep_sleep, t_u16 idletime) { int ret = 0; @@ -2741,7 +3034,7 @@ woal_set_deep_sleep(moal_private * priv, t_u8 wait_option, BOOLEAN bdeep_sleep, LEAVE(); return -ENOMEM; } - pm = (mlan_ds_pm_cfg *) req->pbuf; + pm = (mlan_ds_pm_cfg *)req->pbuf; pm->sub_command = MLAN_OID_PM_CFG_DEEP_SLEEP; req->req_id = MLAN_IOCTL_PM_CFG; @@ -2772,8 +3065,78 @@ woal_set_deep_sleep(moal_private * priv, t_u8 wait_option, BOOLEAN bdeep_sleep, return ret; } -#if defined(STA_SUPPORT) -#endif +/** + * @brief Cancel CAC period block + * + * @param priv A pointer to moal_private structure + * + * @return N/A + */ +void +woal_cancel_cac_block(moal_private *priv) +{ + ENTER(); + /* if during CAC period, wake up wait queue */ + if (priv->phandle->cac_period == MTRUE) { + priv->phandle->cac_period = MFALSE; + priv->phandle->meas_start_jiffies = 0; + if (priv->phandle->delay_bss_start == MTRUE) + priv->phandle->delay_bss_start = MFALSE; + if (priv->phandle->meas_wait_q_woken == MFALSE) { + priv->phandle->meas_wait_q_woken = MTRUE; + wake_up_interruptible(&priv->phandle->meas_wait_q); + } + } + LEAVE(); +} + +/** MEAS report timeout value in seconds */ + +/** + * @brief Issue MLAN_OID_11H_CHANNEL_CHECK ioctl + * + * @param priv Pointer to the moal_private driver data struct + * @param wait_option wait option + * + * @return 0 --success, otherwise fail + */ +int +woal_11h_channel_check_ioctl(moal_private *priv, t_u8 wait_option) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_11h_cfg *ds_11hcfg = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11h_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + ds_11hcfg = (mlan_ds_11h_cfg *)req->pbuf; + + ds_11hcfg->sub_command = MLAN_OID_11H_CHANNEL_CHECK; + req->req_id = MLAN_IOCTL_11H_CFG; + req->action = MLAN_ACT_SET; + /* Send Channel Check command and wait until the report is ready */ + status = woal_request_ioctl(priv, req, wait_option); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* set flag from here */ + priv->phandle->cac_period = MTRUE; + priv->phandle->meas_start_jiffies = jiffies; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} #if defined(WIFI_DIRECT_SUPPORT) /** @@ -2786,7 +3149,7 @@ woal_set_deep_sleep(moal_private * priv, t_u8 wait_option, BOOLEAN bdeep_sleep, * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_wifi_direct_mode_cfg(moal_private * priv, t_u16 action, t_u16 * mode) +woal_wifi_direct_mode_cfg(moal_private *priv, t_u16 action, t_u16 *mode) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ioctl_req *req = NULL; @@ -2798,7 +3161,7 @@ woal_wifi_direct_mode_cfg(moal_private * priv, t_u16 action, t_u16 * mode) ret = MLAN_STATUS_FAILURE; goto done; } - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_WIFI_DIRECT_MODE; req->req_id = MLAN_IOCTL_BSS; @@ -2827,8 +3190,8 @@ woal_wifi_direct_mode_cfg(moal_private * priv, t_u16 action, t_u16 * mode) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_set_remain_channel_ioctl(moal_private * priv, t_u8 wait_option, - mlan_ds_remain_chan * pchan) +woal_set_remain_channel_ioctl(moal_private *priv, t_u8 wait_option, + mlan_ds_remain_chan *pchan) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ioctl_req *req = NULL; @@ -2840,7 +3203,7 @@ woal_set_remain_channel_ioctl(moal_private * priv, t_u8 wait_option, ret = MLAN_STATUS_FAILURE; goto done; } - radio_cfg = (mlan_ds_radio_cfg *) req->pbuf; + radio_cfg = (mlan_ds_radio_cfg *)req->pbuf; radio_cfg->sub_command = MLAN_OID_REMAIN_CHAN_CFG; req->req_id = MLAN_IOCTL_RADIO_CFG; @@ -2869,8 +3232,8 @@ woal_set_remain_channel_ioctl(moal_private * priv, t_u8 wait_option, * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_p2p_config(moal_private * priv, t_u32 action, - mlan_ds_wifi_direct_config * p2p_config) +woal_p2p_config(moal_private *priv, t_u32 action, + mlan_ds_wifi_direct_config *p2p_config) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ioctl_req *req = NULL; @@ -2886,7 +3249,7 @@ woal_p2p_config(moal_private * priv, t_u32 action, ret = MLAN_STATUS_FAILURE; goto done; } - misc_cfg = (mlan_ds_misc_cfg *) req->pbuf; + misc_cfg = (mlan_ds_misc_cfg *)req->pbuf; misc_cfg->sub_command = MLAN_OID_MISC_WIFI_DIRECT_CONFIG; req->req_id = MLAN_IOCTL_MISC_CFG; req->action = action; @@ -2918,8 +3281,8 @@ woal_p2p_config(moal_private * priv, t_u32 action, * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_get_signal_info(moal_private * priv, t_u8 wait_option, - mlan_ds_get_signal * signal) +woal_get_signal_info(moal_private *priv, t_u8 wait_option, + mlan_ds_get_signal *signal) { int ret = 0; mlan_ds_get_info *info = NULL; @@ -2935,7 +3298,7 @@ woal_get_signal_info(moal_private * priv, t_u8 wait_option, } /* Fill request buffer */ - info = (mlan_ds_get_info *) req->pbuf; + info = (mlan_ds_get_info *)req->pbuf; info->sub_command = MLAN_OID_GET_SIGNAL; info->param.signal.selector = ALL_RSSI_INFO_MASK; req->req_id = MLAN_IOCTL_GET_INFO; @@ -2975,8 +3338,8 @@ woal_get_signal_info(moal_private * priv, t_u8 wait_option, * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_get_scan_table(moal_private * priv, t_u8 wait_option, - mlan_scan_resp * scan_resp) +woal_get_scan_table(moal_private *priv, t_u8 wait_option, + mlan_scan_resp *scan_resp) { int ret = 0; mlan_ioctl_req *req = NULL; @@ -2992,7 +3355,7 @@ woal_get_scan_table(moal_private * priv, t_u8 wait_option, } /* Fill request buffer */ - scan = (mlan_ds_scan *) req->pbuf; + scan = (mlan_ds_scan *)req->pbuf; scan->sub_command = MLAN_OID_SCAN_NORMAL; req->req_id = MLAN_IOCTL_SCAN; req->action = MLAN_ACT_GET; @@ -3025,8 +3388,8 @@ woal_get_scan_table(moal_private * priv, t_u8 wait_option, * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_request_scan(moal_private * priv, - t_u8 wait_option, mlan_802_11_ssid * req_ssid) +woal_request_scan(moal_private *priv, + t_u8 wait_option, mlan_802_11_ssid *req_ssid) { mlan_status ret = MLAN_STATUS_SUCCESS; moal_handle *handle = priv->phandle; @@ -3049,7 +3412,7 @@ woal_request_scan(moal_private * priv, goto done; } - scan = (mlan_ds_scan *) ioctl_req->pbuf; + scan = (mlan_ds_scan *)ioctl_req->pbuf; if (req_ssid && req_ssid->ssid_len != 0) { /* Specific SSID scan */ @@ -3094,11 +3457,12 @@ woal_request_scan(moal_private * priv, * * @param priv A pointer to moal_private structure * @param channel The channel to be set. + * @param wait_option wait_option * * @return MLAN_STATUS_SUCCESS--success, MLAN_STATUS_FAILURE--fail */ mlan_status -woal_change_adhoc_chan(moal_private * priv, int channel) +woal_change_adhoc_chan(moal_private *priv, int channel, t_u8 wait_option) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_bss_info bss_info; @@ -3111,7 +3475,7 @@ woal_change_adhoc_chan(moal_private * priv, int channel) /* Get BSS information */ if (MLAN_STATUS_SUCCESS != - woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info)) { + woal_get_bss_info(priv, wait_option, &bss_info)) { ret = MLAN_STATUS_FAILURE; goto done; } @@ -3128,13 +3492,13 @@ woal_change_adhoc_chan(moal_private * priv, int channel) } /* Get current channel */ - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_IBSS_CHANNEL; req->req_id = MLAN_IOCTL_BSS; req->action = MLAN_ACT_GET; /* Send IOCTL request to MLAN */ - ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + ret = woal_request_ioctl(priv, req, wait_option); if (ret != MLAN_STATUS_SUCCESS) goto done; @@ -3152,16 +3516,16 @@ woal_change_adhoc_chan(moal_private * priv, int channel) /* Do disonnect */ bss->sub_command = MLAN_OID_BSS_STOP; - memset((t_u8 *) & bss->param.bssid, 0, ETH_ALEN); + memset((t_u8 *)&bss->param.bssid, 0, ETH_ALEN); /* Send IOCTL request to MLAN */ - ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + ret = woal_request_ioctl(priv, req, wait_option); if (ret != MLAN_STATUS_SUCCESS) goto done; /* Do specific SSID scanning */ if (MLAN_STATUS_SUCCESS != - woal_request_scan(priv, MOAL_IOCTL_WAIT, &bss_info.ssid)) { + woal_request_scan(priv, wait_option, &bss_info.ssid)) { ret = MLAN_STATUS_FAILURE; goto done; } @@ -3172,7 +3536,7 @@ woal_change_adhoc_chan(moal_private * priv, int channel) sizeof(mlan_802_11_ssid)); /* Send IOCTL request to MLAN */ - ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + ret = woal_request_ioctl(priv, req, wait_option); done: if (ret != MLAN_STATUS_PENDING) @@ -3191,8 +3555,8 @@ woal_change_adhoc_chan(moal_private * priv, int channel) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_find_best_network(moal_private * priv, t_u8 wait_option, - mlan_ssid_bssid * ssid_bssid) +woal_find_best_network(moal_private *priv, t_u8 wait_option, + mlan_ssid_bssid *ssid_bssid) { mlan_ioctl_req *req = NULL; mlan_ds_bss *bss = NULL; @@ -3214,7 +3578,7 @@ woal_find_best_network(moal_private * priv, t_u8 wait_option, } /* Fill request buffer */ - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; req->req_id = MLAN_IOCTL_BSS; req->action = MLAN_ACT_GET; bss->sub_command = MLAN_OID_BSS_FIND_BSS; @@ -3226,7 +3590,7 @@ woal_find_best_network(moal_private * priv, t_u8 wait_option, if (ret == MLAN_STATUS_SUCCESS) { memcpy(ssid_bssid, &bss->param.ssid_bssid, sizeof(mlan_ssid_bssid)); - mac = (t_u8 *) & ssid_bssid->bssid; + mac = (t_u8 *)&ssid_bssid->bssid; PRINTM(MINFO, "Find network: ssid=%s, " MACSTR ", idx=%d\n", ssid_bssid->ssid.ssid, MAC2STR(mac), (int)ssid_bssid->idx); @@ -3249,7 +3613,7 @@ woal_find_best_network(moal_private * priv, t_u8 wait_option, * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_get_auth_mode(moal_private * priv, t_u8 wait_option, t_u32 * auth_mode) +woal_get_auth_mode(moal_private *priv, t_u8 wait_option, t_u32 *auth_mode) { int ret = 0; mlan_ioctl_req *req = NULL; @@ -3265,7 +3629,7 @@ woal_get_auth_mode(moal_private * priv, t_u8 wait_option, t_u32 * auth_mode) } /* Fill request buffer */ - sec = (mlan_ds_sec_cfg *) req->pbuf; + sec = (mlan_ds_sec_cfg *)req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_AUTH_MODE; req->req_id = MLAN_IOCTL_SEC_CFG; req->action = MLAN_ACT_GET; @@ -3291,8 +3655,7 @@ woal_get_auth_mode(moal_private * priv, t_u8 wait_option, t_u32 * auth_mode) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_get_encrypt_mode(moal_private * priv, t_u8 wait_option, - t_u32 * encrypt_mode) +woal_get_encrypt_mode(moal_private *priv, t_u8 wait_option, t_u32 *encrypt_mode) { int ret = 0; mlan_ioctl_req *req = NULL; @@ -3309,7 +3672,7 @@ woal_get_encrypt_mode(moal_private * priv, t_u8 wait_option, } /* Fill request buffer */ - sec = (mlan_ds_sec_cfg *) req->pbuf; + sec = (mlan_ds_sec_cfg *)req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_MODE; req->req_id = MLAN_IOCTL_SEC_CFG; req->action = MLAN_ACT_GET; @@ -3335,7 +3698,7 @@ woal_get_encrypt_mode(moal_private * priv, t_u8 wait_option, * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_get_wpa_enable(moal_private * priv, t_u8 wait_option, t_u32 * enable) +woal_get_wpa_enable(moal_private *priv, t_u8 wait_option, t_u32 *enable) { int ret = 0; mlan_ioctl_req *req = NULL; @@ -3352,7 +3715,7 @@ woal_get_wpa_enable(moal_private * priv, t_u8 wait_option, t_u32 * enable) } /* Fill request buffer */ - sec = (mlan_ds_sec_cfg *) req->pbuf; + sec = (mlan_ds_sec_cfg *)req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_WPA_ENABLED; req->req_id = MLAN_IOCTL_SEC_CFG; req->action = MLAN_ACT_GET; @@ -3378,7 +3741,7 @@ woal_get_wpa_enable(moal_private * priv, t_u8 wait_option, t_u32 * enable) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_set_auth_mode(moal_private * priv, t_u8 wait_option, t_u32 auth_mode) +woal_set_auth_mode(moal_private *priv, t_u8 wait_option, t_u32 auth_mode) { int ret = 0; mlan_ioctl_req *req = NULL; @@ -3394,7 +3757,7 @@ woal_set_auth_mode(moal_private * priv, t_u8 wait_option, t_u32 auth_mode) } /* Fill request buffer */ - sec = (mlan_ds_sec_cfg *) req->pbuf; + sec = (mlan_ds_sec_cfg *)req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_AUTH_MODE; req->req_id = MLAN_IOCTL_SEC_CFG; req->action = MLAN_ACT_SET; @@ -3419,7 +3782,7 @@ woal_set_auth_mode(moal_private * priv, t_u8 wait_option, t_u32 auth_mode) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_set_encrypt_mode(moal_private * priv, t_u8 wait_option, t_u32 encrypt_mode) +woal_set_encrypt_mode(moal_private *priv, t_u8 wait_option, t_u32 encrypt_mode) { int ret = 0; mlan_ioctl_req *req = NULL; @@ -3435,7 +3798,7 @@ woal_set_encrypt_mode(moal_private * priv, t_u8 wait_option, t_u32 encrypt_mode) } /* Fill request buffer */ - sec = (mlan_ds_sec_cfg *) req->pbuf; + sec = (mlan_ds_sec_cfg *)req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_MODE; req->req_id = MLAN_IOCTL_SEC_CFG; req->action = MLAN_ACT_SET; @@ -3460,7 +3823,7 @@ woal_set_encrypt_mode(moal_private * priv, t_u8 wait_option, t_u32 encrypt_mode) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_set_wpa_enable(moal_private * priv, t_u8 wait_option, t_u32 enable) +woal_set_wpa_enable(moal_private *priv, t_u8 wait_option, t_u32 enable) { int ret = 0; mlan_ioctl_req *req = NULL; @@ -3476,7 +3839,7 @@ woal_set_wpa_enable(moal_private * priv, t_u8 wait_option, t_u32 enable) } /* Fill request buffer */ - sec = (mlan_ds_sec_cfg *) req->pbuf; + sec = (mlan_ds_sec_cfg *)req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_WPA_ENABLED; req->req_id = MLAN_IOCTL_SEC_CFG; req->action = MLAN_ACT_SET; @@ -3500,7 +3863,7 @@ woal_set_wpa_enable(moal_private * priv, t_u8 wait_option, t_u32 enable) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_enable_wep_key(moal_private * priv, t_u8 wait_option) +woal_enable_wep_key(moal_private *priv, t_u8 wait_option) { int ret = 0; mlan_ioctl_req *req = NULL; @@ -3516,7 +3879,7 @@ woal_enable_wep_key(moal_private * priv, t_u8 wait_option) } /* Fill request buffer */ - sec = (mlan_ds_sec_cfg *) req->pbuf; + sec = (mlan_ds_sec_cfg *)req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; req->req_id = MLAN_IOCTL_SEC_CFG; req->action = MLAN_ACT_SET; @@ -3543,8 +3906,8 @@ woal_enable_wep_key(moal_private * priv, t_u8 wait_option) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_request_userscan(moal_private * priv, - t_u8 wait_option, wlan_user_scan_cfg * scan_cfg) +woal_request_userscan(moal_private *priv, + t_u8 wait_option, wlan_user_scan_cfg *scan_cfg) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ioctl_req *ioctl_req = NULL; @@ -3569,7 +3932,7 @@ woal_request_userscan(moal_private * priv, goto done; } - scan = (mlan_ds_scan *) ioctl_req->pbuf; + scan = (mlan_ds_scan *)ioctl_req->pbuf; scan->sub_command = MLAN_OID_SCAN_USER_CONFIG; ioctl_req->req_id = MLAN_IOCTL_SCAN; ioctl_req->action = MLAN_ACT_SET; @@ -3603,7 +3966,7 @@ woal_request_userscan(moal_private * priv, * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_get_scan_config(moal_private * priv, mlan_scan_cfg * scan_cfg) +woal_get_scan_config(moal_private *priv, mlan_scan_cfg *scan_cfg) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ds_scan *scan = NULL; @@ -3616,7 +3979,7 @@ woal_get_scan_config(moal_private * priv, mlan_scan_cfg * scan_cfg) ret = MLAN_STATUS_FAILURE; goto done; } - scan = (mlan_ds_scan *) req->pbuf; + scan = (mlan_ds_scan *)req->pbuf; scan->sub_command = MLAN_OID_SCAN_CONFIG; req->req_id = MLAN_IOCTL_SCAN; req->action = MLAN_ACT_GET; @@ -3643,7 +4006,7 @@ woal_get_scan_config(moal_private * priv, mlan_scan_cfg * scan_cfg) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_set_scan_time(moal_private * priv, t_u16 active_scan_time, +woal_set_scan_time(moal_private *priv, t_u16 active_scan_time, t_u16 passive_scan_time, t_u16 specific_scan_time) { mlan_status ret = MLAN_STATUS_SUCCESS; @@ -3663,7 +4026,7 @@ woal_set_scan_time(moal_private * priv, t_u16 active_scan_time, ret = MLAN_STATUS_FAILURE; goto done; } - scan = (mlan_ds_scan *) req->pbuf; + scan = (mlan_ds_scan *)req->pbuf; scan->sub_command = MLAN_OID_SCAN_CONFIG; req->req_id = MLAN_IOCTL_SCAN; req->action = MLAN_ACT_SET; @@ -3693,7 +4056,7 @@ woal_set_scan_time(moal_private * priv, t_u16 active_scan_time, * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_do_scan(moal_private * priv, wlan_user_scan_cfg * scan_cfg) +woal_do_scan(moal_private *priv, wlan_user_scan_cfg *scan_cfg) { mlan_status ret = MLAN_STATUS_SUCCESS; moal_handle *handle = priv->phandle; @@ -3712,11 +4075,12 @@ woal_do_scan(moal_private * priv, wlan_user_scan_cfg * scan_cfg) } #endif /* REASSOCIATION */ priv->report_scan_result = MTRUE; - if (!scan_cfg) { + + if (!scan_cfg) ret = woal_request_scan(priv, MOAL_NO_WAIT, NULL); - } else { + else ret = woal_request_userscan(priv, MOAL_NO_WAIT, scan_cfg); - } + #ifdef REASSOCIATION MOAL_REL_SEMAPHORE(&handle->reassoc_sem); #endif @@ -3731,7 +4095,7 @@ woal_do_scan(moal_private * priv, wlan_user_scan_cfg * scan_cfg) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_cancel_scan(moal_private * priv, t_u8 wait_option) +woal_cancel_scan(moal_private *priv, t_u8 wait_option) { mlan_ioctl_req *req = NULL; mlan_status ret = MLAN_STATUS_SUCCESS; @@ -3751,7 +4115,7 @@ woal_cancel_scan(moal_private * priv, t_u8 wait_option) } req->req_id = MLAN_IOCTL_SCAN; req->action = MLAN_ACT_SET; - ((mlan_ds_scan *) req->pbuf)->sub_command = MLAN_OID_SCAN_CANCEL; + ((mlan_ds_scan *)req->pbuf)->sub_command = MLAN_OID_SCAN_CANCEL; ret = woal_request_ioctl(priv, req, wait_option); handle->scan_pending_on_block = MFALSE; MOAL_REL_SEMAPHORE(&handle->async_sem); @@ -3760,12 +4124,15 @@ woal_cancel_scan(moal_private * priv, t_u8 wait_option) spin_lock_irqsave(&handle->priv[i]->scan_req_lock, flags); if (IS_STA_CFG80211(cfg80211_wext) && handle->priv[i]->scan_request) { - PRINTM(MINFO, "Reporting scan results\n"); - woal_inform_bss_from_scan_result(priv, NULL, - wait_option); + PRINTM(MMSG, "wlan: Cancel scan on %s\n", + handle->priv[i]->netdev->name); /** some supplicant can not handle SCAN abort event */ - cfg80211_scan_done(handle->priv[i]->scan_request, - MFALSE); + if (handle->priv[i]->bss_type == MLAN_BSS_TYPE_STA) + cfg80211_scan_done(handle->priv[i]-> + scan_request, MTRUE); + else + cfg80211_scan_done(handle->priv[i]-> + scan_request, MFALSE); handle->priv[i]->scan_request = NULL; } spin_unlock_irqrestore(&handle->priv[i]->scan_req_lock, flags); @@ -3781,11 +4148,14 @@ woal_cancel_scan(moal_private * priv, t_u8 wait_option) * @brief find ssid in scan_table * * @param priv A pointer to moal_private - * @ssid_bssid A pointer to mlan_ssid_bssid structure + * @param ssid_bssid A pointer to mlan_ssid_bssid structure + * + * * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_FAILURE */ int -woal_find_essid(moal_private * priv, mlan_ssid_bssid * ssid_bssid) +woal_find_essid(moal_private *priv, mlan_ssid_bssid *ssid_bssid, + t_u8 wait_option) { int ret = 0; mlan_scan_resp scan_resp; @@ -3793,7 +4163,7 @@ woal_find_essid(moal_private * priv, mlan_ssid_bssid * ssid_bssid) ENTER(); if (MLAN_STATUS_SUCCESS != - woal_get_scan_table(priv, MOAL_IOCTL_WAIT, &scan_resp)) { + woal_get_scan_table(priv, wait_option, &scan_resp)) { LEAVE(); return MLAN_STATUS_FAILURE; } @@ -3804,7 +4174,7 @@ woal_find_essid(moal_private * priv, mlan_ssid_bssid * ssid_bssid) LEAVE(); return MLAN_STATUS_FAILURE; } - ret = woal_find_best_network(priv, MOAL_IOCTL_WAIT, ssid_bssid); + ret = woal_find_best_network(priv, wait_option, ssid_bssid); LEAVE(); return ret; } @@ -3819,8 +4189,8 @@ woal_find_essid(moal_private * priv, mlan_ssid_bssid * ssid_bssid) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_request_bgscan(moal_private * priv, - t_u8 wait_option, wlan_bgscan_cfg * scan_cfg) +woal_request_bgscan(moal_private *priv, + t_u8 wait_option, wlan_bgscan_cfg *scan_cfg) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ioctl_req *ioctl_req = NULL; @@ -3837,7 +4207,7 @@ woal_request_bgscan(moal_private * priv, goto done; } - scan = (mlan_ds_scan *) ioctl_req->pbuf; + scan = (mlan_ds_scan *)ioctl_req->pbuf; scan->sub_command = MLAN_OID_SCAN_BGSCAN_CONFIG; ioctl_req->req_id = MLAN_IOCTL_SCAN; ioctl_req->action = MLAN_ACT_SET; @@ -3867,7 +4237,7 @@ woal_request_bgscan(moal_private * priv, * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_set_bg_scan(moal_private * priv, char *buf, int length) +woal_set_bg_scan(moal_private *priv, char *buf, int length) { t_u8 *ptr = buf + strlen("BGSCAN-CONFIG") + 1; int buf_left = length - (strlen("BGSCAN-CONFIG") + 1); @@ -3878,7 +4248,8 @@ woal_set_bg_scan(moal_private * priv, char *buf, int length) ENTER(); memset(&priv->scan_cfg, 0, sizeof(priv->scan_cfg)); - priv->scan_cfg.report_condition = BG_SCAN_SSID_MATCH; + priv->scan_cfg.report_condition = + BG_SCAN_SSID_MATCH | BG_SCAN_WAIT_ALL_CHAN_DONE; while (buf_left >= 2) { switch (*ptr) { case WEXT_CSCAN_SSID_SECTION: @@ -3905,7 +4276,8 @@ woal_set_bg_scan(moal_private * priv, char *buf, int length) break; case WEXT_BGSCAN_RSSI_SECTION: priv->scan_cfg.report_condition = - BG_SCAN_SSID_RSSI_MATCH; + BG_SCAN_SSID_RSSI_MATCH | + BG_SCAN_WAIT_ALL_CHAN_DONE; priv->scan_cfg.rssi_threshold = ptr[1]; PRINTM(MIOCTL, "BG scan: rssi_threshold=%d\n", (int)priv->scan_cfg.rssi_threshold); @@ -3913,7 +4285,7 @@ woal_set_bg_scan(moal_private * priv, char *buf, int length) buf_left -= 2; break; case WEXT_BGSCAN_REPEAT_SECTION: - priv->scan_cfg.repeat_count = (t_u16) ptr[1]; + priv->scan_cfg.repeat_count = (t_u16)ptr[1]; PRINTM(MIOCTL, "BG scan: repeat_count=%d\n", (int)priv->scan_cfg.repeat_count); ptr += 2; @@ -3968,6 +4340,65 @@ woal_set_bg_scan(moal_private * priv, char *buf, int length) return ret; } +#ifdef STA_CFG80211 +/** + * @brief set bgscan and new rssi_low_threshold + * + * @param priv A pointer to moal_private structure + * @param set_rssi flag for set rssi_low_threshold + * + * @return N/A + */ +void +woal_config_bgscan_and_rssi(moal_private *priv, t_u8 set_rssi) +{ + char rssi_low[10]; + mlan_bss_info bss_info; + int band = 0; + + ENTER(); + memset(&bss_info, 0, sizeof(bss_info)); + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + if (!bss_info.media_connected) { + PRINTM(MIOCTL, "We already lost connection\n"); + LEAVE(); + return; + } + memset(&priv->scan_cfg, 0, sizeof(priv->scan_cfg)); + strncpy(priv->scan_cfg.ssid_list[0].ssid, bss_info.ssid.ssid, + bss_info.ssid.ssid_len); + priv->scan_cfg.ssid_list[0].max_len = 0; + + priv->scan_cfg.report_condition = + BG_SCAN_SSID_RSSI_MATCH | BG_SCAN_WAIT_ALL_CHAN_DONE; + priv->scan_cfg.rssi_threshold = priv->rssi_low - RSSI_HYSTERESIS; + priv->scan_cfg.repeat_count = DEF_REPEAT_COUNT; + priv->scan_cfg.scan_interval = MIN_BGSCAN_INTERVAL; + woal_get_band(priv, &band); + switch (band) { + case WIFI_FREQUENCY_BAND_2GHZ: + priv->scan_cfg.chan_list[0].radio_type = 0 | BAND_SPECIFIED; + break; + case WIFI_FREQUENCY_BAND_5GHZ: + priv->scan_cfg.chan_list[0].radio_type = 1 | BAND_SPECIFIED; + break; + default: + break; + } + priv->scan_cfg.bss_type = MLAN_BSS_MODE_INFRA; + priv->scan_cfg.action = BG_SCAN_ACT_SET; + priv->scan_cfg.enable = MTRUE; + woal_request_bgscan(priv, MOAL_NO_WAIT, &priv->scan_cfg); + if (set_rssi && + ((priv->rssi_low + RSSI_HYSTERESIS) <= LOWEST_RSSI_THRESHOLD)) { + priv->rssi_low += RSSI_HYSTERESIS; + sprintf(rssi_low, "%d", priv->rssi_low); + woal_set_rssi_low_threshold(priv, rssi_low, MOAL_NO_WAIT); + } + LEAVE(); +} +#endif + /** * @brief stop bg scan * @@ -3977,7 +4408,7 @@ woal_set_bg_scan(moal_private * priv, char *buf, int length) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_stop_bg_scan(moal_private * priv, t_u8 wait_option) +woal_stop_bg_scan(moal_private *priv, t_u8 wait_option) { wlan_bgscan_cfg scan_cfg; mlan_status ret = MLAN_STATUS_SUCCESS; @@ -4000,7 +4431,7 @@ woal_stop_bg_scan(moal_private * priv, t_u8 wait_option) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ void -woal_reconfig_bgscan(moal_handle * handle) +woal_reconfig_bgscan(moal_handle *handle) { int i; for (i = 0; i < MIN(handle->priv_num, MLAN_MAX_BSS_NUM); i++) { @@ -4028,7 +4459,7 @@ woal_reconfig_bgscan(moal_handle * handle) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_set_rssi_low_threshold(moal_private * priv, char *rssi, t_u8 wait_option) +woal_set_rssi_low_threshold(moal_private *priv, char *rssi, t_u8 wait_option) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ioctl_req *req = NULL; @@ -4044,7 +4475,7 @@ woal_set_rssi_low_threshold(moal_private * priv, char *rssi, t_u8 wait_option) ret = MLAN_STATUS_FAILURE; goto done; } - misc = (mlan_ds_misc_cfg *) req->pbuf; + misc = (mlan_ds_misc_cfg *)req->pbuf; req->req_id = MLAN_IOCTL_MISC_CFG; misc->sub_command = MLAN_OID_MISC_SUBSCRIBE_EVENT; req->action = MLAN_ACT_SET; @@ -4085,7 +4516,7 @@ woal_set_rssi_low_threshold(moal_private * priv, char *rssi, t_u8 wait_option) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_set_rssi_threshold(moal_private * priv, t_u32 event_id, t_u8 wait_option) +woal_set_rssi_threshold(moal_private *priv, t_u32 event_id, t_u8 wait_option) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ioctl_req *req = NULL; @@ -4114,7 +4545,7 @@ woal_set_rssi_threshold(moal_private * priv, t_u32 event_id, t_u8 wait_option) ret = -ENOMEM; goto done; } - misc = (mlan_ds_misc_cfg *) req->pbuf; + misc = (mlan_ds_misc_cfg *)req->pbuf; req->req_id = MLAN_IOCTL_MISC_CFG; misc->sub_command = MLAN_OID_MISC_SUBSCRIBE_EVENT; req->action = MLAN_ACT_SET; @@ -4151,7 +4582,7 @@ woal_set_rssi_threshold(moal_private * priv, t_u32 event_id, t_u8 wait_option) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_get_powermode(moal_private * priv, int *powermode) +woal_get_powermode(moal_private *priv, int *powermode) { mlan_status ret = MLAN_STATUS_SUCCESS; int ps_mode; @@ -4184,7 +4615,7 @@ woal_get_powermode(moal_private * priv, int *powermode) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_set_scan_type(moal_private * priv, t_u32 scan_type) +woal_set_scan_type(moal_private *priv, t_u32 scan_type) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ds_scan *scan = NULL; @@ -4203,7 +4634,7 @@ woal_set_scan_type(moal_private * priv, t_u32 scan_type) ret = MLAN_STATUS_FAILURE; goto done; } - scan = (mlan_ds_scan *) req->pbuf; + scan = (mlan_ds_scan *)req->pbuf; scan->sub_command = MLAN_OID_SCAN_CONFIG; req->req_id = MLAN_IOCTL_SCAN; req->action = MLAN_ACT_SET; @@ -4229,7 +4660,7 @@ woal_set_scan_type(moal_private * priv, t_u32 scan_type) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_enable_ext_scan(moal_private * priv, t_u8 enable) +woal_enable_ext_scan(moal_private *priv, t_u8 enable) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ds_scan *scan = NULL; @@ -4248,7 +4679,7 @@ woal_enable_ext_scan(moal_private * priv, t_u8 enable) ret = MLAN_STATUS_FAILURE; goto done; } - scan = (mlan_ds_scan *) req->pbuf; + scan = (mlan_ds_scan *)req->pbuf; scan->sub_command = MLAN_OID_SCAN_CONFIG; req->req_id = MLAN_IOCTL_SCAN; req->action = MLAN_ACT_SET; @@ -4274,7 +4705,7 @@ woal_enable_ext_scan(moal_private * priv, t_u8 enable) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_set_powermode(moal_private * priv, char *powermode) +woal_set_powermode(moal_private *priv, char *powermode) { mlan_status ret = MLAN_STATUS_SUCCESS; int disabled; @@ -4313,7 +4744,7 @@ woal_set_powermode(moal_private * priv, char *powermode) * @return 0 -- success, otherwise fail */ int -woal_set_combo_scan(moal_private * priv, char *buf, int length) +woal_set_combo_scan(moal_private *priv, char *buf, int length) { int ret = 0; wlan_user_scan_cfg scan_cfg; @@ -4440,7 +4871,7 @@ woal_set_combo_scan(moal_private * priv, char *buf, int length) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_get_band(moal_private * priv, int *band) +woal_get_band(moal_private *priv, int *band) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ioctl_req *req = NULL; @@ -4454,7 +4885,7 @@ woal_get_band(moal_private * priv, int *band) ret = MLAN_STATUS_FAILURE; goto done; } - radio_cfg = (mlan_ds_radio_cfg *) req->pbuf; + radio_cfg = (mlan_ds_radio_cfg *)req->pbuf; radio_cfg->sub_command = MLAN_OID_BAND_CFG; req->req_id = MLAN_IOCTL_RADIO_CFG; /* Get config_bands, adhoc_start_band and adhoc_channel values from @@ -4467,6 +4898,8 @@ woal_get_band(moal_private * priv, int *band) if (radio_cfg->param.band_cfg. config_bands & (BAND_B | BAND_G | BAND_GN)) support_band |= WIFI_FREQUENCY_BAND_2GHZ; + if (radio_cfg->param.band_cfg.config_bands & (BAND_A | BAND_AN)) + support_band |= WIFI_FREQUENCY_BAND_5GHZ; *band = support_band; if (support_band == WIFI_FREQUENCY_ALL_BAND) *band = WIFI_FREQUENCY_BAND_AUTO; @@ -4486,7 +4919,7 @@ woal_get_band(moal_private * priv, int *band) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_set_band(moal_private * priv, char *pband) +woal_set_band(moal_private *priv, char *pband) { mlan_status ret = MLAN_STATUS_SUCCESS; int band = 0; @@ -4499,7 +4932,7 @@ woal_set_band(moal_private * priv, char *pband) ret = MLAN_STATUS_FAILURE; goto done; } - radio_cfg = (mlan_ds_radio_cfg *) req->pbuf; + radio_cfg = (mlan_ds_radio_cfg *)req->pbuf; radio_cfg->sub_command = MLAN_OID_BAND_CFG; req->req_id = MLAN_IOCTL_RADIO_CFG; @@ -4515,9 +4948,29 @@ woal_set_band(moal_private * priv, char *pband) #if defined(STA_CFG80211) || defined(UAP_CFG80211) if (IS_STA_OR_UAP_CFG80211(cfg80211_wext) && priv->wdev && priv->wdev->wiphy) { + if (radio_cfg->param.band_cfg.fw_bands & BAND_A) + priv->wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = + &cfg80211_band_5ghz; priv->wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &cfg80211_band_2ghz; } +#endif + } else if (*pband == '1') { + PRINTM(MIOCTL, "Set band to 5G\n"); + if (!(radio_cfg->param.band_cfg.fw_bands & BAND_A)) { + PRINTM(MERROR, "Don't support 5G band\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + band = BAND_A; + band |= BAND_AN; +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + if (IS_STA_OR_UAP_CFG80211(cfg80211_wext) && priv->wdev && + priv->wdev->wiphy) { + priv->wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = + &cfg80211_band_5ghz; + priv->wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = NULL; + } #endif } else if (*pband == '2') { PRINTM(MIOCTL, "Set band to 2G\n"); @@ -4526,6 +4979,7 @@ woal_set_band(moal_private * priv, char *pband) #if defined(STA_CFG80211) || defined(UAP_CFG80211) if (IS_STA_OR_UAP_CFG80211(cfg80211_wext) && priv->wdev && priv->wdev->wiphy) { + priv->wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = NULL; priv->wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &cfg80211_band_2ghz; } @@ -4558,7 +5012,7 @@ woal_set_band(moal_private * priv, char *pband) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_add_rxfilter(moal_private * priv, char *rxfilter) +woal_add_rxfilter(moal_private *priv, char *rxfilter) { mlan_status ret = MLAN_STATUS_SUCCESS; ENTER(); @@ -4595,7 +5049,7 @@ woal_add_rxfilter(moal_private * priv, char *rxfilter) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_remove_rxfilter(moal_private * priv, char *rxfilter) +woal_remove_rxfilter(moal_private *priv, char *rxfilter) { mlan_status ret = MLAN_STATUS_SUCCESS; ENTER(); @@ -4631,7 +5085,7 @@ woal_remove_rxfilter(moal_private * priv, char *rxfilter) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_priv_qos_cfg(moal_private * priv, t_u32 action, char *qos_cfg) +woal_priv_qos_cfg(moal_private *priv, t_u32 action, char *qos_cfg) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ds_wmm_cfg *cfg = NULL; @@ -4654,12 +5108,12 @@ woal_priv_qos_cfg(moal_private * priv, t_u32 action, char *qos_cfg) ret = MLAN_STATUS_FAILURE; goto done; } - cfg = (mlan_ds_wmm_cfg *) req->pbuf; + cfg = (mlan_ds_wmm_cfg *)req->pbuf; cfg->sub_command = MLAN_OID_WMM_CFG_QOS; req->req_id = MLAN_IOCTL_WMM_CFG; req->action = action; if (action == MLAN_ACT_SET) { - cfg->param.qos_cfg = (t_u8) qosinfo; + cfg->param.qos_cfg = (t_u8)qosinfo; PRINTM(MIOCTL, "set qosinfo=%d\n", qosinfo); } ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); @@ -4682,7 +5136,7 @@ woal_priv_qos_cfg(moal_private * priv, t_u32 action, char *qos_cfg) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ mlan_status -woal_set_sleeppd(moal_private * priv, char *psleeppd) +woal_set_sleeppd(moal_private *priv, char *psleeppd) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ds_pm_cfg *pm_cfg = NULL; @@ -4701,7 +5155,7 @@ woal_set_sleeppd(moal_private * priv, char *psleeppd) ret = MLAN_STATUS_FAILURE; goto done; } - pm_cfg = (mlan_ds_pm_cfg *) req->pbuf; + pm_cfg = (mlan_ds_pm_cfg *)req->pbuf; pm_cfg->sub_command = MLAN_OID_PM_CFG_SLEEP_PD; req->req_id = MLAN_IOCTL_PM_CFG; if ((sleeppd <= MAX_SLEEP_PERIOD && sleeppd >= MIN_SLEEP_PERIOD) || @@ -4734,7 +5188,7 @@ woal_set_sleeppd(moal_private * priv, char *psleeppd) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ int -woal_set_scan_cfg(moal_private * priv, char *buf, int length) +woal_set_scan_cfg(moal_private *priv, char *buf, int length) { mlan_status ret = MLAN_STATUS_SUCCESS; t_u8 *ptr = buf + NL80211_SCANCFG_HEADER_SIZE; @@ -4812,7 +5266,7 @@ woal_set_scan_cfg(moal_private * priv, char *buf, int length) * @return 0 --success, otherwise fail */ int -woal_set_radio(moal_private * priv, t_u8 option) +woal_set_radio(moal_private *priv, t_u8 option) { int ret = 0; mlan_ds_radio_cfg *radio = NULL; @@ -4828,7 +5282,7 @@ woal_set_radio(moal_private * priv, t_u8 option) ret = -ENOMEM; goto done; } - radio = (mlan_ds_radio_cfg *) req->pbuf; + radio = (mlan_ds_radio_cfg *)req->pbuf; radio->sub_command = MLAN_OID_RADIO_CTRL; req->req_id = MLAN_IOCTL_RADIO_CFG; req->action = MLAN_ACT_SET; @@ -4845,3 +5299,90 @@ woal_set_radio(moal_private * priv, t_u8 option) } #endif /* STA_SUPPORT */ + +/** + * @brief Set/Get configure multi-channel policy + * + * @param priv A pointer to moal_private structure + * @param enable A pointer to enable + * @param wait_option wait_option of ioctl + * @param action action of ioctl + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_mc_policy_cfg(moal_private *priv, t_u16 *enable, + t_u8 wait_option, t_u8 action) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *cfg = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + status = MLAN_STATUS_FAILURE; + goto done; + } + + cfg = (mlan_ds_misc_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_MISC_MULTI_CHAN_POLICY; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = action; + if (MLAN_ACT_SET == action) + cfg->param.multi_chan_policy = *enable; + status = woal_request_ioctl(priv, req, wait_option); + if (status != MLAN_STATUS_SUCCESS) + goto done; + if (MLAN_ACT_GET == action) + *enable = cfg->param.multi_chan_policy; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Set hotspot configuration value to mlan layer + * + * @param priv A pointer to moal_private structure + * @param wait_option wait option + * @param hotspotcfg Hotspot configuration value + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_set_hotspotcfg(moal_private *priv, t_u8 wait_option, t_u32 hotspotcfg) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *cfg = NULL; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + cfg = (mlan_ds_misc_cfg *)req->pbuf; + cfg->param.hotspot_cfg = hotspotcfg; + req->action = MLAN_ACT_SET; + + cfg->sub_command = MLAN_OID_MISC_HOTSPOT_CFG; + req->req_id = MLAN_IOCTL_MISC_CFG; + + ret = woal_request_ioctl(priv, req, wait_option); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_main.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_main.c old mode 100755 new mode 100644 index 19a71057..cb081055 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_main.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_main.c @@ -26,7 +26,7 @@ Change log: ********************************************************/ #include "moal_main.h" -#include "moal_sdio.h" +#include "moal_sdio.h" #ifdef UAP_SUPPORT #include "moal_uap.h" #endif @@ -47,26 +47,95 @@ Change log: #include #include -#include "linux/random.h" #include +#include #include #include +#ifdef CONFIG_OF +#include +#endif + /******************************************************** Local Variables ********************************************************/ +/** card info for sd877 */ +static struct _card_info card_info_sd8777 = { + .embedded_supp = 1, + .drcs = 0, + .go_noa = 0, + .v15_update = 0, +}; + +/** card info for sd8787 */ +static struct _card_info card_info_sd8787 = { + .embedded_supp = 1, + .drcs = 0, + .go_noa = 0, + .v15_update = 0, +}; + +/** card info for sd8797 */ +static struct _card_info card_info_sd8797 = { + .embedded_supp = 1, + .drcs = 0, + .go_noa = 0, + .v15_update = 0, +}; + +/** card info for sd887 */ +static struct _card_info card_info_sd8887 = { + .embedded_supp = 1, + .drcs = 1, + .go_noa = 1, + .v15_update = 1, +}; + +/** card info for sd8801 */ +static struct _card_info card_info_sd8801 = { +#ifdef DRV_EMBEDDED_SUPPLICANT + .embedded_supp = 1, +#else + .embedded_supp = 0, +#endif + .drcs = 0, + .go_noa = 0, + .v15_update = 0, +}; + +/** card info for sd8897 */ +static struct _card_info card_info_sd8897 = { + .embedded_supp = 1, + .drcs = 1, + .go_noa = 1, + .v15_update = 1, +}; + #define KERN_VERSION "3X" /** Driver version */ char driver_version[] = - "SD8801-%s-M" KERN_VERSION "14" MLAN_RELEASE_VERSION + "SD8XXX-%s-C" KERN_VERSION "15" MLAN_RELEASE_VERSION "-GPL" "-(" "FP" FPNUM ")" #ifdef DEBUG_LEVEL2 "-dbg" #endif " "; +/** SD8787 Card */ +#define CARD_SD8787 "SD8787" +/** SD8777 Card */ +#define CARD_SD8777 "SD8777" +/** SD8887 Card */ +#define CARD_SD8887 "SD8887" +/** SD8801 Card */ +#define CARD_SD8801 "SD8801" +/** SD8897 Card */ +#define CARD_SD8897 "SD8897" +/** SD8797 Card */ +#define CARD_SD8797 "SD8797" + /** Firmware name */ char *fw_name; int req_fw_nowait = 1; @@ -84,6 +153,14 @@ int intmode = INT_MODE_SDIO; /** GPIO interrupt pin number */ int gpiopin; +#ifdef CONFIG_OF +#if defined(STA_CFG80211) || defined(UAP_CFG80211) +/** Region alpha2 string */ +extern char *reg_alpha2; +#endif +extern int cfg80211_drcs; +#endif + /** Auto deep sleep */ int auto_ds; @@ -125,11 +202,17 @@ int pm_keep_power = 1; int shutdown_hs; #endif +/** SDIO slew rate */ +int slew_rate = 3; + #if defined(STA_SUPPORT) /** 802.11d configuration */ int cfg_11d; #endif +/** FW download CRC check */ +int fw_crc_check = 1; + /** CAL data config file */ char *cal_data_cfg; /** Init config file (MAC address, register etc.) */ @@ -162,6 +245,10 @@ int low_power_mode_enable; int hw_test; +#ifdef CONFIG_OF +int dts_enable = 1; +#endif + #if defined(WIFI_DIRECT_SUPPORT) #if defined(STA_CFG80211) && defined(UAP_CFG80211) #if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION @@ -208,6 +295,9 @@ static mlan_callbacks woal_callbacks = { .moal_print_netintf = moal_print_netintf, .moal_assert = moal_assert, .moal_tcp_ack_tx_ind = moal_tcp_ack_tx_ind, + .moal_hist_data_add = moal_hist_data_add, + .moal_peer_mgmt_frame = moal_peer_mgmt_frame, + .moal_updata_peer_signal = moal_updata_peer_signal, }; #if defined(STA_SUPPORT) && defined(UAP_SUPPORT) @@ -233,6 +323,10 @@ t_u32 dev_cap_mask = DEFAULT_DEV_CAP_MASK; /** Semaphore for add/remove card */ struct semaphore AddRemoveCardSem; +/** Semaphore for loading user data config */ +struct semaphore LoadUserDataSem; +/** Mutex for loading user data config */ +struct semaphore LoadUserDataMtx; /** * The global variable of a pointer to moal_handle * structure variable @@ -255,11 +349,164 @@ int woal_set_mac_address(struct net_device *dev, void *addr); void woal_tx_timeout(struct net_device *dev); struct net_device_stats *woal_get_stats(struct net_device *dev); #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) +u16 woal_select_queue(struct net_device *dev, struct sk_buff *skb, + void *accel_priv, select_queue_fallback_t fallback); +#else +u16 woal_select_queue(struct net_device *dev, struct sk_buff *skb, + void *accel_priv); +#endif +#else u16 woal_select_queue(struct net_device *dev, struct sk_buff *skb); #endif +#endif mlan_debug_info info; +static moal_handle *reset_handle; +/** Hang workqueue */ +static struct workqueue_struct *hang_workqueue; +/** Hang work */ +static struct work_struct hang_work; + +/** + * @brief This function process FW hang + * + * @param handle Pointer to structure moal_handle + * + * @return N/A + */ +static void +woal_hang_work_queue(struct work_struct *work) +{ + int i; + ENTER(); + if (!reset_handle) { + LEAVE(); + return; + } + for (i = 0; i < reset_handle->priv_num; i++) { + if (reset_handle->priv[i] && reset_handle->priv[i]->netdev) { + PRINTM(MMSG, "Close netdev %s\n", + reset_handle->priv[i]->netdev->name); + rtnl_lock(); + dev_close(reset_handle->priv[i]->netdev); + rtnl_unlock(); + break; + } + } + reset_handle = NULL; + LEAVE(); +} + +/** + * @brief This function process FW hang + * + * @param handle Pointer to structure moal_handle + * + * @return N/A + */ +void +woal_process_hang(moal_handle *handle) +{ + ENTER(); + if (reset_handle == NULL) { + PRINTM(MMSG, "Process hang\n"); + reset_handle = handle; + queue_work(hang_workqueue, &hang_work); + } + LEAVE(); +} + +static int woal_netdevice_event(struct notifier_block *nb, unsigned long event, + void *ptr); +static struct notifier_block woal_notifier = { + .notifier_call = woal_netdevice_event +}; + +/** + * @brief This function handle the net interface ipaddr change event + * + * @param nb pointer to the notifier_block + * @param event event type + * @param ptr pointer to event struct + * + * @return NOTIFY_DONE or NOTIFY_OK + */ +static int +woal_netdevice_event(struct notifier_block *nb, unsigned long event, void *ptr) +{ + struct in_ifaddr *ifa = (struct in_ifaddr *)ptr; + struct net_device *ndev; + moal_private *priv; + + int ret = NOTIFY_OK; +#ifdef STA_CFG80211 + char rssi_low[10]; +#endif + + ENTER(); + + ndev = ifa->ifa_dev->dev; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + if (!ndev || ndev->netdev_ops->ndo_open != woal_open) +#else + if (!ndev || ndev->open != woal_open) +#endif + { + PRINTM(MIOCTL, "IP changes not for us, ignore. ndev[%p]\n", + ndev); + if (ndev) + PRINTM(MIOCTL, "changes on %s\n", ndev->name); + ret = NOTIFY_DONE; + goto done; + } + priv = (moal_private *)netdev_priv(ndev); + if (priv->bss_type != MLAN_BSS_TYPE_STA +#if defined(WIFI_DIRECT_SUPPORT) + && priv->bss_type != MLAN_BSS_TYPE_WIFIDIRECT +#endif + ) { + PRINTM(MIOCTL, "Bss type [%d] is not STA/P2P, ignore\n", + (int)priv->bss_type); + ret = NOTIFY_DONE; + goto done; + } + + switch (event) { + case NETDEV_UP: + PRINTM(MIOCTL, "[%s]: New ip addr: 0x%08x\n", ndev->name, + ifa->ifa_address); + /* Save the IP addr now */ + memcpy(priv->ip_addr, &ifa->ifa_address, + sizeof(ifa->ifa_address)); + priv->ip_addr_type = IPADDR_TYPE_IPV4; +#ifdef STA_CFG80211 + if (!hw_test && priv->roaming_enabled) { + sprintf(rssi_low, "%d", priv->rssi_low); + woal_set_rssi_low_threshold(priv, rssi_low, + MOAL_CMD_WAIT); + } +#endif + break; + case NETDEV_DOWN: + PRINTM(MIOCTL, "[%s]: Ip addr removed.\n", ndev->name); + priv->ip_addr_type = IPADDR_TYPE_NONE; + memset(priv->ip_addr, 0, sizeof(priv->ip_addr)); + break; + default: + PRINTM(MIOCTL, "[%s]: Ignore event: %u\n", ndev->name, + (unsigned int)event); + ret = NOTIFY_DONE; + goto done; + } + +done: + LEAVE(); + return ret; +} + /** * @brief This function validates a SSID as being able to be printed * @@ -268,7 +515,7 @@ mlan_debug_info info; * @return MTRUE or MFALSE */ BOOLEAN -woal_ssid_valid(mlan_802_11_ssid * pssid) +woal_ssid_valid(mlan_802_11_ssid *pssid) { #ifdef ASCII_SSID_CHECK unsigned int ssid_idx; @@ -298,7 +545,7 @@ woal_ssid_valid(mlan_802_11_ssid * pssid) void woal_go_timer_func(void *context) { - moal_handle *handle = (moal_handle *) context; + moal_handle *handle = (moal_handle *)context; ENTER(); @@ -318,7 +565,7 @@ woal_go_timer_func(void *context) void woal_remain_timer_func(void *context) { - moal_handle *handle = (moal_handle *) context; + moal_handle *handle = (moal_handle *)context; moal_private *priv = handle->priv[handle->remain_bss_index]; ENTER(); @@ -355,7 +602,7 @@ woal_remain_timer_func(void *context) * @return MTRUE/MFALSE; */ int -woal_is_connected(moal_private * priv, mlan_ssid_bssid * ssid_bssid) +woal_is_connected(moal_private *priv, mlan_ssid_bssid *ssid_bssid) { mlan_bss_info bss_info; int ret = MFALSE; @@ -414,7 +661,7 @@ woal_is_connected(moal_private * priv, mlan_ssid_bssid * ssid_bssid) * @return Pointer of the specific IE -- success, NULL -- fail */ const t_u8 * -woal_parse_ie_tlv(const t_u8 * ie, int len, t_u8 id) +woal_parse_ie_tlv(const t_u8 *ie, int len, t_u8 id) { int left_len = len; const t_u8 *pos = ie; @@ -441,7 +688,7 @@ woal_parse_ie_tlv(const t_u8 * ie, int len, t_u8 id) * @return Wireless mode */ t_u32 -woal_get_mode(moal_private * priv, t_u8 wait_option) +woal_get_mode(moal_private *priv, t_u8 wait_option) { int ret = 0; mlan_ds_bss *bss = NULL; @@ -462,7 +709,7 @@ woal_get_mode(moal_private * priv, t_u8 wait_option) } /* Fill request buffer */ - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_BSS_MODE; req->req_id = MLAN_IOCTL_BSS; req->action = MLAN_ACT_GET; @@ -502,7 +749,7 @@ woal_get_mode(moal_private * priv, t_u8 wait_option) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -woal_update_drv_tbl(moal_handle * handle, int drv_mode_local) +woal_update_drv_tbl(moal_handle *handle, int drv_mode_local) { mlan_status ret = MLAN_STATUS_SUCCESS; unsigned int intf_num = 0; @@ -563,9 +810,7 @@ woal_update_drv_tbl(moal_handle * handle, int drv_mode_local) goto done; } else { /* Create new table */ - bss_tbl = - (mlan_bss_attr *) kmalloc(sizeof(mlan_bss_attr) * - intf_num, GFP_KERNEL); + bss_tbl = kmalloc(sizeof(mlan_bss_attr) * intf_num, GFP_KERNEL); if (!bss_tbl) { PRINTM(MERROR, "Could not create BSS attribute table\n"); @@ -654,12 +899,51 @@ woal_update_drv_tbl(moal_handle * handle, int drv_mode_local) handle->drv_mode.fw_name = fw_name; } else { #if defined(UAP_SUPPORT) && defined(STA_SUPPORT) - handle->drv_mode.fw_name = DEFAULT_AP_STA_FW_NAME; + if (handle->card_type == CARD_TYPE_SD8777) + handle->drv_mode.fw_name = DEFAULT_AP_STA_FW_NAME_8777; + else if (handle->card_type == CARD_TYPE_SD8787) + handle->drv_mode.fw_name = DEFAULT_AP_STA_FW_NAME_8787; + else if (handle->card_type == CARD_TYPE_SD8887) + handle->drv_mode.fw_name = DEFAULT_AP_STA_FW_NAME_8887; + else if (handle->card_type == CARD_TYPE_SD8801) + handle->drv_mode.fw_name = DEFAULT_AP_STA_FW_NAME_8801; + else if (handle->card_type == CARD_TYPE_SD8897) + handle->drv_mode.fw_name = DEFAULT_AP_STA_FW_NAME_8897; + else if (handle->card_type == CARD_TYPE_SD8797) + handle->drv_mode.fw_name = DEFAULT_AP_STA_FW_NAME_8797; + else + handle->drv_mode.fw_name = DEFAULT_AP_STA_FW_NAME; #else #ifdef UAP_SUPPORT - handle->drv_mode.fw_name = DEFAULT_AP_FW_NAME; + if (handle->card_type == CARD_TYPE_SD8777) + handle->drv_mode.fw_name = DEFAULT_AP_FW_NAME_8777; + else if (handle->card_type == CARD_TYPE_SD8787) + handle->drv_mode.fw_name = DEFAULT_AP_FW_NAME_8787; + else if (handle->card_type == CARD_TYPE_SD8887) + handle->drv_mode.fw_name = DEFAULT_AP_FW_NAME_8887; + else if (handle->card_type == CARD_TYPE_SD8801) + handle->drv_mode.fw_name = DEFAULT_AP_FW_NAME_8801; + else if (handle->card_type == CARD_TYPE_SD8897) + handle->drv_mode.fw_name = DEFAULT_AP_FW_NAME_8897; + else if (handle->card_type == CARD_TYPE_SD8797) + handle->drv_mode.fw_name = DEFAULT_AP_FW_NAME_8797; + else + handle->drv_mode.fw_name = DEFAULT_AP_FW_NAME; #else - handle->drv_mode.fw_name = DEFAULT_FW_NAME; + if (handle->card_type == CARD_TYPE_SD8777) + handle->drv_mode.fw_name = DEFAULT_FW_NAME_8777; + else if (handle->card_type == CARD_TYPE_SD8787) + handle->drv_mode.fw_name = DEFAULT_FW_NAME_8787; + else if (handle->card_type == CARD_TYPE_SD8887) + handle->drv_mode.fw_name = DEFAULT_FW_NAME_8887; + else if (handle->card_type == CARD_TYPE_SD8801) + handle->drv_mode.fw_name = DEFAULT_FW_NAME_8801; + else if (handle->card_type == CARD_TYPE_SD8897) + handle->drv_mode.fw_name = DEFAULT_FW_NAME_8897; + else if (handle->card_type == CARD_TYPE_SD8797) + handle->drv_mode.fw_name = DEFAULT_FW_NAME_8797; + else + handle->drv_mode.fw_name = DEFAULT_FW_NAME; #endif /* UAP_SUPPORT */ #endif /* UAP_SUPPORT && STA_SUPPORT */ } @@ -669,6 +953,171 @@ woal_update_drv_tbl(moal_handle * handle, int drv_mode_local) return ret; } +#ifdef CONFIG_OF +/** + * @brief This function read the initial parameter from device tress + * + * @param handle A pointer to moal_handle structure + * + * @return N/A + */ +static void +woal_init_from_dev_tree(void) +{ + struct device_node *dt_node = NULL; + struct property *prop; + t_u32 data; + const char *string_data; + + ENTER(); + + if (!dts_enable) { + PRINTM(MIOCTL, "DTS is disabled!"); + return; + } + + dt_node = of_find_node_by_name(NULL, "sd8xxx-wlan"); + if (!dt_node) { + LEAVE(); + return; + } + for_each_property_of_node(dt_node, prop) { + if (!strncmp(prop->name, "drv_mode", strlen("drv_mode"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(MIOCTL, "drv_mode=0x%x\n", data); + drv_mode = data; + } + } else if (!strncmp(prop->name, "drvdbg", strlen("drvdbg"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(MIOCTL, "drvdbg=0x%x\n", data); + drvdbg = data; + } + } else if (!strncmp + (prop->name, "dev_cap_mask", + strlen("dev_cap_mask"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(MIOCTL, "dev_cap_mask=0x%x\n", data); + dev_cap_mask = data; + } + } else if (!strncmp(prop->name, "hw_test", strlen("hw_test"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(MIOCTL, "hw_test=0x%x\n", data); + hw_test = data; + } + } +#ifdef MFG_CMD_SUPPORT + else if (!strncmp(prop->name, "mfg_mode", strlen("mfg_mode"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(MIOCTL, "mfg_mode=0x%x\n", data); + mfg_mode = data; + } + } +#endif + else if (!strncmp(prop->name, "mac_addr", strlen("mac_addr"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + mac_addr = (char *)string_data; + PRINTM(MIOCTL, "mac_addr=%s\n", mac_addr); + } + } else if (!strncmp(prop->name, "fw_name", strlen("fw_name"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + fw_name = (char *)string_data; + PRINTM(MIOCTL, "fw_name=%s\n", fw_name); + } + } +#if defined(STA_WEXT) || defined(UAP_WEXT) + else if (!strncmp + (prop->name, "cfg80211_wext", + strlen("cfg80211_wext"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(MIOCTL, "cfg80211_wext=0x%x\n", data); + cfg80211_wext = data; + } + } +#endif +#ifdef STA_SUPPORT + else if (!strncmp(prop->name, "sta_name", strlen("sta_name"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + sta_name = (char *)string_data; + PRINTM(MIOCTL, "sta_name=%s\n", sta_name); + } + } +#endif +#if defined(WIFI_DIRECT_SUPPORT) + else if (!strncmp(prop->name, "wfd_name", strlen("wfd_name"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + wfd_name = (char *)string_data; + PRINTM(MIOCTL, "wfd_name=%s\n", wfd_name); + } + } +#endif +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + else if (!strncmp + (prop->name, "reg_alpha2", strlen("reg_alpha2"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + reg_alpha2 = (char *)string_data; + PRINTM(MIOCTL, "reg_alpha2=%s\n", reg_alpha2); + } + } +#endif +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_CFG80211) && defined(UAP_CFG80211) + else if (!strncmp + (prop->name, "max_vir_bss", strlen("max_vir_bss"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(MIOCTL, "max_vir_bss=0x%x\n", data); + max_vir_bss = data; + } + } else if (!strncmp(prop->name, "p2p_enh", strlen("p2p_enh"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(MIOCTL, "p2p_enh=0x%x\n", data); + p2p_enh = data; + } + } else if (!strncmp + (prop->name, "cfg80211_drcs", + strlen("cfg80211_drcs"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(MIOCTL, "cfg80211_drcs=0x%x\n", data); + cfg80211_drcs = data; + } + } +#endif +#endif + else if (!strncmp(prop->name, "init_cfg", strlen("init_cfg"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + init_cfg = (char *)string_data; + PRINTM(MIOCTL, "init_cfg=%s\n", init_cfg); + } + } else if (!strncmp + (prop->name, "cal_data_cfg", + strlen("cal_data_cfg"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + cal_data_cfg = (char *)string_data; + PRINTM(MIOCTL, "cal_data_cfg=%s\n", + cal_data_cfg); + } + } else if (!strncmp + (prop->name, "txpwrlimit_cfg", + strlen("txpwrlimit_cfg"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + txpwrlimit_cfg = (char *)string_data; + PRINTM(MIOCTL, "txpwrlimit_cfg=%s\n", + txpwrlimit_cfg); + } + } + } + LEAVE(); + return; +} +#endif + /** * @brief This function initializes software * @@ -677,7 +1126,7 @@ woal_update_drv_tbl(moal_handle * handle, int drv_mode_local) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -woal_init_sw(moal_handle * handle) +woal_init_sw(moal_handle *handle) { mlan_status ret = MLAN_STATUS_SUCCESS; unsigned int i; @@ -716,6 +1165,19 @@ woal_init_sw(moal_handle * handle) cfg80211_wext |= STA_CFG80211_MASK | UAP_CFG80211_MASK; #endif + /* Update driver version */ + if (handle->card_type == CARD_TYPE_SD8787) + memcpy(driver_version, CARD_SD8787, strlen(CARD_SD8787)); + else if (handle->card_type == CARD_TYPE_SD8777) + memcpy(driver_version, CARD_SD8777, strlen(CARD_SD8777)); + else if (handle->card_type == CARD_TYPE_SD8887) + memcpy(driver_version, CARD_SD8887, strlen(CARD_SD8887)); + else if (handle->card_type == CARD_TYPE_SD8801) + memcpy(driver_version, CARD_SD8801, strlen(CARD_SD8801)); + else if (handle->card_type == CARD_TYPE_SD8897) + memcpy(driver_version, CARD_SD8897, strlen(CARD_SD8897)); + else if (handle->card_type == CARD_TYPE_SD8797) + memcpy(driver_version, CARD_SD8797, strlen(CARD_SD8797)); memcpy(handle->driver_version, driver_version, strlen(driver_version)); if (woal_update_drv_tbl(handle, drv_mode) != MLAN_STATUS_SUCCESS) { @@ -746,10 +1208,24 @@ woal_init_sw(moal_handle * handle) handle->cmd52_reg = 0; handle->cmd52_val = 0; #if defined(STA_CFG80211) || defined(UAP_CFG80211) + handle->scan_chan_gap = DEF_SCAN_CHAN_GAP; +#ifdef WIFI_DIRECT_SUPPORT + handle->miracast_scan_time = DEF_MIRACAST_SCAN_TIME; +#define DEF_NOA_DURATION 0 +#define DEF_NOA_INTERVAL 100 + handle->noa_duration = DEF_NOA_DURATION; + handle->noa_interval = DEF_NOA_INTERVAL; +#endif #endif init_waitqueue_head(&handle->hs_activate_wait_q); #endif + /* Initialize measurement wait queue */ + handle->meas_wait_q_woken = MFALSE; + handle->meas_start_jiffies = 0; + handle->cac_period = MFALSE; + handle->delay_bss_start = MFALSE; + init_waitqueue_head(&handle->meas_wait_q); #ifdef DFS_TESTING_SUPPORT handle->cac_period_jiffies = 0; #endif @@ -764,6 +1240,7 @@ woal_init_sw(moal_handle * handle) handle->is_reassoc_timer_set = MFALSE; #endif /* REASSOCIATION */ + #if defined(WIFI_DIRECT_SUPPORT) #if defined(STA_CFG80211) && defined(UAP_CFG80211) /* Initialize the timer for GO timeout */ @@ -783,20 +1260,36 @@ woal_init_sw(moal_handle * handle) /* Register to MLAN */ memset(&device, 0, sizeof(mlan_device)); device.pmoal_handle = handle; + device.card_type = handle->card_type; #ifdef MFG_CMD_SUPPORT - device.mfg_mode = (t_u32) mfg_mode; + device.mfg_mode = (t_u32)mfg_mode; #endif - device.int_mode = (t_u32) intmode; - device.gpio_pin = (t_u32) gpiopin; + device.int_mode = (t_u32)intmode; + device.gpio_pin = (t_u32)gpiopin; #ifdef DEBUG_LEVEL1 device.drvdbg = drvdbg; #endif - device.auto_ds = (t_u32) auto_ds; - device.ps_mode = (t_u32) ps_mode; - device.max_tx_buf = (t_u32) max_tx_buf; + device.auto_ds = (t_u32)auto_ds; + device.ps_mode = (t_u32)ps_mode; + device.max_tx_buf = (t_u32)max_tx_buf; #if defined(STA_SUPPORT) - device.cfg_11d = (t_u32) cfg_11d; + device.cfg_11d = (t_u32)cfg_11d; +#endif + if (handle->card_type == CARD_TYPE_SD8787 || + handle->card_type == CARD_TYPE_SD8777) + device.fw_crc_check = (t_u32)fw_crc_check; +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) + device.max_segs = + ((struct sdio_mmc_card *)handle->card)->func->card->host-> + max_segs; + device.max_seg_size = + ((struct sdio_mmc_card *)handle->card)->func->card->host-> + max_seg_size; +#endif + PRINTM(MMSG, "SDIO: max_segs=%d max_seg_size=%d\n", device.max_segs, + device.max_seg_size); #endif #ifdef SDIO_MULTI_PORT_TX_AGGR #ifdef MMC_QUIRK_BLKSZ_FOR_BYTE_MODE @@ -865,7 +1358,7 @@ woal_init_sw(moal_handle * handle) * @return N/A */ static void -woal_free_moal_handle(moal_handle * handle) +woal_free_moal_handle(moal_handle *handle) { ENTER(); if (!handle) { @@ -921,7 +1414,7 @@ woal_free_moal_handle(moal_handle * handle) * @return routnine status */ static t_size -parse_cfg_get_line(t_u8 * data, t_size size, t_u8 * line_pos) +parse_cfg_get_line(t_u8 *data, t_size size, t_u8 *line_pos) { t_u8 *src, *dest; static t_s32 pos; @@ -937,7 +1430,7 @@ parse_cfg_get_line(t_u8 * data, t_size size, t_u8 * line_pos) src = data + pos; dest = line_pos; - while (*src != '\x0A' && *src != '\0') { + while (pos < size && *src != '\x0A' && *src != '\0') { if (*src != ' ' && *src != '\t') /* parse space */ *dest++ = *src++; else @@ -959,8 +1452,8 @@ parse_cfg_get_line(t_u8 * data, t_size size, t_u8 * line_pos) * @return MLAN_STATUS_SUCCESS--success, otherwise--fail */ static t_u32 -woal_process_regrdwr(moal_handle * handle, t_u8 * type_string, - t_u8 * offset_string, t_u8 * value_string) +woal_process_regrdwr(moal_handle *handle, t_u8 *type_string, + t_u8 *offset_string, t_u8 *value_string) { mlan_status ret = MLAN_STATUS_FAILURE; int type, offset, value; @@ -987,7 +1480,7 @@ woal_process_regrdwr(moal_handle * handle, t_u8 * type_string, ioctl_req->req_id = MLAN_IOCTL_REG_MEM; ioctl_req->action = MLAN_ACT_SET; - reg = (mlan_ds_reg_mem *) ioctl_req->pbuf; + reg = (mlan_ds_reg_mem *)ioctl_req->pbuf; reg->sub_command = MLAN_OID_REG_RW; if (type < 5) { reg->param.reg_rw.type = type; @@ -1013,6 +1506,104 @@ woal_process_regrdwr(moal_handle * handle, t_u8 * type_string, return ret; } +/** + * @brief Read/Write registers value + * + * @param priv A pointer to moal_private structure + * @param action get / set action + * @param type type of register + * @param offset offset of register + * @param value value of registere + * + * @return 0 --success, otherwise fail + */ +static int +woal_getset_regrdwr(moal_private *priv, t_u32 action, t_u32 type, t_u32 offset, + t_u32 *value) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_reg_mem *reg_mem = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_reg_mem)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + reg_mem = (mlan_ds_reg_mem *)req->pbuf; + reg_mem->sub_command = MLAN_OID_REG_RW; + req->req_id = MLAN_IOCTL_REG_MEM; + req->action = action; + + reg_mem->param.reg_rw.type = type; + reg_mem->param.reg_rw.offset = offset; + if (req->action == MLAN_ACT_SET) + reg_mem->param.reg_rw.value = *value; + + status = woal_request_ioctl(priv, req, MOAL_CMD_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + *value = reg_mem->param.reg_rw.value; + PRINTM(MINFO, "woal_getset_regrdwr value=%x\n", *value); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief set slew rate mode + * + * @param handle MOAL handle + * @return MLAN_STATUS_SUCCESS--success, otherwise--fail + */ +static t_u32 +woal_set_sdio_slew_rate(moal_handle *handle) +{ + t_u32 value = 0; + mlan_status ret = MLAN_STATUS_SUCCESS; + moal_private *priv = NULL; + t_u32 new_value = 0; + + priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY); + if (!priv) + return MLAN_STATUS_FAILURE; + if (slew_rate > 3 || slew_rate < 0) + return MLAN_STATUS_FAILURE; + ret = woal_getset_regrdwr(priv, MLAN_ACT_GET, MLAN_REG_MAC, 0x8000231C, + &value); + if (ret < 0) { + PRINTM(MERROR, "woal_getset_regrdwr get REG_MAC failed\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + new_value = value & ~0xC000; + new_value |= (t_u32)slew_rate << 14; + /* Set 0x8000231C[15:14] = 0-3 */ + if (value != new_value) { + PRINTM(MMSG, "Set REG 0x8000231C: 0x%x slew_rate=%d\n", + new_value, slew_rate); + ret = woal_getset_regrdwr(priv, MLAN_ACT_SET, MLAN_REG_MAC, + 0x8000231C, &new_value); + if (ret < 0) { + PRINTM(MERROR, + "woal_getset_regrdwr get REG_MAC failed\n"); + ret = MLAN_STATUS_FAILURE; + } + } +done: + return ret; +} + /** * @brief WOAL parse ASCII format data to MAC address * @@ -1022,7 +1613,7 @@ woal_process_regrdwr(moal_handle * handle, t_u8 * type_string, * @return MLAN_STATUS_SUCCESS--success, otherwise--fail */ static t_u32 -woal_process_init_cfg(moal_handle * handle, t_u8 * data, t_size size) +woal_process_init_cfg(moal_handle *handle, t_u8 *data, t_size size) { mlan_status ret = MLAN_STATUS_FAILURE; t_u8 *pos; @@ -1196,7 +1787,7 @@ woal_process_init_cfg(moal_handle * handle, t_u8 * data, t_size size) * @return MLAN_STATUS_SUCCESS--success, otherwise--fail */ static t_u32 -woal_process_hostcmd_cfg(moal_handle * handle, t_u8 * data, t_size size) +woal_process_hostcmd_cfg(moal_handle *handle, t_u8 *data, t_size size) { mlan_status ret = MLAN_STATUS_SUCCESS; t_u8 *pos = data; @@ -1205,13 +1796,14 @@ woal_process_hostcmd_cfg(moal_handle * handle, t_u8 * data, t_size size) t_u8 *ptr = NULL; t_u32 cmd_len = 0; t_u8 start_raw = MFALSE; + gfp_t flag; #define CMD_STR "MRVL_CMDhostcmd" #define CMD_BUF_LEN 2048 ENTER(); - - buf = (t_u8 *) kzalloc(CMD_BUF_LEN, GFP_ATOMIC | GFP_KERNEL); + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + buf = kzalloc(CMD_BUF_LEN, flag); if (!buf) { PRINTM(MERROR, "Could not allocate buffer space!\n"); goto done; @@ -1235,8 +1827,8 @@ woal_process_hostcmd_cfg(moal_handle * handle, t_u8 * data, t_size size) if (*pos == '}') { cmd_len = - *((t_u16 *) (buf + strlen(CMD_STR) + - sizeof(t_u32) + sizeof(t_u16))); + *((t_u16 *)(buf + strlen(CMD_STR) + + sizeof(t_u32) + sizeof(t_u16))); memcpy(buf + strlen(CMD_STR), &cmd_len, sizeof(t_u32)); /* fire the hostcommand from here */ @@ -1288,38 +1880,96 @@ woal_process_hostcmd_cfg(moal_handle * handle, t_u8 * data, t_size size) #define INIT_HOSTCMD_CFG_DATA 0x02 #define COUNTRY_POWER_TABLE 0x04 -/** - * @brief WOAL set user defined init data and param - * - * @param handle MOAL handle structure - * @return MLAN_STATUS_SUCCESS--success, otherwise--fail - */ +#define NUM_USER_DATA_RETRIES 10 +/* Timeout for each retry, in milliseconds*/ +#define TIMEOUT_USER_DATA_RETRY 100 +static void +woal_do_request_firmware_callback(const struct firmware *firmware, void *context) +{ + moal_handle *handle = (moal_handle *)context; + handle->user_data = firmware; + MOAL_REL_SEMAPHORE(&LoadUserDataSem); + return; +} + static t_u32 -woal_set_user_init_data(moal_handle * handle, int type) +woal_do_request_firmware(moal_handle *handle, char *name) { mlan_status ret = MLAN_STATUS_FAILURE; - t_u8 *cfg_data = NULL; - t_size len; + int err; + int numretry = 0; + if (req_fw_nowait) { + while (numretry < NUM_USER_DATA_RETRIES) { + numretry++; + err = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, + name, + handle->hotplug_device, + GFP_KERNEL, handle, + woal_do_request_firmware_callback); + if (err < 0) + { + PRINTM(MERROR,"woal_do_request_firmware Read Error\n",name); + break; + } - ENTER(); + if (MOAL_ACQ_SEMAPHORE_BLOCK(&LoadUserDataSem)) { + PRINTM(MERROR, + "Acquire semaphore error, woal_do_request_firmware \n"); + break; + } + + if (handle->user_data) { + ret = MLAN_STATUS_SUCCESS; + break; + } + PRINTM(MERROR,"woal_do_request_firmware Async read failed, retrying..\n"); + woal_sched_timeout(TIMEOUT_USER_DATA_RETRY); + } + } + else { + if ((request_firmware + (&handle->user_data, name, + handle->hotplug_device)) < 0) { + PRINTM(MERROR, + "request_firmware(%s) failed\n",name); + return ret; + } + ret = MLAN_STATUS_SUCCESS; + } + return ret; +} + +/** + * @brief WOAL set user defined init data and param + * + * @param handle MOAL handle structure + * @return MLAN_STATUS_SUCCESS--success, otherwise--fail + */ +static t_u32 +woal_set_user_init_data(moal_handle *handle, int type) +{ + mlan_status ret = MLAN_STATUS_FAILURE; + t_u8 *cfg_data = NULL; + t_size len; + + ENTER(); +MOAL_ACQ_SEMAPHORE_BLOCK(&LoadUserDataMtx); + if (type == INIT_CFG_DATA) { + if (MLAN_STATUS_SUCCESS != woal_do_request_firmware(handle, init_cfg)) { - if (type == INIT_CFG_DATA) { - if ((request_firmware - (&handle->user_data, init_cfg, - handle->hotplug_device)) < 0) { PRINTM(MERROR, "Init config file request_firmware() failed\n"); goto done; } } else if (type == TXPWRLIMIT_CFG_DATA) { - if ((request_firmware - (&handle->user_data, txpwrlimit_cfg, - handle->hotplug_device)) < 0) { + PRINTM(MERROR,"%s:%d TXPWRLIMIT_CFG_DATA: name:%s\n",__FUNCTION__,__LINE__,txpwrlimit_cfg); + if (MLAN_STATUS_SUCCESS != woal_do_request_firmware(handle, txpwrlimit_cfg)) { PRINTM(MERROR, "Init config file request_firmware() failed\n"); goto done; } } else if (type == COUNTRY_POWER_TABLE) { + PRINTM(MERROR,"%s:%d COUNTRY_POWER_TABLE: name:%s\n",__FUNCTION__,__LINE__,txpwrlimit_cfg); int status = request_firmware(&handle->user_data, txpwrlimit_cfg, handle->hotplug_device); @@ -1327,16 +1977,16 @@ woal_set_user_init_data(moal_handle * handle, int type) if (status == -ENOENT) { PRINTM(MIOCTL, "Country power table file does not exist\n"); - ret = MLAN_STATUS_SUCCESS; + PRINTM(MERROR, + "Country power table file does not exist\n"); + ret = MLAN_STATUS_FAILURE; } else if (status) { PRINTM(MERROR, "Init config file request_firmware() failed\n"); goto done; } } else if (type == INIT_HOSTCMD_CFG_DATA) { - if ((request_firmware - (&handle->user_data, init_hostcmd_cfg, - handle->hotplug_device)) < 0) { + if (MLAN_STATUS_SUCCESS != woal_do_request_firmware(handle, init_hostcmd_cfg)) { PRINTM(MERROR, "Init config file request_firmware() failed\n"); goto done; @@ -1344,7 +1994,7 @@ woal_set_user_init_data(moal_handle * handle, int type) } if (handle->user_data) { - cfg_data = (t_u8 *) (handle->user_data)->data; + cfg_data = (t_u8 *)(handle->user_data)->data; len = (handle->user_data)->size; if (type == INIT_CFG_DATA) { if (MLAN_STATUS_SUCCESS != @@ -1356,6 +2006,7 @@ woal_set_user_init_data(moal_handle * handle, int type) } else if (type == TXPWRLIMIT_CFG_DATA || type == INIT_HOSTCMD_CFG_DATA || type == COUNTRY_POWER_TABLE) { + PRINTM(MERROR,"%s:%d data length = %d\n",__FUNCTION__,__LINE__,len); if (MLAN_STATUS_SUCCESS != woal_process_hostcmd_cfg(handle, cfg_data, len)) { PRINTM(MERROR, @@ -1372,6 +2023,7 @@ woal_set_user_init_data(moal_handle * handle, int type) handle->user_data = NULL; } + MOAL_REL_SEMAPHORE(&LoadUserDataMtx); LEAVE(); return ret; } @@ -1384,7 +2036,7 @@ woal_set_user_init_data(moal_handle * handle, int type) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -woal_add_card_dpc(moal_handle * handle) +woal_add_card_dpc(moal_handle *handle) { mlan_status ret = MLAN_STATUS_SUCCESS; int i; @@ -1407,6 +2059,7 @@ woal_add_card_dpc(moal_handle * handle) goto err; } } + register_inetaddr_notifier(&woal_notifier); if (init_cfg) { if (MLAN_STATUS_SUCCESS != woal_set_user_init_data(handle, INIT_CFG_DATA)) { @@ -1434,14 +2087,20 @@ woal_add_card_dpc(moal_handle * handle) } } /* Add low power mode check */ - if (low_power_mode_enable && - woal_set_low_pwr_mode(handle, MOAL_IOCTL_WAIT)) { + if ((handle->card_type == CARD_TYPE_SD8801 || + handle->card_type == CARD_TYPE_SD8887) && low_power_mode_enable && + woal_set_low_pwr_mode(handle, MOAL_CMD_WAIT)) { /* Proceed with Warning */ PRINTM(MERROR, "Unable to set Low Power Mode\n"); } + + if (handle->card_type == CARD_TYPE_SD8801) + woal_set_sdio_slew_rate(handle); + err: if (ret != MLAN_STATUS_SUCCESS) { PRINTM(MERROR, "Failed to add interface\n"); + unregister_inetaddr_notifier(&woal_notifier); for (i = 0; i < handle->priv_num; i++) woal_remove_interface(handle, i); handle->priv_num = 0; @@ -1462,7 +2121,7 @@ woal_add_card_dpc(moal_handle * handle) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -woal_init_fw_dpc(moal_handle * handle) +woal_init_fw_dpc(moal_handle *handle) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_fw_image fw; @@ -1473,7 +2132,7 @@ woal_init_fw_dpc(moal_handle * handle) if (handle->firmware) { memset(&fw, 0, sizeof(mlan_fw_image)); - fw.pfw_buf = (t_u8 *) handle->firmware->data; + fw.pfw_buf = (t_u8 *)handle->firmware->data; fw.fw_len = handle->firmware->size; #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func); @@ -1493,6 +2152,7 @@ woal_init_fw_dpc(moal_handle * handle) /** Cal data request */ memset(¶m, 0, sizeof(mlan_init_param)); if (cal_data_cfg) { + PRINTM(MERROR, " cal_data_cfg set to: %s\n",cal_data_cfg); if ((request_firmware (&handle->user_data, cal_data_cfg, handle->hotplug_device)) < 0) { @@ -1503,14 +2163,13 @@ woal_init_fw_dpc(moal_handle * handle) } if (handle->user_data) { - param.pcal_data_buf = (t_u8 *) handle->user_data->data; + param.pcal_data_buf = (t_u8 *)handle->user_data->data; param.cal_data_len = handle->user_data->size; } handle->hardware_status = HardwareStatusFwReady; if (ret != MLAN_STATUS_SUCCESS) goto done; - handle->init_wait_q_woken = MFALSE; ret = mlan_set_init_param(handle->pmlan_adapter, ¶m); @@ -1534,6 +2193,10 @@ woal_init_fw_dpc(moal_handle * handle) woal_moal_debug_info(woal_get_priv(handle, MLAN_BSS_ROLE_ANY), handle, MTRUE); #if defined(DEBUG_LEVEL1) + if (drvdbg & MFW_D) { + drvdbg &= ~MFW_D; + woal_dump_firmware_info(handle); + } #endif ret = MLAN_STATUS_FAILURE; goto done; @@ -1557,7 +2220,7 @@ woal_init_fw_dpc(moal_handle * handle) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -woal_request_fw_dpc(moal_handle * handle, const struct firmware *firmware) +woal_request_fw_dpc(moal_handle *handle, const struct firmware *firmware) { mlan_status ret = MLAN_STATUS_SUCCESS; struct timeval tstamp; @@ -1610,15 +2273,58 @@ static void woal_request_fw_callback(const struct firmware *firmware, void *context) { ENTER(); - woal_request_fw_dpc((moal_handle *) context, firmware); + woal_request_fw_dpc((moal_handle *)context, firmware); #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) if (firmware) + { release_firmware(firmware); + } #endif LEAVE(); return; } +#define SD8887_REV_REG 0xc8 +#define SD8887_A0 0x0 +#define SD8887_A2 0x2 +/** + * @brief Get FW name for differnt chip revision + * + * @param handle A pointer to moal_handle structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +void +woal_check_fw_name(moal_handle *handle) +{ + t_u32 rev_id_reg = 0; + t_u32 revision_id = 0; + + if (handle->card_type == CARD_TYPE_SD8887) + rev_id_reg = SD8887_REV_REG; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) + sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + woal_read_reg(handle, rev_id_reg, &revision_id); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) + sdio_release_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + /* Check revision ID */ + if (handle->card_type == CARD_TYPE_SD8887) { + switch (revision_id) { + case SD8887_A0: + handle->drv_mode.fw_name = SD8887_A0_FW_NAME; + break; + case SD8887_A2: + handle->drv_mode.fw_name = SD8887_A2_FW_NAME; + break; + default: + break; + } + } + return; +} + /** * @brief Download firmware using helper * @@ -1627,13 +2333,16 @@ woal_request_fw_callback(const struct firmware *firmware, void *context) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -woal_request_fw(moal_handle * handle) +woal_request_fw(moal_handle *handle) { mlan_status ret = MLAN_STATUS_SUCCESS; int err; ENTER(); + if (!fw_name && handle->card_type == CARD_TYPE_SD8887) + woal_check_fw_name(handle); + if (req_fw_nowait) { #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) err = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, @@ -1687,7 +2396,7 @@ woal_request_fw(moal_handle * handle) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -woal_init_fw(moal_handle * handle) +woal_init_fw(moal_handle *handle) { mlan_status ret = MLAN_STATUS_SUCCESS; @@ -1716,39 +2425,47 @@ woal_init_fw(moal_handle * handle) * @return N/A */ static void -woal_fill_mlan_buffer(moal_private * priv, - mlan_buffer * pmbuf, struct sk_buff *skb) +woal_fill_mlan_buffer(moal_private *priv, + mlan_buffer *pmbuf, struct sk_buff *skb) { struct timeval tstamp; struct ethhdr *eth; t_u8 tid; ENTER(); - - eth = (struct ethhdr *)skb->data; - - switch (eth->h_proto) { - - case __constant_htons(ETH_P_IP): - tid = (IPTOS_PREC(SKB_TOS(skb)) >> IPTOS_OFFSET); - PRINTM(MDAT_D, "packet type ETH_P_IP: %04x, tid=%#x prio=%#x\n", - eth->h_proto, tid, skb->priority); - break; - case __constant_htons(ETH_P_IPV6): - tid = SKB_TIDV6(skb); - PRINTM(MDAT_D, - "packet type ETH_P_IPV6: %04x, tid=%#x prio=%#x\n", - eth->h_proto, tid, skb->priority); - break; - case __constant_htons(ETH_P_ARP): - PRINTM(MDATA, "ARP packet %04x\n", eth->h_proto); - tid = 0; - break; - default: - tid = 0; - break; + /* + * skb->priority values from 256->263 are magic values to + * directly indicate a specific 802.1d priority. This is used + * to allow 802.1d priority to be passed directly in from VLAN + * tags, etc. + */ + if (IS_SKB_MAGIC_VLAN(skb)) { + tid = GET_VLAN_PRIO(skb); + } else { + eth = (struct ethhdr *)skb->data; + + switch (eth->h_proto) { + case __constant_htons(ETH_P_IP): + tid = (IPTOS_PREC(SKB_TOS(skb)) >> IPTOS_OFFSET); + PRINTM(MDAT_D, + "packet type ETH_P_IP: %04x, tid=%#x prio=%#x\n", + eth->h_proto, tid, skb->priority); + break; + case __constant_htons(ETH_P_IPV6): + tid = SKB_TIDV6(skb); + PRINTM(MDAT_D, + "packet type ETH_P_IPV6: %04x, tid=%#x prio=%#x\n", + eth->h_proto, tid, skb->priority); + break; + case __constant_htons(ETH_P_ARP): + PRINTM(MDATA, "ARP packet %04x\n", eth->h_proto); + tid = 0; + break; + default: + tid = 0; + break; + } } - skb->priority = tid; /* Record the current time the packet was queued; used to determine the @@ -1771,8 +2488,8 @@ woal_fill_mlan_buffer(moal_private * priv, pmbuf->data_len = skb->len; pmbuf->priority = skb->priority; pmbuf->buf_type = 0; - pmbuf->in_ts_sec = (t_u32) tstamp.tv_sec; - pmbuf->in_ts_usec = (t_u32) tstamp.tv_usec; + pmbuf->in_ts_sec = (t_u32)tstamp.tv_sec; + pmbuf->in_ts_usec = (t_u32)tstamp.tv_usec; LEAVE(); return; @@ -1812,7 +2529,7 @@ const struct net_device_ops woal_netdev_ops = { * @return MLAN_STATUS_SUCCESS */ mlan_status -woal_init_sta_dev(struct net_device *dev, moal_private * priv) +woal_init_sta_dev(struct net_device *dev, moal_private *priv) { ENTER(); @@ -1853,7 +2570,6 @@ woal_init_sta_dev(struct net_device *dev, moal_private * priv) if (IS_STA_WEXT(cfg80211_wext)) init_waitqueue_head(&priv->w_stats_wait_q); #endif - LEAVE(); return MLAN_STATUS_SUCCESS; } @@ -1889,7 +2605,7 @@ const struct net_device_ops woal_uap_netdev_ops = { * @return MLAN_STATUS_SUCCESS */ mlan_status -woal_init_uap_dev(struct net_device *dev, moal_private * priv) +woal_init_uap_dev(struct net_device *dev, moal_private *priv) { mlan_status status = MLAN_STATUS_SUCCESS; @@ -1949,11 +2665,12 @@ woal_init_uap_dev(struct net_device *dev, moal_private * priv) * @return A pointer to the new priv structure */ moal_private * -woal_add_interface(moal_handle * handle, t_u8 bss_index, t_u8 bss_type) +woal_add_interface(moal_handle *handle, t_u8 bss_index, t_u8 bss_type) { struct net_device *dev = NULL; moal_private *priv = NULL; char name[256]; + int i = 0; ENTER(); @@ -2003,7 +2720,7 @@ woal_add_interface(moal_handle * handle, t_u8 bss_index, t_u8 bss_type) goto error; } #endif - priv = (moal_private *) netdev_priv(dev); + priv = (moal_private *)netdev_priv(dev); /* Save the priv to handle */ handle->priv[bss_index] = priv; @@ -2024,6 +2741,18 @@ woal_add_interface(moal_handle * handle, t_u8 bss_index, t_u8 bss_type) INIT_LIST_HEAD(&priv->tcp_sess_queue); spin_lock_init(&priv->tcp_sess_lock); +#ifdef STA_SUPPORT + INIT_LIST_HEAD(&priv->tdls_list); + spin_lock_init(&priv->tdls_lock); +#endif + + spin_lock_init(&priv->tx_stat_lock); +#ifdef STA_CFG80211 +#ifdef STA_SUPPORT + spin_lock_init(&priv->scan_req_lock); + spin_lock_init(&priv->connect_lock); +#endif +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) SET_MODULE_OWNER(dev); @@ -2069,8 +2798,6 @@ woal_add_interface(moal_handle * handle, t_u8 bss_index, t_u8 bss_type) "Cannot register STA with cfg80211\n"); goto error; } - spin_lock_init(&priv->scan_req_lock); - spin_lock_init(&priv->connect_lock); } #endif /* STA_SUPPORT */ #endif /* STA_CFG80211 */ @@ -2129,6 +2856,14 @@ woal_add_interface(moal_handle * handle, t_u8 bss_index, t_u8 bss_type) } memcpy(dev->dev_addr, priv->current_addr, ETH_ALEN); } + if (bss_type == MLAN_BSS_TYPE_STA || + priv->bss_type == MLAN_BSS_TYPE_UAP) { + for(i = 0; i < handle->histogram_table_num; i++) + priv->hist_data[i] = + kmalloc(sizeof(hgm_data), GFP_KERNEL); + if (priv->hist_data) + woal_hist_data_reset(priv); + } #ifdef CONFIG_PROC_FS woal_create_proc_entry(priv); #ifdef PROC_DEBUG @@ -2164,13 +2899,14 @@ woal_add_interface(moal_handle * handle, t_u8 bss_index, t_u8 bss_type) * @return N/A */ void -woal_remove_interface(moal_handle * handle, t_u8 bss_index) +woal_remove_interface(moal_handle *handle, t_u8 bss_index) { struct net_device *dev = NULL; moal_private *priv = handle->priv[bss_index]; #if defined(STA_WEXT) || defined(UAP_WEXT) union iwreq_data wrqu; #endif + int i = 0; ENTER(); if (!priv || !priv->netdev) @@ -2190,7 +2926,15 @@ woal_remove_interface(moal_handle * handle, t_u8 bss_index) #endif } woal_flush_tcp_sess_queue(priv); - + if (priv->bss_type == MLAN_BSS_TYPE_STA) + woal_flush_tdls_list(priv); + if (priv->bss_type == MLAN_BSS_TYPE_STA || + priv->bss_type == MLAN_BSS_TYPE_UAP) { + for(i = 0; i < handle->histogram_table_num; i++){ + kfree(priv->hist_data[i]); + priv->hist_data[i] = NULL; + } + } #ifdef CONFIG_PROC_FS #ifdef PROC_DEBUG /* Remove proc debug */ @@ -2236,7 +2980,7 @@ woal_remove_interface(moal_handle * handle, t_u8 bss_index) * otherwise fail */ mlan_status -woal_set_low_pwr_mode(moal_handle * handle, t_u8 wait_option) +woal_set_low_pwr_mode(moal_handle *handle, t_u8 wait_option) { moal_private *priv = NULL; mlan_ioctl_req *req = NULL; @@ -2256,7 +3000,7 @@ woal_set_low_pwr_mode(moal_handle * handle, t_u8 wait_option) } /* Fill request buffer */ - misc = (mlan_ds_misc_cfg *) req->pbuf; + misc = (mlan_ds_misc_cfg *)req->pbuf; misc->sub_command = MLAN_OID_MISC_LOW_PWR_MODE; misc->param.low_pwr_mode = low_power_mode_enable; req->req_id = MLAN_IOCTL_MISC_CFG; @@ -2280,7 +3024,7 @@ woal_set_low_pwr_mode(moal_handle * handle, t_u8 wait_option) * otherwise fail */ static mlan_status -woal_shutdown_fw(moal_private * priv, t_u8 wait_option) +woal_shutdown_fw(moal_private *priv, t_u8 wait_option) { mlan_ioctl_req *req = NULL; mlan_ds_misc_cfg *misc = NULL; @@ -2297,7 +3041,7 @@ woal_shutdown_fw(moal_private * priv, t_u8 wait_option) } /* Fill request buffer */ - misc = (mlan_ds_misc_cfg *) req->pbuf; + misc = (mlan_ds_misc_cfg *)req->pbuf; misc->sub_command = MLAN_OID_MISC_INIT_SHUTDOWN; misc->param.func_init_shutdown = MLAN_FUNC_SHUTDOWN; req->req_id = MLAN_IOCTL_MISC_CFG; @@ -2346,7 +3090,7 @@ woal_hexval(char chr) * @return N/A */ static void -woal_terminate_workqueue(moal_handle * handle) +woal_terminate_workqueue(moal_handle *handle) { ENTER(); @@ -2378,11 +3122,18 @@ woal_terminate_workqueue(moal_handle * handle) int woal_open(struct net_device *dev) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); t_u8 carrier_on = MFALSE; ENTER(); + if (priv->phandle->surprise_removed == MTRUE) { + PRINTM(MERROR, + "open is not allowed in surprise remove state.\n"); + LEAVE(); + return -EFAULT; + } + if (!MODULE_GET) { LEAVE(); return -EFAULT; @@ -2434,15 +3185,46 @@ woal_open(struct net_device *dev) int woal_close(struct net_device *dev) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); #if defined(STA_SUPPORT) && defined(STA_CFG80211) unsigned long flags; #endif + /** report previous tx status */ +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + unsigned long flag; +#endif ENTER(); + /** report previous tx status */ +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + spin_lock_irqsave(&priv->tx_stat_lock, flag); + if (priv->last_tx_buf && priv->last_tx_cookie) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + cfg80211_mgmt_tx_status(dev, priv->last_tx_cookie, + priv->last_tx_buf, + priv->last_tx_buf_len, true, + GFP_ATOMIC); +#else + cfg80211_mgmt_tx_status(priv->wdev, priv->last_tx_cookie, + priv->last_tx_buf, + priv->last_tx_buf_len, true, + GFP_ATOMIC); +#endif +#endif + kfree(priv->last_tx_buf); + priv->last_tx_buf = NULL; + priv->last_tx_cookie = 0; + } + spin_unlock_irqrestore(&priv->tx_stat_lock, flag); +#endif + #ifdef STA_SUPPORT #ifdef STA_CFG80211 + if (IS_STA_CFG80211(cfg80211_wext) && + (priv->bss_type == MLAN_BSS_TYPE_STA)) + woal_clear_conn_params(priv); spin_lock_irqsave(&priv->scan_req_lock, flags); if (IS_STA_CFG80211(cfg80211_wext) && priv->scan_request) { cfg80211_scan_done(priv->scan_request, MTRUE); @@ -2497,18 +3279,25 @@ int woal_set_mac_address(struct net_device *dev, void *addr) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); struct sockaddr *phw_addr = (struct sockaddr *)addr; t_u8 prev_addr[ETH_ALEN]; ENTER(); + if (priv->phandle->surprise_removed == MTRUE) { + PRINTM(MERROR, + "Set mac address is not allowed in surprise remove state.\n"); + LEAVE(); + return -EFAULT; + } + memcpy(prev_addr, priv->current_addr, ETH_ALEN); memset(priv->current_addr, 0, ETH_ALEN); /* dev->dev_addr is 6 bytes */ HEXDUMP("dev->dev_addr:", dev->dev_addr, ETH_ALEN); - HEXDUMP("addr:", (t_u8 *) phw_addr->sa_data, ETH_ALEN); + HEXDUMP("addr:", (t_u8 *)phw_addr->sa_data, ETH_ALEN); memcpy(priv->current_addr, phw_addr->sa_data, ETH_ALEN); #if defined(WIFI_DIRECT_SUPPORT) #if defined(STA_CFG80211) && defined(UAP_CFG80211) @@ -2543,7 +3332,7 @@ woal_set_mac_address(struct net_device *dev, void *addr) * @return MTRUE/MFALSE */ t_u8 -woal_check_driver_status(moal_handle * handle) +woal_check_driver_status(moal_handle *handle) { moal_private *priv = NULL; struct timeval t; @@ -2574,6 +3363,12 @@ woal_check_driver_status(moal_handle * handle) LEAVE(); return MTRUE; } + if (info.num_cmd_host_to_card_failure) { + PRINTM(MERROR, "num_cmd_host_to_card_failure = %d\n", + info.num_cmd_host_to_card_failure); + LEAVE(); + return MTRUE; + } if (info.num_no_cmd_node) { PRINTM(MERROR, "num_no_cmd_node = %d\n", info.num_no_cmd_node); LEAVE(); @@ -2613,11 +3408,12 @@ woal_check_driver_status(moal_handle * handle) * @return N/A */ void -woal_mlan_debug_info(moal_private * priv) +woal_mlan_debug_info(moal_private *priv) { int i; #ifdef SDIO_MULTI_PORT_TX_AGGR int j; + t_u8 mp_aggr_pkt_limit = 0; #endif char str[512] = { 0 }; char *s; @@ -2634,9 +3430,11 @@ woal_mlan_debug_info(moal_private * priv) PRINTM(MERROR, "mlan_processing =%d\n", info.mlan_processing); PRINTM(MERROR, "mlan_rx_processing =%d\n", info.mlan_rx_processing); PRINTM(MERROR, "rx_pkts_queued=%d\n", info.rx_pkts_queued); + PRINTM(MERROR, "tx_pkts_queued=%d\n", info.tx_pkts_queued); PRINTM(MERROR, "num_cmd_timeout = %d\n", info.num_cmd_timeout); - PRINTM(MERROR, "Timeout cmd id = 0x%x, act = 0x%x \n", + PRINTM(MERROR, "dbg.num_cmd_timeout = %d\n", info.dbg_num_cmd_timeout); + PRINTM(MERROR, "Timeout cmd id = 0x%x, act = 0x%x\n", info.timeout_cmd_id, info.timeout_cmd_act); PRINTM(MERROR, "last_cmd_index = %d\n", info.last_cmd_index); @@ -2700,26 +3498,62 @@ woal_mlan_debug_info(moal_private * priv) (unsigned int)info.mp_rd_bitmap, info.curr_rd_port); PRINTM(MERROR, "mp_wr_bitmap=0x%x curr_wr_port=0x%x\n", (unsigned int)info.mp_wr_bitmap, info.curr_wr_port); + PRINTM(MERROR, "mp_invalid_update=%d\n", info.mp_invalid_update); #ifdef SDIO_MULTI_PORT_TX_AGGR + mp_aggr_pkt_limit = info.mp_aggr_pkt_limit; PRINTM(MERROR, "last_recv_wr_bitmap=0x%x last_mp_index = %d\n", info.last_recv_wr_bitmap, info.last_mp_index); for (i = 0; i < SDIO_MP_DBG_NUM; i++) { - for (s = str, j = 0; j < SDIO_MP_AGGR_DEF_PKT_LIMIT; j++) { + for (s = str, j = 0; j < mp_aggr_pkt_limit; j++) s += sprintf(s, "0x%02x ", info.last_mp_wr_info[i * - SDIO_MP_AGGR_DEF_PKT_LIMIT - + j]); - } + mp_aggr_pkt_limit + + j]); + PRINTM(MERROR, "mp_wr_bitmap: 0x%x mp_wr_ports=0x%x len=%d curr_wr_port=0x%x\n%s\n", info.last_mp_wr_bitmap[i], info.last_mp_wr_ports[i], info.last_mp_wr_len[i], info.last_curr_wr_port[i], str); } #endif + for (i = 0; i < info.ralist_num; i++) { + PRINTM(MERROR, + "ralist ra: %02x:%02x:%02x:%02x:%02x:%02x tid=%d pkts=%d pause=%d\n", + info.ralist[i].ra[0], info.ralist[i].ra[1], + info.ralist[i].ra[2], info.ralist[i].ra[3], + info.ralist[i].ra[4], info.ralist[i].ra[5], + info.ralist[i].tid, info.ralist[i].total_pkts, + info.ralist[i].tx_pause); + } + PRINTM(MERROR, "------------mlan_debug_info End-------------\n"); LEAVE(); } +/** + * @brief This function handle the shutdown timeout issue + * + * @param handle Pointer to structure moal_handle + * + * @return N/A + */ +void +woal_ioctl_timeout(moal_handle *handle) +{ + moal_private *priv = NULL; + + ENTER(); + + PRINTM(MMSG, "woal_ioctl_timout.\n"); + priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY); + if (priv) { + woal_mlan_debug_info(priv); + woal_moal_debug_info(priv, NULL, MFALSE); + } + LEAVE(); + return; +} + /** * @brief This function handles the timeout of packet * transmission @@ -2731,7 +3565,7 @@ woal_mlan_debug_info(moal_private * priv) void woal_tx_timeout(struct net_device *dev) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); ENTER(); @@ -2743,6 +3577,14 @@ woal_tx_timeout(struct net_device *dev) if (priv->num_tx_timeout == NUM_TX_TIMEOUT_THRESHOLD) { woal_mlan_debug_info(priv); woal_moal_debug_info(priv, NULL, MFALSE); + woal_broadcast_event(priv, CUS_EVT_DRIVER_HANG, + strlen(CUS_EVT_DRIVER_HANG)); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) + woal_cfg80211_vendor_event(priv, event_hang, + CUS_EVT_DRIVER_HANG, + strlen(CUS_EVT_DRIVER_HANG)); +#endif + woal_process_hang(priv->phandle); } LEAVE(); @@ -2758,7 +3600,7 @@ woal_tx_timeout(struct net_device *dev) struct net_device_stats * woal_get_stats(struct net_device *dev) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); return &priv->stats; } @@ -2772,27 +3614,45 @@ woal_get_stats(struct net_device *dev) * @return tx_queue index (0-3) */ u16 -woal_select_queue(struct net_device * dev, struct sk_buff * skb) +woal_select_queue(struct net_device *dev, struct sk_buff *skb +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0) + , void *accel_priv +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) + , select_queue_fallback_t fallback +#endif +#endif + ) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); struct ethhdr *eth = NULL; t_u8 tid = 0; t_u8 index = 0; ENTER(); - eth = (struct ethhdr *)skb->data; - switch (eth->h_proto) { - case __constant_htons(ETH_P_IP): - tid = (IPTOS_PREC(SKB_TOS(skb)) >> IPTOS_OFFSET); - break; - case __constant_htons(ETH_P_IPV6): - tid = SKB_TIDV6(skb); - break; - case __constant_htons(ETH_P_ARP): - default: - break; + /* + * skb->priority values from 256->263 are magic values to + * directly indicate a specific 802.1d priority. This is used + * to allow 802.1d priority to be passed directly in from VLAN + * tags, etc. + */ + if (IS_SKB_MAGIC_VLAN(skb)) { + tid = GET_VLAN_PRIO(skb); + } else { + eth = (struct ethhdr *)skb->data; + switch (eth->h_proto) { + case __constant_htons(ETH_P_IP): + tid = (IPTOS_PREC(SKB_TOS(skb)) >> IPTOS_OFFSET); + break; + case __constant_htons(ETH_P_IPV6): + tid = SKB_TIDV6(skb); + break; + case __constant_htons(ETH_P_ARP): + default: + break; + } } + index = mlan_select_wmm_queue(priv->phandle->pmlan_adapter, priv->bss_index, tid); PRINTM(MDATA, "select queue: tid=%d, index=%d\n", tid, index); @@ -2809,7 +3669,79 @@ woal_select_queue(struct net_device * dev, struct sk_buff * skb) * @return N/A */ void -woal_flush_tcp_sess_queue(moal_private * priv) +woal_flush_tdls_list(moal_private *priv) +{ + struct tdls_peer *peer = NULL, *tmp_node; + unsigned long flags; + spin_lock_irqsave(&priv->tdls_lock, flags); + list_for_each_entry_safe(peer, tmp_node, &priv->tdls_list, link) { + list_del(&peer->link); + kfree(peer); + } + INIT_LIST_HEAD(&priv->tdls_list); + spin_unlock_irqrestore(&priv->tdls_lock, flags); + priv->tdls_check_tx = MFALSE; +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) +/** + * @brief check the tx packet for tdls auto set up + * + * @param priv A pointer to moal_private structure + * @param skb A pointer to skb buffer. + * + * @return N/A + */ +void +woal_tdls_check_tx(moal_private *priv, struct sk_buff *skb) +{ + struct tdls_peer *peer = NULL; + unsigned long flags; + t_u8 ra[MLAN_MAC_ADDR_LENGTH]; + ENTER(); + memcpy(ra, skb->data, MLAN_MAC_ADDR_LENGTH); + spin_lock_irqsave(&priv->tdls_lock, flags); + list_for_each_entry(peer, &priv->tdls_list, link) { + if (!memcmp(peer->peer_addr, ra, ETH_ALEN)) { + if (peer->rssi && + (peer->rssi <= TDLS_RSSI_HIGH_THRESHOLD)) { + if ((peer->link_status == TDLS_NOT_SETUP) && + (peer->num_failure < + TDLS_MAX_FAILURE_COUNT)) { + peer->link_status = + TDLS_SETUP_INPROGRESS; + PRINTM(MMSG, + "Wlan: Set up TDLS link,peer=" + MACSTR " rssi=%d\n", + MAC2STR(peer->peer_addr), + -peer->rssi); + cfg80211_tdls_oper_request(priv->netdev, + peer-> + peer_addr, + NL80211_TDLS_SETUP, + 0, + GFP_ATOMIC); + priv->tdls_check_tx = MFALSE; + } + + } + break; + } + } + spin_unlock_irqrestore(&priv->tdls_lock, flags); + LEAVE(); +} +#endif + +/** + * @brief This function flush tcp session queue + * + * @param priv A pointer to moal_private structure + * + * @return N/A + */ +void +woal_flush_tcp_sess_queue(moal_private *priv) { struct tcp_sess *tcp_sess = NULL, *tmp_node; unsigned long flags; @@ -2838,7 +3770,7 @@ woal_flush_tcp_sess_queue(moal_private * priv) * Otherwise, null */ static inline struct tcp_sess * -woal_get_tcp_sess(moal_private * priv, +woal_get_tcp_sess(moal_private *priv, t_u32 src_ip, t_u16 src_port, t_u32 dst_ip, t_u16 dst_port) { struct tcp_sess *tcp_sess = NULL; @@ -2866,7 +3798,7 @@ woal_get_tcp_sess(moal_private * priv, * @return N/A */ void -woal_tcp_ack_tx_indication(moal_private * priv, mlan_buffer * pmbuf) +woal_tcp_ack_tx_indication(moal_private *priv, mlan_buffer *pmbuf) { struct tcp_sess *tcp_sess = NULL, *tmp = NULL; unsigned long flags; @@ -2895,7 +3827,7 @@ woal_tcp_ack_tx_indication(moal_private * priv, mlan_buffer * pmbuf) * @return 1, if it's dropped; 0, if not dropped */ int -woal_process_tcp_ack(moal_private * priv, mlan_buffer * pmbuf) +woal_process_tcp_ack(moal_private *priv, mlan_buffer *pmbuf) { int ret = 0; unsigned long flags; @@ -2914,14 +3846,14 @@ woal_process_tcp_ack(moal_private * priv, mlan_buffer * pmbuf) LEAVE(); return 0; } - iph = (struct iphdr *)((t_u8 *) ethh + sizeof(struct ethhdr)); + iph = (struct iphdr *)((t_u8 *)ethh + sizeof(struct ethhdr)); if (iph->protocol != IPPROTO_TCP) { LEAVE(); return 0; } - tcph = (struct tcphdr *)((t_u8 *) iph + iph->ihl * 4); + tcph = (struct tcphdr *)((t_u8 *)iph + iph->ihl * 4); - if (*((t_u8 *) tcph + 13) == 0x10) { + if (*((t_u8 *)tcph + 13) == 0x10) { /* Only replace ACK */ if (ntohs(iph->tot_len) > (iph->ihl + tcph->doff) * 4) { /* Don't drop ACK with payload */ @@ -2990,7 +3922,7 @@ woal_process_tcp_ack(moal_private * priv, mlan_buffer * pmbuf) int woal_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_buffer *pmbuf = NULL; mlan_status status; struct sk_buff *new_skb = NULL; @@ -3036,18 +3968,21 @@ woal_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) skb = new_skb; PRINTM(MINFO, "new skb headroom %d\n", skb_headroom(skb)); } - pmbuf = (mlan_buffer *) skb->head; - memset((t_u8 *) pmbuf, 0, sizeof(mlan_buffer)); + pmbuf = (mlan_buffer *)skb->head; + memset((t_u8 *)pmbuf, 0, sizeof(mlan_buffer)); pmbuf->bss_index = priv->bss_index; woal_fill_mlan_buffer(priv, pmbuf, skb); if (priv->enable_tcp_ack_enh == MTRUE) { if (woal_process_tcp_ack(priv, pmbuf)) { /* the ack packet has been dropped */ priv->stats.tx_dropped++; - goto done; } } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) + if (priv->enable_auto_tdls && priv->tdls_check_tx) + woal_tdls_check_tx(priv, skb); +#endif status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf); switch (status) { case MLAN_STATUS_PENDING: @@ -3093,7 +4028,7 @@ woal_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) * @return Number of integer */ int -woal_ascii2hex(t_u8 * d, char *s, t_u32 dlen) +woal_ascii2hex(t_u8 *d, char *s, t_u32 dlen) { unsigned int i; t_u8 n; @@ -3137,12 +4072,14 @@ woal_atoi(int *data, char *a) ENTER(); len = strlen(a); - if (!strncmp(a, "0x", 2)) { - a = a + 2; - len -= 2; - *data = woal_atox(a); - LEAVE(); - return MLAN_STATUS_SUCCESS; + if (len > 2) { + if (!strncmp(a, "0x", 2)) { + a = a + 2; + len -= 2; + *data = woal_atox(a); + LEAVE(); + return MLAN_STATUS_SUCCESS; + } } for (i = 0; i < len; i++) { if (isdigit(a[i])) { @@ -3248,7 +4185,7 @@ woal_strsep(char **s, char delim, char esc) * @return N/A */ void -woal_mac2u8(t_u8 * mac_addr, char *buf) +woal_mac2u8(t_u8 *mac_addr, char *buf) { char *begin = buf, *end; int i; @@ -3275,7 +4212,7 @@ woal_mac2u8(t_u8 * mac_addr, char *buf) void woal_set_multicast_list(struct net_device *dev) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); ENTER(); woal_request_set_multicast_list(priv, dev); LEAVE(); @@ -3292,7 +4229,7 @@ woal_set_multicast_list(struct net_device *dev) * @return N/A */ void -woal_init_priv(moal_private * priv, t_u8 wait_option) +woal_init_priv(moal_private *priv, t_u8 wait_option) { ENTER(); #ifdef STA_SUPPORT @@ -3332,6 +4269,9 @@ woal_init_priv(moal_private * priv, t_u8 wait_option) priv->enable_tcp_ack_enh = MTRUE; + priv->enable_auto_tdls = MFALSE; + priv->tdls_check_tx = MFALSE; + woal_request_get_fw_info(priv, wait_option, NULL); #if defined(WIFI_DIRECT_SUPPORT) @@ -3383,7 +4323,7 @@ woal_init_priv(moal_private * priv, t_u8 wait_option) * @return MLAN_STATUS_SUCCESS --success, otherwise fail */ int -woal_reset_intf(moal_private * priv, t_u8 wait_option, int all_intf) +woal_reset_intf(moal_private *priv, t_u8 wait_option, int all_intf) { int ret = MLAN_STATUS_SUCCESS; int intf_num; @@ -3493,7 +4433,7 @@ woal_reset_intf(moal_private * priv, t_u8 wait_option, int all_intf) * @return moal_private pointer or NULL */ moal_private * -woal_bss_index_to_priv(moal_handle * handle, t_u8 bss_index) +woal_bss_index_to_priv(moal_handle *handle, t_u8 bss_index) { int i; @@ -3522,7 +4462,7 @@ woal_bss_index_to_priv(moal_handle * handle, t_u8 bss_index) * @return mlan_buffer pointer or NULL */ pmlan_buffer -woal_alloc_mlan_buffer(moal_handle * handle, int size) +woal_alloc_mlan_buffer(moal_handle *handle, int size) { mlan_buffer *pmbuf = NULL; struct sk_buff *skb; @@ -3530,20 +4470,19 @@ woal_alloc_mlan_buffer(moal_handle * handle, int size) ENTER(); - flag = in_atomic()? GFP_ATOMIC : GFP_KERNEL; + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; if (size <= 0) { PRINTM(MERROR, "Buffer size must be positive\n"); LEAVE(); return NULL; } - pmbuf = kmalloc(sizeof(mlan_buffer), flag); + pmbuf = kzalloc(sizeof(mlan_buffer), flag); if (!pmbuf) { PRINTM(MERROR, "%s: Fail to alloc mlan buffer\n", __func__); LEAVE(); return NULL; } - memset((t_u8 *) pmbuf, 0, sizeof(mlan_buffer)); skb = __dev_alloc_skb(size, flag); if (!skb) { PRINTM(MERROR, "%s: No free skb\n", __func__); @@ -3551,8 +4490,8 @@ woal_alloc_mlan_buffer(moal_handle * handle, int size) LEAVE(); return NULL; } - pmbuf->pdesc = (t_void *) skb; - pmbuf->pbuf = (t_u8 *) skb->data; + pmbuf->pdesc = (t_void *)skb; + pmbuf->pbuf = (t_u8 *)skb->data; atomic_inc(&handle->mbufalloc_count); LEAVE(); return pmbuf; @@ -3573,20 +4512,17 @@ woal_alloc_mlan_ioctl_req(int size) ENTER(); - flag = in_atomic()? GFP_ATOMIC : GFP_KERNEL; - req = (mlan_ioctl_req *) - kmalloc((sizeof(mlan_ioctl_req) + size + sizeof(int) + - sizeof(wait_queue)), flag); + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + req = kzalloc((sizeof(mlan_ioctl_req) + size + sizeof(int) + + sizeof(wait_queue)), flag); if (!req) { PRINTM(MERROR, "%s: Fail to alloc ioctl buffer\n", __func__); LEAVE(); return NULL; } - memset((t_u8 *) req, 0, (sizeof(mlan_ioctl_req) + size + - sizeof(int) + sizeof(wait_queue))); - req->pbuf = (t_u8 *) req + sizeof(mlan_ioctl_req) + sizeof(wait_queue); - req->buf_len = (t_u32) size; - req->reserved_1 = (t_ptr) ((t_u8 *) req + sizeof(mlan_ioctl_req)); + req->pbuf = (t_u8 *)req + sizeof(mlan_ioctl_req) + sizeof(wait_queue); + req->buf_len = (t_u32)size; + req->reserved_1 = (t_ptr)((t_u8 *)req + sizeof(mlan_ioctl_req)); LEAVE(); return req; @@ -3600,7 +4536,7 @@ woal_alloc_mlan_ioctl_req(int size) * @return N/A */ void -woal_free_mlan_buffer(moal_handle * handle, pmlan_buffer pmbuf) +woal_free_mlan_buffer(moal_handle *handle, pmlan_buffer pmbuf) { ENTER(); if (!pmbuf) { @@ -3629,7 +4565,7 @@ woal_free_mlan_buffer(moal_handle * handle, pmlan_buffer pmbuf) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -woal_broadcast_event(moal_private * priv, t_u8 * payload, t_u32 len) +woal_broadcast_event(moal_private *priv, t_u8 *payload, t_u32 len) { mlan_status ret = MLAN_STATUS_SUCCESS; struct sk_buff *skb = NULL; @@ -3685,7 +4621,7 @@ woal_broadcast_event(moal_private * priv, t_u8 * payload, t_u32 len) /* Data */ skb_put(skb, nlh->nlmsg_len); memcpy(NLMSG_DATA(nlh), netdev->name, IFNAMSIZ); - memcpy(((t_u8 *) (NLMSG_DATA(nlh))) + IFNAMSIZ, payload, len); + memcpy(((t_u8 *)(NLMSG_DATA(nlh))) + IFNAMSIZ, payload, len); /* From Kernel */ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0) @@ -3739,7 +4675,7 @@ woal_reassociation_thread(void *data) { moal_thread *pmoal_thread = data; moal_private *priv = NULL; - moal_handle *handle = (moal_handle *) pmoal_thread->handle; + moal_handle *handle = (moal_handle *)pmoal_thread->handle; wait_queue_t wait; int i; BOOLEAN reassoc_timer_req; @@ -3784,6 +4720,18 @@ woal_reassociation_thread(void *data) PRINTM(MEVENT, "Reassoc: Thread waking up...\n"); reassoc_timer_req = MFALSE; +#ifdef STA_CFG80211 + for (i = 0; + i < MIN(handle->priv_num, MLAN_MAX_BSS_NUM) && + (priv = handle->priv[i]); i++) { + if (priv->roaming_required) { + priv->roaming_required = MFALSE; + PRINTM(MEVENT, "Try to roaming......\n"); + woal_start_roaming(priv); + break; + } + } +#endif for (i = 0; i < MIN(handle->priv_num, MLAN_MAX_BSS_NUM) && @@ -3942,7 +4890,7 @@ woal_reassociation_thread(void *data) return MLAN_STATUS_FAILURE; } - rate = (mlan_ds_rate *) req->pbuf; + rate = (mlan_ds_rate *)req->pbuf; rate->param.rate_cfg.rate_type = MLAN_RATE_INDEX; rate->sub_command = MLAN_OID_RATE_CFG; @@ -4008,7 +4956,7 @@ woal_reassociation_thread(void *data) void woal_reassoc_timer_func(void *context) { - moal_handle *handle = (moal_handle *) context; + moal_handle *handle = (moal_handle *)context; ENTER(); @@ -4032,7 +4980,7 @@ woal_reassoc_timer_func(void *context) * @return N/A */ t_void -woal_send_disconnect_to_system(moal_private * priv) +woal_send_disconnect_to_system(moal_private *priv) { int custom_len = 0; t_u8 event_buf[32]; @@ -4049,6 +4997,11 @@ woal_send_disconnect_to_system(moal_private * priv) if (netif_carrier_ok(priv->netdev)) netif_carrier_off(priv->netdev); woal_flush_tcp_sess_queue(priv); + if (priv->bss_type == MLAN_BSS_TYPE_STA) + woal_flush_tdls_list(priv); + if (priv->bss_type == MLAN_BSS_TYPE_STA && priv->hist_data) + woal_hist_data_reset(priv); + #ifdef STA_WEXT if (IS_STA_WEXT(cfg80211_wext)) { memset(wrqu.ap_addr.sa_data, 0x00, ETH_ALEN); @@ -4103,7 +5056,7 @@ woal_send_disconnect_to_system(moal_private * priv) * @return The length of this log */ static int -woal_dump_priv_drv_info(moal_handle * handle, t_u8 * buf) +woal_dump_priv_drv_info(moal_handle *handle, t_u8 *buf) { char *ptr = (char *)buf; int index; @@ -4165,6 +5118,7 @@ woal_dump_priv_drv_info(moal_handle * handle, t_u8 * buf) return ptr - (char *)buf; } +#define SDIO_SCRATCH_REG 0x60 /** * @brief This function save sdio reg info * @@ -4174,14 +5128,26 @@ woal_dump_priv_drv_info(moal_handle * handle, t_u8 * buf) * @return The length of this log */ static int -woal_dump_sdio_reg_info(moal_handle * phandle, t_u8 * drv_buf) +woal_dump_sdio_reg_info(moal_handle *phandle, t_u8 *drv_buf) { char *drv_ptr = (char *)drv_buf; int ret = 0; t_u8 loop, index = 0, func, data; unsigned int reg, reg_start, reg_end; - unsigned int reg_table[] = { 0x28, 0x30, 0x34, 0x38, 0x3c }; - char buf[128], *ptr; + unsigned int scratch_reg = SDIO_SCRATCH_REG; + unsigned int reg_table_8887[] = + { 0x08, 0x58, 0x5C, 0x5D, 0x60, 0x61, 0x62, + 0x64, 0x65, 0x66, 0x68, 0x69, 0x6a + }; + unsigned int reg_table_8897[] = + { 0x4C, 0x50, 0x54, 0x55, 0x58, 0x59, 0x5c, + 0x5d + }; + /** for sd8787/sd8777 */ + unsigned int reg_table_other[] = { 0x28, 0x30, 0x34, 0x38, 0x3c }; + unsigned int *reg_table = NULL; + t_u8 reg_table_size = 0; + char buf[256], *ptr; ENTER(); @@ -4190,32 +5156,61 @@ woal_dump_sdio_reg_info(moal_handle * phandle, t_u8 * drv_buf) LEAVE(); return 0; } + mlan_pm_wakeup_card(phandle->pmlan_adapter); +#define SDIO_SCRATCH_REG_8887 0x90 +#define SDIO_SCRATCH_REG_8897 0xC0 +#define SDIO_SCRATCH_REG_OTHER 0x60 + if (phandle->card_type == CARD_TYPE_SD8887) { + reg_table = reg_table_8887; + reg_table_size = sizeof(reg_table_8887) / sizeof(int); + scratch_reg = SDIO_SCRATCH_REG_8887; + } else if (phandle->card_type == CARD_TYPE_SD8897) { + reg_table = reg_table_8897; + reg_table_size = sizeof(reg_table_8897) / sizeof(int); + scratch_reg = SDIO_SCRATCH_REG_8897; + } else { + reg_table = reg_table_other; + reg_table_size = sizeof(reg_table_other) / sizeof(int); + scratch_reg = SDIO_SCRATCH_REG_OTHER; + } drv_ptr += sprintf(drv_ptr, "--------sdio_reg_debug_info---------\n"); sdio_claim_host(((struct sdio_mmc_card *)phandle->card)->func); for (loop = 0; loop < 5; loop++) { memset(buf, 0, sizeof(buf)); ptr = buf; - if (loop < 2) { - /* Read the registers of SDIO function0 and function1 */ + if (loop == 0) { + /* Read the registers of SDIO function0 */ func = loop; reg_start = 0; reg_end = 9; + + } else if (loop == 1) { + /* Read the registers of SDIO function1 */ + func = loop; + if (phandle->card_type == CARD_TYPE_SD8897) { + reg_start = 4; + reg_end = 0xB; + } else if (phandle->card_type == CARD_TYPE_SD8887) { + reg_start = 0x10; + reg_end = 0x17; + } else { + reg_start = 4; + reg_end = 9; + } } else if (loop == 2) { /* Read specific registers of SDIO function1 */ index = 0; func = 1; reg_start = reg_table[index++]; - reg_end = - reg_table[sizeof(reg_table) / sizeof(int) - 1]; + reg_end = reg_table[reg_table_size - 1]; } else { /* Read the scratch registers of SDIO function1 */ if (loop == 4) mdelay(100); func = 1; -#define SDIO_SCRATCH_REG 0x60 - reg_start = SDIO_SCRATCH_REG; - reg_end = SDIO_SCRATCH_REG + 10; + reg_start = scratch_reg; + reg_end = scratch_reg + 10; } if (loop != 2) ptr += sprintf(ptr, "SDIO Func%d (%#x-%#x): ", func, @@ -4264,7 +5259,7 @@ woal_dump_sdio_reg_info(moal_handle * phandle, t_u8 * drv_buf) * @return The length of this log */ static int -woal_dump_moal_drv_info(moal_handle * phandle, t_u8 * buf) +woal_dump_moal_drv_info(moal_handle *phandle, t_u8 *buf) { char *ptr; char str_buf[MLAN_MAX_VER_STR_LEN]; @@ -4315,12 +5310,13 @@ woal_dump_moal_drv_info(moal_handle * phandle, t_u8 * buf) * @return The length of this log */ static int -woal_dump_mlan_drv_info(moal_private * priv, t_u8 * buf) +woal_dump_mlan_drv_info(moal_private *priv, t_u8 *buf) { char *ptr = (char *)buf; int i; #ifdef SDIO_MULTI_PORT_TX_AGGR int j; + t_u8 mp_aggr_pkt_limit = 0; #endif char str[11 * DBG_CMD_NUM + 1] = { 0 }; char *s; @@ -4337,24 +5333,32 @@ woal_dump_mlan_drv_info(moal_private * priv, t_u8 * buf) ptr += sprintf(ptr, "mlan_rx_processing =%d\n", info.mlan_rx_processing); ptr += sprintf(ptr, "rx_pkts_queued =%d\n", info.rx_pkts_queued); + ptr += sprintf(ptr, "tx_pkts_queued =%d\n", info.tx_pkts_queued); + ptr += sprintf(ptr, "num_cmd_timeout = %d\n", info.num_cmd_timeout); - ptr += sprintf(ptr, "Timeout cmd id = 0x%x, act = 0x%x \n", + ptr += sprintf(ptr, "dbg.num_cmd_timeout = %d\n", + info.dbg_num_cmd_timeout); + ptr += sprintf(ptr, "Timeout cmd id = 0x%x, act = 0x%x\n", info.timeout_cmd_id, info.timeout_cmd_act); ptr += sprintf(ptr, "last_cmd_index = %d\n", info.last_cmd_index); - for (s = str, i = 0; i < DBG_CMD_NUM; i++) { + for (s = str, i = 0; i < DBG_CMD_NUM; i++) + s += sprintf(s, "0x%x ", info.last_cmd_id[i]); + ptr += sprintf(ptr, "last_cmd_id = %s\n", str); + + for (s = str, i = 0; i < DBG_CMD_NUM; i++) s += sprintf(s, "0x%x ", info.last_cmd_act[i]); - } + ptr += sprintf(ptr, "last_cmd_act = %s\n", str); ptr += sprintf(ptr, "last_cmd_resp_index = %d\n", info.last_cmd_resp_index); - for (s = str, i = 0; i < DBG_CMD_NUM; i++) { + for (s = str, i = 0; i < DBG_CMD_NUM; i++) s += sprintf(s, "0x%x ", info.last_cmd_resp_id[i]); - } + ptr += sprintf(ptr, "last_cmd_resp_id = %s\n", str); ptr += sprintf(ptr, "last_event_index = %d\n", info.last_event_index); - for (s = str, i = 0; i < DBG_CMD_NUM; i++) { + for (s = str, i = 0; i < DBG_CMD_NUM; i++) s += sprintf(s, "0x%x ", info.last_event[i]); - } + ptr += sprintf(ptr, "last_event = %s\n", str); ptr += sprintf(ptr, "num_data_h2c_failure = %d\n", info.num_tx_host_to_card_failure); @@ -4401,16 +5405,18 @@ woal_dump_mlan_drv_info(moal_private * priv, t_u8 * buf) (unsigned int)info.mp_rd_bitmap, info.curr_rd_port); ptr += sprintf(ptr, "mp_wr_bitmap=0x%x curr_wr_port=0x%x\n", (unsigned int)info.mp_wr_bitmap, info.curr_wr_port); + ptr += sprintf(ptr, "mp_invalid_update=%d\n", info.mp_invalid_update); #ifdef SDIO_MULTI_PORT_TX_AGGR + mp_aggr_pkt_limit = info.mp_aggr_pkt_limit; ptr += sprintf(ptr, "last_recv_wr_bitmap=0x%x last_mp_index = %d\n", info.last_recv_wr_bitmap, info.last_mp_index); for (i = 0; i < SDIO_MP_DBG_NUM; i++) { - for (s = str, j = 0; j < SDIO_MP_AGGR_DEF_PKT_LIMIT; j++) { + for (s = str, j = 0; j < mp_aggr_pkt_limit; j++) s += sprintf(s, "0x%02x ", info.last_mp_wr_info[i * - SDIO_MP_AGGR_DEF_PKT_LIMIT - + j]); - } + mp_aggr_pkt_limit + + j]); + ptr += sprintf(ptr, "mp_wr_bitmap: 0x%x mp_wr_ports=0x%x len=%d curr_wr_port=0x%x\n%s\n", info.last_mp_wr_bitmap[i], @@ -4437,7 +5443,7 @@ woal_dump_mlan_drv_info(moal_private * priv, t_u8 * buf) */ static int woal_save_hex_dump(int rowsize, const void *buf, size_t len, - bool ascii, t_u8 * save_buf) + bool ascii, t_u8 *save_buf) { const u8 *ptr = buf; int i, linelen, remaining = len; @@ -4469,7 +5475,7 @@ woal_save_hex_dump(int rowsize, const void *buf, size_t len, * @return The length of this log */ static int -woal_dump_moal_hex(moal_handle * phandle, t_u8 * buf) +woal_dump_moal_hex(moal_handle *phandle, t_u8 *buf) { char *ptr = (char *)buf; int i; @@ -4509,18 +5515,21 @@ woal_dump_moal_hex(moal_handle * phandle, t_u8 * buf) * * @param priv A pointer to moal_private structure * @param buf A pointer to buffer + * @param pfile A pointer to file structure * * @return The length of this log */ static int -woal_dump_mlan_hex(moal_private * priv, t_u8 * buf) +woal_dump_mlan_hex(moal_private *priv, t_u8 *buf, struct file *pfile) { char *ptr = (char *)buf; int i; + int len = 0; ENTER(); - if (!buf || !priv || woal_get_debug_info(priv, MOAL_CMD_WAIT, &info)) { + if (!buf || !priv || !pfile || + woal_get_debug_info(priv, MOAL_CMD_WAIT, &info)) { PRINTM(MMSG, "%s: can't retreive info\n", __func__); LEAVE(); return 0; @@ -4533,7 +5542,24 @@ woal_dump_mlan_hex(moal_private * priv, t_u8 * buf) ptr += woal_save_hex_dump(ROW_SIZE_16, info.mlan_adapter, info.mlan_adapter_size, MTRUE, ptr); ptr += sprintf(ptr, "<--mlan_adapter End-->\n"); + vfs_write(pfile, buf, ptr - (char *)buf, &pfile->f_pos); + len += ptr - (char *)buf; +#ifdef SDIO_MULTI_PORT_TX_AGGR + if (info.mpa_buf && info.mpa_buf_size) { + ptr = (char *)buf; + ptr += sprintf(ptr, "<--mlan_mpa_buf-->\n"); + ptr += sprintf(ptr, "mlan_mpa_buf=%p, size=%d(0x%x)\n", + info.mpa_buf, info.mpa_buf_size, + info.mpa_buf_size); + ptr += woal_save_hex_dump(ROW_SIZE_16, info.mpa_buf, + info.mpa_buf_size, MTRUE, ptr); + ptr += sprintf(ptr, "<--mlan_mpa_buf End-->\n"); + vfs_write(pfile, buf, ptr - (char *)buf, &pfile->f_pos); + len += ptr - (char *)buf; + } +#endif for (i = 0; i < info.mlan_priv_num; i++) { + ptr = (char *)buf; ptr += sprintf(ptr, "<--mlan_private(%d)-->\n", i); ptr += sprintf(ptr, "mlan_private=%p, size=%d(0x%x)\n", info.mlan_priv[i], info.mlan_priv_size[i], @@ -4541,63 +5567,203 @@ woal_dump_mlan_hex(moal_private * priv, t_u8 * buf) ptr += woal_save_hex_dump(ROW_SIZE_16, info.mlan_priv[i], info.mlan_priv_size[i], MTRUE, ptr); ptr += sprintf(ptr, "<--mlan_private(%d) End-->\n", i); + vfs_write(pfile, buf, ptr - (char *)buf, &pfile->f_pos); + len += ptr - (char *)buf; } LEAVE(); - return ptr - (char *)buf; + return len; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0) /** - * @brief This function dump drv info to file + * @brief This function create dump directory * * @param phandle A pointer to moal_handle + * @param dir_buf A pointer to dir_buf buffer + * @param buf_size Size of dir_buf buffer * * @return N/A */ void -woal_dump_drv_info(moal_handle * phandle) +woal_create_dump_dir(moal_handle *phandle, char *dir_buf, int buf_size) { - int ret = 0; - struct file *pfile = NULL; - mm_segment_t fs; - t_u8 *drv_buf; - t_u8 *pos; - loff_t start; + struct dentry *dentry; + struct path path; + t_u32 sec, usec; + int ret; ENTER(); - PRINTM(MMSG, "=== START DRIVER INFO DUMP==="); - ret = moal_vmalloc(phandle, DRV_INFO_SIZE + 1, &drv_buf); - if ((ret != MLAN_STATUS_SUCCESS) || !drv_buf) { - PRINTM(MERROR, "Error: vmalloc drv buffer failed!\n"); + if (!phandle || !dir_buf) { + PRINTM(MERROR, "Can't create directory\n"); + ret = MLAN_STATUS_FAILURE; goto done; } - pos = drv_buf; - pos += woal_dump_moal_drv_info(phandle, pos); - pos += woal_dump_mlan_drv_info(woal_get_priv - (phandle, MLAN_BSS_ROLE_ANY), pos); + moal_get_system_time(phandle, &sec, &usec); + memset(dir_buf, 0, buf_size); + sprintf(dir_buf, "%s%u", "/data/dump_", sec); - pos += woal_dump_moal_hex(phandle, pos); - pos += woal_dump_mlan_hex(woal_get_priv(phandle, MLAN_BSS_ROLE_ANY), - pos); + dentry = kern_path_create(AT_FDCWD, dir_buf, &path, 1); + if (IS_ERR(dentry)) { + PRINTM(MMSG, + "Create directory %s error, try create dir in /var", + dir_buf); + memset(dir_buf, 0, buf_size); + sprintf(dir_buf, "%s%u", "/var/dump_", sec); + dentry = kern_path_create(AT_FDCWD, dir_buf, &path, 1); + } + if (IS_ERR(dentry)) { + PRINTM(MMSG, "Create directory %s error, use default folder", + dir_buf); + goto default_dir; + } + ret = vfs_mkdir(path.dentry->d_inode, dentry, 0777); + mutex_unlock(&path.dentry->d_inode->i_mutex); + if (ret < 0) { + PRINTM(MMSG, "Create directory failure, use default folder\n"); + goto default_dir; + } else { + PRINTM(MMSG, "Create directory %s successfully\n", dir_buf); + goto done; + } - PRINTM(MMSG, "Drv info total bytes = %ld (0x%lx)\n", - (long int)(pos - drv_buf), (long unsigned int)(pos - drv_buf)); +default_dir: + memset(dir_buf, 0, buf_size); + sprintf(dir_buf, "%s", "/data"); +done: + LEAVE(); +} +#endif - pfile = filp_open("/data/file_drv_info", O_CREAT | O_RDWR, 0644); +/** + * @brief This function save dump buf to file + * + * @param dir_name A pointer to directory name + * @param file_name A pointer to file name + * @param buf A pointer to dump data + * @param buf_len The length of dump buf + * + * @return SUCCESS OR FAILURE + */ +mlan_status +woal_save_dump_info_to_file(char *dir_name, char *file_name, t_u8 *buf, + t_u32 buf_len) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + struct file *pfile = NULL; + t_u8 name[64]; + mm_segment_t fs; + loff_t pos; + + ENTER(); + + if (!dir_name || !file_name || !buf) { + PRINTM(MERROR, "Can't save dump info to file\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + memset(name, 0, sizeof(name)); + sprintf(name, "%s/%s", dir_name, file_name); + pfile = filp_open(name, O_CREAT | O_RDWR, 0644); if (IS_ERR(pfile)) { + PRINTM(MMSG, + "Create file %s error, try to save dump file in /var\n", + name); + memset(name, 0, sizeof(name)); + sprintf(name, "%s/%s", "/var", file_name); + pfile = filp_open(name, O_CREAT | O_RDWR, 0644); + } + if (IS_ERR(pfile)) { + PRINTM(MERROR, "Create Dump file for %s error\n", name); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + PRINTM(MMSG, "Dump data %s saved in %s\n", file_name, name); + + fs = get_fs(); + set_fs(KERNEL_DS); + pos = 0; + vfs_write(pfile, buf, buf_len, &pos); + filp_close(pfile, NULL); + set_fs(fs); + + PRINTM(MMSG, "Dump data %s saved in %s successfully\n", file_name, + name); + +done: + LEAVE(); + return ret; +} + +/** + * @brief This function dump drv info to file + * + * @param phandle A pointer to moal_handle + * @param dir_name A pointer to directory name + * + * @return N/A + */ +void +woal_dump_drv_info(moal_handle *phandle, t_u8 *dir_name) +{ + int ret = 0; + struct file *pfile = NULL; + mm_segment_t fs; + t_u8 *drv_buf; + t_u8 file_name[64]; + t_u32 len = 0; + t_u32 total_len = 0; + + ENTER(); + + PRINTM(MMSG, "=== START DRIVER INFO DUMP==="); + ret = moal_vmalloc(phandle, DRV_INFO_SIZE + 1, &drv_buf); + if ((ret != MLAN_STATUS_SUCCESS) || !drv_buf) { + PRINTM(MERROR, "Error: vmalloc drv buffer failed!\n"); + goto done; + } + memset(file_name, 0, sizeof(file_name)); + sprintf(file_name, "%s/%s", dir_name, "file_drv_info"); + pfile = filp_open(file_name, O_CREAT | O_RDWR, 0644); + if (IS_ERR(pfile)) { + PRINTM(MMSG, + "Create file %s error, try create /var/file_drv_info", + file_name); pfile = filp_open("/var/file_drv_info", O_CREAT | O_RDWR, 0644); + } else { + PRINTM(MMSG, "DRV dump data in %s\n", file_name); } if (IS_ERR(pfile)) { PRINTM(MMSG, "Create file_drv_info file failed\n"); goto done; } - fs = get_fs(); set_fs(KERNEL_DS); - start = 0; - vfs_write(pfile, drv_buf, pos - drv_buf, &start); + + len = woal_dump_moal_drv_info(phandle, drv_buf); + total_len += len; + vfs_write(pfile, drv_buf, len, &pfile->f_pos); + + len = woal_dump_mlan_drv_info(woal_get_priv(phandle, MLAN_BSS_ROLE_ANY), + drv_buf); + total_len += len; + vfs_write(pfile, drv_buf, len, &pfile->f_pos); + + len = woal_dump_moal_hex(phandle, drv_buf); + total_len += len; + vfs_write(pfile, drv_buf, len, &pfile->f_pos); + + len = woal_dump_mlan_hex(woal_get_priv(phandle, MLAN_BSS_ROLE_ANY), + drv_buf, pfile); + total_len += len; + + PRINTM(MMSG, "Drv info total bytes = %ld (0x%lx)\n", + (long int)total_len, (long unsigned int)total_len); + filp_close(pfile, NULL); set_fs(fs); @@ -4611,6 +5777,606 @@ woal_dump_drv_info(moal_handle * phandle) #define DEBUG_HOST_READY 0xEE #define DEBUG_FW_DONE 0xFF #define MAX_POLL_TRIES 100 +#define DEBUG_ITCM_DONE 0xaa +#define DEBUG_DTCM_DONE 0xbb +#define DEBUG_SQRAM_DONE 0xcc + +#define DEBUG_DUMP_CTRL_REG 0x63 +#define DEBUG_DUMP_FIRST_REG 0x62 +#define DEBUG_DUMP_START_REG 0x64 +#define DEBUG_DUMP_END_REG 0x6a +#define ITCM_SIZE 0x60000 +/* SD8777 */ +#define SQRAM_SIZE_8777 0x33000 +#define DTCM_SIZE_8777 0x14000 +/* SD8787 */ +#define SQRAM_SIZE_8787 0x33000 +#define DTCM_SIZE_8787 0xA700 +/* SD8801 */ +#define SQRAM_SIZE_8801 0x33000 +#define DTCM_SIZE_8801 0x14000 +/* SD8797 */ +#define SQRAM_SIZE_8797 0x7c000 +#define DTCM_SIZE_8797 0x14000 + +#define SQRAM_SIZE 0x33500 + +#define DTCM_SIZE 0x10000 + +/** + * @brief This function dump firmware memory to file + * + * @param phandle A pointer to moal_handle + * + * @return N/A + */ +void +woal_dump_firmware_info(moal_handle *phandle) +{ + + int ret = 0; + unsigned int reg, reg_start, reg_end; + t_u8 path_name[64], file_name[32]; + t_u8 *ITCM_Ptr = NULL; + t_u8 *DTCM_Ptr = NULL; + t_u8 *SQRAM_Ptr = NULL; + t_u8 *dbg_ptr = NULL; + t_u32 sec, usec; + t_u8 ctrl_data = 0; + t_u32 dtcm_size = 0; + t_u32 sqram_size = SQRAM_SIZE; + t_u8 *end_ptr = NULL; + int tries; + + if (!phandle) { + PRINTM(MERROR, "Could not dump firmwware info\n"); + return; + } + + if ((phandle->card_type == CARD_TYPE_SD8887) || + (phandle->card_type == CARD_TYPE_SD8897)) { + woal_dump_firmware_info_v2(phandle); + return; + } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0) + /** Create dump directort*/ + woal_create_dump_dir(phandle, path_name, sizeof(path_name)); +#else + memset(path_name, 0, sizeof(path_name)); + strcpy(path_name, "/data"); +#endif + PRINTM(MMSG, "Directory name is %s\n", path_name); + + woal_dump_drv_info(phandle, path_name); + mlan_pm_wakeup_card(phandle->pmlan_adapter); + sdio_claim_host(((struct sdio_mmc_card *)phandle->card)->func); + phandle->fw_dump = MTRUE; + /* start dump fw memory */ + moal_get_system_time(phandle, &sec, &usec); + PRINTM(MMSG, "==== DEBUG MODE OUTPUT START: %u.%06u ====\n", sec, usec); + ret = moal_vmalloc(phandle, ITCM_SIZE + 1, (t_u8 **)&ITCM_Ptr); + if ((ret != MLAN_STATUS_SUCCESS) || !ITCM_Ptr) { + PRINTM(MERROR, "Error: vmalloc ITCM buffer failed!!!\n"); + goto done; + } + if (phandle->card_type == CARD_TYPE_SD8787) { + dtcm_size = DTCM_SIZE_8787; + sqram_size = SQRAM_SIZE_8787; + } else if (phandle->card_type == CARD_TYPE_SD8777) { + dtcm_size = DTCM_SIZE_8777; + sqram_size = SQRAM_SIZE_8777; + } else if (phandle->card_type == CARD_TYPE_SD8801) { + dtcm_size = DTCM_SIZE_8801; + sqram_size = SQRAM_SIZE_8801; + } else if (phandle->card_type == CARD_TYPE_SD8797) { + dtcm_size = DTCM_SIZE_8797; + sqram_size = SQRAM_SIZE_8797; + } else + dtcm_size = DTCM_SIZE; + + PRINTM(MMSG, "DTCM_SIZE=0x%x\n", dtcm_size); + ret = moal_vmalloc(phandle, dtcm_size + 1, (t_u8 **)&DTCM_Ptr); + if ((ret != MLAN_STATUS_SUCCESS) || !DTCM_Ptr) { + PRINTM(MERROR, "Error: vmalloc DTCM buffer failed!!!\n"); + goto done; + } + ret = moal_vmalloc(phandle, sqram_size + 1, (t_u8 **)&SQRAM_Ptr); + if ((ret != MLAN_STATUS_SUCCESS) || !SQRAM_Ptr) { + PRINTM(MERROR, "Error: vmalloc SQRAM buffer failed!!!\n"); + goto done; + } + dbg_ptr = ITCM_Ptr; + end_ptr = ITCM_Ptr + ITCM_SIZE; + moal_get_system_time(phandle, &sec, &usec); + PRINTM(MMSG, "Start ITCM output %u.%06u, please wait...\n", sec, usec); + reg_start = DEBUG_DUMP_START_REG; + reg_end = DEBUG_DUMP_END_REG; + do { + sdio_writeb(((struct sdio_mmc_card *)phandle->card)->func, + DEBUG_HOST_READY, DEBUG_DUMP_CTRL_REG, &ret); + if (ret) { + PRINTM(MERROR, "SDIO Write ERR\n"); + goto done; + } + for (tries = 0; tries < MAX_POLL_TRIES; tries++) { + ctrl_data = + sdio_readb(((struct sdio_mmc_card *)phandle-> + card)->func, DEBUG_DUMP_CTRL_REG, + &ret); + if (ret) { + PRINTM(MERROR, "SDIO READ ERR\n"); + goto done; + } + if ((ctrl_data == DEBUG_FW_DONE) || + (ctrl_data == DEBUG_ITCM_DONE) + || (ctrl_data == DEBUG_DTCM_DONE) || + (ctrl_data == DEBUG_SQRAM_DONE)) + break; + if (ctrl_data != DEBUG_HOST_READY) { + sdio_writeb(((struct sdio_mmc_card *)phandle-> + card)->func, DEBUG_HOST_READY, + DEBUG_DUMP_CTRL_REG, &ret); + if (ret) { + PRINTM(MERROR, "SDIO Write ERR\n"); + goto done; + } + } + udelay(100); + } + if (ctrl_data == DEBUG_HOST_READY) { + PRINTM(MERROR, "Fail to pull ctrl_data\n"); + goto done; + } + reg = DEBUG_DUMP_FIRST_REG; + *dbg_ptr = + sdio_readb(((struct sdio_mmc_card *)phandle->card)-> + func, reg, &ret); + if (ret) { + PRINTM(MMSG, "SDIO READ ERR\n"); + goto done; + } + if (dbg_ptr < end_ptr) + dbg_ptr++; + else { + PRINTM(MERROR, "pre-allocced buf is not enough\n"); + goto done; + } + for (reg = reg_start; reg <= reg_end; reg++) { + *dbg_ptr = + sdio_readb(((struct sdio_mmc_card *)phandle-> + card)->func, reg, &ret); + if (ret) { + PRINTM(MMSG, "SDIO READ ERR\n"); + goto done; + } + if (dbg_ptr < end_ptr) + dbg_ptr++; + else + PRINTM(MMSG, + "pre-allocced buf is not enough\n"); + } + switch (ctrl_data) { + case DEBUG_ITCM_DONE: +#ifdef MLAN_64BIT + PRINTM(MMSG, "ITCM done: size=0x%lx\n", + dbg_ptr - ITCM_Ptr); +#else + PRINTM(MMSG, "ITCM done: size=0x%x\n", + dbg_ptr - ITCM_Ptr); +#endif + memset(file_name, 0, sizeof(file_name)); + sprintf(file_name, "%s", "file_sdio_ITCM"); + if (MLAN_STATUS_SUCCESS != + woal_save_dump_info_to_file(path_name, file_name, + ITCM_Ptr, ITCM_SIZE)) + PRINTM(MMSG, "Can't save dump file %s in %s\n", + file_name, path_name); + dbg_ptr = DTCM_Ptr; + end_ptr = DTCM_Ptr + dtcm_size; + moal_get_system_time(phandle, &sec, &usec); + PRINTM(MMSG, + "Start DTCM output %u.%06u, please wait...\n", + sec, usec); + break; + case DEBUG_DTCM_DONE: +#ifdef MLAN_64BIT + PRINTM(MMSG, "DTCM done: size=0x%lx\n", + dbg_ptr - DTCM_Ptr); +#else + PRINTM(MMSG, "DTCM done: size=0x%x\n", + dbg_ptr - DTCM_Ptr); +#endif + memset(file_name, 0, sizeof(file_name)); + sprintf(file_name, "%s", "file_sdio_DTCM"); + if (MLAN_STATUS_SUCCESS != + woal_save_dump_info_to_file(path_name, file_name, + DTCM_Ptr, dtcm_size)) + PRINTM(MMSG, "Can't save dump file %s in %s\n", + file_name, path_name); + dbg_ptr = SQRAM_Ptr; + end_ptr = SQRAM_Ptr + sqram_size; + moal_get_system_time(phandle, &sec, &usec); + PRINTM(MMSG, + "Start SQRAM output %u.%06u, please wait...\n", + sec, usec); + break; + case DEBUG_SQRAM_DONE: +#ifdef MLAN_64BIT + PRINTM(MMSG, "SQRAM done: size=0x%lx\n", + dbg_ptr - SQRAM_Ptr); +#else + PRINTM(MMSG, "SQRAM done: size=0x%x\n", + dbg_ptr - SQRAM_Ptr); +#endif + memset(file_name, 0, sizeof(file_name)); + sprintf(file_name, "%s", "file_sdio_SQRAM"); + if (MLAN_STATUS_SUCCESS != + woal_save_dump_info_to_file(path_name, file_name, + SQRAM_Ptr, sqram_size)) + PRINTM(MMSG, "Can't save dump file %s in %s\n", + file_name, path_name); + PRINTM(MMSG, "End output!\n"); + break; + default: + break; + } + } while (ctrl_data != DEBUG_SQRAM_DONE); + + PRINTM(MMSG, + "The output ITCM/DTCM/SQRAM have been saved to files successfully!\n"); + moal_get_system_time(phandle, &sec, &usec); + PRINTM(MMSG, "==== DEBUG MODE OUTPUT END: %u.%06u ====\n", sec, usec); + /* end dump fw memory */ +done: + phandle->fw_dump = MFALSE; + sdio_release_host(((struct sdio_mmc_card *)phandle->card)->func); + if (ITCM_Ptr) + moal_vfree(phandle, ITCM_Ptr); + if (DTCM_Ptr) + moal_vfree(phandle, DTCM_Ptr); + if (SQRAM_Ptr) + moal_vfree(phandle, SQRAM_Ptr); + PRINTM(MMSG, "==== DEBUG MODE END ====\n"); + return; +} + +#define DEBUG_DUMP_CTRL_REG_8887 0xA2 +#define DEBUG_DUMP_START_REG_8887 0xA3 +#define DEBUG_DUMP_END_REG_8887 0xAA + +#define DEBUG_DUMP_CTRL_REG_8897 0xE2 +#define DEBUG_DUMP_START_REG_8897 0xE3 +#define DEBUG_DUMP_END_REG_8897 0xEA + +typedef enum { + DUMP_TYPE_ITCM = 0, + DUMP_TYPE_DTCM = 1, + DUMP_TYPE_SQRAM = 2, + DUMP_TYPE_APU_REGS = 3, + DUMP_TYPE_CIU_REGS = 4, + DUMP_TYPE_ICU_REGS = 5, + DUMP_TYPE_MAC_REGS = 6, + DUMP_TYPE_EXTEND_7 = 7, + DUMP_TYPE_EXTEND_8 = 8, + DUMP_TYPE_EXTEND_9 = 9, + DUMP_TYPE_EXTEND_10 = 10, + DUMP_TYPE_EXTEND_11 = 11, + DUMP_TYPE_EXTEND_12 = 12, + DUMP_TYPE_EXTEND_13 = 13, + DUMP_TYPE_EXTEND_LAST = 14 +} dumped_mem_type; + +#define MAX_NAME_LEN 8 +#define MAX_FULL_NAME_LEN 32 +t_u8 *name_prefix = "/data/file_"; + +typedef struct { + t_u8 mem_name[MAX_NAME_LEN]; + t_u8 *mem_Ptr; + struct file *pfile_mem; + t_u8 done_flag; +} memory_type_mapping; + +memory_type_mapping mem_type_mapping_tbl[] = { + {"ITCM", NULL, NULL, 0xF0}, + {"DTCM", NULL, NULL, 0xF1}, + {"SQRAM", NULL, NULL, 0xF2}, + {"APU", NULL, NULL, 0xF3}, + {"CIU", NULL, NULL, 0xF4}, + {"ICU", NULL, NULL, 0xF5}, + {"MAC", NULL, NULL, 0xF6}, + {"EXT7", NULL, NULL, 0xF7}, + {"EXT8", NULL, NULL, 0xF8}, + {"EXT9", NULL, NULL, 0xF9}, + {"EXT10", NULL, NULL, 0xFA}, + {"EXT11", NULL, NULL, 0xFB}, + {"EXT12", NULL, NULL, 0xFC}, + {"EXT13", NULL, NULL, 0xFD}, + {"EXTLAST", NULL, NULL, 0xFE}, +}; + +typedef enum { + RDWR_STATUS_SUCCESS = 0, + RDWR_STATUS_FAILURE = 1, + RDWR_STATUS_DONE = 2 +} rdwr_status; + +/** + * @brief This function read/write firmware via cmd52 + * + * @param phandle A pointer to moal_handle + * + * @return MLAN_STATUS_SUCCESS + */ +rdwr_status +woal_cmd52_rdwr_firmware(moal_handle *phandle, t_u8 doneflag) +{ + int ret = 0; + int tries = 0; + t_u8 ctrl_data = 0; + t_u8 dbg_dump_ctrl_reg = 0; + + if (phandle->card_type == CARD_TYPE_SD8887) + dbg_dump_ctrl_reg = DEBUG_DUMP_CTRL_REG_8887; + else if (phandle->card_type == CARD_TYPE_SD8897) + dbg_dump_ctrl_reg = DEBUG_DUMP_CTRL_REG_8897; + sdio_writeb(((struct sdio_mmc_card *)phandle->card)->func, + DEBUG_HOST_READY, dbg_dump_ctrl_reg, &ret); + if (ret) { + PRINTM(MERROR, "SDIO Write ERR\n"); + return RDWR_STATUS_FAILURE; + } + for (tries = 0; tries < MAX_POLL_TRIES; tries++) { + ctrl_data = + sdio_readb(((struct sdio_mmc_card *)phandle->card)-> + func, dbg_dump_ctrl_reg, &ret); + if (ret) { + PRINTM(MERROR, "SDIO READ ERR\n"); + return RDWR_STATUS_FAILURE; + } + if (ctrl_data == DEBUG_FW_DONE) + break; + if (doneflag && ctrl_data == doneflag) + return RDWR_STATUS_DONE; + if (ctrl_data != DEBUG_HOST_READY) { + PRINTM(MMSG, + "The ctrl reg was changed, re-try again!\n"); + sdio_writeb(((struct sdio_mmc_card *)phandle->card)-> + func, DEBUG_HOST_READY, dbg_dump_ctrl_reg, + &ret); + if (ret) { + PRINTM(MERROR, "SDIO Write ERR\n"); + return RDWR_STATUS_FAILURE; + } + } + udelay(100); + } + if (ctrl_data == DEBUG_HOST_READY) { + PRINTM(MERROR, "Fail to pull ctrl_data\n"); + return RDWR_STATUS_FAILURE; + } + + return RDWR_STATUS_SUCCESS; +} + +/** + * @brief This function dump firmware memory to file + * + * @param phandle A pointer to moal_handle + * + * @return N/A + */ +void +woal_dump_firmware_info_v2(moal_handle *phandle) +{ + + int ret = 0; + unsigned int reg, reg_start, reg_end; + t_u8 *dbg_ptr = NULL; + t_u32 sec, usec; + t_u8 dump_num = 0; + t_u8 idx = 0; + t_u8 doneflag = 0; + rdwr_status stat; + t_u8 i = 0; + t_u8 read_reg = 0; + t_u32 memory_size = 0; + t_u8 path_name[64], file_name[32]; + t_u8 *end_ptr = NULL; + t_u8 dbg_dump_start_reg = 0; + t_u8 dbg_dump_end_reg = 0; + + if (!phandle) { + PRINTM(MERROR, "Could not dump firmwware info\n"); + return; + } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0) + /** Create dump directort*/ + woal_create_dump_dir(phandle, path_name, sizeof(path_name)); +#else + memset(path_name, 0, sizeof(path_name)); + strcpy(path_name, "/data"); +#endif + PRINTM(MMSG, "Directory name is %s\n", path_name); + + woal_dump_drv_info(phandle, path_name); + if (phandle->card_type == CARD_TYPE_SD8887) { + dbg_dump_start_reg = DEBUG_DUMP_START_REG_8887; + dbg_dump_end_reg = DEBUG_DUMP_END_REG_8887; + } else if (phandle->card_type == CARD_TYPE_SD8897) { + dbg_dump_start_reg = DEBUG_DUMP_START_REG_8897; + dbg_dump_end_reg = DEBUG_DUMP_END_REG_8897; + } + mlan_pm_wakeup_card(phandle->pmlan_adapter); + phandle->fw_dump = MTRUE; + sdio_claim_host(((struct sdio_mmc_card *)phandle->card)->func); + /* start dump fw memory */ + moal_get_system_time(phandle, &sec, &usec); + PRINTM(MMSG, "==== DEBUG MODE OUTPUT START: %u.%06u ====\n", sec, usec); + /* read the number of the memories which will dump */ + if (RDWR_STATUS_FAILURE == woal_cmd52_rdwr_firmware(phandle, doneflag)) + goto done; + reg = dbg_dump_start_reg; + dump_num = + sdio_readb(((struct sdio_mmc_card *)phandle->card)->func, reg, + &ret); + if (ret) { + PRINTM(MMSG, "SDIO READ MEM NUM ERR\n"); + goto done; + } + + /* read the length of every memory which will dump */ + for (idx = 0; idx < dump_num; idx++) { + if (RDWR_STATUS_FAILURE == + woal_cmd52_rdwr_firmware(phandle, doneflag)) + goto done; + memory_size = 0; + reg = dbg_dump_start_reg; + for (i = 0; i < 4; i++) { + read_reg = + sdio_readb(((struct sdio_mmc_card *)phandle-> + card)->func, reg, &ret); + if (ret) { + PRINTM(MMSG, "SDIO READ ERR\n"); + goto done; + } + memory_size |= (read_reg << i * 8); + reg++; + } + if (memory_size == 0) { + PRINTM(MMSG, "Firmware Dump Finished!\n"); + break; + } else { + PRINTM(MMSG, "%s_SIZE=0x%x\n", + mem_type_mapping_tbl[idx].mem_name, memory_size); + ret = moal_vmalloc(phandle, memory_size + 1, + (t_u8 **)&mem_type_mapping_tbl[idx]. + mem_Ptr); + if ((ret != MLAN_STATUS_SUCCESS) || + !mem_type_mapping_tbl[idx].mem_Ptr) { + PRINTM(MERROR, + "Error: vmalloc %s buffer failed!!!\n", + mem_type_mapping_tbl[idx].mem_name); + goto done; + } + dbg_ptr = mem_type_mapping_tbl[idx].mem_Ptr; + end_ptr = dbg_ptr + memory_size; + } + doneflag = mem_type_mapping_tbl[idx].done_flag; + moal_get_system_time(phandle, &sec, &usec); + PRINTM(MMSG, "Start %s output %u.%06u, please wait...\n", + mem_type_mapping_tbl[idx].mem_name, sec, usec); + do { + stat = woal_cmd52_rdwr_firmware(phandle, doneflag); + if (RDWR_STATUS_FAILURE == stat) + goto done; + + reg_start = dbg_dump_start_reg; + reg_end = dbg_dump_end_reg; + for (reg = reg_start; reg <= reg_end; reg++) { + *dbg_ptr = + sdio_readb(((struct sdio_mmc_card *) + phandle->card)->func, reg, + &ret); + if (ret) { + PRINTM(MMSG, "SDIO READ ERR\n"); + goto done; + } + if (dbg_ptr < end_ptr) + dbg_ptr++; + else + PRINTM(MMSG, + "pre-allocced buf is not enough\n"); + } + if (RDWR_STATUS_DONE == stat) { + PRINTM(MMSG, "%s done:" +#ifdef MLAN_64BIT + "size = 0x%lx\n", +#else + "size = 0x%x\n", +#endif + mem_type_mapping_tbl[idx].mem_name, + dbg_ptr - + mem_type_mapping_tbl[idx].mem_Ptr); + memset(file_name, 0, sizeof(file_name)); + sprintf(file_name, "%s%s", "file_sdio_", + mem_type_mapping_tbl[idx].mem_name); + if (MLAN_STATUS_SUCCESS != + woal_save_dump_info_to_file(path_name, + file_name, + mem_type_mapping_tbl + [idx].mem_Ptr, + memory_size)) + PRINTM(MMSG, + "Can't save dump file %s in %s\n", + file_name, path_name); + moal_vfree(phandle, + mem_type_mapping_tbl[idx].mem_Ptr); + mem_type_mapping_tbl[idx].mem_Ptr = NULL; + break; + } + } while (1); + } + moal_get_system_time(phandle, &sec, &usec); + PRINTM(MMSG, "==== DEBUG MODE OUTPUT END: %u.%06u ====\n", sec, usec); + /* end dump fw memory */ +done: + phandle->fw_dump = MFALSE; + sdio_release_host(((struct sdio_mmc_card *)phandle->card)->func); + for (idx = 0; idx < dump_num; idx++) { + if (mem_type_mapping_tbl[idx].mem_Ptr) { + moal_vfree(phandle, mem_type_mapping_tbl[idx].mem_Ptr); + mem_type_mapping_tbl[idx].mem_Ptr = NULL; + } + } + PRINTM(MMSG, "==== DEBUG MODE END ====\n"); + return; +} + +/** + * @brief This function get card info from card type + * + * @param phandle A pointer to moal_handle + * + * @return N/A + */ +static int +woal_get_card_info(moal_handle *phandle) +{ + int ret = 0; + t_u16 card_type = phandle->card_type; + + ENTER(); + + switch (card_type) { + case CARD_TYPE_SD8777: + phandle->card_info = &card_info_sd8777; + break; + case CARD_TYPE_SD8787: + phandle->card_info = &card_info_sd8787; + break; + case CARD_TYPE_SD8887: + phandle->card_info = &card_info_sd8887; + break; + case CARD_TYPE_SD8801: + phandle->card_info = &card_info_sd8801; + break; + case CARD_TYPE_SD8897: + phandle->card_info = &card_info_sd8897; + break; + case CARD_TYPE_SD8797: + phandle->card_info = &card_info_sd8797; + break; + default: + PRINTM(MERROR, + "woal_get_card_info can't get right card type \n"); + ret = -1; + break; + } + + LEAVE(); + return ret; +} /** * @brief This function reads and displays SDIO registers for debugging @@ -4620,40 +6386,77 @@ woal_dump_drv_info(moal_handle * phandle) * @return N/A */ void -woal_sdio_reg_dbg(moal_handle * phandle) +woal_sdio_reg_dbg(moal_handle *phandle) { int ret = 0; t_u8 loop, index = 0, func, data; unsigned int reg, reg_start, reg_end; - unsigned int reg_table[] = { 0x28, 0x30, 0x34, 0x38, 0x3c }; + unsigned int scratch_reg = SDIO_SCRATCH_REG; + unsigned int reg_table_8887[] = + { 0x08, 0x58, 0x5C, 0x5D, 0x60, 0x61, 0x62, + 0x64, 0x65, 0x66, 0x68, 0x69, 0x6a + }; + unsigned int reg_table_8897[] = + { 0x4C, 0x50, 0x54, 0x55, 0x58, 0x59, 0x5c, 0x5d }; + unsigned int reg_table_other[] = { 0x28, 0x30, 0x34, 0x38, 0x3c }; + unsigned int *reg_table = NULL; + t_u8 reg_table_size = 0; char buf[256], *ptr; + mlan_pm_wakeup_card(phandle->pmlan_adapter); +#define SDIO_SCRATCH_REG_8887 0x90 +#define SDIO_SCRATCH_REG_8897 0xC0 +#define SDIO_SCRATCH_REG_OTHER 0x60 + if (phandle->card_type == CARD_TYPE_SD8887) { + reg_table = reg_table_8887; + reg_table_size = sizeof(reg_table_8887) / sizeof(int); + scratch_reg = SDIO_SCRATCH_REG_8887; + } else if (phandle->card_type == CARD_TYPE_SD8897) { + reg_table = reg_table_8897; + reg_table_size = sizeof(reg_table_8897) / sizeof(int); + scratch_reg = SDIO_SCRATCH_REG_8897; + } else { + reg_table = reg_table_other; + reg_table_size = sizeof(reg_table_other) / sizeof(int); + scratch_reg = SDIO_SCRATCH_REG_OTHER; + } + sdio_claim_host(((struct sdio_mmc_card *)phandle->card)->func); for (loop = 0; loop < 5; loop++) { memset(buf, 0, sizeof(buf)); ptr = buf; - if (loop < 2) { - /* Read the registers of SDIO function0 and function1 */ + if (loop == 0) { + /* Read the registers of SDIO function0 */ func = loop; - if (loop == 1) - reg_start = 4; - else - reg_start = 0; + reg_start = 0; reg_end = 9; + + } else if (loop == 1) { + /* Read the registers of SDIO function1 */ + func = loop; + if (phandle->card_type == CARD_TYPE_SD8897) { + reg_start = 4; + reg_end = 0xB; + } else if (phandle->card_type == CARD_TYPE_SD8887) { + reg_start = 0x10; + reg_end = 0x17; + } else { + reg_start = 4; + reg_end = 9; + } } else if (loop == 2) { /* Read specific registers of SDIO function1 */ index = 0; func = 1; reg_start = reg_table[index++]; - reg_end = reg_table[ARRAY_SIZE(reg_table) - 1]; + reg_end = reg_table[reg_table_size - 1]; } else { /* Read the scratch registers of SDIO function1 */ if (loop == 4) mdelay(100); func = 1; -#define SDIO_SCRATCH_REG 0x60 - reg_start = SDIO_SCRATCH_REG; - reg_end = SDIO_SCRATCH_REG + 10; + reg_start = scratch_reg; + reg_end = scratch_reg + 10; } if (loop != 2) ptr += sprintf(ptr, "SDIO Func%d (%#x-%#x): ", func, @@ -4697,7 +6500,7 @@ woal_sdio_reg_dbg(moal_handle * phandle) * @return N/A */ void -woal_moal_debug_info(moal_private * priv, moal_handle * handle, u8 flag) +woal_moal_debug_info(moal_private *priv, moal_handle *handle, u8 flag) { moal_handle *phandle = NULL; char buf[MLAN_MAX_VER_STR_LEN]; @@ -4774,6 +6577,13 @@ woal_moal_debug_info(moal_private * priv, moal_handle * handle, u8 flag) priv->netdev->name, priv->num_tx_timeout); } +#if defined(SDIO_SUSPEND_RESUME) + if (phandle->is_suspended == MTRUE) { + LEAVE(); + return; + } +#endif + /* Display SDIO registers */ if (flag && ((phandle->main_state == MOAL_END_MAIN_PROCESS) || @@ -4797,10 +6607,11 @@ woal_moal_debug_info(moal_private * priv, moal_handle * handle, u8 flag) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -woal_request_country_power_table(moal_private * priv, char *country) +woal_request_country_power_table(moal_private *priv, char *country) { mlan_status ret = MLAN_STATUS_SUCCESS; moal_handle *handle = NULL; + char *txpwrlimit_cfg_org = NULL; char country_name[] = "txpower_XX.bin"; char file_path[256]; char *last_slash = NULL; @@ -4838,16 +6649,24 @@ woal_request_country_power_table(moal_private * priv, char *country) } else { strncpy(file_path, "mrvl/", sizeof(file_path)); } + txpwrlimit_cfg_org = txpwrlimit_cfg; txpwrlimit_cfg = strncat(file_path, country_name, sizeof(file_path) - strlen(file_path)); - + PRINTM(MERROR,"Attempting to load power table:%s\n",txpwrlimit_cfg); if (MLAN_STATUS_SUCCESS != woal_set_user_init_data(handle, COUNTRY_POWER_TABLE)) { - PRINTM(MFATAL, "Download power table to firmware failed\n"); - ret = MLAN_STATUS_FAILURE; + PRINTM(MERROR, "Loading power table:%s Failed. Attempting to load txpower_ROW.bin\n", txpwrlimit_cfg); + strcpy(txpwrlimit_cfg, "mrvl/txpower_ROW.bin"); + if (MLAN_STATUS_SUCCESS != woal_set_user_init_data(handle, COUNTRY_POWER_TABLE)) { + PRINTM(MERROR,"Loading txpower_ROW.bin Failed as well.\n"); + ret = MLAN_STATUS_FAILURE; + } + else { + ret = MLAN_STATUS_SUCCESS; + } } - txpwrlimit_cfg = NULL; + txpwrlimit_cfg = txpwrlimit_cfg_org; LEAVE(); return ret; } @@ -4860,7 +6679,7 @@ woal_request_country_power_table(moal_private * priv, char *country) * @return N/A */ t_void -woal_rx_work_queue(struct work_struct * work) +woal_rx_work_queue(struct work_struct *work) { moal_handle *handle = container_of(work, moal_handle, rx_work); ENTER(); @@ -4880,7 +6699,7 @@ woal_rx_work_queue(struct work_struct * work) * @return N/A */ t_void -woal_main_work_queue(struct work_struct * work) +woal_main_work_queue(struct work_struct *work) { moal_handle *handle = container_of(work, moal_handle, main_work); #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) @@ -4898,6 +6717,10 @@ woal_main_work_queue(struct work_struct * work) handle->sdio_reg_dbg = MFALSE; woal_sdio_reg_dbg(handle); #if defined(DEBUG_LEVEL1) + if (drvdbg & MFW_D) { + drvdbg &= ~MFW_D; + woal_dump_firmware_info(handle); + } #endif LEAVE(); return; @@ -4936,7 +6759,7 @@ woal_main_work_queue(struct work_struct * work) * @return N/A */ void -woal_interrupt(moal_handle * handle) +woal_interrupt(moal_handle *handle) { ENTER(); handle->main_state = MOAL_RECV_INT; @@ -4988,14 +6811,13 @@ woal_add_card(void *card) goto exit_sem_err; /* Allocate buffer for moal_handle */ - handle = kmalloc(sizeof(moal_handle), GFP_KERNEL); + handle = kzalloc(sizeof(moal_handle), GFP_KERNEL); if (!handle) { PRINTM(MERROR, "Allocate buffer for moal_handle failed!\n"); goto err_handle; } /* Init moal_handle */ - memset(handle, 0, sizeof(moal_handle)); handle->card = card; /* Save the handle */ for (index = 0; index < MAX_MLAN_ADAPTER; index++) { @@ -5025,6 +6847,7 @@ woal_add_card(void *card) if (mac_addr) { t_u8 temp[20]; t_u8 len = strlen(mac_addr) + 1; + PRINTM(MERROR,"woal_add_card(): mac_addr == %s\n",mac_addr); if (len < sizeof(temp)) { memcpy(temp, mac_addr, len); handle->set_mac_addr = 1; @@ -5034,6 +6857,15 @@ woal_add_card(void *card) } } + /* Update card type */ + woal_sdio_update_card_type(handle, card); + /* Get card info */ + woal_get_card_info(handle); + if (handle->card_type == CARD_TYPE_SD8887) + handle->histogram_table_num = 3; + else + handle->histogram_table_num = 1; + ((struct sdio_mmc_card *)card)->handle = handle; #ifdef STA_SUPPORT @@ -5148,13 +6980,27 @@ woal_add_card(void *card) PRINTM(MFATAL, "Failed to register wlan device!\n"); goto err_registerdev; } - + if (req_fw_nowait) { + MOAL_INIT_SEMAPHORE_LOCKED(&LoadUserDataSem); + MOAL_INIT_SEMAPHORE(&LoadUserDataMtx); + } /* Init FW and HW */ if (MLAN_STATUS_SUCCESS != woal_init_fw(handle)) { PRINTM(MFATAL, "Firmware Init Failed\n"); goto err_init_fw; } - + if (handle->card_type == CARD_TYPE_SD8777) { + union { + t_u32 l; + t_u8 c[4]; + } ver; + ver.l = handle->fw_release_number; + if (ver.c[1] == 75) { + handle->card_info->embedded_supp = 0; + PRINTM(MMSG, + "Disable EMBEDED Supplicant for SD8777-FP75\n"); + } + } LEAVE(); return handle; @@ -5224,6 +7070,9 @@ woal_remove_card(void *card) goto exit_remove; handle->surprise_removed = MTRUE; + flush_workqueue(handle->workqueue); + flush_workqueue(handle->rx_workqueue); + /* Stop data */ for (i = 0; i < MIN(handle->priv_num, MLAN_MAX_BSS_NUM); i++) { priv = handle->priv[i]; @@ -5254,6 +7103,8 @@ woal_remove_card(void *card) atomic_read(&handle->tx_pending), atomic_read(&handle->ioctl_pending)); } + unregister_inetaddr_notifier(&woal_notifier); + #if defined(WIFI_DIRECT_SUPPORT) #if defined(STA_CFG80211) && defined(UAP_CFG80211) if (handle->is_go_timer_set) { @@ -5289,7 +7140,6 @@ woal_remove_card(void *card) while (handle->reassoc_thread.pid) woal_sched_timeout(2); #endif /* REASSOCIATION */ - #ifdef CONFIG_PROC_FS woal_proc_exit(handle); #endif @@ -5323,7 +7173,7 @@ woal_remove_card(void *card) * @return MLAN_STATUS_SUCCESS /MLAN_STATUS_FAILURE /MLAN_STATUS_PENDING */ mlan_status -woal_switch_drv_mode(moal_handle * handle, t_u32 mode) +woal_switch_drv_mode(moal_handle *handle, t_u32 mode) { unsigned int i; mlan_status status = MLAN_STATUS_SUCCESS; @@ -5367,6 +7217,8 @@ woal_switch_drv_mode(moal_handle * handle, t_u32 mode) atomic_read(&handle->ioctl_pending)); } + unregister_inetaddr_notifier(&woal_notifier); + /* Remove interface */ for (i = 0; i < handle->priv_num; i++) woal_remove_interface(handle, i); @@ -5428,6 +7280,26 @@ woal_init_module(void) /* Init mutex */ MOAL_INIT_SEMAPHORE(&AddRemoveCardSem); +#ifdef CONFIG_OF + woal_init_from_dev_tree(); +#endif + + /* Create workqueue for hang process */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14) + /* For kernel less than 2.6.14 name can not be greater than 10 + characters */ + hang_workqueue = create_workqueue("MOAL_HANG_WORKQ"); +#else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) + hang_workqueue = alloc_workqueue("MOAL_HANG_WORK_QUEUE", + WQ_HIGHPRI | WQ_MEM_RECLAIM | + WQ_UNBOUND, 1); +#else + hang_workqueue = create_workqueue("MOAL_HANG_WORK_QUEUE"); +#endif +#endif + MLAN_INIT_WORK(&hang_work, woal_hang_work_queue); + /* Register with bus */ ret = woal_bus_register(); if (ret == MLAN_STATUS_SUCCESS) @@ -5453,6 +7325,10 @@ woal_cleanup_module(void) #if defined(STA_SUPPORT) && defined(STA_CFG80211) unsigned long flags; #endif + /** report previous tx status */ +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + unsigned long flag; +#endif ENTER(); @@ -5467,6 +7343,7 @@ woal_cleanup_module(void) goto exit; if (MTRUE == woal_check_driver_status(handle)) goto exit; + #ifdef SDIO_SUSPEND_RESUME #ifdef MMC_PM_KEEP_POWER if (handle->is_suspended == MTRUE) { @@ -5480,10 +7357,20 @@ woal_cleanup_module(void) for (i = 0; i < handle->priv_num; i++) { #ifdef STA_SUPPORT if (GET_BSS_ROLE(handle->priv[i]) == MLAN_BSS_ROLE_STA) { - if (handle->priv[i]->media_connected == MTRUE) + if (handle->priv[i]->media_connected == MTRUE) { woal_disconnect(handle->priv[i], - MOAL_CMD_WAIT, NULL); + MOAL_CMD_WAIT_TIMEOUT, + NULL); + if (handle->ioctl_timeout) { + woal_ioctl_timeout(handle); + goto exit; + } + } #ifdef STA_CFG80211 + if (IS_STA_CFG80211(cfg80211_wext) && + (handle->priv[i]->bss_type == + MLAN_BSS_TYPE_STA)) + woal_clear_conn_params(handle->priv[i]); spin_lock_irqsave(&handle->priv[i]-> scan_req_lock, flags); if (IS_STA_CFG80211(cfg80211_wext) && @@ -5498,7 +7385,11 @@ woal_cleanup_module(void) if (IS_STA_CFG80211(cfg80211_wext) && handle->priv[i]->sched_scanning) { woal_stop_bg_scan(handle->priv[i], - MOAL_IOCTL_WAIT); + MOAL_IOCTL_WAIT_TIMEOUT); + if (handle->ioctl_timeout) { + woal_ioctl_timeout(handle); + goto exit; + } handle->priv[i]->bg_scan_start = MFALSE; handle->priv[i]->bg_scan_reported = MFALSE; @@ -5519,11 +7410,52 @@ woal_cleanup_module(void) if (mfg_mode != MLAN_INIT_PARA_ENABLED) #endif woal_disconnect(handle->priv[i], - MOAL_CMD_WAIT, NULL); + MOAL_CMD_WAIT_TIMEOUT, + NULL); + if (handle->ioctl_timeout) { + woal_ioctl_timeout(handle); + goto exit; + } } #endif #if defined(STA_CFG80211) || defined(UAP_CFG80211) - woal_clear_all_mgmt_ies(handle->priv[i]); + woal_clear_all_mgmt_ies(handle->priv[i], + MOAL_CMD_WAIT_TIMEOUT); + if (handle->ioctl_timeout) { + woal_ioctl_timeout(handle); + goto exit; + } + spin_lock_irqsave(&handle->priv[i]->tx_stat_lock, flag); + /** report previous tx status */ + if (handle->priv[i]->last_tx_buf && + handle->priv[i]->last_tx_cookie) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + cfg80211_mgmt_tx_status(handle->priv[i]->netdev, + handle->priv[i]-> + last_tx_cookie, + handle->priv[i]-> + last_tx_buf, + handle->priv[i]-> + last_tx_buf_len, true, + GFP_ATOMIC); +#else + cfg80211_mgmt_tx_status(handle->priv[i]->wdev, + handle->priv[i]-> + last_tx_cookie, + handle->priv[i]-> + last_tx_buf, + handle->priv[i]-> + last_tx_buf_len, true, + GFP_ATOMIC); +#endif +#endif + kfree(handle->priv[i]->last_tx_buf); + handle->priv[i]->last_tx_buf = NULL; + handle->priv[i]->last_tx_cookie = 0; + } + spin_unlock_irqrestore(&handle->priv[i]->tx_stat_lock, + flag); #endif } @@ -5532,14 +7464,18 @@ woal_cleanup_module(void) #endif woal_set_deep_sleep(woal_get_priv (handle, MLAN_BSS_ROLE_ANY), - MOAL_CMD_WAIT, MFALSE, 0); + MOAL_CMD_WAIT_TIMEOUT, MFALSE, 0); #ifdef MFG_CMD_SUPPORT if (mfg_mode != MLAN_INIT_PARA_ENABLED) #endif woal_shutdown_fw(woal_get_priv (handle, MLAN_BSS_ROLE_ANY), - MOAL_CMD_WAIT); + MOAL_CMD_WAIT_TIMEOUT); + if (handle->ioctl_timeout) { + woal_ioctl_timeout(handle); + goto exit; + } } exit: @@ -5548,6 +7484,11 @@ woal_cleanup_module(void) /* Unregister from bus */ woal_bus_unregister(); PRINTM(MMSG, "wlan: Driver unloaded\n"); + if (hang_workqueue) { + flush_workqueue(hang_workqueue); + destroy_workqueue(hang_workqueue); + hang_workqueue = NULL; + } LEAVE(); } @@ -5580,19 +7521,26 @@ module_exit(woal_cleanup_module); module_param(hw_test, int, 0); MODULE_PARM_DESC(hw_test, "0: Disable hardware test; 1: Enable hardware test"); -module_param(fw_name, charp, 0); +#ifdef CONFIG_OF +module_param(dts_enable, int, 0); +MODULE_PARM_DESC(dts_enable, "0: Disable DTS; 1: Enable DTS"); +#endif +module_param(fw_name, charp, 0660); MODULE_PARM_DESC(fw_name, "Firmware name"); module_param(req_fw_nowait, int, 0); MODULE_PARM_DESC(req_fw_nowait, "0: Use request_firmware API; 1: Use request_firmware_nowait API"); -module_param(mac_addr, charp, 0); +module_param(fw_crc_check, int, 0); +MODULE_PARM_DESC(fw_crc_check, + "1: Enable FW download CRC check (default); 0: Disable FW download CRC check"); +module_param(mac_addr, charp, 0660); MODULE_PARM_DESC(mac_addr, "MAC address"); #ifdef MFG_CMD_SUPPORT -module_param(mfg_mode, int, 0); +module_param(mfg_mode, int, 0660); MODULE_PARM_DESC(mfg_mode, "0: Download normal firmware; 1: Download MFG firmware"); #endif /* MFG_CMD_SUPPORT */ -module_param(drv_mode, int, 0); +module_param(drv_mode, int, 0660); #if defined(WIFI_DIRECT_SUPPORT) MODULE_PARM_DESC(drv_mode, "Bit 0: STA; Bit 1: uAP; Bit 2: WIFIDIRECT"); #else @@ -5621,7 +7569,7 @@ MODULE_PARM_DESC(max_vir_bss, "Number of Virtual interfaces (0)"); #endif #endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ #ifdef DEBUG_LEVEL1 -module_param(drvdbg, uint, 0); +module_param(drvdbg, uint, 0660); MODULE_PARM_DESC(drvdbg, "Driver debug"); #endif /* DEBUG_LEVEL1 */ module_param(auto_ds, int, 0); @@ -5632,8 +7580,11 @@ MODULE_PARM_DESC(ps_mode, "0: MLAN default; 1: Enable IEEE PS mode; 2: Disable IEEE PS mode"); module_param(max_tx_buf, int, 0); MODULE_PARM_DESC(max_tx_buf, "Maximum Tx buffer size (2048/4096/8192)"); +module_param(slew_rate, int, 0); +MODULE_PARM_DESC(slew_rate, + "0:has the slowest slew rate, then 01, then 02, and 03 has the highest slew rate"); #ifdef SDIO_SUSPEND_RESUME -module_param(pm_keep_power, int, 1); +module_param(pm_keep_power, int, 0); MODULE_PARM_DESC(pm_keep_power, "1: PM keep power; 0: PM no power"); module_param(shutdown_hs, int, 0); MODULE_PARM_DESC(shutdown_hs, @@ -5653,7 +7604,7 @@ MODULE_PARM_DESC(txpwrlimit_cfg, "Set configuration data of Tx power limitation"); module_param(init_hostcmd_cfg, charp, 0); MODULE_PARM_DESC(init_hostcmd_cfg, "Init hostcmd file name"); -module_param(cfg80211_wext, int, 0); +module_param(cfg80211_wext, int, 0660); MODULE_PARM_DESC(cfg80211_wext, #ifdef STA_WEXT "Bit 0: STA WEXT; " diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_main.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_main.h old mode 100755 new mode 100644 index 21f48586..6066060b --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_main.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_main.h @@ -52,6 +52,10 @@ Change log: #include #include #include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0) +#include +#include +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18) #include @@ -154,7 +158,8 @@ enum { MOAL_PROC_WAIT, #endif MOAL_WSTATS_WAIT, - MOAL_IOCTL_WAIT_TIMEOUT + MOAL_IOCTL_WAIT_TIMEOUT, + MOAL_CMD_WAIT_TIMEOUT }; /** moal_main_state */ @@ -214,7 +219,7 @@ typedef struct _moal_drv_timer { static inline void woal_timer_handler(unsigned long fcontext) { - pmoal_drv_timer timer = (pmoal_drv_timer) fcontext; + pmoal_drv_timer timer = (pmoal_drv_timer)fcontext; timer->timer_function(timer->function_context); @@ -244,7 +249,7 @@ woal_initialize_timer(pmoal_drv_timer timer, /* First, setup the timer to trigger the wlan_timer_handler proxy */ init_timer(&timer->tl); timer->tl.function = woal_timer_handler; - timer->tl.data = (t_ptr) timer; + timer->tl.data = (t_ptr)timer; /* Then tell the proxy which function to call and what to pass it */ timer->timer_function = TimerFunction; @@ -278,9 +283,9 @@ woal_mod_timer(pmoal_drv_timer timer, t_u32 millisecondperiod) * @return N/A */ static inline void -woal_cancel_timer(moal_drv_timer * timer) +woal_cancel_timer(moal_drv_timer *timer) { - if (timer->timer_is_periodic) + if (timer->timer_is_periodic || in_atomic() || irqs_disabled()) del_timer(&timer->tl); else del_timer_sync(&timer->tl); @@ -314,7 +319,7 @@ typedef struct _moal_thread { * @return N/A */ static inline void -woal_activate_thread(moal_thread * thr) +woal_activate_thread(moal_thread *thr) { /** Initialize the wait queue */ init_waitqueue_head(&thr->wait_q); @@ -330,7 +335,7 @@ woal_activate_thread(moal_thread * thr) * @return N/A */ static inline void -woal_deactivate_thread(moal_thread * thr) +woal_deactivate_thread(moal_thread *thr) { /* Reset the pid */ thr->pid = 0; @@ -345,7 +350,7 @@ woal_deactivate_thread(moal_thread * thr) * @return N/A */ static inline void -woal_create_thread(int (*threadfunc) (void *), moal_thread * thr, char *name) +woal_create_thread(int (*threadfunc) (void *), moal_thread *thr, char *name) { /* Create and run the thread */ thr->task = kthread_run(threadfunc, thr, "%s", name); @@ -423,7 +428,7 @@ xdigit2bin(char c, int delim) } static inline int -in4_pton(const char *src, int srclen, u8 * dst, int delim, const char **end) +in4_pton(const char *src, int srclen, u8 *dst, int delim, const char **end) { const char *s; u8 *d; @@ -531,10 +536,17 @@ in4_pton(const char *src, int srclen, u8 * dst, int delim, const char **end) /** Threshold value of number of times the Tx timeout happened */ #define NUM_TX_TIMEOUT_THRESHOLD 5 +/** Custom event : DRIVER HANG */ +#define CUS_EVT_DRIVER_HANG "EVENT=DRIVER_HANG" + /** TDLS connected event */ #define CUS_EVT_TDLS_CONNECTED "EVENT=TDLS_CONNECTED" /** TDLS tear down event */ #define CUS_EVT_TDLS_TEARDOWN "EVENT=TDLS_TEARDOWN" +/** wmm info */ +#define WMM_TYPE_INFO 0 +/** wmm parameter */ +#define WMM_TYPE_PARAMETER 1 /** AP connected event */ #define CUS_EVT_AP_CONNECTED "EVENT=AP_CONNECTED" @@ -635,6 +647,8 @@ in4_pton(const char *src, int srclen, u8 * dst, int delim, const char **end) /** Netlink multicast group number */ #define NL_MULTICAST_GROUP 1 +#define MAX_RX_PENDING_THRHLD 50 + /** MAX Tx Pending count */ #define MAX_TX_PENDING 100 @@ -656,6 +670,8 @@ in4_pton(const char *src, int srclen, u8 * dst, int delim, const char **end) #define SKB_TOS(skb) (skb->nh.iph->tos) #endif #define SKB_TIDV6(skb) (ipv6_get_dsfield(ipv6_hdr(skb))) +#define IS_SKB_MAGIC_VLAN(skb) (skb->priority >= 256 && skb->priority <= 263) +#define GET_VLAN_PRIO(skb) (skb->priority - 256) /** Offset for TOS field in the IP header */ #define IPTOS_OFFSET 5 @@ -670,7 +686,7 @@ typedef struct _wait_queue { /** Wait condition */ BOOLEAN condition; /** Start time */ - t_u32 start_time; + long start_time; /** Status from MLAN */ mlan_status status; /** flag for wait_timeout */ @@ -798,6 +814,79 @@ struct tcp_sess { void *ack_skb; }; +/** default rssi low threshold */ +#define TDLS_RSSI_LOW_THRESHOLD 55 +/** default rssi high threshold */ +#define TDLS_RSSI_HIGH_THRESHOLD 50 +/** TDLS idle time */ +#define TDLS_IDLE_TIME (10*HZ) +/** TDLS max failure count */ +#define TDLS_MAX_FAILURE_COUNT 4 +/** TDLS tear down reason */ +#define TDLS_TEARN_DOWN_REASON_UNSPECIFIC 26 + +/** TDLS status */ +typedef enum _tdlsStatus_e { + TDLS_NOT_SETUP = 0, + TDLS_SETUP_INPROGRESS, + TDLS_SETUP_COMPLETE, + TDLS_SETUP_FAILURE, + TDLS_TEAR_DOWN, + TDLS_SWITCHING_CHANNEL, + TDLS_IN_BASE_CHANNEL, + TDLS_IN_OFF_CHANNEL, +} tdlsStatus_e; + +/** tdls peer_info */ +struct tdls_peer { + struct list_head link; + /** MAC address information */ + t_u8 peer_addr[ETH_ALEN]; + /** rssi */ + int rssi; + /** jiffies with rssi */ + long rssi_jiffies; + /** link status */ + tdlsStatus_e link_status; + /** num of set up failure */ + t_u8 num_failure; +}; + +/** Number of samples in histogram (/proc/mwlan/mlan0/histogram).*/ +#define HIST_MAX_SAMPLES 1048576 +#define RX_RATE_MAX 44 + +/** SRN MAX */ +#define SNR_MAX 256 +/** NOISE FLR MAX */ +#define NOISE_FLR_MAX 256 +/** SIG STRENTGH MAX */ +#define SIG_STRENGTH_MAX 256 +/** historgram data */ +typedef struct _hgm_data { + /** rx rate */ + atomic_t rx_rate[RX_RATE_MAX]; + /** snr */ + atomic_t snr[SNR_MAX]; + /** noise flr */ + atomic_t noise_flr[NOISE_FLR_MAX]; + /** sig_str */ + atomic_t sig_str[SIG_STRENGTH_MAX]; + /** num sample */ + atomic_t num_samples; +} hgm_data; + +/** max antenna number */ +#define MAX_ANTENNA_NUM 3 + +/* wlan_hist_proc_data */ +typedef struct _wlan_hist_proc_data { + /** antenna */ + u8 ant_idx; + /** Private structure */ + struct _moal_private *priv; +} wlan_hist_proc_data; + /** Private structure for MOAL */ struct _moal_private { /** Handle structure */ @@ -824,6 +913,10 @@ struct _moal_private { /** uAP started or not */ BOOLEAN bss_started; #endif + /** IP addr type */ + t_u32 ip_addr_type; + /** IP addr */ + t_u8 ip_addr[IPADDR_LEN]; #ifdef STA_SUPPORT /** scan type */ t_u8 scan_type; @@ -835,6 +928,24 @@ struct _moal_private { wlan_bgscan_cfg scan_cfg; /** sched scaning flag */ t_u8 sched_scanning; +#ifdef STA_CFG80211 + /** roaming enabled flag */ + t_u8 roaming_enabled; + /** rssi low threshold */ + int rssi_low; + /** channel for connect */ + struct ieee80211_channel conn_chan; + /** bssid for connect */ + t_u8 conn_bssid[ETH_ALEN]; + /** ssid for connect */ + t_u8 conn_ssid[MLAN_MAX_SSID_LENGTH]; + /** key data */ + t_u8 conn_wep_key[MAX_WEP_KEY_SIZE]; + /** connection param */ + struct cfg80211_connect_params sme_current; + /** roaming required flag */ + t_u8 roaming_required; +#endif #endif /** Net device pointer */ struct net_device *netdev; @@ -900,7 +1011,6 @@ struct _moal_private { u32 last_event; /** fake scan flag */ u8 fake_scan_complete; - #endif /* STA_SUPPORT */ #endif /* STA_CFG80211 */ /** IOCTL wait queue */ @@ -912,6 +1022,10 @@ struct _moal_private { struct proc_dir_entry *proc_entry; /** Proc entry name */ char proc_entry_name[IFNAMSIZ]; + /** proc entry for hist */ + struct proc_dir_entry *hist_entry; + /** ant_hist_proc_data */ + wlan_hist_proc_data hist_proc[MAX_ANTENNA_NUM]; /** PROC wait queue */ wait_queue_head_t proc_wait_q __ATTRIB_ALIGN__; #endif /* CONFIG_PROC_FS */ @@ -966,7 +1080,6 @@ struct _moal_private { #ifdef PROC_DEBUG /** MLAN debug info */ struct debug_data_priv items_priv; - struct debug_data_priv items_priv_hist; struct debug_data_priv items_priv_peers; #endif @@ -976,13 +1089,45 @@ struct _moal_private { t_u8 enable_tcp_ack_enh; /** TCP session spin lock */ spinlock_t tcp_sess_lock; - + /** tcp list */ + struct list_head tdls_list; + /** tdls spin lock */ + spinlock_t tdls_lock; + /** auto tdls flag */ + t_u8 enable_auto_tdls; + /** check tx packet for tdls peer */ + t_u8 tdls_check_tx; #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) atomic_t wmm_tx_pending[4]; #endif /** per interface extra headroom */ t_u16 extra_tx_head_len; + /** TX status spin lock */ + spinlock_t tx_stat_lock; + /** tx_seq_num */ + t_u8 tx_seq_num; +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + /** tx_buf */ + t_u8 *last_tx_buf; + /** tx_buf_len */ + t_u8 last_tx_buf_len; + /** cookie */ + t_u64 last_tx_cookie; +#endif + /** rx hgm data */ + hgm_data *hist_data[3]; }; +/** card info */ +typedef struct _card_info { + /** support embeded supp */ + t_bool embedded_supp; + /** support drcs */ + t_bool drcs; + /** support Go NOA*/ + t_bool go_noa; + /** support V15_UPDATE*/ + t_bool v15_update; +} card_info; /** Handle data structure for MOAL */ struct _moal_handle { @@ -1010,7 +1155,7 @@ struct _moal_handle { const struct firmware *user_data; /** Hotplug device */ struct device *hotplug_device; - /** STATUS variables */ + /** STATUS variables */ MOAL_HARDWARE_STATUS hardware_status; /** POWER MANAGEMENT AND PnP SUPPORT */ BOOLEAN surprise_removed; @@ -1089,6 +1234,10 @@ struct _moal_handle { /** scan channel gap */ t_u16 scan_chan_gap; #ifdef WIFI_DIRECT_SUPPORT + /** NoA duration */ + t_u32 noa_duration; + /** NoA interval */ + t_u32 noa_interval; /** miracast mode */ t_u8 miracast_mode; /** scan time in miracast mode */ @@ -1125,9 +1274,21 @@ struct _moal_handle { struct sock *nl_sk; /** Netlink kernel socket number */ t_u32 netlink_num; + /** w_stats wait queue token */ + BOOLEAN meas_wait_q_woken; + /** w_stats wait queue */ + wait_queue_head_t meas_wait_q __ATTRIB_ALIGN__; + /** Measurement start jiffes */ + long meas_start_jiffies; + /** CAC checking period flag */ + BOOLEAN cac_period; + /** BSS START command delay executing flag */ + BOOLEAN delay_bss_start; + /** SSID,BSSID parameter of delay executing */ + mlan_ssid_bssid delay_ssid_bssid; #ifdef DFS_TESTING_SUPPORT /** cac period length, valid only when dfs testing is enabled */ - t_u32 cac_period_jiffies; + long cac_period_jiffies; #endif /** handle index - for multiple card supports */ t_u8 handle_idx; @@ -1147,6 +1308,10 @@ struct _moal_handle { t_u8 main_state; /** driver state */ t_u8 driver_state; + /** ioctl timeout */ + t_u8 ioctl_timeout; + /** FW dump state */ + t_u8 fw_dump; /** cmd52 function */ t_u8 cmd52_func; /** cmd52 register */ @@ -1161,11 +1326,14 @@ struct _moal_handle { spinlock_t driver_lock; /** Driver ioctl spin lock */ spinlock_t ioctl_lock; + /** Card type */ + t_u16 card_type; + /** card info */ + card_info *card_info; /** Card specific driver version */ t_s8 driver_version[MLAN_MAX_VER_STR_LEN]; - + t_u8 histogram_table_num; }; - /** * @brief set trans_start for each TX queue. * @@ -1213,7 +1381,7 @@ woal_stop_queue(struct net_device *dev) { #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) unsigned long flags; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); spin_lock_irqsave(&priv->phandle->queue_lock, flags); woal_set_trans_start(dev); if (!netif_queue_stopped(dev)) @@ -1238,7 +1406,7 @@ woal_wake_queue(struct net_device *dev) { #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) unsigned long flags; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); spin_lock_irqsave(&priv->phandle->queue_lock, flags); if (netif_queue_stopped(dev)) netif_tx_wake_all_queues(dev); @@ -1256,43 +1424,73 @@ extern t_u32 drvdbg; #define LOG_CTRL(level) (0) #ifdef DEBUG_LEVEL2 -#define PRINTM_MINFO(level, msg...) do {woal_print(level, msg); \ - if (drvdbg & MINFO) printk(KERN_DEBUG msg); } while (0) -#define PRINTM_MWARN(level, msg...) do {woal_print(level, msg); \ - if (drvdbg & MWARN) printk(KERN_DEBUG msg); } while (0) -#define PRINTM_MENTRY(level, msg...) do {woal_print(level, msg); \ - if (drvdbg & MENTRY) printk(KERN_DEBUG msg); } while (0) +#define PRINTM_MINFO(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MINFO) printk(KERN_DEBUG msg); \ +} while (0) +#define PRINTM_MWARN(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MWARN) printk(KERN_DEBUG msg); \ +} while (0) +#define PRINTM_MENTRY(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MENTRY) printk(KERN_DEBUG msg); \ +} while (0) #else #define PRINTM_MINFO(level, msg...) do {} while (0) #define PRINTM_MWARN(level, msg...) do {} while (0) #define PRINTM_MENTRY(level, msg...) do {} while (0) #endif /* DEBUG_LEVEL2 */ -#define PRINTM_MFW_D(level, msg...) do {woal_print(level, msg); \ - if (drvdbg & MFW_D) printk(KERN_DEBUG msg); } while (0) -#define PRINTM_MCMD_D(level, msg...) do {woal_print(level, msg); \ - if (drvdbg & MCMD_D) printk(KERN_DEBUG msg); } while (0) -#define PRINTM_MDAT_D(level, msg...) do {woal_print(level, msg); \ - if (drvdbg & MDAT_D) printk(KERN_DEBUG msg); } while (0) -#define PRINTM_MIF_D(level, msg...) do {woal_print(level, msg); \ - if (drvdbg & MIF_D) printk(KERN_DEBUG msg); } while (0) - -#define PRINTM_MIOCTL(level, msg...) do {woal_print(level, msg); \ - if (drvdbg & MIOCTL) printk(KERN_DEBUG msg); } while (0) -#define PRINTM_MINTR(level, msg...) do {woal_print(level, msg); \ - if (drvdbg & MINTR) printk(KERN_DEBUG msg); } while (0) -#define PRINTM_MEVENT(level, msg...) do {woal_print(level, msg); \ - if (drvdbg & MEVENT) printk(msg); } while (0) -#define PRINTM_MCMND(level, msg...) do {woal_print(level, msg); \ - if (drvdbg & MCMND) printk(KERN_DEBUG msg); } while (0) -#define PRINTM_MDATA(level, msg...) do {woal_print(level, msg); \ - if (drvdbg & MDATA) printk(KERN_DEBUG msg); } while (0) -#define PRINTM_MERROR(level, msg...) do {woal_print(level, msg); \ - if (drvdbg & MERROR) printk(KERN_ERR msg); } while (0) -#define PRINTM_MFATAL(level, msg...) do {woal_print(level, msg); \ - if (drvdbg & MFATAL) printk(KERN_ERR msg); } while (0) -#define PRINTM_MMSG(level, msg...) do {woal_print(level, msg); \ - if (drvdbg & MMSG) printk(KERN_ALERT msg); } while (0) +#define PRINTM_MFW_D(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MFW_D) printk(KERN_DEBUG msg); \ +} while (0) +#define PRINTM_MCMD_D(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MCMD_D) printk(KERN_DEBUG msg); \ +} while (0) +#define PRINTM_MDAT_D(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MDAT_D) printk(KERN_DEBUG msg); \ +} while (0) +#define PRINTM_MIF_D(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MIF_D) printk(KERN_DEBUG msg); \ +} while (0) + +#define PRINTM_MIOCTL(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MIOCTL) printk(KERN_DEBUG msg); \ +} while (0) +#define PRINTM_MINTR(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MINTR) printk(KERN_DEBUG msg); \ +} while (0) +#define PRINTM_MEVENT(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MEVENT) printk(msg); \ +} while (0) +#define PRINTM_MCMND(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MCMND) printk(KERN_DEBUG msg); \ +} while (0) +#define PRINTM_MDATA(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MDATA) printk(KERN_DEBUG msg); \ +} while (0) +#define PRINTM_MERROR(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MERROR) printk(KERN_ERR msg); \ +} while (0) +#define PRINTM_MFATAL(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MFATAL) printk(KERN_ERR msg); \ +} while (0) +#define PRINTM_MMSG(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MMSG) printk(KERN_ALERT msg); \ +} while (0) static inline void woal_print(t_u32 level, char *fmt, ...) @@ -1328,7 +1526,7 @@ do { \ #define MAX_DUMP_PER_LINE 16 static inline void -hexdump(t_u32 level, char *prompt, t_u8 * buf, int len) +hexdump(t_u32 level, char *prompt, t_u8 *buf, int len) { int i; char dbgdumpbuf[DBG_DUMP_BUF_LEN]; @@ -1353,18 +1551,30 @@ hexdump(t_u32 level, char *prompt, t_u8 * buf, int len) } } -#define DBG_HEXDUMP_MERROR(x, y, z) do {if ((drvdbg & MERROR) || \ - LOG_CTRL(MERROR)) hexdump(MERROR, x, y, z); } while (0) -#define DBG_HEXDUMP_MCMD_D(x, y, z) do {if ((drvdbg & MCMD_D) || \ - LOG_CTRL(MCMD_D)) hexdump(MCMD_D, x, y, z); } while (0) -#define DBG_HEXDUMP_MDAT_D(x, y, z) do {if ((drvdbg & MDAT_D) || \ - LOG_CTRL(MDAT_D)) hexdump(MDAT_D, x, y, z); } while (0) -#define DBG_HEXDUMP_MIF_D(x, y, z) do {if ((drvdbg & MIF_D) || \ - LOG_CTRL(MIF_D)) hexdump(MIF_D, x, y, z); } while (0) -#define DBG_HEXDUMP_MEVT_D(x, y, z) do {if ((drvdbg & MEVT_D) || \ - LOG_CTRL(MEVT_D)) hexdump(MEVT_D, x, y, z); } while (0) -#define DBG_HEXDUMP_MFW_D(x, y, z) do {if ((drvdbg & MFW_D) || \ - LOG_CTRL(MFW_D)) hexdump(MFW_D, x, y, z); } while (0) +#define DBG_HEXDUMP_MERROR(x, y, z) do { \ + if ((drvdbg & MERROR) || LOG_CTRL(MERROR)) \ + hexdump(MERROR, x, y, z); \ +} while (0) +#define DBG_HEXDUMP_MCMD_D(x, y, z) do { \ + if ((drvdbg & MCMD_D) || LOG_CTRL(MCMD_D)) \ + hexdump(MCMD_D, x, y, z); \ +} while (0) +#define DBG_HEXDUMP_MDAT_D(x, y, z) do { \ + if ((drvdbg & MDAT_D) || LOG_CTRL(MDAT_D)) \ + hexdump(MDAT_D, x, y, z); \ +} while (0) +#define DBG_HEXDUMP_MIF_D(x, y, z) do { \ + if ((drvdbg & MIF_D) || LOG_CTRL(MIF_D)) \ + hexdump(MIF_D, x, y, z); \ +} while (0) +#define DBG_HEXDUMP_MEVT_D(x, y, z) do { \ + if ((drvdbg & MEVT_D) || LOG_CTRL(MEVT_D)) \ + hexdump(MEVT_D, x, y, z); \ +} while (0) +#define DBG_HEXDUMP_MFW_D(x, y, z) do { \ + if ((drvdbg & MFW_D) || LOG_CTRL(MFW_D)) \ + hexdump(MFW_D, x, y, z); \ +} while (0) #define DBG_HEXDUMP(level, x, y, z) DBG_HEXDUMP_##level(x, y, z) #else @@ -1373,8 +1583,10 @@ hexdump(t_u32 level, char *prompt, t_u8 * buf, int len) #endif #ifdef DEBUG_LEVEL2 -#define HEXDUMP(x, y, z) do {if ((drvdbg & MINFO) || \ - LOG_CTRL(MINFO)) hexdump(MINFO, x, y, z); } while (0) +#define HEXDUMP(x, y, z) do { \ + if ((drvdbg & MINFO) || LOG_CTRL(MINFO)) \ + hexdump(MINFO, x, y, z); \ +} while (0) #else /** Do nothing since debugging is not turned on */ #define HEXDUMP(x, y, z) do {} while (0) @@ -1418,7 +1630,7 @@ hexdump(t_u32 level, char *prompt, t_u8 * buf, int len) * @return Pointer to moal_private */ static inline moal_private * -woal_get_priv(moal_handle * handle, mlan_bss_role bss_role) +woal_get_priv(moal_handle *handle, mlan_bss_role bss_role) { int i; @@ -1442,7 +1654,7 @@ woal_get_priv(moal_handle * handle, mlan_bss_role bss_role) * @return Pointer to moal_private */ static inline moal_private * -woal_get_priv_bss_type(moal_handle * handle, mlan_bss_type bss_type) +woal_get_priv_bss_type(moal_handle *handle, mlan_bss_type bss_type) { int i; @@ -1488,6 +1700,19 @@ typedef struct _HostCmd_DS_802_11_CFG_DATA { t_u8 data[1]; } __ATTRIB_PACK__ HostCmd_DS_802_11_CFG_DATA; +/** SD8787 card type */ +#define CARD_TYPE_SD8787 0x01 +/** SD8777 card type */ +#define CARD_TYPE_SD8777 0x02 +/** SD8887 card type */ +#define CARD_TYPE_SD8887 0x03 +/** SD8801 card type */ +#define CARD_TYPE_SD8801 0x04 +/** SD8897 card type */ +#define CARD_TYPE_SD8897 0x05 +/** SD8797 card type */ +#define CARD_TYPE_SD8797 0x06 + /** combo scan header */ #define WEXT_CSCAN_HEADER "CSCAN S\x01\x00\x00S\x00" /** combo scan header size */ @@ -1511,6 +1736,15 @@ typedef struct _HostCmd_DS_802_11_CFG_DATA { /** default repeat count */ #define DEF_REPEAT_COUNT 6 +/** default rssi low threshold */ +#define DEFAULT_RSSI_LOW_THRESHOLD 70 +/** RSSI HYSTERSIS */ +#define RSSI_HYSTERESIS 6 +/** lowest rssi threshold */ +#define LOWEST_RSSI_THRESHOLD 82 +/** delta rssi */ +#define DELTA_RSSI 10 + /** NL80211 scan configuration header */ #define NL80211_SCANCFG_HEADER "SCAN-CFG " /** NL80211 scan configuration header length */ @@ -1541,11 +1775,11 @@ typedef struct _HostCmd_DS_802_11_CFG_DATA { #define RX_FILTER_IPV6_MULTICAST 8 /** Convert ASCII string to hex value */ -int woal_ascii2hex(t_u8 * d, char *s, t_u32 dlen); +int woal_ascii2hex(t_u8 *d, char *s, t_u32 dlen); /** parse ie */ -const t_u8 *woal_parse_ie_tlv(const t_u8 * ie, int len, t_u8 id); +const t_u8 *woal_parse_ie_tlv(const t_u8 *ie, int len, t_u8 id); /** Convert mac address from string to t_u8 buffer */ -void woal_mac2u8(t_u8 * mac_addr, char *buf); +void woal_mac2u8(t_u8 *mac_addr, char *buf); /** Extract token from string */ char *woal_strsep(char **s, char delim, char esc); /** Return int value of a given ASCII string */ @@ -1553,190 +1787,202 @@ mlan_status woal_atoi(int *data, char *a); /** Return hex value of a given ASCII string */ int woal_atox(char *a); /** Allocate buffer */ -pmlan_buffer woal_alloc_mlan_buffer(moal_handle * handle, int size); +pmlan_buffer woal_alloc_mlan_buffer(moal_handle *handle, int size); /** Allocate IOCTL request buffer */ pmlan_ioctl_req woal_alloc_mlan_ioctl_req(int size); /** Free buffer */ -void woal_free_mlan_buffer(moal_handle * handle, pmlan_buffer pmbuf); +void woal_free_mlan_buffer(moal_handle *handle, pmlan_buffer pmbuf); /** Get private structure of a BSS by index */ -moal_private *woal_bss_index_to_priv(moal_handle * handle, t_u8 bss_index); +moal_private *woal_bss_index_to_priv(moal_handle *handle, t_u8 bss_index); /* Functions in interface module */ /** Add card */ moal_handle *woal_add_card(void *card); /** Remove card */ mlan_status woal_remove_card(void *card); /** broadcast event */ -mlan_status woal_broadcast_event(moal_private * priv, t_u8 * payload, - t_u32 len); +mlan_status woal_broadcast_event(moal_private *priv, t_u8 *payload, t_u32 len); #ifdef CONFIG_PROC_FS /** switch driver mode */ -mlan_status woal_switch_drv_mode(moal_handle * handle, t_u32 mode); +mlan_status woal_switch_drv_mode(moal_handle *handle, t_u32 mode); #endif /** Interrupt handler */ -void woal_interrupt(moal_handle * handle); +void woal_interrupt(moal_handle *handle); /** Get version */ -void woal_get_version(moal_handle * handle, char *version, int maxlen); +void woal_get_version(moal_handle *handle, char *version, int maxlen); /** Get Driver Version */ -int woal_get_driver_version(moal_private * priv, struct ifreq *req); +int woal_get_driver_version(moal_private *priv, struct ifreq *req); /** Get extended driver version */ -int woal_get_driver_verext(moal_private * priv, struct ifreq *ireq); +int woal_get_driver_verext(moal_private *priv, struct ifreq *ireq); /** check driver status */ -t_u8 woal_check_driver_status(moal_handle * handle); +t_u8 woal_check_driver_status(moal_handle *handle); /** Mgmt frame forward registration */ -int woal_reg_rx_mgmt_ind(moal_private * priv, t_u16 action, - t_u32 * pmgmt_subtype_mask, t_u8 wait_option); +int woal_reg_rx_mgmt_ind(moal_private *priv, t_u16 action, + t_u32 *pmgmt_subtype_mask, t_u8 wait_option); #ifdef DEBUG_LEVEL1 /** Set driver debug bit masks */ -int woal_set_drvdbg(moal_private * priv, t_u32 drvdbg); +int woal_set_drvdbg(moal_private *priv, t_u32 drvdbg); #endif +mlan_status woal_set_get_tx_bf_cap(moal_private *priv, t_u16 action, + t_u32 *tx_bf_cap); /** Request MAC address setting */ -mlan_status woal_request_set_mac_address(moal_private * priv); +mlan_status woal_request_set_mac_address(moal_private *priv); /** Request multicast list setting */ -void woal_request_set_multicast_list(moal_private * priv, +void woal_request_set_multicast_list(moal_private *priv, struct net_device *dev); /** Request IOCTL action */ -mlan_status woal_request_ioctl(moal_private * priv, mlan_ioctl_req * req, +mlan_status woal_request_ioctl(moal_private *priv, mlan_ioctl_req *req, t_u8 wait_option); #ifdef CONFIG_PROC_FS -mlan_status woal_request_soft_reset(moal_handle * handle); +mlan_status woal_request_soft_reset(moal_handle *handle); #endif + #ifdef PROC_DEBUG /** Get debug information */ -mlan_status woal_get_debug_info(moal_private * priv, t_u8 wait_option, - mlan_debug_info * debug_info); +mlan_status woal_get_debug_info(moal_private *priv, t_u8 wait_option, + mlan_debug_info *debug_info); /** Set debug information */ -mlan_status woal_set_debug_info(moal_private * priv, t_u8 wait_option, - mlan_debug_info * debug_info); +mlan_status woal_set_debug_info(moal_private *priv, t_u8 wait_option, + mlan_debug_info *debug_info); #endif /** Disconnect */ -mlan_status woal_disconnect(moal_private * priv, t_u8 wait_option, t_u8 * mac); +mlan_status woal_disconnect(moal_private *priv, t_u8 wait_option, t_u8 *mac); /** associate */ -mlan_status woal_bss_start(moal_private * priv, t_u8 wait_option, - mlan_ssid_bssid * ssid_bssid); +mlan_status woal_bss_start(moal_private *priv, t_u8 wait_option, + mlan_ssid_bssid *ssid_bssid); /** Request firmware information */ -mlan_status woal_request_get_fw_info(moal_private * priv, t_u8 wait_option, - mlan_fw_info * fw_info); +mlan_status woal_request_get_fw_info(moal_private *priv, t_u8 wait_option, + mlan_fw_info *fw_info); /** Set/get Host Sleep parameters */ -mlan_status woal_set_get_hs_params(moal_private * priv, t_u16 action, - t_u8 wait_option, mlan_ds_hs_cfg * hscfg); +mlan_status woal_set_get_hs_params(moal_private *priv, t_u16 action, + t_u8 wait_option, mlan_ds_hs_cfg *hscfg); /** Cancel Host Sleep configuration */ -mlan_status woal_cancel_hs(moal_private * priv, t_u8 wait_option); +mlan_status woal_cancel_hs(moal_private *priv, t_u8 wait_option); #if defined(SDIO_SUSPEND_RESUME) /** Enable Host Sleep configuration */ -int woal_enable_hs(moal_private * priv); +int woal_enable_hs(moal_private *priv); /** hs active timeout 2 second */ #define HS_ACTIVE_TIMEOUT (2 * HZ) #endif -void woal_dump_drv_info(moal_handle * phandle); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0) +void woal_create_dump_dir(moal_handle *phandle, char *dir_buf, int buf_size); +#endif +mlan_status woal_save_dump_info_to_file(char *dir_name, char *file_name, + t_u8 *buf, t_u32 buf_len); +void woal_dump_drv_info(moal_handle *phandle, t_u8 *dir_name); + +void woal_dump_firmware_info(moal_handle *phandle); +void woal_dump_firmware_info_v2(moal_handle *phandle); /** get deep sleep */ -int woal_get_deep_sleep(moal_private * priv, t_u32 * data); +int woal_get_deep_sleep(moal_private *priv, t_u32 *data); /** set deep sleep */ -int woal_set_deep_sleep(moal_private * priv, t_u8 wait_option, +int woal_set_deep_sleep(moal_private *priv, t_u8 wait_option, BOOLEAN bdeep_sleep, t_u16 idletime); - +/** process hang */ +void woal_process_hang(moal_handle *handle); /** Get BSS information */ -mlan_status woal_get_bss_info(moal_private * priv, t_u8 wait_option, - mlan_bss_info * bss_info); -void woal_process_ioctl_resp(moal_private * priv, mlan_ioctl_req * req); +mlan_status woal_get_bss_info(moal_private *priv, t_u8 wait_option, + mlan_bss_info *bss_info); +void woal_process_ioctl_resp(moal_private *priv, mlan_ioctl_req *req); #ifdef STA_SUPPORT -void woal_send_disconnect_to_system(moal_private * priv); -void woal_send_mic_error_event(moal_private * priv, t_u32 event); -void woal_ioctl_get_bss_resp(moal_private * priv, mlan_ds_bss * bss); -void woal_ioctl_get_info_resp(moal_private * priv, mlan_ds_get_info * info); -mlan_status woal_get_assoc_rsp(moal_private * priv, - mlan_ds_misc_assoc_rsp * assoc_rsp); +void woal_send_disconnect_to_system(moal_private *priv); +void woal_send_mic_error_event(moal_private *priv, t_u32 event); +void woal_ioctl_get_bss_resp(moal_private *priv, mlan_ds_bss *bss); +void woal_ioctl_get_info_resp(moal_private *priv, mlan_ds_get_info *info); +mlan_status woal_get_assoc_rsp(moal_private *priv, + mlan_ds_misc_assoc_rsp *assoc_rsp); /** Get signal information */ -mlan_status woal_get_signal_info(moal_private * priv, t_u8 wait_option, - mlan_ds_get_signal * signal); +mlan_status woal_get_signal_info(moal_private *priv, t_u8 wait_option, + mlan_ds_get_signal *signal); /** Get mode */ -t_u32 woal_get_mode(moal_private * priv, t_u8 wait_option); +t_u32 woal_get_mode(moal_private *priv, t_u8 wait_option); char *region_code_2_string(t_u8 region_code); t_u8 woal_is_valid_alpha2(char *alpha2); /** Get statistics information */ -mlan_status woal_get_stats_info(moal_private * priv, t_u8 wait_option, - mlan_ds_get_stats * stats); +mlan_status woal_get_stats_info(moal_private *priv, t_u8 wait_option, + mlan_ds_get_stats *stats); #ifdef STA_WEXT /** Get data rates */ -mlan_status woal_get_data_rates(moal_private * priv, t_u8 wait_option, - moal_802_11_rates * m_rates); -void woal_send_iwevcustom_event(moal_private * priv, char *str); +mlan_status woal_get_data_rates(moal_private *priv, t_u8 wait_option, + moal_802_11_rates *m_rates); +void woal_send_iwevcustom_event(moal_private *priv, char *str); /** Get channel list */ -mlan_status woal_get_channel_list(moal_private * priv, t_u8 wait_option, - mlan_chan_list * chanlist); +mlan_status woal_get_channel_list(moal_private *priv, t_u8 wait_option, + mlan_chan_list *chanlist); #endif /** Set/Get retry count */ -mlan_status woal_set_get_retry(moal_private * priv, t_u32 action, +mlan_status woal_set_get_retry(moal_private *priv, t_u32 action, t_u8 wait_option, int *value); /** Set/Get RTS threshold */ -mlan_status woal_set_get_rts(moal_private * priv, t_u32 action, - t_u8 wait_option, int *value); +mlan_status woal_set_get_rts(moal_private *priv, t_u32 action, t_u8 wait_option, + int *value); /** Set/Get fragment threshold */ -mlan_status woal_set_get_frag(moal_private * priv, t_u32 action, +mlan_status woal_set_get_frag(moal_private *priv, t_u32 action, t_u8 wait_option, int *value); /** Set/Get generic element */ -mlan_status woal_set_get_gen_ie(moal_private * priv, t_u32 action, t_u8 * ie, - int *ie_len); +mlan_status woal_set_get_gen_ie(moal_private *priv, t_u32 action, t_u8 *ie, + int *ie_len, t_u8 wait_option); /** Set/Get TX power */ -mlan_status woal_set_get_tx_power(moal_private * priv, t_u32 action, - mlan_power_cfg_t * pwr); +mlan_status woal_set_get_tx_power(moal_private *priv, t_u32 action, + mlan_power_cfg_t *pwr); /** Set/Get power IEEE management */ -mlan_status woal_set_get_power_mgmt(moal_private * priv, t_u32 action, +mlan_status woal_set_get_power_mgmt(moal_private *priv, t_u32 action, int *disabled, int type, t_u8 wait_option); /** Get data rate */ -mlan_status woal_set_get_data_rate(moal_private * priv, t_u8 action, - mlan_rate_cfg_t * datarate); +mlan_status woal_set_get_data_rate(moal_private *priv, t_u8 action, + mlan_rate_cfg_t *datarate); /** Request a network scan */ -mlan_status woal_request_scan(moal_private * priv, t_u8 wait_option, - mlan_802_11_ssid * req_ssid); +mlan_status woal_request_scan(moal_private *priv, t_u8 wait_option, + mlan_802_11_ssid *req_ssid); /** Set radio on/off */ -int woal_set_radio(moal_private * priv, t_u8 option); +int woal_set_radio(moal_private *priv, t_u8 option); /** Set region code */ -mlan_status woal_set_region_code(moal_private * priv, char *region); +mlan_status woal_set_region_code(moal_private *priv, char *region); /** Set authentication mode */ -mlan_status woal_set_auth_mode(moal_private * priv, t_u8 wait_option, +mlan_status woal_set_auth_mode(moal_private *priv, t_u8 wait_option, t_u32 auth_mode); /** Set encryption mode */ -mlan_status woal_set_encrypt_mode(moal_private * priv, t_u8 wait_option, +mlan_status woal_set_encrypt_mode(moal_private *priv, t_u8 wait_option, t_u32 encrypt_mode); /** Enable wep key */ -mlan_status woal_enable_wep_key(moal_private * priv, t_u8 wait_option); +mlan_status woal_enable_wep_key(moal_private *priv, t_u8 wait_option); /** Set WPA enable */ -mlan_status woal_set_wpa_enable(moal_private * priv, t_u8 wait_option, +mlan_status woal_set_wpa_enable(moal_private *priv, t_u8 wait_option, t_u32 enable); /** cancel scan command */ -mlan_status woal_cancel_scan(moal_private * priv, t_u8 wait_option); +mlan_status woal_cancel_scan(moal_private *priv, t_u8 wait_option); /** Find best network to connect */ -mlan_status woal_find_best_network(moal_private * priv, t_u8 wait_option, - mlan_ssid_bssid * ssid_bssid); +mlan_status woal_find_best_network(moal_private *priv, t_u8 wait_option, + mlan_ssid_bssid *ssid_bssid); /** Set Ad-Hoc channel */ -mlan_status woal_change_adhoc_chan(moal_private * priv, int channel); +mlan_status woal_change_adhoc_chan(moal_private *priv, int channel, + t_u8 wait_option); /** Get scan table */ -mlan_status woal_get_scan_table(moal_private * priv, t_u8 wait_option, - mlan_scan_resp * scanresp); +mlan_status woal_get_scan_table(moal_private *priv, t_u8 wait_option, + mlan_scan_resp *scanresp); /** Get authentication mode */ -mlan_status woal_get_auth_mode(moal_private * priv, t_u8 wait_option, - t_u32 * auth_mode); +mlan_status woal_get_auth_mode(moal_private *priv, t_u8 wait_option, + t_u32 *auth_mode); /** Get encryption mode */ -mlan_status woal_get_encrypt_mode(moal_private * priv, t_u8 wait_option, - t_u32 * encrypt_mode); +mlan_status woal_get_encrypt_mode(moal_private *priv, t_u8 wait_option, + t_u32 *encrypt_mode); /** Get WPA state */ -mlan_status woal_get_wpa_enable(moal_private * priv, t_u8 wait_option, - t_u32 * enable); +mlan_status woal_get_wpa_enable(moal_private *priv, t_u8 wait_option, + t_u32 *enable); #endif /**STA_SUPPORT */ -mlan_status woal_set_wapi_enable(moal_private * priv, t_u8 wait_option, +mlan_status woal_set_wapi_enable(moal_private *priv, t_u8 wait_option, t_u32 enable); /** Initialize priv */ -void woal_init_priv(moal_private * priv, t_u8 wait_option); +void woal_init_priv(moal_private *priv, t_u8 wait_option); /** Reset interface(s) */ -int woal_reset_intf(moal_private * priv, t_u8 wait_option, int all_intf); +int woal_reset_intf(moal_private *priv, t_u8 wait_option, int all_intf); /** common ioctl for uap, station */ int woal_custom_ie_ioctl(struct net_device *dev, struct ifreq *req); int woal_send_host_packet(struct net_device *dev, struct ifreq *req); @@ -1747,16 +1993,16 @@ int woal_tdls_config_ioctl(struct net_device *dev, struct ifreq *req); int woal_get_bss_type(struct net_device *dev, struct ifreq *req); #if defined(STA_WEXT) || defined(UAP_WEXT) -int woal_host_command(moal_private * priv, struct iwreq *wrq); +int woal_host_command(moal_private *priv, struct iwreq *wrq); #endif #if defined(STA_SUPPORT) && defined(UAP_SUPPORT) -mlan_status woal_bss_role_cfg(moal_private * priv, t_u8 action, - t_u8 wait_option, t_u8 * bss_role); +mlan_status woal_bss_role_cfg(moal_private *priv, t_u8 action, + t_u8 wait_option, t_u8 *bss_role); #if defined(STA_CFG80211) && defined(UAP_CFG80211) void woal_go_timer_func(void *context); #endif #if defined(STA_WEXT) || defined(UAP_WEXT) -int woal_set_get_bss_role(moal_private * priv, struct iwreq *wrq); +int woal_set_get_bss_role(moal_private *priv, struct iwreq *wrq); #endif #endif #if defined(WIFI_DIRECT_SUPPORT) || defined(UAP_SUPPORT) @@ -1765,39 +2011,39 @@ int woal_hostcmd_ioctl(struct net_device *dev, struct ifreq *req); #endif #if defined(WIFI_DIRECT_SUPPORT) -mlan_status woal_set_remain_channel_ioctl(moal_private * priv, t_u8 wait_option, - mlan_ds_remain_chan * pchan); -mlan_status woal_wifi_direct_mode_cfg(moal_private * priv, t_u16 action, - t_u16 * mode); -mlan_status woal_p2p_config(moal_private * priv, t_u32 action, - mlan_ds_wifi_direct_config * p2p_config); +mlan_status woal_set_remain_channel_ioctl(moal_private *priv, t_u8 wait_option, + mlan_ds_remain_chan *pchan); +mlan_status woal_wifi_direct_mode_cfg(moal_private *priv, t_u16 action, + t_u16 *mode); +mlan_status woal_p2p_config(moal_private *priv, t_u32 action, + mlan_ds_wifi_direct_config *p2p_config); void woal_remain_timer_func(void *context); #endif /* WIFI_DIRECT_SUPPORT */ #ifdef CONFIG_PROC_FS /** Initialize proc fs */ -void woal_proc_init(moal_handle * handle); +void woal_proc_init(moal_handle *handle); /** Clean up proc fs */ -void woal_proc_exit(moal_handle * handle); +void woal_proc_exit(moal_handle *handle); /** Create proc entry */ -void woal_create_proc_entry(moal_private * priv); +void woal_create_proc_entry(moal_private *priv); /** Remove proc entry */ -void woal_proc_remove(moal_private * priv); +void woal_proc_remove(moal_private *priv); /** string to number */ int woal_string_to_number(char *s); #endif #ifdef PROC_DEBUG /** Create debug proc fs */ -void woal_debug_entry(moal_private * priv); +void woal_debug_entry(moal_private *priv); /** Remove debug proc fs */ -void woal_debug_remove(moal_private * priv); +void woal_debug_remove(moal_private *priv); #endif /* PROC_DEBUG */ /** check pm info */ -mlan_status woal_get_pm_info(moal_private * priv, mlan_ds_ps_info * pm_info); +mlan_status woal_get_pm_info(moal_private *priv, mlan_ds_ps_info *pm_info); /** get mlan debug info */ -void woal_mlan_debug_info(moal_private * priv); +void woal_mlan_debug_info(moal_private *priv); #ifdef REASSOCIATION int woal_reassociation_thread(void *data); @@ -1809,65 +2055,93 @@ t_void woal_rx_work_queue(struct work_struct *work); int woal_hard_start_xmit(struct sk_buff *skb, struct net_device *dev); #ifdef STA_SUPPORT -mlan_status woal_init_sta_dev(struct net_device *dev, moal_private * priv); +mlan_status woal_init_sta_dev(struct net_device *dev, moal_private *priv); #endif #ifdef UAP_SUPPORT -mlan_status woal_init_uap_dev(struct net_device *dev, moal_private * priv); +mlan_status woal_init_uap_dev(struct net_device *dev, moal_private *priv); #endif -moal_private *woal_add_interface(moal_handle * handle, t_u8 bss_num, +moal_private *woal_add_interface(moal_handle *handle, t_u8 bss_num, t_u8 bss_type); -void woal_remove_interface(moal_handle * handle, t_u8 bss_index); +void woal_remove_interface(moal_handle *handle, t_u8 bss_index); void woal_set_multicast_list(struct net_device *dev); -mlan_status woal_request_fw(moal_handle * handle); -void woal_moal_debug_info(moal_private * priv, moal_handle * handle, u8 flag); +mlan_status woal_request_fw(moal_handle *handle); +int woal_11h_channel_check_ioctl(moal_private *priv, t_u8 wait_option); +void woal_cancel_cac_block(moal_private *priv); +void woal_moal_debug_info(moal_private *priv, moal_handle *handle, u8 flag); #ifdef STA_SUPPORT -mlan_status woal_get_powermode(moal_private * priv, int *powermode); -mlan_status woal_set_scan_type(moal_private * priv, t_u32 scan_type); -mlan_status woal_enable_ext_scan(moal_private * priv, t_u8 enable); -mlan_status woal_set_powermode(moal_private * priv, char *powermode); -int woal_find_essid(moal_private * priv, mlan_ssid_bssid * ssid_bssid); -mlan_status woal_request_userscan(moal_private * priv, t_u8 wait_option, - wlan_user_scan_cfg * scan_cfg); -mlan_status woal_do_scan(moal_private * priv, wlan_user_scan_cfg * scan_cfg); -int woal_set_combo_scan(moal_private * priv, char *buf, int length); -mlan_status woal_set_scan_time(moal_private * priv, t_u16 active_scan_time, +mlan_status woal_get_powermode(moal_private *priv, int *powermode); +mlan_status woal_set_scan_type(moal_private *priv, t_u32 scan_type); +mlan_status woal_enable_ext_scan(moal_private *priv, t_u8 enable); +mlan_status woal_set_powermode(moal_private *priv, char *powermode); +int woal_find_essid(moal_private *priv, mlan_ssid_bssid *ssid_bssid, + t_u8 wait_option); +mlan_status woal_request_userscan(moal_private *priv, t_u8 wait_option, + wlan_user_scan_cfg *scan_cfg); +mlan_status woal_do_scan(moal_private *priv, wlan_user_scan_cfg *scan_cfg); +int woal_set_combo_scan(moal_private *priv, char *buf, int length); +mlan_status woal_set_scan_time(moal_private *priv, t_u16 active_scan_time, t_u16 passive_scan_time, t_u16 specific_scan_time); -mlan_status woal_get_band(moal_private * priv, int *band); -mlan_status woal_set_band(moal_private * priv, char *pband); -mlan_status woal_add_rxfilter(moal_private * priv, char *rxfilter); -mlan_status woal_remove_rxfilter(moal_private * priv, char *rxfilter); -mlan_status woal_priv_qos_cfg(moal_private * priv, t_u32 action, char *qos_cfg); -mlan_status woal_set_sleeppd(moal_private * priv, char *psleeppd); -int woal_set_scan_cfg(moal_private * priv, char *buf, int length); +mlan_status woal_get_band(moal_private *priv, int *band); +mlan_status woal_set_band(moal_private *priv, char *pband); +mlan_status woal_add_rxfilter(moal_private *priv, char *rxfilter); +mlan_status woal_remove_rxfilter(moal_private *priv, char *rxfilter); +mlan_status woal_priv_qos_cfg(moal_private *priv, t_u32 action, char *qos_cfg); +mlan_status woal_set_sleeppd(moal_private *priv, char *psleeppd); +int woal_set_scan_cfg(moal_private *priv, char *buf, int length); /* EVENT: BCN_RSSI_LOW */ #define EVENT_BCN_RSSI_LOW 0x0001 /* EVENT: PRE_BCN_LOST */ #define EVENT_PRE_BCN_LOST 0x0002 -mlan_status woal_set_rssi_low_threshold(moal_private * priv, char *rssi, +mlan_status woal_set_rssi_low_threshold(moal_private *priv, char *rssi, t_u8 wait_option); -mlan_status woal_set_rssi_threshold(moal_private * priv, t_u32 event_id, +mlan_status woal_set_rssi_threshold(moal_private *priv, t_u32 event_id, t_u8 wait_option); /* EVENT: BG_SCAN_REPORT */ #define EVENT_BG_SCAN_REPORT 0x0004 -mlan_status woal_set_bg_scan(moal_private * priv, char *buf, int length); -mlan_status woal_stop_bg_scan(moal_private * priv, t_u8 wait_option); -void woal_reconfig_bgscan(moal_handle * handle); -mlan_status woal_request_bgscan(moal_private * priv, t_u8 wait_option, - wlan_bgscan_cfg * scan_cfg); +mlan_status woal_set_bg_scan(moal_private *priv, char *buf, int length); +mlan_status woal_stop_bg_scan(moal_private *priv, t_u8 wait_option); +void woal_reconfig_bgscan(moal_handle *handle); +#ifdef STA_CFG80211 +void woal_config_bgscan_and_rssi(moal_private *priv, t_u8 set_rssi); +void woal_start_roaming(moal_private *priv); +#endif +#ifdef STA_CFG80211 +void woal_save_conn_params(moal_private *priv, + struct cfg80211_connect_params *sme); +void woal_clear_conn_params(moal_private *priv); +#endif +mlan_status woal_request_bgscan(moal_private *priv, t_u8 wait_option, + wlan_bgscan_cfg *scan_cfg); #endif -void woal_flush_tcp_sess_queue(moal_private * priv); -void wlan_scan_create_brief_table_entry(t_u8 ** ppbuffer, - BSSDescriptor_t * pbss_desc); -int wlan_get_scan_table_ret_entry(BSSDescriptor_t * pbss_desc, t_u8 ** ppbuffer, +void woal_flush_tcp_sess_queue(moal_private *priv); +void woal_flush_tdls_list(moal_private *priv); +void wlan_scan_create_brief_table_entry(t_u8 **ppbuffer, + BSSDescriptor_t *pbss_desc); +int wlan_get_scan_table_ret_entry(BSSDescriptor_t *pbss_desc, t_u8 **ppbuffer, int *pspace_left); -BOOLEAN woal_ssid_valid(mlan_802_11_ssid * pssid); -int woal_is_connected(moal_private * priv, mlan_ssid_bssid * ssid_bssid); -int woal_priv_hostcmd(moal_private * priv, t_u8 * respbuf, t_u32 respbuflen); -void woal_tcp_ack_tx_indication(moal_private * priv, mlan_buffer * pmbuf); -mlan_status woal_request_country_power_table(moal_private * priv, char *region); -mlan_status woal_set_low_pwr_mode(moal_handle * handle, t_u8 wait_option); +BOOLEAN woal_ssid_valid(mlan_802_11_ssid *pssid); +int woal_is_connected(moal_private *priv, mlan_ssid_bssid *ssid_bssid); +int woal_priv_hostcmd(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen); +void woal_tcp_ack_tx_indication(moal_private *priv, mlan_buffer *pmbuf); +mlan_status woal_request_country_power_table(moal_private *priv, char *region); +mlan_status woal_mc_policy_cfg(moal_private *priv, t_u16 *enable, + t_u8 wait_option, t_u8 action); +#ifdef RX_PACKET_COALESCE +mlan_status woal_rx_pkt_coalesce_cfg(moal_private *priv, t_u16 *enable, + t_u8 wait_option, t_u8 action); +#endif +mlan_status woal_set_low_pwr_mode(moal_handle *handle, t_u8 wait_option); +void woal_hist_data_reset(moal_private *priv); +void woal_hist_do_reset(void *data); +void woal_hist_reset_table(moal_private *priv,t_u8 antenna); +void woal_hist_data_add(moal_private *priv, t_u8 rx_rate, t_s8 snr, t_s8 nflr, + t_u8 antenna); +mlan_status woal_set_hotspotcfg(moal_private *priv, t_u8 wait_option, + t_u32 hotspotcfg); +void woal_peer_mgmt_frame(moal_private * priv, t_s8 snr, t_s8 nf, t_s8 sig_str, + mlan_802_11_mac_addr mac); #endif /* _MOAL_MAIN_H */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_priv.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_priv.c old mode 100755 new mode 100644 index 1197aac4..9b89e7fd --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_priv.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_priv.c @@ -37,12 +37,17 @@ static t_u8 SupportedInfraBand[] = { BAND_B, BAND_B | BAND_G, BAND_G, BAND_GN, BAND_B | BAND_G | BAND_GN, BAND_G | BAND_GN, + BAND_A, BAND_B | BAND_A, BAND_B | BAND_G | BAND_A, BAND_G | BAND_A, + BAND_A | BAND_B | BAND_G | BAND_AN | BAND_GN, + BAND_A | BAND_G | BAND_AN | BAND_GN, BAND_A | BAND_AN, }; /** Bands supported in Ad-Hoc mode */ static t_u8 SupportedAdhocBand[] = { BAND_B, BAND_B | BAND_G, BAND_G, BAND_GN, BAND_B | BAND_G | BAND_GN, BAND_G | BAND_GN, + BAND_A, + BAND_AN, BAND_A | BAND_AN, }; /******************************************************** @@ -64,7 +69,7 @@ extern int cfg80211_wext; * @return 0 --success, otherwise fail */ static int -woal_associate_ssid_bssid(moal_private * priv, struct iwreq *wrq) +woal_associate_ssid_bssid(moal_private *priv, struct iwreq *wrq) { mlan_ssid_bssid ssid_bssid; #ifdef REASSOCIATION @@ -110,9 +115,9 @@ woal_associate_ssid_bssid(moal_private * priv, struct iwreq *wrq) } else { if (mac_idx < ETH_ALEN) ssid_bssid.bssid[mac_idx] = - (t_u8) woal_atox(buf + i); + (t_u8)woal_atox(buf + i); - while ((isxdigit(buf[i + 1]) && (i < buflen))) { + while ((i < buflen) && (isxdigit(buf[i + 1]))) { /* Skip entire hex value */ i++; } @@ -163,7 +168,7 @@ woal_associate_ssid_bssid(moal_private * priv, struct iwreq *wrq) * @return Number of rates copied */ static inline int -woal_copy_rates(t_u8 * dest, int pos, t_u8 * src, int len) +woal_copy_rates(t_u8 *dest, int pos, t_u8 *src, int len) { int i; @@ -183,7 +188,7 @@ woal_copy_rates(t_u8 * dest, int pos, t_u8 * src, int len) * @return 0/MLAN_STATUS_SUCCESS --success, otherwise fail */ static int -woal_warm_reset(moal_private * priv) +woal_warm_reset(moal_private *priv) { int ret = 0; int intf_num; @@ -201,6 +206,8 @@ woal_warm_reset(moal_private * priv) ENTER(); + woal_cancel_cac_block(priv); + /* Reset all interfaces */ ret = woal_reset_intf(priv, MOAL_IOCTL_WAIT, MTRUE); @@ -230,7 +237,7 @@ woal_warm_reset(moal_private * priv) /* Restart the firmware */ req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); if (req) { - misc = (mlan_ds_misc_cfg *) req->pbuf; + misc = (mlan_ds_misc_cfg *)req->pbuf; misc->sub_command = MLAN_OID_MISC_WARM_RESET; req->req_id = MLAN_IOCTL_MISC_CFG; req->action = MLAN_ACT_SET; @@ -264,7 +271,7 @@ woal_warm_reset(moal_private * priv) * @return 0 --success, otherwise fail */ static int -woal_get_signal(moal_private * priv, struct iwreq *wrq) +woal_get_signal(moal_private *priv, struct iwreq *wrq) { /** Input data size */ #define IN_DATA_SIZE 2 @@ -458,7 +465,7 @@ woal_get_signal(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_deep_sleep_ioctl(moal_private * priv, struct iwreq *wrq) +woal_deep_sleep_ioctl(moal_private *priv, struct iwreq *wrq) { int ret = 0; int user_data_len; @@ -541,7 +548,7 @@ woal_deep_sleep_ioctl(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_11n_htcap_cfg(moal_private * priv, struct iwreq *wrq) +woal_11n_htcap_cfg(moal_private *priv, struct iwreq *wrq) { int data[2], copy_len; mlan_ioctl_req *req = NULL; @@ -564,7 +571,7 @@ woal_11n_htcap_cfg(moal_private * priv, struct iwreq *wrq) goto done; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_HTCAP_CFG; req->req_id = MLAN_IOCTL_11N_CFG; @@ -607,7 +614,22 @@ woal_11n_htcap_cfg(moal_private * priv, struct iwreq *wrq) if (req->action == MLAN_ACT_GET) { data_length = 1; - PRINTM(MINFO, "GET: htcapinfo:0x%x\n", data[0]); + cfg_11n->param.htcap_cfg.htcap = 0; + cfg_11n->param.htcap_cfg.misc_cfg = BAND_SELECT_A; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (cfg_11n->param.htcap_cfg.htcap != data[0]) { + data_length = 2; + data[1] = cfg_11n->param.htcap_cfg.htcap; + PRINTM(MINFO, "GET: htcapinfo for 2.4GHz:0x%x\n", + data[0]); + PRINTM(MINFO, "GET: htcapinfo for 5GHz:0x%x\n", + data[1]); + } else + PRINTM(MINFO, "GET: htcapinfo:0x%x\n", data[0]); } if (copy_to_user(wrq->u.data.pointer, data, sizeof(data))) { @@ -634,7 +656,7 @@ woal_11n_htcap_cfg(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_11n_amsdu_aggr_ctrl(moal_private * priv, struct iwreq *wrq) +woal_11n_amsdu_aggr_ctrl(moal_private *priv, struct iwreq *wrq) { int data[2], copy_len; mlan_ioctl_req *req = NULL; @@ -657,7 +679,7 @@ woal_11n_amsdu_aggr_ctrl(moal_private * priv, struct iwreq *wrq) goto done; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_CFG_AMSDU_AGGR_CTRL; req->req_id = MLAN_IOCTL_11N_CFG; @@ -704,7 +726,7 @@ woal_11n_amsdu_aggr_ctrl(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_11n_tx_cfg(moal_private * priv, struct iwreq *wrq) +woal_11n_tx_cfg(moal_private *priv, struct iwreq *wrq) { int data[2], copy_len; mlan_ioctl_req *req = NULL; @@ -727,7 +749,7 @@ woal_11n_tx_cfg(moal_private * priv, struct iwreq *wrq) goto done; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_CFG_TX; req->req_id = MLAN_IOCTL_11N_CFG; @@ -768,7 +790,21 @@ woal_11n_tx_cfg(moal_private * priv, struct iwreq *wrq) if (req->action == MLAN_ACT_GET) { data_length = 1; - PRINTM(MINFO, "GET: httxcap:0x%x\n", data[0]); + cfg_11n->param.tx_cfg.httxcap = 0; + cfg_11n->param.tx_cfg.misc_cfg = BAND_SELECT_A; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (cfg_11n->param.tx_cfg.httxcap != data[0]) { + data_length = 2; + data[1] = cfg_11n->param.tx_cfg.httxcap; + PRINTM(MINFO, "GET: httxcap for 2.4GHz:0x%x\n", + data[0]); + PRINTM(MINFO, "GET: httxcap for 5GHz:0x%x\n", data[1]); + } else + PRINTM(MINFO, "GET: httxcap:0x%x\n", data[0]); } if (copy_to_user(wrq->u.data.pointer, data, sizeof(data))) { @@ -794,7 +830,7 @@ woal_11n_tx_cfg(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_11n_prio_tbl(moal_private * priv, struct iwreq *wrq) +woal_11n_prio_tbl(moal_private *priv, struct iwreq *wrq) { int data[MAX_NUM_TID * 2], i, j, copy_len; mlan_ioctl_req *req = NULL; @@ -816,7 +852,7 @@ woal_11n_prio_tbl(moal_private * priv, struct iwreq *wrq) LEAVE(); return -ENOMEM; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_CFG_AGGR_PRIO_TBL; req->req_id = MLAN_IOCTL_11N_CFG; @@ -887,7 +923,7 @@ woal_11n_prio_tbl(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_addba_reject(moal_private * priv, struct iwreq *wrq) +woal_addba_reject(moal_private *priv, struct iwreq *wrq) { int data[MAX_NUM_TID], ret = 0, i, copy_len; mlan_ioctl_req *req = NULL; @@ -902,7 +938,7 @@ woal_addba_reject(moal_private * priv, struct iwreq *wrq) LEAVE(); return -ENOMEM; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_CFG_ADDBA_REJECT; req->req_id = MLAN_IOCTL_11N_CFG; @@ -970,7 +1006,7 @@ woal_addba_reject(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_addba_para_updt(moal_private * priv, struct iwreq *wrq) +woal_addba_para_updt(moal_private *priv, struct iwreq *wrq) { int data[5], ret = 0, copy_len; mlan_ioctl_req *req = NULL; @@ -986,7 +1022,7 @@ woal_addba_para_updt(moal_private * priv, struct iwreq *wrq) LEAVE(); return -ENOMEM; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_CFG_ADDBA_PARAM; req->req_id = MLAN_IOCTL_11N_CFG; @@ -1072,7 +1108,7 @@ woal_addba_para_updt(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_txbuf_cfg(moal_private * priv, struct iwreq *wrq) +woal_txbuf_cfg(moal_private *priv, struct iwreq *wrq) { int buf_size; mlan_ioctl_req *req = NULL; @@ -1086,7 +1122,7 @@ woal_txbuf_cfg(moal_private * priv, struct iwreq *wrq) ret = -ENOMEM; goto done; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_CFG_MAX_TX_BUF_SIZE; req->req_id = MLAN_IOCTL_11N_CFG; @@ -1128,7 +1164,7 @@ woal_txbuf_cfg(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_hs_cfg(moal_private * priv, struct iwreq *wrq, BOOLEAN invoke_hostcmd) +woal_hs_cfg(moal_private *priv, struct iwreq *wrq, BOOLEAN invoke_hostcmd) { int data[3], copy_len; int ret = 0; @@ -1229,7 +1265,7 @@ woal_hs_cfg(moal_private * priv, struct iwreq *wrq, BOOLEAN invoke_hostcmd) * @return 0 --success, otherwise fail */ static int -woal_hs_setpara(moal_private * priv, struct iwreq *wrq) +woal_hs_setpara(moal_private *priv, struct iwreq *wrq) { int ret = 0; int data_length = wrq->u.data.length; @@ -1258,7 +1294,7 @@ woal_hs_setpara(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_inactivity_timeout_ext(moal_private * priv, struct iwreq *wrq) +woal_inactivity_timeout_ext(moal_private *priv, struct iwreq *wrq) { int data[4], copy_len; int ret = 0; @@ -1278,7 +1314,7 @@ woal_inactivity_timeout_ext(moal_private * priv, struct iwreq *wrq) goto done; } - pmcfg = (mlan_ds_pm_cfg *) req->pbuf; + pmcfg = (mlan_ds_pm_cfg *)req->pbuf; inac_to = &pmcfg->param.inactivity_to; pmcfg->sub_command = MLAN_OID_PM_CFG_INACTIVITY_TO; req->req_id = MLAN_IOCTL_PM_CFG; @@ -1343,7 +1379,7 @@ woal_inactivity_timeout_ext(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_ecl_sys_clock(moal_private * priv, struct iwreq *wrq) +woal_ecl_sys_clock(moal_private *priv, struct iwreq *wrq) { int data[64], copy_len; int ret = 0; @@ -1364,7 +1400,7 @@ woal_ecl_sys_clock(moal_private * priv, struct iwreq *wrq) goto done; } - cfg = (mlan_ds_misc_cfg *) req->pbuf; + cfg = (mlan_ds_misc_cfg *)req->pbuf; cfg->sub_command = MLAN_OID_MISC_SYS_CLOCK; req->req_id = MLAN_IOCTL_MISC_CFG; @@ -1438,7 +1474,7 @@ woal_ecl_sys_clock(moal_private * priv, struct iwreq *wrq) cfg->param.sys_clock.sys_clk_num = MIN(MLAN_MAX_CLK_NUM, data_length); for (i = 0; i < cfg->param.sys_clock.sys_clk_num; i++) - cfg->param.sys_clock.sys_clk[i] = (t_u16) data[i]; + cfg->param.sys_clock.sys_clk[i] = (t_u16)data[i]; status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); if (status != MLAN_STATUS_SUCCESS) { @@ -1462,7 +1498,7 @@ woal_ecl_sys_clock(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_band_cfg(moal_private * priv, struct iwreq *wrq) +woal_band_cfg(moal_private *priv, struct iwreq *wrq) { int ret = 0; unsigned int i; @@ -1497,7 +1533,7 @@ woal_band_cfg(moal_private * priv, struct iwreq *wrq) ret = -ENOMEM; goto error; } - radio_cfg = (mlan_ds_radio_cfg *) req->pbuf; + radio_cfg = (mlan_ds_radio_cfg *)req->pbuf; radio_cfg->sub_command = MLAN_OID_BAND_CFG; req->req_id = MLAN_IOCTL_RADIO_CFG; @@ -1510,17 +1546,15 @@ woal_band_cfg(moal_private * priv, struct iwreq *wrq) ret = -EFAULT; goto error; } - data[0] = radio_cfg->param.band_cfg.config_bands; /* Infra - Band - */ - data[1] = radio_cfg->param.band_cfg.adhoc_start_band; /* Adhoc - Band - */ - data[2] = radio_cfg->param.band_cfg.adhoc_channel; /* Adhoc - Channel - */ + /* Infra Band */ + data[0] = radio_cfg->param.band_cfg.config_bands; + /* Adhoc Band */ + data[1] = radio_cfg->param.band_cfg.adhoc_start_band; + /* Adhoc Channel */ + data[2] = radio_cfg->param.band_cfg.adhoc_channel; wrq->u.data.length = 3; - if (radio_cfg->param.band_cfg.adhoc_start_band & BAND_GN) { + if (radio_cfg->param.band_cfg.adhoc_start_band & BAND_GN + || radio_cfg->param.band_cfg.adhoc_start_band & BAND_AN) { data[3] = radio_cfg->param.band_cfg.sec_chan_offset; wrq->u.data.length = 4; } @@ -1571,7 +1605,7 @@ woal_band_cfg(moal_private * priv, struct iwreq *wrq) } } if (user_data_len == 4) { - if (!(adhoc_band & (BAND_GN))) { + if (!(adhoc_band & (BAND_GN | BAND_AN))) { PRINTM(MERROR, "11n is not enabled for adhoc, can not set HT/VHT channel bandwidth\n"); ret = -EINVAL; @@ -1618,7 +1652,7 @@ woal_band_cfg(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_reg_read_write(moal_private * priv, struct iwreq *wrq) +woal_reg_read_write(moal_private *priv, struct iwreq *wrq) { int data[3], copy_len; int ret = 0; @@ -1638,7 +1672,7 @@ woal_reg_read_write(moal_private * priv, struct iwreq *wrq) goto done; } - reg = (mlan_ds_reg_mem *) req->pbuf; + reg = (mlan_ds_reg_mem *)req->pbuf; reg->sub_command = MLAN_OID_REG_RW; req->req_id = MLAN_IOCTL_REG_MEM; @@ -1655,10 +1689,10 @@ woal_reg_read_write(moal_private * priv, struct iwreq *wrq) ret = -EFAULT; goto done; } - reg->param.reg_rw.type = (t_u32) data[0]; - reg->param.reg_rw.offset = (t_u32) data[1]; + reg->param.reg_rw.type = (t_u32)data[0]; + reg->param.reg_rw.offset = (t_u32)data[1]; if (data_length == 3) - reg->param.reg_rw.value = (t_u32) data[2]; + reg->param.reg_rw.value = (t_u32)data[2]; status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); if (status != MLAN_STATUS_SUCCESS) { @@ -1693,7 +1727,7 @@ woal_reg_read_write(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_read_eeprom(moal_private * priv, struct iwreq *wrq) +woal_read_eeprom(moal_private *priv, struct iwreq *wrq) { int data[2], copy_len; int ret = 0; @@ -1713,7 +1747,7 @@ woal_read_eeprom(moal_private * priv, struct iwreq *wrq) goto done; } - reg = (mlan_ds_reg_mem *) req->pbuf; + reg = (mlan_ds_reg_mem *)req->pbuf; reg->sub_command = MLAN_OID_EEPROM_RD; req->req_id = MLAN_IOCTL_REG_MEM; @@ -1729,8 +1763,8 @@ woal_read_eeprom(moal_private * priv, struct iwreq *wrq) goto done; } - reg->param.rd_eeprom.offset = (t_u16) data[0]; - reg->param.rd_eeprom.byte_count = (t_u16) data[1]; + reg->param.rd_eeprom.offset = (t_u16)data[0]; + reg->param.rd_eeprom.byte_count = (t_u16)data[1]; status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); if (status != MLAN_STATUS_SUCCESS) { @@ -1765,7 +1799,7 @@ woal_read_eeprom(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_mem_read_write(moal_private * priv, struct iwreq *wrq) +woal_mem_read_write(moal_private *priv, struct iwreq *wrq) { t_u32 data[2]; int ret = 0; @@ -1785,7 +1819,7 @@ woal_mem_read_write(moal_private * priv, struct iwreq *wrq) goto done; } - reg_mem = (mlan_ds_reg_mem *) req->pbuf; + reg_mem = (mlan_ds_reg_mem *)req->pbuf; reg_mem->sub_command = MLAN_OID_MEM_RW; req->req_id = MLAN_IOCTL_REG_MEM; @@ -1805,9 +1839,9 @@ woal_mem_read_write(moal_private * priv, struct iwreq *wrq) goto done; } - reg_mem->param.mem_rw.addr = (t_u32) data[0]; + reg_mem->param.mem_rw.addr = (t_u32)data[0]; if (data_length == 2) - reg_mem->param.mem_rw.value = (t_u32) data[1]; + reg_mem->param.mem_rw.value = (t_u32)data[1]; PRINTM(MINFO, "MEM_RW: Addr=0x%x, Value=0x%x\n", (int)reg_mem->param.mem_rw.addr, @@ -1846,7 +1880,7 @@ woal_mem_read_write(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_get_log(moal_private * priv, struct iwreq *wrq) +woal_get_log(moal_private *priv, struct iwreq *wrq) { int ret = 0; mlan_ds_get_stats stats; @@ -1927,7 +1961,7 @@ woal_get_log(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_deauth(moal_private * priv, struct iwreq *wrq) +woal_deauth(moal_private *priv, struct iwreq *wrq) { int ret = 0; struct sockaddr saddr; @@ -1942,7 +1976,7 @@ woal_deauth(moal_private * priv, struct iwreq *wrq) } if (MLAN_STATUS_SUCCESS != woal_disconnect(priv, MOAL_IOCTL_WAIT, - (t_u8 *) saddr.sa_data)) { + (t_u8 *)saddr.sa_data)) { ret = -EFAULT; goto done; } @@ -1965,7 +1999,7 @@ woal_deauth(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_tx_power_cfg(moal_private * priv, struct iwreq *wrq) +woal_tx_power_cfg(moal_private *priv, struct iwreq *wrq) { int data[5], user_data_len, copy_len; int ret = 0; @@ -2055,7 +2089,7 @@ woal_tx_power_cfg(moal_private * priv, struct iwreq *wrq) ret = -ENOMEM; goto done; } - pcfg = (mlan_ds_power_cfg *) req->pbuf; + pcfg = (mlan_ds_power_cfg *)req->pbuf; pcfg->sub_command = MLAN_OID_POWER_CFG_EXT; req->req_id = MLAN_IOCTL_POWER_CFG; if (!user_data_len) @@ -2063,8 +2097,8 @@ woal_tx_power_cfg(moal_private * priv, struct iwreq *wrq) else { req->action = MLAN_ACT_SET; pcfg->param.power_ext.len = user_data_len; - memcpy((t_u8 *) & pcfg->param.power_ext.power_data, - (t_u8 *) data, sizeof(data)); + memcpy((t_u8 *)&pcfg->param.power_ext.power_data, (t_u8 *)data, + sizeof(data)); } status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); if (status != MLAN_STATUS_SUCCESS) { @@ -2075,7 +2109,7 @@ woal_tx_power_cfg(moal_private * priv, struct iwreq *wrq) /* GET operation */ if (copy_to_user (wrq->u.data.pointer, - (t_u8 *) & pcfg->param.power_ext.power_data, + (t_u8 *)&pcfg->param.power_ext.power_data, sizeof(int) * pcfg->param.power_ext.len)) { ret = -EFAULT; goto done; @@ -2098,7 +2132,7 @@ woal_tx_power_cfg(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_get_txrx_rate(moal_private * priv, struct iwreq *wrq) +woal_get_txrx_rate(moal_private *priv, struct iwreq *wrq) { int ret = 0; mlan_ds_rate *rate = NULL; @@ -2112,7 +2146,7 @@ woal_get_txrx_rate(moal_private * priv, struct iwreq *wrq) ret = -ENOMEM; goto done; } - rate = (mlan_ds_rate *) req->pbuf; + rate = (mlan_ds_rate *)req->pbuf; rate->sub_command = MLAN_OID_GET_DATA_RATE; req->req_id = MLAN_IOCTL_RATE; req->action = MLAN_ACT_GET; @@ -2124,7 +2158,7 @@ woal_get_txrx_rate(moal_private * priv, struct iwreq *wrq) } if (copy_to_user - (wrq->u.data.pointer, (t_u8 *) & rate->param.data_rate, + (wrq->u.data.pointer, (t_u8 *)&rate->param.data_rate, sizeof(int) * 2)) { ret = -EFAULT; goto done; @@ -2146,7 +2180,7 @@ woal_get_txrx_rate(moal_private * priv, struct iwreq *wrq) * @return 0/MLAN_STATUS_SUCCESS --success, otherwise fail */ static int -woal_sdio_clock_ioctl(moal_private * priv, struct iwreq *wrq) +woal_sdio_clock_ioctl(moal_private *priv, struct iwreq *wrq) { int ret = 0; int data = 2; @@ -2202,7 +2236,7 @@ woal_sdio_clock_ioctl(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_beacon_interval(moal_private * priv, struct iwreq *wrq) +woal_beacon_interval(moal_private *priv, struct iwreq *wrq) { int ret = 0; mlan_ds_bss *bss = NULL; @@ -2230,7 +2264,7 @@ woal_beacon_interval(moal_private * priv, struct iwreq *wrq) ret = -ENOMEM; goto done; } - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_IBSS_BCN_INTERVAL; req->req_id = MLAN_IOCTL_BSS; if (!wrq->u.data.length) @@ -2247,73 +2281,7 @@ woal_beacon_interval(moal_private * priv, struct iwreq *wrq) } if (copy_to_user - (wrq->u.data.pointer, (t_u8 *) & bss->param.bcn_interval, - sizeof(int))) { - ret = -EFAULT; - goto done; - } - wrq->u.data.length = 1; -done: - if (status != MLAN_STATUS_PENDING) - kfree(req); - LEAVE(); - return ret; -} - -/** - * @brief Set/Get ATIM window - * - * @param priv A pointer to moal_private structure - * @param wrq A pointer to iwreq structure - * - * @return 0 --success, otherwise fail - */ -static int -woal_atim_window(moal_private * priv, struct iwreq *wrq) -{ - int ret = 0; - mlan_ds_bss *bss = NULL; - mlan_ioctl_req *req = NULL; - int atim = 0; - mlan_status status = MLAN_STATUS_SUCCESS; - - ENTER(); - - if (wrq->u.data.length) { - if (copy_from_user(&atim, wrq->u.data.pointer, sizeof(int))) { - PRINTM(MERROR, "Copy from user failed\n"); - ret = -EFAULT; - goto done; - } - if ((atim < 0) || (atim > MLAN_MAX_ATIM_WINDOW)) { - ret = -EINVAL; - goto done; - } - } - - req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); - if (req == NULL) { - ret = -ENOMEM; - goto done; - } - bss = (mlan_ds_bss *) req->pbuf; - bss->sub_command = MLAN_OID_IBSS_ATIM_WINDOW; - req->req_id = MLAN_IOCTL_BSS; - if (!wrq->u.data.length) - req->action = MLAN_ACT_GET; - else { - req->action = MLAN_ACT_SET; - bss->param.atim_window = atim; - } - - status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); - if (status != MLAN_STATUS_SUCCESS) { - ret = -EFAULT; - goto done; - } - - if (copy_to_user - (wrq->u.data.pointer, (t_u8 *) & bss->param.atim_window, + (wrq->u.data.pointer, (t_u8 *)&bss->param.bcn_interval, sizeof(int))) { ret = -EFAULT; goto done; @@ -2335,7 +2303,7 @@ woal_atim_window(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_set_get_txrate(moal_private * priv, struct iwreq *wrq) +woal_set_get_txrate(moal_private *priv, struct iwreq *wrq) { int ret = 0; mlan_ds_rate *rate = NULL; @@ -2358,7 +2326,7 @@ woal_set_get_txrate(moal_private * priv, struct iwreq *wrq) goto done; } - rate = (mlan_ds_rate *) req->pbuf; + rate = (mlan_ds_rate *)req->pbuf; rate->param.rate_cfg.rate_type = MLAN_RATE_INDEX; rate->sub_command = MLAN_OID_RATE_CFG; req->req_id = MLAN_IOCTL_RATE; @@ -2412,7 +2380,7 @@ woal_set_get_txrate(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_set_get_regioncode(moal_private * priv, struct iwreq *wrq) +woal_set_get_regioncode(moal_private *priv, struct iwreq *wrq) { int ret = 0; mlan_ds_misc_cfg *cfg = NULL; @@ -2436,7 +2404,7 @@ woal_set_get_regioncode(moal_private * priv, struct iwreq *wrq) goto done; } - cfg = (mlan_ds_misc_cfg *) req->pbuf; + cfg = (mlan_ds_misc_cfg *)req->pbuf; cfg->sub_command = MLAN_OID_MISC_REGION; req->req_id = MLAN_IOCTL_MISC_CFG; if (!wrq->u.data.length) @@ -2474,7 +2442,7 @@ woal_set_get_regioncode(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_set_get_radio(moal_private * priv, struct iwreq *wrq) +woal_set_get_radio(moal_private *priv, struct iwreq *wrq) { int ret = 0; mlan_bss_info bss_info; @@ -2491,7 +2459,7 @@ woal_set_get_radio(moal_private * priv, struct iwreq *wrq) ret = -EFAULT; goto done; } - if (MLAN_STATUS_SUCCESS != woal_set_radio(priv, (t_u8) option)) + if (MLAN_STATUS_SUCCESS != woal_set_radio(priv, (t_u8)option)) ret = -EFAULT; } else { /* Get radio status */ @@ -2519,7 +2487,7 @@ woal_set_get_radio(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_drv_dbg(moal_private * priv, struct iwreq *wrq) +woal_drv_dbg(moal_private *priv, struct iwreq *wrq) { int data[4], copy_len; int ret = 0; @@ -2560,6 +2528,8 @@ woal_drv_dbg(moal_private * priv, struct iwreq *wrq) printk(KERN_ALERT "MENTRY (%08x) %s\n", MENTRY, (drvdbg & MENTRY) ? "X" : ""); #endif + printk(KERN_ALERT "MMPA_D (%08x) %s\n", MMPA_D, + (drvdbg & MMPA_D) ? "X" : ""); printk(KERN_ALERT "MIF_D (%08x) %s\n", MIF_D, (drvdbg & MIF_D) ? "X" : ""); printk(KERN_ALERT "MFW_D (%08x) %s\n", MFW_D, @@ -2602,7 +2572,7 @@ woal_drv_dbg(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_set_get_qos_cfg(moal_private * priv, struct iwreq *wrq) +woal_set_get_qos_cfg(moal_private *priv, struct iwreq *wrq) { int ret = 0; mlan_ds_wmm_cfg *cfg = NULL; @@ -2616,7 +2586,7 @@ woal_set_get_qos_cfg(moal_private * priv, struct iwreq *wrq) ret = -ENOMEM; goto done; } - cfg = (mlan_ds_wmm_cfg *) req->pbuf; + cfg = (mlan_ds_wmm_cfg *)req->pbuf; cfg->sub_command = MLAN_OID_WMM_CFG_QOS; req->req_id = MLAN_IOCTL_WMM_CFG; if (wrq->u.data.length) { @@ -2626,7 +2596,7 @@ woal_set_get_qos_cfg(moal_private * priv, struct iwreq *wrq) goto done; } req->action = MLAN_ACT_SET; - cfg->param.qos_cfg = (t_u8) data; + cfg->param.qos_cfg = (t_u8)data; } else req->action = MLAN_ACT_GET; status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); @@ -2658,7 +2628,7 @@ woal_set_get_qos_cfg(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_wws_cfg(moal_private * priv, struct iwreq *wrq) +woal_wws_cfg(moal_private *priv, struct iwreq *wrq) { int ret = 0; mlan_ds_misc_cfg *wws = NULL; @@ -2672,7 +2642,7 @@ woal_wws_cfg(moal_private * priv, struct iwreq *wrq) ret = -ENOMEM; goto done; } - wws = (mlan_ds_misc_cfg *) req->pbuf; + wws = (mlan_ds_misc_cfg *)req->pbuf; wws->sub_command = MLAN_OID_MISC_WWS; req->req_id = MLAN_IOCTL_MISC_CFG; if (wrq->u.data.length) { @@ -2718,7 +2688,7 @@ woal_wws_cfg(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_sleep_pd(moal_private * priv, struct iwreq *wrq) +woal_sleep_pd(moal_private *priv, struct iwreq *wrq) { int ret = 0; mlan_ds_pm_cfg *pm_cfg = NULL; @@ -2733,7 +2703,7 @@ woal_sleep_pd(moal_private * priv, struct iwreq *wrq) ret = -ENOMEM; goto done; } - pm_cfg = (mlan_ds_pm_cfg *) req->pbuf; + pm_cfg = (mlan_ds_pm_cfg *)req->pbuf; pm_cfg->sub_command = MLAN_OID_PM_CFG_SLEEP_PD; req->req_id = MLAN_IOCTL_PM_CFG; if (wrq->u.data.length) { @@ -2785,7 +2755,7 @@ woal_sleep_pd(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_sleep_params_ioctl(moal_private * priv, struct iwreq *wrq) +woal_sleep_params_ioctl(moal_private *priv, struct iwreq *wrq) { int ret = 0; mlan_ioctl_req *req = NULL; @@ -2811,10 +2781,10 @@ woal_sleep_params_ioctl(moal_private * priv, struct iwreq *wrq) return -ENOMEM; } - pm = (mlan_ds_pm_cfg *) req->pbuf; + pm = (mlan_ds_pm_cfg *)req->pbuf; pm->sub_command = MLAN_OID_PM_CFG_SLEEP_PARAMS; req->req_id = MLAN_IOCTL_PM_CFG; - psleep_params = (pmlan_ds_sleep_params) & pm->param.sleep_params; + psleep_params = (pmlan_ds_sleep_params)&pm->param.sleep_params; if (data_length == 0) { req->action = MLAN_ACT_GET; @@ -2891,6 +2861,135 @@ woal_sleep_params_ioctl(moal_private * priv, struct iwreq *wrq) return ret; } +/** + * @brief Control Coalescing status Enable/Disable + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq Pointer to user data + * + * @return 0 --success, otherwise fail + */ +static int +woal_coalescing_status_ioctl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ds_misc_cfg *pcoal = NULL; + mlan_ioctl_req *req = NULL; + char buf[8]; + struct iwreq *wreq = (struct iwreq *)wrq; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + pcoal = (mlan_ds_misc_cfg *)req->pbuf; + + memset(buf, 0, sizeof(buf)); + if (!wrq->u.data.length) { + req->action = MLAN_ACT_GET; + } else { + req->action = MLAN_ACT_SET; + if (copy_from_user(buf, wrq->u.data.pointer, + MIN(sizeof(buf) - 1, wreq->u.data.length))) { + PRINTM(MINFO, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if (buf[0] == 1) + pcoal->param.coalescing_status = + MLAN_MISC_COALESCING_ENABLE; + else + pcoal->param.coalescing_status = + MLAN_MISC_COALESCING_DISABLE; + } + + req->req_id = MLAN_IOCTL_MISC_CFG; + pcoal->sub_command = MLAN_OID_MISC_COALESCING_STATUS; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + buf[0] = ((mlan_ds_misc_cfg *)req->pbuf)->param.coalescing_status; + + if (copy_to_user(wrq->u.data.pointer, buf, wrq->u.data.length)) { + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/get user provisioned local power constraint + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_set_get_11h_local_pwr_constraint(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0, data = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_11h_cfg *ds_11hcfg = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11h_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + ds_11hcfg = (mlan_ds_11h_cfg *)req->pbuf; + if (wrq->u.data.length) { + if (copy_from_user(&data, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MINFO, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + ds_11hcfg->param.usr_local_power_constraint = (t_s8)data; + req->action = MLAN_ACT_SET; + } else + req->action = MLAN_ACT_GET; + + ds_11hcfg->sub_command = MLAN_OID_11H_LOCAL_POWER_CONSTRAINT; + req->req_id = MLAN_IOCTL_11H_CFG; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* Copy response to user */ + if (req->action == MLAN_ACT_GET) { + data = (int)ds_11hcfg->param.usr_local_power_constraint; + if (copy_to_user(wrq->u.data.pointer, &data, sizeof(int))) { + PRINTM(MINFO, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + /** * @brief Set/get MAC control configuration * @@ -2899,7 +2998,7 @@ woal_sleep_params_ioctl(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_mac_control_ioctl(moal_private * priv, struct iwreq *wrq) +woal_mac_control_ioctl(moal_private *priv, struct iwreq *wrq) { int ret = 0, data = 0; mlan_ioctl_req *req = NULL; @@ -2913,7 +3012,7 @@ woal_mac_control_ioctl(moal_private * priv, struct iwreq *wrq) ret = -ENOMEM; goto done; } - cfg = (mlan_ds_misc_cfg *) req->pbuf; + cfg = (mlan_ds_misc_cfg *)req->pbuf; if (wrq->u.data.length) { if (copy_from_user(&data, wrq->u.data.pointer, sizeof(int))) { PRINTM(MINFO, "Copy from user failed\n"); @@ -2959,7 +3058,7 @@ woal_mac_control_ioctl(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_thermal_ioctl(moal_private * priv, struct iwreq *wrq) +woal_thermal_ioctl(moal_private *priv, struct iwreq *wrq) { int ret = 0, data = 0; mlan_ioctl_req *req = NULL; @@ -2973,7 +3072,7 @@ woal_thermal_ioctl(moal_private * priv, struct iwreq *wrq) ret = -ENOMEM; goto done; } - cfg = (mlan_ds_misc_cfg *) req->pbuf; + cfg = (mlan_ds_misc_cfg *)req->pbuf; if (wrq->u.data.length) { PRINTM(MERROR, "Set is not supported for this command\n"); ret = -EINVAL; @@ -3006,6 +3105,72 @@ woal_thermal_ioctl(moal_private * priv, struct iwreq *wrq) return ret; } +/** + * @brief Set/get hotspot enable state + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq Pointer to user data + * + * @return 0 --success, otherwise fail + */ +static int +woal_cfg_hotspot(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *cfg = NULL; + int config; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (wrq->u.data.length > 1) { + PRINTM(MERROR, "Invalid no of arguments!\n"); + ret = -EINVAL; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + cfg = (mlan_ds_misc_cfg *)req->pbuf; + if (wrq->u.data.length == 0) + req->action = MLAN_ACT_GET; + else { + if (copy_from_user(&config, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MERROR, "copy from user failed\n"); + ret = -EFAULT; + goto done; + } + cfg->param.hotspot_cfg = config; + req->action = MLAN_ACT_SET; + } + + cfg->sub_command = MLAN_OID_MISC_HOTSPOT_CFG; + req->req_id = MLAN_IOCTL_MISC_CFG; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + config = cfg->param.hotspot_cfg; + if (copy_to_user(wrq->u.data.pointer, &config, sizeof(int))) { + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + #if defined(REASSOCIATION) /** * @brief Set/Get reassociation settings @@ -3016,7 +3181,7 @@ woal_thermal_ioctl(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_set_get_reassoc(moal_private * priv, struct iwreq *wrq) +woal_set_get_reassoc(moal_private *priv, struct iwreq *wrq) { moal_handle *handle = priv->phandle; int ret = 0; @@ -3067,7 +3232,7 @@ woal_set_get_reassoc(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_wmm_enable_ioctl(moal_private * priv, struct iwreq *wrq) +woal_wmm_enable_ioctl(moal_private *priv, struct iwreq *wrq) { int ret = 0; mlan_ds_wmm_cfg *wmm = NULL; @@ -3082,7 +3247,7 @@ woal_wmm_enable_ioctl(moal_private * priv, struct iwreq *wrq) ret = -ENOMEM; goto done; } - wmm = (mlan_ds_wmm_cfg *) req->pbuf; + wmm = (mlan_ds_wmm_cfg *)req->pbuf; req->req_id = MLAN_IOCTL_WMM_CFG; wmm->sub_command = MLAN_OID_WMM_CFG_ENABLE; @@ -3139,7 +3304,7 @@ woal_wmm_enable_ioctl(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_11d_enable_ioctl(moal_private * priv, struct iwreq *wrq) +woal_11d_enable_ioctl(moal_private *priv, struct iwreq *wrq) { int ret = 0; mlan_ds_11d_cfg *pcfg_11d = NULL; @@ -3155,7 +3320,7 @@ woal_11d_enable_ioctl(moal_private * priv, struct iwreq *wrq) goto done; } - pcfg_11d = (mlan_ds_11d_cfg *) req->pbuf; + pcfg_11d = (mlan_ds_11d_cfg *)req->pbuf; req->req_id = MLAN_IOCTL_11D_CFG; pcfg_11d->sub_command = MLAN_OID_11D_CFG_ENABLE; if (wrq->u.data.length) { @@ -3210,7 +3375,7 @@ woal_11d_enable_ioctl(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_11d_clr_chan_table(moal_private * priv, struct iwreq *wrq) +woal_11d_clr_chan_table(moal_private *priv, struct iwreq *wrq) { int ret = 0; mlan_ds_11d_cfg *pcfg_11d = NULL; @@ -3225,7 +3390,7 @@ woal_11d_clr_chan_table(moal_private * priv, struct iwreq *wrq) goto done; } - pcfg_11d = (mlan_ds_11d_cfg *) req->pbuf; + pcfg_11d = (mlan_ds_11d_cfg *)req->pbuf; req->req_id = MLAN_IOCTL_11D_CFG; pcfg_11d->sub_command = MLAN_OID_11D_CLR_CHAN_TABLE; req->action = MLAN_ACT_SET; @@ -3252,7 +3417,7 @@ woal_11d_clr_chan_table(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_wps_cfg_ioctl(moal_private * priv, struct iwreq *wrq) +woal_wps_cfg_ioctl(moal_private *priv, struct iwreq *wrq) { int ret = 0; mlan_ds_wps_cfg *pwps = NULL; @@ -3279,7 +3444,7 @@ woal_wps_cfg_ioctl(moal_private * priv, struct iwreq *wrq) goto done; } - pwps = (mlan_ds_wps_cfg *) req->pbuf; + pwps = (mlan_ds_wps_cfg *)req->pbuf; req->req_id = MLAN_IOCTL_WPS_CFG; req->action = MLAN_ACT_SET; pwps->sub_command = MLAN_OID_WPS_CFG_SESSION; @@ -3301,10 +3466,8 @@ woal_wps_cfg_ioctl(moal_private * priv, struct iwreq *wrq) return ret; } -/** AES key length */ -#define AES_KEY_LEN 16 /** - * @brief Adhoc AES control + * @brief Set WPA passphrase and SSID * * @param priv A pointer to moal_private structure * @param wrq A pointer to user data @@ -3312,39 +3475,286 @@ woal_wps_cfg_ioctl(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_adhoc_aes_ioctl(moal_private * priv, struct iwreq *wrq) +woal_passphrase(moal_private *priv, struct iwreq *wrq) { - static char buf[256]; - int ret = 0, action = -1; - unsigned int i; - t_u8 key_ascii[32]; - t_u8 key_hex[16]; - t_u8 *tmp = NULL; - mlan_bss_info bss_info; + t_u16 len = 0; + char buf[256]; + char *begin = NULL, *end = NULL, *opt = NULL; + int ret = 0, action = -1, i; mlan_ds_sec_cfg *sec = NULL; mlan_ioctl_req *req = NULL; - t_u8 bcast_addr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + t_u8 zero_mac[] = { 0, 0, 0, 0, 0, 0 }; + t_u8 *mac = NULL; int data_length = wrq->u.data.length, copy_len; mlan_status status = MLAN_STATUS_SUCCESS; - ENTER(); - memset(key_ascii, 0x00, sizeof(key_ascii)); - memset(key_hex, 0x00, sizeof(key_hex)); - memset(buf, 0x00, sizeof(buf)); + ENTER(); - /* Get current BSS information */ - memset(&bss_info, 0, sizeof(bss_info)); - woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); - if (bss_info.bss_mode != MLAN_BSS_MODE_IBSS || - bss_info.media_connected == MTRUE) { - PRINTM(MERROR, "STA is connected or not in IBSS mode.\n"); + if (!priv->phandle->card_info->embedded_supp) { + PRINTM(MERROR, "Not supported cmd on this card\n"); ret = -EOPNOTSUPP; goto done; } - - req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); - if (req == NULL) { - ret = -ENOMEM; + if (!data_length || data_length >= sizeof(buf)) { + PRINTM(MERROR, + "Argument missing or too long for setpassphrase\n"); + ret = -EINVAL; + goto done; + } + memset(buf, 0, sizeof(buf)); + copy_len = data_length; + + if (copy_from_user(buf, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + /* Parse the buf to get the cmd_action */ + begin = buf; + end = woal_strsep(&begin, ';', '/'); + if (!end) { + PRINTM(MERROR, "Invalid option\n"); + ret = -EINVAL; + goto done; + } + action = woal_atox(end); + if (action < 0 || action > 2 || end[1] != '\0') { + PRINTM(MERROR, "Invalid action argument %s\n", end); + ret = -EINVAL; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_PASSPHRASE; + req->req_id = MLAN_IOCTL_SEC_CFG; + if (action == 0) + req->action = MLAN_ACT_GET; + else + req->action = MLAN_ACT_SET; + while (begin) { + end = woal_strsep(&begin, ';', '/'); + opt = woal_strsep(&end, '=', '/'); + if (!opt || !end || !end[0]) { + PRINTM(MERROR, "Invalid option\n"); + ret = -EINVAL; + break; + } else if (!strnicmp(opt, "ssid", strlen(opt))) { + if (strlen(end) > MLAN_MAX_SSID_LENGTH) { + PRINTM(MERROR, + "SSID length exceeds max length\n"); + ret = -EFAULT; + break; + } + sec->param.passphrase.ssid.ssid_len = strlen(end); + strncpy((char *)sec->param.passphrase.ssid.ssid, end, + strlen(end)); + PRINTM(MINFO, "ssid=%s, len=%d\n", + sec->param.passphrase.ssid.ssid, + (int)sec->param.passphrase.ssid.ssid_len); + } else if (!strnicmp(opt, "bssid", strlen(opt))) { + woal_mac2u8(sec->param.passphrase.bssid, end); + } else if (!strnicmp(opt, "psk", strlen(opt)) && + req->action == MLAN_ACT_SET) { + if (strlen(end) != MLAN_PMK_HEXSTR_LENGTH) { + PRINTM(MERROR, "Invalid PMK length\n"); + ret = -EINVAL; + break; + } + woal_ascii2hex((t_u8 *)(sec->param.passphrase.psk.pmk. + pmk), end, + MLAN_PMK_HEXSTR_LENGTH / 2); + sec->param.passphrase.psk_type = MLAN_PSK_PMK; + } else if (!strnicmp(opt, "passphrase", strlen(opt)) && + req->action == MLAN_ACT_SET) { + if (strlen(end) < MLAN_MIN_PASSPHRASE_LENGTH || + strlen(end) > MLAN_MAX_PASSPHRASE_LENGTH) { + PRINTM(MERROR, + "Invalid length for passphrase\n"); + ret = -EINVAL; + break; + } + sec->param.passphrase.psk_type = MLAN_PSK_PASSPHRASE; + memcpy(sec->param.passphrase.psk.passphrase.passphrase, + end, + sizeof(sec->param.passphrase.psk.passphrase. + passphrase)); + sec->param.passphrase.psk.passphrase.passphrase_len = + strlen(end); + PRINTM(MINFO, "passphrase=%s, len=%d\n", + sec->param.passphrase.psk.passphrase.passphrase, + (int)sec->param.passphrase.psk.passphrase. + passphrase_len); + } else { + PRINTM(MERROR, "Invalid option %s\n", opt); + ret = -EINVAL; + break; + } + } + if (ret) + goto done; + + if (action == 2) + sec->param.passphrase.psk_type = MLAN_PSK_CLEAR; + else if (action == 0) + sec->param.passphrase.psk_type = MLAN_PSK_QUERY; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (action == 0) { + memset(buf, 0, sizeof(buf)); + if (sec->param.passphrase.ssid.ssid_len) { + len += sprintf(buf + len, "ssid:"); + memcpy(buf + len, sec->param.passphrase.ssid.ssid, + sec->param.passphrase.ssid.ssid_len); + len += sec->param.passphrase.ssid.ssid_len; + len += sprintf(buf + len, " "); + } + if (memcmp + (&sec->param.passphrase.bssid, zero_mac, + sizeof(zero_mac))) { + mac = (t_u8 *)&sec->param.passphrase.bssid; + len += sprintf(buf + len, "bssid:"); + for (i = 0; i < ETH_ALEN - 1; ++i) + len += sprintf(buf + len, "%02x:", mac[i]); + len += sprintf(buf + len, "%02x ", mac[i]); + } + if (sec->param.passphrase.psk_type == MLAN_PSK_PMK) { + len += sprintf(buf + len, "psk:"); + for (i = 0; i < MLAN_MAX_KEY_LENGTH; ++i) + len += sprintf(buf + len, "%02x", + sec->param.passphrase.psk.pmk. + pmk[i]); + len += sprintf(buf + len, "\n"); + } + if (sec->param.passphrase.psk_type == MLAN_PSK_PASSPHRASE) { + len += sprintf(buf + len, "passphrase:%s\n", + sec->param.passphrase.psk.passphrase. + passphrase); + } + if (wrq->u.data.pointer) { + if (copy_to_user + (wrq->u.data.pointer, buf, MIN(len, sizeof(buf)))) { + PRINTM(MERROR, "Copy to user failed, len %d\n", + len); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = len; + } + + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Get esupp mode + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_esupp_mode(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ds_sec_cfg *sec = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (!priv->phandle->card_info->embedded_supp) { + PRINTM(MERROR, "Not supported cmd on this card\n"); + ret = -EOPNOTSUPP; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_ESUPP_MODE; + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (copy_to_user + (wrq->u.data.pointer, (t_u8 *)&sec->param.esupp_mode, + sizeof(int) * 3)) { + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 3; +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** AES key length */ +#define AES_KEY_LEN 16 +/** + * @brief Adhoc AES control + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to user data + * + * @return 0 --success, otherwise fail + */ +static int +woal_adhoc_aes_ioctl(moal_private *priv, struct iwreq *wrq) +{ + static char buf[256]; + int ret = 0, action = -1; + unsigned int i; + t_u8 key_ascii[32]; + t_u8 key_hex[16]; + t_u8 *tmp = NULL; + mlan_bss_info bss_info; + mlan_ds_sec_cfg *sec = NULL; + mlan_ioctl_req *req = NULL; + t_u8 bcast_addr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + int data_length = wrq->u.data.length, copy_len; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + memset(key_ascii, 0x00, sizeof(key_ascii)); + memset(key_hex, 0x00, sizeof(key_hex)); + memset(buf, 0x00, sizeof(buf)); + + /* Get current BSS information */ + memset(&bss_info, 0, sizeof(bss_info)); + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + if (bss_info.bss_mode != MLAN_BSS_MODE_IBSS || + bss_info.media_connected == MTRUE) { + PRINTM(MERROR, "STA is connected or not in IBSS mode.\n"); + ret = -EOPNOTSUPP; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; goto done; } copy_len = data_length; @@ -3365,7 +3775,7 @@ woal_adhoc_aes_ioctl(moal_private * priv, struct iwreq *wrq) /* Get Adhoc AES Key */ req->req_id = MLAN_IOCTL_SEC_CFG; req->action = MLAN_ACT_GET; - sec = (mlan_ds_sec_cfg *) req->pbuf; + sec = (mlan_ds_sec_cfg *)req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; sec->param.encrypt_key.key_len = AES_KEY_LEN; sec->param.encrypt_key.key_index = @@ -3398,7 +3808,7 @@ woal_adhoc_aes_ioctl(moal_private * priv, struct iwreq *wrq) req->req_id = MLAN_IOCTL_SEC_CFG; req->action = MLAN_ACT_SET; - sec = (mlan_ds_sec_cfg *) req->pbuf; + sec = (mlan_ds_sec_cfg *)req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; if (action == 1) { @@ -3416,7 +3826,7 @@ woal_adhoc_aes_ioctl(moal_private * priv, struct iwreq *wrq) KEY_FLAG_SET_TX_KEY | KEY_FLAG_GROUP_KEY; memcpy(sec->param.encrypt_key.mac_addr, - (u8 *) bcast_addr, ETH_ALEN); + (u8 *)bcast_addr, ETH_ALEN); memcpy(sec->param.encrypt_key.key_material, key_hex, sec->param.encrypt_key.key_len); @@ -3434,7 +3844,7 @@ woal_adhoc_aes_ioctl(moal_private * priv, struct iwreq *wrq) sec->param.encrypt_key.key_flags = KEY_FLAG_REMOVE_KEY; memcpy(sec->param.encrypt_key.mac_addr, - (u8 *) bcast_addr, ETH_ALEN); + (u8 *)bcast_addr, ETH_ALEN); memset(sec->param.encrypt_key.key_material, 0, sizeof(sec->param.encrypt_key. key_material)); @@ -3467,6 +3877,173 @@ woal_adhoc_aes_ioctl(moal_private * priv, struct iwreq *wrq) return ret; } +/** + * @brief Get GTK/PTK + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to user data + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_key_ioctl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + unsigned int i; + t_u8 key_ascii[256]; + t_u8 *tmp; + mlan_ds_sec_cfg *sec = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(key_ascii, 0x00, sizeof(key_ascii)); + tmp = key_ascii; + + if (priv->media_connected == MFALSE) { + PRINTM(MERROR, "Can't get key in un-associated state\n"); + ret = -EFAULT; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Get Unicast Key */ + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_QUERY_KEY; + sec->param.encrypt_key.key_index = 0; + sec->param.encrypt_key.key_flags = 0; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (sec->param.encrypt_key.key_len) { + sprintf((char *)tmp, "\n%s", "PTK: "); + tmp += 5; + for (i = 0; i < sec->param.encrypt_key.key_len; i++) + tmp += sprintf((char *)tmp, "%02x", + sec->param.encrypt_key.key_material[i]); + } + + /* Get Multicase Key */ + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_QUERY_KEY; + sec->param.encrypt_key.key_index = 0; + sec->param.encrypt_key.key_flags = KEY_FLAG_GROUP_KEY; + memset(sec->param.encrypt_key.mac_addr, 0x0, MLAN_MAC_ADDR_LENGTH); + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (sec->param.encrypt_key.key_len) { + sprintf((char *)tmp, "\n%s", "GTK: "); + tmp += 5; + for (i = 0; i < sec->param.encrypt_key.key_len; i++) + tmp += sprintf((char *)tmp, "%02x", + sec->param.encrypt_key.key_material[i]); + } + + /* Get IGTK Key */ + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_QUERY_KEY; + sec->param.encrypt_key.key_index = 0; + sec->param.encrypt_key.key_flags = KEY_FLAG_AES_MCAST_IGTK; + memset(sec->param.encrypt_key.mac_addr, 0x0, MLAN_MAC_ADDR_LENGTH); + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (sec->param.encrypt_key.key_len) { + sprintf((char *)tmp, "\n%s", "IGTK: "); + tmp += 6; + for (i = 0; i < sec->param.encrypt_key.key_len; i++) + tmp += sprintf((char *)tmp, "%02x", + sec->param.encrypt_key.key_material[i]); + } + + wrq->u.data.length = sizeof(key_ascii) + 1; + if (wrq->u.data.pointer) { + if (copy_to_user + (wrq->u.data.pointer, &key_ascii, tmp - key_ascii)) { + PRINTM(MERROR, "copy_to_user failed\n"); + ret = -EFAULT; + goto done; + } + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief arpfilter ioctl function + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_arp_filter(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ds_misc_cfg *misc = NULL; + mlan_ioctl_req *req = NULL; + int data_length = wrq->u.data.length, copy_len; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + copy_len = + MIN(sizeof(misc->param.gen_ie.ie_data), + sizeof(int) * data_length); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + misc = (mlan_ds_misc_cfg *)req->pbuf; + misc->sub_command = MLAN_OID_MISC_GEN_IE; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = MLAN_ACT_SET; + misc->param.gen_ie.type = MLAN_IE_TYPE_ARP_FILTER; + misc->param.gen_ie.len = data_length; + + /* get the whole command from user */ + if (copy_from_user + (misc->param.gen_ie.ie_data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + /** * @brief Set/get IP address * @@ -3475,7 +4052,7 @@ woal_adhoc_aes_ioctl(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_set_get_ip_addr(moal_private * priv, struct iwreq *wrq) +woal_set_get_ip_addr(moal_private *priv, struct iwreq *wrq) { char buf[IPADDR_MAX_BUF]; mlan_ioctl_req *ioctl_req = NULL; @@ -3491,7 +4068,7 @@ woal_set_get_ip_addr(moal_private * priv, struct iwreq *wrq) ret = -ENOMEM; goto done; } - misc = (mlan_ds_misc_cfg *) ioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; if (data_length <= 1) { /* GET */ ioctl_req->action = MLAN_ACT_GET; @@ -3524,7 +4101,7 @@ woal_set_get_ip_addr(moal_private * priv, struct iwreq *wrq) ret = -EINVAL; goto done; } - misc->param.ipaddr_cfg.op_code = (t_u32) op_code; + misc->param.ipaddr_cfg.op_code = (t_u32)op_code; ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; misc->sub_command = MLAN_OID_MISC_IP_ADDR; @@ -3565,7 +4142,7 @@ woal_set_get_ip_addr(moal_private * priv, struct iwreq *wrq) * @return 0 -- success, otherwise fail */ static int -woal_tx_bf_cap_ioctl(moal_private * priv, struct iwreq *wrq) +woal_tx_bf_cap_ioctl(moal_private *priv, struct iwreq *wrq) { int ret = 0, data_length = wrq->u.data.length; mlan_ioctl_req *req = NULL; @@ -3588,7 +4165,7 @@ woal_tx_bf_cap_ioctl(moal_private * priv, struct iwreq *wrq) } /* Fill request buffer */ - bf_cfg = (mlan_ds_11n_cfg *) req->pbuf; + bf_cfg = (mlan_ds_11n_cfg *)req->pbuf; req->req_id = MLAN_IOCTL_11N_CFG; bf_cfg->sub_command = MLAN_OID_11N_CFG_TX_BF_CAP; req->action = MLAN_ACT_GET; @@ -3634,7 +4211,7 @@ woal_tx_bf_cap_ioctl(moal_private * priv, struct iwreq *wrq) */ static int moal_ret_get_scan_table_ioctl(struct iwreq *wrq, - mlan_scan_resp * scan_resp, t_u32 scan_start) + mlan_scan_resp *scan_resp, t_u32 scan_start) { pBSSDescriptor_t pbss_desc, scan_table; wlan_ioctl_get_scan_table_info *prsp_info; @@ -3650,12 +4227,12 @@ moal_ret_get_scan_table_ioctl(struct iwreq *wrq, num_scans_done = 0; ret_code = MLAN_STATUS_SUCCESS; - prsp_info = (wlan_ioctl_get_scan_table_info *) wrq->u.data.pointer; - pcurrent = (t_u8 *) prsp_info->scan_table_entry_buf; + prsp_info = (wlan_ioctl_get_scan_table_info *)wrq->u.data.pointer; + pcurrent = (t_u8 *)prsp_info->scan_table_entry_buf; pbuffer_end = wrq->u.data.pointer + wrq->u.data.length - 1; space_left = pbuffer_end - pcurrent; - scan_table = (BSSDescriptor_t *) (scan_resp->pscan_table); + scan_table = (BSSDescriptor_t *)(scan_resp->pscan_table); PRINTM(MINFO, "GetScanTable: scan_start req = %d\n", scan_start); PRINTM(MINFO, "GetScanTable: length avail = %d\n", wrq->u.data.length); @@ -3697,7 +4274,7 @@ moal_ret_get_scan_table_ioctl(struct iwreq *wrq, } prsp_info->scan_number = num_scans_done; - ret_len = pcurrent - (t_u8 *) wrq->u.data.pointer; + ret_len = pcurrent - (t_u8 *)wrq->u.data.pointer; wrq->u.data.length = ret_len; @@ -3716,7 +4293,7 @@ moal_ret_get_scan_table_ioctl(struct iwreq *wrq, * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ static mlan_status -woal_get_scan_table_ioctl(moal_private * priv, struct iwreq *wrq) +woal_get_scan_table_ioctl(moal_private *priv, struct iwreq *wrq) { int ret = 0; mlan_ioctl_req *req = NULL; @@ -3734,7 +4311,7 @@ woal_get_scan_table_ioctl(moal_private * priv, struct iwreq *wrq) } /* Fill request buffer */ - scan = (mlan_ds_scan *) req->pbuf; + scan = (mlan_ds_scan *)req->pbuf; req->req_id = MLAN_IOCTL_SCAN; req->action = MLAN_ACT_GET; @@ -3772,7 +4349,7 @@ woal_get_scan_table_ioctl(moal_private * priv, struct iwreq *wrq) * @return 0 -- success, otherwise fail */ static int -woal_set_user_scan_ext_ioctl(moal_private * priv, struct iwreq *wrq) +woal_set_user_scan_ext_ioctl(moal_private *priv, struct iwreq *wrq) { int ret = 0; wlan_user_scan_cfg scan_req; @@ -3800,7 +4377,7 @@ woal_set_user_scan_ext_ioctl(moal_private * priv, struct iwreq *wrq) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ static mlan_status -woal_set_user_scan_ioctl(moal_private * priv, struct iwreq *wrq) +woal_set_user_scan_ioctl(moal_private *priv, struct iwreq *wrq) { int ret = 0; mlan_ioctl_req *req = NULL; @@ -3832,7 +4409,7 @@ woal_set_user_scan_ioctl(moal_private * priv, struct iwreq *wrq) } /* Fill request buffer */ - scan = (mlan_ds_scan *) req->pbuf; + scan = (mlan_ds_scan *)req->pbuf; scan->sub_command = MLAN_OID_SCAN_USER_CONFIG; req->req_id = MLAN_IOCTL_SCAN; req->action = MLAN_ACT_SET; @@ -3868,7 +4445,7 @@ woal_set_user_scan_ioctl(moal_private * priv, struct iwreq *wrq) * @return MLAN_STATUS_SUCCESS --success, otherwise fail */ static int -woal_cmd52rdwr_ioctl(moal_private * priv, struct iwreq *wrq) +woal_cmd52rdwr_ioctl(moal_private *priv, struct iwreq *wrq) { t_u8 rw = 0, func, data = 0; int buf[3], reg, ret = MLAN_STATUS_SUCCESS; @@ -3888,20 +4465,20 @@ woal_cmd52rdwr_ioctl(moal_private * priv, struct iwreq *wrq) goto done; } - func = (t_u8) buf[0]; + func = (t_u8)buf[0]; if (func > 7) { PRINTM(MERROR, "Invalid function number!\n"); ret = -EINVAL; goto done; } - reg = (t_u32) buf[1]; + reg = (t_u32)buf[1]; if (data_length == 2) { rw = 0; /* CMD52 read */ PRINTM(MINFO, "Cmd52 read, func=%d, reg=0x%08X\n", func, reg); } if (data_length == 3) { rw = 1; /* CMD52 write */ - data = (t_u8) buf[2]; + data = (t_u8)buf[2]; PRINTM(MINFO, "Cmd52 write, func=%d, reg=0x%08X, data=0x%02X\n", func, reg, data); } @@ -3963,7 +4540,7 @@ woal_cmd52rdwr_ioctl(moal_private * priv, struct iwreq *wrq) * @return MLAN_STATUS_SUCCESS --success, otherwise fail */ static int -woal_cmd53rdwr_ioctl(moal_private * priv, struct iwreq *wrq) +woal_cmd53rdwr_ioctl(moal_private *priv, struct iwreq *wrq) { t_u8 *buf = NULL; t_u8 rw, func, mode; @@ -3974,13 +4551,13 @@ woal_cmd53rdwr_ioctl(moal_private * priv, struct iwreq *wrq) ENTER(); - buf = (t_u8 *) kmalloc(WOAL_2K_BYTES, GFP_KERNEL); + buf = kmalloc(WOAL_2K_BYTES, GFP_KERNEL); if (!buf) { PRINTM(MERROR, "Cannot allocate buffer for command!\n"); ret = -EFAULT; goto done; } - data = (t_u8 *) kmalloc(WOAL_2K_BYTES, GFP_KERNEL); + data = kmalloc(WOAL_2K_BYTES, GFP_KERNEL); if (!data) { PRINTM(MERROR, "Cannot allocate buffer for command!\n"); ret = -EFAULT; @@ -4078,7 +4655,7 @@ woal_cmd53rdwr_ioctl(moal_private * priv, struct iwreq *wrq) * @return 0/MLAN_STATUS_PENDING --success, otherwise fail */ static int -woal_do_sdio_mpa_ctrl(moal_private * priv, struct iwreq *wrq) +woal_do_sdio_mpa_ctrl(moal_private *priv, struct iwreq *wrq) { int data[6], data_length = wrq->u.data.length, copy_len; int ret = 0; @@ -4100,7 +4677,7 @@ woal_do_sdio_mpa_ctrl(moal_private * priv, struct iwreq *wrq) ret = -ENOMEM; goto done; } - misc = (mlan_ds_misc_cfg *) req->pbuf; + misc = (mlan_ds_misc_cfg *)req->pbuf; memset(misc, 0, sizeof(mlan_ds_misc_cfg)); misc->sub_command = MLAN_OID_MISC_SDIO_MPA_CTRL; @@ -4192,7 +4769,7 @@ woal_do_sdio_mpa_ctrl(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_set_get_scan_cfg(moal_private * priv, struct iwreq *wrq) +woal_set_get_scan_cfg(moal_private *priv, struct iwreq *wrq) { int ret = 0; int arg_len = 7; @@ -4213,7 +4790,7 @@ woal_set_get_scan_cfg(moal_private * priv, struct iwreq *wrq) ret = -EINVAL; goto done; } - scan = (mlan_ds_scan *) req->pbuf; + scan = (mlan_ds_scan *)req->pbuf; scan->sub_command = MLAN_OID_SCAN_CONFIG; req->req_id = MLAN_IOCTL_SCAN; memset(data, 0, sizeof(data)); @@ -4287,7 +4864,7 @@ woal_set_get_scan_cfg(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_set_get_ps_cfg(moal_private * priv, struct iwreq *wrq) +woal_set_get_ps_cfg(moal_private *priv, struct iwreq *wrq) { int data[7], copy_len, ret = 0; mlan_ds_pm_cfg *pm_cfg = NULL; @@ -4313,7 +4890,7 @@ woal_set_get_ps_cfg(moal_private * priv, struct iwreq *wrq) ret = -EINVAL; goto done; } - pm_cfg = (mlan_ds_pm_cfg *) req->pbuf; + pm_cfg = (mlan_ds_pm_cfg *)req->pbuf; pm_cfg->sub_command = MLAN_OID_PM_CFG_PS_CFG; req->req_id = MLAN_IOCTL_PM_CFG; memset(data, 0, sizeof(data)); @@ -4401,7 +4978,7 @@ woal_set_get_ps_cfg(moal_private * priv, struct iwreq *wrq) wrq->u.data.length = allowed; if (req->action == MLAN_ACT_SET) { - pm_cfg = (mlan_ds_pm_cfg *) req->pbuf; + pm_cfg = (mlan_ds_pm_cfg *)req->pbuf; pm_cfg->sub_command = MLAN_OID_PM_CFG_IEEE_PS; pm_cfg->param.ps_mode = 1; req->req_id = MLAN_IOCTL_PM_CFG; @@ -4452,7 +5029,7 @@ woal_set_get_ps_cfg(moal_private * priv, struct iwreq *wrq) * @return 0 if successful; IOCTL error code otherwise */ static int -woal_wmm_addts_req_ioctl(moal_private * priv, struct iwreq *wrq) +woal_wmm_addts_req_ioctl(moal_private *priv, struct iwreq *wrq) { mlan_ioctl_req *req = NULL; mlan_ds_wmm_cfg *cfg = NULL; @@ -4469,7 +5046,7 @@ woal_wmm_addts_req_ioctl(moal_private * priv, struct iwreq *wrq) } req->req_id = MLAN_IOCTL_WMM_CFG; - cfg = (mlan_ds_wmm_cfg *) req->pbuf; + cfg = (mlan_ds_wmm_cfg *)req->pbuf; cfg->sub_command = MLAN_OID_WMM_CFG_ADDTS; memset(&addts_ioctl, 0x00, sizeof(addts_ioctl)); @@ -4503,7 +5080,7 @@ woal_wmm_addts_req_ioctl(moal_private * priv, struct iwreq *wrq) } addts_ioctl.cmd_result = cfg->param.addts.result; addts_ioctl.ieee_status_code = - (t_u8) cfg->param.addts.status_code; + (t_u8)cfg->param.addts.status_code; addts_ioctl.ie_data_len = cfg->param.addts.ie_data_len; memcpy(addts_ioctl.ie_data, @@ -4550,7 +5127,7 @@ woal_wmm_addts_req_ioctl(moal_private * priv, struct iwreq *wrq) * @return 0 if successful; IOCTL error code otherwise */ static int -woal_wmm_delts_req_ioctl(moal_private * priv, struct iwreq *wrq) +woal_wmm_delts_req_ioctl(moal_private *priv, struct iwreq *wrq) { mlan_ioctl_req *req = NULL; mlan_ds_wmm_cfg *cfg = NULL; @@ -4567,7 +5144,7 @@ woal_wmm_delts_req_ioctl(moal_private * priv, struct iwreq *wrq) } req->req_id = MLAN_IOCTL_WMM_CFG; - cfg = (mlan_ds_wmm_cfg *) req->pbuf; + cfg = (mlan_ds_wmm_cfg *)req->pbuf; cfg->sub_command = MLAN_OID_WMM_CFG_DELTS; memset(&delts_ioctl, 0x00, sizeof(delts_ioctl)); @@ -4582,8 +5159,8 @@ woal_wmm_delts_req_ioctl(moal_private * priv, struct iwreq *wrq) } cfg->param.delts.status_code = - (t_u32) delts_ioctl.ieee_reason_code; - cfg->param.delts.ie_data_len = (t_u8) delts_ioctl.ie_data_len; + (t_u32)delts_ioctl.ieee_reason_code; + cfg->param.delts.ie_data_len = (t_u8)delts_ioctl.ie_data_len; if ((cfg->param.delts.ie_data_len) > sizeof(cfg->param.delts.ie_data)) { @@ -4634,7 +5211,7 @@ woal_wmm_delts_req_ioctl(moal_private * priv, struct iwreq *wrq) * @return 0 if successful; IOCTL error code otherwise */ static int -woal_wmm_queue_config_ioctl(moal_private * priv, struct iwreq *wrq) +woal_wmm_queue_config_ioctl(moal_private *priv, struct iwreq *wrq) { mlan_ioctl_req *req = NULL; mlan_ds_wmm_cfg *pwmm = NULL; @@ -4652,11 +5229,11 @@ woal_wmm_queue_config_ioctl(moal_private * priv, struct iwreq *wrq) } req->req_id = MLAN_IOCTL_WMM_CFG; - pwmm = (mlan_ds_wmm_cfg *) req->pbuf; + pwmm = (mlan_ds_wmm_cfg *)req->pbuf; pwmm->sub_command = MLAN_OID_WMM_CFG_QUEUE_CONFIG; memset(&qcfg_ioctl, 0x00, sizeof(qcfg_ioctl)); - pqcfg = (mlan_ds_wmm_queue_config *) & pwmm->param.q_cfg; + pqcfg = (mlan_ds_wmm_queue_config *)&pwmm->param.q_cfg; if (wrq->u.data.length) { if (copy_from_user(&qcfg_ioctl, wrq->u.data.pointer, @@ -4713,7 +5290,7 @@ woal_wmm_queue_config_ioctl(moal_private * priv, struct iwreq *wrq) * @return 0 if successful; IOCTL error code otherwise */ static int -woal_wmm_queue_stats_ioctl(moal_private * priv, struct iwreq *wrq) +woal_wmm_queue_stats_ioctl(moal_private *priv, struct iwreq *wrq) { mlan_ioctl_req *req = NULL; mlan_ds_wmm_cfg *pwmm = NULL; @@ -4731,11 +5308,11 @@ woal_wmm_queue_stats_ioctl(moal_private * priv, struct iwreq *wrq) } req->req_id = MLAN_IOCTL_WMM_CFG; - pwmm = (mlan_ds_wmm_cfg *) req->pbuf; + pwmm = (mlan_ds_wmm_cfg *)req->pbuf; pwmm->sub_command = MLAN_OID_WMM_CFG_QUEUE_STATS; memset(&qstats_ioctl, 0x00, sizeof(qstats_ioctl)); - pqstats = (mlan_ds_wmm_queue_stats *) & pwmm->param.q_stats; + pqstats = (mlan_ds_wmm_queue_stats *)&pwmm->param.q_stats; if (wrq->u.data.length) { if (copy_from_user(&qstats_ioctl, wrq->u.data.pointer, @@ -4795,7 +5372,7 @@ woal_wmm_queue_stats_ioctl(moal_private * priv, struct iwreq *wrq) * @return 0 if successful; IOCTL error code otherwise */ static int -woal_wmm_queue_status_ioctl(moal_private * priv, struct iwreq *wrq) +woal_wmm_queue_status_ioctl(moal_private *priv, struct iwreq *wrq) { mlan_ioctl_req *req = NULL; mlan_ds_wmm_cfg *pwmm = NULL; @@ -4812,7 +5389,7 @@ woal_wmm_queue_status_ioctl(moal_private * priv, struct iwreq *wrq) } req->req_id = MLAN_IOCTL_WMM_CFG; - pwmm = (mlan_ds_wmm_cfg *) req->pbuf; + pwmm = (mlan_ds_wmm_cfg *)req->pbuf; pwmm->sub_command = MLAN_OID_WMM_CFG_QUEUE_STATUS; if (wrq->u.data.length == sizeof(qstatus_ioctl)) { @@ -4854,7 +5431,7 @@ woal_wmm_queue_status_ioctl(moal_private * priv, struct iwreq *wrq) * @return 0 if successful; IOCTL error code otherwise */ static int -woal_wmm_ts_status_ioctl(moal_private * priv, struct iwreq *wrq) +woal_wmm_ts_status_ioctl(moal_private *priv, struct iwreq *wrq) { mlan_ioctl_req *req = NULL; mlan_ds_wmm_cfg *pwmm = NULL; @@ -4871,7 +5448,7 @@ woal_wmm_ts_status_ioctl(moal_private * priv, struct iwreq *wrq) } req->req_id = MLAN_IOCTL_WMM_CFG; - pwmm = (mlan_ds_wmm_cfg *) req->pbuf; + pwmm = (mlan_ds_wmm_cfg *)req->pbuf; pwmm->sub_command = MLAN_OID_WMM_CFG_TS_STATUS; memset(&ts_status_ioctl, 0x00, sizeof(ts_status_ioctl)); @@ -4925,7 +5502,7 @@ woal_wmm_ts_status_ioctl(moal_private * priv, struct iwreq *wrq) * @return 0 if successful; IOCTL error code otherwise */ static int -woal_bypassed_packet_ioctl(moal_private * priv, struct iwreq *wrq) +woal_bypassed_packet_ioctl(moal_private *priv, struct iwreq *wrq) { int ret = 0; struct sk_buff *skb = NULL; @@ -4976,7 +5553,7 @@ woal_bypassed_packet_ioctl(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_auth_type(moal_private * priv, struct iwreq *wrq) +woal_auth_type(moal_private *priv, struct iwreq *wrq) { int auth_type; t_u32 auth_mode; @@ -5032,7 +5609,7 @@ woal_auth_type(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_port_ctrl(moal_private * priv, struct iwreq *wrq) +woal_port_ctrl(moal_private *priv, struct iwreq *wrq) { mlan_ioctl_req *req = NULL; mlan_ds_sec_cfg *sec = NULL; @@ -5048,7 +5625,7 @@ woal_port_ctrl(moal_private * priv, struct iwreq *wrq) } /* Fill request buffer */ - sec = (mlan_ds_sec_cfg *) req->pbuf; + sec = (mlan_ds_sec_cfg *)req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_PORT_CTRL_ENABLED; req->req_id = MLAN_IOCTL_SEC_CFG; @@ -5089,6 +5666,106 @@ woal_port_ctrl(moal_private * priv, struct iwreq *wrq) return ret; } +#if defined(DFS_TESTING_SUPPORT) +/** + * @brief Set/Get DFS Testing settings + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_dfs_testing(moal_private *priv, struct iwreq *wrq) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_11h_cfg *ds_11hcfg = NULL; + int ret = 0; + int data[4], copy_len; + int data_length = wrq->u.data.length; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11h_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + ds_11hcfg = (mlan_ds_11h_cfg *)req->pbuf; + ds_11hcfg->sub_command = MLAN_OID_11H_DFS_TESTING; + req->req_id = MLAN_IOCTL_11H_CFG; + + if (!data_length) { + req->action = MLAN_ACT_GET; + } else if (data_length == 4) { + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if ((unsigned)data[0] > 0xFFFF) { + PRINTM(MERROR, "The maximum user CAC is 65535 msec.\n"); + ret = -EINVAL; + goto done; + } + if ((unsigned)data[1] > 0xFFFF) { + PRINTM(MERROR, "The maximum user NOP is 65535 sec.\n"); + ret = -EINVAL; + goto done; + } + if ((unsigned)data[3] > 0xFF) { + PRINTM(MERROR, + "The maximum user fixed channel is 255.\n"); + ret = -EINVAL; + goto done; + } + ds_11hcfg->param.dfs_testing.usr_cac_period_msec = + (t_u16)data[0]; + ds_11hcfg->param.dfs_testing.usr_nop_period_sec = + (t_u16)data[1]; + ds_11hcfg->param.dfs_testing.usr_no_chan_change = + data[2] ? 1 : 0; + ds_11hcfg->param.dfs_testing.usr_fixed_new_chan = (t_u8)data[3]; + priv->phandle->cac_period_jiffies = (t_u16)data[0] * HZ / 1000; + req->action = MLAN_ACT_SET; + } else { + PRINTM(MERROR, "Invalid number of args!\n"); + ret = -EINVAL; + goto done; + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (!data_length) { + data[0] = ds_11hcfg->param.dfs_testing.usr_cac_period_msec; + data[1] = ds_11hcfg->param.dfs_testing.usr_nop_period_sec; + data[2] = ds_11hcfg->param.dfs_testing.usr_no_chan_change; + data[3] = ds_11hcfg->param.dfs_testing.usr_fixed_new_chan; + if (copy_to_user(wrq->u.data.pointer, &data, sizeof(int) * 4)) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 4; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} +#endif /* DFS_SUPPORT && DFS_TESTING_SUPPORT */ + /** * @brief Set/Get Mgmt Frame passthru mask * @@ -5098,7 +5775,7 @@ woal_port_ctrl(moal_private * priv, struct iwreq *wrq) * @return 0 -- success, otherwise fail */ static int -woal_mgmt_frame_passthru_ctrl(moal_private * priv, struct iwreq *wrq) +woal_mgmt_frame_passthru_ctrl(moal_private *priv, struct iwreq *wrq) { int ret = 0, data_length = wrq->u.data.length; mlan_ioctl_req *req = NULL; @@ -5121,7 +5798,7 @@ woal_mgmt_frame_passthru_ctrl(moal_private * priv, struct iwreq *wrq) } /* Fill request buffer */ - mgmt_cfg = (mlan_ds_misc_cfg *) req->pbuf; + mgmt_cfg = (mlan_ds_misc_cfg *)req->pbuf; req->req_id = MLAN_IOCTL_MISC_CFG; mgmt_cfg->sub_command = MLAN_OID_MISC_RX_MGMT_IND; @@ -5167,7 +5844,7 @@ woal_mgmt_frame_passthru_ctrl(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_cfp_code(moal_private * priv, struct iwreq *wrq) +woal_cfp_code(moal_private *priv, struct iwreq *wrq) { int ret = 0; int data[2], copy_len; @@ -5194,7 +5871,7 @@ woal_cfp_code(moal_private * priv, struct iwreq *wrq) } /* Fill request buffer */ - misc_cfg = (mlan_ds_misc_cfg *) req->pbuf; + misc_cfg = (mlan_ds_misc_cfg *)req->pbuf; cfp_code = &misc_cfg->param.cfp_code; misc_cfg->sub_command = MLAN_OID_MISC_CFP_CODE; req->req_id = MLAN_IOCTL_MISC_CFG; @@ -5249,7 +5926,7 @@ woal_cfp_code(moal_private * priv, struct iwreq *wrq) * @return 0 --success, otherwise fail */ static int -woal_set_get_tx_rx_ant(moal_private * priv, struct iwreq *wrq) +woal_set_get_tx_rx_ant(moal_private *priv, struct iwreq *wrq) { int ret = 0; mlan_ds_radio_cfg *radio = NULL; @@ -5264,7 +5941,7 @@ woal_set_get_tx_rx_ant(moal_private * priv, struct iwreq *wrq) ret = -ENOMEM; goto done; } - radio = (mlan_ds_radio_cfg *) req->pbuf; + radio = (mlan_ds_radio_cfg *)req->pbuf; radio->sub_command = MLAN_OID_ANT_CFG; req->req_id = MLAN_IOCTL_RADIO_CFG; if (wrq->u.data.length) { @@ -5312,7 +5989,7 @@ woal_set_get_tx_rx_ant(moal_private * priv, struct iwreq *wrq) int woal_wext_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); struct iwreq *wrq = (struct iwreq *)req; int ret = 0; @@ -5389,6 +6066,9 @@ woal_wext_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd) case WOAL_PORT_CTRL: ret = woal_port_ctrl(priv, wrq); break; + case WOAL_COALESCING_STATUS: + ret = woal_coalescing_status_ioctl(priv, wrq); + break; #if defined(WIFI_DIRECT_SUPPORT) #if defined(STA_SUPPORT) && defined(UAP_SUPPORT) case WOAL_SET_GET_BSS_ROLE: @@ -5396,12 +6076,18 @@ woal_wext_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd) break; #endif #endif + case WOAL_SET_GET_11H_LOCAL_PWR_CONSTRAINT: + ret = woal_set_get_11h_local_pwr_constraint(priv, wrq); + break; case WOAL_MAC_CONTROL: ret = woal_mac_control_ioctl(priv, wrq); break; case WOAL_THERMAL: ret = woal_thermal_ioctl(priv, wrq); break; + case WOAL_CFG_HOTSPOT: + ret = woal_cfg_hotspot(priv, wrq); + break; default: ret = -EOPNOTSUPP; break; @@ -5421,9 +6107,6 @@ woal_wext_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd) case WOAL_BEACON_INTERVAL: ret = woal_beacon_interval(priv, wrq); break; - case WOAL_ATIM_WINDOW: - ret = woal_atim_window(priv, wrq); - break; case WOAL_SIGNAL: ret = woal_get_signal(priv, wrq); break; @@ -5489,6 +6172,11 @@ woal_wext_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd) case WOAL_SLEEP_PARAMS: ret = woal_sleep_params_ioctl(priv, wrq); break; +#if defined(DFS_TESTING_SUPPORT) + case WOAL_DFS_TESTING: + ret = woal_dfs_testing(priv, wrq); + break; +#endif case WOAL_MGMT_FRAME_CTRL: ret = woal_mgmt_frame_passthru_ctrl(priv, wrq); break; @@ -5510,9 +6198,15 @@ woal_wext_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd) case WOAL_SET_GET_256_CHAR: switch (wrq->u.data.flags) { + case WOAL_PASSPHRASE: + ret = woal_passphrase(priv, wrq); + break; case WOAL_ADHOC_AES: ret = woal_adhoc_aes_ioctl(priv, wrq); break; + case WOAL_GET_KEY: + ret = woal_get_key_ioctl(priv, wrq); + break; case WOAL_ASSOCIATE: ret = woal_associate_ssid_bssid(priv, wrq); break; @@ -5563,6 +6257,9 @@ woal_wext_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd) case WOAL_DATA_RATE: ret = woal_get_txrx_rate(priv, wrq); break; + case WOAL_ESUPP_MODE: + ret = woal_get_esupp_mode(priv, wrq); + break; default: ret = -EINVAL; break; @@ -5581,6 +6278,9 @@ woal_wext_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd) case WOAL_HOST_CMD: ret = woal_host_command(priv, wrq); break; + case WOAL_ARP_FILTER: + ret = woal_arp_filter(priv, wrq); + break; case WOAL_SET_INTS_GET_CHARS: switch ((int)wrq->u.data.flags) { case WOAL_READ_EEPROM: @@ -5654,8 +6354,8 @@ woal_wext_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_get_data_rates(moal_private * priv, t_u8 wait_option, - moal_802_11_rates * m_rates) +woal_get_data_rates(moal_private *priv, t_u8 wait_option, + moal_802_11_rates *m_rates) { int ret = 0; mlan_ds_rate *rate = NULL; @@ -5671,7 +6371,7 @@ woal_get_data_rates(moal_private * priv, t_u8 wait_option, } /* Fill request buffer */ - rate = (mlan_ds_rate *) req->pbuf; + rate = (mlan_ds_rate *)req->pbuf; rate->sub_command = MLAN_OID_SUPPORTED_RATES; req->req_id = MLAN_IOCTL_RATE; req->action = MLAN_ACT_GET; @@ -5703,8 +6403,8 @@ woal_get_data_rates(moal_private * priv, t_u8 wait_option, * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_get_channel_list(moal_private * priv, t_u8 wait_option, - mlan_chan_list * chan_list) +woal_get_channel_list(moal_private *priv, t_u8 wait_option, + mlan_chan_list *chan_list) { int ret = 0; mlan_ds_bss *bss = NULL; @@ -5720,7 +6420,7 @@ woal_get_channel_list(moal_private * priv, t_u8 wait_option, } /* Fill request buffer */ - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_BSS_CHANNEL_LIST; req->req_id = MLAN_IOCTL_BSS; req->action = MLAN_ACT_GET; @@ -5749,7 +6449,7 @@ woal_get_channel_list(moal_private * priv, t_u8 wait_option, * @return N/A */ void -woal_ioctl_get_info_resp(moal_private * priv, mlan_ds_get_info * info) +woal_ioctl_get_info_resp(moal_private *priv, mlan_ds_get_info *info) { ENTER(); switch (info->sub_command) { @@ -5781,7 +6481,7 @@ woal_ioctl_get_info_resp(moal_private * priv, mlan_ds_get_info * info) * @return N/A */ void -woal_ioctl_get_bss_resp(moal_private * priv, mlan_ds_bss * bss) +woal_ioctl_get_bss_resp(moal_private *priv, mlan_ds_bss *bss) { t_u32 mode = 0; diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_priv.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_priv.h old mode 100755 new mode 100644 index 0e80f6e7..2e7b6fef --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_priv.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_priv.h @@ -71,8 +71,6 @@ Change log: #endif /** Private command ID to set/get beacon interval */ #define WOAL_BEACON_INTERVAL 3 -/** Private command ID to set/get ATIM window */ -#define WOAL_ATIM_WINDOW 4 /** Private command ID to get RSSI */ #define WOAL_SIGNAL 5 /** Private command ID to set/get Deep Sleep mode */ @@ -117,6 +115,10 @@ Change log: #define WOAL_SLEEP_PARAMS 28 /** Private command ID to set/get TX BF capabilities */ #define WOAL_TX_BF_CAP 31 +#if defined(DFS_TESTING_SUPPORT) +/** Private command ID to set/get dfs testing settings */ +#define WOAL_DFS_TESTING 33 +#endif /** Private command ID to set/get CFP table codes */ #define WOAL_CFP_CODE 34 /** Private command ID to set/get tx/rx antenna */ @@ -152,16 +154,22 @@ Change log: #define WOAL_AUTH_TYPE 18 /** Private command ID to set/get port control */ #define WOAL_PORT_CTRL 19 +/** Private command ID for coalesced status */ +#define WOAL_COALESCING_STATUS 20 #if defined(WIFI_DIRECT_SUPPORT) #if defined(STA_SUPPORT) && defined(UAP_SUPPORT) /** Private command ID for set/get BSS role */ #define WOAL_SET_GET_BSS_ROLE 21 #endif #endif +/** Private command ID for set/get 11h local power constraint */ +#define WOAL_SET_GET_11H_LOCAL_PWR_CONSTRAINT 22 /** Private command ID to set/get MAC control */ #define WOAL_MAC_CONTROL 24 /** Private command ID to get thermal value */ #define WOAL_THERMAL 25 +/** Private command ID to set/get hs cfg param */ +#define WOAL_CFG_HOTSPOT 26 /** Private command ID to get log */ #define WOALGETLOG (WOAL_IOCTL + 7) @@ -173,6 +181,8 @@ Change log: /** Private command to get/set 256 chars */ #define WOAL_SET_GET_256_CHAR (WOAL_IOCTL + 9) +/** Private command to read/write passphrase */ +#define WOAL_PASSPHRASE 1 /** Private command to get/set Ad-Hoc AES */ #define WOAL_ADHOC_AES 2 #define WOAL_ASSOCIATE 3 @@ -181,6 +191,8 @@ Change log: /** Private command ID to get Traffic stream status */ #define WOAL_WMM_TS_STATUS 5 #define WOAL_IP_ADDRESS 7 +/** Private command ID to get PTK/GTK */ +#define WOAL_GET_KEY 9 /** Get log buffer size */ #define GETLOG_BUFSIZE 512 @@ -194,6 +206,8 @@ Change log: #define WOAL_SETNONE_GET_FOUR_INT (WOAL_IOCTL + 13) /** Private command ID to get data rates */ #define WOAL_DATA_RATE 1 +/** Private command ID to get E-Supplicant mode */ +#define WOAL_ESUPP_MODE 2 /** Private command to get/set 64 ints */ #define WOAL_SET_GET_64_INT (WOAL_IOCTL + 15) @@ -203,6 +217,9 @@ Change log: /** Private command ID for hostcmd */ #define WOAL_HOST_CMD (WOAL_IOCTL + 17) +/** Private command ID for arpfilter */ +#define WOAL_ARP_FILTER (WOAL_IOCTL + 19) + /** Private command ID to set ints and get chars */ #define WOAL_SET_INTS_GET_CHARS (WOAL_IOCTL + 21) /** Private command ID to read EEPROM data */ @@ -343,6 +360,11 @@ static const struct iw_priv_args woal_private_args[] = { IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1, "port_ctrl"}, + { + WOAL_COALESCING_STATUS, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "coalesce_status"}, #if defined(WIFI_DIRECT_SUPPORT) #if defined(STA_SUPPORT) && defined(UAP_SUPPORT) { @@ -352,6 +374,11 @@ static const struct iw_priv_args woal_private_args[] = { "bssrole"}, #endif #endif + { + WOAL_SET_GET_11H_LOCAL_PWR_CONSTRAINT, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "powercons"}, { WOAL_MAC_CONTROL, IW_PRIV_TYPE_INT | 1, @@ -362,6 +389,11 @@ static const struct iw_priv_args woal_private_args[] = { IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1, "thermal"}, + { + WOAL_CFG_HOTSPOT, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "hotspotcfg"}, { WOAL_SET_GET_SIXTEEN_INT, IW_PRIV_TYPE_INT | 16, @@ -384,11 +416,6 @@ static const struct iw_priv_args woal_private_args[] = { IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16, "bcninterval"}, - { - WOAL_ATIM_WINDOW, - IW_PRIV_TYPE_INT | 16, - IW_PRIV_TYPE_INT | 16, - "atimwindow"}, { WOAL_SIGNAL, IW_PRIV_TYPE_INT | 16, @@ -497,6 +524,13 @@ static const struct iw_priv_args woal_private_args[] = { IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16, "sleepparams"}, +#if defined(DFS_TESTING_SUPPORT) + { + WOAL_DFS_TESTING, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "dfstesting"}, +#endif { WOAL_MGMT_FRAME_CTRL, IW_PRIV_TYPE_INT | 16, @@ -532,11 +566,21 @@ static const struct iw_priv_args woal_private_args[] = { IW_PRIV_TYPE_CHAR | 256, IW_PRIV_TYPE_CHAR | 256, ""}, + { + WOAL_PASSPHRASE, + IW_PRIV_TYPE_CHAR | 256, + IW_PRIV_TYPE_CHAR | 256, + "passphrase"}, { WOAL_ADHOC_AES, IW_PRIV_TYPE_CHAR | 256, IW_PRIV_TYPE_CHAR | 256, "adhocaes"}, + { + WOAL_GET_KEY, + IW_PRIV_TYPE_CHAR | 256, + IW_PRIV_TYPE_CHAR | 256, + "getkey"}, { WOAL_ASSOCIATE, IW_PRIV_TYPE_CHAR | 256, @@ -577,6 +621,11 @@ static const struct iw_priv_args woal_private_args[] = { IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_INT | 4, "getdatarate"}, + { + WOAL_ESUPP_MODE, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_INT | 4, + "esuppmode"}, { WOAL_SET_GET_64_INT, IW_PRIV_TYPE_INT | 64, @@ -592,6 +641,11 @@ static const struct iw_priv_args woal_private_args[] = { IW_PRIV_TYPE_BYTE | 2047, IW_PRIV_TYPE_BYTE | 2047, "hostcmd"}, + { + WOAL_ARP_FILTER, + IW_PRIV_TYPE_BYTE | 2047, + IW_PRIV_TYPE_BYTE | 2047, + "arpfilter"}, { WOAL_SET_INTS_GET_CHARS, IW_PRIV_TYPE_INT | 16, diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_proc.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_proc.c old mode 100755 new mode 100644 index 901324da..dec0a2c8 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_proc.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_proc.c @@ -28,7 +28,7 @@ Change log: #ifdef UAP_SUPPORT #include "moal_uap.h" #endif -#include "moal_sdio.h" +#include "moal_sdio.h" /******************************************************** Local Variables @@ -76,7 +76,7 @@ woal_info_proc_read(struct seq_file *sfp, void *data) { struct net_device *netdev = (struct net_device *)sfp->private; char fmt[MLAN_MAX_VER_STR_LEN]; - moal_private *priv = (moal_private *) netdev_priv(netdev); + moal_private *priv = (moal_private *)netdev_priv(netdev); #ifdef STA_SUPPORT int i = 0; moal_handle *handle = NULL; @@ -169,7 +169,7 @@ woal_info_proc_read(struct seq_file *sfp, void *data) info.bssid[4], info.bssid[5]); seq_printf(sfp, "channel=\"%d\"\n", (int)info.bss_chan); seq_printf(sfp, "region_code = \"%02x\"\n", - (t_u8) info.region_code); + (t_u8)info.region_code); /* * Put out the multicast list @@ -298,14 +298,14 @@ parse_cmd52_string(const char *buffer, size_t len, int *func, int *reg, int ret = MLAN_STATUS_SUCCESS; char *string = NULL; char *pos = NULL; + gfp_t flag; ENTER(); - - string = (char *)kmalloc(CMD52_STR_LEN, GFP_KERNEL); + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + string = kzalloc(CMD52_STR_LEN, flag); if (string == NULL) return -ENOMEM; - memset(string, 0, CMD52_STR_LEN); memcpy(string, buffer + strlen("sdcmd52rw="), MIN((CMD52_STR_LEN - 1), (len - strlen("sdcmd52rw=")))); string = strstrip(string); @@ -351,7 +351,7 @@ woal_config_write(struct file *f, const char __user * buf, size_t count, char *line = NULL; t_u32 config_data = 0; struct seq_file *sfp = f->private_data; - moal_handle *handle = (moal_handle *) sfp->private; + moal_handle *handle = (moal_handle *)sfp->private; int func = 0, reg = 0, val = 0; int copy_len; @@ -378,7 +378,7 @@ woal_config_write(struct file *f, const char __user * buf, size_t count, line = databuf; if (!strncmp(databuf, "soft_reset", strlen("soft_reset"))) { line += strlen("soft_reset") + 1; - config_data = (t_u32) woal_string_to_number(line); + config_data = (t_u32)woal_string_to_number(line); PRINTM(MINFO, "soft_reset: %d\n", (int)config_data); if (woal_request_soft_reset(handle) == MLAN_STATUS_SUCCESS) handle->hardware_status = HardwareStatusReset; @@ -387,9 +387,9 @@ woal_config_write(struct file *f, const char __user * buf, size_t count, } if (!strncmp(databuf, "drv_mode", strlen("drv_mode"))) { line += strlen("drv_mode") + 1; - config_data = (t_u32) woal_string_to_number(line); + config_data = (t_u32)woal_string_to_number(line); PRINTM(MINFO, "drv_mode: %d\n", (int)config_data); - if (config_data != (t_u32) drv_mode) + if (config_data != (t_u32)drv_mode) if (woal_switch_drv_mode(handle, config_data) != MLAN_STATUS_SUCCESS) { PRINTM(MERROR, "Could not switch drv mode\n"); @@ -405,8 +405,11 @@ woal_config_write(struct file *f, const char __user * buf, size_t count, priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY); if (priv) { PRINTM(MERROR, "Recevie debug_dump command\n"); + drvdbg &= ~MFW_D; woal_mlan_debug_info(priv); woal_moal_debug_info(priv, NULL, MFALSE); + + woal_dump_firmware_info(handle); } } @@ -426,7 +429,7 @@ woal_config_write(struct file *f, const char __user * buf, size_t count, static int woal_config_read(struct seq_file *sfp, void *data) { - moal_handle *handle = (moal_handle *) sfp->private; + moal_handle *handle = (moal_handle *)sfp->private; ENTER(); @@ -514,7 +517,7 @@ woal_string_to_number(char *s) * @return N/A */ void -woal_proc_init(moal_handle * handle) +woal_proc_init(moal_handle *handle) { struct proc_dir_entry *r; #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) @@ -596,7 +599,7 @@ woal_proc_init(moal_handle * handle) * @return N/A */ void -woal_proc_exit(moal_handle * handle) +woal_proc_exit(moal_handle *handle) { ENTER(); @@ -640,7 +643,7 @@ woal_proc_exit(moal_handle * handle) * @return N/A */ void -woal_create_proc_entry(moal_private * priv) +woal_create_proc_entry(moal_private *priv) { struct proc_dir_entry *r; struct net_device *dev = priv->netdev; @@ -720,7 +723,7 @@ woal_create_proc_entry(moal_private * priv) * @return N/A */ void -woal_proc_remove(moal_private * priv) +woal_proc_remove(moal_private *priv) { ENTER(); if (priv->phandle->proc_mwlan && priv->proc_entry) { diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_sdio.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_sdio.h old mode 100755 new mode 100644 index 7f017ac7..6b9ca003 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_sdio.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_sdio.h @@ -52,8 +52,14 @@ Change log: #ifdef STA_SUPPORT /** Default firmware name */ -#define DEFAULT_FW_NAME "mrvl/sd8801_uapsta.bin" - +#define DEFAULT_FW_NAME_8777 "mrvl/sd8777_uapsta.bin" +#define DEFAULT_FW_NAME_8787 "mrvl/sd8787_uapsta.bin" +#define DEFAULT_FW_NAME_8887 "mrvl/sd8887_uapsta.bin" +#define DEFAULT_FW_NAME_8801 "mrvl/sd8801_uapsta.bin" +#define DEFAULT_FW_NAME_8897 "mrvl/sd8897_uapsta.bin" +#define DEFAULT_FW_NAME_8797 "mrvl/sd8797_uapsta.bin" +#define SD8887_A0_FW_NAME "mrvl/sd8887_uapsta.bin" +#define SD8887_A2_FW_NAME "mrvl/sd8887_uapsta_a2.bin" #ifndef DEFAULT_FW_NAME #define DEFAULT_FW_NAME "" #endif @@ -62,8 +68,12 @@ Change log: #ifdef UAP_SUPPORT /** Default firmware name */ -#define DEFAULT_AP_FW_NAME "mrvl/sd8801_uapsta.bin" - +#define DEFAULT_AP_FW_NAME_8777 "mrvl/sd8777_uapsta.bin" +#define DEFAULT_AP_FW_NAME_8787 "mrvl/sd8787_uapsta.bin" +#define DEFAULT_AP_FW_NAME_8887 "mrvl/sd8887_uapsta.bin" +#define DEFAULT_AP_FW_NAME_8801 "mrvl/sd8801_uapsta.bin" +#define DEFAULT_AP_FW_NAME_8897 "mrvl/sd8897_uapsta.bin" +#define DEFAULT_AP_FW_NAME_8797 "mrvl/sd8797_uapsta.bin" #ifndef DEFAULT_AP_FW_NAME #define DEFAULT_AP_FW_NAME "" #endif @@ -71,8 +81,12 @@ Change log: /** Default firmaware name */ -#define DEFAULT_AP_STA_FW_NAME "mrvl/sd8801_uapsta.bin" - +#define DEFAULT_AP_STA_FW_NAME_8777 "mrvl/sd8777_uapsta.bin" +#define DEFAULT_AP_STA_FW_NAME_8787 "mrvl/sd8787_uapsta.bin" +#define DEFAULT_AP_STA_FW_NAME_8887 "mrvl/sd8887_uapsta.bin" +#define DEFAULT_AP_STA_FW_NAME_8801 "mrvl/sd8801_uapsta.bin" +#define DEFAULT_AP_STA_FW_NAME_8897 "mrvl/sd8897_uapsta.bin" +#define DEFAULT_AP_STA_FW_NAME_8797 "mrvl/sd8797_uapsta.bin" #ifndef DEFAULT_AP_STA_FW_NAME #define DEFAULT_AP_STA_FW_NAME "" #endif @@ -80,16 +94,18 @@ Change log: /******************************************************** Global Functions ********************************************************/ +/** Function to update the SDIO card type */ +t_void woal_sdio_update_card_type(moal_handle *handle, t_void *card); /** Function to write register */ -mlan_status woal_write_reg(moal_handle * handle, t_u32 reg, t_u32 data); +mlan_status woal_write_reg(moal_handle *handle, t_u32 reg, t_u32 data); /** Function to read register */ -mlan_status woal_read_reg(moal_handle * handle, t_u32 reg, t_u32 * data); +mlan_status woal_read_reg(moal_handle *handle, t_u32 reg, t_u32 *data); /** Function to write data to IO memory */ -mlan_status woal_write_data_sync(moal_handle * handle, mlan_buffer * pmbuf, +mlan_status woal_write_data_sync(moal_handle *handle, mlan_buffer *pmbuf, t_u32 port, t_u32 timeout); /** Function to read data from IO memory */ -mlan_status woal_read_data_sync(moal_handle * handle, mlan_buffer * pmbuf, +mlan_status woal_read_data_sync(moal_handle *handle, mlan_buffer *pmbuf, t_u32 port, t_u32 timeout); /** Register to bus driver function */ @@ -98,16 +114,16 @@ mlan_status woal_bus_register(void); void woal_bus_unregister(void); /** Register device function */ -mlan_status woal_register_dev(moal_handle * handle); +mlan_status woal_register_dev(moal_handle *handle); /** Unregister device function */ -void woal_unregister_dev(moal_handle * handle); +void woal_unregister_dev(moal_handle *handle); -int woal_sdio_set_bus_clock(moal_handle * handle, t_u8 option); +int woal_sdio_set_bus_clock(moal_handle *handle, t_u8 option); #ifdef SDIO_SUSPEND_RESUME #ifdef MMC_PM_FUNC_SUSPENDED /** Notify SDIO bus driver that WLAN is suspended */ -void woal_wlan_is_suspended(moal_handle * handle); +void woal_wlan_is_suspended(moal_handle *handle); #endif /** SDIO Suspend */ int woal_sdio_suspend(struct device *dev); @@ -126,7 +142,6 @@ struct sdio_mmc_card { }; /** cmd52 read write */ -int woal_sdio_read_write_cmd52(moal_handle * handle, int func, int reg, - int val); +int woal_sdio_read_write_cmd52(moal_handle *handle, int func, int reg, int val); #endif /* _MOAL_SDIO_H */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_sdio_mmc.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_sdio_mmc.c old mode 100755 new mode 100644 index 38ac24db..9b3c0a6b --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_sdio_mmc.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_sdio_mmc.c @@ -46,12 +46,27 @@ extern int pm_keep_power; extern int shutdown_hs; #endif +/** Device ID for SD8777 */ +#define SD_DEVICE_ID_8777 (0x9131) +/** Device ID for SD8787 */ +#define SD_DEVICE_ID_8787 (0x9119) +/** Device ID for SD8887 */ +#define SD_DEVICE_ID_8887 (0x9135) /** Device ID for SD8801 FN1 */ #define SD_DEVICE_ID_8801 (0x9139) +/** Device ID for SD8897 */ +#define SD_DEVICE_ID_8897 (0x912d) +/** Device ID for SD8797 */ +#define SD_DEVICE_ID_8797 (0x9129) /** WLAN IDs */ static const struct sdio_device_id wlan_ids[] = { + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8777)}, + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8787)}, + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8887)}, {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8801)}, + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8897)}, + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8797)}, {}, }; @@ -110,12 +125,15 @@ static struct sdio_driver REFDATA wlan_sdio = { * @return N/A */ void -woal_dump_sdio_reg(moal_handle * handle) +woal_dump_sdio_reg(moal_handle *handle) { int ret = 0; t_u8 data, i; int fun0_reg[] = { 0x05, 0x04 }; - int fun1_reg[] = { 0x03, 0x04, 0x05, 0x60, 0x61 }; + t_u8 array_size = 0; + int fun1_reg_8897[] = { 0x03, 0x04, 0x05, 0x06, 0x07, 0xC0, 0xC1 }; + int fun1_reg_other[] = { 0x03, 0x04, 0x05, 0x60, 0x61 }; + int *fun1_reg = NULL; for (i = 0; i < ARRAY_SIZE(fun0_reg); i++) { data = sdio_f0_readb(((struct sdio_mmc_card *)handle->card)-> @@ -124,7 +142,14 @@ woal_dump_sdio_reg(moal_handle * handle) data, ret); } - for (i = 0; i < ARRAY_SIZE(fun1_reg); i++) { + if (handle->card_type == CARD_TYPE_SD8897) { + fun1_reg = fun1_reg_8897; + array_size = sizeof(fun1_reg_8897) / sizeof(int); + } else { + fun1_reg = fun1_reg_other; + array_size = sizeof(fun1_reg_other) / sizeof(int); + } + for (i = 0; i < array_size; i++) { data = sdio_readb(((struct sdio_mmc_card *)handle->card)->func, fun1_reg[i], &ret); PRINTM(MMSG, "fun1: reg 0x%02x=0x%02x ret=%d\n", fun1_reg[i], @@ -136,6 +161,32 @@ woal_dump_sdio_reg(moal_handle * handle) /******************************************************** Global Functions ********************************************************/ +/** @brief This function updates the SDIO card types + * + * @param handle A Pointer to the moal_handle structure + * @param card A Pointer to card + * + * @return N/A + */ +t_void +woal_sdio_update_card_type(moal_handle *handle, t_void *card) +{ + struct sdio_mmc_card *cardp = (struct sdio_mmc_card *)card; + + /* Update card type */ + if (cardp->func->device == SD_DEVICE_ID_8777) + handle->card_type = CARD_TYPE_SD8777; + else if (cardp->func->device == SD_DEVICE_ID_8787) + handle->card_type = CARD_TYPE_SD8787; + else if (cardp->func->device == SD_DEVICE_ID_8887) + handle->card_type = CARD_TYPE_SD8887; + else if (cardp->func->device == SD_DEVICE_ID_8801) + handle->card_type = CARD_TYPE_SD8801; + else if (cardp->func->device == SD_DEVICE_ID_8897) + handle->card_type = CARD_TYPE_SD8897; + else if (cardp->func->device == SD_DEVICE_ID_8797) + handle->card_type = CARD_TYPE_SD8797; +} /** * @brief This function handles the interrupt. @@ -263,7 +314,7 @@ woal_sdio_remove(struct sdio_func *func) * @return N/A */ void -woal_wlan_is_suspended(moal_handle * handle) +woal_wlan_is_suspended(moal_handle *handle) { ENTER(); if (handle->suspend_notify_req == MTRUE) { @@ -389,7 +440,11 @@ woal_sdio_suspend(struct device *dev) LEAVE(); return MLAN_STATUS_SUCCESS; } - + if (handle->fw_dump) { + PRINTM(MMSG, "suspend not allowed while FW dump!"); + ret = -EBUSY; + goto done; + } handle->suspend_fail = MFALSE; memset(&pm_info, 0, sizeof(pm_info)); if (MLAN_STATUS_SUCCESS == @@ -475,8 +530,12 @@ woal_sdio_resume(struct device *dev) LEAVE(); return MLAN_STATUS_SUCCESS; } - handle->is_suspended = MFALSE; + if (woal_check_driver_status(handle)) { + PRINTM(MERROR, "Resuem, device is in hang state\n"); + LEAVE(); + return MLAN_STATUS_SUCCESS; + } for (i = 0; i < handle->priv_num; i++) netif_device_attach(handle->priv[i]->netdev); @@ -499,13 +558,13 @@ woal_sdio_resume(struct device *dev) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -woal_write_reg(moal_handle * handle, t_u32 reg, t_u32 data) +woal_write_reg(moal_handle *handle, t_u32 reg, t_u32 data) { mlan_status ret = MLAN_STATUS_FAILURE; #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func); #endif - sdio_writeb(((struct sdio_mmc_card *)handle->card)->func, (t_u8) data, + sdio_writeb(((struct sdio_mmc_card *)handle->card)->func, (t_u8)data, reg, (int *)&ret); #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) sdio_release_host(((struct sdio_mmc_card *)handle->card)->func); @@ -523,7 +582,7 @@ woal_write_reg(moal_handle * handle, t_u32 reg, t_u32 data) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -woal_read_reg(moal_handle * handle, t_u32 reg, t_u32 * data) +woal_read_reg(moal_handle *handle, t_u32 reg, t_u32 *data) { mlan_status ret = MLAN_STATUS_FAILURE; t_u8 val; @@ -540,6 +599,85 @@ woal_read_reg(moal_handle * handle, t_u32 reg, t_u32 * data) return ret; } +/** + * @brief This function use SG mode to read/write data into card memory + * + * @param handle A Pointer to the moal_handle structure + * @param pmbuf Pointer to mlan_buffer structure + * @param port Port + * @param write write flag + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_sdio_rw_mb(moal_handle *handle, pmlan_buffer pmbuf_list, t_u32 port, + t_u8 write) +{ + struct scatterlist sg_list[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; + int num_sg = pmbuf_list->use_count; + int i = 0; + mlan_buffer *pmbuf = NULL; + struct mmc_request mmc_req; + struct mmc_command mmc_cmd; + struct mmc_data mmc_dat; + struct sdio_func *func = ((struct sdio_mmc_card *)handle->card)->func; + t_u32 ioport = (port & MLAN_SDIO_IO_PORT_MASK); + t_u32 blkcnt = pmbuf_list->data_len / MLAN_SDIO_BLOCK_SIZE; + + if (num_sg > SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX) { + PRINTM(MERROR, "ERROR: num_sg=%d", num_sg); + return MLAN_STATUS_FAILURE; + } + sg_init_table(sg_list, num_sg); + pmbuf = pmbuf_list->pnext; + for (i = 0; i < num_sg; i++) { + if (pmbuf == pmbuf_list) + break; + sg_set_buf(&sg_list[i], pmbuf->pbuf + pmbuf->data_offset, + pmbuf->data_len); + pmbuf = pmbuf->pnext; + } + memset(&mmc_req, 0, sizeof(struct mmc_request)); + memset(&mmc_cmd, 0, sizeof(struct mmc_command)); + memset(&mmc_dat, 0, sizeof(struct mmc_data)); + + mmc_dat.sg = sg_list; + mmc_dat.sg_len = num_sg; + mmc_dat.blksz = MLAN_SDIO_BLOCK_SIZE; + mmc_dat.blocks = blkcnt; + mmc_dat.flags = write ? MMC_DATA_WRITE : MMC_DATA_READ; + + mmc_cmd.opcode = SD_IO_RW_EXTENDED; + mmc_cmd.arg = write ? 1 << 31 : 0; + mmc_cmd.arg |= (func->num & 0x7) << 28; + mmc_cmd.arg |= 1 << 27; /* block basic */ + mmc_cmd.arg |= 0; /* fix address */ + mmc_cmd.arg |= (ioport & 0x1FFFF) << 9; + mmc_cmd.arg |= blkcnt & 0x1FF; + mmc_cmd.flags = MMC_RSP_SPI_R5 | MMC_RSP_R5 | MMC_CMD_ADTC; + + mmc_req.cmd = &mmc_cmd; + mmc_req.data = &mmc_dat; + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) + sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + mmc_set_data_timeout(&mmc_dat, + ((struct sdio_mmc_card *)handle->card)->func-> + card); + mmc_wait_for_req(((struct sdio_mmc_card *)handle->card)->func->card-> + host, &mmc_req); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) + sdio_release_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + if (mmc_cmd.error || mmc_dat.error) { + PRINTM(MERROR, "CMD53 %s cmd_error = %d data_error=%d\n", + write ? "write" : "read", mmc_cmd.error, mmc_dat.error); + return MLAN_STATUS_FAILURE; + } + return MLAN_STATUS_SUCCESS; +} + /** * @brief This function writes multiple bytes into card memory * @@ -551,11 +689,11 @@ woal_read_reg(moal_handle * handle, t_u32 reg, t_u32 * data) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -woal_write_data_sync(moal_handle * handle, mlan_buffer * pmbuf, t_u32 port, +woal_write_data_sync(moal_handle *handle, mlan_buffer *pmbuf, t_u32 port, t_u32 timeout) { mlan_status ret = MLAN_STATUS_FAILURE; - t_u8 *buffer = (t_u8 *) (pmbuf->pbuf + pmbuf->data_offset); + t_u8 *buffer = (t_u8 *)(pmbuf->pbuf + pmbuf->data_offset); t_u8 blkmode = (port & MLAN_SDIO_BYTE_MODE_MASK) ? BYTE_MODE : BLOCK_MODE; t_u32 blksz = (blkmode == BLOCK_MODE) ? MLAN_SDIO_BLOCK_SIZE : 1; @@ -564,16 +702,21 @@ woal_write_data_sync(moal_handle * handle, mlan_buffer * pmbuf, t_u32 port, BLOCK_MODE) ? (pmbuf->data_len / MLAN_SDIO_BLOCK_SIZE) : pmbuf->data_len; t_u32 ioport = (port & MLAN_SDIO_IO_PORT_MASK); + int status = 0; + if (pmbuf->use_count > 1) + return woal_sdio_rw_mb(handle, pmbuf, port, MTRUE); #ifdef SDIO_MMC_DEBUG handle->cmd53w = 1; #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func); #endif - if (!sdio_writesb - (((struct sdio_mmc_card *)handle->card)->func, ioport, buffer, - blkcnt * blksz)) + status = sdio_writesb(((struct sdio_mmc_card *)handle->card)->func, + ioport, buffer, blkcnt * blksz); + if (!status) ret = MLAN_STATUS_SUCCESS; + else + PRINTM(MERROR, "cmd53 write error=%d\n", status); #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) sdio_release_host(((struct sdio_mmc_card *)handle->card)->func); #endif @@ -594,11 +737,11 @@ woal_write_data_sync(moal_handle * handle, mlan_buffer * pmbuf, t_u32 port, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -woal_read_data_sync(moal_handle * handle, mlan_buffer * pmbuf, t_u32 port, +woal_read_data_sync(moal_handle *handle, mlan_buffer *pmbuf, t_u32 port, t_u32 timeout) { mlan_status ret = MLAN_STATUS_FAILURE; - t_u8 *buffer = (t_u8 *) (pmbuf->pbuf + pmbuf->data_offset); + t_u8 *buffer = (t_u8 *)(pmbuf->pbuf + pmbuf->data_offset); t_u8 blkmode = (port & MLAN_SDIO_BYTE_MODE_MASK) ? BYTE_MODE : BLOCK_MODE; t_u32 blksz = (blkmode == BLOCK_MODE) ? MLAN_SDIO_BLOCK_SIZE : 1; @@ -607,18 +750,23 @@ woal_read_data_sync(moal_handle * handle, mlan_buffer * pmbuf, t_u32 port, BLOCK_MODE) ? (pmbuf->data_len / MLAN_SDIO_BLOCK_SIZE) : pmbuf->data_len; t_u32 ioport = (port & MLAN_SDIO_IO_PORT_MASK); + int status = 0; + if (pmbuf->use_count > 1) + return woal_sdio_rw_mb(handle, pmbuf, port, MFALSE); #ifdef SDIO_MMC_DEBUG handle->cmd53r = 1; #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func); #endif - if (!sdio_readsb - (((struct sdio_mmc_card *)handle->card)->func, buffer, ioport, - blkcnt * blksz)) + status = sdio_readsb(((struct sdio_mmc_card *)handle->card)->func, + buffer, ioport, blkcnt * blksz); + if (!status) { ret = MLAN_STATUS_SUCCESS; - else + } else { + PRINTM(MERROR, "cmd53 read error=%d\n", status); woal_dump_sdio_reg(handle); + } #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) sdio_release_host(((struct sdio_mmc_card *)handle->card)->func); #endif @@ -631,7 +779,7 @@ woal_read_data_sync(moal_handle * handle, mlan_buffer * pmbuf, t_u32 port, /** * @brief This function registers the IF module in bus driver * - * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status woal_bus_register(void) @@ -674,7 +822,7 @@ woal_bus_unregister(void) * @return N/A */ void -woal_unregister_dev(moal_handle * handle) +woal_unregister_dev(moal_handle *handle) { ENTER(); if (handle->card) { @@ -700,7 +848,7 @@ woal_unregister_dev(moal_handle * handle) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -woal_register_dev(moal_handle * handle) +woal_register_dev(moal_handle *handle) { int ret = MLAN_STATUS_SUCCESS; struct sdio_mmc_card *card = handle->card; @@ -752,7 +900,7 @@ woal_register_dev(moal_handle * handle) * @return MLAN_STATUS_SUCCESS */ int -woal_sdio_set_bus_clock(moal_handle * handle, t_u8 option) +woal_sdio_set_bus_clock(moal_handle *handle, t_u8 option) { struct sdio_mmc_card *cardp = (struct sdio_mmc_card *)handle->card; struct mmc_host *host = cardp->func->card->host; @@ -784,7 +932,7 @@ woal_sdio_set_bus_clock(moal_handle * handle, t_u8 option) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ int -woal_sdio_read_write_cmd52(moal_handle * handle, int func, int reg, int val) +woal_sdio_read_write_cmd52(moal_handle *handle, int func, int reg, int val) { int ret = MLAN_STATUS_SUCCESS; struct sdio_mmc_card *card = (struct sdio_mmc_card *)handle->card; @@ -806,7 +954,7 @@ woal_sdio_read_write_cmd52(moal_handle * handle, int func, int reg, int val) val, func, reg); } else { PRINTM(MMSG, "write value (0x%x) to func %d reg 0x%x\n", - (u8) val, func, reg); + (u8)val, func, reg); handle->cmd52_val = val; } } else { @@ -821,7 +969,7 @@ woal_sdio_read_write_cmd52(moal_handle * handle, int func, int reg, int val) } else { PRINTM(MMSG, "read value (0x%x) from func %d reg 0x%x\n", - (u8) val, func, reg); + (u8)val, func, reg); handle->cmd52_val = val; } } diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_shim.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_shim.c old mode 100755 new mode 100644 index fa867932..2e326409 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_shim.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_shim.c @@ -65,13 +65,13 @@ extern int hw_test; * @param flag The type of the buffer to be allocated * @param ppbuf Pointer to a buffer location to store buffer pointer allocated * - * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -moal_malloc(IN t_void * pmoal_handle, - IN t_u32 size, IN t_u32 flag, OUT t_u8 ** ppbuf) +moal_malloc(IN t_void *pmoal_handle, + IN t_u32 size, IN t_u32 flag, OUT t_u8 **ppbuf) { - moal_handle *handle = (moal_handle *) pmoal_handle; + moal_handle *handle = (moal_handle *)pmoal_handle; t_u32 mem_flag = (in_interrupt() || irqs_disabled() || !write_can_lock(&dev_base_lock)) ? GFP_ATOMIC : GFP_KERNEL; @@ -99,9 +99,9 @@ moal_malloc(IN t_void * pmoal_handle, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -moal_mfree(IN t_void * pmoal_handle, IN t_u8 * pbuf) +moal_mfree(IN t_void *pmoal_handle, IN t_u8 *pbuf) { - moal_handle *handle = (moal_handle *) pmoal_handle; + moal_handle *handle = (moal_handle *)pmoal_handle; if (!pbuf) return MLAN_STATUS_FAILURE; @@ -117,12 +117,12 @@ moal_mfree(IN t_void * pmoal_handle, IN t_u8 * pbuf) * @param size The size of the buffer to be allocated * @param ppbuf Pointer to a buffer location to store buffer pointer allocated * - * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -moal_vmalloc(IN t_void * pmoal_handle, IN t_u32 size, OUT t_u8 ** ppbuf) +moal_vmalloc(IN t_void *pmoal_handle, IN t_u32 size, OUT t_u8 **ppbuf) { - moal_handle *handle = (moal_handle *) pmoal_handle; + moal_handle *handle = (moal_handle *)pmoal_handle; *ppbuf = vmalloc(size); if (*ppbuf == NULL) { @@ -141,12 +141,12 @@ moal_vmalloc(IN t_void * pmoal_handle, IN t_u32 size, OUT t_u8 ** ppbuf) * @param pmoal_handle Pointer to the MOAL context * @param pbuf Pointer to the buffer to be freed * - * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -moal_vfree(IN t_void * pmoal_handle, IN t_u8 * pbuf) +moal_vfree(IN t_void *pmoal_handle, IN t_u8 *pbuf) { - moal_handle *handle = (moal_handle *) pmoal_handle; + moal_handle *handle = (moal_handle *)pmoal_handle; if (!pbuf) return MLAN_STATUS_FAILURE; @@ -163,11 +163,11 @@ moal_vfree(IN t_void * pmoal_handle, IN t_u8 * pbuf) * @param byte A constant byte * @param num Number of bytes to fill * - * @return Pointer to the memory area + * @return Pointer to the memory area */ t_void * -moal_memset(IN t_void * pmoal_handle, - IN t_void * pmem, IN t_u8 byte, IN t_u32 num) +moal_memset(IN t_void *pmoal_handle, + IN t_void *pmem, IN t_u8 byte, IN t_u32 num) { t_void *p = pmem; @@ -188,8 +188,8 @@ moal_memset(IN t_void * pmoal_handle, * @return Pointer to the dest memory */ t_void * -moal_memcpy(IN t_void * pmoal_handle, - IN t_void * pdest, IN const t_void * psrc, IN t_u32 num) +moal_memcpy(IN t_void *pmoal_handle, + IN t_void *pdest, IN const t_void *psrc, IN t_u32 num) { t_void *p = pdest; @@ -207,11 +207,11 @@ moal_memcpy(IN t_void * pmoal_handle, * @param psrc Pointer to the src memory * @param num Number of bytes to move * - * @return Pointer to the dest memory + * @return Pointer to the dest memory */ t_void * -moal_memmove(IN t_void * pmoal_handle, - IN t_void * pdest, IN const t_void * psrc, IN t_u32 num) +moal_memmove(IN t_void *pmoal_handle, + IN t_void *pdest, IN const t_void *psrc, IN t_u32 num) { t_void *p = pdest; @@ -232,8 +232,8 @@ moal_memmove(IN t_void * pmoal_handle, * @return Compare result returns by memcmp */ t_s32 -moal_memcmp(IN t_void * pmoal_handle, - IN const t_void * pmem1, IN const t_void * pmem2, IN t_u32 num) +moal_memcmp(IN t_void *pmoal_handle, + IN const t_void *pmem1, IN const t_void *pmem2, IN t_u32 num) { t_s32 result; @@ -248,10 +248,10 @@ moal_memcmp(IN t_void * pmoal_handle, * @param pmoal_handle Pointer to the MOAL context * @param delay delay in micro-second * - * @return N/A + * @return N/A */ t_void -moal_udelay(IN t_void * pmoal_handle, IN t_u32 delay) +moal_udelay(IN t_void *pmoal_handle, IN t_u32 delay) { if (delay >= 1000) mdelay(delay / 1000); @@ -269,14 +269,13 @@ moal_udelay(IN t_void * pmoal_handle, IN t_u32 delay) * @return MLAN_STATUS_SUCCESS */ mlan_status -moal_get_system_time(IN t_void * pmoal_handle, - OUT t_u32 * psec, OUT t_u32 * pusec) +moal_get_system_time(IN t_void *pmoal_handle, OUT t_u32 *psec, OUT t_u32 *pusec) { struct timeval t; do_gettimeofday(&t); - *psec = (t_u32) t.tv_sec; - *pusec = (t_u32) t.tv_usec; + *psec = (t_u32)t.tv_sec; + *pusec = (t_u32)t.tv_usec; return MLAN_STATUS_SUCCESS; } @@ -292,17 +291,20 @@ moal_get_system_time(IN t_void * pmoal_handle, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -moal_init_timer(IN t_void * pmoal_handle, - OUT t_void ** pptimer, - IN t_void(*callback) (t_void * pcontext), IN t_void * pcontext) +moal_init_timer(IN t_void *pmoal_handle, + OUT t_void **pptimer, + IN t_void (*callback) (t_void *pcontext), IN t_void *pcontext) { moal_drv_timer *timer = NULL; + t_u32 mem_flag = (in_interrupt() || irqs_disabled() || + !write_can_lock(&dev_base_lock)) ? GFP_ATOMIC : + GFP_KERNEL; - timer = (moal_drv_timer *) kmalloc(sizeof(moal_drv_timer), GFP_KERNEL); + timer = kmalloc(sizeof(moal_drv_timer), mem_flag); if (timer == NULL) return MLAN_STATUS_FAILURE; woal_initialize_timer(timer, callback, pcontext); - *pptimer = (t_void *) timer; + *pptimer = (t_void *)timer; return MLAN_STATUS_SUCCESS; } @@ -316,9 +318,9 @@ moal_init_timer(IN t_void * pmoal_handle, * @return MLAN_STATUS_SUCCESS */ mlan_status -moal_free_timer(IN t_void * pmoal_handle, IN t_void * ptimer) +moal_free_timer(IN t_void *pmoal_handle, IN t_void *ptimer) { - moal_drv_timer *timer = (moal_drv_timer *) ptimer; + moal_drv_timer *timer = (moal_drv_timer *)ptimer; if (timer) { if ((timer->timer_is_canceled == MFALSE) && timer->time_period) { @@ -343,14 +345,14 @@ moal_free_timer(IN t_void * pmoal_handle, IN t_void * ptimer) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -moal_start_timer(IN t_void * pmoal_handle, - IN t_void * ptimer, IN t_u8 periodic, IN t_u32 msec) +moal_start_timer(IN t_void *pmoal_handle, + IN t_void *ptimer, IN t_u8 periodic, IN t_u32 msec) { if (!ptimer) return MLAN_STATUS_FAILURE; - ((moal_drv_timer *) ptimer)->timer_is_periodic = periodic; - woal_mod_timer((moal_drv_timer *) ptimer, msec); + ((moal_drv_timer *)ptimer)->timer_is_periodic = periodic; + woal_mod_timer((moal_drv_timer *)ptimer, msec); return MLAN_STATUS_SUCCESS; } @@ -364,11 +366,11 @@ moal_start_timer(IN t_void * pmoal_handle, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -moal_stop_timer(IN t_void * pmoal_handle, IN t_void * ptimer) +moal_stop_timer(IN t_void *pmoal_handle, IN t_void *ptimer) { if (!ptimer) return MLAN_STATUS_FAILURE; - woal_cancel_timer((moal_drv_timer *) ptimer); + woal_cancel_timer((moal_drv_timer *)ptimer); return MLAN_STATUS_SUCCESS; } @@ -382,16 +384,16 @@ moal_stop_timer(IN t_void * pmoal_handle, IN t_void * ptimer) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -moal_init_lock(IN t_void * pmoal_handle, OUT t_void ** pplock) +moal_init_lock(IN t_void *pmoal_handle, OUT t_void **pplock) { - moal_handle *handle = (moal_handle *) pmoal_handle; + moal_handle *handle = (moal_handle *)pmoal_handle; moal_lock *mlock = NULL; - mlock = (moal_lock *) kmalloc(sizeof(moal_lock), GFP_ATOMIC); + mlock = kmalloc(sizeof(moal_lock), GFP_ATOMIC); if (!mlock) return MLAN_STATUS_FAILURE; spin_lock_init(&mlock->lock); - *pplock = (t_void *) mlock; + *pplock = (t_void *)mlock; atomic_inc(&handle->lock_count); @@ -407,9 +409,9 @@ moal_init_lock(IN t_void * pmoal_handle, OUT t_void ** pplock) * @return MLAN_STATUS_SUCCESS */ mlan_status -moal_free_lock(IN t_void * pmoal_handle, IN t_void * plock) +moal_free_lock(IN t_void *pmoal_handle, IN t_void *plock) { - moal_handle *handle = (moal_handle *) pmoal_handle; + moal_handle *handle = (moal_handle *)pmoal_handle; moal_lock *mlock = plock; kfree(mlock); @@ -428,7 +430,7 @@ moal_free_lock(IN t_void * pmoal_handle, IN t_void * plock) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -moal_spin_lock(IN t_void * pmoal_handle, IN t_void * plock) +moal_spin_lock(IN t_void *pmoal_handle, IN t_void *plock) { moal_lock *mlock = plock; unsigned long flags = 0; @@ -451,9 +453,9 @@ moal_spin_lock(IN t_void * pmoal_handle, IN t_void * plock) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -moal_spin_unlock(IN t_void * pmoal_handle, IN t_void * plock) +moal_spin_unlock(IN t_void *pmoal_handle, IN t_void *plock) { - moal_lock *mlock = (moal_lock *) plock; + moal_lock *mlock = (moal_lock *)plock; if (mlock) { spin_unlock_irqrestore(&mlock->lock, mlock->flags); @@ -475,10 +477,10 @@ moal_spin_unlock(IN t_void * pmoal_handle, IN t_void * plock) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -moal_get_fw_data(IN t_void * pmoal_handle, - IN t_u32 offset, IN t_u32 len, OUT t_u8 * pbuf) +moal_get_fw_data(IN t_void *pmoal_handle, + IN t_u32 offset, IN t_u32 len, OUT t_u8 *pbuf) { - moal_handle *handle = (moal_handle *) pmoal_handle; + moal_handle *handle = (moal_handle *)pmoal_handle; if (!pbuf || !len) return MLAN_STATUS_FAILURE; @@ -500,9 +502,9 @@ moal_get_fw_data(IN t_void * pmoal_handle, * @return MLAN_STATUS_SUCCESS */ mlan_status -moal_init_fw_complete(IN t_void * pmoal_handle, IN mlan_status status) +moal_init_fw_complete(IN t_void *pmoal_handle, IN mlan_status status) { - moal_handle *handle = (moal_handle *) pmoal_handle; + moal_handle *handle = (moal_handle *)pmoal_handle; ENTER(); if (status == MLAN_STATUS_SUCCESS) handle->hardware_status = HardwareStatusReady; @@ -521,9 +523,9 @@ moal_init_fw_complete(IN t_void * pmoal_handle, IN mlan_status status) * @return MLAN_STATUS_SUCCESS */ mlan_status -moal_shutdown_fw_complete(IN t_void * pmoal_handle, IN mlan_status status) +moal_shutdown_fw_complete(IN t_void *pmoal_handle, IN mlan_status status) { - moal_handle *handle = (moal_handle *) pmoal_handle; + moal_handle *handle = (moal_handle *)pmoal_handle; ENTER(); handle->hardware_status = HardwareStatusNotReady; handle->init_wait_q_woken = MTRUE; @@ -542,13 +544,13 @@ moal_shutdown_fw_complete(IN t_void * pmoal_handle, IN mlan_status status) * @return MLAN_STATUS_SUCCESS */ mlan_status -moal_ioctl_complete(IN t_void * pmoal_handle, +moal_ioctl_complete(IN t_void *pmoal_handle, IN pmlan_ioctl_req pioctl_req, IN mlan_status status) { - moal_handle *handle = (moal_handle *) pmoal_handle; + moal_handle *handle = (moal_handle *)pmoal_handle; moal_private *priv = NULL; wait_queue *wait; - unsigned long flags; + unsigned long flags = 0; ENTER(); if (!atomic_read(&handle->ioctl_pending)) @@ -557,21 +559,29 @@ moal_ioctl_complete(IN t_void * pmoal_handle, else atomic_dec(&handle->ioctl_pending); priv = woal_bss_index_to_priv(handle, pioctl_req->bss_index); - if (status != MLAN_STATUS_SUCCESS) + if (!priv) { + PRINTM(MERROR, + "IOCTL %p complete with NULL priv, bss_index=%d\n", + pioctl_req, pioctl_req->bss_index); + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + + if (status != MLAN_STATUS_SUCCESS && status != MLAN_STATUS_COMPLETE) PRINTM(MERROR, "IOCTL failed: %p id=0x%x, sub_id=0x%x action=%d, status_code=0x%x\n", pioctl_req, pioctl_req->req_id, - (*(t_u32 *) pioctl_req->pbuf), (int)pioctl_req->action, + (*(t_u32 *)pioctl_req->pbuf), (int)pioctl_req->action, pioctl_req->status_code); else PRINTM(MIOCTL, "IOCTL completed: %p id=0x%x sub_id=0x%x, action=%d, status=%d, status_code=0x%x\n", pioctl_req, pioctl_req->req_id, - (*(t_u32 *) pioctl_req->pbuf), (int)pioctl_req->action, + (*(t_u32 *)pioctl_req->pbuf), (int)pioctl_req->action, status, pioctl_req->status_code); - spin_lock_irqsave(&priv->phandle->driver_lock, flags); - wait = (wait_queue *) pioctl_req->reserved_1; + spin_lock_irqsave(&handle->driver_lock, flags); + wait = (wait_queue *)pioctl_req->reserved_1; if (wait) { wait->condition = MTRUE; wait->status = status; @@ -586,10 +596,10 @@ moal_ioctl_complete(IN t_void * pmoal_handle, wake_up_interruptible(wait->wait); } } - spin_unlock_irqrestore(&priv->phandle->driver_lock, flags); + spin_unlock_irqrestore(&handle->driver_lock, flags); } else { - spin_unlock_irqrestore(&priv->phandle->driver_lock, flags); - if (priv && (status == MLAN_STATUS_SUCCESS) && + spin_unlock_irqrestore(&handle->driver_lock, flags); + if ((status == MLAN_STATUS_SUCCESS) && (pioctl_req->action == MLAN_ACT_GET)) woal_process_ioctl_resp(priv, pioctl_req); kfree(pioctl_req); @@ -608,10 +618,10 @@ moal_ioctl_complete(IN t_void * pmoal_handle, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -moal_alloc_mlan_buffer(IN t_void * pmoal_handle, - IN t_u32 size, OUT pmlan_buffer * pmbuf) +moal_alloc_mlan_buffer(IN t_void *pmoal_handle, + IN t_u32 size, OUT pmlan_buffer *pmbuf) { - *pmbuf = woal_alloc_mlan_buffer((moal_handle *) pmoal_handle, size); + *pmbuf = woal_alloc_mlan_buffer((moal_handle *)pmoal_handle, size); if (NULL == *pmbuf) return MLAN_STATUS_FAILURE; return MLAN_STATUS_SUCCESS; @@ -626,11 +636,11 @@ moal_alloc_mlan_buffer(IN t_void * pmoal_handle, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -moal_free_mlan_buffer(IN t_void * pmoal_handle, IN pmlan_buffer pmbuf) +moal_free_mlan_buffer(IN t_void *pmoal_handle, IN pmlan_buffer pmbuf) { if (!pmbuf) return MLAN_STATUS_FAILURE; - woal_free_mlan_buffer((moal_handle *) pmoal_handle, pmbuf); + woal_free_mlan_buffer((moal_handle *)pmoal_handle, pmbuf); return MLAN_STATUS_SUCCESS; } @@ -644,11 +654,11 @@ moal_free_mlan_buffer(IN t_void * pmoal_handle, IN pmlan_buffer pmbuf) * @return MLAN_STATUS_SUCCESS */ mlan_status -moal_send_packet_complete(IN t_void * pmoal_handle, +moal_send_packet_complete(IN t_void *pmoal_handle, IN pmlan_buffer pmbuf, IN mlan_status status) { moal_private *priv = NULL; - moal_handle *handle = (moal_handle *) pmoal_handle; + moal_handle *handle = (moal_handle *)pmoal_handle; struct sk_buff *skb = NULL; #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) t_u32 index = 0; @@ -745,10 +755,10 @@ moal_send_packet_complete(IN t_void * pmoal_handle, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -moal_write_data_sync(IN t_void * pmoal_handle, +moal_write_data_sync(IN t_void *pmoal_handle, IN pmlan_buffer pmbuf, IN t_u32 port, IN t_u32 timeout) { - return woal_write_data_sync((moal_handle *) pmoal_handle, pmbuf, port, + return woal_write_data_sync((moal_handle *)pmoal_handle, pmbuf, port, timeout); } @@ -764,10 +774,10 @@ moal_write_data_sync(IN t_void * pmoal_handle, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -moal_read_data_sync(IN t_void * pmoal_handle, +moal_read_data_sync(IN t_void *pmoal_handle, IN OUT pmlan_buffer pmbuf, IN t_u32 port, IN t_u32 timeout) { - return woal_read_data_sync((moal_handle *) pmoal_handle, pmbuf, port, + return woal_read_data_sync((moal_handle *)pmoal_handle, pmbuf, port, timeout); } @@ -781,9 +791,9 @@ moal_read_data_sync(IN t_void * pmoal_handle, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -moal_write_reg(IN t_void * pmoal_handle, IN t_u32 reg, IN t_u32 data) +moal_write_reg(IN t_void *pmoal_handle, IN t_u32 reg, IN t_u32 data) { - return woal_write_reg((moal_handle *) pmoal_handle, reg, data); + return woal_write_reg((moal_handle *)pmoal_handle, reg, data); } /** @@ -796,9 +806,9 @@ moal_write_reg(IN t_void * pmoal_handle, IN t_u32 reg, IN t_u32 data) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -moal_read_reg(IN t_void * pmoal_handle, IN t_u32 reg, OUT t_u32 * data) +moal_read_reg(IN t_void *pmoal_handle, IN t_u32 reg, OUT t_u32 *data) { - return woal_read_reg((moal_handle *) pmoal_handle, reg, data); + return woal_read_reg((moal_handle *)pmoal_handle, reg, data); } /** @@ -810,11 +820,12 @@ moal_read_reg(IN t_void * pmoal_handle, IN t_u32 reg, OUT t_u32 * data) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -moal_recv_packet(IN t_void * pmoal_handle, IN pmlan_buffer pmbuf) +moal_recv_packet(IN t_void *pmoal_handle, IN pmlan_buffer pmbuf) { mlan_status status = MLAN_STATUS_SUCCESS; moal_private *priv = NULL; struct sk_buff *skb = NULL; + moal_handle *handle = (moal_handle *)pmoal_handle; ENTER(); if (pmbuf) { priv = woal_bss_index_to_priv(pmoal_handle, pmbuf->bss_index); @@ -840,8 +851,8 @@ moal_recv_packet(IN t_void * pmoal_handle, IN pmlan_buffer pmbuf) } skb_reserve(skb, MLAN_NET_IP_ALIGN); memcpy(skb->data, - (t_u8 *) (pmbuf->pbuf + - pmbuf->data_offset), + (t_u8 *)(pmbuf->pbuf + + pmbuf->data_offset), pmbuf->data_len); skb_put(skb, pmbuf->data_len); } @@ -853,8 +864,13 @@ moal_recv_packet(IN t_void * pmoal_handle, IN pmlan_buffer pmbuf) priv->stats.rx_packets++; if (in_interrupt()) netif_rx(skb); - else - netif_rx_ni(skb); + else { + if (atomic_read(&handle->rx_pending) > + MAX_RX_PENDING_THRHLD) + netif_rx(skb); + else + netif_rx_ni(skb); + } } } done: @@ -871,7 +887,7 @@ moal_recv_packet(IN t_void * pmoal_handle, IN pmlan_buffer pmbuf) * @return MLAN_STATUS_SUCCESS */ mlan_status -moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) +moal_recv_event(IN t_void *pmoal_handle, IN pmlan_event pmevent) { #ifdef STA_SUPPORT int custom_len = 0; @@ -974,20 +990,8 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) case MLAN_EVENT_ID_DRV_SCAN_REPORT: PRINTM(MINFO, "Scan report\n"); - if (priv->phandle->scan_pending_on_block == MTRUE) { - priv->phandle->scan_pending_on_block = MFALSE; - MOAL_REL_SEMAPHORE(&priv->phandle->async_sem); - } - if (priv->report_scan_result) { priv->report_scan_result = MFALSE; -#ifdef STA_WEXT - if (IS_STA_WEXT(cfg80211_wext)) { - memset(&wrqu, 0, sizeof(union iwreq_data)); - wireless_send_event(priv->netdev, SIOCGIWSCAN, - &wrqu, NULL); - } -#endif #ifdef STA_CFG80211 if (IS_STA_CFG80211(cfg80211_wext)) { if (priv->scan_request) { @@ -996,6 +1000,14 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) woal_inform_bss_from_scan_result(priv, NULL, MOAL_NO_WAIT); + if (!priv->phandle->first_scan_done) { + priv->phandle->first_scan_done = + MTRUE; + woal_set_scan_time(priv, + ACTIVE_SCAN_CHAN_TIME, + PASSIVE_SCAN_CHAN_TIME, + SPECIFIC_SCAN_CHAN_TIME); + } } spin_lock_irqsave(&priv->scan_req_lock, flags); if (priv->scan_request) { @@ -1005,26 +1017,31 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) } spin_unlock_irqrestore(&priv->scan_req_lock, flags); - if (!priv->phandle->first_scan_done) { - priv->phandle->first_scan_done = MTRUE; - woal_set_scan_time(priv, - ACTIVE_SCAN_CHAN_TIME, - PASSIVE_SCAN_CHAN_TIME, - SPECIFIC_SCAN_CHAN_TIME); - } + } #endif /* STA_CFG80211 */ - woal_broadcast_event(priv, (t_u8 *) & pmevent->event_id, +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) { + memset(&wrqu, 0, sizeof(union iwreq_data)); + wireless_send_event(priv->netdev, SIOCGIWSCAN, + &wrqu, NULL); + } +#endif + woal_broadcast_event(priv, (t_u8 *)&pmevent->event_id, sizeof(mlan_event_id)); } + if (priv->phandle->scan_pending_on_block == MTRUE) { + priv->phandle->scan_pending_on_block = MFALSE; + MOAL_REL_SEMAPHORE(&priv->phandle->async_sem); + } break; case MLAN_EVENT_ID_DRV_OBSS_SCAN_PARAM: memmove((pmevent->event_buf + strlen(CUS_EVT_OBSS_SCAN_PARAM) + 1), pmevent->event_buf, pmevent->event_len); - memcpy(pmevent->event_buf, (t_u8 *) CUS_EVT_OBSS_SCAN_PARAM, + memcpy(pmevent->event_buf, (t_u8 *)CUS_EVT_OBSS_SCAN_PARAM, strlen(CUS_EVT_OBSS_SCAN_PARAM)); pmevent->event_buf[strlen(CUS_EVT_OBSS_SCAN_PARAM)] = 0; woal_broadcast_event(priv, pmevent->event_buf, @@ -1046,7 +1063,7 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) case MLAN_EVENT_ID_FW_BW_CHANGED: memmove((pmevent->event_buf + strlen(CUS_EVT_BW_CHANGED) + 1), pmevent->event_buf, pmevent->event_len); - memcpy(pmevent->event_buf, (t_u8 *) CUS_EVT_BW_CHANGED, + memcpy(pmevent->event_buf, (t_u8 *)CUS_EVT_BW_CHANGED, strlen(CUS_EVT_BW_CHANGED)); pmevent->event_buf[strlen(CUS_EVT_BW_CHANGED)] = 0; woal_broadcast_event(priv, pmevent->event_buf, @@ -1148,9 +1165,8 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) GFP_KERNEL); priv->last_event |= EVENT_BCN_RSSI_LOW; #endif - woal_set_rssi_threshold(priv, - MLAN_EVENT_ID_FW_BCN_RSSI_LOW, - MOAL_NO_WAIT); + if (!hw_test && priv->roaming_enabled) + woal_config_bgscan_and_rssi(priv, MTRUE); } #endif woal_broadcast_event(priv, CUS_EVT_BEACON_RSSI_LOW, @@ -1270,9 +1286,8 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) WLAN_CAPABILITY_ESS); if (bss) cfg80211_unlink_bss(priv->wdev->wiphy, bss); - cfg80211_cqm_rssi_notify(priv->netdev, - NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW, - GFP_KERNEL); + if (!hw_test && priv->roaming_enabled) + woal_config_bgscan_and_rssi(priv, MFALSE); priv->last_event |= EVENT_PRE_BCN_LOST; } #endif @@ -1331,6 +1346,14 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) case MLAN_EVENT_ID_DRV_DBG_DUMP: priv->phandle->driver_state = MTRUE; woal_moal_debug_info(priv, NULL, MFALSE); + woal_broadcast_event(priv, CUS_EVT_DRIVER_HANG, + strlen(CUS_EVT_DRIVER_HANG)); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) + woal_cfg80211_vendor_event(priv, event_hang, + CUS_EVT_DRIVER_HANG, + strlen(CUS_EVT_DRIVER_HANG)); +#endif + woal_process_hang(priv->phandle); break; case MLAN_EVENT_ID_FW_BG_SCAN: if (priv->media_connected == MTRUE) @@ -1356,13 +1379,11 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) "Trigger mlan get bgscan result\n"); } #endif -#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35) || defined(COMPAT_WIRELESS) - if (priv->mrvl_rssi_low) { - cfg80211_cqm_rssi_notify(priv->netdev, - NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW, - GFP_KERNEL); + if (!hw_test && priv->roaming_enabled) { + priv->roaming_required = MTRUE; + wake_up_interruptible(&priv->phandle-> + reassoc_thread.wait_q); } -#endif } #endif break; @@ -1396,12 +1417,31 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) #endif #endif break; + case MLAN_EVENT_ID_FW_CHANNEL_SWITCH_ANN: +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, + CUS_EVT_CHANNEL_SWITCH_ANN); +#endif + woal_broadcast_event(priv, CUS_EVT_CHANNEL_SWITCH_ANN, + strlen(CUS_EVT_CHANNEL_SWITCH_ANN)); + break; #endif /* STA_SUPPORT */ + case MLAN_EVENT_ID_FW_STOP_TX: + woal_stop_queue(priv->netdev); + if (netif_carrier_ok(priv->netdev)) + netif_carrier_off(priv->netdev); + break; + case MLAN_EVENT_ID_FW_START_TX: + if (!netif_carrier_ok(priv->netdev)) + netif_carrier_on(priv->netdev); + woal_wake_queue(priv->netdev); + break; case MLAN_EVENT_ID_FW_HS_WAKEUP: /* simulate HSCFG_CANCEL command */ woal_cancel_hs(priv, MOAL_NO_WAIT); #ifdef STA_SUPPORT - pmpriv = woal_get_priv((moal_handle *) pmoal_handle, + pmpriv = woal_get_priv((moal_handle *)pmoal_handle, MLAN_BSS_ROLE_STA); #ifdef STA_WEXT if (IS_STA_WEXT(cfg80211_wext) && pmpriv) @@ -1412,19 +1452,18 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) strlen(CUS_EVT_HS_WAKEUP)); #endif /* STA_SUPPORT */ #ifdef UAP_SUPPORT - pmpriv = woal_get_priv((moal_handle *) pmoal_handle, + pmpriv = woal_get_priv((moal_handle *)pmoal_handle, MLAN_BSS_ROLE_UAP); if (pmpriv) { pmevent->event_id = UAP_EVENT_ID_HS_WAKEUP; - woal_broadcast_event(pmpriv, - (t_u8 *) & pmevent->event_id, + woal_broadcast_event(pmpriv, (t_u8 *)&pmevent->event_id, sizeof(t_u32)); } #endif /* UAP_SUPPORT */ break; case MLAN_EVENT_ID_DRV_HS_ACTIVATED: #ifdef STA_SUPPORT - pmpriv = woal_get_priv((moal_handle *) pmoal_handle, + pmpriv = woal_get_priv((moal_handle *)pmoal_handle, MLAN_BSS_ROLE_STA); #ifdef STA_WEXT if (IS_STA_WEXT(cfg80211_wext) && pmpriv) @@ -1436,12 +1475,11 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) strlen(CUS_EVT_HS_ACTIVATED)); #endif /* STA_SUPPORT */ #if defined(UAP_SUPPORT) - pmpriv = woal_get_priv((moal_handle *) pmoal_handle, + pmpriv = woal_get_priv((moal_handle *)pmoal_handle, MLAN_BSS_ROLE_UAP); if (pmpriv) { pmevent->event_id = UAP_EVENT_ID_DRV_HS_ACTIVATED; - woal_broadcast_event(pmpriv, - (t_u8 *) & pmevent->event_id, + woal_broadcast_event(pmpriv, (t_u8 *)&pmevent->event_id, sizeof(t_u32)); } #endif @@ -1462,7 +1500,7 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) break; case MLAN_EVENT_ID_DRV_HS_DEACTIVATED: #ifdef STA_SUPPORT - pmpriv = woal_get_priv((moal_handle *) pmoal_handle, + pmpriv = woal_get_priv((moal_handle *)pmoal_handle, MLAN_BSS_ROLE_STA); #ifdef STA_WEXT if (IS_STA_WEXT(cfg80211_wext) && pmpriv) @@ -1474,12 +1512,11 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) strlen(CUS_EVT_HS_DEACTIVATED)); #endif /* STA_SUPPORT */ #if defined(UAP_SUPPORT) - pmpriv = woal_get_priv((moal_handle *) pmoal_handle, + pmpriv = woal_get_priv((moal_handle *)pmoal_handle, MLAN_BSS_ROLE_UAP); if (pmpriv) { pmevent->event_id = UAP_EVENT_ID_DRV_HS_DEACTIVATED; - woal_broadcast_event(pmpriv, - (t_u8 *) & pmevent->event_id, + woal_broadcast_event(pmpriv, (t_u8 *)&pmevent->event_id, sizeof(t_u32)); } #endif @@ -1489,6 +1526,8 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) break; #ifdef UAP_SUPPORT case MLAN_EVENT_ID_UAP_FW_BSS_START: + if (priv->hist_data) + woal_hist_data_reset(priv); priv->bss_started = MTRUE; if (!netif_carrier_ok(priv->netdev)) netif_carrier_on(priv->netdev); @@ -1499,7 +1538,7 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) pmevent->event_len); #ifdef STA_SUPPORT #ifdef STA_CFG80211 - pmpriv = woal_get_priv((moal_handle *) pmoal_handle, + pmpriv = woal_get_priv((moal_handle *)pmoal_handle, MLAN_BSS_ROLE_STA); if (IS_STA_CFG80211(cfg80211_wext) && pmpriv) woal_set_scan_time(pmpriv, ACTIVE_SCAN_CHAN_TIME, @@ -1524,7 +1563,7 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) case MLAN_EVENT_ID_UAP_FW_MIC_COUNTERMEASURES: { t_u16 status = 0; - status = *(t_u16 *) (pmevent->event_buf + 4); + status = *(t_u16 *)(pmevent->event_buf + 4); if (status) { priv->media_connected = MFALSE; woal_stop_queue(priv->netdev); @@ -1587,9 +1626,11 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) /* copy the station mac address */ memset(addr, 0xFF, ETH_ALEN); memcpy(addr, pmevent->event_buf, ETH_ALEN); - /** these field add in kernel 3.2, but some kernel do have the pacth to - * support it,like T3T and pxa978T 3.0.31 JB, these patch are - * needed to support wpa_supplicant 2.x */ + /** these field add in kernel 3.2, but some + * kernel do have the pacth to support it, + * like T3T and pxa978T 3.0.31 JB, these + * patch are needed to support + * wpa_supplicant 2.x */ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 31) || defined(COMPAT_WIRELESS) if (pmevent->event_len > ETH_ALEN) { /* set station info filled flag */ @@ -1605,13 +1646,13 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) #endif /* KERNEL_VERSION */ if (priv->netdev && priv->wdev) cfg80211_new_sta(priv->netdev, - (t_u8 *) addr, &sinfo, + (t_u8 *)addr, &sinfo, GFP_KERNEL); } #endif /* UAP_CFG80211 */ memmove((pmevent->event_buf + strlen(CUS_EVT_STA_CONNECTED) + 1), pmevent->event_buf, pmevent->event_len); - memcpy(pmevent->event_buf, (t_u8 *) CUS_EVT_STA_CONNECTED, + memcpy(pmevent->event_buf, (t_u8 *)CUS_EVT_STA_CONNECTED, strlen(CUS_EVT_STA_CONNECTED)); pmevent->event_buf[strlen(CUS_EVT_STA_CONNECTED)] = 0; woal_broadcast_event(priv, pmevent->event_buf, @@ -1649,7 +1690,7 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) #endif /* UAP_CFG80211 */ memmove((pmevent->event_buf + strlen(CUS_EVT_STA_DISCONNECTED) + 1), pmevent->event_buf, pmevent->event_len); - memcpy(pmevent->event_buf, (t_u8 *) CUS_EVT_STA_DISCONNECTED, + memcpy(pmevent->event_buf, (t_u8 *)CUS_EVT_STA_DISCONNECTED, strlen(CUS_EVT_STA_DISCONNECTED)); pmevent->event_buf[strlen(CUS_EVT_STA_DISCONNECTED)] = 0; woal_broadcast_event(priv, pmevent->event_buf, @@ -1691,7 +1732,6 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) remain_on_channel ? priv->phandle->chan. center_freq : woal_get_active_intf_freq(priv); - if (!freq) { if (!priv->phandle->chan.center_freq) { PRINTM(MINFO, @@ -1701,7 +1741,7 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) freq = priv->phandle->chan.center_freq; } - pkt = ((t_u8 *) pmevent->event_buf + pkt = ((t_u8 *)pmevent->event_buf + sizeof(pmevent->event_id)); /* move addr4 */ @@ -1782,12 +1822,62 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) woal_wake_queue(priv->netdev); } break; + case MLAN_EVENT_ID_DRV_MEAS_REPORT: + /* We have received measurement report, wakeup measurement wait + queue */ + PRINTM(MINFO, "Measurement Report\n"); + /* Going out of CAC checking period */ + if (priv->phandle->cac_period == MTRUE) { + priv->phandle->cac_period = MFALSE; + if (priv->phandle->meas_wait_q_woken == MFALSE) { + priv->phandle->meas_wait_q_woken = MTRUE; + wake_up_interruptible(&priv->phandle-> + meas_wait_q); + } + + /* Execute delayed BSS START command */ + if (priv->phandle->delay_bss_start == MTRUE) { + mlan_ioctl_req *req = NULL; + mlan_ds_bss *bss = NULL; + + /* Clear flag */ + priv->phandle->delay_bss_start = MFALSE; + + PRINTM(MMSG, + "Now CAC measure period end. Execute delayed BSS Start command.\n"); + + req = woal_alloc_mlan_ioctl_req(sizeof + (mlan_ds_bss)); + if (!req) { + PRINTM(MERROR, + "Failed to allocate ioctl request buffer\n"); + goto done; + } + bss = (mlan_ds_bss *)req->pbuf; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_SET; + bss->sub_command = MLAN_OID_BSS_START; + memcpy(&bss->param.ssid_bssid, + &priv->phandle->delay_ssid_bssid, + sizeof(mlan_ssid_bssid)); + + if (woal_request_ioctl(priv, req, MOAL_NO_WAIT) + != MLAN_STATUS_PENDING) { + PRINTM(MERROR, + "Delayed BSS Start operation failed!\n"); + kfree(req); + } + + PRINTM(MMSG, "BSS START Complete!\n"); + } + } + break; case MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ: #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) #ifdef STA_CFG80211 if (IS_STA_CFG80211(cfg80211_wext)) { tdls_tear_down_event *tdls_event = - (tdls_tear_down_event *) pmevent->event_buf; + (tdls_tear_down_event *)pmevent->event_buf; cfg80211_tdls_oper_request(priv->netdev, tdls_event->peer_mac_addr, NL80211_TDLS_TEARDOWN, @@ -1795,6 +1885,48 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) GFP_KERNEL); } #endif +#endif + break; + case MLAN_EVENT_ID_FW_TX_STATUS: +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + if (IS_STA_OR_UAP_CFG80211(cfg80211_wext)) { + unsigned long flag; + tx_status_event *tx_status = + (tx_status_event *)(pmevent->event_buf + 4); + PRINTM(MINFO, + "Receive Tx status: tx_token=%d, pkt_type=0x%x, status=%d tx_seq_num=%d\n", + tx_status->tx_token_id, tx_status->packet_type, + tx_status->status, priv->tx_seq_num); + spin_lock_irqsave(&priv->tx_stat_lock, flag); + if (priv->last_tx_buf && priv->last_tx_cookie && + (tx_status->tx_token_id == priv->tx_seq_num)) { + bool ack; + if (!tx_status->status) + ack = true; + else + ack = false; + PRINTM(MEVENT, "Wlan: P2P Tx status=%d\n", ack); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + cfg80211_mgmt_tx_status(priv->netdev, + priv->last_tx_cookie, + priv->last_tx_buf, + priv->last_tx_buf_len, + ack, GFP_ATOMIC); +#else + cfg80211_mgmt_tx_status(priv->wdev, + priv->last_tx_cookie, + priv->last_tx_buf, + priv->last_tx_buf_len, + ack, GFP_ATOMIC); +#endif +#endif + kfree(priv->last_tx_buf); + priv->last_tx_buf = NULL; + priv->last_tx_cookie = 0; + } + spin_unlock_irqrestore(&priv->tx_stat_lock, flag); + } #endif break; default: @@ -1815,7 +1947,7 @@ moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent) * @return N/A */ t_void -moal_print(IN t_void * pmoal_handle, IN t_u32 level, IN char *pformat, IN ...) +moal_print(IN t_void *pmoal_handle, IN t_u32 level, IN char *pformat, IN ...) { #ifdef DEBUG_LEVEL1 va_list args; @@ -1825,7 +1957,7 @@ moal_print(IN t_void * pmoal_handle, IN t_u32 level, IN char *pformat, IN ...) int len = 0; va_start(args, pformat); - buf = (t_u8 *) va_arg(args, t_u8 *); + buf = (t_u8 *)va_arg(args, t_u8 *); len = (int)va_arg(args, int); va_end(args); @@ -1868,10 +2000,10 @@ moal_print(IN t_void * pmoal_handle, IN t_u32 level, IN char *pformat, IN ...) * @return N/A */ t_void -moal_print_netintf(IN t_void * pmoal_handle, IN t_u32 bss_index, IN t_u32 level) +moal_print_netintf(IN t_void *pmoal_handle, IN t_u32 bss_index, IN t_u32 level) { #ifdef DEBUG_LEVEL1 - moal_handle *phandle = (moal_handle *) pmoal_handle; + moal_handle *phandle = (moal_handle *)pmoal_handle; if (phandle) { if ((bss_index < MLAN_MAX_BSS_NUM) && phandle->priv[bss_index] @@ -1893,7 +2025,7 @@ moal_print_netintf(IN t_void * pmoal_handle, IN t_u32 bss_index, IN t_u32 level) * @return N/A */ t_void -moal_assert(IN t_void * pmoal_handle, IN t_u32 cond) +moal_assert(IN t_void *pmoal_handle, IN t_u32 cond) { if (!cond) { panic("Assert failed: Panic!"); @@ -1909,9 +2041,85 @@ moal_assert(IN t_void * pmoal_handle, IN t_u32 cond) * @return N/A */ t_void -moal_tcp_ack_tx_ind(IN t_void * pmoal_handle, IN pmlan_buffer pmbuf) +moal_tcp_ack_tx_ind(IN t_void *pmoal_handle, IN pmlan_buffer pmbuf) { - moal_handle *phandle = (moal_handle *) pmoal_handle; + moal_handle *phandle = (moal_handle *)pmoal_handle; pmbuf->flags &= ~MLAN_BUF_FLAG_TCP_ACK; woal_tcp_ack_tx_indication(phandle->priv[pmbuf->bss_index], pmbuf); } + +/** + * @brief This function save the histogram data + * + * @param pmoal_handle A pointer to moal_private structure + * @param bss_index BSS index + * @param rx_rate rx rate index + * @param snr snr + * @param nflr noise floor + * + * @return N/A + */ +t_void +moal_hist_data_add(IN t_void *pmoal_handle, IN t_u32 bss_index, IN t_s8 rx_rate, + IN t_s8 snr, IN t_s8 nflr, IN t_u8 antenna) +{ + moal_private *priv = NULL; + priv = woal_bss_index_to_priv(pmoal_handle, bss_index); + if (antenna >= priv->phandle->histogram_table_num) + antenna = 0; + if (priv && priv->hist_data[antenna]) + woal_hist_data_add(priv, rx_rate, snr, nflr, antenna); +} + +/** + * @brief This function saves peer management frame data + * + * @param pmoal_handle A pointer to moal_private structure + * @param bss_index BSS index + * @param snr Signal to Noise ratio + * @param nf Noise Floor + * @param sig_str Signal strength + * @param mac MAC address + * + * @return N/A + */ +t_void moal_peer_mgmt_frame(IN t_void * pmoal_handle, IN t_u32 bss_index, + IN t_s8 snr, IN t_s8 nf, IN t_s8 sig_str, + IN mlan_802_11_mac_addr mac) +{ + moal_private *priv = NULL; + priv = woal_bss_index_to_priv(pmoal_handle, bss_index); + if (priv) + woal_peer_mgmt_frame(priv, snr, nf, sig_str, mac); +} + +/** + * @brief This function update the peer signal + * + * @param pmoal_handle A pointer to moal_private structure + * @param bss_index BSS index + * @param snr snr + * @param nflr noise floor + * + * @return N/A + */ +t_void +moal_updata_peer_signal(IN t_void *pmoal_handle, IN t_u32 bss_index, + IN t_u8 *peer_addr, IN t_s8 snr, IN t_s8 nflr) +{ + moal_private *priv = NULL; + struct tdls_peer *peer = NULL; + unsigned long flags; + priv = woal_bss_index_to_priv(pmoal_handle, bss_index); + if (priv && priv->enable_auto_tdls) { + spin_lock_irqsave(&priv->tdls_lock, flags); + list_for_each_entry(peer, &priv->tdls_list, link) { + if (!memcmp(peer->peer_addr, peer_addr, ETH_ALEN)) { + peer->rssi = nflr - snr; + peer->rssi_jiffies = jiffies; + break; + } + } + spin_unlock_irqrestore(&priv->tdls_lock, flags); + } +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_shim.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_shim.h old mode 100755 new mode 100644 index fd52bf97..a0592c9c --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_shim.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_shim.h @@ -27,74 +27,83 @@ Change Log: #ifndef _MOAL_H #define _MOAL_H -mlan_status moal_get_fw_data(IN t_void * pmoal_handle, - IN t_u32 offset, IN t_u32 len, OUT t_u8 * pbuf); -mlan_status moal_init_fw_complete(IN t_void * pmoal_handle, +mlan_status moal_get_fw_data(IN t_void *pmoal_handle, + IN t_u32 offset, IN t_u32 len, OUT t_u8 *pbuf); +mlan_status moal_init_fw_complete(IN t_void *pmoal_handle, IN mlan_status status); -mlan_status moal_shutdown_fw_complete(IN t_void * pmoal_handle, +mlan_status moal_shutdown_fw_complete(IN t_void *pmoal_handle, IN mlan_status status); -mlan_status moal_ioctl_complete(IN t_void * pmoal_handle, +mlan_status moal_ioctl_complete(IN t_void *pmoal_handle, IN pmlan_ioctl_req pioctl_req, IN mlan_status status); -mlan_status moal_alloc_mlan_buffer(IN t_void * pmoal_handle, IN t_u32 size, - OUT pmlan_buffer * pmbuf); -mlan_status moal_free_mlan_buffer(IN t_void * pmoal_handle, +mlan_status moal_alloc_mlan_buffer(IN t_void *pmoal_handle, IN t_u32 size, + OUT pmlan_buffer *pmbuf); +mlan_status moal_free_mlan_buffer(IN t_void *pmoal_handle, IN pmlan_buffer pmbuf); -mlan_status moal_send_packet_complete(IN t_void * pmoal_handle, +mlan_status moal_send_packet_complete(IN t_void *pmoal_handle, IN pmlan_buffer pmbuf, IN mlan_status status); /** moal_write_reg */ -mlan_status moal_write_reg(IN t_void * pmoal_handle, +mlan_status moal_write_reg(IN t_void *pmoal_handle, IN t_u32 reg, IN t_u32 data); /** moal_read_reg */ -mlan_status moal_read_reg(IN t_void * pmoal_handle, - IN t_u32 reg, OUT t_u32 * data); -mlan_status moal_write_data_sync(IN t_void * pmoal_handle, +mlan_status moal_read_reg(IN t_void *pmoal_handle, + IN t_u32 reg, OUT t_u32 *data); +mlan_status moal_write_data_sync(IN t_void *pmoal_handle, IN pmlan_buffer pmbuf, IN t_u32 port, IN t_u32 timeout); -mlan_status moal_read_data_sync(IN t_void * pmoal_handle, +mlan_status moal_read_data_sync(IN t_void *pmoal_handle, IN OUT pmlan_buffer pmbuf, IN t_u32 port, IN t_u32 timeout); -mlan_status moal_recv_packet(IN t_void * pmoal_handle, IN pmlan_buffer pmbuf); -mlan_status moal_recv_event(IN t_void * pmoal_handle, IN pmlan_event pmevent); -mlan_status moal_malloc(IN t_void * pmoal_handle, - IN t_u32 size, IN t_u32 flag, OUT t_u8 ** ppbuf); -mlan_status moal_mfree(IN t_void * pmoal_handle, IN t_u8 * pbuf); -mlan_status moal_vmalloc(IN t_void * pmoal_handle, - IN t_u32 size, OUT t_u8 ** ppbuf); -mlan_status moal_vfree(IN t_void * pmoal_handle, IN t_u8 * pbuf); -t_void *moal_memset(IN t_void * pmoal_handle, - IN t_void * pmem, IN t_u8 byte, IN t_u32 num); -t_void *moal_memcpy(IN t_void * pmoal_handle, - IN t_void * pdest, IN const t_void * psrc, IN t_u32 num); -t_void *moal_memmove(IN t_void * pmoal_handle, - IN t_void * pdest, IN const t_void * psrc, IN t_u32 num); -t_s32 moal_memcmp(IN t_void * pmoal_handle, - IN const t_void * pmem1, - IN const t_void * pmem2, IN t_u32 num); +mlan_status moal_recv_packet(IN t_void *pmoal_handle, IN pmlan_buffer pmbuf); +mlan_status moal_recv_event(IN t_void *pmoal_handle, IN pmlan_event pmevent); +mlan_status moal_malloc(IN t_void *pmoal_handle, + IN t_u32 size, IN t_u32 flag, OUT t_u8 **ppbuf); +mlan_status moal_mfree(IN t_void *pmoal_handle, IN t_u8 *pbuf); +mlan_status moal_vmalloc(IN t_void *pmoal_handle, + IN t_u32 size, OUT t_u8 **ppbuf); +mlan_status moal_vfree(IN t_void *pmoal_handle, IN t_u8 *pbuf); +t_void *moal_memset(IN t_void *pmoal_handle, + IN t_void *pmem, IN t_u8 byte, IN t_u32 num); +t_void *moal_memcpy(IN t_void *pmoal_handle, + IN t_void *pdest, IN const t_void *psrc, IN t_u32 num); +t_void *moal_memmove(IN t_void *pmoal_handle, + IN t_void *pdest, IN const t_void *psrc, IN t_u32 num); +t_s32 moal_memcmp(IN t_void *pmoal_handle, + IN const t_void *pmem1, IN const t_void *pmem2, IN t_u32 num); /** moal_udelay */ -t_void moal_udelay(IN t_void * pmoal_handle, IN t_u32 udelay); -mlan_status moal_get_system_time(IN t_void * pmoal_handle, OUT t_u32 * psec, - OUT t_u32 * pusec); -mlan_status moal_init_lock(IN t_void * pmoal_handle, OUT t_void ** pplock); -mlan_status moal_free_lock(IN t_void * pmoal_handle, IN t_void * plock); -mlan_status moal_spin_lock(IN t_void * pmoal_handle, IN t_void * plock); -mlan_status moal_spin_unlock(IN t_void * pmoal_handle, IN t_void * plock); -t_void moal_print(IN t_void * pmoal_handle, IN t_u32 level, IN char *pformat, +t_void moal_udelay(IN t_void *pmoal_handle, IN t_u32 udelay); +mlan_status moal_get_system_time(IN t_void *pmoal_handle, OUT t_u32 *psec, + OUT t_u32 *pusec); +mlan_status moal_init_lock(IN t_void *pmoal_handle, OUT t_void **pplock); +mlan_status moal_free_lock(IN t_void *pmoal_handle, IN t_void *plock); +mlan_status moal_spin_lock(IN t_void *pmoal_handle, IN t_void *plock); +mlan_status moal_spin_unlock(IN t_void *pmoal_handle, IN t_void *plock); +t_void moal_print(IN t_void *pmoal_handle, IN t_u32 level, IN char *pformat, IN ...); -t_void moal_print_netintf(IN t_void * pmoal_handle, IN t_u32 bss_index, +t_void moal_print_netintf(IN t_void *pmoal_handle, IN t_u32 bss_index, IN t_u32 level); -t_void moal_assert(IN t_void * pmoal_handle, IN t_u32 cond); -t_void moal_tcp_ack_tx_ind(IN t_void * pmoal_handle, IN pmlan_buffer pmbuf); -mlan_status moal_init_timer(IN t_void * pmoal_handle, - OUT t_void ** pptimer, - IN t_void(*callback) (t_void * pcontext), - IN t_void * pcontext); -mlan_status moal_free_timer(IN t_void * pmoal_handle, IN t_void * ptimer); -mlan_status moal_start_timer(IN t_void * pmoal_handle, - IN t_void * ptimer, +t_void moal_assert(IN t_void *pmoal_handle, IN t_u32 cond); +t_void moal_tcp_ack_tx_ind(IN t_void *pmoal_handle, IN pmlan_buffer pmbuf); +t_void moal_hist_data_add(IN t_void *pmoal_handle, IN t_u32 bss_index, + IN t_s8 rx_rate, IN t_s8 snr, IN t_s8 nflr, + IN t_u8 antenna); + +t_void moal_peer_mgmt_frame(IN t_void * pmoal_handle, IN t_u32 bss_index, + IN t_s8 snr, IN t_s8 nf, IN t_s8 sig_str, + IN mlan_802_11_mac_addr mac); +t_void moal_updata_peer_signal(IN t_void *pmoal_handle, IN t_u32 bss_index, + IN t_u8 *peer_addr, IN t_s8 snr, IN t_s8 nflr); + +mlan_status moal_init_timer(IN t_void *pmoal_handle, + OUT t_void **pptimer, + IN t_void (*callback) (t_void *pcontext), + IN t_void *pcontext); +mlan_status moal_free_timer(IN t_void *pmoal_handle, IN t_void *ptimer); +mlan_status moal_start_timer(IN t_void *pmoal_handle, + IN t_void *ptimer, IN t_u8 periodic, IN t_u32 msec); -mlan_status moal_stop_timer(IN t_void * pmoal_handle, IN t_void * ptimer); +mlan_status moal_stop_timer(IN t_void *pmoal_handle, IN t_void *ptimer); #endif /*_MOAL_H */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_sta_cfg80211.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_sta_cfg80211.c old mode 100755 new mode 100644 index 1d2c084f..2512b983 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_sta_cfg80211.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_sta_cfg80211.c @@ -50,11 +50,16 @@ static int woal_cfg80211_disconnect(struct wiphy *wiphy, static int woal_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, - t_u8 * mac, struct station_info *sinfo); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const t_u8 *mac, +#else + t_u8 *mac, +#endif + struct station_info *sinfo); static int woal_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *dev, int idx, - t_u8 * mac, struct station_info *sinfo); + t_u8 *mac, struct station_info *sinfo); static int woal_cfg80211_dump_survey(struct wiphy *wiphy, struct net_device *dev, int idx, @@ -132,23 +137,43 @@ int woal_cfg80211_resume(struct wiphy *wiphy); int woal_cfg80211_suspend(struct wiphy *wiphy, struct cfg80211_wowlan *wow); #endif +void woal_check_auto_tdls(struct wiphy *wiphy, struct net_device *dev); #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)|| defined(COMPAT_WIRELESS) int woal_cfg80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, - u8 * peer, enum nl80211_tdls_operation oper); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *peer, +#else + u8 *peer, +#endif + enum nl80211_tdls_operation oper); int woal_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev, - u8 * peer, u8 action_code, u8 dialog_token, - u16 status_code, const u8 * extra_ies, - size_t extra_ies_len); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *peer, +#else + u8 *peer, +#endif + u8 action_code, u8 dialog_token, u16 status_code, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) + u32 peer_capability, +#endif + const u8 *extra_ies, size_t extra_ies_len); static int - -woal_cfg80211_add_station(struct wiphy *wiphy, struct net_device *dev, - u8 * mac, struct station_parameters *params); + woal_cfg80211_add_station(struct wiphy *wiphy, struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *mac, +#else + u8 *mac, +#endif + struct station_parameters *params); static int - -woal_cfg80211_change_station(struct wiphy *wiphy, struct net_device *dev, - u8 * mac, struct station_parameters *params); + woal_cfg80211_change_station(struct wiphy *wiphy, struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *mac, +#else + u8 *mac, +#endif + struct station_parameters *params); #endif - /** cfg80211 operations */ static struct cfg80211_ops woal_cfg80211_ops = { .change_virtual_intf = woal_cfg80211_change_virtual_intf, @@ -167,6 +192,9 @@ static struct cfg80211_ops woal_cfg80211_ops = { .add_key = woal_cfg80211_add_key, .del_key = woal_cfg80211_del_key, .set_default_key = woal_cfg80211_set_default_key, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30) || defined(COMPAT_WIRELESS) + .set_default_mgmt_key = woal_cfg80211_set_default_mgmt_key, +#endif .set_power_mgmt = woal_cfg80211_set_power_mgmt, .set_tx_power = woal_cfg80211_set_tx_power, .set_bitrate_mask = woal_cfg80211_set_bitrate_mask, @@ -303,7 +331,7 @@ static const struct ieee80211_iface_limit cfg80211_ap_sta_limits[] = { } }; -const struct ieee80211_iface_combination cfg80211_iface_comb_ap_sta = { +static struct ieee80211_iface_combination cfg80211_iface_comb_ap_sta = { .limits = cfg80211_ap_sta_limits, .num_different_channels = 1, .n_limits = ARRAY_SIZE(cfg80211_ap_sta_limits), @@ -323,6 +351,8 @@ extern int p2p_enh; #endif #endif +int cfg80211_drcs = 1; + #ifdef CONFIG_PM #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) static const struct wiphy_wowlan_support wowlan_support = { @@ -350,8 +380,9 @@ t_u8 is_cfg80211_special_region_code(char *region_string) { t_u8 i; - region_code_t cfg80211_special_region_code[] = - { {"00 "}, {"99 "}, {"98 "}, {"97 "} }; + region_code_t cfg80211_special_region_code[] = { + {"00 "}, {"99 "}, {"98 "}, {"97 "} + }; for (i = 0; i < COUNTRY_CODE_LEN && region_string[i]; i++) region_string[i] = toupper(region_string[i]); @@ -418,11 +449,11 @@ woal_cfg80211_get_encryption_mode(t_u32 cipher, int *wpa_enabled) * @return IEEE status code */ static int -woal_get_assoc_status(moal_private * priv) +woal_get_assoc_status(moal_private *priv) { int ret = WLAN_STATUS_UNSPECIFIED_FAILURE; - t_u16 status = (t_u16) (priv->assoc_status & 0xffff); - t_u16 cap = (t_u16) (priv->assoc_status >> 16); + t_u16 status = (t_u16)(priv->assoc_status & 0xffff); + t_u16 cap = (t_u16)(priv->assoc_status >> 16); switch (cap) { case 0xfffd: @@ -568,7 +599,7 @@ woal_nl80211_iftype_to_mode(enum nl80211_iftype iftype) * @return 0 --success, otherwise fail */ static int -woal_wps_cfg(moal_private * priv, int enable) +woal_wps_cfg(moal_private *priv, int enable) { int ret = 0; mlan_ds_wps_cfg *pwps = NULL; @@ -585,7 +616,7 @@ woal_wps_cfg(moal_private * priv, int enable) goto done; } - pwps = (mlan_ds_wps_cfg *) req->pbuf; + pwps = (mlan_ds_wps_cfg *)req->pbuf; req->req_id = MLAN_IOCTL_WPS_CFG; req->action = MLAN_ACT_SET; pwps->sub_command = MLAN_OID_WPS_CFG_SESSION; @@ -613,11 +644,13 @@ woal_wps_cfg(moal_private * priv, int enable) * @param priv A pointer to moal private structure * @param ie A pointer to ie data * @param ie_len The length of ie data + * @param wait_option wait option * * @return 0 -- success, otherwise fail */ static int -woal_cfg80211_assoc_ies_cfg(moal_private * priv, t_u8 * ie, int ie_len) +woal_cfg80211_assoc_ies_cfg(moal_private *priv, t_u8 *ie, int ie_len, + t_u8 wait_option) { int bytes_left = ie_len; t_u8 *pcurrent_ptr = ie; @@ -627,10 +660,11 @@ woal_cfg80211_assoc_ies_cfg(moal_private * priv, t_u8 * ie, int ie_len) IEEEtypes_ElementId_e element_id; IEEEtypes_VendorSpecific_t *pvendor_ie; t_u8 wps_oui[] = { 0x00, 0x50, 0xf2, 0x04 }; + t_u8 hs20_oui[] = { 0x50, 0x6f, 0x9a, 0x10 }; while (bytes_left >= 2) { - element_id = (IEEEtypes_ElementId_e) (*((t_u8 *) pcurrent_ptr)); - element_len = *((t_u8 *) pcurrent_ptr + 1); + element_id = (IEEEtypes_ElementId_e)(*((t_u8 *)pcurrent_ptr)); + element_len = *((t_u8 *)pcurrent_ptr + 1); total_ie_len = element_len + sizeof(IEEEtypes_Header_t); if (bytes_left < total_ie_len) { PRINTM(MERROR, @@ -642,7 +676,8 @@ woal_cfg80211_assoc_ies_cfg(moal_private * priv, t_u8 * ie, int ie_len) case RSN_IE: if (MLAN_STATUS_SUCCESS != woal_set_get_gen_ie(priv, MLAN_ACT_SET, - pcurrent_ptr, &total_ie_len)) { + pcurrent_ptr, &total_ie_len, + wait_option)) { PRINTM(MERROR, "Fail to set RSN IE\n"); ret = -EFAULT; goto done; @@ -650,8 +685,7 @@ woal_cfg80211_assoc_ies_cfg(moal_private * priv, t_u8 * ie, int ie_len) PRINTM(MIOCTL, "Set RSN IE\n"); break; case VENDOR_SPECIFIC_221: - pvendor_ie = - (IEEEtypes_VendorSpecific_t *) pcurrent_ptr; + pvendor_ie = (IEEEtypes_VendorSpecific_t *)pcurrent_ptr; if (!memcmp (pvendor_ie->vend_hdr.oui, wps_oui, sizeof(pvendor_ie->vend_hdr.oui)) && @@ -659,9 +693,25 @@ woal_cfg80211_assoc_ies_cfg(moal_private * priv, t_u8 * ie, int ie_len) PRINTM(MIOCTL, "Enable WPS session\n"); woal_wps_cfg(priv, MTRUE); } + if (!memcmp + (pvendor_ie->vend_hdr.oui, hs20_oui, + sizeof(hs20_oui))) { + PRINTM(MIOCTL, + "Hotspot2.0 is enabled for this bss\n"); + if (MLAN_STATUS_SUCCESS != + woal_set_hotspotcfg(priv, wait_option, + (HOTSPOT_BY_SUPPLICANT | + HOTSPOT_ENABLED))) { + PRINTM(MERROR, + "Fail to enable hotspot 2.0\n"); + ret = -EFAULT; + goto done; + } + } if (MLAN_STATUS_SUCCESS != woal_set_get_gen_ie(priv, MLAN_ACT_SET, - pcurrent_ptr, &total_ie_len)) { + pcurrent_ptr, &total_ie_len, + wait_option)) { PRINTM(MERROR, "Fail to Set VENDOR SPECIFIC IE\n"); ret = -EFAULT; @@ -677,7 +727,8 @@ woal_cfg80211_assoc_ies_cfg(moal_private * priv, t_u8 * ie, int ie_len) default: if (MLAN_STATUS_SUCCESS != woal_set_get_gen_ie(priv, MLAN_ACT_SET, - pcurrent_ptr, &total_ie_len)) { + pcurrent_ptr, &total_ie_len, + wait_option)) { PRINTM(MERROR, "Fail to set GEN IE\n"); ret = -EFAULT; goto done; @@ -702,7 +753,7 @@ woal_cfg80211_assoc_ies_cfg(moal_private * priv, t_u8 * ie, int ie_len) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -woal_send_domain_info_cmd_fw(moal_private * priv, t_u8 wait_option) +woal_send_domain_info_cmd_fw(moal_private *priv, t_u8 wait_option) { mlan_status ret = MLAN_STATUS_SUCCESS; enum ieee80211_band band; @@ -747,7 +798,7 @@ woal_send_domain_info_cmd_fw(moal_private * priv, t_u8 wait_option) ret = MLAN_STATUS_FAILURE; goto done; } - cfg_11d = (mlan_ds_11d_cfg *) req->pbuf; + cfg_11d = (mlan_ds_11d_cfg *)req->pbuf; cfg_11d->sub_command = MLAN_OID_11D_DOMAIN_INFO; req->req_id = MLAN_IOCTL_11D_CFG; req->action = MLAN_ACT_SET; @@ -769,7 +820,7 @@ woal_send_domain_info_cmd_fw(moal_private * priv, t_u8 wait_option) if (!flag) { flag = 1; - next_chan = first_chan = (t_u32) channel->hw_value; + next_chan = first_chan = (t_u32)channel->hw_value; max_pwr = channel->max_power; no_of_parsed_chan = 1; continue; @@ -787,7 +838,7 @@ woal_send_domain_info_cmd_fw(moal_private * priv, t_u8 wait_option) cfg_11d->param.domain_info.sub_band[no_of_sub_band] .max_tx_pwr = max_pwr; no_of_sub_band++; - next_chan = first_chan = (t_u32) channel->hw_value; + next_chan = first_chan = (t_u32)channel->hw_value; max_pwr = channel->max_power; no_of_parsed_chan = 1; } @@ -826,13 +877,14 @@ woal_send_domain_info_cmd_fw(moal_private * priv, t_u8 wait_option) * @param priv A pointer to moal_private structure * @param chan A pointer to ieee80211_channel structure * @param channel_type Channel type of nl80211_channel_type + * @param wait_option wait option * * @return 0 -- success, otherwise fail */ int -woal_set_rf_channel(moal_private * priv, +woal_set_rf_channel(moal_private *priv, struct ieee80211_channel *chan, - enum nl80211_channel_type channel_type) + enum nl80211_channel_type channel_type, t_u8 wait_option) { int ret = 0; t_u32 mode, config_bands = 0; @@ -852,13 +904,13 @@ woal_set_rf_channel(moal_private * priv, ret = -ENOMEM; goto done; } - radio_cfg = (mlan_ds_radio_cfg *) req->pbuf; + radio_cfg = (mlan_ds_radio_cfg *)req->pbuf; radio_cfg->sub_command = MLAN_OID_BAND_CFG; req->req_id = MLAN_IOCTL_RADIO_CFG; /* Get config_bands, adhoc_start_band and adhoc_channel values from MLAN */ req->action = MLAN_ACT_GET; - status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + status = woal_request_ioctl(priv, req, wait_option); if (status != MLAN_STATUS_SUCCESS) { ret = -EFAULT; goto done; @@ -868,6 +920,8 @@ woal_set_rf_channel(moal_private * priv, /* Set appropriate bands */ if (chan->band == IEEE80211_BAND_2GHZ) config_bands = BAND_B | BAND_G | BAND_GN; + else + config_bands = BAND_AN | BAND_A; if (mode == MLAN_BSS_MODE_IBSS) { radio_cfg->param.band_cfg.adhoc_start_band = config_bands; radio_cfg->param.band_cfg.adhoc_channel = @@ -877,12 +931,12 @@ woal_set_rf_channel(moal_private * priv, radio_cfg->param.band_cfg.sec_chan_offset = woal_cfg80211_channel_type_to_channel(channel_type); - status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + status = woal_request_ioctl(priv, req, wait_option); if (status != MLAN_STATUS_SUCCESS) { ret = -EFAULT; goto done; } - woal_send_domain_info_cmd_fw(priv, MOAL_IOCTL_WAIT); + woal_send_domain_info_cmd_fw(priv, wait_option); PRINTM(MINFO, "Setting band %d, channel bandwidth %d and mode = %d channel=%d\n", @@ -892,8 +946,8 @@ woal_set_rf_channel(moal_private * priv, if (MLAN_STATUS_SUCCESS != woal_change_adhoc_chan(priv, ieee80211_frequency_to_channel(chan-> - center_freq))) - { + center_freq), + wait_option)) { ret = -EFAULT; goto done; } @@ -905,29 +959,99 @@ woal_set_rf_channel(moal_private * priv, return ret; } +/** + * @brief Set ewpa mode + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param ssid_bssid A pointer to mlan_ssid_bssid structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_set_ewpa_mode(moal_private *priv, t_u8 wait_option, + mlan_ssid_bssid *ssid_bssid) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (!priv->phandle->card_info->embedded_supp) { + ret = -EOPNOTSUPP; + goto error; + } + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto error; + } + /* Fill request buffer */ + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_PASSPHRASE; + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + + /* Try Get All */ + memset(&sec->param.passphrase, 0, sizeof(mlan_ds_passphrase)); + memcpy(&sec->param.passphrase.ssid, &ssid_bssid->ssid, + sizeof(sec->param.passphrase.ssid)); + memcpy(&sec->param.passphrase.bssid, &ssid_bssid->bssid, + MLAN_MAC_ADDR_LENGTH); + sec->param.passphrase.psk_type = MLAN_PSK_QUERY; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); + if (status != MLAN_STATUS_SUCCESS) + goto error; + sec->param.ewpa_enabled = MFALSE; + if (sec->param.passphrase.psk_type == MLAN_PSK_PASSPHRASE) { + if (sec->param.passphrase.psk.passphrase.passphrase_len > 0) + sec->param.ewpa_enabled = MTRUE; + } else if (sec->param.passphrase.psk_type == MLAN_PSK_PMK) + sec->param.ewpa_enabled = MTRUE; + + sec->sub_command = MLAN_OID_SEC_CFG_EWPA_ENABLED; + req->action = MLAN_ACT_SET; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); + +error: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + /** * @brief Set encryption mode and enable WPA * * @param priv A pointer to moal_private structure * @param encrypt_mode Encryption mode * @param wpa_enabled WPA enable or not + * @param wait_option wait option * * @return 0 -- success, otherwise fail */ static int -woal_cfg80211_set_auth(moal_private * priv, int encrypt_mode, int wpa_enabled) +woal_cfg80211_set_auth(moal_private *priv, int encrypt_mode, + int wpa_enabled, t_u8 wait_option) { int ret = 0; ENTER(); if (MLAN_STATUS_SUCCESS != - woal_set_encrypt_mode(priv, MOAL_IOCTL_WAIT, encrypt_mode)) + woal_set_encrypt_mode(priv, wait_option, encrypt_mode)) ret = -EFAULT; if (wpa_enabled) { if (MLAN_STATUS_SUCCESS != - woal_set_wpa_enable(priv, MOAL_IOCTL_WAIT, 1)) + woal_set_wpa_enable(priv, wait_option, 1)) ret = -EFAULT; } @@ -961,8 +1085,8 @@ woal_cfg80211_set_auth(moal_private * priv, int encrypt_mode, int wpa_enabled) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -woal_inform_bss_from_scan_result(moal_private * priv, - mlan_ssid_bssid * ssid_bssid, t_u8 wait_option) +woal_inform_bss_from_scan_result(moal_private *priv, + mlan_ssid_bssid *ssid_bssid, t_u8 wait_option) { mlan_status ret = MLAN_STATUS_SUCCESS; struct ieee80211_channel *chan; @@ -972,6 +1096,9 @@ woal_inform_bss_from_scan_result(moal_private * priv, u16 cap_info = 0; int i = 0; struct cfg80211_bss *pub = NULL; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) + struct timespec tstamp; +#endif ENTER(); if (!priv->wdev || !priv->wdev->wiphy) { LEAVE(); @@ -987,7 +1114,7 @@ woal_inform_bss_from_scan_result(moal_private * priv, } if (scan_resp.num_in_scan_table) { - scan_table = (BSSDescriptor_t *) scan_resp.pscan_table; + scan_table = (BSSDescriptor_t *)scan_resp.pscan_table; for (i = 0; i < scan_resp.num_in_scan_table; i++) { if (ssid_bssid) { /* Inform specific BSS only */ @@ -1040,7 +1167,16 @@ woal_inform_bss_from_scan_result(moal_private * priv, } #endif #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) + /** Andorid's Location service is expecting timestamp to be + * local time (in microsecond) since boot; + * and not the TSF found in the beacon. */ + get_monotonic_boottime(&tstamp); + ts = (t_u64)tstamp.tv_sec * 1000000 + + tstamp.tv_nsec / 1000; +#else memcpy(&ts, scan_table[i].time_stamp, sizeof(ts)); +#endif memcpy(&cap_info, &scan_table[i].cap_info, sizeof(cap_info)); pub = cfg80211_inform_bss(priv->wdev->wiphy, chan, @@ -1099,7 +1235,7 @@ woal_inform_bss_from_scan_result(moal_private * priv, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ static mlan_status -woal_cfg80211_inform_ibss_bss(moal_private * priv, +woal_cfg80211_inform_ibss_bss(moal_private *priv, struct ieee80211_channel *chan, t_u16 beacon_interval) { @@ -1157,7 +1293,7 @@ woal_cfg80211_inform_ibss_bss(moal_private * priv, * @return 0 -- success, otherwise fail */ static int -woal_process_country_ie(moal_private * priv, struct cfg80211_bss *bss) +woal_process_country_ie(moal_private *priv, struct cfg80211_bss *bss) { u8 *country_ie, country_ie_len; int ret = 0; @@ -1166,7 +1302,7 @@ woal_process_country_ie(moal_private * priv, struct cfg80211_bss *bss) mlan_status status = MLAN_STATUS_SUCCESS; ENTER(); - country_ie = (u8 *) ieee80211_bss_get_ie(bss, WLAN_EID_COUNTRY); + country_ie = (u8 *)ieee80211_bss_get_ie(bss, WLAN_EID_COUNTRY); if (!country_ie) { PRINTM(MIOCTL, "No country IE found!\n"); woal_send_domain_info_cmd_fw(priv, MOAL_IOCTL_WAIT); @@ -1198,7 +1334,7 @@ woal_process_country_ie(moal_private * priv, struct cfg80211_bss *bss) goto done; } - cfg_11d = (mlan_ds_11d_cfg *) req->pbuf; + cfg_11d = (mlan_ds_11d_cfg *)req->pbuf; cfg_11d->sub_command = MLAN_OID_11D_DOMAIN_INFO; req->req_id = MLAN_IOCTL_11D_CFG; req->action = MLAN_ACT_SET; @@ -1216,7 +1352,7 @@ woal_process_country_ie(moal_private * priv, struct cfg80211_bss *bss) country_ie_len -= COUNTRY_CODE_LEN; cfg_11d->param.domain_info.no_of_sub_band = country_ie_len / sizeof(struct ieee80211_country_ie_triplet); - memcpy((u8 *) cfg_11d->param.domain_info.sub_band, + memcpy((u8 *)cfg_11d->param.domain_info.sub_band, &country_ie[2] + COUNTRY_CODE_LEN, country_ie_len); /* Send domain info command to FW */ @@ -1238,12 +1374,14 @@ woal_process_country_ie(moal_private * priv, struct cfg80211_bss *bss) * * @param priv A pointer to moal_private structure * @param conn_param A pointer to connect parameters + * @param wait_option wait option * * @return 0 -- success, otherwise fail */ int -woal_cfg80211_connect_scan(moal_private * priv, - struct cfg80211_connect_params *conn_param) +woal_cfg80211_connect_scan(moal_private *priv, + struct cfg80211_connect_params *conn_param, + t_u8 wait_option) { moal_handle *handle = priv->phandle; int ret = 0; @@ -1301,12 +1439,12 @@ woal_cfg80211_connect_scan(moal_private * priv, scan_req.chan_list[chan_idx].scan_type = MLAN_SCAN_TYPE_ACTIVE; scan_req.chan_list[chan_idx].chan_number = - (u32) ch->hw_value; + (u32)ch->hw_value; chan_idx++; } } } - ret = woal_request_userscan(priv, MOAL_IOCTL_WAIT, &scan_req); + ret = woal_request_userscan(priv, wait_option, &scan_req); #ifdef REASSOCIATION MOAL_REL_SEMAPHORE(&handle->reassoc_sem); #endif @@ -1320,11 +1458,12 @@ woal_cfg80211_connect_scan(moal_private * priv, * * @param priv A pointer to moal_private structure * @param sme A pointer to connect parameters + * @param wait_option wait option * * @return 0 -- success, otherwise fail */ int -woal_cfg80211_assoc(moal_private * priv, void *sme) +woal_cfg80211_assoc(moal_private *priv, void *sme, t_u8 wait_option) { struct cfg80211_ibss_params *ibss_param = NULL; struct cfg80211_connect_params *conn_param = NULL; @@ -1346,6 +1485,7 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) bool privacy; struct cfg80211_bss *bss = NULL; mlan_status status = MLAN_STATUS_SUCCESS; + t_u8 wait_timeout = 0; ENTER(); @@ -1353,9 +1493,9 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) if (mode == MLAN_BSS_MODE_IBSS) { ibss_param = (struct cfg80211_ibss_params *)sme; - ssid = ibss_param->ssid; + ssid = (t_u8 *)ibss_param->ssid; ssid_len = ibss_param->ssid_len; - bssid = ibss_param->bssid; + bssid = (t_u8 *)ibss_param->bssid; #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) channel = ibss_param->channel; #else @@ -1364,21 +1504,21 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) if (channel) priv->phandle->band = channel->band; if (ibss_param->ie_len) - ie = ibss_param->ie; + ie = (t_u8 *)ibss_param->ie; ie_len = ibss_param->ie_len; beacon_interval = ibss_param->beacon_interval; privacy = ibss_param->privacy; } else { conn_param = (struct cfg80211_connect_params *)sme; - ssid = conn_param->ssid; + ssid = (t_u8 *)conn_param->ssid; ssid_len = conn_param->ssid_len; - bssid = conn_param->bssid; + bssid = (t_u8 *)conn_param->bssid; channel = conn_param->channel; if (channel) priv->phandle->band = channel->band; if (conn_param->ie_len) - ie = conn_param->ie; + ie = (t_u8 *)conn_param->ie; ie_len = conn_param->ie_len; privacy = conn_param->privacy; bss = cfg80211_get_bss(priv->wdev->wiphy, channel, bssid, ssid, @@ -1392,7 +1532,7 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) cfg80211_put_bss(bss); #endif } else - woal_send_domain_info_cmd_fw(priv, MOAL_IOCTL_WAIT); + woal_send_domain_info_cmd_fw(priv, wait_option); #ifdef STA_WEXT if (IS_STA_WEXT(cfg80211_wext)) { switch (conn_param->crypto.wpa_versions) { @@ -1448,12 +1588,12 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) ret = -ENOMEM; goto done; } - radio_cfg = (mlan_ds_radio_cfg *) req->pbuf; + radio_cfg = (mlan_ds_radio_cfg *)req->pbuf; radio_cfg->sub_command = MLAN_OID_BAND_CFG; req->req_id = MLAN_IOCTL_RADIO_CFG; req->action = MLAN_ACT_GET; - status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + status = woal_request_ioctl(priv, req, wait_option); if (status != MLAN_STATUS_SUCCESS) { ret = -EFAULT; goto done; @@ -1463,24 +1603,31 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) woal_channel_to_nl80211_channel_type (radio_cfg-> param.band_cfg. - sec_chan_offset))) - { + sec_chan_offset), + wait_option)) { ret = -EFAULT; goto done; } } + if (priv->phandle->card_info->embedded_supp) + if (MLAN_STATUS_SUCCESS != + woal_set_ewpa_mode(priv, wait_option, &ssid_bssid)) { + ret = -EFAULT; + goto done; + } + if (MLAN_STATUS_SUCCESS != woal_cfg80211_set_key(priv, 0, 0, NULL, 0, NULL, 0, - KEY_INDEX_CLEAR_ALL, NULL, 1)) { + KEY_INDEX_CLEAR_ALL, NULL, 1, wait_option)) { /* Disable keys and clear all previous security settings */ ret = -EFAULT; goto done; } - if (ie && ie_len) { /* Set the IE */ if (MLAN_STATUS_SUCCESS != - woal_cfg80211_assoc_ies_cfg(priv, ie, ie_len)) { + woal_cfg80211_assoc_ies_cfg(priv, ie, ie_len, + wait_option)) { ret = -EFAULT; goto done; } @@ -1496,9 +1643,8 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) auth_type = MLAN_AUTH_MODE_NETWORKEAP; else auth_type = MLAN_AUTH_MODE_AUTO; - if (MLAN_STATUS_SUCCESS != - woal_set_auth_mode(priv, MOAL_IOCTL_WAIT, auth_type)) { + woal_set_auth_mode(priv, wait_option, auth_type)) { ret = -EFAULT; goto done; } @@ -1510,7 +1656,7 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) [0], &wpa_enabled); ret = woal_cfg80211_set_auth(priv, pairwise_enc_mode, - wpa_enabled); + wpa_enabled, wait_option); if (ret) goto done; } @@ -1521,7 +1667,7 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) crypto.cipher_group, &wpa_enabled); ret = woal_cfg80211_set_auth(priv, group_enc_mode, - wpa_enabled); + wpa_enabled, wait_option); if (ret) goto done; } @@ -1541,7 +1687,8 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) conn_param-> key_len, conn_param-> - key_idx)) { + key_idx, + wait_option)) { ret = -EFAULT; goto done; } @@ -1549,7 +1696,8 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) if (MLAN_STATUS_SUCCESS != woal_cfg80211_set_wep_keys(priv, NULL, 0, conn_param-> - key_idx)) { + key_idx, + wait_option)) { ret = -EFAULT; goto done; } @@ -1573,12 +1721,12 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) ret = -ENOMEM; goto done; } - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; req->req_id = MLAN_IOCTL_BSS; req->action = MLAN_ACT_SET; bss->sub_command = MLAN_OID_IBSS_BCN_INTERVAL; bss->param.bcn_interval = beacon_interval; - status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + status = woal_request_ioctl(priv, req, wait_option); if (status != MLAN_STATUS_SUCCESS) { ret = -EFAULT; goto done; @@ -1593,7 +1741,7 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) * mode at this stage so just setting it to wep here */ if (MLAN_STATUS_SUCCESS != - woal_set_auth_mode(priv, MOAL_IOCTL_WAIT, + woal_set_auth_mode(priv, wait_option, MLAN_AUTH_MODE_OPEN)) { ret = -EFAULT; goto done; @@ -1602,7 +1750,7 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) wpa_enabled = 0; ret = woal_cfg80211_set_auth(priv, MLAN_ENCRYPTION_MODE_WEP104, - wpa_enabled); + wpa_enabled, wait_option); if (ret) goto done; } @@ -1610,13 +1758,14 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) memcpy(&ssid_bssid.ssid, &req_ssid, sizeof(mlan_802_11_ssid)); if (bssid) memcpy(&ssid_bssid.bssid, bssid, ETH_ALEN); - if (MLAN_STATUS_SUCCESS != woal_find_essid(priv, &ssid_bssid)) { + if (MLAN_STATUS_SUCCESS != + woal_find_essid(priv, &ssid_bssid, wait_option)) { /* Do specific SSID scanning */ if (mode != MLAN_BSS_MODE_IBSS) - ret = woal_cfg80211_connect_scan(priv, conn_param); + ret = woal_cfg80211_connect_scan(priv, conn_param, + wait_option); else - ret = woal_request_scan(priv, MOAL_IOCTL_WAIT, - &req_ssid); + ret = woal_request_scan(priv, wait_option, &req_ssid); if (ret) { ret = -EFAULT; goto done; @@ -1625,12 +1774,11 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) /* Disconnect before try to associate */ if (mode == MLAN_BSS_MODE_IBSS) - woal_disconnect(priv, MOAL_IOCTL_WAIT, NULL); + woal_disconnect(priv, wait_option, NULL); if (mode != MLAN_BSS_MODE_IBSS) { if (MLAN_STATUS_SUCCESS != - woal_find_best_network(priv, MOAL_IOCTL_WAIT, - &ssid_bssid)) { + woal_find_best_network(priv, wait_option, &ssid_bssid)) { ret = -EFAULT; goto done; } @@ -1638,11 +1786,14 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) give a panic after successful assoc */ if (MLAN_STATUS_SUCCESS != woal_inform_bss_from_scan_result(priv, &ssid_bssid, - MOAL_IOCTL_WAIT)) { + wait_option)) { ret = -EFAULT; goto done; } - } + } else if (MLAN_STATUS_SUCCESS != + woal_find_best_network(priv, wait_option, &ssid_bssid)) + /* Adhoc start, Check the channel command */ + woal_11h_channel_check_ioctl(priv, wait_option); PRINTM(MINFO, "Trying to associate to %s and bssid " MACSTR "\n", (char *)req_ssid.ssid, MAC2STR(ssid_bssid.bssid)); @@ -1653,8 +1804,12 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) else /* Connect to BSS by ESSID */ memset(&ssid_bssid.bssid, 0, MLAN_MAC_ADDR_LENGTH); + if (wait_option == MOAL_IOCTL_WAIT) + wait_timeout = MOAL_IOCTL_WAIT_TIMEOUT; + else + wait_timeout = MOAL_CMD_WAIT_TIMEOUT; if (MLAN_STATUS_SUCCESS != - woal_bss_start(priv, MOAL_IOCTL_WAIT_TIMEOUT, &ssid_bssid)) { + woal_bss_start(priv, wait_timeout, &ssid_bssid)) { ret = -EFAULT; goto done; } @@ -1673,11 +1828,13 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) done: if (ret) { /* clear the encryption mode */ - woal_cfg80211_set_auth(priv, MLAN_ENCRYPTION_MODE_NONE, MFALSE); + woal_cfg80211_set_auth(priv, MLAN_ENCRYPTION_MODE_NONE, MFALSE, + wait_option); /* clear IE */ ie_len = 0; if (MLAN_STATUS_SUCCESS != - woal_set_get_gen_ie(priv, MLAN_ACT_SET, NULL, &ie_len)) { + woal_set_get_gen_ie(priv, MLAN_ACT_SET, NULL, &ie_len, + wait_option)) { PRINTM(MERROR, "Could not clear RSN IE\n"); ret = -EFAULT; } @@ -1700,8 +1857,8 @@ woal_cfg80211_assoc(moal_private * priv, void *sme) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ static mlan_status -woal_set_get_dtim_period(moal_private * priv, - t_u32 action, t_u8 wait_option, t_u8 * value) +woal_set_get_dtim_period(moal_private *priv, + t_u32 action, t_u8 wait_option, t_u8 *value) { mlan_ioctl_req *req = NULL; mlan_ds_snmp_mib *mib = NULL; @@ -1717,7 +1874,7 @@ woal_set_get_dtim_period(moal_private * priv, } /* Fill request buffer */ - mib = (mlan_ds_snmp_mib *) req->pbuf; + mib = (mlan_ds_snmp_mib *)req->pbuf; mib->sub_command = MLAN_OID_SNMP_MIB_DTIM_PERIOD; req->req_id = MLAN_IOCTL_SNMP_MIB; req->action = action; @@ -1728,7 +1885,7 @@ woal_set_get_dtim_period(moal_private * priv, /* Send IOCTL request to MLAN */ ret = woal_request_ioctl(priv, req, wait_option); if (ret == MLAN_STATUS_SUCCESS && action == MLAN_ACT_GET) - *value = (t_u8) mib->param.dtim_period; + *value = (t_u8)mib->param.dtim_period; done: if (ret != MLAN_STATUS_PENDING) @@ -1747,15 +1904,18 @@ woal_set_get_dtim_period(moal_private * priv, * @return 0 -- success, otherwise fail */ static mlan_status -woal_cfg80211_dump_station_info(moal_private * priv, struct station_info *sinfo) +woal_cfg80211_dump_station_info(moal_private *priv, struct station_info *sinfo) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ds_get_signal signal; + mlan_ds_get_stats stats; mlan_ioctl_req *req = NULL; mlan_ds_rate *rate = NULL; - t_u16 Rates[12] = - { 0x02, 0x04, 0x0B, 0x16, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, - 0x60, 0x6c }; + t_u16 Rates[12] = { + 0x02, 0x04, 0x0B, 0x16, + 0x0C, 0x12, 0x18, 0x24, + 0x30, 0x48, 0x60, 0x6c + }; #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0) || defined(COMPAT_WIRELESS) mlan_bss_info bss_info; t_u8 dtim_period = 0; @@ -1765,6 +1925,9 @@ woal_cfg80211_dump_station_info(moal_private * priv, struct station_info *sinfo) sinfo->filled = STATION_INFO_RX_BYTES | STATION_INFO_TX_BYTES | STATION_INFO_RX_PACKETS | STATION_INFO_TX_PACKETS | STATION_INFO_SIGNAL | STATION_INFO_TX_BITRATE; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) + sinfo->filled |= STATION_INFO_TX_FAILED; +#endif /* Get signal information from the firmware */ memset(&signal, 0, sizeof(mlan_ds_get_signal)); @@ -1775,12 +1938,21 @@ woal_cfg80211_dump_station_info(moal_private * priv, struct station_info *sinfo) goto done; } + /* Get stats information from the firmware */ + memset(&stats, 0, sizeof(mlan_ds_get_stats)); + if (MLAN_STATUS_SUCCESS != + woal_get_stats_info(priv, MOAL_IOCTL_WAIT, &stats)) { + PRINTM(MERROR, "Error getting stats information\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_rate)); if (req == NULL) { ret = MLAN_STATUS_FAILURE; goto done; } - rate = (mlan_ds_rate *) req->pbuf; + rate = (mlan_ds_rate *)req->pbuf; rate->sub_command = MLAN_OID_GET_DATA_RATE; req->req_id = MLAN_IOCTL_RATE; req->action = MLAN_ACT_GET; @@ -1806,6 +1978,9 @@ woal_cfg80211_dump_station_info(moal_private * priv, struct station_info *sinfo) sinfo->rx_packets = priv->stats.rx_packets; sinfo->tx_packets = priv->stats.tx_packets; sinfo->signal = signal.bcn_rssi_avg; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) + sinfo->tx_failed = stats.failed; +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0) || defined(COMPAT_WIRELESS) /* Update BSS information */ @@ -1858,7 +2033,7 @@ woal_cfg80211_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request) { moal_private *priv = NULL; - moal_handle *handle = (moal_handle *) woal_get_wiphy_priv(wiphy); + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); t_u8 region[COUNTRY_CODE_LEN]; #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0) int ret = 0; @@ -1891,6 +2066,21 @@ woal_cfg80211_reg_notifier(struct wiphy *wiphy, return; #endif } + if ((handle->country_code[0] != request->alpha2[0]) || + (handle->country_code[1] != request->alpha2[1])) { + t_u8 country_code[COUNTRY_CODE_LEN]; + memset(country_code, 0, sizeof(country_code)); + country_code[0] = request->alpha2[0]; + country_code[1] = request->alpha2[1]; + if (MLAN_STATUS_SUCCESS != + woal_request_country_power_table(priv, country_code)) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0) + return -EFAULT; +#else + return; +#endif + } + } handle->country_code[0] = request->alpha2[0]; handle->country_code[1] = request->alpha2[1]; handle->country_code[2] = ' '; @@ -1923,6 +2113,81 @@ woal_cfg80211_reg_notifier(struct wiphy *wiphy, } #ifdef UAP_CFG80211 +/** + * @brief Swithces BSS role of interface + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option (MOAL_WAIT or MOAL_NO_WAIT) + * @param bss_role bss role + * + * @return 0 --success, otherwise fail + */ +mlan_status +woal_role_switch(moal_private *priv, t_u8 wait_option, t_u8 bss_role) +{ + int ret = 0; + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_BSS_ROLE; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_SET; + bss->param.bss_role = bss_role; + + status = woal_request_ioctl(priv, req, wait_option); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief request scan + * + * @param priv A pointer to moal_private structure + * @param scan_cfg A pointer to wlan_user_scan_cfg structure + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_uap_scan(moal_private *priv, wlan_user_scan_cfg *scan_cfg) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + moal_handle *handle = priv->phandle; + + ENTER(); + woal_role_switch(priv, MOAL_IOCTL_WAIT, MLAN_BSS_ROLE_STA); +#ifdef REASSOCIATION + if (MOAL_ACQ_SEMAPHORE_BLOCK(&handle->reassoc_sem)) { + PRINTM(MERROR, "Acquire semaphore error, woal_do_combo_scan\n"); + goto done; + } +#endif /* REASSOCIATION */ + priv->report_scan_result = MTRUE; + ret = woal_request_userscan(priv, MOAL_IOCTL_WAIT, scan_cfg); + woal_sched_timeout(5); +#ifdef REASSOCIATION + MOAL_REL_SEMAPHORE(&handle->reassoc_sem); +#endif +done: + woal_role_switch(priv, MOAL_IOCTL_WAIT, MLAN_BSS_ROLE_UAP); + LEAVE(); + return ret; +} #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) @@ -1960,7 +2225,7 @@ woal_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev, #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) struct net_device *dev = request->wdev->netdev; #endif - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); wlan_user_scan_cfg scan_req; mlan_bss_info bss_info; struct ieee80211_channel *chan; @@ -1972,7 +2237,8 @@ woal_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev, PRINTM(MINFO, "Received scan request on %s\n", dev->name); #ifdef UAP_CFG80211 /* return 0 to avoid hostapd failure */ - if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP && (priv->bss_index > 0) + ) { LEAVE(); cfg80211_scan_done(request, MTRUE); return 0; @@ -2029,6 +2295,11 @@ woal_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev, memset(&scan_req, 0x00, sizeof(scan_req)); #ifdef WIFI_DIRECT_SUPPORT + if (priv->phandle->miracast_mode || + woal_is_any_interface_active(priv->phandle)) + scan_req.scan_chan_gap = priv->phandle->scan_chan_gap; + else + scan_req.scan_chan_gap = 0; #endif for (i = 0; i < priv->scan_request->n_ssids; i++) { memcpy(scan_req.ssid_list[i].ssid, @@ -2074,17 +2345,27 @@ woal_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev, #endif #endif #ifdef WIFI_DIRECT_SUPPORT + if (priv->phandle->miracast_mode) + scan_req.chan_list[i].scan_time = + priv->phandle->miracast_scan_time; + else if (woal_is_any_interface_active(priv->phandle)) + scan_req.chan_list[i].scan_time = + MIN_SPECIFIC_SCAN_CHAN_TIME; #endif #ifdef UAP_CFG80211 + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) + scan_req.chan_list[i].scan_time = + MIN_SPECIFIC_SCAN_CHAN_TIME; #endif } if (priv->scan_request->ie && priv->scan_request->ie_len) { if (MLAN_STATUS_SUCCESS != woal_cfg80211_mgmt_frame_ie(priv, NULL, 0, NULL, 0, NULL, 0, - (t_u8 *) priv->scan_request->ie, + (t_u8 *)priv->scan_request->ie, priv->scan_request->ie_len, - MGMT_MASK_PROBE_REQ)) { + MGMT_MASK_PROBE_REQ, + MOAL_IOCTL_WAIT)) { PRINTM(MERROR, "Fail to set scan request IE\n"); ret = -EFAULT; goto done; @@ -2094,9 +2375,21 @@ woal_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev, if (priv->probereq_index != MLAN_CUSTOM_IE_AUTO_IDX_MASK) woal_cfg80211_mgmt_frame_ie(priv, NULL, 0, NULL, 0, NULL, 0, NULL, 0, - MGMT_MASK_PROBE_REQ); + MGMT_MASK_PROBE_REQ, + MOAL_IOCTL_WAIT); } #ifdef UAP_CFG80211 + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + /** use sync scan for uap */ + ret = woal_uap_scan(priv, &scan_req); + if (!ret) { + LEAVE(); + return ret; + } else { + PRINTM(MERROR, "Uap SCAN failure\n"); + goto done; + } + } #endif if (MLAN_STATUS_SUCCESS != woal_do_scan(priv, &scan_req)) { PRINTM(MERROR, "woal_do_scan fails!\n"); @@ -2110,7 +2403,7 @@ woal_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev, priv->scan_request = NULL; spin_unlock_irqrestore(&priv->scan_req_lock, flags); } else - PRINTM(MMSG, "wlan: START SCAN\n"); + PRINTM(MINFO, "wlan: START SCAN\n"); LEAVE(); return ret; } @@ -2129,7 +2422,7 @@ static int woal_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_connect_params *sme) { - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); int ret = 0; mlan_bss_info bss_info; unsigned long flags; @@ -2177,6 +2470,10 @@ woal_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, LEAVE(); return 0; } + + /** cancel pending scan */ + woal_cancel_scan(priv, MOAL_IOCTL_WAIT); + #if defined(WIFI_DIRECT_SUPPORT) #if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT @@ -2203,19 +2500,21 @@ woal_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, } #endif #endif - priv->cfg_connect = MTRUE; if (priv->scan_type == MLAN_SCAN_TYPE_PASSIVE) woal_set_scan_type(priv, MLAN_SCAN_TYPE_ACTIVE); priv->assoc_status = 0; - ret = woal_cfg80211_assoc(priv, (void *)sme); + ret = woal_cfg80211_assoc(priv, (void *)sme, MOAL_IOCTL_WAIT); if (priv->scan_type == MLAN_SCAN_TYPE_PASSIVE) woal_set_scan_type(priv, MLAN_SCAN_TYPE_PASSIVE); if (!ret) { memset(&assoc_rsp, 0, sizeof(mlan_ds_misc_assoc_rsp)); woal_get_assoc_rsp(priv, &assoc_rsp); - passoc_rsp = (IEEEtypes_AssocRsp_t *) assoc_rsp.assoc_resp_buf; + passoc_rsp = (IEEEtypes_AssocRsp_t *)assoc_rsp.assoc_resp_buf; + priv->rssi_low = DEFAULT_RSSI_LOW_THRESHOLD; + if (priv->bss_type == MLAN_BSS_TYPE_STA) + woal_save_conn_params(priv, sme); memset(&bss_info, 0, sizeof(bss_info)); woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); priv->channel = bss_info.bss_chan; @@ -2259,7 +2558,7 @@ static int woal_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev, t_u16 reason_code) { - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); ENTER(); PRINTM(MINFO, "Received disassociation request on %s\n", dev->name); @@ -2284,13 +2583,14 @@ woal_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev, } if (priv->media_connected == MFALSE) { + PRINTM(MMSG, " Already disconnected\n"); LEAVE(); - return -EINVAL; + return 0; } priv->cfg_disconnect = MTRUE; - if (woal_disconnect(priv, MOAL_IOCTL_WAIT, priv->cfg_bssid) != + if (woal_disconnect(priv, MOAL_IOCTL_WAIT_TIMEOUT, priv->cfg_bssid) != MLAN_STATUS_SUCCESS) { priv->cfg_disconnect = MFALSE; LEAVE(); @@ -2302,6 +2602,8 @@ woal_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev, ": Reason code %d\n", MAC2STR(priv->cfg_bssid), reason_code); memset(priv->cfg_bssid, 0, ETH_ALEN); + if (priv->bss_type == MLAN_BSS_TYPE_STA) + woal_clear_conn_params(priv); priv->channel = 0; LEAVE(); @@ -2319,12 +2621,16 @@ woal_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev, * @return 0 -- success, otherwise fail */ static int -woal_cfg80211_get_station(struct wiphy *wiphy, - struct net_device *dev, - t_u8 * mac, struct station_info *sinfo) +woal_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const t_u8 *mac, +#else + t_u8 *mac, +#endif + struct station_info *sinfo) { mlan_status ret = MLAN_STATUS_SUCCESS; - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); ENTER(); @@ -2351,7 +2657,7 @@ woal_cfg80211_get_station(struct wiphy *wiphy, PRINTM(MERROR, "cfg80211: Failed to get station info\n"); ret = -EFAULT; } - + woal_check_auto_tdls(wiphy, dev); LEAVE(); return ret; } @@ -2370,10 +2676,10 @@ woal_cfg80211_get_station(struct wiphy *wiphy, static int woal_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *dev, int idx, - t_u8 * mac, struct station_info *sinfo) + t_u8 *mac, struct station_info *sinfo) { mlan_status ret = MLAN_STATUS_SUCCESS; - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); ENTER(); @@ -2410,10 +2716,15 @@ woal_cfg80211_dump_survey(struct wiphy *wiphy, struct net_device *dev, int idx, struct survey_info *survey) { int ret = -ENOENT; - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); mlan_bss_info bss_info; enum ieee80211_band band; + ChanStatistics_t *pchan_stats = NULL; + mlan_scan_resp scan_resp; + t_u8 index = 0; + int i; + ENTER(); PRINTM(MIOCTL, "dump_survey idx=%d\n", idx); if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) && priv->media_connected @@ -2439,6 +2750,49 @@ woal_cfg80211_dump_survey(struct wiphy *wiphy, struct net_device *dev, survey->noise = bss_info.bcn_nf_last; } ret = 0; + } else { + memset(&scan_resp, 0, sizeof(scan_resp)); + if (MLAN_STATUS_SUCCESS != woal_get_scan_table(priv, + MOAL_IOCTL_WAIT, + &scan_resp)) { + ret = -EFAULT; + goto done; + } + pchan_stats = (ChanStatistics_t *)scan_resp.pchan_stats; + for (i = 0; i < scan_resp.num_in_chan_stats; i++) { + if (pchan_stats[i].cca_scan_duration) { + if (idx == index) { + memset(survey, 0, + sizeof(struct survey_info)); + band = woal_band_cfg_to_ieee_band + (pchan_stats[i].bandconfig); + survey->channel = + ieee80211_get_channel(wiphy, + ieee80211_channel_to_frequency + (pchan_stats + [i]. + chan_num +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) || defined(COMPAT_WIRELESS) + , band +#endif + )); + survey->filled = + SURVEY_INFO_NOISE_DBM | + SURVEY_INFO_CHANNEL_TIME | + SURVEY_INFO_CHANNEL_TIME_BUSY; + survey->noise = pchan_stats[i].noise; + survey->channel_time = + pchan_stats[i]. + cca_scan_duration; + survey->channel_time_busy = + pchan_stats[i]. + cca_busy_duration; + ret = 0; + goto done; + } + index++; + } + } } done: LEAVE(); @@ -2459,7 +2813,7 @@ static int woal_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ibss_params *params) { - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); int ret = 0; ENTER(); @@ -2471,10 +2825,15 @@ woal_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, return -EINVAL; } - ret = woal_cfg80211_assoc(priv, (void *)params); + ret = woal_cfg80211_assoc(priv, (void *)params, MOAL_IOCTL_WAIT); if (!ret) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) + cfg80211_ibss_joined(priv->netdev, priv->cfg_bssid, + params->chandef.chan, GFP_KERNEL); +#else cfg80211_ibss_joined(priv->netdev, priv->cfg_bssid, GFP_KERNEL); +#endif PRINTM(MINFO, "Joined/created adhoc network with bssid" MACSTR " successfully\n", MAC2STR(priv->cfg_bssid)); } else { @@ -2497,7 +2856,7 @@ woal_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, static int woal_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev) { - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); ENTER(); @@ -2544,7 +2903,7 @@ woal_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, bool enabled, int timeout) { int ret = 0, disabled; - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); ENTER(); if (hw_test) { @@ -2606,7 +2965,7 @@ woal_cfg80211_set_tx_power(struct wiphy *wiphy, { int ret = 0; moal_private *priv = NULL; - moal_handle *handle = (moal_handle *) woal_get_wiphy_priv(wiphy); + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); mlan_power_cfg_t power_cfg; ENTER(); @@ -2646,7 +3005,7 @@ woal_cfg80211_set_cqm_rssi_config(struct wiphy *wiphy, struct net_device *dev, s32 rssi_thold, u32 rssi_hyst) { - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); ENTER(); priv->cqm_rssi_thold = rssi_thold; priv->cqm_rssi_hyst = rssi_hyst; @@ -2675,9 +3034,8 @@ woal_cfg80211_set_cqm_rssi_config(struct wiphy *wiphy, * @return 0 -- success, otherwise fail */ int -woal_cfg80211_remain_on_channel_cfg(moal_private * priv, - t_u8 wait_option, t_u8 remove, - t_u8 * status, +woal_cfg80211_remain_on_channel_cfg(moal_private *priv, + t_u8 wait_option, t_u8 remove, t_u8 *status, struct ieee80211_channel *chan, enum nl80211_channel_type channel_type, t_u32 duration) @@ -2703,6 +3061,8 @@ woal_cfg80211_remain_on_channel_cfg(moal_private * priv, } if (chan->band == IEEE80211_BAND_2GHZ) chan_cfg.bandcfg = 0; + else if (chan->band == IEEE80211_BAND_5GHZ) + chan_cfg.bandcfg = 1; switch (channel_type) { case NL80211_CHAN_HT40MINUS: chan_cfg.bandcfg |= SEC_CHANNEL_BELOW; @@ -2760,7 +3120,7 @@ woal_cfg80211_mgmt_tx_cancel_wait(struct wiphy *wiphy, #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) struct net_device *dev = wdev->netdev; #endif - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); int ret = 0; t_u8 status = 1; moal_private *remain_priv = NULL; @@ -2860,11 +3220,10 @@ woal_cfg80211_remain_on_channel(struct wiphy *wiphy, #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) struct net_device *dev = wdev->netdev; #endif - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); int ret = 0; t_u8 status = 1; moal_private *remain_priv = NULL; - unsigned int max_duration = 0; ENTER(); @@ -2874,7 +3233,9 @@ woal_cfg80211_remain_on_channel(struct wiphy *wiphy, goto done; } /** cancel previous remain on channel */ - if (priv->phandle->remain_on_channel) { + if (priv->phandle->remain_on_channel && + ((priv->phandle->chan.center_freq != chan->center_freq) + )) { remain_priv = priv->phandle->priv[priv->phandle->remain_bss_index]; if (!remain_priv) { @@ -2895,13 +3256,6 @@ woal_cfg80211_remain_on_channel(struct wiphy *wiphy, priv->phandle->cookie = 0; priv->phandle->remain_on_channel = MFALSE; } -#define MAX_REMAIN_CHANNEL_TIME 1000 - if (duration > MAX_REMAIN_CHANNEL_TIME) { - priv->phandle->is_remain_timer_set = MTRUE; - woal_mod_timer(&priv->phandle->remain_timer, duration); - max_duration = MAX_REMAIN_CHANNEL_TIME; - } else - max_duration = duration; if (MLAN_STATUS_SUCCESS != woal_cfg80211_remain_on_channel_cfg(priv, MOAL_IOCTL_WAIT, MFALSE, &status, chan, @@ -2910,7 +3264,7 @@ woal_cfg80211_remain_on_channel(struct wiphy *wiphy, #else 0, #endif - (t_u32) max_duration)) { + (t_u32)duration)) { ret = -EFAULT; goto done; } @@ -2997,7 +3351,7 @@ woal_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy, #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) struct net_device *dev = wdev->netdev; #endif - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); moal_private *remain_priv = NULL; int ret = 0; t_u8 status = 1; @@ -3048,7 +3402,7 @@ woal_cfg80211_sched_scan_start(struct wiphy *wiphy, struct ieee80211_channel *chan = NULL; int i = 0; int ret = 0; - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); struct cfg80211_ssid *ssid = NULL; ENTER(); #ifdef UAP_CFG80211 @@ -3092,17 +3446,23 @@ woal_cfg80211_sched_scan_start(struct wiphy *wiphy, MLAN_SCAN_TYPE_ACTIVE; priv->scan_cfg.chan_list[i].scan_time = 0; #ifdef WIFI_DIRECT_SUPPORT + if (priv->phandle->miracast_mode) + priv->scan_cfg.chan_list[i].scan_time = + priv->phandle->miracast_scan_time; #endif } + priv->scan_cfg.chan_per_scan = + MIN(WLAN_BG_SCAN_CHAN_MAX, request->n_channels); /** set scan request IES */ if (request->ie && request->ie_len) { if (MLAN_STATUS_SUCCESS != woal_cfg80211_mgmt_frame_ie(priv, NULL, 0, NULL, 0, NULL, 0, - (t_u8 *) request->ie, + (t_u8 *)request->ie, request->ie_len, - MGMT_MASK_PROBE_REQ)) { + MGMT_MASK_PROBE_REQ, + MOAL_IOCTL_WAIT)) { PRINTM(MERROR, "Fail to set sched scan IE\n"); ret = -EFAULT; goto done; @@ -3112,7 +3472,8 @@ woal_cfg80211_sched_scan_start(struct wiphy *wiphy, if (priv->probereq_index != MLAN_CUSTOM_IE_AUTO_IDX_MASK) woal_cfg80211_mgmt_frame_ie(priv, NULL, 0, NULL, 0, NULL, 0, NULL, 0, - MGMT_MASK_PROBE_REQ); + MGMT_MASK_PROBE_REQ, + MOAL_IOCTL_WAIT); } /* Interval between scan cycles in milliseconds,supplicant set to 10 @@ -3123,11 +3484,16 @@ woal_cfg80211_sched_scan_start(struct wiphy *wiphy, priv->scan_cfg.scan_interval = request->interval; priv->scan_cfg.repeat_count = DEF_REPEAT_COUNT; - priv->scan_cfg.report_condition = BG_SCAN_SSID_MATCH; + priv->scan_cfg.report_condition = + BG_SCAN_SSID_MATCH | BG_SCAN_WAIT_ALL_CHAN_DONE; priv->scan_cfg.bss_type = MLAN_BSS_MODE_INFRA; priv->scan_cfg.action = BG_SCAN_ACT_SET; priv->scan_cfg.enable = MTRUE; #ifdef WIFI_DIRECT_SUPPORT + if (priv->phandle->miracast_mode) + priv->scan_cfg.scan_chan_gap = priv->phandle->scan_chan_gap; + else + priv->scan_cfg.scan_chan_gap = 0; #endif if (MLAN_STATUS_SUCCESS == @@ -3153,7 +3519,7 @@ woal_cfg80211_sched_scan_start(struct wiphy *wiphy, int woal_cfg80211_sched_scan_stop(struct wiphy *wiphy, struct net_device *dev) { - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); ENTER(); PRINTM(MIOCTL, "sched scan stop\n"); priv->sched_scanning = MFALSE; @@ -3176,7 +3542,7 @@ woal_cfg80211_sched_scan_stop(struct wiphy *wiphy, struct net_device *dev) int woal_cfg80211_resume(struct wiphy *wiphy) { - moal_handle *handle = (moal_handle *) woal_get_wiphy_priv(wiphy); + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); int i; for (i = 0; i < MIN(handle->priv_num, MLAN_MAX_BSS_NUM); i++) { if (handle->priv[i] && @@ -3210,7 +3576,7 @@ woal_cfg80211_resume(struct wiphy *wiphy) int woal_cfg80211_suspend(struct wiphy *wiphy, struct cfg80211_wowlan *wow) { - moal_handle *handle = (moal_handle *) woal_get_wiphy_priv(wiphy); + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); int i; for (i = 0; i < MIN(handle->priv_num, MLAN_MAX_BSS_NUM); i++) { if (handle->priv[i] && @@ -3240,7 +3606,7 @@ woal_cfg80211_suspend(struct wiphy *wiphy, struct cfg80211_wowlan *wow) * @return 0 --success, otherwise fail */ static int -woal_tdls_oper(moal_private * priv, u8 * peer, t_u8 action) +woal_tdls_oper(moal_private *priv, u8 *peer, t_u8 action) { mlan_ioctl_req *ioctl_req = NULL; mlan_ds_misc_cfg *misc = NULL; @@ -3254,7 +3620,7 @@ woal_tdls_oper(moal_private * priv, u8 * peer, t_u8 action) ret = -ENOMEM; goto done; } - misc = (mlan_ds_misc_cfg *) ioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; misc->sub_command = MLAN_OID_MISC_TDLS_OPER; ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; ioctl_req->action = MLAN_ACT_SET; @@ -3283,8 +3649,8 @@ woal_tdls_oper(moal_private * priv, u8 * peer, t_u8 action) * @return 0 --success, otherwise fail */ static int -woal_tdls_get_ies(moal_private * priv, u8 * peer, - mlan_ds_misc_tdls_ies * tdls_ies, t_u16 flags) +woal_tdls_get_ies(moal_private *priv, u8 *peer, mlan_ds_misc_tdls_ies *tdls_ies, + t_u16 flags) { mlan_ioctl_req *ioctl_req = NULL; mlan_ds_misc_cfg *misc = NULL; @@ -3298,7 +3664,7 @@ woal_tdls_get_ies(moal_private * priv, u8 * peer, ret = -ENOMEM; goto done; } - misc = (mlan_ds_misc_cfg *) ioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; misc->sub_command = MLAN_OID_MISC_GET_TDLS_IES; ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; ioctl_req->action = MLAN_ACT_GET; @@ -3327,7 +3693,7 @@ woal_tdls_get_ies(moal_private * priv, u8 * peer, * @return N/A */ static void -woal_tdls_add_ext_capab(struct sk_buff *skb, mlan_ds_misc_tdls_ies * tdls_ies) +woal_tdls_add_ext_capab(struct sk_buff *skb, mlan_ds_misc_tdls_ies *tdls_ies) { u8 *pos = NULL; if (tdls_ies->ext_cap[0] == WLAN_EID_EXT_CAPABILITY) { @@ -3338,23 +3704,6 @@ woal_tdls_add_ext_capab(struct sk_buff *skb, mlan_ds_misc_tdls_ies * tdls_ies) } } -/** - * @brief append tdls Qos capability info - * - * @param skb A pointer to sk_buff structure - * - * @return N/A - */ -static void -woal_tdls_add_Qos_capab(struct sk_buff *skb) -{ - u8 *pos = (void *)skb_put(skb, 3); - - *pos++ = WLAN_EID_QOS_CAPA; - *pos++ = 1; /* len */ - *pos++ = 0x0f; -} - /** * @brief append supported rates * @@ -3365,12 +3714,17 @@ woal_tdls_add_Qos_capab(struct sk_buff *skb) * @return N/A */ static void -woal_add_supported_rates_ie(moal_private * priv, struct sk_buff *skb, +woal_add_supported_rates_ie(moal_private *priv, struct sk_buff *skb, enum ieee80211_band band) { - t_u8 basic_rates[] = { 0x82, 0x84, 0x8b, 0x96, 0xc, 0x12, 0x18, 0x24 }; - t_u8 basic_rates_5G[] = - { 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6c }; + t_u8 basic_rates[] = { + 0x82, 0x84, 0x8b, 0x96, + 0x0c, 0x12, 0x18, 0x24 + }; + t_u8 basic_rates_5G[] = { + 0x0c, 0x12, 0x18, 0x24, + 0x30, 0x48, 0x60, 0x6c + }; t_u8 *pos; t_u8 rate_num = 0; if (band == IEEE80211_BAND_2GHZ) @@ -3401,7 +3755,7 @@ woal_add_supported_rates_ie(moal_private * priv, struct sk_buff *skb, * @return N/A */ static void -woal_add_ext_supported_rates_ie(moal_private * priv, struct sk_buff *skb, +woal_add_ext_supported_rates_ie(moal_private *priv, struct sk_buff *skb, enum ieee80211_band band) { t_u8 ext_rates[] = { 0x0c, 0x12, 0x18, 0x60 }; @@ -3421,6 +3775,161 @@ woal_add_ext_supported_rates_ie(moal_private * priv, struct sk_buff *skb, return; } +/** + * @brief update tdls peer status + * + * @param priv A pointer to moal_private structure + * @param peer_addr A point to peer mac address + * @param link_status link status + * + * @return N/A +*/ +t_void +woal_updata_peer_status(moal_private *priv, t_u8 *peer_addr, + tdlsStatus_e link_status) +{ + struct tdls_peer *peer = NULL; + unsigned long flags; + if (priv && priv->enable_auto_tdls) { + spin_lock_irqsave(&priv->tdls_lock, flags); + list_for_each_entry(peer, &priv->tdls_list, link) { + if (!memcmp(peer->peer_addr, peer_addr, ETH_ALEN)) { + if ((link_status == TDLS_NOT_SETUP) && + (peer->link_status == + TDLS_SETUP_INPROGRESS)) + peer->num_failure++; + else if (link_status == TDLS_SETUP_COMPLETE) + peer->num_failure = 0; + peer->link_status = link_status; + break; + } + } + spin_unlock_irqrestore(&priv->tdls_lock, flags); + } +} + +/** + * @brief add tdls peer + * + * @param priv A pointer to moal_private structure + * @param peer A point to peer address + * + * @return N/A +*/ +t_void +woal_add_tdls_peer(moal_private *priv, t_u8 *peer) +{ + struct tdls_peer *tdls_peer = NULL; + unsigned long flags; + t_u8 find_peer = MFALSE; + if (priv && priv->enable_auto_tdls) { + spin_lock_irqsave(&priv->tdls_lock, flags); + list_for_each_entry(tdls_peer, &priv->tdls_list, link) { + if (!memcmp(tdls_peer->peer_addr, peer, ETH_ALEN)) { + tdls_peer->link_status = TDLS_SETUP_INPROGRESS; + tdls_peer->rssi_jiffies = jiffies; + find_peer = MTRUE; + break; + } + } + if (!find_peer) { + /* create new TDLS peer */ + tdls_peer = + kzalloc(sizeof(struct tdls_peer), GFP_ATOMIC); + if (tdls_peer) { + memcpy(tdls_peer->peer_addr, peer, ETH_ALEN); + tdls_peer->link_status = TDLS_SETUP_INPROGRESS; + tdls_peer->rssi_jiffies = jiffies; + INIT_LIST_HEAD(&tdls_peer->link); + list_add_tail(&tdls_peer->link, + &priv->tdls_list); + PRINTM(MCMND, + "Add to TDLS list: peer=" MACSTR "\n", + MAC2STR(peer)); + } + } + spin_unlock_irqrestore(&priv->tdls_lock, flags); + } +} + +/** + * @brief check auto tdls + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * + * @return N/A +*/ +void +woal_check_auto_tdls(struct wiphy *wiphy, struct net_device *dev) +{ + t_u8 bcast_addr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + struct tdls_peer *tdls_peer = NULL; + unsigned long flags; + t_u8 tdls_discovery = MFALSE; + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + + ENTER(); + if (priv && priv->enable_auto_tdls) { + priv->tdls_check_tx = MFALSE; + spin_lock_irqsave(&priv->tdls_lock, flags); + list_for_each_entry(tdls_peer, &priv->tdls_list, link) { + if ((jiffies - tdls_peer->rssi_jiffies) > + TDLS_IDLE_TIME) { + tdls_peer->rssi = 0; + if (tdls_peer->num_failure < + TDLS_MAX_FAILURE_COUNT) + tdls_discovery = MTRUE; + } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) + if (tdls_peer->rssi && + (tdls_peer->rssi >= TDLS_RSSI_LOW_THRESHOLD)) { + if (tdls_peer->link_status == + TDLS_SETUP_COMPLETE) { + tdls_peer->link_status = TDLS_TEAR_DOWN; + PRINTM(MMSG, + "Wlan: Tear down TDLS link, peer=" + MACSTR " rssi=%d\n", + MAC2STR(tdls_peer->peer_addr), + -tdls_peer->rssi); + cfg80211_tdls_oper_request(dev, + tdls_peer-> + peer_addr, + NL80211_TDLS_TEARDOWN, + TDLS_TEARN_DOWN_REASON_UNSPECIFIC, + GFP_ATOMIC); + } + } else if (tdls_peer->rssi && + (tdls_peer->rssi <= + TDLS_RSSI_HIGH_THRESHOLD)) { + if ((tdls_peer->link_status == TDLS_NOT_SETUP) + && (tdls_peer->num_failure < + TDLS_MAX_FAILURE_COUNT)) { + priv->tdls_check_tx = MTRUE; + PRINTM(MCMND, + "Wlan: Find TDLS peer=" MACSTR + " rssi=%d\n", + MAC2STR(tdls_peer->peer_addr), + -tdls_peer->rssi); + + } + } +#endif + } + spin_unlock_irqrestore(&priv->tdls_lock, flags); + } + if (tdls_discovery) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) + woal_cfg80211_tdls_mgmt(wiphy, dev, bcast_addr, + TDLS_DISCOVERY_REQUEST, 1, 0, 0, NULL, + 0); +#else + woal_cfg80211_tdls_mgmt(wiphy, dev, bcast_addr, + TDLS_DISCOVERY_REQUEST, 1, 0, NULL, 0); +#endif + LEAVE(); +} + /** * @brief woal construct tdls data frame * @@ -3434,8 +3943,8 @@ woal_add_ext_supported_rates_ie(moal_private * priv, struct sk_buff *skb, * @return 0 -- success, otherwise fail */ static int -woal_construct_tdls_data_frame(moal_private * priv, - t_u8 * peer, t_u8 action_code, t_u8 dialog_token, +woal_construct_tdls_data_frame(moal_private *priv, + t_u8 *peer, t_u8 action_code, t_u8 dialog_token, t_u16 status_code, struct sk_buff *skb) { @@ -3460,7 +3969,7 @@ woal_construct_tdls_data_frame(moal_private * priv, return -EFAULT; } band = woal_band_cfg_to_ieee_band(bss_info.bss_band); - tdls_ies = kmalloc(sizeof(mlan_ds_misc_tdls_ies), GFP_KERNEL); + tdls_ies = kzalloc(sizeof(mlan_ds_misc_tdls_ies), GFP_KERNEL); if (!tdls_ies) { PRINTM(MERROR, "Fail to alloc memory for tdls_ies\n"); LEAVE(); @@ -3476,13 +3985,13 @@ woal_construct_tdls_data_frame(moal_private * priv, memcpy(tf->sa, priv->current_addr, ETH_ALEN); tf->ether_type = cpu_to_be16(MLAN_ETHER_PKT_TYPE_TDLS_ACTION); tf->payload_type = WLAN_TDLS_SNAP_RFTYPE; - memset(tdls_ies, 0, sizeof(mlan_ds_misc_tdls_ies)); woal_request_get_fw_info(priv, MOAL_IOCTL_WAIT, &fw_info); switch (action_code) { case WLAN_TDLS_SETUP_REQUEST: woal_tdls_get_ies(priv, peer, tdls_ies, - TDLS_IE_FLAGS_EXTCAP | TDLS_IE_FLAGS_HTCAP); + TDLS_IE_FLAGS_EXTCAP | TDLS_IE_FLAGS_HTCAP | + TDLS_IE_FLAGS_SUPP_CS_IE); tf->category = WLAN_CATEGORY_TDLS; tf->action_code = WLAN_TDLS_SETUP_REQUEST; @@ -3491,12 +4000,11 @@ woal_construct_tdls_data_frame(moal_private * priv, tf->u.setup_req.capability = cpu_to_le16(capability); woal_add_supported_rates_ie(priv, skb, band); woal_add_ext_supported_rates_ie(priv, skb, band); - woal_tdls_add_ext_capab(skb, tdls_ies); - woal_tdls_add_Qos_capab(skb); break; case WLAN_TDLS_SETUP_RESPONSE: woal_tdls_get_ies(priv, peer, tdls_ies, - TDLS_IE_FLAGS_EXTCAP | TDLS_IE_FLAGS_HTCAP); + TDLS_IE_FLAGS_EXTCAP | TDLS_IE_FLAGS_HTCAP | + TDLS_IE_FLAGS_SUPP_CS_IE); tf->category = WLAN_CATEGORY_TDLS; tf->action_code = WLAN_TDLS_SETUP_RESPONSE; @@ -3508,11 +4016,10 @@ woal_construct_tdls_data_frame(moal_private * priv, woal_add_supported_rates_ie(priv, skb, band); woal_add_ext_supported_rates_ie(priv, skb, band); - woal_tdls_add_ext_capab(skb, tdls_ies); - woal_tdls_add_Qos_capab(skb); break; case WLAN_TDLS_SETUP_CONFIRM: - woal_tdls_get_ies(priv, peer, tdls_ies, TDLS_IE_FLAGS_HTINFO); + woal_tdls_get_ies(priv, peer, tdls_ies, + TDLS_IE_FLAGS_EXTCAP | TDLS_IE_FLAGS_HTINFO); tf->category = WLAN_CATEGORY_TDLS; tf->action_code = WLAN_TDLS_SETUP_CONFIRM; @@ -3520,6 +4027,7 @@ woal_construct_tdls_data_frame(moal_private * priv, skb_put(skb, sizeof(tf->u.setup_cfm)); tf->u.setup_cfm.status_code = cpu_to_le16(status_code); tf->u.setup_cfm.dialog_token = dialog_token; + break; case WLAN_TDLS_TEARDOWN: tf->category = WLAN_CATEGORY_TDLS; @@ -3540,7 +4048,12 @@ woal_construct_tdls_data_frame(moal_private * priv, goto done; } - // TODO we should fill in ht_cap and htinfo with correct value + if (action_code == WLAN_TDLS_SETUP_REQUEST || + action_code == WLAN_TDLS_SETUP_RESPONSE) { + woal_tdls_add_ext_capab(skb, tdls_ies); + } + + /* TODO we should fill in ht_cap and htinfo with correct value */ switch (action_code) { case WLAN_TDLS_SETUP_REQUEST: case WLAN_TDLS_SETUP_RESPONSE: @@ -3580,8 +4093,7 @@ woal_construct_tdls_data_frame(moal_private * priv, } done: - if (tdls_ies) - kfree(tdls_ies); + kfree(tdls_ies); return ret; } @@ -3598,8 +4110,8 @@ woal_construct_tdls_data_frame(moal_private * priv, * @return 0 -- success, otherwise fail */ static int -woal_construct_tdls_action_frame(moal_private * priv, - t_u8 * peer, t_u8 action_code, +woal_construct_tdls_action_frame(moal_private *priv, + t_u8 *peer, t_u8 action_code, t_u8 dialog_token, t_u16 status_code, struct sk_buff *skb) { @@ -3624,7 +4136,7 @@ woal_construct_tdls_action_frame(moal_private * priv, } band = woal_band_cfg_to_ieee_band(bss_info.bss_band); - tdls_ies = kmalloc(sizeof(mlan_ds_misc_tdls_ies), GFP_KERNEL); + tdls_ies = kzalloc(sizeof(mlan_ds_misc_tdls_ies), GFP_KERNEL); if (!tdls_ies) { PRINTM(MERROR, "Fail to alloc memory for tdls_ies\n"); LEAVE(); @@ -3647,8 +4159,6 @@ woal_construct_tdls_action_frame(moal_private * priv, else capability = 0; - memset(tdls_ies, 0, sizeof(mlan_ds_misc_tdls_ies)); - switch (action_code) { case WLAN_PUB_ACTION_TDLS_DISCOVER_RES: woal_tdls_get_ies(priv, peer, tdls_ies, TDLS_IE_FLAGS_EXTCAP); @@ -3689,7 +4199,7 @@ woal_construct_tdls_action_frame(moal_private * priv, * @return NA */ static void -woal_tdls_add_link_ie(struct sk_buff *skb, u8 * src_addr, u8 * peer, u8 * bssid) +woal_tdls_add_link_ie(struct sk_buff *skb, u8 *src_addr, u8 *peer, u8 *bssid) { struct ieee80211_tdls_lnkie *lnkid; @@ -3718,11 +4228,11 @@ woal_tdls_add_link_ie(struct sk_buff *skb, u8 * src_addr, u8 * peer, u8 * bssid) */ static int woal_send_tdls_action_frame(struct wiphy *wiphy, struct net_device *dev, - t_u8 * peer, u8 action_code, t_u8 dialog_token, - t_u16 status_code, const t_u8 * extra_ies, + t_u8 *peer, u8 action_code, t_u8 dialog_token, + t_u16 status_code, const t_u8 *extra_ies, size_t extra_ies_len) { - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); pmlan_buffer pmbuf = NULL; mlan_status status = MLAN_STATUS_SUCCESS; struct sk_buff *skb = NULL; @@ -3829,11 +4339,11 @@ woal_send_tdls_action_frame(struct wiphy *wiphy, struct net_device *dev, */ static int woal_send_tdls_data_frame(struct wiphy *wiphy, struct net_device *dev, - t_u8 * peer, u8 action_code, t_u8 dialog_token, - t_u16 status_code, const t_u8 * extra_ies, + t_u8 *peer, u8 action_code, t_u8 dialog_token, + t_u16 status_code, const t_u8 *extra_ies, size_t extra_ies_len) { - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); pmlan_buffer pmbuf = NULL; mlan_status status = MLAN_STATUS_SUCCESS; struct sk_buff *skb = NULL; @@ -3849,6 +4359,7 @@ woal_send_tdls_data_frame(struct wiphy *wiphy, struct net_device *dev, */ sizeof(IEEEtypes_ExtCap_t) + /* ext capab */ 3 + /* Qos Info */ + sizeof(IEEEtypes_WmmParameter_t) + /* wmm ie */ sizeof(IEEEtypes_HTCap_t) + sizeof(IEEEtypes_2040BSSCo_t) + sizeof(IEEEtypes_HTInfo_t) + extra_ies_len + @@ -3903,8 +4414,8 @@ woal_send_tdls_data_frame(struct wiphy *wiphy, struct net_device *dev, break; } - pmbuf = (mlan_buffer *) skb->head; - memset((t_u8 *) pmbuf, 0, sizeof(mlan_buffer)); + pmbuf = (mlan_buffer *)skb->head; + memset((t_u8 *)pmbuf, 0, sizeof(mlan_buffer)); pmbuf->bss_index = priv->bss_index; pmbuf->pdesc = skb; pmbuf->pbuf = skb->head + sizeof(mlan_buffer); @@ -3952,6 +4463,33 @@ woal_send_tdls_data_frame(struct wiphy *wiphy, struct net_device *dev, return ret; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) +/** + * @brief Tx TDLS packet + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param peer A pointer to peer mac + * @param action_code tdls action code + * @param dialog_token dialog_token + * @param status_code status_code + * @param peer_capability peer capability + * @param extra_ie A pointer to extra ie buffer + * @param extra_ie_len etra ie len + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const t_u8 *peer, +#else + t_u8 *peer, +#endif + u8 action_code, t_u8 dialog_token, + t_u16 status_code, t_u32 peer_capability, + const t_u8 *extra_ies, size_t extra_ies_len) +#else /** * @brief Tx TDLS packet * @@ -3968,11 +4506,12 @@ woal_send_tdls_data_frame(struct wiphy *wiphy, struct net_device *dev, */ int woal_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev, - t_u8 * peer, u8 action_code, t_u8 dialog_token, - t_u16 status_code, const t_u8 * extra_ies, + t_u8 *peer, u8 action_code, t_u8 dialog_token, + t_u16 status_code, const t_u8 *extra_ies, size_t extra_ies_len) +#endif { - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); int ret = 0; ENTER(); @@ -3985,51 +4524,58 @@ woal_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev, switch (action_code) { case TDLS_SETUP_REQUEST: + woal_add_tdls_peer(priv, (t_u8 *)peer); PRINTM(MMSG, "wlan: Send TDLS Setup Request to " MACSTR " status_code=%d\n", MAC2STR(peer), status_code); - ret = woal_send_tdls_data_frame(wiphy, dev, peer, action_code, - dialog_token, status_code, - extra_ies, extra_ies_len); + ret = woal_send_tdls_data_frame(wiphy, dev, (t_u8 *)peer, + action_code, dialog_token, + status_code, extra_ies, + extra_ies_len); break; case TDLS_SETUP_RESPONSE: PRINTM(MMSG, "wlan: Send TDLS Setup Response to " MACSTR " status_code=%d\n", MAC2STR(peer), status_code); - ret = woal_send_tdls_data_frame(wiphy, dev, peer, action_code, - dialog_token, status_code, - extra_ies, extra_ies_len); + ret = woal_send_tdls_data_frame(wiphy, dev, (t_u8 *)peer, + action_code, dialog_token, + status_code, extra_ies, + extra_ies_len); break; case TDLS_SETUP_CONFIRM: PRINTM(MMSG, "wlan: Send TDLS Confirm to " MACSTR " status_code=%d\n", MAC2STR(peer), status_code); - ret = woal_send_tdls_data_frame(wiphy, dev, peer, action_code, - dialog_token, status_code, - extra_ies, extra_ies_len); + ret = woal_send_tdls_data_frame(wiphy, dev, (t_u8 *)peer, + action_code, dialog_token, + status_code, extra_ies, + extra_ies_len); break; case TDLS_TEARDOWN: PRINTM(MMSG, "wlan: Send TDLS Tear down to " MACSTR "\n", MAC2STR(peer)); - ret = woal_send_tdls_data_frame(wiphy, dev, peer, action_code, - dialog_token, status_code, - extra_ies, extra_ies_len); + ret = woal_send_tdls_data_frame(wiphy, dev, (t_u8 *)peer, + action_code, dialog_token, + status_code, extra_ies, + extra_ies_len); break; case TDLS_DISCOVERY_REQUEST: PRINTM(MMSG, "wlan: Send TDLS Discovery Request to " MACSTR "\n", MAC2STR(peer)); - ret = woal_send_tdls_data_frame(wiphy, dev, peer, action_code, - dialog_token, status_code, - extra_ies, extra_ies_len); + ret = woal_send_tdls_data_frame(wiphy, dev, (t_u8 *)peer, + action_code, dialog_token, + status_code, extra_ies, + extra_ies_len); break; case TDLS_DISCOVERY_RESPONSE: PRINTM(MMSG, "wlan: Send TDLS Discovery Response to " MACSTR "\n", MAC2STR(peer)); - ret = woal_send_tdls_action_frame(wiphy, dev, peer, action_code, - dialog_token, status_code, - extra_ies, extra_ies_len); + ret = woal_send_tdls_action_frame(wiphy, dev, (t_u8 *)peer, + action_code, dialog_token, + status_code, extra_ies, + extra_ies_len); break; default: break; @@ -4052,9 +4598,14 @@ woal_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev, */ int woal_cfg80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, - u8 * peer, enum nl80211_tdls_operation oper) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *peer, +#else + u8 *peer, +#endif + enum nl80211_tdls_operation oper) { - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); t_u8 action; int ret = 0; t_u8 event_buf[32]; @@ -4075,6 +4626,8 @@ woal_cfg80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, oper); switch (oper) { case NL80211_TDLS_ENABLE_LINK: + woal_updata_peer_status(priv, (t_u8 *)peer, + TDLS_SETUP_COMPLETE); PRINTM(MMSG, "wlan: TDLS_ENABLE_LINK: peer=" MACSTR "\n", MAC2STR(peer)); action = WLAN_TDLS_ENABLE_LINK; @@ -4085,6 +4638,7 @@ woal_cfg80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, woal_broadcast_event(priv, event_buf, custom_len + ETH_ALEN); break; case NL80211_TDLS_DISABLE_LINK: + woal_updata_peer_status(priv, (t_u8 *)peer, TDLS_NOT_SETUP); PRINTM(MMSG, "wlan: TDLS_DISABLE_LINK: peer=" MACSTR "\n", MAC2STR(peer)); action = WLAN_TDLS_DISABLE_LINK; @@ -4102,7 +4656,7 @@ woal_cfg80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, default: return -ENOTSUPP; } - ret = woal_tdls_oper(priv, peer, action); + ret = woal_tdls_oper(priv, (u8 *)peer, action); LEAVE(); @@ -4121,9 +4675,14 @@ woal_cfg80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, */ static int woal_cfg80211_add_station(struct wiphy *wiphy, struct net_device *dev, - u8 * mac, struct station_parameters *params) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *mac, +#else + u8 *mac, +#endif + struct station_parameters *params) { - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); int ret = 0; ENTER(); if (!(params->sta_flags_set & MBIT(NL80211_STA_FLAG_TDLS_PEER))) @@ -4136,7 +4695,7 @@ woal_cfg80211_add_station(struct wiphy *wiphy, struct net_device *dev, } PRINTM(MMSG, "wlan: TDLS add peer station, address =" MACSTR "\n", MAC2STR(mac)); - ret = woal_tdls_oper(priv, mac, WLAN_TDLS_CREATE_LINK); + ret = woal_tdls_oper(priv, (u8 *)mac, WLAN_TDLS_CREATE_LINK); done: return ret; } @@ -4147,15 +4706,20 @@ woal_cfg80211_add_station(struct wiphy *wiphy, struct net_device *dev, * @param wiphy A pointer to wiphy structure * @param dev A pointer to net_device structure * @param mac A pointer to peer mac - * @param params station parameters + * @param params station parameters * - * @return 0 -- success, otherwise fail + * @return 0 -- success, otherwise fail */ static int woal_cfg80211_change_station(struct wiphy *wiphy, struct net_device *dev, - u8 * mac, struct station_parameters *params) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *mac, +#else + u8 *mac, +#endif + struct station_parameters *params) { - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); mlan_ioctl_req *ioctl_req = NULL; mlan_ds_misc_cfg *misc = NULL; int ret = 0; @@ -4179,7 +4743,7 @@ woal_cfg80211_change_station(struct wiphy *wiphy, struct net_device *dev, goto done; } - misc = (mlan_ds_misc_cfg *) ioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; misc->sub_command = MLAN_OID_MISC_TDLS_OPER; ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; ioctl_req->action = MLAN_ACT_SET; @@ -4192,16 +4756,17 @@ woal_cfg80211_change_station(struct wiphy *wiphy, struct net_device *dev, params->uapsd_queues | (params->max_sp << 5); if (params->supported_rates) { - misc->param.tdls_oper.supported_rates = params->supported_rates; + misc->param.tdls_oper.supported_rates = + (t_u8 *)params->supported_rates; misc->param.tdls_oper.supported_rates_len = params->supported_rates_len; } if (params->ht_capa) - misc->param.tdls_oper.ht_capa = (t_u8 *) params->ht_capa; + misc->param.tdls_oper.ht_capa = (t_u8 *)params->ht_capa; #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0) if (params->ext_capab) { - misc->param.tdls_oper.ext_capab = params->ext_capab; + misc->param.tdls_oper.ext_capab = (t_u8 *)params->ext_capab; misc->param.tdls_oper.ext_capab_len = params->ext_capab_len; } #endif @@ -4220,6 +4785,163 @@ woal_cfg80211_change_station(struct wiphy *wiphy, struct net_device *dev, } #endif +/** + * @brief Save connect parameters for roaming + * + * @param priv A pointer to moal_private + * @param sme A pointer to cfg80211_connect_params structure + */ +void +woal_save_conn_params(moal_private *priv, struct cfg80211_connect_params *sme) +{ + ENTER(); + woal_clear_conn_params(priv); + memcpy(&priv->sme_current, sme, sizeof(struct cfg80211_connect_params)); + if (sme->channel) { + priv->sme_current.channel = &priv->conn_chan; + memcpy(priv->sme_current.channel, sme->channel, + sizeof(struct ieee80211_channel)); + } + if (sme->bssid) { + priv->sme_current.bssid = priv->conn_bssid; + memcpy((void *)priv->sme_current.bssid, sme->bssid, + MLAN_MAC_ADDR_LENGTH); + } + if (sme->ssid && sme->ssid_len) { + priv->sme_current.ssid = priv->conn_ssid; + memset(priv->conn_ssid, 0, MLAN_MAX_SSID_LENGTH); + memcpy((void *)priv->sme_current.ssid, sme->ssid, + sme->ssid_len); + } + if (sme->ie && sme->ie_len) { + priv->sme_current.ie = kzalloc(sme->ie_len, GFP_KERNEL); + memcpy((void *)priv->sme_current.ie, sme->ie, sme->ie_len); + } + if (sme->key && sme->key_len && (sme->key_len <= MAX_WEP_KEY_SIZE)) { + priv->sme_current.key = priv->conn_wep_key; + memcpy((t_u8 *)priv->sme_current.key, sme->key, sme->key_len); + } +} + +/** + * @brief clear connect parameters for ing + * + * @param priv A pointer to moal_private + */ +void +woal_clear_conn_params(moal_private *priv) +{ + ENTER(); + if (priv->sme_current.ie_len) + kfree(priv->sme_current.ie); + memset(&priv->sme_current, 0, sizeof(struct cfg80211_connect_params)); + priv->roaming_required = MFALSE; + LEAVE(); +} + +/** + * @brief Start roaming: driver handle roaming + * + * @param priv A pointer to moal_private structure + * + * @return N/A + */ +void +woal_start_roaming(moal_private *priv) +{ + mlan_ds_get_signal signal; + mlan_ssid_bssid ssid_bssid; + char rssi_low[10]; + int ret = 0; + mlan_ds_misc_assoc_rsp assoc_rsp; + IEEEtypes_AssocRsp_t *passoc_rsp = NULL; + + ENTER(); + if (priv->last_event & EVENT_BG_SCAN_REPORT) { + woal_inform_bss_from_scan_result(priv, NULL, MOAL_CMD_WAIT); + PRINTM(MIOCTL, "Report bgscan result\n"); + } + if (priv->media_connected == MFALSE || !priv->sme_current.ssid_len) { + PRINTM(MIOCTL, "Not connected, ignore roaming\n"); + LEAVE(); + return; + } + + /* Get signal information from the firmware */ + memset(&signal, 0, sizeof(mlan_ds_get_signal)); + if (MLAN_STATUS_SUCCESS != + woal_get_signal_info(priv, MOAL_CMD_WAIT, &signal)) { + PRINTM(MERROR, "Error getting signal information\n"); + ret = -EFAULT; + goto done; + } + memset(&ssid_bssid, 0, sizeof(mlan_ssid_bssid)); + ssid_bssid.ssid.ssid_len = priv->sme_current.ssid_len; + memcpy(ssid_bssid.ssid.ssid, priv->sme_current.ssid, + priv->sme_current.ssid_len); + if (MLAN_STATUS_SUCCESS != + woal_find_best_network(priv, MOAL_CMD_WAIT, &ssid_bssid)) { + PRINTM(MIOCTL, "Can not find better network\n"); + ret = -EFAULT; + goto done; + } + /* check if we found different AP */ + if (!memcmp(&ssid_bssid.bssid, priv->cfg_bssid, MLAN_MAC_ADDR_LENGTH)) { + PRINTM(MIOCTL, "This is the same AP, no roaming\n"); + ret = -EFAULT; + goto done; + } + PRINTM(MIOCTL, "Find AP: bssid=" MACSTR ", signal=%d\n", + MAC2STR(ssid_bssid.bssid), ssid_bssid.rssi); + /* check signal */ + if (!(priv->last_event & EVENT_PRE_BCN_LOST)) { + if ((abs(signal.bcn_rssi_avg) - abs(ssid_bssid.rssi)) < + DELTA_RSSI) { + PRINTM(MERROR, "New AP's signal is not good too.\n"); + ret = -EFAULT; + goto done; + } + } + /* start roaming to new AP */ + priv->sme_current.bssid = priv->conn_bssid; + memcpy((void *)priv->sme_current.bssid, &ssid_bssid.bssid, + MLAN_MAC_ADDR_LENGTH); + ret = woal_cfg80211_assoc(priv, (void *)&priv->sme_current, + MOAL_CMD_WAIT); + if (!ret) { + woal_inform_bss_from_scan_result(priv, NULL, MOAL_CMD_WAIT); + memset(&assoc_rsp, 0, sizeof(mlan_ds_misc_assoc_rsp)); + woal_get_assoc_rsp(priv, &assoc_rsp); + passoc_rsp = (IEEEtypes_AssocRsp_t *)assoc_rsp.assoc_resp_buf; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0) || defined(COMPAT_WIRELESS) + cfg80211_roamed(priv->netdev, NULL, priv->cfg_bssid, + priv->sme_current.ie, priv->sme_current.ie_len, + passoc_rsp->ie_buffer, + assoc_rsp.assoc_resp_len - + ASSOC_RESP_FIXED_SIZE, GFP_KERNEL); +#else + cfg80211_roamed(priv->netdev, priv->cfg_bssid, + priv->sme_current.ie, priv->sme_current.ie_len, + passoc_rsp->ie_buffer, + assoc_rsp.assoc_resp_len - + ASSOC_RESP_FIXED_SIZE, GFP_KERNEL); +#endif + PRINTM(MMSG, "Roamed to bssid " MACSTR " successfully\n", + MAC2STR(priv->cfg_bssid)); + } else { + PRINTM(MIOCTL, "Roaming to bssid " MACSTR " failed\n", + MAC2STR(ssid_bssid.bssid)); + } +done: + /* config rssi low threshold again */ + priv->last_event = 0; + priv->rssi_low = DEFAULT_RSSI_LOW_THRESHOLD; + sprintf(rssi_low, "%d", priv->rssi_low); + woal_set_rssi_low_threshold(priv, rssi_low, MOAL_CMD_WAIT); + LEAVE(); + return; +} + /** * @brief Register the device with cfg80211 * @@ -4229,10 +4951,10 @@ woal_cfg80211_change_station(struct wiphy *wiphy, struct net_device *dev, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -woal_register_sta_cfg80211(struct net_device * dev, t_u8 bss_type) +woal_register_sta_cfg80211(struct net_device *dev, t_u8 bss_type) { mlan_status ret = MLAN_STATUS_SUCCESS; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); struct wireless_dev *wdev = NULL; int psmode = 0; @@ -4247,6 +4969,8 @@ woal_register_sta_cfg80211(struct net_device * dev, t_u8 bss_type) } if (bss_type == MLAN_BSS_TYPE_STA) { wdev->iftype = NL80211_IFTYPE_STATION; + priv->roaming_enabled = MFALSE; + priv->roaming_required = MFALSE; } #if defined(WIFI_DIRECT_SUPPORT) #if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION @@ -4285,7 +5009,7 @@ woal_register_sta_cfg80211(struct net_device * dev, t_u8 bss_type) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -woal_cfg80211_init_wiphy(moal_private * priv, t_u8 wait_option) +woal_cfg80211_init_wiphy(moal_private *priv, t_u8 wait_option) { mlan_status ret = MLAN_STATUS_SUCCESS; int retry_count, rts_thr, frag_thr; @@ -4306,7 +5030,7 @@ woal_cfg80211_init_wiphy(moal_private * priv, t_u8 wait_option) ret = MLAN_STATUS_FAILURE; goto done; } - cfg_11n = (mlan_ds_11n_cfg *) req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_HTCAP_CFG; req->req_id = MLAN_IOCTL_11N_CFG; req->action = MLAN_ACT_GET; @@ -4332,6 +5056,11 @@ woal_cfg80211_init_wiphy(moal_private * priv, t_u8 wait_option) hw_dev_cap, cfg_11n->param.supported_mcs_set); /* For 2.4G band only card, this shouldn't be set */ + if (wiphy->bands[IEEE80211_BAND_5GHZ]) { + woal_cfg80211_setup_ht_cap(&wiphy->bands[IEEE80211_BAND_5GHZ]-> + ht_cap, hw_dev_cap, + cfg_11n->param.supported_mcs_set); + } kfree(req); #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) || defined(COMPAT_WIRELESS) @@ -4341,7 +5070,7 @@ woal_cfg80211_init_wiphy(moal_private * priv, t_u8 wait_option) ret = MLAN_STATUS_FAILURE; goto done; } - radio = (mlan_ds_radio_cfg *) req->pbuf; + radio = (mlan_ds_radio_cfg *)req->pbuf; radio->sub_command = MLAN_OID_ANT_CFG; req->req_id = MLAN_IOCTL_RADIO_CFG; req->action = MLAN_ACT_GET; @@ -4361,8 +5090,8 @@ woal_cfg80211_init_wiphy(moal_private * priv, t_u8 wait_option) ret = MLAN_STATUS_FAILURE; goto done; } - wiphy->retry_long = (t_u8) retry_count; - wiphy->retry_short = (t_u8) retry_count; + wiphy->retry_long = (t_u8)retry_count; + wiphy->retry_short = (t_u8)retry_count; wiphy->max_scan_ie_len = MAX_IE_SIZE; #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) @@ -4382,7 +5111,7 @@ woal_cfg80211_init_wiphy(moal_private * priv, t_u8 wait_option) } if (rts_thr < MLAN_RTS_MIN_VALUE || rts_thr > MLAN_RTS_MAX_VALUE) rts_thr = MLAN_FRAG_RTS_DISABLED; - wiphy->rts_threshold = (t_u32) rts_thr; + wiphy->rts_threshold = (t_u32)rts_thr; /* Set fragment threshold to wiphy */ if (MLAN_STATUS_SUCCESS != @@ -4392,7 +5121,15 @@ woal_cfg80211_init_wiphy(moal_private * priv, t_u8 wait_option) } if (frag_thr < MLAN_RTS_MIN_VALUE || frag_thr > MLAN_RTS_MAX_VALUE) frag_thr = MLAN_FRAG_RTS_DISABLED; - wiphy->frag_threshold = (t_u32) frag_thr; + wiphy->frag_threshold = (t_u32)frag_thr; +#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0) + /* Enable multi-channel by default if multi-channel is supported */ + if (cfg80211_iface_comb_ap_sta.num_different_channels > 1) { + t_u16 enable = 1; + ret = woal_mc_policy_cfg(priv, &enable, wait_option, + MLAN_ACT_SET); + } +#endif done: LEAVE(); @@ -4408,7 +5145,7 @@ woal_cfg80211_init_wiphy(moal_private * priv, t_u8 wait_option) * */ mlan_status -woal_register_cfg80211(moal_private * priv) +woal_register_cfg80211(moal_private *priv) { mlan_status ret = MLAN_STATUS_SUCCESS; struct wiphy *wiphy; @@ -4448,15 +5185,26 @@ woal_register_cfg80211(moal_private * priv) #endif #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) + woal_register_cfg80211_vendor_command(wiphy); +#endif /* Make this wiphy known to this driver only */ wiphy->privid = mrvl_wiphy_privid; woal_request_get_fw_info(priv, MOAL_CMD_WAIT, &fw_info); /* Supported bands */ wiphy->bands[IEEE80211_BAND_2GHZ] = &cfg80211_band_2ghz; - woal_set_scan_time(priv, ACTIVE_SCAN_CHAN_TIME, PASSIVE_SCAN_CHAN_TIME, - SPECIFIC_SCAN_CHAN_TIME); - woal_enable_ext_scan(priv, MTRUE); + if (fw_info.fw_bands & BAND_A) { + wiphy->bands[IEEE80211_BAND_5GHZ] = &cfg80211_band_5ghz; + /** reduce scan time from 110ms to 80ms */ + woal_set_scan_time(priv, INIT_ACTIVE_SCAN_CHAN_TIME, + INIT_PASSIVE_SCAN_CHAN_TIME, + INIT_SPECIFIC_SCAN_CHAN_TIME); + } else + woal_set_scan_time(priv, ACTIVE_SCAN_CHAN_TIME, + PASSIVE_SCAN_CHAN_TIME, + SPECIFIC_SCAN_CHAN_TIME); + priv->phandle->band = IEEE80211_BAND_2GHZ; /* Initialize cipher suits */ @@ -4464,6 +5212,8 @@ woal_register_cfg80211(moal_private * priv) wiphy->n_cipher_suites = ARRAY_SIZE(cfg80211_cipher_suites); #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0) + if (cfg80211_drcs && priv->phandle->card_info->drcs) + cfg80211_iface_comb_ap_sta.num_different_channels = 2; /* Initialize interface combinations */ wiphy->iface_combinations = &cfg80211_iface_comb_ap_sta; wiphy->n_iface_combinations = 1; @@ -4473,6 +5223,9 @@ woal_register_cfg80211(moal_private * priv) wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; wiphy->flags = 0; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) + wiphy->flags |= WIPHY_FLAG_PS_ON_BY_DEFAULT; +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL | WIPHY_FLAG_OFFCHAN_TX; @@ -4548,5 +5301,8 @@ woal_register_cfg80211(moal_private * priv) return ret; } -module_param(reg_alpha2, charp, 0); +module_param(cfg80211_drcs, int, 0); +MODULE_PARM_DESC(cfg80211_drcs, + "1: Enable DRCS support; 0: Disable DRCS support"); +module_param(reg_alpha2, charp, 0660); MODULE_PARM_DESC(reg_alpha2, "Regulatory alpha2"); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_sta_cfg80211.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_sta_cfg80211.h old mode 100755 new mode 100644 index 9e502b93..7d427236 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_sta_cfg80211.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_sta_cfg80211.h @@ -22,19 +22,26 @@ #ifndef _MOAL_STA_CFG80211_H_ #define _MOAL_STA_CFG80211_H_ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) +#define IEEE80211_CHAN_PASSIVE_SCAN IEEE80211_CHAN_NO_IR +#define IEEE80211_CHAN_NO_IBSS IEEE80211_CHAN_NO_IR +#endif + /** Convert RSSI signal strength from dBm to mBm (100*dBm) */ #define RSSI_DBM_TO_MDM(x) ((x) * 100) mlan_status woal_register_sta_cfg80211(struct net_device *dev, t_u8 bss_type); mlan_status -woal_cfg80211_set_key(moal_private * priv, t_u8 is_enable_wep, - t_u32 cipher, const t_u8 * key, int key_len, - const t_u8 * seq, int seq_len, t_u8 key_index, - const t_u8 * addr, int disable); + +woal_cfg80211_set_key(moal_private *priv, t_u8 is_enable_wep, + t_u32 cipher, const t_u8 *key, int key_len, + const t_u8 *seq, int seq_len, t_u8 key_index, + const t_u8 *addr, int disable, t_u8 wait_option); mlan_status -woal_cfg80211_set_wep_keys(moal_private * priv, const t_u8 * key, int key_len, - t_u8 index); + +woal_cfg80211_set_wep_keys(moal_private *priv, const t_u8 *key, int key_len, + t_u8 index, t_u8 wait_option); #endif /* _MOAL_STA_CFG80211_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap.c old mode 100755 new mode 100644 index 72350493..fcb4c6be --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap.c @@ -54,7 +54,7 @@ Change log: static int woal_uap_addba_param(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ioctl_req *ioctl_req = NULL; mlan_ds_11n_cfg *cfg_11n = NULL; addba_param param; @@ -84,7 +84,7 @@ woal_uap_addba_param(struct net_device *dev, struct ifreq *req) LEAVE(); return -ENOMEM; } - cfg_11n = (mlan_ds_11n_cfg *) ioctl_req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)ioctl_req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_CFG_ADDBA_PARAM; ioctl_req->req_id = MLAN_IOCTL_11N_CFG; @@ -134,7 +134,7 @@ woal_uap_addba_param(struct net_device *dev, struct ifreq *req) static int woal_uap_aggr_priotbl(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ioctl_req *ioctl_req = NULL; mlan_ds_11n_cfg *cfg_11n = NULL; aggr_prio_tbl param; @@ -156,14 +156,14 @@ woal_uap_aggr_priotbl(struct net_device *dev, struct ifreq *req) ret = -EFAULT; goto done; } - DBG_HEXDUMP(MCMD_D, "aggr_prio_tbl", (t_u8 *) & param, sizeof(param)); + DBG_HEXDUMP(MCMD_D, "aggr_prio_tbl", (t_u8 *)¶m, sizeof(param)); ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); if (ioctl_req == NULL) { LEAVE(); return -ENOMEM; } - cfg_11n = (mlan_ds_11n_cfg *) ioctl_req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)ioctl_req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_CFG_AGGR_PRIO_TBL; ioctl_req->req_id = MLAN_IOCTL_11N_CFG; @@ -210,7 +210,7 @@ woal_uap_aggr_priotbl(struct net_device *dev, struct ifreq *req) static int woal_uap_addba_reject(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ioctl_req *ioctl_req = NULL; mlan_ds_11n_cfg *cfg_11n = NULL; addba_reject_para param; @@ -232,15 +232,14 @@ woal_uap_addba_reject(struct net_device *dev, struct ifreq *req) ret = -EFAULT; goto done; } - DBG_HEXDUMP(MCMD_D, "addba_reject tbl", (t_u8 *) & param, - sizeof(param)); + DBG_HEXDUMP(MCMD_D, "addba_reject tbl", (t_u8 *)¶m, sizeof(param)); ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); if (ioctl_req == NULL) { LEAVE(); return -ENOMEM; } - cfg_11n = (mlan_ds_11n_cfg *) ioctl_req->pbuf; + cfg_11n = (mlan_ds_11n_cfg *)ioctl_req->pbuf; cfg_11n->sub_command = MLAN_OID_11N_CFG_ADDBA_REJECT; ioctl_req->req_id = MLAN_IOCTL_11N_CFG; @@ -283,7 +282,7 @@ woal_uap_addba_reject(struct net_device *dev, struct ifreq *req) static int woal_uap_get_fw_info(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); fw_info fw; mlan_fw_info fw_info; int ret = 0; @@ -332,7 +331,7 @@ woal_uap_get_fw_info(struct net_device *dev, struct ifreq *req) static int woal_uap_deep_sleep(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ioctl_req *ioctl_req = NULL; mlan_ds_pm_cfg *pm = NULL; deep_sleep_para param; @@ -353,14 +352,14 @@ woal_uap_deep_sleep(struct net_device *dev, struct ifreq *req) ret = -EFAULT; goto done; } - DBG_HEXDUMP(MCMD_D, "deep_sleep_para", (t_u8 *) & param, sizeof(param)); + DBG_HEXDUMP(MCMD_D, "deep_sleep_para", (t_u8 *)¶m, sizeof(param)); ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); if (ioctl_req == NULL) { LEAVE(); return -ENOMEM; } - pm = (mlan_ds_pm_cfg *) ioctl_req->pbuf; + pm = (mlan_ds_pm_cfg *)ioctl_req->pbuf; pm->sub_command = MLAN_OID_PM_CFG_DEEP_SLEEP; ioctl_req->req_id = MLAN_IOCTL_PM_CFG; @@ -410,7 +409,7 @@ woal_uap_deep_sleep(struct net_device *dev, struct ifreq *req) static int woal_uap_txdatapause(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ioctl_req *ioctl_req = NULL; mlan_ds_misc_cfg *misc = NULL; tx_data_pause_para param; @@ -431,7 +430,7 @@ woal_uap_txdatapause(struct net_device *dev, struct ifreq *req) ret = -EFAULT; goto done; } - DBG_HEXDUMP(MCMD_D, "tx_data_pause_para", (t_u8 *) & param, + DBG_HEXDUMP(MCMD_D, "tx_data_pause_para", (t_u8 *)¶m, sizeof(param)); ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); @@ -439,7 +438,7 @@ woal_uap_txdatapause(struct net_device *dev, struct ifreq *req) LEAVE(); return -ENOMEM; } - misc = (mlan_ds_misc_cfg *) ioctl_req->pbuf; + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; misc->sub_command = MLAN_OID_MISC_TX_DATAPAUSE; ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; @@ -484,7 +483,7 @@ woal_uap_txdatapause(struct net_device *dev, struct ifreq *req) static int woal_uap_sdcmd52_rw(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); sdcmd52_para param; t_u8 func, data = 0; int ret = 0, reg; @@ -504,8 +503,8 @@ woal_uap_sdcmd52_rw(struct net_device *dev, struct ifreq *req) goto done; } - func = (t_u8) param.cmd52_params[0]; - reg = (t_u32) param.cmd52_params[1]; + func = (t_u8)param.cmd52_params[0]; + reg = (t_u32)param.cmd52_params[1]; if (!param.action) { PRINTM(MINFO, "Cmd52 read, func=%d, reg=0x%08X\n", func, reg); @@ -527,7 +526,7 @@ woal_uap_sdcmd52_rw(struct net_device *dev, struct ifreq *req) } param.cmd52_params[2] = data; } else { - data = (t_u8) param.cmd52_params[2]; + data = (t_u8)param.cmd52_params[2]; PRINTM(MINFO, "Cmd52 write, func=%d, reg=0x%08X, data=0x%02X\n", func, reg, data); sdio_claim_host(((struct sdio_mmc_card *)priv->phandle->card)-> @@ -557,6 +556,111 @@ woal_uap_sdcmd52_rw(struct net_device *dev, struct ifreq *req) return ret; } +/** + * @brief configure snmp mib + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_snmp_mib(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_snmp_mib *snmp = NULL; + snmp_mib_para param; + t_u8 value[MAX_SNMP_VALUE_SIZE]; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + memset(¶m, 0, sizeof(param)); + memset(value, 0, MAX_SNMP_VALUE_SIZE); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "woal_uap_snmp_mib() corrupt data\n"); + ret = -EFAULT; + goto done; + } + + /* Copy from user */ + if (copy_from_user(¶m, req->ifr_data, sizeof(param))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + DBG_HEXDUMP(MCMD_D, "snmp_mib_para", (t_u8 *)¶m, sizeof(param)); + if (param.action) { + if (copy_from_user(value, req->ifr_data + sizeof(param), + MIN(param.oid_val_len, + MAX_SNMP_VALUE_SIZE))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + DBG_HEXDUMP(MCMD_D, "snmp_mib_para value", value, + MIN(param.oid_val_len, sizeof(t_u32))); + } + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_snmp_mib)); + if (ioctl_req == NULL) { + LEAVE(); + return -ENOMEM; + } + snmp = (mlan_ds_snmp_mib *)ioctl_req->pbuf; + ioctl_req->req_id = MLAN_IOCTL_SNMP_MIB; + switch (param.oid) { + case OID_80211D_ENABLE: + snmp->sub_command = MLAN_OID_SNMP_MIB_DOT11D; + break; + case OID_80211H_ENABLE: + snmp->sub_command = MLAN_OID_SNMP_MIB_DOT11H; + break; + default: + PRINTM(MERROR, "%s: Unsupported SNMP_MIB OID (%d).\n", __func__, + param.oid); + goto done; + } + + if (!param.action) { + /* Get mib value from MLAN */ + ioctl_req->action = MLAN_ACT_GET; + } else { + /* Set mib value to MLAN */ + ioctl_req->action = MLAN_ACT_SET; + snmp->param.oid_value = *(t_u32 *)value; + } + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* Copy to user */ + if (copy_to_user(req->ifr_data, ¶m, sizeof(param))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } + if (!param.action) { /* GET */ + if (copy_to_user + (req->ifr_data + sizeof(param), &snmp->param.oid_value, + MIN(param.oid_val_len, sizeof(t_u32)))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + /** * @brief configure domain info * @@ -567,7 +671,7 @@ woal_uap_sdcmd52_rw(struct net_device *dev, struct ifreq *req) static int woal_uap_domain_info(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ioctl_req *ioctl_req = NULL; mlan_ds_11d_cfg *cfg11d = NULL; domain_info_para param; @@ -593,8 +697,7 @@ woal_uap_domain_info(struct net_device *dev, struct ifreq *req) ret = -EFAULT; goto done; } - DBG_HEXDUMP(MCMD_D, "domain_info_para", (t_u8 *) & param, - sizeof(param)); + DBG_HEXDUMP(MCMD_D, "domain_info_para", (t_u8 *)¶m, sizeof(param)); if (param.action) { /* get tlv header */ if (copy_from_user @@ -603,7 +706,7 @@ woal_uap_domain_info(struct net_device *dev, struct ifreq *req) ret = -EFAULT; goto done; } - tlv_data_len = ((t_u16 *) (tlv))[1]; + tlv_data_len = ((t_u16 *)(tlv))[1]; if ((TLV_HEADER_LEN + tlv_data_len) > sizeof(tlv)) { PRINTM(MERROR, "TLV buffer is overflowed"); ret = -EINVAL; @@ -625,7 +728,7 @@ woal_uap_domain_info(struct net_device *dev, struct ifreq *req) LEAVE(); return -ENOMEM; } - cfg11d = (mlan_ds_11d_cfg *) ioctl_req->pbuf; + cfg11d = (mlan_ds_11d_cfg *)ioctl_req->pbuf; ioctl_req->req_id = MLAN_IOCTL_11D_CFG; cfg11d->sub_command = MLAN_OID_11D_DOMAIN_INFO; @@ -651,7 +754,7 @@ woal_uap_domain_info(struct net_device *dev, struct ifreq *req) goto done; } if (!param.action) { /* GET */ - tlv_data_len = ((t_u16 *) (cfg11d->param.domain_tlv))[1]; + tlv_data_len = ((t_u16 *)(cfg11d->param.domain_tlv))[1]; if (copy_to_user (req->ifr_data + sizeof(param), &cfg11d->param.domain_tlv, TLV_HEADER_LEN + tlv_data_len)) { @@ -668,6 +771,99 @@ woal_uap_domain_info(struct net_device *dev, struct ifreq *req) return ret; } +#if defined(DFS_TESTING_SUPPORT) +/** + * @brief configure dfs testing settings + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_dfs_testing(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_11h_cfg *cfg11h = NULL; + dfs_testing_para param; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + memset(¶m, 0, sizeof(param)); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "woal_uap_dfs_testing() corrupt data\n"); + ret = -EFAULT; + goto done; + } + + /* Copy from user */ + if (copy_from_user(¶m, req->ifr_data, sizeof(param))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + DBG_HEXDUMP(MCMD_D, "dfs_testing_para", (t_u8 *)¶m, sizeof(param)); + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11h_cfg)); + if (ioctl_req == NULL) { + LEAVE(); + return -ENOMEM; + } + cfg11h = (mlan_ds_11h_cfg *)ioctl_req->pbuf; + ioctl_req->req_id = MLAN_IOCTL_11H_CFG; + cfg11h->sub_command = MLAN_OID_11H_DFS_TESTING; + + if (!param.action) { + /* Get mib value from MLAN */ + ioctl_req->action = MLAN_ACT_GET; + } else { + /* Set mib value to MLAN */ + ioctl_req->action = MLAN_ACT_SET; + cfg11h->param.dfs_testing.usr_cac_period_msec = + param.usr_cac_period; + cfg11h->param.dfs_testing.usr_nop_period_sec = + param.usr_nop_period; + cfg11h->param.dfs_testing.usr_no_chan_change = + param.no_chan_change; + cfg11h->param.dfs_testing.usr_fixed_new_chan = + param.fixed_new_chan; + priv->phandle->cac_period_jiffies = + param.usr_cac_period * HZ / 1000; + } + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (!param.action) { /* GET */ + param.usr_cac_period = + cfg11h->param.dfs_testing.usr_cac_period_msec; + param.usr_nop_period = + cfg11h->param.dfs_testing.usr_nop_period_sec; + param.no_chan_change = + cfg11h->param.dfs_testing.usr_no_chan_change; + param.fixed_new_chan = + cfg11h->param.dfs_testing.usr_fixed_new_chan; + } + /* Copy to user */ + if (copy_to_user(req->ifr_data, ¶m, sizeof(param))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} +#endif + /** * @brief uap hs_cfg ioctl handler * @@ -679,7 +875,7 @@ static int woal_uap_hs_cfg(struct net_device *dev, struct ifreq *req, BOOLEAN invoke_hostcmd) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ds_hs_cfg hscfg; ds_hs_cfg hs_cfg; mlan_bss_info bss_info; @@ -812,7 +1008,7 @@ woal_uap_hs_set_para(struct net_device *dev, struct ifreq *req) static int woal_uap_mgmt_frame_control(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); int ret = 0; t_u16 action = 0; mgmt_frame_ctrl param; @@ -874,7 +1070,7 @@ woal_uap_mgmt_frame_control(struct net_device *dev, struct ifreq *req) static int woal_uap_tx_rate_cfg(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); int ret = 0, i = 0; mlan_ds_rate *rate = NULL; mlan_ioctl_req *mreq = NULL; @@ -904,7 +1100,7 @@ woal_uap_tx_rate_cfg(struct net_device *dev, struct ifreq *req) ret = -ENOMEM; goto done; } - rate = (mlan_ds_rate *) mreq->pbuf; + rate = (mlan_ds_rate *)mreq->pbuf; rate->param.rate_cfg.rate_type = MLAN_RATE_INDEX; rate->sub_command = MLAN_OID_RATE_CFG; mreq->req_id = MLAN_IOCTL_RATE; @@ -1003,6 +1199,14 @@ woal_uap_ioctl(struct net_device *dev, struct ifreq *req) case UAP_SDCMD52_RW: ret = woal_uap_sdcmd52_rw(dev, req); break; + case UAP_SNMP_MIB: + ret = woal_uap_snmp_mib(dev, req); + break; +#ifdef DFS_TESTING_SUPPORT + case UAP_DFS_TESTING: + ret = woal_uap_dfs_testing(dev, req); + break; +#endif case UAP_DOMAIN_INFO: ret = woal_uap_domain_info(dev, req); break; @@ -1036,7 +1240,7 @@ woal_uap_ioctl(struct net_device *dev, struct ifreq *req) static int woal_uap_sta_deauth_ioctl(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ioctl_req *ioctl_req = NULL; mlan_ds_bss *bss = NULL; mlan_deauth_param deauth_param; @@ -1067,7 +1271,7 @@ woal_uap_sta_deauth_ioctl(struct net_device *dev, struct ifreq *req) ret = -ENOMEM; goto done; } - bss = (mlan_ds_bss *) ioctl_req->pbuf; + bss = (mlan_ds_bss *)ioctl_req->pbuf; bss->sub_command = MLAN_OID_UAP_DEAUTH_STA; ioctl_req->req_id = MLAN_IOCTL_BSS; @@ -1102,7 +1306,7 @@ woal_uap_sta_deauth_ioctl(struct net_device *dev, struct ifreq *req) static int woal_uap_radio_ctl(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); int ret = 0; mlan_ds_radio_cfg *radio = NULL; mlan_ioctl_req *mreq = NULL; @@ -1132,11 +1336,11 @@ woal_uap_radio_ctl(struct net_device *dev, struct ifreq *req) ret = -ENOMEM; goto done; } - radio = (mlan_ds_radio_cfg *) mreq->pbuf; + radio = (mlan_ds_radio_cfg *)mreq->pbuf; radio->sub_command = MLAN_OID_RADIO_CTRL; mreq->req_id = MLAN_IOCTL_RADIO_CFG; mreq->action = MLAN_ACT_SET; - radio->param.radio_on_off = (t_u32) data[1]; + radio->param.radio_on_off = (t_u32)data[1]; status = woal_request_ioctl(priv, mreq, MOAL_IOCTL_WAIT); if (status != MLAN_STATUS_SUCCESS) ret = -EFAULT; @@ -1168,7 +1372,7 @@ woal_uap_radio_ctl(struct net_device *dev, struct ifreq *req) static int woal_uap_bss_ctrl_ioctl(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); int ret = 0, data = 0; ENTER(); @@ -1202,7 +1406,7 @@ woal_uap_bss_ctrl_ioctl(struct net_device *dev, struct ifreq *req) static int woal_uap_report_mic_ioctl(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ioctl_req *ioctl_req = NULL; mlan_ds_sec_cfg *sec = NULL; t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; @@ -1233,7 +1437,7 @@ woal_uap_report_mic_ioctl(struct net_device *dev, struct ifreq *req) goto done; } - sec = (mlan_ds_sec_cfg *) ioctl_req->pbuf; + sec = (mlan_ds_sec_cfg *)ioctl_req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_REPORT_MIC_ERR; ioctl_req->req_id = MLAN_IOCTL_SEC_CFG; ioctl_req->action = MLAN_ACT_SET; @@ -1262,7 +1466,7 @@ woal_uap_report_mic_ioctl(struct net_device *dev, struct ifreq *req) static int woal_uap_set_key_ioctl(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ioctl_req *ioctl_req = NULL; mlan_ds_sec_cfg *sec = NULL; encrypt_key key; @@ -1300,7 +1504,7 @@ woal_uap_set_key_ioctl(struct net_device *dev, struct ifreq *req) goto done; } - sec = (mlan_ds_sec_cfg *) ioctl_req->pbuf; + sec = (mlan_ds_sec_cfg *)ioctl_req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY, ioctl_req->req_id = MLAN_IOCTL_SEC_CFG; ioctl_req->action = MLAN_ACT_SET; @@ -1312,7 +1516,7 @@ woal_uap_set_key_ioctl(struct net_device *dev, struct ifreq *req) memcpy(sec->param.encrypt_key.key_material, key.key_material, key.key_len); if (0 == memcmp(sec->param.encrypt_key.mac_addr, bcast_addr, ETH_ALEN)) - sec->param.encrypt_key.key_flags = KEY_FLAG_GROUP_KEY; + sec->param.encrypt_key.key_flags = KEY_FLAG_GROUP_KEY; else sec->param.encrypt_key.key_flags = KEY_FLAG_SET_TX_KEY; @@ -1338,8 +1542,8 @@ woal_uap_set_key_ioctl(struct net_device *dev, struct ifreq *req) * @return MLAN_STATUS_SUCCESS -- success, otherwise fail */ int -woal_set_get_uap_power_mode(moal_private * priv, t_u32 action, - mlan_ds_ps_mgmt * ps_mgmt) +woal_set_get_uap_power_mode(moal_private *priv, t_u32 action, + mlan_ds_ps_mgmt *ps_mgmt) { mlan_ioctl_req *ioctl_req = NULL; mlan_ds_pm_cfg *pm_cfg = NULL; @@ -1356,7 +1560,7 @@ woal_set_get_uap_power_mode(moal_private * priv, t_u32 action, LEAVE(); return MLAN_STATUS_FAILURE; } - pm_cfg = (mlan_ds_pm_cfg *) ioctl_req->pbuf; + pm_cfg = (mlan_ds_pm_cfg *)ioctl_req->pbuf; pm_cfg->sub_command = MLAN_OID_PM_CFG_PS_MODE; ioctl_req->req_id = MLAN_IOCTL_PM_CFG; ioctl_req->action = action; @@ -1385,7 +1589,7 @@ woal_set_get_uap_power_mode(moal_private * priv, t_u32 action, static int woal_uap_power_mode_ioctl(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ioctl_req *ioctl_req = NULL; mlan_ds_pm_cfg *pm_cfg = NULL; mlan_ds_ps_mgmt ps_mgmt; @@ -1439,7 +1643,7 @@ woal_uap_power_mode_ioctl(struct net_device *dev, struct ifreq *req) ret = -ENOMEM; goto done; } - pm_cfg = (mlan_ds_pm_cfg *) ioctl_req->pbuf; + pm_cfg = (mlan_ds_pm_cfg *)ioctl_req->pbuf; pm_cfg->sub_command = MLAN_OID_PM_CFG_PS_MODE; ioctl_req->req_id = MLAN_IOCTL_PM_CFG; if (ps_mgmt.flags) { @@ -1485,7 +1689,7 @@ woal_uap_power_mode_ioctl(struct net_device *dev, struct ifreq *req) static int woal_uap_bss_cfg_ioctl(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); int ret = 0; mlan_ds_bss *bss = NULL; mlan_ioctl_req *ioctl_req = NULL; @@ -1519,7 +1723,7 @@ woal_uap_bss_cfg_ioctl(struct net_device *dev, struct ifreq *req) goto done; } - bss = (mlan_ds_bss *) ioctl_req->pbuf; + bss = (mlan_ds_bss *)ioctl_req->pbuf; bss->sub_command = MLAN_OID_UAP_BSS_CONFIG; ioctl_req->req_id = MLAN_IOCTL_BSS; if (action == 1) @@ -1573,7 +1777,7 @@ woal_uap_bss_cfg_ioctl(struct net_device *dev, struct ifreq *req) static int woal_uap_get_sta_list_ioctl(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); int ret = 0; mlan_ds_get_info *info = NULL; mlan_ioctl_req *ioctl_req = NULL; @@ -1597,7 +1801,7 @@ woal_uap_get_sta_list_ioctl(struct net_device *dev, struct ifreq *req) goto done; } - info = (mlan_ds_get_info *) ioctl_req->pbuf; + info = (mlan_ds_get_info *)ioctl_req->pbuf; info->sub_command = MLAN_OID_UAP_STA_LIST; ioctl_req->req_id = MLAN_IOCTL_GET_INFO; ioctl_req->action = MLAN_ACT_GET; @@ -1634,7 +1838,7 @@ woal_uap_get_sta_list_ioctl(struct net_device *dev, struct ifreq *req) * @return 0 --success, otherwise fail */ static int -woal_uap_set_wapi_key_ioctl(moal_private * priv, wapi_msg * msg) +woal_uap_set_wapi_key_ioctl(moal_private *priv, wapi_msg *msg) { mlan_ioctl_req *req = NULL; mlan_ds_sec_cfg *sec = NULL; @@ -1648,14 +1852,14 @@ woal_uap_set_wapi_key_ioctl(moal_private * priv, wapi_msg * msg) ret = -EINVAL; goto done; } - key_msg = (wapi_key_msg *) msg->msg; + key_msg = (wapi_key_msg *)msg->msg; req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); if (req == NULL) { ret = -ENOMEM; goto done; } - sec = (mlan_ds_sec_cfg *) req->pbuf; + sec = (mlan_ds_sec_cfg *)req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; req->req_id = MLAN_IOCTL_SEC_CFG; req->action = MLAN_ACT_SET; @@ -1690,7 +1894,7 @@ woal_uap_set_wapi_key_ioctl(moal_private * priv, wapi_msg * msg) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ static mlan_status -woal_enable_wapi(moal_private * priv, t_u8 enable) +woal_enable_wapi(moal_private *priv, t_u8 enable) { mlan_ioctl_req *req = NULL; mlan_ds_bss *bss = NULL; @@ -1699,14 +1903,14 @@ woal_enable_wapi(moal_private * priv, t_u8 enable) ENTER(); /* Allocate an IOCTL request buffer */ - req = (mlan_ioctl_req *) woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + req = (mlan_ioctl_req *)woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); if (req == NULL) { status = MLAN_STATUS_FAILURE; goto done; } /* Fill request buffer */ - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_UAP_BSS_CONFIG; req->req_id = MLAN_IOCTL_BSS; req->action = MLAN_ACT_GET; @@ -1754,16 +1958,22 @@ woal_enable_wapi(moal_private * priv, t_u8 enable) * @return 0 --success, otherwise fail */ static int -woal_uap_set_wapi_flag_ioctl(moal_private * priv, wapi_msg * msg) +woal_uap_set_wapi_flag_ioctl(moal_private *priv, wapi_msg *msg) { - t_u8 wapi_psk_ie[] = - { 0x44, 0x14, 0x01, 0x00, 0x01, 0x00, 0x00, 0x14, 0x72, 0x02, - 0x01, 0x00, 0x00, 0x14, 0x72, 0x01, 0x00, 0x14, 0x72, 0x01, + t_u8 wapi_psk_ie[] = { + 0x44, 0x14, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x14, + 0x72, 0x02, 0x01, 0x00, + 0x00, 0x14, 0x72, 0x01, + 0x00, 0x14, 0x72, 0x01, 0x00, 0x00 }; - t_u8 wapi_cert_ie[] = - { 0x44, 0x14, 0x01, 0x00, 0x01, 0x00, 0x00, 0x14, 0x72, 0x01, - 0x01, 0x00, 0x00, 0x14, 0x72, 0x01, 0x00, 0x14, 0x72, 0x01, + t_u8 wapi_cert_ie[] = { + 0x44, 0x14, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x14, + 0x72, 0x01, 0x01, 0x00, + 0x00, 0x14, 0x72, 0x01, + 0x00, 0x14, 0x72, 0x01, 0x00, 0x00 }; mlan_ds_misc_cfg *misc = NULL; @@ -1780,7 +1990,7 @@ woal_uap_set_wapi_flag_ioctl(moal_private * priv, wapi_msg * msg) ret = -ENOMEM; goto done; } - misc = (mlan_ds_misc_cfg *) req->pbuf; + misc = (mlan_ds_misc_cfg *)req->pbuf; misc->sub_command = MLAN_OID_MISC_GEN_IE; req->req_id = MLAN_IOCTL_MISC_CFG; req->action = MLAN_ACT_SET; @@ -1827,7 +2037,7 @@ woal_uap_set_wapi_flag_ioctl(moal_private * priv, wapi_msg * msg) static int woal_uap_set_wapi(struct net_device *dev, struct ifreq *req) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); wapi_msg msg; int ret = 0; @@ -1883,7 +2093,7 @@ woal_uap_set_wapi(struct net_device *dev, struct ifreq *req) * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -woal_uap_get_bss_param(moal_private * priv, mlan_uap_bss_param * sys_cfg, +woal_uap_get_bss_param(moal_private *priv, mlan_uap_bss_param *sys_cfg, t_u8 wait_option) { mlan_ds_bss *info = NULL; @@ -1898,7 +2108,7 @@ woal_uap_get_bss_param(moal_private * priv, mlan_uap_bss_param * sys_cfg, return MLAN_STATUS_FAILURE; } - info = (mlan_ds_bss *) req->pbuf; + info = (mlan_ds_bss *)req->pbuf; info->sub_command = MLAN_OID_UAP_BSS_CONFIG; req->req_id = MLAN_IOCTL_BSS; req->action = MLAN_ACT_GET; @@ -1927,7 +2137,7 @@ woal_uap_get_bss_param(moal_private * priv, mlan_uap_bss_param * sys_cfg, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -woal_uap_set_11n_status(mlan_uap_bss_param * sys_cfg, t_u8 action) +woal_uap_set_11n_status(mlan_uap_bss_param *sys_cfg, t_u8 action) { mlan_status status = MLAN_STATUS_SUCCESS; @@ -1968,7 +2178,7 @@ woal_uap_set_11n_status(mlan_uap_bss_param * sys_cfg, t_u8 action) * @return 0 --success, otherwise fail */ int -woal_uap_ap_cfg_parse_data(mlan_uap_bss_param * ap_cfg, char *buf) +woal_uap_ap_cfg_parse_data(mlan_uap_bss_param *ap_cfg, char *buf) { int ret = 0, atoi_ret; int set_sec = 0, set_key = 0, set_chan = 0; @@ -2164,7 +2374,7 @@ woal_uap_ap_cfg_parse_data(mlan_uap_bss_param * ap_cfg, char *buf) ret = -EINVAL; goto done; } - ap_cfg->max_sta_count = (t_u16) atoi_ret; + ap_cfg->max_sta_count = (t_u16)atoi_ret; set_scb = 1; } else { PRINTM(MERROR, "Invalid option %s\n", opt); @@ -2188,7 +2398,7 @@ woal_uap_ap_cfg_parse_data(mlan_uap_bss_param * ap_cfg, char *buf) * @return 0 --success, otherwise fail */ int -woal_uap_set_ap_cfg(moal_private * priv, t_u8 * data, int len) +woal_uap_set_ap_cfg(moal_private *priv, t_u8 *data, int len) { int ret = 0; static char buf[MAX_BUF_LEN]; @@ -2270,7 +2480,7 @@ woal_uap_set_ap_cfg(moal_private * priv, t_u8 * data, int len) * @return 0 --success, otherwise fail */ int -woal_uap_bss_ctrl(moal_private * priv, t_u8 wait_option, int data) +woal_uap_bss_ctrl(moal_private *priv, t_u8 wait_option, int data) { mlan_ioctl_req *req = NULL; mlan_ds_bss *bss = NULL; @@ -2292,12 +2502,15 @@ woal_uap_bss_ctrl(moal_private * priv, t_u8 wait_option, int data) ret = -ENOMEM; goto done; } - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; switch (data) { case UAP_BSS_START: if (priv->bss_started == MTRUE) { PRINTM(MWARN, "Warning: BSS already started!\n"); /* goto done; */ + } else { + /* about to start bss: issue channel check */ + woal_11h_channel_check_ioctl(priv, wait_option); } bss->sub_command = MLAN_OID_BSS_START; break; @@ -2310,13 +2523,14 @@ woal_uap_bss_ctrl(moal_private * priv, t_u8 wait_option, int data) break; case UAP_BSS_RESET: bss->sub_command = MLAN_OID_UAP_BSS_RESET; + woal_cancel_cac_block(priv); break; } req->req_id = MLAN_IOCTL_BSS; req->action = MLAN_ACT_SET; - status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); - if (status != MLAN_STATUS_SUCCESS) { + status = woal_request_ioctl(priv, req, wait_option); + if (status == MLAN_STATUS_FAILURE) { ret = -EFAULT; goto done; } @@ -2435,7 +2649,7 @@ woal_uap_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd) * @return N/A */ void -woal_uap_get_version(moal_private * priv, char *version, int max_len) +woal_uap_get_version(moal_private *priv, char *version, int max_len) { mlan_ds_get_info *info = NULL; mlan_ioctl_req *req = NULL; @@ -2449,7 +2663,7 @@ woal_uap_get_version(moal_private * priv, char *version, int max_len) return; } - info = (mlan_ds_get_info *) req->pbuf; + info = (mlan_ds_get_info *)req->pbuf; info->sub_command = MLAN_OID_GET_VER_EXT; req->req_id = MLAN_IOCTL_GET_INFO; req->action = MLAN_ACT_GET; @@ -2479,8 +2693,8 @@ woal_uap_get_version(moal_private * priv, char *version, int max_len) * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_uap_get_stats(moal_private * priv, t_u8 wait_option, - mlan_ds_uap_stats * ustats) +woal_uap_get_stats(moal_private *priv, t_u8 wait_option, + mlan_ds_uap_stats *ustats) { mlan_ds_get_info *info = NULL; mlan_ioctl_req *req = NULL; @@ -2494,7 +2708,7 @@ woal_uap_get_stats(moal_private * priv, t_u8 wait_option, return MLAN_STATUS_FAILURE; } - info = (mlan_ds_get_info *) req->pbuf; + info = (mlan_ds_get_info *)req->pbuf; info->sub_command = MLAN_OID_GET_STATS; req->req_id = MLAN_IOCTL_GET_INFO; req->action = MLAN_ACT_GET; @@ -2530,8 +2744,8 @@ woal_uap_get_stats(moal_private * priv, t_u8 wait_option, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -woal_set_get_sys_config(moal_private * priv, t_u16 action, t_u8 wait_option, - mlan_uap_bss_param * sys_cfg) +woal_set_get_sys_config(moal_private *priv, t_u16 action, t_u8 wait_option, + mlan_uap_bss_param *sys_cfg) { mlan_status ret = MLAN_STATUS_SUCCESS; mlan_ds_bss *bss = NULL; @@ -2545,7 +2759,7 @@ woal_set_get_sys_config(moal_private * priv, t_u16 action, t_u8 wait_option, goto done; } - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_UAP_BSS_CONFIG; req->req_id = MLAN_IOCTL_BSS; req->action = action; @@ -2578,7 +2792,7 @@ woal_set_get_sys_config(moal_private * priv, t_u16 action, t_u8 wait_option, * @return N/A */ void -woal_set_sys_config_invalid_data(mlan_uap_bss_param * config) +woal_set_sys_config_invalid_data(mlan_uap_bss_param *config) { ENTER(); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap.h old mode 100755 new mode 100644 index aeb04bde..e3cc2d1c --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap.h +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap.h @@ -46,6 +46,8 @@ Change log: #define UAP_TX_DATA_PAUSE 5 /** sdcmd52 read write subcommand */ #define UAP_SDCMD52_RW 6 +/** snmp mib subcommand */ +#define UAP_SNMP_MIB 7 /** domain info subcommand */ #define UAP_DOMAIN_INFO 8 #ifdef DFS_TESTING_SUPPORT @@ -308,6 +310,45 @@ typedef struct _mgmt_frame_ctrl { t_u32 mask; } mgmt_frame_ctrl; +typedef struct _snmp_mib_para { + /** subcmd */ + t_u32 subcmd; + /** Set/Get */ + t_u32 action; + /** oid to set/get */ + t_u16 oid; + /** length of oid value */ + t_u16 oid_val_len; + /** oid value to set/get */ + t_u8 oid_value[0]; +} snmp_mib_para; + +/** Max length for oid_value field */ +#define MAX_SNMP_VALUE_SIZE 128 + +/** Oid for 802.11D enable/disable */ +#define OID_80211D_ENABLE 0x0009 +/** Oid for 802.11H enable/disable */ +#define OID_80211H_ENABLE 0x000a + +#ifdef DFS_TESTING_SUPPORT +/** dfs_testing parameters */ +typedef struct _dfs_testing_param { + /** subcmd */ + t_u32 subcmd; + /** Set/Get */ + t_u32 action; + /** user CAC period (msec) */ + t_u16 usr_cac_period; + /** user NOP period (sec) */ + t_u16 usr_nop_period; + /** don't change channel on radar */ + t_u8 no_chan_change; + /** fixed channel to change to on radar */ + t_u8 fixed_new_chan; +} dfs_testing_para; +#endif + /** domain_info parameters */ typedef struct _domain_info_param { /** subcmd */ @@ -327,16 +368,16 @@ typedef struct _domain_info_param { #define MAX_DOMAIN_TLV_LEN (TLV_HEADER_LEN + COUNTRY_CODE_LEN \ + (SUB_BAND_LEN * MAX_SUB_BANDS)) -int woal_set_get_uap_power_mode(moal_private * priv, t_u32 action, - mlan_ds_ps_mgmt * ps_mgmt); +int woal_set_get_uap_power_mode(moal_private *priv, t_u32 action, + mlan_ds_ps_mgmt *ps_mgmt); void woal_uap_set_multicast_list(struct net_device *dev); int woal_uap_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd); -int woal_uap_bss_ctrl(moal_private * priv, t_u8 wait_option, int data); +int woal_uap_bss_ctrl(moal_private *priv, t_u8 wait_option, int data); #ifdef CONFIG_PROC_FS -void woal_uap_get_version(moal_private * priv, char *version, int max_len); +void woal_uap_get_version(moal_private *priv, char *version, int max_len); #endif -mlan_status woal_uap_get_stats(moal_private * priv, t_u8 wait_option, - mlan_ds_uap_stats * ustats); +mlan_status woal_uap_get_stats(moal_private *priv, t_u8 wait_option, + mlan_ds_uap_stats *ustats); #if defined(UAP_WEXT) || defined(UAP_CFG80211) extern struct iw_handler_def woal_uap_handler_def; struct iw_statistics *woal_get_uap_wireless_stats(struct net_device *dev); @@ -344,16 +385,16 @@ struct iw_statistics *woal_get_uap_wireless_stats(struct net_device *dev); int woal_uap_do_priv_ioctl(struct net_device *dev, struct ifreq *req, int cmd); #endif /** Set invalid data for each member of mlan_uap_bss_param */ -void woal_set_sys_config_invalid_data(mlan_uap_bss_param * config); +void woal_set_sys_config_invalid_data(mlan_uap_bss_param *config); /** Set/Get system configuration parameters */ -mlan_status woal_set_get_sys_config(moal_private * priv, +mlan_status woal_set_get_sys_config(moal_private *priv, t_u16 action, t_u8 wait_option, - mlan_uap_bss_param * sys_cfg); -int woal_uap_set_ap_cfg(moal_private * priv, t_u8 * data, int len); -mlan_status woal_uap_set_11n_status(mlan_uap_bss_param * sys_cfg, t_u8 action); + mlan_uap_bss_param *sys_cfg); +int woal_uap_set_ap_cfg(moal_private *priv, t_u8 *data, int len); +mlan_status woal_uap_set_11n_status(mlan_uap_bss_param *sys_cfg, t_u8 action); #ifdef UAP_WEXT -void woal_ioctl_get_uap_info_resp(moal_private * priv, mlan_ds_get_info * info); -int woal_set_get_custom_ie(moal_private * priv, t_u16 mask, t_u8 * ie, +void woal_ioctl_get_uap_info_resp(moal_private *priv, mlan_ds_get_info *info); +int woal_set_get_custom_ie(moal_private *priv, t_u16 mask, t_u8 *ie, int ie_len); #endif /* UAP_WEXT */ #endif /* _MOAL_UAP_H */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap_cfg80211.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap_cfg80211.c old mode 100755 new mode 100644 index 4d40a957..d2897110 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap_cfg80211.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap_cfg80211.c @@ -52,7 +52,7 @@ * @return 0 -- success, otherwise fail */ static int -woal_deauth_station(moal_private * priv, u8 * mac_addr) +woal_deauth_station(moal_private *priv, u8 *mac_addr) { mlan_ioctl_req *ioctl_req = NULL; mlan_ds_bss *bss = NULL; @@ -66,7 +66,7 @@ woal_deauth_station(moal_private * priv, u8 * mac_addr) ret = -ENOMEM; goto done; } - bss = (mlan_ds_bss *) ioctl_req->pbuf; + bss = (mlan_ds_bss *)ioctl_req->pbuf; bss->sub_command = MLAN_OID_UAP_DEAUTH_STA; ioctl_req->req_id = MLAN_IOCTL_BSS; ioctl_req->action = MLAN_ACT_SET; @@ -97,7 +97,7 @@ woal_deauth_station(moal_private * priv, u8 * mac_addr) * @return 0 -- success, otherwise fail */ static int -woal_deauth_all_station(moal_private * priv) +woal_deauth_all_station(moal_private *priv) { int ret = -EFAULT; int i = 0; @@ -121,7 +121,7 @@ woal_deauth_all_station(moal_private * priv) goto done; } - info = (mlan_ds_get_info *) ioctl_req->pbuf; + info = (mlan_ds_get_info *)ioctl_req->pbuf; info->sub_command = MLAN_OID_UAP_STA_LIST; ioctl_req->req_id = MLAN_IOCTL_GET_INFO; ioctl_req->action = MLAN_ACT_GET; @@ -154,7 +154,7 @@ woal_deauth_all_station(moal_private * priv) * @return MTRUE/MFALSE */ static t_u8 -woal_check_rsn_ie(IEEEtypes_Rsn_t * rsn_ie, mlan_uap_bss_param * sys_config) +woal_check_rsn_ie(IEEEtypes_Rsn_t *rsn_ie, mlan_uap_bss_param *sys_config) { int left = 0; int count = 0; @@ -195,9 +195,10 @@ woal_check_rsn_ie(IEEEtypes_Rsn_t * rsn_ie, mlan_uap_bss_param * sys_config) if (left < sizeof(wpa_suite_auth_key_mgmt_t)) return MFALSE; key_mgmt = - (wpa_suite_auth_key_mgmt_t *) ((u8 *) rsn_ie + - sizeof(IEEEtypes_Rsn_t) + - (count - 1) * sizeof(wpa_suite)); + (wpa_suite_auth_key_mgmt_t *)((u8 *)rsn_ie + + sizeof(IEEEtypes_Rsn_t) + (count - + 1) * + sizeof(wpa_suite)); count = le16_to_cpu(key_mgmt->count); if (left < (sizeof(wpa_suite_auth_key_mgmt_t) + @@ -228,7 +229,7 @@ woal_check_rsn_ie(IEEEtypes_Rsn_t * rsn_ie, mlan_uap_bss_param * sys_config) * @return MTRUE/MFALSE */ static t_u8 -woal_check_wpa_ie(IEEEtypes_Wpa_t * wpa_ie, mlan_uap_bss_param * sys_config) +woal_check_wpa_ie(IEEEtypes_Wpa_t *wpa_ie, mlan_uap_bss_param *sys_config) { int left = 0; int count = 0; @@ -267,9 +268,10 @@ woal_check_wpa_ie(IEEEtypes_Wpa_t * wpa_ie, mlan_uap_bss_param * sys_config) if (left < sizeof(wpa_suite_auth_key_mgmt_t)) return MFALSE; key_mgmt = - (wpa_suite_auth_key_mgmt_t *) ((u8 *) wpa_ie + - sizeof(IEEEtypes_Wpa_t) + - (count - 1) * sizeof(wpa_suite)); + (wpa_suite_auth_key_mgmt_t *)((u8 *)wpa_ie + + sizeof(IEEEtypes_Wpa_t) + (count - + 1) * + sizeof(wpa_suite)); count = le16_to_cpu(key_mgmt->count); if (left < (sizeof(wpa_suite_auth_key_mgmt_t) + @@ -297,7 +299,7 @@ woal_check_wpa_ie(IEEEtypes_Wpa_t * wpa_ie, mlan_uap_bss_param * sys_config) * @return MTRUE/MFALSE */ static t_u8 -woal_find_wpa_ies(const t_u8 * ie, int len, mlan_uap_bss_param * sys_config) +woal_find_wpa_ies(const t_u8 *ie, int len, mlan_uap_bss_param *sys_config) { int bytes_left = len; const t_u8 *pcurrent_ptr = ie; @@ -311,8 +313,8 @@ woal_find_wpa_ies(const t_u8 * ie, int len, mlan_uap_bss_param * sys_config) const t_u8 wpa_oui[4] = { 0x00, 0x50, 0xf2, 0x01 }; while (bytes_left >= 2) { - element_id = (IEEEtypes_ElementId_e) (*((t_u8 *) pcurrent_ptr)); - element_len = *((t_u8 *) pcurrent_ptr + 1); + element_id = (IEEEtypes_ElementId_e)(*((t_u8 *)pcurrent_ptr)); + element_len = *((t_u8 *)pcurrent_ptr + 1); total_ie_len = element_len + sizeof(IEEEtypes_Header_t); if (bytes_left < total_ie_len) { PRINTM(MERROR, @@ -326,8 +328,7 @@ woal_find_wpa_ies(const t_u8 * ie, int len, mlan_uap_bss_param * sys_config) pcurrent_ptr, sys_config); break; case VENDOR_SPECIFIC_221: - pvendor_ie = - (IEEEtypes_VendorSpecific_t *) pcurrent_ptr; + pvendor_ie = (IEEEtypes_VendorSpecific_t *)pcurrent_ptr; if (!memcmp (pvendor_ie->vend_hdr.oui, wpa_oui, sizeof(pvendor_ie->vend_hdr.oui)) && @@ -357,6 +358,54 @@ woal_find_wpa_ies(const t_u8 * ie, int len, mlan_uap_bss_param * sys_config) return ret; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) || defined(WIFI_DIRECT_SUPPORT) +/** + * @brief Get second channel offset + * + * @param chan channel num + * @return second channel offset + */ +static t_u8 +woal_get_second_channel_offset(int chan) +{ + t_u8 chan2Offset = SECONDARY_CHANNEL_NONE; + + switch (chan) { + case 36: + case 44: + case 52: + case 60: + case 100: + case 108: + case 116: + case 124: + case 132: + case 149: + case 157: + chan2Offset = SECOND_CHANNEL_ABOVE; + break; + case 40: + case 48: + case 56: + case 64: + case 104: + case 112: + case 120: + case 128: + case 136: + case 153: + case 161: + chan2Offset = SECOND_CHANNEL_BELOW; + break; + case 165: + /* Special Case: 20Mhz-only Channel */ + chan2Offset = SECONDARY_CHANNEL_NONE; + break; + } + return chan2Offset; +} +#endif + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) /** * @brief initialize AP or GO bss config @@ -366,7 +415,7 @@ woal_find_wpa_ies(const t_u8 * ie, int len, mlan_uap_bss_param * sys_config) * @return 0 -- success, otherwise fail */ static int -woal_cfg80211_beacon_config(moal_private * priv, +woal_cfg80211_beacon_config(moal_private *priv, struct cfg80211_ap_settings *params) #else /** @@ -377,7 +426,7 @@ woal_cfg80211_beacon_config(moal_private * priv, * @return 0 -- success, otherwise fail */ static int -woal_cfg80211_beacon_config(moal_private * priv, +woal_cfg80211_beacon_config(moal_private *priv, struct beacon_parameters *params) #endif { @@ -391,13 +440,23 @@ woal_cfg80211_beacon_config(moal_private * priv, struct ieee80211_mgmt *head = NULL; t_u16 capab_info = 0; #endif - t_u8 rates_bg[13] = - { 0x82, 0x84, 0x8b, 0x96, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, - 0x60, 0x6c, 0 + t_u8 rates_bg[13] = { + 0x82, 0x84, 0x8b, 0x96, + 0x0c, 0x12, 0x18, 0x24, + 0x30, 0x48, 0x60, 0x6c, + 0x00 + }; + t_u8 rates_a[9] = { + 0x8c, 0x12, 0x98, 0x24, + 0xb0, 0x48, 0x60, 0x6c, + 0x00 }; #ifdef WIFI_DIRECT_SUPPORT - t_u8 rates_wfd[9] = - { 0x8c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6c, 0 }; + t_u8 rates_wfd[9] = { + 0x8c, 0x12, 0x18, 0x24, + 0x30, 0x48, 0x60, 0x6c, + 0x00 + }; #endif t_u8 chan2Offset = 0; t_u8 enable_11n = MTRUE; @@ -504,11 +563,37 @@ woal_cfg80211_beacon_config(moal_private * priv, #endif memcpy(sys_config.rates, rates_bg, sizeof(rates_bg)); + } else { + sys_config.band_cfg = BAND_CONFIG_5G; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + chan2Offset = + woal_get_second_channel_offset(priv->channel); +#else +#ifdef WIFI_DIRECT_SUPPORT + /* Force enable 40MHZ on WFD interface */ + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) + chan2Offset = + woal_get_second_channel_offset(priv-> + channel); +#endif +#endif + +#ifdef WIFI_DIRECT_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) + memcpy(sys_config.rates, rates_wfd, + sizeof(rates_wfd)); + else +#endif + memcpy(sys_config.rates, rates_a, + sizeof(rates_a)); } - sys_config.ht_cap_info = 0x111c; + /* Disable GreenField by default */ + sys_config.ht_cap_info = 0x10c; + if (enable_11n) + sys_config.ht_cap_info |= 0x20; if (chan2Offset) { sys_config.band_cfg |= chan2Offset; - sys_config.ht_cap_info |= 0x72; + sys_config.ht_cap_info |= 0x1042; sys_config.ampdu_param = 3; } PRINTM(MCMND, @@ -690,10 +775,13 @@ woal_cfg80211_beacon_config(moal_private * priv, if ((sys_config.protocol == PROTOCOL_STATIC_WEP) || (sys_config.protocol == PROTOCOL_WPA)) enable_11n = MFALSE; - if (!enable_11n) + if (!enable_11n) { woal_uap_set_11n_status(&sys_config, MLAN_ACT_DISABLE); - else + } else { woal_uap_set_11n_status(&sys_config, MLAN_ACT_ENABLE); + woal_set_get_tx_bf_cap(priv, MLAN_ACT_GET, + &sys_config.tx_bf_cap); + } if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, MLAN_ACT_SET, MOAL_IOCTL_WAIT, @@ -727,7 +815,7 @@ woal_virt_if_setup(struct net_device *dev) /** * @brief This function adds a new interface. It will - * allocate, initialize and register the device. + * allocate, initialize and register the device. * * @param handle A pointer to moal_handle structure * @param bss_index BSS index number @@ -736,7 +824,7 @@ woal_virt_if_setup(struct net_device *dev) * @return A pointer to the new priv structure */ moal_private * -woal_alloc_virt_interface(moal_handle * handle, t_u8 bss_index, t_u8 bss_type, +woal_alloc_virt_interface(moal_handle *handle, t_u8 bss_index, t_u8 bss_type, #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0) const #endif @@ -766,7 +854,7 @@ woal_alloc_virt_interface(moal_handle * handle, t_u8 bss_index, t_u8 bss_type, goto error; } - priv = (moal_private *) netdev_priv(dev); + priv = (moal_private *)netdev_priv(dev); /* Save the priv to handle */ handle->priv[bss_index] = priv; @@ -780,6 +868,10 @@ woal_alloc_virt_interface(moal_handle * handle, t_u8 bss_index, t_u8 bss_type, INIT_LIST_HEAD(&priv->tcp_sess_queue); spin_lock_init(&priv->tcp_sess_lock); + spin_lock_init(&priv->tx_stat_lock); + spin_lock_init(&priv->scan_req_lock); + spin_lock_init(&priv->connect_lock); + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) SET_MODULE_OWNER(dev); #endif @@ -812,20 +904,22 @@ woal_cfg80211_add_virt_if(struct wiphy *wiphy, #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0) const #endif - char *name, enum nl80211_iftype type, u32 * flags, + char *name, enum nl80211_iftype type, u32 *flags, struct vif_params *params, struct net_device **new_dev) { int ret = 0; struct net_device *ndev = NULL; moal_private *priv = NULL, *new_priv = NULL; - moal_handle *handle = (moal_handle *) woal_get_wiphy_priv(wiphy); + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); struct wireless_dev *wdev = NULL; + moal_private *vir_priv; + int i = 0; ENTER(); ASSERT_RTNL(); - priv = (moal_private *) woal_get_priv_bss_type(handle, - MLAN_BSS_TYPE_WIFIDIRECT); + priv = (moal_private *)woal_get_priv_bss_type(handle, + MLAN_BSS_TYPE_WIFIDIRECT); if (!priv || !priv->phandle) { PRINTM(MERROR, "priv or handle is NULL\n"); LEAVE(); @@ -833,9 +927,20 @@ woal_cfg80211_add_virt_if(struct wiphy *wiphy, } if (priv->phandle->drv_mode.intf_num == priv->phandle->priv_num) { PRINTM(MERROR, "max virtual interface limit reached\n"); - LEAVE(); - return -ENOMEM; + for (i = 0; i < priv->phandle->priv_num; i++) { + vir_priv = priv->phandle->priv[i]; + if (vir_priv->bss_virtual) { + woal_cfg80211_del_virt_if(wiphy, + vir_priv->netdev); + break; + } + } + if (priv->phandle->drv_mode.intf_num == priv->phandle->priv_num) { + LEAVE(); + return -ENOMEM; + } } + PRINTM(MMSG, "Add virtual interface %s\n", name); if ((type != NL80211_IFTYPE_P2P_CLIENT) && (type != NL80211_IFTYPE_P2P_GO)) { PRINTM(MERROR, "Invalid iftype: %d\n", type); @@ -911,7 +1016,7 @@ woal_cfg80211_add_virt_if(struct wiphy *wiphy, * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail */ mlan_status -woal_bss_remove(moal_private * priv) +woal_bss_remove(moal_private *priv) { mlan_ioctl_req *req = NULL; mlan_ds_bss *bss = NULL; @@ -920,14 +1025,14 @@ woal_bss_remove(moal_private * priv) ENTER(); /* Allocate an IOCTL request buffer */ - req = (mlan_ioctl_req *) woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + req = (mlan_ioctl_req *)woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); if (req == NULL) { status = MLAN_STATUS_FAILURE; goto done; } /* Fill request buffer */ - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_BSS_REMOVE; req->req_id = MLAN_IOCTL_BSS; req->action = MLAN_ACT_SET; @@ -957,16 +1062,20 @@ woal_cfg80211_del_virt_if(struct wiphy *wiphy, struct net_device *dev) moal_private *priv = NULL; moal_private *vir_priv = NULL; moal_private *remain_priv = NULL; - moal_handle *handle = (moal_handle *) woal_get_wiphy_priv(wiphy); + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); + unsigned long flags; - priv = (moal_private *) woal_get_priv_bss_type(handle, - MLAN_BSS_TYPE_WIFIDIRECT); + priv = (moal_private *)woal_get_priv_bss_type(handle, + MLAN_BSS_TYPE_WIFIDIRECT); + if (!priv) + return ret; for (i = 0; i < priv->phandle->priv_num; i++) { vir_priv = priv->phandle->priv[i]; if (vir_priv) { if (vir_priv->netdev == dev) { - PRINTM(MIOCTL, - "Find virtual interface, index=%d\n", i); + PRINTM(MMSG, + "Del virtual interface %s, index=%d\n", + dev->name, i); break; } } @@ -975,11 +1084,32 @@ woal_cfg80211_del_virt_if(struct wiphy *wiphy, struct net_device *dev) woal_stop_queue(dev); netif_carrier_off(dev); netif_device_detach(dev); - woal_cancel_scan(vir_priv, MOAL_IOCTL_WAIT); if (handle->is_remain_timer_set) { woal_cancel_timer(&handle->remain_timer); woal_remain_timer_func(handle); } + spin_lock_irqsave(&vir_priv->tx_stat_lock, flags); + if (vir_priv->last_tx_buf && vir_priv->last_tx_cookie) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + cfg80211_mgmt_tx_status(vir_priv->netdev, + vir_priv->last_tx_cookie, + vir_priv->last_tx_buf, + vir_priv->last_tx_buf_len, true, + GFP_ATOMIC); +#else + cfg80211_mgmt_tx_status(vir_priv->wdev, + vir_priv->last_tx_cookie, + vir_priv->last_tx_buf, + vir_priv->last_tx_buf_len, true, + GFP_ATOMIC); +#endif +#endif + kfree(vir_priv->last_tx_buf); + vir_priv->last_tx_buf = NULL; + vir_priv->last_tx_cookie = 0; + } + spin_unlock_irqrestore(&vir_priv->tx_stat_lock, flags); /* cancel previous remain on channel to avoid firmware hang */ if (priv->phandle->remain_on_channel) { @@ -1021,7 +1151,7 @@ woal_cfg80211_del_virt_if(struct wiphy *wiphy, struct net_device *dev) } } - woal_clear_all_mgmt_ies(vir_priv); + woal_clear_all_mgmt_ies(vir_priv, MOAL_IOCTL_WAIT); woal_cfg80211_deinit_p2p(vir_priv); woal_bss_remove(vir_priv); #ifdef CONFIG_PROC_FS @@ -1055,7 +1185,7 @@ woal_cfg80211_del_virt_if(struct wiphy *wiphy, struct net_device *dev) * @return N/A */ void -woal_remove_virtual_interface(moal_handle * handle) +woal_remove_virtual_interface(moal_handle *handle) { moal_private *priv = NULL; int vir_intf = 0; @@ -1068,6 +1198,13 @@ woal_remove_virtual_interface(moal_handle * handle) if (priv->bss_virtual) { PRINTM(MCMND, "Remove virtual interface %s\n", priv->netdev->name); +#ifdef CONFIG_PROC_FS +#ifdef PROC_DEBUG + /* Remove proc debug */ + woal_debug_remove(priv); +#endif /* PROC_DEBUG */ + woal_proc_remove(priv); +#endif /* CONFIG_PROC_FS */ netif_device_detach(priv->netdev); if (priv->netdev->reg_state == NETREG_REGISTERED) @@ -1099,8 +1236,8 @@ woal_remove_virtual_interface(moal_handle * handle) */ struct net_device * woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, - char *name, enum nl80211_iftype type, - u32 * flags, struct vif_params *params) + char *name, enum nl80211_iftype type, u32 *flags, + struct vif_params *params) #else /** * @brief Request the driver to add a virtual interface @@ -1115,8 +1252,8 @@ woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, */ int woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, - char *name, enum nl80211_iftype type, - u32 * flags, struct vif_params *params) + char *name, enum nl80211_iftype type, u32 *flags, + struct vif_params *params) #endif #else /** @@ -1135,8 +1272,8 @@ woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0) const #endif - char *name, enum nl80211_iftype type, - u32 * flags, struct vif_params *params) + char *name, enum nl80211_iftype type, u32 *flags, + struct vif_params *params) #endif { #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) @@ -1250,7 +1387,7 @@ woal_cfg80211_add_beacon(struct wiphy *wiphy, struct beacon_parameters *params) #endif { - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); int ret = 0; ENTER(); @@ -1309,7 +1446,7 @@ woal_cfg80211_add_beacon(struct wiphy *wiphy, MGMT_MASK_PROBE_RESP | MGMT_MASK_ASSOC_RESP #endif - ); + , MOAL_IOCTL_WAIT); if (ret) goto done; } @@ -1320,7 +1457,8 @@ woal_cfg80211_add_beacon(struct wiphy *wiphy, params->beacon.beacon_ies, params->beacon.beacon_ies_len, NULL, 0, NULL, 0, NULL, 0, - MGMT_MASK_BEACON_WPS_P2P); + MGMT_MASK_BEACON_WPS_P2P, + MOAL_IOCTL_WAIT); if (ret) { PRINTM(MERROR, "Failed to set beacon wps/p2p ie\n"); goto done; @@ -1332,7 +1470,8 @@ woal_cfg80211_add_beacon(struct wiphy *wiphy, params->beacon_ies, params->beacon_ies_len, NULL, 0, NULL, 0, NULL, 0, - MGMT_MASK_BEACON_WPS_P2P); + MGMT_MASK_BEACON_WPS_P2P, + MOAL_IOCTL_WAIT); if (ret) { PRINTM(MERROR, "Failed to set beacon wps/p2p ie\n"); goto done; @@ -1384,7 +1523,7 @@ woal_cfg80211_set_beacon(struct wiphy *wiphy, struct beacon_parameters *params) #endif { - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); int ret = 0; ENTER(); @@ -1408,7 +1547,8 @@ woal_cfg80211_set_beacon(struct wiphy *wiphy, params->tail_len, NULL, 0, NULL, 0, NULL, 0, - MGMT_MASK_BEACON); + MGMT_MASK_BEACON, + MOAL_IOCTL_WAIT); if (ret) goto done; } @@ -1418,7 +1558,8 @@ woal_cfg80211_set_beacon(struct wiphy *wiphy, params-> beacon_ies_len, NULL, 0, NULL, 0, NULL, 0, - MGMT_MASK_BEACON_WPS_P2P); + MGMT_MASK_BEACON_WPS_P2P, + MOAL_IOCTL_WAIT); if (ret) { PRINTM(MERROR, "Failed to set beacon wps/p2p ie\n"); @@ -1431,7 +1572,8 @@ woal_cfg80211_set_beacon(struct wiphy *wiphy, params-> proberesp_ies_len, NULL, 0, NULL, 0, - MGMT_MASK_PROBE_RESP); + MGMT_MASK_PROBE_RESP, + MOAL_IOCTL_WAIT); if (ret) goto done; } @@ -1442,7 +1584,8 @@ woal_cfg80211_set_beacon(struct wiphy *wiphy, params-> assocresp_ies_len, NULL, 0, - MGMT_MASK_ASSOC_RESP); + MGMT_MASK_ASSOC_RESP, + MOAL_IOCTL_WAIT); if (ret) goto done; } @@ -1465,7 +1608,7 @@ woal_cfg80211_set_beacon(struct wiphy *wiphy, int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev) { - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); int ret = 0; #ifdef STA_SUPPORT moal_private *pmpriv = NULL; @@ -1478,7 +1621,7 @@ woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev) /* if the bss is still running, then stop it */ if (priv->bss_started == MTRUE) { if (MLAN_STATUS_SUCCESS != - woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, UAP_BSS_STOP)) { + woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT_TIMEOUT, UAP_BSS_STOP)) { ret = -EFAULT; goto done; } @@ -1494,11 +1637,11 @@ woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev) goto done; } } - woal_clear_all_mgmt_ies(priv); + woal_clear_all_mgmt_ies(priv, MOAL_IOCTL_WAIT); #ifdef STA_SUPPORT if (!woal_is_any_interface_active(priv->phandle)) { - pmpriv = woal_get_priv((moal_handle *) priv->phandle, + pmpriv = woal_get_priv((moal_handle *)priv->phandle, MLAN_BSS_ROLE_STA); if (pmpriv) woal_set_scan_time(pmpriv, ACTIVE_SCAN_CHAN_TIME, @@ -1526,10 +1669,14 @@ woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev) * @return 0 -- success, otherwise fail */ int -woal_cfg80211_del_station(struct wiphy *wiphy, - struct net_device *dev, u8 * mac_addr) +woal_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *mac_addr) +#else + u8 *mac_addr) +#endif { - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); ENTER(); if (priv->media_connected == MFALSE) { PRINTM(MINFO, "cfg80211: Media not connected!\n"); @@ -1544,7 +1691,7 @@ woal_cfg80211_del_station(struct wiphy *wiphy, if (!priv->phandle->is_go_timer_set && priv->bss_type != MLAN_BSS_TYPE_WIFIDIRECT) #endif - woal_deauth_station(priv, mac_addr); + woal_deauth_station(priv, (u8 *)mac_addr); } else { PRINTM(MIOCTL, "del all station\n"); } @@ -1565,9 +1712,14 @@ woal_cfg80211_del_station(struct wiphy *wiphy, */ int woal_uap_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, - u8 * mac, struct station_info *stainfo) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *mac, +#else + u8 *mac, +#endif + struct station_info *stainfo) { - moal_private *priv = (moal_private *) woal_get_netdev_priv(dev); + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); int ret = -EFAULT; int i = 0; mlan_ds_get_info *info = NULL; @@ -1590,7 +1742,7 @@ woal_uap_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, goto done; } - info = (mlan_ds_get_info *) ioctl_req->pbuf; + info = (mlan_ds_get_info *)ioctl_req->pbuf; info->sub_command = MLAN_OID_UAP_STA_LIST; ioctl_req->req_id = MLAN_IOCTL_GET_INFO; ioctl_req->action = MLAN_ACT_GET; @@ -1629,10 +1781,10 @@ woal_uap_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE */ mlan_status -woal_register_uap_cfg80211(struct net_device * dev, t_u8 bss_type) +woal_register_uap_cfg80211(struct net_device *dev, t_u8 bss_type) { mlan_status ret = MLAN_STATUS_SUCCESS; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); struct wireless_dev *wdev = NULL; ENTER(); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap_cfg80211.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap_cfg80211.h old mode 100755 new mode 100644 diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap_priv.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap_priv.c old mode 100755 new mode 100644 index a426cd39..c1b6b7ed --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap_priv.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap_priv.c @@ -56,7 +56,7 @@ Change log: int woal_uap_do_priv_ioctl(struct net_device *dev, struct ifreq *req, int cmd) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); struct iwreq *wrq = (struct iwreq *)req; int ret = 0; @@ -162,7 +162,7 @@ woal_uap_do_priv_ioctl(struct net_device *dev, struct ifreq *req, int cmd) * @return N/A */ void -woal_ioctl_get_uap_info_resp(moal_private * priv, mlan_ds_get_info * info) +woal_ioctl_get_uap_info_resp(moal_private *priv, mlan_ds_get_info *info) { ENTER(); switch (info->sub_command) { diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap_priv.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap_priv.h old mode 100755 new mode 100644 diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap_wext.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap_wext.c old mode 100755 new mode 100644 index 464446c7..65c78afd --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap_wext.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_uap_wext.c @@ -93,6 +93,7 @@ const chan_to_freq_t chan_to_freq[] = { {132, 5660, 1}, {136, 5680, 1}, {140, 5700, 1}, + {144, 5720, 1}, {149, 5745, 1}, {153, 5765, 1}, {157, 5785, 1}, @@ -214,7 +215,7 @@ static int woal_get_wap(struct net_device *dev, struct iw_request_info *info, struct sockaddr *awrq, char *extra) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); int ret = 0; ENTER(); @@ -244,7 +245,7 @@ woal_set_wap(struct net_device *dev, struct iw_request_info *info, struct sockaddr *awrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); const t_u8 zero_mac[MLAN_MAC_ADDR_LENGTH] = { 0, 0, 0, 0, 0, 0 }; ENTER(); @@ -255,7 +256,7 @@ woal_set_wap(struct net_device *dev, struct iw_request_info *info, } PRINTM(MINFO, "ASSOC: WAP: uAP bss : " MACSTR "\n", - MAC2STR((t_u8 *) awrq->sa_data)); + MAC2STR((t_u8 *)awrq->sa_data)); /* * Using this ioctl to start/stop the BSS, return if bss @@ -295,7 +296,7 @@ static int woal_set_freq(struct net_device *dev, struct iw_request_info *info, struct iw_freq *fwrq, char *extra) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_uap_bss_param *sys_cfg = NULL, *ap_cfg = NULL; int ret = 0, chan = 0, i = 0; @@ -377,7 +378,7 @@ static int woal_get_freq(struct net_device *dev, struct iw_request_info *info, struct iw_freq *fwrq, char *extra) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_uap_bss_param ap_cfg; t_u8 band = 0; int ret = 0; @@ -414,7 +415,7 @@ woal_get_freq(struct net_device *dev, struct iw_request_info *info, */ static int woal_set_bss_mode(struct net_device *dev, struct iw_request_info *info, - t_u32 * uwrq, char *extra) + t_u32 *uwrq, char *extra) { int ret = 0; ENTER(); @@ -445,7 +446,7 @@ woal_set_bss_mode(struct net_device *dev, struct iw_request_info *info, */ static int woal_get_bss_mode(struct net_device *dev, struct iw_request_info *info, - t_u32 * uwrq, char *extra) + t_u32 *uwrq, char *extra) { ENTER(); @@ -470,7 +471,7 @@ woal_set_encode(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_uap_bss_param *sys_cfg = NULL, *ap_cfg = NULL; wep_key *pkey = NULL; int key_index = 0; @@ -646,7 +647,7 @@ static int woal_get_encode(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); int index = (dwrq->flags & IW_ENCODE_INDEX); wep_key *pkey = NULL; mlan_uap_bss_param ap_cfg; @@ -763,7 +764,7 @@ static int woal_set_gen_ie(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_uap_bss_param sys_cfg; IEEEtypes_Header_t *tlv = NULL; int tlv_hdr_len = sizeof(IEEEtypes_Header_t), tlv_buf_left = 0; @@ -776,7 +777,7 @@ woal_set_gen_ie(struct net_device *dev, struct iw_request_info *info, woal_set_sys_config_invalid_data(&sys_cfg); tlv_buf_left = dwrq->length; - tlv = (IEEEtypes_Header_t *) extra; + tlv = (IEEEtypes_Header_t *)extra; while (tlv_buf_left >= tlv_hdr_len) { if (tlv->element_id == WPA_IE) { sys_cfg.protocol |= PROTOCOL_WPA; @@ -797,7 +798,7 @@ woal_set_gen_ie(struct net_device *dev, struct iw_request_info *info, PRINTM(MINFO, "Set IE Cipher TKIP + CCMP\n"); } memcpy(priv->bcn_ie_buf + priv->bcn_ie_len, - ((t_u8 *) tlv), + ((t_u8 *)tlv), sizeof(IEEEtypes_Header_t) + tlv->len); priv->bcn_ie_len += sizeof(IEEEtypes_Header_t) + tlv->len; @@ -818,7 +819,7 @@ woal_set_gen_ie(struct net_device *dev, struct iw_request_info *info, (CIPHER_TKIP | CIPHER_AES_CCMP); } memcpy(priv->bcn_ie_buf + priv->bcn_ie_len, - ((t_u8 *) tlv), + ((t_u8 *)tlv), sizeof(IEEEtypes_Header_t) + tlv->len); priv->bcn_ie_len += sizeof(IEEEtypes_Header_t) + tlv->len; @@ -828,8 +829,8 @@ woal_set_gen_ie(struct net_device *dev, struct iw_request_info *info, if (priv->group_cipher == CIPHER_AES_CCMP) sys_cfg.wpa_cfg.group_cipher = CIPHER_AES_CCMP; tlv_buf_left -= (tlv_hdr_len + tlv->len); - tlv = (IEEEtypes_Header_t *) ((t_u8 *) tlv + tlv_hdr_len + - tlv->len); + tlv = (IEEEtypes_Header_t *)((t_u8 *)tlv + tlv_hdr_len + + tlv->len); } sys_cfg.key_mgmt = priv->uap_key_mgmt; if (sys_cfg.key_mgmt & KEY_MGMT_PSK) @@ -889,7 +890,7 @@ woal_set_encode_ext(struct net_device *dev, struct iw_point *dwrq, char *extra) { struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); int key_index; t_u8 *pkey_material = NULL; mlan_ioctl_req *req = NULL; @@ -915,7 +916,7 @@ woal_set_encode_ext(struct net_device *dev, downloaded to firmware */ woal_set_sys_config_invalid_data(&sys_cfg); - pkey_material = (t_u8 *) (ext + 1); + pkey_material = (t_u8 *)(ext + 1); /* Disable Key */ if ((dwrq->flags & IW_ENCODE_DISABLED) && !ext->key_len) { sys_cfg.protocol = PROTOCOL_NO_SECURITY; @@ -949,7 +950,7 @@ woal_set_encode_ext(struct net_device *dev, ret = -ENOMEM; goto done; } - sec = (mlan_ds_sec_cfg *) req->pbuf; + sec = (mlan_ds_sec_cfg *)req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; req->req_id = MLAN_IOCTL_SEC_CFG; req->action = MLAN_ACT_SET; @@ -961,13 +962,13 @@ woal_set_encode_ext(struct net_device *dev, ETH_ALEN); sec->param.encrypt_key.key_flags = ext->ext_flags; if (ext->ext_flags & IW_ENCODE_EXT_RX_SEQ_VALID) { - memcpy(sec->param.encrypt_key.pn, (t_u8 *) ext->rx_seq, + memcpy(sec->param.encrypt_key.pn, (t_u8 *)ext->rx_seq, SEQ_MAX_SIZE); DBG_HEXDUMP(MCMD_D, "Uap Rx PN", sec->param.encrypt_key.pn, SEQ_MAX_SIZE); } if (ext->ext_flags & IW_ENCODE_EXT_TX_SEQ_VALID) { - memcpy(sec->param.encrypt_key.pn, (t_u8 *) ext->tx_seq, + memcpy(sec->param.encrypt_key.pn, (t_u8 *)ext->tx_seq, SEQ_MAX_SIZE); DBG_HEXDUMP(MCMD_D, "Uap Tx PN", sec->param.encrypt_key.pn, SEQ_MAX_SIZE); @@ -1042,7 +1043,7 @@ woal_set_mlme(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { struct iw_mlme *mlme = (struct iw_mlme *)extra; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ds_bss *bss = NULL; mlan_ds_get_info *pinfo = NULL; mlan_ioctl_req *req = NULL; @@ -1056,7 +1057,7 @@ woal_set_mlme(struct net_device *dev, memset(sta_addr, 0, ETH_ALEN); if ((mlme->cmd == IW_MLME_DEAUTH) || (mlme->cmd == IW_MLME_DISASSOC)) { - memcpy(sta_addr, (t_u8 *) mlme->addr.sa_data, ETH_ALEN); + memcpy(sta_addr, (t_u8 *)mlme->addr.sa_data, ETH_ALEN); PRINTM(MIOCTL, "Deauth station: " MACSTR ", reason=%d\n", MAC2STR(sta_addr), mlme->reason_code); @@ -1073,7 +1074,7 @@ woal_set_mlme(struct net_device *dev, LEAVE(); return -ENOMEM; } - pinfo = (mlan_ds_get_info *) req->pbuf; + pinfo = (mlan_ds_get_info *)req->pbuf; pinfo->sub_command = MLAN_OID_UAP_STA_LIST; req->req_id = MLAN_IOCTL_GET_INFO; req->action = MLAN_ACT_GET; @@ -1083,7 +1084,6 @@ woal_set_mlme(struct net_device *dev, goto done; } sta_list = - (mlan_ds_sta_list *) kmalloc(sizeof(mlan_ds_sta_list), GFP_KERNEL); if (sta_list == NULL) { PRINTM(MERROR, "Memory allocation failed!\n"); @@ -1100,7 +1100,7 @@ woal_set_mlme(struct net_device *dev, ret = -ENOMEM; goto done; } - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_UAP_DEAUTH_STA; req->req_id = MLAN_IOCTL_BSS; req->action = MLAN_ACT_SET; @@ -1154,7 +1154,7 @@ woal_set_auth(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_uap_bss_param sys_cfg; ENTER(); @@ -1324,7 +1324,7 @@ static int woal_get_auth(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_uap_bss_param ap_cfg; ENTER(); @@ -1419,7 +1419,7 @@ static int woal_get_range(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_uap_bss_param ap_cfg; struct iw_range *range = (struct iw_range *)extra; t_u8 band = 0; @@ -1573,7 +1573,7 @@ static int woal_set_essid(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_uap_bss_param sys_cfg; int ret = 0; @@ -1636,7 +1636,7 @@ static int woal_get_essid(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_uap_bss_param ap_cfg; ENTER(); @@ -1782,7 +1782,7 @@ get_wireless_stats:woal_get_uap_wireless_stats, struct iw_statistics * woal_get_uap_wireless_stats(struct net_device *dev) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); t_u16 wait_option = MOAL_NO_WAIT; ENTER(); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_wext.c b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_wext.c old mode 100755 new mode 100644 index 07e56599..4b6e82e1 --- a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_wext.c +++ b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_wext.c @@ -28,15 +28,15 @@ Change log: #ifdef STA_SUPPORT /** Approximate amount of data needed to pass a scan result back to iwlist */ -#define MAX_SCAN_CELL_SIZE (IW_EV_ADDR_LEN \ - + MLAN_MAX_SSID_LENGTH \ - + IW_EV_UINT_LEN \ - + IW_EV_FREQ_LEN \ - + IW_EV_QUAL_LEN \ - + MLAN_MAX_SSID_LENGTH \ - + IW_EV_PARAM_LEN \ - + 40) /* 40 for WPAIE - */ +#define MAX_SCAN_CELL_SIZE \ + (IW_EV_ADDR_LEN \ + + MLAN_MAX_SSID_LENGTH \ + + IW_EV_UINT_LEN \ + + IW_EV_FREQ_LEN \ + + IW_EV_QUAL_LEN \ + + MLAN_MAX_SSID_LENGTH \ + + IW_EV_PARAM_LEN \ + + 40) /* 40 for WPAIE */ /** Macro for minimum size of scan buffer */ #define MIN_ACCEPTED_GET_SCAN_BUF 8000 @@ -57,7 +57,7 @@ extern int hw_test; * @return 0--ssid is same, otherwise is different */ static t_s32 -woal_ssid_cmp(mlan_802_11_ssid * ssid1, mlan_802_11_ssid * ssid2) +woal_ssid_cmp(mlan_802_11_ssid *ssid1, mlan_802_11_ssid *ssid2) { ENTER(); @@ -147,7 +147,7 @@ static int woal_set_nick(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); ENTER(); /* * Check the size of the string @@ -176,7 +176,7 @@ static int woal_get_nick(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); ENTER(); /* * Get the Nick Name saved @@ -250,7 +250,7 @@ woal_set_freq(struct net_device *dev, struct iw_request_info *info, struct iw_freq *fwrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ds_bss *bss = NULL; mlan_ioctl_req *req = NULL; mlan_status status = MLAN_STATUS_SUCCESS; @@ -261,7 +261,7 @@ woal_set_freq(struct net_device *dev, struct iw_request_info *info, ret = -ENOMEM; goto done; } - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; /* * If setting by frequency, convert to a channel */ @@ -280,7 +280,8 @@ woal_set_freq(struct net_device *dev, struct iw_request_info *info, goto done; } if (MLAN_STATUS_SUCCESS != - woal_change_adhoc_chan(priv, bss->param.bss_chan.channel)) + woal_change_adhoc_chan(priv, bss->param.bss_chan.channel, + MOAL_IOCTL_WAIT)) ret = -EFAULT; done: @@ -305,7 +306,7 @@ woal_get_freq(struct net_device *dev, struct iw_request_info *info, struct iw_freq *fwrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ds_bss *bss = NULL; mlan_ioctl_req *req = NULL; mlan_status status = MLAN_STATUS_SUCCESS; @@ -317,7 +318,7 @@ woal_get_freq(struct net_device *dev, struct iw_request_info *info, ret = -ENOMEM; goto done; } - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_BSS_CHANNEL; req->req_id = MLAN_IOCTL_BSS; req->action = MLAN_ACT_GET; @@ -349,10 +350,10 @@ woal_get_freq(struct net_device *dev, struct iw_request_info *info, */ static int woal_set_bss_mode(struct net_device *dev, struct iw_request_info *info, - t_u32 * uwrq, char *extra) + t_u32 *uwrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ds_bss *bss = NULL; mlan_ioctl_req *req = NULL; mlan_status status = MLAN_STATUS_SUCCESS; @@ -364,7 +365,7 @@ woal_set_bss_mode(struct net_device *dev, struct iw_request_info *info, ret = -ENOMEM; goto done; } - bss = (mlan_ds_bss *) req->pbuf; + bss = (mlan_ds_bss *)req->pbuf; bss->sub_command = MLAN_OID_BSS_MODE; req->req_id = MLAN_IOCTL_BSS; req->action = MLAN_ACT_SET; @@ -412,7 +413,7 @@ woal_get_wap(struct net_device *dev, struct iw_request_info *info, struct sockaddr *awrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_bss_info bss_info; ENTER(); @@ -448,10 +449,13 @@ woal_set_wap(struct net_device *dev, struct iw_request_info *info, struct sockaddr *awrq, char *extra) { int ret = 0; - const t_u8 bcast[MLAN_MAC_ADDR_LENGTH] = - { 255, 255, 255, 255, 255, 255 }; - const t_u8 zero_mac[MLAN_MAC_ADDR_LENGTH] = { 0, 0, 0, 0, 0, 0 }; - moal_private *priv = (moal_private *) netdev_priv(dev); + const t_u8 bcast[MLAN_MAC_ADDR_LENGTH] = { + 255, 255, 255, 255, 255, 255 + }; + const t_u8 zero_mac[MLAN_MAC_ADDR_LENGTH] = { + 0, 0, 0, 0, 0, 0 + }; + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ssid_bssid ssid_bssid; mlan_bss_info bss_info; @@ -463,7 +467,7 @@ woal_set_wap(struct net_device *dev, struct iw_request_info *info, } PRINTM(MINFO, "ASSOC: WAP: sa_data: " MACSTR "\n", - MAC2STR((t_u8 *) awrq->sa_data)); + MAC2STR((t_u8 *)awrq->sa_data)); if (MLAN_STATUS_SUCCESS != woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info)) { @@ -541,9 +545,9 @@ woal_set_wap(struct net_device *dev, struct iw_request_info *info, */ static int woal_get_bss_mode(struct net_device *dev, struct iw_request_info *info, - t_u32 * uwrq, char *extra) + t_u32 *uwrq, char *extra) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); ENTER(); *uwrq = woal_get_mode(priv, MOAL_IOCTL_WAIT); LEAVE(); @@ -609,7 +613,7 @@ woal_set_txpow(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_power_cfg_t power_cfg; ENTER(); @@ -652,7 +656,7 @@ woal_get_txpow(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_power_cfg_t power_cfg; mlan_bss_info bss_info; @@ -700,7 +704,7 @@ woal_set_power(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { int ret = 0, disabled; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); ENTER(); @@ -738,7 +742,7 @@ woal_get_power(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { int ret = 0, ps_mode; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); ENTER(); @@ -775,7 +779,7 @@ woal_set_retry(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { int ret = 0, retry_val = vwrq->value; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); ENTER(); @@ -816,7 +820,7 @@ woal_get_retry(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { int retry_val, ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); ENTER(); @@ -854,7 +858,7 @@ woal_set_encode(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ds_sec_cfg *sec = NULL; mlan_ioctl_req *req = NULL; int index = 0; @@ -868,7 +872,7 @@ woal_set_encode(struct net_device *dev, struct iw_request_info *info, ret = -ENOMEM; goto done; } - sec = (mlan_ds_sec_cfg *) req->pbuf; + sec = (mlan_ds_sec_cfg *)req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; req->req_id = MLAN_IOCTL_SEC_CFG; req->action = MLAN_ACT_SET; @@ -977,7 +981,7 @@ woal_get_encode(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_ds_sec_cfg *sec = NULL; mlan_ioctl_req *req = NULL; t_u32 auth_mode; @@ -1023,7 +1027,7 @@ woal_get_encode(struct net_device *dev, struct iw_request_info *info, goto done; } - sec = (mlan_ds_sec_cfg *) req->pbuf; + sec = (mlan_ds_sec_cfg *)req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; req->req_id = MLAN_IOCTL_SEC_CFG; req->action = MLAN_ACT_GET; @@ -1073,7 +1077,7 @@ woal_set_rate(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_rate_cfg_t rate_cfg; ENTER(); @@ -1110,7 +1114,7 @@ woal_get_rate(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_rate_cfg_t rate_cfg; ENTER(); @@ -1147,7 +1151,7 @@ woal_set_rts(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); int rthr = vwrq->value; ENTER(); @@ -1187,7 +1191,7 @@ woal_get_rts(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { int rthr, ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); ENTER(); @@ -1222,7 +1226,7 @@ woal_set_frag(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); int fthr = vwrq->value; ENTER(); @@ -1262,7 +1266,7 @@ woal_get_frag(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { int ret = 0, fthr; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); ENTER(); @@ -1298,14 +1302,15 @@ woal_get_gen_ie(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); int copy_size = 0, ie_len; t_u8 ie[MAX_IE_SIZE]; ENTER(); if (MLAN_STATUS_SUCCESS != - woal_set_get_gen_ie(priv, MLAN_ACT_GET, ie, &ie_len)) { + woal_set_get_gen_ie(priv, MLAN_ACT_GET, ie, &ie_len, + MOAL_IOCTL_WAIT)) { ret = -EFAULT; goto done; } @@ -1338,7 +1343,7 @@ woal_set_gen_ie(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); int ie_len = dwrq->length; const t_u8 wps_oui[] = { 0x00, 0x50, 0xf2, 0x04 }; mlan_ds_wps_cfg *pwps = NULL; @@ -1348,14 +1353,14 @@ woal_set_gen_ie(struct net_device *dev, struct iw_request_info *info, ENTER(); /* extra + 2 to skip element id and length */ - if (!memcmp((t_u8 *) (extra + 2), wps_oui, sizeof(wps_oui))) { + if (!memcmp((t_u8 *)(extra + 2), wps_oui, sizeof(wps_oui))) { req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wps_cfg)); if (req == NULL) { ret = -ENOMEM; goto done; } - pwps = (mlan_ds_wps_cfg *) req->pbuf; + pwps = (mlan_ds_wps_cfg *)req->pbuf; req->req_id = MLAN_IOCTL_WPS_CFG; req->action = MLAN_ACT_SET; pwps->sub_command = MLAN_OID_WPS_CFG_SESSION; @@ -1369,7 +1374,8 @@ woal_set_gen_ie(struct net_device *dev, struct iw_request_info *info, } if (MLAN_STATUS_SUCCESS != - woal_set_get_gen_ie(priv, MLAN_ACT_SET, (t_u8 *) extra, &ie_len)) { + woal_set_get_gen_ie(priv, MLAN_ACT_SET, (t_u8 *)extra, &ie_len, + MOAL_IOCTL_WAIT)) { ret = -EFAULT; goto done; } @@ -1398,7 +1404,7 @@ woal_set_encode_ext(struct net_device *dev, struct iw_point *dwrq, char *extra) { struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); int key_index; t_u8 *pkey_material = NULL; mlan_ioctl_req *req = NULL; @@ -1421,13 +1427,13 @@ woal_set_encode_ext(struct net_device *dev, ret = -ENOMEM; goto done; } - sec = (mlan_ds_sec_cfg *) req->pbuf; + sec = (mlan_ds_sec_cfg *)req->pbuf; sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; req->req_id = MLAN_IOCTL_SEC_CFG; req->action = MLAN_ACT_SET; - pkey_material = (t_u8 *) (ext + 1); + pkey_material = (t_u8 *)(ext + 1); sec->param.encrypt_key.key_len = ext->key_len; - memcpy(sec->param.encrypt_key.mac_addr, (u8 *) ext->addr.sa_data, + memcpy(sec->param.encrypt_key.mac_addr, (u8 *)ext->addr.sa_data, ETH_ALEN); /* Disable and Remove Key */ if ((dwrq->flags & IW_ENCODE_DISABLED) && !ext->key_len) { @@ -1451,13 +1457,13 @@ woal_set_encode_ext(struct net_device *dev, sec->param.encrypt_key.key_index = key_index; sec->param.encrypt_key.key_flags = ext->ext_flags; if (ext->ext_flags & IW_ENCODE_EXT_RX_SEQ_VALID) { - memcpy(sec->param.encrypt_key.pn, (t_u8 *) ext->rx_seq, + memcpy(sec->param.encrypt_key.pn, (t_u8 *)ext->rx_seq, SEQ_MAX_SIZE); DBG_HEXDUMP(MCMD_D, "Rx PN", sec->param.encrypt_key.pn, SEQ_MAX_SIZE); } if (ext->ext_flags & IW_ENCODE_EXT_TX_SEQ_VALID) { - memcpy(sec->param.encrypt_key.pn, (t_u8 *) ext->tx_seq, + memcpy(sec->param.encrypt_key.pn, (t_u8 *)ext->tx_seq, SEQ_MAX_SIZE); DBG_HEXDUMP(MCMD_D, "Tx PN", sec->param.encrypt_key.pn, SEQ_MAX_SIZE); @@ -1478,10 +1484,10 @@ woal_set_encode_ext(struct net_device *dev, /* Set WAPI key */ if (ext->alg == IW_ENCODE_ALG_SMS4) { sec->param.encrypt_key.is_wapi_key = MTRUE; - memcpy(sec->param.encrypt_key.pn, (t_u8 *) ext->tx_seq, + memcpy(sec->param.encrypt_key.pn, (t_u8 *)ext->tx_seq, SEQ_MAX_SIZE); memcpy(&sec->param.encrypt_key.pn[SEQ_MAX_SIZE], - (t_u8 *) ext->rx_seq, SEQ_MAX_SIZE); + (t_u8 *)ext->rx_seq, SEQ_MAX_SIZE); DBG_HEXDUMP(MCMD_D, "WAPI PN", sec->param.encrypt_key.pn, PN_SIZE); } @@ -1531,7 +1537,7 @@ woal_set_mlme(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { struct iw_mlme *mlme = (struct iw_mlme *)extra; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); int ret = 0; ENTER(); @@ -1539,7 +1545,7 @@ woal_set_mlme(struct net_device *dev, if (MLAN_STATUS_SUCCESS != woal_disconnect(priv, MOAL_IOCTL_WAIT, - (t_u8 *) mlme->addr.sa_data)) + (t_u8 *)mlme->addr.sa_data)) ret = -EFAULT; } LEAVE(); @@ -1560,7 +1566,7 @@ woal_set_auth(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); t_u32 auth_mode = 0; t_u32 encrypt_mode = 0; ENTER(); @@ -1657,7 +1663,7 @@ woal_get_auth(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); t_u32 encrypt_mode = 0; t_u32 auth_mode; t_u32 wpa_enable; @@ -1768,15 +1774,17 @@ woal_get_range(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { int i; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); struct iw_range *range = (struct iw_range *)extra; moal_802_11_rates rates; mlan_chan_list *pchan_list = NULL; mlan_bss_info bss_info; + gfp_t flag; ENTER(); - pchan_list = kmalloc(sizeof(mlan_chan_list), GFP_KERNEL); + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + pchan_list = kzalloc(sizeof(mlan_chan_list), flag); if (!pchan_list) { LEAVE(); return -ENOMEM; @@ -1803,8 +1811,6 @@ woal_get_range(struct net_device *dev, struct iw_request_info *info, range->num_frequency = 0; - memset(pchan_list, 0, sizeof(mlan_chan_list)); - woal_get_channel_list(priv, MOAL_IOCTL_WAIT, pchan_list); range->num_frequency = MIN(pchan_list->num_of_chan, IW_MAX_FREQUENCIES); @@ -1930,7 +1936,7 @@ woal_get_range(struct net_device *dev, struct iw_request_info *info, * @return 0 -- success, otherwise fail */ static int -woal_set_rxfilter(moal_private * priv, BOOLEAN enable) +woal_set_rxfilter(moal_private *priv, BOOLEAN enable) { int ret = 0; mlan_ioctl_req *req = NULL; @@ -1945,7 +1951,7 @@ woal_set_rxfilter(moal_private * priv, BOOLEAN enable) ret = -ENOMEM; goto done; } - misc = (mlan_ds_misc_cfg *) req->pbuf; + misc = (mlan_ds_misc_cfg *)req->pbuf; mef_cfg = &misc->param.mef_cfg; req->req_id = MLAN_IOCTL_MISC_CFG; misc->sub_command = MLAN_OID_MISC_MEF_CFG; @@ -1981,7 +1987,7 @@ woal_set_priv(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); char *buf = NULL; int power_mode = 0; int band = 0; @@ -1992,31 +1998,38 @@ woal_set_priv(struct net_device *dev, struct iw_request_info *info, char *pdata = NULL; t_u8 country_code[COUNTRY_CODE_LEN]; int len = 0; + gfp_t flag; ENTER(); if (!priv || !priv->phandle) { PRINTM(MERROR, "priv or handle is NULL\n"); ret = -EFAULT; goto done; } - buf = kmalloc(dwrq->length + 1, GFP_KERNEL); + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + buf = kzalloc(dwrq->length + 1, flag); if (!buf) { ret = -ENOMEM; goto done; } - memset(buf, 0, dwrq->length + 1); if (copy_from_user(buf, dwrq->pointer, dwrq->length)) { ret = -EFAULT; goto done; } - PRINTM(MIOCTL, "SIOCSIWPRIV requst = %s\n", buf); + PRINTM(MIOCTL, "SIOCSIWPRIV request = %s\n", buf); if (strncmp(buf, "RSSILOW-THRESHOLD", strlen("RSSILOW-THRESHOLD")) == 0) { - pdata = buf + strlen("RSSILOW-THRESHOLD") + 1; - if (MLAN_STATUS_SUCCESS != - woal_set_rssi_low_threshold(priv, pdata, MOAL_IOCTL_WAIT)) { + if (dwrq->length > strlen("RSSILOW-THRESHOLD") + 1) { + pdata = buf + strlen("RSSILOW-THRESHOLD") + 1; + if (MLAN_STATUS_SUCCESS != + woal_set_rssi_low_threshold(priv, pdata, + MOAL_IOCTL_WAIT)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else { ret = -EFAULT; goto done; } - len = sprintf(buf, "OK\n") + 1; } else if (strncmp(buf, "RSSI", strlen("RSSI")) == 0) { if (MLAN_STATUS_SUCCESS != woal_get_bss_info(priv, MOAL_IOCTL_WAIT, @@ -2076,15 +2089,20 @@ woal_set_priv(struct net_device *dev, struct iw_request_info *info, PRINTM(MIOCTL, "Set Passive Scan\n"); len = sprintf(buf, "OK\n") + 1; } else if (strncmp(buf, "POWERMODE", strlen("POWERMODE")) == 0) { - pdata = buf + strlen("POWERMODE") + 1; - if (!hw_test) { - if (MLAN_STATUS_SUCCESS != - woal_set_powermode(priv, pdata)) { - ret = -EFAULT; - goto done; + if (dwrq->length > strlen("POWERMODE") + 1) { + pdata = buf + strlen("POWERMODE") + 1; + if (!hw_test) { + if (MLAN_STATUS_SUCCESS != + woal_set_powermode(priv, pdata)) { + ret = -EFAULT; + goto done; + } } + len = sprintf(buf, "OK\n") + 1; + } else { + ret = -EFAULT; + goto done; } - len = sprintf(buf, "OK\n") + 1; } else if (strncmp(buf, "COUNTRY", strlen("COUNTRY")) == 0) { memset(country_code, 0, sizeof(country_code)); memcpy(country_code, buf + strlen("COUNTRY") + 1, @@ -2170,42 +2188,65 @@ woal_set_priv(struct net_device *dev, struct iw_request_info *info, #endif len = sprintf(buf, "OK\n") + 1; } else if (strncmp(buf, "RXFILTER-ADD", strlen("RXFILTER-ADD")) == 0) { - pdata = buf + strlen("RXFILTER-ADD") + 1; - if (MLAN_STATUS_SUCCESS != woal_add_rxfilter(priv, pdata)) { + if (dwrq->length > strlen("RXFILTER-ADD") + 1) { + pdata = buf + strlen("RXFILTER-ADD") + 1; + if (MLAN_STATUS_SUCCESS != + woal_add_rxfilter(priv, pdata)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else { ret = -EFAULT; goto done; } - len = sprintf(buf, "OK\n") + 1; } else if (strncmp(buf, "RXFILTER-REMOVE", strlen("RXFILTER-REMOVE")) == 0) { - pdata = buf + strlen("RXFILTER-REMOVE") + 1; - if (MLAN_STATUS_SUCCESS != woal_remove_rxfilter(priv, pdata)) { + if (dwrq->length > strlen("RXFILTER-REMOVE") + 1) { + pdata = buf + strlen("RXFILTER-REMOVE") + 1; + if (MLAN_STATUS_SUCCESS != + woal_remove_rxfilter(priv, pdata)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else { ret = -EFAULT; goto done; } - len = sprintf(buf, "OK\n") + 1; } else if (strncmp(buf, "QOSINFO", strlen("QOSINFO")) == 0) { - pdata = buf + strlen("QOSINFO") + 1; - if (MLAN_STATUS_SUCCESS != - woal_priv_qos_cfg(priv, MLAN_ACT_SET, pdata)) { + if (dwrq->length > strlen("QOSINFO") + 1) { + pdata = buf + strlen("QOSINFO") + 1; + if (MLAN_STATUS_SUCCESS != + woal_priv_qos_cfg(priv, MLAN_ACT_SET, pdata)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else { ret = -EFAULT; goto done; } - len = sprintf(buf, "OK\n") + 1; } else if (strncmp(buf, "SLEEPPD", strlen("SLEEPPD")) == 0) { - pdata = buf + strlen("SLEEPPD") + 1; - if (MLAN_STATUS_SUCCESS != woal_set_sleeppd(priv, pdata)) { + if (dwrq->length > strlen("SLEEPPD") + 1) { + pdata = buf + strlen("SLEEPPD") + 1; + if (MLAN_STATUS_SUCCESS != + woal_set_sleeppd(priv, pdata)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else { ret = -EFAULT; goto done; } - len = sprintf(buf, "OK\n") + 1; } else { PRINTM(MIOCTL, "Unknow PRIVATE command: %s, ignored\n", buf); ret = -EFAULT; goto done; } PRINTM(MIOCTL, "PRIV Command return: %s, length=%d\n", buf, len); - dwrq->length = (t_u16) len; + dwrq->length = (t_u16)len; if (copy_to_user(dwrq->pointer, buf, dwrq->length)) ret = -EFAULT; done: @@ -2229,7 +2270,7 @@ woal_set_scan(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { int ret = 0; - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); moal_handle *handle = priv->phandle; #if WIRELESS_EXT >= 18 struct iw_scan_req *req; @@ -2263,7 +2304,7 @@ woal_set_scan(struct net_device *dev, struct iw_request_info *info, req_ssid.ssid_len = req->essid_len; memcpy(req_ssid.ssid, - (t_u8 *) req->essid, req->essid_len); + (t_u8 *)req->essid, req->essid_len); if (MLAN_STATUS_SUCCESS != woal_request_scan(priv, MOAL_NO_WAIT, &req_ssid)) { ret = -EFAULT; @@ -2309,7 +2350,7 @@ static int woal_set_essid(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_802_11_ssid req_ssid; mlan_ssid_bssid ssid_bssid; #ifdef REASSOCIATION @@ -2388,7 +2429,8 @@ woal_set_essid(struct net_device *dev, struct iw_request_info *info, if (dwrq->flags != 0xFFFF) { if (MLAN_STATUS_SUCCESS != - woal_find_essid(priv, &ssid_bssid)) { + woal_find_essid(priv, &ssid_bssid, + MOAL_IOCTL_WAIT)) { /* Do specific SSID scanning */ if (MLAN_STATUS_SUCCESS != woal_request_scan(priv, MOAL_IOCTL_WAIT, @@ -2413,7 +2455,10 @@ woal_set_essid(struct net_device *dev, struct iw_request_info *info, ret = -EFAULT; goto setessid_ret; } - } + } else if (MLAN_STATUS_SUCCESS != + woal_find_best_network(priv, MOAL_IOCTL_WAIT, &ssid_bssid)) + /* Adhoc start, Check the channel command */ + woal_11h_channel_check_ioctl(priv, MOAL_IOCTL_WAIT); /* Connect to BSS by ESSID */ memset(&ssid_bssid.bssid, 0, MLAN_MAC_ADDR_LENGTH); @@ -2463,7 +2508,7 @@ static int woal_get_essid(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); mlan_bss_info bss_info; int ret = 0; @@ -2507,7 +2552,7 @@ static int woal_get_scan(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); int ret = 0; char *current_ev = extra; char *end_buf = extra + IW_SCAN_MAX_DATA; @@ -2529,6 +2574,7 @@ woal_get_scan(struct net_device *dev, struct iw_request_info *info, t_u8 *pbeacon; IEEEtypes_ElementId_e element_id; t_u8 element_len; + gfp_t flag; ENTER(); @@ -2536,8 +2582,8 @@ woal_get_scan(struct net_device *dev, struct iw_request_info *info, LEAVE(); return -EAGAIN; } - - buf = kmalloc((buf_size), GFP_KERNEL); + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + buf = kzalloc((buf_size), flag); if (!buf) { PRINTM(MERROR, "Cannot allocate buffer!\n"); ret = -EFAULT; @@ -2557,7 +2603,7 @@ woal_get_scan(struct net_device *dev, struct iw_request_info *info, ret = -EFAULT; goto done; } - scan_table = (BSSDescriptor_t *) scan_resp.pscan_table; + scan_table = (BSSDescriptor_t *)scan_resp.pscan_table; if (dwrq->length) end_buf = extra + dwrq->length; if (priv->media_connected == MTRUE) @@ -2574,7 +2620,7 @@ woal_get_scan(struct net_device *dev, struct iw_request_info *info, PRINTM(MINFO, "i=%d break out: current_ev=%p end_buf=%p " "MAX_SCAN_CELL_SIZE=%d\n", i, current_ev, - end_buf, (t_u32) MAX_SCAN_CELL_SIZE); + end_buf, (t_u32)MAX_SCAN_CELL_SIZE); ret = -E2BIG; break; } @@ -2661,8 +2707,7 @@ woal_get_scan(struct net_device *dev, struct iw_request_info *info, iwe.u.qual.level = rssi.data_rssi_avg; } iwe.u.qual.qual = - woal_rssi_to_quality((t_s16) - (iwe.u.qual.level - 0x100)); + woal_rssi_to_quality((t_s16)(iwe.u.qual.level - 0x100)); iwe.len = IW_EV_QUAL_LEN; current_ev = IWE_STREAM_ADD_EVENT(info, current_ev, end_buf, &iwe, @@ -2721,7 +2766,6 @@ woal_get_scan(struct net_device *dev, struct iw_request_info *info, /* Beacon Interval */ memset(&iwe, 0, sizeof(iwe)); - memset(buf, 0, buf_size); ptr = buf; ptr += sprintf(ptr, "Beacon interval=%d", scan_table[i].beacon_period); @@ -2750,9 +2794,9 @@ woal_get_scan(struct net_device *dev, struct iw_request_info *info, while ((unsigned int)beacon_size >= sizeof(IEEEtypes_Header_t)) { element_id = - (IEEEtypes_ElementId_e) (*(t_u8 *) - pbeacon); - element_len = *((t_u8 *) pbeacon + 1); + (IEEEtypes_ElementId_e)(*(t_u8 *) + pbeacon); + element_len = *((t_u8 *)pbeacon + 1); if ((unsigned int)beacon_size < (unsigned int)element_len + sizeof(IEEEtypes_Header_t)) { @@ -2767,7 +2811,7 @@ woal_get_scan(struct net_device *dev, struct iw_request_info *info, case VENDOR_SPECIFIC_221: case RSN_IE: case WAPI_IE: - praw_data = (t_u8 *) pbeacon; + praw_data = (t_u8 *)pbeacon; memset(&iwe, 0, sizeof(iwe)); memset(buf, 0, buf_size); ptr = buf; @@ -2808,7 +2852,10 @@ woal_get_scan(struct net_device *dev, struct iw_request_info *info, ptr = buf; ptr += sprintf(ptr, "band="); memset(&iwe, 0, sizeof(iwe)); - ptr += sprintf(ptr, "bg"); + if (scan_table[i].bss_band == BAND_A) + ptr += sprintf(ptr, "a"); + else + ptr += sprintf(ptr, "bg"); iwe.u.data.length = strlen(buf); PRINTM(MINFO, "iwe.u.data.length %d\n", iwe.u.data.length); PRINTM(MINFO, "BUF: %s\n", buf); @@ -2948,7 +2995,7 @@ static const iw_handler woal_private_handler[] = { * @return N/A */ void -woal_send_iwevcustom_event(moal_private * priv, char *str) +woal_send_iwevcustom_event(moal_private *priv, char *str) { union iwreq_data iwrq; char buf[IW_CUSTOM_MAX]; @@ -2982,7 +3029,7 @@ woal_send_iwevcustom_event(moal_private * priv, char *str) * @return N/A */ void -woal_send_mic_error_event(moal_private * priv, t_u32 event) +woal_send_mic_error_event(moal_private *priv, t_u32 event) { union iwreq_data iwrq; struct iw_michaelmicfailure mic; @@ -3030,7 +3077,7 @@ get_wireless_stats:woal_get_wireless_stats, struct iw_statistics * woal_get_wireless_stats(struct net_device *dev) { - moal_private *priv = (moal_private *) netdev_priv(dev); + moal_private *priv = (moal_private *)netdev_priv(dev); t_u16 wait_option = MOAL_NO_WAIT; ENTER(); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_wext.h b/arch/arm/mach-berlin/modules/wlan_sd8801/mlinux/moal_wext.h old mode 100755 new mode 100644 diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/Makefile b/arch/arm/mach-berlin/modules/wlan_sd8887/Makefile new file mode 100644 index 00000000..0b6103d1 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/Makefile @@ -0,0 +1,538 @@ +# File: Makefile +# +# Copyright (C) 2008-2012, Marvell International Ltd. +# +# This software file (the "File") is distributed by Marvell International +# Ltd. under the terms of the GNU General Public License Version 2, June 1991 +# (the "License"). You may use, redistribute and/or modify this File in +# accordance with the terms and conditions of the License, a copy of which +# is available by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the +# worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. +# +# A copy of the GPL is available in file gpl-2.0.txt accompanying in this +# deliverables. +# +# THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE +# IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE +# ARE EXPRESSLY DISCLAIMED. The License provides additional details about +# this warranty disclaimer. + +############################################################################# +# Configuration Options +############################################################################# + +# Debug Option +# DEBUG LEVEL n/1/2: +# n: NO DEBUG +# 1: Only PRINTM(MMSG,...), PRINTM(MFATAL,...), ... +# 2: All PRINTM() +CONFIG_DEBUG=1 + +# Proc debug file +CONFIG_PROC_DEBUG=y + +# Enable STA mode support +CONFIG_STA_SUPPORT=y + +# Enable uAP mode support +CONFIG_UAP_SUPPORT=y + +# Enable WIFIDIRECT support +CONFIG_WIFI_DIRECT_SUPPORT=y + +# Enable WIFIDISPLAY support +CONFIG_WIFI_DISPLAY_SUPPORT=y + +# Re-association in driver +CONFIG_REASSOCIATION=y + +CONFIG_802_11W=y + +# Manufacturing firmware support +CONFIG_MFG_CMD_SUPPORT=y + +# Big-endian platform +CONFIG_BIG_ENDIAN=n + +# Enable driver based authenticator +#CONFIG_DRV_EMBEDDED_AUTHENTICATOR=y +#CONFIG_EMBEDDED_SUPP_AUTH=y + + +# Enable driver based supplicant +#CONFIG_DRV_EMBEDDED_SUPPLICANT=y +#CONFIG_EMBEDDED_SUPP_AUTH=y + +# Enable SDIO multi-port Tx aggregation +CONFIG_SDIO_MULTI_PORT_TX_AGGR=y + +# Enable SDIO multi-port Rx aggregation +CONFIG_SDIO_MULTI_PORT_RX_AGGR=y + +# SDIO suspend/resume +CONFIG_SDIO_SUSPEND_RESUME=y + +# DFS testing support +#CONFIG_DFS_TESTING_SUPPORT=y + + + +CONFIG_ANDROID_KERNEL=n + +#32bit app over 64bit kernel support +CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT=n + +# Use static link for app build +export CONFIG_STATIC_LINK=y + +############################################################################# +# Select Platform Tools +############################################################################# + +MODEXT = ko +EXTRA_CFLAGS += -I$(srctree)/include +EXTRA_CFLAGS += -I$(srctree)/arch/arm/mach-berlin/wlan_sd8887/mlan +EXTRA_CFLAGS += -I$(PWD)/mlan/esa +EXTRA_CFLAGS += -I$(PWD)/mlan/esa/common +EXTRA_CFLAGS += -I$(PWD)/arch/arm/mach-berlin/modules/wlan_sd8887/mlan +EXTRA_CFLAGS += -I$(PWD)/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/esa +EXTRA_CFLAGS += -I$(PWD)/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/esa/common + +#EXTRA_CFLAGS += -I$(M)/mlan +EXTRA_CFLAGS += -DLINUX + + +############################################################################# +# Compiler Flags +############################################################################# + + + EXTRA_CFLAGS += -DFPNUM='"66"' + +ifeq ($(CONFIG_DEBUG),1) + EXTRA_CFLAGS += -DDEBUG_LEVEL1 +endif + +ifeq ($(CONFIG_DEBUG),2) + EXTRA_CFLAGS += -DDEBUG_LEVEL1 + EXTRA_CFLAGS += -DDEBUG_LEVEL2 + DBG= -dbg +endif + +ifeq ($(CONFIG_PROC_DEBUG),y) + EXTRA_CFLAGS += -DPROC_DEBUG + export CONFIG_PROC_DEBUG +endif + +ifeq ($(CONFIG_64BIT), y) + EXTRA_CFLAGS += -DMLAN_64BIT +endif + +ifeq ($(CONFIG_STA_SUPPORT),y) + EXTRA_CFLAGS += -DSTA_SUPPORT +ifeq ($(CONFIG_REASSOCIATION),y) + EXTRA_CFLAGS += -DREASSOCIATION +endif +else +CONFIG_WIFI_DIRECT_SUPPORT=n +CONFIG_WIFI_DISPLAY_SUPPORT=n +CONFIG_STA_WEXT=n +CONFIG_STA_CFG80211=n +endif + +ifeq ($(CONFIG_UAP_SUPPORT),y) + EXTRA_CFLAGS += -DUAP_SUPPORT +else +CONFIG_WIFI_DIRECT_SUPPORT=n +CONFIG_WIFI_DISPLAY_SUPPORT=n +CONFIG_UAP_WEXT=n +CONFIG_UAP_CFG80211=n +endif + +ifeq ($(CONFIG_WIFI_DIRECT_SUPPORT),y) + EXTRA_CFLAGS += -DWIFI_DIRECT_SUPPORT +endif +ifeq ($(CONFIG_WIFI_DISPLAY_SUPPORT),y) + EXTRA_CFLAGS += -DWIFI_DISPLAY_SUPPORT +endif + +ifeq ($(CONFIG_MFG_CMD_SUPPORT),y) + EXTRA_CFLAGS += -DMFG_CMD_SUPPORT +endif + +ifeq ($(CONFIG_BIG_ENDIAN),y) + EXTRA_CFLAGS += -DBIG_ENDIAN_SUPPORT +endif + +ifeq ($(CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT),y) + EXTRA_CFLAGS += -DUSERSPACE_32BIT_OVER_KERNEL_64BIT +endif + +ifeq ($(CONFIG_SDIO_MULTI_PORT_TX_AGGR),y) + EXTRA_CFLAGS += -DSDIO_MULTI_PORT_TX_AGGR +endif + +ifeq ($(CONFIG_SDIO_MULTI_PORT_RX_AGGR),y) + EXTRA_CFLAGS += -DSDIO_MULTI_PORT_RX_AGGR +endif + +ifeq ($(CONFIG_SDIO_SUSPEND_RESUME),y) + EXTRA_CFLAGS += -DSDIO_SUSPEND_RESUME +endif + + +ifeq ($(CONFIG_DFS_TESTING_SUPPORT),y) + EXTRA_CFLAGS += -DDFS_TESTING_SUPPORT +endif + + +ifeq ($(CONFIG_ANDROID_KERNEL), y) + EXTRA_CFLAGS += -DANDROID_KERNEL +endif + + + +############################################################################# +# Make Targets +############################################################################# + + +ifeq ($(CONFIG_WIRELESS_EXT),y) +ifeq ($(CONFIG_WEXT_PRIV),y) + # Enable WEXT for STA + CONFIG_STA_WEXT=y + # Enable WEXT for uAP + CONFIG_UAP_WEXT=y +else +# Disable WEXT for STA + CONFIG_STA_WEXT=n +# Disable WEXT for uAP + CONFIG_UAP_WEXT=n +endif +endif + +# Enable CFG80211 for STA +ifeq ($(CONFIG_CFG80211),y) + CONFIG_STA_CFG80211=y +else +ifeq ($(CONFIG_CFG80211),m) + CONFIG_STA_CFG80211=y +else + CONFIG_STA_CFG80211=n +endif +endif + +# Enable CFG80211 for uAP +ifeq ($(CONFIG_CFG80211),y) + CONFIG_UAP_CFG80211=y +else +ifeq ($(CONFIG_CFG80211),m) + CONFIG_UAP_CFG80211=y +else + CONFIG_UAP_CFG80211=n +endif +endif + +ifneq ($(CONFIG_STA_SUPPORT),y) + CONFIG_WIFI_DIRECT_SUPPORT=n + CONFIG_WIFI_DISPLAY_SUPPORT=n + CONFIG_STA_WEXT=n + CONFIG_STA_CFG80211=n +endif + +ifneq ($(CONFIG_UAP_SUPPORT),y) + CONFIG_WIFI_DIRECT_SUPPORT=n + CONFIG_WIFI_DISPLAY_SUPPORT=n + CONFIG_UAP_WEXT=n + CONFIG_UAP_CFG80211=n +endif + +ifeq ($(CONFIG_STA_SUPPORT),y) +ifeq ($(CONFIG_STA_WEXT),y) + EXTRA_CFLAGS += -DSTA_WEXT +endif +ifeq ($(CONFIG_STA_CFG80211),y) + EXTRA_CFLAGS += -DSTA_CFG80211 +endif +endif +ifeq ($(CONFIG_UAP_SUPPORT),y) +ifeq ($(CONFIG_UAP_WEXT),y) + EXTRA_CFLAGS += -DUAP_WEXT +endif +ifeq ($(CONFIG_UAP_CFG80211),y) + EXTRA_CFLAGS += -DUAP_CFG80211 +endif +endif + +print: +ifeq ($(CONFIG_STA_SUPPORT),y) +ifeq ($(CONFIG_STA_WEXT),n) +ifeq ($(CONFIG_STA_CFG80211),n) + @echo "Can not build STA without WEXT or CFG80211" + exit 2 +endif +endif +endif +ifeq ($(CONFIG_UAP_SUPPORT),y) +ifeq ($(CONFIG_UAP_WEXT),n) +ifeq ($(CONFIG_UAP_CFG80211),n) + @echo "Can not build UAP without WEXT or CFG80211" + exit 2 +endif +endif +endif + + + +ifeq ($(CONFIG_EMBEDDED_SUPP_AUTH), y) + EXTRA_CFLAGS += -I$(M)/mlan/esa + EXTRA_CFLAGS += -I$(M)/mlan/esa/common +endif + +ifeq ($(CONFIG_DRV_EMBEDDED_AUTHENTICATOR), y) + EXTRA_CFLAGS += -DDRV_EMBEDDED_AUTHENTICATOR +endif + +ifeq ($(CONFIG_DRV_EMBEDDED_SUPPLICANT), y) + EXTRA_CFLAGS += -DDRV_EMBEDDED_SUPPLICANT +endif + + +MOALOBJS = mlinux/moal_main.o \ + mlinux/moal_ioctl.o \ + mlinux/moal_shim.o \ + mlinux/moal_eth_ioctl.o + +MLANOBJS = mlan/mlan_shim.o mlan/mlan_init.o \ + mlan/mlan_txrx.o \ + mlan/mlan_cmdevt.o mlan/mlan_misc.o \ + mlan/mlan_cfp.o \ + mlan/mlan_module.o + +MLANOBJS += mlan/mlan_wmm.o +MLANOBJS += mlan/mlan_sdio.o +MLANOBJS += mlan/mlan_11n_aggr.o +MLANOBJS += mlan/mlan_11n_rxreorder.o +MLANOBJS += mlan/mlan_11n.o +MLANOBJS += mlan/mlan_11ac.o +MLANOBJS += mlan/mlan_11d.o +MLANOBJS += mlan/mlan_11h.o +ifeq ($(CONFIG_STA_SUPPORT),y) +MLANOBJS += mlan/mlan_meas.o +MLANOBJS += mlan/mlan_scan.o \ + mlan/mlan_sta_ioctl.o \ + mlan/mlan_sta_rx.o \ + mlan/mlan_sta_tx.o \ + mlan/mlan_sta_event.o \ + mlan/mlan_sta_cmd.o \ + mlan/mlan_sta_cmdresp.o \ + mlan/mlan_join.o +ifeq ($(CONFIG_STA_WEXT),y) +MOALOBJS += mlinux/moal_priv.o \ + mlinux/moal_wext.o +endif +endif +ifeq ($(CONFIG_UAP_SUPPORT),y) +MLANOBJS += mlan/mlan_uap_ioctl.o +MLANOBJS += mlan/mlan_uap_cmdevent.o +MLANOBJS += mlan/mlan_uap_txrx.o +MOALOBJS += mlinux/moal_uap.o +ifeq ($(CONFIG_UAP_WEXT),y) +MOALOBJS += mlinux/moal_uap_priv.o +MOALOBJS += mlinux/moal_uap_wext.o +endif +endif +ifeq ($(CONFIG_STA_CFG80211),y) +MOALOBJS += mlinux/moal_cfg80211.o +MOALOBJS += mlinux/moal_sta_cfg80211.o +endif +ifeq ($(CONFIG_UAP_CFG80211),y) +MOALOBJS += mlinux/moal_cfg80211.o +MOALOBJS += mlinux/moal_uap_cfg80211.o +endif + +ifdef CONFIG_PROC_FS +MOALOBJS += mlinux/moal_proc.o +ifeq ($(CONFIG_PROC_DEBUG),y) +MOALOBJS += mlinux/moal_debug.o +endif +endif + +ifeq ($(CONFIG_EMBEDDED_SUPP_AUTH), y) +MLANOBJS += mlan/esa/common/rc4.o \ + mlan/esa/common/aes_cmac_rom.o \ + mlan/esa/common/hmac_sha1.o \ + mlan/esa/common/md5.o \ + mlan/esa/common/mrvl_sha256_crypto.o \ + mlan/esa/common/hmac_md5.o \ + mlan/esa/common/crypt_new_rom.o \ + mlan/esa/common/rijndael.o \ + mlan/esa/common/sha1.o \ + mlan/esa/common/sha256.o \ + mlan/esa/common/pass_phrase.o \ + mlan/esa/common/pmkCache.o \ + mlan/esa/common/pmkCache_rom.o \ + mlan/esa/common/parser.o \ + mlan/esa/common/parser_rom.o \ + mlan/esa/keyMgmtApStaCommon.o \ + mlan/esa/hostsa_init.o \ + mlan/esa/authenticator_api.o +endif + +ifeq ($(CONFIG_DRV_EMBEDDED_SUPPLICANT),y) +MLANOBJS += mlan/esa/keyMgmtSta.o \ + mlan/esa/keyMgmtSta_rom.o \ + mlan/esa/supplicant.o +endif + +ifeq ($(CONFIG_DRV_EMBEDDED_AUTHENTICATOR),y) +MLANOBJS += mlan/esa/AssocAp_srv_rom.o \ + mlan/esa/keyMgmtAp_rom.o \ + mlan/esa/keyMgmtAp.o +endif + + +obj-$(CONFIG_BERLIN_SDIO_WLAN_8887) := 8887mlan.o +8887mlan-objs := $(MLANOBJS) +MOALOBJS += mlinux/moal_sdio_mmc.o +obj-$(CONFIG_BERLIN_SDIO_WLAN_8887) += sd8887.o +sd8887-objs := $(MOALOBJS) + + +############################################################### + +export CC LD EXTRA_CFLAGS KERNELDIR + +ifeq ($(CONFIG_STA_SUPPORT),y) +ifeq ($(CONFIG_UAP_SUPPORT),y) +.PHONY: mapp/mlanconfig mapp/mlan2040coex mapp/mlanevent mapp/uaputl mapp/mlanutl clean distclean +else +.PHONY: mapp/mlanconfig mapp/mlanevent mapp/mlan2040coex mapp/mlanutl clean distclean +endif +else +ifeq ($(CONFIG_UAP_SUPPORT),y) +.PHONY: mapp/mlanevent mapp/uaputl clean distclean +endif +endif + @echo "Finished Making Marvell Wlan Linux Driver" + +ifeq ($(CONFIG_STA_SUPPORT),y) +mapp/mlanconfig: + $(MAKE) -C $@ +mapp/mlanutl: + $(MAKE) -C $@ +mapp/mlan2040coex: + $(MAKE) -C $@ +endif +ifeq ($(CONFIG_UAP_SUPPORT),y) +mapp/uaputl: + $(MAKE) -C $@ +endif +ifeq ($(CONFIG_WIFI_DIRECT_SUPPORT),y) +mapp/wifidirectutl: + $(MAKE) -C $@ +endif +mapp/mlanevent: + $(MAKE) -C $@ + +echo: + +build: echo default + + @if [ ! -d $(BINDIR) ]; then \ + mkdir $(BINDIR); \ + fi + + cp -f 8887mlan.$(MODEXT) $(BINDIR)/8887mlan$(DBG).$(MODEXT) + cp -f sd8887.$(MODEXT) $(BINDIR)/sd8887$(DBG).$(MODEXT) + +ifeq ($(CONFIG_STA_SUPPORT),y) + cp -f README $(BINDIR) + cp -f README_MLAN $(BINDIR) +ifneq ($(APPDIR),) + $(MAKE) -C mapp/mlanconfig $@ INSTALLDIR=$(BINDIR) + $(MAKE) -C mapp/mlanutl $@ INSTALLDIR=$(BINDIR) + $(MAKE) -C mapp/mlan2040coex $@ INSTALLDIR=$(BINDIR) +endif +endif +ifeq ($(CONFIG_UAP_SUPPORT),y) + cp -f README_UAP $(BINDIR) +ifneq ($(APPDIR),) + $(MAKE) -C mapp/uaputl $@ INSTALLDIR=$(BINDIR) +endif +endif +ifeq ($(CONFIG_WIFI_DIRECT_SUPPORT),y) + cp -f README_WIFIDIRECT $(BINDIR) + cp -rpf script/wifidirect $(BINDIR) +ifeq ($(CONFIG_WIFI_DISPLAY_SUPPORT),y) + cp -rpf script/wifidisplay $(BINDIR) +endif +ifneq ($(APPDIR),) + $(MAKE) -C mapp/wifidirectutl $@ INSTALLDIR=$(BINDIR) +endif +endif +ifneq ($(APPDIR),) + $(MAKE) -C mapp/mlanevent $@ INSTALLDIR=$(BINDIR) +endif + +clean: + -find . -name "*.o" -exec rm {} \; + -find . -name "*.ko" -exec rm {} \; + -find . -name ".*.cmd" -exec rm {} \; + -find . -name "*.mod.c" -exec rm {} \; + -find . -name "Module.symvers" -exec rm {} \; + -find . -name "Module.markers" -exec rm {} \; + -find . -name "modules.order" -exec rm {} \; + -rm -rf .tmp_versions +ifneq ($(APPDIR),) +ifeq ($(CONFIG_STA_SUPPORT),y) + $(MAKE) -C mapp/mlanconfig $@ + $(MAKE) -C mapp/mlanutl $@ + $(MAKE) -C mapp/mlan2040coex $@ +endif +ifeq ($(CONFIG_UAP_SUPPORT),y) + $(MAKE) -C mapp/uaputl $@ +endif +ifeq ($(CONFIG_WIFI_DIRECT_SUPPORT),y) + $(MAKE) -C mapp/wifidirectutl $@ +endif + $(MAKE) -C mapp/mlanevent $@ +endif + +install: default + + cp -f 8887mlan.$(MODEXT) $(INSTALLDIR)/8887mlan$(DBG).$(MODEXT) + cp -f sd8887.$(MODEXT) $(INSTALLDIR)/sd8887$(DBG).$(MODEXT) + echo "sd8887 Driver Installed" + +distclean: + -find . -name "*.o" -exec rm {} \; + -find . -name "*.orig" -exec rm {} \; + -find . -name "*.swp" -exec rm {} \; + -find . -name "*.*~" -exec rm {} \; + -find . -name "*~" -exec rm {} \; + -find . -name "*.d" -exec rm {} \; + -find . -name "*.a" -exec rm {} \; + -find . -name "tags" -exec rm {} \; + -find . -name ".*" -exec rm -rf 2> /dev/null \; + -find . -name "*.ko" -exec rm {} \; + -find . -name ".*.cmd" -exec rm {} \; + -find . -name "*.mod.c" -exec rm {} \; + -rm -rf .tmp_versions +ifneq ($(APPDIR),) +ifeq ($(CONFIG_STA_SUPPORT),y) + $(MAKE) -C mapp/mlanconfig $@ + $(MAKE) -C mapp/mlanutl $@ + $(MAKE) -C mapp/mlan2040coex $@ +endif +ifeq ($(CONFIG_UAP_SUPPORT),y) + $(MAKE) -C mapp/uaputl $@ +endif +ifeq ($(CONFIG_WIFI_DIRECT_SUPPORT),y) + $(MAKE) -C mapp/wifidirectutl $@ +endif + $(MAKE) -C mapp/mlanevent $@ +endif + +# End of file diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan.h new file mode 100644 index 00000000..effba0d0 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan.h @@ -0,0 +1,35 @@ +/** @file mlan.h + * + * @brief This file declares all APIs that will be called from MOAL module. + * It also defines the data structures used for APIs between MLAN and MOAL. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 10/13/2008: initial version + 11/07/2008: split mlan.h into mlan_decl.h & mlan_ioctl.h +******************************************************/ + +#ifndef _MLAN_H_ +#define _MLAN_H_ + +#include "mlan_decl.h" +#include "mlan_ioctl.h" +#include "mlan_ieee.h" + +#endif /* !_MLAN_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11ac.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11ac.c new file mode 100644 index 00000000..017473cb --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11ac.c @@ -0,0 +1,1170 @@ +/** @file mlan_11ac.c + * + * @brief This file contains the functions for station ioctl. + * + * Copyright (C) 2011-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +#include "mlan.h" +#include "mlan_join.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_wmm.h" +#include "mlan_11n.h" + +#define NO_NSS_SUPPORT 0x3 + +/******************************************************** + Local Variables +********************************************************/ + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ +t_u16 wlan_convert_mcsmap_to_maxrate(mlan_private *priv, t_u8 bands, + t_u16 mcs_map); +/** + * @brief determine the center frquency center index for bandwidth + * of 80 MHz and 160 MHz + * + * @param pmpriv A pointer to mlan_private structure + * @param band band + * @param pri_chan primary channel + * @param chan_bw channel bandwidth + * + * @return channel center frequency center, if found; O, otherwise + */ + +t_u8 +wlan_get_center_freq_idx(IN mlan_private *pmpriv, + IN t_u8 band, IN t_u32 pri_chan, IN t_u8 chan_bw) +{ + t_u8 center_freq_idx = 0; + + if (band & BAND_AAC) { + switch (pri_chan) { + case 36: + case 40: + case 44: + case 48: + if (chan_bw == CHANNEL_BW_80MHZ) { + center_freq_idx = 42; + break; + } + case 52: + case 56: + case 60: + case 64: + if (chan_bw == CHANNEL_BW_80MHZ) { + center_freq_idx = 58; + break; + } else if (chan_bw == CHANNEL_BW_160MHZ) { + center_freq_idx = 50; + break; + } + case 100: + case 104: + case 108: + case 112: + if (chan_bw == CHANNEL_BW_80MHZ) { + center_freq_idx = 106; + break; + } + case 116: + case 120: + case 124: + case 128: + if (chan_bw == CHANNEL_BW_80MHZ) { + center_freq_idx = 122; + break; + } else if (chan_bw == CHANNEL_BW_160MHZ) { + center_freq_idx = 114; + break; + } + case 132: + case 136: + case 140: + case 144: + if (chan_bw == CHANNEL_BW_80MHZ) { + center_freq_idx = 138; + break; + } + case 149: + case 153: + case 157: + case 161: + if (chan_bw == CHANNEL_BW_80MHZ) { + center_freq_idx = 155; + break; + } + default: /* error. go to the default */ + center_freq_idx = 42; + } + } + return center_freq_idx; +} + +/** + * @brief This function gets the bitmap of nss which supports VHT mcs + * + * @param mcs_map_set VHT mcs map + * + * @return The bitmap of supported nss + */ +static t_u8 +wlan_get_nss_vht_mcs(t_u16 mcs_map_set) +{ + t_u8 nss, nss_map = 0; + for (nss = 1; nss <= 8; nss++) { + if (GET_VHTNSSMCS(mcs_map_set, nss) != NO_NSS_SUPPORT) + nss_map |= 1 << (nss - 1); + } + PRINTM(MCMND, "Supported nss bit map:0x%02x\n", nss_map); + return nss_map; +} + +/** + * @brief This function fills the cap info + * + * @param priv A pointer to mlan_private structure + * @param pht_cap A pointer to MrvlIETypes_HTCap_t structure + * @param bands Band configuration + * + * @return N/A + */ +static void +wlan_fill_cap_info(mlan_private *priv, VHT_capa_t *vht_cap, t_u8 bands) +{ + t_u32 usr_dot_11ac_dev_cap; + + ENTER(); + + if (bands & BAND_A) + usr_dot_11ac_dev_cap = priv->usr_dot_11ac_dev_cap_a; + else + usr_dot_11ac_dev_cap = priv->usr_dot_11ac_dev_cap_bg; + + vht_cap->vht_cap_info = usr_dot_11ac_dev_cap; + + LEAVE(); +} + +/** + * @brief Set/get 11ac configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_11ac_ioctl_vhtcfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_11ac_cfg *cfg = MNULL; + t_u16 cmd_action = 0; + t_u32 usr_vht_cap_info = 0; + t_u32 cfg_value = 0; + t_u32 hw_value = 0; + t_u8 nss = 0; + + ENTER(); + +#define VHT_CAP_INFO_BIT_FIELDS \ + (MBIT(4)|MBIT(5)|MBIT(6)|MBIT(7)| \ + MBIT(11)|MBIT(12)|MBIT(19)|MBIT(20)| \ + MBIT(21)|MBIT(22)|MBIT(28)|MBIT(29)) + + cfg = (mlan_ds_11ac_cfg *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_SET) { + /** SET operation */ + /** validate the user input and correct it if necessary */ + if (pmpriv->bss_role == MLAN_BSS_ROLE_STA) { + if (cfg->param.vht_cfg.txrx == 3) { + PRINTM(MERROR, + "Configuration of VHT capabilities for TX/RX 3 is not supported in STA mode!\n"); + return MLAN_STATUS_FAILURE; + } + } + if (pmpriv->bss_role == MLAN_BSS_ROLE_UAP) { + if (cfg->param.vht_cfg.txrx != 3) { + PRINTM(MERROR, + "Configuration of VHT capabilities for TX/RX %d is not supported in UAP mode!\n", + cfg->param.vht_cfg.txrx); + return MLAN_STATUS_FAILURE; + } + } + /** set bit fileds */ + usr_vht_cap_info = VHT_CAP_INFO_BIT_FIELDS & + cfg->param.vht_cfg.vht_cap_info & + pmadapter->hw_dot_11ac_dev_cap; + /** set MAX MPDU LEN field (bit 0 - bit 1) */ + cfg_value = + GET_VHTCAP_MAXMPDULEN(cfg->param.vht_cfg.vht_cap_info); + hw_value = + GET_VHTCAP_MAXMPDULEN(pmadapter->hw_dot_11ac_dev_cap); + SET_VHTCAP_MAXMPDULEN(usr_vht_cap_info, + MIN(cfg_value, hw_value)); + /** set CHAN Width Set field (bit 2 - bit 3) */ + cfg_value = GET_VHTCAP_CHWDSET(cfg->param.vht_cfg.vht_cap_info); + hw_value = GET_VHTCAP_CHWDSET(pmadapter->hw_dot_11ac_dev_cap); + SET_VHTCAP_CHWDSET(usr_vht_cap_info, MIN(cfg_value, hw_value)); + /** set Rx STBC field (bit 8 - bit 10) */ + cfg_value = GET_VHTCAP_RXSTBC(cfg->param.vht_cfg.vht_cap_info); + hw_value = GET_VHTCAP_RXSTBC(pmadapter->hw_dot_11ac_dev_cap); + SET_VHTCAP_RXSTBC(usr_vht_cap_info, MIN(cfg_value, hw_value)); + /** set Steering Number of BFer Ant (bit 13 - bit 15) */ + cfg_value = + GET_VHTCAP_SNBFERANT(cfg->param.vht_cfg.vht_cap_info); + hw_value = GET_VHTCAP_SNBFERANT(pmadapter->hw_dot_11ac_dev_cap); + SET_VHTCAP_SNBFERANT(usr_vht_cap_info, + MIN(cfg_value, hw_value)); + /** set Number of Sounding Dimension (bit 16 - bit 18) */ + cfg_value = + GET_VHTCAP_NUMSNDDM(cfg->param.vht_cfg.vht_cap_info); + hw_value = GET_VHTCAP_NUMSNDDM(pmadapter->hw_dot_11ac_dev_cap); + SET_VHTCAP_NUMSNDDM(usr_vht_cap_info, MIN(cfg_value, hw_value)); + /** set Number of Max AMPDU Length Exponent (bit 23 - bit 25) */ + cfg_value = + GET_VHTCAP_MAXAMPDULENEXP(cfg->param.vht_cfg. + vht_cap_info); + hw_value = + GET_VHTCAP_MAXAMPDULENEXP(pmadapter-> + hw_dot_11ac_dev_cap); + SET_VHTCAP_MAXAMPDULENEXP(usr_vht_cap_info, + MIN(cfg_value, hw_value)); + /** set VHT Link Adaptation Capable (bit 26 - bit 27) */ + cfg_value = + GET_VHTCAP_LINKADPCAP(cfg->param.vht_cfg.vht_cap_info); + hw_value = + GET_VHTCAP_LINKADPCAP(pmadapter->hw_dot_11ac_dev_cap); + SET_VHTCAP_LINKADPCAP(usr_vht_cap_info, + MIN(cfg_value, hw_value)); + /** update the user setting if it is beyond the hw capabiliteis */ + cfg->param.vht_cfg.vht_cap_info = usr_vht_cap_info; + PRINTM(MINFO, "Set: vht cap info 0x%x\n", usr_vht_cap_info); + + /** update the RX MCS map */ + if (cfg->param.vht_cfg.txrx & MLAN_RADIO_RX) { + /* use the previous user value */ + if (cfg->param.vht_cfg.vht_rx_mcs == 0xffffffff) + cfg->param.vht_cfg.vht_rx_mcs = + GET_VHTMCS(pmpriv-> + usr_dot_11ac_mcs_support); + for (nss = 1; nss <= 8; nss++) { + cfg_value = + GET_VHTNSSMCS(cfg->param.vht_cfg. + vht_rx_mcs, nss); + hw_value = + GET_DEVNSSRXMCS(pmadapter-> + hw_dot_11ac_mcs_support, + nss); + if ((hw_value == NO_NSS_SUPPORT) || + (cfg_value == NO_NSS_SUPPORT)) + SET_VHTNSSMCS(cfg->param.vht_cfg. + vht_rx_mcs, nss, + NO_NSS_SUPPORT); + else + SET_VHTNSSMCS(cfg->param.vht_cfg. + vht_rx_mcs, nss, + MIN(cfg_value, hw_value)); + } + PRINTM(MINFO, "Set: vht rx mcs set 0x%08x\n", + cfg->param.vht_cfg.vht_rx_mcs); + /* use the previous user value */ + if (cfg->param.vht_cfg.vht_tx_mcs == 0xffffffff) + cfg->param.vht_cfg.vht_tx_mcs = + GET_VHTMCS(pmpriv-> + usr_dot_11ac_mcs_support >> + 16); + for (nss = 1; nss <= 8; nss++) { + cfg_value = + GET_VHTNSSMCS(cfg->param.vht_cfg. + vht_tx_mcs, nss); + hw_value = + GET_DEVNSSTXMCS(pmadapter-> + hw_dot_11ac_mcs_support, + nss); + if ((hw_value == NO_NSS_SUPPORT) || + (cfg_value == NO_NSS_SUPPORT)) + SET_VHTNSSMCS(cfg->param.vht_cfg. + vht_tx_mcs, nss, + NO_NSS_SUPPORT); + else + SET_VHTNSSMCS(cfg->param.vht_cfg. + vht_tx_mcs, nss, + MIN(cfg_value, hw_value)); + } + PRINTM(MINFO, "Set: vht tx mcs set 0x%08x\n", + cfg->param.vht_cfg.vht_tx_mcs); + + RESET_DEVRXMCSMAP(pmpriv->usr_dot_11ac_mcs_support); + pmpriv->usr_dot_11ac_mcs_support |= + GET_VHTMCS(cfg->param.vht_cfg.vht_rx_mcs); + RESET_DEVTXMCSMAP(pmpriv->usr_dot_11ac_mcs_support); + pmpriv->usr_dot_11ac_mcs_support |= + (GET_VHTMCS(cfg->param.vht_cfg.vht_tx_mcs) << + 16); + PRINTM(MINFO, "Set: vht mcs set 0x%08x\n", + pmpriv->usr_dot_11ac_mcs_support); + } + } + + if (pmpriv->bss_role == MLAN_BSS_ROLE_STA) { + if (cfg->param.vht_cfg.txrx & MLAN_RADIO_RX) { + /* maximum VHT configuration used in association */ + if (pioctl_req->action == MLAN_ACT_SET) { + if (cfg->param.vht_cfg.band == BAND_SELECT_BG) + pmpriv->usr_dot_11ac_dev_cap_bg = + usr_vht_cap_info; + else if (cfg->param.vht_cfg.band == + BAND_SELECT_A) + pmpriv->usr_dot_11ac_dev_cap_a = + usr_vht_cap_info; + else { + pmpriv->usr_dot_11ac_dev_cap_bg = + usr_vht_cap_info; + pmpriv->usr_dot_11ac_dev_cap_a = + usr_vht_cap_info; + } + + } else { + /** GET operation */ + if (cfg->param.vht_cfg.band == BAND_SELECT_BG) { + cfg->param.vht_cfg.vht_cap_info = + pmpriv->usr_dot_11ac_dev_cap_bg; + PRINTM(MINFO, + "Get: vht cap info for 2.4GHz 0x%x\n", + pmpriv->usr_dot_11ac_dev_cap_bg); + } else if (cfg->param.vht_cfg.band == + BAND_SELECT_A) { + cfg->param.vht_cfg.vht_cap_info = + pmpriv->usr_dot_11ac_dev_cap_a; + PRINTM(MINFO, + "Get: vht cap info for 5GHz 0x%x\n", + pmpriv->usr_dot_11ac_dev_cap_a); + } else { + PRINTM(MINFO, + "Get: invalid band selection for vht cap info\n"); + ret = MLAN_STATUS_FAILURE; + } + cfg->param.vht_cfg.vht_rx_mcs = + GET_DEVRXMCSMAP(pmpriv-> + usr_dot_11ac_mcs_support); + cfg->param.vht_cfg.vht_tx_mcs = + GET_DEVTXMCSMAP(pmpriv-> + usr_dot_11ac_mcs_support); + cfg->param.vht_cfg.vht_rx_max_rate = + wlan_convert_mcsmap_to_maxrate(pmpriv, + cfg-> + param. + vht_cfg. + band, + cfg-> + param. + vht_cfg. + vht_rx_mcs); + cfg->param.vht_cfg.vht_tx_max_rate = + wlan_convert_mcsmap_to_maxrate(pmpriv, + cfg-> + param. + vht_cfg. + band, + cfg-> + param. + vht_cfg. + vht_tx_mcs); + } + LEAVE(); + return ret; + } + } + + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_11AC_CFG, + cmd_action, + 0, + (t_void *)pioctl_req, + (t_void *)&cfg->param.vht_cfg); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Get supported MCS set + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_11ac_ioctl_supported_mcs_set(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + /* mlan_ds_11ac_cfg *cfg= MNULL; */ + /* int rx_mcs_supp; */ + /* t_u8 mcs_set[NUM_MCS_SUPP]; */ + + ENTER(); +#if 0 + if (pioctl_req->action == MLAN_ACT_SET) { + PRINTM(MERROR, "Set operation is not supported\n"); + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + rx_mcs_supp = GET_11ACRXMCSSUPP(pmadapter->usr_dot_11ac_mcs_support); + /* Set MCS */ + memset(pmadapter, (t_u8 *)mcs_set, 0xff, rx_mcs_supp); + /* Clear all the other values */ + memset(pmadapter, (t_u8 *)&mcs_set[rx_mcs_supp], 0, + NUM_MCS_FIELD - rx_mcs_supp); + /* Set MCS32 with 40MHz support */ + if (ISSUPP_CHANWIDTH80(pmadapter->usr_dot_11ac_dev_cap_bg) + || ISSUPP_CHANWIDTH80(pmadapter->usr_dot_11ac_dev_cap_a) + ) + SETHT_MCS32(mcs_set); + + cfg = (mlan_ds_11ac_cfg *)pioctl_req->pbuf; + memcpy(pmadapter, cfg->param.supported_mcs_set, mcs_set, NUM_MCS_SUPP); + +#endif + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/******************************************************** + Global Functions +********************************************************/ + +/** + * @brief This function prints the 802.11ac device capability + * + * @param pmadapter A pointer to mlan_adapter structure + * @param cap Capability value + * + * @return N/A + */ +void +wlan_show_dot11acdevcap(pmlan_adapter pmadapter, t_u32 cap) +{ + ENTER(); + + switch (GET_VHTCAP_MAXMPDULEN(cap)) { + case 0x0: + PRINTM(MINFO, + "GET_HW_SPEC: Maximum MSDU length = 3895 octets\n"); + break; + case 0x1: + PRINTM(MINFO, + "GET_HW_SPEC: Maximum MSDU length = 7991 octets\n"); + break; + case 0x2: + PRINTM(MINFO, + "GET_HW_SPEC: Maximum MSDU length = 11454 octets\n"); + break; + default: + PRINTM(MINFO, "Unsupport value\n"); + break; + } + + PRINTM(MINFO, "GET_HW_SPEC: HTC-VHT %s\n", + (ISSUPP_11ACVHTHTCVHT(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: VHT TXOP PS %s\n", + (ISSUPP_11ACVHTTXOPPS(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: MU RX beamformee %s\n", + (ISSUPP_11ACMURXBEAMFORMEE(cap) ? "supported" : + "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: MU TX beamformee %s\n", + (ISSUPP_11ACMUTXBEAMFORMEE(cap) ? "supported" : + "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: SU RX Beamformee %s\n", + (ISSUPP_11ACSUBEAMFORMEE(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: SU TX Beamformer %s\n", + (ISSUPP_11ACSUBEAMFORMER(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: Rx STBC %s\n", + (ISSUPP_11ACRXSTBC(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: Tx STBC %s\n", + (ISSUPP_11ACTXSTBC(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: Short GI %s for 160MHz BW\n", + (ISSUPP_11ACSGI160(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: Short GI %s for 80MHz BW\n", + (ISSUPP_11ACSGI80(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: LDPC coding %s\n", + (ISSUPP_11ACLDPC(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: Channel BW 20/40/80/160/80+80 MHz %s\n", + (ISSUPP_11ACBW8080(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: Channel BW 20/40/80/160 MHz %s\n", + (ISSUPP_11ACBW160(cap) ? "supported" : "not supported")); + + LEAVE(); + return; +} + +/** + * @brief This function prints the 802.11ac device MCS + * + * @param pmadapter A pointer to mlan_adapter structure + * @param support Support value + * + * @return N/A + */ +void +wlan_show_dot11acmcssupport(pmlan_adapter pmadapter, t_u32 support) +{ + ENTER(); + + PRINTM(MINFO, "GET_HW_SPEC: MCSs for %2dx%2d MIMO\n", + GET_DEVRXMCSMAP(support), GET_DEVTXMCSMAP(support)); + + LEAVE(); + return; +} + +/** + * @brief This function converts the 2-bit MCS map to the highest long GI + * VHT PPDU data rate + * + * @param priv A pointer to mlan_private structure + * @param bands Supported bands + * @param mcs_map 2-bit MCS map + * + * @return the max data rate for long GI + */ +t_u16 +wlan_convert_mcsmap_to_maxrate(mlan_private *priv, t_u8 bands, t_u16 mcs_map) +{ + t_u8 i; + t_u8 nss; + t_u8 max_mcs; + t_u16 max_rate = 0; + t_u32 usr_vht_cap_info = 0; + + /* tables of the MCS map to the highest data rate (in Mbps) supported + for long GI */ + t_u16 max_rate_lgi_80MHZ[8][3] = { + {0x124, 0x15F, 0x186}, /* NSS = 1 */ + {0x249, 0x2BE, 0x30C}, /* NSS = 2 */ + {0x36D, 0x41D, 0x492}, /* NSS = 3 */ + {0x492, 0x57C, 0x618}, /* NSS = 4 */ + {0x5B6, 0x6DB, 0x79E}, /* NSS = 5 */ + {0x6DB, 0x83A, 0x0}, /* NSS = 6 */ + {0x7FF, 0x999, 0xAAA}, /* NSS = 7 */ + {0x924, 0xAF8, 0xC30} /* NSS = 8 */ + }; + t_u16 max_rate_lgi_160MHZ[8][3] = { + {0x249, 0x2BE, 0x30C}, /* NSS = 1 */ + {0x492, 0x57C, 0x618}, /* NSS = 2 */ + {0x6DB, 0x83A, 0x0}, /* NSS = 3 */ + {0x924, 0xAF8, 0xC30}, /* NSS = 4 */ + {0xB6D, 0xDB6, 0xF3C}, /* NSS = 5 */ + {0xDB6, 0x1074, 0x1248}, /* NSS = 6 */ + {0xFFF, 0x1332, 0x1554}, /* NSS = 7 */ + {0x1248, 0x15F0, 0x1860} /* NSS = 8 */ + }; + + if (bands & BAND_AAC) + usr_vht_cap_info = priv->usr_dot_11ac_dev_cap_a; + else + usr_vht_cap_info = priv->usr_dot_11ac_dev_cap_bg; + + /* find the max NSS supported */ + nss = 0; + for (i = 0; i < 8; i++) { + max_mcs = (mcs_map >> (2 * i)) & 0x3; + if (max_mcs < 3) + nss = i; + } + + max_mcs = (mcs_map >> (2 * nss)) & 0x3; + /* if max_mcs is 3, nss must be 0 (SS = 1). Thus, max mcs is MCS 9 */ + if (max_mcs >= 3) + max_mcs = 2; + + if (GET_VHTCAP_CHWDSET(usr_vht_cap_info)) { + /* support 160 MHz */ + max_rate = max_rate_lgi_160MHZ[nss][max_mcs]; + if (max_rate == 0) + /* MCS9 is not supported in NSS6 */ + max_rate = max_rate_lgi_160MHZ[nss][max_mcs - 1]; + + } else { + max_rate = max_rate_lgi_80MHZ[nss][max_mcs]; + if (max_rate == 0) + /* MCS9 is not supported in NSS3 */ + max_rate = max_rate_lgi_80MHZ[nss][max_mcs - 1]; + } + + return max_rate; +} + +/** + * @brief This function fills the VHT cap tlv out put format is LE, not CPU + * + * @param priv A pointer to mlan_private structure + * @param pvht_cap A pointer to MrvlIETypes_HTCap_t structure + * @param bands Band configuration + * + * @return N/A + */ +void +wlan_fill_vht_cap_tlv(mlan_private *priv, + MrvlIETypes_VHTCap_t *pvht_cap, t_u8 bands) +{ + t_u16 mcs_map_user = 0; + t_u16 mcs_map_resp = 0; + t_u16 mcs_map_result = 0; + t_u16 mcs_user = 0; + t_u16 mcs_resp = 0; + t_u16 nss; + + ENTER(); + + /* Fill VHT cap info */ + wlan_fill_cap_info(priv, &pvht_cap->vht_cap, bands); + pvht_cap->vht_cap.vht_cap_info = + wlan_cpu_to_le32(pvht_cap->vht_cap.vht_cap_info); + + /* Fill VHT MCS Set */ + /* rx MCS Set, find the minimum of the user rx mcs and ap rx mcs */ + mcs_map_user = GET_DEVRXMCSMAP(priv->usr_dot_11ac_mcs_support); + mcs_map_resp = wlan_le16_to_cpu(pvht_cap->vht_cap.mcs_sets.rx_mcs_map); + mcs_map_result = 0; + for (nss = 1; nss <= 8; nss++) { + mcs_user = GET_VHTNSSMCS(mcs_map_user, nss); + mcs_resp = GET_VHTNSSMCS(mcs_map_resp, nss); + if ((mcs_user == NO_NSS_SUPPORT) || + (mcs_resp == NO_NSS_SUPPORT)) + SET_VHTNSSMCS(mcs_map_result, nss, NO_NSS_SUPPORT); + else + SET_VHTNSSMCS(mcs_map_result, nss, + MIN(mcs_user, mcs_resp)); + } + /* rx MCS map */ + pvht_cap->vht_cap.mcs_sets.rx_mcs_map = + wlan_cpu_to_le16(mcs_map_result); + + /* rx highest rate */ + pvht_cap->vht_cap.mcs_sets.rx_max_rate = + wlan_convert_mcsmap_to_maxrate(priv, bands, mcs_map_result); + pvht_cap->vht_cap.mcs_sets.rx_max_rate = + wlan_cpu_to_le16(pvht_cap->vht_cap.mcs_sets.rx_max_rate); + + /* tx MCS Set find the minimum of the user tx mcs and ap tx mcs */ + mcs_map_user = GET_DEVTXMCSMAP(priv->usr_dot_11ac_mcs_support); + mcs_map_resp = wlan_le16_to_cpu(pvht_cap->vht_cap.mcs_sets.tx_mcs_map); + mcs_map_result = 0; + for (nss = 1; nss <= 8; nss++) { + mcs_user = GET_VHTNSSMCS(mcs_map_user, nss); + mcs_resp = GET_VHTNSSMCS(mcs_map_resp, nss); + if ((mcs_user == NO_NSS_SUPPORT) || + (mcs_resp == NO_NSS_SUPPORT)) + SET_VHTNSSMCS(mcs_map_result, nss, NO_NSS_SUPPORT); + else + SET_VHTNSSMCS(mcs_map_result, nss, + MIN(mcs_user, mcs_resp)); + } + + /* tx MCS map */ + pvht_cap->vht_cap.mcs_sets.tx_mcs_map = + wlan_cpu_to_le16(mcs_map_result); + /* tx highest rate */ + pvht_cap->vht_cap.mcs_sets.tx_max_rate = + wlan_convert_mcsmap_to_maxrate(priv, bands, mcs_map_result); + pvht_cap->vht_cap.mcs_sets.tx_max_rate = + wlan_cpu_to_le16(pvht_cap->vht_cap.mcs_sets.tx_max_rate); + + LEAVE(); + return; +} + +/** + * @brief This function fills the VHT cap tlv out put format is CPU + * + * @param priv A pointer to mlan_private structure + * @param pvht_cap A pointer to MrvlIETypes_HTCap_t structure + * @param bands Band configuration + * + * @return N/A + */ +void +wlan_fill_vht_cap_ie(mlan_private *priv, + IEEEtypes_VHTCap_t *pvht_cap, t_u8 bands) +{ + ENTER(); + + pvht_cap->ieee_hdr.element_id = VHT_CAPABILITY; + pvht_cap->ieee_hdr.len = sizeof(VHT_capa_t); + + /* Fill VHT cap info */ + wlan_fill_cap_info(priv, &pvht_cap->vht_cap, bands); + + /* rx MCS map */ + pvht_cap->vht_cap.mcs_sets.rx_mcs_map = + GET_DEVRXMCSMAP(priv->usr_dot_11ac_mcs_support); + + /* rx highest rate */ + pvht_cap->vht_cap.mcs_sets.rx_max_rate = + wlan_convert_mcsmap_to_maxrate(priv, bands, + pvht_cap->vht_cap.mcs_sets. + rx_mcs_map); + + /* tx MCS map */ + pvht_cap->vht_cap.mcs_sets.tx_mcs_map = + GET_DEVTXMCSMAP(priv->usr_dot_11ac_mcs_support); + /* tx highest rate */ + pvht_cap->vht_cap.mcs_sets.tx_max_rate = + wlan_convert_mcsmap_to_maxrate(priv, bands, + pvht_cap->vht_cap.mcs_sets. + tx_mcs_map); + + LEAVE(); + return; +} + +/* + * @brief This function check if AP is in 11ac mode + * + * @param priv A pointer to mlan_private structure + * + * @return MTRUE/MFALSE + */ +t_u8 +wlan_is_ap_in_11ac_mode(mlan_private *priv) +{ + BSSDescriptor_t *pbss_desc; + IEEEtypes_VHTOprat_t *vht_oprat = MNULL; + pbss_desc = &priv->curr_bss_params.bss_descriptor; + vht_oprat = pbss_desc->pvht_oprat; + if (!pbss_desc->pvht_cap) + return MFALSE; + if (vht_oprat && (vht_oprat->ieee_hdr.element_id == VHT_OPERATION)) { + if (vht_oprat->chan_width == VHT_OPER_CHWD_20_40MHZ) + return MFALSE; + else + return MTRUE; + } else + return MFALSE; +} + +/** + * @brief This function fills the VHTOperation ie out put format is CPU + * + * @param priv A pointer to mlan_private structure + * @param vht_oprat A pointer to IEEEtypes_VHTOprat_t structure + * @param bands Band configuration + * + * @return N/A + */ +void +wlan_fill_tdls_vht_oprat_ie(mlan_private *priv, IEEEtypes_VHTOprat_t *vht_oprat, + sta_node *sta_ptr) +{ + t_u8 supp_chwd_set; + t_u8 peer_supp_chwd_set; + t_u8 ap_supp_chwd_set; + t_u32 usr_vht_cap_info; + + t_u16 mcs_map_user = 0; + t_u16 mcs_map_resp = 0; + t_u16 mcs_map_result = 0; + t_u16 mcs_user = 0; + t_u16 mcs_resp = 0; + t_u16 nss; + t_u8 chan_bw = 0; + BSSDescriptor_t *pbss_desc; + IEEEtypes_VHTCap_t *pvht_cap = &sta_ptr->vht_cap; + IEEEtypes_VHTCap_t *ap_vht_cap = MNULL; + ENTER(); + + pbss_desc = &priv->curr_bss_params.bss_descriptor; + + /* Check if AP is in 11ac mode */ + if (MFALSE == wlan_is_ap_in_11ac_mode(priv)) { + if (sta_ptr->ExtCap.ieee_hdr.element_id != EXT_CAPABILITY) { + PRINTM(MMSG, "No Peer's Ext_cap info\n"); + return; + } + if (!ISSUPP_EXTCAP_TDLS_WIDER_BANDWIDTH + (sta_ptr->ExtCap.ext_cap)) { + PRINTM(MMSG, + "Peer don't support Wider Bandwitch in Ext_cap\n"); + return; + } + } else { + ap_vht_cap = pbss_desc->pvht_cap; + } + + vht_oprat->ieee_hdr.element_id = VHT_OPERATION; + vht_oprat->ieee_hdr.len = + sizeof(IEEEtypes_VHTOprat_t) - sizeof(IEEEtypes_Header_t); + + if (pbss_desc->bss_band & BAND_A) + usr_vht_cap_info = priv->usr_dot_11ac_dev_cap_a; + else + usr_vht_cap_info = priv->usr_dot_11ac_dev_cap_bg; + + /* find the minmum bandwith between AP/TDLS peers */ + supp_chwd_set = GET_VHTCAP_CHWDSET(usr_vht_cap_info); + peer_supp_chwd_set = GET_VHTCAP_CHWDSET(pvht_cap->vht_cap.vht_cap_info); + supp_chwd_set = MIN(supp_chwd_set, peer_supp_chwd_set); + + /* We need check AP's bandwidth when TDLS_WIDER_BANDWIDTH is off */ + if (ap_vht_cap && + !ISSUPP_EXTCAP_TDLS_WIDER_BANDWIDTH(sta_ptr->ExtCap.ext_cap)) { + ap_supp_chwd_set = + GET_VHTCAP_CHWDSET(ap_vht_cap->vht_cap.vht_cap_info); + supp_chwd_set = MIN(supp_chwd_set, ap_supp_chwd_set); + } + switch (supp_chwd_set) { + case VHT_CAP_CHWD_80MHZ: + vht_oprat->chan_width = VHT_OPER_CHWD_80MHZ; + break; + case VHT_CAP_CHWD_160MHZ: + vht_oprat->chan_width = VHT_OPER_CHWD_160MHZ; + break; + case VHT_CAP_CHWD_80_80MHZ: + vht_oprat->chan_width = VHT_OPER_CHWD_80_80MHZ; + break; + + } + + /* Fill BASIC VHT MCS and NSS Set */ + /* rx MCS Set, find the minimum of the user rx mcs and peer rx mcs */ + mcs_map_user = GET_DEVRXMCSMAP(priv->usr_dot_11ac_mcs_support); + mcs_map_resp = pvht_cap->vht_cap.mcs_sets.rx_mcs_map; + mcs_map_result = 0; + for (nss = 1; nss <= 8; nss++) { + mcs_user = GET_VHTNSSMCS(mcs_map_user, nss); + mcs_resp = GET_VHTNSSMCS(mcs_map_resp, nss); + if ((mcs_user == NO_NSS_SUPPORT) || + (mcs_resp == NO_NSS_SUPPORT)) + SET_VHTNSSMCS(mcs_map_result, nss, NO_NSS_SUPPORT); + else + SET_VHTNSSMCS(mcs_map_result, nss, + MIN(mcs_user, mcs_resp)); + } + /* Basic MCS map */ + vht_oprat->basic_MCS_map = mcs_map_result; + switch (vht_oprat->chan_width) { + case VHT_OPER_CHWD_80MHZ: + chan_bw = CHANNEL_BW_80MHZ; + break; + case VHT_OPER_CHWD_160MHZ: + chan_bw = CHANNEL_BW_160MHZ; + break; + case VHT_OPER_CHWD_80_80MHZ: + chan_bw = CHANNEL_BW_80MHZ; + break; + } + vht_oprat->chan_center_freq_1 = + wlan_get_center_freq_idx(priv, BAND_AAC, pbss_desc->channel, + chan_bw); + + LEAVE(); + return; +} + +/** + * @brief This function append the 802_11N tlv + * + * @param pmpriv A pointer to mlan_private structure + * @param pbss_desc A pointer to BSSDescriptor_t structure + * @param ppbuffer A Pointer to command buffer pointer + * + * @return bytes added to the buffer + */ +int +wlan_cmd_append_11ac_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc, + t_u8 **ppbuffer) +{ + pmlan_adapter pmadapter = pmpriv->adapter; + MrvlIETypes_VHTCap_t *pvht_cap; + MrvlIETypes_OperModeNtf_t *pmrvl_oper_mode; + IEEEtypes_OperModeNtf_t *pieee_oper_mode; + MrvlIETypes_VHTOprat_t *pvht_op; + t_u8 supp_chwd_set; + t_u32 usr_vht_cap_info; + int ret_len = 0; + + ENTER(); + + /* Null Checks */ + if (ppbuffer == MNULL) { + LEAVE(); + return 0; + } + if (*ppbuffer == MNULL) { + LEAVE(); + return 0; + } + if (pbss_desc->bss_band & BAND_A) + usr_vht_cap_info = pmpriv->usr_dot_11ac_dev_cap_a; + else + usr_vht_cap_info = pmpriv->usr_dot_11ac_dev_cap_bg; + + /* VHT Capabilities IE */ + if (pbss_desc->pvht_cap && + wlan_get_nss_vht_mcs(pbss_desc->pvht_cap->vht_cap.mcs_sets. + rx_mcs_map)) { + pvht_cap = (MrvlIETypes_VHTCap_t *)*ppbuffer; + memset(pmadapter, pvht_cap, 0, sizeof(MrvlIETypes_VHTCap_t)); + pvht_cap->header.type = wlan_cpu_to_le16(VHT_CAPABILITY); + pvht_cap->header.len = sizeof(VHT_capa_t); + memcpy(pmadapter, + (t_u8 *)pvht_cap + sizeof(MrvlIEtypesHeader_t), + (t_u8 *)pbss_desc->pvht_cap + sizeof(IEEEtypes_Header_t), + pvht_cap->header.len); + + wlan_fill_vht_cap_tlv(pmpriv, pvht_cap, pbss_desc->bss_band); + + HEXDUMP("VHT_CAPABILITIES IE", (t_u8 *)pvht_cap, + sizeof(MrvlIETypes_VHTCap_t)); + *ppbuffer += sizeof(MrvlIETypes_VHTCap_t); + ret_len += sizeof(MrvlIETypes_VHTCap_t); + pvht_cap->header.len = wlan_cpu_to_le16(pvht_cap->header.len); + } + + /* VHT Operation IE */ + if (pbss_desc->pvht_oprat) { + if (pmpriv->bss_mode == MLAN_BSS_MODE_IBSS) { + pvht_op = (MrvlIETypes_VHTOprat_t *)*ppbuffer; + memset(pmadapter, pvht_op, 0, + sizeof(MrvlIETypes_VHTOprat_t)); + pvht_op->header.type = wlan_cpu_to_le16(VHT_OPERATION); + pvht_op->header.len = sizeof(MrvlIETypes_VHTOprat_t) - + sizeof(MrvlIEtypesHeader_t); + memcpy(pmadapter, + (t_u8 *)pvht_op + sizeof(MrvlIEtypesHeader_t), + (t_u8 *)pbss_desc->pvht_oprat + + sizeof(IEEEtypes_Header_t), pvht_op->header.len); + + /* negotiate the channel width and central freq */ + /* and keep the central freq as the peer suggests */ + supp_chwd_set = GET_VHTCAP_CHWDSET(usr_vht_cap_info); + if (supp_chwd_set == VHT_CAP_CHWD_80MHZ) + pvht_op->chan_width = MIN(VHT_OPER_CHWD_80MHZ, + pbss_desc-> + pvht_oprat-> + chan_width); + else if (supp_chwd_set == VHT_CAP_CHWD_160MHZ) + pvht_op->chan_width = MIN(VHT_OPER_CHWD_160MHZ, + pbss_desc-> + pvht_oprat-> + chan_width); + else if (supp_chwd_set == VHT_CAP_CHWD_80_80MHZ) + pvht_op->chan_width = + MIN(VHT_OPER_CHWD_80_80MHZ, + pbss_desc->pvht_oprat->chan_width); + else + pvht_op->chan_width = VHT_OPER_CHWD_20_40MHZ; + + HEXDUMP("VHT_OPERATION IE", (t_u8 *)pvht_op, + sizeof(MrvlIETypes_VHTOprat_t)); + *ppbuffer += sizeof(MrvlIETypes_VHTOprat_t); + ret_len += sizeof(MrvlIETypes_VHTOprat_t); + pvht_op->header.len = + wlan_cpu_to_le16(pvht_op->header.len); + } + } + /* Operating Mode Notification IE */ + if (pbss_desc->poper_mode) { + pieee_oper_mode = pbss_desc->poper_mode; + pmrvl_oper_mode = (MrvlIETypes_OperModeNtf_t *)*ppbuffer; + memset(pmadapter, pmrvl_oper_mode, 0, + sizeof(MrvlIETypes_OperModeNtf_t)); + pmrvl_oper_mode->header.type = wlan_cpu_to_le16(OPER_MODE_NTF); + pmrvl_oper_mode->header.len = sizeof(t_u8); + pmrvl_oper_mode->oper_mode = pieee_oper_mode->oper_mode; + + HEXDUMP("OPER MODE NTF IE", (t_u8 *)pmrvl_oper_mode, + sizeof(MrvlIETypes_OperModeNtf_t)); + *ppbuffer += sizeof(MrvlIETypes_OperModeNtf_t); + ret_len += sizeof(MrvlIETypes_OperModeNtf_t); + pmrvl_oper_mode->header.len = + wlan_cpu_to_le16(pmrvl_oper_mode->header.len); + } + + LEAVE(); + return ret_len; +} + +/** + * @brief 11ac configuration handler + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +mlan_status +wlan_11ac_cfg_ioctl(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_ds_11ac_cfg *cfg = MNULL; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_11ac_cfg)) { + PRINTM(MINFO, "MLAN bss IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_11ac_cfg); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + cfg = (mlan_ds_11ac_cfg *)pioctl_req->pbuf; + switch (cfg->sub_command) { + case MLAN_OID_11AC_VHT_CFG: + status = wlan_11ac_ioctl_vhtcfg(pmadapter, pioctl_req); + break; + case MLAN_OID_11AC_CFG_SUPPORTED_MCS_SET: + status = wlan_11ac_ioctl_supported_mcs_set(pmadapter, + pioctl_req); + break; + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + LEAVE(); + return status; +} + +/** + * @brief This function prepares 11ac cfg command + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action the action: GET or SET + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_11ac_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + pmlan_adapter pmadapter = pmpriv->adapter; + HostCmd_DS_11AC_CFG *vhtcfg = &cmd->params.vhtcfg; + mlan_ds_11ac_vht_cfg *vht_cfg = (mlan_ds_11ac_vht_cfg *)pdata_buf; + + ENTER(); + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_11AC_CFG); + cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_11AC_CFG) + S_DS_GEN); + vhtcfg->action = wlan_cpu_to_le16(cmd_action); + vhtcfg->band_config = vht_cfg->band & 0xFF; + vhtcfg->misc_config = vht_cfg->txrx & 0x3; + if (vhtcfg->misc_config != 2) + vhtcfg->misc_config |= (vht_cfg->bwcfg << 2); + + vhtcfg->vht_cap_info = wlan_cpu_to_le32(vht_cfg->vht_cap_info); + vht_cfg->vht_rx_mcs = wlan_cpu_to_le32(vht_cfg->vht_rx_mcs); + memcpy(pmadapter, &vhtcfg->vht_supp_mcs_set[0], + &vht_cfg->vht_rx_mcs, sizeof(t_u32)); + vht_cfg->vht_tx_mcs = wlan_cpu_to_le32(vht_cfg->vht_tx_mcs); + memcpy(pmadapter, &vhtcfg->vht_supp_mcs_set[4], + &vht_cfg->vht_tx_mcs, sizeof(t_u32)); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of 11accfg + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_11ac_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) +{ + pmlan_adapter pmadapter = pmpriv->adapter; + mlan_ds_11ac_cfg *cfg = MNULL; + HostCmd_DS_11AC_CFG *vhtcfg = &resp->params.vhtcfg; + + ENTER(); + cfg = (mlan_ds_11ac_cfg *)pioctl_buf->pbuf; + if (pioctl_buf && + (wlan_le16_to_cpu(vhtcfg->action) == HostCmd_ACT_GEN_GET)) { + cfg->param.vht_cfg.band = vhtcfg->band_config; + cfg->param.vht_cfg.txrx = vhtcfg->misc_config & 0x03; + if (cfg->param.vht_cfg.txrx & 0x1) + cfg->param.vht_cfg.bwcfg = + (vhtcfg->misc_config & 0x04) >> 2; + else + cfg->param.vht_cfg.bwcfg = 0; + + cfg->param.vht_cfg.vht_cap_info = + wlan_le32_to_cpu(vhtcfg->vht_cap_info); + memcpy(pmadapter, &cfg->param.vht_cfg.vht_rx_mcs, + &vhtcfg->vht_supp_mcs_set[0], sizeof(t_u32)); + cfg->param.vht_cfg.vht_rx_mcs = + wlan_le32_to_cpu(cfg->param.vht_cfg.vht_rx_mcs); + memcpy(pmadapter, &cfg->param.vht_cfg.vht_tx_mcs, + &vhtcfg->vht_supp_mcs_set[4], sizeof(t_u32)); + cfg->param.vht_cfg.vht_tx_mcs = + wlan_le32_to_cpu(cfg->param.vht_cfg.vht_tx_mcs); + cfg->param.vht_cfg.vht_rx_max_rate = + wlan_convert_mcsmap_to_maxrate(pmpriv, + cfg->param.vht_cfg.band, + cfg->param.vht_cfg. + vht_rx_mcs); + cfg->param.vht_cfg.vht_tx_max_rate = + wlan_convert_mcsmap_to_maxrate(pmpriv, + cfg->param.vht_cfg.band, + cfg->param.vht_cfg. + vht_tx_mcs); + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +void +wlan_update_11ac_cap(mlan_private *pmpriv) +{ + + mlan_adapter *pmadapter = pmpriv->adapter; + + pmpriv->usr_dot_11ac_mcs_support = pmadapter->hw_dot_11ac_mcs_support; + pmpriv->usr_dot_11ac_dev_cap_bg = + pmadapter-> + hw_dot_11ac_dev_cap & ~DEFALUT_11AC_CAP_BEAMFORMING_RESET_MASK; + pmpriv->usr_dot_11ac_dev_cap_a = + pmadapter-> + hw_dot_11ac_dev_cap & ~DEFALUT_11AC_CAP_BEAMFORMING_RESET_MASK; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11ac.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11ac.h new file mode 100644 index 00000000..4e1db86b --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11ac.h @@ -0,0 +1,57 @@ +/** @file mlan_11ac.h + * + * @brief This file contains the functions for station ioctl. + * + * Copyright (C) 2011-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +#ifndef _MLAN_11AC_H_ +#define _MLAN_11AC_H_ + +#include "mlan_11n_aggr.h" +#include "mlan_11n_rxreorder.h" +#include "mlan_wmm.h" + +void wlan_show_dot11acdevcap(pmlan_adapter pmadapter, t_u32 cap); +void wlan_show_dot11acmcssupport(pmlan_adapter pmadapter, t_u32 support); +t_u16 wlan_convert_mcsmap_to_maxrate(mlan_private *priv, t_u8 bands, + t_u16 mcs_map); +void wlan_fill_vht_cap_tlv(mlan_private *priv, MrvlIETypes_VHTCap_t *pvht_cap, + t_u8 bands); +void wlan_fill_vht_cap_ie(mlan_private *priv, IEEEtypes_VHTCap_t *pvht_cap, + t_u8 bands); +void wlan_fill_tdls_vht_oprat_ie(mlan_private *priv, + IEEEtypes_VHTOprat_t *vht_oprat, + sta_node *sta_ptr); +t_u8 wlan_is_ap_in_11ac_mode(mlan_private *priv); +int wlan_cmd_append_11ac_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc, + t_u8 **ppbuffer); +mlan_status wlan_11ac_cfg_ioctl(pmlan_adapter pmadapter, + pmlan_ioctl_req pioctl_req); +void wlan_update_11ac_cap(mlan_private *pmpriv); + +mlan_status wlan_cmd_11ac_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf); + +mlan_status wlan_ret_11ac_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); + +t_u8 wlan_get_center_freq_idx(IN mlan_private *pmpriv, + IN t_u8 band, IN t_u32 pri_chan, IN t_u8 chan_bw); + +#endif /* _MLAN_11AC_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11d.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11d.c new file mode 100644 index 00000000..93543901 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11d.c @@ -0,0 +1,1576 @@ +/** @file mlan_11d.c + * + * @brief This file contains functions for 802.11D. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ +/******************************************************** +Change log: + 10/21/2008: initial version +********************************************************/ + +#include "mlan.h" +#include "mlan_join.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_11h.h" + +/******************************************************** + Local Variables +********************************************************/ + +#ifdef STA_SUPPORT +/** Region code mapping */ +typedef struct _region_code_mapping { + /** Region */ + t_u8 region[COUNTRY_CODE_LEN]; + /** Code */ + t_u8 code; +} region_code_mapping_t; + +/** Region code mapping table */ +static region_code_mapping_t region_code_mapping[] = { + {"US ", 0x10}, /* US FCC */ + {"CA ", 0x20}, /* IC Canada */ + {"SG ", 0x10}, /* Singapore */ + {"EU ", 0x30}, /* ETSI */ + {"AU ", 0x30}, /* Australia */ + {"KR ", 0x30}, /* Republic Of Korea */ + {"FR ", 0x32}, /* France */ + {"JP ", 0x40}, /* Japan */ + {"JP ", 0x41}, /* Japan */ + {"CN ", 0x50}, /* China */ + {"JP ", 0xFE}, /* Japan */ + {"JP ", 0xFF}, /* Japan special */ +}; + +/** Default Tx power */ +#define TX_PWR_DEFAULT 10 + +/** Universal region code */ +#define UNIVERSAL_REGION_CODE 0xff + +/* Following two structures define the supported channels */ +/** Channels for 802.11b/g */ +static chan_freq_power_t channel_freq_power_UN_BG[] = { + {1, 2412, TX_PWR_DEFAULT}, + {2, 2417, TX_PWR_DEFAULT}, + {3, 2422, TX_PWR_DEFAULT}, + {4, 2427, TX_PWR_DEFAULT}, + {5, 2432, TX_PWR_DEFAULT}, + {6, 2437, TX_PWR_DEFAULT}, + {7, 2442, TX_PWR_DEFAULT}, + {8, 2447, TX_PWR_DEFAULT}, + {9, 2452, TX_PWR_DEFAULT}, + {10, 2457, TX_PWR_DEFAULT}, + {11, 2462, TX_PWR_DEFAULT}, + {12, 2467, TX_PWR_DEFAULT}, + {13, 2472, TX_PWR_DEFAULT}, + {14, 2484, TX_PWR_DEFAULT} +}; + +/** Channels for 802.11a/j */ +static chan_freq_power_t channel_freq_power_UN_AJ[] = { + {8, 5040, TX_PWR_DEFAULT}, + {12, 5060, TX_PWR_DEFAULT}, + {16, 5080, TX_PWR_DEFAULT}, + {34, 5170, TX_PWR_DEFAULT}, + {38, 5190, TX_PWR_DEFAULT}, + {42, 5210, TX_PWR_DEFAULT}, + {46, 5230, TX_PWR_DEFAULT}, + {36, 5180, TX_PWR_DEFAULT}, + {40, 5200, TX_PWR_DEFAULT}, + {44, 5220, TX_PWR_DEFAULT}, + {48, 5240, TX_PWR_DEFAULT}, + {52, 5260, TX_PWR_DEFAULT}, + {56, 5280, TX_PWR_DEFAULT}, + {60, 5300, TX_PWR_DEFAULT}, + {64, 5320, TX_PWR_DEFAULT}, + {100, 5500, TX_PWR_DEFAULT}, + {104, 5520, TX_PWR_DEFAULT}, + {108, 5540, TX_PWR_DEFAULT}, + {112, 5560, TX_PWR_DEFAULT}, + {116, 5580, TX_PWR_DEFAULT}, + {120, 5600, TX_PWR_DEFAULT}, + {124, 5620, TX_PWR_DEFAULT}, + {128, 5640, TX_PWR_DEFAULT}, + {132, 5660, TX_PWR_DEFAULT}, + {136, 5680, TX_PWR_DEFAULT}, + {140, 5700, TX_PWR_DEFAULT}, + {149, 5745, TX_PWR_DEFAULT}, + {153, 5765, TX_PWR_DEFAULT}, + {157, 5785, TX_PWR_DEFAULT}, + {161, 5805, TX_PWR_DEFAULT}, + {165, 5825, TX_PWR_DEFAULT}, +/* {240, 4920, TX_PWR_DEFAULT}, + {244, 4940, TX_PWR_DEFAULT}, + {248, 4960, TX_PWR_DEFAULT}, + {252, 4980, TX_PWR_DEFAULT}, +channels for 11J JP 10M channel gap */ +}; +#endif /* STA_SUPPORT */ + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ +#ifdef STA_SUPPORT +/** + * @brief This function converts integer code to region string + * + * @param pmadapter A pointer to mlan_adapter structure + * @param code Region code + * + * @return Region string + */ +static t_u8 * +wlan_11d_code_2_region(pmlan_adapter pmadapter, t_u8 code) +{ + t_u8 i; + + ENTER(); + + /* Look for code in mapping table */ + for (i = 0; i < NELEMENTS(region_code_mapping); i++) { + if (region_code_mapping[i].code == code) { + LEAVE(); + return region_code_mapping[i].region; + } + } + + LEAVE(); + /* Default is US */ + return region_code_mapping[0].region; +} + +/** + * @brief This function Checks if channel txpwr is learned from AP/IBSS + * + * @param pmadapter A pointer to mlan_adapter structure + * @param band Band number + * @param chan Channel number + * @param parsed_region_chan Pointer to parsed_region_chan_11d_t + * + * @return MTRUE or MFALSE + */ +static t_u8 +wlan_11d_channel_known(pmlan_adapter pmadapter, + t_u8 band, + t_u8 chan, parsed_region_chan_11d_t *parsed_region_chan) +{ + chan_power_11d_t *pchan_pwr = parsed_region_chan->chan_pwr; + t_u8 no_of_chan = parsed_region_chan->no_of_chan; + t_u8 i = 0; + t_u8 ret = MFALSE; + mlan_private *pmpriv; + + ENTER(); + + HEXDUMP("11D: parsed_region_chan", (t_u8 *)pchan_pwr, + sizeof(chan_power_11d_t) * no_of_chan); + + /* Search channel */ + for (i = 0; i < no_of_chan; i++) { + if (chan == pchan_pwr[i].chan && band == pchan_pwr[i].band) { + PRINTM(MINFO, "11D: Found channel:%d (band:%d)\n", chan, + band); + ret = MTRUE; + + if (band & BAND_A) { + /* If chan is a DFS channel, we need to see an + AP on it */ + pmpriv = wlan_get_priv(pmadapter, + MLAN_BSS_ROLE_STA); + if (pmpriv && + wlan_11h_radar_detect_required(pmpriv, + chan)) { + PRINTM(MINFO, + "11H: DFS channel %d, and ap_seen=%d\n", + chan, pchan_pwr[i].ap_seen); + ret = pchan_pwr[i].ap_seen; + } + } + + LEAVE(); + return ret; + } + } + + PRINTM(MINFO, "11D: Could not find channel:%d (band:%d)\n", chan, band); + LEAVE(); + return ret; +} + +/** + * @brief This function generates parsed_region_chan from Domain Info + * learned from AP/IBSS + * + * @param pmadapter Pointer to mlan_adapter structure + * @param region_chan Pointer to region_chan_t + * @param parsed_region_chan Pointer to parsed_region_chan_11d_t + * + * @return N/A + */ +static t_void +wlan_11d_generate_parsed_region_chan(pmlan_adapter pmadapter, + region_chan_t *region_chan, + parsed_region_chan_11d_t + *parsed_region_chan) +{ + chan_freq_power_t *cfp; + t_u8 i; + + ENTER(); + + /* Region channel must be provided */ + if (!region_chan) { + PRINTM(MWARN, "11D: region_chan is MNULL\n"); + LEAVE(); + return; + } + + /* Get channel-frequency-power trio */ + cfp = region_chan->pcfp; + if (!cfp) { + PRINTM(MWARN, "11D: cfp equal MNULL\n"); + LEAVE(); + return; + } + + /* Set channel, band and power */ + for (i = 0; i < region_chan->num_cfp; i++, cfp++) { + parsed_region_chan->chan_pwr[i].chan = (t_u8)cfp->channel; + parsed_region_chan->chan_pwr[i].band = region_chan->band; + parsed_region_chan->chan_pwr[i].pwr = (t_u8)cfp->max_tx_power; + PRINTM(MINFO, "11D: Chan[%d] Band[%d] Pwr[%d]\n", + parsed_region_chan->chan_pwr[i].chan, + parsed_region_chan->chan_pwr[i].band, + parsed_region_chan->chan_pwr[i].pwr); + } + parsed_region_chan->no_of_chan = region_chan->num_cfp; + + PRINTM(MINFO, "11D: no_of_chan[%d]\n", parsed_region_chan->no_of_chan); + + LEAVE(); + return; +} + +/** + * @brief This function generates domain_info from parsed_region_chan + * + * @param pmadapter Pointer to mlan_adapter structure + * @param parsed_region_chan Pointer to parsed_region_chan_11d_t + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_11d_generate_domain_info(pmlan_adapter pmadapter, + parsed_region_chan_11d_t *parsed_region_chan) +{ + t_u8 no_of_sub_band = 0; + t_u8 no_of_chan = parsed_region_chan->no_of_chan; + t_u8 no_of_parsed_chan = 0; + t_u8 first_chan = 0, next_chan = 0, max_pwr = 0; + t_u8 i, flag = MFALSE; + wlan_802_11d_domain_reg_t *domain_info = &pmadapter->domain_reg; + + ENTER(); + + /* Should be only place that clear domain_reg (besides init) */ + memset(pmadapter, domain_info, 0, sizeof(wlan_802_11d_domain_reg_t)); + + /* Set country code */ + memcpy(pmadapter, domain_info->country_code, + wlan_11d_code_2_region(pmadapter, (t_u8)pmadapter->region_code), + COUNTRY_CODE_LEN); + + PRINTM(MINFO, "11D: Number of channel = %d\n", no_of_chan); + HEXDUMP("11D: parsed_region_chan", (t_u8 *)parsed_region_chan, + sizeof(parsed_region_chan_11d_t)); + + /* Set channel and power */ + for (i = 0; i < no_of_chan; i++) { + if (!flag) { + flag = MTRUE; + next_chan = first_chan = + parsed_region_chan->chan_pwr[i].chan; + max_pwr = parsed_region_chan->chan_pwr[i].pwr; + no_of_parsed_chan = 1; + continue; + } + + if (parsed_region_chan->chan_pwr[i].chan == next_chan + 1 && + parsed_region_chan->chan_pwr[i].pwr == max_pwr) { + next_chan++; + no_of_parsed_chan++; + } else { + domain_info->sub_band[no_of_sub_band].first_chan = + first_chan; + domain_info->sub_band[no_of_sub_band].no_of_chan = + no_of_parsed_chan; + domain_info->sub_band[no_of_sub_band].max_tx_pwr = + max_pwr; + no_of_sub_band++; + no_of_parsed_chan = 1; + next_chan = first_chan = + parsed_region_chan->chan_pwr[i].chan; + max_pwr = parsed_region_chan->chan_pwr[i].pwr; + } + } + + if (flag) { + domain_info->sub_band[no_of_sub_band].first_chan = first_chan; + domain_info->sub_band[no_of_sub_band].no_of_chan = + no_of_parsed_chan; + domain_info->sub_band[no_of_sub_band].max_tx_pwr = max_pwr; + no_of_sub_band++; + } + domain_info->no_of_sub_band = no_of_sub_band; + + PRINTM(MINFO, "11D: Number of sub-band =0x%x\n", + domain_info->no_of_sub_band); + HEXDUMP("11D: domain_info", (t_u8 *)domain_info, + COUNTRY_CODE_LEN + 1 + + sizeof(IEEEtypes_SubbandSet_t) * no_of_sub_band); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function updates the channel power table with the channel + * present in BSSDescriptor. + * + * @param pmpriv A pointer to mlan_private structure + * @param pbss_desc A pointer to BSSDescriptor_t + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_11d_update_chan_pwr_table(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + parsed_region_chan_11d_t *parsed_region_chan = + &pmadapter->parsed_region_chan; + t_u16 i; + t_u8 tx_power = 0; + t_u8 chan; + + ENTER(); + + chan = pbss_desc->phy_param_set.ds_param_set.current_chan; + + tx_power = wlan_get_txpwr_of_chan_from_cfp(pmpriv, chan); + + if (!tx_power) { + PRINTM(MMSG, "11D: Invalid channel\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + /* Check whether the channel already exists in channel power table of + parsed region */ + for (i = 0; ((i < parsed_region_chan->no_of_chan) && + (i < MAX_NO_OF_CHAN)); i++) { + if (parsed_region_chan->chan_pwr[i].chan == chan + && parsed_region_chan->chan_pwr[i].band == + pbss_desc->bss_band) { + /* Channel already exists, use minimum of existing and + tx_power */ + parsed_region_chan->chan_pwr[i].pwr = + MIN(parsed_region_chan->chan_pwr[i].pwr, + tx_power); + parsed_region_chan->chan_pwr[i].ap_seen = MTRUE; + break; + } + } + + if (i == parsed_region_chan->no_of_chan && i < MAX_NO_OF_CHAN) { + /* Channel not found. Update the channel in the channel-power + table */ + parsed_region_chan->chan_pwr[i].chan = chan; + parsed_region_chan->chan_pwr[i].band = + (t_u8)pbss_desc->bss_band; + parsed_region_chan->chan_pwr[i].pwr = tx_power; + parsed_region_chan->chan_pwr[i].ap_seen = MTRUE; + parsed_region_chan->no_of_chan++; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function finds the no_of_chan-th chan after the first_chan + * + * @param pmadapter A pointer to mlan_adapter structure + * @param band Band + * @param first_chan First channel number + * @param no_of_chan Number of channels + * @param chan Pointer to the returned no_of_chan-th chan number + * + * @return MTRUE or MFALSE + */ +static t_u8 +wlan_11d_get_chan(pmlan_adapter pmadapter, t_u8 band, t_u8 first_chan, + t_u8 no_of_chan, t_u8 *chan) +{ + chan_freq_power_t *cfp = MNULL; + t_u8 i; + t_u8 cfp_no = 0; + + ENTER(); + if (band & (BAND_B | BAND_G | BAND_GN | BAND_GAC)) { + cfp = channel_freq_power_UN_BG; + cfp_no = NELEMENTS(channel_freq_power_UN_BG); + } else if (band & (BAND_A | BAND_AN | BAND_AAC)) { + cfp = channel_freq_power_UN_AJ; + cfp_no = NELEMENTS(channel_freq_power_UN_AJ); + } else { + PRINTM(MERROR, "11D: Wrong Band[%d]\n", band); + LEAVE(); + return MFALSE; + } + /* Locate the first_chan */ + for (i = 0; i < cfp_no; i++) { + if (cfp && ((cfp + i)->channel == first_chan)) { + PRINTM(MINFO, "11D: first_chan found\n"); + break; + } + } + + if (i < cfp_no) { + /* Check if beyond the boundary */ + if (i + no_of_chan < cfp_no) { + /* Get first_chan + no_of_chan */ + *chan = (t_u8)(cfp + i + no_of_chan)->channel; + LEAVE(); + return MTRUE; + } + } + + LEAVE(); + return MFALSE; +} + +/** + * @brief This function processes the country info present in BSSDescriptor. + * + * @param pmpriv A pointer to mlan_private structure + * @param pbss_desc A pointer to BSSDescriptor_t + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_11d_process_country_info(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + parsed_region_chan_11d_t region_chan; + parsed_region_chan_11d_t *parsed_region_chan = + &pmadapter->parsed_region_chan; + t_u16 i, j, num_chan_added = 0; + + ENTER(); + + memset(pmadapter, ®ion_chan, 0, sizeof(parsed_region_chan_11d_t)); + + /* Parse 11D country info */ + if (wlan_11d_parse_domain_info(pmadapter, &pbss_desc->country_info, + (t_u8)pbss_desc->bss_band, + ®ion_chan) != MLAN_STATUS_SUCCESS) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + if (parsed_region_chan->no_of_chan != 0) { + /* + * Check if the channel number already exists in the + * chan-power table of parsed_region_chan + */ + for (i = 0; (i < region_chan.no_of_chan && i < MAX_NO_OF_CHAN); + i++) { + for (j = 0; + (j < parsed_region_chan->no_of_chan && + j < MAX_NO_OF_CHAN); j++) { + /* + * Channel already exists, update the tx power + * with new tx power, since country IE is valid + * here. + */ + if (region_chan.chan_pwr[i].chan == + parsed_region_chan->chan_pwr[j].chan && + region_chan.chan_pwr[i].band == + parsed_region_chan->chan_pwr[j].band) { + parsed_region_chan->chan_pwr[j].pwr = + region_chan.chan_pwr[i].pwr; + break; + } + } + + if (j == parsed_region_chan->no_of_chan && + j < MAX_NO_OF_CHAN) { + /* + * Channel does not exist in the channel power + * table, update this new chan and tx_power + * to the channel power table + */ + parsed_region_chan-> + chan_pwr[parsed_region_chan-> + no_of_chan + + num_chan_added].chan = + region_chan.chan_pwr[i].chan; + parsed_region_chan-> + chan_pwr[parsed_region_chan-> + no_of_chan + + num_chan_added].band = + region_chan.chan_pwr[i].band; + parsed_region_chan-> + chan_pwr[parsed_region_chan-> + no_of_chan + + num_chan_added].pwr = + region_chan.chan_pwr[i].pwr; + parsed_region_chan-> + chan_pwr[parsed_region_chan-> + no_of_chan + + num_chan_added].ap_seen = + MFALSE; + num_chan_added++; + } + } + parsed_region_chan->no_of_chan += num_chan_added; + } else { + /* Parsed region is empty, copy the first one */ + memcpy(pmadapter, parsed_region_chan, + ®ion_chan, sizeof(parsed_region_chan_11d_t)); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This helper function copies chan_power_11d_t element + * + * @param chan_dst Pointer to destination of chan_power + * @param chan_src Pointer to source of chan_power + * + * @return N/A + */ +static t_void +wlan_11d_copy_chan_power(chan_power_11d_t *chan_dst, chan_power_11d_t *chan_src) +{ + ENTER(); + + chan_dst->chan = chan_src->chan; + chan_dst->band = chan_src->band; + chan_dst->pwr = chan_src->pwr; + chan_dst->ap_seen = chan_src->ap_seen; + + LEAVE(); + return; +} + +/** + * @brief This function sorts parsed_region_chan in ascending + * channel number. + * + * @param parsed_region_chan Pointer to parsed_region_chan_11d_t + * + * @return N/A + */ +static t_void +wlan_11d_sort_parsed_region_chan(parsed_region_chan_11d_t *parsed_region_chan) +{ + int i, j; + chan_power_11d_t temp; + chan_power_11d_t *pchan_power = parsed_region_chan->chan_pwr; + + ENTER(); + + PRINTM(MINFO, "11D: Number of channel = %d\n", + parsed_region_chan->no_of_chan); + + /* Use insertion sort method */ + for (i = 1; i < parsed_region_chan->no_of_chan; i++) { + wlan_11d_copy_chan_power(&temp, pchan_power + i); + for (j = i; j > 0 && (pchan_power + j - 1)->chan > temp.chan; + j--) + wlan_11d_copy_chan_power(pchan_power + j, + pchan_power + j - 1); + wlan_11d_copy_chan_power(pchan_power + j, &temp); + } + + HEXDUMP("11D: parsed_region_chan", (t_u8 *)parsed_region_chan, + sizeof(parsed_region_chan_11d_t)); + + LEAVE(); + return; +} +#endif /* STA_SUPPORT */ + +/** + * @brief This function sends domain info to FW + * + * @param pmpriv A pointer to mlan_private structure + * @param pioctl_buf A pointer to MLAN IOCTL Request buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_11d_send_domain_info(mlan_private *pmpriv, t_void *pioctl_buf) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Send cmd to FW to set domain info */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11D_DOMAIN_INFO, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_buf, MNULL); + if (ret) + PRINTM(MERROR, "11D: Failed to download domain Info\n"); + + LEAVE(); + return ret; +} + +/** + * @brief This function overwrites domain_info + * + * @param pmadapter Pointer to mlan_adapter structure + * @param band Intended operating band + * @param country_code Intended country code + * @param num_sub_band Count of tuples in list below + * @param sub_band_list List of sub_band tuples + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_11d_set_domain_info(mlan_private *pmpriv, + t_u8 band, + t_u8 country_code[COUNTRY_CODE_LEN], + t_u8 num_sub_band, + IEEEtypes_SubbandSet_t *sub_band_list) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + wlan_802_11d_domain_reg_t *pdomain = &pmadapter->domain_reg; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(pmadapter, pdomain, 0, sizeof(wlan_802_11d_domain_reg_t)); + memcpy(pmadapter, pdomain->country_code, country_code, + COUNTRY_CODE_LEN); + pdomain->band = band; + pdomain->no_of_sub_band = num_sub_band; + memcpy(pmadapter, pdomain->sub_band, sub_band_list, + MIN(MRVDRV_MAX_SUBBAND_802_11D, + num_sub_band) * sizeof(IEEEtypes_SubbandSet_t)); + + LEAVE(); + return ret; +} + +/******************************************************** + Global functions +********************************************************/ + +/** + * @brief This function gets if priv is a station (STA) + * + * @param pmpriv Pointer to mlan_private structure + * + * @return MTRUE or MFALSE + */ +t_bool +wlan_is_station(mlan_private *pmpriv) +{ + ENTER(); + LEAVE(); + return (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_STA) ? MTRUE : MFALSE; +} + +/** + * @brief This function gets if 11D is enabled + * + * @param pmpriv Pointer to mlan_private structure + * + * @return MTRUE or MFALSE + */ +t_bool +wlan_11d_is_enabled(mlan_private *pmpriv) +{ + ENTER(); + LEAVE(); + return (pmpriv->state_11d.enable_11d == ENABLE_11D) ? MTRUE : MFALSE; +} + +/** + * @brief Initialize interface variable for 11D + * + * @param pmpriv Pointer to mlan_private structure + * + * @return N/A + */ +t_void +wlan_11d_priv_init(mlan_private *pmpriv) +{ + wlan_802_11d_state_t *state = &pmpriv->state_11d; + + ENTER(); + + /* Start in disabled mode */ + state->enable_11d = DISABLE_11D; + if (!pmpriv->adapter->init_para.cfg_11d) + state->user_enable_11d = DEFAULT_11D_STATE; + else + state->user_enable_11d = + (pmpriv->adapter->init_para.cfg_11d == + MLAN_INIT_PARA_DISABLED) ? DISABLE_11D : ENABLE_11D; + + LEAVE(); + return; +} + +/** + * @brief Initialize device variable for 11D + * + * @param pmadapter Pointer to mlan_adapter structure + * + * @return N/A + */ +t_void +wlan_11d_init(mlan_adapter *pmadapter) +{ + ENTER(); + +#ifdef STA_SUPPORT + memset(pmadapter, &(pmadapter->parsed_region_chan), 0, + sizeof(parsed_region_chan_11d_t)); + memset(pmadapter, &(pmadapter->universal_channel), 0, + sizeof(region_chan_t)); +#endif + memset(pmadapter, &(pmadapter->domain_reg), 0, + sizeof(wlan_802_11d_domain_reg_t)); + + LEAVE(); + return; +} + +/** + * @brief This function enable/disable 11D + * + * @param pmpriv A pointer to mlan_private structure + * @param pioctl_buf A pointer to MLAN IOCTL Request buffer + * @param flag 11D status + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11d_enable(mlan_private *pmpriv, t_void *pioctl_buf, state_11d_t flag) +{ +#ifdef STA_SUPPORT + mlan_adapter *pmadapter = pmpriv->adapter; +#endif + mlan_status ret = MLAN_STATUS_SUCCESS; + state_11d_t enable = flag; + + ENTER(); + + /* Send cmd to FW to enable/disable 11D function */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_SNMP_MIB, + HostCmd_ACT_GEN_SET, + Dot11D_i, (t_void *)pioctl_buf, &enable); + + if (ret) { + PRINTM(MERROR, "11D: Failed to %s 11D\n", + (flag) ? "enable" : "disable"); + } +#ifdef STA_SUPPORT + else { + /* clear parsed table regardless of flag */ + memset(pmadapter, &(pmadapter->parsed_region_chan), 0, + sizeof(parsed_region_chan_11d_t)); + } +#endif + + LEAVE(); + return ret; +} + +/** + * @brief This function implements command CMD_802_11D_DOMAIN_INFO + * + * @param pmpriv A pointer to mlan_private structure + * @param pcmd A pointer to HostCmd_DS_COMMAND structure of + * command buffer + * @param cmd_action Command action + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_802_11d_domain_info(mlan_private *pmpriv, + HostCmd_DS_COMMAND *pcmd, t_u16 cmd_action) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + HostCmd_DS_802_11D_DOMAIN_INFO *pdomain_info = + &pcmd->params.domain_info; + MrvlIEtypes_DomainParamSet_t *domain = &pdomain_info->domain; + t_u8 no_of_sub_band = pmadapter->domain_reg.no_of_sub_band; + + ENTER(); + + PRINTM(MINFO, "11D: number of sub-band=0x%x\n", no_of_sub_band); + + pcmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11D_DOMAIN_INFO); + pdomain_info->action = wlan_cpu_to_le16(cmd_action); + if (cmd_action == HostCmd_ACT_GEN_GET) { + /* Dump domain info */ + pcmd->size = + wlan_cpu_to_le16(sizeof(pdomain_info->action) + + S_DS_GEN); + HEXDUMP("11D: 802_11D_DOMAIN_INFO", (t_u8 *)pcmd, + wlan_le16_to_cpu(pcmd->size)); + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + + /* Set domain info fields */ + domain->header.type = wlan_cpu_to_le16(TLV_TYPE_DOMAIN); + memcpy(pmadapter, domain->country_code, + pmadapter->domain_reg.country_code, + sizeof(domain->country_code)); + + domain->header.len = + ((no_of_sub_band * sizeof(IEEEtypes_SubbandSet_t)) + + sizeof(domain->country_code)); + + if (no_of_sub_band) { + memcpy(pmadapter, domain->sub_band, + pmadapter->domain_reg.sub_band, + MIN(MRVDRV_MAX_SUBBAND_802_11D, + no_of_sub_band) * sizeof(IEEEtypes_SubbandSet_t)); + + pcmd->size = wlan_cpu_to_le16(sizeof(pdomain_info->action) + + domain->header.len + + sizeof(MrvlIEtypesHeader_t) + + S_DS_GEN); + } else { + pcmd->size = + wlan_cpu_to_le16(sizeof(pdomain_info->action) + + S_DS_GEN); + } + domain->header.len = wlan_cpu_to_le16(domain->header.len); + + HEXDUMP("11D: 802_11D_DOMAIN_INFO", (t_u8 *)pcmd, + wlan_le16_to_cpu(pcmd->size)); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handle response of CMD_802_11D_DOMAIN_INFO + * + * @param pmpriv A pointer to mlan_private structure + * @param resp Pointer to command response buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ret_802_11d_domain_info(mlan_private *pmpriv, HostCmd_DS_COMMAND *resp) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + HostCmd_DS_802_11D_DOMAIN_INFO_RSP *domain_info = + &resp->params.domain_info_resp; + MrvlIEtypes_DomainParamSet_t *domain = &domain_info->domain; + t_u16 action = wlan_le16_to_cpu(domain_info->action); + t_u8 no_of_sub_band = 0; + + ENTER(); + + /* Dump domain info response data */ + HEXDUMP("11D: DOMAIN Info Rsp Data", (t_u8 *)resp, resp->size); + + no_of_sub_band = + (t_u8)((wlan_le16_to_cpu(domain->header.len) - COUNTRY_CODE_LEN) + / sizeof(IEEEtypes_SubbandSet_t)); + + PRINTM(MINFO, "11D Domain Info Resp: number of sub-band=%d\n", + no_of_sub_band); + + if (no_of_sub_band > MRVDRV_MAX_SUBBAND_802_11D) { + PRINTM(MWARN, "11D: Invalid number of subbands %d returned!!\n", + no_of_sub_band); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + switch (action) { + case HostCmd_ACT_GEN_SET: /* Proc Set Action */ + break; + case HostCmd_ACT_GEN_GET: + break; + default: + PRINTM(MERROR, "11D: Invalid Action:%d\n", domain_info->action); + ret = MLAN_STATUS_FAILURE; + break; + } + + LEAVE(); + return ret; +} + +#ifdef STA_SUPPORT +/** + * @brief This function parses country information for region channel + * + * @param pmadapter Pointer to mlan_adapter structure + * @param country_info Country information + * @param band Chan band + * @param parsed_region_chan Pointer to parsed_region_chan_11d_t + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11d_parse_domain_info(pmlan_adapter pmadapter, + IEEEtypes_CountryInfoFullSet_t *country_info, + t_u8 band, + parsed_region_chan_11d_t *parsed_region_chan) +{ + t_u8 no_of_sub_band, no_of_chan; + t_u8 last_chan, first_chan, cur_chan = 0; + t_u8 idx = 0; + t_u8 j, i; + + ENTER(); + + /* + * Validation Rules: + * 1. Valid Region Code + * 2. First Chan increment + * 3. Channel range no overlap + * 4. Channel is valid? + * 5. Channel is supported by Region? + * 6. Others + */ + + HEXDUMP("country_info", (t_u8 *)country_info, 30); + + /* Step 1: Check region_code */ + if (!(*(country_info->country_code)) || + (country_info->len <= COUNTRY_CODE_LEN)) { + /* No region info or wrong region info: treat as no 11D info */ + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + no_of_sub_band = (country_info->len - COUNTRY_CODE_LEN) / + sizeof(IEEEtypes_SubbandSet_t); + + for (j = 0, last_chan = 0; j < no_of_sub_band; j++) { + + if (country_info->sub_band[j].first_chan <= last_chan) { + /* Step2&3: Check First Chan Num increment and no + overlap */ + PRINTM(MINFO, "11D: Chan[%d>%d] Overlap\n", + country_info->sub_band[j].first_chan, last_chan); + continue; + } + + first_chan = country_info->sub_band[j].first_chan; + no_of_chan = country_info->sub_band[j].no_of_chan; + + for (i = 0; idx < MAX_NO_OF_CHAN && i < no_of_chan; i++) { + /* Step 4 : Channel is supported? */ + if (wlan_11d_get_chan + (pmadapter, band, first_chan, i, + &cur_chan) == MFALSE) { + /* Chan is not found in UN table */ + PRINTM(MWARN, + "11D: channel is not supported: %d\n", + i); + break; + } + + last_chan = cur_chan; + + /* Step 5: We don't need to check if cur_chan is + supported by mrvl in region */ + parsed_region_chan->chan_pwr[idx].chan = cur_chan; + parsed_region_chan->chan_pwr[idx].band = band; + parsed_region_chan->chan_pwr[idx].pwr = + country_info->sub_band[j].max_tx_pwr; + idx++; + } + + /* Step 6: Add other checking if any */ + } + + parsed_region_chan->no_of_chan = idx; + + PRINTM(MINFO, "11D: number of channel=0x%x\n", + parsed_region_chan->no_of_chan); + HEXDUMP("11D: parsed_region_chan", (t_u8 *)parsed_region_chan->chan_pwr, + sizeof(chan_power_11d_t) * idx); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function converts channel to frequency + * + * @param pmadapter A pointer to mlan_adapter structure + * @param chan Channel number + * @param band Band + * + * @return Channel frequency + */ +t_u32 +wlan_11d_chan_2_freq(pmlan_adapter pmadapter, t_u8 chan, t_u8 band) +{ + chan_freq_power_t *cf; + t_u16 cnt; + t_u16 i; + t_u32 freq = 0; + + ENTER(); + + /* Get channel-frequency-power trios */ + if (band & (BAND_A | BAND_AN | BAND_AAC)) { + cf = channel_freq_power_UN_AJ; + cnt = NELEMENTS(channel_freq_power_UN_AJ); + } else { + cf = channel_freq_power_UN_BG; + cnt = NELEMENTS(channel_freq_power_UN_BG); + } + + /* Locate channel and return corresponding frequency */ + for (i = 0; i < cnt; i++) { + if (chan == cf[i].channel) + freq = cf[i].freq; + } + + LEAVE(); + return freq; +} + +/** + * @brief This function setups scan channels + * + * @param pmpriv Pointer to mlan_private structure + * @param band Band + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_11d_set_universaltable(mlan_private *pmpriv, t_u8 band) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + t_u16 i = 0; + + ENTER(); + + memset(pmadapter, pmadapter->universal_channel, 0, + sizeof(pmadapter->universal_channel)); + + if (band & (BAND_B | BAND_G | BAND_GN)) + /* If band B, G or N */ + { + /* Set channel-frequency-power */ + pmadapter->universal_channel[i].num_cfp = + NELEMENTS(channel_freq_power_UN_BG); + PRINTM(MINFO, "11D: BG-band num_cfp=%d\n", + pmadapter->universal_channel[i].num_cfp); + + pmadapter->universal_channel[i].pcfp = channel_freq_power_UN_BG; + pmadapter->universal_channel[i].valid = MTRUE; + + /* Set region code */ + pmadapter->universal_channel[i].region = UNIVERSAL_REGION_CODE; + + /* Set band */ + if (band & BAND_GN) + pmadapter->universal_channel[i].band = BAND_G; + else + pmadapter->universal_channel[i].band = + (band & BAND_G) ? BAND_G : BAND_B; + i++; + } + + if (band & (BAND_A | BAND_AN | BAND_AAC)) { + /* If band A */ + + /* Set channel-frequency-power */ + pmadapter->universal_channel[i].num_cfp = + NELEMENTS(channel_freq_power_UN_AJ); + PRINTM(MINFO, "11D: AJ-band num_cfp=%d\n", + pmadapter->universal_channel[i].num_cfp); + + pmadapter->universal_channel[i].pcfp = channel_freq_power_UN_AJ; + + pmadapter->universal_channel[i].valid = MTRUE; + + /* Set region code */ + pmadapter->universal_channel[i].region = UNIVERSAL_REGION_CODE; + + /* Set band */ + pmadapter->universal_channel[i].band = BAND_A; + i++; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function calculates the scan type for channels + * + * @param pmadapter A pointer to mlan_adapter structure + * @param band Band number + * @param chan Chan number + * @param parsed_region_chan Pointer to parsed_region_chan_11d_t + * + * @return PASSIVE if chan is unknown; ACTIVE + * if chan is known + */ +t_u8 +wlan_11d_get_scan_type(pmlan_adapter pmadapter, + t_u8 band, + t_u8 chan, parsed_region_chan_11d_t *parsed_region_chan) +{ + t_u8 scan_type = MLAN_SCAN_TYPE_PASSIVE; + + ENTER(); + + if (wlan_11d_channel_known(pmadapter, band, chan, parsed_region_chan)) { + /* Channel found */ + PRINTM(MINFO, "11D: Channel found and doing Active Scan\n"); + scan_type = MLAN_SCAN_TYPE_ACTIVE; + } else + PRINTM(MINFO, + "11D: Channel not found and doing Passive Scan\n"); + + LEAVE(); + return scan_type; +} + +/** + * @brief This function clears the parsed region table, if 11D is enabled + * + * @param pmpriv A pointer to mlan_private structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11d_clear_parsedtable(mlan_private *pmpriv) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (wlan_11d_is_enabled(pmpriv)) + memset(pmadapter, &(pmadapter->parsed_region_chan), 0, + sizeof(parsed_region_chan_11d_t)); + else + ret = MLAN_STATUS_FAILURE; + + LEAVE(); + return ret; +} + +/** + * @brief This function generates 11D info from user specified regioncode + * and download to FW + * + * @param pmpriv A pointer to mlan_private structure + * @param band Band to create + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11d_create_dnld_countryinfo(mlan_private *pmpriv, t_u8 band) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_adapter *pmadapter = pmpriv->adapter; + region_chan_t *region_chan; + parsed_region_chan_11d_t parsed_region_chan; + t_u8 j; + + ENTER(); + + /* Only valid if 11D is enabled */ + if (wlan_11d_is_enabled(pmpriv)) { + + PRINTM(MINFO, "11D: Band[%d]\n", band); + + /* Update parsed_region_chan; download domain info to FW */ + + /* Find region channel */ + for (j = 0; j < MAX_REGION_CHANNEL_NUM; j++) { + region_chan = &pmadapter->region_channel[j]; + + PRINTM(MINFO, "11D: [%d] region_chan->Band[%d]\n", j, + region_chan->band); + + if (!region_chan || !region_chan->valid || + !region_chan->pcfp) + continue; + switch (region_chan->band) { + case BAND_A: + switch (band) { + case BAND_A: + case BAND_AN: + case BAND_A | BAND_AN: + case BAND_A | BAND_AN | BAND_AAC: + break; + default: + continue; + } + break; + case BAND_B: + case BAND_G: + switch (band) { + case BAND_B: + case BAND_G: + case BAND_G | BAND_B: + case BAND_GN: + case BAND_G | BAND_GN: + case BAND_B | BAND_G | BAND_GN: + case BAND_B | BAND_G | BAND_GN | BAND_GAC: + break; + default: + continue; + } + break; + default: + continue; + } + break; + } + + /* Check if region channel found */ + if (j >= MAX_REGION_CHANNEL_NUM) { + PRINTM(MERROR, "11D: region_chan not found. Band[%d]\n", + band); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + /* Generate parsed region channel info from region channel */ + memset(pmadapter, &parsed_region_chan, 0, + sizeof(parsed_region_chan_11d_t)); + wlan_11d_generate_parsed_region_chan(pmadapter, region_chan, + &parsed_region_chan); + + /* Generate domain info from parsed region channel info */ + wlan_11d_generate_domain_info(pmadapter, &parsed_region_chan); + + /* Set domain info */ + ret = wlan_11d_send_domain_info(pmpriv, MNULL); + if (ret) { + PRINTM(MERROR, + "11D: Error sending domain info to FW\n"); + } + } + + LEAVE(); + return ret; +} + +/** + * @brief This function parses country info from AP and + * download country info to FW + * + * @param pmpriv A pointer to mlan_private structure + * @param pbss_desc A pointer to BSS descriptor + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11d_parse_dnld_countryinfo(mlan_private *pmpriv, + BSSDescriptor_t *pbss_desc) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_adapter *pmadapter = pmpriv->adapter; + parsed_region_chan_11d_t region_chan; + parsed_region_chan_11d_t bssdesc_region_chan; + t_u32 i, j; + + ENTER(); + + /* Only valid if 11D is enabled */ + if (wlan_11d_is_enabled(pmpriv)) { + + memset(pmadapter, ®ion_chan, 0, + sizeof(parsed_region_chan_11d_t)); + memset(pmadapter, &bssdesc_region_chan, 0, + sizeof(parsed_region_chan_11d_t)); + + memcpy(pmadapter, ®ion_chan, + &pmadapter->parsed_region_chan, + sizeof(parsed_region_chan_11d_t)); + + if (pbss_desc) { + /* Parse domain info if available */ + ret = wlan_11d_parse_domain_info(pmadapter, + &pbss_desc-> + country_info, + (t_u8)pbss_desc-> + bss_band, + &bssdesc_region_chan); + + if (ret == MLAN_STATUS_SUCCESS) { + /* Update the channel-power table */ + for (i = 0; + ((i < bssdesc_region_chan.no_of_chan) + && (i < MAX_NO_OF_CHAN)); i++) { + + for (j = 0; + ((j < region_chan.no_of_chan) + && (j < MAX_NO_OF_CHAN)); j++) { + /* + * Channel already exists, use minimum + * of existing tx power and tx_power + * received from country info of the + * current AP + */ + if (region_chan.chan_pwr[i]. + chan == + bssdesc_region_chan. + chan_pwr[j].chan && + region_chan.chan_pwr[i]. + band == + bssdesc_region_chan. + chan_pwr[j].band) { + region_chan.chan_pwr[j]. + pwr = + MIN(region_chan. + chan_pwr[j]. + pwr, + bssdesc_region_chan. + chan_pwr[i]. + pwr); + break; + } + } + } + } + } + + /* Generate domain info */ + wlan_11d_generate_domain_info(pmadapter, ®ion_chan); + + /* Set domain info */ + ret = wlan_11d_send_domain_info(pmpriv, MNULL); + if (ret) { + PRINTM(MERROR, + "11D: Error sending domain info to FW\n"); + } + } + + LEAVE(); + return ret; +} + +/** + * @brief This function prepares domain info from scan table and + * downloads the domain info command to the FW. + * + * @param pmpriv A pointer to mlan_private structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11d_prepare_dnld_domain_info_cmd(mlan_private *pmpriv) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_adapter *pmadapter = pmpriv->adapter; + IEEEtypes_CountryInfoFullSet_t *pcountry_full = MNULL; + t_u32 idx; + + ENTER(); + + /* Only valid if 11D is enabled */ + if (wlan_11d_is_enabled(pmpriv) && pmadapter->num_in_scan_table != 0) { + for (idx = 0; idx < pmadapter->num_in_scan_table; idx++) { + pcountry_full = + &pmadapter->pscan_table[idx].country_info; + + ret = wlan_11d_update_chan_pwr_table(pmpriv, + &pmadapter-> + pscan_table[idx]); + + if (*(pcountry_full->country_code) != 0 && + (pcountry_full->len > COUNTRY_CODE_LEN)) { + /* Country info found in the BSS Descriptor */ + ret = wlan_11d_process_country_info(pmpriv, + &pmadapter-> + pscan_table + [idx]); + } + } + + /* Sort parsed_region_chan in ascending channel number */ + wlan_11d_sort_parsed_region_chan(&pmadapter-> + parsed_region_chan); + + /* Check if connected */ + if (pmpriv->media_connected == MTRUE) { + ret = wlan_11d_parse_dnld_countryinfo(pmpriv, + &pmpriv-> + curr_bss_params. + bss_descriptor); + } else { + ret = wlan_11d_parse_dnld_countryinfo(pmpriv, MNULL); + } + } + + LEAVE(); + return ret; +} + +/** + * @brief This function sets up domain_reg and downloads CMD to FW + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req Pointer to the IOCTL request buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11d_cfg_domain_info(IN pmlan_adapter pmadapter, + IN mlan_ioctl_req *pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_11d_domain_info *domain_info = MNULL; + mlan_ds_11d_cfg *cfg_11d = MNULL; + t_u8 cfp_bg = 0, cfp_a = 0; + + ENTER(); + + cfg_11d = (mlan_ds_11d_cfg *)pioctl_req->pbuf; + domain_info = &cfg_11d->param.domain_info; + memcpy(pmadapter, pmadapter->country_code, domain_info->country_code, + COUNTRY_CODE_LEN); + wlan_11d_set_domain_info(pmpriv, domain_info->band, + domain_info->country_code, + domain_info->no_of_sub_band, + (IEEEtypes_SubbandSet_t *)domain_info-> + sub_band); + ret = wlan_11d_send_domain_info(pmpriv, pioctl_req); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + /* Update region code and table based on country code */ + if (wlan_misc_country_2_cfp_table_code(pmadapter, + domain_info->country_code, + &cfp_bg, &cfp_a)) { + PRINTM(MIOCTL, "Country code %c%c not found!\n", + domain_info->country_code[0], + domain_info->country_code[1]); + goto done; + } + pmadapter->cfp_code_bg = cfp_bg; + pmadapter->cfp_code_a = cfp_a; + if (cfp_bg && cfp_a && (cfp_bg == cfp_a)) + pmadapter->region_code = cfp_a; + else + pmadapter->region_code = 0; + if (wlan_set_regiontable(pmpriv, pmadapter->region_code, + pmadapter->config_bands | pmadapter-> + adhoc_start_band)) { + PRINTM(MIOCTL, "Fail to set regiontabl\n"); + goto done; + } +done: + LEAVE(); + return ret; +} +#endif /* STA_SUPPORT */ + +#if defined(UAP_SUPPORT) +/** + * @brief This function handles domain info data from UAP interface. + * Checks conditions, sets up domain_reg, then downloads CMD. + * + * @param pmpriv A pointer to mlan_private structure + * @param band Band interface is operating on + * @param domain_tlv Pointer to domain_info tlv + * @param pioctl_buf Pointer to the IOCTL buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11d_handle_uap_domain_info(mlan_private *pmpriv, + t_u8 band, t_u8 *domain_tlv, t_void *pioctl_buf) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_adapter *pmadapter = pmpriv->adapter; + MrvlIEtypes_DomainParamSet_t *pdomain_tlv; + t_u8 num_sub_band = 0; + t_u8 cfp_bg = 0, cfp_a = 0; + + ENTER(); + + pdomain_tlv = (MrvlIEtypes_DomainParamSet_t *)domain_tlv; + + /* update region code & table based on country string */ + if (wlan_misc_country_2_cfp_table_code(pmadapter, + pdomain_tlv->country_code, + &cfp_bg, + &cfp_a) == MLAN_STATUS_SUCCESS) { + pmadapter->cfp_code_bg = cfp_bg; + pmadapter->cfp_code_a = cfp_a; + if (cfp_bg && cfp_a && (cfp_bg == cfp_a)) + pmadapter->region_code = cfp_a; + else + pmadapter->region_code = 0; + if (wlan_set_regiontable(pmpriv, pmadapter->region_code, + pmadapter->config_bands | pmadapter-> + adhoc_start_band)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + } + + memcpy(pmadapter, pmadapter->country_code, pdomain_tlv->country_code, + COUNTRY_CODE_LEN); + num_sub_band = + ((pdomain_tlv->header.len - + COUNTRY_CODE_LEN) / sizeof(IEEEtypes_SubbandSet_t)); + + /* TODO: don't just clobber pmadapter->domain_reg. Add some checking + or merging between STA & UAP domain_info */ + wlan_11d_set_domain_info(pmpriv, band, pdomain_tlv->country_code, + num_sub_band, pdomain_tlv->sub_band); + ret = wlan_11d_send_domain_info(pmpriv, pioctl_buf); + +done: + LEAVE(); + return ret; +} +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11h.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11h.c new file mode 100644 index 00000000..0824de24 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11h.c @@ -0,0 +1,3697 @@ +/** @file mlan_11h.c + * + * @brief This file contains functions for 802.11H. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/************************************************************* +Change Log: + 03/26/2009: initial version +************************************************************/ + +#include "mlan.h" +#include "mlan_join.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_ioctl.h" +#include "mlan_11h.h" +#include "mlan_11n.h" +#ifdef UAP_SUPPORT +#include "mlan_uap.h" +#endif + +/******************************************************** + Local Variables +********************************************************/ + +/** Default IBSS DFS recovery interval (in TBTTs); used for adhoc start */ +#define WLAN_11H_DEFAULT_DFS_RECOVERY_INTERVAL 100 + +/** Default 11h power constraint used to offset the maximum transmit power */ +#define WLAN_11H_TPC_POWERCONSTRAINT 0 + +/** 11h TPC Power capability minimum setting, sent in TPC_INFO command to fw */ +#define WLAN_11H_TPC_POWERCAPABILITY_MIN 5 + +/** 11h TPC Power capability maximum setting, sent in TPC_INFO command to fw */ +#define WLAN_11H_TPC_POWERCAPABILITY_MAX 20 + +/** Regulatory requirement for the duration of a channel availability check */ +#define WLAN_11H_CHANNEL_AVAIL_CHECK_DURATION 60000 /* in ms */ + +/** Starting Frequency for 11A band */ +#define START_FREQ_11A_BAND 5000 /* in MHz */ + +/** DFS Channel Move Time */ +#define DFS_CHAN_MOVE_TIME 10 /* in sec */ + +/** Regulatory requirement for the duration of a non-occupancy period */ +#define WLAN_11H_NON_OCCUPANCY_PERIOD 1800 /* in sec (30mins) */ + +/** Maximum allowable age (seconds) on DFS report data */ +#define MAX_DFS_REPORT_USABLE_AGE_SEC (120) /* 2 minutes */ + +/** Minimum delay for CHAN_SW IE to broadcast by FW */ +#define MIN_RDH_CHAN_SW_IE_PERIOD_MSEC (500) /* 5 beacons @ 100ms */ + +/** Maximum delay for CHAN_SW IE to broadcast by FW */ +#define MAX_RDH_CHAN_SW_IE_PERIOD_MSEC (3000) /* 5 beacons @ 600ms */ + +/** Maximum retries on selecting new random channel */ +#define MAX_RANDOM_CHANNEL_RETRIES (20) + +/** Maximum retries on selecting new random non-dfs channel */ +#define MAX_SWITCH_CHANNEL_RETRIES (30) + +/** Value for undetermined priv_curr_idx on first entry to new RDH stage */ +#define RDH_STAGE_FIRST_ENTRY_PRIV_IDX (0xff) + +/** Region codes 0x10, 0x20: channels 1 thru 11 supported */ +static const +IEEEtypes_SupportChan_Subband_t wlan_11h_2_4G_region_FCC = { 1, 11 }; + +/** Region codes 0x30, 0x32, 0x41, 0x50: channels 1 thru 13 supported */ +static const +IEEEtypes_SupportChan_Subband_t wlan_11h_2_4G_region_EU = { 1, 13 }; + +/** Region code 0x40: only channel 14 supported */ +static const +IEEEtypes_SupportChan_Subband_t wlan_11h_2_4G_region_JPN40 = { 14, 1 }; + +/** JPN sub-band config : Start Channel = 8, NumChans = 3 */ +static const +IEEEtypes_SupportChan_Subband_t wlan_11h_JPN_bottom_band = { 8, 3 }; + +/** U-NII sub-band config : Start Channel = 36, NumChans = 4 */ +static const +IEEEtypes_SupportChan_Subband_t wlan_11h_unii_lower_band = { 36, 4 }; + +/** U-NII sub-band config : Start Channel = 52, NumChans = 4 */ +static const +IEEEtypes_SupportChan_Subband_t wlan_11h_unii_middle_band = { 52, 4 }; + +/** U-NII sub-band config : Start Channel = 100, NumChans = 11 */ +static const +IEEEtypes_SupportChan_Subband_t wlan_11h_unii_mid_upper_band = { 100, 11 }; + +/** U-NII sub-band config : Start Channel = 149, NumChans = 5 */ +static const +IEEEtypes_SupportChan_Subband_t wlan_11h_unii_upper_band = { 149, 5 }; + +/** Internally passed structure used to send a CMD_802_11_TPC_INFO command */ +typedef struct { + t_u8 chan; + /**< Channel to which the power constraint applies */ + t_u8 power_constraint; + /**< Local power constraint to send to firmware */ +} wlan_11h_tpc_info_param_t; + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ + +/** + * @brief Utility function to get a random number based on the underlying OS + * + * @param pmadapter Pointer to mlan_adapter + * @return random integer + */ +static t_u32 +wlan_11h_get_random_num(pmlan_adapter pmadapter) +{ + t_u32 sec, usec; + + ENTER(); + pmadapter->callbacks.moal_get_system_time(pmadapter->pmoal_handle, &sec, + &usec); + sec = (sec & 0xFFFF) + (sec >> 16); + usec = (usec & 0xFFFF) + (usec >> 16); + + LEAVE(); + return (usec << 16) | sec; +} + +/** + * @brief Convert an IEEE formatted IE to 16-bit ID/Len Marvell + * proprietary format + * + * @param pmadapter Pointer to mlan_adapter + * @param pout_buf Output parameter: Buffer to output Marvell formatted IE + * @param pin_ie Pointer to IEEE IE to be converted to Marvell format + * + * @return Number of bytes output to pout_buf parameter return + */ +static t_u32 +wlan_11h_convert_ieee_to_mrvl_ie(mlan_adapter *pmadapter, + t_u8 *pout_buf, const t_u8 *pin_ie) +{ + MrvlIEtypesHeader_t mrvl_ie_hdr; + t_u8 *ptmp_buf = pout_buf; + + ENTER(); + /* Assign the Element Id and Len to the Marvell struct attributes */ + mrvl_ie_hdr.type = wlan_cpu_to_le16(pin_ie[0]); + mrvl_ie_hdr.len = wlan_cpu_to_le16(pin_ie[1]); + + /* If the element ID is zero, return without doing any copying */ + if (!mrvl_ie_hdr.type) { + LEAVE(); + return 0; + } + + /* Copy the header to the buffer pointer */ + memcpy(pmadapter, ptmp_buf, &mrvl_ie_hdr, sizeof(mrvl_ie_hdr)); + + /* Increment the temp buffer pointer by the size appended */ + ptmp_buf += sizeof(mrvl_ie_hdr); + + /* Append the data section of the IE; length given by the IEEE IE + length */ + memcpy(pmadapter, ptmp_buf, pin_ie + 2, pin_ie[1]); + + LEAVE(); + /* Return the number of bytes appended to pout_buf */ + return sizeof(mrvl_ie_hdr) + pin_ie[1]; +} + +#ifdef STA_SUPPORT +/** + * @brief Setup the IBSS DFS element passed to the firmware in adhoc start + * and join commands + * + * The DFS Owner and recovery fields are set to be our MAC address and + * a predetermined constant recovery value. If we are joining an adhoc + * network, these values are replaced with the existing IBSS values. + * They are valid only when starting a new IBSS. + * + * The IBSS DFS Element is variable in size based on the number of + * channels supported in our current region. + * + * @param priv Private driver information structure + * @param pdfs Output parameter: Pointer to the IBSS DFS element setup by + * this function. + * + * @return + * - Length of the returned element in pdfs output parameter + * - 0 if returned element is not setup + */ +static t_u32 +wlan_11h_set_ibss_dfs_ie(mlan_private *priv, IEEEtypes_IBSS_DFS_t *pdfs) +{ + t_u8 num_chans = 0; + MeasRptBasicMap_t initial_map; + mlan_adapter *adapter = priv->adapter; + + ENTER(); + + memset(adapter, pdfs, 0x00, sizeof(IEEEtypes_IBSS_DFS_t)); + + /* + * A basic measurement report is included with each channel in the + * map field. Initial value for the map for each supported channel + * is with only the unmeasured bit set. + */ + memset(adapter, &initial_map, 0x00, sizeof(initial_map)); + initial_map.unmeasured = 1; + + /* Set the DFS Owner and recovery interval fields */ + memcpy(adapter, pdfs->dfs_owner, priv->curr_addr, + sizeof(pdfs->dfs_owner)); + pdfs->dfs_recovery_interval = WLAN_11H_DEFAULT_DFS_RECOVERY_INTERVAL; + + for (; (num_chans < adapter->parsed_region_chan.no_of_chan) + && (num_chans < WLAN_11H_MAX_IBSS_DFS_CHANNELS); num_chans++) { + pdfs->channel_map[num_chans].channel_number = + adapter->parsed_region_chan.chan_pwr[num_chans].chan; + + /* + * Set the initial map field with a basic measurement + */ + pdfs->channel_map[num_chans].rpt_map = initial_map; + } + + /* + * If we have an established channel map, include it and return + * a valid DFS element + */ + if (num_chans) { + PRINTM(MINFO, "11h: Added %d channels to IBSS DFS Map\n", + num_chans); + + pdfs->element_id = IBSS_DFS; + pdfs->len = + (sizeof(pdfs->dfs_owner) + + sizeof(pdfs->dfs_recovery_interval) + + num_chans * sizeof(IEEEtypes_ChannelMap_t)); + + LEAVE(); + return pdfs->len + sizeof(pdfs->len) + sizeof(pdfs->element_id); + } + + /* Ensure the element is zeroed out for an invalid return */ + memset(adapter, pdfs, 0x00, sizeof(IEEEtypes_IBSS_DFS_t)); + + LEAVE(); + return 0; +} +#endif + +/** + * @brief Setup the Supported Channel IE sent in association requests + * + * The Supported Channels IE is required to be sent when the spectrum + * management capability (11h) is enabled. The element contains a + * starting channel and number of channels tuple for each sub-band + * the STA supports. This information is based on the operating region. + * + * @param priv Private driver information structure + * @param band Band in use + * @param psup_chan Output parameter: Pointer to the Supported Chan element + * setup by this function. + * + * @return + * - Length of the returned element in psup_chan output parameter + * - 0 if returned element is not setup + */ +static + t_u16 +wlan_11h_set_supp_channels_ie(mlan_private *priv, + t_u8 band, + IEEEtypes_SupportedChannels_t *psup_chan) +{ + t_u16 num_subbands = 0; + t_u16 ret_len = 0; + t_u8 cfp_bg, cfp_a; + + ENTER(); + memset(priv->adapter, psup_chan, 0x00, + sizeof(IEEEtypes_SupportedChannels_t)); + + cfp_bg = cfp_a = priv->adapter->region_code; + if (!priv->adapter->region_code) { + /* Invalid region code, use CFP code */ + cfp_bg = priv->adapter->cfp_code_bg; + cfp_a = priv->adapter->cfp_code_a; + } + + if ((band & BAND_B) || (band & BAND_G)) { + /* + * Channels are contiguous in 2.4GHz, usually only one subband. + */ + switch (cfp_bg) { + case 0x10: /* USA FCC */ + case 0x20: /* Canada IC */ + default: + psup_chan->subband[num_subbands++] = + wlan_11h_2_4G_region_FCC; + break; + case 0x30: /* Europe ETSI */ + case 0x41: /* Japan */ + case 0x50: /* China */ + psup_chan->subband[num_subbands++] = + wlan_11h_2_4G_region_EU; + break; + case 0x40: /* Japan */ + psup_chan->subband[num_subbands++] = + wlan_11h_2_4G_region_JPN40; + break; + case 0xff: /* Japan special */ + psup_chan->subband[num_subbands++] = + wlan_11h_2_4G_region_EU; + psup_chan->subband[num_subbands++] = + wlan_11h_2_4G_region_JPN40; + break; + } + } else if (band & BAND_A) { + /* + * Set the supported channel elements based on the region code, + * incrementing num_subbands for each sub-band we append to the + * element. + */ + switch (cfp_a) { + case 0x10: /* USA FCC */ + case 0x20: /* Canada IC */ + case 0x30: /* Europe ETSI */ + default: + psup_chan->subband[num_subbands++] = + wlan_11h_unii_lower_band; + psup_chan->subband[num_subbands++] = + wlan_11h_unii_middle_band; + psup_chan->subband[num_subbands++] = + wlan_11h_unii_mid_upper_band; + psup_chan->subband[num_subbands++] = + wlan_11h_unii_upper_band; + break; + case 0x50: /* China */ + psup_chan->subband[num_subbands++] = + wlan_11h_unii_upper_band; + break; + case 0x40: /* Japan */ + case 0x41: /* Japan */ + case 0xff: /* Japan special */ + psup_chan->subband[num_subbands++] = + wlan_11h_JPN_bottom_band; + psup_chan->subband[num_subbands++] = + wlan_11h_unii_lower_band; + psup_chan->subband[num_subbands++] = + wlan_11h_unii_middle_band; + psup_chan->subband[num_subbands++] = + wlan_11h_unii_mid_upper_band; + break; + case 0x1: /* Low band (5150-5250 MHz) channels */ + psup_chan->subband[num_subbands++] = + wlan_11h_unii_lower_band; + break; + case 0x2: /* Lower middle band (5250-5350 MHz) channels */ + psup_chan->subband[num_subbands++] = + wlan_11h_unii_middle_band; + break; + case 0x3: /* Upper middle band (5470-5725 MHz) channels */ + psup_chan->subband[num_subbands++] = + wlan_11h_unii_mid_upper_band; + break; + case 0x4: /* High band (5725-5850 MHz) channels */ + psup_chan->subband[num_subbands++] = + wlan_11h_unii_upper_band; + break; + case 0x5: /* Low band (5150-5250 MHz) and High band + (5725-5850 MHz) channels */ + psup_chan->subband[num_subbands++] = + wlan_11h_unii_lower_band; + psup_chan->subband[num_subbands++] = + wlan_11h_unii_upper_band; + break; + } + } + + /* + * If we have setup any supported subbands in the element, return a + * valid IE along with its size, else return 0. + */ + if (num_subbands) { + psup_chan->element_id = SUPPORTED_CHANNELS; + psup_chan->len = + num_subbands * sizeof(IEEEtypes_SupportChan_Subband_t); + + ret_len = (t_u16)(psup_chan->len + + sizeof(psup_chan->len) + + sizeof(psup_chan->element_id)); + + HEXDUMP("11h: SupChan", (t_u8 *)psup_chan, ret_len); + } + + LEAVE(); + return ret_len; +} + +/** + * @brief Prepare CMD_802_11_TPC_ADAPT_REQ firmware command + * + * @param priv Private driver information structure + * @param pcmd_ptr Output parameter: Pointer to the command being prepared + * for the firmware + * @param pinfo_buf HostCmd_DS_802_11_TPC_ADAPT_REQ passed as void data block + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_11h_cmd_tpc_request(mlan_private *priv, + HostCmd_DS_COMMAND *pcmd_ptr, const t_void *pinfo_buf) +{ + ENTER(); + + memcpy(priv->adapter, &pcmd_ptr->params.tpc_req, pinfo_buf, + sizeof(HostCmd_DS_802_11_TPC_ADAPT_REQ)); + + pcmd_ptr->params.tpc_req.req.timeout = + wlan_cpu_to_le16(pcmd_ptr->params.tpc_req.req.timeout); + + /* Converted to little endian in wlan_11h_cmd_process */ + pcmd_ptr->size = sizeof(HostCmd_DS_802_11_TPC_ADAPT_REQ) + S_DS_GEN; + + HEXDUMP("11h: 11_TPC_ADAPT_REQ:", (t_u8 *)pcmd_ptr, + (t_u32)pcmd_ptr->size); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Prepare CMD_802_11_TPC_INFO firmware command + * + * @param priv Private driver information structure + * @param pcmd_ptr Output parameter: Pointer to the command being prepared + * for the firmware + * @param pinfo_buf wlan_11h_tpc_info_param_t passed as void data block + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_11h_cmd_tpc_info(mlan_private *priv, + HostCmd_DS_COMMAND *pcmd_ptr, const t_void *pinfo_buf) +{ + HostCmd_DS_802_11_TPC_INFO *ptpc_info = &pcmd_ptr->params.tpc_info; + MrvlIEtypes_LocalPowerConstraint_t *pconstraint = + &ptpc_info->local_constraint; + MrvlIEtypes_PowerCapability_t *pcap = &ptpc_info->power_cap; + + wlan_11h_device_state_t *pstate = &priv->adapter->state_11h; + const wlan_11h_tpc_info_param_t *ptpc_info_param = + (wlan_11h_tpc_info_param_t *)pinfo_buf; + + ENTER(); + + pcap->min_power = pstate->min_tx_power_capability; + pcap->max_power = pstate->max_tx_power_capability; + pcap->header.len = wlan_cpu_to_le16(2); + pcap->header.type = wlan_cpu_to_le16(TLV_TYPE_POWER_CAPABILITY); + + pconstraint->chan = ptpc_info_param->chan; + pconstraint->constraint = ptpc_info_param->power_constraint; + pconstraint->header.type = wlan_cpu_to_le16(TLV_TYPE_POWER_CONSTRAINT); + pconstraint->header.len = wlan_cpu_to_le16(2); + + /* Converted to little endian in wlan_11h_cmd_process */ + pcmd_ptr->size = sizeof(HostCmd_DS_802_11_TPC_INFO) + S_DS_GEN; + + HEXDUMP("11h: TPC INFO", (t_u8 *)pcmd_ptr, (t_u32)pcmd_ptr->size); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Prepare CMD_802_11_CHAN_SW_ANN firmware command + * + * @param priv Private driver information structure + * @param pcmd_ptr Output parameter: Pointer to the command being + * prepared to for firmware + * @param pinfo_buf HostCmd_DS_802_11_CHAN_SW_ANN passed as void data block + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_11h_cmd_chan_sw_ann(mlan_private *priv, + HostCmd_DS_COMMAND *pcmd_ptr, const t_void *pinfo_buf) +{ + const HostCmd_DS_802_11_CHAN_SW_ANN *pch_sw_ann = + (HostCmd_DS_802_11_CHAN_SW_ANN *)pinfo_buf; + + ENTER(); + + /* Converted to little endian in wlan_11h_cmd_process */ + pcmd_ptr->size = sizeof(HostCmd_DS_802_11_CHAN_SW_ANN) + S_DS_GEN; + + memcpy(priv->adapter, &pcmd_ptr->params.chan_sw_ann, pch_sw_ann, + sizeof(HostCmd_DS_802_11_CHAN_SW_ANN)); + + PRINTM(MINFO, "11h: ChSwAnn: %#x-%u, Seq=%u, Ret=%u\n", + pcmd_ptr->command, pcmd_ptr->size, pcmd_ptr->seq_num, + pcmd_ptr->result); + PRINTM(MINFO, "11h: ChSwAnn: Ch=%d, Cnt=%d, Mode=%d\n", + pch_sw_ann->new_chan, pch_sw_ann->switch_count, + pch_sw_ann->switch_mode); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Prepare CMD_CHAN_REPORT_REQUEST firmware command + * + * @param priv Private driver information structure + * @param pcmd_ptr Output parameter: Pointer to the command being + * prepared to for firmware + * @param pinfo_buf HostCmd_DS_CHAN_RPT_REQ passed as void data block + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_PENDING + */ +static mlan_status +wlan_11h_cmd_chan_rpt_req(mlan_private *priv, + HostCmd_DS_COMMAND *pcmd_ptr, const t_void *pinfo_buf) +{ + const HostCmd_DS_CHAN_RPT_REQ *pchan_rpt_req = + (HostCmd_DS_CHAN_RPT_REQ *)pinfo_buf; + wlan_dfs_device_state_t *pstate_dfs = &priv->adapter->state_dfs; + MrvlIEtypes_ChanRpt11hBasic_t *ptlv_basic; + t_bool is_cancel_req = MFALSE; + + /* + * pchan_rpt_req->millisec_dwell_time would be zero if the chan_rpt_req + * is to cancel current ongoing report + */ + if (pchan_rpt_req->millisec_dwell_time == 0) + is_cancel_req = MTRUE; + + ENTER(); + if (pstate_dfs->dfs_check_pending && !is_cancel_req) { + PRINTM(MERROR, + "11h: ChanRptReq - previous CMD_CHAN_REPORT_REQUEST has" + " not returned its result yet (as EVENT_CHANNEL_READY)." + " This command will be dropped.\n"); + LEAVE(); + return MLAN_STATUS_PENDING; + } + + /* Converted to little endian in wlan_11h_cmd_process */ + pcmd_ptr->size = sizeof(HostCmd_DS_CHAN_RPT_REQ) + S_DS_GEN; + + memcpy(priv->adapter, &pcmd_ptr->params.chan_rpt_req, pchan_rpt_req, + sizeof(HostCmd_DS_CHAN_RPT_REQ)); + + /* if DFS channel, add BASIC report TLV, and set radar bit */ + if (!is_cancel_req && + wlan_11h_radar_detect_required(priv, + pchan_rpt_req->chan_desc.chanNum)) { + ptlv_basic = + (MrvlIEtypes_ChanRpt11hBasic_t *)(((t_u8 *)(pcmd_ptr)) + + pcmd_ptr->size); + ptlv_basic->Header.type = + wlan_cpu_to_le16(TLV_TYPE_CHANRPT_11H_BASIC); + ptlv_basic->Header.len = + wlan_cpu_to_le16(sizeof(MeasRptBasicMap_t)); + memset(priv->adapter, &ptlv_basic->map, 0, + sizeof(MeasRptBasicMap_t)); + ptlv_basic->map.radar = 1; + pcmd_ptr->size += sizeof(MrvlIEtypes_ChanRpt11hBasic_t); + } + + /* update dfs sturcture. dfs_check_pending is set when we receive + CMD_RESP == SUCCESS */ + pstate_dfs->dfs_check_pending = MFALSE; + pstate_dfs->dfs_radar_found = MFALSE; + + if (!is_cancel_req) + pstate_dfs->dfs_check_channel = + pchan_rpt_req->chan_desc.chanNum; + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Set the local power capability and constraint TLV + * + * @param ppbuffer The buffer to add these two TLVs + * @param channel Channel to which the power constraint applies + * @param power_constraint Power constraint to be applied on the channel + * @param min_tx_power_capability Min. Tx Power in Power Capability IE + * @param max_tx_power_capability Max. Tx Power in Power Capability IE + * + * @return The len increased + */ +static t_u32 +wlan_11h_set_local_power_constraint_tlv(t_u8 **ppbuffer, + t_u8 channel, + t_u8 power_constraint, + t_u8 min_tx_power_capability, + t_u8 max_tx_power_capability) +{ + MrvlIEtypes_PowerCapability_t *pcap; + MrvlIEtypes_LocalPowerConstraint_t *pconstraint; + t_u8 *start_ptr = MNULL; + + ENTER(); + + /* Null Checks */ + if ((ppbuffer == MNULL) || (((t_u8 *)(*ppbuffer)) == MNULL)) { + LEAVE(); + return 0; + } + + start_ptr = (t_u8 *)(*ppbuffer); + + PRINTM(MINFO, + "11h: Set local power constraint = %d channel=%d min_tx_pwr=%d max_tx_pwr=%d\n", + power_constraint, channel, min_tx_power_capability, + max_tx_power_capability); + + pcap = (MrvlIEtypes_PowerCapability_t *)*ppbuffer; + pcap->header.type = wlan_cpu_to_le16(TLV_TYPE_POWER_CAPABILITY); + pcap->header.len = wlan_cpu_to_le16(2); + pcap->min_power = min_tx_power_capability; + pcap->max_power = max_tx_power_capability; + *ppbuffer += sizeof(MrvlIEtypesHeader_t) + 2; + + pconstraint = (MrvlIEtypes_LocalPowerConstraint_t *)*ppbuffer; + pconstraint->header.type = wlan_cpu_to_le16(TLV_TYPE_POWER_CONSTRAINT); + pconstraint->header.len = wlan_cpu_to_le16(2); + pconstraint->chan = channel; + pconstraint->constraint = power_constraint; + *ppbuffer += sizeof(MrvlIEtypesHeader_t) + 2; + + LEAVE(); + return (t_u32)(*ppbuffer - start_ptr); +} + +/** + * @brief Utility function to process a join to an infrastructure BSS + * + * @param priv Private driver information structure + * @param ppbuffer Output parameter: Pointer to the TLV output buffer, + * modified on return to point after the appended 11h TLVs + * @param band Band on which we are joining the BSS + * @param channel Channel on which we are joining the BSS + * @param p11h_bss_info Pointer to the 11h BSS information for this network + * that was parsed out of the scan response. + * + * @return Integer number of bytes appended to the TLV output + * buffer (ppbuffer) + */ +static t_u32 +wlan_11h_process_infra_join(mlan_private *priv, + t_u8 **ppbuffer, + t_u8 band, + t_u32 channel, wlan_11h_bss_info_t *p11h_bss_info) +{ + MrvlIEtypesHeader_t ie_header; + IEEEtypes_SupportedChannels_t sup_chan_ie; + t_u32 ret_len = 0; + t_u16 sup_chan_len = 0; + + ENTER(); + + /* Null Checks */ + if ((ppbuffer == MNULL) || (((t_u8 *)(*ppbuffer)) == MNULL)) { + LEAVE(); + return 0; + } + + ret_len += + wlan_11h_set_local_power_constraint_tlv(ppbuffer, (t_u8)channel, + (t_u8)p11h_bss_info-> + power_constraint. + local_constraint, + (t_u8)priv->adapter-> + state_11h. + min_tx_power_capability, + (t_u8)priv->adapter-> + state_11h. + max_tx_power_capability); + + /* Setup the Supported Channels IE */ + sup_chan_len = wlan_11h_set_supp_channels_ie(priv, band, &sup_chan_ie); + + /* + * If we returned a valid Supported Channels IE, wrap and append it + */ + if (sup_chan_len) { + /* Wrap the supported channels IE with a passthrough TLV type */ + ie_header.type = wlan_cpu_to_le16(TLV_TYPE_PASSTHROUGH); + ie_header.len = sup_chan_len; + memcpy(priv->adapter, *ppbuffer, &ie_header, sizeof(ie_header)); + + /* + * Increment the return size and the return buffer + * pointer param + */ + *ppbuffer += sizeof(ie_header); + ret_len += sizeof(ie_header); + + /* + * Copy the supported channels IE to the output buf, + * advance pointer + */ + memcpy(priv->adapter, *ppbuffer, &sup_chan_ie, sup_chan_len); + *ppbuffer += sup_chan_len; + ret_len += sup_chan_len; + } + + LEAVE(); + return ret_len; +} + +/** + * @brief Utility function to process a start or join to an adhoc network + * + * Add the elements to the TLV buffer needed in the start/join adhoc commands: + * - IBSS DFS IE + * - Quiet IE + * + * Also send the local constraint to the firmware in a TPC_INFO command. + * + * @param priv Private driver information structure + * @param ppbuffer Output parameter: Pointer to the TLV output buffer, + * modified on return to point after the appended 11h TLVs + * @param channel Channel on which we are starting/joining the IBSS + * @param p11h_bss_info Pointer to the 11h BSS information for this network + * that was parsed out of the scan response. NULL + * indicates we are starting the adhoc network + * + * @return Integer number of bytes appended to the TLV output + * buffer (ppbuffer) + */ +static t_u32 +wlan_11h_process_adhoc(mlan_private *priv, + t_u8 **ppbuffer, + t_u32 channel, wlan_11h_bss_info_t *p11h_bss_info) +{ + IEEEtypes_IBSS_DFS_t dfs_elem; + t_u32 size_appended; + t_u32 ret_len = 0; + t_s8 local_constraint = 0; + mlan_adapter *adapter = priv->adapter; + + ENTER(); + +#ifdef STA_SUPPORT + /* Format our own IBSS DFS Element. Include our channel map fields */ + wlan_11h_set_ibss_dfs_ie(priv, &dfs_elem); +#endif + + if (p11h_bss_info) { + /* + * Copy the DFS Owner/Recovery Interval from the BSS + * we are joining + */ + memcpy(adapter, dfs_elem.dfs_owner, + p11h_bss_info->ibss_dfs.dfs_owner, + sizeof(dfs_elem.dfs_owner)); + dfs_elem.dfs_recovery_interval = + p11h_bss_info->ibss_dfs.dfs_recovery_interval; + } + + /* Append the dfs element to the TLV buffer */ + size_appended = wlan_11h_convert_ieee_to_mrvl_ie(adapter, + (t_u8 *)*ppbuffer, + (t_u8 *)&dfs_elem); + + HEXDUMP("11h: IBSS-DFS", (t_u8 *)*ppbuffer, size_appended); + *ppbuffer += size_appended; + ret_len += size_appended; + + /* + * Check to see if we are joining a network. Join is indicated by the + * BSS Info pointer being valid (not NULL) + */ + if (p11h_bss_info) { + /* + * If there was a quiet element, include it in + * adhoc join command + */ + if (p11h_bss_info->quiet.element_id == QUIET) { + size_appended + = + wlan_11h_convert_ieee_to_mrvl_ie(adapter, + (t_u8 *) + *ppbuffer, + (t_u8 *) + &p11h_bss_info-> + quiet); + HEXDUMP("11h: Quiet", (t_u8 *)*ppbuffer, size_appended); + *ppbuffer += size_appended; + ret_len += size_appended; + } + + /* Copy the local constraint from the network */ + local_constraint = + p11h_bss_info->power_constraint.local_constraint; + } else { + /* + * If we are the adhoc starter, we can add a quiet element + */ + if (adapter->state_11h.quiet_ie.quiet_period) { + size_appended = + wlan_11h_convert_ieee_to_mrvl_ie(adapter, + (t_u8 *) + *ppbuffer, + (t_u8 *) + &adapter-> + state_11h. + quiet_ie); + HEXDUMP("11h: Quiet", (t_u8 *)*ppbuffer, size_appended); + *ppbuffer += size_appended; + ret_len += size_appended; + } + /* Use the local_constraint configured in the driver state */ + local_constraint = adapter->state_11h.usr_def_power_constraint; + } + + PRINTM(MINFO, "WEILIE 1: ppbuffer = %p\n", *ppbuffer); + + ret_len += + wlan_11h_set_local_power_constraint_tlv(ppbuffer, (t_u8)channel, + (t_u8)local_constraint, + (t_u8)priv->adapter-> + state_11h. + min_tx_power_capability, + (t_u8)priv->adapter-> + state_11h. + max_tx_power_capability); + PRINTM(MINFO, "WEILIE 2: ppbuffer = %p\n", *ppbuffer); + + LEAVE(); + return ret_len; +} + +/** + * @brief Return whether the driver has enabled 11h for the interface + * + * Association/Join commands are dynamic in that they enable 11h in the + * driver/firmware when they are detected in the existing BSS. + * + * @param priv Private driver information structure + * + * @return + * - MTRUE if 11h is enabled + * - MFALSE otherwise + */ +static t_bool +wlan_11h_is_enabled(mlan_private *priv) +{ + ENTER(); + LEAVE(); + return priv->intf_state_11h.is_11h_enabled; +} + +/** + * @brief Return whether the device has activated slave radar detection. + * + * @param priv Private driver information structure + * + * @return + * - MTRUE if slave radar detection is enabled in firmware + * - MFALSE otherwise + */ +static t_bool +wlan_11h_is_slave_radar_det_active(mlan_private *priv) +{ + ENTER(); + LEAVE(); + return priv->adapter->state_11h.is_slave_radar_det_active; +} + +/** + * @brief Return whether the slave interface is active, and on DFS channel. + * priv is assumed to already be a dfs slave interface, doesn't check this. + * + * @param priv Private driver information structure + * + * @return + * - MTRUE if priv is slave, and meets both conditions + * - MFALSE otherwise + */ +static t_bool +wlan_11h_is_slave_active_on_dfs_chan(mlan_private *priv) +{ + t_bool ret = MFALSE; + + ENTER(); + if ((priv->media_connected == MTRUE) && + (priv->curr_bss_params.band & BAND_A) && + wlan_11h_radar_detect_required(priv, + priv->curr_bss_params.bss_descriptor. + channel)) + ret = MTRUE; + + LEAVE(); + return ret; +} + +/** + * @brief Return whether the master interface is active, and on DFS channel. + * priv is assumed to already be a dfs master interface, doesn't check this. + * + * @param priv Private driver information structure + * + * @return + * - MTRUE if priv is master, and meets both conditions + * - MFALSE otherwise + */ +static t_bool +wlan_11h_is_master_active_on_dfs_chan(mlan_private *priv) +{ + t_bool ret = MFALSE; + + ENTER(); + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) { + /* Ad-hoc creator */ + if (((priv->media_connected == MTRUE) + || (priv->adhoc_state == ADHOC_STARTING)) && + (priv->adapter->adhoc_start_band & BAND_A) && + wlan_11h_radar_detect_required(priv, priv->adhoc_channel)) + ret = MTRUE; + } else if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + /* UAP */ +#ifdef UAP_SUPPORT + if ((priv->uap_bss_started == MTRUE) && + (priv->uap_state_chan_cb.band_config & BAND_CONFIG_5GHZ) && + wlan_11h_radar_detect_required(priv, + priv->uap_state_chan_cb. + channel)) + ret = MTRUE; +#endif + } + LEAVE(); + return ret; +} + +/** + * @brief Determine if priv is DFS Master interface + * + * @param priv Pointer to mlan_private + * + * @return MTRUE or MFALSE + */ +static t_bool +wlan_11h_is_dfs_master(mlan_private *priv) +{ + t_bool ret = MFALSE; + + ENTER(); + /* UAP: all are master */ + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) + ret = MTRUE; + + /* STA: only ad-hoc creator is master */ + else if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) && + (priv->bss_mode == MLAN_BSS_MODE_IBSS) && + (priv->adhoc_state == ADHOC_STARTED || + priv->adhoc_state == ADHOC_STARTING)) + ret = MTRUE; + + /* all other cases = slave interface */ + LEAVE(); + return ret; +} + +/* Need this as function to pass to wlan_count_priv_cond() */ +/** + * @brief Determine if priv is DFS Slave interface + * + * @param priv Pointer to mlan_private + * + * @return MTRUE or MFALSE + */ + +static t_bool +wlan_11h_is_dfs_slave(mlan_private *priv) +{ + t_bool ret = MFALSE; + ENTER(); + ret = !wlan_11h_is_dfs_master(priv); + LEAVE(); + return ret; +} + +/** + * @brief This function checks if interface is active. + * + * @param pmpriv A pointer to mlan_private structure + * + * @return MTRUE or MFALSE + */ +t_bool +wlan_is_intf_active(mlan_private *pmpriv) +{ + t_bool ret = MFALSE; + ENTER(); + +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_UAP) + /* + * NOTE: UAP's media_connected == true only after first STA + * associated. Need different variable to tell if UAP + * has been started. + */ + ret = pmpriv->uap_bss_started; + else +#endif + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_STA) + ret = pmpriv->media_connected; + + LEAVE(); + return ret; +} + +/** + * @brief This function gets current radar detect flags + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return 11H MIB setting for radar detect + */ +static t_u32 +wlan_11h_get_current_radar_detect_flags(mlan_adapter *pmadapter) +{ + t_u32 radar_det_flags = 0; + + ENTER(); + if (pmadapter->state_11h.is_master_radar_det_active) + radar_det_flags |= MASTER_RADAR_DET_MASK; + if (pmadapter->state_11h.is_slave_radar_det_active) + radar_det_flags |= SLAVE_RADAR_DET_MASK; + + PRINTM(MINFO, "%s: radar_det_state_curr=0x%x\n", + __func__, radar_det_flags); + + LEAVE(); + return radar_det_flags; +} + +/** + * @brief This function checks if radar detect flags have/should be changed. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pnew_state Output param with new state, if return MTRUE. + * + * @return MTRUE (need update) or MFALSE (no change in flags) + */ +static t_bool +wlan_11h_check_radar_det_state(mlan_adapter *pmadapter, OUT t_u32 *pnew_state) +{ + t_u32 radar_det_state_new = 0; + t_bool ret; + + ENTER(); + PRINTM(MINFO, "%s: master_radar_det_pending=%d, " + " slave_radar_det_pending=%d\n", __func__, + pmadapter->state_11h.master_radar_det_enable_pending, + pmadapter->state_11h.slave_radar_det_enable_pending); + + /* new state comes from evaluating interface states & pending starts */ + if (pmadapter->state_11h.master_radar_det_enable_pending || + (wlan_count_priv_cond(pmadapter, + wlan_11h_is_master_active_on_dfs_chan, + wlan_11h_is_dfs_master) > 0)) + radar_det_state_new |= MASTER_RADAR_DET_MASK; + if (pmadapter->state_11h.slave_radar_det_enable_pending || + (wlan_count_priv_cond(pmadapter, + wlan_11h_is_slave_active_on_dfs_chan, + wlan_11h_is_dfs_slave) > 0)) + radar_det_state_new |= SLAVE_RADAR_DET_MASK; + + PRINTM(MINFO, "%s: radar_det_state_new=0x%x\n", + __func__, radar_det_state_new); + + /* now compare flags with current state */ + ret = (wlan_11h_get_current_radar_detect_flags(pmadapter) + != radar_det_state_new) ? MTRUE : MFALSE; + if (ret) + *pnew_state = radar_det_state_new; + + LEAVE(); + return ret; +} + +/** + * @brief Determine if mlan_private list only contains UAP interface(s) + * + * @param priv_list List of mlan_private pointers + * @param priv_list_count Number of mlan_privates in above list + * + * @return MTRUE or MFALSE + */ +static t_bool +wlan_only_uap_priv_in_list(mlan_private **priv_list, t_u8 priv_list_count) +{ +#if defined(STA_SUPPORT) && !defined(UAP_SUPPORT) + return MFALSE; +#else + t_u8 uap_count = 0; + t_u8 sta_count = 0; + t_u8 i; + + ENTER(); + for (i = 0; i < priv_list_count; i++) { + if (GET_BSS_ROLE(priv_list[i]) == MLAN_BSS_ROLE_UAP) + uap_count++; + else + sta_count++; + } + + LEAVE(); + return ((uap_count > 0) && (sta_count == 0)) ? MTRUE : MFALSE; +#endif +} + +/** + * @brief generate the channel center frequency index + * + * @param channel_num channel number + * + * @return frenquency index + */ +static t_u8 +wlan_11h_get_channel_freq_idx(IN t_u8 channel_num) +{ + t_u8 index; + t_u8 center_freq[] = { 42, 58, 106, 122, 138, 155 }; + t_u8 chan_idx, ret = 0; + + chan_idx = channel_num - 100; + + for (index = 0; index < sizeof(center_freq); index++) { + if ((chan_idx >= (center_freq[index] - 6)) && + (chan_idx <= (center_freq[index] + 6))) { + ret = center_freq[index]; + break; + } + } + + return ret; +} + +/** + * @brief Prepare ioctl for add/remove CHAN_SW IE - RADAR_DETECTED event handling + * + * @param pmadapter Pointer to mlan_adapter + * @param pioctl_req Pointer to completed mlan_ioctl_req (allocated inside) + * @param is_adding_ie CHAN_SW IE is to be added (MTRUE), or removed (MFALSE) + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_11h_prepare_custom_ie_chansw(IN mlan_adapter *pmadapter, + OUT mlan_ioctl_req **ppioctl_req, + IN t_bool is_adding_ie) +{ + mlan_ioctl_req *pioctl_req = MNULL; + mlan_ds_misc_cfg *pds_misc_cfg = MNULL; + custom_ie *pcust_chansw_ie = MNULL; + IEEEtypes_ChanSwitchAnn_t *pchansw_ie = MNULL; + mlan_status ret; + IEEEtypes_Header_t *pChanSwWrap_ie = MNULL; + IEEEtypes_WideBWChanSwitch_t *pbwchansw_ie = MNULL; + IEEEtypes_VhtTpcEnvelope_t *pvhttpcEnv_ie = MNULL; + t_u8 index; + mlan_private *pmpriv = MNULL; + + ENTER(); + + if (pmadapter == MNULL || ppioctl_req == MNULL) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + /* allocate buffer for mlan_ioctl_req and mlan_ds_misc_cfg */ + /* FYI - will be freed as part of cmd_response handler */ + ret = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle, + sizeof(mlan_ioctl_req) + + sizeof(mlan_ds_misc_cfg), + MLAN_MEM_DEF, + (t_u8 **)&pioctl_req); + if ((ret != MLAN_STATUS_SUCCESS) || !pioctl_req) { + PRINTM(MERROR, "%s(): Could not allocate ioctl req\n", + __func__); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + pds_misc_cfg = (mlan_ds_misc_cfg *)((t_u8 *)pioctl_req + + sizeof(mlan_ioctl_req)); + + /* prepare mlan_ioctl_req */ + memset(pmadapter, pioctl_req, 0x00, sizeof(mlan_ioctl_req)); + pioctl_req->req_id = MLAN_IOCTL_MISC_CFG; + pioctl_req->action = MLAN_ACT_SET; + pioctl_req->pbuf = (t_u8 *)pds_misc_cfg; + pioctl_req->buf_len = sizeof(mlan_ds_misc_cfg); + + /* prepare mlan_ds_misc_cfg */ + memset(pmadapter, pds_misc_cfg, 0x00, sizeof(mlan_ds_misc_cfg)); + pds_misc_cfg->sub_command = MLAN_OID_MISC_CUSTOM_IE; + pds_misc_cfg->param.cust_ie.type = TLV_TYPE_MGMT_IE; + pds_misc_cfg->param.cust_ie.len = (sizeof(custom_ie) - MAX_IE_SIZE); + + /* configure custom_ie api settings */ + pcust_chansw_ie = + (custom_ie *)&pds_misc_cfg->param.cust_ie.ie_data_list[0]; + pcust_chansw_ie->ie_index = 0xffff; /* Auto index */ + pcust_chansw_ie->ie_length = sizeof(IEEEtypes_ChanSwitchAnn_t); + pcust_chansw_ie->mgmt_subtype_mask = (is_adding_ie) + ? MBIT(8) | MBIT(5) /* add IE for BEACON | PROBE_RSP */ + : 0; /* remove IE */ + + /* prepare CHAN_SW IE inside ioctl */ + pchansw_ie = (IEEEtypes_ChanSwitchAnn_t *)pcust_chansw_ie->ie_buffer; + pchansw_ie->element_id = CHANNEL_SWITCH_ANN; + pchansw_ie->len = + sizeof(IEEEtypes_ChanSwitchAnn_t) - sizeof(IEEEtypes_Header_t); + pchansw_ie->chan_switch_mode = 1; /* STA should not transmit */ + pchansw_ie->new_channel_num = pmadapter->state_rdh.new_channel; + pchansw_ie->chan_switch_count = 0; /* simplification */ + + for (index = 0; index < pmadapter->state_rdh.priv_list_count; index++) { + pmpriv = pmadapter->state_rdh.priv_list[index]; + /* find the first AP interface */ + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_UAP) { + if (pmpriv->is_11ac_enabled) { + + pChanSwWrap_ie = + (IEEEtypes_Header_t *)((t_u8 *) + pchansw_ie + + sizeof + (IEEEtypes_ChanSwitchAnn_t)); + pChanSwWrap_ie->element_id = EXT_POWER_CONSTR; + /* will have multiple sub IEs */ + pChanSwWrap_ie->len = 0; + + /* prepare the Wide Bandwidth Channel Switch IE + * Channel Switch IE */ + pbwchansw_ie = + (IEEEtypes_WideBWChanSwitch_t + *)((t_u8 *)pChanSwWrap_ie + + sizeof(IEEEtypes_Header_t)); + pbwchansw_ie->ieee_hdr.element_id = + BW_CHANNEL_SWITCH; + pbwchansw_ie->ieee_hdr.len = + sizeof(IEEEtypes_WideBWChanSwitch_t) - + sizeof(IEEEtypes_Header_t); + /* fix 80MHZ now */ + pbwchansw_ie->new_channel_width = + VHT_OPER_CHWD_80MHZ; + pbwchansw_ie->new_channel_center_freq0 = + wlan_11h_get_channel_freq_idx + (pmadapter->state_rdh.new_channel); + pbwchansw_ie->new_channel_center_freq1 = + wlan_11h_get_channel_freq_idx + (pmadapter->state_rdh.new_channel); + pChanSwWrap_ie->len += + sizeof(IEEEtypes_WideBWChanSwitch_t); + + /* prepare the VHT Transmit Power Envelope IE */ + pvhttpcEnv_ie = + (IEEEtypes_VhtTpcEnvelope_t *)((t_u8 *) + pChanSwWrap_ie + + + sizeof + (IEEEtypes_Header_t) + + + sizeof + (IEEEtypes_WideBWChanSwitch_t)); + pvhttpcEnv_ie->ieee_hdr.element_id = + VHT_TX_POWER_ENV; + pvhttpcEnv_ie->ieee_hdr.len = + sizeof(IEEEtypes_VhtTpcEnvelope_t) - + sizeof(IEEEtypes_Header_t); + /* Local Max TX Power Count= 3, * Local TX + Power Unit Inter=EIP(0) */ + pvhttpcEnv_ie->tpc_info = 3; + pvhttpcEnv_ie->local_max_tp_20mhz = 0xff; + pvhttpcEnv_ie->local_max_tp_40mhz = 0xff; + pvhttpcEnv_ie->local_max_tp_80mhz = 0xff; + pChanSwWrap_ie->len += + sizeof(IEEEtypes_VhtTpcEnvelope_t); + + pcust_chansw_ie->ie_length += + sizeof(IEEEtypes_WideBWChanSwitch_t) + + sizeof(IEEEtypes_VhtTpcEnvelope_t) + + sizeof(IEEEtypes_Header_t); + + PRINTM(MINFO, + "Append Wide Bandwidth Channel Switch IE\n"); + break; + } + } + } + + pds_misc_cfg->param.cust_ie.len += pcust_chansw_ie->ie_length; + DBG_HEXDUMP(MCMD_D, "11h: custom_ie containing CHAN_SW IE", + (t_u8 *)pcust_chansw_ie, pds_misc_cfg->param.cust_ie.len); + + /* assign output pointer before returning */ + *ppioctl_req = pioctl_req; + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +#ifdef UAP_SUPPORT +/** + * @brief Retrieve a randomly selected starting channel if needed for 11h + * + * If 11h is enabled and 5GHz band is selected in band_config + * return a random channel in A band, else one from BG band. + * + * @param priv Private driver information structure + * @param uap_band_cfg Private driver information structure + * + * @return Starting channel + */ +static t_u8 +wlan_11h_get_uap_start_channel(mlan_private *priv, t_u8 uap_band_cfg) +{ + t_u8 start_chn; + mlan_adapter *adapter = priv->adapter; + t_u32 region; + t_u32 rand_entry; + region_chan_t *chn_tbl; + t_u8 rand_tries = 0; + + /* TODO: right now mostly a copy of wlan_11h_get_adhoc_start_channel. + Improve to be more specfic to UAP, e.g. 1. take into account + COUNTRY_CODE -> region_code 2. check domain_info for value channels */ + ENTER(); + + /* + * Set start_chn to the Default. + * Used if 11h is disabled or the band + * does not require 11h support. + */ + start_chn = DEFAULT_AD_HOC_CHANNEL; + + /* + * Check that we are looking for a channel in the A Band + */ + if (uap_band_cfg & BAND_CONFIG_5GHZ) { + /* + * Set default to the A Band default. + * Used if random selection fails + * or if 11h is not enabled + */ + start_chn = DEFAULT_AD_HOC_CHANNEL_A; + + /* + * Check that 11h is enabled in the driver + */ + if (wlan_11h_is_enabled(priv)) { + /* + * Search the region_channel tables for a channel table + * that is marked for the A Band. + */ + for (region = 0; (region < MAX_REGION_CHANNEL_NUM); + region++) { + chn_tbl = &adapter->region_channel[region]; + + /* Check if table is valid and marked for A + Band */ + if (chn_tbl->valid + && chn_tbl->region == adapter->region_code + && chn_tbl->band & BAND_A) { + /* + * Set the start channel. Get a random + * number and use it to pick an entry + * in the table between 0 and the number + * of channels in the table (NumCFP). + */ + do { + rand_entry = + wlan_11h_get_random_num + (adapter) % + chn_tbl->num_cfp; + start_chn = + (t_u8)chn_tbl-> + pcfp[rand_entry]. + channel; + } while ((wlan_11h_is_channel_under_nop + (adapter, start_chn) || + ((adapter->state_rdh.stage == + RDH_GET_INFO_CHANNEL) && + wlan_11h_radar_detect_required + (priv, start_chn))) + && (++rand_tries < + MAX_RANDOM_CHANNEL_RETRIES)); + } + } + } + } + + PRINTM(MCMD_D, "11h: UAP Get Start Channel %d\n", start_chn); + LEAVE(); + return start_chn; +} +#endif /* UAP_SUPPORT */ + +#ifdef DEBUG_LEVEL1 +static const char *DFS_TS_REPR_STRINGS[] = { "", + "NOP_start", + "CAC_completed" +}; +#endif + +/** + * @brief Search for a dfs timestamp in the list with desired channel. + * + * Assumes there will only be one timestamp per channel in the list. + * + * @param pmadapter Pointer to mlan_adapter + * @param channel Channel number + * + * @return Pointer to timestamp if found, or MNULL + */ +static wlan_dfs_timestamp_t * +wlan_11h_find_dfs_timestamp(mlan_adapter *pmadapter, t_u8 channel) +{ + wlan_dfs_timestamp_t *pts = MNULL, *pts_found = MNULL; + + ENTER(); + pts = (wlan_dfs_timestamp_t *)util_peek_list(pmadapter->pmoal_handle, + &pmadapter->state_dfs. + dfs_ts_head, MNULL, MNULL); + + while (pts && + pts != + (wlan_dfs_timestamp_t *)&pmadapter->state_dfs.dfs_ts_head) { + PRINTM(MINFO, + "dfs_timestamp(@ %p) - chan=%d, repr=%d(%s)," + " time(sec.usec)=%lu.%06lu\n", pts, pts->channel, + pts->represents, DFS_TS_REPR_STRINGS[pts->represents], + pts->ts_sec, pts->ts_usec); + + if (pts->channel == channel) { + pts_found = pts; + break; + } + pts = pts->pnext; + } + + LEAVE(); + return pts_found; +} + +/** + * @brief Removes dfs timestamp from list. + * + * @param pmadapter Pointer to mlan_adapter + * @param pdfs_ts Pointer to dfs_timestamp to remove + */ +static t_void +wlan_11h_remove_dfs_timestamp(mlan_adapter *pmadapter, + wlan_dfs_timestamp_t *pdfs_ts) +{ + ENTER(); + /* dequeue and delete timestamp */ + util_unlink_list(pmadapter->pmoal_handle, + &pmadapter->state_dfs.dfs_ts_head, + (pmlan_linked_list)pdfs_ts, MNULL, MNULL); + pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pdfs_ts); + LEAVE(); +} + +/** + * @brief Add a dfs timestamp to the list + * + * Assumes there will only be one timestamp per channel in the list, + * and that timestamp modes (represents) are mutually exclusive. + * + * @param pmadapter Pointer to mlan_adapter + * @param repr Timestamp 'represents' value (see _dfs_timestamp_repr_e) + * @param channel Channel number + * + * @return Pointer to timestamp if found, or MNULL + */ +static mlan_status +wlan_11h_add_dfs_timestamp(mlan_adapter *pmadapter, t_u8 repr, t_u8 channel) +{ + wlan_dfs_timestamp_t *pdfs_ts = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + pdfs_ts = wlan_11h_find_dfs_timestamp(pmadapter, channel); + + if (!pdfs_ts) { + /* need to allocate new timestamp */ + ret = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle, + sizeof + (wlan_dfs_timestamp_t), + MLAN_MEM_DEF, + (t_u8 **)&pdfs_ts); + if ((ret != MLAN_STATUS_SUCCESS) || !pdfs_ts) { + PRINTM(MERROR, "%s(): Could not allocate dfs_ts\n", + __func__); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + memset(pmadapter, (t_u8 *)pdfs_ts, 0, + sizeof(wlan_dfs_timestamp_t)); + + util_enqueue_list_tail(pmadapter->pmoal_handle, + &pmadapter->state_dfs.dfs_ts_head, + (pmlan_linked_list)pdfs_ts, MNULL, + MNULL); + pdfs_ts->channel = channel; + } + /* (else, use existing timestamp for channel; see assumptions above) */ + + /* update params */ + pmadapter->callbacks.moal_get_system_time(pmadapter->pmoal_handle, + &pdfs_ts->ts_sec, + &pdfs_ts->ts_usec); + pdfs_ts->represents = repr; + + PRINTM(MCMD_D, "11h: add/update dfs_timestamp - chan=%d, repr=%d(%s)," + " time(sec.usec)=%lu.%06lu\n", pdfs_ts->channel, + pdfs_ts->represents, DFS_TS_REPR_STRINGS[pdfs_ts->represents], + pdfs_ts->ts_sec, pdfs_ts->ts_usec); + + LEAVE(); + return ret; +} + +/******************************************************** + Global functions +********************************************************/ + +/** + * @brief Return whether the device has activated master radar detection. + * + * @param priv Private driver information structure + * + * @return + * - MTRUE if master radar detection is enabled in firmware + * - MFALSE otherwise + */ +t_bool +wlan_11h_is_master_radar_det_active(mlan_private *priv) +{ + ENTER(); + LEAVE(); + return priv->adapter->state_11h.is_master_radar_det_active; +} + +/** + * @brief Configure master radar detection. + * Call wlan_11h_check_update_radar_det_state() afterwards + * to push this to firmware. + * + * @param priv Private driver information structure + * @param enable Whether to enable or disable master radar detection + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + * + * @sa wlan_11h_check_update_radar_det_state + */ +mlan_status +wlan_11h_config_master_radar_det(mlan_private *priv, t_bool enable) +{ + mlan_status ret = MLAN_STATUS_FAILURE; + + ENTER(); + if (wlan_11h_is_dfs_master(priv) && + priv->adapter->init_para.dfs_master_radar_det_en) { + priv->adapter->state_11h.master_radar_det_enable_pending = + enable; + ret = MLAN_STATUS_SUCCESS; + } + + LEAVE(); + return ret; +} + +/** + * @brief Configure slave radar detection. + * Call wlan_11h_check_update_radar_det_state() afterwards + * to push this to firmware. + * + * @param priv Private driver information structure + * @param enable Whether to enable or disable slave radar detection + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + * + * @sa wlan_11h_check_update_radar_det_state + */ +mlan_status +wlan_11h_config_slave_radar_det(mlan_private *priv, t_bool enable) +{ + mlan_status ret = MLAN_STATUS_FAILURE; + + ENTER(); + if (wlan_11h_is_dfs_slave(priv) && + priv->adapter->init_para.dfs_slave_radar_det_en) { + priv->adapter->state_11h.slave_radar_det_enable_pending = + enable; + ret = MLAN_STATUS_SUCCESS; + } + LEAVE(); + return ret; +} + +/** + * @brief Checks all interfaces and determines if radar_detect flag states + * have/should be changed. If so, sends SNMP_MIB 11H command to FW. + * Call this function on any interface enable/disable/channel change. + * + * @param pmpriv Pointer to mlan_private structure + * + * @return MLAN_STATUS_SUCCESS (update or not) + * or MLAN_STATUS_FAILURE (cmd failure) + * + * @sa wlan_11h_check_radar_det_state + */ +mlan_status +wlan_11h_check_update_radar_det_state(mlan_private *pmpriv) +{ + t_u32 new_radar_det_state = 0; + t_u32 mib_11h = 0; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (wlan_11h_check_radar_det_state(pmpriv->adapter, + &new_radar_det_state)) { + PRINTM(MCMD_D, "%s: radar_det_state being updated.\n", + __func__); + + mib_11h |= new_radar_det_state; + /* keep priv's existing 11h state */ + if (pmpriv->intf_state_11h.is_11h_active) + mib_11h |= ENABLE_11H_MASK; + + /* Send cmd to FW to enable/disable 11h function in firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_SNMP_MIB, + HostCmd_ACT_GEN_SET, + Dot11H_i, MNULL, &mib_11h); + if (ret) + ret = MLAN_STATUS_FAILURE; + } + + /* updated state sent OR no change, thus no longer pending */ + pmpriv->adapter->state_11h.master_radar_det_enable_pending = MFALSE; + pmpriv->adapter->state_11h.slave_radar_det_enable_pending = MFALSE; + + LEAVE(); + return ret; +} + +/** + * @brief Query 11h firmware enabled state. + * + * Return whether the firmware currently has 11h extensions enabled + * + * @param priv Private driver information structure + * + * @return + * - MTRUE if 11h has been activated in the firmware + * - MFALSE otherwise + * + * @sa wlan_11h_activate + */ +t_bool +wlan_11h_is_active(mlan_private *priv) +{ + ENTER(); + LEAVE(); + return priv->intf_state_11h.is_11h_active; +} + +/** + * @brief Enable the transmit interface and record the state. + * + * @param priv Private driver information structure + * + * @return N/A + */ +t_void +wlan_11h_tx_enable(mlan_private *priv) +{ + ENTER(); + if (priv->intf_state_11h.tx_disabled) { + wlan_recv_event(priv, MLAN_EVENT_ID_FW_START_TX, MNULL); + priv->intf_state_11h.tx_disabled = MFALSE; + } + LEAVE(); +} + +/** + * @brief Disable the transmit interface and record the state. + * + * @param priv Private driver information structure + * + * @return N/A + */ +t_void +wlan_11h_tx_disable(mlan_private *priv) +{ + ENTER(); + if (!priv->intf_state_11h.tx_disabled) { + priv->intf_state_11h.tx_disabled = MTRUE; + wlan_recv_event(priv, MLAN_EVENT_ID_FW_STOP_TX, MNULL); + } + LEAVE(); +} + +/** + * @brief Enable or Disable the 11h extensions in the firmware + * + * @param priv Private driver information structure + * @param pioctl_buf A pointer to MLAN IOCTL Request buffer + * @param flag Enable 11h if MTRUE, disable otherwise + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11h_activate(mlan_private *priv, t_void *pioctl_buf, t_bool flag) +{ + t_u32 enable = flag & ENABLE_11H_MASK; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + /* add bits for master/slave radar detect into enable. */ + enable |= wlan_11h_get_current_radar_detect_flags(priv->adapter); + + /* + * Send cmd to FW to enable/disable 11h function in firmware + */ + ret = wlan_prepare_cmd(priv, + HostCmd_CMD_802_11_SNMP_MIB, + HostCmd_ACT_GEN_SET, + Dot11H_i, (t_void *)pioctl_buf, &enable); + if (ret) + ret = MLAN_STATUS_FAILURE; + else + /* Set boolean flag in driver 11h state */ + priv->intf_state_11h.is_11h_active = flag; + + PRINTM(MINFO, "11h: %s\n", flag ? "Activate" : "Deactivate"); + + LEAVE(); + return ret; +} + +/** + * @brief Initialize the 11h parameters and enable 11h when starting an IBSS + * + * @param adapter mlan_adapter structure + * + * @return N/A + */ +t_void +wlan_11h_init(mlan_adapter *adapter) +{ + wlan_11h_device_state_t *pstate_11h = &adapter->state_11h; + IEEEtypes_Quiet_t *pquiet = &adapter->state_11h.quiet_ie; + wlan_dfs_device_state_t *pstate_dfs = &adapter->state_dfs; + wlan_radar_det_hndlg_state_t *pstate_rdh = &adapter->state_rdh; +#ifdef DFS_TESTING_SUPPORT + wlan_dfs_testing_settings_t *pdfs_test = &adapter->dfs_test_params; +#endif + + ENTER(); + + /* Initialize 11H struct */ + pstate_11h->usr_def_power_constraint = WLAN_11H_TPC_POWERCONSTRAINT; + pstate_11h->min_tx_power_capability = WLAN_11H_TPC_POWERCAPABILITY_MIN; + pstate_11h->max_tx_power_capability = WLAN_11H_TPC_POWERCAPABILITY_MAX; + + pstate_11h->recvd_chanswann_event = MFALSE; + pstate_11h->master_radar_det_enable_pending = MFALSE; + pstate_11h->slave_radar_det_enable_pending = MFALSE; + pstate_11h->is_master_radar_det_active = MFALSE; + pstate_11h->is_slave_radar_det_active = MFALSE; + + /* Initialize quiet_ie */ + memset(adapter, pquiet, 0, sizeof(IEEEtypes_Quiet_t)); + pquiet->element_id = QUIET; + pquiet->len = + (sizeof(pquiet->quiet_count) + sizeof(pquiet->quiet_period) + + sizeof(pquiet->quiet_duration) + + sizeof(pquiet->quiet_offset)); + + /* Initialize DFS struct */ + pstate_dfs->dfs_check_pending = MFALSE; + pstate_dfs->dfs_radar_found = MFALSE; + pstate_dfs->dfs_check_channel = 0; + pstate_dfs->dfs_report_time_sec = 0; + util_init_list((pmlan_linked_list)&pstate_dfs->dfs_ts_head); + + /* Initialize RDH struct */ + pstate_rdh->stage = RDH_OFF; + pstate_rdh->priv_list_count = 0; + pstate_rdh->priv_curr_idx = 0; + pstate_rdh->curr_channel = 0; + pstate_rdh->new_channel = 0; + pstate_rdh->uap_band_cfg = 0; + pstate_rdh->max_bcn_dtim_ms = 0; + memset(adapter, pstate_rdh->priv_list, 0, + sizeof(pstate_rdh->priv_list)); + +#ifdef DFS_TESTING_SUPPORT + /* Initialize DFS testing struct */ + pdfs_test->user_cac_period_msec = 0; + pdfs_test->user_nop_period_sec = 0; + pdfs_test->no_channel_change_on_radar = MFALSE; + pdfs_test->fixed_new_channel_on_radar = 0; +#endif + + LEAVE(); +} + +/** + * @brief Cleanup for the 11h parameters that allocated memory, etc. + * + * @param adapter mlan_adapter structure + * + * @return N/A + */ +t_void +wlan_11h_cleanup(mlan_adapter *adapter) +{ + wlan_dfs_device_state_t *pstate_dfs = &adapter->state_dfs; + wlan_dfs_timestamp_t *pdfs_ts; + + ENTER(); + + /* cleanup dfs_timestamp list */ + pdfs_ts = (wlan_dfs_timestamp_t *)util_peek_list(adapter->pmoal_handle, + &pstate_dfs-> + dfs_ts_head, MNULL, + MNULL); + while (pdfs_ts) { + util_unlink_list(adapter->pmoal_handle, + &pstate_dfs->dfs_ts_head, + (pmlan_linked_list)pdfs_ts, MNULL, MNULL); + adapter->callbacks.moal_mfree(adapter->pmoal_handle, + (t_u8 *)pdfs_ts); + + pdfs_ts = + (wlan_dfs_timestamp_t *)util_peek_list(adapter-> + pmoal_handle, + &pstate_dfs-> + dfs_ts_head, + MNULL, MNULL); + } + + LEAVE(); +} + +/** + * @brief Initialize the 11h parameters and enable 11h when starting an IBSS + * + * @param pmpriv Pointer to mlan_private structure + * + * @return N/A + */ +t_void +wlan_11h_priv_init(mlan_private *pmpriv) +{ + wlan_11h_interface_state_t *pistate_11h = &pmpriv->intf_state_11h; + + ENTER(); + + pistate_11h->is_11h_enabled = MTRUE; + pistate_11h->is_11h_active = MFALSE; + pistate_11h->adhoc_auto_sel_chan = MTRUE; + pistate_11h->tx_disabled = MFALSE; + pistate_11h->dfs_slave_csa_chan = 0; + pistate_11h->dfs_slave_csa_expire_at_sec = 0; + + LEAVE(); +} + +/** + * @brief Retrieve a randomly selected starting channel if needed for 11h + * + * If 11h is enabled and an A-Band channel start band preference + * configured in the driver, the start channel must be random in order + * to meet with + * + * @param priv Private driver information structure + * + * @return Starting channel + */ +t_u8 +wlan_11h_get_adhoc_start_channel(mlan_private *priv) +{ + t_u8 start_chn; + mlan_adapter *adapter = priv->adapter; + t_u32 region; + t_u32 rand_entry; + region_chan_t *chn_tbl; + t_u8 rand_tries = 0; + + ENTER(); + + /* + * Set start_chn to the Default. Used if 11h is disabled or the band + * does not require 11h support. + */ + start_chn = DEFAULT_AD_HOC_CHANNEL; + + /* + * Check that we are looking for a channel in the A Band + */ + if ((adapter->adhoc_start_band & BAND_A) + || (adapter->adhoc_start_band & BAND_AN) + ) { + /* + * Set default to the A Band default. + * Used if random selection fails + * or if 11h is not enabled + */ + start_chn = DEFAULT_AD_HOC_CHANNEL_A; + + /* + * Check that 11h is enabled in the driver + */ + if (wlan_11h_is_enabled(priv)) { + /* + * Search the region_channel tables for a channel table + * that is marked for the A Band. + */ + for (region = 0; (region < MAX_REGION_CHANNEL_NUM); + region++) { + chn_tbl = &adapter->region_channel[region]; + + /* Check if table is valid and marked for A + Band */ + if (chn_tbl->valid + && chn_tbl->region == adapter->region_code + && chn_tbl->band & BAND_A) { + /* + * Set the start channel. Get a random + * number and use it to pick an entry + * in the table between 0 and the number + * of channels in the table (NumCFP). + */ + do { + rand_entry = + wlan_11h_get_random_num + (adapter) % + chn_tbl->num_cfp; + start_chn = + (t_u8)chn_tbl-> + pcfp[rand_entry]. + channel; + } while ((wlan_11h_is_channel_under_nop + (adapter, start_chn) || + ((adapter->state_rdh.stage == + RDH_GET_INFO_CHANNEL) && + wlan_11h_radar_detect_required + (priv, start_chn))) + && (++rand_tries < + MAX_RANDOM_CHANNEL_RETRIES)); + } + } + } + } + + PRINTM(MINFO, "11h: %s: AdHoc Channel set to %u\n", + wlan_11h_is_enabled(priv) ? "Enabled" : "Disabled", start_chn); + + LEAVE(); + return start_chn; +} + +/** + * @brief Retrieve channel closed for operation by Channel Switch Announcement + * + * After receiving CSA, we must not transmit in any form on the original + * channel for a certain duration. This checks the time, and returns + * the channel if valid. + * + * @param priv Private driver information structure + * + * @return Closed channel, else 0 + */ +t_u8 +wlan_11h_get_csa_closed_channel(mlan_private *priv) +{ + t_u32 sec, usec; + + ENTER(); + + if (!priv->intf_state_11h.dfs_slave_csa_chan) { + LEAVE(); + return 0; + } + + /* have csa channel, check if expired or not */ + priv->adapter->callbacks.moal_get_system_time(priv->adapter-> + pmoal_handle, &sec, + &usec); + if (sec > priv->intf_state_11h.dfs_slave_csa_expire_at_sec) { + /* expired: remove channel from blacklist table, and clear vars + */ + wlan_set_chan_blacklist(priv, BAND_A, + priv->intf_state_11h.dfs_slave_csa_chan, + MFALSE); + priv->intf_state_11h.dfs_slave_csa_chan = 0; + priv->intf_state_11h.dfs_slave_csa_expire_at_sec = 0; + } + + LEAVE(); + return priv->intf_state_11h.dfs_slave_csa_chan; +} + +/** + * @brief Check if the current region's regulations require the input channel + * to be scanned for radar. + * + * Based on statically defined requirements for sub-bands per regulatory + * agency requirements. + * + * Used in adhoc start to determine if channel availability check is required + * + * @param priv Private driver information structure + * @param channel Channel to determine radar detection requirements + * + * @return + * - MTRUE if radar detection is required + * - MFALSE otherwise + */ +/** @sa wlan_11h_issue_radar_detect + */ +t_bool +wlan_11h_radar_detect_required(mlan_private *priv, t_u8 channel) +{ + t_bool required = MFALSE; + + ENTER(); + + /* + * No checks for 11h or measurement code being enabled is placed here + * since regulatory requirements exist whether we support them or not. + */ + + required = wlan_get_cfp_radar_detect(priv, channel); + + if (!priv->adapter->region_code) + PRINTM(MINFO, "11h: Radar detection in CFP code[BG:%#x, A:%#x] " + "is %srequired for channel %d\n", + priv->adapter->cfp_code_bg, priv->adapter->cfp_code_a, + (required ? "" : "not "), channel); + else + PRINTM(MINFO, "11h: Radar detection in region %#02x " + "is %srequired for channel %d\n", + priv->adapter->region_code, (required ? "" : "not "), + channel); + + if (required == MTRUE && priv->media_connected == MTRUE + && priv->curr_bss_params.bss_descriptor.channel == channel) { + required = MFALSE; + + PRINTM(MINFO, "11h: Radar detection not required. " + "Already operating on the channel\n"); + } + + LEAVE(); + return required; +} + +/** + * @brief Perform a radar measurement if required on given channel + * + * Check to see if the provided channel requires a channel availability + * check (60 second radar detection measurement). If required, perform + * measurement, stalling calling thread until the measurement completes + * and then report result. + * + * Used when starting an adhoc or AP network. + * + * @param priv Private driver information structure + * @param pioctl_req Pointer to IOCTL request buffer + * @param channel Channel on which to perform radar measurement + * @param chan_width Width of channel on which to perform radar measurement + * + * @return + * - MTRUE if radar measurement request was successfully issued + * - MFALSE if radar detection is not required + * - < 0 for error during radar detection (if performed) + * + * @sa wlan_11h_radar_detect_required + */ +t_s32 +wlan_11h_issue_radar_detect(mlan_private *priv, + pmlan_ioctl_req pioctl_req, + t_u8 channel, t_u8 chan_width) +{ + t_s32 ret; + HostCmd_DS_CHAN_RPT_REQ chan_rpt_req; + + ENTER(); + + ret = wlan_11h_radar_detect_required(priv, channel); + if (ret) { + /* Prepare and issue CMD_CHAN_RPT_REQ. */ + memset(priv->adapter, &chan_rpt_req, 0x00, + sizeof(chan_rpt_req)); + + chan_rpt_req.chan_desc.startFreq = START_FREQ_11A_BAND; + chan_rpt_req.chan_desc.chanWidth = chan_width; + chan_rpt_req.chan_desc.chanNum = channel; + chan_rpt_req.millisec_dwell_time = + WLAN_11H_CHANNEL_AVAIL_CHECK_DURATION; +#ifdef DFS_TESTING_SUPPORT + if (priv->adapter->dfs_test_params.user_cac_period_msec) { + PRINTM(MCMD_D, + "dfs_testing - user CAC period=%d (msec)\n", + priv->adapter->dfs_test_params. + user_cac_period_msec); + chan_rpt_req.millisec_dwell_time = + priv->adapter->dfs_test_params. + user_cac_period_msec; + } +#endif + + PRINTM(MMSG, "11h: issuing DFS Radar check for channel=%d." + " Please wait for response...\n", channel); + + ret = wlan_prepare_cmd(priv, HostCmd_CMD_CHAN_REPORT_REQUEST, + HostCmd_ACT_GEN_SET, 0, + (t_void *)pioctl_req, + (t_void *)&chan_rpt_req); + } + + LEAVE(); + return ret; +} + +/** + * @brief Checks if a radar measurement was performed on channel, + * and if so, whether radar was detected on it. + * + * Used when starting an adhoc network. + * + * @param priv Private driver information structure + * @param chan Channel to check upon + * + * @return + * - MLAN_STATUS_SUCCESS if no radar on channel + * - MLAN_STATUS_FAILURE if radar was found on channel + * - (TBD??) MLAN_STATUS_PENDING if radar report NEEDS TO BE REISSUED + * + * @sa wlan_11h_issue_radar_detect + * @sa wlan_11h_process_start + */ +mlan_status +wlan_11h_check_chan_report(mlan_private *priv, t_u8 chan) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + wlan_dfs_device_state_t *pstate_dfs = &priv->adapter->state_dfs; + t_u32 sec, usec; + + ENTER(); + + /* check report we hold is valid or not */ + priv->adapter->callbacks.moal_get_system_time(priv->adapter-> + pmoal_handle, &sec, + &usec); + + PRINTM(MINFO, "11h: %s()\n", __func__); + PRINTM(MINFO, "- sec_now=%d, sec_report=%d.\n", + sec, pstate_dfs->dfs_report_time_sec); + PRINTM(MINFO, "- rpt_channel=%d, rpt_radar=%d.\n", + pstate_dfs->dfs_check_channel, pstate_dfs->dfs_radar_found); + + if ((!pstate_dfs->dfs_check_pending) && + (chan == pstate_dfs->dfs_check_channel) && + ((sec - pstate_dfs->dfs_report_time_sec) < + MAX_DFS_REPORT_USABLE_AGE_SEC)) { + /* valid and not out-dated, check if radar */ + if (pstate_dfs->dfs_radar_found) { + PRINTM(MMSG, "Radar was detected on channel %d.\n", + chan); + ret = MLAN_STATUS_FAILURE; + } + } else { + /* When Cache is not valid. This is required during extending + cache validity during bss_stop */ + pstate_dfs->dfs_check_channel = 0; + + /* TODO: reissue report request if not pending. BUT HOW to + make the code wait for it??? For now, just fail since we + don't have the info. */ + ret = MLAN_STATUS_PENDING; + } + + LEAVE(); + return ret; +} + +/** + * @brief Process an TLV buffer for a pending BSS Adhoc start command. + * + * Activate 11h functionality in the firmware if driver has is enabled + * for 11h (configured by the application via IOCTL). + * + * @param priv Private driver information structure + * @param ppbuffer Output parameter: Pointer to the TLV output buffer, + * modified on return to point after the appended 11h TLVs + * @param pcap_info Pointer to the capability info for the BSS to join + * @param channel Channel on which we are starting the IBSS + * @param p11h_bss_info Input/Output parameter: Pointer to the 11h BSS + * information for this network that we are establishing. + * 11h sensed flag set on output if warranted. + * + * @return + * - MLAN_STATUS_SUCCESS if 11h is disabled + * - Integer number of bytes appended to the TLV output buffer (ppbuffer) + * - < 0 for error (e.g. radar detected on channel) + */ +t_s32 +wlan_11h_process_start(mlan_private *priv, + t_u8 **ppbuffer, + IEEEtypes_CapInfo_t *pcap_info, + t_u32 channel, wlan_11h_bss_info_t *p11h_bss_info) +{ + mlan_adapter *adapter = priv->adapter; + t_s32 ret = MLAN_STATUS_SUCCESS; + t_bool is_dfs_chan = MFALSE; + + ENTER(); + if (wlan_11h_is_enabled(priv) + && ((adapter->adhoc_start_band & BAND_A) + || (adapter->adhoc_start_band & BAND_AN) + ) + ) { + if (!wlan_11d_is_enabled(priv)) { + /* No use having 11h enabled without 11d enabled */ + wlan_11d_enable(priv, MNULL, ENABLE_11D); +#ifdef STA_SUPPORT + wlan_11d_create_dnld_countryinfo(priv, + adapter-> + adhoc_start_band); +#endif + } + + /* + * Activate 11h functions in firmware, + * turns on capability bit + */ + wlan_11h_activate(priv, MNULL, MTRUE); + pcap_info->spectrum_mgmt = MTRUE; + + /* If using a DFS channel, enable radar detection. */ + is_dfs_chan = wlan_11h_radar_detect_required(priv, channel); + if (is_dfs_chan) { + if (!wlan_11h_is_master_radar_det_active(priv)) + wlan_11h_config_master_radar_det(priv, MTRUE); + } + wlan_11h_check_update_radar_det_state(priv); + + /* Set flag indicating this BSS we are starting is using 11h */ + p11h_bss_info->sensed_11h = MTRUE; + + if (is_dfs_chan) { + /* check if this channel is under NOP */ + if (wlan_11h_is_channel_under_nop(adapter, channel)) + ret = MLAN_STATUS_FAILURE; + /* check last channel report, if this channel is free + of radar */ + if (ret == MLAN_STATUS_SUCCESS) + ret = wlan_11h_check_chan_report(priv, channel); + } + if (ret == MLAN_STATUS_SUCCESS) + ret = wlan_11h_process_adhoc(priv, ppbuffer, channel, + MNULL); + else + ret = MLAN_STATUS_FAILURE; + } else { + /* Deactivate 11h functions in the firmware */ + wlan_11h_activate(priv, MNULL, MFALSE); + pcap_info->spectrum_mgmt = MFALSE; + wlan_11h_check_update_radar_det_state(priv); + } + LEAVE(); + return ret; +} + +/** + * @brief Process an TLV buffer for a pending BSS Join command for + * both adhoc and infra networks + * + * The TLV command processing for a BSS join for either adhoc or + * infrastructure network is performed with this function. The + * capability bits are inspected for the IBSS flag and the appropriate + * local routines are called to setup the necessary TLVs. + * + * Activate 11h functionality in the firmware if the spectrum management + * capability bit is found in the network information for the BSS we are + * joining. + * + * @param priv Private driver information structure + * @param ppbuffer Output parameter: Pointer to the TLV output buffer, + * modified on return to point after the appended 11h TLVs + * @param pcap_info Pointer to the capability info for the BSS to join + * @param band Band on which we are joining the BSS + * @param channel Channel on which we are joining the BSS + * @param p11h_bss_info Pointer to the 11h BSS information for this + * network that was parsed out of the scan response. + * + * @return Integer number of bytes appended to the TLV output + * buffer (ppbuffer), MLAN_STATUS_FAILURE (-1), + * or MLAN_STATUS_SUCCESS (0) + */ +t_s32 +wlan_11h_process_join(mlan_private *priv, + t_u8 **ppbuffer, + IEEEtypes_CapInfo_t *pcap_info, + t_u8 band, + t_u32 channel, wlan_11h_bss_info_t *p11h_bss_info) +{ + t_s32 ret = 0; + + ENTER(); + + if (priv->media_connected == MTRUE) { + if (wlan_11h_is_active(priv) == p11h_bss_info->sensed_11h) { + /* + * Assume DFS parameters are the same for roaming as long as + * the current & next APs have the same spectrum mgmt capability + * bit setting + */ + ret = MLAN_STATUS_SUCCESS; + + } else { + /* No support for roaming between DFS/non-DFS yet */ + ret = MLAN_STATUS_FAILURE; + } + + LEAVE(); + return ret; + } + + if (p11h_bss_info->sensed_11h) { + if (!wlan_11d_is_enabled(priv)) { + /* No use having 11h enabled without 11d enabled */ + wlan_11d_enable(priv, MNULL, ENABLE_11D); +#ifdef STA_SUPPORT + wlan_11d_parse_dnld_countryinfo(priv, + priv-> + pattempted_bss_desc); +#endif + } + /* + * Activate 11h functions in firmware, + * turns on capability bit + */ + wlan_11h_activate(priv, MNULL, MTRUE); + pcap_info->spectrum_mgmt = MTRUE; + + /* If using a DFS channel, enable radar detection. */ + if ((band & BAND_A) && + wlan_11h_radar_detect_required(priv, channel)) { + if (!wlan_11h_is_slave_radar_det_active(priv)) + wlan_11h_config_slave_radar_det(priv, MTRUE); + } + wlan_11h_check_update_radar_det_state(priv); + + if (pcap_info->ibss) { + PRINTM(MINFO, "11h: Adhoc join: Sensed\n"); + ret = wlan_11h_process_adhoc(priv, ppbuffer, channel, + p11h_bss_info); + } else { + PRINTM(MINFO, "11h: Infra join: Sensed\n"); + ret = wlan_11h_process_infra_join(priv, ppbuffer, band, + channel, + p11h_bss_info); + } + } else { + /* Deactivate 11h functions in the firmware */ + wlan_11h_activate(priv, MNULL, MFALSE); + pcap_info->spectrum_mgmt = MFALSE; + wlan_11h_check_update_radar_det_state(priv); + } + + LEAVE(); + return ret; +} + +/** + * + * @brief Prepare the HostCmd_DS_Command structure for an 11h command. + * + * Use the Command field to determine if the command being set up is for + * 11h and call one of the local command handlers accordingly for: + * + * - HostCmd_CMD_802_11_TPC_ADAPT_REQ + * - HostCmd_CMD_802_11_TPC_INFO + * - HostCmd_CMD_802_11_CHAN_SW_ANN + */ +/** - HostCmd_CMD_CHAN_REPORT_REQUEST + */ +/** + * @param priv Private driver information structure + * @param pcmd_ptr Output parameter: Pointer to the command being prepared + * for the firmware + * @param pinfo_buf Void buffer pass through with data necessary for a + * specific command type + */ +/** @return MLAN_STATUS_SUCCESS, MLAN_STATUS_FAILURE + * or MLAN_STATUS_PENDING + */ +/** @sa wlan_11h_cmd_tpc_request + * @sa wlan_11h_cmd_tpc_info + * @sa wlan_11h_cmd_chan_sw_ann + */ +/** @sa wlan_11h_cmd_chan_report_req + */ +mlan_status +wlan_11h_cmd_process(mlan_private *priv, + HostCmd_DS_COMMAND *pcmd_ptr, const t_void *pinfo_buf) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + switch (pcmd_ptr->command) { + case HostCmd_CMD_802_11_TPC_ADAPT_REQ: + ret = wlan_11h_cmd_tpc_request(priv, pcmd_ptr, pinfo_buf); + break; + case HostCmd_CMD_802_11_TPC_INFO: + ret = wlan_11h_cmd_tpc_info(priv, pcmd_ptr, pinfo_buf); + break; + case HostCmd_CMD_802_11_CHAN_SW_ANN: + ret = wlan_11h_cmd_chan_sw_ann(priv, pcmd_ptr, pinfo_buf); + break; + case HostCmd_CMD_CHAN_REPORT_REQUEST: + ret = wlan_11h_cmd_chan_rpt_req(priv, pcmd_ptr, pinfo_buf); + break; + default: + ret = MLAN_STATUS_FAILURE; + } + + pcmd_ptr->command = wlan_cpu_to_le16(pcmd_ptr->command); + pcmd_ptr->size = wlan_cpu_to_le16(pcmd_ptr->size); + + LEAVE(); + return ret; +} + +/** + * @brief Handle the command response from the firmware if from an 11h command + * + * Use the Command field to determine if the command response being + * is for 11h. Call the local command response handler accordingly for: + * + * - HostCmd_CMD_802_11_TPC_ADAPT_REQ + * - HostCmd_CMD_802_11_TPC_INFO + * - HostCmd_CMD_802_11_CHAN_SW_ANN + */ +/** - HostCmd_CMD_CHAN_REPORT_REQUEST + */ +/** + * @param priv Private driver information structure + * @param resp HostCmd_DS_COMMAND struct returned from the firmware + * command + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11h_cmdresp_process(mlan_private *priv, const HostCmd_DS_COMMAND *resp) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + switch (resp->command) { + case HostCmd_CMD_802_11_TPC_ADAPT_REQ: + HEXDUMP("11h: TPC REQUEST Rsp:", (t_u8 *)resp, + (t_u32)resp->size); + memcpy(priv->adapter, priv->adapter->curr_cmd->pdata_buf, + &resp->params.tpc_req, + sizeof(HostCmd_DS_802_11_TPC_ADAPT_REQ)); + break; + + case HostCmd_CMD_802_11_TPC_INFO: + HEXDUMP("11h: TPC INFO Rsp Data:", (t_u8 *)resp, + (t_u32)resp->size); + break; + + case HostCmd_CMD_802_11_CHAN_SW_ANN: + PRINTM(MINFO, "11h: Ret ChSwAnn: Sz=%u, Seq=%u, Ret=%u\n", + resp->size, resp->seq_num, resp->result); + break; + + case HostCmd_CMD_CHAN_REPORT_REQUEST: + priv->adapter->state_dfs.dfs_check_pending = MTRUE; + + if (resp->params.chan_rpt_req.millisec_dwell_time == 0) { + /* from wlan_11h_ioctl_dfs_cancel_chan_report */ + priv->adapter->state_dfs.dfs_check_pending = MFALSE; + priv->adapter->state_dfs.dfs_check_channel = 0; + PRINTM(MINFO, "11h: Cancelling Chan Report \n"); + } else { + PRINTM(MERROR, + "11h: Ret ChanRptReq. Set dfs_check_pending and wait" + " for EVENT_CHANNEL_REPORT.\n"); + } + + break; + + default: + ret = MLAN_STATUS_FAILURE; + } + + LEAVE(); + return ret; +} + +/** + * @brief Process an element from a scan response, copy relevant info for 11h + * + * @param pmadapter Pointer to mlan_adapter + * @param p11h_bss_info Output parameter: Pointer to the 11h BSS information + * for the network that is being processed + * @param pelement Pointer to the current IE we are inspecting for 11h + * relevance + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11h_process_bss_elem(mlan_adapter *pmadapter, + wlan_11h_bss_info_t *p11h_bss_info, + const t_u8 *pelement) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u8 element_len = *((t_u8 *)pelement + 1); + + ENTER(); + switch (*pelement) { + case POWER_CONSTRAINT: + PRINTM(MINFO, "11h: Power Constraint IE Found\n"); + p11h_bss_info->sensed_11h = MTRUE; + memcpy(pmadapter, &p11h_bss_info->power_constraint, pelement, + MIN((element_len + sizeof(IEEEtypes_Header_t)), + sizeof(IEEEtypes_PowerConstraint_t))); + p11h_bss_info->power_constraint.len = + MIN(element_len, (sizeof(IEEEtypes_PowerConstraint_t) + - sizeof(IEEEtypes_Header_t))); + break; + + case POWER_CAPABILITY: + PRINTM(MINFO, "11h: Power Capability IE Found\n"); + p11h_bss_info->sensed_11h = MTRUE; + memcpy(pmadapter, &p11h_bss_info->power_capability, pelement, + MIN((element_len + sizeof(IEEEtypes_Header_t)), + sizeof(IEEEtypes_PowerCapability_t))); + p11h_bss_info->power_capability.len = + MIN(element_len, (sizeof(IEEEtypes_PowerCapability_t) + - sizeof(IEEEtypes_Header_t))); + break; + + case TPC_REPORT: + PRINTM(MINFO, "11h: Tpc Report IE Found\n"); + p11h_bss_info->sensed_11h = MTRUE; + memcpy(pmadapter, &p11h_bss_info->tpc_report, pelement, + MIN((element_len + sizeof(IEEEtypes_Header_t)), + sizeof(IEEEtypes_TPCReport_t))); + p11h_bss_info->tpc_report.len = + MIN(element_len, (sizeof(IEEEtypes_TPCReport_t) + - sizeof(IEEEtypes_Header_t))); + break; + + case CHANNEL_SWITCH_ANN: + PRINTM(MINFO, "11h: Channel Switch Ann IE Found\n"); + p11h_bss_info->sensed_11h = MTRUE; + memcpy(pmadapter, &p11h_bss_info->chan_switch_ann, pelement, + MIN((element_len + sizeof(IEEEtypes_Header_t)), + sizeof(IEEEtypes_ChanSwitchAnn_t))); + p11h_bss_info->chan_switch_ann.len = + MIN(element_len, (sizeof(IEEEtypes_ChanSwitchAnn_t) + - sizeof(IEEEtypes_Header_t))); + break; + + case QUIET: + PRINTM(MINFO, "11h: Quiet IE Found\n"); + p11h_bss_info->sensed_11h = MTRUE; + memcpy(pmadapter, &p11h_bss_info->quiet, pelement, + MIN((element_len + sizeof(IEEEtypes_Header_t)), + sizeof(IEEEtypes_Quiet_t))); + p11h_bss_info->quiet.len = + MIN(element_len, (sizeof(IEEEtypes_Quiet_t) + - sizeof(IEEEtypes_Header_t))); + break; + + case IBSS_DFS: + PRINTM(MINFO, "11h: Ibss Dfs IE Found\n"); + p11h_bss_info->sensed_11h = MTRUE; + memcpy(pmadapter, &p11h_bss_info->ibss_dfs, pelement, + MIN((element_len + sizeof(IEEEtypes_Header_t)), + sizeof(IEEEtypes_IBSS_DFS_t))); + p11h_bss_info->ibss_dfs.len = + MIN(element_len, (sizeof(IEEEtypes_IBSS_DFS_t) + - sizeof(IEEEtypes_Header_t))); + break; + + case SUPPORTED_CHANNELS: + case TPC_REQUEST: + /* + * These elements are not in beacons/probe responses. + * Included here to cover set of enumerated 11h elements. + */ + break; + + default: + ret = MLAN_STATUS_FAILURE; + } + + LEAVE(); + return ret; +} + +/** + * @brief Driver handling for CHANNEL_SWITCH_ANN event + * + * @param priv Pointer to mlan_private + * + * @return MLAN_STATUS_SUCCESS, MLAN_STATUS_FAILURE or MLAN_STATUS_PENDING + */ +mlan_status +wlan_11h_handle_event_chanswann(mlan_private *priv) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u32 sec, usec; + + ENTER(); + priv->adapter->state_11h.recvd_chanswann_event = MTRUE; + + /* unlikely: clean up previous csa if still on-going */ + if (priv->intf_state_11h.dfs_slave_csa_chan) { + wlan_set_chan_blacklist(priv, BAND_A, + priv->intf_state_11h.dfs_slave_csa_chan, + MFALSE); + } + + /* record channel and time of occurence */ + priv->intf_state_11h.dfs_slave_csa_chan = + priv->curr_bss_params.bss_descriptor.channel; + priv->adapter->callbacks.moal_get_system_time(priv->adapter-> + pmoal_handle, &sec, + &usec); + priv->intf_state_11h.dfs_slave_csa_expire_at_sec = + sec + DFS_CHAN_MOVE_TIME; + +#ifdef STA_SUPPORT + /* do directed deauth. recvd_chanswann_event flag will cause different + reason code */ + PRINTM(MINFO, "11h: handle_event_chanswann() - sending deauth\n"); + ret = wlan_disconnect(priv, MNULL, + &priv->curr_bss_params.bss_descriptor. + mac_address); + + /* clear region table so next scan will be all passive */ + PRINTM(MINFO, "11h: handle_event_chanswann() - clear region table\n"); + wlan_11d_clear_parsedtable(priv); + + /* add channel to blacklist table */ + PRINTM(MINFO, + "11h: handle_event_chanswann() - scan blacklist csa channel\n"); + wlan_set_chan_blacklist(priv, BAND_A, + priv->intf_state_11h.dfs_slave_csa_chan, MTRUE); +#endif + + priv->adapter->state_11h.recvd_chanswann_event = MFALSE; + LEAVE(); + return ret; +} + +#ifdef DFS_TESTING_SUPPORT +/** + * @brief 802.11h DFS Testing configuration + * + * @param pmadapter Pointer to mlan_adapter + * @param pioctl_req Pointer to mlan_ioctl_req + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11h_ioctl_dfs_testing(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req) +{ + mlan_ds_11h_cfg *ds_11hcfg = MNULL; + mlan_ds_11h_dfs_testing *dfs_test = MNULL; + wlan_dfs_testing_settings_t *pdfs_test_params = MNULL; + + ENTER(); + + ds_11hcfg = (mlan_ds_11h_cfg *)pioctl_req->pbuf; + dfs_test = &ds_11hcfg->param.dfs_testing; + pdfs_test_params = &pmadapter->dfs_test_params; + + if (pioctl_req->action == MLAN_ACT_GET) { + dfs_test->usr_cac_period_msec = + pdfs_test_params->user_cac_period_msec; + dfs_test->usr_nop_period_sec = + pdfs_test_params->user_nop_period_sec; + dfs_test->usr_no_chan_change = + pdfs_test_params->no_channel_change_on_radar; + dfs_test->usr_fixed_new_chan = + pdfs_test_params->fixed_new_channel_on_radar; + } else { + pdfs_test_params->user_cac_period_msec = + dfs_test->usr_cac_period_msec; + pdfs_test_params->user_nop_period_sec = + dfs_test->usr_nop_period_sec; + pdfs_test_params->no_channel_change_on_radar = + dfs_test->usr_no_chan_change; + pdfs_test_params->fixed_new_channel_on_radar = + dfs_test->usr_fixed_new_chan; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} +#endif /* DFS_TESTING_SUPPORT */ + +/** + * @brief 802.11h DFS cancel chan report + * + * @param priv Pointer to mlan_private + * @param pioctl_req Pointer to mlan_ioctl_req + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11h_ioctl_dfs_cancel_chan_report(mlan_private *priv, + pmlan_ioctl_req pioctl_req) +{ + mlan_ds_11h_cfg *ds_11hcfg = MNULL; + HostCmd_DS_CHAN_RPT_REQ *chan_rpt_req = MNULL; + t_s32 ret; + + ENTER(); + + ds_11hcfg = (mlan_ds_11h_cfg *)pioctl_req->pbuf; + + chan_rpt_req = + (HostCmd_DS_CHAN_RPT_REQ *)&ds_11hcfg->param.chan_rpt_req; + + ret = wlan_prepare_cmd(priv, HostCmd_CMD_CHAN_REPORT_REQUEST, + HostCmd_ACT_GEN_SET, 0, + (t_void *)pioctl_req, (t_void *)chan_rpt_req); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Check if channel is under NOP (Non-Occupancy Period) + * If so, the channel should not be used until the period expires. + * + * @param pmadapter Pointer to mlan_adapter + * @param channel Channel number + * + * @return MTRUE or MFALSE + */ +t_bool +wlan_11h_is_channel_under_nop(mlan_adapter *pmadapter, t_u8 channel) +{ + wlan_dfs_timestamp_t *pdfs_ts = MNULL; + t_u32 now_sec, now_usec; + t_bool ret = MFALSE; + + ENTER(); + pdfs_ts = wlan_11h_find_dfs_timestamp(pmadapter, channel); + + if (pdfs_ts && (pdfs_ts->channel == channel) + && (pdfs_ts->represents == DFS_TS_REPR_NOP_START)) { + /* found NOP_start timestamp entry on channel */ + pmadapter->callbacks.moal_get_system_time(pmadapter-> + pmoal_handle, + &now_sec, &now_usec); +#ifdef DFS_TESTING_SUPPORT + if (pmadapter->dfs_test_params.user_nop_period_sec) { + PRINTM(MCMD_D, + "dfs_testing - user NOP period=%d (sec)\n", + pmadapter->dfs_test_params.user_nop_period_sec); + if ((now_sec - pdfs_ts->ts_sec) <= + pmadapter->dfs_test_params.user_nop_period_sec) { + ret = MTRUE; + } + } else +#endif + { + if ((now_sec - pdfs_ts->ts_sec) <= + WLAN_11H_NON_OCCUPANCY_PERIOD) + ret = MTRUE; + } + + /* if entry is expired, remove it */ + if (!ret) + wlan_11h_remove_dfs_timestamp(pmadapter, pdfs_ts); + else + PRINTM(MMSG, + "11h: channel %d is under NOP - can't use.\n", + channel); + } + + LEAVE(); + return ret; +} + +/** + * @brief Driver handling for CHANNEL_REPORT_RDY event + * This event will have the channel report data appended. + * + * @param priv Pointer to mlan_private + * @param pevent Pointer to mlan_event + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11h_handle_event_chanrpt_ready(mlan_private *priv, mlan_event *pevent) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + HostCmd_DS_CHAN_RPT_RSP *pchan_rpt_rsp; + MrvlIEtypes_Data_t *ptlv; + MeasRptBasicMap_t *pmeas_rpt_basic; + t_u8 *pbuffer; + t_s32 evt_len; + t_u16 tlv_len; + t_u32 sec, usec; + wlan_dfs_device_state_t *pstate_dfs = &priv->adapter->state_dfs; + + ENTER(); + pchan_rpt_rsp = (HostCmd_DS_CHAN_RPT_RSP *)&pevent->event_buf; + DBG_HEXDUMP(MCMD_D, "11h: Event ChanRptReady (HostCmd_DS_CHAN_RPT_RSP)", + (t_u8 *)pchan_rpt_rsp, wlan_le32_to_cpu(pevent->event_len)); + + if (wlan_le32_to_cpu(pchan_rpt_rsp->cmd_result) == + MLAN_CMD_RESULT_SUCCESS) { + pbuffer = (t_u8 *)&pchan_rpt_rsp->tlv_buffer; + evt_len = wlan_le32_to_cpu(pevent->event_len); + evt_len -= + sizeof(HostCmd_DS_CHAN_RPT_RSP) - + sizeof(pchan_rpt_rsp->tlv_buffer); + + while (evt_len >= sizeof(MrvlIEtypesHeader_t)) { + ptlv = (MrvlIEtypes_Data_t *)pbuffer; + tlv_len = wlan_le16_to_cpu(ptlv->header.len); + + switch (wlan_le16_to_cpu(ptlv->header.type)) { + case TLV_TYPE_CHANRPT_11H_BASIC: + pmeas_rpt_basic = + (MeasRptBasicMap_t *)&ptlv->data; + if (pmeas_rpt_basic->radar) { + pstate_dfs->dfs_radar_found = MTRUE; + PRINTM(MMSG, + "RADAR Detected on channel %d!\n", + pstate_dfs->dfs_check_channel); + /* add channel to NOP list */ + wlan_11h_add_dfs_timestamp(priv-> + adapter, + DFS_TS_REPR_NOP_START, + pstate_dfs-> + dfs_check_channel); + } + break; + + default: + break; + } + + pbuffer += (tlv_len + sizeof(ptlv->header)); + evt_len -= (tlv_len + sizeof(ptlv->header)); + evt_len = (evt_len > 0) ? evt_len : 0; + } + } else { + ret = MLAN_STATUS_FAILURE; + } + + /* Update DFS structure. */ + priv->adapter->callbacks.moal_get_system_time(priv->adapter-> + pmoal_handle, &sec, + &usec); + pstate_dfs->dfs_report_time_sec = sec; + pstate_dfs->dfs_check_pending = MFALSE; + + LEAVE(); + return ret; +} + +/** + * @brief Check if RADAR_DETECTED handling is blocking data tx + * + * @param pmadapter Pointer to mlan_adapter + * + * @return MTRUE or MFALSE + */ +t_bool +wlan_11h_radar_detected_tx_blocked(mlan_adapter *pmadapter) +{ + switch (pmadapter->state_rdh.stage) { + case RDH_OFF: + case RDH_CHK_INTFS: + case RDH_STOP_TRAFFIC: + return MFALSE; + } + return MTRUE; +} + +/** + * @brief Callback for RADAR_DETECTED event driver handling + * + * @param priv Void pointer to mlan_private + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_11h_radar_detected_callback(t_void *priv) +{ + mlan_status ret; + ENTER(); + ret = wlan_11h_radar_detected_handling(((mlan_private *)(priv))-> + adapter); + LEAVE(); + return ret; +} + +/** + * @brief Driver handling for RADAR_DETECTED event + * + * @param pmadapter Pointer to mlan_adapter + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE or MLAN_STATUS_PENDING + */ +mlan_status +wlan_11h_radar_detected_handling(mlan_adapter *pmadapter) +{ +#ifdef DEBUG_LEVEL1 + const char *rdh_stage_str[] = { + "RDH_OFF", + "RDH_CHK_INTFS", + "RDH_STOP_TRAFFIC", + "RDH_GET_INFO_CHANNEL", + "RDH_GET_INFO_BEACON_DTIM", + "RDH_SET_CUSTOM_IE", + "RDH_REM_CUSTOM_IE", + "RDH_STOP_INTFS", + "RDH_SET_NEW_CHANNEL", + "RDH_RESTART_INTFS", + "RDH_RESTART_TRAFFIC" + }; +#endif + + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = MNULL; + t_u32 i; + wlan_radar_det_hndlg_state_t *pstate_rdh = &pmadapter->state_rdh; + + ENTER(); + + switch (pstate_rdh->stage) { + case RDH_CHK_INTFS: + PRINTM(MCMD_D, "%s(): stage(%d)=%s\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage]); + + /* get active interfaces */ + memset(pmadapter, pstate_rdh->priv_list, 0x00, + sizeof(pstate_rdh->priv_list)); + pstate_rdh->priv_list_count = wlan_get_privs_by_cond(pmadapter, + wlan_is_intf_active, + pstate_rdh-> + priv_list); + PRINTM(MCMD_D, "%s(): priv_list_count = %d\n", __func__, + pstate_rdh->priv_list_count); + for (i = 0; i < pstate_rdh->priv_list_count; i++) + PRINTM(MINFO, "%s(): priv_list[%d] = %p\n", + __func__, i, pstate_rdh->priv_list[i]); + + if (pstate_rdh->priv_list_count == 0) { + /* no interfaces active... nothing to do */ + PRINTM(MMSG, "11h: Radar Detected - no active priv's," + " skip event handling.\n"); + pstate_rdh->stage = RDH_OFF; + PRINTM(MCMD_D, "%s(): finished - stage(%d)=%s\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage]); + break; /* EXIT CASE */ + } + /* else: start handling */ + pstate_rdh->curr_channel = 0; + pstate_rdh->new_channel = 0; + pstate_rdh->uap_band_cfg = 0; + pstate_rdh->max_bcn_dtim_ms = 0; + pstate_rdh->priv_curr_idx = RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_STOP_TRAFFIC; + /* FALL THROUGH TO NEXT STAGE */ + + case RDH_STOP_TRAFFIC: + PRINTM(MCMD_D, "%s(): stage(%d)=%s\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage]); + + PRINTM(MMSG, + "11h: Radar Detected - stopping host tx traffic.\n"); + for (i = 0; i < pstate_rdh->priv_list_count; i++) + wlan_11h_tx_disable(pstate_rdh->priv_list[i]); + + pstate_rdh->priv_curr_idx = RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_GET_INFO_CHANNEL; + /* FALL THROUGH TO NEXT STAGE */ + + case RDH_GET_INFO_CHANNEL: + PRINTM(MCMD_D, "%s(): stage(%d)=%s, priv_idx=%d\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage], + pstate_rdh->priv_curr_idx); + + /* here, prefer STA info over UAP info - one less CMD to send */ + if (pstate_rdh->priv_curr_idx == RDH_STAGE_FIRST_ENTRY_PRIV_IDX) { + if (wlan_only_uap_priv_in_list(pstate_rdh->priv_list, + pstate_rdh-> + priv_list_count)) { +#ifdef UAP_SUPPORT + /* Assume all UAPs on same channel, use first + UAP */ + pmpriv = pstate_rdh->priv_list[0]; + pstate_rdh->priv_curr_idx = 0; + /* send cmd to get first UAP's info */ + pmpriv->uap_state_chan_cb.pioctl_req_curr = + MNULL; + pmpriv->uap_state_chan_cb.get_chan_callback = + wlan_11h_radar_detected_callback; + ret = wlan_uap_get_channel(pmpriv); + break; /* EXIT CASE */ +#endif + } else { + /* Assume all STAs on same channel, find first + STA */ + MASSERT(pstate_rdh->priv_list_count > 0); + for (i = 0; i < pstate_rdh->priv_list_count; + i++) { + pmpriv = pstate_rdh->priv_list[i]; + if (GET_BSS_ROLE(pmpriv) == + MLAN_BSS_ROLE_STA) + break; + } + /* STA info kept in driver, just copy */ + pstate_rdh->curr_channel = + pmpriv->curr_bss_params.bss_descriptor. + channel; + } + } +#ifdef UAP_SUPPORT + else if (pstate_rdh->priv_curr_idx < + pstate_rdh->priv_list_count) { + /* repeat entry: UAP return with info */ + pmpriv = pstate_rdh->priv_list[pstate_rdh-> + priv_curr_idx]; + pstate_rdh->curr_channel = + pmpriv->uap_state_chan_cb.channel; + pstate_rdh->uap_band_cfg = + pmpriv->uap_state_chan_cb.band_config; + PRINTM(MCMD_D, "%s(): uap_band_cfg=0x%02x\n", __func__, + pstate_rdh->uap_band_cfg); + } +#endif + + /* add channel to NOP list */ + wlan_11h_add_dfs_timestamp(pmadapter, DFS_TS_REPR_NOP_START, + pstate_rdh->curr_channel); + + /* choose new channel (!= curr channel) and move on */ + i = 0; + do { +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_UAP) + pstate_rdh->new_channel = + wlan_11h_get_uap_start_channel(pmpriv, + pmpriv-> + uap_state_chan_cb. + band_config); + else +#endif + pstate_rdh->new_channel = + wlan_11h_get_adhoc_start_channel + (pmpriv); + } while ((pstate_rdh->new_channel == pstate_rdh->curr_channel) && (++i < MAX_RANDOM_CHANNEL_RETRIES)); /* avoid + deadloop + */ + if (i >= MAX_RANDOM_CHANNEL_RETRIES) /* report error */ + PRINTM(MERROR, + "%s(): ERROR - could not choose new_chan" + " (!= curr_chan) !!\n", __func__); + +#ifdef DFS_TESTING_SUPPORT + if (!pmadapter->dfs_test_params.no_channel_change_on_radar && + pmadapter->dfs_test_params.fixed_new_channel_on_radar) { + PRINTM(MCMD_D, "dfs_testing - user fixed new_chan=%d\n", + pmadapter->dfs_test_params. + fixed_new_channel_on_radar); + pstate_rdh->new_channel = + pmadapter->dfs_test_params. + fixed_new_channel_on_radar; + } +#endif + PRINTM(MCMD_D, "%s(): curr_chan=%d, new_chan=%d\n", + __func__, pstate_rdh->curr_channel, + pstate_rdh->new_channel); + + pstate_rdh->priv_curr_idx = RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_GET_INFO_BEACON_DTIM; + /* FALL THROUGH TO NEXT STAGE */ + + case RDH_GET_INFO_BEACON_DTIM: + PRINTM(MCMD_D, "%s(): stage(%d)=%s, priv_idx=%d\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage], + pstate_rdh->priv_curr_idx); + +#ifdef UAP_SUPPORT + /* check all intfs in this stage to find longest period */ + /* UAP intf callback returning with info */ + if (pstate_rdh->priv_curr_idx < pstate_rdh->priv_list_count) { + t_u16 bcn_dtim_msec; + pmpriv = pstate_rdh->priv_list[pstate_rdh-> + priv_curr_idx]; + PRINTM(MCMD_D, "%s(): uap.bcn_pd=%d, uap.dtim_pd=%d\n", + __func__, + pmpriv->uap_state_chan_cb.beacon_period, + pmpriv->uap_state_chan_cb.dtim_period); + bcn_dtim_msec = + (pmpriv->uap_state_chan_cb.beacon_period * + pmpriv->uap_state_chan_cb.dtim_period); + if (bcn_dtim_msec > pstate_rdh->max_bcn_dtim_ms) + pstate_rdh->max_bcn_dtim_ms = bcn_dtim_msec; + } +#endif + + /* check next intf */ + while ((++pstate_rdh->priv_curr_idx) < + pstate_rdh->priv_list_count) { + pmpriv = pstate_rdh->priv_list[pstate_rdh-> + priv_curr_idx]; + +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_UAP) { + pmpriv->uap_state_chan_cb.pioctl_req_curr = + MNULL; + pmpriv->uap_state_chan_cb.get_chan_callback = + wlan_11h_radar_detected_callback; + ret = wlan_uap_get_beacon_dtim(pmpriv); + break; /* leads to exit case */ + } else +#endif + { /* get STA info from driver and compare here */ + t_u16 bcn_pd_msec = 100; + t_u16 dtim_pd_msec = 1; + t_u16 bcn_dtim_msec; + + /* adhoc creator */ + if (wlan_11h_is_dfs_master(pmpriv)) { + bcn_pd_msec = pmpriv->beacon_period; + } else { + bcn_pd_msec = + pmpriv->curr_bss_params. + bss_descriptor.beacon_period; + /* if (priv->bss_mode != + MLAN_BSS_MODE_IBSS) */ + /* TODO: mlan_scan.c needs to parse TLV + 0x05 (TIM) for dtim_period */ + } + PRINTM(MCMD_D, + "%s(): sta.bcn_pd=%d, sta.dtim_pd=%d\n", + __func__, bcn_pd_msec, dtim_pd_msec); + bcn_dtim_msec = (bcn_pd_msec * dtim_pd_msec); + if (bcn_dtim_msec > pstate_rdh->max_bcn_dtim_ms) + pstate_rdh->max_bcn_dtim_ms = + bcn_dtim_msec; + } + } + + if (pstate_rdh->priv_curr_idx < pstate_rdh->priv_list_count) + break; /* EXIT CASE (for UAP) */ + /* else */ + pstate_rdh->priv_curr_idx = RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_SET_CUSTOM_IE; + /* FALL THROUGH TO NEXT STAGE */ + + case RDH_SET_CUSTOM_IE: + PRINTM(MCMD_D, "%s(): stage(%d)=%s, priv_idx=%d\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage], + pstate_rdh->priv_curr_idx); + + /* add CHAN_SW IE - firmware will accept on any interface, and + apply to all */ + if (pstate_rdh->priv_curr_idx == RDH_STAGE_FIRST_ENTRY_PRIV_IDX) { + mlan_ioctl_req *pioctl_req = MNULL; + + ret = wlan_11h_prepare_custom_ie_chansw(pmadapter, + &pioctl_req, + MTRUE); + if ((ret != MLAN_STATUS_SUCCESS) || !pioctl_req) { + PRINTM(MERROR, + "%s(): Error in preparing CHAN_SW IE.\n", + __func__); + break; /* EXIT CASE */ + } + + PRINTM(MMSG, + "11h: Radar Detected - adding CHAN_SW IE to interfaces.\n"); + pmpriv = pstate_rdh->priv_list[0]; + pstate_rdh->priv_curr_idx = 0; + pioctl_req->bss_index = pmpriv->bss_index; + ret = wlan_misc_ioctl_custom_ie_list(pmadapter, + pioctl_req, + MFALSE); + if (ret != MLAN_STATUS_SUCCESS && + ret != MLAN_STATUS_PENDING) { + PRINTM(MERROR, + "%s(): Could not set IE for priv=%p [priv_bss_idx=%d]!\n", + __func__, pmpriv, pmpriv->bss_index); + /* TODO: how to handle this error case?? ignore + & continue? */ + } + /* free ioctl buffer memory before we leave */ + pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pioctl_req); + break; /* EXIT CASE */ + } + /* else */ + pstate_rdh->priv_curr_idx = RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_REM_CUSTOM_IE; + /* FALL THROUGH TO NEXT STAGE */ + + case RDH_REM_CUSTOM_IE: + PRINTM(MCMD_D, "%s(): stage(%d)=%s, priv_idx=%d\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage], + pstate_rdh->priv_curr_idx); + + /* remove CHAN_SW IE - firmware will accept on any interface, + and apply to all */ + if (pstate_rdh->priv_curr_idx == RDH_STAGE_FIRST_ENTRY_PRIV_IDX) { + mlan_ioctl_req *pioctl_req = MNULL; + + /* + * first entry to this stage, do delay + * DFS requires a minimum of 5 chances for clients to hear this IE. + * Use delay: 5 beacons <= (BCN_DTIM_MSEC*5) <= 3 seconds). + */ + t_u16 delay_ms = MAX(MIN_RDH_CHAN_SW_IE_PERIOD_MSEC, + MIN((5 * + pstate_rdh->max_bcn_dtim_ms), + MAX_RDH_CHAN_SW_IE_PERIOD_MSEC)); + PRINTM(MMSG, + "11h: Radar Detected - delay %d ms for FW to" + " broadcast CHAN_SW IE.\n", delay_ms); + wlan_mdelay(pmadapter, delay_ms); + PRINTM(MMSG, + "11h: Radar Detected - delay over, removing" + " CHAN_SW IE from interfaces.\n"); + + ret = wlan_11h_prepare_custom_ie_chansw(pmadapter, + &pioctl_req, + MFALSE); + if ((ret != MLAN_STATUS_SUCCESS) || !pioctl_req) { + PRINTM(MERROR, + "%s(): Error in preparing CHAN_SW IE.\n", + __func__); + break; /* EXIT CASE */ + } + + pmpriv = pstate_rdh->priv_list[0]; + pstate_rdh->priv_curr_idx = 0; + pioctl_req->bss_index = pmpriv->bss_index; + ret = wlan_misc_ioctl_custom_ie_list(pmadapter, + pioctl_req, + MFALSE); + if (ret != MLAN_STATUS_SUCCESS && + ret != MLAN_STATUS_PENDING) { + PRINTM(MERROR, + "%s(): Could not set IE for priv=%p [priv_bss_idx=%d]!\n", + __func__, pmpriv, pmpriv->bss_index); + /* TODO: hiow to handle this error case?? + ignore & continue? */ + } + /* free ioctl buffer memory before we leave */ + pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pioctl_req); + break; /* EXIT CASE */ + } + /* else */ + pstate_rdh->priv_curr_idx = RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_STOP_INTFS; + /* FALL THROUGH TO NEXT STAGE */ + + case RDH_STOP_INTFS: + PRINTM(MCMD_D, "%s(): stage(%d)=%s, priv_idx=%d\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage], + pstate_rdh->priv_curr_idx); + + /* issues one cmd (DEAUTH/ADHOC_STOP/BSS_STOP) to each intf */ + while ((++pstate_rdh->priv_curr_idx) < + pstate_rdh->priv_list_count) { + pmpriv = pstate_rdh->priv_list[pstate_rdh-> + priv_curr_idx]; +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_UAP) { + ret = wlan_prepare_cmd(pmpriv, + HOST_CMD_APCMD_BSS_STOP, + HostCmd_ACT_GEN_SET, 0, + MNULL, MNULL); + break; /* leads to exit case */ + } +#endif +#ifdef STA_SUPPORT + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_STA) { + if (wlan_11h_is_dfs_master(pmpriv)) { + /* Save ad-hoc creator state before + stop clears it */ + pmpriv->adhoc_state_prev = + pmpriv->adhoc_state; + } + if (pmpriv->media_connected == MTRUE) { + wlan_disconnect(pmpriv, MNULL, MNULL); + break; /* leads to exit case */ + } + } +#endif + } + + if (pstate_rdh->priv_curr_idx < pstate_rdh->priv_list_count || + ret == MLAN_STATUS_FAILURE) + break; /* EXIT CASE */ + /* else */ + pstate_rdh->priv_curr_idx = RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_SET_NEW_CHANNEL; + +#ifdef DFS_TESTING_SUPPORT + if (pmadapter->dfs_test_params.no_channel_change_on_radar) { + PRINTM(MCMD_D, + "dfs_testing - no channel change on radar." + " Overwrite new_chan = curr_chan.\n"); + pstate_rdh->new_channel = pstate_rdh->curr_channel; + pstate_rdh->priv_curr_idx = + RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_RESTART_INTFS; + goto rdh_restart_intfs; /* skip next stage */ + } +#endif + /* FALL THROUGH TO NEXT STAGE */ + + case RDH_SET_NEW_CHANNEL: + PRINTM(MCMD_D, "%s(): stage(%d)=%s, priv_idx=%d\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage], + pstate_rdh->priv_curr_idx); + + /* only set new channel for UAP intfs */ + while ((++pstate_rdh->priv_curr_idx) < + pstate_rdh->priv_list_count) { + pmpriv = pstate_rdh->priv_list[pstate_rdh-> + priv_curr_idx]; +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_UAP) { + t_u8 chan_offset; + t_u16 mask_chanwidth = 0x0C; + + pmpriv->uap_state_chan_cb.pioctl_req_curr = + MNULL; + pmpriv->uap_state_chan_cb.get_chan_callback = + wlan_11h_radar_detected_callback; + /* DFS only in 5GHz */ + chan_offset = + wlan_get_second_channel_offset + (pstate_rdh->new_channel); + pstate_rdh->uap_band_cfg &= mask_chanwidth; + pstate_rdh->uap_band_cfg |= + (chan_offset << 4) | BAND_CONFIG_5GHZ; + PRINTM(MINFO, "uAP band config = 0x%x\n", + pstate_rdh->uap_band_cfg); + + ret = wlan_uap_set_channel(pmpriv, + pstate_rdh-> + uap_band_cfg, + pstate_rdh-> + new_channel); + break; /* leads to exit case */ + } +#endif + } + + if (pstate_rdh->priv_curr_idx < pstate_rdh->priv_list_count || + ret == MLAN_STATUS_FAILURE) + break; /* EXIT CASE (for UAP) */ + /* else */ + pstate_rdh->priv_curr_idx = RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_RESTART_INTFS; + /* FALL THROUGH TO NEXT STAGE */ + + case RDH_RESTART_INTFS: +#ifdef DFS_TESTING_SUPPORT +rdh_restart_intfs: +#endif + PRINTM(MCMD_D, "%s(): stage(%d)=%s, priv_idx=%d\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage], + pstate_rdh->priv_curr_idx); + + /* can only restart master intfs */ + while ((++pstate_rdh->priv_curr_idx) < + pstate_rdh->priv_list_count) { + pmpriv = pstate_rdh->priv_list[pstate_rdh-> + priv_curr_idx]; +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_UAP) { + if (wlan_11h_radar_detect_required(pmpriv, + pstate_rdh-> + new_channel)) + { + /* Radar detection is required for this + channel, make sure 11h is activated + in the firmware */ + ret = wlan_11h_activate(pmpriv, MNULL, + MTRUE); + ret = wlan_11h_config_master_radar_det + (pmpriv, MTRUE); + ret = wlan_11h_check_update_radar_det_state(pmpriv); + } + ret = wlan_prepare_cmd(pmpriv, + HOST_CMD_APCMD_BSS_START, + HostCmd_ACT_GEN_SET, 0, + MNULL, MNULL); + break; /* leads to exit case */ + } +#endif +#ifdef STA_SUPPORT + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_STA) { + /* Check previous state to find former Ad-hoc + creator interface. Set new state to + Starting, so it'll be seen as a DFS master. */ + if (pmpriv->adhoc_state_prev == ADHOC_STARTED) { + pmpriv->adhoc_state = ADHOC_STARTING; + pmpriv->adhoc_state_prev = ADHOC_IDLE; + } + if (wlan_11h_is_dfs_master(pmpriv)) { + /* set new adhoc channel here */ + pmpriv->adhoc_channel = + pstate_rdh->new_channel; + if (wlan_11h_radar_detect_required + (pmpriv, pstate_rdh->new_channel)) { + /* Radar detection is required + for this channel, make sure + 11h is activated in the + firmware */ + ret = wlan_11h_activate(pmpriv, + MNULL, + MTRUE); + if (ret) + break; + ret = wlan_11h_config_master_radar_det(pmpriv, MTRUE); + if (ret) + break; + ret = wlan_11h_check_update_radar_det_state(pmpriv); + if (ret) + break; + } + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_AD_HOC_START, + HostCmd_ACT_GEN_SET, + 0, MNULL, + &pmpriv-> + adhoc_last_start_ssid); + break; /* leads to exit case */ + } + + /* NOTE: DON'T reconnect slave STA intfs - + infra/adhoc_joiner Do we want to return to + same AP/network (on radar channel)? If want + to connect back, depend on either: 1. + driver's reassoc thread 2. wpa_supplicant, + or other user-space app */ + } +#endif + } + + if (pstate_rdh->priv_curr_idx < pstate_rdh->priv_list_count || + ret == MLAN_STATUS_FAILURE) + break; /* EXIT CASE (for UAP) */ + /* else */ + pstate_rdh->priv_curr_idx = RDH_STAGE_FIRST_ENTRY_PRIV_IDX; + pstate_rdh->stage = RDH_RESTART_TRAFFIC; + /* FALL THROUGH TO NEXT STAGE */ + + case RDH_RESTART_TRAFFIC: + PRINTM(MCMD_D, "%s(): stage(%d)=%s\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage]); + + /* continue traffic for reactivated interfaces */ + PRINTM(MMSG, + "11h: Radar Detected - restarting host tx traffic.\n"); + for (i = 0; i < pstate_rdh->priv_list_count; i++) + wlan_11h_tx_enable(pstate_rdh->priv_list[i]); + + pstate_rdh->stage = RDH_OFF; /* DONE! */ + PRINTM(MCMD_D, "%s(): finished - stage(%d)=%s\n", + __func__, pstate_rdh->stage, + rdh_stage_str[pstate_rdh->stage]); + + break; + + default: + pstate_rdh->stage = RDH_OFF; /* cancel RDH to unblock Tx + packets */ + break; + } + + LEAVE(); + return ret; +} + +/** + * @brief DFS Event Preprocessing. + * Operates directly on pmadapter variables. + * + * 1. EVENT_RADAR_DETECTED comes from firmware without specific + * bss_num/bss_type. Find it an appropriate interface and + * update event_cause field in event_buf. + * + * @param pmadapter Pointer to mlan_adapter + * + * @return MLAN_STATUS_SUCCESS (update successful) + * or MLAN_STATUS_FAILURE (no change) + */ +mlan_status +wlan_11h_dfs_event_preprocessing(mlan_adapter *pmadapter) +{ + mlan_status ret = MLAN_STATUS_FAILURE; + mlan_private *pmpriv = MNULL; + mlan_private *priv_list[MLAN_MAX_BSS_NUM]; + + ENTER(); + switch (pmadapter->event_cause & EVENT_ID_MASK) { + case EVENT_RADAR_DETECTED: + /* find active intf: prefer dfs_master over dfs_slave */ + if (wlan_get_privs_by_two_cond(pmadapter, + wlan_11h_is_master_active_on_dfs_chan, + wlan_11h_is_dfs_master, + MTRUE, priv_list)) { + pmpriv = priv_list[0]; + PRINTM(MINFO, "%s: found dfs_master priv=%p\n", + __func__, pmpriv); + } else if (wlan_get_privs_by_two_cond(pmadapter, + wlan_11h_is_slave_active_on_dfs_chan, + wlan_11h_is_dfs_slave, + MTRUE, priv_list)) { + pmpriv = priv_list[0]; + PRINTM(MINFO, "%s: found dfs_slave priv=%p\n", + __func__, pmpriv); + } + + /* update event_cause if we found an appropriate priv */ + if (pmpriv) { + pmlan_buffer pmevbuf = pmadapter->pmlan_buffer_event; + t_u32 new_event_cause = + pmadapter->event_cause & EVENT_ID_MASK; + new_event_cause |= + ((GET_BSS_NUM(pmpriv) & 0xff) << 16) | + ((pmpriv->bss_type & 0xff) << 24); + PRINTM(MINFO, "%s: priv - bss_num=%d, bss_type=%d\n", + __func__, GET_BSS_NUM(pmpriv), pmpriv->bss_type); + memcpy(pmadapter, pmevbuf->pbuf + pmevbuf->data_offset, + &new_event_cause, sizeof(new_event_cause)); + ret = MLAN_STATUS_SUCCESS; + } + break; + } + + LEAVE(); + return ret; +} + +/** + * @brief try to switch to a non-dfs channel + * + * @param priv Void pointer to mlan_private + * + * @param chan pointer to channel + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE or MLAN_STATUS_PENDING + */ +mlan_status +wlan_11h_switch_non_dfs_chan(mlan_private *priv, t_u8 *chan) +{ + mlan_status ret = MLAN_STATUS_FAILURE; + t_u32 i; + t_u32 rand_entry; + t_u8 def_chan; + t_u8 rand_tries = 0; + region_chan_t *chn_tbl = MNULL; + pmlan_adapter pmadapter = priv->adapter; + + ENTER(); + +#ifdef DFS_TESTING_SUPPORT + if (!pmadapter->dfs_test_params.no_channel_change_on_radar && + pmadapter->dfs_test_params.fixed_new_channel_on_radar) { + PRINTM(MCMD_D, "dfs_testing - user fixed new_chan=%d\n", + pmadapter->dfs_test_params.fixed_new_channel_on_radar); + *chan = pmadapter->dfs_test_params.fixed_new_channel_on_radar; + + LEAVE(); + return MLAN_STATUS_SUCCESS; + } +#endif + + /* get the channel table first */ + for (i = 0; i < MAX_REGION_CHANNEL_NUM; i++) { + if (pmadapter->region_channel[i].band == BAND_A + && pmadapter->region_channel[i].valid) { + chn_tbl = &pmadapter->region_channel[i]; + break; + } + } + + if (!chn_tbl || !chn_tbl->pcfp) + goto done; + + do { + rand_entry = + wlan_11h_get_random_num(pmadapter) % chn_tbl->num_cfp; + def_chan = (t_u8)chn_tbl->pcfp[rand_entry].channel; + rand_tries++; + } while ((wlan_11h_is_channel_under_nop(pmadapter, def_chan) || + chn_tbl->pcfp[rand_entry].passive_scan_or_radar_detect == + MTRUE) && (rand_tries < MAX_SWITCH_CHANNEL_RETRIES)); + + /* meet max retries, use the lowest non-dfs channel */ + if (rand_tries == MAX_SWITCH_CHANNEL_RETRIES) { + for (i = 0; i < chn_tbl->num_cfp; i++) { + if (chn_tbl->pcfp[i].passive_scan_or_radar_detect == + MFALSE && + !wlan_11h_is_channel_under_nop(pmadapter, + (t_u8)chn_tbl-> + pcfp[i].channel)) { + def_chan = (t_u8)chn_tbl->pcfp[i].channel; + break; + } + } + if (i == chn_tbl->num_cfp) + goto done; + } + + *chan = def_chan; + ret = MLAN_STATUS_SUCCESS; +done: + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11h.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11h.h new file mode 100644 index 00000000..005f8b19 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11h.h @@ -0,0 +1,170 @@ +/** @file mlan_11h.h + * + * @brief This header file contains data structures and + * function declarations of 802.11h + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/************************************************************* +Change Log: + 03/26/2009: initial creation +*************************************************************/ + +#ifndef _MLAN_11H_ +#define _MLAN_11H_ + +/** 11H OID bitmasks */ +#define ENABLE_11H_MASK MBIT(0) +#define MASTER_RADAR_DET_MASK MBIT(1) +#define SLAVE_RADAR_DET_MASK MBIT(2) + +/** DFS Master Radar Detect global enable */ +#define DFS_MASTER_RADAR_DETECT_EN (MTRUE) +/** DFS Slave Radar Detect global enable */ +#define DFS_SLAVE_RADAR_DETECT_EN (MFALSE) + +/** + * 11H APIs + */ + +/* Is master radar detection enabled in firmware? */ +extern t_bool wlan_11h_is_master_radar_det_active(mlan_private *priv); + +/** Configure master radar detection. + * Need call wlan_11h_check_update_radar_det_state() after. + */ +extern mlan_status wlan_11h_config_master_radar_det(mlan_private *priv, + t_bool enable); + +/** Configure slave radar detection. + * Need call wlan_11h_check_update_radar_det_state() after. + */ +extern mlan_status wlan_11h_config_slave_radar_det(mlan_private *priv, + t_bool enable); + +/** Checks all interfaces and updates radar detect flags if necessary */ +extern mlan_status wlan_11h_check_update_radar_det_state(mlan_private *pmpriv); + +/** Return 1 if 11h is active in the firmware, 0 if it is inactive */ +extern t_bool wlan_11h_is_active(mlan_private *priv); + +/** Enable the tx interface and record the new transmit state */ +extern void wlan_11h_tx_enable(mlan_private *priv); + +/** Disable the tx interface and record the new transmit state */ +extern void wlan_11h_tx_disable(mlan_private *priv); + +/** Activate 11h extensions in the firmware */ +extern mlan_status wlan_11h_activate(mlan_private *priv, t_void *pioctl_buf, + t_bool flag); + +/** Initialize the 11h device structure */ +extern void wlan_11h_init(mlan_adapter *pmadapter); + +/** Cleanup for the 11h device structure */ +extern void wlan_11h_cleanup(mlan_adapter *pmadapter); + +/** Initialize the 11h interface structure */ +extern void wlan_11h_priv_init(mlan_private *pmpriv); + +/** Get an initial random channel to start an adhoc network on */ +extern t_u8 wlan_11h_get_adhoc_start_channel(mlan_private *priv); + +/** Get channel that has been closed via Channel Switch Announcement */ +extern t_u8 wlan_11h_get_csa_closed_channel(mlan_private *priv); + +/** Check if radar detection is required on the specified channel */ +extern t_bool wlan_11h_radar_detect_required(mlan_private *priv, t_u8 channel); + +/** Perform a standard availibility check on the specified channel */ +extern t_s32 wlan_11h_issue_radar_detect(mlan_private *priv, + pmlan_ioctl_req pioctl_req, + t_u8 channel, t_u8 chan_width); + +/** Check previously issued radar report for a channel */ +extern mlan_status wlan_11h_check_chan_report(mlan_private *priv, t_u8 chan); + +/** Add any 11h TLVs necessary to complete an adhoc start command */ +extern t_s32 wlan_11h_process_start(mlan_private *priv, + t_u8 **ppbuffer, + IEEEtypes_CapInfo_t *pcap_info, + t_u32 channel, + wlan_11h_bss_info_t *p11h_bss_info); + +/** Add any 11h TLVs necessary to complete a join command (adhoc or infra) */ +extern t_s32 wlan_11h_process_join(mlan_private *priv, + t_u8 **ppbuffer, + IEEEtypes_CapInfo_t *pcap_info, + t_u8 band, + t_u32 channel, + wlan_11h_bss_info_t *p11h_bss_info); + +/** Complete the firmware command preparation for an 11h command function */ +extern mlan_status wlan_11h_cmd_process(mlan_private *priv, + HostCmd_DS_COMMAND *pcmd_ptr, + const t_void *pinfo_buf); + +/** Process the response of an 11h firmware command */ +extern mlan_status wlan_11h_cmdresp_process(mlan_private *priv, + const HostCmd_DS_COMMAND *resp); + +/** Receive IEs from scan processing and record any needed info for 11h */ +extern mlan_status wlan_11h_process_bss_elem(mlan_adapter *pmadapter, + wlan_11h_bss_info_t *p11h_bss_info, + const t_u8 *pelement); + +/** Handler for EVENT_CHANNEL_SWITCH_ANN */ +extern mlan_status wlan_11h_handle_event_chanswann(mlan_private *priv); + +/** Handler for EVENT_CHANNEL_REPORT_RDY */ +extern mlan_status wlan_11h_handle_event_chanrpt_ready(mlan_private *priv, + mlan_event *pevent); + +#ifdef DFS_TESTING_SUPPORT +/** Handler for DFS_TESTING IOCTL */ +extern mlan_status wlan_11h_ioctl_dfs_testing(pmlan_adapter pmadapter, + pmlan_ioctl_req pioctl_req); +#endif + +extern mlan_status + +wlan_11h_ioctl_dfs_cancel_chan_report(mlan_private *priv, + pmlan_ioctl_req pioctl_req); + +/** Check if channel is under a NOP duration (should not be used) */ +extern t_bool wlan_11h_is_channel_under_nop(mlan_adapter *pmadapter, + t_u8 channel); + +/** Check if RADAR_DETECTED handling is blocking data tx */ +extern t_bool wlan_11h_radar_detected_tx_blocked(mlan_adapter *pmadapter); + +/** Callback for RADAR_DETECTED (for UAP cmdresp) */ +extern mlan_status wlan_11h_radar_detected_callback(t_void *priv); + +/** Handler for RADAR_DETECTED */ +extern mlan_status wlan_11h_radar_detected_handling(mlan_adapter *pmadapter); +/** DFS Event pre-processing */ +extern mlan_status wlan_11h_dfs_event_preprocessing(mlan_adapter *pmadapter); + +/** DFS switch to non-DFS channel */ +extern mlan_status wlan_11h_switch_non_dfs_chan(mlan_private *priv, t_u8 *chan); + +/** function checks if interface is active. **/ +extern t_bool wlan_is_intf_active(mlan_private *pmpriv); + +#endif /*_MLAN_11H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11n.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11n.c new file mode 100644 index 00000000..f5170b5b --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11n.c @@ -0,0 +1,2983 @@ +/** @file mlan_11n.c + * + * @brief This file contains functions for 11n handling. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/******************************************************** +Change log: + 11/10/2008: initial version +********************************************************/ + +#include "mlan.h" +#include "mlan_join.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_wmm.h" +#include "mlan_11n.h" + +/******************************************************** + Local Variables +********************************************************/ + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ + +/** + * + * @brief set/get max tx buf size + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_11n_ioctl_max_tx_buf_size(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_11n_cfg *cfg = MNULL; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) { + if (cfg->param.tx_buf_size == 0xffff) { + PRINTM(MIOCTL, "Send reconfigure tx buf to FW\n"); + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_RECONFIGURE_TX_BUFF, + HostCmd_ACT_GEN_SET, 0, + (t_void *)pioctl_req, + &cfg->param.tx_buf_size); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + LEAVE(); + return ret; + } + } + cfg->param.tx_buf_size = (t_u32)pmadapter->max_tx_buf_size; + pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; + + LEAVE(); + return ret; +} + +/** + * @brief Set/get htcapinfo configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_11n_ioctl_htusrcfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_11n_cfg *cfg = MNULL; + + ENTER(); + + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_SET) { + if (((cfg->param.htcap_cfg.htcap & ~IGN_HW_DEV_CAP) & + pmpriv->adapter->hw_dot_11n_dev_cap) + != (cfg->param.htcap_cfg.htcap & ~IGN_HW_DEV_CAP)) { + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + } else { + if (cfg->param.htcap_cfg.misc_cfg == BAND_SELECT_BG) { + pmpriv->usr_dot_11n_dev_cap_bg = + cfg->param.htcap_cfg.htcap; + PRINTM(MINFO, + "Set: UsrDot11nCap for 2.4GHz 0x%x\n", + pmpriv->usr_dot_11n_dev_cap_bg); + } + if (cfg->param.htcap_cfg.misc_cfg == BAND_SELECT_A) { + pmpriv->usr_dot_11n_dev_cap_a = + cfg->param.htcap_cfg.htcap; + PRINTM(MINFO, + "Set: UsrDot11nCap for 5GHz 0x%x\n", + pmpriv->usr_dot_11n_dev_cap_a); + } + if (cfg->param.htcap_cfg.misc_cfg == BAND_SELECT_BOTH) { + pmpriv->usr_dot_11n_dev_cap_bg = + cfg->param.htcap_cfg.htcap; + pmpriv->usr_dot_11n_dev_cap_a = + cfg->param.htcap_cfg.htcap; + PRINTM(MINFO, + "Set: UsrDot11nCap for 2.4GHz and 5GHz 0x%x\n", + cfg->param.htcap_cfg.htcap); + } + } + } else { + /* Hardware 11N device capability required */ + if (cfg->param.htcap_cfg.hw_cap_req) + cfg->param.htcap_cfg.htcap = + pmadapter->hw_dot_11n_dev_cap; + else { + if (cfg->param.htcap_cfg.misc_cfg == BAND_SELECT_BG) { + cfg->param.htcap_cfg.htcap = + pmpriv->usr_dot_11n_dev_cap_bg; + PRINTM(MINFO, + "Get: UsrDot11nCap for 2.4GHz 0x%x\n", + cfg->param.htcap_cfg.htcap); + } + if (cfg->param.htcap_cfg.misc_cfg == BAND_SELECT_A) { + cfg->param.htcap_cfg.htcap = + pmpriv->usr_dot_11n_dev_cap_a; + PRINTM(MINFO, + "Get: UsrDot11nCap for 5GHz 0x%x\n", + cfg->param.htcap_cfg.htcap); + } + } + } + + LEAVE(); + return ret; +} + +/** + * @brief Enable/Disable AMSDU AGGR CTRL + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_11n_ioctl_amsdu_aggr_ctrl(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_11n_cfg *cfg = MNULL; + t_u16 cmd_action = 0; + + ENTER(); + + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_AMSDU_AGGR_CTRL, + cmd_action, + 0, + (t_void *)pioctl_req, + (t_void *)&cfg->param.amsdu_aggr_ctrl); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set/get 11n configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_11n_ioctl_httxcfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_11n_cfg *cfg = MNULL; + t_u16 cmd_action = 0; + + ENTER(); + + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_11N_CFG, + cmd_action, + 0, + (t_void *)pioctl_req, + (t_void *)&cfg->param.tx_cfg); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set/get TX beamforming capabilities + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_11n_ioctl_tx_bf_cap(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_11n_cfg *cfg = MNULL; + + ENTER(); + + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) + pmpriv->tx_bf_cap = cfg->param.tx_bf_cap; + else + cfg->param.tx_bf_cap = pmpriv->tx_bf_cap; + + LEAVE(); + return ret; +} + +/** + * @brief Set/get TX beamforming configurations + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_11n_ioctl_tx_bf_cfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_11n_cfg *cfg = MNULL; + t_u16 cmd_action = 0; + + ENTER(); + + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_TX_BF_CFG, + cmd_action, + 0, + (t_void *)pioctl_req, + (t_void *)&cfg->param.tx_bf); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set/get HT stream configurations + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_11n_ioctl_stream_cfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_11n_cfg *cfg = MNULL; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) { + cfg->param.stream_cfg = pmpriv->usr_dev_mcs_support; + } else if (pioctl_req->action == MLAN_ACT_SET) { + switch (cfg->param.stream_cfg) { + case HT_STREAM_MODE_2X2: + if (pmadapter->hw_dev_mcs_support == HT_STREAM_MODE_1X1) { + PRINTM(MERROR, + "HW does not support this mode\n"); + ret = MLAN_STATUS_FAILURE; + } else + pmpriv->usr_dev_mcs_support = + cfg->param.stream_cfg; + break; + case HT_STREAM_MODE_1X1: + pmpriv->usr_dev_mcs_support = cfg->param.stream_cfg; + break; + default: + PRINTM(MERROR, "Invalid stream mode\n"); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + break; + } + } + + LEAVE(); + return ret; +} + +/** + * @brief Set/get control to coex RX window size configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_11n_ioctl_coex_rx_winsize(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_11n_cfg *cfg = MNULL; + + ENTER(); + + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) + cfg->param.coex_rx_winsize = pmadapter->coex_rx_winsize; + else if (pioctl_req->action == MLAN_ACT_SET) + pmadapter->coex_rx_winsize = (t_u8)cfg->param.coex_rx_winsize; + + LEAVE(); + return ret; +} + +/** + * @brief This function will send delba request to + * the peer in the TxBAStreamTbl + * + * @param priv A pointer to mlan_private + * @param ra MAC Address to send DELBA + * + * @return N/A + */ +void +wlan_11n_send_delba_to_peer(mlan_private *priv, t_u8 *ra) +{ + + TxBAStreamTbl *ptx_tbl; + + ENTER(); + + ptx_tbl = (TxBAStreamTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); + if (!ptx_tbl) { + LEAVE(); + return; + } + + while (ptx_tbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { + if (!memcmp + (priv->adapter, ptx_tbl->ra, ra, MLAN_MAC_ADDR_LENGTH)) { + PRINTM(MIOCTL, "Tx:Send delba to tid=%d, " MACSTR "\n", + ptx_tbl->tid, MAC2STR(ptx_tbl->ra)); + wlan_send_delba(priv, MNULL, ptx_tbl->tid, ptx_tbl->ra, + 1); + } + ptx_tbl = ptx_tbl->pnext; + } + /* Signal MOAL to trigger mlan_main_process */ + wlan_recv_event(priv, MLAN_EVENT_ID_DRV_DEFER_HANDLING, MNULL); + LEAVE(); + return; +} + +/** + * @brief Set/Get control to TX AMPDU configuration on infra link + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_11n_ioctl_txaggrctrl(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_11n_cfg *cfg = MNULL; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) + cfg->param.txaggrctrl = pmpriv->txaggrctrl; + else if (pioctl_req->action == MLAN_ACT_SET) + pmpriv->txaggrctrl = (t_u8)cfg->param.txaggrctrl; + + if (pmpriv->media_connected == MTRUE) { + if (pioctl_req->action == MLAN_ACT_SET + && !pmpriv->txaggrctrl + && pmpriv->adapter->tdls_status != TDLS_NOT_SETUP) + wlan_11n_send_delba_to_peer(pmpriv, + pmpriv->curr_bss_params. + bss_descriptor.mac_address); + } + LEAVE(); + return ret; +} + +/** + * @brief This function will resend addba request to all + * the peer in the TxBAStreamTbl + * + * @param priv A pointer to mlan_private + * + * @return N/A + */ +static void +wlan_11n_update_addba_request(mlan_private *priv) +{ + + TxBAStreamTbl *ptx_tbl; + + ENTER(); + + ptx_tbl = (TxBAStreamTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); + if (!ptx_tbl) { + LEAVE(); + return; + } + + while (ptx_tbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { + wlan_send_addba(priv, ptx_tbl->tid, ptx_tbl->ra); + ptx_tbl = ptx_tbl->pnext; + } + /* Signal MOAL to trigger mlan_main_process */ + wlan_recv_event(priv, MLAN_EVENT_ID_DRV_DEFER_HANDLING, MNULL); + LEAVE(); + return; +} + +/** + * @brief Set/get addba parameter + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_11n_ioctl_addba_param(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_11n_cfg *cfg = MNULL; + t_u32 timeout; + + ENTER(); + + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) { + cfg->param.addba_param.timeout = pmpriv->add_ba_param.timeout; + cfg->param.addba_param.txwinsize = + pmpriv->add_ba_param.tx_win_size; + cfg->param.addba_param.rxwinsize = + pmpriv->add_ba_param.rx_win_size; + cfg->param.addba_param.txamsdu = pmpriv->add_ba_param.tx_amsdu; + cfg->param.addba_param.rxamsdu = pmpriv->add_ba_param.rx_amsdu; + } else { + timeout = pmpriv->add_ba_param.timeout; + pmpriv->add_ba_param.timeout = cfg->param.addba_param.timeout; + pmpriv->add_ba_param.tx_win_size = + cfg->param.addba_param.txwinsize; + pmpriv->add_ba_param.rx_win_size = + cfg->param.addba_param.rxwinsize; + pmpriv->add_ba_param.tx_amsdu = cfg->param.addba_param.txamsdu; + pmpriv->add_ba_param.rx_amsdu = cfg->param.addba_param.rxamsdu; + if (timeout != pmpriv->add_ba_param.timeout) + wlan_11n_update_addba_request(pmpriv); + } + + LEAVE(); + return ret; +} + +/** + * @brief This function send delba to specific tid + * + * @param priv A pointer to mlan_priv + * @param tid tid + * @return N/A + */ +void +wlan_11n_delba(mlan_private *priv, int tid) +{ + RxReorderTbl *rx_reor_tbl_ptr; + + ENTER(); + + rx_reor_tbl_ptr = + (RxReorderTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->rx_reorder_tbl_ptr, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); + if (!rx_reor_tbl_ptr) { + LEAVE(); + return; + } + + while (rx_reor_tbl_ptr != (RxReorderTbl *)&priv->rx_reorder_tbl_ptr) { + if (rx_reor_tbl_ptr->tid == tid) { + PRINTM(MIOCTL, "Send delba to tid=%d, " MACSTR "\n", + tid, MAC2STR(rx_reor_tbl_ptr->ta)); + wlan_send_delba(priv, MNULL, tid, rx_reor_tbl_ptr->ta, + 0); + LEAVE(); + return; + } + rx_reor_tbl_ptr = rx_reor_tbl_ptr->pnext; + } + + LEAVE(); + return; +} + +/** + * @brief Set/get addba reject set + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_11n_ioctl_addba_reject(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + int i = 0; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_11n_cfg *cfg = MNULL; + + ENTER(); + + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_GET) { + PRINTM(MINFO, "Get Addba reject\n"); + memcpy(pmadapter, cfg->param.addba_reject, pmpriv->addba_reject, + MAX_NUM_TID); + } else { + for (i = 0; i < MAX_NUM_TID; i++) { + /* For AMPDU */ + if (cfg->param.addba_reject[i] > + ADDBA_RSP_STATUS_REJECT) { + pioctl_req->status_code = + MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + break; + } + + pmpriv->addba_reject[i] = cfg->param.addba_reject[i]; + } + if (pmpriv->media_connected == MTRUE) { + for (i = 0; i < MAX_NUM_TID; i++) { + if (cfg->param.addba_reject[i] == + ADDBA_RSP_STATUS_REJECT) { + PRINTM(MIOCTL, + "Receive addba reject: tid=%d\n", + i); + wlan_11n_delba(pmpriv, i); + } + } + wlan_recv_event(pmpriv, + MLAN_EVENT_ID_DRV_DEFER_HANDLING, + MNULL); + } + } + + LEAVE(); + return ret; +} + +/** + * @brief This function will send DELBA to entries in the priv's + * Tx BA stream table + * + * @param priv A pointer to mlan_private + * @param pioctl_req A pointer to ioctl request buffer + * @param tid TID + * @param peer_address A pointer to peer address + * @param last_tx_ba_to_delete A pointer to the last entry in TxBAStreamTbl + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_PENDING + */ +static mlan_status +wlan_send_delba_to_entry_in_txbastream_tbl(pmlan_private priv, + pmlan_ioctl_req pioctl_req, t_u8 tid, + t_u8 *peer_address, + TxBAStreamTbl *last_tx_ba_to_delete) +{ + pmlan_adapter pmadapter = priv->adapter; + TxBAStreamTbl *tx_ba_stream_tbl_ptr; + t_u8 zero_mac[MLAN_MAC_ADDR_LENGTH] = { 0 }; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + tx_ba_stream_tbl_ptr = + (TxBAStreamTbl *)util_peek_list(pmadapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + if (!tx_ba_stream_tbl_ptr) { + LEAVE(); + return ret; + } + + while (tx_ba_stream_tbl_ptr != + (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { + if (tx_ba_stream_tbl_ptr->ba_status == BA_STREAM_SETUP_COMPLETE) { + if (((tid == DELBA_ALL_TIDS) || + (tid == tx_ba_stream_tbl_ptr->tid)) && + (!memcmp + (pmadapter, peer_address, zero_mac, + MLAN_MAC_ADDR_LENGTH) || + !memcmp(pmadapter, peer_address, + tx_ba_stream_tbl_ptr->ra, + MLAN_MAC_ADDR_LENGTH))) { + if (last_tx_ba_to_delete && + (tx_ba_stream_tbl_ptr == + last_tx_ba_to_delete)) + ret = wlan_send_delba(priv, pioctl_req, + tx_ba_stream_tbl_ptr-> + tid, + tx_ba_stream_tbl_ptr-> + ra, 1); + else + ret = wlan_send_delba(priv, MNULL, + tx_ba_stream_tbl_ptr-> + tid, + tx_ba_stream_tbl_ptr-> + ra, 1); + } + } + tx_ba_stream_tbl_ptr = tx_ba_stream_tbl_ptr->pnext; + } + + LEAVE(); + return ret; +} + +/** + * @brief This function will send DELBA to entries in the priv's + * rx reordering table + * + * @param priv A pointer to mlan_private + * @param pioctl_req A pointer to ioctl request buffer + * @param tid TID + * @param peer_address A pointer to peer address + * @param last_rx_ba_to_delete A pointer to the last entry in RxReorderTbl + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_PENDING + */ +static mlan_status +wlan_send_delba_to_entry_in_reorder_tbl(pmlan_private priv, + pmlan_ioctl_req pioctl_req, t_u8 tid, + t_u8 *peer_address, + RxReorderTbl *last_rx_ba_to_delete) +{ + pmlan_adapter pmadapter = priv->adapter; + RxReorderTbl *rx_reor_tbl_ptr; + t_u8 zero_mac[MLAN_MAC_ADDR_LENGTH] = { 0 }; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + rx_reor_tbl_ptr = + (RxReorderTbl *)util_peek_list(pmadapter->pmoal_handle, + &priv->rx_reorder_tbl_ptr, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + if (!rx_reor_tbl_ptr) { + LEAVE(); + return ret; + } + + while (rx_reor_tbl_ptr != (RxReorderTbl *)&priv->rx_reorder_tbl_ptr) { + if (rx_reor_tbl_ptr->ba_status == BA_STREAM_SETUP_COMPLETE) { + if (((tid == DELBA_ALL_TIDS) || + (tid == rx_reor_tbl_ptr->tid)) && + (!memcmp + (pmadapter, peer_address, zero_mac, + MLAN_MAC_ADDR_LENGTH) || + !memcmp(pmadapter, peer_address, + rx_reor_tbl_ptr->ta, + MLAN_MAC_ADDR_LENGTH))) { + if (last_rx_ba_to_delete && + (rx_reor_tbl_ptr == last_rx_ba_to_delete)) + ret = wlan_send_delba(priv, pioctl_req, + rx_reor_tbl_ptr-> + tid, + rx_reor_tbl_ptr-> + ta, 0); + else + ret = wlan_send_delba(priv, MNULL, + rx_reor_tbl_ptr-> + tid, + rx_reor_tbl_ptr-> + ta, 0); + } + } + rx_reor_tbl_ptr = rx_reor_tbl_ptr->pnext; + } + + LEAVE(); + return ret; +} + +/** + * @brief IOCTL to delete BA + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_11n_ioctl_delba(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_11n_cfg *cfg = MNULL; + TxBAStreamTbl *tx_ba_stream_tbl_ptr, *last_tx_ba_to_delete = MNULL; + RxReorderTbl *rx_reor_tbl_ptr, *last_rx_ba_to_delete = MNULL; + t_u8 zero_mac[MLAN_MAC_ADDR_LENGTH] = { 0 }; + t_u8 tid, *peer_address; + + ENTER(); + + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; + tid = cfg->param.del_ba.tid; + peer_address = cfg->param.del_ba.peer_mac_addr; + + PRINTM(MINFO, "DelBA: direction %d, TID %d, peer address " MACSTR "\n", + cfg->param.del_ba.direction, tid, MAC2STR(peer_address)); + + if (cfg->param.del_ba.direction & DELBA_RX) { + rx_reor_tbl_ptr = + (RxReorderTbl *)util_peek_list(pmadapter->pmoal_handle, + &pmpriv-> + rx_reorder_tbl_ptr, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + + if (rx_reor_tbl_ptr) { + while (rx_reor_tbl_ptr != + (RxReorderTbl *)&pmpriv->rx_reorder_tbl_ptr) { + if (rx_reor_tbl_ptr->ba_status == + BA_STREAM_SETUP_COMPLETE) { + if (((tid == DELBA_ALL_TIDS) || + (tid == rx_reor_tbl_ptr->tid)) && + (!memcmp + (pmadapter, peer_address, zero_mac, + MLAN_MAC_ADDR_LENGTH) || + !memcmp(pmadapter, peer_address, + rx_reor_tbl_ptr->ta, + MLAN_MAC_ADDR_LENGTH))) { + /* Found RX BA to delete */ + last_rx_ba_to_delete = + rx_reor_tbl_ptr; + } + } + rx_reor_tbl_ptr = rx_reor_tbl_ptr->pnext; + } + } + } + + if ((last_rx_ba_to_delete == MNULL) && + (cfg->param.del_ba.direction & DELBA_TX)) { + tx_ba_stream_tbl_ptr = + (TxBAStreamTbl *)util_peek_list(pmadapter->pmoal_handle, + &pmpriv-> + tx_ba_stream_tbl_ptr, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + + if (tx_ba_stream_tbl_ptr) { + while (tx_ba_stream_tbl_ptr != + (TxBAStreamTbl *)&pmpriv->tx_ba_stream_tbl_ptr) { + if (tx_ba_stream_tbl_ptr->ba_status == + BA_STREAM_SETUP_COMPLETE) { + if (((tid == DELBA_ALL_TIDS) || + (tid == tx_ba_stream_tbl_ptr->tid)) + && + (!memcmp + (pmadapter, peer_address, zero_mac, + MLAN_MAC_ADDR_LENGTH) || + !memcmp(pmadapter, peer_address, + tx_ba_stream_tbl_ptr->ra, + MLAN_MAC_ADDR_LENGTH))) { + /* Found TX BA to delete */ + last_tx_ba_to_delete = + tx_ba_stream_tbl_ptr; + } + } + tx_ba_stream_tbl_ptr = + tx_ba_stream_tbl_ptr->pnext; + } + } + } + + if (cfg->param.del_ba.direction & DELBA_TX) { + if (last_rx_ba_to_delete) + ret = wlan_send_delba_to_entry_in_txbastream_tbl(pmpriv, + MNULL, + tid, + peer_address, + MNULL); + else + ret = wlan_send_delba_to_entry_in_txbastream_tbl(pmpriv, + pioctl_req, + tid, + peer_address, + last_tx_ba_to_delete); + } + if (last_rx_ba_to_delete) { + ret = wlan_send_delba_to_entry_in_reorder_tbl(pmpriv, + pioctl_req, tid, + peer_address, + last_rx_ba_to_delete); + } + + LEAVE(); + return ret; +} + +/** + * @brief IOCTL to reject addba req + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_11n_ioctl_rejectaddbareq(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_11n_cfg *cfg = MNULL; + t_u16 cmd_action = 0; + + ENTER(); + + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + + /* Send command to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_REJECT_ADDBA_REQ, + cmd_action, + 0, + (t_void *)pioctl_req, + &cfg->param.reject_addba_req); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief This function will send DELBA to entries in the priv's + * Tx BA stream table + * + * @param priv A pointer to mlan_private + * @param tid TID + * + * @return N/A + */ +static void +wlan_send_delba_txbastream_tbl(pmlan_private priv, t_u8 tid) +{ + pmlan_adapter pmadapter = priv->adapter; + TxBAStreamTbl *tx_ba_stream_tbl_ptr; + + ENTER(); + + tx_ba_stream_tbl_ptr = + (TxBAStreamTbl *)util_peek_list(pmadapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + if (!tx_ba_stream_tbl_ptr) { + LEAVE(); + return; + } + + while (tx_ba_stream_tbl_ptr != + (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { + if (tx_ba_stream_tbl_ptr->ba_status == BA_STREAM_SETUP_COMPLETE) { + if (tid == tx_ba_stream_tbl_ptr->tid) { + PRINTM(MIOCTL, + "Tx:Send delba to tid=%d, " MACSTR "\n", + tid, MAC2STR(tx_ba_stream_tbl_ptr->ra)); + wlan_send_delba(priv, MNULL, + tx_ba_stream_tbl_ptr->tid, + tx_ba_stream_tbl_ptr->ra, 1); + LEAVE(); + return; + } + } + tx_ba_stream_tbl_ptr = tx_ba_stream_tbl_ptr->pnext; + } + + LEAVE(); + return; +} + +/** + * @brief Set/get aggr_prio_tbl + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_11n_ioctl_aggr_prio_tbl(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + int i = 0; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_11n_cfg *cfg = MNULL; + + ENTER(); + + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_GET) { + for (i = 0; i < MAX_NUM_TID; i++) { + cfg->param.aggr_prio_tbl.ampdu[i] = + pmpriv->aggr_prio_tbl[i].ampdu_user; + cfg->param.aggr_prio_tbl.amsdu[i] = + pmpriv->aggr_prio_tbl[i].amsdu; + } + } else { + for (i = 0; i < MAX_NUM_TID; i++) { + /* For AMPDU */ + if ((cfg->param.aggr_prio_tbl.ampdu[i] > + HIGH_PRIO_TID)&&(cfg->param.aggr_prio_tbl. + ampdu[i] != + BA_STREAM_NOT_ALLOWED)) { + pioctl_req->status_code = + MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + break; + } + + pmpriv->aggr_prio_tbl[i].ampdu_ap = + pmpriv->aggr_prio_tbl[i].ampdu_user = + cfg->param.aggr_prio_tbl.ampdu[i]; + + /* For AMSDU */ + if ((cfg->param.aggr_prio_tbl.amsdu[i] > HIGH_PRIO_TID + && cfg->param.aggr_prio_tbl.amsdu[i] != + BA_STREAM_NOT_ALLOWED)) { + pioctl_req->status_code = + MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + break; + } else { + pmpriv->aggr_prio_tbl[i].amsdu = + cfg->param.aggr_prio_tbl.amsdu[i]; + } + } + if (pmpriv->media_connected == MTRUE) { + for (i = 0; i < MAX_NUM_TID; i++) { + if (cfg->param.aggr_prio_tbl.ampdu[i] == + BA_STREAM_NOT_ALLOWED) { + PRINTM(MIOCTL, + "Receive aggrpriotbl: BA not allowed tid=%d\n", + i); + wlan_send_delba_txbastream_tbl(pmpriv, + i); + } + } + wlan_recv_event(pmpriv, + MLAN_EVENT_ID_DRV_DEFER_HANDLING, + MNULL); + } + } + + LEAVE(); + return ret; +} + +/** + * @brief This function update all the tx_win_size + * + * @param pmadapter A pointer to mlan_adapter + * + * + * @return N/A + */ +void +wlan_update_ampdu_txwinsize(pmlan_adapter pmadapter) +{ + t_u8 i; + t_u32 tx_win_size = 0; + pmlan_private priv = MNULL; + + ENTER(); + + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) { + priv = pmadapter->priv[i]; + tx_win_size = priv->add_ba_param.tx_win_size; +#ifdef STA_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_STA) + priv->add_ba_param.tx_win_size = + MLAN_STA_AMPDU_DEF_TXWINSIZE; +#endif +#ifdef WIFI_DIRECT_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) + priv->add_ba_param.tx_win_size = + MLAN_WFD_AMPDU_DEF_TXRXWINSIZE; +#endif +#ifdef UAP_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_UAP) + priv->add_ba_param.tx_win_size = + MLAN_UAP_AMPDU_DEF_TXWINSIZE; +#endif + if (pmadapter->coex_win_size && + pmadapter->coex_tx_win_size) + priv->add_ba_param.tx_win_size = + pmadapter->coex_tx_win_size; + + if (tx_win_size != priv->add_ba_param.tx_win_size) { + if (priv->media_connected == MTRUE) { + for (i = 0; i < MAX_NUM_TID; i++) + wlan_send_delba_txbastream_tbl + (priv, i); + wlan_recv_event(priv, + MLAN_EVENT_ID_DRV_DEFER_HANDLING, + MNULL); + } + } + } + } + LEAVE(); + return; +} + +/** + * @brief Get supported MCS set + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_11n_ioctl_supported_mcs_set(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_ds_11n_cfg *cfg = MNULL; + int rx_mcs_supp; + t_u8 mcs_set[NUM_MCS_FIELD]; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + if (pioctl_req->action == MLAN_ACT_SET) { + PRINTM(MERROR, "Set operation is not supported\n"); + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + rx_mcs_supp = GET_RXMCSSUPP(pmpriv->usr_dev_mcs_support); + /* Set MCS for 1x1/2x2 */ + memset(pmadapter, (t_u8 *)mcs_set, 0xff, rx_mcs_supp); + /* Clear all the other values */ + memset(pmadapter, (t_u8 *)&mcs_set[rx_mcs_supp], 0, + NUM_MCS_FIELD - rx_mcs_supp); + /* Set MCS32 with 40MHz support */ + if (ISSUPP_CHANWIDTH40(pmpriv->usr_dot_11n_dev_cap_bg) + || ISSUPP_CHANWIDTH40(pmpriv->usr_dot_11n_dev_cap_a) + ) + SETHT_MCS32(mcs_set); + + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; + memcpy(pmadapter, cfg->param.supported_mcs_set, mcs_set, NUM_MCS_FIELD); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function checks if the given pointer is valid entry of + * Tx BA Stream table + * + * @param priv Pointer to mlan_private + * @param ptxtblptr Pointer to tx ba stream entry + * + * @return MTRUE or MFALSE + */ +static int +wlan_is_txbastreamptr_valid(mlan_private *priv, TxBAStreamTbl *ptxtblptr) +{ + TxBAStreamTbl *ptx_tbl; + + ENTER(); + + ptx_tbl = (TxBAStreamTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + MNULL, MNULL); + if (!ptx_tbl) { + LEAVE(); + return MFALSE; + } + + while (ptx_tbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { + if (ptx_tbl == ptxtblptr) { + LEAVE(); + return MTRUE; + } + + ptx_tbl = ptx_tbl->pnext; + } + + LEAVE(); + return MFALSE; +} + +/** + * @brief This function will return the pointer to a entry in BA Stream + * table which matches the ba_status requested + * + * @param priv A pointer to mlan_private + * @param ba_status Current status of the BA stream + * + * @return A pointer to first entry matching status in BA stream + * NULL if not found + */ +static TxBAStreamTbl * +wlan_11n_get_txbastream_status(mlan_private *priv, baStatus_e ba_status) +{ + TxBAStreamTbl *ptx_tbl; + + ENTER(); + + ptx_tbl = (TxBAStreamTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); + if (!ptx_tbl) { + LEAVE(); + return MNULL; + } + + while (ptx_tbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { + if (ptx_tbl->ba_status == ba_status) { + LEAVE(); + return ptx_tbl; + } + + ptx_tbl = ptx_tbl->pnext; + } + + LEAVE(); + return MNULL; +} + +/******************************************************** + Global Functions +********************************************************/ + +#ifdef STA_SUPPORT +/** + * @brief This function fills the cap info + * + * @param priv A pointer to mlan_private structure + * @param pht_cap A pointer to MrvlIETypes_HTCap_t structure + * @param bands Band configuration + * + * @return N/A + */ +static void +wlan_fill_cap_info(mlan_private *priv, HTCap_t *ht_cap, t_u8 bands) +{ + t_u32 usr_dot_11n_dev_cap; + + ENTER(); + + if (bands & BAND_A) + usr_dot_11n_dev_cap = priv->usr_dot_11n_dev_cap_a; + else + usr_dot_11n_dev_cap = priv->usr_dot_11n_dev_cap_bg; + + if (ISSUPP_CHANWIDTH40(usr_dot_11n_dev_cap)) + SETHT_SUPPCHANWIDTH(ht_cap->ht_cap_info); + else + RESETHT_SUPPCHANWIDTH(ht_cap->ht_cap_info); + + if (ISSUPP_GREENFIELD(usr_dot_11n_dev_cap)) + SETHT_GREENFIELD(ht_cap->ht_cap_info); + else + RESETHT_GREENFIELD(ht_cap->ht_cap_info); + + if (ISSUPP_SHORTGI20(usr_dot_11n_dev_cap)) + SETHT_SHORTGI20(ht_cap->ht_cap_info); + else + RESETHT_SHORTGI20(ht_cap->ht_cap_info); + + if (ISSUPP_SHORTGI40(usr_dot_11n_dev_cap)) + SETHT_SHORTGI40(ht_cap->ht_cap_info); + else + RESETHT_SHORTGI40(ht_cap->ht_cap_info); + + if (ISSUPP_RXSTBC(usr_dot_11n_dev_cap)) + SETHT_RXSTBC(ht_cap->ht_cap_info, 1); + else + RESETHT_RXSTBC(ht_cap->ht_cap_info); + + if (ISENABLED_40MHZ_INTOLARENT(usr_dot_11n_dev_cap)) + SETHT_40MHZ_INTOLARANT(ht_cap->ht_cap_info); + else + RESETHT_40MHZ_INTOLARANT(ht_cap->ht_cap_info); + + /* No user config for LDPC coding capability yet */ + if (ISSUPP_RXLDPC(usr_dot_11n_dev_cap)) + SETHT_LDPCCODINGCAP(ht_cap->ht_cap_info); + else + RESETHT_LDPCCODINGCAP(ht_cap->ht_cap_info); + + /* No user config for TX STBC yet */ + if (ISSUPP_TXSTBC(usr_dot_11n_dev_cap)) + SETHT_TXSTBC(ht_cap->ht_cap_info); + else + RESETHT_TXSTBC(ht_cap->ht_cap_info); + + /* No user config for Delayed BACK yet */ + if (priv->adapter->psdio_device->v15_fw_api) { + RESETHT_DELAYEDBACK(ht_cap->ht_cap_info); + } else { + if (GET_DELAYEDBACK(priv->adapter->hw_dot_11n_dev_cap)) + SETHT_DELAYEDBACK(ht_cap->ht_cap_info); + else + RESETHT_DELAYEDBACK(ht_cap->ht_cap_info); + } + + /* Need change to support 8k AMSDU receive */ + RESETHT_MAXAMSDU(ht_cap->ht_cap_info); + + LEAVE(); +} + +/** + * @brief This function fills the HT cap tlv + * + * @param priv A pointer to mlan_private structure + * @param pht_cap A pointer to MrvlIETypes_HTCap_t structure + * @param bands Band configuration + * + * @return N/A + */ +void +wlan_fill_ht_cap_tlv(mlan_private *priv, + MrvlIETypes_HTCap_t *pht_cap, t_u8 bands) +{ + mlan_adapter *pmadapter = priv->adapter; + int rx_mcs_supp; + t_u32 usr_dot_11n_dev_cap; + + ENTER(); + + if (bands & BAND_A) + usr_dot_11n_dev_cap = priv->usr_dot_11n_dev_cap_a; + else + usr_dot_11n_dev_cap = priv->usr_dot_11n_dev_cap_bg; + + /* Fill HT cap info */ + wlan_fill_cap_info(priv, &pht_cap->ht_cap, bands); + pht_cap->ht_cap.ht_cap_info = + wlan_cpu_to_le16(pht_cap->ht_cap.ht_cap_info); + + /* Set ampdu param */ + SETAMPDU_SIZE(pht_cap->ht_cap.ampdu_param, AMPDU_FACTOR_64K); + SETAMPDU_SPACING(pht_cap->ht_cap.ampdu_param, 0); + + rx_mcs_supp = GET_RXMCSSUPP(priv->usr_dev_mcs_support); + /* Clear all the other values to get the minimum mcs set btw STA and AP + */ + memset(pmadapter, + (t_u8 *)&pht_cap->ht_cap.supported_mcs_set[rx_mcs_supp], 0, + NUM_MCS_FIELD - rx_mcs_supp); + /* Set MCS32 with 40MHz support */ + if (ISSUPP_CHANWIDTH40(usr_dot_11n_dev_cap)) + SETHT_MCS32(pht_cap->ht_cap.supported_mcs_set); + + /* Clear RD responder bit */ + RESETHT_EXTCAP_RDG(pht_cap->ht_cap.ht_ext_cap); + pht_cap->ht_cap.ht_ext_cap = + wlan_cpu_to_le16(pht_cap->ht_cap.ht_ext_cap); + + /* Set Tx BF cap */ + pht_cap->ht_cap.tx_bf_cap = wlan_cpu_to_le32(priv->tx_bf_cap); + + LEAVE(); + return; +} + +/** + * @brief This function fills the HT cap ie + * + * @param priv A pointer to mlan_private structure + * @param pht_cap A pointer to IEEEtypes_HTCap_t structure + * @param bands Band configuration + * + * @return N/A + */ +void +wlan_fill_ht_cap_ie(mlan_private *priv, IEEEtypes_HTCap_t *pht_cap, t_u8 bands) +{ + mlan_adapter *pmadapter = priv->adapter; + int rx_mcs_supp; + t_u32 usr_dot_11n_dev_cap; + + ENTER(); + + pht_cap->ieee_hdr.element_id = HT_CAPABILITY; + pht_cap->ieee_hdr.len = sizeof(HTCap_t); + if (bands & BAND_A) + usr_dot_11n_dev_cap = priv->usr_dot_11n_dev_cap_a; + else + usr_dot_11n_dev_cap = priv->usr_dot_11n_dev_cap_bg; + + /* Fill HT cap info */ + wlan_fill_cap_info(priv, &pht_cap->ht_cap, bands); + + /* Set ampdu param */ + SETAMPDU_SIZE(pht_cap->ht_cap.ampdu_param, AMPDU_FACTOR_64K); + SETAMPDU_SPACING(pht_cap->ht_cap.ampdu_param, 0); + + rx_mcs_supp = GET_RXMCSSUPP(priv->usr_dev_mcs_support); + memset(pmadapter, (t_u8 *)pht_cap->ht_cap.supported_mcs_set, 0xff, + rx_mcs_supp); + /* Clear all the other values to get the minimum mcs set btw STA and AP + */ + memset(pmadapter, + (t_u8 *)&pht_cap->ht_cap.supported_mcs_set[rx_mcs_supp], 0, + NUM_MCS_FIELD - rx_mcs_supp); + /* Set MCS32 with 40MHz support */ + if (ISSUPP_CHANWIDTH40(usr_dot_11n_dev_cap)) + SETHT_MCS32(pht_cap->ht_cap.supported_mcs_set); + + /* Clear RD responder bit */ + RESETHT_EXTCAP_RDG(pht_cap->ht_cap.ht_ext_cap); + + /* Set Tx BF cap */ + pht_cap->ht_cap.tx_bf_cap = priv->tx_bf_cap; + + LEAVE(); + return; +} +#endif /* STA_SUPPORT */ + +/** + * @brief This function prints the 802.11n device capability + * + * @param pmadapter A pointer to mlan_adapter structure + * @param cap Capability value + * + * @return N/A + */ +void +wlan_show_dot11ndevcap(pmlan_adapter pmadapter, t_u32 cap) +{ + ENTER(); + + PRINTM(MINFO, "GET_HW_SPEC: Maximum MSDU length = %s octets\n", + (ISSUPP_MAXAMSDU(cap) ? "7935" : "3839")); + PRINTM(MINFO, "GET_HW_SPEC: Beam forming %s\n", + (ISSUPP_BEAMFORMING(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: Greenfield preamble %s\n", + (ISSUPP_GREENFIELD(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: AMPDU %s\n", + (ISSUPP_AMPDU(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: MIMO Power Save %s\n", + (ISSUPP_MIMOPS(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: Rx STBC %s\n", + (ISSUPP_RXSTBC(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: Tx STBC %s\n", + (ISSUPP_TXSTBC(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: Short GI for 40 Mhz %s\n", + (ISSUPP_SHORTGI40(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: Short GI for 20 Mhz %s\n", + (ISSUPP_SHORTGI20(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: LDPC coded packet receive %s\n", + (ISSUPP_RXLDPC(cap) ? "supported" : "not supported")); + + if (pmadapter->psdio_device->v15_fw_api) { + PRINTM(MINFO, + "GET_HW_SPEC: Number of Tx BA streams supported = %d\n", + ISSUPP_GETTXBASTREAM(cap)); + } else { + PRINTM(MINFO, + "GET_HW_SPEC: Number of Delayed Block Ack streams = %d\n", + GET_DELAYEDBACK(cap)); + PRINTM(MINFO, + "GET_HW_SPEC: Number of Immediate Block Ack streams = %d\n", + GET_IMMEDIATEBACK(cap)); + } + PRINTM(MINFO, "GET_HW_SPEC: 40 Mhz channel width %s\n", + (ISSUPP_CHANWIDTH40(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: 20 Mhz channel width %s\n", + (ISSUPP_CHANWIDTH20(cap) ? "supported" : "not supported")); + PRINTM(MINFO, "GET_HW_SPEC: 10 Mhz channel width %s\n", + (ISSUPP_CHANWIDTH10(cap) ? "supported" : "not supported")); + + if (ISSUPP_RXANTENNAA(cap)) + PRINTM(MINFO, "GET_HW_SPEC: Presence of Rx antenna A\n"); + if (ISSUPP_RXANTENNAB(cap)) + PRINTM(MINFO, "GET_HW_SPEC: Presence of Rx antenna B\n"); + if (ISSUPP_RXANTENNAC(cap)) + PRINTM(MINFO, "GET_HW_SPEC: Presence of Rx antenna C\n"); + if (ISSUPP_RXANTENNAD(cap)) + PRINTM(MINFO, "GET_HW_SPEC: Presence of Rx antenna D\n"); + if (ISSUPP_TXANTENNAA(cap)) + PRINTM(MINFO, "GET_HW_SPEC: Presence of Tx antenna A\n"); + if (ISSUPP_TXANTENNAB(cap)) + PRINTM(MINFO, "GET_HW_SPEC: Presence of Tx antenna B\n"); + if (ISSUPP_TXANTENNAC(cap)) + PRINTM(MINFO, "GET_HW_SPEC: Presence of Tx antenna C\n"); + if (ISSUPP_TXANTENNAD(cap)) + PRINTM(MINFO, "GET_HW_SPEC: Presence of Tx antenna D\n"); + + LEAVE(); + return; +} + +/** + * @brief This function prints the 802.11n device MCS + * + * @param pmadapter A pointer to mlan_adapter structure + * @param support Support value + * + * @return N/A + */ +void +wlan_show_devmcssupport(pmlan_adapter pmadapter, t_u8 support) +{ + ENTER(); + + PRINTM(MINFO, "GET_HW_SPEC: MCSs for %dx%d MIMO\n", + GET_RXMCSSUPP(support), GET_TXMCSSUPP(support)); + + LEAVE(); + return; +} + +/** + * @brief This function handles the command response of + * delete a block ack request + * + * @param priv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_11n_delba(mlan_private *priv, HostCmd_DS_COMMAND *resp) +{ + int tid; + TxBAStreamTbl *ptx_ba_tbl; + HostCmd_DS_11N_DELBA *pdel_ba = + (HostCmd_DS_11N_DELBA *)&resp->params.del_ba; + + ENTER(); + + pdel_ba->del_ba_param_set = wlan_le16_to_cpu(pdel_ba->del_ba_param_set); + pdel_ba->reason_code = wlan_le16_to_cpu(pdel_ba->reason_code); + + tid = pdel_ba->del_ba_param_set >> DELBA_TID_POS; + if (pdel_ba->del_result == BA_RESULT_SUCCESS) { + mlan_11n_delete_bastream_tbl(priv, tid, pdel_ba->peer_mac_addr, + TYPE_DELBA_SENT, + INITIATOR_BIT(pdel_ba-> + del_ba_param_set)); + + ptx_ba_tbl = wlan_11n_get_txbastream_status(priv, + BA_STREAM_SETUP_INPROGRESS); + if (ptx_ba_tbl) + wlan_send_addba(priv, ptx_ba_tbl->tid, ptx_ba_tbl->ra); + } else { /* + * In case of failure, recreate + * the deleted stream in case + * we initiated the ADDBA + */ + if (INITIATOR_BIT(pdel_ba->del_ba_param_set)) { + if (!wlan_11n_get_txbastream_tbl + (priv, tid, pdel_ba->peer_mac_addr)) + wlan_11n_create_txbastream_tbl(priv, + pdel_ba-> + peer_mac_addr, + tid, + BA_STREAM_SETUP_INPROGRESS); + ptx_ba_tbl = + wlan_11n_get_txbastream_status(priv, + BA_STREAM_SETUP_INPROGRESS); + if (ptx_ba_tbl) { + mlan_11n_delete_bastream_tbl(priv, + ptx_ba_tbl->tid, + ptx_ba_tbl->ra, + TYPE_DELBA_SENT, + MTRUE); + } + } + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of + * add a block ack request + * + * @param priv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_11n_addba_req(mlan_private *priv, HostCmd_DS_COMMAND *resp) +{ + t_u8 tid; + HostCmd_DS_11N_ADDBA_RSP *padd_ba_rsp = + (HostCmd_DS_11N_ADDBA_RSP *)&resp->params.add_ba_rsp; + TxBAStreamTbl *ptx_ba_tbl; + raListTbl *ra_list = MNULL; + int tid_down; + + ENTER(); + + padd_ba_rsp->block_ack_param_set = + wlan_le16_to_cpu(padd_ba_rsp->block_ack_param_set); + padd_ba_rsp->block_ack_tmo = + wlan_le16_to_cpu(padd_ba_rsp->block_ack_tmo); + padd_ba_rsp->ssn = (wlan_le16_to_cpu(padd_ba_rsp->ssn)) & SSN_MASK; + padd_ba_rsp->status_code = wlan_le16_to_cpu(padd_ba_rsp->status_code); + + tid = (padd_ba_rsp->block_ack_param_set & BLOCKACKPARAM_TID_MASK) + >> BLOCKACKPARAM_TID_POS; + tid_down = wlan_get_wmm_tid_down(priv, tid); + ra_list = + wlan_wmm_get_ralist_node(priv, tid_down, + padd_ba_rsp->peer_mac_addr); + if (padd_ba_rsp->status_code == BA_RESULT_SUCCESS) { + ptx_ba_tbl = wlan_11n_get_txbastream_tbl(priv, tid, + padd_ba_rsp-> + peer_mac_addr); + if (ptx_ba_tbl) { + PRINTM(MCMND, + "ADDBA REQ: " MACSTR + " tid=%d ssn=%d win_size=%d,amsdu=%d\n", + MAC2STR(padd_ba_rsp->peer_mac_addr), tid, + padd_ba_rsp->ssn, + ((padd_ba_rsp-> + block_ack_param_set & + BLOCKACKPARAM_WINSIZE_MASK) >> + BLOCKACKPARAM_WINSIZE_POS), + padd_ba_rsp-> + block_ack_param_set & + BLOCKACKPARAM_AMSDU_SUPP_MASK); + ptx_ba_tbl->ba_status = BA_STREAM_SETUP_COMPLETE; + if ((padd_ba_rsp-> + block_ack_param_set & + BLOCKACKPARAM_AMSDU_SUPP_MASK) && + priv->add_ba_param.tx_amsdu && + (priv->aggr_prio_tbl[tid].amsdu != + BA_STREAM_NOT_ALLOWED)) + ptx_ba_tbl->amsdu = MTRUE; + else + ptx_ba_tbl->amsdu = MFALSE; + if (ra_list) { + ra_list->amsdu_in_ampdu = ptx_ba_tbl->amsdu; + ra_list->ba_status = BA_STREAM_SETUP_COMPLETE; + } + } else { + PRINTM(MERROR, "BA stream not created\n"); + } + } else { + if (ra_list) { + ra_list->amsdu_in_ampdu = MFALSE; + ra_list->ba_status = BA_STREAM_NOT_SETUP; + } + mlan_11n_delete_bastream_tbl(priv, tid, + padd_ba_rsp->peer_mac_addr, + TYPE_DELBA_SENT, MTRUE); + if (padd_ba_rsp->add_rsp_result != BA_RESULT_TIMEOUT) { +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) + disable_station_ampdu(priv, tid, + padd_ba_rsp-> + peer_mac_addr); +#endif /* UAP_SUPPORT */ + priv->aggr_prio_tbl[tid].ampdu_ap = + BA_STREAM_NOT_ALLOWED; + + } else { + /* reset packet threshold */ + ra_list = + wlan_wmm_get_ralist_node(priv, tid, + padd_ba_rsp-> + peer_mac_addr); + if (ra_list) { + ra_list->packet_count = 0; + ra_list->ba_packet_threshold = + wlan_get_random_ba_threshold(priv-> + adapter); + } + } + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of reconfigure tx buf + * + * @param priv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_recfg_tx_buf(mlan_private *priv, + HostCmd_DS_COMMAND *cmd, int cmd_action, void *pdata_buf) +{ + HostCmd_DS_TXBUF_CFG *ptx_buf = &cmd->params.tx_buf; + t_u16 action = (t_u16)cmd_action; + t_u16 buf_size = *((t_u16 *)pdata_buf); + + ENTER(); + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_RECONFIGURE_TX_BUFF); + cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_TXBUF_CFG) + + S_DS_GEN); + ptx_buf->action = wlan_cpu_to_le16(action); + switch (action) { + case HostCmd_ACT_GEN_SET: + PRINTM(MCMND, "set tx_buf = %d\n", buf_size); + ptx_buf->buff_size = wlan_cpu_to_le16(buf_size); + break; + case HostCmd_ACT_GEN_GET: + default: + ptx_buf->buff_size = 0; + break; + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of amsdu aggr control + * + * @param priv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_amsdu_aggr_ctrl(mlan_private *priv, + HostCmd_DS_COMMAND *cmd, + int cmd_action, void *pdata_buf) +{ + HostCmd_DS_AMSDU_AGGR_CTRL *pamsdu_ctrl = &cmd->params.amsdu_aggr_ctrl; + t_u16 action = (t_u16)cmd_action; + mlan_ds_11n_amsdu_aggr_ctrl *aa_ctrl = (mlan_ds_11n_amsdu_aggr_ctrl *) + pdata_buf; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_AMSDU_AGGR_CTRL); + cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_AMSDU_AGGR_CTRL) + + S_DS_GEN); + pamsdu_ctrl->action = wlan_cpu_to_le16(action); + switch (action) { + case HostCmd_ACT_GEN_SET: + pamsdu_ctrl->enable = wlan_cpu_to_le16(aa_ctrl->enable); + pamsdu_ctrl->curr_buf_size = 0; + break; + case HostCmd_ACT_GEN_GET: + default: + pamsdu_ctrl->curr_buf_size = 0; + break; + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of amsdu aggr ctrl + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_amsdu_aggr_ctrl(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_11n_cfg *cfg = MNULL; + HostCmd_DS_AMSDU_AGGR_CTRL *amsdu_ctrl = &resp->params.amsdu_aggr_ctrl; + + ENTER(); + + if (pioctl_buf) { + cfg = (mlan_ds_11n_cfg *)pioctl_buf->pbuf; + cfg->param.amsdu_aggr_ctrl.enable = + wlan_le16_to_cpu(amsdu_ctrl->enable); + cfg->param.amsdu_aggr_ctrl.curr_buf_size = + wlan_le16_to_cpu(amsdu_ctrl->curr_buf_size); + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares 11n cfg command + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action the action: GET or SET + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_11n_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + HostCmd_DS_11N_CFG *htcfg = &cmd->params.htcfg; + mlan_ds_11n_tx_cfg *txcfg = (mlan_ds_11n_tx_cfg *)pdata_buf; + + ENTER(); + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_11N_CFG); + cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_11N_CFG) + S_DS_GEN); + htcfg->action = wlan_cpu_to_le16(cmd_action); + htcfg->ht_tx_cap = wlan_cpu_to_le16(txcfg->httxcap); + htcfg->ht_tx_info = wlan_cpu_to_le16(txcfg->httxinfo); + htcfg->misc_config = wlan_cpu_to_le16(txcfg->misc_cfg); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of 11ncfg + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_11n_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_11n_cfg *cfg = MNULL; + HostCmd_DS_11N_CFG *htcfg = &resp->params.htcfg; + + ENTER(); + if (pioctl_buf && + (wlan_le16_to_cpu(htcfg->action) == HostCmd_ACT_GEN_GET)) { + cfg = (mlan_ds_11n_cfg *)pioctl_buf->pbuf; + cfg->param.tx_cfg.httxcap = wlan_le16_to_cpu(htcfg->ht_tx_cap); + cfg->param.tx_cfg.httxinfo = + wlan_le16_to_cpu(htcfg->ht_tx_info); + cfg->param.tx_cfg.misc_cfg = + wlan_le16_to_cpu(htcfg->misc_config); + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares reject addba req command + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action the action: GET or SET + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_reject_addba_req(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + HostCmd_DS_REJECT_ADDBA_REQ *preject_addba_req = + &cmd->params.rejectaddbareq; + mlan_ds_reject_addba_req *prejaddbareq = + (mlan_ds_reject_addba_req *)pdata_buf; + + ENTER(); + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_REJECT_ADDBA_REQ); + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_REJECT_ADDBA_REQ) + + S_DS_GEN); + preject_addba_req->action = wlan_cpu_to_le16(cmd_action); + preject_addba_req->conditions = + wlan_cpu_to_le32(prejaddbareq->conditions); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of reject addba req + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_reject_addba_req(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_11n_cfg *cfg = MNULL; + HostCmd_DS_REJECT_ADDBA_REQ *preject_addba_req = + &resp->params.rejectaddbareq; + + ENTER(); + if (pioctl_buf && + (wlan_le16_to_cpu(preject_addba_req->action) == + HostCmd_ACT_GEN_GET)) { + cfg = (mlan_ds_11n_cfg *)pioctl_buf->pbuf; + cfg->param.reject_addba_req.conditions = + wlan_le32_to_cpu(preject_addba_req->conditions); + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares TX BF configuration command + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_cmd_tx_bf_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + pmlan_adapter pmadapter = pmpriv->adapter; + HostCmd_DS_TX_BF_CFG *txbfcfg = &cmd->params.tx_bf_cfg; + mlan_ds_11n_tx_bf_cfg *txbf = (mlan_ds_11n_tx_bf_cfg *)pdata_buf; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_TX_BF_CFG); + cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_TX_BF_CFG) + S_DS_GEN); + + if (txbf->bf_action == SET_GET_BF_PERIODICITY) { + memcpy(pmadapter, txbfcfg->body.bf_periodicity.peer_mac, + txbf->body.bf_periodicity[0].peer_mac, + MLAN_MAC_ADDR_LENGTH); + } + txbfcfg->action = wlan_cpu_to_le16(txbf->action); + txbfcfg->bf_action = wlan_cpu_to_le16(txbf->bf_action); + if (cmd_action == HostCmd_ACT_GEN_SET) { + switch (txbf->bf_action) { + case BF_GLOBAL_CONFIGURATION: + txbfcfg->body.bf_global_cfg.bf_enbl = + txbf->body.bf_global_cfg.bf_enbl; + txbfcfg->body.bf_global_cfg.sounding_enbl = + txbf->body.bf_global_cfg.sounding_enbl; + txbfcfg->body.bf_global_cfg.fb_type = + txbf->body.bf_global_cfg.fb_type; + txbfcfg->body.bf_global_cfg.snr_threshold = + txbf->body.bf_global_cfg.snr_threshold; + txbfcfg->body.bf_global_cfg.sounding_interval = + wlan_cpu_to_le16(txbf->body.bf_global_cfg. + sounding_interval); + txbfcfg->body.bf_global_cfg.bf_mode = + txbf->body.bf_global_cfg.bf_mode; + break; + case TRIGGER_SOUNDING_FOR_PEER: + memcpy(pmadapter, txbfcfg->body.bf_sound_args.peer_mac, + txbf->body.bf_sound[0].peer_mac, + MLAN_MAC_ADDR_LENGTH); + break; + case SET_GET_BF_PERIODICITY: + txbfcfg->body.bf_periodicity.interval = + wlan_cpu_to_le16(txbf->body.bf_periodicity-> + interval); + break; + case TX_BF_FOR_PEER_ENBL: + memcpy(pmadapter, txbfcfg->body.tx_bf_peer.peer_mac, + txbf->body.tx_bf_peer[0].peer_mac, + MLAN_MAC_ADDR_LENGTH); + txbfcfg->body.tx_bf_peer.bf_enbl = + txbf->body.tx_bf_peer[0].bf_enbl; + txbfcfg->body.tx_bf_peer.sounding_enbl = + txbf->body.tx_bf_peer[0].sounding_enbl; + txbfcfg->body.tx_bf_peer.fb_type = + txbf->body.tx_bf_peer[0].fb_type; + break; + case SET_SNR_THR_PEER: + memcpy(pmadapter, txbfcfg->body.bf_snr.peer_mac, + txbf->body.bf_snr[0].peer_mac, + MLAN_MAC_ADDR_LENGTH); + txbfcfg->body.bf_snr.snr = txbf->body.bf_snr[0].snr; + break; + default: + LEAVE(); + return MLAN_STATUS_FAILURE; + } + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response + * of TX BF configuration + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ret_tx_bf_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) +{ + pmlan_adapter pmadapter = pmpriv->adapter; + HostCmd_DS_TX_BF_CFG *txbfcfg = &resp->params.tx_bf_cfg; + mlan_ds_11n_cfg *cfg_11n = MNULL; + mlan_ds_11n_tx_bf_cfg *txbf = MNULL; + bf_peer_args *tx_bf_peer; + bf_snr_thr_t *bf_snr; + int i; + + ENTER(); + + if (pioctl_buf) { + cfg_11n = (mlan_ds_11n_cfg *)pioctl_buf->pbuf; + txbf = (mlan_ds_11n_tx_bf_cfg *)&cfg_11n->param.tx_bf; + txbf->bf_action = wlan_le16_to_cpu(txbfcfg->bf_action); + switch (txbf->bf_action) { + case BF_GLOBAL_CONFIGURATION: + txbf->body.bf_global_cfg.bf_enbl = + txbfcfg->body.bf_global_cfg.bf_enbl; + txbf->body.bf_global_cfg.sounding_enbl = + txbfcfg->body.bf_global_cfg.sounding_enbl; + txbf->body.bf_global_cfg.fb_type = + txbfcfg->body.bf_global_cfg.fb_type; + txbf->body.bf_global_cfg.snr_threshold = + txbfcfg->body.bf_global_cfg.snr_threshold; + txbf->body.bf_global_cfg.sounding_interval = + wlan_le16_to_cpu(txbfcfg->body.bf_global_cfg. + sounding_interval); + txbf->body.bf_global_cfg.bf_mode = + txbfcfg->body.bf_global_cfg.bf_mode; + break; + case TRIGGER_SOUNDING_FOR_PEER: + memcpy(pmadapter, txbf->body.bf_sound[0].peer_mac, + txbfcfg->body.bf_sound_args.peer_mac, + MLAN_MAC_ADDR_LENGTH); + txbf->body.bf_sound[0].status = + txbfcfg->body.bf_sound_args.status; + break; + case SET_GET_BF_PERIODICITY: + memcpy(pmadapter, txbf->body.bf_periodicity->peer_mac, + txbfcfg->body.bf_periodicity.peer_mac, + MLAN_MAC_ADDR_LENGTH); + txbf->body.bf_periodicity->interval = + wlan_le16_to_cpu(txbfcfg->body.bf_periodicity. + interval); + break; + case TX_BF_FOR_PEER_ENBL: + txbf->no_of_peers = *(t_u8 *)&txbfcfg->body; + tx_bf_peer = + (bf_peer_args *)((t_u8 *)&txbfcfg->body + + sizeof(t_u8)); + for (i = 0; i < txbf->no_of_peers; i++) { + memcpy(pmadapter, + txbf->body.tx_bf_peer[i].peer_mac, + (t_u8 *)tx_bf_peer->peer_mac, + MLAN_MAC_ADDR_LENGTH); + txbf->body.tx_bf_peer[i].bf_enbl = + tx_bf_peer->bf_enbl; + txbf->body.tx_bf_peer[i].sounding_enbl = + tx_bf_peer->sounding_enbl; + txbf->body.tx_bf_peer[i].fb_type = + tx_bf_peer->fb_type; + tx_bf_peer++; + } + break; + case SET_SNR_THR_PEER: + txbf->no_of_peers = *(t_u8 *)&txbfcfg->body; + bf_snr = (bf_snr_thr_t *)((t_u8 *)&txbfcfg->body + + sizeof(t_u8)); + for (i = 0; i < txbf->no_of_peers; i++) { + memcpy(pmadapter, txbf->body.bf_snr[i].peer_mac, + (t_u8 *)bf_snr->peer_mac, + MLAN_MAC_ADDR_LENGTH); + txbf->body.bf_snr[i].snr = bf_snr->snr; + bf_snr++; + } + break; + default: + LEAVE(); + return MLAN_STATUS_FAILURE; + } + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Get second channel offset + * + * @param chan channel num + * @return second channel offset + */ +t_u8 +wlan_get_second_channel_offset(int chan) +{ + t_u8 chan2Offset = SEC_CHAN_NONE; + + switch (chan) { + case 36: + case 44: + case 52: + case 60: + case 100: + case 108: + case 116: + case 124: + case 132: + case 140: + case 149: + case 157: + chan2Offset = SEC_CHAN_ABOVE; + break; + case 40: + case 48: + case 56: + case 64: + case 104: + case 112: + case 120: + case 128: + case 136: + case 144: + case 153: + case 161: + chan2Offset = SEC_CHAN_BELOW; + break; + case 165: + /* Special Case: 20Mhz-only Channel */ + chan2Offset = SEC_CHAN_NONE; + break; + } + return chan2Offset; +} + +#ifdef STA_SUPPORT +/** + * @brief validate the channel offset for Infra/Ad-hoc band configuration + * + * @param pmpriv A pointer to mlan_private structure + * @param band band + * @param chan primary channel + * @param chan_bw channel bandwidth + * + * @return channel offset (NO_SEC_CHANNEL, SEC_CHANNEL_ABOVE, + * SEC_CHANNEL_BELOW) + */ +t_u8 +wlan_validate_chan_offset(IN mlan_private *pmpriv, + IN t_u8 band, IN t_u32 chan, IN t_u8 chan_bw) +{ + t_u8 chan_offset; + pmlan_adapter pmadapter = pmpriv->adapter; + + if (chan_bw == CHANNEL_BW_40MHZ_ABOVE) + chan_offset = SEC_CHANNEL_ABOVE; + else if (chan_bw == CHANNEL_BW_40MHZ_BELOW) + chan_offset = SEC_CHANNEL_BELOW; + else + chan_offset = SEC_CHAN_NONE; + + /* validation */ + if (chan_offset != SEC_CHAN_NONE) { + if (band & BAND_GN) { + if ((chan == 1) || (chan == 2) || (chan == 3) || + (chan == 4)) + chan_offset = SEC_CHAN_ABOVE; + else if ((chan == 10) || (chan == 11) || + (chan == 12) || (chan == 13)) + chan_offset = SEC_CHAN_BELOW; + + /* check if channel 12 is supported in the region */ + if (!wlan_find_cfp_by_band_and_channel + (pmadapter, band, 12)) + if ((chan == 8) || (chan == 9)) + chan_offset = SEC_CHAN_BELOW; + } else if (band & BAND_AN) + chan_offset = wlan_get_second_channel_offset(chan); + } + return chan_offset; +} + +/** + * @brief This function check if ht40 is allowed in current region + * + * @param pmpriv A pointer to mlan_private structure + * @param pbss_desc A pointer to BSSDescriptor_t structure + * + * @return MTRUE/MFALSE + */ +static int +wlan_check_chan_width_ht40_by_region(IN mlan_private *pmpriv, + IN BSSDescriptor_t *pbss_desc) +{ + pmlan_adapter pmadapter = pmpriv->adapter; + int i = 0; + int cover_pri_chan = MFALSE; + t_u8 pri_chan; + t_u8 chan_offset; + t_u8 num_cfp; + + ENTER(); + + if (pbss_desc->pht_info == MNULL) { + PRINTM(MERROR, "ht_info pointer NULL, force use HT20\n"); + LEAVE(); + return MFALSE; + } + + pri_chan = pbss_desc->pht_info->ht_info.pri_chan; + chan_offset = GET_SECONDARYCHAN(pbss_desc->pht_info->ht_info.field2); + num_cfp = pmadapter->region_channel[0].num_cfp; + + if ((pbss_desc->bss_band & (BAND_B | BAND_G)) && + pmadapter->region_channel && pmadapter->region_channel[0].valid) { + for (i = 0; i < num_cfp; i++) { + if (pri_chan == + pmadapter->region_channel[0].pcfp[i].channel) { + cover_pri_chan = MTRUE; + break; + } + } + if (!cover_pri_chan) { + PRINTM(MERROR, "Invalid channel, force use HT20\n"); + LEAVE(); + return MFALSE; + } + + if (chan_offset == SEC_CHANNEL_ABOVE) { + if (pri_chan > num_cfp - 4) { + PRINTM(MERROR, + "Invalid second channel offset, force use HT20\n"); + LEAVE(); + return MFALSE; + } + } + } + LEAVE(); + return MTRUE; +} + +/** + * @brief This function append the 802_11N tlv + * + * @param pmpriv A pointer to mlan_private structure + * @param pbss_desc A pointer to BSSDescriptor_t structure + * @param ppbuffer A Pointer to command buffer pointer + * + * @return bytes added to the buffer + */ +int +wlan_cmd_append_11n_tlv(IN mlan_private *pmpriv, + IN BSSDescriptor_t *pbss_desc, OUT t_u8 **ppbuffer) +{ + pmlan_adapter pmadapter = pmpriv->adapter; + MrvlIETypes_HTCap_t *pht_cap; + MrvlIETypes_HTInfo_t *pht_info; + MrvlIEtypes_ChanListParamSet_t *pchan_list; + MrvlIETypes_2040BSSCo_t *p2040_bss_co; + MrvlIETypes_ExtCap_t *pext_cap; + t_u32 usr_dot_11n_dev_cap, orig_usr_dot_11n_dev_cap = 0; + t_u32 usr_vht_cap_info; + int ret_len = 0; + + ENTER(); + + /* Null Checks */ + if (ppbuffer == MNULL) { + LEAVE(); + return 0; + } + if (*ppbuffer == MNULL) { + LEAVE(); + return 0; + } + + if (pbss_desc->bss_band & BAND_A) + usr_dot_11n_dev_cap = pmpriv->usr_dot_11n_dev_cap_a; + else + usr_dot_11n_dev_cap = pmpriv->usr_dot_11n_dev_cap_bg; + + if (pbss_desc->bss_band & BAND_A) + usr_vht_cap_info = pmpriv->usr_dot_11ac_dev_cap_a; + else + usr_vht_cap_info = pmpriv->usr_dot_11ac_dev_cap_bg; + if ((pbss_desc->bss_band & (BAND_B | BAND_G)) && + ISSUPP_CHANWIDTH40(usr_dot_11n_dev_cap) && + !wlan_check_chan_width_ht40_by_region(pmpriv, pbss_desc)) { + orig_usr_dot_11n_dev_cap = usr_dot_11n_dev_cap; + RESETSUPP_CHANWIDTH40(usr_dot_11n_dev_cap); + RESET_40MHZ_INTOLARENT(usr_dot_11n_dev_cap); + RESETSUPP_SHORTGI40(usr_dot_11n_dev_cap); + pmpriv->usr_dot_11n_dev_cap_bg = usr_dot_11n_dev_cap; + } + if (pbss_desc->pht_cap) { + pht_cap = (MrvlIETypes_HTCap_t *)*ppbuffer; + memset(pmadapter, pht_cap, 0, sizeof(MrvlIETypes_HTCap_t)); + pht_cap->header.type = wlan_cpu_to_le16(HT_CAPABILITY); + pht_cap->header.len = sizeof(HTCap_t); + memcpy(pmadapter, (t_u8 *)pht_cap + sizeof(MrvlIEtypesHeader_t), + (t_u8 *)pbss_desc->pht_cap + sizeof(IEEEtypes_Header_t), + pht_cap->header.len); + + pht_cap->ht_cap.ht_cap_info = + wlan_le16_to_cpu(pht_cap->ht_cap.ht_cap_info); + pht_cap->ht_cap.ht_ext_cap = + wlan_le16_to_cpu(pht_cap->ht_cap.ht_ext_cap); + wlan_fill_ht_cap_tlv(pmpriv, pht_cap, pbss_desc->bss_band); + + HEXDUMP("HT_CAPABILITIES IE", (t_u8 *)pht_cap, + sizeof(MrvlIETypes_HTCap_t)); + *ppbuffer += sizeof(MrvlIETypes_HTCap_t); + ret_len += sizeof(MrvlIETypes_HTCap_t); + pht_cap->header.len = wlan_cpu_to_le16(pht_cap->header.len); + } + + if (pbss_desc->pht_info) { + if (pmpriv->bss_mode == MLAN_BSS_MODE_IBSS) { + pht_info = (MrvlIETypes_HTInfo_t *)*ppbuffer; + memset(pmadapter, pht_info, 0, + sizeof(MrvlIETypes_HTInfo_t)); + pht_info->header.type = wlan_cpu_to_le16(HT_OPERATION); + pht_info->header.len = sizeof(HTInfo_t); + + memcpy(pmadapter, + (t_u8 *)pht_info + sizeof(MrvlIEtypesHeader_t), + (t_u8 *)pbss_desc->pht_info + + sizeof(IEEEtypes_Header_t), + pht_info->header.len); + + if (!ISSUPP_CHANWIDTH40(usr_dot_11n_dev_cap)) + RESET_CHANWIDTH40(pht_info->ht_info.field2); + + *ppbuffer += sizeof(MrvlIETypes_HTInfo_t); + ret_len += sizeof(MrvlIETypes_HTInfo_t); + pht_info->header.len = + wlan_cpu_to_le16(pht_info->header.len); + } + + pchan_list = (MrvlIEtypes_ChanListParamSet_t *)*ppbuffer; + memset(pmadapter, pchan_list, 0, + sizeof(MrvlIEtypes_ChanListParamSet_t)); + pchan_list->header.type = wlan_cpu_to_le16(TLV_TYPE_CHANLIST); + pchan_list->header.len = + sizeof(MrvlIEtypes_ChanListParamSet_t) - + sizeof(MrvlIEtypesHeader_t); + pchan_list->chan_scan_param[0].chan_number = + pbss_desc->pht_info->ht_info.pri_chan; + pchan_list->chan_scan_param[0].radio_type = + wlan_band_to_radio_type((t_u8)pbss_desc->bss_band); + /* support the VHT if the network to be join has the VHT + operation */ + if (ISSUPP_11ACENABLED(pmadapter->fw_cap_info) && + pbss_desc->pvht_oprat && + pbss_desc->pvht_oprat->chan_width == VHT_OPER_CHWD_80MHZ) { + if ((pbss_desc->bss_band & BAND_GAC) + || (pbss_desc->bss_band & BAND_AAC) + ) + pchan_list->chan_scan_param[0].radio_type |= + CHAN_BW_80MHZ << 2; + } else if (ISSUPP_CHANWIDTH40(usr_dot_11n_dev_cap) && + ISALLOWED_CHANWIDTH40(pbss_desc->pht_info->ht_info. + field2) && + wlan_check_chan_width_ht40_by_region(pmpriv, + pbss_desc)) { + SET_SECONDARYCHAN(pchan_list->chan_scan_param[0]. + radio_type, + GET_SECONDARYCHAN(pbss_desc-> + pht_info->ht_info. + field2)); + if (pmpriv->adapter->psdio_device->v15_update) + pchan_list->chan_scan_param[0].radio_type |= + CHAN_BW_40MHZ << 2; + } + + HEXDUMP("ChanList", (t_u8 *)pchan_list, + sizeof(MrvlIEtypes_ChanListParamSet_t)); + HEXDUMP("pht_info", (t_u8 *)pbss_desc->pht_info, + sizeof(MrvlIETypes_HTInfo_t) - 2); + *ppbuffer += sizeof(MrvlIEtypes_ChanListParamSet_t); + ret_len += sizeof(MrvlIEtypes_ChanListParamSet_t); + pchan_list->header.len = + wlan_cpu_to_le16(pchan_list->header.len); + } + + if (pbss_desc->pbss_co_2040) { + p2040_bss_co = (MrvlIETypes_2040BSSCo_t *)*ppbuffer; + memset(pmadapter, p2040_bss_co, 0, + sizeof(MrvlIETypes_2040BSSCo_t)); + p2040_bss_co->header.type = wlan_cpu_to_le16(BSSCO_2040); + p2040_bss_co->header.len = sizeof(BSSCo2040_t); + + memcpy(pmadapter, + (t_u8 *)p2040_bss_co + sizeof(MrvlIEtypesHeader_t), + (t_u8 *)pbss_desc->pbss_co_2040 + + sizeof(IEEEtypes_Header_t), p2040_bss_co->header.len); + + HEXDUMP("20/40 BSS Coexistence IE", (t_u8 *)p2040_bss_co, + sizeof(MrvlIETypes_2040BSSCo_t)); + *ppbuffer += sizeof(MrvlIETypes_2040BSSCo_t); + ret_len += sizeof(MrvlIETypes_2040BSSCo_t); + p2040_bss_co->header.len = + wlan_cpu_to_le16(p2040_bss_co->header.len); + } + + if (pbss_desc->pext_cap) { + pext_cap = (MrvlIETypes_ExtCap_t *)*ppbuffer; + memset(pmadapter, pext_cap, 0, sizeof(MrvlIETypes_ExtCap_t)); + pext_cap->header.type = wlan_cpu_to_le16(EXT_CAPABILITY); + pext_cap->header.len = sizeof(ExtCap_t); + + memcpy(pmadapter, + (t_u8 *)pext_cap + sizeof(MrvlIEtypesHeader_t), + (t_u8 *)pbss_desc->pext_cap + sizeof(IEEEtypes_Header_t), + pbss_desc->pext_cap->ieee_hdr.len); + if (!ISSUPP_EXTCAP_TDLS(pmpriv->ext_cap)) + RESET_EXTCAP_TDLS(pext_cap->ext_cap); + if (!ISSUPP_EXTCAP_INTERWORKING(pmpriv->ext_cap)) + RESET_EXTCAP_INTERWORKING(pext_cap->ext_cap); + if (!ISSUPP_EXTCAP_OPERMODENTF(pmpriv->ext_cap)) + RESET_EXTCAP_OPERMODENTF(pext_cap->ext_cap); + HEXDUMP("Extended Capabilities IE", (t_u8 *)pext_cap, + sizeof(MrvlIETypes_ExtCap_t)); + *ppbuffer += sizeof(MrvlIETypes_ExtCap_t); + ret_len += sizeof(MrvlIETypes_ExtCap_t); + pext_cap->header.len = wlan_cpu_to_le16(pext_cap->header.len); + } else if (wlan_is_ext_capa_support(pmpriv) || + (pmpriv->config_bands & BAND_AAC) + ) { + wlan_add_ext_capa_info_ie(pmpriv, ppbuffer); + ret_len += sizeof(MrvlIETypes_ExtCap_t); + } + if (orig_usr_dot_11n_dev_cap) + pmpriv->usr_dot_11n_dev_cap_bg = orig_usr_dot_11n_dev_cap; + + LEAVE(); + return ret_len; +} + +#endif /* STA_SUPPORT */ + +/** + * @brief 11n configuration handler + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +mlan_status +wlan_11n_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_ds_11n_cfg *cfg = MNULL; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_11n_cfg)) { + PRINTM(MINFO, "MLAN bss IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_11n_cfg); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf; + switch (cfg->sub_command) { + case MLAN_OID_11N_CFG_TX: + status = wlan_11n_ioctl_httxcfg(pmadapter, pioctl_req); + break; + case MLAN_OID_11N_HTCAP_CFG: + status = wlan_11n_ioctl_htusrcfg(pmadapter, pioctl_req); + break; + case MLAN_OID_11N_CFG_AGGR_PRIO_TBL: + status = wlan_11n_ioctl_aggr_prio_tbl(pmadapter, pioctl_req); + break; + case MLAN_OID_11N_CFG_ADDBA_REJECT: + status = wlan_11n_ioctl_addba_reject(pmadapter, pioctl_req); + break; + case MLAN_OID_11N_CFG_ADDBA_PARAM: + status = wlan_11n_ioctl_addba_param(pmadapter, pioctl_req); + break; + case MLAN_OID_11N_CFG_DELBA: + status = wlan_11n_ioctl_delba(pmadapter, pioctl_req); + break; + case MLAN_OID_11N_CFG_REJECT_ADDBA_REQ: + status = wlan_11n_ioctl_rejectaddbareq(pmadapter, pioctl_req); + break; + case MLAN_OID_11N_CFG_MAX_TX_BUF_SIZE: + status = wlan_11n_ioctl_max_tx_buf_size(pmadapter, pioctl_req); + break; + case MLAN_OID_11N_CFG_AMSDU_AGGR_CTRL: + status = wlan_11n_ioctl_amsdu_aggr_ctrl(pmadapter, pioctl_req); + break; + case MLAN_OID_11N_CFG_SUPPORTED_MCS_SET: + status = wlan_11n_ioctl_supported_mcs_set(pmadapter, + pioctl_req); + break; + case MLAN_OID_11N_CFG_TX_BF_CAP: + status = wlan_11n_ioctl_tx_bf_cap(pmadapter, pioctl_req); + break; + case MLAN_OID_11N_CFG_TX_BF_CFG: + status = wlan_11n_ioctl_tx_bf_cfg(pmadapter, pioctl_req); + break; + case MLAN_OID_11N_CFG_STREAM_CFG: + status = wlan_11n_ioctl_stream_cfg(pmadapter, pioctl_req); + break; + case MLAN_OID_11N_CFG_COEX_RX_WINSIZE: + status = wlan_11n_ioctl_coex_rx_winsize(pmadapter, pioctl_req); + break; + case MLAN_OID_11N_CFG_TX_AGGR_CTRL: + status = wlan_11n_ioctl_txaggrctrl(pmadapter, pioctl_req); + break; + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + LEAVE(); + return status; +} + +/** + * @brief This function will delete the given entry in Tx BA Stream table + * + * @param priv Pointer to mlan_private + * @param ptx_tbl Pointer to tx ba stream entry to delete + * + * @return N/A + */ +void +wlan_11n_delete_txbastream_tbl_entry(mlan_private *priv, TxBAStreamTbl *ptx_tbl) +{ + pmlan_adapter pmadapter = priv->adapter; + + ENTER(); + + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + priv->tx_ba_stream_tbl_ptr.plock); + + if (!ptx_tbl || !wlan_is_txbastreamptr_valid(priv, ptx_tbl)) + goto exit; + + PRINTM(MINFO, "Delete BA stream table entry: %p\n", ptx_tbl); + + util_unlink_list(pmadapter->pmoal_handle, &priv->tx_ba_stream_tbl_ptr, + (pmlan_linked_list)ptx_tbl, MNULL, MNULL); + + pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)ptx_tbl); + +exit: + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->tx_ba_stream_tbl_ptr.plock); + LEAVE(); +} + +/** + * @brief This function will delete all the entries in Tx BA Stream table + * + * @param priv A pointer to mlan_private + * + * @return N/A + */ +void +wlan_11n_deleteall_txbastream_tbl(mlan_private *priv) +{ + int i; + TxBAStreamTbl *del_tbl_ptr = MNULL; + + ENTER(); + + while ((del_tbl_ptr = (TxBAStreamTbl *) + util_peek_list(priv->adapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + priv->adapter->callbacks.moal_spin_lock, + priv->adapter->callbacks.moal_spin_unlock))) { + wlan_11n_delete_txbastream_tbl_entry(priv, del_tbl_ptr); + } + + util_init_list((pmlan_linked_list)&priv->tx_ba_stream_tbl_ptr); + + for (i = 0; i < MAX_NUM_TID; ++i) { + priv->aggr_prio_tbl[i].ampdu_ap = + priv->aggr_prio_tbl[i].ampdu_user; + } + + LEAVE(); +} + +/** + * @brief This function will return the pointer to an entry in BA Stream + * table which matches the give RA/TID pair + * + * @param priv A pointer to mlan_private + * @param tid TID to find in reordering table + * @param ra RA to find in reordering table + * + * @return A pointer to first entry matching RA/TID in BA stream + * NULL if not found + */ +TxBAStreamTbl * +wlan_11n_get_txbastream_tbl(mlan_private *priv, int tid, t_u8 *ra) +{ + TxBAStreamTbl *ptx_tbl; + pmlan_adapter pmadapter = priv->adapter; + + ENTER(); + + ptx_tbl = (TxBAStreamTbl *)util_peek_list(pmadapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + if (!ptx_tbl) { + LEAVE(); + return MNULL; + } + + while (ptx_tbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { + + PRINTM(MDAT_D, "get_txbastream_tbl TID %d\n", ptx_tbl->tid); + DBG_HEXDUMP(MDAT_D, "RA", ptx_tbl->ra, MLAN_MAC_ADDR_LENGTH); + + if ((!memcmp(pmadapter, ptx_tbl->ra, ra, MLAN_MAC_ADDR_LENGTH)) + && (ptx_tbl->tid == tid)) { + LEAVE(); + return ptx_tbl; + } + + ptx_tbl = ptx_tbl->pnext; + } + + LEAVE(); + return MNULL; +} + +/** + * @brief This function will create a entry in tx ba stream table for the + * given RA/TID. + * + * @param priv A pointer to mlan_private + * @param ra RA to find in reordering table + * @param tid TID to find in reordering table + * @param ba_status BA stream status to create the stream with + * + * @return N/A + */ +void +wlan_11n_create_txbastream_tbl(mlan_private *priv, + t_u8 *ra, int tid, baStatus_e ba_status) +{ + TxBAStreamTbl *new_node = MNULL; + pmlan_adapter pmadapter = priv->adapter; + raListTbl *ra_list = MNULL; + int tid_down; + + ENTER(); + + PRINTM(MDAT_D, "create_txbastream_tbl TID %d\n", tid); + DBG_HEXDUMP(MDAT_D, "RA", ra, MLAN_MAC_ADDR_LENGTH); + + if (pmadapter->callbacks. + moal_malloc(pmadapter->pmoal_handle, sizeof(TxBAStreamTbl), + MLAN_MEM_DEF, (t_u8 **)&new_node)) { + PRINTM(MERROR, + "wlan_11n_create_txbastream_tbl Failed to allocate new_node\n"); + LEAVE(); + return; + } + tid_down = wlan_get_wmm_tid_down(priv, tid); + ra_list = wlan_wmm_get_ralist_node(priv, tid_down, ra); + if (ra_list) { + ra_list->amsdu_in_ampdu = MFALSE; + ra_list->ba_status = ba_status; + } + util_init_list((pmlan_linked_list)new_node); + + new_node->tid = tid; + new_node->ba_status = ba_status; + memcpy(pmadapter, new_node->ra, ra, MLAN_MAC_ADDR_LENGTH); + + util_enqueue_list_tail(pmadapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + (pmlan_linked_list)new_node, + pmadapter->callbacks.moal_spin_lock, + pmadapter->callbacks.moal_spin_unlock); + + LEAVE(); +} + +/** + * @brief This function will send a block ack to given tid/ra + * + * @param priv A pointer to mlan_private + * @param tid TID to send the ADDBA + * @param peer_mac MAC address to send the ADDBA + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +int +wlan_send_addba(mlan_private *priv, int tid, t_u8 *peer_mac) +{ + HostCmd_DS_11N_ADDBA_REQ add_ba_req; + static t_u8 dialog_tok; + mlan_status ret; + + ENTER(); + + PRINTM(MCMND, "Send addba: TID %d\n", tid); + DBG_HEXDUMP(MCMD_D, "Send addba RA", peer_mac, MLAN_MAC_ADDR_LENGTH); + + add_ba_req.block_ack_param_set = + (t_u16)((tid << BLOCKACKPARAM_TID_POS) | + (priv->add_ba_param. + tx_win_size << BLOCKACKPARAM_WINSIZE_POS) | + IMMEDIATE_BLOCK_ACK); + /** enable AMSDU inside AMPDU */ + if (priv->add_ba_param.tx_amsdu && + (priv->aggr_prio_tbl[tid].amsdu != BA_STREAM_NOT_ALLOWED)) + add_ba_req.block_ack_param_set |= BLOCKACKPARAM_AMSDU_SUPP_MASK; + add_ba_req.block_ack_tmo = (t_u16)priv->add_ba_param.timeout; + + ++dialog_tok; + + if (dialog_tok == 0) + dialog_tok = 1; + + add_ba_req.dialog_token = dialog_tok; + memcpy(priv->adapter, &add_ba_req.peer_mac_addr, peer_mac, + MLAN_MAC_ADDR_LENGTH); + + /* We don't wait for the response of this command */ + ret = wlan_prepare_cmd(priv, HostCmd_CMD_11N_ADDBA_REQ, + 0, 0, MNULL, &add_ba_req); + + LEAVE(); + return ret; +} + +/** + * @brief This function will delete a block ack to given tid/ra + * + * @param priv A pointer to mlan_private + * @param pioctl_req A pointer to ioctl request buffer + * @param tid TID to send the ADDBA + * @param peer_mac MAC address to send the ADDBA + * @param initiator MTRUE if we have initiated ADDBA, MFALSE otherwise + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +int +wlan_send_delba(mlan_private *priv, pmlan_ioctl_req pioctl_req, int tid, + t_u8 *peer_mac, int initiator) +{ + HostCmd_DS_11N_DELBA delba; + mlan_status ret; + + ENTER(); + + memset(priv->adapter, &delba, 0, sizeof(delba)); + delba.del_ba_param_set = (tid << DELBA_TID_POS); + + if (initiator) + DELBA_INITIATOR(delba.del_ba_param_set); + else + DELBA_RECIPIENT(delba.del_ba_param_set); + + memcpy(priv->adapter, &delba.peer_mac_addr, peer_mac, + MLAN_MAC_ADDR_LENGTH); + + ret = wlan_prepare_cmd(priv, HostCmd_CMD_11N_DELBA, + HostCmd_ACT_GEN_SET, 0, (t_void *)pioctl_req, + (t_void *)&delba); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief This function handles the command response of + * delete a block ack request + * + * @param priv A pointer to mlan_private structure + * @param del_ba A pointer to command response buffer + * + * @return N/A + */ +void +wlan_11n_delete_bastream(mlan_private *priv, t_u8 *del_ba) +{ + HostCmd_DS_11N_DELBA *pdel_ba = (HostCmd_DS_11N_DELBA *)del_ba; + int tid; + + ENTER(); + + DBG_HEXDUMP(MCMD_D, "Delba:", (t_u8 *)pdel_ba, 20); + pdel_ba->del_ba_param_set = wlan_le16_to_cpu(pdel_ba->del_ba_param_set); + pdel_ba->reason_code = wlan_le16_to_cpu(pdel_ba->reason_code); + + tid = pdel_ba->del_ba_param_set >> DELBA_TID_POS; + + mlan_11n_delete_bastream_tbl(priv, tid, pdel_ba->peer_mac_addr, + TYPE_DELBA_RECEIVE, + INITIATOR_BIT(pdel_ba->del_ba_param_set)); + + LEAVE(); +} + +/** + * @brief Get Rx reordering table + * + * @param priv A pointer to mlan_private structure + * @param buf A pointer to rx_reorder_tbl structure + * @return number of rx reorder table entry + */ +int +wlan_get_rxreorder_tbl(mlan_private *priv, rx_reorder_tbl *buf) +{ + int i; + rx_reorder_tbl *ptbl = buf; + RxReorderTbl *rx_reorder_tbl_ptr; + int count = 0; + ENTER(); + rx_reorder_tbl_ptr = + (RxReorderTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->rx_reorder_tbl_ptr, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); + if (!rx_reorder_tbl_ptr) { + LEAVE(); + return count; + } + while (rx_reorder_tbl_ptr != (RxReorderTbl *)&priv->rx_reorder_tbl_ptr) { + ptbl->tid = (t_u16)rx_reorder_tbl_ptr->tid; + memcpy(priv->adapter, ptbl->ta, rx_reorder_tbl_ptr->ta, + MLAN_MAC_ADDR_LENGTH); + ptbl->start_win = rx_reorder_tbl_ptr->start_win; + ptbl->win_size = rx_reorder_tbl_ptr->win_size; + ptbl->amsdu = rx_reorder_tbl_ptr->amsdu; + for (i = 0; i < rx_reorder_tbl_ptr->win_size; ++i) { + if (rx_reorder_tbl_ptr->rx_reorder_ptr[i]) + ptbl->buffer[i] = MTRUE; + else + ptbl->buffer[i] = MFALSE; + } + rx_reorder_tbl_ptr = rx_reorder_tbl_ptr->pnext; + ptbl++; + count++; + if (count >= MLAN_MAX_RX_BASTREAM_SUPPORTED) + break; + } + LEAVE(); + return count; +} + +/** + * @brief Get transmit BA stream table + * + * @param priv A pointer to mlan_private structure + * @param buf A pointer to tx_ba_stream_tbl structure + * @return number of ba stream table entry + */ +int +wlan_get_txbastream_tbl(mlan_private *priv, tx_ba_stream_tbl *buf) +{ + TxBAStreamTbl *ptxtbl; + tx_ba_stream_tbl *ptbl = buf; + int count = 0; + t_u32 bastream_max = 0; + + ENTER(); + + ptxtbl = (TxBAStreamTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); + if (!ptxtbl) { + LEAVE(); + return count; + } + if (priv->adapter->psdio_device->v15_fw_api) { + bastream_max = + ISSUPP_GETTXBASTREAM(priv->adapter->hw_dot_11n_dev_cap); + if (bastream_max == 0) + bastream_max = MLAN_MAX_TX_BASTREAM_DEFAULT; + } + + while (ptxtbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { + ptbl->tid = (t_u16)ptxtbl->tid; + PRINTM(MINFO, "tid=%d\n", ptbl->tid); + memcpy(priv->adapter, ptbl->ra, ptxtbl->ra, + MLAN_MAC_ADDR_LENGTH); + ptbl->amsdu = ptxtbl->amsdu; + ptxtbl = ptxtbl->pnext; + ptbl++; + count++; + if ((priv->adapter->psdio_device->v15_fw_api && + (count >= bastream_max)) || + (!priv->adapter->psdio_device->v15_fw_api && + (count >= MLAN_MAX_TX_BASTREAM_SUPPORTED_NOV15))) + break; + } + + LEAVE(); + return count; +} + +/** + * @brief This function cleans up txbastream_tbl for specific station + * + * @param priv A pointer to mlan_private + * @param ra RA to find in txbastream_tbl + * @return N/A + */ +void +wlan_11n_cleanup_txbastream_tbl(mlan_private *priv, t_u8 *ra) +{ + TxBAStreamTbl *ptx_tbl = MNULL; + t_u8 i; + ENTER(); + for (i = 0; i < MAX_NUM_TID; ++i) { + ptx_tbl = wlan_11n_get_txbastream_tbl(priv, i, ra); + if (ptx_tbl) + wlan_11n_delete_txbastream_tbl_entry(priv, ptx_tbl); + } + LEAVE(); + return; +} + +void +wlan_update_11n_cap(mlan_private *pmpriv) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + + pmpriv->usr_dev_mcs_support = pmadapter->hw_dev_mcs_support; + pmpriv->usr_dot_11n_dev_cap_bg = + pmadapter->hw_dot_11n_dev_cap & DEFAULT_11N_CAP_MASK_BG; + pmpriv->usr_dot_11n_dev_cap_a = + pmadapter->hw_dot_11n_dev_cap & DEFAULT_11N_CAP_MASK_A; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11n.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11n.h new file mode 100644 index 00000000..83eb7816 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11n.h @@ -0,0 +1,413 @@ +/** @file mlan_11n.h + * + * @brief Interface for the 802.11n mlan_11n module implemented in mlan_11n.c + * + * Driver interface functions and type declarations for the 11n module + * implemented in mlan_11n.c. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/******************************************************** +Change log: + 12/01/2008: initial version +********************************************************/ + +#ifndef _MLAN_11N_H_ +#define _MLAN_11N_H_ + +#include "mlan_11n_aggr.h" +#include "mlan_11n_rxreorder.h" +#include "mlan_wmm.h" + +/** Print the 802.11n device capability */ +void wlan_show_dot11ndevcap(pmlan_adapter pmadapter, t_u32 cap); +/** Print the 802.11n device MCS */ +void wlan_show_devmcssupport(pmlan_adapter pmadapter, t_u8 support); +/** Handle the command response of a delete block ack request */ +mlan_status wlan_ret_11n_delba(mlan_private *priv, HostCmd_DS_COMMAND *resp); +/** Handle the command response of an add block ack request */ +mlan_status wlan_ret_11n_addba_req(mlan_private *priv, + HostCmd_DS_COMMAND *resp); +/** Handle the command response of 11ncfg command */ +mlan_status wlan_ret_11n_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); +/** Prepare 11ncfg command */ +mlan_status wlan_cmd_11n_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action, + IN t_void *pdata_buf); +/** Prepare reject addba requst command */ +mlan_status wlan_cmd_reject_addba_req(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, + IN t_void *pdata_buf); +/** Handle the command response of rejecting addba request */ +mlan_status wlan_ret_reject_addba_req(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); +/** Prepare TX BF configuration command */ +mlan_status wlan_cmd_tx_bf_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf); +/** Handle the command response TX BF configuration */ +mlan_status wlan_ret_tx_bf_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); +#ifdef STA_SUPPORT +/** Append the 802_11N tlv */ +int wlan_cmd_append_11n_tlv(IN mlan_private *pmpriv, + IN BSSDescriptor_t *pbss_desc, OUT t_u8 **ppbuffer); +/** wlan fill HT cap tlv */ +void wlan_fill_ht_cap_tlv(mlan_private *priv, MrvlIETypes_HTCap_t *pht_cap, + t_u8 band); +/** wlan fill HT cap IE */ +void wlan_fill_ht_cap_ie(mlan_private *priv, IEEEtypes_HTCap_t *pht_cap, + t_u8 bands); +#endif /* STA_SUPPORT */ +/** Miscellaneous configuration handler */ +mlan_status wlan_11n_cfg_ioctl(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); +/** Delete Tx BA stream table entry */ +void wlan_11n_delete_txbastream_tbl_entry(mlan_private *priv, + TxBAStreamTbl *ptx_tbl); +/** Delete all Tx BA stream table entries */ +void wlan_11n_deleteall_txbastream_tbl(mlan_private *priv); +/** Get Tx BA stream table */ +TxBAStreamTbl *wlan_11n_get_txbastream_tbl(mlan_private *priv, int tid, + t_u8 *ra); +/** Create Tx BA stream table */ +void wlan_11n_create_txbastream_tbl(mlan_private *priv, t_u8 *ra, int tid, + baStatus_e ba_status); +/** Send ADD BA request */ +int wlan_send_addba(mlan_private *priv, int tid, t_u8 *peer_mac); +/** Send DEL BA request */ +int wlan_send_delba(mlan_private *priv, pmlan_ioctl_req pioctl_req, int tid, + t_u8 *peer_mac, int initiator); +/** This function handles the command response of delete a block ack request*/ +void wlan_11n_delete_bastream(mlan_private *priv, t_u8 *del_ba); +/** get rx reorder table */ +int wlan_get_rxreorder_tbl(mlan_private *priv, rx_reorder_tbl *buf); +/** get tx ba stream table */ +int wlan_get_txbastream_tbl(mlan_private *priv, tx_ba_stream_tbl *buf); +/** send delba */ +void wlan_11n_delba(mlan_private *priv, int tid); +/** update amdpdu tx win size */ +void wlan_update_ampdu_txwinsize(pmlan_adapter pmadapter); +/** Minimum number of AMSDU */ +#define MIN_NUM_AMSDU 2 +/** AMSDU Aggr control cmd resp */ +mlan_status wlan_ret_amsdu_aggr_ctrl(pmlan_private pmpriv, + HostCmd_DS_COMMAND *resp, + mlan_ioctl_req *pioctl_buf); +/** reconfigure tx buf size */ +mlan_status wlan_cmd_recfg_tx_buf(mlan_private *priv, + HostCmd_DS_COMMAND *cmd, + int cmd_action, void *pdata_buf); +/** AMSDU aggr control cmd */ +mlan_status wlan_cmd_amsdu_aggr_ctrl(mlan_private *priv, + HostCmd_DS_COMMAND *cmd, + int cmd_action, void *pdata_buf); + +t_u8 wlan_validate_chan_offset(IN mlan_private *pmpriv, + IN t_u8 band, IN t_u32 chan, IN t_u8 chan_bw); +/** get channel offset */ +t_u8 wlan_get_second_channel_offset(int chan); + +void wlan_update_11n_cap(mlan_private *pmpriv); + +/** clean up txbastream_tbl */ +void wlan_11n_cleanup_txbastream_tbl(mlan_private *priv, t_u8 *ra); +/** + * @brief This function checks whether a station has 11N enabled or not + * + * @param priv A pointer to mlan_private + * @param mac station mac address + * @return MTRUE or MFALSE + */ +static INLINE t_u8 +is_station_11n_enabled(mlan_private *priv, t_u8 *mac) +{ + sta_node *sta_ptr = MNULL; + sta_ptr = wlan_get_station_entry(priv, mac); + if (sta_ptr) + return (sta_ptr->is_11n_enabled) ? MTRUE : MFALSE; + return MFALSE; +} + +/** + * @brief This function get station max amsdu size + * + * @param priv A pointer to mlan_private + * @param mac station mac address + * @return max amsdu size statio supported + */ +static INLINE t_u16 +get_station_max_amsdu_size(mlan_private *priv, t_u8 *mac) +{ + sta_node *sta_ptr = MNULL; + sta_ptr = wlan_get_station_entry(priv, mac); + if (sta_ptr) + return sta_ptr->max_amsdu; + return 0; +} + +/** + * @brief This function checks whether a station allows AMPDU or not + * + * @param priv A pointer to mlan_private + * @param ptr A pointer to RA list table + * @param tid TID value for ptr + * @return MTRUE or MFALSE + */ +static INLINE t_u8 +is_station_ampdu_allowed(mlan_private *priv, raListTbl *ptr, int tid) +{ + sta_node *sta_ptr = MNULL; + sta_ptr = wlan_get_station_entry(priv, ptr->ra); + if (sta_ptr) { + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + if (priv->sec_info.wapi_enabled && + !sta_ptr->wapi_key_on) + return MFALSE; + } + return (sta_ptr->ampdu_sta[tid] != BA_STREAM_NOT_ALLOWED) + ? MTRUE : MFALSE; + } + return MFALSE; +} + +/** + * @brief This function disable station ampdu for specific tid + * + * @param priv A pointer to mlan_private + * @param tid tid index + * @param ra station mac address + * @return N/A + */ +static INLINE void +disable_station_ampdu(mlan_private *priv, t_u8 tid, t_u8 *ra) +{ + sta_node *sta_ptr = MNULL; + sta_ptr = wlan_get_station_entry(priv, ra); + if (sta_ptr) + sta_ptr->ampdu_sta[tid] = BA_STREAM_NOT_ALLOWED; + return; +} + +/** + * @brief This function checks whether current BA stream is high priority or not + * + * @param priv A pointer to mlan_private + * @param tid TID + * + * @return MTRUE or MFALSE + */ +static INLINE t_u8 +wlan_is_cur_bastream_high_prio(mlan_private *priv, int tid) +{ + TxBAStreamTbl *ptx_tbl; + + ENTER(); + + ptx_tbl = (TxBAStreamTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); + if (!ptx_tbl) + return MFALSE; + + while (ptx_tbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { + if (priv->aggr_prio_tbl[tid].ampdu_user > + priv->aggr_prio_tbl[ptx_tbl->tid].ampdu_user) { + LEAVE(); + return MTRUE; + } + + ptx_tbl = ptx_tbl->pnext; + } + + LEAVE(); + return MFALSE; +} + +/** + * @brief This function checks whether AMPDU is allowed or not + * + * @param priv A pointer to mlan_private + * @param ptr A pointer to RA list table + * @param tid TID value for ptr + * + * @return MTRUE or MFALSE + */ +static INLINE t_u8 +wlan_is_ampdu_allowed(mlan_private *priv, raListTbl *ptr, int tid) +{ +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) + return is_station_ampdu_allowed(priv, ptr, tid); +#endif /* UAP_SUPPORT */ + if (priv->sec_info.wapi_enabled && !priv->sec_info.wapi_key_on) + return MFALSE; + if (ptr->is_tdls_link) + return is_station_ampdu_allowed(priv, ptr, tid); + if (priv->adapter->tdls_status != TDLS_NOT_SETUP && !priv->txaggrctrl) + return MFALSE; + + return (priv->aggr_prio_tbl[tid].ampdu_ap != BA_STREAM_NOT_ALLOWED) + ? MTRUE : MFALSE; +} + +/** + * @brief This function checks whether AMSDU is allowed or not + * + * @param priv A pointer to mlan_private + * @param ptr A pointer to RA list table + * @param tid TID value for ptr + * + * @return MTRUE or MFALSE + */ +static INLINE t_u8 +wlan_is_amsdu_allowed(mlan_private *priv, raListTbl *ptr, int tid) +{ +#ifdef UAP_SUPPORT + sta_node *sta_ptr = MNULL; + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + sta_ptr = wlan_get_station_entry(priv, ptr->ra); + if (sta_ptr) { + if (priv->sec_info.wapi_enabled && + !sta_ptr->wapi_key_on) + return MFALSE; + } + } +#endif /* UAP_SUPPORT */ +#define TXRATE_BITMAP_INDEX_MCS0_7 2 + return ((priv->aggr_prio_tbl[tid].amsdu != BA_STREAM_NOT_ALLOWED) + &&((priv->is_data_rate_auto) + || !((priv->bitmap_rates[TXRATE_BITMAP_INDEX_MCS0_7]) & + 0x03))) ? MTRUE : MFALSE; +} + +/** + * @brief This function checks whether a BA stream is available or not + * + * @param priv A pointer to mlan_private + * + * @return MTRUE or MFALSE + */ +static INLINE t_u8 +wlan_is_bastream_avail(mlan_private *priv) +{ + mlan_private *pmpriv = MNULL; + t_u8 i = 0; + t_u32 bastream_num = 0; + t_u32 bastream_max = 0; + for (i = 0; i < priv->adapter->priv_num; i++) { + pmpriv = priv->adapter->priv[i]; + if (pmpriv) + bastream_num += + wlan_wmm_list_len(priv->adapter, + (pmlan_list_head)&pmpriv-> + tx_ba_stream_tbl_ptr); + } + if (priv->adapter->psdio_device->v15_fw_api) { + bastream_max = + ISSUPP_GETTXBASTREAM(priv->adapter->hw_dot_11n_dev_cap); + if (bastream_max == 0) + bastream_max = MLAN_MAX_TX_BASTREAM_DEFAULT; + return (bastream_num < bastream_max) ? MTRUE : MFALSE; + } else { + return (bastream_num < + MLAN_MAX_TX_BASTREAM_SUPPORTED_NOV15) ? MTRUE : MFALSE; + } +} + +/** + * @brief This function finds the stream to delete + * + * @param priv A pointer to mlan_private + * @param ptr A pointer to RA list table + * @param ptr_tid TID value of ptr + * @param ptid A pointer to TID of stream to delete, if return MTRUE + * @param ra RA of stream to delete, if return MTRUE + * + * @return MTRUE or MFALSE + */ +static INLINE t_u8 +wlan_find_stream_to_delete(mlan_private *priv, + raListTbl *ptr, int ptr_tid, int *ptid, t_u8 *ra) +{ + int tid; + t_u8 ret = MFALSE; + TxBAStreamTbl *ptx_tbl; + + ENTER(); + + ptx_tbl = (TxBAStreamTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); + if (!ptx_tbl) { + LEAVE(); + return ret; + } + + tid = priv->aggr_prio_tbl[ptr_tid].ampdu_user; + + while (ptx_tbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) { + if (tid > priv->aggr_prio_tbl[ptx_tbl->tid].ampdu_user) { + tid = priv->aggr_prio_tbl[ptx_tbl->tid].ampdu_user; + *ptid = ptx_tbl->tid; + memcpy(priv->adapter, ra, ptx_tbl->ra, + MLAN_MAC_ADDR_LENGTH); + ret = MTRUE; + } + + ptx_tbl = ptx_tbl->pnext; + } + + LEAVE(); + return ret; +} + +/** + * @brief This function checks whether 11n is supported + * + * @param priv A pointer to mlan_private + * @param ra Address of the receiver STA + * + * @return MTRUE or MFALSE + */ +static int INLINE +wlan_is_11n_enabled(mlan_private *priv, t_u8 *ra) +{ + int ret = MFALSE; + ENTER(); +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + if ((!(ra[0] & 0x01)) && (priv->is_11n_enabled)) + ret = is_station_11n_enabled(priv, ra); + } +#endif /* UAP_SUPPORT */ + LEAVE(); + return ret; +} +#endif /* !_MLAN_11N_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11n_aggr.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11n_aggr.c new file mode 100644 index 00000000..91c2a0f9 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11n_aggr.c @@ -0,0 +1,572 @@ +/** @file mlan_11n_aggr.c + * + * @brief This file contains functions for 11n Aggregation. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/******************************************************** +Change log: + 11/10/2008: initial version +********************************************************/ + +#include "mlan.h" +#include "mlan_join.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_wmm.h" +#include "mlan_11n.h" +#include "mlan_11n_aggr.h" +#include "mlan_sdio.h" + +/******************************************************** + Local Variables +********************************************************/ + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ + +/** + * @brief Aggregate individual packets into one AMSDU packet + * + * @param pmadapter A pointer to mlan_adapter structure + * @param amsdu_buf A pointer to packet buffer + * @param data A pointer to aggregated data packet being formed + * @param pkt_len Length of current packet to aggregate + * @param pad Pad + * + * @return Final packet size + */ +static int +wlan_11n_form_amsdu_pkt(pmlan_adapter pmadapter, t_u8 *amsdu_buf, t_u8 *data, + int pkt_len, int *pad) +{ + int dt_offset, amsdu_buf_offset; + Rfc1042Hdr_t snap = { + 0xaa, /* LLC DSAP */ + 0xaa, /* LLC SSAP */ + 0x03, /* LLC CTRL */ + {0x00, 0x00, 0x00}, /* SNAP OUI */ + 0x0000 /* SNAP type */ + /* + * This field will be overwritten + * later with ethertype + */ + }; + + ENTER(); + + memcpy(pmadapter, amsdu_buf, data, (MLAN_MAC_ADDR_LENGTH) * 2); + dt_offset = amsdu_buf_offset = (MLAN_MAC_ADDR_LENGTH) * 2; + + snap.snap_type = *(t_u16 *)(data + dt_offset); + dt_offset += sizeof(t_u16); + *(t_u16 *)(amsdu_buf + amsdu_buf_offset) = mlan_htons(pkt_len + + LLC_SNAP_LEN - + ((2 * + MLAN_MAC_ADDR_LENGTH) + + + sizeof(t_u16))); + amsdu_buf_offset += sizeof(t_u16); + memcpy(pmadapter, amsdu_buf + amsdu_buf_offset, &snap, LLC_SNAP_LEN); + amsdu_buf_offset += LLC_SNAP_LEN; + + memcpy(pmadapter, amsdu_buf + amsdu_buf_offset, data + dt_offset, + pkt_len - dt_offset); + *pad = (((pkt_len + LLC_SNAP_LEN) & 3)) ? (4 - + (((pkt_len + + LLC_SNAP_LEN)) & 3)) : 0; + + LEAVE(); + return pkt_len + LLC_SNAP_LEN + *pad; +} + +/** + * @brief Add TxPD to AMSDU header + * + * @param priv A pointer to mlan_private structure + * @param mbuf Pointer to buffer where the TxPD will be formed + * + * @return N/A + */ +static void +wlan_11n_form_amsdu_txpd(mlan_private *priv, mlan_buffer *mbuf) +{ + TxPD *ptx_pd; + mlan_adapter *pmadapter = priv->adapter; + + ENTER(); + + ptx_pd = (TxPD *)mbuf->pbuf; + memset(pmadapter, ptx_pd, 0, sizeof(TxPD)); + + /* + * Original priority has been overwritten + */ + ptx_pd->priority = (t_u8)mbuf->priority; + ptx_pd->pkt_delay_2ms = + wlan_wmm_compute_driver_packet_delay(priv, mbuf); + ptx_pd->bss_num = GET_BSS_NUM(priv); + ptx_pd->bss_type = priv->bss_type; + /* Always zero as the data is followed by TxPD */ + ptx_pd->tx_pkt_offset = sizeof(TxPD); + ptx_pd->tx_pkt_type = PKT_TYPE_AMSDU; + if (mbuf->flags & MLAN_BUF_FLAG_TDLS) + ptx_pd->flags = MRVDRV_TxPD_FLAGS_TDLS_PACKET; + if (ptx_pd->tx_control == 0) + /* TxCtrl set by user or default */ + ptx_pd->tx_control = priv->pkt_tx_ctrl; + + endian_convert_TxPD(ptx_pd); + + LEAVE(); +} + +/** + * @brief Update the TxPktLength field in TxPD after the complete AMSDU + * packet is formed + * + * @param priv A pointer to mlan_private structure + * @param mbuf TxPD buffer + * + * @return N/A + */ +static INLINE void +wlan_11n_update_pktlen_amsdu_txpd(mlan_private *priv, pmlan_buffer mbuf) +{ + TxPD *ptx_pd; + ENTER(); + + ptx_pd = (TxPD *)mbuf->pbuf; + ptx_pd->tx_pkt_length = + (t_u16)wlan_cpu_to_le16(mbuf->data_len - sizeof(TxPD)); +#ifdef STA_SUPPORT + if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) && + (priv->adapter->pps_uapsd_mode)) { + if (MTRUE == wlan_check_last_packet_indication(priv)) { + priv->adapter->tx_lock_flag = MTRUE; + ptx_pd->flags |= MRVDRV_TxPD_POWER_MGMT_LAST_PACKET; + } + } +#endif /* STA_SUPPORT */ + LEAVE(); +} + +/** + * @brief Get number of aggregated packets + * + * @param data A pointer to packet data + * @param total_pkt_len Total packet length + * + * @return Number of packets + */ +static int +wlan_11n_get_num_aggrpkts(t_u8 *data, int total_pkt_len) +{ + int pkt_count = 0, pkt_len, pad; + t_u8 hdr_len = sizeof(Eth803Hdr_t); + + ENTER(); + while (total_pkt_len >= hdr_len) { + /* Length will be in network format, change it to host */ + pkt_len = mlan_ntohs((*(t_u16 *)(data + (2 * + MLAN_MAC_ADDR_LENGTH)))); + if (pkt_len > total_pkt_len) { + PRINTM(MERROR, "Error in packet length.\n"); + break; + } + + pad = (((pkt_len + sizeof(Eth803Hdr_t)) & 3)) ? + (4 - ((pkt_len + sizeof(Eth803Hdr_t)) & 3)) : 0; + data += pkt_len + pad + sizeof(Eth803Hdr_t); + total_pkt_len -= pkt_len + pad + sizeof(Eth803Hdr_t); + ++pkt_count; + } + LEAVE(); + return pkt_count; +} + +/******************************************************** + Global Functions +********************************************************/ + +/** + * @brief Deaggregate the received AMSDU packet + * + * @param priv A pointer to mlan_private structure + * @param pmbuf A pointer to aggregated data packet + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +mlan_status +wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf) +{ + t_u16 pkt_len; + int total_pkt_len; + t_u8 *data; + mlan_adapter *pmadapter = priv->adapter; + t_u32 max_rx_data_size = MLAN_RX_DATA_BUF_SIZE; + int pad; + mlan_status ret = MLAN_STATUS_FAILURE; + RxPacketHdr_t *prx_pkt; + mlan_buffer *daggr_mbuf = MNULL; + t_u8 rfc1042_eth_hdr[MLAN_MAC_ADDR_LENGTH] = { 0xaa, 0xaa, 0x03, + 0x00, 0x00, 0x00 + }; + t_u8 hdr_len = sizeof(Eth803Hdr_t); + t_u8 eapol_type[2] = { 0x88, 0x8e }; + + ENTER(); + + data = (t_u8 *)(pmbuf->pbuf + pmbuf->data_offset); + total_pkt_len = pmbuf->data_len; + + /* Sanity test */ + if (total_pkt_len > max_rx_data_size) { + PRINTM(MERROR, "Total packet length greater than tx buffer" + " size %d\n", total_pkt_len); + goto done; + } + + pmbuf->use_count = wlan_11n_get_num_aggrpkts(data, total_pkt_len); + + while (total_pkt_len >= hdr_len) { + prx_pkt = (RxPacketHdr_t *)data; + /* Length will be in network format, change it to host */ + pkt_len = mlan_ntohs((*(t_u16 *)(data + (2 * + MLAN_MAC_ADDR_LENGTH)))); + if (pkt_len > total_pkt_len) { + PRINTM(MERROR, + "Error in packet length: total_pkt_len = %d, pkt_len = %d\n", + total_pkt_len, pkt_len); + ret = MLAN_STATUS_FAILURE; + break; + } + + pad = (((pkt_len + sizeof(Eth803Hdr_t)) & 3)) ? + (4 - ((pkt_len + sizeof(Eth803Hdr_t)) & 3)) : 0; + + total_pkt_len -= pkt_len + pad + sizeof(Eth803Hdr_t); + + if (memcmp(pmadapter, &prx_pkt->rfc1042_hdr, + rfc1042_eth_hdr, sizeof(rfc1042_eth_hdr)) == 0) { + memmove(pmadapter, data + LLC_SNAP_LEN, data, (2 * + MLAN_MAC_ADDR_LENGTH)); + data += LLC_SNAP_LEN; + pkt_len += sizeof(Eth803Hdr_t) - LLC_SNAP_LEN; + } else { + *(t_u16 *)(data + (2 * MLAN_MAC_ADDR_LENGTH)) + = (t_u16)0; + pkt_len += sizeof(Eth803Hdr_t); + } + daggr_mbuf = + wlan_alloc_mlan_buffer(pmadapter, pkt_len, 0, + MOAL_ALLOC_MLAN_BUFFER); + if (daggr_mbuf == MNULL) { + PRINTM(MERROR, "Error allocating daggr mlan_buffer\n"); + ret = MLAN_STATUS_FAILURE; + break; + } + daggr_mbuf->bss_index = pmbuf->bss_index; + daggr_mbuf->buf_type = pmbuf->buf_type; + daggr_mbuf->data_len = pkt_len; + daggr_mbuf->in_ts_sec = pmbuf->in_ts_sec; + daggr_mbuf->in_ts_usec = pmbuf->in_ts_usec; + daggr_mbuf->pparent = pmbuf; + daggr_mbuf->priority = pmbuf->priority; + memcpy(pmadapter, daggr_mbuf->pbuf + daggr_mbuf->data_offset, + data, pkt_len); + +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + ret = wlan_uap_recv_packet(priv, daggr_mbuf); + } else { +#endif /* UAP_SUPPORT */ + /** send EAPOL from AMSDU pkt to firmware */ + if (priv->sec_info.ewpa_enabled && + (!memcmp + (pmadapter, + daggr_mbuf->pbuf + daggr_mbuf->data_offset + + MLAN_ETHER_PKT_TYPE_OFFSET, eapol_type, + sizeof(eapol_type)))) { + ret = wlan_prepare_cmd(priv, + HostCmd_CMD_802_11_EAPOL_PKT, + 0, 0, MNULL, daggr_mbuf); + if (ret == MLAN_STATUS_SUCCESS) + wlan_recv_event(priv, + MLAN_EVENT_ID_DRV_DEFER_HANDLING, + MNULL); + wlan_free_mlan_buffer(pmadapter, daggr_mbuf); + data += pkt_len + pad; + continue; + } + ret = pmadapter->callbacks.moal_recv_packet(pmadapter-> + pmoal_handle, + daggr_mbuf); +#ifdef UAP_SUPPORT + } +#endif /* UAP_SUPPORT */ + switch (ret) { + case MLAN_STATUS_PENDING: + break; + case MLAN_STATUS_FAILURE: + PRINTM(MERROR, "Deaggr, send to moal failed\n"); + daggr_mbuf->status_code = MLAN_ERROR_PKT_INVALID; + case MLAN_STATUS_SUCCESS: + wlan_recv_packet_complete(pmadapter, daggr_mbuf, ret); + break; + default: + break; + } + + data += pkt_len + pad; + } + +done: + /** we should free the aggr buffer after deaggr */ + wlan_free_mlan_buffer(pmadapter, pmbuf); + LEAVE(); + return ret; +} + +/** + * @brief Aggregate multiple packets into one single AMSDU packet + * + * @param priv A pointer to mlan_private structure + * @param pra_list Pointer to the RA List table containing the pointers + * to packets. + * @param headroom Any interface specific headroom that may be need. TxPD + * will be formed leaving this headroom. + * @param ptrindex Pointer index + * + * @return Final packet size or MLAN_STATUS_FAILURE + */ +int +wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list, + int headroom, int ptrindex) +{ + int pkt_size = 0; + pmlan_adapter pmadapter = priv->adapter; + mlan_buffer *pmbuf_aggr, *pmbuf_src; + t_u8 *data; + int pad = 0; + mlan_status ret = MLAN_STATUS_SUCCESS; +#ifdef DEBUG_LEVEL1 + t_u32 sec = 0, usec = 0; +#endif + mlan_tx_param tx_param; +#ifdef STA_SUPPORT + TxPD *ptx_pd = MNULL; +#endif + t_u32 max_amsdu_size = MIN(pra_list->max_amsdu, pmadapter->tx_buf_size); + ENTER(); + + PRINTM(MDAT_D, "Handling Aggr packet\n"); + + pmbuf_src = + (pmlan_buffer)util_peek_list(pmadapter->pmoal_handle, + &pra_list->buf_head, MNULL, MNULL); + if (pmbuf_src) { + pmbuf_aggr = wlan_alloc_mlan_buffer(pmadapter, + pmadapter->tx_buf_size, 0, + MOAL_MALLOC_BUFFER); + if (!pmbuf_aggr) { + PRINTM(MERROR, "Error allocating mlan_buffer\n"); + pmadapter->callbacks.moal_spin_unlock(pmadapter-> + pmoal_handle, + priv->wmm. + ra_list_spinlock); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + data = pmbuf_aggr->pbuf + headroom; + pmbuf_aggr->bss_index = pmbuf_src->bss_index; + pmbuf_aggr->buf_type = pmbuf_src->buf_type; + pmbuf_aggr->priority = pmbuf_src->priority; + pmbuf_aggr->pbuf = data; + pmbuf_aggr->data_offset = 0; + pmbuf_aggr->in_ts_sec = pmbuf_src->in_ts_sec; + pmbuf_aggr->in_ts_usec = pmbuf_src->in_ts_usec; + if (pmbuf_src->flags & MLAN_BUF_FLAG_TDLS) + pmbuf_aggr->flags |= MLAN_BUF_FLAG_TDLS; + + /* Form AMSDU */ + wlan_11n_form_amsdu_txpd(priv, pmbuf_aggr); + pkt_size = sizeof(TxPD); +#ifdef STA_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) + ptx_pd = (TxPD *)pmbuf_aggr->pbuf; +#endif + } else { + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm. + ra_list_spinlock); + goto exit; + } + + while (pmbuf_src && ((pkt_size + (pmbuf_src->data_len + LLC_SNAP_LEN) + + headroom) <= max_amsdu_size)) { + + pmbuf_src = (pmlan_buffer) + util_dequeue_list(pmadapter->pmoal_handle, + &pra_list->buf_head, MNULL, MNULL); + + pra_list->total_pkts--; + + /* decrement for every PDU taken from the list */ + priv->wmm.pkts_queued[ptrindex]--; + util_scalar_decrement(pmadapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, MNULL, MNULL); + + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm. + ra_list_spinlock); + + if (pmbuf_src->flags & MLAN_BUF_FLAG_TCP_ACK) + pmadapter->callbacks.moal_tcp_ack_tx_ind(pmadapter-> + pmoal_handle, + pmbuf_src); + + pkt_size += wlan_11n_form_amsdu_pkt(pmadapter, + (data + pkt_size), + pmbuf_src->pbuf + + pmbuf_src->data_offset, + pmbuf_src->data_len, &pad); + + DBG_HEXDUMP(MDAT_D, "pmbuf_src", pmbuf_src, + sizeof(mlan_buffer)); + wlan_write_data_complete(pmadapter, pmbuf_src, + MLAN_STATUS_SUCCESS); + + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + + if (!wlan_is_ralist_valid(priv, pra_list, ptrindex)) { + pmadapter->callbacks.moal_spin_unlock(pmadapter-> + pmoal_handle, + priv->wmm. + ra_list_spinlock); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + pmbuf_src = + (pmlan_buffer)util_peek_list(pmadapter->pmoal_handle, + &pra_list->buf_head, MNULL, + MNULL); + } + + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + + /* Last AMSDU packet does not need padding */ + pkt_size -= pad; + pmbuf_aggr->data_len = pkt_size; + wlan_11n_update_pktlen_amsdu_txpd(priv, pmbuf_aggr); + pmbuf_aggr->data_len += headroom; + pmbuf_aggr->pbuf = data - headroom; + tx_param.next_pkt_len = ((pmbuf_src) ? + pmbuf_src->data_len + sizeof(TxPD) : 0); + ret = wlan_sdio_host_to_card(pmadapter, MLAN_TYPE_DATA, + pmbuf_aggr, &tx_param); + switch (ret) { + case MLAN_STATUS_RESOURCE: + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + + if (!wlan_is_ralist_valid(priv, pra_list, ptrindex)) { + pmadapter->callbacks.moal_spin_unlock(pmadapter-> + pmoal_handle, + priv->wmm. + ra_list_spinlock); + pmbuf_aggr->status_code = MLAN_ERROR_PKT_INVALID; + wlan_write_data_complete(pmadapter, pmbuf_aggr, + MLAN_STATUS_FAILURE); + LEAVE(); + return MLAN_STATUS_FAILURE; + } +#ifdef STA_SUPPORT + /* reset tx_lock_flag */ + if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) && + pmadapter->pps_uapsd_mode && + (pmadapter->tx_lock_flag == MTRUE)) { + pmadapter->tx_lock_flag = MFALSE; + ptx_pd->flags = 0; + } +#endif + util_enqueue_list_head(pmadapter->pmoal_handle, + &pra_list->buf_head, + (pmlan_linked_list)pmbuf_aggr, MNULL, + MNULL); + + pra_list->total_pkts++; + + /* add back only one: aggregated packet is requeued as one */ + priv->wmm.pkts_queued[ptrindex]++; + util_scalar_increment(pmadapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, MNULL, MNULL); + pmbuf_aggr->flags |= MLAN_BUF_FLAG_REQUEUED_PKT; + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm. + ra_list_spinlock); + PRINTM(MINFO, "MLAN_STATUS_RESOURCE is returned\n"); + pmbuf_aggr->status_code = MLAN_ERROR_PKT_INVALID; + break; + case MLAN_STATUS_FAILURE: + pmadapter->data_sent = MFALSE; + PRINTM(MERROR, "Error: host_to_card failed: 0x%X\n", ret); + pmbuf_aggr->status_code = MLAN_ERROR_DATA_TX_FAIL; + pmadapter->dbg.num_tx_host_to_card_failure++; + wlan_write_data_complete(pmadapter, pmbuf_aggr, ret); + goto exit; + case MLAN_STATUS_PENDING: + break; + case MLAN_STATUS_SUCCESS: + wlan_write_data_complete(pmadapter, pmbuf_aggr, ret); + break; + default: + break; + } + if (ret != MLAN_STATUS_RESOURCE) { + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + if (wlan_is_ralist_valid(priv, pra_list, ptrindex)) { + priv->wmm.packets_out[ptrindex]++; + priv->wmm.tid_tbl_ptr[ptrindex].ra_list_curr = pra_list; + } + pmadapter->bssprio_tbl[priv->bss_priority].bssprio_cur = + pmadapter->bssprio_tbl[priv->bss_priority].bssprio_cur-> + pnext; + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm. + ra_list_spinlock); + } + PRINTM_GET_SYS_TIME(MDATA, &sec, &usec); + PRINTM_NETINTF(MDATA, priv); + PRINTM(MDATA, "%lu.%06lu : Data => FW\n", sec, usec); + +exit: + LEAVE(); + return pkt_size + headroom; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11n_aggr.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11n_aggr.h new file mode 100644 index 00000000..3a6d920a --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11n_aggr.h @@ -0,0 +1,37 @@ +/** @file mlan_11n_aggr.h + * + * @brief This file contains related macros, enum, and struct + * of 11n aggregation functionalities + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/******************************************************** +Change log: + 11/10/2008: initial version +********************************************************/ + +#ifndef _MLAN_11N_AGGR_H_ +#define _MLAN_11N_AGGR_H_ + +/** Aggregate 11N packets */ +mlan_status wlan_11n_deaggregate_pkt(pmlan_private priv, pmlan_buffer pmbuf); +/** Deaggregate 11N packets */ +int wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *ptr, + int headroom, int ptrindex); + +#endif /* !_MLAN_11N_AGGR_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11n_rxreorder.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11n_rxreorder.c new file mode 100644 index 00000000..90bece14 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11n_rxreorder.c @@ -0,0 +1,1450 @@ +/** @file mlan_11n_rxreorder.c + * + * @brief This file contains the handling of RxReordering in wlan + * driver. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/******************************************************** +Change log: + 11/10/2008: initial version +********************************************************/ + +#include "mlan.h" +#include "mlan_join.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_wmm.h" +#include "mlan_11n.h" +#include "mlan_11n_rxreorder.h" + +/******************************************************** + Local Variables +********************************************************/ + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ +/** + * @brief This function will dispatch amsdu packet and + * forward it to kernel/upper layer + * + * @param priv A pointer to mlan_private + * @param pmbuf A pointer to the received buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_11n_dispatch_amsdu_pkt(mlan_private *priv, pmlan_buffer pmbuf) +{ + RxPD *prx_pd; + prx_pd = (RxPD *)(pmbuf->pbuf + pmbuf->data_offset); + + ENTER(); + if (prx_pd->rx_pkt_type == PKT_TYPE_AMSDU) { + pmbuf->data_len = prx_pd->rx_pkt_length; + pmbuf->data_offset += prx_pd->rx_pkt_offset; + wlan_11n_deaggregate_pkt(priv, pmbuf); + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + LEAVE(); + return MLAN_STATUS_FAILURE; +} + +/** + * @brief This function will process the rx packet and + * forward it to kernel/upper layer + * + * @param priv A pointer to mlan_private + * @param payload A pointer to rx packet payload + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_11n_dispatch_pkt(t_void *priv, t_void *payload) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; +#ifdef STA_SUPPORT + pmlan_adapter pmadapter = ((pmlan_private)priv)->adapter; +#endif + ENTER(); + if (payload == (t_void *)RX_PKT_DROPPED_IN_FW) { + LEAVE(); + return ret; + } +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE((mlan_private *)priv) == MLAN_BSS_ROLE_UAP) { + if (MLAN_STATUS_SUCCESS == + wlan_11n_dispatch_amsdu_pkt((mlan_private *)priv, + (pmlan_buffer)payload)) { + LEAVE(); + return ret; + } + ret = wlan_process_uap_rx_packet(priv, (pmlan_buffer)payload); + LEAVE(); + return ret; + } +#endif /* UAP_SUPPORT */ + +#ifdef STA_SUPPORT + if (MLAN_STATUS_SUCCESS == + wlan_11n_dispatch_amsdu_pkt((mlan_private *)priv, + (pmlan_buffer)payload)) { + LEAVE(); + return ret; + } + ret = wlan_process_rx_packet(pmadapter, (pmlan_buffer)payload); +#endif /* STA_SUPPORT */ + LEAVE(); + return ret; +} + +/** + * @brief This function restarts the reordering timeout timer + * + * @param pmadapter A pointer to mlan_adapter + * @param rx_reor_tbl_ptr A pointer to structure RxReorderTbl + * + * @return N/A + */ +static void +mlan_11n_rxreorder_timer_restart(pmlan_adapter pmadapter, + RxReorderTbl *rx_reor_tbl_ptr) +{ + t_u16 min_flush_time = 0; + ENTER(); + + if (rx_reor_tbl_ptr->win_size >= 32) + min_flush_time = MIN_FLUSH_TIMER_15_MS; + else + min_flush_time = MIN_FLUSH_TIMER_MS; + + if (rx_reor_tbl_ptr->timer_context.timer_is_set) + pmadapter->callbacks.moal_stop_timer(pmadapter->pmoal_handle, + rx_reor_tbl_ptr-> + timer_context.timer); + + pmadapter->callbacks.moal_start_timer(pmadapter->pmoal_handle, + rx_reor_tbl_ptr->timer_context. + timer, MFALSE, + (rx_reor_tbl_ptr->win_size * + min_flush_time)); + + rx_reor_tbl_ptr->timer_context.timer_is_set = MTRUE; + LEAVE(); +} + +/** + * @brief This function dispatches all the packets in the buffer. + * There could be holes in the buffer. + * + * @param priv A pointer to mlan_private + * @param rx_reor_tbl_ptr A pointer to structure RxReorderTbl + * @param start_win Start window + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_11n_dispatch_pkt_until_start_win(t_void *priv, + RxReorderTbl *rx_reor_tbl_ptr, + int start_win) +{ + int no_pkt_to_send, i, xchg; + mlan_status ret = MLAN_STATUS_SUCCESS; + void *rx_tmp_ptr = MNULL; + mlan_private *pmpriv = (mlan_private *)priv; + + ENTER(); + + no_pkt_to_send = (start_win > rx_reor_tbl_ptr->start_win) ? + MIN((start_win - rx_reor_tbl_ptr->start_win), + rx_reor_tbl_ptr->win_size) : rx_reor_tbl_ptr->win_size; + + for (i = 0; i < no_pkt_to_send; ++i) { + pmpriv->adapter->callbacks.moal_spin_lock(pmpriv->adapter-> + pmoal_handle, + pmpriv->rx_pkt_lock); + rx_tmp_ptr = MNULL; + if (rx_reor_tbl_ptr->rx_reorder_ptr[i]) { + rx_tmp_ptr = rx_reor_tbl_ptr->rx_reorder_ptr[i]; + rx_reor_tbl_ptr->rx_reorder_ptr[i] = MNULL; + } + pmpriv->adapter->callbacks.moal_spin_unlock(pmpriv->adapter-> + pmoal_handle, + pmpriv-> + rx_pkt_lock); + if (rx_tmp_ptr) + wlan_11n_dispatch_pkt(priv, rx_tmp_ptr); + } + + pmpriv->adapter->callbacks.moal_spin_lock(pmpriv->adapter->pmoal_handle, + pmpriv->rx_pkt_lock); + /* + * We don't have a circular buffer, hence use rotation to simulate + * circular buffer + */ + xchg = rx_reor_tbl_ptr->win_size - no_pkt_to_send; + for (i = 0; i < xchg; ++i) { + rx_reor_tbl_ptr->rx_reorder_ptr[i] = + rx_reor_tbl_ptr->rx_reorder_ptr[no_pkt_to_send + i]; + rx_reor_tbl_ptr->rx_reorder_ptr[no_pkt_to_send + i] = MNULL; + } + + rx_reor_tbl_ptr->start_win = start_win; + pmpriv->adapter->callbacks.moal_spin_unlock(pmpriv->adapter-> + pmoal_handle, + pmpriv->rx_pkt_lock); + + LEAVE(); + return ret; +} + +/** + * @brief This function will display the rxReorder table + * + * @param pmadapter A pointer to mlan_adapter structure + * @param rx_reor_tbl_ptr A pointer to structure RxReorderTbl + * + * @return N/A + */ +static t_void +wlan_11n_display_tbl_ptr(pmlan_adapter pmadapter, RxReorderTbl *rx_reor_tbl_ptr) +{ + ENTER(); + + DBG_HEXDUMP(MDAT_D, "Reorder ptr", rx_reor_tbl_ptr->rx_reorder_ptr, + sizeof(t_void *) * rx_reor_tbl_ptr->win_size); + + LEAVE(); +} + +/** + * @brief This function will dispatch all packets sequentially + * from start_win until a hole is found and adjust the + * start_win appropriately + * + * @param priv A pointer to mlan_private + * @param rx_reor_tbl_ptr A pointer to structure RxReorderTbl + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_11n_scan_and_dispatch(t_void *priv, RxReorderTbl *rx_reor_tbl_ptr) +{ + int i, j, xchg; + mlan_status ret = MLAN_STATUS_SUCCESS; + void *rx_tmp_ptr = MNULL; + mlan_private *pmpriv = (mlan_private *)priv; + + ENTER(); + + for (i = 0; i < rx_reor_tbl_ptr->win_size; ++i) { + pmpriv->adapter->callbacks.moal_spin_lock(pmpriv->adapter-> + pmoal_handle, + pmpriv->rx_pkt_lock); + if (!rx_reor_tbl_ptr->rx_reorder_ptr[i]) { + pmpriv->adapter->callbacks.moal_spin_unlock(pmpriv-> + adapter-> + pmoal_handle, + pmpriv-> + rx_pkt_lock); + break; + } + rx_tmp_ptr = rx_reor_tbl_ptr->rx_reorder_ptr[i]; + rx_reor_tbl_ptr->rx_reorder_ptr[i] = MNULL; + pmpriv->adapter->callbacks.moal_spin_unlock(pmpriv->adapter-> + pmoal_handle, + pmpriv-> + rx_pkt_lock); + wlan_11n_dispatch_pkt(priv, rx_tmp_ptr); + } + + pmpriv->adapter->callbacks.moal_spin_lock(pmpriv->adapter->pmoal_handle, + pmpriv->rx_pkt_lock); + /* + * We don't have a circular buffer, hence use rotation to simulate + * circular buffer + */ + if (i > 0) { + xchg = rx_reor_tbl_ptr->win_size - i; + for (j = 0; j < xchg; ++j) { + rx_reor_tbl_ptr->rx_reorder_ptr[j] = + rx_reor_tbl_ptr->rx_reorder_ptr[i + j]; + rx_reor_tbl_ptr->rx_reorder_ptr[i + j] = MNULL; + } + } + + rx_reor_tbl_ptr->start_win = (rx_reor_tbl_ptr->start_win + i) + & (MAX_TID_VALUE - 1); + + pmpriv->adapter->callbacks.moal_spin_unlock(pmpriv->adapter-> + pmoal_handle, + pmpriv->rx_pkt_lock); + LEAVE(); + return ret; +} + +/** + * @brief This function delete rxreorder table's entry + * and free the memory + * + * @param priv A pointer to mlan_private + * @param rx_reor_tbl_ptr A pointer to structure RxReorderTbl + * + * @return N/A + */ +static t_void +wlan_11n_delete_rxreorder_tbl_entry(mlan_private *priv, + RxReorderTbl *rx_reor_tbl_ptr) +{ + pmlan_adapter pmadapter = priv->adapter; + + ENTER(); + + if (!rx_reor_tbl_ptr) { + LEAVE(); + return; + } + mlan_block_rx_process(pmadapter, MTRUE); + + wlan_11n_dispatch_pkt_until_start_win(priv, rx_reor_tbl_ptr, + (rx_reor_tbl_ptr->start_win + + rx_reor_tbl_ptr->win_size) + & (MAX_TID_VALUE - 1)); + + if (rx_reor_tbl_ptr->timer_context.timer) { + if (rx_reor_tbl_ptr->timer_context.timer_is_set) { + priv->adapter->callbacks.moal_stop_timer(pmadapter-> + pmoal_handle, + rx_reor_tbl_ptr->timer_context. + timer); + rx_reor_tbl_ptr->timer_context.timer_is_set = MFALSE; + } + priv->adapter->callbacks.moal_free_timer(pmadapter-> + pmoal_handle, + rx_reor_tbl_ptr->timer_context. + timer); + rx_reor_tbl_ptr->timer_context.timer = MNULL; + } + + PRINTM(MDAT_D, "Delete rx_reor_tbl_ptr: %p\n", rx_reor_tbl_ptr); + util_unlink_list(pmadapter->pmoal_handle, + &priv->rx_reorder_tbl_ptr, + (pmlan_linked_list)rx_reor_tbl_ptr, + pmadapter->callbacks.moal_spin_lock, + pmadapter->callbacks.moal_spin_unlock); + + pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)rx_reor_tbl_ptr-> + rx_reorder_ptr); + pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)rx_reor_tbl_ptr); + mlan_block_rx_process(pmadapter, MFALSE); + + LEAVE(); +} + +/** + * @brief This function returns the last used sequence number + * + * @param rx_reorder_tbl_ptr A pointer to structure RxReorderTbl + * + * @return Last used sequence number + */ +static int +wlan_11n_find_last_seqnum(RxReorderTbl *rx_reorder_tbl_ptr) +{ + int i; + + ENTER(); + for (i = (rx_reorder_tbl_ptr->win_size - 1); i >= 0; --i) { + if (rx_reorder_tbl_ptr->rx_reorder_ptr[i]) { + LEAVE(); + return i; + } + } + LEAVE(); + return -1; +} + +/** + * @brief This function flushes all data + * + * @param priv A pointer to mlan_private structure + * @param rx_reor_tbl_ptr A pointer to RxReorderTbl + * + * @return N/A + */ +static t_void +wlan_start_flush_data(mlan_private *priv, RxReorderTbl *rx_reor_tbl_ptr) +{ + + int startWin; + + ENTER(); + wlan_11n_display_tbl_ptr(priv->adapter, rx_reor_tbl_ptr); + + startWin = wlan_11n_find_last_seqnum(rx_reor_tbl_ptr); + if (startWin >= 0) { + PRINTM(MINFO, "Flush data %d\n", startWin); + wlan_11n_dispatch_pkt_until_start_win(priv, rx_reor_tbl_ptr, + ((rx_reor_tbl_ptr-> + start_win + startWin + + 1) & (MAX_TID_VALUE - + 1))); + } + wlan_11n_display_tbl_ptr(priv->adapter, rx_reor_tbl_ptr); + LEAVE(); +} + +/** + * @brief This function set the flag to flushes data + * + * @param context Reorder context pointer + * + * @return N/A + */ +static t_void +wlan_flush_data(t_void *context) +{ + reorder_tmr_cnxt_t *reorder_cnxt = (reorder_tmr_cnxt_t *)context; + ENTER(); + /* Set the flag to flush data */ + reorder_cnxt->ptr->flush_data = MTRUE; + reorder_cnxt->timer_is_set = MFALSE; + LEAVE(); +} + +/** + * @brief This function will create a entry in rx reordering table for the + * given ta/tid and will initialize it with seq_num, win_size + * + * @param priv A pointer to mlan_private + * @param ta ta to find in reordering table + * @param tid tid to find in reordering table + * @param win_size win_size for the give ta/tid pair. + * @param seq_num Starting sequence number for current entry. + * + * @return N/A + */ +static t_void +wlan_11n_create_rxreorder_tbl(mlan_private *priv, t_u8 *ta, int tid, + int win_size, int seq_num) +{ + int i; + pmlan_adapter pmadapter = priv->adapter; + RxReorderTbl *rx_reor_tbl_ptr, *new_node; + sta_node *sta_ptr = MNULL; + t_u16 last_seq = 0; + + ENTER(); + + /* + * If we get a TID, ta pair which is already present dispatch all the + * the packets and move the window size until the ssn + */ + rx_reor_tbl_ptr = wlan_11n_get_rxreorder_tbl(priv, tid, ta); + if (rx_reor_tbl_ptr) { + wlan_11n_dispatch_pkt_until_start_win(priv, + rx_reor_tbl_ptr, seq_num); + } else { + PRINTM(MDAT_D, "%s: seq_num %d, tid %d, ta " MACSTR + ", win_size %d\n", __func__, + seq_num, tid, MAC2STR(ta), win_size); + if (pmadapter->callbacks. + moal_malloc(pmadapter->pmoal_handle, sizeof(RxReorderTbl), + MLAN_MEM_DEF, (t_u8 **)&new_node)) { + PRINTM(MERROR, "Rx reorder memory allocation failed\n"); + LEAVE(); + return; + } + + util_init_list((pmlan_linked_list)new_node); + new_node->tid = tid; + memcpy(pmadapter, new_node->ta, ta, MLAN_MAC_ADDR_LENGTH); + new_node->start_win = seq_num; + if (queuing_ra_based(priv)) { + /* TODO for adhoc */ + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + sta_ptr = wlan_get_station_entry(priv, ta); + if (sta_ptr) + last_seq = sta_ptr->rx_seq[tid]; + } + PRINTM(MINFO, "UAP/ADHOC:last_seq=%d start_win=%d\n", + last_seq, new_node->start_win); + } else { + sta_ptr = wlan_get_station_entry(priv, ta); + if (sta_ptr) + last_seq = sta_ptr->rx_seq[tid]; + else + last_seq = priv->rx_seq[tid]; + } + new_node->last_seq = last_seq; + new_node->win_size = win_size; + new_node->force_no_drop = MFALSE; + new_node->check_start_win = MTRUE; + + if (pmadapter->callbacks. + moal_malloc(pmadapter->pmoal_handle, + sizeof(t_void *) * win_size, MLAN_MEM_DEF, + (t_u8 **)&new_node->rx_reorder_ptr)) { + PRINTM(MERROR, + "Rx reorder table memory allocation" "failed\n"); + pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)new_node); + LEAVE(); + return; + } + + PRINTM(MDAT_D, + "Create ReorderPtr: %p start_win=%d last_seq=%d\n", + new_node, new_node->start_win, last_seq); + new_node->timer_context.ptr = new_node; + new_node->timer_context.priv = priv; + new_node->timer_context.timer_is_set = MFALSE; + new_node->ba_status = BA_STREAM_SETUP_INPROGRESS; + + pmadapter->callbacks.moal_init_timer(pmadapter->pmoal_handle, + &new_node-> + timer_context.timer, + wlan_flush_data, + &new_node->timer_context); + + for (i = 0; i < win_size; ++i) + new_node->rx_reorder_ptr[i] = MNULL; + + util_enqueue_list_tail(pmadapter->pmoal_handle, + &priv->rx_reorder_tbl_ptr, + (pmlan_linked_list)new_node, + pmadapter->callbacks.moal_spin_lock, + pmadapter->callbacks.moal_spin_unlock); + } + + LEAVE(); +} + +/******************************************************** + Global Functions +********************************************************/ + +/** + * @brief This function will return the pointer to a entry in rx reordering + * table which matches the give TA/TID pair + * + * @param priv A pointer to mlan_private + * @param ta ta to find in reordering table + * @param tid tid to find in reordering table + * + * @return A pointer to structure RxReorderTbl + */ +RxReorderTbl * +wlan_11n_get_rxreorder_tbl(mlan_private *priv, int tid, t_u8 *ta) +{ + RxReorderTbl *rx_reor_tbl_ptr; + + ENTER(); + + rx_reor_tbl_ptr = + (RxReorderTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->rx_reorder_tbl_ptr, MNULL, + MNULL); + if (!rx_reor_tbl_ptr) { + LEAVE(); + return MNULL; + } + + while (rx_reor_tbl_ptr != (RxReorderTbl *)&priv->rx_reorder_tbl_ptr) { + if ((!memcmp + (priv->adapter, rx_reor_tbl_ptr->ta, ta, + MLAN_MAC_ADDR_LENGTH)) && (rx_reor_tbl_ptr->tid == tid)) { + LEAVE(); + return rx_reor_tbl_ptr; + } + + rx_reor_tbl_ptr = rx_reor_tbl_ptr->pnext; + } + + LEAVE(); + return MNULL; +} + +/** + * @brief This function prepares command for adding a block ack + * request. + * + * @param priv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_11n_addba_req(mlan_private *priv, + HostCmd_DS_COMMAND *cmd, t_void *pdata_buf) +{ + HostCmd_DS_11N_ADDBA_REQ *padd_ba_req = (HostCmd_DS_11N_ADDBA_REQ *) + &cmd->params.add_ba_req; + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_11N_ADDBA_REQ); + cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_11N_ADDBA_REQ) + + S_DS_GEN); + + memcpy(priv->adapter, padd_ba_req, pdata_buf, + sizeof(HostCmd_DS_11N_ADDBA_REQ)); + padd_ba_req->block_ack_param_set = + wlan_cpu_to_le16(padd_ba_req->block_ack_param_set); + padd_ba_req->block_ack_tmo = + wlan_cpu_to_le16(padd_ba_req->block_ack_tmo); + padd_ba_req->ssn = wlan_cpu_to_le16(padd_ba_req->ssn); + padd_ba_req->add_req_result = 0; + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command for adding a block ack + * response. + * + * @param priv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_11n_addba_rspgen(mlan_private *priv, + HostCmd_DS_COMMAND *cmd, void *pdata_buf) +{ + HostCmd_DS_11N_ADDBA_RSP *padd_ba_rsp = (HostCmd_DS_11N_ADDBA_RSP *) + &cmd->params.add_ba_rsp; + HostCmd_DS_11N_ADDBA_REQ *pevt_addba_req = + (HostCmd_DS_11N_ADDBA_REQ *)pdata_buf; + t_u8 tid = 0; + int win_size = 0; + + ENTER(); + + pevt_addba_req->block_ack_param_set = + wlan_le16_to_cpu(pevt_addba_req->block_ack_param_set); + pevt_addba_req->block_ack_tmo = + wlan_le16_to_cpu(pevt_addba_req->block_ack_tmo); + pevt_addba_req->ssn = wlan_le16_to_cpu(pevt_addba_req->ssn); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_11N_ADDBA_RSP); + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_11N_ADDBA_RSP) + S_DS_GEN); + + memcpy(priv->adapter, padd_ba_rsp->peer_mac_addr, + pevt_addba_req->peer_mac_addr, MLAN_MAC_ADDR_LENGTH); + padd_ba_rsp->dialog_token = pevt_addba_req->dialog_token; + padd_ba_rsp->block_ack_tmo = + wlan_cpu_to_le16(pevt_addba_req->block_ack_tmo); + padd_ba_rsp->ssn = wlan_cpu_to_le16(pevt_addba_req->ssn); + padd_ba_rsp->add_rsp_result = 0; + + padd_ba_rsp->block_ack_param_set = pevt_addba_req->block_ack_param_set; + tid = (padd_ba_rsp->block_ack_param_set & BLOCKACKPARAM_TID_MASK) + >> BLOCKACKPARAM_TID_POS; + if (priv->addba_reject[tid] +#ifdef STA_SUPPORT + || ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) + && priv->wps.session_enable) +#endif +#ifdef UAP_SUPPORT + || ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) + && (util_scalar_read(priv->adapter->pmoal_handle, + &priv->adapter->pending_bridge_pkts, + priv->adapter->callbacks.moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock) > RX_LOW_THRESHOLD)) +#endif + ) + padd_ba_rsp->status_code = + wlan_cpu_to_le16(ADDBA_RSP_STATUS_DECLINED); + else + padd_ba_rsp->status_code = + wlan_cpu_to_le16(ADDBA_RSP_STATUS_ACCEPT); + padd_ba_rsp->block_ack_param_set &= ~BLOCKACKPARAM_WINSIZE_MASK; + if (!priv->add_ba_param.rx_amsdu || + (priv->aggr_prio_tbl[tid].amsdu == BA_STREAM_NOT_ALLOWED)) + /* We do not support AMSDU inside AMPDU, hence reset the bit */ + padd_ba_rsp->block_ack_param_set &= + ~BLOCKACKPARAM_AMSDU_SUPP_MASK; + + padd_ba_rsp->block_ack_param_set |= (priv->add_ba_param.rx_win_size << + BLOCKACKPARAM_WINSIZE_POS); + win_size = + (padd_ba_rsp->block_ack_param_set & BLOCKACKPARAM_WINSIZE_MASK) + >> BLOCKACKPARAM_WINSIZE_POS; + + if (win_size == 0) + padd_ba_rsp->status_code = + wlan_cpu_to_le16(ADDBA_RSP_STATUS_DECLINED); + + padd_ba_rsp->block_ack_param_set = + wlan_cpu_to_le16(padd_ba_rsp->block_ack_param_set); + + if (padd_ba_rsp->status_code == + wlan_cpu_to_le16(ADDBA_RSP_STATUS_ACCEPT)) + wlan_11n_create_rxreorder_tbl(priv, + pevt_addba_req->peer_mac_addr, + tid, win_size, + pevt_addba_req->ssn); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command for deleting a block ack + * request. + * + * @param priv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_11n_delba(mlan_private *priv, HostCmd_DS_COMMAND *cmd, void *pdata_buf) +{ + HostCmd_DS_11N_DELBA *pdel_ba = (HostCmd_DS_11N_DELBA *) + &cmd->params.del_ba; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_11N_DELBA); + cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_11N_DELBA) + S_DS_GEN); + + memcpy(priv->adapter, pdel_ba, pdata_buf, sizeof(HostCmd_DS_11N_DELBA)); + pdel_ba->del_ba_param_set = wlan_cpu_to_le16(pdel_ba->del_ba_param_set); + pdel_ba->reason_code = wlan_cpu_to_le16(pdel_ba->reason_code); + pdel_ba->del_result = 0; + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function will identify if RxReodering is needed for the packet + * and will do the reordering if required before sending it to kernel + * + * @param priv A pointer to mlan_private + * @param seq_num Seqence number of the current packet + * @param tid Tid of the current packet + * @param ta Transmiter address of the current packet + * @param pkt_type Packetype for the current packet (to identify if its a BAR) + * @param payload Pointer to the payload + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +mlan_11n_rxreorder_pkt(void *priv, t_u16 seq_num, t_u16 tid, + t_u8 *ta, t_u8 pkt_type, void *payload) +{ + RxReorderTbl *rx_reor_tbl_ptr; + int prev_start_win, start_win, end_win, win_size; + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_adapter pmadapter = ((mlan_private *)priv)->adapter; + + ENTER(); + + rx_reor_tbl_ptr = + wlan_11n_get_rxreorder_tbl((mlan_private *)priv, tid, ta); + if (!rx_reor_tbl_ptr) { + if (pkt_type != PKT_TYPE_BAR) + wlan_11n_dispatch_pkt(priv, payload); + + LEAVE(); + return ret; + + } else { + if (rx_reor_tbl_ptr->flush_data) { + rx_reor_tbl_ptr->flush_data = MFALSE; + wlan_start_flush_data(priv, rx_reor_tbl_ptr); + } + if ((pkt_type == PKT_TYPE_AMSDU) && !rx_reor_tbl_ptr->amsdu) { + wlan_11n_dispatch_pkt(priv, payload); + LEAVE(); + return ret; + } + if (pkt_type == PKT_TYPE_BAR) + PRINTM(MDAT_D, "BAR "); + if (pkt_type == PKT_TYPE_AMSDU) + PRINTM(MDAT_D, "AMSDU "); + + if (rx_reor_tbl_ptr->check_start_win) { + rx_reor_tbl_ptr->check_start_win = MFALSE; + if ((seq_num != rx_reor_tbl_ptr->start_win) && + (rx_reor_tbl_ptr->last_seq != DEFAULT_SEQ_NUM)) { + end_win = + (rx_reor_tbl_ptr->start_win + + rx_reor_tbl_ptr->win_size - + 1) & (MAX_TID_VALUE - 1); + if (((end_win > rx_reor_tbl_ptr->start_win) + && (rx_reor_tbl_ptr->last_seq >= + rx_reor_tbl_ptr->start_win) + && (rx_reor_tbl_ptr->last_seq < end_win)) + || ((end_win < rx_reor_tbl_ptr->start_win) + && + ((rx_reor_tbl_ptr->last_seq >= + rx_reor_tbl_ptr->start_win) || + (rx_reor_tbl_ptr->last_seq < + end_win)))) { + PRINTM(MDAT_D, + "Update start_win: last_seq=%d, start_win=%d seq_num=%d\n", + rx_reor_tbl_ptr->last_seq, + rx_reor_tbl_ptr->start_win, + seq_num); + rx_reor_tbl_ptr->start_win = + rx_reor_tbl_ptr->last_seq + 1; + } else if ((seq_num < + rx_reor_tbl_ptr->start_win) && + (seq_num > + rx_reor_tbl_ptr->last_seq)) { + PRINTM(MDAT_D, + "Update start_win: last_seq=%d, start_win=%d seq_num=%d\n", + rx_reor_tbl_ptr->last_seq, + rx_reor_tbl_ptr->start_win, + seq_num); + rx_reor_tbl_ptr->start_win = + rx_reor_tbl_ptr->last_seq + 1; + } + } + } + if (rx_reor_tbl_ptr->force_no_drop) { + wlan_11n_dispatch_pkt_until_start_win(priv, + rx_reor_tbl_ptr, + (rx_reor_tbl_ptr-> + start_win + + rx_reor_tbl_ptr-> + win_size) + & (MAX_TID_VALUE - + 1)); + if (pkt_type != PKT_TYPE_BAR) + rx_reor_tbl_ptr->start_win = seq_num; + mlan_11n_rxreorder_timer_restart(pmadapter, + rx_reor_tbl_ptr); + } + + prev_start_win = start_win = rx_reor_tbl_ptr->start_win; + win_size = rx_reor_tbl_ptr->win_size; + end_win = ((start_win + win_size) - 1) & (MAX_TID_VALUE - 1); + + PRINTM(MDAT_D, "TID %d, TA " MACSTR "\n", tid, MAC2STR(ta)); + PRINTM(MDAT_D, + "1:seq_num %d start_win %d win_size %d end_win %d\n", + seq_num, start_win, win_size, end_win); + /* + * If seq_num is less then starting win then ignore and drop + * the packet + */ + if (rx_reor_tbl_ptr->force_no_drop) { + PRINTM(MDAT_D, "No drop packet\n"); + rx_reor_tbl_ptr->force_no_drop = MFALSE; + } else { + /* Wrap */ + if ((start_win + TWOPOW11) > (MAX_TID_VALUE - 1)) { + if (seq_num >= ((start_win + (TWOPOW11)) & + (MAX_TID_VALUE - 1)) && + (seq_num < start_win)) { + if (pkt_type == PKT_TYPE_BAR) + PRINTM(MDAT_D, + "BAR: start_win=%d, end_win=%d, seq_num=%d\n", + start_win, end_win, + seq_num); + ret = MLAN_STATUS_FAILURE; + goto done; + } + } else if ((seq_num < start_win) || + (seq_num >= (start_win + (TWOPOW11)))) { + if (pkt_type == PKT_TYPE_BAR) + PRINTM(MDAT_D, + "BAR: start_win=%d, end_win=%d, seq_num=%d\n", + start_win, end_win, seq_num); + ret = MLAN_STATUS_FAILURE; + goto done; + } + } + + /* + * If this packet is a BAR we adjust seq_num as + * WinStart = seq_num + */ + if (pkt_type == PKT_TYPE_BAR) + seq_num = + ((seq_num + win_size) - 1) & (MAX_TID_VALUE - + 1); + + PRINTM(MDAT_D, + "2:seq_num %d start_win %d win_size %d end_win %d\n", + seq_num, start_win, win_size, end_win); + + if (((end_win < start_win) && + (seq_num < start_win) && (seq_num > end_win)) + || ((end_win > start_win) && + ((seq_num > end_win) || (seq_num < start_win)))) { + + end_win = seq_num; + if (((seq_num - win_size) + 1) >= 0) + start_win = (end_win - win_size) + 1; + else + start_win = (MAX_TID_VALUE - + (win_size - seq_num)) + 1; + ret = wlan_11n_dispatch_pkt_until_start_win(priv, + rx_reor_tbl_ptr, + start_win); + if (ret) + goto done; + } + + PRINTM(MDAT_D, "3:seq_num %d start_win %d win_size %d" + " end_win %d\n", seq_num, start_win, win_size, end_win); + if (pkt_type != PKT_TYPE_BAR) { + if (seq_num >= start_win) { + if (rx_reor_tbl_ptr->rx_reorder_ptr[seq_num + - + start_win]) + { + PRINTM(MDAT_D, "Drop Duplicate Pkt\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + rx_reor_tbl_ptr->rx_reorder_ptr[seq_num + - start_win] = + payload; + } else { /* Wrap condition */ + if (rx_reor_tbl_ptr->rx_reorder_ptr[(seq_num + + + (MAX_TID_VALUE)) + - + start_win]) + { + PRINTM(MDAT_D, "Drop Duplicate Pkt\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + rx_reor_tbl_ptr->rx_reorder_ptr[(seq_num + + + (MAX_TID_VALUE)) + - start_win] = + payload; + } + } + + wlan_11n_display_tbl_ptr(pmadapter, rx_reor_tbl_ptr); + + /* + * Dispatch all packets sequentially from start_win until a + * hole is found and adjust the start_win appropriately + */ + ret = wlan_11n_scan_and_dispatch(priv, rx_reor_tbl_ptr); + + wlan_11n_display_tbl_ptr(pmadapter, rx_reor_tbl_ptr); + } + +done: + if (!rx_reor_tbl_ptr->timer_context.timer_is_set || + (prev_start_win != rx_reor_tbl_ptr->start_win)) { + + mlan_11n_rxreorder_timer_restart(pmadapter, rx_reor_tbl_ptr); + } + + LEAVE(); + return ret; +} + +/** + * @brief This function will delete an entry for a given tid/ta pair. tid/ta + * are taken from delba_event body + * + * @param priv A pointer to mlan_private + * @param tid tid to send delba + * @param peer_mac MAC address to send delba + * @param type TYPE_DELBA_SENT or TYPE_DELBA_RECEIVE + * @param initiator MTRUE if we are initiator of ADDBA, MFALSE otherwise + * + * @return N/A + */ +void +mlan_11n_delete_bastream_tbl(mlan_private *priv, int tid, + t_u8 *peer_mac, t_u8 type, int initiator) +{ + RxReorderTbl *rx_reor_tbl_ptr; + TxBAStreamTbl *ptxtbl; + t_u8 cleanup_rx_reorder_tbl; + raListTbl *ra_list = MNULL; + int tid_down; + + ENTER(); + + if (type == TYPE_DELBA_RECEIVE) + cleanup_rx_reorder_tbl = (initiator) ? MTRUE : MFALSE; + else + cleanup_rx_reorder_tbl = (initiator) ? MFALSE : MTRUE; + + PRINTM(MEVENT, "delete_bastream_tbl: " MACSTR " tid=%d, type=%d" + "initiator=%d\n", MAC2STR(peer_mac), tid, type, initiator); + + if (cleanup_rx_reorder_tbl) { + rx_reor_tbl_ptr = + wlan_11n_get_rxreorder_tbl(priv, tid, peer_mac); + if (!rx_reor_tbl_ptr) { + PRINTM(MWARN, "TID, TA not found in table!\n"); + LEAVE(); + return; + } + wlan_11n_delete_rxreorder_tbl_entry(priv, rx_reor_tbl_ptr); + } else { + ptxtbl = wlan_11n_get_txbastream_tbl(priv, tid, peer_mac); + if (!ptxtbl) { + PRINTM(MWARN, "TID, RA not found in table!\n"); + LEAVE(); + return; + } + tid_down = wlan_get_wmm_tid_down(priv, tid); + ra_list = wlan_wmm_get_ralist_node(priv, tid_down, peer_mac); + if (ra_list) { + ra_list->amsdu_in_ampdu = MFALSE; + ra_list->ba_status = BA_STREAM_NOT_SETUP; + } + wlan_11n_delete_txbastream_tbl_entry(priv, ptxtbl); + } + + LEAVE(); +} + +/** + * @brief This function handles the command response of + * a block ack response + * + * @param priv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_11n_addba_resp(mlan_private *priv, HostCmd_DS_COMMAND *resp) +{ + HostCmd_DS_11N_ADDBA_RSP *padd_ba_rsp = (HostCmd_DS_11N_ADDBA_RSP *) + &resp->params.add_ba_rsp; + int tid; + RxReorderTbl *rx_reor_tbl_ptr = MNULL; + + ENTER(); + + padd_ba_rsp->status_code = wlan_le16_to_cpu(padd_ba_rsp->status_code); + padd_ba_rsp->block_ack_param_set = + wlan_le16_to_cpu(padd_ba_rsp->block_ack_param_set); + padd_ba_rsp->block_ack_tmo = + wlan_le16_to_cpu(padd_ba_rsp->block_ack_tmo); + padd_ba_rsp->ssn = wlan_le16_to_cpu(padd_ba_rsp->ssn); + + tid = (padd_ba_rsp->block_ack_param_set & BLOCKACKPARAM_TID_MASK) + >> BLOCKACKPARAM_TID_POS; + /* Check if we had rejected the ADDBA, if yes then do not create the + stream */ + if (padd_ba_rsp->status_code == BA_RESULT_SUCCESS) { + PRINTM(MCMND, + "ADDBA RSP: " MACSTR + " tid=%d ssn=%d win_size=%d,amsdu=%d\n", + MAC2STR(padd_ba_rsp->peer_mac_addr), tid, + padd_ba_rsp->ssn, + ((padd_ba_rsp-> + block_ack_param_set & BLOCKACKPARAM_WINSIZE_MASK) + >> BLOCKACKPARAM_WINSIZE_POS), + padd_ba_rsp-> + block_ack_param_set & BLOCKACKPARAM_AMSDU_SUPP_MASK); + + rx_reor_tbl_ptr = + wlan_11n_get_rxreorder_tbl(priv, tid, + padd_ba_rsp->peer_mac_addr); + if (rx_reor_tbl_ptr) { + rx_reor_tbl_ptr->ba_status = BA_STREAM_SETUP_COMPLETE; + if ((padd_ba_rsp-> + block_ack_param_set & + BLOCKACKPARAM_AMSDU_SUPP_MASK) && + priv->add_ba_param.rx_amsdu && + (priv->aggr_prio_tbl[tid].amsdu != + BA_STREAM_NOT_ALLOWED)) + rx_reor_tbl_ptr->amsdu = MTRUE; + else + rx_reor_tbl_ptr->amsdu = MFALSE; + } + } else { + PRINTM(MERROR, "ADDBA RSP: Failed(" MACSTR " tid=%d)\n", + MAC2STR(padd_ba_rsp->peer_mac_addr), tid); + rx_reor_tbl_ptr = wlan_11n_get_rxreorder_tbl(priv, tid, + padd_ba_rsp-> + peer_mac_addr); + if (rx_reor_tbl_ptr) + wlan_11n_delete_rxreorder_tbl_entry(priv, + rx_reor_tbl_ptr); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles ba_stream_timeout event + * + * @param priv A pointer to mlan_private + * @param event A pointer to structure HostCmd_DS_11N_BATIMEOUT + * + * @return N/A + */ +void +wlan_11n_ba_stream_timeout(mlan_private *priv, HostCmd_DS_11N_BATIMEOUT *event) +{ + HostCmd_DS_11N_DELBA delba; + + ENTER(); + + DBG_HEXDUMP(MCMD_D, "Event:", (t_u8 *)event, 20); + + memset(priv->adapter, &delba, 0, sizeof(HostCmd_DS_11N_DELBA)); + memcpy(priv->adapter, delba.peer_mac_addr, event->peer_mac_addr, + MLAN_MAC_ADDR_LENGTH); + + delba.del_ba_param_set |= (t_u16)event->tid << DELBA_TID_POS; + delba.del_ba_param_set |= + (t_u16)event->origninator << DELBA_INITIATOR_POS; + delba.reason_code = REASON_CODE_STA_TIMEOUT; + wlan_prepare_cmd(priv, HostCmd_CMD_11N_DELBA, 0, 0, MNULL, &delba); + + LEAVE(); + return; +} + +/** + * @brief This function cleans up reorder tbl + * + * @param priv A pointer to mlan_private + * + * @return N/A + */ +void +wlan_11n_cleanup_reorder_tbl(mlan_private *priv) +{ + RxReorderTbl *del_tbl_ptr; + + ENTER(); + + while ((del_tbl_ptr = (RxReorderTbl *) + util_peek_list(priv->adapter->pmoal_handle, + &priv->rx_reorder_tbl_ptr, + priv->adapter->callbacks.moal_spin_lock, + priv->adapter->callbacks.moal_spin_unlock))) { + wlan_11n_delete_rxreorder_tbl_entry(priv, del_tbl_ptr); + } + + util_init_list((pmlan_linked_list)&priv->rx_reorder_tbl_ptr); + + memset(priv->adapter, priv->rx_seq, 0xff, sizeof(priv->rx_seq)); + LEAVE(); +} + +/** + * @brief This function handle the rxba_sync event + * + * @param priv A pointer to mlan_private + * @param event_buf A pointer to event buf + * @param len event_buf length + * @return N/A + */ +void +wlan_11n_rxba_sync_event(mlan_private *priv, t_u8 *event_buf, t_u16 len) +{ + MrvlIEtypes_RxBaSync_t *tlv_rxba = (MrvlIEtypes_RxBaSync_t *)event_buf; + t_u16 tlv_type, tlv_len; + RxReorderTbl *rx_reor_tbl_ptr = MNULL; + t_u8 i, j; + t_u16 seq_num = 0; + int tlv_buf_left = len; + ENTER(); + + DBG_HEXDUMP(MEVT_D, "RXBA_SYNC_EVT", event_buf, len); + while (tlv_buf_left >= sizeof(MrvlIEtypes_RxBaSync_t)) { + tlv_type = wlan_le16_to_cpu(tlv_rxba->header.type); + tlv_len = wlan_le16_to_cpu(tlv_rxba->header.len); + if (tlv_type != TLV_TYPE_RXBA_SYNC) { + PRINTM(MERROR, "Wrong TLV id=0x%x\n", tlv_type); + goto done; + } + tlv_rxba->seq_num = wlan_le16_to_cpu(tlv_rxba->seq_num); + tlv_rxba->bitmap_len = wlan_le16_to_cpu(tlv_rxba->bitmap_len); + PRINTM(MEVENT, MACSTR " tid=%d seq_num=%d bitmap_len=%d\n", + MAC2STR(tlv_rxba->mac), tlv_rxba->tid, tlv_rxba->seq_num, + tlv_rxba->bitmap_len); + rx_reor_tbl_ptr = + wlan_11n_get_rxreorder_tbl(priv, tlv_rxba->tid, + tlv_rxba->mac); + if (!rx_reor_tbl_ptr) { + PRINTM(MEVENT, "Can not find rx_reorder_tbl\n"); + goto done; + } + if (rx_reor_tbl_ptr->force_no_drop) { + PRINTM(MEVENT, "Ignore RXBA_SYNC_EVT in resume\n"); + goto done; + } + for (i = 0; i < tlv_rxba->bitmap_len; i++) { + for (j = 0; j < 8; j++) { + if (tlv_rxba->bitmap[i] & (1 << j)) { + seq_num = + (tlv_rxba->seq_num + i * 8 + + j) & (MAX_TID_VALUE - 1); + PRINTM(MEVENT, + "Fw dropped packet, seq=%d start_win=%d, win_size=%d\n", + seq_num, + rx_reor_tbl_ptr->start_win, + rx_reor_tbl_ptr->win_size); + if (MLAN_STATUS_SUCCESS != + mlan_11n_rxreorder_pkt(priv, + seq_num, + tlv_rxba-> + tid, + tlv_rxba-> + mac, 0, + (t_void *) + RX_PKT_DROPPED_IN_FW)) + { + PRINTM(MERROR, + "Fail to handle dropped packet, seq=%d\n", + seq_num); + } + } + } + } + tlv_buf_left -= (sizeof(MrvlIEtypesHeader_t) + tlv_len); + tlv_rxba = + (MrvlIEtypes_RxBaSync_t *)((t_u8 *)tlv_rxba + tlv_len + + sizeof(MrvlIEtypesHeader_t)); + } +done: + LEAVE(); + return; +} + +/** + * @brief This function cleans up reorder tbl for specific station + * + * @param priv A pointer to mlan_private + * @param ta ta to find in reordering table + * @return N/A + */ +void +wlan_cleanup_reorder_tbl(mlan_private *priv, t_u8 *ta) +{ + RxReorderTbl *rx_reor_tbl_ptr = MNULL; + t_u8 i; + ENTER(); + for (i = 0; i < MAX_NUM_TID; ++i) { + rx_reor_tbl_ptr = wlan_11n_get_rxreorder_tbl(priv, i, ta); + if (rx_reor_tbl_ptr) + wlan_11n_delete_rxreorder_tbl_entry(priv, + rx_reor_tbl_ptr); + } + LEAVE(); + return; +} + +/** + * @brief This function will set force_no_drop flag in rxreorder_tbl. + * + * @param priv A pointer to mlan_private + * @param flag MTRUE/MFALSE + * + * @return N/A + */ +void +wlan_set_rxreorder_tbl_no_drop_flag(mlan_private *priv, t_u8 flag) +{ + RxReorderTbl *rx_reor_tbl_ptr; + + ENTER(); + + rx_reor_tbl_ptr = + (RxReorderTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->rx_reorder_tbl_ptr, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); + if (!rx_reor_tbl_ptr) { + LEAVE(); + return; + } + + while (rx_reor_tbl_ptr != (RxReorderTbl *)&priv->rx_reorder_tbl_ptr) { + rx_reor_tbl_ptr->force_no_drop = flag; + rx_reor_tbl_ptr = rx_reor_tbl_ptr->pnext; + } + + LEAVE(); + return; +} + +/** + * @brief This function update all the rx_reorder_tbl's force_no_drop flag + * + * @param pmadapter A pointer to mlan_adapter + * @param flag MTRUE/MFALSE + * @return N/A + */ +void +wlan_update_rxreorder_tbl(pmlan_adapter pmadapter, t_u8 flag) +{ + t_u8 i; + pmlan_private priv = MNULL; + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) { + priv = pmadapter->priv[i]; + wlan_set_rxreorder_tbl_no_drop_flag(priv, flag); + } + } + return; +} + +/** + * @brief This function update all the rx_win_size based on coex flag + * + * @param pmadapter A pointer to mlan_adapter + * @param coex_flag coex flag + * + * @return N/A + */ +void +wlan_update_ampdu_rxwinsize(pmlan_adapter pmadapter, t_u8 coex_flag) +{ + t_u8 i; + t_u32 rx_win_size = 0; + pmlan_private priv = MNULL; + + ENTER(); + if (!pmadapter->coex_rx_winsize) { + LEAVE(); + return; + } + PRINTM(MEVENT, "Update rxwinsize %d\n", coex_flag); + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) { + priv = pmadapter->priv[i]; + rx_win_size = priv->add_ba_param.rx_win_size; + if (coex_flag == MTRUE) { +#ifdef STA_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_STA) + priv->add_ba_param.rx_win_size = + MLAN_STA_COEX_AMPDU_DEF_RXWINSIZE; +#endif +#ifdef WIFI_DIRECT_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) + priv->add_ba_param.rx_win_size = + MLAN_WFD_COEX_AMPDU_DEF_RXWINSIZE; +#endif +#ifdef UAP_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_UAP) + priv->add_ba_param.rx_win_size = + MLAN_UAP_COEX_AMPDU_DEF_RXWINSIZE; +#endif + + } else { +#ifdef STA_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_STA) + priv->add_ba_param.rx_win_size = + MLAN_STA_AMPDU_DEF_RXWINSIZE; +#endif +#ifdef WIFI_DIRECT_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) + priv->add_ba_param.rx_win_size = + pmadapter->psdio_device-> + ampdu_info-> + ampdu_wfd_txrxwinsize; +#endif +#ifdef UAP_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_UAP) + priv->add_ba_param.rx_win_size = + pmadapter->psdio_device-> + ampdu_info->ampdu_uap_rxwinsize; +#endif + } + if (pmadapter->coex_win_size && + pmadapter->coex_rx_win_size) + priv->add_ba_param.rx_win_size = + pmadapter->coex_rx_win_size; + if (rx_win_size != priv->add_ba_param.rx_win_size) { + if (priv->media_connected == MTRUE) { + for (i = 0; i < MAX_NUM_TID; i++) + wlan_11n_delba(priv, i); + wlan_recv_event(priv, + MLAN_EVENT_ID_DRV_DEFER_HANDLING, + MNULL); + } + } + } + } + LEAVE(); + return; +} + +/** + * @brief check coex for + * + * @param pmadapter A pointer to mlan_adapter + * + * @return N/A + */ +void +wlan_coex_ampdu_rxwinsize(pmlan_adapter pmadapter) +{ + t_u8 i; + pmlan_private priv = MNULL; + t_u8 count = 0; + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) { + priv = pmadapter->priv[i]; +#ifdef STA_SUPPORT + if (GET_BSS_ROLE((mlan_private *)priv) == + MLAN_BSS_ROLE_STA) { + if (priv->media_connected == MTRUE) + count++; + } +#endif +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE((mlan_private *)priv) == + MLAN_BSS_ROLE_UAP) { + if (priv->uap_bss_started) + count++; + } +#endif + } + if (count >= 2) + break; + } + if (count >= 2) + wlan_update_ampdu_rxwinsize(pmadapter, MTRUE); + else + wlan_update_ampdu_rxwinsize(pmadapter, MFALSE); + return; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11n_rxreorder.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11n_rxreorder.h new file mode 100644 index 00000000..8c98c956 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_11n_rxreorder.h @@ -0,0 +1,100 @@ +/** @file mlan_11n_rxreorder.h + * + * @brief This file contains related macros, enum, and struct + * of 11n RxReordering functionalities + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/******************************************************** +Change log: + 11/10/2008: initial version +********************************************************/ + +#ifndef _MLAN_11N_RXREORDER_H_ +#define _MLAN_11N_RXREORDER_H_ + +/** Max value a TID can take = 2^12 = 4096 */ +#define MAX_TID_VALUE (2 << 11) +/** 2^11 = 2048 */ +#define TWOPOW11 (2 << 10) + +/** Tid Mask used for extracting TID from BlockAckParamSet */ +#define BLOCKACKPARAM_TID_MASK 0x3C +/** Tid position in BlockAckParamSet */ +#define BLOCKACKPARAM_TID_POS 2 +/** WinSize Mask used for extracting WinSize from BlockAckParamSet */ +#define BLOCKACKPARAM_WINSIZE_MASK 0xffc0 +/** WinSize Mask used for extracting WinSize from BlockAckParamSet */ +#define BLOCKACKPARAM_AMSDU_SUPP_MASK 0x1 +/** WinSize position in BlockAckParamSet */ +#define BLOCKACKPARAM_WINSIZE_POS 6 +/** Position of TID in DelBA Param set */ +#define DELBA_TID_POS 12 +/** Position of INITIATOR in DelBA Param set */ +#define DELBA_INITIATOR_POS 11 +/** Reason code: Requested from peer STA as it does not want to + * use the mechanism */ +#define REASON_CODE_STA_DONT_WANT 37 +/** Reason code: Requested from peer STA due to timeout*/ +#define REASON_CODE_STA_TIMEOUT 39 +/** Type: send delba command */ +#define TYPE_DELBA_SENT 1 +/** Type: recieve delba command */ +#define TYPE_DELBA_RECEIVE 2 +/** Set Initiator Bit */ +#define DELBA_INITIATOR(paramset) (paramset = (paramset | (1 << 11))) +/** Reset Initiator Bit for recipient */ +#define DELBA_RECIPIENT(paramset) (paramset = (paramset & ~(1 << 11))) +/** Immediate block ack */ +#define IMMEDIATE_BLOCK_ACK 0x2 + +/** The request has been declined */ +#define ADDBA_RSP_STATUS_DECLINED 37 +/** ADDBA response status : Reject */ +#define ADDBA_RSP_STATUS_REJECT 1 +/** ADDBA response status : Accept */ +#define ADDBA_RSP_STATUS_ACCEPT 0 + +/** DEFAULT SEQ NUM */ +#define DEFAULT_SEQ_NUM 0xffff + +/** Indicate packet has been dropped in FW */ +#define RX_PKT_DROPPED_IN_FW 0xffffffff + +mlan_status mlan_11n_rxreorder_pkt(void *priv, t_u16 seqNum, t_u16 tid, + t_u8 *ta, t_u8 pkttype, void *payload); +void mlan_11n_delete_bastream_tbl(mlan_private *priv, int tid, + t_u8 *PeerMACAddr, t_u8 type, int initiator); +void wlan_11n_ba_stream_timeout(mlan_private *priv, + HostCmd_DS_11N_BATIMEOUT *event); +mlan_status wlan_ret_11n_addba_resp(mlan_private *priv, + HostCmd_DS_COMMAND *resp); +mlan_status wlan_cmd_11n_delba(mlan_private *priv, HostCmd_DS_COMMAND *cmd, + void *pdata_buf); +mlan_status wlan_cmd_11n_addba_rspgen(mlan_private *priv, + HostCmd_DS_COMMAND *cmd, void *pdata_buf); +mlan_status wlan_cmd_11n_addba_req(mlan_private *priv, HostCmd_DS_COMMAND *cmd, + void *pdata_buf); +void wlan_11n_cleanup_reorder_tbl(mlan_private *priv); +RxReorderTbl *wlan_11n_get_rxreorder_tbl(mlan_private *priv, int tid, t_u8 *ta); +void wlan_11n_rxba_sync_event(mlan_private *priv, t_u8 *event_buf, t_u16 len); +void wlan_update_rxreorder_tbl(pmlan_adapter pmadapter, t_u8 flag); +void wlan_coex_ampdu_rxwinsize(pmlan_adapter pmadapter); + +/** clean up reorder_tbl */ +void wlan_cleanup_reorder_tbl(mlan_private *priv, t_u8 *ta); +#endif /* _MLAN_11N_RXREORDER_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_cfp.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_cfp.c new file mode 100644 index 00000000..762bf7f2 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_cfp.c @@ -0,0 +1,1784 @@ +/** + * @file mlan_cfp.c + * + * @brief This file contains WLAN client mode channel, frequency and power + * related code + * + * Copyright (C) 2009-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/************************************************************* +Change Log: + 04/16/2009: initial version +************************************************************/ + +#include "mlan.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_join.h" +#include "mlan_main.h" + +/******************************************************** + Local Variables +********************************************************/ + +/** 100mW */ +#define WLAN_TX_PWR_DEFAULT 20 +/** 100mW */ +#define WLAN_TX_PWR_US_DEFAULT 20 +/** 100mW */ +#define WLAN_TX_PWR_JP_BG_DEFAULT 20 +/** 200mW */ +#define WLAN_TX_PWR_JP_A_DEFAULT 23 +/** 100mW */ +#define WLAN_TX_PWR_FR_100MW 20 +/** 10mW */ +#define WLAN_TX_PWR_FR_10MW 10 +/** 100mW */ +#define WLAN_TX_PWR_EMEA_DEFAULT 20 +/** 2000mW */ +#define WLAN_TX_PWR_CN_2000MW 33 +/** 200mW */ +#define WLAN_TX_PWR_200MW 23 +/** 1000mW */ +#define WLAN_TX_PWR_1000MW 30 +/** 30mW */ +#define WLAN_TX_PWR_SP_30MW 14 +/** 60mW */ +#define WLAN_TX_PWR_SP_60MW 17 +/** 25mW */ +#define WLAN_TX_PWR_25MW 14 +/** 250mW */ +#define WLAN_TX_PWR_250MW 24 + +/** Region code mapping */ +typedef struct _country_code_mapping { + /** Region */ + t_u8 country_code[COUNTRY_CODE_LEN]; + /** Code for B/G CFP table */ + t_u8 cfp_code_bg; + /** Code for A CFP table */ + t_u8 cfp_code_a; +} country_code_mapping_t; + +#define EU_CFP_CODE_BG 0x30 +#define EU_CFP_CODE_A 0x30 + +/** Region code mapping table */ +static country_code_mapping_t country_code_mapping[] = { + {"US", 0x10, 0x10}, /* US FCC */ + {"CA", 0x10, 0x20}, /* IC Canada */ + {"SG", 0x10, 0x10}, /* Singapore */ + {"EU", 0x30, 0x30}, /* ETSI */ + {"AU", 0x30, 0x30}, /* Australia */ + {"KR", 0x30, 0x30}, /* Republic Of Korea */ + {"JP", 0xFF, 0x40}, /* Japan */ + {"CN", 0x30, 0x50}, /* China */ + {"BR", 0x01, 0x09}, /* Brazil */ + {"RU", 0x30, 0x0f}, /* Russia */ +}; + +/** Country code for ETSI */ +static t_u8 eu_country_code_table[][COUNTRY_CODE_LEN] = { + "AL", "AD", "AT", "AU", "BY", "BE", "BA", "BG", "HR", "CY", + "CZ", "DK", "EE", "FI", "FR", "MK", "DE", "GR", "HU", "IS", + "IE", "IT", "KR", "LV", "LI", "LT", "LU", "MT", "MD", "MC", + "ME", "NL", "NO", "PL", "RO", "RU", "SM", "RS", "SI", "SK", + "ES", "SE", "CH", "TR", "UA", "UK" +}; + +/** + * The structure for Channel-Frequency-Power table + */ +typedef struct _cfp_table { + /** Region or Code */ + t_u8 code; + /** Frequency/Power */ + chan_freq_power_t *cfp; + /** No of CFP flag */ + int cfp_no; +} cfp_table_t; + +/* Format { Channel, Frequency (MHz), MaxTxPower } */ +/** Band: 'B/G', Region: USA FCC/Canada IC */ +static chan_freq_power_t channel_freq_power_US_BG[] = { + {1, 2412, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {2, 2417, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {3, 2422, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {4, 2427, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {5, 2432, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {6, 2437, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {7, 2442, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {8, 2447, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {9, 2452, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {10, 2457, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {11, 2462, WLAN_TX_PWR_US_DEFAULT, MFALSE} +}; + +/** Band: 'B/G', Region: Europe ETSI/China */ +static chan_freq_power_t channel_freq_power_EU_BG[] = { + {1, 2412, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {2, 2417, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {3, 2422, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {4, 2427, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {5, 2432, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {6, 2437, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {7, 2442, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {8, 2447, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {9, 2452, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {10, 2457, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {11, 2462, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {12, 2467, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {13, 2472, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE} +}; + +/** Band: 'B/G', Region: Japan */ +static chan_freq_power_t channel_freq_power_JPN41_BG[] = { + {1, 2412, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {2, 2417, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {3, 2422, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {4, 2427, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {5, 2432, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {6, 2437, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {7, 2442, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {8, 2447, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {9, 2452, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {10, 2457, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {11, 2462, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {12, 2467, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {13, 2472, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE} +}; + +/** Band: 'B/G', Region: Japan */ +static chan_freq_power_t channel_freq_power_JPN40_BG[] = { + {14, 2484, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE} +}; + +/** Band: 'B/G', Region: Japan */ +static chan_freq_power_t channel_freq_power_JPNFE_BG[] = { + {1, 2412, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {2, 2417, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {3, 2422, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {4, 2427, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {5, 2432, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {6, 2437, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {7, 2442, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {8, 2447, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {9, 2452, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {10, 2457, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {11, 2462, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {12, 2467, WLAN_TX_PWR_JP_BG_DEFAULT, MTRUE}, + {13, 2472, WLAN_TX_PWR_JP_BG_DEFAULT, MTRUE} +}; + +/** Band : 'B/G', Region: Brazil */ +static chan_freq_power_t channel_freq_power_BR_BG[] = { + {1, 2412, WLAN_TX_PWR_1000MW, MFALSE}, + {2, 2417, WLAN_TX_PWR_1000MW, MFALSE}, + {3, 2422, WLAN_TX_PWR_1000MW, MFALSE}, + {4, 2427, WLAN_TX_PWR_1000MW, MFALSE}, + {5, 2432, WLAN_TX_PWR_1000MW, MFALSE}, + {6, 2437, WLAN_TX_PWR_1000MW, MFALSE}, + {7, 2442, WLAN_TX_PWR_1000MW, MFALSE}, + {8, 2447, WLAN_TX_PWR_1000MW, MFALSE}, + {9, 2452, WLAN_TX_PWR_1000MW, MFALSE}, + {10, 2457, WLAN_TX_PWR_1000MW, MFALSE}, + {11, 2462, WLAN_TX_PWR_1000MW, MFALSE}, + {12, 2467, WLAN_TX_PWR_1000MW, MFALSE}, + {13, 2472, WLAN_TX_PWR_1000MW, MFALSE}, +}; + +/** Band : 'B/G', Region: Special */ +static chan_freq_power_t channel_freq_power_SPECIAL_BG[] = { + {1, 2412, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {2, 2417, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {3, 2422, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {4, 2427, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {5, 2432, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {6, 2437, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {7, 2442, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {8, 2447, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {9, 2452, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {10, 2457, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {11, 2462, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {12, 2467, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {13, 2472, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE}, + {14, 2484, WLAN_TX_PWR_JP_BG_DEFAULT, MFALSE} +}; + +/** + * The 2.4GHz CFP tables + */ +static cfp_table_t cfp_table_BG[] = { + { + 0x01, /* Brazil */ + channel_freq_power_BR_BG, + NELEMENTS(channel_freq_power_BR_BG), + }, + {0x10, /* US FCC */ + channel_freq_power_US_BG, + NELEMENTS(channel_freq_power_US_BG), + }, + {0x20, /* CANADA IC */ + channel_freq_power_US_BG, + NELEMENTS(channel_freq_power_US_BG), + }, + {0x30, /* EU */ + channel_freq_power_EU_BG, + NELEMENTS(channel_freq_power_EU_BG), + }, + {0x40, /* JAPAN */ + channel_freq_power_JPN40_BG, + NELEMENTS(channel_freq_power_JPN40_BG), + }, + {0x41, /* JAPAN */ + channel_freq_power_JPN41_BG, + NELEMENTS(channel_freq_power_JPN41_BG), + }, + {0x50, /* China */ + channel_freq_power_EU_BG, + NELEMENTS(channel_freq_power_EU_BG), + }, + { + 0xfe, /* JAPAN */ + channel_freq_power_JPNFE_BG, + NELEMENTS(channel_freq_power_JPNFE_BG), + }, + {0xff, /* Special */ + channel_freq_power_SPECIAL_BG, + NELEMENTS(channel_freq_power_SPECIAL_BG), + }, +/* Add new region here */ +}; + +/** Number of the CFP tables for 2.4GHz */ +#define MLAN_CFP_TABLE_SIZE_BG (NELEMENTS(cfp_table_BG)) + +/* Format { Channel, Frequency (MHz), MaxTxPower, DFS } */ +/** Band: 'A', Region: USA FCC */ +static chan_freq_power_t channel_freq_power_A[] = { + {36, 5180, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {40, 5200, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {44, 5220, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {48, 5240, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {52, 5260, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {56, 5280, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {60, 5300, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {64, 5320, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {100, 5500, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {104, 5520, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {108, 5540, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {112, 5560, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {116, 5580, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {120, 5600, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {124, 5620, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {128, 5640, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {132, 5660, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {136, 5680, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {140, 5700, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {144, 5720, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {149, 5745, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {153, 5765, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {157, 5785, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {161, 5805, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {165, 5825, WLAN_TX_PWR_US_DEFAULT, MFALSE} +}; + +/** Band: 'A', Region: Canada IC */ +static chan_freq_power_t channel_freq_power_CAN_A[] = { + {36, 5180, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {40, 5200, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {44, 5220, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {48, 5240, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {52, 5260, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {56, 5280, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {60, 5300, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {64, 5320, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {100, 5500, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {104, 5520, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {108, 5540, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {112, 5560, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {116, 5580, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {132, 5660, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {136, 5680, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {140, 5700, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {144, 5720, WLAN_TX_PWR_US_DEFAULT, MTRUE}, + {149, 5745, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {153, 5765, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {157, 5785, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {161, 5805, WLAN_TX_PWR_US_DEFAULT, MFALSE}, + {165, 5825, WLAN_TX_PWR_US_DEFAULT, MFALSE} +}; + +/** Band: 'A', Region: Europe ETSI */ +static chan_freq_power_t channel_freq_power_EU_A[] = { + {36, 5180, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {40, 5200, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {44, 5220, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {48, 5240, WLAN_TX_PWR_EMEA_DEFAULT, MFALSE}, + {52, 5260, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {56, 5280, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {60, 5300, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {64, 5320, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {100, 5500, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {104, 5520, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {108, 5540, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {112, 5560, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {116, 5580, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {120, 5600, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {124, 5620, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {128, 5640, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {132, 5660, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {136, 5680, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {140, 5700, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {149, 5745, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {153, 5765, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {157, 5785, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {161, 5805, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE}, + {165, 5825, WLAN_TX_PWR_EMEA_DEFAULT, MTRUE} +}; + +/** Band: 'A', Region: Japan */ +static chan_freq_power_t channel_freq_power_JPN_A[] = { + {36, 5180, WLAN_TX_PWR_JP_A_DEFAULT, MFALSE}, + {40, 5200, WLAN_TX_PWR_JP_A_DEFAULT, MFALSE}, + {44, 5220, WLAN_TX_PWR_JP_A_DEFAULT, MFALSE}, + {48, 5240, WLAN_TX_PWR_JP_A_DEFAULT, MFALSE}, + {52, 5260, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {56, 5280, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {60, 5300, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {64, 5320, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {100, 5500, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {104, 5520, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {108, 5540, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {112, 5560, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {116, 5580, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {120, 5600, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {124, 5620, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {128, 5640, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {132, 5660, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {136, 5680, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE}, + {140, 5700, WLAN_TX_PWR_JP_A_DEFAULT, MTRUE} +}; + +/** Band: 'A', Region: China */ +static chan_freq_power_t channel_freq_power_CN_A[] = { + {149, 5745, WLAN_TX_PWR_CN_2000MW, MFALSE}, + {153, 5765, WLAN_TX_PWR_CN_2000MW, MFALSE}, + {157, 5785, WLAN_TX_PWR_CN_2000MW, MFALSE}, + {161, 5805, WLAN_TX_PWR_CN_2000MW, MFALSE}, + {165, 5825, WLAN_TX_PWR_CN_2000MW, MFALSE} +}; + +/** Band: 'A', NULL */ +static chan_freq_power_t channel_freq_power_NULL_A[] = { +}; + +/** Band: 'A', Region: Spain/Austria/Brazil */ +static chan_freq_power_t channel_freq_power_SPN2_A[] = { + {36, 5180, WLAN_TX_PWR_200MW, MFALSE}, + {40, 5200, WLAN_TX_PWR_200MW, MFALSE}, + {44, 5220, WLAN_TX_PWR_200MW, MFALSE}, + {48, 5240, WLAN_TX_PWR_200MW, MFALSE}, + {52, 5260, WLAN_TX_PWR_200MW, MTRUE}, + {56, 5280, WLAN_TX_PWR_200MW, MTRUE}, + {60, 5300, WLAN_TX_PWR_200MW, MTRUE}, + {64, 5320, WLAN_TX_PWR_200MW, MTRUE}, +}; + +/** Band: 'A', Region: Brazil */ +static chan_freq_power_t channel_freq_power_BR1_A[] = { + {100, 5500, WLAN_TX_PWR_250MW, MTRUE}, + {104, 5520, WLAN_TX_PWR_250MW, MTRUE}, + {108, 5540, WLAN_TX_PWR_250MW, MTRUE}, + {112, 5560, WLAN_TX_PWR_250MW, MTRUE}, + {116, 5580, WLAN_TX_PWR_250MW, MTRUE}, + {120, 5600, WLAN_TX_PWR_250MW, MTRUE}, + {124, 5620, WLAN_TX_PWR_250MW, MTRUE}, + {128, 5640, WLAN_TX_PWR_250MW, MTRUE}, + {132, 5660, WLAN_TX_PWR_250MW, MTRUE}, + {136, 5680, WLAN_TX_PWR_250MW, MTRUE}, + {140, 5700, WLAN_TX_PWR_250MW, MTRUE}, +}; + +/** Band: 'A', Region: Brazil */ +static chan_freq_power_t channel_freq_power_BR2_A[] = { + {149, 5745, WLAN_TX_PWR_1000MW, MFALSE}, + {153, 5765, WLAN_TX_PWR_1000MW, MFALSE}, + {157, 5785, WLAN_TX_PWR_1000MW, MFALSE}, + {161, 5805, WLAN_TX_PWR_1000MW, MFALSE}, + {165, 5825, WLAN_TX_PWR_1000MW, MFALSE} +}; + +/** Band: 'A', Region: Russia */ +static chan_freq_power_t channel_freq_power_RU_A[] = { + {36, 5180, WLAN_TX_PWR_DEFAULT, MFALSE}, + {40, 5200, WLAN_TX_PWR_DEFAULT, MFALSE}, + {44, 5220, WLAN_TX_PWR_DEFAULT, MFALSE}, + {48, 5240, WLAN_TX_PWR_DEFAULT, MFALSE}, + {52, 5260, WLAN_TX_PWR_DEFAULT, MFALSE}, + {56, 5280, WLAN_TX_PWR_DEFAULT, MFALSE}, + {60, 5300, WLAN_TX_PWR_DEFAULT, MFALSE}, + {64, 5320, WLAN_TX_PWR_DEFAULT, MFALSE}, + {132, 5660, WLAN_TX_PWR_DEFAULT, MFALSE}, + {136, 5680, WLAN_TX_PWR_DEFAULT, MFALSE}, + {140, 5700, WLAN_TX_PWR_DEFAULT, MFALSE}, + {149, 5745, WLAN_TX_PWR_DEFAULT, MFALSE}, + {153, 5765, WLAN_TX_PWR_DEFAULT, MFALSE}, + {157, 5785, WLAN_TX_PWR_DEFAULT, MFALSE}, + {161, 5805, WLAN_TX_PWR_DEFAULT, MFALSE}, +}; + +/** Band: 'A', Code: 1, Low band (5150-5250 MHz) channels */ +static chan_freq_power_t channel_freq_power_low_band[] = { + {36, 5180, WLAN_TX_PWR_DEFAULT, MFALSE}, + {40, 5200, WLAN_TX_PWR_DEFAULT, MFALSE}, + {44, 5220, WLAN_TX_PWR_DEFAULT, MFALSE}, + {48, 5240, WLAN_TX_PWR_DEFAULT, MFALSE}, +}; + +/** Band: 'A', Code: 2, Lower middle band (5250-5350 MHz) channels */ +static chan_freq_power_t channel_freq_power_lower_middle_band[] = { + {52, 5260, WLAN_TX_PWR_DEFAULT, MTRUE}, + {56, 5280, WLAN_TX_PWR_DEFAULT, MTRUE}, + {60, 5300, WLAN_TX_PWR_DEFAULT, MTRUE}, + {64, 5320, WLAN_TX_PWR_DEFAULT, MTRUE}, +}; + +/** Band: 'A', Code: 3, Upper middle band (5470-5725 MHz) channels */ +static chan_freq_power_t channel_freq_power_upper_middle_band[] = { + {100, 5500, WLAN_TX_PWR_DEFAULT, MTRUE}, + {104, 5520, WLAN_TX_PWR_DEFAULT, MTRUE}, + {108, 5540, WLAN_TX_PWR_DEFAULT, MTRUE}, + {112, 5560, WLAN_TX_PWR_DEFAULT, MTRUE}, + {116, 5580, WLAN_TX_PWR_DEFAULT, MTRUE}, + {120, 5600, WLAN_TX_PWR_DEFAULT, MTRUE}, + {124, 5620, WLAN_TX_PWR_DEFAULT, MTRUE}, + {128, 5640, WLAN_TX_PWR_DEFAULT, MTRUE}, + {132, 5660, WLAN_TX_PWR_DEFAULT, MTRUE}, + {136, 5680, WLAN_TX_PWR_DEFAULT, MTRUE}, + {140, 5700, WLAN_TX_PWR_DEFAULT, MTRUE}, +}; + +/** Band: 'A', Code: 4, High band (5725-5850 MHz) channels */ +static chan_freq_power_t channel_freq_power_high_band[] = { + {149, 5745, WLAN_TX_PWR_DEFAULT, MFALSE}, + {153, 5765, WLAN_TX_PWR_DEFAULT, MFALSE}, + {157, 5785, WLAN_TX_PWR_DEFAULT, MFALSE}, + {161, 5805, WLAN_TX_PWR_DEFAULT, MFALSE}, + {165, 5825, WLAN_TX_PWR_DEFAULT, MFALSE} +}; + +/** Band: 'A', Code: 5, Low band (5150-5250 MHz) and + * High band (5725-5850 MHz) channels */ +static chan_freq_power_t channel_freq_power_low_high_band[] = { + {36, 5180, WLAN_TX_PWR_DEFAULT, MFALSE}, + {40, 5200, WLAN_TX_PWR_DEFAULT, MFALSE}, + {44, 5220, WLAN_TX_PWR_DEFAULT, MFALSE}, + {48, 5240, WLAN_TX_PWR_DEFAULT, MFALSE}, + {149, 5745, WLAN_TX_PWR_DEFAULT, MFALSE}, + {153, 5765, WLAN_TX_PWR_DEFAULT, MFALSE}, + {157, 5785, WLAN_TX_PWR_DEFAULT, MFALSE}, + {161, 5805, WLAN_TX_PWR_DEFAULT, MFALSE}, + {165, 5825, WLAN_TX_PWR_DEFAULT, MFALSE} +}; + +/** + * The 5GHz CFP tables + */ +static cfp_table_t cfp_table_A[] = { + {0x1, /* Low band (5150-5250 MHz) channels */ + channel_freq_power_low_band, + NELEMENTS(channel_freq_power_low_band) + }, + {0x2, /* Lower middle band (5250-5350 MHz) channels */ + channel_freq_power_lower_middle_band, + NELEMENTS(channel_freq_power_lower_middle_band) + }, + {0x3, /* Upper middle band (5470-5725 MHz) channels */ + channel_freq_power_upper_middle_band, + NELEMENTS(channel_freq_power_upper_middle_band) + }, + {0x4, /* High band (5725-5850 MHz) channels */ + channel_freq_power_high_band, + NELEMENTS(channel_freq_power_high_band) + }, + {0x5, /* Low band (5150-5250 MHz) and High band + (5725-5850 MHz) channels */ + channel_freq_power_low_high_band, + NELEMENTS(channel_freq_power_low_high_band) + }, + {0x09, /* SPAIN/Austria/Brazil */ + channel_freq_power_SPN2_A, + NELEMENTS(channel_freq_power_SPN2_A), + }, + {0x0c, /* Brazil */ + channel_freq_power_BR1_A, + NELEMENTS(channel_freq_power_BR1_A), + }, + {0x0e, /* Brazil */ + channel_freq_power_BR2_A, + NELEMENTS(channel_freq_power_BR2_A), + }, + {0x0f, /* Russia */ + channel_freq_power_RU_A, + NELEMENTS(channel_freq_power_RU_A), + }, + {0x10, /* US FCC */ + channel_freq_power_A, + NELEMENTS(channel_freq_power_A), + }, + {0x20, /* CANADA IC */ + channel_freq_power_CAN_A, + NELEMENTS(channel_freq_power_CAN_A), + }, + {0x30, /* EU */ + channel_freq_power_EU_A, + NELEMENTS(channel_freq_power_EU_A), + }, + {0x40, /* JAPAN */ + channel_freq_power_JPN_A, + NELEMENTS(channel_freq_power_JPN_A), + }, + {0x41, /* JAPAN */ + channel_freq_power_JPN_A, + NELEMENTS(channel_freq_power_JPN_A), + }, + {0x50, /* China */ + channel_freq_power_CN_A, + NELEMENTS(channel_freq_power_CN_A), + }, + {0xfe, /* JAPAN */ + channel_freq_power_NULL_A, + NELEMENTS(channel_freq_power_NULL_A), + }, + {0xff, /* Special */ + channel_freq_power_JPN_A, + NELEMENTS(channel_freq_power_JPN_A), + }, +/* Add new region here */ +}; + +/** Number of the CFP tables for 5GHz */ +#define MLAN_CFP_TABLE_SIZE_A (NELEMENTS(cfp_table_A)) + +/******************************************************** + Global Variables +********************************************************/ +/** + * The table to keep region code + */ +t_u16 region_code_index[MRVDRV_MAX_REGION_CODE] = { + 0x10, 0x20, 0x30, 0x32, 0x40, 0x41, 0x50, 0xfe, 0xff +}; + +/** The table to keep CFP code for BG */ +t_u16 cfp_code_index_bg[MRVDRV_MAX_CFP_CODE_BG] = { }; + +/** The table to keep CFP code for A */ +t_u16 cfp_code_index_a[MRVDRV_MAX_CFP_CODE_A] = { 0x1, 0x2, 0x3, 0x4, 0x5 }; + +/** + * The rates supported for ad-hoc B mode + */ +t_u8 AdhocRates_B[B_SUPPORTED_RATES] = { 0x82, 0x84, 0x8b, 0x96, 0 }; + +/** + * The rates supported for ad-hoc G mode + */ +t_u8 AdhocRates_G[G_SUPPORTED_RATES] = { + 0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6c, 0x00 +}; + +/** + * The rates supported for ad-hoc BG mode + */ +t_u8 AdhocRates_BG[BG_SUPPORTED_RATES] = { + 0x82, 0x84, 0x8b, 0x96, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, + 0x60, 0x6c, 0x00 +}; + +/** + * The rates supported in A mode for ad-hoc + */ +t_u8 AdhocRates_A[A_SUPPORTED_RATES] = { + 0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6c, 0x00 +}; + +/** + * The rates supported in A mode (used for BAND_A) + */ +t_u8 SupportedRates_A[A_SUPPORTED_RATES] = { + 0x0c, 0x12, 0x18, 0x24, 0xb0, 0x48, 0x60, 0x6c, 0x00 +}; + +/** + * The rates supported by the card + */ +t_u16 WlanDataRates[WLAN_SUPPORTED_RATES_EXT] = { + 0x02, 0x04, 0x0B, 0x16, 0x00, 0x0C, 0x12, + 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90, + 0x0D, 0x1A, 0x27, 0x34, 0x4E, 0x68, 0x75, + 0x82, 0x0C, 0x1B, 0x36, 0x51, 0x6C, 0xA2, + 0xD8, 0xF3, 0x10E, 0x00 +}; + +/** + * The rates supported in B mode + */ +t_u8 SupportedRates_B[B_SUPPORTED_RATES] = { + 0x02, 0x04, 0x0b, 0x16, 0x00 +}; + +/** + * The rates supported in G mode (BAND_G, BAND_G|BAND_GN) + */ +t_u8 SupportedRates_G[G_SUPPORTED_RATES] = { + 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6c, 0x00 +}; + +/** + * The rates supported in BG mode (BAND_B|BAND_G, BAND_B|BAND_G|BAND_GN) + */ +t_u8 SupportedRates_BG[BG_SUPPORTED_RATES] = { + 0x02, 0x04, 0x0b, 0x0c, 0x12, 0x16, 0x18, 0x24, 0x30, 0x48, + 0x60, 0x6c, 0x00 +}; + +/** + * The rates supported in N mode + */ +t_u8 SupportedRates_N[N_SUPPORTED_RATES] = { 0x02, 0x04, 0 }; + +/******************************************************** + Local Functions +********************************************************/ +/** + * @brief Find a character in a string. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param s A pointer to string + * @param c Character to be located + * @param n The length of string + * + * @return A pointer to the first occurrence of c in string, or MNULL if c is not found. + */ +static void * +wlan_memchr(pmlan_adapter pmadapter, void *s, int c, int n) +{ + const t_u8 *p = (t_u8 *)s; + + ENTER(); + + while (n--) { + if ((t_u8)c == *p++) { + LEAVE(); + return (void *)(p - 1); + } + } + + LEAVE(); + return MNULL; +} + +/** + * @brief This function finds the CFP in + * cfp_table_BG/A based on region/code and band parameter. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param region The region code + * @param band The band + * @param cfp_no A pointer to CFP number + * + * @return A pointer to CFP + */ +static chan_freq_power_t * +wlan_get_region_cfp_table(pmlan_adapter pmadapter, t_u8 region, t_u8 band, + int *cfp_no) +{ + t_u32 i; + t_u8 cfp_bg, cfp_a; + + ENTER(); + + cfp_bg = cfp_a = region; + if (!region) { + /* Invalid region code, use CFP code */ + cfp_bg = pmadapter->cfp_code_bg; + cfp_a = pmadapter->cfp_code_a; + } + + if (band & (BAND_B | BAND_G | BAND_GN | BAND_GAC)) { + for (i = 0; i < MLAN_CFP_TABLE_SIZE_BG; i++) { + PRINTM(MINFO, "cfp_table_BG[%d].code=%d\n", i, + cfp_table_BG[i].code); + /* Check if region/code matches for BG bands */ + if (cfp_table_BG[i].code == cfp_bg) { + /* Select by band */ + *cfp_no = cfp_table_BG[i].cfp_no; + LEAVE(); + return cfp_table_BG[i].cfp; + } + } + } + if (band & (BAND_A | BAND_AN | BAND_AAC)) { + for (i = 0; i < MLAN_CFP_TABLE_SIZE_A; i++) { + PRINTM(MINFO, "cfp_table_A[%d].code=%d\n", i, + cfp_table_A[i].code); + /* Check if region/code matches for A bands */ + if (cfp_table_A[i].code == cfp_a) { + /* Select by band */ + *cfp_no = cfp_table_A[i].cfp_no; + LEAVE(); + return cfp_table_A[i].cfp; + } + } + } + + if (!region) + PRINTM(MERROR, "Error Band[0x%x] or code[BG:%#x, A:%#x]\n", + band, cfp_bg, cfp_a); + else + PRINTM(MERROR, "Error Band[0x%x] or region[%#x]\n", band, + region); + + LEAVE(); + return MNULL; +} + +/** + * @brief This function copies dynamic CFP elements from one table to another. + * Only copy elements where channel numbers match. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param cfp Destination table + * @param num_cfp Number of elements in dest table + * @param cfp_src Source table + * @param num_cfp_src Number of elements in source table + */ +static t_void +wlan_cfp_copy_dynamic(pmlan_adapter pmadapter, + chan_freq_power_t *cfp, t_u8 num_cfp, + chan_freq_power_t *cfp_src, t_u8 num_cfp_src) +{ + int i, j; + ENTER(); + + /* first clear dest dynamic entries */ + for (i = 0; i < num_cfp; i++) + memset(pmadapter, &cfp[i].dynamic, 0x00, sizeof(cfp_dyn_t)); + + /* copy dynamic entries from source where channels match */ + if (cfp_src) { + for (i = 0; i < num_cfp; i++) + for (j = 0; j < num_cfp_src; j++) + if (cfp[i].channel == cfp_src[j].channel) { + cfp[i].dynamic = cfp_src[j].dynamic; + break; + } + } + + LEAVE(); +} + +/******************************************************** + Global Functions +********************************************************/ +/** + * @brief This function converts region string to integer code + * + * @param pmadapter A pointer to mlan_adapter structure + * @param country_code Country string + * @param cfp_bg Pointer to buffer + * @param cfp_a Pointer to buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_misc_country_2_cfp_table_code(pmlan_adapter pmadapter, t_u8 *country_code, + t_u8 *cfp_bg, t_u8 *cfp_a) +{ + t_u8 i; + + ENTER(); + + /* Look for code in mapping table */ + for (i = 0; i < NELEMENTS(country_code_mapping); i++) { + if (!memcmp(pmadapter, country_code_mapping[i].country_code, + country_code, COUNTRY_CODE_LEN - 1)) { + *cfp_bg = country_code_mapping[i].cfp_code_bg; + *cfp_a = country_code_mapping[i].cfp_code_a; + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + } + + /* If still not found, look for code in EU country code table */ + for (i = 0; i < NELEMENTS(eu_country_code_table); i++) { + if (!memcmp(pmadapter, eu_country_code_table[i], + country_code, COUNTRY_CODE_LEN - 1)) { + *cfp_bg = EU_CFP_CODE_BG; + *cfp_a = EU_CFP_CODE_A; + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + } + + LEAVE(); + return MLAN_STATUS_FAILURE; +} + +/** + * @brief This function adjust the rate index + * + * @param priv A pointer to mlan_private structure + * @param rx_rate rx rate + * @param rate_info rate info + * @return rate index + */ +t_u8 +wlan_adjust_data_rate(mlan_private *priv, t_u8 rx_rate, t_u8 rate_info) +{ + t_u8 rate_index = 0; + t_u8 bw = 0; + t_u8 nss = 0; + t_bool sgi_enable = 0; + +#define MAX_MCS_NUM_SUPP 16 + +#define MAX_MCS_NUM_AC 10 +#define RATE_INDEX_MCS0 12 + bw = (rate_info & 0xC) >> 2; + sgi_enable = (rate_info & 0x10) >> 4; + if ((rate_info & 0x3) == 0) { + rate_index = + (rx_rate > + MLAN_RATE_INDEX_OFDM0) ? rx_rate - 1 : rx_rate; + } else if ((rate_info & 0x03) == 1) { + rate_index = RATE_INDEX_MCS0 + + MAX_MCS_NUM_SUPP * 2 * sgi_enable + + MAX_MCS_NUM_SUPP * bw + rx_rate; + } else if ((rate_info & 0x3) == 2) { + nss = rx_rate >> 4; // 0:NSS1, 1:NSS2 + rate_index = RATE_INDEX_MCS0 + MAX_MCS_NUM_SUPP * 4 + + MAX_MCS_NUM_AC * 6 * sgi_enable + + MAX_MCS_NUM_AC * 2 * bw + MAX_MCS_NUM_AC * nss + + (rx_rate & 0x0f); + } + return rate_index; +} + +#ifdef STA_SUPPORT +#endif /* STA_SUPPORT */ + +/** + * @brief convert ht_info to rate_info + * + * @param ht_info ht info + * + * @return rate info + */ +t_u8 +wlan_convert_v14_rate_ht_info(t_u8 ht_info) +{ + t_u8 rate_info = 0; + rate_info = ht_info & 0x01; + /* band */ + rate_info |= (ht_info & MBIT(1)) << 1; + /* short GI */ + rate_info |= (ht_info & MBIT(2)) << 2; + return rate_info; +} + +/** + * @brief Use index to get the data rate + * + * @param pmadapter A pointer to mlan_adapter structure + * @param index The index of data rate + * @param tx_rate_info Tx rate info + * + * @return Data rate or 0 + */ +t_u32 +wlan_index_to_data_rate(pmlan_adapter pmadapter, t_u8 index, t_u8 tx_rate_info) +{ +#define MCS_NUM_SUPP 16 + t_u16 mcs_rate[4][MCS_NUM_SUPP] = { + {0x1b, 0x36, 0x51, 0x6c, 0xa2, 0xd8, 0xf3, 0x10e, 0x36, 0x6c, 0xa2, 0xd8, 0x144, 0x1b0, 0x1e6, 0x21c}, /* LG + 40M */ + {0x1e, 0x3c, 0x5a, 0x78, 0xb4, 0xf0, 0x10e, 0x12c, 0x3c, 0x78, 0xb4, 0xf0, 0x168, 0x1e0, 0x21c, 0x258}, /* SG + 40M + */ + {0x0d, 0x1a, 0x27, 0x34, 0x4e, 0x68, 0x75, 0x82, 0x1a, 0x34, 0x4e, 0x68, 0x9c, 0xd0, 0xea, 0x104}, /* LG + 20M + */ + {0x0e, 0x1c, 0x2b, 0x39, 0x56, 0x73, 0x82, 0x90, 0x1c, 0x39, + 0x56, 0x73, 0xad, 0xe7, 0x104, 0x120} + }; /* SG 20M */ + +#define MCS_NUM_AC 10 + /* NSS 1. note: the value in the table is 2 multiplier of the actual + rate in other words, it is in the unit of 500 Kbs */ + t_u16 ac_mcs_rate_nss1[8][MCS_NUM_AC] = { + {0x75, 0xEA, 0x15F, 0x1D4, 0x2BE, 0x3A8, 0x41D, 0x492, 0x57C, 0x618}, /* LG + 160M */ + {0x82, 0x104, 0x186, 0x208, 0x30C, 0x410, 0x492, 0x514, 0x618, 0x6C6}, /* SG + 160M */ + {0x3B, 0x75, 0xB0, 0xEA, 0x15F, 0x1D4, 0x20F, 0x249, 0x2BE, 0x30C}, /* LG + 80M + */ + {0x41, 0x82, 0xC3, 0x104, 0x186, 0x208, 0x249, 0x28A, 0x30C, 0x363}, /* SG + 80M + */ + {0x1B, 0x36, 0x51, 0x6C, 0xA2, 0xD8, 0xF3, 0x10E, 0x144, 0x168}, /* LG + 40M + */ + {0x1E, 0x3C, 0x5A, 0x78, 0xB4, 0xF0, 0x10E, 0x12C, 0x168, 0x190}, /* SG + 40M + */ + {0xD, 0x1A, 0x27, 0x34, 0x4E, 0x68, 0x75, 0x82, 0x9C, 0x00}, /* LG + 20M + */ + {0xF, 0x1D, 0x2C, 0x3A, 0x57, 0x74, 0x82, 0x91, 0xAE, 0x00}, /* SG + 20M + */ + }; + /* NSS 2. note: the value in the table is 2 multiplier of the actual + rate */ + t_u16 ac_mcs_rate_nss2[8][MCS_NUM_AC] = { + {0xEA, 0x1D4, 0x2BE, 0x3A8, 0x57C, 0x750, 0x83A, 0x924, 0xAF8, 0xC30}, /* LG + 160M */ + {0x104, 0x208, 0x30C, 0x410, 0x618, 0x820, 0x924, 0xA28, 0xC30, 0xD8B}, /* SG + 160M */ + + {0x75, 0xEA, 0x15F, 0x1D4, 0x2BE, 0x3A8, 0x41D, 0x492, 0x57C, 0x618}, /* LG + 80M */ + {0x82, 0x104, 0x186, 0x208, 0x30C, 0x410, 0x492, 0x514, 0x618, 0x6C6}, /* SG + 80M */ + {0x36, 0x6C, 0xA2, 0xD8, 0x144, 0x1B0, 0x1E6, 0x21C, 0x288, 0x2D0}, /* LG + 40M */ + {0x3C, 0x78, 0xB4, 0xF0, 0x168, 0x1E0, 0x21C, 0x258, 0x2D0, 0x320}, /* SG + 40M */ + {0x1A, 0x34, 0x4A, 0x68, 0x9C, 0xD0, 0xEA, 0x104, 0x138, 0x00}, /* LG + 20M */ + {0x1D, 0x3A, 0x57, 0x74, 0xAE, 0xE6, 0x104, 0x121, 0x15B, 0x00}, /* SG + 20M */ + }; + + t_u32 rate = 0; + t_u8 mcs_index = 0; + t_u8 bw = 0; + t_u8 gi = 0; + ENTER(); + + if ((tx_rate_info & 0x3) == MLAN_RATE_FORMAT_VHT) { + /* VHT rate */ + mcs_index = MIN(index & 0xF, 9); + /* 20M: bw=0, 40M: bw=1, 80M: bw=2, 160M: bw=3 */ + bw = (tx_rate_info & 0xC) >> 2; + /* LGI: gi =0, SGI: gi = 1 */ + gi = (tx_rate_info & 0x10) >> 4; + if ((index >> 4) == 1) { + /* NSS = 2 */ + rate = ac_mcs_rate_nss2[2 * (3 - bw) + gi][mcs_index]; + } else + /* NSS = 1 */ + rate = ac_mcs_rate_nss1[2 * (3 - bw) + gi][mcs_index]; + } else if ((tx_rate_info & 0x3) == MLAN_RATE_FORMAT_HT) { + /* HT rate */ + /* 20M: bw=0, 40M: bw=1 */ + bw = (tx_rate_info & 0xC) >> 2; + /* LGI: gi =0, SGI: gi = 1 */ + gi = (tx_rate_info & 0x10) >> 4; + if (index == MLAN_RATE_BITMAP_MCS0) { + if (gi == 1) + rate = 0x0D; /* MCS 32 SGI rate */ + else + rate = 0x0C; /* MCS 32 LGI rate */ + } else if (index < MCS_NUM_SUPP) { + if (bw <= 1) + rate = mcs_rate[2 * (1 - bw) + gi][index]; + else + rate = WlanDataRates[0]; + } else + rate = WlanDataRates[0]; + } else { + /* 11n non HT rates */ + if (index >= WLAN_SUPPORTED_RATES_EXT) + index = 0; + rate = WlanDataRates[index]; + } + LEAVE(); + return rate; +} + +/** + * @brief Use rate to get the index + * + * @param pmadapter A pointer to mlan_adapter structure + * @param rate Data rate + * + * @return Index or 0 + */ +t_u8 +wlan_data_rate_to_index(pmlan_adapter pmadapter, t_u32 rate) +{ + t_u16 *ptr; + + ENTER(); + if (rate) { + ptr = wlan_memchr(pmadapter, WlanDataRates, (t_u8)rate, + sizeof(WlanDataRates)); + if (ptr) { + LEAVE(); + return (t_u8)(ptr - WlanDataRates); + } + } + LEAVE(); + return 0; +} + +/** + * @brief Get active data rates + * + * @param pmpriv A pointer to mlan_private structure + * @param bss_mode The specified BSS mode (Infra/IBSS) + * @param config_bands The specified band configuration + * @param rates The buf to return the active rates + * + * @return The number of Rates + */ +t_u32 +wlan_get_active_data_rates(mlan_private *pmpriv, t_u32 bss_mode, + t_u8 config_bands, WLAN_802_11_RATES rates) +{ + t_u32 k; + + ENTER(); + + if (pmpriv->media_connected != MTRUE) { + k = wlan_get_supported_rates(pmpriv, bss_mode, config_bands, + rates); + } else { + k = wlan_copy_rates(rates, 0, + pmpriv->curr_bss_params.data_rates, + pmpriv->curr_bss_params.num_of_rates); + } + + LEAVE(); + return k; +} + +#ifdef STA_SUPPORT +/** + * @brief This function search through all the regions cfp table to find the channel, + * if the channel is found then gets the MIN txpower of the channel + * present in all the regions. + * + * @param pmpriv A pointer to mlan_private structure + * @param channel Channel number. + * + * @return The Tx power + */ +t_u8 +wlan_get_txpwr_of_chan_from_cfp(mlan_private *pmpriv, t_u8 channel) +{ + t_u8 i = 0; + t_u8 j = 0; + t_u8 tx_power = 0; + t_u32 cfp_no; + chan_freq_power_t *cfp = MNULL; + chan_freq_power_t *cfp_a = MNULL; + t_u32 cfp_no_a; + + ENTER(); + + for (i = 0; i < MLAN_CFP_TABLE_SIZE_BG; i++) { + /* Get CFP */ + cfp = cfp_table_BG[i].cfp; + cfp_no = cfp_table_BG[i].cfp_no; + /* Find matching channel and get Tx power */ + for (j = 0; j < cfp_no; j++) { + if ((cfp + j)->channel == channel) { + if (tx_power != 0) + tx_power = + MIN(tx_power, + (cfp + j)->max_tx_power); + else + tx_power = + (t_u8)(cfp + j)->max_tx_power; + break; + } + } + } + + for (i = 0; i < MLAN_CFP_TABLE_SIZE_A; i++) { + /* Get CFP */ + cfp_a = cfp_table_A[i].cfp; + cfp_no_a = cfp_table_A[i].cfp_no; + for (j = 0; j < cfp_no_a; j++) { + if ((cfp_a + j)->channel == channel) { + if (tx_power != 0) + tx_power = + MIN(tx_power, + (cfp_a + j)->max_tx_power); + else + tx_power = + (t_u8)((cfp_a + + j)->max_tx_power); + break; + } + } + } + + LEAVE(); + return tx_power; +} + +/** + * @brief Get the channel frequency power info for a specific channel + * + * @param pmadapter A pointer to mlan_adapter structure + * @param band It can be BAND_A, BAND_G or BAND_B + * @param channel The channel to search for + * @param region_channel A pointer to region_chan_t structure + * + * @return A pointer to chan_freq_power_t structure or MNULL if not found. + */ + +chan_freq_power_t * +wlan_get_cfp_by_band_and_channel(pmlan_adapter pmadapter, + t_u8 band, + t_u16 channel, region_chan_t *region_channel) +{ + region_chan_t *rc; + chan_freq_power_t *cfp = MNULL; + int i, j; + + ENTER(); + + for (j = 0; !cfp && (j < MAX_REGION_CHANNEL_NUM); j++) { + rc = ®ion_channel[j]; + + if (!rc->valid || !rc->pcfp) + continue; + switch (rc->band) { + case BAND_A: + switch (band) { + case BAND_AN: + case BAND_A | BAND_AN: + case BAND_A | BAND_AN | BAND_AAC: + case BAND_A: /* Matching BAND_A */ + break; + + default: + continue; + } + break; + case BAND_B: + case BAND_G: + switch (band) { + case BAND_GN: + case BAND_B | BAND_G | BAND_GN: + case BAND_G | BAND_GN: + case BAND_GN | BAND_GAC: + case BAND_B | BAND_G | BAND_GN | BAND_GAC: + case BAND_G | BAND_GN | BAND_GAC: + case BAND_B | BAND_G: + case BAND_B: /* Matching BAND_B/G */ + case BAND_G: + case 0: + break; + default: + continue; + } + break; + default: + continue; + } + if (channel == FIRST_VALID_CHANNEL) + cfp = &rc->pcfp[0]; + else { + for (i = 0; i < rc->num_cfp; i++) { + if (rc->pcfp[i].channel == channel) { + cfp = &rc->pcfp[i]; + break; + } + } + } + } + + if (!cfp && channel) + PRINTM(MCMND, "wlan_get_cfp_by_band_and_channel(): cannot find " + "cfp by band %d & channel %d\n", band, channel); + + LEAVE(); + return cfp; +} + +/** + * @brief Find the channel frequency power info for a specific channel + * + * @param pmadapter A pointer to mlan_adapter structure + * @param band It can be BAND_A, BAND_G or BAND_B + * @param channel The channel to search for + * + * @return A pointer to chan_freq_power_t structure or MNULL if not found. + */ +chan_freq_power_t * +wlan_find_cfp_by_band_and_channel(mlan_adapter *pmadapter, + t_u8 band, t_u16 channel) +{ + chan_freq_power_t *cfp = MNULL; + + ENTER(); + + /* Any station(s) with 11D enabled */ + if (wlan_count_priv_cond(pmadapter, wlan_11d_is_enabled, + wlan_is_station) > 0) + cfp = wlan_get_cfp_by_band_and_channel(pmadapter, band, channel, + pmadapter-> + universal_channel); + else + cfp = wlan_get_cfp_by_band_and_channel(pmadapter, band, channel, + pmadapter-> + region_channel); + + LEAVE(); + return cfp; +} + +/** + * @brief Find the channel frequency power info for a specific frequency + * + * @param pmadapter A pointer to mlan_adapter structure + * @param band It can be BAND_A, BAND_G or BAND_B + * @param freq The frequency to search for + * + * @return Pointer to chan_freq_power_t structure; MNULL if not found + */ +chan_freq_power_t * +wlan_find_cfp_by_band_and_freq(mlan_adapter *pmadapter, t_u8 band, t_u32 freq) +{ + chan_freq_power_t *cfp = MNULL; + region_chan_t *rc; + int i, j; + + ENTER(); + + for (j = 0; !cfp && (j < MAX_REGION_CHANNEL_NUM); j++) { + rc = &pmadapter->region_channel[j]; + + /* Any station(s) with 11D enabled */ + if (wlan_count_priv_cond(pmadapter, wlan_11d_is_enabled, + wlan_is_station) > 0) + rc = &pmadapter->universal_channel[j]; + + if (!rc->valid || !rc->pcfp) + continue; + switch (rc->band) { + case BAND_A: + switch (band) { + case BAND_AN: + case BAND_A | BAND_AN: + case BAND_A | BAND_AN | BAND_AAC: + case BAND_A: /* Matching BAND_A */ + break; + default: + continue; + } + break; + case BAND_B: + case BAND_G: + switch (band) { + case BAND_GN: + case BAND_B | BAND_G | BAND_GN: + case BAND_G | BAND_GN: + case BAND_GN | BAND_GAC: + case BAND_B | BAND_G | BAND_GN | BAND_GAC: + case BAND_G | BAND_GN | BAND_GAC: + case BAND_B | BAND_G: + case BAND_B: + case BAND_G: + case 0: + break; + default: + continue; + } + break; + default: + continue; + } + for (i = 0; i < rc->num_cfp; i++) { + if (rc->pcfp[i].freq == freq) { + cfp = &rc->pcfp[i]; + break; + } + } + } + + if (!cfp && freq) + PRINTM(MERROR, + "wlan_find_cfp_by_band_and_freq(): cannot find cfp by " + "band %d & freq %d\n", band, freq); + + LEAVE(); + return cfp; +} +#endif /* STA_SUPPORT */ + +/** + * @brief Check if Rate Auto + * + * @param pmpriv A pointer to mlan_private structure + * + * @return MTRUE or MFALSE + */ +t_u8 +wlan_is_rate_auto(mlan_private *pmpriv) +{ + t_u32 i; + int rate_num = 0; + + ENTER(); + + for (i = 0; i < NELEMENTS(pmpriv->bitmap_rates); i++) + if (pmpriv->bitmap_rates[i]) + rate_num++; + + LEAVE(); + if (rate_num > 1) + return MTRUE; + else + return MFALSE; +} + +/** + * @brief Covert Rate Bitmap to Rate index + * + * @param pmadapter Pointer to mlan_adapter structure + * @param rate_bitmap Pointer to rate bitmap + * @param size Size of the bitmap array + * + * @return Rate index + */ +int +wlan_get_rate_index(pmlan_adapter pmadapter, t_u16 *rate_bitmap, int size) +{ + int i; + + ENTER(); + + for (i = 0; i < size * 8; i++) { + if (rate_bitmap[i / 16] & (1 << (i % 16))) { + LEAVE(); + return i; + } + } + + LEAVE(); + return -1; +} + +/** + * @brief Get supported data rates + * + * @param pmpriv A pointer to mlan_private structure + * @param bss_mode The specified BSS mode (Infra/IBSS) + * @param config_bands The specified band configuration + * @param rates The buf to return the supported rates + * + * @return The number of Rates + */ +t_u32 +wlan_get_supported_rates(mlan_private *pmpriv, t_u32 bss_mode, + t_u8 config_bands, WLAN_802_11_RATES rates) +{ + t_u32 k = 0; + + ENTER(); + + if (bss_mode == MLAN_BSS_MODE_INFRA) { + /* Infra. mode */ + switch (config_bands) { + case BAND_B: + PRINTM(MINFO, "Infra Band=%d SupportedRates_B\n", + config_bands); + k = wlan_copy_rates(rates, k, SupportedRates_B, + sizeof(SupportedRates_B)); + break; + case BAND_G: + case BAND_G | BAND_GN: + case BAND_G | BAND_GN | BAND_GAC: + PRINTM(MINFO, "Infra band=%d SupportedRates_G\n", + config_bands); + k = wlan_copy_rates(rates, k, SupportedRates_G, + sizeof(SupportedRates_G)); + break; + case BAND_B | BAND_G: + case BAND_A | BAND_B | BAND_G: + case BAND_A | BAND_B: + case BAND_A | BAND_B | BAND_G | BAND_GN | BAND_AN: + case BAND_A | BAND_B | BAND_G | BAND_GN | BAND_AN | BAND_AAC: + case BAND_A | BAND_B | BAND_G | BAND_GN | BAND_AN | BAND_AAC | BAND_GAC: + case BAND_B | BAND_G | BAND_GN: + case BAND_B | BAND_G | BAND_GN | BAND_GAC: + PRINTM(MINFO, "Infra band=%d SupportedRates_BG\n", + config_bands); +#ifdef WIFI_DIRECT_SUPPORT + if (pmpriv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) + k = wlan_copy_rates(rates, k, SupportedRates_G, + sizeof(SupportedRates_G)); + else + k = wlan_copy_rates(rates, k, SupportedRates_BG, + sizeof(SupportedRates_BG)); +#else + k = wlan_copy_rates(rates, k, SupportedRates_BG, + sizeof(SupportedRates_BG)); +#endif + break; + case BAND_A: + case BAND_A | BAND_G: + PRINTM(MINFO, "Infra band=%d SupportedRates_A\n", + config_bands); + k = wlan_copy_rates(rates, k, SupportedRates_A, + sizeof(SupportedRates_A)); + break; + case BAND_AN: + case BAND_A | BAND_AN: + case BAND_A | BAND_G | BAND_AN | BAND_GN: + case BAND_A | BAND_AN | BAND_AAC: + case BAND_A | BAND_G | BAND_AN | BAND_GN | BAND_AAC: + PRINTM(MINFO, "Infra band=%d SupportedRates_A\n", + config_bands); + k = wlan_copy_rates(rates, k, SupportedRates_A, + sizeof(SupportedRates_A)); + break; + case BAND_GN: + case BAND_GN | BAND_GAC: + PRINTM(MINFO, "Infra band=%d SupportedRates_N\n", + config_bands); + k = wlan_copy_rates(rates, k, SupportedRates_N, + sizeof(SupportedRates_N)); + break; + } + } else { + /* Ad-hoc mode */ + switch (config_bands) { + case BAND_B: + PRINTM(MINFO, "Band: Adhoc B\n"); + k = wlan_copy_rates(rates, k, AdhocRates_B, + sizeof(AdhocRates_B)); + break; + case BAND_G: + case BAND_G | BAND_GN: + case BAND_G | BAND_GN | BAND_GAC: + PRINTM(MINFO, "Band: Adhoc G only\n"); + k = wlan_copy_rates(rates, k, AdhocRates_G, + sizeof(AdhocRates_G)); + break; + case BAND_B | BAND_G: + case BAND_B | BAND_G | BAND_GN: + case BAND_B | BAND_G | BAND_GN | BAND_GAC: + PRINTM(MINFO, "Band: Adhoc BG\n"); + k = wlan_copy_rates(rates, k, AdhocRates_BG, + sizeof(AdhocRates_BG)); + break; + case BAND_A: + case BAND_AN: + case BAND_A | BAND_AN: + case BAND_A | BAND_AN | BAND_AAC: + PRINTM(MINFO, "Band: Adhoc A\n"); + k = wlan_copy_rates(rates, k, AdhocRates_A, + sizeof(AdhocRates_A)); + break; + } + } + + LEAVE(); + return k; +} + +/** + * @brief This function sets region table. + * + * @param pmpriv A pointer to mlan_private structure + * @param region The region code + * @param band The band + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_set_regiontable(mlan_private *pmpriv, t_u8 region, t_u8 band) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + int i = 0, j; + chan_freq_power_t *cfp; + int cfp_no; + region_chan_t region_chan_old[MAX_REGION_CHANNEL_NUM]; + + ENTER(); + + memcpy(pmadapter, region_chan_old, pmadapter->region_channel, + sizeof(pmadapter->region_channel)); + memset(pmadapter, pmadapter->region_channel, 0, + sizeof(pmadapter->region_channel)); + + if (band & (BAND_B | BAND_G | BAND_GN)) { + cfp = wlan_get_region_cfp_table(pmadapter, region, + BAND_G | BAND_B | BAND_GN, + &cfp_no); + if (cfp) { + pmadapter->region_channel[i].num_cfp = (t_u8)cfp_no; + pmadapter->region_channel[i].pcfp = cfp; + } else { + PRINTM(MERROR, "wrong region code %#x in Band B-G\n", + region); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + pmadapter->region_channel[i].valid = MTRUE; + pmadapter->region_channel[i].region = region; + if (band & BAND_GN) + pmadapter->region_channel[i].band = BAND_G; + else + pmadapter->region_channel[i].band = + (band & BAND_G) ? BAND_G : BAND_B; + + for (j = 0; j < MAX_REGION_CHANNEL_NUM; j++) { + if (region_chan_old[j].band & (BAND_B | BAND_G)) + break; + } + if ((j < MAX_REGION_CHANNEL_NUM) && region_chan_old[j].valid) + wlan_cfp_copy_dynamic(pmadapter, cfp, cfp_no, + region_chan_old[j].pcfp, + region_chan_old[j].num_cfp); + else + wlan_cfp_copy_dynamic(pmadapter, cfp, cfp_no, MNULL, 0); + + i++; + } + if (band & (BAND_A | BAND_AN | BAND_AAC)) { + cfp = wlan_get_region_cfp_table(pmadapter, region, BAND_A, + &cfp_no); + if (cfp) { + pmadapter->region_channel[i].num_cfp = (t_u8)cfp_no; + pmadapter->region_channel[i].pcfp = cfp; + } else { + PRINTM(MERROR, "wrong region code %#x in Band A\n", + region); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + pmadapter->region_channel[i].valid = MTRUE; + pmadapter->region_channel[i].region = region; + pmadapter->region_channel[i].band = BAND_A; + + for (j = 0; j < MAX_REGION_CHANNEL_NUM; j++) { + if (region_chan_old[j].band & BAND_A) + break; + } + if ((j < MAX_REGION_CHANNEL_NUM) && region_chan_old[j].valid) + wlan_cfp_copy_dynamic(pmadapter, cfp, cfp_no, + region_chan_old[j].pcfp, + region_chan_old[j].num_cfp); + else + wlan_cfp_copy_dynamic(pmadapter, cfp, cfp_no, MNULL, 0); + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Get if radar detection is enabled or not on a certain channel + * + * @param priv Private driver information structure + * @param chnl Channel to determine radar detection requirements + * + * @return + * - MTRUE if radar detection is required + * - MFALSE otherwise + */ +t_bool +wlan_get_cfp_radar_detect(mlan_private *priv, t_u8 chnl) +{ + int i, j; + t_bool required = MFALSE; + chan_freq_power_t *pcfp = MNULL; + + ENTER(); + + /* get the cfp table first */ + for (i = 0; i < MAX_REGION_CHANNEL_NUM; i++) { + if (priv->adapter->region_channel[i].band == BAND_A) { + pcfp = priv->adapter->region_channel[i].pcfp; + break; + } + } + + if (!pcfp) { + /* This means operation in BAND-A is not support, we can just + return false here, it's harmless */ + goto done; + } + + /* get the radar detection requirements according to chan num */ + for (j = 0; j < priv->adapter->region_channel[i].num_cfp; j++) { + if (pcfp[j].channel == chnl) { + required = pcfp[j].passive_scan_or_radar_detect; + break; + } + } + +done: + LEAVE(); + return required; +} + +/** + * @brief Get if scan type is passive or not on a certain channel for b/g band + * + * @param priv Private driver information structure + * @param chnl Channel to determine scan type + * + * @return + * - MTRUE if scan type is passive + * - MFALSE otherwise + */ + +t_bool +wlan_bg_scan_type_is_passive(mlan_private *priv, t_u8 chnl) +{ + int i, j; + t_bool passive = MFALSE; + chan_freq_power_t *pcfp = MNULL; + + ENTER(); + + /* get the cfp table first */ + for (i = 0; i < MAX_REGION_CHANNEL_NUM; i++) { + if (priv->adapter->region_channel[i].band & (BAND_B | BAND_G)) { + pcfp = priv->adapter->region_channel[i].pcfp; + break; + } + } + + if (!pcfp) { + /* This means operation in BAND-B or BAND_G is not support, we + can just return false here */ + goto done; + } + + /* get the bg scan type according to chan num */ + for (j = 0; j < priv->adapter->region_channel[i].num_cfp; j++) { + if (pcfp[j].channel == chnl) { + passive = pcfp[j].passive_scan_or_radar_detect; + break; + } + } + +done: + LEAVE(); + return passive; +} + +/** + * @brief Get if a channel is blacklisted or not + * + * @param priv Private driver information structure + * @param band Band to check + * @param chan Channel to check + * + * @return + * - MTRUE if channel is blacklisted + * - MFALSE otherwise + */ + +t_bool +wlan_is_chan_blacklisted(mlan_private *priv, t_u8 band, t_u8 chan) +{ + int i, j; + t_bool blacklist = MFALSE; + chan_freq_power_t *pcfp = MNULL; + + ENTER(); + + /* get the cfp table first */ + for (i = 0; i < MAX_REGION_CHANNEL_NUM; i++) { + if (priv->adapter->region_channel[i].band & band) { + pcfp = priv->adapter->region_channel[i].pcfp; + break; + } + } + + if (pcfp) { + /* check table according to chan num */ + for (j = 0; j < priv->adapter->region_channel[i].num_cfp; j++) { + if (pcfp[j].channel == chan) { + blacklist = pcfp[j].dynamic.blacklist; + break; + } + } + } + + LEAVE(); + return blacklist; +} + +/** + * @brief Set a channel as blacklisted or not + * + * @param priv Private driver information structure + * @param band Band to check + * @param chan Channel to check + * @param bl Blacklist if MTRUE + * + * @return + * - MTRUE if channel setting is updated + * - MFALSE otherwise + */ + +t_bool +wlan_set_chan_blacklist(mlan_private *priv, t_u8 band, t_u8 chan, t_bool bl) +{ + int i, j; + t_bool set_bl = MFALSE; + chan_freq_power_t *pcfp = MNULL; + + ENTER(); + + /* get the cfp table first */ + for (i = 0; i < MAX_REGION_CHANNEL_NUM; i++) { + if (priv->adapter->region_channel[i].band & band) { + pcfp = priv->adapter->region_channel[i].pcfp; + break; + } + } + + if (pcfp) { + /* check table according to chan num */ + for (j = 0; j < priv->adapter->region_channel[i].num_cfp; j++) { + if (pcfp[j].channel == chan) { + pcfp[j].dynamic.blacklist = bl; + set_bl = MTRUE; + break; + } + } + } + + LEAVE(); + return set_bl; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_cmdevt.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_cmdevt.c new file mode 100644 index 00000000..ee46425d --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_cmdevt.c @@ -0,0 +1,4873 @@ +/** + * @file mlan_cmdevt.c + * + * @brief This file contains the handling of CMD/EVENT in MLAN + * + * Copyright (C) 2009-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/************************************************************* +Change Log: + 05/12/2009: initial version +************************************************************/ +#include "mlan.h" +#ifdef STA_SUPPORT +#include "mlan_join.h" +#endif +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_wmm.h" +#include "mlan_11n.h" +#include "mlan_11ac.h" +#include "mlan_11h.h" +#include "mlan_sdio.h" +/******************************************************** + Local Variables +********************************************************/ + +/******************************************************* + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ +#ifdef STA_SUPPORT +/** + * @brief Internal function used to flush the scan pending queue + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return N/A + */ +void +wlan_check_scan_queue(IN pmlan_adapter pmadapter) +{ + cmd_ctrl_node *pcmd_node = MNULL; + t_u16 num = 0; + + pcmd_node = + (cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle, + &pmadapter->scan_pending_q, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + if (!pcmd_node) { + PRINTM(MERROR, "No pending scan command\n"); + return; + } + while (pcmd_node != (cmd_ctrl_node *)&pmadapter->scan_pending_q) { + num++; + pcmd_node = pcmd_node->pnext; + } + PRINTM(MERROR, "num_pending_scan=%d\n", num); +} +#endif + +/** + * @brief This function will dump the pending commands id + * + * @param pmadapter A pointer to mlan_adapter + * + * @return N/A + */ +static void +wlan_dump_pending_commands(pmlan_adapter pmadapter) +{ + cmd_ctrl_node *pcmd_node = MNULL; + HostCmd_DS_COMMAND *pcmd; + + ENTER(); + wlan_request_cmd_lock(pmadapter); + pcmd_node = + (cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + if (!pcmd_node) { + wlan_release_cmd_lock(pmadapter); + LEAVE(); + return; + } + while (pcmd_node != (cmd_ctrl_node *)&pmadapter->cmd_pending_q) { + pcmd = (HostCmd_DS_COMMAND *)(pcmd_node->cmdbuf->pbuf + + pcmd_node->cmdbuf->data_offset); + PRINTM(MERROR, "pending command id: 0x%x ioctl_buf=%p\n", + wlan_le16_to_cpu(pcmd->command), pcmd_node->pioctl_buf); + pcmd_node = pcmd_node->pnext; + } + wlan_release_cmd_lock(pmadapter); +#ifdef STA_SUPPORT + wlan_check_scan_queue(pmadapter); +#endif + LEAVE(); + return; +} + +#define REASON_CODE_NO_CMD_NODE 1 +#define REASON_CODE_CMD_TIMEOUT 2 +#define REASON_CODE_CMD_TO_CARD_FAILURE 3 + +/** + * @brief This function dump debug info + * + * @return N/A + */ +t_void +wlan_dump_info(mlan_adapter *pmadapter, t_u8 reason) +{ + cmd_ctrl_node *pcmd_node = MNULL; +#ifdef DEBUG_LEVEL1 + t_u32 sec = 0, usec = 0; +#endif + t_u8 i; +#ifdef SDIO_MULTI_PORT_TX_AGGR + t_u8 j; + t_u8 mp_aggr_pkt_limit = pmadapter->psdio_device->mp_aggr_pkt_limit; +#endif + t_u16 cmd_id, cmd_act; + mlan_private *pmpriv = MNULL; + + ENTER(); + + PRINTM(MERROR, "------------Dump info-----------\n", reason); + switch (reason) { + case REASON_CODE_NO_CMD_NODE: + pmadapter->dbg.num_no_cmd_node++; + PRINTM(MERROR, "No Free command node\n"); + break; + case REASON_CODE_CMD_TIMEOUT: + PRINTM(MERROR, "Commmand Timeout\n"); + break; + case REASON_CODE_CMD_TO_CARD_FAILURE: + PRINTM(MERROR, "Command to card failure\n"); + break; + default: + break; + } + if ((reason == REASON_CODE_NO_CMD_NODE) && + (pmadapter->dbg.num_no_cmd_node > 1)) { + if (pmadapter->dbg.num_no_cmd_node >= 5) + wlan_recv_event(wlan_get_priv + (pmadapter, MLAN_BSS_ROLE_ANY), + MLAN_EVENT_ID_DRV_DBG_DUMP, MNULL); + LEAVE(); + return; + } + wlan_dump_pending_commands(pmadapter); + if (reason != REASON_CODE_CMD_TIMEOUT) { + if (!pmadapter->curr_cmd) { + PRINTM(MERROR, "CurCmd Empty\n"); + } else { + pcmd_node = pmadapter->curr_cmd; + cmd_id = pmadapter->dbg.last_cmd_id[pmadapter->dbg. + last_cmd_index]; + cmd_act = + pmadapter->dbg.last_cmd_act[pmadapter->dbg. + last_cmd_index]; + PRINTM_GET_SYS_TIME(MERROR, &sec, &usec); + PRINTM(MERROR, + "Current cmd id (%lu.%06lu) = 0x%x, act = 0x%x\n", + sec, usec, cmd_id, cmd_act); + if (pcmd_node->cmdbuf) { + t_u8 *pcmd_buf; + pcmd_buf = + pcmd_node->cmdbuf->pbuf + + pcmd_node->cmdbuf->data_offset + + INTF_HEADER_LEN; + for (i = 0; i < 16; i++) + PRINTM(MERROR, "%02x ", *pcmd_buf++); + PRINTM(MERROR, "\n"); + } + pmpriv = pcmd_node->priv; + if (pmpriv) + PRINTM(MERROR, "BSS type = %d BSS role= %d\n", + pmpriv->bss_type, pmpriv->bss_role); + } + } + PRINTM(MERROR, "mlan_processing =%d\n", pmadapter->mlan_processing); + PRINTM(MERROR, "mlan_rx_processing =%d\n", + pmadapter->mlan_rx_processing); + PRINTM(MERROR, "rx_pkts_queued=%d\n", pmadapter->rx_pkts_queued); + PRINTM(MERROR, "more_task_flag = %d\n", pmadapter->more_task_flag); + PRINTM(MERROR, "num_cmd_timeout = %d\n", pmadapter->num_cmd_timeout); + PRINTM(MERROR, "dbg.num_cmd_timeout = %d\n", + pmadapter->dbg.num_cmd_timeout); + PRINTM(MERROR, "last_cmd_index = %d\n", pmadapter->dbg.last_cmd_index); + PRINTM(MERROR, "last_cmd_id = "); + for (i = 0; i < DBG_CMD_NUM; i++) + PRINTM(MERROR, "0x%x ", pmadapter->dbg.last_cmd_id[i]); + PRINTM(MERROR, "\n"); + PRINTM(MERROR, "last_cmd_act = "); + for (i = 0; i < DBG_CMD_NUM; i++) + PRINTM(MERROR, "0x%x ", pmadapter->dbg.last_cmd_act[i]); + PRINTM(MERROR, "\n"); + PRINTM(MERROR, "last_cmd_resp_index = %d\n", + pmadapter->dbg.last_cmd_resp_index); + PRINTM(MERROR, "last_cmd_resp_id = "); + for (i = 0; i < DBG_CMD_NUM; i++) + PRINTM(MERROR, "0x%x ", pmadapter->dbg.last_cmd_resp_id[i]); + PRINTM(MERROR, "\n"); + PRINTM(MERROR, "last_event_index = %d\n", + pmadapter->dbg.last_event_index); + PRINTM(MERROR, "last_event = "); + for (i = 0; i < DBG_CMD_NUM; i++) + PRINTM(MERROR, "0x%x ", pmadapter->dbg.last_event[i]); + PRINTM(MERROR, "\n"); + + PRINTM(MERROR, "num_data_h2c_failure = %d\n", + pmadapter->dbg.num_tx_host_to_card_failure); + PRINTM(MERROR, "num_cmd_h2c_failure = %d\n", + pmadapter->dbg.num_cmd_host_to_card_failure); + PRINTM(MERROR, "num_data_c2h_failure = %d\n", + pmadapter->dbg.num_rx_card_to_host_failure); + PRINTM(MERROR, "num_cmdevt_c2h_failure = %d\n", + pmadapter->dbg.num_cmdevt_card_to_host_failure); + PRINTM(MERROR, "num_int_read_failure = %d\n", + pmadapter->dbg.num_int_read_failure); + PRINTM(MERROR, "last_int_status = %d\n", + pmadapter->dbg.last_int_status); + PRINTM(MERROR, "num_no_cmd_node = %d\n", + pmadapter->dbg.num_no_cmd_node); + PRINTM(MERROR, "num_event_deauth = %d\n", + pmadapter->dbg.num_event_deauth); + PRINTM(MERROR, "num_event_disassoc = %d\n", + pmadapter->dbg.num_event_disassoc); + PRINTM(MERROR, "num_event_link_lost = %d\n", + pmadapter->dbg.num_event_link_lost); + PRINTM(MERROR, "num_cmd_deauth = %d\n", pmadapter->dbg.num_cmd_deauth); + PRINTM(MERROR, "num_cmd_assoc_success = %d\n", + pmadapter->dbg.num_cmd_assoc_success); + PRINTM(MERROR, "num_cmd_assoc_failure = %d\n", + pmadapter->dbg.num_cmd_assoc_failure); + PRINTM(MERROR, "cmd_resp_received=%d\n", pmadapter->cmd_resp_received); + PRINTM(MERROR, "event_received=%d\n", pmadapter->event_received); + + PRINTM(MERROR, "max_tx_buf_size=%d\n", pmadapter->max_tx_buf_size); + PRINTM(MERROR, "tx_buf_size=%d\n", pmadapter->tx_buf_size); + PRINTM(MERROR, "curr_tx_buf_size=%d\n", pmadapter->curr_tx_buf_size); + + PRINTM(MERROR, "data_sent=%d cmd_sent=%d\n", pmadapter->data_sent, + pmadapter->cmd_sent); + + PRINTM(MERROR, "ps_mode=%d ps_state=%d\n", pmadapter->ps_mode, + pmadapter->ps_state); + PRINTM(MERROR, "wakeup_dev_req=%d wakeup_tries=%d\n", + pmadapter->pm_wakeup_card_req, pmadapter->pm_wakeup_fw_try); + PRINTM(MERROR, "hs_configured=%d hs_activated=%d\n", + pmadapter->is_hs_configured, pmadapter->hs_activated); + PRINTM(MERROR, "pps_uapsd_mode=%d sleep_pd=%d\n", + pmadapter->pps_uapsd_mode, pmadapter->sleep_period.period); + PRINTM(MERROR, "tx_lock_flag = %d\n", pmadapter->tx_lock_flag); + PRINTM(MERROR, "scan_processing = %d\n", pmadapter->scan_processing); + PRINTM(MERROR, "mp_rd_bitmap=0x%x curr_rd_port=0x%x\n", + pmadapter->mp_rd_bitmap, pmadapter->curr_rd_port); + PRINTM(MERROR, "mp_wr_bitmap=0x%x curr_wr_port=0x%x\n", + pmadapter->mp_wr_bitmap, pmadapter->curr_wr_port); + PRINTM(MERROR, "mp_invalid_update=%d\n", pmadapter->mp_invalid_update); +#ifdef SDIO_MULTI_PORT_TX_AGGR + PRINTM(MERROR, "last_recv_wr_bitmap=0x%x last_mp_index=%d\n", + pmadapter->last_recv_wr_bitmap, pmadapter->last_mp_index); + for (i = 0; i < SDIO_MP_DBG_NUM; i++) { + PRINTM(MERROR, + "mp_wr_bitmap: 0x%x mp_wr_ports=0x%x len=%d curr_wr_port=0x%x\n", + pmadapter->last_mp_wr_bitmap[i], + pmadapter->last_mp_wr_ports[i], + pmadapter->last_mp_wr_len[i], + pmadapter->last_curr_wr_port[i]); + for (j = 0; j < mp_aggr_pkt_limit; j++) { + PRINTM(MERROR, "0x%02x ", + pmadapter->last_mp_wr_info[i * + mp_aggr_pkt_limit + + j]); + } + PRINTM(MERROR, "\n"); + } +#endif + for (i = 0; i < pmadapter->priv_num; ++i) { + if (pmadapter->priv[i]) + wlan_dump_ralist(pmadapter->priv[i]); + } + if (reason != REASON_CODE_CMD_TIMEOUT) { + if ((pmadapter->dbg.num_no_cmd_node >= 5) + || (pmadapter->pm_wakeup_card_req && + pmadapter->pm_wakeup_fw_try) + ) { + if (pmpriv) + wlan_recv_event(pmpriv, + MLAN_EVENT_ID_DRV_DBG_DUMP, + MNULL); + else + wlan_recv_event(wlan_get_priv + (pmadapter, MLAN_BSS_ROLE_ANY), + MLAN_EVENT_ID_DRV_DBG_DUMP, + MNULL); + } + } + PRINTM(MERROR, "-------- Dump info End---------\n", reason); + LEAVE(); + return; +} + +/** + * @brief This function convert a given character to hex + * + * @param chr Character to be converted + * + * @return The converted hex if chr is a valid hex, else 0 + */ +static t_u32 +wlan_hexval(t_u8 chr) +{ + if (chr >= '0' && chr <= '9') + return chr - '0'; + if (chr >= 'A' && chr <= 'F') + return chr - 'A' + 10; + if (chr >= 'a' && chr <= 'f') + return chr - 'a' + 10; + + return 0; +} + +/** + * @brief This function convert a given string to hex + * + * @param a A pointer to string to be converted + * + * @return The converted hex value if param a is a valid hex, else 0 + */ +int +wlan_atox(t_u8 *a) +{ + int i = 0; + + ENTER(); + + while (wlan_isxdigit(*a)) + i = i * 16 + wlan_hexval(*a++); + + LEAVE(); + return i; +} + +/** + * @brief This function parse cal data from ASCII to hex + * + * @param src A pointer to source data + * @param len Source data length + * @param dst A pointer to a buf to store the parsed data + * + * @return The parsed hex data length + */ +static t_u32 +wlan_parse_cal_cfg(t_u8 *src, t_size len, t_u8 *dst) +{ + t_u8 *ptr; + t_u8 *dptr; + + ENTER(); + ptr = src; + dptr = dst; + + while (ptr - src < len) { + if (*ptr && (wlan_isspace(*ptr) || *ptr == '\t')) { + ptr++; + continue; + } + + if (wlan_isxdigit(*ptr)) { + *dptr++ = wlan_atox(ptr); + ptr += 2; + } else { + ptr++; + } + } + LEAVE(); + return dptr - dst; +} + +/** + * @brief This function initializes the command node. + * + * @param pmpriv A pointer to mlan_private structure + * @param pcmd_node A pointer to cmd_ctrl_node structure + * @param cmd_oid Cmd oid: treated as sub command + * @param pioctl_buf A pointer to MLAN IOCTL Request buffer + * @param pdata_buf A pointer to information buffer + * + * @return N/A + */ +static void +wlan_init_cmd_node(IN pmlan_private pmpriv, + IN cmd_ctrl_node *pcmd_node, + IN t_u32 cmd_oid, + IN t_void *pioctl_buf, IN t_void *pdata_buf) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + + ENTER(); + + if (pcmd_node == MNULL) { + LEAVE(); + return; + } + pcmd_node->priv = pmpriv; + pcmd_node->cmd_oid = cmd_oid; + pcmd_node->pioctl_buf = pioctl_buf; + pcmd_node->pdata_buf = pdata_buf; + + pcmd_node->cmdbuf = pcmd_node->pmbuf; + + /* Make sure head_ptr for cmd buf is Align */ + pcmd_node->cmdbuf->data_offset = 0; + memset(pmadapter, pcmd_node->cmdbuf->pbuf, 0, + MRVDRV_SIZE_OF_CMD_BUFFER); + + /* Prepare mlan_buffer for command sending */ + pcmd_node->cmdbuf->buf_type = MLAN_BUF_TYPE_CMD; + pcmd_node->cmdbuf->data_offset += INTF_HEADER_LEN; + + LEAVE(); +} + +/** + * @brief This function gets a free command node if available in + * command free queue. + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return cmd_ctrl_node A pointer to cmd_ctrl_node structure or MNULL + */ +static cmd_ctrl_node * +wlan_get_cmd_node(mlan_adapter *pmadapter) +{ + cmd_ctrl_node *pcmd_node; + + ENTER(); + + if (pmadapter == MNULL) { + LEAVE(); + return MNULL; + } + + if (util_peek_list(pmadapter->pmoal_handle, &pmadapter->cmd_free_q, + pmadapter->callbacks.moal_spin_lock, + pmadapter->callbacks.moal_spin_unlock)) { + pcmd_node = + (cmd_ctrl_node *)util_dequeue_list(pmadapter-> + pmoal_handle, + &pmadapter-> + cmd_free_q, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + } else { + PRINTM(MERROR, + "GET_CMD_NODE: cmd_ctrl_node is not available\n"); + pcmd_node = MNULL; + } + + LEAVE(); + return pcmd_node; +} + +/** + * @brief This function cleans command node. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pcmd_node A pointer to cmd_ctrl_node structure + * + * @return N/A + */ +static t_void +wlan_clean_cmd_node(pmlan_adapter pmadapter, cmd_ctrl_node *pcmd_node) +{ + ENTER(); + + if (pcmd_node == MNULL) { + LEAVE(); + return; + } + pcmd_node->cmd_oid = 0; + pcmd_node->cmd_flag = 0; + pcmd_node->pioctl_buf = MNULL; + pcmd_node->pdata_buf = MNULL; + + if (pcmd_node->respbuf) { + wlan_free_mlan_buffer(pmadapter, pcmd_node->respbuf); + pcmd_node->respbuf = MNULL; + } + + LEAVE(); + return; +} + +#ifdef STA_SUPPORT +/** + * @brief This function will return the pointer to the first entry in + * pending cmd which is scan command + * + * @param pmadapter A pointer to mlan_adapter + * + * @return A pointer to first entry match pioctl_req + */ +static cmd_ctrl_node * +wlan_get_pending_scan_cmd(pmlan_adapter pmadapter) +{ + cmd_ctrl_node *pcmd_node = MNULL; + + ENTER(); + + pcmd_node = + (cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + if (!pcmd_node) { + LEAVE(); + return MNULL; + } + while (pcmd_node != (cmd_ctrl_node *)&pmadapter->cmd_pending_q) { + if (pcmd_node->cmd_flag & CMD_F_SCAN) { + LEAVE(); + return pcmd_node; + } + pcmd_node = pcmd_node->pnext; + } + LEAVE(); + return MNULL; +} +#endif + +/** + * @brief This function will return the pointer to the first entry in + * pending cmd which matches the given pioctl_req + * + * @param pmadapter A pointer to mlan_adapter + * @param pioctl_req A pointer to mlan_ioctl_req buf + * + * @return A pointer to first entry match pioctl_req + */ +static cmd_ctrl_node * +wlan_get_pending_ioctl_cmd(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req) +{ + cmd_ctrl_node *pcmd_node = MNULL; + + ENTER(); + + pcmd_node = + (cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + if (!pcmd_node) { + LEAVE(); + return MNULL; + } + while (pcmd_node != (cmd_ctrl_node *)&pmadapter->cmd_pending_q) { + if (pcmd_node->pioctl_buf && + (pcmd_node->pioctl_buf == pioctl_req)) { + LEAVE(); + return pcmd_node; + } + pcmd_node = pcmd_node->pnext; + } + LEAVE(); + return MNULL; +} + +/** + * @brief This function will return the pointer to the first entry in + * pending cmd which matches the given bss_index + * + * @param pmadapter A pointer to mlan_adapter + * @param bss_index bss_index + * + * @return A pointer to first entry match pioctl_req + */ +static cmd_ctrl_node * +wlan_get_bss_pending_ioctl_cmd(pmlan_adapter pmadapter, t_u32 bss_index) +{ + cmd_ctrl_node *pcmd_node = MNULL; + mlan_ioctl_req *pioctl_buf = MNULL; + ENTER(); + + pcmd_node = + (cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + if (!pcmd_node) { + LEAVE(); + return MNULL; + } + while (pcmd_node != (cmd_ctrl_node *)&pmadapter->cmd_pending_q) { + if (pcmd_node->pioctl_buf) { + pioctl_buf = (mlan_ioctl_req *)pcmd_node->pioctl_buf; + if (pioctl_buf->bss_index == bss_index) { + LEAVE(); + return pcmd_node; + } + } + pcmd_node = pcmd_node->pnext; + } + LEAVE(); + return MNULL; +} + +/** + * @brief This function handles the command response of host_cmd + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_host_cmd(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_misc_cfg *misc; + t_u16 size = wlan_le16_to_cpu(resp->size); + + ENTER(); + + PRINTM(MINFO, "host command response size = %d\n", size); + size = MIN(size, MRVDRV_SIZE_OF_CMD_BUFFER); + if (pioctl_buf) { + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + misc->param.hostcmd.len = size; + memcpy(pmpriv->adapter, misc->param.hostcmd.cmd, (void *)resp, + size); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function sends host command to firmware. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_host_cmd(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) +{ + mlan_ds_misc_cmd *pcmd_ptr = (mlan_ds_misc_cmd *)pdata_buf; + + ENTER(); + + /* Copy the HOST command to command buffer */ + memcpy(pmpriv->adapter, (void *)cmd, pcmd_ptr->cmd, + MIN(MRVDRV_SIZE_OF_CMD_BUFFER, pcmd_ptr->len)); + PRINTM(MINFO, "Host command size = %d\n", pcmd_ptr->len); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function downloads a command to firmware. + * + * @param pmpriv A pointer to mlan_private structure + * @param pcmd_node A pointer to cmd_ctrl_node structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_dnld_cmd_to_fw(IN mlan_private *pmpriv, IN cmd_ctrl_node *pcmd_node) +{ + + mlan_adapter *pmadapter = pmpriv->adapter; + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; + mlan_status ret = MLAN_STATUS_SUCCESS; + HostCmd_DS_COMMAND *pcmd; + mlan_ioctl_req *pioctl_buf = MNULL; + t_u16 cmd_code; + t_u16 cmd_size; + t_u32 age_ts_usec; +#ifdef DEBUG_LEVEL1 + t_u32 sec = 0, usec = 0; +#endif + + ENTER(); + + if (pcmd_node) + if (pcmd_node->pioctl_buf != MNULL) + pioctl_buf = (mlan_ioctl_req *)pcmd_node->pioctl_buf; + if (!pmadapter || !pcmd_node) { + if (pioctl_buf) + pioctl_buf->status_code = MLAN_ERROR_CMD_DNLD_FAIL; + ret = MLAN_STATUS_FAILURE; + goto done; + } + + pcmd = (HostCmd_DS_COMMAND *)(pcmd_node->cmdbuf->pbuf + + pcmd_node->cmdbuf->data_offset); + + /* Sanity test */ + if (pcmd == MNULL || pcmd->size == 0) { + PRINTM(MERROR, + "DNLD_CMD: pcmd is null or command size is zero, " + "Not sending\n"); + if (pioctl_buf) + pioctl_buf->status_code = MLAN_ERROR_CMD_DNLD_FAIL; + wlan_insert_cmd_to_free_q(pmadapter, pcmd_node); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Set command sequence number */ + pmadapter->seq_num++; + pcmd->seq_num = + wlan_cpu_to_le16(HostCmd_SET_SEQ_NO_BSS_INFO + (pmadapter->seq_num, pcmd_node->priv->bss_num, + pcmd_node->priv->bss_type)); + cmd_code = wlan_le16_to_cpu(pcmd->command); + cmd_size = wlan_le16_to_cpu(pcmd->size); + + pcmd_node->cmdbuf->data_len = cmd_size; + + wlan_request_cmd_lock(pmadapter); + pmadapter->curr_cmd = pcmd_node; + wlan_release_cmd_lock(pmadapter); + + /* Save the last command id and action to debug log */ + pmadapter->dbg.last_cmd_index = + (pmadapter->dbg.last_cmd_index + 1) % DBG_CMD_NUM; + pmadapter->dbg.last_cmd_id[pmadapter->dbg.last_cmd_index] = cmd_code; + pmadapter->dbg.last_cmd_act[pmadapter->dbg.last_cmd_index] = + wlan_le16_to_cpu(*(t_u16 *)((t_u8 *)pcmd + S_DS_GEN)); + pmadapter->callbacks.moal_get_system_time(pmadapter->pmoal_handle, + &pmadapter->dnld_cmd_in_secs, + &age_ts_usec); + + PRINTM_GET_SYS_TIME(MCMND, &sec, &usec); + PRINTM_NETINTF(MCMND, pmpriv); + PRINTM(MCMND, + "DNLD_CMD (%lu.%06lu): 0x%x, act 0x%x, len %d, seqno 0x%x\n", + sec, usec, cmd_code, + wlan_le16_to_cpu(*(t_u16 *)((t_u8 *)pcmd + S_DS_GEN)), cmd_size, + wlan_le16_to_cpu(pcmd->seq_num)); + DBG_HEXDUMP(MCMD_D, "DNLD_CMD", (t_u8 *)pcmd, cmd_size); + + /* Send the command to lower layer */ + + pcmd_node->cmdbuf->data_offset -= INTF_HEADER_LEN; + pcmd_node->cmdbuf->data_len += INTF_HEADER_LEN; + /* Extra header for SDIO is added here */ + ret = wlan_sdio_host_to_card(pmadapter, MLAN_TYPE_CMD, + pcmd_node->cmdbuf, MNULL); + + if (ret == MLAN_STATUS_FAILURE) { + PRINTM(MERROR, "DNLD_CMD: Host to Card Failed\n"); + if (pcmd_node->pioctl_buf) { + pioctl_buf = (mlan_ioctl_req *)pcmd_node->pioctl_buf; + pioctl_buf->status_code = MLAN_ERROR_CMD_DNLD_FAIL; + } + wlan_insert_cmd_to_free_q(pmadapter, pmadapter->curr_cmd); + + wlan_request_cmd_lock(pmadapter); + pmadapter->curr_cmd = MNULL; + if (pmadapter->dbg.last_cmd_index) + pmadapter->dbg.last_cmd_index--; + else + pmadapter->dbg.last_cmd_index = DBG_CMD_NUM - 1; + wlan_release_cmd_lock(pmadapter); + + pmadapter->dbg.num_cmd_host_to_card_failure++; + wlan_dump_info(pmadapter, REASON_CODE_CMD_TO_CARD_FAILURE); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Clear BSS_NO_BITS from HostCmd */ + cmd_code &= HostCmd_CMD_ID_MASK; + /* soft_reset command has no command response, we should return here */ + if (cmd_code == HostCmd_CMD_SOFT_RESET) { + PRINTM(MCMND, "DNLD_CMD: SoftReset\n"); + if (pcmd_node->pioctl_buf) { + pioctl_buf = (mlan_ioctl_req *)pcmd_node->pioctl_buf; + wlan_request_cmd_lock(pmadapter); + pmadapter->curr_cmd->pioctl_buf = MNULL; + wlan_release_cmd_lock(pmadapter); + pcb->moal_ioctl_complete(pmadapter->pmoal_handle, + pioctl_buf, + MLAN_STATUS_SUCCESS); + } + goto done; + } + + /* Setup the timer after transmit command */ + pcb->moal_start_timer(pmadapter->pmoal_handle, + pmadapter->pmlan_cmd_timer, MFALSE, + MRVDRV_TIMER_10S * 2); + + pmadapter->cmd_timer_is_set = MTRUE; + + ret = MLAN_STATUS_SUCCESS; + +done: + LEAVE(); + return ret; +} + +/** + * @brief This function sends sleep confirm command to firmware. + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_dnld_sleep_confirm_cmd(mlan_adapter *pmadapter) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + static t_u32 i; + t_u16 cmd_len = 0; + opt_sleep_confirm_buffer *sleep_cfm_buf = + (opt_sleep_confirm_buffer *)(pmadapter->psleep_cfm->pbuf + + pmadapter->psleep_cfm-> + data_offset); + + ENTER(); + + cmd_len = sizeof(OPT_Confirm_Sleep); + pmadapter->seq_num++; + sleep_cfm_buf->ps_cfm_sleep.seq_num = + wlan_cpu_to_le16(HostCmd_SET_SEQ_NO_BSS_INFO + (pmadapter->seq_num, + (wlan_get_priv + (pmadapter, MLAN_BSS_ROLE_ANY))->bss_num, + (wlan_get_priv + (pmadapter, MLAN_BSS_ROLE_ANY))->bss_type)); + DBG_HEXDUMP(MCMD_D, "SLEEP_CFM", &sleep_cfm_buf->ps_cfm_sleep, + sizeof(OPT_Confirm_Sleep)); + + /* Send sleep confirm command to firmware */ + + pmadapter->psleep_cfm->data_len = cmd_len + INTF_HEADER_LEN; + ret = wlan_sdio_host_to_card(pmadapter, MLAN_TYPE_CMD, + pmadapter->psleep_cfm, MNULL); + + if (ret == MLAN_STATUS_FAILURE) { + PRINTM(MERROR, "SLEEP_CFM: failed\n"); + pmadapter->dbg.num_cmd_sleep_cfm_host_to_card_failure++; + goto done; + } else { + if (GET_BSS_ROLE(wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY)) == + MLAN_BSS_ROLE_UAP) + pmadapter->ps_state = PS_STATE_SLEEP_CFM; +#ifdef STA_SUPPORT + if (GET_BSS_ROLE(wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY)) == + MLAN_BSS_ROLE_STA) { + if (!sleep_cfm_buf->ps_cfm_sleep.sleep_cfm.resp_ctrl) { + /* Response is not needed for sleep confirm + command */ + pmadapter->ps_state = PS_STATE_SLEEP; + } else { + pmadapter->ps_state = PS_STATE_SLEEP_CFM; + } + + if (!sleep_cfm_buf->ps_cfm_sleep.sleep_cfm.resp_ctrl + && (pmadapter->is_hs_configured && + !pmadapter->sleep_period.period)) { + pmadapter->pm_wakeup_card_req = MTRUE; + wlan_host_sleep_activated_event(wlan_get_priv + (pmadapter, + MLAN_BSS_ROLE_STA), + MTRUE); + } + } +#endif /* STA_SUPPORT */ + +#define NUM_SC_PER_LINE 16 + if (++i % NUM_SC_PER_LINE == 0) + PRINTM(MEVENT, "+\n"); + else + PRINTM(MEVENT, "+"); + } + +done: + LEAVE(); + return ret; +} + +/******************************************************** + Global Functions +********************************************************/ + +/** + * @brief Event handler + * + * @param priv A pointer to mlan_private structure + * @param event_id Event ID + * @param pmevent Event buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_recv_event(pmlan_private priv, mlan_event_id event_id, t_void *pmevent) +{ + pmlan_callbacks pcb = &priv->adapter->callbacks; + + ENTER(); + + if (pmevent) + /* The caller has provided the event. */ + pcb->moal_recv_event(priv->adapter->pmoal_handle, + (pmlan_event)pmevent); + else { + mlan_event mevent; + + memset(priv->adapter, &mevent, 0, sizeof(mlan_event)); + mevent.bss_index = priv->bss_index; + mevent.event_id = event_id; + mevent.event_len = 0; + + pcb->moal_recv_event(priv->adapter->pmoal_handle, &mevent); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function allocates the command buffer and links + * it to command free queue. + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_alloc_cmd_buffer(IN mlan_adapter *pmadapter) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; + cmd_ctrl_node *pcmd_array = MNULL; + t_u32 buf_size; + t_u32 i; + + ENTER(); + + /* Allocate and initialize cmd_ctrl_node */ + buf_size = sizeof(cmd_ctrl_node) * MRVDRV_NUM_OF_CMD_BUFFER; + ret = pcb->moal_malloc(pmadapter->pmoal_handle, buf_size, + MLAN_MEM_DEF | MLAN_MEM_DMA, + (t_u8 **)&pcmd_array); + if (ret != MLAN_STATUS_SUCCESS || !pcmd_array) { + PRINTM(MERROR, + "ALLOC_CMD_BUF: Failed to allocate pcmd_array\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + pmadapter->cmd_pool = pcmd_array; + memset(pmadapter, pmadapter->cmd_pool, 0, buf_size); + + /* Allocate and initialize command buffers */ + for (i = 0; i < MRVDRV_NUM_OF_CMD_BUFFER; i++) { + pcmd_array[i].pmbuf = wlan_alloc_mlan_buffer(pmadapter, + MRVDRV_SIZE_OF_CMD_BUFFER, + 0, + MOAL_MALLOC_BUFFER); + if (!pcmd_array[i].pmbuf) { + PRINTM(MERROR, + "ALLOC_CMD_BUF: Failed to allocate command buffer\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + } + + for (i = 0; i < MRVDRV_NUM_OF_CMD_BUFFER; i++) + wlan_insert_cmd_to_free_q(pmadapter, &pcmd_array[i]); + ret = MLAN_STATUS_SUCCESS; +done: + LEAVE(); + return ret; +} + +/** + * @brief This function frees the command buffer. + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_free_cmd_buffer(IN mlan_adapter *pmadapter) +{ + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; + cmd_ctrl_node *pcmd_array; + t_u32 i; + + ENTER(); + + /* Need to check if cmd pool is allocated or not */ + if (pmadapter->cmd_pool == MNULL) { + PRINTM(MINFO, "FREE_CMD_BUF: cmd_pool is Null\n"); + goto done; + } + + pcmd_array = pmadapter->cmd_pool; + + /* Release shared memory buffers */ + for (i = 0; i < MRVDRV_NUM_OF_CMD_BUFFER; i++) { + if (pcmd_array[i].pmbuf) { + PRINTM(MINFO, "Free all the command buffer.\n"); + wlan_free_mlan_buffer(pmadapter, pcmd_array[i].pmbuf); + pcmd_array[i].pmbuf = MNULL; + } + if (pcmd_array[i].respbuf) { + wlan_free_mlan_buffer(pmadapter, pcmd_array[i].respbuf); + pcmd_array[i].respbuf = MNULL; + } + } + /* Release cmd_ctrl_node */ + if (pmadapter->cmd_pool) { + PRINTM(MINFO, "Free command pool.\n"); + pcb->moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pmadapter->cmd_pool); + pmadapter->cmd_pool = MNULL; + } + +done: + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles events generated by firmware + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_process_event(pmlan_adapter pmadapter) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private priv = wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY); + pmlan_buffer pmbuf = pmadapter->pmlan_buffer_event; + t_u32 eventcause = pmadapter->event_cause; +#ifdef DEBUG_LEVEL1 + t_u32 in_ts_sec = 0, in_ts_usec = 0; +#endif + ENTER(); + + /* Save the last event to debug log */ + pmadapter->dbg.last_event_index = + (pmadapter->dbg.last_event_index + 1) % DBG_CMD_NUM; + pmadapter->dbg.last_event[pmadapter->dbg.last_event_index] = + (t_u16)eventcause; + + if ((eventcause & EVENT_ID_MASK) == EVENT_RADAR_DETECTED) { + if (wlan_11h_dfs_event_preprocessing(pmadapter) == + MLAN_STATUS_SUCCESS) { + memcpy(pmadapter, (t_u8 *)&eventcause, + pmbuf->pbuf + pmbuf->data_offset, + sizeof(eventcause)); + } + } + /* Get BSS number and corresponding priv */ + priv = wlan_get_priv_by_id(pmadapter, EVENT_GET_BSS_NUM(eventcause), + EVENT_GET_BSS_TYPE(eventcause)); + if (!priv) + priv = wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY); + + /* Clear BSS_NO_BITS from event */ + eventcause &= EVENT_ID_MASK; + pmadapter->event_cause = eventcause; + + if (pmbuf) { + pmbuf->bss_index = priv->bss_index; + memcpy(pmadapter, + pmbuf->pbuf + pmbuf->data_offset, + (t_u8 *)&eventcause, sizeof(eventcause)); + } + + if (MTRUE + && (eventcause != EVENT_PS_SLEEP && eventcause != EVENT_PS_AWAKE) + ) { + PRINTM_GET_SYS_TIME(MEVENT, &in_ts_sec, &in_ts_usec); + PRINTM_NETINTF(MEVENT, priv); + PRINTM(MEVENT, "%lu.%06lu : Event: 0x%x\n", in_ts_sec, + in_ts_usec, eventcause); + } + + ret = priv->ops.process_event(priv); + + pmadapter->event_cause = 0; + pmadapter->pmlan_buffer_event = MNULL; + if (pmbuf) + wlan_free_mlan_buffer(pmadapter, pmbuf); + + LEAVE(); + return ret; +} + +/** + * @brief This function requests a lock on command queue. + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return N/A + */ +t_void +wlan_request_cmd_lock(IN mlan_adapter *pmadapter) +{ + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; + + ENTER(); + + /* Call MOAL spin lock callback function */ + pcb->moal_spin_lock(pmadapter->pmoal_handle, pmadapter->pmlan_cmd_lock); + + LEAVE(); + return; +} + +/** + * @brief This function releases a lock on command queue. + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return N/A + */ +t_void +wlan_release_cmd_lock(IN mlan_adapter *pmadapter) +{ + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; + + ENTER(); + + /* Call MOAL spin unlock callback function */ + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->pmlan_cmd_lock); + + LEAVE(); + return; +} + +/** + * @brief This function prepare the command before sending to firmware. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd_no Command number + * @param cmd_action Command action: GET or SET + * @param cmd_oid Cmd oid: treated as sub command + * @param pioctl_buf A pointer to MLAN IOCTL Request buffer + * @param pdata_buf A pointer to information buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_prepare_cmd(IN mlan_private *pmpriv, + IN t_u16 cmd_no, + IN t_u16 cmd_action, + IN t_u32 cmd_oid, IN t_void *pioctl_buf, IN t_void *pdata_buf) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_adapter *pmadapter = pmpriv->adapter; + cmd_ctrl_node *pcmd_node = MNULL; + HostCmd_DS_COMMAND *cmd_ptr = MNULL; + pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *)pioctl_buf; + + ENTER(); + + /* Sanity test */ + if (!pmadapter || pmadapter->surprise_removed) { + PRINTM(MERROR, "PREP_CMD: Card is Removed\n"); + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_FW_NOT_READY; + ret = MLAN_STATUS_FAILURE; + goto done; + } + + if (pmadapter->hw_status == WlanHardwareStatusReset) { + if ((cmd_no != HostCmd_CMD_FUNC_INIT) + ) { + PRINTM(MERROR, "PREP_CMD: FW is in reset state\n"); + if (pioctl_req) + pioctl_req->status_code = + MLAN_ERROR_FW_NOT_READY; + ret = MLAN_STATUS_FAILURE; + goto done; + } + } + + /* Get a new command node */ + pcmd_node = wlan_get_cmd_node(pmadapter); + + if (pcmd_node == MNULL) { + PRINTM(MERROR, "PREP_CMD: No free cmd node\n"); + wlan_dump_info(pmadapter, REASON_CODE_NO_CMD_NODE); + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_NO_MEM; + ret = MLAN_STATUS_FAILURE; + goto done; + } + /** reset num no cmd node */ + pmadapter->dbg.num_no_cmd_node = 0; + + /* Initialize the command node */ + wlan_init_cmd_node(pmpriv, pcmd_node, cmd_oid, pioctl_buf, pdata_buf); + + if (pcmd_node->cmdbuf == MNULL) { + PRINTM(MERROR, "PREP_CMD: No free cmd buf\n"); + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_NO_MEM; + ret = MLAN_STATUS_FAILURE; + goto done; + } + + cmd_ptr = + (HostCmd_DS_COMMAND *)(pcmd_node->cmdbuf->pbuf + + pcmd_node->cmdbuf->data_offset); + cmd_ptr->command = cmd_no; + cmd_ptr->result = 0; + + /* Prepare command */ + if (cmd_no) + ret = pmpriv->ops.prepare_cmd(pmpriv, cmd_no, cmd_action, + cmd_oid, pioctl_buf, pdata_buf, + cmd_ptr); + else { + ret = wlan_cmd_host_cmd(pmpriv, cmd_ptr, pdata_buf); + pcmd_node->cmd_flag |= CMD_F_HOSTCMD; + } + + /* Return error, since the command preparation failed */ + if (ret != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "PREP_CMD: Command 0x%x preparation failed\n", + cmd_no); + pcmd_node->pioctl_buf = MNULL; + wlan_insert_cmd_to_free_q(pmadapter, pcmd_node); + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_CMD_DNLD_FAIL; + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Send command */ +#ifdef STA_SUPPORT + if (cmd_no == HostCmd_CMD_802_11_SCAN + || cmd_no == HostCmd_CMD_802_11_SCAN_EXT) + wlan_queue_scan_cmd(pmpriv, pcmd_node); + else { +#endif + if ((cmd_no == HostCmd_CMD_802_11_HS_CFG_ENH) && + (cmd_action == HostCmd_ACT_GEN_SET) && + (pmadapter->hs_cfg.conditions == HOST_SLEEP_CFG_CANCEL)) + wlan_insert_cmd_to_pending_q(pmadapter, pcmd_node, + MFALSE); + else + wlan_insert_cmd_to_pending_q(pmadapter, pcmd_node, + MTRUE); +#ifdef STA_SUPPORT + } +#endif +done: + LEAVE(); + return ret; +} + +/** + * @brief This function inserts command node to cmd_free_q + * after cleaning it. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pcmd_node A pointer to cmd_ctrl_node structure + * + * @return N/A + */ +t_void +wlan_insert_cmd_to_free_q(IN mlan_adapter *pmadapter, + IN cmd_ctrl_node *pcmd_node) +{ + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; + mlan_ioctl_req *pioctl_req = MNULL; + ENTER(); + + if (pcmd_node == MNULL) + goto done; + if (pcmd_node->pioctl_buf) { + pioctl_req = (mlan_ioctl_req *)pcmd_node->pioctl_buf; + if (pioctl_req->status_code != MLAN_ERROR_NO_ERROR) + pcb->moal_ioctl_complete(pmadapter->pmoal_handle, + pioctl_req, + MLAN_STATUS_FAILURE); + else + pcb->moal_ioctl_complete(pmadapter->pmoal_handle, + pioctl_req, + MLAN_STATUS_SUCCESS); + } + /* Clean the node */ + wlan_clean_cmd_node(pmadapter, pcmd_node); + + /* Insert node into cmd_free_q */ + util_enqueue_list_tail(pmadapter->pmoal_handle, &pmadapter->cmd_free_q, + (pmlan_linked_list)pcmd_node, + pmadapter->callbacks.moal_spin_lock, + pmadapter->callbacks.moal_spin_unlock); +done: + LEAVE(); +} + +/** + * @brief This function queues the command to cmd list. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pcmd_node A pointer to cmd_ctrl_node structure + * @param add_tail Specify if the cmd needs to be queued in the header or tail + * + * @return N/A + */ +t_void +wlan_insert_cmd_to_pending_q(IN mlan_adapter *pmadapter, + IN cmd_ctrl_node *pcmd_node, IN t_u32 add_tail) +{ + HostCmd_DS_COMMAND *pcmd = MNULL; + t_u16 command; + + ENTER(); + + if (pcmd_node == MNULL) { + PRINTM(MERROR, "QUEUE_CMD: pcmd_node is MNULL\n"); + goto done; + } + + pcmd = (HostCmd_DS_COMMAND *)(pcmd_node->cmdbuf->pbuf + + pcmd_node->cmdbuf->data_offset); + + command = wlan_le16_to_cpu(pcmd->command); + + /* Exit_PS command needs to be queued in the header always. */ + if (command == HostCmd_CMD_802_11_PS_MODE_ENH) { + HostCmd_DS_802_11_PS_MODE_ENH *pm = &pcmd->params.psmode_enh; + if (wlan_le16_to_cpu(pm->action) == DIS_AUTO_PS) { + if (pmadapter->ps_state != PS_STATE_AWAKE) + add_tail = MFALSE; + } + } + + if (add_tail) { + util_enqueue_list_tail(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + (pmlan_linked_list)pcmd_node, + pmadapter->callbacks.moal_spin_lock, + pmadapter->callbacks.moal_spin_unlock); + } else { + util_enqueue_list_head(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + (pmlan_linked_list)pcmd_node, + pmadapter->callbacks.moal_spin_lock, + pmadapter->callbacks.moal_spin_unlock); + } + + PRINTM_NETINTF(MCMND, pcmd_node->priv); + PRINTM(MCMND, "QUEUE_CMD: cmd=0x%x is queued\n", command); + +done: + LEAVE(); + return; +} + +/** + * @brief This function executes next command in command + * pending queue. It will put firmware back to PS mode + * if applicable. + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_exec_next_cmd(mlan_adapter *pmadapter) +{ + mlan_private *priv = MNULL; + cmd_ctrl_node *pcmd_node = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + HostCmd_DS_COMMAND *pcmd; + + ENTER(); + + /* Sanity test */ + if (pmadapter == MNULL) { + PRINTM(MERROR, "EXEC_NEXT_CMD: pmadapter is MNULL\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + /* Check if already in processing */ + if (pmadapter->curr_cmd) { + PRINTM(MERROR, + "EXEC_NEXT_CMD: there is command in processing!\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + wlan_request_cmd_lock(pmadapter); + /* Check if any command is pending */ + pcmd_node = + (cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + + if (pcmd_node) { + pcmd = (HostCmd_DS_COMMAND *)(pcmd_node->cmdbuf->pbuf + + pcmd_node->cmdbuf->data_offset); + priv = pcmd_node->priv; + + if (pmadapter->ps_state != PS_STATE_AWAKE) { + PRINTM(MERROR, + "Cannot send command in sleep state, this should not happen\n"); + wlan_release_cmd_lock(pmadapter); + goto done; + } + + util_unlink_list(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + (pmlan_linked_list)pcmd_node, + pmadapter->callbacks.moal_spin_lock, + pmadapter->callbacks.moal_spin_unlock); + wlan_release_cmd_lock(pmadapter); + ret = wlan_dnld_cmd_to_fw(priv, pcmd_node); + priv = wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY); + /* Any command sent to the firmware when host is in sleep mode, + should de-configure host sleep */ + /* We should skip the host sleep configuration command itself + though */ + if (priv && + (pcmd->command != + wlan_cpu_to_le16(HostCmd_CMD_802_11_HS_CFG_ENH))) { + if (pmadapter->hs_activated == MTRUE) { + pmadapter->is_hs_configured = MFALSE; + wlan_host_sleep_activated_event(priv, MFALSE); + } + } + goto done; + } else { + wlan_release_cmd_lock(pmadapter); + } + ret = MLAN_STATUS_SUCCESS; +done: + LEAVE(); + return ret; +} + +/** + * @brief This function handles the command response + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_process_cmdresp(mlan_adapter *pmadapter) +{ + HostCmd_DS_COMMAND *resp = MNULL; + mlan_private *pmpriv = wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY); + mlan_private *pmpriv_next = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 orig_cmdresp_no; + t_u16 cmdresp_no; + t_u16 cmdresp_result; + mlan_ioctl_req *pioctl_buf = MNULL; + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; +#ifdef DEBUG_LEVEL1 + t_u32 sec = 0, usec = 0; +#endif + t_u32 i; + + ENTER(); + + /* Now we got response from FW, cancel the command timer */ + if (pmadapter->cmd_timer_is_set) { + /* Cancel command timeout timer */ + pcb->moal_stop_timer(pmadapter->pmoal_handle, + pmadapter->pmlan_cmd_timer); + /* Cancel command timeout timer */ + pmadapter->cmd_timer_is_set = MFALSE; + } + + if (pmadapter->curr_cmd) + if (pmadapter->curr_cmd->pioctl_buf != MNULL) { + pioctl_buf = + (mlan_ioctl_req *)pmadapter->curr_cmd-> + pioctl_buf; + } + + if (!pmadapter->curr_cmd || !pmadapter->curr_cmd->respbuf) { + resp = (HostCmd_DS_COMMAND *)pmadapter->upld_buf; + resp->command = wlan_le16_to_cpu(resp->command); + PRINTM(MERROR, "CMD_RESP: No curr_cmd, 0x%x\n", resp->command); + if (pioctl_buf) + pioctl_buf->status_code = MLAN_ERROR_CMD_RESP_FAIL; + ret = MLAN_STATUS_FAILURE; + goto done; + } + + pmadapter->num_cmd_timeout = 0; + + DBG_HEXDUMP(MCMD_D, "CMD_RESP", + pmadapter->curr_cmd->respbuf->pbuf + + pmadapter->curr_cmd->respbuf->data_offset, + pmadapter->curr_cmd->respbuf->data_len); + + resp = (HostCmd_DS_COMMAND *)(pmadapter->curr_cmd->respbuf->pbuf + + pmadapter->curr_cmd->respbuf-> + data_offset); + wlan_request_cmd_lock(pmadapter); + if (pmadapter->curr_cmd->cmd_flag & CMD_F_CANCELED) { + cmd_ctrl_node *free_cmd = pmadapter->curr_cmd; + pmadapter->curr_cmd = MNULL; + wlan_release_cmd_lock(pmadapter); + PRINTM(MCMND, "CMD_RESP: 0x%x been canceled!\n", + wlan_le16_to_cpu(resp->command)); + wlan_insert_cmd_to_free_q(pmadapter, free_cmd); + if (pioctl_buf) + pioctl_buf->status_code = MLAN_ERROR_CMD_CANCEL; + ret = MLAN_STATUS_FAILURE; + goto done; + } else { + wlan_release_cmd_lock(pmadapter); + } + if (pmadapter->curr_cmd->cmd_flag & CMD_F_HOSTCMD) { + /* Copy original response back to response buffer */ + wlan_ret_host_cmd(pmpriv, resp, pioctl_buf); + } + orig_cmdresp_no = wlan_le16_to_cpu(resp->command); + resp->size = wlan_le16_to_cpu(resp->size); + resp->seq_num = wlan_le16_to_cpu(resp->seq_num); + resp->result = wlan_le16_to_cpu(resp->result); + + /* Get BSS number and corresponding priv */ + pmpriv = wlan_get_priv_by_id(pmadapter, + HostCmd_GET_BSS_NO(resp->seq_num), + HostCmd_GET_BSS_TYPE(resp->seq_num)); + if (!pmpriv) + pmpriv = wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY); + /* Clear RET_BIT from HostCmd */ + resp->command = (orig_cmdresp_no & HostCmd_CMD_ID_MASK); + cmdresp_no = resp->command; + + cmdresp_result = resp->result; + + /* Save the last command response to debug log */ + pmadapter->dbg.last_cmd_resp_index = + (pmadapter->dbg.last_cmd_resp_index + 1) % DBG_CMD_NUM; + pmadapter->dbg.last_cmd_resp_id[pmadapter->dbg.last_cmd_resp_index] = + orig_cmdresp_no; + + PRINTM_GET_SYS_TIME(MCMND, &sec, &usec); + PRINTM_NETINTF(MCMND, pmadapter->curr_cmd->priv); + PRINTM(MCMND, + "CMD_RESP (%lu.%06lu): 0x%x, result %d, len %d, seqno 0x%x\n", + sec, usec, orig_cmdresp_no, cmdresp_result, resp->size, + resp->seq_num); + + if (!(orig_cmdresp_no & HostCmd_RET_BIT)) { + PRINTM(MERROR, "CMD_RESP: Invalid response to command!\n"); + if (pioctl_buf) + pioctl_buf->status_code = MLAN_ERROR_FW_CMDRESP; + wlan_insert_cmd_to_free_q(pmadapter, pmadapter->curr_cmd); + wlan_request_cmd_lock(pmadapter); + pmadapter->curr_cmd = MNULL; + wlan_release_cmd_lock(pmadapter); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + if (pmadapter->curr_cmd->cmd_flag & CMD_F_HOSTCMD) { + pmadapter->curr_cmd->cmd_flag &= ~CMD_F_HOSTCMD; + if ((cmdresp_result == HostCmd_RESULT_OK) + && (cmdresp_no == HostCmd_CMD_802_11_HS_CFG_ENH)) + ret = wlan_ret_802_11_hs_cfg(pmpriv, resp, pioctl_buf); + } else { + /* handle response */ + ret = pmpriv->ops.process_cmdresp(pmpriv, cmdresp_no, resp, + pioctl_buf); + } + + /* Check init command response */ + if (pmadapter->hw_status == WlanHardwareStatusInitializing) { + if (ret == MLAN_STATUS_FAILURE) { +#if defined(STA_SUPPORT) + if (pmadapter->pwarm_reset_ioctl_req) { + /* warm reset failure */ + pmadapter->pwarm_reset_ioctl_req->status_code = + MLAN_ERROR_CMD_RESP_FAIL; + pcb->moal_ioctl_complete(pmadapter-> + pmoal_handle, + pmadapter-> + pwarm_reset_ioctl_req, + MLAN_STATUS_FAILURE); + pmadapter->pwarm_reset_ioctl_req = MNULL; + goto done; + } +#endif + PRINTM(MERROR, + "cmd 0x%02x failed during initialization\n", + cmdresp_no); + wlan_init_fw_complete(pmadapter); + goto done; + } + } + + wlan_request_cmd_lock(pmadapter); + if (pmadapter->curr_cmd) { + cmd_ctrl_node *free_cmd = pmadapter->curr_cmd; + pioctl_buf = (mlan_ioctl_req *)pmadapter->curr_cmd->pioctl_buf; + pmadapter->curr_cmd = MNULL; + wlan_release_cmd_lock(pmadapter); + + if (pioctl_buf && (ret == MLAN_STATUS_SUCCESS)) + pioctl_buf->status_code = MLAN_ERROR_NO_ERROR; + else if (pioctl_buf && (ret == MLAN_STATUS_FAILURE) && + !pioctl_buf->status_code) + pioctl_buf->status_code = MLAN_ERROR_CMD_RESP_FAIL; + + /* Clean up and put current command back to cmd_free_q */ + wlan_insert_cmd_to_free_q(pmadapter, free_cmd); + } else { + wlan_release_cmd_lock(pmadapter); + } + + if ((pmadapter->hw_status == WlanHardwareStatusInitializing) && + (pmadapter->last_init_cmd == cmdresp_no)) { + i = pmpriv->bss_index + 1; + while (i < pmadapter->priv_num && + (!(pmpriv_next = pmadapter->priv[i]) + || pmpriv_next->bss_virtual)) + i++; + if (!pmpriv_next || i >= pmadapter->priv_num) { +#if defined(STA_SUPPORT) + if (pmadapter->pwarm_reset_ioctl_req) { + /* warm reset complete */ + pmadapter->hw_status = WlanHardwareStatusReady; + pcb->moal_ioctl_complete(pmadapter-> + pmoal_handle, + pmadapter-> + pwarm_reset_ioctl_req, + MLAN_STATUS_SUCCESS); + pmadapter->pwarm_reset_ioctl_req = MNULL; + goto done; + } +#endif + pmadapter->hw_status = WlanHardwareStatusInitdone; + } else { + /* Issue init commands for the next interface */ + ret = pmpriv_next->ops.init_cmd(pmpriv_next, MFALSE); + } + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief This function handles the timeout of command sending. + * It will re-send the same command again. + * + * @param function_context A pointer to function_context + * @return N/A + */ +t_void +wlan_cmd_timeout_func(t_void *function_context) +{ + mlan_adapter *pmadapter = (mlan_adapter *)function_context; + cmd_ctrl_node *pcmd_node = MNULL; + mlan_ioctl_req *pioctl_buf = MNULL; +#ifdef DEBUG_LEVEL1 + t_u32 sec = 0, usec = 0; +#endif + t_u8 i; + mlan_private *pmpriv = MNULL; + + ENTER(); + + pmadapter->cmd_timer_is_set = MFALSE; + pmadapter->num_cmd_timeout++; + pmadapter->dbg.num_cmd_timeout++; + if (!pmadapter->curr_cmd) { + PRINTM(MWARN, "CurCmd Empty\n"); + goto exit; + } + pcmd_node = pmadapter->curr_cmd; + if (pcmd_node->pioctl_buf != MNULL) { + pioctl_buf = (mlan_ioctl_req *)pcmd_node->pioctl_buf; + pioctl_buf->status_code = MLAN_ERROR_CMD_TIMEOUT; + } + + pmadapter->dbg.timeout_cmd_id = + pmadapter->dbg.last_cmd_id[pmadapter->dbg.last_cmd_index]; + pmadapter->dbg.timeout_cmd_act = + pmadapter->dbg.last_cmd_act[pmadapter->dbg.last_cmd_index]; + PRINTM_GET_SYS_TIME(MERROR, &sec, &usec); + PRINTM(MERROR, "Timeout cmd id (%lu.%06lu) = 0x%x, act = 0x%x\n", sec, + usec, pmadapter->dbg.timeout_cmd_id, + pmadapter->dbg.timeout_cmd_act); + if (pcmd_node->cmdbuf) { + t_u8 *pcmd_buf; + pcmd_buf = + pcmd_node->cmdbuf->pbuf + + pcmd_node->cmdbuf->data_offset + INTF_HEADER_LEN; + for (i = 0; i < 16; i++) + PRINTM(MERROR, "%02x ", *pcmd_buf++); + PRINTM(MERROR, "\n"); + } + + pmpriv = pcmd_node->priv; + if (pmpriv) + PRINTM(MERROR, "BSS type = %d BSS role= %d\n", pmpriv->bss_type, + pmpriv->bss_role); + wlan_dump_info(pmadapter, REASON_CODE_CMD_TIMEOUT); + + if (pmadapter->hw_status == WlanHardwareStatusInitializing) + wlan_init_fw_complete(pmadapter); + else { + /* Signal MOAL to perform extra handling for debugging */ + if (pmpriv) { + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_DBG_DUMP, + MNULL); + } else { + wlan_recv_event(wlan_get_priv + (pmadapter, MLAN_BSS_ROLE_ANY), + MLAN_EVENT_ID_DRV_DBG_DUMP, MNULL); + } + } + +exit: + LEAVE(); + return; +} + +#ifdef STA_SUPPORT +/** + * @brief Internal function used to flush the scan pending queue + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return N/A + */ +t_void +wlan_flush_scan_queue(IN pmlan_adapter pmadapter) +{ + mlan_callbacks *pcb = (pmlan_callbacks)&pmadapter->callbacks; + cmd_ctrl_node *pcmd_node = MNULL; + + ENTER(); + + while ((pcmd_node = + (cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle, + &pmadapter->scan_pending_q, + pcb->moal_spin_lock, + pcb->moal_spin_unlock))) { + util_unlink_list(pmadapter->pmoal_handle, + &pmadapter->scan_pending_q, + (pmlan_linked_list)pcmd_node, + pcb->moal_spin_lock, pcb->moal_spin_unlock); + pcmd_node->pioctl_buf = MNULL; + wlan_insert_cmd_to_free_q(pmadapter, pcmd_node); + } + wlan_request_cmd_lock(pmadapter); + pmadapter->scan_processing = MFALSE; + wlan_release_cmd_lock(pmadapter); + + LEAVE(); +} + +/** + * @brief Cancel pending SCAN ioctl cmd. + * + * @param pmadapter A pointer to mlan_adapter + * + * @return N/A + */ +t_void +wlan_cancel_pending_scan_cmd(pmlan_adapter pmadapter) +{ + pmlan_callbacks pcb = &pmadapter->callbacks; + cmd_ctrl_node *pcmd_node = MNULL; + mlan_ioctl_req *pioctl_buf = MNULL; + ENTER(); + + PRINTM(MIOCTL, "Cancel scan command\n"); + wlan_request_cmd_lock(pmadapter); + /* IOCTL will be completed, avoid calling IOCTL complete again from + EVENT/CMDRESP */ + if (pmadapter->pscan_ioctl_req) { + pioctl_buf = pmadapter->pscan_ioctl_req; + pmadapter->pscan_ioctl_req = MNULL; + pioctl_buf->status_code = MLAN_ERROR_CMD_CANCEL; + pcb->moal_ioctl_complete(pmadapter->pmoal_handle, pioctl_buf, + MLAN_STATUS_FAILURE); + } + + if (pmadapter->curr_cmd && pmadapter->curr_cmd->pioctl_buf) { + pioctl_buf = (mlan_ioctl_req *)pmadapter->curr_cmd->pioctl_buf; + if (pioctl_buf->req_id == MLAN_IOCTL_SCAN) { + PRINTM(MIOCTL, "wlan_cancel_scan: current command\n"); + pcmd_node = pmadapter->curr_cmd; + pcmd_node->pioctl_buf = MNULL; + pcmd_node->cmd_flag |= CMD_F_CANCELED; + pioctl_buf->status_code = MLAN_ERROR_CMD_CANCEL; + pcb->moal_ioctl_complete(pmadapter->pmoal_handle, + pioctl_buf, + MLAN_STATUS_FAILURE); + } + } + while ((pcmd_node = wlan_get_pending_scan_cmd(pmadapter)) != MNULL) { + PRINTM(MIOCTL, + "wlan_cancel_scan: find scan command in cmd_pending_q\n"); + util_unlink_list(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + (pmlan_linked_list)pcmd_node, + pmadapter->callbacks.moal_spin_lock, + pmadapter->callbacks.moal_spin_unlock); + wlan_release_cmd_lock(pmadapter); + wlan_insert_cmd_to_free_q(pmadapter, pcmd_node); + wlan_request_cmd_lock(pmadapter); + } + wlan_release_cmd_lock(pmadapter); + /* Cancel all pending scan command */ + wlan_flush_scan_queue(pmadapter); + LEAVE(); + return; +} +#endif + +/** + * @brief Cancel all pending cmd. + * + * @param pmadapter A pointer to mlan_adapter + * + * @return N/A + */ +t_void +wlan_cancel_all_pending_cmd(pmlan_adapter pmadapter) +{ + cmd_ctrl_node *pcmd_node = MNULL; + pmlan_callbacks pcb = &pmadapter->callbacks; + mlan_ioctl_req *pioctl_buf = MNULL; + + ENTER(); + /* Cancel current cmd */ + wlan_request_cmd_lock(pmadapter); +#ifdef STA_SUPPORT + /* IOCTL will be completed, avoid calling IOCTL complete again from + EVENT/CMDRESP */ + if (pmadapter->pscan_ioctl_req) { + pioctl_buf = pmadapter->pscan_ioctl_req; + pmadapter->pscan_ioctl_req = MNULL; + pioctl_buf->status_code = MLAN_ERROR_CMD_CANCEL; + pcb->moal_ioctl_complete(pmadapter->pmoal_handle, pioctl_buf, + MLAN_STATUS_FAILURE); + } +#endif + if (pmadapter->curr_cmd) { + pcmd_node = pmadapter->curr_cmd; + pmadapter->curr_cmd = MNULL; + wlan_release_cmd_lock(pmadapter); + if (pcmd_node->pioctl_buf) { + pioctl_buf = (mlan_ioctl_req *)pcmd_node->pioctl_buf; + pioctl_buf->status_code = MLAN_ERROR_CMD_CANCEL; + pcb->moal_ioctl_complete(pmadapter->pmoal_handle, + pioctl_buf, + MLAN_STATUS_FAILURE); + pcmd_node->pioctl_buf = MNULL; + } + wlan_insert_cmd_to_free_q(pmadapter, pcmd_node); + } else { + wlan_release_cmd_lock(pmadapter); + } + /* Cancel all pending command */ + while ((pcmd_node = + (cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + pcb->moal_spin_lock, + pcb->moal_spin_unlock))) { + util_unlink_list(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + (pmlan_linked_list)pcmd_node, + pcb->moal_spin_lock, pcb->moal_spin_unlock); + if (pcmd_node->pioctl_buf) { + pioctl_buf = (mlan_ioctl_req *)pcmd_node->pioctl_buf; + pioctl_buf->status_code = MLAN_ERROR_CMD_CANCEL; + pcb->moal_ioctl_complete(pmadapter->pmoal_handle, + pioctl_buf, + MLAN_STATUS_FAILURE); + pcmd_node->pioctl_buf = MNULL; + } + wlan_insert_cmd_to_free_q(pmadapter, pcmd_node); + } +#ifdef STA_SUPPORT + /* Cancel all pending scan command */ + wlan_flush_scan_queue(pmadapter); +#endif + LEAVE(); +} + +/** + * @brief Cancel specific bss's pending ioctl cmd. + * + * @param pmadapter A pointer to mlan_adapter + * @param bss_index BSS index + * + * @return N/A + */ +t_void +wlan_cancel_bss_pending_cmd(pmlan_adapter pmadapter, t_u32 bss_index) +{ + pmlan_callbacks pcb = &pmadapter->callbacks; + cmd_ctrl_node *pcmd_node = MNULL; + mlan_ioctl_req *pioctl_buf = MNULL; +#ifdef STA_SUPPORT + t_u8 flash_scan = MFALSE; +#endif + ENTER(); + + PRINTM(MIOCTL, "MOAL Cancel BSS IOCTL: bss_index=%d\n", (int)bss_index); + wlan_request_cmd_lock(pmadapter); +#ifdef STA_SUPPORT + if (pmadapter->pscan_ioctl_req && + (pmadapter->pscan_ioctl_req->bss_index == bss_index)) { + /* IOCTL will be completed, avoid calling IOCTL complete again + from EVENT/CMDRESP */ + flash_scan = MTRUE; + pioctl_buf = pmadapter->pscan_ioctl_req; + pmadapter->pscan_ioctl_req = MNULL; + pioctl_buf->status_code = MLAN_ERROR_CMD_CANCEL; + pcb->moal_ioctl_complete(pmadapter->pmoal_handle, pioctl_buf, + MLAN_STATUS_FAILURE); + } +#endif + if (pmadapter->curr_cmd && pmadapter->curr_cmd->pioctl_buf) { + pioctl_buf = (mlan_ioctl_req *)pmadapter->curr_cmd->pioctl_buf; + if (pioctl_buf->bss_index == bss_index) { + pcmd_node = pmadapter->curr_cmd; + pcmd_node->pioctl_buf = MNULL; + pcmd_node->cmd_flag |= CMD_F_CANCELED; +#ifdef STA_SUPPORT + if (pioctl_buf->req_id == MLAN_IOCTL_SCAN) + flash_scan = MTRUE; +#endif + pioctl_buf->status_code = MLAN_ERROR_CMD_CANCEL; + pcb->moal_ioctl_complete(pmadapter->pmoal_handle, + pioctl_buf, + MLAN_STATUS_FAILURE); + } + } + while ((pcmd_node = + wlan_get_bss_pending_ioctl_cmd(pmadapter, + bss_index)) != MNULL) { + util_unlink_list(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + (pmlan_linked_list)pcmd_node, + pmadapter->callbacks.moal_spin_lock, + pmadapter->callbacks.moal_spin_unlock); + pioctl_buf = (mlan_ioctl_req *)pcmd_node->pioctl_buf; + pcmd_node->pioctl_buf = MNULL; +#ifdef STA_SUPPORT + if (pioctl_buf->req_id == MLAN_IOCTL_SCAN) + flash_scan = MTRUE; +#endif + pioctl_buf->status_code = MLAN_ERROR_CMD_CANCEL; + pcb->moal_ioctl_complete(pmadapter->pmoal_handle, pioctl_buf, + MLAN_STATUS_FAILURE); + wlan_release_cmd_lock(pmadapter); + wlan_insert_cmd_to_free_q(pmadapter, pcmd_node); + wlan_request_cmd_lock(pmadapter); + } + wlan_release_cmd_lock(pmadapter); +#ifdef STA_SUPPORT + if (flash_scan) { + /* Cancel all pending scan command */ + wlan_flush_scan_queue(pmadapter); + } +#endif + LEAVE(); + return; +} + +/** + * @brief Cancel pending ioctl cmd. + * + * @param pmadapter A pointer to mlan_adapter + * @param pioctl_req A pointer to mlan_ioctl_req buf + * + * @return N/A + */ +t_void +wlan_cancel_pending_ioctl(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req) +{ + pmlan_callbacks pcb = &pmadapter->callbacks; + cmd_ctrl_node *pcmd_node = MNULL; + t_u8 find = MFALSE; + + ENTER(); + + PRINTM(MIOCTL, "MOAL Cancel IOCTL: 0x%x sub_id=0x%x action=%d\n", + pioctl_req->req_id, *((t_u32 *)pioctl_req->pbuf), + (int)pioctl_req->action); + + wlan_request_cmd_lock(pmadapter); +#ifdef STA_SUPPORT + /* IOCTL will be completed, avoid calling IOCTL complete again from + EVENT/CMDRESP */ + if (pmadapter->pscan_ioctl_req == pioctl_req) { + pmadapter->pscan_ioctl_req = MNULL; + find = MTRUE; + } +#endif + if ((pmadapter->curr_cmd) && + (pmadapter->curr_cmd->pioctl_buf == pioctl_req)) { + pcmd_node = pmadapter->curr_cmd; + pcmd_node->pioctl_buf = MNULL; + pcmd_node->cmd_flag |= CMD_F_CANCELED; + find = MTRUE; + } + + while ((pcmd_node = + wlan_get_pending_ioctl_cmd(pmadapter, pioctl_req)) != MNULL) { + util_unlink_list(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + (pmlan_linked_list)pcmd_node, + pmadapter->callbacks.moal_spin_lock, + pmadapter->callbacks.moal_spin_unlock); + pcmd_node->pioctl_buf = MNULL; + find = MTRUE; + wlan_release_cmd_lock(pmadapter); + wlan_insert_cmd_to_free_q(pmadapter, pcmd_node); + wlan_request_cmd_lock(pmadapter); + } + wlan_release_cmd_lock(pmadapter); +#ifdef STA_SUPPORT + if (pioctl_req->req_id == MLAN_IOCTL_SCAN) { + /* Cancel all pending scan command */ + wlan_flush_scan_queue(pmadapter); + } +#endif + if (find) { + pioctl_req->status_code = MLAN_ERROR_CMD_CANCEL; + pcb->moal_ioctl_complete(pmadapter->pmoal_handle, pioctl_req, + MLAN_STATUS_FAILURE); + } + + LEAVE(); + return; +} + +/** + * @brief Handle the version_ext resp + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_ver_ext(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_VERSION_EXT *ver_ext = &resp->params.verext; + mlan_ds_get_info *info; + ENTER(); + if (pioctl_buf) { + info = (mlan_ds_get_info *)pioctl_buf->pbuf; + info->param.ver_ext.version_str_sel = ver_ext->version_str_sel; + memcpy(pmpriv->adapter, info->param.ver_ext.version_str, + ver_ext->version_str, sizeof(char) * 128); + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Handle the rx mgmt forward registration resp + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_rx_mgmt_ind(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_misc_cfg *misc = MNULL; + ENTER(); + + if (pioctl_buf) { + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + misc->param.mgmt_subtype_mask = + wlan_le32_to_cpu(resp->params.rx_mgmt_ind. + mgmt_subtype_mask); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function checks conditions and prepares to + * send sleep confirm command to firmware if OK. + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return N/A + */ +t_void +wlan_check_ps_cond(mlan_adapter *pmadapter) +{ + ENTER(); + + if (!pmadapter->cmd_sent && + !pmadapter->curr_cmd && !IS_CARD_RX_RCVD(pmadapter)) { + wlan_dnld_sleep_confirm_cmd(pmadapter); + } else { + PRINTM(MCMND, "Delay Sleep Confirm (%s%s%s)\n", + (pmadapter->cmd_sent) ? "D" : "", + (pmadapter->curr_cmd) ? "C" : "", + (IS_CARD_RX_RCVD(pmadapter)) ? "R" : ""); + } + + LEAVE(); +} + +/** + * @brief This function sends the HS_ACTIVATED event to the application + * + * @param priv A pointer to mlan_private structure + * @param activated MTRUE if activated, MFALSE if de-activated + * + * @return N/A + */ +t_void +wlan_host_sleep_activated_event(pmlan_private priv, t_u8 activated) +{ + ENTER(); + + if (activated) { + if (priv->adapter->is_hs_configured) { + priv->adapter->hs_activated = MTRUE; + wlan_update_rxreorder_tbl(priv->adapter, MTRUE); + PRINTM(MEVENT, "hs_activated\n"); + wlan_recv_event(priv, MLAN_EVENT_ID_DRV_HS_ACTIVATED, + MNULL); + } else + PRINTM(MWARN, "hs_activated: HS not configured !!!\n"); + } else { + PRINTM(MEVENT, "hs_deactived\n"); + priv->adapter->hs_activated = MFALSE; + wlan_recv_event(priv, MLAN_EVENT_ID_DRV_HS_DEACTIVATED, MNULL); + } + + LEAVE(); +} + +/** + * @brief This function sends the HS_WAKEUP event to the application + * + * @param priv A pointer to mlan_private structure + * + * @return N/A + */ +t_void +wlan_host_sleep_wakeup_event(pmlan_private priv) +{ + ENTER(); + + if (priv->adapter->is_hs_configured) + wlan_recv_event(priv, MLAN_EVENT_ID_FW_HS_WAKEUP, MNULL); + else + PRINTM(MWARN, "hs_wakeup: Host Sleep not configured !!!\n"); + + LEAVE(); +} + +/** + * @brief This function handles the command response of hs_cfg + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_802_11_hs_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + pmlan_adapter pmadapter = pmpriv->adapter; + HostCmd_DS_802_11_HS_CFG_ENH *phs_cfg = &resp->params.opt_hs_cfg; + + ENTER(); + + if (wlan_le16_to_cpu(phs_cfg->action) == HS_ACTIVATE) { + /* clean up curr_cmd to allow suspend */ + if (pioctl_buf) + pioctl_buf->status_code = MLAN_ERROR_NO_ERROR; + /* Clean up and put current command back to cmd_free_q */ + wlan_insert_cmd_to_free_q(pmadapter, pmadapter->curr_cmd); + wlan_request_cmd_lock(pmadapter); + pmadapter->curr_cmd = MNULL; + wlan_release_cmd_lock(pmadapter); + wlan_host_sleep_activated_event(pmpriv, MTRUE); + goto done; + } else { + phs_cfg->params.hs_config.conditions = + wlan_le32_to_cpu(phs_cfg->params.hs_config.conditions); + PRINTM(MCMND, + "CMD_RESP: HS_CFG cmd reply result=%#x," + " conditions=0x%x gpio=0x%x gap=0x%x\n", resp->result, + phs_cfg->params.hs_config.conditions, + phs_cfg->params.hs_config.gpio, + phs_cfg->params.hs_config.gap); + } + if (phs_cfg->params.hs_config.conditions != HOST_SLEEP_CFG_CANCEL) { + pmadapter->is_hs_configured = MTRUE; + } else { + pmadapter->is_hs_configured = MFALSE; + if (pmadapter->hs_activated) + wlan_host_sleep_activated_event(pmpriv, MFALSE); + } + +done: + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Perform hs related activities on receiving the power up interrupt + * + * @param pmadapter A pointer to the adapter structure + * @return N/A + */ +t_void +wlan_process_hs_config(pmlan_adapter pmadapter) +{ + ENTER(); + PRINTM(MINFO, "Recevie interrupt/data in HS mode\n"); + if (pmadapter->hs_cfg.gap == HOST_SLEEP_CFG_GAP_FF) + wlan_pm_wakeup_card(pmadapter); + LEAVE(); + return; +} + +/** + * @brief Check sleep confirm command response and set the state to ASLEEP + * + * @param pmadapter A pointer to the adapter structure + * @param pbuf A pointer to the command response buffer + * @param upld_len Command response buffer length + * @return N/A + */ +void +wlan_process_sleep_confirm_resp(pmlan_adapter pmadapter, t_u8 *pbuf, + t_u32 upld_len) +{ + HostCmd_DS_COMMAND *cmd; + + ENTER(); + + if (!upld_len) { + PRINTM(MERROR, "Command size is 0\n"); + LEAVE(); + return; + } + cmd = (HostCmd_DS_COMMAND *)pbuf; + cmd->result = wlan_le16_to_cpu(cmd->result); + cmd->command = wlan_le16_to_cpu(cmd->command); + cmd->seq_num = wlan_le16_to_cpu(cmd->seq_num); + + /* Update sequence number */ + cmd->seq_num = HostCmd_GET_SEQ_NO(cmd->seq_num); + /* Clear RET_BIT from HostCmd */ + cmd->command &= HostCmd_CMD_ID_MASK; + + if (cmd->command != HostCmd_CMD_802_11_PS_MODE_ENH) { + PRINTM(MERROR, + "Received unexpected response for command %x, result = %x\n", + cmd->command, cmd->result); + LEAVE(); + return; + } + PRINTM(MEVENT, "#\n"); + if (cmd->result != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "Sleep confirm command failed\n"); + pmadapter->pm_wakeup_card_req = MFALSE; + pmadapter->ps_state = PS_STATE_AWAKE; + LEAVE(); + return; + } + pmadapter->pm_wakeup_card_req = MTRUE; + + if (pmadapter->is_hs_configured) { + wlan_host_sleep_activated_event(wlan_get_priv + (pmadapter, MLAN_BSS_ROLE_ANY), + MTRUE); + } + pmadapter->ps_state = PS_STATE_SLEEP; + LEAVE(); +} + +/** + * @brief This function prepares command of power mode + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action the action: GET or SET + * @param ps_bitmap PS bitmap + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_enh_power_mode(pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, + IN t_u16 ps_bitmap, IN t_void *pdata_buf) +{ + HostCmd_DS_802_11_PS_MODE_ENH *psmode_enh = &cmd->params.psmode_enh; + t_u8 *tlv = MNULL; + t_u16 cmd_size = 0; + + ENTER(); + + PRINTM(MCMND, "PS Command: action = 0x%x, bitmap = 0x%x\n", cmd_action, + ps_bitmap); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_PS_MODE_ENH); + if (cmd_action == DIS_AUTO_PS) { + psmode_enh->action = wlan_cpu_to_le16(DIS_AUTO_PS); + psmode_enh->params.ps_bitmap = wlan_cpu_to_le16(ps_bitmap); + cmd->size = wlan_cpu_to_le16(S_DS_GEN + AUTO_PS_FIX_SIZE); + } else if (cmd_action == GET_PS) { + psmode_enh->action = wlan_cpu_to_le16(GET_PS); + psmode_enh->params.ps_bitmap = wlan_cpu_to_le16(ps_bitmap); + cmd->size = wlan_cpu_to_le16(S_DS_GEN + AUTO_PS_FIX_SIZE); + } else if (cmd_action == EN_AUTO_PS) { + psmode_enh->action = wlan_cpu_to_le16(EN_AUTO_PS); + psmode_enh->params.auto_ps.ps_bitmap = + wlan_cpu_to_le16(ps_bitmap); + cmd_size = S_DS_GEN + AUTO_PS_FIX_SIZE; + tlv = (t_u8 *)cmd + cmd_size; + if (ps_bitmap & BITMAP_STA_PS) { + pmlan_adapter pmadapter = pmpriv->adapter; + MrvlIEtypes_ps_param_t *ps_tlv = + (MrvlIEtypes_ps_param_t *)tlv; + ps_param *ps_mode = &ps_tlv->param; + ps_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_PS_PARAM); + ps_tlv->header.len = + wlan_cpu_to_le16(sizeof(MrvlIEtypes_ps_param_t) + - sizeof(MrvlIEtypesHeader_t)); + cmd_size += sizeof(MrvlIEtypes_ps_param_t); + tlv += sizeof(MrvlIEtypes_ps_param_t); + ps_mode->null_pkt_interval = + wlan_cpu_to_le16(pmadapter->null_pkt_interval); + ps_mode->multiple_dtims = + wlan_cpu_to_le16(pmadapter->multiple_dtim); + ps_mode->bcn_miss_timeout = + wlan_cpu_to_le16(pmadapter->bcn_miss_time_out); + ps_mode->local_listen_interval = + wlan_cpu_to_le16(pmadapter-> + local_listen_interval); + ps_mode->adhoc_wake_period = + wlan_cpu_to_le16(pmadapter->adhoc_awake_period); + ps_mode->delay_to_ps = + wlan_cpu_to_le16(pmadapter->delay_to_ps); + ps_mode->mode = + wlan_cpu_to_le16(pmadapter->enhanced_ps_mode); + } + if (ps_bitmap & BITMAP_AUTO_DS) { + MrvlIEtypes_auto_ds_param_t *auto_ps_tlv = + (MrvlIEtypes_auto_ds_param_t *)tlv; + auto_ds_param *auto_ds = &auto_ps_tlv->param; + t_u16 idletime = 0; + auto_ps_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_AUTO_DS_PARAM); + auto_ps_tlv->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_auto_ds_param_t) - + sizeof(MrvlIEtypesHeader_t)); + cmd_size += sizeof(MrvlIEtypes_auto_ds_param_t); + tlv += sizeof(MrvlIEtypes_auto_ds_param_t); + if (pdata_buf) + idletime = + ((mlan_ds_auto_ds *)pdata_buf)-> + idletime; + auto_ds->deep_sleep_timeout = + wlan_cpu_to_le16(idletime); + } +#if defined(UAP_SUPPORT) + if (pdata_buf && + (ps_bitmap & (BITMAP_UAP_INACT_PS | BITMAP_UAP_DTIM_PS))) { + mlan_ds_ps_mgmt *ps_mgmt = (mlan_ds_ps_mgmt *)pdata_buf; + MrvlIEtypes_sleep_param_t *sleep_tlv = MNULL; + MrvlIEtypes_inact_sleep_param_t *inact_tlv = MNULL; + if (ps_mgmt->flags & PS_FLAG_SLEEP_PARAM) { + sleep_tlv = (MrvlIEtypes_sleep_param_t *)tlv; + sleep_tlv->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_AP_SLEEP_PARAM); + sleep_tlv->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_sleep_param_t) + - + sizeof + (MrvlIEtypesHeader_t)); + sleep_tlv->ctrl_bitmap = + wlan_cpu_to_le32(ps_mgmt->sleep_param. + ctrl_bitmap); + sleep_tlv->min_sleep = + wlan_cpu_to_le32(ps_mgmt->sleep_param. + min_sleep); + sleep_tlv->max_sleep = + wlan_cpu_to_le32(ps_mgmt->sleep_param. + max_sleep); + cmd_size += sizeof(MrvlIEtypes_sleep_param_t); + tlv += sizeof(MrvlIEtypes_sleep_param_t); + } + if (ps_mgmt->flags & PS_FLAG_INACT_SLEEP_PARAM) { + inact_tlv = + (MrvlIEtypes_inact_sleep_param_t *)tlv; + inact_tlv->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_AP_INACT_SLEEP_PARAM); + inact_tlv->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_inact_sleep_param_t) + - + sizeof + (MrvlIEtypesHeader_t)); + inact_tlv->inactivity_to = + wlan_cpu_to_le32(ps_mgmt->inact_param. + inactivity_to); + inact_tlv->min_awake = + wlan_cpu_to_le32(ps_mgmt->inact_param. + min_awake); + inact_tlv->max_awake = + wlan_cpu_to_le32(ps_mgmt->inact_param. + max_awake); + cmd_size += + sizeof(MrvlIEtypes_inact_sleep_param_t); + tlv += sizeof(MrvlIEtypes_inact_sleep_param_t); + } + } +#endif + cmd->size = wlan_cpu_to_le16(cmd_size); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of ps_mode_enh + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_enh_power_mode(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + pmlan_adapter pmadapter = pmpriv->adapter; + MrvlIEtypesHeader_t *mrvl_tlv = MNULL; + MrvlIEtypes_auto_ds_param_t *auto_ds_tlv = MNULL; + HostCmd_DS_802_11_PS_MODE_ENH *ps_mode = &resp->params.psmode_enh; + + ENTER(); + + ps_mode->action = wlan_le16_to_cpu(ps_mode->action); + PRINTM(MINFO, "CMD_RESP: PS_MODE cmd reply result=%#x action=0x%X\n", + resp->result, ps_mode->action); + if (ps_mode->action == EN_AUTO_PS) { + ps_mode->params.auto_ps.ps_bitmap = + wlan_le16_to_cpu(ps_mode->params.auto_ps.ps_bitmap); + if (ps_mode->params.auto_ps.ps_bitmap & BITMAP_AUTO_DS) { + PRINTM(MCMND, "Enabled auto deep sleep\n"); + pmpriv->adapter->is_deep_sleep = MTRUE; + mrvl_tlv = + (MrvlIEtypesHeader_t *)((t_u8 *)ps_mode + + AUTO_PS_FIX_SIZE); + while (wlan_le16_to_cpu(mrvl_tlv->type) != + TLV_TYPE_AUTO_DS_PARAM) { + mrvl_tlv = + (MrvlIEtypesHeader_t *)((t_u8 *)mrvl_tlv + + + wlan_le16_to_cpu + (mrvl_tlv->len) + + + sizeof + (MrvlIEtypesHeader_t)); + } + auto_ds_tlv = (MrvlIEtypes_auto_ds_param_t *)mrvl_tlv; + pmpriv->adapter->idle_time = + wlan_le16_to_cpu(auto_ds_tlv->param. + deep_sleep_timeout); + } + if (ps_mode->params.auto_ps.ps_bitmap & BITMAP_STA_PS) { + PRINTM(MCMND, "Enabled STA power save\n"); + if (pmadapter->sleep_period.period) { + PRINTM(MCMND, + "Setting uapsd/pps mode to TRUE\n"); + } + } +#if defined(UAP_SUPPORT) + if (ps_mode->params.auto_ps. + ps_bitmap & (BITMAP_UAP_INACT_PS | BITMAP_UAP_DTIM_PS)) { + pmadapter->ps_mode = Wlan802_11PowerModePSP; + PRINTM(MCMND, "Enabled uAP power save\n"); + } +#endif + } else if (ps_mode->action == DIS_AUTO_PS) { + ps_mode->params.ps_bitmap = + wlan_cpu_to_le16(ps_mode->params.ps_bitmap); + if (ps_mode->params.ps_bitmap & BITMAP_AUTO_DS) { + pmpriv->adapter->is_deep_sleep = MFALSE; + PRINTM(MCMND, "Disabled auto deep sleep\n"); + } + if (ps_mode->params.ps_bitmap & BITMAP_STA_PS) { + PRINTM(MCMND, "Disabled STA power save\n"); + if (pmadapter->sleep_period.period) { + pmadapter->delay_null_pkt = MFALSE; + pmadapter->tx_lock_flag = MFALSE; + pmadapter->pps_uapsd_mode = MFALSE; + } + } +#if defined(UAP_SUPPORT) + if (ps_mode->params. + ps_bitmap & (BITMAP_UAP_INACT_PS | BITMAP_UAP_DTIM_PS)) { + pmadapter->ps_mode = Wlan802_11PowerModeCAM; + PRINTM(MCMND, "Disabled uAP power save\n"); + } +#endif + } else if (ps_mode->action == GET_PS) { + ps_mode->params.ps_bitmap = + wlan_le16_to_cpu(ps_mode->params.ps_bitmap); + if (ps_mode->params.auto_ps. + ps_bitmap & (BITMAP_STA_PS | BITMAP_UAP_INACT_PS | + BITMAP_UAP_DTIM_PS)) + pmadapter->ps_mode = Wlan802_11PowerModePSP; + else + pmadapter->ps_mode = Wlan802_11PowerModeCAM; + PRINTM(MCMND, "ps_bitmap=0x%x\n", ps_mode->params.ps_bitmap); + if (pioctl_buf) { + mlan_ds_pm_cfg *pm_cfg = + (mlan_ds_pm_cfg *)pioctl_buf->pbuf; + if (pm_cfg->sub_command == MLAN_OID_PM_CFG_IEEE_PS) { + if (ps_mode->params.auto_ps. + ps_bitmap & BITMAP_STA_PS) + pm_cfg->param.ps_mode = 1; + else + pm_cfg->param.ps_mode = 0; + } +#if defined(UAP_SUPPORT) + if (pm_cfg->sub_command == MLAN_OID_PM_CFG_PS_MODE) { + MrvlIEtypes_sleep_param_t *sleep_tlv = MNULL; + MrvlIEtypes_inact_sleep_param_t *inact_tlv = + MNULL; + MrvlIEtypesHeader_t *tlv = MNULL; + t_u16 tlv_type = 0; + t_u16 tlv_len = 0; + t_u16 tlv_buf_left = 0; + pm_cfg->param.ps_mgmt.flags = PS_FLAG_PS_MODE; + if (ps_mode->params. + ps_bitmap & BITMAP_UAP_INACT_PS) + pm_cfg->param.ps_mgmt.ps_mode = + PS_MODE_INACTIVITY; + else if (ps_mode->params. + ps_bitmap & BITMAP_UAP_DTIM_PS) + pm_cfg->param.ps_mgmt.ps_mode = + PS_MODE_PERIODIC_DTIM; + else + pm_cfg->param.ps_mgmt.ps_mode = + PS_MODE_DISABLE; + tlv_buf_left = + resp->size - (S_DS_GEN + + AUTO_PS_FIX_SIZE); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)ps_mode + + AUTO_PS_FIX_SIZE); + while (tlv_buf_left >= + sizeof(MrvlIEtypesHeader_t)) { + tlv_type = wlan_le16_to_cpu(tlv->type); + tlv_len = wlan_le16_to_cpu(tlv->len); + switch (tlv_type) { + case TLV_TYPE_AP_SLEEP_PARAM: + sleep_tlv = + (MrvlIEtypes_sleep_param_t + *)tlv; + pm_cfg->param.ps_mgmt.flags |= + PS_FLAG_SLEEP_PARAM; + pm_cfg->param.ps_mgmt. + sleep_param. + ctrl_bitmap = + wlan_le32_to_cpu + (sleep_tlv-> + ctrl_bitmap); + pm_cfg->param.ps_mgmt. + sleep_param.min_sleep = + wlan_le32_to_cpu + (sleep_tlv->min_sleep); + pm_cfg->param.ps_mgmt. + sleep_param.max_sleep = + wlan_le32_to_cpu + (sleep_tlv->max_sleep); + break; + case TLV_TYPE_AP_INACT_SLEEP_PARAM: + inact_tlv = + (MrvlIEtypes_inact_sleep_param_t + *)tlv; + pm_cfg->param.ps_mgmt.flags |= + PS_FLAG_INACT_SLEEP_PARAM; + pm_cfg->param.ps_mgmt. + inact_param. + inactivity_to = + wlan_le32_to_cpu + (inact_tlv-> + inactivity_to); + pm_cfg->param.ps_mgmt. + inact_param.min_awake = + wlan_le32_to_cpu + (inact_tlv->min_awake); + pm_cfg->param.ps_mgmt. + inact_param.max_awake = + wlan_le32_to_cpu + (inact_tlv->max_awake); + break; + } + tlv_buf_left -= + tlv_len + + sizeof(MrvlIEtypesHeader_t); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *) + tlv + + tlv_len + + sizeof + (MrvlIEtypesHeader_t)); + } + } +#endif + } + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of tx rate query + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_802_11_tx_rate_query(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + mlan_ds_rate *rate = MNULL; + ENTER(); + + pmpriv->tx_rate = resp->params.tx_rate.tx_rate; + pmpriv->tx_rate_info = resp->params.tx_rate.tx_rate_info; + if (!pmpriv->adapter->psdio_device->v15_fw_api) + pmpriv->tx_rate_info = + wlan_convert_v14_rate_ht_info(pmpriv->tx_rate_info); + + if (!pmpriv->is_data_rate_auto) { + pmpriv->data_rate = wlan_index_to_data_rate(pmadapter, + pmpriv->tx_rate, + pmpriv-> + tx_rate_info); + } + + if (pioctl_buf) { + rate = (mlan_ds_rate *)pioctl_buf->pbuf; + if (rate->sub_command == MLAN_OID_RATE_CFG) { + if (rate->param.rate_cfg.rate_type == MLAN_RATE_INDEX) { + if ((pmpriv->tx_rate_info & 0x3) == + MLAN_RATE_FORMAT_VHT) + /* VHT rate */ + rate->param.rate_cfg.rate = + (pmpriv->tx_rate) & 0xF; + else if ((pmpriv->tx_rate_info & 0x3) == + MLAN_RATE_FORMAT_HT) + /* HT rate */ + rate->param.rate_cfg.rate = + pmpriv->tx_rate + + MLAN_RATE_INDEX_MCS0; + else + /* LG rate */ + /* For + HostCmd_CMD_802_11_TX_RATE_QUERY, + there is a hole (0x4) in rate table + between HR/DSSS and OFDM rates, so + minus 1 for OFDM rate index */ + rate->param.rate_cfg.rate = + (pmpriv->tx_rate > + MLAN_RATE_INDEX_OFDM0) ? + pmpriv->tx_rate - + 1 : pmpriv->tx_rate; + } else { + /* rate_type = MLAN_RATE_VALUE */ + rate->param.rate_cfg.rate = + wlan_index_to_data_rate(pmadapter, + pmpriv->tx_rate, + pmpriv-> + tx_rate_info); + } + } else if (rate->sub_command == MLAN_OID_GET_DATA_RATE) { + /* Tx rate info */ + if ((pmpriv->tx_rate_info & 0x3) == + MLAN_RATE_FORMAT_VHT) { + /* VHT rate */ + rate->param.data_rate.tx_rate_format = + MLAN_RATE_FORMAT_VHT; + rate->param.data_rate.tx_ht_bw = + (pmpriv->tx_rate_info & 0xC) >> 2; + rate->param.data_rate.tx_ht_gi = + (pmpriv->tx_rate_info & 0x10) >> 4; + rate->param.data_rate.tx_nss = + (pmpriv->tx_rate) >> 4; + rate->param.data_rate.tx_mcs_index = + (pmpriv->tx_rate) & 0xF; + rate->param.data_rate.tx_data_rate = + wlan_index_to_data_rate(pmadapter, + pmpriv->tx_rate, + pmpriv-> + tx_rate_info); + } else if ((pmpriv->tx_rate_info & 0x3) == + MLAN_RATE_FORMAT_HT) { + /* HT rate */ + rate->param.data_rate.tx_rate_format = + MLAN_RATE_FORMAT_HT; + rate->param.data_rate.tx_ht_bw = + (pmpriv->tx_rate_info & 0xC) >> 2; + rate->param.data_rate.tx_ht_gi = + (pmpriv->tx_rate_info & 0x10) >> 4; + rate->param.data_rate.tx_mcs_index = + pmpriv->tx_rate; + rate->param.data_rate.tx_data_rate = + wlan_index_to_data_rate(pmadapter, + pmpriv->tx_rate, + pmpriv-> + tx_rate_info); + } else { + /* LG rate */ + rate->param.data_rate.tx_rate_format = + MLAN_RATE_FORMAT_LG; + /* For HostCmd_CMD_802_11_TX_RATE_QUERY, there + is a hole in rate table between HR/DSSS and + OFDM rates, so minus 1 for OFDM rate index */ + rate->param.data_rate.tx_data_rate = + (pmpriv->tx_rate > + MLAN_RATE_INDEX_OFDM0) ? pmpriv-> + tx_rate - 1 : pmpriv->tx_rate; + } + + /* Rx rate info */ + if ((pmpriv->rxpd_rate_info & 0x3) == + MLAN_RATE_FORMAT_VHT) { + /* VHT rate */ + rate->param.data_rate.rx_rate_format = + MLAN_RATE_FORMAT_VHT; + rate->param.data_rate.rx_ht_bw = + (pmpriv->rxpd_rate_info & 0xC) >> 2; + rate->param.data_rate.rx_ht_gi = + (pmpriv->rxpd_rate_info & 0x10) >> 4; + rate->param.data_rate.rx_nss = + (pmpriv->rxpd_rate) >> 4; + rate->param.data_rate.rx_mcs_index = + (pmpriv->rxpd_rate) & 0xF; + rate->param.data_rate.rx_data_rate = + wlan_index_to_data_rate(pmadapter, + pmpriv-> + rxpd_rate, + pmpriv-> + rxpd_rate_info); + } else if ((pmpriv->rxpd_rate_info & 0x3) == + MLAN_RATE_FORMAT_HT) { + /* HT rate */ + rate->param.data_rate.rx_rate_format = + MLAN_RATE_FORMAT_HT; + rate->param.data_rate.rx_ht_bw = + (pmpriv->rxpd_rate_info & 0xC) >> 2; + rate->param.data_rate.rx_ht_gi = + (pmpriv->rxpd_rate_info & 0x10) >> 4; + rate->param.data_rate.rx_mcs_index = + pmpriv->rxpd_rate; + rate->param.data_rate.rx_data_rate = + wlan_index_to_data_rate(pmadapter, + pmpriv-> + rxpd_rate, + pmpriv-> + rxpd_rate_info); + } else { + /* LG rate */ + rate->param.data_rate.rx_rate_format = + MLAN_RATE_FORMAT_LG; + /* For rate index in RxPD, there is a hole in + rate table between HR/DSSS and OFDM rates, + so minus 1 for OFDM rate index */ + rate->param.data_rate.rx_data_rate = + (pmpriv->rxpd_rate > + MLAN_RATE_INDEX_OFDM0) ? pmpriv-> + rxpd_rate - 1 : pmpriv->rxpd_rate; + } + } + pioctl_buf->data_read_written = sizeof(mlan_data_rate) + + MLAN_SUB_COMMAND_SIZE; + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of tx_rate_cfg. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_tx_rate_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + HostCmd_DS_TX_RATE_CFG *rate_cfg = + (HostCmd_DS_TX_RATE_CFG *)&(cmd->params.tx_rate_cfg); + MrvlRateScope_t *rate_scope; + MrvlRateDropPattern_t *rate_drop; + t_u16 *pbitmap_rates = (t_u16 *)pdata_buf; + + t_u32 i; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_TX_RATE_CFG); + + rate_cfg->action = wlan_cpu_to_le16(cmd_action); + + rate_scope = (MrvlRateScope_t *)((t_u8 *)rate_cfg + + sizeof(HostCmd_DS_TX_RATE_CFG)); + rate_scope->type = wlan_cpu_to_le16(TLV_TYPE_RATE_SCOPE); + rate_scope->length = wlan_cpu_to_le16(sizeof(MrvlRateScope_t) - + sizeof(MrvlIEtypesHeader_t)); + if (pbitmap_rates != MNULL) { + rate_scope->hr_dsss_rate_bitmap = + wlan_cpu_to_le16(pbitmap_rates[0]); + rate_scope->ofdm_rate_bitmap = + wlan_cpu_to_le16(pbitmap_rates[1]); + for (i = 0; i < NELEMENTS(rate_scope->ht_mcs_rate_bitmap); i++) + rate_scope->ht_mcs_rate_bitmap[i] = + wlan_cpu_to_le16(pbitmap_rates[2 + i]); + for (i = 0; i < NELEMENTS(rate_scope->vht_mcs_rate_bitmap); i++) + rate_scope->vht_mcs_rate_bitmap[i] = + wlan_cpu_to_le16(pbitmap_rates + [2 + + NELEMENTS(rate_scope-> + ht_mcs_rate_bitmap) + + i]); + } else { + rate_scope->hr_dsss_rate_bitmap = + wlan_cpu_to_le16(pmpriv->bitmap_rates[0]); + rate_scope->ofdm_rate_bitmap = + wlan_cpu_to_le16(pmpriv->bitmap_rates[1]); + for (i = 0; i < NELEMENTS(rate_scope->ht_mcs_rate_bitmap); i++) + rate_scope->ht_mcs_rate_bitmap[i] = + wlan_cpu_to_le16(pmpriv->bitmap_rates[2 + i]); + for (i = 0; i < NELEMENTS(rate_scope->vht_mcs_rate_bitmap); i++) + rate_scope->vht_mcs_rate_bitmap[i] = + wlan_cpu_to_le16(pmpriv-> + bitmap_rates[2 + + NELEMENTS + (rate_scope-> + ht_mcs_rate_bitmap) + + i]); + } + + rate_drop = (MrvlRateDropPattern_t *)((t_u8 *)rate_scope + + sizeof(MrvlRateScope_t)); + rate_drop->type = wlan_cpu_to_le16(TLV_TYPE_RATE_DROP_PATTERN); + rate_drop->length = wlan_cpu_to_le16(sizeof(rate_drop->rate_drop_mode)); + rate_drop->rate_drop_mode = 0; + + cmd->size = wlan_cpu_to_le16(S_DS_GEN + sizeof(HostCmd_DS_TX_RATE_CFG) + + sizeof(MrvlRateScope_t) + + sizeof(MrvlRateDropPattern_t)); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of tx_rate_cfg + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ret_tx_rate_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + mlan_ds_rate *ds_rate = MNULL; + HostCmd_DS_TX_RATE_CFG *prate_cfg = MNULL; + MrvlRateScope_t *prate_scope; + MrvlIEtypesHeader_t *head = MNULL; + t_u16 tlv, tlv_buf_len = 0; + t_u8 *tlv_buf; + t_u32 i; + t_s32 index; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (resp == MNULL) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + prate_cfg = (HostCmd_DS_TX_RATE_CFG *)&(resp->params.tx_rate_cfg); + + tlv_buf = (t_u8 *)((t_u8 *)prate_cfg) + sizeof(HostCmd_DS_TX_RATE_CFG); + if (tlv_buf) { + tlv_buf_len = *(t_u16 *)(tlv_buf + sizeof(t_u16)); + tlv_buf_len = wlan_le16_to_cpu(tlv_buf_len); + } + + while (tlv_buf && tlv_buf_len > 0) { + tlv = (*tlv_buf); + tlv = tlv | (*(tlv_buf + 1) << 8); + + switch (tlv) { + case TLV_TYPE_RATE_SCOPE: + prate_scope = (MrvlRateScope_t *)tlv_buf; + pmpriv->bitmap_rates[0] = + wlan_le16_to_cpu(prate_scope-> + hr_dsss_rate_bitmap); + pmpriv->bitmap_rates[1] = + wlan_le16_to_cpu(prate_scope->ofdm_rate_bitmap); + for (i = 0; + i < NELEMENTS(prate_scope->ht_mcs_rate_bitmap); + i++) + pmpriv->bitmap_rates[2 + i] = + wlan_le16_to_cpu(prate_scope-> + ht_mcs_rate_bitmap[i]); + for (i = 0; + i < NELEMENTS(prate_scope->vht_mcs_rate_bitmap); + i++) + pmpriv->bitmap_rates[2 + + sizeof(prate_scope-> + ht_mcs_rate_bitmap) + / sizeof(t_u16) + i] = + wlan_le16_to_cpu(prate_scope-> + vht_mcs_rate_bitmap + [i]); + break; + /* Add RATE_DROP tlv here */ + } + + head = (MrvlIEtypesHeader_t *)tlv_buf; + head->len = wlan_le16_to_cpu(head->len); + tlv_buf += head->len + sizeof(MrvlIEtypesHeader_t); + tlv_buf_len -= head->len; + } + + pmpriv->is_data_rate_auto = wlan_is_rate_auto(pmpriv); + + if (pmpriv->is_data_rate_auto) { + pmpriv->data_rate = 0; + } else { + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_TX_RATE_QUERY, + HostCmd_ACT_GEN_GET, 0, MNULL, MNULL); + + } + + if (pioctl_buf) { + ds_rate = (mlan_ds_rate *)pioctl_buf->pbuf; + if (ds_rate == MNULL) { + PRINTM(MERROR, "Request buffer not found!\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + if (pmpriv->is_data_rate_auto) { + ds_rate->param.rate_cfg.is_rate_auto = MTRUE; + ds_rate->param.rate_cfg.rate_format = + MLAN_RATE_FORMAT_AUTO; + } else { + ds_rate->param.rate_cfg.is_rate_auto = MFALSE; + /* check the LG rate */ + index = wlan_get_rate_index(pmadapter, + &pmpriv->bitmap_rates[0], + 4); + if (index != -1) { + if ((index >= MLAN_RATE_BITMAP_OFDM0) && + (index <= MLAN_RATE_BITMAP_OFDM7)) + index -= (MLAN_RATE_BITMAP_OFDM0 - + MLAN_RATE_INDEX_OFDM0); + ds_rate->param.rate_cfg.rate_format = + MLAN_RATE_FORMAT_LG; + ds_rate->param.rate_cfg.rate = index; + } + /* check the HT rate */ + index = wlan_get_rate_index(pmadapter, + &pmpriv->bitmap_rates[2], + 16); + if (index != -1) { + ds_rate->param.rate_cfg.rate_format = + MLAN_RATE_FORMAT_HT; + ds_rate->param.rate_cfg.rate = index; + } + /* check the VHT rate */ + index = wlan_get_rate_index(pmadapter, + &pmpriv->bitmap_rates[10], + 16); + if (index != -1) { + ds_rate->param.rate_cfg.rate_format = + MLAN_RATE_FORMAT_VHT; + ds_rate->param.rate_cfg.rate = index % 16; + ds_rate->param.rate_cfg.nss = index / 16; + } + PRINTM(MINFO, "Rate index is %d\n", + ds_rate->param.rate_cfg.rate); + } + for (i = 0; i < MAX_BITMAP_RATES_SIZE; i++) { + ds_rate->param.rate_cfg.bitmap_rates[i] = + pmpriv->bitmap_rates[i]; + } + + } + + LEAVE(); + return ret; +} + +/** + * @brief This function issues adapter specific commands + * to initialize firmware + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return MLAN_STATUS_PENDING or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_adapter_init_cmd(IN pmlan_adapter pmadapter) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private pmpriv = MNULL; +#ifdef STA_SUPPORT + pmlan_private pmpriv_sta = MNULL; +#endif + + ENTER(); + + pmpriv = wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY); +#ifdef STA_SUPPORT + pmpriv_sta = wlan_get_priv(pmadapter, MLAN_BSS_ROLE_STA); +#endif + + /* + * This should be issued in the very first to config + * SDIO_GPIO interrupt mode. + */ + if (wlan_set_sdio_gpio_int(pmpriv) != MLAN_STATUS_SUCCESS) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_FUNC_INIT, + HostCmd_ACT_GEN_SET, 0, MNULL, MNULL); + if (ret) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /** Cal data dnld cmd prepare */ + if ((pmadapter->pcal_data) && (pmadapter->cal_data_len > 0)) { + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_CFG_DATA, + HostCmd_ACT_GEN_SET, 0, MNULL, MNULL); + if (ret) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + pmadapter->pcal_data = MNULL; + pmadapter->cal_data_len = 0; + } + + /* + * Get HW spec + */ + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_GET_HW_SPEC, + HostCmd_ACT_GEN_GET, 0, MNULL, MNULL); + if (ret) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Reconfigure tx buf size */ + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_RECONFIGURE_TX_BUFF, + HostCmd_ACT_GEN_SET, 0, MNULL, + &pmadapter->max_tx_buf_size); + if (ret) { + ret = MLAN_STATUS_FAILURE; + goto done; + } +#if defined(STA_SUPPORT) + if (pmpriv_sta && (pmpriv_sta->state_11d.user_enable_11d == ENABLE_11D)) { + /* Send command to FW to enable 11d */ + ret = wlan_prepare_cmd(pmpriv_sta, + HostCmd_CMD_802_11_SNMP_MIB, + HostCmd_ACT_GEN_SET, + Dot11D_i, + MNULL, + &pmpriv_sta->state_11d.user_enable_11d); + if (ret) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + } +#endif + +#if defined(STA_SUPPORT) + if (pmpriv_sta && (pmadapter->ps_mode == Wlan802_11PowerModePSP)) { + ret = wlan_prepare_cmd(pmpriv_sta, + HostCmd_CMD_802_11_PS_MODE_ENH, + EN_AUTO_PS, BITMAP_STA_PS, MNULL, MNULL); + if (ret) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + } +#endif + + if (pmadapter->init_auto_ds) { + mlan_ds_auto_ds auto_ds; + /* Enable auto deep sleep */ + auto_ds.idletime = pmadapter->idle_time; + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_PS_MODE_ENH, + EN_AUTO_PS, BITMAP_AUTO_DS, MNULL, + &auto_ds); + if (ret) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + } +#define DEF_AUTO_NULL_PKT_PERIOD 30 + if (pmpriv_sta) { + t_u32 value = DEF_AUTO_NULL_PKT_PERIOD; + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_SNMP_MIB, + HostCmd_ACT_GEN_SET, + NullPktPeriod_i, MNULL, &value); + if (ret) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + } + + ret = MLAN_STATUS_PENDING; +done: + LEAVE(); + return ret; +} + +#ifdef RX_PACKET_COALESCE +mlan_status +wlan_cmd_rx_pkt_coalesce_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + + mlan_ds_misc_rx_packet_coalesce *rx_pkt_cfg = + (mlan_ds_misc_rx_packet_coalesce *)pdata_buf; + HostCmd_DS_RX_PKT_COAL_CFG *prx_coal_cfg = + (HostCmd_DS_RX_PKT_COAL_CFG *)&cmd->params.rx_pkt_coal_cfg; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_RX_PKT_COALESCE_CFG); + prx_coal_cfg->action = wlan_cpu_to_le16(cmd_action); + + if (cmd_action == HostCmd_ACT_GEN_SET) { + prx_coal_cfg->packet_threshold = + wlan_cpu_to_le32(rx_pkt_cfg->packet_threshold); + prx_coal_cfg->delay = wlan_cpu_to_le16(rx_pkt_cfg->delay); + PRINTM(MCMND, + "Set RX coal config: packet threshold=%d delay=%d\n", + prx_coal_cfg->packet_threshold, prx_coal_cfg->delay); + cmd->size = + wlan_cpu_to_le16(S_DS_GEN + + sizeof(HostCmd_DS_RX_PKT_COAL_CFG)); + } else { + cmd->size = wlan_cpu_to_le16(S_DS_GEN + sizeof(cmd_action)); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; + +} + +/** + * @brief This function handles the command response of RX_PACKET_COAL_CFG + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_rx_pkt_coalesce_cfg(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_misc_cfg *pcfg = MNULL; + const HostCmd_DS_RX_PKT_COAL_CFG *presp_cfg = + &resp->params.rx_pkt_coal_cfg; + + ENTER(); + + if (pioctl_buf) { + pcfg = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + pcfg->param.rx_coalesce.packet_threshold = + wlan_le32_to_cpu(presp_cfg->packet_threshold); + pcfg->param.rx_coalesce.delay = + wlan_le16_to_cpu(presp_cfg->delay); + PRINTM(MCMND, + "Get rx pkt coalesce info: packet threshold=%d delay=%d\n", + pcfg->param.rx_coalesce.packet_threshold, + pcfg->param.rx_coalesce.delay); + pioctl_buf->buf_len = sizeof(mlan_ds_misc_rx_packet_coalesce); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +#endif +/** + * @brief This function handle the multi_chan info event + * + * @param pmpriv A pointer to mlan_private structure + * @param pevent A pointer to event buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_handle_event_multi_chan_info(IN pmlan_private pmpriv, pmlan_buffer pevent) +{ + pmlan_adapter pmadapter = pmpriv->adapter; + t_u32 interfaces = 0; + MrvlIEtypes_multi_chan_info_t *pmulti_chan_info = MNULL; + MrvlIEtypes_multi_chan_group_info_t *pmulti_chan_grp_info = MNULL; + int tlv_buf_left = pevent->data_len - sizeof(mlan_event_id); + t_u16 tlv_type, tlv_len; + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private intf_priv = MNULL; + int num_intf = 0, bss_type = 0, bss_num = 0; + MrvlIEtypesHeader_t *tlv = MNULL; + + ENTER(); + + PRINTM(MEVENT, "multi channel event\n"); + pmulti_chan_info = + (MrvlIEtypes_multi_chan_info_t *)(pevent->pbuf + + pevent->data_offset + + sizeof(mlan_event_id)); + if (tlv_buf_left < sizeof(MrvlIEtypes_multi_chan_info_t) || + wlan_le16_to_cpu(pmulti_chan_info->header.type) != + TLV_TYPE_MULTI_CHAN_INFO) { + PRINTM(MERROR, "Invalid multi channel event\n"); + goto done; + } + + pmadapter->mc_status = wlan_le16_to_cpu(pmulti_chan_info->status); + PRINTM(MEVENT, "mc_status=%d\n", pmadapter->mc_status); + tlv_buf_left -= sizeof(MrvlIEtypes_multi_chan_info_t); + tlv = (MrvlIEtypesHeader_t *)pmulti_chan_info->tlv_buffer; + + while (tlv_buf_left >= (int)sizeof(MrvlIEtypesHeader_t)) { + tlv_type = wlan_le16_to_cpu(tlv->type); + tlv_len = wlan_le16_to_cpu(tlv->len); + if ((sizeof(MrvlIEtypesHeader_t) + tlv_len) > + (unsigned int)tlv_buf_left) { + PRINTM(MERROR, "wrong tlv: tlvLen=%d, tlvBufLeft=%d\n", + tlv_len, tlv_buf_left); + break; + } + if (tlv_type != TLV_TYPE_MULTI_CHAN_GROUP_INFO_TLV_ID) { + PRINTM(MERROR, "wrong tlv type:0x%x\n", tlv_type); + break; + } + pmulti_chan_grp_info = + (MrvlIEtypes_multi_chan_group_info_t *)tlv; + PRINTM(MEVENT, "mc_info: groupid=%d chan=%d, numintf=%d\n", + pmulti_chan_grp_info->chan_group_id, + pmulti_chan_grp_info->chan_band_info.chan_num, + pmulti_chan_grp_info->num_intf); + num_intf = pmulti_chan_grp_info->num_intf; + for (interfaces = 0; interfaces < num_intf; interfaces++) { + bss_type = + pmulti_chan_grp_info-> + bss_type_numlist[interfaces] >> 4; + bss_num = + pmulti_chan_grp_info-> + bss_type_numlist[interfaces] & BSS_NUM_MASK; + PRINTM(MEVENT, "intf%d: bss_type=%d bss_num=%d\n", + interfaces, bss_type, bss_num); + intf_priv = + wlan_get_priv_by_id(pmadapter, bss_num, + bss_type); + if (intf_priv) { + } else { + PRINTM(MERROR, + "Invalid bss_type, bss_num in multi_channel event\n"); + } + } + + tlv_buf_left -= (sizeof(MrvlIEtypesHeader_t) + tlv_len); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len + + sizeof(MrvlIEtypesHeader_t)); + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief This function prepares the command MULTI_CHAN_CFG + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to command buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_multi_chan_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + mlan_ds_multi_chan_cfg *multi_chan_cfg = + (mlan_ds_multi_chan_cfg *)pdata_buf; + HostCmd_DS_MULTI_CHAN_CFG *pmchan_cfg = + (HostCmd_DS_MULTI_CHAN_CFG *)&cmd->params.multi_chan_cfg; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_MULTI_CHAN_CONFIG); + pmchan_cfg->action = wlan_cpu_to_le16(cmd_action); + + if (cmd_action == HostCmd_ACT_GEN_SET) { + pmchan_cfg->buffer_weight = multi_chan_cfg->buffer_weight; + pmchan_cfg->channel_time = + wlan_cpu_to_le32(multi_chan_cfg->channel_time); + PRINTM(MCMND, + "Set multi-channel: buffer_weight=%d channel_time=%d\n", + multi_chan_cfg->buffer_weight, + multi_chan_cfg->channel_time); + cmd->size = + wlan_cpu_to_le16(S_DS_GEN + + sizeof(HostCmd_DS_MULTI_CHAN_CFG)); + } else { + cmd->size = wlan_cpu_to_le16(S_DS_GEN + sizeof(cmd_action)); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of MULTI_CHAN_CFG + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_multi_chan_cfg(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_misc_cfg *pcfg = MNULL; + const HostCmd_DS_MULTI_CHAN_CFG *presp_cfg = + &resp->params.multi_chan_cfg; + + ENTER(); + + if (pioctl_buf) { + pcfg = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + pcfg->param.multi_chan_cfg.channel_time = + wlan_le32_to_cpu(presp_cfg->channel_time); + pcfg->param.multi_chan_cfg.buffer_weight = + presp_cfg->buffer_weight; + pcfg->param.multi_chan_cfg.tlv_len = + resp->size - (sizeof(HostCmd_DS_GEN) + + sizeof(HostCmd_DS_MULTI_CHAN_CFG)); + PRINTM(MCMND, + "Get multi-channel: buffer_weight=%d channel_time=%d tlv_len=%d\n", + pcfg->param.multi_chan_cfg.buffer_weight, + pcfg->param.multi_chan_cfg.channel_time, + pcfg->param.multi_chan_cfg.tlv_len); + memcpy(pmpriv->adapter, pcfg->param.multi_chan_cfg.tlv_buf, + presp_cfg->tlv_buf, pcfg->param.multi_chan_cfg.tlv_len); + pioctl_buf->buf_len = + sizeof(mlan_ds_multi_chan_cfg) + + pcfg->param.multi_chan_cfg.tlv_len; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares the command MULTI_CHAN_POLICY + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to command buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_multi_chan_policy(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + t_u16 policy = 0; + HostCmd_DS_MULTI_CHAN_POLICY *pmulti_chan_policy = + (HostCmd_DS_MULTI_CHAN_POLICY *)&cmd->params.multi_chan_policy; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_MULTI_CHAN_POLICY); + pmulti_chan_policy->action = wlan_cpu_to_le16(cmd_action); + cmd->size = + wlan_cpu_to_le16(S_DS_GEN + + sizeof(HostCmd_DS_MULTI_CHAN_POLICY)); + if (cmd_action == HostCmd_ACT_GEN_SET) { + policy = *((t_u16 *)pdata_buf); + pmulti_chan_policy->policy = wlan_cpu_to_le16(policy); + PRINTM(MCMND, "Set multi-channel policy: %d\n", + pmulti_chan_policy->policy); + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of MULTI_CHAN_POLICY + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_multi_chan_policy(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_misc_cfg *pcfg = MNULL; + const HostCmd_DS_MULTI_CHAN_POLICY *presp_cfg = + &resp->params.multi_chan_policy; + + ENTER(); + + if (pioctl_buf) { + pcfg = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + pcfg->param.multi_chan_policy = + wlan_le16_to_cpu(presp_cfg->policy); + + if (pioctl_buf->action == HostCmd_ACT_GEN_SET) { + if (pcfg->param.multi_chan_policy) + pmpriv->adapter->mc_policy = MTRUE; + else + pmpriv->adapter->mc_policy = MFALSE; + } + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of get_hw_spec. + * + * @param pmpriv A pointer to mlan_private structure + * @param pcmd A pointer to HostCmd_DS_COMMAND structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_get_hw_spec(IN pmlan_private pmpriv, IN HostCmd_DS_COMMAND *pcmd) +{ + HostCmd_DS_GET_HW_SPEC *hw_spec = &pcmd->params.hw_spec; + + ENTER(); + + pcmd->command = wlan_cpu_to_le16(HostCmd_CMD_GET_HW_SPEC); + pcmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_GET_HW_SPEC) + S_DS_GEN); + memcpy(pmpriv->adapter, hw_spec->permanent_addr, pmpriv->curr_addr, + MLAN_MAC_ADDR_LENGTH); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of set_cfg_data. + * + * @param pmpriv A pointer to mlan_private strcture + * @param pcmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action Command action: GET or SET + * @param pdata_buf A pointer to cal_data buf + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_cfg_data(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *pcmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + HostCmd_DS_802_11_CFG_DATA *pcfg_data = &(pcmd->params.cfg_data); + pmlan_adapter pmadapter = pmpriv->adapter; + t_u32 len; + t_u32 cal_data_offset; + t_u8 *temp_pcmd = (t_u8 *)pcmd; + + ENTER(); + + cal_data_offset = S_DS_GEN + sizeof(HostCmd_DS_802_11_CFG_DATA); + if ((pmadapter->pcal_data) && (pmadapter->cal_data_len > 0)) { + len = wlan_parse_cal_cfg((t_u8 *)pmadapter->pcal_data, + pmadapter->cal_data_len, + (t_u8 *)(temp_pcmd + cal_data_offset)); + } else { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + pcfg_data->action = cmd_action; + pcfg_data->type = 2; /* cal data type */ + pcfg_data->data_len = len; + + pcmd->command = HostCmd_CMD_CFG_DATA; + pcmd->size = pcfg_data->data_len + cal_data_offset; + + pcmd->command = wlan_cpu_to_le16(pcmd->command); + pcmd->size = wlan_cpu_to_le16(pcmd->size); + + pcfg_data->action = wlan_cpu_to_le16(pcfg_data->action); + pcfg_data->type = wlan_cpu_to_le16(pcfg_data->type); + pcfg_data->data_len = wlan_cpu_to_le16(pcfg_data->data_len); + +done: + LEAVE(); + return ret; +} + +/** + * @brief This function handles the command response of set_cfg_data + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to A pointer to mlan_ioctl_req + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ret_cfg_data(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, IN t_void *pioctl_buf) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (resp->result != HostCmd_RESULT_OK) { + PRINTM(MERROR, "Cal data cmd resp failed\n"); + ret = MLAN_STATUS_FAILURE; + } + LEAVE(); + return ret; +} + +/** + * @brief This function prepares command of mac_control. + * + * @param pmpriv A pointer to mlan_private structure + * @param pcmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action Command action + * @param pdata_buf A pointer to command information buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_cmd_mac_control(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *pcmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + HostCmd_DS_MAC_CONTROL *pmac = &pcmd->params.mac_ctrl; + t_u32 action = *((t_u32 *)pdata_buf); + + ENTER(); + + if (cmd_action != HostCmd_ACT_GEN_SET) { + PRINTM(MERROR, "wlan_cmd_mac_control(): support SET only.\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + pcmd->command = wlan_cpu_to_le16(HostCmd_CMD_MAC_CONTROL); + pcmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_MAC_CONTROL) + S_DS_GEN); + pmac->action = wlan_cpu_to_le32(action); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of mac_control + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_mac_control(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) +{ + ENTER(); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of get_hw_spec + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to command buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ret_get_hw_spec(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, IN t_void *pioctl_buf) +{ + HostCmd_DS_GET_HW_SPEC *hw_spec = &resp->params.hw_spec; + mlan_adapter *pmadapter = pmpriv->adapter; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u32 i; + t_u16 left_len; + t_u16 tlv_type = 0; + t_u16 tlv_len = 0; + MrvlIEtypes_fw_ver_info_t *api_rev = MNULL; + t_u16 api_id = 0; + MrvlIEtypesHeader_t *tlv = MNULL; + pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *)pioctl_buf; + + ENTER(); + + pmadapter->fw_cap_info = wlan_le32_to_cpu(hw_spec->fw_cap_info); + pmadapter->fw_cap_info &= pmadapter->init_para.dev_cap_mask; + + PRINTM(MMSG, "fw_cap_info=0x%x, dev_cap_mask=0x%x\n", + wlan_le32_to_cpu(hw_spec->fw_cap_info), + pmadapter->init_para.dev_cap_mask); +#ifdef STA_SUPPORT + if (IS_SUPPORT_MULTI_BANDS(pmadapter)) + pmadapter->fw_bands = (t_u8)GET_FW_DEFAULT_BANDS(pmadapter); + else + pmadapter->fw_bands = BAND_B; + + pmadapter->config_bands = pmadapter->fw_bands; + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) + pmadapter->priv[i]->config_bands = pmadapter->fw_bands; + } + + if (pmadapter->fw_bands & BAND_A) { + if (pmadapter->fw_bands & BAND_GN) { + pmadapter->config_bands |= BAND_AN; + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) + pmadapter->priv[i]->config_bands |= + BAND_AN; + } + + pmadapter->fw_bands |= BAND_AN; + } + if (pmadapter->fw_bands & BAND_AAC) { + pmadapter->config_bands |= BAND_AAC; + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) + pmadapter->priv[i]->config_bands |= + BAND_AAC; + } + } + if ((pmadapter->fw_bands & BAND_AN) + ) { + pmadapter->adhoc_start_band = BAND_A | BAND_AN; + pmadapter->adhoc_11n_enabled = MTRUE; + } else + pmadapter->adhoc_start_band = BAND_A; + pmpriv->adhoc_channel = DEFAULT_AD_HOC_CHANNEL_A; + } else if ((pmadapter->fw_bands & BAND_GN) + ) { + pmadapter->adhoc_start_band = BAND_G | BAND_B | BAND_GN; + pmpriv->adhoc_channel = DEFAULT_AD_HOC_CHANNEL; + pmadapter->adhoc_11n_enabled = MTRUE; + } else if (pmadapter->fw_bands & BAND_G) { + pmadapter->adhoc_start_band = BAND_G | BAND_B; + pmpriv->adhoc_channel = DEFAULT_AD_HOC_CHANNEL; + } else if (pmadapter->fw_bands & BAND_B) { + pmadapter->adhoc_start_band = BAND_B; + pmpriv->adhoc_channel = DEFAULT_AD_HOC_CHANNEL; + } +#endif /* STA_SUPPORT */ + + pmadapter->fw_release_number = hw_spec->fw_release_number; + pmadapter->number_of_antenna = + wlan_le16_to_cpu(hw_spec->number_of_antenna); + + PRINTM(MINFO, "GET_HW_SPEC: fw_release_number- 0x%X\n", + wlan_le32_to_cpu(pmadapter->fw_release_number)); + PRINTM(MINFO, "GET_HW_SPEC: Permanent addr- " MACSTR "\n", + MAC2STR(hw_spec->permanent_addr)); + PRINTM(MINFO, "GET_HW_SPEC: hw_if_version=0x%X version=0x%X\n", + wlan_le16_to_cpu(hw_spec->hw_if_version), + wlan_le16_to_cpu(hw_spec->version)); + + if (pmpriv->curr_addr[0] == 0xff) + memmove(pmadapter, pmpriv->curr_addr, hw_spec->permanent_addr, + MLAN_MAC_ADDR_LENGTH); + + pmadapter->hw_dot_11n_dev_cap = + wlan_le32_to_cpu(hw_spec->dot_11n_dev_cap); + pmadapter->hw_dev_mcs_support = hw_spec->dev_mcs_support; + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) + wlan_update_11n_cap(pmadapter->priv[i]); + } + + wlan_show_dot11ndevcap(pmadapter, pmadapter->hw_dot_11n_dev_cap); + wlan_show_devmcssupport(pmadapter, pmadapter->hw_dev_mcs_support); + if (ISSUPP_BEAMFORMING(pmadapter->hw_dot_11n_dev_cap)) { + PRINTM(MCMND, "Enable Beamforming\n"); + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) + pmadapter->priv[i]->tx_bf_cap = + DEFAULT_11N_TX_BF_CAP; + } + } + pmadapter->hw_dot_11ac_dev_cap = + wlan_le32_to_cpu(hw_spec->Dot11acDevCap); + pmadapter->hw_dot_11ac_mcs_support = + wlan_le32_to_cpu(hw_spec->Dot11acMcsSupport); + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) + wlan_update_11ac_cap(pmadapter->priv[i]); + } + wlan_show_dot11acdevcap(pmadapter, pmadapter->hw_dot_11ac_dev_cap); + wlan_show_dot11acmcssupport(pmadapter, + pmadapter->hw_dot_11ac_mcs_support); + pmadapter->mp_end_port = wlan_le16_to_cpu(hw_spec->mp_end_port); + + for (i = 1; i <= (unsigned)(MAX_PORT - pmadapter->mp_end_port); i++) + pmadapter->mp_data_port_mask &= ~(1 << (MAX_PORT - i)); + + pmadapter->max_mgmt_ie_index = + wlan_le16_to_cpu(hw_spec->mgmt_buf_count); + PRINTM(MINFO, "GET_HW_SPEC: mgmt IE count=%d\n", + pmadapter->max_mgmt_ie_index); + if (!pmadapter->max_mgmt_ie_index) + pmadapter->max_mgmt_ie_index = MAX_MGMT_IE_INDEX; + + pmadapter->region_code = wlan_le16_to_cpu(hw_spec->region_code); + for (i = 0; i < MRVDRV_MAX_REGION_CODE; i++) { + /* Use the region code to search for the index */ + if (pmadapter->region_code == region_code_index[i]) + break; + } + /* If it's unidentified region code, use the default */ + if (i >= MRVDRV_MAX_REGION_CODE) { + pmadapter->region_code = MRVDRV_DEFAULT_REGION_CODE; + PRINTM(MWARN, + "unidentified region code, use the default (0x%02x)\n", + MRVDRV_DEFAULT_REGION_CODE); + } + /* Synchronize CFP code with region code */ + pmadapter->cfp_code_bg = pmadapter->region_code; + pmadapter->cfp_code_a = pmadapter->region_code; + + if (wlan_set_regiontable(pmpriv, (t_u8)pmadapter->region_code, + pmadapter->fw_bands)) { + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_CMD_SCAN_FAIL; + ret = MLAN_STATUS_FAILURE; + goto done; + } +#ifdef STA_SUPPORT + if (wlan_11d_set_universaltable(pmpriv, pmadapter->fw_bands)) { + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_CMD_SCAN_FAIL; + ret = MLAN_STATUS_FAILURE; + goto done; + } +#endif /* STA_SUPPORT */ + left_len = + wlan_le16_to_cpu(resp->size) - sizeof(HostCmd_DS_GET_HW_SPEC) - + S_DS_GEN; + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)hw_spec + + sizeof(HostCmd_DS_GET_HW_SPEC)); + while (left_len > sizeof(MrvlIEtypesHeader_t)) { + tlv_type = wlan_le16_to_cpu(tlv->type); + tlv_len = wlan_le16_to_cpu(tlv->len); + switch (tlv_type) { + case TLV_TYPE_FW_VER_INFO: + api_rev = (MrvlIEtypes_fw_ver_info_t *) tlv; + api_id = wlan_le16_to_cpu(api_rev->api_id); + switch (api_id) { + case FW_API_VER_ID: + pmadapter->fw_ver = api_rev->major_ver; + pmadapter->fw_min_ver = api_rev->minor_ver; + PRINTM(MCMND, "fw ver=%d.%d\n", + api_rev->major_ver, api_rev->minor_ver); + break; + case UAP_FW_API_VER_ID: + pmadapter->uap_fw_ver = api_rev->major_ver; + PRINTM(MCMND, "uap fw ver=%d.%d\n", + api_rev->major_ver, api_rev->minor_ver); + break; + default: + break; + } + break; + default: + break; + } + left_len -= (sizeof(MrvlIEtypesHeader_t) + tlv_len); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len + + sizeof(MrvlIEtypesHeader_t)); + } +done: + LEAVE(); + return ret; +} + +/** + * @brief This function prepares command of radio_control. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_802_11_radio_control(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + HostCmd_DS_802_11_RADIO_CONTROL *pradio_control = &cmd->params.radio; + t_u32 radio_ctl; + ENTER(); + cmd->size = wlan_cpu_to_le16((sizeof(HostCmd_DS_802_11_RADIO_CONTROL)) + + S_DS_GEN); + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_RADIO_CONTROL); + pradio_control->action = wlan_cpu_to_le16(cmd_action); + memcpy(pmpriv->adapter, &radio_ctl, pdata_buf, sizeof(t_u32)); + pradio_control->control = wlan_cpu_to_le16((t_u16)radio_ctl); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of radio_control + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_802_11_radio_control(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_802_11_RADIO_CONTROL *pradio_ctrl = + (HostCmd_DS_802_11_RADIO_CONTROL *)&resp->params.radio; + mlan_ds_radio_cfg *radio_cfg = MNULL; + mlan_adapter *pmadapter = pmpriv->adapter; + + ENTER(); + pmadapter->radio_on = wlan_le16_to_cpu(pradio_ctrl->control); + if (pioctl_buf) { + radio_cfg = (mlan_ds_radio_cfg *)pioctl_buf->pbuf; + radio_cfg->param.radio_on_off = (t_u32)pmadapter->radio_on; + pioctl_buf->data_read_written = sizeof(mlan_ds_radio_cfg); + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +#ifdef WIFI_DIRECT_SUPPORT +/** + * @brief This function prepares command of remain_on_channel. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_remain_on_channel(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + HostCmd_DS_REMAIN_ON_CHANNEL *remain_channel = + &cmd->params.remain_on_chan; + mlan_ds_remain_chan *cfg = (mlan_ds_remain_chan *)pdata_buf; + ENTER(); + cmd->size = wlan_cpu_to_le16((sizeof(HostCmd_DS_REMAIN_ON_CHANNEL)) + + S_DS_GEN); + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_REMAIN_ON_CHANNEL); + remain_channel->action = cmd_action; + if (cmd_action == HostCmd_ACT_GEN_SET) { + if (cfg->remove) { + remain_channel->action = HostCmd_ACT_GEN_REMOVE; + } else { + remain_channel->bandcfg = cfg->bandcfg; + remain_channel->channel = cfg->channel; + remain_channel->remain_period = + wlan_cpu_to_le32(cfg->remain_period); + } + } + remain_channel->action = wlan_cpu_to_le16(remain_channel->action); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of remain_on_channel + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_remain_on_channel(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_REMAIN_ON_CHANNEL *remain_channel = + &resp->params.remain_on_chan; + mlan_ds_radio_cfg *radio_cfg = MNULL; + + ENTER(); + if (pioctl_buf) { + radio_cfg = (mlan_ds_radio_cfg *)pioctl_buf->pbuf; + radio_cfg->param.remain_chan.status = remain_channel->status; + radio_cfg->param.remain_chan.bandcfg = remain_channel->bandcfg; + radio_cfg->param.remain_chan.channel = remain_channel->channel; + radio_cfg->param.remain_chan.remain_period = + wlan_le32_to_cpu(remain_channel->remain_period); + pioctl_buf->data_read_written = sizeof(mlan_ds_radio_cfg); + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of wifi direct mode. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_wifi_direct_mode(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + HostCmd_DS_WIFI_DIRECT_MODE *wfd_mode = &cmd->params.wifi_direct_mode; + t_u16 mode = *((t_u16 *)pdata_buf); + ENTER(); + cmd->size = wlan_cpu_to_le16((sizeof(HostCmd_DS_WIFI_DIRECT_MODE)) + + S_DS_GEN); + cmd->command = wlan_cpu_to_le16(HOST_CMD_WIFI_DIRECT_MODE_CONFIG); + wfd_mode->action = wlan_cpu_to_le16(cmd_action); + if (cmd_action == HostCmd_ACT_GEN_SET) + wfd_mode->mode = wlan_cpu_to_le16(mode); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of wifi direct mode + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_wifi_direct_mode(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_WIFI_DIRECT_MODE *wfd_mode = &resp->params.wifi_direct_mode; + mlan_ds_bss *bss = MNULL; + + ENTER(); + if (pioctl_buf) { + bss = (mlan_ds_bss *)pioctl_buf->pbuf; + bss->param.wfd_mode = wlan_le16_to_cpu(wfd_mode->mode); + pioctl_buf->data_read_written = sizeof(mlan_ds_bss); + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of p2p_params_config. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_p2p_params_config(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG *p2p_config = + &cmd->params.p2p_params_config; + mlan_ds_wifi_direct_config *cfg = + (mlan_ds_wifi_direct_config *)pdata_buf; + MrvlIEtypes_NoA_setting_t *pnoa_tlv = MNULL; + MrvlIEtypes_OPP_PS_setting_t *popp_ps_tlv = MNULL; + t_u8 *tlv = MNULL; + ENTER(); + + cmd->size = sizeof(HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG) + S_DS_GEN; + cmd->command = wlan_cpu_to_le16(HOST_CMD_P2P_PARAMS_CONFIG); + p2p_config->action = wlan_cpu_to_le16(cmd_action); + if (cmd_action == HostCmd_ACT_GEN_SET) { + tlv = (t_u8 *)p2p_config + + sizeof(HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG); + if (cfg->flags & WIFI_DIRECT_NOA) { + pnoa_tlv = (MrvlIEtypes_NoA_setting_t *)tlv; + pnoa_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_WIFI_DIRECT_NOA); + pnoa_tlv->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_NoA_setting_t) - + sizeof(MrvlIEtypesHeader_t)); + pnoa_tlv->enable = cfg->noa_enable; + pnoa_tlv->index = wlan_cpu_to_le16(cfg->index); + pnoa_tlv->noa_count = cfg->noa_count; + pnoa_tlv->noa_duration = + wlan_cpu_to_le32(cfg->noa_duration); + pnoa_tlv->noa_interval = + wlan_cpu_to_le32(cfg->noa_interval); + cmd->size += sizeof(MrvlIEtypes_NoA_setting_t); + tlv += sizeof(MrvlIEtypes_NoA_setting_t); + PRINTM(MCMND, + "Set NOA: enable=%d index=%d, count=%d, duration=%d interval=%d\n", + cfg->noa_enable, cfg->index, cfg->noa_count, + (int)cfg->noa_duration, (int)cfg->noa_interval); + } + if (cfg->flags & WIFI_DIRECT_OPP_PS) { + popp_ps_tlv = (MrvlIEtypes_OPP_PS_setting_t *)tlv; + popp_ps_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_WIFI_DIRECT_OPP_PS); + popp_ps_tlv->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_OPP_PS_setting_t) + - sizeof(MrvlIEtypesHeader_t)); + + popp_ps_tlv->enable = cfg->ct_window; + popp_ps_tlv->enable |= cfg->opp_ps_enable << 7; + cmd->size += sizeof(MrvlIEtypes_OPP_PS_setting_t); + PRINTM(MCMND, "Set OPP_PS: enable=%d ct_win=%d\n", + cfg->opp_ps_enable, cfg->ct_window); + } + } else if (cmd_action == HostCmd_ACT_GEN_GET) { + tlv = (t_u8 *)p2p_config + + sizeof(HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG); + if (cfg->flags & WIFI_DIRECT_NOA) { + pnoa_tlv = (MrvlIEtypes_NoA_setting_t *)tlv; + pnoa_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_WIFI_DIRECT_NOA); + pnoa_tlv->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_NoA_setting_t) - + sizeof(MrvlIEtypesHeader_t)); + cmd->size += sizeof(MrvlIEtypes_NoA_setting_t); + tlv += sizeof(MrvlIEtypes_NoA_setting_t); + } + + if (cfg->flags & WIFI_DIRECT_OPP_PS) { + popp_ps_tlv = (MrvlIEtypes_OPP_PS_setting_t *)tlv; + popp_ps_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_WIFI_DIRECT_OPP_PS); + popp_ps_tlv->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_OPP_PS_setting_t) + - sizeof(MrvlIEtypesHeader_t)); + cmd->size += sizeof(MrvlIEtypes_OPP_PS_setting_t); + } + } + cmd->size = wlan_cpu_to_le16(cmd->size); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of p2p_params_config + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_p2p_params_config(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG *p2p_config = + &resp->params.p2p_params_config; + mlan_ds_misc_cfg *cfg = MNULL; + MrvlIEtypes_NoA_setting_t *pnoa_tlv = MNULL; + MrvlIEtypes_OPP_PS_setting_t *popp_ps_tlv = MNULL; + MrvlIEtypesHeader_t *tlv = MNULL; + t_u16 tlv_buf_left = 0; + t_u16 tlv_type = 0; + t_u16 tlv_len = 0; + + ENTER(); + if (wlan_le16_to_cpu(p2p_config->action) == HostCmd_ACT_GEN_GET) { + if (pioctl_buf) { + cfg = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)p2p_config + + sizeof + (HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG)); + tlv_buf_left = + resp->size - + (sizeof(HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG) + + S_DS_GEN); + while (tlv_buf_left >= sizeof(MrvlIEtypesHeader_t)) { + tlv_type = wlan_le16_to_cpu(tlv->type); + tlv_len = wlan_le16_to_cpu(tlv->len); + if (tlv_buf_left < + (tlv_len + sizeof(MrvlIEtypesHeader_t))) { + PRINTM(MERROR, + "Error processing p2p param config TLVs, bytes left < TLV length\n"); + break; + } + switch (tlv_type) { + case TLV_TYPE_WIFI_DIRECT_NOA: + pnoa_tlv = + (MrvlIEtypes_NoA_setting_t *) + tlv; + cfg->param.p2p_config.flags |= + WIFI_DIRECT_NOA; + cfg->param.p2p_config.noa_enable = + pnoa_tlv->enable; + cfg->param.p2p_config.index = + wlan_le16_to_cpu(pnoa_tlv-> + index); + cfg->param.p2p_config.noa_count = + pnoa_tlv->noa_count; + cfg->param.p2p_config.noa_duration = + wlan_le32_to_cpu(pnoa_tlv-> + noa_duration); + cfg->param.p2p_config.noa_interval = + wlan_le32_to_cpu(pnoa_tlv-> + noa_interval); + PRINTM(MCMND, + "Get NOA: enable=%d index=%d, count=%d, duration=%d interval=%d\n", + cfg->param.p2p_config.noa_enable, + cfg->param.p2p_config.index, + cfg->param.p2p_config.noa_count, + (int)cfg->param.p2p_config. + noa_duration, + (int)cfg->param.p2p_config. + noa_interval); + break; + case TLV_TYPE_WIFI_DIRECT_OPP_PS: + popp_ps_tlv = + (MrvlIEtypes_OPP_PS_setting_t *) + tlv; + cfg->param.p2p_config.flags |= + WIFI_DIRECT_OPP_PS; + cfg->param.p2p_config.opp_ps_enable = + (popp_ps_tlv-> + enable & 0x80) >> 7; + cfg->param.p2p_config.ct_window = + popp_ps_tlv->enable & 0x7f; + PRINTM(MCMND, + "Get OPP_PS: enable=%d ct_win=%d\n", + cfg->param.p2p_config. + opp_ps_enable, + cfg->param.p2p_config.ct_window); + break; + default: + break; + } + tlv_buf_left -= + tlv_len + sizeof(MrvlIEtypesHeader_t); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + + tlv_len + + sizeof + (MrvlIEtypesHeader_t)); + } + pioctl_buf->data_read_written = + sizeof(mlan_ds_wifi_direct_config); + } + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} +#endif + +/** + * @brief This function prepares command of hs wakeup reason. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_hs_wakeup_reason(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) +{ + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_HS_WAKEUP_REASON); + cmd->size = + wlan_cpu_to_le16((sizeof(HostCmd_DS_HS_WAKEUP_REASON)) + + S_DS_GEN); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of + * hs wakeup reason + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to command buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_hs_wakeup_reason(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_HS_WAKEUP_REASON *hs_wakeup_reason = + (HostCmd_DS_HS_WAKEUP_REASON *)&resp->params.hs_wakeup_reason; + mlan_ds_pm_cfg *pm_cfg = MNULL; + + ENTER(); + + pm_cfg = (mlan_ds_pm_cfg *)pioctl_buf->pbuf; + pm_cfg->param.wakeup_reason.hs_wakeup_reason = + wlan_le16_to_cpu(hs_wakeup_reason->wakeup_reason); + pioctl_buf->data_read_written = sizeof(mlan_ds_pm_cfg); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of rf_antenna. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_802_11_rf_antenna(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + HostCmd_DS_802_11_RF_ANTENNA *pantenna = &cmd->params.antenna; + mlan_ds_ant_cfg *ant_cfg = (mlan_ds_ant_cfg *)pdata_buf; + typedef struct _HostCmd_DS_802_11_RF_ANTENNA_1X1 { + /** Action */ + t_u16 action; + /** Antenna or 0xffff (diversity) */ + t_u16 antenna_mode; + /** Evaluate time */ + t_u16 evaluate_time; + /** Current antenna */ + t_u16 current_antenna; + } HostCmd_DS_802_11_RF_ANTENNA_1X1; + HostCmd_DS_802_11_RF_ANTENNA_1X1 *pantenna_1x1 = + (HostCmd_DS_802_11_RF_ANTENNA_1X1 *)&cmd->params.antenna; + mlan_ds_ant_cfg_1x1 *ant_cfg_1x1 = (mlan_ds_ant_cfg_1x1 *) pdata_buf; + + ENTER(); + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_RF_ANTENNA); + if (!IS_STREAM_2X2(pmpriv->adapter->feature_control)) + cmd->size = + wlan_cpu_to_le16(sizeof + (HostCmd_DS_802_11_RF_ANTENNA_1X1) + + S_DS_GEN); + else + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_802_11_RF_ANTENNA) + + S_DS_GEN); + + if (cmd_action == HostCmd_ACT_GEN_SET) { + if (IS_STREAM_2X2(pmpriv->adapter->feature_control)) { + pantenna->action_tx = + wlan_cpu_to_le16(HostCmd_ACT_SET_TX); + pantenna->tx_antenna_mode = + wlan_cpu_to_le16((t_u16)ant_cfg->tx_antenna); + pantenna->action_rx = + wlan_cpu_to_le16(HostCmd_ACT_SET_RX); + pantenna->rx_antenna_mode = + wlan_cpu_to_le16((t_u16)ant_cfg->rx_antenna); + } else { + pantenna_1x1->action = + wlan_cpu_to_le16(HostCmd_ACT_SET_BOTH); + pantenna_1x1->antenna_mode = + wlan_cpu_to_le16((t_u16)ant_cfg_1x1->antenna); + pantenna_1x1->evaluate_time = + wlan_cpu_to_le16((t_u16)ant_cfg_1x1-> + evaluate_time); + } + } else { + if (IS_STREAM_2X2(pmpriv->adapter->feature_control)) { + pantenna->action_tx = + wlan_cpu_to_le16(HostCmd_ACT_GET_TX); + pantenna->action_rx = + wlan_cpu_to_le16(HostCmd_ACT_GET_RX); + } else { + pantenna_1x1->action = + wlan_cpu_to_le16(HostCmd_ACT_GET_BOTH); + } + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of rf_antenna + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_802_11_rf_antenna(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_802_11_RF_ANTENNA *pantenna = &resp->params.antenna; + t_u16 tx_ant_mode = wlan_le16_to_cpu(pantenna->tx_antenna_mode); + t_u16 rx_ant_mode = wlan_le16_to_cpu(pantenna->rx_antenna_mode); + typedef struct _HostCmd_DS_802_11_RF_ANTENNA_1X1 { + /** Action */ + t_u16 action; + /** Antenna or 0xffff (diversity) */ + t_u16 antenna_mode; + /** Evaluate time */ + t_u16 evaluate_time; + /** Current antenna */ + t_u16 current_antenna; + } HostCmd_DS_802_11_RF_ANTENNA_1X1; + HostCmd_DS_802_11_RF_ANTENNA_1X1 *pantenna_1x1 = + (HostCmd_DS_802_11_RF_ANTENNA_1X1 *)&resp->params.antenna; + t_u16 ant_mode = wlan_le16_to_cpu(pantenna_1x1->antenna_mode); + t_u16 evaluate_time = wlan_le16_to_cpu(pantenna_1x1->evaluate_time); + t_u16 current_antenna = wlan_le16_to_cpu(pantenna_1x1->current_antenna); + mlan_ds_radio_cfg *radio = MNULL; + + ENTER(); + + if (IS_STREAM_2X2(pmpriv->adapter->feature_control)) + PRINTM(MINFO, "RF_ANT_RESP: Tx action = 0x%x, Tx Mode = 0x%04x" + " Rx action = 0x%x, Rx Mode = 0x%04x\n", + wlan_le16_to_cpu(pantenna->action_tx), tx_ant_mode, + wlan_le16_to_cpu(pantenna->action_rx), rx_ant_mode); + else + PRINTM(MINFO, + "RF_ANT_RESP: action = 0x%x, Mode = 0x%04x, Evaluate time = %d, Current antenna = %d\n", + wlan_le16_to_cpu(pantenna_1x1->action), ant_mode, + evaluate_time, current_antenna); + + if (pioctl_buf) { + radio = (mlan_ds_radio_cfg *)pioctl_buf->pbuf; + if (IS_STREAM_2X2(pmpriv->adapter->feature_control)) { + radio->param.ant_cfg.tx_antenna = tx_ant_mode; + radio->param.ant_cfg.rx_antenna = rx_ant_mode; + } else { + radio->param.ant_cfg_1x1.antenna = ant_mode; + radio->param.ant_cfg_1x1.evaluate_time = evaluate_time; + radio->param.ant_cfg_1x1.current_antenna = + current_antenna; + } + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of reg_access. + * + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action the action: GET or SET + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_cmd_reg_access(IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + mlan_ds_reg_rw *reg_rw; + + ENTER(); + + reg_rw = (mlan_ds_reg_rw *)pdata_buf; + switch (cmd->command) { + case HostCmd_CMD_MAC_REG_ACCESS: + { + HostCmd_DS_MAC_REG_ACCESS *mac_reg; + cmd->size = + wlan_cpu_to_le16(sizeof + (HostCmd_DS_MAC_REG_ACCESS) + + S_DS_GEN); + mac_reg = + (HostCmd_DS_MAC_REG_ACCESS *)&cmd->params. + mac_reg; + mac_reg->action = wlan_cpu_to_le16(cmd_action); + mac_reg->offset = + wlan_cpu_to_le16((t_u16)reg_rw->offset); + mac_reg->value = wlan_cpu_to_le32(reg_rw->value); + break; + } + case HostCmd_CMD_BBP_REG_ACCESS: + { + HostCmd_DS_BBP_REG_ACCESS *bbp_reg; + cmd->size = + wlan_cpu_to_le16(sizeof + (HostCmd_DS_BBP_REG_ACCESS) + + S_DS_GEN); + bbp_reg = + (HostCmd_DS_BBP_REG_ACCESS *)&cmd->params. + bbp_reg; + bbp_reg->action = wlan_cpu_to_le16(cmd_action); + bbp_reg->offset = + wlan_cpu_to_le16((t_u16)reg_rw->offset); + bbp_reg->value = (t_u8)reg_rw->value; + break; + } + case HostCmd_CMD_RF_REG_ACCESS: + { + HostCmd_DS_RF_REG_ACCESS *rf_reg; + cmd->size = + wlan_cpu_to_le16(sizeof + (HostCmd_DS_RF_REG_ACCESS) + + S_DS_GEN); + rf_reg = (HostCmd_DS_RF_REG_ACCESS *)&cmd->params. + rf_reg; + rf_reg->action = wlan_cpu_to_le16(cmd_action); + rf_reg->offset = + wlan_cpu_to_le16((t_u16)reg_rw->offset); + rf_reg->value = (t_u8)reg_rw->value; + break; + } + case HostCmd_CMD_CAU_REG_ACCESS: + { + HostCmd_DS_RF_REG_ACCESS *cau_reg; + cmd->size = + wlan_cpu_to_le16(sizeof + (HostCmd_DS_RF_REG_ACCESS) + + S_DS_GEN); + cau_reg = + (HostCmd_DS_RF_REG_ACCESS *)&cmd->params.rf_reg; + cau_reg->action = wlan_cpu_to_le16(cmd_action); + cau_reg->offset = + wlan_cpu_to_le16((t_u16)reg_rw->offset); + cau_reg->value = (t_u8)reg_rw->value; + break; + } + case HostCmd_CMD_TARGET_ACCESS: + { + HostCmd_DS_TARGET_ACCESS *target; + cmd->size = + wlan_cpu_to_le16(sizeof + (HostCmd_DS_TARGET_ACCESS) + + S_DS_GEN); + target = (HostCmd_DS_TARGET_ACCESS *)&cmd->params. + target; + target->action = wlan_cpu_to_le16(cmd_action); + target->csu_target = + wlan_cpu_to_le16(MLAN_CSU_TARGET_PSU); + target->address = + wlan_cpu_to_le16((t_u16)reg_rw->offset); + target->data = (t_u8)reg_rw->value; + break; + } + case HostCmd_CMD_802_11_EEPROM_ACCESS: + { + mlan_ds_read_eeprom *rd_eeprom = + (mlan_ds_read_eeprom *)pdata_buf; + HostCmd_DS_802_11_EEPROM_ACCESS *cmd_eeprom = + (HostCmd_DS_802_11_EEPROM_ACCESS *)&cmd->params. + eeprom; + cmd->size = + wlan_cpu_to_le16(sizeof + (HostCmd_DS_802_11_EEPROM_ACCESS) + + S_DS_GEN); + cmd_eeprom->action = wlan_cpu_to_le16(cmd_action); + cmd_eeprom->offset = + wlan_cpu_to_le16(rd_eeprom->offset); + cmd_eeprom->byte_count = + wlan_cpu_to_le16(rd_eeprom->byte_count); + cmd_eeprom->value = 0; + break; + } + default: + LEAVE(); + return MLAN_STATUS_FAILURE; + } + cmd->command = wlan_cpu_to_le16(cmd->command); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of reg_access + * + * @param pmadapter A pointer to mlan_adapter structure + * @param type The type of reg access (MAC, BBP or RF) + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to command buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ret_reg_access(mlan_adapter *pmadapter, + t_u16 type, + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_reg_mem *reg_mem = MNULL; + mlan_ds_reg_rw *reg_rw = MNULL; + + ENTER(); + + if (pioctl_buf) { + reg_mem = (mlan_ds_reg_mem *)pioctl_buf->pbuf; + reg_rw = ®_mem->param.reg_rw; + switch (type) { + case HostCmd_CMD_MAC_REG_ACCESS: + { + HostCmd_DS_MAC_REG_ACCESS *reg; + reg = (HostCmd_DS_MAC_REG_ACCESS *)&resp-> + params.mac_reg; + reg_rw->offset = + (t_u32)wlan_le16_to_cpu(reg->offset); + reg_rw->value = wlan_le32_to_cpu(reg->value); + break; + } + case HostCmd_CMD_BBP_REG_ACCESS: + { + HostCmd_DS_BBP_REG_ACCESS *reg; + reg = (HostCmd_DS_BBP_REG_ACCESS *)&resp-> + params.bbp_reg; + reg_rw->offset = + (t_u32)wlan_le16_to_cpu(reg->offset); + reg_rw->value = (t_u32)reg->value; + break; + } + + case HostCmd_CMD_RF_REG_ACCESS: + { + HostCmd_DS_RF_REG_ACCESS *reg; + reg = (HostCmd_DS_RF_REG_ACCESS *)&resp->params. + rf_reg; + reg_rw->offset = + (t_u32)wlan_le16_to_cpu(reg->offset); + reg_rw->value = (t_u32)reg->value; + break; + } + case HostCmd_CMD_CAU_REG_ACCESS: + { + HostCmd_DS_RF_REG_ACCESS *reg; + reg = (HostCmd_DS_RF_REG_ACCESS *)&resp->params. + rf_reg; + reg_rw->offset = + (t_u32)wlan_le16_to_cpu(reg->offset); + reg_rw->value = (t_u32)reg->value; + break; + } + case HostCmd_CMD_TARGET_ACCESS: + { + HostCmd_DS_TARGET_ACCESS *reg; + reg = (HostCmd_DS_TARGET_ACCESS *)&resp->params. + target; + reg_rw->offset = + (t_u32)wlan_le16_to_cpu(reg->address); + reg_rw->value = (t_u32)reg->data; + break; + } + case HostCmd_CMD_802_11_EEPROM_ACCESS: + { + mlan_ds_read_eeprom *eeprom = + ®_mem->param.rd_eeprom; + HostCmd_DS_802_11_EEPROM_ACCESS *cmd_eeprom = + (HostCmd_DS_802_11_EEPROM_ACCESS *) + &resp->params.eeprom; + cmd_eeprom->byte_count = + wlan_le16_to_cpu(cmd_eeprom-> + byte_count); + PRINTM(MINFO, "EEPROM read len=%x\n", + cmd_eeprom->byte_count); + if (eeprom->byte_count < cmd_eeprom->byte_count) { + eeprom->byte_count = 0; + PRINTM(MINFO, + "EEPROM read return length is too big\n"); + pioctl_buf->status_code = + MLAN_ERROR_CMD_RESP_FAIL; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + eeprom->offset = + wlan_le16_to_cpu(cmd_eeprom->offset); + eeprom->byte_count = cmd_eeprom->byte_count; + if (eeprom->byte_count > 0) { + memcpy(pmadapter, &eeprom->value, + &cmd_eeprom->value, + MIN(MAX_EEPROM_DATA, + eeprom->byte_count)); + HEXDUMP("EEPROM", + (char *)&eeprom->value, + MIN(MAX_EEPROM_DATA, + eeprom->byte_count)); + } + break; + } + default: + pioctl_buf->status_code = MLAN_ERROR_CMD_RESP_FAIL; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of mem_access. + * + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action the action: GET or SET + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_mem_access(IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + mlan_ds_mem_rw *mem_rw = (mlan_ds_mem_rw *)pdata_buf; + HostCmd_DS_MEM_ACCESS *mem_access = + (HostCmd_DS_MEM_ACCESS *)&cmd->params.mem; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_MEM_ACCESS); + cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_MEM_ACCESS) + S_DS_GEN); + + mem_access->action = wlan_cpu_to_le16(cmd_action); + mem_access->addr = wlan_cpu_to_le32(mem_rw->addr); + mem_access->value = wlan_cpu_to_le32(mem_rw->value); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of mem_access + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to command buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_mem_access(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_reg_mem *reg_mem = MNULL; + mlan_ds_mem_rw *mem_rw = MNULL; + HostCmd_DS_MEM_ACCESS *mem = (HostCmd_DS_MEM_ACCESS *)&resp->params.mem; + + ENTER(); + + if (pioctl_buf) { + reg_mem = (mlan_ds_reg_mem *)pioctl_buf->pbuf; + mem_rw = ®_mem->param.mem_rw; + + mem_rw->addr = wlan_le32_to_cpu(mem->addr); + mem_rw->value = wlan_le32_to_cpu(mem->value); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** +* +* @brief This function handles coex events generated by firmware +* +* @param priv A pointer to mlan_private structure +* @param pevent A pointer to event buf +* +* @return N/A +*/ +void +wlan_bt_coex_wlan_param_update_event(pmlan_private priv, pmlan_buffer pevent) +{ + pmlan_adapter pmadapter = priv->adapter; + MrvlIEtypesHeader_t *tlv = MNULL; + MrvlIETypes_BtCoexAggrWinSize_t *pCoexWinsize = MNULL; + MrvlIEtypes_BtCoexScanTime_t *pScantlv = MNULL; + t_s32 len = pevent->data_len - sizeof(t_u32); + t_u8 *pCurrent_ptr = pevent->pbuf + pevent->data_offset + sizeof(t_u32); + t_u16 tlv_type, tlv_len; + + ENTER(); + + while (len >= sizeof(MrvlIEtypesHeader_t)) { + tlv = (MrvlIEtypesHeader_t *)pCurrent_ptr; + tlv_len = wlan_le16_to_cpu(tlv->len); + tlv_type = wlan_le16_to_cpu(tlv->type); + if ((tlv_len + sizeof(MrvlIEtypesHeader_t)) > len) + break; + switch (tlv_type) { + case TLV_BTCOEX_WL_AGGR_WINSIZE: + pCoexWinsize = (MrvlIETypes_BtCoexAggrWinSize_t *) tlv; + pmadapter->coex_win_size = pCoexWinsize->coex_win_size; + pmadapter->coex_tx_win_size = pCoexWinsize->tx_win_size; + pmadapter->coex_rx_win_size = pCoexWinsize->rx_win_size; + wlan_coex_ampdu_rxwinsize(pmadapter); + wlan_update_ampdu_txwinsize(pmadapter); + break; + case TLV_BTCOEX_WL_SCANTIME: + pScantlv = (MrvlIEtypes_BtCoexScanTime_t *) tlv; + pmadapter->coex_scan = pScantlv->coex_scan; + pmadapter->coex_min_scan_time = pScantlv->min_scan_time; + pmadapter->coex_max_scan_time = pScantlv->max_scan_time; + break; + default: + break; + } + len -= tlv_len + sizeof(MrvlIEtypesHeader_t); + pCurrent_ptr += tlv_len + sizeof(MrvlIEtypesHeader_t); + } + PRINTM(MEVENT, + "coex_scan=%d min_scan=%d coex_win=%d, tx_win=%d rx_win=%d\n", + pmadapter->coex_scan, pmadapter->coex_min_scan_time, + pmadapter->coex_win_size, pmadapter->coex_tx_win_size, + pmadapter->coex_rx_win_size); + + LEAVE(); +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_decl.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_decl.h new file mode 100644 index 00000000..fa2eb3c5 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_decl.h @@ -0,0 +1,1230 @@ +/** @file mlan_decl.h + * + * @brief This file declares the generic data structures and APIs. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 11/07/2008: initial version +******************************************************/ + +#ifndef _MLAN_DECL_H_ +#define _MLAN_DECL_H_ + +/** MLAN release version */ +#define MLAN_RELEASE_VERSION "C098.p1.r1" + +/** Re-define generic data types for MLAN/MOAL */ +/** Signed char (1-byte) */ +typedef signed char t_s8; +/** Unsigned char (1-byte) */ +typedef unsigned char t_u8; +/** Signed short (2-bytes) */ +typedef short t_s16; +/** Unsigned short (2-bytes) */ +typedef unsigned short t_u16; +/** Signed long (4-bytes) */ +typedef int t_s32; +/** Unsigned long (4-bytes) */ +typedef unsigned int t_u32; +/** Signed long long 8-bytes) */ +typedef long long t_s64; +/** Unsigned long long 8-bytes) */ +typedef unsigned long long t_u64; +/** Void pointer (4-bytes) */ +typedef void t_void; +/** Size type */ +typedef t_u32 t_size; +/** Boolean type */ +typedef t_u8 t_bool; + +#ifdef MLAN_64BIT +/** Pointer type (64-bit) */ +typedef t_u64 t_ptr; +/** Signed value (64-bit) */ +typedef t_s64 t_sval; +#else +/** Pointer type (32-bit) */ +typedef t_u32 t_ptr; +/** Signed value (32-bit) */ +typedef t_s32 t_sval; +#endif + +/** Constants below */ + +#ifdef __GNUC__ +/** Structure packing begins */ +#define MLAN_PACK_START +/** Structure packeing end */ +#define MLAN_PACK_END __attribute__((packed)) +#else /* !__GNUC__ */ +#ifdef PRAGMA_PACK +/** Structure packing begins */ +#define MLAN_PACK_START +/** Structure packeing end */ +#define MLAN_PACK_END +#else /* !PRAGMA_PACK */ +/** Structure packing begins */ +#define MLAN_PACK_START __packed +/** Structure packing end */ +#define MLAN_PACK_END +#endif /* PRAGMA_PACK */ +#endif /* __GNUC__ */ + +#ifndef INLINE +#ifdef __GNUC__ +/** inline directive */ +#define INLINE inline +#else +/** inline directive */ +#define INLINE __inline +#endif +#endif + +/** MLAN TRUE */ +#define MTRUE (1) +/** MLAN FALSE */ +#define MFALSE (0) + +#ifndef MACSTR +/** MAC address security format */ +#define MACSTR "%02x:XX:XX:XX:%02x:%02x" +#endif + +#ifndef MAC2STR +/** MAC address security print arguments */ +#define MAC2STR(a) (a)[0], (a)[4], (a)[5] +#endif + +/** Macros for Data Alignment : size */ +#define ALIGN_SZ(p, a) \ + (((p) + ((a) - 1)) & ~((a) - 1)) + +/** Macros for Data Alignment : address */ +#define ALIGN_ADDR(p, a) \ + ((((t_ptr)(p)) + (((t_ptr)(a)) - 1)) & ~(((t_ptr)(a)) - 1)) + +/** Return the byte offset of a field in the given structure */ +#define MLAN_FIELD_OFFSET(type, field) ((t_u32)(t_ptr)&(((type *)0)->field)) +/** Return aligned offset */ +#define OFFSET_ALIGN_ADDR(p, a) (t_u32)(ALIGN_ADDR(p, a) - (t_ptr)p) + +/** Maximum BSS numbers */ +#define MLAN_MAX_BSS_NUM (16) + +/** NET IP alignment */ +#define MLAN_NET_IP_ALIGN 0 + +/** DMA alignment */ +/* SDIO3.0 Inrevium Adapter require 32 bit DMA alignment */ +#define DMA_ALIGNMENT 32 + +/** max size of TxPD */ +#define MAX_TXPD_SIZE 32 + +/** Minimum data header length */ +#define MLAN_MIN_DATA_HEADER_LEN (DMA_ALIGNMENT+MAX_TXPD_SIZE) + +/** rx data header length */ +#define MLAN_RX_HEADER_LEN MLAN_MIN_DATA_HEADER_LEN + +/** This is current limit on Maximum Tx AMPDU allowed */ +#define MLAN_MAX_TX_BASTREAM_SUPPORTED 16 +#define MLAN_MAX_TX_BASTREAM_DEFAULT 2 +#define MLAN_MAX_TX_BASTREAM_SUPPORTED_NOV15 2 +/** This is current limit on Maximum Rx AMPDU allowed */ +#define MLAN_MAX_RX_BASTREAM_SUPPORTED 16 + +/** station ampdu tx win size */ +#define MLAN_STA_AMPDU_DEF_TXWINSIZE_NOV15 32 +/** uap ampdu tx win size */ +#define MLAN_UAP_AMPDU_DEF_TXWINSIZE_NOV15 32 +/** uap ampdu rx win size */ +#define MLAN_UAP_AMPDU_DEF_RXWINSIZE_NOV15 32 +/** wfd ampdu tx/rx win size */ +#define MLAN_WFD_AMPDU_DEF_TXRXWINSIZE_NOV15 32 + +#ifdef STA_SUPPORT +/** Default Win size attached during ADDBA request */ +#define MLAN_STA_AMPDU_DEF_TXWINSIZE 64 +/** Default Win size attached during ADDBA response */ +#define MLAN_STA_AMPDU_DEF_RXWINSIZE 64 +/** RX winsize for COEX */ +#define MLAN_STA_COEX_AMPDU_DEF_RXWINSIZE 16 +#endif /* STA_SUPPORT */ +#ifdef UAP_SUPPORT +/** Default Win size attached during ADDBA request */ +#define MLAN_UAP_AMPDU_DEF_TXWINSIZE 48 +/** Default Win size attached during ADDBA response */ +#define MLAN_UAP_AMPDU_DEF_RXWINSIZE 32 +/** RX winsize for COEX */ +#define MLAN_UAP_COEX_AMPDU_DEF_RXWINSIZE 16 +#endif /* UAP_SUPPORT */ + +#ifdef WIFI_DIRECT_SUPPORT +/** WFD use the same window size for tx/rx */ +#define MLAN_WFD_AMPDU_DEF_TXRXWINSIZE 64 +/** RX winsize for COEX */ +#define MLAN_WFD_COEX_AMPDU_DEF_RXWINSIZE 16 +#endif +/** Block ack timeout value */ +#define MLAN_DEFAULT_BLOCK_ACK_TIMEOUT 0xffff +/** Maximum Tx Win size configured for ADDBA request [10 bits] */ +#define MLAN_AMPDU_MAX_TXWINSIZE 0x3ff +/** Maximum Rx Win size configured for ADDBA request [10 bits] */ +#define MLAN_AMPDU_MAX_RXWINSIZE 0x3ff + +/** Rate index for HR/DSSS 0 */ +#define MLAN_RATE_INDEX_HRDSSS0 0 +/** Rate index for HR/DSSS 3 */ +#define MLAN_RATE_INDEX_HRDSSS3 3 +/** Rate index for OFDM 0 */ +#define MLAN_RATE_INDEX_OFDM0 4 +/** Rate index for OFDM 7 */ +#define MLAN_RATE_INDEX_OFDM7 11 +/** Rate index for MCS 0 */ +#define MLAN_RATE_INDEX_MCS0 0 +/** Rate index for MCS 7 */ +#define MLAN_RATE_INDEX_MCS7 7 +/** Rate index for MCS 9 */ +#define MLAN_RATE_INDEX_MCS9 9 +/** Rate index for MCS15 */ +#define MLAN_RATE_INDEX_MCS15 15 +/** Rate index for MCS 32 */ +#define MLAN_RATE_INDEX_MCS32 32 +/** Rate index for MCS 127 */ +#define MLAN_RATE_INDEX_MCS127 127 +#define MLAN_RATE_NSS1 1 +#define MLAN_RATE_NSS2 2 + +/** Rate bitmap for OFDM 0 */ +#define MLAN_RATE_BITMAP_OFDM0 16 +/** Rate bitmap for OFDM 7 */ +#define MLAN_RATE_BITMAP_OFDM7 23 +/** Rate bitmap for MCS 0 */ +#define MLAN_RATE_BITMAP_MCS0 32 +/** Rate bitmap for MCS 127 */ +#define MLAN_RATE_BITMAP_MCS127 159 +#define MLAN_RATE_BITMAP_NSS1_MCS0 160 +#define MLAN_RATE_BITMAP_NSS1_MCS9 169 +#define MLAN_RATE_BITMAP_NSS2_MCS0 176 +#define MLAN_RATE_BITMAP_NSS2_MCS9 185 + +/** Size of rx data buffer */ +#define MLAN_RX_DATA_BUF_SIZE (4 * 1024) +/** Size of rx command buffer */ +#define MLAN_RX_CMD_BUF_SIZE (2 * 1024) + +#define MLAN_USB_RX_DATA_BUF_SIZE MLAN_RX_DATA_BUF_SIZE + +/** MLAN MAC Address Length */ +#define MLAN_MAC_ADDR_LENGTH (6) +/** MLAN 802.11 MAC Address */ +typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH]; + +/** MLAN Maximum SSID Length */ +#define MLAN_MAX_SSID_LENGTH (32) + +/** RTS/FRAG related defines */ +/** Minimum RTS value */ +#define MLAN_RTS_MIN_VALUE (0) +/** Maximum RTS value */ +#define MLAN_RTS_MAX_VALUE (2347) +/** Minimum FRAG value */ +#define MLAN_FRAG_MIN_VALUE (256) +/** Maximum FRAG value */ +#define MLAN_FRAG_MAX_VALUE (2346) + +/** Minimum tx retry count */ +#define MLAN_TX_RETRY_MIN (0) +/** Maximum tx retry count */ +#define MLAN_TX_RETRY_MAX (14) + +/** define SDIO block size for data Tx/Rx */ +/* We support up to 480-byte block size due to FW buffer limitation. */ +#define MLAN_SDIO_BLOCK_SIZE 256 + +/** define SDIO block size for firmware download */ +#define MLAN_SDIO_BLOCK_SIZE_FW_DNLD MLAN_SDIO_BLOCK_SIZE + +/** define allocated buffer size */ +#define ALLOC_BUF_SIZE (4 * 1024) +/** SDIO MP aggr pkt limit */ +#define SDIO_MP_AGGR_DEF_PKT_LIMIT (16) +/** SDIO MP aggr pkt limit 8 */ +#define SDIO_MP_AGGR_DEF_PKT_LIMIT_8 (8) +/** SDIO MP aggr pkt limit 16*/ +#define SDIO_MP_AGGR_DEF_PKT_LIMIT_16 (16) +/** max SDIO MP aggr pkt limit */ +#define SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX (16) + +/** SDIO IO Port mask */ +#define MLAN_SDIO_IO_PORT_MASK 0xfffff +/** SDIO Block/Byte mode mask */ +#define MLAN_SDIO_BYTE_MODE_MASK 0x80000000 + +/** Max retry number of IO write */ +#define MAX_WRITE_IOMEM_RETRY 2 + +/** IN parameter */ +#define IN +/** OUT parameter */ +#define OUT + +/** BIT value */ +#define MBIT(x) (((t_u32)1) << (x)) + +/** Buffer flag for requeued packet */ +#define MLAN_BUF_FLAG_REQUEUED_PKT MBIT(0) +/** Buffer flag for transmit buf from moal */ +#define MLAN_BUF_FLAG_MOAL_TX_BUF MBIT(1) +/** Buffer flag for malloc mlan_buffer */ +#define MLAN_BUF_FLAG_MALLOC_BUF MBIT(2) + +/** Buffer flag for bridge packet */ +#define MLAN_BUF_FLAG_BRIDGE_BUF MBIT(3) + +/** Buffer flag for TDLS */ +#define MLAN_BUF_FLAG_TDLS MBIT(8) + +/** Buffer flag for TCP_ACK */ +#define MLAN_BUF_FLAG_TCP_ACK MBIT(9) + +/** Buffer flag for TX_STATUS */ +#define MLAN_BUF_FLAG_TX_STATUS MBIT(10) + +#ifdef DEBUG_LEVEL1 +/** Debug level bit definition */ +#define MMSG MBIT(0) +#define MFATAL MBIT(1) +#define MERROR MBIT(2) +#define MDATA MBIT(3) +#define MCMND MBIT(4) +#define MEVENT MBIT(5) +#define MINTR MBIT(6) +#define MIOCTL MBIT(7) + +#define MMPA_D MBIT(15) +#define MDAT_D MBIT(16) +#define MCMD_D MBIT(17) +#define MEVT_D MBIT(18) +#define MFW_D MBIT(19) +#define MIF_D MBIT(20) + +#define MENTRY MBIT(28) +#define MWARN MBIT(29) +#define MINFO MBIT(30) +#define MHEX_DUMP MBIT(31) +#endif /* DEBUG_LEVEL1 */ + +/** Memory allocation type: DMA */ +#define MLAN_MEM_DMA MBIT(0) + +/** Default memory allocation flag */ +#define MLAN_MEM_DEF 0 + +/** mlan_status */ +typedef enum _mlan_status { + MLAN_STATUS_FAILURE = 0xffffffff, + MLAN_STATUS_SUCCESS = 0, + MLAN_STATUS_PENDING, + MLAN_STATUS_RESOURCE, + MLAN_STATUS_COMPLETE, +} mlan_status; + +/** mlan_error_code */ +typedef enum _mlan_error_code { + /** No error */ + MLAN_ERROR_NO_ERROR = 0, + /** Firmware/device errors below (MSB=0) */ + MLAN_ERROR_FW_NOT_READY = 0x00000001, + MLAN_ERROR_FW_BUSY = 0x00000002, + MLAN_ERROR_FW_CMDRESP = 0x00000003, + MLAN_ERROR_DATA_TX_FAIL = 0x00000004, + MLAN_ERROR_DATA_RX_FAIL = 0x00000005, + /** Driver errors below (MSB=1) */ + MLAN_ERROR_PKT_SIZE_INVALID = 0x80000001, + MLAN_ERROR_PKT_TIMEOUT = 0x80000002, + MLAN_ERROR_PKT_INVALID = 0x80000003, + MLAN_ERROR_CMD_INVALID = 0x80000004, + MLAN_ERROR_CMD_TIMEOUT = 0x80000005, + MLAN_ERROR_CMD_DNLD_FAIL = 0x80000006, + MLAN_ERROR_CMD_CANCEL = 0x80000007, + MLAN_ERROR_CMD_RESP_FAIL = 0x80000008, + MLAN_ERROR_CMD_ASSOC_FAIL = 0x80000009, + MLAN_ERROR_CMD_SCAN_FAIL = 0x8000000A, + MLAN_ERROR_IOCTL_INVALID = 0x8000000B, + MLAN_ERROR_IOCTL_FAIL = 0x8000000C, + MLAN_ERROR_EVENT_UNKNOWN = 0x8000000D, + MLAN_ERROR_INVALID_PARAMETER = 0x8000000E, + MLAN_ERROR_NO_MEM = 0x8000000F, + /** More to add */ +} mlan_error_code; + +/** mlan_buf_type */ +typedef enum _mlan_buf_type { + MLAN_BUF_TYPE_CMD = 1, + MLAN_BUF_TYPE_DATA, + MLAN_BUF_TYPE_EVENT, + MLAN_BUF_TYPE_RAW_DATA, +} mlan_buf_type; + +/** MLAN BSS type */ +typedef enum _mlan_bss_type { + MLAN_BSS_TYPE_STA = 0, + MLAN_BSS_TYPE_UAP = 1, +#ifdef WIFI_DIRECT_SUPPORT + MLAN_BSS_TYPE_WIFIDIRECT = 2, +#endif + MLAN_BSS_TYPE_ANY = 0xff, +} mlan_bss_type; + +/** MLAN BSS role */ +typedef enum _mlan_bss_role { + MLAN_BSS_ROLE_STA = 0, + MLAN_BSS_ROLE_UAP = 1, + MLAN_BSS_ROLE_ANY = 0xff, +} mlan_bss_role; + +/** BSS role bit mask */ +#define BSS_ROLE_BIT_MASK MBIT(0) + +/** Get BSS role */ +#define GET_BSS_ROLE(priv) ((priv)->bss_role & BSS_ROLE_BIT_MASK) + +/** mlan_data_frame_type */ +typedef enum _mlan_data_frame_type { + MLAN_DATA_FRAME_TYPE_ETH_II = 0, + MLAN_DATA_FRAME_TYPE_802_11, +} mlan_data_frame_type; + +/** mlan_event_id */ +typedef enum _mlan_event_id { + /* Event generated by firmware (MSB=0) */ + MLAN_EVENT_ID_FW_UNKNOWN = 0x00000001, + MLAN_EVENT_ID_FW_ADHOC_LINK_SENSED = 0x00000002, + MLAN_EVENT_ID_FW_ADHOC_LINK_LOST = 0x00000003, + MLAN_EVENT_ID_FW_DISCONNECTED = 0x00000004, + MLAN_EVENT_ID_FW_MIC_ERR_UNI = 0x00000005, + MLAN_EVENT_ID_FW_MIC_ERR_MUL = 0x00000006, + MLAN_EVENT_ID_FW_BCN_RSSI_LOW = 0x00000007, + MLAN_EVENT_ID_FW_BCN_RSSI_HIGH = 0x00000008, + MLAN_EVENT_ID_FW_BCN_SNR_LOW = 0x00000009, + MLAN_EVENT_ID_FW_BCN_SNR_HIGH = 0x0000000A, + MLAN_EVENT_ID_FW_MAX_FAIL = 0x0000000B, + MLAN_EVENT_ID_FW_DATA_RSSI_LOW = 0x0000000C, + MLAN_EVENT_ID_FW_DATA_RSSI_HIGH = 0x0000000D, + MLAN_EVENT_ID_FW_DATA_SNR_LOW = 0x0000000E, + MLAN_EVENT_ID_FW_DATA_SNR_HIGH = 0x0000000F, + MLAN_EVENT_ID_FW_LINK_QUALITY = 0x00000010, + MLAN_EVENT_ID_FW_PORT_RELEASE = 0x00000011, + MLAN_EVENT_ID_FW_PRE_BCN_LOST = 0x00000012, + MLAN_EVENT_ID_FW_DEBUG_INFO = 0x00000013, + MLAN_EVENT_ID_FW_WMM_CONFIG_CHANGE = 0x0000001A, + MLAN_EVENT_ID_FW_HS_WAKEUP = 0x0000001B, + MLAN_EVENT_ID_FW_BG_SCAN = 0x0000001D, + MLAN_EVENT_ID_FW_BG_SCAN_STOPPED = 0x0000001E, + MLAN_EVENT_ID_FW_WEP_ICV_ERR = 0x00000020, + MLAN_EVENT_ID_FW_STOP_TX = 0x00000021, + MLAN_EVENT_ID_FW_START_TX = 0x00000022, + MLAN_EVENT_ID_FW_CHANNEL_SWITCH_ANN = 0x00000023, + MLAN_EVENT_ID_FW_RADAR_DETECTED = 0x00000024, + MLAN_EVENT_ID_FW_CHANNEL_REPORT_RDY = 0x00000025, + MLAN_EVENT_ID_FW_BW_CHANGED = 0x00000026, +#ifdef WIFI_DIRECT_SUPPORT + MLAN_EVENT_ID_FW_REMAIN_ON_CHAN_EXPIRED = 0x0000002B, +#endif +#ifdef UAP_SUPPORT + MLAN_EVENT_ID_UAP_FW_BSS_START = 0x0000002C, + MLAN_EVENT_ID_UAP_FW_BSS_ACTIVE = 0x0000002D, + MLAN_EVENT_ID_UAP_FW_BSS_IDLE = 0x0000002E, + MLAN_EVENT_ID_UAP_FW_MIC_COUNTERMEASURES = 0x0000002F, + MLAN_EVENT_ID_UAP_FW_STA_CONNECT = 0x00000030, + MLAN_EVENT_ID_UAP_FW_STA_DISCONNECT = 0x00000031, +#endif + + MLAN_EVENT_ID_FW_DUMP_INFO = 0x00000033, + + MLAN_EVENT_ID_FW_TX_STATUS = 0x00000034, + /* Event generated by MLAN driver (MSB=1) */ + MLAN_EVENT_ID_DRV_CONNECTED = 0x80000001, + MLAN_EVENT_ID_DRV_DEFER_HANDLING = 0x80000002, + MLAN_EVENT_ID_DRV_HS_ACTIVATED = 0x80000003, + MLAN_EVENT_ID_DRV_HS_DEACTIVATED = 0x80000004, + MLAN_EVENT_ID_DRV_MGMT_FRAME = 0x80000005, + MLAN_EVENT_ID_DRV_OBSS_SCAN_PARAM = 0x80000006, + MLAN_EVENT_ID_DRV_PASSTHRU = 0x80000007, + MLAN_EVENT_ID_DRV_SCAN_REPORT = 0x80000009, + MLAN_EVENT_ID_DRV_MEAS_REPORT = 0x8000000A, + MLAN_EVENT_ID_DRV_ASSOC_FAILURE_REPORT = 0x8000000B, + MLAN_EVENT_ID_DRV_REPORT_STRING = 0x8000000F, + MLAN_EVENT_ID_DRV_DBG_DUMP = 0x80000012, + MLAN_EVENT_ID_DRV_BGSCAN_RESULT = 0x80000013, + MLAN_EVENT_ID_DRV_FLUSH_RX_WORK = 0x80000015, + MLAN_EVENT_ID_DRV_DEFER_RX_WORK = 0x80000016, + MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ = 0x80000017, + MLAN_EVENT_ID_DRV_FT_RESPONSE = 0x80000018, + MLAN_EVENT_ID_DRV_FLUSH_MAIN_WORK = 0x80000019, +} mlan_event_id; + +/** Data Structures */ +/** mlan_image data structure */ +typedef struct _mlan_fw_image { + /** Helper image buffer pointer */ + t_u8 *phelper_buf; + /** Helper image length */ + t_u32 helper_len; + /** Firmware image buffer pointer */ + t_u8 *pfw_buf; + /** Firmware image length */ + t_u32 fw_len; +} mlan_fw_image, *pmlan_fw_image; + +/** Custom data structure */ +typedef struct _mlan_init_param { + /** Cal data buffer pointer */ + t_u8 *pcal_data_buf; + /** Cal data length */ + t_u32 cal_data_len; + /** Other custom data */ +} mlan_init_param, *pmlan_init_param; + +/** mlan_event data structure */ +typedef struct _mlan_event { + /** BSS index number for multiple BSS support */ + t_u32 bss_index; + /** Event ID */ + mlan_event_id event_id; + /** Event length */ + t_u32 event_len; + /** Event buffer */ + t_u8 event_buf[1]; +} mlan_event, *pmlan_event; + +/** mlan_event_scan_result data structure */ +typedef MLAN_PACK_START struct _mlan_event_scan_result { + /** Event ID */ + t_u16 event_id; + /** BSS index number for multiple BSS support */ + t_u8 bss_index; + /** BSS type */ + t_u8 bss_type; + /** More event available or not */ + t_u8 more_event; + /** Reserved */ + t_u8 reserved[3]; + /** Size of the response buffer */ + t_u16 buf_size; + /** Number of BSS in scan response */ + t_u8 num_of_set; +} MLAN_PACK_END mlan_event_scan_result, *pmlan_event_scan_result; + +/** mlan_ioctl_req data structure */ +typedef struct _mlan_ioctl_req { + /** Status code from firmware/driver */ + t_u32 status_code; + /** BSS index number for multiple BSS support */ + t_u32 bss_index; + /** Request id */ + t_u32 req_id; + /** Action: set or get */ + t_u32 action; + /** Pointer to buffer */ + t_u8 *pbuf; + /** Length of buffer */ + t_u32 buf_len; + /** Length of the data read/written in buffer */ + t_u32 data_read_written; + /** Length of buffer needed */ + t_u32 buf_len_needed; + /** Reserved for MOAL module */ + t_ptr reserved_1; +} mlan_ioctl_req, *pmlan_ioctl_req; + +/** mlan_buffer data structure */ +typedef struct _mlan_buffer { + /** Pointer to previous mlan_buffer */ + struct _mlan_buffer *pprev; + /** Pointer to next mlan_buffer */ + struct _mlan_buffer *pnext; + /** Status code from firmware/driver */ + t_u32 status_code; + /** Flags for this buffer */ + t_u32 flags; + /** BSS index number for multiple BSS support */ + t_u32 bss_index; + /** Buffer descriptor, e.g. skb in Linux */ + t_void *pdesc; + /** Pointer to buffer */ + t_u8 *pbuf; + /** Offset to data */ + t_u32 data_offset; + /** Data length */ + t_u32 data_len; + /** Buffer type: data, cmd, event etc. */ + mlan_buf_type buf_type; + + /** Fields below are valid for data packet only */ + /** QoS priority */ + t_u32 priority; + /** Time stamp when packet is received (seconds) */ + t_u32 in_ts_sec; + /** Time stamp when packet is received (micro seconds) */ + t_u32 in_ts_usec; + /** Time stamp when packet is processed (seconds) */ + t_u32 out_ts_sec; + /** Time stamp when packet is processed (micro seconds) */ + t_u32 out_ts_usec; + /** tx_seq_num */ + t_u32 tx_seq_num; + + /** Fields below are valid for MLAN module only */ + /** Pointer to parent mlan_buffer */ + struct _mlan_buffer *pparent; + /** Use count for this buffer */ + t_u32 use_count; +} mlan_buffer, *pmlan_buffer; + +/** mlan_bss_attr data structure */ +typedef struct _mlan_bss_attr { + /** BSS type */ + t_u32 bss_type; + /** Data frame type: Ethernet II, 802.11, etc. */ + t_u32 frame_type; + /** The BSS is active (non-0) or not (0). */ + t_u32 active; + /** BSS Priority */ + t_u32 bss_priority; + /** BSS number */ + t_u32 bss_num; + /** The BSS is virtual */ + t_u32 bss_virtual; +} mlan_bss_attr, *pmlan_bss_attr; + +#ifdef PRAGMA_PACK +#pragma pack(push, 1) +#endif + +/** Type enumeration for the command result */ +typedef MLAN_PACK_START enum _mlan_cmd_result_e { + MLAN_CMD_RESULT_SUCCESS = 0, + MLAN_CMD_RESULT_FAILURE = 1, + MLAN_CMD_RESULT_TIMEOUT = 2, + MLAN_CMD_RESULT_INVALID_DATA = 3 +} MLAN_PACK_END mlan_cmd_result_e; + +/** Type enumeration of WMM AC_QUEUES */ +typedef MLAN_PACK_START enum _mlan_wmm_ac_e { + WMM_AC_BK, + WMM_AC_BE, + WMM_AC_VI, + WMM_AC_VO +} MLAN_PACK_END mlan_wmm_ac_e; + +/** Type enumeration for the action field in the Queue Config command */ +typedef MLAN_PACK_START enum _mlan_wmm_queue_config_action_e { + MLAN_WMM_QUEUE_CONFIG_ACTION_GET = 0, + MLAN_WMM_QUEUE_CONFIG_ACTION_SET = 1, + MLAN_WMM_QUEUE_CONFIG_ACTION_DEFAULT = 2, + MLAN_WMM_QUEUE_CONFIG_ACTION_MAX +} MLAN_PACK_END mlan_wmm_queue_config_action_e; + +/** Type enumeration for the action field in the queue stats command */ +typedef MLAN_PACK_START enum _mlan_wmm_queue_stats_action_e { + MLAN_WMM_STATS_ACTION_START = 0, + MLAN_WMM_STATS_ACTION_STOP = 1, + MLAN_WMM_STATS_ACTION_GET_CLR = 2, + MLAN_WMM_STATS_ACTION_SET_CFG = 3, /* Not currently used */ + MLAN_WMM_STATS_ACTION_GET_CFG = 4, /* Not currently used */ + MLAN_WMM_STATS_ACTION_MAX +} MLAN_PACK_END mlan_wmm_queue_stats_action_e; + +/** + * @brief IOCTL structure for a Traffic stream status. + * + */ +typedef MLAN_PACK_START struct { + /** TSID: Range: 0->7 */ + t_u8 tid; + /** TSID specified is valid */ + t_u8 valid; + /** AC TSID is active on */ + t_u8 access_category; + /** UP specified for the TSID */ + t_u8 user_priority; + /** Power save mode for TSID: 0 (legacy), 1 (UAPSD) */ + t_u8 psb; + /** Upstream(0), Downlink(1), Bidirectional(3) */ + t_u8 flow_dir; + /** Medium time granted for the TSID */ + t_u16 medium_time; +} MLAN_PACK_END wlan_ioctl_wmm_ts_status_t, +/** Type definition of mlan_ds_wmm_ts_status for MLAN_OID_WMM_CFG_TS_STATUS */ +mlan_ds_wmm_ts_status, *pmlan_ds_wmm_ts_status; + +/** Max Ie length */ +#define MAX_IE_SIZE 256 + +/** custom IE */ +typedef MLAN_PACK_START struct _custom_ie { + /** IE Index */ + t_u16 ie_index; + /** Mgmt Subtype Mask */ + t_u16 mgmt_subtype_mask; + /** IE Length */ + t_u16 ie_length; + /** IE buffer */ + t_u8 ie_buffer[MAX_IE_SIZE]; +} MLAN_PACK_END custom_ie; + +/** Max IE index to FW */ +#define MAX_MGMT_IE_INDEX_TO_FW 4 +/** Max IE index per BSS */ +#define MAX_MGMT_IE_INDEX 16 + +/** custom IE info */ +typedef MLAN_PACK_START struct _custom_ie_info { + /** size of buffer */ + t_u16 buf_size; + /** no of buffers of buf_size */ + t_u16 buf_count; +} MLAN_PACK_END custom_ie_info; + +/** TLV buffer : Max Mgmt IE */ +typedef MLAN_PACK_START struct _tlvbuf_max_mgmt_ie { + /** Type */ + t_u16 type; + /** Length */ + t_u16 len; + /** No of tuples */ + t_u16 count; + /** custom IE info tuples */ + custom_ie_info info[MAX_MGMT_IE_INDEX]; +} MLAN_PACK_END tlvbuf_max_mgmt_ie; + +/** TLV buffer : custom IE */ +typedef MLAN_PACK_START struct _tlvbuf_custom_ie { + /** Type */ + t_u16 type; + /** Length */ + t_u16 len; + /** IE data */ + custom_ie ie_data_list[MAX_MGMT_IE_INDEX_TO_FW]; + /** Max mgmt IE TLV */ + tlvbuf_max_mgmt_ie max_mgmt_ie; +} MLAN_PACK_END mlan_ds_misc_custom_ie; + +/** Max TDLS config data length */ +#define MAX_TDLS_DATA_LEN 1024 + +/** Action commands for TDLS enable/disable */ +#define WLAN_TDLS_CONFIG 0x00 +/** Action commands for TDLS configuration :Set */ +#define WLAN_TDLS_SET_INFO 0x01 +/** Action commands for TDLS configuration :Discovery Request */ +#define WLAN_TDLS_DISCOVERY_REQ 0x02 +/** Action commands for TDLS configuration :Setup Request */ +#define WLAN_TDLS_SETUP_REQ 0x03 +/** Action commands for TDLS configuration :Tear down Request */ +#define WLAN_TDLS_TEAR_DOWN_REQ 0x04 +/** Action ID for TDLS power mode */ +#define WLAN_TDLS_POWER_MODE 0x05 +/**Action ID for init TDLS Channel Switch*/ +#define WLAN_TDLS_INIT_CHAN_SWITCH 0x06 +/** Action ID for stop TDLS Channel Switch */ +#define WLAN_TDLS_STOP_CHAN_SWITCH 0x07 +/** Action ID for configure CS related parameters */ +#define WLAN_TDLS_CS_PARAMS 0x08 +/** Action ID for Disable CS */ +#define WLAN_TDLS_CS_DISABLE 0x09 +/** Action ID for TDLS link status */ +#define WLAN_TDLS_LINK_STATUS 0x0A +/** Action ID for TDLS CS immediate return */ +#define WLAN_TDLS_DEBUG_CS_RET_IM 0xFFF7 +/** Action ID for TDLS Stop RX */ +#define WLAN_TDLS_DEBUG_STOP_RX 0xFFF8 +/** Action ID for TDLS Allow weak security for links establish */ +#define WLAN_TDLS_DEBUG_ALLOW_WEAK_SECURITY 0xFFF9 +/** Action ID for TDLS Ignore key lifetime expiry */ +#define WLAN_TDLS_DEBUG_IGNORE_KEY_EXPIRY 0xFFFA +/** Action ID for TDLS Higher/Lower mac Test */ +#define WLAN_TDLS_DEBUG_HIGHER_LOWER_MAC 0xFFFB +/** Action ID for TDLS Prohibited Test */ +#define WLAN_TDLS_DEBUG_SETUP_PROHIBITED 0xFFFC +/** Action ID for TDLS Existing link Test */ +#define WLAN_TDLS_DEBUG_SETUP_SAME_LINK 0xFFFD +/** Action ID for TDLS Fail Setup Confirm */ +#define WLAN_TDLS_DEBUG_FAIL_SETUP_CONFIRM 0xFFFE +/** Action commands for TDLS debug: Wrong BSS Request */ +#define WLAN_TDLS_DEBUG_WRONG_BSS 0xFFFF + +/** tdls each link rate information */ +typedef MLAN_PACK_START struct _tdls_link_rate_info { + /** Tx Data Rate */ + t_u8 tx_data_rate; + /** Tx Rate HT info*/ + t_u8 tx_rate_htinfo; +} MLAN_PACK_END tdls_link_rate_info; + +/** tdls each link status */ +typedef MLAN_PACK_START struct _tdls_each_link_status { + /** peer mac Address */ + t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; + /** Link Flags */ + t_u8 link_flags; + /** Traffic Status */ + t_u8 traffic_status; + /** Tx Failure Count */ + t_u8 tx_fail_count; + /** Channel Number */ + t_u32 active_channel; + /** Last Data RSSI in dBm */ + t_s16 data_rssi_last; + /** Last Data NF in dBm */ + t_s16 data_nf_last; + /** AVG DATA RSSI in dBm */ + t_s16 data_rssi_avg; + /** AVG DATA NF in dBm */ + t_s16 data_nf_avg; + union { + /** tdls rate info */ + tdls_link_rate_info rate_info; + /** tdls link final rate*/ + t_u16 final_data_rate; + } u; + /** Security Method */ + t_u8 security_method; + /** Key Lifetime in milliseconds */ + t_u32 key_lifetime; + /** Key Length */ + t_u8 key_length; + /** actual key */ + t_u8 key[0]; +} MLAN_PACK_END tdls_each_link_status; + +/** TDLS configuration data */ +typedef MLAN_PACK_START struct _tdls_all_config { + union { + /** TDLS state enable disable */ + MLAN_PACK_START struct _tdls_config { + /** enable or disable */ + t_u16 enable; + } MLAN_PACK_END tdls_config; + /** TDLS set info */ + MLAN_PACK_START struct _tdls_set_data { + /** (tlv + capInfo) length */ + t_u16 tlv_length; + /** Cap Info */ + t_u16 cap_info; + /** TLV buffer */ + t_u8 tlv_buffer[0]; + } MLAN_PACK_END tdls_set; + + /** TDLS discovery and others having mac argument */ + MLAN_PACK_START struct _tdls_discovery_data { + /** peer mac Address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + } MLAN_PACK_END tdls_discovery, tdls_stop_chan_switch, + tdls_link_status_req; + + /** TDLS discovery Response */ + MLAN_PACK_START struct _tdls_discovery_resp { + /** payload length */ + t_u16 payload_len; + /** peer mac Address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** RSSI */ + t_s8 rssi; + /** Cap Info */ + t_u16 cap_info; + /** TLV buffer */ + t_u8 tlv_buffer[0]; + } MLAN_PACK_END tdls_discovery_resp; + + /** TDLS setup request */ + MLAN_PACK_START struct _tdls_setup_data { + /** peer mac Address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** timeout value in milliseconds */ + t_u32 setup_timeout; + /** key lifetime in milliseconds */ + t_u32 key_lifetime; + } MLAN_PACK_END tdls_setup; + + /** TDLS tear down info */ + MLAN_PACK_START struct _tdls_tear_down_data { + /** peer mac Address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** reason code */ + t_u16 reason_code; + } MLAN_PACK_END tdls_tear_down, tdls_cmd_resp; + + /** TDLS power mode info */ + MLAN_PACK_START struct _tdls_power_mode_data { + /** peer mac Address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** Power Mode */ + t_u16 power_mode; + } MLAN_PACK_END tdls_power_mode; + + /** TDLS channel switch info */ + MLAN_PACK_START struct _tdls_chan_switch { + /** peer mac Address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** Channel Switch primary channel no */ + t_u8 primary_channel; + /** Channel Switch secondary channel offset */ + t_u8 secondary_channel_offset; + /** Channel Switch Band */ + t_u8 band; + /** Channel Switch time in milliseconds */ + t_u16 switch_time; + /** Channel Switch timeout in milliseconds */ + t_u16 switch_timeout; + /** Channel Regulatory class*/ + t_u8 regulatory_class; + /** peridicity flag*/ + t_u8 periodicity; + } MLAN_PACK_END tdls_chan_switch; + + /** TDLS channel switch paramters */ + MLAN_PACK_START struct _tdls_cs_params { + /** unit time, multiples of 10ms */ + t_u8 unit_time; + /** threshold for other link */ + t_u8 threshold_otherlink; + /** threshold for direct link */ + t_u8 threshold_directlink; + } MLAN_PACK_END tdls_cs_params; + + /** tdls disable channel switch */ + MLAN_PACK_START struct _tdls_disable_cs { + /** Data*/ + t_u16 data; + } MLAN_PACK_END tdls_disable_cs; + /** TDLS debug data */ + MLAN_PACK_START struct _tdls_debug_data { + /** debug data */ + t_u16 debug_data; + } MLAN_PACK_END tdls_debug_data; + + /** TDLS link status Response */ + MLAN_PACK_START struct _tdls_link_status_resp { + /** payload length */ + t_u16 payload_len; + /** number of links */ + t_u8 active_links; + /** structure for link status */ + tdls_each_link_status link_stats[1]; + } MLAN_PACK_END tdls_link_status_resp; + + } u; +} MLAN_PACK_END tdls_all_config; + +/** TDLS configuration buffer */ +typedef MLAN_PACK_START struct _buf_tdls_config { + /** TDLS Action */ + t_u16 tdls_action; + /** TDLS data */ + t_u8 tdls_data[MAX_TDLS_DATA_LEN]; +} MLAN_PACK_END mlan_ds_misc_tdls_config; + +/** Event structure for tear down */ +typedef struct _tdls_tear_down_event { + /** Peer mac address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** Reason code */ + t_u16 reason_code; +} tdls_tear_down_event; + +#ifdef PRAGMA_PACK +#pragma pack(pop) +#endif + +/** mlan_callbacks data structure */ +typedef struct _mlan_callbacks { + /** moal_get_fw_data */ + mlan_status (*moal_get_fw_data) (IN t_void *pmoal_handle, + IN t_u32 offset, + IN t_u32 len, OUT t_u8 *pbuf); + /** moal_init_fw_complete */ + mlan_status (*moal_init_fw_complete) (IN t_void *pmoal_handle, + IN mlan_status status); + /** moal_shutdown_fw_complete */ + mlan_status (*moal_shutdown_fw_complete) (IN t_void *pmoal_handle, + IN mlan_status status); + /** moal_send_packet_complete */ + mlan_status (*moal_send_packet_complete) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf, + IN mlan_status status); + /** moal_recv_complete */ + mlan_status (*moal_recv_complete) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf, + IN t_u32 port, + IN mlan_status status); + /** moal_recv_packet */ + mlan_status (*moal_recv_packet) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf); + /** moal_recv_event */ + mlan_status (*moal_recv_event) (IN t_void *pmoal_handle, + IN pmlan_event pmevent); + /** moal_ioctl_complete */ + mlan_status (*moal_ioctl_complete) (IN t_void *pmoal_handle, + IN pmlan_ioctl_req pioctl_req, + IN mlan_status status); + + /** moal_alloc_mlan_buffer */ + mlan_status (*moal_alloc_mlan_buffer) (IN t_void *pmoal_handle, + IN t_u32 size, + OUT pmlan_buffer *pmbuf); + /** moal_free_mlan_buffer */ + mlan_status (*moal_free_mlan_buffer) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf); + + /** moal_write_reg */ + mlan_status (*moal_write_reg) (IN t_void *pmoal_handle, + IN t_u32 reg, IN t_u32 data); + /** moal_read_reg */ + mlan_status (*moal_read_reg) (IN t_void *pmoal_handle, + IN t_u32 reg, OUT t_u32 *data); + /** moal_write_data_sync */ + mlan_status (*moal_write_data_sync) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf, + IN t_u32 port, IN t_u32 timeout); + /** moal_read_data_sync */ + mlan_status (*moal_read_data_sync) (IN t_void *pmoal_handle, + IN OUT pmlan_buffer pmbuf, + IN t_u32 port, IN t_u32 timeout); + /** moal_malloc */ + mlan_status (*moal_malloc) (IN t_void *pmoal_handle, + IN t_u32 size, + IN t_u32 flag, OUT t_u8 **ppbuf); + /** moal_mfree */ + mlan_status (*moal_mfree) (IN t_void *pmoal_handle, IN t_u8 *pbuf); + /** moal_vmalloc */ + mlan_status (*moal_vmalloc) (IN t_void *pmoal_handle, + IN t_u32 size, OUT t_u8 **ppbuf); + /** moal_vfree */ + mlan_status (*moal_vfree) (IN t_void *pmoal_handle, IN t_u8 *pbuf); + /** moal_memset */ + t_void *(*moal_memset) (IN t_void *pmoal_handle, + IN t_void *pmem, IN t_u8 byte, IN t_u32 num); + /** moal_memcpy */ + t_void *(*moal_memcpy) (IN t_void *pmoal_handle, + IN t_void *pdest, + IN const t_void *psrc, IN t_u32 num); + /** moal_memmove */ + t_void *(*moal_memmove) (IN t_void *pmoal_handle, + IN t_void *pdest, + IN const t_void *psrc, IN t_u32 num); + /** moal_memcmp */ + t_s32 (*moal_memcmp) (IN t_void *pmoal_handle, + IN const t_void *pmem1, + IN const t_void *pmem2, IN t_u32 num); + /** moal_udelay */ + t_void (*moal_udelay) (IN t_void *pmoal_handle, IN t_u32 udelay); + /** moal_get_system_time */ + mlan_status (*moal_get_system_time) (IN t_void *pmoal_handle, + OUT t_u32 *psec, OUT t_u32 *pusec); + /** moal_init_timer*/ + mlan_status (*moal_init_timer) (IN t_void *pmoal_handle, + OUT t_void **pptimer, + IN t_void (*callback) (t_void + *pcontext), + IN t_void *pcontext); + /** moal_free_timer */ + mlan_status (*moal_free_timer) (IN t_void *pmoal_handle, + IN t_void *ptimer); + /** moal_start_timer*/ + mlan_status (*moal_start_timer) (IN t_void *pmoal_handle, + IN t_void *ptimer, + IN t_u8 periodic, IN t_u32 msec); + /** moal_stop_timer*/ + mlan_status (*moal_stop_timer) (IN t_void *pmoal_handle, + IN t_void *ptimer); + /** moal_init_lock */ + mlan_status (*moal_init_lock) (IN t_void *pmoal_handle, + OUT t_void **pplock); + /** moal_free_lock */ + mlan_status (*moal_free_lock) (IN t_void *pmoal_handle, + IN t_void *plock); + /** moal_spin_lock */ + mlan_status (*moal_spin_lock) (IN t_void *pmoal_handle, + IN t_void *plock); + /** moal_spin_unlock */ + mlan_status (*moal_spin_unlock) (IN t_void *pmoal_handle, + IN t_void *plock); + /** moal_print */ + t_void (*moal_print) (IN t_void *pmoal_handle, + IN t_u32 level, IN char *pformat, IN ... + ); + /** moal_print_netintf */ + t_void (*moal_print_netintf) (IN t_void *pmoal_handle, + IN t_u32 bss_index, IN t_u32 level); + /** moal_assert */ + t_void (*moal_assert) (IN t_void *pmoal_handle, IN t_u32 cond); + + /** moal_tcp_ack_tx_ind */ + t_void (*moal_tcp_ack_tx_ind) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf); + /** moal_hist_data_add */ + t_void (*moal_hist_data_add) (IN t_void *pmoal_handle, + IN t_u32 bss_index, + IN t_u8 rx_rate, + IN t_s8 snr, + IN t_s8 nflr, IN t_u8 antenna); + t_void (*moal_updata_peer_signal) (IN t_void *pmoal_handle, + IN t_u32 bss_index, + IN t_u8 *peer_addr, + IN t_s8 snr, IN t_s8 nflr); +} mlan_callbacks, *pmlan_callbacks; + +/** Interrupt Mode SDIO */ +#define INT_MODE_SDIO 0 +/** Interrupt Mode GPIO */ +#define INT_MODE_GPIO 1 + +/** Parameter unchanged, use MLAN default setting */ +#define MLAN_INIT_PARA_UNCHANGED 0 +/** Parameter enabled, override MLAN default setting */ +#define MLAN_INIT_PARA_ENABLED 1 +/** Parameter disabled, override MLAN default setting */ +#define MLAN_INIT_PARA_DISABLED 2 + +/** Control bit for stream 2X2 */ +#define FEATURE_CTRL_STREAM_2X2 MBIT(6) +/** Control bit for DFS support */ +#define FEATURE_CTRL_DFS_SUPPORT MBIT(7) + +/** Default feature control */ +#define FEATURE_CTRL_DEFAULT 0xffffffff + +/** mlan_device data structure */ +typedef struct _mlan_device { + /** MOAL Handle */ + t_void *pmoal_handle; + /** BSS Attributes */ + mlan_bss_attr bss_attr[MLAN_MAX_BSS_NUM]; + /** Callbacks */ + mlan_callbacks callbacks; +#ifdef MFG_CMD_SUPPORT + /** MFG mode */ + t_u32 mfg_mode; +#endif + /** SDIO interrupt mode (0: INT_MODE_SDIO, 1: INT_MODE_GPIO) */ + t_u32 int_mode; + /** GPIO interrupt pin number */ + t_u32 gpio_pin; +#ifdef DEBUG_LEVEL1 + /** Driver debug bit masks */ + t_u32 drvdbg; +#endif +#ifdef SDIO_MULTI_PORT_TX_AGGR + /** SDIO MPA Tx */ + t_u32 mpa_tx_cfg; +#endif +#ifdef SDIO_MULTI_PORT_RX_AGGR + /** SDIO MPA Rx */ + t_u32 mpa_rx_cfg; +#endif +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + /* see blk_queue_max_segment_size */ + t_u32 max_seg_size; + /* see blk_queue_max_segments */ + t_u16 max_segs; +#endif + /** Auto deep sleep */ + t_u32 auto_ds; + /** IEEE PS mode */ + t_u32 ps_mode; + /** Max Tx buffer size */ + t_u32 max_tx_buf; +#if defined(STA_SUPPORT) + /** 802.11d configuration */ + t_u32 cfg_11d; +#endif + /** FW download CRC check flag */ + t_u32 fw_crc_check; + /** Feature control bitmask */ + t_u32 feature_control; + /** enable/disable rx work */ + t_u8 rx_work; + /** dev cap mask */ + t_u32 dev_cap_mask; + /** card type */ + t_u16 card_type; +} mlan_device, *pmlan_device; + +/** MLAN API function prototype */ +#define MLAN_API + +/** Registration */ +MLAN_API mlan_status mlan_register(IN pmlan_device pmdevice, + OUT t_void **ppmlan_adapter); + +/** Un-registration */ +MLAN_API mlan_status mlan_unregister(IN t_void *pmlan_adapter + ); + +/** Firmware Downloading */ +MLAN_API mlan_status mlan_dnld_fw(IN t_void *pmlan_adapter, + IN pmlan_fw_image pmfw); + +/** Custom data pass API */ +MLAN_API mlan_status mlan_set_init_param(IN t_void *pmlan_adapter, + IN pmlan_init_param pparam); + +/** Firmware Initialization */ +MLAN_API mlan_status mlan_init_fw(IN t_void *pmlan_adapter + ); + +/** Firmware Shutdown */ +MLAN_API mlan_status mlan_shutdown_fw(IN t_void *pmlan_adapter + ); + +/** Main Process */ +MLAN_API mlan_status mlan_main_process(IN t_void *pmlan_adapter + ); + +/** Rx process */ +mlan_status mlan_rx_process(IN t_void *pmlan_adapter + ); + +/** Packet Transmission */ +MLAN_API mlan_status mlan_send_packet(IN t_void *pmlan_adapter, + IN pmlan_buffer pmbuf); + +/** Packet Reception complete callback */ +MLAN_API mlan_status mlan_recv_packet_complete(IN t_void *pmlan_adapter, + IN pmlan_buffer pmbuf, + IN mlan_status status); + +/** interrupt handler */ +MLAN_API t_void mlan_interrupt(IN t_void *pmlan_adapter); + +MLAN_API t_void mlan_pm_wakeup_card(IN t_void *pmlan_adapter); + +MLAN_API t_u8 mlan_is_main_process_running(IN t_void *adapter); + +/** mlan ioctl */ +MLAN_API mlan_status mlan_ioctl(IN t_void *pmlan_adapter, + IN pmlan_ioctl_req pioctl_req); +/** mlan select wmm queue */ +MLAN_API t_u8 mlan_select_wmm_queue(IN t_void *pmlan_adapter, + IN t_u8 bss_num, IN t_u8 tid); +#endif /* !_MLAN_DECL_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_fw.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_fw.h new file mode 100644 index 00000000..54086b99 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_fw.h @@ -0,0 +1,5618 @@ +/** @file mlan_fw.h + * + * @brief This file contains firmware specific defines. + * structures and declares global function prototypes used + * in MLAN module. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 10/27/2008: initial version +******************************************************/ + +#ifndef _MLAN_FW_H_ +#define _MLAN_FW_H_ + +/** Interface header length */ +#define INTF_HEADER_LEN 4 + +#ifdef PRAGMA_PACK +#pragma pack(push, 1) +#endif + +/** Ethernet header */ +typedef MLAN_PACK_START struct { + /** Ethernet header destination address */ + t_u8 dest_addr[MLAN_MAC_ADDR_LENGTH]; + /** Ethernet header source address */ + t_u8 src_addr[MLAN_MAC_ADDR_LENGTH]; + /** Ethernet header length */ + t_u16 h803_len; + +} MLAN_PACK_END Eth803Hdr_t; + +/** RFC 1042 header */ +typedef MLAN_PACK_START struct { + /** LLC DSAP */ + t_u8 llc_dsap; + /** LLC SSAP */ + t_u8 llc_ssap; + /** LLC CTRL */ + t_u8 llc_ctrl; + /** SNAP OUI */ + t_u8 snap_oui[3]; + /** SNAP type */ + t_u16 snap_type; + +} MLAN_PACK_END Rfc1042Hdr_t; + +/** Rx packet header */ +typedef MLAN_PACK_START struct { + /** Etherner header */ + Eth803Hdr_t eth803_hdr; + /** RFC 1042 header */ + Rfc1042Hdr_t rfc1042_hdr; + +} MLAN_PACK_END RxPacketHdr_t; + +/** Rates supported in band B */ +#define B_SUPPORTED_RATES 5 +/** Rates supported in band G */ +#define G_SUPPORTED_RATES 9 +/** Rates supported in band BG */ +#define BG_SUPPORTED_RATES 13 + +/** Setup the number of rates passed in the driver/firmware API */ +#define A_SUPPORTED_RATES 9 + +/** CapInfo Short Slot Time Disabled */ +/* #define SHORT_SLOT_TIME_DISABLED(CapInfo) ((IEEEtypes_CapInfo_t)(CapInfo).short_slot_time = 0) */ +#define SHORT_SLOT_TIME_DISABLED(CapInfo) (CapInfo &= ~MBIT(10)) +/** CapInfo Short Slot Time Enabled */ +#define SHORT_SLOT_TIME_ENABLED(CapInfo) (CapInfo |= MBIT(10)) + +/** Setup the number of rates passed in the driver/firmware API */ +#define HOSTCMD_SUPPORTED_RATES 14 + +/** Rates supported in band N */ +#define N_SUPPORTED_RATES 3 +#ifdef STA_SUPPORT +/** All bands (B, G, N, AAC, GAC) */ +#define ALL_802_11_BANDS (BAND_A | BAND_B | BAND_G | BAND_GN | BAND_AAC | BAND_GAC) +#else +/** All bands (B, G, A) */ +#define ALL_802_11_BANDS (BAND_B | BAND_G | BAND_A) +#endif /* STA_SUPPORT */ + +#ifdef STA_SUPPORT +/** Firmware multiple bands support */ +#define FW_MULTI_BANDS_SUPPORT (MBIT(8) | MBIT(9) | MBIT(10) | MBIT(11) | \ + MBIT(12) | MBIT(13)) +#else +/** Firmware multiple bands support */ +#define FW_MULTI_BANDS_SUPPORT (MBIT(8) | MBIT(9) | MBIT(10)) +#endif /* STA_SUPPORT */ +/** Check if multiple bands support is enabled in firmware */ +#define IS_SUPPORT_MULTI_BANDS(_adapter) \ + (_adapter->fw_cap_info & FW_MULTI_BANDS_SUPPORT) +/** Get default bands of the firmware */ + /* need to shift bit 12 and bit 13 in fw_cap_info from the firmware to bit 13 + and 14 for 11ac so that bit 11 is for GN, bit 12 for AN, bit 13 for GAC, + and bit 14 for AAC, in order to be compatible with the band capability + defined in the driver after right shift of 8 bits */ +#define GET_FW_DEFAULT_BANDS(_adapter) \ + (((((_adapter->fw_cap_info & 0x3000) << 1) | \ + (_adapter->fw_cap_info & ~0xF000)) >> 8) & ALL_802_11_BANDS) + +extern t_u8 SupportedRates_B[B_SUPPORTED_RATES]; +extern t_u8 SupportedRates_G[G_SUPPORTED_RATES]; +extern t_u8 SupportedRates_BG[BG_SUPPORTED_RATES]; +extern t_u8 SupportedRates_A[A_SUPPORTED_RATES]; +extern t_u8 SupportedRates_N[N_SUPPORTED_RATES]; +extern t_u8 AdhocRates_G[G_SUPPORTED_RATES]; +extern t_u8 AdhocRates_B[B_SUPPORTED_RATES]; +extern t_u8 AdhocRates_BG[BG_SUPPORTED_RATES]; +extern t_u8 AdhocRates_A[A_SUPPORTED_RATES]; + +/** Default auto deep sleep mode */ +#define DEFAULT_AUTO_DS_MODE MTRUE +/** Default power save mode */ +#define DEFAULT_PS_MODE Wlan802_11PowerModePSP + +/** WEP Key index mask */ +#define HostCmd_WEP_KEY_INDEX_MASK 0x3fff +/** Length of WEP 40 bit key */ +#define WEP_40_BIT_LEN 5 +/** Length of WEP 104 bit key */ +#define WEP_104_BIT_LEN 13 + +/** Key information enabled */ +#define KEY_INFO_ENABLED 0x01 +/** KEY_TYPE_ID */ +typedef enum _KEY_TYPE_ID { + /** Key type : WEP */ + KEY_TYPE_ID_WEP = 0, + /** Key type : TKIP */ + KEY_TYPE_ID_TKIP = 1, + /** Key type : AES */ + KEY_TYPE_ID_AES = 2, + KEY_TYPE_ID_WAPI = 3, + KEY_TYPE_ID_AES_CMAC = 4, +} KEY_TYPE_ID; + +/** Key Info flag for multicast key */ +#define KEY_INFO_MCAST_KEY 0x01 +/** Key Info flag for unicast key */ +#define KEY_INFO_UCAST_KEY 0x02 + +/** KEY_INFO_WEP*/ +typedef enum _KEY_INFO_WEP { + KEY_INFO_WEP_MCAST = 0x01, + KEY_INFO_WEP_UNICAST = 0x02, + KEY_INFO_WEP_ENABLED = 0x04 +} KEY_INFO_WEP; + +/** KEY_INFO_TKIP */ +typedef enum _KEY_INFO_TKIP { + KEY_INFO_TKIP_MCAST = 0x01, + KEY_INFO_TKIP_UNICAST = 0x02, + KEY_INFO_TKIP_ENABLED = 0x04 +} KEY_INFO_TKIP; + +/** KEY_INFO_AES*/ +typedef enum _KEY_INFO_AES { + KEY_INFO_AES_MCAST = 0x01, + KEY_INFO_AES_UNICAST = 0x02, + KEY_INFO_AES_ENABLED = 0x04, + KEY_INFO_AES_MCAST_IGTK = 0x400, +} KEY_INFO_AES; + +/** WPA AES key length */ +#define WPA_AES_KEY_LEN 16 +/** WPA TKIP key length */ +#define WPA_TKIP_KEY_LEN 32 +/** WPA AES IGTK key length */ +#define CMAC_AES_KEY_LEN 16 +/** IGTK key length */ +#define WPA_IGTK_KEY_LEN 16 + +/** WAPI key length */ +#define WAPI_KEY_LEN 50 +/** KEY_INFO_WAPI*/ +typedef enum _KEY_INFO_WAPI { + KEY_INFO_WAPI_MCAST = 0x01, + KEY_INFO_WAPI_UNICAST = 0x02, + KEY_INFO_WAPI_ENABLED = 0x04 +} KEY_INFO_WAPI; + +/** Maximum ethernet frame length sans FCS */ +#define MV_ETH_FRAME_LEN 1514 + +/** Length of SNAP header */ +#define MRVDRV_SNAP_HEADER_LEN 8 + +/** The number of times to try when polling for status bits */ +#define MAX_POLL_TRIES 100 + +/** The number of times to try when waiting for downloaded firmware to + become active when multiple interface is present */ +#define MAX_MULTI_INTERFACE_POLL_TRIES 150 + +/** The number of times to try when waiting for downloaded firmware to + become active. (polling the scratch register). */ +#define MAX_FIRMWARE_POLL_TRIES 100 + +/** This is for firmware specific length */ +#define EXTRA_LEN 36 + +/** Buffer size for ethernet Tx packets */ +#define MRVDRV_ETH_TX_PACKET_BUFFER_SIZE \ + (MV_ETH_FRAME_LEN + sizeof(TxPD) + EXTRA_LEN) + +/** Buffer size for ethernet Rx packets */ +#define MRVDRV_ETH_RX_PACKET_BUFFER_SIZE \ + (MV_ETH_FRAME_LEN + sizeof(RxPD) \ + + MRVDRV_SNAP_HEADER_LEN + EXTRA_LEN) + +/* Macros in interface module */ +/** Firmware ready */ +#define FIRMWARE_READY 0xfedc + +/** Number of firmware blocks to transfer */ +#define FIRMWARE_TRANSFER_NBLOCK 2 + +/** Enumeration definition*/ +/** WLAN_802_11_PRIVACY_FILTER */ +typedef enum _WLAN_802_11_PRIVACY_FILTER { + Wlan802_11PrivFilterAcceptAll, + Wlan802_11PrivFilter8021xWEP +} WLAN_802_11_PRIVACY_FILTER; + +/** WLAN_802_11_WEP_STATUS */ +typedef enum _WLAN_802_11_WEP_STATUS { + Wlan802_11WEPEnabled, + Wlan802_11WEPDisabled, + Wlan802_11WEPKeyAbsent, + Wlan802_11WEPNotSupported +} WLAN_802_11_WEP_STATUS; + +/** SNR calculation */ +#define CAL_SNR(RSSI, NF) ((t_s16)((t_s16)(RSSI) - (t_s16)(NF))) + +/** 2K buf size */ +#define MLAN_TX_DATA_BUF_SIZE_2K 2048 + +/** TLV type ID definition */ +#define PROPRIETARY_TLV_BASE_ID 0x0100 + +/** Terminating TLV Type */ +#define MRVL_TERMINATE_TLV_ID 0xffff + +/** TLV type : SSID */ +#define TLV_TYPE_SSID 0x0000 +/** TLV type : Rates */ +#define TLV_TYPE_RATES 0x0001 +/** TLV type : PHY FH */ +#define TLV_TYPE_PHY_FH 0x0002 +/** TLV type : PHY DS */ +#define TLV_TYPE_PHY_DS 0x0003 +/** TLV type : CF */ +#define TLV_TYPE_CF 0x0004 +/** TLV type : IBSS */ +#define TLV_TYPE_IBSS 0x0006 + +/** TLV type : Domain */ +#define TLV_TYPE_DOMAIN 0x0007 + +/** TLV type : Power constraint */ +#define TLV_TYPE_POWER_CONSTRAINT 0x0020 + +/** TLV type : Power capability */ +#define TLV_TYPE_POWER_CAPABILITY 0x0021 + +/** TLV type : Vendor Specific IE */ +#define TLV_TYPE_VENDOR_SPECIFIC_IE 0xdd + +/** TLV type : Key material */ +#define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0x00) /* 0x0100 + */ +/** TLV type : Channel list */ +#define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 0x01) /* 0x0101 + */ +/** TLV type : Number of probes */ +#define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 0x02) /* 0x0102 + */ +/** TLV type : Beacon RSSI low */ +#define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 0x04) /* 0x0104 + */ +/** TLV type : Beacon SNR low */ +#define TLV_TYPE_SNR_LOW (PROPRIETARY_TLV_BASE_ID + 0x05) /* 0x0105 + */ +/** TLV type : Fail count */ +#define TLV_TYPE_FAILCOUNT (PROPRIETARY_TLV_BASE_ID + 0x06) /* 0x0106 + */ +/** TLV type : BCN miss */ +#define TLV_TYPE_BCNMISS (PROPRIETARY_TLV_BASE_ID + 0x07) /* 0x0107 + */ +/** TLV type : LED behavior */ +#define TLV_TYPE_LEDBEHAVIOR (PROPRIETARY_TLV_BASE_ID + 0x09) /* 0x0109 + */ +/** TLV type : Passthrough */ +#define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 0x0a) /* 0x010a + */ +/** TLV type : Power TBL 2.4 Ghz */ +#define TLV_TYPE_POWER_TBL_2_4GHZ (PROPRIETARY_TLV_BASE_ID + 0x0c) /* 0x010c + */ +/** TLV type : Power TBL 5 GHz */ +#define TLV_TYPE_POWER_TBL_5GHZ (PROPRIETARY_TLV_BASE_ID + 0x0d) /* 0x010d + */ +/** TLV type : WMM queue status */ +#define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 0x10) /* 0x0110 + */ +/** TLV type : Wildcard SSID */ +#define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 0x12) /* 0x0112 + */ +/** TLV type : TSF timestamp */ +#define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 0x13) /* 0x0113 + */ +/** TLV type : ARP filter */ +#define TLV_TYPE_ARP_FILTER (PROPRIETARY_TLV_BASE_ID + 0x15) /* 0x0115 + */ +/** TLV type : Beacon RSSI high */ +#define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 0x16) /* 0x0116 + */ +/** TLV type : Beacon SNR high */ +#define TLV_TYPE_SNR_HIGH (PROPRIETARY_TLV_BASE_ID + 0x17) /* 0x0117 + */ +/** TLV type : Start BG scan later */ +#define TLV_TYPE_STARTBGSCANLATER (PROPRIETARY_TLV_BASE_ID + 0x1e) /* 0x011e + */ +/** TLV type: BG scan repeat count */ +#define TLV_TYPE_REPEAT_COUNT (PROPRIETARY_TLV_BASE_ID + 0xb0) /* 0x01b0 + */ +/** TLV type : Authentication type */ +#define TLV_TYPE_AUTH_TYPE (PROPRIETARY_TLV_BASE_ID + 0x1f) /* 0x011f + */ +/** TLV type : BSSID */ +#define TLV_TYPE_BSSID (PROPRIETARY_TLV_BASE_ID + 0x23) /* 0x0123 + */ + +/** TLV type : Link Quality */ +#define TLV_TYPE_LINK_QUALITY (PROPRIETARY_TLV_BASE_ID + 0x24) /* 0x0124 + */ + +/** TLV type : Data RSSI low */ +#define TLV_TYPE_RSSI_LOW_DATA (PROPRIETARY_TLV_BASE_ID + 0x26) /* 0x0126 + */ +/** TLV type : Data SNR low */ +#define TLV_TYPE_SNR_LOW_DATA (PROPRIETARY_TLV_BASE_ID + 0x27) /* 0x0127 + */ +/** TLV type : Data RSSI high */ +#define TLV_TYPE_RSSI_HIGH_DATA (PROPRIETARY_TLV_BASE_ID + 0x28) /* 0x0128 + */ +/** TLV type : Data SNR high */ +#define TLV_TYPE_SNR_HIGH_DATA (PROPRIETARY_TLV_BASE_ID + 0x29) /* 0x0129 + */ + +/** TLV type : Channel band list */ +#define TLV_TYPE_CHANNELBANDLIST (PROPRIETARY_TLV_BASE_ID + 0x2a) /* 0x012a + */ + +/** TLV type : Passphrase */ +#define TLV_TYPE_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 0x3c) /* 0x013c + */ + +/** TLV type : Encryption Protocol TLV */ +#define TLV_TYPE_ENCRYPTION_PROTO (PROPRIETARY_TLV_BASE_ID + 0x40) /* 0x0140 + */ +/** TLV type : Cipher TLV */ +#define TLV_TYPE_CIPHER (PROPRIETARY_TLV_BASE_ID + 0x42) /* 0x0142 + */ +/** TLV type : PMK */ +#define TLV_TYPE_PMK (PROPRIETARY_TLV_BASE_ID + 0x44) /* 0x0144 + */ + +/** TLV type : BCN miss */ +#define TLV_TYPE_PRE_BCNMISS (PROPRIETARY_TLV_BASE_ID + 0x49) /* 0x0149 + */ + +/** TLV type: WAPI IE */ +#define TLV_TYPE_WAPI_IE (PROPRIETARY_TLV_BASE_ID + 0x5e) /* 0x015e + */ + +/** TLV type: MGMT IE */ +#define TLV_TYPE_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 0x69) /* 0x0169 + */ +/** TLV type: MAX_MGMT_IE */ +#define TLV_TYPE_MAX_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 0xaa) /* 0x01aa + */ + +/** TLV type: key param v2 */ +#define TLV_TYPE_KEY_PARAM_V2 (PROPRIETARY_TLV_BASE_ID + 0x9C) /* 0x019C + */ + +/** TLV type: hs wake hold off */ +#define TLV_TYPE_HS_WAKE_HOLDOFF (PROPRIETARY_TLV_BASE_ID + 0xB6) /* 0x01b6 + */ + +/** TLV type : TDLS IDLE TIMEOUT */ +#define TLV_TYPE_TDLS_IDLE_TIMEOUT (PROPRIETARY_TLV_BASE_ID + 0xC2) /* 0x01C2 + */ + +/** TLV type : HT Capabilities */ +#define TLV_TYPE_HT_CAP (PROPRIETARY_TLV_BASE_ID + 0x4a) /* 0x014a + */ +/** TLV type : HT Information */ +#define TLV_TYPE_HT_INFO (PROPRIETARY_TLV_BASE_ID + 0x4b) /* 0x014b + */ +/** TLV type : Secondary Channel Offset */ +#define TLV_SECONDARY_CHANNEL_OFFSET (PROPRIETARY_TLV_BASE_ID + 0x4c) /* 0x014c + */ +/** TLV type : 20/40 BSS Coexistence */ +#define TLV_TYPE_2040BSS_COEXISTENCE (PROPRIETARY_TLV_BASE_ID + 0x4d) /* 0x014d + */ +/** TLV type : Overlapping BSS Scan Parameters */ +#define TLV_TYPE_OVERLAP_BSS_SCAN_PARAM (PROPRIETARY_TLV_BASE_ID + 0x4e) /* 0x014e + */ +/** TLV type : Extended capabilities */ +#define TLV_TYPE_EXTCAP (PROPRIETARY_TLV_BASE_ID + 0x4f) /* 0x014f + */ +/** TLV type : Set of MCS values that STA desires to use within the BSS */ +#define TLV_TYPE_HT_OPERATIONAL_MCS_SET (PROPRIETARY_TLV_BASE_ID + 0x50) /* 0x0150 + */ +/** TLV type : RXBA_SYNC */ +#define TLV_TYPE_RXBA_SYNC (PROPRIETARY_TLV_BASE_ID + 0x99) /* 0x0199 + */ + +#ifdef WIFI_DIRECT_SUPPORT +/** TLV type : AP PSK */ +#define TLV_TYPE_UAP_PSK (PROPRIETARY_TLV_BASE_ID + 0xa8) /* 0x01a8 */ +/** TLV type : p2p NOA */ +#define TLV_TYPE_WIFI_DIRECT_NOA (PROPRIETARY_TLV_BASE_ID + 0x83) +/** TLV type : p2p opp ps */ +#define TLV_TYPE_WIFI_DIRECT_OPP_PS (PROPRIETARY_TLV_BASE_ID + 0x84) +#endif /* WIFI_DIRECT_SUPPORT */ + +/** TLV : 20/40 coex config */ +#define TLV_TYPE_2040_BSS_COEX_CONTROL\ + (PROPRIETARY_TLV_BASE_ID + 0x98) /* 0x0198 */ + +/** TLV type : aggr win size */ +#define TLV_BTCOEX_WL_AGGR_WINSIZE (PROPRIETARY_TLV_BASE_ID + 0xca) +/** TLV type : scan time */ +#define TLV_BTCOEX_WL_SCANTIME (PROPRIETARY_TLV_BASE_ID + 0Xcb) +/** TLV type : Ewpa_eapol_pkt */ +#define TLV_TYPE_EAPOL_PKT (PROPRIETARY_TLV_BASE_ID + 0xcf) + +#define TLV_TYPE_COALESCE_RULE (PROPRIETARY_TLV_BASE_ID + 0x9a) + +/** ADDBA TID mask */ +#define ADDBA_TID_MASK (MBIT(2) | MBIT(3) | MBIT(4) | MBIT(5)) +/** DELBA TID mask */ +#define DELBA_TID_MASK (MBIT(12) | MBIT(13) | MBIT(14) | MBIT(15)) +/** ADDBA Starting Sequence Number Mask */ +#define SSN_MASK 0xfff0 + +/** Block Ack result status */ +/** Block Ack Result : Success */ +#define BA_RESULT_SUCCESS 0x0 +/** Block Ack Result : Execution failure */ +#define BA_RESULT_FAILURE 0x1 +/** Block Ack Result : Timeout */ +#define BA_RESULT_TIMEOUT 0x2 +/** Block Ack Result : Data invalid */ +#define BA_RESULT_DATA_INVALID 0x3 + +/** Get the baStatus (NOT_SETUP, COMPLETE, IN_PROGRESS) + * in Tx BA stream table */ +#define IS_BASTREAM_SETUP(ptr) (ptr->ba_status) + +/** An AMPDU/AMSDU could be disallowed for certain TID. 0xff means + * no aggregation is enabled for the assigned TID */ +#define BA_STREAM_NOT_ALLOWED 0xff + +/** Test if 11n is enabled by checking the HTCap IE */ +#define IS_11N_ENABLED(priv) ((priv->config_bands & BAND_GN || priv->config_bands & BAND_AN) \ + && priv->curr_bss_params.bss_descriptor.pht_cap) +/** Find out if we are the initiator or not */ +#define INITIATOR_BIT(DelBAParamSet) (((DelBAParamSet) & \ + MBIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS) + +/** 4K buf size */ +#define MLAN_TX_DATA_BUF_SIZE_4K 4096 +/** 8K buf size */ +#define MLAN_TX_DATA_BUF_SIZE_8K 8192 +/** 12K buf size */ +#define MLAN_TX_DATA_BUF_SIZE_12K 12288 +/** Max Rx AMPDU Size */ +#define MAX_RX_AMPDU_SIZE_64K 0x03 +/** Non green field station */ +#define NON_GREENFIELD_STAS 0x04 + +/** Greenfield support */ +#define HWSPEC_GREENFIELD_SUPP MBIT(29) +/** RX STBC support */ +#define HWSPEC_RXSTBC_SUPP MBIT(26) +/** ShortGI @ 40Mhz support */ +#define HWSPEC_SHORTGI40_SUPP MBIT(24) +/** ShortGI @ 20Mhz support */ +#define HWSPEC_SHORTGI20_SUPP MBIT(23) +/** Channel width 40Mhz support */ +#define HWSPEC_CHANBW40_SUPP MBIT(17) +/** 40Mhz intolarent enable */ +#define CAPINFO_40MHZ_INTOLARENT MBIT(8) + +/** Default 11n capability mask for 2.4GHz */ +#define DEFAULT_11N_CAP_MASK_BG (HWSPEC_SHORTGI20_SUPP | HWSPEC_RXSTBC_SUPP) +/** Default 11n capability mask for 5GHz */ +#define DEFAULT_11N_CAP_MASK_A (HWSPEC_CHANBW40_SUPP | HWSPEC_SHORTGI20_SUPP | \ + HWSPEC_SHORTGI40_SUPP | HWSPEC_RXSTBC_SUPP) + +/** Default 11n TX BF capability **/ +#define DEFAULT_11N_TX_BF_CAP 0x09E1E008 + +/** Bits to ignore in hw_dev_cap as these bits are set in get_hw_spec */ +#define IGN_HW_DEV_CAP (CAPINFO_40MHZ_INTOLARENT) + +/** HW_SPEC FwCapInfo */ +#define ISSUPP_11NENABLED(FwCapInfo) (FwCapInfo & MBIT(11)) + +/** HW_SPEC Dot11nDevCap : MAX AMSDU supported */ +#define ISSUPP_MAXAMSDU(Dot11nDevCap) (Dot11nDevCap & MBIT(31)) +/** HW_SPEC Dot11nDevCap : Beamforming support */ +#define ISSUPP_BEAMFORMING(Dot11nDevCap) (Dot11nDevCap & MBIT(30)) +/** HW_SPEC Dot11nDevCap : Green field support */ +#define ISSUPP_GREENFIELD(Dot11nDevCap) (Dot11nDevCap & MBIT(29)) +/** HW_SPEC Dot11nDevCap : AMPDU support */ +#define ISSUPP_AMPDU(Dot11nDevCap) (Dot11nDevCap & MBIT(28)) +/** HW_SPEC Dot11nDevCap : MIMO PS support */ +#define ISSUPP_MIMOPS(Dot11nDevCap) (Dot11nDevCap & MBIT(27)) +/** HW_SPEC Dot11nDevCap : Rx STBC support */ +#define ISSUPP_RXSTBC(Dot11nDevCap) (Dot11nDevCap & MBIT(26)) +/** HW_SPEC Dot11nDevCap : Tx STBC support */ +#define ISSUPP_TXSTBC(Dot11nDevCap) (Dot11nDevCap & MBIT(25)) +/** HW_SPEC Dot11nDevCap : Short GI @ 40Mhz support */ +#define ISSUPP_SHORTGI40(Dot11nDevCap) (Dot11nDevCap & MBIT(24)) +/** HW_SPEC Dot11nDevCap : Reset Short GI @ 40Mhz support */ +#define RESETSUPP_SHORTGI40(Dot11nDevCap) (Dot11nDevCap &= ~MBIT(24)) +/** HW_SPEC Dot11nDevCap : Short GI @ 20Mhz support */ +#define ISSUPP_SHORTGI20(Dot11nDevCap) (Dot11nDevCap & MBIT(23)) +/** HW_SPEC Dot11nDevCap : Rx LDPC support */ +#define ISSUPP_RXLDPC(Dot11nDevCap) (Dot11nDevCap & MBIT(22)) +/** HW_SPEC Dot11nDevCap : Number of TX BA streams supported */ +#define ISSUPP_GETTXBASTREAM(Dot11nDevCap) ((Dot11nDevCap >> 18) & 0xF) +/** HW_SPEC Dot11nDevCap : Delayed ACK */ +#define GET_DELAYEDBACK(Dot11nDevCap) (((Dot11nDevCap >> 20) & 0x03)) +/** HW_SPEC Dot11nDevCap : Immediate ACK */ +#define GET_IMMEDIATEBACK(Dot11nDevCap) (((Dot11nDevCap >> 18) & 0x03)) +/** HW_SPEC Dot11nDevCap : Channel BW support @ 40Mhz support */ +#define ISSUPP_CHANWIDTH40(Dot11nDevCap) (Dot11nDevCap & MBIT(17)) +/** HW_SPEC Dot11nDevCap : Channel BW support @ 20Mhz support */ +#define ISSUPP_CHANWIDTH20(Dot11nDevCap) (Dot11nDevCap & MBIT(16)) +/** HW_SPEC Dot11nDevCap : Channel BW support @ 10Mhz support */ +#define ISSUPP_CHANWIDTH10(Dot11nDevCap) (Dot11nDevCap & MBIT(15)) +/** Dot11nUsrCap : 40Mhz intolarance enabled */ +#define ISENABLED_40MHZ_INTOLARENT(Dot11nDevCap) (Dot11nDevCap & MBIT(8)) +/** Dot11nUsrCap : Reset 40Mhz intolarance enabled */ +#define RESET_40MHZ_INTOLARENT(Dot11nDevCap) (Dot11nDevCap &= ~MBIT(8)) +/** HW_SPEC Dot11nDevCap : Rx AntennaD support */ +#define ISSUPP_RXANTENNAD(Dot11nDevCap) (Dot11nDevCap & MBIT(7)) +/** HW_SPEC Dot11nDevCap : Rx AntennaC support */ +#define ISSUPP_RXANTENNAC(Dot11nDevCap) (Dot11nDevCap & MBIT(6)) +/** HW_SPEC Dot11nDevCap : Rx AntennaB support */ +#define ISSUPP_RXANTENNAB(Dot11nDevCap) (Dot11nDevCap & MBIT(5)) +/** HW_SPEC Dot11nDevCap : Rx AntennaA support */ +#define ISSUPP_RXANTENNAA(Dot11nDevCap) (Dot11nDevCap & MBIT(4)) +/** HW_SPEC Dot11nDevCap : Tx AntennaD support */ +#define ISSUPP_TXANTENNAD(Dot11nDevCap) (Dot11nDevCap & MBIT(3)) +/** HW_SPEC Dot11nDevCap : Tx AntennaC support */ +#define ISSUPP_TXANTENNAC(Dot11nDevCap) (Dot11nDevCap & MBIT(2)) +/** HW_SPEC Dot11nDevCap : Tx AntennaB support */ +#define ISSUPP_TXANTENNAB(Dot11nDevCap) (Dot11nDevCap & MBIT(1)) +/** HW_SPEC Dot11nDevCap : Tx AntennaA support */ +#define ISSUPP_TXANTENNAA(Dot11nDevCap) (Dot11nDevCap & MBIT(0)) + +/** HW_SPEC Dot11nDevCap : Set support of channel bw @ 40Mhz */ +#define SETSUPP_CHANWIDTH40(Dot11nDevCap) (Dot11nDevCap |= MBIT(17)) +/** HW_SPEC Dot11nDevCap : Reset support of channel bw @ 40Mhz */ +#define RESETSUPP_CHANWIDTH40(Dot11nDevCap) (Dot11nDevCap &= ~MBIT(17)) + +/** DevMCSSupported : Tx MCS supported */ +#define GET_TXMCSSUPP(DevMCSSupported) (DevMCSSupported >> 4) +/** DevMCSSupported : Rx MCS supported */ +#define GET_RXMCSSUPP(DevMCSSupported) (DevMCSSupported & 0x0f) + +/** GET HTCapInfo : Supported Channel BW */ +#define GETHT_SUPPCHANWIDTH(HTCapInfo) (HTCapInfo & MBIT(1)) +/** GET HTCapInfo : Support for Greenfield */ +#define GETHT_GREENFIELD(HTCapInfo) (HTCapInfo & MBIT(4)) +/** GET HTCapInfo : Support for Short GI @ 20Mhz */ +#define GETHT_SHORTGI20(HTCapInfo) (HTCapInfo & MBIT(5)) +/** GET HTCapInfo : Support for Short GI @ 40Mhz */ +#define GETHT_SHORTGI40(HTCapInfo) (HTCapInfo & MBIT(6)) +/** GET HTCapInfo : Support for Tx STBC */ +#define GETHT_TXSTBC(HTCapInfo) (HTCapInfo & MBIT(7)) + +/** GET HTCapInfo : Support for Rx STBC */ +#define GETHT_RXSTBC(HTCapInfo) ((HTCapInfo >> 8) & 0x03) +/** GET HTCapInfo : Support for Delayed ACK */ +#define GETHT_DELAYEDBACK(HTCapInfo) (HTCapInfo & MBIT(10)) +/** GET HTCapInfo : Support for Max AMSDU */ +#define GETHT_MAXAMSDU(HTCapInfo) (HTCapInfo & MBIT(11)) + +/** SET HTCapInfo : Set support for LDPC coding capability */ +#define SETHT_LDPCCODINGCAP(HTCapInfo) (HTCapInfo |= MBIT(0)) +/** SET HTCapInfo : Set support for Channel BW */ +#define SETHT_SUPPCHANWIDTH(HTCapInfo) (HTCapInfo |= MBIT(1)) +/** SET HTCapInfo : Set support for Greenfield */ +#define SETHT_GREENFIELD(HTCapInfo) (HTCapInfo |= MBIT(4)) +/** SET HTCapInfo : Set support for Short GI @ 20Mhz */ +#define SETHT_SHORTGI20(HTCapInfo) (HTCapInfo |= MBIT(5)) +/** SET HTCapInfo : Set support for Short GI @ 40Mhz */ +#define SETHT_SHORTGI40(HTCapInfo) (HTCapInfo |= MBIT(6)) +/** SET HTCapInfo : Set support for Tx STBC */ +#define SETHT_TXSTBC(HTCapInfo) (HTCapInfo |= MBIT(7)) +/** SET HTCapInfo : Set support for Rx STBC */ +#define SETHT_RXSTBC(HTCapInfo, value) (HTCapInfo |= (value << 8)) +/** SET HTCapInfo : Set support for delayed block ack */ +#define SETHT_DELAYEDBACK(HTCapInfo) (HTCapInfo |= MBIT(10)) +/** SET HTCapInfo : Set support for Max size AMSDU */ +#define SETHT_MAXAMSDU(HTCapInfo) (HTCapInfo |= MBIT(11)) +/** SET HTCapInfo : Set support for DSSS/CCK Rates @ 40Mhz */ +#define SETHT_DSSSCCK40(HTCapInfo) (HTCapInfo |= MBIT(12)) +/** SET HTCapInfo : Enable 40Mhz Intolarence */ +#define SETHT_40MHZ_INTOLARANT(HTCapInfo) (HTCapInfo |= MBIT(14)) + +/** RESET HTCapInfo : Set support for LDPC coding capability */ +#define RESETHT_LDPCCODINGCAP(HTCapInfo) (HTCapInfo &= ~MBIT(0)) +/** RESET HTCapInfo : Set support for Channel BW */ +#define RESETHT_SUPPCHANWIDTH(HTCapInfo) (HTCapInfo &= ~MBIT(1)) +/** RESET HTCapInfo : Set support for Greenfield */ +#define RESETHT_GREENFIELD(HTCapInfo) (HTCapInfo &= ~MBIT(4)) +/** RESET HTCapInfo : Set support for Short GI @ 20Mhz */ +#define RESETHT_SHORTGI20(HTCapInfo) (HTCapInfo &= ~MBIT(5)) +/** RESET HTCapInfo : Set support for Short GI @ 40Mhz */ +#define RESETHT_SHORTGI40(HTCapInfo) (HTCapInfo &= ~MBIT(6)) +/** RESET HTCapInfo : Set support for Tx STBC */ +#define RESETHT_TXSTBC(HTCapInfo) (HTCapInfo &= ~MBIT(7)) +/** RESET HTCapInfo : Set support for Rx STBC */ +#define RESETHT_RXSTBC(HTCapInfo) (HTCapInfo &= ~(0x03 << 8)) +/** RESET HTCapInfo : Set support for delayed block ack */ +#define RESETHT_DELAYEDBACK(HTCapInfo) (HTCapInfo &= ~MBIT(10)) +/** RESET HTCapInfo : Set support for Max size AMSDU */ +#define RESETHT_MAXAMSDU(HTCapInfo) (HTCapInfo &= ~MBIT(11)) +/** RESET HTCapInfo : Disable 40Mhz Intolarence */ +#define RESETHT_40MHZ_INTOLARANT(HTCapInfo) (HTCapInfo &= ~MBIT(14)) +/** RESET HTExtCap : Clear RD Responder bit */ +#define RESETHT_EXTCAP_RDG(HTExtCap) (HTExtCap &= ~MBIT(11)) +/** SET MCS32 */ +#define SETHT_MCS32(x) (x[4] |= 1) +/** Set mcs set defined bit */ +#define SETHT_MCS_SET_DEFINED(x) (x[12] |= 1) +/** Set the highest Rx data rate */ +#define SETHT_RX_HIGHEST_DT_SUPP(x, y) ((*(t_u16 *) (x + 10)) = y) +/** AMPDU factor size */ +#define AMPDU_FACTOR_64K 0x03 +/** Set AMPDU size in A-MPDU paramter field */ +#define SETAMPDU_SIZE(x, y) do { \ + x = x & ~0x03; \ + x |= y & 0x03; \ +} while (0) \ +/** Set AMPDU spacing in A-MPDU paramter field */ +#define SETAMPDU_SPACING(x, y) do { \ + x = x & ~0x1c; \ + x |= (y & 0x07) << 2; \ +} while (0) \ + +/** RadioType : Support for Band A */ +#define ISSUPP_BANDA(FwCapInfo) (FwCapInfo & MBIT(10)) +/** RadioType : Support for 40Mhz channel BW */ +#define ISALLOWED_CHANWIDTH40(Field2) (Field2 & MBIT(2)) +/** RadioType : Set support 40Mhz channel */ +#define SET_CHANWIDTH40(Field2) (Field2 |= MBIT(2)) +/** RadioType : Reset support 40Mhz channel */ +#define RESET_CHANWIDTH40(Field2) (Field2 &= ~(MBIT(0) | MBIT(1) | MBIT(2))) +/** RadioType : Get secondary channel */ +#define GET_SECONDARYCHAN(Field2) (Field2 & (MBIT(0) | MBIT(1))) +/** RadioType : Set secondary channel */ +#define SET_SECONDARYCHAN(RadioType, SECCHAN) (RadioType |= (SECCHAN << 4)) + +/** ExtCap : Support for TDLS */ +#define ISSUPP_EXTCAP_TDLS(ext_cap) (ext_cap.TDLSSupport) +/** ExtCap : Set support TDLS */ +#define SET_EXTCAP_TDLS(ext_cap) (ext_cap.TDLSSupport = 1) +/** ExtCap : Reset support TDLS */ +#define RESET_EXTCAP_TDLS(ext_cap) (ext_cap.TDLSSupport = 0) +/** ExtCap : Support for TDLS UAPSD */ +#define ISSUPP_EXTCAP_TDLS_UAPSD(ext_cap) (ext_cap.TDLSPeerUAPSDSupport) +/** ExtCap : Set support TDLS UAPSD */ +#define SET_EXTCAP_TDLS_UAPSD(ext_cap) (ext_cap.TDLSPeerUAPSDSupport = 1) +/** ExtCap : Reset support TDLS UAPSD */ +#define RESET_EXTCAP_TDLS_UAPSD(ext_cap) (ext_cap.TDLSPeerUAPSDSupport = 0) +/** ExtCap : Support for TDLS CHANNEL SWITCH */ +#define ISSUPP_EXTCAP_TDLS_CHAN_SWITCH(ext_cap) (ext_cap.TDLSChannelSwitching) +/** ExtCap : Set support TDLS CHANNEL SWITCH */ +#define SET_EXTCAP_TDLS_CHAN_SWITCH(ext_cap) (ext_cap.TDLSChannelSwitching = 1) +/** ExtCap : Reset support TDLS CHANNEL SWITCH */ +#define RESET_EXTCAP_TDLS_CHAN_SWITCH(ext_cap) (ext_cap.TDLSChannelSwitching = 0) + +/** ExtCap : Support for Interworking */ +#define ISSUPP_EXTCAP_INTERWORKING(ext_cap) (ext_cap.Interworking) +/** ExtCap : Set support Interworking */ +#define SET_EXTCAP_INTERWORKING(ext_cap) (ext_cap.Interworking = 1) +/** ExtCap : Reset support Interworking */ +#define RESET_EXTCAP_INTERWORKING(ext_cap) (ext_cap.Interworking = 0) +/** ExtCap : Support for Operation Mode Notification */ +#define ISSUPP_EXTCAP_OPERMODENTF(ext_cap) (ext_cap.OperModeNtf) +/** ExtCap : Set support Operation Mode Notification */ +#define SET_EXTCAP_OPERMODENTF(ext_cap) (ext_cap.OperModeNtf = 1) +/** ExtCap : Reset support Operation Mode Notification */ +#define RESET_EXTCAP_OPERMODENTF(ext_cap) (ext_cap.OperModeNtf = 0) +/** ExtCap : Support for QosMap */ +#define ISSUPP_EXTCAP_QOS_MAP(ext_cap) (ext_cap.Qos_Map) +/** ExtCap : Set Support QosMap */ +#define SET_EXTCAP_QOS_MAP(ext_cap) (ext_cap.Qos_Map = 1) +/** ExtCap : Reset support QosMap */ +#define RESET_EXTCAP_QOS_MAP(ext_cap) (ext_cap.Qos_Map = 0) + +/** ExtCap : Support for TDLS wider bandwidth */ +#define ISSUPP_EXTCAP_TDLS_WIDER_BANDWIDTH(ext_cap) (ext_cap.TDLSWildBandwidth) +/** ExtCap : Set support TDLS wider bandwidth */ +#define SET_EXTCAP_TDLS_WIDER_BANDWIDTH(ext_cap) (ext_cap.TDLSWildBandwidth = 1) +/** ExtCap : Reset support TDLS wider bandwidth */ +#define RESET_EXTCAP_TDLS_WIDER_BANDWIDTH(ext_cap) (ext_cap.TDLSWildBandwidth = 0) + +/** LLC/SNAP header len */ +#define LLC_SNAP_LEN 8 + +/** HW_SPEC FwCapInfo */ +#define HWSPEC_11ACSGI80_SUPP MBIT(5) +#define HWSPEC_11ACRXSTBC_SUPP MBIT(8) + +#define ISSUPP_11ACENABLED(FwCapInfo) (FwCapInfo & (MBIT(12)|MBIT(13))) + +#define ISSUPP_11AC2GENABLED(FwCapInfo) (FwCapInfo & MBIT(12)) +#define ISSUPP_11AC5GENABLED(FwCapInfo) (FwCapInfo & MBIT(13)) + +/** HW_SPEC Dot11acDevCap : HTC-VHT supported */ +#define ISSUPP_11ACVHTHTCVHT(Dot11acDevCap) (Dot11acDevCap & MBIT(22)) +/** HW_SPEC Dot11acDevCap : VHT TXOP PS support */ +#define ISSUPP_11ACVHTTXOPPS(Dot11acDevCap) (Dot11acDevCap & MBIT(21)) +/** HW_SPEC Dot11acDevCap : MU RX beamformee support */ +#define ISSUPP_11ACMURXBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap & MBIT(20)) +/** HW_SPEC Dot11acDevCap : MU TX beamformee support */ +#define ISSUPP_11ACMUTXBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap & MBIT(19)) +/** HW_SPEC Dot11acDevCap : SU Beamformee support */ +#define ISSUPP_11ACSUBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap & MBIT(12)) +/** HW_SPEC Dot11acDevCap : SU Beamformer support */ +#define ISSUPP_11ACSUBEAMFORMER(Dot11acDevCap) (Dot11acDevCap & MBIT(11)) +/** HW_SPEC Dot11acDevCap : Rx STBC support */ +#define ISSUPP_11ACRXSTBC(Dot11acDevCap) (Dot11acDevCap & MBIT(8)) +/** HW_SPEC Dot11acDevCap : Tx STBC support */ +#define ISSUPP_11ACTXSTBC(Dot11acDevCap) (Dot11acDevCap & MBIT(7)) +/** HW_SPEC Dot11acDevCap : Short GI support for 160MHz BW */ +#define ISSUPP_11ACSGI160(Dot11acDevCap) (Dot11acDevCap & MBIT(6)) +/** HW_SPEC Dot11acDevCap : Short GI support for 80MHz BW */ +#define ISSUPP_11ACSGI80(Dot11acDevCap) (Dot11acDevCap & MBIT(5)) +/** HW_SPEC Dot11acDevCap : LDPC coding support */ +#define ISSUPP_11ACLDPC(Dot11acDevCap) (Dot11acDevCap & MBIT(4)) +/** HW_SPEC Dot11acDevCap : Channel BW 20/40/80/160/80+80 MHz support */ +#define ISSUPP_11ACBW8080(Dot11acDevCap) (Dot11acDevCap & MBIT(3)) +/** HW_SPEC Dot11acDevCap : Channel BW 20/40/80/160 MHz support */ +#define ISSUPP_11ACBW160(Dot11acDevCap) (Dot11acDevCap & MBIT(2)) + +/** Set VHT Cap Info: Max MPDU length */ +#define SET_VHTCAP_MAXMPDULEN(VHTCapInfo, value) (VHTCapInfo |= (value & 0x03)) +/** SET VHT CapInfo: Supported Channel Width SET (2 bits)*/ +#define SET_VHTCAP_CHWDSET(VHTCapInfo, value) (VHTCapInfo |= ((value & 0x3) << 2)) +/** SET VHT CapInfo: Rx STBC (3 bits) */ +#define SET_VHTCAP_RXSTBC(VHTCapInfo, value) (VHTCapInfo |= ((value & 0x7) << 8)) +/** SET VHT CapInfo: Commpressed Steering Num of BFer Ant Supported (3 bits) */ +#define SET_VHTCAP_SNBFERANT(VHTCapInfo, value) (VHTCapInfo |= ((value & 0x7) << 13)) +/** SET VHT CapInfo: Num of Sounding Dimensions (3 bits) */ +#define SET_VHTCAP_NUMSNDDM(VHTCapInfo, value) (VHTCapInfo |= ((value & 0x7) << 16)) +/** SET VHT CapInfo: Max AMPDU Length Exponent (3 bits) */ +#define SET_VHTCAP_MAXAMPDULENEXP(VHTCapInfo, value) (VHTCapInfo |= ((value & 0x7) << 23)) +/** SET VHT CapInfo: VHT Link Adaptation Capable (2 bits) */ +#define SET_VHTCAP_LINKADPCAP(VHTCapInfo, value) (VHTCapInfo |= ((value & 0x3) << 26)) + +/** HW_SPEC Dot11acDevCap : ReSet VHT Link Adapation Capable */ +#define RESET_11ACVHTLINKCAPA(Dot11acDevCap, value) (Dot11acDevCap &= ~(0x03)) +/** HW_SPEC Dot11acDevCap : ReSet Maximum AMPDU Length Exponent */ +#define RESET_11ACAMPDULENEXP(Dot11acDevCap, value) (Dot11acDevCap &= ~(0x07)) +/** HW_SPEC Dot11acDevCap : ReSet support of HTC-VHT */ +#define RESET_11ACVHTHTCVHT(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(22)) +/** HW_SPEC Dot11acDevCap : ReSet support of VHT TXOP PS */ +#define RESET_11ACVHTTXOPPS(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(21)) +/** HW_SPEC Dot11acDevCap : ReSet support of MU RX beamformee */ +#define RESET_11ACMURXBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(20)) +/** HW_SPEC Dot11acDevCap : ReSet support of MU TX beamformee */ +#define RESET_11ACMUTXBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(19)) +/** HW_SPEC Dot11acDevCap : ReSet Number of Sounding Dimensions */ +#define RESET_11ACSOUNDINGNUM(Dot11acDevCap) (Dot11acDevCap &= ~((0x07) << 16)) +/** HW_SPEC Dot11acDevCap : ReSet Compressed Steering Number + * of Beamformer Antenna */ +#define RESET_11ACBFANTNUM(Dot11acDevCap) (Dot11acDevCap &= ~((0x07) << 13)) +/** HW_SPEC Dot11acDevCap : ReSet support of SU Beamformee */ +#define RESET_11ACSUBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(12)) +/** HW_SPEC Dot11acDevCap : ReSet support of SU Beamformer */ +#define RESET_11ACSUBEAMFORMER(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(11)) +/** HW_SPEC Dot11acDevCap : ReSet support of Rx STBC */ +#define RESET_11ACRXSTBC(Dot11acDevCap) (Dot11acDevCap &= ~((0x07) << 8)) +/** HW_SPEC Dot11acDevCap : ReSet support of Tx STBC */ +#define RESET_11ACTXSTBC(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(7)) +/** HW_SPEC Dot11acDevCap : ReSet support of Short GI support for 160MHz BW */ +#define RESET_11ACSGI160(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(6)) +/** HW_SPEC Dot11acDevCap : ReSet support of Short GI support for 80MHz BW */ +#define RESET_11ACSGI80(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(5)) +/** HW_SPEC Dot11acDevCap : ReSet support of LDPC coding */ +#define RESET_11ACLDPC(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(4)) +/** HW_SPEC Dot11acDevCap : ReSet support of + * Channel BW 20/40/80/160/80+80 MHz */ +#define RESET_11ACBW8080(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(3)) +/** HW_SPEC Dot11acDevCap : ReSet support of + * Channel BW 20/40/80/160 MHz */ +#define RESET_11ACBW160(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(2)) +/** HW_SPEC Dot11acDevCap : ReSet Max MPDU length */ +#define RESET_11ACMAXMPDULEN(Dot11acDevCap) (Dot11acDevCap &= ~(0x03)) + +/** Default 11ac capability mask for 2.4GHz */ +#define DEFAULT_11AC_CAP_MASK_BG (HWSPEC_11ACSGI80_SUPP | HWSPEC_11ACRXSTBC_SUPP) +/** Default 11ac capability mask for 5GHz */ +#define DEFAULT_11AC_CAP_MASK_A (HWSPEC_11ACSGI80_SUPP | HWSPEC_11ACRXSTBC_SUPP) +/** GET VHT CapInfo : MAX MPDU Length */ +#define GET_VHTCAP_MAXMPDULEN(VHTCapInfo) (VHTCapInfo & 0x3) +/** GET VHT CapInfo: Supported Channel Width SET (2 bits)*/ +#define GET_VHTCAP_CHWDSET(VHTCapInfo) ((VHTCapInfo >> 2) & 0x3) +/** GET VHT CapInfo: Rx STBC (3 bits) */ +#define GET_VHTCAP_RXSTBC(VHTCapInfo) ((VHTCapInfo >> 8) & 0x7) +/** GET VHT CapInfo: Compressed Steering Num of BFer Ant Supported (3 bits) */ +#define GET_VHTCAP_SNBFERANT(VHTCapInfo) ((VHTCapInfo >> 13) & 0x7) +/** GET VHT CapInfo: Num of Sounding Dimensions (3 bits) */ +#define GET_VHTCAP_NUMSNDDM(VHTCapInfo) ((VHTCapInfo >> 16) & 0x7) +/** GET VHT CapInfo: Max AMPDU Length Exponent (3 bits) */ +#define GET_VHTCAP_MAXAMPDULENEXP(VHTCapInfo) ((VHTCapInfo >> 23) & 0x7) +/** GET VHT CapInfo: VHT Link Adaptation Capable (2 bits) */ +#define GET_VHTCAP_LINKADPCAP(VHTCapInfo) ((VHTCapInfo >> 26) & 0x3) + +#define GET_VHTMCS(MCSMapSet) (MCSMapSet & 0xFFFF) +#define GET_VHTNSSMCS(MCSMapSet, nss) ((MCSMapSet >> (2*(nss-1)))&0x3) +#define RET_VHTNSSMCS(MCSMapSet, nss) ((MCSMapSet >> (2*(nss-1)))&0x3) +#define SET_VHTNSSMCS(MCSMapSet, nss, value) \ + (MCSMapSet |= (value & 0x3) << (2 * (nss - 1))) + +/** DevMCSSupported : Tx MCS supported */ +#define GET_DEVTXMCSMAP(DevMCSMap) (DevMCSMap >> 16) +#define GET_DEVNSSTXMCS(DevMCSMap, nss) ((DevMCSMap >> (2*(nss-1)+16))&0x3) +#define SET_DEVNSSTXMCS(DevMCSMap, nss, value) \ + (DevMCSMap |= (value & 0x3) << (2 * (nss - 1) + 16)) +#define RESET_DEVTXMCSMAP(DevMCSMap) (DevMCSMap &= 0xFFFF) +/** DevMCSSupported : Rx MCS supported */ +#define GET_DEVRXMCSMAP(DevMCSMap) (DevMCSMap & 0xFFFF) +#define GET_DEVNSSRXMCS(DevMCSMap, nss) ((DevMCSMap >> (2*(nss-1)))&0x3) +#define SET_DEVNSSRXMCS(DevMCSMap, nss, value) \ + (DevMCSMap |= (value & 0x3) << (2 * (nss - 1))) +#define RESET_DEVRXMCSMAP(DevMCSMap) (DevMCSMap &= 0xFFFF0000) + +/** clear SU Beanformer and MU beanformer and MU beanformee */ +#define DEFALUT_11AC_CAP_BEAMFORMING_RESET_MASK (MBIT(11)|MBIT(16)|MBIT(17)|MBIT(18)|MBIT(19)|MBIT(20)) + +/** TLV type : Rate scope */ +#define TLV_TYPE_RATE_DROP_PATTERN (PROPRIETARY_TLV_BASE_ID + 0x51) /* 0x0151 + */ +/** TLV type : Rate drop pattern */ +#define TLV_TYPE_RATE_DROP_CONTROL (PROPRIETARY_TLV_BASE_ID + 0x52) /* 0x0152 + */ +/** TLV type : Rate scope */ +#define TLV_TYPE_RATE_SCOPE (PROPRIETARY_TLV_BASE_ID + 0x53) /* 0x0153 + */ + +/** TLV type : Power group */ +#define TLV_TYPE_POWER_GROUP (PROPRIETARY_TLV_BASE_ID + 0x54) /* 0x0154 + */ + +/** Modulation class for DSSS Rates */ +#define MOD_CLASS_HR_DSSS 0x03 +/** Modulation class for OFDM Rates */ +#define MOD_CLASS_OFDM 0x07 +/** Modulation class for HT Rates */ +#define MOD_CLASS_HT 0x08 +/** Modulation class for VHT Rates */ +#define MOD_CLASS_VHT 0x09 +/** HT bandwidth 20 MHz */ +#define HT_BW_20 0 +/** HT bandwidth 40 MHz */ +#define HT_BW_40 1 +/** HT bandwidth 80 MHz */ +#define HT_BW_80 2 + +/** TLV type : Scan Response */ +#define TLV_TYPE_BSS_SCAN_RSP (PROPRIETARY_TLV_BASE_ID + 0x56) /* 0x0156 + */ +/** TLV type : Scan Response Stats */ +#define TLV_TYPE_BSS_SCAN_INFO (PROPRIETARY_TLV_BASE_ID + 0x57) /* 0x0157 + */ + +/** TLV type : 11h Basic Rpt */ +#define TLV_TYPE_CHANRPT_11H_BASIC (PROPRIETARY_TLV_BASE_ID + 0x5b) /* 0x015b + */ + +/** TLV type : Action frame */ +#define TLV_TYPE_IEEE_ACTION_FRAME (PROPRIETARY_TLV_BASE_ID + 0x8c) /* 0x018c + */ + +/** TLV type : SCAN channel gap */ +#define TLV_TYPE_SCAN_CHANNEL_GAP (PROPRIETARY_TLV_BASE_ID + 0xc5) /* 0x01c5 + */ +/** TLV type : Channel statistics */ +#define TLV_TYPE_CHANNEL_STATS (PROPRIETARY_TLV_BASE_ID + 0xc6) /* 0x01c6 + */ +/** TLV type : BSS_MODE */ +#define TLV_TYPE_BSS_MODE (PROPRIETARY_TLV_BASE_ID + 0xce) /* 0x01ce + */ + +/** Firmware Host Command ID Constants */ +/** Host Command ID : Get hardware specifications */ +#define HostCmd_CMD_GET_HW_SPEC 0x0003 +/** Host Command ID : 802.11 scan */ +#define HostCmd_CMD_802_11_SCAN 0x0006 +/** Host Command ID : 802.11 get log */ +#define HostCmd_CMD_802_11_GET_LOG 0x000b +/** Host Command ID : MAC multicast address */ +#define HostCmd_CMD_MAC_MULTICAST_ADR 0x0010 +/** Host Command ID : 802.11 EEPROM access */ +#define HostCmd_CMD_802_11_EEPROM_ACCESS 0x0059 +/** Host Command ID : 802.11 associate */ +#define HostCmd_CMD_802_11_ASSOCIATE 0x0012 + +/** Host Command ID : 802.11 SNMP MIB */ +#define HostCmd_CMD_802_11_SNMP_MIB 0x0016 +/** Host Command ID : MAC register access */ +#define HostCmd_CMD_MAC_REG_ACCESS 0x0019 +/** Host Command ID : BBP register access */ +#define HostCmd_CMD_BBP_REG_ACCESS 0x001a +/** Host Command ID : RF register access */ +#define HostCmd_CMD_RF_REG_ACCESS 0x001b + +/** Host Command ID : 802.11 radio control */ +#define HostCmd_CMD_802_11_RADIO_CONTROL 0x001c +/** Host Command ID : 802.11 RF channel */ +#define HostCmd_CMD_802_11_RF_CHANNEL 0x001d +/** Host Command ID : 802.11 RF Tx power */ +#define HostCmd_CMD_802_11_RF_TX_POWER 0x001e + +/** Host Command ID : 802.11 RF antenna */ +#define HostCmd_CMD_802_11_RF_ANTENNA 0x0020 + +/** Host Command ID : 802.11 deauthenticate */ +#define HostCmd_CMD_802_11_DEAUTHENTICATE 0x0024 +/** Host Command ID: 802.11 disassoicate */ +#define HostCmd_CMD_802_11_DISASSOCIATE 0x0026 +/** Host Command ID : MAC control */ +#define HostCmd_CMD_MAC_CONTROL 0x0028 +/** Host Command ID : 802.11 Ad-Hoc start */ +#define HostCmd_CMD_802_11_AD_HOC_START 0x002b +/** Host Command ID : 802.11 Ad-Hoc join */ +#define HostCmd_CMD_802_11_AD_HOC_JOIN 0x002c + +/** Host Command ID : 802.11 key material */ +#define HostCmd_CMD_802_11_KEY_MATERIAL 0x005e + +/** Host Command ID : 802.11 Ad-Hoc stop */ +#define HostCmd_CMD_802_11_AD_HOC_STOP 0x0040 + +/** Host Command ID : 802.22 MAC address */ +#define HostCmd_CMD_802_11_MAC_ADDRESS 0x004D + +/** Host Command ID : WMM Traffic Stream Status */ +#define HostCmd_CMD_WMM_TS_STATUS 0x005d + +/** Host Command ID : 802.11 D domain information */ +#define HostCmd_CMD_802_11D_DOMAIN_INFO 0x005b + +/** Host Command ID : 802.11 TPC information */ +#define HostCmd_CMD_802_11_TPC_INFO 0x005f +/** Host Command ID : 802.11 TPC adapt req */ +#define HostCmd_CMD_802_11_TPC_ADAPT_REQ 0x0060 +/** Host Command ID : 802.11 channel SW ann */ +#define HostCmd_CMD_802_11_CHAN_SW_ANN 0x0061 + +/** Host Command ID : Measurement request */ +#define HostCmd_CMD_MEASUREMENT_REQUEST 0x0062 +/** Host Command ID : Measurement report */ +#define HostCmd_CMD_MEASUREMENT_REPORT 0x0063 + +/** Host Command ID : 802.11 sleep parameters */ +#define HostCmd_CMD_802_11_SLEEP_PARAMS 0x0066 + +/** Host Command ID : 802.11 sleep period */ +#define HostCmd_CMD_802_11_SLEEP_PERIOD 0x0068 + +/** Host Command ID: 802.11 BG scan config */ +#define HostCmd_CMD_802_11_BG_SCAN_CONFIG 0x006b +/** Host Command ID : 802.11 BG scan query */ +#define HostCmd_CMD_802_11_BG_SCAN_QUERY 0x006c + +/** Host Command ID : WMM ADDTS req */ +#define HostCmd_CMD_WMM_ADDTS_REQ 0x006E +/** Host Command ID : WMM DELTS req */ +#define HostCmd_CMD_WMM_DELTS_REQ 0x006F +/** Host Command ID : WMM queue configuration */ +#define HostCmd_CMD_WMM_QUEUE_CONFIG 0x0070 +/** Host Command ID : 802.11 get status */ +#define HostCmd_CMD_WMM_GET_STATUS 0x0071 + +/** Host Command ID : 802.11 subscribe event */ +#define HostCmd_CMD_802_11_SUBSCRIBE_EVENT 0x0075 + +/** Host Command ID : 802.11 Tx rate query */ +#define HostCmd_CMD_802_11_TX_RATE_QUERY 0x007f + +/** Host Command ID : WMM queue stats */ +#define HostCmd_CMD_WMM_QUEUE_STATS 0x0081 + +/** Host Command ID : 802.11 IBSS coalescing status */ +#define HostCmd_CMD_802_11_IBSS_COALESCING_STATUS 0x0083 + +/** Host Command ID : Memory access */ +#define HostCmd_CMD_MEM_ACCESS 0x0086 + +/** Host Command ID : SDIO GPIO interrupt configuration */ +#define HostCmd_CMD_SDIO_GPIO_INT_CONFIG 0x0088 + +#ifdef MFG_CMD_SUPPORT +/** Host Command ID : Mfg command */ +#define HostCmd_CMD_MFG_COMMAND 0x0089 +#endif +/** Host Command ID : Inactivity timeout ext */ +#define HostCmd_CMD_INACTIVITY_TIMEOUT_EXT 0x008a + +/** Host Command ID : DBGS configuration */ +#define HostCmd_CMD_DBGS_CFG 0x008b +/** Host Command ID : Get memory */ +#define HostCmd_CMD_GET_MEM 0x008c + +/** Host Command ID : Cal data dnld */ +#define HostCmd_CMD_CFG_DATA 0x008f + +/** Host Command ID : SDIO pull control */ +#define HostCmd_CMD_SDIO_PULL_CTRL 0x0093 + +/** Host Command ID : ECL system clock configuration */ +#define HostCmd_CMD_ECL_SYSTEM_CLOCK_CONFIG 0x0094 + +/** Host Command ID : Extended version */ +#define HostCmd_CMD_VERSION_EXT 0x0097 + +/** Host Command ID : MEF configuration */ +#define HostCmd_CMD_MEF_CFG 0x009a + +/** Host Command ID : 802.11 RSSI INFO*/ +#define HostCmd_CMD_RSSI_INFO 0x00a4 + +/** Host Command ID : Function initialization */ +#define HostCmd_CMD_FUNC_INIT 0x00a9 +/** Host Command ID : Function shutdown */ +#define HostCmd_CMD_FUNC_SHUTDOWN 0x00aa + +/** Host Command ID :EAPOL PKT */ +#define HostCmd_CMD_802_11_EAPOL_PKT 0x012e + +/** Host Command ID: Multi chan config */ +#define HostCmd_CMD_MULTI_CHAN_CONFIG 0x011e +/** Host Command ID: Multi chan policy */ +#define HostCmd_CMD_MULTI_CHAN_POLICY 0x0121 +/** TLV ID for multi chan info */ +#define TLV_TYPE_MULTI_CHAN_INFO (PROPRIETARY_TLV_BASE_ID + 0xb7) +/** TLV ID for multi chan group info */ +#define TLV_TYPE_MULTI_CHAN_GROUP_INFO_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0xb8) + +#ifdef RX_PACKET_COALESCE +/** TLV ID for RX pkt coalesce config */ +#define TLV_TYPE_RX_PKT_COAL_CONFIG (PROPRIETARY_TLV_BASE_ID + 0xC9) +#endif + +/** Host Command ID : Channel report request */ +#define HostCmd_CMD_CHAN_REPORT_REQUEST 0x00dd + +/** Host Command ID: SUPPLICANT_PMK */ +#define HostCmd_CMD_SUPPLICANT_PMK 0x00c4 +/** Host Command ID: SUPPLICANT_PROFILE */ +#define HostCmd_CMD_SUPPLICANT_PROFILE 0x00c5 + +/** Host Command ID : Add Block Ack Request */ +#define HostCmd_CMD_11N_ADDBA_REQ 0x00ce +/** Host Command ID : Delete a Block Ack Request */ +#define HostCmd_CMD_11N_CFG 0x00cd +/** Host Command ID : Add Block Ack Response */ +#define HostCmd_CMD_11N_ADDBA_RSP 0x00cf +/** Host Command ID : Delete a Block Ack Request */ +#define HostCmd_CMD_11N_DELBA 0x00d0 +/** Host Command ID: Configure Tx Buf size */ +#define HostCmd_CMD_RECONFIGURE_TX_BUFF 0x00d9 +/** Host Command ID: AMSDU Aggr Ctrl */ +#define HostCmd_CMD_AMSDU_AGGR_CTRL 0x00df +/** Host Command ID: 11AC config */ +#define HostCmd_CMD_11AC_CFG 0x0112 +/** Host Command ID: Configure TX Beamforming capability */ +#define HostCmd_CMD_TX_BF_CFG 0x0104 + +/** Host Command ID : 802.11 TX power configuration */ +#define HostCmd_CMD_TXPWR_CFG 0x00d1 + +/** Host Command ID : Soft Reset */ +#define HostCmd_CMD_SOFT_RESET 0x00d5 + +/** Host Command ID : 802.11 b/g/n rate configration */ +#define HostCmd_CMD_TX_RATE_CFG 0x00d6 + +/** Host Command ID : Enhanced PS mode */ +#define HostCmd_CMD_802_11_PS_MODE_ENH 0x00e4 + +/** Host command action : Host sleep configuration */ +#define HostCmd_CMD_802_11_HS_CFG_ENH 0x00e5 + +/** Host Command ID : CAU register access */ +#define HostCmd_CMD_CAU_REG_ACCESS 0x00ed + +/** Host Command ID : mgmt IE list */ +#define HostCmd_CMD_MGMT_IE_LIST 0x00f2 + +/** Host Command ID : TDLS configuration */ +#define HostCmd_CMD_TDLS_CONFIG 0x0100 +/** Host Command ID : TDLS operation */ +#define HostCmd_CMD_TDLS_OPERATION 0x0122 + +#ifdef RX_PACKET_COALESCE +/** Host Command ID : Rx packet coalescing configuration */ +#define HostCmd_CMD_RX_PKT_COALESCE_CFG 0x012c +#endif + +/** Host Command ID : Extended scan support */ +#define HostCmd_CMD_802_11_SCAN_EXT 0x0107 + +/** Host Command ID : Forward mgmt frame */ +#define HostCmd_CMD_RX_MGMT_IND 0x010c + +/** Host Command ID : Set BSS_MODE */ +#define HostCmd_CMD_SET_BSS_MODE 0x00f7 + +#ifdef UAP_SUPPORT +/** Host Command id: SYS_INFO */ +#define HOST_CMD_APCMD_SYS_INFO 0x00ae +/** Host Command id: sys_reset */ +#define HOST_CMD_APCMD_SYS_RESET 0x00af +/** Host Command id: SYS_CONFIGURE */ +#define HOST_CMD_APCMD_SYS_CONFIGURE 0x00b0 +/** Host Command id: BSS_START */ +#define HOST_CMD_APCMD_BSS_START 0x00b1 +/** Host Command id: BSS_STOP */ +#define HOST_CMD_APCMD_BSS_STOP 0x00b2 +/** Host Command id: sta_list */ +#define HOST_CMD_APCMD_STA_LIST 0x00b3 +/** Host Command id: STA_DEAUTH */ +#define HOST_CMD_APCMD_STA_DEAUTH 0x00b5 + +/** Host Command id: REPORT_MIC */ +#define HOST_CMD_APCMD_REPORT_MIC 0x00ee +/** Host Command id: UAP_OPER_CTRL */ +#define HOST_CMD_APCMD_OPER_CTRL 0x0233 +#endif /* UAP_SUPPORT */ + +/** Host Command ID: Tx data pause */ +#define HostCmd_CMD_CFG_TX_DATA_PAUSE 0x0103 + +#ifdef WIFI_DIRECT_SUPPORT +/** Host Command ID: P2P PARAMS CONFIG */ +#define HOST_CMD_P2P_PARAMS_CONFIG 0x00ea +/** Host Command ID: WIFI_DIRECT_MODE_CONFIG */ +#define HOST_CMD_WIFI_DIRECT_MODE_CONFIG 0x00eb +/** Host Command ID: Remain On Channel */ +#define HostCmd_CMD_802_11_REMAIN_ON_CHANNEL 0x010d +#endif + +#define HostCmd_CMD_COALESCE_CFG 0x010a + +/** Host Command ID : OTP user data */ +#define HostCmd_CMD_OTP_READ_USER_DATA 0x0114 + +/** Host Command ID: HS wakeup reason */ +#define HostCmd_CMD_HS_WAKEUP_REASON 0x0116 + +/** Host Command ID: reject addba request */ +#define HostCmd_CMD_REJECT_ADDBA_REQ 0x0119 + +#define HostCMD_CONFIG_LOW_POWER_MODE 0x0128 + +/** Host Command ID : Target device access */ +#define HostCmd_CMD_TARGET_ACCESS 0x012a + +/** Enhanced PS modes */ +typedef enum _ENH_PS_MODES { + GET_PS = 0, + SLEEP_CONFIRM = 5, + DIS_AUTO_PS = 0xfe, + EN_AUTO_PS = 0xff, +} ENH_PS_MODES; + +/** Command RET code, MSB is set to 1 */ +#define HostCmd_RET_BIT 0x8000 + +/** General purpose action : Get */ +#define HostCmd_ACT_GEN_GET 0x0000 +/** General purpose action : Set */ +#define HostCmd_ACT_GEN_SET 0x0001 +/** General purpose action : Get_Current */ +#define HostCmd_ACT_GEN_GET_CURRENT 0x0003 +/** General purpose action : Remove */ +#define HostCmd_ACT_GEN_REMOVE 0x0004 + +/** Host command action : Set Rx */ +#define HostCmd_ACT_SET_RX 0x0001 +/** Host command action : Set Tx */ +#define HostCmd_ACT_SET_TX 0x0002 +/** Host command action : Set both Rx and Tx */ +#define HostCmd_ACT_SET_BOTH 0x0003 +/** Host command action : Get Rx */ +#define HostCmd_ACT_GET_RX 0x0004 +/** Host command action : Get Tx */ +#define HostCmd_ACT_GET_TX 0x0008 +/** Host command action : Get both Rx and Tx */ +#define HostCmd_ACT_GET_BOTH 0x000c + +/** General Result Code*/ +/** General result code OK */ +#define HostCmd_RESULT_OK 0x0000 +/** Genenral error */ +#define HostCmd_RESULT_ERROR 0x0001 +/** Command is not valid */ +#define HostCmd_RESULT_NOT_SUPPORT 0x0002 +/** Command is pending */ +#define HostCmd_RESULT_PENDING 0x0003 +/** System is busy (command ignored) */ +#define HostCmd_RESULT_BUSY 0x0004 +/** Data buffer is not big enough */ +#define HostCmd_RESULT_PARTIAL_DATA 0x0005 + +/* Define action or option for HostCmd_CMD_MAC_CONTROL */ +/** MAC action : Rx on */ +#define HostCmd_ACT_MAC_RX_ON 0x0001 +/** MAC action : Tx on */ +#define HostCmd_ACT_MAC_TX_ON 0x0002 +/** MAC action : WEP enable */ +#define HostCmd_ACT_MAC_WEP_ENABLE 0x0008 +/** MAC action : EthernetII enable */ +#define HostCmd_ACT_MAC_ETHERNETII_ENABLE 0x0010 +/** MAC action : Promiscous mode enable */ +#define HostCmd_ACT_MAC_PROMISCUOUS_ENABLE 0x0080 +/** MAC action : All multicast enable */ +#define HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE 0x0100 +/** MAC action : RTS/CTS enable */ +#define HostCmd_ACT_MAC_RTS_CTS_ENABLE 0x0200 +/** MAC action : Strict protection enable */ +#define HostCmd_ACT_MAC_STRICT_PROTECTION_ENABLE 0x0400 +/** MAC action : Force 11n protection disable */ +#define HostCmd_ACT_MAC_FORCE_11N_PROTECTION_OFF 0x0800 +/** MAC action : Ad-Hoc G protection on */ +#define HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON 0x2000 +/** MAC action : Static-Dynamic BW enable */ +#define HostCmd_ACT_MAC_STATIC_DYNAMIC_BW_ENABLE MBIT(16) +/** MAC action : Dynamic BW */ +#define HostCmd_ACT_MAC_DYNAMIC_BW MBIT(17) + +/* Define action or option for HostCmd_CMD_802_11_SCAN */ +/** Scan type : BSS */ +#define HostCmd_BSS_MODE_BSS 0x0001 +/** Scan type : IBSS */ +#define HostCmd_BSS_MODE_IBSS 0x0002 +/** Scan type : Any */ +#define HostCmd_BSS_MODE_ANY 0x0003 + +/* Radio type definitions for the channel TLV */ +/** Radio type BG */ +#define HostCmd_SCAN_RADIO_TYPE_BG 0 +/** Radio type A */ +#define HostCmd_SCAN_RADIO_TYPE_A 1 + +/** Define bitmap conditions for HOST_SLEEP_CFG : GPIO FF */ +#define HOST_SLEEP_CFG_GPIO_FF 0xff +/** Define bitmap conditions for HOST_SLEEP_CFG : GAP FF */ +#define HOST_SLEEP_CFG_GAP_FF 0xff + +/** Buffer Constants */ +/** Number of command buffers */ +#define MRVDRV_NUM_OF_CMD_BUFFER 30 +/** Size of command buffer */ +#define MRVDRV_SIZE_OF_CMD_BUFFER (2 * 1024) + +/** Maximum number of BSS Descriptors */ +#define MRVDRV_MAX_BSSID_LIST 200 + +/** Host command flag in command */ +#define CMD_F_HOSTCMD (1 << 0) +/** command cancel flag in command */ +#define CMD_F_CANCELED (1 << 1) +/** scan command flag */ +#define CMD_F_SCAN (1 << 2) + +/** Host Command ID bit mask (bit 11:0) */ +#define HostCmd_CMD_ID_MASK 0x0fff + +/** Host Command Sequence number mask (bit 7:0) */ +#define HostCmd_SEQ_NUM_MASK 0x00ff + +/** Host Command BSS number mask (bit 11:8) */ +#define HostCmd_BSS_NUM_MASK 0x0f00 + +/** Host Command BSS type mask (bit 15:12) */ +#define HostCmd_BSS_TYPE_MASK 0xf000 + +/** Set BSS information to Host Command */ +#define HostCmd_SET_SEQ_NO_BSS_INFO(seq, num, type) \ + ((((seq) & 0x00ff) | \ + (((num) & 0x000f) << 8)) | \ + (((type) & 0x000f) << 12)) + +/** Get Sequence Number from Host Command (bit 7:0) */ +#define HostCmd_GET_SEQ_NO(seq) \ + ((seq) & HostCmd_SEQ_NUM_MASK) + +/** Get BSS number from Host Command (bit 11:8) */ +#define HostCmd_GET_BSS_NO(seq) \ + (((seq) & HostCmd_BSS_NUM_MASK) >> 8) + +/** Get BSS type from Host Command (bit 15:12) */ +#define HostCmd_GET_BSS_TYPE(seq) \ + (((seq) & HostCmd_BSS_TYPE_MASK) >> 12) + +/** Card Event definition : Dummy host wakeup signal */ +#define EVENT_DUMMY_HOST_WAKEUP_SIGNAL 0x00000001 +/** Card Event definition : Link lost */ +#define EVENT_LINK_LOST 0x00000003 +/** Card Event definition : Link sensed */ +#define EVENT_LINK_SENSED 0x00000004 +/** Card Event definition : MIB changed */ +#define EVENT_MIB_CHANGED 0x00000006 +/** Card Event definition : Init done */ +#define EVENT_INIT_DONE 0x00000007 +/** Card Event definition : Deauthenticated */ +#define EVENT_DEAUTHENTICATED 0x00000008 +/** Card Event definition : Disassociated */ +#define EVENT_DISASSOCIATED 0x00000009 +/** Card Event definition : Power save awake */ +#define EVENT_PS_AWAKE 0x0000000a +/** Card Event definition : Power save sleep */ +#define EVENT_PS_SLEEP 0x0000000b +/** Card Event definition : MIC error multicast */ +#define EVENT_MIC_ERR_MULTICAST 0x0000000d +/** Card Event definition : MIC error unicast */ +#define EVENT_MIC_ERR_UNICAST 0x0000000e + +/** Card Event definition : Ad-Hoc BCN lost */ +#define EVENT_ADHOC_BCN_LOST 0x00000011 + +/** Card Event definition : Stop Tx */ +#define EVENT_STOP_TX 0x00000013 +/** Card Event definition : Start Tx */ +#define EVENT_START_TX 0x00000014 +/** Card Event definition : Channel switch */ +#define EVENT_CHANNEL_SWITCH 0x00000015 + +/** Card Event definition : MEAS report ready */ +#define EVENT_MEAS_REPORT_RDY 0x00000016 + +/** Card Event definition : WMM status change */ +#define EVENT_WMM_STATUS_CHANGE 0x00000017 + +/** Card Event definition : BG scan report */ +#define EVENT_BG_SCAN_REPORT 0x00000018 +/** Card Event definition : BG scan stopped */ +#define EVENT_BG_SCAN_STOPPED 0x00000065 + +/** Card Event definition : Beacon RSSI low */ +#define EVENT_RSSI_LOW 0x00000019 +/** Card Event definition : Beacon SNR low */ +#define EVENT_SNR_LOW 0x0000001a +/** Card Event definition : Maximum fail */ +#define EVENT_MAX_FAIL 0x0000001b +/** Card Event definition : Beacon RSSI high */ +#define EVENT_RSSI_HIGH 0x0000001c +/** Card Event definition : Beacon SNR high */ +#define EVENT_SNR_HIGH 0x0000001d + +/** Card Event definition : IBSS coalsced */ +#define EVENT_IBSS_COALESCED 0x0000001e + +/** Card Event definition : Data RSSI low */ +#define EVENT_DATA_RSSI_LOW 0x00000024 +/** Card Event definition : Data SNR low */ +#define EVENT_DATA_SNR_LOW 0x00000025 +/** Card Event definition : Data RSSI high */ +#define EVENT_DATA_RSSI_HIGH 0x00000026 +/** Card Event definition : Data SNR high */ +#define EVENT_DATA_SNR_HIGH 0x00000027 + +/** Card Event definition : Link Quality */ +#define EVENT_LINK_QUALITY 0x00000028 + +/** Card Event definition : Port release event */ +#define EVENT_PORT_RELEASE 0x0000002b + +/** Card Event definition : Pre-Beacon Lost */ +#define EVENT_PRE_BEACON_LOST 0x00000031 + +/** Card Event definition : Add BA event */ +#define EVENT_ADDBA 0x00000033 +/** Card Event definition : Del BA event */ +#define EVENT_DELBA 0x00000034 +/** Card Event definition: BA stream timeout*/ +#define EVENT_BA_STREAM_TIMEOUT 0x00000037 + +/** Card Event definition : AMSDU aggr control */ +#define EVENT_AMSDU_AGGR_CTRL 0x00000042 + +/** Card Event definition: WEP ICV error */ +#define EVENT_WEP_ICV_ERR 0x00000046 + +/** Card Event definition : Host sleep enable */ +#define EVENT_HS_ACT_REQ 0x00000047 + +/** Card Event definition : BW changed */ +#define EVENT_BW_CHANGE 0x00000048 + +#ifdef WIFI_DIRECT_SUPPORT +/** WIFIDIRECT generic event */ +#define EVENT_WIFIDIRECT_GENERIC_EVENT 0x00000049 +/** WIFIDIRECT service discovery event */ +#define EVENT_WIFIDIRECT_SERVICE_DISCOVERY 0x0000004a +/** Remain on Channel expired event */ +#define EVENT_REMAIN_ON_CHANNEL_EXPIRED 0x0000005f +#endif + +/** TDLS generic event */ +#define EVENT_TDLS_GENERIC_EVENT 0x00000052 + +/** Card Event definition: Channel switch pending announcment */ +#define EVENT_CHANNEL_SWITCH_ANN 0x00000050 + +/** Event definition: Radar Detected by card */ +#define EVENT_RADAR_DETECTED 0x00000053 + +/** Event definition: Radar Detected by card */ +#define EVENT_CHANNEL_REPORT_RDY 0x00000054 + +/** Event definition: Scan results through event */ +#define EVENT_EXT_SCAN_REPORT 0x00000058 + +/** Event definition : FW debug information */ +#define EVENT_FW_DEBUG_INFO 0x00000063 + +/** Event definition: RXBA_SYNC */ +#define EVENT_RXBA_SYNC 0x00000059 + +#ifdef UAP_SUPPORT +/** Event ID: STA deauth */ +#define EVENT_MICRO_AP_STA_DEAUTH 0x0000002c +/** Event ID: STA assoicated */ +#define EVENT_MICRO_AP_STA_ASSOC 0x0000002d +/** Event ID: BSS started */ +#define EVENT_MICRO_AP_BSS_START 0x0000002e +/** Event ID: BSS idle event */ +#define EVENT_MICRO_AP_BSS_IDLE 0x00000043 +/** Event ID: BSS active event */ +#define EVENT_MICRO_AP_BSS_ACTIVE 0x00000044 + +/** Event ID: MIC countermeasures event */ +#define EVENT_MICRO_AP_MIC_COUNTERMEASURES 0x0000004c +#endif /* UAP_SUPPORT */ + +/** Event ID: TX data pause event */ +#define EVENT_TX_DATA_PAUSE 0x00000055 + +/** Event ID: SAD Report */ +#define EVENT_SAD_REPORT 0x00000066 + +/** Event ID: Multi Chan Info*/ +#define EVENT_MULTI_CHAN_INFO 0x0000006a + +/** Event ID: Tx status */ +#define EVENT_TX_STATUS_REPORT 0x00000074 + +#define EVENT_BT_COEX_WLAN_PARA_CHANGE 0x00000076 + +#define EVENT_FW_DUMP_INFO 0x0000FFFE +/** Event ID mask */ +#define EVENT_ID_MASK 0xffff + +/** BSS number mask */ +#define BSS_NUM_MASK 0xf + +/** Get BSS number from event cause (bit 23:16) */ +#define EVENT_GET_BSS_NUM(event_cause) \ + (((event_cause) >> 16) & BSS_NUM_MASK) + +/** Get BSS type from event cause (bit 31:24) */ +#define EVENT_GET_BSS_TYPE(event_cause) \ + (((event_cause) >> 24) & 0x00ff) + +/** event type for tdls setup failure */ +#define TDLS_EVENT_TYPE_SETUP_FAILURE 1 +/** event type for tdls setup request received */ +#define TDLS_EVENT_TYPE_SETUP_REQ 2 +/** event type for tdls link torn down */ +#define TDLS_EVENT_TYPE_LINK_TORN_DOWN 3 +/** event type for tdls link established */ +#define TDLS_EVENT_TYPE_LINK_ESTABLISHED 4 +/** event type for tdls debug */ +#define TDLS_EVENT_TYPE_DEBUG 5 +/** event type for tdls packet */ +#define TDLS_EVENT_TYPE_PACKET 6 +/** event type for channel switch result */ +#define TDLS_EVENT_TYPE_CHAN_SWITCH_RESULT 7 +/** event type for start channel switch */ +#define TDLS_EVENT_TYPE_START_CHAN_SWITCH 8 +/** event type for stop channel switch */ +#define TDLS_EVENT_TYPE_CHAN_SWITCH_STOPPED 9 + +/** Packet received on direct link */ +#define RXPD_FLAG_PKT_DIRECT_LINK 1 +/** TDLS base channel */ +#define TDLS_BASE_CHANNEL 0 +/** TDLS off channel */ +#define TDLS_OFF_CHANNEL 1 + +/** structure for channel switch result from TDLS FW */ +typedef MLAN_PACK_START struct _chan_switch_result { + /** current channel, 0 - base channel, 1 - off channel*/ + t_u8 current_channel; + /** channel switch status*/ + t_u8 status; + /** channel switch fauilure reason code*/ + t_u8 reason; +} MLAN_PACK_END chan_switch_result; + +typedef MLAN_PACK_START struct _ie_data { + /** IE Length */ + t_u16 ie_length; + /** IE pointer */ + t_u8 ie_ptr[0]; +} MLAN_PACK_END tdls_ie_data; + +/** Event structure for generic events from TDLS FW */ +typedef MLAN_PACK_START struct _Event_tdls_generic { + /** Event Type */ + t_u16 event_type; + /** Peer mac address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + union { + /** channel switch result structure*/ + chan_switch_result switch_result; + /** channel switch stop reason*/ + t_u8 cs_stop_reason; + /** Reason code */ + t_u16 reason_code; + /** IE data */ + tdls_ie_data ie_data; + } u; +} MLAN_PACK_END Event_tdls_generic; + +typedef enum _tdls_error_code_e { + NO_ERROR = 0, + INTERNAL_ERROR, + MAX_TDLS_LINKS_EST, + TDLS_LINK_EXISTS, + TDLS_LINK_NONEXISTENT, + TDLS_PEER_STA_UNREACHABLE = 25, +} tdls_error_code_e; + +/** Event_WEP_ICV_ERR structure */ +typedef MLAN_PACK_START struct _Event_WEP_ICV_ERR { + /** Reason code */ + t_u16 reason_code; + /** Source MAC address */ + t_u8 src_mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** WEP decryption used key */ + t_u8 wep_key_index; + /** WEP key length */ + t_u8 wep_key_length; + /** WEP key */ + t_u8 key[MAX_WEP_KEY_SIZE]; +} MLAN_PACK_END Event_WEP_ICV_ERR; + +/** WLAN_802_11_FIXED_IEs */ +typedef MLAN_PACK_START struct _WLAN_802_11_FIXED_IEs { + /** Timestamp */ + t_u8 time_stamp[8]; + /** Beacon interval */ + t_u16 beacon_interval; + /** Capabilities*/ + t_u16 capabilities; +} MLAN_PACK_END WLAN_802_11_FIXED_IEs; + +/** WLAN_802_11_VARIABLE_IEs */ +typedef MLAN_PACK_START struct _WLAN_802_11_VARIABLE_IEs { + /** Element ID */ + t_u8 element_id; + /** Length */ + t_u8 length; + /** IE data */ + t_u8 data[1]; +} MLAN_PACK_END WLAN_802_11_VARIABLE_IEs; + +/** TLV related data structures*/ +/** MrvlIEtypesHeader_t */ +typedef MLAN_PACK_START struct _MrvlIEtypesHeader { + /** Header type */ + t_u16 type; + /** Header length */ + t_u16 len; +} MLAN_PACK_END MrvlIEtypesHeader_t; + +/** MrvlIEtypes_Data_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_Data_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Data */ + t_u8 data[1]; +} MLAN_PACK_END MrvlIEtypes_Data_t; + +/*TDLS TIMEOUT VALUE (seconds)*/ +#define TDLS_IDLE_TIMEOUT 60 +/** MrvlIEtypes_Data_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_TDLS_Idle_Timeout_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** value */ + t_u16 value; +} MLAN_PACK_END MrvlIEtypes_TDLS_Idle_Timeout_t; +#if defined(STA_SUPPORT) +/** Pairwise Cipher Suite length */ +#define PAIRWISE_CIPHER_SUITE_LEN 4 +/** AKM Suite length */ +#define AKM_SUITE_LEN 4 +/** MFPC bit in RSN capability */ +#define MFPC_BIT 7 +/** MFPR bit in RSN capability */ +#define MFPR_BIT 6 +#endif +/** Bit mask for TxPD status field for null packet */ +#define MRVDRV_TxPD_POWER_MGMT_NULL_PACKET 0x01 +/** Bit mask for TxPD status field for last packet */ +#define MRVDRV_TxPD_POWER_MGMT_LAST_PACKET 0x08 + +/** Bit mask for TxPD flags field for TDLS packet */ +#define MRVDRV_TxPD_FLAGS_TDLS_PACKET MBIT(4) + +/** Bit mask for TxPD flags field for Tx status report */ +#define MRVDRV_TxPD_FLAGS_TX_PACKET_STATUS MBIT(5) + +/** Packet type: 802.11 */ +#define PKT_TYPE_802DOT11 0x05 +#define PKT_TYPE_MGMT_FRAME 0xE5 +/** Packet type: AMSDU */ +#define PKT_TYPE_AMSDU 0xE6 +/** Packet type: BAR */ +#define PKT_TYPE_BAR 0xE7 + +/** Packet type: debugging */ +#define PKT_TYPE_DEBUG 0xEF + +/** TxPD descriptor */ +typedef MLAN_PACK_START struct _TxPD { + /** BSS type */ + t_u8 bss_type; + /** BSS number */ + t_u8 bss_num; + /** Tx packet length */ + t_u16 tx_pkt_length; + /** Tx packet offset */ + t_u16 tx_pkt_offset; + /** Tx packet type */ + t_u16 tx_pkt_type; + /** Tx Control */ + t_u32 tx_control; + /** Pkt Priority */ + t_u8 priority; + /** Transmit Pkt Flags*/ + t_u8 flags; + /** Amount of time the packet has been queued + * in the driver (units = 2ms)*/ + t_u8 pkt_delay_2ms; + /** Reserved */ + t_u8 reserved1[2]; + /** Trasnit Pkt Token Id*/ + t_u8 tx_token_id; + /** reserverd */ + t_u8 reserved[2]; +} MLAN_PACK_END TxPD, *PTxPD; + +/** RxPD Descriptor */ +typedef MLAN_PACK_START struct _RxPD { + /** BSS type */ + t_u8 bss_type; + /** BSS number */ + t_u8 bss_num; + /** Rx Packet Length */ + t_u16 rx_pkt_length; + /** Rx Pkt offset */ + t_u16 rx_pkt_offset; + /** Rx packet type */ + t_u16 rx_pkt_type; + /** Sequence number */ + t_u16 seq_num; + /** Packet Priority */ + t_u8 priority; + /** Rx Packet Rate */ + t_u8 rx_rate; + /** SNR */ + t_s8 snr; + /** Noise Floor */ + t_s8 nf; + /** [Bit 1] [Bit 0] RxRate format: legacy rate = 00 HT = 01 VHT = 10 + * [Bit 3] [Bit 2] HT/VHT Bandwidth BW20 = 00 BW40 = 01 BW80 = 10 BW160 = 11 + * [Bit 4] HT/VHT Guard interval LGI = 0 SGI = 1 + * [Bit 5] STBC support Enabled = 1 + * [Bit 6] LDPC support Enabled = 1 + * [Bit 7] Reserved */ + t_u8 rate_info; + /** Reserved */ + t_u8 reserved[3]; + /** TDLS flags, bit 0: 0=InfraLink, 1=DirectLink */ + t_u8 flags; + /**For SD8887 antenna info: 0 = 2.4G antenna a; 1 = 2.4G antenna b; 3 = 5G antenna; 0xff = invalid value */ + t_u8 antenna; +} MLAN_PACK_END RxPD, *PRxPD; + +#ifdef UAP_SUPPORT +/** TxPD descriptor */ +typedef MLAN_PACK_START struct _UapTxPD { + /** BSS type */ + t_u8 bss_type; + /** BSS number */ + t_u8 bss_num; + /** Tx packet length */ + t_u16 tx_pkt_length; + /** Tx packet offset */ + t_u16 tx_pkt_offset; + /** Tx packet type */ + t_u16 tx_pkt_type; + /** Tx Control */ + t_u32 tx_control; + /** Pkt Priority */ + t_u8 priority; + /** Transmit Pkt Flags*/ + t_u8 flags; + /** Amount of time the packet has been queued + * in the driver (units = 2ms)*/ + t_u8 pkt_delay_2ms; + /** Reserved */ + t_u8 reserved1[2]; + /** Trasnit Pkt Token Id*/ + t_u8 tx_token_id; + /** reserverd */ + t_u8 reserved[2]; +} MLAN_PACK_END UapTxPD, *PUapTxPD; + +/** RxPD Descriptor */ +typedef MLAN_PACK_START struct _UapRxPD { + /** BSS Type */ + t_u8 bss_type; + /** BSS number*/ + t_u8 bss_num; + /** Rx packet length */ + t_u16 rx_pkt_length; + /** Rx packet offset */ + t_u16 rx_pkt_offset; + /** Rx packet type */ + t_u16 rx_pkt_type; + /** Sequence number */ + t_u16 seq_num; + /** Packet Priority */ + t_u8 priority; + /** Rx Packet Rate */ + t_u8 rx_rate; + /** SNR */ + t_s8 snr; + /** Noise Floor */ + t_s8 nf; + /** [Bit 1] [Bit 0] RxRate format: legacy rate = 00 HT = 01 VHT = 10 + * [Bit 3] [Bit 2] HT/VHT Bandwidth BW20 = 00 BW40 = 01 BW80 = 10 BW160 = 11 + * [Bit 4] HT/VHT Guard interval LGI = 0 SGI = 1 + * [Bit 5] STBC support Enabled = 1 + * [Bit 6] LDPC support Enabled = 1 + * [Bit 7] Reserved */ + t_u8 rate_info; + /** For SD8887 ntenna info: 0 = 2.4G antenna a; 1 = 2.4G antenna b; 3 = 5G antenna; 0xff = invalid value */ + t_u8 antenna; +} MLAN_PACK_END UapRxPD, *PUapRxPD; + +/** Fixed size of station association event */ +#define ASSOC_EVENT_FIX_SIZE 12 + +/** IEEEtypes_FrameCtl_t*/ +#ifdef BIG_ENDIAN_SUPPORT +typedef MLAN_PACK_START struct _IEEEtypes_FrameCtl_t { + /** Order */ + t_u8 order:1; + /** Wep */ + t_u8 wep:1; + /** More Data */ + t_u8 more_data:1; + /** Power Mgmt */ + t_u8 pwr_mgmt:1; + /** Retry */ + t_u8 retry:1; + /** More Frag */ + t_u8 more_frag:1; + /** From DS */ + t_u8 from_ds:1; + /** To DS */ + t_u8 to_ds:1; + /** Sub Type */ + t_u8 sub_type:4; + /** Type */ + t_u8 type:2; + /** Protocol Version */ + t_u8 protocol_version:2; +} MLAN_PACK_END IEEEtypes_FrameCtl_t; +#else +typedef MLAN_PACK_START struct _IEEEtypes_FrameCtl_t { + /** Protocol Version */ + t_u8 protocol_version:2; + /** Type */ + t_u8 type:2; + /** Sub Type */ + t_u8 sub_type:4; + /** To DS */ + t_u8 to_ds:1; + /** From DS */ + t_u8 from_ds:1; + /** More Frag */ + t_u8 more_frag:1; + /** Retry */ + t_u8 retry:1; + /** Power Mgmt */ + t_u8 pwr_mgmt:1; + /** More Data */ + t_u8 more_data:1; + /** Wep */ + t_u8 wep:1; + /** Order */ + t_u8 order:1; +} MLAN_PACK_END IEEEtypes_FrameCtl_t; +#endif + +/** MrvlIETypes_MgmtFrameSet_t */ +typedef MLAN_PACK_START struct _MrvlIETypes_MgmtFrameSet_t { + /** Type */ + t_u16 type; + /** Length */ + t_u16 len; + /** Frame Control */ + IEEEtypes_FrameCtl_t frame_control; + /* t_u8 frame_contents[0]; */ +} MLAN_PACK_END MrvlIETypes_MgmtFrameSet_t; + +/** IEEEtypes_AssocRqst_t */ +typedef MLAN_PACK_START struct _IEEEtypes_AssocRqst_t { + /** Capability Info */ + t_u16 cap_info; + /** Listen Interval */ + t_u16 listen_interval; + /* t_u8 ie_buffer[0]; */ +} MLAN_PACK_END IEEEtypes_AssocRqst_t; + +/** IEEEtypes_ReAssocRqst_t */ +typedef MLAN_PACK_START struct _IEEEtypes_ReAssocRqst_t { + /** Capability Info */ + t_u16 cap_info; + /** Listen Interval */ + t_u16 listen_interval; + /** Current AP Address */ + t_u8 current_ap_addr[MLAN_MAC_ADDR_LENGTH]; + /* t_u8 ie_buffer[0]; */ +} MLAN_PACK_END IEEEtypes_ReAssocRqst_t; +#endif /* UAP_SUPPORT */ + +/** wlan_802_11_header */ +typedef MLAN_PACK_START struct _wlan_802_11_header { + /** Frame Control */ + t_u16 frm_ctl; + /** Duration ID */ + t_u16 duration_id; + /** Address1 */ + mlan_802_11_mac_addr addr1; + /** Address2 */ + mlan_802_11_mac_addr addr2; + /** Address3 */ + mlan_802_11_mac_addr addr3; + /** Sequence Control */ + t_u16 seq_ctl; + /** Address4 */ + mlan_802_11_mac_addr addr4; +} MLAN_PACK_END wlan_802_11_header; + +/** wlan_802_11_header packet from FW with length */ +typedef MLAN_PACK_START struct _wlan_mgmt_pkt { + /** Packet Length */ + t_u16 frm_len; + /** wlan_802_11_header */ + wlan_802_11_header wlan_header; +} MLAN_PACK_END wlan_mgmt_pkt; + +#ifdef STA_SUPPORT +/** (Beaconsize(256)-5(IEId,len,contrystr(3))/3(FirstChan,NoOfChan,MaxPwr) */ +#define MAX_NO_OF_CHAN 40 + +/** Channel-power table entries */ +typedef MLAN_PACK_START struct _chan_power_11d { + /** 11D channel */ + t_u8 chan; + /** Band for channel */ + t_u8 band; + /** 11D channel power */ + t_u8 pwr; + /** AP seen on channel */ + t_u8 ap_seen; +} MLAN_PACK_END chan_power_11d_t; + +/** Region channel info */ +typedef MLAN_PACK_START struct _parsed_region_chan_11d { + /** 11D channel power per channel */ + chan_power_11d_t chan_pwr[MAX_NO_OF_CHAN]; + /** 11D number of channels */ + t_u8 no_of_chan; +} MLAN_PACK_END parsed_region_chan_11d_t; +#endif /* STA_SUPPORT */ + +/** ChanScanMode_t */ +typedef MLAN_PACK_START struct _ChanScanMode_t { +#ifdef BIG_ENDIAN_SUPPORT + /** Reserved */ + t_u8 reserved_6_7:2; + /** First channel in scan */ + t_u8 first_chan:1; + /** Enable hidden ssid report */ + t_u8 hidden_ssid_report:1; + /** Enable probe response timeout */ + t_u8 rsp_timeout_en:1; + /** Multidomain scan mode */ + t_u8 multidomain_scan:1; + /** Disble channel filtering flag */ + t_u8 disable_chan_filt:1; + /** Channel scan mode passive flag */ + t_u8 passive_scan:1; +#else + /** Channel scan mode passive flag */ + t_u8 passive_scan:1; + /** Disble channel filtering flag */ + t_u8 disable_chan_filt:1; + /** Multidomain scan mode */ + t_u8 multidomain_scan:1; + /** Enable probe response timeout */ + t_u8 rsp_timeout_en:1; + /** Enable hidden ssid report */ + t_u8 hidden_ssid_report:1; + /** First channel in scan */ + t_u8 first_chan:1; + /** Reserved */ + t_u8 reserved_6_7:2; +#endif +} MLAN_PACK_END ChanScanMode_t; + +/** secondary channel is below */ +#define SECOND_CHANNEL_BELOW 0x30 +/** secondary channel is above */ +#define SECOND_CHANNEL_ABOVE 0x10 +/** channel offset */ +enum { + SEC_CHAN_NONE = 0, + SEC_CHAN_ABOVE = 1, + SEC_CHAN_BELOW = 3 +}; +/** channel bandwidth */ +enum { + CHAN_BW_20MHZ = 0, + CHAN_BW_10MHZ, + CHAN_BW_40MHZ, + CHAN_BW_80MHZ, +}; +/** ChanScanParamSet_t */ +typedef MLAN_PACK_START struct _ChanScanParamSet_t { + /** Channel scan parameter : Radio type */ + t_u8 radio_type; + /** Channel scan parameter : Channel number */ + t_u8 chan_number; + /** Channel scan parameter : Channel scan mode */ + ChanScanMode_t chan_scan_mode; + /** Channel scan parameter : Minimum scan time */ + t_u16 min_scan_time; + /** Channel scan parameter : Maximum scan time */ + t_u16 max_scan_time; +} MLAN_PACK_END ChanScanParamSet_t; + +/** MrvlIEtypes_ChanListParamSet_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_ChanListParamSet_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Channel scan parameters */ + ChanScanParamSet_t chan_scan_param[1]; +} MLAN_PACK_END MrvlIEtypes_ChanListParamSet_t; + +/** ChanBandParamSet_t */ +typedef struct _ChanBandParamSet_t { + /** Channel scan parameter : Radio type */ + t_u8 radio_type; + /** Channel number */ + t_u8 chan_number; +} ChanBandParamSet_t; + +/** MrvlIEtypes_ChanBandListParamSet_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_ChanBandListParamSet_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Channel Band parameters */ + ChanBandParamSet_t chan_band_param[1]; +} MLAN_PACK_END MrvlIEtypes_ChanBandListParamSet_t; + +/** MrvlIEtypes_RatesParamSet_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_RatesParamSet_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Rates */ + t_u8 rates[1]; +} MLAN_PACK_END MrvlIEtypes_RatesParamSet_t; + +/** _MrvlIEtypes_Bssid_List_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_Bssid_List_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** BSSID */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; +} MLAN_PACK_END MrvlIEtypes_Bssid_List_t; + +/** MrvlIEtypes_SsIdParamSet_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_SsIdParamSet_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** SSID */ + t_u8 ssid[1]; +} MLAN_PACK_END MrvlIEtypes_SsIdParamSet_t; + +/** MrvlIEtypes_NumProbes_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_NumProbes_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Number of probes */ + t_u16 num_probes; +} MLAN_PACK_END MrvlIEtypes_NumProbes_t; + +/** MrvlIEtypes_WildCardSsIdParamSet_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_WildCardSsIdParamSet_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Maximum SSID length */ + t_u8 max_ssid_length; + /** SSID */ + t_u8 ssid[1]; +} MLAN_PACK_END MrvlIEtypes_WildCardSsIdParamSet_t; + +/**TSF data size */ +#define TSF_DATA_SIZE 8 +/** Table of TSF values returned in the scan result */ +typedef MLAN_PACK_START struct _MrvlIEtypes_TsfTimestamp_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** the length of each TSF data is 8 bytes, could be multiple TSF here */ + t_u8 tsf_data[1]; +} MLAN_PACK_END MrvlIEtypes_TsfTimestamp_t; + +/** CfParamSet_t */ +typedef MLAN_PACK_START struct _CfParamSet_t { + /** CF parameter : Count */ + t_u8 cfp_cnt; + /** CF parameter : Period */ + t_u8 cfp_period; + /** CF parameter : Duration */ + t_u16 cfp_max_duration; + /** CF parameter : Duration remaining */ + t_u16 cfp_duration_remaining; +} MLAN_PACK_END CfParamSet_t; + +/** IbssParamSet_t */ +typedef MLAN_PACK_START struct _IbssParamSet_t { + /** ATIM window value */ + t_u16 atim_window; +} MLAN_PACK_END IbssParamSet_t; + +/** MrvlIEtypes_SsParamSet_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_SsParamSet_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** CF/IBSS parameters sets */ + union { + /** CF parameter set */ + CfParamSet_t cf_param_set[1]; + /** IBSS parameter set */ + IbssParamSet_t ibss_param_set[1]; + } cf_ibss; +} MLAN_PACK_END MrvlIEtypes_SsParamSet_t; + +/** FhParamSet_t */ +typedef MLAN_PACK_START struct _FhParamSet_t { + /** FH parameter : Dwell time */ + t_u16 dwell_time; + /** FH parameter : Hop set */ + t_u8 hop_set; + /** FH parameter : Hop pattern */ + t_u8 hop_pattern; + /** FH parameter : Hop index */ + t_u8 hop_index; +} MLAN_PACK_END FhParamSet_t; + +/** DsParamSet_t */ +typedef MLAN_PACK_START struct _DsParamSet_t { + /** Current channel number */ + t_u8 current_chan; +} MLAN_PACK_END DsParamSet_t; + +/** MrvlIEtypes_PhyParamSet_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_PhyParamSet_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** FH/DS parameters */ + union { + /** FH parameter set */ + FhParamSet_t fh_param_set[1]; + /** DS parameter set */ + DsParamSet_t ds_param_set[1]; + } fh_ds; +} MLAN_PACK_END MrvlIEtypes_PhyParamSet_t; + +/* Auth type to be used in the Authentication portion of an Assoc seq */ +/** MrvlIEtypes_AuthType_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_AuthType_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Authentication type */ + t_u16 auth_type; +} MLAN_PACK_END MrvlIEtypes_AuthType_t; + +/** MrvlIEtypes_ScanChanGap_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_ScanChanGap_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Time gap in units to TUs to be used between + * two consecutive channels scan */ + t_u16 gap; +} MLAN_PACK_END MrvlIEtypes_ScanChanGap_t; + +/** channel statictics tlv */ +typedef MLAN_PACK_START struct _MrvlIEtypes_ChannelStats_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** channel statictics */ + ChanStatistics_t chanStat[0]; +} MLAN_PACK_END MrvlIEtypes_ChannelStats_t; + +/** MrvlIETypes_ActionFrame_t */ +typedef MLAN_PACK_START struct { + MrvlIEtypesHeader_t header; + /**< Header */ + + t_u8 srcAddr[MLAN_MAC_ADDR_LENGTH]; + t_u8 dstAddr[MLAN_MAC_ADDR_LENGTH]; + + IEEEtypes_ActionFrame_t actionFrame; + +} MLAN_PACK_END MrvlIETypes_ActionFrame_t; + +/** MrvlIEtypes_RxBaSync_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_RxBaSync_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** mac address */ + t_u8 mac[MLAN_MAC_ADDR_LENGTH]; + /** tid */ + t_u8 tid; + /** reserved field */ + t_u8 reserved; + /** start seq num */ + t_u16 seq_num; + /** bitmap len */ + t_u16 bitmap_len; + /** bitmap */ + t_u8 bitmap[1]; +} MLAN_PACK_END MrvlIEtypes_RxBaSync_t; + +/** MrvlIEtypes_RsnParamSet_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_RsnParamSet_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** RSN IE */ + t_u8 rsn_ie[1]; +} MLAN_PACK_END MrvlIEtypes_RsnParamSet_t; + +/** Key Info flag for multicast key */ +#define KEY_INFO_MCAST_KEY 0x01 +/** Key Info flag for unicast key */ +#define KEY_INFO_UCAST_KEY 0x02 +/** Key Info flag for enable key */ +#define KEY_INFO_ENABLE_KEY 0x04 +/** Key Info flag for default key */ +#define KEY_INFO_DEFAULT_KEY 0x08 +/** Key Info flag for TX key */ +#define KEY_INFO_TX_KEY 0x10 +/** Key Info flag for RX key */ +#define KEY_INFO_RX_KEY 0x20 +#define KEY_INFO_CMAC_AES_KEY 0x400 +/** PN size for WPA/WPA2 */ +#define WPA_PN_SIZE 8 +/** PN size for PMF IGTK */ +#define IGTK_PN_SIZE 8 +/** WAPI KEY size */ +#define WAPI_KEY_SIZE 32 +/** key params fix size */ +#define KEY_PARAMS_FIXED_LEN 10 +/** key index mask */ +#define KEY_INDEX_MASK 0xf + +/** wep_param */ +typedef MLAN_PACK_START struct _wep_param_t { + /** key_len */ + t_u16 key_len; + /** wep key */ + t_u8 key[MAX_WEP_KEY_SIZE]; +} MLAN_PACK_END wep_param_t; + +/** tkip_param */ +typedef MLAN_PACK_START struct _tkip_param { + /** Rx packet num */ + t_u8 pn[WPA_PN_SIZE]; + /** key_len */ + t_u16 key_len; + /** tkip key */ + t_u8 key[WPA_TKIP_KEY_LEN]; +} MLAN_PACK_END tkip_param; + +/** aes_param */ +typedef MLAN_PACK_START struct _aes_param { + /** Rx packet num */ + t_u8 pn[WPA_PN_SIZE]; + /** key_len */ + t_u16 key_len; + /** aes key */ + t_u8 key[WPA_AES_KEY_LEN]; +} MLAN_PACK_END aes_param; + +/** wapi_param */ +typedef MLAN_PACK_START struct _wapi_param { + /** Rx packet num */ + t_u8 pn[PN_SIZE]; + /** key_len */ + t_u16 key_len; + /** wapi key */ + t_u8 key[WAPI_KEY_SIZE]; +} MLAN_PACK_END wapi_param; + +/** cmac_aes_param */ +typedef MLAN_PACK_START struct _cmac_aes_param { + /** IGTK pn */ + t_u8 ipn[IGTK_PN_SIZE]; + /** key_len */ + t_u16 key_len; + /** aes key */ + t_u8 key[CMAC_AES_KEY_LEN]; +} MLAN_PACK_END cmac_aes_param; + +/** MrvlIEtype_KeyParamSet_t */ +typedef MLAN_PACK_START struct _MrvlIEtype_KeyParamSetV2_t { + /** Type ID */ + t_u16 type; + /** Length of Payload */ + t_u16 length; + /** mac address */ + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** key index */ + t_u8 key_idx; + /** Type of Key: WEP=0, TKIP=1, AES=2, WAPI=3 AES_CMAC=4 */ + t_u8 key_type; + /** Key Control Info specific to a key_type_id */ + t_u16 key_info; + union { + /** wep key param */ + wep_param_t wep; + /** tkip key param */ + tkip_param tkip; + /** aes key param */ + aes_param aes; + /** wapi key param */ + wapi_param wapi; + /** IGTK key param */ + cmac_aes_param cmac_aes; + } key_params; +} MLAN_PACK_END MrvlIEtype_KeyParamSetV2_t; + +/** HostCmd_DS_802_11_KEY_MATERIAL */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_KEY_MATERIAL { + /** Action */ + t_u16 action; + /** Key parameter set */ + MrvlIEtype_KeyParamSetV2_t key_param_set; +} MLAN_PACK_END HostCmd_DS_802_11_KEY_MATERIAL; + +/** Data structure of WMM QoS information */ +typedef MLAN_PACK_START struct _WmmQosInfo_t { +#ifdef BIG_ENDIAN_SUPPORT + /** QoS UAPSD */ + t_u8 qos_uapsd:1; + /** Reserved */ + t_u8 reserved:3; + /** Parameter set count */ + t_u8 para_set_count:4; +#else + /** Parameter set count */ + t_u8 para_set_count:4; + /** Reserved */ + t_u8 reserved:3; + /** QoS UAPSD */ + t_u8 qos_uapsd:1; +#endif /* BIG_ENDIAN_SUPPORT */ +} MLAN_PACK_END WmmQosInfo_t, *pWmmQosInfo_t; + +/** Data structure of WMM ECW */ +typedef MLAN_PACK_START struct _WmmEcw_t { +#ifdef BIG_ENDIAN_SUPPORT + /** Maximum Ecw */ + t_u8 ecw_max:4; + /** Minimum Ecw */ + t_u8 ecw_min:4; +#else + /** Minimum Ecw */ + t_u8 ecw_min:4; + /** Maximum Ecw */ + t_u8 ecw_max:4; +#endif /* BIG_ENDIAN_SUPPORT */ +} MLAN_PACK_END WmmEcw_t, *pWmmEcw_t; + +/** Data structure of WMM Aci/Aifsn */ +typedef MLAN_PACK_START struct _WmmAciAifsn_t { +#ifdef BIG_ENDIAN_SUPPORT + /** Reserved */ + t_u8 reserved:1; + /** Aci */ + t_u8 aci:2; + /** Acm */ + t_u8 acm:1; + /** Aifsn */ + t_u8 aifsn:4; +#else + /** Aifsn */ + t_u8 aifsn:4; + /** Acm */ + t_u8 acm:1; + /** Aci */ + t_u8 aci:2; + /** Reserved */ + t_u8 reserved:1; +#endif /* BIG_ENDIAN_SUPPORT */ +} MLAN_PACK_END WmmAciAifsn_t, *pWmmAciAifsn_t; + +/** Data structure of WMM AC parameters */ +typedef MLAN_PACK_START struct _WmmAcParameters_t { + WmmAciAifsn_t aci_aifsn; /**< AciAifSn */ + WmmEcw_t ecw; /**< Ecw */ + t_u16 tx_op_limit; /**< Tx op limit */ +} MLAN_PACK_END WmmAcParameters_t, *pWmmAcParameters_t; + +/** Data structure of WMM parameter */ +typedef MLAN_PACK_START struct _WmmParameter_t { + /** OuiType: 00:50:f2:02 */ + t_u8 ouitype[4]; + /** Oui subtype: 01 */ + t_u8 ouisubtype; + /** version: 01 */ + t_u8 version; + /** QoS information */ + t_u8 qos_info; + /** Reserved */ + t_u8 reserved; + /** AC Parameters Record WMM_AC_BE, WMM_AC_BK, WMM_AC_VI, WMM_AC_VO */ + WmmAcParameters_t ac_params[MAX_AC_QUEUES]; +} MLAN_PACK_END WmmParameter_t, *pWmmParameter_t; + +/* Definition of firmware host command */ +/** HostCmd_DS_GEN */ +typedef MLAN_PACK_START struct _HostCmd_DS_GEN { + /** Command */ + t_u16 command; + /** Size */ + t_u16 size; + /** Sequence number */ + t_u16 seq_num; + /** Result */ + t_u16 result; +} MLAN_PACK_END HostCmd_DS_GEN +; + +/** Size of HostCmd_DS_GEN */ +#define S_DS_GEN sizeof(HostCmd_DS_GEN) + +/** Address type: broadcast */ +#define ADDR_TYPE_BROADCAST 1 +/* Address type: unicast */ +#define ADDR_TYPE_UNICAST 2 +/* Address type: multicast */ +#define ADDR_TYPE_MULTICAST 3 + +/** Ether type: any */ +#define ETHER_TYPE_ANY 0xffff +/** Ether type: ARP */ +#define ETHER_TYPE_ARP 0x0608 + +/** IPv4 address any */ +#define IPV4_ADDR_ANY 0xffffffff + +/** Header structure for ARP filter */ +typedef MLAN_PACK_START struct _arpfilter_header { + /** Type */ + t_u16 type; + /** TLV length */ + t_u16 len; +} MLAN_PACK_END arpfilter_header; + +/** Filter entry structure */ +typedef MLAN_PACK_START struct _filter_entry { + /** Address type */ + t_u16 addr_type; + /** Ether type */ + t_u16 eth_type; + /** IPv4 address */ + t_u32 ipv4_addr; +} MLAN_PACK_END filter_entry; + +typedef MLAN_PACK_START struct _HostCmd_DS_MEF_CFG { + /** Criteria */ + t_u32 criteria; + /** Number of entries */ + t_u16 nentries; +} MLAN_PACK_END HostCmd_DS_MEF_CFG; + +/* HostCmd_DS_802_11_SLEEP_PERIOD */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SLEEP_PERIOD { + /** ACT_GET/ACT_SET */ + t_u16 action; + + /** Sleep Period in msec */ + t_u16 sleep_pd; +} MLAN_PACK_END HostCmd_DS_802_11_SLEEP_PERIOD; + +/* HostCmd_DS_802_11_SLEEP_PARAMS */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SLEEP_PARAMS { + /** ACT_GET/ACT_SET */ + t_u16 action; + /** Sleep clock error in ppm */ + t_u16 error; + /** Wakeup offset in usec */ + t_u16 offset; + /** Clock stabilization time in usec */ + t_u16 stable_time; + /** Control periodic calibration */ + t_u8 cal_control; + /** Control the use of external sleep clock */ + t_u8 external_sleep_clk; + /** Reserved field, should be set to zero */ + t_u16 reserved; +} MLAN_PACK_END HostCmd_DS_802_11_SLEEP_PARAMS; + +/** Sleep response control */ +typedef enum _sleep_resp_ctrl { + RESP_NOT_NEEDED = 0, + RESP_NEEDED, +} sleep_resp_ctrl; + +/** Structure definition for the new ieee power save parameters*/ +typedef MLAN_PACK_START struct __ps_param { + /** Null packet interval */ + t_u16 null_pkt_interval; + /** Num dtims */ + t_u16 multiple_dtims; + /** becaon miss interval */ + t_u16 bcn_miss_timeout; + /** local listen interval */ + t_u16 local_listen_interval; + /** Adhoc awake period */ + t_u16 adhoc_wake_period; + /** mode - (0x01 - firmware to automatically choose PS_POLL or NULL mode, + * 0x02 - PS_POLL, 0x03 - NULL mode ) + */ + t_u16 mode; + /** Delay to PS in milliseconds */ + t_u16 delay_to_ps; +} MLAN_PACK_END ps_param; + +/** Structure definition for the new auto deep sleep command */ +typedef MLAN_PACK_START struct __auto_ds_param { + /** Deep sleep inactivity timeout */ + t_u16 deep_sleep_timeout; +} MLAN_PACK_END auto_ds_param; + +/** Structure definition for sleep confirmation in the new ps command */ +typedef MLAN_PACK_START struct __sleep_confirm_param { + /** response control 0x00 - response not needed, 0x01 - response needed */ + t_u16 resp_ctrl; +} MLAN_PACK_END sleep_confirm_param; + +/** bitmap for get auto deepsleep */ +#define BITMAP_AUTO_DS 0x01 +/** bitmap for sta power save */ +#define BITMAP_STA_PS 0x10 +/** bitmap for uap inactivity based PS */ +#define BITMAP_UAP_INACT_PS 0x100 +/** bitmap for uap DTIM PS */ +#define BITMAP_UAP_DTIM_PS 0x200 +/** Structure definition for the new ieee power save parameters*/ +typedef MLAN_PACK_START struct _auto_ps_param { + /** bitmap for enable power save mode */ + t_u16 ps_bitmap; + /* auto deep sleep parameter, sta power save parameter uap inactivity + parameter uap DTIM parameter */ +} MLAN_PACK_END auto_ps_param; + +/** fix size for auto ps */ +#define AUTO_PS_FIX_SIZE 4 + +/** TLV type : auto ds param */ +#define TLV_TYPE_AUTO_DS_PARAM (PROPRIETARY_TLV_BASE_ID + 0x71) /* 0x0171 + */ +/** TLV type : ps param */ +#define TLV_TYPE_PS_PARAM (PROPRIETARY_TLV_BASE_ID + 0x72) /* 0x0172 + */ + +/** MrvlIEtypes_auto_ds_param_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_auto_ds_param_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** auto ds param */ + auto_ds_param param; +} MLAN_PACK_END MrvlIEtypes_auto_ds_param_t; + +/** MrvlIEtypes_ps_param_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_ps_param_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** ps param */ + ps_param param; +} MLAN_PACK_END MrvlIEtypes_ps_param_t; + +/** Structure definition for new power save command */ +typedef MLAN_PACK_START struct _HostCmd_DS_PS_MODE_ENH { + /** Action */ + t_u16 action; + /** Data speciifc to action */ + /* For IEEE power save data will be as UINT16 mode (0x01 - firmware to + automatically choose PS_POLL or NULL mode, 0x02 - PS_POLL, 0x03 - + NULL mode ) UINT16 NullpacketInterval UINT16 NumDtims UINT16 + BeaconMissInterval UINT16 locallisteninterval UINT16 + adhocawakeperiod */ + + /* For auto deep sleep */ + /* UINT16 Deep sleep inactivity timeout */ + + /* For PS sleep confirm UINT16 responeCtrl - 0x00 - reponse from fw not + needed, 0x01 - response from fw is needed */ + + union { + /** PS param definition */ + ps_param opt_ps; + /** Auto ds param definition */ + auto_ds_param auto_ds; + /** Sleep comfirm param definition */ + sleep_confirm_param sleep_cfm; + /** bitmap for get PS info and Disable PS mode */ + t_u16 ps_bitmap; + /** auto ps param */ + auto_ps_param auto_ps; + } params; +} MLAN_PACK_END HostCmd_DS_802_11_PS_MODE_ENH; + +/** FW VERSION tlv */ +#define TLV_TYPE_FW_VER_INFO (PROPRIETARY_TLV_BASE_ID + 0xC7) /* 0x1C7 + */ + +/** MrvlIEtypes_fw_ver_info_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_fw_ver_info_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** API id */ + t_u16 api_id; + /** major version */ + t_u8 major_ver; + /** minor version */ + t_u8 minor_ver; +} MLAN_PACK_END MrvlIEtypes_fw_ver_info_t; + +/** API ID */ +enum API_VER_ID { + KEY_API_VER_ID = 1, + FW_API_VER_ID = 2, + UAP_FW_API_VER_ID = 3, +}; + +/** FW AP V15 */ +#define HOST_API_VERSION_V15 15 +/** FW minor version 1 */ +#define FW_MINOR_VERSION_1 1 + +/** HostCmd_DS_GET_HW_SPEC */ +typedef MLAN_PACK_START struct _HostCmd_DS_GET_HW_SPEC { + /** HW Interface version number */ + t_u16 hw_if_version; + /** HW version number */ + t_u16 version; + /** Reserved field */ + t_u16 reserved; + /** Max no of Multicast address */ + t_u16 num_of_mcast_adr; + /** MAC address */ + t_u8 permanent_addr[MLAN_MAC_ADDR_LENGTH]; + /** Region Code */ + t_u16 region_code; + /** Number of antenna used */ + t_u16 number_of_antenna; + /** FW release number, example 0x1234=1.2.3.4 */ + t_u32 fw_release_number; + /** Reserved field */ + t_u32 reserved_1; + /** Reserved field */ + t_u32 reserved_2; + /** Reserved field */ + t_u32 reserved_3; + /** FW/HW Capability */ + t_u32 fw_cap_info; + /** 802.11n Device Capabilities */ + t_u32 dot_11n_dev_cap; + /** MIMO abstraction of MCSs supported by device */ + t_u8 dev_mcs_support; + /** Valid end port at init */ + t_u16 mp_end_port; + /** mgmt IE buffer count */ + t_u16 mgmt_buf_count; + /** Reserved */ + t_u32 reserved_8; + /** Reserved */ + t_u32 reserved_9; + /** 802.11ac Device Capabilities */ + t_u32 Dot11acDevCap; + /** MCSs supported by 802.11ac device */ + t_u32 Dot11acMcsSupport; +} MLAN_PACK_END HostCmd_DS_GET_HW_SPEC; + +/** HostCmd_DS_802_11_CFG_DATA */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_CFG_DATA { + /** Action */ + t_u16 action; + /** Type */ + t_u16 type; + /** Data length */ + t_u16 data_len; + /** Data */ +} MLAN_PACK_END HostCmd_DS_802_11_CFG_DATA; + +/** HostCmd_DS_CMD_802_11_RSSI_INFO */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RSSI_INFO { + /** Action */ + t_u16 action; + /** Parameter used for exponential averaging for Data */ + t_u16 ndata; + /** Parameter used for exponential averaging for Beacon */ + t_u16 nbcn; + /** Reserved field 0 */ + t_u16 reserved[9]; + /** Reserved field 1 */ + t_u64 reserved_1; +} MLAN_PACK_END HostCmd_DS_802_11_RSSI_INFO; + +/** HostCmd_DS_802_11_RSSI_INFO_RSP */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RSSI_INFO_RSP { + /** Action */ + t_u16 action; + /** Parameter used for exponential averaging for Data */ + t_u16 ndata; + /** Parameter used for exponential averaging for beacon */ + t_u16 nbcn; + /** Last Data RSSI in dBm */ + t_s16 data_rssi_last; + /** Last Data NF in dBm */ + t_s16 data_nf_last; + /** AVG DATA RSSI in dBm */ + t_s16 data_rssi_avg; + /** AVG DATA NF in dBm */ + t_s16 data_nf_avg; + /** Last BEACON RSSI in dBm */ + t_s16 bcn_rssi_last; + /** Last BEACON NF in dBm */ + t_s16 bcn_nf_last; + /** AVG BEACON RSSI in dBm */ + t_s16 bcn_rssi_avg; + /** AVG BEACON NF in dBm */ + t_s16 bcn_nf_avg; + /** Last RSSI Beacon TSF */ + t_u64 tsf_bcn; +} MLAN_PACK_END HostCmd_DS_802_11_RSSI_INFO_RSP; + +/** HostCmd_DS_802_11_MAC_ADDRESS */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_MAC_ADDRESS { + /** Action */ + t_u16 action; + /** MAC address */ + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; +} MLAN_PACK_END HostCmd_DS_802_11_MAC_ADDRESS; + +/** HostCmd_DS_MAC_CONTROL */ +typedef MLAN_PACK_START struct _HostCmd_DS_MAC_CONTROL { + /** Action */ + t_u32 action; +} MLAN_PACK_END HostCmd_DS_MAC_CONTROL; + +/** HostCmd_DS_CMD_TX_DATA_PAUSE */ +typedef MLAN_PACK_START struct _HostCmd_DS_CMD_TX_DATA_PAUSE { + /** Action */ + t_u16 action; + /** Enable/disable Tx data pause */ + t_u8 enable_tx_pause; + /** Max number of TX buffers allowed for all PS clients*/ + t_u8 pause_tx_count; +} MLAN_PACK_END HostCmd_DS_CMD_TX_DATA_PAUSE; + +/** TLV type : TX pause TLV */ +#define TLV_TYPE_TX_PAUSE (PROPRIETARY_TLV_BASE_ID + 0x94) /* 0x0194 */ +/** MrvlIEtypes_SsIdParamSet_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_tx_pause_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** peer mac address */ + t_u8 peermac[MLAN_MAC_ADDR_LENGTH]; + /** Tx pause state, 1--pause, 0--free flowing */ + t_u8 tx_pause; + /** total packets queued for the client */ + t_u8 pkt_cnt; +} MLAN_PACK_END MrvlIEtypes_tx_pause_t; + +/** HostCmd_CMD_MAC_MULTICAST_ADR */ +typedef MLAN_PACK_START struct _HostCmd_DS_MAC_MULTICAST_ADR { + /** Action */ + t_u16 action; + /** Number of addresses */ + t_u16 num_of_adrs; + /** List of MAC */ + t_u8 mac_list[MLAN_MAC_ADDR_LENGTH * MLAN_MAX_MULTICAST_LIST_SIZE]; +} MLAN_PACK_END HostCmd_DS_MAC_MULTICAST_ADR; + +/** HostCmd_CMD_802_11_DEAUTHENTICATE */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_DEAUTHENTICATE { + /** MAC address */ + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** Deauthentication resaon code */ + t_u16 reason_code; +} MLAN_PACK_END HostCmd_DS_802_11_DEAUTHENTICATE; + +/** HostCmd_DS_802_11_ASSOCIATE */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_ASSOCIATE { + /** Peer STA address */ + t_u8 peer_sta_addr[MLAN_MAC_ADDR_LENGTH]; + /** Capability information */ + IEEEtypes_CapInfo_t cap_info; + /** Listen interval */ + t_u16 listen_interval; + /** Beacon period */ + t_u16 beacon_period; + /** DTIM period */ + t_u8 dtim_period; + + /** + * MrvlIEtypes_SsIdParamSet_t SsIdParamSet; + * MrvlIEtypes_PhyParamSet_t PhyParamSet; + * MrvlIEtypes_SsParamSet_t SsParamSet; + * MrvlIEtypes_RatesParamSet_t RatesParamSet; + */ +} MLAN_PACK_END HostCmd_DS_802_11_ASSOCIATE; + +/** HostCmd_CMD_802_11_ASSOCIATE response */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_ASSOCIATE_RSP { + /** Association response structure */ + IEEEtypes_AssocRsp_t assoc_rsp; +} MLAN_PACK_END HostCmd_DS_802_11_ASSOCIATE_RSP; + +/** HostCmd_DS_802_11_AD_HOC_START*/ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_AD_HOC_START { + /** AdHoc SSID */ + t_u8 ssid[MLAN_MAX_SSID_LENGTH]; + /** BSS mode */ + t_u8 bss_mode; + /** Beacon period */ + t_u16 beacon_period; + /** DTIM period */ + t_u8 dtim_period; + /** SS parameter set */ + IEEEtypes_SsParamSet_t ss_param_set; + /** PHY parameter set */ + IEEEtypes_PhyParamSet_t phy_param_set; + /** Reserved field */ + t_u16 reserved1; + /** Capability information */ + IEEEtypes_CapInfo_t cap; + /** Supported data rates */ + t_u8 DataRate[HOSTCMD_SUPPORTED_RATES]; +} MLAN_PACK_END HostCmd_DS_802_11_AD_HOC_START; + +/** HostCmd_CMD_802_11_AD_HOC_START response */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_AD_HOC_START_RESULT { + /** Padding */ + t_u8 pad[3]; + /** AdHoc BSSID */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; + /** Padding to sync with FW structure*/ + t_u8 pad2[2]; + /** Result */ + t_u8 result; +} MLAN_PACK_END HostCmd_DS_802_11_AD_HOC_START_RESULT; + +/** HostCmd_CMD_802_11_AD_HOC_START response */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_AD_HOC_JOIN_RESULT { + /** Result */ + t_u8 result; +} MLAN_PACK_END HostCmd_DS_802_11_AD_HOC_JOIN_RESULT; + +/** AdHoc_BssDesc_t */ +typedef MLAN_PACK_START struct _AdHoc_BssDesc_t { + /** BSSID */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; + /** SSID */ + t_u8 ssid[MLAN_MAX_SSID_LENGTH]; + /** BSS mode */ + t_u8 bss_mode; + /** Beacon period */ + t_u16 beacon_period; + /** DTIM period */ + t_u8 dtim_period; + /** Timestamp */ + t_u8 time_stamp[8]; + /** Local time */ + t_u8 local_time[8]; + /** PHY parameter set */ + IEEEtypes_PhyParamSet_t phy_param_set; + /** SS parameter set */ + IEEEtypes_SsParamSet_t ss_param_set; + /** Capability information */ + IEEEtypes_CapInfo_t cap; + /** Supported data rates */ + t_u8 data_rates[HOSTCMD_SUPPORTED_RATES]; + + /* + * DO NOT ADD ANY FIELDS TO THIS STRUCTURE. + * It is used in the Adhoc join command and will cause a + * binary layout mismatch with the firmware + */ +} MLAN_PACK_END AdHoc_BssDesc_t; + +/** HostCmd_DS_802_11_AD_HOC_JOIN */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_AD_HOC_JOIN { + /** AdHoc BSS descriptor */ + AdHoc_BssDesc_t bss_descriptor; + /** Reserved field */ + t_u16 reserved1; + /** Reserved field */ + t_u16 reserved2; +} MLAN_PACK_END HostCmd_DS_802_11_AD_HOC_JOIN; + +/** Interrupt Raising Edge */ +#define INT_RASING_EDGE 0 +/** Interrupt Falling Edge */ +#define INT_FALLING_EDGE 1 + +/** Delay 1 usec */ +#define DELAY_1_US 1 + +typedef MLAN_PACK_START struct _HostCmd_DS_SDIO_GPIO_INT_CONFIG { + /** Action */ + t_u16 action; + /** GPIO interrupt pin */ + t_u16 gpio_pin; + /** GPIO interrupt edge, 1: failing edge; 0: raising edge */ + t_u16 gpio_int_edge; + /** GPIO interrupt pulse widthin usec units */ + t_u16 gpio_pulse_width; +} MLAN_PACK_END HostCmd_DS_SDIO_GPIO_INT_CONFIG; + +typedef MLAN_PACK_START struct _HostCmd_DS_SDIO_PULL_CTRL { + /** Action */ + t_u16 action; + /** The delay of pulling up in us */ + t_u16 pull_up; + /** The delay of pulling down in us */ + t_u16 pull_down; +} MLAN_PACK_END HostCmd_DS_SDIO_PULL_CTRL; + +/** HostCmd_DS_802_11_GET_LOG */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_GET_LOG { + /** Number of multicast transmitted frames */ + t_u32 mcast_tx_frame; + /** Number of failures */ + t_u32 failed; + /** Number of retries */ + t_u32 retry; + /** Number of multiretries */ + t_u32 multiretry; + /** Number of duplicate frames */ + t_u32 frame_dup; + /** Number of RTS success */ + t_u32 rts_success; + /** Number of RTS failure */ + t_u32 rts_failure; + /** Number of acknowledgement failure */ + t_u32 ack_failure; + /** Number of fragmented packets received */ + t_u32 rx_frag; + /** Number of multicast frames received */ + t_u32 mcast_rx_frame; + /** FCS error */ + t_u32 fcs_error; + /** Number of transmitted frames */ + t_u32 tx_frame; + /** Reserved field */ + t_u32 reserved; + /** Number of WEP icv error for each key */ + t_u32 wep_icv_err_cnt[4]; + /** Beacon received count */ + t_u32 bcn_rcv_cnt; + /** Beacon missed count */ + t_u32 bcn_miss_cnt; +} MLAN_PACK_END HostCmd_DS_802_11_GET_LOG; + +/**_HostCmd_TX_RATE_QUERY */ +typedef MLAN_PACK_START struct _HostCmd_TX_RATE_QUERY { + /** Tx rate */ + t_u8 tx_rate; + /** Tx Rate Info: + * [Bit 0-1] tx rate formate: LG = 0, HT = 1, VHT = 2 + * [Bit 2-3] HT/VHT Bandwidth: BW20 = 0, BW40 = 1, BW80 = 2, BW160 = 3 + * [Bit 4] HT/VHT Guard Interval: LGI = 0, SGI = 1 */ + t_u8 tx_rate_info; +} MLAN_PACK_END HostCmd_TX_RATE_QUERY; + +typedef MLAN_PACK_START struct _hs_config_param { + /** bit0=1: broadcast data + * bit1=1: unicast data + * bit2=1: mac events + * bit3=1: multicast data + */ + t_u32 conditions; + /** GPIO pin or 0xff for interface */ + t_u8 gpio; + /** gap in milliseconds or or 0xff for special setting when + * GPIO is used to wakeup host + */ + t_u8 gap; +} MLAN_PACK_END hs_config_param; + +/** HS Action 0x0001 - Configure enhanced host sleep mode, + * 0x0002 - Activate enhanced host sleep mode + */ +typedef enum _Host_Sleep_Action { + HS_CONFIGURE = 0x0001, + HS_ACTIVATE = 0x0002, +} Host_Sleep_Action; + +/** Structure definition for activating enhanced hs */ +typedef MLAN_PACK_START struct __hs_activate_param { + /** response control 0x00 - response not needed, 0x01 - response needed */ + t_u16 resp_ctrl; +} MLAN_PACK_END hs_activate_param; + +/** HostCmd_DS_802_11_HS_CFG_ENH */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_HS_CFG_ENH { + /** Action 0x0001 - Configure enhanced host sleep mode, + * 0x0002 - Activate enhanced host sleep mode + */ + t_u16 action; + + union { + /** Configure enhanced hs */ + hs_config_param hs_config; + /** Activate enhanced hs */ + hs_activate_param hs_activate; + } params; +} MLAN_PACK_END HostCmd_DS_802_11_HS_CFG_ENH; + +/** SNMP_MIB_INDEX */ +typedef enum _SNMP_MIB_INDEX { + OpRateSet_i = 1, + DtimPeriod_i = 3, + RtsThresh_i = 5, + ShortRetryLim_i = 6, + LongRetryLim_i = 7, + FragThresh_i = 8, + Dot11D_i = 9, + Dot11H_i = 10, + WwsMode_i = 17, + Thermal_i = 34, + NullPktPeriod_i = 37, +} SNMP_MIB_INDEX; + +/** max SNMP buf size */ +#define MAX_SNMP_BUF_SIZE 128 + +/** HostCmd_CMD_802_11_SNMP_MIB */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SNMP_MIB { + /** SNMP query type */ + t_u16 query_type; + /** SNMP object ID */ + t_u16 oid; + /** SNMP buffer size */ + t_u16 buf_size; + /** Value */ + t_u8 value[1]; +} MLAN_PACK_END HostCmd_DS_802_11_SNMP_MIB; + +/** Radio on */ +#define RADIO_ON 0x01 +/** Radio off */ +#define RADIO_OFF 0x00 + +/** HostCmd_CMD_802_11_RADIO_CONTROL */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RADIO_CONTROL { + /** Action */ + t_u16 action; + /** Control */ + t_u16 control; +} MLAN_PACK_END HostCmd_DS_802_11_RADIO_CONTROL; + +/** MrvlRateScope_t */ +typedef MLAN_PACK_START struct _MrvlRateScope_t { + /** Header Type */ + t_u16 type; + /** Header Length */ + t_u16 length; + /** Bitmap of HR/DSSS rates */ + t_u16 hr_dsss_rate_bitmap; + /** Bitmap of OFDM rates */ + t_u16 ofdm_rate_bitmap; + /** Bitmap of HT-MCSs allowed for initial rate */ + t_u16 ht_mcs_rate_bitmap[8]; + t_u16 vht_mcs_rate_bitmap[8]; +} MLAN_PACK_END MrvlRateScope_t; + +/** MrvlRateDropPattern_t */ +typedef MLAN_PACK_START struct _MrvlRateDropPattern_t { + /** Header Type */ + t_u16 type; + /** Header Length */ + t_u16 length; + /** Rate Drop Mode */ + t_u32 rate_drop_mode; + /* MrvlRateDropControl_t RateDropControl[0]; */ +} MLAN_PACK_END MrvlRateDropPattern_t; + +/** HostCmd_DS_TX_RATE_CFG */ +typedef MLAN_PACK_START struct _HostCmd_DS_TX_RATE_CFG { + /** Action */ + t_u16 action; + t_u16 reserved_1; + /* MrvlRateScope_t RateScope; MrvlRateDropPattern_t RateDrop; */ +} MLAN_PACK_END HostCmd_DS_TX_RATE_CFG; + +/** Power_Group_t */ +typedef MLAN_PACK_START struct _Power_Group_t { + /** Modulation Class */ + t_u8 modulation_class; + /** MCS Code or Legacy RateID */ + t_u8 first_rate_code; + /** MCS Code or Legacy RateID */ + t_u8 last_rate_code; + /** Power Adjustment Step */ + t_s8 power_step; + /** Minimal Tx Power Level [dBm] */ + t_s8 power_min; + /** Maximal Tx Power Level [dBm] */ + t_s8 power_max; + /** 0: HTBW20, 1: HTBW40 */ + t_u8 ht_bandwidth; + /** Reserved */ + t_u8 reserved; +} MLAN_PACK_END Power_Group_t; + +/** MrvlTypes_Power_Group_t */ +typedef MLAN_PACK_START struct _MrvlTypes_Power_Group_t { + /** Header Type */ + t_u16 type; + /** Header Length */ + t_u16 length; + /* Power_Group_t PowerGroups */ +} MLAN_PACK_END MrvlTypes_Power_Group_t; + +/** HostCmd_CMD_TXPWR_CFG */ +typedef MLAN_PACK_START struct _HostCmd_DS_TXPWR_CFG { + /** Action */ + t_u16 action; + /** Power group configuration index */ + t_u16 cfg_index; + /** Power group configuration mode */ + t_u32 mode; + /* MrvlTypes_Power_Group_t PowerGrpCfg[0] */ +} MLAN_PACK_END HostCmd_DS_TXPWR_CFG; + +/** HostCmd_CMD_802_11_RF_TX_POWER */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RF_TX_POWER { + /** Action */ + t_u16 action; + /** Current power level */ + t_s16 current_level; + /** Maximum power */ + t_s8 max_power; + /** Minimum power */ + t_s8 min_power; +} MLAN_PACK_END HostCmd_DS_802_11_RF_TX_POWER; + +/** Connection type infra */ +#define CONNECTION_TYPE_INFRA 0 +/** Connection type adhoc */ +#define CONNECTION_TYPE_ADHOC 1 +#ifdef WIFI_DIRECT_SUPPORT +/** BSS Mode: WIFIDIRECT Client */ +#define BSS_MODE_WIFIDIRECT_CLIENT 0 +/** BSS Mode: WIFIDIRECT GO */ +#define BSS_MODE_WIFIDIRECT_GO 2 +#endif +/** HostCmd_DS_SET_BSS_MODE */ +typedef MLAN_PACK_START struct _HostCmd_DS_SET_BSS_MODE { + /** connection type */ + t_u8 con_type; +} MLAN_PACK_END HostCmd_DS_SET_BSS_MODE; + +#ifdef WIFI_DIRECT_SUPPORT +/** HostCmd_DS_REMAIN_ON_CHANNEL */ +typedef MLAN_PACK_START struct _HostCmd_DS_REMAIN_ON_CHANNEL { + /** Action 0-GET, 1-SET, 4 CLEAR*/ + t_u16 action; + /** Not used set to zero */ + t_u8 status; + /** Not used set to zero */ + t_u8 reserved; + /** Band cfg */ + t_u8 bandcfg; + /** channel */ + t_u8 channel; + /** remain time: Unit ms*/ + t_u32 remain_period; +} MLAN_PACK_END HostCmd_DS_REMAIN_ON_CHANNEL; + +/** HostCmd_DS_WIFI_DIRECT_MODE */ +typedef MLAN_PACK_START struct _HostCmd_DS_WIFI_DIRECT_MODE { + /** Action 0-GET, 1-SET*/ + t_u16 action; + /**0:disable 1:listen 2:GO 3:p2p client 4:find 5:stop find*/ + t_u16 mode; +} MLAN_PACK_END HostCmd_DS_WIFI_DIRECT_MODE; + +/** MrvlIEtypes_NoA_setting_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_NoA_setting_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** enable/disable */ + t_u8 enable; + /** index */ + t_u16 index; + /** NoA count */ + t_u8 noa_count; + /** NoA duration */ + t_u32 noa_duration; + /** NoA interval */ + t_u32 noa_interval; +} MLAN_PACK_END MrvlIEtypes_NoA_setting_t; + +/** MrvlIEtypes_NoA_setting_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_OPP_PS_setting_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** enable/disable && ct_window */ + t_u8 enable; +} MLAN_PACK_END MrvlIEtypes_OPP_PS_setting_t; + +/** HostCmd_DS_REMAIN_ON_CHANNEL */ +typedef MLAN_PACK_START struct _HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG { + /** Action 0-GET, 1-SET */ + t_u16 action; + /** MrvlIEtypes_NoA_setting_t + * MrvlIEtypes_OPP_PS_setting_t + */ +} MLAN_PACK_END HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG; +#endif + +MLAN_PACK_START struct coalesce_filt_field_param { + t_u8 operation; + t_u8 operand_len; + t_u16 offset; + t_u8 operand_byte_stream[4]; +} MLAN_PACK_END; + +MLAN_PACK_START struct coalesce_receive_filt_rule { + MrvlIEtypesHeader_t header; + t_u8 num_of_fields; + t_u8 pkt_type; + t_u16 max_coalescing_delay; + struct coalesce_filt_field_param params[0]; +} MLAN_PACK_END; + +/** HostCmd_DS_COALESCE_CONFIG */ +typedef MLAN_PACK_START struct _HostCmd_DS_COALESCE_CONFIG { + /** Action 0-GET, 1-SET */ + t_u16 action; + t_u16 num_of_rules; + struct coalesce_receive_filt_rule rule[0]; +} MLAN_PACK_END HostCmd_DS_COALESCE_CONFIG; + +#ifdef STA_SUPPORT + +/** + * @brief Structure used internally in the wlan driver to configure a scan. + * + * Sent to the command process module to configure the firmware + * scan command prepared by wlan_cmd_802_11_scan. + * + * @sa wlan_scan_networks + * + */ +typedef MLAN_PACK_START struct _wlan_scan_cmd_config { + /** + * BSS Type to be sent in the firmware command + * + * Field can be used to restrict the types of networks returned in the + * scan. Valid settings are: + * + * - MLAN_SCAN_MODE_BSS (infrastructure) + * - MLAN_SCAN_MODE_IBSS (adhoc) + * - MLAN_SCAN_MODE_ANY (unrestricted, adhoc and infrastructure) + */ + t_u8 bss_mode; + + /** + * Specific BSSID used to filter scan results in the firmware + */ + t_u8 specific_bssid[MLAN_MAC_ADDR_LENGTH]; + + /** + * Length of TLVs sent in command starting at tlvBuffer + */ + t_u32 tlv_buf_len; + + /** + * SSID TLV(s) and ChanList TLVs to be sent in the firmware command + * + * TLV_TYPE_CHANLIST, MrvlIEtypes_ChanListParamSet_t + * TLV_TYPE_SSID, MrvlIEtypes_SsIdParamSet_t + */ + t_u8 tlv_buf[1]; /* SSID TLV(s) and ChanList TLVs are stored + here */ +} MLAN_PACK_END wlan_scan_cmd_config; + +/** + * Sructure to retrieve the scan table + */ +typedef MLAN_PACK_START struct { + /** + * - Zero based scan entry to start retrieval in command request + * - Number of scans entries returned in command response + */ + t_u32 scan_number; + /** + * Buffer marker for multiple wlan_ioctl_get_scan_table_entry structures. + * Each struct is padded to the nearest 32 bit boundary. + */ + t_u8 scan_table_entry_buf[1]; +} MLAN_PACK_END wlan_get_scan_table_info; + +/** Generic structure defined for parsing WPA/RSN IEs for GTK/PTK OUIs */ +typedef MLAN_PACK_START struct { + /** Group key oui */ + t_u8 GrpKeyOui[4]; + /** Number of PTKs */ + t_u8 PtkCnt[2]; + /** Ptk body starts here */ + t_u8 PtkBody[4]; +} MLAN_PACK_END IEBody; +#endif /* STA_SUPPORT */ + +/* + * This scan handle Country Information IE(802.11d compliant) + * Define data structure for HostCmd_CMD_802_11_SCAN + */ +/** HostCmd_DS_802_11_SCAN */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SCAN { + /** BSS mode */ + t_u8 bss_mode; + /** BSSID */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; + /** TLV buffer */ + t_u8 tlv_buffer[1]; + /** MrvlIEtypes_SsIdParamSet_t SsIdParamSet; + * MrvlIEtypes_ChanListParamSet_t ChanListParamSet; + * MrvlIEtypes_RatesParamSet_t OpRateSet; + */ +} MLAN_PACK_END HostCmd_DS_802_11_SCAN; + +/* + * This scan handle Country Information IE(802.11d compliant) + * Define data structure for HostCmd_CMD_802_11_SCAN_EXT + */ +/** HostCmd_DS_802_11_SCAN_EXT */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SCAN_EXT { + /** Reserved */ + t_u32 reserved; + /** TLV buffer */ + t_u8 tlv_buffer[1]; + /** MrvlIEtypes_Bssid_List_t BssIdList; + * MrvlIEtypes_SsIdParamSet_t SSIDParamSet; + * MrvlIEtypes_ChanListParamSet_t ChanListParamSet; + * MrvlIEtypes_RatesParamSet_t OpRateSet; + * MrvlIEtypes_NumProbes_t NumProbes; + * MrvlIEtypes_WildCardSsIdParamSet_t WildCardSSIDParamSet; + * MrvlIEtypes_BssMode_t BssMode; + */ +} MLAN_PACK_END HostCmd_DS_802_11_SCAN_EXT; + +/** MrvlIEtypes_BssMode */ +typedef MLAN_PACK_START struct _MrvlIEtypes_BssMode_t { + /** Header */ + MrvlIEtypesHeader_t header; + /* INFRA/IBSS/AUTO */ + t_u8 bss_mode; +} MLAN_PACK_END MrvlIEtypes_BssMode_t; + +/** BSS scan Rsp */ +typedef MLAN_PACK_START struct _MrvlIEtypes_Bss_Scan_Rsp_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** BSSID of the BSS descriptor */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; + /** Beacon/Probe response buffer */ + t_u8 frame_body[1]; +} MLAN_PACK_END MrvlIEtypes_Bss_Scan_Rsp_t; + +typedef MLAN_PACK_START struct _MrvlIEtypes_Bss_Scan_Info_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** RSSI for scan entry */ + t_s16 rssi; + /** Channel ANPI */ + t_s16 anpi; + /** Channel load (parts per 255) */ + t_u8 cca_busy_fraction; + /** Band */ + t_u8 band; + /** Channel */ + t_u8 channel; + /** Reserved */ + t_u8 reserved; + /** TSF data */ + t_u64 tsf; +} MLAN_PACK_END MrvlIEtypes_Bss_Scan_Info_t; + +/** HostCmd_DS_RX_MGMT_IND */ +typedef MLAN_PACK_START struct _HostCmd_DS_RX_MGMT_IND { + /** Action */ + t_u16 action; + /** Mgmt frame subtype mask */ + t_u32 mgmt_subtype_mask; +} MLAN_PACK_END HostCmd_DS_RX_MGMT_IND; + +/** HostCmd_DS_802_11_SCAN_RSP */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SCAN_RSP { + /** Size of BSS descriptor */ + t_u16 bss_descript_size; + /** Numner of sets */ + t_u8 number_of_sets; + /** BSS descriptor and TLV buffer */ + t_u8 bss_desc_and_tlv_buffer[1]; +} MLAN_PACK_END HostCmd_DS_802_11_SCAN_RSP; + +/** HostCmd_DS_802_11_BG_SCAN_CONFIG */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_BG_SCAN_CONFIG { + /** action */ + t_u16 action; + /** 0: disable, 1: enable */ + t_u8 enable; + /** bss type */ + t_u8 bss_type; + /** num of channel per scan */ + t_u8 chan_per_scan; + /** reserved field */ + t_u8 reserved; + /** reserved field */ + t_u16 reserved1; + /** interval between consecutive scans */ + t_u32 scan_interval; + /** reserved field */ + t_u32 reserved2; + /** condition to trigger report to host */ + t_u32 report_condition; + /** reserved field */ + t_u16 reserved3; +} MLAN_PACK_END HostCmd_DS_802_11_BG_SCAN_CONFIG; + +/** HostCmd_DS_802_11_BG_SCAN_QUERY */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_BG_SCAN_QUERY { + /** Flush */ + t_u8 flush; +} MLAN_PACK_END HostCmd_DS_802_11_BG_SCAN_QUERY; + +/** HostCmd_DS_802_11_BG_SCAN_QUERY_RSP */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_BG_SCAN_QUERY_RSP { + /** Report condition */ + t_u32 report_condition; + /** Scan response */ + HostCmd_DS_802_11_SCAN_RSP scan_resp; +} MLAN_PACK_END HostCmd_DS_802_11_BG_SCAN_QUERY_RSP; + +/** MrvlIEtypes_StartLater_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_StartLater_t { + /** Header */ + MrvlIEtypesHeader_t header; + /* 0 - BGScan start immediately, 1 - BGScan will start later after + "Scan Interval" */ + t_u16 value; +} MLAN_PACK_END MrvlIEtypes_StartLater_t; + +/** MrvlIEtypes_RepeatCount_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_RepeatCount_t { + /** Header */ + MrvlIEtypesHeader_t header; + /* Repeat count */ + t_u16 repeat_count; +} MLAN_PACK_END MrvlIEtypes_RepeatCount_t; + +/** MrvlIEtypes_DomainParamSet_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_DomainParamSet { + /** Header */ + MrvlIEtypesHeader_t header; + /** Country code */ + t_u8 country_code[COUNTRY_CODE_LEN]; + /** Set of subbands */ + IEEEtypes_SubbandSet_t sub_band[1]; +} MLAN_PACK_END MrvlIEtypes_DomainParamSet_t; + +/** HostCmd_DS_802_11D_DOMAIN_INFO */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11D_DOMAIN_INFO { + /** Action */ + t_u16 action; + /** Domain parameter set */ + MrvlIEtypes_DomainParamSet_t domain; +} MLAN_PACK_END HostCmd_DS_802_11D_DOMAIN_INFO; + +/** HostCmd_DS_802_11D_DOMAIN_INFO_RSP */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11D_DOMAIN_INFO_RSP { + /** Action */ + t_u16 action; + /** Domain parameter set */ + MrvlIEtypes_DomainParamSet_t domain; +} MLAN_PACK_END HostCmd_DS_802_11D_DOMAIN_INFO_RSP; + +/** HostCmd_DS_11N_ADDBA_REQ */ +typedef MLAN_PACK_START struct _HostCmd_DS_11N_ADDBA_REQ { + /** Result of the ADDBA Request Operation */ + t_u8 add_req_result; + /** Peer MAC address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** Dialog Token */ + t_u8 dialog_token; + /** Block Ack Parameter Set */ + t_u16 block_ack_param_set; + /** Block Act Timeout Value */ + t_u16 block_ack_tmo; + /** Starting Sequence Number */ + t_u16 ssn; +} MLAN_PACK_END HostCmd_DS_11N_ADDBA_REQ; + +/** HostCmd_DS_11N_ADDBA_RSP */ +typedef MLAN_PACK_START struct _HostCmd_DS_11N_ADDBA_RSP { + /** Result of the ADDBA Response Operation */ + t_u8 add_rsp_result; + /** Peer MAC address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** Dialog Token */ + t_u8 dialog_token; + /** Status Code */ + t_u16 status_code; + /** Block Ack Parameter Set */ + t_u16 block_ack_param_set; + /** Block Act Timeout Value */ + t_u16 block_ack_tmo; + /** Starting Sequence Number */ + t_u16 ssn; +} MLAN_PACK_END HostCmd_DS_11N_ADDBA_RSP; + +/** HostCmd_DS_11N_DELBA */ +typedef MLAN_PACK_START struct _HostCmd_DS_11N_DELBA { + /** Result of the ADDBA Request Operation */ + t_u8 del_result; + /** Peer MAC address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** Delete Block Ack Parameter Set */ + t_u16 del_ba_param_set; + /** Reason Code sent for DELBA */ + t_u16 reason_code; + /** Reserved */ + t_u8 reserved; +} MLAN_PACK_END HostCmd_DS_11N_DELBA; + +/** HostCmd_DS_11N_BATIMEOUT */ +typedef MLAN_PACK_START struct _HostCmd_DS_11N_BATIMEOUT { + /** TID */ + t_u8 tid; + /** Peer MAC address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** Delete Block Ack Parameter Set */ + t_u8 origninator; +} MLAN_PACK_END HostCmd_DS_11N_BATIMEOUT; + +/** HostCmd_DS_11N_CFG */ +typedef MLAN_PACK_START struct _HostCmd_DS_11N_CFG { + /** Action */ + t_u16 action; + /** HTTxCap */ + t_u16 ht_tx_cap; + /** HTTxInfo */ + t_u16 ht_tx_info; + /** Misc configuration */ + t_u16 misc_config; +} MLAN_PACK_END HostCmd_DS_11N_CFG; + +/** HostCmd_DS_11N_CFG */ +typedef MLAN_PACK_START struct _HostCmd_DS_REJECT_ADDBA_REQ { + /** Action */ + t_u16 action; + /** Bit0 : host sleep activated + * Bit1 : auto reconnect enabled + * Others : reserved + */ + t_u32 conditions; +} MLAN_PACK_END HostCmd_DS_REJECT_ADDBA_REQ; + +/** HostCmd_DS_TXBUF_CFG*/ +typedef MLAN_PACK_START struct _HostCmd_DS_TXBUF_CFG { + /** Action */ + t_u16 action; + /** Buffer Size */ + t_u16 buff_size; + /** End Port_for Multiport */ + t_u16 mp_end_port; + /** Reserved */ + t_u16 reserved3; +} MLAN_PACK_END HostCmd_DS_TXBUF_CFG; + +/** HostCmd_DS_AMSDU_AGGR_CTRL */ +typedef MLAN_PACK_START struct _HostCmd_DS_AMSDU_AGGR_CTRL { + /** Action */ + t_u16 action; + /** Enable */ + t_u16 enable; + /** Get the current Buffer Size valid */ + t_u16 curr_buf_size; +} MLAN_PACK_END HostCmd_DS_AMSDU_AGGR_CTRL; + +/** HostCmd_DS_11AC_CFG */ +typedef MLAN_PACK_START struct _HostCmd_DS_11AC_CFG { + /** Action */ + t_u16 action; + /** BandConfig */ + t_u8 band_config; + /** Misc Configuration */ + t_u8 misc_config; + /** VHT Capability Info */ + t_u32 vht_cap_info; + /** VHT Support MCS Set */ + t_u8 vht_supp_mcs_set[VHT_MCS_SET_LEN]; +} MLAN_PACK_END HostCmd_DS_11AC_CFG; + +/** HostCmd_DS_11ACTXBUF_CFG*/ +typedef MLAN_PACK_START struct _HostCmd_DS_11ACTXBUF_CFG { + /** Action */ + t_u16 action; + /** Buffer Size */ + t_u16 buff_size; + /** End Port_for Multiport */ + t_u16 mp_end_port; + /** Reserved */ + t_u16 reserved3; +} MLAN_PACK_END HostCmd_DS_11ACTXBUF_CFG; + +/** HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG */ +typedef MLAN_PACK_START struct _HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG { + /** Action */ + t_u16 action; + /** Current system clock */ + t_u16 cur_sys_clk; + /** Clock type */ + t_u16 sys_clk_type; + /** Length of clocks */ + t_u16 sys_clk_len; + /** System clocks */ + t_u16 sys_clk[16]; +} MLAN_PACK_END HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG; + +/** MrvlIEtypes_WmmParamSet_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_WmmParamSet_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** WMM IE */ + t_u8 wmm_ie[1]; +} MLAN_PACK_END MrvlIEtypes_WmmParamSet_t; + +/** MrvlIEtypes_WmmQueueStatus_t */ +typedef MLAN_PACK_START struct { + /** Header */ + MrvlIEtypesHeader_t header; + /** Queue index */ + t_u8 queue_index; + /** Disabled flag */ + t_u8 disabled; + /** Medium time allocation in 32us units*/ + t_u16 medium_time; + /** Flow required flag */ + t_u8 flow_required; + /** Flow created flag */ + t_u8 flow_created; + /** Reserved */ + t_u32 reserved; +} MLAN_PACK_END MrvlIEtypes_WmmQueueStatus_t; + +/** Size of a TSPEC. Used to allocate necessary buffer space in commands */ +#define WMM_TSPEC_SIZE 63 + +/** Maximum number of AC QOS queues available in the driver/firmware */ +#define MAX_AC_QUEUES 4 + +/** Extra IE bytes allocated in messages for appended IEs after a TSPEC */ +#define WMM_ADDTS_EXTRA_IE_BYTES 256 + +/** Extra TLV bytes allocated in messages for configuring WMM Queues */ +#define WMM_QUEUE_CONFIG_EXTRA_TLV_BYTES 64 + +/** Number of bins in the histogram for the HostCmd_DS_WMM_QUEUE_STATS */ +#define WMM_STATS_PKTS_HIST_BINS 7 + +/** + * @brief Firmware command structure to retrieve the firmware WMM status. + * + * Used to retrieve the status of each WMM AC Queue in TLV + * format (MrvlIEtypes_WmmQueueStatus_t) as well as the current WMM + * parameter IE advertised by the AP. + * + * Used in response to a EVENT_WMM_STATUS_CHANGE event signaling + * a QOS change on one of the ACs or a change in the WMM Parameter in + * the Beacon. + * + * TLV based command, byte arrays used for max sizing purpose. There are no + * arguments sent in the command, the TLVs are returned by the firmware. + */ +typedef MLAN_PACK_START struct { + /** Queue status TLV */ + t_u8 queue_status_tlv[sizeof(MrvlIEtypes_WmmQueueStatus_t) + * MAX_AC_QUEUES]; + /** WMM parameter TLV */ + t_u8 wmm_param_tlv[sizeof(IEEEtypes_WmmParameter_t) + 2]; +} MLAN_PACK_END HostCmd_DS_WMM_GET_STATUS; + +/** + * @brief Command structure for the HostCmd_CMD_WMM_ADDTS_REQ firmware command + */ +typedef MLAN_PACK_START struct { + mlan_cmd_result_e command_result;/**< Command result */ + t_u32 timeout_ms; /**< Timeout value in milliseconds */ + t_u8 dialog_token; /**< Dialog token */ + t_u8 ieee_status_code; /**< IEEE status code */ + t_u8 tspec_data[WMM_TSPEC_SIZE]; /**< TSPEC data */ + t_u8 addts_extra_ie_buf[WMM_ADDTS_EXTRA_IE_BYTES]; + /**< Extra IE buffer */ +} MLAN_PACK_END HostCmd_DS_WMM_ADDTS_REQ; + +/** + * @brief Command structure for the HostCmd_CMD_WMM_DELTS_REQ firmware command + */ +typedef MLAN_PACK_START struct { + mlan_cmd_result_e command_result; + /**< Command result */ + t_u8 dialog_token; /**< Dialog token */ + t_u8 ieee_reason_code; /**< IEEE reason code */ + t_u8 tspec_data[WMM_TSPEC_SIZE];/**< TSPEC data */ +} MLAN_PACK_END HostCmd_DS_WMM_DELTS_REQ; + +/** + * @brief Command structure for the HostCmd_CMD_WMM_QUEUE_CONFIG firmware cmd + * + * Set/Get/Default the Queue parameters for a specific AC in the firmware. + */ +typedef MLAN_PACK_START struct { + mlan_wmm_queue_config_action_e action; + /**< Set, Get, or Default */ + mlan_wmm_ac_e access_category; /**< WMM_AC_BK(0) to WMM_AC_VO(3) */ + /** @brief MSDU lifetime expiry per 802.11e + * + * - Ignored if 0 on a set command + * - Set to the 802.11e specified 500 TUs when defaulted + */ + t_u16 msdu_lifetime_expiry; + t_u8 tlv_buffer[WMM_QUEUE_CONFIG_EXTRA_TLV_BYTES]; + /**< Not supported */ +} MLAN_PACK_END HostCmd_DS_WMM_QUEUE_CONFIG; + +/** + * @brief Command structure for the HostCmd_CMD_WMM_QUEUE_STATS firmware cmd + * + * Turn statistical collection on/off for a given AC or retrieve the + * accumulated stats for an AC and clear them in the firmware. + */ +typedef MLAN_PACK_START struct { + mlan_wmm_queue_stats_action_e action; + /**< Start, Stop, or Get */ +#ifdef BIG_ENDIAN_SUPPORT + t_u8 select_bin:7; /**< WMM_AC_BK(0) to WMM_AC_VO(3), or TID */ + t_u8 select_is_userpri:1; + /**< Set if select_bin is UP, Clear for AC */ +#else + t_u8 select_is_userpri:1; + /**< Set if select_bin is UP, Clear for AC */ + t_u8 select_bin:7; /**< WMM_AC_BK(0) to WMM_AC_VO(3), or TID */ +#endif + t_u16 pkt_count; /**< Number of successful packets transmitted */ + t_u16 pkt_loss; /**< Packets lost; not included in pktCount */ + t_u32 avg_queue_delay; + /**< Average Queue delay in microsec */ + t_u32 avg_tx_delay; /**< Average Transmission delay in microsec */ + t_u16 used_time; /**< Calc used time - units of 32 microsec */ + t_u16 policed_time; /**< Calc policed time - units of 32 microsec */ + /** @brief Queue Delay Histogram; number of packets per queue delay range + * + * [0] - 0ms <= delay < 5ms + * [1] - 5ms <= delay < 10ms + * [2] - 10ms <= delay < 20ms + * [3] - 20ms <= delay < 30ms + * [4] - 30ms <= delay < 40ms + * [5] - 40ms <= delay < 50ms + * [6] - 50ms <= delay < msduLifetime (TUs) + */ + t_u16 delay_histogram[WMM_STATS_PKTS_HIST_BINS]; + /** Reserved */ + t_u16 reserved_1; +} MLAN_PACK_END HostCmd_DS_WMM_QUEUE_STATS; + +/** + * @brief Command structure for the HostCmd_CMD_WMM_TS_STATUS firmware cmd + * + * Query the firmware to get the status of the WMM Traffic Streams + */ +typedef MLAN_PACK_START struct { + /** TSID: Range: 0->7 */ + t_u8 tid; + /** TSID specified is valid */ + t_u8 valid; + /** AC TSID is active on */ + t_u8 access_category; + /** UP specified for the TSID */ + t_u8 user_priority; + /** Power save mode for TSID: 0 (legacy), 1 (UAPSD) */ + t_u8 psb; + /** Uplink(1), Downlink(2), Bidirectional(3) */ + t_u8 flow_dir; + /** Medium time granted for the TSID */ + t_u16 medium_time; +} MLAN_PACK_END HostCmd_DS_WMM_TS_STATUS; + +/** Firmware status for a specific AC */ +typedef MLAN_PACK_START struct { + /** Disabled flag */ + t_u8 disabled; + /** Flow required flag */ + t_u8 flow_required; + /** Flow created flag */ + t_u8 flow_created; +} MLAN_PACK_END WmmAcStatus_t; + +/** Local Power Capability */ +typedef MLAN_PACK_START struct _MrvlIEtypes_PowerCapability_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Minmum power */ + t_s8 min_power; + /** Maximum power */ + t_s8 max_power; +} MLAN_PACK_END MrvlIEtypes_PowerCapability_t; + +/** HT Capabilities element */ +typedef MLAN_PACK_START struct _MrvlIETypes_HTCap_t { + /** Header */ + MrvlIEtypesHeader_t header; + + /** HTCap struct */ + HTCap_t ht_cap; +} MLAN_PACK_END MrvlIETypes_HTCap_t; + +/** HT Information element */ +typedef MLAN_PACK_START struct _MrvlIETypes_HTInfo_t { + /** Header */ + MrvlIEtypesHeader_t header; + + /** HTInfo struct */ + HTInfo_t ht_info; +} MLAN_PACK_END MrvlIETypes_HTInfo_t; + +/** 20/40 BSS Coexistence element */ +typedef MLAN_PACK_START struct _MrvlIETypes_2040BSSCo_t { + /** Header */ + MrvlIEtypesHeader_t header; + + /** BSSCo2040_t struct */ + BSSCo2040_t bss_co_2040; +} MLAN_PACK_END MrvlIETypes_2040BSSCo_t; + +/** Extended Capabilities element */ +typedef MLAN_PACK_START struct _MrvlIETypes_ExtCap_t { + /** Header */ + MrvlIEtypesHeader_t header; + + /** ExtCap_t struct */ + ExtCap_t ext_cap; +} MLAN_PACK_END MrvlIETypes_ExtCap_t; + +/** Qos Info */ +typedef MLAN_PACK_START struct _MrvlIETypes_qosinfo_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** qos_info*/ + t_u8 qos_info; +} MLAN_PACK_END MrvlIETypes_qosinfo_t; + +/** Overlapping BSS Scan Parameters element */ +typedef MLAN_PACK_START struct _MrvlIETypes_OverlapBSSScanParam_t { + /** Header */ + MrvlIEtypesHeader_t header; + + /** OBSSScanParam_t struct */ + OBSSScanParam_t obss_scan_param; +} MLAN_PACK_END MrvlIETypes_OverlapBSSScanParam_t; + +/** Set of MCS values that STA desires to use within the BSS */ +typedef MLAN_PACK_START struct _MrvlIETypes_HTOperationalMCSSet_t { + /** Header */ + MrvlIEtypesHeader_t header; + + /** Bitmap indicating MCSs that STA desires to use within the BSS */ + t_u8 ht_operational_mcs_bitmap[16]; +} MLAN_PACK_END MrvlIETypes_HTOperationalMCSSet_t; + +/** VHT Capabilities element */ +typedef MLAN_PACK_START struct _MrvlIETypes_VHTCap_t { + /** Header */ + MrvlIEtypesHeader_t header; + + /** VHTCap struct */ + VHT_capa_t vht_cap; +} MLAN_PACK_END MrvlIETypes_VHTCap_t; + +/** VHT Operations IE */ +typedef MLAN_PACK_START struct _MrvlIETypes_VHTOprat_t { + /** Header */ + MrvlIEtypesHeader_t header; + + t_u8 chan_width; + t_u8 chan_center_freq_1; + t_u8 chan_center_freq_2; + /** Basic MCS set map, each 2 bits stands for a Nss */ + t_u16 basic_MCS_map; +} MLAN_PACK_END MrvlIETypes_VHTOprat_t; + +/** VHT Transmit Power Envelope IE */ +typedef MLAN_PACK_START struct _MrvlIETypes_VHTtxpower_t { + /** Header */ + MrvlIEtypesHeader_t header; + + t_u8 max_tx_power; + t_u8 chan_center_freq; + t_u8 chan_width; +} MLAN_PACK_END MrvlIETypes_VHTtxpower_t; + +/** Extended Power Constraint IE */ +typedef MLAN_PACK_START struct _MrvlIETypes_ExtPwerCons_t { + /** Header */ + MrvlIEtypesHeader_t header; + + /** channel width */ + t_u8 chan_width; + /** local power constraint */ + t_u8 local_power_cons; +} MLAN_PACK_END MrvlIETypes_ExtPwerCons_t; + +/** Extended BSS Load IE */ +typedef MLAN_PACK_START struct _MrvlIETypes_ExtBSSload_t { + /** Header */ + MrvlIEtypesHeader_t header; + + t_u8 MU_MIMO_capa_count; + t_u8 stream_underutilization; + t_u8 VHT40_util; + t_u8 VHT80_util; + t_u8 VHT160_util; +} MLAN_PACK_END MrvlIETypes_ExtBSSload_t; + +/** Quiet Channel IE */ +typedef MLAN_PACK_START struct _MrvlIETypes_QuietChan_t { + /** Header */ + MrvlIEtypesHeader_t header; + + t_u8 AP_quiet_mode; + t_u8 quiet_count; + t_u8 quiet_period; + t_u16 quiet_dur; + t_u16 quiet_offset; +} MLAN_PACK_END MrvlIETypes_QuietChan_t; + +/** Wide Bandwidth Channel Switch IE */ +typedef MLAN_PACK_START struct _MrvlIETypes_BWSwitch_t { + /** Header */ + MrvlIEtypesHeader_t header; + + t_u8 new_chan_width; + t_u8 new_chan_center_freq_1; + t_u8 new_chan_center_freq_2; +} MLAN_PACK_END MrvlIETypes_BWSwitch_t; + +/** AID IE */ +typedef MLAN_PACK_START struct _MrvlIETypes_AID_t { + /** Header */ + MrvlIEtypesHeader_t header; + + /** AID number */ + t_u16 AID; +} MLAN_PACK_END MrvlIETypes_AID_t; + +/** Operating Mode Notification IE */ +typedef MLAN_PACK_START struct _MrvlIETypes_OperModeNtf_t { + /** Header */ + MrvlIEtypesHeader_t header; + + /** operating mdoe */ + t_u8 oper_mode; +} MLAN_PACK_END MrvlIETypes_OperModeNtf_t; + +/** bf global args */ +typedef struct MLAN_PACK_START _bf_global_cfg_args { + /** Global enable/disable bf */ + t_u8 bf_enbl; + /** Global enable/disable sounding */ + t_u8 sounding_enbl; + /** FB Type */ + t_u8 fb_type; + /** SNR Threshold */ + t_u8 snr_threshold; + /** Sounding interval */ + t_u16 sounding_interval; + /** BF mode */ + t_u8 bf_mode; + /** Reserved */ + t_u8 reserved; +} MLAN_PACK_END bf_global_cfg_args; + +/** bf_trigger_sound_args_t */ +typedef MLAN_PACK_START struct _bf_trigger_sound_args_t { + /** Peer MAC address */ + t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; + /** Status */ + t_u8 status; +} MLAN_PACK_END bf_trigger_sound_args_t; + +/** bf periodicity args */ +typedef MLAN_PACK_START struct _bf_periodicity_args { + /** Peer MAC address */ + t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; + /** Current Tx BF Interval */ + t_u16 interval; + /** Status */ + t_u8 status; +} MLAN_PACK_END bf_periodicity_args; + +/** bf peer configuration args */ +typedef struct MLAN_PACK_START _bf_peer_args { + /** Peer MAC address */ + t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; + /** Reserved */ + t_u16 reserved; + /** Enable/Disable Beamforming */ + t_u8 bf_enbl; + /** Enable/Disable sounding */ + t_u8 sounding_enbl; + /** FB Type */ + t_u8 fb_type; +} MLAN_PACK_END bf_peer_args; + +/** bf_snr_thr_t */ +typedef MLAN_PACK_START struct _bf_snr_thr_t { + /** Peer MAC address */ + t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; + /** SNR */ + t_u8 snr; +} MLAN_PACK_END bf_snr_thr_t; + +/** HostCmd_DS_TX_BF_CFG */ +typedef MLAN_PACK_START struct _HostCmd_DS_TX_BF_CFG { + /* Beamforming action */ + t_u16 bf_action; + /* action - SET/GET */ + t_u16 action; + + MLAN_PACK_START union { + bf_global_cfg_args bf_global_cfg; + bf_trigger_sound_args_t bf_sound_args; + bf_periodicity_args bf_periodicity; + bf_peer_args tx_bf_peer; + bf_snr_thr_t bf_snr; + } MLAN_PACK_END body; +} MLAN_PACK_END HostCmd_DS_TX_BF_CFG; + +#ifdef WIFI_DIRECT_SUPPORT +/** MrvlIEtypes_psk_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_psk_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** PSK */ + t_u8 psk[MLAN_MAX_KEY_LENGTH]; +} MLAN_PACK_END MrvlIEtypes_psk_t; +#endif /* WIFI_DIRECT_SUPPORT */ + +/** Data structure for Link ID */ +typedef MLAN_PACK_START struct _MrvlIETypes_LinkIDElement_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Bssid */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; + /** initial sta address*/ + t_u8 init_sta[MLAN_MAC_ADDR_LENGTH]; + /** respose sta address */ + t_u8 resp_sta[MLAN_MAC_ADDR_LENGTH]; +} MLAN_PACK_END MrvlIETypes_LinkIDElement_t; + +/** MrvlIEtypes_PMK_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_PMK_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** PMK */ + t_u8 pmk[1]; +} MLAN_PACK_END MrvlIEtypes_PMK_t; + +/** MrvlIEtypes_Passphrase_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_Passphrase_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Passphrase */ + char passphrase[1]; +} MLAN_PACK_END MrvlIEtypes_Passphrase_t; + +/* unicastCipher - + * Bit 0 : RFU + * Bit 1 : RFU + * Bit 2 : TKIP + * Bit 3 : AES CCKM + * Bit 2-7 : RFU + * multicastCipher - + * Bit 0 : WEP40 + * Bit 1 : WEP104 + * Bit 2 : TKIP + * Bit 3 : AES + * Bit 4-7 : Reserved for now + */ +/** MrvlIEtypes_Cipher_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_Cipher_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** PairCipher */ + t_u8 pair_cipher; + /** GroupCipher */ + t_u8 group_cipher; +} MLAN_PACK_END MrvlIEtypes_Cipher_t; + +/* rsnMode - + * Bit 0 : No RSN + * Bit 1-2 : RFU + * Bit 3 : WPA + * Bit 4 : WPA-NONE + * Bit 5 : WPA2 + * Bit 6 : AES CCKM + * Bit 7-15 : RFU + */ +/** MrvlIEtypes_EncrProto_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_EncrProto_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** EncrProto */ + t_u16 rsn_mode; +} MLAN_PACK_END MrvlIEtypes_EncrProto_t; + +/** MrvlIEtypes_Bssid_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_Bssid_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Bssid */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; +} MLAN_PACK_END MrvlIEtypes_Bssid_t; + +/* + * This struct will handle GET,SET,CLEAR function for embedded + * supplicant. + * Define data structure for HostCmd_CMD_802_11_SUPPLICANT_PMK + */ +/** HostCmd_DS_802_11_SUPPLICANT_PMK */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SUPPLICANT_PMK { + /** CMD Action GET/SET/CLEAR */ + t_u16 action; + /** CacheResult initialized to 0 */ + t_u16 cache_result; + /** TLV Buffer */ + t_u8 tlv_buffer[1]; + /** MrvlIEtypes_SsidParamSet_t SsidParamSet; + * MrvlIEtypes_PMK_t Pmk; + * MrvlIEtypes_Passphrase_t Passphrase; + * MrvlIEtypes_Bssid_t Bssid; + **/ +} MLAN_PACK_END HostCmd_DS_802_11_SUPPLICANT_PMK; + +/* + * This struct will GET the Supplicant supported bitmaps + * The GET_CURRENT action will get the network profile used + * for the current assocation. + * Define data structure for HostCmd_CMD_802_11_SUPPLICANT_PROFILE + */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SUPPLICANT_PROFILE { + /** GET/SET/GET_CURRENT */ + t_u16 action; + /** Reserved */ + t_u16 reserved; + /** TLVBuffer */ + t_u8 tlv_buf[1]; + /* MrvlIEtypes_EncrProto_t */ +} MLAN_PACK_END HostCmd_DS_802_11_SUPPLICANT_PROFILE; + +/** HostCmd_CMD_802_11_RF_CHANNEL */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RF_CHANNEL { + /** Action */ + t_u16 action; + /** Current channel */ + t_u16 current_channel; + /** RF type */ + t_u16 rf_type; + /** Reserved field */ + t_u16 reserved; +#ifdef STA_SUPPORT + /** Reserved */ + t_u8 reserved_1[32]; +#else /* STA_SUPPORT */ + /** List of channels */ + t_u8 channel_list[32]; +#endif /* !STA_SUPPORT */ +} MLAN_PACK_END HostCmd_DS_802_11_RF_CHANNEL; + +/** HostCmd_DS_VERSION_EXT */ +typedef MLAN_PACK_START struct _HostCmd_DS_VERSION_EXT { + /** Selected version string */ + t_u8 version_str_sel; + /** Version string */ + char version_str[128]; +} MLAN_PACK_END HostCmd_DS_VERSION_EXT; + +/** HostCmd_CMD_802_11_RF_ANTENNA */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RF_ANTENNA { + /** Action for Tx antenna */ + t_u16 action_tx; + /** Tx antenna mode Bit0:1, Bit1:2, Bit0-1:1+2, 0xffff: diversity */ + t_u16 tx_antenna_mode; + /** Action for Rx antenna */ + t_u16 action_rx; + /** Rx antenna mode Bit0:1, Bit1:2, Bit0-1:1+2, 0xffff: diversity */ + t_u16 rx_antenna_mode; +} MLAN_PACK_END HostCmd_DS_802_11_RF_ANTENNA; + +/** HostCmd_DS_802_11_IBSS_STATUS */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_IBSS_STATUS { + /** Action */ + t_u16 action; + /** Enable */ + t_u16 enable; + /** BSSID */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; + /** Beacon interval */ + t_u16 beacon_interval; + /** ATIM window interval */ + t_u16 atim_window; + /** User G rate protection */ + t_u16 use_g_rate_protect; +} MLAN_PACK_END HostCmd_DS_802_11_IBSS_STATUS; + +/** HostCmd_DS_MGMT_IE_LIST_CFG */ +typedef MLAN_PACK_START struct _HostCmd_DS_MGMT_IE_LIST { + /** Action */ + t_u16 action; + /** Get/Set mgmt IE */ + mlan_ds_misc_custom_ie ds_mgmt_ie; +} MLAN_PACK_END HostCmd_DS_MGMT_IE_LIST_CFG; + +/** HostCmd_DS_TDLS_CONFIG */ +typedef MLAN_PACK_START struct _HostCmd_DS_TDLS_CONFIG { + /** Set TDLS configuration */ + mlan_ds_misc_tdls_config tdls_info; +} MLAN_PACK_END HostCmd_DS_TDLS_CONFIG; + +/**Action ID for TDLS delete link*/ +#define TDLS_DELETE 0x00 +/**Action ID for TDLS create link*/ +#define TDLS_CREATE 0x01 +/**Action ID for TDLS config link*/ +#define TDLS_CONFIG 0x02 +/** HostCmd_DS_TDLS_OPER */ +typedef MLAN_PACK_START struct _HostCmd_DS_TDLS_OPER { + /** Action */ + t_u16 tdls_action; + /**reason*/ + t_u16 reason; + /** peer mac */ + t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; +} MLAN_PACK_END HostCmd_DS_TDLS_OPER; + +/** HostCmd_CMD_MAC_REG_ACCESS */ +typedef MLAN_PACK_START struct _HostCmd_DS_MAC_REG_ACCESS { + /** Action */ + t_u16 action; + /** MAC register offset */ + t_u16 offset; + /** MAC register value */ + t_u32 value; +} MLAN_PACK_END HostCmd_DS_MAC_REG_ACCESS; + +/** HostCmd_CMD_BBP_REG_ACCESS */ +typedef MLAN_PACK_START struct _HostCmd_DS_BBP_REG_ACCESS { + /** Acion */ + t_u16 action; + /** BBP register offset */ + t_u16 offset; + /** BBP register value */ + t_u8 value; + /** Reserved field */ + t_u8 reserved[3]; +} MLAN_PACK_END HostCmd_DS_BBP_REG_ACCESS; + +/** HostCmd_CMD_RF_REG_ACCESS */ +typedef MLAN_PACK_START struct _HostCmd_DS_RF_REG_ACCESS { + /** Action */ + t_u16 action; + /** RF register offset */ + t_u16 offset; + /** RF register value */ + t_u8 value; + /** Reserved field */ + t_u8 reserved[3]; +} MLAN_PACK_END HostCmd_DS_RF_REG_ACCESS; + +/** HostCmd_DS_802_11_EEPROM_ACCESS */ +typedef MLAN_PACK_START struct _HostCmd_DS_802_11_EEPROM_ACCESS { + /** Action */ + t_u16 action; + + /** multiple 4 */ + t_u16 offset; + /** Number of bytes */ + t_u16 byte_count; + /** Value */ + t_u8 value; +} MLAN_PACK_END HostCmd_DS_802_11_EEPROM_ACCESS; + +/** HostCmd_DS_MEM_ACCESS */ +typedef MLAN_PACK_START struct _HostCmd_DS_MEM_ACCESS { + /** Action */ + t_u16 action; + /** Reserved field */ + t_u16 reserved; + /** Address */ + t_u32 addr; + /** Value */ + t_u32 value; +} MLAN_PACK_END HostCmd_DS_MEM_ACCESS; + +/** HostCmd_DS_TARGET_ACCESS */ +typedef MLAN_PACK_START struct _HostCmd_DS_TARGET_ACCESS { + /** Action */ + t_u16 action; + /** CSU Target Device. 1: CSU, 2: PSU */ + t_u16 csu_target; + /** Target Device Address */ + t_u16 address; + /** Data */ + t_u8 data; +} MLAN_PACK_END HostCmd_DS_TARGET_ACCESS; + +/** HostCmd_DS_SUBSCRIBE_EVENT */ +typedef MLAN_PACK_START struct _HostCmd_DS_SUBSCRIBE_EVENT { + /** Action */ + t_u16 action; + /** Bitmap of subscribed events */ + t_u16 event_bitmap; +} MLAN_PACK_END HostCmd_DS_SUBSCRIBE_EVENT; + +/** HostCmd_DS_OTP_USER_DATA */ +typedef MLAN_PACK_START struct _HostCmd_DS_OTP_USER_DATA { + /** Action */ + t_u16 action; + /** Reserved field */ + t_u16 reserved; + /** User data length */ + t_u16 user_data_length; + /** User data */ + t_u8 user_data[1]; +} MLAN_PACK_END HostCmd_DS_OTP_USER_DATA; + +/** HostCmd_CMD_HS_WAKEUP_REASON */ +typedef MLAN_PACK_START struct _HostCmd_DS_HS_WAKEUP_REASON { + /** wakeupReason: + * 0: unknown + * 1: Broadcast data matched + * 2: Multicast data matched + * 3: Unicast data matched + * 4: Maskable event matched + * 5. Non-maskable event matched + * 6: Non-maskable condition matched (EAPoL rekey) + * 7: Magic pattern matched + * Others: reserved. (set to 0) */ + t_u16 wakeup_reason; +} MLAN_PACK_END HostCmd_DS_HS_WAKEUP_REASON; + +/** MrvlIEtypes_HsWakeHoldoff_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_HsWakeHoldoff_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Minimum delay between HsActive and HostWake (in msec) */ + t_u16 min_wake_holdoff; +} MLAN_PACK_END MrvlIEtypes_HsWakeHoldoff_t; + +/** HostCmd_DS_INACTIVITY_TIMEOUT_EXT */ +typedef MLAN_PACK_START struct _HostCmd_DS_INACTIVITY_TIMEOUT_EXT { + /** ACT_GET/ACT_SET */ + t_u16 action; + /** uS, 0 means 1000uS(1ms) */ + t_u16 timeout_unit; + /** Inactivity timeout for unicast data */ + t_u16 unicast_timeout; + /** Inactivity timeout for multicast data */ + t_u16 mcast_timeout; + /** Timeout for additional RX traffic after Null PM1 packet exchange */ + t_u16 ps_entry_timeout; + /** Reserved to further expansion */ + t_u16 reserved; +} MLAN_PACK_END HostCmd_DS_INACTIVITY_TIMEOUT_EXT; + +/** TLV type : STA Mac address */ +#define TLV_TYPE_STA_MAC_ADDRESS (PROPRIETARY_TLV_BASE_ID + 0x20) /* 0x0120 + */ + +/** MrvlIEtypes_MacAddr_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_MacAddr_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** mac address */ + t_u8 mac[MLAN_MAC_ADDR_LENGTH]; +} MLAN_PACK_END MrvlIEtypes_MacAddr_t; + +/** Assoc Request */ +#define SUBTYPE_ASSOC_REQUEST 0 +/** ReAssoc Request */ +#define SUBTYPE_REASSOC_REQUEST 2 +/** Probe Resp */ +#define SUBTYPE_PROBE_RESP 5 +/** Disassoc Request */ +#define SUBTYPE_DISASSOC 10 +/** Auth Request */ +#define SUBTYPE_AUTH 11 +/** Deauth Request */ +#define SUBTYPE_DEAUTH 12 +/** Action frame */ +#define SUBTYPE_ACTION 13 + +#ifdef UAP_SUPPORT +/** TLV type : AP Channel band Config */ +#define TLV_TYPE_UAP_CHAN_BAND_CONFIG\ + (PROPRIETARY_TLV_BASE_ID + 0x2a) /* 0x012a */ +/** TLV type : AP Mac address */ +#define TLV_TYPE_UAP_MAC_ADDRESS\ + (PROPRIETARY_TLV_BASE_ID + 0x2b) /* 0x012b */ +/** TLV type : AP Beacon period */ +#define TLV_TYPE_UAP_BEACON_PERIOD\ + (PROPRIETARY_TLV_BASE_ID + 0x2c) /* 0x012c */ +/** TLV type : AP DTIM period */ +#define TLV_TYPE_UAP_DTIM_PERIOD\ + (PROPRIETARY_TLV_BASE_ID + 0x2d) /* 0x012d */ +/** TLV type : AP Tx power */ +#define TLV_TYPE_UAP_TX_POWER\ + (PROPRIETARY_TLV_BASE_ID + 0x2f) /* 0x012f */ +/** TLV type : AP SSID broadcast control */ +#define TLV_TYPE_UAP_BCAST_SSID_CTL\ + (PROPRIETARY_TLV_BASE_ID + 0x30) /* 0x0130 */ +/** TLV type : AP Preamble control */ +#define TLV_TYPE_UAP_PREAMBLE_CTL\ + (PROPRIETARY_TLV_BASE_ID + 0x31) /* 0x0131 */ +/** TLV type : AP Antenna control */ +#define TLV_TYPE_UAP_ANTENNA_CTL\ + (PROPRIETARY_TLV_BASE_ID + 0x32) /* 0x0132 */ +/** TLV type : AP RTS threshold */ +#define TLV_TYPE_UAP_RTS_THRESHOLD\ + (PROPRIETARY_TLV_BASE_ID + 0x33) /* 0x0133 */ +/** TLV type : AP Tx data rate */ +#define TLV_TYPE_UAP_TX_DATA_RATE\ + (PROPRIETARY_TLV_BASE_ID + 0x35) /* 0x0135 */ +/** TLV type: AP Packet forwarding control */ +#define TLV_TYPE_UAP_PKT_FWD_CTL\ + (PROPRIETARY_TLV_BASE_ID + 0x36) /* 0x0136 */ +/** TLV type: STA information */ +#define TLV_TYPE_UAP_STA_INFO\ + (PROPRIETARY_TLV_BASE_ID + 0x37) /* 0x0137 */ +/** TLV type: AP STA MAC address filter */ +#define TLV_TYPE_UAP_STA_MAC_ADDR_FILTER\ + (PROPRIETARY_TLV_BASE_ID + 0x38) /* 0x0138 */ +/** TLV type: AP STA ageout timer */ +#define TLV_TYPE_UAP_STA_AGEOUT_TIMER\ + (PROPRIETARY_TLV_BASE_ID + 0x39) /* 0x0139 */ +/** TLV type: AP WEP keys */ +#define TLV_TYPE_UAP_WEP_KEY\ + (PROPRIETARY_TLV_BASE_ID + 0x3b) /* 0x013b */ +/** TLV type: AP WPA passphrase */ +#define TLV_TYPE_UAP_WPA_PASSPHRASE\ + (PROPRIETARY_TLV_BASE_ID + 0x3c) /* 0x013c */ +/** TLV type: AP protocol */ +#define TLV_TYPE_UAP_ENCRYPT_PROTOCOL\ + (PROPRIETARY_TLV_BASE_ID + 0x40) /* 0x0140 */ +/** TLV type: AP AKMP */ +#define TLV_TYPE_UAP_AKMP\ + (PROPRIETARY_TLV_BASE_ID + 0x41) /* 0x0141 */ +/** TLV type: AP Fragment threshold */ +#define TLV_TYPE_UAP_FRAG_THRESHOLD\ + (PROPRIETARY_TLV_BASE_ID + 0x46) /* 0x0146 */ +/** TLV type: AP Group rekey timer */ +#define TLV_TYPE_UAP_GRP_REKEY_TIME\ + (PROPRIETARY_TLV_BASE_ID + 0x47) /* 0x0147 */ +/**TLV type : AP Max Station number */ +#define TLV_TYPE_UAP_MAX_STA_CNT\ + (PROPRIETARY_TLV_BASE_ID + 0x55) /* 0x0155 */ +/**TLV type : AP Retry limit */ +#define TLV_TYPE_UAP_RETRY_LIMIT\ + (PROPRIETARY_TLV_BASE_ID + 0x5d) /* 0x015d */ +/** TLV type : AP MCBC data rate */ +#define TLV_TYPE_UAP_MCBC_DATA_RATE\ + (PROPRIETARY_TLV_BASE_ID + 0x62) /* 0x0162 */ +/**TLV type: AP RSN replay protection */ +#define TLV_TYPE_UAP_RSN_REPLAY_PROTECT\ + (PROPRIETARY_TLV_BASE_ID + 0x64) /* 0x0164 */ +/** TLV ID : Management Frame */ +#define TLV_TYPE_UAP_MGMT_FRAME\ + (PROPRIETARY_TLV_BASE_ID + 0x68) /* 0x0168 */ + +/**TLV type: AP mgmt IE passthru mask */ +#define TLV_TYPE_UAP_MGMT_IE_PASSTHRU_MASK\ + (PROPRIETARY_TLV_BASE_ID + 0x70) /* 0x0170 */ + +/**TLV type: AP pairwise handshake timeout */ +#define TLV_TYPE_UAP_EAPOL_PWK_HSK_TIMEOUT\ + (PROPRIETARY_TLV_BASE_ID + 0x75) /* 0x0175 */ +/**TLV type: AP pairwise handshake retries */ +#define TLV_TYPE_UAP_EAPOL_PWK_HSK_RETRIES\ + (PROPRIETARY_TLV_BASE_ID + 0x76) /* 0x0176 */ +/**TLV type: AP groupwise handshake timeout */ +#define TLV_TYPE_UAP_EAPOL_GWK_HSK_TIMEOUT\ + (PROPRIETARY_TLV_BASE_ID + 0x77) /* 0x0177 */ +/**TLV type: AP groupwise handshake retries */ +#define TLV_TYPE_UAP_EAPOL_GWK_HSK_RETRIES\ + (PROPRIETARY_TLV_BASE_ID + 0x78) /* 0x0178 */ +/** TLV type: AP PS STA ageout timer */ +#define TLV_TYPE_UAP_PS_STA_AGEOUT_TIMER\ + (PROPRIETARY_TLV_BASE_ID + 0x7b) /* 0x017b */ +/** TLV type : Pairwise Cipher */ +#define TLV_TYPE_PWK_CIPHER\ + (PROPRIETARY_TLV_BASE_ID + 0x91) /* 0x0191 */ +/** TLV type : Group Cipher */ +#define TLV_TYPE_GWK_CIPHER\ + (PROPRIETARY_TLV_BASE_ID + 0x92) /* 0x0192 */ +/** TLV type : BSS Status */ +#define TLV_TYPE_BSS_STATUS\ + (PROPRIETARY_TLV_BASE_ID + 0x93) /* 0x0193 */ +/** TLV type : AP WMM params */ +#define TLV_TYPE_AP_WMM_PARAM\ + (PROPRIETARY_TLV_BASE_ID + 0xd0) /* 0x01d0 */ + +/** MrvlIEtypes_beacon_period_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_beacon_period_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** beacon period */ + t_u16 beacon_period; +} MLAN_PACK_END MrvlIEtypes_beacon_period_t; + +/** MrvlIEtypes_dtim_period_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_dtim_period_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** DTIM period */ + t_u8 dtim_period; +} MLAN_PACK_END MrvlIEtypes_dtim_period_t; + +/** MrvlIEtypes_tx_rate_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_tx_rate_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** tx data rate */ + t_u16 tx_data_rate; +} MLAN_PACK_END MrvlIEtypes_tx_rate_t; + +/** MrvlIEtypes_mcbc_rate_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_mcbc_rate_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** mcbc data rate */ + t_u16 mcbc_data_rate; +} MLAN_PACK_END MrvlIEtypes_mcbc_rate_t; + +/** MrvlIEtypes_tx_power_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_tx_power_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** tx power */ + t_u8 tx_power; +} MLAN_PACK_END MrvlIEtypes_tx_power_t; + +/** MrvlIEtypes_bcast_ssid_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_bcast_ssid_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** bcast ssid control*/ + t_u8 bcast_ssid_ctl; +} MLAN_PACK_END MrvlIEtypes_bcast_ssid_t; + +/** MrvlIEtypes_antenna_mode_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_antenna_mode_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** which antenna */ + t_u8 which_antenna; + /** antenna mode*/ + t_u8 antenna_mode; +} MLAN_PACK_END MrvlIEtypes_antenna_mode_t; + +/** MrvlIEtypes_pkt_forward_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_pkt_forward_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** pkt foward control */ + t_u8 pkt_forward_ctl; +} MLAN_PACK_END MrvlIEtypes_pkt_forward_t; + +/** MrvlIEtypes_max_sta_count_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_max_sta_count_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** max station count */ + t_u16 max_sta_count; +} MLAN_PACK_END MrvlIEtypes_max_sta_count_t; + +/** MrvlIEtypes_sta_ageout_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_sta_ageout_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** station age out timer */ + t_u32 sta_ageout_timer; +} MLAN_PACK_END MrvlIEtypes_sta_ageout_t; + +/** MrvlIEtypes_rts_threshold_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_rts_threshold_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** rts threshold */ + t_u16 rts_threshold; +} MLAN_PACK_END MrvlIEtypes_rts_threshold_t; + +/** MrvlIEtypes_frag_threshold_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_frag_threshold_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** frag threshold */ + t_u16 frag_threshold; +} MLAN_PACK_END MrvlIEtypes_frag_threshold_t; + +/** MrvlIEtypes_retry_limit_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_retry_limit_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** retry limit */ + t_u8 retry_limit; +} MLAN_PACK_END MrvlIEtypes_retry_limit_t; + +/** MrvlIEtypes_eapol_pwk_hsk_timeout_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_eapol_pwk_hsk_timeout_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** pairwise update timeout in milliseconds */ + t_u32 pairwise_update_timeout; +} MLAN_PACK_END MrvlIEtypes_eapol_pwk_hsk_timeout_t; + +/** MrvlIEtypes_eapol_pwk_hsk_retries_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_eapol_pwk_hsk_retries_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** pairwise handshake retries */ + t_u32 pwk_retries; +} MLAN_PACK_END MrvlIEtypes_eapol_pwk_hsk_retries_t; + +/** MrvlIEtypes_eapol_gwk_hsk_timeout_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_eapol_gwk_hsk_timeout_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** groupwise update timeout in milliseconds */ + t_u32 groupwise_update_timeout; +} MLAN_PACK_END MrvlIEtypes_eapol_gwk_hsk_timeout_t; + +/** MrvlIEtypes_eapol_gwk_hsk_retries_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_eapol_gwk_hsk_retries_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** groupwise handshake retries */ + t_u32 gwk_retries; +} MLAN_PACK_END MrvlIEtypes_eapol_gwk_hsk_retries_t; + +/** MrvlIEtypes_mgmt_ie_passthru_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_mgmt_ie_passthru_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** mgmt IE mask value */ + t_u32 mgmt_ie_mask; +} MLAN_PACK_END MrvlIEtypes_mgmt_ie_passthru_t; + +/** MrvlIEtypes_mac_filter_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_mac_filter_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Filter mode */ + t_u8 filter_mode; + /** Number of STA MACs */ + t_u8 count; + /** STA MAC addresses buffer */ + t_u8 mac_address[1]; +} MLAN_PACK_END MrvlIEtypes_mac_filter_t; + +/** Band_Config_t */ +typedef MLAN_PACK_START struct _Band_Config_t { +#ifdef BIG_ENDIAN_SUPPORT + /** Channel Selection Mode - (00)=manual, (01)=ACS */ + t_u8 scanMode:2; + /** Secondary Channel Offset - (00)=None, (01)=Above, (11)=Below */ + t_u8 chan2Offset:2; + /** Channel Width - (00)=20MHz, (10)=40MHz, (11)=80MHz */ + t_u8 chanWidth:2; + /** Band Info - (00)=2.4GHz, (01)=5GHz */ + t_u8 chanBand:2; +#else + /** Band Info - (00)=2.4GHz, (01)=5GHz */ + t_u8 chanBand:2; + /** Channel Width - (00)=20MHz, (10)=40MHz, (11)=80MHz */ + t_u8 chanWidth:2; + /** Secondary Channel Offset - (00)=None, (01)=Above, (11)=Below */ + t_u8 chan2Offset:2; + /** Channel Selection Mode - (00)=manual, (01)=ACS */ + t_u8 scanMode:2; +#endif +} MLAN_PACK_END Band_Config_t; + +/** MrvlIEtypes_channel_band_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_channel_band_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Band Configuration */ + t_u8 band_config; + /** channel */ + t_u8 channel; +} MLAN_PACK_END MrvlIEtypes_channel_band_t; + +/** MrvlIEtypes_auth_type_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_auth_type_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Authentication type */ + t_u8 auth_type; +} MLAN_PACK_END MrvlIEtypes_auth_type_t; + +/** MrvlIEtypes_encrypt_protocol_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_encrypt_protocol_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** encryption protocol */ + t_u16 protocol; +} MLAN_PACK_END MrvlIEtypes_encrypt_protocol_t; + +/** MrvlIEtypes_pwk_cipher_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_pwk_cipher_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** protocol */ + t_u16 protocol; + /** pairwise cipher */ + t_u8 pairwise_cipher; + /** reserved */ + t_u8 reserved; +} MLAN_PACK_END MrvlIEtypes_pwk_cipher_t; + +/** MrvlIEtypes_gwk_cipher_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_gwk_cipher_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** group cipher */ + t_u8 group_cipher; + /** reserved */ + t_u8 reserved; +} MLAN_PACK_END MrvlIEtypes_gwk_cipher_t; + +/** MrvlIEtypes_akmp_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_akmp_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** key management */ + t_u16 key_mgmt; + /** key management operation */ + t_u16 key_mgmt_operation; +} MLAN_PACK_END MrvlIEtypes_akmp_t; + +/** MrvlIEtypes_passphrase_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_passphrase_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** passphrase */ + t_u8 passphrase[1]; +} MLAN_PACK_END MrvlIEtypes_passphrase_t; + +/** MrvlIEtypes_rsn_replay_prot_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_rsn_replay_prot_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** rsn replay proection */ + t_u8 rsn_replay_prot; +} MLAN_PACK_END MrvlIEtypes_rsn_replay_prot_t; + +/** MrvlIEtypes_group_rekey_time_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_group_rekey_time_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** group key rekey time */ + t_u32 gk_rekey_time; +} MLAN_PACK_END MrvlIEtypes_group_rekey_time_t; + +/** MrvlIEtypes_wep_key_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_wep_key_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** key index */ + t_u8 key_index; + /** is default */ + t_u8 is_default; + /** key data */ + t_u8 key[1]; +} MLAN_PACK_END MrvlIEtypes_wep_key_t; + +/** MrvlIEtypes_bss_status_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_bss_status_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** BSS status, READ only */ + t_u16 bss_status; +} MLAN_PACK_END MrvlIEtypes_bss_status_t; + +/** MrvlIEtypes_preamble_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_preamble_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** preamble type, READ only */ + t_u8 preamble_type; +} MLAN_PACK_END MrvlIEtypes_preamble_t; + +/** MrvlIEtypes_wmm_parameter_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_wmm_parameter_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** WMM parameter */ + WmmParameter_t wmm_para; +} MLAN_PACK_END MrvlIEtypes_wmm_parameter_t; + +/** SNMP_MIB_UAP_INDEX */ +typedef enum _SNMP_MIB_UAP_INDEX { + tkip_mic_failures = 0x0b, + ccmp_decrypt_errors = 0x0c, + wep_undecryptable_count = 0x0d, + wep_icv_error_count = 0x0e, + decrypt_failure_count = 0xf, + dot11_failed_count = 0x12, + dot11_retry_count = 0x13, + dot11_multi_retry_count = 0x14, + dot11_frame_dup_count = 0x15, + dot11_rts_success_count = 0x16, + dot11_rts_failure_count = 0x17, + dot11_ack_failure_count = 0x18, + dot11_rx_fragment_count = 0x19, + dot11_mcast_rx_frame_count = 0x1a, + dot11_fcs_error_count = 0x1b, + dot11_tx_frame_count = 0x1c, + dot11_rsna_tkip_cm_invoked = 0x1d, + dot11_rsna_4way_hshk_failures = 0x1e, + dot11_mcast_tx_count = 0x1f, +} SNMP_MIB_UAP_INDEX; + +/** MrvlIEtypes_snmp_oid_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_snmp_oid_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** data */ + t_u32 data; +} MLAN_PACK_END MrvlIEtypes_snmp_oid_t; + +/** HostCmd_SYS_CONFIG */ +typedef MLAN_PACK_START struct _HostCmd_DS_SYS_CONFIG { + /** CMD Action GET/SET*/ + t_u16 action; + /** Tlv buffer */ + t_u8 tlv_buffer[1]; +} MLAN_PACK_END HostCmd_DS_SYS_CONFIG; + +/** HostCmd_SYS_CONFIG */ +typedef MLAN_PACK_START struct _HostCmd_DS_SYS_INFO { + /** sys info */ + t_u8 sys_info[64]; +} MLAN_PACK_END HostCmd_DS_SYS_INFO; + +/** HostCmd_DS_STA_DEAUTH */ +typedef MLAN_PACK_START struct _HostCmd_DS_STA_DEAUTH { + /** mac address */ + t_u8 mac[MLAN_MAC_ADDR_LENGTH]; + /** reason code */ + t_u16 reason; +} MLAN_PACK_END HostCmd_DS_STA_DEAUTH; + +/** HostCmd_DS_REPORT_MIC */ +typedef MLAN_PACK_START struct _HostCmd_DS_REPORT_MIC { + /** mac address */ + t_u8 mac[MLAN_MAC_ADDR_LENGTH]; +} MLAN_PACK_END HostCmd_DS_REPORT_MIC; + +/** HostCmd_UAP_OPER_CTRL */ +typedef MLAN_PACK_START struct _HostCmd_DS_UAP_OPER_CTRL { + /** CMD Action GET/SET*/ + t_u16 action; + /** control*/ + t_u16 ctrl; + /**channel operation*/ + t_u16 chan_opt; + /**channel band tlv*/ + MrvlIEtypes_channel_band_t channel_band; +} MLAN_PACK_END HostCmd_DS_UAP_OPER_CTRL; + +/** Host Command id: POWER_MGMT */ +#define HOST_CMD_POWER_MGMT_EXT 0x00ef +/** TLV type: AP Sleep param */ +#define TLV_TYPE_AP_SLEEP_PARAM\ + (PROPRIETARY_TLV_BASE_ID + 0x6a) /* 0x016a */ +/** TLV type: AP Inactivity Sleep param */ +#define TLV_TYPE_AP_INACT_SLEEP_PARAM\ + (PROPRIETARY_TLV_BASE_ID + 0x6b) /* 0x016b */ + +/** MrvlIEtypes_sleep_param_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_sleep_param_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** control bitmap */ + t_u32 ctrl_bitmap; + /** min_sleep */ + t_u32 min_sleep; + /** max_sleep */ + t_u32 max_sleep; +} MLAN_PACK_END MrvlIEtypes_sleep_param_t; + +/** MrvlIEtypes_inact_sleep_param_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_inact_sleep_param_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** inactivity timeout */ + t_u32 inactivity_to; + + /** min_awake */ + t_u32 min_awake; + /** max_awake */ + t_u32 max_awake; +} MLAN_PACK_END MrvlIEtypes_inact_sleep_param_t; + +/** HostCmd_DS_POWER_MGMT */ +typedef MLAN_PACK_START struct _HostCmd_DS_POWER_MGMT_EXT { + /** CMD Action Get/Set*/ + t_u16 action; + /** power mode */ + t_u16 power_mode; +} MLAN_PACK_END HostCmd_DS_POWER_MGMT_EXT; + +/** MrvlIEtypes_ps_sta_ageout_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_ps_sta_ageout_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** station age out timer */ + t_u32 ps_sta_ageout_timer; +} MLAN_PACK_END MrvlIEtypes_ps_sta_ageout_t; + +/** MrvlIEtypes_sta_info_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_sta_info_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** STA MAC address */ + t_u8 mac_address[MLAN_MAC_ADDR_LENGTH]; + /** Power mfg status */ + t_u8 power_mfg_status; + /** RSSI */ + t_s8 rssi; +} MLAN_PACK_END MrvlIEtypes_sta_info_t; + +/** HostCmd_DS_STA_LIST */ +typedef MLAN_PACK_START struct _HostCmd_DS_STA_LIST { + /** Number of STAs */ + t_u16 sta_count; + /* MrvlIEtypes_sta_info_t sta_info[0]; */ +} MLAN_PACK_END HostCmd_DS_STA_LIST; + +/** TLV ID : WAPI Information */ +#define TLV_TYPE_AP_WAPI_INFO (PROPRIETARY_TLV_BASE_ID + 0x67) /* 0x0167 + */ + +/** MrvlIEtypes_sta_info_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_wapi_info_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Multicast PN */ + t_u8 multicast_PN[16]; +} MLAN_PACK_END MrvlIEtypes_wapi_info_t; +#endif /* UAP_SUPPORT */ + +/** TLV buffer : 2040 coex config */ +typedef MLAN_PACK_START struct _MrvlIEtypes_2040_coex_enable_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** Enable */ + t_u8 enable_2040coex; +} MLAN_PACK_END MrvlIEtypes_2040_coex_enable_t; + +/**BT coexit scan time setting*/ +typedef MLAN_PACK_START struct _MrvlIEtypes_BtCoexScanTime_t { + /** Header */ + MrvlIEtypesHeader_t header; + /**coex scan state 0: disable 1: enable*/ + t_u8 coex_scan; + /**reserved*/ + t_u8 reserved; + /**min scan time*/ + t_u16 min_scan_time; + /**max scan time*/ + t_u16 max_scan_time; +} MLAN_PACK_END MrvlIEtypes_BtCoexScanTime_t; + +/**BT coexit aggr win size */ +typedef MLAN_PACK_START struct _MrvlIETypes_BtCoexAggrWinSize_t { + /** Header */ + MrvlIEtypesHeader_t header; + /**winsize 0: restore default winsize, 1: use below winsize */ + t_u8 coex_win_size; + /**tx win size*/ + t_u8 tx_win_size; + /**rx win size*/ + t_u8 rx_win_size; + /**reserved*/ + t_u8 reserved; +} MLAN_PACK_END MrvlIETypes_BtCoexAggrWinSize_t; + +/** MrvlIEtypes_eapol_pkt_t */ +typedef MLAN_PACK_START struct _MrvlIEtypes_eapol_pkt_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** eapol pkt buf */ + t_u8 pkt_buf[0]; +} MLAN_PACK_END MrvlIEtypes_eapol_pkt_t; + +/** HostCmd_DS_EAPOL_PKT */ +typedef MLAN_PACK_START struct _HostCmd_DS_EAPOL_PKT { + /** Action */ + t_u16 action; + /** TLV buffer */ + MrvlIEtypes_eapol_pkt_t tlv_eapol; +} MLAN_PACK_END HostCmd_DS_EAPOL_PKT; + +#ifdef RX_PACKET_COALESCE +typedef MLAN_PACK_START struct _HostCmd_DS_RX_PKT_COAL_CFG { + /** Action */ + t_u16 action; + /** Packet threshold */ + t_u32 packet_threshold; + /** Timeout */ + t_u16 delay; +} MLAN_PACK_END HostCmd_DS_RX_PKT_COAL_CFG; +#endif + +typedef MLAN_PACK_START struct _HostCmd_DS_MULTI_CHAN_CFG { + /** Action */ + t_u16 action; + /** Channel time */ + t_u32 channel_time; + /** Buffer weight */ + t_u8 buffer_weight; + /** TLV buffer */ + t_u8 tlv_buf[0]; + /* t_u8 *tlv_buf; */ +} MLAN_PACK_END HostCmd_DS_MULTI_CHAN_CFG; + +typedef MLAN_PACK_START struct _HostCmd_DS_MULTI_CHAN_POLICY { + /** Action */ + t_u16 action; + /** Multi-channel Policy */ + t_u16 policy; +} MLAN_PACK_END HostCmd_DS_MULTI_CHAN_POLICY; + +/** Channel band info */ +typedef MLAN_PACK_START struct _ChannelBandInfo { + /* band config */ + t_u8 band_config; + /** channel num for specificed band */ + t_u8 chan_num; +} MLAN_PACK_END ChannelBandInfo; + +/** MrvlIETypes_mutli_chan_group_info_t */ +typedef MLAN_PACK_START struct _MrvlIETypes_mutli_chan_group_info_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** channel group id */ + t_u8 chan_group_id; + /** buffer weight for this channel group */ + t_u8 chan_buff_weight; + /** channel number and band information */ + ChannelBandInfo chan_band_info; + /** Max channel time (us) */ + t_u32 channel_time; + /** Reserved */ + t_u32 reserved; + MLAN_PACK_START union { + t_u8 sdio_func_num; + t_u8 usb_epnum; + } MLAN_PACK_END hid_num; + /** interface number in this group */ + t_u8 num_intf; + /** bss_type list */ + t_u8 bss_type_numlist[0]; +} MLAN_PACK_END MrvlIEtypes_multi_chan_group_info_t; + +/** MrvlIEtypes_multi_chan_info_t */ +typedef MLAN_PACK_START struct _MrvlIETypes_mutli_chan_info_t { + /** Header */ + MrvlIEtypesHeader_t header; + /** multi channel operation status */ + t_u16 status; + /** Tlv buffer */ + t_u8 tlv_buffer[0]; +} MLAN_PACK_END MrvlIEtypes_multi_chan_info_t; + +/** HostCmd_CONFIG_LOW_PWR_MODE */ +typedef MLAN_PACK_START struct _HostCmd_CONFIG_LOW_PWR_MODE { + /** Enable LPM */ + t_u8 enable; +} MLAN_PACK_END HostCmd_CONFIG_LOW_PWR_MODE; + +/** + * @brief 802.11h Local Power Constraint Marvell extended TLV + */ +typedef MLAN_PACK_START struct { + MrvlIEtypesHeader_t header; + /**< Marvell TLV header: ID/Len */ + t_u8 chan; /**< Channel local constraint applies to */ + + /** Power constraint included in beacons + * and used by fw to offset 11d info + */ + t_u8 constraint; + +} MLAN_PACK_END MrvlIEtypes_LocalPowerConstraint_t; + +/* + * + * Data structures for driver/firmware command processing + * + */ + +/** TPC Info structure sent in CMD_802_11_TPC_INFO command to firmware */ +typedef MLAN_PACK_START struct { + /**< Local constraint */ + MrvlIEtypes_LocalPowerConstraint_t local_constraint; + /**< Power Capability */ + MrvlIEtypes_PowerCapability_t power_cap; + +} MLAN_PACK_END HostCmd_DS_802_11_TPC_INFO; + +/** TPC Request structure sent in CMD_802_11_TPC_ADAPT_REQ + * command to firmware + */ +typedef MLAN_PACK_START struct { + t_u8 dest_mac[MLAN_MAC_ADDR_LENGTH]; /**< Destination STA address */ + t_u16 timeout; /**< Response timeout in ms */ + t_u8 rate_index; /**< IEEE Rate index to send request */ + +} MLAN_PACK_END HostCmd_TpcRequest; + +/** TPC Response structure received from the + * CMD_802_11_TPC_ADAPT_REQ command + */ +typedef MLAN_PACK_START struct { + t_u8 tpc_ret_code; + /**< Firmware command result status code */ + t_s8 tx_power; /**< Reported TX Power from the TPC Report element */ + t_s8 link_margin; + /**< Reported link margin from the TPC Report element */ + t_s8 rssi; /**< RSSI of the received TPC Report frame */ + +} MLAN_PACK_END HostCmd_TpcResponse; + +/** CMD_802_11_TPC_ADAPT_REQ substruct. + * Union of the TPC request and response + */ +typedef MLAN_PACK_START union { + HostCmd_TpcRequest req; + /**< Request struct sent to firmware */ + HostCmd_TpcResponse resp; + /**< Response struct received from firmware */ + +} MLAN_PACK_END HostCmd_DS_802_11_TPC_ADAPT_REQ; + +/** CMD_802_11_CHAN_SW_ANN firmware command substructure */ +typedef MLAN_PACK_START struct { + t_u8 switch_mode; + /**< Set to 1 for a quiet switch request, no STA tx */ + t_u8 new_chan; /**< Requested new channel */ + t_u8 switch_count; + /**< Number of TBTTs until the switch is to occur */ +} MLAN_PACK_END HostCmd_DS_802_11_CHAN_SW_ANN; + +/** + * @brief Enumeration of measurement types, including max supported + * enum for 11h/11k + */ +typedef MLAN_PACK_START enum _MeasType_t { + WLAN_MEAS_BASIC = 0, /**< 11h: Basic */ + WLAN_MEAS_NUM_TYPES, /**< Number of enumerated measurements */ + WLAN_MEAS_11H_MAX_TYPE = WLAN_MEAS_BASIC, /**< Max 11h measurement */ + +} MLAN_PACK_END MeasType_t; + +/** + * @brief Mode octet of the measurement request element (7.3.2.21) + */ +typedef MLAN_PACK_START struct { +#ifdef BIG_ENDIAN_SUPPORT + /**< Reserved */ + t_u8 rsvd5_7:3; + /**< 11k: duration spec. for meas. is mandatory */ + t_u8 duration_mandatory:1; + /**< 11h: en/disable report rcpt. of spec. type */ + t_u8 report:1; + /**< 11h: en/disable requests of specified type */ + t_u8 request:1; + /**< 11h: enable report/request bits */ + t_u8 enable:1; + /**< 11k: series or parallel with previous meas */ + t_u8 parallel:1; +#else + /**< 11k: series or parallel with previous meas */ + t_u8 parallel:1; + /**< 11h: enable report/request bits */ + t_u8 enable:1; + /**< 11h: en/disable requests of specified type */ + t_u8 request:1; + /**< 11h: en/disable report rcpt. of spec. type */ + t_u8 report:1; + /**< 11k: duration spec. for meas. is mandatory */ + t_u8 duration_mandatory:1; + /**< Reserved */ + t_u8 rsvd5_7:3; +#endif /* BIG_ENDIAN_SUPPORT */ + +} MLAN_PACK_END MeasReqMode_t; + +/** + * @brief Common measurement request structure (7.3.2.21.1 to 7.3.2.21.3) + */ +typedef MLAN_PACK_START struct { + t_u8 channel; /**< Channel to measure */ + t_u64 start_time; + /**< TSF Start time of measurement (0 for immediate) */ + t_u16 duration;/**< TU duration of the measurement */ + +} MLAN_PACK_END MeasReqCommonFormat_t; + +/** + * @brief Basic measurement request structure (7.3.2.21.1) + */ +typedef MeasReqCommonFormat_t MeasReqBasic_t; + +/** + * @brief CCA measurement request structure (7.3.2.21.2) + */ +typedef MeasReqCommonFormat_t MeasReqCCA_t; + +/** + * @brief RPI measurement request structure (7.3.2.21.3) + */ +typedef MeasReqCommonFormat_t MeasReqRPI_t; + +/** + * @brief Union of the availble measurement request types. Passed in the + * driver/firmware interface. + */ +typedef union { + MeasReqBasic_t basic; + /**< Basic measurement request */ + MeasReqCCA_t cca; /**< CCA measurement request */ + MeasReqRPI_t rpi; /**< RPI measurement request */ + +} MeasRequest_t; + +/** + * @brief Mode octet of the measurement report element (7.3.2.22) + */ +typedef MLAN_PACK_START struct { +#ifdef BIG_ENDIAN_SUPPORT + t_u8 rsvd3_7:5; /**< Reserved */ + t_u8 refused:1; /**< Measurement refused */ + t_u8 incapable:1; /**< Incapable of performing measurement */ + t_u8 late:1; /**< Start TSF time missed for measurement */ +#else + t_u8 late:1; /**< Start TSF time missed for measurement */ + t_u8 incapable:1; /**< Incapable of performing measurement */ + t_u8 refused:1; /**< Measurement refused */ + t_u8 rsvd3_7:5; /**< Reserved */ +#endif /* BIG_ENDIAN_SUPPORT */ + +} MLAN_PACK_END MeasRptMode_t; + +/** + * @brief Basic measurement report (7.3.2.22.1) + */ +typedef MLAN_PACK_START struct { + t_u8 channel; /**< Channel to measured */ + t_u64 start_time; /**< Start time (TSF) of measurement */ + t_u16 duration; /**< Duration of measurement in TUs */ + MeasRptBasicMap_t map; /**< Basic measurement report */ + +} MLAN_PACK_END MeasRptBasic_t; + +/** + * @brief CCA measurement report (7.3.2.22.2) + */ +typedef MLAN_PACK_START struct { + t_u8 channel; /**< Channel to measured */ + t_u64 start_time; /**< Start time (TSF) of measurement */ + t_u16 duration; /**< Duration of measurement in TUs */ + t_u8 busy_fraction; /**< Fractional duration CCA indicated chan busy */ + +} MLAN_PACK_END MeasRptCCA_t; + +/** + * @brief RPI measurement report (7.3.2.22.3) + */ +typedef MLAN_PACK_START struct { + t_u8 channel; /**< Channel to measured */ + t_u64 start_time; /**< Start time (TSF) of measurement */ + t_u16 duration; /**< Duration of measurement in TUs */ + t_u8 density[8]; /**< RPI Density histogram report */ + +} MLAN_PACK_END MeasRptRPI_t; + +/** + * @brief Union of the availble measurement report types. Passed in the + * driver/firmware interface. + */ +typedef union { + MeasRptBasic_t basic;/**< Basic measurement report */ + MeasRptCCA_t cca; /**< CCA measurement report */ + MeasRptRPI_t rpi; /**< RPI measurement report */ + +} MeasReport_t; + +/** + * @brief Structure passed to firmware to perform a measurement + */ +typedef MLAN_PACK_START struct { + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; /**< Reporting STA address */ + t_u8 dialog_token; /**< Measurement dialog toke */ + MeasReqMode_t req_mode; /**< Report mode */ + MeasType_t meas_type; /**< Measurement type */ + MeasRequest_t req; /**< Measurement request data */ + +} MLAN_PACK_END HostCmd_DS_MEASUREMENT_REQUEST; + +/** + * @brief Structure passed back from firmware with a measurement report, + * also can be to send a measurement report to another STA + */ +typedef MLAN_PACK_START struct { + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; /**< Reporting STA address */ + t_u8 dialog_token; /**< Measurement dialog token */ + MeasRptMode_t rpt_mode; /**< Report mode */ + MeasType_t meas_type; /**< Measurement type */ + MeasReport_t rpt; /**< Measurement report data */ + +} MLAN_PACK_END HostCmd_DS_MEASUREMENT_REPORT; + +typedef MLAN_PACK_START struct { + t_u16 startFreq; + t_u8 chanWidth; + t_u8 chanNum; + +} MLAN_PACK_END MrvlChannelDesc_t; + +typedef MLAN_PACK_START struct { + MrvlIEtypesHeader_t Header; /**< Header */ + + MeasRptBasicMap_t map; /**< IEEE 802.11h basic meas report */ +} MLAN_PACK_END MrvlIEtypes_ChanRpt11hBasic_t; + +typedef MLAN_PACK_START struct { + MrvlChannelDesc_t chan_desc; + /**< Channel band, number */ + t_u32 millisec_dwell_time; + /**< Channel dwell time in milliseconds */ +} MLAN_PACK_END HostCmd_DS_CHAN_RPT_REQ; + +typedef MLAN_PACK_START struct { + t_u32 cmd_result; /**< Rpt request command result (0 == SUCCESS) */ + t_u64 start_tsf; /**< TSF Measurement started */ + t_u32 duration; /**< Duration of measurement in microsecs */ + t_u8 tlv_buffer[1]; + /**< TLV Buffer */ +} MLAN_PACK_END HostCmd_DS_CHAN_RPT_RSP; + +/** statistics threshold */ +typedef MLAN_PACK_START struct { + /** Header */ + MrvlIEtypesHeader_t header; + /** value */ + t_u8 value; + /** reporting frequency */ + t_u8 frequency; +} MLAN_PACK_END MrvlIEtypes_BeaconHighRssiThreshold_t, + MrvlIEtypes_BeaconLowRssiThreshold_t, + MrvlIEtypes_BeaconHighSnrThreshold_t, + MrvlIEtypes_BeaconLowSnrThreshold_t, + MrvlIEtypes_FailureCount_t, + MrvlIEtypes_DataLowRssiThreshold_t, + MrvlIEtypes_DataHighRssiThreshold_t, + MrvlIEtypes_DataLowSnrThreshold_t, + MrvlIEtypes_DataHighSnrThreshold_t, + MrvlIETypes_PreBeaconMissed_t, MrvlIEtypes_BeaconsMissed_t; + +/** statistics threshold for LinkQuality */ +typedef MLAN_PACK_START struct { + /** Header */ + MrvlIEtypesHeader_t header; + /** Link SNR threshold (dB) */ + t_u16 link_snr; + /** Link SNR frequency */ + t_u16 link_snr_freq; + /* Second minimum rate value as per the rate table below */ + t_u16 link_rate; + /* Second minimum rate frequency */ + t_u16 link_rate_freq; + /* Tx latency value (us) */ + t_u16 link_tx_latency; + /* Tx latency frequency */ + t_u16 link_tx_lantency_freq; +} MLAN_PACK_END MrvlIEtypes_LinkQualityThreshold_t; + +/** HostCmd_DS_COMMAND */ +typedef struct MLAN_PACK_START _HostCmd_DS_COMMAND { + /** Command Header : Command */ + t_u16 command; + /** Command Header : Size */ + t_u16 size; + /** Command Header : Sequence number */ + t_u16 seq_num; + /** Command Header : Result */ + t_u16 result; + /** Command Body */ + union { + /** Hardware specifications */ + HostCmd_DS_GET_HW_SPEC hw_spec; + /** Cfg data */ + HostCmd_DS_802_11_CFG_DATA cfg_data; + /** MAC control */ + HostCmd_DS_MAC_CONTROL mac_ctrl; + /** MAC address */ + HostCmd_DS_802_11_MAC_ADDRESS mac_addr; + /** MAC muticast address */ + HostCmd_DS_MAC_MULTICAST_ADR mc_addr; + /** Get log */ + HostCmd_DS_802_11_GET_LOG get_log; + /** RSSI information */ + HostCmd_DS_802_11_RSSI_INFO rssi_info; + /** RSSI information response */ + HostCmd_DS_802_11_RSSI_INFO_RSP rssi_info_rsp; + /** SNMP MIB */ + HostCmd_DS_802_11_SNMP_MIB smib; + /** Radio control */ + HostCmd_DS_802_11_RADIO_CONTROL radio; + /** RF channel */ + HostCmd_DS_802_11_RF_CHANNEL rf_channel; + /** Tx rate query */ + HostCmd_TX_RATE_QUERY tx_rate; + /** Tx rate configuration */ + HostCmd_DS_TX_RATE_CFG tx_rate_cfg; + /** Tx power configuration */ + HostCmd_DS_TXPWR_CFG txp_cfg; + /** RF Tx power configuration */ + HostCmd_DS_802_11_RF_TX_POWER txp; + + /** RF antenna */ + HostCmd_DS_802_11_RF_ANTENNA antenna; + /** Enhanced power save command */ + HostCmd_DS_802_11_PS_MODE_ENH psmode_enh; + HostCmd_DS_802_11_HS_CFG_ENH opt_hs_cfg; + /** Scan */ + HostCmd_DS_802_11_SCAN scan; + /** Extended Scan */ + HostCmd_DS_802_11_SCAN_EXT ext_scan; + + /** Mgmt frame subtype mask */ + HostCmd_DS_RX_MGMT_IND rx_mgmt_ind; + /** Scan response */ + HostCmd_DS_802_11_SCAN_RSP scan_resp; + + HostCmd_DS_802_11_BG_SCAN_CONFIG bg_scan_config; + HostCmd_DS_802_11_BG_SCAN_QUERY bg_scan_query; + HostCmd_DS_802_11_BG_SCAN_QUERY_RSP bg_scan_query_resp; + HostCmd_DS_SUBSCRIBE_EVENT subscribe_event; + HostCmd_DS_OTP_USER_DATA otp_user_data; + /** Associate */ + HostCmd_DS_802_11_ASSOCIATE associate; + + /** Associate response */ + HostCmd_DS_802_11_ASSOCIATE_RSP associate_rsp; + /** Deauthenticate */ + HostCmd_DS_802_11_DEAUTHENTICATE deauth; + /** Ad-Hoc start */ + HostCmd_DS_802_11_AD_HOC_START adhoc_start; + /** Ad-Hoc start result */ + HostCmd_DS_802_11_AD_HOC_START_RESULT adhoc_start_result; + /** Ad-Hoc join result */ + HostCmd_DS_802_11_AD_HOC_JOIN_RESULT adhoc_join_result; + /** Ad-Hoc join */ + HostCmd_DS_802_11_AD_HOC_JOIN adhoc_join; + /** Domain information */ + HostCmd_DS_802_11D_DOMAIN_INFO domain_info; + /** Domain information response */ + HostCmd_DS_802_11D_DOMAIN_INFO_RSP domain_info_resp; + HostCmd_DS_802_11_TPC_ADAPT_REQ tpc_req; + HostCmd_DS_802_11_TPC_INFO tpc_info; + HostCmd_DS_802_11_CHAN_SW_ANN chan_sw_ann; + HostCmd_DS_CHAN_RPT_REQ chan_rpt_req; + HostCmd_DS_MEASUREMENT_REQUEST meas_req; + HostCmd_DS_MEASUREMENT_REPORT meas_rpt; + /** Add BA request */ + HostCmd_DS_11N_ADDBA_REQ add_ba_req; + /** Add BA response */ + HostCmd_DS_11N_ADDBA_RSP add_ba_rsp; + /** Delete BA entry */ + HostCmd_DS_11N_DELBA del_ba; + /** Tx buffer configuration */ + HostCmd_DS_TXBUF_CFG tx_buf; + /** AMSDU Aggr Ctrl configuration */ + HostCmd_DS_AMSDU_AGGR_CTRL amsdu_aggr_ctrl; + /** 11n configuration */ + HostCmd_DS_11N_CFG htcfg; + /** reject addba req conditions configuration */ + HostCmd_DS_REJECT_ADDBA_REQ rejectaddbareq; + /* RANDYTODO need add more */ + /** HostCmd_DS_11AC_CFG */ + HostCmd_DS_11AC_CFG vhtcfg; + /** HostCmd_DS_11ACTXBUF_CFG*/ + HostCmd_DS_11ACTXBUF_CFG ac_tx_buf; + /** 11n configuration */ + HostCmd_DS_TX_BF_CFG tx_bf_cfg; + /** WMM status get */ + HostCmd_DS_WMM_GET_STATUS get_wmm_status; + /** WMM ADDTS */ + HostCmd_DS_WMM_ADDTS_REQ add_ts; + /** WMM DELTS */ + HostCmd_DS_WMM_DELTS_REQ del_ts; + /** WMM set/get queue config */ + HostCmd_DS_WMM_QUEUE_CONFIG queue_config; + /** WMM on/of/get queue statistics */ + HostCmd_DS_WMM_QUEUE_STATS queue_stats; + /** WMM get traffic stream status */ + HostCmd_DS_WMM_TS_STATUS ts_status; + /** Key material */ + HostCmd_DS_802_11_KEY_MATERIAL key_material; + /** E-Supplicant PSK */ + HostCmd_DS_802_11_SUPPLICANT_PMK esupplicant_psk; + /** E-Supplicant profile */ + HostCmd_DS_802_11_SUPPLICANT_PROFILE esupplicant_profile; + /** Extended version */ + HostCmd_DS_VERSION_EXT verext; + /** Adhoc Coalescing */ + HostCmd_DS_802_11_IBSS_STATUS ibss_coalescing; + /** Mgmt IE list configuration */ + HostCmd_DS_MGMT_IE_LIST_CFG mgmt_ie_list; + /** TDLS configuration command */ + HostCmd_DS_TDLS_CONFIG tdls_config_data; + /** TDLS operation command */ + HostCmd_DS_TDLS_OPER tdls_oper_data; + /** System clock configuration */ + HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG sys_clock_cfg; + /** MAC register access */ + HostCmd_DS_MAC_REG_ACCESS mac_reg; + /** BBP register access */ + HostCmd_DS_BBP_REG_ACCESS bbp_reg; + /** RF register access */ + HostCmd_DS_RF_REG_ACCESS rf_reg; + /** EEPROM register access */ + HostCmd_DS_802_11_EEPROM_ACCESS eeprom; + /** Memory access */ + HostCmd_DS_MEM_ACCESS mem; + /** Target device access */ + HostCmd_DS_TARGET_ACCESS target; + + /** Inactivity timeout extend */ + HostCmd_DS_INACTIVITY_TIMEOUT_EXT inactivity_to; +#ifdef UAP_SUPPORT + HostCmd_DS_SYS_CONFIG sys_config; + HostCmd_DS_SYS_INFO sys_info; + HostCmd_DS_STA_DEAUTH sta_deauth; + HostCmd_DS_STA_LIST sta_list; + HostCmd_DS_POWER_MGMT_EXT pm_cfg; + HostCmd_DS_REPORT_MIC report_mic; + HostCmd_DS_UAP_OPER_CTRL uap_oper_ctrl; +#endif /* UAP_SUPPORT */ + + /** Sleep period command */ + HostCmd_DS_802_11_SLEEP_PERIOD sleep_pd; + /** Sleep params command */ + HostCmd_DS_802_11_SLEEP_PARAMS sleep_param; + + /** SDIO GPIO interrupt config command */ + HostCmd_DS_SDIO_GPIO_INT_CONFIG sdio_gpio_int; + HostCmd_DS_SDIO_PULL_CTRL sdio_pull_ctl; + HostCmd_DS_SET_BSS_MODE bss_mode; + HostCmd_DS_CMD_TX_DATA_PAUSE tx_data_pause; +#ifdef WIFI_DIRECT_SUPPORT + HostCmd_DS_REMAIN_ON_CHANNEL remain_on_chan; + HostCmd_DS_WIFI_DIRECT_MODE wifi_direct_mode; + HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG p2p_params_config; +#endif + HostCmd_DS_COALESCE_CONFIG coalesce_config; + HostCmd_DS_HS_WAKEUP_REASON hs_wakeup_reason; + HostCmd_DS_MULTI_CHAN_CFG multi_chan_cfg; + HostCmd_DS_MULTI_CHAN_POLICY multi_chan_policy; + HostCmd_CONFIG_LOW_PWR_MODE low_pwr_mode_cfg; +#ifdef RX_PACKET_COALESCE + HostCmd_DS_RX_PKT_COAL_CFG rx_pkt_coal_cfg; +#endif + HostCmd_DS_EAPOL_PKT eapol_pkt; + } params; +} MLAN_PACK_END HostCmd_DS_COMMAND; + +/** PS_CMD_ConfirmSleep */ +typedef MLAN_PACK_START struct _OPT_Confirm_Sleep { + /** Command */ + t_u16 command; + /** Size */ + t_u16 size; + /** Sequence number */ + t_u16 seq_num; + /** Result */ + t_u16 result; + /** Action */ + t_u16 action; + /** Sleep comfirm param definition */ + sleep_confirm_param sleep_cfm; +} MLAN_PACK_END OPT_Confirm_Sleep; + +typedef struct MLAN_PACK_START _opt_sleep_confirm_buffer { + /** Header for interface */ + t_u8 hdr[4]; + /** New power save command used to send + * sleep confirmation to the firmware */ + OPT_Confirm_Sleep ps_cfm_sleep; +} MLAN_PACK_END opt_sleep_confirm_buffer; + +#ifdef PRAGMA_PACK +#pragma pack(pop) +#endif + +#endif /* !_MLAN_FW_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_ieee.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_ieee.h new file mode 100644 index 00000000..24a40835 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_ieee.h @@ -0,0 +1,1878 @@ +/** @file mlan_ieee.h + * + * @brief This file contains IEEE information element related + * definitions used in MLAN and MOAL module. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 11/03/2008: initial version +******************************************************/ + +#ifndef _MLAN_IEEE_H_ +#define _MLAN_IEEE_H_ + +/** FIX IES size in beacon buffer */ +#define WLAN_802_11_FIXED_IE_SIZE 12 +/** WLAN supported rates */ +#define WLAN_SUPPORTED_RATES 14 + +/** WLAN supported rates extension */ +#define WLAN_SUPPORTED_RATES_EXT 60 + +/** Enumeration definition*/ +/** WLAN_802_11_NETWORK_TYPE */ +typedef enum _WLAN_802_11_NETWORK_TYPE { + Wlan802_11FH, + Wlan802_11DS, + /* Defined as upper bound */ + Wlan802_11NetworkTypeMax +} WLAN_802_11_NETWORK_TYPE; + +#ifdef BIG_ENDIAN_SUPPORT +/** Frame control: Type Mgmt frame */ +#define IEEE80211_FC_MGMT_FRAME_TYPE_MASK 0x3000 +/** Frame control: SubType Mgmt frame */ +#define IEEE80211_GET_FC_MGMT_FRAME_SUBTYPE(fc) (((fc) & 0xF000) >> 12) +#else +/** Frame control: Type Mgmt frame */ +#define IEEE80211_FC_MGMT_FRAME_TYPE_MASK 0x000C +/** Frame control: SubType Mgmt frame */ +#define IEEE80211_GET_FC_MGMT_FRAME_SUBTYPE(fc) (((fc) & 0x00F0) >> 4) +#endif + +#ifdef PRAGMA_PACK +#pragma pack(push, 1) +#endif + +/* Reason codes */ +#define IEEE_80211_REASONCODE_UNSPECIFIED 1 + +/** IEEE Type definitions */ +typedef MLAN_PACK_START enum _IEEEtypes_ElementId_e { + SSID = 0, + SUPPORTED_RATES = 1, + + FH_PARAM_SET = 2, + DS_PARAM_SET = 3, + CF_PARAM_SET = 4, + + IBSS_PARAM_SET = 6, + +#ifdef STA_SUPPORT + COUNTRY_INFO = 7, +#endif /* STA_SUPPORT */ + + POWER_CONSTRAINT = 32, + POWER_CAPABILITY = 33, + TPC_REQUEST = 34, + TPC_REPORT = 35, + CHANNEL_SWITCH_ANN = 37, + QUIET = 40, + IBSS_DFS = 41, + SUPPORTED_CHANNELS = 36, + REGULATORY_CLASS = 59, + HT_CAPABILITY = 45, + QOS_INFO = 46, + HT_OPERATION = 61, + BSSCO_2040 = 72, + OVERLAPBSSSCANPARAM = 74, + EXT_CAPABILITY = 127, + LINK_ID = 101, + /* IEEE802.11r */ + MOBILITY_DOMAIN = 54, + FAST_BSS_TRANSITION = 55, + TIMEOUT_INTERVAL = 56, + RIC = 57, + VHT_CAPABILITY = 191, + VHT_OPERATION = 192, + EXT_BSS_LOAD = 193, + BW_CHANNEL_SWITCH = 194, + VHT_TX_POWER_ENV = 195, + EXT_POWER_CONSTR = 196, + AID_INFO = 197, + QUIET_CHAN = 198, + OPER_MODE_NTF = 199, + + ERP_INFO = 42, + + EXTENDED_SUPPORTED_RATES = 50, + + VENDOR_SPECIFIC_221 = 221, + WMM_IE = VENDOR_SPECIFIC_221, + + WPS_IE = VENDOR_SPECIFIC_221, + + WPA_IE = VENDOR_SPECIFIC_221, + RSN_IE = 48, + VS_IE = VENDOR_SPECIFIC_221, + WAPI_IE = 68, +} MLAN_PACK_END IEEEtypes_ElementId_e; + +/** IEEE IE header */ +typedef MLAN_PACK_START struct _IEEEtypes_Header_t { + /** Element ID */ + t_u8 element_id; + /** Length */ + t_u8 len; +} MLAN_PACK_END IEEEtypes_Header_t, *pIEEEtypes_Header_t; + +/** Vendor specific IE header */ +typedef MLAN_PACK_START struct _IEEEtypes_VendorHeader_t { + /** Element ID */ + t_u8 element_id; + /** Length */ + t_u8 len; + /** OUI */ + t_u8 oui[3]; + /** OUI type */ + t_u8 oui_type; + /** OUI subtype */ + t_u8 oui_subtype; + /** Version */ + t_u8 version; +} MLAN_PACK_END IEEEtypes_VendorHeader_t, *pIEEEtypes_VendorHeader_t; + +/** Vendor specific IE */ +typedef MLAN_PACK_START struct _IEEEtypes_VendorSpecific_t { + /** Vendor specific IE header */ + IEEEtypes_VendorHeader_t vend_hdr; + /** IE Max - size of previous fields */ + t_u8 data[IEEE_MAX_IE_SIZE - sizeof(IEEEtypes_VendorHeader_t)]; +} MLAN_PACK_END IEEEtypes_VendorSpecific_t, *pIEEEtypes_VendorSpecific_t; + +/** IEEE IE */ +typedef MLAN_PACK_START struct _IEEEtypes_Generic_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** IE Max - size of previous fields */ + t_u8 data[IEEE_MAX_IE_SIZE - sizeof(IEEEtypes_Header_t)]; +} MLAN_PACK_END IEEEtypes_Generic_t, *pIEEEtypes_Generic_t; + +/**ft capability policy*/ +typedef MLAN_PACK_START struct _IEEEtypes_FtCapPolicy_t { +#ifdef BIG_ENDIAN_SUPPORT + /** Reserved */ + t_u8 reserved:6; + /** RIC support */ + t_u8 ric:1; + /** FT over the DS capable */ + t_u8 ft_over_ds:1; +#else + /** FT over the DS capable */ + t_u8 ft_over_ds:1; + /** RIC support */ + t_u8 ric:1; + /** Reserved */ + t_u8 reserved:6; +#endif +} MLAN_PACK_END IEEEtypes_FtCapPolicy_t; + +/** Mobility domain IE */ +typedef MLAN_PACK_START struct _IEEEtypes_MobilityDomain_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** Mobility Domain ID */ + t_u16 mdid; + /** FT Capability policy */ + t_u8 ft_cap; +} MLAN_PACK_END IEEEtypes_MobilityDomain_t; + +/**FT MIC Control*/ +typedef MLAN_PACK_START struct _IEEEtypes_FT_MICControl_t { + /** reserved */ + t_u8 reserved; + /** element count */ + t_u8 element_count; +} MLAN_PACK_END IEEEtypes_FT_MICControl_t; + +/** FTIE MIC LEN */ +#define FTIE_MIC_LEN 16 + +/**FT IE*/ +typedef MLAN_PACK_START struct _IEEEtypes_FastBssTransElement_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** mic control */ + IEEEtypes_FT_MICControl_t mic_control; + /** mic */ + t_u8 mic[FTIE_MIC_LEN]; + /** ANonce */ + t_u8 a_nonce[32]; + /** SNonce */ + t_u8 s_nonce[32]; + /** sub element */ + t_u8 sub_element[1]; +} MLAN_PACK_END IEEEtypes_FastBssTransElement_t; + +/** auth frame body*/ +typedef MLAN_PACK_START struct { + /** auth alg */ + t_u16 auth_alg; + /** auth transaction */ + t_u16 auth_transaction; + /** status code */ + t_u16 status_code; + /** variable */ + t_u8 variable[0]; +} MLAN_PACK_END IEEEtypes_Auth_framebody; + +/*Category for FT*/ +#define FT_CATEGORY 6 +/** FT ACTION request */ +#define FT_ACTION_REQUEST 1 +/** FT ACTION response */ +#define FT_ACTION_RESPONSE 2 + +/*FT response and FT ack*/ +typedef MLAN_PACK_START struct { + /** category */ + t_u8 category; + /** action */ + t_u8 action; + /** sta address */ + t_u8 sta_addr[MLAN_MAC_ADDR_LENGTH]; + /** target ap address */ + t_u8 target_ap_addr[MLAN_MAC_ADDR_LENGTH]; + /** status code */ + t_u16 status_code; + /** varible */ + t_u8 variable[0]; +} MLAN_PACK_END IEEEtypes_Ft_action_response; + +/**FT request */ +typedef MLAN_PACK_START struct { + /** category */ + t_u8 category; + /** action */ + t_u8 action; + /** sta address */ + t_u8 sta_addr[MLAN_MAC_ADDR_LENGTH]; + /** target ap address */ + t_u8 target_ap_addr[MLAN_MAC_ADDR_LENGTH]; + /** varible */ + t_u8 variable[0]; +} MLAN_PACK_END IEEEtypes_Ft_action_request; + +/*Mgmt frame*/ +typedef MLAN_PACK_START struct { + /** frame control */ + t_u16 frame_control; + /** duration */ + t_u16 duration; + /** dest address */ + t_u8 da[MLAN_MAC_ADDR_LENGTH]; + /** source address */ + t_u8 sa[MLAN_MAC_ADDR_LENGTH]; + /** bssid */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; + /** seq control */ + t_u16 seq_ctrl; + /** address 4 */ + t_u8 addr4[MLAN_MAC_ADDR_LENGTH]; + union { + IEEEtypes_Auth_framebody auth; + IEEEtypes_Ft_action_response ft_resp; + IEEEtypes_Ft_action_request ft_req; + } u; +} MLAN_PACK_END IEEE80211_MGMT; + +/** TLV header */ +typedef MLAN_PACK_START struct _TLV_Generic_t { + /** Type */ + t_u16 type; + /** Length */ + t_u16 len; +} MLAN_PACK_END TLV_Generic_t, *pTLV_Generic_t; + +/** Capability information mask */ +#define CAPINFO_MASK \ +(~(MBIT(15) | MBIT(14) | MBIT(12) | MBIT(11) | MBIT(9))) + +/** Capability Bit Map*/ +#ifdef BIG_ENDIAN_SUPPORT +typedef MLAN_PACK_START struct _IEEEtypes_CapInfo_t { + t_u8 rsrvd1:2; + t_u8 dsss_ofdm:1; + t_u8 rsvrd2:2; + t_u8 short_slot_time:1; + t_u8 rsrvd3:1; + t_u8 spectrum_mgmt:1; + t_u8 chan_agility:1; + t_u8 pbcc:1; + t_u8 short_preamble:1; + t_u8 privacy:1; + t_u8 cf_poll_rqst:1; + t_u8 cf_pollable:1; + t_u8 ibss:1; + t_u8 ess:1; +} MLAN_PACK_END IEEEtypes_CapInfo_t, *pIEEEtypes_CapInfo_t; +#else +typedef MLAN_PACK_START struct _IEEEtypes_CapInfo_t { + /** Capability Bit Map : ESS */ + t_u8 ess:1; + /** Capability Bit Map : IBSS */ + t_u8 ibss:1; + /** Capability Bit Map : CF pollable */ + t_u8 cf_pollable:1; + /** Capability Bit Map : CF poll request */ + t_u8 cf_poll_rqst:1; + /** Capability Bit Map : privacy */ + t_u8 privacy:1; + /** Capability Bit Map : Short preamble */ + t_u8 short_preamble:1; + /** Capability Bit Map : PBCC */ + t_u8 pbcc:1; + /** Capability Bit Map : Channel agility */ + t_u8 chan_agility:1; + /** Capability Bit Map : Spectrum management */ + t_u8 spectrum_mgmt:1; + /** Capability Bit Map : Reserved */ + t_u8 rsrvd3:1; + /** Capability Bit Map : Short slot time */ + t_u8 short_slot_time:1; + /** Capability Bit Map : APSD */ + t_u8 Apsd:1; + /** Capability Bit Map : Reserved */ + t_u8 rsvrd2:1; + /** Capability Bit Map : DSS OFDM */ + t_u8 dsss_ofdm:1; + /** Capability Bit Map : Reserved */ + t_u8 rsrvd1:2; +} MLAN_PACK_END IEEEtypes_CapInfo_t, *pIEEEtypes_CapInfo_t; +#endif /* BIG_ENDIAN_SUPPORT */ + +/** IEEEtypes_CfParamSet_t */ +typedef MLAN_PACK_START struct _IEEEtypes_CfParamSet_t { + /** CF peremeter : Element ID */ + t_u8 element_id; + /** CF peremeter : Length */ + t_u8 len; + /** CF peremeter : Count */ + t_u8 cfp_cnt; + /** CF peremeter : Period */ + t_u8 cfp_period; + /** CF peremeter : Maximum duration */ + t_u16 cfp_max_duration; + /** CF peremeter : Remaining duration */ + t_u16 cfp_duration_remaining; +} MLAN_PACK_END IEEEtypes_CfParamSet_t, *pIEEEtypes_CfParamSet_t; + +/** IEEEtypes_IbssParamSet_t */ +typedef MLAN_PACK_START struct _IEEEtypes_IbssParamSet_t { + /** Element ID */ + t_u8 element_id; + /** Length */ + t_u8 len; + /** ATIM window value in milliseconds */ + t_u16 atim_window; +} MLAN_PACK_END IEEEtypes_IbssParamSet_t, *pIEEEtypes_IbssParamSet_t; + +/** IEEEtypes_SsParamSet_t */ +typedef MLAN_PACK_START union _IEEEtypes_SsParamSet_t { + /** SS parameter : CF parameter set */ + IEEEtypes_CfParamSet_t cf_param_set; + /** SS parameter : IBSS parameter set */ + IEEEtypes_IbssParamSet_t ibss_param_set; +} MLAN_PACK_END IEEEtypes_SsParamSet_t, *pIEEEtypes_SsParamSet_t; + +/** IEEEtypes_FhParamSet_t */ +typedef MLAN_PACK_START struct _IEEEtypes_FhParamSet_t { + /** FH parameter : Element ID */ + t_u8 element_id; + /** FH parameter : Length */ + t_u8 len; + /** FH parameter : Dwell time in milliseconds */ + t_u16 dwell_time; + /** FH parameter : Hop set */ + t_u8 hop_set; + /** FH parameter : Hop pattern */ + t_u8 hop_pattern; + /** FH parameter : Hop index */ + t_u8 hop_index; +} MLAN_PACK_END IEEEtypes_FhParamSet_t, *pIEEEtypes_FhParamSet_t; + +/** IEEEtypes_DsParamSet_t */ +typedef MLAN_PACK_START struct _IEEEtypes_DsParamSet_t { + /** DS parameter : Element ID */ + t_u8 element_id; + /** DS parameter : Length */ + t_u8 len; + /** DS parameter : Current channel */ + t_u8 current_chan; +} MLAN_PACK_END IEEEtypes_DsParamSet_t, *pIEEEtypes_DsParamSet_t; + +/** IEEEtypes_PhyParamSet_t */ +typedef MLAN_PACK_START union _IEEEtypes_PhyParamSet_t { + /** FH parameter set */ + IEEEtypes_FhParamSet_t fh_param_set; + /** DS parameter set */ + IEEEtypes_DsParamSet_t ds_param_set; +} MLAN_PACK_END IEEEtypes_PhyParamSet_t, *pIEEEtypes_PhyParamSet_t; + +/** IEEEtypes_ERPInfo_t */ +typedef MLAN_PACK_START struct _IEEEtypes_ERPInfo_t { + /** Element ID */ + t_u8 element_id; + /** Length */ + t_u8 len; + /** ERP flags */ + t_u8 erp_flags; +} MLAN_PACK_END IEEEtypes_ERPInfo_t, *pIEEEtypes_ERPInfo_t; + +/** IEEEtypes_AId_t */ +typedef t_u16 IEEEtypes_AId_t; + +/** IEEEtypes_StatusCode_t */ +typedef t_u16 IEEEtypes_StatusCode_t; + +/** Fixed size in assoc_resp */ +#define ASSOC_RESP_FIXED_SIZE 6 +/** IEEEtypes_AssocRsp_t */ +typedef MLAN_PACK_START struct _IEEEtypes_AssocRsp_t { + /** Capability information */ + IEEEtypes_CapInfo_t capability; + /** Association response status code */ + IEEEtypes_StatusCode_t status_code; + /** Association ID */ + IEEEtypes_AId_t a_id; + /** IE data buffer */ + t_u8 ie_buffer[1]; +} MLAN_PACK_END IEEEtypes_AssocRsp_t, *pIEEEtypes_AssocRsp_t; + +/** 802.11 supported rates */ +typedef t_u8 WLAN_802_11_RATES[WLAN_SUPPORTED_RATES]; + +/** cipher TKIP */ +#define WPA_CIPHER_TKIP 2 +/** cipher AES */ +#define WPA_CIPHER_AES_CCM 4 +/** AKM: 8021x */ +#define RSN_AKM_8021X 1 +/** AKM: PSK */ +#define RSN_AKM_PSK 2 +/** AKM: PSK SHA256 */ +#define RSN_AKM_PSK_SHA256 6 +#if defined(STA_SUPPORT) +/** Pairwise Cipher Suite length */ +#define PAIRWISE_CIPHER_SUITE_LEN 4 +/** AKM Suite length */ +#define AKM_SUITE_LEN 4 +/** MFPC bit in RSN capability */ +#define MFPC_BIT 7 +/** MFPR bit in RSN capability */ +#define MFPR_BIT 6 +/** PMF ORing mask */ +#define PMF_MASK 0x00c0 +#endif + +/** wpa_suite_t */ +typedef MLAN_PACK_START struct _wpa_suite_t { + /** OUI */ + t_u8 oui[3]; + /** tyep */ + t_u8 type; +} MLAN_PACK_END wpa_suite, wpa_suite_mcast_t; + +/** wpa_suite_ucast_t */ +typedef MLAN_PACK_START struct { + /* count */ + t_u16 count; + /** wpa_suite list */ + wpa_suite list[1]; +} MLAN_PACK_END wpa_suite_ucast_t, wpa_suite_auth_key_mgmt_t; + +/** IEEEtypes_Rsn_t */ +typedef MLAN_PACK_START struct _IEEEtypes_Rsn_t { + /** Rsn : Element ID */ + t_u8 element_id; + /** Rsn : Length */ + t_u8 len; + /** Rsn : version */ + t_u16 version; + /** Rsn : group cipher */ + wpa_suite_mcast_t group_cipher; + /** Rsn : pairwise cipher */ + wpa_suite_ucast_t pairwise_cipher; +} MLAN_PACK_END IEEEtypes_Rsn_t, *pIEEEtypes_Rsn_t; + +/** IEEEtypes_Wpa_t */ +typedef MLAN_PACK_START struct _IEEEtypes_Wpa_t { + /** Wpa : Element ID */ + t_u8 element_id; + /** Wpa : Length */ + t_u8 len; + /** Wpa : oui */ + t_u8 oui[4]; + /** version */ + t_u16 version; + /** Wpa : group cipher */ + wpa_suite_mcast_t group_cipher; + /** Wpa : pairwise cipher */ + wpa_suite_ucast_t pairwise_cipher; +} MLAN_PACK_END IEEEtypes_Wpa_t, *pIEEEtypes_Wpa_t; + +/** Maximum number of AC QOS queues available in the driver/firmware */ +#define MAX_AC_QUEUES 4 + +/** Data structure of WMM QoS information */ +typedef MLAN_PACK_START struct _IEEEtypes_WmmQosInfo_t { +#ifdef BIG_ENDIAN_SUPPORT + /** QoS UAPSD */ + t_u8 qos_uapsd:1; + /** Reserved */ + t_u8 reserved:3; + /** Parameter set count */ + t_u8 para_set_count:4; +#else + /** Parameter set count */ + t_u8 para_set_count:4; + /** Reserved */ + t_u8 reserved:3; + /** QoS UAPSD */ + t_u8 qos_uapsd:1; +#endif /* BIG_ENDIAN_SUPPORT */ +} MLAN_PACK_END IEEEtypes_WmmQosInfo_t, *pIEEEtypes_WmmQosInfo_t; + +/** Data structure of WMM Aci/Aifsn */ +typedef MLAN_PACK_START struct _IEEEtypes_WmmAciAifsn_t { +#ifdef BIG_ENDIAN_SUPPORT + /** Reserved */ + t_u8 reserved:1; + /** Aci */ + t_u8 aci:2; + /** Acm */ + t_u8 acm:1; + /** Aifsn */ + t_u8 aifsn:4; +#else + /** Aifsn */ + t_u8 aifsn:4; + /** Acm */ + t_u8 acm:1; + /** Aci */ + t_u8 aci:2; + /** Reserved */ + t_u8 reserved:1; +#endif /* BIG_ENDIAN_SUPPORT */ +} MLAN_PACK_END IEEEtypes_WmmAciAifsn_t, *pIEEEtypes_WmmAciAifsn_t; + +/** Data structure of WMM ECW */ +typedef MLAN_PACK_START struct _IEEEtypes_WmmEcw_t { +#ifdef BIG_ENDIAN_SUPPORT + /** Maximum Ecw */ + t_u8 ecw_max:4; + /** Minimum Ecw */ + t_u8 ecw_min:4; +#else + /** Minimum Ecw */ + t_u8 ecw_min:4; + /** Maximum Ecw */ + t_u8 ecw_max:4; +#endif /* BIG_ENDIAN_SUPPORT */ +} MLAN_PACK_END IEEEtypes_WmmEcw_t, *pIEEEtypes_WmmEcw_t; + +/** Data structure of WMM AC parameters */ +typedef MLAN_PACK_START struct _IEEEtypes_WmmAcParameters_t { + IEEEtypes_WmmAciAifsn_t aci_aifsn; /**< AciAifSn */ + IEEEtypes_WmmEcw_t ecw; /**< Ecw */ + t_u16 tx_op_limit; /**< Tx op limit */ +} MLAN_PACK_END IEEEtypes_WmmAcParameters_t, *pIEEEtypes_WmmAcParameters_t; + +/** Data structure of WMM Info IE */ +typedef MLAN_PACK_START struct _IEEEtypes_WmmInfo_t { + + /** + * WMM Info IE - Vendor Specific Header: + * element_id [221/0xdd] + * Len [7] + * Oui [00:50:f2] + * OuiType [2] + * OuiSubType [0] + * Version [1] + */ + IEEEtypes_VendorHeader_t vend_hdr; + + /** QoS information */ + IEEEtypes_WmmQosInfo_t qos_info; + +} MLAN_PACK_END IEEEtypes_WmmInfo_t, *pIEEEtypes_WmmInfo_t; + +/** Data structure of WMM parameter IE */ +typedef MLAN_PACK_START struct _IEEEtypes_WmmParameter_t { + /** + * WMM Parameter IE - Vendor Specific Header: + * element_id [221/0xdd] + * Len [24] + * Oui [00:50:f2] + * OuiType [2] + * OuiSubType [1] + * Version [1] + */ + IEEEtypes_VendorHeader_t vend_hdr; + + /** QoS information */ + IEEEtypes_WmmQosInfo_t qos_info; + /** Reserved */ + t_u8 reserved; + + /** AC Parameters Record WMM_AC_BE, WMM_AC_BK, WMM_AC_VI, WMM_AC_VO */ + IEEEtypes_WmmAcParameters_t ac_params[MAX_AC_QUEUES]; +} MLAN_PACK_END IEEEtypes_WmmParameter_t, *pIEEEtypes_WmmParameter_t; + +/** Enumerator for TSPEC direction */ +typedef MLAN_PACK_START enum _IEEEtypes_WMM_TSPEC_TS_Info_Direction_e { + + TSPEC_DIR_UPLINK = 0, + TSPEC_DIR_DOWNLINK = 1, + /* 2 is a reserved value */ + TSPEC_DIR_BIDIRECT = 3, + +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_Info_Direction_e; + +/** Enumerator for TSPEC PSB */ +typedef MLAN_PACK_START enum _IEEEtypes_WMM_TSPEC_TS_Info_PSB_e { + + TSPEC_PSB_LEGACY = 0, + TSPEC_PSB_TRIG = 1, + +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_Info_PSB_e; + +/** Enumerator for TSPEC Ack Policy */ +typedef MLAN_PACK_START enum _IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e { + + TSPEC_ACKPOLICY_NORMAL = 0, + TSPEC_ACKPOLICY_NOACK = 1, + /* 2 is reserved */ + TSPEC_ACKPOLICY_BLOCKACK = 3, + +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e; + +/** Enumerator for TSPEC Trafffice type */ +typedef MLAN_PACK_START enum _IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e { + + TSPEC_TRAFFIC_APERIODIC = 0, + TSPEC_TRAFFIC_PERIODIC = 1, + +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e; + +/** Data structure of WMM TSPEC information */ +typedef MLAN_PACK_START struct { +#ifdef BIG_ENDIAN_SUPPORT + t_u8 Reserved17_23:7; /* ! Reserved */ + t_u8 Schedule:1; + IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy:2; + t_u8 UserPri:3; /* ! 802.1d User Priority */ + IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior:1; /* ! + Legacy/Trigg + */ + t_u8 Aggregation:1; /* ! Reserved */ + t_u8 AccessPolicy2:1; /* ! */ + t_u8 AccessPolicy1:1; /* ! */ + IEEEtypes_WMM_TSPEC_TS_Info_Direction_e Direction:2; + t_u8 TID:4; /* ! Unique identifier */ + IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType:1; +#else + IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType:1; + t_u8 TID:4; /* ! Unique identifier */ + IEEEtypes_WMM_TSPEC_TS_Info_Direction_e Direction:2; + t_u8 AccessPolicy1:1; /* ! */ + t_u8 AccessPolicy2:1; /* ! */ + t_u8 Aggregation:1; /* ! Reserved */ + IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior:1; /* ! + Legacy/Trigg + */ + t_u8 UserPri:3; /* ! 802.1d User Priority */ + IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy:2; + t_u8 Schedule:1; + t_u8 Reserved17_23:7; /* ! Reserved */ +#endif +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_Info_t; + +/** Data structure of WMM TSPEC Nominal Size */ +typedef MLAN_PACK_START struct { +#ifdef BIG_ENDIAN_SUPPORT + t_u16 Fixed:1; /* ! 1: Fixed size given in Size, 0: Var, size + is nominal */ + t_u16 Size:15; /* ! Nominal size in octets */ +#else + t_u16 Size:15; /* ! Nominal size in octets */ + t_u16 Fixed:1; /* ! 1: Fixed size given in Size, 0: Var, size + is nominal */ +#endif +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_NomMSDUSize_t; + +/** Data structure of WMM TSPEC SBWA */ +typedef MLAN_PACK_START struct { +#ifdef BIG_ENDIAN_SUPPORT + t_u16 Whole:3; /* ! Whole portion */ + t_u16 Fractional:13; /* ! Fractional portion */ +#else + t_u16 Fractional:13; /* ! Fractional portion */ + t_u16 Whole:3; /* ! Whole portion */ +#endif +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_SBWA; + +/** Data structure of WMM TSPEC Body */ +typedef MLAN_PACK_START struct { + + IEEEtypes_WMM_TSPEC_TS_Info_t TSInfo; + IEEEtypes_WMM_TSPEC_NomMSDUSize_t NomMSDUSize; + t_u16 MaximumMSDUSize; + t_u32 MinServiceInterval; + t_u32 MaxServiceInterval; + t_u32 InactivityInterval; + t_u32 SuspensionInterval; + t_u32 ServiceStartTime; + t_u32 MinimumDataRate; + t_u32 MeanDataRate; + t_u32 PeakDataRate; + t_u32 MaxBurstSize; + t_u32 DelayBound; + t_u32 MinPHYRate; + IEEEtypes_WMM_TSPEC_SBWA SurplusBWAllowance; + t_u16 MediumTime; +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_Body_t; + +/** Data structure of WMM TSPEC all elements */ +typedef MLAN_PACK_START struct { + t_u8 ElementId; + t_u8 Len; + t_u8 OuiType[4]; /* 00:50:f2:02 */ + t_u8 OuiSubType; /* 01 */ + t_u8 Version; + + IEEEtypes_WMM_TSPEC_Body_t TspecBody; + +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_t; + +/** WMM Action Category values */ +typedef MLAN_PACK_START enum _IEEEtypes_ActionCategory_e { + + IEEE_MGMT_ACTION_CATEGORY_SPECTRUM_MGMT = 0, + IEEE_MGMT_ACTION_CATEGORY_QOS = 1, + IEEE_MGMT_ACTION_CATEGORY_DLS = 2, + IEEE_MGMT_ACTION_CATEGORY_BLOCK_ACK = 3, + IEEE_MGMT_ACTION_CATEGORY_PUBLIC = 4, + IEEE_MGMT_ACTION_CATEGORY_RADIO_RSRC = 5, + IEEE_MGMT_ACTION_CATEGORY_FAST_BSS_TRANS = 6, + IEEE_MGMT_ACTION_CATEGORY_HT = 7, + + IEEE_MGMT_ACTION_CATEGORY_WNM = 10, + IEEE_MGMT_ACTION_CATEGORY_UNPROTECT_WNM = 11, + + IEEE_MGMT_ACTION_CATEGORY_WMM_TSPEC = 17 +} MLAN_PACK_END IEEEtypes_ActionCategory_e; + +/** WMM TSPEC operations */ +typedef MLAN_PACK_START enum _IEEEtypes_WMM_Tspec_Action_e { + + TSPEC_ACTION_CODE_ADDTS_REQ = 0, + TSPEC_ACTION_CODE_ADDTS_RSP = 1, + TSPEC_ACTION_CODE_DELTS = 2, + +} MLAN_PACK_END IEEEtypes_WMM_Tspec_Action_e; + +/** WMM TSPEC Category Action Base */ +typedef MLAN_PACK_START struct { + + IEEEtypes_ActionCategory_e category; + IEEEtypes_WMM_Tspec_Action_e action; + t_u8 dialogToken; + +} MLAN_PACK_END IEEEtypes_WMM_Tspec_Action_Base_Tspec_t; + +/** WMM TSPEC AddTS request structure */ +typedef MLAN_PACK_START struct { + + IEEEtypes_WMM_Tspec_Action_Base_Tspec_t tspecAct; + t_u8 statusCode; + IEEEtypes_WMM_TSPEC_t tspecIE; + + /* Place holder for additional elements after the TSPEC */ + t_u8 subElem[256]; + +} MLAN_PACK_END IEEEtypes_Action_WMM_AddTsReq_t; + +/** WMM TSPEC AddTS response structure */ +typedef MLAN_PACK_START struct { + IEEEtypes_WMM_Tspec_Action_Base_Tspec_t tspecAct; + t_u8 statusCode; + IEEEtypes_WMM_TSPEC_t tspecIE; + + /* Place holder for additional elements after the TSPEC */ + t_u8 subElem[256]; + +} MLAN_PACK_END IEEEtypes_Action_WMM_AddTsRsp_t; + +/** WMM TSPEC DelTS structure */ +typedef MLAN_PACK_START struct { + IEEEtypes_WMM_Tspec_Action_Base_Tspec_t tspecAct; + t_u8 reasonCode; + IEEEtypes_WMM_TSPEC_t tspecIE; + +} MLAN_PACK_END IEEEtypes_Action_WMM_DelTs_t; + +/** union of WMM TSPEC structures */ +typedef MLAN_PACK_START union { + IEEEtypes_WMM_Tspec_Action_Base_Tspec_t tspecAct; + + IEEEtypes_Action_WMM_AddTsReq_t addTsReq; + IEEEtypes_Action_WMM_AddTsRsp_t addTsRsp; + IEEEtypes_Action_WMM_DelTs_t delTs; + +} MLAN_PACK_END IEEEtypes_Action_WMMAC_t; + +/** union of WMM TSPEC & Action category */ +typedef MLAN_PACK_START union { + IEEEtypes_ActionCategory_e category; + + IEEEtypes_Action_WMMAC_t wmmAc; + +} MLAN_PACK_END IEEEtypes_ActionFrame_t; + +/** Data structure for subband set */ +typedef MLAN_PACK_START struct _IEEEtypes_SubbandSet_t { + /** First channel */ + t_u8 first_chan; + /** Number of channels */ + t_u8 no_of_chan; + /** Maximum Tx power in dBm */ + t_u8 max_tx_pwr; +} MLAN_PACK_END IEEEtypes_SubbandSet_t, *pIEEEtypes_SubbandSet_t; + +#ifdef STA_SUPPORT +/** Data structure for Country IE */ +typedef MLAN_PACK_START struct _IEEEtypes_CountryInfoSet_t { + /** Element ID */ + t_u8 element_id; + /** Length */ + t_u8 len; + /** Country code */ + t_u8 country_code[COUNTRY_CODE_LEN]; + /** Set of subbands */ + IEEEtypes_SubbandSet_t sub_band[1]; +} MLAN_PACK_END IEEEtypes_CountryInfoSet_t, *pIEEEtypes_CountryInfoSet_t; + +/** Data structure for Country IE full set */ +typedef MLAN_PACK_START struct _IEEEtypes_CountryInfoFullSet_t { + /** Element ID */ + t_u8 element_id; + /** Length */ + t_u8 len; + /** Country code */ + t_u8 country_code[COUNTRY_CODE_LEN]; + /** Set of subbands */ + IEEEtypes_SubbandSet_t sub_band[MRVDRV_MAX_SUBBAND_802_11D]; +} MLAN_PACK_END IEEEtypes_CountryInfoFullSet_t, + *pIEEEtypes_CountryInfoFullSet_t; + +#endif /* STA_SUPPORT */ + +/** Data structure for Link ID */ +typedef MLAN_PACK_START struct _IEEEtypes_LinkIDElement_t { + /** Element ID */ + t_u8 element_id; + /** Length */ + t_u8 len; + /** bssid */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; + /** initial sta address */ + t_u8 init_sta[MLAN_MAC_ADDR_LENGTH]; + /** respose sta address */ + t_u8 resp_sta[MLAN_MAC_ADDR_LENGTH]; +} MLAN_PACK_END IEEEtypes_LinkIDElement_t, *pIEEEtypes_LinkIDElement_t; + +/** HT Capabilities Data */ +typedef struct MLAN_PACK_START _HTCap_t { + /** HT Capabilities Info field */ + t_u16 ht_cap_info; + /** A-MPDU Parameters field */ + t_u8 ampdu_param; + /** Supported MCS Set field */ + t_u8 supported_mcs_set[16]; + /** HT Extended Capabilities field */ + t_u16 ht_ext_cap; + /** Transmit Beamforming Capabilities field */ + t_u32 tx_bf_cap; + /** Antenna Selection Capability field */ + t_u8 asel; +} MLAN_PACK_END HTCap_t, *pHTCap_t; + +/** HT Information Data */ +typedef struct MLAN_PACK_START _HTInfo_t { + /** Primary channel */ + t_u8 pri_chan; + /** Field 2 */ + t_u8 field2; + /** Field 3 */ + t_u16 field3; + /** Field 4 */ + t_u16 field4; + /** Bitmap indicating MCSs supported by all HT STAs in the BSS */ + t_u8 basic_mcs_set[16]; +} MLAN_PACK_END HTInfo_t, *pHTInfo_t; + +/** 20/40 BSS Coexistence Data */ +typedef struct MLAN_PACK_START _BSSCo2040_t { + /** 20/40 BSS Coexistence value */ + t_u8 bss_co_2040_value; +} MLAN_PACK_END BSSCo2040_t, *pBSSCo2040_t; + +#ifdef BIG_ENDIAN_SUPPORT +/** Extended Capabilities Data */ +typedef struct MLAN_PACK_START _ExtCap_t { + /** Extended Capabilities value */ + t_u8 rsvdBit63:1; /* bit 63 */ + t_u8 OperModeNtf:1; /* bit 62 */ + t_u8 TDLSWildBandwidth:1; /* bit 61 */ + t_u8 rsvdBit60:1; /* bit 60 */ + t_u8 rsvdBit59:1; /* bit 59 */ + t_u8 rsvdBit58:1; /* bit 58 */ + t_u8 rsvdBit57:1; /* bit 57 */ + t_u8 rsvdBit56:1; /* bit 56 */ + t_u8 rsvdBit55:1; /* bit 55 */ + t_u8 rsvdBit54:1; /* bit 54 */ + t_u8 rsvdBit53:1; /* bit 53 */ + t_u8 rsvdBit52:1; /* bit 52 */ + t_u8 rsvdBit51:1; /* bit 51 */ + t_u8 rsvdBit50:1; /* bit 50 */ + t_u8 rsvdBit49:1; /* bit 49 */ + t_u8 rsvdBit48:1; /* bit 48 */ + t_u8 rsvdBit47:1; /* bit 47 */ + t_u8 rsvdBit46:1; /* bit 46 */ + t_u8 rsvdBit45:1; /* bit 45 */ + t_u8 rsvdBit44:1; /* bit 44 */ + t_u8 rsvdBit43:1; /* bit 43 */ + t_u8 rsvdBit42:1; /* bit 42 */ + t_u8 rsvdBit41:1; /* bit 41 */ + t_u8 rsvdBit40:1; /* bit 40 */ + t_u8 TDLSChlSwitchProhib:1; /* bit 39 */ + t_u8 TDLSProhibited:1; /* bit 38 */ + t_u8 TDLSSupport:1; /* bit 37 */ + t_u8 MSGCF_Capa:1; /* bit 36 */ + t_u8 Reserved35:1; /* bit 35 */ + t_u8 SSPN_Interface:1; /* bit 34 */ + t_u8 EBR:1; /* bit 33 */ + t_u8 Qos_Map:1; /* bit 32 */ + t_u8 Interworking:1; /* bit 31 */ + t_u8 TDLSChannelSwitching:1; /* bit 30 */ + t_u8 TDLSPeerPSMSupport:1; /* bit 29 */ + t_u8 TDLSPeerUAPSDSupport:1; /* bit 28 */ + t_u8 UTC:1; /* bit 27 */ + t_u8 DMS:1; /* bit 26 */ + t_u8 SSID_List:1; /* bit 25 */ + t_u8 ChannelUsage:1; /* bit 24 */ + t_u8 TimingMeasurement:1; /* bit 23 */ + t_u8 MultipleBSSID:1; /* bit 22 */ + t_u8 AC_StationCount:1; /* bit 21 */ + t_u8 QoSTrafficCap:1; /* bit 20 */ + t_u8 BSS_Transition:1; /* bit 19 */ + t_u8 TIM_Broadcast:1; /* bit 18 */ + t_u8 WNM_Sleep:1; /* bit 17 */ + t_u8 TFS:1; /* bit 16 */ + t_u8 GeospatialLocation:1; /* bit 15 */ + t_u8 CivicLocation:1; /* bit 14 */ + t_u8 CollocatedIntf:1; /* bit 13 */ + t_u8 ProxyARPService:1; /* bit 12 */ + t_u8 FMS:1; /* bit 11 */ + t_u8 LocationTracking:1; /* bit 10 */ + t_u8 MulticastDiagnostics:1; /* bit 9 */ + t_u8 Diagnostics:1; /* bit 8 */ + t_u8 Event:1; /* bit 7 */ + t_u8 SPSMP_Support:1; /* bit 6 */ + t_u8 Reserved5:1; /* bit 5 */ + t_u8 PSMP_Capable:1; /* bit 4 */ + t_u8 RejectUnadmFrame:1; /* bit 3 */ + t_u8 ExtChanSwitching:1; /* bit 2 */ + t_u8 Reserved1:1; /* bit 1 */ + t_u8 BSS_CoexistSupport:1; /* bit 0 */ +} MLAN_PACK_END ExtCap_t, *pExtCap_t; +#else +/** Extended Capabilities Data */ +typedef struct MLAN_PACK_START _ExtCap_t { + /** Extended Capabilities value */ + t_u8 BSS_CoexistSupport:1; /* bit 0 */ + t_u8 Reserved1:1; /* bit 1 */ + t_u8 ExtChanSwitching:1; /* bit 2 */ + t_u8 RejectUnadmFrame:1; /* bit 3 */ + t_u8 PSMP_Capable:1; /* bit 4 */ + t_u8 Reserved5:1; /* bit 5 */ + t_u8 SPSMP_Support:1; /* bit 6 */ + t_u8 Event:1; /* bit 7 */ + t_u8 Diagnostics:1; /* bit 8 */ + t_u8 MulticastDiagnostics:1; /* bit 9 */ + t_u8 LocationTracking:1; /* bit 10 */ + t_u8 FMS:1; /* bit 11 */ + t_u8 ProxyARPService:1; /* bit 12 */ + t_u8 CollocatedIntf:1; /* bit 13 */ + t_u8 CivicLocation:1; /* bit 14 */ + t_u8 GeospatialLocation:1; /* bit 15 */ + t_u8 TFS:1; /* bit 16 */ + t_u8 WNM_Sleep:1; /* bit 17 */ + t_u8 TIM_Broadcast:1; /* bit 18 */ + t_u8 BSS_Transition:1; /* bit 19 */ + t_u8 QoSTrafficCap:1; /* bit 20 */ + t_u8 AC_StationCount:1; /* bit 21 */ + t_u8 MultipleBSSID:1; /* bit 22 */ + t_u8 TimingMeasurement:1; /* bit 23 */ + t_u8 ChannelUsage:1; /* bit 24 */ + t_u8 SSID_List:1; /* bit 25 */ + t_u8 DMS:1; /* bit 26 */ + t_u8 UTC:1; /* bit 27 */ + t_u8 TDLSPeerUAPSDSupport:1; /* bit 28 */ + t_u8 TDLSPeerPSMSupport:1; /* bit 29 */ + t_u8 TDLSChannelSwitching:1; /* bit 30 */ + t_u8 Interworking:1; /* bit 31 */ + t_u8 Qos_Map:1; /* bit 32 */ + t_u8 EBR:1; /* bit 33 */ + t_u8 SSPN_Interface:1; /* bit 34 */ + t_u8 Reserved35:1; /* bit 35 */ + t_u8 MSGCF_Capa:1; /* bit 36 */ + t_u8 TDLSSupport:1; /* bit 37 */ + t_u8 TDLSProhibited:1; /* bit 38 */ + t_u8 TDLSChlSwitchProhib:1; /* bit 39 */ + t_u8 rsvdBit40:1; /* bit 40 */ + t_u8 rsvdBit41:1; /* bit 41 */ + t_u8 rsvdBit42:1; /* bit 42 */ + t_u8 rsvdBit43:1; /* bit 43 */ + t_u8 rsvdBit44:1; /* bit 44 */ + t_u8 rsvdBit45:1; /* bit 45 */ + t_u8 rsvdBit46:1; /* bit 46 */ + t_u8 rsvdBit47:1; /* bit 47 */ + t_u8 rsvdBit48:1; /* bit 48 */ + t_u8 rsvdBit49:1; /* bit 49 */ + t_u8 rsvdBit50:1; /* bit 50 */ + t_u8 rsvdBit51:1; /* bit 51 */ + t_u8 rsvdBit52:1; /* bit 52 */ + t_u8 rsvdBit53:1; /* bit 53 */ + t_u8 rsvdBit54:1; /* bit 54 */ + t_u8 rsvdBit55:1; /* bit 55 */ + t_u8 rsvdBit56:1; /* bit 56 */ + t_u8 rsvdBit57:1; /* bit 57 */ + t_u8 rsvdBit58:1; /* bit 58 */ + t_u8 rsvdBit59:1; /* bit 59 */ + t_u8 rsvdBit60:1; /* bit 60 */ + t_u8 TDLSWildBandwidth:1; /* bit 61 */ + t_u8 OperModeNtf:1; /* bit 62 */ + t_u8 rsvdBit63:1; /* bit 63 */ +} MLAN_PACK_END ExtCap_t, *pExtCap_t; +#endif + +/** Overlapping BSS Scan Parameters Data */ +typedef struct MLAN_PACK_START _OverlapBSSScanParam_t { + /** OBSS Scan Passive Dwell in milliseconds */ + t_u16 obss_scan_passive_dwell; + /** OBSS Scan Active Dwell in milliseconds */ + t_u16 obss_scan_active_dwell; + /** BSS Channel Width Trigger Scan Interval in seconds */ + t_u16 bss_chan_width_trigger_scan_int; + /** OBSS Scan Passive Total Per Channel */ + t_u16 obss_scan_passive_total; + /** OBSS Scan Active Total Per Channel */ + t_u16 obss_scan_active_total; + /** BSS Width Channel Transition Delay Factor */ + t_u16 bss_width_chan_trans_delay; + /** OBSS Scan Activity Threshold */ + t_u16 obss_scan_active_threshold; +} MLAN_PACK_END OBSSScanParam_t, *pOBSSScanParam_t; + +/** HT Capabilities IE */ +typedef MLAN_PACK_START struct _IEEEtypes_HTCap_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** HTCap struct */ + HTCap_t ht_cap; +} MLAN_PACK_END IEEEtypes_HTCap_t, *pIEEEtypes_HTCap_t; + +/** HT Information IE */ +typedef MLAN_PACK_START struct _IEEEtypes_HTInfo_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** HTInfo struct */ + HTInfo_t ht_info; +} MLAN_PACK_END IEEEtypes_HTInfo_t, *pIEEEtypes_HTInfo_t; + +/** 20/40 BSS Coexistence IE */ +typedef MLAN_PACK_START struct _IEEEtypes_2040BSSCo_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** BSSCo2040_t struct */ + BSSCo2040_t bss_co_2040; +} MLAN_PACK_END IEEEtypes_2040BSSCo_t, *pIEEEtypes_2040BSSCo_t; + +/** Extended Capabilities IE */ +typedef MLAN_PACK_START struct _IEEEtypes_ExtCap_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** ExtCap_t struct */ + ExtCap_t ext_cap; +} MLAN_PACK_END IEEEtypes_ExtCap_t, *pIEEEtypes_ExtCap_t; + +/** Overlapping BSS Scan Parameters IE */ +typedef MLAN_PACK_START struct _IEEEtypes_OverlapBSSScanParam_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** OBSSScanParam_t struct */ + OBSSScanParam_t obss_scan_param; +} MLAN_PACK_END IEEEtypes_OverlapBSSScanParam_t, + *pIEEEtypes_OverlapBSSScanParam_t; + +/** VHT MCS rate set field, refer to 802.11ac */ +typedef MLAN_PACK_START struct _VHT_MCS_set { + t_u16 rx_mcs_map; + t_u16 rx_max_rate; /* bit 29-31 reserved */ + t_u16 tx_mcs_map; + t_u16 tx_max_rate; /* bit 61-63 reserved */ +} MLAN_PACK_END VHT_MCS_set_t, *pVHT_MCS_set_t; + +/** VHT Capabilities info field, reference 802.11ac D1.4 p89 */ +typedef MLAN_PACK_START struct _VHT_capa { +#if 0 +#ifdef BIG_ENDIAN_SUPPORT + t_u8 mpdu_max_len:2; + t_u8 chan_width:2; + t_u8 rx_LDPC:1; + t_u8 sgi_80:1; + t_u8 sgi_160:1; + t_u8 tx_STBC:1; + t_u8 rx_STBC:3; + t_u8 SU_beamformer_capa:1; + t_u8 SU_beamformee_capa:1; + t_u8 beamformer_ante_num:3; + t_u8 sounding_dim_num:3; + t_u8 MU_beamformer_capa:1; + t_u8 MU_beamformee_capa:1; + t_u8 VHT_TXOP_ps:1; + t_u8 HTC_VHT_capa:1; + t_u8 max_ampdu_len:3; + t_u8 link_apapt_capa:2; + t_u8 reserved_1:4; +#else + t_u8 reserved_1:4; + t_u8 link_apapt_capa:2; + t_u8 max_ampdu_len:3; + t_u8 HTC_VHT_capa:1; + t_u8 VHT_TXOP_ps:1; + t_u8 MU_beamformee_capa:1; + t_u8 MU_beamformer_capa:1; + t_u8 sounding_dim_num:3; + t_u8 beamformer_ante_num:3; + t_u8 SU_beamformee_capa:1; + t_u8 SU_beamformer_capa:1; + t_u8 rx_STBC:3; + t_u8 tx_STBC:1; + t_u8 sgi_160:1; + t_u8 sgi_80:1; + t_u8 rx_LDPC:1; + t_u8 chan_width:2; + t_u8 mpdu_max_len:2; +#endif /* BIG_ENDIAN_SUPPORT */ +#endif + t_u32 vht_cap_info; + VHT_MCS_set_t mcs_sets; +} MLAN_PACK_END VHT_capa_t, *pVHT_capa_t; + +/** VHT Capabilities IE */ +typedef MLAN_PACK_START struct _IEEEtypes_VHTCap_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + VHT_capa_t vht_cap; +} MLAN_PACK_END IEEEtypes_VHTCap_t, *pIEEEtypes_VHTCap_t; + +#define VHT_CAP_CHWD_80MHZ 0 +#define VHT_CAP_CHWD_160MHZ 1 +#define VHT_CAP_CHWD_80_80MHZ 2 + +/** VHT Operations IE */ +typedef MLAN_PACK_START struct _IEEEtypes_VHTOprat_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + t_u8 chan_width; + t_u8 chan_center_freq_1; + t_u8 chan_center_freq_2; + /** Basic MCS set map, each 2 bits stands for a Nss */ + t_u16 basic_MCS_map; +} MLAN_PACK_END IEEEtypes_VHTOprat_t, *pIEEEtypes_VHTOprat_t; + +#define VHT_OPER_CHWD_20_40MHZ 0 +#define VHT_OPER_CHWD_80MHZ 1 +#define VHT_OPER_CHWD_160MHZ 2 +#define VHT_OPER_CHWD_80_80MHZ 3 + +/** VHT Transmit Power Envelope IE */ +typedef MLAN_PACK_START struct _IEEEtypes_VHTtxpower_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + t_u8 max_tx_power; + t_u8 chan_center_freq; + t_u8 chan_width; +} MLAN_PACK_END IEEEtypes_VHTtxpower_t, *pIEEEtypes_VHTtxpower_t; + +/** Extended Power Constraint IE */ +typedef MLAN_PACK_START struct _IEEEtypes_ExtPwerCons_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** channel width */ + t_u8 chan_width; + /** local power constraint */ + t_u8 local_power_cons; +} MLAN_PACK_END IEEEtypes_ExtPwerCons_t, *pIEEEtypes_ExtPwerCons_t; + +/** Extended BSS Load IE */ +typedef MLAN_PACK_START struct _IEEEtypes_ExtBSSload_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + t_u8 MU_MIMO_capa_count; + t_u8 stream_underutilization; + t_u8 VHT40_util; + t_u8 VHT80_util; + t_u8 VHT160_util; +} MLAN_PACK_END IEEEtypes_ExtBSSload_t, *pIEEEtypes_ExtBSSload_t; + +/** Quiet Channel IE */ +typedef MLAN_PACK_START struct _IEEEtypes_QuietChan_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + t_u8 AP_quiet_mode; + t_u8 quiet_count; + t_u8 quiet_period; + t_u16 quiet_dur; + t_u16 quiet_offset; +} MLAN_PACK_END IEEEtypes_QuietChan_t, *pIEEEtypes_QuietChan_t; + +/** Wide Bandwidth Channel Switch IE */ +typedef MLAN_PACK_START struct _IEEEtypes_BWSwitch_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + t_u8 new_chan_width; + t_u8 new_chan_center_freq_1; + t_u8 new_chan_center_freq_2; +} MLAN_PACK_END IEEEtypes_BWSwitch_t, *pIEEEtypes_BWSwitch_t; + +/** AID IE */ +typedef MLAN_PACK_START struct _IEEEtypes_AID_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** AID number */ + t_u16 AID; +} MLAN_PACK_END IEEEtypes_AID_t, *pIEEEtypes_AID_t; + +/** Operating Mode Notificaton IE */ +typedef MLAN_PACK_START struct _IEEEtypes_OperModeNtf_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** Operating Mode */ + t_u8 oper_mode; +} MLAN_PACK_END IEEEtypes_OperModeNtf_t, *pIEEEtypes_OperModeNtf_t; + +/** Maximum number of subbands in the IEEEtypes_SupportedChannels_t structure */ +#define WLAN_11H_MAX_SUBBANDS 5 + +/** Maximum number of DFS channels configured in IEEEtypes_IBSS_DFS_t */ +#define WLAN_11H_MAX_IBSS_DFS_CHANNELS 25 + +/** IEEE Power Constraint element (7.3.2.15) */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 32 */ + t_u8 len; /**< Element length after id and len */ + t_u8 local_constraint; + /**< Local power constraint applied to 11d + chan info */ +} MLAN_PACK_END IEEEtypes_PowerConstraint_t; + +/** IEEE Power Capability element (7.3.2.16) */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 33 */ + t_u8 len; /**< Element length after id and len */ + t_s8 min_tx_power_capability; + /**< Minimum Transmit power (dBm) */ + t_s8 max_tx_power_capability; + /**< Maximum Transmit power (dBm) */ +} MLAN_PACK_END IEEEtypes_PowerCapability_t; + +/** IEEE TPC Report element (7.3.2.18) */ +typedef MLAN_PACK_START struct { + t_u8 element_id;/**< IEEE Element ID = 35 */ + t_u8 len; /**< Element length after id and len */ + t_s8 tx_power; /**< Max power used to transmit the TPC Report frame (dBm) */ + t_s8 link_margin; + /**< Link margin when TPC Request received (dB) */ +} MLAN_PACK_END IEEEtypes_TPCReport_t; + +/* IEEE Supported Channel sub-band description (7.3.2.19) */ +/** + * Sub-band description used in the supported channels element. + */ +typedef MLAN_PACK_START struct { + t_u8 start_chan;/**< Starting channel in the subband */ + t_u8 num_chans; /**< Number of channels in the subband */ + +} MLAN_PACK_END IEEEtypes_SupportChan_Subband_t; + +/* IEEE Supported Channel element (7.3.2.19) */ +/** + * Sent in association requests. Details the sub-bands and number + * of channels supported in each subband + */ +typedef MLAN_PACK_START struct { + t_u8 element_id;/**< IEEE Element ID = 36 */ + t_u8 len; /**< Element length after id and len */ + + /** Configured sub-bands information in the element */ + IEEEtypes_SupportChan_Subband_t subband[WLAN_11H_MAX_SUBBANDS]; + +} MLAN_PACK_END IEEEtypes_SupportedChannels_t; + +/* IEEE Channel Switch Announcement Element (7.3.2.20) */ +/** + * Provided in beacons and probe responses. Used to advertise when + * and to which channel it is changing to. Only starting STAs in + * an IBSS and APs are allowed to originate a chan switch element. + */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 37 */ + t_u8 len; /**< Element length after id and len */ + t_u8 chan_switch_mode; /**< STA should not transmit any frames if 1 */ + t_u8 new_channel_num; /**< Channel # that AP/IBSS is moving to */ + t_u8 chan_switch_count; /**< # of TBTTs before channel switch */ + +} MLAN_PACK_END IEEEtypes_ChanSwitchAnn_t; + +/* IEEE Wide Bandwidth Channel Switch Element */ +/** + * Provided in beacons and probe responses. Used to advertise when + * and to which channel it is changing to. Only starting STAs in + * an IBSS and APs are allowed to originate a wide bandwidth chan + * switch element. + */ +typedef MLAN_PACK_START struct { + /** Generic IE header IEEE Element ID = 194*/ + IEEEtypes_Header_t ieee_hdr; + t_u8 new_channel_width; + t_u8 new_channel_center_freq0; + t_u8 new_channel_center_freq1; +} MLAN_PACK_END IEEEtypes_WideBWChanSwitch_t; + +/* IEEE VHT Transmit Power Envelope Element */ +/** + * Provided in beacons and probe responses. Used to advertise the max + * TX power in sepeate bandwidth and as a sub element of Channel Switch + * Wrapper IE. + */ +typedef MLAN_PACK_START struct { + /** Generic IE header IEEE Element ID = 195*/ + IEEEtypes_Header_t ieee_hdr; + t_u8 tpc_info; /**< Transmit Power Information>*/ + t_u8 local_max_tp_20mhz;/**< Local Maximum Transmit Power for 20 MHZ>*/ + t_u8 local_max_tp_40mhz;/**< Local Maximum Transmit Power for 40 MHZ>*/ + t_u8 local_max_tp_80mhz;/**< Local Maximum Transmit Power for 80 MHZ>*/ +} MLAN_PACK_END IEEEtypes_VhtTpcEnvelope_t; + +/* IEEE Quiet Period Element (7.3.2.23) */ +/** + * Provided in beacons and probe responses. Indicates times during + * which the STA should not be transmitting data. Only starting STAs in + * an IBSS and APs are allowed to originate a quiet element. + */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 40 */ + t_u8 len; /**< Element length after id and len */ + t_u8 quiet_count; /**< Number of TBTTs until beacon with the quiet period */ + t_u8 quiet_period; /**< Regular quiet period, # of TBTTS between periods */ + t_u16 quiet_duration; + /**< Duration of the quiet period in TUs */ + t_u16 quiet_offset; /**< Offset in TUs from the TBTT for the quiet period */ + +} MLAN_PACK_END IEEEtypes_Quiet_t; + +/** +*** @brief Map octet of the basic measurement report (7.3.2.22.1) +**/ +typedef MLAN_PACK_START struct { +#ifdef BIG_ENDIAN_SUPPORT + /**< Reserved */ + t_u8 rsvd5_7:3; + /**< Channel is unmeasured */ + t_u8 unmeasured:1; + /**< Radar detected on channel */ + t_u8 radar:1; + /**< Unidentified signal found on channel */ + t_u8 unidentified_sig:1; + /**< OFDM preamble detected on channel */ + t_u8 ofdm_preamble:1; + /**< At least one valid MPDU received on channel */ + t_u8 bss:1; +#else + /**< At least one valid MPDU received on channel */ + t_u8 bss:1; + /**< OFDM preamble detected on channel */ + t_u8 ofdm_preamble:1; + /**< Unidentified signal found on channel */ + t_u8 unidentified_sig:1; + /**< Radar detected on channel */ + t_u8 radar:1; + /**< Channel is unmeasured */ + t_u8 unmeasured:1; + /**< Reserved */ + t_u8 rsvd5_7:3; +#endif /* BIG_ENDIAN_SUPPORT */ + +} MLAN_PACK_END MeasRptBasicMap_t; + +/* IEEE DFS Channel Map field (7.3.2.24) */ +/** + * Used to list supported channels and provide a octet "map" field which + * contains a basic measurement report for that channel in the + * IEEEtypes_IBSS_DFS_t element + */ +typedef MLAN_PACK_START struct { + t_u8 channel_number; /**< Channel number */ + MeasRptBasicMap_t rpt_map; + /**< Basic measurement report for the channel */ + +} MLAN_PACK_END IEEEtypes_ChannelMap_t; + +/* IEEE IBSS DFS Element (7.3.2.24) */ +/** + * IBSS DFS element included in ad hoc beacons and probe responses. + * Provides information regarding the IBSS DFS Owner as well as the + * originating STAs supported channels and basic measurement results. + */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 41 */ + t_u8 len; /**< Element length after id and len */ + t_u8 dfs_owner[MLAN_MAC_ADDR_LENGTH]; + /**< DFS Owner STA Address */ + t_u8 dfs_recovery_interval; /**< DFS Recovery time in TBTTs */ + + /** Variable length map field, one Map entry for each supported channel */ + IEEEtypes_ChannelMap_t channel_map[WLAN_11H_MAX_IBSS_DFS_CHANNELS]; + +} MLAN_PACK_END IEEEtypes_IBSS_DFS_t; + +/* 802.11h BSS information kept for each BSSID received in scan results */ +/** + * IEEE BSS information needed from scan results for later processing in + * join commands + */ +typedef struct { + t_u8 sensed_11h; + /**< Capability bit set or 11h IE found in this BSS */ + + IEEEtypes_PowerConstraint_t power_constraint; + /**< Power Constraint IE */ + IEEEtypes_PowerCapability_t power_capability; + /**< Power Capability IE */ + IEEEtypes_TPCReport_t tpc_report; /**< TPC Report IE */ + IEEEtypes_ChanSwitchAnn_t chan_switch_ann;/**< Channel Switch Announcement IE */ + IEEEtypes_Quiet_t quiet; /**< Quiet IE */ + IEEEtypes_IBSS_DFS_t ibss_dfs; /**< IBSS DFS Element IE */ + +} wlan_11h_bss_info_t; + +/** Ethernet packet type for TDLS */ +#define MLAN_ETHER_PKT_TYPE_TDLS_ACTION (0x890D) + +/*802.11z TDLS action frame type and strcuct */ +typedef MLAN_PACK_START struct { + /* link indentifier ie =101 */ + t_u8 element_id; + /* len = 18 */ + t_u8 len; + /** bssid */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; + /** init sta mac address */ + t_u8 init_sta[MLAN_MAC_ADDR_LENGTH]; + /** resp sta mac address */ + t_u8 resp_sta[MLAN_MAC_ADDR_LENGTH]; +} MLAN_PACK_END IEEEtypes_tdls_linkie; + +/** action code for tdls setup request */ +#define TDLS_SETUP_REQUEST 0 +/** action code for tdls setup response */ +#define TDLS_SETUP_RESPONSE 1 +/** action code for tdls setup confirm */ +#define TDLS_SETUP_CONFIRM 2 +/** action code for tdls tear down */ +#define TDLS_TEARDOWN 3 +/** action code for tdls traffic indication */ +#define TDLS_PEER_TRAFFIC_INDICATION 4 +/** action code for tdls channel switch request */ +#define TDLS_CHANNEL_SWITCH_REQUEST 5 +/** action code for tdls channel switch response */ +#define TDLS_CHANNEL_SWITCH_RESPONSE 6 +/** action code for tdls psm request */ +#define TDLS_PEER_PSM_REQUEST 7 +/** action code for tdls psm response */ +#define TDLS_PEER_PSM_RESPONSE 8 +/** action code for tdls traffic response */ +#define TDLS_PEER_TRAFFIC_RESPONSE 9 +/** action code for tdls discovery request */ +#define TDLS_DISCOVERY_REQUEST 10 +/** action code for TDLS discovery response */ +#define TDLS_DISCOVERY_RESPONSE 14 +/** category public */ +#define CATEGORY_PUBLIC 4 + +/** action code for 20/40 BSS Coexsitence Management frame */ +#define BSS_20_40_COEX 0 + +#ifdef STA_SUPPORT +/** Macro for maximum size of scan response buffer */ +#define MAX_SCAN_RSP_BUF (16 * 1024) + +/** Maximum number of channels that can be sent in user scan config */ +#define WLAN_USER_SCAN_CHAN_MAX 50 + +/** Maximum length of SSID list */ +#define MRVDRV_MAX_SSID_LIST_LENGTH 10 + +/** Scan all the channels in specified band */ +#define BAND_SPECIFIED 0x80 + +/** + * IOCTL SSID List sub-structure sent in wlan_ioctl_user_scan_cfg + * + * Used to specify SSID specific filters as well as SSID pattern matching + * filters for scan result processing in firmware. + */ +typedef MLAN_PACK_START struct _wlan_user_scan_ssid { + /** SSID */ + t_u8 ssid[MLAN_MAX_SSID_LENGTH + 1]; + /** Maximum length of SSID */ + t_u8 max_len; +} MLAN_PACK_END wlan_user_scan_ssid; + +/** + * @brief IOCTL channel sub-structure sent in wlan_ioctl_user_scan_cfg + * + * Multiple instances of this structure are included in the IOCTL command + * to configure a instance of a scan on the specific channel. + */ +typedef MLAN_PACK_START struct _wlan_user_scan_chan { + /** Channel Number to scan */ + t_u8 chan_number; + /** Radio type: 'B/G' Band = 0, 'A' Band = 1 */ + t_u8 radio_type; + /** Scan type: Active = 1, Passive = 2 */ + t_u8 scan_type; + /** Reserved */ + t_u8 reserved; + /** Scan duration in milliseconds; if 0 default used */ + t_u32 scan_time; +} MLAN_PACK_END wlan_user_scan_chan; + +/** channel statictics */ +typedef MLAN_PACK_START struct _ChanStatistics_t { + /** channle number */ + t_u8 chan_num; + /** band info */ + t_u8 bandconfig; + /** flags */ + t_u8 flags; + /** noise */ + t_s8 noise; + /** total network */ + t_u16 total_networks; + /** scan duration */ + t_u16 cca_scan_duration; + /** busy duration */ + t_u16 cca_busy_duration; +} MLAN_PACK_END ChanStatistics_t; + +/** + * Input structure to configure an immediate scan cmd to firmware + * + * Specifies a number of parameters to be used in general for the scan + * as well as a channel list (wlan_user_scan_chan) for each scan period + * desired. + */ +typedef MLAN_PACK_START struct { + /** + * Flag set to keep the previous scan table intact + * + * If set, the scan results will accumulate, replacing any previous + * matched entries for a BSS with the new scan data + */ + t_u8 keep_previous_scan; + /** + * BSS mode to be sent in the firmware command + * + * Field can be used to restrict the types of networks returned in the + * scan. Valid settings are: + * + * - MLAN_SCAN_MODE_BSS (infrastructure) + * - MLAN_SCAN_MODE_IBSS (adhoc) + * - MLAN_SCAN_MODE_ANY (unrestricted, adhoc and infrastructure) + */ + t_u8 bss_mode; + /** + * Configure the number of probe requests for active chan scans + */ + t_u8 num_probes; + /** + * @brief Reserved + */ + t_u8 reserved; + /** + * @brief BSSID filter sent in the firmware command to limit the results + */ + t_u8 specific_bssid[MLAN_MAC_ADDR_LENGTH]; + /** + * SSID filter list used in the to limit the scan results + */ + wlan_user_scan_ssid ssid_list[MRVDRV_MAX_SSID_LIST_LENGTH]; + /** + * Variable number (fixed maximum) of channels to scan up + */ + wlan_user_scan_chan chan_list[WLAN_USER_SCAN_CHAN_MAX]; + /** scan channel gap */ + t_u16 scan_chan_gap; +} MLAN_PACK_END wlan_user_scan_cfg; + +/** Default scan interval in millisecond*/ +#define DEFAULT_BGSCAN_INTERVAL 30000 + +/** action get all, except pps/uapsd config */ +#define BG_SCAN_ACT_GET 0x0000 +/** action set all, except pps/uapsd config */ +#define BG_SCAN_ACT_SET 0x0001 +/** action get pps/uapsd config */ +#define BG_SCAN_ACT_GET_PPS_UAPSD 0x0100 +/** action set pps/uapsd config */ +#define BG_SCAN_ACT_SET_PPS_UAPSD 0x0101 +/** action set all */ +#define BG_SCAN_ACT_SET_ALL 0xff01 +/** ssid match */ +#define BG_SCAN_SSID_MATCH 0x0001 +/** ssid match and RSSI exceeded */ +#define BG_SCAN_SSID_RSSI_MATCH 0x0004 +/**wait for all channel scan to complete to report scan result*/ +#define BG_SCAN_WAIT_ALL_CHAN_DONE 0x80000000 +/** Maximum number of channels that can be sent in bg scan config */ +#define WLAN_BG_SCAN_CHAN_MAX 38 + +/** + * Input structure to configure bs scan cmd to firmware + */ +typedef MLAN_PACK_START struct { + /** action */ + t_u16 action; + /** enable/disable */ + t_u8 enable; + /** BSS type: + * MLAN_SCAN_MODE_BSS (infrastructure) + * MLAN_SCAN_MODE_IBSS (adhoc) + * MLAN_SCAN_MODE_ANY (unrestricted, adhoc and infrastructure) + */ + t_u8 bss_type; + /** number of channel scanned during each scan */ + t_u8 chan_per_scan; + /** interval between consecutive scan */ + t_u32 scan_interval; + /** bit 0: ssid match bit 1: ssid match and SNR exceeded + * bit 2: ssid match and RSSI exceeded + * bit 31: wait for all channel scan to complete to report scan result + */ + t_u32 report_condition; + /* Configure the number of probe requests for active chan scans */ + t_u8 num_probes; + /** RSSI threshold */ + t_u8 rssi_threshold; + /** SNR threshold */ + t_u8 snr_threshold; + /** repeat count */ + t_u16 repeat_count; + /** start later flag */ + t_u16 start_later; + /** SSID filter list used in the to limit the scan results */ + wlan_user_scan_ssid ssid_list[MRVDRV_MAX_SSID_LIST_LENGTH]; + /** Variable number (fixed maximum) of channels to scan up */ + wlan_user_scan_chan chan_list[WLAN_BG_SCAN_CHAN_MAX]; + /** scan channel gap */ + t_u16 scan_chan_gap; +} MLAN_PACK_END wlan_bgscan_cfg; +#endif /* STA_SUPPORT */ + +#ifdef PRAGMA_PACK +#pragma pack(pop) +#endif + +/** BSSDescriptor_t + * Structure used to store information for beacon/probe response + */ +typedef struct _BSSDescriptor_t { + /** MAC address */ + mlan_802_11_mac_addr mac_address; + + /** SSID */ + mlan_802_11_ssid ssid; + + /** WEP encryption requirement */ + t_u32 privacy; + + /** Receive signal strength in dBm */ + t_s32 rssi; + + /** Channel */ + t_u32 channel; + + /** Freq */ + t_u32 freq; + + /** Beacon period */ + t_u16 beacon_period; + + /** ATIM window */ + t_u32 atim_window; + + /** ERP flags */ + t_u8 erp_flags; + + /** Type of network in use */ + WLAN_802_11_NETWORK_TYPE network_type_use; + + /** Network infrastructure mode */ + t_u32 bss_mode; + + /** Network supported rates */ + WLAN_802_11_RATES supported_rates; + + /** Supported data rates */ + t_u8 data_rates[WLAN_SUPPORTED_RATES]; + + /** Network band. + * BAND_B(0x01): 'b' band + * BAND_G(0x02): 'g' band + * BAND_A(0X04): 'a' band + */ + t_u16 bss_band; + + /** TSF timestamp from the current firmware TSF */ + t_u64 network_tsf; + + /** TSF value included in the beacon/probe response */ + t_u8 time_stamp[8]; + + /** PHY parameter set */ + IEEEtypes_PhyParamSet_t phy_param_set; + + /** SS parameter set */ + IEEEtypes_SsParamSet_t ss_param_set; + + /** Capability information */ + IEEEtypes_CapInfo_t cap_info; + + /** WMM IE */ + IEEEtypes_WmmParameter_t wmm_ie; + + /** 802.11h BSS information */ + wlan_11h_bss_info_t wlan_11h_bss_info; + + /** Indicate disabling 11n when associate with AP */ + t_u8 disable_11n; + /** 802.11n BSS information */ + /** HT Capabilities IE */ + IEEEtypes_HTCap_t *pht_cap; + /** HT Capabilities Offset */ + t_u16 ht_cap_offset; + /** HT Information IE */ + IEEEtypes_HTInfo_t *pht_info; + /** HT Information Offset */ + t_u16 ht_info_offset; + /** 20/40 BSS Coexistence IE */ + IEEEtypes_2040BSSCo_t *pbss_co_2040; + /** 20/40 BSS Coexistence Offset */ + t_u16 bss_co_2040_offset; + /** Extended Capabilities IE */ + IEEEtypes_ExtCap_t *pext_cap; + /** Extended Capabilities Offset */ + t_u16 ext_cap_offset; + /** Overlapping BSS Scan Parameters IE */ + IEEEtypes_OverlapBSSScanParam_t *poverlap_bss_scan_param; + /** Overlapping BSS Scan Parameters Offset */ + t_u16 overlap_bss_offset; + + /** VHT Capabilities IE */ + IEEEtypes_VHTCap_t *pvht_cap; + /** VHT Capabilities IE offset */ + t_u16 vht_cap_offset; + /** VHT Operations IE */ + IEEEtypes_VHTOprat_t *pvht_oprat; + /** VHT Operations IE offset */ + t_u16 vht_oprat_offset; + /** VHT Transmit Power Envelope IE */ + IEEEtypes_VHTtxpower_t *pvht_txpower; + /** VHT Transmit Power Envelope IE offset */ + t_u16 vht_txpower_offset; + /** Extended Power Constraint IE */ + IEEEtypes_ExtPwerCons_t *pext_pwer; + /** Extended Power Constraint IE offset */ + t_u16 ext_pwer_offset; + /** Extended BSS Load IE */ + IEEEtypes_ExtBSSload_t *pext_bssload; + /** Extended BSS Load IE offset */ + t_u16 ext_bssload_offset; + /** Quiet Channel IE */ + IEEEtypes_QuietChan_t *pquiet_chan; + /** Quiet Channel IE offset */ + t_u16 quiet_chan_offset; + /** Operating Mode Notification IE */ + IEEEtypes_OperModeNtf_t *poper_mode; + /** Operating Mode Notification IE offset */ + t_u16 oper_mode_offset; + +#ifdef STA_SUPPORT + /** Country information set */ + IEEEtypes_CountryInfoFullSet_t country_info; +#endif /* STA_SUPPORT */ + + /** WPA IE */ + IEEEtypes_VendorSpecific_t *pwpa_ie; + /** WPA IE offset in the beacon buffer */ + t_u16 wpa_offset; + /** RSN IE */ + IEEEtypes_Generic_t *prsn_ie; + /** RSN IE offset in the beacon buffer */ + t_u16 rsn_offset; +#ifdef STA_SUPPORT + /** WAPI IE */ + IEEEtypes_Generic_t *pwapi_ie; + /** WAPI IE offset in the beacon buffer */ + t_u16 wapi_offset; +#endif + /* Hotspot 2.0 OSEN AKM IE */ + IEEEtypes_Generic_t *posen_ie; + /** osen IE offset in the beacon buffer */ + t_u16 osen_offset; + /* Mobility domain IE */ + IEEEtypes_MobilityDomain_t *pmd_ie; + /** Mobility domain IE offset in the beacon buffer */ + t_u16 md_offset; + + /** Pointer to the returned scan response */ + t_u8 *pbeacon_buf; + /** Length of the stored scan response */ + t_u32 beacon_buf_size; + /** Max allocated size for updated scan response */ + t_u32 beacon_buf_size_max; + +} BSSDescriptor_t, *pBSSDescriptor_t; + +#endif /* !_MLAN_IEEE_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_init.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_init.c new file mode 100644 index 00000000..97ad1f96 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_init.c @@ -0,0 +1,1276 @@ +/** @file mlan_init.c + * + * @brief This file contains the initialization for FW + * and HW. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/******************************************************** +Change log: + 10/13/2008: initial version +********************************************************/ + +#include "mlan.h" +#ifdef STA_SUPPORT +#include "mlan_join.h" +#endif +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_init.h" +#include "mlan_wmm.h" +#include "mlan_11n.h" +#include "mlan_11ac.h" +#include "mlan_11h.h" +#include "mlan_meas.h" +#include "mlan_sdio.h" + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ + +/** + * @brief This function adds a BSS priority table + * + * @param priv A pointer to mlan_private structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_add_bsspriotbl(pmlan_private priv) +{ + pmlan_adapter pmadapter = priv->adapter; + mlan_bssprio_node *pbssprio = MNULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + status = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle, + sizeof(mlan_bssprio_node), + MLAN_MEM_DEF, + (t_u8 **)&pbssprio); + if (status) { + PRINTM(MERROR, "Failed to allocate bsspriotbl\n"); + LEAVE(); + return status; + } + + pbssprio->priv = priv; + + util_init_list((pmlan_linked_list)pbssprio); + + if (!pmadapter->bssprio_tbl[priv->bss_priority].bssprio_cur) + pmadapter->bssprio_tbl[priv->bss_priority].bssprio_cur + = pbssprio; + + util_enqueue_list_tail(pmadapter->pmoal_handle, + &pmadapter->bssprio_tbl[priv->bss_priority]. + bssprio_head, (pmlan_linked_list)pbssprio, + pmadapter->callbacks.moal_spin_lock, + pmadapter->callbacks.moal_spin_unlock); + + LEAVE(); + return status; +} + +/** + * @brief This function deletes the BSS priority table + * + * @param priv A pointer to mlan_private structure + * + * @return N/A + */ +static t_void +wlan_delete_bsspriotbl(pmlan_private priv) +{ + int i; + pmlan_adapter pmadapter = priv->adapter; + mlan_bssprio_node *pbssprio_node = MNULL, *ptmp_node = MNULL, **ppcur = + MNULL; + pmlan_list_head phead; + + ENTER(); + + for (i = 0; i < pmadapter->priv_num; ++i) { + phead = &pmadapter->bssprio_tbl[i].bssprio_head; + ppcur = &pmadapter->bssprio_tbl[i].bssprio_cur; + PRINTM(MINFO, + "Delete BSS priority table, index = %d, i = %d, phead = %p, pcur = %p\n", + priv->bss_index, i, phead, *ppcur); + if (*ppcur) { + pbssprio_node = + (mlan_bssprio_node *)util_peek_list(pmadapter-> + pmoal_handle, + phead, + pmadapter-> + callbacks. + moal_spin_lock, + pmadapter-> + callbacks. + moal_spin_unlock); + while (pbssprio_node && + ((pmlan_list_head)pbssprio_node != phead)) { + ptmp_node = pbssprio_node->pnext; + if (pbssprio_node->priv == priv) { + PRINTM(MINFO, + "Delete node, pnode = %p, pnext = %p\n", + pbssprio_node, ptmp_node); + util_unlink_list(pmadapter-> + pmoal_handle, phead, + (pmlan_linked_list) + pbssprio_node, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + pmadapter->callbacks. + moal_mfree(pmadapter-> + pmoal_handle, + (t_u8 *) + pbssprio_node); + } + pbssprio_node = ptmp_node; + } + *ppcur = (mlan_bssprio_node *)phead; + } + } + + LEAVE(); +} + +/******************************************************** + Global Functions +********************************************************/ + +/** + * @brief This function allocates buffer for the members of adapter + * structure like command buffer and BSSID list. + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_allocate_adapter(pmlan_adapter pmadapter) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; +#ifdef STA_SUPPORT + t_u32 buf_size; + BSSDescriptor_t *ptemp_scan_table = MNULL; + t_u8 chan_2g[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; + t_u8 chan_5g[] = { + 12, 16, 34, 38, 42, 46, 36, 40, 44, + 48, 52, 56, 60, 64, 100, 104, 108, + 112, 116, 120, 124, 128, 132, 136, + 140, 144, 149, 153, 157, 161, 165 + }; +#endif + t_u32 max_mp_regs = pmadapter->psdio_device->reg->max_mp_regs; +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + t_u32 mp_tx_aggr_buf_size = + pmadapter->psdio_device->mp_tx_aggr_buf_size; + t_u32 mp_rx_aggr_buf_size = + pmadapter->psdio_device->mp_rx_aggr_buf_size; +#endif + + ENTER(); + +#ifdef STA_SUPPORT + /* Allocate buffer to store the BSSID list */ + buf_size = sizeof(BSSDescriptor_t) * MRVDRV_MAX_BSSID_LIST; + if (pmadapter->callbacks.moal_vmalloc && + pmadapter->callbacks.moal_vfree) + ret = pmadapter->callbacks.moal_vmalloc(pmadapter->pmoal_handle, + buf_size, + (t_u8 **) + &ptemp_scan_table); + else + ret = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle, + buf_size, MLAN_MEM_DEF, + (t_u8 **) + &ptemp_scan_table); + if (ret != MLAN_STATUS_SUCCESS || !ptemp_scan_table) { + PRINTM(MERROR, "Failed to allocate scan table\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + pmadapter->pscan_table = ptemp_scan_table; + if (pmadapter->callbacks.moal_vmalloc && + pmadapter->callbacks.moal_vfree) + ret = pmadapter->callbacks.moal_vmalloc(pmadapter->pmoal_handle, + DEFAULT_SCAN_BEACON_BUFFER, + (t_u8 **)&pmadapter-> + bcn_buf); + else + ret = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle, + DEFAULT_SCAN_BEACON_BUFFER, + MLAN_MEM_DEF, + (t_u8 **)&pmadapter-> + bcn_buf); + if (ret != MLAN_STATUS_SUCCESS || !pmadapter->bcn_buf) { + PRINTM(MERROR, "Failed to allocate bcn buf\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + pmadapter->bcn_buf_size = DEFAULT_SCAN_BEACON_BUFFER; + + pmadapter->num_in_chan_stats = sizeof(chan_2g); + pmadapter->num_in_chan_stats += sizeof(chan_5g); + buf_size = sizeof(ChanStatistics_t) * pmadapter->num_in_chan_stats; + if (pmadapter->callbacks.moal_vmalloc && + pmadapter->callbacks.moal_vfree) + ret = pmadapter->callbacks.moal_vmalloc(pmadapter->pmoal_handle, + buf_size, + (t_u8 **)&pmadapter-> + pchan_stats); + else + ret = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle, + buf_size, MLAN_MEM_DEF, + (t_u8 **)&pmadapter-> + pchan_stats); + if (ret != MLAN_STATUS_SUCCESS || !pmadapter->pchan_stats) { + PRINTM(MERROR, "Failed to allocate channel statistics\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } +#endif + + /* Allocate command buffer */ + ret = wlan_alloc_cmd_buffer(pmadapter); + if (ret != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "Failed to allocate command buffer\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + ret = pmadapter->callbacks.moal_malloc(pmadapter->pmoal_handle, + max_mp_regs + DMA_ALIGNMENT, + MLAN_MEM_DEF | MLAN_MEM_DMA, + (t_u8 **)&pmadapter-> + mp_regs_buf); + if (ret != MLAN_STATUS_SUCCESS || !pmadapter->mp_regs_buf) { + PRINTM(MERROR, "Failed to allocate mp_regs_buf\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + pmadapter->mp_regs = + (t_u8 *)ALIGN_ADDR(pmadapter->mp_regs_buf, DMA_ALIGNMENT); + +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + pmadapter->max_sp_tx_size = MAX_SUPPORT_AMSDU_SIZE; + pmadapter->max_sp_rx_size = MAX_SUPPORT_AMSDU_SIZE; + ret = wlan_alloc_sdio_mpa_buffers(pmadapter, mp_tx_aggr_buf_size, + mp_rx_aggr_buf_size); + if (ret != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "Failed to allocate sdio mp-a buffers\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + if (mlan_drvdbg & MMPA_D) { + pmadapter->mpa_buf_size = + SDIO_MP_DBG_NUM * + pmadapter->psdio_device->mp_aggr_pkt_limit * + MLAN_SDIO_BLOCK_SIZE; + if (pmadapter->callbacks.moal_vmalloc && + pmadapter->callbacks.moal_vfree) + ret = pmadapter->callbacks.moal_vmalloc(pmadapter-> + pmoal_handle, + pmadapter-> + mpa_buf_size, + (t_u8 **) + &pmadapter-> + mpa_buf); + else + ret = pmadapter->callbacks.moal_malloc(pmadapter-> + pmoal_handle, + pmadapter-> + mpa_buf_size, + MLAN_MEM_DEF, + (t_u8 **) + &pmadapter-> + mpa_buf); + if (ret != MLAN_STATUS_SUCCESS || !pmadapter->mpa_buf) { + PRINTM(MERROR, "Failed to allocate mpa buf\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + } +#endif + + pmadapter->psleep_cfm = + wlan_alloc_mlan_buffer(pmadapter, + sizeof(opt_sleep_confirm_buffer), 0, + MOAL_MALLOC_BUFFER); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function initializes the private structure + * and sets default values to the members of mlan_private. + * + * @param priv A pointer to mlan_private structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_init_priv(pmlan_private priv) +{ + t_u32 i; + pmlan_adapter pmadapter = priv->adapter; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + priv->media_connected = MFALSE; + memset(pmadapter, priv->curr_addr, 0xff, MLAN_MAC_ADDR_LENGTH); + +#ifdef STA_SUPPORT + priv->pkt_tx_ctrl = 0; + priv->bss_mode = MLAN_BSS_MODE_INFRA; + priv->data_rate = 0; /* Initially indicate the rate as auto */ + priv->is_data_rate_auto = MTRUE; + priv->bcn_avg_factor = DEFAULT_BCN_AVG_FACTOR; + priv->data_avg_factor = DEFAULT_DATA_AVG_FACTOR; + + priv->sec_info.wep_status = Wlan802_11WEPDisabled; + priv->sec_info.authentication_mode = MLAN_AUTH_MODE_AUTO; + priv->sec_info.encryption_mode = MLAN_ENCRYPTION_MODE_NONE; + for (i = 0; i < MRVL_NUM_WEP_KEY; i++) + memset(pmadapter, &priv->wep_key[i], 0, sizeof(mrvl_wep_key_t)); + priv->wep_key_curr_index = 0; + priv->ewpa_query = MFALSE; + priv->adhoc_aes_enabled = MFALSE; + priv->curr_pkt_filter = + HostCmd_ACT_MAC_STATIC_DYNAMIC_BW_ENABLE | + HostCmd_ACT_MAC_RTS_CTS_ENABLE | + HostCmd_ACT_MAC_RX_ON | HostCmd_ACT_MAC_TX_ON | + HostCmd_ACT_MAC_ETHERNETII_ENABLE; + + priv->beacon_period = MLAN_BEACON_INTERVAL; + priv->pattempted_bss_desc = MNULL; + memset(pmadapter, &priv->curr_bss_params, 0, + sizeof(priv->curr_bss_params)); + priv->listen_interval = MLAN_DEFAULT_LISTEN_INTERVAL; + + memset(pmadapter, &priv->assoc_rsp_buf, 0, sizeof(priv->assoc_rsp_buf)); + priv->assoc_rsp_size = 0; + + wlan_11d_priv_init(priv); + wlan_11h_priv_init(priv); +#ifdef UAP_SUPPORT + priv->uap_bss_started = MFALSE; + memset(pmadapter, &priv->uap_state_chan_cb, 0, + sizeof(priv->uap_state_chan_cb)); +#endif +#if defined(UAP_SUPPORT) + priv->num_drop_pkts = 0; +#endif +#if defined(STA_SUPPORT) + priv->adhoc_state_prev = ADHOC_IDLE; + memset(pmadapter, &priv->adhoc_last_start_ssid, 0, + sizeof(priv->adhoc_last_start_ssid)); +#endif + priv->adhoc_channel = DEFAULT_AD_HOC_CHANNEL; + priv->atim_window = 0; + priv->adhoc_state = ADHOC_IDLE; + priv->tx_power_level = 0; + priv->max_tx_power_level = 0; + priv->min_tx_power_level = 0; + priv->tx_rate = 0; + priv->rxpd_rate_info = 0; + /* refer to V15 CMD_TX_RATE_QUERY */ + priv->rxpd_vhtinfo = 0; + priv->rxpd_rate = 0; + priv->rate_bitmap = 0; + priv->data_rssi_last = 0; + priv->data_rssi_avg = 0; + priv->data_nf_avg = 0; + priv->data_nf_last = 0; + priv->bcn_rssi_last = 0; + priv->bcn_rssi_avg = 0; + priv->bcn_nf_avg = 0; + priv->bcn_nf_last = 0; + + priv->sec_info.ewpa_enabled = MFALSE; + priv->sec_info.wpa_enabled = MFALSE; + priv->sec_info.wpa2_enabled = MFALSE; + memset(pmadapter, &priv->wpa_ie, 0, sizeof(priv->wpa_ie)); + memset(pmadapter, &priv->aes_key, 0, sizeof(priv->aes_key)); + priv->wpa_ie_len = 0; + priv->wpa_is_gtk_set = MFALSE; +#if defined(STA_SUPPORT) + priv->pmfcfg.mfpc = 0; + priv->pmfcfg.mfpr = 0; +#endif + priv->sec_info.wapi_enabled = MFALSE; + priv->wapi_ie_len = 0; + priv->sec_info.wapi_key_on = MFALSE; + + memset(pmadapter, &priv->wps, 0, sizeof(priv->wps)); + memset(pmadapter, &priv->gen_ie_buf, 0, sizeof(priv->gen_ie_buf)); + priv->gen_ie_buf_len = 0; +#endif /* STA_SUPPORT */ + priv->wmm_required = MTRUE; + priv->wmm_enabled = MFALSE; + priv->wmm_qosinfo = 0; + priv->saved_wmm_qosinfo = 0; + priv->txaggrctrl = MTRUE; +#ifdef STA_SUPPORT + priv->pcurr_bcn_buf = MNULL; + priv->curr_bcn_size = 0; + memset(pmadapter, &priv->ext_cap, 0, sizeof(priv->ext_cap)); + SET_EXTCAP_OPERMODENTF(priv->ext_cap); +#endif /* STA_SUPPORT */ + + for (i = 0; i < MAX_NUM_TID; i++) + priv->addba_reject[i] = ADDBA_RSP_STATUS_ACCEPT; + priv->addba_reject[6] = ADDBA_RSP_STATUS_REJECT; + priv->addba_reject[7] = ADDBA_RSP_STATUS_REJECT; + priv->max_amsdu = 0; +#ifdef STA_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_STA) { + priv->add_ba_param.tx_win_size = + pmadapter->psdio_device->ampdu_info-> + ampdu_sta_txwinsize; + priv->add_ba_param.rx_win_size = MLAN_STA_AMPDU_DEF_RXWINSIZE; + } +#endif +#ifdef WIFI_DIRECT_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) { + priv->add_ba_param.tx_win_size = + pmadapter->psdio_device->ampdu_info-> + ampdu_wfd_txrxwinsize; + priv->add_ba_param.rx_win_size = + pmadapter->psdio_device->ampdu_info-> + ampdu_wfd_txrxwinsize; + } +#endif +#ifdef UAP_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_UAP) { + priv->add_ba_param.tx_win_size = + pmadapter->psdio_device->ampdu_info-> + ampdu_uap_txwinsize; + priv->add_ba_param.rx_win_size = + pmadapter->psdio_device->ampdu_info-> + ampdu_uap_rxwinsize; + priv->aggr_prio_tbl[6].ampdu_user = + priv->aggr_prio_tbl[7].ampdu_user = + BA_STREAM_NOT_ALLOWED; + } +#endif + + priv->port_ctrl_mode = MTRUE; + + priv->port_open = MFALSE; + + ret = wlan_add_bsspriotbl(priv); + + priv->usr_dev_mcs_support = 0; + priv->usr_dot_11n_dev_cap_bg = 0; + priv->usr_dot_11n_dev_cap_a = 0; + priv->usr_dot_11ac_mcs_support = 0; + priv->usr_dot_11ac_dev_cap_bg = 0; + priv->usr_dot_11ac_dev_cap_a = 0; + + LEAVE(); + return ret; +} + +/** + * @brief This function initializes the adapter structure + * and sets default values to the members of adapter. + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return N/A + */ +t_void +wlan_init_adapter(pmlan_adapter pmadapter) +{ + opt_sleep_confirm_buffer *sleep_cfm_buf = MNULL; + ENTER(); + + sleep_cfm_buf = + (opt_sleep_confirm_buffer *)(pmadapter->psleep_cfm->pbuf + + pmadapter->psleep_cfm-> + data_offset); + +#ifdef MFG_CMD_SUPPORT + if (pmadapter->init_para.mfg_mode == MLAN_INIT_PARA_DISABLED) + pmadapter->mfg_mode = MFALSE; + else + pmadapter->mfg_mode = pmadapter->init_para.mfg_mode; +#endif + + pmadapter->int_mode = pmadapter->init_para.int_mode; + pmadapter->gpio_pin = pmadapter->init_para.gpio_pin; + +#if defined(STA_SUPPORT) + pmadapter->pwarm_reset_ioctl_req = MNULL; +#endif + pmadapter->cmd_sent = MFALSE; + pmadapter->data_sent = MTRUE; + pmadapter->mp_rd_bitmap = 0; + pmadapter->mp_wr_bitmap = 0; + if (pmadapter->psdio_device->supports_sdio_new_mode) { + pmadapter->curr_rd_port = 0; + pmadapter->curr_wr_port = 0; + } else { + pmadapter->curr_rd_port = 1; + pmadapter->curr_wr_port = 1; + } + pmadapter->mp_data_port_mask = + pmadapter->psdio_device->reg->data_port_mask; + pmadapter->mp_invalid_update = 0; + memset(pmadapter, pmadapter->mp_update, 0, + sizeof(pmadapter->mp_update)); +#ifdef SDIO_MULTI_PORT_TX_AGGR + pmadapter->mpa_tx.buf_len = 0; + pmadapter->mpa_tx.pkt_cnt = 0; + pmadapter->mpa_tx.start_port = 0; + + if (!pmadapter->init_para.mpa_tx_cfg) + pmadapter->mpa_tx.enabled = MFALSE; + else if (pmadapter->init_para.mpa_tx_cfg == MLAN_INIT_PARA_DISABLED) + pmadapter->mpa_tx.enabled = MFALSE; + else + pmadapter->mpa_tx.enabled = MTRUE; + pmadapter->mpa_tx.pkt_aggr_limit = + pmadapter->psdio_device->mp_aggr_pkt_limit; +#endif /* SDIO_MULTI_PORT_TX_AGGR */ + +#ifdef SDIO_MULTI_PORT_RX_AGGR + pmadapter->mpa_rx.buf_len = 0; + pmadapter->mpa_rx.pkt_cnt = 0; + pmadapter->mpa_rx.start_port = 0; + + if (!pmadapter->init_para.mpa_rx_cfg) + pmadapter->mpa_rx.enabled = MFALSE; + else if (pmadapter->init_para.mpa_rx_cfg == MLAN_INIT_PARA_DISABLED) + pmadapter->mpa_rx.enabled = MFALSE; + else + pmadapter->mpa_rx.enabled = MTRUE; + pmadapter->mpa_rx.pkt_aggr_limit = + pmadapter->psdio_device->mp_aggr_pkt_limit; + +#endif /* SDIO_MULTI_PORT_RX_AGGR */ + + pmadapter->rx_pkts_queued = 0; + pmadapter->cmd_resp_received = MFALSE; + pmadapter->event_received = MFALSE; + pmadapter->data_received = MFALSE; + + pmadapter->cmd_timer_is_set = MFALSE; + + /* PnP and power profile */ + pmadapter->surprise_removed = MFALSE; + + /* Status variables */ + pmadapter->hw_status = WlanHardwareStatusInitializing; + + if (!pmadapter->init_para.ps_mode) { + pmadapter->ps_mode = DEFAULT_PS_MODE; + } else if (pmadapter->init_para.ps_mode == MLAN_INIT_PARA_DISABLED) + pmadapter->ps_mode = Wlan802_11PowerModeCAM; + else + pmadapter->ps_mode = Wlan802_11PowerModePSP; + pmadapter->ps_state = PS_STATE_AWAKE; + pmadapter->need_to_wakeup = MFALSE; + +#ifdef STA_SUPPORT + pmadapter->scan_block = MFALSE; + /* Scan type */ + pmadapter->scan_type = MLAN_SCAN_TYPE_ACTIVE; + /* Scan mode */ + pmadapter->scan_mode = HostCmd_BSS_MODE_ANY; + /* Scan time */ + pmadapter->specific_scan_time = MRVDRV_SPECIFIC_SCAN_CHAN_TIME; + pmadapter->active_scan_time = MRVDRV_ACTIVE_SCAN_CHAN_TIME; + pmadapter->passive_scan_time = MRVDRV_PASSIVE_SCAN_CHAN_TIME; + + pmadapter->num_in_scan_table = 0; + memset(pmadapter, pmadapter->pscan_table, 0, + (sizeof(BSSDescriptor_t) * MRVDRV_MAX_BSSID_LIST)); + pmadapter->ext_scan = pmadapter->psdio_device->ext_scan; + pmadapter->scan_probes = DEFAULT_PROBES; + + memset(pmadapter, pmadapter->bcn_buf, 0, pmadapter->bcn_buf_size); + pmadapter->pbcn_buf_end = pmadapter->bcn_buf; + + pmadapter->radio_on = RADIO_ON; + pmadapter->multiple_dtim = MRVDRV_DEFAULT_MULTIPLE_DTIM; + + pmadapter->local_listen_interval = 0; /* default value in firmware + will be used */ +#endif /* STA_SUPPORT */ + + pmadapter->is_deep_sleep = MFALSE; + pmadapter->idle_time = DEEP_SLEEP_IDLE_TIME; + if (!pmadapter->init_para.auto_ds) + pmadapter->init_auto_ds = DEFAULT_AUTO_DS_MODE; + else if (pmadapter->init_para.auto_ds == MLAN_INIT_PARA_DISABLED) + pmadapter->init_auto_ds = MFALSE; + else + pmadapter->init_auto_ds = MTRUE; + + pmadapter->delay_null_pkt = MFALSE; + pmadapter->delay_to_ps = DELAY_TO_PS_DEFAULT; + pmadapter->enhanced_ps_mode = PS_MODE_AUTO; + + pmadapter->gen_null_pkt = MFALSE; /* Disable NULL Pkt + generation-default */ + pmadapter->pps_uapsd_mode = MFALSE; /* Disable pps/uapsd mode + -default */ + + pmadapter->pm_wakeup_card_req = MFALSE; + + pmadapter->pm_wakeup_fw_try = MFALSE; + + if (!pmadapter->init_para.max_tx_buf) + pmadapter->max_tx_buf_size = + pmadapter->psdio_device->max_tx_buf_size; + else + pmadapter->max_tx_buf_size = + (t_u16)pmadapter->init_para.max_tx_buf; + pmadapter->tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K; + pmadapter->curr_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K; + + pmadapter->is_hs_configured = MFALSE; + pmadapter->hs_cfg.conditions = HOST_SLEEP_DEF_COND; + pmadapter->hs_cfg.gpio = HOST_SLEEP_DEF_GPIO; + pmadapter->hs_cfg.gap = HOST_SLEEP_DEF_GAP; + pmadapter->hs_activated = MFALSE; + pmadapter->min_wake_holdoff = HOST_SLEEP_DEF_WAKE_HOLDOFF; + + memset(pmadapter, pmadapter->event_body, 0, + sizeof(pmadapter->event_body)); + pmadapter->hw_dot_11n_dev_cap = 0; + pmadapter->hw_dev_mcs_support = 0; + pmadapter->coex_rx_winsize = 1; +#ifdef STA_SUPPORT + pmadapter->chan_bandwidth = 0; + pmadapter->adhoc_11n_enabled = MFALSE; + pmadapter->tdls_status = TDLS_NOT_SETUP; +#endif /* STA_SUPPORT */ + + pmadapter->hw_dot_11ac_dev_cap = 0; + pmadapter->hw_dot_11ac_mcs_support = 0; + + /* Initialize 802.11d */ + wlan_11d_init(pmadapter); + + wlan_11h_init(pmadapter); + + wlan_wmm_init(pmadapter); + pmadapter->bypass_pkt_count = 0; + if (pmadapter->psleep_cfm) { + pmadapter->psleep_cfm->buf_type = MLAN_BUF_TYPE_CMD; + pmadapter->psleep_cfm->data_len = sizeof(OPT_Confirm_Sleep); + memset(pmadapter, &sleep_cfm_buf->ps_cfm_sleep, 0, + sizeof(OPT_Confirm_Sleep)); + sleep_cfm_buf->ps_cfm_sleep.command = + wlan_cpu_to_le16(HostCmd_CMD_802_11_PS_MODE_ENH); + sleep_cfm_buf->ps_cfm_sleep.size = + wlan_cpu_to_le16(sizeof(OPT_Confirm_Sleep)); + sleep_cfm_buf->ps_cfm_sleep.result = 0; + sleep_cfm_buf->ps_cfm_sleep.action = + wlan_cpu_to_le16(SLEEP_CONFIRM); + sleep_cfm_buf->ps_cfm_sleep.sleep_cfm.resp_ctrl = + wlan_cpu_to_le16(RESP_NEEDED); + } + memset(pmadapter, &pmadapter->sleep_params, 0, + sizeof(pmadapter->sleep_params)); + memset(pmadapter, &pmadapter->sleep_period, 0, + sizeof(pmadapter->sleep_period)); + memset(pmadapter, &pmadapter->saved_sleep_period, 0, + sizeof(pmadapter->saved_sleep_period)); + pmadapter->tx_lock_flag = MFALSE; + pmadapter->null_pkt_interval = 0; + pmadapter->fw_bands = 0; + pmadapter->config_bands = 0; + pmadapter->adhoc_start_band = 0; + pmadapter->pscan_channels = MNULL; + pmadapter->fw_release_number = 0; + pmadapter->fw_cap_info = 0; + memset(pmadapter, &pmadapter->upld_buf, 0, sizeof(pmadapter->upld_buf)); + pmadapter->upld_len = 0; + pmadapter->event_cause = 0; + pmadapter->pmlan_buffer_event = MNULL; + memset(pmadapter, &pmadapter->region_channel, 0, + sizeof(pmadapter->region_channel)); + pmadapter->region_code = 0; + memcpy(pmadapter, pmadapter->country_code, MRVDRV_DEFAULT_COUNTRY_CODE, + COUNTRY_CODE_LEN); + pmadapter->bcn_miss_time_out = DEFAULT_BCN_MISS_TIMEOUT; + pmadapter->adhoc_awake_period = 0; +#ifdef STA_SUPPORT + memset(pmadapter, &pmadapter->arp_filter, 0, + sizeof(pmadapter->arp_filter)); + pmadapter->arp_filter_size = 0; +#endif /* STA_SUPPORT */ + + pmadapter->mc_status = MFALSE; + + LEAVE(); + return; +} + +/** + * @brief This function intializes the lock variables and + * the list heads. + * + * @param pmadapter A pointer to a mlan_adapter structure + * + * @return MLAN_STATUS_SUCCESS -- on success, + * otherwise MLAN_STATUS_FAILURE + * + */ +mlan_status +wlan_init_lock_list(IN pmlan_adapter pmadapter) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private priv = MNULL; + pmlan_callbacks pcb = &pmadapter->callbacks; + t_s32 i = 0; + t_u32 j = 0; + + ENTER(); + + if (pcb->moal_init_lock(pmadapter->pmoal_handle, &pmadapter->pmlan_lock) + != MLAN_STATUS_SUCCESS) { + ret = MLAN_STATUS_FAILURE; + goto error; + } + if (pcb->moal_init_lock(pmadapter->pmoal_handle, &pmadapter->pint_lock) + != MLAN_STATUS_SUCCESS) { + ret = MLAN_STATUS_FAILURE; + goto error; + } + if (pcb-> + moal_init_lock(pmadapter->pmoal_handle, &pmadapter->pmain_proc_lock) + != MLAN_STATUS_SUCCESS) { + ret = MLAN_STATUS_FAILURE; + goto error; + } + if (pcb-> + moal_init_lock(pmadapter->pmoal_handle, &pmadapter->prx_proc_lock) + != MLAN_STATUS_SUCCESS) { + ret = MLAN_STATUS_FAILURE; + goto error; + } + if (pcb-> + moal_init_lock(pmadapter->pmoal_handle, &pmadapter->pmlan_cmd_lock) + != MLAN_STATUS_SUCCESS) { + ret = MLAN_STATUS_FAILURE; + goto error; + } + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) { + priv = pmadapter->priv[i]; + if (pcb-> + moal_init_lock(pmadapter->pmoal_handle, + &priv->rx_pkt_lock) + != MLAN_STATUS_SUCCESS) { + ret = MLAN_STATUS_FAILURE; + goto error; + } + if (pcb-> + moal_init_lock(pmadapter->pmoal_handle, + &priv->wmm.ra_list_spinlock) + != MLAN_STATUS_SUCCESS) { + ret = MLAN_STATUS_FAILURE; + goto error; + } +#ifdef STA_SUPPORT + if (pcb-> + moal_init_lock(pmadapter->pmoal_handle, + &priv->curr_bcn_buf_lock) + != MLAN_STATUS_SUCCESS) { + ret = MLAN_STATUS_FAILURE; + goto error; + } +#endif + } + } + + util_init_list_head((t_void *)pmadapter->pmoal_handle, + &pmadapter->rx_data_queue, MTRUE, + pmadapter->callbacks.moal_init_lock); + util_scalar_init((t_void *)pmadapter->pmoal_handle, + &pmadapter->pending_bridge_pkts, 0, + MNULL, pmadapter->callbacks.moal_init_lock); + /* Initialize cmd_free_q */ + util_init_list_head((t_void *)pmadapter->pmoal_handle, + &pmadapter->cmd_free_q, MTRUE, + pmadapter->callbacks.moal_init_lock); + /* Initialize cmd_pending_q */ + util_init_list_head((t_void *)pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, MTRUE, + pmadapter->callbacks.moal_init_lock); + /* Initialize scan_pending_q */ + util_init_list_head((t_void *)pmadapter->pmoal_handle, + &pmadapter->scan_pending_q, MTRUE, + pmadapter->callbacks.moal_init_lock); + + for (i = 0; i < pmadapter->priv_num; ++i) { + util_init_list_head((t_void *)pmadapter->pmoal_handle, + &pmadapter->bssprio_tbl[i].bssprio_head, + MTRUE, pmadapter->callbacks.moal_init_lock); + pmadapter->bssprio_tbl[i].bssprio_cur = MNULL; + } + + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) { + priv = pmadapter->priv[i]; + for (j = 0; j < MAX_NUM_TID; ++j) { + util_init_list_head((t_void *)pmadapter-> + pmoal_handle, + &priv->wmm.tid_tbl_ptr[j]. + ra_list, MTRUE, + priv->adapter->callbacks. + moal_init_lock); + } + util_init_list_head((t_void *)pmadapter->pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, MTRUE, + pmadapter->callbacks. + moal_init_lock); + util_init_list_head((t_void *)pmadapter->pmoal_handle, + &priv->rx_reorder_tbl_ptr, MTRUE, + pmadapter->callbacks. + moal_init_lock); + util_scalar_init((t_void *)pmadapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, 0, + priv->wmm.ra_list_spinlock, + pmadapter->callbacks.moal_init_lock); + util_scalar_init((t_void *)pmadapter->pmoal_handle, + &priv->wmm.highest_queued_prio, + HIGH_PRIO_TID, + priv->wmm.ra_list_spinlock, + pmadapter->callbacks.moal_init_lock); + util_init_list_head((t_void *)pmadapter->pmoal_handle, + &priv->sta_list, MTRUE, + pmadapter->callbacks. + moal_init_lock); + /* Initialize tdls_pending_txq */ + util_init_list_head((t_void *)pmadapter->pmoal_handle, + &priv->tdls_pending_txq, MTRUE, + pmadapter->callbacks. + moal_init_lock); + /* Initialize bypass_txq */ + util_init_list_head((t_void *)pmadapter->pmoal_handle, + &priv->bypass_txq, MTRUE, + pmadapter->callbacks. + moal_init_lock); + } + } + +error: + LEAVE(); + return ret; +} + +/** + * @brief This function releases the lock variables + * + * @param pmadapter A pointer to a mlan_adapter structure + * + * @return None + * + */ +t_void +wlan_free_lock_list(IN pmlan_adapter pmadapter) +{ + pmlan_private priv = MNULL; + pmlan_callbacks pcb = &pmadapter->callbacks; + t_s32 i = 0; + t_s32 j = 0; + + ENTER(); + + if (pmadapter->pmlan_lock) + pcb->moal_free_lock(pmadapter->pmoal_handle, + pmadapter->pmlan_lock); + if (pmadapter->pint_lock) + pcb->moal_free_lock(pmadapter->pmoal_handle, + pmadapter->pint_lock); + if (pmadapter->prx_proc_lock) + pcb->moal_free_lock(pmadapter->pmoal_handle, + pmadapter->prx_proc_lock); + if (pmadapter->pmain_proc_lock) + pcb->moal_free_lock(pmadapter->pmoal_handle, + pmadapter->pmain_proc_lock); + if (pmadapter->pmlan_cmd_lock) + pcb->moal_free_lock(pmadapter->pmoal_handle, + pmadapter->pmlan_cmd_lock); + + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) { + priv = pmadapter->priv[i]; + if (priv->rx_pkt_lock) + pcb->moal_free_lock(pmadapter->pmoal_handle, + priv->rx_pkt_lock); + if (priv->wmm.ra_list_spinlock) + pcb->moal_free_lock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); +#ifdef STA_SUPPORT + if (priv->curr_bcn_buf_lock) + pcb->moal_free_lock(pmadapter->pmoal_handle, + priv->curr_bcn_buf_lock); +#endif + } + } + + /* Free lists */ + util_free_list_head((t_void *)pmadapter->pmoal_handle, + &pmadapter->rx_data_queue, pcb->moal_free_lock); + + util_scalar_free((t_void *)pmadapter->pmoal_handle, + &pmadapter->pending_bridge_pkts, pcb->moal_free_lock); + util_free_list_head((t_void *)pmadapter->pmoal_handle, + &pmadapter->cmd_free_q, + pmadapter->callbacks.moal_free_lock); + + util_free_list_head((t_void *)pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + pmadapter->callbacks.moal_free_lock); + + util_free_list_head((t_void *)pmadapter->pmoal_handle, + &pmadapter->scan_pending_q, + pmadapter->callbacks.moal_free_lock); + + for (i = 0; i < pmadapter->priv_num; i++) + util_free_list_head((t_void *)pmadapter->pmoal_handle, + &pmadapter->bssprio_tbl[i].bssprio_head, + pcb->moal_free_lock); + + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) { + priv = pmadapter->priv[i]; + util_free_list_head((t_void *)pmadapter->pmoal_handle, + &priv->sta_list, + priv->adapter->callbacks. + moal_free_lock); + util_free_list_head((t_void *)pmadapter->pmoal_handle, + &priv->tdls_pending_txq, + pmadapter->callbacks. + moal_free_lock); + util_free_list_head((t_void *)pmadapter->pmoal_handle, + &priv->bypass_txq, + pmadapter->callbacks. + moal_free_lock); + + for (j = 0; j < MAX_NUM_TID; ++j) + util_free_list_head((t_void *)priv->adapter-> + pmoal_handle, + &priv->wmm.tid_tbl_ptr[j]. + ra_list, + priv->adapter->callbacks. + moal_free_lock); + util_free_list_head((t_void *)priv->adapter-> + pmoal_handle, + &priv->tx_ba_stream_tbl_ptr, + priv->adapter->callbacks. + moal_free_lock); + util_free_list_head((t_void *)priv->adapter-> + pmoal_handle, + &priv->rx_reorder_tbl_ptr, + priv->adapter->callbacks. + moal_free_lock); + util_scalar_free((t_void *)priv->adapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, + priv->adapter->callbacks. + moal_free_lock); + util_scalar_free((t_void *)priv->adapter->pmoal_handle, + &priv->wmm.highest_queued_prio, + priv->adapter->callbacks. + moal_free_lock); + } + } + + LEAVE(); + return; +} + +/** + * @brief This function intializes the timers + * + * @param pmadapter A pointer to a mlan_adapter structure + * + * @return MLAN_STATUS_SUCCESS -- on success, + * otherwise MLAN_STATUS_FAILURE + * + */ +mlan_status +wlan_init_timer(IN pmlan_adapter pmadapter) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_callbacks pcb = &pmadapter->callbacks; + ENTER(); + + if (pcb-> + moal_init_timer(pmadapter->pmoal_handle, + &pmadapter->pmlan_cmd_timer, wlan_cmd_timeout_func, + pmadapter) + != MLAN_STATUS_SUCCESS) { + ret = MLAN_STATUS_FAILURE; + goto error; + } +error: + LEAVE(); + return ret; +} + +/** + * @brief This function releases the timers + * + * @param pmadapter A pointer to a mlan_adapter structure + * + * @return None + * + */ +t_void +wlan_free_timer(IN pmlan_adapter pmadapter) +{ + pmlan_callbacks pcb = &pmadapter->callbacks; + ENTER(); + + if (pmadapter->pmlan_cmd_timer) + pcb->moal_free_timer(pmadapter->pmoal_handle, + pmadapter->pmlan_cmd_timer); + + LEAVE(); + return; +} + +/** + * @brief This function initializes firmware + * + * @param pmadapter A pointer to mlan_adapter + * + * @return MLAN_STATUS_SUCCESS, MLAN_STATUS_PENDING or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_init_fw(IN pmlan_adapter pmadapter) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private priv = MNULL; + t_u8 i = 0; + + ENTER(); + + /* Initialize adapter structure */ + wlan_init_adapter(pmadapter); + + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) { + priv = pmadapter->priv[i]; + + /* Initialize private structure */ + ret = wlan_init_priv(priv); + if (ret) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + } + } +#ifdef MFG_CMD_SUPPORT + if (pmadapter->mfg_mode != MTRUE) { +#endif + /* Issue firmware initialize commands for first BSS, for other + interfaces it will be called after getting the last init + command response of previous interface */ + priv = wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY); + ret = priv->ops.init_cmd(priv, MTRUE); + if (ret == MLAN_STATUS_FAILURE) + goto done; +#ifdef MFG_CMD_SUPPORT + } +#endif + + if (util_peek_list(pmadapter->pmoal_handle, &pmadapter->cmd_pending_q, + pmadapter->callbacks.moal_spin_lock, + pmadapter->callbacks.moal_spin_unlock)) { + /* Send the first command in queue and return */ + if (mlan_main_process(pmadapter) == MLAN_STATUS_FAILURE) + ret = MLAN_STATUS_FAILURE; + else + ret = MLAN_STATUS_PENDING; + } else { + pmadapter->hw_status = WlanHardwareStatusReady; + } +done: + LEAVE(); + return ret; +} + +/** + * @brief This function frees the structure of adapter + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return N/A + */ +t_void +wlan_free_adapter(pmlan_adapter pmadapter) +{ + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; + ENTER(); + + if (!pmadapter) { + PRINTM(MERROR, "The adapter is NULL\n"); + LEAVE(); + return; + } + + wlan_cancel_all_pending_cmd(pmadapter); + /* Free command buffer */ + PRINTM(MINFO, "Free Command buffer\n"); + wlan_free_cmd_buffer(pmadapter); + + if (pmadapter->cmd_timer_is_set) { + /* Cancel command timeout timer */ + pcb->moal_stop_timer(pmadapter->pmoal_handle, + pmadapter->pmlan_cmd_timer); + pmadapter->cmd_timer_is_set = MFALSE; + } +#ifdef STA_SUPPORT + PRINTM(MINFO, "Free ScanTable\n"); + if (pmadapter->pscan_table) { + if (pcb->moal_vmalloc && pcb->moal_vfree) + pcb->moal_vfree(pmadapter->pmoal_handle, + (t_u8 *)pmadapter->pscan_table); + else + pcb->moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pmadapter->pscan_table); + pmadapter->pscan_table = MNULL; + } + if (pmadapter->pchan_stats) { + if (pcb->moal_vmalloc && pcb->moal_vfree) + pcb->moal_vfree(pmadapter->pmoal_handle, + (t_u8 *)pmadapter->pchan_stats); + else + pcb->moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pmadapter->pchan_stats); + pmadapter->pchan_stats = MNULL; + } + if (pmadapter->bcn_buf) { + if (pcb->moal_vmalloc && pcb->moal_vfree) + pcb->moal_vfree(pmadapter->pmoal_handle, + (t_u8 *)pmadapter->bcn_buf); + else + pcb->moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pmadapter->bcn_buf); + pmadapter->bcn_buf = MNULL; + } +#endif + + wlan_11h_cleanup(pmadapter); + + if (pmadapter->mp_regs_buf) { + pcb->moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pmadapter->mp_regs_buf); + pmadapter->mp_regs_buf = MNULL; + pmadapter->mp_regs = MNULL; + } +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + wlan_free_sdio_mpa_buffers(pmadapter); +#endif + wlan_free_mlan_buffer(pmadapter, pmadapter->psleep_cfm); + pmadapter->psleep_cfm = MNULL; + + LEAVE(); + return; +} + +/** + * @brief This function frees the structure of priv + * + * @param pmpriv A pointer to mlan_private structure + * + * @return N/A + */ +t_void +wlan_free_priv(mlan_private *pmpriv) +{ + ENTER(); + wlan_clean_txrx(pmpriv); + wlan_delete_bsspriotbl(pmpriv); + +#ifdef STA_SUPPORT + wlan_free_curr_bcn(pmpriv); +#endif /* STA_SUPPORT */ + + wlan_delete_station_list(pmpriv); + LEAVE(); +} + +/** + * @brief The cmdresp handler calls this function for init_fw_complete callback + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return MLAN_STATUS_SUCCESS + * The firmware initialization callback succeeded. + */ +mlan_status +wlan_init_fw_complete(IN pmlan_adapter pmadapter) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_callbacks pcb = &pmadapter->callbacks; + + ENTER(); + + /* Check if hardware is ready */ + if (pmadapter->hw_status != WlanHardwareStatusReady) + status = MLAN_STATUS_FAILURE; + + /* Invoke callback */ + ret = pcb->moal_init_fw_complete(pmadapter->pmoal_handle, status); + LEAVE(); + return ret; +} + +/** + * @brief The cmdresp handler calls this function + * for shutdown_fw_complete callback + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return MLAN_STATUS_SUCCESS + * The firmware shutdown callback succeeded. + */ +mlan_status +wlan_shutdown_fw_complete(IN pmlan_adapter pmadapter) +{ + pmlan_callbacks pcb = &pmadapter->callbacks; + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + pmadapter->hw_status = WlanHardwareStatusNotReady; + /* Invoke callback */ + ret = pcb->moal_shutdown_fw_complete(pmadapter->pmoal_handle, status); + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_init.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_init.h new file mode 100644 index 00000000..86d9b4be --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_init.h @@ -0,0 +1,90 @@ +/** @file mlan_init.h + * + * @brief This file defines the FW initialization data + * structures. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 10/13/2008: initial version +******************************************************/ + +#ifndef _MLAN_INIT_H_ +#define _MLAN_INIT_H_ + +/** Tx buffer size for firmware download*/ +#define FW_DNLD_TX_BUF_SIZE 620 +/** Rx buffer size for firmware download*/ +#define FW_DNLD_RX_BUF_SIZE 2048 +/** Max firmware retry */ +#define MAX_FW_RETRY 3 + +/** Firmware has last block */ +#define FW_HAS_LAST_BLOCK 0x00000004 +/** CMD id for CMD7 */ +#define FW_CMD_7 0x00000007 + +/** Firmware data transmit size */ +#define FW_DATA_XMIT_SIZE (sizeof(FWHeader) + DataLength + sizeof(t_u32)) + +/** FWHeader */ +typedef struct _FWHeader { + /** FW download command */ + t_u32 dnld_cmd; + /** FW base address */ + t_u32 base_addr; + /** FW data length */ + t_u32 data_length; + /** FW CRC */ + t_u32 crc; +} FWHeader; + +/** FWData */ +typedef struct _FWData { + /** FW data header */ + FWHeader fw_header; + /** FW data sequence number */ + t_u32 seq_num; + /** FW data buffer */ + t_u8 data[1]; +} FWData; + +/** FWSyncHeader */ +typedef struct _FWSyncHeader { + /** FW sync header command */ + t_u32 cmd; + /** FW sync header sequence number */ + t_u32 seq_num; +} FWSyncHeader; + +#ifdef BIG_ENDIAN_SUPPORT +/** Convert sequence number and command fields + * of fwheader to correct endian format + */ +#define endian_convert_syncfwheader(x) { \ + (x)->cmd = wlan_le32_to_cpu((x)->cmd); \ + (x)->seq_num = wlan_le32_to_cpu((x)->seq_num); \ + } +#else +/** Convert sequence number and command fields + * of fwheader to correct endian format + */ +#define endian_convert_syncfwheader(x) +#endif /* BIG_ENDIAN_SUPPORT */ + +#endif /* _MLAN_INIT_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_ioctl.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_ioctl.h new file mode 100644 index 00000000..709a1efd --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_ioctl.h @@ -0,0 +1,3615 @@ +/** @file mlan_ioctl.h + * + * @brief This file declares the IOCTL data structures and APIs. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 11/07/2008: initial version +******************************************************/ + +#ifndef _MLAN_IOCTL_H_ +#define _MLAN_IOCTL_H_ + +/** Enumeration for IOCTL request ID */ +enum _mlan_ioctl_req_id { + /* Scan Group */ + MLAN_IOCTL_SCAN = 0x00010000, + MLAN_OID_SCAN_NORMAL = 0x00010001, + MLAN_OID_SCAN_SPECIFIC_SSID = 0x00010002, + MLAN_OID_SCAN_USER_CONFIG = 0x00010003, + MLAN_OID_SCAN_CONFIG = 0x00010004, + MLAN_OID_SCAN_GET_CURRENT_BSS = 0x00010005, + MLAN_OID_SCAN_CANCEL = 0x00010006, + MLAN_OID_SCAN_TABLE_FLUSH = 0x0001000A, + MLAN_OID_SCAN_BGSCAN_CONFIG = 0x0001000B, + /* BSS Configuration Group */ + MLAN_IOCTL_BSS = 0x00020000, + MLAN_OID_BSS_START = 0x00020001, + MLAN_OID_BSS_STOP = 0x00020002, + MLAN_OID_BSS_MODE = 0x00020003, + MLAN_OID_BSS_CHANNEL = 0x00020004, + MLAN_OID_BSS_CHANNEL_LIST = 0x00020005, + MLAN_OID_BSS_MAC_ADDR = 0x00020006, + MLAN_OID_BSS_MULTICAST_LIST = 0x00020007, + MLAN_OID_BSS_FIND_BSS = 0x00020008, + MLAN_OID_IBSS_BCN_INTERVAL = 0x00020009, + MLAN_OID_IBSS_ATIM_WINDOW = 0x0002000A, + MLAN_OID_IBSS_CHANNEL = 0x0002000B, +#ifdef UAP_SUPPORT + MLAN_OID_UAP_BSS_CONFIG = 0x0002000C, + MLAN_OID_UAP_DEAUTH_STA = 0x0002000D, + MLAN_OID_UAP_BSS_RESET = 0x0002000E, +#endif +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) + MLAN_OID_BSS_ROLE = 0x0002000F, +#endif +#ifdef WIFI_DIRECT_SUPPORT + MLAN_OID_WIFI_DIRECT_MODE = 0x00020010, +#endif +#ifdef STA_SUPPORT + MLAN_OID_BSS_LISTEN_INTERVAL = 0x00020011, +#endif + MLAN_OID_BSS_REMOVE = 0x00020014, +#ifdef UAP_SUPPORT + MLAN_OID_UAP_CFG_WMM_PARAM = 0x00020015, +#endif + MLAN_OID_BSS_11D_CHECK_CHANNEL = 0x00020016, +#ifdef UAP_SUPPORT + MLAN_OID_UAP_SCAN_CHANNELS = 0x00020018, + MLAN_OID_UAP_CHANNEL = 0x00020019, + MLAN_OID_UAP_OPER_CTRL = 0x0002001A, +#endif + + /* Radio Configuration Group */ + MLAN_IOCTL_RADIO_CFG = 0x00030000, + MLAN_OID_RADIO_CTRL = 0x00030001, + MLAN_OID_BAND_CFG = 0x00030002, + MLAN_OID_ANT_CFG = 0x00030003, +#ifdef WIFI_DIRECT_SUPPORT + MLAN_OID_REMAIN_CHAN_CFG = 0x00030004, +#endif + + /* SNMP MIB Group */ + MLAN_IOCTL_SNMP_MIB = 0x00040000, + MLAN_OID_SNMP_MIB_RTS_THRESHOLD = 0x00040001, + MLAN_OID_SNMP_MIB_FRAG_THRESHOLD = 0x00040002, + MLAN_OID_SNMP_MIB_RETRY_COUNT = 0x00040003, +#if defined(UAP_SUPPORT) + MLAN_OID_SNMP_MIB_DOT11D = 0x00040004, + MLAN_OID_SNMP_MIB_DOT11H = 0x00040005, +#endif + MLAN_OID_SNMP_MIB_DTIM_PERIOD = 0x00040006, + + /* Status Information Group */ + MLAN_IOCTL_GET_INFO = 0x00050000, + MLAN_OID_GET_STATS = 0x00050001, + MLAN_OID_GET_SIGNAL = 0x00050002, + MLAN_OID_GET_FW_INFO = 0x00050003, + MLAN_OID_GET_VER_EXT = 0x00050004, + MLAN_OID_GET_BSS_INFO = 0x00050005, + MLAN_OID_GET_DEBUG_INFO = 0x00050006, +#ifdef UAP_SUPPORT + MLAN_OID_UAP_STA_LIST = 0x00050007, +#endif + + /* Security Configuration Group */ + MLAN_IOCTL_SEC_CFG = 0x00060000, + MLAN_OID_SEC_CFG_AUTH_MODE = 0x00060001, + MLAN_OID_SEC_CFG_ENCRYPT_MODE = 0x00060002, + MLAN_OID_SEC_CFG_WPA_ENABLED = 0x00060003, + MLAN_OID_SEC_CFG_ENCRYPT_KEY = 0x00060004, + MLAN_OID_SEC_CFG_PASSPHRASE = 0x00060005, + MLAN_OID_SEC_CFG_EWPA_ENABLED = 0x00060006, + MLAN_OID_SEC_CFG_ESUPP_MODE = 0x00060007, + MLAN_OID_SEC_CFG_WAPI_ENABLED = 0x00060009, + MLAN_OID_SEC_CFG_PORT_CTRL_ENABLED = 0x0006000A, +#ifdef UAP_SUPPORT + MLAN_OID_SEC_CFG_REPORT_MIC_ERR = 0x0006000B, +#endif + MLAN_OID_SEC_QUERY_KEY = 0x0006000C, + + /* Rate Group */ + MLAN_IOCTL_RATE = 0x00070000, + MLAN_OID_RATE_CFG = 0x00070001, + MLAN_OID_GET_DATA_RATE = 0x00070002, + MLAN_OID_SUPPORTED_RATES = 0x00070003, + + /* Power Configuration Group */ + MLAN_IOCTL_POWER_CFG = 0x00080000, + MLAN_OID_POWER_CFG = 0x00080001, + MLAN_OID_POWER_CFG_EXT = 0x00080002, + + /* Power Management Configuration Group */ + MLAN_IOCTL_PM_CFG = 0x00090000, + MLAN_OID_PM_CFG_IEEE_PS = 0x00090001, + MLAN_OID_PM_CFG_HS_CFG = 0x00090002, + MLAN_OID_PM_CFG_INACTIVITY_TO = 0x00090003, + MLAN_OID_PM_CFG_DEEP_SLEEP = 0x00090004, + MLAN_OID_PM_CFG_SLEEP_PD = 0x00090005, + MLAN_OID_PM_CFG_PS_CFG = 0x00090006, + MLAN_OID_PM_CFG_SLEEP_PARAMS = 0x00090008, +#ifdef UAP_SUPPORT + MLAN_OID_PM_CFG_PS_MODE = 0x00090009, +#endif /* UAP_SUPPORT */ + MLAN_OID_PM_INFO = 0x0009000A, + MLAN_OID_PM_HS_WAKEUP_REASON = 0x0009000B, + + /* WMM Configuration Group */ + MLAN_IOCTL_WMM_CFG = 0x000A0000, + MLAN_OID_WMM_CFG_ENABLE = 0x000A0001, + MLAN_OID_WMM_CFG_QOS = 0x000A0002, + MLAN_OID_WMM_CFG_ADDTS = 0x000A0003, + MLAN_OID_WMM_CFG_DELTS = 0x000A0004, + MLAN_OID_WMM_CFG_QUEUE_CONFIG = 0x000A0005, + MLAN_OID_WMM_CFG_QUEUE_STATS = 0x000A0006, + MLAN_OID_WMM_CFG_QUEUE_STATUS = 0x000A0007, + MLAN_OID_WMM_CFG_TS_STATUS = 0x000A0008, + + /* WPS Configuration Group */ + MLAN_IOCTL_WPS_CFG = 0x000B0000, + MLAN_OID_WPS_CFG_SESSION = 0x000B0001, + + /* 802.11n Configuration Group */ + MLAN_IOCTL_11N_CFG = 0x000C0000, + MLAN_OID_11N_CFG_TX = 0x000C0001, + MLAN_OID_11N_HTCAP_CFG = 0x000C0002, + MLAN_OID_11N_CFG_ADDBA_REJECT = 0x000C0003, + MLAN_OID_11N_CFG_AGGR_PRIO_TBL = 0x000C0004, + MLAN_OID_11N_CFG_ADDBA_PARAM = 0x000C0005, + MLAN_OID_11N_CFG_MAX_TX_BUF_SIZE = 0x000C0006, + MLAN_OID_11N_CFG_AMSDU_AGGR_CTRL = 0x000C0007, + MLAN_OID_11N_CFG_SUPPORTED_MCS_SET = 0x000C0008, + MLAN_OID_11N_CFG_TX_BF_CAP = 0x000C0009, + MLAN_OID_11N_CFG_TX_BF_CFG = 0x000C000A, + MLAN_OID_11N_CFG_STREAM_CFG = 0x000C000B, + MLAN_OID_11N_CFG_DELBA = 0x000C000C, + MLAN_OID_11N_CFG_REJECT_ADDBA_REQ = 0x000C000D, + MLAN_OID_11N_CFG_COEX_RX_WINSIZE = 0x000C000E, + MLAN_OID_11N_CFG_TX_AGGR_CTRL = 0x000C000F, + + /* 802.11d Configuration Group */ + MLAN_IOCTL_11D_CFG = 0x000D0000, +#ifdef STA_SUPPORT + MLAN_OID_11D_CFG_ENABLE = 0x000D0001, + MLAN_OID_11D_CLR_CHAN_TABLE = 0x000D0002, +#endif /* STA_SUPPORT */ + MLAN_OID_11D_DOMAIN_INFO = 0x000D0003, + + /* Register Memory Access Group */ + MLAN_IOCTL_REG_MEM = 0x000E0000, + MLAN_OID_REG_RW = 0x000E0001, + MLAN_OID_EEPROM_RD = 0x000E0002, + MLAN_OID_MEM_RW = 0x000E0003, + + /* Multi-Radio Configuration Group */ + MLAN_IOCTL_MFR_CFG = 0x00100000, + + /* 802.11h Configuration Group */ + MLAN_IOCTL_11H_CFG = 0x00110000, + MLAN_OID_11H_CHANNEL_CHECK = 0x00110001, + MLAN_OID_11H_LOCAL_POWER_CONSTRAINT = 0x00110002, +#if defined(DFS_TESTING_SUPPORT) + MLAN_OID_11H_DFS_TESTING = 0x00110003, +#endif + MLAN_OID_11H_CHAN_REPORT_REQUEST = 0x00110004, + + /* 802.11n Configuration Group RANDYTODO for value assign */ + MLAN_IOCTL_11AC_CFG = 0x00120000, + MLAN_OID_11AC_VHT_CFG = 0x00120001, + MLAN_OID_11AC_CFG_SUPPORTED_MCS_SET = 0x00120002, + + /* Miscellaneous Configuration Group */ + MLAN_IOCTL_MISC_CFG = 0x00200000, + MLAN_OID_MISC_GEN_IE = 0x00200001, + MLAN_OID_MISC_REGION = 0x00200002, + MLAN_OID_MISC_WARM_RESET = 0x00200003, +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + MLAN_OID_MISC_SDIO_MPA_CTRL = 0x00200006, +#endif + MLAN_OID_MISC_HOST_CMD = 0x00200007, + MLAN_OID_MISC_SYS_CLOCK = 0x00200009, + MLAN_OID_MISC_SOFT_RESET = 0x0020000A, + MLAN_OID_MISC_WWS = 0x0020000B, + MLAN_OID_MISC_ASSOC_RSP = 0x0020000C, + MLAN_OID_MISC_INIT_SHUTDOWN = 0x0020000D, + MLAN_OID_MISC_COALESCING_STATUS = 0x0020000E, + MLAN_OID_MISC_CUSTOM_IE = 0x0020000F, + MLAN_OID_MISC_TDLS_CONFIG = 0x00200010, + MLAN_OID_MISC_TX_DATAPAUSE = 0x00200012, + MLAN_OID_MISC_IP_ADDR = 0x00200013, + MLAN_OID_MISC_MAC_CONTROL = 0x00200014, + MLAN_OID_MISC_MEF_CFG = 0x00200015, + MLAN_OID_MISC_CFP_CODE = 0x00200016, + MLAN_OID_MISC_COUNTRY_CODE = 0x00200017, + MLAN_OID_MISC_THERMAL = 0x00200018, + MLAN_OID_MISC_RX_MGMT_IND = 0x00200019, + MLAN_OID_MISC_SUBSCRIBE_EVENT = 0x0020001A, +#ifdef DEBUG_LEVEL1 + MLAN_OID_MISC_DRVDBG = 0x0020001B, +#endif + MLAN_OID_MISC_HOTSPOT_CFG = 0x0020001C, + MLAN_OID_MISC_OTP_USER_DATA = 0x0020001D, + MLAN_OID_MISC_TXCONTROL = 0x00200020, +#ifdef STA_SUPPORT + MLAN_OID_MISC_EXT_CAP_CFG = 0x00200021, +#endif +#if defined(STA_SUPPORT) + MLAN_OID_MISC_PMFCFG = 0x00200022, +#endif + MLAN_OID_MISC_MULTI_CHAN_CFG = 0x00200023, + MLAN_OID_MISC_MULTI_CHAN_POLICY = 0x00200024, +#ifdef WIFI_DIRECT_SUPPORT + MLAN_OID_MISC_WIFI_DIRECT_CONFIG = 0x00200025, +#endif + MLAN_OID_MISC_TDLS_OPER = 0x00200026, + MLAN_OID_MISC_GET_TDLS_IES = 0x00200027, + MLAN_OID_MISC_LOW_PWR_MODE = 0x00200029, +#ifdef RX_PACKET_COALESCE + MLAN_OID_MISC_RX_PACKET_COALESCE = 0x0020002C, +#endif + MLAN_OID_MISC_COALESCE_CFG = 0x0020002E, + MLAN_OID_MISC_TDLS_IDLE_TIME = 0x0020002F, +}; + +/** Sub command size */ +#define MLAN_SUB_COMMAND_SIZE 4 + +/** Enumeration for the action of IOCTL request */ +enum _mlan_act_ioctl { + MLAN_ACT_SET = 1, + MLAN_ACT_GET, + MLAN_ACT_CANCEL +}; + +/** Enumeration for generic enable/disable */ +enum _mlan_act_generic { + MLAN_ACT_DISABLE = 0, + MLAN_ACT_ENABLE = 1 +}; + +/** Enumeration for scan mode */ +enum _mlan_scan_mode { + MLAN_SCAN_MODE_UNCHANGED = 0, + MLAN_SCAN_MODE_BSS, + MLAN_SCAN_MODE_IBSS, + MLAN_SCAN_MODE_ANY +}; + +/** Enumeration for scan type */ +enum _mlan_scan_type { + MLAN_SCAN_TYPE_UNCHANGED = 0, + MLAN_SCAN_TYPE_ACTIVE, + MLAN_SCAN_TYPE_PASSIVE +}; + +/** Max number of supported rates */ +#define MLAN_SUPPORTED_RATES 32 + +/** RSSI scan */ +#define SCAN_RSSI(RSSI) (0x100 - ((t_u8)(RSSI))) + +/** Max passive scan time for each channel in milliseconds */ +#define MRVDRV_MAX_PASSIVE_SCAN_CHAN_TIME 2000 + +/** Max active scan time for each channel in milliseconds */ +#define MRVDRV_MAX_ACTIVE_SCAN_CHAN_TIME 500 + +/** Maximum number of probes to send on each channel */ +#define MAX_PROBES 4 + +/** Default number of probes to send on each channel */ +#define DEFAULT_PROBES 4 + +/** + * @brief Sub-structure passed in wlan_ioctl_get_scan_table_entry for each BSS + * + * Fixed field information returned for the scan response in the IOCTL + * response. + */ +typedef struct _wlan_get_scan_table_fixed { + /** BSSID of this network */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; + /** Channel this beacon/probe response was detected */ + t_u8 channel; + /** RSSI for the received packet */ + t_u8 rssi; + /** TSF value in microseconds from the firmware at packet reception */ + t_u64 network_tsf; +} wlan_get_scan_table_fixed; + +/** mlan_802_11_ssid data structure */ +typedef struct _mlan_802_11_ssid { + /** SSID Length */ + t_u32 ssid_len; + /** SSID information field */ + t_u8 ssid[MLAN_MAX_SSID_LENGTH]; +} mlan_802_11_ssid, *pmlan_802_11_ssid; + +typedef MLAN_PACK_START struct _tx_status_event { + /** packet type */ + t_u8 packet_type; + /** tx_token_id */ + t_u8 tx_token_id; + /** 0--success, 1--fail, 2--watchdogtimeout */ + t_u8 status; +} MLAN_PACK_END tx_status_event; + +/** + * Sructure to retrieve the scan table + */ +typedef struct { + /** + * - Zero based scan entry to start retrieval in command request + * - Number of scans entries returned in command response + */ + t_u32 scan_number; + /** + * Buffer marker for multiple wlan_ioctl_get_scan_table_entry structures. + * Each struct is padded to the nearest 32 bit boundary. + */ + t_u8 scan_table_entry_buf[1]; +} wlan_ioctl_get_scan_table_info; + +/** + * Structure passed in the wlan_ioctl_get_scan_table_info for each + * BSS returned in the WLAN_GET_SCAN_RESP IOCTL + */ +typedef struct _wlan_ioctl_get_scan_table_entry { + /** + * Fixed field length included in the response. + * + * Length value is included so future fixed fields can be added to the + * response without breaking backwards compatibility. Use the length + * to find the offset for the bssInfoLength field, not a sizeof() calc. + */ + t_u32 fixed_field_length; + + /** + * Length of the BSS Information (probe resp or beacon) that + * follows after the fixed_field_length + */ + t_u32 bss_info_length; + + /** + * Always present, fixed length data fields for the BSS + */ + wlan_get_scan_table_fixed fixed_fields; + + /* + * Probe response or beacon scanned for the BSS. + * + * Field layout: + * - TSF 8 octets + * - Beacon Interval 2 octets + * - Capability Info 2 octets + * + * - IEEE Infomation Elements; variable number & length per 802.11 spec + */ + /* t_u8 bss_info_buffer[0]; */ +} wlan_ioctl_get_scan_table_entry; + +/** Type definition of mlan_scan_time_params */ +typedef struct _mlan_scan_time_params { + /** Scan channel time for specific scan in milliseconds */ + t_u32 specific_scan_time; + /** Scan channel time for active scan in milliseconds */ + t_u32 active_scan_time; + /** Scan channel time for passive scan in milliseconds */ + t_u32 passive_scan_time; +} mlan_scan_time_params, *pmlan_scan_time_params; + +/** Type definition of mlan_user_scan */ +typedef struct _mlan_user_scan { + /** Length of scan_cfg_buf */ + t_u32 scan_cfg_len; + /** Buffer of scan config */ + t_u8 scan_cfg_buf[1]; +} mlan_user_scan, *pmlan_user_scan; + +/** Type definition of mlan_scan_req */ +typedef struct _mlan_scan_req { + /** BSS mode for scanning */ + t_u32 scan_mode; + /** Scan type */ + t_u32 scan_type; + /** SSID */ + mlan_802_11_ssid scan_ssid; + /** Scan time parameters */ + mlan_scan_time_params scan_time; + /** Scan config parameters in user scan */ + mlan_user_scan user_scan; +} mlan_scan_req, *pmlan_scan_req; + +/** Type defnition of mlan_scan_resp */ +typedef struct _mlan_scan_resp { + /** Number of scan result */ + t_u32 num_in_scan_table; + /** Scan table */ + t_u8 *pscan_table; + /* Age in seconds */ + t_u32 age_in_secs; + /** channel statstics */ + t_u8 *pchan_stats; + /** Number of records in the chan_stats */ + t_u32 num_in_chan_stats; +} mlan_scan_resp, *pmlan_scan_resp; + +/** Type definition of mlan_scan_cfg */ +typedef struct _mlan_scan_cfg { + /** Scan type */ + t_u32 scan_type; + /** BSS mode for scanning */ + t_u32 scan_mode; + /** Scan probe */ + t_u32 scan_probe; + /** Scan time parameters */ + mlan_scan_time_params scan_time; + /** Extended Scan */ + t_u32 ext_scan; +} mlan_scan_cfg, *pmlan_scan_cfg; + +/** Type defnition of mlan_ds_scan for MLAN_IOCTL_SCAN */ +typedef struct _mlan_ds_scan { + /** Sub-command */ + t_u32 sub_command; + /** Scan request/response */ + union { + /** Scan request */ + mlan_scan_req scan_req; + /** Scan response */ + mlan_scan_resp scan_resp; + /** Scan config parameters in user scan */ + mlan_user_scan user_scan; + /** Scan config parameters */ + mlan_scan_cfg scan_cfg; + } param; +} mlan_ds_scan, *pmlan_ds_scan; + +/*-----------------------------------------------------------------*/ +/** BSS Configuration Group */ +/*-----------------------------------------------------------------*/ +/** Enumeration for BSS mode */ +enum _mlan_bss_mode { + MLAN_BSS_MODE_INFRA = 1, + MLAN_BSS_MODE_IBSS, + MLAN_BSS_MODE_AUTO +}; + +/** Maximum key length */ +#define MLAN_MAX_KEY_LENGTH 32 + +/** max Wmm AC queues */ +#define MAX_AC_QUEUES 4 + +/** Maximum atim window in milliseconds */ +#define MLAN_MAX_ATIM_WINDOW 50 + +/** Minimum beacon interval */ +#define MLAN_MIN_BEACON_INTERVAL 20 +/** Maximum beacon interval */ +#define MLAN_MAX_BEACON_INTERVAL 1000 +/** Default beacon interval */ +#define MLAN_BEACON_INTERVAL 100 + +/** Receive all packets */ +#define MLAN_PROMISC_MODE 1 +/** Receive multicast packets in multicast list */ +#define MLAN_MULTICAST_MODE 2 +/** Receive all multicast packets */ +#define MLAN_ALL_MULTI_MODE 4 + +/** Maximum size of multicast list */ +#define MLAN_MAX_MULTICAST_LIST_SIZE 32 + +/** mlan_multicast_list data structure for MLAN_OID_BSS_MULTICAST_LIST */ +typedef struct _mlan_multicast_list { + /** Multicast mode */ + t_u32 mode; + /** Number of multicast addresses in the list */ + t_u32 num_multicast_addr; + /** Multicast address list */ + mlan_802_11_mac_addr mac_list[MLAN_MAX_MULTICAST_LIST_SIZE]; +} mlan_multicast_list, *pmlan_multicast_list; + +/** Max channel */ +#define MLAN_MAX_CHANNEL 165 + +/** Maximum number of channels in table */ +#define MLAN_MAX_CHANNEL_NUM 128 + +/** Channel/frequence for MLAN_OID_BSS_CHANNEL */ +typedef struct _chan_freq { + /** Channel Number */ + t_u32 channel; + /** Frequency of this Channel */ + t_u32 freq; +} chan_freq; + +/** mlan_chan_list data structure for MLAN_OID_BSS_CHANNEL_LIST */ +typedef struct _mlan_chan_list { + /** Number of channel */ + t_u32 num_of_chan; + /** Channel-Frequency table */ + chan_freq cf[MLAN_MAX_CHANNEL_NUM]; +} mlan_chan_list; + +/** mlan_ssid_bssid data structure for + * MLAN_OID_BSS_START and MLAN_OID_BSS_FIND_BSS + */ +typedef struct _mlan_ssid_bssid { + /** SSID */ + mlan_802_11_ssid ssid; + /** BSSID */ + mlan_802_11_mac_addr bssid; + /** index in BSSID list, start from 1 */ + t_u32 idx; + /** Receive signal strength in dBm */ + t_s32 rssi; + /**mobility domain value*/ + t_u16 ft_md; + /**ft capability*/ + t_u8 ft_cap; + /**channel*/ + t_u16 channel; +} mlan_ssid_bssid; + +#ifdef UAP_SUPPORT +/** Maximum packet forward control value */ +#define MAX_PKT_FWD_CTRL 15 +/** Maximum BEACON period */ +#define MAX_BEACON_PERIOD 4000 +/** Minimum BEACON period */ +#define MIN_BEACON_PERIOD 50 +/** Maximum DTIM period */ +#define MAX_DTIM_PERIOD 100 +/** Minimum DTIM period */ +#define MIN_DTIM_PERIOD 1 +/** Maximum TX Power Limit */ +#define MAX_TX_POWER 20 +/** Minimum TX Power Limit */ +#define MIN_TX_POWER 0 +/** MAX station count */ +#define MAX_STA_COUNT 10 +/** Maximum RTS threshold */ +#define MAX_RTS_THRESHOLD 2347 +/** Maximum fragmentation threshold */ +#define MAX_FRAG_THRESHOLD 2346 +/** Minimum fragmentation threshold */ +#define MIN_FRAG_THRESHOLD 256 +/** data rate 54 M */ +#define DATA_RATE_54M 108 +/** antenna A */ +#define ANTENNA_MODE_A 0 +/** antenna B */ +#define ANTENNA_MODE_B 1 +/** transmit antenna */ +#define TX_ANTENNA 1 +/** receive antenna */ +#define RX_ANTENNA 0 +/** Maximum stage out time */ +#define MAX_STAGE_OUT_TIME 864000 +/** Minimum stage out time */ +#define MIN_STAGE_OUT_TIME 300 +/** Maximum Retry Limit */ +#define MAX_RETRY_LIMIT 14 + +/** Maximum group key timer in seconds */ +#define MAX_GRP_TIMER 86400 + +/** Maximum value of 4 byte configuration */ +#define MAX_VALID_DWORD 0x7FFFFFFF /* (1 << 31) - 1 */ + +/** setting for band_config - band=5GHZ */ +#define BAND_CONFIG_5GHZ 0x01 +/** default UAP BAND 2.4G */ +#define DEFAULT_UAP_BAND 0 +/** default UAP channel 6 */ +#define DEFAULT_UAP_CHANNEL 6 +/** Band config ACS mode */ +#define BAND_CONFIG_ACS_MODE 0x40 +/** Band config manual */ +#define BAND_CONFIG_MANUAL 0x00 + +/** Maximum data rates */ +#define MAX_DATA_RATES 14 + +/** auto data rate */ +#define DATA_RATE_AUTO 0 + +/**filter mode: disable */ +#define MAC_FILTER_MODE_DISABLE 0 +/**filter mode: block mac address */ +#define MAC_FILTER_MODE_ALLOW_MAC 1 +/**filter mode: block mac address */ +#define MAC_FILTER_MODE_BLOCK_MAC 2 +/** Maximum mac filter num */ +#define MAX_MAC_FILTER_NUM 16 + +/* Bitmap for protocol to use */ +/** No security */ +#define PROTOCOL_NO_SECURITY 0x01 +/** Static WEP */ +#define PROTOCOL_STATIC_WEP 0x02 +/** WPA */ +#define PROTOCOL_WPA 0x08 +/** WPA2 */ +#define PROTOCOL_WPA2 0x20 +/** WP2 Mixed */ +#define PROTOCOL_WPA2_MIXED 0x28 +/** EAP */ +#define PROTOCOL_EAP 0x40 +/** WAPI */ +#define PROTOCOL_WAPI 0x80 + +/** Key_mgmt_psk */ +#define KEY_MGMT_NONE 0x04 +/** Key_mgmt_none */ +#define KEY_MGMT_PSK 0x02 +/** Key_mgmt_eap */ +#define KEY_MGMT_EAP 0x01 +/** Key_mgmt_psk_sha256 */ +#define KEY_MGMT_PSK_SHA256 0x100 + +/** TKIP */ +#define CIPHER_TKIP 0x04 +/** AES CCMP */ +#define CIPHER_AES_CCMP 0x08 + +/** Valid cipher bitmap */ +#define VALID_CIPHER_BITMAP 0x0c + +/** Channel List Entry */ +typedef struct _channel_list { + /** Channel Number */ + t_u8 chan_number; + /** Band Config */ + t_u8 band_config_type; +} scan_chan_list; + +/** mac_filter data structure */ +typedef struct _mac_filter { + /** mac filter mode */ + t_u16 filter_mode; + /** mac adress count */ + t_u16 mac_count; + /** mac address list */ + mlan_802_11_mac_addr mac_list[MAX_MAC_FILTER_NUM]; +} mac_filter; + +/** wpa parameter */ +typedef struct _wpa_param { + /** Pairwise cipher WPA */ + t_u8 pairwise_cipher_wpa; + /** Pairwise cipher WPA2 */ + t_u8 pairwise_cipher_wpa2; + /** group cipher */ + t_u8 group_cipher; + /** RSN replay protection */ + t_u8 rsn_protection; + /** passphrase length */ + t_u32 length; + /** passphrase */ + t_u8 passphrase[64]; + /**group key rekey time in seconds */ + t_u32 gk_rekey_time; +} wpa_param; + +/** wep key */ +typedef struct _wep_key { + /** key index 0-3 */ + t_u8 key_index; + /** is default */ + t_u8 is_default; + /** length */ + t_u16 length; + /** key data */ + t_u8 key[26]; +} wep_key; + +/** wep param */ +typedef struct _wep_param { + /** key 0 */ + wep_key key0; + /** key 1 */ + wep_key key1; + /** key 2 */ + wep_key key2; + /** key 3 */ + wep_key key3; +} wep_param; + +/** Data structure of WMM QoS information */ +typedef struct _wmm_qos_info_t { +#ifdef BIG_ENDIAN_SUPPORT + /** QoS UAPSD */ + t_u8 qos_uapsd:1; + /** Reserved */ + t_u8 reserved:3; + /** Parameter set count */ + t_u8 para_set_count:4; +#else + /** Parameter set count */ + t_u8 para_set_count:4; + /** Reserved */ + t_u8 reserved:3; + /** QoS UAPSD */ + t_u8 qos_uapsd:1; +#endif /* BIG_ENDIAN_SUPPORT */ +} wmm_qos_info_t, *pwmm_qos_info_t; + +/** Data structure of WMM ECW */ +typedef struct _wmm_ecw_t { +#ifdef BIG_ENDIAN_SUPPORT + /** Maximum Ecw */ + t_u8 ecw_max:4; + /** Minimum Ecw */ + t_u8 ecw_min:4; +#else + /** Minimum Ecw */ + t_u8 ecw_min:4; + /** Maximum Ecw */ + t_u8 ecw_max:4; +#endif /* BIG_ENDIAN_SUPPORT */ +} wmm_ecw_t, *pwmm_ecw_t; + +/** Data structure of WMM Aci/Aifsn */ +typedef struct _wmm_aci_aifsn_t { +#ifdef BIG_ENDIAN_SUPPORT + /** Reserved */ + t_u8 reserved:1; + /** Aci */ + t_u8 aci:2; + /** Acm */ + t_u8 acm:1; + /** Aifsn */ + t_u8 aifsn:4; +#else + /** Aifsn */ + t_u8 aifsn:4; + /** Acm */ + t_u8 acm:1; + /** Aci */ + t_u8 aci:2; + /** Reserved */ + t_u8 reserved:1; +#endif /* BIG_ENDIAN_SUPPORT */ +} wmm_aci_aifsn_t, *pwmm_aci_aifsn_t; + +/** Data structure of WMM AC parameters */ +typedef struct _wmm_ac_parameters_t { + wmm_aci_aifsn_t aci_aifsn; /**< AciAifSn */ + wmm_ecw_t ecw; /**< Ecw */ + t_u16 tx_op_limit; /**< Tx op limit */ +} wmm_ac_parameters_t, *pwmm_ac_parameters_t; + +/** Data structure of WMM parameter IE */ +typedef struct _wmm_parameter_t { + /** OuiType: 00:50:f2:02 */ + t_u8 ouitype[4]; + /** Oui subtype: 01 */ + t_u8 ouisubtype; + /** version: 01 */ + t_u8 version; + /** QoS information */ + t_u8 qos_info; + /** Reserved */ + t_u8 reserved; + /** AC Parameters Record WMM_AC_BE, WMM_AC_BK, WMM_AC_VI, WMM_AC_VO */ + wmm_ac_parameters_t ac_params[MAX_AC_QUEUES]; +} wmm_parameter_t, *pwmm_parameter_t; + +/** 5G band */ +#define BAND_CONFIG_5G 0x01 +/** 2.4 G band */ +#define BAND_CONFIG_2G 0x00 +/** MAX BG channel */ +#define MAX_BG_CHANNEL 14 +/** mlan_bss_param + * Note: For each entry you must enter an invalid value + * in the MOAL function woal_set_sys_config_invalid_data(). + * Otherwise for a valid data an unwanted TLV will be + * added to that command. + */ +typedef struct _mlan_uap_bss_param { + /** AP mac addr */ + mlan_802_11_mac_addr mac_addr; + /** SSID */ + mlan_802_11_ssid ssid; + /** Broadcast ssid control */ + t_u8 bcast_ssid_ctl; + /** Radio control: on/off */ + t_u8 radio_ctl; + /** dtim period */ + t_u8 dtim_period; + /** beacon period */ + t_u16 beacon_period; + /** rates */ + t_u8 rates[MAX_DATA_RATES]; + /** Tx data rate */ + t_u16 tx_data_rate; + /** multicast/broadcast data rate */ + t_u16 mcbc_data_rate; + /** Tx power level in dBm */ + t_u8 tx_power_level; + /** Tx antenna */ + t_u8 tx_antenna; + /** Rx antenna */ + t_u8 rx_antenna; + /** packet forward control */ + t_u8 pkt_forward_ctl; + /** max station count */ + t_u16 max_sta_count; + /** mac filter */ + mac_filter filter; + /** station ageout timer in unit of 100ms */ + t_u32 sta_ageout_timer; + /** PS station ageout timer in unit of 100ms */ + t_u32 ps_sta_ageout_timer; + /** RTS threshold */ + t_u16 rts_threshold; + /** fragmentation threshold */ + t_u16 frag_threshold; + /** retry_limit */ + t_u16 retry_limit; + /** pairwise update timeout in milliseconds */ + t_u32 pairwise_update_timeout; + /** pairwise handshake retries */ + t_u32 pwk_retries; + /** groupwise update timeout in milliseconds */ + t_u32 groupwise_update_timeout; + /** groupwise handshake retries */ + t_u32 gwk_retries; + /** preamble type */ + t_u8 preamble_type; + /** band cfg */ + t_u8 band_cfg; + /** channel */ + t_u8 channel; + /** auth mode */ + t_u16 auth_mode; + /** encryption protocol */ + t_u16 protocol; + /** key managment type */ + t_u16 key_mgmt; + /** wep param */ + wep_param wep_cfg; + /** wpa param */ + wpa_param wpa_cfg; + /** Mgmt IE passthru mask */ + t_u32 mgmt_ie_passthru_mask; + /* + * 11n HT Cap HTCap_t ht_cap + */ + /** HT Capabilities Info field */ + t_u16 ht_cap_info; + /** A-MPDU Parameters field */ + t_u8 ampdu_param; + /** Supported MCS Set field */ + t_u8 supported_mcs_set[16]; + /** HT Extended Capabilities field */ + t_u16 ht_ext_cap; + /** Transmit Beamforming Capabilities field */ + t_u32 tx_bf_cap; + /** Antenna Selection Capability field */ + t_u8 asel; + /** Enable 2040 Coex */ + t_u8 enable_2040coex; + /** key management operation */ + t_u16 key_mgmt_operation; + /** BSS status */ + t_u16 bss_status; +#ifdef WIFI_DIRECT_SUPPORT + /* pre shared key */ + t_u8 psk[MLAN_MAX_KEY_LENGTH]; +#endif /* WIFI_DIRECT_SUPPORT */ + /** Number of channels in scan_channel_list */ + t_u32 num_of_chan; + /** scan channel list in ACS mode */ + scan_chan_list chan_list[MLAN_MAX_CHANNEL]; + /** Wmm parameters */ + wmm_parameter_t wmm_para; +} mlan_uap_bss_param; + +/** mlan_deauth_param */ +typedef struct _mlan_deauth_param { + /** STA mac addr */ + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** deauth reason */ + t_u16 reason_code; +} mlan_deauth_param; + +/** mlan_uap_scan_channels */ +typedef struct _mlan_uap_scan_channels { + /** flag for remove nop channel*/ + t_u8 remove_nop_channel; + /** num of removed channel */ + t_u8 num_remvoed_channel; + /** Number of channels in scan_channel_list */ + t_u32 num_of_chan; + /** scan channel list in ACS mode */ + scan_chan_list chan_list[MLAN_MAX_CHANNEL]; +} mlan_uap_scan_channels; + +/** mlan_uap_channel */ +typedef struct _mlan_uap_channel { + /** band cfg */ + t_u8 band_cfg; + /** channel */ + t_u8 channel; +} mlan_uap_channel; + +/** mlan_uap_oper_ctrl */ +typedef struct _mlan_uap_oper_ctrl { + /** control value + * 0: do nothing, + * 2: uap stops and restarts automaticaly + */ + t_u16 ctrl_value; + /** channel opt + * 1: uap restart on default 2.4G/channel 6 + * 2: uap restart on the band/channel configured by driver previously + * 3: uap restart on the band/channel specified by band_cfg and channel + */ + t_u16 chan_opt; + /** band cfg 0 + * 0: 20Mhz 2: 40 Mhz 3: 80Mhz + */ + t_u8 band_cfg; + /** channel */ + t_u8 channel; +} mlan_uap_oper_ctrl; + +#endif + +#ifdef WIFI_DIRECT_SUPPORT +/** mode: disable wifi direct */ +#define WIFI_DIRECT_MODE_DISABLE 0 +/** mode: listen */ +#define WIFI_DIRECT_MODE_LISTEN 1 +/** mode: GO */ +#define WIFI_DIRECT_MODE_GO 2 +/** mode: client */ +#define WIFI_DIRECT_MODE_CLIENT 3 +/** mode: find */ +#define WIFI_DIRECT_MODE_FIND 4 +/** mode: stop find */ +#define WIFI_DIRECT_MODE_STOP_FIND 5 +#endif + +/** Type definition of mlan_ds_bss for MLAN_IOCTL_BSS */ +typedef struct _mlan_ds_bss { + /** Sub-command */ + t_u32 sub_command; + /** BSS parameter */ + union { + /** SSID-BSSID for MLAN_OID_BSS_START */ + mlan_ssid_bssid ssid_bssid; + /** BSSID for MLAN_OID_BSS_STOP */ + mlan_802_11_mac_addr bssid; + /** BSS mode for MLAN_OID_BSS_MODE */ + t_u32 bss_mode; + /** BSS channel/frequency for MLAN_OID_BSS_CHANNEL */ + chan_freq bss_chan; + /** BSS channel list for MLAN_OID_BSS_CHANNEL_LIST */ + mlan_chan_list chanlist; + /** MAC address for MLAN_OID_BSS_MAC_ADDR */ + mlan_802_11_mac_addr mac_addr; + /** Multicast list for MLAN_OID_BSS_MULTICAST_LIST */ + mlan_multicast_list multicast_list; + /** Beacon interval for MLAN_OID_IBSS_BCN_INTERVAL */ + t_u32 bcn_interval; + /** ATIM window for MLAN_OID_IBSS_ATIM_WINDOW */ + t_u32 atim_window; +#ifdef UAP_SUPPORT + /** BSS param for AP mode for MLAN_OID_UAP_BSS_CONFIG */ + mlan_uap_bss_param bss_config; + /** deauth param for MLAN_OID_UAP_DEAUTH_STA */ + mlan_deauth_param deauth_param; + /** AP Wmm parameters for MLAN_OID_UAP_CFG_WMM_PARAM */ + wmm_parameter_t ap_wmm_para; + /** ap scan channels for MLAN_OID_UAP_SCAN_CHANNELS*/ + mlan_uap_scan_channels ap_scan_channels; + /** ap channel for MLAN_OID_UAP_CHANNEL*/ + mlan_uap_channel ap_channel; + /** ap operation control for MLAN_OID_UAP_OPER_CTRL*/ + mlan_uap_oper_ctrl ap_oper_ctrl; +#endif +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) + /** BSS role for MLAN_OID_BSS_ROLE */ + t_u8 bss_role; +#endif +#ifdef WIFI_DIRECT_SUPPORT + /** wifi direct mode for MLAN_OID_WIFI_DIRECT_MODE */ + t_u16 wfd_mode; +#endif +#ifdef STA_SUPPORT + /** Listen interval for MLAN_OID_BSS_LISTEN_INTERVAL */ + t_u16 listen_interval; +#endif + } param; +} mlan_ds_bss, *pmlan_ds_bss; + +/*-----------------------------------------------------------------*/ +/** Radio Control Group */ +/*-----------------------------------------------------------------*/ +/** Enumeration for band */ +enum _mlan_band_def { + BAND_B = 1, + BAND_G = 2, + BAND_A = 4, + BAND_GN = 8, + BAND_AN = 16, + BAND_GAC = 32, + BAND_AAC = 64, +}; + +/** NO secondary channel */ +#define NO_SEC_CHANNEL 0 +/** secondary channel is above primary channel */ +#define SEC_CHANNEL_ABOVE 1 +/** secondary channel is below primary channel */ +#define SEC_CHANNEL_BELOW 3 +/** Channel bandwidth */ +#define CHANNEL_BW_20MHZ 0 +#define CHANNEL_BW_40MHZ_ABOVE 1 +#define CHANNEL_BW_40MHZ_BELOW 3 +/** secondary channel is 80Mhz bandwidth for 11ac */ +#define CHANNEL_BW_80MHZ 4 +#define CHANNEL_BW_160MHZ 5 + +/** RF antenna selection */ +#define RF_ANTENNA_MASK(n) ((1<<(n))-1) +/** RF antenna auto select */ +#define RF_ANTENNA_AUTO 0xFFFF + +/** Type definition of mlan_ds_band_cfg for MLAN_OID_BAND_CFG */ +typedef struct _mlan_ds_band_cfg { + /** Infra band */ + t_u32 config_bands; + /** Ad-hoc start band */ + t_u32 adhoc_start_band; + /** Ad-hoc start channel */ + t_u32 adhoc_channel; + /** Ad-hoc channel bandwidth */ + t_u32 adhoc_chan_bandwidth; + /** fw supported band */ + t_u32 fw_bands; +} mlan_ds_band_cfg; + +/** Type definition of mlan_ds_ant_cfg for MLAN_OID_ANT_CFG */ +typedef struct _mlan_ds_ant_cfg { + /** Tx antenna mode */ + t_u32 tx_antenna; + /** Rx antenna mode */ + t_u32 rx_antenna; +} mlan_ds_ant_cfg, *pmlan_ds_ant_cfg; +/** Type definition of mlan_ds_ant_cfg_1x1 for MLAN_OID_ANT_CFG */ +typedef struct _mlan_ds_ant_cfg_1x1 { + /** Antenna mode */ + t_u32 antenna; + /** Evaluate time */ + t_u16 evaluate_time; + /** Current antenna */ + t_u16 current_antenna; +} mlan_ds_ant_cfg_1x1, *pmlan_ds_ant_cfg_1x1; + +#ifdef WIFI_DIRECT_SUPPORT +/** Type definition of mlan_ds_remain_chan for MLAN_OID_REMAIN_CHAN_CFG */ +typedef struct _mlan_ds_remain_chan { + /** remove flag */ + t_u16 remove; + /** status */ + t_u8 status; + /** Band cfg */ + t_u8 bandcfg; + /** channel */ + t_u8 channel; + /** remain time: Unit ms*/ + t_u32 remain_period; +} mlan_ds_remain_chan, *pmlan_ds_remain_chan; +#endif + +/** Type definition of mlan_ds_radio_cfg for MLAN_IOCTL_RADIO_CFG */ +typedef struct _mlan_ds_radio_cfg { + /** Sub-command */ + t_u32 sub_command; + /** Radio control parameter */ + union { + /** Radio on/off for MLAN_OID_RADIO_CTRL */ + t_u32 radio_on_off; + /** Band info for MLAN_OID_BAND_CFG */ + mlan_ds_band_cfg band_cfg; + /** Antenna info for MLAN_OID_ANT_CFG */ + mlan_ds_ant_cfg ant_cfg; + /** Antenna info for MLAN_OID_ANT_CFG */ + mlan_ds_ant_cfg_1x1 ant_cfg_1x1; +#ifdef WIFI_DIRECT_SUPPORT + /** remain on channel for MLAN_OID_REMAIN_CHAN_CFG */ + mlan_ds_remain_chan remain_chan; +#endif + } param; +} mlan_ds_radio_cfg, *pmlan_ds_radio_cfg; + +enum COALESCE_OPERATION { + RECV_FILTER_MATCH_TYPE_EQ = 0x80, + RECV_FILTER_MATCH_TYPE_NE, +}; + +enum COALESCE_PACKET_TYPE { + PACKET_TYPE_UNICAST = 1, + PACKET_TYPE_MULTICAST = 2, + PACKET_TYPE_BROADCAST = 3 +}; + +#define COALESCE_MAX_RULES 8 +#define COALESCE_MAX_BYTESEQ 4 /* non-adjustable */ +#define COALESCE_MAX_FILTERS 4 +#define MAX_COALESCING_DELAY 100 /* in msecs */ +#define MAX_PATTERN_LEN 20 +#define MAX_OFFSET_LEN 100 + +struct filt_field_param { + t_u8 operation; + t_u8 operand_len; + t_u16 offset; + t_u8 operand_byte_stream[COALESCE_MAX_BYTESEQ]; +}; + +struct coalesce_rule { + t_u16 max_coalescing_delay; + t_u8 num_of_fields; + t_u8 pkt_type; + struct filt_field_param params[COALESCE_MAX_FILTERS]; +}; + +typedef struct _mlan_ds_coalesce_cfg { + t_u16 num_of_rules; + struct coalesce_rule rule[COALESCE_MAX_RULES]; +} mlan_ds_coalesce_cfg; + +/*-----------------------------------------------------------------*/ +/** SNMP MIB Group */ +/*-----------------------------------------------------------------*/ +/** Type definition of mlan_ds_snmp_mib for MLAN_IOCTL_SNMP_MIB */ +typedef struct _mlan_ds_snmp_mib { + /** Sub-command */ + t_u32 sub_command; + /** SNMP MIB parameter */ + union { + /** RTS threshold for MLAN_OID_SNMP_MIB_RTS_THRESHOLD */ + t_u32 rts_threshold; + /** Fragment threshold for MLAN_OID_SNMP_MIB_FRAG_THRESHOLD */ + t_u32 frag_threshold; + /** Retry count for MLAN_OID_SNMP_MIB_RETRY_COUNT */ + t_u32 retry_count; +#if defined(UAP_SUPPORT) + /** OID value for MLAN_OID_SNMP_MIB_DOT11D/H */ + t_u32 oid_value; +#endif + /** DTIM period for MLAN_OID_SNMP_MIB_DTIM_PERIOD */ + t_u32 dtim_period; + } param; +} mlan_ds_snmp_mib, *pmlan_ds_snmp_mib; + +/*-----------------------------------------------------------------*/ +/** Status Information Group */ +/*-----------------------------------------------------------------*/ +/** Enumeration for ad-hoc status */ +enum _mlan_adhoc_status { + ADHOC_IDLE, + ADHOC_STARTED, + ADHOC_JOINED, + ADHOC_COALESCED, ADHOC_STARTING +}; + +/** Type definition of mlan_ds_get_stats for MLAN_OID_GET_STATS */ +typedef struct _mlan_ds_get_stats { + /** Statistics counter */ + /** Multicast transmitted frame count */ + t_u32 mcast_tx_frame; + /** Failure count */ + t_u32 failed; + /** Retry count */ + t_u32 retry; + /** Multi entry count */ + t_u32 multi_retry; + /** Duplicate frame count */ + t_u32 frame_dup; + /** RTS success count */ + t_u32 rts_success; + /** RTS failure count */ + t_u32 rts_failure; + /** Ack failure count */ + t_u32 ack_failure; + /** Rx fragmentation count */ + t_u32 rx_frag; + /** Multicast Tx frame count */ + t_u32 mcast_rx_frame; + /** FCS error count */ + t_u32 fcs_error; + /** Tx frame count */ + t_u32 tx_frame; + /** WEP ICV error count */ + t_u32 wep_icv_error[4]; + /** beacon recv count */ + t_u32 bcn_rcv_cnt; + /** beacon miss count */ + t_u32 bcn_miss_cnt; +} mlan_ds_get_stats, *pmlan_ds_get_stats; + +/** Type definition of mlan_ds_uap_stats for MLAN_OID_GET_STATS */ +typedef struct _mlan_ds_uap_stats { + /** tkip mic failures */ + t_u32 tkip_mic_failures; + /** ccmp decrypt errors */ + t_u32 ccmp_decrypt_errors; + /** wep undecryptable count */ + t_u32 wep_undecryptable_count; + /** wep icv error count */ + t_u32 wep_icv_error_count; + /** decrypt failure count */ + t_u32 decrypt_failure_count; + /** dot11 multicast tx count */ + t_u32 mcast_tx_count; + /** dot11 failed count */ + t_u32 failed_count; + /** dot11 retry count */ + t_u32 retry_count; + /** dot11 multi retry count */ + t_u32 multi_retry_count; + /** dot11 frame duplicate count */ + t_u32 frame_dup_count; + /** dot11 rts success count */ + t_u32 rts_success_count; + /** dot11 rts failure count */ + t_u32 rts_failure_count; + /** dot11 ack failure count */ + t_u32 ack_failure_count; + /** dot11 rx ragment count */ + t_u32 rx_fragment_count; + /** dot11 mcast rx frame count */ + t_u32 mcast_rx_frame_count; + /** dot11 fcs error count */ + t_u32 fcs_error_count; + /** dot11 tx frame count */ + t_u32 tx_frame_count; + /** dot11 rsna tkip cm invoked */ + t_u32 rsna_tkip_cm_invoked; + /** dot11 rsna 4way handshake failures */ + t_u32 rsna_4way_hshk_failures; +} mlan_ds_uap_stats, *pmlan_ds_uap_stats; + +/** Mask of last beacon RSSI */ +#define BCN_RSSI_LAST_MASK 0x00000001 +/** Mask of average beacon RSSI */ +#define BCN_RSSI_AVG_MASK 0x00000002 +/** Mask of last data RSSI */ +#define DATA_RSSI_LAST_MASK 0x00000004 +/** Mask of average data RSSI */ +#define DATA_RSSI_AVG_MASK 0x00000008 +/** Mask of last beacon SNR */ +#define BCN_SNR_LAST_MASK 0x00000010 +/** Mask of average beacon SNR */ +#define BCN_SNR_AVG_MASK 0x00000020 +/** Mask of last data SNR */ +#define DATA_SNR_LAST_MASK 0x00000040 +/** Mask of average data SNR */ +#define DATA_SNR_AVG_MASK 0x00000080 +/** Mask of last beacon NF */ +#define BCN_NF_LAST_MASK 0x00000100 +/** Mask of average beacon NF */ +#define BCN_NF_AVG_MASK 0x00000200 +/** Mask of last data NF */ +#define DATA_NF_LAST_MASK 0x00000400 +/** Mask of average data NF */ +#define DATA_NF_AVG_MASK 0x00000800 +/** Mask of all RSSI_INFO */ +#define ALL_RSSI_INFO_MASK 0x00000fff + +/** Type definition of mlan_ds_get_signal for MLAN_OID_GET_SIGNAL */ +typedef struct _mlan_ds_get_signal { + /** Selector of get operation */ + /* + * Bit0: Last Beacon RSSI, Bit1: Average Beacon RSSI, + * Bit2: Last Data RSSI, Bit3: Average Data RSSI, + * Bit4: Last Beacon SNR, Bit5: Average Beacon SNR, + * Bit6: Last Data SNR, Bit7: Average Data SNR, + * Bit8: Last Beacon NF, Bit9: Average Beacon NF, + * Bit10: Last Data NF, Bit11: Average Data NF + */ + t_u16 selector; + + /** RSSI */ + /** RSSI of last beacon */ + t_s16 bcn_rssi_last; + /** RSSI of beacon average */ + t_s16 bcn_rssi_avg; + /** RSSI of last data packet */ + t_s16 data_rssi_last; + /** RSSI of data packet average */ + t_s16 data_rssi_avg; + + /** SNR */ + /** SNR of last beacon */ + t_s16 bcn_snr_last; + /** SNR of beacon average */ + t_s16 bcn_snr_avg; + /** SNR of last data packet */ + t_s16 data_snr_last; + /** SNR of data packet average */ + t_s16 data_snr_avg; + + /** NF */ + /** NF of last beacon */ + t_s16 bcn_nf_last; + /** NF of beacon average */ + t_s16 bcn_nf_avg; + /** NF of last data packet */ + t_s16 data_nf_last; + /** NF of data packet average */ + t_s16 data_nf_avg; +} mlan_ds_get_signal, *pmlan_ds_get_signal; + +/** mlan_fw_info data structure for MLAN_OID_GET_FW_INFO */ +typedef struct _mlan_fw_info { + /** Firmware version */ + t_u32 fw_ver; + /** MAC address */ + mlan_802_11_mac_addr mac_addr; + /** 802.11n device capabilities */ + t_u32 hw_dot_11n_dev_cap; + /** Device support for MIMO abstraction of MCSs */ + t_u8 hw_dev_mcs_support; + /** 802.11ac device capabilities */ + t_u32 hw_dot_11ac_dev_cap; + /** 802.11ac device support for MIMO abstraction of MCSs */ + t_u32 hw_dot_11ac_mcs_support; + /** fw supported band */ + t_u8 fw_bands; + /** region code */ + t_u16 region_code; +} mlan_fw_info, *pmlan_fw_info; + +/** Version string buffer length */ +#define MLAN_MAX_VER_STR_LEN 128 + +/** mlan_ver_ext data structure for MLAN_OID_GET_VER_EXT */ +typedef struct _mlan_ver_ext { + /** Selected version string */ + t_u32 version_str_sel; + /** Version string */ + char version_str[MLAN_MAX_VER_STR_LEN]; +} mlan_ver_ext, *pmlan_ver_ext; + +/** mlan_bss_info data structure for MLAN_OID_GET_BSS_INFO */ +typedef struct _mlan_bss_info { + /** BSS mode */ + t_u32 bss_mode; + /** SSID */ + mlan_802_11_ssid ssid; + /** Table index */ + t_u32 scan_table_idx; + /** Channel */ + t_u32 bss_chan; + /** Band */ + t_u8 bss_band; + /** Region code */ + t_u32 region_code; + /** Connection status */ + t_u32 media_connected; + /** Radio on */ + t_u32 radio_on; + /** Max power level in dBm */ + t_s32 max_power_level; + /** Min power level in dBm */ + t_s32 min_power_level; + /** Adhoc state */ + t_u32 adhoc_state; + /** NF of last beacon */ + t_s32 bcn_nf_last; + /** wep status */ + t_u32 wep_status; + /** scan block status */ + t_u8 scan_block; + /** Host Sleep configured flag */ + t_u32 is_hs_configured; + /** Deep Sleep flag */ + t_u32 is_deep_sleep; + /** BSSID */ + mlan_802_11_mac_addr bssid; +#ifdef STA_SUPPORT + /** Capability Info */ + t_u16 capability_info; + /** Beacon Interval */ + t_u16 beacon_interval; + /** Listen Interval */ + t_u16 listen_interval; + /** Association Id */ + t_u16 assoc_id; + /** AP/Peer supported rates */ + t_u8 peer_supp_rates[MLAN_SUPPORTED_RATES]; +#endif /* STA_SUPPORT */ + /** Mobility Domain ID */ + t_u16 mdid; + /** FT Capability policy */ + t_u8 ft_cap; +} mlan_bss_info, *pmlan_bss_info; + +/** MAXIMUM number of TID */ +#define MAX_NUM_TID 8 + +/** Max RX Win size */ +#define MAX_RX_WINSIZE 64 + +/** rx_reorder_tbl */ +typedef struct { + /** TID */ + t_u16 tid; + /** TA */ + t_u8 ta[MLAN_MAC_ADDR_LENGTH]; + /** Start window */ + t_u32 start_win; + /** Window size */ + t_u32 win_size; + /** amsdu flag */ + t_u8 amsdu; + /** buffer status */ + t_u32 buffer[MAX_RX_WINSIZE]; +} rx_reorder_tbl; + +/** tx_ba_stream_tbl */ +typedef struct { + /** TID */ + t_u16 tid; + /** RA */ + t_u8 ra[MLAN_MAC_ADDR_LENGTH]; + /** amsdu flag */ + t_u8 amsdu; +} tx_ba_stream_tbl; + +/** Debug command number */ +#define DBG_CMD_NUM 10 + +#ifdef SDIO_MULTI_PORT_TX_AGGR +/** sdio mp debug number */ +#define SDIO_MP_DBG_NUM 10 +#endif + +/** Maximum size of IEEE Information Elements */ +#define IEEE_MAX_IE_SIZE 256 + +/** support up to 8 TDLS peer */ +#define MLAN_MAX_TDLS_PEER_SUPPORTED 8 +/** TDLS peer info */ +typedef struct _tdls_peer_info { + /** station mac address */ + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** SNR */ + t_s8 snr; + /** Noise Floor */ + t_s8 nf; + /** Extended Capabilities IE */ + t_u8 ext_cap[IEEE_MAX_IE_SIZE]; + /** HT Capabilities IE */ + t_u8 ht_cap[IEEE_MAX_IE_SIZE]; + /** VHT Capabilities IE */ + t_u8 vht_cap[IEEE_MAX_IE_SIZE]; +} tdls_peer_info; + +/** max ralist num */ +#define MLAN_MAX_RALIST_NUM 8 +/** ralist info */ +typedef struct _ralist_info { + /** RA list buffer */ + t_u8 ra[MLAN_MAC_ADDR_LENGTH]; + /** total packets in RA list */ + t_u16 total_pkts; + /** tid num */ + t_u8 tid; + /** tx_pause flag */ + t_u8 tx_pause; +} ralist_info; + +/** mlan_debug_info data structure for MLAN_OID_GET_DEBUG_INFO */ +typedef struct _mlan_debug_info { + /* WMM AC_BK count */ + t_u32 wmm_ac_bk; + /* WMM AC_BE count */ + t_u32 wmm_ac_be; + /* WMM AC_VI count */ + t_u32 wmm_ac_vi; + /* WMM AC_VO count */ + t_u32 wmm_ac_vo; + /** Corresponds to max_tx_buf_size member of mlan_adapter*/ + t_u32 max_tx_buf_size; + /** Corresponds to tx_buf_size member of mlan_adapter*/ + t_u32 tx_buf_size; + /** Corresponds to curr_tx_buf_size member of mlan_adapter*/ + t_u32 curr_tx_buf_size; + /** Tx table num */ + t_u32 tx_tbl_num; + /** Tx ba stream table */ + tx_ba_stream_tbl tx_tbl[MLAN_MAX_TX_BASTREAM_SUPPORTED]; + /** Rx table num */ + t_u32 rx_tbl_num; + /** Rx reorder table*/ + rx_reorder_tbl rx_tbl[MLAN_MAX_RX_BASTREAM_SUPPORTED]; + /** TDLS peer number */ + t_u32 tdls_peer_num; + /** TDLS peer list*/ + tdls_peer_info tdls_peer_list[MLAN_MAX_TDLS_PEER_SUPPORTED]; + /** ralist num */ + t_u32 ralist_num; + /** ralist info */ + ralist_info ralist[MLAN_MAX_RALIST_NUM]; + /** Corresponds to ps_mode member of mlan_adapter */ + t_u16 ps_mode; + /** Corresponds to ps_state member of mlan_adapter */ + t_u32 ps_state; +#ifdef STA_SUPPORT + /** Corresponds to is_deep_sleep member of mlan_adapter */ + t_u8 is_deep_sleep; +#endif /** STA_SUPPORT */ + /** Corresponds to pm_wakeup_card_req member of mlan_adapter */ + t_u8 pm_wakeup_card_req; + /** Corresponds to pm_wakeup_fw_try member of mlan_adapter */ + t_u32 pm_wakeup_fw_try; + /** time stamp when host try to wake up firmware */ + t_u32 pm_wakeup_in_secs; + /** Corresponds to is_hs_configured member of mlan_adapter */ + t_u8 is_hs_configured; + /** Corresponds to hs_activated member of mlan_adapter */ + t_u8 hs_activated; + /** Corresponds to pps_uapsd_mode member of mlan_adapter */ + t_u16 pps_uapsd_mode; + /** Corresponds to sleep_period.period member of mlan_adapter */ + t_u16 sleep_pd; + /** Corresponds to wmm_qosinfo member of mlan_private */ + t_u8 qos_cfg; + /** Corresponds to tx_lock_flag member of mlan_adapter */ + t_u8 tx_lock_flag; + /** Corresponds to port_open member of mlan_private */ + t_u8 port_open; + /** bypass pkt count */ + t_u16 bypass_pkt_count; + /** Corresponds to scan_processing member of mlan_adapter */ + t_u32 scan_processing; + /** Number of host to card command failures */ + t_u32 num_cmd_host_to_card_failure; + /** Number of host to card sleep confirm failures */ + t_u32 num_cmd_sleep_cfm_host_to_card_failure; + /** Number of host to card Tx failures */ + t_u32 num_tx_host_to_card_failure; + /** Number of card to host command/event failures */ + t_u32 num_cmdevt_card_to_host_failure; + /** Number of card to host Rx failures */ + t_u32 num_rx_card_to_host_failure; + /** Number of interrupt read failures */ + t_u32 num_int_read_failure; + /** Last interrupt status */ + t_u32 last_int_status; + /** number of interrupt receive */ + t_u32 num_of_irq; + /** FW update port number */ + t_u32 mp_update[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX * 2]; + /** Invalid port update count */ + t_u32 mp_invalid_update; +#ifdef SDIO_MULTI_PORT_TX_AGGR + /** Number of packets tx aggr */ + t_u32 mpa_tx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; + /** no more packets count*/ + t_u32 mpa_sent_last_pkt; + /** no write_ports count */ + t_u32 mpa_sent_no_ports; + /** last recv wr_bitmap */ + t_u32 last_recv_wr_bitmap; + /** last mp_wr_bitmap */ + t_u32 last_mp_wr_bitmap[SDIO_MP_DBG_NUM]; + /** last ports for cmd53 write data */ + t_u32 last_mp_wr_ports[SDIO_MP_DBG_NUM]; + /** last len for cmd53 write data */ + t_u32 last_mp_wr_len[SDIO_MP_DBG_NUM]; + /** last curr_wr_port */ + t_u8 last_curr_wr_port[SDIO_MP_DBG_NUM]; + /** length info for cmd53 write data */ + t_u16 last_mp_wr_info[SDIO_MP_DBG_NUM * SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; + /** last mp_index */ + t_u8 last_mp_index; + /** buffer for mp debug */ + t_u8 *mpa_buf; + /** length info for mp buf size */ + t_u32 mpa_buf_size; +#endif +#ifdef SDIO_MULTI_PORT_RX_AGGR + /** Number of packets rx aggr */ + t_u32 mpa_rx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; +#endif +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + /** mp aggr_pkt limit */ + t_u8 mp_aggr_pkt_limit; +#endif + /** Number of deauthentication events */ + t_u32 num_event_deauth; + /** Number of disassosiation events */ + t_u32 num_event_disassoc; + /** Number of link lost events */ + t_u32 num_event_link_lost; + /** Number of deauthentication commands */ + t_u32 num_cmd_deauth; + /** Number of association comamnd successes */ + t_u32 num_cmd_assoc_success; + /** Number of association command failures */ + t_u32 num_cmd_assoc_failure; + /** Number of Tx timeouts */ + t_u32 num_tx_timeout; + /** Number of command timeouts */ + t_u32 num_cmd_timeout; + /** Number of command timeouts */ + t_u32 dbg_num_cmd_timeout; + /** Timeout command ID */ + t_u16 timeout_cmd_id; + /** Timeout command action */ + t_u16 timeout_cmd_act; + /** List of last command IDs */ + t_u16 last_cmd_id[DBG_CMD_NUM]; + /** List of last command actions */ + t_u16 last_cmd_act[DBG_CMD_NUM]; + /** Last command index */ + t_u16 last_cmd_index; + /** List of last command response IDs */ + t_u16 last_cmd_resp_id[DBG_CMD_NUM]; + /** Last command response index */ + t_u16 last_cmd_resp_index; + /** List of last events */ + t_u16 last_event[DBG_CMD_NUM]; + /** Last event index */ + t_u16 last_event_index; + /** Number of no free command node */ + t_u16 num_no_cmd_node; + /** pending command id */ + t_u16 pending_cmd; + /** time stamp for dnld last cmd */ + t_u32 dnld_cmd_in_secs; + /** Corresponds to data_sent member of mlan_adapter */ + t_u8 data_sent; + /** Corresponds to cmd_sent member of mlan_adapter */ + t_u8 cmd_sent; + /** SDIO multiple port read bitmap */ + t_u32 mp_rd_bitmap; + /** SDIO multiple port write bitmap */ + t_u32 mp_wr_bitmap; + /** Current available port for read */ + t_u8 curr_rd_port; + /** Current available port for write */ + t_u8 curr_wr_port; + /** Corresponds to cmdresp_received member of mlan_adapter */ + t_u8 cmd_resp_received; + /** Corresponds to event_received member of mlan_adapter */ + t_u8 event_received; + /** pendig tx pkts */ + t_u32 tx_pkts_queued; +#ifdef UAP_SUPPORT + /** pending bridge pkts */ + t_u16 num_bridge_pkts; + /** dropped pkts */ + t_u32 num_drop_pkts; +#endif + /** mlan_processing */ + t_u32 mlan_processing; + /** mlan_rx_processing */ + t_u32 mlan_rx_processing; + /** rx pkts queued */ + t_u32 rx_pkts_queued; + /** mlan_adapter pointer */ + t_void *mlan_adapter; + /** mlan_adapter_size */ + t_u32 mlan_adapter_size; + /** mlan_priv vector */ + t_void *mlan_priv[MLAN_MAX_BSS_NUM]; + /** mlan_priv_size */ + t_u32 mlan_priv_size[MLAN_MAX_BSS_NUM]; + /** mlan_priv_num */ + t_u8 mlan_priv_num; +} mlan_debug_info, *pmlan_debug_info; + +#ifdef UAP_SUPPORT +/** Maximum number of clients supported by AP */ +#define MAX_NUM_CLIENTS MAX_STA_COUNT + +/** station info */ +typedef struct _sta_info { + /** STA MAC address */ + t_u8 mac_address[MLAN_MAC_ADDR_LENGTH]; + /** Power mfg status */ + t_u8 power_mfg_status; + /** RSSI */ + t_s8 rssi; +} sta_info; + +/** mlan_ds_sta_list structure for MLAN_OID_UAP_STA_LIST */ +typedef struct _mlan_ds_sta_list { + /** station count */ + t_u16 sta_count; + /** station list */ + sta_info info[MAX_NUM_CLIENTS]; +} mlan_ds_sta_list, *pmlan_ds_sta_list; +#endif + +/** Type definition of mlan_ds_get_info for MLAN_IOCTL_GET_INFO */ +typedef struct _mlan_ds_get_info { + /** Sub-command */ + t_u32 sub_command; + + /** Status information parameter */ + union { + /** Signal information for MLAN_OID_GET_SIGNAL */ + mlan_ds_get_signal signal; + /** Statistics information for MLAN_OID_GET_STATS */ + mlan_ds_get_stats stats; + /** Firmware information for MLAN_OID_GET_FW_INFO */ + mlan_fw_info fw_info; + /** Extended version information for MLAN_OID_GET_VER_EXT */ + mlan_ver_ext ver_ext; + /** BSS information for MLAN_OID_GET_BSS_INFO */ + mlan_bss_info bss_info; + /** Debug information for MLAN_OID_GET_DEBUG_INFO */ + t_u8 debug_info[1]; +#ifdef UAP_SUPPORT + /** UAP Statistics information for MLAN_OID_GET_STATS */ + mlan_ds_uap_stats ustats; + /** UAP station list for MLAN_OID_UAP_STA_LIST */ + mlan_ds_sta_list sta_list; +#endif + } param; +} mlan_ds_get_info, *pmlan_ds_get_info; + +/*-----------------------------------------------------------------*/ +/** Security Configuration Group */ +/*-----------------------------------------------------------------*/ +/** Enumeration for authentication mode */ +enum _mlan_auth_mode { + MLAN_AUTH_MODE_OPEN = 0x00, + MLAN_AUTH_MODE_SHARED = 0x01, + MLAN_AUTH_MODE_FT = 0x02, + MLAN_AUTH_MODE_NETWORKEAP = 0x80, + MLAN_AUTH_MODE_AUTO = 0xFF, +}; + +/**Enumeration for AssocAgent authentication mode, sync from FW.*/ +typedef enum { + AssocAgentAuth_Open, + AssocAgentAuth_Shared, + AssocAgentAuth_FastBss, + AssocAgentAuth_FastBss_Skip, + AssocAgentAuth_Network_EAP, + AssocAgentAuth_Auto, +} AssocAgentAuthType_e; + +/** Enumeration for encryption mode */ +enum _mlan_encryption_mode { + MLAN_ENCRYPTION_MODE_NONE = 0, + MLAN_ENCRYPTION_MODE_WEP40 = 1, + MLAN_ENCRYPTION_MODE_TKIP = 2, + MLAN_ENCRYPTION_MODE_CCMP = 3, + MLAN_ENCRYPTION_MODE_WEP104 = 4, +}; + +/** Enumeration for PSK */ +enum _mlan_psk_type { + MLAN_PSK_PASSPHRASE = 1, + MLAN_PSK_PMK, + MLAN_PSK_CLEAR, + MLAN_PSK_QUERY, +}; + +/** The bit to indicate the key is for unicast */ +#define MLAN_KEY_INDEX_UNICAST 0x40000000 +/** The key index to indicate default key */ +#define MLAN_KEY_INDEX_DEFAULT 0x000000ff +/** Maximum key length */ +/* #define MLAN_MAX_KEY_LENGTH 32 */ +/** Minimum passphrase length */ +#define MLAN_MIN_PASSPHRASE_LENGTH 8 +/** Maximum passphrase length */ +#define MLAN_MAX_PASSPHRASE_LENGTH 63 +/** PMK length */ +#define MLAN_PMK_HEXSTR_LENGTH 64 +/* A few details needed for WEP (Wireless Equivalent Privacy) */ +/** 104 bits */ +#define MAX_WEP_KEY_SIZE 13 +/** 40 bits RC4 - WEP */ +#define MIN_WEP_KEY_SIZE 5 +/** packet number size */ +#define PN_SIZE 16 +/** max seq size of wpa/wpa2 key */ +#define SEQ_MAX_SIZE 8 + +/** key flag for tx_seq */ +#define KEY_FLAG_TX_SEQ_VALID 0x00000001 +/** key flag for rx_seq */ +#define KEY_FLAG_RX_SEQ_VALID 0x00000002 +/** key flag for group key */ +#define KEY_FLAG_GROUP_KEY 0x00000004 +/** key flag for tx */ +#define KEY_FLAG_SET_TX_KEY 0x00000008 +/** key flag for mcast IGTK */ +#define KEY_FLAG_AES_MCAST_IGTK 0x00000010 +/** key flag for remove key */ +#define KEY_FLAG_REMOVE_KEY 0x80000000 + +/** Type definition of mlan_ds_encrypt_key for MLAN_OID_SEC_CFG_ENCRYPT_KEY */ +typedef struct _mlan_ds_encrypt_key { + /** Key disabled, all other fields will be + * ignore when this flag set to MTRUE + */ + t_u32 key_disable; + /** key removed flag, when this flag is set + * to MTRUE, only key_index will be check + */ + t_u32 key_remove; + /** Key index, used as current tx key index + * when is_current_wep_key is set to MTRUE + */ + t_u32 key_index; + /** Current Tx key flag */ + t_u32 is_current_wep_key; + /** Key length */ + t_u32 key_len; + /** Key */ + t_u8 key_material[MLAN_MAX_KEY_LENGTH]; + /** mac address */ + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** wapi key flag */ + t_u32 is_wapi_key; + /** Initial packet number */ + t_u8 pn[PN_SIZE]; + /** key flags */ + t_u32 key_flags; +} mlan_ds_encrypt_key, *pmlan_ds_encrypt_key; + +/** Type definition of mlan_passphrase_t */ +typedef struct _mlan_passphrase_t { + /** Length of passphrase */ + t_u32 passphrase_len; + /** Passphrase */ + t_u8 passphrase[MLAN_MAX_PASSPHRASE_LENGTH]; +} mlan_passphrase_t; + +/** Type defnition of mlan_pmk_t */ +typedef struct _mlan_pmk_t { + /** PMK */ + t_u8 pmk[MLAN_MAX_KEY_LENGTH]; +} mlan_pmk_t; + +/** Embedded supplicant RSN type: No RSN */ +#define RSN_TYPE_NO_RSN MBIT(0) +/** Embedded supplicant RSN type: WPA */ +#define RSN_TYPE_WPA MBIT(3) +/** Embedded supplicant RSN type: WPA-NONE */ +#define RSN_TYPE_WPANONE MBIT(4) +/** Embedded supplicant RSN type: WPA2 */ +#define RSN_TYPE_WPA2 MBIT(5) +/** Embedded supplicant RSN type: RFU */ +#define RSN_TYPE_VALID_BITS (RSN_TYPE_NO_RSN | RSN_TYPE_WPA | RSN_TYPE_WPANONE | RSN_TYPE_WPA2) + +/** Embedded supplicant cipher type: TKIP */ +#define EMBED_CIPHER_TKIP MBIT(2) +/** Embedded supplicant cipher type: AES */ +#define EMBED_CIPHER_AES MBIT(3) +/** Embedded supplicant cipher type: RFU */ +#define EMBED_CIPHER_VALID_BITS (EMBED_CIPHER_TKIP | EMBED_CIPHER_AES) + +/** Type definition of mlan_ds_passphrase for MLAN_OID_SEC_CFG_PASSPHRASE */ +typedef struct _mlan_ds_passphrase { + /** SSID may be used */ + mlan_802_11_ssid ssid; + /** BSSID may be used */ + mlan_802_11_mac_addr bssid; + /** Flag for passphrase or pmk used */ + t_u16 psk_type; + /** Passphrase or PMK */ + union { + /** Passphrase */ + mlan_passphrase_t passphrase; + /** PMK */ + mlan_pmk_t pmk; + } psk; +} mlan_ds_passphrase, *pmlan_ds_passphrase; + +/** Type definition of mlan_ds_esupp_mode for MLAN_OID_SEC_CFG_ESUPP_MODE */ +typedef struct _mlan_ds_ewpa_mode { + /** RSN mode */ + t_u32 rsn_mode; + /** Active pairwise cipher */ + t_u32 act_paircipher; + /** Active pairwise cipher */ + t_u32 act_groupcipher; +} mlan_ds_esupp_mode, *pmlan_ds_esupp_mode; + +/** Type definition of mlan_ds_sec_cfg for MLAN_IOCTL_SEC_CFG */ +typedef struct _mlan_ds_sec_cfg { + /** Sub-command */ + t_u32 sub_command; + /** Security configuration parameter */ + union { + /** Authentication mode for MLAN_OID_SEC_CFG_AUTH_MODE */ + t_u32 auth_mode; + /** Encryption mode for MLAN_OID_SEC_CFG_ENCRYPT_MODE */ + t_u32 encrypt_mode; + /** WPA enabled flag for MLAN_OID_SEC_CFG_WPA_ENABLED */ + t_u32 wpa_enabled; + /** WAPI enabled flag for MLAN_OID_SEC_CFG_WAPI_ENABLED */ + t_u32 wapi_enabled; + /** Port Control enabled flag for MLAN_OID_SEC_CFG_PORT_CTRL */ + t_u32 port_ctrl_enabled; + /** Encryption key for MLAN_OID_SEC_CFG_ENCRYPT_KEY */ + mlan_ds_encrypt_key encrypt_key; + /** Passphrase for MLAN_OID_SEC_CFG_PASSPHRASE */ + mlan_ds_passphrase passphrase; + /** Embedded supplicant WPA enabled flag for + * MLAN_OID_SEC_CFG_EWPA_ENABLED + */ + t_u32 ewpa_enabled; + /** Embedded supplicant mode for MLAN_OID_SEC_CFG_ESUPP_MODE */ + mlan_ds_esupp_mode esupp_mode; +#ifdef UAP_SUPPORT + t_u8 sta_mac[MLAN_MAC_ADDR_LENGTH]; +#endif + } param; +} mlan_ds_sec_cfg, *pmlan_ds_sec_cfg; + +/*-----------------------------------------------------------------*/ +/** Rate Configuration Group */ +/*-----------------------------------------------------------------*/ +/** Enumeration for rate type */ +enum _mlan_rate_type { + MLAN_RATE_INDEX, + MLAN_RATE_VALUE, + MLAN_RATE_BITMAP +}; + +/** Enumeration for rate format */ +enum _mlan_rate_format { + MLAN_RATE_FORMAT_LG = 0, + MLAN_RATE_FORMAT_HT, + MLAN_RATE_FORMAT_VHT, + MLAN_RATE_FORMAT_AUTO = 0xFF, +}; +/** Max bitmap rates size */ +#define MAX_BITMAP_RATES_SIZE 18 + +/** Type definition of mlan_rate_cfg_t for MLAN_OID_RATE_CFG */ +typedef struct _mlan_rate_cfg_t { + /** Fixed rate: 0, auto rate: 1 */ + t_u32 is_rate_auto; + /** Rate type. 0: index; 1: value; 2: bitmap */ + t_u32 rate_type; + /** Rate/MCS index or rate value if fixed rate */ + t_u32 rate; + /** Rate Bitmap */ + t_u16 bitmap_rates[MAX_BITMAP_RATES_SIZE]; + /** NSS */ + t_u32 nss; + /* LG rate: 0, HT rate: 1, VHT rate: 2 */ + t_u32 rate_format; +} mlan_rate_cfg_t; + +/** HT channel bandwidth */ +typedef enum _mlan_ht_bw { + MLAN_HT_BW20, + MLAN_HT_BW40, +/** VHT channel bandwidth */ + MLAN_VHT_BW80, + MLAN_VHT_BW160, +} mlan_ht_bw; + +/** HT guard interval */ +typedef enum _mlan_ht_gi { + MLAN_HT_LGI, + MLAN_HT_SGI, +} mlan_ht_gi; + +typedef enum _mlan_vht_stbc { + MLAN_VHT_STBC, + MLAN_VHT_NO_STBC, +} mlan_vht_stbc; + +typedef enum _mlan_vht_ldpc { + MLAN_VHT_LDPC, + MLAN_VHT_NO_LDPC, +} mlan_vht_ldpc; + +/** Band and BSS mode */ +typedef struct _mlan_band_data_rate { + /** Band configuration */ + t_u8 config_bands; + /** BSS mode (Infra or IBSS) */ + t_u8 bss_mode; +} mlan_band_data_rate; + +/** Type definition of mlan_data_rate for MLAN_OID_GET_DATA_RATE */ +typedef struct _mlan_data_rate { + /** Tx data rate */ + t_u32 tx_data_rate; + /** Rx data rate */ + t_u32 rx_data_rate; + + /** Tx channel bandwidth */ + t_u32 tx_ht_bw; + /** Tx guard interval */ + t_u32 tx_ht_gi; + /** Rx channel bandwidth */ + t_u32 rx_ht_bw; + /** Rx guard interval */ + t_u32 rx_ht_gi; + /** MCS index */ + t_u32 tx_mcs_index; + t_u32 rx_mcs_index; + /** NSS */ + t_u32 tx_nss; + t_u32 rx_nss; + /* LG rate: 0, HT rate: 1, VHT rate: 2 */ + t_u32 tx_rate_format; + t_u32 rx_rate_format; +} mlan_data_rate; + +/** Type definition of mlan_ds_rate for MLAN_IOCTL_RATE */ +typedef struct _mlan_ds_rate { + /** Sub-command */ + t_u32 sub_command; + /** Rate configuration parameter */ + union { + /** Rate configuration for MLAN_OID_RATE_CFG */ + mlan_rate_cfg_t rate_cfg; + /** Data rate for MLAN_OID_GET_DATA_RATE */ + mlan_data_rate data_rate; + /** Supported rates for MLAN_OID_SUPPORTED_RATES */ + t_u8 rates[MLAN_SUPPORTED_RATES]; + /** Band/BSS mode for getting supported rates */ + mlan_band_data_rate rate_band_cfg; + } param; +} mlan_ds_rate, *pmlan_ds_rate; + +/*-----------------------------------------------------------------*/ +/** Power Configuration Group */ +/*-----------------------------------------------------------------*/ + +/** Type definition of mlan_power_cfg_t for MLAN_OID_POWER_CFG */ +typedef struct _mlan_power_cfg_t { + /** Is power auto */ + t_u32 is_power_auto; + /** Power level in dBm */ + t_s32 power_level; +} mlan_power_cfg_t; + +/** max power table size */ +#define MAX_POWER_TABLE_SIZE 128 +#define TX_PWR_CFG_AUTO_CTRL_OFF 0xFF +#define MAX_POWER_GROUP 64 +/** Type definition of mlan_power group info */ +typedef struct mlan_power_group { + + /** rate format (LG: 0, HT: 1, VHT: 2, no auto ctrl: 0xFF) */ + t_u32 rate_format; + /** bandwidth (LG: 20 MHz, HT: 20/40 MHz, VHT: 80/160/80+80 MHz) */ + t_u8 bandwidth; + /** NSS */ + t_u32 nss; + /** LG: first rate index, HT/VHT: first MCS */ + t_u8 first_rate_ind; + /** LG: last rate index, HT/VHT: last MCS */ + t_u8 last_rate_ind; + /** minmum tx power (dBm) */ + t_s8 power_min; + /** maximum tx power (dBm) */ + t_s8 power_max; + /** tx power step (dB) */ + t_s8 power_step; +} mlan_power_group; + +/** Type definition of mlan_power_cfg_ext for MLAN_OID_POWER_CFG_EXT */ +typedef struct _mlan_power_cfg_ext { + /** number of power_groups */ + t_u32 num_pwr_grp; + /** array of power groups */ + mlan_power_group power_group[MAX_POWER_GROUP]; +} mlan_power_cfg_ext; + +/** Type definition of mlan_ds_power_cfg for MLAN_IOCTL_POWER_CFG */ +typedef struct _mlan_ds_power_cfg { + /** Sub-command */ + t_u32 sub_command; + /** Power configuration parameter */ + union { + /** Power configuration for MLAN_OID_POWER_CFG */ + mlan_power_cfg_t power_cfg; + /** Extended power configuration for MLAN_OID_POWER_CFG_EXT */ + mlan_power_cfg_ext power_ext; + } param; +} mlan_ds_power_cfg, *pmlan_ds_power_cfg; + +/*-----------------------------------------------------------------*/ +/** Power Management Configuration Group */ +/*-----------------------------------------------------------------*/ +/** Host sleep config conditions : Cancel */ +#define HOST_SLEEP_CFG_CANCEL 0xffffffff + +/** Host sleep config condition: broadcast data */ +#define HOST_SLEEP_COND_BROADCAST_DATA MBIT(0) +/** Host sleep config condition: unicast data */ +#define HOST_SLEEP_COND_UNICAST_DATA MBIT(1) +/** Host sleep config condition: mac event */ +#define HOST_SLEEP_COND_MAC_EVENT MBIT(2) +/** Host sleep config condition: multicast data */ +#define HOST_SLEEP_COND_MULTICAST_DATA MBIT(3) +/** Host sleep config condition: IPV6 packet */ +#define HOST_SLEEP_COND_IPV6_PACKET MBIT(31) + +/** Host sleep config conditions: Default */ +#define HOST_SLEEP_DEF_COND (HOST_SLEEP_COND_BROADCAST_DATA | HOST_SLEEP_COND_UNICAST_DATA | HOST_SLEEP_COND_MAC_EVENT) +/** Host sleep config GPIO : Default */ +#define HOST_SLEEP_DEF_GPIO 0xff +/** Host sleep config gap : Default */ +#define HOST_SLEEP_DEF_GAP 200 +/** Host sleep config min wake holdoff */ +#define HOST_SLEEP_DEF_WAKE_HOLDOFF 0; + +/** Type definition of mlan_ds_hs_cfg for MLAN_OID_PM_CFG_HS_CFG */ +typedef struct _mlan_ds_hs_cfg { + /** MTRUE to invoke the HostCmd, MFALSE otherwise */ + t_u32 is_invoke_hostcmd; + /** Host sleep config condition */ + /** Bit0: broadcast data + * Bit1: unicast data + * Bit2: mac event + * Bit3: multicast data + */ + t_u32 conditions; + /** GPIO pin or 0xff for interface */ + t_u32 gpio; + /** Gap in milliseconds or or 0xff for special + * setting when GPIO is used to wakeup host + */ + t_u32 gap; +} mlan_ds_hs_cfg, *pmlan_ds_hs_cfg; + +/** Enable deep sleep mode */ +#define DEEP_SLEEP_ON 1 +/** Disable deep sleep mode */ +#define DEEP_SLEEP_OFF 0 + +/** Default idle time in milliseconds for auto deep sleep */ +#define DEEP_SLEEP_IDLE_TIME 100 + +typedef struct _mlan_ds_auto_ds { + /** auto ds mode, 0 - disable, 1 - enable */ + t_u16 auto_ds; + /** auto ds idle time in milliseconds */ + t_u16 idletime; +} mlan_ds_auto_ds; + +/** Type definition of mlan_ds_inactivity_to + * for MLAN_OID_PM_CFG_INACTIVITY_TO + */ +typedef struct _mlan_ds_inactivity_to { + /** Timeout unit in microsecond, 0 means 1000us (1ms) */ + t_u32 timeout_unit; + /** Inactivity timeout for unicast data */ + t_u32 unicast_timeout; + /** Inactivity timeout for multicast data */ + t_u32 mcast_timeout; + /** Timeout for additional Rx traffic after Null PM1 packet exchange */ + t_u32 ps_entry_timeout; +} mlan_ds_inactivity_to, *pmlan_ds_inactivity_to; + +/** Minimum sleep period in milliseconds */ +#define MIN_SLEEP_PERIOD 10 +/** Maximum sleep period in milliseconds */ +#define MAX_SLEEP_PERIOD 60 +/** Special setting for UPSD certification tests */ +#define SLEEP_PERIOD_RESERVED_FF 0xFF + +/** PS null interval disable */ +#define PS_NULL_DISABLE (-1) + +/** Local listen interval disable */ +#define MRVDRV_LISTEN_INTERVAL_DISABLE (-1) +/** Minimum listen interval */ +#define MRVDRV_MIN_LISTEN_INTERVAL 0 + +/** Minimum multiple DTIM */ +#define MRVDRV_MIN_MULTIPLE_DTIM 0 +/** Maximum multiple DTIM */ +#define MRVDRV_MAX_MULTIPLE_DTIM 5 +/** Ignore multiple DTIM */ +#define MRVDRV_IGNORE_MULTIPLE_DTIM 0xfffe +/** Match listen interval to closest DTIM */ +#define MRVDRV_MATCH_CLOSEST_DTIM 0xfffd + +/** Minimum adhoc awake period */ +#define MIN_ADHOC_AWAKE_PD 0 +/** Maximum adhoc awake period */ +#define MAX_ADHOC_AWAKE_PD 31 +/** Special adhoc awake period */ +#define SPECIAL_ADHOC_AWAKE_PD 255 + +/** Minimum beacon miss timeout in milliseconds */ +#define MIN_BCN_MISS_TO 0 +/** Maximum beacon miss timeout in milliseconds */ +#define MAX_BCN_MISS_TO 50 +/** Disable beacon miss timeout */ +#define DISABLE_BCN_MISS_TO 65535 + +/** Minimum delay to PS in milliseconds */ +#define MIN_DELAY_TO_PS 0 +/** Maximum delay to PS in milliseconds */ +#define MAX_DELAY_TO_PS 65535 +/** Delay to PS unchanged */ +#define DELAY_TO_PS_UNCHANGED (-1) +/** Default delay to PS in milliseconds */ +#define DELAY_TO_PS_DEFAULT 1000 + +/** PS mode: Unchanged */ +#define PS_MODE_UNCHANGED 0 +/** PS mode: Auto */ +#define PS_MODE_AUTO 1 +/** PS mode: Poll */ +#define PS_MODE_POLL 2 +/** PS mode: Null */ +#define PS_MODE_NULL 3 + +/** Type definition of mlan_ds_ps_cfg for MLAN_OID_PM_CFG_PS_CFG */ +typedef struct _mlan_ds_ps_cfg { + /** PS null interval in seconds */ + t_u32 ps_null_interval; + /** Multiple DTIM interval */ + t_u32 multiple_dtim_interval; + /** Listen interval */ + t_u32 listen_interval; + /** Adhoc awake period */ + t_u32 adhoc_awake_period; + /** Beacon miss timeout in milliseconds */ + t_u32 bcn_miss_timeout; + /** Delay to PS in milliseconds */ + t_s32 delay_to_ps; + /** PS mode */ + t_u32 ps_mode; +} mlan_ds_ps_cfg, *pmlan_ds_ps_cfg; + +/** Type definition of mlan_ds_sleep_params for MLAN_OID_PM_CFG_SLEEP_PARAMS */ +typedef struct _mlan_ds_sleep_params { + /** Error */ + t_u32 error; + /** Offset in microseconds */ + t_u32 offset; + /** Stable time in microseconds */ + t_u32 stable_time; + /** Calibration control */ + t_u32 cal_control; + /** External sleep clock */ + t_u32 ext_sleep_clk; + /** Reserved */ + t_u32 reserved; +} mlan_ds_sleep_params, *pmlan_ds_sleep_params; + +/** sleep_param */ +typedef struct _ps_sleep_param { + /** control bitmap */ + t_u32 ctrl_bitmap; + /** minimum sleep period (micro second) */ + t_u32 min_sleep; + /** maximum sleep period (micro second) */ + t_u32 max_sleep; +} ps_sleep_param; + +/** inactivity sleep_param */ +typedef struct _inact_sleep_param { + /** inactivity timeout (micro second) */ + t_u32 inactivity_to; + /** miniumu awake period (micro second) */ + t_u32 min_awake; + /** maximum awake period (micro second) */ + t_u32 max_awake; +} inact_sleep_param; + +/** flag for ps mode */ +#define PS_FLAG_PS_MODE 1 +/** flag for sleep param */ +#define PS_FLAG_SLEEP_PARAM 2 +/** flag for inactivity sleep param */ +#define PS_FLAG_INACT_SLEEP_PARAM 4 + +/** Disable power mode */ +#define PS_MODE_DISABLE 0 +/** Enable periodic dtim ps */ +#define PS_MODE_PERIODIC_DTIM 1 +/** Enable inactivity ps */ +#define PS_MODE_INACTIVITY 2 + +/** mlan_ds_ps_mgmt */ +typedef struct _mlan_ds_ps_mgmt { + /** flags for valid field */ + t_u16 flags; + /** power mode */ + t_u16 ps_mode; + /** sleep param */ + ps_sleep_param sleep_param; + /** inactivity sleep param */ + inact_sleep_param inact_param; +} mlan_ds_ps_mgmt; + +/** mlan_ds_ps_info */ +typedef struct _mlan_ds_ps_info { + /** suspend allowed flag */ + t_u32 is_suspend_allowed; +} mlan_ds_ps_info; + +/** Type definition of mlan_ds_wakeup_reason for MLAN_OID_PM_HS_WAKEUP_REASON */ +typedef struct _mlan_ds_hs_wakeup_reason { + t_u16 hs_wakeup_reason; +} mlan_ds_hs_wakeup_reason; + +/** Type definition of mlan_ds_pm_cfg for MLAN_IOCTL_PM_CFG */ +typedef struct _mlan_ds_pm_cfg { + /** Sub-command */ + t_u32 sub_command; + /** Power management parameter */ + union { + /** Power saving mode for MLAN_OID_PM_CFG_IEEE_PS */ + t_u32 ps_mode; + /** Host Sleep configuration for MLAN_OID_PM_CFG_HS_CFG */ + mlan_ds_hs_cfg hs_cfg; + /** Deep sleep mode for MLAN_OID_PM_CFG_DEEP_SLEEP */ + mlan_ds_auto_ds auto_deep_sleep; + /** Inactivity timeout for MLAN_OID_PM_CFG_INACTIVITY_TO */ + mlan_ds_inactivity_to inactivity_to; + /** Sleep period for MLAN_OID_PM_CFG_SLEEP_PD */ + t_u32 sleep_period; + /** PS configuration parameters for MLAN_OID_PM_CFG_PS_CFG */ + mlan_ds_ps_cfg ps_cfg; + /** PS configuration parameters for MLAN_OID_PM_CFG_SLEEP_PARAMS */ + mlan_ds_sleep_params sleep_params; + /** PS configuration parameters for MLAN_OID_PM_CFG_PS_MODE */ + mlan_ds_ps_mgmt ps_mgmt; + /** power info for MLAN_OID_PM_INFO */ + mlan_ds_ps_info ps_info; + /** hs wakeup reason for MLAN_OID_PM_HS_WAKEUP_REASON */ + mlan_ds_hs_wakeup_reason wakeup_reason; + } param; +} mlan_ds_pm_cfg, *pmlan_ds_pm_cfg; + +#ifdef RX_PACKET_COALESCE +typedef struct { + mlan_cmd_result_e cmd_result; /**< Firmware execution result */ + + t_u32 pkt_threshold; + /** Packet threshold */ + t_u16 delay; + /** Timeout value in milliseconds */ +} wlan_ioctl_rx_pkt_coalesce_config_t; +#endif + +/*-----------------------------------------------------------------*/ +/** WMM Configuration Group */ +/*-----------------------------------------------------------------*/ + +/** WMM TSpec size */ +#define MLAN_WMM_TSPEC_SIZE 63 +/** WMM Add TS extra IE bytes */ +#define MLAN_WMM_ADDTS_EXTRA_IE_BYTES 256 +/** WMM statistics for packets hist bins */ +#define MLAN_WMM_STATS_PKTS_HIST_BINS 7 +/** Maximum number of AC QOS queues available */ +#define MLAN_WMM_MAX_AC_QUEUES 4 + +/** + * @brief IOCTL structure to send an ADDTS request and retrieve the response. + * + * IOCTL structure from the application layer relayed to firmware to + * instigate an ADDTS management frame with an appropriate TSPEC IE as well + * as any additional IEs appended in the ADDTS Action frame. + * + * @sa woal_wmm_addts_req_ioctl + */ +typedef struct { + mlan_cmd_result_e cmd_result; /**< Firmware execution result */ + + t_u32 timeout_ms; /**< Timeout value in milliseconds */ + t_u8 ieee_status_code; /**< IEEE status code */ + + t_u32 ie_data_len; /**< Length of ie block in ie_data */ + t_u8 ie_data[MLAN_WMM_TSPEC_SIZE + /**< TSPEC to send in the ADDTS */ + + MLAN_WMM_ADDTS_EXTRA_IE_BYTES]; + /**< Extra IE buf*/ +} wlan_ioctl_wmm_addts_req_t; + +/** + * @brief IOCTL structure to send a DELTS request. + * + * IOCTL structure from the application layer relayed to firmware to + * instigate an DELTS management frame with an appropriate TSPEC IE. + * + * @sa woal_wmm_delts_req_ioctl + */ +typedef struct { + mlan_cmd_result_e cmd_result; + /**< Firmware execution result */ + t_u8 ieee_reason_code; /**< IEEE reason code sent, unused for WMM */ + t_u32 ie_data_len; /**< Length of ie block in ie_data */ + t_u8 ie_data[MLAN_WMM_TSPEC_SIZE]; + /**< TSPEC to send in the DELTS */ +} wlan_ioctl_wmm_delts_req_t; + +/** + * @brief IOCTL structure to configure a specific AC Queue's parameters + * + * IOCTL structure from the application layer relayed to firmware to + * get, set, or default the WMM AC queue parameters. + * + * - msdu_lifetime_expiry is ignored if set to 0 on a set command + * + * @sa woal_wmm_queue_config_ioctl + */ +typedef struct { + mlan_wmm_queue_config_action_e action;/**< Set, Get, or Default */ + mlan_wmm_ac_e access_category; /**< WMM_AC_BK(0) to WMM_AC_VO(3) */ + t_u16 msdu_lifetime_expiry; /**< lifetime expiry in TUs */ + t_u8 supported_rates[10]; /**< Not supported yet */ +} wlan_ioctl_wmm_queue_config_t; + +/** + * @brief IOCTL structure to start, stop, and get statistics for a WMM AC + * + * IOCTL structure from the application layer relayed to firmware to + * start or stop statistical collection for a given AC. Also used to + * retrieve and clear the collected stats on a given AC. + * + * @sa woal_wmm_queue_stats_ioctl + */ +typedef struct { + /** Action of Queue Config : Start, Stop, or Get */ + mlan_wmm_queue_stats_action_e action; + /** User Priority */ + t_u8 user_priority; + /** Number of successful packets transmitted */ + t_u16 pkt_count; + /** Packets lost; not included in pkt_count */ + t_u16 pkt_loss; + /** Average Queue delay in microseconds */ + t_u32 avg_queue_delay; + /** Average Transmission delay in microseconds */ + t_u32 avg_tx_delay; + /** Calculated used time in units of 32 microseconds */ + t_u16 used_time; + /** Calculated policed time in units of 32 microseconds */ + t_u16 policed_time; + /** Queue Delay Histogram; number of packets per queue delay range + * + * [0] - 0ms <= delay < 5ms + * [1] - 5ms <= delay < 10ms + * [2] - 10ms <= delay < 20ms + * [3] - 20ms <= delay < 30ms + * [4] - 30ms <= delay < 40ms + * [5] - 40ms <= delay < 50ms + * [6] - 50ms <= delay < msduLifetime (TUs) + */ + t_u16 delay_histogram[MLAN_WMM_STATS_PKTS_HIST_BINS]; +} wlan_ioctl_wmm_queue_stats_t, +/** Type definition of mlan_ds_wmm_queue_stats + * for MLAN_OID_WMM_CFG_QUEUE_STATS + */ +mlan_ds_wmm_queue_stats, *pmlan_ds_wmm_queue_stats; + +/** + * @brief IOCTL sub structure for a specific WMM AC Status + */ +typedef struct { + /** WMM Acm */ + t_u8 wmm_acm; + /** Flow required flag */ + t_u8 flow_required; + /** Flow created flag */ + t_u8 flow_created; + /** Disabled flag */ + t_u8 disabled; +} wlan_ioctl_wmm_queue_status_ac_t; + +/** + * @brief IOCTL structure to retrieve the WMM AC Queue status + * + * IOCTL structure from the application layer to retrieve: + * - ACM bit setting for the AC + * - Firmware status (flow required, flow created, flow disabled) + * + * @sa woal_wmm_queue_status_ioctl + */ +typedef struct { + /** WMM AC queue status */ + wlan_ioctl_wmm_queue_status_ac_t ac_status[MLAN_WMM_MAX_AC_QUEUES]; +} wlan_ioctl_wmm_queue_status_t, +/** Type definition of mlan_ds_wmm_queue_status + * for MLAN_OID_WMM_CFG_QUEUE_STATUS + */ +mlan_ds_wmm_queue_status, *pmlan_ds_wmm_queue_status; + +/** Type definition of mlan_ds_wmm_addts for MLAN_OID_WMM_CFG_ADDTS */ +typedef struct _mlan_ds_wmm_addts { + /** Result of ADDTS request */ + mlan_cmd_result_e result; + /** Timeout value in milliseconds */ + t_u32 timeout; + /** IEEE status code */ + t_u32 status_code; + /** Dialog token */ + t_u8 dialog_tok; + /** TSPEC data length */ + t_u32 ie_data_len; + /** TSPEC to send in the ADDTS + buffering for any extra IEs */ + t_u8 ie_data[MLAN_WMM_TSPEC_SIZE + MLAN_WMM_ADDTS_EXTRA_IE_BYTES]; +} mlan_ds_wmm_addts, *pmlan_ds_wmm_addts; + +/** Type definition of mlan_ds_wmm_delts for MLAN_OID_WMM_CFG_DELTS */ +typedef struct _mlan_ds_wmm_delts { + /** Result of DELTS request */ + mlan_cmd_result_e result; + /** IEEE status code */ + t_u32 status_code; + /** TSPEC data length */ + t_u8 ie_data_len; + /** TSPEC to send in the DELTS */ + t_u8 ie_data[MLAN_WMM_TSPEC_SIZE]; +} mlan_ds_wmm_delts, *pmlan_ds_wmm_delts; + +/** Type definition of mlan_ds_wmm_queue_config + * for MLAN_OID_WMM_CFG_QUEUE_CONFIG + */ +typedef struct _mlan_ds_wmm_queue_config { + /** Action of Queue Config : Set, Get, or Default */ + mlan_wmm_queue_config_action_e action; + /** WMM Access Category: WMM_AC_BK(0) to WMM_AC_VO(3) */ + mlan_wmm_ac_e access_category; + /** Lifetime expiry in TUs */ + t_u16 msdu_lifetime_expiry; + /** Reserve for future use */ + t_u8 reserved[10]; +} mlan_ds_wmm_queue_config, *pmlan_ds_wmm_queue_config; + +/** Type definition of mlan_ds_wmm_cfg for MLAN_IOCTL_WMM_CFG */ +typedef struct _mlan_ds_wmm_cfg { + /** Sub-command */ + t_u32 sub_command; + /** WMM configuration parameter */ + union { + /** WMM enable for MLAN_OID_WMM_CFG_ENABLE */ + t_u32 wmm_enable; + /** QoS configuration for MLAN_OID_WMM_CFG_QOS */ + t_u8 qos_cfg; + /** WMM add TS for MLAN_OID_WMM_CFG_ADDTS */ + mlan_ds_wmm_addts addts; + /** WMM delete TS for MLAN_OID_WMM_CFG_DELTS */ + mlan_ds_wmm_delts delts; + /** WMM queue configuration for MLAN_OID_WMM_CFG_QUEUE_CONFIG */ + mlan_ds_wmm_queue_config q_cfg; + /** WMM queue status for MLAN_OID_WMM_CFG_QUEUE_STATS */ + mlan_ds_wmm_queue_stats q_stats; + /** WMM queue status for MLAN_OID_WMM_CFG_QUEUE_STATUS */ + mlan_ds_wmm_queue_status q_status; + /** WMM TS status for MLAN_OID_WMM_CFG_TS_STATUS */ + mlan_ds_wmm_ts_status ts_status; + } param; +} mlan_ds_wmm_cfg, *pmlan_ds_wmm_cfg; + +/*-----------------------------------------------------------------*/ +/** WPS Configuration Group */ +/*-----------------------------------------------------------------*/ +/** Enumeration for WPS session */ +enum _mlan_wps_status { + MLAN_WPS_CFG_SESSION_START = 1, + MLAN_WPS_CFG_SESSION_END = 0 +}; + +/** Type definition of mlan_ds_wps_cfg for MLAN_IOCTL_WPS_CFG */ +typedef struct _mlan_ds_wps_cfg { + /** Sub-command */ + t_u32 sub_command; + /** WPS configuration parameter */ + union { + /** WPS session for MLAN_OID_WPS_CFG_SESSION */ + t_u32 wps_session; + } param; +} mlan_ds_wps_cfg, *pmlan_ds_wps_cfg; + +/*-----------------------------------------------------------------*/ +/** 802.11n Configuration Group */ +/*-----------------------------------------------------------------*/ +/** Maximum MCS */ +#define NUM_MCS_FIELD 16 + +/** Supported stream modes */ +#define HT_STREAM_MODE_1X1 0x11 +#define HT_STREAM_MODE_2X2 0x22 + +/* Both 2.4G and 5G band selected */ +#define BAND_SELECT_BOTH 0 +/* Band 2.4G selected */ +#define BAND_SELECT_BG 1 +/* Band 5G selected */ +#define BAND_SELECT_A 2 + +/** Type definition of mlan_ds_11n_htcap_cfg for MLAN_OID_11N_HTCAP_CFG */ +typedef struct _mlan_ds_11n_htcap_cfg { + /** HT Capability information */ + t_u32 htcap; + /** Band selection */ + t_u32 misc_cfg; + /** Hardware HT cap information required */ + t_u32 hw_cap_req; +} mlan_ds_11n_htcap_cfg, *pmlan_ds_11n_htcap_cfg; + +/** Type definition of mlan_ds_11n_addba_param + * for MLAN_OID_11N_CFG_ADDBA_PARAM + */ +typedef struct _mlan_ds_11n_addba_param { + /** Timeout */ + t_u32 timeout; + /** Buffer size for ADDBA request */ + t_u32 txwinsize; + /** Buffer size for ADDBA response */ + t_u32 rxwinsize; + /** amsdu for ADDBA request */ + t_u8 txamsdu; + /** amsdu for ADDBA response */ + t_u8 rxamsdu; +} mlan_ds_11n_addba_param, *pmlan_ds_11n_addba_param; + +/** Type definition of mlan_ds_11n_tx_cfg for MLAN_OID_11N_CFG_TX */ +typedef struct _mlan_ds_11n_tx_cfg { + /** HTTxCap */ + t_u16 httxcap; + /** HTTxInfo */ + t_u16 httxinfo; + /** Band selection */ + t_u32 misc_cfg; +} mlan_ds_11n_tx_cfg, *pmlan_ds_11n_tx_cfg; + +/** BF Global Configuration */ +#define BF_GLOBAL_CONFIGURATION 0x00 +/** Performs NDP sounding for PEER specified */ +#define TRIGGER_SOUNDING_FOR_PEER 0x01 +/** TX BF interval for channel sounding */ +#define SET_GET_BF_PERIODICITY 0x02 +/** Tell FW not to perform any sounding for peer */ +#define TX_BF_FOR_PEER_ENBL 0x03 +/** TX BF SNR threshold for peer */ +#define SET_SNR_THR_PEER 0x04 + +/* Maximum number of peer MAC and status/SNR tuples */ +#define MAX_PEER_MAC_TUPLES 10 + +/** Any new subcommand structure should be declare here */ + +/** bf global cfg args */ +typedef struct _mlan_bf_global_cfg_args { + /** Global enable/disable bf */ + t_u8 bf_enbl; + /** Global enable/disable sounding */ + t_u8 sounding_enbl; + /** FB Type */ + t_u8 fb_type; + /** SNR Threshold */ + t_u8 snr_threshold; + /** Sounding interval in milliseconds */ + t_u16 sounding_interval; + /** BF mode */ + t_u8 bf_mode; + /** Reserved */ + t_u8 reserved; +} mlan_bf_global_cfg_args; + +/** trigger sounding args */ +typedef struct _mlan_trigger_sound_args { + /** Peer MAC address */ + t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; + /** Status */ + t_u8 status; +} mlan_trigger_sound_args; + +/** bf periodicity args */ +typedef struct _mlan_bf_periodicity_args { + /** Peer MAC address */ + t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; + /** Current Tx BF Interval in milliseconds */ + t_u16 interval; + /** Status */ + t_u8 status; +} mlan_bf_periodicity_args; + +/** tx bf peer args */ +typedef struct _mlan_tx_bf_peer_args { + /** Peer MAC address */ + t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; + /** Reserved */ + t_u16 reserved; + /** Enable/Disable Beamforming */ + t_u8 bf_enbl; + /** Enable/Disable sounding */ + t_u8 sounding_enbl; + /** FB Type */ + t_u8 fb_type; +} mlan_tx_bf_peer_args; + +/** SNR threshold args */ +typedef struct _mlan_snr_thr_args { + /** Peer MAC address */ + t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; + /** SNR for peer */ + t_u8 snr; +} mlan_snr_thr_args; + +/** Type definition of mlan_ds_11n_tx_bf_cfg for MLAN_OID_11N_CFG_TX_BF_CFG */ +typedef struct _mlan_ds_11n_tx_bf_cfg { + /** BF Action */ + t_u16 bf_action; + /** Action */ + t_u16 action; + /** Number of peers */ + t_u32 no_of_peers; + union { + mlan_bf_global_cfg_args bf_global_cfg; + mlan_trigger_sound_args bf_sound[MAX_PEER_MAC_TUPLES]; + mlan_bf_periodicity_args bf_periodicity[MAX_PEER_MAC_TUPLES]; + mlan_tx_bf_peer_args tx_bf_peer[MAX_PEER_MAC_TUPLES]; + mlan_snr_thr_args bf_snr[MAX_PEER_MAC_TUPLES]; + } body; +} mlan_ds_11n_tx_bf_cfg, *pmlan_ds_11n_tx_bf_cfg; + +/** Type definition of mlan_ds_11n_amsdu_aggr_ctrl for + * MLAN_OID_11N_AMSDU_AGGR_CTRL*/ +typedef struct _mlan_ds_11n_amsdu_aggr_ctrl { + /** Enable/Disable */ + t_u16 enable; + /** Current AMSDU size valid */ + t_u16 curr_buf_size; +} mlan_ds_11n_amsdu_aggr_ctrl, *pmlan_ds_11n_amsdu_aggr_ctrl; + +/** Type definition of mlan_ds_11n_aggr_prio_tbl + * for MLAN_OID_11N_CFG_AGGR_PRIO_TBL + */ +typedef struct _mlan_ds_11n_aggr_prio_tbl { + /** ampdu priority table */ + t_u8 ampdu[MAX_NUM_TID]; + /** amsdu priority table */ + t_u8 amsdu[MAX_NUM_TID]; +} mlan_ds_11n_aggr_prio_tbl, *pmlan_ds_11n_aggr_prio_tbl; + +/** DelBA All TIDs */ +#define DELBA_ALL_TIDS 0xff +/** DelBA Tx */ +#define DELBA_TX MBIT(0) +/** DelBA Rx */ +#define DELBA_RX MBIT(1) + +/** Type definition of mlan_ds_11n_delba for MLAN_OID_11N_CFG_DELBA */ +typedef struct _mlan_ds_11n_delba { + /** TID */ + t_u8 tid; + /** Peer MAC address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** Direction (Tx: bit 0, Rx: bit 1) */ + t_u8 direction; +} mlan_ds_11n_delba, *pmlan_ds_11n_delba; + +/** Type definition of mlan_ds_delba for MLAN_OID_11N_CFG_REJECT_ADDBA_REQ */ +typedef struct _mlan_ds_reject_addba_req { + /** Bit0 : host sleep activated + * Bit1 : auto reconnect enabled + * Others : reserved + */ + t_u32 conditions; +} mlan_ds_reject_addba_req, *pmlan_ds_reject_addba_req; + +/** Type definition of mlan_ds_11n_cfg for MLAN_IOCTL_11N_CFG */ +typedef struct _mlan_ds_11n_cfg { + /** Sub-command */ + t_u32 sub_command; + /** 802.11n configuration parameter */ + union { + /** Tx param for 11n for MLAN_OID_11N_CFG_TX */ + mlan_ds_11n_tx_cfg tx_cfg; + /** Aggr priority table for MLAN_OID_11N_CFG_AGGR_PRIO_TBL */ + mlan_ds_11n_aggr_prio_tbl aggr_prio_tbl; + /** Add BA param for MLAN_OID_11N_CFG_ADDBA_PARAM */ + mlan_ds_11n_addba_param addba_param; + /** Add BA Reject paramters for MLAN_OID_11N_CFG_ADDBA_REJECT */ + t_u8 addba_reject[MAX_NUM_TID]; + /** Tx buf size for MLAN_OID_11N_CFG_MAX_TX_BUF_SIZE */ + t_u32 tx_buf_size; + /** HT cap info configuration for MLAN_OID_11N_HTCAP_CFG */ + mlan_ds_11n_htcap_cfg htcap_cfg; + /** Tx param for 11n for MLAN_OID_11N_AMSDU_AGGR_CTRL */ + mlan_ds_11n_amsdu_aggr_ctrl amsdu_aggr_ctrl; + /** Supported MCS Set field */ + t_u8 supported_mcs_set[NUM_MCS_FIELD]; + /** Transmit Beamforming Capabilities field */ + t_u32 tx_bf_cap; + /** Transmit Beamforming configuration */ + mlan_ds_11n_tx_bf_cfg tx_bf; + /** HT stream configuration */ + t_u32 stream_cfg; + /** DelBA for MLAN_OID_11N_CFG_DELBA */ + mlan_ds_11n_delba del_ba; + /** Reject Addba Req for MLAN_OID_11N_CFG_REJECT_ADDBA_REQ */ + mlan_ds_reject_addba_req reject_addba_req; + /** Control coex RX window size configuration */ + t_u32 coex_rx_winsize; + /** Control TX AMPDU configuration */ + t_u32 txaggrctrl; + } param; +} mlan_ds_11n_cfg, *pmlan_ds_11n_cfg; + +#define NUM_MCS_SUPP 20 +#define VHT_MCS_SET_LEN 8 + +/** Type definition of mlan_ds_11ac_vhtcap_cfg for MLAN_OID_11AC_VHTCAP_CFG */ +typedef struct _mlan_ds_11ac_vhtcap_cfg { + /** HT Capability information */ + t_u32 vhtcap; + /** Band selection */ + t_u32 misc_cfg; + /** Hardware HT cap information required */ + t_u32 hw_cap_req; +} mlan_ds_11ac_vhtcap_cfg, *pmlan_ds_11ac_vhtcap_cfg; + +/** Type definition of mlan_ds_11ac_tx_cfg for MLAN_OID_11AC_CFG_TX */ +typedef struct _mlan_ds_11ac_tx_cfg { + /** Band selection */ + t_u8 band_cfg; + /** misc configuration */ + t_u8 misc_cfg; + /** HTTxCap */ + t_u16 vhttxcap; + /** HTTxInfo */ + t_u16 vhttxinfo; +} mlan_ds_11ac_tx_cfg, *pmlan_ds_11ac_tx_cfg; + +/** Tx */ +#define MLAN_RADIO_TX MBIT(0) +/** Rx */ +#define MLAN_RADIO_RX MBIT(1) +/** Tx & Rx */ +#define MLAN_RADIO_TXRX (MLAN_RADIO_TX | MLAN_RADIO_RX) + +/** Type definition of mlan_ds_11ac_tx_cfg for MLAN_OID_11AC_CFG */ +typedef struct _mlan_ds_11ac_vht_cfg { + /** Band selection (1: 2.4G, 2: 5 G, 3: both 2.4G and 5G) */ + t_u32 band; + /** TxRx (1: Tx, 2: Rx, 3: both Tx and Rx) */ + t_u32 txrx; + /** BW CFG (0: 11N CFG, 1: vhtcap) */ + t_u32 bwcfg; + /** VHT capabilities. */ + t_u32 vht_cap_info; + /** VHT Tx mcs */ + t_u32 vht_tx_mcs; + /** VHT Rx mcs */ + t_u32 vht_rx_mcs; + /** VHT rx max rate */ + t_u16 vht_rx_max_rate; + /** VHT max tx rate */ + t_u16 vht_tx_max_rate; +} mlan_ds_11ac_vht_cfg, *pmlan_ds_11ac_vht_cfg; + +/** Type definition of mlan_ds_11ac_cfg for MLAN_IOCTL_11AC_CFG */ +typedef struct _mlan_ds_11ac_cfg { + /** Sub-command */ + t_u32 sub_command; + /** 802.11n configuration parameter */ + union { + /** VHT configuration for MLAN_OID_11AC_VHT_CFG */ + mlan_ds_11ac_vht_cfg vht_cfg; + /** Supported MCS Set field */ + t_u8 supported_mcs_set[NUM_MCS_SUPP]; + } param; +} mlan_ds_11ac_cfg, *pmlan_ds_11ac_cfg; + +/** Country code length */ +#define COUNTRY_CODE_LEN 3 + +/*-----------------------------------------------------------------*/ +/** 802.11d Configuration Group */ +/*-----------------------------------------------------------------*/ +/** Maximum subbands for 11d */ +#define MRVDRV_MAX_SUBBAND_802_11D 83 + +#ifdef STA_SUPPORT +/** Data structure for subband set */ +typedef struct _mlan_ds_subband_set_t { + /** First channel */ + t_u8 first_chan; + /** Number of channels */ + t_u8 no_of_chan; + /** Maximum Tx power in dBm */ + t_u8 max_tx_pwr; +} mlan_ds_subband_set_t; + +/** Domain regulatory information */ +typedef struct _mlan_ds_11d_domain_info { + /** Country Code */ + t_u8 country_code[COUNTRY_CODE_LEN]; + /** Band that channels in sub_band belong to */ + t_u8 band; + /** No. of subband in below */ + t_u8 no_of_sub_band; + /** Subband data to send/last sent */ + mlan_ds_subband_set_t sub_band[MRVDRV_MAX_SUBBAND_802_11D]; +} mlan_ds_11d_domain_info; +#endif + +/** Type definition of mlan_ds_11d_cfg for MLAN_IOCTL_11D_CFG */ +typedef struct _mlan_ds_11d_cfg { + /** Sub-command */ + t_u32 sub_command; + /** 802.11d configuration parameter */ + union { +#ifdef STA_SUPPORT + /** Enable for MLAN_OID_11D_CFG_ENABLE */ + t_u32 enable_11d; + /** Domain info for MLAN_OID_11D_DOMAIN_INFO */ + mlan_ds_11d_domain_info domain_info; +#endif /* STA_SUPPORT */ +#ifdef UAP_SUPPORT + /** tlv data for MLAN_OID_11D_DOMAIN_INFO */ + t_u8 domain_tlv[MAX_IE_SIZE]; +#endif /* UAP_SUPPORT */ + } param; +} mlan_ds_11d_cfg, *pmlan_ds_11d_cfg; + +/*-----------------------------------------------------------------*/ +/** Register Memory Access Group */ +/*-----------------------------------------------------------------*/ +/** Enumeration for CSU target device type */ +enum _mlan_csu_target_type { + MLAN_CSU_TARGET_CAU = 1, + MLAN_CSU_TARGET_PSU, +}; + +/** Enumeration for register type */ +enum _mlan_reg_type { + MLAN_REG_MAC = 1, + MLAN_REG_BBP, + MLAN_REG_RF, + MLAN_REG_CAU = 5, + MLAN_REG_PSU = 6, +}; + +/** Type definition of mlan_ds_reg_rw for MLAN_OID_REG_RW */ +typedef struct _mlan_ds_reg_rw { + /** Register type */ + t_u32 type; + /** Offset */ + t_u32 offset; + /** Value */ + t_u32 value; +} mlan_ds_reg_rw; + +/** Maximum EEPROM data */ +#define MAX_EEPROM_DATA 256 + +/** Type definition of mlan_ds_read_eeprom for MLAN_OID_EEPROM_RD */ +typedef struct _mlan_ds_read_eeprom { + /** Multiples of 4 */ + t_u16 offset; + /** Number of bytes */ + t_u16 byte_count; + /** Value */ + t_u8 value[MAX_EEPROM_DATA]; +} mlan_ds_read_eeprom; + +/** Type definition of mlan_ds_mem_rw for MLAN_OID_MEM_RW */ +typedef struct _mlan_ds_mem_rw { + /** Address */ + t_u32 addr; + /** Value */ + t_u32 value; +} mlan_ds_mem_rw; + +/** Type definition of mlan_ds_reg_mem for MLAN_IOCTL_REG_MEM */ +typedef struct _mlan_ds_reg_mem { + /** Sub-command */ + t_u32 sub_command; + /** Register memory access parameter */ + union { + /** Register access for MLAN_OID_REG_RW */ + mlan_ds_reg_rw reg_rw; + /** EEPROM access for MLAN_OID_EEPROM_RD */ + mlan_ds_read_eeprom rd_eeprom; + /** Memory access for MLAN_OID_MEM_RW */ + mlan_ds_mem_rw mem_rw; + } param; +} mlan_ds_reg_mem, *pmlan_ds_reg_mem; + +/*-----------------------------------------------------------------*/ +/** Multi-Radio Configuration Group */ +/*-----------------------------------------------------------------*/ + +/*-----------------------------------------------------------------*/ +/** 802.11h Configuration Group */ +/*-----------------------------------------------------------------*/ +#if defined(DFS_TESTING_SUPPORT) +/** Type definition of mlan_ds_11h_dfs_testing for MLAN_OID_11H_DFS_TESTING */ +typedef struct _mlan_ds_11h_dfs_testing { + /** User-configured CAC period in milliseconds, 0 to use default */ + t_u16 usr_cac_period_msec; + /** User-configured NOP period in seconds, 0 to use default */ + t_u16 usr_nop_period_sec; + /** User-configured skip channel change, 0 to disable */ + t_u8 usr_no_chan_change; + /** User-configured fixed channel to change to, 0 to use random channel */ + t_u8 usr_fixed_new_chan; +} mlan_ds_11h_dfs_testing, *pmlan_ds_11h_dfs_testing; +#endif + +typedef struct _mlan_ds_11h_chan_rep_req { + t_u16 startFreq; + t_u8 chanWidth; + t_u8 chanNum; + t_u32 millisec_dwell_time; + /**< Channel dwell time in milliseconds */ +} mlan_ds_11h_chan_rep_req; + +/** Type definition of mlan_ds_11h_cfg for MLAN_IOCTL_11H_CFG */ +typedef struct _mlan_ds_11h_cfg { + /** Sub-command */ + t_u32 sub_command; + union { + /** Local power constraint for MLAN_OID_11H_LOCAL_POWER_CONSTRAINT */ + t_s8 usr_local_power_constraint; +#if defined(DFS_TESTING_SUPPORT) + /** User-configuation for MLAN_OID_11H_DFS_TESTING */ + mlan_ds_11h_dfs_testing dfs_testing; +#endif + mlan_ds_11h_chan_rep_req chan_rpt_req; + } param; +} mlan_ds_11h_cfg, *pmlan_ds_11h_cfg; + +/*-----------------------------------------------------------------*/ +/** Miscellaneous Configuration Group */ +/*-----------------------------------------------------------------*/ + +/** CMD buffer size */ +#define MLAN_SIZE_OF_CMD_BUFFER 2048 + +/** LDO Internal */ +#define LDO_INTERNAL 0 +/** LDO External */ +#define LDO_EXTERNAL 1 + +/** Enumeration for IE type */ +enum _mlan_ie_type { + MLAN_IE_TYPE_GEN_IE = 0, +#ifdef STA_SUPPORT + MLAN_IE_TYPE_ARP_FILTER, +#endif /* STA_SUPPORT */ +}; + +/** Type definition of mlan_ds_misc_gen_ie for MLAN_OID_MISC_GEN_IE */ +typedef struct _mlan_ds_misc_gen_ie { + /** IE type */ + t_u32 type; + /** IE length */ + t_u32 len; + /** IE buffer */ + t_u8 ie_data[MAX_IE_SIZE]; +} mlan_ds_misc_gen_ie; + +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) +/** Type definition of mlan_ds_misc_sdio_mpa_ctrl + * for MLAN_OID_MISC_SDIO_MPA_CTRL + */ +typedef struct _mlan_ds_misc_sdio_mpa_ctrl { + /** SDIO MP-A TX enable/disable */ + t_u16 tx_enable; + /** SDIO MP-A RX enable/disable */ + t_u16 rx_enable; + /** SDIO MP-A TX buf size */ + t_u16 tx_buf_size; + /** SDIO MP-A RX buf size */ + t_u16 rx_buf_size; + /** SDIO MP-A TX Max Ports */ + t_u16 tx_max_ports; + /** SDIO MP-A RX Max Ports */ + t_u16 rx_max_ports; +} mlan_ds_misc_sdio_mpa_ctrl; +#endif + +/** Type definition of mlan_ds_misc_cmd for MLAN_OID_MISC_HOST_CMD */ +typedef struct _mlan_ds_misc_cmd { + /** Command length */ + t_u32 len; + /** Command buffer */ + t_u8 cmd[MLAN_SIZE_OF_CMD_BUFFER]; +} mlan_ds_misc_cmd; + +/** Maximum number of system clocks */ +#define MLAN_MAX_CLK_NUM 16 + +/** Clock type : Configurable */ +#define MLAN_CLK_CONFIGURABLE 0 +/** Clock type : Supported */ +#define MLAN_CLK_SUPPORTED 1 + +/** Type definition of mlan_ds_misc_sys_clock for MLAN_OID_MISC_SYS_CLOCK */ +typedef struct _mlan_ds_misc_sys_clock { + /** Current system clock */ + t_u16 cur_sys_clk; + /** Clock type */ + t_u16 sys_clk_type; + /** Number of clocks */ + t_u16 sys_clk_num; + /** System clocks */ + t_u16 sys_clk[MLAN_MAX_CLK_NUM]; +} mlan_ds_misc_sys_clock; + +/** Maximum response buffer length */ +#define ASSOC_RSP_BUF_SIZE 500 + +/** Type definition of mlan_ds_misc_assoc_rsp for MLAN_OID_MISC_ASSOC_RSP */ +typedef struct _mlan_ds_misc_assoc_rsp { + /** Associate response buffer */ + t_u8 assoc_resp_buf[ASSOC_RSP_BUF_SIZE]; + /** Response buffer length */ + t_u32 assoc_resp_len; +} mlan_ds_misc_assoc_rsp; + +/** Enumeration for function init/shutdown */ +enum _mlan_func_cmd { + MLAN_FUNC_INIT = 1, + MLAN_FUNC_SHUTDOWN, +}; + +/** Enumeration for Coalescing status */ +enum _mlan_coal_status { + MLAN_MISC_COALESCING_ENABLE = 1, + MLAN_MISC_COALESCING_DISABLE = 0 +}; + +/** Type definition of mlan_ds_misc_tx_datapause + * for MLAN_OID_MISC_TX_DATAPAUSE + */ +typedef struct _mlan_ds_misc_tx_datapause { + /** Tx data pause flag */ + t_u16 tx_pause; + /** Max number of Tx buffers for all PS clients */ + t_u16 tx_buf_cnt; +} mlan_ds_misc_tx_datapause; + +/** IP address length */ +#define IPADDR_LEN (16) +/** Max number of ip */ +#define MAX_IPADDR (4) +/** IP address type - NONE*/ +#define IPADDR_TYPE_NONE (0) +/** IP address type - IPv4*/ +#define IPADDR_TYPE_IPV4 (1) +/** IP operation remove */ +#define MLAN_IPADDR_OP_IP_REMOVE (0) +/** IP operation ARP filter */ +#define MLAN_IPADDR_OP_ARP_FILTER MBIT(0) +/** IP operation ARP response */ +#define MLAN_IPADDR_OP_AUTO_ARP_RESP MBIT(1) + +/** Type definition of mlan_ds_misc_ipaddr_cfg for MLAN_OID_MISC_IP_ADDR */ +typedef struct _mlan_ds_misc_ipaddr_cfg { + /** Operation code */ + t_u32 op_code; + /** IP address type */ + t_u32 ip_addr_type; + /** Number of IP */ + t_u32 ip_addr_num; + /** IP address */ + t_u8 ip_addr[MAX_IPADDR][IPADDR_LEN]; +} mlan_ds_misc_ipaddr_cfg; + +/* MEF configuration disable */ +#define MEF_CFG_DISABLE 0 +/* MEF configuration Rx filter enable */ +#define MEF_CFG_RX_FILTER_ENABLE 1 +/* MEF configuration auto ARP response */ +#define MEF_CFG_AUTO_ARP_RESP 2 +/* MEF configuration host command */ +#define MEF_CFG_HOSTCMD 0xFFFF + +/** Type definition of mlan_ds_misc_mef_cfg for MLAN_OID_MISC_MEF_CFG */ +typedef struct _mlan_ds_misc_mef_cfg { + /** Sub-ID for operation */ + t_u32 sub_id; + /** Parameter according to sub-ID */ + union { + /** MEF command buffer for MEF_CFG_HOSTCMD */ + mlan_ds_misc_cmd cmd_buf; + } param; +} mlan_ds_misc_mef_cfg; + +/** Type definition of mlan_ds_misc_cfp_code for MLAN_OID_MISC_CFP_CODE */ +typedef struct _mlan_ds_misc_cfp_code { + /** CFP table code for 2.4GHz */ + t_u32 cfp_code_bg; + /** CFP table code for 5GHz */ + t_u32 cfp_code_a; +} mlan_ds_misc_cfp_code; + +/** Type definition of mlan_ds_misc_country_code + * for MLAN_OID_MISC_COUNTRY_CODE + */ +typedef struct _mlan_ds_misc_country_code { + /** Country Code */ + t_u8 country_code[COUNTRY_CODE_LEN]; +} mlan_ds_misc_country_code; + +/** action for set */ +#define SUBSCRIBE_EVT_ACT_BITWISE_SET 0x0002 +/** action for clear */ +#define SUBSCRIBE_EVT_ACT_BITWISE_CLR 0x0003 +/** BITMAP for subscribe event rssi low */ +#define SUBSCRIBE_EVT_RSSI_LOW MBIT(0) +/** BITMAP for subscribe event snr low */ +#define SUBSCRIBE_EVT_SNR_LOW MBIT(1) +/** BITMAP for subscribe event max fail */ +#define SUBSCRIBE_EVT_MAX_FAIL MBIT(2) +/** BITMAP for subscribe event beacon missed */ +#define SUBSCRIBE_EVT_BEACON_MISSED MBIT(3) +/** BITMAP for subscribe event rssi high */ +#define SUBSCRIBE_EVT_RSSI_HIGH MBIT(4) +/** BITMAP for subscribe event snr high */ +#define SUBSCRIBE_EVT_SNR_HIGH MBIT(5) +/** BITMAP for subscribe event data rssi low */ +#define SUBSCRIBE_EVT_DATA_RSSI_LOW MBIT(6) +/** BITMAP for subscribe event data snr low */ +#define SUBSCRIBE_EVT_DATA_SNR_LOW MBIT(7) +/** BITMAP for subscribe event data rssi high */ +#define SUBSCRIBE_EVT_DATA_RSSI_HIGH MBIT(8) +/** BITMAP for subscribe event data snr high */ +#define SUBSCRIBE_EVT_DATA_SNR_HIGH MBIT(9) +/** BITMAP for subscribe event link quality */ +#define SUBSCRIBE_EVT_LINK_QUALITY MBIT(10) +/** BITMAP for subscribe event pre_beacon_lost */ +#define SUBSCRIBE_EVT_PRE_BEACON_LOST MBIT(11) +/** default PRE_BEACON_MISS_COUNT */ +#define DEFAULT_PRE_BEACON_MISS 30 + +/** Type definition of mlan_ds_subscribe_evt for MLAN_OID_MISC_CFP_CODE */ +typedef struct _mlan_ds_subscribe_evt { + /** evt action */ + t_u16 evt_action; + /** bitmap for subscribe event */ + t_u16 evt_bitmap; + /** Absolute value of RSSI threshold value (dBm) */ + t_u8 low_rssi; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 low_rssi_freq; + /** SNR threshold value (dB) */ + t_u8 low_snr; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 low_snr_freq; + /** Failure count threshold */ + t_u8 failure_count; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 failure_count_freq; + /** num of missed beacons */ + t_u8 beacon_miss; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 beacon_miss_freq; + /** Absolute value of RSSI threshold value (dBm) */ + t_u8 high_rssi; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 high_rssi_freq; + /** SNR threshold value (dB) */ + t_u8 high_snr; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 high_snr_freq; + /** Absolute value of data RSSI threshold value (dBm) */ + t_u8 data_low_rssi; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 data_low_rssi_freq; + /** Absolute value of data SNR threshold value (dBm) */ + t_u8 data_low_snr; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 data_low_snr_freq; + /** Absolute value of data RSSI threshold value (dBm) */ + t_u8 data_high_rssi; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 data_high_rssi_freq; + /** Absolute value of data SNR threshold value (dBm) */ + t_u8 data_high_snr; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 data_high_snr_freq; + /* Link SNR threshold (dB) */ + t_u16 link_snr; + /* Link SNR frequency */ + t_u16 link_snr_freq; + /* Second minimum rate value as per the rate table below */ + t_u16 link_rate; + /* Second minimum rate frequency */ + t_u16 link_rate_freq; + /* Tx latency value (us) */ + t_u16 link_tx_latency; + /* Tx latency frequency */ + t_u16 link_tx_lantency_freq; + /* Number of pre missed beacons */ + t_u8 pre_beacon_miss; +} mlan_ds_subscribe_evt; + +/** Max OTP user data length */ +#define MAX_OTP_USER_DATA_LEN 252 + +/** Type definition of mlan_ds_misc_otp_user_data + * for MLAN_OID_MISC_OTP_USER_DATA + */ +typedef struct _mlan_ds_misc_otp_user_data { + /** Reserved */ + t_u16 reserved; + /** OTP user data length */ + t_u16 user_data_length; + /** User data buffer */ + t_u8 user_data[MAX_OTP_USER_DATA_LEN]; +} mlan_ds_misc_otp_user_data; + +#ifdef WIFI_DIRECT_SUPPORT +/** flag for NOA */ +#define WIFI_DIRECT_NOA 1 +/** flag for OPP_PS */ +#define WIFI_DIRECT_OPP_PS 2 +/** Type definition of mlan_ds_wifi_direct_config + * for MLAN_OID_MISC_WIFI_DIRECT_CONFIG + */ +typedef struct _mlan_ds_wifi_direct_config { + /** flags for NOA/OPP_PS */ + t_u8 flags; + /** NoA enable/disable */ + t_u8 noa_enable; + /** index */ + t_u16 index; + /** NoA count */ + t_u8 noa_count; + /** NoA duration */ + t_u32 noa_duration; + /** NoA interval */ + t_u32 noa_interval; + /** opp ps enable/disable */ + t_u8 opp_ps_enable; + /** CT window value */ + t_u8 ct_window; +} mlan_ds_wifi_direct_config; +#endif + +#if defined(STA_SUPPORT) +typedef struct _mlan_ds_misc_pmfcfg { + /** Management Frame Protection Capable */ + t_u8 mfpc; + /** Management Frame Protection Required */ + t_u8 mfpr; +} mlan_ds_misc_pmfcfg; +#endif + +typedef MLAN_PACK_START struct _mlan_ds_multi_chan_cfg { + /** Channel Time */ + t_u32 channel_time; + /** Buffer Weight */ + t_u8 buffer_weight; + /** tlv len */ + t_u16 tlv_len; + /** TLV buffer */ + t_u8 tlv_buf[0]; +} MLAN_PACK_END mlan_ds_multi_chan_cfg; + +/**Action ID for TDLS disable link*/ +#define WLAN_TDLS_DISABLE_LINK 0x00 +/**Action ID for TDLS enable link*/ +#define WLAN_TDLS_ENABLE_LINK 0x01 +/**Action ID for TDLS create link*/ +#define WLAN_TDLS_CREATE_LINK 0x02 +/**Action ID for TDLS config link*/ +#define WLAN_TDLS_CONFIG_LINK 0x03 +/*reason code*/ +#define MLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED 26 +/** TDLS operation buffer */ +typedef struct _mlan_ds_misc_tdls_oper { + /** TDLS Action */ + t_u16 tdls_action; + /** TDLS peer address */ + t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; + /** peer capability */ + t_u16 capability; + /** peer qos info */ + t_u8 qos_info; + /** peer extend capability */ + t_u8 *ext_capab; + /** extend capability len */ + t_u8 ext_capab_len; + /** support rates */ + t_u8 *supported_rates; + /** supported rates len */ + t_u8 supported_rates_len; + /** peer ht_cap */ + t_u8 *ht_capa; + /** peer vht capability */ + t_u8 *vht_cap; +} mlan_ds_misc_tdls_oper; + +/** flag for TDLS extcap */ +#define TDLS_IE_FLAGS_EXTCAP 0x0001 +/** flag for TDLS HTCAP */ +#define TDLS_IE_FLAGS_HTCAP 0x0002 +/** flag for TDLS HTINFO */ +#define TDLS_IE_FLAGS_HTINFO 0x0004 +/** flag for TDLS VHTCAP */ +#define TDLS_IE_FLAGS_VHTCAP 0x0008 +/** flag for TDLS VHTOPRAT */ +#define TDLS_IE_FLAGS_VHTOPRAT 0x0010 +/** flag for TDLS AID inof */ +#define TDLS_IE_FLAGS_AID 0x0020 +/** flag for TDLS Supported channels and regulatory class IE*/ +#define TDLS_IE_FLAGS_SUPP_CS_IE 0x0040 + +/** TDLS ie buffer */ +typedef struct _mlan_ds_misc_tdls_ies { + /** TDLS peer address */ + t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; + /** flags for request IEs */ + t_u16 flags; + /** Extended Capabilities IE */ + t_u8 ext_cap[IEEE_MAX_IE_SIZE]; + /** HT Capabilities IE */ + t_u8 ht_cap[IEEE_MAX_IE_SIZE]; + /** HT Information IE */ + t_u8 ht_info[IEEE_MAX_IE_SIZE]; + /** VHT Capabilities IE */ + t_u8 vht_cap[IEEE_MAX_IE_SIZE]; + /** VHT Operations IE */ + t_u8 vht_oprat[IEEE_MAX_IE_SIZE]; + /** aid Info */ + t_u8 aid_info[IEEE_MAX_IE_SIZE]; +} mlan_ds_misc_tdls_ies; + +#ifdef RX_PACKET_COALESCE +typedef struct _mlan_ds_misc_rx_packet_coalesce { + /** packet threshold */ + t_u32 packet_threshold; + /** timeout value */ + t_u16 delay; +} mlan_ds_misc_rx_packet_coalesce; +#endif + +#define WOWLAN_MAX_PATTERN_LEN 20 +#define WOWLAN_MAX_OFFSET_LEN 50 +#define MAX_NUM_FILTERS 10 + +/** Type definition of mlan_ds_misc_cfg for MLAN_IOCTL_MISC_CFG */ +typedef struct _mlan_ds_misc_cfg { + /** Sub-command */ + t_u32 sub_command; + /** Miscellaneous configuration parameter */ + union { + /** Generic IE for MLAN_OID_MISC_GEN_IE */ + mlan_ds_misc_gen_ie gen_ie; + /** Region code for MLAN_OID_MISC_REGION */ + t_u32 region_code; +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + /** SDIO MP-A Ctrl command for MLAN_OID_MISC_SDIO_MPA_CTRL */ + mlan_ds_misc_sdio_mpa_ctrl mpa_ctrl; +#endif + /** Hostcmd for MLAN_OID_MISC_HOST_CMD */ + mlan_ds_misc_cmd hostcmd; + /** System clock for MLAN_OID_MISC_SYS_CLOCK */ + mlan_ds_misc_sys_clock sys_clock; + /** WWS set/get for MLAN_OID_MISC_WWS */ + t_u32 wws_cfg; + /** Get associate response for MLAN_OID_MISC_ASSOC_RSP */ + mlan_ds_misc_assoc_rsp assoc_resp; + /** Function init/shutdown for MLAN_OID_MISC_INIT_SHUTDOWN */ + t_u32 func_init_shutdown; + /** Coalescing status for MLAN_OID_MISC_COALESCING_STATUS */ + t_u16 coalescing_status; + /** Custom IE for MLAN_OID_MISC_CUSTOM_IE */ + mlan_ds_misc_custom_ie cust_ie; + t_u16 tdls_idle_time; + /** TDLS configuration for MLAN_OID_MISC_TDLS_CONFIG */ + mlan_ds_misc_tdls_config tdls_config; + /** TDLS operation for MLAN_OID_MISC_TDLS_OPER */ + mlan_ds_misc_tdls_oper tdls_oper; + /** TDLS ies for MLAN_OID_MISC_GET_TDLS_IES */ + mlan_ds_misc_tdls_ies tdls_ies; + /** Tx data pause for MLAN_OID_MISC_TX_DATAPAUSE */ + mlan_ds_misc_tx_datapause tx_datapause; + /** IP address configuration */ + mlan_ds_misc_ipaddr_cfg ipaddr_cfg; + /** MAC control for MLAN_OID_MISC_MAC_CONTROL */ + t_u32 mac_ctrl; + /** MEF configuration for MLAN_OID_MISC_MEF_CFG */ + mlan_ds_misc_mef_cfg mef_cfg; + /** CFP code for MLAN_OID_MISC_CFP_CODE */ + mlan_ds_misc_cfp_code cfp_code; + /** Country code for MLAN_OID_MISC_COUNTRY_CODE */ + mlan_ds_misc_country_code country_code; + /** Thermal reading for MLAN_OID_MISC_THERMAL */ + t_u32 thermal; + /** Mgmt subtype mask for MLAN_OID_MISC_RX_MGMT_IND */ + t_u32 mgmt_subtype_mask; + /** subscribe event for MLAN_OID_MISC_SUBSCRIBE_EVENT */ + mlan_ds_subscribe_evt subscribe_event; +#ifdef DEBUG_LEVEL1 + /** Driver debug bit masks */ + t_u32 drvdbg; +#endif + /** Hotspot config param set */ + t_u32 hotspot_cfg; +#ifdef STA_SUPPORT + t_u8 ext_cap[8]; +#endif + mlan_ds_misc_otp_user_data otp_user_data; + /** Tx control */ + t_u32 tx_control; +#if defined(STA_SUPPORT) + mlan_ds_misc_pmfcfg pmfcfg; +#endif + /** Multi-channel config for MLAN_OID_MISC_MULTI_CHAN_CFG */ + mlan_ds_multi_chan_cfg multi_chan_cfg; + /** Multi-channel policy for MLAN_OID_MISC_MULTI_CHAN_POLICY */ + t_u16 multi_chan_policy; +#ifdef WIFI_DIRECT_SUPPORT + mlan_ds_wifi_direct_config p2p_config; +#endif + mlan_ds_coalesce_cfg coalesce_cfg; + t_u8 low_pwr_mode; +#ifdef RX_PACKET_COALESCE + mlan_ds_misc_rx_packet_coalesce rx_coalesce; +#endif + /** FW reload flag */ + t_u8 fw_reload; + } param; +} mlan_ds_misc_cfg, *pmlan_ds_misc_cfg; + +/** Hotspot status enable */ +#define HOTSPOT_ENABLED MBIT(0) +/** Hotspot status disable */ +#define HOTSPOT_DISABLED MFALSE +/** Keep Hotspot2.0 compatible in mwu and wpa_supplicant */ +#define HOTSPOT_BY_SUPPLICANT MBIT(1) +#endif /* !_MLAN_IOCTL_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_join.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_join.c new file mode 100644 index 00000000..92e3a78b --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_join.c @@ -0,0 +1,2403 @@ +/** @file mlan_join.c + * + * @brief Functions implementing wlan infrastructure and adhoc join routines + * + * IOCTL handlers as well as command preparation and response routines + * for sending adhoc start, adhoc join, and association commands + * to the firmware. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 10/30/2008: initial version +******************************************************/ + +#include "mlan.h" +#include "mlan_join.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_wmm.h" +#include "mlan_11n.h" +#include "mlan_11ac.h" +#include "mlan_11h.h" +/******************************************************** + Local Constants +********************************************************/ + +/******************************************************** + Local Variables +********************************************************/ + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ +/** + * @brief Append a generic IE as a pass through TLV to a TLV buffer. + * + * This function is called from the network join command prep. routine. + * If the IE buffer has been setup by the application, this routine appends + * the buffer as a pass through TLV type to the request. + * + * @param priv A pointer to mlan_private structure + * @param ppbuffer pointer to command buffer pointer + * + * @return bytes added to the buffer + */ +static int +wlan_cmd_append_generic_ie(mlan_private *priv, t_u8 **ppbuffer) +{ + int ret_len = 0; + MrvlIEtypesHeader_t ie_header; + + ENTER(); + + /* Null Checks */ + if (ppbuffer == MNULL) { + LEAVE(); + return 0; + } + if (*ppbuffer == MNULL) { + LEAVE(); + return 0; + } + + /* + * If there is a generic ie buffer setup, append it to the return + * parameter buffer pointer. + */ + if (priv->gen_ie_buf_len) { + PRINTM(MINFO, "append generic IE %d to %p\n", + priv->gen_ie_buf_len, *ppbuffer); + + /* Wrap the generic IE buffer with a pass through TLV type */ + ie_header.type = wlan_cpu_to_le16(TLV_TYPE_PASSTHROUGH); + ie_header.len = wlan_cpu_to_le16(priv->gen_ie_buf_len); + memcpy(priv->adapter, *ppbuffer, &ie_header, sizeof(ie_header)); + + /* Increment the return size and the return buffer pointer + param */ + *ppbuffer += sizeof(ie_header); + ret_len += sizeof(ie_header); + + /* Copy the generic IE buffer to the output buffer, advance + pointer */ + memcpy(priv->adapter, *ppbuffer, priv->gen_ie_buf, + priv->gen_ie_buf_len); + + /* Increment the return size and the return buffer pointer + param */ + *ppbuffer += priv->gen_ie_buf_len; + ret_len += priv->gen_ie_buf_len; + + /* Reset the generic IE buffer */ + priv->gen_ie_buf_len = 0; + } + + /* return the length appended to the buffer */ + LEAVE(); + return ret_len; +} + +/** + * @brief Append IE as a pass through TLV to a TLV buffer. + * + * This routine appends IE as a pass through TLV type to the request. + * + * @param priv A pointer to mlan_private structure + * @param ie A pointer to IE buffer + * @param ppbuffer pointer to command buffer pointer + * + * @return bytes added to the buffer + */ +static int +wlan_cmd_append_pass_through_ie(mlan_private *priv, IEEEtypes_Generic_t *ie, + t_u8 **ppbuffer) +{ + int ret_len = 0; + MrvlIEtypesHeader_t ie_header; + + ENTER(); + + /* Null Checks */ + if (ppbuffer == MNULL) { + LEAVE(); + return 0; + } + if (*ppbuffer == MNULL) { + LEAVE(); + return 0; + } + if (ie->ieee_hdr.len) { + PRINTM(MINFO, "append generic IE %d to %p\n", ie->ieee_hdr.len, + *ppbuffer); + + /* Wrap the generic IE buffer with a pass through TLV type */ + ie_header.type = wlan_cpu_to_le16(TLV_TYPE_PASSTHROUGH); + ie_header.len = + wlan_cpu_to_le16(ie->ieee_hdr.len + + sizeof(MrvlIEtypesHeader_t)); + memcpy(priv->adapter, *ppbuffer, &ie_header, sizeof(ie_header)); + + /* Increment the return size and the return buffer pointer + param */ + *ppbuffer += sizeof(ie_header); + ret_len += sizeof(ie_header); + + /* Copy the generic IE buffer to the output buffer, advance + pointer */ + memcpy(priv->adapter, *ppbuffer, ie, + ie->ieee_hdr.len + sizeof(MrvlIEtypesHeader_t)); + + /* Increment the return size and the return buffer pointer + param */ + *ppbuffer += ie->ieee_hdr.len + sizeof(MrvlIEtypesHeader_t); + ret_len += ie->ieee_hdr.len + sizeof(MrvlIEtypesHeader_t); + } + /* return the length appended to the buffer */ + LEAVE(); + return ret_len; +} + +/** + * @brief Append TSF tracking info from the scan table for the target AP + * + * This function is called from the network join command prep. routine. + * The TSF table TSF sent to the firmware contains two TSF values: + * - the TSF of the target AP from its previous beacon/probe response + * - the TSF timestamp of our local MAC at the time we observed the + * beacon/probe response. + * + * The firmware uses the timestamp values to set an initial TSF value + * in the MAC for the new association after a reassociation attempt. + * + * @param pmpriv A pointer to mlan_private structure + * @param ppbuffer A pointer to command buffer pointer + * @param pbss_desc A pointer to the BSS Descriptor from the scan table of + * the AP we are trying to join + * + * @return bytes added to the buffer + */ +static int +wlan_cmd_append_tsf_tlv(mlan_private *pmriv, t_u8 **ppbuffer, + BSSDescriptor_t *pbss_desc) +{ + MrvlIEtypes_TsfTimestamp_t tsf_tlv; + t_u64 tsf_val; + + ENTER(); + + /* Null Checks */ + if (ppbuffer == MNULL) { + LEAVE(); + return 0; + } + if (*ppbuffer == MNULL) { + LEAVE(); + return 0; + } + + memset(pmriv->adapter, &tsf_tlv, 0x00, + sizeof(MrvlIEtypes_TsfTimestamp_t)); + + tsf_tlv.header.type = wlan_cpu_to_le16(TLV_TYPE_TSFTIMESTAMP); + tsf_tlv.header.len = wlan_cpu_to_le16(2 * sizeof(tsf_val)); + + memcpy(pmriv->adapter, *ppbuffer, &tsf_tlv, sizeof(tsf_tlv.header)); + *ppbuffer += sizeof(tsf_tlv.header); + + /* TSF timestamp from the firmware TSF when the bcn/prb rsp was + received */ + tsf_val = wlan_cpu_to_le64(pbss_desc->network_tsf); + memcpy(pmriv->adapter, *ppbuffer, &tsf_val, sizeof(tsf_val)); + *ppbuffer += sizeof(tsf_val); + + memcpy(pmriv->adapter, &tsf_val, pbss_desc->time_stamp, + sizeof(tsf_val)); + + PRINTM(MINFO, "ASSOC: TSF offset calc: %016llx - %016llx\n", + tsf_val, pbss_desc->network_tsf); + + memcpy(pmriv->adapter, *ppbuffer, &tsf_val, sizeof(tsf_val)); + *ppbuffer += sizeof(tsf_val); + + LEAVE(); + return sizeof(tsf_tlv.header) + (2 * sizeof(tsf_val)); +} + +/** + * @brief This function finds out the common rates between rate1 and rate2. + * + * It will fill common rates in rate1 as output if found. + * + * NOTE: Setting the MSB of the basic rates needs to be taken + * care of, either before or after calling this function + * + * @param pmpriv A pointer to mlan_private structure + * @param rate1 the buffer which keeps input and output + * @param rate1_size the size of rate1 buffer + * @param rate2 the buffer which keeps rate2 + * @param rate2_size the size of rate2 buffer. + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_get_common_rates(IN mlan_private *pmpriv, + IN t_u8 *rate1, + IN t_u32 rate1_size, IN t_u8 *rate2, IN t_u32 rate2_size) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_callbacks *pcb = (mlan_callbacks *)&pmpriv->adapter->callbacks; + t_u8 *ptr = rate1; + t_u8 *tmp = MNULL; + t_u32 i, j; + + ENTER(); + + ret = pcb->moal_malloc(pmpriv->adapter->pmoal_handle, rate1_size, + MLAN_MEM_DEF, &tmp); + if (ret != MLAN_STATUS_SUCCESS || !tmp) { + PRINTM(MERROR, "Failed to allocate buffer\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + memcpy(pmpriv->adapter, tmp, rate1, rate1_size); + memset(pmpriv->adapter, rate1, 0, rate1_size); + + for (i = 0; rate2[i] && i < rate2_size; i++) { + for (j = 0; tmp[j] && j < rate1_size; j++) { + /* Check common rate, excluding the bit for basic rate */ + if ((rate2[i] & 0x7F) == (tmp[j] & 0x7F)) { + *rate1++ = tmp[j]; + break; + } + } + } + + HEXDUMP("rate1 (AP) Rates", tmp, rate1_size); + HEXDUMP("rate2 (Card) Rates", rate2, rate2_size); + HEXDUMP("Common Rates", ptr, rate1 - ptr); + PRINTM(MINFO, "Tx DataRate is set to 0x%X\n", pmpriv->data_rate); + + if (!pmpriv->is_data_rate_auto) { + while (*ptr) { + if ((*ptr & 0x7f) == pmpriv->data_rate) { + ret = MLAN_STATUS_SUCCESS; + goto done; + } + ptr++; + } + PRINTM(MMSG, "Previously set fixed data rate %#x is not " + "compatible with the network\n", pmpriv->data_rate); + + ret = MLAN_STATUS_FAILURE; + goto done; + } + + ret = MLAN_STATUS_SUCCESS; +done: + if (tmp) + pcb->moal_mfree(pmpriv->adapter->pmoal_handle, tmp); + + LEAVE(); + return ret; +} + +/** + * @brief Create the intersection of the rates supported by a target BSS and + * our pmadapter settings for use in an assoc/join command. + * + * @param pmpriv A pointer to mlan_private structure + * @param pbss_desc BSS Descriptor whose rates are used in the setup + * @param pout_rates Output: Octet array of rates common between the BSS + * and the pmadapter supported rates settings + * @param pout_rates_size Output: Number of rates/octets set in pout_rates + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_setup_rates_from_bssdesc(IN mlan_private *pmpriv, + IN BSSDescriptor_t *pbss_desc, + OUT t_u8 *pout_rates, OUT t_u32 *pout_rates_size) +{ + t_u8 card_rates[WLAN_SUPPORTED_RATES]; + t_u32 card_rates_size = 0; + ENTER(); + /* Copy AP supported rates */ + memcpy(pmpriv->adapter, pout_rates, pbss_desc->supported_rates, + WLAN_SUPPORTED_RATES); + + if ((pmpriv->adapter->region_code == COUNTRY_CODE_JP_40 || + pmpriv->adapter->region_code == COUNTRY_CODE_JP_FF) + && (pbss_desc->phy_param_set.ds_param_set.current_chan == 14)) { + /* Special Case: For Japan, 11G rates on CH14 are not allowed */ + card_rates_size = + wlan_get_supported_rates(pmpriv, pmpriv->bss_mode, + BAND_B, card_rates); + } else { + /* Get the STA supported rates */ + card_rates_size = + wlan_get_supported_rates(pmpriv, pmpriv->bss_mode, + pmpriv->config_bands, + card_rates); + } + /* Get the common rates between AP and STA supported rates */ + if (wlan_get_common_rates(pmpriv, pout_rates, WLAN_SUPPORTED_RATES, + card_rates, card_rates_size)) { + *pout_rates_size = 0; + PRINTM(MERROR, "wlan_get_common_rates failed\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + *pout_rates_size = + MIN(wlan_strlen((char *)pout_rates), WLAN_SUPPORTED_RATES); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Update the scan entry TSF timestamps to reflect a new association + * + * @param pmpriv A pointer to mlan_private structure + * @param pnew_bss_desc A pointer to the newly associated AP's scan table entry + * + * @return N/A + */ +static t_void +wlan_update_tsf_timestamps(IN mlan_private *pmpriv, + IN BSSDescriptor_t *pnew_bss_desc) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + t_u32 table_idx; + t_u64 new_tsf_base; + t_s64 tsf_delta; + + ENTER(); + + memcpy(pmpriv->adapter, &new_tsf_base, pnew_bss_desc->time_stamp, + sizeof(new_tsf_base)); + + tsf_delta = new_tsf_base - pnew_bss_desc->network_tsf; + + PRINTM(MINFO, "TSF: Update TSF timestamps, 0x%016llx -> 0x%016llx\n", + pnew_bss_desc->network_tsf, new_tsf_base); + + for (table_idx = 0; table_idx < pmadapter->num_in_scan_table; + table_idx++) { + pmadapter->pscan_table[table_idx].network_tsf += tsf_delta; + } + + LEAVE(); +} + +/** + * @brief Append a wapi IE + * + * This function is called from the network join command prep. routine. + * If the IE buffer has been setup by the application, this routine appends + * the buffer as a wapi TLV type to the request. + * + * @param priv A pointer to mlan_private structure + * @param ppbuffer pointer to command buffer pointer + * + * @return bytes added to the buffer + */ +static int +wlan_cmd_append_wapi_ie(mlan_private *priv, t_u8 **ppbuffer) +{ + int retlen = 0; + MrvlIEtypesHeader_t ie_header; + + ENTER(); + + /* Null Checks */ + if (ppbuffer == MNULL) { + LEAVE(); + return 0; + } + if (*ppbuffer == MNULL) { + LEAVE(); + return 0; + } + + /* + * If there is a wapi ie buffer setup, append it to the return + * parameter buffer pointer. + */ + if (priv->wapi_ie_len) { + PRINTM(MCMND, "append wapi ie %d to %p\n", priv->wapi_ie_len, + *ppbuffer); + + /* Wrap the generic IE buffer with a pass through TLV type */ + ie_header.type = wlan_cpu_to_le16(TLV_TYPE_WAPI_IE); + ie_header.len = wlan_cpu_to_le16(priv->wapi_ie_len); + memcpy(priv->adapter, *ppbuffer, &ie_header, sizeof(ie_header)); + + /* Increment the return size and the return buffer pointer + param */ + *ppbuffer += sizeof(ie_header); + retlen += sizeof(ie_header); + + /* Copy the wapi IE buffer to the output buffer, advance + pointer */ + memcpy(priv->adapter, *ppbuffer, priv->wapi_ie, + priv->wapi_ie_len); + + /* Increment the return size and the return buffer pointer + param */ + *ppbuffer += priv->wapi_ie_len; + retlen += priv->wapi_ie_len; + + } + /* return the length appended to the buffer */ + LEAVE(); + return retlen; +} + +/** + * @brief Append a osen IE + * + * This function is called from the network join command prep. routine. + * If the IE buffer has been setup by the application, this routine appends + * the buffer as a osen TLV type to the request. + * + * @param priv A pointer to mlan_private structure + * @param ppbuffer pointer to command buffer pointer + * + * @return bytes added to the buffer + */ +static int +wlan_cmd_append_osen_ie(mlan_private *priv, t_u8 **ppbuffer) +{ + int retlen = 0; + MrvlIEtypesHeader_t ie_header; + + ENTER(); + + /* Null Checks */ + if (ppbuffer == MNULL) { + LEAVE(); + return 0; + } + if (*ppbuffer == MNULL) { + LEAVE(); + return 0; + } + + /* + * If there is a osen ie buffer setup, append it to the return + * parameter buffer pointer. + */ + if (priv->osen_ie_len) { + PRINTM(MCMND, "append osen ie %d to %p\n", priv->osen_ie_len, + *ppbuffer); + + /* Wrap the generic IE buffer with a pass through TLV type */ + ie_header.type = wlan_cpu_to_le16(TLV_TYPE_VENDOR_SPECIFIC_IE); + ie_header.len = wlan_cpu_to_le16(priv->osen_ie[1]); + memcpy(priv->adapter, *ppbuffer, &ie_header, sizeof(ie_header)); + + /* Increment the return size and the return buffer pointer + param */ + *ppbuffer += sizeof(ie_header); + retlen += sizeof(ie_header); + + /* Copy the osen IE buffer to the output buffer, advance + pointer */ + memcpy(priv->adapter, *ppbuffer, &priv->osen_ie[2], + priv->osen_ie[1]); + + /* Increment the return size and the return buffer pointer + param */ + *ppbuffer += priv->osen_ie[1]; + retlen += priv->osen_ie[1]; + + } + /* return the length appended to the buffer */ + LEAVE(); + return retlen; +} + +/******************************************************** + Global Functions +********************************************************/ +/** + * @brief This function updates RSN IE in the association request. + * + * @param pmpriv A pointer to mlan_private structure + * + * @param ptlv_rsn_ie A pointer to rsn_ie TLV + */ +void +wlan_update_rsn_ie(mlan_private *pmpriv, MrvlIEtypes_RsnParamSet_t *ptlv_rsn_ie) +{ + t_u16 *prsn_cap; + t_u16 *ptr; + t_u16 *akm_suite_count_ptr; + t_u16 pmf_mask = 0x00; + t_u8 *temp; + int pairwise_cipher_count = 0; + int akm_suite_count = 0; + int temp_akm_suite_count = 0; + int found = 0; + t_u8 sha_256_oui[4] = { 0x00, 0x0f, 0xac, 0x06 }; + mlan_adapter *pmadapter = pmpriv->adapter; + + pmf_mask = + (((pmpriv->pmfcfg.mfpc << MFPC_BIT) | (pmpriv->pmfcfg. + mfpr << MFPR_BIT)) | + (~PMF_MASK)); + /* prsn_cap = prsn_ie->rsn_ie + 2 bytes version + 4 bytes + group_cipher_suite + 2 bytes pairwise_cipher_count + + pairwise_cipher_count * PAIRWISE_CIPHER_SUITE_LEN + 2 bytes + akm_suite_count + akm_suite_count * AKM_SUITE_LEN */ + ptr = (t_u16 *)(ptlv_rsn_ie->rsn_ie + sizeof(t_u16) + 4 * sizeof(t_u8)); + pairwise_cipher_count = *ptr; + ptr = (t_u16 *)(ptlv_rsn_ie->rsn_ie + sizeof(t_u16) + 4 * sizeof(t_u8) + + sizeof(t_u16) + + pairwise_cipher_count * PAIRWISE_CIPHER_SUITE_LEN); + temp_akm_suite_count = *ptr; + akm_suite_count = *ptr; + /* Save pointer to akm_suite_count in RSN IE to update it later */ + akm_suite_count_ptr = ptr; + temp = ptlv_rsn_ie->rsn_ie + sizeof(t_u16) + 4 * sizeof(t_u8) + + sizeof(t_u16) + pairwise_cipher_count + * PAIRWISE_CIPHER_SUITE_LEN + sizeof(t_u16); + /* ptr now points to the 1st AKM suite */ + if (temp_akm_suite_count > 1) { + while (temp_akm_suite_count) { + if (!memcmp + (pmadapter, temp, sha_256_oui, AKM_SUITE_LEN)) { + found = 1; + break; + } + temp += AKM_SUITE_LEN; + temp_akm_suite_count--; + } + if (found) { + /* Copy SHA256 as AKM suite */ + memcpy(pmadapter, + ptlv_rsn_ie->rsn_ie + (sizeof(t_u16) + + 4 * sizeof(t_u8) + + sizeof(t_u16) + + pairwise_cipher_count * + PAIRWISE_CIPHER_SUITE_LEN + + sizeof(t_u16)), + sha_256_oui, AKM_SUITE_LEN); + /* Shift remaining bytes of RSN IE after this */ + memmove(pmadapter, + ptlv_rsn_ie->rsn_ie + (sizeof(t_u16) + + 4 * sizeof(t_u8) + + sizeof(t_u16) + + pairwise_cipher_count * + PAIRWISE_CIPHER_SUITE_LEN + + sizeof(t_u16) + + AKM_SUITE_LEN), + ptlv_rsn_ie->rsn_ie + (sizeof(t_u16) + + 4 * sizeof(t_u8) + + sizeof(t_u16) + + pairwise_cipher_count * + PAIRWISE_CIPHER_SUITE_LEN + + sizeof(t_u16) + + akm_suite_count * + AKM_SUITE_LEN), + ptlv_rsn_ie->header.len - (sizeof(t_u16) + + 4 * sizeof(t_u8) + + sizeof(t_u16) + + pairwise_cipher_count + * + PAIRWISE_CIPHER_SUITE_LEN + + sizeof(t_u16) + + akm_suite_count * + AKM_SUITE_LEN)); + ptlv_rsn_ie->header.len = + ptlv_rsn_ie->header.len - (akm_suite_count - + 1) * AKM_SUITE_LEN; + /* Update akm suite count */ + akm_suite_count = 1; + *akm_suite_count_ptr = akm_suite_count; + } + } + ptr = (t_u16 *)(ptlv_rsn_ie->rsn_ie + sizeof(t_u16) + 4 * sizeof(t_u8) + + sizeof(t_u16) + + pairwise_cipher_count * PAIRWISE_CIPHER_SUITE_LEN + + sizeof(t_u16) + akm_suite_count * AKM_SUITE_LEN); + prsn_cap = ptr; + *prsn_cap |= PMF_MASK; + *prsn_cap &= pmf_mask; +} + +/** + * @brief This function prepares command of association. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param pdata_buf A pointer cast of BSSDescriptor_t from the + * scan table to assoc + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_cmd_802_11_associate(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_adapter *pmadapter = pmpriv->adapter; + HostCmd_DS_802_11_ASSOCIATE *passo = &cmd->params.associate; + BSSDescriptor_t *pbss_desc; + MrvlIEtypes_SsIdParamSet_t *pssid_tlv; + MrvlIEtypes_PhyParamSet_t *pphy_tlv; + MrvlIEtypes_SsParamSet_t *pss_tlv; + MrvlIEtypes_RatesParamSet_t *prates_tlv; + MrvlIEtypes_AuthType_t *pauth_tlv; + MrvlIEtypes_RsnParamSet_t *prsn_ie_tlv = MNULL; + MrvlIEtypes_ChanListParamSet_t *pchan_tlv; + WLAN_802_11_RATES rates; + t_u32 rates_size; + t_u16 tmp_cap; + t_u8 *pos; + + ENTER(); + + pbss_desc = (BSSDescriptor_t *)pdata_buf; + pos = (t_u8 *)passo; + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_ASSOCIATE); + + /* Save so we know which BSS Desc to use in the response handler */ + pmpriv->pattempted_bss_desc = pbss_desc; + + memcpy(pmadapter, passo->peer_sta_addr, + pbss_desc->mac_address, sizeof(passo->peer_sta_addr)); + pos += sizeof(passo->peer_sta_addr); + + /* Set the listen interval */ + passo->listen_interval = wlan_cpu_to_le16(pmpriv->listen_interval); + /* Set the beacon period */ + passo->beacon_period = wlan_cpu_to_le16(pbss_desc->beacon_period); + + pos += sizeof(passo->cap_info); + pos += sizeof(passo->listen_interval); + pos += sizeof(passo->beacon_period); + pos += sizeof(passo->dtim_period); + + pssid_tlv = (MrvlIEtypes_SsIdParamSet_t *)pos; + pssid_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_SSID); + pssid_tlv->header.len = (t_u16)pbss_desc->ssid.ssid_len; + memcpy(pmadapter, pssid_tlv->ssid, pbss_desc->ssid.ssid, + pssid_tlv->header.len); + pos += sizeof(pssid_tlv->header) + pssid_tlv->header.len; + pssid_tlv->header.len = wlan_cpu_to_le16(pssid_tlv->header.len); + + pphy_tlv = (MrvlIEtypes_PhyParamSet_t *)pos; + pphy_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_PHY_DS); + pphy_tlv->header.len = sizeof(pphy_tlv->fh_ds.ds_param_set); + memcpy(pmadapter, &pphy_tlv->fh_ds.ds_param_set, + &pbss_desc->phy_param_set.ds_param_set.current_chan, + sizeof(pphy_tlv->fh_ds.ds_param_set)); + pos += sizeof(pphy_tlv->header) + pphy_tlv->header.len; + pphy_tlv->header.len = wlan_cpu_to_le16(pphy_tlv->header.len); + + pss_tlv = (MrvlIEtypes_SsParamSet_t *)pos; + pss_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_CF); + pss_tlv->header.len = sizeof(pss_tlv->cf_ibss.cf_param_set); + pos += sizeof(pss_tlv->header) + pss_tlv->header.len; + pss_tlv->header.len = wlan_cpu_to_le16(pss_tlv->header.len); + + /* Get the common rates supported between the driver and the BSS Desc */ + if (wlan_setup_rates_from_bssdesc + (pmpriv, pbss_desc, rates, &rates_size)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Save the data rates into Current BSS state structure */ + pmpriv->curr_bss_params.num_of_rates = rates_size; + memcpy(pmadapter, &pmpriv->curr_bss_params.data_rates, rates, + rates_size); + + /* Setup the Rates TLV in the association command */ + prates_tlv = (MrvlIEtypes_RatesParamSet_t *)pos; + prates_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_RATES); + prates_tlv->header.len = wlan_cpu_to_le16((t_u16)rates_size); + memcpy(pmadapter, prates_tlv->rates, rates, rates_size); + pos += sizeof(prates_tlv->header) + rates_size; + PRINTM(MINFO, "ASSOC_CMD: Rates size = %d\n", rates_size); + + /* Add the Authentication type to be used for Auth frames if needed */ + if (pmpriv->sec_info.authentication_mode != MLAN_AUTH_MODE_AUTO) { + pauth_tlv = (MrvlIEtypes_AuthType_t *)pos; + pauth_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_AUTH_TYPE); + pauth_tlv->header.len = sizeof(pauth_tlv->auth_type); + if ((pmpriv->sec_info.wep_status == Wlan802_11WEPEnabled) + || (pmpriv->sec_info.authentication_mode == + MLAN_AUTH_MODE_NETWORKEAP)) + pauth_tlv->auth_type = + wlan_cpu_to_le16((t_u16)pmpriv->sec_info. + authentication_mode); + else if (pmpriv->sec_info.authentication_mode == + MLAN_AUTH_MODE_FT) + pauth_tlv->auth_type = + wlan_cpu_to_le16(AssocAgentAuth_FastBss_Skip); + else + pauth_tlv->auth_type = + wlan_cpu_to_le16(MLAN_AUTH_MODE_OPEN); + pos += sizeof(pauth_tlv->header) + pauth_tlv->header.len; + pauth_tlv->header.len = wlan_cpu_to_le16(pauth_tlv->header.len); + } + + if (IS_SUPPORT_MULTI_BANDS(pmadapter) + && (pbss_desc->bss_band & pmpriv->config_bands) + && !(ISSUPP_11NENABLED(pmadapter->fw_cap_info) + && (!pbss_desc->disable_11n) + && (pmpriv->config_bands & BAND_GN + || pmpriv->config_bands & BAND_AN) + && (pbss_desc->pht_cap) + ) + ) { + /* Append a channel TLV for the channel the attempted AP was + found on */ + pchan_tlv = (MrvlIEtypes_ChanListParamSet_t *)pos; + pchan_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_CHANLIST); + pchan_tlv->header.len = + wlan_cpu_to_le16(sizeof(ChanScanParamSet_t)); + + memset(pmadapter, pchan_tlv->chan_scan_param, 0x00, + sizeof(ChanScanParamSet_t)); + pchan_tlv->chan_scan_param[0].chan_number = + (pbss_desc->phy_param_set.ds_param_set.current_chan); + PRINTM(MINFO, "Assoc: TLV Chan = %d\n", + pchan_tlv->chan_scan_param[0].chan_number); + + pchan_tlv->chan_scan_param[0].radio_type = + wlan_band_to_radio_type((t_u8)pbss_desc->bss_band); + + PRINTM(MINFO, "Assoc: TLV Band = %d\n", + pchan_tlv->chan_scan_param[0].radio_type); + pos += sizeof(pchan_tlv->header) + sizeof(ChanScanParamSet_t); + } + if (!pmpriv->wps.session_enable) { + if ((pmpriv->sec_info.wpa_enabled + || pmpriv->sec_info.wpa2_enabled)) { + prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *)pos; + /* WPA_IE or RSN_IE */ + prsn_ie_tlv->header.type = (t_u16)pmpriv->wpa_ie[0]; + prsn_ie_tlv->header.type = + prsn_ie_tlv->header.type & 0x00FF; + prsn_ie_tlv->header.type = + wlan_cpu_to_le16(prsn_ie_tlv->header.type); + prsn_ie_tlv->header.len = (t_u16)pmpriv->wpa_ie[1]; + prsn_ie_tlv->header.len = + prsn_ie_tlv->header.len & 0x00FF; + if (prsn_ie_tlv->header.len <= + (sizeof(pmpriv->wpa_ie) - 2)) + memcpy(pmadapter, prsn_ie_tlv->rsn_ie, + &pmpriv->wpa_ie[2], + prsn_ie_tlv->header.len); + else { + ret = MLAN_STATUS_FAILURE; + goto done; + } + HEXDUMP("ASSOC_CMD: RSN IE", (t_u8 *)prsn_ie_tlv, + sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len); + pos += sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len; + prsn_ie_tlv->header.len = + wlan_cpu_to_le16(prsn_ie_tlv->header.len); + } else if (pmpriv->sec_info.ewpa_enabled) { + prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *)pos; + if (pbss_desc->pwpa_ie) { + prsn_ie_tlv->header.type = + (t_u16)(*(pbss_desc->pwpa_ie)).vend_hdr. + element_id; + prsn_ie_tlv->header.type = + prsn_ie_tlv->header.type & 0x00FF; + prsn_ie_tlv->header.type = + wlan_cpu_to_le16(prsn_ie_tlv->header. + type); + prsn_ie_tlv->header.len = + (t_u16)(*(pbss_desc->pwpa_ie)).vend_hdr. + len; + prsn_ie_tlv->header.len = + prsn_ie_tlv->header.len & 0x00FF; + if (prsn_ie_tlv->header.len <= + (sizeof(pmpriv->wpa_ie))) { + memcpy(pmadapter, prsn_ie_tlv->rsn_ie, + &((*(pbss_desc->pwpa_ie)). + vend_hdr.oui[0]), + prsn_ie_tlv->header.len); + } else { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + HEXDUMP("ASSOC_CMD: RSN IE", + (t_u8 *)prsn_ie_tlv, + sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len); + pos += sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len; + prsn_ie_tlv->header.len = + wlan_cpu_to_le16(prsn_ie_tlv->header. + len); + } + if (pbss_desc->prsn_ie) { + prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *)pos; + prsn_ie_tlv->header.type = + (t_u16)(*(pbss_desc->prsn_ie)).ieee_hdr. + element_id; + prsn_ie_tlv->header.type = + prsn_ie_tlv->header.type & 0x00FF; + prsn_ie_tlv->header.type = + wlan_cpu_to_le16(prsn_ie_tlv->header. + type); + prsn_ie_tlv->header.len = + (t_u16)(*(pbss_desc->prsn_ie)).ieee_hdr. + len; + prsn_ie_tlv->header.len = + prsn_ie_tlv->header.len & 0x00FF; + if (prsn_ie_tlv->header.len <= + (sizeof(pmpriv->wpa_ie))) { + memcpy(pmadapter, prsn_ie_tlv->rsn_ie, + &((*(pbss_desc->prsn_ie)). + data[0]) + , prsn_ie_tlv->header.len); + wlan_update_rsn_ie(pmpriv, prsn_ie_tlv); + } else { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + HEXDUMP("ASSOC_CMD: RSN IE", + (t_u8 *)prsn_ie_tlv, + sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len); + pos += sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len; + prsn_ie_tlv->header.len = + wlan_cpu_to_le16(prsn_ie_tlv->header. + len); + } + } + } + + if (ISSUPP_11NENABLED(pmadapter->fw_cap_info) + && (!pbss_desc->disable_11n) + && (pmpriv->config_bands & BAND_GN + || pmpriv->config_bands & BAND_AN)) + wlan_cmd_append_11n_tlv(pmpriv, pbss_desc, &pos); + else if ((pmpriv->hotspot_cfg & HOTSPOT_ENABLED) && + !(pmpriv->hotspot_cfg & HOTSPOT_BY_SUPPLICANT)) + wlan_add_ext_capa_info_ie(pmpriv, &pos); + + if (ISSUPP_11ACENABLED(pmadapter->fw_cap_info) + && (!pbss_desc->disable_11n) + && (pbss_desc->bss_band & BAND_A) + && (pmpriv->config_bands & BAND_GAC + || pmpriv->config_bands & BAND_AAC)) + wlan_cmd_append_11ac_tlv(pmpriv, pbss_desc, &pos); + + wlan_wmm_process_association_req(pmpriv, &pos, &pbss_desc->wmm_ie, + pbss_desc->pht_cap); + if (pmpriv->sec_info.wapi_enabled && pmpriv->wapi_ie_len) + wlan_cmd_append_wapi_ie(pmpriv, &pos); + + if (pmpriv->sec_info.osen_enabled && pmpriv->osen_ie_len) + wlan_cmd_append_osen_ie(pmpriv, &pos); + + wlan_cmd_append_generic_ie(pmpriv, &pos); + + if (pbss_desc->pmd_ie) + wlan_cmd_append_pass_through_ie(pmpriv, + (IEEEtypes_Generic_t *) + pbss_desc->pmd_ie, &pos); + wlan_cmd_append_tsf_tlv(pmpriv, &pos, pbss_desc); + + if (wlan_11d_create_dnld_countryinfo(pmpriv, (t_u8)pbss_desc->bss_band)) { + PRINTM(MERROR, "Dnld_countryinfo_11d failed\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + if (wlan_11d_parse_dnld_countryinfo + (pmpriv, pmpriv->pattempted_bss_desc)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* + * Call 11h join API after capability bits are set so adhoc/infra 11h + * behavior can be properly triggered. pos modified if data is appended + */ + wlan_11h_process_join(pmpriv, &pos, &passo->cap_info, + (t_u8)pbss_desc->bss_band, + pbss_desc->phy_param_set.ds_param_set. + current_chan, &pbss_desc->wlan_11h_bss_info); + + cmd->size = wlan_cpu_to_le16((t_u16)(pos - (t_u8 *)passo) + S_DS_GEN); + + /* Set the Capability info at last */ + memcpy(pmadapter, &tmp_cap, &pbss_desc->cap_info, + sizeof(passo->cap_info)); + + if (pmpriv->config_bands == BAND_B) + SHORT_SLOT_TIME_DISABLED(tmp_cap); + + tmp_cap &= CAPINFO_MASK; + PRINTM(MINFO, "ASSOC_CMD: tmp_cap=%4X CAPINFO_MASK=%4lX\n", + tmp_cap, CAPINFO_MASK); + tmp_cap = wlan_cpu_to_le16(tmp_cap); + memcpy(pmadapter, &passo->cap_info, &tmp_cap, sizeof(passo->cap_info)); + +done: + LEAVE(); + return ret; +} + +/** + * @brief Association firmware command response handler + * + * The response buffer for the association command has the following + * memory layout. + * + * For cases where an association response was not received (indicated + * by the CapInfo and AId field): + * + * .------------------------------------------------------------. + * | Header(4 * sizeof(t_u16)): Standard command response hdr | + * .------------------------------------------------------------. + * | cap_info/Error Return(t_u16): | + * | 0xFFFF(-1): Internal error for association | + * | 0xFFFE(-2): Authentication unhandled message | + * | 0xFFFD(-3): Authentication refused | + * | 0xFFFC(-4): Timeout waiting for AP response | + * | 0xFFFB(-5): Internal error for authentication | + * .------------------------------------------------------------. + * | status_code(t_u16): | + * | If cap_info is -1: | + * | An internal firmware failure prevented the | + * | command from being processed. The status code | + * | is 6 if associate response parameter invlaid, | + * | 1 otherwise. | + * | | + * | If cap_info is -2: | + * | An authentication frame was received but was | + * | not handled by the firmware. IEEE Status code | + * | for the failure is returned. | + * | | + * | If cap_info is -3: | + * | An authentication frame was received and the | + * | status_code is the IEEE Status reported in the | + * | response. | + * | | + * | If cap_info is -4: | + * | (1) Association response timeout | + * | (2) Authentication response timeout | + * | | + * | If cap_info is -5: | + * | An internal firmware failure prevented the | + * | command from being processed. The status code | + * | is 6 if authentication parameter invlaid, | + * | 1 otherwise. | + * .------------------------------------------------------------. + * | a_id(t_u16): 0xFFFF | + * .------------------------------------------------------------. + * + * + * For cases where an association response was received, the IEEE + * standard association response frame is returned: + * + * .------------------------------------------------------------. + * | Header(4 * sizeof(t_u16)): Standard command response hdr | + * .------------------------------------------------------------. + * | cap_info(t_u16): IEEE Capability | + * .------------------------------------------------------------. + * | status_code(t_u16): IEEE Status Code | + * .------------------------------------------------------------. + * | a_id(t_u16): IEEE Association ID | + * .------------------------------------------------------------. + * | IEEE IEs(variable): Any received IEs comprising the | + * | remaining portion of a received | + * | association response frame. | + * .------------------------------------------------------------. + * + * For simplistic handling, the status_code field can be used to determine + * an association success (0) or failure (non-zero). + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ret_802_11_associate(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, IN t_void *pioctl_buf) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ioctl_req *pioctl_req = (mlan_ioctl_req *)pioctl_buf; + IEEEtypes_AssocRsp_t *passoc_rsp; + BSSDescriptor_t *pbss_desc; + t_u8 enable_data = MTRUE; + t_u8 event_buf[100]; + mlan_event *pevent = (mlan_event *)event_buf; + t_u8 cur_mac[MLAN_MAC_ADDR_LENGTH]; + t_u8 media_connected = pmpriv->media_connected; + mlan_adapter *pmadapter = pmpriv->adapter; + + ENTER(); + + passoc_rsp = (IEEEtypes_AssocRsp_t *)&resp->params; + passoc_rsp->status_code = wlan_le16_to_cpu(passoc_rsp->status_code); + if (pmpriv->media_connected == MTRUE) + memcpy(pmpriv->adapter, cur_mac, + pmpriv->curr_bss_params.bss_descriptor.mac_address, + MLAN_MAC_ADDR_LENGTH); + + HEXDUMP("ASSOC_RESP:", (t_u8 *)&resp->params, (resp->size - S_DS_GEN)); + + pmpriv->assoc_rsp_size = MIN(resp->size - S_DS_GEN, + sizeof(pmpriv->assoc_rsp_buf)); + + memcpy(pmpriv->adapter, pmpriv->assoc_rsp_buf, &resp->params, + pmpriv->assoc_rsp_size); + + if (passoc_rsp->status_code) { + if (pmpriv->media_connected == MTRUE) { + if (pmpriv->port_ctrl_mode == MTRUE) + pmpriv->port_open = pmpriv->prior_port_status; + if (!memcmp + (pmpriv->adapter, cur_mac, + pmpriv->pattempted_bss_desc->mac_address, + MLAN_MAC_ADDR_LENGTH)) + wlan_reset_connect_state(pmpriv, MTRUE); + else + wlan_recv_event(pmpriv, + MLAN_EVENT_ID_DRV_ASSOC_FAILURE_REPORT, + MNULL); + } else + wlan_reset_connect_state(pmpriv, MTRUE); + pmpriv->adapter->dbg.num_cmd_assoc_failure++; + PRINTM(MERROR, "ASSOC_RESP: Association Failed, " + "status code = %d, error = 0x%x, a_id = 0x%x\n", + wlan_le16_to_cpu(passoc_rsp->status_code), + wlan_le16_to_cpu(*(t_u16 *)&passoc_rsp->capability), + wlan_le16_to_cpu(passoc_rsp->a_id)); + + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Send a Media Connected event, according to the Spec */ + pmpriv->media_connected = MTRUE; + + pmpriv->adapter->pps_uapsd_mode = MFALSE; + pmpriv->adapter->tx_lock_flag = MFALSE; + pmpriv->adapter->delay_null_pkt = MFALSE; + + /* Set the attempted BSSID Index to current */ + pbss_desc = pmpriv->pattempted_bss_desc; + + PRINTM(MCMND, "ASSOC_RESP: %-32s (a_id = 0x%x)\n", pbss_desc->ssid.ssid, + wlan_le16_to_cpu(passoc_rsp->a_id)); + + /* Make a copy of current BSSID descriptor */ + memcpy(pmpriv->adapter, &pmpriv->curr_bss_params.bss_descriptor, + pbss_desc, sizeof(BSSDescriptor_t)); + + /* Update curr_bss_params */ + pmpriv->curr_bss_params.bss_descriptor.channel + = pbss_desc->phy_param_set.ds_param_set.current_chan; + + pmpriv->curr_bss_params.band = (t_u8)pbss_desc->bss_band; + + /* + * Adjust the timestamps in the scan table to be relative to the newly + * associated AP's TSF + */ + wlan_update_tsf_timestamps(pmpriv, pbss_desc); + + if (pbss_desc->wmm_ie.vend_hdr.element_id == WMM_IE) + pmpriv->curr_bss_params.wmm_enabled = MTRUE; + else + pmpriv->curr_bss_params.wmm_enabled = MFALSE; + + if ((pmpriv->wmm_required + || (pbss_desc->pht_cap && + (pbss_desc->pht_cap->ieee_hdr.element_id == HT_CAPABILITY)) + ) && pmpriv->curr_bss_params.wmm_enabled) + pmpriv->wmm_enabled = MTRUE; + else + pmpriv->wmm_enabled = MFALSE; + + pmpriv->curr_bss_params.wmm_uapsd_enabled = MFALSE; + + if (pmpriv->wmm_enabled == MTRUE) + pmpriv->curr_bss_params.wmm_uapsd_enabled + = pbss_desc->wmm_ie.qos_info.qos_uapsd; + + PRINTM(MINFO, "ASSOC_RESP: curr_pkt_filter is 0x%x\n", + pmpriv->curr_pkt_filter); + if (pmpriv->sec_info.wpa_enabled || pmpriv->sec_info.wpa2_enabled) + pmpriv->wpa_is_gtk_set = MFALSE; + + if (pmpriv->wmm_enabled) + /* Don't re-enable carrier until we get the WMM_GET_STATUS + event */ + enable_data = MFALSE; + else + /* Since WMM is not enabled, setup the queues with the defaults + */ + wlan_wmm_setup_queues(pmpriv); + + if (enable_data) + PRINTM(MINFO, "Post association, re-enabling data flow\n"); + + /* Reset SNR/NF/RSSI values */ + pmpriv->data_rssi_last = 0; + pmpriv->data_nf_last = 0; + pmpriv->data_rssi_avg = 0; + pmpriv->data_nf_avg = 0; + pmpriv->bcn_rssi_last = 0; + pmpriv->bcn_nf_last = 0; + pmpriv->bcn_rssi_avg = 0; + pmpriv->bcn_nf_avg = 0; + pmpriv->rxpd_rate = 0; + pmpriv->rxpd_rate_info = 0; + if (pbss_desc->pvht_cap && pbss_desc->pht_cap) { + if (GET_VHTCAP_MAXMPDULEN + (pbss_desc->pvht_cap->vht_cap.vht_cap_info) == 2) + pmpriv->max_amsdu = MLAN_TX_DATA_BUF_SIZE_12K; + else if (GET_VHTCAP_MAXMPDULEN + (pbss_desc->pvht_cap->vht_cap.vht_cap_info) == 1) + pmpriv->max_amsdu = MLAN_TX_DATA_BUF_SIZE_8K; + else + pmpriv->max_amsdu = MLAN_TX_DATA_BUF_SIZE_4K; + } else if (pbss_desc->pht_cap) { + if (GETHT_MAXAMSDU(pbss_desc->pht_cap->ht_cap.ht_cap_info)) + pmpriv->max_amsdu = MLAN_TX_DATA_BUF_SIZE_8K; + else + pmpriv->max_amsdu = MLAN_TX_DATA_BUF_SIZE_4K; + } + + wlan_save_curr_bcn(pmpriv); + + pmpriv->adapter->dbg.num_cmd_assoc_success++; + + PRINTM(MINFO, "ASSOC_RESP: Associated\n"); + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_DRV_CONNECTED; + pevent->event_len = MLAN_MAC_ADDR_LENGTH; + memcpy(pmpriv->adapter, (t_u8 *)pevent->event_buf, + (t_u8 *)pmpriv->curr_bss_params.bss_descriptor.mac_address, + MLAN_MAC_ADDR_LENGTH); + + /* Add the ra_list here for infra mode as there will be only 1 ra + always */ + if (media_connected) { + /** replace ralist's mac address with new mac address */ + if (0 == + wlan_ralist_update(pmpriv, cur_mac, + pmpriv->curr_bss_params.bss_descriptor. + mac_address)) + wlan_ralist_add(pmpriv, + pmpriv->curr_bss_params.bss_descriptor. + mac_address); + wlan_11n_cleanup_reorder_tbl(pmpriv); + + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + pmpriv->wmm. + ra_list_spinlock); + wlan_11n_deleteall_txbastream_tbl(pmpriv); + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + pmpriv->wmm. + ra_list_spinlock); + } else + wlan_ralist_add(pmpriv, + pmpriv->curr_bss_params.bss_descriptor. + mac_address); + + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_CONNECTED, pevent); + + /* Send OBSS scan param to the application if available */ + wlan_2040_coex_event(pmpriv); + wlan_coex_ampdu_rxwinsize(pmadapter); + + if (!pmpriv->sec_info.wpa_enabled + && !pmpriv->sec_info.wpa2_enabled + && !pmpriv->sec_info.ewpa_enabled + && !pmpriv->sec_info.wapi_enabled + && !pmpriv->wps.session_enable && !pmpriv->sec_info.osen_enabled) { + /* We are in Open/WEP mode, open port immediately */ + if (pmpriv->port_ctrl_mode == MTRUE) { + pmpriv->port_open = MTRUE; + PRINTM(MINFO, "ASSOC_RESP: port_status = OPEN\n"); + } + } + + if (pmpriv->sec_info.wpa_enabled + || pmpriv->sec_info.wpa2_enabled + || pmpriv->sec_info.ewpa_enabled + || pmpriv->sec_info.wapi_enabled + || pmpriv->wps.session_enable || pmpriv->sec_info.osen_enabled) + pmpriv->adapter->scan_block = MTRUE; + +done: + /* Need to indicate IOCTL complete */ + if (pioctl_req != MNULL) { + if (ret != MLAN_STATUS_SUCCESS) { + if (passoc_rsp->status_code) + pioctl_req->status_code = + (wlan_le16_to_cpu + (*(t_u16 *)&passoc_rsp-> + capability) << 16) + + wlan_le16_to_cpu(passoc_rsp-> + status_code); + else + pioctl_req->status_code = + MLAN_ERROR_CMD_ASSOC_FAIL; + } else { + pioctl_req->status_code = MLAN_ERROR_NO_ERROR; + } + } + + LEAVE(); + return ret; +} + +/** + * @brief This function prepares command of ad_hoc_start. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param pdata_buf A pointer cast of mlan_802_11_ssid structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_cmd_802_11_ad_hoc_start(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_adapter *pmadapter = pmpriv->adapter; + HostCmd_DS_802_11_AD_HOC_START *padhoc_start = &cmd->params.adhoc_start; + BSSDescriptor_t *pbss_desc; + t_u32 cmd_append_size = 0; + t_u32 i; + t_u16 tmp_cap; + MrvlIEtypes_ChanListParamSet_t *pchan_tlv; + + MrvlIEtypes_RsnParamSet_t *prsn_ie_tlv; + MrvlIETypes_HTCap_t *pht_cap; + MrvlIETypes_HTInfo_t *pht_info; + t_u32 rx_mcs_supp = 0; + MrvlIETypes_VHTCap_t *pvht_cap = MNULL; + MrvlIETypes_VHTOprat_t *pvht_op = MNULL; + t_u16 mcs_map_user = 0; + /* wpa ie for WPA_NONE AES */ + const t_u8 wpa_ie[24] = + { 0xdd, 0x16, 0x00, 0x50, 0xf2, 0x01, 0x01, 0x00, + 0x00, 0x50, 0xf2, 0x04, 0x01, 0x00, 0x00, 0x50, + 0xf2, 0x00, 0x01, 0x00, 0x00, 0x50, 0xf2, 0x00 + }; + t_s32 append_size_11h = 0; + t_u8 *pos = + (t_u8 *)padhoc_start + sizeof(HostCmd_DS_802_11_AD_HOC_START); + + ENTER(); + + if (!pmadapter) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_AD_HOC_START); + + pbss_desc = &pmpriv->curr_bss_params.bss_descriptor; + pmpriv->pattempted_bss_desc = pbss_desc; + + /* + * Fill in the parameters for 2 data structures: + * 1. HostCmd_DS_802_11_AD_HOC_START command + * 2. pbss_desc + * Driver will fill up SSID, bss_mode,IBSS param, Physical Param, + * probe delay, and Cap info. + * Firmware will fill up beacon period, Basic rates + * and operational rates. + */ + + memset(pmadapter, padhoc_start->ssid, 0, MLAN_MAX_SSID_LENGTH); + + memcpy(pmadapter, padhoc_start->ssid, + ((mlan_802_11_ssid *)pdata_buf)->ssid, + MIN(MLAN_MAX_SSID_LENGTH, + ((mlan_802_11_ssid *)pdata_buf)->ssid_len)); + + PRINTM(MINFO, "ADHOC_S_CMD: SSID = %s\n", padhoc_start->ssid); + + memset(pmadapter, pbss_desc->ssid.ssid, 0, MLAN_MAX_SSID_LENGTH); + memcpy(pmadapter, pbss_desc->ssid.ssid, + ((mlan_802_11_ssid *)pdata_buf)->ssid, + MIN(MLAN_MAX_SSID_LENGTH, + ((mlan_802_11_ssid *)pdata_buf)->ssid_len)); + + pbss_desc->ssid.ssid_len = + MIN(MLAN_MAX_SSID_LENGTH, + ((mlan_802_11_ssid *)pdata_buf)->ssid_len); + + /* Set the BSS mode */ + padhoc_start->bss_mode = HostCmd_BSS_MODE_IBSS; + pbss_desc->bss_mode = MLAN_BSS_MODE_IBSS; + padhoc_start->beacon_period = wlan_cpu_to_le16(pmpriv->beacon_period); + pbss_desc->beacon_period = pmpriv->beacon_period; + + /* Set Physical param set */ +/** Parameter IE Id */ +#define DS_PARA_IE_ID 3 +/** Parameter IE length */ +#define DS_PARA_IE_LEN 1 + + padhoc_start->phy_param_set.ds_param_set.element_id = DS_PARA_IE_ID; + padhoc_start->phy_param_set.ds_param_set.len = DS_PARA_IE_LEN; + + if (!wlan_get_cfp_by_band_and_channel + (pmadapter, pmadapter->adhoc_start_band, + (t_u16)pmpriv->adhoc_channel, pmadapter->region_channel)) { + + chan_freq_power_t *cfp; + cfp = wlan_get_cfp_by_band_and_channel(pmadapter, + pmadapter-> + adhoc_start_band, + FIRST_VALID_CHANNEL, + pmadapter-> + region_channel); + if (cfp) + pmpriv->adhoc_channel = (t_u8)cfp->channel; + } + + MASSERT(pmpriv->adhoc_channel); + + PRINTM(MINFO, "ADHOC_S_CMD: Creating ADHOC on Channel %d\n", + pmpriv->adhoc_channel); + + pmpriv->curr_bss_params.bss_descriptor.channel = pmpriv->adhoc_channel; + pmpriv->curr_bss_params.band = pmadapter->adhoc_start_band; + + pbss_desc->channel = pmpriv->adhoc_channel; + padhoc_start->phy_param_set.ds_param_set.current_chan = + pmpriv->adhoc_channel; + + memcpy(pmadapter, &pbss_desc->phy_param_set, + &padhoc_start->phy_param_set, sizeof(IEEEtypes_PhyParamSet_t)); + + pbss_desc->network_type_use = Wlan802_11DS; + + /* Set IBSS param set */ +/** IBSS parameter IE Id */ +#define IBSS_PARA_IE_ID 6 +/** IBSS parameter IE length */ +#define IBSS_PARA_IE_LEN 2 + + padhoc_start->ss_param_set.ibss_param_set.element_id = IBSS_PARA_IE_ID; + padhoc_start->ss_param_set.ibss_param_set.len = IBSS_PARA_IE_LEN; + padhoc_start->ss_param_set.ibss_param_set.atim_window + = wlan_cpu_to_le16(pmpriv->atim_window); + pbss_desc->atim_window = pmpriv->atim_window; + memcpy(pmadapter, &pbss_desc->ss_param_set, + &padhoc_start->ss_param_set, sizeof(IEEEtypes_SsParamSet_t)); + + /* Set Capability info */ + padhoc_start->cap.ess = 0; + padhoc_start->cap.ibss = 1; + pbss_desc->cap_info.ibss = 1; + + /* Set up privacy in pbss_desc */ + if (pmpriv->sec_info.wep_status == Wlan802_11WEPEnabled + || pmpriv->adhoc_aes_enabled + || pmpriv->sec_info.wpa_enabled || pmpriv->sec_info.ewpa_enabled) { +/** Ad-Hoc capability privacy on */ +#define AD_HOC_CAP_PRIVACY_ON 1 + PRINTM(MINFO, "ADHOC_S_CMD: wep_status set, Privacy to WEP\n"); + pbss_desc->privacy = Wlan802_11PrivFilter8021xWEP; + padhoc_start->cap.privacy = AD_HOC_CAP_PRIVACY_ON; + } else { + PRINTM(MWARN, "ADHOC_S_CMD: wep_status NOT set, Setting " + "Privacy to ACCEPT ALL\n"); + pbss_desc->privacy = Wlan802_11PrivFilterAcceptAll; + } + + memset(pmadapter, padhoc_start->DataRate, 0, + sizeof(padhoc_start->DataRate)); + + if ((pmpriv->adapter->region_code == COUNTRY_CODE_JP_40 || + pmpriv->adapter->region_code == COUNTRY_CODE_JP_FF) + && (pbss_desc->phy_param_set.ds_param_set.current_chan == 14)) { + wlan_get_active_data_rates(pmpriv, pmpriv->bss_mode, + BAND_B, padhoc_start->DataRate); + } else { + wlan_get_active_data_rates(pmpriv, pmpriv->bss_mode, + pmadapter->adhoc_start_band, + padhoc_start->DataRate); + } + + if ((pmadapter->adhoc_start_band & BAND_G) && + (pmpriv->curr_pkt_filter & HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON)) { + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_MAC_CONTROL, + HostCmd_ACT_GEN_SET, + 0, MNULL, &pmpriv->curr_pkt_filter); + + if (ret) { + PRINTM(MERROR, + "ADHOC_S_CMD: G Protection config failed\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + } + /* Find the last non zero */ + for (i = 0; i < sizeof(padhoc_start->DataRate) + && padhoc_start->DataRate[i]; i++) + /* XXX Do not delete no-operation line */ + ; + + pmpriv->curr_bss_params.num_of_rates = i; + + /* Copy the ad-hoc creating rates into Current BSS rate structure */ + memcpy(pmadapter, &pmpriv->curr_bss_params.data_rates, + &padhoc_start->DataRate, pmpriv->curr_bss_params.num_of_rates); + + PRINTM(MINFO, "ADHOC_S_CMD: Rates=%02x %02x %02x %02x\n", + padhoc_start->DataRate[0], padhoc_start->DataRate[1], + padhoc_start->DataRate[2], padhoc_start->DataRate[3]); + + PRINTM(MINFO, "ADHOC_S_CMD: AD HOC Start command is ready\n"); + + if (IS_SUPPORT_MULTI_BANDS(pmadapter)) { + /* Append a channel TLV */ + pchan_tlv = (MrvlIEtypes_ChanListParamSet_t *)pos; + pchan_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_CHANLIST); + pchan_tlv->header.len = + wlan_cpu_to_le16(sizeof(ChanScanParamSet_t)); + + memset(pmadapter, pchan_tlv->chan_scan_param, 0x00, + sizeof(ChanScanParamSet_t)); + pchan_tlv->chan_scan_param[0].chan_number = + (t_u8)pmpriv->curr_bss_params.bss_descriptor.channel; + + PRINTM(MINFO, "ADHOC_S_CMD: TLV Chan = %d\n", + pchan_tlv->chan_scan_param[0].chan_number); + + pchan_tlv->chan_scan_param[0].radio_type + = wlan_band_to_radio_type(pmpriv->curr_bss_params.band); + if (pmadapter->adhoc_start_band & BAND_GN + || pmadapter->adhoc_start_band & BAND_AN + || pmadapter->adhoc_start_band & BAND_GAC + || pmadapter->adhoc_start_band & BAND_AAC) { + if (pmadapter->chan_bandwidth == CHANNEL_BW_40MHZ_ABOVE) { + pchan_tlv->chan_scan_param[0].radio_type |= + SECOND_CHANNEL_ABOVE; + pchan_tlv->chan_scan_param[0].radio_type |= + CHAN_BW_40MHZ << 2; + } else if (pmadapter->chan_bandwidth == + CHANNEL_BW_40MHZ_BELOW) { + pchan_tlv->chan_scan_param[0].radio_type |= + SECOND_CHANNEL_BELOW; + pchan_tlv->chan_scan_param[0].radio_type |= + CHAN_BW_40MHZ << 2; + } else if (pmadapter->chan_bandwidth == + CHANNEL_BW_80MHZ) { + pchan_tlv->chan_scan_param[0].radio_type |= + CHAN_BW_80MHZ << 2; + } + } + PRINTM(MINFO, "ADHOC_S_CMD: TLV Band = %d\n", + pchan_tlv->chan_scan_param[0].radio_type); + pos += sizeof(pchan_tlv->header) + sizeof(ChanScanParamSet_t); + cmd_append_size += + sizeof(pchan_tlv->header) + sizeof(ChanScanParamSet_t); + } + + if (wlan_11d_create_dnld_countryinfo + (pmpriv, pmpriv->curr_bss_params.band)) { + PRINTM(MERROR, "ADHOC_S_CMD: dnld_countryinfo_11d failed\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* + * Call 11h start API to add any 11h flags/elements as TLV parameters + */ + append_size_11h = + wlan_11h_process_start(pmpriv, &pos, &padhoc_start->cap, + pmpriv->adhoc_channel, + &pbss_desc->wlan_11h_bss_info); + if (append_size_11h >= 0) + cmd_append_size += append_size_11h; + else { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + if (pmpriv->sec_info.ewpa_enabled) { + memcpy(pmadapter, pmpriv->wpa_ie, wpa_ie, sizeof(wpa_ie)); + pmpriv->wpa_ie_len = sizeof(wpa_ie); + } + + if (pmpriv->sec_info.wpa_enabled || pmpriv->sec_info.ewpa_enabled) { + prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *)pos; + prsn_ie_tlv->header.type = (t_u16)pmpriv->wpa_ie[0]; + /* WPA_IE or RSN_IE */ + prsn_ie_tlv->header.type = prsn_ie_tlv->header.type & 0x00FF; + prsn_ie_tlv->header.type = + wlan_cpu_to_le16(prsn_ie_tlv->header.type); + prsn_ie_tlv->header.len = (t_u16)pmpriv->wpa_ie[1]; + prsn_ie_tlv->header.len = prsn_ie_tlv->header.len & 0x00FF; + if (prsn_ie_tlv->header.len <= (sizeof(pmpriv->wpa_ie) - 2)) + memcpy(pmadapter, prsn_ie_tlv->rsn_ie, + &pmpriv->wpa_ie[2], prsn_ie_tlv->header.len); + else { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + DBG_HEXDUMP(MCMD_D, "ADHOC_S_CMD: RSN IE", (t_u8 *)prsn_ie_tlv, + sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len); + pos += sizeof(prsn_ie_tlv->header) + prsn_ie_tlv->header.len; + cmd_append_size += + sizeof(prsn_ie_tlv->header) + prsn_ie_tlv->header.len; + prsn_ie_tlv->header.len = + wlan_cpu_to_le16(prsn_ie_tlv->header.len); + } + + if (pmadapter->adhoc_11n_enabled == MTRUE) { + { + pht_cap = (MrvlIETypes_HTCap_t *)pos; + memset(pmadapter, pht_cap, 0, + sizeof(MrvlIETypes_HTCap_t)); + pht_cap->header.type = wlan_cpu_to_le16(HT_CAPABILITY); + pht_cap->header.len = sizeof(HTCap_t); + rx_mcs_supp = + GET_RXMCSSUPP(pmpriv->usr_dev_mcs_support); + /* Set MCS for 1x1/2x2 */ + memset(pmadapter, + (t_u8 *)pht_cap->ht_cap.supported_mcs_set, 0xff, + rx_mcs_supp); + wlan_fill_ht_cap_tlv(pmpriv, pht_cap, + pmpriv->curr_bss_params.band); + HEXDUMP("ADHOC_START: HT_CAPABILITIES IE", + (t_u8 *)pht_cap, sizeof(MrvlIETypes_HTCap_t)); + pos += sizeof(MrvlIETypes_HTCap_t); + cmd_append_size += sizeof(MrvlIETypes_HTCap_t); + pht_cap->header.len = + wlan_cpu_to_le16(pht_cap->header.len); + } + { + pht_info = (MrvlIETypes_HTInfo_t *)pos; + memset(pmadapter, pht_info, 0, + sizeof(MrvlIETypes_HTInfo_t)); + pht_info->header.type = wlan_cpu_to_le16(HT_OPERATION); + pht_info->header.len = sizeof(HTInfo_t); + pht_info->ht_info.pri_chan = + (t_u8)pmpriv->curr_bss_params.bss_descriptor. + channel; + if ((pmadapter->chan_bandwidth == + CHANNEL_BW_40MHZ_ABOVE) || + (pmadapter->chan_bandwidth == + CHANNEL_BW_40MHZ_BELOW)) { + pht_info->ht_info.field2 = + pmadapter->chan_bandwidth; + SET_CHANWIDTH40(pht_info->ht_info.field2); + } + pht_info->ht_info.field3 = NON_GREENFIELD_STAS; + pht_info->ht_info.basic_mcs_set[0] = 0xff; + HEXDUMP("ADHOC_START: HT_INFORMATION IE", + (t_u8 *)pht_info, sizeof(MrvlIETypes_HTInfo_t)); + pos += sizeof(MrvlIETypes_HTInfo_t); + cmd_append_size += sizeof(MrvlIETypes_HTInfo_t); + pht_info->header.len = + wlan_cpu_to_le16(pht_info->header.len); + } + if (ISSUPP_11ACENABLED(pmadapter->fw_cap_info) + && (pmadapter->adhoc_start_band & BAND_GAC + || pmadapter->adhoc_start_band & BAND_AAC)) { + /* VHT Capabilities IE */ + pvht_cap = (MrvlIETypes_VHTCap_t *)pos; + memset(pmadapter, pvht_cap, 0, + sizeof(MrvlIETypes_VHTCap_t)); + pht_cap->header.type = wlan_cpu_to_le16(VHT_CAPABILITY); + pht_cap->header.len = sizeof(VHT_capa_t); + /* rx MCS Map */ + mcs_map_user = + GET_DEVRXMCSMAP(pmpriv-> + usr_dot_11ac_mcs_support); + pvht_cap->vht_cap.mcs_sets.rx_mcs_map = + wlan_cpu_to_le16(mcs_map_user); + /* rx highest rate */ + pvht_cap->vht_cap.mcs_sets.rx_max_rate = + wlan_convert_mcsmap_to_maxrate(pmpriv, + pmadapter-> + adhoc_start_band, + mcs_map_user); + pvht_cap->vht_cap.mcs_sets.rx_max_rate = + wlan_cpu_to_le16(pvht_cap->vht_cap.mcs_sets. + rx_max_rate); + /* tx MCS map */ + mcs_map_user = + GET_DEVTXMCSMAP(pmpriv-> + usr_dot_11ac_mcs_support); + pvht_cap->vht_cap.mcs_sets.tx_mcs_map = + wlan_cpu_to_le16(mcs_map_user); + /* tx highest rate */ + pvht_cap->vht_cap.mcs_sets.tx_max_rate = + wlan_convert_mcsmap_to_maxrate(pmpriv, + pmadapter-> + adhoc_start_band, + mcs_map_user); + pvht_cap->vht_cap.mcs_sets.tx_max_rate = + wlan_cpu_to_le16(pvht_cap->vht_cap.mcs_sets. + tx_max_rate); + + wlan_fill_vht_cap_tlv(pmpriv, pvht_cap, + pmadapter->adhoc_start_band); + HEXDUMP("VHT_CAPABILITIES IE", (t_u8 *)pvht_cap, + sizeof(MrvlIETypes_VHTCap_t)); + pos += sizeof(MrvlIETypes_VHTCap_t); + cmd_append_size += sizeof(MrvlIETypes_VHTCap_t); + pvht_cap->header.len = + wlan_cpu_to_le16(pvht_cap->header.len); + /* VHT Operation IE */ + pvht_op = (MrvlIETypes_VHTOprat_t *)pos; + memset(pmadapter, pvht_cap, 0, + sizeof(MrvlIETypes_VHTOprat_t)); + pvht_op->header.type = wlan_cpu_to_le16(VHT_OPERATION); + pvht_op->header.len = sizeof(MrvlIETypes_VHTOprat_t) - + sizeof(MrvlIEtypesHeader_t); + if (pmadapter->chan_bandwidth == CHANNEL_BW_80MHZ) { + pvht_op->chan_width = VHT_OPER_CHWD_80MHZ; + /* central frequency */ + pvht_op->chan_center_freq_1 = + wlan_get_center_freq_idx(pmpriv, + pmadapter-> + adhoc_start_band, + pmpriv-> + adhoc_channel, + pmadapter-> + chan_bandwidth); + /* basic MCS (rx MCS Map) */ + pvht_op->basic_MCS_map = + GET_DEVRXMCSMAP(pmpriv-> + usr_dot_11ac_mcs_support); + pvht_op->basic_MCS_map = + wlan_cpu_to_le16(pvht_op-> + basic_MCS_map); + } + + HEXDUMP("VHT_OPERATION IE", (t_u8 *)pvht_op, + sizeof(MrvlIETypes_VHTOprat_t)); + pos += sizeof(MrvlIETypes_VHTOprat_t); + cmd_append_size += sizeof(MrvlIETypes_VHTOprat_t); + pvht_op->header.len = + wlan_cpu_to_le16(pvht_op->header.len); + } + } + + cmd->size = + (t_u16) + wlan_cpu_to_le16((t_u16)(sizeof(HostCmd_DS_802_11_AD_HOC_START) + + S_DS_GEN + cmd_append_size)); + + memcpy(pmadapter, &tmp_cap, &padhoc_start->cap, sizeof(t_u16)); + + if (pmadapter->adhoc_start_band == BAND_B) + SHORT_SLOT_TIME_DISABLED(tmp_cap); + else + SHORT_SLOT_TIME_ENABLED(tmp_cap); + + tmp_cap = wlan_cpu_to_le16(tmp_cap); + memcpy(pmadapter, &padhoc_start->cap, &tmp_cap, sizeof(t_u16)); + + ret = MLAN_STATUS_SUCCESS; +done: + LEAVE(); + return ret; +} + +/** + * @brief This function prepares command of ad_hoc_join. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param pdata_buf Void cast of BSSDescriptor_t from the + * scan table to join + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_cmd_802_11_ad_hoc_join(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_adapter *pmadapter = pmpriv->adapter; + HostCmd_DS_802_11_AD_HOC_JOIN *padhoc_join = &cmd->params.adhoc_join; + BSSDescriptor_t *pbss_desc = (BSSDescriptor_t *)pdata_buf; + MrvlIEtypes_ChanListParamSet_t *pchan_tlv; + MrvlIEtypes_RsnParamSet_t *prsn_ie_tlv; + t_u32 cmd_append_size = 0; + t_u16 tmp_cap; + t_u32 i, rates_size = 0; + t_u32 curr_pkt_filter; + t_u8 *pos = (t_u8 *)padhoc_join + sizeof(HostCmd_DS_802_11_AD_HOC_JOIN); + + ENTER(); + +/** Use G protection */ +#define USE_G_PROTECTION 0x02 + if (pbss_desc->erp_flags & USE_G_PROTECTION) { + curr_pkt_filter = + pmpriv-> + curr_pkt_filter | HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON; + + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_MAC_CONTROL, + HostCmd_ACT_GEN_SET, + 0, MNULL, &curr_pkt_filter); + if (ret) { + PRINTM(MERROR, + "ADHOC_J_CMD: G Protection config failed\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + } + + pmpriv->pattempted_bss_desc = pbss_desc; + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_AD_HOC_JOIN); + + padhoc_join->bss_descriptor.bss_mode = HostCmd_BSS_MODE_IBSS; + + padhoc_join->bss_descriptor.beacon_period + = wlan_cpu_to_le16(pbss_desc->beacon_period); + + memcpy(pmadapter, &padhoc_join->bss_descriptor.bssid, + &pbss_desc->mac_address, MLAN_MAC_ADDR_LENGTH); + + memcpy(pmadapter, &padhoc_join->bss_descriptor.ssid, + &pbss_desc->ssid.ssid, + MIN(MLAN_MAX_SSID_LENGTH, pbss_desc->ssid.ssid_len)); + + memcpy(pmadapter, &padhoc_join->bss_descriptor.phy_param_set, + &pbss_desc->phy_param_set, sizeof(IEEEtypes_PhyParamSet_t)); + + memcpy(pmadapter, &padhoc_join->bss_descriptor.ss_param_set, + &pbss_desc->ss_param_set, sizeof(IEEEtypes_SsParamSet_t)); + padhoc_join->bss_descriptor.ss_param_set.ibss_param_set.atim_window = 0; + + memcpy(pmadapter, &tmp_cap, &pbss_desc->cap_info, + sizeof(IEEEtypes_CapInfo_t)); + + tmp_cap &= CAPINFO_MASK; + + PRINTM(MINFO, "ADHOC_J_CMD: tmp_cap=%4X CAPINFO_MASK=%4lX\n", + tmp_cap, CAPINFO_MASK); + memcpy(pmadapter, &padhoc_join->bss_descriptor.cap, &tmp_cap, + sizeof(IEEEtypes_CapInfo_t)); + + /* Information on BSSID descriptor passed to FW */ + PRINTM(MINFO, + "ADHOC_J_CMD: BSSID = " MACSTR ", SSID = %s\n", + MAC2STR(padhoc_join->bss_descriptor.bssid), + padhoc_join->bss_descriptor.ssid); + + for (i = 0; i < WLAN_SUPPORTED_RATES && pbss_desc->supported_rates[i]; + i++) + /* XXX Do not delete no-operation line */ + ; + rates_size = i; + + /* Copy Data Rates from the Rates recorded in scan response */ + memset(pmadapter, padhoc_join->bss_descriptor.data_rates, 0, + sizeof(padhoc_join->bss_descriptor.data_rates)); + memcpy(pmadapter, padhoc_join->bss_descriptor.data_rates, + pbss_desc->supported_rates, rates_size); + + HEXDUMP("Adapted Rates:", padhoc_join->bss_descriptor.data_rates, + rates_size); + + /* Copy the adhoc join rates into Current BSS state structure */ + pmpriv->curr_bss_params.num_of_rates = rates_size; + memcpy(pmadapter, &pmpriv->curr_bss_params.data_rates, + pbss_desc->supported_rates, rates_size); + + /* Copy the channel information */ + pmpriv->curr_bss_params.bss_descriptor.channel = pbss_desc->channel; + pmpriv->curr_bss_params.band = (t_u8)pbss_desc->bss_band; + + if (pmpriv->sec_info.wep_status == Wlan802_11WEPEnabled + || pmpriv->adhoc_aes_enabled + || pmpriv->sec_info.wpa_enabled || pmpriv->sec_info.ewpa_enabled) + padhoc_join->bss_descriptor.cap.privacy = AD_HOC_CAP_PRIVACY_ON; + + if (IS_SUPPORT_MULTI_BANDS(pmadapter)) { + /* Append a channel TLV */ + pchan_tlv = (MrvlIEtypes_ChanListParamSet_t *)pos; + pchan_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_CHANLIST); + pchan_tlv->header.len = + wlan_cpu_to_le16(sizeof(ChanScanParamSet_t)); + + memset(pmadapter, pchan_tlv->chan_scan_param, 0x00, + sizeof(ChanScanParamSet_t)); + pchan_tlv->chan_scan_param[0].chan_number = + (pbss_desc->phy_param_set.ds_param_set.current_chan); + PRINTM(MINFO, "ADHOC_J_CMD: TLV Chan = %d\n", + pchan_tlv->chan_scan_param[0].chan_number); + + pchan_tlv->chan_scan_param[0].radio_type + = wlan_band_to_radio_type((t_u8)pbss_desc->bss_band); + + PRINTM(MINFO, "ADHOC_J_CMD: TLV Band = %d\n", + pchan_tlv->chan_scan_param[0].radio_type); + pos += sizeof(pchan_tlv->header) + sizeof(ChanScanParamSet_t); + cmd_append_size += + sizeof(pchan_tlv->header) + sizeof(ChanScanParamSet_t); + } + + if (wlan_11d_create_dnld_countryinfo(pmpriv, (t_u8)pbss_desc->bss_band)) { + PRINTM(MERROR, "Dnld_countryinfo_11d failed\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + if (wlan_11d_parse_dnld_countryinfo + (pmpriv, pmpriv->pattempted_bss_desc)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* + * Call 11h join API after capability bits are set so + * adhoc/infra 11h behavior can be properly triggered. + * pos modified if data is appended + */ + cmd_append_size += wlan_11h_process_join(pmpriv, &pos, + &padhoc_join->bss_descriptor. + cap, (t_u8)pbss_desc->bss_band, + pbss_desc->channel, + &pbss_desc->wlan_11h_bss_info); + + if (pmpriv->sec_info.wpa_enabled) { + prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *)pos; + /* WPA_IE or RSN_IE */ + prsn_ie_tlv->header.type = (t_u16)pmpriv->wpa_ie[0]; + prsn_ie_tlv->header.type = prsn_ie_tlv->header.type & 0x00FF; + prsn_ie_tlv->header.type = + wlan_cpu_to_le16(prsn_ie_tlv->header.type); + prsn_ie_tlv->header.len = (t_u16)pmpriv->wpa_ie[1]; + prsn_ie_tlv->header.len = prsn_ie_tlv->header.len & 0x00FF; + if (prsn_ie_tlv->header.len <= (sizeof(pmpriv->wpa_ie) - 2)) + memcpy(pmadapter, prsn_ie_tlv->rsn_ie, + &pmpriv->wpa_ie[2], prsn_ie_tlv->header.len); + else { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + HEXDUMP("ADHOC_JOIN: RSN IE", (t_u8 *)prsn_ie_tlv, + sizeof(prsn_ie_tlv->header) + prsn_ie_tlv->header.len); + pos += sizeof(prsn_ie_tlv->header) + prsn_ie_tlv->header.len; + cmd_append_size += + sizeof(prsn_ie_tlv->header) + prsn_ie_tlv->header.len; + prsn_ie_tlv->header.len = + wlan_cpu_to_le16(prsn_ie_tlv->header.len); + } else if (pmpriv->sec_info.ewpa_enabled) { + prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *)pos; + if (pbss_desc->pwpa_ie) { + prsn_ie_tlv->header.type = + (t_u16)(*(pbss_desc->pwpa_ie)).vend_hdr. + element_id; + prsn_ie_tlv->header.type = + prsn_ie_tlv->header.type & 0x00FF; + prsn_ie_tlv->header.type = + wlan_cpu_to_le16(prsn_ie_tlv->header.type); + prsn_ie_tlv->header.len = + (t_u16)(*(pbss_desc->pwpa_ie)).vend_hdr.len; + prsn_ie_tlv->header.len = + prsn_ie_tlv->header.len & 0x00FF; + if (prsn_ie_tlv->header.len <= (sizeof(pmpriv->wpa_ie))) { + memcpy(pmadapter, prsn_ie_tlv->rsn_ie, + &((*(pbss_desc->pwpa_ie)).vend_hdr. + oui[0]), prsn_ie_tlv->header.len); + } else { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + HEXDUMP("ADHOC_JOIN: RSN IE", (t_u8 *)prsn_ie_tlv, + sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len); + pos += sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len; + cmd_append_size += + sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len; + prsn_ie_tlv->header.len = + wlan_cpu_to_le16(prsn_ie_tlv->header.len); + } + if (pbss_desc->prsn_ie) { + prsn_ie_tlv = (MrvlIEtypes_RsnParamSet_t *)pos; + prsn_ie_tlv->header.type = + (t_u16)(*(pbss_desc->prsn_ie)).ieee_hdr. + element_id; + prsn_ie_tlv->header.type = + prsn_ie_tlv->header.type & 0x00FF; + prsn_ie_tlv->header.type = + wlan_cpu_to_le16(prsn_ie_tlv->header.type); + prsn_ie_tlv->header.len = + (t_u16)(*(pbss_desc->prsn_ie)).ieee_hdr.len; + prsn_ie_tlv->header.len = + prsn_ie_tlv->header.len & 0x00FF; + if (prsn_ie_tlv->header.len <= (sizeof(pmpriv->wpa_ie))) { + memcpy(pmadapter, prsn_ie_tlv->rsn_ie, + &((*(pbss_desc->prsn_ie)).data[0]) + , prsn_ie_tlv->header.len); + } else { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + HEXDUMP("ADHOC_JOIN: RSN IE", (t_u8 *)prsn_ie_tlv, + sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len); + pos += sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len; + cmd_append_size += + sizeof(prsn_ie_tlv->header) + + prsn_ie_tlv->header.len; + prsn_ie_tlv->header.len = + wlan_cpu_to_le16(prsn_ie_tlv->header.len); + } + } + + if (ISSUPP_11NENABLED(pmadapter->fw_cap_info) + ) + cmd_append_size += + wlan_cmd_append_11n_tlv(pmpriv, pbss_desc, &pos); + if (ISSUPP_11ACENABLED(pmadapter->fw_cap_info) + && (pmadapter->adhoc_start_band & BAND_GAC + || pmadapter->adhoc_start_band & BAND_AAC)) + wlan_cmd_append_11ac_tlv(pmpriv, pbss_desc, &pos); + + cmd->size = + (t_u16) + wlan_cpu_to_le16((t_u16)(sizeof(HostCmd_DS_802_11_AD_HOC_JOIN) + + S_DS_GEN + cmd_append_size)); + + memcpy(pmadapter, &tmp_cap, &padhoc_join->bss_descriptor.cap, + sizeof(IEEEtypes_CapInfo_t)); + tmp_cap = wlan_cpu_to_le16(tmp_cap); + + memcpy(pmadapter, &padhoc_join->bss_descriptor.cap, + &tmp_cap, sizeof(IEEEtypes_CapInfo_t)); + +done: + LEAVE(); + return ret; +} + +/** + * @brief This function handles the command response of ad_hoc_start and + * ad_hoc_join + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ret_802_11_ad_hoc(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, IN t_void *pioctl_buf) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ioctl_req *pioctl_req = (mlan_ioctl_req *)pioctl_buf; + HostCmd_DS_802_11_AD_HOC_START_RESULT *padhoc_start_result = + &resp->params.adhoc_start_result; + HostCmd_DS_802_11_AD_HOC_JOIN_RESULT *padhoc_join_result = + &resp->params.adhoc_join_result; + BSSDescriptor_t *pbss_desc; + t_u16 command = resp->command; + t_u8 result = 0; + t_u8 event_buf[100]; + mlan_event *pevent = (mlan_event *)event_buf; + + ENTER(); + + if (command == HostCmd_CMD_802_11_AD_HOC_START) + result = padhoc_start_result->result; + else + result = padhoc_join_result->result; + + pbss_desc = pmpriv->pattempted_bss_desc; + + /* + * Join result code 0 --> SUCCESS + */ + if (result) { + PRINTM(MERROR, "ADHOC_RESP Failed 0x%x\n", result); + if (pmpriv->media_connected == MTRUE) + wlan_reset_connect_state(pmpriv, MTRUE); + if (pmpriv->adhoc_state == ADHOC_STARTING) + pmpriv->adhoc_state = ADHOC_IDLE; + + memset(pmpriv->adapter, &pmpriv->curr_bss_params.bss_descriptor, + 0x00, sizeof(BSSDescriptor_t)); + + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Send a Media Connected event, according to the Spec */ + pmpriv->media_connected = MTRUE; + + if (command == HostCmd_CMD_802_11_AD_HOC_START) { + PRINTM(MINFO, "ADHOC_S_RESP %s\n", pbss_desc->ssid.ssid); + + /* Update the created network descriptor with the new BSSID */ + memcpy(pmpriv->adapter, pbss_desc->mac_address, + padhoc_start_result->bssid, MLAN_MAC_ADDR_LENGTH); + + pmpriv->adhoc_state = ADHOC_STARTED; + if (pmpriv->adapter->state_rdh.stage == RDH_RESTART_INTFS) + wlan_11h_radar_detected_callback((t_void *)pmpriv); + } else { + /* + * Now the join cmd should be successful. + * If BSSID has changed use SSID to compare instead of BSSID + */ + PRINTM(MINFO, "ADHOC_J_RESP %s\n", pbss_desc->ssid.ssid); + + /* + * Make a copy of current BSSID descriptor, only needed + * for join since the current descriptor is already + * being used for adhoc start + */ + memcpy(pmpriv->adapter, &pmpriv->curr_bss_params.bss_descriptor, + pbss_desc, sizeof(BSSDescriptor_t)); + + pmpriv->adhoc_state = ADHOC_JOINED; + } + + PRINTM(MINFO, "ADHOC_RESP: Channel = %d\n", pmpriv->adhoc_channel); + PRINTM(MINFO, "ADHOC_RESP: BSSID = " MACSTR "\n", + MAC2STR(pmpriv->curr_bss_params.bss_descriptor.mac_address)); + + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_DRV_CONNECTED; + pevent->event_len = MLAN_MAC_ADDR_LENGTH; + memcpy(pmpriv->adapter, (t_u8 *)pevent->event_buf, + (t_u8 *)pmpriv->curr_bss_params.bss_descriptor.mac_address, + MLAN_MAC_ADDR_LENGTH); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_CONNECTED, pevent); + wlan_save_curr_bcn(pmpriv); + +done: + /* Need to indicate IOCTL complete */ + if (pioctl_req != MNULL) { + if (ret != MLAN_STATUS_SUCCESS) + pioctl_req->status_code = MLAN_ERROR_CMD_ASSOC_FAIL; + else + pioctl_req->status_code = MLAN_ERROR_NO_ERROR; + } + + LEAVE(); + return ret; +} + +/** + * @brief Associated to a specific BSS discovered in a scan + * + * @param pmpriv A pointer to mlan_private structure + * @param pioctl_buf A pointer to MLAN IOCTL Request buffer + * @param pbss_desc A pointer to the BSS descriptor to associate with. + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_associate(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, IN BSSDescriptor_t *pbss_desc) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u8 current_bssid[MLAN_MAC_ADDR_LENGTH]; + pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *)pioctl_buf; + + ENTER(); + + /* Return error if the pmadapter or table entry is not marked as infra */ + if ((pmpriv->bss_mode != MLAN_BSS_MODE_INFRA) || + (pbss_desc->bss_mode != MLAN_BSS_MODE_INFRA)) { + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + memcpy(pmpriv->adapter, ¤t_bssid, + &pmpriv->curr_bss_params.bss_descriptor.mac_address, + sizeof(current_bssid)); + + /* Clear any past association response stored for application retrieval + */ + pmpriv->assoc_rsp_size = 0; + + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_ASSOCIATE, + HostCmd_ACT_GEN_SET, 0, pioctl_buf, pbss_desc); + + LEAVE(); + return ret; +} + +/** + * @brief Start an Adhoc Network + * + * @param pmpriv A pointer to mlan_private structure + * @param pioctl_buf A pointer to MLAN IOCTL Request buffer + * @param padhoc_ssid The ssid of the Adhoc Network + * + * @return MLAN_STATUS_SUCCESS--success, MLAN_STATUS_FAILURE--fail + */ +mlan_status +wlan_adhoc_start(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, IN mlan_802_11_ssid *padhoc_ssid) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + wlan_meas_state_t *pmeas_state = &pmpriv->adapter->state_meas; + t_u8 radar = MFALSE; + pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *)pioctl_buf; + + ENTER(); + + /* + * If the report indicates no measurement was done, leave the default + * return value alone. + */ + if (!pmeas_state->meas_rpt_returned.rpt.basic.map.unmeasured) { + radar = pmeas_state->meas_rpt_returned.rpt.basic.map. + radar ? MTRUE : MFALSE; + } + + if (radar) { + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + ret = MLAN_STATUS_FAILURE; + LEAVE(); + return ret; + } + + PRINTM(MINFO, "Adhoc Channel = %d\n", pmpriv->adhoc_channel); + PRINTM(MINFO, "curr_bss_params.channel = %d\n", + pmpriv->curr_bss_params.bss_descriptor.channel); + PRINTM(MINFO, "curr_bss_params.band = %d\n", + pmpriv->curr_bss_params.band); + + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_AD_HOC_START, + HostCmd_ACT_GEN_SET, 0, pioctl_buf, padhoc_ssid); +#if defined(STA_SUPPORT) + if (ret == MLAN_STATUS_SUCCESS) + memcpy(pmpriv->adapter, &pmpriv->adhoc_last_start_ssid, + padhoc_ssid, sizeof(mlan_802_11_ssid)); +#endif + + LEAVE(); + return ret; +} + +/** + * @brief Join an adhoc network found in a previous scan + * + * @param pmpriv A pointer to mlan_private structure + * @param pioctl_buf A pointer to MLAN IOCTL Request buffer + * @param pbss_desc A pointer to the BSS descriptor found in a previous scan + * to attempt to join + * + * @return MLAN_STATUS_SUCCESS--success, MLAN_STATUS_FAILURE--fail + */ +mlan_status +wlan_adhoc_join(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, IN BSSDescriptor_t *pbss_desc) +{ + pmlan_adapter pmadapter = pmpriv->adapter; + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *)pioctl_buf; + + ENTER(); + + PRINTM(MINFO, "wlan_adhoc_join: CurBss.ssid =%s\n", + pmpriv->curr_bss_params.bss_descriptor.ssid.ssid); + PRINTM(MINFO, "wlan_adhoc_join: CurBss.ssid_len =%u\n", + pmpriv->curr_bss_params.bss_descriptor.ssid.ssid_len); + PRINTM(MINFO, "wlan_adhoc_join: ssid =%s\n", pbss_desc->ssid.ssid); + PRINTM(MINFO, "wlan_adhoc_join: ssid len =%u\n", + pbss_desc->ssid.ssid_len); + + /* Check if the requested SSID is already joined */ + if (pmpriv->curr_bss_params.bss_descriptor.ssid.ssid_len && + !wlan_ssid_cmp(pmadapter, &pbss_desc->ssid, + &pmpriv->curr_bss_params.bss_descriptor.ssid) && + (pmpriv->curr_bss_params.bss_descriptor.bss_mode == + MLAN_BSS_MODE_IBSS)) { + + PRINTM(MINFO, + "ADHOC_J_CMD: New ad-hoc SSID is the same as current, " + "not attempting to re-join\n"); + + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + PRINTM(MINFO, "curr_bss_params.channel = %d\n", + pmpriv->curr_bss_params.bss_descriptor.channel); + PRINTM(MINFO, "curr_bss_params.band = %d\n", + pmpriv->curr_bss_params.band); + + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_AD_HOC_JOIN, + HostCmd_ACT_GEN_SET, 0, pioctl_buf, pbss_desc); + + LEAVE(); + return ret; +} + +/** + * @brief Send Deauthentication Request or Stop the AdHoc network depending on mode + * + * @param pmpriv A pointer to mlan_private structure + * @param pioctl_req A pointer to mlan_ioctl_req structure + * @param mac A pointer to mlan_802_11_mac_addr structure + * + * @return MLAN_STATUS_SUCCESS--success, MLAN_STATUS_FAILURE--fail, MLAN_STATUS_PENDING--pending + */ +mlan_status +wlan_disconnect(IN mlan_private *pmpriv, + IN mlan_ioctl_req *pioctl_req, IN mlan_802_11_mac_addr *mac) +{ + mlan_802_11_mac_addr mac_address; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u8 zero_mac[] = { 0, 0, 0, 0, 0, 0 }; + + ENTER(); + + if (pmpriv->media_connected == MTRUE) { + if (pmpriv->bss_mode == MLAN_BSS_MODE_INFRA) { + if (mac) { + if (!memcmp + (pmpriv->adapter, mac, zero_mac, + sizeof(zero_mac))) + memcpy(pmpriv->adapter, + (t_u8 *)&mac_address, + (t_u8 *)&pmpriv->curr_bss_params. + bss_descriptor.mac_address, + MLAN_MAC_ADDR_LENGTH); + else { + memcpy(pmpriv->adapter, + (t_u8 *)&mac_address, + (t_u8 *)mac, + MLAN_MAC_ADDR_LENGTH); + } + } else { + memcpy(pmpriv->adapter, (t_u8 *)&mac_address, + (t_u8 *)&pmpriv->curr_bss_params. + bss_descriptor.mac_address, + MLAN_MAC_ADDR_LENGTH); + } +#ifdef WIFI_DIRECT_SUPPORT + if (pmpriv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_DISASSOCIATE, + HostCmd_ACT_GEN_SET, + 0, + (t_void *)pioctl_req, + &mac_address); + else +#endif + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_DEAUTHENTICATE, + HostCmd_ACT_GEN_SET, + 0, + (t_void *)pioctl_req, + &mac_address); + + if (ret == MLAN_STATUS_SUCCESS && pioctl_req) + ret = MLAN_STATUS_PENDING; + + } else if (pmpriv->bss_mode == MLAN_BSS_MODE_IBSS) { + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_AD_HOC_STOP, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_req, MNULL); + + if (ret == MLAN_STATUS_SUCCESS && pioctl_req) + ret = MLAN_STATUS_PENDING; + } + } + + LEAVE(); + return ret; +} + +/** + * @brief Convert band to radio type used in channel TLV + * + * @param band Band enumeration to convert to a channel TLV radio type + * + * @return Radio type designator for use in a channel TLV + */ +t_u8 +wlan_band_to_radio_type(IN t_u8 band) +{ + t_u8 ret_radio_type; + + ENTER(); + + switch (band) { + case BAND_A: + case BAND_AN: + case BAND_A | BAND_AN: + case BAND_A | BAND_AN | BAND_AAC: + ret_radio_type = HostCmd_SCAN_RADIO_TYPE_A; + break; + case BAND_B: + case BAND_G: + case BAND_B | BAND_G: + default: + ret_radio_type = HostCmd_SCAN_RADIO_TYPE_BG; + break; + } + + LEAVE(); + return ret_radio_type; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_join.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_join.h new file mode 100644 index 00000000..7a6b6fed --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_join.h @@ -0,0 +1,40 @@ +/** @file mlan_join.h + * + * @brief This file defines the interface for the WLAN infrastructure + * and adhoc join routines. + * + * Driver interface functions and type declarations for the join module + * implemented in mlan_join.c. Process all start/join requests for + * both adhoc and infrastructure networks + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 10/13/2008: initial version +******************************************************/ + +#ifndef _MLAN_JOIN_H_ +#define _MLAN_JOIN_H_ + +/** Size of buffer allocated to store the association response from firmware */ +#define MRVDRV_ASSOC_RSP_BUF_SIZE 500 + +/** Size of buffer allocated to store IEs passed to firmware in the assoc req */ +#define MRVDRV_GENIE_BUF_SIZE 256 + +#endif /* _MLAN_JOIN_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_main.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_main.h new file mode 100644 index 00000000..8441f9b4 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_main.h @@ -0,0 +1,3318 @@ +/** @file mlan_main.h + * + * @brief This file defines the private and adapter data + * structures and declares global function prototypes used + * in MLAN module. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 10/13/2008: initial version +******************************************************/ + +#ifndef _MLAN_MAIN_H_ +#define _MLAN_MAIN_H_ + +#ifdef DEBUG_LEVEL1 +extern t_void (*print_callback) (IN t_void *pmoal_handle, + IN t_u32 level, IN char *pformat, IN ... + ); + +extern mlan_status (*get_sys_time_callback) (IN t_void *pmoal_handle, + OUT t_u32 *psec, OUT t_u32 *pusec); + +extern t_u32 mlan_drvdbg; + +#ifdef DEBUG_LEVEL2 +#define PRINTM_MINFO(msg...) do { \ + if ((mlan_drvdbg & MINFO) && (print_callback)) \ + print_callback(MNULL, MINFO, msg); \ + } while (0) +#define PRINTM_MWARN(msg...) do { \ + if ((mlan_drvdbg & MWARN) && (print_callback)) \ + print_callback(MNULL, MWARN, msg); \ + } while (0) +#define PRINTM_MENTRY(msg...) do { \ + if ((mlan_drvdbg & MENTRY) && (print_callback)) \ + print_callback(MNULL, MENTRY, msg); \ +} while (0) +#define PRINTM_GET_SYS_TIME(level, psec, pusec) \ +do { \ + if ((level & mlan_drvdbg) && (get_sys_time_callback))\ + get_sys_time_callback(MNULL, psec, pusec); \ +} while (0) + +/** Hexdump for level-2 debugging */ +#define HEXDUMP(x, y, z) \ +do { \ + if ((mlan_drvdbg & (MHEX_DUMP | MINFO)) && (print_callback)) \ + print_callback(MNULL, MHEX_DUMP | MINFO, x, y, z); \ +} while (0) + +#else + +#define PRINTM_MINFO(msg...) do {} while (0) +#define PRINTM_MWARN(msg...) do {} while (0) +#define PRINTM_MENTRY(msg...) do {} while (0) + +#define PRINTM_GET_SYS_TIME(level, psec, pusec) \ +do { \ + if ((level & mlan_drvdbg) && (get_sys_time_callback) \ + && (level != MINFO) && (level != MWARN)) \ + get_sys_time_callback(MNULL, psec, pusec); \ +} while (0) + +/** Hexdump for debugging */ +#define HEXDUMP(x, y, z) do {} while (0) + +#endif /* DEBUG_LEVEL2 */ + +#define PRINTM_MFW_D(msg...) do { \ + if ((mlan_drvdbg & MFW_D) && (print_callback)) \ + print_callback(MNULL, MFW_D, msg); \ + } while (0) +#define PRINTM_MCMD_D(msg...) do { \ + if ((mlan_drvdbg & MCMD_D) && (print_callback)) \ + print_callback(MNULL, MCMD_D, msg); \ + } while (0) +#define PRINTM_MDAT_D(msg...) do { \ + if ((mlan_drvdbg & MDAT_D) && (print_callback)) \ + print_callback(MNULL, MDAT_D, msg); \ + } while (0) +#define PRINTM_MIF_D(msg...) do { \ + if ((mlan_drvdbg & MIF_D) && (print_callback)) \ + print_callback(MNULL, MIF_D, msg); \ + } while (0) + +#define PRINTM_MIOCTL(msg...) do { \ + if ((mlan_drvdbg & MIOCTL) && (print_callback)) \ + print_callback(MNULL, MIOCTL, msg); \ + } while (0) +#define PRINTM_MINTR(msg...) do { \ + if ((mlan_drvdbg & MINTR) && (print_callback)) \ + print_callback(MNULL, MINTR, msg); \ + } while (0) +#define PRINTM_MEVENT(msg...) do { \ + if ((mlan_drvdbg & MEVENT) && (print_callback)) \ + print_callback(MNULL, MEVENT, msg); \ + } while (0) +#define PRINTM_MCMND(msg...) do { \ + if ((mlan_drvdbg & MCMND) && (print_callback)) \ + print_callback(MNULL, MCMND, msg); \ + } while (0) +#define PRINTM_MDATA(msg...) do { \ + if ((mlan_drvdbg & MDATA) && (print_callback)) \ + print_callback(MNULL, MDATA, msg); \ + } while (0) +#define PRINTM_MERROR(msg...) do { \ + if ((mlan_drvdbg & MERROR) && (print_callback)) \ + print_callback(MNULL, MERROR, msg); \ + } while (0) +#define PRINTM_MFATAL(msg...) do { \ + if ((mlan_drvdbg & MFATAL) && (print_callback)) \ + print_callback(MNULL, MFATAL, msg); \ + } while (0) +#define PRINTM_MMSG(msg...) do { \ + if ((mlan_drvdbg & MMSG) && (print_callback)) \ + print_callback(MNULL, MMSG, msg); \ + } while (0) + +#define PRINTM(level, msg...) PRINTM_##level((char *)msg) + +/** Log debug message */ +#ifdef __GNUC__ +#define PRINTM_NETINTF(level, pmpriv) \ +do { \ + if ((mlan_drvdbg & level) && pmpriv \ + && pmpriv->adapter->callbacks.moal_print_netintf) \ + pmpriv->adapter->callbacks.moal_print_netintf( \ + pmpriv->adapter->pmoal_handle, \ + pmpriv->bss_index, level); \ +} while (0) +#endif /* __GNUC__ */ + +/** Max hex dump data length */ +#define MAX_DATA_DUMP_LEN 64 + +/** Debug hexdump for level-1 debugging */ +#define DBG_HEXDUMP(level, x, y, z) \ +do { \ + if ((mlan_drvdbg & level) && print_callback) \ + print_callback(MNULL, MHEX_DUMP | level, x, y, z); \ +} while (0) + +#else /* DEBUG_LEVEL1 */ + +#define PRINTM(level, msg...) do {} while (0) + +#define PRINTM_NETINTF(level, pmpriv) do {} while (0) + +/** Debug hexdump for level-1 debugging */ +#define DBG_HEXDUMP(level, x, y, z) do {} while (0) + +/** Hexdump for debugging */ +#define HEXDUMP(x, y, z) do {} while (0) + +#define PRINTM_GET_SYS_TIME(level, psec, pusec) do { } while (0) + +#endif /* DEBUG_LEVEL1 */ + +/** Log entry point for debugging */ +#define ENTER() \ +do { \ + PRINTM(MENTRY, "Enter: %s\n", __func__); \ +} while (0) + +/** Log exit point for debugging */ +#define LEAVE() \ +do { \ + PRINTM(MENTRY, "Leave: %s\n", __func__); \ +} while (0) + +/** Find minimum */ +#ifndef MIN +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif + +/** Find maximum */ +#ifndef MAX +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#endif + +#ifdef memset +#undef memset +#endif +/** Memset routine */ +#define memset(adapter, s, c, len) \ + (adapter->callbacks.moal_memset(adapter->pmoal_handle, s, c, len)) + +#ifdef memmove +#undef memmove +#endif +/** Memmove routine */ +#define memmove(adapter, dest, src, len) \ + (adapter->callbacks.moal_memmove(adapter->pmoal_handle, dest, src, len)) + +#ifdef memcpy +#undef memcpy +#endif +/** Memcpy routine */ +#define memcpy(adapter, to, from, len) \ + (adapter->callbacks.moal_memcpy(adapter->pmoal_handle, to, from, len)) + +#ifdef memcmp +#undef memcmp +#endif +/** Memcmp routine */ +#define memcmp(adapter, s1, s2, len) \ + (adapter->callbacks.moal_memcmp(adapter->pmoal_handle, s1, s2, len)) + +/** Find number of elements */ +#ifndef NELEMENTS +#define NELEMENTS(x) (sizeof(x)/sizeof(x[0])) +#endif + +/** SWAP: swap t_u8 */ +#define SWAP_U8(a, b) {t_u8 t; t = a; a = b; b = t; } + +/** SWAP: swap t_u8 */ +#define SWAP_U16(a, b) {t_u16 t; t = a; a = b; b = t; } + +/** MLAN MNULL pointer */ +#define MNULL (0) + +/** 16 bits byte swap */ +#define swap_byte_16(x) \ +((t_u16)((((t_u16)(x) & 0x00ffU) << 8) | \ + (((t_u16)(x) & 0xff00U) >> 8))) + +/** 32 bits byte swap */ +#define swap_byte_32(x) \ +((t_u32)((((t_u32)(x) & 0x000000ffUL) << 24) | \ + (((t_u32)(x) & 0x0000ff00UL) << 8) | \ + (((t_u32)(x) & 0x00ff0000UL) >> 8) | \ + (((t_u32)(x) & 0xff000000UL) >> 24))) + +/** 64 bits byte swap */ +#define swap_byte_64(x) \ +((t_u64)((t_u64)(((t_u64)(x) & 0x00000000000000ffULL) << 56) | \ + (t_u64)(((t_u64)(x) & 0x000000000000ff00ULL) << 40) | \ + (t_u64)(((t_u64)(x) & 0x0000000000ff0000ULL) << 24) | \ + (t_u64)(((t_u64)(x) & 0x00000000ff000000ULL) << 8) | \ + (t_u64)(((t_u64)(x) & 0x000000ff00000000ULL) >> 8) | \ + (t_u64)(((t_u64)(x) & 0x0000ff0000000000ULL) >> 24) | \ + (t_u64)(((t_u64)(x) & 0x00ff000000000000ULL) >> 40) | \ + (t_u64)(((t_u64)(x) & 0xff00000000000000ULL) >> 56))) + +#ifdef BIG_ENDIAN_SUPPORT +/** Convert ulong n/w to host */ +#define mlan_ntohl(x) x +/** Convert host ulong to n/w */ +#define mlan_htonl(x) x +/** Convert n/w to host */ +#define mlan_ntohs(x) x +/** Convert host to n/w */ +#define mlan_htons(x) x +/** Convert from 16 bit little endian format to CPU format */ +#define wlan_le16_to_cpu(x) swap_byte_16(x) +/** Convert from 32 bit little endian format to CPU format */ +#define wlan_le32_to_cpu(x) swap_byte_32(x) +/** Convert from 64 bit little endian format to CPU format */ +#define wlan_le64_to_cpu(x) swap_byte_64(x) +/** Convert to 16 bit little endian format from CPU format */ +#define wlan_cpu_to_le16(x) swap_byte_16(x) +/** Convert to 32 bit little endian format from CPU format */ +#define wlan_cpu_to_le32(x) swap_byte_32(x) +/** Convert to 64 bit little endian format from CPU format */ +#define wlan_cpu_to_le64(x) swap_byte_64(x) + +/** Convert TxPD to little endian format from CPU format */ +#define endian_convert_TxPD(x) \ + { \ + (x)->tx_pkt_length = wlan_cpu_to_le16((x)->tx_pkt_length); \ + (x)->tx_pkt_offset = wlan_cpu_to_le16((x)->tx_pkt_offset); \ + (x)->tx_pkt_type = wlan_cpu_to_le16((x)->tx_pkt_type); \ + (x)->tx_control = wlan_cpu_to_le32((x)->tx_control); \ + } + +/** Convert RxPD from little endian format to CPU format */ +#define endian_convert_RxPD(x) \ + { \ + (x)->rx_pkt_length = wlan_le16_to_cpu((x)->rx_pkt_length); \ + (x)->rx_pkt_offset = wlan_le16_to_cpu((x)->rx_pkt_offset); \ + (x)->rx_pkt_type = wlan_le16_to_cpu((x)->rx_pkt_type); \ + (x)->seq_num = wlan_le16_to_cpu((x)->seq_num); \ + } +#else +/** Convert ulong n/w to host */ +#define mlan_ntohl(x) swap_byte_32(x) +/** Convert host ulong to n/w */ +#define mlan_htonl(x) swap_byte_32(x) +/** Convert n/w to host */ +#define mlan_ntohs(x) swap_byte_16(x) +/** Convert host to n/w */ +#define mlan_htons(x) swap_byte_16(x) +/** Do nothing */ +#define wlan_le16_to_cpu(x) x +/** Do nothing */ +#define wlan_le32_to_cpu(x) x +/** Do nothing */ +#define wlan_le64_to_cpu(x) x +/** Do nothing */ +#define wlan_cpu_to_le16(x) x +/** Do nothing */ +#define wlan_cpu_to_le32(x) x +/** Do nothing */ +#define wlan_cpu_to_le64(x) x + +/** Convert TxPD to little endian format from CPU format */ +#define endian_convert_TxPD(x) do {} while (0) +/** Convert RxPD from little endian format to CPU format */ +#define endian_convert_RxPD(x) do {} while (0) +#endif /* BIG_ENDIAN_SUPPORT */ + +/** Global moal_assert_callback */ +extern t_void (*assert_callback) (IN t_void *pmoal_handle, IN t_u32 cond); + +/** Assertion */ +#define MASSERT(cond) \ +do { \ + if (!(cond)) { \ + PRINTM(MFATAL, "ASSERT: %s: %i\n", __func__, __LINE__); \ + if (assert_callback) { \ + assert_callback(MNULL, (t_ptr)(cond)); \ + } else { \ + do {} while (1); \ + } \ + } \ +} while (0) + +/** Upload size */ +#define WLAN_UPLD_SIZE (2312) + +/** Maximum event buffer size */ +#define MAX_EVENT_SIZE 2048 + +#ifdef STA_SUPPORT +/** Maximum buffer size for ARP filter */ +#define ARP_FILTER_MAX_BUF_SIZE 68 +#endif /* STA_SUPPORT */ + +/** 60 seconds */ +#define MRVDRV_TIMER_60S 60000 +/** 10 seconds */ +#define MRVDRV_TIMER_10S 10000 +/** 5 seconds */ +#define MRVDRV_TIMER_5S 5000 +/** 1 second */ +#define MRVDRV_TIMER_1S 1000 + +/** Maximum size of multicast list */ +#define MRVDRV_MAX_MULTICAST_LIST_SIZE 32 +/** Maximum size of channel */ +#define MRVDRV_MAX_CHANNEL_SIZE 14 +/** Maximum length of SSID */ +#define MRVDRV_MAX_SSID_LENGTH 32 +/** WEP list macros & data structures */ +/** Size of key buffer in bytes */ +#define MRVL_KEY_BUFFER_SIZE_IN_BYTE 16 +/** Maximum length of WPA key */ +#define MRVL_MAX_KEY_WPA_KEY_LENGTH 32 + +/** Default listen interval */ +#define MLAN_DEFAULT_LISTEN_INTERVAL 10 + +/** Maximum number of region codes */ +#define MRVDRV_MAX_REGION_CODE 9 + +/** Maximum number of CFP codes for BG */ +#define MRVDRV_MAX_CFP_CODE_BG 0 +/** Maximum number of CFP codes for A */ +#define MRVDRV_MAX_CFP_CODE_A 5 + +/** high rx pending packets */ +#define HIGH_RX_PENDING 100 +/** low rx pending packets */ +#define LOW_RX_PENDING 80 + +/** Default region code */ +#define MRVDRV_DEFAULT_REGION_CODE 0x10 + +/** Default country code */ +#define MRVDRV_DEFAULT_COUNTRY_CODE "US" + +/** Japan country code */ +#define COUNTRY_CODE_JP_40 0x40 +/** Japan special country code */ +#define COUNTRY_CODE_JP_FF 0xFF + +/** Default factor for calculating beacon average */ +#define DEFAULT_BCN_AVG_FACTOR 8 +/** Default factor for calculating data average */ +#define DEFAULT_DATA_AVG_FACTOR 8 + +/** The first valid channel for use */ +#define FIRST_VALID_CHANNEL 0xff +/** Default Ad-Hoc channel */ +#define DEFAULT_AD_HOC_CHANNEL 6 +/** Default Ad-Hoc channel A */ +#define DEFAULT_AD_HOC_CHANNEL_A 36 + +/** Number of WEP keys */ +#define MRVL_NUM_WEP_KEY (4) + +/** Default multiple DTIM */ +#define MRVDRV_DEFAULT_MULTIPLE_DTIM 1 + +/** Default beacon missing timeout */ +#define DEFAULT_BCN_MISS_TIMEOUT 10 + +/** Maximum buffer space for beacons retrieved from scan responses */ +#define MAX_SCAN_BEACON_BUFFER 49152 +/** Default buffer space for beacons retrieved from scan responses */ +#define DEFAULT_SCAN_BEACON_BUFFER 4096 + +/** + * @brief Buffer pad space for newly allocated beacons/probe responses + * + * Beacons are typically 6 bytes longer than an equivalent probe response. + * For each scan response stored, allocate an extra byte pad at the end to + * allow easy expansion to store a beacon in the same memory a probe response + * previously contained + */ +#define SCAN_BEACON_ENTRY_PAD 6 + +/** Scan time specified in the channel TLV + * for each channel for passive scans + */ +#define MRVDRV_PASSIVE_SCAN_CHAN_TIME 200 + +/** Scan time specified in the channel TLV + * for each channel for active scans + */ +#define MRVDRV_ACTIVE_SCAN_CHAN_TIME 200 + +/** Scan time specified in the channel TLV + * for each channel for specific scans + */ +#define MRVDRV_SPECIFIC_SCAN_CHAN_TIME 110 + +/** + * Max total scan time in milliseconds + * The total scan time should be less than scan command timeout value (10s) + */ +#define MRVDRV_MAX_TOTAL_SCAN_TIME (MRVDRV_TIMER_10S - MRVDRV_TIMER_1S) + +/** Offset for GTK as it has version to skip past for GTK */ +#define RSN_GTK_OUI_OFFSET 2 + +/** If OUI is not found */ +#define MLAN_OUI_NOT_PRESENT 0 +/** If OUI is found */ +#define MLAN_OUI_PRESENT 1 + +/** Is cmd_resp, event or data packet received? */ +#define IS_CARD_RX_RCVD(adapter) (adapter->cmd_resp_received || \ + adapter->event_received || \ + adapter->data_received) +/** Type command */ +#define MLAN_TYPE_CMD 1 +/** Type data */ +#define MLAN_TYPE_DATA 0 +/** Type event */ +#define MLAN_TYPE_EVENT 3 + +#define MAX_SUPPORT_AMSDU_SIZE 4096 +/** Maximum numbfer of registers to read for multiple port */ +/* upto 0xB7 */ +#define MAX_MP_REGS 184 +/** Maximum port */ +#define MAX_PORT 32 + +/** max MP REGS */ +#define MAX_MP_REGS_MAX (196) + +#ifdef SDIO_MULTI_PORT_TX_AGGR +/** Multi port TX aggregation buffer size */ +#define SDIO_MP_TX_AGGR_DEF_BUF_SIZE (65280) /* 64K - 256 */ +#endif /* SDIO_MULTI_PORT_TX_AGGR */ + +#ifdef SDIO_MULTI_PORT_RX_AGGR +/** Multi port RX aggregation buffer size */ +#define SDIO_MP_RX_AGGR_DEF_BUF_SIZE (65280) /* 64K - 256 */ +#endif /* SDIO_MULTI_PORT_RX_AGGR */ + +/** High threshold at which to start drop packets */ +#define RX_HIGH_THRESHOLD 1024 +/** Low threshold to allow Rx BA */ +#define RX_LOW_THRESHOLD 128 + +/** Debug command number */ +#define DBG_CMD_NUM 10 + +/** Info for debug purpose */ +typedef struct _wlan_dbg { + /** Number of host to card command failures */ + t_u32 num_cmd_host_to_card_failure; + /** Number of host to card sleep confirm failures */ + t_u32 num_cmd_sleep_cfm_host_to_card_failure; + /** Number of host to card Tx failures */ + t_u32 num_tx_host_to_card_failure; + /** Number of card to host command/event failures */ + t_u32 num_cmdevt_card_to_host_failure; + /** Number of card to host Rx failures */ + t_u32 num_rx_card_to_host_failure; + /** Number of interrupt read failures */ + t_u32 num_int_read_failure; + /** Last interrupt status */ + t_u32 last_int_status; + /** Number of deauthentication events */ + t_u32 num_event_deauth; + /** Number of disassosiation events */ + t_u32 num_event_disassoc; + /** Number of link lost events */ + t_u32 num_event_link_lost; + /** Number of deauthentication commands */ + t_u32 num_cmd_deauth; + /** Number of association comamnd successes */ + t_u32 num_cmd_assoc_success; + /** Number of association command failures */ + t_u32 num_cmd_assoc_failure; + /** Number of Tx timeouts */ + t_u32 num_tx_timeout; + /** Number of command timeouts */ + t_u32 num_cmd_timeout; + /** Timeout command ID */ + t_u16 timeout_cmd_id; + /** Timeout command action */ + t_u16 timeout_cmd_act; + /** List of last command IDs */ + t_u16 last_cmd_id[DBG_CMD_NUM]; + /** List of last command actions */ + t_u16 last_cmd_act[DBG_CMD_NUM]; + /** Last command index */ + t_u16 last_cmd_index; + /** List of last command response IDs */ + t_u16 last_cmd_resp_id[DBG_CMD_NUM]; + /** Last command response index */ + t_u16 last_cmd_resp_index; + /** List of last events */ + t_u16 last_event[DBG_CMD_NUM]; + /** Last event index */ + t_u16 last_event_index; + /** Number of no free command node */ + t_u16 num_no_cmd_node; +} wlan_dbg; + +/** Hardware status codes */ +typedef enum _WLAN_HARDWARE_STATUS { + WlanHardwareStatusReady, + WlanHardwareStatusInitializing, + WlanHardwareStatusInitdone, + WlanHardwareStatusReset, + WlanHardwareStatusClosing, + WlanHardwareStatusNotReady +} WLAN_HARDWARE_STATUS; + +/** WLAN_802_11_POWER_MODE */ +typedef enum _WLAN_802_11_POWER_MODE { + Wlan802_11PowerModeCAM, + Wlan802_11PowerModePSP +} WLAN_802_11_POWER_MODE; + +/** tx param */ +typedef struct _mlan_tx_param { + /** next packet length */ + t_u32 next_pkt_len; +} mlan_tx_param; + +/** PS_STATE */ +typedef enum _PS_STATE { + PS_STATE_AWAKE, + PS_STATE_PRE_SLEEP, + PS_STATE_SLEEP_CFM, + PS_STATE_SLEEP +} PS_STATE; + +/** Minimum flush timer for win size of 1 is 50 ms */ +#define MIN_FLUSH_TIMER_MS 50 +/** Minimum flush timer for win size of 1 is 15 ms */ +#define MIN_FLUSH_TIMER_15_MS 15 + +/** Tx BA stream table */ +typedef struct _TxBAStreamTbl TxBAStreamTbl; + +/** Add BA parameter data structure */ +typedef struct { + /** Window size for initiator */ + t_u32 tx_win_size; + /** Window size for receiver */ + t_u32 rx_win_size; + /** Block ack timeout */ + t_u32 timeout; + /** amsdu support for ADDBA request */ + t_u8 tx_amsdu; + /** amsdu support for ADDBA response */ + t_u8 rx_amsdu; +} add_ba_param_t; + +/** Tx aggregation data structure */ +typedef struct _txAggr_t { + /** AMPDU user */ + t_u8 ampdu_user; + /** AMPDU AP */ + t_u8 ampdu_ap; + /** AMSDU */ + t_u8 amsdu; +} tx_aggr_t; + +/** BA stream status */ +typedef enum _baStatus_e { + BA_STREAM_NOT_SETUP = 0, + BA_STREAM_SETUP_INPROGRESS, + BA_STREAM_SETUP_COMPLETE +} baStatus_e; + +/** RA list table */ +typedef struct _raListTbl raListTbl; + +/** RA list table */ +struct _raListTbl { + /** Pointer to previous node */ + raListTbl *pprev; + /** Pointer to next node */ + raListTbl *pnext; + /** Buffer list head */ + mlan_list_head buf_head; + /** RA list buffer */ + t_u8 ra[MLAN_MAC_ADDR_LENGTH]; + /** total packets in RA list */ + t_u16 total_pkts; + /** packets received */ + t_u16 packet_count; + /** packet count threshold to setup BA */ + t_u8 ba_packet_threshold; + /** is 11n enabled */ + t_u8 is_11n_enabled; + /** max amsdu size */ + t_u16 max_amsdu; + /** BA stream status */ + baStatus_e ba_status; + /** amsdu in ampdu flag */ + t_u8 amsdu_in_ampdu; + /** tdls flag */ + t_u8 is_tdls_link; + /** tx_pause flag */ + t_u8 tx_pause; +}; + +/** TID table */ +typedef struct _tidTbl { + /** RA list head */ + mlan_list_head ra_list; + /** Current RA list */ + raListTbl *ra_list_curr; +} tid_tbl_t; + +/** Highest priority setting for a packet (uses voice AC) */ +#define WMM_HIGHEST_PRIORITY 7 +/** Highest priority TID */ +#define HIGH_PRIO_TID 7 +/** Lowest priority TID */ +#define LOW_PRIO_TID 0 +/** No packet priority (< lowest) */ +#define NO_PKT_PRIO_TID -1 + +/** Max driver packet delay in msec */ +#define WMM_DRV_DELAY_MAX 510 + +/** Struct of WMM DESC */ +typedef struct _wmm_desc { + /** TID table */ + tid_tbl_t tid_tbl_ptr[MAX_NUM_TID]; + /** Packets out */ + t_u32 packets_out[MAX_NUM_TID]; + /** Packets queued */ + t_u32 pkts_queued[MAX_NUM_TID]; + /** Packets paused */ + t_u32 pkts_paused[MAX_NUM_TID]; + /** Spin lock to protect ra_list */ + t_void *ra_list_spinlock; + + /** AC status */ + WmmAcStatus_t ac_status[MAX_AC_QUEUES]; + /** AC downgraded values */ + mlan_wmm_ac_e ac_down_graded_vals[MAX_AC_QUEUES]; + + /** Max driver packet delay sent to the firmware for expiry eval */ + t_u32 drv_pkt_delay_max; + + /** WMM queue priority table */ + t_u8 queue_priority[MAX_AC_QUEUES]; + /** User priority packet transmission control */ + t_u32 user_pri_pkt_tx_ctrl[WMM_HIGHEST_PRIORITY + 1]; /* UP: 0 to 7 */ + + /** Number of transmit packets queued */ + mlan_scalar tx_pkts_queued; + /** Tracks highest priority with a packet queued */ + mlan_scalar highest_queued_prio; +} wmm_desc_t; + +/** Security structure */ +typedef struct _wlan_802_11_security_t { + /** WPA enabled flag */ + t_u8 wpa_enabled; + /** E-Supplicant enabled flag */ + t_u8 ewpa_enabled; + /** WPA2 enabled flag */ + t_u8 wpa2_enabled; + /** WAPI enabled flag */ + t_u8 wapi_enabled; + /** WAPI key on flag */ + t_u8 wapi_key_on; + /** WEP status */ + WLAN_802_11_WEP_STATUS wep_status; + /** Authentication mode */ + t_u32 authentication_mode; + /** Encryption mode */ + t_u32 encryption_mode; + /** Hotspot OSEN enabled */ + t_u8 osen_enabled; +} wlan_802_11_security_t; + +/** Current Basic Service Set State Structure */ +typedef struct { + /** BSS descriptor */ + BSSDescriptor_t bss_descriptor; + /** WMM enable? */ + t_u8 wmm_enabled; + /** Uapsd enable?*/ + t_u8 wmm_uapsd_enabled; + /** Band */ + t_u8 band; + /** Number of rates supported */ + t_u32 num_of_rates; + /** Supported rates*/ + t_u8 data_rates[WLAN_SUPPORTED_RATES]; +} current_bss_params_t; + +/** Sleep_params */ +typedef struct _sleep_params_t { + /** Sleep parameter error */ + t_u16 sp_error; + /** Sleep parameter offset */ + t_u16 sp_offset; + /** Sleep parameter stable time */ + t_u16 sp_stable_time; + /** Sleep parameter calibration control */ + t_u8 sp_cal_control; + /** Sleep parameter external sleep clock */ + t_u8 sp_ext_sleep_clk; + /** Sleep parameter reserved */ + t_u16 sp_reserved; +} sleep_params_t; + +/** Sleep_period */ +typedef struct sleep_period_t { + /** Sleep period */ + t_u16 period; + /** Reserved */ + t_u16 reserved; +} sleep_period_t; + +/** mrvl_wep_key_t */ +typedef struct _mrvl_wep_key_t { + /** Length */ + t_u32 length; + /** WEP key index */ + t_u32 key_index; + /** WEP key length */ + t_u32 key_length; + /** WEP keys */ + t_u8 key_material[MRVL_KEY_BUFFER_SIZE_IN_BYTE]; +} mrvl_wep_key_t; + +/** Maximum number of region channel */ +#define MAX_REGION_CHANNEL_NUM 2 + +/** CFP dynamic (non-const) elements */ +typedef struct _cfp_dyn_t { + /** TRUE: Channel is blacklisted (do not use) */ + t_bool blacklist; +} cfp_dyn_t; + +/** Chan-Freq-TxPower mapping table*/ +typedef struct _chan_freq_power_t { + /** Channel Number */ + t_u16 channel; + /** Frequency of this Channel */ + t_u32 freq; + /** Max allowed Tx power level */ + t_u16 max_tx_power; + /** TRUE:radar detect required for BAND A or passive scan for BAND B/G; + * FALSE:radar detect not required for BAND A or active scan for BAND B/G*/ + t_bool passive_scan_or_radar_detect; + /** Elements associated to cfp that change at run-time */ + cfp_dyn_t dynamic; +} chan_freq_power_t; + +/** Region-band mapping table */ +typedef struct _region_chan_t { + /** TRUE if this entry is valid */ + t_u8 valid; + /** Region code for US, Japan ... */ + t_u8 region; + /** Band B/G/A, used for BAND_CONFIG cmd */ + t_u8 band; + /** Actual No. of elements in the array below */ + t_u8 num_cfp; + /** chan-freq-txpower mapping table */ + chan_freq_power_t *pcfp; +} region_chan_t; + +/** State of 11d */ +typedef enum _state_11d_t { + DISABLE_11D = 0, + ENABLE_11D = 1, +} state_11d_t; + +#define DEFAULT_11D_STATE DISABLE_11D + +/** Domain regulatory information */ +typedef struct _wlan_802_11d_domain_reg { + /** Country Code */ + t_u8 country_code[COUNTRY_CODE_LEN]; + /** band that channels in sub_band belong to */ + t_u8 band; + /** No. of subband in below */ + t_u8 no_of_sub_band; + /** Subband data to send/last sent */ + IEEEtypes_SubbandSet_t sub_band[MRVDRV_MAX_SUBBAND_802_11D]; +} wlan_802_11d_domain_reg_t; + +/** Data for state machine */ +typedef struct _wlan_802_11d_state { + /** True for enabling 11D */ + state_11d_t enable_11d; + /** True for user enabling 11D */ + state_11d_t user_enable_11d; +} wlan_802_11d_state_t; + +/** 802.11h State information kept in the 'mlan_private' driver structure */ +typedef struct { + /** Indicates whether 11h is enabled in the driver */ + t_bool is_11h_enabled; + /** Indicates whether 11h is active in the firmware */ + t_bool is_11h_active; + /** Master device using automatic channel select */ + t_bool adhoc_auto_sel_chan; + /** Set when driver receives a STOP TX event from fw */ + t_bool tx_disabled; + /** Channel that ChanSwAnn was received for, non-zero = active */ + t_u8 dfs_slave_csa_chan; + /** Expiry for above variable, seconds in system time */ + t_u32 dfs_slave_csa_expire_at_sec; +} wlan_11h_interface_state_t; + +#if defined(UAP_SUPPORT) +/** UAP get info callback state kept in the 'mlan_private' driver structure */ +typedef struct { + /** UAP internal callback after wlan_uap_get_channel */ + /** (parameter is really pointer to mlan_private) */ + mlan_status (*get_chan_callback) (t_void *); + /** current ioctl_req (to be completed in callback) */ + pmlan_ioctl_req pioctl_req_curr; + /** band config from MrvlIEtypes_channel_band_t */ + t_u8 band_config; + /** channel from MrvlIEtypes_channel_band_t */ + t_u8 channel; + /** beacon period (in msec) from MrvlIEtypes_beacon_period_t */ + t_u16 beacon_period; + /** dtim period (no unit) from MrvlIEtypes_dtim_period_t */ + t_u8 dtim_period; +} wlan_uap_get_info_cb_t; +#endif + +/** Data structure for WPS information */ +typedef struct { + /** WPS IE */ + IEEEtypes_VendorSpecific_t wps_ie; + /** Session enable flag */ + t_u8 session_enable; +} wps_t; + +/** mlan_operations data structure */ +typedef struct _mlan_operations { + /** cmd init handler */ + mlan_status (*init_cmd) (IN t_void *priv, IN t_u8 first_bss); + /** ioctl handler */ + mlan_status (*ioctl) (t_void *adapter, pmlan_ioctl_req pioctl_req); + /** cmd handler */ + mlan_status (*prepare_cmd) (IN t_void *priv, + IN t_u16 cmd_no, + IN t_u16 cmd_action, + IN t_u32 cmd_oid, + IN t_void *pioctl_buf, + IN t_void *pdata_buf, IN t_void *pcmd_buf); + /** cmdresp handler */ + mlan_status (*process_cmdresp) (IN t_void *priv, + IN t_u16 cmdresp_no, + IN t_void *pcmd_buf, IN t_void *pioctl); + /** rx handler */ + mlan_status (*process_rx_packet) (IN t_void *adapter, + IN pmlan_buffer pmbuf); + /** event handler */ + mlan_status (*process_event) (IN t_void *priv); + /** txpd handler */ + t_void *(*process_txpd) (IN t_void *priv, IN pmlan_buffer pmbuf); + /** BSS role */ + mlan_bss_role bss_role; +} mlan_operations; + +/** Private structure for MLAN */ +typedef struct _mlan_private { + /** Pointer to mlan_adapter */ + struct _mlan_adapter *adapter; + /** BSS index */ + t_u8 bss_index; + /** BSS type */ + t_u8 bss_type; + /** BSS role */ + t_u8 bss_role; + /** BSS virtual flag */ + t_u8 bss_virtual; + /** BSS Priority */ + t_u8 bss_priority; + /** BSS number */ + t_u8 bss_num; + /** Frame type */ + t_u8 frame_type; + /** MAC address information */ + t_u8 curr_addr[MLAN_MAC_ADDR_LENGTH]; + /** Media connection status */ + t_bool media_connected; + + /** Current packet filter */ + t_u32 curr_pkt_filter; + /** Infrastructure mode */ + t_u32 bss_mode; + + /** Tx packet control */ + t_u32 pkt_tx_ctrl; + + /** Tx power level */ + t_s16 tx_power_level; + /** Maximum Tx power level */ + t_s8 max_tx_power_level; + /** Minimum Tx power level */ + t_s8 min_tx_power_level; + /** Tx rate */ + t_u8 tx_rate; + t_u8 tx_rate_info; + /** rxpd_htinfo */ + t_u8 rxpd_rate_info; + /** max amsdu size */ + t_u16 max_amsdu; + /** 802.11n Device Capabilities for 2.4GHz */ + t_u32 usr_dot_11n_dev_cap_bg; + /** 802.11n Device Capabilities for 5GHz */ + t_u32 usr_dot_11n_dev_cap_a; + /** MIMO abstraction of MCSs supported by device */ + t_u8 usr_dev_mcs_support; +#ifdef UAP_SUPPORT + /** UAP 11n flag */ + t_u8 is_11n_enabled; +#endif /* UAP_SUPPORT */ +#ifdef UAP_SUPPORT + /** UAP 11ac flag */ + t_u8 is_11ac_enabled; +#endif /* UAP_SUPPORT */ + /** tx vht_info */ + t_u8 tx_vhtinfo; + /** rxpd_vhtinfo */ + t_u8 rxpd_vhtinfo; + /** 802.11ac Device Capabilities for 2.4GHz */ + t_u32 usr_dot_11ac_dev_cap_bg; + /** 802.11ac Device Capabilities for 5GHz */ + t_u32 usr_dot_11ac_dev_cap_a; + /** MIMO abstraction of MCSs supported by device */ + t_u32 usr_dot_11ac_mcs_support; +#ifdef UAP_SUPPORT + /** packet forward control */ + t_u8 pkt_fwd; + /** dropped pkts */ + t_u32 num_drop_pkts; +#endif + /** TX beamforming capability */ + t_u32 tx_bf_cap; + /** Rx PD rate */ + t_u8 rxpd_rate; + /** Rate bitmap */ + t_u16 rate_bitmap; + /** Bitmap rates */ + t_u16 bitmap_rates[MAX_BITMAP_RATES_SIZE]; + /** Data rate */ + t_u32 data_rate; + /** Automatic data rate flag */ + t_u8 is_data_rate_auto; + /** Factor for calculating beacon average */ + t_u16 bcn_avg_factor; + /** Factor for calculating data average */ + t_u16 data_avg_factor; + /** Last data RSSI */ + t_s16 data_rssi_last; + /** Last data Noise Floor */ + t_s16 data_nf_last; + /** Average data RSSI */ + t_s16 data_rssi_avg; + /** Averag data Noise Floor */ + t_s16 data_nf_avg; + /** Last beacon RSSI */ + t_s16 bcn_rssi_last; + /** Last beacon Noise Floor */ + t_s16 bcn_nf_last; + /** Average beacon RSSI */ + t_s16 bcn_rssi_avg; + /** Average beacon Noise Floor */ + t_s16 bcn_nf_avg; + + /** Attempted BSS descriptor */ + BSSDescriptor_t *pattempted_bss_desc; + + /** Current SSID/BSSID related parameters*/ + current_bss_params_t curr_bss_params; + + /** User selected bands */ + t_u8 config_bands; + + /** Beacon period */ + t_u16 beacon_period; + /** Listen interval */ + t_u16 listen_interval; + /** ATIM window */ + t_u16 atim_window; + + /** AdHoc channel */ + t_u8 adhoc_channel; + /** AdHoc link sensed flag */ + t_u8 adhoc_is_link_sensed; + /** AdHoc operating state */ + t_u8 adhoc_state; +#if defined(STA_SUPPORT) + /** AdHoc operating state backup */ + t_u8 adhoc_state_prev; + /** AdHoc previous ssid used for Start */ + mlan_802_11_ssid adhoc_last_start_ssid; +#endif + /** FSM variable for 11d support */ + wlan_802_11d_state_t state_11d; + /** FSM variable for 11h support */ + wlan_11h_interface_state_t intf_state_11h; +#ifdef UAP_SUPPORT + /** Whether UAP interface has started */ + t_bool uap_bss_started; + /**UAP operating channel*/ + t_u8 uap_channel; + /** state variable for UAP Get Info callback */ + wlan_uap_get_info_cb_t uap_state_chan_cb; +#endif /* UAP_SUPPORT */ + + /** Security related */ + /** Encryption parameter */ + wlan_802_11_security_t sec_info; + /** WEP keys */ + mrvl_wep_key_t wep_key[MRVL_NUM_WEP_KEY]; + /** Current WEP key index */ + t_u16 wep_key_curr_index; + /** EWPA query 0: disable, 1: enable */ + t_u8 ewpa_query; + /** Encryption Key*/ + t_u8 wpa_ie[256]; + /** WPA IE length */ + t_u8 wpa_ie_len; + /** GTK set flag */ + t_u8 wpa_is_gtk_set; + mlan_ds_encrypt_key aes_key; +#if defined(STA_SUPPORT) + /* Mgmt Frame Protection config */ + mlan_ds_misc_pmfcfg pmfcfg; +#endif + /** WAPI IE */ + t_u8 wapi_ie[256]; + /** WAPI IE length */ + t_u8 wapi_ie_len; + /** OSEN IE */ + t_u8 osen_ie[256]; + /** OSEN IE length */ + t_u8 osen_ie_len; + /** Pointer to the station table */ + mlan_list_head sta_list; + /** tdls pending queue */ + mlan_list_head tdls_pending_txq; + t_u16 tdls_idle_time; + + /** MGMT IE */ + custom_ie mgmt_ie[MAX_MGMT_IE_INDEX]; + /** mgmt frame passthru mask */ + t_u32 mgmt_frame_passthru_mask; + /** Advanced Encryption Standard */ + t_u8 adhoc_aes_enabled; + /** WMM required */ + t_u8 wmm_required; + /** WMM enabled */ + t_u8 wmm_enabled; + /** WMM qos info */ + t_u8 wmm_qosinfo; + /** saved WMM qos info */ + t_u8 saved_wmm_qosinfo; + /** WMM related variable*/ + wmm_desc_t wmm; + + /** Pointer to the Transmit BA stream table*/ + mlan_list_head tx_ba_stream_tbl_ptr; + /** Pointer to the priorities for AMSDU/AMPDU table*/ + tx_aggr_t aggr_prio_tbl[MAX_NUM_TID]; + /** Pointer to the priorities for AMSDU/AMPDU table*/ + t_u8 addba_reject[MAX_NUM_TID]; + /** Struct to store ADDBA parameters */ + add_ba_param_t add_ba_param; + /** last rx_seq */ + t_u16 rx_seq[MAX_NUM_TID]; + /** Pointer to the Receive Reordering table*/ + mlan_list_head rx_reorder_tbl_ptr; + /** Lock for Rx packets */ + t_void *rx_pkt_lock; + +#ifdef STA_SUPPORT + /** Buffer to store the association response for application retrieval */ + t_u8 assoc_rsp_buf[MRVDRV_ASSOC_RSP_BUF_SIZE]; + /** Length of the data stored in assoc_rsp_buf */ + t_u32 assoc_rsp_size; + + /** Generic IEEE IEs passed from the application to be inserted into the + * association request to firmware + */ + t_u8 gen_ie_buf[MRVDRV_GENIE_BUF_SIZE]; + /** Length of the data stored in gen_ie_buf */ + t_u8 gen_ie_buf_len; + + t_u8 *pcurr_bcn_buf; + t_u32 curr_bcn_size; + t_void *curr_bcn_buf_lock; + + /** WPS */ + wps_t wps; +#endif /* STA_SUPPORT */ + + /** function table */ + mlan_operations ops; + + /** Port Control mode */ + t_u8 port_ctrl_mode; + + /** Port open flag */ + t_u8 port_open; + + /** Port open flag state at time of association attempt */ + t_u8 prior_port_status; + /** Bypass TX queue */ + mlan_list_head bypass_txq; + /** IP address operation */ + t_u32 op_code; + /** IP address */ + t_u8 ip_addr[IPADDR_LEN]; + t_u32 hotspot_cfg; +#ifdef STA_SUPPORT + ExtCap_t ext_cap; +#endif + /** Control TX AMPDU on infra link */ + t_u8 txaggrctrl; +} mlan_private, *pmlan_private; + +/** Tx BA stream table */ +struct _TxBAStreamTbl { + /** TxBAStreamTbl previous node */ + TxBAStreamTbl *pprev; + /** TxBAStreamTbl next node */ + TxBAStreamTbl *pnext; + /** TID */ + int tid; + /** RA */ + t_u8 ra[MLAN_MAC_ADDR_LENGTH]; + /** BA stream status */ + baStatus_e ba_status; + t_u8 amsdu; +}; + +/** RX reorder table */ +typedef struct _RxReorderTbl RxReorderTbl; + +typedef struct { + /** Timer for flushing */ + t_void *timer; + /** Timer set flag */ + t_u8 timer_is_set; + /** RxReorderTbl ptr */ + RxReorderTbl *ptr; + /** Priv pointer */ + mlan_private *priv; +} reorder_tmr_cnxt_t; + +/** RX reorder table */ +struct _RxReorderTbl { + /** RxReorderTbl previous node */ + RxReorderTbl *pprev; + /** RxReorderTbl next node */ + RxReorderTbl *pnext; + /** TID */ + int tid; + /** TA */ + t_u8 ta[MLAN_MAC_ADDR_LENGTH]; + /** Start window */ + int start_win; + /** last_seq */ + int last_seq; + /** Window size */ + int win_size; + /** Pointer to pointer to RxReorderTbl */ + t_void **rx_reorder_ptr; + /** Timer context */ + reorder_tmr_cnxt_t timer_context; + /** BA stream status */ + baStatus_e ba_status; + t_u8 amsdu; + /** no packet drop flag for rx_reorder_tbl */ + t_u8 force_no_drop; + /** flag for check start win */ + t_u8 check_start_win; + /** flush data flag */ + t_u8 flush_data; +}; + +/** BSS priority node */ +typedef struct _mlan_bssprio_node mlan_bssprio_node; + +/** BSS priority node */ +struct _mlan_bssprio_node { + /** Pointer to previous node */ + mlan_bssprio_node *pprev; + /** Pointer to next node */ + mlan_bssprio_node *pnext; + /** Pointer to priv */ + pmlan_private priv; +}; + +/** BSS priority table */ +typedef struct _mlan_bssprio_tbl mlan_bssprio_tbl; + +/** BSS priority table */ +struct _mlan_bssprio_tbl { + /** BSS priority list head */ + mlan_list_head bssprio_head; + /** Current priority node */ + mlan_bssprio_node *bssprio_cur; +}; + +/** cmd_ctrl_node */ +typedef struct _cmd_ctrl_node cmd_ctrl_node; + +/** _cmd_ctrl_node */ +struct _cmd_ctrl_node { + /** Pointer to previous node */ + cmd_ctrl_node *pprev; + /** Pointer to next node */ + cmd_ctrl_node *pnext; + /** Pointer to priv */ + pmlan_private priv; + /** Command OID for sub-command use */ + t_u32 cmd_oid; + /** Command flag */ + t_u32 cmd_flag; + /** Pointer to mlan_buffer */ + mlan_buffer *cmdbuf; + /** Pointer to mlan_buffer */ + mlan_buffer *respbuf; + /** Command parameter */ + t_void *pdata_buf; + /** Pointer to mlan_ioctl_req if command is from IOCTL */ + t_void *pioctl_buf; + /** pre_allocated mlan_buffer for cmd */ + mlan_buffer *pmbuf; +}; + +/** default tdls wmm qosinfo */ +#define DEFAULT_TDLS_WMM_QOS_INFO 15 +/** default tdls sleep period */ +#define DEFAULT_TDLS_SLEEP_PERIOD 30 + +/** TDLS status */ +typedef enum _tdlsStatus_e { + TDLS_NOT_SETUP = 0, + TDLS_SETUP_INPROGRESS, + TDLS_SETUP_COMPLETE, + TDLS_SETUP_FAILURE, + TDLS_TEAR_DOWN, + TDLS_SWITCHING_CHANNEL, + TDLS_IN_BASE_CHANNEL, + TDLS_IN_OFF_CHANNEL, +} tdlsStatus_e; +/** station node */ +typedef struct _sta_node sta_node; + +/** station node*/ +struct _sta_node { + /** previous node */ + sta_node *pprev; + /** next node */ + sta_node *pnext; + /** station mac address */ + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** wmm flag */ + t_u8 is_wmm_enabled; + /** 11n flag */ + t_u8 is_11n_enabled; + /** AMPDU STA */ + t_u8 ampdu_sta[MAX_NUM_TID]; + /** last rx_seq */ + t_u16 rx_seq[MAX_NUM_TID]; + /** max amsdu size */ + t_u16 max_amsdu; + /** 11ac flag */ + t_u8 is_11ac_enabled; + /** tdls status */ + tdlsStatus_e status; + /** SNR */ + t_s8 snr; + /** Noise Floor */ + t_s8 nf; + /** flag for host based tdls */ + t_u8 external_tdls; + /** peer capability */ + t_u16 capability; + /** peer support rates */ + t_u8 support_rate[32]; + /** rate size */ + t_u8 rate_len; + /* Qos capability info */ + t_u8 qos_info; + /** HT cap */ + IEEEtypes_HTCap_t HTcap; + /** HT info in TDLS setup confirm*/ + IEEEtypes_HTInfo_t HTInfo; + /** peer BSSCO_20_40*/ + IEEEtypes_2040BSSCo_t BSSCO_20_40; + /* Extended capability */ + IEEEtypes_ExtCap_t ExtCap; + /* RSN IE */ + IEEEtypes_Generic_t rsn_ie; + /**Link ID*/ + IEEEtypes_LinkIDElement_t link_ie; + /** AID info */ + IEEEtypes_AID_t aid_info; + /** VHT Capabilities IE */ + IEEEtypes_VHTCap_t vht_cap; + /** VHT Operations IE */ + IEEEtypes_VHTOprat_t vht_oprat; + /** wapi key on off flag */ + t_u8 wapi_key_on; + /** tx pause status */ + t_u8 tx_pause; +}; + +/** 802.11h State information kept in the 'mlan_adapter' driver structure */ +typedef struct { + /** Min TX Power capability sent to FW for 11h use and fw power control */ + t_s8 min_tx_power_capability; + /** Max TX Power capability sent to FW for 11h use and fw power control */ + t_s8 max_tx_power_capability; + /** User provisioned local power constraint sent in association requests */ + t_s8 usr_def_power_constraint; + /** Received CHANNEL_SWITCH_ANN event */ + t_bool recvd_chanswann_event; + /** Indicates an interface wants to enable master radar detection */ + t_bool master_radar_det_enable_pending; + /** Indicates an interface wants to enable slave radar detection */ + t_bool slave_radar_det_enable_pending; + /** Indicates whether master radar detection active in the firmware */ + t_bool is_master_radar_det_active; + /** Indicates whether slave radar detection active in the firmware */ + t_bool is_slave_radar_det_active; + /** Quiet IE */ + IEEEtypes_Quiet_t quiet_ie; +} wlan_11h_device_state_t; + +/** Enumeration for DFS Timestamp represents field */ +enum _dfs_timestamp_repr_e { + /** Ignore entry */ + DFS_TS_REPR_NOT_IN_USE = 0, + /** NOP (Non-Occupancy Period) start time */ + DFS_TS_REPR_NOP_START = 1, + /** CAC (Channel Availability Check) completion time */ + DFS_TS_REPR_CAC_COMPLETION +}; + +/** DFS Timestamp type used for marking NOP/CAC events */ +typedef struct _wlan_dfs_timestamp_t wlan_dfs_timestamp_t; + +/** DFS Timestamp type used for marking NOP/CAC events */ +struct _wlan_dfs_timestamp_t { + /** Pointer to previous node */ + wlan_dfs_timestamp_t *pprev; + /** Pointer to next node */ + wlan_dfs_timestamp_t *pnext; + /** WLAN Channel number */ + t_u8 channel; + /** What this timestamp represents */ + t_u8 represents; + /** reserved field */ + t_u16 reserved; + /** timestamp - seconds */ + t_u32 ts_sec; + /** timestamp - microseconds */ + t_u32 ts_usec; +}; + +/** DFS State information kept in the 'mlan_adapter' driver structure */ +typedef struct { + /** Indicates whether DFS channel check is occurring in firmware */ + t_bool dfs_check_pending; + /** Indicates whether DFS channel check found radar */ + t_bool dfs_radar_found; + /** Channel radar is being checked on. BAND_A is assumed. */ + t_u8 dfs_check_channel; + /** Timestamp when we got last report, + * to determine if data is old or not. + */ + t_u32 dfs_report_time_sec; + /** List for holding dfs_timestamps for NOP/CAC events */ + mlan_list_head dfs_ts_head; +} wlan_dfs_device_state_t; + +/** Enumeration for mlan_ds_11h_radar_det_hndlg stages */ +enum _mlan_ds_11h_rdh_stages { + RDH_OFF = 0, + RDH_CHK_INTFS = 1, + RDH_STOP_TRAFFIC, + RDH_GET_INFO_CHANNEL, + RDH_GET_INFO_BEACON_DTIM, + RDH_SET_CUSTOM_IE, + RDH_REM_CUSTOM_IE, + RDH_STOP_INTFS, + RDH_SET_NEW_CHANNEL, + RDH_RESTART_INTFS, + RDH_RESTART_TRAFFIC +}; + +/** State info for Radar Detected Handling kept in 'mlan_adapter' */ +typedef struct { + /** Stage (of Operation) */ + t_u8 stage; + /** Number of interfaces to handle */ + t_u8 priv_list_count; + /** Index of interface in process (used by some stages) */ + t_u8 priv_curr_idx; + /** Current Channel (to leave) */ + t_u8 curr_channel; + /** New Channel (to switch to) */ + t_u8 new_channel; + /** UAP band_config */ + t_u8 uap_band_cfg; + /** BEACON*DTIM period (in msec; max of STA/UAP) */ + t_u16 max_bcn_dtim_ms; + /** List of interfaces to handle */ + mlan_private *priv_list[MLAN_MAX_BSS_NUM]; +} wlan_radar_det_hndlg_state_t; + +#ifdef DFS_TESTING_SUPPORT +/** DFS/RDH testing exception settings kept in 'mlan_adapter' */ +typedef struct { + /** user-configured CAC period (in msec) */ + t_u16 user_cac_period_msec; + /** user-configured NOP period (in sec) */ + t_u16 user_nop_period_sec; + /** user-configured skip channel change on radar */ + t_bool no_channel_change_on_radar; + /** user-configured new channel to change to on radar */ + t_u8 fixed_new_channel_on_radar; +} wlan_dfs_testing_settings_t; +#endif /* DFS_SUPPORT_TESTING */ + +/** + * @brief Driver measurement state held in 'mlan_adapter' structure + * + * Used to record a measurement request that the driver is pending on + * the result (received measurement report). + */ +typedef struct { + /** + * Dialog token of a pending measurement request/report. Used to + * block execution while waiting for the specific dialog token + */ + t_u8 meas_rpt_pend_on; + + /** + * Measurement report received from the firmware that we were pending on + */ + HostCmd_DS_MEASUREMENT_REPORT meas_rpt_returned; + +} wlan_meas_state_t; + +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) +/** + * @brief Link buffer into aggregate head buffer + * + * @param pmbuf_aggr Pointer to aggregation buffer + * @param pmbuf Pointer to buffer to copy + */ +static inline t_void +wlan_link_buf_to_aggr(pmlan_buffer pmbuf_aggr, pmlan_buffer pmbuf) +{ + /* link new buf at end of list */ + pmbuf->pnext = pmbuf_aggr; + pmbuf->pprev = pmbuf_aggr->pprev; + pmbuf->pparent = pmbuf_aggr; + pmbuf_aggr->pprev->pnext = pmbuf; + pmbuf_aggr->pprev = pmbuf; + pmbuf_aggr->use_count++; +} +#endif + +#ifdef SDIO_MULTI_PORT_TX_AGGR +/** data structure for SDIO MPA TX */ +typedef struct _sdio_mpa_tx { + /** allocated buf for tx aggreation */ + t_u8 *head_ptr; + /** multiport tx aggregation buffer pointer */ + t_u8 *buf; + /** multiport tx aggregation buffer length */ + t_u32 buf_len; + /** multiport tx aggregation packet count */ + t_u32 pkt_cnt; + /** multiport tx aggregation ports */ + t_u32 ports; + /** multiport tx aggregation starting port */ + t_u16 start_port; + /** multiport tx aggregation enable/disable flag */ + t_u8 enabled; + /** multiport tx aggregation buffer size */ + t_u32 buf_size; + /** multiport tx aggregation pkt aggr limit */ + t_u32 pkt_aggr_limit; + /** multiport write info */ + t_u16 mp_wr_info[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; + /** multiport rx aggregation mbuf array */ + pmlan_buffer mbuf_arr[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; +} sdio_mpa_tx; +#endif + +#ifdef SDIO_MULTI_PORT_RX_AGGR +/** data structure for SDIO MPA RX */ +typedef struct _sdio_mpa_rx { + /** allocated buf for rx aggreation */ + t_u8 *head_ptr; + /** multiport rx aggregation buffer pointer */ + t_u8 *buf; + /** multiport rx aggregation buffer length */ + t_u32 buf_len; + /** multiport rx aggregation packet count */ + t_u32 pkt_cnt; + /** multiport rx aggregation ports */ + t_u32 ports; + /** multiport rx aggregation starting port */ + t_u16 start_port; + + /** multiport rx aggregation mbuf array */ + pmlan_buffer mbuf_arr[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; + /** multiport rx aggregation pkt len array */ + t_u32 len_arr[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; + + /** multiport rx aggregation enable/disable flag */ + t_u8 enabled; + /** multiport rx aggregation buffer size */ + t_u32 buf_size; + /** multiport rx aggregation pkt aggr limit */ + t_u32 pkt_aggr_limit; +} sdio_mpa_rx; +#endif /* SDIO_MULTI_PORT_RX_AGGR */ + +/** mlan_init_para structure */ +typedef struct _mlan_init_para { +#ifdef MFG_CMD_SUPPORT + /** MFG mode */ + t_u32 mfg_mode; +#endif + /** SDIO interrupt mode (0: INT_MODE_SDIO, 1: INT_MODE_GPIO) */ + t_u32 int_mode; + /** GPIO interrupt pin number */ + t_u32 gpio_pin; +#ifdef SDIO_MULTI_PORT_TX_AGGR + /** SDIO MPA Tx */ + t_u32 mpa_tx_cfg; +#endif +#ifdef SDIO_MULTI_PORT_RX_AGGR + /** SDIO MPA Rx */ + t_u32 mpa_rx_cfg; +#endif + /** Auto deep sleep */ + t_u32 auto_ds; + /** IEEE PS mode */ + t_u32 ps_mode; + /** Max Tx buffer size */ + t_u32 max_tx_buf; + /** 802.11d configuration */ + t_u32 cfg_11d; + /** 802.11H DFS Master Radar Detect */ + t_u32 dfs_master_radar_det_en; + /** 802.11H DFS Slave Radar Detect */ + t_u32 dfs_slave_radar_det_en; + /** FW download CRC check flag */ + t_u32 fw_crc_check; + /** dev cap mask */ + t_u32 dev_cap_mask; +} mlan_init_para, *pmlan_init_para; +typedef struct _mlan_sdio_card_reg { + t_u8 start_rd_port; + t_u8 start_wr_port; + t_u8 base_0_reg; + t_u8 base_1_reg; + t_u8 poll_reg; + t_u8 host_int_enable; + t_u8 host_int_status; + t_u8 status_reg_0; + t_u8 status_reg_1; + t_u8 sdio_int_mask; + t_u32 data_port_mask; + t_u8 max_mp_regs; + t_u8 rd_bitmap_l; + t_u8 rd_bitmap_u; + t_u8 rd_bitmap_1l; + t_u8 rd_bitmap_1u; + t_u8 wr_bitmap_l; + t_u8 wr_bitmap_u; + t_u8 wr_bitmap_1l; + t_u8 wr_bitmap_1u; + t_u8 rd_len_p0_l; + t_u8 rd_len_p0_u; + t_u8 card_misc_cfg_reg; +} mlan_sdio_card_reg, *pmlan_sdio_card_reg; + +/** ampdu info */ +typedef struct _ampdu_info { + /** staion tx win_size */ + t_u32 ampdu_sta_txwinsize; + /** uap tx win_size */ + t_u32 ampdu_uap_txwinsize; + /** uap rx win_size */ + t_u32 ampdu_uap_rxwinsize; + /** wfd tx/rx winsize */ + t_u32 ampdu_wfd_txrxwinsize; +} ampdu_info; + +typedef struct _mlan_sdio_device { + const mlan_sdio_card_reg *reg; + t_u8 max_ports; + t_u8 mp_aggr_pkt_limit; + t_bool supports_sdio_new_mode; + t_bool has_control_mask; + /** more option */ + t_u8 card_config_2_1_reg; // 8897:0xCD, 8887:0xD9 + t_u8 cmd_config_0; // CMD_CONFIG_0 8897:0xB8 8887:0xC4 + t_u8 cmd_config_1; // CMD_CONFIG_1 8897:0xB9, 8887:0xC5 + t_u8 cmd_rd_len_0; // CMD_RD_LEN_0 8897:0xB4, 8887:0xC0 + t_u8 cmd_rd_len_1; // CMD_RD_LEN_1 8897:0xB5, 8887:0xC1 + t_u8 io_port_0_reg; // IO_PORT_0_REG + t_u8 io_port_1_reg; // IO_PORT_1_REG + t_u8 io_port_2_reg; // IO_PORT_2_REG + t_u8 host_int_rsr_reg; // HOST_INT_RSR_REG + t_u8 card_rx_len_reg; // CARD_RX_LEN_REG + t_u8 card_rx_unit_reg; // CARD_RX_UNIT_REG + t_u8 host_int_mask_reg; // HOST_INT_MASK_REG + t_u8 host_int_status_reg; // HOST_INT_STATUS_REG + t_u32 mp_tx_aggr_buf_size; + t_u32 mp_rx_aggr_buf_size; + /** Max Tx buffer size */ + t_u32 max_tx_buf_size; + /** support driver_supplicant_auth */ + t_u8 driver_supplicant_auth; + /** support V15_UPDATE */ + t_u8 v15_update; + /** support V15_FW_API */ + t_u8 v15_fw_api; + /** support ext_scan */ + t_u8 ext_scan; + /** ampdu info*/ + ampdu_info *ampdu_info; +} mlan_sdio_device, *pmlan_sdio_device; + +/** Adapter data structure for MLAN */ +typedef struct _mlan_adapter { + /** MOAL handle structure */ + t_void *pmoal_handle; + /** Private pointer */ + pmlan_private priv[MLAN_MAX_BSS_NUM]; + /** Total number of Priv number */ + t_u8 priv_num; + /** Priority table for bss */ + mlan_bssprio_tbl bssprio_tbl[MLAN_MAX_BSS_NUM]; + /** Callback table */ + mlan_callbacks callbacks; + /** Init parameters */ + mlan_init_para init_para; + + /** mlan_lock for init/shutdown */ + t_void *pmlan_lock; + /** main_proc_lock for main_process */ + t_void *pmain_proc_lock; + /** mlan_processing */ + t_u32 mlan_processing; + /** mlan_rx_processing */ + t_u32 mlan_rx_processing; + /** rx_proc_lock for main_rx_process */ + t_void *prx_proc_lock; + /** rx work enable flag */ + t_u8 rx_work_flag; + /* number of rx pkts queued */ + t_u16 rx_pkts_queued; + /** more task flag */ + t_u32 more_task_flag; + /** delay task flag */ + t_u32 delay_task_flag; + /** Max tx buf size */ + t_u16 max_tx_buf_size; + /** Tx buf size */ + t_u16 tx_buf_size; + /** current tx buf size in fw */ + t_u16 curr_tx_buf_size; + /** IO port */ + t_u32 ioport; + + /** STATUS variables */ + WLAN_HARDWARE_STATUS hw_status; + /** PnP SUPPORT */ + t_u8 surprise_removed; + + /** Radio on flag */ + t_u16 radio_on; + + /** Firmware release number */ + t_u32 fw_release_number; + /** firmware version */ + t_u8 fw_ver; + /** firmware minor version */ + t_u8 fw_min_ver; + /** uap firmware version */ + t_u8 uap_fw_ver; + /** Number of antenna used */ + t_u16 number_of_antenna; + + /** Firmware capability information */ + t_u32 fw_cap_info; + /** pint_lock for interrupt handling */ + t_void *pint_lock; + const mlan_sdio_device *psdio_device; + t_u16 card_type; + /** Interrupt status */ + t_u8 sdio_ireg; + /** number of interrupt receive */ + t_u32 num_of_irq; + /** max SDIO single port tx size */ + t_u16 max_sp_tx_size; + /** max SDIO single port rx size */ + t_u16 max_sp_rx_size; + /** SDIO multiple port read bitmap */ + t_u32 mp_rd_bitmap; + /** SDIO multiple port write bitmap */ + t_u32 mp_wr_bitmap; + /** SDIO end port from txbufcfg */ + t_u16 mp_end_port; + /** SDIO port mask calculated based on txbufcfg end port */ + t_u32 mp_data_port_mask; + /** Current available port for read */ + t_u8 curr_rd_port; + /** Current available port for write */ + t_u8 curr_wr_port; + /** FW update port number */ + t_u32 mp_update[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX * 2]; + /** Invalid port update count */ + t_u32 mp_invalid_update; + /** Array to store values of SDIO multiple port group registers */ + t_u8 *mp_regs; + /** allocated buf to read SDIO multiple port group registers */ + t_u8 *mp_regs_buf; +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + /* see blk_queue_max_segment_size */ + t_u32 max_seg_size; + /* see blk_queue_max_segments */ + t_u16 max_segs; +#endif + +#ifdef SDIO_MULTI_PORT_TX_AGGR + /** data structure for SDIO MPA TX */ + sdio_mpa_tx mpa_tx; + /** packet number for tx aggr */ + t_u32 mpa_tx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; + /** no more packets count*/ + t_u32 mpa_sent_last_pkt; + /** no write_ports count */ + t_u32 mpa_sent_no_ports; + /** last wr_bitmap from FW */ + t_u32 last_recv_wr_bitmap; + /** last mp_wr_bitmap */ + t_u32 last_mp_wr_bitmap[SDIO_MP_DBG_NUM]; + /** last ports for cmd53 write data */ + t_u32 last_mp_wr_ports[SDIO_MP_DBG_NUM]; + /** last length for cmd53 write data */ + t_u32 last_mp_wr_len[SDIO_MP_DBG_NUM]; + /** length info for cmd53 write data */ + t_u16 last_mp_wr_info[SDIO_MP_DBG_NUM * SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; + /** last curr_wr_port */ + t_u8 last_curr_wr_port[SDIO_MP_DBG_NUM]; + + /** buffer for mp debug */ + t_u8 *mpa_buf; + /** length info for mp buf size */ + t_u32 mpa_buf_size; + + /** last mp_index */ + t_u8 last_mp_index; +#endif /* SDIO_MULTI_PORT_TX_AGGR */ + +#ifdef SDIO_MULTI_PORT_RX_AGGR + /** data structure for SDIO MPA RX */ + sdio_mpa_rx mpa_rx; + /** packet number for tx aggr */ + t_u32 mpa_rx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; +#endif /* SDIO_MULTI_PORT_RX_AGGR */ + + /** SDIO interrupt mode (0: INT_MODE_SDIO, 1: INT_MODE_GPIO) */ + t_u32 int_mode; + /** GPIO interrupt pin number */ + t_u32 gpio_pin; + + /** Event cause */ + t_u32 event_cause; + /** Event buffer */ + pmlan_buffer pmlan_buffer_event; + /** Upload length */ + t_u32 upld_len; + /** Upload buffer*/ + t_u8 upld_buf[WLAN_UPLD_SIZE]; + /** Data sent: + * TRUE - Data is sent to fw, no Tx Done received + * FALSE - Tx done received for previous Tx + */ + t_u8 data_sent; + /** CMD sent: + * TRUE - CMD is sent to fw, no CMD Done received + * FALSE - CMD done received for previous CMD + */ + t_u8 cmd_sent; + /** CMD Response received: + * TRUE - CMD is response is received from fw, and yet to process + * FALSE - No cmd response to process + */ + t_u8 cmd_resp_received; + /** Event received: + * TRUE - Event received from fw, and yet to process + * FALSE - No events to process + */ + t_u8 event_received; + + /** Data received: + * TRUE - Data received from fw + * FALSE - No Data received + */ + t_u8 data_received; + + /** Command-related variables */ + /** Command sequence number */ + t_u16 seq_num; + /** Command controller nodes */ + cmd_ctrl_node *cmd_pool; + /** Current Command */ + cmd_ctrl_node *curr_cmd; + /** mlan_lock for command */ + t_void *pmlan_cmd_lock; + /** Number of command timeouts */ + t_u32 num_cmd_timeout; + /** Last init fw command id */ + t_u16 last_init_cmd; + /** Command timer */ + t_void *pmlan_cmd_timer; + /** Command timer set flag */ + t_u8 cmd_timer_is_set; + /** time stamp for command dnld */ + t_u32 dnld_cmd_in_secs; + + /** Command Queues */ + /** Free command buffers */ + mlan_list_head cmd_free_q; + /** Pending command buffers */ + mlan_list_head cmd_pending_q; + /** Command queue for scanning */ + mlan_list_head scan_pending_q; + /** mlan_processing */ + t_u32 scan_processing; + /** coex scan flag */ + t_u8 coex_scan; + /** coex min scan time */ + t_u8 coex_min_scan_time; + /** coex max scan time */ + t_u8 coex_max_scan_time; + /** coex win size flag */ + t_u8 coex_win_size; + /** coex amdpdu tx win size */ + t_u8 coex_tx_win_size; + /** coex ampdu rx win size */ + t_u8 coex_rx_win_size; + /** Region code */ + t_u16 region_code; + /** Region Channel data */ + region_chan_t region_channel[MAX_REGION_CHANNEL_NUM]; + /** CFP table code for 2.4GHz */ + t_u8 cfp_code_bg; + /** CFP table code for 5GHz */ + t_u8 cfp_code_a; +#ifdef STA_SUPPORT + /** Universal Channel data */ + region_chan_t universal_channel[MAX_REGION_CHANNEL_NUM]; + /** Parsed region channel */ + parsed_region_chan_11d_t parsed_region_chan; +#endif /* STA_SUPPORT */ + /** 11D and Domain Regulatory Data */ + wlan_802_11d_domain_reg_t domain_reg; + /** Country Code */ + t_u8 country_code[COUNTRY_CODE_LEN]; + /** FSM variable for 11h support */ + wlan_11h_device_state_t state_11h; + /** FSM variable for DFS support */ + wlan_dfs_device_state_t state_dfs; + /** FSM variable for RDH support */ + wlan_radar_det_hndlg_state_t state_rdh; +#ifdef DFS_TESTING_SUPPORT + /** User configured settings for DFS testing */ + wlan_dfs_testing_settings_t dfs_test_params; +#endif + /** FSM variable for MEAS support */ + wlan_meas_state_t state_meas; + /** Scan table */ + BSSDescriptor_t *pscan_table; + /** scan age in secs */ + t_u32 age_in_secs; + /** channel statstics */ + ChanStatistics_t *pchan_stats; + /** Number of records in the chan_stats */ + t_u32 num_in_chan_stats; + /** index of chan stats */ + t_u32 idx_chan_stats; + t_u8 bgscan_reported; + + /** Number of records in the scan table */ + t_u32 num_in_scan_table; + /** Scan probes */ + t_u16 scan_probes; + + /** Scan type */ + t_u8 scan_type; + /** Scan mode */ + t_u32 scan_mode; + /** Specific scan time */ + t_u16 specific_scan_time; + /** Active scan time */ + t_u16 active_scan_time; + /** Passive scan time */ + t_u16 passive_scan_time; + /** Scan block flag */ + t_u8 scan_block; + /** Extended scan or legacy scan */ + t_u8 ext_scan; + t_u16 bcn_buf_size; + /** Beacon buffer */ + t_u8 *bcn_buf; + /** Pointer to valid beacon buffer end */ + t_u8 *pbcn_buf_end; + + /** F/W supported bands */ + t_u8 fw_bands; + /** User selected band to start adhoc network */ + t_u8 adhoc_start_band; + /** User selected bands */ + t_u8 config_bands; + /** Pointer to channel list last sent to the firmware for scanning */ + ChanScanParamSet_t *pscan_channels; + + /** Tx lock flag */ + t_u8 tx_lock_flag; + /** Rx lock flag */ + t_u8 rx_lock_flag; + /** main lock flag */ + t_u8 main_lock_flag; + /** Multi channel status */ + t_u8 mc_status; + + /** sleep_params_t */ + sleep_params_t sleep_params; + /** sleep_period_t (Enhanced Power Save) */ + sleep_period_t sleep_period; + /** saved sleep_period_t (Enhanced Power Save) */ + sleep_period_t saved_sleep_period; + + /** Power Save mode */ + /** + * Wlan802_11PowerModeCAM = disable + * Wlan802_11PowerModePSP = enable + */ + t_u16 ps_mode; + /** Power Save state */ + t_u32 ps_state; + /** Need to wakeup flag */ + t_u8 need_to_wakeup; + + /** Multiple DTIM */ + t_u16 multiple_dtim; + /** Local listen interval */ + t_u16 local_listen_interval; + /** Null packet interval */ + t_u16 null_pkt_interval; + + /** Power save confirm sleep command buffer */ + pmlan_buffer psleep_cfm; + /** Beacon miss timeout */ + t_u16 bcn_miss_time_out; + + /** AdHoc awake period */ + t_u16 adhoc_awake_period; + + /** Deep Sleep flag */ + t_u8 is_deep_sleep; + /** Idle time */ + t_u16 idle_time; + /** Auto Deep Sleep enabled at init time */ + t_u8 init_auto_ds; + + /** delay null pkt flag */ + t_u8 delay_null_pkt; + /** Delay to PS in milliseconds */ + t_u16 delay_to_ps; + /** Enhanced PS mode */ + t_u16 enhanced_ps_mode; + /** Device wakeup required flag */ + t_u8 pm_wakeup_card_req; + + /** Gen NULL pkg */ + t_u16 gen_null_pkt; + + /** PPS/UAPSD mode flag */ + t_u16 pps_uapsd_mode; + /** Number of wakeup tries */ + t_u32 pm_wakeup_fw_try; + /** time stamp when host try to wake up firmware */ + t_u32 pm_wakeup_in_secs; + + /** Host Sleep configured flag */ + t_u8 is_hs_configured; + /** Host Sleep configuration */ + hs_config_param hs_cfg; + /** Host Sleep activated flag */ + t_u8 hs_activated; + /** Event body */ + t_u8 event_body[MAX_EVENT_SIZE]; + /** 802.11n device capabilities */ + t_u32 hw_dot_11n_dev_cap; + /** Device support for MIMO abstraction of MCSs */ + t_u8 hw_dev_mcs_support; +#ifdef STA_SUPPORT + /** Enable 11n support for adhoc start */ + t_u8 adhoc_11n_enabled; + /** Adhoc Secondary Channel Bandwidth */ + t_u8 chan_bandwidth; +#endif /* STA_SUPPORT */ + + /** 802.11ac device capabilities */ + t_u32 hw_dot_11ac_dev_cap; + /** 802.11ac device support for MIMO abstraction of MCSs */ + t_u32 hw_dot_11ac_mcs_support; + + /** max mgmt IE index in device */ + t_u16 max_mgmt_ie_index; + /** Head of Rx data queue */ + mlan_list_head rx_data_queue; +#ifdef MFG_CMD_SUPPORT + t_u32 mfg_mode; +#endif + /** Debug */ + wlan_dbg dbg; + + /** RX pending for forwarding packets */ + mlan_scalar pending_bridge_pkts; + +#ifdef STA_SUPPORT + /** ARP filter buffer */ + t_u8 arp_filter[ARP_FILTER_MAX_BUF_SIZE]; + /** ARP filter buffer size */ + t_u32 arp_filter_size; +#endif /* STA_SUPPORT */ + /** Minimum delay between HsActive and HostWake (in msec) */ + t_u16 min_wake_holdoff; + + /** Bypass TX queue pkt count */ + t_u16 bypass_pkt_count; +#if defined(STA_SUPPORT) + /** warm-reset IOCTL request buffer pointer */ + pmlan_ioctl_req pwarm_reset_ioctl_req; +#endif + /** SCAN IOCTL request buffer pointer */ + pmlan_ioctl_req pscan_ioctl_req; + /** Cal data pointer */ + t_u8 *pcal_data; + /** Cal data length */ + t_u32 cal_data_len; + /** tdls status */ + /* TDLS_NOT_SETUP|TDLS_SWITCHING_CHANNEL|TDLS_IN_BASE_CHANNEL|TDLS_IN_SWITCH_CHANNEL */ + tdlsStatus_e tdls_status; + /** Feature control bitmask */ + t_u32 feature_control; + + /** Control coex RX window size configuration */ + t_u8 coex_rx_winsize; + t_bool mc_policy; +} mlan_adapter, *pmlan_adapter; + +/** Check if stream 2X2 enabled */ +#define IS_STREAM_2X2(x) ((x) & FEATURE_CTRL_STREAM_2X2) +/** Check if DFS support enabled */ +#define IS_DFS_SUPPORT(x) ((x) & FEATURE_CTRL_DFS_SUPPORT) + +/** Ethernet packet type for EAPOL */ +#define MLAN_ETHER_PKT_TYPE_EAPOL (0x888E) +/** Ethernet packet type for WAPI */ +#define MLAN_ETHER_PKT_TYPE_WAPI (0x88B4) +/** Ethernet packet type offset */ +#define MLAN_ETHER_PKT_TYPE_OFFSET (12) + +mlan_status wlan_init_lock_list(IN pmlan_adapter pmadapter); +t_void wlan_free_lock_list(IN pmlan_adapter pmadapter); +mlan_status wlan_init_timer(IN pmlan_adapter pmadapter); +t_void wlan_free_timer(IN pmlan_adapter pmadapter); + +/* Function prototype */ +/** Download firmware */ +mlan_status wlan_dnld_fw(IN pmlan_adapter pmadapter, IN pmlan_fw_image pmfw); + +/** Initialize firmware */ +mlan_status wlan_init_fw(IN pmlan_adapter pmadapter); + +/** Initialize firmware complete */ +mlan_status wlan_init_fw_complete(IN pmlan_adapter pmadapter); + +/** Shutdown firmware complete */ +mlan_status wlan_shutdown_fw_complete(IN pmlan_adapter pmadapter); + +/** Receive event */ +mlan_status wlan_recv_event(pmlan_private priv, + mlan_event_id event_id, t_void *pmevent); + +/** Initialize mlan_adapter structure */ +t_void wlan_init_adapter(IN pmlan_adapter pmadapter); + +/** Initialize mlan_private structure */ +mlan_status wlan_init_priv(IN pmlan_private priv); + +/** Process event */ +mlan_status wlan_process_event(pmlan_adapter pmadapter); + +/** Prepare command */ +mlan_status wlan_prepare_cmd(IN pmlan_private priv, + IN t_u16 cmd_no, + IN t_u16 cmd_action, + IN t_u32 cmd_oid, + IN t_void *pioctl_buf, IN t_void *pdata_buf); + +/** cmd timeout handler */ +t_void wlan_cmd_timeout_func(t_void *function_context); +/** process host cmd */ +mlan_status wlan_misc_ioctl_host_cmd(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); +/** process init/shutdown cmd*/ +mlan_status wlan_misc_ioctl_init_shutdown(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); +/** process debug info */ +mlan_status wlan_get_info_debug_info(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) +/** Set/Get BSS role */ +mlan_status wlan_bss_ioctl_bss_role(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); +#endif + +mlan_status wlan_set_ewpa_mode(mlan_private *priv, mlan_ds_passphrase *psec_pp); +mlan_status wlan_find_bss(mlan_private *pmpriv, pmlan_ioctl_req pioctl_req); + +/* block main process */ +void mlan_block_main_process(mlan_adapter *pmadapter, t_u8 block); +/* block rx process */ +void mlan_block_rx_process(mlan_adapter *pmadapter, t_u8 block); + +/** Allocate memory for adapter structure members */ +mlan_status wlan_allocate_adapter(pmlan_adapter pmadapter); +/** Free adapter */ +t_void wlan_free_adapter(pmlan_adapter pmadapter); +/** Free priv */ +t_void wlan_free_priv(mlan_private *pmpriv); +/** Allocate command buffer */ +mlan_status wlan_alloc_cmd_buffer(IN mlan_adapter *pmadapter); +/** Free command buffer */ +mlan_status wlan_free_cmd_buffer(IN mlan_adapter *pmadapter); +/** Request command lock */ +t_void wlan_request_cmd_lock(mlan_adapter *pmadapter); +/** Release command lock */ +t_void wlan_release_cmd_lock(mlan_adapter *pmadapter); +#ifdef STA_SUPPORT +/** Flush the scan pending queue */ +t_void wlan_flush_scan_queue(pmlan_adapter pmadapter); +t_void wlan_cancel_pending_scan_cmd(pmlan_adapter pmadapter); +#endif +/**Cancel pending command */ +t_void wlan_cancel_all_pending_cmd(pmlan_adapter pmadapter); +/**Cancel pending ioctl */ +t_void wlan_cancel_pending_ioctl(pmlan_adapter pmadapter, + pmlan_ioctl_req pioctl_req); +/**Cancel bss pending ioctl */ +t_void wlan_cancel_bss_pending_cmd(pmlan_adapter pmadapter, t_u32 bss_index); + +/** Insert command to free queue */ +t_void wlan_insert_cmd_to_free_q(IN mlan_adapter *pmadapter, + IN cmd_ctrl_node *pcmd_node); + +/** Insert command to pending queue */ +t_void wlan_insert_cmd_to_pending_q(IN mlan_adapter *pmadapter, + IN cmd_ctrl_node *pcmd_node, + IN t_u32 addtail); + +/** Execute next command */ +mlan_status wlan_exec_next_cmd(mlan_adapter *pmadapter); +/** Proecess command response */ +mlan_status wlan_process_cmdresp(mlan_adapter *pmadapter); +/** Handle received packet, has extra handling for aggregate packets */ +mlan_status wlan_handle_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf); +/** Process transmission */ +mlan_status wlan_process_tx(pmlan_private priv, pmlan_buffer pmbuf, + mlan_tx_param *tx_param); +/** Transmit a null data packet */ +mlan_status wlan_send_null_packet(pmlan_private priv, t_u8 flags); + +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) +mlan_status wlan_alloc_sdio_mpa_buffers(IN mlan_adapter *pmadapter, + t_u32 mpa_tx_buf_size, + t_u32 mpa_rx_buf_size); + +mlan_status wlan_free_sdio_mpa_buffers(IN mlan_adapter *pmadapter); +#endif + +/** Process write data complete */ +mlan_status wlan_write_data_complete(pmlan_adapter pmlan_adapter, + pmlan_buffer pmbuf, mlan_status status); +/** Process receive packet complete */ +mlan_status wlan_recv_packet_complete(pmlan_adapter pmadapter, + pmlan_buffer pmbuf, mlan_status status); +/** Clean Tx Rx queues */ +t_void wlan_clean_txrx(pmlan_private priv); + +t_void wlan_add_buf_bypass_txqueue(mlan_adapter *pmadapter, pmlan_buffer pmbuf); +t_void wlan_process_bypass_tx(mlan_adapter *pmadapter); +t_void wlan_cleanup_bypass_txq(pmlan_private priv); +t_u8 wlan_bypass_tx_list_empty(mlan_adapter *pmadapter); + +/** Check if this is the last packet */ +t_u8 wlan_check_last_packet_indication(pmlan_private priv); + +#define MOAL_ALLOC_MLAN_BUFFER (0) +#define MOAL_MALLOC_BUFFER (1) + +/** function to allocate a mlan_buffer */ +pmlan_buffer wlan_alloc_mlan_buffer(mlan_adapter *pmadapter, t_u32 data_len, + t_u32 head_room, t_u32 malloc_flag); +/** function to free a mlan_buffer */ +t_void wlan_free_mlan_buffer(mlan_adapter *pmadapter, pmlan_buffer pmbuf); + +/** command resp handler for version ext */ +mlan_status wlan_ret_ver_ext(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp, + mlan_ioctl_req *pioctl_buf); + +/** command resp handler for rx mgmt forward registration */ +mlan_status wlan_ret_rx_mgmt_ind(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp, + mlan_ioctl_req *pioctl_buf); + +/** Check Power Save condition */ +t_void wlan_check_ps_cond(mlan_adapter *pmadapter); + +/** handle command for enhanced power save mode */ +mlan_status wlan_cmd_enh_power_mode(pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, + IN t_u16 ps_bitmap, IN t_void *pdata_buf); +/** handle command resp for enhanced power save mode */ +mlan_status wlan_ret_enh_power_mode(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); + +/** handle commnand for cfg data */ +mlan_status wlan_cmd_cfg_data(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *pcmd, + IN t_u16 cmd_action, IN t_void *pdata_buf); +/** handle command resp for cfg data */ +mlan_status wlan_ret_cfg_data(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN t_void *pioctl_buf); + +/** Process sleep confirm command response */ +void wlan_process_sleep_confirm_resp(pmlan_adapter pmadapter, t_u8 *pbuf, + t_u32 len); + +/** Perform hs related activities on receving the power up interrupt */ +void wlan_process_hs_config(pmlan_adapter pmadapter); + +mlan_status wlan_pm_reset_card(pmlan_adapter adapter); +mlan_status wlan_pm_wakeup_card(pmlan_adapter pmadapter); + +mlan_status wlan_process_802dot11_mgmt_pkt(mlan_private *priv, t_u8 *payload, + t_u32 payload_len, RxPD *prx_pd); + +mlan_status wlan_pm_ioctl_hscfg(pmlan_adapter pmadapter, + pmlan_ioctl_req pioctl_req); + +#ifdef WIFI_DIRECT_SUPPORT +mlan_status wlan_bss_ioctl_wifi_direct_mode(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +mlan_status wlan_cmd_wifi_direct_mode(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, + IN t_void *pdata_buf); +mlan_status wlan_ret_wifi_direct_mode(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); + +mlan_status wlan_radio_ioctl_remain_chan_cfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); +mlan_status wlan_cmd_remain_on_channel(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, + IN t_void *pdata_buf); +mlan_status wlan_ret_remain_on_channel(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); +mlan_status wlan_cmd_p2p_params_config(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, + IN t_void *pdata_buf); +mlan_status wlan_ret_p2p_params_config(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); +mlan_status wlan_misc_p2p_config(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); +#endif +/** get ralist info */ +int wlan_get_ralist_info(mlan_private *priv, ralist_info *buf); +/** dump ralist */ +void wlan_dump_ralist(mlan_private *priv); + +/** get pm info */ +mlan_status wlan_get_pm_info(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +mlan_status wlan_bss_ioctl_bss_remove(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +mlan_status wlan_get_hs_wakeup_reason(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +mlan_status wlan_cmd_hs_wakeup_reason(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_void *pdata_buf); + +mlan_status wlan_ret_hs_wakeup_reason(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); + +mlan_status wlan_radio_ioctl_radio_ctl(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +mlan_status wlan_radio_ioctl_ant_cfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +mlan_status wlan_cmd_tx_rate_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf); +mlan_status wlan_ret_tx_rate_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); + +mlan_status wlan_rate_ioctl_cfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); +mlan_status wlan_ret_802_11_tx_rate_query(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); + +mlan_status wlan_rate_ioctl_get_data_rate(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +t_void wlan_host_sleep_activated_event(pmlan_private priv, t_u8 activated); +/** Handles the command response of hs_cfg */ +mlan_status wlan_ret_802_11_hs_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); +/** Sends HS_WAKEUP event to applications */ +t_void wlan_host_sleep_wakeup_event(pmlan_private priv); + +/** send adapter specific init cmd to firmware */ +mlan_status wlan_adapter_init_cmd(IN pmlan_adapter pmadapter); + +#ifdef RX_PACKET_COALESCE +mlan_status wlan_cmd_rx_pkt_coalesce_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, + IN t_void *pdata_buf); +mlan_status wlan_ret_rx_pkt_coalesce_cfg(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf); +#endif +mlan_status wlan_handle_event_multi_chan_info(IN pmlan_private pmpriv, + pmlan_buffer pevent); + +#ifdef STA_SUPPORT +/** Process received packet */ +mlan_status wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf); +/** ioctl handler for station mode */ +mlan_status wlan_ops_sta_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req); + +/** cmd handler for station mode */ +mlan_status wlan_ops_sta_prepare_cmd(IN t_void *priv, + IN t_u16 cmd_no, + IN t_u16 cmd_action, + IN t_u32 cmd_oid, + IN t_void *pioctl_buf, + IN t_void *pdata_buf, IN t_void *pcmd_buf); + +/** cmdresp handler for station mode */ +mlan_status wlan_ops_sta_process_cmdresp(IN t_void *priv, + IN t_u16 cmdresp_no, + IN t_void *pcmd_buf, + IN t_void *pioctl); + +/** rx handler for station mode */ +mlan_status wlan_ops_sta_process_rx_packet(IN t_void *adapter, + IN pmlan_buffer pmbuf); + +/** event handler for station mode */ +mlan_status wlan_ops_sta_process_event(IN t_void *priv); + +/** fill txpd for station mode */ +t_void *wlan_ops_sta_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf); + +/** send init cmd to firmware for station mode */ +mlan_status wlan_ops_sta_init_cmd(IN t_void *priv, IN t_u8 first_bss); + +/** Flush the scan table */ +mlan_status wlan_flush_scan_table(IN pmlan_adapter pmadapter); + +/** Scan for networks */ +mlan_status wlan_scan_networks(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, + IN const wlan_user_scan_cfg *puser_scan_in); + +/** Scan for specific SSID */ +mlan_status wlan_scan_specific_ssid(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, + IN mlan_802_11_ssid *preq_ssid); + +/** Scan command handler */ +mlan_status wlan_cmd_802_11_scan(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *pcmd, + IN t_void *pdata_buf); + +/** Queue scan command handler */ +t_void wlan_queue_scan_cmd(IN mlan_private *pmpriv, + IN cmd_ctrl_node *pcmd_node); + +/** Handler for scan command response */ +mlan_status wlan_ret_802_11_scan(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN t_void *pioctl_buf); + +/** Extended scan command handler */ +mlan_status wlan_cmd_802_11_scan_ext(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *pcmd, + IN t_void *pdata_buf); +/** Handler for extended scan command response */ +mlan_status wlan_ret_802_11_scan_ext(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN t_void *pioctl_buf); +/** Handler event for extended scan report */ +mlan_status wlan_handle_event_ext_scan_report(IN mlan_private *pmpriv, + IN mlan_buffer *pmbuf); + +/** check network compatibility */ +t_s32 wlan_is_network_compatible(IN mlan_private *pmpriv, + IN t_u32 index, IN t_u32 mode); + +/** Find an SSID in a list */ +t_s32 wlan_find_ssid_in_list(IN pmlan_private pmpriv, + IN mlan_802_11_ssid *ssid, + IN t_u8 *bssid, IN t_u32 mode); + +/** Find a BSSID in a list */ +t_s32 wlan_find_bssid_in_list(IN mlan_private *pmpriv, + IN t_u8 *bssid, IN t_u32 mode); + +/** Find best network */ +mlan_status wlan_find_best_network(IN mlan_private *pmpriv, + OUT mlan_ssid_bssid *preq_ssid_bssid); + +/** Compare two SSIDs */ +t_s32 wlan_ssid_cmp(IN pmlan_adapter pmadapter, + IN mlan_802_11_ssid *ssid1, IN mlan_802_11_ssid *ssid2); + +/** Associate */ +mlan_status wlan_associate(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, IN BSSDescriptor_t *pBSSDesc); + +/** Associate command handler */ +mlan_status wlan_cmd_802_11_associate(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_void *pdata_buf); + +/** Handler for association command response */ +mlan_status wlan_ret_802_11_associate(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN t_void *pioctl_buf); + +/** Reset connected state */ +t_void wlan_reset_connect_state(IN pmlan_private priv, IN t_u8 drv_disconnect); + +t_void wlan_2040_coex_event(pmlan_private pmpriv); + +/** convert band to radio type */ +t_u8 wlan_band_to_radio_type(IN t_u8 band); + +/** Disconnect */ +mlan_status wlan_disconnect(IN mlan_private *pmpriv, + IN mlan_ioctl_req *pioctl_req, + IN mlan_802_11_mac_addr *mac); + +/** Ad-Hoc start */ +mlan_status wlan_adhoc_start(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, + IN mlan_802_11_ssid *padhoc_ssid); + +/** Ad-Hoc join */ +mlan_status wlan_adhoc_join(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, + IN BSSDescriptor_t *pBSSDesc); + +/** Ad-Hoc start command handler */ +mlan_status wlan_cmd_802_11_ad_hoc_start(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_void *pdata_buf); + +/** Ad-Hoc command handler */ +mlan_status wlan_cmd_802_11_ad_hoc_join(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_void *pdata_buf); + +/** Handler for Ad-Hoc commands */ +mlan_status wlan_ret_802_11_ad_hoc(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN t_void *pioctl_buf); + +/** Handler for bgscan query commands */ +mlan_status wlan_cmd_802_11_bg_scan_query(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *pcmd, + IN t_void *pdata_buf); +/** Handler for bgscan config command */ +mlan_status wlan_cmd_bgscan_config(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *pcmd, + IN t_void *pdata_buf); +/** Hander for bgscan config command response */ +mlan_status wlan_ret_bgscan_config(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); +mlan_status wlan_ret_802_11_bgscan_query(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); + +/** Get Channel-Frequency-Power by band and channel */ +chan_freq_power_t *wlan_get_cfp_by_band_and_channel(pmlan_adapter pmadapter, + t_u8 band, t_u16 channel, + region_chan_t + *region_channel); +/** Find Channel-Frequency-Power by band and channel */ +chan_freq_power_t *wlan_find_cfp_by_band_and_channel(mlan_adapter *pmadapter, + t_u8 band, t_u16 channel); +/** Find Channel-Frequency-Power by band and frequency */ +chan_freq_power_t *wlan_find_cfp_by_band_and_freq(mlan_adapter *pmadapter, + t_u8 band, t_u32 freq); +/** Get Tx power of channel from Channel-Frequency-Power */ +t_u8 wlan_get_txpwr_of_chan_from_cfp(mlan_private *pmpriv, t_u8 channel); +/** find frequency from band and channel */ +t_u32 wlan_find_freq_from_band_chan(t_u8, t_u8); + +/* Save a beacon buffer of the current bss descriptor */ +t_void wlan_save_curr_bcn(IN mlan_private *pmpriv); +/* Free a beacon buffer of the current bss descriptor */ +t_void wlan_free_curr_bcn(IN mlan_private *pmpriv); + +#endif /* STA_SUPPORT */ + +/* Rate related functions */ +/** Convert index into data rate */ +t_u8 wlan_convert_v14_rate_ht_info(t_u8 ht_info); +t_u32 wlan_index_to_data_rate(pmlan_adapter pmadapter, t_u8 index, + t_u8 rate_info); +/** Get active data rates */ +t_u32 wlan_get_active_data_rates(mlan_private *pmpriv, t_u32 bss_mode, + t_u8 config_bands, WLAN_802_11_RATES rates); +/** Get supported data rates */ +t_u32 wlan_get_supported_rates(mlan_private *pmpriv, t_u32 bss_mode, + t_u8 config_bands, WLAN_802_11_RATES rates); +/** Convert data rate to index */ +t_u8 wlan_data_rate_to_index(pmlan_adapter pmadapter, t_u32 rate); +/** Check if rate is auto */ +t_u8 wlan_is_rate_auto(mlan_private *pmpriv); +/** Get rate index */ +int wlan_get_rate_index(pmlan_adapter pmadapter, t_u16 *rateBitmap, int size); + +/* CFP related functions */ +/** Region code index table */ +extern t_u16 region_code_index[MRVDRV_MAX_REGION_CODE]; +/** The table to keep CFP code for BG */ +extern t_u16 cfp_code_index_bg[MRVDRV_MAX_CFP_CODE_BG]; +/** The table to keep CFP code for A */ +extern t_u16 cfp_code_index_a[MRVDRV_MAX_CFP_CODE_A]; + +/** Set region table */ +mlan_status wlan_set_regiontable(mlan_private *pmpriv, t_u8 region, t_u8 band); +/** Get radar detection requirements*/ +t_bool wlan_get_cfp_radar_detect(mlan_private *priv, t_u8 chnl); +/** check if scan type is passive for b/g band*/ +t_bool wlan_bg_scan_type_is_passive(mlan_private *priv, t_u8 chnl); +/** check if channel is blacklisted */ +t_bool wlan_is_chan_blacklisted(mlan_private *priv, t_u8 band, t_u8 chan); +/** set blacklist setting for a channel */ +t_bool wlan_set_chan_blacklist(mlan_private *priv, t_u8 band, t_u8 chan, + t_bool bl); + +/* 802.11D related functions */ +/** Initialize 11D */ +t_void wlan_11d_priv_init(mlan_private *pmpriv); +/** Initialize 11D */ +t_void wlan_11d_init(mlan_adapter *pmadapter); +/** Enable 11D */ +mlan_status wlan_11d_enable(mlan_private *pmpriv, t_void *pioctl_buf, + state_11d_t flag); +/** Get if 11D is enabled */ +t_bool wlan_11d_is_enabled(mlan_private *pmpriv); +/** Get if priv is station */ +t_bool wlan_is_station(mlan_private *pmpriv); +/** Command handler for 11D country info */ +mlan_status wlan_cmd_802_11d_domain_info(mlan_private *pmpriv, + HostCmd_DS_COMMAND *pcmd, + t_u16 cmd_action); +/** Handler for 11D country info command response */ +mlan_status wlan_ret_802_11d_domain_info(mlan_private *pmpriv, + HostCmd_DS_COMMAND *resp); +#ifdef STA_SUPPORT +/** Convert channel to frequency */ +t_u32 wlan_11d_chan_2_freq(pmlan_adapter pmadapter, t_u8 chan, t_u8 band); +/** Set 11D universal table */ +mlan_status wlan_11d_set_universaltable(mlan_private *pmpriv, t_u8 band); +/** Clear 11D region table */ +mlan_status wlan_11d_clear_parsedtable(mlan_private *pmpriv); +/** Create 11D country information for downloading */ +mlan_status wlan_11d_create_dnld_countryinfo(mlan_private *pmpriv, t_u8 band); +/** Get scan type from 11D info */ +t_u8 wlan_11d_get_scan_type(pmlan_adapter pmadapter, t_u8 band, t_u8 chan, + parsed_region_chan_11d_t *parsed_region_chan); +/** Parse 11D country info */ +mlan_status wlan_11d_parse_dnld_countryinfo(mlan_private *pmpriv, + BSSDescriptor_t *pBSSDesc); +/** Prepare 11D domain information for download */ +mlan_status wlan_11d_prepare_dnld_domain_info_cmd(mlan_private *pmpriv); +/** Parse 11D country information into domain info */ +mlan_status wlan_11d_parse_domain_info(pmlan_adapter pmadapter, + IEEEtypes_CountryInfoFullSet_t + *country_info, t_u8 band, + parsed_region_chan_11d_t + *parsed_region_chan); +/** Configure 11D domain info command */ +mlan_status wlan_11d_cfg_domain_info(IN pmlan_adapter pmadapter, + IN mlan_ioctl_req *pioctl_req); +#endif /* STA_SUPPORT */ +#ifdef UAP_SUPPORT +/** Handle 11D domain information from UAP */ +mlan_status wlan_11d_handle_uap_domain_info(mlan_private *pmpriv, + t_u8 band, + t_u8 *domain_tlv, + t_void *pioctl_buf); +#endif + +/** This function converts region string to CFP table code */ +mlan_status wlan_misc_country_2_cfp_table_code(IN pmlan_adapter pmadapter, + IN t_u8 *country_code, + OUT t_u8 *cfp_bg, + OUT t_u8 *cfp_a); + +/** check if station list is empty */ +t_u8 wlan_is_station_list_empty(mlan_private *priv); +/** get station node */ +sta_node *wlan_get_station_entry(mlan_private *priv, t_u8 *mac); +/** delete station list */ +t_void wlan_delete_station_list(pmlan_private priv); +/** delete station entry */ +t_void wlan_delete_station_entry(mlan_private *priv, t_u8 *mac); +/** add station entry */ +sta_node *wlan_add_station_entry(mlan_private *priv, t_u8 *mac); +/** process uap rx packet */ + +/** find specific ie */ +t_u8 *wlan_get_specific_ie(pmlan_private priv, t_u8 *ie_buf, t_u8 ie_len, + IEEEtypes_ElementId_e id); +t_u8 wlan_is_wmm_ie_present(pmlan_adapter pmadapter, t_u8 *pbuf, t_u16 buf_len); + +/** + * @brief This function checks whether a station TDLS link is enabled or not + * + * @param priv A pointer to mlan_private + * @param mac station mac address + * @return TDLS_NOT_SETUP/TDLS_SETUP_INPROGRESS/TDLS_SETUP_COMPLETE/TDLS_SETUP_FAILURE/TDLS_TEAR_DOWN + */ +static INLINE tdlsStatus_e +wlan_get_tdls_link_status(mlan_private *priv, t_u8 *mac) +{ + sta_node *sta_ptr = MNULL; + sta_ptr = wlan_get_station_entry(priv, mac); + if (sta_ptr) + return sta_ptr->status; + return TDLS_NOT_SETUP; +} + +/** + * @brief This function checks if TDLS link is in channel switching + * + * @param status tdls link status + * @return MTRUE/MFALSE + */ +static INLINE int +wlan_is_tdls_link_chan_switching(tdlsStatus_e status) +{ + return (status == TDLS_SWITCHING_CHANNEL) ? MTRUE : MFALSE; +} + +/** + * @brief This function checks if send command to firmware is allowed + * + * @param status tdls link status + * @return MTRUE/MFALSE + */ +static INLINE int +wlan_is_send_cmd_allowed(tdlsStatus_e status) +{ + int ret = MTRUE; + switch (status) { + case TDLS_SWITCHING_CHANNEL: + case TDLS_IN_OFF_CHANNEL: + ret = MFALSE; + break; + default: + break; + } + return ret; +} + +/** + * @brief This function checks if TDLS link is setup + * + * @param status tdls link status + * @return MTRUE/MFALSE + */ +static INLINE int +wlan_is_tdls_link_setup(tdlsStatus_e status) +{ + int ret = MFALSE; + switch (status) { + case TDLS_SWITCHING_CHANNEL: + case TDLS_IN_OFF_CHANNEL: + case TDLS_IN_BASE_CHANNEL: + case TDLS_SETUP_COMPLETE: + ret = MTRUE; + break; + default: + break; + } + return ret; +} + +/** + * @brief This function checks tx_pause flag for peer + * + * @param priv A pointer to mlan_private + * @param ra Address of the receiver STA + * + * @return MTRUE or MFALSE + */ +static int INLINE +wlan_is_tx_pause(mlan_private *priv, t_u8 *ra) +{ + sta_node *sta_ptr = MNULL; + sta_ptr = wlan_get_station_entry(priv, ra); + if (sta_ptr) + return sta_ptr->tx_pause; + return MFALSE; +} + +t_void wlan_update_ralist_tx_pause(pmlan_private priv, t_u8 *mac, + t_u8 tx_pause); + +#ifdef UAP_SUPPORT +mlan_status wlan_process_uap_rx_packet(IN mlan_private *priv, + IN pmlan_buffer pmbuf); +t_void wlan_drop_tx_pkts(pmlan_private priv); +#endif /* UAP_SUPPORT */ + +#ifdef UAP_SUPPORT +/* process the recevied packet and bridge the packet */ +mlan_status wlan_uap_recv_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf); +#endif /* UAP_SUPPORT */ + +mlan_status wlan_misc_ioctl_coalescing_status(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +mlan_status wlan_misc_ioctl_custom_ie_list(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req, + IN t_bool send_ioctl); + +mlan_status wlan_cmd_get_hw_spec(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *pcmd); +mlan_status wlan_ret_get_hw_spec(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN t_void *pioctl_buf); + +mlan_status wlan_misc_ioctl_mac_control(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); +mlan_status wlan_cmd_mac_control(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *pcmd, + IN t_u16 cmd_action, IN t_void *pdata_buf); +mlan_status wlan_ret_mac_control(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); + +mlan_status wlan_cmd_802_11_radio_control(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, + IN t_void *pdata_buf); +mlan_status wlan_ret_802_11_radio_control(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); + +mlan_status wlan_cmd_802_11_rf_antenna(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, + IN t_void *pdata_buf); +mlan_status wlan_ret_802_11_rf_antenna(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); + +mlan_status wlan_ret_reg_access(mlan_adapter *pmadapter, + t_u16 type, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); +mlan_status wlan_ret_mem_access(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf); + +mlan_status wlan_reg_mem_ioctl_reg_rw(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); +mlan_status wlan_reg_mem_ioctl_read_eeprom(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); +mlan_status wlan_reg_mem_ioctl_mem_rw(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); +mlan_status wlan_cmd_reg_access(IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf); +mlan_status wlan_cmd_mem_access(IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf); + +int wlan_get_tdls_list(mlan_private *priv, tdls_peer_info *buf); +t_void wlan_hold_tdls_packets(pmlan_private priv, t_u8 *mac); +t_void wlan_restore_tdls_packets(pmlan_private priv, t_u8 *mac, + tdlsStatus_e status); +t_void wlan_update_non_tdls_ralist(mlan_private *priv, t_u8 *mac, + t_u8 tx_pause); +mlan_status wlan_misc_ioctl_tdls_config(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); +void wlan_11n_send_delba_to_peer(mlan_private *priv, t_u8 *ra); +mlan_status wlan_misc_ioctl_tdls_oper(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +mlan_status + +wlan_misc_ioctl_tdls_get_ies(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); +mlan_status wlan_misc_ioctl_tdls_idle_time(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +mlan_status wlan_get_info_ver_ext(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +mlan_status wlan_reg_rx_mgmt_ind(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +#ifdef DEBUG_LEVEL1 +mlan_status wlan_set_drvdbg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); +#endif + +mlan_status wlan_misc_hotspot_cfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); +#ifdef STA_SUPPORT +mlan_status wlan_misc_ext_capa_cfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +t_u32 wlan_is_ext_capa_support(IN mlan_private *pmpriv); +#endif + +#ifdef STA_SUPPORT +void wlan_add_ext_capa_info_ie(IN mlan_private *pmpriv, OUT t_u8 **pptlv_out); +#endif + +t_u8 wlan_adjust_data_rate(mlan_private *priv, t_u8 rx_rate, t_u8 rate_info); + +mlan_status wlan_misc_otp_user_data(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +mlan_status wlan_misc_ioctl_txcontrol(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +#ifdef RX_PACKET_COALESCE +mlan_status + +wlan_misc_ioctl_rx_pkt_coalesce_config(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); +#endif + +mlan_status wlan_misc_ioctl_multi_chan_config(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +mlan_status wlan_cmd_multi_chan_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf); + +mlan_status wlan_ret_multi_chan_cfg(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf); + +mlan_status wlan_misc_ioctl_multi_chan_policy(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +mlan_status wlan_cmd_multi_chan_policy(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, + IN t_void *pdata_buf); + +mlan_status wlan_ret_multi_chan_policy(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf); + +void wlan_bt_coex_wlan_param_update_event(pmlan_private priv, + pmlan_buffer pevent); + +mlan_status wlan_misc_ioctl_coalesce_cfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +mlan_status wlan_misc_ioctl_low_pwr_mode(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); + +/** + * @brief RA based queueing + * + * @param priv A pointer to mlan_private structure + * + * @return MTRUE or MFALSE + */ +static INLINE t_u8 +queuing_ra_based(pmlan_private priv) +{ + /* + * Currently we assume if we are in Infra, then DA=RA. This might not be + * true in the future + */ + if ((priv->bss_mode == MLAN_BSS_MODE_INFRA) && + (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA)) + return MFALSE; + + return MTRUE; +} + +/** + * @brief Copy Rates + * + * @param dest A pointer to Dest Buf + * @param pos The position for copy + * @param src A pointer to Src Buf + * @param len The len of Src Buf + * + * @return Number of Rates copied + */ +static INLINE t_u32 +wlan_copy_rates(t_u8 *dest, t_u32 pos, t_u8 *src, int len) +{ + int i; + + for (i = 0; i < len && src[i]; i++, pos++) { + if (pos >= sizeof(WLAN_802_11_RATES)) + break; + dest[pos] = src[i]; + } + + return pos; +} + +/** + * @brief strlen + * + * @param str A pointer to string + * + * @return Length of string + */ +static INLINE t_u32 +wlan_strlen(const char *str) +{ + t_u32 i; + + for (i = 0; str[i] != 0; i++) ; + + return i; +} + +/** + * @brief iscdigit + * + * @param chr A char + * + * @return Non zero if chr is a hex, else 0 + */ +static INLINE t_u32 +wlan_isxdigit(t_u8 chr) +{ + return (chr <= 'f' && chr >= 'a') || (chr <= 'F' && chr >= 'A') || + (chr <= '9' && chr >= '0'); +} + +/** + * @brief isspace + * + * @param A chr + * + * @return Non zero if chr is space etc, else 0 + */ +static INLINE t_u32 +wlan_isspace(t_u8 chr) +{ + return chr <= ' ' && (chr == ' ' || (chr <= 13 && chr >= 9)); +} + +/** delay unit */ +typedef enum _delay_unit { + USEC, + MSEC, + SEC, +} t_delay_unit; + +/** delay function */ +t_void wlan_delay_func(mlan_adapter *pmadapter, t_u32 delay, t_delay_unit u); + +/** delay function wrapper */ +#define wlan_delay(p, n) wlan_delay_func(p, n, SEC) +/** delay function wrapper */ +#define wlan_mdelay(p, n) wlan_delay_func(p, n, MSEC) +/** delay function wrapper */ +#define wlan_udelay(p, n) wlan_delay_func(p, n, USEC) + +/** Function to check if any command is pending in the queue */ +#define IS_COMMAND_PENDING(pmadapter) \ + ((cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle, \ + &pmadapter->cmd_pending_q,\ + pmadapter->callbacks.moal_spin_lock,\ + pmadapter->callbacks.moal_spin_unlock)) + +/** Get BSS number from priv */ +#define GET_BSS_NUM(priv) ((priv)->bss_num) + +/** + * @brief This function returns priv based on the BSS num and BSS type + * + * @param pmadapter A pointer to mlan_adapter + * @param bss_num BSS number + * @param bss_type BSS type + * + * @return Pointer to mlan_private + */ +static INLINE mlan_private * +wlan_get_priv_by_id(mlan_adapter *pmadapter, t_u32 bss_num, t_u32 bss_type) +{ + int i; + + for (i = 0; i < MIN(pmadapter->priv_num, MLAN_MAX_BSS_NUM); i++) { + if (pmadapter->priv[i]) { + if ((pmadapter->priv[i]->bss_num == bss_num) && + (pmadapter->priv[i]->bss_type == bss_type)) + return pmadapter->priv[i]; + } + } + return MNULL; +} + +/** + * @brief This function returns first available priv + * based on the BSS role + * + * @param pmadapter A pointer to mlan_adapter + * @param bss_role BSS role or MLAN_BSS_ROLE_ANY + * + * @return Pointer to mlan_private + */ +static INLINE mlan_private * +wlan_get_priv(mlan_adapter *pmadapter, mlan_bss_role bss_role) +{ + int i; + + for (i = 0; i < MIN(pmadapter->priv_num, MLAN_MAX_BSS_NUM); i++) { + if (pmadapter->priv[i]) { + if (bss_role == MLAN_BSS_ROLE_ANY || + GET_BSS_ROLE(pmadapter->priv[i]) == bss_role) + return pmadapter->priv[i]; + } + } + return MNULL; +} + +/** + * @brief This function counts the number of occurences for a certain + * condition among privs. Which privs are checked can be configured + * via a second condition. + * + * @param pmadapter A pointer to mlan_adapter + * @param count_cond Function pointer to condition to count on privs + * @param check_cond Function pointer to condition to decide whether priv + * should be counted or not. Use MNULL to check all privs. + * + * @return Count of privs where count_cond returned MTRUE. + */ +static int INLINE +wlan_count_priv_cond(mlan_adapter *pmadapter, + t_bool (*count_cond) (IN pmlan_private pmpriv), + t_bool (*check_cond) (IN pmlan_private pmpriv)) +{ + pmlan_private pmpriv; + int count = 0; + int i; + + if (pmadapter == MNULL || count_cond == MNULL) + return 0; + + for (i = 0; i < pmadapter->priv_num; i++) { + pmpriv = pmadapter->priv[i]; + if (pmpriv) { + if ((check_cond == MNULL) || + (check_cond && check_cond(pmpriv))) { + if (count_cond(pmpriv)) + count++; + } + } + } + + return count; +} + +/** + * @brief This function runs a procedure on each priv. + * Which privs it is run on can be configured via a condition. + * + * @param pmadapter A pointer to mlan_adapter + * @param operation Function pointer to produedure to operate on priv + * @param check_cond Function pointer to condition to decide whether priv + * operated on or not. Use MNULL to run on all privs. + * + * @return Number of privs that operation was run on. + */ +static int INLINE +wlan_do_task_on_privs(mlan_adapter *pmadapter, + t_void (*operation) (IN pmlan_private pmpriv), + t_bool (*check_cond) (IN pmlan_private pmpriv)) +{ + pmlan_private pmpriv; + int count = 0; + int i; + + if (pmadapter == MNULL || operation == MNULL) + return 0; + + for (i = 0; i < pmadapter->priv_num; i++) { + pmpriv = pmadapter->priv[i]; + if (pmpriv) { + if ((check_cond == MNULL) || + (check_cond && check_cond(pmpriv))) { + operation(pmpriv); + count++; + } + } + } + + return count; +} + +/** + * @brief This function builds a list of privs that test for a condition + * This is useful if you need to do a number of operations on the same set + * of privs. For one-off tasks, the above two functions might be better. + * + * @param pmadapter A pointer to mlan_adapter + * @param check_cond Function pointer to condition to decide whether priv + * should be placed in the list. + * @param ppriv_list Output param. Externally supplied array of mlan_private* + * to hold priv's that test positive with check_cond. + * Array size should be at least pmadapter->priv_num. + * + * @return Number of privs in ppriv_list + * + * @sa wlan_count_priv_cond + */ +static int INLINE +wlan_get_privs_by_cond(mlan_adapter *pmadapter, + t_bool (*check_cond) (IN pmlan_private pmpriv), + mlan_private **ppriv_list) +{ + pmlan_private pmpriv; + int count = 0; + int i; + + if (pmadapter == MNULL || check_cond == MNULL || ppriv_list == MNULL) + return 0; + + for (i = 0; i < pmadapter->priv_num; i++) { + pmpriv = pmadapter->priv[i]; + if (pmpriv) { + if (check_cond(pmpriv)) + ppriv_list[count++] = pmpriv; + } + } + + return count; +} + +/** + * @brief This function builds a list of privs that test against two conditions + * This is useful if you need to do a number of operations on the same set + * of privs. Can choose whether both conditions (AND) or either condition (OR) + * is required. + * + * @param pmadapter A pointer to mlan_adapter + * @param check_cond Function pointer to condition to decide whether priv + * should be placed in the list. + * @param check_cond_2 Function pointer to second condition to check. + * @param and_conditions If MTRUE, both conditions must be met (AND), + * else either condition can be met (OR). + * @param ppriv_list Output param. Externally supplied array of mlan_private* + * to hold priv's that test positive with check_cond. + * Array size should be at least pmadapter->priv_num. + * + * @return Number of privs in ppriv_list + * + * @sa wlan_count_priv_cond, wlan_get_privs_by_cond + */ +static int INLINE +wlan_get_privs_by_two_cond(mlan_adapter *pmadapter, + t_bool (*check_cond) (IN pmlan_private pmpriv), + t_bool (*check_cond_2) (IN pmlan_private pmpriv), + t_bool and_conditions, mlan_private **ppriv_list) +{ + pmlan_private pmpriv; + int count = 0; + int i; + + if (pmadapter == MNULL || check_cond == MNULL || + check_cond_2 == MNULL || ppriv_list == MNULL) + return 0; + + for (i = 0; i < pmadapter->priv_num; i++) { + pmpriv = pmadapter->priv[i]; + if (pmpriv) { + if (and_conditions) { + if (check_cond(pmpriv) && check_cond_2(pmpriv)) + ppriv_list[count++] = pmpriv; + } else { + if (check_cond(pmpriv) || check_cond_2(pmpriv)) + ppriv_list[count++] = pmpriv; + } + } + } + + return count; +} + +#endif /* !_MLAN_MAIN_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_meas.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_meas.c new file mode 100644 index 00000000..44525b31 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_meas.c @@ -0,0 +1,463 @@ +/** + * @file mlan_meas.c + * + * @brief Implementation of measurement interface code with the app/firmware + * + * Driver implementation for sending and retrieving measurement requests + * and responses. + * + * Current use is limited to 802.11h. + * + * Requires use of the following preprocessor define: + * - ENABLE_MEAS + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/************************************************************* +Change Log: + 03/24/2009: initial version +************************************************************/ + +#include "mlan.h" +#include "mlan_join.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_ioctl.h" +#include "mlan_meas.h" + +/** Default measurement duration when not provided by the application */ +#define WLAN_MEAS_DEFAULT_MEAS_DURATION 1000U /* TUs */ + +#ifdef DEBUG_LEVEL2 +/** String descriptions of the different measurement enums. Debug display */ +static const char *meas_type_str[WLAN_MEAS_NUM_TYPES] = { + "basic", +}; + +/******************************************************** + Local Functions +********************************************************/ + +/** + * @brief Retrieve the measurement string representation of a meas_type enum + * Used for debug display only + * + * @param meas_type Measurement type enumeration input for string lookup + * + * @return Constant string representing measurement type + */ +static const char * +wlan_meas_get_meas_type_str(MeasType_t meas_type) +{ + if (meas_type <= WLAN_MEAS_11H_MAX_TYPE) + return meas_type_str[meas_type]; + + return "Invld"; +} +#endif + +/** + * @brief Debug print display of the input measurement request + * + * @param pmeas_req Pointer to the measurement request to display + * + * @return N/A + */ +static + void +wlan_meas_dump_meas_req(const HostCmd_DS_MEASUREMENT_REQUEST *pmeas_req) +{ + ENTER(); + + PRINTM(MINFO, "Meas: Req: ------------------------------\n"); + + PRINTM(MINFO, "Meas: Req: mac_addr: " MACSTR "\n", + MAC2STR(pmeas_req->mac_addr)); + + PRINTM(MINFO, "Meas: Req: dlgTkn: %d\n", pmeas_req->dialog_token); + PRINTM(MINFO, "Meas: Req: mode: dm[%c] rpt[%c] req[%c]\n", + pmeas_req->req_mode.duration_mandatory ? 'X' : ' ', + pmeas_req->req_mode.report ? 'X' : ' ', + pmeas_req->req_mode.request ? 'X' : ' '); + PRINTM(MINFO, "Meas: Req: : en[%c] par[%c]\n", + pmeas_req->req_mode.enable ? 'X' : ' ', + pmeas_req->req_mode.parallel ? 'X' : ' '); +#ifdef DEBUG_LEVEL2 + PRINTM(MINFO, "Meas: Req: measTyp: %s\n", + wlan_meas_get_meas_type_str(pmeas_req->meas_type)); +#endif + + switch (pmeas_req->meas_type) { + case WLAN_MEAS_BASIC: + /* Lazy cheat, fields of bas, cca, rpi union match on the + request */ + PRINTM(MINFO, "Meas: Req: chan: %u\n", + pmeas_req->req.basic.channel); + PRINTM(MINFO, "Meas: Req: strt: %llu\n", + wlan_le64_to_cpu(pmeas_req->req.basic.start_time)); + PRINTM(MINFO, "Meas: Req: dur: %u\n", + wlan_le16_to_cpu(pmeas_req->req.basic.duration)); + break; + default: + PRINTM(MINFO, "Meas: Req: \n"); + break; + } + + PRINTM(MINFO, "Meas: Req: ------------------------------\n"); + LEAVE(); +} + +/** + * @brief Debug print display of the input measurement report + * + * @param pmeas_rpt Pointer to measurement report to display + * + * @return N/A + */ +static + void +wlan_meas_dump_meas_rpt(const HostCmd_DS_MEASUREMENT_REPORT *pmeas_rpt) +{ + ENTER(); + + PRINTM(MINFO, "Meas: Rpt: ------------------------------\n"); + PRINTM(MINFO, "Meas: Rpt: mac_addr: " MACSTR "\n", + MAC2STR(pmeas_rpt->mac_addr)); + + PRINTM(MINFO, "Meas: Rpt: dlgTkn: %d\n", pmeas_rpt->dialog_token); + + PRINTM(MINFO, "Meas: Rpt: rptMode: (%x): Rfs[%c] ICp[%c] Lt[%c]\n", + *(t_u8 *)&pmeas_rpt->rpt_mode, + pmeas_rpt->rpt_mode.refused ? 'X' : ' ', + pmeas_rpt->rpt_mode.incapable ? 'X' : ' ', + pmeas_rpt->rpt_mode.late ? 'X' : ' '); +#ifdef DEBUG_LEVEL2 + PRINTM(MINFO, "Meas: Rpt: measTyp: %s\n", + wlan_meas_get_meas_type_str(pmeas_rpt->meas_type)); +#endif + + switch (pmeas_rpt->meas_type) { + case WLAN_MEAS_BASIC: + PRINTM(MINFO, "Meas: Rpt: chan: %u\n", + pmeas_rpt->rpt.basic.channel); + PRINTM(MINFO, "Meas: Rpt: strt: %llu\n", + wlan_le64_to_cpu(pmeas_rpt->rpt.basic.start_time)); + PRINTM(MINFO, "Meas: Rpt: dur: %u\n", + wlan_le16_to_cpu(pmeas_rpt->rpt.basic.duration)); + PRINTM(MINFO, "Meas: Rpt: bas: (%x): unmsd[%c], radar[%c]\n", + *(t_u8 *)&(pmeas_rpt->rpt.basic.map), + pmeas_rpt->rpt.basic.map.unmeasured ? 'X' : ' ', + pmeas_rpt->rpt.basic.map.radar ? 'X' : ' '); + PRINTM(MINFO, "Meas: Rpt: bas: unidSig[%c] ofdm[%c] bss[%c]\n", + pmeas_rpt->rpt.basic.map.unidentified_sig ? 'X' : ' ', + pmeas_rpt->rpt.basic.map.ofdm_preamble ? 'X' : ' ', + pmeas_rpt->rpt.basic.map.bss ? 'X' : ' '); + break; + default: + PRINTM(MINFO, "Meas: Rpt: \n"); + break; + } + + PRINTM(MINFO, "Meas: Rpt: ------------------------------\n"); + LEAVE(); +} + +/** + * @brief Retrieve a measurement report from the firmware + * + * Callback from command processing when a measurement report is received + * from the firmware. Perform the following when a report is received: + * + * -# Debug displays the report if compiled with the appropriate flags + * -# If we are pending on a specific measurement report token, and it + * matches the received report's token, store the report and wake up + * any pending threads + * + * @param pmpriv Private driver information structure + * @param resp HostCmd_DS_COMMAND struct returned from the firmware command + * passing a HostCmd_DS_MEASUREMENT_REPORT structure. + * + * @return MLAN_STATUS_SUCCESS + */ +static int +wlan_meas_cmdresp_get_report(mlan_private *pmpriv, + const HostCmd_DS_COMMAND *resp) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + const HostCmd_DS_MEASUREMENT_REPORT *pmeas_rpt = &resp->params.meas_rpt; + + ENTER(); + + PRINTM(MINFO, "Meas: Rpt: %#x-%u, Seq=%u, Ret=%u\n", + resp->command, resp->size, resp->seq_num, resp->result); + + /* Debug displays the measurement report */ + wlan_meas_dump_meas_rpt(pmeas_rpt); + + /* + * Check if we are pending on a measurement report and it matches + * the dialog token of the received report: + */ + if (pmadapter->state_meas.meas_rpt_pend_on + && pmadapter->state_meas.meas_rpt_pend_on == + pmeas_rpt->dialog_token) { + PRINTM(MINFO, "Meas: Rpt: RCV'd Pend on meas #%d\n", + pmadapter->state_meas.meas_rpt_pend_on); + + /* Clear the pending report indicator */ + pmadapter->state_meas.meas_rpt_pend_on = 0; + + /* Copy the received report into the measurement state for + retrieval */ + memcpy(pmadapter, &pmadapter->state_meas.meas_rpt_returned, + pmeas_rpt, + sizeof(pmadapter->state_meas.meas_rpt_returned)); + + /* + * Wake up any threads pending on the wait queue + */ + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_MEAS_REPORT, MNULL); + } + + LEAVE(); + + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Prepare CMD_MEASURMENT_REPORT firmware command + * + * @param pmpriv Private driver information structure + * @param pcmd_ptr Output parameter: Pointer to the command being prepared + * for the firmware + * @param pinfo_buf HostCmd_DS_MEASUREMENT_REQUEST passed as void data block + * + * @return MLAN_STATUS_SUCCESS + */ +static int +wlan_meas_cmd_request(mlan_private *pmpriv, + HostCmd_DS_COMMAND *pcmd_ptr, const void *pinfo_buf) +{ + const HostCmd_DS_MEASUREMENT_REQUEST *pmeas_req = + (HostCmd_DS_MEASUREMENT_REQUEST *)pinfo_buf; + + ENTER(); + + pcmd_ptr->command = HostCmd_CMD_MEASUREMENT_REQUEST; + pcmd_ptr->size = sizeof(HostCmd_DS_MEASUREMENT_REQUEST) + S_DS_GEN; + + memcpy(pmpriv->adapter, &pcmd_ptr->params.meas_req, pmeas_req, + sizeof(pcmd_ptr->params.meas_req)); + + PRINTM(MINFO, "Meas: Req: %#x-%u, Seq=%u, Ret=%u\n", + pcmd_ptr->command, pcmd_ptr->size, pcmd_ptr->seq_num, + pcmd_ptr->result); + + wlan_meas_dump_meas_req(pmeas_req); + + LEAVE(); + + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Retrieve a measurement report from the firmware + * + * The firmware will send a EVENT_MEAS_REPORT_RDY event when it + * completes or receives a measurement report. The event response + * handler will then start a HostCmd_CMD_MEASUREMENT_REPORT firmware command + * which gets completed for transmission to the firmware in this routine. + * + * @param pmpriv Private driver information structure + * @param pcmd_ptr Output parameter: Pointer to the command being prepared + * for the firmware + * + * @return MLAN_STATUS_SUCCESS + */ +static int +wlan_meas_cmd_get_report(mlan_private *pmpriv, HostCmd_DS_COMMAND *pcmd_ptr) +{ + ENTER(); + + pcmd_ptr->command = HostCmd_CMD_MEASUREMENT_REPORT; + pcmd_ptr->size = sizeof(HostCmd_DS_MEASUREMENT_REPORT) + S_DS_GEN; + + memset(pmpriv->adapter, &pcmd_ptr->params.meas_rpt, 0x00, + sizeof(pcmd_ptr->params.meas_rpt)); + + /* + * Set the meas_rpt.mac_addr to our mac address to get a meas report, + * setting the mac to another STA address instructs the firmware + * to transmit this measurement report frame instead + */ + memcpy(pmpriv->adapter, pcmd_ptr->params.meas_rpt.mac_addr, + pmpriv->curr_addr, sizeof(pcmd_ptr->params.meas_rpt.mac_addr)); + + LEAVE(); + + return MLAN_STATUS_SUCCESS; +} + +/******************************************************** + Global functions +********************************************************/ + +/** + * @brief Send the input measurement request to the firmware. + * + * If the dialog token in the measurement request is set to 0, the function + * will use an local static auto-incremented token in the measurement + * request. This ensures the dialog token is always set. + * + * If wait_for_resp_timeout is set, the function will block its return on + * a timeout or returned measurement report that matches the requests + * dialog token. + * + * @param pmpriv Private driver information structure + * @param pmeas_req Pointer to the measurement request to send + * @param wait_for_resp_timeout Timeout value of the measurement request + * in ms. + * @param pioctl_req Pointer to IOCTL request buffer + * @param pmeas_rpt Output parameter: Pointer for the resulting + * measurement report + * + * @return + * - 0 for success + * - -ETIMEDOUT if the measurement report does not return before + * the timeout expires + * - Error return from wlan_prepare_cmd routine otherwise + */ +int +wlan_meas_util_send_req(mlan_private *pmpriv, + HostCmd_DS_MEASUREMENT_REQUEST *pmeas_req, + t_u32 wait_for_resp_timeout, pmlan_ioctl_req pioctl_req, + HostCmd_DS_MEASUREMENT_REPORT *pmeas_rpt) +{ + static t_u8 auto_dialog_tok; + wlan_meas_state_t *pmeas_state = &pmpriv->adapter->state_meas; + int ret; + + ENTER(); + + /* If dialogTok was set to 0 or not provided, autoset */ + pmeas_req->dialog_token = (pmeas_req->dialog_token ? + pmeas_req->dialog_token : ++auto_dialog_tok); + + /* Check for rollover of the dialog token. Avoid using 0 as a token */ + pmeas_req->dialog_token = (pmeas_req->dialog_token ? + pmeas_req->dialog_token : 1); + + /* + * If the request is to pend waiting for the result, set the dialog token + * of this measurement request in the state structure. The measurement + * report handling routines can then check the incoming measurement + * reports for a match with this dialog token. + */ + if (wait_for_resp_timeout) { + pmeas_state->meas_rpt_pend_on = pmeas_req->dialog_token; + PRINTM(MINFO, "Meas: Req: START Pend on meas #%d\n", + pmeas_req->dialog_token); + } + + /* Send the measurement request to the firmware */ + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_MEASUREMENT_REQUEST, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_req, (void *)pmeas_req); + + LEAVE(); + return ret; +} + +/** + * @brief Prepare the HostCmd_DS_Command structure for a measurement command. + * + * Use the Command field to determine if the command being set up is for + * 11h and call one of the local command handlers accordingly for: + * + * - HostCmd_CMD_MEASUREMENT_REQUEST + * - HostCmd_CMD_MEASUREMENT_REPORT + * + * @param pmpriv Private driver information structure + * @param pcmd_ptr Output parameter: Pointer to the command being prepared + * for the firmware + * @param pinfo_buf Void buffer passthrough with data necessary for a + * specific command type + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + * + */ +int +wlan_meas_cmd_process(mlan_private *pmpriv, + HostCmd_DS_COMMAND *pcmd_ptr, const void *pinfo_buf) +{ + int ret = MLAN_STATUS_SUCCESS; + + ENTER(); + switch (pcmd_ptr->command) { + case HostCmd_CMD_MEASUREMENT_REQUEST: + ret = wlan_meas_cmd_request(pmpriv, pcmd_ptr, pinfo_buf); + break; + case HostCmd_CMD_MEASUREMENT_REPORT: + ret = wlan_meas_cmd_get_report(pmpriv, pcmd_ptr); + break; + default: + ret = MLAN_STATUS_FAILURE; + } + + pcmd_ptr->command = wlan_cpu_to_le16(pcmd_ptr->command); + pcmd_ptr->size = wlan_cpu_to_le16(pcmd_ptr->size); + LEAVE(); + return ret; +} + +/** + * @brief Handle the command response from the firmware for a measurement + * command + * + * Use the Command field to determine if the command response being + * is for meas. Call the local command response handler accordingly for: + * + * - HostCmd_CMD_802_MEASUREMENT_REQUEST + * - HostCmd_CMD_802_MEASUREMENT_REPORT + * + * @param pmpriv Private driver information structure + * @param resp HostCmd_DS_COMMAND struct returned from the firmware command + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +int +wlan_meas_cmdresp_process(mlan_private *pmpriv, const HostCmd_DS_COMMAND *resp) +{ + int ret = MLAN_STATUS_SUCCESS; + + ENTER(); + switch (resp->command) { + case HostCmd_CMD_MEASUREMENT_REQUEST: + PRINTM(MINFO, "Meas: Req Resp: Sz=%u, Seq=%u, Ret=%u\n", + resp->size, resp->seq_num, resp->result); + break; + case HostCmd_CMD_MEASUREMENT_REPORT: + ret = wlan_meas_cmdresp_get_report(pmpriv, resp); + break; + default: + ret = MLAN_STATUS_FAILURE; + } + + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_meas.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_meas.h new file mode 100644 index 00000000..c6470de9 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_meas.h @@ -0,0 +1,55 @@ +/** + * @file mlan_meas.h + * + * @brief Interface for the measurement module implemented in mlan_meas.c + * + * Driver interface functions and type declarations for the measurement module + * implemented in mlan_meas.c + * + * @sa mlan_meas.c + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/************************************************************* +Change Log: + 03/25/2009: initial version +************************************************************/ + +#ifndef _MLAN_MEAS_H_ +#define _MLAN_MEAS_H_ + +#include "mlan_fw.h" + +/* Send a given measurement request to the firmware, report back the result */ +extern int + +wlan_meas_util_send_req(mlan_private *pmpriv, + HostCmd_DS_MEASUREMENT_REQUEST *pmeas_req, + t_u32 wait_for_resp_timeout, pmlan_ioctl_req pioctl_req, + HostCmd_DS_MEASUREMENT_REPORT *pmeas_rpt); + +/* Setup a measurement command before it is sent to the firmware */ +extern int wlan_meas_cmd_process(mlan_private *pmpriv, + HostCmd_DS_COMMAND *pcmd_ptr, + const t_void *pinfo_buf); + +/* Handle a given measurement command response from the firmware */ +extern int wlan_meas_cmdresp_process(mlan_private *pmpriv, + const HostCmd_DS_COMMAND *resp); + +#endif /* _MLAN_MEAS_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_misc.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_misc.c new file mode 100644 index 00000000..9e1c8a8a --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_misc.c @@ -0,0 +1,3645 @@ +/** + * @file mlan_misc.c + * + * @brief This file include miscellaneous functions for MLAN module + * + * Copyright (C) 2009-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/************************************************************* +Change Log: + 05/11/2009: initial version +************************************************************/ +#include "mlan.h" +#ifdef STA_SUPPORT +#include "mlan_join.h" +#endif /* STA_SUPPORT */ +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_wmm.h" +#include "mlan_11n.h" +#include "mlan_11ac.h" +#include "mlan_sdio.h" +#ifdef UAP_SUPPORT +#include "mlan_uap.h" +#endif +/******************************************************** + Local Variables +********************************************************/ + +/******************************************************** + Global Variables +********************************************************/ +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) +extern mlan_operations *mlan_ops[]; +#endif +extern t_u8 ac_to_tid[4][2]; + +/******************************************************** + Local Functions +********************************************************/ + +/** Custom IE auto index and mask */ +#define MLAN_CUSTOM_IE_AUTO_IDX_MASK 0xffff +/** Custom IE mask for delete operation */ +#define MLAN_CUSTOM_IE_DELETE_MASK 0 +/** Custom IE mask for create new index */ +#define MLAN_CUSTOM_IE_NEW_MASK 0x8000 +/** Custom IE header size */ +#define MLAN_CUSTOM_IE_HDR_SIZE (sizeof(custom_ie)-MAX_IE_SIZE) + +/** + * @brief Check if current custom IE index is used on other interfaces. + * + * @param pmpriv A pointer to mlan_private structure + * @param idx index to check for in use + * + * @return MLAN_STATUS_SUCCESS --unused, otherwise used. + */ +static mlan_status +wlan_is_custom_ie_index_unused(IN pmlan_private pmpriv, IN t_u16 idx) +{ + t_u8 i = 0; + pmlan_adapter pmadapter = pmpriv->adapter; + pmlan_private priv; + ENTER(); + + for (i = 0; i < pmadapter->priv_num; i++) { + priv = pmadapter->priv[i]; + /* Check for other interfaces only */ + if (priv && priv->bss_index != pmpriv->bss_index) { + + if (priv->mgmt_ie[idx].mgmt_subtype_mask && + priv->mgmt_ie[idx].ie_length) { + /* used entry found */ + LEAVE(); + return MLAN_STATUS_FAILURE; + } + } + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Get the custom IE index + * + * @param pmpriv A pointer to mlan_private structure + * @param pioctl_req A pointer to ioctl request buffer + * @param mask mask value for which the index to be returned + * @param ie_data a pointer to custom_ie structure + * @param idx will hold the computed index + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_custom_ioctl_get_autoidx(IN pmlan_private pmpriv, + IN pmlan_ioctl_req pioctl_req, + IN t_u16 mask, + IN custom_ie *ie_data, OUT t_u16 *idx) +{ + t_u16 index = 0, insert = MFALSE; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + /* Determine the index where the IE needs to be inserted */ + while (!insert) { + while (index < pmpriv->adapter->max_mgmt_ie_index) { + if (pmpriv->mgmt_ie[index].mgmt_subtype_mask == + MLAN_CUSTOM_IE_AUTO_IDX_MASK) { + index++; + continue; + } + if (pmpriv->mgmt_ie[index].mgmt_subtype_mask == mask) { + /* Duplicate IE should be avoided */ + if (pmpriv->mgmt_ie[index].ie_length) { + if (!memcmp + (pmpriv->adapter, + pmpriv->mgmt_ie[index].ie_buffer, + ie_data->ie_buffer, + pmpriv->mgmt_ie[index]. + ie_length)) { + PRINTM(MINFO, + "IE with the same mask exists at index %d mask=0x%x\n", + index, mask); + *idx = MLAN_CUSTOM_IE_AUTO_IDX_MASK; + goto done; + } + } + /* Check if enough space is available */ + if (pmpriv->mgmt_ie[index].ie_length + + ie_data->ie_length > MAX_IE_SIZE) { + index++; + continue; + } + insert = MTRUE; + break; + } + index++; + } + if (!insert) { + for (index = 0; + index < pmpriv->adapter->max_mgmt_ie_index; + index++) { + if (pmpriv->mgmt_ie[index].ie_length == 0) { + /* + * Check if this index is in use + * by other interface If yes, + * move ahead to next index + */ + if (MLAN_STATUS_SUCCESS == + wlan_is_custom_ie_index_unused + (pmpriv, index)) { + insert = MTRUE; + break; + } else { + PRINTM(MINFO, + "Skipping IE index %d in use.\n", + index); + } + } + } + } + if (index == pmpriv->adapter->max_mgmt_ie_index && !insert) { + PRINTM(MERROR, "Failed to Set the IE buffer\n"); + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_IOCTL_FAIL; + ret = MLAN_STATUS_FAILURE; + goto done; + } + } + + *idx = index; +done: + LEAVE(); + return ret; +} + +/** + * @brief Delete custom IE + * + * @param pmpriv A pointer to mlan_private structure + * @param pioctl_req A pointer to ioctl request buffer + * @param ie_data a pointer to custom_ie structure + * @param idx index supplied + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ + +static mlan_status +wlan_custom_ioctl_auto_delete(IN pmlan_private pmpriv, + IN pmlan_ioctl_req pioctl_req, + IN custom_ie *ie_data, IN t_u16 idx) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_adapter pmadapter = pmpriv->adapter; + t_u16 index = 0, insert = MFALSE, del_len; + t_u8 del_ie[MAX_IE_SIZE], ie[MAX_IE_SIZE]; + t_s32 cnt, tmp_len = 0; + t_u8 *tmp_ie; + + ENTER(); + memset(pmpriv->adapter, del_ie, 0, MAX_IE_SIZE); + memcpy(pmpriv->adapter, del_ie, ie_data->ie_buffer, + MIN(MAX_IE_SIZE, ie_data->ie_length)); + del_len = MIN(MAX_IE_SIZE, ie_data->ie_length); + + if (MLAN_CUSTOM_IE_AUTO_IDX_MASK == idx) + ie_data->ie_index = 0; + + for (index = 0; index < pmadapter->max_mgmt_ie_index; index++) { + if (MLAN_CUSTOM_IE_AUTO_IDX_MASK != idx) + index = idx; + tmp_ie = pmpriv->mgmt_ie[index].ie_buffer; + tmp_len = pmpriv->mgmt_ie[index].ie_length; + cnt = 0; + while (tmp_len) { + if (!memcmp(pmpriv->adapter, tmp_ie, del_ie, del_len)) { + memcpy(pmpriv->adapter, ie, + pmpriv->mgmt_ie[index].ie_buffer, cnt); + if (pmpriv->mgmt_ie[index].ie_length > + (cnt + del_len)) + memcpy(pmpriv->adapter, &ie[cnt], + &pmpriv->mgmt_ie[index]. + ie_buffer[cnt + del_len], + (pmpriv->mgmt_ie[index]. + ie_length - (cnt + del_len))); + memset(pmpriv->adapter, + &pmpriv->mgmt_ie[index].ie_buffer, 0, + sizeof(pmpriv->mgmt_ie[index]. + ie_buffer)); + memcpy(pmpriv->adapter, + &pmpriv->mgmt_ie[index].ie_buffer, ie, + pmpriv->mgmt_ie[index].ie_length - + del_len); + pmpriv->mgmt_ie[index].ie_length -= del_len; + if (MLAN_CUSTOM_IE_AUTO_IDX_MASK == idx) + /* set a bit to indicate caller about + update */ + ie_data->ie_index |= + (((t_u16)1) << index); + insert = MTRUE; + tmp_ie = pmpriv->mgmt_ie[index].ie_buffer; + tmp_len = pmpriv->mgmt_ie[index].ie_length; + cnt = 0; + continue; + } + tmp_ie++; + tmp_len--; + cnt++; + } + if (MLAN_CUSTOM_IE_AUTO_IDX_MASK != idx) + break; + } + if (index == pmadapter->max_mgmt_ie_index && !insert) { + PRINTM(MERROR, "Failed to Clear IE buffer\n"); + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_IOCTL_FAIL; + ret = MLAN_STATUS_FAILURE; + } + LEAVE(); + return ret; +} + +/******************************************************** + Global Functions +********************************************************/ + +/** + * @brief send host cmd + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_misc_ioctl_host_cmd(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_misc_cfg *misc = MNULL; + + ENTER(); + + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + 0, + 0, + 0, + (t_void *)pioctl_req, + (t_void *)&misc->param.hostcmd); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Send function init/shutdown command to firmware + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_misc_ioctl_init_shutdown(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc_cfg = MNULL; + t_u16 cmd; + + ENTER(); + + misc_cfg = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + if (misc_cfg->param.func_init_shutdown == MLAN_FUNC_INIT) + cmd = HostCmd_CMD_FUNC_INIT; + else if (misc_cfg->param.func_init_shutdown == MLAN_FUNC_SHUTDOWN) + cmd = HostCmd_CMD_FUNC_SHUTDOWN; + else { + PRINTM(MERROR, "Unsupported parameter\n"); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + + /* Send command to firmware */ + ret = wlan_prepare_cmd(pmpriv, + cmd, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_req, MNULL); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + +exit: + LEAVE(); + return ret; +} + +/** + * @brief Get debug information + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +mlan_status +wlan_get_info_debug_info(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_get_info *info; + mlan_debug_info *debug_info = MNULL; + t_u32 i; + t_u8 *ptid; + + ENTER(); + + info = (mlan_ds_get_info *)pioctl_req->pbuf; + debug_info = (mlan_debug_info *)info->param.debug_info; + + if (pioctl_req->action == MLAN_ACT_GET) { + ptid = ac_to_tid[WMM_AC_BK]; + debug_info->wmm_ac_bk = + pmpriv->wmm.packets_out[ptid[0]] + + pmpriv->wmm.packets_out[ptid[1]]; + ptid = ac_to_tid[WMM_AC_BE]; + debug_info->wmm_ac_be = + pmpriv->wmm.packets_out[ptid[0]] + + pmpriv->wmm.packets_out[ptid[1]]; + ptid = ac_to_tid[WMM_AC_VI]; + debug_info->wmm_ac_vi = + pmpriv->wmm.packets_out[ptid[0]] + + pmpriv->wmm.packets_out[ptid[1]]; + ptid = ac_to_tid[WMM_AC_VO]; + debug_info->wmm_ac_vo = + pmpriv->wmm.packets_out[ptid[0]] + + pmpriv->wmm.packets_out[ptid[1]]; + debug_info->max_tx_buf_size = (t_u32)pmadapter->max_tx_buf_size; + debug_info->tx_buf_size = (t_u32)pmadapter->tx_buf_size; + debug_info->curr_tx_buf_size = + (t_u32)pmadapter->curr_tx_buf_size; + debug_info->rx_tbl_num = + wlan_get_rxreorder_tbl(pmpriv, debug_info->rx_tbl); + debug_info->tx_tbl_num = + wlan_get_txbastream_tbl(pmpriv, debug_info->tx_tbl); + debug_info->ralist_num = + wlan_get_ralist_info(pmpriv, debug_info->ralist); + debug_info->tdls_peer_num = + wlan_get_tdls_list(pmpriv, debug_info->tdls_peer_list); + debug_info->ps_mode = pmadapter->ps_mode; + debug_info->ps_state = pmadapter->ps_state; +#ifdef STA_SUPPORT + debug_info->is_deep_sleep = pmadapter->is_deep_sleep; +#endif /* STA_SUPPORT */ + debug_info->pm_wakeup_card_req = pmadapter->pm_wakeup_card_req; + debug_info->pm_wakeup_fw_try = pmadapter->pm_wakeup_fw_try; + debug_info->pm_wakeup_in_secs = pmadapter->pm_wakeup_in_secs; + debug_info->is_hs_configured = pmadapter->is_hs_configured; + debug_info->hs_activated = pmadapter->hs_activated; + debug_info->pps_uapsd_mode = pmadapter->pps_uapsd_mode; + debug_info->sleep_pd = pmadapter->sleep_period.period; + debug_info->qos_cfg = pmpriv->wmm_qosinfo; + debug_info->tx_lock_flag = pmadapter->tx_lock_flag; + debug_info->port_open = pmpriv->port_open; + debug_info->bypass_pkt_count = pmadapter->bypass_pkt_count; + debug_info->scan_processing = pmadapter->scan_processing; + debug_info->num_cmd_host_to_card_failure + = pmadapter->dbg.num_cmd_host_to_card_failure; + debug_info->num_cmd_sleep_cfm_host_to_card_failure + = pmadapter->dbg.num_cmd_sleep_cfm_host_to_card_failure; + debug_info->num_tx_host_to_card_failure + = pmadapter->dbg.num_tx_host_to_card_failure; + debug_info->num_cmdevt_card_to_host_failure + = pmadapter->dbg.num_cmdevt_card_to_host_failure; + debug_info->num_rx_card_to_host_failure + = pmadapter->dbg.num_rx_card_to_host_failure; + debug_info->num_int_read_failure = + pmadapter->dbg.num_int_read_failure; + debug_info->last_int_status = pmadapter->dbg.last_int_status; + debug_info->num_event_deauth = pmadapter->dbg.num_event_deauth; + debug_info->num_event_disassoc = + pmadapter->dbg.num_event_disassoc; + debug_info->num_event_link_lost = + pmadapter->dbg.num_event_link_lost; + debug_info->num_cmd_deauth = pmadapter->dbg.num_cmd_deauth; + debug_info->num_cmd_assoc_success = + pmadapter->dbg.num_cmd_assoc_success; + debug_info->num_cmd_assoc_failure = + pmadapter->dbg.num_cmd_assoc_failure; + debug_info->num_tx_timeout = pmadapter->dbg.num_tx_timeout; + debug_info->num_cmd_timeout = pmadapter->num_cmd_timeout; + debug_info->dbg_num_cmd_timeout = + pmadapter->dbg.num_cmd_timeout; + debug_info->timeout_cmd_id = pmadapter->dbg.timeout_cmd_id; + debug_info->timeout_cmd_act = pmadapter->dbg.timeout_cmd_act; + memcpy(pmadapter, debug_info->last_cmd_id, + pmadapter->dbg.last_cmd_id, + sizeof(pmadapter->dbg.last_cmd_id)); + memcpy(pmadapter, debug_info->last_cmd_act, + pmadapter->dbg.last_cmd_act, + sizeof(pmadapter->dbg.last_cmd_act)); + debug_info->last_cmd_index = pmadapter->dbg.last_cmd_index; + memcpy(pmadapter, debug_info->last_cmd_resp_id, + pmadapter->dbg.last_cmd_resp_id, + sizeof(pmadapter->dbg.last_cmd_resp_id)); + debug_info->last_cmd_resp_index = + pmadapter->dbg.last_cmd_resp_index; + memcpy(pmadapter, debug_info->last_event, + pmadapter->dbg.last_event, + sizeof(pmadapter->dbg.last_event)); + debug_info->last_event_index = pmadapter->dbg.last_event_index; + debug_info->num_no_cmd_node = pmadapter->dbg.num_no_cmd_node; + debug_info->pending_cmd = + (pmadapter->curr_cmd) ? pmadapter->dbg. + last_cmd_id[pmadapter->dbg.last_cmd_index] : 0; + debug_info->dnld_cmd_in_secs = pmadapter->dnld_cmd_in_secs; + debug_info->mp_rd_bitmap = pmadapter->mp_rd_bitmap; + debug_info->mp_wr_bitmap = pmadapter->mp_wr_bitmap; + debug_info->curr_rd_port = pmadapter->curr_rd_port; + debug_info->curr_wr_port = pmadapter->curr_wr_port; + debug_info->mp_invalid_update = pmadapter->mp_invalid_update; + debug_info->num_of_irq = pmadapter->num_of_irq; + memcpy(pmadapter, debug_info->mp_update, pmadapter->mp_update, + sizeof(pmadapter->mp_update)); +#ifdef SDIO_MULTI_PORT_TX_AGGR + memcpy(pmadapter, debug_info->mpa_tx_count, + pmadapter->mpa_tx_count, + sizeof(pmadapter->mpa_tx_count)); + debug_info->mpa_sent_last_pkt = pmadapter->mpa_sent_last_pkt; + debug_info->mpa_sent_no_ports = pmadapter->mpa_sent_no_ports; + debug_info->last_recv_wr_bitmap = + pmadapter->last_recv_wr_bitmap; + debug_info->last_mp_index = pmadapter->last_mp_index; + memcpy(pmadapter, debug_info->last_mp_wr_bitmap, + pmadapter->last_mp_wr_bitmap, + sizeof(pmadapter->last_mp_wr_bitmap)); + memcpy(pmadapter, debug_info->last_mp_wr_ports, + pmadapter->last_mp_wr_ports, + sizeof(pmadapter->last_mp_wr_ports)); + memcpy(pmadapter, debug_info->last_mp_wr_len, + pmadapter->last_mp_wr_len, + sizeof(pmadapter->last_mp_wr_len)); + memcpy(pmadapter, debug_info->last_mp_wr_info, + pmadapter->last_mp_wr_info, + sizeof(pmadapter->last_mp_wr_info)); + memcpy(pmadapter, debug_info->last_curr_wr_port, + pmadapter->last_curr_wr_port, + sizeof(pmadapter->last_curr_wr_port)); + debug_info->mpa_buf = pmadapter->mpa_buf; + debug_info->mpa_buf_size = pmadapter->mpa_buf_size; +#endif /* SDIO_MULTI_PORT_TX_AGGR */ +#ifdef SDIO_MULTI_PORT_RX_AGGR + memcpy(pmadapter, debug_info->mpa_rx_count, + pmadapter->mpa_rx_count, + sizeof(pmadapter->mpa_rx_count)); +#endif +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + debug_info->mp_aggr_pkt_limit = + pmadapter->psdio_device->mp_aggr_pkt_limit; +#endif + debug_info->data_sent = pmadapter->data_sent; + debug_info->cmd_sent = pmadapter->cmd_sent; + debug_info->cmd_resp_received = pmadapter->cmd_resp_received; + debug_info->tx_pkts_queued = + util_scalar_read(pmadapter->pmoal_handle, + &pmpriv->wmm.tx_pkts_queued, MNULL, + MNULL); +#ifdef UAP_SUPPORT + debug_info->num_bridge_pkts = + util_scalar_read(pmadapter->pmoal_handle, + &pmadapter->pending_bridge_pkts, + pmadapter->callbacks.moal_spin_lock, + pmadapter->callbacks.moal_spin_unlock); + debug_info->num_drop_pkts = pmpriv->num_drop_pkts; +#endif + debug_info->mlan_processing = pmadapter->mlan_processing; + debug_info->mlan_rx_processing = pmadapter->mlan_rx_processing; + debug_info->rx_pkts_queued = pmadapter->rx_pkts_queued; + debug_info->mlan_adapter = pmadapter; + debug_info->mlan_adapter_size = sizeof(mlan_adapter); + debug_info->mlan_priv_num = pmadapter->priv_num; + for (i = 0; i < pmadapter->priv_num; i++) { + debug_info->mlan_priv[i] = pmadapter->priv[i]; + debug_info->mlan_priv_size[i] = sizeof(mlan_private); + } + } + + pioctl_req->data_read_written = + sizeof(mlan_debug_info) + MLAN_SUB_COMMAND_SIZE; + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get the MAC control configuration. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +wlan_misc_ioctl_mac_control(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 cmd_action = 0; + + ENTER(); + + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_GET) { + misc->param.mac_ctrl = pmpriv->curr_pkt_filter; + } else { + pmpriv->curr_pkt_filter = misc->param.mac_ctrl; + cmd_action = HostCmd_ACT_GEN_SET; + + /* Send command to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_MAC_CONTROL, + cmd_action, 0, + (t_void *)pioctl_req, + &misc->param.mac_ctrl); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + } + + LEAVE(); + return ret; +} + +/** + * @brief This function wakes up the card. + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_pm_wakeup_card(IN pmlan_adapter pmadapter) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u32 age_ts_usec; + pmlan_callbacks pcb = &pmadapter->callbacks; + + ENTER(); + PRINTM(MEVENT, "Wakeup device...\n"); + pmadapter->callbacks.moal_get_system_time(pmadapter->pmoal_handle, + &pmadapter->pm_wakeup_in_secs, + &age_ts_usec); + + ret = pcb->moal_write_reg(pmadapter->pmoal_handle, + HOST_TO_CARD_EVENT_REG, HOST_POWER_UP); + LEAVE(); + return ret; +} + +/** + * @brief This function resets the PM setting of the card. + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_pm_reset_card(IN pmlan_adapter pmadapter) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_callbacks pcb = &pmadapter->callbacks; + + ENTER(); + + ret = pcb->moal_write_reg(pmadapter->pmoal_handle, + HOST_TO_CARD_EVENT_REG, 0); + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get HS configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_pm_ioctl_hscfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_pm_cfg *pm = MNULL; + mlan_status status = MLAN_STATUS_SUCCESS; + t_u32 prev_cond = 0; + + ENTER(); + + pm = (mlan_ds_pm_cfg *)pioctl_req->pbuf; + + switch (pioctl_req->action) { + case MLAN_ACT_SET: +#ifdef STA_SUPPORT + if (pmadapter->pps_uapsd_mode) { + PRINTM(MINFO, + "Host Sleep IOCTL is blocked in UAPSD/PPS mode\n"); + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } +#endif /* STA_SUPPORT */ + if (pm->param.hs_cfg.is_invoke_hostcmd == MTRUE) { + if (pm->param.hs_cfg.conditions == + HOST_SLEEP_CFG_CANCEL) { + if (pmadapter->is_hs_configured == MFALSE) { + /* Already cancelled */ + break; + } + /* Save previous condition */ + prev_cond = pmadapter->hs_cfg.conditions; + pmadapter->hs_cfg.conditions = + pm->param.hs_cfg.conditions; + } else if (pmadapter->hs_cfg.conditions == + HOST_SLEEP_CFG_CANCEL) { + /* Return failure if no parameters for HS + enable */ + pioctl_req->status_code = + MLAN_ERROR_INVALID_PARAMETER; + status = MLAN_STATUS_FAILURE; + break; + } + status = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_HS_CFG_ENH, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_req, + (t_void *)(&pmadapter-> + hs_cfg)); + if (status == MLAN_STATUS_SUCCESS) + status = MLAN_STATUS_PENDING; + if (pm->param.hs_cfg.conditions == + HOST_SLEEP_CFG_CANCEL) { + /* Restore previous condition */ + pmadapter->hs_cfg.conditions = prev_cond; + } + } else { + pmadapter->hs_cfg.conditions = + pm->param.hs_cfg.conditions; + pmadapter->hs_cfg.gpio = (t_u8)pm->param.hs_cfg.gpio; + pmadapter->hs_cfg.gap = (t_u8)pm->param.hs_cfg.gap; + } + break; + case MLAN_ACT_GET: + pm->param.hs_cfg.conditions = pmadapter->hs_cfg.conditions; + pm->param.hs_cfg.gpio = pmadapter->hs_cfg.gpio; + pm->param.hs_cfg.gap = pmadapter->hs_cfg.gap; + break; + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + + LEAVE(); + return status; +} + +/** + * @brief This function allocates a mlan_buffer. + * + * @param pmadapter Pointer to mlan_adapter + * @param data_len Data length + * @param head_room head_room reserved in mlan_buffer + * @param malloc_flag flag to user moal_malloc + * @return mlan_buffer pointer or MNULL + */ +pmlan_buffer +wlan_alloc_mlan_buffer(mlan_adapter *pmadapter, t_u32 data_len, t_u32 head_room, + t_u32 malloc_flag) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_buffer pmbuf = MNULL; + t_u32 buf_size = 0; + t_u8 *tmp_buf = MNULL; + pmlan_callbacks pcb = &pmadapter->callbacks; + + ENTER(); + + /* make sure that the data length is at least SDIO block size */ + data_len = + (data_len + MLAN_SDIO_BLOCK_SIZE - + 1) / MLAN_SDIO_BLOCK_SIZE * MLAN_SDIO_BLOCK_SIZE; + + /* head_room is not implemented for malloc mlan buffer */ + + switch (malloc_flag) { + case MOAL_MALLOC_BUFFER: + buf_size = sizeof(mlan_buffer) + data_len + DMA_ALIGNMENT; + ret = pcb->moal_malloc(pmadapter->pmoal_handle, buf_size, + MLAN_MEM_DEF | MLAN_MEM_DMA, + (t_u8 **)&pmbuf); + if ((ret != MLAN_STATUS_SUCCESS) || !pmbuf) { + pmbuf = MNULL; + goto exit; + } + memset(pmadapter, pmbuf, 0, sizeof(mlan_buffer)); + + pmbuf->pdesc = MNULL; + /* Align address */ + pmbuf->pbuf = + (t_u8 *)ALIGN_ADDR((t_u8 *)pmbuf + sizeof(mlan_buffer), + DMA_ALIGNMENT); + pmbuf->data_offset = 0; + pmbuf->data_len = data_len; + pmbuf->flags |= MLAN_BUF_FLAG_MALLOC_BUF; + break; + + case MOAL_ALLOC_MLAN_BUFFER: + /* use moal_alloc_mlan_buffer, head_room supported */ + ret = pcb->moal_alloc_mlan_buffer(pmadapter->pmoal_handle, + data_len + DMA_ALIGNMENT + + head_room, &pmbuf); + if ((ret != MLAN_STATUS_SUCCESS) || !pmbuf) { + PRINTM(MERROR, "Failed to allocate 'mlan_buffer'\n"); + goto exit; + } + pmbuf->data_offset = head_room; + tmp_buf = + (t_u8 *)ALIGN_ADDR(pmbuf->pbuf + pmbuf->data_offset, + DMA_ALIGNMENT); + pmbuf->data_offset += + (t_u32)(tmp_buf - (pmbuf->pbuf + pmbuf->data_offset)); + pmbuf->data_len = data_len; + pmbuf->flags = 0; + break; + } + +exit: + LEAVE(); + return pmbuf; +} + +/** + * @brief This function frees a mlan_buffer. + * + * @param pmadapter Pointer to mlan_adapter + * @param pmbuf Pointer to mlan_buffer + * + * @return N/A + */ +t_void +wlan_free_mlan_buffer(mlan_adapter *pmadapter, pmlan_buffer pmbuf) +{ + pmlan_callbacks pcb = &pmadapter->callbacks; + ENTER(); + + if (pcb && pmbuf) { + if (pmbuf->flags & MLAN_BUF_FLAG_BRIDGE_BUF) + util_scalar_decrement(pmadapter->pmoal_handle, + &pmadapter->pending_bridge_pkts, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + if (pmbuf->flags & MLAN_BUF_FLAG_MALLOC_BUF) + pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)pmbuf); + else + pcb->moal_free_mlan_buffer(pmadapter->pmoal_handle, + pmbuf); + } + + LEAVE(); + return; +} + +/** + * @brief Delay function implementation + * + * @param pmadapter A pointer to mlan_adapter structure + * @param delay Delay value + * @param u Units of delay (sec, msec or usec) + * + * @return N/A + */ +t_void +wlan_delay_func(mlan_adapter *pmadapter, t_u32 delay, t_delay_unit u) +{ + t_u32 now_tv_sec, now_tv_usec; + t_u32 upto_tv_sec, upto_tv_usec; + pmlan_callbacks pcb = &pmadapter->callbacks; + + ENTER(); + + if (pcb->moal_udelay) { + if (u == SEC) + delay *= 1000000; + else if (u == MSEC) + delay *= 1000; + pcb->moal_udelay(pmadapter->pmoal_handle, delay); + } else { + + pcb->moal_get_system_time(pmadapter->pmoal_handle, &upto_tv_sec, + &upto_tv_usec); + + switch (u) { + case SEC: + upto_tv_sec += delay; + break; + case MSEC: + delay *= 1000; + case USEC: + upto_tv_sec += (delay / 1000000); + upto_tv_usec += (delay % 1000000); + break; + } + + do { + pcb->moal_get_system_time(pmadapter->pmoal_handle, + &now_tv_sec, &now_tv_usec); + if (now_tv_sec > upto_tv_sec) { + LEAVE(); + return; + } + + if ((now_tv_sec == upto_tv_sec) && + (now_tv_usec >= upto_tv_usec)) { + LEAVE(); + return; + } + } while (MTRUE); + } + + LEAVE(); + return; +} + +/** + * @brief Send coalescing status command to firmware + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_misc_ioctl_coalescing_status(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc = MNULL; + t_u16 cmd_action = 0; + + ENTER(); + + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_IBSS_COALESCING_STATUS, + cmd_action, + 0, + (t_void *)pioctl_req, + &misc->param.coalescing_status); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief BSS remove + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, MLAN_STATUS_FAILURE + */ +mlan_status +wlan_bss_ioctl_bss_remove(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + ENTER(); + wlan_cancel_bss_pending_cmd(pmadapter, pioctl_req->bss_index); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) +/** + * @brief Set/Get BSS role + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, MLAN_STATUS_FAILURE + */ +mlan_status +wlan_bss_ioctl_bss_role(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_bss *bss = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + HostCmd_DS_VERSION_EXT dummy; +#if defined(WIFI_DIRECT_SUPPORT) + t_u8 bss_mode; +#endif + t_u8 i, global_band = 0; + int j; + + ENTER(); + + bss = (mlan_ds_bss *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) { + bss->param.bss_role = GET_BSS_ROLE(pmpriv); + } else { + if (GET_BSS_ROLE(pmpriv) == bss->param.bss_role) { + PRINTM(MIOCTL, "BSS ie already in the desired role!\n"); + goto done; + } + mlan_block_main_process(pmadapter, MTRUE); + mlan_block_rx_process(pmadapter, MTRUE); + /** Switch BSS role */ + wlan_free_priv(pmpriv); + + pmpriv->bss_role = bss->param.bss_role; + if (pmpriv->bss_type == MLAN_BSS_TYPE_UAP) + pmpriv->bss_type = MLAN_BSS_TYPE_STA; + else if (pmpriv->bss_type == MLAN_BSS_TYPE_STA) + pmpriv->bss_type = MLAN_BSS_TYPE_UAP; + + /* Initialize private structures */ + wlan_init_priv(pmpriv); + /* after initialize private structures, 11n and 11ac dev cap + params would be reset to 0. and following init_cmd does not + call get_hw_spec command for 2nd argu was false. so we + should udapte 11n and 11ac dev cap params by hw value */ + wlan_update_11n_cap(pmpriv); + wlan_update_11ac_cap(pmpriv); + mlan_block_main_process(pmadapter, MFALSE); + mlan_block_rx_process(pmadapter, MFALSE); + /* Initialize function table */ + for (j = 0; mlan_ops[j]; j++) { + if (mlan_ops[j]->bss_role == GET_BSS_ROLE(pmpriv)) { + memcpy(pmadapter, &pmpriv->ops, mlan_ops[j], + sizeof(mlan_operations)); + } + } + + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i] && + GET_BSS_ROLE(pmadapter->priv[i]) == + MLAN_BSS_ROLE_STA) + global_band |= pmadapter->priv[i]->config_bands; + } + + if (global_band != pmadapter->config_bands) { + if (wlan_set_regiontable + (pmpriv, (t_u8)pmadapter->region_code, + global_band | pmadapter->adhoc_start_band)) { + pioctl_req->status_code = MLAN_ERROR_IOCTL_FAIL; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + if (wlan_11d_set_universaltable + (pmpriv, + global_band | pmadapter->adhoc_start_band)) { + pioctl_req->status_code = MLAN_ERROR_IOCTL_FAIL; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + pmadapter->config_bands = global_band; + } + + /* Issue commands to initialize firmware */ +#if defined(WIFI_DIRECT_SUPPORT) + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_STA) + bss_mode = BSS_MODE_WIFIDIRECT_CLIENT; + else + bss_mode = BSS_MODE_WIFIDIRECT_GO; + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_SET_BSS_MODE, + HostCmd_ACT_GEN_SET, 0, MNULL, + &bss_mode); + if (ret) + goto done; +#endif + ret = pmpriv->ops.init_cmd(pmpriv, MFALSE); + if (ret == MLAN_STATUS_FAILURE) + goto done; + + /* Issue dummy Get command to complete the ioctl */ + memset(pmadapter, &dummy, 0, sizeof(HostCmd_DS_VERSION_EXT)); + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_VERSION_EXT, + HostCmd_ACT_GEN_GET, 0, + (t_void *)pioctl_req, (t_void *)&dummy); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + } + +done: + LEAVE(); + return ret; +} +#endif + +/** + * @brief Set the custom IE + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * @param send_ioctl Flag to indicate if ioctl should be sent with cmd + * (MTRUE if from moal/user, MFALSE if internal) + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_misc_ioctl_custom_ie_list(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req, + IN t_bool send_ioctl) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + custom_ie *ie_data = MNULL; + t_u16 cmd_action = 0, index, mask, i, len, app_data_len; + t_s32 ioctl_len; + t_u8 *tmp_ie; + + ENTER(); + + if ((misc->param.cust_ie.len == 0) || + (misc->param.cust_ie.len == sizeof(t_u16))) { + pioctl_req->action = MLAN_ACT_GET; + /* Get the IE */ + cmd_action = HostCmd_ACT_GEN_GET; + } else { + /* ioctl_len : ioctl length from application, start with + misc->param.cust_ie.len and reach upto 0 */ + ioctl_len = misc->param.cust_ie.len; + + /* app_data_len : length from application, start with 0 and + reach upto ioctl_len */ + app_data_len = sizeof(MrvlIEtypesHeader_t); + misc->param.cust_ie.len = 0; + + while (ioctl_len > 0) { + ie_data = (custom_ie *)(((t_u8 *)&misc->param.cust_ie) + + app_data_len); + ioctl_len -= + (ie_data->ie_length + MLAN_CUSTOM_IE_HDR_SIZE); + app_data_len += + (ie_data->ie_length + MLAN_CUSTOM_IE_HDR_SIZE); + + index = ie_data->ie_index; + mask = ie_data->mgmt_subtype_mask; + + /* Need to be Autohandled */ + if (MLAN_CUSTOM_IE_AUTO_IDX_MASK == index) { + /* Automatic Deletion */ + if (mask == MLAN_CUSTOM_IE_DELETE_MASK) { + ret = wlan_custom_ioctl_auto_delete + (pmpriv, pioctl_req, ie_data, + index); + /* if IE to delete is not found, return + error */ + if (ret == MLAN_STATUS_FAILURE) + goto done; + index = ie_data->ie_index; + memset(pmadapter, ie_data, 0, + sizeof(custom_ie) * + MAX_MGMT_IE_INDEX_TO_FW); + len = 0; + for (i = 0; + i < pmadapter->max_mgmt_ie_index; + i++) { + /* Check if index is updated + before sending to FW */ + if (index & ((t_u16)1) << i) { + memcpy(pmadapter, + (t_u8 *)ie_data + + len, &i, + sizeof(ie_data-> + ie_index)); + len += sizeof(ie_data-> + ie_index); + memcpy(pmadapter, + (t_u8 *)ie_data + + len, + &pmpriv-> + mgmt_ie[i]. + mgmt_subtype_mask, + sizeof(ie_data-> + mgmt_subtype_mask)); + len += sizeof(ie_data-> + mgmt_subtype_mask); + memcpy(pmadapter, + (t_u8 *)ie_data + + len, + &pmpriv-> + mgmt_ie[i]. + ie_length, + sizeof(ie_data-> + ie_length)); + len += sizeof(ie_data-> + ie_length); + if (pmpriv->mgmt_ie[i]. + ie_length) { + memcpy(pmadapter, (t_u8 *)ie_data + len, &pmpriv->mgmt_ie[i].ie_buffer, pmpriv->mgmt_ie[i].ie_length); + len += pmpriv-> + mgmt_ie + [i]. + ie_length; + } + } + } + misc->param.cust_ie.len += len; + pioctl_req->action = MLAN_ACT_SET; + cmd_action = HostCmd_ACT_GEN_SET; + } else { /* Automatic Addition */ + if (MLAN_STATUS_FAILURE == + wlan_custom_ioctl_get_autoidx + (pmpriv, pioctl_req, mask, ie_data, + &index)) { + PRINTM(MERROR, + "Failed to Set the IE buffer\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + mask &= ~MLAN_CUSTOM_IE_NEW_MASK; + if (MLAN_CUSTOM_IE_AUTO_IDX_MASK == + index) { + ret = MLAN_STATUS_SUCCESS; + goto done; + } + tmp_ie = (t_u8 *)&pmpriv-> + mgmt_ie[index].ie_buffer; + memcpy(pmadapter, + tmp_ie + + pmpriv->mgmt_ie[index].ie_length, + &ie_data->ie_buffer, + ie_data->ie_length); + pmpriv->mgmt_ie[index].ie_length += + ie_data->ie_length; + pmpriv->mgmt_ie[index].ie_index = index; + pmpriv->mgmt_ie[index]. + mgmt_subtype_mask = mask; + + pioctl_req->action = MLAN_ACT_SET; + cmd_action = HostCmd_ACT_GEN_SET; + ie_data->ie_index = index; + ie_data->ie_length = + pmpriv->mgmt_ie[index]. + ie_length; + memcpy(pmadapter, &ie_data->ie_buffer, + &pmpriv->mgmt_ie[index]. + ie_buffer, + pmpriv->mgmt_ie[index]. + ie_length); + misc->param.cust_ie.len += + pmpriv->mgmt_ie[index]. + ie_length + + MLAN_CUSTOM_IE_HDR_SIZE; + } + } else { + if (index >= pmadapter->max_mgmt_ie_index) { + PRINTM(MERROR, + "Invalid custom IE index %d\n", + index); + ret = MLAN_STATUS_FAILURE; + goto done; + } + /* Set/Clear the IE and save it */ + if (ie_data->mgmt_subtype_mask == + MLAN_CUSTOM_IE_DELETE_MASK && + ie_data->ie_length) { + PRINTM(MINFO, "Clear the IE buffer\n"); + ret = wlan_custom_ioctl_auto_delete + (pmpriv, pioctl_req, ie_data, + index); + /* if IE to delete is not found, return + error */ + if (ret == MLAN_STATUS_FAILURE) + goto done; + memset(pmadapter, ie_data, 0, + sizeof(custom_ie) * + MAX_MGMT_IE_INDEX_TO_FW); + memcpy(pmadapter, (t_u8 *)ie_data, + &pmpriv->mgmt_ie[index], + pmpriv->mgmt_ie[index]. + ie_length + + MLAN_CUSTOM_IE_HDR_SIZE); + } else { + /* + * Check if this index is being used on + * any other interfaces. If yes, then + * the request needs to be rejected. + */ + ret = wlan_is_custom_ie_index_unused + (pmpriv, index); + if (ret == MLAN_STATUS_FAILURE) { + PRINTM(MERROR, + "IE index is used by other interface.\n"); + PRINTM(MERROR, + "Set or delete on index %d is not allowed.\n", + index); + pioctl_req->status_code = + MLAN_ERROR_IOCTL_FAIL; + goto done; + } + PRINTM(MINFO, "Set the IE buffer\n"); + if (ie_data->mgmt_subtype_mask == + MLAN_CUSTOM_IE_DELETE_MASK) + ie_data->ie_length = 0; + else { + if ((pmpriv->mgmt_ie[index]. + mgmt_subtype_mask == + ie_data->mgmt_subtype_mask) + && (pmpriv->mgmt_ie[index]. + ie_length == + ie_data->ie_length) && + !memcmp(pmpriv->adapter, + pmpriv-> + mgmt_ie[index]. + ie_buffer, + ie_data->ie_buffer, + ie_data-> + ie_length)) { + PRINTM(MIOCTL, + "same custom ie already configured!\n"); + if (ioctl_len <= 0 && + misc->param.cust_ie. + len == 0) { + goto done; + } else { + /* remove + matching IE + from app + buffer */ + app_data_len -= + ie_data-> + ie_length + + + MLAN_CUSTOM_IE_HDR_SIZE; + memmove(pmadapter, (t_u8 *)ie_data, ie_data->ie_buffer + ie_data->ie_length, ioctl_len); + continue; + } + } + } + memset(pmadapter, + &pmpriv->mgmt_ie[index], 0, + sizeof(custom_ie)); + memcpy(pmadapter, + &pmpriv->mgmt_ie[index], ie_data, + sizeof(custom_ie)); + } + + misc->param.cust_ie.len += + pmpriv->mgmt_ie[index].ie_length + + MLAN_CUSTOM_IE_HDR_SIZE; + pioctl_req->action = MLAN_ACT_SET; + cmd_action = HostCmd_ACT_GEN_SET; + } + } + } + + /* Send command to firmware */ + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_STA) { + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_MGMT_IE_LIST, + cmd_action, + 0, + (send_ioctl) ? (t_void *)pioctl_req : + MNULL, &misc->param.cust_ie); + } +#ifdef UAP_SUPPORT + else if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_UAP) { + ret = wlan_prepare_cmd(pmpriv, + HOST_CMD_APCMD_SYS_CONFIGURE, + cmd_action, + 0, + (send_ioctl) ? (t_void *)pioctl_req : + MNULL, + (send_ioctl) ? MNULL : &misc->param. + cust_ie); + } +#endif + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; +done: + LEAVE(); + return ret; +} + +/** + * @brief Read/write adapter register + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_reg_mem_ioctl_reg_rw(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_reg_mem *reg_mem = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 cmd_action = 0, cmd_no; + + ENTER(); + + reg_mem = (mlan_ds_reg_mem *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) + cmd_action = HostCmd_ACT_GEN_GET; + else + cmd_action = HostCmd_ACT_GEN_SET; + + switch (reg_mem->param.reg_rw.type) { + case MLAN_REG_MAC: + cmd_no = HostCmd_CMD_MAC_REG_ACCESS; + break; + case MLAN_REG_BBP: + cmd_no = HostCmd_CMD_BBP_REG_ACCESS; + break; + case MLAN_REG_RF: + cmd_no = HostCmd_CMD_RF_REG_ACCESS; + break; + case MLAN_REG_CAU: + cmd_no = HostCmd_CMD_CAU_REG_ACCESS; + break; + case MLAN_REG_PSU: + cmd_no = HostCmd_CMD_TARGET_ACCESS; + break; + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, cmd_no, cmd_action, + 0, (t_void *)pioctl_req, + (t_void *)®_mem->param.reg_rw); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + +exit: + LEAVE(); + return ret; +} + +/** + * @brief Read the EEPROM contents of the card + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_reg_mem_ioctl_read_eeprom(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_reg_mem *reg_mem = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 cmd_action = 0; + + ENTER(); + + reg_mem = (mlan_ds_reg_mem *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) + cmd_action = HostCmd_ACT_GEN_GET; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_EEPROM_ACCESS, + cmd_action, 0, (t_void *)pioctl_req, + (t_void *)®_mem->param.rd_eeprom); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Read/write memory of device + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_reg_mem_ioctl_mem_rw(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_reg_mem *reg_mem = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 cmd_action = 0; + + ENTER(); + + reg_mem = (mlan_ds_reg_mem *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) + cmd_action = HostCmd_ACT_GEN_GET; + else + cmd_action = HostCmd_ACT_GEN_SET; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_MEM_ACCESS, + cmd_action, 0, + (t_void *)pioctl_req, + (t_void *)®_mem->param.mem_rw); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief This function will check if station list is empty + * + * @param priv A pointer to mlan_private + * + * @return MFALSE/MTRUE + */ +t_u8 +wlan_is_station_list_empty(mlan_private *priv) +{ + ENTER(); + if (!(util_peek_list(priv->adapter->pmoal_handle, + &priv->sta_list, + priv->adapter->callbacks.moal_spin_lock, + priv->adapter->callbacks.moal_spin_unlock))) { + LEAVE(); + return MTRUE; + } + LEAVE(); + return MFALSE; +} + +/** + * @brief This function will return the pointer to station entry in station list + * table which matches the give mac address + * + * @param priv A pointer to mlan_private + * @param mac mac address to find in station list table + * + * @return A pointer to structure sta_node + */ +sta_node * +wlan_get_station_entry(mlan_private *priv, t_u8 *mac) +{ + sta_node *sta_ptr; + + ENTER(); + + if (!mac) { + LEAVE(); + return MNULL; + } + sta_ptr = (sta_node *)util_peek_list(priv->adapter->pmoal_handle, + &priv->sta_list, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); + if (!sta_ptr) { + LEAVE(); + return MNULL; + } + while (sta_ptr != (sta_node *)&priv->sta_list) { + if (!memcmp + (priv->adapter, sta_ptr->mac_addr, mac, + MLAN_MAC_ADDR_LENGTH)) { + LEAVE(); + return sta_ptr; + } + sta_ptr = sta_ptr->pnext; + } + LEAVE(); + return MNULL; +} + +/** + * @brief This function will add a pointer to station entry in station list + * table with the give mac address, if it does not exist already + * + * @param priv A pointer to mlan_private + * @param mac mac address to find in station list table + * + * @return A pointer to structure sta_node + */ +sta_node * +wlan_add_station_entry(mlan_private *priv, t_u8 *mac) +{ + sta_node *sta_ptr = MNULL; + mlan_adapter *pmadapter = priv->adapter; + + ENTER(); + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + + sta_ptr = wlan_get_station_entry(priv, mac); + if (sta_ptr) + goto done; + if (priv->adapter->callbacks. + moal_malloc(priv->adapter->pmoal_handle, sizeof(sta_node), + MLAN_MEM_DEF, (t_u8 **)&sta_ptr)) { + PRINTM(MERROR, "Failed to allocate memory for station node\n"); + LEAVE(); + return MNULL; + } + memset(priv->adapter, sta_ptr, 0, sizeof(sta_node)); + memcpy(priv->adapter, sta_ptr->mac_addr, mac, MLAN_MAC_ADDR_LENGTH); + util_enqueue_list_tail(priv->adapter->pmoal_handle, &priv->sta_list, + (pmlan_linked_list)sta_ptr, + priv->adapter->callbacks.moal_spin_lock, + priv->adapter->callbacks.moal_spin_unlock); +done: + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + LEAVE(); + return sta_ptr; +} + +/** + * @brief This function will delete a station entry from station list + * + * + * @param priv A pointer to mlan_private + * @param mac station's mac address + * + * @return N/A + */ +t_void +wlan_delete_station_entry(mlan_private *priv, t_u8 *mac) +{ + sta_node *sta_ptr = MNULL; + mlan_adapter *pmadapter = priv->adapter; + ENTER(); + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + sta_ptr = wlan_get_station_entry(priv, mac); + if (sta_ptr) { + util_unlink_list(priv->adapter->pmoal_handle, &priv->sta_list, + (pmlan_linked_list)sta_ptr, + priv->adapter->callbacks.moal_spin_lock, + priv->adapter->callbacks.moal_spin_unlock); + priv->adapter->callbacks.moal_mfree(priv->adapter->pmoal_handle, + (t_u8 *)sta_ptr); + } + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + LEAVE(); + return; +} + +/** + * @brief Clean up wapi station list + * + * @param priv Pointer to the mlan_private driver data struct + * + * @return N/A + */ +t_void +wlan_delete_station_list(pmlan_private priv) +{ + sta_node *sta_ptr; + + ENTER(); + while ((sta_ptr = + (sta_node *)util_dequeue_list(priv->adapter->pmoal_handle, + &priv->sta_list, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock))) { + priv->adapter->callbacks.moal_mfree(priv->adapter->pmoal_handle, + (t_u8 *)sta_ptr); + } + LEAVE(); + return; +} + +/** + * @brief Get tdls peer list + * + * @param priv A pointer to mlan_private structure + * @param buf A pointer to tdls_peer_info buf + * @return number of tdls peer + */ +int +wlan_get_tdls_list(mlan_private *priv, tdls_peer_info *buf) +{ + tdls_peer_info *peer_info = buf; + sta_node *sta_ptr = MNULL; + int count = 0; + ENTER(); + if (priv->bss_type != MLAN_BSS_TYPE_STA) { + LEAVE(); + return count; + } + sta_ptr = (sta_node *)util_peek_list(priv->adapter->pmoal_handle, + &priv->sta_list, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); + if (!sta_ptr) { + LEAVE(); + return count; + } + while (sta_ptr != (sta_node *)&priv->sta_list) { + if (sta_ptr->status == TDLS_SETUP_COMPLETE) { + peer_info->snr = sta_ptr->snr; + peer_info->nf = sta_ptr->nf; + memcpy(priv->adapter, peer_info->mac_addr, + sta_ptr->mac_addr, MLAN_MAC_ADDR_LENGTH); + memcpy(priv->adapter, peer_info->ht_cap, + &sta_ptr->HTcap, sizeof(IEEEtypes_HTCap_t)); + memcpy(priv->adapter, peer_info->ext_cap, + &sta_ptr->ExtCap, sizeof(IEEEtypes_ExtCap_t)); + memcpy(priv->adapter, peer_info->vht_cap, + &sta_ptr->vht_cap, sizeof(IEEEtypes_VHTCap_t)); + peer_info++; + count++; + } + sta_ptr = sta_ptr->pnext; + if (count >= MLAN_MAX_TDLS_PEER_SUPPORTED) + break; + } + LEAVE(); + return count; +} + +/** + * @brief Set the TDLS configuration to FW. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_misc_ioctl_tdls_config(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + tdls_all_config *tdls_all_cfg = + (tdls_all_config *)misc->param.tdls_config.tdls_data; + t_u8 event_buf[100]; + mlan_event *pevent = (mlan_event *)event_buf; + tdls_tear_down_event *tdls_evt = + (tdls_tear_down_event *)pevent->event_buf; + sta_node *sta_ptr = MNULL; + + ENTER(); + + if (misc->param.tdls_config.tdls_action == WLAN_TDLS_TEAR_DOWN_REQ) { + sta_ptr = + wlan_get_station_entry(pmpriv, + tdls_all_cfg->u.tdls_tear_down. + peer_mac_addr); + if (sta_ptr && sta_ptr->external_tdls) { + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ; + pevent->event_len = sizeof(tdls_tear_down_event); + memcpy(pmpriv->adapter, (t_u8 *)tdls_evt->peer_mac_addr, + tdls_all_cfg->u.tdls_tear_down.peer_mac_addr, + MLAN_MAC_ADDR_LENGTH); + tdls_evt->reason_code = + tdls_all_cfg->u.tdls_tear_down.reason_code; + wlan_recv_event(pmpriv, + MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ, + pevent); + LEAVE(); + return ret; + } + } + pioctl_req->action = MLAN_ACT_SET; + + /* Send command to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_TDLS_CONFIG, + HostCmd_ACT_GEN_SET, + 0, + (t_void *)pioctl_req, &misc->param.tdls_config); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + LEAVE(); + return ret; +} + +/** + * @brief Set/Get the TDLS idle time. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_misc_ioctl_tdls_idle_time(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + + ENTER(); + + if (MLAN_ACT_GET == pioctl_req->action) { + if (pmpriv->tdls_idle_time == 0) + misc->param.tdls_idle_time = TDLS_IDLE_TIMEOUT; + else + misc->param.tdls_idle_time = pmpriv->tdls_idle_time; + } else if (MLAN_ACT_SET == pioctl_req->action) { + pmpriv->tdls_idle_time = misc->param.tdls_idle_time; + } + LEAVE(); + return ret; +} + +/** + * @brief Set the TDLS operation to FW. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_misc_ioctl_tdls_oper(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + mlan_ds_misc_tdls_oper *ptdls_oper = &misc->param.tdls_oper; + t_u8 event_buf[100]; + mlan_event *ptdls_event = (mlan_event *)event_buf; + tdls_tear_down_event *tdls_evt = + (tdls_tear_down_event *)ptdls_event->event_buf; + sta_node *sta_ptr = MNULL; + t_u8 i = 0; + + ENTER(); + sta_ptr = wlan_get_station_entry(pmpriv, ptdls_oper->peer_mac); + switch (ptdls_oper->tdls_action) { + case WLAN_TDLS_ENABLE_LINK: + if (sta_ptr && (sta_ptr->status != TDLS_SETUP_FAILURE)) { + PRINTM(MMSG, "TDLS: Enable link " MACSTR " success\n", + MAC2STR(ptdls_oper->peer_mac)); + sta_ptr->status = TDLS_SETUP_COMPLETE; + pmadapter->tdls_status = TDLS_IN_BASE_CHANNEL; + if (!pmpriv->txaggrctrl) + wlan_11n_send_delba_to_peer(pmpriv, + pmpriv-> + curr_bss_params. + bss_descriptor. + mac_address); + if (sta_ptr->HTcap.ieee_hdr.element_id == HT_CAPABILITY) { + sta_ptr->is_11n_enabled = MTRUE; + if (GETHT_MAXAMSDU + (sta_ptr->HTcap.ht_cap.ht_cap_info)) + sta_ptr->max_amsdu = + MLAN_TX_DATA_BUF_SIZE_8K; + else + sta_ptr->max_amsdu = + MLAN_TX_DATA_BUF_SIZE_4K; + for (i = 0; i < MAX_NUM_TID; i++) { + if (sta_ptr->is_11n_enabled) + sta_ptr->ampdu_sta[i] = + pmpriv-> + aggr_prio_tbl[i]. + ampdu_user; + else + sta_ptr->ampdu_sta[i] = + BA_STREAM_NOT_ALLOWED; + } + memset(pmpriv->adapter, sta_ptr->rx_seq, 0xff, + sizeof(sta_ptr->rx_seq)); + } + wlan_restore_tdls_packets(pmpriv, ptdls_oper->peer_mac, + TDLS_SETUP_COMPLETE); + } else { + PRINTM(MMSG, "TDLS: Enable link " MACSTR " fail\n", + MAC2STR(ptdls_oper->peer_mac)); + /* for supplicant 2.0, we need send event to request + teardown, **for latest supplicant, we only need + return fail, and supplicant will send teardown + packet and disable tdls link */ + if (sta_ptr) { + ptdls_event->bss_index = pmpriv->bss_index; + ptdls_event->event_id = + MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ; + ptdls_event->event_len = + sizeof(tdls_tear_down_event); + memcpy(pmpriv->adapter, + (t_u8 *)tdls_evt->peer_mac_addr, + ptdls_oper->peer_mac, + MLAN_MAC_ADDR_LENGTH); + tdls_evt->reason_code = + MLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED; + wlan_recv_event(pmpriv, + MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ, + ptdls_event); + wlan_restore_tdls_packets(pmpriv, + ptdls_oper->peer_mac, + TDLS_TEAR_DOWN); + if (sta_ptr->is_11n_enabled) { + wlan_cleanup_reorder_tbl(pmpriv, + ptdls_oper-> + peer_mac); + pmadapter->callbacks. + moal_spin_lock(pmadapter-> + pmoal_handle, + pmpriv->wmm. + ra_list_spinlock); + wlan_11n_cleanup_txbastream_tbl(pmpriv, + ptdls_oper-> + peer_mac); + pmadapter->callbacks. + moal_spin_unlock(pmadapter-> + pmoal_handle, + pmpriv->wmm. + ra_list_spinlock); + } + wlan_delete_station_entry(pmpriv, + ptdls_oper->peer_mac); + if (MTRUE == wlan_is_station_list_empty(pmpriv)) + pmadapter->tdls_status = TDLS_NOT_SETUP; + else + pmadapter->tdls_status = + TDLS_IN_BASE_CHANNEL; + } + ret = MLAN_STATUS_FAILURE; + } + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_DEFER_HANDLING, + MNULL); + break; + case WLAN_TDLS_DISABLE_LINK: + /* Send command to firmware to delete tdls link */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_TDLS_OPERATION, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_req, ptdls_oper); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + break; + case WLAN_TDLS_CREATE_LINK: + PRINTM(MIOCTL, "CREATE TDLS LINK\n"); + if (sta_ptr && sta_ptr->status == TDLS_SETUP_INPROGRESS) { + PRINTM(MIOCTL, "We already create the link\n"); + break; + } + if (!sta_ptr) + sta_ptr = + wlan_add_station_entry(pmpriv, + misc->param.tdls_oper. + peer_mac); + if (sta_ptr) { + sta_ptr->status = TDLS_SETUP_INPROGRESS; + sta_ptr->external_tdls = MTRUE; + wlan_hold_tdls_packets(pmpriv, + misc->param.tdls_oper.peer_mac); + } + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_TDLS_OPERATION, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_req, ptdls_oper); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + break; + case WLAN_TDLS_CONFIG_LINK: + if (!sta_ptr || sta_ptr->status == TDLS_SETUP_FAILURE) { + PRINTM(MERROR, "Can not CONFIG TDLS Link\n"); + ret = MLAN_STATUS_FAILURE; + break; + } + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_TDLS_OPERATION, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_req, ptdls_oper); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + break; + default: + break; + } + LEAVE(); + return ret; +} + +/** + * @brief Set the TDLS operation to FW. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_misc_ioctl_tdls_get_ies(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + mlan_ds_misc_tdls_ies *tdls_ies = &misc->param.tdls_ies; + mlan_status ret = MLAN_STATUS_SUCCESS; + BSSDescriptor_t *pbss_desc; + t_u32 usr_dot_11n_dev_cap; + IEEEtypes_ExtCap_t *ext_cap = MNULL; + IEEEtypes_HTCap_t *ht_cap = MNULL; + IEEEtypes_HTInfo_t *ht_info = MNULL; + IEEEtypes_VHTCap_t *vht_cap = MNULL; + IEEEtypes_VHTOprat_t *vht_oprat = MNULL; + IEEEtypes_AssocRsp_t *passoc_rsp = MNULL; + IEEEtypes_AID_t *aid_info = MNULL; + sta_node *sta_ptr = MNULL; + ENTER(); + + sta_ptr = wlan_get_station_entry(pmpriv, tdls_ies->peer_mac); + pbss_desc = &pmpriv->curr_bss_params.bss_descriptor; + if (pbss_desc->bss_band & BAND_A) + usr_dot_11n_dev_cap = pmpriv->usr_dot_11n_dev_cap_a; + else + usr_dot_11n_dev_cap = pmpriv->usr_dot_11n_dev_cap_bg; + + /** fill the extcap */ + if (tdls_ies->flags & TDLS_IE_FLAGS_EXTCAP) { + ext_cap = (IEEEtypes_ExtCap_t *)tdls_ies->ext_cap; + ext_cap->ieee_hdr.element_id = EXT_CAPABILITY; + ext_cap->ieee_hdr.len = sizeof(ExtCap_t); + SET_EXTCAP_TDLS(ext_cap->ext_cap); + RESET_EXTCAP_TDLS_UAPSD(ext_cap->ext_cap); + RESET_EXTCAP_TDLS_CHAN_SWITCH(ext_cap->ext_cap); + + RESET_EXTCAP_TDLS_WIDER_BANDWIDTH(ext_cap->ext_cap); + if ((pmadapter->fw_bands & BAND_AAC) && + (MFALSE == wlan_is_ap_in_11ac_mode(pmpriv))) + SET_EXTCAP_TDLS_WIDER_BANDWIDTH(ext_cap->ext_cap); + DBG_HEXDUMP(MCMD_D, "TDLS extcap", tdls_ies->ext_cap, + sizeof(IEEEtypes_ExtCap_t)); + } + + /** fill the htcap based on hwspec */ + if (tdls_ies->flags & TDLS_IE_FLAGS_HTCAP) { + ht_cap = (IEEEtypes_HTCap_t *)tdls_ies->ht_cap; + memset(pmadapter, ht_cap, 0, sizeof(IEEEtypes_HTCap_t)); + wlan_fill_ht_cap_ie(pmpriv, ht_cap, pbss_desc->bss_band); + DBG_HEXDUMP(MCMD_D, "TDLS htcap", tdls_ies->ht_cap, + sizeof(IEEEtypes_HTCap_t)); + } + /** fill the vhtcap based on hwspec */ + if (tdls_ies->flags & TDLS_IE_FLAGS_VHTCAP) { + vht_cap = (IEEEtypes_VHTCap_t *)tdls_ies->vht_cap; + memset(pmadapter, vht_cap, 0, sizeof(IEEEtypes_VHTCap_t)); + wlan_fill_vht_cap_ie(pmpriv, vht_cap, pbss_desc->bss_band); + if (ht_cap) + SETHT_SUPPCHANWIDTH(ht_cap->ht_cap.ht_cap_info); + DBG_HEXDUMP(MCMD_D, "TDLS vhtcap", tdls_ies->vht_cap, + sizeof(IEEEtypes_VHTCap_t)); + } + /** fill the vhtoperation based on hwspec */ + if (tdls_ies->flags & TDLS_IE_FLAGS_VHTOPRAT) { + vht_oprat = (IEEEtypes_VHTOprat_t *)tdls_ies->vht_oprat; + memset(pmadapter, vht_oprat, 0, sizeof(IEEEtypes_VHTOprat_t)); + if (sta_ptr && + (sta_ptr->vht_cap.ieee_hdr.element_id == VHT_CAPABILITY) && + (pbss_desc->bss_band & BAND_A)) { + wlan_fill_tdls_vht_oprat_ie(pmpriv, vht_oprat, sta_ptr); + } + if (sta_ptr) + memcpy(pmadapter, &sta_ptr->vht_oprat, + tdls_ies->vht_oprat, + sizeof(IEEEtypes_VHTOprat_t)); + DBG_HEXDUMP(MCMD_D, "TDLS vht_oprat", tdls_ies->vht_oprat, + sizeof(IEEEtypes_VHTOprat_t)); + } + /** fill the AID info */ + if (tdls_ies->flags & TDLS_IE_FLAGS_AID) { + passoc_rsp = (IEEEtypes_AssocRsp_t *)pmpriv->assoc_rsp_buf; + aid_info = (IEEEtypes_AID_t *)tdls_ies->aid_info; + memset(pmadapter, aid_info, 0, sizeof(IEEEtypes_AID_t)); + aid_info->ieee_hdr.element_id = AID_INFO; + aid_info->ieee_hdr.len = sizeof(t_u16); + aid_info->AID = wlan_le16_to_cpu(passoc_rsp->a_id); + PRINTM(MCMND, "TDLS AID=0x%x\n", aid_info->AID); + } + /** fill the htinfo */ + if (tdls_ies->flags & TDLS_IE_FLAGS_HTINFO) { + ht_info = (IEEEtypes_HTInfo_t *)tdls_ies->ht_info; + pbss_desc = &pmpriv->curr_bss_params.bss_descriptor; + ht_info->ieee_hdr.element_id = HT_OPERATION; + ht_info->ieee_hdr.len = sizeof(HTInfo_t); + ht_info->ht_info.pri_chan = pbss_desc->channel; + /* follow AP's channel bandwidth */ + if (ISSUPP_CHANWIDTH40(usr_dot_11n_dev_cap) && + pbss_desc->pht_info && + ISALLOWED_CHANWIDTH40(pbss_desc->pht_info->ht_info. + field2)) { + ht_info->ht_info.field2 = + pbss_desc->pht_info->ht_info.field2; + } else { + ht_info->ht_info.field2 = + wlan_get_second_channel_offset(pbss_desc-> + channel); + } + if (vht_oprat && + vht_oprat->ieee_hdr.element_id == VHT_OPERATION) { + ht_info->ht_info.field2 = + wlan_get_second_channel_offset(pbss_desc-> + channel); + ht_info->ht_info.field2 |= MBIT(2); + } + if (sta_ptr) + memcpy(pmadapter, &sta_ptr->HTInfo, tdls_ies->ht_info, + sizeof(IEEEtypes_HTInfo_t)); + DBG_HEXDUMP(MCMD_D, "TDLS htinfo", tdls_ies->ht_info, + sizeof(IEEEtypes_HTInfo_t)); + } + + LEAVE(); + return ret; +} + +/** + * @brief Get extended version information + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_get_info_ver_ext(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_get_info *pinfo = (mlan_ds_get_info *)pioctl_req->pbuf; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_VERSION_EXT, + HostCmd_ACT_GEN_GET, + 0, + (t_void *)pioctl_req, + &pinfo->param.ver_ext.version_str_sel); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +#ifdef DEBUG_LEVEL1 +/** + * @brief Set driver debug bit masks in order to enhance performance + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_set_drvdbg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Set driver debug bit masks */ + mlan_drvdbg = misc->param.drvdbg; + + LEAVE(); + return ret; +} +#endif + +/** + * @brief Rx mgmt frame forward register + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_reg_rx_mgmt_ind(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Set passthru mask for mgmt frame */ + pmpriv->mgmt_frame_passthru_mask = misc->param.mgmt_subtype_mask; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_RX_MGMT_IND, + pioctl_req->action, + 0, + (t_void *)pioctl_req, + &misc->param.mgmt_subtype_mask); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief This function processes the 802.11 mgmt Frame + * + * @param priv A pointer to mlan_private + * + * @param payload A pointer to the received buffer + * @param payload_len Length of the received buffer + * @param prx_pd A pointer to RxPD + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_process_802dot11_mgmt_pkt(IN mlan_private *priv, + IN t_u8 *payload, + IN t_u32 payload_len, IN RxPD *prx_pd) +{ + pmlan_adapter pmadapter = priv->adapter; + pmlan_callbacks pcb = &pmadapter->callbacks; + mlan_status ret = MLAN_STATUS_SUCCESS; + wlan_802_11_header *pieee_pkt_hdr = MNULL; + t_u16 sub_type = 0; + t_u8 *event_buf = MNULL; + mlan_event *pevent = MNULL; + t_u8 unicast = 0; + IEEE80211_MGMT *mgmt = MNULL; + t_u8 category; + t_u8 action_code; + + ENTER(); + if (payload_len > (MAX_EVENT_SIZE - sizeof(mlan_event))) { + PRINTM(MERROR, "Dropping large mgmt frame,len =%d\n", + payload_len); + LEAVE(); + return ret; + } + /* Check packet type-subtype and compare with mgmt_passthru_mask If + event is needed to host, just eventify it */ + pieee_pkt_hdr = (wlan_802_11_header *)payload; + sub_type = IEEE80211_GET_FC_MGMT_FRAME_SUBTYPE(pieee_pkt_hdr->frm_ctl); + if (((1 << sub_type) & priv->mgmt_frame_passthru_mask) == 0) { + PRINTM(MINFO, "Dropping mgmt frame for subtype %d snr=%d.\n", + sub_type, prx_pd->snr); + LEAVE(); + return ret; + } + switch (sub_type) { + case SUBTYPE_ASSOC_REQUEST: + case SUBTYPE_REASSOC_REQUEST: + case SUBTYPE_DISASSOC: + case SUBTYPE_DEAUTH: + case SUBTYPE_AUTH: + case SUBTYPE_PROBE_RESP: + unicast = MTRUE; + break; + case SUBTYPE_ACTION: + category = *(payload + sizeof(wlan_802_11_header)); + action_code = *(payload + sizeof(wlan_802_11_header) + 1); + if (category == IEEE_MGMT_ACTION_CATEGORY_BLOCK_ACK) { + PRINTM(MINFO, + "Drop BLOCK ACK action frame: action_code=%d\n", + action_code); + LEAVE(); + return ret; + } + if ((category == IEEE_MGMT_ACTION_CATEGORY_PUBLIC) && + (action_code == BSS_20_40_COEX)) { + PRINTM(MINFO, + "Drop 20/40 BSS Coexistence Management frame\n"); + LEAVE(); + return ret; + } + if ((category == CATEGORY_PUBLIC) && + (action_code == TDLS_DISCOVERY_RESPONSE)) { + pcb->moal_updata_peer_signal(pmadapter->pmoal_handle, + priv->bss_index, + pieee_pkt_hdr->addr2, + prx_pd->snr, prx_pd->nf); + PRINTM(MINFO, + "Rx: TDLS discovery response, nf=%d, snr=%d\n", + prx_pd->nf, prx_pd->snr); + } + unicast = MTRUE; + break; + default: + break; + } + if (unicast == MTRUE) { + if (memcmp + (pmadapter, pieee_pkt_hdr->addr1, priv->curr_addr, + MLAN_MAC_ADDR_LENGTH)) { + PRINTM(MINFO, + "Dropping mgmt frame for others: type=%d " MACSTR + "\n", sub_type, MAC2STR(pieee_pkt_hdr->addr1)); + LEAVE(); + return ret; + } + } + /* Allocate memory for event buffer */ + ret = pcb->moal_malloc(pmadapter->pmoal_handle, MAX_EVENT_SIZE, + MLAN_MEM_DEF, &event_buf); + if ((ret != MLAN_STATUS_SUCCESS) || !event_buf) { + PRINTM(MERROR, "Could not allocate buffer for event buf\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + pevent = (pmlan_event)event_buf; + pevent->bss_index = priv->bss_index; + mgmt = (IEEE80211_MGMT *)payload; + if (sub_type == SUBTYPE_ACTION && + mgmt->u.ft_resp.category == FT_CATEGORY && + mgmt->u.ft_resp.action == FT_ACTION_RESPONSE && + mgmt->u.ft_resp.status_code == 0) { + PRINTM(MCMND, "FT Action response received\n"); +#define FT_ACTION_HEAD_LEN (24 + 6 +16) + pevent->event_id = MLAN_EVENT_ID_DRV_FT_RESPONSE; + pevent->event_len = + payload_len + MLAN_MAC_ADDR_LENGTH - FT_ACTION_HEAD_LEN; + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + &mgmt->u.ft_resp.target_ap_addr, MLAN_MAC_ADDR_LENGTH); + memcpy(pmadapter, + (t_u8 *)(pevent->event_buf + MLAN_MAC_ADDR_LENGTH), + payload + FT_ACTION_HEAD_LEN, + payload_len - FT_ACTION_HEAD_LEN); + } else if (sub_type == SUBTYPE_AUTH && + mgmt->u.auth.auth_alg == MLAN_AUTH_MODE_FT && + mgmt->u.auth.auth_transaction == 2 && + mgmt->u.auth.status_code == 0) { + PRINTM(MCMND, "FT auth response received \n"); +#define AUTH_PACKET_LEN (24 + 6 +6) + pevent->event_id = MLAN_EVENT_ID_DRV_FT_RESPONSE; + pevent->event_len = + payload_len + MLAN_MAC_ADDR_LENGTH - AUTH_PACKET_LEN; + memcpy(pmadapter, (t_u8 *)pevent->event_buf, mgmt->sa, + MLAN_MAC_ADDR_LENGTH); + memcpy(pmadapter, + (t_u8 *)(pevent->event_buf + MLAN_MAC_ADDR_LENGTH), + payload + AUTH_PACKET_LEN, + payload_len - AUTH_PACKET_LEN); + } else { + pevent->event_id = MLAN_EVENT_ID_DRV_MGMT_FRAME; + pevent->event_len = payload_len + sizeof(pevent->event_id); + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + (t_u8 *)&pevent->event_id, sizeof(pevent->event_id)); + memcpy(pmadapter, + (t_u8 *)(pevent->event_buf + sizeof(pevent->event_id)), + payload, payload_len); + } + wlan_recv_event(priv, pevent->event_id, pevent); + if (event_buf) + pcb->moal_mfree(pmadapter->pmoal_handle, event_buf); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +#ifdef STA_SUPPORT +/** + * @brief Extended capabilities configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_misc_ext_capa_cfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (MLAN_ACT_GET == pioctl_req->action) + memcpy(pmpriv->adapter, &misc->param.ext_cap, &pmpriv->ext_cap, + sizeof(misc->param.ext_cap)); + else if (MLAN_ACT_SET == pioctl_req->action) { + memcpy(pmpriv->adapter, &pmpriv->ext_cap, &misc->param.ext_cap, + sizeof(misc->param.ext_cap)); + if (pmpriv->config_bands & BAND_AAC) + SET_EXTCAP_OPERMODENTF(pmpriv->ext_cap); + } + + LEAVE(); + return ret; +} + +/** + * @brief Check whether Extended Capabilities IE support + * + * @param pmpriv A pointer to mlan_private structure + * + * @return MTRUE or MFALSE; + */ +t_u32 +wlan_is_ext_capa_support(mlan_private *pmpriv) +{ + ENTER(); + + /* So far there are only three bits are meaningful */ + if (ISSUPP_EXTCAP_TDLS(pmpriv->ext_cap) + || ISSUPP_EXTCAP_INTERWORKING(pmpriv->ext_cap) + || ISSUPP_EXTCAP_OPERMODENTF(pmpriv->ext_cap) + ) { + LEAVE(); + return MTRUE; + } else { + LEAVE(); + return MFALSE; + } +} +#endif + +/** + * @brief Set hotspot enable/disable + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_misc_hotspot_cfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (MLAN_ACT_GET == pioctl_req->action) + misc->param.hotspot_cfg = pmpriv->hotspot_cfg; + else if (MLAN_ACT_SET == pioctl_req->action) + pmpriv->hotspot_cfg = misc->param.hotspot_cfg; + + LEAVE(); + return ret; +} + +#ifdef STA_SUPPORT +/** + * @brief Add Extended Capabilities IE + * + * @param pmpriv A pointer to mlan_private structure + * @param pptlv_out A pointer to TLV to fill in + * + * @return N/A + */ +void +wlan_add_ext_capa_info_ie(IN mlan_private *pmpriv, OUT t_u8 **pptlv_out) +{ + MrvlIETypes_ExtCap_t *pext_cap = MNULL; + + ENTER(); + + pext_cap = (MrvlIETypes_ExtCap_t *)*pptlv_out; + memset(pmpriv->adapter, pext_cap, 0, sizeof(MrvlIETypes_ExtCap_t)); + pext_cap->header.type = wlan_cpu_to_le16(EXT_CAPABILITY); + pext_cap->header.len = wlan_cpu_to_le16(sizeof(ExtCap_t)); + memcpy(pmpriv->adapter, &pext_cap->ext_cap, &pmpriv->ext_cap, + sizeof(pmpriv->ext_cap)); + *pptlv_out += sizeof(MrvlIETypes_ExtCap_t); + + LEAVE(); +} +#endif + +/** + * @brief Get OTP user data + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_misc_otp_user_data(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + mlan_status ret = MLAN_STATUS_FAILURE; + + ENTER(); + + if (misc->param.otp_user_data.user_data_length > MAX_OTP_USER_DATA_LEN) { + PRINTM(MERROR, "Invalid OTP user data length\n"); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return ret; + } + + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_OTP_READ_USER_DATA, + HostCmd_ACT_GEN_GET, + 0, + (t_void *)pioctl_req, + &misc->param.otp_user_data); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief check if WMM ie present. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pbuf A pointer to IE buffer + * @param buf_len IE buffer len + * + * @return MTRUE/MFALSE + */ +t_u8 +wlan_is_wmm_ie_present(pmlan_adapter pmadapter, t_u8 *pbuf, t_u16 buf_len) +{ + t_u16 bytes_left = buf_len; + IEEEtypes_ElementId_e element_id; + t_u8 *pcurrent_ptr = pbuf; + t_u8 element_len; + t_u16 total_ie_len; + IEEEtypes_VendorSpecific_t *pvendor_ie; + const t_u8 wmm_oui[4] = { 0x00, 0x50, 0xf2, 0x02 }; + t_u8 find_wmm_ie = MFALSE; + + ENTER(); + + /* Process variable IE */ + while (bytes_left >= 2) { + element_id = (IEEEtypes_ElementId_e)(*((t_u8 *)pcurrent_ptr)); + element_len = *((t_u8 *)pcurrent_ptr + 1); + total_ie_len = element_len + sizeof(IEEEtypes_Header_t); + + if (bytes_left < total_ie_len) { + PRINTM(MERROR, "InterpretIE: Error in processing IE, " + "bytes left < IE length\n"); + bytes_left = 0; + continue; + } + switch (element_id) { + case VENDOR_SPECIFIC_221: + pvendor_ie = (IEEEtypes_VendorSpecific_t *)pcurrent_ptr; + if (!memcmp + (pmadapter, pvendor_ie->vend_hdr.oui, wmm_oui, + sizeof(wmm_oui))) { + find_wmm_ie = MTRUE; + PRINTM(MINFO, "find WMM IE\n"); + } + break; + default: + break; + } + pcurrent_ptr += element_len + 2; + /* Need to account for IE ID and IE Len */ + bytes_left -= (element_len + 2); + if (find_wmm_ie) + break; + } + + LEAVE(); + return find_wmm_ie; +} + +/** + * @brief This function will search for the specific ie + * + * + * @param priv A pointer to mlan_private + * @param ie_buf A pointer to ie_buf + * @param ie_len total ie length + * @param id ie's id + * + * @return ie's poiner or MNULL + */ +t_u8 * +wlan_get_specific_ie(pmlan_private priv, t_u8 *ie_buf, t_u8 ie_len, + IEEEtypes_ElementId_e id) +{ + t_u32 bytes_left = ie_len; + t_u8 *pcurrent_ptr = ie_buf; + t_u16 total_ie_len; + t_u8 *ie_ptr = MNULL; + IEEEtypes_ElementId_e element_id; + t_u8 element_len; + + ENTER(); + + DBG_HEXDUMP(MCMD_D, "ie", ie_buf, ie_len); + while (bytes_left >= 2) { + element_id = (IEEEtypes_ElementId_e)(*((t_u8 *)pcurrent_ptr)); + element_len = *((t_u8 *)pcurrent_ptr + 1); + total_ie_len = element_len + sizeof(IEEEtypes_Header_t); + if (bytes_left < total_ie_len) { + PRINTM(MERROR, "InterpretIE: Error in processing IE, " + "bytes left < IE length\n"); + break; + } + if (element_id == id) { + PRINTM(MCMND, "Find IE: id=%d\n", id); + DBG_HEXDUMP(MCMND, "IE", pcurrent_ptr, total_ie_len); + ie_ptr = pcurrent_ptr; + break; + } + pcurrent_ptr += element_len + 2; + /* Need to account for IE ID and IE Len */ + bytes_left -= (element_len + 2); + } + + LEAVE(); + + return ie_ptr; +} + +/** + * @brief Get pm info + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +mlan_status +wlan_get_pm_info(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_pm_cfg *pm_cfg = MNULL; + pmlan_callbacks pcb = &pmadapter->callbacks; + + ENTER(); + + pm_cfg = (mlan_ds_pm_cfg *)pioctl_req->pbuf; + pm_cfg->param.ps_info.is_suspend_allowed = MTRUE; + if (util_peek_list(pmadapter->pmoal_handle, &pmadapter->cmd_pending_q, + pcb->moal_spin_lock, pcb->moal_spin_unlock) + || pmadapter->curr_cmd || !wlan_bypass_tx_list_empty(pmadapter) + || !wlan_wmm_lists_empty(pmadapter) + || pmadapter->sdio_ireg) { + pm_cfg->param.ps_info.is_suspend_allowed = MFALSE; + PRINTM(MIOCTL, + "PM: cmd_pending_q=%p,curr_cmd=%p,wmm_list_empty=%d, by_pass=%d sdio_ireg=0x%x\n", + util_peek_list(pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + pcb->moal_spin_lock, + pcb->moal_spin_unlock), + pmadapter->curr_cmd, wlan_wmm_lists_empty(pmadapter), + wlan_bypass_tx_list_empty(pmadapter), + pmadapter->sdio_ireg); + } + LEAVE(); + return ret; +} + +/** + * @brief Get hs wakeup reason + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +mlan_status +wlan_get_hs_wakeup_reason(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + pmlan_ds_pm_cfg pm_cfg = MNULL; + mlan_status ret = MLAN_STATUS_FAILURE; + + ENTER(); + + pm_cfg = (mlan_ds_pm_cfg *)pioctl_req->pbuf; + + /* Send command to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_HS_WAKEUP_REASON, + HostCmd_ACT_GEN_GET, + 0, + (t_void *)pioctl_req, + &pm_cfg->param.wakeup_reason); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; + +} + +/** + * @brief Set/Get radio status + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +mlan_status +wlan_radio_ioctl_radio_ctl(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_radio_cfg *radio_cfg = MNULL; + t_u16 cmd_action = 0; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + radio_cfg = (mlan_ds_radio_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) { + if (pmadapter->radio_on == radio_cfg->param.radio_on_off) { + ret = MLAN_STATUS_SUCCESS; + goto exit; + } else { + if (pmpriv->media_connected == MTRUE) { + ret = MLAN_STATUS_FAILURE; + goto exit; + } + cmd_action = HostCmd_ACT_GEN_SET; + } + } else + cmd_action = HostCmd_ACT_GEN_GET; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_RADIO_CONTROL, + cmd_action, + 0, + (t_void *)pioctl_req, + &radio_cfg->param.radio_on_off); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + +exit: + LEAVE(); + return ret; +} + +/** + * @brief Set/Get antenna configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_radio_ioctl_ant_cfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_radio_cfg *radio_cfg = MNULL; + t_u16 cmd_action = 0; + mlan_ds_ant_cfg *ant_cfg = MNULL; + mlan_ds_ant_cfg_1x1 *ant_cfg_1x1 = MNULL; + + ENTER(); + + radio_cfg = (mlan_ds_radio_cfg *)pioctl_req->pbuf; + if (IS_STREAM_2X2(pmadapter->feature_control)) + ant_cfg = &radio_cfg->param.ant_cfg; + + if (pioctl_req->action == MLAN_ACT_SET) { + /* User input validation */ + if (IS_STREAM_2X2(pmadapter->feature_control)) { + if (!ant_cfg->tx_antenna || + bitcount(ant_cfg->tx_antenna & 0xFFFF) > + pmadapter->number_of_antenna) { + PRINTM(MERROR, "Invalid antenna setting\n"); + pioctl_req->status_code = + MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + if (ant_cfg->rx_antenna) { + if (bitcount(ant_cfg->rx_antenna & 0xFFFF) > + pmadapter->number_of_antenna) { + PRINTM(MERROR, + "Invalid antenna setting\n"); + pioctl_req->status_code = + MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + } else + ant_cfg->rx_antenna = ant_cfg->tx_antenna; + } else if (!radio_cfg->param.ant_cfg_1x1.antenna || + ((radio_cfg->param.ant_cfg_1x1.antenna != + RF_ANTENNA_AUTO) && + (radio_cfg->param.ant_cfg_1x1.antenna & 0xFFFC))) { + PRINTM(MERROR, "Invalid antenna setting\n"); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + cmd_action = HostCmd_ACT_GEN_SET; + } else + cmd_action = HostCmd_ACT_GEN_GET; + + /* Cast it to t_u16, antenna mode for command + HostCmd_CMD_802_11_RF_ANTENNA requires 2 bytes */ + if (!IS_STREAM_2X2(pmadapter->feature_control)) + ant_cfg_1x1 = &radio_cfg->param.ant_cfg_1x1; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_RF_ANTENNA, + cmd_action, + 0, + (t_void *)pioctl_req, + (IS_STREAM_2X2(pmadapter->feature_control)) ? + (t_void *)ant_cfg : (t_void *)ant_cfg_1x1); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + +exit: + LEAVE(); + return ret; +} + +/** + * @brief Get rate bitmap + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_rate_ioctl_get_rate_bitmap(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_TX_RATE_CFG, + HostCmd_ACT_GEN_GET, + 0, (t_void *)pioctl_req, MNULL); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set rate bitmap + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_rate_ioctl_set_rate_bitmap(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_ds_rate *ds_rate = MNULL; + mlan_status ret = MLAN_STATUS_FAILURE; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + t_u16 *bitmap_rates = MNULL; + + ENTER(); + + ds_rate = (mlan_ds_rate *)pioctl_req->pbuf; + bitmap_rates = ds_rate->param.rate_cfg.bitmap_rates; + + PRINTM(MINFO, "RateBitmap=%04x%04x%04x%04x%04x%04x%04x%04x" + "%04x%04x%04x%04x%04x%04x%04x%04x%04x%04x, " + "IsRateAuto=%d, DataRate=%d\n", + bitmap_rates[17], bitmap_rates[16], + bitmap_rates[15], bitmap_rates[14], + bitmap_rates[13], bitmap_rates[12], + bitmap_rates[11], bitmap_rates[10], + bitmap_rates[9], bitmap_rates[8], + bitmap_rates[7], bitmap_rates[6], + bitmap_rates[5], bitmap_rates[4], + bitmap_rates[3], bitmap_rates[2], + bitmap_rates[1], bitmap_rates[0], + pmpriv->is_data_rate_auto, pmpriv->data_rate); + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_TX_RATE_CFG, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_req, (t_void *)bitmap_rates); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Get rate value + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_rate_ioctl_get_rate_value(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_ds_rate *rate = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + rate = (mlan_ds_rate *)pioctl_req->pbuf; + rate->param.rate_cfg.is_rate_auto = pmpriv->is_data_rate_auto; + pioctl_req->data_read_written = + sizeof(mlan_rate_cfg_t) + MLAN_SUB_COMMAND_SIZE; + + /* If not connected, set rate to the lowest in each band */ + if (pmpriv->media_connected != MTRUE) { + if (pmpriv->config_bands & (BAND_B | BAND_G)) { + /* Return the lowest supported rate for BG band */ + rate->param.rate_cfg.rate = SupportedRates_BG[0] & 0x7f; + } else if (pmpriv->config_bands & (BAND_A | BAND_B)) { + /* Return the lowest supported rate for A band */ + rate->param.rate_cfg.rate = SupportedRates_BG[0] & 0x7f; + } else if (pmpriv->config_bands & BAND_A) { + /* Return the lowest supported rate for A band */ + rate->param.rate_cfg.rate = SupportedRates_A[0] & 0x7f; + } else if (pmpriv->config_bands & BAND_G) { + /* Return the lowest supported rate for G band */ + rate->param.rate_cfg.rate = SupportedRates_G[0] & 0x7f; + } else if (pmpriv->config_bands & BAND_B) { + /* Return the lowest supported rate for B band */ + rate->param.rate_cfg.rate = SupportedRates_B[0] & 0x7f; + } else if (pmpriv->config_bands & BAND_GN) { + /* Return the lowest supported rate for N band */ + rate->param.rate_cfg.rate = SupportedRates_N[0] & 0x7f; + } else { + PRINTM(MMSG, "Invalid Band 0x%x\n", + pmpriv->config_bands); + } + + } else { + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_TX_RATE_QUERY, + HostCmd_ACT_GEN_GET, + 0, (t_void *)pioctl_req, MNULL); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + } + + LEAVE(); + return ret; +} + +/** + * @brief Set rate value + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_rate_ioctl_set_rate_value(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_ds_rate *ds_rate = MNULL; + WLAN_802_11_RATES rates; + t_u8 *rate = MNULL; + int rate_index = 0; + t_u16 bitmap_rates[MAX_BITMAP_RATES_SIZE]; + t_u32 i = 0; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + ds_rate = (mlan_ds_rate *)pioctl_req->pbuf; + + if (ds_rate->param.rate_cfg.is_rate_auto) { + memset(pmadapter, bitmap_rates, 0, sizeof(bitmap_rates)); + /* Support all HR/DSSS rates */ + bitmap_rates[0] = 0x000F; + /* Support all OFDM rates */ + bitmap_rates[1] = 0x00FF; + /* Rates talbe [0] HR/DSSS,[1] OFDM,[2..9] HT,[10..17] VHT */ + /* Support all HT-MCSs rate */ + for (i = 0; i < NELEMENTS(pmpriv->bitmap_rates) - 3 - 8; i++) + bitmap_rates[i + 2] = 0xFFFF; + bitmap_rates[9] = 0x3FFF; + /* Support all VHT-MCSs rate */ + for (i = 0; i < NELEMENTS(pmpriv->bitmap_rates) - 10; i++) + bitmap_rates[i + 10] = 0x03FF; /* 10 Bits valid */ + } else { + memset(pmadapter, rates, 0, sizeof(rates)); + wlan_get_active_data_rates(pmpriv, pmpriv->bss_mode, + (pmpriv->bss_mode == + MLAN_BSS_MODE_INFRA) ? pmpriv-> + config_bands : pmadapter-> + adhoc_start_band, rates); + rate = rates; + for (i = 0; (rate[i] && i < WLAN_SUPPORTED_RATES); i++) { + PRINTM(MINFO, "Rate=0x%X Wanted=0x%X\n", rate[i], + ds_rate->param.rate_cfg.rate); + if ((rate[i] & 0x7f) == + (ds_rate->param.rate_cfg.rate & 0x7f)) + break; + } + if (!rate[i] || (i == WLAN_SUPPORTED_RATES)) { + PRINTM(MERROR, "The fixed data rate 0x%X is out " + "of range\n", ds_rate->param.rate_cfg.rate); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + memset(pmadapter, bitmap_rates, 0, sizeof(bitmap_rates)); + + rate_index = + wlan_data_rate_to_index(pmadapter, + ds_rate->param.rate_cfg.rate); + + /* Only allow b/g rates to be set */ + if (rate_index >= MLAN_RATE_INDEX_HRDSSS0 && + rate_index <= MLAN_RATE_INDEX_HRDSSS3) + bitmap_rates[0] = 1 << rate_index; + else { + rate_index -= 1; /* There is a 0x00 in the table + */ + if (rate_index >= MLAN_RATE_INDEX_OFDM0 && + rate_index <= MLAN_RATE_INDEX_OFDM7) + bitmap_rates[1] = + 1 << (rate_index - + MLAN_RATE_INDEX_OFDM0); + } + } + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_TX_RATE_CFG, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_req, bitmap_rates); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + +exit: + LEAVE(); + return ret; +} + +/** + * @brief Get rate index + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_rate_ioctl_get_rate_index(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_TX_RATE_CFG, + HostCmd_ACT_GEN_GET, + 0, (t_void *)pioctl_req, MNULL); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set rate index + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_rate_ioctl_set_rate_index(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + t_u32 rate_index; + t_u32 rate_format; + t_u32 nss; + t_u32 i; + mlan_ds_rate *ds_rate = MNULL; + mlan_status ret = MLAN_STATUS_FAILURE; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + t_u16 bitmap_rates[MAX_BITMAP_RATES_SIZE]; + int tx_mcs_supp = GET_TXMCSSUPP(pmpriv->usr_dev_mcs_support); + + ENTER(); + + ds_rate = (mlan_ds_rate *)pioctl_req->pbuf; + rate_format = ds_rate->param.rate_cfg.rate_format; + nss = ds_rate->param.rate_cfg.nss; + rate_index = ds_rate->param.rate_cfg.rate; + + if (ds_rate->param.rate_cfg.is_rate_auto) { + memset(pmadapter, bitmap_rates, 0, sizeof(bitmap_rates)); + /* Rates talbe [0]: HR/DSSS;[1]: OFDM; [2..9] HT; */ + /* Support all HR/DSSS rates */ + bitmap_rates[0] = 0x000F; + /* Support all OFDM rates */ + bitmap_rates[1] = 0x00FF; + /* Support all HT-MCSs rate */ + for (i = 2; i < 9; i++) + bitmap_rates[i] = 0xFFFF; + bitmap_rates[9] = 0x3FFF; + /* [10..17] VHT */ + /* Support all VHT-MCSs rate for NSS 1 and 2 */ + for (i = 10; i < 12; i++) + bitmap_rates[i] = 0x03FF; /* 10 Bits valid */ + /* Set to 0 as default value for all other NSSs */ + for (i = 12; i < NELEMENTS(bitmap_rates); i++) + bitmap_rates[i] = 0x0; + } else { + PRINTM(MINFO, "Rate index is %d\n", rate_index); + if ((rate_format == MLAN_RATE_FORMAT_HT) && + (rate_index > MLAN_RATE_INDEX_MCS7 && + rate_index <= MLAN_RATE_INDEX_MCS15) && + (tx_mcs_supp < 2)) { + PRINTM(MERROR, + "HW don't support 2x2, rate_index=%d hw_mcs_supp=0x%x\n", + rate_index, pmpriv->usr_dev_mcs_support); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + memset(pmadapter, bitmap_rates, 0, sizeof(bitmap_rates)); + if (rate_format == MLAN_RATE_FORMAT_LG) { + /* Bitmap of HR/DSSS rates */ + if ((rate_index >= MLAN_RATE_INDEX_HRDSSS0) && + (rate_index <= MLAN_RATE_INDEX_HRDSSS3)) { + bitmap_rates[0] = 1 << rate_index; + ret = MLAN_STATUS_SUCCESS; + /* Bitmap of OFDM rates */ + } else if ((rate_index >= MLAN_RATE_INDEX_OFDM0) && + (rate_index <= MLAN_RATE_INDEX_OFDM7)) { + bitmap_rates[1] = + 1 << (rate_index - + MLAN_RATE_INDEX_OFDM0); + ret = MLAN_STATUS_SUCCESS; + } + } else if (rate_format == MLAN_RATE_FORMAT_HT) { + if ((rate_index >= MLAN_RATE_INDEX_MCS0) && + (rate_index <= MLAN_RATE_INDEX_MCS32)) { + bitmap_rates[2 + (rate_index / 16)] = + 1 << (rate_index % 16); + ret = MLAN_STATUS_SUCCESS; + } + } + if (rate_format == MLAN_RATE_FORMAT_VHT) { + if ((rate_index <= MLAN_RATE_INDEX_MCS9) && + (MLAN_RATE_NSS1 <= nss) && + (nss <= MLAN_RATE_NSS2)) { + bitmap_rates[10 + nss - MLAN_RATE_NSS1] = + (1 << rate_index); + ret = MLAN_STATUS_SUCCESS; + } + } + + if (ret == MLAN_STATUS_FAILURE) { + PRINTM(MERROR, "Invalid MCS index=%d. \n", rate_index); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + } + + PRINTM(MINFO, "RateBitmap=%04x%04x%04x%04x%04x%04x%04x%04x" + "%04x%04x%04x%04x%04x%04x%04x%04x%04x%04x, " + "IsRateAuto=%d, DataRate=%d\n", + bitmap_rates[17], bitmap_rates[16], + bitmap_rates[15], bitmap_rates[14], + bitmap_rates[13], bitmap_rates[12], + bitmap_rates[11], bitmap_rates[10], + bitmap_rates[9], bitmap_rates[8], + bitmap_rates[7], bitmap_rates[6], + bitmap_rates[5], bitmap_rates[4], + bitmap_rates[3], bitmap_rates[2], + bitmap_rates[1], bitmap_rates[0], + pmpriv->is_data_rate_auto, pmpriv->data_rate); + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_TX_RATE_CFG, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_req, (t_void *)bitmap_rates); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Rate configuration command handler + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_rate_ioctl_cfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_ds_rate *rate = MNULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + rate = (mlan_ds_rate *)pioctl_req->pbuf; + if (rate->param.rate_cfg.rate_type == MLAN_RATE_BITMAP) { + if (pioctl_req->action == MLAN_ACT_GET) + status = wlan_rate_ioctl_get_rate_bitmap(pmadapter, + pioctl_req); + else + status = wlan_rate_ioctl_set_rate_bitmap(pmadapter, + pioctl_req); + } else if (rate->param.rate_cfg.rate_type == MLAN_RATE_VALUE) { + if (pioctl_req->action == MLAN_ACT_GET) + status = wlan_rate_ioctl_get_rate_value(pmadapter, + pioctl_req); + else + status = wlan_rate_ioctl_set_rate_value(pmadapter, + pioctl_req); + } else { + if (pioctl_req->action == MLAN_ACT_GET) + status = wlan_rate_ioctl_get_rate_index(pmadapter, + pioctl_req); + else + status = wlan_rate_ioctl_set_rate_index(pmadapter, + pioctl_req); + } + + LEAVE(); + return status; +} + +/** + * @brief Get data rates + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_rate_ioctl_get_data_rate(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (pioctl_req->action != MLAN_ACT_GET) { + ret = MLAN_STATUS_FAILURE; + goto exit; + } + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_TX_RATE_QUERY, + HostCmd_ACT_GEN_GET, + 0, (t_void *)pioctl_req, MNULL); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + +exit: + LEAVE(); + return ret; +} + +#ifdef WIFI_DIRECT_SUPPORT +/** + * @brief Set/Get wifi_direct_mode + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +mlan_status +wlan_bss_ioctl_wifi_direct_mode(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_bss *bss = MNULL; + + t_u16 cmd_action = 0; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + bss = (mlan_ds_bss *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HOST_CMD_WIFI_DIRECT_MODE_CONFIG, + cmd_action, + 0, (t_void *)pioctl_req, &bss->param.wfd_mode); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get remain on channel setting + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +mlan_status +wlan_radio_ioctl_remain_chan_cfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_radio_cfg *radio_cfg = MNULL; + t_u16 cmd_action = 0; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + radio_cfg = (mlan_ds_radio_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_REMAIN_ON_CHANNEL, + cmd_action, + 0, + (t_void *)pioctl_req, + &radio_cfg->param.remain_chan); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get p2p config + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +mlan_status +wlan_misc_p2p_config(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc_cfg = MNULL; + t_u16 cmd_action = 0; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + misc_cfg = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HOST_CMD_P2P_PARAMS_CONFIG, + cmd_action, + 0, + (t_void *)pioctl_req, + &misc_cfg->param.p2p_config); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} +#endif + +/** + * @brief Set coalesce config + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +mlan_status +wlan_misc_ioctl_coalesce_cfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc_cfg = MNULL; + t_u16 cmd_action = 0; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + misc_cfg = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_COALESCE_CFG, + cmd_action, + 0, + (t_void *)pioctl_req, + &misc_cfg->param.coalesce_cfg); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Get/Set Tx control configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_misc_ioctl_txcontrol(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc = MNULL; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) + pmpriv->pkt_tx_ctrl = misc->param.tx_control; + else + misc->param.tx_control = pmpriv->pkt_tx_ctrl; + + LEAVE(); + return ret; +} + +#ifdef RX_PACKET_COALESCE +/** + * @brief Get/Set RX packet coalescing configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_misc_ioctl_rx_pkt_coalesce_config(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc = MNULL; + t_u16 cmd_action = 0; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_RX_PKT_COALESCE_CFG, + cmd_action, + 0, + (t_void *)pioctl_req, &misc->param.rx_coalesce); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} +#endif +/** + * @brief Get/Set channel time and buffer weight configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_misc_ioctl_multi_chan_config(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc = MNULL; + t_u16 cmd_action = 0; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_MULTI_CHAN_CONFIG, + cmd_action, + 0, + (t_void *)pioctl_req, + &misc->param.multi_chan_cfg); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Get/Set multi-channel policy setting + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_misc_ioctl_multi_chan_policy(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc = MNULL; + t_u16 cmd_action = 0; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_SET) { + cmd_action = HostCmd_ACT_GEN_SET; + } else { + cmd_action = HostCmd_ACT_GEN_GET; + } + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_MULTI_CHAN_POLICY, + cmd_action, + 0, + (t_void *)pioctl_req, + &misc->param.multi_chan_policy); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Low Power Mode + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_misc_ioctl_low_pwr_mode(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc = MNULL; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCMD_CONFIG_LOW_POWER_MODE, + HostCmd_ACT_GEN_SET, + 0, + (t_void *)pioctl_req, &misc->param.low_pwr_mode); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_module.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_module.c new file mode 100644 index 00000000..e7c6a39b --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_module.c @@ -0,0 +1,55 @@ +/** @file mlan_module.c + * + * @brief This file declares the exported symbols from MLAN. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 12/08/2008: initial version +******************************************************/ + +#ifdef LINUX +#include +#include "mlan_decl.h" +#include "mlan_ioctl.h" + +EXPORT_SYMBOL(mlan_register); +EXPORT_SYMBOL(mlan_unregister); +EXPORT_SYMBOL(mlan_init_fw); +EXPORT_SYMBOL(mlan_set_init_param); +EXPORT_SYMBOL(mlan_dnld_fw); +EXPORT_SYMBOL(mlan_shutdown_fw); +EXPORT_SYMBOL(mlan_send_packet); +EXPORT_SYMBOL(mlan_ioctl); +EXPORT_SYMBOL(mlan_main_process); +EXPORT_SYMBOL(mlan_rx_process); +EXPORT_SYMBOL(mlan_select_wmm_queue); +EXPORT_SYMBOL(mlan_interrupt); + + +EXPORT_SYMBOL(mlan_WiFiInitSem); + + +EXPORT_SYMBOL(mlan_pm_wakeup_card); +EXPORT_SYMBOL(mlan_is_main_process_running); + +MODULE_DESCRIPTION("M-WLAN MLAN Driver"); +MODULE_AUTHOR("Marvell International Ltd."); +MODULE_VERSION(MLAN_RELEASE_VERSION); +MODULE_LICENSE("GPL"); +#endif /* LINUX */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_scan.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_scan.c new file mode 100644 index 00000000..3063bb87 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_scan.c @@ -0,0 +1,5553 @@ +/** @file mlan_scan.c + * + * @brief Functions implementing wlan scan IOCTL and firmware command APIs + * + * IOCTL handlers as well as command preparation and response routines + * for sending scan commands to the firmware. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 10/28/2008: initial version +******************************************************/ + +#include "mlan.h" +#include "mlan_join.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_11n.h" +#include "mlan_11ac.h" +#include "mlan_11h.h" +/******************************************************** + Local Constants +********************************************************/ + +/** The maximum number of channels the firmware can scan per command */ +#define MRVDRV_MAX_CHANNELS_PER_SPECIFIC_SCAN 14 + +/** + * Number of channels to scan per firmware scan command issuance. + * + * Number restricted to prevent hitting the limit on the amount of scan data + * returned in a single firmware scan command. + */ +#define MRVDRV_CHANNELS_PER_SCAN_CMD 4 + +/** Memory needed to store a max sized Channel List TLV for a firmware scan */ +#define CHAN_TLV_MAX_SIZE (sizeof(MrvlIEtypesHeader_t) \ + + (MRVDRV_MAX_CHANNELS_PER_SPECIFIC_SCAN \ + * sizeof(ChanScanParamSet_t))) + +/** Memory needed to store supported rate */ +#define RATE_TLV_MAX_SIZE (sizeof(MrvlIEtypes_RatesParamSet_t) + HOSTCMD_SUPPORTED_RATES) + +/** Memory needed to store a max number/size WildCard + * SSID TLV for a firmware scan */ +#define WILDCARD_SSID_TLV_MAX_SIZE \ + (MRVDRV_MAX_SSID_LIST_LENGTH * \ + (sizeof(MrvlIEtypes_WildCardSsIdParamSet_t) + \ + MRVDRV_MAX_SSID_LENGTH)) + +/** WPS TLV MAX size is MAX IE size plus 2 bytes for + * t_u16 MRVL TLV extension */ +#define WPS_TLV_MAX_SIZE (sizeof(IEEEtypes_VendorSpecific_t) + 2) +/** Maximum memory needed for a wlan_scan_cmd_config + * with all TLVs at max */ +#define MAX_SCAN_CFG_ALLOC (sizeof(wlan_scan_cmd_config) \ + + sizeof(MrvlIEtypes_NumProbes_t) \ + + sizeof(MrvlIETypes_HTCap_t) \ + + CHAN_TLV_MAX_SIZE \ + + RATE_TLV_MAX_SIZE \ + + WILDCARD_SSID_TLV_MAX_SIZE \ + + WPS_TLV_MAX_SIZE) + +/******************************************************** + Local Variables +********************************************************/ + +/** + * Interally used to send a configured scan cmd between + * driver routines + */ +typedef union { + /** Scan configuration (variable length) */ + wlan_scan_cmd_config config; + /** Max allocated block */ + t_u8 config_alloc_buf[MAX_SCAN_CFG_ALLOC]; +} wlan_scan_cmd_config_tlv; + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ +/** Cipher suite definition */ +enum cipher_suite { + CIPHER_SUITE_WEP40, + CIPHER_SUITE_TKIP, + CIPHER_SUITE_CCMP, + CIPHER_SUITE_WEP104, + CIPHER_SUITE_MAX +}; + +static t_u8 wpa_oui[CIPHER_SUITE_MAX][4] = { + {0x00, 0x50, 0xf2, 0x01}, /* WEP40 */ + {0x00, 0x50, 0xf2, 0x02}, /* TKIP */ + {0x00, 0x50, 0xf2, 0x04}, /* AES */ + {0x00, 0x50, 0xf2, 0x05}, /* WEP104 */ +}; + +static t_u8 rsn_oui[CIPHER_SUITE_MAX][4] = { + {0x00, 0x0f, 0xac, 0x01}, /* WEP40 */ + {0x00, 0x0f, 0xac, 0x02}, /* TKIP */ + {0x00, 0x0f, 0xac, 0x04}, /* AES */ + {0x00, 0x0f, 0xac, 0x05}, /* WEP104 */ +}; + +/** + * @brief Convert radio type scan parameter to a band config used in join cmd + * + * @param radio_type Scan parameter indicating the radio used for a channel + * in a scan command. + * + * @return Band type conversion of scanBand used in join/assoc cmds + * + */ +static t_u8 +radio_type_to_band(t_u8 radio_type) +{ + t_u8 ret_band; + + switch (radio_type) { + case HostCmd_SCAN_RADIO_TYPE_A: + ret_band = BAND_A; + break; + case HostCmd_SCAN_RADIO_TYPE_BG: + default: + ret_band = BAND_G; + break; + } + + return ret_band; +} + +/** + * @brief This function will update the channel statistics from scan result + * + * @param pmpriv A pointer to mlan_private structure + * @param pchanstats_tlv A pointer to MrvlIEtypes_ChannelStats_t tlv + * + * @return NA + */ +void +wlan_update_chan_statistics(mlan_private *pmpriv, + MrvlIEtypes_ChannelStats_t *pchanstats_tlv) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + t_u8 i; + ChanStatistics_t *pchan_stats = + (ChanStatistics_t *)((t_u8 *)pchanstats_tlv + + sizeof(MrvlIEtypesHeader_t)); + t_u8 num_chan = + wlan_le16_to_cpu(pchanstats_tlv->header.len) / + sizeof(ChanStatistics_t); + + ENTER(); + + for (i = 0; i < num_chan; i++) { + if (pmadapter->idx_chan_stats >= pmadapter->num_in_chan_stats) { + PRINTM(MERROR, + "Over flow: idx_chan_stats=%d, num_in_chan_stats=%d\n", + pmadapter->idx_chan_stats, + pmadapter->num_in_chan_stats); + break; + } + pchan_stats->total_networks = + wlan_le16_to_cpu(pchan_stats->total_networks); + pchan_stats->cca_scan_duration = + wlan_le16_to_cpu(pchan_stats->cca_scan_duration); + pchan_stats->cca_busy_duration = + wlan_le16_to_cpu(pchan_stats->cca_busy_duration); + pchan_stats->bandconfig = + radio_type_to_band(pchan_stats->bandconfig); + PRINTM(MCMND, + "chan=%d, noise=%d, total_network=%d scan_duration=%d, busy_duration=%d\n", + pchan_stats->chan_num, pchan_stats->noise, + pchan_stats->total_networks, + pchan_stats->cca_scan_duration, + pchan_stats->cca_busy_duration); + memcpy(pmadapter, + &pmadapter->pchan_stats[pmadapter->idx_chan_stats], + pchan_stats, sizeof(ChanStatistics_t)); + pmadapter->idx_chan_stats++; + pchan_stats++; + } + LEAVE(); + return; +} + +/** + * @brief This function will parse a given IE for a given OUI + * + * Parse a given WPA/RSN IE to find if it has a given oui in PTK, + * if no OUI found for PTK it returns 0. + * + * @param pbss_desc A pointer to current BSS descriptor + * @return 0 on failure to find OUI, 1 on success. + */ +static t_u8 +search_oui_in_ie(mlan_adapter *pmadapter, IEBody *ie_body, t_u8 *oui) +{ + t_u8 count; + + count = ie_body->PtkCnt[0]; + + ENTER(); + /* There could be multiple OUIs for PTK hence 1) Take the length. 2) + Check all the OUIs for AES. 3) If one of them is AES then pass + success. */ + while (count) { + if (!memcmp + (pmadapter, ie_body->PtkBody, oui, + sizeof(ie_body->PtkBody))) { + LEAVE(); + return MLAN_OUI_PRESENT; + } + + --count; + if (count) { + ie_body = (IEBody *)((t_u8 *)ie_body + + sizeof(ie_body->PtkBody)); + } + } + + PRINTM(MINFO, "The OUI %x:%x:%x:%x is not found in PTK\n", oui[0], + oui[1], oui[2], oui[3]); + LEAVE(); + return MLAN_OUI_NOT_PRESENT; +} + +/** + * @brief This function will pass the correct ie and oui to search_oui_in_ie + * + * Check the pbss_desc for appropriate IE and then check if RSN IE has AES + * OUI in it. If RSN IE does not have AES in PTK then return 0; + * + * @param pbss_desc A pointer to current BSS descriptor + * @return 0 on failure to find AES OUI, 1 on success. + */ +static t_u8 +is_rsn_oui_present(mlan_adapter *pmadapter, BSSDescriptor_t *pbss_desc, + t_u32 cipher_suite) +{ + t_u8 *oui = MNULL; + IEBody *ie_body = MNULL; + t_u8 ret = MLAN_OUI_NOT_PRESENT; + + ENTER(); + if (((pbss_desc->prsn_ie) && + ((*(pbss_desc->prsn_ie)).ieee_hdr.element_id == RSN_IE))) { + ie_body = + (IEBody *)(((t_u8 *)pbss_desc->prsn_ie->data) + + RSN_GTK_OUI_OFFSET); + oui = &rsn_oui[cipher_suite][0]; + ret = search_oui_in_ie(pmadapter, ie_body, oui); + if (ret) { + LEAVE(); + return ret; + } + } + LEAVE(); + return ret; +} + +/** + * @brief This function will pass the correct ie and oui to search_oui_in_ie + * + * Check the pbss_desc for appropriate IE and then check if WPA IE has AES + * OUI in it. If WPA IE does not have AES in PTK then return 0; + * + * @param pbss_desc A pointer to current BSS descriptor + * @return 0 on failure to find AES OUI, 1 on success. + */ +static t_u8 +is_wpa_oui_present(mlan_adapter *pmadapter, BSSDescriptor_t *pbss_desc, + t_u32 cipher_suite) +{ + t_u8 *oui = MNULL; + IEBody *ie_body = MNULL; + t_u8 ret = MLAN_OUI_NOT_PRESENT; + + ENTER(); + if (((pbss_desc->pwpa_ie) && + ((*(pbss_desc->pwpa_ie)).vend_hdr.element_id == WPA_IE))) { + ie_body = (IEBody *)pbss_desc->pwpa_ie->data; + oui = &wpa_oui[cipher_suite][0]; + ret = search_oui_in_ie(pmadapter, ie_body, oui); + if (ret) { + LEAVE(); + return ret; + } + } + LEAVE(); + return ret; +} + +/** + * @brief compare config band and a band from the scan result, + * which is defined by functiion radio_type_to_band(t_u8 radio_type) above + * + * @param cfg_band: band configured + * scan_band: band from scan result + * + * @return matched: non-zero. unmatched: 0 + * + */ +static t_u8 +wlan_is_band_compatible(t_u8 cfg_band, t_u8 scan_band) +{ + t_u8 band; + switch (scan_band) { + case BAND_A: + band = BAND_A | BAND_AN | BAND_AAC; + break; + case BAND_G: + default: + band = BAND_B | BAND_G | BAND_GN | BAND_GAC; + } + return cfg_band & band; +} + +/** + * @brief This function finds the best SSID in the Scan List + * + * Search the scan table for the best SSID that also matches the current + * adapter network preference (infrastructure or adhoc) + * + * @param pmpriv A pointer to mlan_private structure + * @return index in BSSID list + */ +static t_s32 +wlan_find_best_network_in_list(IN mlan_private *pmpriv) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + t_u32 mode = pmpriv->bss_mode; + t_s32 best_net = -1; + t_s32 best_rssi = 0; + t_u32 i; + + ENTER(); + + PRINTM(MINFO, "Num of BSSIDs = %d\n", pmadapter->num_in_scan_table); + + for (i = 0; i < pmadapter->num_in_scan_table; i++) { + switch (mode) { + case MLAN_BSS_MODE_INFRA: + case MLAN_BSS_MODE_IBSS: + if (wlan_is_network_compatible(pmpriv, i, mode) >= 0) { + if (SCAN_RSSI(pmadapter->pscan_table[i].rssi) > + best_rssi) { + best_rssi = + SCAN_RSSI(pmadapter-> + pscan_table[i].rssi); + best_net = i; + } + } + break; + case MLAN_BSS_MODE_AUTO: + default: + if (SCAN_RSSI(pmadapter->pscan_table[i].rssi) > + best_rssi) { + best_rssi = + SCAN_RSSI(pmadapter->pscan_table[i]. + rssi); + best_net = i; + } + break; + } + } + + LEAVE(); + return best_net; +} + +/** + * @brief Create a channel list for the driver to scan based on region info + * + * Use the driver region/band information to construct a comprehensive list + * of channels to scan. This routine is used for any scan that is not + * provided a specific channel list to scan. + * + * @param pmpriv A pointer to mlan_private structure + * @param puser_scan_in MNULL or pointer to scan configuration parameters + * @param pscan_chan_list Output parameter: Resulting channel list to scan + * @param filtered_scan Flag indicating whether or not a BSSID or SSID filter + * is being sent in the command to firmware. Used to + * increase the number of channels sent in a scan + * command and to disable the firmware channel scan + * filter. + * + * @return N/A + */ +static t_void +wlan_scan_create_channel_list(IN mlan_private *pmpriv, + IN const wlan_user_scan_cfg *puser_scan_in, + OUT ChanScanParamSet_t *pscan_chan_list, + IN t_u8 filtered_scan) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + region_chan_t *pscan_region; + chan_freq_power_t *cfp; + t_u32 region_idx; + t_u32 chan_idx = 0; + t_u32 next_chan; + t_u8 scan_type; + t_u8 radio_type; + + ENTER(); + + for (region_idx = 0; + region_idx < NELEMENTS(pmadapter->region_channel); region_idx++) { + + if (wlan_11d_is_enabled(pmpriv) && + pmpriv->media_connected != MTRUE) { + /* Scan all the supported chan for the first scan */ + if (!pmadapter->universal_channel[region_idx].valid) + continue; + pscan_region = + &pmadapter->universal_channel[region_idx]; + } else { + if (!pmadapter->region_channel[region_idx].valid) + continue; + pscan_region = &pmadapter->region_channel[region_idx]; + } + + if (puser_scan_in && !puser_scan_in->chan_list[0].chan_number && + puser_scan_in->chan_list[0].radio_type & BAND_SPECIFIED) { + radio_type = + puser_scan_in->chan_list[0]. + radio_type & ~BAND_SPECIFIED; + if (!radio_type && (pscan_region->band != BAND_B) && + (pscan_region->band != BAND_G)) + continue; + if (radio_type && (pscan_region->band != BAND_A)) + continue; + } + if (!wlan_is_band_compatible + (pmpriv->config_bands | pmadapter->adhoc_start_band, + pscan_region->band)) + continue; + for (next_chan = 0; + next_chan < pscan_region->num_cfp; + next_chan++, chan_idx++) { + /* Set the default scan type to the user specified + type, will later be changed to passive on a per + channel basis if restricted by regulatory + requirements (11d or 11h) */ + scan_type = pmadapter->scan_type; + cfp = pscan_region->pcfp + next_chan; + + if (scan_type == MLAN_SCAN_TYPE_ACTIVE + && wlan_11d_is_enabled(pmpriv)) { + scan_type = wlan_11d_get_scan_type(pmadapter, + pscan_region-> + band, + (t_u8)cfp-> + channel, + &pmadapter-> + parsed_region_chan); + } + + switch (pscan_region->band) { + case BAND_A: + pscan_chan_list[chan_idx].radio_type = + HostCmd_SCAN_RADIO_TYPE_A; + if (!wlan_11d_is_enabled(pmpriv)) { + /* 11D not available... play it safe on + DFS channels */ + if (wlan_11h_radar_detect_required + (pmpriv, (t_u8)cfp->channel)) + scan_type = + MLAN_SCAN_TYPE_PASSIVE; + } + break; + case BAND_B: + case BAND_G: + if (!wlan_11d_is_enabled(pmpriv)) + if (wlan_bg_scan_type_is_passive + (pmpriv, (t_u8)cfp->channel)) { + scan_type = + MLAN_SCAN_TYPE_PASSIVE; + } + pscan_chan_list[chan_idx].radio_type = + HostCmd_SCAN_RADIO_TYPE_BG; + break; + default: + pscan_chan_list[chan_idx].radio_type = + HostCmd_SCAN_RADIO_TYPE_BG; + break; + } + + if (puser_scan_in && + puser_scan_in->chan_list[0].scan_time) { + pscan_chan_list[chan_idx].max_scan_time = + wlan_cpu_to_le16((t_u16)puser_scan_in-> + chan_list[0]. + scan_time); + } else if (scan_type == MLAN_SCAN_TYPE_PASSIVE) { + pscan_chan_list[chan_idx].max_scan_time = + wlan_cpu_to_le16(pmadapter-> + passive_scan_time); + } else if (filtered_scan) { + pscan_chan_list[chan_idx].max_scan_time = + wlan_cpu_to_le16(pmadapter-> + specific_scan_time); + } else { + pscan_chan_list[chan_idx].max_scan_time = + wlan_cpu_to_le16(pmadapter-> + active_scan_time); + } + + if (scan_type == MLAN_SCAN_TYPE_PASSIVE) { + pscan_chan_list[chan_idx].chan_scan_mode. + passive_scan = MTRUE; + } else { + pscan_chan_list[chan_idx].chan_scan_mode. + passive_scan = MFALSE; + } + + pscan_chan_list[chan_idx].chan_number = + (t_u8)cfp->channel; + + if (filtered_scan) { + pscan_chan_list[chan_idx].chan_scan_mode. + disable_chan_filt = MTRUE; + } + } + } + + LEAVE(); +} + +/** + * @brief Add WPS IE to probe request frame + * + * @param pmpriv A pointer to mlan_private structure + * @param pptlv_out A pointer to TLV to fill in + * + * @return N/A + */ +static void +wlan_add_wps_probe_request_ie(IN mlan_private *pmpriv, OUT t_u8 **pptlv_out) +{ + MrvlIEtypesHeader_t *tlv; + + ENTER(); + + if (pmpriv->wps.wps_ie.vend_hdr.len) { + tlv = (MrvlIEtypesHeader_t *)*pptlv_out; + tlv->type = wlan_cpu_to_le16(VENDOR_SPECIFIC_221); + tlv->len = wlan_cpu_to_le16(pmpriv->wps.wps_ie.vend_hdr.len); + *pptlv_out += sizeof(MrvlIEtypesHeader_t); + memcpy(pmpriv->adapter, *pptlv_out, + pmpriv->wps.wps_ie.vend_hdr.oui, + pmpriv->wps.wps_ie.vend_hdr.len); + *pptlv_out += (pmpriv->wps.wps_ie.vend_hdr.len + + sizeof(MrvlIEtypesHeader_t)); + } + LEAVE(); +} + +/** + * @brief Construct and send multiple scan config commands to the firmware + * + * Previous routines have created a wlan_scan_cmd_config with any requested + * TLVs. This function splits the channel TLV into max_chan_per_scan lists + * and sends the portion of the channel TLV along with the other TLVs + * to the wlan_cmd routines for execution in the firmware. + * + * @param pmpriv A pointer to mlan_private structure + * @param pioctl_buf A pointer to MLAN IOCTL Request buffer + * @param max_chan_per_scan Maximum number channels to be included in each + * scan command sent to firmware + * @param filtered_scan Flag indicating whether or not a BSSID or SSID + * filter is being used for the firmware command + * scan command sent to firmware + * @param pscan_cfg_out Scan configuration used for this scan. + * @param pchan_tlv_out Pointer in the pscan_cfg_out where the channel TLV + * should start. This is past any other TLVs that + * must be sent down in each firmware command. + * @param pscan_chan_list List of channels to scan in max_chan_per_scan segments + * + * @return MLAN_STATUS_SUCCESS or error return otherwise + */ +static mlan_status +wlan_scan_channel_list(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, + IN t_u32 max_chan_per_scan, + IN t_u8 filtered_scan, + OUT wlan_scan_cmd_config *pscan_cfg_out, + OUT MrvlIEtypes_ChanListParamSet_t *pchan_tlv_out, + IN ChanScanParamSet_t *pscan_chan_list) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_adapter *pmadapter = pmpriv->adapter; + ChanScanParamSet_t *ptmp_chan_list; + ChanScanParamSet_t *pstart_chan; + pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *)pioctl_buf; + t_u8 *pchan_tlv_out_temp = MNULL; + t_u8 *ptlv_temp = MNULL; + t_bool foundJPch14 = MFALSE; + t_u16 tlv_buf_len = 0; + t_u32 tlv_idx; + t_u32 total_scan_time; + t_u32 done_early; + t_u32 cmd_no; + t_u32 first_chan = 1; + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; + + ENTER(); + + if (!pscan_cfg_out || !pchan_tlv_out || !pscan_chan_list) { + PRINTM(MINFO, "Scan: Null detect: %p, %p, %p\n", + pscan_cfg_out, pchan_tlv_out, pscan_chan_list); + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_CMD_SCAN_FAIL; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + if (!pscan_chan_list->chan_number) { + PRINTM(MERROR, "Scan: No channel configured\n"); + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_CMD_SCAN_FAIL; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + /* check expiry before preparing scan list - may affect blacklist */ + wlan_11h_get_csa_closed_channel(pmpriv); + + pchan_tlv_out->header.type = wlan_cpu_to_le16(TLV_TYPE_CHANLIST); + + /* Set the temp channel struct pointer to the start of the desired list + */ + ptmp_chan_list = pscan_chan_list; + + /* + * Loop through the desired channel list, sending a new firmware scan + * commands for each max_chan_per_scan channels (or for 1,6,11 + * individually if configured accordingly) + */ + while (ptmp_chan_list->chan_number) { + + tlv_idx = 0; + total_scan_time = 0; + pchan_tlv_out->header.len = 0; + pstart_chan = ptmp_chan_list; + done_early = MFALSE; + + /* + * Construct the Channel TLV for the scan command. Continue to + * insert channel TLVs until: + * - the tlv_idx hits the maximum configured per scan command + * - the next channel to insert is 0 (end of desired + * channel list) + * - done_early is set (controlling individual + * scanning of 1,6,11) + */ + while (tlv_idx < max_chan_per_scan && + ptmp_chan_list->chan_number && !done_early) { + + if (wlan_is_chan_blacklisted(pmpriv, + radio_type_to_band + (ptmp_chan_list-> + radio_type), + ptmp_chan_list-> + chan_number)) { + ptmp_chan_list++; + continue; + } + + if (first_chan) { + ptmp_chan_list->chan_scan_mode.first_chan = + MTRUE; + first_chan = 0; + } + + PRINTM(MINFO, + "Scan: Chan(%3d), Radio(%d), Mode(%d,%d), Dur(%d)\n", + ptmp_chan_list->chan_number, + ptmp_chan_list->radio_type, + ptmp_chan_list->chan_scan_mode.passive_scan, + ptmp_chan_list->chan_scan_mode.disable_chan_filt, + wlan_le16_to_cpu(ptmp_chan_list->max_scan_time)); + + if (foundJPch14 == MTRUE) { + foundJPch14 = MFALSE; + /* Restore the TLV buffer */ + pchan_tlv_out = + (MrvlIEtypes_ChanListParamSet_t *) + pchan_tlv_out_temp; + pchan_tlv_out->header.type = + wlan_cpu_to_le16(TLV_TYPE_CHANLIST); + pchan_tlv_out->header.len = 0; + if (ptlv_temp) { + memcpy(pmadapter, + pscan_cfg_out->tlv_buf, + ptlv_temp, tlv_buf_len); + pcb->moal_mfree(pmadapter->pmoal_handle, + ptlv_temp); + ptlv_temp = MNULL; + } + } + + /* Special Case: For Japan, Scan on CH14 for 11G rates + is not allowed Hence Rates TLV needs to be updated + to support only 11B rates */ + if ((pmadapter->region_code == COUNTRY_CODE_JP_40 || + pmadapter->region_code == COUNTRY_CODE_JP_FF) + && (ptmp_chan_list->chan_number == 14)) { + + t_u8 *ptlv_pos = pscan_cfg_out->tlv_buf; + t_u16 old_ratetlv_len, new_ratetlv_len; + MrvlIEtypesHeader_t *header; + MrvlIEtypes_RatesParamSet_t *prates_tlv; + + /* Preserve the current TLV buffer */ + ret = pcb->moal_malloc(pmadapter->pmoal_handle, + MAX_SCAN_CFG_ALLOC - + CHAN_TLV_MAX_SIZE, + MLAN_MEM_DEF, + (t_u8 **)&ptlv_temp); + if (ret != MLAN_STATUS_SUCCESS || !ptlv_temp) { + PRINTM(MERROR, + "Memory allocation for pscan_cfg_out failed!\n"); + if (pioctl_req) + pioctl_req->status_code = + MLAN_ERROR_NO_MEM; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + pchan_tlv_out_temp = (t_u8 *)pchan_tlv_out; + tlv_buf_len = + (t_u32)(pchan_tlv_out_temp - + pscan_cfg_out->tlv_buf); + memcpy(pmadapter, ptlv_temp, ptlv_pos, + tlv_buf_len); + + /* Search for Rates TLV */ + while ((!foundJPch14) && + (ptlv_pos < pchan_tlv_out_temp)) { + header = (MrvlIEtypesHeader_t *) + ptlv_pos; + if (header->type == + wlan_cpu_to_le16(TLV_TYPE_RATES)) + foundJPch14 = MTRUE; + else + ptlv_pos += + (sizeof + (MrvlIEtypesHeader_t) + + wlan_le16_to_cpu + (header->len)); + } + + if (foundJPch14) { + /* Update the TLV buffer with *new* + Rates TLV and rearrange remaining + TLV buffer */ + prates_tlv = + (MrvlIEtypes_RatesParamSet_t *) + ptlv_pos; + old_ratetlv_len = + sizeof(MrvlIEtypesHeader_t) + + wlan_le16_to_cpu(prates_tlv-> + header.len); + + prates_tlv->header.len = + wlan_copy_rates(prates_tlv-> + rates, 0, + SupportedRates_B, + sizeof + (SupportedRates_B)); + new_ratetlv_len = + sizeof(MrvlIEtypesHeader_t) + + prates_tlv->header.len; + prates_tlv->header.len = + wlan_cpu_to_le16(prates_tlv-> + header.len); + + memmove(pmadapter, + ptlv_pos + new_ratetlv_len, + ptlv_pos + old_ratetlv_len, + (t_u32)(pchan_tlv_out_temp - + (ptlv_pos + + old_ratetlv_len))); + pchan_tlv_out = + (MrvlIEtypes_ChanListParamSet_t + *) + (pchan_tlv_out_temp - + (old_ratetlv_len - + new_ratetlv_len)); + pchan_tlv_out->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_CHANLIST); + pchan_tlv_out->header.len = 0; + } + } + + /* Copy the current channel TLV to the command being + prepared */ + memcpy(pmadapter, + pchan_tlv_out->chan_scan_param + tlv_idx, + ptmp_chan_list, + sizeof(pchan_tlv_out->chan_scan_param)); + + /* Increment the TLV header length by the size appended + */ + pchan_tlv_out->header.len += + sizeof(pchan_tlv_out->chan_scan_param); + + /* + * The tlv buffer length is set to the number of + * bytes of the between the channel tlv pointer + * and the start of the tlv buffer. This + * compensates for any TLVs that were appended + * before the channel list. + */ + pscan_cfg_out->tlv_buf_len = + (t_u32)((t_u8 *)pchan_tlv_out - + pscan_cfg_out->tlv_buf); + + /* Add the size of the channel tlv header and the data + length */ + pscan_cfg_out->tlv_buf_len += + (sizeof(pchan_tlv_out->header) + + pchan_tlv_out->header.len); + + /* Increment the index to the channel tlv we are + constructing */ + tlv_idx++; + + /* Count the total scan time per command */ + total_scan_time += + wlan_le16_to_cpu(ptmp_chan_list->max_scan_time); + + done_early = MFALSE; + + /* + * Stop the loop if the *current* channel is in the 1,6,11 set + * and we are not filtering on a BSSID or SSID. + */ + if (!filtered_scan && + (ptmp_chan_list->chan_number == 1 || + ptmp_chan_list->chan_number == 6 || + ptmp_chan_list->chan_number == 11)) { + done_early = MTRUE; + } + + /* + * Stop the loop if the *current* channel is 14 + * and region code is Japan (0x40 or 0xFF) + */ + if ((pmadapter->region_code == COUNTRY_CODE_JP_40 || + pmadapter->region_code == COUNTRY_CODE_JP_FF) + && (ptmp_chan_list->chan_number == 14)) { + done_early = MTRUE; + } + + /* Increment the tmp pointer to the next channel to be + scanned */ + ptmp_chan_list++; + + /* + * Stop the loop if the *next* channel is in the 1,6,11 set. + * This will cause it to be the only channel scanned on the next + * interation + */ + if (!filtered_scan && + (ptmp_chan_list->chan_number == 1 || + ptmp_chan_list->chan_number == 6 || + ptmp_chan_list->chan_number == 11)) { + done_early = MTRUE; + } + + /* + * Stop the loop if the *next* channel is 14 + * and region code is Japan (0x40 or 0xFF) + */ + if ((pmadapter->region_code == COUNTRY_CODE_JP_40 || + pmadapter->region_code == COUNTRY_CODE_JP_FF) + && (ptmp_chan_list->chan_number == 14)) { + done_early = MTRUE; + } + } + + /* The total scan time should be less than scan command timeout + value */ + if (total_scan_time > MRVDRV_MAX_TOTAL_SCAN_TIME) { + PRINTM(MMSG, + "Total scan time %d ms is over limit (%d ms), scan skipped\n", + total_scan_time, MRVDRV_MAX_TOTAL_SCAN_TIME); + if (pioctl_req) + pioctl_req->status_code = + MLAN_ERROR_CMD_SCAN_FAIL; + ret = MLAN_STATUS_FAILURE; + break; + } + + pchan_tlv_out->header.len = + wlan_cpu_to_le16(pchan_tlv_out->header.len); + + pmadapter->pscan_channels = pstart_chan; + + /* Send the scan command to the firmware with the specified cfg + */ + if (pmadapter->ext_scan) + cmd_no = HostCmd_CMD_802_11_SCAN_EXT; + else + cmd_no = HostCmd_CMD_802_11_SCAN; + ret = wlan_prepare_cmd(pmpriv, + cmd_no, + HostCmd_ACT_GEN_SET, + 0, MNULL, pscan_cfg_out); + if (ret) + break; + } + + LEAVE(); + + if (ptlv_temp) + pcb->moal_mfree(pmadapter->pmoal_handle, ptlv_temp); + + if (ret) + return MLAN_STATUS_FAILURE; + + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Construct a wlan_scan_cmd_config structure to use in scan commands + * + * Application layer or other functions can invoke wlan_scan_networks + * with a scan configuration supplied in a wlan_ioctl_user_scan_cfg struct. + * This structure is used as the basis of one or many wlan_scan_cmd_config + * commands that are sent to the command processing module and sent to + * firmware. + * + * Create a wlan_scan_cmd_config based on the following user supplied + * parameters (if present): + * - SSID filter + * - BSSID filter + * - Number of Probes to be sent + * - Channel list + * + * If the SSID or BSSID filter is not present, disable/clear the filter. + * If the number of probes is not set, use the adapter default setting + * Qualify the channel + * + * @param pmpriv A pointer to mlan_private structure + * @param puser_scan_in MNULL or pointer to scan config parameters + * @param pscan_cfg_out Output parameter: Resulting scan configuration + * @param ppchan_list_out Output parameter: Pointer to the start of the + * channel TLV portion of the output scan config + * @param pscan_chan_list Output parameter: Pointer to the resulting + * channel list to scan + * @param pmax_chan_per_scan Output parameter: Number of channels to scan for + * each issuance of the firmware scan command + * @param pfiltered_scan Output parameter: Flag indicating whether or not + * a BSSID or SSID filter is being sent in the + * command to firmware. Used to increase the number + * of channels sent in a scan command and to + * disable the firmware channel scan filter. + * @param pscan_current_only Output parameter: Flag indicating whether or not + * we are only scanning our current active channel + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_scan_setup_scan_config(IN mlan_private *pmpriv, + IN const wlan_user_scan_cfg *puser_scan_in, + OUT wlan_scan_cmd_config *pscan_cfg_out, + OUT MrvlIEtypes_ChanListParamSet_t + **ppchan_list_out, + OUT ChanScanParamSet_t *pscan_chan_list, + OUT t_u8 *pmax_chan_per_scan, + OUT t_u8 *pfiltered_scan, + OUT t_u8 *pscan_current_only) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + mlan_status ret = MLAN_STATUS_SUCCESS; + MrvlIEtypes_NumProbes_t *pnum_probes_tlv; + MrvlIEtypes_WildCardSsIdParamSet_t *pwildcard_ssid_tlv; + MrvlIEtypes_RatesParamSet_t *prates_tlv; + MrvlIEtypes_Bssid_List_t *pbssid_tlv; + + const t_u8 zero_mac[MLAN_MAC_ADDR_LENGTH] = { 0, 0, 0, 0, 0, 0 }; + t_u8 *ptlv_pos; + t_u32 num_probes; + t_u32 ssid_len; + t_u32 chan_idx; + t_u32 scan_type; + t_u16 scan_dur; + t_u8 channel; + t_u8 radio_type; + t_u32 ssid_idx; + t_u8 ssid_filter; + WLAN_802_11_RATES rates; + t_u32 rates_size; + MrvlIETypes_HTCap_t *pht_cap; + + MrvlIETypes_VHTCap_t *pvht_cap; + MrvlIEtypes_ScanChanGap_t *pscan_gap_tlv; + MrvlIEtypes_BssMode_t *pbss_mode; + ENTER(); + + /* The tlv_buf_len is calculated for each scan command. The TLVs added + in this routine will be preserved since the routine that sends the + command will append channelTLVs at *ppchan_list_out. The difference + between the *ppchan_list_out and the tlv_buf start will be used to + calculate the size of anything we add in this routine. */ + pscan_cfg_out->tlv_buf_len = 0; + + /* Running tlv pointer. Assigned to ppchan_list_out at end of function + so later routines know where channels can be added to the command + buf */ + ptlv_pos = pscan_cfg_out->tlv_buf; + + /* Initialize the scan as un-filtered; the flag is later set to TRUE + below if a SSID or BSSID filter is sent in the command */ + *pfiltered_scan = MFALSE; + + /* Initialize the scan as not being only on the current channel. If + the channel list is customized, only contains one channel, and is + the active channel, this is set true and data flow is not halted. */ + *pscan_current_only = MFALSE; + + if (puser_scan_in) { + + ssid_filter = MFALSE; + + /* Set the bss type scan filter, use Adapter setting if unset */ + pscan_cfg_out->bss_mode = (puser_scan_in->bss_mode + ? (t_u8)puser_scan_in->bss_mode : + (t_u8)pmadapter->scan_mode); + + /* Set the number of probes to send, use Adapter setting if + unset */ + num_probes = + (puser_scan_in->num_probes ? puser_scan_in-> + num_probes : pmadapter->scan_probes); + /* + * Set the BSSID filter to the incoming configuration, + * if non-zero. If not set, it will remain disabled + * (all zeros). + */ + memcpy(pmadapter, pscan_cfg_out->specific_bssid, + puser_scan_in->specific_bssid, + sizeof(pscan_cfg_out->specific_bssid)); + + if (pmadapter->ext_scan + && memcmp(pmadapter, pscan_cfg_out->specific_bssid, + &zero_mac, sizeof(zero_mac))) { + pbssid_tlv = (MrvlIEtypes_Bssid_List_t *)ptlv_pos; + pbssid_tlv->header.type = TLV_TYPE_BSSID; + pbssid_tlv->header.len = MLAN_MAC_ADDR_LENGTH; + memcpy(pmadapter, pbssid_tlv->bssid, + puser_scan_in->specific_bssid, + MLAN_MAC_ADDR_LENGTH); + ptlv_pos += sizeof(MrvlIEtypes_Bssid_List_t); + } + + for (ssid_idx = 0; + ((ssid_idx < NELEMENTS(puser_scan_in->ssid_list)) + && (*puser_scan_in->ssid_list[ssid_idx].ssid || + puser_scan_in->ssid_list[ssid_idx].max_len)); + ssid_idx++) { + + ssid_len = + wlan_strlen((char *)puser_scan_in-> + ssid_list[ssid_idx].ssid); + + pwildcard_ssid_tlv + = + (MrvlIEtypes_WildCardSsIdParamSet_t *)ptlv_pos; + pwildcard_ssid_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_WILDCARDSSID); + pwildcard_ssid_tlv->header.len = + (t_u16)(ssid_len + + sizeof(pwildcard_ssid_tlv-> + max_ssid_length)); + pwildcard_ssid_tlv->max_ssid_length = + puser_scan_in->ssid_list[ssid_idx].max_len; + + memcpy(pmadapter, pwildcard_ssid_tlv->ssid, + puser_scan_in->ssid_list[ssid_idx].ssid, + MIN(MLAN_MAX_SSID_LENGTH, ssid_len)); + + ptlv_pos += (sizeof(pwildcard_ssid_tlv->header) + + pwildcard_ssid_tlv->header.len); + + pwildcard_ssid_tlv->header.len + = + wlan_cpu_to_le16(pwildcard_ssid_tlv->header. + len); + + PRINTM(MINFO, "Scan: ssid_list[%d]: %s, %d\n", + ssid_idx, + pwildcard_ssid_tlv->ssid, + pwildcard_ssid_tlv->max_ssid_length); + + if (ssid_len) + ssid_filter = MTRUE; + } + + /* + * The default number of channels sent in the command is low to + * ensure the response buffer from the firmware does not + * truncate scan results. That is not an issue with an SSID or + * BSSID filter applied to the scan results in the firmware. + */ + if ((ssid_idx && ssid_filter) || + memcmp(pmadapter, pscan_cfg_out->specific_bssid, &zero_mac, + sizeof(zero_mac))) { + *pfiltered_scan = MTRUE; + } + + } else { + pscan_cfg_out->bss_mode = (t_u8)pmadapter->scan_mode; + num_probes = pmadapter->scan_probes; + } + + /* + * If a specific BSSID or SSID is used, the number of channels in + * the scan command will be increased to the absolute maximum. + */ + if (*pfiltered_scan) + *pmax_chan_per_scan = MRVDRV_MAX_CHANNELS_PER_SPECIFIC_SCAN; + else + *pmax_chan_per_scan = MRVDRV_CHANNELS_PER_SCAN_CMD; + + if (puser_scan_in && puser_scan_in->scan_chan_gap) { + *pmax_chan_per_scan = MRVDRV_MAX_CHANNELS_PER_SPECIFIC_SCAN; + PRINTM(MINFO, "Scan: channel gap = %d\n", + puser_scan_in->scan_chan_gap); + pscan_gap_tlv = (MrvlIEtypes_ScanChanGap_t *)ptlv_pos; + pscan_gap_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_SCAN_CHANNEL_GAP); + pscan_gap_tlv->header.len = sizeof(pscan_gap_tlv->gap); + pscan_gap_tlv->gap = + wlan_cpu_to_le16((t_u16)puser_scan_in->scan_chan_gap); + ptlv_pos += + sizeof(pscan_gap_tlv->header) + + pscan_gap_tlv->header.len; + pscan_gap_tlv->header.len = + wlan_cpu_to_le16(pscan_gap_tlv->header.len); + } + if (pmadapter->ext_scan) { + pbss_mode = (MrvlIEtypes_BssMode_t *) ptlv_pos; + pbss_mode->header.type = wlan_cpu_to_le16(TLV_TYPE_BSS_MODE); + pbss_mode->header.len = sizeof(pbss_mode->bss_mode); + pbss_mode->bss_mode = pscan_cfg_out->bss_mode; + ptlv_pos += sizeof(pbss_mode->header) + pbss_mode->header.len; + pbss_mode->header.len = wlan_cpu_to_le16(pbss_mode->header.len); + } + /* If the input config or adapter has the number of Probes set, add tlv + */ + if (num_probes) { + + PRINTM(MINFO, "Scan: num_probes = %d\n", num_probes); + + pnum_probes_tlv = (MrvlIEtypes_NumProbes_t *)ptlv_pos; + pnum_probes_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_NUMPROBES); + pnum_probes_tlv->header.len = + sizeof(pnum_probes_tlv->num_probes); + pnum_probes_tlv->num_probes = + wlan_cpu_to_le16((t_u16)num_probes); + + ptlv_pos += + sizeof(pnum_probes_tlv->header) + + pnum_probes_tlv->header.len; + + pnum_probes_tlv->header.len = + wlan_cpu_to_le16(pnum_probes_tlv->header.len); + } + + /* Append rates tlv */ + memset(pmadapter, rates, 0, sizeof(rates)); + + rates_size = wlan_get_supported_rates(pmpriv, pmpriv->bss_mode, + (pmpriv->bss_mode == + MLAN_BSS_MODE_INFRA) ? pmpriv-> + config_bands : pmadapter-> + adhoc_start_band, rates); + + prates_tlv = (MrvlIEtypes_RatesParamSet_t *)ptlv_pos; + prates_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_RATES); + prates_tlv->header.len = wlan_cpu_to_le16((t_u16)rates_size); + memcpy(pmadapter, prates_tlv->rates, rates, rates_size); + ptlv_pos += sizeof(prates_tlv->header) + rates_size; + + PRINTM(MINFO, "SCAN_CMD: Rates size = %d\n", rates_size); + + if (ISSUPP_11NENABLED(pmpriv->adapter->fw_cap_info) + && (pmpriv->config_bands & BAND_GN + || pmpriv->config_bands & BAND_AN)) { + pht_cap = (MrvlIETypes_HTCap_t *)ptlv_pos; + memset(pmadapter, pht_cap, 0, sizeof(MrvlIETypes_HTCap_t)); + pht_cap->header.type = wlan_cpu_to_le16(HT_CAPABILITY); + pht_cap->header.len = sizeof(HTCap_t); + wlan_fill_ht_cap_tlv(pmpriv, pht_cap, pmpriv->config_bands); + HEXDUMP("SCAN: HT_CAPABILITIES IE", (t_u8 *)pht_cap, + sizeof(MrvlIETypes_HTCap_t)); + ptlv_pos += sizeof(MrvlIETypes_HTCap_t); + pht_cap->header.len = wlan_cpu_to_le16(pht_cap->header.len); + } + + if (ISSUPP_11ACENABLED(pmpriv->adapter->fw_cap_info) + && (pmpriv->config_bands & BAND_AAC)) { + pvht_cap = (MrvlIETypes_VHTCap_t *)ptlv_pos; + memset(pmadapter, pvht_cap, 0, sizeof(MrvlIETypes_VHTCap_t)); + pvht_cap->header.type = wlan_cpu_to_le16(VHT_CAPABILITY); + pvht_cap->header.len = sizeof(VHT_capa_t); + wlan_fill_vht_cap_tlv(pmpriv, pvht_cap, pmpriv->config_bands); + HEXDUMP("SCAN: VHT_CAPABILITIES IE", (t_u8 *)pvht_cap, + sizeof(MrvlIETypes_VHTCap_t)); + ptlv_pos += sizeof(MrvlIETypes_VHTCap_t); + pvht_cap->header.len = wlan_cpu_to_le16(pvht_cap->header.len); + } + if (wlan_is_ext_capa_support(pmpriv)) + wlan_add_ext_capa_info_ie(pmpriv, &ptlv_pos); + wlan_add_wps_probe_request_ie(pmpriv, &ptlv_pos); + + /* + * Set the output for the channel TLV to the address in the tlv buffer + * past any TLVs that were added in this function (SSID, num_probes). + * Channel TLVs will be added past this for each scan command, + * preserving the TLVs that were previously added. + */ + *ppchan_list_out = (MrvlIEtypes_ChanListParamSet_t *)ptlv_pos; + + if (puser_scan_in && puser_scan_in->chan_list[0].chan_number) { + + PRINTM(MINFO, "Scan: Using supplied channel list\n"); + + for (chan_idx = 0; + chan_idx < WLAN_USER_SCAN_CHAN_MAX + && puser_scan_in->chan_list[chan_idx].chan_number; + chan_idx++) { + + channel = + puser_scan_in->chan_list[chan_idx].chan_number; + (pscan_chan_list + chan_idx)->chan_number = channel; + + radio_type = + puser_scan_in->chan_list[chan_idx].radio_type; + (pscan_chan_list + chan_idx)->radio_type = radio_type; + + scan_type = + puser_scan_in->chan_list[chan_idx].scan_type; + if (scan_type == MLAN_SCAN_TYPE_UNCHANGED) + scan_type = pmadapter->scan_type; + + if (radio_type == HostCmd_SCAN_RADIO_TYPE_A) { + if (pmadapter->fw_bands & BAND_A) + PRINTM(MINFO, + "UserScan request for A Band channel %d!!\n", + channel); + else { + PRINTM(MERROR, + "Scan in A band is not allowed!!\n"); + ret = MLAN_STATUS_FAILURE; + LEAVE(); + return ret; + + } + } + + /* Prevent active scanning on a radar controlled + channel */ + if (radio_type == HostCmd_SCAN_RADIO_TYPE_A) { + if (wlan_11h_radar_detect_required + (pmpriv, channel)) { + scan_type = MLAN_SCAN_TYPE_PASSIVE; + } + } + if (radio_type == HostCmd_SCAN_RADIO_TYPE_BG) { + if (wlan_bg_scan_type_is_passive + (pmpriv, channel)) { + scan_type = MLAN_SCAN_TYPE_PASSIVE; + } + } + if (scan_type == MLAN_SCAN_TYPE_PASSIVE) { + (pscan_chan_list + + chan_idx)->chan_scan_mode.passive_scan = MTRUE; + } else { + (pscan_chan_list + + chan_idx)->chan_scan_mode.passive_scan = + MFALSE; + } + + if (puser_scan_in->chan_list[chan_idx].scan_time) { + scan_dur = + (t_u16)puser_scan_in-> + chan_list[chan_idx].scan_time; + } else { + if (scan_type == MLAN_SCAN_TYPE_PASSIVE) { + scan_dur = pmadapter->passive_scan_time; + } else if (*pfiltered_scan) { + scan_dur = + pmadapter->specific_scan_time; + } else { + scan_dur = pmadapter->active_scan_time; + } + } + if (pmadapter->coex_scan && + pmadapter->coex_min_scan_time && + (pmadapter->coex_min_scan_time > scan_dur)) + scan_dur = pmadapter->coex_min_scan_time; + (pscan_chan_list + chan_idx)->min_scan_time = + wlan_cpu_to_le16(scan_dur); + (pscan_chan_list + chan_idx)->max_scan_time = + wlan_cpu_to_le16(scan_dur); + if (*pfiltered_scan) { + (pscan_chan_list + + chan_idx)->chan_scan_mode.disable_chan_filt = + MTRUE; + } + } + + /* Check if we are only scanning the current channel */ + if ((chan_idx == 1) + && (puser_scan_in->chan_list[0].chan_number + == pmpriv->curr_bss_params.bss_descriptor.channel)) { + *pscan_current_only = MTRUE; + PRINTM(MINFO, "Scan: Scanning current channel only\n"); + } + + } else { + PRINTM(MINFO, "Scan: Creating full region channel list\n"); + wlan_scan_create_channel_list(pmpriv, puser_scan_in, + pscan_chan_list, *pfiltered_scan); + } + + LEAVE(); + return ret; +} + +/** + * @brief Inspect the scan response buffer for pointers to expected TLVs + * + * TLVs can be included at the end of the scan response BSS information. + * Parse the data in the buffer for pointers to TLVs that can potentially + * be passed back in the response + * + * @param pmadapter Pointer to the mlan_adapter structure + * @param ptlv Pointer to the start of the TLV buffer to parse + * @param tlv_buf_size Size of the TLV buffer + * @param req_tlv_type Request TLV's type + * @param pptlv Output parameter: Pointer to the request TLV if found + * + * @return N/A + */ +static t_void +wlan_ret_802_11_scan_get_tlv_ptrs(IN pmlan_adapter pmadapter, + IN MrvlIEtypes_Data_t *ptlv, + IN t_u32 tlv_buf_size, + IN t_u32 req_tlv_type, + OUT MrvlIEtypes_Data_t **pptlv) +{ + MrvlIEtypes_Data_t *pcurrent_tlv; + t_u32 tlv_buf_left; + t_u32 tlv_type; + t_u32 tlv_len; + + ENTER(); + + pcurrent_tlv = ptlv; + tlv_buf_left = tlv_buf_size; + *pptlv = MNULL; + + PRINTM(MINFO, "SCAN_RESP: tlv_buf_size = %d\n", tlv_buf_size); + + while (tlv_buf_left >= sizeof(MrvlIEtypesHeader_t)) { + + tlv_type = wlan_le16_to_cpu(pcurrent_tlv->header.type); + tlv_len = wlan_le16_to_cpu(pcurrent_tlv->header.len); + + if (sizeof(ptlv->header) + tlv_len > tlv_buf_left) { + PRINTM(MERROR, "SCAN_RESP: TLV buffer corrupt\n"); + break; + } + + if (req_tlv_type == tlv_type) { + switch (tlv_type) { + case TLV_TYPE_TSFTIMESTAMP: + PRINTM(MINFO, + "SCAN_RESP: TSF Timestamp TLV, len = %d\n", + tlv_len); + *pptlv = (MrvlIEtypes_Data_t *)pcurrent_tlv; + break; + case TLV_TYPE_CHANNELBANDLIST: + PRINTM(MINFO, + "SCAN_RESP: CHANNEL BAND LIST TLV, len = %d\n", + tlv_len); + *pptlv = (MrvlIEtypes_Data_t *)pcurrent_tlv; + break; + case TLV_TYPE_CHANNEL_STATS: + PRINTM(MINFO, + "SCAN_RESP: CHANNEL STATS TLV, len = %d\n", + tlv_len); + *pptlv = (MrvlIEtypes_Data_t *)pcurrent_tlv; + break; + default: + PRINTM(MERROR, + "SCAN_RESP: Unhandled TLV = %d\n", + tlv_type); + /* Give up, this seems corrupted */ + LEAVE(); + return; + } + } + + if (*pptlv) { + /* HEXDUMP("SCAN_RESP: TLV Buf", (t_u8 *)*pptlv+4, + tlv_len); */ + break; + } + + tlv_buf_left -= (sizeof(ptlv->header) + tlv_len); + pcurrent_tlv = + (MrvlIEtypes_Data_t *)(pcurrent_tlv->data + tlv_len); + + } /* while */ + + LEAVE(); +} + +/** + * @brief Interpret a BSS scan response returned from the firmware + * + * Parse the various fixed fields and IEs passed back for a BSS probe + * response or beacon from the scan command. Record information as needed + * in the scan table BSSDescriptor_t for that entry. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pbss_entry Output parameter: Pointer to the BSS Entry + * @param pbeacon_info Pointer to the Beacon information + * @param bytes_left Number of bytes left to parse + * @param ext_scan extended scan + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_interpret_bss_desc_with_ie(IN pmlan_adapter pmadapter, + OUT BSSDescriptor_t *pbss_entry, + IN t_u8 **pbeacon_info, + IN t_u32 *bytes_left, IN t_u8 ext_scan) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + IEEEtypes_ElementId_e element_id; + IEEEtypes_FhParamSet_t *pfh_param_set; + IEEEtypes_DsParamSet_t *pds_param_set; + IEEEtypes_CfParamSet_t *pcf_param_set; + IEEEtypes_IbssParamSet_t *pibss_param_set; + IEEEtypes_CapInfo_t *pcap_info; + WLAN_802_11_FIXED_IEs fixed_ie; + t_u8 *pcurrent_ptr; + t_u8 *prate; + t_u8 element_len; + t_u16 total_ie_len; + t_u8 bytes_to_copy; + t_u8 rate_size; + t_u16 beacon_size; + t_u8 found_data_rate_ie; + t_u32 bytes_left_for_current_beacon; + IEEEtypes_ERPInfo_t *perp_info; + + IEEEtypes_VendorSpecific_t *pvendor_ie; + const t_u8 wpa_oui[4] = { 0x00, 0x50, 0xf2, 0x01 }; + const t_u8 wmm_oui[4] = { 0x00, 0x50, 0xf2, 0x02 }; + const t_u8 osen_oui[] = { 0x50, 0x6f, 0x9a, 0x12 }; + + IEEEtypes_CountryInfoSet_t *pcountry_info; + + ENTER(); + + found_data_rate_ie = MFALSE; + rate_size = 0; + beacon_size = 0; + + if (*bytes_left >= sizeof(beacon_size)) { + /* Extract & convert beacon size from the command buffer */ + memcpy(pmadapter, &beacon_size, *pbeacon_info, + sizeof(beacon_size)); + beacon_size = wlan_le16_to_cpu(beacon_size); + *bytes_left -= sizeof(beacon_size); + *pbeacon_info += sizeof(beacon_size); + } + + if (!beacon_size || beacon_size > *bytes_left) { + + *pbeacon_info += *bytes_left; + *bytes_left = 0; + + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + /* Initialize the current working beacon pointer for this BSS iteration + */ + pcurrent_ptr = *pbeacon_info; + + /* Advance the return beacon pointer past the current beacon */ + *pbeacon_info += beacon_size; + *bytes_left -= beacon_size; + + bytes_left_for_current_beacon = beacon_size; + + if (bytes_left_for_current_beacon < + (MLAN_MAC_ADDR_LENGTH + sizeof(t_u8) + + sizeof(WLAN_802_11_FIXED_IEs))) { + PRINTM(MERROR, "InterpretIE: Not enough bytes left\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + memcpy(pmadapter, pbss_entry->mac_address, pcurrent_ptr, + MLAN_MAC_ADDR_LENGTH); + PRINTM(MINFO, "InterpretIE: AP MAC Addr-" MACSTR "\n", + MAC2STR(pbss_entry->mac_address)); + + pcurrent_ptr += MLAN_MAC_ADDR_LENGTH; + bytes_left_for_current_beacon -= MLAN_MAC_ADDR_LENGTH; + + /* + * Next 4 fields are RSSI (for legacy scan only), time stamp, + * beacon interval, and capability information + */ + if (!ext_scan) { + /* RSSI is 1 byte long */ + pbss_entry->rssi = (t_s32)(*pcurrent_ptr); + PRINTM(MINFO, "InterpretIE: RSSI=%02X\n", *pcurrent_ptr); + pcurrent_ptr += 1; + bytes_left_for_current_beacon -= 1; + } + + /* + * The RSSI is not part of the beacon/probe response. After we have + * advanced pcurrent_ptr past the RSSI field, save the remaining + * data for use at the application layer + */ + pbss_entry->pbeacon_buf = pcurrent_ptr; + pbss_entry->beacon_buf_size = bytes_left_for_current_beacon; + + /* Time stamp is 8 bytes long */ + memcpy(pmadapter, fixed_ie.time_stamp, pcurrent_ptr, 8); + memcpy(pmadapter, pbss_entry->time_stamp, pcurrent_ptr, 8); + pcurrent_ptr += 8; + bytes_left_for_current_beacon -= 8; + + /* Beacon interval is 2 bytes long */ + memcpy(pmadapter, &fixed_ie.beacon_interval, pcurrent_ptr, 2); + pbss_entry->beacon_period = wlan_le16_to_cpu(fixed_ie.beacon_interval); + pcurrent_ptr += 2; + bytes_left_for_current_beacon -= 2; + + /* Capability information is 2 bytes long */ + memcpy(pmadapter, &fixed_ie.capabilities, pcurrent_ptr, 2); + PRINTM(MINFO, "InterpretIE: fixed_ie.capabilities=0x%X\n", + fixed_ie.capabilities); + fixed_ie.capabilities = wlan_le16_to_cpu(fixed_ie.capabilities); + pcap_info = (IEEEtypes_CapInfo_t *)&fixed_ie.capabilities; + memcpy(pmadapter, &pbss_entry->cap_info, pcap_info, + sizeof(IEEEtypes_CapInfo_t)); + pcurrent_ptr += 2; + bytes_left_for_current_beacon -= 2; + + /* Rest of the current buffer are IE's */ + PRINTM(MINFO, "InterpretIE: IELength for this AP = %d\n", + bytes_left_for_current_beacon); + + HEXDUMP("InterpretIE: IE info", (t_u8 *)pcurrent_ptr, + bytes_left_for_current_beacon); + + if (pcap_info->privacy) { + PRINTM(MINFO, "InterpretIE: AP WEP enabled\n"); + pbss_entry->privacy = Wlan802_11PrivFilter8021xWEP; + } else { + pbss_entry->privacy = Wlan802_11PrivFilterAcceptAll; + } + + if (pcap_info->ibss == 1) + pbss_entry->bss_mode = MLAN_BSS_MODE_IBSS; + else + pbss_entry->bss_mode = MLAN_BSS_MODE_INFRA; + + if (pcap_info->spectrum_mgmt == 1) { + PRINTM(MINFO, "InterpretIE: 11h- Spectrum Management " + "capability bit found\n"); + pbss_entry->wlan_11h_bss_info.sensed_11h = 1; + } + + /* Process variable IE */ + while (bytes_left_for_current_beacon >= 2) { + element_id = (IEEEtypes_ElementId_e)(*((t_u8 *)pcurrent_ptr)); + element_len = *((t_u8 *)pcurrent_ptr + 1); + total_ie_len = element_len + sizeof(IEEEtypes_Header_t); + + if (bytes_left_for_current_beacon < total_ie_len) { + PRINTM(MERROR, "InterpretIE: Error in processing IE, " + "bytes left < IE length\n"); + bytes_left_for_current_beacon = 0; + continue; + } + + switch (element_id) { + + case SSID: + if (element_len > MRVDRV_MAX_SSID_LENGTH) { + bytes_left_for_current_beacon = 0; + continue; + } + if (!pbss_entry->ssid.ssid_len) { + pbss_entry->ssid.ssid_len = element_len; + memcpy(pmadapter, pbss_entry->ssid.ssid, + (pcurrent_ptr + 2), element_len); + } + PRINTM(MINFO, "InterpretIE: ssid: %-32s\n", + pbss_entry->ssid.ssid); + break; + + case SUPPORTED_RATES: + if (element_len > WLAN_SUPPORTED_RATES) { + bytes_left_for_current_beacon = 0; + continue; + } + memcpy(pmadapter, pbss_entry->data_rates, + pcurrent_ptr + 2, element_len); + memcpy(pmadapter, pbss_entry->supported_rates, + pcurrent_ptr + 2, element_len); + HEXDUMP("InterpretIE: SupportedRates:", + pbss_entry->supported_rates, element_len); + rate_size = element_len; + found_data_rate_ie = MTRUE; + break; + + case FH_PARAM_SET: + pfh_param_set = (IEEEtypes_FhParamSet_t *)pcurrent_ptr; + pbss_entry->network_type_use = Wlan802_11FH; + memcpy(pmadapter, + &pbss_entry->phy_param_set.fh_param_set, + pfh_param_set, MIN(total_ie_len, + sizeof + (IEEEtypes_FhParamSet_t))); + pbss_entry->phy_param_set.fh_param_set.len = + MIN(element_len, (sizeof(IEEEtypes_FhParamSet_t) + - + sizeof(IEEEtypes_Header_t))); + pbss_entry->phy_param_set.fh_param_set.dwell_time = + wlan_le16_to_cpu(pbss_entry->phy_param_set. + fh_param_set.dwell_time); + break; + + case DS_PARAM_SET: + pds_param_set = (IEEEtypes_DsParamSet_t *)pcurrent_ptr; + + pbss_entry->network_type_use = Wlan802_11DS; + pbss_entry->channel = pds_param_set->current_chan; + + memcpy(pmadapter, + &pbss_entry->phy_param_set.ds_param_set, + pds_param_set, MIN(total_ie_len, + sizeof + (IEEEtypes_DsParamSet_t))); + pbss_entry->phy_param_set.ds_param_set.len = + MIN(element_len, (sizeof(IEEEtypes_DsParamSet_t) + - + sizeof(IEEEtypes_Header_t))); + break; + + case CF_PARAM_SET: + pcf_param_set = (IEEEtypes_CfParamSet_t *)pcurrent_ptr; + memcpy(pmadapter, + &pbss_entry->ss_param_set.cf_param_set, + pcf_param_set, MIN(total_ie_len, + sizeof + (IEEEtypes_CfParamSet_t))); + pbss_entry->ss_param_set.cf_param_set.len = + MIN(element_len, (sizeof(IEEEtypes_CfParamSet_t) + - + sizeof(IEEEtypes_Header_t))); + break; + + case IBSS_PARAM_SET: + pibss_param_set = + (IEEEtypes_IbssParamSet_t *)pcurrent_ptr; + pbss_entry->atim_window = + wlan_le16_to_cpu(pibss_param_set->atim_window); + memcpy(pmadapter, + &pbss_entry->ss_param_set.ibss_param_set, + pibss_param_set, MIN(total_ie_len, + sizeof + (IEEEtypes_IbssParamSet_t))); + pbss_entry->ss_param_set.ibss_param_set.len = + MIN(element_len, + (sizeof(IEEEtypes_IbssParamSet_t) + - sizeof(IEEEtypes_Header_t))); + break; + + /* Handle Country Info IE */ + case COUNTRY_INFO: + pcountry_info = + (IEEEtypes_CountryInfoSet_t *)pcurrent_ptr; + + if (pcountry_info->len < + sizeof(pcountry_info->country_code) || + (unsigned)(pcountry_info->len + 2) > + sizeof(IEEEtypes_CountryInfoFullSet_t)) { + PRINTM(MERROR, + "InterpretIE: 11D- Err " + "country_info len =%d min=%d max=%d\n", + pcountry_info->len, + sizeof(pcountry_info->country_code), + sizeof(IEEEtypes_CountryInfoFullSet_t)); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + memcpy(pmadapter, &pbss_entry->country_info, + pcountry_info, pcountry_info->len + 2); + HEXDUMP("InterpretIE: 11D- country_info:", + (t_u8 *)pcountry_info, + (t_u32)(pcountry_info->len + 2)); + break; + + case ERP_INFO: + perp_info = (IEEEtypes_ERPInfo_t *)pcurrent_ptr; + pbss_entry->erp_flags = perp_info->erp_flags; + break; + + case POWER_CONSTRAINT: + case POWER_CAPABILITY: + case TPC_REPORT: + case CHANNEL_SWITCH_ANN: + case QUIET: + case IBSS_DFS: + case SUPPORTED_CHANNELS: + case TPC_REQUEST: + wlan_11h_process_bss_elem(pmadapter, + &pbss_entry-> + wlan_11h_bss_info, + pcurrent_ptr); + break; + case EXTENDED_SUPPORTED_RATES: + /* + * Only process extended supported rate + * if data rate is already found. + * Data rate IE should come before + * extended supported rate IE + */ + if (found_data_rate_ie) { + if ((element_len + rate_size) > + WLAN_SUPPORTED_RATES) { + bytes_to_copy = + (WLAN_SUPPORTED_RATES - + rate_size); + } else { + bytes_to_copy = element_len; + } + + prate = (t_u8 *)pbss_entry->data_rates; + prate += rate_size; + memcpy(pmadapter, prate, pcurrent_ptr + 2, + bytes_to_copy); + + prate = (t_u8 *)pbss_entry->supported_rates; + prate += rate_size; + memcpy(pmadapter, prate, pcurrent_ptr + 2, + bytes_to_copy); + } + HEXDUMP("InterpretIE: ExtSupportedRates:", + pbss_entry->supported_rates, + element_len + rate_size); + break; + + case VENDOR_SPECIFIC_221: + pvendor_ie = (IEEEtypes_VendorSpecific_t *)pcurrent_ptr; + + if (!memcmp + (pmadapter, pvendor_ie->vend_hdr.oui, wpa_oui, + sizeof(wpa_oui))) { + pbss_entry->pwpa_ie = + (IEEEtypes_VendorSpecific_t *) + pcurrent_ptr; + pbss_entry->wpa_offset = + (t_u16)(pcurrent_ptr - + pbss_entry->pbeacon_buf); + HEXDUMP("InterpretIE: Resp WPA_IE", + (t_u8 *)pbss_entry->pwpa_ie, + ((*(pbss_entry->pwpa_ie)).vend_hdr.len + + sizeof(IEEEtypes_Header_t))); + } else if (!memcmp + (pmadapter, pvendor_ie->vend_hdr.oui, + wmm_oui, sizeof(wmm_oui))) { + if (total_ie_len == + sizeof(IEEEtypes_WmmParameter_t) + || total_ie_len == + sizeof(IEEEtypes_WmmInfo_t)) { + + /* + * Only accept and copy the WMM IE if + * it matches the size expected for the + * WMM Info IE or the WMM Parameter IE. + */ + memcpy(pmadapter, + (t_u8 *)&pbss_entry->wmm_ie, + pcurrent_ptr, total_ie_len); + HEXDUMP("InterpretIE: Resp WMM_IE", + (t_u8 *)&pbss_entry->wmm_ie, + total_ie_len); + } + } else if (!memcmp(pmadapter, pvendor_ie->vend_hdr.oui, + osen_oui, sizeof(osen_oui))) { + pbss_entry->posen_ie = + (IEEEtypes_Generic_t *)pcurrent_ptr; + pbss_entry->osen_offset = + (t_u16)(pcurrent_ptr - + pbss_entry->pbeacon_buf); + HEXDUMP("InterpretIE: Resp OSEN_IE", + (t_u8 *)pbss_entry->posen_ie, + (*(pbss_entry->posen_ie)).ieee_hdr.len + + sizeof(IEEEtypes_Header_t)); + } + break; + case RSN_IE: + pbss_entry->prsn_ie = + (IEEEtypes_Generic_t *)pcurrent_ptr; + pbss_entry->rsn_offset = + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); + HEXDUMP("InterpretIE: Resp RSN_IE", + (t_u8 *)pbss_entry->prsn_ie, + (*(pbss_entry->prsn_ie)).ieee_hdr.len + + sizeof(IEEEtypes_Header_t)); + break; + case WAPI_IE: + pbss_entry->pwapi_ie = + (IEEEtypes_Generic_t *)pcurrent_ptr; + pbss_entry->wapi_offset = + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); + HEXDUMP("InterpretIE: Resp WAPI_IE", + (t_u8 *)pbss_entry->pwapi_ie, + (*(pbss_entry->pwapi_ie)).ieee_hdr.len + + sizeof(IEEEtypes_Header_t)); + break; + case HT_CAPABILITY: + pbss_entry->pht_cap = (IEEEtypes_HTCap_t *)pcurrent_ptr; + pbss_entry->ht_cap_offset = + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); + HEXDUMP("InterpretIE: Resp HTCAP_IE", + (t_u8 *)pbss_entry->pht_cap, + (*(pbss_entry->pht_cap)).ieee_hdr.len + + sizeof(IEEEtypes_Header_t)); + break; + case HT_OPERATION: + pbss_entry->pht_info = + (IEEEtypes_HTInfo_t *)pcurrent_ptr; + pbss_entry->ht_info_offset = + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); + HEXDUMP("InterpretIE: Resp HTINFO_IE", + (t_u8 *)pbss_entry->pht_info, + (*(pbss_entry->pht_info)).ieee_hdr.len + + sizeof(IEEEtypes_Header_t)); + break; + case BSSCO_2040: + pbss_entry->pbss_co_2040 = + (IEEEtypes_2040BSSCo_t *)pcurrent_ptr; + pbss_entry->bss_co_2040_offset = + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); + HEXDUMP("InterpretIE: Resp 2040BSSCOEXISTANCE_IE", + (t_u8 *)pbss_entry->pbss_co_2040, + (*(pbss_entry->pbss_co_2040)).ieee_hdr.len + + sizeof(IEEEtypes_Header_t)); + break; + case EXT_CAPABILITY: + pbss_entry->pext_cap = + (IEEEtypes_ExtCap_t *)pcurrent_ptr; + pbss_entry->ext_cap_offset = + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); + HEXDUMP("InterpretIE: Resp EXTCAP_IE", + (t_u8 *)pbss_entry->pext_cap, + (*(pbss_entry->pext_cap)).ieee_hdr.len + + sizeof(IEEEtypes_Header_t)); + break; + case OVERLAPBSSSCANPARAM: + pbss_entry->poverlap_bss_scan_param = + (IEEEtypes_OverlapBSSScanParam_t *)pcurrent_ptr; + pbss_entry->overlap_bss_offset = + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); + HEXDUMP("InterpretIE: Resp OBSS_IE", + (t_u8 *)pbss_entry->poverlap_bss_scan_param, + (*(pbss_entry->poverlap_bss_scan_param)). + ieee_hdr.len + sizeof(IEEEtypes_Header_t)); + break; + case VHT_CAPABILITY: + pbss_entry->pvht_cap = + (IEEEtypes_VHTCap_t *)pcurrent_ptr; + pbss_entry->vht_cap_offset = + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); + HEXDUMP("InterpretIE: Resp VHTCAP_IE", + (t_u8 *)pbss_entry->pvht_cap, + (*(pbss_entry->pvht_cap)).ieee_hdr.len + + sizeof(IEEEtypes_Header_t)); + break; + case VHT_OPERATION: + pbss_entry->pvht_oprat = + (IEEEtypes_VHTOprat_t *)pcurrent_ptr; + pbss_entry->vht_oprat_offset = + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); + HEXDUMP("InterpretIE: Resp VHTOPER_IE", + (t_u8 *)pbss_entry->pvht_oprat, + (*(pbss_entry->pvht_oprat)).ieee_hdr.len + + sizeof(IEEEtypes_Header_t)); + break; + case EXT_BSS_LOAD: + pbss_entry->pext_bssload = + (IEEEtypes_ExtBSSload_t *)pcurrent_ptr; + pbss_entry->ext_bssload_offset = + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); + HEXDUMP("InterpretIE: Resp EXTBSSLOAD_IE", + (t_u8 *)pbss_entry->pext_bssload, + (*(pbss_entry->pext_bssload)).ieee_hdr.len + + sizeof(IEEEtypes_Header_t)); + break; + case VHT_TX_POWER_ENV: + pbss_entry->pvht_txpower = + (IEEEtypes_VHTtxpower_t *)pcurrent_ptr; + pbss_entry->vht_txpower_offset = + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); + HEXDUMP("InterpretIE: Resp TXPOW_IE", + (t_u8 *)pbss_entry->pvht_txpower, + (*(pbss_entry->pvht_txpower)).ieee_hdr.len + + sizeof(IEEEtypes_Header_t)); + break; + case EXT_POWER_CONSTR: + pbss_entry->pext_pwer = + (IEEEtypes_ExtPwerCons_t *)pcurrent_ptr; + pbss_entry->ext_pwer_offset = + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); + HEXDUMP("InterpretIE: Resp EXTPOW_IE", + (t_u8 *)pbss_entry->pext_pwer, + (*(pbss_entry->pext_pwer)).ieee_hdr.len + + sizeof(IEEEtypes_Header_t)); + break; + case QUIET_CHAN: + pbss_entry->pquiet_chan = + (IEEEtypes_QuietChan_t *)pcurrent_ptr; + pbss_entry->quiet_chan_offset = + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); + HEXDUMP("InterpretIE: Resp QUIETCHAN_IE", + (t_u8 *)pbss_entry->pquiet_chan, + (*(pbss_entry->pquiet_chan)).ieee_hdr.len + + sizeof(IEEEtypes_Header_t)); + break; + case BW_CHANNEL_SWITCH: + /* RANDYTODO */ + break; + case AID_INFO: + break; + case OPER_MODE_NTF: + pbss_entry->poper_mode = + (IEEEtypes_OperModeNtf_t *)pcurrent_ptr; + pbss_entry->oper_mode_offset = + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); + HEXDUMP("InterpretIE: Resp OPERMODENTF_IE", + (t_u8 *)pbss_entry->poper_mode, + (*(pbss_entry->poper_mode)).ieee_hdr.len + + sizeof(IEEEtypes_Header_t)); + break; + case MOBILITY_DOMAIN: + PRINTM(MCMND, "Mobility Domain IE received in Scan\n"); + pbss_entry->pmd_ie = + (IEEEtypes_MobilityDomain_t *)pcurrent_ptr; + pbss_entry->md_offset = + (t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf); + HEXDUMP("InterpretIE: Resp Mobility Domain IE", + (t_u8 *)pbss_entry->pmd_ie, + (*(pbss_entry->pmd_ie)).ieee_hdr.len + + sizeof(IEEEtypes_Header_t)); + break; + default: + break; + } + + pcurrent_ptr += element_len + 2; + + /* Need to account for IE ID and IE Len */ + bytes_left_for_current_beacon -= (element_len + 2); + + } /* while (bytes_left_for_current_beacon > 2) */ + + LEAVE(); + return ret; +} + +/** + * @brief Adjust ie's position in BSSDescriptor_t + * + * @param pmpriv A pointer to mlan_private structure + * @param pbss_entry A pointer to BSSDescriptor_t structure + * + * @return N/A + */ +static t_void +wlan_adjust_ie_in_bss_entry(IN mlan_private *pmpriv, + IN BSSDescriptor_t *pbss_entry) +{ + ENTER(); + if (pbss_entry->pbeacon_buf) { + if (pbss_entry->pwpa_ie) { + pbss_entry->pwpa_ie = (IEEEtypes_VendorSpecific_t *) + (pbss_entry->pbeacon_buf + + pbss_entry->wpa_offset); + } + if (pbss_entry->prsn_ie) { + pbss_entry->prsn_ie = (IEEEtypes_Generic_t *) + (pbss_entry->pbeacon_buf + + pbss_entry->rsn_offset); + } + if (pbss_entry->pwapi_ie) { + pbss_entry->pwapi_ie = (IEEEtypes_Generic_t *) + (pbss_entry->pbeacon_buf + + pbss_entry->wapi_offset); + } + if (pbss_entry->posen_ie) { + pbss_entry->posen_ie = (IEEEtypes_Generic_t *) + (pbss_entry->pbeacon_buf + + pbss_entry->osen_offset); + } + if (pbss_entry->pmd_ie) { + pbss_entry->pmd_ie = (IEEEtypes_MobilityDomain_t *) + (pbss_entry->pbeacon_buf + + pbss_entry->md_offset); + } + if (pbss_entry->pht_cap) { + pbss_entry->pht_cap = (IEEEtypes_HTCap_t *) + (pbss_entry->pbeacon_buf + + pbss_entry->ht_cap_offset); + } + if (pbss_entry->pht_info) { + pbss_entry->pht_info = (IEEEtypes_HTInfo_t *) + (pbss_entry->pbeacon_buf + + pbss_entry->ht_info_offset); + } + if (pbss_entry->pbss_co_2040) { + pbss_entry->pbss_co_2040 = (IEEEtypes_2040BSSCo_t *) + (pbss_entry->pbeacon_buf + + pbss_entry->bss_co_2040_offset); + } + if (pbss_entry->pext_cap) { + pbss_entry->pext_cap = (IEEEtypes_ExtCap_t *) + (pbss_entry->pbeacon_buf + + pbss_entry->ext_cap_offset); + } + if (pbss_entry->poverlap_bss_scan_param) { + pbss_entry->poverlap_bss_scan_param = + (IEEEtypes_OverlapBSSScanParam_t *) + (pbss_entry->pbeacon_buf + + pbss_entry->overlap_bss_offset); + } + if (pbss_entry->pvht_cap) { + pbss_entry->pvht_cap = (IEEEtypes_VHTCap_t *) + (pbss_entry->pbeacon_buf + + pbss_entry->vht_cap_offset); + } + if (pbss_entry->pvht_oprat) { + pbss_entry->pvht_oprat = (IEEEtypes_VHTOprat_t *) + (pbss_entry->pbeacon_buf + + pbss_entry->vht_oprat_offset); + } + if (pbss_entry->pvht_txpower) { + pbss_entry->pvht_txpower = (IEEEtypes_VHTtxpower_t *) + (pbss_entry->pbeacon_buf + + pbss_entry->vht_txpower_offset); + } + if (pbss_entry->pext_pwer) { + pbss_entry->pext_pwer = (IEEEtypes_ExtPwerCons_t *) + (pbss_entry->pbeacon_buf + + pbss_entry->ext_pwer_offset); + } + if (pbss_entry->pext_bssload) { + pbss_entry->pext_bssload = (IEEEtypes_ExtBSSload_t *) + (pbss_entry->pbeacon_buf + + pbss_entry->ext_bssload_offset); + } + if (pbss_entry->pquiet_chan) { + pbss_entry->pquiet_chan = (IEEEtypes_QuietChan_t *) + (pbss_entry->pbeacon_buf + + pbss_entry->quiet_chan_offset); + } + if (pbss_entry->poper_mode) { + pbss_entry->poper_mode = (IEEEtypes_OperModeNtf_t *) + (pbss_entry->pbeacon_buf + + pbss_entry->oper_mode_offset); + } + } else { + pbss_entry->pwpa_ie = MNULL; + pbss_entry->wpa_offset = 0; + pbss_entry->prsn_ie = MNULL; + pbss_entry->rsn_offset = 0; + pbss_entry->pwapi_ie = MNULL; + pbss_entry->wapi_offset = 0; + pbss_entry->posen_ie = MNULL; + pbss_entry->osen_offset = 0; + pbss_entry->pmd_ie = MNULL; + pbss_entry->md_offset = 0; + pbss_entry->pht_cap = MNULL; + pbss_entry->ht_cap_offset = 0; + pbss_entry->pht_info = MNULL; + pbss_entry->ht_info_offset = 0; + pbss_entry->pbss_co_2040 = MNULL; + pbss_entry->bss_co_2040_offset = 0; + pbss_entry->pext_cap = MNULL; + pbss_entry->ext_cap_offset = 0; + pbss_entry->poverlap_bss_scan_param = MNULL; + pbss_entry->overlap_bss_offset = 0; + } + LEAVE(); + return; +} + +/** + * @brief Store a beacon or probe response for a BSS returned in the scan + * + * Store a new scan response or an update for a previous scan response. New + * entries need to verify that they do not exceed the total amount of + * memory allocated for the table. + + * Replacement entries need to take into consideration the amount of space + * currently allocated for the beacon/probe response and adjust the entry + * as needed. + * + * A small amount of extra pad (SCAN_BEACON_ENTRY_PAD) is generally reserved + * for an entry in case it is a beacon since a probe response for the + * network will by larger per the standard. This helps to reduce the + * amount of memory copying to fit a new probe response into an entry + * already occupied by a network's previously stored beacon. + * + * @param pmpriv A pointer to mlan_private structure + * @param beacon_idx Index in the scan table to store this entry; may be + * replacing an older duplicate entry for this BSS + * @param num_of_ent Number of entries currently in the table + * @param pnew_beacon Pointer to the new beacon/probe response to save + * + * @return N/A + */ +static t_void +wlan_ret_802_11_scan_store_beacon(IN mlan_private *pmpriv, + IN t_u32 beacon_idx, + IN t_u32 num_of_ent, + IN BSSDescriptor_t *pnew_beacon) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + t_u8 *pbcn_store; + t_u32 new_bcn_size; + t_u32 old_bcn_size; + t_u32 bcn_space; + t_u32 adj_idx; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u8 *tmp_buf; + t_u16 bcn_size = 0; + t_u32 bcn_offset = 0; + + ENTER(); + + if (pmadapter->pscan_table[beacon_idx].pbeacon_buf) { + + new_bcn_size = pnew_beacon->beacon_buf_size; + old_bcn_size = + pmadapter->pscan_table[beacon_idx].beacon_buf_size; + bcn_space = + pmadapter->pscan_table[beacon_idx].beacon_buf_size_max; + pbcn_store = pmadapter->pscan_table[beacon_idx].pbeacon_buf; + + /* Set the max to be the same as current entry unless changed + below */ + pnew_beacon->beacon_buf_size_max = bcn_space; + + if (new_bcn_size == old_bcn_size) { + /* + * Beacon is the same size as the previous entry. + * Replace the previous contents with the scan result + */ + memcpy(pmadapter, pbcn_store, + pnew_beacon->pbeacon_buf, + pnew_beacon->beacon_buf_size); + + } else if (new_bcn_size <= bcn_space) { + /* + * New beacon size will fit in the amount of space + * we have previously allocated for it + */ + + /* Copy the new beacon buffer entry over the old one */ + memcpy(pmadapter, pbcn_store, pnew_beacon->pbeacon_buf, + new_bcn_size); + + /* + * If the old beacon size was less than the + * maximum we had allotted for the entry, and + * the new entry is even smaller, reset the + * max size to the old beacon entry and compress + * the storage space (leaving a new pad space of + * (old_bcn_size - new_bcn_size). + */ + if (old_bcn_size < bcn_space && + new_bcn_size <= old_bcn_size) { + /* + * Old Beacon size is smaller than the + * allotted storage size. Shrink the + * allotted storage space. + */ + PRINTM(MINFO, + "AppControl: Smaller Duplicate Beacon (%d), " + "old = %d, new = %d, space = %d, left = %d\n", + beacon_idx, old_bcn_size, new_bcn_size, + bcn_space, + (pmadapter->bcn_buf_size - + (pmadapter->pbcn_buf_end - + pmadapter->bcn_buf))); + + /* + * memmove (since the memory overlaps) the data + * after the beacon we just stored to the end + * of the current beacon. This cleans up any + * unused space the old larger beacon was using + * in the buffer + */ + memmove(pmadapter, + (void *)((t_ptr)pbcn_store + + (t_ptr)old_bcn_size), + (void *)((t_ptr)pbcn_store + + (t_ptr)bcn_space), + (t_u32)((t_ptr)pmadapter->pbcn_buf_end - + ((t_ptr)pbcn_store + + (t_ptr)bcn_space))); + + /* + * Decrement the end pointer by the difference + * between the old larger size and the new + * smaller size since we are using less space + * due to the new beacon being smaller + */ + pmadapter->pbcn_buf_end -= + (bcn_space - old_bcn_size); + + /* + * Set the maximum storage size to the old + * beacon size + */ + pnew_beacon->beacon_buf_size_max = old_bcn_size; + + /* Adjust beacon buffer pointers that are past + the current */ + for (adj_idx = 0; adj_idx < num_of_ent; + adj_idx++) { + if (pmadapter->pscan_table[adj_idx]. + pbeacon_buf > pbcn_store) { + pmadapter->pscan_table[adj_idx]. + pbeacon_buf -= + (bcn_space - + old_bcn_size); + wlan_adjust_ie_in_bss_entry + (pmpriv, + &pmadapter-> + pscan_table[adj_idx]); + } + } + } + } else if (pmadapter->pbcn_buf_end + (new_bcn_size - bcn_space) + < (pmadapter->bcn_buf + pmadapter->bcn_buf_size)) { + /* + * Beacon is larger than space previously allocated + * (bcn_space) and there is enough space left in the + * beaconBuffer to store the additional data + */ + PRINTM(MINFO, + "AppControl: Larger Duplicate Beacon (%d), " + "old = %d, new = %d, space = %d, left = %d\n", + beacon_idx, old_bcn_size, new_bcn_size, + bcn_space, + (pmadapter->bcn_buf_size - + (pmadapter->pbcn_buf_end - + pmadapter->bcn_buf))); + + /* + * memmove (since the memory overlaps) the data + * after the beacon we just stored to the end of + * the current beacon. This moves the data for + * the beacons after this further in memory to + * make space for the new larger beacon we are + * about to copy in. + */ + memmove(pmadapter, + (void *)((t_ptr)pbcn_store + + (t_ptr)new_bcn_size), + (void *)((t_ptr)pbcn_store + (t_ptr)bcn_space), + (t_u32)((t_ptr)pmadapter->pbcn_buf_end - + ((t_ptr)pbcn_store + + (t_ptr)bcn_space))); + + /* Copy the new beacon buffer entry over the old one */ + memcpy(pmadapter, pbcn_store, pnew_beacon->pbeacon_buf, + new_bcn_size); + + /* + * Move the beacon end pointer by the amount of new + * beacon data we are adding + */ + pmadapter->pbcn_buf_end += (new_bcn_size - bcn_space); + + /* + * This entry is bigger than the allotted max space + * previously reserved. Increase the max space to + * be equal to the new beacon size + */ + pnew_beacon->beacon_buf_size_max = new_bcn_size; + + /* Adjust beacon buffer pointers that are past the + current */ + for (adj_idx = 0; adj_idx < num_of_ent; adj_idx++) { + if (pmadapter->pscan_table[adj_idx]. + pbeacon_buf > pbcn_store) { + pmadapter->pscan_table[adj_idx]. + pbeacon_buf += + (new_bcn_size - bcn_space); + wlan_adjust_ie_in_bss_entry(pmpriv, + &pmadapter-> + pscan_table + [adj_idx]); + } + } + } else { + /* + * Beacon is larger than the previously allocated + * space, but there is not enough free space to + * store the additional data + */ + PRINTM(MERROR, + "AppControl: Failed: Larger Duplicate Beacon (%d)," + " old = %d, new = %d, space = %d, left = %d\n", + beacon_idx, old_bcn_size, new_bcn_size, + bcn_space, + (pmadapter->bcn_buf_size - + (pmadapter->pbcn_buf_end - + pmadapter->bcn_buf))); + + /* Storage failure, keep old beacon intact */ + pnew_beacon->beacon_buf_size = old_bcn_size; + if (pnew_beacon->pwpa_ie) + pnew_beacon->wpa_offset = + pmadapter->pscan_table[beacon_idx]. + wpa_offset; + if (pnew_beacon->prsn_ie) + pnew_beacon->rsn_offset = + pmadapter->pscan_table[beacon_idx]. + rsn_offset; + if (pnew_beacon->pwapi_ie) + pnew_beacon->wapi_offset = + pmadapter->pscan_table[beacon_idx]. + wapi_offset; + if (pnew_beacon->posen_ie) + pnew_beacon->osen_offset = + pmadapter->pscan_table[beacon_idx]. + osen_offset; + if (pnew_beacon->pmd_ie) + pnew_beacon->md_offset = + pmadapter->pscan_table[beacon_idx]. + md_offset; + if (pnew_beacon->pht_cap) + pnew_beacon->ht_cap_offset = + pmadapter->pscan_table[beacon_idx]. + ht_cap_offset; + if (pnew_beacon->pht_info) + pnew_beacon->ht_info_offset = + pmadapter->pscan_table[beacon_idx]. + ht_info_offset; + if (pnew_beacon->pbss_co_2040) + pnew_beacon->bss_co_2040_offset = + pmadapter->pscan_table[beacon_idx]. + bss_co_2040_offset; + if (pnew_beacon->pext_cap) + pnew_beacon->ext_cap_offset = + pmadapter->pscan_table[beacon_idx]. + ext_cap_offset; + if (pnew_beacon->poverlap_bss_scan_param) + pnew_beacon->overlap_bss_offset = + pmadapter->pscan_table[beacon_idx]. + overlap_bss_offset; + if (pnew_beacon->pvht_cap) + pnew_beacon->vht_cap_offset = + pmadapter->pscan_table[beacon_idx]. + vht_cap_offset; + if (pnew_beacon->pvht_oprat) + pnew_beacon->vht_oprat_offset = + pmadapter->pscan_table[beacon_idx]. + vht_oprat_offset; + if (pnew_beacon->pvht_txpower) + pnew_beacon->vht_txpower_offset = + pmadapter->pscan_table[beacon_idx]. + vht_txpower_offset; + if (pnew_beacon->pext_pwer) + pnew_beacon->ext_pwer_offset = + pmadapter->pscan_table[beacon_idx]. + ext_pwer_offset; + if (pnew_beacon->pext_bssload) + pnew_beacon->ext_bssload_offset = + pmadapter->pscan_table[beacon_idx]. + ext_bssload_offset; + if (pnew_beacon->pquiet_chan) + pnew_beacon->quiet_chan_offset = + pmadapter->pscan_table[beacon_idx]. + quiet_chan_offset; + if (pnew_beacon->poper_mode) + pnew_beacon->oper_mode_offset = + pmadapter->pscan_table[beacon_idx]. + oper_mode_offset; + } + /* Point the new entry to its permanent storage space */ + pnew_beacon->pbeacon_buf = pbcn_store; + wlan_adjust_ie_in_bss_entry(pmpriv, pnew_beacon); + } else { + if ((pmadapter->pbcn_buf_end + pnew_beacon->beacon_buf_size + + SCAN_BEACON_ENTRY_PAD > (pmadapter->bcn_buf + + pmadapter->bcn_buf_size)) && + (pmadapter->bcn_buf_size < MAX_SCAN_BEACON_BUFFER)) { + /* no space for this entry, realloc bcn buffer */ + if (pmadapter->callbacks.moal_vmalloc && + pmadapter->callbacks.moal_vfree) + ret = pmadapter->callbacks. + moal_vmalloc(pmadapter->pmoal_handle, + pmadapter->bcn_buf_size + + DEFAULT_SCAN_BEACON_BUFFER, + (t_u8 **)&tmp_buf); + else + ret = pmadapter->callbacks. + moal_malloc(pmadapter->pmoal_handle, + pmadapter->bcn_buf_size + + DEFAULT_SCAN_BEACON_BUFFER, + MLAN_MEM_DEF, + (t_u8 **)&tmp_buf); + + if ((ret == MLAN_STATUS_SUCCESS) && (tmp_buf)) { + PRINTM(MCMND, + "Realloc Beacon buffer, old size=%d, new_size=%d\n", + pmadapter->bcn_buf_size, + pmadapter->bcn_buf_size + + DEFAULT_SCAN_BEACON_BUFFER); + bcn_size = + pmadapter->pbcn_buf_end - + pmadapter->bcn_buf; + memcpy(pmadapter, tmp_buf, pmadapter->bcn_buf, + bcn_size); + /* Adjust beacon buffer pointers that are past + the current */ + for (adj_idx = 0; adj_idx < num_of_ent; + adj_idx++) { + bcn_offset = + pmadapter->pscan_table[adj_idx]. + pbeacon_buf - + pmadapter->bcn_buf; + pmadapter->pscan_table[adj_idx]. + pbeacon_buf = + tmp_buf + bcn_offset; + wlan_adjust_ie_in_bss_entry(pmpriv, + &pmadapter-> + pscan_table + [adj_idx]); + } + pmadapter->pbcn_buf_end = tmp_buf + bcn_size; + if (pmadapter->callbacks.moal_vmalloc && + pmadapter->callbacks.moal_vfree) + pmadapter->callbacks. + moal_vfree(pmadapter-> + pmoal_handle, + (t_u8 *)pmadapter-> + bcn_buf); + else + pmadapter->callbacks. + moal_mfree(pmadapter-> + pmoal_handle, + (t_u8 *)pmadapter-> + bcn_buf); + pmadapter->bcn_buf = tmp_buf; + pmadapter->bcn_buf_size += + DEFAULT_SCAN_BEACON_BUFFER; + } + } + /* + * No existing beacon data exists for this entry, check to see + * if we can fit it in the remaining space + */ + if (pmadapter->pbcn_buf_end + pnew_beacon->beacon_buf_size + + SCAN_BEACON_ENTRY_PAD < (pmadapter->bcn_buf + + pmadapter->bcn_buf_size)) { + + /* + * Copy the beacon buffer data from the local entry + * to the adapter dev struct buffer space used to + * store the raw beacon data for each entry in the + * scan table + */ + memcpy(pmadapter, pmadapter->pbcn_buf_end, + pnew_beacon->pbeacon_buf, + pnew_beacon->beacon_buf_size); + + /* + * Update the beacon ptr to point to the table + * save area + */ + pnew_beacon->pbeacon_buf = pmadapter->pbcn_buf_end; + pnew_beacon->beacon_buf_size_max = + (pnew_beacon->beacon_buf_size + + SCAN_BEACON_ENTRY_PAD); + wlan_adjust_ie_in_bss_entry(pmpriv, pnew_beacon); + + /* Increment the end pointer by the size reserved */ + pmadapter->pbcn_buf_end += + pnew_beacon->beacon_buf_size_max; + + PRINTM(MINFO, "AppControl: Beacon[%02d] sz=%03d," + " used = %04d, left = %04d\n", + beacon_idx, + pnew_beacon->beacon_buf_size, + (pmadapter->pbcn_buf_end - pmadapter->bcn_buf), + (pmadapter->bcn_buf_size - + (pmadapter->pbcn_buf_end - + pmadapter->bcn_buf))); + } else { + /* + * No space for new beacon + */ + PRINTM(MCMND, "AppControl: No space beacon (%d): " + MACSTR "; sz=%03d, left=%03d\n", + beacon_idx, + MAC2STR(pnew_beacon->mac_address), + pnew_beacon->beacon_buf_size, + (pmadapter->bcn_buf_size - + (pmadapter->pbcn_buf_end - + pmadapter->bcn_buf))); + + /* + * Storage failure; clear storage records + * for this bcn + */ + pnew_beacon->pbeacon_buf = MNULL; + pnew_beacon->beacon_buf_size = 0; + pnew_beacon->beacon_buf_size_max = 0; + wlan_adjust_ie_in_bss_entry(pmpriv, pnew_beacon); + } + } + + LEAVE(); +} + +/** + * @brief update beacon buffer of the current bss descriptor + * + * @param pmpriv A pointer to mlan_private structure + * + * @return MLAN_STATUS_SUCCESS, otherwise failure + */ +static mlan_status +wlan_update_curr_bcn(IN mlan_private *pmpriv) +{ + BSSDescriptor_t *pcurr_bss = &pmpriv->curr_bss_params.bss_descriptor; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (pmpriv->pcurr_bcn_buf && pmpriv->curr_bcn_size) { + pcurr_bss->pbeacon_buf = pmpriv->pcurr_bcn_buf; + pcurr_bss->beacon_buf_size = pmpriv->curr_bcn_size; + pcurr_bss->beacon_buf_size_max = pmpriv->curr_bcn_size; + + /* adjust the pointers in the current bss descriptor */ + if (pcurr_bss->pwpa_ie) { + pcurr_bss->pwpa_ie = (IEEEtypes_VendorSpecific_t *) + (pcurr_bss->pbeacon_buf + + pcurr_bss->wpa_offset); + } + if (pcurr_bss->prsn_ie) { + pcurr_bss->prsn_ie = (IEEEtypes_Generic_t *) + (pcurr_bss->pbeacon_buf + + pcurr_bss->rsn_offset); + } + if (pcurr_bss->pmd_ie) { + pcurr_bss->pmd_ie = (IEEEtypes_MobilityDomain_t *) + (pcurr_bss->pbeacon_buf + pcurr_bss->md_offset); + } + if (pcurr_bss->pht_cap) { + pcurr_bss->pht_cap = (IEEEtypes_HTCap_t *) + (pcurr_bss->pbeacon_buf + + pcurr_bss->ht_cap_offset); + } + + if (pcurr_bss->pht_info) { + pcurr_bss->pht_info = (IEEEtypes_HTInfo_t *) + (pcurr_bss->pbeacon_buf + + pcurr_bss->ht_info_offset); + } + + if (pcurr_bss->pbss_co_2040) { + pcurr_bss->pbss_co_2040 = (IEEEtypes_2040BSSCo_t *) + (pcurr_bss->pbeacon_buf + + pcurr_bss->bss_co_2040_offset); + } + + if (pcurr_bss->pext_cap) { + pcurr_bss->pext_cap = (IEEEtypes_ExtCap_t *) + (pcurr_bss->pbeacon_buf + + pcurr_bss->ext_cap_offset); + } + + if (pcurr_bss->poverlap_bss_scan_param) { + pcurr_bss->poverlap_bss_scan_param = + (IEEEtypes_OverlapBSSScanParam_t *) + (pcurr_bss->pbeacon_buf + + pcurr_bss->overlap_bss_offset); + } + + if (pcurr_bss->pvht_cap) { + pcurr_bss->pvht_cap = (IEEEtypes_VHTCap_t *) + (pcurr_bss->pbeacon_buf + + pcurr_bss->vht_cap_offset); + } + + if (pcurr_bss->pvht_oprat) { + pcurr_bss->pvht_oprat = (IEEEtypes_VHTOprat_t *) + (pcurr_bss->pbeacon_buf + + pcurr_bss->vht_oprat_offset); + } + + if (pcurr_bss->pvht_txpower) { + pcurr_bss->pvht_txpower = (IEEEtypes_VHTtxpower_t *) + (pcurr_bss->pbeacon_buf + + pcurr_bss->vht_txpower_offset); + } + + if (pcurr_bss->pext_pwer) { + pcurr_bss->pext_pwer = (IEEEtypes_ExtPwerCons_t *) + (pcurr_bss->pbeacon_buf + + pcurr_bss->ext_pwer_offset); + } + + if (pcurr_bss->pext_bssload) { + pcurr_bss->pext_bssload = (IEEEtypes_ExtBSSload_t *) + (pcurr_bss->pbeacon_buf + + pcurr_bss->ext_bssload_offset); + } + + if (pcurr_bss->pquiet_chan) { + pcurr_bss->pquiet_chan = (IEEEtypes_QuietChan_t *) + (pcurr_bss->pbeacon_buf + + pcurr_bss->quiet_chan_offset); + } + + if (pcurr_bss->poper_mode) { + pcurr_bss->poper_mode = (IEEEtypes_OperModeNtf_t *) + (pcurr_bss->pbeacon_buf + + pcurr_bss->oper_mode_offset); + } + + PRINTM(MINFO, "current beacon restored %d\n", + pmpriv->curr_bcn_size); + } else { + PRINTM(MERROR, "curr_bcn_buf not saved\n"); + ret = MLAN_STATUS_FAILURE; + } + + LEAVE(); + return ret; +} + +/** + * @brief Post process the scan table after a new scan command has completed + * + * Inspect each entry of the scan table and try to find an entry that + * matches our current associated/joined network from the scan. If + * one is found, update the stored copy of the BSSDescriptor for our + * current network. + * + * Debug dump the current scan table contents if compiled accordingly. + * + * @param pmpriv A pointer to mlan_private structure + * + * @return N/A + */ +static t_void +wlan_scan_process_results(IN mlan_private *pmpriv) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + t_s32 j; + t_u32 i; + mlan_status ret = MLAN_STATUS_SUCCESS; + BSSDescriptor_t *bss_new_entry = MNULL; + pmlan_callbacks pcb = &pmadapter->callbacks; + + ENTER(); + + if (pmpriv->media_connected == MTRUE) { + + j = wlan_find_ssid_in_list(pmpriv, + &pmpriv->curr_bss_params. + bss_descriptor.ssid, + pmpriv->curr_bss_params. + bss_descriptor.mac_address, + pmpriv->bss_mode); + + if (j >= 0) { + pmadapter->callbacks.moal_spin_lock(pmadapter-> + pmoal_handle, + pmpriv-> + curr_bcn_buf_lock); + pmpriv->curr_bss_params.bss_descriptor.pwpa_ie = MNULL; + pmpriv->curr_bss_params.bss_descriptor.wpa_offset = 0; + pmpriv->curr_bss_params.bss_descriptor.prsn_ie = MNULL; + pmpriv->curr_bss_params.bss_descriptor.rsn_offset = 0; + pmpriv->curr_bss_params.bss_descriptor.pwapi_ie = MNULL; + pmpriv->curr_bss_params.bss_descriptor.wapi_offset = 0; + pmpriv->curr_bss_params.bss_descriptor.posen_ie = MNULL; + pmpriv->curr_bss_params.bss_descriptor.osen_offset = 0; + pmpriv->curr_bss_params.bss_descriptor.pmd_ie = MNULL; + pmpriv->curr_bss_params.bss_descriptor.md_offset = 0; + pmpriv->curr_bss_params.bss_descriptor.pht_cap = MNULL; + pmpriv->curr_bss_params.bss_descriptor.ht_cap_offset = + 0; + pmpriv->curr_bss_params.bss_descriptor.pht_info = MNULL; + pmpriv->curr_bss_params.bss_descriptor.ht_info_offset = + 0; + pmpriv->curr_bss_params.bss_descriptor.pbss_co_2040 = + MNULL; + pmpriv->curr_bss_params.bss_descriptor. + bss_co_2040_offset = 0; + pmpriv->curr_bss_params.bss_descriptor.pext_cap = MNULL; + pmpriv->curr_bss_params.bss_descriptor.ext_cap_offset = + 0; + pmpriv->curr_bss_params.bss_descriptor. + poverlap_bss_scan_param = MNULL; + pmpriv->curr_bss_params.bss_descriptor. + overlap_bss_offset = 0; + pmpriv->curr_bss_params.bss_descriptor.pvht_cap = MNULL; + pmpriv->curr_bss_params.bss_descriptor.vht_cap_offset = + 0; + pmpriv->curr_bss_params.bss_descriptor.pvht_oprat = + MNULL; + pmpriv->curr_bss_params.bss_descriptor. + vht_oprat_offset = 0; + pmpriv->curr_bss_params.bss_descriptor.pvht_txpower = + MNULL; + pmpriv->curr_bss_params.bss_descriptor. + vht_txpower_offset = 0; + pmpriv->curr_bss_params.bss_descriptor.pext_pwer = + MNULL; + pmpriv->curr_bss_params.bss_descriptor.ext_pwer_offset = + 0; + pmpriv->curr_bss_params.bss_descriptor.pext_bssload = + MNULL; + pmpriv->curr_bss_params.bss_descriptor. + ext_bssload_offset = 0; + pmpriv->curr_bss_params.bss_descriptor.pquiet_chan = + MNULL; + pmpriv->curr_bss_params.bss_descriptor. + quiet_chan_offset = 0; + pmpriv->curr_bss_params.bss_descriptor.poper_mode = + MNULL; + pmpriv->curr_bss_params.bss_descriptor. + oper_mode_offset = 0; + pmpriv->curr_bss_params.bss_descriptor.pbeacon_buf = + MNULL; + pmpriv->curr_bss_params.bss_descriptor.beacon_buf_size = + 0; + pmpriv->curr_bss_params.bss_descriptor. + beacon_buf_size_max = 0; + + PRINTM(MINFO, + "Found current ssid/bssid in list @ index #%d\n", + j); + /* Make a copy of current BSSID descriptor */ + memcpy(pmadapter, + &pmpriv->curr_bss_params.bss_descriptor, + &pmadapter->pscan_table[j], + sizeof(pmpriv->curr_bss_params.bss_descriptor)); + + pmadapter->callbacks.moal_spin_unlock(pmadapter-> + pmoal_handle, + pmpriv-> + curr_bcn_buf_lock); + wlan_save_curr_bcn(pmpriv); + } else { + // Apend to the end of scan table + if (pmpriv->pcurr_bcn_buf && pmpriv->curr_bcn_size) { + ret = pcb->moal_malloc(pmadapter->pmoal_handle, + sizeof(BSSDescriptor_t), + MLAN_MEM_DEF, + (t_u8 **)&bss_new_entry); + if (ret == MLAN_STATUS_SUCCESS && bss_new_entry) { + memcpy(pmadapter, bss_new_entry, + &pmpriv->curr_bss_params. + bss_descriptor, + sizeof(pmpriv->curr_bss_params. + bss_descriptor)); + if (pmadapter->num_in_scan_table < + MRVDRV_MAX_BSSID_LIST) + pmadapter->num_in_scan_table++; + pmadapter->pscan_table[pmadapter-> + num_in_scan_table + - + 1].pbeacon_buf = + MNULL; + wlan_ret_802_11_scan_store_beacon + (pmpriv, + pmadapter->num_in_scan_table - + 1, + pmadapter->num_in_scan_table, + bss_new_entry); + if (bss_new_entry->pbeacon_buf == MNULL) + pmadapter->num_in_scan_table--; + else + memcpy(pmadapter, + &pmadapter-> + pscan_table[pmadapter-> + num_in_scan_table + - 1], + bss_new_entry, + sizeof(BSSDescriptor_t)); + pcb->moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)bss_new_entry); + } + } + } + + } + + for (i = 0; i < pmadapter->num_in_scan_table; i++) + PRINTM(MINFO, "Scan:(%02d) " MACSTR ", " + "RSSI[%03d], SSID[%s]\n", + i, + MAC2STR(pmadapter->pscan_table[i].mac_address), + (t_s32)pmadapter->pscan_table[i].rssi, + pmadapter->pscan_table[i].ssid.ssid); + + /* + * Prepares domain info from scan table and downloads the + * domain info command to the FW. + */ + wlan_11d_prepare_dnld_domain_info_cmd(pmpriv); + PRINTM(MMSG, "wlan: SCAN COMPLETED: scanned AP count=%d\n", + pmadapter->num_in_scan_table); + LEAVE(); +} + +/** + * @brief Delete a specific indexed entry from the scan table. + * + * Delete the scan table entry indexed by table_idx. Compact the remaining + * entries and adjust any buffering of beacon/probe response data + * if needed. + * + * @param pmpriv A pointer to mlan_private structure + * @param table_idx Scan table entry index to delete from the table + * + * @return N/A + * + * @pre table_idx must be an index to a valid entry + */ +static t_void +wlan_scan_delete_table_entry(IN mlan_private *pmpriv, IN t_s32 table_idx) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + t_u32 del_idx; + t_u32 beacon_buf_adj; + t_u8 *pbeacon_buf; + + ENTER(); + + /* + * Shift the saved beacon buffer data for the scan table back over the + * entry being removed. Update the end of buffer pointer. Save the + * deleted buffer allocation size for pointer adjustments for entries + * compacted after the deleted index. + */ + beacon_buf_adj = pmadapter->pscan_table[table_idx].beacon_buf_size_max; + + PRINTM(MINFO, + "Scan: Delete Entry %d, beacon buffer removal = %d bytes\n", + table_idx, beacon_buf_adj); + + /* Check if the table entry had storage allocated for its beacon */ + if (beacon_buf_adj) { + pbeacon_buf = pmadapter->pscan_table[table_idx].pbeacon_buf; + + /* + * Remove the entry's buffer space, decrement the table + * end pointer by the amount we are removing + */ + pmadapter->pbcn_buf_end -= beacon_buf_adj; + + PRINTM(MINFO, + "Scan: Delete Entry %d, compact data: %p <- %p (sz = %d)\n", + table_idx, + pbeacon_buf, + pbeacon_buf + beacon_buf_adj, + pmadapter->pbcn_buf_end - pbeacon_buf); + + /* + * Compact data storage. Copy all data after the deleted entry's + * end address (pbeacon_buf + beacon_buf_adj) back to the original + * start address (pbeacon_buf). + * + * Scan table entries affected by the move will have their entry + * pointer adjusted below. + * + * Use memmove since the dest/src memory regions overlap. + */ + memmove(pmadapter, pbeacon_buf, + (void *)((t_ptr)pbeacon_buf + (t_ptr)beacon_buf_adj), + (t_u32)((t_ptr)pmadapter->pbcn_buf_end - + (t_ptr)pbeacon_buf)); + } + + PRINTM(MINFO, "Scan: Delete Entry %d, num_in_scan_table = %d\n", + table_idx, pmadapter->num_in_scan_table); + + /* + * Shift all of the entries after the table_idx back by one, compacting + * the table and removing the requested entry + */ + for (del_idx = table_idx; (del_idx + 1) < pmadapter->num_in_scan_table; + del_idx++) { + /* Copy the next entry over this one */ + memcpy(pmadapter, pmadapter->pscan_table + del_idx, + pmadapter->pscan_table + del_idx + 1, + sizeof(BSSDescriptor_t)); + + /* + * Adjust this entry's pointer to its beacon buffer based on the + * removed/compacted entry from the deleted index. Don't decrement + * if the buffer pointer is MNULL (no data stored for this entry). + */ + if (pmadapter->pscan_table[del_idx].pbeacon_buf) { + pmadapter->pscan_table[del_idx].pbeacon_buf -= + beacon_buf_adj; + if (pmadapter->pscan_table[del_idx].pwpa_ie) { + pmadapter->pscan_table[del_idx].pwpa_ie = + (IEEEtypes_VendorSpecific_t *) + (pmadapter->pscan_table[del_idx]. + pbeacon_buf + + pmadapter->pscan_table[del_idx]. + wpa_offset); + } + if (pmadapter->pscan_table[del_idx].prsn_ie) { + pmadapter->pscan_table[del_idx].prsn_ie = + (IEEEtypes_Generic_t *) + (pmadapter->pscan_table[del_idx]. + pbeacon_buf + + pmadapter->pscan_table[del_idx]. + rsn_offset); + } + if (pmadapter->pscan_table[del_idx].pwapi_ie) { + pmadapter->pscan_table[del_idx].pwapi_ie = + (IEEEtypes_Generic_t *) + (pmadapter->pscan_table[del_idx]. + pbeacon_buf + + pmadapter->pscan_table[del_idx]. + wapi_offset); + } + if (pmadapter->pscan_table[del_idx].posen_ie) { + pmadapter->pscan_table[del_idx].posen_ie = + (IEEEtypes_Generic_t *) + (pmadapter->pscan_table[del_idx]. + pbeacon_buf + + pmadapter->pscan_table[del_idx]. + osen_offset); + } + if (pmadapter->pscan_table[del_idx].pmd_ie) { + pmadapter->pscan_table[del_idx].pmd_ie = + (IEEEtypes_MobilityDomain_t *) + (pmadapter->pscan_table[del_idx]. + pbeacon_buf + + pmadapter->pscan_table[del_idx]. + md_offset); + } + if (pmadapter->pscan_table[del_idx].pht_cap) { + pmadapter->pscan_table[del_idx].pht_cap = + (IEEEtypes_HTCap_t *)(pmadapter-> + pscan_table + [del_idx]. + pbeacon_buf + + pmadapter-> + pscan_table + [del_idx]. + ht_cap_offset); + } + + if (pmadapter->pscan_table[del_idx].pht_info) { + pmadapter->pscan_table[del_idx].pht_info = + (IEEEtypes_HTInfo_t *)(pmadapter-> + pscan_table + [del_idx]. + pbeacon_buf + + pmadapter-> + pscan_table + [del_idx]. + ht_info_offset); + } + if (pmadapter->pscan_table[del_idx].pbss_co_2040) { + pmadapter->pscan_table[del_idx].pbss_co_2040 = + (IEEEtypes_2040BSSCo_t *)(pmadapter-> + pscan_table + [del_idx]. + pbeacon_buf + + pmadapter-> + pscan_table + [del_idx]. + bss_co_2040_offset); + } + if (pmadapter->pscan_table[del_idx].pext_cap) { + pmadapter->pscan_table[del_idx].pext_cap = + (IEEEtypes_ExtCap_t *)(pmadapter-> + pscan_table + [del_idx]. + pbeacon_buf + + pmadapter-> + pscan_table + [del_idx]. + ext_cap_offset); + } + if (pmadapter->pscan_table[del_idx]. + poverlap_bss_scan_param) { + pmadapter->pscan_table[del_idx]. + poverlap_bss_scan_param = + (IEEEtypes_OverlapBSSScanParam_t + *)(pmadapter->pscan_table[del_idx]. + pbeacon_buf + + pmadapter->pscan_table[del_idx]. + overlap_bss_offset); + } + + if (pmadapter->pscan_table[del_idx].pvht_cap) { + pmadapter->pscan_table[del_idx].pvht_cap = + (IEEEtypes_VHTCap_t *)(pmadapter-> + pscan_table + [del_idx]. + pbeacon_buf + + pmadapter-> + pscan_table + [del_idx]. + vht_cap_offset); + } + + if (pmadapter->pscan_table[del_idx].pvht_oprat) { + pmadapter->pscan_table[del_idx].pvht_oprat = + (IEEEtypes_VHTOprat_t *)(pmadapter-> + pscan_table + [del_idx]. + pbeacon_buf + + pmadapter-> + pscan_table + [del_idx]. + vht_oprat_offset); + } + if (pmadapter->pscan_table[del_idx].pvht_txpower) { + pmadapter->pscan_table[del_idx].pvht_txpower = + (IEEEtypes_VHTtxpower_t *)(pmadapter-> + pscan_table + [del_idx]. + pbeacon_buf + + pmadapter-> + pscan_table + [del_idx]. + vht_txpower_offset); + } + if (pmadapter->pscan_table[del_idx].pext_pwer) { + pmadapter->pscan_table[del_idx].pext_pwer = + (IEEEtypes_ExtPwerCons_t *)(pmadapter-> + pscan_table + [del_idx]. + pbeacon_buf + + + pmadapter-> + pscan_table + [del_idx]. + ext_pwer_offset); + } + if (pmadapter->pscan_table[del_idx].pext_bssload) { + pmadapter->pscan_table[del_idx].pext_bssload = + (IEEEtypes_ExtBSSload_t *)(pmadapter-> + pscan_table + [del_idx]. + pbeacon_buf + + pmadapter-> + pscan_table + [del_idx]. + ext_bssload_offset); + } + if (pmadapter->pscan_table[del_idx].pquiet_chan) { + pmadapter->pscan_table[del_idx].pquiet_chan = + (IEEEtypes_QuietChan_t *)(pmadapter-> + pscan_table + [del_idx]. + pbeacon_buf + + pmadapter-> + pscan_table + [del_idx]. + quiet_chan_offset); + } + if (pmadapter->pscan_table[del_idx].poper_mode) { + pmadapter->pscan_table[del_idx].poper_mode = + (IEEEtypes_OperModeNtf_t *)(pmadapter-> + pscan_table + [del_idx]. + pbeacon_buf + + + pmadapter-> + pscan_table + [del_idx]. + oper_mode_offset); + } + } + } + + /* The last entry is invalid now that it has been deleted or moved back + */ + memset(pmadapter, + pmadapter->pscan_table + pmadapter->num_in_scan_table - 1, 0x00, + sizeof(BSSDescriptor_t)); + + pmadapter->num_in_scan_table--; + + LEAVE(); +} + +/** + * @brief Delete all occurrences of a given SSID from the scan table + * + * Iterate through the scan table and delete all entries that match a given + * SSID. Compact the remaining scan table entries. + * + * @param pmpriv A pointer to mlan_private structure + * @param pdel_ssid Pointer to an SSID to be used in deleting all + * matching SSIDs from the scan table + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_scan_delete_ssid_table_entry(IN mlan_private *pmpriv, + IN mlan_802_11_ssid *pdel_ssid) +{ + mlan_status ret = MLAN_STATUS_FAILURE; + t_s32 table_idx; + + ENTER(); + + PRINTM(MINFO, "Scan: Delete Ssid Entry: %-32s\n", pdel_ssid->ssid); + + /* + * If the requested SSID is found in the table, delete it. Then keep + * searching the table for multiple entries for the SSID until no + * more are found + */ + while ((table_idx = wlan_find_ssid_in_list(pmpriv, + pdel_ssid, + MNULL, + MLAN_BSS_MODE_AUTO)) >= 0) { + PRINTM(MINFO, "Scan: Delete SSID Entry: Found Idx = %d\n", + table_idx); + ret = MLAN_STATUS_SUCCESS; + wlan_scan_delete_table_entry(pmpriv, table_idx); + } + + LEAVE(); + return ret; +} + +/******************************************************** + Global Functions +********************************************************/ + +/** + * @brief Check if a scanned network compatible with the driver settings + * + * WEP WPA WPA2 ad-hoc encrypt Network + * enabled enabled enabled AES mode Privacy WPA WPA2 Compatible + * 0 0 0 0 NONE 0 0 0 yes No security + * 0 1 0 0 x 1x 1 x yes WPA (disable HT if no AES) + * 0 0 1 0 x 1x x 1 yes WPA2 (disable HT if no AES) + * 0 0 0 1 NONE 1 0 0 yes Ad-hoc AES + * 1 0 0 0 NONE 1 0 0 yes Static WEP (disable HT) + * 0 0 0 0 !=NONE 1 0 0 yes Dynamic WEP + * + * @param pmpriv A pointer to mlan_private + * @param index Index in scan table to check against current driver settings + * @param mode Network mode: Infrastructure or IBSS + * + * @return Index in ScanTable, or negative value if error + */ +t_s32 +wlan_is_network_compatible(IN mlan_private *pmpriv, + IN t_u32 index, IN t_u32 mode) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + BSSDescriptor_t *pbss_desc; + + ENTER(); + + pbss_desc = &pmadapter->pscan_table[index]; + pbss_desc->disable_11n = MFALSE; + + /* Don't check for compatibility if roaming */ + if ((pmpriv->media_connected == MTRUE) + && (pmpriv->bss_mode == MLAN_BSS_MODE_INFRA) + && (pbss_desc->bss_mode == MLAN_BSS_MODE_INFRA)) { + LEAVE(); + return index; + } + + /* if the VHT CAP IE exists, the HT CAP IE should exist too */ + if (pbss_desc->pvht_cap && !pbss_desc->pht_cap) { + PRINTM(MINFO, + "Disable 11n if HT CAP IE is not found from the 11AC AP\n"); + pbss_desc->disable_11n = MTRUE; + } + + if (pbss_desc->wlan_11h_bss_info.chan_switch_ann.element_id == + CHANNEL_SWITCH_ANN) { + PRINTM(MINFO, + "Don't connect to AP with CHANNEL_SWITCH_ANN IE.\n"); + LEAVE(); + return -1; + } + + if (pmpriv->wps.session_enable == MTRUE) { + PRINTM(MINFO, "Return success directly in WPS period\n"); + LEAVE(); + return index; + } + + if (pmpriv->sec_info.osen_enabled && + pbss_desc->posen_ie && + ((*(pbss_desc->posen_ie)).ieee_hdr.element_id == + VENDOR_SPECIFIC_221) + ) { + /* Hotspot 2.0 OSEN AKM */ + PRINTM(MMSG, + "Return success directly in Hotspot OSEN: index=%d " + "encryption_mode=%#x\n", index, + pmpriv->sec_info.encryption_mode); + LEAVE(); + return index; + } + + if ((pbss_desc->bss_mode == mode) && + (pmpriv->sec_info.ewpa_enabled == MTRUE)) { + if (((pbss_desc->pwpa_ie) && + ((*(pbss_desc->pwpa_ie)).vend_hdr.element_id == WPA_IE)) || + ((pbss_desc->prsn_ie) && + ((*(pbss_desc->prsn_ie)).ieee_hdr.element_id == RSN_IE))) { + if (((pmpriv->adapter->config_bands & BAND_GN || + pmpriv->adapter->config_bands & BAND_AN) && + pbss_desc->pht_cap) + && (pmpriv->bss_mode == MLAN_BSS_MODE_INFRA) + && !is_wpa_oui_present(pmpriv->adapter, pbss_desc, + CIPHER_SUITE_CCMP) + && !is_rsn_oui_present(pmpriv->adapter, pbss_desc, + CIPHER_SUITE_CCMP)) { + + if (is_wpa_oui_present + (pmpriv->adapter, pbss_desc, + CIPHER_SUITE_TKIP) + || is_rsn_oui_present(pmpriv->adapter, + pbss_desc, + CIPHER_SUITE_TKIP)) { + PRINTM(MINFO, + "Disable 11n if AES is not supported by AP\n"); + pbss_desc->disable_11n = MTRUE; + } else { + LEAVE(); + return -1; + } + } + LEAVE(); + return index; + } else { + PRINTM(MINFO, + "ewpa_enabled: Ignore none WPA/WPA2 AP\n"); + LEAVE(); + return -1; + } + } + + if (pmpriv->sec_info.wapi_enabled && + (pbss_desc->pwapi_ie && + ((*(pbss_desc->pwapi_ie)).ieee_hdr.element_id == WAPI_IE))) { + PRINTM(MINFO, "Return success for WAPI AP\n"); + LEAVE(); + return index; + } + + if (pbss_desc->bss_mode == mode) { + if (pmpriv->sec_info.wep_status == Wlan802_11WEPDisabled + && !pmpriv->sec_info.wpa_enabled + && !pmpriv->sec_info.wpa2_enabled + && ((!pbss_desc->pwpa_ie) || + ((*(pbss_desc->pwpa_ie)).vend_hdr.element_id != WPA_IE)) + && ((!pbss_desc->prsn_ie) || + ((*(pbss_desc->prsn_ie)).ieee_hdr.element_id != RSN_IE)) + && !pmpriv->adhoc_aes_enabled && + pmpriv->sec_info.encryption_mode == + MLAN_ENCRYPTION_MODE_NONE && !pbss_desc->privacy) { + /* No security */ + LEAVE(); + return index; + } else if (pmpriv->sec_info.wep_status == Wlan802_11WEPEnabled + && !pmpriv->sec_info.wpa_enabled + && !pmpriv->sec_info.wpa2_enabled + && !pmpriv->adhoc_aes_enabled + && pbss_desc->privacy) { + /* Static WEP enabled */ + PRINTM(MINFO, "Disable 11n in WEP mode\n"); + pbss_desc->disable_11n = MTRUE; + /* Reject the following cases: */ + /* + * case 1: RSN IE w/o WEP OUI and WPA IE w/o WEP OUI + * case 2: RSN IE w/o WEP OUI and No WPA IE + * case 3: WPA IE w/o WEP OUI and No RSN IE + */ + if (((pbss_desc->prsn_ie) && + ((*(pbss_desc->prsn_ie)).ieee_hdr.element_id == + RSN_IE)) || ((pbss_desc->pwpa_ie) && + ((*(pbss_desc->pwpa_ie)).vend_hdr. + element_id == WPA_IE))) { + if (!is_rsn_oui_present + (pmpriv->adapter, pbss_desc, + CIPHER_SUITE_WEP40) && + !is_rsn_oui_present(pmpriv->adapter, + pbss_desc, + CIPHER_SUITE_WEP104) && + !is_wpa_oui_present(pmpriv->adapter, + pbss_desc, + CIPHER_SUITE_WEP40) && + !is_wpa_oui_present(pmpriv->adapter, + pbss_desc, + CIPHER_SUITE_WEP104)) + index = -1; + } + + LEAVE(); + return index; + } else if (pmpriv->sec_info.wep_status == Wlan802_11WEPDisabled + && pmpriv->sec_info.wpa_enabled + && !pmpriv->sec_info.wpa2_enabled + && ((pbss_desc->pwpa_ie) && + ((*(pbss_desc->pwpa_ie)).vend_hdr.element_id == + WPA_IE)) + && !pmpriv->adhoc_aes_enabled + /* + * Privacy bit may NOT be set in some APs like + * LinkSys WRT54G && pbss_desc->privacy + */ + ) { + /* WPA enabled */ + PRINTM(MINFO, + "wlan_is_network_compatible() WPA: index=%d wpa_ie=%#x " + "rsn_ie=%#x WEP=%s WPA=%s WPA2=%s EncMode=%#x " + "privacy=%#x\n", index, + (pbss_desc->pwpa_ie) ? (*(pbss_desc->pwpa_ie)). + vend_hdr.element_id : 0, + (pbss_desc->prsn_ie) ? (*(pbss_desc->prsn_ie)). + ieee_hdr.element_id : 0, + (pmpriv->sec_info.wep_status == + Wlan802_11WEPEnabled) ? "e" : "d", + (pmpriv->sec_info.wpa_enabled) ? "e" : "d", + (pmpriv->sec_info.wpa2_enabled) ? "e" : "d", + pmpriv->sec_info.encryption_mode, + pbss_desc->privacy); + if (((pmpriv->adapter->config_bands & BAND_GN || + pmpriv->adapter->config_bands & BAND_AN) && + pbss_desc->pht_cap) + && (pmpriv->bss_mode == MLAN_BSS_MODE_INFRA) + && !is_wpa_oui_present(pmpriv->adapter, pbss_desc, + CIPHER_SUITE_CCMP)) { + if (is_wpa_oui_present + (pmpriv->adapter, pbss_desc, + CIPHER_SUITE_TKIP)) { + PRINTM(MINFO, + "Disable 11n if AES is not supported by AP\n"); + pbss_desc->disable_11n = MTRUE; + } else { + LEAVE(); + return -1; + } + } + LEAVE(); + return index; + } else if (pmpriv->sec_info.wep_status == Wlan802_11WEPDisabled + && !pmpriv->sec_info.wpa_enabled + && pmpriv->sec_info.wpa2_enabled + && ((pbss_desc->prsn_ie) && + ((*(pbss_desc->prsn_ie)).ieee_hdr.element_id == + RSN_IE)) + && !pmpriv->adhoc_aes_enabled + /* + * Privacy bit may NOT be set in some APs like + * LinkSys WRT54G && pbss_desc->privacy + */ + ) { + /* WPA2 enabled */ + PRINTM(MINFO, + "wlan_is_network_compatible() WPA2: index=%d wpa_ie=%#x " + "rsn_ie=%#x WEP=%s WPA=%s WPA2=%s EncMode=%#x " + "privacy=%#x\n", index, + (pbss_desc->pwpa_ie) ? (*(pbss_desc->pwpa_ie)). + vend_hdr.element_id : 0, + (pbss_desc->prsn_ie) ? (*(pbss_desc->prsn_ie)). + ieee_hdr.element_id : 0, + (pmpriv->sec_info.wep_status == + Wlan802_11WEPEnabled) ? "e" : "d", + (pmpriv->sec_info.wpa_enabled) ? "e" : "d", + (pmpriv->sec_info.wpa2_enabled) ? "e" : "d", + pmpriv->sec_info.encryption_mode, + pbss_desc->privacy); + if (((pmpriv->adapter->config_bands & BAND_GN || + pmpriv->adapter->config_bands & BAND_AN) && + pbss_desc->pht_cap) + && (pmpriv->bss_mode == MLAN_BSS_MODE_INFRA) + && !is_rsn_oui_present(pmpriv->adapter, pbss_desc, + CIPHER_SUITE_CCMP)) { + if (is_rsn_oui_present + (pmpriv->adapter, pbss_desc, + CIPHER_SUITE_TKIP)) { + PRINTM(MINFO, + "Disable 11n if AES is not supported by AP\n"); + pbss_desc->disable_11n = MTRUE; + } else { + LEAVE(); + return -1; + } + } + LEAVE(); + return index; + } else if (pmpriv->sec_info.wep_status == Wlan802_11WEPDisabled + && !pmpriv->sec_info.wpa_enabled + && !pmpriv->sec_info.wpa2_enabled + && ((!pbss_desc->pwpa_ie) || + ((*(pbss_desc->pwpa_ie)).vend_hdr.element_id != + WPA_IE)) + && ((!pbss_desc->prsn_ie) || + ((*(pbss_desc->prsn_ie)).ieee_hdr.element_id != + RSN_IE)) + && pmpriv->adhoc_aes_enabled && + pmpriv->sec_info.encryption_mode == + MLAN_ENCRYPTION_MODE_NONE && pbss_desc->privacy) { + /* Ad-hoc AES enabled */ + LEAVE(); + return index; + } else if (pmpriv->sec_info.wep_status == Wlan802_11WEPDisabled + && !pmpriv->sec_info.wpa_enabled + && !pmpriv->sec_info.wpa2_enabled + && ((!pbss_desc->pwpa_ie) || + ((*(pbss_desc->pwpa_ie)).vend_hdr.element_id != + WPA_IE)) + && ((!pbss_desc->prsn_ie) || + ((*(pbss_desc->prsn_ie)).ieee_hdr.element_id != + RSN_IE)) + && !pmpriv->adhoc_aes_enabled && + pmpriv->sec_info.encryption_mode != + MLAN_ENCRYPTION_MODE_NONE && pbss_desc->privacy) { + /* Dynamic WEP enabled */ + PRINTM(MINFO, + "wlan_is_network_compatible() dynamic WEP: index=%d " + "wpa_ie=%#x rsn_ie=%#x EncMode=%#x privacy=%#x\n", + index, + (pbss_desc->pwpa_ie) ? (*(pbss_desc->pwpa_ie)). + vend_hdr.element_id : 0, + (pbss_desc->prsn_ie) ? (*(pbss_desc->prsn_ie)). + ieee_hdr.element_id : 0, + pmpriv->sec_info.encryption_mode, + pbss_desc->privacy); + LEAVE(); + return index; + } + + /* Security doesn't match */ + PRINTM(MINFO, + "wlan_is_network_compatible() FAILED: index=%d wpa_ie=%#x " + "rsn_ie=%#x WEP=%s WPA=%s WPA2=%s EncMode=%#x privacy=%#x\n", + index, + (pbss_desc->pwpa_ie) ? (*(pbss_desc->pwpa_ie)).vend_hdr. + element_id : 0, + (pbss_desc->prsn_ie) ? (*(pbss_desc->prsn_ie)).ieee_hdr. + element_id : 0, + (pmpriv->sec_info.wep_status == + Wlan802_11WEPEnabled) ? "e" : "d", + (pmpriv->sec_info.wpa_enabled) ? "e" : "d", + (pmpriv->sec_info.wpa2_enabled) ? "e" : "d", + pmpriv->sec_info.encryption_mode, pbss_desc->privacy); + LEAVE(); + return -1; + } + + /* Mode doesn't match */ + LEAVE(); + return -1; +} + +/** + * @brief Internal function used to flush the scan list + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_flush_scan_table(IN pmlan_adapter pmadapter) +{ + t_u8 i = 0; + ENTER(); + + PRINTM(MINFO, "Flushing scan table\n"); + + memset(pmadapter, pmadapter->pscan_table, 0, + (sizeof(BSSDescriptor_t) * MRVDRV_MAX_BSSID_LIST)); + pmadapter->num_in_scan_table = 0; + + memset(pmadapter, pmadapter->bcn_buf, 0, pmadapter->bcn_buf_size); + pmadapter->pbcn_buf_end = pmadapter->bcn_buf; + + for (i = 0; i < pmadapter->num_in_chan_stats; i++) + pmadapter->pchan_stats[i].cca_scan_duration = 0; + pmadapter->idx_chan_stats = 0; + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Internal function used to start a scan based on an input config + * + * Use the input user scan configuration information when provided in + * order to send the appropriate scan commands to firmware to populate or + * update the internal driver scan table + * + * @param pmpriv A pointer to mlan_private structure + * @param pioctl_buf A pointer to MLAN IOCTL Request buffer + * @param puser_scan_in Pointer to the input configuration for the requested + * scan. + * + * @return MLAN_STATUS_SUCCESS or < 0 if error + */ +mlan_status +wlan_scan_networks(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, + IN const wlan_user_scan_cfg *puser_scan_in) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_adapter *pmadapter = pmpriv->adapter; + mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks; + cmd_ctrl_node *pcmd_node = MNULL; + pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *)pioctl_buf; + + wlan_scan_cmd_config_tlv *pscan_cfg_out = MNULL; + MrvlIEtypes_ChanListParamSet_t *pchan_list_out; + t_u32 buf_size; + ChanScanParamSet_t *pscan_chan_list; + + t_u8 keep_previous_scan; + t_u8 filtered_scan; + t_u8 scan_current_chan_only; + t_u8 max_chan_per_scan; + t_u8 i; + + ENTER(); + + ret = pcb->moal_malloc(pmadapter->pmoal_handle, + sizeof(wlan_scan_cmd_config_tlv), MLAN_MEM_DEF, + (t_u8 **)&pscan_cfg_out); + if (ret != MLAN_STATUS_SUCCESS || !pscan_cfg_out) { + PRINTM(MERROR, "Memory allocation for pscan_cfg_out failed!\n"); + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_NO_MEM; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + buf_size = sizeof(ChanScanParamSet_t) * WLAN_USER_SCAN_CHAN_MAX; + ret = pcb->moal_malloc(pmadapter->pmoal_handle, buf_size, MLAN_MEM_DEF, + (t_u8 **)&pscan_chan_list); + if (ret != MLAN_STATUS_SUCCESS || !pscan_chan_list) { + PRINTM(MERROR, "Failed to allocate scan_chan_list\n"); + if (pscan_cfg_out) + pcb->moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pscan_cfg_out); + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_NO_MEM; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + memset(pmadapter, pscan_chan_list, 0x00, buf_size); + memset(pmadapter, pscan_cfg_out, 0x00, + sizeof(wlan_scan_cmd_config_tlv)); + + keep_previous_scan = MFALSE; + + ret = wlan_scan_setup_scan_config(pmpriv, + puser_scan_in, + &pscan_cfg_out->config, + &pchan_list_out, + pscan_chan_list, + &max_chan_per_scan, + &filtered_scan, + &scan_current_chan_only); + if (ret != MLAN_STATUS_SUCCESS) { + + PRINTM(MERROR, "Failed to setup scan config\n"); + if (pscan_cfg_out) + pcb->moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pscan_cfg_out); + if (pscan_chan_list) + pcb->moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pscan_chan_list); + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + if (puser_scan_in) + keep_previous_scan = puser_scan_in->keep_previous_scan; + + if (keep_previous_scan == MFALSE) { + memset(pmadapter, pmadapter->pscan_table, 0x00, + sizeof(BSSDescriptor_t) * MRVDRV_MAX_BSSID_LIST); + pmadapter->num_in_scan_table = 0; + pmadapter->pbcn_buf_end = pmadapter->bcn_buf; + for (i = 0; i < pmadapter->num_in_chan_stats; i++) + pmadapter->pchan_stats[i].cca_scan_duration = 0; + pmadapter->idx_chan_stats = 0; + } + + ret = wlan_scan_channel_list(pmpriv, + pioctl_buf, + max_chan_per_scan, + filtered_scan, + &pscan_cfg_out->config, + pchan_list_out, pscan_chan_list); + + /* Get scan command from scan_pending_q and put to cmd_pending_q */ + if (ret == MLAN_STATUS_SUCCESS) { + if (util_peek_list + (pmadapter->pmoal_handle, &pmadapter->scan_pending_q, + pcb->moal_spin_lock, pcb->moal_spin_unlock)) { + pcmd_node = + (cmd_ctrl_node *)util_dequeue_list(pmadapter-> + pmoal_handle, + &pmadapter-> + scan_pending_q, + pcb-> + moal_spin_lock, + pcb-> + moal_spin_unlock); + wlan_request_cmd_lock(pmadapter); + pmadapter->pscan_ioctl_req = pioctl_req; + pmadapter->scan_processing = MTRUE; + wlan_release_cmd_lock(pmadapter); + wlan_insert_cmd_to_pending_q(pmadapter, pcmd_node, + MTRUE); + } + } + if (pscan_cfg_out) + pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)pscan_cfg_out); + + if (pscan_chan_list) + pcb->moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pscan_chan_list); + + LEAVE(); + return ret; +} + +/** + * @brief Prepare a scan command to be sent to the firmware + * + * Use the wlan_scan_cmd_config sent to the command processing module in + * the wlan_prepare_cmd to configure a HostCmd_DS_802_11_SCAN command + * struct to send to firmware. + * + * The fixed fields specifying the BSS type and BSSID filters as well as a + * variable number/length of TLVs are sent in the command to firmware. + * + * @param pmpriv A pointer to mlan_private structure + * @param pcmd A pointer to HostCmd_DS_COMMAND structure to be sent to + * firmware with the HostCmd_DS_801_11_SCAN structure + * @param pdata_buf Void pointer cast of a wlan_scan_cmd_config struct used + * to set the fields/TLVs for the command sent to firmware + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_802_11_scan(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *pcmd, IN t_void *pdata_buf) +{ + HostCmd_DS_802_11_SCAN *pscan_cmd = &pcmd->params.scan; + wlan_scan_cmd_config *pscan_cfg; + + ENTER(); + + pscan_cfg = (wlan_scan_cmd_config *)pdata_buf; + + /* Set fixed field variables in scan command */ + pscan_cmd->bss_mode = pscan_cfg->bss_mode; + memcpy(pmpriv->adapter, pscan_cmd->bssid, pscan_cfg->specific_bssid, + sizeof(pscan_cmd->bssid)); + memcpy(pmpriv->adapter, pscan_cmd->tlv_buffer, pscan_cfg->tlv_buf, + pscan_cfg->tlv_buf_len); + + pcmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_SCAN); + + /* Size is equal to the sizeof(fixed portions) + the TLV len + header */ + pcmd->size = (t_u16)wlan_cpu_to_le16((t_u16)(sizeof(pscan_cmd->bss_mode) + + sizeof(pscan_cmd->bssid) + + pscan_cfg->tlv_buf_len + + S_DS_GEN)); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of scan + * + * The response buffer for the scan command has the following + * memory layout: + * + * .-------------------------------------------------------------. + * | Header (4 * sizeof(t_u16)): Standard command response hdr | + * .-------------------------------------------------------------. + * | BufSize (t_u16) : sizeof the BSS Description data | + * .-------------------------------------------------------------. + * | NumOfSet (t_u8) : Number of BSS Descs returned | + * .-------------------------------------------------------------. + * | BSSDescription data (variable, size given in BufSize) | + * .-------------------------------------------------------------. + * | TLV data (variable, size calculated using Header->Size, | + * | BufSize and sizeof the fixed fields above) | + * .-------------------------------------------------------------. + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ret_802_11_scan(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, IN t_void *pioctl_buf) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_adapter *pmadapter = pmpriv->adapter; + mlan_callbacks *pcb = MNULL; + cmd_ctrl_node *pcmd_node = MNULL; + HostCmd_DS_802_11_SCAN_RSP *pscan_rsp = MNULL; + BSSDescriptor_t *bss_new_entry = MNULL; + MrvlIEtypes_Data_t *ptlv; + MrvlIEtypes_TsfTimestamp_t *ptsf_tlv = MNULL; + MrvlIEtypes_ChannelStats_t *pchanstats_tlv = MNULL; + t_u8 *pbss_info; + t_u32 scan_resp_size; + t_u32 bytes_left; + t_u32 num_in_table; + t_u32 bss_idx; + t_u32 idx; + t_u32 tlv_buf_size; + t_u64 tsf_val; + chan_freq_power_t *cfp; + MrvlIEtypes_ChanBandListParamSet_t *pchan_band_tlv = MNULL; + ChanBandParamSet_t *pchan_band; + t_u8 band; + t_u8 is_bgscan_resp; + t_u32 age_ts_usec; + t_u8 null_ssid[MLAN_MAX_SSID_LENGTH] = { 0 }; + t_u32 status_code = 0; + pmlan_ioctl_req pscan_ioctl_req = MNULL; + + ENTER(); + pcb = (pmlan_callbacks)&pmadapter->callbacks; + + is_bgscan_resp = (resp->command == HostCmd_CMD_802_11_BG_SCAN_QUERY); + if (is_bgscan_resp) + pscan_rsp = &resp->params.bg_scan_query_resp.scan_resp; + else + pscan_rsp = &resp->params.scan_resp; + + if (pscan_rsp->number_of_sets > MRVDRV_MAX_BSSID_LIST) { + PRINTM(MERROR, + "SCAN_RESP: Invalid number of AP returned (%d)!!\n", + pscan_rsp->number_of_sets); + status_code = MLAN_ERROR_CMD_SCAN_FAIL; + ret = MLAN_STATUS_FAILURE; + goto done; + } + + bytes_left = wlan_le16_to_cpu(pscan_rsp->bss_descript_size); + PRINTM(MINFO, "SCAN_RESP: bss_descript_size %d\n", bytes_left); + + scan_resp_size = resp->size; + + PRINTM(MINFO, "SCAN_RESP: returned %d APs before parsing\n", + pscan_rsp->number_of_sets); + + num_in_table = pmadapter->num_in_scan_table; + pbss_info = pscan_rsp->bss_desc_and_tlv_buffer; + + /* + * The size of the TLV buffer is equal to the entire command response + * size (scan_resp_size) minus the fixed fields (sizeof()'s), the + * BSS Descriptions (bss_descript_size as bytesLef) and the command + * response header (S_DS_GEN) + */ + tlv_buf_size = scan_resp_size - (bytes_left + + sizeof(pscan_rsp->bss_descript_size) + + sizeof(pscan_rsp->number_of_sets) + + S_DS_GEN); + if (is_bgscan_resp) + tlv_buf_size -= + sizeof(resp->params.bg_scan_query_resp. + report_condition); + + ptlv = (MrvlIEtypes_Data_t *)(pscan_rsp->bss_desc_and_tlv_buffer + + bytes_left); + + /* + * Search the TLV buffer space in the scan response + * for any valid TLVs + */ + wlan_ret_802_11_scan_get_tlv_ptrs(pmadapter, + ptlv, + tlv_buf_size, + TLV_TYPE_TSFTIMESTAMP, + (MrvlIEtypes_Data_t **)&ptsf_tlv); + + /* + * Search the TLV buffer space in the scan response + * for any valid TLVs + */ + wlan_ret_802_11_scan_get_tlv_ptrs(pmadapter, + ptlv, + tlv_buf_size, + TLV_TYPE_CHANNELBANDLIST, + (MrvlIEtypes_Data_t **) + &pchan_band_tlv); + wlan_ret_802_11_scan_get_tlv_ptrs(pmadapter, ptlv, tlv_buf_size, + TLV_TYPE_CHANNEL_STATS, + (MrvlIEtypes_Data_t **) + &pchanstats_tlv); + + if (pchanstats_tlv) + wlan_update_chan_statistics(pmpriv, pchanstats_tlv); + + /* + * Process each scan response returned (pscan_rsp->number_of_sets). + * Save the information in the bss_new_entry and then insert into + * the driver scan table either as an update to an existing entry + * or as an addition at the end of the table + */ + ret = pcb->moal_malloc(pmadapter->pmoal_handle, sizeof(BSSDescriptor_t), + MLAN_MEM_DEF, (t_u8 **)&bss_new_entry); + + if (ret != MLAN_STATUS_SUCCESS || !bss_new_entry) { + PRINTM(MERROR, "Memory allocation for bss_new_entry failed!\n"); + status_code = MLAN_ERROR_NO_MEM; + ret = MLAN_STATUS_FAILURE; + goto done; + } + + for (idx = 0; idx < pscan_rsp->number_of_sets && bytes_left; idx++) { + /* Zero out the bss_new_entry we are about to store info in */ + memset(pmadapter, bss_new_entry, 0x00, sizeof(BSSDescriptor_t)); + + /* Process the data fields and IEs returned for this BSS */ + if (wlan_interpret_bss_desc_with_ie(pmadapter, + bss_new_entry, + &pbss_info, + &bytes_left, + MFALSE) == + MLAN_STATUS_SUCCESS) { + PRINTM(MINFO, "SCAN_RESP: BSSID = " MACSTR "\n", + MAC2STR(bss_new_entry->mac_address)); + + band = BAND_G; + if (pchan_band_tlv) { + pchan_band = + &pchan_band_tlv->chan_band_param[idx]; + band = radio_type_to_band(pchan_band-> + radio_type & (MBIT(0) + | + MBIT + (1))); + if (!bss_new_entry->channel) + bss_new_entry->channel = + pchan_band->chan_number; + } + /* + * Save the band designation for this entry + * for use in join + */ + bss_new_entry->bss_band = band; + + cfp = wlan_find_cfp_by_band_and_channel(pmadapter, + (t_u8) + bss_new_entry-> + bss_band, + (t_u16) + bss_new_entry-> + channel); + if (cfp) + bss_new_entry->freq = cfp->freq; + else + bss_new_entry->freq = 0; + + /* Skip entry if on blacklisted channel */ + if (cfp && cfp->dynamic.blacklist) { + PRINTM(MINFO, + "SCAN_RESP: dropping entry on blacklist channel.\n"); + continue; + } + + /* + * Search the scan table for the same bssid + */ + for (bss_idx = 0; bss_idx < num_in_table; bss_idx++) { + if (!memcmp + (pmadapter, bss_new_entry->mac_address, + pmadapter->pscan_table[bss_idx]. + mac_address, + sizeof(bss_new_entry->mac_address))) { + /* + * If the SSID matches as well, it is a + * duplicate of this entry. Keep the + * bss_idx set to this entry so we + * replace the old contents in the table + */ + if ((bss_new_entry->ssid.ssid_len == + pmadapter->pscan_table[bss_idx]. + ssid.ssid_len) + && + (!memcmp + (pmadapter, + bss_new_entry->ssid.ssid, + pmadapter->pscan_table[bss_idx]. + ssid.ssid, + bss_new_entry->ssid.ssid_len))) { + PRINTM(MINFO, + "SCAN_RESP: Duplicate of index: %d\n", + bss_idx); + + break; + } + /* + * If the SSID is NULL for same BSSID + * keep the bss_idx set to this entry + * so we replace the old contents in + * the table + */ + if (!memcmp + (pmadapter, + pmadapter->pscan_table[bss_idx]. + ssid.ssid, null_ssid, + pmadapter->pscan_table[bss_idx]. + ssid.ssid_len)) { + PRINTM(MINFO, + "SCAN_RESP: Duplicate of index: %d\n", + bss_idx); + break; + } + } + } + /* + * If the bss_idx is equal to the number of entries + * in the table, the new entry was not a duplicate; + * append it to the scan table + */ + if (bss_idx == num_in_table) { + /* + * Range check the bss_idx, keep it limited + * to the last entry + */ + if (bss_idx == MRVDRV_MAX_BSSID_LIST) + bss_idx--; + else + num_in_table++; + } + + /* + * Save the beacon/probe response returned for later + * application retrieval. Duplicate beacon/probe + * responses are updated if possible + */ + wlan_ret_802_11_scan_store_beacon(pmpriv, + bss_idx, + num_in_table, + bss_new_entry); + if (bss_new_entry->pbeacon_buf == MNULL) { + PRINTM(MCMND, + "No space for beacon, drop this entry\n"); + num_in_table--; + continue; + } + /* + * If the TSF TLV was appended to the scan results, save + * this entry's TSF value in the networkTSF field. The + * networkTSF is the firmware's TSF value at the time + * the beacon or probe response was received. + */ + if (ptsf_tlv) { + memcpy(pmpriv->adapter, &tsf_val, + &ptsf_tlv->tsf_data[idx * TSF_DATA_SIZE], + sizeof(tsf_val)); + tsf_val = wlan_le64_to_cpu(tsf_val); + memcpy(pmpriv->adapter, + &bss_new_entry->network_tsf, &tsf_val, + sizeof(bss_new_entry->network_tsf)); + } + + /* Copy the locally created bss_new_entry to the scan + table */ + memcpy(pmadapter, &pmadapter->pscan_table[bss_idx], + bss_new_entry, + sizeof(pmadapter->pscan_table[bss_idx])); + + } else { + /* Error parsing/interpreting the scan response, + skipped */ + PRINTM(MERROR, + "SCAN_RESP: wlan_interpret_bss_desc_with_ie returned error\n"); + } + } + + PRINTM(MINFO, "SCAN_RESP: Scanned %2d APs, %d valid, %d total\n", + pscan_rsp->number_of_sets, + num_in_table - pmadapter->num_in_scan_table, num_in_table); + + /* Update the total number of BSSIDs in the scan table */ + pmadapter->num_in_scan_table = num_in_table; + /* Update the age_in_second */ + pmadapter->callbacks.moal_get_system_time(pmadapter->pmoal_handle, + &pmadapter->age_in_secs, + &age_ts_usec); + if (is_bgscan_resp) + goto done; + if (!util_peek_list + (pmadapter->pmoal_handle, &pmadapter->scan_pending_q, + pcb->moal_spin_lock, pcb->moal_spin_unlock)) { + /* + * Process the resulting scan table: + * - Remove any bad ssids + * - Update our current BSS information from scan data + */ + wlan_scan_process_results(pmpriv); + + wlan_request_cmd_lock(pmadapter); + pmadapter->scan_processing = MFALSE; + pscan_ioctl_req = pmadapter->pscan_ioctl_req; + pmadapter->pscan_ioctl_req = MNULL; + /* Need to indicate IOCTL complete */ + if (pscan_ioctl_req) { + pscan_ioctl_req->status_code = MLAN_ERROR_NO_ERROR; + /* Indicate ioctl complete */ + pcb->moal_ioctl_complete(pmadapter->pmoal_handle, + (pmlan_ioctl_req) + pscan_ioctl_req, + MLAN_STATUS_SUCCESS); + } + wlan_release_cmd_lock(pmadapter); + pmadapter->bgscan_reported = MFALSE; + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_SCAN_REPORT, MNULL); + } else { + /* If firmware not ready, do not issue any more scan commands */ + if (pmadapter->hw_status != WlanHardwareStatusReady) { + status_code = MLAN_ERROR_FW_NOT_READY; + ret = MLAN_STATUS_FAILURE; + goto done; + } else { + /* Get scan command from scan_pending_q and put to + cmd_pending_q */ + pcmd_node = + (cmd_ctrl_node *)util_dequeue_list(pmadapter-> + pmoal_handle, + &pmadapter-> + scan_pending_q, + pcb-> + moal_spin_lock, + pcb-> + moal_spin_unlock); + + wlan_insert_cmd_to_pending_q(pmadapter, pcmd_node, + MTRUE); + } + } + +done: + if (bss_new_entry) + pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)bss_new_entry); + if (ret) { + /* Flush all pending scan commands */ + wlan_flush_scan_queue(pmadapter); + wlan_request_cmd_lock(pmadapter); + pmadapter->scan_processing = MFALSE; + pscan_ioctl_req = pmadapter->pscan_ioctl_req; + pmadapter->pscan_ioctl_req = MNULL; + if (pscan_ioctl_req) { + pscan_ioctl_req->status_code = status_code; + /* Indicate ioctl complete */ + pcb->moal_ioctl_complete(pmadapter->pmoal_handle, + pscan_ioctl_req, + MLAN_STATUS_FAILURE); + } + wlan_release_cmd_lock(pmadapter); + } + LEAVE(); + return ret; +} + +/** + * @brief Prepare an extended scan command to be sent to the firmware + * + * Use the wlan_scan_cmd_config sent to the command processing module in + * the wlan_prepare_cmd to configure a HostCmd_DS_802_11_SCAN_EXT command + * struct to send to firmware. + * + * @param pmpriv A pointer to mlan_private structure + * @param pcmd A pointer to HostCmd_DS_COMMAND structure to be sent to + * firmware with the HostCmd_DS_802_11_SCAN_EXT structure + * @param pdata_buf Void pointer cast of a wlan_scan_cmd_config struct used + * to set the fields/TLVs for the command sent to firmware + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_802_11_scan_ext(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *pcmd, IN t_void *pdata_buf) +{ + HostCmd_DS_802_11_SCAN_EXT *pext_scan_cmd = &pcmd->params.ext_scan; + wlan_scan_cmd_config *pscan_cfg = MNULL; + + ENTER(); + + pscan_cfg = (wlan_scan_cmd_config *)pdata_buf; + + memcpy(pmpriv->adapter, pext_scan_cmd->tlv_buffer, + pscan_cfg->tlv_buf, pscan_cfg->tlv_buf_len); + + pcmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_SCAN_EXT); + + /* Size is equal to the sizeof(fixed portions) + the TLV len + header */ + pcmd->size = wlan_cpu_to_le16((t_u16)(sizeof(pext_scan_cmd->reserved) + + pscan_cfg->tlv_buf_len + + S_DS_GEN)); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of extended scan + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ret_802_11_scan_ext(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, IN t_void *pioctl_buf) +{ + HostCmd_DS_802_11_SCAN_EXT *pext_scan_cmd = &(resp->params.ext_scan); + MrvlIEtypesHeader_t *tlv = MNULL; + MrvlIEtypes_ChannelStats_t *tlv_chanstats = MNULL; + t_u16 tlv_buf_left = 0; + t_u16 tlv_type = 0; + t_u16 tlv_len = 0; + ENTER(); + + PRINTM(MINFO, "EXT scan returns successfully\n"); + tlv = (MrvlIEtypesHeader_t *)pext_scan_cmd->tlv_buffer; + tlv_buf_left = + resp->size - (sizeof(HostCmd_DS_802_11_SCAN_EXT) - 1 + + S_DS_GEN); + while (tlv_buf_left >= sizeof(MrvlIEtypesHeader_t)) { + tlv_type = wlan_le16_to_cpu(tlv->type); + tlv_len = wlan_le16_to_cpu(tlv->len); + if (tlv_buf_left < (tlv_len + sizeof(MrvlIEtypesHeader_t))) { + PRINTM(MERROR, + "Error processing uAP sys config TLVs, bytes left < TLV length\n"); + break; + } + switch (tlv_type) { + case TLV_TYPE_CHANNEL_STATS: + tlv_chanstats = (MrvlIEtypes_ChannelStats_t *)tlv; + wlan_update_chan_statistics(pmpriv, tlv_chanstats); + break; + default: + break; + } + tlv_buf_left -= tlv_len + sizeof(MrvlIEtypesHeader_t); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len + + sizeof(MrvlIEtypesHeader_t)); + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function parse and store the extended scan results + * + * @param pmpriv A pointer to mlan_private structure + * @param number_of_sets Number of BSS + * @param pscan_resp A pointer to scan response buffer + * @param scan_resp_size Size of scan response buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_parse_ext_scan_result(IN mlan_private *pmpriv, + IN t_u8 number_of_sets, + IN t_u8 *pscan_resp, IN t_u16 scan_resp_size) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_adapter *pmadapter = pmpriv->adapter; + mlan_callbacks *pcb = MNULL; + BSSDescriptor_t *bss_new_entry = MNULL; + t_u8 *pbss_info; + t_u32 bytes_left; + t_u32 bytes_left_for_tlv; + t_u32 num_in_table; + t_u32 bss_idx; + t_u32 idx; + t_u64 tsf_val; + chan_freq_power_t *cfp; + t_u16 tlv_type, tlv_len; + MrvlIEtypes_Data_t *ptlv = MNULL; + MrvlIEtypes_Bss_Scan_Rsp_t *pscan_rsp_tlv = MNULL; + MrvlIEtypes_Bss_Scan_Info_t *pscan_info_tlv = MNULL; + t_u8 band; + t_u32 age_ts_usec; + t_u8 null_ssid[MLAN_MAX_SSID_LENGTH] = { 0 }; + + ENTER(); + pcb = (pmlan_callbacks)&pmadapter->callbacks; + + if (number_of_sets > MRVDRV_MAX_BSSID_LIST) { + PRINTM(MERROR, + "EXT_SCAN: Invalid number of AP returned (%d)!!\n", + number_of_sets); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + bytes_left = scan_resp_size; + PRINTM(MINFO, "EXT_SCAN: bss_descript_size %d\n", scan_resp_size); + PRINTM(MINFO, "EXT_SCAN: returned %d APs before parsing\n", + number_of_sets); + + num_in_table = pmadapter->num_in_scan_table; + ptlv = (MrvlIEtypes_Data_t *)pscan_resp; + + /* + * Process each scan response returned number_of_sets. Save + * the information in the bss_new_entry and then insert into the + * driver scan table either as an update to an existing entry + * or as an addition at the end of the table + */ + ret = pcb->moal_malloc(pmadapter->pmoal_handle, sizeof(BSSDescriptor_t), + MLAN_MEM_DEF, (t_u8 **)&bss_new_entry); + + if (ret != MLAN_STATUS_SUCCESS || !bss_new_entry) { + PRINTM(MERROR, "Memory allocation for bss_new_entry failed!\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + for (idx = 0; idx < number_of_sets && bytes_left > + sizeof(MrvlIEtypesHeader_t); idx++) { + tlv_type = wlan_le16_to_cpu(ptlv->header.type); + tlv_len = wlan_le16_to_cpu(ptlv->header.len); + if (bytes_left < sizeof(MrvlIEtypesHeader_t) + tlv_len) { + PRINTM(MERROR, + "EXT_SCAN: Error bytes left < TLV length\n"); + break; + } + pscan_rsp_tlv = MNULL; + pscan_info_tlv = MNULL; + bytes_left_for_tlv = bytes_left; + /* + * BSS response TLV with beacon or probe response buffer + * at the initial position of each descriptor + */ + if (tlv_type == TLV_TYPE_BSS_SCAN_RSP) { + pbss_info = (t_u8 *)ptlv; + pscan_rsp_tlv = (MrvlIEtypes_Bss_Scan_Rsp_t *)ptlv; + ptlv = (MrvlIEtypes_Data_t *)(ptlv->data + tlv_len); + bytes_left_for_tlv -= + (tlv_len + sizeof(MrvlIEtypesHeader_t)); + } else + break; + + /* Process variable TLV */ + while (bytes_left_for_tlv >= sizeof(MrvlIEtypesHeader_t) && + wlan_le16_to_cpu(ptlv->header.type) != + TLV_TYPE_BSS_SCAN_RSP) { + tlv_type = wlan_le16_to_cpu(ptlv->header.type); + tlv_len = wlan_le16_to_cpu(ptlv->header.len); + if (bytes_left_for_tlv < + sizeof(MrvlIEtypesHeader_t) + tlv_len) { + PRINTM(MERROR, + "EXT_SCAN: Error in processing TLV, " + "bytes left < TLV length\n"); + pscan_rsp_tlv = MNULL; + bytes_left_for_tlv = 0; + continue; + } + switch (tlv_type) { + case TLV_TYPE_BSS_SCAN_INFO: + pscan_info_tlv = + (MrvlIEtypes_Bss_Scan_Info_t *)ptlv; + if (tlv_len != + sizeof(MrvlIEtypes_Bss_Scan_Info_t) - + sizeof(MrvlIEtypesHeader_t)) { + bytes_left_for_tlv = 0; + continue; + } + break; + default: + break; + } + ptlv = (MrvlIEtypes_Data_t *)(ptlv->data + tlv_len); + bytes_left -= (tlv_len + sizeof(MrvlIEtypesHeader_t)); + bytes_left_for_tlv -= + (tlv_len + sizeof(MrvlIEtypesHeader_t)); + } + /* No BSS response TLV */ + if (pscan_rsp_tlv == MNULL) + break; + + /* + * Advance pointer to the beacon buffer length and + * update the bytes count so that the function + * wlan_interpret_bss_desc_with_ie() can handle the + * scan buffer withut any change + */ + pbss_info += sizeof(t_u16); + bytes_left -= sizeof(t_u16); + + /* Zero out the bss_new_entry we are about to store info in */ + memset(pmadapter, bss_new_entry, 0x00, sizeof(BSSDescriptor_t)); + + /* Process the data fields and IEs returned for this BSS */ + if (wlan_interpret_bss_desc_with_ie(pmadapter, + bss_new_entry, + &pbss_info, + &bytes_left, + MTRUE) == + MLAN_STATUS_SUCCESS) { + PRINTM(MINFO, "EXT_SCAN: BSSID = " MACSTR "\n", + MAC2STR(bss_new_entry->mac_address)); + + band = BAND_G; + /* + * If the BSS info TLV was appended to the scan results, + * save this entry's TSF value in the networkTSF field. + * The networkTSF is the firmware's TSF value at the + * time the beacon or probe response was received. + */ + if (pscan_info_tlv) { + /* RSSI is 2 byte long */ + bss_new_entry->rssi = + -(t_s32)(wlan_le16_to_cpu + (pscan_info_tlv->rssi)); + PRINTM(MINFO, "EXT_SCAN: RSSI=%d\n", + bss_new_entry->rssi); + memcpy(pmpriv->adapter, &tsf_val, + &pscan_info_tlv->tsf, sizeof(tsf_val)); + tsf_val = wlan_le64_to_cpu(tsf_val); + memcpy(pmpriv->adapter, + &bss_new_entry->network_tsf, &tsf_val, + sizeof(bss_new_entry->network_tsf)); + band = radio_type_to_band(pscan_info_tlv->band); + } + /* Save the band designation for this entry for use in + join */ + bss_new_entry->bss_band = band; + + cfp = wlan_find_cfp_by_band_and_channel(pmadapter, + (t_u8) + bss_new_entry-> + bss_band, + (t_u16) + bss_new_entry-> + channel); + if (cfp) + bss_new_entry->freq = cfp->freq; + else + bss_new_entry->freq = 0; + + /* Skip entry if on blacklisted channel */ + if (cfp && cfp->dynamic.blacklist) { + PRINTM(MINFO, + "EXT_SCAN: dropping entry on blacklist channel.\n"); + continue; + } + + /* + * Search the scan table for the same bssid + */ + for (bss_idx = 0; bss_idx < num_in_table; bss_idx++) { + if (!memcmp + (pmadapter, bss_new_entry->mac_address, + pmadapter->pscan_table[bss_idx]. + mac_address, + sizeof(bss_new_entry->mac_address))) { + /* + * If the SSID matches as well, it is a + * duplicate of this entry. Keep the + * bss_idx set to this entry so we + * replace the old contents in the table + */ + if ((bss_new_entry->ssid.ssid_len == + pmadapter->pscan_table[bss_idx]. + ssid.ssid_len) + && + (!memcmp + (pmadapter, + bss_new_entry->ssid.ssid, + pmadapter->pscan_table[bss_idx]. + ssid.ssid, + bss_new_entry->ssid.ssid_len))) { + PRINTM(MINFO, + "EXT_SCAN: Duplicate of index: %d\n", + bss_idx); + break; + } + /* + * If the SSID is NULL for same BSSID + * keep the bss_idx set to this entry + * so we replace the old contents in + * the table + */ + if (!memcmp + (pmadapter, + pmadapter->pscan_table[bss_idx]. + ssid.ssid, null_ssid, + pmadapter->pscan_table[bss_idx]. + ssid.ssid_len)) { + PRINTM(MINFO, + "EXT_SCAN: Duplicate of index: %d\n", + bss_idx); + break; + } + } + } + /* + * If the bss_idx is equal to the number of entries + * in the table, the new entry was not a duplicate; + * append it to the scan table + */ + if (bss_idx == num_in_table) { + /* Range check the bss_idx, keep it limited to + the last entry */ + if (bss_idx == MRVDRV_MAX_BSSID_LIST) + bss_idx--; + else + num_in_table++; + } + + /* + * Save the beacon/probe response returned for later + * application retrieval. Duplicate beacon/probe + * responses are updated if possible + */ + wlan_ret_802_11_scan_store_beacon(pmpriv, + bss_idx, + num_in_table, + bss_new_entry); + if (bss_new_entry->pbeacon_buf == MNULL) { + PRINTM(MCMND, + "No space for beacon, drop this entry\n"); + num_in_table--; + continue; + } + + /* Copy the locally created bss_new_entry to the scan + table */ + memcpy(pmadapter, &pmadapter->pscan_table[bss_idx], + bss_new_entry, + sizeof(pmadapter->pscan_table[bss_idx])); + } else { + /* Error parsing/interpreting the scan response, + skipped */ + PRINTM(MERROR, + "EXT_SCAN: wlan_interpret_bss_desc_with_ie returned error\n"); + } + } + + PRINTM(MINFO, "EXT_SCAN: Scanned %2d APs, %d valid, %d total\n", + number_of_sets, num_in_table - pmadapter->num_in_scan_table, + num_in_table); + + /* Update the total number of BSSIDs in the scan table */ + pmadapter->num_in_scan_table = num_in_table; + /* Update the age_in_second */ + pmadapter->callbacks.moal_get_system_time(pmadapter->pmoal_handle, + &pmadapter->age_in_secs, + &age_ts_usec); + +done: + if (bss_new_entry) + pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)bss_new_entry); + + LEAVE(); + return ret; +} + +/** + * @brief This function handles the event extended scan report + * + * @param pmpriv A pointer to mlan_private structure + * @param pmbuf A pointer to mlan_buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_handle_event_ext_scan_report(IN mlan_private *pmpriv, + IN mlan_buffer *pmbuf) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + mlan_callbacks *pcb = &pmadapter->callbacks; + mlan_ioctl_req *pioctl_req = MNULL; + cmd_ctrl_node *pcmd_node = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + + mlan_event_scan_result *pevent_scan = (pmlan_event_scan_result) + (pmbuf->pbuf + pmbuf->data_offset); + t_u8 *ptlv = (pmbuf->pbuf + pmbuf->data_offset + + sizeof(mlan_event_scan_result)); + t_u16 tlv_buf_left = wlan_cpu_to_le16(pevent_scan->buf_size); + + DBG_HEXDUMP(MCMD_D, "EVENT EXT_SCAN", pmbuf->pbuf + + pmbuf->data_offset, pmbuf->data_len); + wlan_parse_ext_scan_result(pmpriv, pevent_scan->num_of_set, + ptlv, tlv_buf_left); + if (!pevent_scan->more_event) { + + if (!util_peek_list(pmadapter->pmoal_handle, + &pmadapter->scan_pending_q, + pcb->moal_spin_lock, + pcb->moal_spin_unlock)) { + /* + * Process the resulting scan table: + * - Remove any bad ssids + * - Update our current BSS information from scan data + */ + wlan_scan_process_results(pmpriv); + + wlan_request_cmd_lock(pmadapter); + pmadapter->scan_processing = MFALSE; + pioctl_req = pmadapter->pscan_ioctl_req; + pmadapter->pscan_ioctl_req = MNULL; + /* Need to indicate IOCTL complete */ + if (pioctl_req != MNULL) { + pioctl_req->status_code = MLAN_ERROR_NO_ERROR; + /* Indicate ioctl complete */ + pcb->moal_ioctl_complete(pmadapter-> + pmoal_handle, + (pmlan_ioctl_req) + pioctl_req, + MLAN_STATUS_SUCCESS); + } + wlan_release_cmd_lock(pmadapter); + + pmadapter->bgscan_reported = MFALSE; + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_SCAN_REPORT, + MNULL); + } else { + /* If firmware not ready, do not issue any more scan + commands */ + if (pmadapter->hw_status != WlanHardwareStatusReady) { + /* Flush all pending scan commands */ + wlan_flush_scan_queue(pmadapter); + wlan_request_cmd_lock(pmadapter); + pmadapter->scan_processing = MFALSE; + pioctl_req = pmadapter->pscan_ioctl_req; + pmadapter->pscan_ioctl_req = MNULL; + /* Indicate IOCTL complete */ + if (pioctl_req != MNULL) { + pioctl_req->status_code = + MLAN_ERROR_FW_NOT_READY; + + /* Indicate ioctl complete */ + pcb->moal_ioctl_complete(pmadapter-> + pmoal_handle, + (pmlan_ioctl_req) + pioctl_req, + MLAN_STATUS_FAILURE); + } + wlan_release_cmd_lock(pmadapter); + } else { + /* Get scan command from scan_pending_q and put + to cmd_pending_q */ + pcmd_node = + (cmd_ctrl_node *) + util_dequeue_list(pmadapter-> + pmoal_handle, + &pmadapter-> + scan_pending_q, + pcb->moal_spin_lock, + pcb-> + moal_spin_unlock); + wlan_insert_cmd_to_pending_q(pmadapter, + pcmd_node, MTRUE); + } + } + } + + LEAVE(); + return ret; +} + +/** + * @brief This function prepares command of bg_scan_query. + * + * @param pmpriv A pointer to mlan_private structure + * @param pcmd A pointer to HostCmd_DS_COMMAND structure + * @param pdata_buf Void pointer cast of a wlan_scan_cmd_config struct used + * to set the fields/TLVs for the command sent to firmware + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_802_11_bg_scan_query(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *pcmd, IN t_void *pdata_buf) +{ + HostCmd_DS_802_11_BG_SCAN_QUERY *bg_query = &pcmd->params.bg_scan_query; + + ENTER(); + + pcmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_BG_SCAN_QUERY); + pcmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_802_11_BG_SCAN_QUERY) + + S_DS_GEN); + + bg_query->flush = MTRUE; + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Create a channel list for the driver to scan based on region info + * + * Use the driver region/band information to construct a comprehensive list + * of channels to scan. This routine is used for any scan that is not + * provided a specific channel list to scan. + * + * @param pmpriv A pointer to mlan_private structure + * @param pbg_scan_in pointer to scan configuration parameters + * @param tlv_chan_list A pointer to structure MrvlIEtypes_ChanListParamSet_t + * + * @return channel number + */ +static t_u8 +wlan_bgscan_create_channel_list(IN mlan_private *pmpriv, + IN const wlan_bgscan_cfg *pbg_scan_in, + MrvlIEtypes_ChanListParamSet_t *tlv_chan_list) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + region_chan_t *pscan_region; + chan_freq_power_t *cfp; + t_u32 region_idx; + t_u32 chan_idx = 0; + t_u32 next_chan; + t_u8 scan_type; + t_u8 radio_type; + + ENTER(); + + for (region_idx = 0; + region_idx < NELEMENTS(pmadapter->region_channel); region_idx++) { + + if (wlan_11d_is_enabled(pmpriv) && + pmpriv->media_connected != MTRUE) { + /* Scan all the supported chan for the first scan */ + if (!pmadapter->universal_channel[region_idx].valid) + continue; + pscan_region = + &pmadapter->universal_channel[region_idx]; + } else { + if (!pmadapter->region_channel[region_idx].valid) + continue; + pscan_region = &pmadapter->region_channel[region_idx]; + } + + if (pbg_scan_in && !pbg_scan_in->chan_list[0].chan_number && + pbg_scan_in->chan_list[0].radio_type & BAND_SPECIFIED) { + radio_type = + pbg_scan_in->chan_list[0]. + radio_type & ~BAND_SPECIFIED; + if (!radio_type && (pscan_region->band != BAND_B) && + (pscan_region->band != BAND_G)) + continue; + if (radio_type && (pscan_region->band != BAND_A)) + continue; + } + if (!wlan_is_band_compatible + (pmpriv->config_bands | pmadapter->adhoc_start_band, + pscan_region->band)) + continue; + for (next_chan = 0; + next_chan < pscan_region->num_cfp; + next_chan++, chan_idx++) { + if (chan_idx >= WLAN_BG_SCAN_CHAN_MAX) + break; + /* + * Set the default scan type to ACTIVE SCAN type, will + * later be changed to passive on a per channel basis + * if restricted by regulatory requirements (11d or 11h) + */ + scan_type = MLAN_SCAN_TYPE_ACTIVE; + cfp = pscan_region->pcfp + next_chan; + if (scan_type == MLAN_SCAN_TYPE_ACTIVE + && wlan_11d_is_enabled(pmpriv)) { + scan_type = wlan_11d_get_scan_type(pmadapter, + pscan_region-> + band, + (t_u8)cfp-> + channel, + &pmadapter-> + parsed_region_chan); + } + switch (pscan_region->band) { + case BAND_A: + tlv_chan_list->chan_scan_param[chan_idx]. + radio_type = HostCmd_SCAN_RADIO_TYPE_A; + if (!wlan_11d_is_enabled(pmpriv)) { + /* 11D not available... play it safe on + DFS channels */ + if (wlan_11h_radar_detect_required + (pmpriv, (t_u8)cfp->channel)) + scan_type = + MLAN_SCAN_TYPE_PASSIVE; + } + break; + case BAND_B: + case BAND_G: + if (!wlan_11d_is_enabled(pmpriv)) + if (wlan_bg_scan_type_is_passive + (pmpriv, (t_u8)cfp->channel)) + scan_type = + MLAN_SCAN_TYPE_PASSIVE; + tlv_chan_list->chan_scan_param[chan_idx]. + radio_type = HostCmd_SCAN_RADIO_TYPE_BG; + break; + default: + tlv_chan_list->chan_scan_param[chan_idx]. + radio_type = HostCmd_SCAN_RADIO_TYPE_BG; + break; + } + + if (pbg_scan_in && pbg_scan_in->chan_list[0].scan_time) { + tlv_chan_list->chan_scan_param[chan_idx]. + max_scan_time = + wlan_cpu_to_le16((t_u16)pbg_scan_in-> + chan_list[0]. + scan_time); + tlv_chan_list->chan_scan_param[chan_idx]. + min_scan_time = + wlan_cpu_to_le16((t_u16)pbg_scan_in-> + chan_list[0]. + scan_time); + } else if (scan_type == MLAN_SCAN_TYPE_PASSIVE) { + tlv_chan_list->chan_scan_param[chan_idx]. + max_scan_time = + wlan_cpu_to_le16(pmadapter-> + passive_scan_time); + tlv_chan_list->chan_scan_param[chan_idx]. + min_scan_time = + wlan_cpu_to_le16(pmadapter-> + passive_scan_time); + } else { + tlv_chan_list->chan_scan_param[chan_idx]. + max_scan_time = + wlan_cpu_to_le16(pmadapter-> + specific_scan_time); + tlv_chan_list->chan_scan_param[chan_idx]. + min_scan_time = + wlan_cpu_to_le16(pmadapter-> + specific_scan_time); + } + + if (scan_type == MLAN_SCAN_TYPE_PASSIVE) { + tlv_chan_list->chan_scan_param[chan_idx]. + chan_scan_mode.passive_scan = MTRUE; + } else { + tlv_chan_list->chan_scan_param[chan_idx]. + chan_scan_mode.passive_scan = MFALSE; + } + + tlv_chan_list->chan_scan_param[chan_idx].chan_number = + (t_u8)cfp->channel; + tlv_chan_list->chan_scan_param[chan_idx].chan_scan_mode. + disable_chan_filt = MTRUE; + } + } + + LEAVE(); + return chan_idx; +} + +/** + * @brief This function prepares command of bg_scan_config + * + * @param pmpriv A pointer to mlan_private structure + * @param pcmd A pointer to HostCmd_DS_COMMAND structure + * @param pdata_buf Void pointer cast of a wlan_scan_cmd_config struct used + * to set the fields/TLVs for the command sent to firmware + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_bgscan_config(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *pcmd, IN t_void *pdata_buf) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + HostCmd_DS_802_11_BG_SCAN_CONFIG *bg_scan = + &pcmd->params.bg_scan_config; + wlan_bgscan_cfg *bg_scan_in = (wlan_bgscan_cfg *)pdata_buf; + t_u16 cmd_size = 0; + MrvlIEtypes_NumProbes_t *pnum_probes_tlv = MNULL; + MrvlIEtypes_BeaconLowRssiThreshold_t *rssi_tlv = MNULL; + MrvlIEtypes_BeaconLowSnrThreshold_t *snr_tlv = MNULL; + MrvlIEtypes_WildCardSsIdParamSet_t *pwildcard_ssid_tlv = MNULL; + MrvlIEtypes_ChanListParamSet_t *tlv_chan_list = MNULL; + MrvlIEtypes_StartLater_t *tlv_start_later = MNULL; + MrvlIEtypes_RepeatCount_t *tlv_repeat = MNULL; + t_u8 *tlv = MNULL; + t_u16 num_probes = 0; + t_u32 ssid_idx; + t_u32 ssid_len = 0; + t_u32 chan_idx; + t_u32 chan_num; + t_u8 radio_type; + t_u16 scan_dur; + t_u8 scan_type; + + ENTER(); + + pcmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_BG_SCAN_CONFIG); + bg_scan->action = wlan_cpu_to_le16(bg_scan_in->action); + bg_scan->enable = bg_scan_in->enable; + bg_scan->bss_type = bg_scan_in->bss_type; + cmd_size = sizeof(HostCmd_DS_802_11_BG_SCAN_CONFIG) + S_DS_GEN; + if (bg_scan_in->scan_interval) + bg_scan->scan_interval = + wlan_cpu_to_le32(bg_scan_in->scan_interval); + else + bg_scan->scan_interval = + wlan_cpu_to_le32(DEFAULT_BGSCAN_INTERVAL); + bg_scan->report_condition = + wlan_cpu_to_le32(bg_scan_in->report_condition); + + if ((bg_scan_in->action == BG_SCAN_ACT_GET) || + (bg_scan_in->action == BG_SCAN_ACT_GET_PPS_UAPSD) || + (!bg_scan->enable)) + goto done; + + tlv = (t_u8 *)bg_scan + sizeof(HostCmd_DS_802_11_BG_SCAN_CONFIG); + num_probes = (bg_scan_in->num_probes ? bg_scan_in->num_probes : + pmadapter->scan_probes); + if (num_probes) { + pnum_probes_tlv = (MrvlIEtypes_NumProbes_t *)tlv; + pnum_probes_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_NUMPROBES); + pnum_probes_tlv->header.len = + wlan_cpu_to_le16(sizeof(pnum_probes_tlv->num_probes)); + pnum_probes_tlv->num_probes = + wlan_cpu_to_le16((t_u16)num_probes); + tlv += sizeof(MrvlIEtypes_NumProbes_t); + cmd_size += sizeof(MrvlIEtypes_NumProbes_t); + } + if (bg_scan_in->rssi_threshold) { + rssi_tlv = (MrvlIEtypes_BeaconLowRssiThreshold_t *)tlv; + rssi_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_RSSI_LOW); + rssi_tlv->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_BeaconLowRssiThreshold_t) + - sizeof(MrvlIEtypesHeader_t)); + rssi_tlv->value = bg_scan_in->rssi_threshold; + rssi_tlv->frequency = 0; + tlv += sizeof(MrvlIEtypes_BeaconLowRssiThreshold_t); + cmd_size += sizeof(MrvlIEtypes_BeaconLowRssiThreshold_t); + } + if (bg_scan_in->snr_threshold) { + snr_tlv = (MrvlIEtypes_BeaconLowSnrThreshold_t *)tlv; + snr_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_SNR_LOW); + snr_tlv->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_BeaconLowSnrThreshold_t) - + sizeof(MrvlIEtypesHeader_t)); + snr_tlv->value = bg_scan_in->snr_threshold; + snr_tlv->frequency = 0; + tlv += sizeof(MrvlIEtypes_BeaconLowRssiThreshold_t); + cmd_size += sizeof(MrvlIEtypes_BeaconLowRssiThreshold_t); + } + if (bg_scan_in->repeat_count) { + tlv_repeat = (MrvlIEtypes_RepeatCount_t *)tlv; + tlv_repeat->header.type = + wlan_cpu_to_le16(TLV_TYPE_REPEAT_COUNT); + tlv_repeat->header.len = + wlan_cpu_to_le16(sizeof(MrvlIEtypes_RepeatCount_t) - + sizeof(MrvlIEtypesHeader_t)); + tlv_repeat->repeat_count = + wlan_cpu_to_le16(bg_scan_in->repeat_count); + tlv += sizeof(MrvlIEtypes_RepeatCount_t); + cmd_size += sizeof(MrvlIEtypes_RepeatCount_t); + } + for (ssid_idx = 0; ((ssid_idx < NELEMENTS(bg_scan_in->ssid_list)) + && (*bg_scan_in->ssid_list[ssid_idx].ssid || + bg_scan_in->ssid_list[ssid_idx].max_len)); + ssid_idx++) { + ssid_len = + wlan_strlen((char *)bg_scan_in->ssid_list[ssid_idx]. + ssid); + pwildcard_ssid_tlv = (MrvlIEtypes_WildCardSsIdParamSet_t *)tlv; + pwildcard_ssid_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_WILDCARDSSID); + pwildcard_ssid_tlv->header.len = + (t_u16)(ssid_len + + sizeof(pwildcard_ssid_tlv->max_ssid_length)); + pwildcard_ssid_tlv->max_ssid_length = + bg_scan_in->ssid_list[ssid_idx].max_len; + memcpy(pmadapter, pwildcard_ssid_tlv->ssid, + bg_scan_in->ssid_list[ssid_idx].ssid, + MIN(MLAN_MAX_SSID_LENGTH, ssid_len)); + tlv += sizeof(pwildcard_ssid_tlv->header) + + pwildcard_ssid_tlv->header.len; + cmd_size += + sizeof(pwildcard_ssid_tlv->header) + + pwildcard_ssid_tlv->header.len; + pwildcard_ssid_tlv->header.len = + wlan_cpu_to_le16(pwildcard_ssid_tlv->header.len); + PRINTM(MINFO, "Scan: ssid_list[%d]: %s, %d\n", ssid_idx, + pwildcard_ssid_tlv->ssid, + pwildcard_ssid_tlv->max_ssid_length); + } + if (bg_scan_in->chan_list[0].chan_number) { + tlv_chan_list = (MrvlIEtypes_ChanListParamSet_t *)tlv; + PRINTM(MINFO, "Scan: Using supplied channel list\n"); + chan_num = 0; + for (chan_idx = 0; chan_idx < WLAN_BG_SCAN_CHAN_MAX + && bg_scan_in->chan_list[chan_idx].chan_number; + chan_idx++) { + radio_type = bg_scan_in->chan_list[chan_idx].radio_type; + if (!wlan_is_band_compatible + (pmpriv->config_bands | pmadapter->adhoc_start_band, + radio_type_to_band(radio_type))) + continue; + scan_type = bg_scan_in->chan_list[chan_idx].scan_type; + /* Prevent active scanning on a radar controlled + channel */ + if (radio_type == HostCmd_SCAN_RADIO_TYPE_A) { + if (wlan_11h_radar_detect_required + (pmpriv, + bg_scan_in->chan_list[chan_idx]. + chan_number)) { + scan_type = MLAN_SCAN_TYPE_PASSIVE; + } + } + if (radio_type == HostCmd_SCAN_RADIO_TYPE_BG) { + if (wlan_bg_scan_type_is_passive + (pmpriv, + bg_scan_in->chan_list[chan_idx]. + chan_number)) { + scan_type = MLAN_SCAN_TYPE_PASSIVE; + } + } + tlv_chan_list->chan_scan_param[chan_num].chan_number = + bg_scan_in->chan_list[chan_idx].chan_number; + tlv_chan_list->chan_scan_param[chan_num].radio_type = + bg_scan_in->chan_list[chan_idx].radio_type; + + if (scan_type == MLAN_SCAN_TYPE_PASSIVE) { + tlv_chan_list->chan_scan_param[chan_num]. + chan_scan_mode.passive_scan = MTRUE; + } else { + tlv_chan_list->chan_scan_param[chan_num]. + chan_scan_mode.passive_scan = MFALSE; + } + if (bg_scan_in->chan_list[chan_idx].scan_time) { + scan_dur = + (t_u16)bg_scan_in->chan_list[chan_idx]. + scan_time; + } else { + if (scan_type == MLAN_SCAN_TYPE_PASSIVE) { + scan_dur = pmadapter->passive_scan_time; + } else { + scan_dur = + pmadapter->specific_scan_time; + } + } + tlv_chan_list->chan_scan_param[chan_num].min_scan_time = + wlan_cpu_to_le16(scan_dur); + tlv_chan_list->chan_scan_param[chan_num].max_scan_time = + wlan_cpu_to_le16(scan_dur); + chan_num++; + } + tlv_chan_list->header.type = + wlan_cpu_to_le16(TLV_TYPE_CHANLIST); + tlv_chan_list->header.len = + wlan_cpu_to_le16(sizeof(ChanScanParamSet_t) * chan_num); + tlv += sizeof(MrvlIEtypesHeader_t) + + sizeof(ChanScanParamSet_t) * chan_num; + cmd_size += + sizeof(MrvlIEtypesHeader_t) + + sizeof(ChanScanParamSet_t) * chan_num; + } else { + tlv_chan_list = (MrvlIEtypes_ChanListParamSet_t *)tlv; + chan_num = + wlan_bgscan_create_channel_list(pmpriv, bg_scan_in, + tlv_chan_list); + tlv_chan_list->header.type = + wlan_cpu_to_le16(TLV_TYPE_CHANLIST); + tlv_chan_list->header.len = + wlan_cpu_to_le16(sizeof(ChanScanParamSet_t) * chan_num); + tlv += sizeof(MrvlIEtypesHeader_t) + + sizeof(ChanScanParamSet_t) * chan_num; + cmd_size += + sizeof(MrvlIEtypesHeader_t) + + sizeof(ChanScanParamSet_t) * chan_num; + } + if (bg_scan_in->chan_per_scan) { + bg_scan->chan_per_scan = bg_scan_in->chan_per_scan; + } else { + if (bg_scan_in->report_condition & BG_SCAN_WAIT_ALL_CHAN_DONE) + bg_scan->chan_per_scan = chan_num; + else + bg_scan->chan_per_scan = + MRVDRV_MAX_CHANNELS_PER_SPECIFIC_SCAN; + } + + tlv_start_later = (MrvlIEtypes_StartLater_t *)tlv; + tlv_start_later->header.type = + wlan_cpu_to_le16(TLV_TYPE_STARTBGSCANLATER); + tlv_start_later->header.len = + wlan_cpu_to_le16(sizeof(MrvlIEtypes_StartLater_t) - + sizeof(MrvlIEtypesHeader_t)); + tlv_start_later->value = wlan_cpu_to_le16(bg_scan_in->start_later); + tlv += sizeof(MrvlIEtypes_StartLater_t); + cmd_size += sizeof(MrvlIEtypes_StartLater_t); +done: + pcmd->size = wlan_cpu_to_le16(cmd_size); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of extended scan + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ret_bgscan_config(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_scan *pscan = MNULL; + HostCmd_DS_802_11_BG_SCAN_CONFIG *bg_scan = + &resp->params.bg_scan_config; + wlan_bgscan_cfg *bg_scan_out = MNULL; + + ENTER(); + if (pioctl_buf) { + pscan = (mlan_ds_scan *)pioctl_buf->pbuf; + bg_scan_out = + (wlan_bgscan_cfg *)pscan->param.user_scan.scan_cfg_buf; + bg_scan_out->action = wlan_le16_to_cpu(bg_scan->action); + if ((bg_scan_out->action == BG_SCAN_ACT_GET) && + (bg_scan_out->action == BG_SCAN_ACT_GET_PPS_UAPSD)) { + bg_scan_out->enable = bg_scan->enable; + bg_scan_out->bss_type = bg_scan->bss_type; + bg_scan_out->chan_per_scan = bg_scan->chan_per_scan; + bg_scan_out->scan_interval = + wlan_le32_to_cpu(bg_scan->scan_interval); + bg_scan_out->report_condition = + wlan_le32_to_cpu(bg_scan->report_condition); + pioctl_buf->data_read_written = + sizeof(mlan_ds_scan) + MLAN_SUB_COMMAND_SIZE; + } + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of bgscan_query + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ret_802_11_bgscan_query(IN mlan_private *pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_scan *pscan = MNULL; + mlan_adapter *pmadapter = pmpriv->adapter; + ENTER(); + wlan_ret_802_11_scan(pmpriv, resp, MNULL); + if (pioctl_buf) { + pscan = (mlan_ds_scan *)pioctl_buf->pbuf; + pscan->param.scan_resp.pscan_table = + (t_u8 *)pmadapter->pscan_table; + pscan->param.scan_resp.num_in_scan_table = + pmadapter->num_in_scan_table; + pscan->param.scan_resp.age_in_secs = pmadapter->age_in_secs; + pscan->param.scan_resp.pchan_stats = + (t_u8 *)pmadapter->pchan_stats; + pscan->param.scan_resp.num_in_chan_stats = + pmadapter->num_in_chan_stats; + + pioctl_buf->data_read_written = sizeof(mlan_scan_resp) + + MLAN_SUB_COMMAND_SIZE; + + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function finds ssid in ssid list. + * + * @param pmpriv A pointer to mlan_private structure + * @param ssid SSID to find in the list + * @param bssid BSSID to qualify the SSID selection (if provided) + * @param mode Network mode: Infrastructure or IBSS + * + * @return index in BSSID list or < 0 if error + */ +t_s32 +wlan_find_ssid_in_list(IN mlan_private *pmpriv, + IN mlan_802_11_ssid *ssid, IN t_u8 *bssid, IN t_u32 mode) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + t_s32 net = -1, j; + t_u8 best_rssi = 0; + t_u32 i; + + ENTER(); + PRINTM(MINFO, "Num of entries in scan table = %d\n", + pmadapter->num_in_scan_table); + + /* + * Loop through the table until the maximum is reached or until a match + * is found based on the bssid field comparison + */ + for (i = 0; + i < pmadapter->num_in_scan_table && (!bssid || (bssid && net < 0)); + i++) { + if (!wlan_ssid_cmp + (pmadapter, &pmadapter->pscan_table[i].ssid, ssid) && + (!bssid || + !memcmp(pmadapter, pmadapter->pscan_table[i].mac_address, + bssid, MLAN_MAC_ADDR_LENGTH))) { + + if ((mode == MLAN_BSS_MODE_INFRA) && + !wlan_is_band_compatible(pmpriv->config_bands, + pmadapter->pscan_table[i]. + bss_band)) + continue; + + switch (mode) { + case MLAN_BSS_MODE_INFRA: + case MLAN_BSS_MODE_IBSS: + j = wlan_is_network_compatible(pmpriv, i, mode); + + if (j >= 0) { + if (SCAN_RSSI + (pmadapter->pscan_table[i].rssi) > + best_rssi) { + best_rssi = + SCAN_RSSI(pmadapter-> + pscan_table + [i].rssi); + net = i; + } + } else { + if (net == -1) + net = j; + } + break; + case MLAN_BSS_MODE_AUTO: + default: + /* + * Do not check compatibility if the mode requested is + * Auto/Unknown. Allows generic find to work without + * verifying against the Adapter security settings + */ + if (SCAN_RSSI(pmadapter->pscan_table[i].rssi) > + best_rssi) { + best_rssi = + SCAN_RSSI(pmadapter-> + pscan_table[i].rssi); + net = i; + } + break; + } + } + } + + LEAVE(); + return net; +} + +/** + * @brief This function finds a specific compatible BSSID in the scan list + * + * @param pmpriv A pointer to mlan_private structure + * @param bssid BSSID to find in the scan list + * @param mode Network mode: Infrastructure or IBSS + * + * @return index in BSSID list or < 0 if error + */ +t_s32 +wlan_find_bssid_in_list(IN mlan_private *pmpriv, IN t_u8 *bssid, IN t_u32 mode) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + t_s32 net = -1; + t_u32 i; + + ENTER(); + + if (!bssid) { + LEAVE(); + return -1; + } + + PRINTM(MINFO, "FindBSSID: Num of BSSIDs = %d\n", + pmadapter->num_in_scan_table); + + /* + * Look through the scan table for a compatible match. The ret return + * variable will be equal to the index in the scan table (greater + * than zero) if the network is compatible. The loop will continue + * past a matched bssid that is not compatible in case there is an + * AP with multiple SSIDs assigned to the same BSSID + */ + for (i = 0; net < 0 && i < pmadapter->num_in_scan_table; i++) { + if (!memcmp + (pmadapter, pmadapter->pscan_table[i].mac_address, bssid, + MLAN_MAC_ADDR_LENGTH)) { + if ((mode == MLAN_BSS_MODE_INFRA) && + !wlan_is_band_compatible(pmpriv->config_bands, + pmadapter->pscan_table[i]. + bss_band)) + continue; + switch (mode) { + case MLAN_BSS_MODE_INFRA: + case MLAN_BSS_MODE_IBSS: + net = wlan_is_network_compatible(pmpriv, i, + mode); + break; + default: + net = i; + break; + } + } + } + + LEAVE(); + return net; +} + +/** + * @brief Compare two SSIDs + * + * @param pmadapter A pointer to mlan_adapter structure + * @param ssid1 A pointer to ssid to compare + * @param ssid2 A pointer to ssid to compare + * + * @return 0--ssid is same, otherwise is different + */ +t_s32 +wlan_ssid_cmp(IN pmlan_adapter pmadapter, + IN mlan_802_11_ssid *ssid1, IN mlan_802_11_ssid *ssid2) +{ + ENTER(); + + if (!ssid1 || !ssid2) { + LEAVE(); + return -1; + } + + if (ssid1->ssid_len != ssid2->ssid_len) { + LEAVE(); + return -1; + } + + LEAVE(); + return memcmp(pmadapter, ssid1->ssid, ssid2->ssid, ssid1->ssid_len); +} + +/** + * @brief This function inserts scan command node to scan_pending_q. + * + * @param pmpriv A pointer to mlan_private structure + * @param pcmd_node A pointer to cmd_ctrl_node structure + * @return N/A + */ +t_void +wlan_queue_scan_cmd(IN mlan_private *pmpriv, IN cmd_ctrl_node *pcmd_node) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + + ENTER(); + + if (pcmd_node == MNULL) + goto done; + pcmd_node->cmd_flag |= CMD_F_SCAN; + util_enqueue_list_tail(pmadapter->pmoal_handle, + &pmadapter->scan_pending_q, + (pmlan_linked_list)pcmd_node, + pmadapter->callbacks.moal_spin_lock, + pmadapter->callbacks.moal_spin_unlock); + +done: + LEAVE(); +} + +/** + * @brief Find the AP with specific ssid in the scan list + * + * @param pmpriv A pointer to mlan_private structure + * @param preq_ssid_bssid A pointer to AP's ssid returned + * + * @return MLAN_STATUS_SUCCESS--success, otherwise--fail + */ +mlan_status +wlan_find_best_network(IN mlan_private *pmpriv, + OUT mlan_ssid_bssid *preq_ssid_bssid) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + mlan_status ret = MLAN_STATUS_SUCCESS; + BSSDescriptor_t *preq_bss; + t_s32 i; + + ENTER(); + + memset(pmadapter, preq_ssid_bssid, 0, sizeof(mlan_ssid_bssid)); + + i = wlan_find_best_network_in_list(pmpriv); + + if (i >= 0) { + preq_bss = &pmadapter->pscan_table[i]; + memcpy(pmadapter, &preq_ssid_bssid->ssid, &preq_bss->ssid, + sizeof(mlan_802_11_ssid)); + memcpy(pmadapter, (t_u8 *)&preq_ssid_bssid->bssid, + (t_u8 *)&preq_bss->mac_address, MLAN_MAC_ADDR_LENGTH); + + /* Make sure we are in the right mode */ + if (pmpriv->bss_mode == MLAN_BSS_MODE_AUTO) + pmpriv->bss_mode = preq_bss->bss_mode; + preq_ssid_bssid->channel = (t_u16)preq_bss->channel; + if (preq_bss->pmd_ie) { + preq_ssid_bssid->ft_md = preq_bss->pmd_ie->mdid; + preq_ssid_bssid->ft_cap = preq_bss->pmd_ie->ft_cap; + } + } + + if (!preq_ssid_bssid->ssid.ssid_len) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + PRINTM(MINFO, "Best network found = [%s], " + "[" MACSTR "]\n", + preq_ssid_bssid->ssid.ssid, MAC2STR(preq_ssid_bssid->bssid)); + +done: + LEAVE(); + return ret; +} + +/** + * @brief Send a scan command for all available channels filtered on a spec + * + * @param pmpriv A pointer to mlan_private structure + * @param pioctl_buf A pointer to MLAN IOCTL Request buffer + * @param preq_ssid A pointer to AP's ssid returned + * + * @return MLAN_STATUS_SUCCESS--success, otherwise--fail + */ +mlan_status +wlan_scan_specific_ssid(IN mlan_private *pmpriv, + IN t_void *pioctl_buf, IN mlan_802_11_ssid *preq_ssid) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_callbacks *pcb = (mlan_callbacks *)&pmpriv->adapter->callbacks; + wlan_user_scan_cfg *pscan_cfg; + pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *)pioctl_buf; + + ENTER(); + + if (!preq_ssid) { + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_CMD_SCAN_FAIL; + ret = MLAN_STATUS_FAILURE; + goto done; + } + wlan_scan_delete_ssid_table_entry(pmpriv, preq_ssid); + + ret = pcb->moal_malloc(pmpriv->adapter->pmoal_handle, + sizeof(wlan_user_scan_cfg), MLAN_MEM_DEF, + (t_u8 **)&pscan_cfg); + + if (ret != MLAN_STATUS_SUCCESS || !pscan_cfg) { + PRINTM(MERROR, "Memory allocation for pscan_cfg failed!\n"); + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_NO_MEM; + ret = MLAN_STATUS_FAILURE; + goto done; + } + + memset(pmpriv->adapter, pscan_cfg, 0x00, sizeof(wlan_user_scan_cfg)); + + memcpy(pmpriv->adapter, pscan_cfg->ssid_list[0].ssid, + preq_ssid->ssid, preq_ssid->ssid_len); + pscan_cfg->keep_previous_scan = MTRUE; + + ret = wlan_scan_networks(pmpriv, pioctl_buf, pscan_cfg); + + if (pscan_cfg) + pcb->moal_mfree(pmpriv->adapter->pmoal_handle, + (t_u8 *)pscan_cfg); + +done: + LEAVE(); + return ret; +} + +/** + * @brief Save a beacon buffer of the current bss descriptor + * Save the current beacon buffer to restore in the following cases that + * makes the bcn_buf not to contain the current ssid's beacon buffer. + * - the current ssid was not found somehow in the last scan. + * - the current ssid was the last entry of the scan table and overloaded. + * + * @param pmpriv A pointer to mlan_private structure + * + * @return N/A + */ +t_void +wlan_save_curr_bcn(IN mlan_private *pmpriv) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + mlan_callbacks *pcb = (pmlan_callbacks)&pmadapter->callbacks; + BSSDescriptor_t *pcurr_bss = &pmpriv->curr_bss_params.bss_descriptor; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + pcb->moal_spin_lock(pmadapter->pmoal_handle, pmpriv->curr_bcn_buf_lock); + /* save the beacon buffer if it is not saved or updated */ + if ((pmpriv->pcurr_bcn_buf == MNULL) || + (pmpriv->curr_bcn_size != pcurr_bss->beacon_buf_size) || + (memcmp + (pmpriv->adapter, pmpriv->pcurr_bcn_buf, pcurr_bss->pbeacon_buf, + pcurr_bss->beacon_buf_size))) { + + if (pmpriv->pcurr_bcn_buf) { + pcb->moal_mfree(pmadapter->pmoal_handle, + pmpriv->pcurr_bcn_buf); + pmpriv->pcurr_bcn_buf = MNULL; + } + pmpriv->curr_bcn_size = pcurr_bss->beacon_buf_size; + + if (pmpriv->curr_bcn_size) { + ret = pcb->moal_malloc(pmadapter->pmoal_handle, + pcurr_bss->beacon_buf_size, + MLAN_MEM_DEF, + &pmpriv->pcurr_bcn_buf); + + if ((ret == MLAN_STATUS_SUCCESS) && + pmpriv->pcurr_bcn_buf) { + memcpy(pmpriv->adapter, pmpriv->pcurr_bcn_buf, + pcurr_bss->pbeacon_buf, + pcurr_bss->beacon_buf_size); + PRINTM(MINFO, "current beacon saved %d\n", + pmpriv->curr_bcn_size); + } else { + PRINTM(MERROR, + "Fail to allocate curr_bcn_buf\n"); + } + } + } + wlan_update_curr_bcn(pmpriv); + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmpriv->curr_bcn_buf_lock); + + LEAVE(); +} + +/** + * @brief Free a beacon buffer of the current bss descriptor + * + * @param pmpriv A pointer to mlan_private structure + * + * @return N/A + */ +t_void +wlan_free_curr_bcn(IN mlan_private *pmpriv) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + mlan_callbacks *pcb = (pmlan_callbacks)&pmadapter->callbacks; + + ENTER(); + if (pmpriv->pcurr_bcn_buf) { + pcb->moal_mfree(pmadapter->pmoal_handle, pmpriv->pcurr_bcn_buf); + pmpriv->pcurr_bcn_buf = MNULL; + } + LEAVE(); +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sdio.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sdio.c new file mode 100644 index 00000000..caf64d94 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sdio.c @@ -0,0 +1,2419 @@ +/** @file mlan_sdio.c + * + * @brief This file contains SDIO specific code + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/******************************************************** +Change log: + 10/27/2008: initial version +********************************************************/ + +#include "mlan.h" +#ifdef STA_SUPPORT +#include "mlan_join.h" +#endif +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_init.h" +#include "mlan_wmm.h" +#include "mlan_11n.h" +#include "mlan_sdio.h" + +/******************************************************** + Local Variables +********************************************************/ + +/** FW header length for CRC check disable */ +#define FW_CRC_HEADER_RB2 28 +/** FW header for CRC check disable */ +static t_u8 fw_crc_header_rb2[FW_CRC_HEADER_RB2] = { + 0x05, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, + 0x9d, 0x32, 0xbb, 0x11, + 0x01, 0x00, 0x00, 0x7f, + 0x00, 0x00, 0x00, 0x00, + 0x67, 0xd6, 0xfc, 0x25 +}; + +/** FW header length for CRC check disable */ +#define FW_CRC_HEADER_RB 24 +/** FW header for CRC check disable */ +static t_u8 fw_crc_header_rb[FW_CRC_HEADER_RB] = { + 0x01, 0x00, 0x00, 0x00, 0x04, 0xfd, 0x00, 0x04, + 0x08, 0x00, 0x00, 0x00, 0x26, 0x52, 0x2a, 0x7b, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ + +/** + * @brief This function initialize the SDIO port + * + * @param pmadapter A pointer to mlan_adapter structure + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_sdio_init_ioport(mlan_adapter *pmadapter) +{ + t_u32 reg; + pmlan_callbacks pcb = &pmadapter->callbacks; + + const mlan_sdio_device *psdio_device = pmadapter->psdio_device; + t_u8 host_int_rsr_reg = psdio_device->host_int_rsr_reg; + t_u8 host_int_rsr_mask = psdio_device->reg->sdio_int_mask; + t_u8 card_misc_cfg_reg = psdio_device->reg->card_misc_cfg_reg; + t_u8 card_config_2_1_reg = psdio_device->card_config_2_1_reg; + t_u8 cmd_config_0 = psdio_device->cmd_config_0; + t_u8 cmd_config_1 = psdio_device->cmd_config_1; + + ENTER(); + pmadapter->ioport = 0; + + if (psdio_device->supports_sdio_new_mode) { + pmadapter->ioport = MEM_PORT; + } else { + if (MLAN_STATUS_SUCCESS == + pcb->moal_read_reg(pmadapter->pmoal_handle, + psdio_device->io_port_0_reg, ®)) + pmadapter->ioport |= (reg & 0xff); + else { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + if (MLAN_STATUS_SUCCESS == + pcb->moal_read_reg(pmadapter->pmoal_handle, + psdio_device->io_port_1_reg, ®)) + pmadapter->ioport |= ((reg & 0xff) << 8); + else { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + if (MLAN_STATUS_SUCCESS == + pcb->moal_read_reg(pmadapter->pmoal_handle, + psdio_device->io_port_2_reg, ®)) + pmadapter->ioport |= ((reg & 0xff) << 16); + else { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + } + + PRINTM(MINFO, "SDIO FUNC1 IO port: 0x%x\n", pmadapter->ioport); + + if (psdio_device->supports_sdio_new_mode) { + /* enable sdio cmd53 new mode */ + if (MLAN_STATUS_SUCCESS == + pcb->moal_read_reg(pmadapter->pmoal_handle, + card_config_2_1_reg, ®)) { + pcb->moal_write_reg(pmadapter->pmoal_handle, + card_config_2_1_reg, + reg | CMD53_NEW_MODE); + } else { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + /* configure cmd port */ + /* enable reading rx length from the register */ + if (MLAN_STATUS_SUCCESS == + pcb->moal_read_reg(pmadapter->pmoal_handle, cmd_config_0, + ®)) { + pcb->moal_write_reg(pmadapter->pmoal_handle, + cmd_config_0, + reg | CMD_PORT_RD_LEN_EN); + } else { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + /* enable Dnld/Upld ready auto reset for cmd port after cmd53 + is completed */ + if (MLAN_STATUS_SUCCESS == + pcb->moal_read_reg(pmadapter->pmoal_handle, cmd_config_1, + ®)) { + pcb->moal_write_reg(pmadapter->pmoal_handle, + cmd_config_1, + reg | CMD_PORT_AUTO_EN); + } else { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + } + /* Set Host interrupt reset to read to clear */ + if (MLAN_STATUS_SUCCESS == + pcb->moal_read_reg(pmadapter->pmoal_handle, host_int_rsr_reg, + ®)) { + pcb->moal_write_reg(pmadapter->pmoal_handle, host_int_rsr_reg, + reg | host_int_rsr_mask); + } else { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + /* Dnld/Upld ready set to auto reset */ + if (MLAN_STATUS_SUCCESS == + pcb->moal_read_reg(pmadapter->pmoal_handle, card_misc_cfg_reg, + ®)) { + pcb->moal_write_reg(pmadapter->pmoal_handle, card_misc_cfg_reg, + reg | AUTO_RE_ENABLE_INT); + } else { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function sends data to the card. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pmbuf A pointer to mlan_buffer (pmbuf->data_len should include SDIO header) + * @param port Port + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_write_data_sync(mlan_adapter *pmadapter, mlan_buffer *pmbuf, t_u32 port) +{ + t_u32 i = 0; + pmlan_callbacks pcb = &pmadapter->callbacks; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + do { + ret = pcb->moal_write_data_sync(pmadapter->pmoal_handle, pmbuf, + port, 0); + if (ret != MLAN_STATUS_SUCCESS) { + i++; + PRINTM(MERROR, + "host_to_card, write iomem (%d) failed: %d\n", i, + ret); + if (MLAN_STATUS_SUCCESS != + pcb->moal_write_reg(pmadapter->pmoal_handle, + HOST_TO_CARD_EVENT_REG, + HOST_TERM_CMD53)) { + PRINTM(MERROR, "write CFG reg failed\n"); + } + ret = MLAN_STATUS_FAILURE; + if (i > MAX_WRITE_IOMEM_RETRY) { + pmbuf->status_code = MLAN_ERROR_DATA_TX_FAIL; + goto exit; + } + } + } while (ret == MLAN_STATUS_FAILURE); +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function gets available SDIO port for reading cmd/data + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pport A pointer to port number + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_get_rd_port(mlan_adapter *pmadapter, t_u8 *pport) +{ + t_u32 rd_bitmap = pmadapter->mp_rd_bitmap; + const mlan_sdio_device *psdio_device = pmadapter->psdio_device; + const mlan_sdio_card_reg *reg = psdio_device->reg; + t_bool new_mode = psdio_device->supports_sdio_new_mode; + t_u8 max_ports = psdio_device->max_ports; + + ENTER(); + + PRINTM(MIF_D, "wlan_get_rd_port: mp_rd_bitmap=0x%08x\n", rd_bitmap); + + if (new_mode) { + if (!(rd_bitmap & reg->data_port_mask)) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + } else { + if (!(rd_bitmap & (CTRL_PORT_MASK | reg->data_port_mask))) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + } + + if (!new_mode && (pmadapter->mp_rd_bitmap & CTRL_PORT_MASK)) { + pmadapter->mp_rd_bitmap &= (t_u32)(~CTRL_PORT_MASK); + *pport = CTRL_PORT; + PRINTM(MIF_D, "wlan_get_rd_port: port=%d mp_rd_bitmap=0x%08x\n", + *pport, pmadapter->mp_rd_bitmap); + } else { + if (pmadapter->mp_rd_bitmap & (1 << pmadapter->curr_rd_port)) { + pmadapter->mp_rd_bitmap &= + (t_u32)(~(1 << pmadapter->curr_rd_port)); + *pport = pmadapter->curr_rd_port; + + /* hw rx wraps round only after port (MAX_PORT-1) */ + if (++pmadapter->curr_rd_port == max_ports) + pmadapter->curr_rd_port = reg->start_rd_port; + } else { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + PRINTM(MIF_D, "port=%d mp_rd_bitmap=0x%08x -> 0x%08x\n", + *pport, rd_bitmap, pmadapter->mp_rd_bitmap); + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function gets available SDIO port for writing data + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pport A pointer to port number + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_get_wr_port_data(mlan_adapter *pmadapter, t_u8 *pport) +{ + t_u32 wr_bitmap = pmadapter->mp_wr_bitmap; + const mlan_sdio_device *psdio_device = pmadapter->psdio_device; + const mlan_sdio_card_reg *reg = psdio_device->reg; + t_bool new_mode = psdio_device->supports_sdio_new_mode; + + ENTER(); + + PRINTM(MIF_D, "wlan_get_wr_port_data: mp_wr_bitmap=0x%08x\n", + wr_bitmap); + + if (!(wr_bitmap & pmadapter->mp_data_port_mask)) { + pmadapter->data_sent = MTRUE; + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + + if (pmadapter->mp_wr_bitmap & (1 << pmadapter->curr_wr_port)) { + pmadapter->mp_wr_bitmap &= + (t_u32)(~(1 << pmadapter->curr_wr_port)); + *pport = pmadapter->curr_wr_port; + if (++pmadapter->curr_wr_port == pmadapter->mp_end_port) + pmadapter->curr_wr_port = reg->start_wr_port; + } else { + pmadapter->data_sent = MTRUE; + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + + if ((!new_mode) && (*pport == CTRL_PORT)) { + PRINTM(MERROR, + "Invalid data port=%d cur port=%d mp_wr_bitmap=0x%08x -> 0x%08x\n", + *pport, pmadapter->curr_wr_port, wr_bitmap, + pmadapter->mp_wr_bitmap); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + PRINTM(MIF_D, "port=%d mp_wr_bitmap=0x%08x -> 0x%08x\n", + *pport, wr_bitmap, pmadapter->mp_wr_bitmap); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function polls the card status register. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param bits the bit mask + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_sdio_poll_card_status(mlan_adapter *pmadapter, t_u8 bits) +{ + pmlan_callbacks pcb = &pmadapter->callbacks; + t_u32 tries; + t_u32 cs = 0; + + ENTER(); + + for (tries = 0; tries < MAX_POLL_TRIES; tries++) { + if (pcb->moal_read_reg(pmadapter->pmoal_handle, + pmadapter->psdio_device->reg->poll_reg, + &cs) != MLAN_STATUS_SUCCESS) + break; + else if ((cs & bits) == bits) { + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + wlan_udelay(pmadapter, 10); + } + + PRINTM(MERROR, + "wlan_sdio_poll_card_status failed, tries = %d, cs = 0x%x\n", + tries, cs); + LEAVE(); + return MLAN_STATUS_FAILURE; +} + +/** + * @brief This function reads firmware status registers + * + * @param pmadapter A pointer to mlan_adapter structure + * @param dat A pointer to keep returned data + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_sdio_read_fw_status(mlan_adapter *pmadapter, t_u16 *dat) +{ + pmlan_callbacks pcb = &pmadapter->callbacks; + t_u32 fws0 = 0, fws1 = 0; + + ENTER(); + if (MLAN_STATUS_SUCCESS != pcb->moal_read_reg(pmadapter->pmoal_handle, + pmadapter->psdio_device-> + reg->status_reg_0, + &fws0)) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + if (MLAN_STATUS_SUCCESS != pcb->moal_read_reg(pmadapter->pmoal_handle, + pmadapter->psdio_device-> + reg->status_reg_1, + &fws1)) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + *dat = (t_u16)((fws1 << 8) | fws0); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** @brief This function disables the host interrupts mask. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param mask the interrupt mask + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_sdio_disable_host_int_mask(pmlan_adapter pmadapter, t_u8 mask) +{ + t_u32 host_int_mask = 0; + pmlan_callbacks pcb = &pmadapter->callbacks; + + ENTER(); + + /* Read back the host_int_mask register */ + if (MLAN_STATUS_SUCCESS != pcb->moal_read_reg(pmadapter->pmoal_handle, + pmadapter->psdio_device-> + host_int_mask_reg, + &host_int_mask)) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + /* Update with the mask and write back to the register */ + host_int_mask &= ~mask; + + if (MLAN_STATUS_SUCCESS != pcb->moal_write_reg(pmadapter->pmoal_handle, + pmadapter->psdio_device-> + host_int_mask_reg, + host_int_mask)) { + PRINTM(MWARN, "Disable host interrupt failed\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function enables the host interrupts mask + * + * @param pmadapter A pointer to mlan_adapter structure + * @param mask the interrupt mask + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_sdio_enable_host_int_mask(pmlan_adapter pmadapter, t_u8 mask) +{ + pmlan_callbacks pcb = &pmadapter->callbacks; + + ENTER(); + + /* Simply write the mask to the register */ + if (MLAN_STATUS_SUCCESS != pcb->moal_write_reg(pmadapter->pmoal_handle, + pmadapter->psdio_device-> + host_int_mask_reg, + mask)) { + PRINTM(MWARN, "Enable host interrupt failed\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function reads data from the card. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param type A pointer to keep type as data or command + * @param nb A pointer to keep the data/cmd length returned in buffer + * @param pmbuf A pointer to the SDIO data/cmd buffer + * @param npayload the length of data/cmd buffer + * @param ioport the SDIO ioport + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_sdio_card_to_host(mlan_adapter *pmadapter, + t_u32 *type, t_u32 *nb, pmlan_buffer pmbuf, + t_u32 npayload, t_u32 ioport) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_callbacks pcb = &pmadapter->callbacks; + + ENTER(); + + if (!pmbuf) { + PRINTM(MWARN, "pmbuf is NULL!\n"); + ret = MLAN_STATUS_FAILURE; + goto exit; + } + + ret = pcb->moal_read_data_sync(pmadapter->pmoal_handle, pmbuf, ioport, + 0); + + if (ret != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "card_to_host, read iomem failed: %d\n", ret); + pmbuf->status_code = MLAN_ERROR_DATA_RX_FAIL; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + *nb = wlan_le16_to_cpu(*(t_u16 *)(pmbuf->pbuf + pmbuf->data_offset)); + if (*nb > npayload) { + PRINTM(MERROR, "invalid packet, *nb=%d, npayload=%d\n", *nb, + npayload); + pmbuf->status_code = MLAN_ERROR_PKT_SIZE_INVALID; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + + DBG_HEXDUMP(MIF_D, "SDIO Blk Rd", pmbuf->pbuf + pmbuf->data_offset, + MIN(*nb, MAX_DATA_DUMP_LEN)); + + *type = wlan_le16_to_cpu(*(t_u16 *) + (pmbuf->pbuf + pmbuf->data_offset + 2)); + +exit: + LEAVE(); + return ret; +} + +/** + * @brief This function downloads FW blocks to device + * + * @param pmadapter A pointer to mlan_adapter + * @param firmware A pointer to firmware image + * @param firmwarelen firmware len + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_prog_fw_w_helper(IN pmlan_adapter pmadapter, t_u8 *fw, t_u32 fw_len) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_callbacks pcb = &pmadapter->callbacks; + t_u8 *firmware = fw; + t_u32 firmwarelen = fw_len; + t_u32 offset = 0; + t_u32 base0, base1; + t_void *tmpfwbuf = MNULL; + t_u32 tmpfwbufsz; + t_u8 *fwbuf; + mlan_buffer mbuf; + t_u16 len = 0; + t_u32 txlen = 0, tx_blocks = 0, tries = 0; + t_u32 i = 0; + t_u16 card_type = pmadapter->card_type; + const mlan_sdio_card_reg *reg = pmadapter->psdio_device->reg; + t_u32 read_base_0_reg = reg->base_0_reg; + t_u32 read_base_1_reg = reg->base_1_reg; + t_u8 crc_buffer = 0; + t_u8 *header_crc_fw; + t_u8 header_crc_fw_len = 0; + if (IS_SD8787(card_type)) { + header_crc_fw = fw_crc_header_rb; + header_crc_fw_len = FW_CRC_HEADER_RB; + } else { + header_crc_fw = fw_crc_header_rb2; + header_crc_fw_len = FW_CRC_HEADER_RB2; + } + + ENTER(); + + if (!firmware && !pcb->moal_get_fw_data) { + PRINTM(MMSG, "No firmware image found! Terminating download\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + PRINTM(MINFO, "WLAN: Downloading FW image (%d bytes)\n", firmwarelen); + + tmpfwbufsz = ALIGN_SZ(WLAN_UPLD_SIZE, DMA_ALIGNMENT); + ret = pcb->moal_malloc(pmadapter->pmoal_handle, tmpfwbufsz, + MLAN_MEM_DEF | MLAN_MEM_DMA, (t_u8 **)&tmpfwbuf); + if ((ret != MLAN_STATUS_SUCCESS) || !tmpfwbuf) { + PRINTM(MERROR, + "Unable to allocate buffer for firmware. Terminating download\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + memset(pmadapter, tmpfwbuf, 0, tmpfwbufsz); + /* Ensure 8-byte aligned firmware buffer */ + fwbuf = (t_u8 *)ALIGN_ADDR(tmpfwbuf, DMA_ALIGNMENT); + + if (!pmadapter->init_para.fw_crc_check + && (IS_SD8777(card_type) || (IS_SD8787(card_type))) + ) { + /* CRC check not required, use custom header first */ + + firmware = header_crc_fw; + firmwarelen = header_crc_fw_len; + + crc_buffer = 1; + } + + /* Perform firmware data transfer */ + do { + /* The host polls for the DN_LD_CARD_RDY and CARD_IO_READY bits + */ + ret = wlan_sdio_poll_card_status(pmadapter, + CARD_IO_READY | + DN_LD_CARD_RDY); + if (ret != MLAN_STATUS_SUCCESS) { + PRINTM(MFATAL, + "WLAN: FW download with helper poll status timeout @ %d\n", + offset); + goto done; + } + + if (!crc_buffer + && (IS_SD8777(card_type) || (IS_SD8787(card_type))) + ) + /* More data? */ + if (firmwarelen && offset >= firmwarelen) + break; + + for (tries = 0; tries < MAX_POLL_TRIES; tries++) { + ret = pcb->moal_read_reg(pmadapter->pmoal_handle, + read_base_0_reg, &base0); + if (ret != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "Dev BASE0 register read failed:" + " base0=0x%04X(%d). Terminating download\n", + base0, base0); + goto done; + } + ret = pcb->moal_read_reg(pmadapter->pmoal_handle, + read_base_1_reg, &base1); + if (ret != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "Dev BASE1 register read failed:" + " base1=0x%04X(%d). Terminating download\n", + base1, base1); + goto done; + } + len = (t_u16)(((base1 & 0xff) << 8) | (base0 & 0xff)); + + if (len) + break; + wlan_udelay(pmadapter, 10); + } + + if (!len) + break; + else if (len > WLAN_UPLD_SIZE) { + PRINTM(MFATAL, + "WLAN: FW download failure @ %d, invalid length %d\n", + offset, len); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + txlen = len; + + if (len & MBIT(0)) { + i++; + if (i > MAX_WRITE_IOMEM_RETRY) { + PRINTM(MFATAL, + "WLAN: FW download failure @ %d, over max retry count\n", + offset); + ret = MLAN_STATUS_FAILURE; + goto done; + } + PRINTM(MERROR, + "WLAN: FW CRC error indicated by the helper:" + " len = 0x%04X, txlen = %d\n", len, txlen); + len &= ~MBIT(0); + + PRINTM(MERROR, "WLAN: retry: %d, offset %d\n", i, + offset); + DBG_HEXDUMP(MERROR, "WLAN: FW block:", mbuf.pbuf, len); + + /* Setting this to 0 to resend from same offset */ + txlen = 0; + } else { + i = 0; + + /* Set blocksize to transfer - checking for last block */ + if (firmwarelen && firmwarelen - offset < txlen) + txlen = firmwarelen - offset; + PRINTM(MINFO, "."); + + tx_blocks = + (txlen + MLAN_SDIO_BLOCK_SIZE_FW_DNLD - + 1) / MLAN_SDIO_BLOCK_SIZE_FW_DNLD; + + /* Copy payload to buffer */ + if (firmware) + memmove(pmadapter, fwbuf, &firmware[offset], + txlen); + else + pcb->moal_get_fw_data(pmadapter->pmoal_handle, + offset, txlen, fwbuf); + } + + /* Send data */ + memset(pmadapter, &mbuf, 0, sizeof(mlan_buffer)); + mbuf.pbuf = (t_u8 *)fwbuf; + mbuf.data_len = tx_blocks * MLAN_SDIO_BLOCK_SIZE_FW_DNLD; + + ret = pcb->moal_write_data_sync(pmadapter->pmoal_handle, &mbuf, + pmadapter->ioport, 0); + if (ret != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, + "WLAN: FW download, write iomem (%d) failed @ %d\n", + i, offset); + if (pcb-> + moal_write_reg(pmadapter->pmoal_handle, + HOST_TO_CARD_EVENT_REG, + HOST_TERM_CMD53) != + MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "write CFG reg failed\n"); + } + ret = MLAN_STATUS_FAILURE; + goto done; + } + + offset += txlen; + if (crc_buffer && offset >= header_crc_fw_len + && (IS_SD8777(card_type) || (IS_SD8787(card_type))) + ) { + /* Custom header download complete, restore original FW + */ + offset = 0; + firmware = fw; + firmwarelen = fw_len; + crc_buffer = 0; + } + } while (MTRUE); + + PRINTM(MMSG, "Wlan: FW download over, firmwarelen=%d downloaded %d\n", + firmwarelen, offset); + + ret = MLAN_STATUS_SUCCESS; +done: + if (tmpfwbuf) + pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)tmpfwbuf); + + LEAVE(); + return ret; +} + +/** + * @brief This function disables the host interrupts. + * + * @param pmadapter A pointer to mlan_adapter structure + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_disable_host_int(pmlan_adapter pmadapter) +{ + mlan_status ret; + + ENTER(); + ret = wlan_sdio_disable_host_int_mask(pmadapter, HIM_DISABLE); + LEAVE(); + return ret; +} + +/** + * @brief This function decodes the rx packet & + * calls corresponding handlers according to the packet type + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pmbuf A pointer to the SDIO data/cmd buffer + * @param upld_typ Type of rx packet + * @param lock_flag flag for spin_lock. + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_decode_rx_packet(mlan_adapter *pmadapter, mlan_buffer *pmbuf, + t_u32 upld_typ, t_u8 lock_flag) +{ + t_u8 *cmd_buf; + t_u32 event; + + ENTER(); + + switch (upld_typ) { + case MLAN_TYPE_DATA: + PRINTM(MINFO, "--- Rx: Data packet ---\n"); + pmbuf->data_len = (pmadapter->upld_len - INTF_HEADER_LEN); + pmbuf->data_offset += INTF_HEADER_LEN; + if (pmadapter->rx_work_flag) { + if (lock_flag) + pmadapter->callbacks.moal_spin_lock(pmadapter-> + pmoal_handle, + pmadapter-> + rx_data_queue. + plock); + util_enqueue_list_tail(pmadapter->pmoal_handle, + &pmadapter->rx_data_queue, + (pmlan_linked_list)pmbuf, MNULL, + MNULL); + pmadapter->rx_pkts_queued++; + if (lock_flag) + pmadapter->callbacks. + moal_spin_unlock(pmadapter-> + pmoal_handle, + pmadapter-> + rx_data_queue.plock); + } else { + wlan_handle_rx_packet(pmadapter, pmbuf); + } + pmadapter->data_received = MTRUE; + break; + + case MLAN_TYPE_CMD: + PRINTM(MINFO, "--- Rx: Cmd Response ---\n"); + /* take care of curr_cmd = NULL case */ + if (!pmadapter->curr_cmd) { + cmd_buf = pmadapter->upld_buf; + if (pmadapter->ps_state == PS_STATE_SLEEP_CFM) { + wlan_process_sleep_confirm_resp(pmadapter, + pmbuf->pbuf + + pmbuf-> + data_offset + + INTF_HEADER_LEN, + pmadapter-> + upld_len - + INTF_HEADER_LEN); + } + pmadapter->upld_len -= INTF_HEADER_LEN; + memcpy(pmadapter, cmd_buf, + pmbuf->pbuf + pmbuf->data_offset + + INTF_HEADER_LEN, MIN(MRVDRV_SIZE_OF_CMD_BUFFER, + pmadapter->upld_len - + INTF_HEADER_LEN)); + wlan_free_mlan_buffer(pmadapter, pmbuf); + } else { + pmadapter->cmd_resp_received = MTRUE; + pmadapter->upld_len -= INTF_HEADER_LEN; + pmbuf->data_len = pmadapter->upld_len; + pmbuf->data_offset += INTF_HEADER_LEN; + pmadapter->curr_cmd->respbuf = pmbuf; + if (pmadapter->upld_len >= MRVDRV_SIZE_OF_CMD_BUFFER) { + PRINTM(MMSG, "Invalid CmdResp len=%d\n", + pmadapter->upld_len); + DBG_HEXDUMP(MERROR, "Invalid CmdResp", + pmbuf->pbuf + pmbuf->data_offset, + MAX_DATA_DUMP_LEN); + } + } + break; + + case MLAN_TYPE_EVENT: + PRINTM(MINFO, "--- Rx: Event ---\n"); + event = *(t_u32 *)&pmbuf->pbuf[pmbuf->data_offset + + INTF_HEADER_LEN]; + pmadapter->event_cause = wlan_le32_to_cpu(event); + if ((pmadapter->upld_len > MLAN_EVENT_HEADER_LEN) && + ((pmadapter->upld_len - MLAN_EVENT_HEADER_LEN) < + MAX_EVENT_SIZE)) { + memcpy(pmadapter, pmadapter->event_body, + pmbuf->pbuf + pmbuf->data_offset + + MLAN_EVENT_HEADER_LEN, + pmadapter->upld_len - MLAN_EVENT_HEADER_LEN); + } + + /* event cause has been saved to adapter->event_cause */ + pmadapter->event_received = MTRUE; + pmbuf->data_len = pmadapter->upld_len; + pmadapter->pmlan_buffer_event = pmbuf; + + /* remove SDIO header */ + pmbuf->data_offset += INTF_HEADER_LEN; + pmbuf->data_len -= INTF_HEADER_LEN; + break; + + default: + PRINTM(MERROR, "SDIO unknown upload type = 0x%x\n", upld_typ); + wlan_free_mlan_buffer(pmadapter, pmbuf); + break; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +#ifdef SDIO_MULTI_PORT_RX_AGGR +/** + * @brief This function receives single packet + * + * @param pmadapter A pointer to mlan_adapter structure + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_receive_single_packet(mlan_adapter *pmadapter) +{ + mlan_buffer *pmbuf; + t_u8 port; + t_u16 rx_len; + t_u32 pkt_type = 0; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + pmbuf = pmadapter->mpa_rx.mbuf_arr[0]; + port = pmadapter->mpa_rx.start_port; + rx_len = pmadapter->mpa_rx.len_arr[0]; + if (MLAN_STATUS_SUCCESS != wlan_sdio_card_to_host(pmadapter, &pkt_type, + (t_u32 *)&pmadapter-> + upld_len, pmbuf, + rx_len, + pmadapter->ioport + + port)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + if (pkt_type != MLAN_TYPE_DATA) { + PRINTM(MERROR, + "receive a wrong pkt from DATA PORT: type=%d, len=%dd\n", + pkt_type, pmbuf->data_len); + pmbuf->status_code = MLAN_ERROR_DATA_RX_FAIL; + ret = MLAN_STATUS_FAILURE; + goto done; + } + pmadapter->mpa_rx_count[0]++; + wlan_decode_rx_packet(pmadapter, pmbuf, pkt_type, MTRUE); +done: + if (ret != MLAN_STATUS_SUCCESS) + wlan_free_mlan_buffer(pmadapter, pmbuf); + MP_RX_AGGR_BUF_RESET(pmadapter); + LEAVE(); + return ret; +} + +/** + * @brief This function receives data from the card in aggregate mode. + * + * @param pmadapter A pointer to mlan_adapter structure + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_receive_mp_aggr_buf(mlan_adapter *pmadapter) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_callbacks pcb = &pmadapter->callbacks; + mlan_buffer mbuf_aggr; + mlan_buffer *mbuf_deaggr; + t_u32 pind = 0; + t_u32 pkt_len, pkt_type = 0; + t_u8 *curr_ptr; + t_u32 cmd53_port = 0; + t_u32 port_count = 0; + t_bool new_mode = pmadapter->psdio_device->supports_sdio_new_mode; + + /* do aggr RX now */ + PRINTM(MINFO, "do_rx_aggr: num of packets: %d\n", + pmadapter->mpa_rx.pkt_cnt); + + memset(pmadapter, &mbuf_aggr, 0, sizeof(mlan_buffer)); + if (!pmadapter->mpa_rx.buf && pmadapter->mpa_rx.pkt_cnt == 1) { + return wlan_receive_single_packet(pmadapter); + } else if (!pmadapter->mpa_rx.buf && pmadapter->mpa_rx.pkt_cnt > 1) { + mbuf_aggr.data_len = pmadapter->mpa_rx.buf_len; + mbuf_aggr.pnext = mbuf_aggr.pprev = &mbuf_aggr; + mbuf_aggr.use_count = 0; + for (pind = 0; pind < pmadapter->mpa_rx.pkt_cnt; pind++) { + pmadapter->mpa_rx.mbuf_arr[pind]->data_len = + pmadapter->mpa_rx.len_arr[pind]; + wlan_link_buf_to_aggr(&mbuf_aggr, + pmadapter->mpa_rx.mbuf_arr[pind]); + } + } else { + mbuf_aggr.pbuf = (t_u8 *)pmadapter->mpa_rx.buf; + mbuf_aggr.data_len = pmadapter->mpa_rx.buf_len; + } + + if (new_mode) { + port_count = bitcount(pmadapter->mpa_rx.ports) - 1; + /* port_count = pmadapter->mpa_rx.pkt_cnt - 1; */ + cmd53_port = + (pmadapter-> + ioport | SDIO_MPA_ADDR_BASE | (port_count << 8)) + + pmadapter->mpa_rx.start_port; + } else { + cmd53_port = (pmadapter->ioport | SDIO_MPA_ADDR_BASE | + (pmadapter->mpa_rx.ports << 4)) + + pmadapter->mpa_rx.start_port; + } + if (MLAN_STATUS_SUCCESS != + pcb->moal_read_data_sync(pmadapter->pmoal_handle, &mbuf_aggr, + cmd53_port, 0)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + if (pmadapter->rx_work_flag) + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + pmadapter->rx_data_queue. + plock); + if (!pmadapter->mpa_rx.buf && pmadapter->mpa_rx.pkt_cnt > 1) { + for (pind = 0; pind < pmadapter->mpa_rx.pkt_cnt; pind++) { + mbuf_deaggr = pmadapter->mpa_rx.mbuf_arr[pind]; + pkt_len = + wlan_le16_to_cpu(*(t_u16 *) + (mbuf_deaggr->pbuf + + mbuf_deaggr->data_offset)); + pkt_type = + wlan_le16_to_cpu(*(t_u16 *) + (mbuf_deaggr->pbuf + + mbuf_deaggr->data_offset + + 2)); + pmadapter->upld_len = pkt_len; + wlan_decode_rx_packet(pmadapter, mbuf_deaggr, pkt_type, + MFALSE); + } + } else { + DBG_HEXDUMP(MIF_D, "SDIO MP-A Blk Rd", pmadapter->mpa_rx.buf, + MIN(pmadapter->mpa_rx.buf_len, MAX_DATA_DUMP_LEN)); + + curr_ptr = pmadapter->mpa_rx.buf; + + for (pind = 0; pind < pmadapter->mpa_rx.pkt_cnt; pind++) { + + /* get curr PKT len & type */ + pkt_len = wlan_le16_to_cpu(*(t_u16 *)&curr_ptr[0]); + pkt_type = wlan_le16_to_cpu(*(t_u16 *)&curr_ptr[2]); + + PRINTM(MINFO, "RX: [%d] pktlen: %d pkt_type: 0x%x\n", + pind, pkt_len, pkt_type); + + /* copy pkt to deaggr buf */ + mbuf_deaggr = pmadapter->mpa_rx.mbuf_arr[pind]; + if ((pkt_type == MLAN_TYPE_DATA) && + (pkt_len <= pmadapter->mpa_rx.len_arr[pind])) { + memcpy(pmadapter, + mbuf_deaggr->pbuf + + mbuf_deaggr->data_offset, curr_ptr, + pkt_len); + pmadapter->upld_len = pkt_len; + /* Process de-aggr packet */ + wlan_decode_rx_packet(pmadapter, mbuf_deaggr, + pkt_type, MFALSE); + } else { + PRINTM(MERROR, + "Wrong aggr packet: type=%d, len=%d, max_len=%d\n", + pkt_type, pkt_len, + pmadapter->mpa_rx.len_arr[pind]); + wlan_free_mlan_buffer(pmadapter, mbuf_deaggr); + } + curr_ptr += pmadapter->mpa_rx.len_arr[pind]; + } + } + if (pmadapter->rx_work_flag) + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->rx_data_queue. + plock); + pmadapter->mpa_rx_count[pmadapter->mpa_rx.pkt_cnt - 1]++; + MP_RX_AGGR_BUF_RESET(pmadapter); +done: + return ret; +} + +/** + * @brief This function receives data from the card in aggregate mode. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pmbuf A pointer to the SDIO data/cmd buffer + * @param port Current port on which packet needs to be rxed + * @param rx_len Length of received packet + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_sdio_card_to_host_mp_aggr(mlan_adapter *pmadapter, mlan_buffer + *pmbuf, t_u8 port, t_u16 rx_len) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + t_s32 f_do_rx_aggr = 0; + t_s32 f_do_rx_cur = 0; + t_s32 f_aggr_cur = 0; + t_s32 f_post_aggr_cur = 0; + t_u32 pind = 0; + t_u32 pkt_type = 0; + const mlan_sdio_device *psdio_device = pmadapter->psdio_device; + const mlan_sdio_card_reg *reg = psdio_device->reg; + t_bool new_mode = psdio_device->supports_sdio_new_mode; + + ENTER(); + + if (!new_mode && (port == CTRL_PORT)) { + /* Read the command response or event without aggr */ + PRINTM(MINFO, + "card_2_host_mp_aggr: No aggr for control port\n"); + + f_do_rx_cur = 1; + goto rx_curr_single; + } + + if (!pmadapter->mpa_rx.enabled) { + PRINTM(MINFO, + "card_2_host_mp_aggr: rx aggregation disabled !\n"); + + f_do_rx_cur = 1; + goto rx_curr_single; + } + + if ((new_mode && + (pmadapter->mp_rd_bitmap & reg->data_port_mask)) || + (!new_mode && + (pmadapter->mp_rd_bitmap & (~((t_u32)CTRL_PORT_MASK))))) { + /* Some more data RX pending */ + PRINTM(MINFO, "card_2_host_mp_aggr: Not last packet\n"); + + if (MP_RX_AGGR_IN_PROGRESS(pmadapter)) { + if (MP_RX_AGGR_BUF_HAS_ROOM(pmadapter, rx_len)) { + f_aggr_cur = 1; + } else { + /* No room in Aggr buf, do rx aggr now */ + f_do_rx_aggr = 1; + f_post_aggr_cur = 1; + } + } else { + /* Rx aggr not in progress */ + f_aggr_cur = 1; + } + + } else { + /* No more data RX pending */ + PRINTM(MINFO, "card_2_host_mp_aggr: Last packet\n"); + + if (MP_RX_AGGR_IN_PROGRESS(pmadapter)) { + f_do_rx_aggr = 1; + if (MP_RX_AGGR_BUF_HAS_ROOM(pmadapter, rx_len)) { + f_aggr_cur = 1; + } else { + /* No room in Aggr buf, do rx aggr now */ + f_do_rx_cur = 1; + } + } else { + f_do_rx_cur = 1; + } + + } + + if (f_aggr_cur) { + PRINTM(MINFO, "Current packet aggregation.\n"); + /* Curr pkt can be aggregated */ + if (pmadapter->psdio_device->supports_sdio_new_mode) { + MP_RX_AGGR_SETUP_NEWMODE(pmadapter, pmbuf, port, + rx_len); + } else { + MP_RX_AGGR_SETUP_NONEWMODE(pmadapter, pmbuf, port, + rx_len); + } + + if (MP_RX_AGGR_PKT_LIMIT_REACHED(pmadapter) || + (((pmadapter->psdio_device->supports_sdio_new_mode) && + (MP_RX_AGGR_PORT_LIMIT_REACHED_NEWMODE(pmadapter))) || + ((!pmadapter->psdio_device->supports_sdio_new_mode) && + (MP_RX_AGGR_PORT_LIMIT_REACHED_NONEWMODE(pmadapter)))) + ) { + PRINTM(MINFO, + "card_2_host_mp_aggr: Aggregation Packet limit reached\n"); + /* No more pkts allowed in Aggr buf, rx it */ + f_do_rx_aggr = 1; + } + } + + if (f_do_rx_aggr) { + /* do aggr RX now */ + if (MLAN_STATUS_SUCCESS != wlan_receive_mp_aggr_buf(pmadapter)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + } +rx_curr_single: + if (f_do_rx_cur) { + PRINTM(MINFO, "RX: f_do_rx_cur: port: %d rx_len: %d\n", port, + rx_len); + + if (MLAN_STATUS_SUCCESS != + wlan_sdio_card_to_host(pmadapter, &pkt_type, + (t_u32 *)&pmadapter->upld_len, pmbuf, + rx_len, pmadapter->ioport + port)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + if ((new_mode && (pkt_type != MLAN_TYPE_DATA) + ) || + (!new_mode && + ((port == CTRL_PORT) && + ((pkt_type != MLAN_TYPE_EVENT) && + (pkt_type != MLAN_TYPE_CMD))))) { + if (new_mode) + PRINTM(MERROR, + "receive a wrong pkt from DATA PORT: type=%d, len=%dd\n", + pkt_type, pmbuf->data_len); + else + PRINTM(MERROR, + "Wrong pkt from CTRL PORT: type=%d, len=%dd\n", + pkt_type, pmbuf->data_len); + pmbuf->status_code = MLAN_ERROR_DATA_RX_FAIL; + ret = MLAN_STATUS_FAILURE; + goto done; + } + + if (!new_mode && (port != CTRL_PORT)) + pmadapter->mpa_rx_count[0]++; + + wlan_decode_rx_packet(pmadapter, pmbuf, pkt_type, MTRUE); + } + if (f_post_aggr_cur) { + PRINTM(MINFO, "Current packet aggregation.\n"); + /* Curr pkt can be aggregated */ + if (pmadapter->psdio_device->supports_sdio_new_mode) { + MP_RX_AGGR_SETUP_NEWMODE(pmadapter, pmbuf, port, + rx_len); + } else { + MP_RX_AGGR_SETUP_NONEWMODE(pmadapter, pmbuf, port, + rx_len); + } + } +done: + if (ret == MLAN_STATUS_FAILURE) { + if (MP_RX_AGGR_IN_PROGRESS(pmadapter)) { + /* MP-A transfer failed - cleanup */ + for (pind = 0; pind < pmadapter->mpa_rx.pkt_cnt; pind++) { + wlan_free_mlan_buffer(pmadapter, + pmadapter->mpa_rx. + mbuf_arr[pind]); + } + MP_RX_AGGR_BUF_RESET(pmadapter); + } + + if (f_do_rx_cur) { + /* Single Transfer pending */ + /* Free curr buff also */ + wlan_free_mlan_buffer(pmadapter, pmbuf); + } + } + + LEAVE(); + return ret; + +} +#endif + +#ifdef SDIO_MULTI_PORT_TX_AGGR +/** + * @brief This function sends aggr buf + * + * @param pmadapter A pointer to mlan_adapter structure + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_send_mp_aggr_buf(mlan_adapter *pmadapter) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u32 cmd53_port = 0; + t_u32 port_count = 0; + mlan_buffer mbuf_aggr; + t_u8 i = 0; + t_bool new_mode = pmadapter->psdio_device->supports_sdio_new_mode; + t_u8 mp_aggr_pkt_limit = pmadapter->psdio_device->mp_aggr_pkt_limit; + + ENTER(); + + if (!pmadapter->mpa_tx.pkt_cnt) { + LEAVE(); + return ret; + } + PRINTM(MINFO, "host_2_card_mp_aggr: Send aggregation buffer." + "%d %d\n", pmadapter->mpa_tx.start_port, + pmadapter->mpa_tx.ports); + + memset(pmadapter, &mbuf_aggr, 0, sizeof(mlan_buffer)); + + if (!pmadapter->mpa_tx.buf && pmadapter->mpa_tx.pkt_cnt > 1) { + mbuf_aggr.data_len = pmadapter->mpa_tx.buf_len; + mbuf_aggr.pnext = mbuf_aggr.pprev = &mbuf_aggr; + mbuf_aggr.use_count = 0; + for (i = 0; i < pmadapter->mpa_tx.pkt_cnt; i++) { + wlan_link_buf_to_aggr(&mbuf_aggr, + pmadapter->mpa_tx.mbuf_arr[i]); + if (pmadapter->mpa_tx.mbuf_arr[i]-> + flags & MLAN_BUF_FLAG_TCP_ACK) { + pmadapter->mpa_tx.mbuf_arr[i]->flags &= + ~MLAN_BUF_FLAG_TCP_ACK; + pmadapter->callbacks. + moal_tcp_ack_tx_ind(pmadapter-> + pmoal_handle, + pmadapter->mpa_tx. + mbuf_arr[i]); + } + } + } else { + mbuf_aggr.pbuf = (t_u8 *)pmadapter->mpa_tx.buf; + mbuf_aggr.data_len = pmadapter->mpa_tx.buf_len; + } + + if (new_mode) { + port_count = bitcount(pmadapter->mpa_tx.ports) - 1; + cmd53_port = + (pmadapter-> + ioport | SDIO_MPA_ADDR_BASE | (port_count << 8)) + + pmadapter->mpa_tx.start_port; + } else { + cmd53_port = (pmadapter->ioport | SDIO_MPA_ADDR_BASE | + (pmadapter->mpa_tx.ports << 4)) + + pmadapter->mpa_tx.start_port; + } + + if (pmadapter->mpa_tx.pkt_cnt == 1) + cmd53_port = pmadapter->ioport + pmadapter->mpa_tx.start_port; + /** only one packet */ + if (!pmadapter->mpa_tx.buf && pmadapter->mpa_tx.pkt_cnt == 1) + ret = wlan_write_data_sync(pmadapter, + pmadapter->mpa_tx.mbuf_arr[0], + cmd53_port); + else + ret = wlan_write_data_sync(pmadapter, &mbuf_aggr, cmd53_port); + if (!pmadapter->mpa_tx.buf) { + /** free mlan buffer */ + for (i = 0; i < pmadapter->mpa_tx.pkt_cnt; i++) { + wlan_write_data_complete(pmadapter, + pmadapter->mpa_tx.mbuf_arr[i], + MLAN_STATUS_SUCCESS); + } + } + if (!(pmadapter->mp_wr_bitmap & (1 << pmadapter->curr_wr_port)) + && (pmadapter->mpa_tx.pkt_cnt < mp_aggr_pkt_limit)) + pmadapter->mpa_sent_no_ports++; + pmadapter->mpa_tx_count[pmadapter->mpa_tx.pkt_cnt - 1]++; + pmadapter->last_mp_wr_bitmap[pmadapter->last_mp_index] = + pmadapter->mp_wr_bitmap; + pmadapter->last_mp_wr_ports[pmadapter->last_mp_index] = cmd53_port; + pmadapter->last_mp_wr_len[pmadapter->last_mp_index] = + pmadapter->mpa_tx.buf_len; + pmadapter->last_curr_wr_port[pmadapter->last_mp_index] = + pmadapter->curr_wr_port; + memcpy(pmadapter, + (t_u8 *)&pmadapter->last_mp_wr_info[pmadapter->last_mp_index * + mp_aggr_pkt_limit], + (t_u8 *)pmadapter->mpa_tx.mp_wr_info, + mp_aggr_pkt_limit * sizeof(t_u16) + ); + pmadapter->last_mp_index++; + if (pmadapter->last_mp_index >= SDIO_MP_DBG_NUM) + pmadapter->last_mp_index = 0; + MP_TX_AGGR_BUF_RESET(pmadapter); + LEAVE(); + return ret; +} + +/** + * @brief This function sends data to the card in SDIO aggregated mode. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param mbuf A pointer to the SDIO data/cmd buffer + * @param port current port for aggregation + * @param next_pkt_len Length of next packet used for multiport aggregation + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_host_to_card_mp_aggr(mlan_adapter *pmadapter, mlan_buffer *mbuf, t_u8 port, + t_u32 next_pkt_len) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + t_s32 f_send_aggr_buf = 0; + t_s32 f_send_cur_buf = 0; + t_s32 f_precopy_cur_buf = 0; + t_s32 f_postcopy_cur_buf = 0; + t_u8 aggr_sg = 0; + t_u8 mp_aggr_pkt_limit = pmadapter->psdio_device->mp_aggr_pkt_limit; + + ENTER(); + + PRINTM(MIF_D, "host_2_card_mp_aggr: next_pkt_len: %d curr_port:%d\n", + next_pkt_len, port); + + if (!pmadapter->mpa_tx.enabled) { + PRINTM(MINFO, + "host_2_card_mp_aggr: tx aggregation disabled !\n"); + f_send_cur_buf = 1; + goto tx_curr_single; + } + + if (next_pkt_len) { + /* More pkt in TX queue */ + PRINTM(MINFO, "host_2_card_mp_aggr: More packets in Queue.\n"); + + if (MP_TX_AGGR_IN_PROGRESS(pmadapter)) { + if (MP_TX_AGGR_BUF_HAS_ROOM + (pmadapter, mbuf, mbuf->data_len)) { + f_precopy_cur_buf = 1; + + if (! + (pmadapter-> + mp_wr_bitmap & (1 << pmadapter-> + curr_wr_port)) || + !MP_TX_AGGR_BUF_HAS_ROOM(pmadapter, mbuf, + mbuf->data_len + + next_pkt_len)) { + f_send_aggr_buf = 1; + } + } else { + /* No room in Aggr buf, send it */ + f_send_aggr_buf = 1; + + if (! + (pmadapter-> + mp_wr_bitmap & (1 << pmadapter-> + curr_wr_port))) { + f_send_cur_buf = 1; + } else { + f_postcopy_cur_buf = 1; + } + } + } else { + if (MP_TX_AGGR_BUF_HAS_ROOM + (pmadapter, mbuf, mbuf->data_len) && + (pmadapter-> + mp_wr_bitmap & (1 << pmadapter->curr_wr_port))) + f_precopy_cur_buf = 1; + else + f_send_cur_buf = 1; + } + } else { + /* Last pkt in TX queue */ + PRINTM(MINFO, + "host_2_card_mp_aggr: Last packet in Tx Queue.\n"); + + if (MP_TX_AGGR_IN_PROGRESS(pmadapter)) { + /* some packs in Aggr buf already */ + f_send_aggr_buf = 1; + + if (MP_TX_AGGR_BUF_HAS_ROOM + (pmadapter, mbuf, mbuf->data_len)) { + f_precopy_cur_buf = 1; + } else { + /* No room in Aggr buf, send it */ + f_send_cur_buf = 1; + } + } else { + f_send_cur_buf = 1; + } + pmadapter->mpa_sent_last_pkt++; + } + + if (f_precopy_cur_buf) { + PRINTM(MINFO, "host_2_card_mp_aggr: Precopy current buffer\n"); + if (pmadapter->mpa_buf) + memcpy(pmadapter, pmadapter->mpa_buf + + (pmadapter->last_mp_index * mp_aggr_pkt_limit + + pmadapter->mpa_tx.pkt_cnt) * + MLAN_SDIO_BLOCK_SIZE, + mbuf->pbuf + mbuf->data_offset, + MLAN_SDIO_BLOCK_SIZE); + if (!pmadapter->mpa_tx.buf) { + if (pmadapter->psdio_device->supports_sdio_new_mode) + MP_TX_AGGR_BUF_PUT_SG_NEWMODE(pmadapter, mbuf, + port); + else + MP_TX_AGGR_BUF_PUT_SG_NONEWMODE(pmadapter, mbuf, + port); + aggr_sg = MTRUE; + } else { + if (mbuf->flags & MLAN_BUF_FLAG_TCP_ACK) { + mbuf->flags &= ~MLAN_BUF_FLAG_TCP_ACK; + pmadapter->callbacks. + moal_tcp_ack_tx_ind(pmadapter-> + pmoal_handle, mbuf); + } + if (pmadapter->psdio_device->supports_sdio_new_mode) + MP_TX_AGGR_BUF_PUT_NEWMODE(pmadapter, mbuf, + port); + else + MP_TX_AGGR_BUF_PUT_NONEWMODE(pmadapter, mbuf, + port); + } + if (MP_TX_AGGR_PKT_LIMIT_REACHED(pmadapter) || + (!pmadapter->psdio_device->supports_sdio_new_mode && + MP_TX_AGGR_PORT_LIMIT_REACHED(pmadapter)) + ) { + PRINTM(MIF_D, + "host_2_card_mp_aggr: Aggregation Pkt limit reached\n"); + /* No more pkts allowed in Aggr buf, send it */ + f_send_aggr_buf = 1; + } + } + + if (f_send_aggr_buf) + ret = wlan_send_mp_aggr_buf(pmadapter); + +tx_curr_single: + if (f_send_cur_buf) { + PRINTM(MINFO, "host_2_card_mp_aggr: writing to port #%d\n", + port); + if (mbuf->flags & MLAN_BUF_FLAG_TCP_ACK) { + mbuf->flags &= ~MLAN_BUF_FLAG_TCP_ACK; + pmadapter->callbacks.moal_tcp_ack_tx_ind(pmadapter-> + pmoal_handle, + mbuf); + } + ret = wlan_write_data_sync(pmadapter, mbuf, + pmadapter->ioport + port); + if (!(pmadapter->mp_wr_bitmap & (1 << pmadapter->curr_wr_port))) + pmadapter->mpa_sent_no_ports++; + pmadapter->last_mp_wr_bitmap[pmadapter->last_mp_index] = + pmadapter->mp_wr_bitmap; + pmadapter->last_mp_wr_ports[pmadapter->last_mp_index] = + pmadapter->ioport + port; + pmadapter->last_mp_wr_len[pmadapter->last_mp_index] = + mbuf->data_len; + memset(pmadapter, + (t_u8 *)&pmadapter->last_mp_wr_info[pmadapter-> + last_mp_index * + mp_aggr_pkt_limit], + 0, sizeof(t_u16) * mp_aggr_pkt_limit); + pmadapter->last_mp_wr_info[pmadapter->last_mp_index * + mp_aggr_pkt_limit] = + *(t_u16 *)(mbuf->pbuf + mbuf->data_offset); + pmadapter->last_curr_wr_port[pmadapter->last_mp_index] = + pmadapter->curr_wr_port; + if (pmadapter->mpa_buf) + memcpy(pmadapter, + pmadapter->mpa_buf + + (pmadapter->last_mp_index * mp_aggr_pkt_limit * + MLAN_SDIO_BLOCK_SIZE), + mbuf->pbuf + mbuf->data_offset, + MLAN_SDIO_BLOCK_SIZE); + pmadapter->last_mp_index++; + if (pmadapter->last_mp_index >= SDIO_MP_DBG_NUM) + pmadapter->last_mp_index = 0; + pmadapter->mpa_tx_count[0]++; + } + if (f_postcopy_cur_buf) { + PRINTM(MINFO, "host_2_card_mp_aggr: Postcopy current buffer\n"); + if (pmadapter->mpa_buf) + memcpy(pmadapter, pmadapter->mpa_buf + + (pmadapter->last_mp_index * mp_aggr_pkt_limit + + pmadapter->mpa_tx.pkt_cnt) * + MLAN_SDIO_BLOCK_SIZE, + mbuf->pbuf + mbuf->data_offset, + MLAN_SDIO_BLOCK_SIZE); + if (!pmadapter->mpa_tx.buf) { + if (pmadapter->psdio_device->supports_sdio_new_mode) + MP_TX_AGGR_BUF_PUT_SG_NEWMODE(pmadapter, mbuf, + port); + else + MP_TX_AGGR_BUF_PUT_SG_NONEWMODE(pmadapter, mbuf, + port); + aggr_sg = MTRUE; + } else { + if (mbuf->flags & MLAN_BUF_FLAG_TCP_ACK) { + mbuf->flags &= ~MLAN_BUF_FLAG_TCP_ACK; + pmadapter->callbacks. + moal_tcp_ack_tx_ind(pmadapter-> + pmoal_handle, mbuf); + } + if (pmadapter->psdio_device->supports_sdio_new_mode) + MP_TX_AGGR_BUF_PUT_NEWMODE(pmadapter, mbuf, + port); + else + MP_TX_AGGR_BUF_PUT_NONEWMODE(pmadapter, mbuf, + port); + } + } + /* Always return PENDING in SG mode */ + if (aggr_sg) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} +#endif /* SDIO_MULTI_PORT_TX_AGGR */ + +/******************************************************** + Global functions +********************************************************/ + +/** + * @brief This function checks if the interface is ready to download + * or not while other download interface is present + * + * @param pmadapter A pointer to mlan_adapter structure + * @param val Winner status (0: winner) + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + * + */ +mlan_status +wlan_check_winner_status(mlan_adapter *pmadapter, t_u32 *val) +{ + t_u32 winner = 0; + pmlan_callbacks pcb; + t_u8 card_fw_status0_reg = pmadapter->psdio_device->reg->status_reg_0; + + ENTER(); + + pcb = &pmadapter->callbacks; + + if (MLAN_STATUS_SUCCESS != + pcb->moal_read_reg(pmadapter->pmoal_handle, card_fw_status0_reg, + &winner)) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + *val = winner; + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function checks if the firmware is ready to accept + * command or not. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pollnum Maximum polling number + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_check_fw_status(mlan_adapter *pmadapter, t_u32 pollnum) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 firmwarestat = 0; + t_u32 tries; + + ENTER(); + + /* Wait for firmware initialization event */ + for (tries = 0; tries < pollnum; tries++) { + ret = wlan_sdio_read_fw_status(pmadapter, &firmwarestat); + if (MLAN_STATUS_SUCCESS != ret) + continue; + if (firmwarestat == FIRMWARE_READY) { + ret = MLAN_STATUS_SUCCESS; + break; + } else { + wlan_mdelay(pmadapter, 100); + ret = MLAN_STATUS_FAILURE; + } + } + + if (ret != MLAN_STATUS_SUCCESS) { + if (pollnum > 1) + PRINTM(MERROR, + "Fail to poll firmware status: firmwarestat=0x%x\n", + firmwarestat); + goto done; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief This function downloads firmware to card + * + * @param pmadapter A pointer to mlan_adapter + * @param pmfw A pointer to firmware image + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_dnld_fw(IN pmlan_adapter pmadapter, IN pmlan_fw_image pmfw) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Download the firmware image via helper */ + ret = wlan_prog_fw_w_helper(pmadapter, pmfw->pfw_buf, pmfw->fw_len); + if (ret != MLAN_STATUS_SUCCESS) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + LEAVE(); + return ret; +} + +/** + * @brief This function probes the driver + * + * @param pmadapter A pointer to mlan_adapter structure + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_sdio_probe(pmlan_adapter pmadapter) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u32 sdio_ireg = 0; + pmlan_callbacks pcb = &pmadapter->callbacks; + + ENTER(); + /* + * Read the HOST_INT_STATUS_REG for ACK the first interrupt got + * from the bootloader. If we don't do this we get a interrupt + * as soon as we register the irq. + */ + pcb->moal_read_reg(pmadapter->pmoal_handle, + pmadapter->psdio_device->host_int_status_reg, + &sdio_ireg); + + /* Disable host interrupt mask register for SDIO */ + ret = wlan_disable_host_int(pmadapter); + if (ret != MLAN_STATUS_SUCCESS) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + /* Get SDIO ioport */ + ret = wlan_sdio_init_ioport(pmadapter); + LEAVE(); + return ret; +} + +/** + * @brief This function get sdio device from card type + * + * @param pmadapter A pointer to mlan_adapter structure + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_get_sdio_device(pmlan_adapter pmadapter) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 card_type = pmadapter->card_type; + + ENTER(); + + switch (card_type) { + case CARD_TYPE_SD8777: + pmadapter->psdio_device = &mlan_sdio_sd8777; + break; + case CARD_TYPE_SD8787: + pmadapter->psdio_device = &mlan_sdio_sd8787; + break; + case CARD_TYPE_SD8887: + pmadapter->psdio_device = &mlan_sdio_sd8887; + break; + case CARD_TYPE_SD8801: + pmadapter->psdio_device = &mlan_sdio_sd8801; + break; + case CARD_TYPE_SD8897: + pmadapter->psdio_device = &mlan_sdio_sd8897; + break; + case CARD_TYPE_SD8797: + pmadapter->psdio_device = &mlan_sdio_sd8797; + break; + default: + PRINTM(MERROR, "can't get right card type \n"); + ret = MLAN_STATUS_FAILURE; + break; + } + + LEAVE(); + return ret; +} + +/** + * @brief This function gets interrupt status. + * + * @param pmadapter A pointer to mlan_adapter structure + * @return N/A + */ +t_void +wlan_interrupt(pmlan_adapter pmadapter) +{ + pmlan_callbacks pcb = &pmadapter->callbacks; + mlan_buffer mbuf; + t_u32 sdio_ireg = 0; + + t_u8 max_mp_regs = pmadapter->psdio_device->reg->max_mp_regs; + t_u8 host_int_status_reg = pmadapter->psdio_device->host_int_status_reg; + + ENTER(); + + memset(pmadapter, &mbuf, 0, sizeof(mlan_buffer)); + mbuf.pbuf = pmadapter->mp_regs; + mbuf.data_len = max_mp_regs; + + if (MLAN_STATUS_SUCCESS != + pcb->moal_read_data_sync(pmadapter->pmoal_handle, &mbuf, + REG_PORT | MLAN_SDIO_BYTE_MODE_MASK, 0)) { + PRINTM(MERROR, "moal_read_data_sync: read registers failed\n"); + pmadapter->dbg.num_int_read_failure++; + goto done; + } + + DBG_HEXDUMP(MIF_D, "SDIO MP Registers", pmadapter->mp_regs, + max_mp_regs); + sdio_ireg = pmadapter->mp_regs[host_int_status_reg]; + pmadapter->dbg.last_int_status = pmadapter->sdio_ireg | sdio_ireg; + if (sdio_ireg) { + /* + * DN_LD_HOST_INT_STATUS and/or UP_LD_HOST_INT_STATUS + * DN_LD_CMD_PORT_HOST_INT_STATUS and/or + * UP_LD_CMD_PORT_HOST_INT_STATUS + * Clear the interrupt status register + */ + PRINTM(MINTR, "wlan_interrupt: sdio_ireg = 0x%x\n", sdio_ireg); + pmadapter->num_of_irq++; + pcb->moal_spin_lock(pmadapter->pmoal_handle, + pmadapter->pint_lock); + pmadapter->sdio_ireg |= sdio_ireg; + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->pint_lock); + + } else { + PRINTM(MMSG, "wlan_interrupt: sdio_ireg = 0x%x\n", sdio_ireg); + } +done: + LEAVE(); +} + +/** + * @brief This function enables the host interrupts. + * + * @param pmadapter A pointer to mlan_adapter structure + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_enable_host_int(pmlan_adapter pmadapter) +{ + mlan_status ret; + t_u8 mask = HIM_ENABLE; + mask = pmadapter->psdio_device->reg->host_int_enable; + + ENTER(); + ret = wlan_sdio_enable_host_int_mask(pmadapter, mask); + LEAVE(); + return ret; +} + +/** + * @brief This function checks the interrupt status and handle it accordingly. + * + * @param pmadapter A pointer to mlan_adapter structure + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_process_int_status(mlan_adapter *pmadapter) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_callbacks pcb = &pmadapter->callbacks; + t_u8 sdio_ireg; + mlan_buffer *pmbuf = MNULL; + + t_u8 port = 0; + t_u32 len_reg_l, len_reg_u; + t_u32 rx_blocks; + t_u8 bit_count = 0; + t_u32 ps_state = pmadapter->ps_state; + t_u16 rx_len; + t_u32 upld_typ = 0; + t_u32 cr = 0; + const mlan_sdio_device *psdio_device = pmadapter->psdio_device; + const mlan_sdio_card_reg *reg = psdio_device->reg; + t_bool new_mode = psdio_device->supports_sdio_new_mode; + t_u8 rd_len_p0_l = reg->rd_len_p0_l; + t_u8 rd_len_p0_u = reg->rd_len_p0_u; + t_u8 cmd_rd_len_0 = psdio_device->cmd_rd_len_0; + t_u8 cmd_rd_len_1 = psdio_device->cmd_rd_len_1; + + ENTER(); + + pcb->moal_spin_lock(pmadapter->pmoal_handle, pmadapter->pint_lock); + sdio_ireg = pmadapter->sdio_ireg; + pmadapter->sdio_ireg = 0; + pcb->moal_spin_unlock(pmadapter->pmoal_handle, pmadapter->pint_lock); + + if (!sdio_ireg) + goto done; + if (new_mode) { + /* check the command port */ + if (sdio_ireg & DN_LD_CMD_PORT_HOST_INT_STATUS) { + if (pmadapter->cmd_sent) + pmadapter->cmd_sent = MFALSE; + PRINTM(MINFO, "cmd_sent=%d\n", pmadapter->cmd_sent); + } + + if (sdio_ireg & UP_LD_CMD_PORT_HOST_INT_STATUS) { + /* read the len of control packet */ + rx_len = ((t_u16)pmadapter->mp_regs[cmd_rd_len_1]) << 8; + rx_len |= (t_u16)pmadapter->mp_regs[cmd_rd_len_0]; + PRINTM(MINFO, "RX: cmd port rx_len=%u\n", rx_len); + rx_blocks = + (rx_len + MLAN_SDIO_BLOCK_SIZE - + 1) / MLAN_SDIO_BLOCK_SIZE; + if (rx_len <= INTF_HEADER_LEN || + (rx_blocks * MLAN_SDIO_BLOCK_SIZE) > + ALLOC_BUF_SIZE) { + PRINTM(MERROR, "invalid rx_len=%d\n", rx_len); + ret = MLAN_STATUS_FAILURE; + goto done; + } + rx_len = (t_u16)(rx_blocks * MLAN_SDIO_BLOCK_SIZE); + pmbuf = wlan_alloc_mlan_buffer(pmadapter, rx_len, 0, + MOAL_MALLOC_BUFFER); + if (pmbuf == MNULL) { + PRINTM(MERROR, + "Failed to allocate 'mlan_buffer'\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + PRINTM(MINFO, "cmd rx buffer rx_len = %d\n", rx_len); + + /* Transfer data from card */ + if (MLAN_STATUS_SUCCESS != + wlan_sdio_card_to_host(pmadapter, &upld_typ, + (t_u32 *)&pmadapter-> + upld_len, pmbuf, rx_len, + pmadapter-> + ioport | CMD_PORT_SLCT)) { + pmadapter->dbg. + num_cmdevt_card_to_host_failure++; + PRINTM(MERROR, + "Card-to-host cmd failed: int status=0x%x\n", + sdio_ireg); + wlan_free_mlan_buffer(pmadapter, pmbuf); + ret = MLAN_STATUS_FAILURE; + goto term_cmd53; + } + + if ((upld_typ != MLAN_TYPE_CMD) && + (upld_typ != MLAN_TYPE_EVENT)) + PRINTM(MERROR, + "receive a wrong packet from CMD PORT. type =0x%d\n", + upld_typ); + + wlan_decode_rx_packet(pmadapter, pmbuf, upld_typ, + MFALSE); + + /* We might receive data/sleep_cfm at the same time */ + /* reset data_receive flag to avoid ps_state change */ + if ((ps_state == PS_STATE_SLEEP_CFM) && + (pmadapter->ps_state == PS_STATE_SLEEP)) + pmadapter->data_received = MFALSE; + } + } + + if (sdio_ireg & DN_LD_HOST_INT_STATUS) { + if (pmadapter->mp_wr_bitmap & pmadapter->mp_data_port_mask) + pmadapter->mp_invalid_update++; + pmadapter->mp_wr_bitmap = + (t_u32)pmadapter->mp_regs[reg->wr_bitmap_l]; + pmadapter->mp_wr_bitmap |= + ((t_u32)pmadapter->mp_regs[reg->wr_bitmap_u]) << 8; + if (psdio_device->supports_sdio_new_mode) { + pmadapter->mp_wr_bitmap |= + ((t_u32)pmadapter-> + mp_regs[reg->wr_bitmap_1l]) << 16; + pmadapter->mp_wr_bitmap |= + ((t_u32)pmadapter-> + mp_regs[reg->wr_bitmap_1u]) << 24; + } + bit_count = + bitcount(pmadapter->mp_wr_bitmap & pmadapter-> + mp_data_port_mask); + if (bit_count) { + pmadapter->mp_update[bit_count - 1]++; + if (pmadapter->mp_update[bit_count - 1] == 0xffffffff) + memset(pmadapter, pmadapter->mp_update, 0, + sizeof(pmadapter->mp_update)); + } + + pmadapter->last_recv_wr_bitmap = pmadapter->mp_wr_bitmap; + PRINTM(MINTR, "DNLD: wr_bitmap=0x%08x\n", + pmadapter->mp_wr_bitmap); + if (pmadapter->data_sent && + (pmadapter-> + mp_wr_bitmap & (1 << pmadapter->curr_wr_port))) { + PRINTM(MINFO, " <--- Tx DONE Interrupt --->\n"); + pmadapter->data_sent = MFALSE; + } + } + + if ((!psdio_device->supports_sdio_new_mode) && + (pmadapter->cmd_sent == MTRUE)) { + /* Check if firmware has attach buffer at command port and + update just that in wr_bit_map. */ + pmadapter->mp_wr_bitmap |= + (t_u32)pmadapter->mp_regs[reg-> + wr_bitmap_l] & CTRL_PORT_MASK; + if (pmadapter->mp_wr_bitmap & CTRL_PORT_MASK) + pmadapter->cmd_sent = MFALSE; + } + + PRINTM(MINFO, "cmd_sent=%d, data_sent=%d\n", pmadapter->cmd_sent, + pmadapter->data_sent); + if (sdio_ireg & UP_LD_HOST_INT_STATUS) { + pmadapter->mp_rd_bitmap = + (t_u32)pmadapter->mp_regs[reg->rd_bitmap_l]; + pmadapter->mp_rd_bitmap |= + ((t_u32)pmadapter->mp_regs[reg->rd_bitmap_u]) << 8; + if (psdio_device->supports_sdio_new_mode) { + pmadapter->mp_rd_bitmap |= + ((t_u32)pmadapter-> + mp_regs[reg->rd_bitmap_1l]) << 16; + pmadapter->mp_rd_bitmap |= + ((t_u32)pmadapter-> + mp_regs[reg->rd_bitmap_1u]) << 24; + } + PRINTM(MINTR, "UPLD: rd_bitmap=0x%08x\n", + pmadapter->mp_rd_bitmap); + + while (MTRUE) { + ret = wlan_get_rd_port(pmadapter, &port); + if (ret != MLAN_STATUS_SUCCESS) { + PRINTM(MINFO, + "no more rd_port to be handled\n"); + break; + } + len_reg_l = rd_len_p0_l + (port << 1); + len_reg_u = rd_len_p0_u + (port << 1); + rx_len = ((t_u16)pmadapter->mp_regs[len_reg_u]) << 8; + rx_len |= (t_u16)pmadapter->mp_regs[len_reg_l]; + PRINTM(MINFO, "RX: port=%d rx_len=%u\n", port, rx_len); + rx_blocks = + (rx_len + MLAN_SDIO_BLOCK_SIZE - + 1) / MLAN_SDIO_BLOCK_SIZE; + if (rx_len <= INTF_HEADER_LEN || + (rx_blocks * MLAN_SDIO_BLOCK_SIZE) > + ALLOC_BUF_SIZE) { + PRINTM(MERROR, "invalid rx_len=%d\n", rx_len); + ret = MLAN_STATUS_FAILURE; + goto done; + } + rx_len = (t_u16)(rx_blocks * MLAN_SDIO_BLOCK_SIZE); + if ((!new_mode && (port == CTRL_PORT)) || + rx_len > MLAN_TX_DATA_BUF_SIZE_2K) + pmbuf = wlan_alloc_mlan_buffer(pmadapter, + rx_len, 0, + MOAL_MALLOC_BUFFER); + else + pmbuf = wlan_alloc_mlan_buffer(pmadapter, + rx_len, + MLAN_RX_HEADER_LEN, + MOAL_ALLOC_MLAN_BUFFER); + if (pmbuf == MNULL) { + PRINTM(MERROR, + "Failed to allocate 'mlan_buffer'\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + PRINTM(MINFO, "rx_len = %d\n", rx_len); +#ifdef SDIO_MULTI_PORT_RX_AGGR + if (MLAN_STATUS_SUCCESS != + wlan_sdio_card_to_host_mp_aggr(pmadapter, pmbuf, + port, rx_len)) { +#else + /* Transfer data from card */ + if (MLAN_STATUS_SUCCESS != + wlan_sdio_card_to_host(pmadapter, &upld_typ, + (t_u32 *)&pmadapter-> + upld_len, pmbuf, rx_len, + pmadapter->ioport + port)) { +#endif /* SDIO_MULTI_PORT_RX_AGGR */ + + if ((!new_mode) && (port == CTRL_PORT)) + pmadapter->dbg. + num_cmdevt_card_to_host_failure++; + else + pmadapter->dbg. + num_rx_card_to_host_failure++; + + PRINTM(MERROR, + "Card to host failed: int status=0x%x\n", + sdio_ireg); +#ifndef SDIO_MULTI_PORT_RX_AGGR + wlan_free_mlan_buffer(pmadapter, pmbuf); +#endif + ret = MLAN_STATUS_FAILURE; + goto term_cmd53; + } +#ifndef SDIO_MULTI_PORT_RX_AGGR + wlan_decode_rx_packet(pmadapter, pmbuf, upld_typ, + MTRUE); +#endif + } + /* We might receive data/sleep_cfm at the same time */ + /* reset data_receive flag to avoid ps_state change */ + if ((ps_state == PS_STATE_SLEEP_CFM) && + (pmadapter->ps_state == PS_STATE_SLEEP)) + pmadapter->data_received = MFALSE; + } + + ret = MLAN_STATUS_SUCCESS; + goto done; + +term_cmd53: + /* terminate cmd53 */ + if (MLAN_STATUS_SUCCESS != pcb->moal_read_reg(pmadapter->pmoal_handle, + HOST_TO_CARD_EVENT_REG, + &cr)) + PRINTM(MERROR, "read CFG reg failed\n"); + PRINTM(MINFO, "Config Reg val = %d\n", cr); + if (MLAN_STATUS_SUCCESS != pcb->moal_write_reg(pmadapter->pmoal_handle, + HOST_TO_CARD_EVENT_REG, + (cr | HOST_TERM_CMD53))) + PRINTM(MERROR, "write CFG reg failed\n"); + PRINTM(MINFO, "write success\n"); + if (MLAN_STATUS_SUCCESS != pcb->moal_read_reg(pmadapter->pmoal_handle, + HOST_TO_CARD_EVENT_REG, + &cr)) + PRINTM(MERROR, "read CFG reg failed\n"); + PRINTM(MINFO, "Config reg val =%x\n", cr); + +done: + LEAVE(); + return ret; +} + +/** + * @brief This function sends data to the card. + * + * @param pmadapter A pointer to mlan_adapter structure + * @param type data or command + * @param pmbuf A pointer to mlan_buffer (pmbuf->data_len should include SDIO header) + * @param tx_param A pointer to mlan_tx_param + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_sdio_host_to_card(mlan_adapter *pmadapter, t_u8 type, mlan_buffer *pmbuf, + mlan_tx_param *tx_param) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u32 buf_block_len; + t_u32 blksz; + t_u8 port = 0; + t_u32 cmd53_port = 0; + t_u8 *payload = pmbuf->pbuf + pmbuf->data_offset; + + ENTER(); + + /* Allocate buffer and copy payload */ + blksz = MLAN_SDIO_BLOCK_SIZE; + buf_block_len = (pmbuf->data_len + blksz - 1) / blksz; + *(t_u16 *)&payload[0] = wlan_cpu_to_le16((t_u16)pmbuf->data_len); + *(t_u16 *)&payload[2] = wlan_cpu_to_le16(type); + + /* + * This is SDIO specific header + * t_u16 length, + * t_u16 type (MLAN_TYPE_DATA = 0, + * MLAN_TYPE_CMD = 1, MLAN_TYPE_EVENT = 3) + */ + if (type == MLAN_TYPE_DATA) { + ret = wlan_get_wr_port_data(pmadapter, &port); + if (ret != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, + "no wr_port available: wr_bitmap=0x%08x curr_wr_port=%d\n", + pmadapter->mp_wr_bitmap, + pmadapter->curr_wr_port); + goto exit; + } + /* Transfer data to card */ + pmbuf->data_len = buf_block_len * blksz; + +#ifdef SDIO_MULTI_PORT_TX_AGGR + if (tx_param) + ret = wlan_host_to_card_mp_aggr(pmadapter, pmbuf, port, + tx_param->next_pkt_len); + else + ret = wlan_host_to_card_mp_aggr(pmadapter, pmbuf, port, + 0); +#else + if (pmbuf->flags & MLAN_BUF_FLAG_TCP_ACK) { + pmbuf->flags &= ~MLAN_BUF_FLAG_TCP_ACK; + pmadapter->callbacks.moal_tcp_ack_tx_ind(pmadapter-> + pmoal_handle, + pmbuf); + } + ret = wlan_write_data_sync(pmadapter, pmbuf, + pmadapter->ioport + port); +#endif /* SDIO_MULTI_PORT_TX_AGGR */ + + } else { + /* Type must be MLAN_TYPE_CMD */ + pmadapter->cmd_sent = MTRUE; + if (!pmadapter->psdio_device->supports_sdio_new_mode) + pmadapter->mp_wr_bitmap &= (t_u32)(~(1 << CTRL_PORT)); + if (pmbuf->data_len <= INTF_HEADER_LEN || + pmbuf->data_len > WLAN_UPLD_SIZE) + PRINTM(MWARN, + "wlan_sdio_host_to_card(): Error: payload=%p, nb=%d\n", + payload, pmbuf->data_len); + /* Transfer data to card */ + pmbuf->data_len = buf_block_len * blksz; + if (pmadapter->psdio_device->supports_sdio_new_mode) + cmd53_port = (pmadapter->ioport) | CMD_PORT_SLCT; + else + cmd53_port = pmadapter->ioport + CTRL_PORT; + ret = wlan_write_data_sync(pmadapter, pmbuf, cmd53_port); + } + + if (ret == MLAN_STATUS_FAILURE) { + if (type == MLAN_TYPE_CMD) + pmadapter->cmd_sent = MFALSE; + if (type == MLAN_TYPE_DATA) + pmadapter->data_sent = MFALSE; + } else { + if (type == MLAN_TYPE_DATA) { + if (! + (pmadapter-> + mp_wr_bitmap & (1 << pmadapter->curr_wr_port))) + pmadapter->data_sent = MTRUE; + else + pmadapter->data_sent = MFALSE; + } + DBG_HEXDUMP(MIF_D, "SDIO Blk Wr", + pmbuf->pbuf + pmbuf->data_offset, + MIN(pmbuf->data_len, MAX_DATA_DUMP_LEN)); + } +exit: + LEAVE(); + return ret; +} + +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) +/** + * @brief This function allocates buffer for the SDIO aggregation buffer + * related members of adapter structure + * + * @param pmadapter A pointer to mlan_adapter structure + * @param mpa_tx_buf_size Tx buffer size to allocate + * @param mpa_rx_buf_size Rx buffer size to allocate + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_alloc_sdio_mpa_buffers(IN mlan_adapter *pmadapter, + t_u32 mpa_tx_buf_size, t_u32 mpa_rx_buf_size) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_callbacks pcb = &pmadapter->callbacks; + t_u8 mp_aggr_pkt_limit = pmadapter->psdio_device->mp_aggr_pkt_limit; + + ENTER(); + +#ifdef SDIO_MULTI_PORT_TX_AGGR + if ((pmadapter->max_segs < mp_aggr_pkt_limit) || + (pmadapter->max_seg_size < pmadapter->max_sp_tx_size)) { + ret = pcb->moal_malloc(pmadapter->pmoal_handle, + mpa_tx_buf_size + DMA_ALIGNMENT, + MLAN_MEM_DEF | MLAN_MEM_DMA, + (t_u8 **)&pmadapter->mpa_tx.head_ptr); + if (ret != MLAN_STATUS_SUCCESS || !pmadapter->mpa_tx.head_ptr) { + PRINTM(MERROR, + "Could not allocate buffer for SDIO MP TX aggr\n"); + ret = MLAN_STATUS_FAILURE; + goto error; + } + pmadapter->mpa_tx.buf = + (t_u8 *)ALIGN_ADDR(pmadapter->mpa_tx.head_ptr, + DMA_ALIGNMENT); + } else { + PRINTM(MMSG, "wlan: Enable TX SG mode\n"); + pmadapter->mpa_tx.head_ptr = MNULL; + pmadapter->mpa_tx.buf = MNULL; + } + pmadapter->mpa_tx.buf_size = mpa_tx_buf_size; +#endif /* SDIO_MULTI_PORT_TX_AGGR */ + +#ifdef SDIO_MULTI_PORT_RX_AGGR + if ((pmadapter->max_segs < mp_aggr_pkt_limit) || + (pmadapter->max_seg_size < pmadapter->max_sp_rx_size)) { + ret = pcb->moal_malloc(pmadapter->pmoal_handle, + mpa_rx_buf_size + DMA_ALIGNMENT, + MLAN_MEM_DEF | MLAN_MEM_DMA, + (t_u8 **)&pmadapter->mpa_rx.head_ptr); + if (ret != MLAN_STATUS_SUCCESS || !pmadapter->mpa_rx.head_ptr) { + PRINTM(MERROR, + "Could not allocate buffer for SDIO MP RX aggr\n"); + ret = MLAN_STATUS_FAILURE; + goto error; + } + pmadapter->mpa_rx.buf = + (t_u8 *)ALIGN_ADDR(pmadapter->mpa_rx.head_ptr, + DMA_ALIGNMENT); + } else { + PRINTM(MMSG, "wlan: Enable RX SG mode\n"); + pmadapter->mpa_rx.head_ptr = MNULL; + pmadapter->mpa_rx.buf = MNULL; + } + pmadapter->mpa_rx.buf_size = mpa_rx_buf_size; +#endif /* SDIO_MULTI_PORT_RX_AGGR */ +error: + if (ret != MLAN_STATUS_SUCCESS) + wlan_free_sdio_mpa_buffers(pmadapter); + + LEAVE(); + return ret; +} + +/** + * @brief This function frees buffers for the SDIO aggregation + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_free_sdio_mpa_buffers(IN mlan_adapter *pmadapter) +{ + pmlan_callbacks pcb = &pmadapter->callbacks; + + ENTER(); + +#ifdef SDIO_MULTI_PORT_TX_AGGR + if (pmadapter->mpa_tx.buf) { + pcb->moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pmadapter->mpa_tx.head_ptr); + pmadapter->mpa_tx.head_ptr = MNULL; + pmadapter->mpa_tx.buf = MNULL; + pmadapter->mpa_tx.buf_size = 0; + } +#endif /* SDIO_MULTI_PORT_TX_AGGR */ + +#ifdef SDIO_MULTI_PORT_RX_AGGR + if (pmadapter->mpa_rx.buf) { + pcb->moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pmadapter->mpa_rx.head_ptr); + pmadapter->mpa_rx.head_ptr = MNULL; + pmadapter->mpa_rx.buf = MNULL; + pmadapter->mpa_rx.buf_size = 0; + } +#endif /* SDIO_MULTI_PORT_RX_AGGR */ + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} +#endif /* SDIO_MULTI_PORT_TX_AGGR || SDIO_MULTI_PORT_RX_AGGR */ + +/** + * @brief This function issues commands to initialize firmware + * + * @param priv A pointer to mlan_private structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_set_sdio_gpio_int(IN pmlan_private priv) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_adapter pmadapter = priv->adapter; + HostCmd_DS_SDIO_GPIO_INT_CONFIG sdio_int_cfg; + + ENTER(); + + if (pmadapter->int_mode == INT_MODE_GPIO) { + PRINTM(MINFO, "SDIO_GPIO_INT_CONFIG: interrupt mode is GPIO\n"); + sdio_int_cfg.action = HostCmd_ACT_GEN_SET; + sdio_int_cfg.gpio_pin = pmadapter->gpio_pin; + sdio_int_cfg.gpio_int_edge = INT_FALLING_EDGE; + sdio_int_cfg.gpio_pulse_width = DELAY_1_US; + ret = wlan_prepare_cmd(priv, HostCmd_CMD_SDIO_GPIO_INT_CONFIG, + HostCmd_ACT_GEN_SET, 0, MNULL, + &sdio_int_cfg); + + if (ret) { + PRINTM(MERROR, + "SDIO_GPIO_INT_CONFIG: send command fail\n"); + ret = MLAN_STATUS_FAILURE; + } + } else { + PRINTM(MINFO, "SDIO_GPIO_INT_CONFIG: interrupt mode is SDIO\n"); + } + + LEAVE(); + return ret; +} + +/** + * @brief This function prepares command of SDIO GPIO interrupt + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_sdio_gpio_int(pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + HostCmd_DS_SDIO_GPIO_INT_CONFIG *psdio_gpio_int = + &cmd->params.sdio_gpio_int; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_SDIO_GPIO_INT_CONFIG); + cmd->size = + wlan_cpu_to_le16((sizeof(HostCmd_DS_SDIO_GPIO_INT_CONFIG)) + + S_DS_GEN); + + memset(pmpriv->adapter, psdio_gpio_int, 0, + sizeof(HostCmd_DS_SDIO_GPIO_INT_CONFIG)); + if (cmd_action == HostCmd_ACT_GEN_SET) { + memcpy(pmpriv->adapter, psdio_gpio_int, pdata_buf, + sizeof(HostCmd_DS_SDIO_GPIO_INT_CONFIG)); + psdio_gpio_int->action = + wlan_cpu_to_le16(psdio_gpio_int->action); + psdio_gpio_int->gpio_pin = + wlan_cpu_to_le16(psdio_gpio_int->gpio_pin); + psdio_gpio_int->gpio_int_edge = + wlan_cpu_to_le16(psdio_gpio_int->gpio_int_edge); + psdio_gpio_int->gpio_pulse_width = + wlan_cpu_to_le16(psdio_gpio_int->gpio_pulse_width); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sdio.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sdio.h new file mode 100644 index 00000000..479b8806 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sdio.h @@ -0,0 +1,677 @@ +/** @file mlan_sdio.h + * + * @brief This file contains definitions for SDIO interface. + * driver. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ +/**************************************************** +Change log: +****************************************************/ + +#ifndef _MLAN_SDIO_H +#define _MLAN_SDIO_H + +/** Block mode */ +#ifndef BLOCK_MODE +#define BLOCK_MODE 1 +#endif + +/** Fixed address mode */ +#ifndef FIXED_ADDRESS +#define FIXED_ADDRESS 0 +#endif + +/* Host Control Registers */ +/** Host Control Registers : Host to Card Event */ +#define HOST_TO_CARD_EVENT_REG 0x00 +/** Host Control Registers : Host terminates Command 53 */ +#define HOST_TERM_CMD53 (0x1U << 2) +/** Host Control Registers : Host without Command 53 finish host */ +#define HOST_WO_CMD53_FINISH_HOST (0x1U << 2) +/** Host Control Registers : Host power up */ +#define HOST_POWER_UP (0x1U << 1) +/** Host Control Registers : Host power down */ +#define HOST_POWER_DOWN (0x1U << 0) + +/** Host Control Registers : Host interrupt RSR */ +#define HOST_INT_RSR_REG 0x01 + +/** Host Control Registers : Upload host interrupt RSR */ +#define UP_LD_HOST_INT_RSR (0x1U) +#define HOST_INT_RSR_MASK 0xFF + +/** Host Control Registers : Host interrupt mask */ +#define HOST_INT_MASK_REG 0x02 + +/** Host Control Registers : Upload host interrupt mask */ +#define UP_LD_HOST_INT_MASK (0x1U) +/** Host Control Registers : Download host interrupt mask */ +#define DN_LD_HOST_INT_MASK (0x2U) +/** Host Control Registers : Cmd port upload interrupt mask */ +#define CMD_PORT_UPLD_INT_MASK (0x1U << 6) +/** Host Control Registers : Cmd port download interrupt mask */ +#define CMD_PORT_DNLD_INT_MASK (0x1U << 7) +/** Enable Host interrupt mask */ +#define HIM_ENABLE (UP_LD_HOST_INT_MASK | \ + DN_LD_HOST_INT_MASK | \ + CMD_PORT_UPLD_INT_MASK | \ + CMD_PORT_DNLD_INT_MASK) +/** Disable Host interrupt mask */ +#define HIM_DISABLE 0xff + +/** Host Control Registers : Host interrupt status */ +#define HOST_INT_STATUS_REG 0x03 + +/** Host Control Registers : Upload command port host interrupt status */ +#define UP_LD_CMD_PORT_HOST_INT_STATUS (0x40U) +/** Host Control Registers : Download command port host interrupt status */ +#define DN_LD_CMD_PORT_HOST_INT_STATUS (0x80U) + +/** Host Control Registers : Upload host interrupt status */ +#define UP_LD_HOST_INT_STATUS (0x1U) +/** Host Control Registers : Download host interrupt status */ +#define DN_LD_HOST_INT_STATUS (0x2U) + +/** Port for registers */ +#define REG_PORT 0 +/** LSB of read bitmap */ +#define RD_BITMAP_L 0x04 +/** MSB of read bitmap */ +#define RD_BITMAP_U 0x05 +/** LSB of write bitmap */ +#define WR_BITMAP_L 0x06 +/** MSB of write bitmap */ +#define WR_BITMAP_U 0x07 +/** LSB of read length for port 0 */ +#define RD_LEN_P0_L 0x08 +/** MSB of read length for port 0 */ +#define RD_LEN_P0_U 0x09 +/** Ctrl port */ +#define CTRL_PORT 0 +/** Ctrl port mask */ +#define CTRL_PORT_MASK 0x0001 +/** Data port mask */ +#define DATA_PORT_MASK 0xfffe +/** Misc. Config Register : Auto Re-enable interrupts */ +#define AUTO_RE_ENABLE_INT MBIT(4) + +/** Host Control Registers : Host transfer status */ +#define HOST_RESTART_REG 0x28 +/** Host Control Registers : Download CRC error */ +#define DN_LD_CRC_ERR (0x1U << 2) +/** Host Control Registers : Upload restart */ +#define UP_LD_RESTART (0x1U << 1) +/** Host Control Registers : Download restart */ +#define DN_LD_RESTART (0x1U << 0) + +/* Card Control Registers */ +/** Card Control Registers : Card to host event */ +#define CARD_TO_HOST_EVENT_REG 0x30 +/** Card Control Registers : Card I/O ready */ +#define CARD_IO_READY (0x1U << 3) +/** Card Control Registers : CIS card ready */ +#define CIS_CARD_RDY (0x1U << 2) +/** Card Control Registers : Upload card ready */ +#define UP_LD_CARD_RDY (0x1U << 1) +/** Card Control Registers : Download card ready */ +#define DN_LD_CARD_RDY (0x1U << 0) + +/** Card Control Registers : Host interrupt mask register */ +#define HOST_INTERRUPT_MASK_REG 0x34 +/** Card Control Registers : Host power interrupt mask */ +#define HOST_POWER_INT_MASK (0x1U << 3) +/** Card Control Registers : Abort card interrupt mask */ +#define ABORT_CARD_INT_MASK (0x1U << 2) +/** Card Control Registers : Upload card interrupt mask */ +#define UP_LD_CARD_INT_MASK (0x1U << 1) +/** Card Control Registers : Download card interrupt mask */ +#define DN_LD_CARD_INT_MASK (0x1U << 0) + +/** Card Control Registers : Card interrupt status register */ +#define CARD_INTERRUPT_STATUS_REG 0x38 +/** Card Control Registers : Power up interrupt */ +#define POWER_UP_INT (0x1U << 4) +/** Card Control Registers : Power down interrupt */ +#define POWER_DOWN_INT (0x1U << 3) + +/** Card Control Registers : Card interrupt RSR register */ +#define CARD_INTERRUPT_RSR_REG 0x3c +/** Card Control Registers : Power up RSR */ +#define POWER_UP_RSR (0x1U << 4) +/** Card Control Registers : Power down RSR */ +#define POWER_DOWN_RSR (0x1U << 3) + +/** Card Control Registers : SQ Read base address 0 register */ +#define READ_BASE_0_REG 0x40 +/** Card Control Registers : SQ Read base address 1 register */ +#define READ_BASE_1_REG 0x41 + +/** Card Control Registers : Card revision register */ +#define CARD_REVISION_REG 0x5c + +/** Firmware status 0 register (SCRATCH0_0) */ +#define CARD_FW_STATUS0_REG 0x60 +/** Firmware status 1 register (SCRATCH0_1) */ +#define CARD_FW_STATUS1_REG 0x61 +/** Rx length register (SCRATCH0_2) */ +#define CARD_RX_LEN_REG 0x62 +/** Rx unit register (SCRATCH0_3) */ +#define CARD_RX_UNIT_REG 0x63 + +/** Card Control Registers : Card OCR 0 register */ +#define CARD_OCR_0_REG 0x68 +/** Card Control Registers : Card OCR 1 register */ +#define CARD_OCR_1_REG 0x69 +/** Card Control Registers : Card OCR 3 register */ +#define CARD_OCR_3_REG 0x6A +/** Card Control Registers : Card config register */ +#define CARD_CONFIG_REG 0x6B +/** Card Control Registers : Miscellaneous Configuration Register */ +#define CARD_MISC_CFG_REG 0x6C + +/** Card Control Registers : Debug 0 register */ +#define DEBUG_0_REG 0x70 +/** Card Control Registers : SD test BUS 0 */ +#define SD_TESTBUS0 (0x1U) +/** Card Control Registers : Debug 1 register */ +#define DEBUG_1_REG 0x71 +/** Card Control Registers : SD test BUS 1 */ +#define SD_TESTBUS1 (0x1U) +/** Card Control Registers : Debug 2 register */ +#define DEBUG_2_REG 0x72 +/** Card Control Registers : SD test BUS 2 */ +#define SD_TESTBUS2 (0x1U) +/** Card Control Registers : Debug 3 register */ +#define DEBUG_3_REG 0x73 +/** Card Control Registers : SD test BUS 3 */ +#define SD_TESTBUS3 (0x1U) + +/** Host Control Registers : I/O port 0 */ +#define IO_PORT_0_REG 0x78 +/** Host Control Registers : I/O port 1 */ +#define IO_PORT_1_REG 0x79 +/** Host Control Registers : I/O port 2 */ +#define IO_PORT_2_REG 0x7A + +/** Port for memory */ +#define MEM_PORT 0x10000 +/** Card Control Registers : cmd53 new mode */ +#define CMD53_NEW_MODE (0x1U << 0) +#define CMD_PORT_RD_LEN_EN (0x1U << 2) +#define CMD_PORT_AUTO_EN (0x1U << 0) +#define CMD_PORT_SLCT 0x8000 +/** Ctrl port mask */ +#define CTRL_PORT_MASK 0x0001 + +/** SD8787 card type */ +#define CARD_TYPE_SD8787 0x01 +/** SD8777 card type */ +#define CARD_TYPE_SD8777 0x02 +/** SD8887 card type */ +#define CARD_TYPE_SD8887 0x03 +/** SD8801 card type */ +#define CARD_TYPE_SD8801 0x04 +/** SD8897 card type */ +#define CARD_TYPE_SD8897 0x05 +/** SD8797 card type */ +#define CARD_TYPE_SD8797 0x06 + +#define IS_SD8777(ct) (CARD_TYPE_SD8777 == (ct)) +#define IS_SD8787(ct) (CARD_TYPE_SD8787 == (ct)) +#define IS_SD8887(ct) (CARD_TYPE_SD8887 == (ct)) +#define IS_SD8801(ct) (CARD_TYPE_SD8801 == (ct)) +#define IS_SD8897(ct) (CARD_TYPE_SD8897 == (ct)) +#define IS_SD8797(ct) (CARD_TYPE_SD8797 == (ct)) +/** Event header Len*/ +#define MLAN_EVENT_HEADER_LEN 8 + +/** SDIO byte mode size */ +#define MAX_BYTE_MODE_SIZE 512 + +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) +/** The base address for packet with multiple ports aggregation */ +#define SDIO_MPA_ADDR_BASE 0x1000 +#endif + +#ifdef SDIO_MULTI_PORT_TX_AGGR + +/** SDIO Tx aggregation in progress ? */ +#define MP_TX_AGGR_IN_PROGRESS(a) (a->mpa_tx.pkt_cnt > 0) + +/** SDIO Tx aggregation buffer room for next packet ? */ +#define MP_TX_AGGR_BUF_HAS_ROOM(a, mbuf, len) \ + (((a->mpa_tx.buf_len) + len) <= (a->mpa_tx.buf_size)) + +/** Copy current packet (SDIO Tx aggregation buffer) to SDIO buffer */ +#define MP_TX_AGGR_BUF_PUT_NEWMODE(a, mbuf, port) do { \ + pmadapter->callbacks.moal_memmove(a->pmoal_handle, \ + &a->mpa_tx.buf[a->mpa_tx.buf_len], \ + mbuf->pbuf+mbuf->data_offset, mbuf->data_len);\ + a->mpa_tx.buf_len += mbuf->data_len; \ + a->mpa_tx.mp_wr_info[a->mpa_tx.pkt_cnt] = *(t_u16 *)(mbuf->pbuf+mbuf->data_offset); \ + if (!a->mpa_tx.pkt_cnt) { \ + a->mpa_tx.start_port = port; \ + } \ + a->mpa_tx.ports |= (1 << port); \ + a->mpa_tx.pkt_cnt++; \ +} while (0) + +#define MP_TX_AGGR_BUF_PUT_SG_NEWMODE(a, mbuf, port) do { \ + a->mpa_tx.buf_len += mbuf->data_len; \ + a->mpa_tx.mp_wr_info[a->mpa_tx.pkt_cnt] = *(t_u16 *)(mbuf->pbuf+mbuf->data_offset); \ + a->mpa_tx.mbuf_arr[a->mpa_tx.pkt_cnt] = mbuf; \ + if (!a->mpa_tx.pkt_cnt) { \ + a->mpa_tx.start_port = port; \ + } \ + a->mpa_tx.ports |= (1 << port); \ + a->mpa_tx.pkt_cnt++; \ +} while (0) +#define MP_TX_AGGR_BUF_PUT_NONEWMODE(a, mbuf, port) do { \ + pmadapter->callbacks.moal_memmove(a->pmoal_handle, \ + &a->mpa_tx.buf[a->mpa_tx.buf_len], \ + mbuf->pbuf+mbuf->data_offset, mbuf->data_len);\ + a->mpa_tx.buf_len += mbuf->data_len; \ + a->mpa_tx.mp_wr_info[a->mpa_tx.pkt_cnt] = *(t_u16 *)(mbuf->pbuf+mbuf->data_offset); \ + if (!a->mpa_tx.pkt_cnt) { \ + a->mpa_tx.start_port = port; \ + } \ + if (a->mpa_tx.start_port <= port) { \ + a->mpa_tx.ports |= (1 << (a->mpa_tx.pkt_cnt)); \ + } else { \ + a->mpa_tx.ports |= (1 << (a->mpa_tx.pkt_cnt \ + + 1 + (a->psdio_device->max_ports - a->mp_end_port))); \ + } \ + a->mpa_tx.pkt_cnt++; \ +} while (0) +#define MP_TX_AGGR_BUF_PUT_SG_NONEWMODE(a, mbuf, port) do { \ + a->mpa_tx.buf_len += mbuf->data_len; \ + a->mpa_tx.mp_wr_info[a->mpa_tx.pkt_cnt] = *(t_u16 *)(mbuf->pbuf+mbuf->data_offset); \ + a->mpa_tx.mbuf_arr[a->mpa_tx.pkt_cnt] = mbuf; \ + if (!a->mpa_tx.pkt_cnt) { \ + a->mpa_tx.start_port = port; \ + } \ + if (a->mpa_tx.start_port <= port) { \ + a->mpa_tx.ports |= (1 << (a->mpa_tx.pkt_cnt)); \ + } else { \ + a->mpa_tx.ports |= (1 << (a->mpa_tx.pkt_cnt \ + + 1 + (a->psdio_device->max_ports - a->mp_end_port))); \ + } \ + a->mpa_tx.pkt_cnt++; \ +} while (0) +/** SDIO Tx aggregation limit ? */ +#define MP_TX_AGGR_PKT_LIMIT_REACHED(a) ((a->mpa_tx.pkt_cnt) \ + == (a->mpa_tx.pkt_aggr_limit)) + +/** SDIO Tx aggregation port limit ? */ + +#define MP_TX_AGGR_PORT_LIMIT_REACHED(a) ((a->curr_wr_port < \ + a->mpa_tx.start_port) && (((a->psdio_device->max_ports - \ + a->mpa_tx.start_port) + a->curr_wr_port) >= \ + a->psdio_device->mp_aggr_pkt_limit)) + +/** Reset SDIO Tx aggregation buffer parameters */ +#define MP_TX_AGGR_BUF_RESET(a) do { \ + memset(a, a->mpa_tx.mp_wr_info, 0, sizeof(a->mpa_tx.mp_wr_info)); \ + a->mpa_tx.pkt_cnt = 0; \ + a->mpa_tx.buf_len = 0; \ + a->mpa_tx.ports = 0; \ + a->mpa_tx.start_port = 0; \ +} while (0) + +#endif /* SDIO_MULTI_PORT_TX_AGGR */ + +#ifdef SDIO_MULTI_PORT_RX_AGGR + +/** SDIO Rx aggregation limit ? */ +#define MP_RX_AGGR_PKT_LIMIT_REACHED(a) (a->mpa_rx.pkt_cnt \ + == a->mpa_rx.pkt_aggr_limit) + +/** SDIO Rx aggregation port limit ? */ +#define MP_RX_AGGR_PORT_LIMIT_REACHED_NEWMODE(a) \ + (((a->curr_rd_port < a->mpa_rx.start_port) && \ + (((a->psdio_device->max_ports - a->mpa_rx.start_port) + a->curr_rd_port) \ + >= (a->mp_end_port >> 1))) || \ + ((a->curr_rd_port - a->mpa_rx.start_port) >= \ + (a->mp_end_port >> 1))) +#define MP_RX_AGGR_PORT_LIMIT_REACHED_NONEWMODE(a) ((a->curr_rd_port < \ + a->mpa_rx.start_port) && (((a->psdio_device->max_ports - \ + a->mpa_rx.start_port) + a->curr_rd_port) >= \ + a->psdio_device->mp_aggr_pkt_limit)) + +/** SDIO Rx aggregation in progress ? */ +#define MP_RX_AGGR_IN_PROGRESS(a) (a->mpa_rx.pkt_cnt > 0) + +/** SDIO Rx aggregation buffer room for next packet ? */ +#define MP_RX_AGGR_BUF_HAS_ROOM(a, rx_len) \ + ((a->mpa_rx.buf_len + rx_len) <= a->mpa_rx.buf_size) + +/** Prepare to copy current packet from card to SDIO Rx aggregation buffer */ +#define MP_RX_AGGR_SETUP_NEWMODE(a, mbuf, port, rx_len) do { \ + a->mpa_rx.buf_len += rx_len; \ + if (!a->mpa_rx.pkt_cnt) { \ + a->mpa_rx.start_port = port; \ + } \ + a->mpa_rx.ports |= (1 << port); \ + a->mpa_rx.mbuf_arr[a->mpa_rx.pkt_cnt] = mbuf; \ + a->mpa_rx.len_arr[a->mpa_rx.pkt_cnt] = rx_len; \ + a->mpa_rx.pkt_cnt++; \ +} while (0); + +#define MP_RX_AGGR_SETUP_NONEWMODE(a, mbuf, port, rx_len) do { \ + a->mpa_rx.buf_len += rx_len; \ + if (!a->mpa_rx.pkt_cnt) { \ + a->mpa_rx.start_port = port; \ + } \ + if (a->mpa_rx.start_port <= port) { \ + a->mpa_rx.ports |= (1 << (a->mpa_rx.pkt_cnt)); \ + } else { \ + a->mpa_rx.ports |= (1 << (a->mpa_rx.pkt_cnt + 1)); \ + } \ + a->mpa_rx.mbuf_arr[a->mpa_rx.pkt_cnt] = mbuf; \ + a->mpa_rx.len_arr[a->mpa_rx.pkt_cnt] = rx_len; \ + a->mpa_rx.pkt_cnt++; \ +} while (0); + +/** Reset SDIO Rx aggregation buffer parameters */ +#define MP_RX_AGGR_BUF_RESET(a) do { \ + a->mpa_rx.pkt_cnt = 0; \ + a->mpa_rx.buf_len = 0; \ + a->mpa_rx.ports = 0; \ + a->mpa_rx.start_port = 0; \ +} while (0) + +#endif /* SDIO_MULTI_PORT_RX_AGGR */ + +static const struct _mlan_sdio_card_reg mlan_reg_sd87xx = { + .start_rd_port = 1, + .start_wr_port = 1, + .base_0_reg = 0x40, // 0x0040, + .base_1_reg = 0x41, // 0x0041, + .poll_reg = 0x30, + .host_int_enable = UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK, + .host_int_status = DN_LD_HOST_INT_STATUS | UP_LD_HOST_INT_STATUS, + .status_reg_0 = 0x60, + .status_reg_1 = 0x61, + .sdio_int_mask = 0x3f, + .data_port_mask = 0x0000fffe, + .max_mp_regs = 64, + .rd_bitmap_l = 0x04, + .rd_bitmap_u = 0x05, + .wr_bitmap_l = 0x06, + .wr_bitmap_u = 0x07, + .rd_len_p0_l = 0x08, + .rd_len_p0_u = 0x09, + .card_misc_cfg_reg = 0x6c, +}; + +static const struct _mlan_sdio_card_reg mlan_reg_sd8887 = { + .start_rd_port = 0, + .start_wr_port = 0, + .base_0_reg = 0x6C, + .base_1_reg = 0x6D, + .poll_reg = 0x5C, + .host_int_enable = UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK | + CMD_PORT_UPLD_INT_MASK | CMD_PORT_DNLD_INT_MASK, + .host_int_status = DN_LD_HOST_INT_STATUS | UP_LD_HOST_INT_STATUS | + DN_LD_CMD_PORT_HOST_INT_STATUS | UP_LD_CMD_PORT_HOST_INT_STATUS, + .status_reg_0 = 0x90, + .status_reg_1 = 0x91, + .sdio_int_mask = 0xff, + .data_port_mask = 0xffffffff, + .max_mp_regs = 196, + .rd_bitmap_l = 0x10, + .rd_bitmap_u = 0x11, + .rd_bitmap_1l = 0x12, + .rd_bitmap_1u = 0x13, + .wr_bitmap_l = 0x14, + .wr_bitmap_u = 0x15, + .wr_bitmap_1l = 0x16, + .wr_bitmap_1u = 0x17, + .rd_len_p0_l = 0x18, + .rd_len_p0_u = 0x19, + .card_misc_cfg_reg = 0xD8, +}; + +static const struct _mlan_sdio_card_reg mlan_reg_sd8897 = { + .start_rd_port = 0, + .start_wr_port = 0, + .base_0_reg = 0x60, + .base_1_reg = 0x61, + .poll_reg = 0x50, + .host_int_enable = UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK | + CMD_PORT_UPLD_INT_MASK | CMD_PORT_DNLD_INT_MASK, + .host_int_status = DN_LD_HOST_INT_STATUS | UP_LD_HOST_INT_STATUS | + DN_LD_CMD_PORT_HOST_INT_STATUS | UP_LD_CMD_PORT_HOST_INT_STATUS, + .status_reg_0 = 0xC0, + .status_reg_1 = 0xC1, + .sdio_int_mask = 0xff, + .data_port_mask = 0xffffffff, + .max_mp_regs = 184, + .rd_bitmap_l = 0x04, + .rd_bitmap_u = 0x05, + .rd_bitmap_1l = 0x06, + .rd_bitmap_1u = 0x07, + .wr_bitmap_l = 0x08, + .wr_bitmap_u = 0x09, + .wr_bitmap_1l = 0x0A, + .wr_bitmap_1u = 0x0B, + .rd_len_p0_l = 0x0C, + .rd_len_p0_u = 0x0D, + .card_misc_cfg_reg = 0xCC, +}; + +/** ampdu info for general card */ +static struct _ampdu_info ampdu_info_nov15 = { + .ampdu_sta_txwinsize = MLAN_STA_AMPDU_DEF_TXWINSIZE_NOV15, + .ampdu_uap_txwinsize = MLAN_UAP_AMPDU_DEF_TXWINSIZE_NOV15, + .ampdu_uap_rxwinsize = MLAN_UAP_AMPDU_DEF_RXWINSIZE_NOV15, + .ampdu_wfd_txrxwinsize = MLAN_WFD_AMPDU_DEF_TXRXWINSIZE_NOV15, +}; + +/** ampdu info for sd8887 and sd8897 */ +static struct _ampdu_info ampdu_info_v15 = { + .ampdu_sta_txwinsize = MLAN_STA_AMPDU_DEF_TXWINSIZE, + .ampdu_uap_txwinsize = MLAN_UAP_AMPDU_DEF_TXWINSIZE, + .ampdu_uap_rxwinsize = MLAN_UAP_AMPDU_DEF_RXWINSIZE, + .ampdu_wfd_txrxwinsize = MLAN_WFD_AMPDU_DEF_TXRXWINSIZE, +}; + +/** aggr buf size 32k */ +#define SDIO_MP_AGGR_BUF_SIZE_32K (32768) +/** max aggr buf size 64k-256 */ +#define SDIO_MP_AGGR_BUF_SIZE_MAX (65280) + +static const struct _mlan_sdio_device mlan_sdio_sd8777 = { + .reg = &mlan_reg_sd87xx, + .max_ports = 16, + .mp_aggr_pkt_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT_8, + .supports_sdio_new_mode = MFALSE, + .has_control_mask = MTRUE, + .io_port_0_reg = 0x78, + .io_port_1_reg = 0x79, + .io_port_2_reg = 0x7A, + .host_int_rsr_reg = 0x01, + .card_rx_len_reg = 0x62, + .card_rx_unit_reg = 0x63, + .host_int_mask_reg = 0x02, + .host_int_status_reg = 0x03, + .mp_tx_aggr_buf_size = SDIO_MP_AGGR_BUF_SIZE_32K, + .mp_rx_aggr_buf_size = SDIO_MP_AGGR_BUF_SIZE_32K, + .max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K, + .driver_supplicant_auth = 0, + .v15_update = 0, + .v15_fw_api = 0, + .ext_scan = 1, + .ampdu_info = &du_info_nov15, +}; + +static const struct _mlan_sdio_device mlan_sdio_sd8787 = { + .reg = &mlan_reg_sd87xx, + .max_ports = 16, + .mp_aggr_pkt_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT_8, + .supports_sdio_new_mode = MFALSE, + .has_control_mask = MTRUE, + .io_port_0_reg = 0x78, + .io_port_1_reg = 0x79, + .io_port_2_reg = 0x7A, + .host_int_rsr_reg = 0x01, + .card_rx_len_reg = 0x62, + .card_rx_unit_reg = 0x63, + .host_int_mask_reg = 0x02, + .host_int_status_reg = 0x03, + .mp_tx_aggr_buf_size = SDIO_MP_AGGR_BUF_SIZE_32K, + .mp_rx_aggr_buf_size = SDIO_MP_AGGR_BUF_SIZE_32K, + .max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K, + .driver_supplicant_auth = 0, + .v15_update = 0, + .v15_fw_api = 0, + .ext_scan = 1, + .ampdu_info = &du_info_nov15, +}; + +static const struct _mlan_sdio_device mlan_sdio_sd8797 = { + .reg = &mlan_reg_sd87xx, + .max_ports = 16, + .mp_aggr_pkt_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT_8, + .supports_sdio_new_mode = MFALSE, + .has_control_mask = MTRUE, + .io_port_0_reg = 0x78, + .io_port_1_reg = 0x79, + .io_port_2_reg = 0x7A, + .host_int_rsr_reg = 0x01, + .card_rx_len_reg = 0x62, + .card_rx_unit_reg = 0x63, + .host_int_mask_reg = 0x02, + .host_int_status_reg = 0x03, + .mp_tx_aggr_buf_size = SDIO_MP_AGGR_BUF_SIZE_32K, + .mp_rx_aggr_buf_size = SDIO_MP_AGGR_BUF_SIZE_32K, + .max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K, + .driver_supplicant_auth = 0, + .v15_update = 0, + .v15_fw_api = 0, + .ext_scan = 1, + .ampdu_info = &du_info_nov15, +}; + +static const struct _mlan_sdio_device mlan_sdio_sd8887 = { + .reg = &mlan_reg_sd8887, + .max_ports = 32, + .mp_aggr_pkt_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT_16, + .supports_sdio_new_mode = MTRUE, + .has_control_mask = MFALSE, + .card_config_2_1_reg = 0xD9, + .cmd_config_0 = 0xC4, + .cmd_config_1 = 0xC5, + .cmd_rd_len_0 = 0xC0, + .cmd_rd_len_1 = 0xC1, + .io_port_0_reg = 0xE4, + .io_port_1_reg = 0xE5, + .io_port_2_reg = 0xE6, + .host_int_rsr_reg = 0x04, + .card_rx_len_reg = 0x92, + .card_rx_unit_reg = 0x93, + .host_int_mask_reg = 0x08, + .host_int_status_reg = 0x0C, + .mp_tx_aggr_buf_size = SDIO_MP_AGGR_BUF_SIZE_MAX, + .mp_rx_aggr_buf_size = SDIO_MP_AGGR_BUF_SIZE_MAX, + .max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K, + .driver_supplicant_auth = 0, + .v15_update = 1, + .v15_fw_api = 1, + .ext_scan = 1, + .ampdu_info = &du_info_v15, +}; + +static const struct _mlan_sdio_device mlan_sdio_sd8801 = { + .reg = &mlan_reg_sd87xx, + .max_ports = 16, + .mp_aggr_pkt_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT_8, + .supports_sdio_new_mode = MFALSE, + .has_control_mask = MTRUE, + .io_port_0_reg = 0x78, + .io_port_1_reg = 0x79, + .io_port_2_reg = 0x7A, + .host_int_rsr_reg = 0x01, + .card_rx_len_reg = 0x62, + .card_rx_unit_reg = 0x63, + .host_int_mask_reg = 0x02, + .host_int_status_reg = 0x03, + .mp_tx_aggr_buf_size = SDIO_MP_AGGR_BUF_SIZE_32K, + .mp_rx_aggr_buf_size = SDIO_MP_AGGR_BUF_SIZE_32K, + .max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K, + .driver_supplicant_auth = 1, + .v15_update = 0, + .v15_fw_api = 0, + .ext_scan = 1, + .ampdu_info = &du_info_nov15, +}; + +static const struct _mlan_sdio_device mlan_sdio_sd8897 = { + .reg = &mlan_reg_sd8897, + .max_ports = 32, + .mp_aggr_pkt_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT_16, + .supports_sdio_new_mode = MTRUE, + .has_control_mask = MFALSE, + .card_config_2_1_reg = 0xCD, + .cmd_config_0 = 0xB8, + .cmd_config_1 = 0xB9, + .cmd_rd_len_0 = 0xB4, + .cmd_rd_len_1 = 0xB5, + .io_port_0_reg = 0xD8, + .io_port_1_reg = 0xD9, + .io_port_2_reg = 0xDA, + .host_int_rsr_reg = 0x01, + .card_rx_len_reg = 0xC2, + .card_rx_unit_reg = 0xC3, + .host_int_mask_reg = 0x02, + .host_int_status_reg = 0x03, + .mp_tx_aggr_buf_size = SDIO_MP_AGGR_BUF_SIZE_MAX, + .mp_rx_aggr_buf_size = SDIO_MP_AGGR_BUF_SIZE_MAX, + .max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_4K, + .driver_supplicant_auth = 0, + .v15_update = 1, + .v15_fw_api = 1, + .ext_scan = 1, + .ampdu_info = &du_info_v15, +}; + +/** Enable host interrupt */ +mlan_status wlan_enable_host_int(pmlan_adapter pmadapter); +/** Probe and initialization function */ +mlan_status wlan_sdio_probe(pmlan_adapter pmadapter); +mlan_status wlan_get_sdio_device(pmlan_adapter pmadapter); +/** multi interface download check */ +mlan_status wlan_check_winner_status(mlan_adapter *pmadapter, t_u32 *val); + +#ifdef SDIO_MULTI_PORT_TX_AGGR +mlan_status wlan_send_mp_aggr_buf(mlan_adapter *pmadapter); +#endif +/** Firmware status check */ +mlan_status wlan_check_fw_status(mlan_adapter *pmadapter, t_u32 pollnum); +/** Read interrupt status */ +t_void wlan_interrupt(pmlan_adapter pmadapter); +/** Process Interrupt Status */ +mlan_status wlan_process_int_status(mlan_adapter *pmadapter); +/** Transfer data to card */ +mlan_status wlan_sdio_host_to_card(mlan_adapter *pmadapter, t_u8 type, + mlan_buffer *mbuf, mlan_tx_param *tx_param); +mlan_status wlan_set_sdio_gpio_int(IN pmlan_private priv); +mlan_status wlan_cmd_sdio_gpio_int(pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf); +#endif /* _MLAN_SDIO_H */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_shim.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_shim.c new file mode 100644 index 00000000..b20c7324 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_shim.c @@ -0,0 +1,1294 @@ +/** @file mlan_shim.c + * + * @brief This file contains APIs to MOAL module. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/******************************************************** +Change log: + 10/13/2008: initial version +********************************************************/ + +#include "mlan.h" +#ifdef STA_SUPPORT +#include "mlan_join.h" +#endif +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_wmm.h" +#include "mlan_sdio.h" +#ifdef UAP_SUPPORT +#include "mlan_uap.h" +#endif +#include "mlan_11h.h" + +/******************************************************** + Local Variables +********************************************************/ + +/******************************************************** + Global Variables +********************************************************/ +#ifdef STA_SUPPORT +mlan_operations mlan_sta_ops = { + /* init cmd handler */ + wlan_ops_sta_init_cmd, + /* ioctl handler */ + wlan_ops_sta_ioctl, + /* cmd handler */ + wlan_ops_sta_prepare_cmd, + /* cmdresp handler */ + wlan_ops_sta_process_cmdresp, + /* rx handler */ + wlan_ops_sta_process_rx_packet, + /* Event handler */ + wlan_ops_sta_process_event, + /* txpd handler */ + wlan_ops_sta_process_txpd, + /* BSS role: STA */ + MLAN_BSS_ROLE_STA, +}; +#endif +#ifdef UAP_SUPPORT +mlan_operations mlan_uap_ops = { + /* init cmd handler */ + wlan_ops_uap_init_cmd, + /* ioctl handler */ + wlan_ops_uap_ioctl, + /* cmd handler */ + wlan_ops_uap_prepare_cmd, + /* cmdresp handler */ + wlan_ops_uap_process_cmdresp, + /* rx handler */ + wlan_ops_uap_process_rx_packet, + /* Event handler */ + wlan_ops_uap_process_event, + /* txpd handler */ + wlan_ops_uap_process_txpd, + /* BSS role: uAP */ + MLAN_BSS_ROLE_UAP, +}; +#endif + +/** mlan function table */ +mlan_operations *mlan_ops[] = { +#ifdef STA_SUPPORT + &mlan_sta_ops, +#endif +#ifdef UAP_SUPPORT + &mlan_uap_ops, +#endif + MNULL, +}; + +/** Global moal_assert callback */ +t_void (*assert_callback) (IN t_void *pmoal_handle, IN t_u32 cond) = MNULL; +#ifdef DEBUG_LEVEL1 +#ifdef DEBUG_LEVEL2 +#define DEFAULT_DEBUG_MASK (0xffffffff) +#else +#define DEFAULT_DEBUG_MASK (MMSG | MFATAL | MERROR) +#endif + +/** Global moal_print callback */ +t_void (*print_callback) (IN t_void *pmoal_handle, + IN t_u32 level, IN char *pformat, IN ... + ) = MNULL; + +/** Global moal_get_system_time callback */ +mlan_status (*get_sys_time_callback) (IN t_void *pmoal_handle, + OUT t_u32 *psec, + OUT t_u32 *pusec) = MNULL; + +/** Global driver debug mit masks */ +t_u32 mlan_drvdbg = DEFAULT_DEBUG_MASK; +#endif + +/******************************************************** + Local Functions +*******************************************************/ + +/******************************************************** + Global Functions +********************************************************/ + +/** + * @brief This function registers MOAL to MLAN module. + * + * @param pmdevice A pointer to a mlan_device structure + * allocated in MOAL + * @param ppmlan_adapter A pointer to a t_void pointer to store + * mlan_adapter structure pointer as the context + * + * @return MLAN_STATUS_SUCCESS + * The registration succeeded. + * MLAN_STATUS_FAILURE + * The registration failed. + * + * mlan_status mlan_register ( + * IN pmlan_device pmdevice, + * OUT t_void **ppmlan_adapter + * ); + * + * Comments + * MOAL constructs mlan_device data structure to pass moal_handle and + * mlan_callback table to MLAN. MLAN returns mlan_adapter pointer to + * the ppmlan_adapter buffer provided by MOAL. + * Headers: + * declared in mlan_decl.h + * See Also + * mlan_unregister + */ +mlan_status +mlan_register(IN pmlan_device pmdevice, OUT t_void **ppmlan_adapter) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_adapter pmadapter = MNULL; + pmlan_callbacks pcb = MNULL; + t_u8 i = 0; + t_u32 j = 0; + + MASSERT(pmdevice); + MASSERT(ppmlan_adapter); + MASSERT(pmdevice->callbacks.moal_print); +#ifdef DEBUG_LEVEL1 + print_callback = pmdevice->callbacks.moal_print; + get_sys_time_callback = pmdevice->callbacks.moal_get_system_time; +#endif + assert_callback = pmdevice->callbacks.moal_assert; + + ENTER(); + + MASSERT(pmdevice->callbacks.moal_malloc); + MASSERT(pmdevice->callbacks.moal_memset); + MASSERT(pmdevice->callbacks.moal_memmove); + + /* Allocate memory for adapter structure */ + if (pmdevice->callbacks.moal_vmalloc && pmdevice->callbacks.moal_vfree) + ret = pmdevice->callbacks.moal_vmalloc(pmdevice->pmoal_handle, + sizeof(mlan_adapter), + (t_u8 **)&pmadapter); + else + ret = pmdevice->callbacks.moal_malloc(pmdevice->pmoal_handle, + sizeof(mlan_adapter), + MLAN_MEM_DEF, + (t_u8 **)&pmadapter); + if ((ret != MLAN_STATUS_SUCCESS) || !pmadapter) { + ret = MLAN_STATUS_FAILURE; + goto exit_register; + } + + pmdevice->callbacks.moal_memset(pmdevice->pmoal_handle, pmadapter, + 0, sizeof(mlan_adapter)); + + pcb = &pmadapter->callbacks; + + /* Save callback functions */ + pmdevice->callbacks.moal_memmove(pmadapter->pmoal_handle, pcb, + &pmdevice->callbacks, + sizeof(mlan_callbacks)); + + /* Assertion for all callback functions */ + MASSERT(pcb->moal_init_fw_complete); + MASSERT(pcb->moal_shutdown_fw_complete); + MASSERT(pcb->moal_send_packet_complete); + MASSERT(pcb->moal_recv_packet); + MASSERT(pcb->moal_recv_event); + MASSERT(pcb->moal_ioctl_complete); + + MASSERT(pcb->moal_write_reg); + MASSERT(pcb->moal_read_reg); + MASSERT(pcb->moal_alloc_mlan_buffer); + MASSERT(pcb->moal_free_mlan_buffer); + MASSERT(pcb->moal_write_data_sync); + MASSERT(pcb->moal_read_data_sync); + MASSERT(pcb->moal_mfree); + MASSERT(pcb->moal_memcpy); + MASSERT(pcb->moal_memcmp); + MASSERT(pcb->moal_get_system_time); + MASSERT(pcb->moal_init_timer); + MASSERT(pcb->moal_free_timer); + MASSERT(pcb->moal_start_timer); + MASSERT(pcb->moal_stop_timer); + MASSERT(pcb->moal_init_lock); + MASSERT(pcb->moal_free_lock); + MASSERT(pcb->moal_spin_lock); + MASSERT(pcb->moal_spin_unlock); + MASSERT(pcb->moal_tcp_ack_tx_ind); + MASSERT(pcb->moal_hist_data_add); + MASSERT(pcb->moal_updata_peer_signal); + /* Save pmoal_handle */ + pmadapter->pmoal_handle = pmdevice->pmoal_handle; + + pmadapter->feature_control = pmdevice->feature_control; + + if ((pmdevice->int_mode == INT_MODE_GPIO) && (pmdevice->gpio_pin == 0)) { + PRINTM(MERROR, "SDIO_GPIO_INT_CONFIG: Invalid GPIO Pin\n"); + ret = MLAN_STATUS_FAILURE; + goto error; + } + pmadapter->init_para.int_mode = pmdevice->int_mode; + pmadapter->init_para.gpio_pin = pmdevice->gpio_pin; + pmadapter->card_type = pmdevice->card_type; + + ret = wlan_get_sdio_device(pmadapter); + if (MLAN_STATUS_SUCCESS != ret) { + ret = MLAN_STATUS_FAILURE; + goto error; + } + /* card specific probing has been deferred until now .. */ + ret = wlan_sdio_probe(pmadapter); + if (MLAN_STATUS_SUCCESS != ret) { + ret = MLAN_STATUS_FAILURE; + goto error; + } +#ifdef DEBUG_LEVEL1 + mlan_drvdbg = pmdevice->drvdbg; +#endif + +#ifdef MFG_CMD_SUPPORT + pmadapter->init_para.mfg_mode = pmdevice->mfg_mode; +#endif +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + pmadapter->max_segs = pmdevice->max_segs; + pmadapter->max_seg_size = pmdevice->max_seg_size; +#endif + +#ifdef SDIO_MULTI_PORT_TX_AGGR + pmadapter->init_para.mpa_tx_cfg = pmdevice->mpa_tx_cfg; +#endif +#ifdef SDIO_MULTI_PORT_RX_AGGR + pmadapter->init_para.mpa_rx_cfg = pmdevice->mpa_rx_cfg; +#endif + pmadapter->init_para.auto_ds = pmdevice->auto_ds; + pmadapter->init_para.ps_mode = pmdevice->ps_mode; + if (pmdevice->max_tx_buf == MLAN_TX_DATA_BUF_SIZE_2K || + pmdevice->max_tx_buf == MLAN_TX_DATA_BUF_SIZE_4K || + pmdevice->max_tx_buf == MLAN_TX_DATA_BUF_SIZE_12K || + pmdevice->max_tx_buf == MLAN_TX_DATA_BUF_SIZE_8K) + pmadapter->init_para.max_tx_buf = pmdevice->max_tx_buf; +#ifdef STA_SUPPORT + pmadapter->init_para.cfg_11d = pmdevice->cfg_11d; +#else + pmadapter->init_para.cfg_11d = 0; +#endif + if (IS_DFS_SUPPORT(pmadapter->feature_control)) + pmadapter->init_para.dfs_master_radar_det_en = + DFS_MASTER_RADAR_DETECT_EN; + pmadapter->init_para.dfs_slave_radar_det_en = DFS_SLAVE_RADAR_DETECT_EN; + if (IS_SD8777(pmadapter->card_type) || IS_SD8787(pmadapter->card_type)) + pmadapter->init_para.fw_crc_check = pmdevice->fw_crc_check; + pmadapter->init_para.dev_cap_mask = pmdevice->dev_cap_mask; + pmadapter->rx_work_flag = pmdevice->rx_work; + + pmadapter->priv_num = 0; + for (i = 0; i < MLAN_MAX_BSS_NUM; i++) { + pmadapter->priv[i] = MNULL; + if (pmdevice->bss_attr[i].active == MTRUE) { + /* For valid bss_attr, allocate memory for private + structure */ + if (pcb->moal_vmalloc && pcb->moal_vfree) + ret = pcb->moal_vmalloc(pmadapter->pmoal_handle, + sizeof(mlan_private), + (t_u8 **)&pmadapter-> + priv[i]); + else + ret = pcb->moal_malloc(pmadapter->pmoal_handle, + sizeof(mlan_private), + MLAN_MEM_DEF, + (t_u8 **)&pmadapter-> + priv[i]); + if (ret != MLAN_STATUS_SUCCESS || !pmadapter->priv[i]) { + ret = MLAN_STATUS_FAILURE; + goto error; + } + + pmadapter->priv_num++; + memset(pmadapter, pmadapter->priv[i], 0, + sizeof(mlan_private)); + + pmadapter->priv[i]->adapter = pmadapter; + + /* Save bss_type, frame_type & bss_priority */ + pmadapter->priv[i]->bss_type = + (t_u8)pmdevice->bss_attr[i].bss_type; + pmadapter->priv[i]->frame_type = + (t_u8)pmdevice->bss_attr[i].frame_type; + pmadapter->priv[i]->bss_priority = + (t_u8)pmdevice->bss_attr[i].bss_priority; + if (pmdevice->bss_attr[i].bss_type == MLAN_BSS_TYPE_STA) + pmadapter->priv[i]->bss_role = + MLAN_BSS_ROLE_STA; + else if (pmdevice->bss_attr[i].bss_type == + MLAN_BSS_TYPE_UAP) + pmadapter->priv[i]->bss_role = + MLAN_BSS_ROLE_UAP; +#ifdef WIFI_DIRECT_SUPPORT + else if (pmdevice->bss_attr[i].bss_type == + MLAN_BSS_TYPE_WIFIDIRECT) { + pmadapter->priv[i]->bss_role = + MLAN_BSS_ROLE_STA; + if (pmdevice->bss_attr[i].bss_virtual) + pmadapter->priv[i]->bss_virtual = MTRUE; + } +#endif + /* Save bss_index and bss_num */ + pmadapter->priv[i]->bss_index = i; + pmadapter->priv[i]->bss_num = + (t_u8)pmdevice->bss_attr[i].bss_num; + + /* init function table */ + for (j = 0; mlan_ops[j]; j++) { + if (mlan_ops[j]->bss_role == + GET_BSS_ROLE(pmadapter->priv[i])) { + memcpy(pmadapter, + &pmadapter->priv[i]->ops, + mlan_ops[j], + sizeof(mlan_operations)); + } + } + } + } + + /* Initialize lock variables */ + if (wlan_init_lock_list(pmadapter) != MLAN_STATUS_SUCCESS) { + ret = MLAN_STATUS_FAILURE; + goto error; + } + + /* Allocate memory for member of adapter structure */ + if (wlan_allocate_adapter(pmadapter)) { + ret = MLAN_STATUS_FAILURE; + goto error; + } + + /* Initialize timers */ + if (wlan_init_timer(pmadapter) != MLAN_STATUS_SUCCESS) { + ret = MLAN_STATUS_FAILURE; + goto error; + } + /* Return pointer of mlan_adapter to MOAL */ + *ppmlan_adapter = pmadapter; + + goto exit_register; + +error: + PRINTM(MINFO, "Leave mlan_register with error\n"); + /* Free timers */ + wlan_free_timer(pmadapter); + /* Free adapter structure */ + wlan_free_adapter(pmadapter); + /* Free lock variables */ + wlan_free_lock_list(pmadapter); + for (i = 0; i < MLAN_MAX_BSS_NUM; i++) { + if (pmadapter->priv[i]) { + if (pcb->moal_vmalloc && pcb->moal_vfree) + pcb->moal_vfree(pmadapter->pmoal_handle, + (t_u8 *)pmadapter->priv[i]); + else + pcb->moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pmadapter->priv[i]); + } + } + if (pcb->moal_vmalloc && pcb->moal_vfree) + pcb->moal_vfree(pmadapter->pmoal_handle, (t_u8 *)pmadapter); + else + pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)pmadapter); + +exit_register: + LEAVE(); + return ret; +} + +/** + * @brief This function unregisters MOAL from MLAN module. + * + * @param pmlan_adapter A pointer to a mlan_device structure + * allocated in MOAL + * + * @return MLAN_STATUS_SUCCESS + * The deregistration succeeded. + */ +mlan_status +mlan_unregister(IN t_void *pmlan_adapter + ) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; + pmlan_callbacks pcb; + t_s32 i = 0; + + MASSERT(pmlan_adapter); + + ENTER(); + + pcb = &pmadapter->callbacks; + + /* Free adapter structure */ + wlan_free_adapter(pmadapter); + + /* Free timers */ + wlan_free_timer(pmadapter); + + /* Free lock variables */ + wlan_free_lock_list(pmadapter); + + /* Free private structures */ + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) { + if (pcb->moal_vmalloc && pcb->moal_vfree) + pcb->moal_vfree(pmadapter->pmoal_handle, + (t_u8 *)pmadapter->priv[i]); + else + pcb->moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)pmadapter->priv[i]); + } + } + + /* Free mlan_adapter */ + if (pcb->moal_vmalloc && pcb->moal_vfree) + pcb->moal_vfree(pmadapter->pmoal_handle, (t_u8 *)pmadapter); + else + pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)pmadapter); + + LEAVE(); + return ret; +} + +/** + * @brief This function downloads the firmware + * + * @param pmlan_adapter A pointer to a t_void pointer to store + * mlan_adapter structure pointer + * @param pmfw A pointer to firmware image + * + * @return MLAN_STATUS_SUCCESS + * The firmware download succeeded. + * MLAN_STATUS_FAILURE + * The firmware download failed. + */ +mlan_status +mlan_dnld_fw(IN t_void *pmlan_adapter, IN pmlan_fw_image pmfw) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; + t_u32 poll_num = 1; + t_u32 winner = 0; + + ENTER(); + MASSERT(pmlan_adapter); + + /* Card specific probing */ + ret = wlan_sdio_probe(pmadapter); + if (ret == MLAN_STATUS_FAILURE) { + PRINTM(MERROR, "WLAN SDIO probe failed\n", ret); + LEAVE(); + return ret; + } + + /* Check if firmware is already running */ + ret = wlan_check_fw_status(pmadapter, poll_num); + if (ret == MLAN_STATUS_SUCCESS) { + PRINTM(MMSG, "WLAN FW already running! Skip FW download\n"); + goto done; + } + poll_num = MAX_FIRMWARE_POLL_TRIES; + + /* Check if other interface is downloading */ + ret = wlan_check_winner_status(pmadapter, &winner); + if (ret == MLAN_STATUS_FAILURE) { + PRINTM(MFATAL, "WLAN read winner status failed!\n"); + goto done; + } + if (winner) { + PRINTM(MMSG, + "WLAN is not the winner (0x%x). Skip FW download\n", + winner); + poll_num = MAX_MULTI_INTERFACE_POLL_TRIES; + goto poll_fw; + } + + if (pmfw) { + /* Download helper/firmware */ + ret = wlan_dnld_fw(pmadapter, pmfw); + if (ret != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "wlan_dnld_fw fail ret=0x%x\n", ret); + LEAVE(); + return ret; + } + } + +poll_fw: + /* Check if the firmware is downloaded successfully or not */ + ret = wlan_check_fw_status(pmadapter, poll_num); + if (ret != MLAN_STATUS_SUCCESS) { + PRINTM(MFATAL, "FW failed to be active in time!\n"); + ret = MLAN_STATUS_FAILURE; + LEAVE(); + return ret; + } +done: + + /* re-enable host interrupt for mlan after fw dnld is successful */ + wlan_enable_host_int(pmadapter); + + LEAVE(); + return ret; +} + +/** + * @brief This function pass init param to MLAN + * + * @param pmlan_adapter A pointer to a t_void pointer to store + * mlan_adapter structure pointer + * @param pparam A pointer to mlan_init_param structure + * + * @return MLAN_STATUS_SUCCESS + * + */ +mlan_status +mlan_set_init_param(IN t_void *pmlan_adapter, IN pmlan_init_param pparam) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; + + ENTER(); + MASSERT(pmlan_adapter); + + /** Save cal data in MLAN */ + if ((pparam->pcal_data_buf) && (pparam->cal_data_len > 0)) { + pmadapter->pcal_data = pparam->pcal_data_buf; + pmadapter->cal_data_len = pparam->cal_data_len; + } + + LEAVE(); + return ret; +} + +/** + * @brief This function initializes the firmware + * + * @param pmlan_adapter A pointer to a t_void pointer to store + * mlan_adapter structure pointer + * + * @return MLAN_STATUS_SUCCESS + * The firmware initialization succeeded. + * MLAN_STATUS_PENDING + * The firmware initialization is pending. + * MLAN_STATUS_FAILURE + * The firmware initialization failed. + */ +mlan_status +mlan_init_fw(IN t_void *pmlan_adapter + ) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; + + ENTER(); + MASSERT(pmlan_adapter); + + pmadapter->hw_status = WlanHardwareStatusInitializing; + + /* Initialize firmware, may return PENDING */ + ret = wlan_init_fw(pmadapter); + PRINTM(MINFO, "wlan_init_fw returned ret=0x%x\n", ret); + + LEAVE(); + return ret; +} + +/** + * @brief Shutdown firmware + * + * @param pmlan_adapter A pointer to mlan_adapter structure + * + * @return MLAN_STATUS_SUCCESS + * The firmware shutdown call succeeded. + * MLAN_STATUS_PENDING + * The firmware shutdown call is pending. + * MLAN_STATUS_FAILURE + * The firmware shutdown call failed. + */ +mlan_status +mlan_shutdown_fw(IN t_void *pmlan_adapter + ) +{ + mlan_status ret = MLAN_STATUS_PENDING; + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; + pmlan_buffer pmbuf; + pmlan_callbacks pcb; + t_s32 i = 0; + + ENTER(); + + MASSERT(pmlan_adapter); + /* MLAN already shutdown */ + if (pmadapter->hw_status == WlanHardwareStatusNotReady) { + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + + pmadapter->hw_status = WlanHardwareStatusClosing; + /* Wait for mlan_process to complete */ + if (pmadapter->mlan_processing) { + PRINTM(MWARN, "MLAN main processing is still running\n"); + LEAVE(); + return ret; + } + + /* Shut down MLAN */ + PRINTM(MINFO, "Shutdown MLAN...\n"); + + /* Cancel all pending commands and complete ioctls */ + wlan_cancel_all_pending_cmd(pmadapter); + + /* Clean up priv structures */ + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) + wlan_free_priv(pmadapter->priv[i]); + } + + pcb = &pmadapter->callbacks; + + while ((pmbuf = (pmlan_buffer)util_dequeue_list(pmadapter->pmoal_handle, + &pmadapter-> + rx_data_queue, + pcb->moal_spin_lock, + pcb-> + moal_spin_unlock))) { + wlan_free_mlan_buffer(pmadapter, pmbuf); + } + pmadapter->rx_pkts_queued = 0; + + /* Notify completion */ + ret = wlan_shutdown_fw_complete(pmadapter); + + LEAVE(); + return ret; +} + +/** + * @brief queue main work + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return N/A + */ +static t_void +mlan_queue_main_work(mlan_adapter *pmadapter) +{ + pmlan_callbacks pcb = &pmadapter->callbacks; + ENTER(); + pcb->moal_spin_lock(pmadapter->pmoal_handle, + pmadapter->pmain_proc_lock); + + /* Check if already processing */ + if (pmadapter->mlan_processing) { + pmadapter->more_task_flag = MTRUE; + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->pmain_proc_lock); + } else { + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->pmain_proc_lock); + wlan_recv_event(wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY), + MLAN_EVENT_ID_DRV_DEFER_HANDLING, MNULL); + } + LEAVE(); + return; +} + +/** + * @brief queue rx_work + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return N/A + */ +static t_void +mlan_queue_rx_work(mlan_adapter *pmadapter) +{ + pmlan_callbacks pcb = &pmadapter->callbacks; + ENTER(); + + pcb->moal_spin_lock(pmadapter->pmoal_handle, pmadapter->prx_proc_lock); + + /* Check if already processing */ + if (pmadapter->mlan_rx_processing) { + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->prx_proc_lock); + } else { + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->prx_proc_lock); + wlan_recv_event(wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY), + MLAN_EVENT_ID_DRV_DEFER_RX_WORK, MNULL); + } + LEAVE(); + return; +} + +/** + * @brief block main process + * + * @param pmadapter A pointer to mlan_adapter structure + * @param block MTRUE/MFALSE + * + * @return N/A + */ +void +mlan_block_main_process(mlan_adapter *pmadapter, t_u8 block) +{ + pmlan_callbacks pcb = &pmadapter->callbacks; + pcb->moal_spin_lock(pmadapter->pmoal_handle, + pmadapter->pmain_proc_lock); + if (!block) { + pmadapter->main_lock_flag = MFALSE; + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->pmain_proc_lock); + } else { + pmadapter->main_lock_flag = MTRUE; + if (pmadapter->mlan_processing) { + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->pmain_proc_lock); + PRINTM(MEVENT, "wlan: wait main work done...\n"); + wlan_recv_event(wlan_get_priv + (pmadapter, MLAN_BSS_ROLE_ANY), + MLAN_EVENT_ID_DRV_FLUSH_MAIN_WORK, + MNULL); + } else { + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->pmain_proc_lock); + } + } +} + +/** + * @brief block rx process + * + * @param pmadapter A pointer to mlan_adapter structure + * @param block MTRUE/MFALSE; + * + * @return N/A + */ +void +mlan_block_rx_process(mlan_adapter *pmadapter, t_u8 block) +{ + pmlan_callbacks pcb = &pmadapter->callbacks; + pcb->moal_spin_lock(pmadapter->pmoal_handle, pmadapter->prx_proc_lock); + if (!block) { + pmadapter->rx_lock_flag = MFALSE; + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->prx_proc_lock); + } else { + pmadapter->rx_lock_flag = MTRUE; + if (pmadapter->mlan_rx_processing) { + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->prx_proc_lock); + PRINTM(MEVENT, "wlan: wait rx work done...\n"); + wlan_recv_event(wlan_get_priv + (pmadapter, MLAN_BSS_ROLE_ANY), + MLAN_EVENT_ID_DRV_FLUSH_RX_WORK, MNULL); + } else { + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->prx_proc_lock); + } + } +} + +/** + * @brief The receive process + * + * @param pmlan_adapter A pointer to mlan_adapter structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +mlan_rx_process(IN t_void *pmlan_adapter + ) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; + pmlan_callbacks pcb; + pmlan_buffer pmbuf; + + ENTER(); + + MASSERT(pmlan_adapter); + pcb = &pmadapter->callbacks; + pcb->moal_spin_lock(pmadapter->pmoal_handle, pmadapter->prx_proc_lock); + if (pmadapter->mlan_rx_processing || pmadapter->rx_lock_flag) { + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->prx_proc_lock); + goto exit_rx_proc; + } else { + pmadapter->mlan_rx_processing = MTRUE; + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->prx_proc_lock); + } + /* Check for Rx data */ + while (MTRUE) { + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + pmadapter->rx_data_queue. + plock); + pmbuf = (pmlan_buffer)util_dequeue_list(pmadapter->pmoal_handle, + &pmadapter-> + rx_data_queue, MNULL, + MNULL); + if (!pmbuf) { + pmadapter->callbacks.moal_spin_unlock(pmadapter-> + pmoal_handle, + pmadapter-> + rx_data_queue. + plock); + break; + } + pmadapter->rx_pkts_queued--; + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->rx_data_queue. + plock); + if (pmadapter->delay_task_flag && + (pmadapter->rx_pkts_queued < LOW_RX_PENDING)) { + PRINTM(MEVENT, "Run\n"); + pmadapter->delay_task_flag = MFALSE; + mlan_queue_main_work(pmadapter); + } + wlan_handle_rx_packet(pmadapter, pmbuf); + } + pcb->moal_spin_lock(pmadapter->pmoal_handle, pmadapter->prx_proc_lock); + pmadapter->mlan_rx_processing = MFALSE; + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->prx_proc_lock); +exit_rx_proc: + LEAVE(); + return ret; +} + +/** + * @brief The main process + * + * @param pmlan_adapter A pointer to mlan_adapter structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +mlan_main_process(IN t_void *pmlan_adapter + ) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; + pmlan_callbacks pcb; + + ENTER(); + + MASSERT(pmlan_adapter); + + pcb = &pmadapter->callbacks; + + pcb->moal_spin_lock(pmadapter->pmoal_handle, + pmadapter->pmain_proc_lock); + + /* Check if already processing */ + if (pmadapter->mlan_processing || pmadapter->main_lock_flag) { + pmadapter->more_task_flag = MTRUE; + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->pmain_proc_lock); + goto exit_main_proc; + } else { + pmadapter->mlan_processing = MTRUE; + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->pmain_proc_lock); + } +process_start: + do { + /* Is MLAN shutting down or not ready? */ + if ((pmadapter->hw_status == WlanHardwareStatusClosing) || + (pmadapter->hw_status == WlanHardwareStatusNotReady)) + break; + if (pmadapter->rx_pkts_queued > HIGH_RX_PENDING) { + PRINTM(MEVENT, "Pause\n"); + pmadapter->delay_task_flag = MTRUE; + mlan_queue_rx_work(pmadapter); + break; + } + /* Handle pending SDIO interrupts if any */ + if (pmadapter->sdio_ireg) { + if (pmadapter->hs_activated == MTRUE) + wlan_process_hs_config(pmadapter); + wlan_process_int_status(pmadapter); + if (pmadapter->data_received && pmadapter->rx_work_flag) + mlan_queue_rx_work(pmadapter); + } + /* Need to wake up the card ? */ + if ((pmadapter->ps_state == PS_STATE_SLEEP) && + (pmadapter->pm_wakeup_card_req && + !pmadapter->pm_wakeup_fw_try) && + (util_peek_list + (pmadapter->pmoal_handle, &pmadapter->cmd_pending_q, + pcb->moal_spin_lock, pcb->moal_spin_unlock) + || !wlan_bypass_tx_list_empty(pmadapter) + || !wlan_wmm_lists_empty(pmadapter) + )) { + wlan_pm_wakeup_card(pmadapter); + pmadapter->pm_wakeup_fw_try = MTRUE; + continue; + } + if (IS_CARD_RX_RCVD(pmadapter)) { + pmadapter->data_received = MFALSE; + if (pmadapter->hs_activated == MTRUE) { + pmadapter->is_hs_configured = MFALSE; + wlan_host_sleep_activated_event(wlan_get_priv + (pmadapter, + MLAN_BSS_ROLE_ANY), + MFALSE); + } + pmadapter->pm_wakeup_fw_try = MFALSE; + if (pmadapter->ps_state == PS_STATE_SLEEP) + pmadapter->ps_state = PS_STATE_AWAKE; + } else { + /* We have tried to wakeup the card already */ + if (pmadapter->pm_wakeup_fw_try) + break; + if (pmadapter->ps_state != PS_STATE_AWAKE || + (pmadapter->tx_lock_flag == MTRUE)) + break; + + if (pmadapter->data_sent + || wlan_is_tdls_link_chan_switching(pmadapter-> + tdls_status) + || (wlan_bypass_tx_list_empty(pmadapter) && + wlan_wmm_lists_empty(pmadapter)) + || wlan_11h_radar_detected_tx_blocked(pmadapter) + ) { + if (pmadapter->cmd_sent || pmadapter->curr_cmd + || !wlan_is_send_cmd_allowed(pmadapter-> + tdls_status) || + (!util_peek_list + (pmadapter->pmoal_handle, + &pmadapter->cmd_pending_q, + pcb->moal_spin_lock, + pcb->moal_spin_unlock))) { + break; + } + } + } + + /* Check for Cmd Resp */ + if (pmadapter->cmd_resp_received) { + pmadapter->cmd_resp_received = MFALSE; + wlan_process_cmdresp(pmadapter); + + /* call moal back when init_fw is done */ + if (pmadapter->hw_status == WlanHardwareStatusInitdone) { + pmadapter->hw_status = WlanHardwareStatusReady; + wlan_init_fw_complete(pmadapter); + } + } + + /* Check for event */ + if (pmadapter->event_received) { + pmadapter->event_received = MFALSE; + wlan_process_event(pmadapter); + } + + /* Check if we need to confirm Sleep Request received + previously */ + if (pmadapter->ps_state == PS_STATE_PRE_SLEEP) + if (!pmadapter->cmd_sent && !pmadapter->curr_cmd) + wlan_check_ps_cond(pmadapter); + + /* + * The ps_state may have been changed during processing of + * Sleep Request event. + */ + if ((pmadapter->ps_state == PS_STATE_SLEEP) + || (pmadapter->ps_state == PS_STATE_PRE_SLEEP) + || (pmadapter->ps_state == PS_STATE_SLEEP_CFM) + || (pmadapter->tx_lock_flag == MTRUE) + ) { + continue; + } + + if (!pmadapter->cmd_sent && !pmadapter->curr_cmd + && wlan_is_send_cmd_allowed(pmadapter->tdls_status) + ) { + if (wlan_exec_next_cmd(pmadapter) == + MLAN_STATUS_FAILURE) { + ret = MLAN_STATUS_FAILURE; + break; + } + } + + if (!pmadapter->data_sent && + !wlan_11h_radar_detected_tx_blocked(pmadapter) && + !wlan_is_tdls_link_chan_switching(pmadapter->tdls_status) && + !wlan_bypass_tx_list_empty(pmadapter)) { + PRINTM(MINFO, "mlan_send_pkt(): deq(bybass_txq)\n"); + wlan_process_bypass_tx(pmadapter); + if (pmadapter->hs_activated == MTRUE) { + pmadapter->is_hs_configured = MFALSE; + wlan_host_sleep_activated_event(wlan_get_priv + (pmadapter, + MLAN_BSS_ROLE_ANY), + MFALSE); + } + } + + if (!pmadapter->data_sent && !wlan_wmm_lists_empty(pmadapter) + && !wlan_11h_radar_detected_tx_blocked(pmadapter) + && !wlan_is_tdls_link_chan_switching(pmadapter->tdls_status) + ) { + wlan_wmm_process_tx(pmadapter); + if (pmadapter->hs_activated == MTRUE) { + pmadapter->is_hs_configured = MFALSE; + wlan_host_sleep_activated_event(wlan_get_priv + (pmadapter, + MLAN_BSS_ROLE_ANY), + MFALSE); + } + } + +#ifdef STA_SUPPORT + if (pmadapter->delay_null_pkt && !pmadapter->cmd_sent && + !pmadapter->curr_cmd && !IS_COMMAND_PENDING(pmadapter) && + wlan_bypass_tx_list_empty(pmadapter) && + wlan_wmm_lists_empty(pmadapter)) { + if (wlan_send_null_packet + (wlan_get_priv(pmadapter, MLAN_BSS_ROLE_STA), + MRVDRV_TxPD_POWER_MGMT_NULL_PACKET | + MRVDRV_TxPD_POWER_MGMT_LAST_PACKET) + == MLAN_STATUS_SUCCESS) { + pmadapter->delay_null_pkt = MFALSE; + } + break; + } +#endif + + } while (MTRUE); + + pcb->moal_spin_lock(pmadapter->pmoal_handle, + pmadapter->pmain_proc_lock); + if (pmadapter->more_task_flag == MTRUE) { + pmadapter->more_task_flag = MFALSE; + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->pmain_proc_lock); + goto process_start; + } + pmadapter->mlan_processing = MFALSE; + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->pmain_proc_lock); + +exit_main_proc: + if (pmadapter->hw_status == WlanHardwareStatusClosing) + mlan_shutdown_fw(pmadapter); + LEAVE(); + return ret; +} + +/** + * @brief Function to send packet + * + * @param pmlan_adapter A pointer to mlan_adapter structure + * @param pmbuf A pointer to mlan_buffer structure + * + * @return MLAN_STATUS_PENDING + */ +mlan_status +mlan_send_packet(IN t_void *pmlan_adapter, IN pmlan_buffer pmbuf) +{ + mlan_status ret = MLAN_STATUS_PENDING; + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; + mlan_private *pmpriv; + t_u16 eth_type = 0; + t_u8 ra[MLAN_MAC_ADDR_LENGTH]; + tdlsStatus_e tdls_status; + + ENTER(); + MASSERT(pmlan_adapter &&pmbuf); + + MASSERT(pmbuf->bss_index < pmadapter->priv_num); + pmbuf->flags |= MLAN_BUF_FLAG_MOAL_TX_BUF; + pmpriv = pmadapter->priv[pmbuf->bss_index]; + + eth_type = + mlan_ntohs(*(t_u16 *)&pmbuf-> + pbuf[pmbuf->data_offset + + MLAN_ETHER_PKT_TYPE_OFFSET]); + if (((pmadapter->priv[pmbuf->bss_index]->port_ctrl_mode == MTRUE) && + ((eth_type == MLAN_ETHER_PKT_TYPE_EAPOL) + || (eth_type == MLAN_ETHER_PKT_TYPE_WAPI) + )) + || (eth_type == MLAN_ETHER_PKT_TYPE_TDLS_ACTION) + || (pmbuf->buf_type == MLAN_BUF_TYPE_RAW_DATA) + + ) { + if (eth_type == MLAN_ETHER_PKT_TYPE_TDLS_ACTION) { + memcpy(pmadapter, ra, pmbuf->pbuf + pmbuf->data_offset, + MLAN_MAC_ADDR_LENGTH); + tdls_status = wlan_get_tdls_link_status(pmpriv, ra); + if (MTRUE == wlan_is_tdls_link_setup(tdls_status) || + !pmpriv->media_connected) + pmbuf->flags |= MLAN_BUF_FLAG_TDLS; + } + PRINTM(MINFO, "mlan_send_pkt(): enq(bybass_txq)\n"); + wlan_add_buf_bypass_txqueue(pmadapter, pmbuf); + } else { + /* Transmit the packet */ + wlan_wmm_add_buf_txqueue(pmadapter, pmbuf); + } + + LEAVE(); + return ret; +} + +/** + * @brief MLAN ioctl handler + * + * @param adapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +mlan_ioctl(IN t_void *adapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_adapter pmadapter = (pmlan_adapter)adapter; + pmlan_private pmpriv = MNULL; + + ENTER(); + + if (pioctl_req == MNULL) { + PRINTM(MERROR, "MLAN IOCTL information buffer is NULL\n"); + ret = MLAN_STATUS_FAILURE; + goto exit; + } + if (pioctl_req->action == MLAN_ACT_CANCEL) { + wlan_cancel_pending_ioctl(pmadapter, pioctl_req); + ret = MLAN_STATUS_SUCCESS; + goto exit; + } + pmpriv = pmadapter->priv[pioctl_req->bss_index]; + ret = pmpriv->ops.ioctl(adapter, pioctl_req); +exit: + LEAVE(); + return ret; +} + +/** + * @brief Packet receive completion callback handler + * + * @param pmlan_adapter A pointer to mlan_adapter structure + * @param pmbuf A pointer to mlan_buffer structure + * @param status Callback status + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +mlan_recv_packet_complete(IN t_void *pmlan_adapter, + IN pmlan_buffer pmbuf, IN mlan_status status) +{ + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; + + ENTER(); + wlan_recv_packet_complete(pmadapter, pmbuf, status); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief select wmm queue + * + * @param pmlan_adapter A pointer to mlan_adapter structure + * @param bss_num BSS number + * @param tid TID + * + * @return wmm queue priority (0 - 3) + */ +t_u8 +mlan_select_wmm_queue(IN t_void *pmlan_adapter, IN t_u8 bss_num, IN t_u8 tid) +{ + mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter; + pmlan_private pmpriv = pmadapter->priv[bss_num]; + t_u8 ret; + ENTER(); + ret = wlan_wmm_select_queue(pmpriv, tid); + LEAVE(); + return ret; +} + +/** + * @brief This function gets interrupt status. + * + * @param adapter A pointer to mlan_adapter structure + * @return N/A + */ +t_void +mlan_interrupt(IN t_void *adapter) +{ + mlan_adapter *pmadapter = (mlan_adapter *)adapter; + + ENTER(); + if (!pmadapter->pps_uapsd_mode && pmadapter->ps_state == PS_STATE_SLEEP) { + pmadapter->pm_wakeup_fw_try = MFALSE; + pmadapter->ps_state = PS_STATE_AWAKE; + } + wlan_interrupt(pmadapter); + LEAVE(); +} + +/** + * @brief This function wakeup firmware. + * + * @param adapter A pointer to mlan_adapter structure + * @return N/A + */ +t_void +mlan_pm_wakeup_card(IN t_void *adapter) +{ + mlan_adapter *pmadapter = (mlan_adapter *)adapter; + ENTER(); + wlan_pm_wakeup_card(pmadapter); + LEAVE(); +} + +/** + * @brief This function check main_process status. + * + * @param adapter A pointer to mlan_adapter structure + * @return MTRUE/MFALSE + */ +t_u8 +mlan_is_main_process_running(IN t_void *adapter) +{ + mlan_adapter *pmadapter = (mlan_adapter *)adapter; + pmlan_callbacks pcb = &pmadapter->callbacks; + t_u8 ret = MFALSE; + ENTER(); + pcb->moal_spin_lock(pmadapter->pmoal_handle, + pmadapter->pmain_proc_lock); + + /* Check if already processing */ + if (pmadapter->mlan_processing) { + pmadapter->more_task_flag = MTRUE; + ret = MTRUE; + } + pcb->moal_spin_unlock(pmadapter->pmoal_handle, + pmadapter->pmain_proc_lock); + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sta_cmd.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sta_cmd.c new file mode 100644 index 00000000..6e7bcaed --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sta_cmd.c @@ -0,0 +1,2773 @@ +/** @file mlan_sta_cmd.c + * + * @brief This file contains the handling of command. + * it prepares command and sends it to firmware when + * it is ready. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/****************************************************** +Change log: + 10/21/2008: initial version +******************************************************/ + +#include "mlan.h" +#include "mlan_join.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_wmm.h" +#include "mlan_11n.h" +#include "mlan_11ac.h" +#include "mlan_11h.h" +#include "mlan_sdio.h" +#include "mlan_meas.h" + +/******************************************************** + Local Variables +********************************************************/ + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ + +/** + * @brief This function prepares command of RSSI info. + * + * @param pmpriv A pointer to mlan_private structure + * @param pcmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action Command action + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_802_11_rssi_info(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *pcmd, IN t_u16 cmd_action) +{ + ENTER(); + + pcmd->command = wlan_cpu_to_le16(HostCmd_CMD_RSSI_INFO); + pcmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_802_11_RSSI_INFO) + + S_DS_GEN); + pcmd->params.rssi_info.action = wlan_cpu_to_le16(cmd_action); + pcmd->params.rssi_info.ndata = + wlan_cpu_to_le16(pmpriv->data_avg_factor); + pcmd->params.rssi_info.nbcn = wlan_cpu_to_le16(pmpriv->bcn_avg_factor); + + /* Reset SNR/NF/RSSI values in private structure */ + pmpriv->data_rssi_last = 0; + pmpriv->data_nf_last = 0; + pmpriv->data_rssi_avg = 0; + pmpriv->data_nf_avg = 0; + pmpriv->bcn_rssi_last = 0; + pmpriv->bcn_nf_last = 0; + pmpriv->bcn_rssi_avg = 0; + pmpriv->bcn_nf_avg = 0; + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of snmp_mib. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param cmd_oid OID: ENABLE or DISABLE + * @param pdata_buf A pointer to command information buffer + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_802_11_snmp_mib(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, + IN t_u32 cmd_oid, IN t_void *pdata_buf) +{ + HostCmd_DS_802_11_SNMP_MIB *psnmp_mib = &cmd->params.smib; + t_u32 ul_temp; + + ENTER(); + PRINTM(MINFO, "SNMP_CMD: cmd_oid = 0x%x\n", cmd_oid); + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_SNMP_MIB); + cmd->size = sizeof(HostCmd_DS_802_11_SNMP_MIB) - 1 + S_DS_GEN; + + if (cmd_action == HostCmd_ACT_GEN_GET) { + psnmp_mib->query_type = wlan_cpu_to_le16(HostCmd_ACT_GEN_GET); + psnmp_mib->buf_size = wlan_cpu_to_le16(MAX_SNMP_BUF_SIZE); + cmd->size += MAX_SNMP_BUF_SIZE; + } + + switch (cmd_oid) { + case DtimPeriod_i: + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)DtimPeriod_i); + if (cmd_action == HostCmd_ACT_GEN_SET) { + psnmp_mib->query_type = + wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); + psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u8)); + ul_temp = *((t_u32 *)pdata_buf); + psnmp_mib->value[0] = (t_u8)ul_temp; + cmd->size += sizeof(t_u8); + } + break; + case FragThresh_i: + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)FragThresh_i); + if (cmd_action == HostCmd_ACT_GEN_SET) { + psnmp_mib->query_type = + wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); + psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u16)); + ul_temp = *((t_u32 *)pdata_buf); + *((t_u16 *)(psnmp_mib->value)) = + wlan_cpu_to_le16((t_u16)ul_temp); + cmd->size += sizeof(t_u16); + } + break; + case RtsThresh_i: + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)RtsThresh_i); + if (cmd_action == HostCmd_ACT_GEN_SET) { + psnmp_mib->query_type = + wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); + psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u16)); + ul_temp = *((t_u32 *)pdata_buf); + *(t_u16 *)(psnmp_mib->value) = + wlan_cpu_to_le16((t_u16)ul_temp); + cmd->size += sizeof(t_u16); + } + break; + + case ShortRetryLim_i: + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)ShortRetryLim_i); + if (cmd_action == HostCmd_ACT_GEN_SET) { + psnmp_mib->query_type = + wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); + psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u16)); + ul_temp = (*(t_u32 *)pdata_buf); + *((t_u16 *)(psnmp_mib->value)) = + wlan_cpu_to_le16((t_u16)ul_temp); + cmd->size += sizeof(t_u16); + } + break; + case Dot11D_i: + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)Dot11D_i); + if (cmd_action == HostCmd_ACT_GEN_SET) { + psnmp_mib->query_type = + wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); + psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u16)); + ul_temp = *(t_u32 *)pdata_buf; + *((t_u16 *)(psnmp_mib->value)) = + wlan_cpu_to_le16((t_u16)ul_temp); + cmd->size += sizeof(t_u16); + } + break; + case Dot11H_i: + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)Dot11H_i); + if (cmd_action == HostCmd_ACT_GEN_SET) { + psnmp_mib->query_type = + wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); + psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u16)); + ul_temp = *(t_u32 *)pdata_buf; + *((t_u16 *)(psnmp_mib->value)) = + wlan_cpu_to_le16((t_u16)ul_temp); + cmd->size += sizeof(t_u16); + } + break; + case WwsMode_i: + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)WwsMode_i); + if (cmd_action == HostCmd_ACT_GEN_SET) { + psnmp_mib->query_type = + wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); + psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u16)); + ul_temp = *((t_u32 *)pdata_buf); + *((t_u16 *)(psnmp_mib->value)) = + wlan_cpu_to_le16((t_u16)ul_temp); + cmd->size += sizeof(t_u16); + } + break; + case Thermal_i: + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)Thermal_i); + break; + case NullPktPeriod_i: + /** keep alive null data pkt interval in full power mode */ + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)NullPktPeriod_i); + if (cmd_action == HostCmd_ACT_GEN_SET) { + psnmp_mib->query_type = + wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); + psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u32)); + ul_temp = *((t_u32 *)pdata_buf); + *((t_u32 *)(psnmp_mib->value)) = + wlan_cpu_to_le32((t_u32)ul_temp); + cmd->size += sizeof(t_u32); + } + break; + default: + break; + } + cmd->size = wlan_cpu_to_le16(cmd->size); + PRINTM(MINFO, + "SNMP_CMD: Action=0x%x, OID=0x%x, OIDSize=0x%x, Value=0x%x\n", + cmd_action, cmd_oid, wlan_le16_to_cpu(psnmp_mib->buf_size), + wlan_le16_to_cpu(*(t_u16 *)psnmp_mib->value)); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of get_log. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_802_11_get_log(IN pmlan_private pmpriv, IN HostCmd_DS_COMMAND *cmd) +{ + ENTER(); + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_GET_LOG); + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_802_11_GET_LOG) + S_DS_GEN); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of tx_power_cfg. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_tx_power_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + MrvlTypes_Power_Group_t *ppg_tlv = MNULL; + HostCmd_DS_TXPWR_CFG *ptxp = MNULL; + HostCmd_DS_TXPWR_CFG *ptxp_cfg = &cmd->params.txp_cfg; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_TXPWR_CFG); + cmd->size = wlan_cpu_to_le16(S_DS_GEN + sizeof(HostCmd_DS_TXPWR_CFG)); + switch (cmd_action) { + case HostCmd_ACT_GEN_SET: + ptxp = (HostCmd_DS_TXPWR_CFG *)pdata_buf; + if (ptxp->mode) { + ppg_tlv = + (MrvlTypes_Power_Group_t *)((t_u8 *)pdata_buf + + sizeof + (HostCmd_DS_TXPWR_CFG)); + memmove(pmpriv->adapter, ptxp_cfg, pdata_buf, + sizeof(HostCmd_DS_TXPWR_CFG) + + sizeof(MrvlTypes_Power_Group_t) + + ppg_tlv->length); + + ppg_tlv = (MrvlTypes_Power_Group_t *)((t_u8 *)ptxp_cfg + + sizeof + (HostCmd_DS_TXPWR_CFG)); + cmd->size += + wlan_cpu_to_le16(sizeof(MrvlTypes_Power_Group_t) + + ppg_tlv->length); + ppg_tlv->type = wlan_cpu_to_le16(ppg_tlv->type); + ppg_tlv->length = wlan_cpu_to_le16(ppg_tlv->length); + } else { + memmove(pmpriv->adapter, ptxp_cfg, pdata_buf, + sizeof(HostCmd_DS_TXPWR_CFG)); + } + ptxp_cfg->action = wlan_cpu_to_le16(cmd_action); + ptxp_cfg->cfg_index = wlan_cpu_to_le16(ptxp_cfg->cfg_index); + ptxp_cfg->mode = wlan_cpu_to_le32(ptxp_cfg->mode); + break; + case HostCmd_ACT_GEN_GET: + ptxp_cfg->action = wlan_cpu_to_le16(cmd_action); + break; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of rf_tx_power. + * + * @param pmpriv A pointer to wlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action the action: GET or SET + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_802_11_rf_tx_power(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + + HostCmd_DS_802_11_RF_TX_POWER *prtp = &cmd->params.txp; + + ENTER(); + + cmd->size = wlan_cpu_to_le16((sizeof(HostCmd_DS_802_11_RF_TX_POWER)) + + S_DS_GEN); + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_RF_TX_POWER); + prtp->action = cmd_action; + + PRINTM(MINFO, "RF_TX_POWER_CMD: Size:%d Cmd:0x%x Act:%d\n", + cmd->size, cmd->command, prtp->action); + + switch (cmd_action) { + case HostCmd_ACT_GEN_GET: + prtp->action = wlan_cpu_to_le16(HostCmd_ACT_GEN_GET); + prtp->current_level = 0; + break; + + case HostCmd_ACT_GEN_SET: + prtp->action = wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); + prtp->current_level = wlan_cpu_to_le16(*((t_s16 *)pdata_buf)); + break; + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +#ifdef WIFI_DIRECT_SUPPORT +/** + * @brief Check if any p2p interface is conencted + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return MTRUE/MFALSE; + */ +static t_u8 +wlan_is_p2p_connected(IN pmlan_adapter pmadapter) +{ + int j; + pmlan_private priv; + ENTER(); + for (j = 0; j < pmadapter->priv_num; ++j) { + priv = pmadapter->priv[j]; + if (priv) { + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) { + if ((priv->bss_role == MLAN_BSS_ROLE_STA) && + (priv->media_connected == MTRUE)) { + LEAVE(); + return MTRUE; + } + if ((priv->bss_role == MLAN_BSS_ROLE_UAP) && + (priv->uap_bss_started == MTRUE)) { + LEAVE(); + return MTRUE; + } + } + } + } + LEAVE(); + return MFALSE; +} +#endif + +/** + * @brief This function prepares command of hs_cfg. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_802_11_hs_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN hs_config_param *pdata_buf) +{ + pmlan_adapter pmadapter = pmpriv->adapter; + HostCmd_DS_802_11_HS_CFG_ENH *phs_cfg = &cmd->params.opt_hs_cfg; + t_u16 hs_activate = MFALSE; + t_u8 *tlv = (t_u8 *)phs_cfg + sizeof(HostCmd_DS_802_11_HS_CFG_ENH); + MrvlIEtypes_HsWakeHoldoff_t *holdoff_tlv = MNULL; + + ENTER(); + + if (pdata_buf == MNULL) { + /* New Activate command */ + hs_activate = MTRUE; + } + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_HS_CFG_ENH); + + if (!hs_activate && (pdata_buf->conditions != HOST_SLEEP_CFG_CANCEL) + && ((pmadapter->arp_filter_size > 0) + && (pmadapter->arp_filter_size <= ARP_FILTER_MAX_BUF_SIZE))) { + PRINTM(MINFO, "Attach %d bytes ArpFilter to HSCfg cmd\n", + pmadapter->arp_filter_size); + memcpy(pmpriv->adapter, + ((t_u8 *)phs_cfg) + sizeof(HostCmd_DS_802_11_HS_CFG_ENH), + pmadapter->arp_filter, pmadapter->arp_filter_size); + cmd->size = + pmadapter->arp_filter_size + + sizeof(HostCmd_DS_802_11_HS_CFG_ENH) + S_DS_GEN; + tlv = (t_u8 *)phs_cfg + sizeof(HostCmd_DS_802_11_HS_CFG_ENH) + + pmadapter->arp_filter_size; + } else + cmd->size = S_DS_GEN + sizeof(HostCmd_DS_802_11_HS_CFG_ENH); + + if (hs_activate) { + cmd->size = wlan_cpu_to_le16(cmd->size); + phs_cfg->action = wlan_cpu_to_le16(HS_ACTIVATE); + phs_cfg->params.hs_activate.resp_ctrl = + wlan_cpu_to_le16(RESP_NEEDED); + } else { + phs_cfg->action = wlan_cpu_to_le16(HS_CONFIGURE); +#ifdef WIFI_DIRECT_SUPPORT + if (wlan_is_p2p_connected(pmadapter)) + phs_cfg->params.hs_config.conditions = + wlan_cpu_to_le32(pdata_buf-> + conditions | + HOST_SLEEP_COND_MULTICAST_DATA); + else +#endif + phs_cfg->params.hs_config.conditions = + wlan_cpu_to_le32(pdata_buf->conditions); + phs_cfg->params.hs_config.gpio = pdata_buf->gpio; + phs_cfg->params.hs_config.gap = pdata_buf->gap; + if (pmadapter->min_wake_holdoff) { + cmd->size += sizeof(MrvlIEtypes_HsWakeHoldoff_t); + holdoff_tlv = (MrvlIEtypes_HsWakeHoldoff_t *)tlv; + holdoff_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_HS_WAKE_HOLDOFF); + holdoff_tlv->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_HsWakeHoldoff_t) - + sizeof(MrvlIEtypesHeader_t)); + holdoff_tlv->min_wake_holdoff = + wlan_cpu_to_le16(pmadapter->min_wake_holdoff); + PRINTM(MCMND, "min_wake_holdoff=%d\n", + pmadapter->min_wake_holdoff); + } + cmd->size = wlan_cpu_to_le16(cmd->size); + PRINTM(MCMND, + "HS_CFG_CMD: condition:0x%x gpio:0x%x gap:0x%x holdoff=%d\n", + phs_cfg->params.hs_config.conditions, + phs_cfg->params.hs_config.gpio, + phs_cfg->params.hs_config.gap, + pmadapter->min_wake_holdoff); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of mac_address. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_802_11_mac_address(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, IN t_u16 cmd_action) +{ + ENTER(); + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_MAC_ADDRESS); + cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_802_11_MAC_ADDRESS) + + S_DS_GEN); + cmd->result = 0; + + cmd->params.mac_addr.action = wlan_cpu_to_le16(cmd_action); + + if (cmd_action == HostCmd_ACT_GEN_SET) { + memcpy(pmpriv->adapter, cmd->params.mac_addr.mac_addr, + pmpriv->curr_addr, MLAN_MAC_ADDR_LENGTH); + /* HEXDUMP("SET_CMD: MAC ADDRESS-", priv->CurrentAddr, 6); */ + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of sleep_period. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_802_11_sleep_period(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_u16 *pdata_buf) +{ + HostCmd_DS_802_11_SLEEP_PERIOD *pcmd_sleep_pd = &cmd->params.sleep_pd; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_SLEEP_PERIOD); + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_802_11_SLEEP_PERIOD) + + S_DS_GEN); + if (cmd_action == HostCmd_ACT_GEN_SET) { + pcmd_sleep_pd->sleep_pd = wlan_cpu_to_le16(*(t_u16 *)pdata_buf); + } + pcmd_sleep_pd->action = wlan_cpu_to_le16(cmd_action); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of sleep_params. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_802_11_sleep_params(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_u16 *pdata_buf) +{ + HostCmd_DS_802_11_SLEEP_PARAMS *pcmd_sp = &cmd->params.sleep_param; + mlan_ds_sleep_params *psp = (mlan_ds_sleep_params *)pdata_buf; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_SLEEP_PARAMS); + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_802_11_SLEEP_PARAMS) + + S_DS_GEN); + if (cmd_action == HostCmd_ACT_GEN_SET) { + pcmd_sp->reserved = (t_u16)psp->reserved; + pcmd_sp->error = (t_u16)psp->error; + pcmd_sp->offset = (t_u16)psp->offset; + pcmd_sp->stable_time = (t_u16)psp->stable_time; + pcmd_sp->cal_control = (t_u8)psp->cal_control; + pcmd_sp->external_sleep_clk = (t_u8)psp->ext_sleep_clk; + + pcmd_sp->reserved = wlan_cpu_to_le16(pcmd_sp->reserved); + pcmd_sp->error = wlan_cpu_to_le16(pcmd_sp->error); + pcmd_sp->offset = wlan_cpu_to_le16(pcmd_sp->offset); + pcmd_sp->stable_time = wlan_cpu_to_le16(pcmd_sp->stable_time); + } + pcmd_sp->action = wlan_cpu_to_le16(cmd_action); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of mac_multicast_adr. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_mac_multicast_adr(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + mlan_multicast_list *pmcast_list = (mlan_multicast_list *)pdata_buf; + HostCmd_DS_MAC_MULTICAST_ADR *pmc_addr = &cmd->params.mc_addr; + + ENTER(); + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_MAC_MULTICAST_ADR) + + S_DS_GEN); + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_MAC_MULTICAST_ADR); + + pmc_addr->action = wlan_cpu_to_le16(cmd_action); + pmc_addr->num_of_adrs = + wlan_cpu_to_le16((t_u16)pmcast_list->num_multicast_addr); + memcpy(pmpriv->adapter, pmc_addr->mac_list, pmcast_list->mac_list, + pmcast_list->num_multicast_addr * MLAN_MAC_ADDR_LENGTH); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of deauthenticate/disassociate. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd_no Command number + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_802_11_deauthenticate(IN pmlan_private pmpriv, + IN t_u16 cmd_no, + IN HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) +{ + HostCmd_DS_802_11_DEAUTHENTICATE *pdeauth = &cmd->params.deauth; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(cmd_no); + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_802_11_DEAUTHENTICATE) + + S_DS_GEN); + + /* Set AP MAC address */ + memcpy(pmpriv->adapter, pdeauth->mac_addr, (t_u8 *)pdata_buf, + MLAN_MAC_ADDR_LENGTH); + if (cmd_no == HostCmd_CMD_802_11_DEAUTHENTICATE) + PRINTM(MCMND, "Deauth: " MACSTR "\n", + MAC2STR(pdeauth->mac_addr)); + else + PRINTM(MCMND, "Disassociate: " MACSTR "\n", + MAC2STR(pdeauth->mac_addr)); + + if (pmpriv->adapter->state_11h.recvd_chanswann_event) { +/** Reason code 36 = Requested from peer station as it is leaving the BSS */ +#define REASON_CODE_PEER_STA_LEAVING 36 + pdeauth->reason_code = + wlan_cpu_to_le16(REASON_CODE_PEER_STA_LEAVING); + } else { +/** Reason code 3 = Station is leaving */ +#define REASON_CODE_STA_LEAVING 3 + pdeauth->reason_code = + wlan_cpu_to_le16(REASON_CODE_STA_LEAVING); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of ad_hoc_stop. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_802_11_ad_hoc_stop(IN pmlan_private pmpriv, IN HostCmd_DS_COMMAND *cmd) +{ + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_AD_HOC_STOP); + cmd->size = wlan_cpu_to_le16(S_DS_GEN); + + if (wlan_11h_is_active(pmpriv)) + wlan_11h_activate(pmpriv, MNULL, MFALSE); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of key_material. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param cmd_oid OID: ENABLE or DISABLE + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_cmd_802_11_key_material(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, + IN t_u32 cmd_oid, IN t_void *pdata_buf) +{ + HostCmd_DS_802_11_KEY_MATERIAL *pkey_material = + &cmd->params.key_material; + mlan_ds_encrypt_key *pkey = (mlan_ds_encrypt_key *)pdata_buf; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + if (!pkey) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_KEY_MATERIAL); + pkey_material->action = wlan_cpu_to_le16(cmd_action); + if (cmd_action == HostCmd_ACT_GEN_GET) { + PRINTM(MCMND, "GET Key\n"); + pkey_material->key_param_set.key_idx = + pkey->key_index & KEY_INDEX_MASK; + pkey_material->key_param_set.type = + wlan_cpu_to_le16(TLV_TYPE_KEY_PARAM_V2); + pkey_material->key_param_set.length = + wlan_cpu_to_le16(KEY_PARAMS_FIXED_LEN); + memcpy(pmpriv->adapter, pkey_material->key_param_set.mac_addr, + pkey->mac_addr, MLAN_MAC_ADDR_LENGTH); + if (pkey->key_flags & KEY_FLAG_GROUP_KEY) + pkey_material->key_param_set.key_info |= + KEY_INFO_MCAST_KEY; + else + pkey_material->key_param_set.key_info |= + KEY_INFO_UCAST_KEY; + if (pkey->key_flags & KEY_FLAG_AES_MCAST_IGTK) + pkey_material->key_param_set.key_info = + KEY_INFO_CMAC_AES_KEY; + pkey_material->key_param_set.key_info = + wlan_cpu_to_le16(pkey_material->key_param_set.key_info); + cmd->size = + wlan_cpu_to_le16(sizeof(MrvlIEtypesHeader_t) + + S_DS_GEN + KEY_PARAMS_FIXED_LEN + + sizeof(pkey_material->action)); + goto done; + } + memset(pmpriv->adapter, &pkey_material->key_param_set, 0, + sizeof(MrvlIEtype_KeyParamSetV2_t)); + if (pkey->key_flags & KEY_FLAG_REMOVE_KEY) { + pkey_material->action = + wlan_cpu_to_le16(HostCmd_ACT_GEN_REMOVE); + pkey_material->key_param_set.type = + wlan_cpu_to_le16(TLV_TYPE_KEY_PARAM_V2); + pkey_material->key_param_set.length = + wlan_cpu_to_le16(KEY_PARAMS_FIXED_LEN); + pkey_material->key_param_set.key_idx = + pkey->key_index & KEY_INDEX_MASK; + pkey_material->key_param_set.key_info = + wlan_cpu_to_le16(KEY_INFO_MCAST_KEY | + KEY_INFO_UCAST_KEY); + memcpy(pmpriv->adapter, pkey_material->key_param_set.mac_addr, + pkey->mac_addr, MLAN_MAC_ADDR_LENGTH); + cmd->size = + wlan_cpu_to_le16(sizeof(MrvlIEtypesHeader_t) + + S_DS_GEN + KEY_PARAMS_FIXED_LEN + + sizeof(pkey_material->action)); + PRINTM(MCMND, "Remove Key\n"); + goto done; + } + pkey_material->action = wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); + pkey_material->key_param_set.key_idx = pkey->key_index & KEY_INDEX_MASK; + pkey_material->key_param_set.type = + wlan_cpu_to_le16(TLV_TYPE_KEY_PARAM_V2); + pkey_material->key_param_set.key_info = KEY_INFO_ENABLE_KEY; + memcpy(pmpriv->adapter, pkey_material->key_param_set.mac_addr, + pkey->mac_addr, MLAN_MAC_ADDR_LENGTH); + if (pkey->key_len <= MAX_WEP_KEY_SIZE) { + pkey_material->key_param_set.length = + wlan_cpu_to_le16(KEY_PARAMS_FIXED_LEN + + sizeof(wep_param_t)); + pkey_material->key_param_set.key_type = KEY_TYPE_ID_WEP; + if (pkey->is_current_wep_key) { + pkey_material->key_param_set.key_info |= + KEY_INFO_MCAST_KEY | KEY_INFO_UCAST_KEY; + if (pkey_material->key_param_set.key_idx == + (pmpriv->wep_key_curr_index & KEY_INDEX_MASK)) + pkey_material->key_param_set.key_info |= + KEY_INFO_DEFAULT_KEY; + } else { + if (pkey->key_flags & KEY_FLAG_GROUP_KEY) + pkey_material->key_param_set.key_info |= + KEY_INFO_MCAST_KEY; + else + pkey_material->key_param_set.key_info |= + KEY_INFO_UCAST_KEY; + if (pkey->key_flags & KEY_FLAG_SET_TX_KEY) + pkey_material->key_param_set.key_info |= + KEY_INFO_DEFAULT_KEY; + } + pkey_material->key_param_set.key_info = + wlan_cpu_to_le16(pkey_material->key_param_set.key_info); + pkey_material->key_param_set.key_params.wep.key_len = + wlan_cpu_to_le16(pkey->key_len); + memcpy(pmpriv->adapter, + pkey_material->key_param_set.key_params.wep.key, + pkey->key_material, pkey->key_len); + cmd->size = + wlan_cpu_to_le16(sizeof(MrvlIEtypesHeader_t) + + S_DS_GEN + KEY_PARAMS_FIXED_LEN + + sizeof(wep_param_t) + + sizeof(pkey_material->action)); + PRINTM(MCMND, "Set WEP Key\n"); + goto done; + } + if (pkey->key_flags & KEY_FLAG_GROUP_KEY) + pkey_material->key_param_set.key_info |= KEY_INFO_MCAST_KEY; + else + pkey_material->key_param_set.key_info |= KEY_INFO_UCAST_KEY; + if (pkey->key_flags & KEY_FLAG_SET_TX_KEY) + pkey_material->key_param_set.key_info |= + KEY_INFO_TX_KEY | KEY_INFO_RX_KEY; + else + pkey_material->key_param_set.key_info |= KEY_INFO_RX_KEY; + if (pkey->is_wapi_key) { + pkey_material->key_param_set.key_type = KEY_TYPE_ID_WAPI; + memcpy(pmpriv->adapter, + pkey_material->key_param_set.key_params.wapi.pn, + pkey->pn, PN_SIZE); + pkey_material->key_param_set.key_params.wapi.key_len = + wlan_cpu_to_le16(pkey->key_len); + memcpy(pmpriv->adapter, + pkey_material->key_param_set.key_params.wapi.key, + pkey->key_material, pkey->key_len); + if (!pmpriv->sec_info.wapi_key_on) + pkey_material->key_param_set.key_info |= + KEY_INFO_DEFAULT_KEY; + if (pkey->key_flags & KEY_FLAG_GROUP_KEY) + pmpriv->sec_info.wapi_key_on = MTRUE; + pkey_material->key_param_set.key_info = + wlan_cpu_to_le16(pkey_material->key_param_set.key_info); + pkey_material->key_param_set.length = + wlan_cpu_to_le16(KEY_PARAMS_FIXED_LEN + + sizeof(wapi_param)); + cmd->size = + wlan_cpu_to_le16(sizeof(MrvlIEtypesHeader_t) + + S_DS_GEN + KEY_PARAMS_FIXED_LEN + + sizeof(wapi_param) + + sizeof(pkey_material->action)); + PRINTM(MCMND, "Set WAPI Key\n"); + goto done; + } + if (pmpriv->bss_mode == MLAN_BSS_MODE_INFRA) { + /* Enable default key for WPA/WPA2 */ + if (!pmpriv->wpa_is_gtk_set) + pkey_material->key_param_set.key_info |= + KEY_INFO_DEFAULT_KEY; + } else { + pkey_material->key_param_set.key_info |= KEY_INFO_DEFAULT_KEY; + /* Enable unicast bit for WPA-NONE/ADHOC_AES */ + if ((!pmpriv->sec_info.wpa2_enabled) && + (pkey->key_flags & KEY_FLAG_SET_TX_KEY)) + pkey_material->key_param_set.key_info |= + KEY_INFO_UCAST_KEY; + } + pkey_material->key_param_set.key_info = + wlan_cpu_to_le16(pkey_material->key_param_set.key_info); + if (pkey->key_len == WPA_AES_KEY_LEN && + !(pkey->key_flags & KEY_FLAG_AES_MCAST_IGTK)) { + if (pkey-> + key_flags & (KEY_FLAG_RX_SEQ_VALID | KEY_FLAG_TX_SEQ_VALID)) + memcpy(pmpriv->adapter, + pkey_material->key_param_set.key_params.aes.pn, + pkey->pn, SEQ_MAX_SIZE); + pkey_material->key_param_set.key_type = KEY_TYPE_ID_AES; + pkey_material->key_param_set.key_params.aes.key_len = + wlan_cpu_to_le16(pkey->key_len); + memcpy(pmpriv->adapter, + pkey_material->key_param_set.key_params.aes.key, + pkey->key_material, pkey->key_len); + pkey_material->key_param_set.length = + wlan_cpu_to_le16(KEY_PARAMS_FIXED_LEN + + sizeof(aes_param)); + cmd->size = + wlan_cpu_to_le16(sizeof(MrvlIEtypesHeader_t) + + S_DS_GEN + KEY_PARAMS_FIXED_LEN + + sizeof(aes_param) + + sizeof(pkey_material->action)); + PRINTM(MCMND, "Set AES Key\n"); + goto done; + } + if (pkey->key_len == WPA_IGTK_KEY_LEN && + (pkey->key_flags & KEY_FLAG_AES_MCAST_IGTK)) { + if (pkey-> + key_flags & (KEY_FLAG_RX_SEQ_VALID | KEY_FLAG_TX_SEQ_VALID)) + memcpy(pmpriv->adapter, + pkey_material->key_param_set.key_params.cmac_aes. + ipn, pkey->pn, SEQ_MAX_SIZE); + pkey_material->key_param_set.key_info &= + ~(wlan_cpu_to_le16(KEY_INFO_MCAST_KEY)); + pkey_material->key_param_set.key_info |= + wlan_cpu_to_le16(KEY_INFO_AES_MCAST_IGTK); + pkey_material->key_param_set.key_type = KEY_TYPE_ID_AES_CMAC; + pkey_material->key_param_set.key_params.cmac_aes.key_len = + wlan_cpu_to_le16(pkey->key_len); + memcpy(pmpriv->adapter, + pkey_material->key_param_set.key_params.cmac_aes.key, + pkey->key_material, pkey->key_len); + pkey_material->key_param_set.length = + wlan_cpu_to_le16(KEY_PARAMS_FIXED_LEN + + sizeof(cmac_aes_param)); + cmd->size = + wlan_cpu_to_le16(sizeof(MrvlIEtypesHeader_t) + + S_DS_GEN + KEY_PARAMS_FIXED_LEN + + sizeof(cmac_aes_param) + + sizeof(pkey_material->action)); + PRINTM(MCMND, "Set CMAC AES Key\n"); + goto done; + } + if (pkey->key_len == WPA_TKIP_KEY_LEN) { + if (pkey-> + key_flags & (KEY_FLAG_RX_SEQ_VALID | KEY_FLAG_TX_SEQ_VALID)) + memcpy(pmpriv->adapter, + pkey_material->key_param_set.key_params.tkip.pn, + pkey->pn, SEQ_MAX_SIZE); + pkey_material->key_param_set.key_type = KEY_TYPE_ID_TKIP; + pkey_material->key_param_set.key_params.tkip.key_len = + wlan_cpu_to_le16(pkey->key_len); + memcpy(pmpriv->adapter, + pkey_material->key_param_set.key_params.tkip.key, + pkey->key_material, pkey->key_len); + pkey_material->key_param_set.length = + wlan_cpu_to_le16(KEY_PARAMS_FIXED_LEN + + sizeof(tkip_param)); + cmd->size = + wlan_cpu_to_le16(sizeof(MrvlIEtypesHeader_t) + + S_DS_GEN + KEY_PARAMS_FIXED_LEN + + sizeof(tkip_param) + + sizeof(pkey_material->action)); + PRINTM(MCMND, "Set TKIP Key\n"); + } +done: + LEAVE(); + return ret; +} + +/** + * @brief This function send eapol pkt to FW + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action the action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_eapol_pkt(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + HostCmd_DS_EAPOL_PKT *eapol_pkt = &cmd->params.eapol_pkt; + mlan_buffer *pmbuf = (mlan_buffer *)pdata_buf; + + ENTER(); + eapol_pkt->action = wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); + cmd->size = sizeof(HostCmd_DS_EAPOL_PKT) + S_DS_GEN; + cmd->command = wlan_cpu_to_le16(cmd->command); + + eapol_pkt->tlv_eapol.header.type = wlan_cpu_to_le16(TLV_TYPE_EAPOL_PKT); + eapol_pkt->tlv_eapol.header.len = wlan_cpu_to_le16(pmbuf->data_len); + memcpy(pmpriv->adapter, eapol_pkt->tlv_eapol.pkt_buf, + pmbuf->pbuf + pmbuf->data_offset, pmbuf->data_len); + cmd->size += pmbuf->data_len; + cmd->size = wlan_cpu_to_le16(cmd->size); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of supplicant pmk + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_cmd_802_11_supplicant_pmk(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + MrvlIEtypes_PMK_t *ppmk_tlv = MNULL; + MrvlIEtypes_Passphrase_t *ppassphrase_tlv = MNULL; + MrvlIEtypes_SsIdParamSet_t *pssid_tlv = MNULL; + MrvlIEtypes_Bssid_t *pbssid_tlv = MNULL; + HostCmd_DS_802_11_SUPPLICANT_PMK *pesupplicant_psk = + &cmd->params.esupplicant_psk; + t_u8 *ptlv_buffer = (t_u8 *)pesupplicant_psk->tlv_buffer; + mlan_ds_passphrase *psk = (mlan_ds_passphrase *)pdata_buf; + t_u8 zero_mac[] = { 0, 0, 0, 0, 0, 0 }; + + ENTER(); + /* + * Parse the rest of the buf here + * 1) - This will get the passphrase, AKMP + * for specified ssid, if none specified then it will get all. + * Eg: iwpriv passphrase 0:ssid=marvell + * 2) :: + * - passphrase and psk cannot be provided to + * the same SSID, Takes one SSID at a time, If ssid= is present + * the it should contain a passphrase or psk. If no arguments are + * provided then AKMP=802.1x, and passphrase should be provided + * after association. + * End of each parameter should be followed by a ':'(except for the + * last parameter) as the delimiter. If ':' has to be used in + * an SSID then a '/' should be preceded to ':' as a escape. + * Eg:iwpriv passphrase + * "1:ssid=mrvl AP:psk=abcdefgh:bssid=00:50:43:ef:23:f3" + * iwpriv passphrase + * "1:ssid=mrvl/: AP:psk=abcdefgd:bssid=00:50:43:ef:23:f3" + * iwpriv passphrase "1:ssid=mrvlAP:psk=abcdefgd" + * 3) - This will clear the passphrase + * for specified ssid, if none specified then it will clear all. + * Eg: iwpriv passphrase 2:ssid=marvell + */ + + /* -1 is for t_u8 TlvBuffer[1] as this should not be included */ + cmd->size = sizeof(HostCmd_DS_802_11_SUPPLICANT_PMK) + S_DS_GEN - 1; + if (psk->ssid.ssid_len) { + pssid_tlv = (MrvlIEtypes_SsIdParamSet_t *)ptlv_buffer; + pssid_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_SSID); + pssid_tlv->header.len = + (t_u16)MIN(MLAN_MAX_SSID_LENGTH, psk->ssid.ssid_len); + memcpy(pmpriv->adapter, (char *)pssid_tlv->ssid, psk->ssid.ssid, + MIN(MLAN_MAX_SSID_LENGTH, psk->ssid.ssid_len)); + ptlv_buffer += + (pssid_tlv->header.len + sizeof(MrvlIEtypesHeader_t)); + cmd->size += + (pssid_tlv->header.len + sizeof(MrvlIEtypesHeader_t)); + pssid_tlv->header.len = wlan_cpu_to_le16(pssid_tlv->header.len); + } + if (memcmp + (pmpriv->adapter, (t_u8 *)&psk->bssid, zero_mac, + sizeof(zero_mac))) { + pbssid_tlv = (MrvlIEtypes_Bssid_t *)ptlv_buffer; + pbssid_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_BSSID); + pbssid_tlv->header.len = MLAN_MAC_ADDR_LENGTH; + memcpy(pmpriv->adapter, pbssid_tlv->bssid, (t_u8 *)&psk->bssid, + MLAN_MAC_ADDR_LENGTH); + ptlv_buffer += + (pbssid_tlv->header.len + sizeof(MrvlIEtypesHeader_t)); + cmd->size += + (pbssid_tlv->header.len + sizeof(MrvlIEtypesHeader_t)); + pbssid_tlv->header.len = + wlan_cpu_to_le16(pbssid_tlv->header.len); + } + if (psk->psk_type == MLAN_PSK_PASSPHRASE) { + ppassphrase_tlv = (MrvlIEtypes_Passphrase_t *)ptlv_buffer; + ppassphrase_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_PASSPHRASE); + ppassphrase_tlv->header.len = + (t_u16)MIN(MLAN_MAX_PASSPHRASE_LENGTH, + psk->psk.passphrase.passphrase_len); + memcpy(pmpriv->adapter, ppassphrase_tlv->passphrase, + psk->psk.passphrase.passphrase, + MIN(MLAN_MAX_PASSPHRASE_LENGTH, + psk->psk.passphrase.passphrase_len)); + ptlv_buffer += + (ppassphrase_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + cmd->size += + (ppassphrase_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + ppassphrase_tlv->header.len = + wlan_cpu_to_le16(ppassphrase_tlv->header.len); + } + if (psk->psk_type == MLAN_PSK_PMK) { + ppmk_tlv = (MrvlIEtypes_PMK_t *)ptlv_buffer; + ppmk_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_PMK); + ppmk_tlv->header.len = MLAN_MAX_KEY_LENGTH; + memcpy(pmpriv->adapter, ppmk_tlv->pmk, psk->psk.pmk.pmk, + MLAN_MAX_KEY_LENGTH); + ptlv_buffer += + (ppmk_tlv->header.len + sizeof(MrvlIEtypesHeader_t)); + cmd->size += + (ppmk_tlv->header.len + sizeof(MrvlIEtypesHeader_t)); + ppmk_tlv->header.len = wlan_cpu_to_le16(ppmk_tlv->header.len); + } + if ((cmd_action == HostCmd_ACT_GEN_SET) && + ((pssid_tlv || pbssid_tlv) && (!ppmk_tlv && !ppassphrase_tlv))) { + PRINTM(MERROR, + "Invalid case,ssid/bssid present without pmk or passphrase\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_SUPPLICANT_PMK); + pesupplicant_psk->action = wlan_cpu_to_le16(cmd_action); + pesupplicant_psk->cache_result = 0; + cmd->size = wlan_cpu_to_le16(cmd->size); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Handle the supplicant profile command + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_802_11_supplicant_profile(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + HostCmd_DS_802_11_SUPPLICANT_PROFILE *sup_profile = + (HostCmd_DS_802_11_SUPPLICANT_PROFILE *)&(cmd->params. + esupplicant_profile); + MrvlIEtypes_EncrProto_t *encr_proto_tlv = MNULL; + MrvlIEtypes_Cipher_t *pcipher_tlv = MNULL; + t_u8 *ptlv_buffer = (t_u8 *)sup_profile->tlv_buf; + mlan_ds_esupp_mode *esupp = MNULL; + + ENTER(); + + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_802_11_SUPPLICANT_PROFILE) + + S_DS_GEN - 1); + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_SUPPLICANT_PROFILE); + sup_profile->action = wlan_cpu_to_le16(cmd_action); + if ((cmd_action == HostCmd_ACT_GEN_SET) && pdata_buf) { + esupp = (mlan_ds_esupp_mode *)pdata_buf; + if (esupp->rsn_mode) { + encr_proto_tlv = (MrvlIEtypes_EncrProto_t *)ptlv_buffer; + encr_proto_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_ENCRYPTION_PROTO); + encr_proto_tlv->header.len = + (t_u16)sizeof(encr_proto_tlv->rsn_mode); + encr_proto_tlv->rsn_mode = + wlan_cpu_to_le16(esupp->rsn_mode); + ptlv_buffer += + (encr_proto_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + cmd->size += + (encr_proto_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + encr_proto_tlv->header.len = + wlan_cpu_to_le16(encr_proto_tlv->header.len); + } + if (esupp->act_paircipher || esupp->act_groupcipher) { + pcipher_tlv = (MrvlIEtypes_Cipher_t *)ptlv_buffer; + pcipher_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_CIPHER); + pcipher_tlv->header.len = + (t_u16)(sizeof(pcipher_tlv->pair_cipher) + + sizeof(pcipher_tlv->group_cipher)); + if (esupp->act_paircipher) { + pcipher_tlv->pair_cipher = + wlan_cpu_to_le16(esupp->act_paircipher); + } + if (esupp->act_groupcipher) { + pcipher_tlv->group_cipher = + wlan_cpu_to_le16(esupp-> + act_groupcipher); + } + ptlv_buffer += + (pcipher_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + cmd->size += + (pcipher_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + pcipher_tlv->header.len = + wlan_cpu_to_le16(pcipher_tlv->header.len); + } + } + cmd->size = wlan_cpu_to_le16(cmd->size); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of rf_channel. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_802_11_rf_channel(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + HostCmd_DS_802_11_RF_CHANNEL *prf_chan = &cmd->params.rf_channel; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_RF_CHANNEL); + cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_802_11_RF_CHANNEL) + + S_DS_GEN); + + if (cmd_action == HostCmd_ACT_GEN_SET) { + if ((pmpriv->adapter->adhoc_start_band & BAND_A) + || (pmpriv->adapter->adhoc_start_band & BAND_AN) + ) + prf_chan->rf_type = HostCmd_SCAN_RADIO_TYPE_A; + SET_SECONDARYCHAN(prf_chan->rf_type, + pmpriv->adapter->chan_bandwidth); + prf_chan->rf_type = wlan_cpu_to_le16(prf_chan->rf_type); + prf_chan->current_channel = + wlan_cpu_to_le16(*((t_u16 *)pdata_buf)); + } + prf_chan->action = wlan_cpu_to_le16(cmd_action); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of ibss_coalescing_status. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer or MNULL + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_ibss_coalescing_status(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + HostCmd_DS_802_11_IBSS_STATUS *pibss_coal = + &(cmd->params.ibss_coalescing); + t_u16 enable = 0; + + ENTER(); + + cmd->command = + wlan_cpu_to_le16(HostCmd_CMD_802_11_IBSS_COALESCING_STATUS); + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_802_11_IBSS_STATUS) + + S_DS_GEN); + cmd->result = 0; + pibss_coal->action = wlan_cpu_to_le16(cmd_action); + + switch (cmd_action) { + case HostCmd_ACT_GEN_SET: + if (pdata_buf != MNULL) + enable = *(t_u16 *)pdata_buf; + pibss_coal->enable = wlan_cpu_to_le16(enable); + break; + + /* In other case.. Nothing to do */ + case HostCmd_ACT_GEN_GET: + default: + break; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of mgmt IE list. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_mgmt_ie_list(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + t_u16 req_len = 0, travel_len = 0; + custom_ie *cptr = MNULL; + mlan_ds_misc_custom_ie *cust_ie = MNULL; + HostCmd_DS_MGMT_IE_LIST_CFG *pmgmt_ie_list = + &(cmd->params.mgmt_ie_list); + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_MGMT_IE_LIST); + cmd->size = sizeof(HostCmd_DS_MGMT_IE_LIST_CFG) + S_DS_GEN; + cmd->result = 0; + pmgmt_ie_list->action = wlan_cpu_to_le16(cmd_action); + + cust_ie = (mlan_ds_misc_custom_ie *)pdata_buf; + pmgmt_ie_list->ds_mgmt_ie.type = wlan_cpu_to_le16(cust_ie->type); + pmgmt_ie_list->ds_mgmt_ie.len = wlan_cpu_to_le16(cust_ie->len); + + if (pmgmt_ie_list->ds_mgmt_ie.ie_data_list && cust_ie->ie_data_list) { + req_len = cust_ie->len; + travel_len = 0; + /* conversion for index, mask, len */ + if (req_len == sizeof(t_u16)) + cust_ie->ie_data_list[0].ie_index = + wlan_cpu_to_le16(cust_ie->ie_data_list[0]. + ie_index); + + while (req_len > sizeof(t_u16)) { + cptr = (custom_ie *)(((t_u8 *)cust_ie->ie_data_list) + + travel_len); + travel_len += + cptr->ie_length + sizeof(custom_ie) - + MAX_IE_SIZE; + req_len -= + cptr->ie_length + sizeof(custom_ie) - + MAX_IE_SIZE; + cptr->ie_index = wlan_cpu_to_le16(cptr->ie_index); + cptr->mgmt_subtype_mask = + wlan_cpu_to_le16(cptr->mgmt_subtype_mask); + cptr->ie_length = wlan_cpu_to_le16(cptr->ie_length); + } + if (cust_ie->len) + memcpy(pmpriv->adapter, + pmgmt_ie_list->ds_mgmt_ie.ie_data_list, + cust_ie->ie_data_list, cust_ie->len); + } + + cmd->size -= + (MAX_MGMT_IE_INDEX_TO_FW * sizeof(custom_ie)) + + sizeof(tlvbuf_max_mgmt_ie); + cmd->size += cust_ie->len; + cmd->size = wlan_cpu_to_le16(cmd->size); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of TDLS configuration. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_cmd_tdls_config(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + t_u16 travel_len = 0; + mlan_ds_misc_tdls_config *tdls_config = MNULL; + tdls_all_config *tdls_all_cfg = MNULL; + HostCmd_DS_TDLS_CONFIG *ptdls_config_data = + &(cmd->params.tdls_config_data); + t_u8 zero_mac[] = { 0, 0, 0, 0, 0, 0 }; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_TDLS_CONFIG); + cmd->size = sizeof(HostCmd_DS_TDLS_CONFIG) + S_DS_GEN; + cmd->result = 0; + + tdls_config = (mlan_ds_misc_tdls_config *)pdata_buf; + ptdls_config_data->tdls_info.tdls_action = + wlan_cpu_to_le16(tdls_config->tdls_action); + + tdls_all_cfg = (tdls_all_config *)tdls_config->tdls_data; + + switch (tdls_config->tdls_action) { + case WLAN_TDLS_CONFIG: + travel_len = sizeof(tdls_all_cfg->u.tdls_config); + tdls_all_cfg->u.tdls_config.enable = + wlan_cpu_to_le16(tdls_all_cfg->u.tdls_config.enable); + memcpy(pmpriv->adapter, ptdls_config_data->tdls_info.tdls_data, + &tdls_all_cfg->u.tdls_setup, travel_len); + break; + + case WLAN_TDLS_SET_INFO: + travel_len = tdls_all_cfg->u.tdls_set.tlv_length; + if ((travel_len + sizeof(t_u16)) > MAX_TDLS_DATA_LEN) { + PRINTM(MERROR, "TDLS configuration overflow\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + memcpy(pmpriv->adapter, ptdls_config_data->tdls_info.tdls_data, + (t_u8 *)&tdls_all_cfg->u.tdls_set.cap_info, + sizeof(t_u16)); + memcpy(pmpriv->adapter, + (t_u8 *)ptdls_config_data->tdls_info.tdls_data + + sizeof(t_u16), &tdls_all_cfg->u.tdls_set.tlv_buffer, + travel_len); + travel_len += sizeof(t_u16); + break; + case WLAN_TDLS_DISCOVERY_REQ: + travel_len = MLAN_MAC_ADDR_LENGTH; + memcpy(pmpriv->adapter, ptdls_config_data->tdls_info.tdls_data, + tdls_all_cfg->u.tdls_discovery.peer_mac_addr, + travel_len); + break; + + case WLAN_TDLS_SETUP_REQ: + travel_len = sizeof(tdls_all_cfg->u.tdls_setup); + tdls_all_cfg->u.tdls_setup.setup_timeout = + wlan_cpu_to_le32(tdls_all_cfg->u.tdls_setup. + setup_timeout); + tdls_all_cfg->u.tdls_setup.key_lifetime = + wlan_cpu_to_le32(tdls_all_cfg->u.tdls_setup. + key_lifetime); + memcpy(pmpriv->adapter, ptdls_config_data->tdls_info.tdls_data, + &tdls_all_cfg->u.tdls_setup, travel_len); + break; + + case WLAN_TDLS_TEAR_DOWN_REQ: + travel_len = sizeof(tdls_all_cfg->u.tdls_tear_down); + tdls_all_cfg->u.tdls_tear_down.reason_code = + wlan_cpu_to_le16(tdls_all_cfg->u.tdls_tear_down. + reason_code); + memcpy(pmpriv->adapter, ptdls_config_data->tdls_info.tdls_data, + &tdls_all_cfg->u.tdls_tear_down, travel_len); + break; + case WLAN_TDLS_STOP_CHAN_SWITCH: + travel_len = MLAN_MAC_ADDR_LENGTH; + memcpy(pmpriv->adapter, ptdls_config_data->tdls_info.tdls_data, + tdls_all_cfg->u.tdls_stop_chan_switch.peer_mac_addr, + travel_len); + break; + case WLAN_TDLS_INIT_CHAN_SWITCH: + travel_len = sizeof(tdls_all_cfg->u.tdls_chan_switch); + tdls_all_cfg->u.tdls_chan_switch.switch_time = + wlan_cpu_to_le16(tdls_all_cfg->u.tdls_chan_switch. + switch_time); + tdls_all_cfg->u.tdls_chan_switch.switch_timeout = + wlan_cpu_to_le16(tdls_all_cfg->u.tdls_chan_switch. + switch_timeout); + memcpy(pmpriv->adapter, ptdls_config_data->tdls_info.tdls_data, + &tdls_all_cfg->u.tdls_chan_switch, travel_len); + break; + case WLAN_TDLS_CS_PARAMS: + travel_len = sizeof(tdls_all_cfg->u.tdls_cs_params); + memcpy(pmpriv->adapter, ptdls_config_data->tdls_info.tdls_data, + &tdls_all_cfg->u.tdls_cs_params, travel_len); + break; + case WLAN_TDLS_CS_DISABLE: + travel_len = sizeof(tdls_all_cfg->u.tdls_disable_cs); + tdls_all_cfg->u.tdls_disable_cs.data = + wlan_cpu_to_le16(tdls_all_cfg->u.tdls_disable_cs.data); + memcpy(pmpriv->adapter, ptdls_config_data->tdls_info.tdls_data, + &tdls_all_cfg->u.tdls_disable_cs, travel_len); + break; + case WLAN_TDLS_POWER_MODE: + travel_len = sizeof(tdls_all_cfg->u.tdls_power_mode); + tdls_all_cfg->u.tdls_power_mode.power_mode = + wlan_cpu_to_le16(tdls_all_cfg->u.tdls_power_mode. + power_mode); + memcpy(pmpriv->adapter, ptdls_config_data->tdls_info.tdls_data, + &tdls_all_cfg->u.tdls_power_mode, travel_len); + break; + + case WLAN_TDLS_LINK_STATUS: + travel_len = 0; + if (memcmp + (pmpriv->adapter, + tdls_all_cfg->u.tdls_link_status_req.peer_mac_addr, + zero_mac, sizeof(zero_mac))) { + travel_len = + sizeof(tdls_all_cfg->u.tdls_link_status_req); + memcpy(pmpriv->adapter, + ptdls_config_data->tdls_info.tdls_data, + tdls_all_cfg->u.tdls_link_status_req. + peer_mac_addr, travel_len); + } + break; + + case WLAN_TDLS_DEBUG_ALLOW_WEAK_SECURITY: + case WLAN_TDLS_DEBUG_SETUP_SAME_LINK: + case WLAN_TDLS_DEBUG_FAIL_SETUP_CONFIRM: + case WLAN_TDLS_DEBUG_WRONG_BSS: + case WLAN_TDLS_DEBUG_SETUP_PROHIBITED: + case WLAN_TDLS_DEBUG_HIGHER_LOWER_MAC: + case WLAN_TDLS_DEBUG_IGNORE_KEY_EXPIRY: + case WLAN_TDLS_DEBUG_STOP_RX: + case WLAN_TDLS_DEBUG_CS_RET_IM: + travel_len = sizeof(tdls_all_cfg->u.tdls_debug_data); + tdls_all_cfg->u.tdls_debug_data.debug_data = + wlan_cpu_to_le16(tdls_all_cfg->u.tdls_debug_data. + debug_data); + memcpy(pmpriv->adapter, ptdls_config_data->tdls_info.tdls_data, + &tdls_all_cfg->u.tdls_debug_data, travel_len); + break; + + default: + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + cmd->size += travel_len; + cmd->size -= MAX_TDLS_DATA_LEN; + cmd->size = wlan_cpu_to_le16(cmd->size); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of TDLS create/config/delete + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_cmd_tdls_oper(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + t_u16 travel_len = 0; + mlan_ds_misc_tdls_oper *tdls_oper = MNULL; + HostCmd_DS_TDLS_OPER *ptdls_oper = &(cmd->params.tdls_oper_data); + sta_node *sta_ptr; + t_u8 *pos; + MrvlIEtypes_RatesParamSet_t *Rate_tlv = MNULL; + MrvlIETypes_HTCap_t *HTcap_tlv = MNULL; + MrvlIETypes_HTInfo_t *HTInfo_tlv = MNULL; + MrvlIETypes_2040BSSCo_t *BSSCo = MNULL; + MrvlIETypes_ExtCap_t *ExCap = MNULL; + MrvlIEtypes_RsnParamSet_t *Rsn_ie = MNULL; + MrvlIETypes_LinkIDElement_t *LinkID = MNULL; + BSSDescriptor_t *pbss_desc = &pmpriv->curr_bss_params.bss_descriptor; + MrvlIETypes_VHTCap_t *VHTcap_tlv = MNULL; + MrvlIETypes_VHTOprat_t *VHTOper_tlv = MNULL; + MrvlIETypes_AID_t *AidInfo = MNULL; + MrvlIEtypes_TDLS_Idle_Timeout_t *TdlsIdleTimeout = MNULL; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_TDLS_OPERATION); + cmd->size = sizeof(HostCmd_DS_TDLS_OPER) + S_DS_GEN; + cmd->result = 0; + + tdls_oper = (mlan_ds_misc_tdls_oper *)pdata_buf; + ptdls_oper->reason = 0; + memcpy(pmpriv->adapter, ptdls_oper->peer_mac, tdls_oper->peer_mac, + MLAN_MAC_ADDR_LENGTH); + sta_ptr = wlan_get_station_entry(pmpriv, tdls_oper->peer_mac); + pos = (t_u8 *)ptdls_oper + sizeof(HostCmd_DS_TDLS_OPER); + switch (tdls_oper->tdls_action) { + case WLAN_TDLS_CREATE_LINK: + if (sta_ptr) + sta_ptr->status = TDLS_SETUP_INPROGRESS; + ptdls_oper->tdls_action = wlan_cpu_to_le16(TDLS_CREATE); + break; + case WLAN_TDLS_CONFIG_LINK: + if (sta_ptr) { + ptdls_oper->tdls_action = wlan_cpu_to_le16(TDLS_CONFIG); + /* capability */ + if (tdls_oper->capability) + *(t_u16 *)pos = + wlan_cpu_to_le16(tdls_oper->capability); + else + *(t_u16 *)pos = + wlan_cpu_to_le16(sta_ptr->capability); + travel_len += sizeof(sta_ptr->capability); + + /* supported rate */ + Rate_tlv = + (MrvlIEtypes_RatesParamSet_t *)(pos + + travel_len); + Rate_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_RATES); + if (tdls_oper->supported_rates && + tdls_oper->supported_rates_len) { + Rate_tlv->header.len = + wlan_cpu_to_le16(tdls_oper-> + supported_rates_len); + memcpy(pmpriv->adapter, + pos + travel_len + + sizeof(MrvlIEtypesHeader_t), + tdls_oper->supported_rates, + tdls_oper->supported_rates_len); + travel_len += + sizeof(MrvlIEtypesHeader_t) + + tdls_oper->supported_rates_len; + } else { + Rate_tlv->header.len = + wlan_cpu_to_le16(sta_ptr->rate_len); + memcpy(pmpriv->adapter, + pos + travel_len + + sizeof(MrvlIEtypesHeader_t), + sta_ptr->support_rate, + Rate_tlv->header.len); + travel_len += + sizeof(MrvlIEtypesHeader_t) + + sta_ptr->rate_len; + } + + /* Extended capability */ + if (tdls_oper->ext_capab && tdls_oper->ext_capab_len) { + ExCap = (MrvlIETypes_ExtCap_t *)(pos + + travel_len); + ExCap->header.type = + wlan_cpu_to_le16(TLV_TYPE_EXTCAP); + ExCap->header.len = + wlan_cpu_to_le16(tdls_oper-> + ext_capab_len); + memcpy(pmpriv->adapter, + pos + travel_len + + sizeof(MrvlIEtypesHeader_t), + tdls_oper->ext_capab, + tdls_oper->ext_capab_len); + travel_len += + sizeof(MrvlIEtypesHeader_t) + + tdls_oper->ext_capab_len; + } else if (sta_ptr->ExtCap.ieee_hdr.element_id == + EXT_CAPABILITY) { + ExCap = (MrvlIETypes_ExtCap_t *)(pos + + travel_len); + ExCap->header.type = + wlan_cpu_to_le16(TLV_TYPE_EXTCAP); + ExCap->header.len = + wlan_cpu_to_le16(sta_ptr->ExtCap. + ieee_hdr.len); + memcpy(pmpriv->adapter, &ExCap->ext_cap, + &sta_ptr->ExtCap.ext_cap, + sta_ptr->ExtCap.ieee_hdr.len); + travel_len += + sta_ptr->ExtCap.ieee_hdr.len + + sizeof(MrvlIEtypesHeader_t); + + } + + /* RSN ie */ + if (sta_ptr->rsn_ie.ieee_hdr.element_id == RSN_IE) { + Rsn_ie = (MrvlIEtypes_RsnParamSet_t *)(pos + + travel_len); + Rsn_ie->header.type = + wlan_cpu_to_le16(sta_ptr->rsn_ie. + ieee_hdr.element_id); + Rsn_ie->header.len = + wlan_cpu_to_le16(sta_ptr->rsn_ie. + ieee_hdr.len); + memcpy(pmpriv->adapter, Rsn_ie->rsn_ie, + sta_ptr->rsn_ie.data, + sta_ptr->rsn_ie.ieee_hdr.len); + travel_len += + sta_ptr->rsn_ie.ieee_hdr.len + + sizeof(MrvlIEtypesHeader_t); + } + /* Link ID */ + if (sta_ptr->link_ie.element_id == LINK_ID) { + LinkID = (MrvlIETypes_LinkIDElement_t *)(pos + + travel_len); + LinkID->header.type = wlan_cpu_to_le16(LINK_ID); + LinkID->header.len = + wlan_cpu_to_le16(sta_ptr->link_ie.len); + memcpy(pmpriv->adapter, &LinkID->bssid, + &sta_ptr->link_ie.bssid, + sta_ptr->link_ie.len); + travel_len += + sta_ptr->link_ie.len + + sizeof(MrvlIEtypesHeader_t); + } + /* HT capability */ + if (tdls_oper->ht_capa) { + HTcap_tlv = + (MrvlIETypes_HTCap_t *)(pos + + travel_len); + HTcap_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_HT_CAP); + HTcap_tlv->header.len = + wlan_cpu_to_le16(sizeof(HTCap_t)); + memcpy(pmpriv->adapter, &HTcap_tlv->ht_cap, + tdls_oper->ht_capa, sizeof(HTCap_t)); + travel_len += + sizeof(HTCap_t) + + sizeof(MrvlIEtypesHeader_t); + } else if (sta_ptr->HTcap.ieee_hdr.element_id == + HT_CAPABILITY) { + HTcap_tlv = + (MrvlIETypes_HTCap_t *)(pos + + travel_len); + HTcap_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_HT_CAP); + HTcap_tlv->header.len = + wlan_cpu_to_le16(sta_ptr->HTcap. + ieee_hdr.len); + memcpy(pmpriv->adapter, &HTcap_tlv->ht_cap, + &sta_ptr->HTcap.ht_cap, + sta_ptr->HTcap.ieee_hdr.len); + travel_len += + sta_ptr->HTcap.ieee_hdr.len + + sizeof(MrvlIEtypesHeader_t); + } + if (HTcap_tlv) { + wlan_fill_ht_cap_tlv(pmpriv, HTcap_tlv, + pbss_desc->bss_band); + DBG_HEXDUMP(MCMD_D, "FW htcap", + (t_u8 *)HTcap_tlv, + sizeof(MrvlIETypes_HTCap_t)); + } + + /* HT info */ + if (sta_ptr->HTInfo.ieee_hdr.element_id == HT_OPERATION) { + HTInfo_tlv = + (MrvlIETypes_HTInfo_t *)(pos + + travel_len); + HTInfo_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_HT_INFO); + HTInfo_tlv->header.len = + wlan_cpu_to_le16(sta_ptr->HTInfo. + ieee_hdr.len); + memcpy(pmpriv->adapter, &HTInfo_tlv->ht_info, + &sta_ptr->HTInfo.ht_info, + sta_ptr->HTInfo.ieee_hdr.len); + travel_len += + sta_ptr->HTInfo.ieee_hdr.len + + sizeof(MrvlIEtypesHeader_t); + DBG_HEXDUMP(MCMD_D, "HT Info", + (t_u8 *)HTInfo_tlv, + sizeof(MrvlIETypes_HTInfo_t)); + } + /* 20/40 BSS co-exist */ + if (sta_ptr->BSSCO_20_40.ieee_hdr.element_id == + BSSCO_2040) { + BSSCo = (MrvlIETypes_2040BSSCo_t *)(pos + + travel_len); + BSSCo->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_2040BSS_COEXISTENCE); + BSSCo->header.len = + wlan_cpu_to_le16(sta_ptr->BSSCO_20_40. + ieee_hdr.len); + memcpy(pmpriv->adapter, &BSSCo->bss_co_2040, + &sta_ptr->BSSCO_20_40.bss_co_2040, + sta_ptr->BSSCO_20_40.ieee_hdr.len); + travel_len += + sta_ptr->BSSCO_20_40.ieee_hdr.len + + sizeof(MrvlIEtypesHeader_t); + } + /* Check if we need enable the 11AC */ + if (sta_ptr && + sta_ptr->vht_oprat.ieee_hdr.element_id == + VHT_OPERATION) { + /** AID */ + if (sta_ptr->aid_info.ieee_hdr.element_id == + AID_INFO) { + AidInfo = + (MrvlIETypes_AID_t *)(pos + + travel_len); + AidInfo->header.type = + wlan_cpu_to_le16(AID_INFO); + AidInfo->header.len = + wlan_cpu_to_le16(sta_ptr-> + aid_info. + ieee_hdr.len); + AidInfo->AID = + wlan_cpu_to_le16(sta_ptr-> + aid_info.AID); + } + /* Vht capability */ + if (tdls_oper->vht_cap) { + VHTcap_tlv = + (MrvlIETypes_VHTCap_t *)(pos + + travel_len); + VHTcap_tlv->header.type = + wlan_cpu_to_le16 + (VHT_CAPABILITY); + VHTcap_tlv->header.len = + wlan_cpu_to_le16(sizeof + (VHT_capa_t)); + memcpy(pmpriv->adapter, + &VHTcap_tlv->vht_cap, + tdls_oper->vht_cap, + sizeof(VHT_capa_t)); + travel_len += + sizeof(MrvlIETypes_VHTCap_t); + } else if (sta_ptr->vht_cap.ieee_hdr. + element_id == VHT_CAPABILITY) { + VHTcap_tlv = + (MrvlIETypes_VHTCap_t *)(pos + + travel_len); + VHTcap_tlv->header.type = + wlan_cpu_to_le16 + (VHT_CAPABILITY); + VHTcap_tlv->header.len = + wlan_cpu_to_le16(sta_ptr-> + vht_cap. + ieee_hdr.len); + memcpy(pmpriv->adapter, + &VHTcap_tlv->vht_cap, + &sta_ptr->vht_cap.vht_cap, + sta_ptr->vht_cap.ieee_hdr.len); + travel_len += + sta_ptr->vht_cap.ieee_hdr.len + + sizeof(MrvlIEtypesHeader_t); + } + if (VHTcap_tlv) { + wlan_fill_vht_cap_tlv(pmpriv, + VHTcap_tlv, + pbss_desc-> + bss_band); + DBG_HEXDUMP(MCMD_D, "FW Vhtcap", + (t_u8 *)VHTcap_tlv, + sizeof + (MrvlIETypes_VHTCap_t)); + } + + /* Vht operation */ + VHTOper_tlv = + (MrvlIETypes_VHTOprat_t *)(pos + + travel_len); + VHTOper_tlv->header.type = + wlan_cpu_to_le16(VHT_OPERATION); + VHTOper_tlv->header.len = + wlan_cpu_to_le16(sta_ptr->vht_oprat. + ieee_hdr.len); + memcpy(pmpriv->adapter, + &VHTOper_tlv->chan_width, + &sta_ptr->vht_oprat.chan_width, + sta_ptr->vht_oprat.ieee_hdr.len); + VHTOper_tlv->basic_MCS_map = + wlan_cpu_to_le16(VHTOper_tlv-> + basic_MCS_map); + travel_len += + sta_ptr->vht_oprat.ieee_hdr.len + + sizeof(MrvlIEtypesHeader_t); + DBG_HEXDUMP(MCMD_D, "VHT operation", + (t_u8 *)VHTOper_tlv, + sizeof(MrvlIETypes_VHTOprat_t)); + } + TdlsIdleTimeout = + (MrvlIEtypes_TDLS_Idle_Timeout_t *)(pos + + travel_len); + TdlsIdleTimeout->header.type = + wlan_cpu_to_le16(TLV_TYPE_TDLS_IDLE_TIMEOUT); + TdlsIdleTimeout->header.len = + sizeof(TdlsIdleTimeout->value); + TdlsIdleTimeout->header.len = + wlan_cpu_to_le16(TdlsIdleTimeout->header.len); + if (pmpriv->tdls_idle_time == 0) + TdlsIdleTimeout->value = + wlan_cpu_to_le16(TDLS_IDLE_TIMEOUT); + else + TdlsIdleTimeout->value = + wlan_cpu_to_le16(pmpriv-> + tdls_idle_time); + travel_len += sizeof(MrvlIEtypes_TDLS_Idle_Timeout_t); + } + break; + case WLAN_TDLS_DISABLE_LINK: + if (sta_ptr) + sta_ptr->status = TDLS_TEAR_DOWN; + ptdls_oper->tdls_action = wlan_cpu_to_le16(TDLS_DELETE); + break; + default: + break; + } + cmd->size += travel_len; + cmd->size = wlan_cpu_to_le16(cmd->size); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares system clock cfg command + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_sysclock_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG *cfg = &cmd->params.sys_clock_cfg; + mlan_ds_misc_sys_clock *clk_cfg = (mlan_ds_misc_sys_clock *)pdata_buf; + int i = 0; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_ECL_SYSTEM_CLOCK_CONFIG); + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG) + + S_DS_GEN); + + cfg->action = wlan_cpu_to_le16(cmd_action); + cfg->cur_sys_clk = wlan_cpu_to_le16(clk_cfg->cur_sys_clk); + cfg->sys_clk_type = wlan_cpu_to_le16(clk_cfg->sys_clk_type); + cfg->sys_clk_len = + wlan_cpu_to_le16(clk_cfg->sys_clk_num) * sizeof(t_u16); + for (i = 0; i < clk_cfg->sys_clk_num; i++) + cfg->sys_clk[i] = wlan_cpu_to_le16(clk_cfg->sys_clk[i]); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of subscribe event. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action the action: GET or SET + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_subscribe_event(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + mlan_ds_subscribe_evt *sub_evt = (mlan_ds_subscribe_evt *)pdata_buf; + HostCmd_DS_SUBSCRIBE_EVENT *evt = + (HostCmd_DS_SUBSCRIBE_EVENT *)&cmd->params.subscribe_event; + t_u16 cmd_size = 0; + t_u8 *tlv = MNULL; + MrvlIEtypes_BeaconLowRssiThreshold_t *rssi_low = MNULL; + MrvlIEtypes_BeaconLowSnrThreshold_t *snr_low = MNULL; + MrvlIEtypes_FailureCount_t *fail_count = MNULL; + MrvlIEtypes_BeaconsMissed_t *beacon_missed = MNULL; + MrvlIEtypes_BeaconHighRssiThreshold_t *rssi_high = MNULL; + MrvlIEtypes_BeaconHighSnrThreshold_t *snr_high = MNULL; + MrvlIEtypes_DataLowRssiThreshold_t *data_rssi_low = MNULL; + MrvlIEtypes_DataLowSnrThreshold_t *data_snr_low = MNULL; + MrvlIEtypes_DataHighRssiThreshold_t *data_rssi_high = MNULL; + MrvlIEtypes_DataHighSnrThreshold_t *data_snr_high = MNULL; + MrvlIEtypes_LinkQualityThreshold_t *link_quality = MNULL; + MrvlIETypes_PreBeaconMissed_t *pre_bcn_missed = MNULL; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_SUBSCRIBE_EVENT); + evt->action = wlan_cpu_to_le16(cmd_action); + cmd_size = sizeof(HostCmd_DS_SUBSCRIBE_EVENT) + S_DS_GEN; + if (cmd_action == HostCmd_ACT_GEN_GET) + goto done; + evt->action = wlan_cpu_to_le16(sub_evt->evt_action); + evt->event_bitmap = wlan_cpu_to_le16(sub_evt->evt_bitmap); + tlv = (t_u8 *)cmd + cmd_size; + if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_RSSI_LOW) { + rssi_low = (MrvlIEtypes_BeaconLowRssiThreshold_t *)tlv; + rssi_low->header.type = wlan_cpu_to_le16(TLV_TYPE_RSSI_LOW); + rssi_low->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_BeaconLowRssiThreshold_t) + - sizeof(MrvlIEtypesHeader_t)); + rssi_low->value = sub_evt->low_rssi; + rssi_low->frequency = sub_evt->low_rssi_freq; + tlv += sizeof(MrvlIEtypes_BeaconLowRssiThreshold_t); + cmd_size += sizeof(MrvlIEtypes_BeaconLowRssiThreshold_t); + } + if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_SNR_LOW) { + snr_low = (MrvlIEtypes_BeaconLowSnrThreshold_t *)tlv; + snr_low->header.type = wlan_cpu_to_le16(TLV_TYPE_SNR_LOW); + snr_low->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_BeaconLowSnrThreshold_t) - + sizeof(MrvlIEtypesHeader_t)); + snr_low->value = sub_evt->low_snr; + snr_low->frequency = sub_evt->low_snr_freq; + tlv += sizeof(MrvlIEtypes_BeaconLowSnrThreshold_t); + cmd_size += sizeof(MrvlIEtypes_BeaconLowSnrThreshold_t); + } + if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_MAX_FAIL) { + fail_count = (MrvlIEtypes_FailureCount_t *)tlv; + fail_count->header.type = wlan_cpu_to_le16(TLV_TYPE_FAILCOUNT); + fail_count->header.len = + wlan_cpu_to_le16(sizeof(MrvlIEtypes_FailureCount_t) - + sizeof(MrvlIEtypesHeader_t)); + fail_count->value = sub_evt->failure_count; + fail_count->frequency = sub_evt->failure_count_freq; + tlv += sizeof(MrvlIEtypes_FailureCount_t); + cmd_size += sizeof(MrvlIEtypes_FailureCount_t); + } + if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_BEACON_MISSED) { + beacon_missed = (MrvlIEtypes_BeaconsMissed_t *)tlv; + beacon_missed->header.type = wlan_cpu_to_le16(TLV_TYPE_BCNMISS); + beacon_missed->header.len = + wlan_cpu_to_le16(sizeof(MrvlIEtypes_BeaconsMissed_t) - + sizeof(MrvlIEtypesHeader_t)); + beacon_missed->value = sub_evt->beacon_miss; + beacon_missed->frequency = sub_evt->beacon_miss_freq; + tlv += sizeof(MrvlIEtypes_BeaconsMissed_t); + cmd_size += sizeof(MrvlIEtypes_BeaconsMissed_t); + } + if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_RSSI_HIGH) { + rssi_high = (MrvlIEtypes_BeaconHighRssiThreshold_t *)tlv; + rssi_high->header.type = wlan_cpu_to_le16(TLV_TYPE_RSSI_HIGH); + rssi_high->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_BeaconHighRssiThreshold_t) + - sizeof(MrvlIEtypesHeader_t)); + rssi_high->value = sub_evt->high_rssi; + rssi_high->frequency = sub_evt->high_rssi_freq; + tlv += sizeof(MrvlIEtypes_BeaconHighRssiThreshold_t); + cmd_size += sizeof(MrvlIEtypes_BeaconHighRssiThreshold_t); + } + if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_SNR_HIGH) { + snr_high = (MrvlIEtypes_BeaconHighSnrThreshold_t *)tlv; + snr_high->header.type = wlan_cpu_to_le16(TLV_TYPE_SNR_HIGH); + snr_high->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_BeaconHighSnrThreshold_t) + - sizeof(MrvlIEtypesHeader_t)); + snr_high->value = sub_evt->high_snr; + snr_high->frequency = sub_evt->high_snr_freq; + tlv += sizeof(MrvlIEtypes_BeaconHighSnrThreshold_t); + cmd_size += sizeof(MrvlIEtypes_BeaconHighSnrThreshold_t); + } + if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_DATA_RSSI_LOW) { + data_rssi_low = (MrvlIEtypes_DataLowRssiThreshold_t *)tlv; + data_rssi_low->header.type = + wlan_cpu_to_le16(TLV_TYPE_RSSI_LOW_DATA); + data_rssi_low->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_DataLowRssiThreshold_t) - + sizeof(MrvlIEtypesHeader_t)); + data_rssi_low->value = sub_evt->data_low_rssi; + data_rssi_low->frequency = sub_evt->data_low_rssi_freq; + tlv += sizeof(MrvlIEtypes_DataLowRssiThreshold_t); + cmd_size += sizeof(MrvlIEtypes_DataLowRssiThreshold_t); + } + if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_DATA_SNR_LOW) { + data_snr_low = (MrvlIEtypes_DataLowSnrThreshold_t *)tlv; + data_snr_low->header.type = + wlan_cpu_to_le16(TLV_TYPE_SNR_LOW_DATA); + data_snr_low->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_DataLowSnrThreshold_t) - + sizeof(MrvlIEtypesHeader_t)); + data_snr_low->value = sub_evt->data_low_snr; + data_snr_low->frequency = sub_evt->data_low_snr_freq; + tlv += sizeof(MrvlIEtypes_DataLowSnrThreshold_t); + cmd_size += sizeof(MrvlIEtypes_DataLowSnrThreshold_t); + } + if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_DATA_RSSI_HIGH) { + data_rssi_high = (MrvlIEtypes_DataHighRssiThreshold_t *)tlv; + data_rssi_high->header.type = + wlan_cpu_to_le16(TLV_TYPE_RSSI_HIGH_DATA); + data_rssi_high->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_DataHighRssiThreshold_t) - + sizeof(MrvlIEtypesHeader_t)); + data_rssi_high->value = sub_evt->data_high_rssi; + data_rssi_high->frequency = sub_evt->data_high_rssi_freq; + tlv += sizeof(MrvlIEtypes_DataHighRssiThreshold_t); + cmd_size += sizeof(MrvlIEtypes_DataHighRssiThreshold_t); + } + if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_DATA_SNR_HIGH) { + data_snr_high = (MrvlIEtypes_DataHighSnrThreshold_t *)tlv; + data_snr_high->header.type = + wlan_cpu_to_le16(TLV_TYPE_SNR_HIGH_DATA); + data_snr_high->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_DataHighSnrThreshold_t) - + sizeof(MrvlIEtypesHeader_t)); + data_snr_high->value = sub_evt->data_high_snr; + data_snr_high->frequency = sub_evt->data_high_snr_freq; + tlv += sizeof(MrvlIEtypes_DataHighSnrThreshold_t); + cmd_size += sizeof(MrvlIEtypes_DataHighSnrThreshold_t); + } + if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_LINK_QUALITY) { + link_quality = (MrvlIEtypes_LinkQualityThreshold_t *)tlv; + link_quality->header.type = + wlan_cpu_to_le16(TLV_TYPE_LINK_QUALITY); + link_quality->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_LinkQualityThreshold_t) - + sizeof(MrvlIEtypesHeader_t)); + link_quality->link_snr = wlan_cpu_to_le16(sub_evt->link_snr); + link_quality->link_snr_freq = + wlan_cpu_to_le16(sub_evt->link_snr_freq); + link_quality->link_rate = wlan_cpu_to_le16(sub_evt->link_rate); + link_quality->link_rate_freq = + wlan_cpu_to_le16(sub_evt->link_rate_freq); + link_quality->link_tx_latency = + wlan_cpu_to_le16(sub_evt->link_tx_latency); + link_quality->link_tx_lantency_freq = + wlan_cpu_to_le16(sub_evt->link_tx_lantency_freq); + tlv += sizeof(MrvlIEtypes_LinkQualityThreshold_t); + cmd_size += sizeof(MrvlIEtypes_LinkQualityThreshold_t); + } + if (sub_evt->evt_bitmap & SUBSCRIBE_EVT_PRE_BEACON_LOST) { + pre_bcn_missed = (MrvlIETypes_PreBeaconMissed_t *)tlv; + pre_bcn_missed->header.type = + wlan_cpu_to_le16(TLV_TYPE_PRE_BCNMISS); + pre_bcn_missed->header.len = + wlan_cpu_to_le16(sizeof(MrvlIETypes_PreBeaconMissed_t) - + sizeof(MrvlIEtypesHeader_t)); + pre_bcn_missed->value = sub_evt->pre_beacon_miss; + pre_bcn_missed->frequency = 0; + tlv += sizeof(MrvlIETypes_PreBeaconMissed_t); + cmd_size += sizeof(MrvlIETypes_PreBeaconMissed_t); + } +done: + cmd->size = wlan_cpu_to_le16(cmd_size); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of OTP user data. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action the action: GET or SET + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_otp_user_data(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + mlan_ds_misc_otp_user_data *user_data = + (mlan_ds_misc_otp_user_data *)pdata_buf; + HostCmd_DS_OTP_USER_DATA *cmd_user_data = + (HostCmd_DS_OTP_USER_DATA *)&cmd->params.otp_user_data; + t_u16 cmd_size = 0; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_OTP_READ_USER_DATA); + cmd_size = sizeof(HostCmd_DS_OTP_USER_DATA) + S_DS_GEN - 1; + + cmd_user_data->action = wlan_cpu_to_le16(cmd_action); + cmd_user_data->reserved = 0; + cmd_user_data->user_data_length = + wlan_cpu_to_le16(user_data->user_data_length); + cmd_size += user_data->user_data_length; + cmd->size = wlan_cpu_to_le16(cmd_size); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares inactivity timeout command + * + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action the action: GET or SET + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_inactivity_timeout(IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + pmlan_ds_inactivity_to inac_to; + HostCmd_DS_INACTIVITY_TIMEOUT_EXT *cmd_inac_to = + &cmd->params.inactivity_to; + + ENTER(); + + inac_to = (mlan_ds_inactivity_to *)pdata_buf; + + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_INACTIVITY_TIMEOUT_EXT) + + S_DS_GEN); + cmd->command = wlan_cpu_to_le16(cmd->command); + cmd_inac_to->action = wlan_cpu_to_le16(cmd_action); + if (cmd_action == HostCmd_ACT_GEN_SET) { + cmd_inac_to->timeout_unit = + wlan_cpu_to_le16((t_u16)inac_to->timeout_unit); + cmd_inac_to->unicast_timeout = + wlan_cpu_to_le16((t_u16)inac_to->unicast_timeout); + cmd_inac_to->mcast_timeout = + wlan_cpu_to_le16((t_u16)inac_to->mcast_timeout); + cmd_inac_to->ps_entry_timeout = + wlan_cpu_to_le16((t_u16)inac_to->ps_entry_timeout); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares Low Power Mode + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action the action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_cmd_low_pwr_mode(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) +{ + HostCmd_CONFIG_LOW_PWR_MODE *cmd_lpm_cfg = + &cmd->params.low_pwr_mode_cfg; + t_u8 *enable; + + ENTER(); + + cmd->size = S_DS_GEN + sizeof(HostCmd_CONFIG_LOW_PWR_MODE); + + enable = (t_u8 *)pdata_buf; + cmd->size = wlan_cpu_to_le16(cmd->size); + cmd->command = wlan_cpu_to_le16(cmd->command); + cmd_lpm_cfg->enable = *enable; + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of coalesce_config. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_coalesce_config(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + HostCmd_DS_COALESCE_CONFIG *coalesce_config = + &cmd->params.coalesce_config; + mlan_ds_coalesce_cfg *cfg = (mlan_ds_coalesce_cfg *) pdata_buf; + t_u16 cnt, idx, length; + struct coalesce_filt_field_param *param; + struct coalesce_receive_filt_rule *rule; + ENTER(); + + cmd->size = sizeof(HostCmd_DS_COALESCE_CONFIG) + S_DS_GEN; + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_COALESCE_CFG); + coalesce_config->action = wlan_cpu_to_le16(cmd_action); + coalesce_config->num_of_rules = wlan_cpu_to_le16(cfg->num_of_rules); + if (cmd_action == HostCmd_ACT_GEN_SET) { + rule = coalesce_config->rule; + for (cnt = 0; cnt < cfg->num_of_rules; cnt++) { + rule->header.type = + wlan_cpu_to_le16(TLV_TYPE_COALESCE_RULE); + rule->max_coalescing_delay = + wlan_cpu_to_le16(cfg->rule[cnt]. + max_coalescing_delay); + rule->pkt_type = cfg->rule[cnt].pkt_type; + rule->num_of_fields = cfg->rule[cnt].num_of_fields; + + length = 0; + + param = rule->params; + for (idx = 0; idx < cfg->rule[cnt].num_of_fields; idx++) { + param->operation = + cfg->rule[cnt].params[idx].operation; + param->operand_len = + cfg->rule[cnt].params[idx].operand_len; + param->offset = + wlan_cpu_to_le16(cfg->rule[cnt]. + params[idx].offset); + memcpy(pmpriv->adapter, + param->operand_byte_stream, + cfg->rule[cnt].params[idx]. + operand_byte_stream, param->operand_len); + + length += + sizeof(struct + coalesce_filt_field_param); + + param++; + } + + /* Total rule length is sizeof + max_coalescing_delay(t_u16), * num_of_fields(t_u8), + pkt_type(t_u8) and total length of the all * params */ + rule->header.len = + wlan_cpu_to_le16(length + sizeof(t_u16) + + sizeof(t_u8) + sizeof(t_u8)); + + /* Add the rule length to the command size */ + cmd->size += + wlan_le16_to_cpu(rule->header.len) + + sizeof(MrvlIEtypesHeader_t); + + rule = (void *)((t_u8 *)rule->params + length); + } + + } + cmd->size = wlan_cpu_to_le16(cmd->size); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/******************************************************** + Global Functions +********************************************************/ + +/** + * @brief This function prepare the command before sending to firmware. + * + * @param priv A pointer to mlan_private structure + * @param cmd_no Command number + * @param cmd_action Command action: GET or SET + * @param cmd_oid Cmd oid: treated as sub command + * @param pioctl_buf A pointer to MLAN IOCTL Request buffer + * @param pdata_buf A pointer to information buffer + * @param pcmd_buf A pointer to cmd buf + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ops_sta_prepare_cmd(IN t_void *priv, + IN t_u16 cmd_no, + IN t_u16 cmd_action, + IN t_u32 cmd_oid, + IN t_void *pioctl_buf, + IN t_void *pdata_buf, IN t_void *pcmd_buf) +{ + HostCmd_DS_COMMAND *cmd_ptr = (HostCmd_DS_COMMAND *)pcmd_buf; + mlan_private *pmpriv = (mlan_private *)priv; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Prepare command */ + switch (cmd_no) { + case HostCmd_CMD_GET_HW_SPEC: + ret = wlan_cmd_get_hw_spec(pmpriv, cmd_ptr); + break; + case HostCmd_CMD_CFG_DATA: + ret = wlan_cmd_cfg_data(pmpriv, cmd_ptr, cmd_action, pdata_buf); + break; + case HostCmd_CMD_MAC_CONTROL: + ret = wlan_cmd_mac_control(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_802_11_MAC_ADDRESS: + ret = wlan_cmd_802_11_mac_address(pmpriv, cmd_ptr, cmd_action); + break; + case HostCmd_CMD_MAC_MULTICAST_ADR: + ret = wlan_cmd_mac_multicast_adr(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_TX_RATE_CFG: + ret = wlan_cmd_tx_rate_cfg(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_802_11_RF_ANTENNA: + ret = wlan_cmd_802_11_rf_antenna(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_TXPWR_CFG: + ret = wlan_cmd_tx_power_cfg(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_802_11_RF_TX_POWER: + ret = wlan_cmd_802_11_rf_tx_power(pmpriv, cmd_ptr, + cmd_action, pdata_buf); + break; + case HostCmd_CMD_802_11_PS_MODE_ENH: + ret = wlan_cmd_enh_power_mode(pmpriv, cmd_ptr, cmd_action, + (t_u16)cmd_oid, pdata_buf); + break; + case HostCmd_CMD_802_11_HS_CFG_ENH: + ret = wlan_cmd_802_11_hs_cfg(pmpriv, cmd_ptr, cmd_action, + (hs_config_param *)pdata_buf); + break; + case HostCmd_CMD_802_11_SLEEP_PERIOD: + ret = wlan_cmd_802_11_sleep_period(pmpriv, cmd_ptr, + cmd_action, + (t_u16 *)pdata_buf); + break; + case HostCmd_CMD_802_11_SLEEP_PARAMS: + ret = wlan_cmd_802_11_sleep_params(pmpriv, cmd_ptr, + cmd_action, + (t_u16 *)pdata_buf); + break; + case HostCmd_CMD_802_11_SCAN: + ret = wlan_cmd_802_11_scan(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_802_11_BG_SCAN_CONFIG: + ret = wlan_cmd_bgscan_config(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_802_11_BG_SCAN_QUERY: + ret = wlan_cmd_802_11_bg_scan_query(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_802_11_ASSOCIATE: + ret = wlan_cmd_802_11_associate(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_802_11_DEAUTHENTICATE: + case HostCmd_CMD_802_11_DISASSOCIATE: + ret = wlan_cmd_802_11_deauthenticate(pmpriv, cmd_no, cmd_ptr, + pdata_buf); + break; + case HostCmd_CMD_802_11_AD_HOC_START: + ret = wlan_cmd_802_11_ad_hoc_start(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_802_11_AD_HOC_JOIN: + ret = wlan_cmd_802_11_ad_hoc_join(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_802_11_AD_HOC_STOP: + ret = wlan_cmd_802_11_ad_hoc_stop(pmpriv, cmd_ptr); + break; + case HostCmd_CMD_802_11_GET_LOG: + ret = wlan_cmd_802_11_get_log(pmpriv, cmd_ptr); + break; + case HostCmd_CMD_RSSI_INFO: + ret = wlan_cmd_802_11_rssi_info(pmpriv, cmd_ptr, cmd_action); + break; + case HostCmd_CMD_802_11_SNMP_MIB: + ret = wlan_cmd_802_11_snmp_mib(pmpriv, cmd_ptr, cmd_action, + cmd_oid, pdata_buf); + break; + case HostCmd_CMD_802_11_RADIO_CONTROL: + ret = wlan_cmd_802_11_radio_control(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_802_11_TX_RATE_QUERY: + cmd_ptr->command = + wlan_cpu_to_le16(HostCmd_CMD_802_11_TX_RATE_QUERY); + cmd_ptr->size = + wlan_cpu_to_le16(sizeof(HostCmd_TX_RATE_QUERY) + + S_DS_GEN); + pmpriv->tx_rate = 0; + ret = MLAN_STATUS_SUCCESS; + break; + case HostCmd_CMD_VERSION_EXT: + cmd_ptr->command = wlan_cpu_to_le16(cmd_no); + cmd_ptr->params.verext.version_str_sel = + (t_u8)(*((t_u32 *)pdata_buf)); + cmd_ptr->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_VERSION_EXT) + + S_DS_GEN); + ret = MLAN_STATUS_SUCCESS; + break; + case HostCmd_CMD_RX_MGMT_IND: + cmd_ptr->command = wlan_cpu_to_le16(cmd_no); + cmd_ptr->params.rx_mgmt_ind.action = + wlan_cpu_to_le16(cmd_action); + cmd_ptr->params.rx_mgmt_ind.mgmt_subtype_mask = + wlan_cpu_to_le32((t_u32)(*((t_u32 *)pdata_buf))); + cmd_ptr->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_RX_MGMT_IND) + + S_DS_GEN); + break; + case HostCmd_CMD_802_11_RF_CHANNEL: + ret = wlan_cmd_802_11_rf_channel(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_FUNC_INIT: + if (pmpriv->adapter->hw_status == WlanHardwareStatusReset) + pmpriv->adapter->hw_status = + WlanHardwareStatusInitializing; + cmd_ptr->command = wlan_cpu_to_le16(cmd_no); + cmd_ptr->size = wlan_cpu_to_le16(S_DS_GEN); + break; + case HostCmd_CMD_FUNC_SHUTDOWN: + pmpriv->adapter->hw_status = WlanHardwareStatusReset; + cmd_ptr->command = wlan_cpu_to_le16(cmd_no); + cmd_ptr->size = wlan_cpu_to_le16(S_DS_GEN); + break; + case HostCmd_CMD_SOFT_RESET: + cmd_ptr->command = wlan_cpu_to_le16(cmd_no); + cmd_ptr->size = wlan_cpu_to_le16(S_DS_GEN); + break; + case HostCmd_CMD_11N_ADDBA_REQ: + ret = wlan_cmd_11n_addba_req(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_11N_DELBA: + ret = wlan_cmd_11n_delba(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_11N_ADDBA_RSP: + ret = wlan_cmd_11n_addba_rspgen(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_802_11_KEY_MATERIAL: + ret = wlan_cmd_802_11_key_material(pmpriv, cmd_ptr, cmd_action, + cmd_oid, pdata_buf); + break; + + case HostCmd_CMD_SUPPLICANT_PMK: + ret = wlan_cmd_802_11_supplicant_pmk(pmpriv, cmd_ptr, + cmd_action, pdata_buf); + break; + case HostCmd_CMD_802_11_EAPOL_PKT: + ret = wlan_cmd_eapol_pkt(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_SUPPLICANT_PROFILE: + ret = wlan_cmd_802_11_supplicant_profile(pmpriv, cmd_ptr, + cmd_action, pdata_buf); + break; + + case HostCmd_CMD_802_11D_DOMAIN_INFO: + ret = wlan_cmd_802_11d_domain_info(pmpriv, cmd_ptr, cmd_action); + break; + case HostCmd_CMD_802_11_TPC_ADAPT_REQ: + case HostCmd_CMD_802_11_TPC_INFO: + case HostCmd_CMD_802_11_CHAN_SW_ANN: + case HostCmd_CMD_CHAN_REPORT_REQUEST: + ret = wlan_11h_cmd_process(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_RECONFIGURE_TX_BUFF: + ret = wlan_cmd_recfg_tx_buf(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_AMSDU_AGGR_CTRL: + ret = wlan_cmd_amsdu_aggr_ctrl(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_11N_CFG: + ret = wlan_cmd_11n_cfg(pmpriv, cmd_ptr, cmd_action, pdata_buf); + break; + case HostCmd_CMD_11AC_CFG: + ret = wlan_cmd_11ac_cfg(pmpriv, cmd_ptr, cmd_action, pdata_buf); + break; +#if 0 + case HostCmd_CMD_RECONFIGURE_TX_BUFF: + ret = wlan_cmd_recfg_tx_buf(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; +#endif + case HostCmd_CMD_TX_BF_CFG: + ret = wlan_cmd_tx_bf_cfg(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_WMM_GET_STATUS: + PRINTM(MINFO, "WMM: WMM_GET_STATUS cmd sent\n"); + cmd_ptr->command = wlan_cpu_to_le16(HostCmd_CMD_WMM_GET_STATUS); + cmd_ptr->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_WMM_GET_STATUS) + + S_DS_GEN); + ret = MLAN_STATUS_SUCCESS; + break; + case HostCmd_CMD_WMM_ADDTS_REQ: + ret = wlan_cmd_wmm_addts_req(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_WMM_DELTS_REQ: + ret = wlan_cmd_wmm_delts_req(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_WMM_QUEUE_CONFIG: + ret = wlan_cmd_wmm_queue_config(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_WMM_QUEUE_STATS: + ret = wlan_cmd_wmm_queue_stats(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_WMM_TS_STATUS: + ret = wlan_cmd_wmm_ts_status(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_802_11_IBSS_COALESCING_STATUS: + ret = wlan_cmd_ibss_coalescing_status(pmpriv, cmd_ptr, + cmd_action, pdata_buf); + break; + case HostCmd_CMD_MGMT_IE_LIST: + ret = wlan_cmd_mgmt_ie_list(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_TDLS_CONFIG: + ret = wlan_cmd_tdls_config(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_TDLS_OPERATION: + ret = wlan_cmd_tdls_oper(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_802_11_SCAN_EXT: + ret = wlan_cmd_802_11_scan_ext(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_ECL_SYSTEM_CLOCK_CONFIG: + ret = wlan_cmd_sysclock_cfg(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_MAC_REG_ACCESS: + case HostCmd_CMD_BBP_REG_ACCESS: + case HostCmd_CMD_RF_REG_ACCESS: + case HostCmd_CMD_CAU_REG_ACCESS: + case HostCmd_CMD_TARGET_ACCESS: + case HostCmd_CMD_802_11_EEPROM_ACCESS: + ret = wlan_cmd_reg_access(cmd_ptr, cmd_action, pdata_buf); + break; + case HostCmd_CMD_MEM_ACCESS: + ret = wlan_cmd_mem_access(cmd_ptr, cmd_action, pdata_buf); + break; + case HostCmd_CMD_INACTIVITY_TIMEOUT_EXT: + ret = wlan_cmd_inactivity_timeout(cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_SDIO_GPIO_INT_CONFIG: + ret = wlan_cmd_sdio_gpio_int(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_SET_BSS_MODE: + cmd_ptr->command = wlan_cpu_to_le16(cmd_no); +#ifdef WIFI_DIRECT_SUPPORT + if (pdata_buf) { + cmd_ptr->params.bss_mode.con_type = *(t_u8 *)pdata_buf; + } else +#endif + if (pmpriv->bss_mode == MLAN_BSS_MODE_IBSS) + cmd_ptr->params.bss_mode.con_type = + CONNECTION_TYPE_ADHOC; + else if (pmpriv->bss_mode == MLAN_BSS_MODE_INFRA) + cmd_ptr->params.bss_mode.con_type = + CONNECTION_TYPE_INFRA; + cmd_ptr->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_SET_BSS_MODE) + + S_DS_GEN); + ret = MLAN_STATUS_SUCCESS; + break; + case HostCmd_CMD_MEASUREMENT_REQUEST: + case HostCmd_CMD_MEASUREMENT_REPORT: + ret = wlan_meas_cmd_process(pmpriv, cmd_ptr, pdata_buf); + break; +#ifdef WIFI_DIRECT_SUPPORT + case HostCmd_CMD_802_11_REMAIN_ON_CHANNEL: + ret = wlan_cmd_remain_on_channel(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HOST_CMD_WIFI_DIRECT_MODE_CONFIG: + ret = wlan_cmd_wifi_direct_mode(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; +#endif + case HostCmd_CMD_802_11_SUBSCRIBE_EVENT: + ret = wlan_cmd_subscribe_event(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_OTP_READ_USER_DATA: + ret = wlan_cmd_otp_user_data(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_HS_WAKEUP_REASON: + ret = wlan_cmd_hs_wakeup_reason(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_REJECT_ADDBA_REQ: + ret = wlan_cmd_reject_addba_req(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; +#ifdef RX_PACKET_COALESCE + case HostCmd_CMD_RX_PKT_COALESCE_CFG: + ret = wlan_cmd_rx_pkt_coalesce_cfg(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; +#endif + case HostCmd_CMD_MULTI_CHAN_CONFIG: + ret = wlan_cmd_multi_chan_cfg(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_MULTI_CHAN_POLICY: + ret = wlan_cmd_multi_chan_policy(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCMD_CONFIG_LOW_POWER_MODE: + ret = wlan_cmd_low_pwr_mode(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_COALESCE_CFG: + ret = wlan_cmd_coalesce_config(pmpriv, cmd_ptr, + cmd_action, pdata_buf); + break; + default: + PRINTM(MERROR, "PREP_CMD: unknown command- %#x\n", cmd_no); + ret = MLAN_STATUS_FAILURE; + break; + } + + LEAVE(); + return ret; +} + +/** + * @brief This function issues commands to initialize firmware + * + * @param priv A pointer to mlan_private structure + * @param first_bss flag for first BSS + * + * @return MLAN_STATUS_PENDING or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ops_sta_init_cmd(IN t_void *priv, IN t_u8 first_bss) +{ + pmlan_private pmpriv = (pmlan_private)priv; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 enable = MTRUE; + mlan_ds_11n_amsdu_aggr_ctrl amsdu_aggr_ctrl; + + ENTER(); + + if (first_bss == MTRUE) { + ret = wlan_adapter_init_cmd(pmpriv->adapter); + if (ret == MLAN_STATUS_FAILURE) + goto done; + } + + /* get tx rate */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_TX_RATE_CFG, + HostCmd_ACT_GEN_GET, 0, MNULL, MNULL); + if (ret) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + pmpriv->data_rate = 0; + + /* get tx power */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_RF_TX_POWER, + HostCmd_ACT_GEN_GET, 0, MNULL, MNULL); + if (ret) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* set ibss coalescing_status */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_IBSS_COALESCING_STATUS, + HostCmd_ACT_GEN_SET, 0, MNULL, &enable); + if (ret) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + memset(pmpriv->adapter, &amsdu_aggr_ctrl, 0, sizeof(amsdu_aggr_ctrl)); + amsdu_aggr_ctrl.enable = MLAN_ACT_ENABLE; + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_AMSDU_AGGR_CTRL, + HostCmd_ACT_GEN_SET, 0, MNULL, + (t_void *)&amsdu_aggr_ctrl); + if (ret) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + /* MAC Control must be the last command in init_fw */ + /* set MAC Control */ + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_MAC_CONTROL, + HostCmd_ACT_GEN_SET, 0, MNULL, + &pmpriv->curr_pkt_filter); + if (ret) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + /** set last_init_cmd */ + pmpriv->adapter->last_init_cmd = HostCmd_CMD_MAC_CONTROL; + + if (first_bss == MFALSE) { + /* Get MAC address */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_MAC_ADDRESS, + HostCmd_ACT_GEN_GET, 0, MNULL, MNULL); + if (ret) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + pmpriv->adapter->last_init_cmd = HostCmd_CMD_802_11_MAC_ADDRESS; + } + + ret = MLAN_STATUS_PENDING; +done: + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sta_cmdresp.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sta_cmdresp.c new file mode 100644 index 00000000..3a59b9c2 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sta_cmdresp.c @@ -0,0 +1,2427 @@ +/** @file mlan_sta_cmdresp.c + * + * @brief This file contains the handling of command + * responses generated by firmware. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 10/21/2008: initial version +******************************************************/ + +#include "mlan.h" +#include "mlan_join.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_wmm.h" +#include "mlan_11n.h" +#include "mlan_11ac.h" +#include "mlan_11h.h" +#include "mlan_sdio.h" +#include "mlan_meas.h" + +/******************************************************** + Local Variables +********************************************************/ + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ +/** + * @brief This function handles the command response error for TDLS operation + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * + * @return N/A + */ +static void +wlan_process_cmdreps_error_tdls_operation(mlan_private *pmpriv, + HostCmd_DS_COMMAND *resp) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + HostCmd_DS_TDLS_OPER *ptdls_oper_data = &(resp->params.tdls_oper_data); + sta_node *sta_ptr = MNULL; + t_u16 reason; + + ENTER(); + ptdls_oper_data->tdls_action = + wlan_le16_to_cpu(ptdls_oper_data->tdls_action); + reason = wlan_le16_to_cpu(ptdls_oper_data->reason); + sta_ptr = wlan_get_station_entry(pmpriv, ptdls_oper_data->peer_mac); + switch (ptdls_oper_data->tdls_action) { + case TDLS_CREATE: + /* TDLS create command error */ + PRINTM(MERROR, + "TDLS CREATE operation: command error, reason %d\n", + reason); + if (reason != TDLS_LINK_EXISTS && sta_ptr) + sta_ptr->status = TDLS_SETUP_FAILURE; + break; + case TDLS_CONFIG: + /* TDLS config command error */ + PRINTM(MERROR, + "TDLS CONFIG operation: command error, reason %d\n", + reason); + if (sta_ptr) + sta_ptr->status = TDLS_SETUP_FAILURE; + break; + case TDLS_DELETE: + /* TDLS delete command error */ + wlan_restore_tdls_packets(pmpriv, ptdls_oper_data->peer_mac, + TDLS_TEAR_DOWN); + if (sta_ptr) { + if (sta_ptr->is_11n_enabled) { + wlan_cleanup_reorder_tbl(pmpriv, + ptdls_oper_data-> + peer_mac); + pmadapter->callbacks.moal_spin_lock(pmadapter-> + pmoal_handle, + pmpriv->wmm. + ra_list_spinlock); + wlan_11n_cleanup_txbastream_tbl(pmpriv, + ptdls_oper_data-> + peer_mac); + pmadapter->callbacks. + moal_spin_unlock(pmadapter-> + pmoal_handle, + pmpriv->wmm. + ra_list_spinlock); + } + if (sta_ptr->status >= TDLS_SETUP_INPROGRESS) + wlan_delete_station_entry(pmpriv, + ptdls_oper_data-> + peer_mac); + } + if (MTRUE == wlan_is_station_list_empty(pmpriv)) + pmadapter->tdls_status = TDLS_NOT_SETUP; + else + pmadapter->tdls_status = TDLS_IN_BASE_CHANNEL; + PRINTM(MERROR, + "TDLS DELETE operation: command error, reason %d\n", + reason); + break; + } + LEAVE(); + return; +} + +/** + * @brief This function handles the command response error + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to command buffer + * + * @return N/A + */ +static void +wlan_process_cmdresp_error(mlan_private *pmpriv, HostCmd_DS_COMMAND *resp, + mlan_ioctl_req *pioctl_buf) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + pmlan_ioctl_req pscan_ioctl_req = MNULL; + mlan_callbacks *pcb = MNULL; + tdls_all_config *tdls_all_cfg = MNULL; + HostCmd_DS_TDLS_CONFIG *ptdls_config_data = + &(resp->params.tdls_config_data); + + ENTER(); + + PRINTM(MERROR, "CMD_RESP: cmd %#x error, result=%#x\n", + resp->command, resp->result); + if (pioctl_buf) + pioctl_buf->status_code = MLAN_ERROR_FW_CMDRESP; + + switch (resp->command) { + case HostCmd_CMD_802_11_PS_MODE_ENH: + { + HostCmd_DS_802_11_PS_MODE_ENH *pm = + &resp->params.psmode_enh; + PRINTM(MERROR, + "PS_MODE_ENH command failed: result=0x%x action=0x%X\n", + resp->result, wlan_le16_to_cpu(pm->action)); + /* + * We do not re-try enter-ps command in ad-hoc mode. + */ + if (wlan_le16_to_cpu(pm->action) == EN_AUTO_PS && + (wlan_le16_to_cpu(pm->params.auto_ps.ps_bitmap) & + BITMAP_STA_PS) && + pmpriv->bss_mode == MLAN_BSS_MODE_IBSS) + pmadapter->ps_mode = Wlan802_11PowerModeCAM; + } + break; + case HostCmd_CMD_802_11_SCAN_EXT: + case HostCmd_CMD_802_11_SCAN: + /* Cancel all pending scan command */ + wlan_flush_scan_queue(pmadapter); + + pcb = (pmlan_callbacks)&pmadapter->callbacks; + + wlan_request_cmd_lock(pmadapter); + pmadapter->scan_processing = MFALSE; + pscan_ioctl_req = pmadapter->pscan_ioctl_req; + pmadapter->pscan_ioctl_req = MNULL; + /* Need to indicate IOCTL complete */ + if (pscan_ioctl_req) { + pscan_ioctl_req->status_code = MLAN_ERROR_CMD_SCAN_FAIL; + /* Indicate ioctl complete */ + pcb->moal_ioctl_complete(pmadapter->pmoal_handle, + (pmlan_ioctl_req) + pscan_ioctl_req, + MLAN_STATUS_FAILURE); + } + wlan_release_cmd_lock(pmadapter); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_SCAN_REPORT, MNULL); + break; + + case HostCmd_CMD_MAC_CONTROL: + break; + + case HostCmd_CMD_TDLS_CONFIG: + ptdls_config_data->tdls_info.tdls_action = + wlan_le16_to_cpu(ptdls_config_data->tdls_info. + tdls_action); + switch (ptdls_config_data->tdls_info.tdls_action) { + case WLAN_TDLS_SETUP_REQ: + /* TDLS link setup error ;display error in logs */ + tdls_all_cfg = + (tdls_all_config *)ptdls_config_data->tdls_info. + tdls_data; + PRINTM(MERROR, "TDLS Setup Failed, error %d\n", + wlan_le16_to_cpu(tdls_all_cfg->u.tdls_cmd_resp. + reason_code)); + break; + case WLAN_TDLS_INIT_CHAN_SWITCH: + tdls_all_cfg = + (tdls_all_config *)ptdls_config_data->tdls_info. + tdls_data; + PRINTM(MERROR, + "TDLS init channel switch failed," MACSTR + ": reason=%d\n", + MAC2STR(tdls_all_cfg->u.tdls_cmd_resp. + peer_mac_addr), + wlan_le16_to_cpu(tdls_all_cfg->u.tdls_cmd_resp. + reason_code)); + break; + } + break; + case HostCmd_CMD_TDLS_OPERATION: + wlan_process_cmdreps_error_tdls_operation(pmpriv, resp); + break; + + case HostCmd_CMD_802_11_ASSOCIATE: + wlan_reset_connect_state(pmpriv, MTRUE); + break; + case HostCmd_CMD_MGMT_IE_LIST: + { + HostCmd_DS_MGMT_IE_LIST_CFG *pmgmt_ie_list = + &(resp->params.mgmt_ie_list); + t_u16 resp_len = 0, travel_len = 0, index; + mlan_ds_misc_custom_ie *cust_ie = MNULL; + custom_ie *cptr; + + if (wlan_le16_to_cpu(pmgmt_ie_list->action) == + HostCmd_ACT_GEN_GET) + break; + + cust_ie = + (mlan_ds_misc_custom_ie *)&pmgmt_ie_list-> + ds_mgmt_ie; + if (cust_ie) { + cust_ie->type = wlan_le16_to_cpu(cust_ie->type); + resp_len = cust_ie->len = + wlan_le16_to_cpu(cust_ie->len); + travel_len = 0; + /* conversion for index, mask, len */ + if (resp_len == sizeof(t_u16)) + cust_ie->ie_data_list[0].ie_index = + wlan_cpu_to_le16(cust_ie-> + ie_data_list + [0].ie_index); + + while (resp_len > sizeof(t_u16)) { + cptr = (custom_ie + *)(((t_u8 *)cust_ie-> + ie_data_list) + travel_len); + index = cptr->ie_index = + wlan_le16_to_cpu(cptr-> + ie_index); + cptr->mgmt_subtype_mask = + wlan_le16_to_cpu(cptr-> + mgmt_subtype_mask); + cptr->ie_length = + wlan_le16_to_cpu(cptr-> + ie_length); + travel_len += + cptr->ie_length + + sizeof(custom_ie) - MAX_IE_SIZE; + resp_len -= + cptr->ie_length + + sizeof(custom_ie) - MAX_IE_SIZE; + if ((pmpriv->mgmt_ie[index]. + mgmt_subtype_mask == + cptr->mgmt_subtype_mask) && + (pmpriv->mgmt_ie[index].ie_length == + cptr->ie_length) && + !memcmp(pmpriv->adapter, + pmpriv->mgmt_ie[index]. + ie_buffer, cptr->ie_buffer, + cptr->ie_length)) { + PRINTM(MERROR, + "set custom ie fail, remove ie index :%d\n", + index); + memset(pmadapter, + &pmpriv->mgmt_ie[index], + 0, sizeof(custom_ie)); + } + } + } + } + break; + default: + break; + } + /* + * Handling errors here + */ + wlan_insert_cmd_to_free_q(pmadapter, pmadapter->curr_cmd); + + wlan_request_cmd_lock(pmadapter); + pmadapter->curr_cmd = MNULL; + wlan_release_cmd_lock(pmadapter); + + LEAVE(); + return; +} + +/** + * @brief This function handles the command response of RSSI info + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_802_11_rssi_info(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_802_11_RSSI_INFO_RSP *prssi_info_rsp = + &resp->params.rssi_info_rsp; + mlan_ds_get_info *pget_info = MNULL; + BSSDescriptor_t *pbss_desc; + t_s32 tbl_idx = 0; + + ENTER(); + + pmpriv->data_rssi_last = + wlan_le16_to_cpu(prssi_info_rsp->data_rssi_last); + pmpriv->data_nf_last = wlan_le16_to_cpu(prssi_info_rsp->data_nf_last); + + pmpriv->data_rssi_avg = wlan_le16_to_cpu(prssi_info_rsp->data_rssi_avg); + pmpriv->data_nf_avg = wlan_le16_to_cpu(prssi_info_rsp->data_nf_avg); + + pmpriv->bcn_rssi_last = wlan_le16_to_cpu(prssi_info_rsp->bcn_rssi_last); + pmpriv->bcn_nf_last = wlan_le16_to_cpu(prssi_info_rsp->bcn_nf_last); + + pmpriv->bcn_rssi_avg = wlan_le16_to_cpu(prssi_info_rsp->bcn_rssi_avg); + pmpriv->bcn_nf_avg = wlan_le16_to_cpu(prssi_info_rsp->bcn_nf_avg); + + /* Get current BSS info */ + pbss_desc = &pmpriv->curr_bss_params.bss_descriptor; + pbss_desc->rssi = -pmpriv->bcn_rssi_avg; + tbl_idx = + wlan_find_ssid_in_list(pmpriv, &pbss_desc->ssid, + pbss_desc->mac_address, + pmpriv->bss_mode); + if (tbl_idx >= 0) { + pbss_desc = &pmpriv->adapter->pscan_table[tbl_idx]; + pbss_desc->rssi = -pmpriv->bcn_rssi_avg; + } + + /* Need to indicate IOCTL complete */ + if (pioctl_buf != MNULL) { + pget_info = (mlan_ds_get_info *)pioctl_buf->pbuf; + + memset(pmpriv->adapter, &pget_info->param.signal, 0, + sizeof(mlan_ds_get_signal)); + + pget_info->param.signal.selector = ALL_RSSI_INFO_MASK; + + /* RSSI */ + pget_info->param.signal.bcn_rssi_last = pmpriv->bcn_rssi_last; + pget_info->param.signal.bcn_rssi_avg = pmpriv->bcn_rssi_avg; + pget_info->param.signal.data_rssi_last = pmpriv->data_rssi_last; + pget_info->param.signal.data_rssi_avg = pmpriv->data_rssi_avg; + + /* SNR */ + pget_info->param.signal.bcn_snr_last = + CAL_SNR(pmpriv->bcn_rssi_last, pmpriv->bcn_nf_last); + pget_info->param.signal.bcn_snr_avg = + CAL_SNR(pmpriv->bcn_rssi_avg, pmpriv->bcn_nf_avg); + pget_info->param.signal.data_snr_last = + CAL_SNR(pmpriv->data_rssi_last, pmpriv->data_nf_last); + pget_info->param.signal.data_snr_avg = + CAL_SNR(pmpriv->data_rssi_avg, pmpriv->data_nf_avg); + + /* NF */ + pget_info->param.signal.bcn_nf_last = pmpriv->bcn_nf_last; + pget_info->param.signal.bcn_nf_avg = pmpriv->bcn_nf_avg; + pget_info->param.signal.data_nf_last = pmpriv->data_nf_last; + pget_info->param.signal.data_nf_avg = pmpriv->data_nf_avg; + + pioctl_buf->data_read_written = sizeof(mlan_ds_get_info); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of snmp_mib + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_802_11_snmp_mib(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_802_11_SNMP_MIB *psmib = &resp->params.smib; + t_u16 oid = wlan_le16_to_cpu(psmib->oid); + t_u16 query_type = wlan_le16_to_cpu(psmib->query_type); + t_u32 ul_temp; + mlan_ds_snmp_mib *mib = MNULL; + + ENTER(); + + if (pioctl_buf) + mib = (mlan_ds_snmp_mib *)pioctl_buf->pbuf; + + PRINTM(MINFO, "SNMP_RESP: value of the oid = 0x%x, query_type=0x%x\n", + oid, query_type); + PRINTM(MINFO, "SNMP_RESP: Buf size = 0x%x\n", + wlan_le16_to_cpu(psmib->buf_size)); + if (query_type == HostCmd_ACT_GEN_GET) { + switch (oid) { + case DtimPeriod_i: + ul_temp = psmib->value[0]; + PRINTM(MINFO, "SNMP_RESP: DTIM Period =%u\n", ul_temp); + if (mib) + mib->param.dtim_period = ul_temp; + break; + case FragThresh_i: + ul_temp = wlan_le16_to_cpu(*((t_u16 *)(psmib->value))); + PRINTM(MINFO, "SNMP_RESP: FragThsd =%u\n", ul_temp); + if (mib) + mib->param.frag_threshold = ul_temp; + break; + + case RtsThresh_i: + ul_temp = wlan_le16_to_cpu(*((t_u16 *)(psmib->value))); + PRINTM(MINFO, "SNMP_RESP: RTSThsd =%u\n", ul_temp); + if (mib) + mib->param.rts_threshold = ul_temp; + break; + + case ShortRetryLim_i: + ul_temp = wlan_le16_to_cpu(*((t_u16 *)(psmib->value))); + PRINTM(MINFO, "SNMP_RESP: TxRetryCount=%u\n", ul_temp); + if (mib) + mib->param.retry_count = ul_temp; + break; + case WwsMode_i: + ul_temp = wlan_le16_to_cpu(*((t_u16 *)(psmib->value))); + PRINTM(MINFO, "SNMP_RESP: WWSCfg =%u\n", ul_temp); + if (pioctl_buf) + ((mlan_ds_misc_cfg *)pioctl_buf->pbuf)->param. + wws_cfg = ul_temp; + break; + case Thermal_i: + ul_temp = wlan_le32_to_cpu(*((t_u32 *)(psmib->value))); + PRINTM(MINFO, "SNMP_RESP: Thermal =%u\n", ul_temp); + if (pioctl_buf) + ((mlan_ds_misc_cfg *)pioctl_buf->pbuf)->param. + thermal = ul_temp; + break; + case NullPktPeriod_i: + ul_temp = psmib->value[0]; + PRINTM(MINFO, "SNMP_RESP: Auto NULL Pkt Period =%u\n", + ul_temp); + break; + default: + break; + } + } else { /* (query_type == HostCmd_ACT_GEN_SET) */ + /* Update state for 11d */ + if (oid == Dot11D_i) { + ul_temp = wlan_le16_to_cpu(*((t_u16 *)(psmib->value))); + /* Set 11d state to private */ + pmpriv->state_11d.enable_11d = ul_temp; + /* Set user enable flag if called from ioctl */ + if (pioctl_buf) + pmpriv->state_11d.user_enable_11d = ul_temp; + } + /* Update state for 11h */ + if (oid == Dot11H_i) { + ul_temp = wlan_le16_to_cpu(*((t_u16 *)(psmib->value))); + /* Set 11h state to priv */ + pmpriv->intf_state_11h.is_11h_active = + (ul_temp & ENABLE_11H_MASK); + /* Set radar_det state to adapter */ + pmpriv->adapter->state_11h.is_master_radar_det_active + = + (ul_temp & MASTER_RADAR_DET_MASK) ? MTRUE : + MFALSE; + pmpriv->adapter->state_11h.is_slave_radar_det_active = + (ul_temp & SLAVE_RADAR_DET_MASK) ? MTRUE : + MFALSE; + } + } + + if (pioctl_buf) { + /* Indicate ioctl complete */ + pioctl_buf->data_read_written = sizeof(mlan_ds_snmp_mib); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of get_log + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_get_log(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_802_11_GET_LOG *pget_log = + (HostCmd_DS_802_11_GET_LOG *)&resp->params.get_log; + mlan_ds_get_info *pget_info = MNULL; + + ENTER(); + + if (pioctl_buf) { + pget_info = (mlan_ds_get_info *)pioctl_buf->pbuf; + pget_info->param.stats.mcast_tx_frame = + wlan_le32_to_cpu(pget_log->mcast_tx_frame); + pget_info->param.stats.failed = + wlan_le32_to_cpu(pget_log->failed); + pget_info->param.stats.retry = + wlan_le32_to_cpu(pget_log->retry); + pget_info->param.stats.multi_retry = + wlan_le32_to_cpu(pget_log->multiretry); + pget_info->param.stats.frame_dup = + wlan_le32_to_cpu(pget_log->frame_dup); + pget_info->param.stats.rts_success = + wlan_le32_to_cpu(pget_log->rts_success); + pget_info->param.stats.rts_failure = + wlan_le32_to_cpu(pget_log->rts_failure); + pget_info->param.stats.ack_failure = + wlan_le32_to_cpu(pget_log->ack_failure); + pget_info->param.stats.rx_frag = + wlan_le32_to_cpu(pget_log->rx_frag); + pget_info->param.stats.mcast_rx_frame = + wlan_le32_to_cpu(pget_log->mcast_rx_frame); + pget_info->param.stats.fcs_error = + wlan_le32_to_cpu(pget_log->fcs_error); + pget_info->param.stats.tx_frame = + wlan_le32_to_cpu(pget_log->tx_frame); + pget_info->param.stats.wep_icv_error[0] = + wlan_le32_to_cpu(pget_log->wep_icv_err_cnt[0]); + pget_info->param.stats.wep_icv_error[1] = + wlan_le32_to_cpu(pget_log->wep_icv_err_cnt[1]); + pget_info->param.stats.wep_icv_error[2] = + wlan_le32_to_cpu(pget_log->wep_icv_err_cnt[2]); + pget_info->param.stats.wep_icv_error[3] = + wlan_le32_to_cpu(pget_log->wep_icv_err_cnt[3]); + pget_info->param.stats.bcn_rcv_cnt = + wlan_le32_to_cpu(pget_log->bcn_rcv_cnt); + pget_info->param.stats.bcn_miss_cnt = + wlan_le32_to_cpu(pget_log->bcn_miss_cnt); + /* Indicate ioctl complete */ + pioctl_buf->data_read_written = sizeof(mlan_ds_get_info); + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Get power level and rate index + * + * @param pmpriv A pointer to mlan_private structure + * @param pdata_buf Pointer to the data buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_get_power_level(pmlan_private pmpriv, void *pdata_buf) +{ + t_u16 length = 0; + t_s8 max_power = -1, min_power = -1; + MrvlTypes_Power_Group_t *ppg_tlv = MNULL; + Power_Group_t *pg = MNULL; + + ENTER(); + + if (pdata_buf) { + ppg_tlv = + (MrvlTypes_Power_Group_t *)((t_u8 *)pdata_buf + + sizeof + (HostCmd_DS_TXPWR_CFG)); + pg = (Power_Group_t *)((t_u8 *)ppg_tlv + + sizeof(MrvlTypes_Power_Group_t)); + length = ppg_tlv->length; + if (length > 0) { + max_power = pg->power_max; + min_power = pg->power_min; + length -= sizeof(Power_Group_t); + } + while (length) { + pg++; + if (max_power < pg->power_max) + max_power = pg->power_max; + if (min_power > pg->power_min) + min_power = pg->power_min; + length -= sizeof(Power_Group_t); + } + if (ppg_tlv->length > 0) { + pmpriv->min_tx_power_level = min_power; + pmpriv->max_tx_power_level = max_power; + } + } else { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of tx_power_cfg + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_tx_power_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_TXPWR_CFG *ptxp_cfg = &resp->params.txp_cfg; + MrvlTypes_Power_Group_t *ppg_tlv = MNULL; + Power_Group_t *pg = MNULL; + t_u16 action = wlan_le16_to_cpu(ptxp_cfg->action); + mlan_ds_power_cfg *power = MNULL; + mlan_power_group *pwr_grp = MNULL; + t_u8 i = 0; + + ENTER(); + + ppg_tlv = (MrvlTypes_Power_Group_t *)((t_u8 *)ptxp_cfg + + sizeof(HostCmd_DS_TXPWR_CFG)); + pg = (Power_Group_t *)((t_u8 *)ppg_tlv + + sizeof(MrvlTypes_Power_Group_t)); + + switch (action) { + case HostCmd_ACT_GEN_GET: + ppg_tlv->length = wlan_le16_to_cpu(ppg_tlv->length); + if (pmpriv->adapter->hw_status == + WlanHardwareStatusInitializing) + wlan_get_power_level(pmpriv, ptxp_cfg); + pmpriv->tx_power_level = (t_s16)pg->power_min; + break; + + case HostCmd_ACT_GEN_SET: + if (wlan_le32_to_cpu(ptxp_cfg->mode)) { + if (pg->power_max == pg->power_min) + pmpriv->tx_power_level = (t_s16)pg->power_min; + } + break; + + default: + PRINTM(MERROR, "CMD_RESP: unknown command action %d\n", action); + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + + PRINTM(MINFO, "Current TxPower Level = %d,Max Power=%d, Min Power=%d\n", + pmpriv->tx_power_level, + pmpriv->max_tx_power_level, pmpriv->min_tx_power_level); + + if (pioctl_buf) { + power = (mlan_ds_power_cfg *)pioctl_buf->pbuf; + if (action == HostCmd_ACT_GEN_GET) { + if (power->sub_command == MLAN_OID_POWER_CFG) { + pioctl_buf->data_read_written + = + sizeof(mlan_power_cfg_t) + + MLAN_SUB_COMMAND_SIZE; + power->param.power_cfg.power_level = + pmpriv->tx_power_level; + if (wlan_le32_to_cpu(ptxp_cfg->mode)) + power->param.power_cfg.is_power_auto = + 0; + else + power->param.power_cfg.is_power_auto = + 1; + } else { + power->param.power_ext.num_pwr_grp = 0; + i = 0; + while ((ppg_tlv->length) && + (i < MAX_POWER_GROUP)) { + pwr_grp = + (mlan_power_group *)&power-> + param.power_ext.power_group[i]; + pwr_grp->first_rate_ind = 0; + pwr_grp->last_rate_ind = 0; + if (pg->modulation_class == + MOD_CLASS_HR_DSSS) { + pwr_grp->rate_format = + MLAN_RATE_FORMAT_LG; + pwr_grp->first_rate_ind = + pg->first_rate_code; + pwr_grp->last_rate_ind = + pg->last_rate_code; + } else if (pg->modulation_class == + MOD_CLASS_OFDM) { + pwr_grp->rate_format = + MLAN_RATE_FORMAT_LG; + pwr_grp->first_rate_ind = + MLAN_RATE_INDEX_OFDM0 + + pg->first_rate_code; + pwr_grp->last_rate_ind = + MLAN_RATE_INDEX_OFDM0 + + pg->last_rate_code; + } else if (pg->modulation_class == + MOD_CLASS_HT) { + pwr_grp->rate_format = + MLAN_RATE_FORMAT_HT; + pwr_grp->first_rate_ind = + pg->first_rate_code; + pwr_grp->last_rate_ind = + pg->last_rate_code; + } else if (pg->modulation_class == + MOD_CLASS_VHT) { + pwr_grp->rate_format = + MLAN_RATE_FORMAT_VHT; + pwr_grp->first_rate_ind = + (pg-> + first_rate_code) & 0xF; + pwr_grp->last_rate_ind = + (pg-> + last_rate_code) & 0xF; + pwr_grp->nss = + 1 + + (pg-> + first_rate_code >> 4); + pwr_grp->nss = + 1 + + (pg-> + last_rate_code >> 4); + } + pwr_grp->bandwidth = pg->ht_bandwidth; + pwr_grp->power_min = pg->power_min; + pwr_grp->power_max = pg->power_max; + pwr_grp->power_step = pg->power_step; + ppg_tlv->length -= + sizeof(Power_Group_t); + pg++; + i++; + } + power->param.power_ext.num_pwr_grp = i; + pioctl_buf->data_read_written + = + sizeof(mlan_power_cfg_ext) + + MLAN_SUB_COMMAND_SIZE; + } + } + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of rf_tx_power + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_802_11_rf_tx_power(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_802_11_RF_TX_POWER *rtp = &resp->params.txp; + t_u16 action = wlan_le16_to_cpu(rtp->action); + mlan_ds_power_cfg *power = MNULL; + + ENTER(); + + pmpriv->tx_power_level = wlan_le16_to_cpu(rtp->current_level); + + if (action == HostCmd_ACT_GEN_GET) { + pmpriv->max_tx_power_level = rtp->max_power; + pmpriv->min_tx_power_level = rtp->min_power; + if (pioctl_buf) { + power = (mlan_ds_power_cfg *)pioctl_buf->pbuf; + if (power->sub_command == MLAN_OID_POWER_CFG) { + pioctl_buf->data_read_written + = + sizeof(mlan_power_cfg_t) + + MLAN_SUB_COMMAND_SIZE; + power->param.power_cfg.power_level = + pmpriv->tx_power_level; + } + } + } + + PRINTM(MINFO, "Current TxPower Level = %d,Max Power=%d, Min Power=%d\n", + pmpriv->tx_power_level, + pmpriv->max_tx_power_level, pmpriv->min_tx_power_level); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of sleep_period + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_802_11_sleep_period(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_802_11_SLEEP_PERIOD *pcmd_sleep_pd = &resp->params.sleep_pd; + mlan_ds_pm_cfg *pm_cfg = MNULL; + t_u16 sleep_pd = 0; + + ENTER(); + + sleep_pd = wlan_le16_to_cpu(pcmd_sleep_pd->sleep_pd); + if (pioctl_buf) { + pm_cfg = (mlan_ds_pm_cfg *)pioctl_buf->pbuf; + pm_cfg->param.sleep_period = (t_u32)sleep_pd; + pioctl_buf->data_read_written = + sizeof(pm_cfg->param.sleep_period) + + MLAN_SUB_COMMAND_SIZE; + } + pmpriv->adapter->sleep_period.period = sleep_pd; + pmpriv->adapter->saved_sleep_period.period = sleep_pd; + + pmpriv->adapter->pps_uapsd_mode = MFALSE; + if ((pmpriv->adapter->sleep_period.period != 0) && + (pmpriv->adapter->sleep_period.period != + SLEEP_PERIOD_RESERVED_FF)) { + pmpriv->adapter->gen_null_pkt = MTRUE; + } else { + pmpriv->adapter->delay_null_pkt = MFALSE; + pmpriv->adapter->gen_null_pkt = MFALSE; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of sleep_params + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_802_11_sleep_params(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_802_11_SLEEP_PARAMS *presp_sp = &resp->params.sleep_param; + mlan_ds_pm_cfg *pm_cfg = MNULL; + mlan_ds_sleep_params *psp = MNULL; + sleep_params_t *psleep_params = &pmpriv->adapter->sleep_params; + + ENTER(); + + psleep_params->sp_reserved = wlan_le16_to_cpu(presp_sp->reserved); + psleep_params->sp_error = wlan_le16_to_cpu(presp_sp->error); + psleep_params->sp_offset = wlan_le16_to_cpu(presp_sp->offset); + psleep_params->sp_stable_time = wlan_le16_to_cpu(presp_sp->stable_time); + psleep_params->sp_cal_control = presp_sp->cal_control; + psleep_params->sp_ext_sleep_clk = presp_sp->external_sleep_clk; + + if (pioctl_buf) { + pm_cfg = (mlan_ds_pm_cfg *)pioctl_buf->pbuf; + psp = (mlan_ds_sleep_params *)&pm_cfg->param.sleep_params; + + psp->error = (t_u32)psleep_params->sp_error; + psp->offset = (t_u32)psleep_params->sp_offset; + psp->stable_time = (t_u32)psleep_params->sp_stable_time; + psp->cal_control = (t_u32)psleep_params->sp_cal_control; + psp->ext_sleep_clk = (t_u32)psleep_params->sp_ext_sleep_clk; + psp->reserved = (t_u32)psleep_params->sp_reserved; + + pioctl_buf->data_read_written = + sizeof(pm_cfg->param.sleep_params) + + MLAN_SUB_COMMAND_SIZE; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of mac_address + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_802_11_mac_address(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_802_11_MAC_ADDRESS *pmac_addr = &resp->params.mac_addr; + mlan_ds_bss *bss = MNULL; + + ENTER(); + + memcpy(pmpriv->adapter, pmpriv->curr_addr, pmac_addr->mac_addr, + MLAN_MAC_ADDR_LENGTH); + + PRINTM(MINFO, "MAC address: " MACSTR "\n", MAC2STR(pmpriv->curr_addr)); + if (pioctl_buf) { + bss = (mlan_ds_bss *)pioctl_buf->pbuf; + memcpy(pmpriv->adapter, &bss->param.mac_addr, pmpriv->curr_addr, + MLAN_MAC_ADDR_LENGTH); + pioctl_buf->data_read_written = + MLAN_MAC_ADDR_LENGTH + MLAN_SUB_COMMAND_SIZE; + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of multicast_address + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_mac_multicast_adr(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + ENTER(); + if (pioctl_buf) { + pioctl_buf->data_read_written = + sizeof(mlan_multicast_list) + MLAN_SUB_COMMAND_SIZE; + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of deauthenticate + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_802_11_deauthenticate(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + ENTER(); + + pmadapter->dbg.num_cmd_deauth++; + + if (!memcmp(pmadapter, resp->params.deauth.mac_addr, + &pmpriv->curr_bss_params.bss_descriptor.mac_address, + sizeof(resp->params.deauth.mac_addr))) { + wlan_reset_connect_state(pmpriv, MTRUE); + + } + if (pmpriv->adapter->state_rdh.stage == RDH_STOP_INTFS) + wlan_11h_radar_detected_callback((t_void *)pmpriv); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of ad_hoc_stop + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_802_11_ad_hoc_stop(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + ENTER(); + + wlan_reset_connect_state(pmpriv, MTRUE); + if (pmpriv->adapter->state_rdh.stage == RDH_STOP_INTFS) + wlan_11h_radar_detected_callback((t_void *)pmpriv); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of key_material + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_802_11_key_material(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_802_11_KEY_MATERIAL *pkey = &resp->params.key_material; + mlan_ds_sec_cfg *sec = MNULL; + + ENTER(); + + if (wlan_le16_to_cpu(pkey->action) == HostCmd_ACT_GEN_SET) { + if ((wlan_le16_to_cpu(pkey->key_param_set.key_info) & + KEY_INFO_TKIP_MCAST)) { + PRINTM(MINFO, "key: GTK is set\n"); + pmpriv->wpa_is_gtk_set = MTRUE; + if (pmpriv->port_ctrl_mode == MTRUE) { + /* GTK is set, open the port */ + PRINTM(MINFO, + "GTK_SET: Open port for WPA/WPA2 h-supp mode\n"); + pmpriv->port_open = MTRUE; + } + pmpriv->adapter->scan_block = MFALSE; + } + } else { + if (pioctl_buf && + (wlan_le16_to_cpu(pkey->key_param_set.type) == + TLV_TYPE_KEY_PARAM_V2)) { + sec = (mlan_ds_sec_cfg *)pioctl_buf->pbuf; + memcpy(pmpriv->adapter, sec->param.encrypt_key.mac_addr, + pkey->key_param_set.mac_addr, + MLAN_MAC_ADDR_LENGTH); + sec->param.encrypt_key.key_index = + pkey->key_param_set.key_idx; + PRINTM(MIOCTL, + "key_type=%d, key_index=%d, key_info=0x%x " + MACSTR "\n", pkey->key_param_set.key_type, + pkey->key_param_set.key_idx, + wlan_le16_to_cpu(pkey->key_param_set.key_info), + MAC2STR(sec->param.encrypt_key.mac_addr)); + switch (pkey->key_param_set.key_type) { + case KEY_TYPE_ID_WAPI: + sec->param.encrypt_key.is_wapi_key = MTRUE; + sec->param.encrypt_key.key_len = + wlan_le16_to_cpu(pkey->key_param_set. + key_params.wapi. + key_len); + memcpy(pmpriv->adapter, + sec->param.encrypt_key.key_material, + pkey->key_param_set.key_params.wapi.key, + sec->param.encrypt_key.key_len); + memcpy(pmpriv->adapter, + sec->param.encrypt_key.pn, + pkey->key_param_set.key_params.wapi.pn, + PN_SIZE); + break; + case KEY_TYPE_ID_TKIP: + sec->param.encrypt_key.key_len = + wlan_le16_to_cpu(pkey->key_param_set. + key_params.tkip. + key_len); + memcpy(pmpriv->adapter, + sec->param.encrypt_key.key_material, + pkey->key_param_set.key_params.tkip.key, + sec->param.encrypt_key.key_len); + memcpy(pmpriv->adapter, + sec->param.encrypt_key.pn, + pkey->key_param_set.key_params.tkip.pn, + WPA_PN_SIZE); + break; + case KEY_TYPE_ID_AES: + sec->param.encrypt_key.key_len = + wlan_le16_to_cpu(pkey->key_param_set. + key_params.aes. + key_len); + memcpy(pmpriv->adapter, + sec->param.encrypt_key.key_material, + pkey->key_param_set.key_params.aes.key, + sec->param.encrypt_key.key_len); + memcpy(pmpriv->adapter, + sec->param.encrypt_key.pn, + pkey->key_param_set.key_params.aes.pn, + WPA_PN_SIZE); + break; + case KEY_TYPE_ID_AES_CMAC: + sec->param.encrypt_key.key_len = + wlan_le16_to_cpu(pkey->key_param_set. + key_params.cmac_aes. + key_len); + memcpy(pmpriv->adapter, + sec->param.encrypt_key.key_material, + pkey->key_param_set.key_params.cmac_aes. + key, sec->param.encrypt_key.key_len); + memcpy(pmpriv->adapter, + sec->param.encrypt_key.pn, + pkey->key_param_set.key_params.cmac_aes. + ipn, IGTK_PN_SIZE); + break; + case KEY_TYPE_ID_WEP: + sec->param.encrypt_key.key_len = + wlan_le16_to_cpu(pkey->key_param_set. + key_params.wep. + key_len); + memcpy(pmpriv->adapter, + sec->param.encrypt_key.key_material, + pkey->key_param_set.key_params.wep.key, + sec->param.encrypt_key.key_len); + break; + } + } + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Handle the supplicant pmk response + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_ret_802_11_supplicant_pmk(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_802_11_SUPPLICANT_PMK *supplicant_pmk_resp = + &resp->params.esupplicant_psk; + mlan_ds_sec_cfg sec_buf; + mlan_ds_sec_cfg *sec = MNULL; + MrvlIEtypes_PMK_t *ppmk_tlv = MNULL; + MrvlIEtypes_Passphrase_t *passphrase_tlv = MNULL; + MrvlIEtypes_SsIdParamSet_t *pssid_tlv = MNULL; + MrvlIEtypes_Bssid_t *pbssid_tlv = MNULL; + t_u8 *tlv_buf = (t_u8 *)supplicant_pmk_resp->tlv_buffer; + t_u16 action = wlan_le16_to_cpu(supplicant_pmk_resp->action); + int tlv_buf_len = 0; + t_u16 tlv; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + tlv_buf_len = resp->size - (sizeof(HostCmd_DS_802_11_SUPPLICANT_PMK) + + S_DS_GEN - 1); + if (pioctl_buf) { + if (((mlan_ds_bss *)pioctl_buf->pbuf)->sub_command == + MLAN_OID_BSS_FIND_BSS) + sec = &sec_buf; + else + sec = (mlan_ds_sec_cfg *)pioctl_buf->pbuf; + if (action == HostCmd_ACT_GEN_GET) { + while (tlv_buf_len > 0) { + tlv = (*tlv_buf) | (*(tlv_buf + 1) << 8); + if ((tlv != TLV_TYPE_SSID) && + (tlv != TLV_TYPE_BSSID) && + (tlv != TLV_TYPE_PASSPHRASE) + && (tlv != TLV_TYPE_PMK)) + break; + switch (tlv) { + case TLV_TYPE_SSID: + pssid_tlv = + (MrvlIEtypes_SsIdParamSet_t *) + tlv_buf; + pssid_tlv->header.len = + wlan_le16_to_cpu(pssid_tlv-> + header.len); + memcpy(pmpriv->adapter, + sec->param.passphrase.ssid.ssid, + pssid_tlv->ssid, + MIN(MLAN_MAX_SSID_LENGTH, + pssid_tlv->header.len)); + sec->param.passphrase.ssid.ssid_len = + MIN(MLAN_MAX_SSID_LENGTH, + pssid_tlv->header.len); + tlv_buf += + pssid_tlv->header.len + + sizeof(MrvlIEtypesHeader_t); + tlv_buf_len -= + (pssid_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + break; + case TLV_TYPE_BSSID: + pbssid_tlv = + (MrvlIEtypes_Bssid_t *)tlv_buf; + pbssid_tlv->header.len = + wlan_le16_to_cpu(pbssid_tlv-> + header.len); + memcpy(pmpriv->adapter, + &sec->param.passphrase.bssid, + pbssid_tlv->bssid, + MLAN_MAC_ADDR_LENGTH); + tlv_buf += + pbssid_tlv->header.len + + sizeof(MrvlIEtypesHeader_t); + tlv_buf_len -= + (pbssid_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + break; + case TLV_TYPE_PASSPHRASE: + passphrase_tlv = + (MrvlIEtypes_Passphrase_t *) + tlv_buf; + passphrase_tlv->header.len = + wlan_le16_to_cpu + (passphrase_tlv->header.len); + sec->param.passphrase.psk_type = + MLAN_PSK_PASSPHRASE; + sec->param.passphrase.psk.passphrase. + passphrase_len = + passphrase_tlv->header.len; + memcpy(pmpriv->adapter, + sec->param.passphrase.psk. + passphrase.passphrase, + passphrase_tlv->passphrase, + MIN(MLAN_MAX_PASSPHRASE_LENGTH, + passphrase_tlv->header.len)); + tlv_buf += + passphrase_tlv->header.len + + sizeof(MrvlIEtypesHeader_t); + tlv_buf_len -= + (passphrase_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + break; + case TLV_TYPE_PMK: + ppmk_tlv = (MrvlIEtypes_PMK_t *)tlv_buf; + ppmk_tlv->header.len = + wlan_le16_to_cpu(ppmk_tlv-> + header.len); + sec->param.passphrase.psk_type = + MLAN_PSK_PMK; + memcpy(pmpriv->adapter, + sec->param.passphrase.psk.pmk. + pmk, ppmk_tlv->pmk, + MIN(MLAN_MAX_KEY_LENGTH, + ppmk_tlv->header.len)); + tlv_buf += + ppmk_tlv->header.len + + sizeof(MrvlIEtypesHeader_t); + tlv_buf_len -= + (ppmk_tlv->header.len + + sizeof(MrvlIEtypesHeader_t)); + break; + + } + } + if (((mlan_ds_bss *)pioctl_buf->pbuf)->sub_command == + MLAN_OID_BSS_FIND_BSS) { + wlan_set_ewpa_mode(pmpriv, + &sec->param.passphrase); + ret = wlan_find_bss(pmpriv, pioctl_buf); + } + } else if (action == HostCmd_ACT_GEN_SET) { + PRINTM(MINFO, "Esupp PMK set: enable ewpa query\n"); + pmpriv->ewpa_query = MTRUE; + } + } + + LEAVE(); + return ret; +} + +/** + * @brief Handle the supplicant profile response + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_802_11_supplicant_profile(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_802_11_SUPPLICANT_PROFILE *psup_profile = + &resp->params.esupplicant_profile; + MrvlIEtypesHeader_t *head; + MrvlIEtypes_EncrProto_t *encr_proto_tlv = MNULL; + MrvlIEtypes_Cipher_t *pcipher_tlv = MNULL; + mlan_ds_sec_cfg *sec = MNULL; + t_u8 *tlv; + int len; + + ENTER(); + + len = resp->size - S_DS_GEN - sizeof(t_u16); + tlv = psup_profile->tlv_buf; + if (pioctl_buf) { + sec = (mlan_ds_sec_cfg *)pioctl_buf->pbuf; + while (len > 0) { + head = (MrvlIEtypesHeader_t *)tlv; + head->type = wlan_le16_to_cpu(head->type); + head->len = wlan_le16_to_cpu(head->len); + switch (head->type) { + case TLV_TYPE_ENCRYPTION_PROTO: + encr_proto_tlv = + (MrvlIEtypes_EncrProto_t *)head; + sec->param.esupp_mode.rsn_mode = + wlan_le16_to_cpu(encr_proto_tlv-> + rsn_mode); + PRINTM(MINFO, "rsn_mode=0x%x\n", + sec->param.esupp_mode.rsn_mode); + break; + case TLV_TYPE_CIPHER: + pcipher_tlv = (MrvlIEtypes_Cipher_t *)head; + sec->param.esupp_mode.act_paircipher = + pcipher_tlv->pair_cipher; + sec->param.esupp_mode.act_groupcipher = + pcipher_tlv->group_cipher; + PRINTM(MINFO, + "paircipher=0x%x, groupcipher=0x%x\n", + sec->param.esupp_mode.act_paircipher, + sec->param.esupp_mode.act_groupcipher); + break; + } + len -= (head->len - sizeof(MrvlIEtypesHeader_t)); + tlv = tlv + (head->len + sizeof(MrvlIEtypesHeader_t)); + } + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of rf_channel + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_802_11_rf_channel(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_802_11_RF_CHANNEL *prf_channel = &resp->params.rf_channel; + t_u16 new_channel = wlan_le16_to_cpu(prf_channel->current_channel); + mlan_ds_bss *bss = MNULL; + ENTER(); + if (pmpriv->curr_bss_params.bss_descriptor.channel != new_channel) { + PRINTM(MINFO, "Channel Switch: %d to %d\n", + pmpriv->curr_bss_params.bss_descriptor.channel, + new_channel); + /* Update the channel again */ + pmpriv->curr_bss_params.bss_descriptor.channel = new_channel; + } + if (pioctl_buf) { + bss = (mlan_ds_bss *)pioctl_buf->pbuf; + bss->param.bss_chan.channel = new_channel; + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Handle the ibss_coalescing_status resp + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_ibss_coalescing_status(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp) +{ + HostCmd_DS_802_11_IBSS_STATUS *pibss_coal_resp = + &(resp->params.ibss_coalescing); + t_u8 zero_mac[MLAN_MAC_ADDR_LENGTH] = { 0, 0, 0, 0, 0, 0 }; + + ENTER(); + + if (wlan_le16_to_cpu(pibss_coal_resp->action) == HostCmd_ACT_GEN_SET) { + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + + PRINTM(MINFO, "New BSSID " MACSTR "\n", + MAC2STR(pibss_coal_resp->bssid)); + + /* If rsp has MNULL BSSID, Just return..... No Action */ + if (!memcmp + (pmpriv->adapter, pibss_coal_resp->bssid, zero_mac, + MLAN_MAC_ADDR_LENGTH)) { + PRINTM(MMSG, "New BSSID is MNULL\n"); + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + + /* If BSSID is diff, modify current BSS parameters */ + if (memcmp + (pmpriv->adapter, + pmpriv->curr_bss_params.bss_descriptor.mac_address, + pibss_coal_resp->bssid, MLAN_MAC_ADDR_LENGTH)) { + /* BSSID */ + memcpy(pmpriv->adapter, + pmpriv->curr_bss_params.bss_descriptor.mac_address, + pibss_coal_resp->bssid, MLAN_MAC_ADDR_LENGTH); + + /* Beacon Interval and ATIM window */ + pmpriv->curr_bss_params.bss_descriptor.beacon_period + = wlan_le16_to_cpu(pibss_coal_resp->beacon_interval); + pmpriv->curr_bss_params.bss_descriptor.atim_window + = wlan_le16_to_cpu(pibss_coal_resp->atim_window); + + /* ERP Information */ + pmpriv->curr_bss_params.bss_descriptor.erp_flags + = + (t_u8)wlan_le16_to_cpu(pibss_coal_resp-> + use_g_rate_protect); + + pmpriv->adhoc_state = ADHOC_COALESCED; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of MGMT_IE_LIST + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_mgmt_ie_list(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) +{ + t_u16 resp_len = 0, travel_len = 0; + int i = 0; + mlan_ds_misc_cfg *misc = MNULL; + mlan_ds_misc_custom_ie *cust_ie = MNULL; + custom_ie *cptr; + tlvbuf_max_mgmt_ie *max_mgmt_ie = MNULL; + HostCmd_DS_MGMT_IE_LIST_CFG *pmgmt_ie_list = + &(resp->params.mgmt_ie_list); + + ENTER(); + + if (wlan_le16_to_cpu(pmgmt_ie_list->action) == HostCmd_ACT_GEN_SET) { + if ((pmpriv->adapter->state_rdh.stage == RDH_SET_CUSTOM_IE) || + (pmpriv->adapter->state_rdh.stage == RDH_REM_CUSTOM_IE)) + wlan_11h_radar_detected_callback((t_void *)pmpriv); + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + cust_ie = (mlan_ds_misc_custom_ie *)&pmgmt_ie_list->ds_mgmt_ie; + max_mgmt_ie = + (tlvbuf_max_mgmt_ie *)((t_u8 *)cust_ie + cust_ie->len + + sizeof(MrvlIEtypesHeader_t)); + if (cust_ie) { + cust_ie->type = wlan_le16_to_cpu(cust_ie->type); + resp_len = cust_ie->len = wlan_le16_to_cpu(cust_ie->len); + travel_len = 0; + /* conversion for index, mask, len */ + if (resp_len == sizeof(t_u16)) + cust_ie->ie_data_list[0].ie_index = + wlan_cpu_to_le16(cust_ie->ie_data_list[0]. + ie_index); + + while (resp_len > sizeof(t_u16)) { + cptr = (custom_ie *)(((t_u8 *)cust_ie->ie_data_list) + + travel_len); + cptr->ie_index = wlan_le16_to_cpu(cptr->ie_index); + cptr->mgmt_subtype_mask = + wlan_le16_to_cpu(cptr->mgmt_subtype_mask); + cptr->ie_length = wlan_le16_to_cpu(cptr->ie_length); + travel_len += + cptr->ie_length + sizeof(custom_ie) - + MAX_IE_SIZE; + resp_len -= + cptr->ie_length + sizeof(custom_ie) - + MAX_IE_SIZE; + } + memcpy(pmpriv->adapter, &misc->param.cust_ie, cust_ie, + (cust_ie->len + sizeof(MrvlIEtypesHeader_t))); + if (max_mgmt_ie) { + max_mgmt_ie->type = wlan_le16_to_cpu(max_mgmt_ie->type); + if (max_mgmt_ie->type == TLV_TYPE_MAX_MGMT_IE) { + max_mgmt_ie->len = + wlan_le16_to_cpu(max_mgmt_ie->len); + max_mgmt_ie->count = + wlan_le16_to_cpu(max_mgmt_ie->count); + for (i = 0; i < max_mgmt_ie->count; i++) { + max_mgmt_ie->info[i].buf_size = + wlan_le16_to_cpu(max_mgmt_ie-> + info[i]. + buf_size); + max_mgmt_ie->info[i].buf_count = + wlan_le16_to_cpu(max_mgmt_ie-> + info[i]. + buf_count); + } + /* Append max_mgmt_ie TLV after custom_ie */ + memcpy(pmpriv->adapter, + (t_u8 *)&misc->param.cust_ie + + (cust_ie->len + + sizeof(MrvlIEtypesHeader_t)), + max_mgmt_ie, + max_mgmt_ie->len + + sizeof(MrvlIEtypesHeader_t)); + } + } + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function enable/disable tdls powermode + * + * @param pmpriv A pointer to mlan_private structure + * @param powermode 1--enable, 0--disable + * + * @return N/A + */ +static void +wlan_set_tdls_powermode(IN pmlan_private pmpriv, t_u8 powermode) +{ + ENTER(); + + if (powermode) { + pmpriv->wmm_qosinfo = DEFAULT_TDLS_WMM_QOS_INFO; + if (!pmpriv->adapter->sleep_period.period) + pmpriv->adapter->sleep_period.period = + DEFAULT_TDLS_SLEEP_PERIOD; + } else { + pmpriv->wmm_qosinfo = pmpriv->saved_wmm_qosinfo; + pmpriv->adapter->sleep_period.period = + pmpriv->adapter->saved_sleep_period.period; + } + pmpriv->adapter->pps_uapsd_mode = MFALSE; + if ((pmpriv->adapter->sleep_period.period != 0) && + (pmpriv->adapter->sleep_period.period != + SLEEP_PERIOD_RESERVED_FF)) { + pmpriv->adapter->gen_null_pkt = MTRUE; + } else { + pmpriv->adapter->delay_null_pkt = MFALSE; + pmpriv->adapter->gen_null_pkt = MFALSE; + } + LEAVE(); + return; +} + +/** + * @brief This function handles the command response of TDLS_CONFIG + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_ret_tdls_config(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) +{ + t_u8 i = 0; + t_u16 link_length = 0, final_data_rate = 0; + mlan_ds_misc_cfg *misc = MNULL; + tdls_all_config *tdls_all_cfg = MNULL; + sta_node *sta_ptr = MNULL; + HostCmd_DS_TDLS_CONFIG *ptdls_config_data = + &(resp->params.tdls_config_data); + pmlan_adapter pmadapter = pmpriv->adapter; + tdls_each_link_status *link_ptr = MNULL; + + ENTER(); + + ptdls_config_data->tdls_info.tdls_action = + wlan_le16_to_cpu(ptdls_config_data->tdls_info.tdls_action); + switch (ptdls_config_data->tdls_info.tdls_action) { + case WLAN_TDLS_CONFIG: + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + tdls_all_cfg = + (tdls_all_config *)ptdls_config_data->tdls_info. + tdls_data; + if (wlan_le16_to_cpu(tdls_all_cfg->u.tdls_config.enable) == 0) { + PRINTM(MINFO, "TDLS disable successful.\n"); + wlan_delete_station_list(pmpriv); + pmadapter->tdls_status = TDLS_NOT_SETUP; + if (pmpriv->saved_wmm_qosinfo) + pmpriv->wmm_qosinfo = pmpriv->saved_wmm_qosinfo; + if (pmadapter->saved_sleep_period.period) + pmadapter->sleep_period.period = + pmadapter->saved_sleep_period.period; + } + break; + + case WLAN_TDLS_SET_INFO: + break; + + case WLAN_TDLS_DISCOVERY_REQ: + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + tdls_all_cfg = + (tdls_all_config *)ptdls_config_data->tdls_info. + tdls_data; + tdls_all_cfg->u.tdls_discovery_resp.payload_len = + wlan_le16_to_cpu(tdls_all_cfg->u.tdls_discovery_resp. + payload_len); + tdls_all_cfg->u.tdls_discovery_resp.cap_info = + wlan_le16_to_cpu(tdls_all_cfg->u.tdls_discovery_resp. + cap_info); + memcpy(pmpriv->adapter, &misc->param.tdls_config, + &ptdls_config_data->tdls_info, + MIN(sizeof(mlan_ds_misc_tdls_config), + (resp->size - S_DS_GEN))); + PRINTM(MCMND, "TDLS_DISCOVERY_REQ: " MACSTR "\n", + MAC2STR(tdls_all_cfg->u.tdls_discovery_resp. + peer_mac_addr)); + break; + + case WLAN_TDLS_SETUP_REQ: + /* + * TDLS link being setup, block all data for this Peer + */ + tdls_all_cfg = + (tdls_all_config *)ptdls_config_data->tdls_info. + tdls_data; + PRINTM(MCMND, "TDLS_SETUP_REQ: " MACSTR "\n", + MAC2STR(tdls_all_cfg->u.tdls_setup.peer_mac_addr)); + sta_ptr = + wlan_get_station_entry(pmpriv, + tdls_all_cfg->u.tdls_setup. + peer_mac_addr); + if (!sta_ptr) { + sta_ptr = + wlan_add_station_entry(pmpriv, + tdls_all_cfg->u. + tdls_setup. + peer_mac_addr); + if (sta_ptr) { + sta_ptr->status = TDLS_SETUP_INPROGRESS; + wlan_hold_tdls_packets(pmpriv, + tdls_all_cfg->u. + tdls_setup. + peer_mac_addr); + } + } + break; + + case WLAN_TDLS_TEAR_DOWN_REQ: + /* + * TDLS link torn down, open data ports if blocked + */ + tdls_all_cfg = + (tdls_all_config *)ptdls_config_data->tdls_info. + tdls_data; + wlan_restore_tdls_packets(pmpriv, + tdls_all_cfg->u.tdls_tear_down. + peer_mac_addr, TDLS_TEAR_DOWN); + PRINTM(MCMND, "TDLS_TEARDOWN_REQ: " MACSTR "\n", + MAC2STR(tdls_all_cfg->u.tdls_tear_down.peer_mac_addr)); + sta_ptr = + wlan_get_station_entry(pmpriv, + tdls_all_cfg->u.tdls_tear_down. + peer_mac_addr); + if (sta_ptr) { + + if (sta_ptr->is_11n_enabled) { + wlan_cleanup_reorder_tbl(pmpriv, + tdls_all_cfg->u. + tdls_tear_down. + peer_mac_addr); + pmadapter->callbacks.moal_spin_lock(pmadapter-> + pmoal_handle, + pmpriv->wmm. + ra_list_spinlock); + wlan_11n_cleanup_txbastream_tbl(pmpriv, + tdls_all_cfg->u. + tdls_tear_down. + peer_mac_addr); + pmadapter->callbacks. + moal_spin_unlock(pmadapter-> + pmoal_handle, + pmpriv->wmm. + ra_list_spinlock); + } + wlan_delete_station_entry(pmpriv, + tdls_all_cfg->u. + tdls_tear_down.peer_mac_addr); + if (MTRUE == wlan_is_station_list_empty(pmpriv)) + pmadapter->tdls_status = TDLS_NOT_SETUP; + else + pmadapter->tdls_status = TDLS_IN_BASE_CHANNEL; + } + break; + case WLAN_TDLS_INIT_CHAN_SWITCH: + tdls_all_cfg = + (tdls_all_config *)ptdls_config_data->tdls_info. + tdls_data; + PRINTM(MCMND, + "TDLS_INIT_CHANNEL_SWITCH: " MACSTR + " chan=%d periodicity=%d\n", + MAC2STR(tdls_all_cfg->u.tdls_chan_switch.peer_mac_addr), + (int)tdls_all_cfg->u.tdls_chan_switch.primary_channel, + (int)tdls_all_cfg->u.tdls_chan_switch.periodicity); + break; + + case WLAN_TDLS_LINK_STATUS: + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + tdls_all_cfg = + (tdls_all_config *)ptdls_config_data->tdls_info. + tdls_data; + tdls_all_cfg->u.tdls_link_status_resp.payload_len = + wlan_le16_to_cpu(tdls_all_cfg->u.tdls_link_status_resp. + payload_len); + link_ptr = tdls_all_cfg->u.tdls_link_status_resp.link_stats; + for (i = 0; + i < tdls_all_cfg->u.tdls_link_status_resp.active_links; + i++) { + link_ptr->active_channel = + wlan_le32_to_cpu(link_ptr->active_channel); + link_ptr->data_rssi_last = + wlan_le16_to_cpu(link_ptr->data_rssi_last); + link_ptr->data_nf_last = + wlan_le16_to_cpu(link_ptr->data_nf_last); + link_ptr->data_rssi_avg = + wlan_le16_to_cpu(link_ptr->data_rssi_avg); + link_ptr->data_nf_avg = + wlan_le16_to_cpu(link_ptr->data_nf_avg); + link_length = sizeof(tdls_each_link_status); + /* adjust as per open or secure network */ + if (link_ptr->link_flags & 0x02) { + link_ptr->key_lifetime = + wlan_le32_to_cpu(link_ptr-> + key_lifetime); + link_length += link_ptr->key_length; + } else { + link_length -= + sizeof(link_ptr->security_method) + + sizeof(link_ptr->key_lifetime) + + sizeof(link_ptr->key_length); + } + final_data_rate = + (t_u16)wlan_index_to_data_rate(pmadapter, + link_ptr->u. + rate_info. + tx_data_rate, + link_ptr->u. + rate_info. + tx_rate_htinfo); + link_ptr->u.final_data_rate = final_data_rate / 2; + + link_ptr = + (tdls_each_link_status *)(((t_u8 *)link_ptr) + + link_length); + } + memcpy(pmpriv->adapter, &misc->param.tdls_config, + &ptdls_config_data->tdls_info, + MIN(sizeof(mlan_ds_misc_tdls_config), + (resp->size - S_DS_GEN))); + break; + case WLAN_TDLS_POWER_MODE: + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + tdls_all_cfg = + (tdls_all_config *)ptdls_config_data->tdls_info. + tdls_data; + wlan_set_tdls_powermode(pmpriv, + (t_u8)tdls_all_cfg->u.tdls_power_mode. + power_mode); + break; + case WLAN_TDLS_STOP_CHAN_SWITCH: + tdls_all_cfg = + (tdls_all_config *)ptdls_config_data->tdls_info. + tdls_data; + PRINTM(MCMND, "TDLS_STOP_CHANNEL_SWITCH: " MACSTR "\n", + MAC2STR(tdls_all_cfg->u.tdls_stop_chan_switch. + peer_mac_addr)); + break; + case WLAN_TDLS_CS_PARAMS: + case WLAN_TDLS_CS_DISABLE: + case WLAN_TDLS_DEBUG_STOP_RX: + case WLAN_TDLS_DEBUG_ALLOW_WEAK_SECURITY: + case WLAN_TDLS_DEBUG_SETUP_SAME_LINK: + case WLAN_TDLS_DEBUG_FAIL_SETUP_CONFIRM: + case WLAN_TDLS_DEBUG_WRONG_BSS: + case WLAN_TDLS_DEBUG_SETUP_PROHIBITED: + case WLAN_TDLS_DEBUG_HIGHER_LOWER_MAC: + case WLAN_TDLS_DEBUG_IGNORE_KEY_EXPIRY: + case WLAN_TDLS_DEBUG_CS_RET_IM: + break; + default: + if (pioctl_buf) + pioctl_buf->status_code = MLAN_ERROR_CMD_RESP_FAIL; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of TDLS_OPERATION + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_ret_tdls_oper(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, OUT mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_TDLS_OPER *ptdls_oper = &(resp->params.tdls_oper_data); + sta_node *sta_ptr = MNULL; + t_u16 reason = 0; + pmlan_adapter pmadapter = pmpriv->adapter; + + ENTER(); + + ptdls_oper->tdls_action = wlan_le16_to_cpu(ptdls_oper->tdls_action); + + sta_ptr = wlan_get_station_entry(pmpriv, ptdls_oper->peer_mac); + reason = wlan_le16_to_cpu(ptdls_oper->reason); + switch (ptdls_oper->tdls_action) { + case TDLS_CREATE: + if (reason) { + PRINTM(MMSG, + "TDLS: create link " MACSTR " fail, reason=%d\n", + MAC2STR(ptdls_oper->peer_mac), reason); + if (reason != TDLS_LINK_EXISTS && sta_ptr) + sta_ptr->status = TDLS_SETUP_FAILURE; + } else { + PRINTM(MMSG, "TDLS: create link " MACSTR " success\n", + MAC2STR(ptdls_oper->peer_mac), reason); + } + break; + case TDLS_CONFIG: + if (reason) { + PRINTM(MMSG, + "TDLS: Config link " MACSTR " fail, reason=%d\n", + MAC2STR(ptdls_oper->peer_mac), reason); + if (sta_ptr) + sta_ptr->status = TDLS_SETUP_FAILURE; + } else { + PRINTM(MMSG, "TDLS: Config link " MACSTR " success\n", + MAC2STR(ptdls_oper->peer_mac)); + } + break; + case TDLS_DELETE: + wlan_restore_tdls_packets(pmpriv, ptdls_oper->peer_mac, + TDLS_TEAR_DOWN); + if (sta_ptr) { + if (sta_ptr->is_11n_enabled) { + wlan_cleanup_reorder_tbl(pmpriv, + ptdls_oper->peer_mac); + pmadapter->callbacks.moal_spin_lock(pmadapter-> + pmoal_handle, + pmpriv->wmm. + ra_list_spinlock); + wlan_11n_cleanup_txbastream_tbl(pmpriv, + ptdls_oper-> + peer_mac); + pmadapter->callbacks. + moal_spin_unlock(pmadapter-> + pmoal_handle, + pmpriv->wmm. + ra_list_spinlock); + } + if (sta_ptr->status >= TDLS_SETUP_INPROGRESS) + wlan_delete_station_entry(pmpriv, + ptdls_oper->peer_mac); + } + if (MTRUE == wlan_is_station_list_empty(pmpriv)) + pmadapter->tdls_status = TDLS_NOT_SETUP; + else + pmadapter->tdls_status = TDLS_IN_BASE_CHANNEL; + + if (reason) + PRINTM(MMSG, + "TDLS: Delete link " MACSTR " fail, reason=%d\n", + MAC2STR(ptdls_oper->peer_mac), reason); + else + PRINTM(MMSG, "TDLS: Delete link " MACSTR " success\n", + MAC2STR(ptdls_oper->peer_mac)); + break; + default: + break; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of sysclock + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_sysclock_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_misc_cfg *mis_ccfg = MNULL; + HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG *clk_cfg = + &resp->params.sys_clock_cfg; + int i = 0; + + ENTER(); + + if (pioctl_buf) { + mis_ccfg = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + mis_ccfg->param.sys_clock.cur_sys_clk = + wlan_le16_to_cpu(clk_cfg->cur_sys_clk); + mis_ccfg->param.sys_clock.sys_clk_type = + wlan_le16_to_cpu(clk_cfg->sys_clk_type); + mis_ccfg->param.sys_clock.sys_clk_num = + wlan_le16_to_cpu(clk_cfg->sys_clk_len) / sizeof(t_u16); + for (i = 0; i < mis_ccfg->param.sys_clock.sys_clk_num; i++) + mis_ccfg->param.sys_clock.sys_clk[i] = + wlan_le16_to_cpu(clk_cfg->sys_clk[i]); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of inactivity timeout + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to command buffer + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_inactivity_timeout(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_pm_cfg *pmcfg = MNULL; + mlan_ds_inactivity_to *inac_to = MNULL; + HostCmd_DS_INACTIVITY_TIMEOUT_EXT *cmd_inac_to = + (HostCmd_DS_INACTIVITY_TIMEOUT_EXT *)&resp->params. + inactivity_to; + + ENTER(); + + if (pioctl_buf) { + pmcfg = (mlan_ds_pm_cfg *)pioctl_buf->pbuf; + inac_to = &pmcfg->param.inactivity_to; + inac_to->timeout_unit = + wlan_le16_to_cpu(cmd_inac_to->timeout_unit); + inac_to->unicast_timeout = + wlan_le16_to_cpu(cmd_inac_to->unicast_timeout); + inac_to->mcast_timeout = + wlan_le16_to_cpu(cmd_inac_to->mcast_timeout); + inac_to->ps_entry_timeout = + wlan_le16_to_cpu(cmd_inac_to->ps_entry_timeout); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of + * subscribe event + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to command buffer + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_subscribe_event(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + + HostCmd_DS_SUBSCRIBE_EVENT *evt = + (HostCmd_DS_SUBSCRIBE_EVENT *)&resp->params.subscribe_event; + mlan_ds_subscribe_evt *sub_evt = MNULL; + mlan_ds_misc_cfg *misc = MNULL; + + ENTER(); + if (pioctl_buf && (pioctl_buf->action == MLAN_ACT_GET)) { + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + sub_evt = &misc->param.subscribe_event; + sub_evt->evt_bitmap = wlan_le16_to_cpu(evt->event_bitmap); + pioctl_buf->data_read_written = sizeof(mlan_ds_misc_cfg); + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of + * OTP user data + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to command buffer + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_ret_otp_user_data(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + + HostCmd_DS_OTP_USER_DATA *cmd_user_data = + (HostCmd_DS_OTP_USER_DATA *)&resp->params.otp_user_data; + mlan_ds_misc_otp_user_data *user_data = MNULL; + + ENTER(); + if (pioctl_buf && (pioctl_buf->action == MLAN_ACT_GET)) { + user_data = (mlan_ds_misc_otp_user_data *)pioctl_buf->pbuf; + user_data->user_data_length = MIN(MAX_OTP_USER_DATA_LEN, + wlan_le16_to_cpu + (cmd_user_data-> + user_data_length)); + memcpy(pmpriv->adapter, user_data->user_data, + cmd_user_data->user_data, user_data->user_data_length); + pioctl_buf->data_read_written = + sizeof(mlan_ds_misc_otp_user_data) + + user_data->user_data_length; + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of coalesce config + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_coalesce_config(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + ENTER(); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/******************************************************** + Global Functions +********************************************************/ + +/** + * @brief This function handles the station command response + * + * @param priv A pointer to mlan_private structure + * @param cmdresp_no cmd no + * @param pcmd_buf cmdresp buf + * @param pioctl A pointer to ioctl buf + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ops_sta_process_cmdresp(IN t_void *priv, + IN t_u16 cmdresp_no, + IN t_void *pcmd_buf, IN t_void *pioctl) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = (mlan_private *)priv; + HostCmd_DS_COMMAND *resp = (HostCmd_DS_COMMAND *)pcmd_buf; + mlan_ioctl_req *pioctl_buf = (mlan_ioctl_req *)pioctl; + + mlan_adapter *pmadapter = pmpriv->adapter; + int ctr; + + ENTER(); + + /* If the command is not successful, cleanup and return failure */ + if ((resp->result != HostCmd_RESULT_OK) + ) { + wlan_process_cmdresp_error(pmpriv, resp, pioctl_buf); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + /* Command successful, handle response */ + switch (cmdresp_no) { + case HostCmd_CMD_GET_HW_SPEC: + ret = wlan_ret_get_hw_spec(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_CFG_DATA: + ret = wlan_ret_cfg_data(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_MAC_CONTROL: + ret = wlan_ret_mac_control(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_MAC_ADDRESS: + ret = wlan_ret_802_11_mac_address(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_MAC_MULTICAST_ADR: + ret = wlan_ret_mac_multicast_adr(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_TX_RATE_CFG: + ret = wlan_ret_tx_rate_cfg(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_SCAN: + ret = wlan_ret_802_11_scan(pmpriv, resp, pioctl_buf); + pioctl_buf = MNULL; + pmadapter->curr_cmd->pioctl_buf = MNULL; + break; + case HostCmd_CMD_802_11_SCAN_EXT: + ret = wlan_ret_802_11_scan_ext(pmpriv, resp, pioctl_buf); + pioctl_buf = MNULL; + pmadapter->curr_cmd->pioctl_buf = MNULL; + break; + case HostCmd_CMD_802_11_BG_SCAN_CONFIG: + ret = wlan_ret_bgscan_config(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_BG_SCAN_QUERY: + ret = wlan_ret_802_11_bgscan_query(pmpriv, resp, pioctl_buf); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_BGSCAN_RESULT, MNULL); + PRINTM(MINFO, "CMD_RESP: BG_SCAN result is ready!\n"); + break; + case HostCmd_CMD_TXPWR_CFG: + ret = wlan_ret_tx_power_cfg(pmpriv, resp, pioctl_buf); + break; + + case HostCmd_CMD_802_11_RF_TX_POWER: + ret = wlan_ret_802_11_rf_tx_power(pmpriv, resp, pioctl_buf); + break; + + case HostCmd_CMD_802_11_PS_MODE_ENH: + ret = wlan_ret_enh_power_mode(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_HS_CFG_ENH: + ret = wlan_ret_802_11_hs_cfg(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_SLEEP_PERIOD: + ret = wlan_ret_802_11_sleep_period(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_SLEEP_PARAMS: + ret = wlan_ret_802_11_sleep_params(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_ASSOCIATE: + ret = wlan_ret_802_11_associate(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_DEAUTHENTICATE: + case HostCmd_CMD_802_11_DISASSOCIATE: + ret = wlan_ret_802_11_deauthenticate(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_AD_HOC_START: + case HostCmd_CMD_802_11_AD_HOC_JOIN: + ret = wlan_ret_802_11_ad_hoc(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_AD_HOC_STOP: + ret = wlan_ret_802_11_ad_hoc_stop(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_GET_LOG: + ret = wlan_ret_get_log(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_RSSI_INFO: + ret = wlan_ret_802_11_rssi_info(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_SNMP_MIB: + ret = wlan_ret_802_11_snmp_mib(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_RADIO_CONTROL: + ret = wlan_ret_802_11_radio_control(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_TX_RATE_QUERY: + ret = wlan_ret_802_11_tx_rate_query(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_RF_CHANNEL: + ret = wlan_ret_802_11_rf_channel(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_RF_ANTENNA: + ret = wlan_ret_802_11_rf_antenna(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_VERSION_EXT: + ret = wlan_ret_ver_ext(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_RX_MGMT_IND: + ret = wlan_ret_rx_mgmt_ind(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_FUNC_INIT: + case HostCmd_CMD_FUNC_SHUTDOWN: + break; + case HostCmd_CMD_802_11_KEY_MATERIAL: + ret = wlan_ret_802_11_key_material(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_SUPPLICANT_PMK: + ret = wlan_ret_802_11_supplicant_pmk(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_SUPPLICANT_PROFILE: + ret = wlan_ret_802_11_supplicant_profile(pmpriv, resp, + pioctl_buf); + break; + case HostCmd_CMD_802_11_EAPOL_PKT: + break; + case HostCmd_CMD_802_11D_DOMAIN_INFO: + ret = wlan_ret_802_11d_domain_info(pmpriv, resp); + break; + case HostCmd_CMD_802_11_TPC_ADAPT_REQ: + case HostCmd_CMD_802_11_TPC_INFO: + case HostCmd_CMD_802_11_CHAN_SW_ANN: + case HostCmd_CMD_CHAN_REPORT_REQUEST: + ret = wlan_11h_cmdresp_process(pmpriv, resp); + break; + case HostCmd_CMD_11N_ADDBA_REQ: + ret = wlan_ret_11n_addba_req(pmpriv, resp); + break; + case HostCmd_CMD_11N_DELBA: + ret = wlan_ret_11n_delba(pmpriv, resp); + break; + case HostCmd_CMD_11N_ADDBA_RSP: + ret = wlan_ret_11n_addba_resp(pmpriv, resp); + break; + case HostCmd_CMD_RECONFIGURE_TX_BUFF: + pmadapter->tx_buf_size = + (t_u16)wlan_le16_to_cpu(resp->params.tx_buf.buff_size); + pmadapter->tx_buf_size = + (pmadapter->tx_buf_size / MLAN_SDIO_BLOCK_SIZE) * + MLAN_SDIO_BLOCK_SIZE; + pmadapter->curr_tx_buf_size = pmadapter->tx_buf_size; + pmadapter->mp_end_port = + wlan_le16_to_cpu(resp->params.tx_buf.mp_end_port); + pmadapter->mp_data_port_mask = + pmadapter->psdio_device->reg->data_port_mask; + + for (ctr = 1; + ctr <= + pmadapter->psdio_device->max_ports - + pmadapter->mp_end_port; ctr++) { + pmadapter->mp_data_port_mask &= + ~(1 << + (pmadapter->psdio_device->max_ports - ctr)); + } + + if (pmadapter->psdio_device->supports_sdio_new_mode) { + pmadapter->curr_wr_port = 0; + pmadapter->mpa_tx.pkt_aggr_limit = + MIN(pmadapter->psdio_device->mp_aggr_pkt_limit, + (pmadapter->mp_end_port >> 1)); + } else { + pmadapter->curr_wr_port = 1; + } + PRINTM(MCMND, "end port %d, data port mask %x\n", + wlan_le16_to_cpu(resp->params.tx_buf.mp_end_port), + pmadapter->mp_data_port_mask); + PRINTM(MCMND, "max_tx_buf_size=%d, tx_buf_size=%d\n", + pmadapter->max_tx_buf_size, pmadapter->tx_buf_size); + break; + case HostCmd_CMD_AMSDU_AGGR_CTRL: + ret = wlan_ret_amsdu_aggr_ctrl(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_WMM_GET_STATUS: + ret = wlan_ret_wmm_get_status(pmpriv, + resp->params.get_wmm_status. + queue_status_tlv, + resp->size - S_DS_GEN); + break; + case HostCmd_CMD_WMM_ADDTS_REQ: + ret = wlan_ret_wmm_addts_req(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_WMM_DELTS_REQ: + ret = wlan_ret_wmm_delts_req(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_WMM_QUEUE_CONFIG: + ret = wlan_ret_wmm_queue_config(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_WMM_QUEUE_STATS: + ret = wlan_ret_wmm_queue_stats(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_WMM_TS_STATUS: + ret = wlan_ret_wmm_ts_status(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_IBSS_COALESCING_STATUS: + ret = wlan_ret_ibss_coalescing_status(pmpriv, resp); + break; + case HostCmd_CMD_MGMT_IE_LIST: + ret = wlan_ret_mgmt_ie_list(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_TDLS_CONFIG: + ret = wlan_ret_tdls_config(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_TDLS_OPERATION: + ret = wlan_ret_tdls_oper(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_11N_CFG: + ret = wlan_ret_11n_cfg(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_11AC_CFG: + ret = wlan_ret_11ac_cfg(pmpriv, resp, pioctl_buf); + break; +#if 0 + case HostCmd_CMD_RECONFIGURE_TX_BUFF: + pmadapter->tx_buf_size = + (t_u16)wlan_le16_to_cpu(resp->params.tx_buf.buff_size); + break; +#endif + case HostCmd_CMD_TX_BF_CFG: + ret = wlan_ret_tx_bf_cfg(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_ECL_SYSTEM_CLOCK_CONFIG: + ret = wlan_ret_sysclock_cfg(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_MAC_REG_ACCESS: + case HostCmd_CMD_BBP_REG_ACCESS: + case HostCmd_CMD_RF_REG_ACCESS: + case HostCmd_CMD_CAU_REG_ACCESS: + case HostCmd_CMD_TARGET_ACCESS: + case HostCmd_CMD_802_11_EEPROM_ACCESS: + ret = wlan_ret_reg_access(pmpriv->adapter, cmdresp_no, resp, + pioctl_buf); + break; + case HostCmd_CMD_MEM_ACCESS: + ret = wlan_ret_mem_access(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_INACTIVITY_TIMEOUT_EXT: + ret = wlan_ret_inactivity_timeout(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_SDIO_GPIO_INT_CONFIG: + break; + case HostCmd_CMD_SET_BSS_MODE: + break; + case HostCmd_CMD_MEASUREMENT_REQUEST: + case HostCmd_CMD_MEASUREMENT_REPORT: + ret = wlan_meas_cmdresp_process(pmpriv, resp); + break; +#ifdef WIFI_DIRECT_SUPPORT + case HostCmd_CMD_802_11_REMAIN_ON_CHANNEL: + ret = wlan_ret_remain_on_channel(pmpriv, resp, pioctl_buf); + break; + case HOST_CMD_WIFI_DIRECT_MODE_CONFIG: + ret = wlan_ret_wifi_direct_mode(pmpriv, resp, pioctl_buf); + break; +#endif + case HostCmd_CMD_802_11_SUBSCRIBE_EVENT: + ret = wlan_ret_subscribe_event(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_OTP_READ_USER_DATA: + ret = wlan_ret_otp_user_data(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_HS_WAKEUP_REASON: + ret = wlan_ret_hs_wakeup_reason(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_REJECT_ADDBA_REQ: + ret = wlan_ret_reject_addba_req(pmpriv, resp, pioctl_buf); + break; +#ifdef RX_PACKET_COALESCE + case HostCmd_CMD_RX_PKT_COALESCE_CFG: + ret = wlan_ret_rx_pkt_coalesce_cfg(pmpriv, resp, pioctl_buf); + break; +#endif + case HostCmd_CMD_MULTI_CHAN_CONFIG: + ret = wlan_ret_multi_chan_cfg(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_MULTI_CHAN_POLICY: + ret = wlan_ret_multi_chan_policy(pmpriv, resp, pioctl_buf); + break; + case HostCMD_CONFIG_LOW_POWER_MODE: + break; + case HostCmd_CMD_COALESCE_CFG: + ret = wlan_ret_coalesce_config(pmpriv, resp, pioctl_buf); + break; + default: + PRINTM(MERROR, "CMD_RESP: Unknown command response %#x\n", + resp->command); + break; + } + + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sta_event.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sta_event.c new file mode 100644 index 00000000..fc9d7cab --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sta_event.c @@ -0,0 +1,1154 @@ +/** @file mlan_sta_event.c + * + * @brief This file contains MLAN event handling. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/******************************************************** +Change log: + 10/13/2008: initial version +********************************************************/ + +#include "mlan.h" +#include "mlan_join.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_wmm.h" +#include "mlan_11n.h" +#include "mlan_11h.h" + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ + +/** + * @brief This function handles link lost, deauth and + * disassoc events. + * + * @param pmpriv A pointer to mlan_private structure + * @return N/A + */ +static t_void +wlan_handle_disconnect_event(pmlan_private pmpriv) +{ + ENTER(); + + if (pmpriv->media_connected == MTRUE) + wlan_reset_connect_state(pmpriv, MTRUE); + + LEAVE(); +} + +/** + * @brief This function will parse the TDLS event for further wlan action + * + * @param priv A pointer to mlan_private + * @param pevent A pointer to event buf + * + * @return N/A + */ +static void +wlan_parse_tdls_event(pmlan_private priv, pmlan_buffer pevent) +{ + Event_tdls_generic *tdls_event = (Event_tdls_generic *) + (pevent->pbuf + pevent->data_offset + sizeof(mlan_event_id)); + sta_node *sta_ptr = MNULL; + pmlan_adapter pmadapter = priv->adapter; + t_u8 i = 0; + IEEEtypes_HTCap_t *pht_cap = MNULL; + t_u16 ie_len = 0; + mlan_ds_misc_tdls_oper tdls_oper; + t_u8 event_buf[100]; + mlan_event *ptdls_event = (mlan_event *)event_buf; + tdls_tear_down_event *tdls_evt = + (tdls_tear_down_event *)ptdls_event->event_buf; + ENTER(); + + /* reason code is not mandatory, hence less by sizeof(t_u16) */ + if (pevent->data_len < (sizeof(Event_tdls_generic) - + sizeof(t_u16) - sizeof(mlan_event_id))) { + PRINTM(MERROR, "Invalid length %d for TDLS event\n", + pevent->data_len); + LEAVE(); + return; + } + sta_ptr = wlan_get_station_entry(priv, tdls_event->peer_mac_addr); + PRINTM(MEVENT, "TDLS_EVENT: %d " MACSTR "\n", + wlan_le16_to_cpu(tdls_event->event_type), + MAC2STR(tdls_event->peer_mac_addr)); + switch (wlan_le16_to_cpu(tdls_event->event_type)) { + case TDLS_EVENT_TYPE_SETUP_REQ: + if (sta_ptr == MNULL) { + sta_ptr = + wlan_add_station_entry(priv, + tdls_event-> + peer_mac_addr); + if (sta_ptr) { + sta_ptr->status = TDLS_SETUP_INPROGRESS; + wlan_hold_tdls_packets(priv, + tdls_event-> + peer_mac_addr); + } + } + break; + + case TDLS_EVENT_TYPE_LINK_ESTABLISHED: + if (sta_ptr) { + sta_ptr->status = TDLS_SETUP_COMPLETE; + /* parse the TLV for station's capability */ + ie_len = wlan_le16_to_cpu(tdls_event->u.ie_data. + ie_length); + if (ie_len) { + pht_cap = + (IEEEtypes_HTCap_t *) + wlan_get_specific_ie(priv, + tdls_event->u. + ie_data.ie_ptr, + ie_len, + HT_CAPABILITY); + if (pht_cap) { + sta_ptr->is_11n_enabled = MTRUE; + if (GETHT_MAXAMSDU + (pht_cap->ht_cap.ht_cap_info)) + sta_ptr->max_amsdu = + MLAN_TX_DATA_BUF_SIZE_8K; + else + sta_ptr->max_amsdu = + MLAN_TX_DATA_BUF_SIZE_4K; + } + } + for (i = 0; i < MAX_NUM_TID; i++) { + if (sta_ptr->is_11n_enabled) + sta_ptr->ampdu_sta[i] = + priv->aggr_prio_tbl[i]. + ampdu_user; + else + sta_ptr->ampdu_sta[i] = + BA_STREAM_NOT_ALLOWED; + } + memset(priv->adapter, sta_ptr->rx_seq, 0xff, + sizeof(sta_ptr->rx_seq)); + wlan_restore_tdls_packets(priv, + tdls_event->peer_mac_addr, + TDLS_SETUP_COMPLETE); + pmadapter->tdls_status = TDLS_IN_BASE_CHANNEL; + } + break; + + case TDLS_EVENT_TYPE_SETUP_FAILURE: + wlan_restore_tdls_packets(priv, tdls_event->peer_mac_addr, + TDLS_SETUP_FAILURE); + if (sta_ptr) + wlan_delete_station_entry(priv, + tdls_event->peer_mac_addr); + if (MTRUE == wlan_is_station_list_empty(priv)) + pmadapter->tdls_status = TDLS_NOT_SETUP; + else + pmadapter->tdls_status = TDLS_IN_BASE_CHANNEL; + break; + case TDLS_EVENT_TYPE_LINK_TORN_DOWN: + if (sta_ptr) { + if (sta_ptr->external_tdls) { + PRINTM(MMSG, + "Receive TDLS TEAR DOWN event, Disable TDLS LINK\n"); + memset(pmadapter, &tdls_oper, 0, + sizeof(tdls_oper)); + tdls_oper.tdls_action = WLAN_TDLS_DISABLE_LINK; + memcpy(priv->adapter, tdls_oper.peer_mac, + tdls_event->peer_mac_addr, + MLAN_MAC_ADDR_LENGTH); + /* Send command to firmware to delete tdls link */ + wlan_prepare_cmd(priv, + HostCmd_CMD_TDLS_OPERATION, + HostCmd_ACT_GEN_SET, + 0, + (t_void *)MNULL, &tdls_oper); + ptdls_event->bss_index = priv->bss_index; + ptdls_event->event_id = + MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ; + ptdls_event->event_len = + sizeof(tdls_tear_down_event); + memcpy(priv->adapter, + (t_u8 *)tdls_evt->peer_mac_addr, + tdls_event->peer_mac_addr, + MLAN_MAC_ADDR_LENGTH); + tdls_evt->reason_code = + wlan_le16_to_cpu(tdls_event->u. + reason_code); + wlan_recv_event(priv, + MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ, + ptdls_event); + /* Signal MOAL to trigger mlan_main_process */ + wlan_recv_event(priv, + MLAN_EVENT_ID_DRV_DEFER_HANDLING, + MNULL); + LEAVE(); + return; + } + wlan_restore_tdls_packets(priv, + tdls_event->peer_mac_addr, + TDLS_TEAR_DOWN); + if (sta_ptr->is_11n_enabled) { + wlan_cleanup_reorder_tbl(priv, + tdls_event-> + peer_mac_addr); + pmadapter->callbacks.moal_spin_lock(pmadapter-> + pmoal_handle, + priv->wmm. + ra_list_spinlock); + wlan_11n_cleanup_txbastream_tbl(priv, + tdls_event-> + peer_mac_addr); + pmadapter->callbacks. + moal_spin_unlock(pmadapter-> + pmoal_handle, + priv->wmm. + ra_list_spinlock); + } + wlan_delete_station_entry(priv, + tdls_event->peer_mac_addr); + if (MTRUE == wlan_is_station_list_empty(priv)) + pmadapter->tdls_status = TDLS_NOT_SETUP; + else + pmadapter->tdls_status = TDLS_IN_BASE_CHANNEL; + } + break; + case TDLS_EVENT_TYPE_CHAN_SWITCH_RESULT: + PRINTM(MEVENT, + "TDLS_CHAN_SWITCH_RESULT: status=0x%x, reason=0x%x current_channel=%d\n", + tdls_event->u.switch_result.status, + tdls_event->u.switch_result.reason, + (int)tdls_event->u.switch_result.current_channel); + if (tdls_event->u.switch_result.status == MLAN_STATUS_SUCCESS) { + if (tdls_event->u.switch_result.current_channel == + TDLS_BASE_CHANNEL) { + /* enable traffic to AP */ + if (pmadapter->tdls_status != + TDLS_IN_BASE_CHANNEL) { + wlan_update_non_tdls_ralist(priv, + tdls_event-> + peer_mac_addr, + MFALSE); + pmadapter->tdls_status = + TDLS_IN_BASE_CHANNEL; + } + } else if (tdls_event->u.switch_result. + current_channel == TDLS_OFF_CHANNEL) { + /* pause traffic to AP */ + if (pmadapter->tdls_status != + TDLS_IN_OFF_CHANNEL) { + wlan_update_non_tdls_ralist(priv, + tdls_event-> + peer_mac_addr, + MTRUE); + pmadapter->tdls_status = + TDLS_IN_OFF_CHANNEL; + } + } + } else { + if (tdls_event->u.switch_result.current_channel == + TDLS_BASE_CHANNEL) + pmadapter->tdls_status = TDLS_IN_BASE_CHANNEL; + else if (tdls_event->u.switch_result.current_channel == + TDLS_OFF_CHANNEL) + pmadapter->tdls_status = TDLS_IN_OFF_CHANNEL; + } + break; + case TDLS_EVENT_TYPE_START_CHAN_SWITCH: + PRINTM(MEVENT, "TDLS start channel switch....\n"); + pmadapter->tdls_status = TDLS_SWITCHING_CHANNEL; + break; + case TDLS_EVENT_TYPE_CHAN_SWITCH_STOPPED: + PRINTM(MEVENT, "TDLS channel switch stopped, reason=%d\n", + tdls_event->u.cs_stop_reason); + break; + case TDLS_EVENT_TYPE_DEBUG: + case TDLS_EVENT_TYPE_PACKET: + break; + default: + PRINTM(MERROR, "unknown event type %d\n", + wlan_le16_to_cpu(tdls_event->event_type)); + break; + } + LEAVE(); +} + +/** + * @brief This function send the tdls teardown request event. + * + * @param priv A pointer to mlan_private + * + * @return N/A + */ +void +wlan_send_tdls_tear_down_request(pmlan_private priv) +{ + t_u8 event_buf[100]; + mlan_event *ptdls_event = (mlan_event *)event_buf; + tdls_tear_down_event *tdls_evt = + (tdls_tear_down_event *)ptdls_event->event_buf; + sta_node *sta_ptr = MNULL; + + ENTER(); + + sta_ptr = (sta_node *)util_peek_list(priv->adapter->pmoal_handle, + &priv->sta_list, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); + if (!sta_ptr) { + LEAVE(); + return; + } + while (sta_ptr != (sta_node *)&priv->sta_list) { + if (sta_ptr->external_tdls) { + ptdls_event->bss_index = priv->bss_index; + ptdls_event->event_id = + MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ; + ptdls_event->event_len = sizeof(tdls_tear_down_event); + memcpy(priv->adapter, (t_u8 *)tdls_evt->peer_mac_addr, + sta_ptr->mac_addr, MLAN_MAC_ADDR_LENGTH); + tdls_evt->reason_code = + MLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED; + wlan_recv_event(priv, + MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ, + ptdls_event); + } + sta_ptr = sta_ptr->pnext; + } + LEAVE(); + return; +} + +/******************************************************** + Global Functions +********************************************************/ +/** + * @brief This function handles disconnect event, reports disconnect + * to upper layer, cleans tx/rx packets, + * resets link state etc. + * + * @param priv A pointer to mlan_private structure + * @param drv_disconnect Flag indicating the driver should disconnect + * and flush pending packets. + * + * @return N/A + */ +t_void +wlan_reset_connect_state(pmlan_private priv, t_u8 drv_disconnect) +{ + mlan_adapter *pmadapter = priv->adapter; + mlan_status ret = MLAN_STATUS_SUCCESS; + state_11d_t enable; + + ENTER(); + + PRINTM(MINFO, "Handles disconnect event.\n"); + + if (drv_disconnect) { + priv->media_connected = MFALSE; + wlan_11h_check_update_radar_det_state(priv); + } + + if (priv->port_ctrl_mode == MTRUE) { + /* Close the port on Disconnect */ + PRINTM(MINFO, "DISC: port_status = CLOSED\n"); + priv->port_open = MFALSE; + } + pmadapter->scan_block = MFALSE; + + /* Reset SNR/NF/RSSI values */ + priv->data_rssi_last = 0; + priv->data_nf_last = 0; + priv->data_rssi_avg = 0; + priv->data_nf_avg = 0; + priv->bcn_rssi_last = 0; + priv->bcn_nf_last = 0; + priv->bcn_rssi_avg = 0; + priv->bcn_nf_avg = 0; + priv->rxpd_rate = 0; + priv->rxpd_rate_info = 0; + priv->max_amsdu = 0; + wlan_coex_ampdu_rxwinsize(pmadapter); + + priv->sec_info.ewpa_enabled = MFALSE; + priv->sec_info.wpa_enabled = MFALSE; + priv->sec_info.wpa2_enabled = MFALSE; + priv->wpa_ie_len = 0; + + priv->sec_info.wapi_enabled = MFALSE; + priv->wapi_ie_len = 0; + priv->sec_info.wapi_key_on = MFALSE; + + priv->wps.session_enable = MFALSE; + memset(priv->adapter, (t_u8 *)&priv->wps.wps_ie, 0x00, + sizeof(priv->wps.wps_ie)); + priv->sec_info.osen_enabled = MFALSE; + priv->osen_ie_len = 0; + + priv->sec_info.encryption_mode = MLAN_ENCRYPTION_MODE_NONE; + + /* Enable auto data rate */ + priv->is_data_rate_auto = MTRUE; + priv->data_rate = 0; + + if (priv->bss_mode == MLAN_BSS_MODE_IBSS) { + priv->adhoc_state = ADHOC_IDLE; + priv->adhoc_is_link_sensed = MFALSE; + priv->intf_state_11h.adhoc_auto_sel_chan = MTRUE; + } + + if (drv_disconnect) { + /* Free Tx and Rx packets, report disconnect to upper layer */ + wlan_clean_txrx(priv); + + /* Need to erase the current SSID and BSSID info */ + memset(pmadapter, + &priv->curr_bss_params, 0x00, + sizeof(priv->curr_bss_params)); + } + wlan_send_tdls_tear_down_request(priv); + wlan_delete_station_list(priv); + pmadapter->tdls_status = TDLS_NOT_SETUP; + priv->wmm_qosinfo = priv->saved_wmm_qosinfo; + pmadapter->sleep_period.period = pmadapter->saved_sleep_period.period; + pmadapter->tx_lock_flag = MFALSE; + pmadapter->pps_uapsd_mode = MFALSE; + pmadapter->delay_null_pkt = MFALSE; + + if ((wlan_11d_is_enabled(priv)) && + (priv->state_11d.user_enable_11d == DISABLE_11D)) { + + priv->state_11d.enable_11d = DISABLE_11D; + enable = DISABLE_11D; + + /* Send cmd to FW to enable/disable 11D function */ + ret = wlan_prepare_cmd(priv, + HostCmd_CMD_802_11_SNMP_MIB, + HostCmd_ACT_GEN_SET, + Dot11D_i, MNULL, &enable); + if (ret) + PRINTM(MERROR, "11D: Failed to enable 11D\n"); + } + if (pmadapter->num_cmd_timeout && pmadapter->curr_cmd && + (pmadapter->cmd_timer_is_set == MFALSE)) { + LEAVE(); + return; + } + + wlan_recv_event(priv, MLAN_EVENT_ID_FW_DISCONNECTED, MNULL); + + LEAVE(); +} + +/** + * @brief This function sends the OBSS scan parameters to the application + * + * @param pmpriv A pointer to mlan_private structure + * + * @return N/A + */ +t_void +wlan_2040_coex_event(pmlan_private pmpriv) +{ + t_u8 event_buf[100]; + mlan_event *pevent = (mlan_event *)event_buf; + t_u8 ele_len; + + ENTER(); + + if (pmpriv->curr_bss_params.bss_descriptor.poverlap_bss_scan_param && + pmpriv->curr_bss_params.bss_descriptor.poverlap_bss_scan_param-> + ieee_hdr.element_id == OVERLAPBSSSCANPARAM) { + ele_len = + pmpriv->curr_bss_params.bss_descriptor. + poverlap_bss_scan_param->ieee_hdr.len; + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_DRV_OBSS_SCAN_PARAM; + /* Copy OBSS scan parameters */ + memcpy(pmpriv->adapter, (t_u8 *)pevent->event_buf, + (t_u8 *)&pmpriv->curr_bss_params.bss_descriptor. + poverlap_bss_scan_param->obss_scan_param, ele_len); + pevent->event_len = ele_len; + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_OBSS_SCAN_PARAM, + pevent); + } + + LEAVE(); +} + +/** + * @brief This function will process tx pause event + * + * @param priv A pointer to mlan_private + * @param pevent A pointer to event buf + * + * @return N/A + */ +static void +wlan_process_sta_tx_pause_event(pmlan_private priv, pmlan_buffer pevent) +{ + t_u16 tlv_type, tlv_len; + int tlv_buf_left = pevent->data_len - sizeof(t_u32); + MrvlIEtypesHeader_t *tlv = + (MrvlIEtypesHeader_t *)(pevent->pbuf + pevent->data_offset + + sizeof(t_u32)); + MrvlIEtypes_tx_pause_t *tx_pause_tlv; + sta_node *sta_ptr = MNULL; + tdlsStatus_e status; + t_u8 *bssid = MNULL; + ENTER(); + if (priv->media_connected) + bssid = priv->curr_bss_params.bss_descriptor.mac_address; + while (tlv_buf_left >= (int)sizeof(MrvlIEtypesHeader_t)) { + tlv_type = wlan_le16_to_cpu(tlv->type); + tlv_len = wlan_le16_to_cpu(tlv->len); + if ((sizeof(MrvlIEtypesHeader_t) + tlv_len) > + (unsigned int)tlv_buf_left) { + PRINTM(MERROR, "wrong tlv: tlvLen=%d, tlvBufLeft=%d\n", + tlv_len, tlv_buf_left); + break; + } + if (tlv_type == TLV_TYPE_TX_PAUSE) { + tx_pause_tlv = (MrvlIEtypes_tx_pause_t *)tlv; + PRINTM(MCMND, "TxPause: " MACSTR " pause=%d, pkts=%d\n", + MAC2STR(tx_pause_tlv->peermac), + tx_pause_tlv->tx_pause, tx_pause_tlv->pkt_cnt); + if (bssid && + !memcmp(priv->adapter, bssid, tx_pause_tlv->peermac, + MLAN_MAC_ADDR_LENGTH)) { + if (tx_pause_tlv->tx_pause) + priv->port_open = MFALSE; + else + priv->port_open = MTRUE; + } else { + status = wlan_get_tdls_link_status(priv, + tx_pause_tlv-> + peermac); + if (MTRUE == wlan_is_tdls_link_setup(status)) { + sta_ptr = + wlan_get_station_entry(priv, + tx_pause_tlv-> + peermac); + if (sta_ptr) { + if (sta_ptr->tx_pause != + tx_pause_tlv->tx_pause) { + sta_ptr->tx_pause = + tx_pause_tlv-> + tx_pause; + wlan_update_ralist_tx_pause + (priv, + tx_pause_tlv-> + peermac, + tx_pause_tlv-> + tx_pause); + } + } + } + } + } + tlv_buf_left -= (sizeof(MrvlIEtypesHeader_t) + tlv_len); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len + + sizeof(MrvlIEtypesHeader_t)); + } + + LEAVE(); + return; +} + +/** + * @brief This function handles events generated by firmware + * + * @param priv A pointer to mlan_private structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ops_sta_process_event(IN t_void *priv) +{ + pmlan_private pmpriv = (pmlan_private)priv; + pmlan_adapter pmadapter = pmpriv->adapter; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u32 eventcause = pmadapter->event_cause; + t_u8 event_buf[100]; + t_u8 *evt_buf = MNULL; + pmlan_buffer pmbuf = pmadapter->pmlan_buffer_event; + t_u16 reason_code; + pmlan_callbacks pcb = &pmadapter->callbacks; + mlan_event *pevent = (mlan_event *)event_buf; + + ENTER(); + + /* Event length check */ + if ((pmbuf->data_len - sizeof(eventcause)) > MAX_EVENT_SIZE) { + pmbuf->status_code = MLAN_ERROR_PKT_SIZE_INVALID; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + if (eventcause != EVENT_PS_SLEEP && eventcause != EVENT_PS_AWAKE && + pmbuf->data_len > sizeof(eventcause)) + DBG_HEXDUMP(MEVT_D, "EVENT", pmbuf->pbuf + pmbuf->data_offset, + pmbuf->data_len); + + switch (eventcause) { + case EVENT_DUMMY_HOST_WAKEUP_SIGNAL: + PRINTM(MERROR, + "Invalid EVENT: DUMMY_HOST_WAKEUP_SIGNAL, ignoring it\n"); + break; + case EVENT_LINK_SENSED: + PRINTM(MEVENT, "EVENT: LINK_SENSED\n"); + pmpriv->adhoc_is_link_sensed = MTRUE; + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_ADHOC_LINK_SENSED, + MNULL); + break; + + case EVENT_DEAUTHENTICATED: + if (pmpriv->wps.session_enable) { + PRINTM(MMSG, + "wlan: Recevie deauth event in wps session\n"); + break; + } + reason_code = + *(t_u16 *)(pmbuf->pbuf + pmbuf->data_offset + + sizeof(eventcause)); + PRINTM(MMSG, "wlan: EVENT: Deauthenticated (reason 0x%x)\n", + reason_code); + pmadapter->dbg.num_event_deauth++; + wlan_handle_disconnect_event(pmpriv); + + break; + + case EVENT_DISASSOCIATED: + if (pmpriv->wps.session_enable) { + PRINTM(MMSG, + "wlan: Recevie disassociate event in wps session\n"); + break; + } + reason_code = + *(t_u16 *)(pmbuf->pbuf + pmbuf->data_offset + + sizeof(eventcause)); + PRINTM(MMSG, "wlan: EVENT: Disassociated (reason 0x%x)\n", + reason_code); + pmadapter->dbg.num_event_disassoc++; + wlan_handle_disconnect_event(pmpriv); + break; + + case EVENT_LINK_LOST: + reason_code = + *(t_u16 *)(pmbuf->pbuf + pmbuf->data_offset + + sizeof(eventcause)); + PRINTM(MMSG, "wlan: EVENT: Link lost (reason 0x%x)\n", + reason_code); + pmadapter->dbg.num_event_link_lost++; + wlan_handle_disconnect_event(pmpriv); + break; + + case EVENT_PS_SLEEP: + PRINTM(MINFO, "EVENT: SLEEP\n"); + PRINTM(MEVENT, "_"); + + /* Handle unexpected PS SLEEP event */ + if (pmadapter->ps_state == PS_STATE_SLEEP_CFM) + break; + pmadapter->ps_state = PS_STATE_PRE_SLEEP; + + wlan_check_ps_cond(pmadapter); + break; + + case EVENT_PS_AWAKE: + PRINTM(MINFO, "EVENT: AWAKE\n"); + PRINTM(MEVENT, "|"); + if (!pmadapter->pps_uapsd_mode && + pmpriv->media_connected && + (pmpriv->port_open || !pmpriv->port_ctrl_mode) && + pmadapter->sleep_period.period) { + pmadapter->pps_uapsd_mode = MTRUE; + PRINTM(MEVENT, "PPS/UAPSD mode activated\n"); + } + /* Handle unexpected PS AWAKE event */ + if (pmadapter->ps_state == PS_STATE_SLEEP_CFM) + break; + pmadapter->tx_lock_flag = MFALSE; + if (pmadapter->pps_uapsd_mode && pmadapter->gen_null_pkt) { + if (MTRUE == wlan_check_last_packet_indication(pmpriv)) { + if (!pmadapter->data_sent) { + if (wlan_send_null_packet(pmpriv, + MRVDRV_TxPD_POWER_MGMT_NULL_PACKET + | + MRVDRV_TxPD_POWER_MGMT_LAST_PACKET) + == MLAN_STATUS_SUCCESS) { + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + } + } + } + pmadapter->ps_state = PS_STATE_AWAKE; + pmadapter->pm_wakeup_card_req = MFALSE; + pmadapter->pm_wakeup_fw_try = MFALSE; + break; + + case EVENT_HS_ACT_REQ: + PRINTM(MEVENT, "EVENT: HS_ACT_REQ\n"); + ret = wlan_prepare_cmd(priv, + HostCmd_CMD_802_11_HS_CFG_ENH, + 0, 0, MNULL, MNULL); + break; + + case EVENT_MIC_ERR_UNICAST: + PRINTM(MEVENT, "EVENT: UNICAST MIC ERROR\n"); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_MIC_ERR_UNI, MNULL); + break; + + case EVENT_MIC_ERR_MULTICAST: + PRINTM(MEVENT, "EVENT: MULTICAST MIC ERROR\n"); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_MIC_ERR_MUL, MNULL); + break; + case EVENT_MIB_CHANGED: + case EVENT_INIT_DONE: + break; + + case EVENT_ADHOC_BCN_LOST: + PRINTM(MEVENT, "EVENT: ADHOC_BCN_LOST\n"); + pmpriv->adhoc_is_link_sensed = MFALSE; + wlan_clean_txrx(pmpriv); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_ADHOC_LINK_LOST, + MNULL); + break; + + case EVENT_FW_DEBUG_INFO: + /* Allocate memory for event buffer */ + ret = pcb->moal_malloc(pmadapter->pmoal_handle, + MAX_EVENT_SIZE, MLAN_MEM_DEF, &evt_buf); + if ((ret == MLAN_STATUS_SUCCESS) && evt_buf) { + pevent = (pmlan_event)evt_buf; + pevent->bss_index = pmpriv->bss_index; + PRINTM(MEVENT, "EVENT: FW Debug Info\n"); + pevent->event_id = MLAN_EVENT_ID_FW_DEBUG_INFO; + pevent->event_len = + pmbuf->data_len - sizeof(eventcause); + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset + + sizeof(eventcause), pevent->event_len); + wlan_recv_event(pmpriv, pevent->event_id, pevent); + pcb->moal_mfree(pmadapter->pmoal_handle, evt_buf); + } + break; + + case EVENT_BG_SCAN_REPORT: + PRINTM(MEVENT, "EVENT: BGS_REPORT\n"); + pmadapter->bgscan_reported = MTRUE; + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_BG_SCAN, MNULL); + break; + case EVENT_BG_SCAN_STOPPED: + PRINTM(MEVENT, "EVENT: BGS_STOPPED\n"); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_BG_SCAN_STOPPED, + MNULL); + break; + + case EVENT_PORT_RELEASE: + PRINTM(MEVENT, "EVENT: PORT RELEASE\n"); + /* Open the port for e-supp mode */ + if (pmpriv->port_ctrl_mode == MTRUE) { + PRINTM(MINFO, "PORT_REL: port_status = OPEN\n"); + pmpriv->port_open = MTRUE; + } + pmadapter->scan_block = MFALSE; + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_PORT_RELEASE, MNULL); + break; + + case EVENT_STOP_TX: + PRINTM(MEVENT, "EVENT: Stop Tx (%#x)\n", eventcause); + wlan_11h_tx_disable(pmpriv); /* this fn will send event up + to MOAL */ + break; + case EVENT_START_TX: + PRINTM(MEVENT, "EVENT: Start Tx (%#x)\n", eventcause); + wlan_11h_tx_enable(pmpriv); /* this fn will send event up + to MOAL */ + break; + case EVENT_CHANNEL_SWITCH: + PRINTM(MEVENT, "EVENT: Channel Switch (%#x)\n", eventcause); + /* To be handled for 'chanswann' private command */ + break; + case EVENT_CHANNEL_SWITCH_ANN: + PRINTM(MEVENT, "EVENT: Channel Switch Announcement\n"); + /* Here, pass up event first, as handling will send deauth */ + wlan_recv_event(pmpriv, + MLAN_EVENT_ID_FW_CHANNEL_SWITCH_ANN, MNULL); + wlan_11h_handle_event_chanswann(pmpriv); + break; + case EVENT_RADAR_DETECTED: + PRINTM(MEVENT, "EVENT: Radar Detected\n"); + + /* Send as passthru first, this event can cause other events */ + memset(pmadapter, pevent, 0x00, sizeof(event_buf)); + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; + pevent->event_len = pmbuf->data_len; + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset, pevent->event_len); + wlan_recv_event(pmpriv, pevent->event_id, pevent); + + if (pmadapter->state_rdh.stage == RDH_OFF) { + pmadapter->state_rdh.stage = RDH_CHK_INTFS; + wlan_11h_radar_detected_handling(pmadapter); + } else { + PRINTM(MEVENT, "Ignore Event Radar Detected - handling" + " already in progress.\n"); + } + + break; + + case EVENT_CHANNEL_REPORT_RDY: + PRINTM(MEVENT, "EVENT: Channel Report Ready\n"); + /* Allocate memory for event buffer */ + ret = pcb->moal_malloc(pmadapter->pmoal_handle, + MAX_EVENT_SIZE, MLAN_MEM_DEF, &evt_buf); + if ((ret == MLAN_STATUS_SUCCESS) && evt_buf) { + memset(pmadapter, evt_buf, 0x00, MAX_EVENT_SIZE); + /* Setup event buffer */ + pevent = (pmlan_event)evt_buf; + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_FW_CHANNEL_REPORT_RDY; + pevent->event_len = + pmbuf->data_len - sizeof(eventcause); + /* Copy event data */ + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset + + sizeof(eventcause), pevent->event_len); + /* Handle / pass event data */ + ret = wlan_11h_handle_event_chanrpt_ready(pmpriv, + pevent); + + /* Also send this event as passthru */ + pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; + pevent->event_len = pmbuf->data_len; + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset, + pevent->event_len); + wlan_recv_event(pmpriv, pevent->event_id, pevent); + /* Now done with buffer */ + pcb->moal_mfree(pmadapter->pmoal_handle, evt_buf); + } + /* Send up this Event to unblock MOAL waitqueue */ + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_MEAS_REPORT, MNULL); + break; + case EVENT_EXT_SCAN_REPORT: + PRINTM(MEVENT, "EVENT: EXT_SCAN Report (%d)\n", + pmbuf->data_len); + if (pmadapter->pscan_ioctl_req && pmadapter->ext_scan) + ret = wlan_handle_event_ext_scan_report(priv, pmbuf); + break; + case EVENT_MEAS_REPORT_RDY: + PRINTM(MEVENT, "EVENT: Measurement Report Ready (%#x)\n", + eventcause); + ret = wlan_prepare_cmd(priv, HostCmd_CMD_MEASUREMENT_REPORT, + HostCmd_ACT_GEN_SET, 0, 0, MNULL); + break; + case EVENT_WMM_STATUS_CHANGE: + if (pmbuf && pmbuf->data_len + > sizeof(eventcause) + sizeof(MrvlIEtypesHeader_t)) { + PRINTM(MEVENT, "EVENT: WMM status changed: %d\n", + pmbuf->data_len); + + evt_buf = (pmbuf->pbuf + + pmbuf->data_offset + sizeof(eventcause)); + + wlan_ret_wmm_get_status(pmpriv, + evt_buf, + pmbuf->data_len - + sizeof(eventcause)); + } else { + PRINTM(MEVENT, "EVENT: WMM status changed\n"); + ret = wlan_cmd_wmm_status_change(pmpriv); + } + break; + + case EVENT_RSSI_LOW: + PRINTM(MEVENT, "EVENT: Beacon RSSI_LOW\n"); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_BCN_RSSI_LOW, MNULL); + break; + case EVENT_SNR_LOW: + PRINTM(MEVENT, "EVENT: Beacon SNR_LOW\n"); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_BCN_SNR_LOW, MNULL); + break; + case EVENT_MAX_FAIL: + PRINTM(MEVENT, "EVENT: MAX_FAIL\n"); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_MAX_FAIL, MNULL); + break; + case EVENT_RSSI_HIGH: + PRINTM(MEVENT, "EVENT: Beacon RSSI_HIGH\n"); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_BCN_RSSI_HIGH, MNULL); + break; + case EVENT_SNR_HIGH: + PRINTM(MEVENT, "EVENT: Beacon SNR_HIGH\n"); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_BCN_SNR_HIGH, MNULL); + break; + case EVENT_DATA_RSSI_LOW: + PRINTM(MEVENT, "EVENT: Data RSSI_LOW\n"); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_DATA_RSSI_LOW, MNULL); + break; + case EVENT_DATA_SNR_LOW: + PRINTM(MEVENT, "EVENT: Data SNR_LOW\n"); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_DATA_SNR_LOW, MNULL); + break; + case EVENT_DATA_RSSI_HIGH: + PRINTM(MEVENT, "EVENT: Data RSSI_HIGH\n"); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_DATA_RSSI_HIGH, MNULL); + break; + case EVENT_DATA_SNR_HIGH: + PRINTM(MEVENT, "EVENT: Data SNR_HIGH\n"); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_DATA_SNR_HIGH, MNULL); + break; + case EVENT_LINK_QUALITY: + PRINTM(MEVENT, "EVENT: Link Quality\n"); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_LINK_QUALITY, MNULL); + break; + case EVENT_PRE_BEACON_LOST: + PRINTM(MEVENT, "EVENT: Pre-Beacon Lost\n"); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_PRE_BCN_LOST, MNULL); + break; + case EVENT_IBSS_COALESCED: + PRINTM(MEVENT, "EVENT: IBSS_COALESCED\n"); + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_IBSS_COALESCING_STATUS, + HostCmd_ACT_GEN_GET, 0, MNULL, MNULL); + break; + case EVENT_ADDBA: + PRINTM(MEVENT, "EVENT: ADDBA Request\n"); + if (pmpriv->media_connected == MTRUE) + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_11N_ADDBA_RSP, + HostCmd_ACT_GEN_SET, 0, MNULL, + pmadapter->event_body); + else + PRINTM(MERROR, + "Ignore ADDBA Request event in disconnected state\n"); + break; + case EVENT_DELBA: + PRINTM(MEVENT, "EVENT: DELBA Request\n"); + if (pmpriv->media_connected == MTRUE) + wlan_11n_delete_bastream(pmpriv, pmadapter->event_body); + else + PRINTM(MERROR, + "Ignore DELBA Request event in disconnected state\n"); + break; + case EVENT_BA_STREAM_TIMEOUT: + PRINTM(MEVENT, "EVENT: BA Stream timeout\n"); + if (pmpriv->media_connected == MTRUE) + wlan_11n_ba_stream_timeout(pmpriv, + (HostCmd_DS_11N_BATIMEOUT *) + pmadapter->event_body); + else + PRINTM(MERROR, + "Ignore BA Stream timeout event in disconnected state\n"); + break; + case EVENT_RXBA_SYNC: + PRINTM(MEVENT, "EVENT: RXBA_SYNC\n"); + wlan_11n_rxba_sync_event(pmpriv, pmadapter->event_body, + pmbuf->data_len - sizeof(eventcause)); + break; + case EVENT_AMSDU_AGGR_CTRL: + PRINTM(MEVENT, "EVENT: AMSDU_AGGR_CTRL %d\n", + *(t_u16 *)pmadapter->event_body); + pmadapter->tx_buf_size = + MIN(pmadapter->curr_tx_buf_size, + wlan_le16_to_cpu(*(t_u16 *)pmadapter->event_body)); + PRINTM(MEVENT, "tx_buf_size %d\n", pmadapter->tx_buf_size); + break; + + case EVENT_WEP_ICV_ERR: + PRINTM(MEVENT, "EVENT: WEP ICV error\n"); + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_FW_WEP_ICV_ERR; + pevent->event_len = sizeof(Event_WEP_ICV_ERR); + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmadapter->event_body, pevent->event_len); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_WEP_ICV_ERR, pevent); + break; + + case EVENT_BW_CHANGE: + PRINTM(MEVENT, "EVENT: BW Change\n"); + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_FW_BW_CHANGED; + pevent->event_len = sizeof(t_u8); + /* Copy event body from the event buffer */ + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmadapter->event_body, pevent->event_len); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_BW_CHANGED, pevent); + break; + +#ifdef WIFI_DIRECT_SUPPORT + case EVENT_WIFIDIRECT_GENERIC_EVENT: + PRINTM(MEVENT, "EVENT: WIFIDIRECT event %d\n", eventcause); + /* Allocate memory for event buffer */ + ret = pcb->moal_malloc(pmadapter->pmoal_handle, MAX_EVENT_SIZE, + MLAN_MEM_DEF, &evt_buf); + if ((ret == MLAN_STATUS_SUCCESS) && evt_buf) { + pevent = (pmlan_event)evt_buf; + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; + pevent->event_len = pmbuf->data_len; + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset, + pevent->event_len); + wlan_recv_event(pmpriv, pevent->event_id, pevent); + pcb->moal_mfree(pmadapter->pmoal_handle, evt_buf); + } + break; + case EVENT_WIFIDIRECT_SERVICE_DISCOVERY: + PRINTM(MEVENT, "EVENT: WIFIDIRECT service discovery event %d\n", + eventcause); + /* Allocate large memory for service discovery */ + if (pmbuf->data_len < MAX_EVENT_SIZE) + ret = pcb->moal_malloc(pmadapter->pmoal_handle, + MAX_EVENT_SIZE, MLAN_MEM_DEF, + &evt_buf); + else + ret = pcb->moal_malloc(pmadapter->pmoal_handle, + MAX_EVENT_SIZE * 2, MLAN_MEM_DEF, + &evt_buf); + if ((ret == MLAN_STATUS_SUCCESS) && evt_buf) { + pevent = (pmlan_event)evt_buf; + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; + pevent->event_len = pmbuf->data_len; + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset, + pevent->event_len); + wlan_recv_event(pmpriv, pevent->event_id, pevent); + pcb->moal_mfree(pmadapter->pmoal_handle, evt_buf); + } + break; + case EVENT_REMAIN_ON_CHANNEL_EXPIRED: + PRINTM(MEVENT, "EVENT: REMAIN_ON_CHANNEL_EXPIRED reason=%d\n", + *(t_u16 *)pmadapter->event_body); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_FLUSH_RX_WORK, MNULL); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_REMAIN_ON_CHAN_EXPIRED, + MNULL); + break; +#endif /* WIFI_DIRECT_SUPPORT */ + + case EVENT_TDLS_GENERIC_EVENT: + PRINTM(MEVENT, "EVENT: TDLS event %d\n", eventcause); + wlan_parse_tdls_event(pmpriv, pmbuf); + /* Allocate memory for event buffer */ + ret = pcb->moal_malloc(pmadapter->pmoal_handle, MAX_EVENT_SIZE, + MLAN_MEM_DEF, &evt_buf); + if ((ret == MLAN_STATUS_SUCCESS) && evt_buf) { + pevent = (pmlan_event)evt_buf; + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; + pevent->event_len = pmbuf->data_len; + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset, + pevent->event_len); + wlan_recv_event(pmpriv, pevent->event_id, pevent); + pcb->moal_mfree(pmadapter->pmoal_handle, evt_buf); + } + break; + + case EVENT_TX_DATA_PAUSE: + PRINTM(MEVENT, "EVENT: TX_DATA_PAUSE\n"); + wlan_process_sta_tx_pause_event(priv, pmbuf); + break; + + case EVENT_SAD_REPORT: + pevent->event_len = pmbuf->data_len - sizeof(eventcause); + if (pevent->event_len > sizeof(t_u32)) { + PRINTM(MEVENT, "EVENT: SAD_REPORT %d\n", eventcause); + /* Allocate memory for event buffer */ + ret = pcb->moal_malloc(pmadapter->pmoal_handle, + MAX_EVENT_SIZE, MLAN_MEM_DEF, + &evt_buf); + if ((ret == MLAN_STATUS_SUCCESS) && evt_buf) { + pevent = (pmlan_event)evt_buf; + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; + pevent->event_len = pmbuf->data_len; + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset, + pevent->event_len); + wlan_recv_event(pmpriv, pevent->event_id, + pevent); + pcb->moal_mfree(pmadapter->pmoal_handle, + evt_buf); + } + } else { + t_u8 *pevt_dat = + pmbuf->pbuf + pmbuf->data_offset + + sizeof(t_u32); + PRINTM(MEVENT, + "EVENT: Antenna Diversity %d (%d, %d, %d, %d)\n", + eventcause, pevt_dat[0] + 1, pevt_dat[1] + 1, + pevt_dat[2], pevt_dat[3]); + } + break; + case EVENT_MULTI_CHAN_INFO: + PRINTM(MEVENT, "EVENT: MULTI_CHAN_INFO\n"); + wlan_handle_event_multi_chan_info(pmpriv, pmbuf); + break; + + case EVENT_FW_DUMP_INFO: + PRINTM(MEVENT, "EVENT: Dump FW info\n"); + /* Allocate memory for event buffer */ + ret = pcb->moal_malloc(pmadapter->pmoal_handle, MAX_EVENT_SIZE, + MLAN_MEM_DEF, &evt_buf); + if ((ret == MLAN_STATUS_SUCCESS) && evt_buf) { + pevent = (pmlan_event)evt_buf; + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_FW_DUMP_INFO; + pevent->event_len = pmbuf->data_len; + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset, + pevent->event_len); + wlan_recv_event(pmpriv, pevent->event_id, pevent); + pcb->moal_mfree(pmadapter->pmoal_handle, evt_buf); + } + break; + case EVENT_TX_STATUS_REPORT: + PRINTM(MINFO, "EVENT: TX_STATUS\n"); + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_FW_TX_STATUS; + pevent->event_len = pmbuf->data_len; + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset, MIN(pevent->event_len, + sizeof + (event_buf))); + wlan_recv_event(pmpriv, pevent->event_id, pevent); + break; + case EVENT_BT_COEX_WLAN_PARA_CHANGE: + PRINTM(MEVENT, "EVENT: BT coex wlan param update\n"); + wlan_bt_coex_wlan_param_update_event(pmpriv, pmbuf); + break; + default: + PRINTM(MEVENT, "EVENT: unknown event id: %#x\n", eventcause); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_UNKNOWN, MNULL); + break; + } + + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sta_ioctl.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sta_ioctl.c new file mode 100644 index 00000000..60dd042e --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sta_ioctl.c @@ -0,0 +1,5573 @@ +/** @file mlan_sta_ioctl.c + * + * @brief This file contains the functions for station ioctl. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 10/21/2008: initial version +******************************************************/ + +#include "mlan.h" +#include "mlan_join.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_wmm.h" +#include "mlan_11n.h" +#include "mlan_11ac.h" +#include "mlan_sdio.h" +#include "mlan_11h.h" + +/******************************************************** + Local Variables +********************************************************/ + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ +/** + * @brief enable adhoc aes key + * + * @param pmpriv A pointer to mlan_private structure + * + * @return N/A + */ +static void +wlan_enable_aes_key(pmlan_private pmpriv) +{ + + ENTER(); + + if (pmpriv->aes_key.key_len != WPA_AES_KEY_LEN) { + LEAVE(); + return; + } + wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_KEY_MATERIAL, + HostCmd_ACT_GEN_SET, 0, MNULL, &pmpriv->aes_key); + + LEAVE(); + return; +} + +/** + * @brief Get signal information + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_get_info_signal(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + pmlan_private pmpriv = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (pioctl_req != MNULL) { + pmpriv = pmadapter->priv[pioctl_req->bss_index]; + } else { + PRINTM(MERROR, "MLAN IOCTL information is not present\n"); + ret = MLAN_STATUS_FAILURE; + goto exit; + } + + /* Check information buffer length of MLAN IOCTL */ + if (pioctl_req->buf_len < sizeof(mlan_ds_get_signal)) { + PRINTM(MWARN, + "MLAN IOCTL information buffer length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_get_signal); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_RESOURCE; + goto exit; + } + + /* Signal info can be obtained only if connected */ + if (pmpriv->media_connected == MFALSE) { + PRINTM(MINFO, "Can not get signal in disconnected state\n"); + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_RSSI_INFO, + HostCmd_ACT_GEN_GET, + 0, (t_void *)pioctl_req, MNULL); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + +exit: + LEAVE(); + return ret; +} + +/** + * @brief Get statistics information + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_get_info_stats(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + pmlan_private pmpriv = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (pioctl_req != MNULL) { + pmpriv = pmadapter->priv[pioctl_req->bss_index]; + } else { + PRINTM(MERROR, "MLAN IOCTL information is not present\n"); + ret = MLAN_STATUS_FAILURE; + goto exit; + } + + /* Check information buffer length of MLAN IOCTL */ + if (pioctl_req->buf_len < sizeof(mlan_ds_get_stats)) { + PRINTM(MWARN, + "MLAN IOCTL information buffer length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_get_stats); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_RESOURCE; + goto exit; + } + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_GET_LOG, + HostCmd_ACT_GEN_GET, + 0, (t_void *)pioctl_req, MNULL); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + +exit: + LEAVE(); + return ret; +} + +/** + * @brief Get BSS information + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_get_info_bss_info(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_get_info *info; + BSSDescriptor_t *pbss_desc; + t_s32 tbl_idx = 0; + + ENTER(); + + /* Get current BSS info */ + pbss_desc = &pmpriv->curr_bss_params.bss_descriptor; + info = (mlan_ds_get_info *)pioctl_req->pbuf; + + /* BSS mode */ + info->param.bss_info.bss_mode = pmpriv->bss_mode; + + /* SSID */ + memcpy(pmadapter, &info->param.bss_info.ssid, &pbss_desc->ssid, + sizeof(mlan_802_11_ssid)); + + /* BSSID */ + memcpy(pmadapter, &info->param.bss_info.bssid, &pbss_desc->mac_address, + MLAN_MAC_ADDR_LENGTH); + + /* Channel */ + info->param.bss_info.bss_chan = pbss_desc->channel; + + /* Beacon interval */ + info->param.bss_info.beacon_interval = pbss_desc->beacon_period; + + /* Band */ + info->param.bss_info.bss_band = (t_u8)pbss_desc->bss_band; + + /* Region code */ + info->param.bss_info.region_code = pmadapter->region_code; + + /* Scan table index if connected */ + info->param.bss_info.scan_table_idx = 0; + info->param.bss_info.scan_block = pmadapter->scan_block; + if (pmpriv->media_connected == MTRUE) { + tbl_idx = + wlan_find_ssid_in_list(pmpriv, &pbss_desc->ssid, + pbss_desc->mac_address, + pmpriv->bss_mode); + if (tbl_idx >= 0) + info->param.bss_info.scan_table_idx = tbl_idx; + } + + /* Connection status */ + info->param.bss_info.media_connected = pmpriv->media_connected; + + /* Radio status */ + info->param.bss_info.radio_on = pmadapter->radio_on; + + /* Tx power information */ + info->param.bss_info.max_power_level = pmpriv->max_tx_power_level; + info->param.bss_info.min_power_level = pmpriv->min_tx_power_level; + + /* AdHoc state */ + info->param.bss_info.adhoc_state = pmpriv->adhoc_state; + + /* Last beacon NF */ + info->param.bss_info.bcn_nf_last = pmpriv->bcn_nf_last; + + /* wep status */ + if (pmpriv->sec_info.wep_status == Wlan802_11WEPEnabled) + info->param.bss_info.wep_status = MTRUE; + else + info->param.bss_info.wep_status = MFALSE; + + info->param.bss_info.is_hs_configured = pmadapter->is_hs_configured; + info->param.bss_info.is_deep_sleep = pmadapter->is_deep_sleep; + + /* Capability Info */ + info->param.bss_info.capability_info = 0; + memcpy(pmadapter, &info->param.bss_info.capability_info, + &pbss_desc->cap_info, + sizeof(info->param.bss_info.capability_info)); + + /* Listen Interval */ + info->param.bss_info.listen_interval = pmpriv->listen_interval; + + /* Association ID */ + if (pmpriv->assoc_rsp_buf) + info->param.bss_info.assoc_id = + (t_u16)((IEEEtypes_AssocRsp_t *)pmpriv->assoc_rsp_buf)-> + a_id; + else + info->param.bss_info.assoc_id = 0; + + /* AP/Peer supported rates */ + memset(pmadapter, info->param.bss_info.peer_supp_rates, 0, + sizeof(info->param.bss_info.peer_supp_rates)); + memcpy(pmadapter, info->param.bss_info.peer_supp_rates, + pbss_desc->supported_rates, + MIN(sizeof(info->param.bss_info.peer_supp_rates), + sizeof(pbss_desc->supported_rates))); + if (pbss_desc->pmd_ie) { + info->param.bss_info.mdid = pbss_desc->pmd_ie->mdid; + info->param.bss_info.ft_cap = pbss_desc->pmd_ie->ft_cap; + } + pioctl_req->data_read_written = + sizeof(mlan_bss_info) + MLAN_SUB_COMMAND_SIZE; + + LEAVE(); + return ret; +} + +/** + * @brief Get information handler + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_get_info_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_ds_get_info *pget_info = MNULL; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + pget_info = (mlan_ds_get_info *)pioctl_req->pbuf; + + switch (pget_info->sub_command) { + case MLAN_OID_GET_STATS: + status = wlan_get_info_stats(pmadapter, pioctl_req); + break; + case MLAN_OID_GET_SIGNAL: + status = wlan_get_info_signal(pmadapter, pioctl_req); + break; + case MLAN_OID_GET_FW_INFO: + pioctl_req->data_read_written = + sizeof(mlan_fw_info) + MLAN_SUB_COMMAND_SIZE; + pget_info->param.fw_info.fw_ver = pmadapter->fw_release_number; + memcpy(pmadapter, &pget_info->param.fw_info.mac_addr, + pmpriv->curr_addr, MLAN_MAC_ADDR_LENGTH); + pget_info->param.fw_info.fw_bands = pmadapter->fw_bands; + pget_info->param.fw_info.region_code = pmadapter->region_code; + pget_info->param.fw_info.hw_dev_mcs_support = + pmadapter->hw_dev_mcs_support; + pget_info->param.fw_info.hw_dot_11n_dev_cap = + pmadapter->hw_dot_11n_dev_cap; + pget_info->param.fw_info.hw_dot_11ac_mcs_support = + pmadapter->hw_dot_11ac_mcs_support; + pget_info->param.fw_info.hw_dot_11ac_dev_cap = + pmadapter->hw_dot_11ac_dev_cap; + break; + case MLAN_OID_GET_BSS_INFO: + status = wlan_get_info_bss_info(pmadapter, pioctl_req); + break; + case MLAN_OID_GET_DEBUG_INFO: + status = wlan_get_info_debug_info(pmadapter, pioctl_req); + break; + case MLAN_OID_GET_VER_EXT: + status = wlan_get_info_ver_ext(pmadapter, pioctl_req); + break; + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + + LEAVE(); + return status; +} + +/** + * @brief Set/Get SNMP MIB handler + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_snmp_mib_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 cmd_action = 0; + t_u16 cmd_oid = 0; + mlan_ds_snmp_mib *mib = MNULL; + t_u32 value = 0; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_snmp_mib)) { + PRINTM(MWARN, + "MLAN IOCTL information buffer length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_snmp_mib); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_RESOURCE; + goto exit; + } + + mib = (mlan_ds_snmp_mib *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + + switch (mib->sub_command) { + case MLAN_OID_SNMP_MIB_RTS_THRESHOLD: + value = mib->param.rts_threshold; + cmd_oid = RtsThresh_i; + break; + case MLAN_OID_SNMP_MIB_FRAG_THRESHOLD: + value = mib->param.frag_threshold; + cmd_oid = FragThresh_i; + break; + case MLAN_OID_SNMP_MIB_RETRY_COUNT: + value = mib->param.retry_count; + cmd_oid = ShortRetryLim_i; + break; + case MLAN_OID_SNMP_MIB_DTIM_PERIOD: + value = mib->param.dtim_period; + cmd_oid = DtimPeriod_i; + break; + } + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_SNMP_MIB, + cmd_action, + cmd_oid, (t_void *)pioctl_req, &value); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + +exit: + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Infra/Ad-hoc band configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_radio_ioctl_band_cfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + t_u8 i, global_band = 0; + t_u8 chan_offset; + t_u8 infra_band = 0; + t_u8 adhoc_band = 0; + t_u32 adhoc_channel = 0; + mlan_ds_radio_cfg *radio_cfg = MNULL; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + radio_cfg = (mlan_ds_radio_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) { + infra_band = (t_u8)radio_cfg->param.band_cfg.config_bands; + adhoc_band = (t_u8)radio_cfg->param.band_cfg.adhoc_start_band; + adhoc_channel = radio_cfg->param.band_cfg.adhoc_channel; + + /* SET Infra band */ + if ((infra_band | pmadapter->fw_bands) & ~pmadapter->fw_bands) { + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + /* SET Ad-hoc Band */ + if ((adhoc_band | pmadapter->fw_bands) & ~pmadapter->fw_bands) { + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + if (!adhoc_band) + adhoc_band = pmadapter->adhoc_start_band; + + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i] && pmadapter->priv[i] != pmpriv + && GET_BSS_ROLE(pmadapter->priv[i]) == + MLAN_BSS_ROLE_STA) + global_band |= pmadapter->priv[i]->config_bands; + } + global_band |= infra_band; + + if (wlan_set_regiontable + (pmpriv, (t_u8)pmadapter->region_code, + global_band | adhoc_band)) { + pioctl_req->status_code = MLAN_ERROR_IOCTL_FAIL; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + if (wlan_11d_set_universaltable + (pmpriv, global_band | adhoc_band)) { + pioctl_req->status_code = MLAN_ERROR_IOCTL_FAIL; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + pmpriv->config_bands = infra_band; + pmadapter->config_bands = global_band; + + pmadapter->adhoc_start_band = adhoc_band; + pmpriv->intf_state_11h.adhoc_auto_sel_chan = MFALSE; + pmadapter->chan_bandwidth = + (t_u8)radio_cfg->param.band_cfg.adhoc_chan_bandwidth; + /* + * If no adhoc_channel is supplied verify if the existing + * adhoc channel compiles with new adhoc_band + */ + if (!adhoc_channel) { + if (!wlan_find_cfp_by_band_and_channel + (pmadapter, pmadapter->adhoc_start_band, + pmpriv->adhoc_channel)) { + /* Pass back the default channel */ + radio_cfg->param.band_cfg.adhoc_channel = + DEFAULT_AD_HOC_CHANNEL; + if ((pmadapter->adhoc_start_band & BAND_A) + || (pmadapter->adhoc_start_band & BAND_AN) + ) { + radio_cfg->param.band_cfg. + adhoc_channel = + DEFAULT_AD_HOC_CHANNEL_A; + } + } + } else { + /* Return error if adhoc_band and adhoc_channel + combination is invalid */ + if (!wlan_find_cfp_by_band_and_channel + (pmadapter, pmadapter->adhoc_start_band, + (t_u16)adhoc_channel)) { + pioctl_req->status_code = + MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + pmpriv->adhoc_channel = (t_u8)adhoc_channel; + } + + /* validate the channel offset */ + chan_offset = wlan_validate_chan_offset(pmpriv, + pmadapter-> + adhoc_start_band, + pmpriv->adhoc_channel, + pmadapter-> + chan_bandwidth); + + if (chan_offset != SEC_CHAN_NONE) { + if (chan_offset == SEC_CHANNEL_ABOVE) + pmadapter->chan_bandwidth = + CHANNEL_BW_40MHZ_ABOVE; + else + pmadapter->chan_bandwidth = + CHANNEL_BW_40MHZ_BELOW; + } + if ((adhoc_band & BAND_GN) + || (adhoc_band & BAND_AN) + ) { + pmadapter->adhoc_11n_enabled = MTRUE; + } else { + pmadapter->adhoc_11n_enabled = MFALSE; + } + } else { + /* Infra Bands */ + radio_cfg->param.band_cfg.config_bands = pmpriv->config_bands; + /* Adhoc Band */ + radio_cfg->param.band_cfg.adhoc_start_band = + pmadapter->adhoc_start_band; + /* Adhoc Channel */ + radio_cfg->param.band_cfg.adhoc_channel = pmpriv->adhoc_channel; + /* FW support Bands */ + radio_cfg->param.band_cfg.fw_bands = pmadapter->fw_bands; + PRINTM(MINFO, "Global config band = %d\n", + pmadapter->config_bands); + /* adhoc channel bandwidth */ + radio_cfg->param.band_cfg.adhoc_chan_bandwidth = + pmadapter->chan_bandwidth; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Radio command handler + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_radio_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_ds_radio_cfg *radio_cfg = MNULL; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_radio_cfg)) { + PRINTM(MWARN, + "MLAN IOCTL information buffer length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_radio_cfg); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + radio_cfg = (mlan_ds_radio_cfg *)pioctl_req->pbuf; + switch (radio_cfg->sub_command) { + case MLAN_OID_RADIO_CTRL: + status = wlan_radio_ioctl_radio_ctl(pmadapter, pioctl_req); + break; + case MLAN_OID_BAND_CFG: + status = wlan_radio_ioctl_band_cfg(pmadapter, pioctl_req); + break; + case MLAN_OID_ANT_CFG: + status = wlan_radio_ioctl_ant_cfg(pmadapter, pioctl_req); + break; +#ifdef WIFI_DIRECT_SUPPORT + case MLAN_OID_REMAIN_CHAN_CFG: + status = wlan_radio_ioctl_remain_chan_cfg(pmadapter, + pioctl_req); + break; +#endif + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + + LEAVE(); + return status; +} + +/** + * @brief Set/Get MAC address + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_bss_ioctl_mac_address(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_bss *bss = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + ENTER(); + bss = (mlan_ds_bss *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) { + pioctl_req->data_read_written = + MLAN_MAC_ADDR_LENGTH + MLAN_SUB_COMMAND_SIZE; + memcpy(pmadapter, &bss->param.mac_addr, pmpriv->curr_addr, + MLAN_MAC_ADDR_LENGTH); + ret = MLAN_STATUS_SUCCESS; + goto exit; + } + + memcpy(pmadapter, pmpriv->curr_addr, &bss->param.mac_addr, + MLAN_MAC_ADDR_LENGTH); + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_MAC_ADDRESS, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_req, MNULL); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; +exit: + LEAVE(); + return ret; +} + +/** + * @brief Set multicast list + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_bss_ioctl_set_multicast_list(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_bss *bss = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 old_pkt_filter; + + ENTER(); + + old_pkt_filter = pmpriv->curr_pkt_filter; + bss = (mlan_ds_bss *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) { + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + pioctl_req->data_read_written = + sizeof(mlan_multicast_list) + MLAN_SUB_COMMAND_SIZE; + if (bss->param.multicast_list.mode == MLAN_PROMISC_MODE) { + PRINTM(MINFO, "Enable Promiscuous mode\n"); + pmpriv->curr_pkt_filter |= HostCmd_ACT_MAC_PROMISCUOUS_ENABLE; + pmpriv->curr_pkt_filter &= + ~HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE; + } else { + /* Multicast */ + pmpriv->curr_pkt_filter &= ~HostCmd_ACT_MAC_PROMISCUOUS_ENABLE; + if (bss->param.multicast_list.mode == MLAN_ALL_MULTI_MODE) { + PRINTM(MINFO, "Enabling All Multicast!\n"); + pmpriv->curr_pkt_filter |= + HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE; + } else { + pmpriv->curr_pkt_filter &= + ~HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE; + if (bss->param.multicast_list.num_multicast_addr) { + PRINTM(MINFO, "Set multicast list=%d\n", + bss->param.multicast_list. + num_multicast_addr); + /* Set multicast addresses to firmware */ + if (old_pkt_filter == pmpriv->curr_pkt_filter) { + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_MAC_MULTICAST_ADR, + HostCmd_ACT_GEN_SET, + 0, + (t_void *) + pioctl_req, + &bss->param. + multicast_list); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + } else { + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_MAC_MULTICAST_ADR, + HostCmd_ACT_GEN_SET, + 0, MNULL, + &bss->param. + multicast_list); + } + if (ret) + goto exit; + } + } + } + PRINTM(MINFO, "old_pkt_filter=0x%x, curr_pkt_filter=0x%x\n", + old_pkt_filter, pmpriv->curr_pkt_filter); + if (old_pkt_filter != pmpriv->curr_pkt_filter) { + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_MAC_CONTROL, + HostCmd_ACT_GEN_SET, + 0, + (t_void *)pioctl_req, + &pmpriv->curr_pkt_filter); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + } + +exit: + LEAVE(); + return ret; +} + +/** + * @brief Get channel list + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_bss_ioctl_get_channel_list(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_bss *bss = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + chan_freq_power_t *cfp; + t_u32 i, j; + + ENTER(); + + bss = (mlan_ds_bss *)pioctl_req->pbuf; + if (pioctl_req->action != MLAN_ACT_GET) { + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + if ((wlan_11d_is_enabled(pmpriv) && + pmpriv->media_connected == MTRUE) && + ((pmpriv->bss_mode == MLAN_BSS_MODE_INFRA) || + (pmpriv->bss_mode == MLAN_BSS_MODE_IBSS && + pmpriv->adhoc_state != ADHOC_STARTED)) + ) { + t_u8 chan_no; + t_u8 band; + + parsed_region_chan_11d_t *parsed_region_chan = MNULL; + parsed_region_chan_11d_t region_chan; + + BSSDescriptor_t *pbss_desc = + &pmpriv->curr_bss_params.bss_descriptor; + + memset(pmadapter, ®ion_chan, 0, + sizeof(parsed_region_chan_11d_t)); + + /* If country IE is present in the associated AP then return + the channel list from country IE else return it from the + learning table */ + + if (wlan_11d_parse_domain_info + (pmadapter, &pbss_desc->country_info, + (t_u8)pbss_desc->bss_band, + ®ion_chan) == MLAN_STATUS_SUCCESS) { + + parsed_region_chan = ®ion_chan; + } else { + parsed_region_chan = &pmadapter->parsed_region_chan; + } + + PRINTM(MINFO, "no_of_chan=%d\n", + parsed_region_chan->no_of_chan); + + for (i = 0; + (bss->param.chanlist.num_of_chan < MLAN_MAX_CHANNEL_NUM) + && (i < parsed_region_chan->no_of_chan); i++) { + chan_no = parsed_region_chan->chan_pwr[i].chan; + band = parsed_region_chan->chan_pwr[i].band; + PRINTM(MINFO, "band=%d, chan_no=%d\n", band, chan_no); + bss->param.chanlist.cf[bss->param.chanlist.num_of_chan]. + channel = (t_u32)chan_no; + bss->param.chanlist.cf[bss->param.chanlist.num_of_chan]. + freq = + (t_u32)wlan_11d_chan_2_freq(pmadapter, chan_no, + band); + bss->param.chanlist.num_of_chan++; + } + } else { + for (j = 0; + (bss->param.chanlist.num_of_chan < MLAN_MAX_CHANNEL_NUM) + && (j < MAX_REGION_CHANNEL_NUM); j++) { + cfp = pmadapter->region_channel[j].pcfp; + for (i = 0; + (bss->param.chanlist.num_of_chan < + MLAN_MAX_CHANNEL_NUM) + && pmadapter->region_channel[j].valid && cfp && + (i < pmadapter->region_channel[j].num_cfp); i++) { + bss->param.chanlist.cf[bss->param.chanlist. + num_of_chan].channel = + (t_u32)cfp->channel; + bss->param.chanlist.cf[bss->param.chanlist. + num_of_chan].freq = + (t_u32)cfp->freq; + bss->param.chanlist.num_of_chan++; + cfp++; + } + } + } + + PRINTM(MINFO, "num of channel=%d\n", bss->param.chanlist.num_of_chan); + + LEAVE(); + return ret; +} + +/** Highest channel used in 2.4GHz band */ +#define MAX_CHANNEL_BAND_B (14) + +/** Highest frequency used in 2.4GHz band */ +#define MAX_FREQUENCY_BAND_B (2484) + +/** + * @brief Set/Get BSS channel + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_bss_ioctl_channel(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = MNULL; + mlan_ds_bss *bss = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + chan_freq_power_t *cfp = MNULL; + ENTER(); + + if ((pioctl_req == MNULL) || (pioctl_req->pbuf == MNULL)) { + PRINTM(MERROR, "Request buffer not found!\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + pmpriv = pmadapter->priv[pioctl_req->bss_index]; + bss = (mlan_ds_bss *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) { + cfp = wlan_find_cfp_by_band_and_channel(pmadapter, + pmpriv->curr_bss_params. + band, + (t_u16)pmpriv-> + curr_bss_params. + bss_descriptor.channel); + if (cfp) { + bss->param.bss_chan.channel = cfp->channel; + bss->param.bss_chan.freq = cfp->freq; + } else { + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + } + pioctl_req->data_read_written = + sizeof(chan_freq) + MLAN_SUB_COMMAND_SIZE; + LEAVE(); + return ret; + } + if (!bss->param.bss_chan.channel && !bss->param.bss_chan.freq) { + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + if (pmadapter->adhoc_start_band & BAND_AN) + pmadapter->adhoc_start_band = BAND_G | BAND_B | BAND_GN; + else if (pmadapter->adhoc_start_band & BAND_A) + pmadapter->adhoc_start_band = BAND_G | BAND_B; + if (bss->param.bss_chan.channel) { + if (bss->param.bss_chan.channel <= MAX_CHANNEL_BAND_B) + cfp = wlan_find_cfp_by_band_and_channel(pmadapter, + BAND_B, + (t_u16)bss-> + param.bss_chan. + channel); + if (!cfp) { + cfp = wlan_find_cfp_by_band_and_channel(pmadapter, + BAND_A, + (t_u16)bss-> + param.bss_chan. + channel); + if (cfp) { + if (pmadapter->adhoc_11n_enabled) + pmadapter->adhoc_start_band = + BAND_A | BAND_AN; + else + pmadapter->adhoc_start_band = BAND_A; + } + } + } else { + if (bss->param.bss_chan.freq <= MAX_FREQUENCY_BAND_B) + cfp = wlan_find_cfp_by_band_and_freq(pmadapter, BAND_B, + bss->param. + bss_chan.freq); + if (!cfp) { + cfp = wlan_find_cfp_by_band_and_freq(pmadapter, BAND_A, + bss->param. + bss_chan.freq); + if (cfp) { + if (pmadapter->adhoc_11n_enabled) + pmadapter->adhoc_start_band = + BAND_A | BAND_AN; + else + pmadapter->adhoc_start_band = BAND_A; + } + } + } + if (!cfp || !cfp->channel) { + PRINTM(MERROR, "Invalid channel/freq\n"); + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_FAILURE; + + } + pmpriv->adhoc_channel = (t_u8)cfp->channel; + pmpriv->intf_state_11h.adhoc_auto_sel_chan = MFALSE; + bss->param.bss_chan.channel = cfp->channel; + bss->param.bss_chan.freq = cfp->freq; + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get BSS mode + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_bss_ioctl_mode(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_bss *bss = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + bss = (mlan_ds_bss *)pioctl_req->pbuf; + + ENTER(); + + if (pioctl_req->action == MLAN_ACT_GET) { + bss->param.bss_mode = pmpriv->bss_mode; + pioctl_req->data_read_written = + sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; + goto exit; + } + + if ((pmpriv->bss_mode == bss->param.bss_mode) || + (bss->param.bss_mode == MLAN_BSS_MODE_AUTO)) { + PRINTM(MINFO, "Already set to required mode! No change!\n"); + pmpriv->bss_mode = bss->param.bss_mode; + goto exit; + } + + if (pmpriv->bss_mode != MLAN_BSS_MODE_AUTO) + ret = wlan_disconnect(pmpriv, MNULL, MNULL); + else + ret = wlan_disconnect(pmpriv, pioctl_req, MNULL); + + if (pmpriv->sec_info.authentication_mode != MLAN_AUTH_MODE_AUTO) + pmpriv->sec_info.authentication_mode = MLAN_AUTH_MODE_OPEN; + pmpriv->bss_mode = bss->param.bss_mode; + + if (pmpriv->bss_mode == MLAN_BSS_MODE_INFRA) + pmpriv->port_ctrl_mode = MTRUE; + else + pmpriv->port_ctrl_mode = MFALSE; + + if ((pmpriv->bss_mode != MLAN_BSS_MODE_AUTO) + ) { + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_SET_BSS_MODE, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_req, MNULL); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + } +exit: + LEAVE(); + return ret; +} + +/** + * @brief Start BSS + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_bss_ioctl_start(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_bss *bss = (mlan_ds_bss *)pioctl_req->pbuf; + t_s32 i = -1; + t_u8 zero_mac[] = { 0, 0, 0, 0, 0, 0 }; + + ENTER(); + + /* Before ASSOC REQ, If "port ctrl" mode is enabled, move the port to + CLOSED state */ + if (pmpriv->port_ctrl_mode == MTRUE) { + PRINTM(MINFO, "bss_ioctl_start(): port_state=CLOSED\n"); + pmpriv->prior_port_status = pmpriv->port_open; + pmpriv->port_open = MFALSE; + } + pmadapter->scan_block = MFALSE; + + if (pmpriv->bss_mode == MLAN_BSS_MODE_INFRA) { + if (!bss->param.ssid_bssid.idx || + bss->param.ssid_bssid.idx > pmadapter->num_in_scan_table) { + /* Search for the requested SSID in the scan table */ + if (bss->param.ssid_bssid.ssid.ssid_len) { + if (memcmp + (pmadapter, &bss->param.ssid_bssid.bssid, + zero_mac, sizeof(zero_mac))) + i = wlan_find_ssid_in_list(pmpriv, + &bss->param. + ssid_bssid. + ssid, + (t_u8 *) + &bss->param. + ssid_bssid. + bssid, + MLAN_BSS_MODE_INFRA); + else + i = wlan_find_ssid_in_list(pmpriv, + &bss->param. + ssid_bssid. + ssid, MNULL, + MLAN_BSS_MODE_INFRA); + } else { + i = wlan_find_bssid_in_list(pmpriv, + (t_u8 *)&bss->param. + ssid_bssid.bssid, + MLAN_BSS_MODE_INFRA); + } + } else { + /* use bsslist index number to assoicate */ + i = wlan_is_network_compatible(pmpriv, + bss->param.ssid_bssid. + idx - 1, + pmpriv->bss_mode); + } + if (i >= 0) { + /* block if upper-layer tries to reconnect before new + scan */ + if (wlan_11h_get_csa_closed_channel(pmpriv) == + (t_u8)pmadapter->pscan_table[i].channel) { + PRINTM(MINFO, + "Attempt to reconnect on csa_closed_chan(%d)\n", + pmadapter->pscan_table[i].channel); + pioctl_req->status_code = + MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto start_ssid_done; + } + PRINTM(MINFO, + "SSID found in scan list ... associating...\n"); + + /* Clear any past association response stored for + application retrieval */ + pmpriv->assoc_rsp_size = 0; + ret = wlan_associate(pmpriv, pioctl_req, + &pmadapter->pscan_table[i]); + if (ret) + goto start_ssid_done; + } else { /* i >= 0 */ + PRINTM(MERROR, + "SSID not found in scan list: ssid=%s, " MACSTR + ", idx=%d\n", bss->param.ssid_bssid.ssid.ssid, + MAC2STR(bss->param.ssid_bssid.bssid), + (int)bss->param.ssid_bssid.idx); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto start_ssid_done; + } + } else { + /* Adhoc mode */ + /* If the requested SSID matches current SSID, return */ + if (bss->param.ssid_bssid.ssid.ssid_len && + (!wlan_ssid_cmp + (pmadapter, &pmpriv->curr_bss_params.bss_descriptor.ssid, + &bss->param.ssid_bssid.ssid))) { + ret = MLAN_STATUS_SUCCESS; + goto start_ssid_done; + } + + /* Exit Adhoc mode first */ + PRINTM(MINFO, "Sending Adhoc Stop\n"); + ret = wlan_disconnect(pmpriv, MNULL, MNULL); + if (ret) + goto start_ssid_done; + + pmpriv->adhoc_is_link_sensed = MFALSE; + + if (!bss->param.ssid_bssid.idx || + bss->param.ssid_bssid.idx > pmadapter->num_in_scan_table) { + /* Search for the requested network in the scan table */ + if (bss->param.ssid_bssid.ssid.ssid_len) { + i = wlan_find_ssid_in_list(pmpriv, + &bss->param. + ssid_bssid.ssid, + MNULL, + MLAN_BSS_MODE_IBSS); + } else { + i = wlan_find_bssid_in_list(pmpriv, + (t_u8 *)&bss->param. + ssid_bssid.bssid, + MLAN_BSS_MODE_IBSS); + } + } else { + /* use bsslist index number to assoicate */ + i = wlan_is_network_compatible(pmpriv, + bss->param.ssid_bssid. + idx - 1, + pmpriv->bss_mode); + } + + if (i >= 0) { + PRINTM(MINFO, + "Network found in scan list ... joining ...\n"); + ret = wlan_adhoc_join(pmpriv, pioctl_req, + &pmadapter->pscan_table[i]); + if (ret) + goto start_ssid_done; + if (pmpriv->adhoc_aes_enabled) + wlan_enable_aes_key(pmpriv); + } else { /* i >= 0 */ + PRINTM(MINFO, "Network not found in the list, " + "creating adhoc with ssid = %s\n", + bss->param.ssid_bssid.ssid.ssid); + ret = wlan_adhoc_start(pmpriv, pioctl_req, + &bss->param.ssid_bssid.ssid); + if (ret) + goto start_ssid_done; + if (pmpriv->adhoc_aes_enabled) + wlan_enable_aes_key(pmpriv); + } + } + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + +start_ssid_done: + LEAVE(); + return ret; +} + +/** + * @brief Stop BSS + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_bss_ioctl_stop(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_bss *bss = (mlan_ds_bss *)pioctl_req->pbuf; + + ENTER(); + + ret = wlan_disconnect(pmpriv, pioctl_req, &bss->param.bssid); + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get IBSS channel + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_bss_ioctl_ibss_channel(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_bss *bss = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 cmd_action; + + ENTER(); + + bss = (mlan_ds_bss *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) { + if (pmpriv->media_connected == MFALSE) { + bss->param.bss_chan.channel = pmpriv->adhoc_channel; + goto exit; + } + cmd_action = HostCmd_ACT_GEN_GET; + } else { + cmd_action = HostCmd_ACT_GEN_SET; + pmpriv->adhoc_channel = (t_u8)bss->param.bss_chan.channel; + pmpriv->intf_state_11h.adhoc_auto_sel_chan = MFALSE; + } + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_RF_CHANNEL, + cmd_action, + 0, + (t_void *)pioctl_req, + &bss->param.bss_chan.channel); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + +exit: + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Listen Interval + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_bss_ioctl_listen_interval(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_bss *bss = MNULL; + + ENTER(); + + bss = (mlan_ds_bss *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) + bss->param.listen_interval = pmpriv->listen_interval; + else + pmpriv->listen_interval = bss->param.listen_interval; + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/* + * @brief Set/Get beacon interval + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_bss_ioctl_beacon_interval(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_bss *bss = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + ENTER(); + bss = (mlan_ds_bss *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) { + bss->param.bcn_interval = pmpriv->beacon_period; + if (pmpriv->media_connected == MTRUE) + bss->param.bcn_interval = + pmpriv->curr_bss_params.bss_descriptor. + beacon_period; + } else + pmpriv->beacon_period = (t_u16)bss->param.bcn_interval; + pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; + LEAVE(); + return ret; +} + +/** + * @brief Set/Get ATIM window + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_bss_ioctl_atim_window(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_bss *bss = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + ENTER(); + bss = (mlan_ds_bss *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) { + bss->param.atim_window = pmpriv->atim_window; + if (pmpriv->media_connected == MTRUE) + bss->param.atim_window = + pmpriv->curr_bss_params.bss_descriptor. + atim_window; + } else + pmpriv->atim_window = (t_u16)bss->param.atim_window; + + pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; + LEAVE(); + return ret; +} + +/** + * @brief Query embe + * + * @param priv A pointer to mlan_private structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +static mlan_status +wlan_query_passphrase(mlan_private *priv, pmlan_ioctl_req pioctl_req) +{ + mlan_adapter *pmadapter = priv->adapter; + mlan_ds_bss *bss = MNULL; + mlan_ssid_bssid *ssid_bssid = MNULL; + mlan_ds_passphrase sec_pp; + int i = 0; + BSSDescriptor_t *pbss_desc; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + bss = (mlan_ds_bss *)pioctl_req->pbuf; + ssid_bssid = &bss->param.ssid_bssid; + + memset(pmadapter, &sec_pp, 0, sizeof(mlan_ds_passphrase)); + sec_pp.psk_type = MLAN_PSK_QUERY; + if (ssid_bssid->ssid.ssid_len == 0) { + i = wlan_find_bssid_in_list(priv, (t_u8 *)&ssid_bssid->bssid, + MLAN_BSS_MODE_AUTO); + if (i >= 0) { + pbss_desc = &pmadapter->pscan_table[i]; + memcpy(pmadapter, &sec_pp.ssid, &pbss_desc->ssid, + sizeof(mlan_802_11_ssid)); + } else + memcpy(pmadapter, &sec_pp.bssid, &ssid_bssid->bssid, + MLAN_MAC_ADDR_LENGTH); + } else { + memcpy(pmadapter, &sec_pp.ssid, &ssid_bssid->ssid, + sizeof(mlan_802_11_ssid)); + } + + /* Send request to firmware */ + ret = wlan_prepare_cmd(priv, + HostCmd_CMD_SUPPLICANT_PMK, + HostCmd_ACT_GEN_GET, + 0, (t_void *)pioctl_req, &sec_pp); + + LEAVE(); + return ret; +} + +/** + * @brief Search for a BSS + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_bss_ioctl_find_bss(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (pmpriv->ewpa_query) { + if (wlan_query_passphrase(pmpriv, pioctl_req) == + MLAN_STATUS_SUCCESS) { + PRINTM(MINFO, "Find BSS ioctl: query passphrase\n"); + LEAVE(); + return MLAN_STATUS_PENDING; + } + } + + ret = wlan_find_bss(pmpriv, pioctl_req); + + LEAVE(); + return ret; +} + +/** + * @brief Check if BSS channel is valid for Station's region + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_bss_ioctl_bss_11d_check_channel(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_bss *bss = MNULL; + mlan_ssid_bssid *ssid_bssid = MNULL; + BSSDescriptor_t *pbss_desc = MNULL; + + ENTER(); + + bss = (mlan_ds_bss *)pioctl_req->pbuf; + ssid_bssid = &bss->param.ssid_bssid; + + PRINTM(MINFO, "ssid: %s idx:%d\n", ssid_bssid->ssid.ssid, + ssid_bssid->idx); + + pbss_desc = &pmadapter->pscan_table[ssid_bssid->idx - 1]; + if (!pbss_desc) { + PRINTM(MERROR, "Invalid scan table entry!\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + PRINTM(MINFO, "band:%d channel:%d\n", + (t_u8)pbss_desc->bss_band, (t_u32)pbss_desc->channel); + + /* check if this channel is supported in the region */ + if (!wlan_find_cfp_by_band_and_channel(pmadapter, + (t_u8)pbss_desc->bss_band, + (t_u32)pbss_desc->channel)) { + PRINTM(MERROR, "Unsupported Channel for region 0x%x\n", + pmadapter->region_code); + ret = MLAN_STATUS_FAILURE; + } + + LEAVE(); + return ret; +} + +/** + * @brief BSS command handler + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_bss_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_ds_bss *bss = MNULL; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_bss)) { + PRINTM(MWARN, "MLAN bss IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_bss); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + + bss = (mlan_ds_bss *)pioctl_req->pbuf; + + switch (bss->sub_command) { + case MLAN_OID_BSS_START: + status = wlan_bss_ioctl_start(pmadapter, pioctl_req); + break; + case MLAN_OID_BSS_STOP: + status = wlan_bss_ioctl_stop(pmadapter, pioctl_req); + break; + case MLAN_OID_BSS_MODE: + status = wlan_bss_ioctl_mode(pmadapter, pioctl_req); + break; + case MLAN_OID_BSS_CHANNEL: + status = wlan_bss_ioctl_channel(pmadapter, pioctl_req); + break; + case MLAN_OID_BSS_CHANNEL_LIST: + status = wlan_bss_ioctl_get_channel_list(pmadapter, pioctl_req); + break; + case MLAN_OID_BSS_MAC_ADDR: + status = wlan_bss_ioctl_mac_address(pmadapter, pioctl_req); + break; + case MLAN_OID_BSS_MULTICAST_LIST: + status = wlan_bss_ioctl_set_multicast_list(pmadapter, + pioctl_req); + break; + case MLAN_OID_BSS_FIND_BSS: + status = wlan_bss_ioctl_find_bss(pmadapter, pioctl_req); + break; + case MLAN_OID_IBSS_BCN_INTERVAL: + status = wlan_bss_ioctl_beacon_interval(pmadapter, pioctl_req); + break; + case MLAN_OID_IBSS_ATIM_WINDOW: + status = wlan_bss_ioctl_atim_window(pmadapter, pioctl_req); + break; + case MLAN_OID_IBSS_CHANNEL: + status = wlan_bss_ioctl_ibss_channel(pmadapter, pioctl_req); + break; +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) + case MLAN_OID_BSS_ROLE: + status = wlan_bss_ioctl_bss_role(pmadapter, pioctl_req); + break; +#endif +#ifdef WIFI_DIRECT_SUPPORT + case MLAN_OID_WIFI_DIRECT_MODE: + status = wlan_bss_ioctl_wifi_direct_mode(pmadapter, pioctl_req); + break; +#endif + case MLAN_OID_BSS_LISTEN_INTERVAL: + status = wlan_bss_ioctl_listen_interval(pmadapter, pioctl_req); + break; + case MLAN_OID_BSS_REMOVE: + status = wlan_bss_ioctl_bss_remove(pmadapter, pioctl_req); + break; + + case MLAN_OID_BSS_11D_CHECK_CHANNEL: + status = wlan_bss_ioctl_bss_11d_check_channel(pmadapter, + pioctl_req); + break; + + default: + status = MLAN_STATUS_FAILURE; + break; + } + + LEAVE(); + return status; +} + +/** + * @brief Get supported rates + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_rate_ioctl_get_supported_rate(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_rate *rate = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + if (pioctl_req->action != MLAN_ACT_GET) { + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + rate = (mlan_ds_rate *)pioctl_req->pbuf; + if (rate->param.rate_band_cfg.config_bands && + rate->param.rate_band_cfg.bss_mode) + wlan_get_active_data_rates(pmpriv, + rate->param.rate_band_cfg.bss_mode, + rate->param.rate_band_cfg. + config_bands, rate->param.rates); + else + wlan_get_active_data_rates(pmpriv, pmpriv->bss_mode, + (pmpriv->bss_mode == + MLAN_BSS_MODE_INFRA) ? pmpriv-> + config_bands : pmadapter-> + adhoc_start_band, rate->param.rates); + pioctl_req->data_read_written = + MLAN_SUPPORTED_RATES + MLAN_SUB_COMMAND_SIZE; + LEAVE(); + return ret; +} + +/** + * @brief Rate command handler + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_rate_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_ds_rate *rate = MNULL; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_rate)) { + PRINTM(MWARN, "MLAN bss IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_rate); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + rate = (mlan_ds_rate *)pioctl_req->pbuf; + switch (rate->sub_command) { + case MLAN_OID_RATE_CFG: + status = wlan_rate_ioctl_cfg(pmadapter, pioctl_req); + break; + case MLAN_OID_GET_DATA_RATE: + status = wlan_rate_ioctl_get_data_rate(pmadapter, pioctl_req); + break; + case MLAN_OID_SUPPORTED_RATES: + status = wlan_rate_ioctl_get_supported_rate(pmadapter, + pioctl_req); + break; + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + LEAVE(); + return status; +} + +/** + * @brief Get Tx power configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param cmd_no Firmware command number used to retrieve power values + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_power_ioctl_get_power(IN pmlan_adapter pmadapter, + IN t_u16 cmd_no, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + cmd_no, + HostCmd_ACT_GEN_GET, + 0, (t_void *)pioctl_req, MNULL); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set Tx power configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_power_ioctl_set_power(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_ds_power_cfg *power = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + + HostCmd_DS_TXPWR_CFG *txp_cfg = MNULL; + MrvlTypes_Power_Group_t *pg_tlv = MNULL; + Power_Group_t *pg = MNULL; + pmlan_callbacks pcb = &pmadapter->callbacks; + t_u8 *buf = MNULL; + t_s8 dbm = 0; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + power = (mlan_ds_power_cfg *)pioctl_req->pbuf; + if (!power->param.power_cfg.is_power_auto) { + dbm = (t_s8)power->param.power_cfg.power_level; + if ((dbm < pmpriv->min_tx_power_level) || + (dbm > pmpriv->max_tx_power_level)) { + PRINTM(MERROR, + "The set txpower value %d dBm is out of range (%d dBm-%d dBm)!\n", + dbm, pmpriv->min_tx_power_level, + pmpriv->max_tx_power_level); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + } + + ret = pcb->moal_malloc(pmadapter->pmoal_handle, + MRVDRV_SIZE_OF_CMD_BUFFER, MLAN_MEM_DEF, &buf); + if (ret != MLAN_STATUS_SUCCESS || buf == MNULL) { + PRINTM(MERROR, + "ALLOC_CMD_BUF: Failed to allocate command buffer\n"); + pioctl_req->status_code = MLAN_ERROR_NO_MEM; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + memset(pmadapter, buf, 0, MRVDRV_SIZE_OF_CMD_BUFFER); + txp_cfg = (HostCmd_DS_TXPWR_CFG *)buf; + txp_cfg->action = HostCmd_ACT_GEN_SET; + if (!power->param.power_cfg.is_power_auto) { + txp_cfg->mode = 1; + pg_tlv = (MrvlTypes_Power_Group_t *)(buf + + sizeof + (HostCmd_DS_TXPWR_CFG)); + pg_tlv->type = TLV_TYPE_POWER_GROUP; + pg_tlv->length = 4 * sizeof(Power_Group_t); + pg = (Power_Group_t *)(buf + sizeof(HostCmd_DS_TXPWR_CFG) + + sizeof(MrvlTypes_Power_Group_t)); + /* Power group for modulation class HR/DSSS */ + pg->first_rate_code = 0x00; + pg->last_rate_code = 0x03; + pg->modulation_class = MOD_CLASS_HR_DSSS; + pg->power_step = 0; + pg->power_min = (t_s8)dbm; + pg->power_max = (t_s8)dbm; + pg++; + /* Power group for modulation class OFDM */ + pg->first_rate_code = 0x00; + pg->last_rate_code = 0x07; + pg->modulation_class = MOD_CLASS_OFDM; + pg->power_step = 0; + pg->power_min = (t_s8)dbm; + pg->power_max = (t_s8)dbm; + pg++; + /* Power group for modulation class HTBW20 */ + pg->first_rate_code = 0x00; + pg->last_rate_code = 0x20; + pg->modulation_class = MOD_CLASS_HT; + pg->power_step = 0; + pg->power_min = (t_s8)dbm; + pg->power_max = (t_s8)dbm; + pg->ht_bandwidth = HT_BW_20; + pg++; + /* Power group for modulation class HTBW40 */ + pg->first_rate_code = 0x00; + pg->last_rate_code = 0x20; + pg->modulation_class = MOD_CLASS_HT; + pg->power_step = 0; + pg->power_min = (t_s8)dbm; + pg->power_max = (t_s8)dbm; + pg->ht_bandwidth = HT_BW_40; + } + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_TXPWR_CFG, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_req, buf); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + if (buf) + pcb->moal_mfree(pmadapter->pmoal_handle, buf); + +exit: + LEAVE(); + return ret; +} + +/** + * @brief Set extended power configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_power_ioctl_set_power_ext(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_power_cfg *power = MNULL; + pmlan_callbacks pcb = &pmadapter->callbacks; + t_u8 *buf = MNULL; + HostCmd_DS_TXPWR_CFG *txp_cfg = MNULL; + MrvlTypes_Power_Group_t *pg_tlv = MNULL; + Power_Group_t *pg = MNULL; + mlan_power_group *pwr_grp = MNULL; + + ENTER(); + + power = (mlan_ds_power_cfg *)pioctl_req->pbuf; + ret = pcb->moal_malloc(pmadapter->pmoal_handle, + MRVDRV_SIZE_OF_CMD_BUFFER, MLAN_MEM_DEF, &buf); + if (ret != MLAN_STATUS_SUCCESS || buf == MNULL) { + PRINTM(MERROR, + "ALLOC_CMD_BUF: Failed to allocate command buffer\n"); + pioctl_req->status_code = MLAN_ERROR_NO_MEM; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + memset(pmadapter, buf, 0, MRVDRV_SIZE_OF_CMD_BUFFER); + txp_cfg = (HostCmd_DS_TXPWR_CFG *)buf; + txp_cfg->action = HostCmd_ACT_GEN_SET; + pwr_grp = &power->param.power_ext.power_group[0]; + if (pwr_grp->rate_format == TX_PWR_CFG_AUTO_CTRL_OFF) + txp_cfg->mode = 0; + else { + txp_cfg->mode = 1; + + pg_tlv = (MrvlTypes_Power_Group_t *)(buf + + sizeof + (HostCmd_DS_TXPWR_CFG)); + pg_tlv->type = TLV_TYPE_POWER_GROUP; + pg_tlv->length = sizeof(Power_Group_t); + pg = (Power_Group_t *)(buf + sizeof(HostCmd_DS_TXPWR_CFG) + + sizeof(MrvlTypes_Power_Group_t)); + pg->ht_bandwidth = pwr_grp->bandwidth; + pg->power_min = (t_s8)pwr_grp->power_min; + pg->power_max = (t_s8)pwr_grp->power_max; + pg->power_step = (t_s8)pwr_grp->power_step; + + if (pwr_grp->rate_format == MLAN_RATE_FORMAT_LG) { + if (pwr_grp->first_rate_ind <= MLAN_RATE_INDEX_HRDSSS3) { + pg->modulation_class = MOD_CLASS_HR_DSSS; + } else { + pg->modulation_class = MOD_CLASS_OFDM; + pwr_grp->first_rate_ind -= + MLAN_RATE_INDEX_OFDM0; + pwr_grp->last_rate_ind -= MLAN_RATE_INDEX_OFDM0; + } + pg->first_rate_code = (t_u8)pwr_grp->first_rate_ind; + pg->last_rate_code = (t_u8)pwr_grp->last_rate_ind; + } else if (pwr_grp->rate_format == MLAN_RATE_FORMAT_HT) { + pg->modulation_class = MOD_CLASS_HT; + pg->first_rate_code = (t_u8)pwr_grp->first_rate_ind; + pg->last_rate_code = (t_u8)pwr_grp->last_rate_ind; + } else if (pwr_grp->rate_format == MLAN_RATE_FORMAT_VHT) { + pg->modulation_class = MOD_CLASS_VHT; + pg->first_rate_code = + (t_u8)((pwr_grp-> + first_rate_ind & 0xF) | ((pwr_grp->nss - + 1) << 4)); + pg->last_rate_code = + (t_u8)((pwr_grp-> + last_rate_ind & 0xF) | ((pwr_grp->nss - + 1) << 4)); + } else { + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + } + } + if (ret == MLAN_STATUS_FAILURE) { + if (buf) + pcb->moal_mfree(pmadapter->pmoal_handle, buf); + goto exit; + } + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_TXPWR_CFG, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_req, buf); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + if (buf) + pcb->moal_mfree(pmadapter->pmoal_handle, buf); + +exit: + LEAVE(); + return ret; +} + +/** + * @brief Power configuration command handler + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_power_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_ds_power_cfg *power = MNULL; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_power_cfg)) { + PRINTM(MWARN, "MLAN bss IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_power_cfg); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + power = (mlan_ds_power_cfg *)pioctl_req->pbuf; + switch (power->sub_command) { + case MLAN_OID_POWER_CFG: + if (pioctl_req->action == MLAN_ACT_GET) + status = wlan_power_ioctl_get_power(pmadapter, + HostCmd_CMD_TXPWR_CFG, + pioctl_req); + else + status = wlan_power_ioctl_set_power(pmadapter, + pioctl_req); + break; + + case MLAN_OID_POWER_CFG_EXT: + if (pioctl_req->action == MLAN_ACT_GET) + status = wlan_power_ioctl_get_power(pmadapter, + HostCmd_CMD_TXPWR_CFG, + pioctl_req); + else + status = wlan_power_ioctl_set_power_ext(pmadapter, + pioctl_req); + break; + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + LEAVE(); + return status; +} + +/** + * @brief Set power save configurations + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * @param ps_mode Power save mode + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_pm_ioctl_ps_mode(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req, IN t_u16 ps_mode) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + t_u16 sub_cmd; + + ENTER(); + + if (pioctl_req->action == MLAN_ACT_SET) { + sub_cmd = (pmadapter->ps_mode == Wlan802_11PowerModePSP) ? + EN_AUTO_PS : DIS_AUTO_PS; + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_PS_MODE_ENH, sub_cmd, + BITMAP_STA_PS, (t_void *)pioctl_req, + MNULL); + if ((ret == MLAN_STATUS_SUCCESS) && (sub_cmd == DIS_AUTO_PS)) { + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_PS_MODE_ENH, + GET_PS, 0, MNULL, MNULL); + } + } else { + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_PS_MODE_ENH, GET_PS, + 0, (t_void *)pioctl_req, MNULL); + } + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Inactivity timeout extend + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_pm_ioctl_inactivity_timeout(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_pm_cfg *pmcfg = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 cmd_action = 0; + + ENTER(); + + pmcfg = (mlan_ds_pm_cfg *)pioctl_req->pbuf; + cmd_action = HostCmd_ACT_GEN_GET; + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_INACTIVITY_TIMEOUT_EXT, + cmd_action, 0, (t_void *)pioctl_req, + (t_void *)&pmcfg->param.inactivity_to); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Enable/Disable Auto Deep Sleep + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_set_auto_deep_sleep(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private pmpriv = + (pmlan_private)pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_auto_ds auto_ds; + t_u32 mode; + + ENTER(); + + if (((mlan_ds_pm_cfg *)pioctl_req->pbuf)->param.auto_deep_sleep. + auto_ds == DEEP_SLEEP_ON) { + auto_ds.auto_ds = DEEP_SLEEP_ON; + PRINTM(MINFO, "Auto Deep Sleep: on\n"); + mode = EN_AUTO_PS; + } else { + auto_ds.auto_ds = DEEP_SLEEP_OFF; + PRINTM(MINFO, "Auto Deep Sleep: off\n"); + mode = DIS_AUTO_PS; + } + if (((mlan_ds_pm_cfg *)pioctl_req->pbuf)->param.auto_deep_sleep. + idletime) + auto_ds.idletime = + ((mlan_ds_pm_cfg *)pioctl_req->pbuf)->param. + auto_deep_sleep.idletime; + else + auto_ds.idletime = pmadapter->idle_time; + /* note: the command could be queued and executed later if there is + command in progress. */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_PS_MODE_ENH, + (t_u16)mode, + BITMAP_AUTO_DS, (t_void *)pioctl_req, &auto_ds); + if (ret) { + LEAVE(); + return ret; + } + ret = MLAN_STATUS_PENDING; + LEAVE(); + return ret; +} + +/** + * @brief Set/Get sleep period + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_set_get_sleep_pd(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_pm_cfg *pm_cfg = MNULL; + t_u16 cmd_action = 0, sleep_pd = 0; + + ENTER(); + + pm_cfg = (mlan_ds_pm_cfg *)pioctl_req->pbuf; + cmd_action = HostCmd_ACT_GEN_GET; + if (pioctl_req->action == MLAN_ACT_SET) { + cmd_action = HostCmd_ACT_GEN_SET; + sleep_pd = (t_u16)pm_cfg->param.sleep_period; + } + + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_SLEEP_PERIOD, + cmd_action, 0, (t_void *)pioctl_req, &sleep_pd); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get PS configuration parameter + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_set_get_ps_cfg(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_ds_pm_cfg *pm_cfg = MNULL; + + ENTER(); + + pm_cfg = (mlan_ds_pm_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) { + pm_cfg->param.ps_cfg.ps_null_interval = + (t_u32)pmadapter->null_pkt_interval; + pm_cfg->param.ps_cfg.multiple_dtim_interval = + (t_u32)pmadapter->multiple_dtim; + pm_cfg->param.ps_cfg.listen_interval = + (t_u32)pmadapter->local_listen_interval; + pm_cfg->param.ps_cfg.adhoc_awake_period = + (t_u32)pmadapter->adhoc_awake_period; + pm_cfg->param.ps_cfg.bcn_miss_timeout = + (t_u32)pmadapter->bcn_miss_time_out; + pm_cfg->param.ps_cfg.delay_to_ps = + (t_u32)pmadapter->delay_to_ps; + pm_cfg->param.ps_cfg.ps_mode = + (t_u32)pmadapter->enhanced_ps_mode; + } else { + if (pm_cfg->param.ps_cfg.ps_null_interval) + pmadapter->null_pkt_interval = + (t_u16)pm_cfg->param.ps_cfg.ps_null_interval; + else + pm_cfg->param.ps_cfg.ps_null_interval = + (t_u32)pmadapter->null_pkt_interval; + if (pm_cfg->param.ps_cfg.multiple_dtim_interval) + pmadapter->multiple_dtim = + (t_u16)pm_cfg->param.ps_cfg. + multiple_dtim_interval; + else + pm_cfg->param.ps_cfg.multiple_dtim_interval = + (t_u32)pmadapter->multiple_dtim; + if (((t_s32)pm_cfg->param.ps_cfg.listen_interval) == + MRVDRV_LISTEN_INTERVAL_DISABLE) + pmadapter->local_listen_interval = 0; + else if (pm_cfg->param.ps_cfg.listen_interval) + pmadapter->local_listen_interval = + (t_u16)pm_cfg->param.ps_cfg.listen_interval; + else + pm_cfg->param.ps_cfg.listen_interval = + (t_u32)pmadapter->local_listen_interval; + if (pm_cfg->param.ps_cfg.adhoc_awake_period) + pmadapter->adhoc_awake_period = + (t_u16)pm_cfg->param.ps_cfg.adhoc_awake_period; + else + pm_cfg->param.ps_cfg.adhoc_awake_period = + (t_u32)pmadapter->adhoc_awake_period; + if (pm_cfg->param.ps_cfg.bcn_miss_timeout) + pmadapter->bcn_miss_time_out = + (t_u16)pm_cfg->param.ps_cfg.bcn_miss_timeout; + else + pm_cfg->param.ps_cfg.bcn_miss_timeout = + (t_u32)pmadapter->bcn_miss_time_out; + if (pm_cfg->param.ps_cfg.delay_to_ps != DELAY_TO_PS_UNCHANGED) + pmadapter->delay_to_ps = + (t_u16)pm_cfg->param.ps_cfg.delay_to_ps; + else + pm_cfg->param.ps_cfg.delay_to_ps = + (t_u32)pmadapter->delay_to_ps; + if (pm_cfg->param.ps_cfg.ps_mode) + pmadapter->enhanced_ps_mode = + (t_u16)pm_cfg->param.ps_cfg.ps_mode; + else + pm_cfg->param.ps_cfg.ps_mode = + (t_u32)pmadapter->enhanced_ps_mode; + } + pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Get/Set the sleep parameters + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_set_get_sleep_params(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_pm_cfg *pm_cfg = MNULL; + t_u16 cmd_action = 0; + + ENTER(); + + pm_cfg = (mlan_ds_pm_cfg *)pioctl_req->pbuf; + cmd_action = HostCmd_ACT_GEN_GET; + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + + /* Send command to firmware */ + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_SLEEP_PARAMS, + cmd_action, 0, (t_void *)pioctl_req, + &pm_cfg->param.sleep_params); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Power save command handler + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_pm_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_ds_pm_cfg *pm = MNULL; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_pm_cfg)) { + PRINTM(MWARN, "MLAN bss IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_pm_cfg); + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + pm = (mlan_ds_pm_cfg *)pioctl_req->pbuf; + switch (pm->sub_command) { + case MLAN_OID_PM_CFG_IEEE_PS: + switch (pioctl_req->action) { + case MLAN_ACT_SET: + if (pm->param.ps_mode) + pmadapter->ps_mode = Wlan802_11PowerModePSP; + else + pmadapter->ps_mode = Wlan802_11PowerModeCAM; + status = wlan_pm_ioctl_ps_mode(pmadapter, pioctl_req, + pmadapter->ps_mode); + break; + case MLAN_ACT_GET: + status = wlan_pm_ioctl_ps_mode(pmadapter, pioctl_req, + pmadapter->ps_mode); + break; + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + break; + case MLAN_OID_PM_CFG_HS_CFG: + status = wlan_pm_ioctl_hscfg(pmadapter, pioctl_req); + break; + case MLAN_OID_PM_CFG_INACTIVITY_TO: + status = wlan_pm_ioctl_inactivity_timeout(pmadapter, + pioctl_req); + break; + case MLAN_OID_PM_CFG_DEEP_SLEEP: + switch (pioctl_req->action) { + case MLAN_ACT_SET: + if (pmadapter->is_deep_sleep && + pm->param.auto_deep_sleep.auto_ds == + DEEP_SLEEP_ON) { + PRINTM(MMSG, + "Station already in enhanced deep sleep mode\n"); + status = MLAN_STATUS_FAILURE; + break; + } else if (!pmadapter->is_deep_sleep && + pm->param.auto_deep_sleep.auto_ds == + DEEP_SLEEP_OFF) { + PRINTM(MMSG, + "Station already not in enhanced deep sleep mode\n"); + status = MLAN_STATUS_FAILURE; + break; + } + status = wlan_set_auto_deep_sleep(pmadapter, + pioctl_req); + break; + case MLAN_ACT_GET: + if (pmadapter->is_deep_sleep) { + pm->param.auto_deep_sleep.auto_ds = + DEEP_SLEEP_ON; + pm->param.auto_deep_sleep.idletime = + pmadapter->idle_time; + } else + pm->param.auto_deep_sleep.auto_ds = + DEEP_SLEEP_OFF; + break; + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + break; + case MLAN_OID_PM_CFG_PS_CFG: + status = wlan_set_get_ps_cfg(pmadapter, pioctl_req); + break; + case MLAN_OID_PM_CFG_SLEEP_PD: + status = wlan_set_get_sleep_pd(pmadapter, pioctl_req); + break; + case MLAN_OID_PM_CFG_SLEEP_PARAMS: + status = wlan_set_get_sleep_params(pmadapter, pioctl_req); + break; + case MLAN_OID_PM_INFO: + status = wlan_get_pm_info(pmadapter, pioctl_req); + break; + case MLAN_OID_PM_HS_WAKEUP_REASON: + status = wlan_get_hs_wakeup_reason(pmadapter, pioctl_req); + break; + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + LEAVE(); + return status; +} + +/** + * @brief Set/Get WPA IE + * + * @param priv A pointer to mlan_private structure + * @param ie_data_ptr A pointer to IE + * @param ie_len Length of the IE + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_set_wpa_ie_helper(mlan_private *priv, t_u8 *ie_data_ptr, t_u16 ie_len) +{ + ENTER(); + + if (ie_len) { + if (ie_len > sizeof(priv->wpa_ie)) { + PRINTM(MERROR, "failed to copy, WPA IE is too big\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + memcpy(priv->adapter, priv->wpa_ie, ie_data_ptr, ie_len); + priv->wpa_ie_len = (t_u8)ie_len; + PRINTM(MIOCTL, "Set Wpa_ie_len=%d IE=%#x\n", priv->wpa_ie_len, + priv->wpa_ie[0]); + DBG_HEXDUMP(MCMD_D, "Wpa_ie", priv->wpa_ie, priv->wpa_ie_len); + if (priv->wpa_ie[0] == WPA_IE) { + priv->sec_info.wpa_enabled = MTRUE; + } else if (priv->wpa_ie[0] == RSN_IE) { + priv->sec_info.wpa2_enabled = MTRUE; + } else { + priv->sec_info.wpa_enabled = MFALSE; + priv->sec_info.wpa2_enabled = MFALSE; + } + } else { + memset(priv->adapter, priv->wpa_ie, 0, sizeof(priv->wpa_ie)); + priv->wpa_ie_len = 0; + PRINTM(MINFO, "Reset Wpa_ie_len=%d IE=%#x\n", priv->wpa_ie_len, + priv->wpa_ie[0]); + priv->sec_info.wpa_enabled = MFALSE; + priv->sec_info.wpa2_enabled = MFALSE; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Set OSEN IE + * + * @param priv A pointer to mlan_private structure + * @param ie_data_ptr A pointer to IE + * @param ie_len Length of the IE + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_set_osen_ie(mlan_private *priv, t_u8 *ie_data_ptr, t_u16 ie_len) +{ + ENTER(); + if (ie_len) { + if (ie_len > sizeof(priv->osen_ie)) { + PRINTM(MWARN, "failed to copy, WAPI IE is too big\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + memcpy(priv->adapter, priv->osen_ie, ie_data_ptr, ie_len); + priv->osen_ie_len = (t_u8)ie_len; + PRINTM(MIOCTL, "Set osen_ie_len=%d IE=%#x\n", priv->osen_ie_len, + priv->osen_ie[0]); + DBG_HEXDUMP(MCMD_D, "osen_ie", priv->osen_ie, + priv->osen_ie_len); + priv->sec_info.osen_enabled = MTRUE; + } else { + memset(priv->adapter, priv->osen_ie, 0, sizeof(priv->osen_ie)); + priv->osen_ie_len = (t_u8)ie_len; + PRINTM(MINFO, "Reset osen_ie_len=%d IE=%#x\n", + priv->osen_ie_len, priv->osen_ie[0]); + priv->sec_info.osen_enabled = MFALSE; + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Set WAPI IE + * + * @param priv A pointer to mlan_private structure + * @param ie_data_ptr A pointer to IE + * @param ie_len Length of the IE + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_set_wapi_ie(mlan_private *priv, t_u8 *ie_data_ptr, t_u16 ie_len) +{ + ENTER(); + if (ie_len) { + if (ie_len > sizeof(priv->wapi_ie)) { + PRINTM(MWARN, "failed to copy, WAPI IE is too big\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + memcpy(priv->adapter, priv->wapi_ie, ie_data_ptr, ie_len); + priv->wapi_ie_len = (t_u8)ie_len; + PRINTM(MIOCTL, "Set wapi_ie_len=%d IE=%#x\n", priv->wapi_ie_len, + priv->wapi_ie[0]); + DBG_HEXDUMP(MCMD_D, "wapi_ie", priv->wapi_ie, + priv->wapi_ie_len); + if (priv->wapi_ie[0] == WAPI_IE) + priv->sec_info.wapi_enabled = MTRUE; + } else { + memset(priv->adapter, priv->wapi_ie, 0, sizeof(priv->wapi_ie)); + priv->wapi_ie_len = (t_u8)ie_len; + PRINTM(MINFO, "Reset wapi_ie_len=%d IE=%#x\n", + priv->wapi_ie_len, priv->wapi_ie[0]); + priv->sec_info.wapi_enabled = MFALSE; + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Set/Get WAPI status + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_sec_ioctl_wapi_enable(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_sec_cfg *sec = MNULL; + ENTER(); + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) { + if (pmpriv->wapi_ie_len) + sec->param.wapi_enabled = MTRUE; + else + sec->param.wapi_enabled = MFALSE; + } else { + if (sec->param.wapi_enabled == MFALSE) + wlan_set_wapi_ie(pmpriv, MNULL, 0); + } + pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; + LEAVE(); + return ret; +} + +/** + * @brief Set WAPI key + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_sec_ioctl_set_wapi_key(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_sec_cfg *sec = MNULL; + ENTER(); + + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_KEY_MATERIAL, + HostCmd_ACT_GEN_SET, + KEY_INFO_ENABLED, + (t_void *)pioctl_req, &sec->param.encrypt_key); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Port Control status + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_sec_ioctl_port_ctrl_enable(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_sec_cfg *sec = MNULL; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) { + if (pmpriv->port_ctrl_mode) + sec->param.port_ctrl_enabled = MTRUE; + else + sec->param.port_ctrl_enabled = MFALSE; + } else { + if (sec->param.port_ctrl_enabled) { + pmpriv->port_ctrl_mode = MTRUE; + pmpriv->port_open = MFALSE; + } else { + if (pmpriv->port_ctrl_mode == MTRUE) { + pmpriv->port_ctrl_mode = MFALSE; + /* Cleanup the bypass TX queue */ + wlan_cleanup_bypass_txq(pmpriv); + } + } + } + PRINTM(MINFO, "port_ctrl: port_ctrl_mode=%d port_open=%d\n", + pmpriv->port_ctrl_mode, pmpriv->port_open); + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get authentication mode + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_sec_ioctl_auth_mode(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_sec_cfg *sec = MNULL; + ENTER(); + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) + sec->param.auth_mode = pmpriv->sec_info.authentication_mode; + else + pmpriv->sec_info.authentication_mode = sec->param.auth_mode; + + pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; + LEAVE(); + return ret; +} + +/** + * @brief Set/Get encryption mode + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_sec_ioctl_encrypt_mode(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_sec_cfg *sec = MNULL; + ENTER(); + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) + sec->param.encrypt_mode = pmpriv->sec_info.encryption_mode; + else + pmpriv->sec_info.encryption_mode = sec->param.encrypt_mode; + + pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; + LEAVE(); + return ret; +} + +/** + * @brief Get Random charactor + * + * @param pmadapter A pointer to mlan_adapter structure + * + * @return random charactor + */ +t_u8 +wlan_get_random_charactor(pmlan_adapter pmadapter) +{ + t_u32 sec, usec; + t_u8 ch = 0; + + ENTER(); + + pmadapter->callbacks.moal_get_system_time(pmadapter->pmoal_handle, &sec, + &usec); + sec = (sec & 0xFFFF) + (sec >> 16); + usec = (usec & 0xFFFF) + (usec >> 16); + ch = (((sec << 16) + usec) % 26) + 'a'; + LEAVE(); + return ch; +} + +/** + * @brief Set/Get WPA status + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_sec_ioctl_wpa_enable(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_sec_cfg *sec = MNULL; + ENTER(); + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) { + if (pmpriv->wpa_ie_len) + sec->param.wpa_enabled = MTRUE; + else + sec->param.wpa_enabled = MFALSE; + } else { + if (sec->param.wpa_enabled == MFALSE) + wlan_set_wpa_ie_helper(pmpriv, MNULL, 0); + /** clear adhoc aes flag, when WPA enabled */ + pmpriv->adhoc_aes_enabled = MFALSE; + pmpriv->aes_key.key_len = 0; + } + pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; + LEAVE(); + return ret; +} + +/** + * @brief Set WEP keys + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_sec_ioctl_set_wep_key(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_sec_cfg *sec = MNULL; + mrvl_wep_key_t *pwep_key = MNULL; + int index; + int i = 0; + + ENTER(); + + if (pmpriv->wep_key_curr_index >= MRVL_NUM_WEP_KEY) + pmpriv->wep_key_curr_index = 0; + pwep_key = &pmpriv->wep_key[pmpriv->wep_key_curr_index]; + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + if (sec->param.encrypt_key.key_index == MLAN_KEY_INDEX_DEFAULT) { + index = pmpriv->wep_key_curr_index; + sec->param.encrypt_key.key_index = index; + } else { + if (sec->param.encrypt_key.key_index >= MRVL_NUM_WEP_KEY) { + if ((sec->param.encrypt_key.key_remove == MTRUE)&& + (sec->param.encrypt_key.key_index <= 5)) { + /* call firmware remove key */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_KEY_MATERIAL, + HostCmd_ACT_GEN_SET, + 0, + MNULL, + &sec->param.encrypt_key); + goto exit; + } + PRINTM(MERROR, "Key_index is invalid\n"); + ret = MLAN_STATUS_FAILURE; + goto exit; + } + index = sec->param.encrypt_key.key_index; + } + + if ((sec->param.encrypt_key.key_disable == MTRUE)|| + (sec->param.encrypt_key.key_remove == MTRUE)) { + pmpriv->sec_info.wep_status = Wlan802_11WEPDisabled; + /* remove key */ + if (sec->param.encrypt_key.key_remove == MTRUE) { + memset(pmadapter, &pmpriv->wep_key[index], 0, + sizeof(mrvl_wep_key_t)); + /* call firmware remove key */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_KEY_MATERIAL, + HostCmd_ACT_GEN_SET, + 0, + MNULL, &sec->param.encrypt_key); + if (ret) + goto exit; + } + } else { + if (sec->param.encrypt_key.key_len) { + if ((sec->param.encrypt_key.key_len != + WEP_104_BIT_LEN)&&(sec->param.encrypt_key. + key_len != WEP_40_BIT_LEN)) { + PRINTM(MERROR, "Invalid wep key len=%d\n", + sec->param.encrypt_key.key_len); + /* We will use random key to clear the key + buffer in FW */ + if (sec->param.encrypt_key.key_len < + WEP_40_BIT_LEN) + sec->param.encrypt_key.key_len = + WEP_40_BIT_LEN; + else + sec->param.encrypt_key.key_len = + WEP_104_BIT_LEN; + for (i = 0; i < sec->param.encrypt_key.key_len; + i++) + sec->param.encrypt_key.key_material[i] = + wlan_get_random_charactor + (pmadapter); + } + pwep_key = &pmpriv->wep_key[index]; + /* Cleanup */ + memset(pmadapter, pwep_key, 0, sizeof(mrvl_wep_key_t)); + /* Copy the key in the driver */ + + memcpy(pmadapter, pwep_key->key_material, + sec->param.encrypt_key.key_material, + sec->param.encrypt_key.key_len); + pwep_key->key_index = index; + pwep_key->key_length = sec->param.encrypt_key.key_len; + if (pmpriv->sec_info.wep_status != Wlan802_11WEPEnabled) { + /* + * The status is set as Key Absent + * so as to make sure we display the + * keys when iwlist mlanX key is used + */ + pmpriv->sec_info.wep_status = + Wlan802_11WEPKeyAbsent; + } + } + if (sec->param.encrypt_key.is_current_wep_key == MTRUE) { + /* Copy the required key as the current key */ + pwep_key = &pmpriv->wep_key[index]; + if (!pwep_key->key_length) { + if (0 + || &pmpriv->sec_info.wpa_enabled + || &pmpriv->sec_info.wpa2_enabled + || &pmpriv->sec_info.wapi_enabled) { + ret = MLAN_STATUS_SUCCESS; + goto exit; + } + PRINTM(MERROR, + "Key %d not set,so cannot enable it\n", + index); + pioctl_req->status_code = + MLAN_ERROR_CMD_RESP_FAIL; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + pmpriv->wep_key_curr_index = (t_u16)index; + pmpriv->sec_info.wep_status = Wlan802_11WEPEnabled; + } + if (sec->param.encrypt_key.key_flags && pwep_key->key_length) { + pmpriv->wep_key_curr_index = (t_u16)index; + // Only do this if the key is an xmit key. If the key + // is a group key, + // we might be in wpa/wep mixed mode in which case we + // don't want to + // set wep_status = Wlan802_11WEPEnabled because that + // enables WEP + // at the MAC controller level and WPA stops working + // properly. + if (sec->param.encrypt_key. + key_flags & KEY_FLAG_SET_TX_KEY) { + pmpriv->sec_info.wep_status = + Wlan802_11WEPEnabled; + } + } + } + if (pmpriv->sec_info.wep_status == Wlan802_11WEPEnabled) + pmpriv->curr_pkt_filter |= HostCmd_ACT_MAC_WEP_ENABLE; + else + pmpriv->curr_pkt_filter &= ~HostCmd_ACT_MAC_WEP_ENABLE; + + /* Send request to firmware */ + if (pmpriv->sec_info.wep_status == Wlan802_11WEPEnabled + && pwep_key->key_length) { + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_MAC_CONTROL, + HostCmd_ACT_GEN_SET, + 0, MNULL, &pmpriv->curr_pkt_filter); + if (ret) + goto exit; + if (!sec->param.encrypt_key.key_len) { + sec->param.encrypt_key.key_index = pwep_key->key_index; + sec->param.encrypt_key.key_len = pwep_key->key_length; + memcpy(pmadapter, sec->param.encrypt_key.key_material, + pwep_key->key_material, + sec->param.encrypt_key.key_len); + } + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_KEY_MATERIAL, + HostCmd_ACT_GEN_SET, + 0, + (t_void *)pioctl_req, + &sec->param.encrypt_key); + } else { + if (pwep_key->key_length) { + if (!sec->param.encrypt_key.key_len) { + sec->param.encrypt_key.key_index = + pwep_key->key_index; + sec->param.encrypt_key.key_len = + pwep_key->key_length; + memcpy(pmadapter, + sec->param.encrypt_key.key_material, + pwep_key->key_material, + sec->param.encrypt_key.key_len); + } + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_KEY_MATERIAL, + HostCmd_ACT_GEN_SET, + 0, + MNULL, &sec->param.encrypt_key); + if (ret) + goto exit; + } + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_MAC_CONTROL, + HostCmd_ACT_GEN_SET, + 0, + (t_void *)pioctl_req, + &pmpriv->curr_pkt_filter); + } + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + +exit: + LEAVE(); + return ret; +} + +/** + * @brief Set WPA key + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_sec_ioctl_set_wpa_key(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_sec_cfg *sec = MNULL; + + ENTER(); + + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + /* Current driver only supports key length of up to 32 bytes */ + if (sec->param.encrypt_key.key_len > MLAN_MAX_KEY_LENGTH) { + PRINTM(MERROR, "Key length is incorrect\n"); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + + if (sec->param.encrypt_key.key_len == WPA_AES_KEY_LEN) { + /** back up adhoc AES key */ + memset(pmpriv->adapter, &pmpriv->aes_key, 0, + sizeof(pmpriv->aes_key)); + memcpy(pmpriv->adapter, (t_u8 *)&pmpriv->aes_key, + (t_u8 *)&sec->param.encrypt_key, + sizeof(pmpriv->aes_key)); + } + + /** only adhoc aes key_index = MLAN_KEY_INDEX_UNICAST */ + if (pmpriv->bss_mode == MLAN_BSS_MODE_IBSS && + sec->param.encrypt_key.key_len == WPA_AES_KEY_LEN + && sec->param.encrypt_key.key_index & MLAN_KEY_INDEX_UNICAST) { + t_u8 zero_key_material[WPA_AES_KEY_LEN]; + memset(pmadapter, zero_key_material, 0, + sizeof(zero_key_material)); + if (memcmp + (pmadapter, sec->param.encrypt_key.key_material, + zero_key_material, WPA_AES_KEY_LEN)) { + PRINTM(MINFO, "Adhoc AES Enabled.\n"); + pmpriv->adhoc_aes_enabled = MTRUE; + } else { + PRINTM(MINFO, "Adhoc AES Disabled.\n"); + pmpriv->adhoc_aes_enabled = MFALSE; + /** clear adhoc AES key */ + pmpriv->aes_key.key_len = 0; + } + } + + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_KEY_MATERIAL, + HostCmd_ACT_GEN_SET, + 0, + (t_void *)pioctl_req, &sec->param.encrypt_key); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + +exit: + LEAVE(); + return ret; +} + +/** + * @brief Get security keys + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_sec_ioctl_get_key(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_sec_cfg *sec = MNULL; + int index; + ENTER(); + + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + + if ((sec->param.encrypt_key.key_index == MLAN_KEY_INDEX_UNICAST)&& + (sec->param.encrypt_key.key_len == WPA_AES_KEY_LEN)) { + if (pmpriv->adhoc_aes_enabled == MTRUE && + (pmpriv->aes_key.key_len == WPA_AES_KEY_LEN)) { + HEXDUMP("Get ADHOCAES Key", + pmpriv->aes_key.key_material, WPA_AES_KEY_LEN); + memcpy(pmadapter, sec->param.encrypt_key.key_material, + pmpriv->aes_key.key_material, WPA_AES_KEY_LEN); + LEAVE(); + return ret; + } else { + PRINTM(MERROR, " ADHOCAES key is not set yet!\n"); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + LEAVE(); + return ret; + } + } + if (pmpriv->wep_key_curr_index >= MRVL_NUM_WEP_KEY) + pmpriv->wep_key_curr_index = 0; + + if ((pmpriv->sec_info.wep_status == Wlan802_11WEPEnabled) + || (pmpriv->sec_info.wep_status == Wlan802_11WEPKeyAbsent) + || pmpriv->sec_info.ewpa_enabled + || pmpriv->sec_info.wpa_enabled + || pmpriv->sec_info.wpa2_enabled || pmpriv->adhoc_aes_enabled) { + sec->param.encrypt_key.key_disable = MFALSE; + } else { + sec->param.encrypt_key.key_disable = MTRUE; + } + if (sec->param.encrypt_key.key_index == MLAN_KEY_INDEX_DEFAULT) { + if ((pmpriv->wep_key[pmpriv->wep_key_curr_index].key_length)&& + (pmpriv->sec_info.wep_status == Wlan802_11WEPEnabled)) { + index = pmpriv->wep_key_curr_index; + sec->param.encrypt_key.key_index = + pmpriv->wep_key[index].key_index; + memcpy(pmadapter, sec->param.encrypt_key.key_material, + pmpriv->wep_key[index].key_material, + MIN(MLAN_MAX_KEY_LENGTH, + pmpriv->wep_key[index].key_length)); + sec->param.encrypt_key.key_len = + MIN(MLAN_MAX_KEY_LENGTH, + pmpriv->wep_key[index].key_length); + } else if ((pmpriv->sec_info.wpa_enabled) + || (pmpriv->sec_info.ewpa_enabled) + || (pmpriv->sec_info.wpa2_enabled) + || (pmpriv->sec_info.wapi_enabled) + || (pmpriv->adhoc_aes_enabled) + ) { + /* Return WPA enabled */ + sec->param.encrypt_key.key_disable = MFALSE; + + memcpy(pmadapter, sec->param.encrypt_key.key_material, + pmpriv->aes_key.key_material, + MIN(MLAN_MAX_KEY_LENGTH, + pmpriv->aes_key.key_len)); + sec->param.encrypt_key.key_len = + MIN(MLAN_MAX_KEY_LENGTH, + pmpriv->aes_key.key_len); + } else { + sec->param.encrypt_key.key_disable = MTRUE; + } + } else { + index = sec->param.encrypt_key.key_index; + if (pmpriv->wep_key[index].key_length) { + sec->param.encrypt_key.key_index = + pmpriv->wep_key[index].key_index; + memcpy(pmadapter, sec->param.encrypt_key.key_material, + pmpriv->wep_key[index].key_material, + MIN(MLAN_MAX_KEY_LENGTH, + pmpriv->wep_key[index].key_length)); + sec->param.encrypt_key.key_len = + MIN(MLAN_MAX_KEY_LENGTH, + pmpriv->wep_key[index].key_length); + } else if ((pmpriv->sec_info.wpa_enabled) + || (pmpriv->sec_info.ewpa_enabled) + || (pmpriv->sec_info.wpa2_enabled) + || (pmpriv->sec_info.wapi_enabled) + || (pmpriv->adhoc_aes_enabled) + ) { + /* Return WPA enabled */ + sec->param.encrypt_key.key_disable = MFALSE; + } else { + sec->param.encrypt_key.key_disable = MTRUE; + } + } + + LEAVE(); + return ret; +} + +/** + * @brief Set security key(s) + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_sec_ioctl_encrypt_key(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_ds_sec_cfg *sec = MNULL; + ENTER(); + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) { + if (sec->param.encrypt_key.is_wapi_key) + status = wlan_sec_ioctl_set_wapi_key(pmadapter, + pioctl_req); + else if (sec->param.encrypt_key.key_len > MAX_WEP_KEY_SIZE) + status = wlan_sec_ioctl_set_wpa_key(pmadapter, + pioctl_req); + else + status = wlan_sec_ioctl_set_wep_key(pmadapter, + pioctl_req); + } else { + status = wlan_sec_ioctl_get_key(pmadapter, pioctl_req); + } + LEAVE(); + return status; +} + +/** + * @brief Query Encrpyt key + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_sec_ioctl_query_key(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_sec_cfg *sec = MNULL; + + ENTER(); + + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + /* Current driver only supports get PTK/GTK */ + if (pmpriv->port_open && (pmpriv->sec_info.wpa_enabled + || pmpriv->sec_info.wpa2_enabled + || pmpriv->sec_info.wapi_enabled)) { + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_KEY_MATERIAL, + HostCmd_ACT_GEN_GET, + KEY_INFO_ENABLED, + (t_void *)pioctl_req, + &sec->param.encrypt_key); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + } + LEAVE(); + return ret; +} + +/** + * @brief Set/Get WPA passphrase for esupplicant + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_sec_ioctl_passphrase(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_sec_cfg *sec = MNULL; + t_u16 cmd_action = 0; + BSSDescriptor_t *pbss_desc; + int i = 0; + ENTER(); + + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_SET) { + if (sec->param.passphrase.psk_type == MLAN_PSK_CLEAR) + cmd_action = HostCmd_ACT_GEN_REMOVE; + else + cmd_action = HostCmd_ACT_GEN_SET; + } else { + if (sec->param.passphrase.psk_type == MLAN_PSK_QUERY) { + if (sec->param.passphrase.ssid.ssid_len == 0) { + i = wlan_find_bssid_in_list(pmpriv, + (t_u8 *)&sec->param. + passphrase.bssid, + MLAN_BSS_MODE_AUTO); + if (i >= 0) { + pbss_desc = &pmadapter->pscan_table[i]; + memcpy(pmadapter, + &sec->param.passphrase.ssid, + &pbss_desc->ssid, + sizeof(mlan_802_11_ssid)); + memset(pmadapter, + &sec->param.passphrase.bssid, 0, + MLAN_MAC_ADDR_LENGTH); + PRINTM(MINFO, + "PSK_QUERY: found ssid=%s\n", + sec->param.passphrase.ssid.ssid); + } + } else + memset(pmadapter, &sec->param.passphrase.bssid, + 0, MLAN_MAC_ADDR_LENGTH); + } + cmd_action = HostCmd_ACT_GEN_GET; + } + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_SUPPLICANT_PMK, + cmd_action, + 0, (t_void *)pioctl_req, &sec->param.passphrase); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get esupplicant status + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_sec_ioctl_ewpa_enable(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_sec_cfg *sec = MNULL; + ENTER(); + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) { + sec->param.ewpa_enabled = pmpriv->sec_info.ewpa_enabled; + } else { + pmpriv->sec_info.ewpa_enabled = (t_u8)sec->param.ewpa_enabled; + PRINTM(MINFO, "Set: ewpa_enabled = %d\n", + (int)pmpriv->sec_info.ewpa_enabled); + } + pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; + LEAVE(); + return ret; +} + +/** + * @brief Get esupplicant mode + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_sec_ioctl_esupp_mode(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + t_u16 cmd_action = 0; + mlan_ds_sec_cfg *sec = MNULL; + + ENTER(); + + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) { + cmd_action = HostCmd_ACT_GEN_SET; + if (pmpriv->media_connected == MTRUE) { + PRINTM(MERROR, + "Cannot set esupplicant mode configuration while connected.\n"); + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + if (!sec->param.esupp_mode.rsn_mode || + (sec->param.esupp_mode.rsn_mode & RSN_TYPE_VALID_BITS) + != sec->param.esupp_mode.rsn_mode) { + PRINTM(MERROR, "Invalid RSN mode\n"); + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + if (!sec->param.esupp_mode.act_paircipher || + (sec->param.esupp_mode. + act_paircipher & EMBED_CIPHER_VALID_BITS) + != sec->param.esupp_mode.act_paircipher) { + PRINTM(MERROR, "Invalid pairwise cipher\n"); + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + if (!sec->param.esupp_mode.act_groupcipher || + (sec->param.esupp_mode. + act_groupcipher & EMBED_CIPHER_VALID_BITS) + != sec->param.esupp_mode.act_groupcipher) { + PRINTM(MERROR, "Invalid group cipher\n"); + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + } else { + cmd_action = HostCmd_ACT_GEN_GET_CURRENT; + } + + /* Send request to firmware */ + if (sec) { + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_SUPPLICANT_PROFILE, + cmd_action, + 0, + (t_void *)pioctl_req, + &sec->param.esupp_mode); + } else { + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_SUPPLICANT_PROFILE, + cmd_action, + 0, (t_void *)pioctl_req, MNULL); + } + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + +exit: + LEAVE(); + return ret; +} + +/** + * @brief Security configuration handler + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_sec_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_ds_sec_cfg *sec = MNULL; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_sec_cfg)) { + PRINTM(MWARN, "MLAN bss IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_sec_cfg); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + switch (sec->sub_command) { + case MLAN_OID_SEC_CFG_AUTH_MODE: + status = wlan_sec_ioctl_auth_mode(pmadapter, pioctl_req); + break; + case MLAN_OID_SEC_CFG_ENCRYPT_MODE: + status = wlan_sec_ioctl_encrypt_mode(pmadapter, pioctl_req); + break; + case MLAN_OID_SEC_CFG_WPA_ENABLED: + status = wlan_sec_ioctl_wpa_enable(pmadapter, pioctl_req); + break; + case MLAN_OID_SEC_CFG_WAPI_ENABLED: + status = wlan_sec_ioctl_wapi_enable(pmadapter, pioctl_req); + break; + case MLAN_OID_SEC_CFG_PORT_CTRL_ENABLED: + status = wlan_sec_ioctl_port_ctrl_enable(pmadapter, pioctl_req); + break; + case MLAN_OID_SEC_CFG_ENCRYPT_KEY: + status = wlan_sec_ioctl_encrypt_key(pmadapter, pioctl_req); + break; + case MLAN_OID_SEC_QUERY_KEY: + status = wlan_sec_ioctl_query_key(pmadapter, pioctl_req); + break; + case MLAN_OID_SEC_CFG_PASSPHRASE: + status = wlan_sec_ioctl_passphrase(pmadapter, pioctl_req); + break; + case MLAN_OID_SEC_CFG_EWPA_ENABLED: + status = wlan_sec_ioctl_ewpa_enable(pmadapter, pioctl_req); + break; + case MLAN_OID_SEC_CFG_ESUPP_MODE: + status = wlan_sec_ioctl_esupp_mode(pmadapter, pioctl_req); + break; + + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + LEAVE(); + return status; +} + +/** + * @brief Append/Reset IE buffer. + * + * Pass an opaque block of data, expected to be IEEE IEs, to the driver + * for eventual passthrough to the firmware in an associate/join + * (and potentially start) command. This function is the main body + * for both wlan_set_gen_ie_ioctl and wlan_set_gen_ie + * + * Data is appended to an existing buffer and then wrapped in a passthrough + * TLV in the command API to the firmware. The firmware treats the data + * as a transparent passthrough to the transmitted management frame. + * + * @param priv A pointer to mlan_private structure + * @param ie_data_ptr A pointer to iwreq structure + * @param ie_len Length of the IE or IE block passed in ie_data_ptr + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static int +wlan_set_gen_ie_helper(mlan_private *priv, t_u8 *ie_data_ptr, t_u16 ie_len) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + IEEEtypes_VendorHeader_t *pvendor_ie; + const t_u8 wpa_oui[] = { 0x00, 0x50, 0xf2, 0x01 }; + const t_u8 wps_oui[] = { 0x00, 0x50, 0xf2, 0x04 }; + const t_u8 osen_oui[] = { 0x50, 0x6f, 0x9a, 0x12 }; + + ENTER(); + + /* If the passed length is zero, reset the buffer */ + if (!ie_len) { + priv->gen_ie_buf_len = 0; + priv->wps.session_enable = MFALSE; + wlan_set_wpa_ie_helper(priv, MNULL, 0); + wlan_set_wapi_ie(priv, MNULL, 0); + wlan_set_osen_ie(priv, MNULL, 0); + } else if (!ie_data_ptr) { + /* MNULL check */ + ret = MLAN_STATUS_FAILURE; + } else { + + pvendor_ie = (IEEEtypes_VendorHeader_t *)ie_data_ptr; + /* Test to see if it is a WPA IE, if not, then it is a gen IE */ + if (((pvendor_ie->element_id == WPA_IE) + && + (!memcmp + (priv->adapter, pvendor_ie->oui, wpa_oui, + sizeof(wpa_oui)))) + || (pvendor_ie->element_id == RSN_IE) + ) { + + /* IE is a WPA/WPA2 IE so call set_wpa function */ + ret = wlan_set_wpa_ie_helper(priv, ie_data_ptr, ie_len); + priv->wps.session_enable = MFALSE; + } else if (pvendor_ie->element_id == WAPI_IE) { + /* IE is a WAPI IE so call set_wapi function */ + ret = wlan_set_wapi_ie(priv, ie_data_ptr, ie_len); + } else if ((pvendor_ie->element_id == VENDOR_SPECIFIC_221) && + (!memcmp + (priv->adapter, pvendor_ie->oui, osen_oui, + sizeof(osen_oui)))) { + /* IE is a OSEN IE so call set_osen function */ + ret = wlan_set_osen_ie(priv, ie_data_ptr, ie_len); + + } else if ((pvendor_ie->element_id == WPS_IE) && + (priv->wps.session_enable == MFALSE) && + (!memcmp + (priv->adapter, pvendor_ie->oui, wps_oui, + sizeof(wps_oui)))) { + /* + * Discard first two byte (Element ID and Length) + * because they are not needed in the case of setting + * WPS_IE + */ + if (pvendor_ie->len > 4) { + memcpy(priv->adapter, (t_u8 *)&priv->wps.wps_ie, + ie_data_ptr, ie_len); + HEXDUMP("wps_ie", (t_u8 *)&priv->wps.wps_ie, + priv->wps.wps_ie.vend_hdr.len + 2); + } else { + /* Only wps oui exist, reset driver wps buffer */ + memset(priv->adapter, (t_u8 *)&priv->wps.wps_ie, + 0x00, sizeof(priv->wps.wps_ie)); + PRINTM(MINFO, "wps_ie cleared\n"); + } + } else { + /* + * Verify that the passed length is not larger than + * the available space remaining in the buffer + */ + if (ie_len < + (sizeof(priv->gen_ie_buf) - priv->gen_ie_buf_len)) { + + /* Test to see if it is a WPS IE, if so, enable + wps session flag */ + pvendor_ie = + (IEEEtypes_VendorHeader_t *)ie_data_ptr; + if ((pvendor_ie->element_id == WPS_IE) + && + (!memcmp + (priv->adapter, pvendor_ie->oui, wps_oui, + sizeof(wps_oui)))) { + priv->wps.session_enable = MTRUE; + PRINTM(MINFO, "WPS Session Enabled.\n"); + } + + /* Append the passed data to the end of the + genIeBuffer */ + memcpy(priv->adapter, + priv->gen_ie_buf + priv->gen_ie_buf_len, + ie_data_ptr, ie_len); + /* Increment the stored buffer length by the + size passed */ + priv->gen_ie_buf_len += ie_len; + } else { + /* Passed data does not fit in the remaining + buffer space */ + ret = MLAN_STATUS_FAILURE; + } + } + } + + /* Return MLAN_STATUS_SUCCESS, or MLAN_STATUS_FAILURE for error case */ + LEAVE(); + return ret; +} + +/** + * @brief Set/Get WWS mode + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_misc_ioctl_wws_cfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc_cfg = MNULL; + t_u16 cmd_action = 0; + t_u32 enable = 0; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_misc_cfg)) { + PRINTM(MWARN, + "MLAN IOCTL information buffer length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_misc_cfg); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_RESOURCE; + goto exit; + } + + misc_cfg = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + + enable = misc_cfg->param.wws_cfg; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_SNMP_MIB, + cmd_action, + WwsMode_i, (t_void *)pioctl_req, &enable); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + +exit: + LEAVE(); + return ret; + +} + +/** + * @brief Set/Get 11D status + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_11d_cfg_ioctl_enable(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_11d_cfg *pcfg_11d = MNULL; + + ENTER(); + + pcfg_11d = (mlan_ds_11d_cfg *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_SET) { + if (pmpriv->media_connected == MTRUE) { + PRINTM(MIOCTL, + "11D setting cannot be changed while interface is active.\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + PRINTM(MINFO, "11D: 11dcfg SET=%d\n", + pcfg_11d->param.enable_11d); + + /* Compare with current settings */ + if (pmpriv->state_11d.user_enable_11d != + pcfg_11d->param.enable_11d) { + ret = wlan_11d_enable(pmpriv, pioctl_req, + (state_11d_t)pcfg_11d->param. + enable_11d); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + } else { + PRINTM(MINFO, + "11D: same as current setting, do nothing\n"); + } + } else { + pcfg_11d->param.enable_11d = + (t_u32)pmpriv->state_11d.user_enable_11d; + pioctl_req->data_read_written = + sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; + PRINTM(MINFO, "11D: 11dcfg GET=%d\n", + pcfg_11d->param.enable_11d); + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Clear 11D chan table + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_11d_clr_chan_table(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + if (pioctl_req->action == MLAN_ACT_SET) { + PRINTM(MINFO, "11D: 11dclrtbl SET\n"); + + if (wlan_11d_clear_parsedtable(pmpriv) == MLAN_STATUS_SUCCESS) + PRINTM(MINFO, + "11D: cleared parsed_region_chan (now no_of_chan=%d)\n", + pmadapter->parsed_region_chan.no_of_chan); + } + + LEAVE(); + return ret; +} + +/** + * @brief 11D configuration handler + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_11d_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_ds_11d_cfg *pcfg_11d = MNULL; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_11d_cfg)) { + PRINTM(MWARN, "MLAN bss IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_11d_cfg); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + status = MLAN_STATUS_RESOURCE; + goto exit; + } + + pcfg_11d = (mlan_ds_11d_cfg *)pioctl_req->pbuf; + switch (pcfg_11d->sub_command) { + case MLAN_OID_11D_CFG_ENABLE: + status = wlan_11d_cfg_ioctl_enable(pmadapter, pioctl_req); + break; + case MLAN_OID_11D_CLR_CHAN_TABLE: + status = wlan_11d_clr_chan_table(pmadapter, pioctl_req); + break; + case MLAN_OID_11D_DOMAIN_INFO: + status = wlan_11d_cfg_domain_info(pmadapter, pioctl_req); + break; + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + +exit: + LEAVE(); + return status; +} + +/** + * @brief WPS configuration handler + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_wps_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_wps_cfg *pwps = MNULL; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_wps_cfg)) { + PRINTM(MWARN, "MLAN bss IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_wps_cfg); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + + pwps = (mlan_ds_wps_cfg *)pioctl_req->pbuf; + switch (pwps->sub_command) { + case MLAN_OID_WPS_CFG_SESSION: + if (pioctl_req->action == MLAN_ACT_SET) { + if (pwps->param.wps_session == + MLAN_WPS_CFG_SESSION_START) + pmpriv->wps.session_enable = MTRUE; + else + pmpriv->wps.session_enable = MFALSE; + } else { + pwps->param.wps_session = + (t_u32)pmpriv->wps.session_enable; + pioctl_req->data_read_written = sizeof(t_u32); + PRINTM(MINFO, "wpscfg GET=%d\n", + pwps->param.wps_session); + } + break; + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + + LEAVE(); + return status; +} + +/** + * @brief register memory access handler + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_reg_mem_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_ds_reg_mem *reg_mem = MNULL; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_reg_mem)) { + PRINTM(MWARN, "MLAN REG_MEM IOCTL length is too short\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_reg_mem); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + reg_mem = (mlan_ds_reg_mem *)pioctl_req->pbuf; + switch (reg_mem->sub_command) { + case MLAN_OID_REG_RW: + status = wlan_reg_mem_ioctl_reg_rw(pmadapter, pioctl_req); + break; + case MLAN_OID_EEPROM_RD: + status = wlan_reg_mem_ioctl_read_eeprom(pmadapter, pioctl_req); + break; + case MLAN_OID_MEM_RW: + status = wlan_reg_mem_ioctl_mem_rw(pmadapter, pioctl_req); + break; + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + LEAVE(); + return status; +} + +/** + * @brief 802.11h ad-hoc start channel check + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_11h_channel_check_req(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + pmlan_private pmpriv = MNULL; + mlan_status ret = MLAN_STATUS_FAILURE; + t_u8 chan_width = CHAN_BW_20MHZ; + + ENTER(); + + if (pioctl_req != MNULL) { + pmpriv = pmadapter->priv[pioctl_req->bss_index]; + } else { + PRINTM(MERROR, "MLAN IOCTL information is not present\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + pmpriv->adhoc_state = ADHOC_STARTING; + + if ((pmadapter->adhoc_start_band & BAND_A) + || (pmadapter->adhoc_start_band & BAND_AN) + ) { + if (pmpriv->intf_state_11h.adhoc_auto_sel_chan) + pmpriv->adhoc_channel = + wlan_11h_get_adhoc_start_channel(pmpriv); + + /* + * Check if the region and channel requires a channel availability + * check. + */ + if (wlan_11h_radar_detect_required + (pmpriv, pmpriv->adhoc_channel) + && !wlan_11h_is_channel_under_nop(pmadapter, + pmpriv->adhoc_channel) + ) { + /* + * Radar detection is required for this channel, make sure + * 11h is activated in the firmware + */ + ret = wlan_11h_activate(pmpriv, MNULL, MTRUE); + ret = wlan_11h_config_master_radar_det(pmpriv, MTRUE); + ret = wlan_11h_check_update_radar_det_state(pmpriv); + + /* Check for radar on the channel */ + if ((pmadapter->chan_bandwidth == + CHANNEL_BW_40MHZ_ABOVE) || + (pmadapter->chan_bandwidth == + CHANNEL_BW_40MHZ_BELOW)) + chan_width = CHAN_BW_40MHZ; + else if (pmadapter->chan_bandwidth == CHANNEL_BW_80MHZ) + chan_width = CHAN_BW_80MHZ; + ret = wlan_11h_issue_radar_detect(pmpriv, pioctl_req, + pmpriv->adhoc_channel, + chan_width); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + } + } + + LEAVE(); + return ret; +} + +/** + * @brief 802.11h set/get local power constraint + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_11h_ioctl_local_power_constraint(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_ds_11h_cfg *ds_11hcfg = MNULL; + t_s8 *plocalpower = &pmadapter->state_11h.usr_def_power_constraint; + + ENTER(); + + ds_11hcfg = (mlan_ds_11h_cfg *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_GET) + ds_11hcfg->param.usr_local_power_constraint = *plocalpower; + else + *plocalpower = ds_11hcfg->param.usr_local_power_constraint; + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief 11h configuration handler + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_11h_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_ds_11h_cfg *ds_11hcfg = MNULL; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_11h_cfg)) { + PRINTM(MWARN, "MLAN 11H IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_11h_cfg); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + ds_11hcfg = (mlan_ds_11h_cfg *)pioctl_req->pbuf; + + switch (ds_11hcfg->sub_command) { + case MLAN_OID_11H_CHANNEL_CHECK: + status = wlan_11h_channel_check_req(pmadapter, pioctl_req); + break; + case MLAN_OID_11H_LOCAL_POWER_CONSTRAINT: + status = wlan_11h_ioctl_local_power_constraint(pmadapter, + pioctl_req); + break; +#if defined(DFS_TESTING_SUPPORT) + case MLAN_OID_11H_DFS_TESTING: + status = wlan_11h_ioctl_dfs_testing(pmadapter, pioctl_req); + break; +#endif + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + + LEAVE(); + return status; +} + +/** + * @brief Set/Get generic IE + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_misc_ioctl_gen_ie(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_misc_cfg *misc = MNULL; + + ENTER(); + + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + switch (misc->param.gen_ie.type) { + case MLAN_IE_TYPE_GEN_IE: + if (pioctl_req->action == MLAN_ACT_GET) { + misc->param.gen_ie.len = pmpriv->wpa_ie_len; + memcpy(pmadapter, misc->param.gen_ie.ie_data, + pmpriv->wpa_ie, misc->param.gen_ie.len); + } else { + wlan_set_gen_ie_helper(pmpriv, + misc->param.gen_ie.ie_data, + (t_u16)misc->param.gen_ie.len); + } + break; + case MLAN_IE_TYPE_ARP_FILTER: + memset(pmadapter, pmadapter->arp_filter, 0, + sizeof(pmadapter->arp_filter)); + if (misc->param.gen_ie.len > ARP_FILTER_MAX_BUF_SIZE) { + pmadapter->arp_filter_size = 0; + PRINTM(MERROR, "Invalid ARP Filter Size\n"); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + } else if (misc->param.gen_ie.len <= + sizeof(MrvlIEtypesHeader_t)) { + pmadapter->arp_filter_size = 0; + PRINTM(MINFO, "Clear ARP filter\n"); + } else { + memcpy(pmadapter, pmadapter->arp_filter, + misc->param.gen_ie.ie_data, + misc->param.gen_ie.len); + pmadapter->arp_filter_size = misc->param.gen_ie.len; + HEXDUMP("ArpFilter", pmadapter->arp_filter, + pmadapter->arp_filter_size); + } + break; + default: + PRINTM(MERROR, "Invalid IE type\n"); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + } + pioctl_req->data_read_written = + sizeof(mlan_ds_misc_gen_ie) + MLAN_SUB_COMMAND_SIZE; + LEAVE(); + return ret; +} + +/** + * @brief Set/Get region code + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_misc_ioctl_region(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_misc_cfg *misc = MNULL; + int i; + + ENTER(); + + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) { + misc->param.region_code = pmadapter->region_code; + } else { + for (i = 0; i < MRVDRV_MAX_REGION_CODE; i++) { + /* Use the region code to search for the index */ + if (misc->param.region_code == region_code_index[i]) { + pmadapter->region_code = + (t_u16)misc->param.region_code; + break; + } + } + /* It's unidentified region code */ + if (i >= MRVDRV_MAX_REGION_CODE) { + PRINTM(MERROR, "Region Code not identified\n"); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + pmadapter->cfp_code_bg = misc->param.region_code; + pmadapter->cfp_code_a = misc->param.region_code; + if (wlan_set_regiontable(pmpriv, (t_u8)pmadapter->region_code, + pmadapter->config_bands | pmadapter-> + adhoc_start_band)) { + pioctl_req->status_code = MLAN_ERROR_IOCTL_FAIL; + ret = MLAN_STATUS_FAILURE; + } + } + pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; + + LEAVE(); + return ret; +} + +/** + * @brief Perform warm reset + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_misc_ioctl_warm_reset(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_callbacks pcb = &pmadapter->callbacks; + pmlan_buffer pmbuf; + t_s32 i = 0; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + + ENTER(); + mlan_block_main_process(pmadapter, MTRUE); + mlan_block_rx_process(pmadapter, MTRUE); + /* Cancel all pending commands and complete ioctls */ + if (misc->param.fw_reload) + wlan_cancel_all_pending_cmd(pmadapter); + /** Init all the head nodes and free all the locks here */ + for (i = 0; i < pmadapter->priv_num; i++) + wlan_free_priv(pmadapter->priv[i]); + + while ((pmbuf = (pmlan_buffer)util_dequeue_list(pmadapter->pmoal_handle, + &pmadapter-> + rx_data_queue, + pcb->moal_spin_lock, + pcb-> + moal_spin_unlock))) { + wlan_free_mlan_buffer(pmadapter, pmbuf); + } + pmadapter->rx_pkts_queued = 0; + + /* Initialize adapter structure */ + wlan_init_adapter(pmadapter); + + /* Initialize private structures */ + for (i = 0; i < pmadapter->priv_num; i++) { + if (pmadapter->priv[i]) + wlan_init_priv(pmadapter->priv[i]); + } + mlan_block_main_process(pmadapter, MFALSE); + mlan_block_rx_process(pmadapter, MFALSE); + if (misc->param.fw_reload != MTRUE) { + /* Restart the firmware */ + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_FUNC_SHUTDOWN, + HostCmd_ACT_GEN_SET, 0, MNULL, MNULL); + if (ret) + goto done; + } + + /* Issue firmware initialize commands for first BSS, for other + interfaces it will be called after getting the last init command + response of previous interface */ + pmpriv = wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY); + ret = pmpriv->ops.init_cmd(pmpriv, MTRUE); + if (ret == MLAN_STATUS_PENDING) + pmadapter->pwarm_reset_ioctl_req = pioctl_req; + +done: + LEAVE(); + return ret; +} + +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) +/** + * @brief Reconfigure SDIO multiport aggregation parameters + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static mlan_status +wlan_misc_ioctl_sdio_mpa_ctrl(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + mlan_ds_misc_sdio_mpa_ctrl *mpa_ctrl = MNULL; + + ENTER(); + + mpa_ctrl = &misc->param.mpa_ctrl; + + if (pioctl_req->action == MLAN_ACT_SET) { + + if (pmpriv->media_connected == MTRUE) { + PRINTM(MMSG, + "SDIO MPA CTRL: not allowed in connected state\n"); + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + + if (mpa_ctrl->tx_enable > 1) { + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + + if (mpa_ctrl->rx_enable > 1) { + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + + if (mpa_ctrl->tx_max_ports > SDIO_MP_AGGR_DEF_PKT_LIMIT) { + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + + if (mpa_ctrl->rx_max_ports > SDIO_MP_AGGR_DEF_PKT_LIMIT) { + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + + if (mpa_ctrl->tx_buf_size || mpa_ctrl->rx_buf_size) { + + wlan_free_sdio_mpa_buffers(pmadapter); + + if (mpa_ctrl->tx_buf_size > 0) + pmadapter->mpa_tx.buf_size = + mpa_ctrl->tx_buf_size; + + if (mpa_ctrl->rx_buf_size > 0) + pmadapter->mpa_rx.buf_size = + mpa_ctrl->rx_buf_size; + + if (wlan_alloc_sdio_mpa_buffers(pmadapter, + pmadapter->mpa_tx. + buf_size, + pmadapter->mpa_rx. + buf_size) != + MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, + "Failed to allocate sdio mp-a buffers\n"); + pioctl_req->status_code = MLAN_ERROR_NO_MEM; + ret = MLAN_STATUS_FAILURE; + goto exit; + } + } + + if (mpa_ctrl->tx_max_ports > 0) + pmadapter->mpa_tx.pkt_aggr_limit = + mpa_ctrl->tx_max_ports; + if (mpa_ctrl->rx_max_ports > 0) + pmadapter->mpa_rx.pkt_aggr_limit = + mpa_ctrl->rx_max_ports; + + pmadapter->mpa_tx.enabled = (t_u8)mpa_ctrl->tx_enable; + pmadapter->mpa_rx.enabled = (t_u8)mpa_ctrl->rx_enable; + + } else { + mpa_ctrl->tx_enable = (t_u16)pmadapter->mpa_tx.enabled; + mpa_ctrl->rx_enable = (t_u16)pmadapter->mpa_rx.enabled; + mpa_ctrl->tx_buf_size = (t_u16)pmadapter->mpa_tx.buf_size; + mpa_ctrl->rx_buf_size = (t_u16)pmadapter->mpa_rx.buf_size; + mpa_ctrl->tx_max_ports = + (t_u16)pmadapter->mpa_tx.pkt_aggr_limit; + mpa_ctrl->rx_max_ports = + (t_u16)pmadapter->mpa_rx.pkt_aggr_limit; + } + +exit: + LEAVE(); + return ret; +} +#endif /* SDIO_MULTI_PORT_TX_AGGR || SDIO_MULTI_PORT_RX_AGGR */ + +/** + * @brief Set/Get system clock configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_misc_ioctl_sysclock(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_misc_cfg *misc = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 cmd_action = 0; + + ENTER(); + + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) + cmd_action = HostCmd_ACT_GEN_GET; + else + cmd_action = HostCmd_ACT_GEN_SET; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_ECL_SYSTEM_CLOCK_CONFIG, + cmd_action, + 0, + (t_void *)pioctl_req, + (t_void *)&misc->param.sys_clock); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Get the associate response + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_misc_ioctl_get_assoc_rsp(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_ds_misc_cfg *misc = MNULL; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + if ((pioctl_req->action == MLAN_ACT_GET) && pmpriv->assoc_rsp_size) { + memcpy(pmadapter, misc->param.assoc_resp.assoc_resp_buf, + pmpriv->assoc_rsp_buf, MIN(ASSOC_RSP_BUF_SIZE, + pmpriv->assoc_rsp_size)); + misc->param.assoc_resp.assoc_resp_len = + MIN(ASSOC_RSP_BUF_SIZE, pmpriv->assoc_rsp_size); + + /* Reset assoc buffer */ + pmpriv->assoc_rsp_size = 0; + } + + LEAVE(); + return ret; +} + +/** + * @brief Send function softreset command to firmware + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_misc_ioctl_soft_reset(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + /* Send command to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_SOFT_RESET, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_req, MNULL); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + LEAVE(); + return ret; +} + +/** + * @brief Get the thermal reading + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +wlan_misc_ioctl_thermal(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc = MNULL; + t_u16 cmd_action = 0; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_misc_cfg)) { + PRINTM(MWARN, + "MLAN IOCTL information buffer length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_misc_cfg); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) { + PRINTM(MERROR, "Thermal reading setting is not allowed!\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } else { + cmd_action = HostCmd_ACT_GEN_GET; + } + + /* Send command to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_SNMP_MIB, + cmd_action, + Thermal_i, (t_void *)pioctl_req, MNULL); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Get/Set subscribe event + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +wlan_misc_ioctl_subscribe_evt(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc = MNULL; + t_u16 cmd_action = 0; + + ENTER(); + + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + + /* Send command to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_SUBSCRIBE_EVENT, + cmd_action, + 0, + (t_void *)pioctl_req, + &misc->param.subscribe_event); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set ARP filter based on IP address + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * @param ipv4_addr ipv4 Address + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_ipaddr_arp_filter(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req, IN t_u32 ipv4_addr) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_callbacks pcb = &pmadapter->callbacks; + t_u8 *buf; + arpfilter_header *arpfilter = MNULL; + filter_entry *entry = MNULL; + t_u32 len; + + ENTER(); + + pcb->moal_malloc(pmadapter->pmoal_handle, MRVDRV_SIZE_OF_CMD_BUFFER, + MLAN_MEM_DEF, &buf); + if (!buf) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Construct the ARP filter TLV */ + arpfilter = (arpfilter_header *)buf; + arpfilter->type = wlan_cpu_to_le16(TLV_TYPE_ARP_FILTER); + + if (ipv4_addr) { + arpfilter->len = wlan_cpu_to_le16(sizeof(filter_entry) * 3); + entry = (filter_entry *)(buf + sizeof(arpfilter_header)); + entry->addr_type = wlan_cpu_to_le16(ADDR_TYPE_BROADCAST); + entry->eth_type = wlan_cpu_to_le16(ETHER_TYPE_ARP); + entry->ipv4_addr = wlan_cpu_to_le32(ipv4_addr); + entry++; + entry->addr_type = wlan_cpu_to_le16(ADDR_TYPE_UNICAST); + entry->eth_type = wlan_cpu_to_le16(ETHER_TYPE_ANY); + entry->ipv4_addr = wlan_cpu_to_le32(IPV4_ADDR_ANY); + entry++; + entry->addr_type = wlan_cpu_to_le16(ADDR_TYPE_MULTICAST); + entry->eth_type = wlan_cpu_to_le16(ETHER_TYPE_ANY); + entry->ipv4_addr = wlan_cpu_to_le32(IPV4_ADDR_ANY); + } else + arpfilter->len = 0; + + /* Update the total length */ + len = sizeof(arpfilter_header) + wlan_le16_to_cpu(arpfilter->len); + + memset(pmadapter, pmadapter->arp_filter, 0, + sizeof(pmadapter->arp_filter)); + if (len > ARP_FILTER_MAX_BUF_SIZE) { + pmadapter->arp_filter_size = 0; + PRINTM(MERROR, "Invalid ARP Filter Size\n"); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + } else if (len <= sizeof(MrvlIEtypesHeader_t)) { + pmadapter->arp_filter_size = 0; + PRINTM(MINFO, "Clear ARP filter\n"); + } else { + memcpy(pmadapter, pmadapter->arp_filter, buf, len); + pmadapter->arp_filter_size = len; + HEXDUMP("ArpFilter", pmadapter->arp_filter, + pmadapter->arp_filter_size); + } + +done: + if (buf) + pcb->moal_mfree(pmadapter->pmoal_handle, buf); + LEAVE(); + return ret; +} + +#define FLTR_BUF_IP_OFFSET 24 +#define FLTR_BUF_IP_OFFSET_2_IP_1 9 +#define FLTR_BUF_IP_OFFSET_2_IP_2 26 + +/** + * @brief Enable/Disable Auto ARP resonse + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * @param ipv4_addr ipv4 Address + * @param num_ipv4 Number of ipv4 Addresses + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_ipaddr_auto_arp_resp(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req, + IN t_u32 *ipv4_addr, IN t_u8 num_ipv4) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + HostCmd_DS_GEN *hostcmd_hdr; + HostCmd_DS_MEF_CFG *mefcmd; + pmlan_callbacks pcb = &pmadapter->callbacks; + mlan_ds_misc_cmd *hostcmd; + t_u32 buf_len = 0; + t_u8 *buf, *filter; + + t_u8 fltr_buf[] = { 0x01, 0x10, 0x21, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x08, 0x06, 0x02, 0x02, 0x14, 0x00, 0x00, + 0x00, 0x01, 0x41, 0x01, 0x00, 0x00, 0x00, 0x01, + 0xc0, 0xa8, 0x01, 0x6d, 0x04, 0x02, 0x2e, 0x00, + 0x00, 0x00, 0x01, 0x41, 0x44 + }; + t_u8 fltr_buf_2_ip[] = { 0x01, 0x10, 0x33, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0xc0, 0xa8, 0x01, 0x6d, 0x04, 0x02, 0x2e, + 0x00, 0x00, 0x00, 0x01, 0x41, 0x01, 0x00, 0x00, + 0x00, 0x01, 0xc0, 0xa8, 0x02, 0x6d, 0x04, 0x02, + 0x2e, 0x00, 0x00, 0x00, 0x01, 0x41, 0x45, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x08, 0x06, 0x02, 0x02, + 0x14, 0x00, 0x00, 0x00, 0x01, 0x41, 0x44 + }; + + ENTER(); + + ret = pcb->moal_malloc(pmadapter->pmoal_handle, + sizeof(mlan_ds_misc_cmd), + MLAN_MEM_DEF, (t_u8 **)&hostcmd); + + if (ret != MLAN_STATUS_SUCCESS || hostcmd == MNULL) { + PRINTM(MERROR, "Failed to allocate hostcmd buffer\n"); + pioctl_req->status_code = MLAN_ERROR_NO_MEM; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + memset(pmpriv->adapter, hostcmd, 0, sizeof(mlan_ds_misc_cmd)); + buf = hostcmd->cmd; + + /* Prepare hostcmd buffer */ + hostcmd_hdr = (HostCmd_DS_GEN *)(buf); + hostcmd_hdr->command = wlan_cpu_to_le16(HostCmd_CMD_MEF_CFG); + mefcmd = (HostCmd_DS_MEF_CFG *)(buf + S_DS_GEN); + buf_len = S_DS_GEN; + + if (!ipv4_addr) { + PRINTM(MINFO, "Disable Auto ARP Response\n"); + mefcmd->criteria = wlan_cpu_to_le32(0); + mefcmd->nentries = wlan_cpu_to_le16(0); + buf_len += sizeof(HostCmd_DS_MEF_CFG); + } else { + /* Event bit (bit2) of HS conditions should be masked out */ + mefcmd->criteria = + wlan_cpu_to_le32(pmpriv->adapter->hs_cfg. + conditions & ~MBIT(2)); + mefcmd->nentries = wlan_cpu_to_le16(1); + buf_len += sizeof(HostCmd_DS_MEF_CFG); + filter = buf + buf_len; + if (num_ipv4 == 1) { + memcpy(pmpriv->adapter, filter, fltr_buf, + sizeof(fltr_buf)); + memcpy(pmpriv->adapter, &filter[FLTR_BUF_IP_OFFSET], + &ipv4_addr[0], sizeof(t_u32)); + buf_len += sizeof(fltr_buf); + } else if (num_ipv4 >= 2) { + memcpy(pmpriv->adapter, filter, fltr_buf_2_ip, + sizeof(fltr_buf_2_ip)); + memcpy(pmpriv->adapter, + &filter[FLTR_BUF_IP_OFFSET_2_IP_1], + &ipv4_addr[0], sizeof(t_u32)); + memcpy(pmpriv->adapter, + &filter[FLTR_BUF_IP_OFFSET_2_IP_2], + &ipv4_addr[1], sizeof(t_u32)); + buf_len += sizeof(fltr_buf_2_ip); + } + } + hostcmd_hdr->size = wlan_cpu_to_le16(buf_len); + hostcmd->len = buf_len; + + /* Send command to firmware */ + ret = wlan_prepare_cmd(pmpriv, + 0, + 0, 0, (t_void *)pioctl_req, (t_void *)hostcmd); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)hostcmd); + + LEAVE(); + return ret; +} + +/** + * @brief MEF configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_misc_ioctl_mef_cfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_misc_mef_cfg *mef_cfg = + &((mlan_ds_misc_cfg *)pioctl_req->pbuf)->param.mef_cfg; + pmlan_callbacks pcb = &pmadapter->callbacks; + HostCmd_DS_GEN *hostcmd_hdr; + HostCmd_DS_MEF_CFG *mefcmd; + mlan_ds_misc_cmd *hostcmd = MNULL; + t_u32 buf_len = 0; + t_u8 *buf, *filter; + t_u8 fltr_buf[] = { 0x02, 0x00, 0x2f, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x00, 0x5e, 0x03, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x41, 0x06, 0x00, 0x00, 0x00, + 0x01, 0xff, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x41, 0x45, 0x01, 0x00, 0x00, 0x00, 0x01, + 0x33, 0x33, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x41, 0x45 + }; + + ENTER(); + + /* GET operation */ + if (pioctl_req->action == MLAN_ACT_GET) { + /* TODO: need to store for get operation */ + goto done; + } + + ret = pcb->moal_malloc(pmadapter->pmoal_handle, + sizeof(mlan_ds_misc_cmd), + MLAN_MEM_DEF, (t_u8 **)&hostcmd); + + if (ret != MLAN_STATUS_SUCCESS || hostcmd == MNULL) { + PRINTM(MERROR, "Failed to allocate hostcmd buffer\n"); + pioctl_req->status_code = MLAN_ERROR_NO_MEM; + ret = MLAN_STATUS_FAILURE; + goto done; + } + + memset(pmpriv->adapter, hostcmd, 0, sizeof(mlan_ds_misc_cmd)); + buf = hostcmd->cmd; + + /* Prepare hostcmd buffer */ + hostcmd_hdr = (HostCmd_DS_GEN *)(buf); + hostcmd_hdr->command = wlan_cpu_to_le16(HostCmd_CMD_MEF_CFG); + mefcmd = (HostCmd_DS_MEF_CFG *)(buf + S_DS_GEN); + buf_len = S_DS_GEN; + + switch (mef_cfg->sub_id) { + case MEF_CFG_DISABLE: + PRINTM(MINFO, "Disable MEF\n"); + mefcmd->criteria = wlan_cpu_to_le32(0); + mefcmd->nentries = wlan_cpu_to_le16(0); + buf_len += sizeof(HostCmd_DS_MEF_CFG); + break; + case MEF_CFG_RX_FILTER_ENABLE: + PRINTM(MINFO, "Enable Rx filter\n"); + mefcmd->criteria = wlan_cpu_to_le32((MBIT(3) | MBIT(0))); + mefcmd->nentries = wlan_cpu_to_le16(1); + buf_len += sizeof(HostCmd_DS_MEF_CFG); + filter = buf + buf_len; + memcpy(pmpriv->adapter, filter, fltr_buf, sizeof(fltr_buf)); + buf_len += sizeof(fltr_buf); + break; + case MEF_CFG_AUTO_ARP_RESP: + PRINTM(MINFO, "Enable auto ARP response\n"); + /* TODO */ + break; + case MEF_CFG_HOSTCMD: + PRINTM(MINFO, "MEF hostcmd from MOAL\n"); + filter = buf + buf_len; + memcpy(pmpriv->adapter, filter, mef_cfg->param.cmd_buf.cmd, + mef_cfg->param.cmd_buf.len); + buf_len += mef_cfg->param.cmd_buf.len; + break; + default: + PRINTM(MERROR, "Invalid sub ID parameter\n"); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto done; + break; + } + hostcmd_hdr->size = wlan_cpu_to_le16(buf_len); + hostcmd->len = buf_len; + + /* Send command to firmware */ + ret = wlan_prepare_cmd(pmpriv, + 0, + 0, 0, (t_void *)pioctl_req, (t_void *)hostcmd); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + +done: + if (hostcmd) + pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)hostcmd); + + LEAVE(); + return ret; +} + +/** + * @brief ipaddr configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_misc_ioctl_ipaddr_cfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u32 ipv4_addr[MAX_IPADDR]; + int i = 0; + + ENTER(); + + /* GET operation */ + if (pioctl_req->action == MLAN_ACT_GET) { + memcpy(pmadapter, misc->param.ipaddr_cfg.ip_addr, + pmpriv->ip_addr, IPADDR_LEN); + misc->param.ipaddr_cfg.op_code = pmpriv->op_code; + goto done; + } + /* only one IP is supported in current firmware */ + for (i = 0; i < misc->param.ipaddr_cfg.ip_addr_num; i++) { + memcpy(pmadapter, &ipv4_addr[i], + misc->param.ipaddr_cfg.ip_addr[i], sizeof(t_u32)); + } + + if (misc->param.ipaddr_cfg.op_code != MLAN_IPADDR_OP_IP_REMOVE && + !misc->param.ipaddr_cfg.ip_addr_num) { + PRINTM(MERROR, "Invalid IPv4 address\n"); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto done; + } + if (misc->param.ipaddr_cfg.op_code & MLAN_IPADDR_OP_ARP_FILTER) + ret = wlan_ipaddr_arp_filter(pmadapter, pioctl_req, + ipv4_addr[0]); + else if (pmpriv->op_code & MLAN_IPADDR_OP_ARP_FILTER) + ret = wlan_ipaddr_arp_filter(pmadapter, pioctl_req, 0); + if (ret == MLAN_STATUS_FAILURE) + goto done; + if (misc->param.ipaddr_cfg.op_code & MLAN_IPADDR_OP_AUTO_ARP_RESP) + ret = wlan_ipaddr_auto_arp_resp(pmadapter, pioctl_req, + ipv4_addr, + misc->param.ipaddr_cfg. + ip_addr_num); + else if (pmpriv->op_code & MLAN_IPADDR_OP_AUTO_ARP_RESP) + ret = wlan_ipaddr_auto_arp_resp(pmadapter, pioctl_req, MNULL, + 0); + if (ret == MLAN_STATUS_FAILURE) + goto done; + + /* Save the values in MLAN */ + if (pioctl_req->action == MLAN_ACT_SET) { + pmpriv->op_code = misc->param.ipaddr_cfg.op_code; + memcpy(pmadapter, pmpriv->ip_addr, + misc->param.ipaddr_cfg.ip_addr, IPADDR_LEN); + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief CFP code configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_misc_ioctl_cfp_code_cfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_misc_cfg *misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + mlan_ds_misc_cfp_code *cfp_code = MNULL; + t_u32 region_bg = 0; + t_u32 region_a = 0; + int i; + + ENTER(); + + cfp_code = &misc->param.cfp_code; + if (pioctl_req->action == MLAN_ACT_SET) { + /* Save the values in MLAN */ + if (!cfp_code->cfp_code_bg) + cfp_code->cfp_code_bg = pmadapter->cfp_code_bg; + for (i = 0; i < MRVDRV_MAX_REGION_CODE; i++) { + /* Use the region code to search for the index */ + if (cfp_code->cfp_code_bg == region_code_index[i]) { + region_bg = cfp_code->cfp_code_bg; + break; + } + } + if (!cfp_code->cfp_code_a) + cfp_code->cfp_code_a = pmadapter->cfp_code_a; + for (i = 0; i < MRVDRV_MAX_REGION_CODE; i++) { + /* Use the region code to search for the index */ + if (cfp_code->cfp_code_a == region_code_index[i]) { + region_a = cfp_code->cfp_code_a; + break; + } + } + if (!region_a) { + for (i = 0; i < MRVDRV_MAX_CFP_CODE_A; i++) { + /* Use the CFP code to search for the index */ + if (cfp_code->cfp_code_a == cfp_code_index_a[i]) + break; + } + if (i >= MRVDRV_MAX_CFP_CODE_A) { + PRINTM(MERROR, + "CFP Code not identified for A\n"); + pioctl_req->status_code = + MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto done; + } + } + pmadapter->cfp_code_bg = (t_u8)cfp_code->cfp_code_bg; + pmadapter->cfp_code_a = (t_u8)cfp_code->cfp_code_a; + if (region_bg && region_a && (region_bg == region_a)) + pmadapter->region_code = pmadapter->cfp_code_a; + else + pmadapter->region_code = 0; + if (wlan_set_regiontable(pmpriv, (t_u8)pmadapter->region_code, + pmadapter->config_bands | pmadapter-> + adhoc_start_band)) { + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto done; + } + } else { + /* GET operation */ + cfp_code->cfp_code_bg = pmadapter->cfp_code_bg; + cfp_code->cfp_code_a = pmadapter->cfp_code_a; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief This function sets up country code and downloads CMD to FW + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req Pointer to the IOCTL request buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_misc_ioctl_country_code(IN pmlan_adapter pmadapter, + IN mlan_ioctl_req *pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_misc_country_code *country_code = MNULL; + mlan_ds_misc_cfg *cfg_misc = MNULL; + t_u8 cfp_bg = 0, cfp_a = 0; + + ENTER(); + + cfg_misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + country_code = &cfg_misc->param.country_code; + + if (pioctl_req->action == MLAN_ACT_SET) { + /* Update region code and table based on country code */ + if (wlan_misc_country_2_cfp_table_code(pmadapter, + country_code-> + country_code, &cfp_bg, + &cfp_a)) { + PRINTM(MERROR, "Country code not found!\n"); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto done; + } + pmadapter->cfp_code_bg = cfp_bg; + pmadapter->cfp_code_a = cfp_a; + if (cfp_bg && cfp_a && (cfp_bg == cfp_a)) + pmadapter->region_code = cfp_a; + else + pmadapter->region_code = 0; + if (wlan_set_regiontable(pmpriv, pmadapter->region_code, + pmadapter->config_bands | pmadapter-> + adhoc_start_band)) { + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + ret = MLAN_STATUS_FAILURE; + goto done; + } + memcpy(pmadapter, pmadapter->country_code, + country_code->country_code, COUNTRY_CODE_LEN); + } else { + /* GET operation */ + memcpy(pmadapter, country_code->country_code, + pmadapter->country_code, COUNTRY_CODE_LEN); + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Configure MFPC and MFPR for management frame protection + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req Pointer to the IOCTL request buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_misc_pmfcfg(IN pmlan_adapter pmadapter, IN mlan_ioctl_req *pioctl_req) +{ + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *cfg_misc = MNULL; + mlan_ds_misc_pmfcfg *pmfcfg; + + cfg_misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + pmfcfg = &cfg_misc->param.pmfcfg; + + if (pioctl_req->action == MLAN_ACT_SET) { + pmpriv->pmfcfg.mfpc = pmfcfg->mfpc; + pmpriv->pmfcfg.mfpr = pmfcfg->mfpr; + } else { + /* GET operation */ + pmfcfg->mfpc = pmpriv->pmfcfg.mfpc; + pmfcfg->mfpr = pmpriv->pmfcfg.mfpr; + } + + LEAVE(); + return ret; +} + +/** + * @brief Miscellaneous configuration handler + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_misc_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc = MNULL; + + ENTER(); + + if ((pioctl_req == MNULL) || (pioctl_req->pbuf == MNULL)) { + PRINTM(MERROR, "Request buffer not found!\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + if (pioctl_req->buf_len < sizeof(mlan_ds_misc_cfg)) { + PRINTM(MWARN, "MLAN bss IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_misc_cfg); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + switch (misc->sub_command) { + case MLAN_OID_MISC_GEN_IE: + status = wlan_misc_ioctl_gen_ie(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_REGION: + status = wlan_misc_ioctl_region(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_WARM_RESET: + status = wlan_misc_ioctl_warm_reset(pmadapter, pioctl_req); + break; +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + case MLAN_OID_MISC_SDIO_MPA_CTRL: + status = wlan_misc_ioctl_sdio_mpa_ctrl(pmadapter, pioctl_req); + break; +#endif + case MLAN_OID_MISC_HOST_CMD: + status = wlan_misc_ioctl_host_cmd(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_SYS_CLOCK: + status = wlan_misc_ioctl_sysclock(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_WWS: + status = wlan_misc_ioctl_wws_cfg(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_ASSOC_RSP: + status = wlan_misc_ioctl_get_assoc_rsp(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_INIT_SHUTDOWN: + status = wlan_misc_ioctl_init_shutdown(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_SOFT_RESET: + status = wlan_misc_ioctl_soft_reset(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_COALESCING_STATUS: + status = wlan_misc_ioctl_coalescing_status(pmadapter, + pioctl_req); + break; + case MLAN_OID_MISC_CUSTOM_IE: + status = wlan_misc_ioctl_custom_ie_list(pmadapter, pioctl_req, + MTRUE); + break; + case MLAN_OID_MISC_TDLS_CONFIG: + status = wlan_misc_ioctl_tdls_config(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_TDLS_OPER: + status = wlan_misc_ioctl_tdls_oper(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_GET_TDLS_IES: + status = wlan_misc_ioctl_tdls_get_ies(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_TDLS_IDLE_TIME: + status = wlan_misc_ioctl_tdls_idle_time(pmadapter, pioctl_req); + break; + + case MLAN_OID_MISC_MAC_CONTROL: + status = wlan_misc_ioctl_mac_control(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_MEF_CFG: + status = wlan_misc_ioctl_mef_cfg(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_RX_MGMT_IND: + status = wlan_reg_rx_mgmt_ind(pmadapter, pioctl_req); + break; +#ifdef DEBUG_LEVEL1 + case MLAN_OID_MISC_DRVDBG: + status = wlan_set_drvdbg(pmadapter, pioctl_req); + break; +#endif + case MLAN_OID_MISC_IP_ADDR: + status = wlan_misc_ioctl_ipaddr_cfg(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_CFP_CODE: + status = wlan_misc_ioctl_cfp_code_cfg(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_COUNTRY_CODE: + status = wlan_misc_ioctl_country_code(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_THERMAL: + status = wlan_misc_ioctl_thermal(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_SUBSCRIBE_EVENT: + status = wlan_misc_ioctl_subscribe_evt(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_HOTSPOT_CFG: + status = wlan_misc_hotspot_cfg(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_OTP_USER_DATA: + status = wlan_misc_otp_user_data(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_TXCONTROL: + status = wlan_misc_ioctl_txcontrol(pmadapter, pioctl_req); + break; +#ifdef STA_SUPPORT + case MLAN_OID_MISC_EXT_CAP_CFG: + status = wlan_misc_ext_capa_cfg(pmadapter, pioctl_req); + break; +#endif + case MLAN_OID_MISC_PMFCFG: + status = wlan_misc_pmfcfg(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_MULTI_CHAN_CFG: + status = wlan_misc_ioctl_multi_chan_config(pmadapter, + pioctl_req); + break; + case MLAN_OID_MISC_MULTI_CHAN_POLICY: + status = wlan_misc_ioctl_multi_chan_policy(pmadapter, + pioctl_req); + break; +#ifdef RX_PACKET_COALESCE + case MLAN_OID_MISC_RX_PACKET_COALESCE: + status = wlan_misc_ioctl_rx_pkt_coalesce_config(pmadapter, + pioctl_req); + break; +#endif + case MLAN_OID_MISC_LOW_PWR_MODE: + status = wlan_misc_ioctl_low_pwr_mode(pmadapter, pioctl_req); + break; + case MLAN_OID_MISC_COALESCE_CFG: + status = wlan_misc_ioctl_coalesce_cfg(pmadapter, pioctl_req); + break; + default: + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + LEAVE(); + return status; +} + +/** + * @brief Set/Get scan configuration parameter + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * @param action Set/Get + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_set_get_scan_cfg(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req, IN t_u32 action) +{ + mlan_ds_scan *scan = MNULL; + + ENTER(); + + scan = (mlan_ds_scan *)pioctl_req->pbuf; + if (action == MLAN_ACT_GET) { + scan->param.scan_cfg.scan_type = (t_u32)pmadapter->scan_type; + scan->param.scan_cfg.scan_mode = pmadapter->scan_mode; + scan->param.scan_cfg.scan_probe = (t_u32)pmadapter->scan_probes; + scan->param.scan_cfg.scan_time.specific_scan_time = + (t_u32)pmadapter->specific_scan_time; + scan->param.scan_cfg.scan_time.active_scan_time = + (t_u32)pmadapter->active_scan_time; + scan->param.scan_cfg.scan_time.passive_scan_time = + (t_u32)pmadapter->passive_scan_time; + scan->param.scan_cfg.ext_scan = pmadapter->ext_scan; + } else { + if (scan->param.scan_cfg.scan_type) + pmadapter->scan_type = + (t_u8)scan->param.scan_cfg.scan_type; + if (scan->param.scan_cfg.scan_mode) + pmadapter->scan_mode = scan->param.scan_cfg.scan_mode; + if (scan->param.scan_cfg.scan_probe) + pmadapter->scan_probes = + (t_u16)scan->param.scan_cfg.scan_probe; + if (scan->param.scan_cfg.scan_time.specific_scan_time) + pmadapter->specific_scan_time = + (t_u16)scan->param.scan_cfg.scan_time. + specific_scan_time; + if (scan->param.scan_cfg.scan_time.active_scan_time) + pmadapter->active_scan_time = + (t_u16)scan->param.scan_cfg.scan_time. + active_scan_time; + if (scan->param.scan_cfg.scan_time.passive_scan_time) + pmadapter->passive_scan_time = + (t_u16)scan->param.scan_cfg.scan_time. + passive_scan_time; + pmadapter->ext_scan = scan->param.scan_cfg.ext_scan; + } + pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Set/Get scan + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_scan_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_ds_scan *pscan; + + ENTER(); + + pscan = (mlan_ds_scan *)pioctl_req->pbuf; + if (pscan->sub_command == MLAN_OID_SCAN_CONFIG + || pscan->sub_command == MLAN_OID_SCAN_BGSCAN_CONFIG) + goto start_config; + if (pmadapter->scan_processing && pioctl_req->action == MLAN_ACT_SET && + pscan->sub_command != MLAN_OID_SCAN_CANCEL) { + PRINTM(MINFO, "Scan already in process...\n"); + LEAVE(); + return status; + } + + if (pmadapter->scan_block && pioctl_req->action == MLAN_ACT_SET) { + PRINTM(MINFO, "Scan is blocked during association...\n"); + if ((pscan->sub_command == MLAN_OID_SCAN_NORMAL) || + (pscan->sub_command == MLAN_OID_SCAN_SPECIFIC_SSID) || + (pscan->sub_command == MLAN_OID_SCAN_USER_CONFIG)) + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_SCAN_REPORT, + MNULL); + LEAVE(); + return status; + } +start_config: + /* Set scan */ + if (pioctl_req->action == MLAN_ACT_SET) { + + switch (pscan->sub_command) { + case MLAN_OID_SCAN_NORMAL: + status = wlan_scan_networks(pmpriv, pioctl_req, MNULL); + break; + case MLAN_OID_SCAN_SPECIFIC_SSID: + status = wlan_scan_specific_ssid(pmpriv, pioctl_req, + &pscan->param.scan_req. + scan_ssid); + break; + case MLAN_OID_SCAN_USER_CONFIG: + status = wlan_scan_networks(pmpriv, pioctl_req, + (wlan_user_scan_cfg *) + pscan->param.user_scan. + scan_cfg_buf); + break; + case MLAN_OID_SCAN_CONFIG: + status = wlan_set_get_scan_cfg(pmadapter, + pioctl_req, + MLAN_ACT_SET); + break; + case MLAN_OID_SCAN_CANCEL: + wlan_cancel_pending_scan_cmd(pmadapter); + break; + case MLAN_OID_SCAN_TABLE_FLUSH: + status = wlan_flush_scan_table(pmadapter); + break; + case MLAN_OID_SCAN_BGSCAN_CONFIG: + /* Send request to firmware */ + status = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_BG_SCAN_CONFIG, + HostCmd_ACT_GEN_SET, + 0, + (t_void *)pioctl_req, + pscan->param.user_scan. + scan_cfg_buf); + break; + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + + if ((status == MLAN_STATUS_SUCCESS) && + (pscan->sub_command != MLAN_OID_SCAN_TABLE_FLUSH) && + (pscan->sub_command != MLAN_OID_SCAN_CANCEL) && + (pscan->sub_command != MLAN_OID_SCAN_CONFIG)) { + PRINTM(MINFO, + "wlan_scan_ioctl: return MLAN_STATUS_PENDING\n"); + status = MLAN_STATUS_PENDING; + } + } + /* Get scan */ + else { + if (pscan->sub_command == MLAN_OID_SCAN_CONFIG) { + status = wlan_set_get_scan_cfg(pmadapter, pioctl_req, + MLAN_ACT_GET); + } else if (pscan->sub_command == MLAN_OID_SCAN_GET_CURRENT_BSS) { + pscan->param.scan_resp.num_in_scan_table = + pmadapter->num_in_scan_table; + pscan->param.scan_resp.pscan_table = + (t_u8 *)&pmpriv->curr_bss_params.bss_descriptor; + pioctl_req->data_read_written = + sizeof(mlan_scan_resp) + MLAN_SUB_COMMAND_SIZE; + } else { + if (pmadapter->bgscan_reported) { + pmadapter->bgscan_reported = MFALSE; + /* Clear the previous scan result */ + memset(pmadapter, pmadapter->pscan_table, 0x00, + sizeof(BSSDescriptor_t) * + MRVDRV_MAX_BSSID_LIST); + pmadapter->num_in_scan_table = 0; + pmadapter->pbcn_buf_end = pmadapter->bcn_buf; + status = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_BG_SCAN_QUERY, + HostCmd_ACT_GEN_GET, + 0, + (t_void *)pioctl_req, + MNULL); + if (status == MLAN_STATUS_SUCCESS) { + PRINTM(MINFO, + "wlan_scan_ioctl: return MLAN_STATUS_PENDING\n"); + status = MLAN_STATUS_PENDING; + } + } else { + pscan->param.scan_resp.pscan_table = + (t_u8 *)pmadapter->pscan_table; + pscan->param.scan_resp.num_in_scan_table = + pmadapter->num_in_scan_table; + pscan->param.scan_resp.age_in_secs = + pmadapter->age_in_secs; + pioctl_req->data_read_written = + sizeof(mlan_scan_resp) + + MLAN_SUB_COMMAND_SIZE; + pscan->param.scan_resp.pchan_stats = + (t_u8 *)pmadapter->pchan_stats; + pscan->param.scan_resp.num_in_chan_stats = + pmadapter->num_in_chan_stats; + } + } + } + + LEAVE(); + return status; +} + +/******************************************************** + Global Functions +********************************************************/ + +/** + * @brief Set ewpa mode + * + * @param priv A pointer to mlan_private structure + * @param psec_pp A pointer to mlan_ds_passphrase structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_set_ewpa_mode(mlan_private *priv, mlan_ds_passphrase *psec_pp) +{ + ENTER(); + + if ((psec_pp->psk_type == MLAN_PSK_PASSPHRASE && + psec_pp->psk.passphrase.passphrase_len > 0) || + (psec_pp->psk_type == MLAN_PSK_PMK)) + priv->sec_info.ewpa_enabled = MTRUE; + else + priv->sec_info.ewpa_enabled = MFALSE; + + PRINTM(MINFO, "Set ewpa mode = %d\n", priv->sec_info.ewpa_enabled); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Search for a BSS + * + * @param pmpriv A pointer to mlan_private structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +mlan_status +wlan_find_bss(mlan_private *pmpriv, pmlan_ioctl_req pioctl_req) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + mlan_ds_bss *bss = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u8 zero_mac[] = { 0, 0, 0, 0, 0, 0 }; + t_u8 mac[MLAN_MAC_ADDR_LENGTH]; + int i = 0; + BSSDescriptor_t *pbss_desc; + + ENTER(); + + bss = (mlan_ds_bss *)pioctl_req->pbuf; + + if (memcmp + (pmadapter, &bss->param.ssid_bssid.bssid, zero_mac, + sizeof(zero_mac))) { + if (bss->param.ssid_bssid.ssid.ssid_len) /* ssid & bssid + */ + i = wlan_find_ssid_in_list(pmpriv, + &bss->param.ssid_bssid.ssid, + (t_u8 *)&bss->param. + ssid_bssid.bssid, + pmpriv->bss_mode); + else + i = wlan_find_bssid_in_list(pmpriv, + (t_u8 *)&bss->param. + ssid_bssid.bssid, + pmpriv->bss_mode); + if (i < 0) { + memcpy(pmadapter, mac, &bss->param.ssid_bssid.bssid, + sizeof(mac)); + PRINTM(MIOCTL, "Can not find bssid " MACSTR "\n", + MAC2STR(mac)); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + pbss_desc = &pmadapter->pscan_table[i]; + memcpy(pmadapter, &bss->param.ssid_bssid.ssid, &pbss_desc->ssid, + sizeof(mlan_802_11_ssid)); + bss->param.ssid_bssid.rssi = pbss_desc->rssi; + bss->param.ssid_bssid.channel = (t_u16)pbss_desc->channel; + if (pbss_desc->pmd_ie) { + bss->param.ssid_bssid.ft_md = pbss_desc->pmd_ie->mdid; + bss->param.ssid_bssid.ft_cap = + pbss_desc->pmd_ie->ft_cap; + } + /* index in bss list,start from 1 */ + bss->param.ssid_bssid.idx = i + 1; + } else if (bss->param.ssid_bssid.ssid.ssid_len) { + i = wlan_find_ssid_in_list(pmpriv, &bss->param.ssid_bssid.ssid, + MNULL, pmpriv->bss_mode); + if (i < 0) { + PRINTM(MIOCTL, "Can not find ssid %s\n", + bss->param.ssid_bssid.ssid.ssid); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + pbss_desc = &pmadapter->pscan_table[i]; + memcpy(pmadapter, (t_u8 *)&bss->param.ssid_bssid.bssid, + (t_u8 *)&pbss_desc->mac_address, MLAN_MAC_ADDR_LENGTH); + bss->param.ssid_bssid.rssi = pbss_desc->rssi; + bss->param.ssid_bssid.channel = (t_u16)pbss_desc->channel; + if (pbss_desc->pmd_ie) { + bss->param.ssid_bssid.ft_md = pbss_desc->pmd_ie->mdid; + bss->param.ssid_bssid.ft_cap = + pbss_desc->pmd_ie->ft_cap; + } + /* index in bss list, start from 1 */ + bss->param.ssid_bssid.idx = i + 1; + } else { + ret = wlan_find_best_network(pmpriv, &bss->param.ssid_bssid); + } + + LEAVE(); + return ret; +} + +/** + * @brief MLAN station ioctl handler + * + * @param adapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +wlan_ops_sta_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req) +{ + pmlan_adapter pmadapter = (pmlan_adapter)adapter; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + switch (pioctl_req->req_id) { + case MLAN_IOCTL_SCAN: + status = wlan_scan_ioctl(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_BSS: + status = wlan_bss_ioctl(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_RADIO_CFG: + status = wlan_radio_ioctl(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_SNMP_MIB: + status = wlan_snmp_mib_ioctl(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_GET_INFO: + status = wlan_get_info_ioctl(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_SEC_CFG: + status = wlan_sec_cfg_ioctl(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_RATE: + status = wlan_rate_ioctl(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_POWER_CFG: + status = wlan_power_ioctl(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_PM_CFG: + status = wlan_pm_ioctl(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_WMM_CFG: + status = wlan_wmm_cfg_ioctl(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_WPS_CFG: + status = wlan_wps_cfg_ioctl(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_11N_CFG: + status = wlan_11n_cfg_ioctl(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_11D_CFG: + status = wlan_11d_cfg_ioctl(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_REG_MEM: + status = wlan_reg_mem_ioctl(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_MISC_CFG: + status = wlan_misc_cfg_ioctl(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_11H_CFG: + status = wlan_11h_cfg_ioctl(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_11AC_CFG: + status = wlan_11ac_cfg_ioctl(pmadapter, pioctl_req); + break; + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + LEAVE(); + return status; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sta_rx.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sta_rx.c new file mode 100644 index 00000000..b1602bf6 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sta_rx.c @@ -0,0 +1,629 @@ +/** @file mlan_sta_rx.c + * + * @brief This file contains the handling of RX in MLAN + * module. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/******************************************************** +Change log: + 10/27/2008: initial version +********************************************************/ + +#include "mlan.h" +#include "mlan_join.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_11n_aggr.h" +#include "mlan_11n_rxreorder.h" + +/******************************************************** + Local Variables +********************************************************/ + +/** Ethernet II header */ +typedef struct { + /** Ethernet II header destination address */ + t_u8 dest_addr[MLAN_MAC_ADDR_LENGTH]; + /** Ethernet II header source address */ + t_u8 src_addr[MLAN_MAC_ADDR_LENGTH]; + /** Ethernet II header length */ + t_u16 ethertype; + +} EthII_Hdr_t; + +/** IPv4 ARP request header */ +typedef MLAN_PACK_START struct { + /** Hardware type */ + t_u16 Htype; + /** Protocol type */ + t_u16 Ptype; + /** Hardware address length */ + t_u8 addr_len; + /** Protocol address length */ + t_u8 proto_len; + /** Operation code */ + t_u16 op_code; + /** Source mac address */ + t_u8 src_mac[MLAN_MAC_ADDR_LENGTH]; + /** Sender IP address */ + t_u8 src_ip[4]; + /** Destination mac address */ + t_u8 dst_mac[MLAN_MAC_ADDR_LENGTH]; + /** Destination IP address */ + t_u8 dst_ip[4]; +} MLAN_PACK_END IPv4_ARP_t; + +/** IPv6 Nadv packet header */ +typedef MLAN_PACK_START struct { + /** IP protocol version */ + t_u8 version; + /** flow label */ + t_u8 flow_lab[3]; + /** Payload length */ + t_u16 payload_len; + /** Next header type */ + t_u8 next_hdr; + /** Hot limit */ + t_u8 hop_limit; + /** Source address */ + t_u8 src_addr[16]; + /** Destination address */ + t_u8 dst_addr[16]; + /** ICMP type */ + t_u8 icmp_type; + /** IPv6 Code */ + t_u8 ipv6_code; + /** IPv6 Checksum */ + t_u16 ipv6_checksum; + /** Flags */ + t_u32 flags; + /** Target address */ + t_u8 taget_addr[16]; + /** Reserved */ + t_u8 rev[8]; +} MLAN_PACK_END IPv6_Nadv_t; + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ + +/******************************************************** + Global functions +********************************************************/ +/** + * @brief This function check and discard IPv4 and IPv6 gratuitous broadcast packets + * + * @param prx_pkt A pointer to RxPacketHdr_t structure of received packet + * @param pmadapter A pointer to pmlan_adapter structure + * @return TRUE if found such type of packets, FALSE not found + */ +static t_u8 +discard_gratuitous_ARP_msg(RxPacketHdr_t *prx_pkt, pmlan_adapter pmadapter) +{ + t_u8 proto_ARP_type[] = { 0x08, 0x06 }; + t_u8 proto_ARP_type_v6[] = { 0x86, 0xDD }; + IPv4_ARP_t *parp_hdr; + IPv6_Nadv_t *pNadv_hdr; + t_u8 ret = MFALSE; + + /* IPV4 pkt check * A gratuitous ARP is an ARP packet * where the + source and destination IP are both set to * the IP of the machine + issuing the packet. */ + if (memcmp + (pmadapter, proto_ARP_type, &prx_pkt->eth803_hdr.h803_len, + sizeof(proto_ARP_type)) == 0) { + parp_hdr = (IPv4_ARP_t *)(&prx_pkt->rfc1042_hdr); + /* Graguitous ARP can be ARP request or ARP reply */ + if ((parp_hdr->op_code == mlan_htons(0x01)) || + (parp_hdr->op_code == mlan_htons(0x02))) + if (memcmp + (pmadapter, parp_hdr->src_ip, parp_hdr->dst_ip, + 4) == 0) + ret = MTRUE; + } + + /* IPV6 pkt check * An unsolicited Neighbor Advertisement pkt is * + marked by a cleared Solicited Flag */ + if (memcmp + (pmadapter, proto_ARP_type_v6, &prx_pkt->eth803_hdr.h803_len, + sizeof(proto_ARP_type_v6)) == 0) { + pNadv_hdr = (IPv6_Nadv_t *)(&prx_pkt->rfc1042_hdr); + /* Check Nadv type: next header is ICMPv6 and icmp type is Nadv + */ + if (pNadv_hdr->next_hdr == 0x3A && pNadv_hdr->icmp_type == 0x88) + if ((pNadv_hdr->flags & mlan_htonl(0x40000000)) == 0) + ret = MTRUE; + } + + return ret; +} + +/** + * @brief This function process tdls action frame + * + * @param priv A pointer to mlan_private structure + * @param pbuf A pointer to tdls action frame buffer + * @param len len of tdls action frame buffer + * @return N/A + */ +void +wlan_process_tdls_action_frame(pmlan_private priv, t_u8 *pbuf, t_u32 len) +{ + sta_node *sta_ptr = MNULL; + t_u8 *peer; + t_u8 *pos, *end; + t_u8 action; + int ie_len = 0; + t_u8 i; + +#define TDLS_PAYLOAD_TYPE 2 +#define TDLS_CATEGORY 0x0c +#define TDLS_REQ_FIX_LEN 6 +#define TDLS_RESP_FIX_LEN 8 +#define TDLS_CONFIRM_FIX_LEN 6 + if (len < (sizeof(EthII_Hdr_t) + 3)) + return; + if (*(t_u8 *)(pbuf + sizeof(EthII_Hdr_t)) != TDLS_PAYLOAD_TYPE) + /* TDLS payload type = 2 */ + return; + if (*(t_u8 *)(pbuf + sizeof(EthII_Hdr_t) + 1) != TDLS_CATEGORY) + /* TDLS category = 0xc */ + return; + peer = pbuf + MLAN_MAC_ADDR_LENGTH; + + action = *(t_u8 *)(pbuf + sizeof(EthII_Hdr_t) + 2); + /* 2= payload type + category */ + + if (action > TDLS_SETUP_CONFIRM) { + /* just handle TDLS setup request/response/confirm */ + PRINTM(MMSG, "Recv TDLS Action: peer=" MACSTR ", action=%d\n", + MAC2STR(peer), action); + return; + } + + sta_ptr = wlan_add_station_entry(priv, peer); + if (!sta_ptr) + return; + if (action == TDLS_SETUP_REQUEST) { /* setup request */ + sta_ptr->status = TDLS_NOT_SETUP; + PRINTM(MMSG, "Recv TDLS SETUP Request: peer=" MACSTR "\n", + MAC2STR(peer)); + wlan_hold_tdls_packets(priv, peer); + if (len < (sizeof(EthII_Hdr_t) + TDLS_REQ_FIX_LEN)) + return; + pos = pbuf + sizeof(EthII_Hdr_t) + 4; + /* payload 1+ category 1 + action 1 +dialog 1 */ + sta_ptr->capability = mlan_ntohs(*(t_u16 *)pos); + ie_len = len - sizeof(EthII_Hdr_t) - TDLS_REQ_FIX_LEN; + pos += 2; + } else if (action == 1) { /* setup respons */ + PRINTM(MMSG, "Recv TDLS SETUP Response: peer=" MACSTR "\n", + MAC2STR(peer)); + if (len < (sizeof(EthII_Hdr_t) + TDLS_RESP_FIX_LEN)) + return; + pos = pbuf + sizeof(EthII_Hdr_t) + 6; + /* payload 1+ category 1 + action 1 +dialog 1 +status 2 */ + sta_ptr->capability = mlan_ntohs(*(t_u16 *)pos); + ie_len = len - sizeof(EthII_Hdr_t) - TDLS_RESP_FIX_LEN; + pos += 2; + } else { /* setup confirm */ + PRINTM(MMSG, "Recv TDLS SETUP Confirm: peer=" MACSTR "\n", + MAC2STR(peer)); + if (len < (sizeof(EthII_Hdr_t) + TDLS_CONFIRM_FIX_LEN)) + return; + pos = pbuf + sizeof(EthII_Hdr_t) + TDLS_CONFIRM_FIX_LEN; + /* payload 1+ category 1 + action 1 +dialog 1 + status 2 */ + ie_len = len - sizeof(EthII_Hdr_t) - TDLS_CONFIRM_FIX_LEN; + } + for (end = pos + ie_len; pos + 1 < end; pos += 2 + pos[1]) { + if (pos + 2 + pos[1] > end) + break; + switch (*pos) { + case SUPPORTED_RATES: + sta_ptr->rate_len = pos[1]; + for (i = 0; i < pos[1]; i++) + sta_ptr->support_rate[i] = pos[2 + i]; + break; + case EXTENDED_SUPPORTED_RATES: + for (i = 0; i < pos[1]; i++) + sta_ptr->support_rate[sta_ptr->rate_len + i] = + pos[2 + i]; + sta_ptr->rate_len += pos[1]; + break; + case HT_CAPABILITY: + memcpy(priv->adapter, (t_u8 *)&sta_ptr->HTcap, pos, + sizeof(IEEEtypes_HTCap_t)); + sta_ptr->is_11n_enabled = 1; + DBG_HEXDUMP(MDAT_D, "TDLS HT capability", + (t_u8 *)(&sta_ptr->HTcap), + MIN(sizeof(IEEEtypes_HTCap_t), + MAX_DATA_DUMP_LEN)); + break; + case HT_OPERATION: + memcpy(priv->adapter, &sta_ptr->HTInfo, pos, + sizeof(IEEEtypes_HTInfo_t)); + DBG_HEXDUMP(MDAT_D, "TDLS HT info", + (t_u8 *)(&sta_ptr->HTInfo), + MIN(sizeof(IEEEtypes_HTInfo_t), + MAX_DATA_DUMP_LEN)); + break; + case BSSCO_2040: + memcpy(priv->adapter, (t_u8 *)&sta_ptr->BSSCO_20_40, + pos, sizeof(IEEEtypes_2040BSSCo_t)); + break; + case EXT_CAPABILITY: + memcpy(priv->adapter, (t_u8 *)&sta_ptr->ExtCap, pos, + pos[1] + sizeof(IEEEtypes_Header_t)); + DBG_HEXDUMP(MDAT_D, "TDLS Extended capability", + (t_u8 *)(&sta_ptr->ExtCap), + sta_ptr->ExtCap.ieee_hdr.len + 2); + break; + case RSN_IE: + memcpy(priv->adapter, (t_u8 *)&sta_ptr->rsn_ie, pos, + pos[1] + sizeof(IEEEtypes_Header_t)); + DBG_HEXDUMP(MDAT_D, "TDLS Rsn ie ", + (t_u8 *)(&sta_ptr->rsn_ie), + pos[1] + sizeof(IEEEtypes_Header_t)); + break; + case QOS_INFO: + sta_ptr->qos_info = pos[2]; + PRINTM(MDAT_D, "TDLS qos info %x\n", sta_ptr->qos_info); + break; + case LINK_ID: + memcpy(priv->adapter, (t_u8 *)&sta_ptr->link_ie, pos, + sizeof(IEEEtypes_LinkIDElement_t)); + break; + + case VHT_CAPABILITY: + memcpy(priv->adapter, (t_u8 *)&sta_ptr->vht_cap, pos, + sizeof(IEEEtypes_VHTCap_t)); + sta_ptr->is_11ac_enabled = 1; + DBG_HEXDUMP(MDAT_D, "TDLS VHT capability", + (t_u8 *)(&sta_ptr->vht_cap), + MIN(sizeof(IEEEtypes_VHTCap_t), + MAX_DATA_DUMP_LEN)); + break; + case VHT_OPERATION: + memcpy(priv->adapter, (t_u8 *)&sta_ptr->vht_oprat, pos, + sizeof(IEEEtypes_VHTOprat_t)); + DBG_HEXDUMP(MDAT_D, "TDLS VHT Operation", + (t_u8 *)(&sta_ptr->vht_oprat), + MIN(sizeof(IEEEtypes_VHTOprat_t), + MAX_DATA_DUMP_LEN)); + break; + case AID_INFO: + memcpy(priv->adapter, (t_u8 *)&sta_ptr->aid_info, pos, + sizeof(IEEEtypes_AID_t)); + DBG_HEXDUMP(MDAT_D, "TDLS AID Info", + (t_u8 *)(&sta_ptr->aid_info), + MIN(sizeof(IEEEtypes_AID_t), + MAX_DATA_DUMP_LEN)); + break; + default: + break; + } + } + return; +} + +/** + * @brief This function processes received packet and forwards it + * to kernel/upper layer + * + * @param pmadapter A pointer to mlan_adapter + * @param pmbuf A pointer to mlan_buffer which includes the received packet + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private priv = pmadapter->priv[pmbuf->bss_index]; + RxPacketHdr_t *prx_pkt; + RxPD *prx_pd; + int hdr_chop; + EthII_Hdr_t *peth_hdr; + t_u8 rfc1042_eth_hdr[MLAN_MAC_ADDR_LENGTH] = { + 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 + }; + t_u8 snap_oui_802_h[MLAN_MAC_ADDR_LENGTH] = { + 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 + }; + t_u8 appletalk_aarp_type[2] = { 0x80, 0xf3 }; + t_u8 ipx_snap_type[2] = { 0x81, 0x37 }; + t_u8 tdls_action_type[2] = { 0x89, 0x0d }; + t_u8 adj_rx_rate = 0; + + ENTER(); + + prx_pd = (RxPD *)(pmbuf->pbuf + pmbuf->data_offset); + prx_pkt = (RxPacketHdr_t *)((t_u8 *)prx_pd + prx_pd->rx_pkt_offset); + +/** Small debug type */ +#define DBG_TYPE_SMALL 2 +/** Size of debugging structure */ +#define SIZE_OF_DBG_STRUCT 4 + if (prx_pd->rx_pkt_type == PKT_TYPE_DEBUG) { + t_u8 dbg_type; + dbg_type = *(t_u8 *)&prx_pkt->eth803_hdr; + if (dbg_type == DBG_TYPE_SMALL) { + PRINTM(MFW_D, "\n"); + DBG_HEXDUMP(MFW_D, "FWDBG", + (char *)((t_u8 *)&prx_pkt->eth803_hdr + + SIZE_OF_DBG_STRUCT), + prx_pd->rx_pkt_length); + PRINTM(MFW_D, "FWDBG::\n"); + } + goto done; + } + + PRINTM(MINFO, + "RX Data: data_len - prx_pd->rx_pkt_offset = %d - %d = %d\n", + pmbuf->data_len, prx_pd->rx_pkt_offset, + pmbuf->data_len - prx_pd->rx_pkt_offset); + + HEXDUMP("RX Data: Dest", prx_pkt->eth803_hdr.dest_addr, + sizeof(prx_pkt->eth803_hdr.dest_addr)); + HEXDUMP("RX Data: Src", prx_pkt->eth803_hdr.src_addr, + sizeof(prx_pkt->eth803_hdr.src_addr)); + + if ((memcmp(pmadapter, &prx_pkt->rfc1042_hdr, + snap_oui_802_h, sizeof(snap_oui_802_h)) == 0) || + ((memcmp(pmadapter, &prx_pkt->rfc1042_hdr, + rfc1042_eth_hdr, sizeof(rfc1042_eth_hdr)) == 0) && + memcmp(pmadapter, &prx_pkt->rfc1042_hdr.snap_type, + appletalk_aarp_type, sizeof(appletalk_aarp_type)) && + memcmp(pmadapter, &prx_pkt->rfc1042_hdr.snap_type, + ipx_snap_type, sizeof(ipx_snap_type)))) { + /* + * Replace the 803 header and rfc1042 header (llc/snap) with an + * EthernetII header, keep the src/dst and snap_type (ethertype). + * The firmware only passes up SNAP frames converting + * all RX Data from 802.11 to 802.2/LLC/SNAP frames. + * To create the Ethernet II, just move the src, dst address + * right before the snap_type. + */ + peth_hdr = (EthII_Hdr_t *) + ((t_u8 *)&prx_pkt->eth803_hdr + + sizeof(prx_pkt->eth803_hdr) + + sizeof(prx_pkt->rfc1042_hdr) + - sizeof(prx_pkt->eth803_hdr.dest_addr) + - sizeof(prx_pkt->eth803_hdr.src_addr) + - sizeof(prx_pkt->rfc1042_hdr.snap_type)); + + memcpy(pmadapter, peth_hdr->src_addr, + prx_pkt->eth803_hdr.src_addr, + sizeof(peth_hdr->src_addr)); + memcpy(pmadapter, peth_hdr->dest_addr, + prx_pkt->eth803_hdr.dest_addr, + sizeof(peth_hdr->dest_addr)); + + /* Chop off the RxPD + the excess memory from the + 802.2/llc/snap header that was removed. */ + hdr_chop = (t_u32)((t_ptr)peth_hdr - (t_ptr)prx_pd); + } else { + HEXDUMP("RX Data: LLC/SNAP", + (t_u8 *)&prx_pkt->rfc1042_hdr, + sizeof(prx_pkt->rfc1042_hdr)); + if ((priv->hotspot_cfg & HOTSPOT_ENABLED) && + discard_gratuitous_ARP_msg(prx_pkt, pmadapter)) { + ret = MLAN_STATUS_SUCCESS; + PRINTM(MDATA, + "Bypass sending Gratuitous ARP frame to Kernel.\n"); + goto done; + } + if (!memcmp(pmadapter, &prx_pkt->eth803_hdr.h803_len, + tdls_action_type, sizeof(tdls_action_type))) { + wlan_process_tdls_action_frame(priv, + ((t_u8 *)prx_pd + + prx_pd->rx_pkt_offset), + prx_pd->rx_pkt_length); + } + /* Chop off the RxPD */ + hdr_chop = (t_u32)((t_ptr)&prx_pkt->eth803_hdr - (t_ptr)prx_pd); + } + + /* Chop off the leading header bytes so the it points to the start of + either the reconstructed EthII frame or the 802.2/llc/snap frame */ + pmbuf->data_len -= hdr_chop; + pmbuf->data_offset += hdr_chop; + pmbuf->pparent = MNULL; + + DBG_HEXDUMP(MDAT_D, "RxPD", (t_u8 *)prx_pd, + MIN(sizeof(RxPD), MAX_DATA_DUMP_LEN)); + DBG_HEXDUMP(MDAT_D, "Rx Payload", + ((t_u8 *)prx_pd + prx_pd->rx_pkt_offset), + MIN(prx_pd->rx_pkt_length, MAX_DATA_DUMP_LEN)); + priv->rxpd_rate = prx_pd->rx_rate; + priv->rxpd_rate_info = prx_pd->rate_info; + if (!priv->adapter->psdio_device->v15_fw_api) + priv->rxpd_rate_info = + wlan_convert_v14_rate_ht_info(priv->rxpd_rate_info); + if (priv->bss_type == MLAN_BSS_TYPE_STA) { + adj_rx_rate = + wlan_adjust_data_rate(priv, priv->rxpd_rate, + priv->rxpd_rate_info); + pmadapter->callbacks.moal_hist_data_add(pmadapter->pmoal_handle, + pmbuf->bss_index, + adj_rx_rate, + prx_pd->snr, prx_pd->nf, + prx_pd->antenna); + } + + pmadapter->callbacks.moal_get_system_time(pmadapter->pmoal_handle, + &pmbuf->out_ts_sec, + &pmbuf->out_ts_usec); + PRINTM_NETINTF(MDATA, priv); + PRINTM(MDATA, "%lu.%06lu : Data => kernel seq_num=%d tid=%d\n", + pmbuf->out_ts_sec, pmbuf->out_ts_usec, prx_pd->seq_num, + prx_pd->priority); + + ret = pmadapter->callbacks.moal_recv_packet(pmadapter->pmoal_handle, + pmbuf); + if (ret == MLAN_STATUS_FAILURE) { + pmbuf->status_code = MLAN_ERROR_PKT_INVALID; + PRINTM(MERROR, + "STA Rx Error: moal_recv_packet returned error\n"); + } +done: + if (ret != MLAN_STATUS_PENDING) + wlan_free_mlan_buffer(pmadapter, pmbuf); + LEAVE(); + + return ret; +} + +/** + * @brief This function processes the received buffer + * + * @param adapter A pointer to mlan_adapter + * @param pmbuf A pointer to the received buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ops_sta_process_rx_packet(IN t_void *adapter, IN pmlan_buffer pmbuf) +{ + pmlan_adapter pmadapter = (pmlan_adapter)adapter; + mlan_status ret = MLAN_STATUS_SUCCESS; + RxPD *prx_pd; + RxPacketHdr_t *prx_pkt; + pmlan_private priv = pmadapter->priv[pmbuf->bss_index]; + t_u8 ta[MLAN_MAC_ADDR_LENGTH]; + t_u16 rx_pkt_type = 0; + wlan_mgmt_pkt *pmgmt_pkt_hdr = MNULL; + sta_node *sta_ptr = MNULL; + ENTER(); + + prx_pd = (RxPD *)(pmbuf->pbuf + pmbuf->data_offset); + /* Endian conversion */ + endian_convert_RxPD(prx_pd); + rx_pkt_type = prx_pd->rx_pkt_type; + prx_pkt = (RxPacketHdr_t *)((t_u8 *)prx_pd + prx_pd->rx_pkt_offset); + + if ((prx_pd->rx_pkt_offset + prx_pd->rx_pkt_length) > + (t_u16)pmbuf->data_len) { + PRINTM(MERROR, + "Wrong rx packet: len=%d,rx_pkt_offset=%d," + " rx_pkt_length=%d\n", pmbuf->data_len, + prx_pd->rx_pkt_offset, prx_pd->rx_pkt_length); + pmbuf->status_code = MLAN_ERROR_PKT_SIZE_INVALID; + ret = MLAN_STATUS_FAILURE; + wlan_free_mlan_buffer(pmadapter, pmbuf); + goto done; + } + pmbuf->data_len = prx_pd->rx_pkt_offset + prx_pd->rx_pkt_length; + + if (pmadapter->priv[pmbuf->bss_index]->mgmt_frame_passthru_mask && + prx_pd->rx_pkt_type == PKT_TYPE_MGMT_FRAME) { + /* Check if this is mgmt packet and needs to forwarded to app + as an event */ + pmgmt_pkt_hdr = + (wlan_mgmt_pkt *)((t_u8 *)prx_pd + + prx_pd->rx_pkt_offset); + pmgmt_pkt_hdr->frm_len = + wlan_le16_to_cpu(pmgmt_pkt_hdr->frm_len); + + if ((pmgmt_pkt_hdr->wlan_header.frm_ctl + & IEEE80211_FC_MGMT_FRAME_TYPE_MASK) == 0) + wlan_process_802dot11_mgmt_pkt(pmadapter-> + priv[pmbuf->bss_index], + (t_u8 *)&pmgmt_pkt_hdr-> + wlan_header, + pmgmt_pkt_hdr->frm_len + + sizeof(wlan_mgmt_pkt) + - + sizeof(pmgmt_pkt_hdr-> + frm_len), prx_pd); + wlan_free_mlan_buffer(pmadapter, pmbuf); + goto done; + } + + /* + * If the packet is not an unicast packet then send the packet + * directly to os. Don't pass thru rx reordering + */ + if ((!IS_11N_ENABLED(priv) && + !(prx_pd->flags & RXPD_FLAG_PKT_DIRECT_LINK)) || + memcmp(priv->adapter, priv->curr_addr, + prx_pkt->eth803_hdr.dest_addr, MLAN_MAC_ADDR_LENGTH)) { + wlan_process_rx_packet(pmadapter, pmbuf); + goto done; + } + + if (queuing_ra_based(priv) || + (prx_pd->flags & RXPD_FLAG_PKT_DIRECT_LINK)) { + memcpy(pmadapter, ta, prx_pkt->eth803_hdr.src_addr, + MLAN_MAC_ADDR_LENGTH); + if ((prx_pd->flags & RXPD_FLAG_PKT_DIRECT_LINK) && + (prx_pd->priority < MAX_NUM_TID)) { + PRINTM(MDATA, "tdls packet %p " MACSTR "\n", pmbuf, + MAC2STR(ta)); + sta_ptr = wlan_get_station_entry(priv, ta); + if (sta_ptr) { + sta_ptr->rx_seq[prx_pd->priority] = + prx_pd->seq_num; + sta_ptr->snr = prx_pd->snr; + sta_ptr->nf = prx_pd->nf; + pmadapter->callbacks. + moal_updata_peer_signal(pmadapter-> + pmoal_handle, + pmbuf-> + bss_index, ta, + prx_pd->snr, + prx_pd->nf); + } + } + } else { + if ((rx_pkt_type != PKT_TYPE_BAR) && + (prx_pd->priority < MAX_NUM_TID)) + priv->rx_seq[prx_pd->priority] = prx_pd->seq_num; + memcpy(pmadapter, ta, + priv->curr_bss_params.bss_descriptor.mac_address, + MLAN_MAC_ADDR_LENGTH); + } + + if ((priv->port_ctrl_mode == MTRUE && priv->port_open == MFALSE) && + (rx_pkt_type != PKT_TYPE_BAR)) { + mlan_11n_rxreorder_pkt(priv, prx_pd->seq_num, prx_pd->priority, + ta, (t_u8)prx_pd->rx_pkt_type, + (t_void *)RX_PKT_DROPPED_IN_FW); + wlan_process_rx_packet(pmadapter, pmbuf); + goto done; + } + + /* Reorder and send to OS */ + ret = mlan_11n_rxreorder_pkt(priv, prx_pd->seq_num, + prx_pd->priority, ta, + (t_u8)prx_pd->rx_pkt_type, (void *)pmbuf); + if (ret || (rx_pkt_type == PKT_TYPE_BAR) + ) { + wlan_free_mlan_buffer(pmadapter, pmbuf); + } + +done: + + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sta_tx.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sta_tx.c new file mode 100644 index 00000000..9e9747cd --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_sta_tx.c @@ -0,0 +1,298 @@ +/** @file mlan_sta_tx.c + * + * @brief This file contains the handling of data packet + * transmission in MLAN module. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/******************************************************** +Change log: + 10/21/2008: initial version +********************************************************/ + +#include "mlan.h" +#include "mlan_join.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_wmm.h" +#include "mlan_sdio.h" + +/******************************************************** + Local Variables +********************************************************/ + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ + +/******************************************************** + Global functions +********************************************************/ +/** + * @brief This function fill the txpd for tx packet + * + * @param priv A pointer to mlan_private structure + * @param pmbuf A pointer to the mlan_buffer for process + * + * @return headptr or MNULL + */ +t_void * +wlan_ops_sta_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf) +{ + mlan_private *pmpriv = (mlan_private *)priv; + pmlan_adapter pmadapter = pmpriv->adapter; + TxPD *plocal_tx_pd; + t_u8 *head_ptr = MNULL; + t_u32 pkt_type; + t_u32 tx_control; + + ENTER(); + + if (!pmbuf->data_len) { + PRINTM(MERROR, "STA Tx Error: Invalid packet length: %d\n", + pmbuf->data_len); + pmbuf->status_code = MLAN_ERROR_PKT_SIZE_INVALID; + goto done; + } + if (pmbuf->buf_type == MLAN_BUF_TYPE_RAW_DATA) { + memcpy(pmpriv->adapter, &pkt_type, + pmbuf->pbuf + pmbuf->data_offset, sizeof(pkt_type)); + memcpy(pmpriv->adapter, &tx_control, + pmbuf->pbuf + pmbuf->data_offset + sizeof(pkt_type), + sizeof(tx_control)); + pmbuf->data_offset += sizeof(pkt_type) + sizeof(tx_control); + pmbuf->data_len -= sizeof(pkt_type) + sizeof(tx_control); + } + + if (pmbuf->data_offset < (sizeof(TxPD) + INTF_HEADER_LEN + + DMA_ALIGNMENT)) { + PRINTM(MERROR, + "not enough space for TxPD: headroom=%d pkt_len=%d, required=%d\n", + pmbuf->data_offset, pmbuf->data_len, + sizeof(TxPD) + INTF_HEADER_LEN + DMA_ALIGNMENT); + pmbuf->status_code = MLAN_ERROR_PKT_SIZE_INVALID; + goto done; + } + + /* head_ptr should be aligned */ + head_ptr = + pmbuf->pbuf + pmbuf->data_offset - sizeof(TxPD) - + INTF_HEADER_LEN; + head_ptr = (t_u8 *)((t_ptr)head_ptr & ~((t_ptr)(DMA_ALIGNMENT - 1))); + + plocal_tx_pd = (TxPD *)(head_ptr + INTF_HEADER_LEN); + memset(pmadapter, plocal_tx_pd, 0, sizeof(TxPD)); + /* Set the BSS number to TxPD */ + plocal_tx_pd->bss_num = GET_BSS_NUM(pmpriv); + plocal_tx_pd->bss_type = pmpriv->bss_type; + + plocal_tx_pd->tx_pkt_length = (t_u16)pmbuf->data_len; + + plocal_tx_pd->priority = (t_u8)pmbuf->priority; + plocal_tx_pd->pkt_delay_2ms = + wlan_wmm_compute_driver_packet_delay(pmpriv, pmbuf); + + if (plocal_tx_pd->priority < + NELEMENTS(pmpriv->wmm.user_pri_pkt_tx_ctrl)) + /* + * Set the priority specific tx_control field, setting of 0 will + * cause the default value to be used later in this function + */ + plocal_tx_pd->tx_control + = + pmpriv->wmm.user_pri_pkt_tx_ctrl[plocal_tx_pd-> + priority]; + if (pmadapter->pps_uapsd_mode) { + if (MTRUE == wlan_check_last_packet_indication(pmpriv)) { + pmadapter->tx_lock_flag = MTRUE; + plocal_tx_pd->flags = + MRVDRV_TxPD_POWER_MGMT_LAST_PACKET; + } + } + if (pmbuf->flags & MLAN_BUF_FLAG_TDLS) + plocal_tx_pd->flags |= MRVDRV_TxPD_FLAGS_TDLS_PACKET; + /* Offset of actual data */ + plocal_tx_pd->tx_pkt_offset = + (t_u16)((t_ptr)pmbuf->pbuf + pmbuf->data_offset - + (t_ptr)plocal_tx_pd); + + if (!plocal_tx_pd->tx_control) { + /* TxCtrl set by user or default */ + plocal_tx_pd->tx_control = pmpriv->pkt_tx_ctrl; + } + + if (pmbuf->buf_type == MLAN_BUF_TYPE_RAW_DATA) { + plocal_tx_pd->tx_pkt_type = (t_u16)pkt_type; + plocal_tx_pd->tx_control = tx_control; + } + if (pmbuf->flags & MLAN_BUF_FLAG_TX_STATUS) { + plocal_tx_pd->tx_token_id = (t_u8)pmbuf->tx_seq_num; + plocal_tx_pd->flags |= MRVDRV_TxPD_FLAGS_TX_PACKET_STATUS; + } + + endian_convert_TxPD(plocal_tx_pd); + + /* Adjust the data offset and length to include TxPD in pmbuf */ + pmbuf->data_len += pmbuf->data_offset; + pmbuf->data_offset = (t_u32)(head_ptr - pmbuf->pbuf); + pmbuf->data_len -= pmbuf->data_offset; + +done: + LEAVE(); + return head_ptr; +} + +/** + * @brief This function tells firmware to send a NULL data packet. + * + * @param priv A pointer to mlan_private structure + * @param flags Transmit Pkt Flags + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise failure + */ +mlan_status +wlan_send_null_packet(pmlan_private priv, t_u8 flags) +{ + pmlan_adapter pmadapter = priv->adapter; + TxPD *ptx_pd; +/* sizeof(TxPD) + Interface specific header */ +#define NULL_PACKET_HDR 256 + t_u32 data_len = NULL_PACKET_HDR; + pmlan_buffer pmbuf = MNULL; + t_u8 *ptr; + mlan_status ret = MLAN_STATUS_SUCCESS; +#ifdef DEBUG_LEVEL1 + t_u32 sec, usec; +#endif + + ENTER(); + + if (pmadapter->surprise_removed == MTRUE) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + if (priv->media_connected == MFALSE) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + if (pmadapter->data_sent == MTRUE) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + pmbuf = wlan_alloc_mlan_buffer(pmadapter, data_len, 0, + MOAL_MALLOC_BUFFER); + if (!pmbuf) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + memset(pmadapter, pmbuf->pbuf, 0, data_len); + pmbuf->bss_index = priv->bss_index; + pmbuf->buf_type = MLAN_BUF_TYPE_DATA; + ptr = pmbuf->pbuf + pmbuf->data_offset; + pmbuf->data_len = sizeof(TxPD) + INTF_HEADER_LEN; + ptx_pd = (TxPD *)(ptr + INTF_HEADER_LEN); + ptx_pd->tx_control = priv->pkt_tx_ctrl; + ptx_pd->flags = flags; + ptx_pd->priority = WMM_HIGHEST_PRIORITY; + ptx_pd->tx_pkt_offset = sizeof(TxPD); + /* Set the BSS number to TxPD */ + ptx_pd->bss_num = GET_BSS_NUM(priv); + ptx_pd->bss_type = priv->bss_type; + + endian_convert_TxPD(ptx_pd); + + ret = wlan_sdio_host_to_card(pmadapter, MLAN_TYPE_DATA, pmbuf, MNULL); + + switch (ret) { + case MLAN_STATUS_RESOURCE: + wlan_free_mlan_buffer(pmadapter, pmbuf); + PRINTM(MERROR, "STA Tx Error: Failed to send NULL packet!\n"); + pmadapter->dbg.num_tx_host_to_card_failure++; + goto done; + case MLAN_STATUS_FAILURE: + pmadapter->data_sent = MFALSE; + wlan_free_mlan_buffer(pmadapter, pmbuf); + PRINTM(MERROR, "STA Tx Error: Failed to send NULL packet!\n"); + pmadapter->dbg.num_tx_host_to_card_failure++; + goto done; + case MLAN_STATUS_SUCCESS: + wlan_free_mlan_buffer(pmadapter, pmbuf); + PRINTM(MINFO, "STA Tx: Successfully send the NULL packet\n"); + pmadapter->tx_lock_flag = MTRUE; + break; + case MLAN_STATUS_PENDING: + pmadapter->tx_lock_flag = MTRUE; + break; + default: + break; + } + + PRINTM_GET_SYS_TIME(MDATA, &sec, &usec); + PRINTM_NETINTF(MDATA, priv); + PRINTM(MDATA, "%lu.%06lu : Null data => FW\n", sec, usec); + DBG_HEXDUMP(MDAT_D, "Null data", ptr, sizeof(TxPD) + INTF_HEADER_LEN); +done: + LEAVE(); + return ret; +} + +/** + * @brief This function checks if we need to send last packet indication. + * + * @param priv A pointer to mlan_private structure + * + * @return MTRUE or MFALSE + */ +t_u8 +wlan_check_last_packet_indication(pmlan_private priv) +{ + pmlan_adapter pmadapter = priv->adapter; + t_u8 ret = MFALSE; + t_u8 prop_ps = MTRUE; + + ENTER(); + + if (!pmadapter->sleep_period.period) { + LEAVE(); + return ret; + } + if (wlan_bypass_tx_list_empty(pmadapter) && + wlan_wmm_lists_empty(pmadapter)) { + if (((priv->curr_bss_params.wmm_uapsd_enabled == MTRUE) && + priv->wmm_qosinfo) || prop_ps) + + ret = MTRUE; + } + if (ret && !pmadapter->cmd_sent && !pmadapter->curr_cmd + && !IS_COMMAND_PENDING(pmadapter)) { + pmadapter->delay_null_pkt = MFALSE; + ret = MTRUE; + } else { + ret = MFALSE; + pmadapter->delay_null_pkt = MTRUE; + } + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_txrx.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_txrx.c new file mode 100644 index 00000000..946ed8ae --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_txrx.c @@ -0,0 +1,386 @@ +/** + * @file mlan_txrx.c + * + * @brief This file contains the handling of TX/RX in MLAN + * + * Copyright (C) 2009-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/************************************************************* +Change Log: + 05/11/2009: initial version +************************************************************/ + +#include "mlan.h" +#ifdef STA_SUPPORT +#include "mlan_join.h" +#endif +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_wmm.h" +#include "mlan_sdio.h" + +/******************************************************** + Local Variables +********************************************************/ + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ + +/******************************************************** + Global Functions +********************************************************/ +/** + * @brief This function processes the received buffer + * + * @param pmadapter A pointer to mlan_adapter + * @param pmbuf A pointer to the received buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_handle_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private priv = MNULL; + RxPD *prx_pd; +#ifdef DEBUG_LEVEL1 + t_u32 sec = 0, usec = 0; +#endif + + ENTER(); + + prx_pd = (RxPD *)(pmbuf->pbuf + pmbuf->data_offset); + /* Get the BSS number from RxPD, get corresponding priv */ + priv = wlan_get_priv_by_id(pmadapter, prx_pd->bss_num & BSS_NUM_MASK, + prx_pd->bss_type); + if (!priv) + priv = wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY); + pmbuf->bss_index = priv->bss_index; + PRINTM_GET_SYS_TIME(MDATA, &sec, &usec); + PRINTM_NETINTF(MDATA, priv); + PRINTM(MDATA, "%lu.%06lu : Data <= FW\n", sec, usec); + ret = priv->ops.process_rx_packet(pmadapter, pmbuf); + + LEAVE(); + return ret; +} + +/** + * @brief This function checks the conditions and sends packet to device + * + * @param priv A pointer to mlan_private structure + * @param pmbuf A pointer to the mlan_buffer for process + * @param tx_param A pointer to mlan_tx_param structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise failure + */ +mlan_status +wlan_process_tx(pmlan_private priv, pmlan_buffer pmbuf, mlan_tx_param *tx_param) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_adapter pmadapter = priv->adapter; + t_u8 *head_ptr = MNULL; +#ifdef DEBUG_LEVEL1 + t_u32 sec = 0, usec = 0; +#endif +#ifdef STA_SUPPORT + TxPD *plocal_tx_pd = MNULL; +#endif + + ENTER(); + head_ptr = (t_u8 *)priv->ops.process_txpd(priv, pmbuf); + if (!head_ptr) { + pmbuf->status_code = MLAN_ERROR_PKT_INVALID; + ret = MLAN_STATUS_FAILURE; + goto done; + } +#ifdef STA_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) + plocal_tx_pd = (TxPD *)(head_ptr + INTF_HEADER_LEN); +#endif + ret = wlan_sdio_host_to_card(pmadapter, MLAN_TYPE_DATA, pmbuf, + tx_param); +done: + switch (ret) { + case MLAN_STATUS_RESOURCE: +#ifdef STA_SUPPORT + if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) && + pmadapter->pps_uapsd_mode && + (pmadapter->tx_lock_flag == MTRUE)) { + pmadapter->tx_lock_flag = MFALSE; + plocal_tx_pd->flags = 0; + } +#endif + PRINTM(MINFO, "MLAN_STATUS_RESOURCE is returned\n"); + break; + case MLAN_STATUS_FAILURE: + pmadapter->data_sent = MFALSE; + PRINTM(MERROR, "Error: host_to_card failed: 0x%X\n", ret); + pmadapter->dbg.num_tx_host_to_card_failure++; + pmbuf->status_code = MLAN_ERROR_DATA_TX_FAIL; + wlan_write_data_complete(pmadapter, pmbuf, ret); + break; + case MLAN_STATUS_PENDING: + DBG_HEXDUMP(MDAT_D, "Tx", head_ptr + INTF_HEADER_LEN, + MIN(pmbuf->data_len + sizeof(TxPD), + MAX_DATA_DUMP_LEN)); + break; + case MLAN_STATUS_SUCCESS: + DBG_HEXDUMP(MDAT_D, "Tx", head_ptr + INTF_HEADER_LEN, + MIN(pmbuf->data_len + sizeof(TxPD), + MAX_DATA_DUMP_LEN)); + wlan_write_data_complete(pmadapter, pmbuf, ret); + break; + default: + break; + } + + if ((ret == MLAN_STATUS_SUCCESS) || (ret == MLAN_STATUS_PENDING)) { + PRINTM_GET_SYS_TIME(MDATA, &sec, &usec); + PRINTM_NETINTF(MDATA, priv); + PRINTM(MDATA, "%lu.%06lu : Data => FW\n", sec, usec); + } + LEAVE(); + return ret; +} + +/** + * @brief Packet send completion handling + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pmbuf A pointer to mlan_buffer structure + * @param status Callback status + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_write_data_complete(IN pmlan_adapter pmadapter, + IN pmlan_buffer pmbuf, IN mlan_status status) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_callbacks pcb; + + ENTER(); + + MASSERT(pmadapter && pmbuf); + + pcb = &pmadapter->callbacks; + + if (pmbuf->flags & MLAN_BUF_FLAG_TCP_ACK) { + pmbuf->flags &= ~MLAN_BUF_FLAG_TCP_ACK; + pcb->moal_tcp_ack_tx_ind(pmadapter->pmoal_handle, pmbuf); + } + + if ((pmbuf->buf_type == MLAN_BUF_TYPE_DATA) || + (pmbuf->buf_type == MLAN_BUF_TYPE_RAW_DATA)) { + PRINTM(MINFO, "wlan_write_data_complete: DATA %p\n", pmbuf); + if (pmbuf->flags & MLAN_BUF_FLAG_MOAL_TX_BUF) { + /* pmbuf was allocated by MOAL */ + pcb->moal_send_packet_complete(pmadapter->pmoal_handle, + pmbuf, status); + } else { + /* pmbuf was allocated by MLAN */ + wlan_free_mlan_buffer(pmadapter, pmbuf); + } + } + + LEAVE(); + return ret; +} + +/** + * @brief Packet receive completion callback handler + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pmbuf A pointer to mlan_buffer structure + * @param status Callback status + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_recv_packet_complete(IN pmlan_adapter pmadapter, + IN pmlan_buffer pmbuf, IN mlan_status status) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_callbacks pcb; + + ENTER(); + + MASSERT(pmadapter && pmbuf); + pcb = &pmadapter->callbacks; + MASSERT(pmbuf->bss_index < pmadapter->priv_num); + + if (pmbuf->pparent) { + /** we will free the pparaent at the end of deaggr */ + wlan_free_mlan_buffer(pmadapter, pmbuf); + } else { + wlan_free_mlan_buffer(pmadapter, pmbuf); + } + + LEAVE(); + return ret; +} + +/** + * @brief Add packet to Bypass TX queue + * + * @param pmadapter Pointer to the mlan_adapter driver data struct + * @param pmbuf Pointer to the mlan_buffer data struct + * + * @return N/A + */ +t_void +wlan_add_buf_bypass_txqueue(mlan_adapter *pmadapter, pmlan_buffer pmbuf) +{ + pmlan_private priv = pmadapter->priv[pmbuf->bss_index]; + ENTER(); + + if (pmbuf->buf_type != MLAN_BUF_TYPE_RAW_DATA) + pmbuf->buf_type = MLAN_BUF_TYPE_DATA; + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + priv->bypass_txq.plock); + pmadapter->bypass_pkt_count++; + util_enqueue_list_tail(pmadapter->pmoal_handle, &priv->bypass_txq, + (pmlan_linked_list)pmbuf, MNULL, MNULL); + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->bypass_txq.plock); + LEAVE(); +} + +/** + * @brief Check if packets are available in Bypass TX queue + * + * @param pmadapter Pointer to the mlan_adapter driver data struct + * + * @return MFALSE if not empty; MTRUE if empty + */ +INLINE t_u8 +wlan_bypass_tx_list_empty(mlan_adapter *pmadapter) +{ + return (pmadapter->bypass_pkt_count) ? MFALSE : MTRUE; +} + +/** + * @brief Clean up the By-pass TX queue + * + * @param priv Pointer to the mlan_private data struct + * + * @return N/A + */ +t_void +wlan_cleanup_bypass_txq(mlan_private *priv) +{ + pmlan_buffer pmbuf; + mlan_adapter *pmadapter = priv->adapter; + ENTER(); + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + priv->bypass_txq.plock); + while ((pmbuf = + (pmlan_buffer)util_peek_list(pmadapter->pmoal_handle, + &priv->bypass_txq, MNULL, + MNULL))) { + util_unlink_list(pmadapter->pmoal_handle, &priv->bypass_txq, + (pmlan_linked_list)pmbuf, MNULL, MNULL); + wlan_write_data_complete(pmadapter, pmbuf, MLAN_STATUS_FAILURE); + pmadapter->bypass_pkt_count--; + } + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->bypass_txq.plock); + LEAVE(); +} + +/** + * @brief Transmit the By-passed packet awaiting in by-pass queue + * + * @param pmadapter Pointer to the mlan_adapter driver data struct + * + * @return N/A + */ +t_void +wlan_process_bypass_tx(pmlan_adapter pmadapter) +{ + pmlan_buffer pmbuf; + mlan_tx_param tx_param; + mlan_status status = MLAN_STATUS_SUCCESS; + pmlan_private priv; + int j = 0; + ENTER(); + for (j = 0; j < pmadapter->priv_num; ++j) { + priv = pmadapter->priv[j]; + if (priv) { + pmbuf = (pmlan_buffer)util_dequeue_list(pmadapter-> + pmoal_handle, + &priv-> + bypass_txq, + pmadapter-> + callbacks. + moal_spin_lock, + pmadapter-> + callbacks. + moal_spin_unlock); + if (pmbuf) { + PRINTM(MINFO, "Dequeuing bypassed packet %p\n", + pmbuf); + /* XXX: nex_pkt_len ??? */ + tx_param.next_pkt_len = 0; + status = wlan_process_tx(pmadapter-> + priv[pmbuf->bss_index], + pmbuf, &tx_param); + + if (status == MLAN_STATUS_RESOURCE) { + /* Queue the packet again so that it + will be TX'ed later */ + util_enqueue_list_head(pmadapter-> + pmoal_handle, + &priv-> + bypass_txq, + (pmlan_linked_list) + pmbuf, + pmadapter-> + callbacks. + moal_spin_lock, + pmadapter-> + callbacks. + moal_spin_unlock); + } else { + pmadapter->callbacks. + moal_spin_lock(pmadapter-> + pmoal_handle, + priv->bypass_txq. + plock); + pmadapter->bypass_pkt_count--; + pmadapter->callbacks. + moal_spin_unlock(pmadapter-> + pmoal_handle, + priv-> + bypass_txq. + plock); + } + break; + } else { + PRINTM(MINFO, "Nothing to send\n"); + } + } + } + LEAVE(); +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_uap.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_uap.h new file mode 100644 index 00000000..d2a07a53 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_uap.h @@ -0,0 +1,100 @@ +/** @file mlan_uap.h + * + * @brief This file contains related macros, enum, and struct + * of uap functionalities + * + * Copyright (C) 2009-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/******************************************************** +Change log: + 02/05/2009: initial version +********************************************************/ + +#ifndef _MLAN_UAP_H_ +#define _MLAN_UAP_H_ + +#ifdef BIG_ENDIAN_SUPPORT +/** Convert TxPD to little endian format from CPU format */ +#define uap_endian_convert_TxPD(x) \ + { \ + (x)->tx_pkt_length = wlan_cpu_to_le16((x)->tx_pkt_length); \ + (x)->tx_pkt_offset = wlan_cpu_to_le16((x)->tx_pkt_offset); \ + (x)->tx_pkt_type = wlan_cpu_to_le16((x)->tx_pkt_type); \ + (x)->tx_control = wlan_cpu_to_le32((x)->tx_control); \ + } + +/** Convert RxPD from little endian format to CPU format */ +#define uap_endian_convert_RxPD(x) \ + { \ + (x)->rx_pkt_length = wlan_le16_to_cpu((x)->rx_pkt_length); \ + (x)->rx_pkt_offset = wlan_le16_to_cpu((x)->rx_pkt_offset); \ + (x)->rx_pkt_type = wlan_le16_to_cpu((x)->rx_pkt_type); \ + (x)->seq_num = wlan_le16_to_cpu((x)->seq_num); \ + } +#else +/** Convert TxPD to little endian format from CPU format */ +#define uap_endian_convert_TxPD(x) do {} while (0) +/** Convert RxPD from little endian format to CPU format */ +#define uap_endian_convert_RxPD(x) do {} while (0) +#endif /* BIG_ENDIAN_SUPPORT */ + +/** Packet forwarding to be done by FW or host */ +#define PKT_FWD_FW_BIT 0x01 +/** Intra-BSS broadcast packet forwarding allow bit */ +#define PKT_FWD_INTRA_BCAST 0x02 +/** Intra-BSS unicast packet forwarding allow bit */ +#define PKT_FWD_INTRA_UCAST 0x04 +/** Inter-BSS unicast packet forwarding allow bit */ +#define PKT_FWD_INTER_UCAST 0x08 +/** Intra-BSS unicast packet */ +#define PKT_INTRA_UCAST 0x01 +/** Inter-BSS unicast packet */ +#define PKT_INTER_UCAST 0x02 +/** Enable Host PKT forwarding */ +#define PKT_FWD_ENABLE_BIT 0x01 + +mlan_status wlan_uap_get_channel(IN pmlan_private pmpriv); + +mlan_status wlan_uap_set_channel(IN pmlan_private pmpriv, + IN t_u8 uap_band_cfg, IN t_u8 channel); + +mlan_status wlan_uap_get_beacon_dtim(IN pmlan_private pmpriv); + +mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req); + +mlan_status wlan_ops_uap_prepare_cmd(IN t_void *priv, + IN t_u16 cmd_no, + IN t_u16 cmd_action, + IN t_u32 cmd_oid, + IN t_void *pioctl_buf, + IN t_void *pdata_buf, IN t_void *pcmd_buf); + +mlan_status wlan_ops_uap_process_cmdresp(IN t_void *priv, + IN t_u16 cmdresp_no, + IN t_void *pcmd_buf, + IN t_void *pioctl); + +mlan_status wlan_ops_uap_process_rx_packet(IN t_void *adapter, + IN pmlan_buffer pmbuf); + +mlan_status wlan_ops_uap_process_event(IN t_void *priv); + +t_void *wlan_ops_uap_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf); + +mlan_status wlan_ops_uap_init_cmd(IN t_void *priv, IN t_u8 first_bss); + +#endif /* _MLAN_UAP_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_uap_cmdevent.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_uap_cmdevent.c new file mode 100644 index 00000000..2ca5dd90 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_uap_cmdevent.c @@ -0,0 +1,4239 @@ +/** @file mlan_uap_cmdevent.c + * + * @brief This file contains the handling of AP mode command and event + * + * Copyright (C) 2009-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/******************************************************** +Change log: + 02/05/2009: initial version +********************************************************/ + +#include "mlan.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#ifdef STA_SUPPORT +#include "mlan_join.h" +#endif +#include "mlan_main.h" +#include "mlan_uap.h" +#include "mlan_sdio.h" +#include "mlan_11n.h" +#include "mlan_11h.h" +#include "mlan_11ac.h" + +/******************************************************** + Local Functions +********************************************************/ +/** + * @brief This function handles the command response error + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to command buffer + * + * @return N/A + */ +static void +uap_process_cmdresp_error(mlan_private *pmpriv, HostCmd_DS_COMMAND *resp, + mlan_ioctl_req *pioctl_buf) +{ + mlan_adapter *pmadapter = pmpriv->adapter; + + ENTER(); + + PRINTM(MERROR, "CMD_RESP: cmd %#x error, result=%#x\n", resp->command, + resp->result); + if (pioctl_buf) + pioctl_buf->status_code = resp->result; + /* + * Handling errors here + */ + switch (resp->command) { + case HOST_CMD_APCMD_SYS_CONFIGURE: + { + HostCmd_DS_SYS_CONFIG *sys_config = + (HostCmd_DS_SYS_CONFIG *)&resp->params. + sys_config; + t_u16 resp_len = 0, travel_len = 0, index; + mlan_ds_misc_custom_ie *cust_ie = MNULL; + mlan_ds_misc_cfg *misc = MNULL; + custom_ie *cptr; + + if (!pioctl_buf || + (pioctl_buf->req_id != MLAN_IOCTL_MISC_CFG)) + break; + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + if ((pioctl_buf->action == MLAN_ACT_SET) && + (misc->sub_command == MLAN_OID_MISC_CUSTOM_IE)) { + cust_ie = + (mlan_ds_misc_custom_ie *)sys_config-> + tlv_buffer; + if (cust_ie) { + cust_ie->type = + wlan_le16_to_cpu(cust_ie->type); + resp_len = cust_ie->len = + wlan_le16_to_cpu(cust_ie->len); + travel_len = 0; + /* conversion for index, mask, len */ + if (resp_len == sizeof(t_u16)) + cust_ie->ie_data_list[0]. + ie_index = + wlan_cpu_to_le16 + (cust_ie-> + ie_data_list[0]. + ie_index); + + while (resp_len > sizeof(t_u16)) { + cptr = (custom_ie + *)(((t_u8 *)cust_ie-> + ie_data_list) + + travel_len); + index = cptr->ie_index = + wlan_le16_to_cpu(cptr-> + ie_index); + cptr->mgmt_subtype_mask = + wlan_le16_to_cpu(cptr-> + mgmt_subtype_mask); + cptr->ie_length = + wlan_le16_to_cpu(cptr-> + ie_length); + travel_len += + cptr->ie_length + + sizeof(custom_ie) - + MAX_IE_SIZE; + resp_len -= + cptr->ie_length + + sizeof(custom_ie) - + MAX_IE_SIZE; + if ((pmpriv->mgmt_ie[index]. + mgmt_subtype_mask == + cptr->mgmt_subtype_mask) && + (pmpriv->mgmt_ie[index]. + ie_length == + cptr->ie_length) && + !memcmp(pmpriv->adapter, + pmpriv-> + mgmt_ie[index]. + ie_buffer, + cptr->ie_buffer, + cptr->ie_length)) { + PRINTM(MERROR, + "set custom ie fail, remove ie index :%d\n", + index); + memset(pmadapter, + &pmpriv-> + mgmt_ie[index], + 0, + sizeof + (custom_ie)); + } + } + } + } + } + break; + default: + break; + } + + wlan_insert_cmd_to_free_q(pmadapter, pmadapter->curr_cmd); + + wlan_request_cmd_lock(pmadapter); + pmadapter->curr_cmd = MNULL; + wlan_release_cmd_lock(pmadapter); + + LEAVE(); + return; +} + +/** + * @brief This function will return the pointer to station entry in station list + * table which matches the give mac address + * + * @param priv A pointer to mlan_private + * + * @return A pointer to structure sta_node + */ +void +wlan_notify_station_deauth(mlan_private *priv) +{ + sta_node *sta_ptr; + t_u8 event_buf[100]; + mlan_event *pevent = (mlan_event *)event_buf; + t_u8 *pbuf; + + ENTER(); + sta_ptr = (sta_node *)util_peek_list(priv->adapter->pmoal_handle, + &priv->sta_list, + priv->adapter->callbacks. + moal_spin_lock, + priv->adapter->callbacks. + moal_spin_unlock); + if (!sta_ptr) { + LEAVE(); + return; + } + while (sta_ptr != (sta_node *)&priv->sta_list) { + memset(priv->adapter, event_buf, 0, sizeof(event_buf)); + pevent->bss_index = priv->bss_index; + pevent->event_id = MLAN_EVENT_ID_UAP_FW_STA_DISCONNECT; + pevent->event_len = MLAN_MAC_ADDR_LENGTH + 2; + pbuf = (t_u8 *)pevent->event_buf; + /* reason field set to 0, Unspecified */ + memcpy(priv->adapter, pbuf + 2, sta_ptr->mac_addr, + MLAN_MAC_ADDR_LENGTH); + wlan_recv_event(priv, pevent->event_id, pevent); + sta_ptr = sta_ptr->pnext; + } + LEAVE(); + return; +} + +/** + * @brief This function prepares command of hs_cfg. + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param pdata_buf A pointer to data buffer + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_uap_cmd_802_11_hs_cfg(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN hs_config_param *pdata_buf) +{ + HostCmd_DS_802_11_HS_CFG_ENH *phs_cfg = + (HostCmd_DS_802_11_HS_CFG_ENH *)&(cmd->params.opt_hs_cfg); + t_u8 *tlv = (t_u8 *)phs_cfg + sizeof(HostCmd_DS_802_11_HS_CFG_ENH); + MrvlIEtypes_HsWakeHoldoff_t *holdoff_tlv = MNULL; + + ENTER(); + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_HS_CFG_ENH); + cmd->size = + wlan_cpu_to_le16(S_DS_GEN + + sizeof(HostCmd_DS_802_11_HS_CFG_ENH)); + + if (pdata_buf == MNULL) { + phs_cfg->action = wlan_cpu_to_le16(HS_ACTIVATE); + phs_cfg->params.hs_activate.resp_ctrl = + wlan_cpu_to_le16(RESP_NEEDED); + } else { + phs_cfg->action = wlan_cpu_to_le16(HS_CONFIGURE); + phs_cfg->params.hs_config.conditions = + wlan_cpu_to_le32(pdata_buf->conditions); + phs_cfg->params.hs_config.gpio = pdata_buf->gpio; + phs_cfg->params.hs_config.gap = pdata_buf->gap; + if (pmpriv->adapter->min_wake_holdoff) { + cmd->size = + wlan_cpu_to_le16(S_DS_GEN + + sizeof + (HostCmd_DS_802_11_HS_CFG_ENH) + + + sizeof + (MrvlIEtypes_HsWakeHoldoff_t)); + holdoff_tlv = (MrvlIEtypes_HsWakeHoldoff_t *)tlv; + holdoff_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_HS_WAKE_HOLDOFF); + holdoff_tlv->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_HsWakeHoldoff_t) - + sizeof(MrvlIEtypesHeader_t)); + holdoff_tlv->min_wake_holdoff = + wlan_cpu_to_le16(pmpriv->adapter-> + min_wake_holdoff); + } + PRINTM(MCMND, + "HS_CFG_CMD: condition:0x%x gpio:0x%x gap:0x%x holdoff=%d\n", + phs_cfg->params.hs_config.conditions, + phs_cfg->params.hs_config.gpio, + phs_cfg->params.hs_config.gap, + pmpriv->adapter->min_wake_holdoff); + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of Tx data pause + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action the action: GET or SET + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_uap_cmd_txdatapause(pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + HostCmd_DS_CMD_TX_DATA_PAUSE *pause_cmd = + (HostCmd_DS_CMD_TX_DATA_PAUSE *)&cmd->params.tx_data_pause; + mlan_ds_misc_tx_datapause *data_pause = + (mlan_ds_misc_tx_datapause *)pdata_buf; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_CFG_TX_DATA_PAUSE); + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_CMD_TX_DATA_PAUSE) + + S_DS_GEN); + pause_cmd->action = wlan_cpu_to_le16(cmd_action); + + if (cmd_action == HostCmd_ACT_GEN_SET) { + pause_cmd->enable_tx_pause = (t_u8)data_pause->tx_pause; + pause_cmd->pause_tx_count = (t_u8)data_pause->tx_buf_cnt; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of Tx data pause + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_uap_ret_txdatapause(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_CMD_TX_DATA_PAUSE *pause_cmd = + (HostCmd_DS_CMD_TX_DATA_PAUSE *)&resp->params.tx_data_pause; + mlan_ds_misc_cfg *misc_cfg = MNULL; + + ENTER(); + + if (pioctl_buf) { + misc_cfg = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + misc_cfg->param.tx_datapause.tx_pause = + pause_cmd->enable_tx_pause; + misc_cfg->param.tx_datapause.tx_buf_cnt = + pause_cmd->pause_tx_count; + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function will process tx pause event + * + * @param priv A pointer to mlan_private + * @param pevent A pointer to event buf + * + * @return N/A + */ +static void +wlan_process_tx_pause_event(pmlan_private priv, pmlan_buffer pevent) +{ + t_u16 tlv_type, tlv_len; + int tlv_buf_left = pevent->data_len - sizeof(t_u32); + MrvlIEtypesHeader_t *tlv = + (MrvlIEtypesHeader_t *)(pevent->pbuf + pevent->data_offset + + sizeof(t_u32)); + MrvlIEtypes_tx_pause_t *tx_pause_tlv; + sta_node *sta_ptr = MNULL; + t_u8 bc_mac[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + + ENTER(); + + while (tlv_buf_left >= (int)sizeof(MrvlIEtypesHeader_t)) { + tlv_type = wlan_le16_to_cpu(tlv->type); + tlv_len = wlan_le16_to_cpu(tlv->len); + if ((sizeof(MrvlIEtypesHeader_t) + tlv_len) > + (unsigned int)tlv_buf_left) { + PRINTM(MERROR, "wrong tlv: tlvLen=%d, tlvBufLeft=%d\n", + tlv_len, tlv_buf_left); + break; + } + if (tlv_type == TLV_TYPE_TX_PAUSE) { + tx_pause_tlv = (MrvlIEtypes_tx_pause_t *)tlv; + PRINTM(MCMND, "TxPause: " MACSTR " pause=%d, pkts=%d\n", + MAC2STR(tx_pause_tlv->peermac), + tx_pause_tlv->tx_pause, tx_pause_tlv->pkt_cnt); + if (!memcmp + (priv->adapter, bc_mac, tx_pause_tlv->peermac, + MLAN_MAC_ADDR_LENGTH)) + wlan_update_ralist_tx_pause(priv, + tx_pause_tlv-> + peermac, + tx_pause_tlv-> + tx_pause); + else if (!memcmp + (priv->adapter, priv->curr_addr, + tx_pause_tlv->peermac, + MLAN_MAC_ADDR_LENGTH)) { + if (tx_pause_tlv->tx_pause) + priv->port_open = MFALSE; + else + priv->port_open = MTRUE; + } else { + sta_ptr = + wlan_get_station_entry(priv, + tx_pause_tlv-> + peermac); + if (sta_ptr) { + if (sta_ptr->tx_pause != + tx_pause_tlv->tx_pause) { + sta_ptr->tx_pause = + tx_pause_tlv->tx_pause; + wlan_update_ralist_tx_pause + (priv, + tx_pause_tlv->peermac, + tx_pause_tlv-> + tx_pause); + } + } + } + } + tlv_buf_left -= (sizeof(MrvlIEtypesHeader_t) + tlv_len); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len + + sizeof(MrvlIEtypesHeader_t)); + } + + LEAVE(); + return; +} + +/** + * @brief This function prepares command for config uap settings + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action the action: GET or SET + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_uap_cmd_ap_config(pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN pmlan_ioctl_req pioctl_buf) +{ + mlan_ds_bss *bss = MNULL; + HostCmd_DS_SYS_CONFIG *sys_config = + (HostCmd_DS_SYS_CONFIG *)&cmd->params.sys_config; + t_u8 *tlv = MNULL; + MrvlIEtypes_MacAddr_t *tlv_mac = MNULL; + MrvlIEtypes_SsIdParamSet_t *tlv_ssid = MNULL; + MrvlIEtypes_beacon_period_t *tlv_beacon_period = MNULL; + MrvlIEtypes_dtim_period_t *tlv_dtim_period = MNULL; + MrvlIEtypes_RatesParamSet_t *tlv_rates = MNULL; + MrvlIEtypes_tx_rate_t *tlv_txrate = MNULL; + MrvlIEtypes_mcbc_rate_t *tlv_mcbc_rate = MNULL; + MrvlIEtypes_tx_power_t *tlv_tx_power = MNULL; + MrvlIEtypes_bcast_ssid_t *tlv_bcast_ssid = MNULL; + MrvlIEtypes_antenna_mode_t *tlv_antenna = MNULL; + MrvlIEtypes_pkt_forward_t *tlv_pkt_forward = MNULL; + MrvlIEtypes_max_sta_count_t *tlv_sta_count = MNULL; + MrvlIEtypes_sta_ageout_t *tlv_sta_ageout = MNULL; + MrvlIEtypes_ps_sta_ageout_t *tlv_ps_sta_ageout = MNULL; + MrvlIEtypes_rts_threshold_t *tlv_rts_threshold = MNULL; + MrvlIEtypes_frag_threshold_t *tlv_frag_threshold = MNULL; + MrvlIEtypes_retry_limit_t *tlv_retry_limit = MNULL; + MrvlIEtypes_eapol_pwk_hsk_timeout_t *tlv_pairwise_timeout = MNULL; + MrvlIEtypes_eapol_pwk_hsk_retries_t *tlv_pairwise_retries = MNULL; + MrvlIEtypes_eapol_gwk_hsk_timeout_t *tlv_groupwise_timeout = MNULL; + MrvlIEtypes_eapol_gwk_hsk_retries_t *tlv_groupwise_retries = MNULL; + MrvlIEtypes_mgmt_ie_passthru_t *tlv_mgmt_ie_passthru = MNULL; + MrvlIEtypes_2040_coex_enable_t *tlv_2040_coex_enable = MNULL; + MrvlIEtypes_mac_filter_t *tlv_mac_filter = MNULL; + MrvlIEtypes_channel_band_t *tlv_chan_band = MNULL; + MrvlIEtypes_ChanListParamSet_t *tlv_chan_list = MNULL; + ChanScanParamSet_t *pscan_chan = MNULL; + MrvlIEtypes_auth_type_t *tlv_auth_type = MNULL; + MrvlIEtypes_encrypt_protocol_t *tlv_encrypt_protocol = MNULL; + MrvlIEtypes_akmp_t *tlv_akmp = MNULL; + MrvlIEtypes_pwk_cipher_t *tlv_pwk_cipher = MNULL; + MrvlIEtypes_gwk_cipher_t *tlv_gwk_cipher = MNULL; + MrvlIEtypes_rsn_replay_prot_t *tlv_rsn_prot = MNULL; + MrvlIEtypes_passphrase_t *tlv_passphrase = MNULL; + MrvlIEtypes_group_rekey_time_t *tlv_rekey_time = MNULL; + MrvlIEtypes_wep_key_t *tlv_wep_key = MNULL; + MrvlIETypes_HTCap_t *tlv_htcap = MNULL; + MrvlIEtypes_wmm_parameter_t *tlv_wmm_parameter = MNULL; + t_u32 cmd_size = 0; + t_u8 zero_mac[] = { 0, 0, 0, 0, 0, 0 }; + t_u16 i; + t_u16 ac; + + ENTER(); + if (pioctl_buf == MNULL) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + bss = (mlan_ds_bss *)pioctl_buf->pbuf; + + cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_SYS_CONFIGURE); + sys_config->action = wlan_cpu_to_le16(cmd_action); + cmd_size = sizeof(HostCmd_DS_SYS_CONFIG) - 1 + S_DS_GEN; + + tlv = (t_u8 *)sys_config->tlv_buffer; + if (memcmp + (pmpriv->adapter, zero_mac, &bss->param.bss_config.mac_addr, + MLAN_MAC_ADDR_LENGTH)) { + tlv_mac = (MrvlIEtypes_MacAddr_t *)tlv; + tlv_mac->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_MAC_ADDRESS); + tlv_mac->header.len = wlan_cpu_to_le16(MLAN_MAC_ADDR_LENGTH); + memcpy(pmpriv->adapter, tlv_mac->mac, + &bss->param.bss_config.mac_addr, MLAN_MAC_ADDR_LENGTH); + cmd_size += sizeof(MrvlIEtypes_MacAddr_t); + tlv += sizeof(MrvlIEtypes_MacAddr_t); + } + + if (bss->param.bss_config.ssid.ssid_len) { + tlv_ssid = (MrvlIEtypes_SsIdParamSet_t *)tlv; + tlv_ssid->header.type = wlan_cpu_to_le16(TLV_TYPE_SSID); + tlv_ssid->header.len = + wlan_cpu_to_le16((t_u16)bss->param.bss_config.ssid. + ssid_len); + memcpy(pmpriv->adapter, tlv_ssid->ssid, + bss->param.bss_config.ssid.ssid, + bss->param.bss_config.ssid.ssid_len); + cmd_size += + sizeof(MrvlIEtypesHeader_t) + + bss->param.bss_config.ssid.ssid_len; + tlv += sizeof(MrvlIEtypesHeader_t) + + bss->param.bss_config.ssid.ssid_len; + } + + if ((bss->param.bss_config.beacon_period >= MIN_BEACON_PERIOD) && + (bss->param.bss_config.beacon_period <= MAX_BEACON_PERIOD)) { + tlv_beacon_period = (MrvlIEtypes_beacon_period_t *)tlv; + tlv_beacon_period->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_BEACON_PERIOD); + tlv_beacon_period->header.len = wlan_cpu_to_le16(sizeof(t_u16)); + tlv_beacon_period->beacon_period = + wlan_cpu_to_le16(bss->param.bss_config.beacon_period); + cmd_size += sizeof(MrvlIEtypes_beacon_period_t); + tlv += sizeof(MrvlIEtypes_beacon_period_t); + } + + if ((bss->param.bss_config.dtim_period >= MIN_DTIM_PERIOD) && + (bss->param.bss_config.dtim_period <= MAX_DTIM_PERIOD)) { + tlv_dtim_period = (MrvlIEtypes_dtim_period_t *)tlv; + tlv_dtim_period->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_DTIM_PERIOD); + tlv_dtim_period->header.len = wlan_cpu_to_le16(sizeof(t_u8)); + tlv_dtim_period->dtim_period = + bss->param.bss_config.dtim_period; + cmd_size += sizeof(MrvlIEtypes_dtim_period_t); + tlv += sizeof(MrvlIEtypes_dtim_period_t); + } + + if (bss->param.bss_config.rates[0]) { + tlv_rates = (MrvlIEtypes_RatesParamSet_t *)tlv; + tlv_rates->header.type = wlan_cpu_to_le16(TLV_TYPE_RATES); + for (i = 0; + i < MAX_DATA_RATES && bss->param.bss_config.rates[i]; + i++) { + tlv_rates->rates[i] = bss->param.bss_config.rates[i]; + } + tlv_rates->header.len = wlan_cpu_to_le16(i); + cmd_size += sizeof(MrvlIEtypesHeader_t) + i; + tlv += sizeof(MrvlIEtypesHeader_t) + i; + } + + if (bss->param.bss_config.tx_data_rate <= DATA_RATE_54M) { + tlv_txrate = (MrvlIEtypes_tx_rate_t *)tlv; + tlv_txrate->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_TX_DATA_RATE); + tlv_txrate->header.len = wlan_cpu_to_le16(sizeof(t_u16)); + tlv_txrate->tx_data_rate = + wlan_cpu_to_le16(bss->param.bss_config.tx_data_rate); + cmd_size += sizeof(MrvlIEtypes_tx_rate_t); + tlv += sizeof(MrvlIEtypes_tx_rate_t); + } + + if (bss->param.bss_config.mcbc_data_rate <= DATA_RATE_54M) { + tlv_mcbc_rate = (MrvlIEtypes_mcbc_rate_t *)tlv; + tlv_mcbc_rate->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_MCBC_DATA_RATE); + tlv_mcbc_rate->header.len = wlan_cpu_to_le16(sizeof(t_u16)); + tlv_mcbc_rate->mcbc_data_rate = + wlan_cpu_to_le16(bss->param.bss_config.mcbc_data_rate); + cmd_size += sizeof(MrvlIEtypes_mcbc_rate_t); + tlv += sizeof(MrvlIEtypes_mcbc_rate_t); + } + + if (bss->param.bss_config.tx_power_level <= MAX_TX_POWER) { + tlv_tx_power = (MrvlIEtypes_tx_power_t *)tlv; + tlv_tx_power->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_TX_POWER); + tlv_tx_power->header.len = wlan_cpu_to_le16(sizeof(t_u8)); + tlv_tx_power->tx_power = bss->param.bss_config.tx_power_level; + cmd_size += sizeof(MrvlIEtypes_tx_power_t); + tlv += sizeof(MrvlIEtypes_tx_power_t); + } + + if (bss->param.bss_config.bcast_ssid_ctl <= MTRUE) { + tlv_bcast_ssid = (MrvlIEtypes_bcast_ssid_t *)tlv; + tlv_bcast_ssid->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_BCAST_SSID_CTL); + tlv_bcast_ssid->header.len = wlan_cpu_to_le16(sizeof(t_u8)); + tlv_bcast_ssid->bcast_ssid_ctl = + bss->param.bss_config.bcast_ssid_ctl; + cmd_size += sizeof(MrvlIEtypes_bcast_ssid_t); + tlv += sizeof(MrvlIEtypes_bcast_ssid_t); + } + + if ((bss->param.bss_config.tx_antenna == ANTENNA_MODE_A) || + (bss->param.bss_config.tx_antenna == ANTENNA_MODE_B)) { + tlv_antenna = (MrvlIEtypes_antenna_mode_t *)tlv; + tlv_antenna->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_ANTENNA_CTL); + tlv_antenna->header.len = + wlan_cpu_to_le16(sizeof(t_u8) + sizeof(t_u8)); + tlv_antenna->which_antenna = TX_ANTENNA; + tlv_antenna->antenna_mode = bss->param.bss_config.tx_antenna; + cmd_size += sizeof(MrvlIEtypes_antenna_mode_t); + tlv += sizeof(MrvlIEtypes_antenna_mode_t); + } + + if ((bss->param.bss_config.rx_antenna == ANTENNA_MODE_A) || + (bss->param.bss_config.rx_antenna == ANTENNA_MODE_B)) { + tlv_antenna = (MrvlIEtypes_antenna_mode_t *)tlv; + tlv_antenna->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_ANTENNA_CTL); + tlv_antenna->header.len = + wlan_cpu_to_le16(sizeof(t_u8) + sizeof(t_u8)); + tlv_antenna->which_antenna = RX_ANTENNA; + tlv_antenna->antenna_mode = bss->param.bss_config.rx_antenna; + cmd_size += sizeof(MrvlIEtypes_antenna_mode_t); + tlv += sizeof(MrvlIEtypes_antenna_mode_t); + } + + if (bss->param.bss_config.pkt_forward_ctl <= MAX_PKT_FWD_CTRL) { + tlv_pkt_forward = (MrvlIEtypes_pkt_forward_t *)tlv; + tlv_pkt_forward->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_PKT_FWD_CTL); + tlv_pkt_forward->header.len = wlan_cpu_to_le16(sizeof(t_u8)); + tlv_pkt_forward->pkt_forward_ctl = + bss->param.bss_config.pkt_forward_ctl; + cmd_size += sizeof(MrvlIEtypes_pkt_forward_t); + tlv += sizeof(MrvlIEtypes_pkt_forward_t); + } + + if (bss->param.bss_config.max_sta_count <= MAX_STA_COUNT) { + tlv_sta_count = (MrvlIEtypes_max_sta_count_t *)tlv; + tlv_sta_count->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_MAX_STA_CNT); + tlv_sta_count->header.len = wlan_cpu_to_le16(sizeof(t_u16)); + tlv_sta_count->max_sta_count = + wlan_cpu_to_le16(bss->param.bss_config.max_sta_count); + cmd_size += sizeof(MrvlIEtypes_max_sta_count_t); + tlv += sizeof(MrvlIEtypes_max_sta_count_t); + } + + if (((bss->param.bss_config.sta_ageout_timer >= MIN_STAGE_OUT_TIME) && + (bss->param.bss_config.sta_ageout_timer <= MAX_STAGE_OUT_TIME)) || + (bss->param.bss_config.sta_ageout_timer == 0)) { + tlv_sta_ageout = (MrvlIEtypes_sta_ageout_t *)tlv; + tlv_sta_ageout->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_STA_AGEOUT_TIMER); + tlv_sta_ageout->header.len = wlan_cpu_to_le16(sizeof(t_u32)); + tlv_sta_ageout->sta_ageout_timer = + wlan_cpu_to_le32(bss->param.bss_config. + sta_ageout_timer); + cmd_size += sizeof(MrvlIEtypes_sta_ageout_t); + tlv += sizeof(MrvlIEtypes_sta_ageout_t); + } + + if (((bss->param.bss_config.ps_sta_ageout_timer >= MIN_STAGE_OUT_TIME) + && (bss->param.bss_config.ps_sta_ageout_timer <= + MAX_STAGE_OUT_TIME)) || + (bss->param.bss_config.ps_sta_ageout_timer == 0)) { + tlv_ps_sta_ageout = (MrvlIEtypes_ps_sta_ageout_t *)tlv; + tlv_ps_sta_ageout->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_PS_STA_AGEOUT_TIMER); + tlv_ps_sta_ageout->header.len = wlan_cpu_to_le16(sizeof(t_u32)); + tlv_ps_sta_ageout->ps_sta_ageout_timer = + wlan_cpu_to_le32(bss->param.bss_config. + ps_sta_ageout_timer); + cmd_size += sizeof(MrvlIEtypes_ps_sta_ageout_t); + tlv += sizeof(MrvlIEtypes_ps_sta_ageout_t); + } + if (bss->param.bss_config.rts_threshold <= MAX_RTS_THRESHOLD) { + tlv_rts_threshold = (MrvlIEtypes_rts_threshold_t *)tlv; + tlv_rts_threshold->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_RTS_THRESHOLD); + tlv_rts_threshold->header.len = wlan_cpu_to_le16(sizeof(t_u16)); + tlv_rts_threshold->rts_threshold = + wlan_cpu_to_le16(bss->param.bss_config.rts_threshold); + cmd_size += sizeof(MrvlIEtypes_rts_threshold_t); + tlv += sizeof(MrvlIEtypes_rts_threshold_t); + } + + if ((bss->param.bss_config.frag_threshold >= MIN_FRAG_THRESHOLD) && + (bss->param.bss_config.frag_threshold <= MAX_FRAG_THRESHOLD)) { + tlv_frag_threshold = (MrvlIEtypes_frag_threshold_t *)tlv; + tlv_frag_threshold->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_FRAG_THRESHOLD); + tlv_frag_threshold->header.len = + wlan_cpu_to_le16(sizeof(t_u16)); + tlv_frag_threshold->frag_threshold = + wlan_cpu_to_le16(bss->param.bss_config.frag_threshold); + cmd_size += sizeof(MrvlIEtypes_frag_threshold_t); + tlv += sizeof(MrvlIEtypes_frag_threshold_t); + } + + if (bss->param.bss_config.retry_limit <= MAX_RETRY_LIMIT) { + tlv_retry_limit = (MrvlIEtypes_retry_limit_t *)tlv; + tlv_retry_limit->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_RETRY_LIMIT); + tlv_retry_limit->header.len = wlan_cpu_to_le16(sizeof(t_u8)); + tlv_retry_limit->retry_limit = + (t_u8)bss->param.bss_config.retry_limit; + cmd_size += sizeof(MrvlIEtypes_retry_limit_t); + tlv += sizeof(MrvlIEtypes_retry_limit_t); + } + if (!pmpriv->adapter->psdio_device->driver_supplicant_auth) { + if (bss->param.bss_config.pairwise_update_timeout < + (MAX_VALID_DWORD)) { + tlv_pairwise_timeout = + (MrvlIEtypes_eapol_pwk_hsk_timeout_t *)tlv; + tlv_pairwise_timeout->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_UAP_EAPOL_PWK_HSK_TIMEOUT); + tlv_pairwise_timeout->header.len = + wlan_cpu_to_le16(sizeof(t_u32)); + tlv_pairwise_timeout->pairwise_update_timeout = + wlan_cpu_to_le32(bss->param.bss_config. + pairwise_update_timeout); + cmd_size += sizeof(MrvlIEtypes_eapol_pwk_hsk_timeout_t); + tlv += sizeof(MrvlIEtypes_eapol_pwk_hsk_timeout_t); + } + + if (bss->param.bss_config.pwk_retries < (MAX_VALID_DWORD)) { + tlv_pairwise_retries = + (MrvlIEtypes_eapol_pwk_hsk_retries_t *)tlv; + tlv_pairwise_retries->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_UAP_EAPOL_PWK_HSK_RETRIES); + tlv_pairwise_retries->header.len = + wlan_cpu_to_le16(sizeof(t_u32)); + tlv_pairwise_retries->pwk_retries = + wlan_cpu_to_le32(bss->param.bss_config. + pwk_retries); + cmd_size += sizeof(MrvlIEtypes_eapol_pwk_hsk_retries_t); + tlv += sizeof(MrvlIEtypes_eapol_pwk_hsk_retries_t); + } + + if (bss->param.bss_config.groupwise_update_timeout < + (MAX_VALID_DWORD)) { + tlv_groupwise_timeout = + (MrvlIEtypes_eapol_gwk_hsk_timeout_t *)tlv; + tlv_groupwise_timeout->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_UAP_EAPOL_GWK_HSK_TIMEOUT); + tlv_groupwise_timeout->header.len = + wlan_cpu_to_le16(sizeof(t_u32)); + tlv_groupwise_timeout->groupwise_update_timeout = + wlan_cpu_to_le32(bss->param.bss_config. + groupwise_update_timeout); + cmd_size += sizeof(MrvlIEtypes_eapol_gwk_hsk_timeout_t); + tlv += sizeof(MrvlIEtypes_eapol_gwk_hsk_timeout_t); + } + + if (bss->param.bss_config.gwk_retries < (MAX_VALID_DWORD)) { + tlv_groupwise_retries = + (MrvlIEtypes_eapol_gwk_hsk_retries_t *)tlv; + tlv_groupwise_retries->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_UAP_EAPOL_GWK_HSK_RETRIES); + tlv_groupwise_retries->header.len = + wlan_cpu_to_le16(sizeof(t_u32)); + tlv_groupwise_retries->gwk_retries = + wlan_cpu_to_le32(bss->param.bss_config. + gwk_retries); + cmd_size += sizeof(MrvlIEtypes_eapol_gwk_hsk_retries_t); + tlv += sizeof(MrvlIEtypes_eapol_gwk_hsk_retries_t); + } + } + if ((bss->param.bss_config.filter.filter_mode <= + MAC_FILTER_MODE_BLOCK_MAC) + && (bss->param.bss_config.filter.mac_count <= MAX_MAC_FILTER_NUM)) { + tlv_mac_filter = (MrvlIEtypes_mac_filter_t *)tlv; + tlv_mac_filter->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_STA_MAC_ADDR_FILTER); + tlv_mac_filter->header.len = + wlan_cpu_to_le16(2 + + MLAN_MAC_ADDR_LENGTH * + bss->param.bss_config.filter. + mac_count); + tlv_mac_filter->count = + (t_u8)bss->param.bss_config.filter.mac_count; + tlv_mac_filter->filter_mode = + (t_u8)bss->param.bss_config.filter.filter_mode; + memcpy(pmpriv->adapter, tlv_mac_filter->mac_address, + (t_u8 *)bss->param.bss_config.filter.mac_list, + MLAN_MAC_ADDR_LENGTH * + bss->param.bss_config.filter.mac_count); + cmd_size += + sizeof(MrvlIEtypesHeader_t) + 2 + + MLAN_MAC_ADDR_LENGTH * + bss->param.bss_config.filter.mac_count; + tlv += sizeof(MrvlIEtypesHeader_t) + 2 + + MLAN_MAC_ADDR_LENGTH * + bss->param.bss_config.filter.mac_count; + } + + if ((((bss->param.bss_config.band_cfg & BAND_CONFIG_ACS_MODE) == + BAND_CONFIG_MANUAL) && (bss->param.bss_config.channel > 0) && + (bss->param.bss_config.channel <= MLAN_MAX_CHANNEL)) || + (bss->param.bss_config.band_cfg & BAND_CONFIG_ACS_MODE)) { + tlv_chan_band = (MrvlIEtypes_channel_band_t *)tlv; + tlv_chan_band->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_CHAN_BAND_CONFIG); + tlv_chan_band->header.len = + wlan_cpu_to_le16(sizeof(t_u8) + sizeof(t_u8)); + tlv_chan_band->band_config = bss->param.bss_config.band_cfg; + tlv_chan_band->channel = bss->param.bss_config.channel; + cmd_size += sizeof(MrvlIEtypes_channel_band_t); + tlv += sizeof(MrvlIEtypes_channel_band_t); + } + + if ((bss->param.bss_config.num_of_chan) && + (bss->param.bss_config.num_of_chan <= MLAN_MAX_CHANNEL)) { + tlv_chan_list = (MrvlIEtypes_ChanListParamSet_t *)tlv; + tlv_chan_list->header.type = + wlan_cpu_to_le16(TLV_TYPE_CHANLIST); + tlv_chan_list->header.len = + wlan_cpu_to_le16((t_u16) + (sizeof(ChanScanParamSet_t) * + bss->param.bss_config.num_of_chan)); + pscan_chan = tlv_chan_list->chan_scan_param; + for (i = 0; i < bss->param.bss_config.num_of_chan; i++) { + pscan_chan->chan_number = + bss->param.bss_config.chan_list[i].chan_number; + pscan_chan->radio_type = + bss->param.bss_config.chan_list[i]. + band_config_type; + pscan_chan++; + } + cmd_size += sizeof(tlv_chan_list->header) + + (sizeof(ChanScanParamSet_t) * + bss->param.bss_config.num_of_chan); + tlv += sizeof(tlv_chan_list->header) + + (sizeof(ChanScanParamSet_t) * + bss->param.bss_config.num_of_chan); + } + + if ((bss->param.bss_config.auth_mode <= MLAN_AUTH_MODE_SHARED) || + (bss->param.bss_config.auth_mode == MLAN_AUTH_MODE_AUTO)) { + tlv_auth_type = (MrvlIEtypes_auth_type_t *)tlv; + tlv_auth_type->header.type = + wlan_cpu_to_le16(TLV_TYPE_AUTH_TYPE); + tlv_auth_type->header.len = wlan_cpu_to_le16(sizeof(t_u8)); + tlv_auth_type->auth_type = + (t_u8)bss->param.bss_config.auth_mode; + cmd_size += sizeof(MrvlIEtypes_auth_type_t); + tlv += sizeof(MrvlIEtypes_auth_type_t); + } + + if (bss->param.bss_config.protocol) { + tlv_encrypt_protocol = (MrvlIEtypes_encrypt_protocol_t *)tlv; + tlv_encrypt_protocol->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_ENCRYPT_PROTOCOL); + tlv_encrypt_protocol->header.len = + wlan_cpu_to_le16(sizeof(t_u16)); + tlv_encrypt_protocol->protocol = + wlan_cpu_to_le16(bss->param.bss_config.protocol); + cmd_size += sizeof(MrvlIEtypes_encrypt_protocol_t); + tlv += sizeof(MrvlIEtypes_encrypt_protocol_t); + } + + if ((bss->param.bss_config.protocol & PROTOCOL_WPA) || + (bss->param.bss_config.protocol & PROTOCOL_WPA2) || + (bss->param.bss_config.protocol & PROTOCOL_EAP)) { + tlv_akmp = (MrvlIEtypes_akmp_t *)tlv; + tlv_akmp->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_AKMP); + tlv_akmp->key_mgmt = + wlan_cpu_to_le16(bss->param.bss_config.key_mgmt); + tlv_akmp->header.len = sizeof(t_u16); + tlv_akmp->key_mgmt_operation = + wlan_cpu_to_le16(bss->param.bss_config. + key_mgmt_operation); + tlv_akmp->header.len += sizeof(t_u16); + tlv_akmp->header.len = wlan_cpu_to_le16(tlv_akmp->header.len); + cmd_size += sizeof(MrvlIEtypes_akmp_t); + tlv += sizeof(MrvlIEtypes_akmp_t); + + if (bss->param.bss_config.wpa_cfg. + pairwise_cipher_wpa & VALID_CIPHER_BITMAP) { + tlv_pwk_cipher = (MrvlIEtypes_pwk_cipher_t *)tlv; + tlv_pwk_cipher->header.type = + wlan_cpu_to_le16(TLV_TYPE_PWK_CIPHER); + tlv_pwk_cipher->header.len = + wlan_cpu_to_le16(sizeof(t_u16) + sizeof(t_u8) + + sizeof(t_u8)); + tlv_pwk_cipher->protocol = + wlan_cpu_to_le16(PROTOCOL_WPA); + tlv_pwk_cipher->pairwise_cipher = + bss->param.bss_config.wpa_cfg. + pairwise_cipher_wpa; + cmd_size += sizeof(MrvlIEtypes_pwk_cipher_t); + tlv += sizeof(MrvlIEtypes_pwk_cipher_t); + } + + if (bss->param.bss_config.wpa_cfg. + pairwise_cipher_wpa2 & VALID_CIPHER_BITMAP) { + tlv_pwk_cipher = (MrvlIEtypes_pwk_cipher_t *)tlv; + tlv_pwk_cipher->header.type = + wlan_cpu_to_le16(TLV_TYPE_PWK_CIPHER); + tlv_pwk_cipher->header.len = + wlan_cpu_to_le16(sizeof(t_u16) + sizeof(t_u8) + + sizeof(t_u8)); + tlv_pwk_cipher->protocol = + wlan_cpu_to_le16(PROTOCOL_WPA2); + tlv_pwk_cipher->pairwise_cipher = + bss->param.bss_config.wpa_cfg. + pairwise_cipher_wpa2; + cmd_size += sizeof(MrvlIEtypes_pwk_cipher_t); + tlv += sizeof(MrvlIEtypes_pwk_cipher_t); + } + + if (bss->param.bss_config.wpa_cfg. + group_cipher & VALID_CIPHER_BITMAP) { + tlv_gwk_cipher = (MrvlIEtypes_gwk_cipher_t *)tlv; + tlv_gwk_cipher->header.type = + wlan_cpu_to_le16(TLV_TYPE_GWK_CIPHER); + tlv_gwk_cipher->header.len = + wlan_cpu_to_le16(sizeof(t_u8) + sizeof(t_u8)); + tlv_gwk_cipher->group_cipher = + bss->param.bss_config.wpa_cfg.group_cipher; + cmd_size += sizeof(MrvlIEtypes_gwk_cipher_t); + tlv += sizeof(MrvlIEtypes_gwk_cipher_t); + } + + if (bss->param.bss_config.wpa_cfg.rsn_protection <= MTRUE) { + tlv_rsn_prot = (MrvlIEtypes_rsn_replay_prot_t *)tlv; + tlv_rsn_prot->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_UAP_RSN_REPLAY_PROTECT); + tlv_rsn_prot->header.len = + wlan_cpu_to_le16(sizeof(t_u8)); + tlv_rsn_prot->rsn_replay_prot = + bss->param.bss_config.wpa_cfg.rsn_protection; + cmd_size += sizeof(MrvlIEtypes_rsn_replay_prot_t); + tlv += sizeof(MrvlIEtypes_rsn_replay_prot_t); + } + if (!pmpriv->adapter->psdio_device->driver_supplicant_auth) { + if (bss->param.bss_config.wpa_cfg.length) { + tlv_passphrase = + (MrvlIEtypes_passphrase_t *)tlv; + tlv_passphrase->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_UAP_WPA_PASSPHRASE); + tlv_passphrase->header.len = + (t_u16)wlan_cpu_to_le16(bss->param. + bss_config. + wpa_cfg.length); + memcpy(pmpriv->adapter, + tlv_passphrase->passphrase, + bss->param.bss_config.wpa_cfg.passphrase, + bss->param.bss_config.wpa_cfg.length); + cmd_size += + sizeof(MrvlIEtypesHeader_t) + + bss->param.bss_config.wpa_cfg.length; + tlv += sizeof(MrvlIEtypesHeader_t) + + bss->param.bss_config.wpa_cfg.length; + } + + if (bss->param.bss_config.wpa_cfg.gk_rekey_time < + MAX_GRP_TIMER) { + tlv_rekey_time = + (MrvlIEtypes_group_rekey_time_t *)tlv; + tlv_rekey_time->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_UAP_GRP_REKEY_TIME); + tlv_rekey_time->header.len = + wlan_cpu_to_le16(sizeof(t_u32)); + tlv_rekey_time->gk_rekey_time = + wlan_cpu_to_le32(bss->param.bss_config. + wpa_cfg.gk_rekey_time); + cmd_size += + sizeof(MrvlIEtypes_group_rekey_time_t); + tlv += sizeof(MrvlIEtypes_group_rekey_time_t); + } + } + } else { + if ((bss->param.bss_config.wep_cfg.key0.length) && + ((bss->param.bss_config.wep_cfg.key0.length == 5) || + (bss->param.bss_config.wep_cfg.key0.length == 10) || + (bss->param.bss_config.wep_cfg.key0.length == 13) || + (bss->param.bss_config.wep_cfg.key0.length == 26))) { + tlv_wep_key = (MrvlIEtypes_wep_key_t *)tlv; + tlv_wep_key->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_WEP_KEY); + tlv_wep_key->header.len = + wlan_cpu_to_le16(2 + + bss->param.bss_config.wep_cfg. + key0.length); + tlv_wep_key->key_index = + bss->param.bss_config.wep_cfg.key0.key_index; + tlv_wep_key->is_default = + bss->param.bss_config.wep_cfg.key0.is_default; + memcpy(pmpriv->adapter, tlv_wep_key->key, + bss->param.bss_config.wep_cfg.key0.key, + bss->param.bss_config.wep_cfg.key0.length); + cmd_size += + sizeof(MrvlIEtypesHeader_t) + 2 + + bss->param.bss_config.wep_cfg.key0.length; + tlv += sizeof(MrvlIEtypesHeader_t) + 2 + + bss->param.bss_config.wep_cfg.key0.length; + } + + if ((bss->param.bss_config.wep_cfg.key1.length) && + ((bss->param.bss_config.wep_cfg.key1.length == 5) || + (bss->param.bss_config.wep_cfg.key1.length == 10) || + (bss->param.bss_config.wep_cfg.key1.length == 13) || + (bss->param.bss_config.wep_cfg.key1.length == 26))) { + tlv_wep_key = (MrvlIEtypes_wep_key_t *)tlv; + tlv_wep_key->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_WEP_KEY); + tlv_wep_key->header.len = + wlan_cpu_to_le16(2 + + bss->param.bss_config.wep_cfg. + key1.length); + tlv_wep_key->key_index = + bss->param.bss_config.wep_cfg.key1.key_index; + tlv_wep_key->is_default = + bss->param.bss_config.wep_cfg.key1.is_default; + memcpy(pmpriv->adapter, tlv_wep_key->key, + bss->param.bss_config.wep_cfg.key1.key, + bss->param.bss_config.wep_cfg.key1.length); + cmd_size += + sizeof(MrvlIEtypesHeader_t) + 2 + + bss->param.bss_config.wep_cfg.key1.length; + tlv += sizeof(MrvlIEtypesHeader_t) + 2 + + bss->param.bss_config.wep_cfg.key1.length; + } + + if ((bss->param.bss_config.wep_cfg.key2.length) && + ((bss->param.bss_config.wep_cfg.key2.length == 5) || + (bss->param.bss_config.wep_cfg.key2.length == 10) || + (bss->param.bss_config.wep_cfg.key2.length == 13) || + (bss->param.bss_config.wep_cfg.key2.length == 26))) { + tlv_wep_key = (MrvlIEtypes_wep_key_t *)tlv; + tlv_wep_key->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_WEP_KEY); + tlv_wep_key->header.len = + wlan_cpu_to_le16(2 + + bss->param.bss_config.wep_cfg. + key2.length); + tlv_wep_key->key_index = + bss->param.bss_config.wep_cfg.key2.key_index; + tlv_wep_key->is_default = + bss->param.bss_config.wep_cfg.key2.is_default; + memcpy(pmpriv->adapter, tlv_wep_key->key, + bss->param.bss_config.wep_cfg.key2.key, + bss->param.bss_config.wep_cfg.key2.length); + cmd_size += + sizeof(MrvlIEtypesHeader_t) + 2 + + bss->param.bss_config.wep_cfg.key2.length; + tlv += sizeof(MrvlIEtypesHeader_t) + 2 + + bss->param.bss_config.wep_cfg.key2.length; + } + + if ((bss->param.bss_config.wep_cfg.key3.length) && + ((bss->param.bss_config.wep_cfg.key3.length == 5) || + (bss->param.bss_config.wep_cfg.key3.length == 10) || + (bss->param.bss_config.wep_cfg.key3.length == 13) || + (bss->param.bss_config.wep_cfg.key3.length == 26))) { + tlv_wep_key = (MrvlIEtypes_wep_key_t *)tlv; + tlv_wep_key->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_WEP_KEY); + tlv_wep_key->header.len = + wlan_cpu_to_le16(2 + + bss->param.bss_config.wep_cfg. + key3.length); + tlv_wep_key->key_index = + bss->param.bss_config.wep_cfg.key3.key_index; + tlv_wep_key->is_default = + bss->param.bss_config.wep_cfg.key3.is_default; + memcpy(pmpriv->adapter, tlv_wep_key->key, + bss->param.bss_config.wep_cfg.key3.key, + bss->param.bss_config.wep_cfg.key3.length); + cmd_size += + sizeof(MrvlIEtypesHeader_t) + 2 + + bss->param.bss_config.wep_cfg.key3.length; + tlv += sizeof(MrvlIEtypesHeader_t) + 2 + + bss->param.bss_config.wep_cfg.key3.length; + } + } + if ((bss->param.bss_config.ht_cap_info) + ) { + tlv_htcap = (MrvlIETypes_HTCap_t *)tlv; + tlv_htcap->header.type = wlan_cpu_to_le16(HT_CAPABILITY); + tlv_htcap->header.len = wlan_cpu_to_le16(sizeof(HTCap_t)); + tlv_htcap->ht_cap.ht_cap_info = + wlan_cpu_to_le16(bss->param.bss_config.ht_cap_info); + tlv_htcap->ht_cap.ampdu_param = + bss->param.bss_config.ampdu_param; + memcpy(pmpriv->adapter, tlv_htcap->ht_cap.supported_mcs_set, + bss->param.bss_config.supported_mcs_set, 16); + tlv_htcap->ht_cap.ht_ext_cap = + wlan_cpu_to_le16(bss->param.bss_config.ht_ext_cap); + tlv_htcap->ht_cap.tx_bf_cap = + wlan_cpu_to_le32(bss->param.bss_config.tx_bf_cap); + tlv_htcap->ht_cap.asel = bss->param.bss_config.asel; + cmd_size += sizeof(MrvlIETypes_HTCap_t); + tlv += sizeof(MrvlIETypes_HTCap_t); + } + if (bss->param.bss_config.mgmt_ie_passthru_mask < (MAX_VALID_DWORD)) { + tlv_mgmt_ie_passthru = (MrvlIEtypes_mgmt_ie_passthru_t *)tlv; + tlv_mgmt_ie_passthru->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_MGMT_IE_PASSTHRU_MASK); + tlv_mgmt_ie_passthru->header.len = + wlan_cpu_to_le16(sizeof(t_u32)); + /* keep copy in private data */ + pmpriv->mgmt_frame_passthru_mask = + bss->param.bss_config.mgmt_ie_passthru_mask; + tlv_mgmt_ie_passthru->mgmt_ie_mask = + wlan_cpu_to_le32(bss->param.bss_config. + mgmt_ie_passthru_mask); + cmd_size += sizeof(MrvlIEtypes_mgmt_ie_passthru_t); + tlv += sizeof(MrvlIEtypes_mgmt_ie_passthru_t); + } + if (((bss->param.bss_config.enable_2040coex == 0) || + (bss->param.bss_config.enable_2040coex == 1)) + ) { + tlv_2040_coex_enable = (MrvlIEtypes_2040_coex_enable_t *)tlv; + tlv_2040_coex_enable->header.type = + wlan_cpu_to_le16(TLV_TYPE_2040_BSS_COEX_CONTROL); + tlv_2040_coex_enable->header.len = + wlan_cpu_to_le16(sizeof(t_u8)); + tlv_2040_coex_enable->enable_2040coex = + bss->param.bss_config.enable_2040coex; + cmd_size += sizeof(MrvlIEtypes_2040_coex_enable_t); + tlv += sizeof(MrvlIEtypes_2040_coex_enable_t); + } + if (bss->param.bss_config.wmm_para.qos_info == 0x80 || + bss->param.bss_config.wmm_para.qos_info == 0x00) { + tlv_wmm_parameter = (MrvlIEtypes_wmm_parameter_t *)tlv; + tlv_wmm_parameter->header.type = + wlan_cpu_to_le16(TLV_TYPE_VENDOR_SPECIFIC_IE); + tlv_wmm_parameter->header.len = + wlan_cpu_to_le16(sizeof + (bss->param.bss_config.wmm_para)); + memcpy(pmpriv->adapter, tlv_wmm_parameter->wmm_para.ouitype, + bss->param.bss_config.wmm_para.ouitype, + sizeof(tlv_wmm_parameter->wmm_para.ouitype)); + tlv_wmm_parameter->wmm_para.ouisubtype = + bss->param.bss_config.wmm_para.ouisubtype; + tlv_wmm_parameter->wmm_para.version = + bss->param.bss_config.wmm_para.version; + tlv_wmm_parameter->wmm_para.qos_info = + bss->param.bss_config.wmm_para.qos_info; + for (ac = 0; ac < 4; ac++) { + tlv_wmm_parameter->wmm_para.ac_params[ac].aci_aifsn. + aifsn = + bss->param.bss_config.wmm_para.ac_params[ac]. + aci_aifsn.aifsn; + tlv_wmm_parameter->wmm_para.ac_params[ac].aci_aifsn. + aci = + bss->param.bss_config.wmm_para.ac_params[ac]. + aci_aifsn.aci; + tlv_wmm_parameter->wmm_para.ac_params[ac].ecw.ecw_max = + bss->param.bss_config.wmm_para.ac_params[ac]. + ecw.ecw_max; + tlv_wmm_parameter->wmm_para.ac_params[ac].ecw.ecw_min = + bss->param.bss_config.wmm_para.ac_params[ac]. + ecw.ecw_min; + tlv_wmm_parameter->wmm_para.ac_params[ac].tx_op_limit = + wlan_cpu_to_le16(bss->param.bss_config.wmm_para. + ac_params[ac].tx_op_limit); + } + cmd_size += sizeof(MrvlIEtypes_wmm_parameter_t); + tlv += sizeof(MrvlIEtypes_wmm_parameter_t); + } + cmd->size = (t_u16)wlan_cpu_to_le16(cmd_size); + PRINTM(MCMND, "AP config: cmd_size=%d\n", cmd_size); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of sys_config + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action the action: GET or SET + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_uap_cmd_sys_configure(pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, + IN pmlan_ioctl_req pioctl_buf, IN t_void *pdata_buf) +{ + mlan_ds_bss *bss = MNULL; + HostCmd_DS_SYS_CONFIG *sys_config = + (HostCmd_DS_SYS_CONFIG *)&cmd->params.sys_config; + MrvlIEtypes_MacAddr_t *mac_tlv = MNULL; + MrvlIEtypes_channel_band_t *pdat_tlv_cb = MNULL; + MrvlIEtypes_beacon_period_t *bcn_pd_tlv = MNULL, *pdat_tlv_bcnpd = + MNULL; + MrvlIEtypes_dtim_period_t *dtim_pd_tlv = MNULL, *pdat_tlv_dtimpd = + MNULL; + MrvlIEtypes_wmm_parameter_t *tlv_wmm_parameter = MNULL; + MrvlIEtypes_ChanListParamSet_t *tlv_chan_list = MNULL; + ChanScanParamSet_t *pscan_chan = MNULL; + MrvlIEtypes_channel_band_t *chan_band_tlv = MNULL; + t_u16 i = 0; + t_u8 ac = 0; + mlan_ds_misc_custom_ie *cust_ie = MNULL; + mlan_ds_misc_cfg *misc = MNULL; + MrvlIEtypesHeader_t *ie_header = + (MrvlIEtypesHeader_t *)sys_config->tlv_buffer; + t_u8 *ie = (t_u8 *)sys_config->tlv_buffer + sizeof(MrvlIEtypesHeader_t); + t_u16 req_len = 0, travel_len = 0; + custom_ie *cptr = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_SYS_CONFIGURE); + sys_config->action = wlan_cpu_to_le16(cmd_action); + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_SYS_CONFIG) - 1 + S_DS_GEN); + if (pioctl_buf == MNULL) { + + if (pdata_buf) { + switch (*(t_u16 *)pdata_buf) { + case TLV_TYPE_UAP_CHAN_BAND_CONFIG: + pdat_tlv_cb = + (MrvlIEtypes_channel_band_t *)pdata_buf; + chan_band_tlv = + (MrvlIEtypes_channel_band_t *) + sys_config->tlv_buffer; + cmd->size = + wlan_cpu_to_le16(sizeof + (HostCmd_DS_SYS_CONFIG) + - 1 + S_DS_GEN + + sizeof + (MrvlIEtypes_channel_band_t)); + chan_band_tlv->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_UAP_CHAN_BAND_CONFIG); + chan_band_tlv->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_channel_band_t) + - + sizeof + (MrvlIEtypesHeader_t)); + if (cmd_action) { + chan_band_tlv->band_config = + pdat_tlv_cb->band_config; + chan_band_tlv->channel = + pdat_tlv_cb->channel; + } + ret = MLAN_STATUS_SUCCESS; + break; + case TLV_TYPE_UAP_BEACON_PERIOD: + pdat_tlv_bcnpd = + (MrvlIEtypes_beacon_period_t *) + pdata_buf; + bcn_pd_tlv = + (MrvlIEtypes_beacon_period_t *) + sys_config->tlv_buffer; + cmd->size = + sizeof(HostCmd_DS_SYS_CONFIG) - 1 + + S_DS_GEN + + sizeof(MrvlIEtypes_beacon_period_t); + bcn_pd_tlv->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_UAP_BEACON_PERIOD); + bcn_pd_tlv->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_beacon_period_t) + - + sizeof + (MrvlIEtypesHeader_t)); + if (cmd_action) { + bcn_pd_tlv->beacon_period = + wlan_cpu_to_le16 + (pdat_tlv_bcnpd->beacon_period); + } + /* Add TLV_UAP_DTIM_PERIOD if it follws in + pdata_buf */ + pdat_tlv_dtimpd = + (MrvlIEtypes_dtim_period_t + *)(((t_u8 *)pdata_buf) + + + sizeof + (MrvlIEtypes_beacon_period_t)); + if (TLV_TYPE_UAP_DTIM_PERIOD == + pdat_tlv_dtimpd->header.type) { + dtim_pd_tlv = + (MrvlIEtypes_dtim_period_t + *)(sys_config->tlv_buffer + + sizeof + (MrvlIEtypes_beacon_period_t)); + cmd->size += + sizeof + (MrvlIEtypes_dtim_period_t); + dtim_pd_tlv->header.type = + wlan_cpu_to_le16 + (TLV_TYPE_UAP_DTIM_PERIOD); + dtim_pd_tlv->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_dtim_period_t) + - + sizeof + (MrvlIEtypesHeader_t)); + if (cmd_action) { + dtim_pd_tlv->dtim_period = + pdat_tlv_dtimpd-> + dtim_period; + } + } + /* Finalize cmd size */ + cmd->size = wlan_cpu_to_le16(cmd->size); + ret = MLAN_STATUS_SUCCESS; + break; + case TLV_TYPE_MGMT_IE: + cust_ie = (mlan_ds_misc_custom_ie *)pdata_buf; + cmd->size = + wlan_cpu_to_le16(sizeof + (HostCmd_DS_SYS_CONFIG) + - 1 + S_DS_GEN + + sizeof + (MrvlIEtypesHeader_t) + + cust_ie->len); + ie_header->type = + wlan_cpu_to_le16(TLV_TYPE_MGMT_IE); + ie_header->len = wlan_cpu_to_le16(cust_ie->len); + + if (ie && cust_ie->ie_data_list) { + req_len = cust_ie->len; + travel_len = 0; + /* conversion for index, mask, len */ + if (req_len == sizeof(t_u16)) + cust_ie->ie_data_list[0]. + ie_index = + wlan_cpu_to_le16 + (cust_ie-> + ie_data_list[0]. + ie_index); + while (req_len > sizeof(t_u16)) { + cptr = (custom_ie + *)(((t_u8 *)&cust_ie-> + ie_data_list) + + travel_len); + travel_len += + cptr->ie_length + + sizeof(custom_ie) - + MAX_IE_SIZE; + req_len -= + cptr->ie_length + + sizeof(custom_ie) - + MAX_IE_SIZE; + cptr->ie_index = + wlan_cpu_to_le16(cptr-> + ie_index); + cptr->mgmt_subtype_mask = + wlan_cpu_to_le16(cptr-> + mgmt_subtype_mask); + cptr->ie_length = + wlan_cpu_to_le16(cptr-> + ie_length); + } + memcpy(pmpriv->adapter, ie, + cust_ie->ie_data_list, + cust_ie->len); + } + break; + default: + PRINTM(MERROR, + "Wrong data, or missing TLV_TYPE 0x%04x handler.\n", + *(t_u16 *)pdata_buf); + break; + } + goto done; + } else { + mac_tlv = + (MrvlIEtypes_MacAddr_t *)sys_config->tlv_buffer; + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_SYS_CONFIG) - + 1 + S_DS_GEN + + sizeof(MrvlIEtypes_MacAddr_t)); + mac_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_MAC_ADDRESS); + mac_tlv->header.len = + wlan_cpu_to_le16(MLAN_MAC_ADDR_LENGTH); + ret = MLAN_STATUS_SUCCESS; + goto done; + } + } + if (pioctl_buf->req_id == MLAN_IOCTL_BSS) { + bss = (mlan_ds_bss *)pioctl_buf->pbuf; + if (bss->sub_command == MLAN_OID_BSS_MAC_ADDR) { + mac_tlv = + (MrvlIEtypes_MacAddr_t *)sys_config->tlv_buffer; + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_SYS_CONFIG) - + 1 + S_DS_GEN + + sizeof(MrvlIEtypes_MacAddr_t)); + mac_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_MAC_ADDRESS); + mac_tlv->header.len = + wlan_cpu_to_le16(MLAN_MAC_ADDR_LENGTH); + if (cmd_action == HostCmd_ACT_GEN_SET) + memcpy(pmpriv->adapter, mac_tlv->mac, + &bss->param.mac_addr, + MLAN_MAC_ADDR_LENGTH); + } else if (bss->sub_command == MLAN_OID_UAP_CFG_WMM_PARAM) { + tlv_wmm_parameter = + (MrvlIEtypes_wmm_parameter_t *)sys_config-> + tlv_buffer; + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_SYS_CONFIG) - + 1 + S_DS_GEN + + sizeof + (MrvlIEtypes_wmm_parameter_t)); + tlv_wmm_parameter->header.type = + wlan_cpu_to_le16(TLV_TYPE_AP_WMM_PARAM); + tlv_wmm_parameter->header.len = + wlan_cpu_to_le16(sizeof + (bss->param.ap_wmm_para)); + if (cmd_action == HostCmd_ACT_GEN_SET) { + for (ac = 0; ac < 4; ac++) { + tlv_wmm_parameter->wmm_para. + ac_params[ac].aci_aifsn.aifsn = + bss->param.ap_wmm_para. + ac_params[ac].aci_aifsn.aifsn; + tlv_wmm_parameter->wmm_para. + ac_params[ac].aci_aifsn.aci = + bss->param.ap_wmm_para. + ac_params[ac].aci_aifsn.aci; + tlv_wmm_parameter->wmm_para. + ac_params[ac].ecw.ecw_max = + bss->param.ap_wmm_para. + ac_params[ac].ecw.ecw_max; + tlv_wmm_parameter->wmm_para. + ac_params[ac].ecw.ecw_min = + bss->param.ap_wmm_para. + ac_params[ac].ecw.ecw_min; + tlv_wmm_parameter->wmm_para. + ac_params[ac].tx_op_limit = + wlan_cpu_to_le16(bss->param. + ap_wmm_para. + ac_params[ac]. + tx_op_limit); + } + } + } else if (bss->sub_command == MLAN_OID_UAP_SCAN_CHANNELS) { + tlv_chan_list = + (MrvlIEtypes_ChanListParamSet_t *)sys_config-> + tlv_buffer; + tlv_chan_list->header.type = + wlan_cpu_to_le16(TLV_TYPE_CHANLIST); + if (bss->param.ap_scan_channels.num_of_chan && + bss->param.ap_scan_channels.num_of_chan <= + MLAN_MAX_CHANNEL) { + cmd->size = + wlan_cpu_to_le16(sizeof + (HostCmd_DS_SYS_CONFIG) + - 1 + S_DS_GEN + + sizeof(tlv_chan_list-> + header) + + sizeof + (ChanScanParamSet_t) * + bss->param. + ap_scan_channels. + num_of_chan); + tlv_chan_list->header.len = + wlan_cpu_to_le16((t_u16) + (sizeof + (ChanScanParamSet_t) * + bss->param. + ap_scan_channels. + num_of_chan)); + pscan_chan = tlv_chan_list->chan_scan_param; + for (i = 0; + i < + bss->param.ap_scan_channels.num_of_chan; + i++) { + pscan_chan->chan_number = + bss->param.ap_scan_channels. + chan_list[i].chan_number; + pscan_chan->radio_type = + bss->param.ap_scan_channels. + chan_list[i].band_config_type; + pscan_chan++; + } + PRINTM(MCMND, + "Set AP scan channel list = %d\n", + bss->param.ap_scan_channels.num_of_chan); + } else { + tlv_chan_list->header.len = + wlan_cpu_to_le16((t_u16) + (sizeof + (ChanScanParamSet_t) * + MLAN_MAX_CHANNEL)); + cmd->size = + wlan_cpu_to_le16(sizeof + (HostCmd_DS_SYS_CONFIG) + - 1 + S_DS_GEN + + sizeof + (MrvlIEtypes_ChanListParamSet_t) + + + sizeof + (ChanScanParamSet_t) * + MLAN_MAX_CHANNEL); + } + } else if (bss->sub_command == MLAN_OID_UAP_CHANNEL) { + chan_band_tlv = + (MrvlIEtypes_channel_band_t *)sys_config-> + tlv_buffer; + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_SYS_CONFIG) - + 1 + S_DS_GEN + + sizeof + (MrvlIEtypes_channel_band_t)); + chan_band_tlv->header.type = + wlan_cpu_to_le16(TLV_TYPE_UAP_CHAN_BAND_CONFIG); + chan_band_tlv->header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_channel_band_t) + - sizeof(MrvlIEtypesHeader_t)); + if (cmd_action == HostCmd_ACT_GEN_SET) { + chan_band_tlv->band_config = + bss->param.ap_channel.band_cfg; + chan_band_tlv->channel = + bss->param.ap_channel.channel; + PRINTM(MCMND, + "Set AP channel, band=%d, channel=%d\n", + bss->param.ap_channel.band_cfg, + bss->param.ap_channel.channel); + } + } else if ((bss->sub_command == MLAN_OID_UAP_BSS_CONFIG) && + (cmd_action == HostCmd_ACT_GEN_SET)) { + ret = wlan_uap_cmd_ap_config(pmpriv, cmd, cmd_action, + pioctl_buf); + goto done; + } + } else if (pioctl_buf->req_id == MLAN_IOCTL_MISC_CFG) { + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + if ((misc->sub_command == MLAN_OID_MISC_GEN_IE) && + (misc->param.gen_ie.type == MLAN_IE_TYPE_GEN_IE) + ) { + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_SYS_CONFIG) - + 1 + S_DS_GEN + + sizeof(MrvlIEtypesHeader_t) + + misc->param.gen_ie.len); + ie_header->type = wlan_cpu_to_le16(TLV_TYPE_WAPI_IE); + ie_header->len = + wlan_cpu_to_le16(misc->param.gen_ie.len); + if (cmd_action == HostCmd_ACT_GEN_SET) + memcpy(pmpriv->adapter, ie, + misc->param.gen_ie.ie_data, + misc->param.gen_ie.len); + } + if ((misc->sub_command == MLAN_OID_MISC_CUSTOM_IE) && + (misc->param.cust_ie.type == TLV_TYPE_MGMT_IE)) { + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_SYS_CONFIG) - + 1 + S_DS_GEN + + sizeof(MrvlIEtypesHeader_t) + + misc->param.cust_ie.len); + ie_header->type = wlan_cpu_to_le16(TLV_TYPE_MGMT_IE); + ie_header->len = + wlan_cpu_to_le16(misc->param.cust_ie.len); + + if (ie && misc->param.cust_ie.ie_data_list) { + req_len = misc->param.cust_ie.len; + travel_len = 0; + /* conversion for index, mask, len */ + if (req_len == sizeof(t_u16)) + misc->param.cust_ie.ie_data_list[0]. + ie_index = + wlan_cpu_to_le16(misc->param. + cust_ie. + ie_data_list + [0].ie_index); + while (req_len > sizeof(t_u16)) { + cptr = (custom_ie + *)(((t_u8 *)&misc->param. + cust_ie.ie_data_list) + + travel_len); + travel_len += + cptr->ie_length + + sizeof(custom_ie) - MAX_IE_SIZE; + req_len -= + cptr->ie_length + + sizeof(custom_ie) - MAX_IE_SIZE; + cptr->ie_index = + wlan_cpu_to_le16(cptr-> + ie_index); + cptr->mgmt_subtype_mask = + wlan_cpu_to_le16(cptr-> + mgmt_subtype_mask); + cptr->ie_length = + wlan_cpu_to_le16(cptr-> + ie_length); + } + if (misc->param.cust_ie.len) + memcpy(pmpriv->adapter, ie, + misc->param.cust_ie.ie_data_list, + misc->param.cust_ie.len); + } + } + } +done: + LEAVE(); + return ret; +} + +/** + * @brief This function handles command resp for get uap settings + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_uap_ret_cmd_ap_config(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_SYS_CONFIG *sys_config = + (HostCmd_DS_SYS_CONFIG *)&resp->params.sys_config; + mlan_ds_bss *bss = MNULL; + MrvlIEtypesHeader_t *tlv = MNULL; + t_u16 tlv_buf_left = 0; + t_u16 tlv_type = 0; + t_u16 tlv_len = 0; + MrvlIEtypes_MacAddr_t *tlv_mac = MNULL; + MrvlIEtypes_SsIdParamSet_t *tlv_ssid = MNULL; + MrvlIEtypes_beacon_period_t *tlv_beacon_period = MNULL; + MrvlIEtypes_dtim_period_t *tlv_dtim_period = MNULL; + MrvlIEtypes_RatesParamSet_t *tlv_rates = MNULL; + MrvlIEtypes_tx_rate_t *tlv_txrate = MNULL; + MrvlIEtypes_mcbc_rate_t *tlv_mcbc_rate = MNULL; + MrvlIEtypes_tx_power_t *tlv_tx_power = MNULL; + MrvlIEtypes_bcast_ssid_t *tlv_bcast_ssid = MNULL; + MrvlIEtypes_antenna_mode_t *tlv_antenna = MNULL; + MrvlIEtypes_pkt_forward_t *tlv_pkt_forward = MNULL; + MrvlIEtypes_max_sta_count_t *tlv_sta_count = MNULL; + MrvlIEtypes_sta_ageout_t *tlv_sta_ageout = MNULL; + MrvlIEtypes_ps_sta_ageout_t *tlv_ps_sta_ageout = MNULL; + MrvlIEtypes_rts_threshold_t *tlv_rts_threshold = MNULL; + MrvlIEtypes_frag_threshold_t *tlv_frag_threshold = MNULL; + MrvlIEtypes_retry_limit_t *tlv_retry_limit = MNULL; + MrvlIEtypes_eapol_pwk_hsk_timeout_t *tlv_pairwise_timeout = MNULL; + MrvlIEtypes_eapol_pwk_hsk_retries_t *tlv_pairwise_retries = MNULL; + MrvlIEtypes_eapol_gwk_hsk_timeout_t *tlv_groupwise_timeout = MNULL; + MrvlIEtypes_eapol_gwk_hsk_retries_t *tlv_groupwise_retries = MNULL; + MrvlIEtypes_mgmt_ie_passthru_t *tlv_mgmt_ie_passthru = MNULL; + MrvlIEtypes_2040_coex_enable_t *tlv_2040_coex_enable = MNULL; + MrvlIEtypes_mac_filter_t *tlv_mac_filter = MNULL; + MrvlIEtypes_channel_band_t *tlv_chan_band = MNULL; + MrvlIEtypes_ChanListParamSet_t *tlv_chan_list = MNULL; + ChanScanParamSet_t *pscan_chan = MNULL; + MrvlIEtypes_auth_type_t *tlv_auth_type = MNULL; + MrvlIEtypes_encrypt_protocol_t *tlv_encrypt_protocol = MNULL; + MrvlIEtypes_akmp_t *tlv_akmp = MNULL; + MrvlIEtypes_pwk_cipher_t *tlv_pwk_cipher = MNULL; + MrvlIEtypes_gwk_cipher_t *tlv_gwk_cipher = MNULL; + MrvlIEtypes_rsn_replay_prot_t *tlv_rsn_prot = MNULL; + MrvlIEtypes_passphrase_t *tlv_passphrase = MNULL; +#ifdef WIFI_DIRECT_SUPPORT + MrvlIEtypes_psk_t *tlv_psk = MNULL; +#endif /* WIFI_DIRECT_SUPPORT */ + MrvlIEtypes_group_rekey_time_t *tlv_rekey_time = MNULL; + MrvlIEtypes_wep_key_t *tlv_wep_key = MNULL; + MrvlIEtypes_preamble_t *tlv_preamble = MNULL; + MrvlIEtypes_bss_status_t *tlv_bss_status = MNULL; + MrvlIETypes_HTCap_t *tlv_htcap = MNULL; + MrvlIEtypes_wmm_parameter_t *tlv_wmm_parameter = MNULL; + + wep_key *pkey = MNULL; + t_u16 i; + t_u16 ac; + + ENTER(); + + bss = (mlan_ds_bss *)pioctl_buf->pbuf; + tlv = (MrvlIEtypesHeader_t *)sys_config->tlv_buffer; + tlv_buf_left = + resp->size - (sizeof(HostCmd_DS_SYS_CONFIG) - 1 + S_DS_GEN); + + while (tlv_buf_left >= sizeof(MrvlIEtypesHeader_t)) { + + tlv_type = wlan_le16_to_cpu(tlv->type); + tlv_len = wlan_le16_to_cpu(tlv->len); + + if (tlv_buf_left < (tlv_len + sizeof(MrvlIEtypesHeader_t))) { + PRINTM(MERROR, + "Error processing uAP sys config TLVs, bytes left < TLV length\n"); + break; + } + + switch (tlv_type) { + case TLV_TYPE_UAP_MAC_ADDRESS: + tlv_mac = (MrvlIEtypes_MacAddr_t *)tlv; + memcpy(pmpriv->adapter, &bss->param.bss_config.mac_addr, + tlv_mac->mac, MLAN_MAC_ADDR_LENGTH); + break; + case TLV_TYPE_SSID: + tlv_ssid = (MrvlIEtypes_SsIdParamSet_t *)tlv; + bss->param.bss_config.ssid.ssid_len = + MIN(MLAN_MAX_SSID_LENGTH, tlv_len); + memcpy(pmpriv->adapter, bss->param.bss_config.ssid.ssid, + tlv_ssid->ssid, MIN(MLAN_MAX_SSID_LENGTH, + tlv_len)); + break; + case TLV_TYPE_UAP_BEACON_PERIOD: + tlv_beacon_period = (MrvlIEtypes_beacon_period_t *)tlv; + bss->param.bss_config.beacon_period = + wlan_le16_to_cpu(tlv_beacon_period-> + beacon_period); + pmpriv->uap_state_chan_cb.beacon_period = + wlan_le16_to_cpu(tlv_beacon_period-> + beacon_period); + break; + case TLV_TYPE_UAP_DTIM_PERIOD: + tlv_dtim_period = (MrvlIEtypes_dtim_period_t *)tlv; + bss->param.bss_config.dtim_period = + tlv_dtim_period->dtim_period; + pmpriv->uap_state_chan_cb.dtim_period = + tlv_dtim_period->dtim_period; + break; + case TLV_TYPE_RATES: + tlv_rates = (MrvlIEtypes_RatesParamSet_t *)tlv; + memcpy(pmpriv->adapter, bss->param.bss_config.rates, + tlv_rates->rates, MIN(MAX_DATA_RATES, tlv_len)); + break; + case TLV_TYPE_UAP_TX_DATA_RATE: + tlv_txrate = (MrvlIEtypes_tx_rate_t *)tlv; + bss->param.bss_config.tx_data_rate = + wlan_le16_to_cpu(tlv_txrate->tx_data_rate); + break; + case TLV_TYPE_UAP_MCBC_DATA_RATE: + tlv_mcbc_rate = (MrvlIEtypes_mcbc_rate_t *)tlv; + bss->param.bss_config.mcbc_data_rate = + wlan_le16_to_cpu(tlv_mcbc_rate->mcbc_data_rate); + break; + case TLV_TYPE_UAP_TX_POWER: + tlv_tx_power = (MrvlIEtypes_tx_power_t *)tlv; + bss->param.bss_config.tx_power_level = + tlv_tx_power->tx_power; + break; + case TLV_TYPE_UAP_BCAST_SSID_CTL: + tlv_bcast_ssid = (MrvlIEtypes_bcast_ssid_t *)tlv; + bss->param.bss_config.bcast_ssid_ctl = + tlv_bcast_ssid->bcast_ssid_ctl; + break; + case TLV_TYPE_UAP_ANTENNA_CTL: + tlv_antenna = (MrvlIEtypes_antenna_mode_t *)tlv; + if (tlv_antenna->which_antenna == TX_ANTENNA) + bss->param.bss_config.tx_antenna = + tlv_antenna->antenna_mode; + else if (tlv_antenna->which_antenna == RX_ANTENNA) + bss->param.bss_config.rx_antenna = + tlv_antenna->antenna_mode; + break; + case TLV_TYPE_UAP_PKT_FWD_CTL: + tlv_pkt_forward = (MrvlIEtypes_pkt_forward_t *)tlv; + bss->param.bss_config.pkt_forward_ctl = + tlv_pkt_forward->pkt_forward_ctl; + break; + case TLV_TYPE_UAP_MAX_STA_CNT: + tlv_sta_count = (MrvlIEtypes_max_sta_count_t *)tlv; + bss->param.bss_config.max_sta_count = + wlan_le16_to_cpu(tlv_sta_count->max_sta_count); + break; + case TLV_TYPE_UAP_STA_AGEOUT_TIMER: + tlv_sta_ageout = (MrvlIEtypes_sta_ageout_t *)tlv; + bss->param.bss_config.sta_ageout_timer = + wlan_le32_to_cpu(tlv_sta_ageout-> + sta_ageout_timer); + break; + case TLV_TYPE_UAP_PS_STA_AGEOUT_TIMER: + tlv_ps_sta_ageout = (MrvlIEtypes_ps_sta_ageout_t *)tlv; + bss->param.bss_config.ps_sta_ageout_timer = + wlan_le32_to_cpu(tlv_ps_sta_ageout-> + ps_sta_ageout_timer); + break; + case TLV_TYPE_UAP_RTS_THRESHOLD: + tlv_rts_threshold = (MrvlIEtypes_rts_threshold_t *)tlv; + bss->param.bss_config.rts_threshold = + wlan_le16_to_cpu(tlv_rts_threshold-> + rts_threshold); + break; + case TLV_TYPE_UAP_FRAG_THRESHOLD: + tlv_frag_threshold = + (MrvlIEtypes_frag_threshold_t *)tlv; + bss->param.bss_config.frag_threshold = + wlan_le16_to_cpu(tlv_frag_threshold-> + frag_threshold); + break; + case TLV_TYPE_UAP_RETRY_LIMIT: + tlv_retry_limit = (MrvlIEtypes_retry_limit_t *)tlv; + bss->param.bss_config.retry_limit = + tlv_retry_limit->retry_limit; + break; + case TLV_TYPE_UAP_EAPOL_PWK_HSK_TIMEOUT: + tlv_pairwise_timeout = + (MrvlIEtypes_eapol_pwk_hsk_timeout_t *)tlv; + bss->param.bss_config.pairwise_update_timeout = + wlan_le32_to_cpu(tlv_pairwise_timeout-> + pairwise_update_timeout); + break; + case TLV_TYPE_UAP_EAPOL_PWK_HSK_RETRIES: + tlv_pairwise_retries = + (MrvlIEtypes_eapol_pwk_hsk_retries_t *)tlv; + bss->param.bss_config.pwk_retries = + wlan_le32_to_cpu(tlv_pairwise_retries-> + pwk_retries); + break; + case TLV_TYPE_UAP_EAPOL_GWK_HSK_TIMEOUT: + tlv_groupwise_timeout = + (MrvlIEtypes_eapol_gwk_hsk_timeout_t *)tlv; + bss->param.bss_config.groupwise_update_timeout = + wlan_le32_to_cpu(tlv_groupwise_timeout-> + groupwise_update_timeout); + break; + case TLV_TYPE_UAP_EAPOL_GWK_HSK_RETRIES: + tlv_groupwise_retries = + (MrvlIEtypes_eapol_gwk_hsk_retries_t *)tlv; + bss->param.bss_config.gwk_retries = + wlan_le32_to_cpu(tlv_groupwise_retries-> + gwk_retries); + break; + case TLV_TYPE_UAP_MGMT_IE_PASSTHRU_MASK: + tlv_mgmt_ie_passthru = + (MrvlIEtypes_mgmt_ie_passthru_t *)tlv; + bss->param.bss_config.mgmt_ie_passthru_mask = + wlan_le32_to_cpu(tlv_mgmt_ie_passthru-> + mgmt_ie_mask); + break; + case TLV_TYPE_2040_BSS_COEX_CONTROL: + tlv_2040_coex_enable = + (MrvlIEtypes_2040_coex_enable_t *)tlv; + bss->param.bss_config.enable_2040coex = + tlv_2040_coex_enable->enable_2040coex; + break; + case TLV_TYPE_UAP_STA_MAC_ADDR_FILTER: + tlv_mac_filter = (MrvlIEtypes_mac_filter_t *)tlv; + bss->param.bss_config.filter.mac_count = + MIN(MAX_MAC_FILTER_NUM, tlv_mac_filter->count); + bss->param.bss_config.filter.filter_mode = + tlv_mac_filter->filter_mode; + memcpy(pmpriv->adapter, + (t_u8 *)bss->param.bss_config.filter.mac_list, + tlv_mac_filter->mac_address, + MLAN_MAC_ADDR_LENGTH * + bss->param.bss_config.filter.mac_count); + break; + case TLV_TYPE_UAP_CHAN_BAND_CONFIG: + tlv_chan_band = (MrvlIEtypes_channel_band_t *)tlv; + bss->param.bss_config.band_cfg = + tlv_chan_band->band_config; + bss->param.bss_config.channel = tlv_chan_band->channel; + pmpriv->uap_state_chan_cb.band_config = + tlv_chan_band->band_config; + pmpriv->uap_state_chan_cb.channel = + tlv_chan_band->channel; + break; + case TLV_TYPE_CHANLIST: + tlv_chan_list = (MrvlIEtypes_ChanListParamSet_t *)tlv; + bss->param.bss_config.num_of_chan = + tlv_len / sizeof(ChanScanParamSet_t); + pscan_chan = tlv_chan_list->chan_scan_param; + for (i = 0; i < bss->param.bss_config.num_of_chan; i++) { + bss->param.bss_config.chan_list[i].chan_number = + pscan_chan->chan_number; + bss->param.bss_config.chan_list[i]. + band_config_type = + pscan_chan->radio_type; + pscan_chan++; + } + break; + case TLV_TYPE_AUTH_TYPE: + tlv_auth_type = (MrvlIEtypes_auth_type_t *)tlv; + bss->param.bss_config.auth_mode = + tlv_auth_type->auth_type; + break; + case TLV_TYPE_UAP_ENCRYPT_PROTOCOL: + tlv_encrypt_protocol = + (MrvlIEtypes_encrypt_protocol_t *)tlv; + bss->param.bss_config.protocol = + wlan_le16_to_cpu(tlv_encrypt_protocol-> + protocol); + break; + case TLV_TYPE_UAP_AKMP: + tlv_akmp = (MrvlIEtypes_akmp_t *)tlv; + bss->param.bss_config.key_mgmt = + wlan_le16_to_cpu(tlv_akmp->key_mgmt); + if (tlv_len > sizeof(t_u16)) + bss->param.bss_config.key_mgmt_operation = + wlan_le16_to_cpu(tlv_akmp-> + key_mgmt_operation); + break; + case TLV_TYPE_PWK_CIPHER: + tlv_pwk_cipher = (MrvlIEtypes_pwk_cipher_t *)tlv; + if (wlan_le16_to_cpu(tlv_pwk_cipher->protocol) & + PROTOCOL_WPA) + bss->param.bss_config.wpa_cfg. + pairwise_cipher_wpa = + tlv_pwk_cipher->pairwise_cipher; + if (wlan_le16_to_cpu(tlv_pwk_cipher->protocol) & + PROTOCOL_WPA2) + bss->param.bss_config.wpa_cfg. + pairwise_cipher_wpa2 = + tlv_pwk_cipher->pairwise_cipher; + break; + case TLV_TYPE_GWK_CIPHER: + tlv_gwk_cipher = (MrvlIEtypes_gwk_cipher_t *)tlv; + bss->param.bss_config.wpa_cfg.group_cipher = + tlv_gwk_cipher->group_cipher; + break; + case TLV_TYPE_UAP_RSN_REPLAY_PROTECT: + tlv_rsn_prot = (MrvlIEtypes_rsn_replay_prot_t *)tlv; + bss->param.bss_config.wpa_cfg.rsn_protection = + tlv_rsn_prot->rsn_replay_prot; + break; + case TLV_TYPE_UAP_WPA_PASSPHRASE: + tlv_passphrase = (MrvlIEtypes_passphrase_t *)tlv; + bss->param.bss_config.wpa_cfg.length = + MIN(MLAN_PMK_HEXSTR_LENGTH, tlv_len); + memcpy(pmpriv->adapter, + bss->param.bss_config.wpa_cfg.passphrase, + tlv_passphrase->passphrase, + bss->param.bss_config.wpa_cfg.length); + break; +#ifdef WIFI_DIRECT_SUPPORT + case TLV_TYPE_UAP_PSK: + tlv_psk = (MrvlIEtypes_psk_t *)tlv; + memcpy(pmpriv->adapter, bss->param.bss_config.psk, + tlv_psk->psk, MIN(MLAN_MAX_KEY_LENGTH, tlv_len)); + break; +#endif /* WIFI_DIRECT_SUPPORT */ + case TLV_TYPE_UAP_GRP_REKEY_TIME: + tlv_rekey_time = (MrvlIEtypes_group_rekey_time_t *)tlv; + bss->param.bss_config.wpa_cfg.gk_rekey_time = + wlan_le32_to_cpu(tlv_rekey_time->gk_rekey_time); + break; + case TLV_TYPE_UAP_WEP_KEY: + tlv_wep_key = (MrvlIEtypes_wep_key_t *)tlv; + pkey = MNULL; + if (tlv_wep_key->key_index == 0) + pkey = &bss->param.bss_config.wep_cfg.key0; + else if (tlv_wep_key->key_index == 1) + pkey = &bss->param.bss_config.wep_cfg.key1; + else if (tlv_wep_key->key_index == 2) + pkey = &bss->param.bss_config.wep_cfg.key2; + else if (tlv_wep_key->key_index == 3) + pkey = &bss->param.bss_config.wep_cfg.key3; + if (pkey) { + pkey->key_index = tlv_wep_key->key_index; + pkey->is_default = tlv_wep_key->is_default; + pkey->length = + MIN(MAX_WEP_KEY_SIZE, (tlv_len - 2)); + memcpy(pmpriv->adapter, pkey->key, + tlv_wep_key->key, pkey->length); + } + break; + case TLV_TYPE_UAP_PREAMBLE_CTL: + tlv_preamble = (MrvlIEtypes_preamble_t *)tlv; + bss->param.bss_config.preamble_type = + tlv_preamble->preamble_type; + break; + case TLV_TYPE_BSS_STATUS: + tlv_bss_status = (MrvlIEtypes_bss_status_t *)tlv; + bss->param.bss_config.bss_status = + wlan_le16_to_cpu(tlv_bss_status->bss_status); + pmpriv->uap_bss_started = + (bss->param.bss_config. + bss_status) ? MTRUE : MFALSE; + break; + case HT_CAPABILITY: + tlv_htcap = (MrvlIETypes_HTCap_t *)tlv; + bss->param.bss_config.ht_cap_info = + wlan_le16_to_cpu(tlv_htcap->ht_cap.ht_cap_info); + bss->param.bss_config.ampdu_param = + tlv_htcap->ht_cap.ampdu_param; + memcpy(pmpriv->adapter, + bss->param.bss_config.supported_mcs_set, + tlv_htcap->ht_cap.supported_mcs_set, 16); + bss->param.bss_config.ht_ext_cap = + wlan_le16_to_cpu(tlv_htcap->ht_cap.ht_ext_cap); + bss->param.bss_config.tx_bf_cap = + wlan_le32_to_cpu(tlv_htcap->ht_cap.tx_bf_cap); + bss->param.bss_config.asel = tlv_htcap->ht_cap.asel; + break; + case TLV_TYPE_VENDOR_SPECIFIC_IE: + tlv_wmm_parameter = (MrvlIEtypes_wmm_parameter_t *)tlv; + bss->param.bss_config.wmm_para.qos_info = + tlv_wmm_parameter->wmm_para.qos_info; + for (ac = 0; ac < 4; ac++) { + bss->param.bss_config.wmm_para.ac_params[ac]. + aci_aifsn.aifsn = + tlv_wmm_parameter->wmm_para. + ac_params[ac].aci_aifsn.aifsn; + bss->param.bss_config.wmm_para.ac_params[ac]. + aci_aifsn.aci = + tlv_wmm_parameter->wmm_para. + ac_params[ac].aci_aifsn.aci; + bss->param.bss_config.wmm_para.ac_params[ac]. + ecw.ecw_max = + tlv_wmm_parameter->wmm_para. + ac_params[ac].ecw.ecw_max; + bss->param.bss_config.wmm_para.ac_params[ac]. + ecw.ecw_min = + tlv_wmm_parameter->wmm_para. + ac_params[ac].ecw.ecw_min; + bss->param.bss_config.wmm_para.ac_params[ac]. + tx_op_limit = + wlan_le16_to_cpu(tlv_wmm_parameter-> + wmm_para.ac_params[ac]. + tx_op_limit); + } + break; + } + + tlv_buf_left -= tlv_len + sizeof(MrvlIEtypesHeader_t); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len + + sizeof(MrvlIEtypesHeader_t)); + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of sys_reset + * Clear various private state variables used by DFS. + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_uap_ret_sys_reset(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + ENTER(); + + pmpriv->uap_state_chan_cb.band_config = 0; + pmpriv->uap_state_chan_cb.channel = 0; + pmpriv->uap_state_chan_cb.beacon_period = 0; + pmpriv->uap_state_chan_cb.dtim_period = 0; + + /* assume default 11d/11h states are off, should check with FW */ + /* currently don't clear domain_info... global, could be from STA */ + wlan_11d_priv_init(pmpriv); + wlan_11h_priv_init(pmpriv); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of sys_config + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_uap_ret_sys_config(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + int resp_len = 0, travel_len = 0; + int i = 0; + custom_ie *cptr; + HostCmd_DS_SYS_CONFIG *sys_config = + (HostCmd_DS_SYS_CONFIG *)&resp->params.sys_config; + mlan_ds_bss *bss = MNULL; + mlan_ds_misc_cfg *misc = MNULL; + MrvlIEtypes_MacAddr_t *tlv = + (MrvlIEtypes_MacAddr_t *)sys_config->tlv_buffer; + mlan_ds_misc_custom_ie *cust_ie = MNULL; + tlvbuf_max_mgmt_ie *max_mgmt_ie = MNULL; + MrvlIEtypes_wmm_parameter_t *tlv_wmm_parameter = + (MrvlIEtypes_wmm_parameter_t *)sys_config->tlv_buffer; + MrvlIEtypes_ChanListParamSet_t *tlv_chan_list = + (MrvlIEtypes_ChanListParamSet_t *)sys_config->tlv_buffer; + MrvlIEtypes_channel_band_t *chan_band_tlv = + (MrvlIEtypes_channel_band_t *)sys_config->tlv_buffer; + ChanScanParamSet_t *pscan_chan = MNULL; + t_u8 ac = 0; + MrvlIEtypes_channel_band_t *tlv_cb = MNULL; + MrvlIEtypes_beacon_period_t *tlv_bcnpd = MNULL; + MrvlIEtypes_dtim_period_t *tlv_dtimpd = MNULL; + + ENTER(); + if (pioctl_buf) { + if (pioctl_buf->req_id == MLAN_IOCTL_BSS) { + bss = (mlan_ds_bss *)pioctl_buf->pbuf; + if (bss->sub_command == MLAN_OID_BSS_MAC_ADDR) { + if (TLV_TYPE_UAP_MAC_ADDRESS == + wlan_le16_to_cpu(tlv->header.type)) { + memcpy(pmpriv->adapter, + &bss->param.mac_addr, tlv->mac, + MLAN_MAC_ADDR_LENGTH); + } + } else if (bss->sub_command == + MLAN_OID_UAP_CFG_WMM_PARAM) { + if (TLV_TYPE_AP_WMM_PARAM == + wlan_le16_to_cpu(tlv_wmm_parameter->header. + type)) { + if (wlan_le16_to_cpu + (tlv_wmm_parameter->header.len) < + sizeof(bss->param.ap_wmm_para)) { + PRINTM(MCMND, + "FW don't support AP WMM PARAM\n"); + } else { + bss->param.ap_wmm_para. + reserved = + MLAN_STATUS_COMPLETE; + for (ac = 0; ac < 4; ac++) { + bss->param.ap_wmm_para. + ac_params[ac]. + aci_aifsn. + aifsn = + tlv_wmm_parameter-> + wmm_para. + ac_params[ac]. + aci_aifsn.aifsn; + bss->param.ap_wmm_para. + ac_params[ac]. + aci_aifsn.aci = + tlv_wmm_parameter-> + wmm_para. + ac_params[ac]. + aci_aifsn.aci; + bss->param.ap_wmm_para. + ac_params[ac]. + ecw.ecw_max = + tlv_wmm_parameter-> + wmm_para. + ac_params[ac]. + ecw.ecw_max; + bss->param.ap_wmm_para. + ac_params[ac]. + ecw.ecw_min = + tlv_wmm_parameter-> + wmm_para. + ac_params[ac]. + ecw.ecw_min; + bss->param.ap_wmm_para. + ac_params[ac]. + tx_op_limit = + wlan_le16_to_cpu + (tlv_wmm_parameter-> + wmm_para. + ac_params[ac]. + tx_op_limit); + PRINTM(MCMND, + "ac=%d, aifsn=%d, aci=%d, ecw_max=%d, ecw_min=%d, tx_op=%d\n", + ac, + bss->param. + ap_wmm_para. + ac_params[ac]. + aci_aifsn.aifsn, + bss->param. + ap_wmm_para. + ac_params[ac]. + aci_aifsn.aci, + bss->param. + ap_wmm_para. + ac_params[ac]. + ecw.ecw_max, + bss->param. + ap_wmm_para. + ac_params[ac]. + ecw.ecw_min, + bss->param. + ap_wmm_para. + ac_params[ac]. + tx_op_limit); + } + } + } + } else if (bss->sub_command == + MLAN_OID_UAP_SCAN_CHANNELS) { + if (TLV_TYPE_CHANLIST == + wlan_le16_to_cpu(tlv_chan_list->header. + type)) { + pscan_chan = + tlv_chan_list->chan_scan_param; + bss->param.ap_scan_channels. + num_of_chan = 0; + for (i = 0; + i < + wlan_le16_to_cpu(tlv_chan_list-> + header.len) / + sizeof(ChanScanParamSet_t); i++) { + if (bss->param.ap_scan_channels. + remove_nop_channel && + wlan_11h_is_channel_under_nop + (pmpriv->adapter, + pscan_chan->chan_number)) { + bss->param. + ap_scan_channels. + num_remvoed_channel++; + PRINTM(MCMND, + "Remove nop channel=%d\n", + pscan_chan-> + chan_number); + pscan_chan++; + continue; + } + bss->param.ap_scan_channels. + chan_list[bss->param. + ap_scan_channels. + num_of_chan]. + chan_number = + pscan_chan->chan_number; + bss->param.ap_scan_channels. + chan_list[bss->param. + ap_scan_channels. + num_of_chan]. + band_config_type = + pscan_chan->radio_type; + bss->param.ap_scan_channels. + num_of_chan++; + pscan_chan++; + } + PRINTM(MCMND, + "AP scan channel list=%d\n", + bss->param.ap_scan_channels. + num_of_chan); + } + } else if (bss->sub_command == MLAN_OID_UAP_CHANNEL) { + if (TLV_TYPE_UAP_CHAN_BAND_CONFIG == + wlan_le16_to_cpu(chan_band_tlv->header. + type)) { + bss->param.ap_channel.band_cfg = + chan_band_tlv->band_config; + bss->param.ap_channel.channel = + chan_band_tlv->channel; + PRINTM(MCMND, + "AP channel, band=%d, channel=%d\n", + bss->param.ap_channel.band_cfg, + bss->param.ap_channel.channel); + } + } else if ((bss->sub_command == MLAN_OID_UAP_BSS_CONFIG) + && (pioctl_buf->action == MLAN_ACT_GET)) { + wlan_uap_ret_cmd_ap_config(pmpriv, resp, + pioctl_buf); + } + } + if (pioctl_buf->req_id == MLAN_IOCTL_MISC_CFG) { + misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf; + cust_ie = + (mlan_ds_misc_custom_ie *)sys_config-> + tlv_buffer; + max_mgmt_ie = + (tlvbuf_max_mgmt_ie *)(sys_config->tlv_buffer + + cust_ie->len + + sizeof + (MrvlIEtypesHeader_t)); + if ((pioctl_buf->action == MLAN_ACT_GET || + pioctl_buf->action == MLAN_ACT_SET) && + (misc->sub_command == MLAN_OID_MISC_CUSTOM_IE)) { + + cust_ie->type = wlan_le16_to_cpu(cust_ie->type); + resp_len = cust_ie->len = + wlan_le16_to_cpu(cust_ie->len); + travel_len = 0; + /* conversion for index, mask, len */ + if (resp_len == sizeof(t_u16)) + cust_ie->ie_data_list[0].ie_index = + wlan_cpu_to_le16(cust_ie-> + ie_data_list + [0].ie_index); + + while (resp_len > sizeof(t_u16)) { + cptr = (custom_ie + *)(((t_u8 *)cust_ie-> + ie_data_list) + travel_len); + cptr->ie_index = + wlan_le16_to_cpu(cptr-> + ie_index); + cptr->mgmt_subtype_mask = + wlan_le16_to_cpu(cptr-> + mgmt_subtype_mask); + cptr->ie_length = + wlan_le16_to_cpu(cptr-> + ie_length); + travel_len += + cptr->ie_length + + sizeof(custom_ie) - MAX_IE_SIZE; + resp_len -= + cptr->ie_length + + sizeof(custom_ie) - MAX_IE_SIZE; + } + memcpy(pmpriv->adapter, &misc->param.cust_ie, + cust_ie, + MIN(sizeof(mlan_ds_misc_custom_ie) - + sizeof(tlvbuf_max_mgmt_ie), + (cust_ie->len + + sizeof(MrvlIEtypesHeader_t)))); + if (max_mgmt_ie) { + max_mgmt_ie->type = + wlan_le16_to_cpu(max_mgmt_ie-> + type); + if (max_mgmt_ie->type == + TLV_TYPE_MAX_MGMT_IE) { + max_mgmt_ie->len = + wlan_le16_to_cpu + (max_mgmt_ie->len); + max_mgmt_ie->count = + wlan_le16_to_cpu + (max_mgmt_ie->count); + for (i = 0; + i < max_mgmt_ie->count; + i++) { + max_mgmt_ie->info[i]. + buf_size = + wlan_le16_to_cpu + (max_mgmt_ie-> + info[i]. + buf_size); + max_mgmt_ie->info[i]. + buf_count = + wlan_le16_to_cpu + (max_mgmt_ie-> + info[i]. + buf_count); + } + /* Append max_mgmt_ie TLV after + custom_ie */ + memcpy(pmpriv->adapter, + (t_u8 *)&misc->param. + cust_ie + (cust_ie->len + + sizeof + (MrvlIEtypesHeader_t)), + max_mgmt_ie, + MIN(sizeof + (tlvbuf_max_mgmt_ie), + max_mgmt_ie->len + + sizeof + (MrvlIEtypesHeader_t))); + } + } + } + } + } else { /* no ioctl: driver generated get/set */ + switch (wlan_le16_to_cpu(tlv->header.type)) { + case TLV_TYPE_UAP_MAC_ADDRESS: + memcpy(pmpriv->adapter, pmpriv->curr_addr, tlv->mac, + MLAN_MAC_ADDR_LENGTH); + break; + case TLV_TYPE_UAP_CHAN_BAND_CONFIG: + tlv_cb = (MrvlIEtypes_channel_band_t *)tlv; + pmpriv->uap_state_chan_cb.band_config = + tlv_cb->band_config; + pmpriv->uap_state_chan_cb.channel = tlv_cb->channel; + /* call callback waiting for channel info */ + if (pmpriv->uap_state_chan_cb.get_chan_callback) + pmpriv->uap_state_chan_cb. + get_chan_callback(pmpriv); + break; + case TLV_TYPE_UAP_BEACON_PERIOD: + tlv_bcnpd = (MrvlIEtypes_beacon_period_t *)tlv; + pmpriv->uap_state_chan_cb.beacon_period = + wlan_le16_to_cpu(tlv_bcnpd->beacon_period); + /* copy dtim_period as well if it follows */ + tlv_dtimpd = + (MrvlIEtypes_dtim_period_t *)(((t_u8 *)tlv) + + sizeof + (MrvlIEtypes_beacon_period_t)); + if (TLV_TYPE_UAP_DTIM_PERIOD == + wlan_le16_to_cpu(tlv_dtimpd->header.type)) + pmpriv->uap_state_chan_cb.dtim_period = + tlv_dtimpd->dtim_period; + /* call callback waiting for beacon/dtim info */ + if (pmpriv->uap_state_chan_cb.get_chan_callback) + pmpriv->uap_state_chan_cb. + get_chan_callback(pmpriv); + break; + case TLV_TYPE_MGMT_IE: + if ((pmpriv->adapter->state_rdh.stage == + RDH_SET_CUSTOM_IE) || + (pmpriv->adapter->state_rdh.stage == + RDH_REM_CUSTOM_IE)) + wlan_11h_radar_detected_callback((t_void *) + pmpriv); + break; + } + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of snmp_mib + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action the action: GET or SET + * @param cmd_oid Cmd oid: treated as sub command + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * @param pdata_buf A pointer to information buffer + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_uap_cmd_snmp_mib(pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, + IN t_u32 cmd_oid, + IN pmlan_ioctl_req pioctl_buf, IN t_void *pdata_buf) +{ + HostCmd_DS_802_11_SNMP_MIB *psnmp_mib = &cmd->params.smib; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u8 *psnmp_oid = MNULL; + t_u32 ul_temp; + t_u8 i; + + t_u8 snmp_oids[] = { + tkip_mic_failures, + ccmp_decrypt_errors, + wep_undecryptable_count, + wep_icv_error_count, + decrypt_failure_count, + dot11_mcast_tx_count, + dot11_failed_count, + dot11_retry_count, + dot11_multi_retry_count, + dot11_frame_dup_count, + dot11_rts_success_count, + dot11_rts_failure_count, + dot11_ack_failure_count, + dot11_rx_fragment_count, + dot11_mcast_rx_frame_count, + dot11_fcs_error_count, + dot11_tx_frame_count, + dot11_rsna_tkip_cm_invoked, + dot11_rsna_4way_hshk_failures, + }; + + ENTER(); + + if (cmd_action == HostCmd_ACT_GEN_GET) { + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_SNMP_MIB); + psnmp_mib->query_type = wlan_cpu_to_le16(HostCmd_ACT_GEN_GET); + cmd->size = + wlan_cpu_to_le16(sizeof(t_u16) + S_DS_GEN + + sizeof(snmp_oids) * + sizeof(MrvlIEtypes_snmp_oid_t)); + psnmp_oid = (t_u8 *)&psnmp_mib->oid; + for (i = 0; i < sizeof(snmp_oids); i++) { + /* SNMP OID header type */ + *(t_u16 *)psnmp_oid = wlan_cpu_to_le16(snmp_oids[i]); + psnmp_oid += sizeof(t_u16); + /* SNMP OID header length */ + *(t_u16 *)psnmp_oid = wlan_cpu_to_le16(sizeof(t_u32)); + psnmp_oid += sizeof(t_u16) + sizeof(t_u32); + } + } else { /* cmd_action == ACT_SET */ + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_SNMP_MIB); + cmd->size = sizeof(HostCmd_DS_802_11_SNMP_MIB) - 1 + S_DS_GEN; + psnmp_mib->query_type = wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); + + switch (cmd_oid) { + case Dot11D_i: + case Dot11H_i: + psnmp_mib->oid = wlan_cpu_to_le16((t_u16)cmd_oid); + psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u16)); + ul_temp = *(t_u32 *)pdata_buf; + *((t_u16 *)(psnmp_mib->value)) = + wlan_cpu_to_le16((t_u16)ul_temp); + cmd->size += sizeof(t_u16); + break; + default: + PRINTM(MERROR, "Unsupported OID.\n"); + ret = MLAN_STATUS_FAILURE; + break; + } + cmd->size = wlan_cpu_to_le16(cmd->size); + } + + LEAVE(); + return ret; +} + +/** + * @brief This function handles the command response of snmp_mib + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_uap_ret_snmp_mib(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + pmlan_adapter pmadapter = pmpriv->adapter; + HostCmd_DS_802_11_SNMP_MIB *psnmp_mib = + (HostCmd_DS_802_11_SNMP_MIB *)&resp->params.smib; + mlan_ds_get_info *info; + t_u8 *psnmp_oid = MNULL; + t_u32 data; + t_u16 tlv_buf_left = 0; + t_u16 tlv_type = 0; + + ENTER(); + if (psnmp_mib->query_type == HostCmd_ACT_GEN_GET) { + if (!pioctl_buf) { + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + info = (mlan_ds_get_info *)pioctl_buf->pbuf; + tlv_buf_left = resp->size - (sizeof(t_u16) + S_DS_GEN); + psnmp_oid = (t_u8 *)&psnmp_mib->oid; + while (tlv_buf_left >= sizeof(MrvlIEtypes_snmp_oid_t)) { + tlv_type = wlan_le16_to_cpu(*(t_u16 *)psnmp_oid); + psnmp_oid += sizeof(t_u16) + sizeof(t_u16); + memcpy(pmadapter, &data, psnmp_oid, sizeof(t_u32)); + switch (tlv_type) { + case tkip_mic_failures: + info->param.ustats.tkip_mic_failures = + wlan_le32_to_cpu(data); + break; + case ccmp_decrypt_errors: + info->param.ustats.ccmp_decrypt_errors = + wlan_le32_to_cpu(data); + break; + case wep_undecryptable_count: + info->param.ustats.wep_undecryptable_count = + wlan_le32_to_cpu(data); + break; + case wep_icv_error_count: + info->param.ustats.wep_icv_error_count = + wlan_le32_to_cpu(data); + break; + case decrypt_failure_count: + info->param.ustats.decrypt_failure_count = + wlan_le32_to_cpu(data); + break; + case dot11_mcast_tx_count: + info->param.ustats.mcast_tx_count = + wlan_le32_to_cpu(data); + break; + case dot11_failed_count: + info->param.ustats.failed_count = + wlan_le32_to_cpu(data); + break; + case dot11_retry_count: + info->param.ustats.retry_count = + wlan_le32_to_cpu(data); + break; + case dot11_multi_retry_count: + info->param.ustats.multi_retry_count = + wlan_le32_to_cpu(data); + break; + case dot11_frame_dup_count: + info->param.ustats.frame_dup_count = + wlan_le32_to_cpu(data); + break; + case dot11_rts_success_count: + info->param.ustats.rts_success_count = + wlan_le32_to_cpu(data); + break; + case dot11_rts_failure_count: + info->param.ustats.rts_failure_count = + wlan_le32_to_cpu(data); + break; + case dot11_ack_failure_count: + info->param.ustats.ack_failure_count = + wlan_le32_to_cpu(data); + break; + case dot11_rx_fragment_count: + info->param.ustats.rx_fragment_count = + wlan_le32_to_cpu(data); + break; + case dot11_mcast_rx_frame_count: + info->param.ustats.mcast_rx_frame_count = + wlan_le32_to_cpu(data); + break; + case dot11_fcs_error_count: + info->param.ustats.fcs_error_count = + wlan_le32_to_cpu(data); + break; + case dot11_tx_frame_count: + info->param.ustats.tx_frame_count = + wlan_le32_to_cpu(data); + break; + case dot11_rsna_tkip_cm_invoked: + info->param.ustats.rsna_tkip_cm_invoked = + wlan_le32_to_cpu(data); + break; + case dot11_rsna_4way_hshk_failures: + info->param.ustats.rsna_4way_hshk_failures = + wlan_le32_to_cpu(data); + break; + } + tlv_buf_left -= sizeof(MrvlIEtypes_snmp_oid_t); + psnmp_oid += sizeof(t_u32); + } + } else { /* ACT_SET */ + switch (psnmp_mib->oid) { + case Dot11D_i: + data = wlan_le16_to_cpu(*((t_u16 *)(psnmp_mib->value))); + /* Set 11d state to private */ + pmpriv->state_11d.enable_11d = data; + /* Set user enable flag if called from ioctl */ + if (pioctl_buf) + pmpriv->state_11d.user_enable_11d = data; + break; + case Dot11H_i: + data = wlan_le16_to_cpu(*((t_u16 *)(psnmp_mib->value))); + /* Set 11h state to priv */ + pmpriv->intf_state_11h.is_11h_active = + (data & ENABLE_11H_MASK); + /* Set radar_det state to adapter */ + pmpriv->adapter->state_11h.is_master_radar_det_active + = + (data & MASTER_RADAR_DET_MASK) ? MTRUE : MFALSE; + pmpriv->adapter->state_11h.is_slave_radar_det_active = + (data & SLAVE_RADAR_DET_MASK) ? MTRUE : MFALSE; + break; + } + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of deauth station + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_uap_cmd_sta_deauth(pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) +{ + HostCmd_DS_STA_DEAUTH *pcmd_sta_deauth = + (HostCmd_DS_STA_DEAUTH *)&cmd->params.sta_deauth; + mlan_deauth_param *deauth = (mlan_deauth_param *)pdata_buf; + + ENTER(); + cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_STA_DEAUTH); + cmd->size = wlan_cpu_to_le16(S_DS_GEN + sizeof(HostCmd_DS_STA_DEAUTH)); + memcpy(pmpriv->adapter, pcmd_sta_deauth->mac, deauth->mac_addr, + MLAN_MAC_ADDR_LENGTH); + pcmd_sta_deauth->reason = wlan_cpu_to_le16(deauth->reason_code); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of report mic_err + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_uap_cmd_report_mic(pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) +{ + HostCmd_DS_REPORT_MIC *pcmd_report_mic = + (HostCmd_DS_REPORT_MIC *)&cmd->params.report_mic; + + ENTER(); + cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_REPORT_MIC); + cmd->size = wlan_cpu_to_le16(S_DS_GEN + sizeof(HostCmd_DS_REPORT_MIC)); + memcpy(pmpriv->adapter, pcmd_report_mic->mac, pdata_buf, + MLAN_MAC_ADDR_LENGTH); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares command of key material + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action The action: GET or SET + * @param cmd_oid OID: ENABLE or DISABLE + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_uap_cmd_key_material(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, + IN t_u16 cmd_oid, IN t_void *pdata_buf) +{ + HostCmd_DS_802_11_KEY_MATERIAL *pkey_material = + &cmd->params.key_material; + mlan_ds_encrypt_key *pkey = (mlan_ds_encrypt_key *)pdata_buf; + mlan_status ret = MLAN_STATUS_SUCCESS; + sta_node *sta_ptr = MNULL; + + ENTER(); + if (!pkey) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_KEY_MATERIAL); + pkey_material->action = wlan_cpu_to_le16(cmd_action); + if (cmd_action == HostCmd_ACT_GEN_GET) { + cmd->size = + wlan_cpu_to_le16(sizeof(pkey_material->action) + + S_DS_GEN); + goto done; + } + memset(pmpriv->adapter, &pkey_material->key_param_set, 0, + sizeof(MrvlIEtype_KeyParamSetV2_t)); + if (pkey->key_flags & KEY_FLAG_REMOVE_KEY) { + pkey_material->action = + wlan_cpu_to_le16(HostCmd_ACT_GEN_REMOVE); + pkey_material->key_param_set.type = + wlan_cpu_to_le16(TLV_TYPE_KEY_PARAM_V2); + pkey_material->key_param_set.length = + wlan_cpu_to_le16(KEY_PARAMS_FIXED_LEN); + pkey_material->key_param_set.key_idx = + pkey->key_index & KEY_INDEX_MASK; + pkey_material->key_param_set.key_info = + wlan_cpu_to_le16(KEY_INFO_MCAST_KEY | + KEY_INFO_UCAST_KEY); + memcpy(pmpriv->adapter, pkey_material->key_param_set.mac_addr, + pkey->mac_addr, MLAN_MAC_ADDR_LENGTH); + cmd->size = + wlan_cpu_to_le16(sizeof(MrvlIEtypesHeader_t) + + S_DS_GEN + KEY_PARAMS_FIXED_LEN + + sizeof(pkey_material->action)); + PRINTM(MCMND, "Remove Key\n"); + goto done; + } + pkey_material->action = wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); + pkey_material->key_param_set.key_idx = pkey->key_index & KEY_INDEX_MASK; + pkey_material->key_param_set.type = + wlan_cpu_to_le16(TLV_TYPE_KEY_PARAM_V2); + pkey_material->key_param_set.key_info = KEY_INFO_ENABLE_KEY; + memcpy(pmpriv->adapter, pkey_material->key_param_set.mac_addr, + pkey->mac_addr, MLAN_MAC_ADDR_LENGTH); + if (pkey->key_len <= MAX_WEP_KEY_SIZE) { + pkey_material->key_param_set.length = + wlan_cpu_to_le16(KEY_PARAMS_FIXED_LEN + + sizeof(wep_param_t)); + pkey_material->key_param_set.key_type = KEY_TYPE_ID_WEP; + pkey_material->key_param_set.key_info |= + KEY_INFO_MCAST_KEY | KEY_INFO_UCAST_KEY; + if (pkey_material->key_param_set.key_idx == + (pmpriv->wep_key_curr_index & KEY_INDEX_MASK)) + pkey_material->key_param_set.key_info |= + KEY_INFO_DEFAULT_KEY; + pkey_material->key_param_set.key_info = + wlan_cpu_to_le16(pkey_material->key_param_set.key_info); + pkey_material->key_param_set.key_params.wep.key_len = + wlan_cpu_to_le16(pkey->key_len); + memcpy(pmpriv->adapter, + pkey_material->key_param_set.key_params.wep.key, + pkey->key_material, pkey->key_len); + cmd->size = + wlan_cpu_to_le16(sizeof(MrvlIEtypesHeader_t) + + S_DS_GEN + KEY_PARAMS_FIXED_LEN + + sizeof(wep_param_t) + + sizeof(pkey_material->action)); + PRINTM(MCMND, "Set WEP Key\n"); + goto done; + } + if (pkey->key_flags & KEY_FLAG_GROUP_KEY) + pkey_material->key_param_set.key_info |= KEY_INFO_MCAST_KEY; + else + pkey_material->key_param_set.key_info |= KEY_INFO_UCAST_KEY; + if (pkey->key_flags & KEY_FLAG_AES_MCAST_IGTK) + pkey_material->key_param_set.key_info = KEY_INFO_CMAC_AES_KEY; + if (pkey->key_flags & KEY_FLAG_SET_TX_KEY) + pkey_material->key_param_set.key_info |= + KEY_INFO_TX_KEY | KEY_INFO_RX_KEY; + else + pkey_material->key_param_set.key_info |= KEY_INFO_TX_KEY; + if (pkey->is_wapi_key) { + pkey_material->key_param_set.key_type = KEY_TYPE_ID_WAPI; + memcpy(pmpriv->adapter, + pkey_material->key_param_set.key_params.wapi.pn, + pkey->pn, PN_SIZE); + pkey_material->key_param_set.key_params.wapi.key_len = + wlan_cpu_to_le16(MIN(WAPI_KEY_SIZE, pkey->key_len)); + memcpy(pmpriv->adapter, + pkey_material->key_param_set.key_params.wapi.key, + pkey->key_material, MIN(WAPI_KEY_SIZE, pkey->key_len)); + if (!pmpriv->sec_info.wapi_key_on) + pkey_material->key_param_set.key_info |= + KEY_INFO_DEFAULT_KEY; + if (pkey->key_flags & KEY_FLAG_GROUP_KEY) { + pmpriv->sec_info.wapi_key_on = MTRUE; + } else { + /* WAPI pairwise key: unicast */ + sta_ptr = + wlan_add_station_entry(pmpriv, pkey->mac_addr); + if (sta_ptr) { + PRINTM(MCMND, "station: wapi_key_on\n"); + sta_ptr->wapi_key_on = MTRUE; + } + } + pkey_material->key_param_set.key_info = + wlan_cpu_to_le16(pkey_material->key_param_set.key_info); + pkey_material->key_param_set.length = + wlan_cpu_to_le16(KEY_PARAMS_FIXED_LEN + + sizeof(wapi_param)); + cmd->size = + wlan_cpu_to_le16(sizeof(MrvlIEtypesHeader_t) + + S_DS_GEN + KEY_PARAMS_FIXED_LEN + + sizeof(wapi_param) + + sizeof(pkey_material->action)); + PRINTM(MCMND, "Set WAPI Key\n"); + goto done; + } + pkey_material->key_param_set.key_info |= KEY_INFO_DEFAULT_KEY; + pkey_material->key_param_set.key_info = + wlan_cpu_to_le16(pkey_material->key_param_set.key_info); + if (pkey->key_len == WPA_AES_KEY_LEN && + !(pkey->key_flags & KEY_FLAG_AES_MCAST_IGTK)) { + if (pkey-> + key_flags & (KEY_FLAG_RX_SEQ_VALID | KEY_FLAG_TX_SEQ_VALID)) + memcpy(pmpriv->adapter, + pkey_material->key_param_set.key_params.aes.pn, + pkey->pn, SEQ_MAX_SIZE); + pkey_material->key_param_set.key_type = KEY_TYPE_ID_AES; + pkey_material->key_param_set.key_params.aes.key_len = + wlan_cpu_to_le16(pkey->key_len); + memcpy(pmpriv->adapter, + pkey_material->key_param_set.key_params.aes.key, + pkey->key_material, pkey->key_len); + pkey_material->key_param_set.length = + wlan_cpu_to_le16(KEY_PARAMS_FIXED_LEN + + sizeof(aes_param)); + cmd->size = + wlan_cpu_to_le16(sizeof(MrvlIEtypesHeader_t) + + S_DS_GEN + KEY_PARAMS_FIXED_LEN + + sizeof(aes_param) + + sizeof(pkey_material->action)); + PRINTM(MCMND, "Set AES Key\n"); + goto done; + } + if (pkey->key_len == WPA_IGTK_KEY_LEN && + (pkey->key_flags & KEY_FLAG_AES_MCAST_IGTK)) { + if (pkey-> + key_flags & (KEY_FLAG_RX_SEQ_VALID | KEY_FLAG_TX_SEQ_VALID)) + memcpy(pmpriv->adapter, + pkey_material->key_param_set.key_params.cmac_aes. + ipn, pkey->pn, SEQ_MAX_SIZE); + pkey_material->key_param_set.key_info &= + ~(wlan_cpu_to_le16(KEY_INFO_MCAST_KEY)); + pkey_material->key_param_set.key_info |= + wlan_cpu_to_le16(KEY_INFO_AES_MCAST_IGTK); + pkey_material->key_param_set.key_type = KEY_TYPE_ID_AES_CMAC; + pkey_material->key_param_set.key_params.cmac_aes.key_len = + wlan_cpu_to_le16(pkey->key_len); + memcpy(pmpriv->adapter, + pkey_material->key_param_set.key_params.cmac_aes.key, + pkey->key_material, pkey->key_len); + pkey_material->key_param_set.length = + wlan_cpu_to_le16(KEY_PARAMS_FIXED_LEN + + sizeof(cmac_aes_param)); + cmd->size = + wlan_cpu_to_le16(sizeof(MrvlIEtypesHeader_t) + + S_DS_GEN + KEY_PARAMS_FIXED_LEN + + sizeof(cmac_aes_param) + + sizeof(pkey_material->action)); + PRINTM(MCMND, "Set CMAC AES Key\n"); + goto done; + } + if (pkey->key_len == WPA_TKIP_KEY_LEN) { + if (pkey-> + key_flags & (KEY_FLAG_RX_SEQ_VALID | KEY_FLAG_TX_SEQ_VALID)) + memcpy(pmpriv->adapter, + pkey_material->key_param_set.key_params.tkip.pn, + pkey->pn, SEQ_MAX_SIZE); + pkey_material->key_param_set.key_type = KEY_TYPE_ID_TKIP; + pkey_material->key_param_set.key_params.tkip.key_len = + wlan_cpu_to_le16(pkey->key_len); + memcpy(pmpriv->adapter, + pkey_material->key_param_set.key_params.tkip.key, + pkey->key_material, pkey->key_len); + pkey_material->key_param_set.length = + wlan_cpu_to_le16(KEY_PARAMS_FIXED_LEN + + sizeof(tkip_param)); + cmd->size = + wlan_cpu_to_le16(sizeof(MrvlIEtypesHeader_t) + + S_DS_GEN + KEY_PARAMS_FIXED_LEN + + sizeof(tkip_param) + + sizeof(pkey_material->action)); + PRINTM(MCMND, "Set TKIP Key\n"); + } +done: + LEAVE(); + return ret; +} + +/** + * @brief This function handles the command response of sta_list + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_uap_ret_sta_list(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_STA_LIST *sta_list = + (HostCmd_DS_STA_LIST *)&resp->params.sta_list; + mlan_ds_get_info *info; + MrvlIEtypes_sta_info_t *tlv = MNULL; + t_u8 i = 0; + + ENTER(); + if (pioctl_buf) { + info = (mlan_ds_get_info *)pioctl_buf->pbuf; + info->param.sta_list.sta_count = + wlan_le16_to_cpu(sta_list->sta_count); + tlv = (MrvlIEtypes_sta_info_t *)((t_u8 *)sta_list + + sizeof(HostCmd_DS_STA_LIST)); + info->param.sta_list.sta_count = + MIN(info->param.sta_list.sta_count, MAX_NUM_CLIENTS); + for (i = 0; i < info->param.sta_list.sta_count; i++) { + memcpy(pmpriv->adapter, + info->param.sta_list.info[i].mac_address, + tlv->mac_address, MLAN_MAC_ADDR_LENGTH); + info->param.sta_list.info[i].power_mfg_status = + tlv->power_mfg_status; + info->param.sta_list.info[i].rssi = tlv->rssi; + tlv++; + } + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function will search for the specific ie + * + * @param priv A pointer to mlan_private + * @param pevent A pointer to event buf + * @param sta_ptr A pointer to sta_node + * + * @return N/A + */ +static void +wlan_check_sta_capability(pmlan_private priv, pmlan_buffer pevent, + sta_node *sta_ptr) +{ + t_u16 tlv_type, tlv_len; + t_u16 frame_control, frame_sub_type = 0; + t_u8 *assoc_req_ie = MNULL; + t_u8 ie_len = 0, assoc_ie_len = 0; + IEEEtypes_HTCap_t *pht_cap = MNULL; + IEEEtypes_VHTCap_t *pvht_cap = MNULL; + int tlv_buf_left = pevent->data_len - ASSOC_EVENT_FIX_SIZE; + MrvlIEtypesHeader_t *tlv = (MrvlIEtypesHeader_t *) + (pevent->pbuf + pevent->data_offset + ASSOC_EVENT_FIX_SIZE); + MrvlIETypes_MgmtFrameSet_t *mgmt_tlv = MNULL; + + ENTER(); + while (tlv_buf_left >= (int)sizeof(MrvlIEtypesHeader_t)) { + tlv_type = wlan_le16_to_cpu(tlv->type); + tlv_len = wlan_le16_to_cpu(tlv->len); + if ((sizeof(MrvlIEtypesHeader_t) + tlv_len) > + (unsigned int)tlv_buf_left) { + PRINTM(MERROR, "wrong tlv: tlvLen=%d, tlvBufLeft=%d\n", + tlv_len, tlv_buf_left); + break; + } + if (tlv_type == TLV_TYPE_UAP_MGMT_FRAME) { + mgmt_tlv = (MrvlIETypes_MgmtFrameSet_t *)tlv; + memcpy(priv->adapter, &frame_control, + (t_u8 *)&(mgmt_tlv->frame_control), + sizeof(frame_control)); + frame_sub_type = + IEEE80211_GET_FC_MGMT_FRAME_SUBTYPE + (frame_control); + if ((mgmt_tlv->frame_control.type == 0) && + ((frame_sub_type == SUBTYPE_ASSOC_REQUEST) || + (frame_sub_type == SUBTYPE_REASSOC_REQUEST))) { + + if (frame_sub_type == SUBTYPE_ASSOC_REQUEST) + assoc_ie_len = + sizeof(IEEEtypes_AssocRqst_t); + else if (frame_sub_type == + SUBTYPE_REASSOC_REQUEST) + assoc_ie_len = + sizeof(IEEEtypes_ReAssocRqst_t); + + ie_len = tlv_len - + sizeof(IEEEtypes_FrameCtl_t) - + assoc_ie_len; + assoc_req_ie = + (t_u8 *)tlv + + sizeof(MrvlIETypes_MgmtFrameSet_t) + + assoc_ie_len; + sta_ptr->is_wmm_enabled = + wlan_is_wmm_ie_present(priv->adapter, + assoc_req_ie, + ie_len); + PRINTM(MCMND, "STA: is_wmm_enabled=%d\n", + sta_ptr->is_wmm_enabled); + pht_cap = + (IEEEtypes_HTCap_t *) + wlan_get_specific_ie(priv, assoc_req_ie, + ie_len, + HT_CAPABILITY); + if (pht_cap) { + PRINTM(MCMND, "STA supports 11n\n"); + sta_ptr->is_11n_enabled = MTRUE; + if (GETHT_MAXAMSDU + (pht_cap->ht_cap.ht_cap_info)) + sta_ptr->max_amsdu = + MLAN_TX_DATA_BUF_SIZE_8K; + else + sta_ptr->max_amsdu = + MLAN_TX_DATA_BUF_SIZE_4K; + } else { + PRINTM(MCMND, + "STA doesn't support 11n\n"); + } + pvht_cap = + (IEEEtypes_VHTCap_t *) + wlan_get_specific_ie(priv, assoc_req_ie, + ie_len, + VHT_CAPABILITY); + if (pvht_cap && + (priv->is_11ac_enabled == MTRUE)) { + PRINTM(MCMND, "STA supports 11ac\n"); + sta_ptr->is_11ac_enabled = MTRUE; + if (GET_VHTCAP_MAXMPDULEN + (pvht_cap->vht_cap.vht_cap_info) == + 2) + sta_ptr->max_amsdu = + MLAN_TX_DATA_BUF_SIZE_12K; + else if (GET_VHTCAP_MAXMPDULEN + (pvht_cap->vht_cap. + vht_cap_info) + == 1) + sta_ptr->max_amsdu = + MLAN_TX_DATA_BUF_SIZE_8K; + else + sta_ptr->max_amsdu = + MLAN_TX_DATA_BUF_SIZE_4K; + } else { + PRINTM(MCMND, + "STA doesn't support 11ac\n"); + } + break; + } + } + tlv_buf_left -= (sizeof(MrvlIEtypesHeader_t) + tlv_len); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len + + sizeof(MrvlIEtypesHeader_t)); + } + LEAVE(); + + return; +} + +/** Fixed size of bss start event */ +#define BSS_START_EVENT_FIX_SIZE 12 + +/** + * @brief This function will search for the specific ie + * + * @param priv A pointer to mlan_private + * @param pevent A pointer to event buf + * + * @return N/A + */ +static void +wlan_check_uap_capability(pmlan_private priv, pmlan_buffer pevent) +{ + t_u16 tlv_type, tlv_len; + int tlv_buf_left = pevent->data_len - BSS_START_EVENT_FIX_SIZE; + MrvlIEtypesHeader_t *tlv = + (MrvlIEtypesHeader_t *)(pevent->pbuf + pevent->data_offset + + BSS_START_EVENT_FIX_SIZE); + const t_u8 wmm_oui[4] = { 0x00, 0x50, 0xf2, 0x02 }; + IEEEtypes_WmmParameter_t wmm_param_ie; + MrvlIEtypes_channel_band_t *pchan_info; + priv->wmm_enabled = MFALSE; + priv->pkt_fwd = MFALSE; + priv->is_11n_enabled = MFALSE; + + ENTER(); + + while (tlv_buf_left >= (int)sizeof(MrvlIEtypesHeader_t)) { + tlv_type = wlan_le16_to_cpu(tlv->type); + tlv_len = wlan_le16_to_cpu(tlv->len); + if ((sizeof(MrvlIEtypesHeader_t) + tlv_len) > + (unsigned int)tlv_buf_left) { + PRINTM(MERROR, "wrong tlv: tlvLen=%d, tlvBufLeft=%d\n", + tlv_len, tlv_buf_left); + break; + } + if (tlv_type == HT_CAPABILITY) { + DBG_HEXDUMP(MCMD_D, "HT_CAP tlv", tlv, + tlv_len + sizeof(MrvlIEtypesHeader_t)); + priv->is_11n_enabled = MTRUE; + } + if (tlv_type == VHT_CAPABILITY) { + DBG_HEXDUMP(MCMD_D, "VHT_CAP tlv", tlv, + tlv_len + sizeof(MrvlIEtypesHeader_t)); + priv->is_11ac_enabled = MTRUE; + } + if (tlv_type == VENDOR_SPECIFIC_221) { + if (!memcmp + (priv->adapter, + (t_u8 *)tlv + sizeof(MrvlIEtypesHeader_t), wmm_oui, + sizeof(wmm_oui))) { + DBG_HEXDUMP(MCMD_D, "wmm ie tlv", tlv, + tlv_len + + sizeof(MrvlIEtypesHeader_t)); + priv->wmm_enabled = MFALSE; + wlan_wmm_setup_ac_downgrade(priv); + priv->wmm_enabled = MTRUE; + memcpy(priv->adapter, &wmm_param_ie, + ((t_u8 *)tlv + 2), + sizeof(IEEEtypes_WmmParameter_t)); + wmm_param_ie.vend_hdr.len = (t_u8)tlv_len; + wmm_param_ie.vend_hdr.element_id = WMM_IE; + wlan_wmm_setup_queue_priorities(priv, + &wmm_param_ie); + } + } + if (tlv_type == TLV_TYPE_UAP_PKT_FWD_CTL) { + DBG_HEXDUMP(MCMD_D, "pkt_fwd tlv", tlv, + tlv_len + sizeof(MrvlIEtypesHeader_t)); + priv->pkt_fwd = + *((t_u8 *)tlv + sizeof(MrvlIEtypesHeader_t)); + PRINTM(MCMND, "pkt_fwd FW: 0x%x\n", priv->pkt_fwd); + if (priv->pkt_fwd & PKT_FWD_FW_BIT) + priv->pkt_fwd = MFALSE; + else + priv->pkt_fwd |= PKT_FWD_ENABLE_BIT; + PRINTM(MCMND, "pkt_fwd DRV: 0x%x\n", priv->pkt_fwd); + } + if (tlv_type == TLV_TYPE_UAP_CHAN_BAND_CONFIG) { + DBG_HEXDUMP(MCMD_D, "chan_band_config tlv", tlv, + tlv_len + sizeof(MrvlIEtypesHeader_t)); + pchan_info = (MrvlIEtypes_channel_band_t *)tlv; + priv->uap_channel = pchan_info->channel; + PRINTM(MCMND, "uap_channel FW: 0x%x\n", + priv->uap_channel); + } + + tlv_buf_left -= (sizeof(MrvlIEtypesHeader_t) + tlv_len); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len + + sizeof(MrvlIEtypesHeader_t)); + } + if (priv->wmm_enabled == MFALSE) { + /* Since WMM is not enabled, setup the queues with the defaults + */ + wlan_wmm_setup_queues(priv); + } + + LEAVE(); +} + +/** + * @brief This function will update WAPI PN in statation assoc event + * + * @param priv A pointer to mlan_private + * @param pevent A pointer to event buf + * + * @return MFALSE + */ +static t_u32 +wlan_update_wapi_info_tlv(pmlan_private priv, pmlan_buffer pevent) +{ + t_u32 ret = MFALSE; + t_u16 tlv_type, tlv_len; + t_u32 tx_pn[4]; + t_u32 i = 0; + int tlv_buf_left = pevent->data_len - ASSOC_EVENT_FIX_SIZE; + MrvlIEtypesHeader_t *tlv = (MrvlIEtypesHeader_t *) + (pevent->pbuf + pevent->data_offset + ASSOC_EVENT_FIX_SIZE); + MrvlIEtypes_wapi_info_t *wapi_tlv = MNULL; + + ENTER(); + while (tlv_buf_left >= (int)sizeof(MrvlIEtypesHeader_t)) { + tlv_type = wlan_le16_to_cpu(tlv->type); + tlv_len = wlan_le16_to_cpu(tlv->len); + if ((sizeof(MrvlIEtypesHeader_t) + tlv_len) > + (unsigned int)tlv_buf_left) { + PRINTM(MERROR, "wrong tlv: tlvLen=%d, tlvBufLeft=%d\n", + tlv_len, tlv_buf_left); + break; + } + if (tlv_type == TLV_TYPE_AP_WAPI_INFO) { + wapi_tlv = (MrvlIEtypes_wapi_info_t *)tlv; + DBG_HEXDUMP(MCMD_D, "Fw:multicast_PN", + wapi_tlv->multicast_PN, PN_SIZE); + memcpy(priv->adapter, (t_u8 *)tx_pn, + wapi_tlv->multicast_PN, PN_SIZE); + for (i = 0; i < 4; i++) + tx_pn[i] = mlan_ntohl(tx_pn[i]); + memcpy(priv->adapter, wapi_tlv->multicast_PN, + (t_u8 *)tx_pn, PN_SIZE); + DBG_HEXDUMP(MCMD_D, "Host:multicast_PN", + wapi_tlv->multicast_PN, PN_SIZE); + break; + } + tlv_buf_left -= (sizeof(MrvlIEtypesHeader_t) + tlv_len); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len + + sizeof(MrvlIEtypesHeader_t)); + } + LEAVE(); + + return ret; +} + +/** + * @brief This function send sta_assoc_event to moal + * payload with sta mac address and assoc ie. + * + * @param priv A pointer to mlan_private + * @param pevent A pointer to mlan_event buffer + * @param pbuf A pointer to mlan_buffer which has event content. + * + * @return MFALSE + */ +static t_u32 +wlan_process_sta_assoc_event(pmlan_private priv, mlan_event *pevent, + pmlan_buffer pmbuf) +{ + t_u32 ret = MFALSE; + t_u16 tlv_type, tlv_len; + t_u16 frame_control, frame_sub_type = 0; + t_u8 *assoc_req_ie = MNULL; + t_u8 ie_len = 0, assoc_ie_len = 0; + int tlv_buf_left = pmbuf->data_len - ASSOC_EVENT_FIX_SIZE; + MrvlIEtypesHeader_t *tlv = (MrvlIEtypesHeader_t *) + (pmbuf->pbuf + pmbuf->data_offset + ASSOC_EVENT_FIX_SIZE); + MrvlIETypes_MgmtFrameSet_t *mgmt_tlv = MNULL; + + ENTER(); + pevent->event_id = MLAN_EVENT_ID_UAP_FW_STA_CONNECT; + pevent->bss_index = priv->bss_index; + pevent->event_len = MLAN_MAC_ADDR_LENGTH; + memcpy(priv->adapter, pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset + 6, pevent->event_len); + while (tlv_buf_left >= (int)sizeof(MrvlIEtypesHeader_t)) { + tlv_type = wlan_le16_to_cpu(tlv->type); + tlv_len = wlan_le16_to_cpu(tlv->len); + if ((sizeof(MrvlIEtypesHeader_t) + tlv_len) > + (unsigned int)tlv_buf_left) { + PRINTM(MERROR, "wrong tlv: tlvLen=%d, tlvBufLeft=%d\n", + tlv_len, tlv_buf_left); + break; + } + if (tlv_type == TLV_TYPE_UAP_MGMT_FRAME) { + mgmt_tlv = (MrvlIETypes_MgmtFrameSet_t *)tlv; + memcpy(priv->adapter, &frame_control, + (t_u8 *)&(mgmt_tlv->frame_control), + sizeof(frame_control)); + frame_sub_type = + IEEE80211_GET_FC_MGMT_FRAME_SUBTYPE + (frame_control); + if ((mgmt_tlv->frame_control.type == 0) && + ((frame_sub_type == SUBTYPE_ASSOC_REQUEST) || + (frame_sub_type == SUBTYPE_REASSOC_REQUEST))) { + + if (frame_sub_type == SUBTYPE_ASSOC_REQUEST) + assoc_ie_len = + sizeof(IEEEtypes_AssocRqst_t); + else if (frame_sub_type == + SUBTYPE_REASSOC_REQUEST) + assoc_ie_len = + sizeof(IEEEtypes_ReAssocRqst_t); + + ie_len = tlv_len - + sizeof(IEEEtypes_FrameCtl_t) - + assoc_ie_len; + assoc_req_ie = + (t_u8 *)tlv + + sizeof(MrvlIETypes_MgmtFrameSet_t) + + assoc_ie_len; + memcpy(priv->adapter, + pevent->event_buf + pevent->event_len, + assoc_req_ie, ie_len); + pevent->event_len += ie_len; + break; + } + } + tlv_buf_left -= (sizeof(MrvlIEtypesHeader_t) + tlv_len); + tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len + + sizeof(MrvlIEtypesHeader_t)); + } + PRINTM(MEVENT, "STA assoc event len=%d\n", pevent->event_len); + DBG_HEXDUMP(MCMD_D, "STA assoc event", pevent->event_buf, + pevent->event_len); + wlan_recv_event(priv, pevent->event_id, pevent); + LEAVE(); + return ret; +} + +/** + * @brief This function prepares command of uap operation control + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param cmd_action the action: GET or SET + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_uap_cmd_oper_ctrl(pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *cmd, + IN t_u16 cmd_action, IN t_void *pdata_buf) +{ + HostCmd_DS_UAP_OPER_CTRL *poper_ctl = + (HostCmd_DS_UAP_OPER_CTRL *) & cmd->params.uap_oper_ctrl; + mlan_ds_bss *bss = (mlan_ds_bss *)pdata_buf; + mlan_uap_oper_ctrl *uap_oper_ctrl = &bss->param.ap_oper_ctrl; + Band_Config_t *bandcfg = MNULL; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_OPER_CTRL); + cmd->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_UAP_OPER_CTRL) + S_DS_GEN); + poper_ctl->action = wlan_cpu_to_le16(cmd_action); + + if (cmd_action == HostCmd_ACT_GEN_SET) { + poper_ctl->ctrl = wlan_cpu_to_le16(uap_oper_ctrl->ctrl_value); + if (uap_oper_ctrl->ctrl_value == 2) { + poper_ctl->chan_opt = + wlan_cpu_to_le16(uap_oper_ctrl->chan_opt); + if (uap_oper_ctrl->chan_opt == 3) { + poper_ctl->channel_band.header.type = + wlan_cpu_to_le16 + (TLV_TYPE_UAP_CHAN_BAND_CONFIG); + poper_ctl->channel_band.header.len = + wlan_cpu_to_le16(sizeof + (MrvlIEtypes_channel_band_t) + - + sizeof + (MrvlIEtypesHeader_t)); + bandcfg = + (Band_Config_t *)&poper_ctl-> + channel_band.band_config; + if (uap_oper_ctrl->channel > 14) + bandcfg->chanBand = BAND_CONFIG_5G; + bandcfg->chanWidth = uap_oper_ctrl->band_cfg; + if (bandcfg->chanWidth) + bandcfg->chan2Offset = + wlan_get_second_channel_offset + (uap_oper_ctrl->channel); + bandcfg->scanMode = 0; + poper_ctl->channel_band.channel = + uap_oper_ctrl->channel; + } + } + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of uap operation control + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +static mlan_status +wlan_uap_ret_oper_ctrl(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + IN mlan_ioctl_req *pioctl_buf) +{ + HostCmd_DS_UAP_OPER_CTRL *poper_ctl = + (HostCmd_DS_UAP_OPER_CTRL *) & resp->params.uap_oper_ctrl; + mlan_ds_bss *bss = MNULL; + mlan_uap_oper_ctrl *uap_oper_ctrl = MNULL; + Band_Config_t *bandcfg = MNULL; + + ENTER(); + + if (pioctl_buf && pioctl_buf->action == MLAN_ACT_GET) { + bss = (mlan_ds_bss *)pioctl_buf->pbuf; + uap_oper_ctrl = + (mlan_uap_oper_ctrl *) & bss->param.ap_oper_ctrl; + uap_oper_ctrl->ctrl_value = wlan_le16_to_cpu(poper_ctl->ctrl); + uap_oper_ctrl->chan_opt = wlan_le16_to_cpu(poper_ctl->chan_opt); + uap_oper_ctrl->channel = poper_ctl->channel_band.channel; + bandcfg = (Band_Config_t *)&poper_ctl->channel_band.band_config; + uap_oper_ctrl->band_cfg = bandcfg->chanWidth; + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/******************************************************** + Global Functions +********************************************************/ +/** + * @brief This function prepare the command before sending to firmware. + * + * @param priv A pointer to mlan_private structure + * @param cmd_no Command number + * @param cmd_action Command action: GET or SET + * @param cmd_oid Cmd oid: treated as sub command + * @param pioctl_buf A pointer to MLAN IOCTL Request buffer + * @param pdata_buf A pointer to information buffer + * @param pcmd_buf A pointer to cmd buf + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ops_uap_prepare_cmd(IN t_void *priv, + IN t_u16 cmd_no, + IN t_u16 cmd_action, + IN t_u32 cmd_oid, + IN t_void *pioctl_buf, + IN t_void *pdata_buf, IN t_void *pcmd_buf) +{ + HostCmd_DS_COMMAND *cmd_ptr = (HostCmd_DS_COMMAND *)pcmd_buf; + mlan_private *pmpriv = (mlan_private *)priv; + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_ioctl_req pioctl_req = (mlan_ioctl_req *)pioctl_buf; + + ENTER(); + + /* Prepare command */ + switch (cmd_no) { + case HostCmd_CMD_SOFT_RESET: + case HOST_CMD_APCMD_BSS_STOP: + case HOST_CMD_APCMD_BSS_START: + case HOST_CMD_APCMD_SYS_INFO: + case HOST_CMD_APCMD_SYS_RESET: + case HOST_CMD_APCMD_STA_LIST: + cmd_ptr->command = wlan_cpu_to_le16(cmd_no); + cmd_ptr->size = wlan_cpu_to_le16(S_DS_GEN); + break; + case HOST_CMD_APCMD_SYS_CONFIGURE: + ret = wlan_uap_cmd_sys_configure(pmpriv, cmd_ptr, cmd_action, + (pmlan_ioctl_req)pioctl_buf, + pdata_buf); + break; + case HostCmd_CMD_802_11_PS_MODE_ENH: + ret = wlan_cmd_enh_power_mode(pmpriv, cmd_ptr, cmd_action, + (t_u16)cmd_oid, pdata_buf); + break; + case HostCmd_CMD_SDIO_GPIO_INT_CONFIG: + ret = wlan_cmd_sdio_gpio_int(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_FUNC_INIT: + if (pmpriv->adapter->hw_status == WlanHardwareStatusReset) + pmpriv->adapter->hw_status = + WlanHardwareStatusInitializing; + cmd_ptr->command = wlan_cpu_to_le16(cmd_no); + cmd_ptr->size = wlan_cpu_to_le16(S_DS_GEN); + break; + case HostCmd_CMD_FUNC_SHUTDOWN: + pmpriv->adapter->hw_status = WlanHardwareStatusReset; + cmd_ptr->command = wlan_cpu_to_le16(cmd_no); + cmd_ptr->size = wlan_cpu_to_le16(S_DS_GEN); + break; + case HostCmd_CMD_CFG_DATA: + ret = wlan_cmd_cfg_data(pmpriv, cmd_ptr, cmd_action, pdata_buf); + break; + case HostCmd_CMD_MAC_CONTROL: + ret = wlan_cmd_mac_control(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_802_11_SNMP_MIB: + ret = wlan_uap_cmd_snmp_mib(pmpriv, cmd_ptr, cmd_action, + cmd_oid, + (pmlan_ioctl_req)pioctl_buf, + pdata_buf); + break; + case HostCmd_CMD_802_11D_DOMAIN_INFO: + ret = wlan_cmd_802_11d_domain_info(pmpriv, cmd_ptr, cmd_action); + break; + case HostCmd_CMD_CHAN_REPORT_REQUEST: + ret = wlan_11h_cmd_process(pmpriv, cmd_ptr, pdata_buf); + break; + case HOST_CMD_APCMD_STA_DEAUTH: + ret = wlan_uap_cmd_sta_deauth(pmpriv, cmd_ptr, pdata_buf); + break; + case HOST_CMD_APCMD_REPORT_MIC: + ret = wlan_uap_cmd_report_mic(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_802_11_KEY_MATERIAL: + ret = wlan_uap_cmd_key_material(pmpriv, cmd_ptr, cmd_action, + cmd_oid, pdata_buf); + break; + case HostCmd_CMD_GET_HW_SPEC: + ret = wlan_cmd_get_hw_spec(pmpriv, cmd_ptr); + break; + case HostCmd_CMD_802_11_HS_CFG_ENH: + ret = wlan_uap_cmd_802_11_hs_cfg(pmpriv, cmd_ptr, cmd_action, + (hs_config_param *)pdata_buf); + break; + case HostCmd_CMD_HS_WAKEUP_REASON: + ret = wlan_cmd_hs_wakeup_reason(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_RECONFIGURE_TX_BUFF: + ret = wlan_cmd_recfg_tx_buf(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_AMSDU_AGGR_CTRL: + ret = wlan_cmd_amsdu_aggr_ctrl(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_11N_CFG: + ret = wlan_cmd_11n_cfg(pmpriv, cmd_ptr, cmd_action, pdata_buf); + break; + case HostCmd_CMD_11N_ADDBA_REQ: + ret = wlan_cmd_11n_addba_req(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_11N_DELBA: + ret = wlan_cmd_11n_delba(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_11N_ADDBA_RSP: + ret = wlan_cmd_11n_addba_rspgen(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_REJECT_ADDBA_REQ: + ret = wlan_cmd_reject_addba_req(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_TX_BF_CFG: + ret = wlan_cmd_tx_bf_cfg(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; +#if defined(WIFI_DIRECT_SUPPORT) + case HostCmd_CMD_SET_BSS_MODE: + cmd_ptr->command = wlan_cpu_to_le16(cmd_no); + if (pdata_buf) + cmd_ptr->params.bss_mode.con_type = *(t_u8 *)pdata_buf; + else + cmd_ptr->params.bss_mode.con_type = + BSS_MODE_WIFIDIRECT_GO; + cmd_ptr->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_SET_BSS_MODE) + + S_DS_GEN); + ret = MLAN_STATUS_SUCCESS; + break; +#endif + case HostCmd_CMD_VERSION_EXT: + cmd_ptr->command = wlan_cpu_to_le16(cmd_no); + cmd_ptr->params.verext.version_str_sel = + (t_u8)(*((t_u32 *)pdata_buf)); + cmd_ptr->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_VERSION_EXT) + + S_DS_GEN); + ret = MLAN_STATUS_SUCCESS; + break; + case HostCmd_CMD_RX_MGMT_IND: + cmd_ptr->command = wlan_cpu_to_le16(cmd_no); + cmd_ptr->params.rx_mgmt_ind.action = + wlan_cpu_to_le16(cmd_action); + cmd_ptr->params.rx_mgmt_ind.mgmt_subtype_mask = + (t_u32)(*((t_u32 *)pdata_buf)); + cmd_ptr->size = + wlan_cpu_to_le16(sizeof(HostCmd_DS_RX_MGMT_IND) + + S_DS_GEN); + break; + case HostCmd_CMD_CFG_TX_DATA_PAUSE: + ret = wlan_uap_cmd_txdatapause(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_802_11_RADIO_CONTROL: + ret = wlan_cmd_802_11_radio_control(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_TX_RATE_CFG: + ret = wlan_cmd_tx_rate_cfg(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_802_11_TX_RATE_QUERY: + cmd_ptr->command = + wlan_cpu_to_le16(HostCmd_CMD_802_11_TX_RATE_QUERY); + cmd_ptr->size = + wlan_cpu_to_le16(sizeof(HostCmd_TX_RATE_QUERY) + + S_DS_GEN); + pmpriv->tx_rate = 0; + ret = MLAN_STATUS_SUCCESS; + break; +#ifdef WIFI_DIRECT_SUPPORT + case HostCmd_CMD_802_11_REMAIN_ON_CHANNEL: + ret = wlan_cmd_remain_on_channel(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HOST_CMD_WIFI_DIRECT_MODE_CONFIG: + ret = wlan_cmd_wifi_direct_mode(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HOST_CMD_P2P_PARAMS_CONFIG: + ret = wlan_cmd_p2p_params_config(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; +#endif + case HostCmd_CMD_802_11_RF_ANTENNA: + ret = wlan_cmd_802_11_rf_antenna(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_11AC_CFG: + ret = wlan_cmd_11ac_cfg(pmpriv, cmd_ptr, cmd_action, pdata_buf); + break; + case HostCmd_CMD_MAC_REG_ACCESS: + case HostCmd_CMD_BBP_REG_ACCESS: + case HostCmd_CMD_RF_REG_ACCESS: + case HostCmd_CMD_CAU_REG_ACCESS: + case HostCmd_CMD_802_11_EEPROM_ACCESS: + ret = wlan_cmd_reg_access(cmd_ptr, cmd_action, pdata_buf); + break; + case HostCmd_CMD_MEM_ACCESS: + ret = wlan_cmd_mem_access(cmd_ptr, cmd_action, pdata_buf); + break; + case HostCmd_CMD_WMM_QUEUE_CONFIG: + ret = wlan_cmd_wmm_queue_config(pmpriv, cmd_ptr, pdata_buf); + break; + case HostCmd_CMD_MULTI_CHAN_CONFIG: + ret = wlan_cmd_multi_chan_cfg(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + case HostCmd_CMD_MULTI_CHAN_POLICY: + ret = wlan_cmd_multi_chan_policy(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; +#ifdef RX_PACKET_COALESCE + case HostCmd_CMD_RX_PKT_COALESCE_CFG: + ret = wlan_cmd_rx_pkt_coalesce_cfg(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; +#endif + case HOST_CMD_APCMD_OPER_CTRL: + ret = wlan_uap_cmd_oper_ctrl(pmpriv, cmd_ptr, cmd_action, + pdata_buf); + break; + default: + PRINTM(MERROR, "PREP_CMD: unknown command- %#x\n", cmd_no); + if (pioctl_req) + pioctl_req->status_code = MLAN_ERROR_CMD_INVALID; + ret = MLAN_STATUS_FAILURE; + break; + } + LEAVE(); + return ret; +} + +/** + * @brief This function handles the AP mode command response + * + * @param priv A pointer to mlan_private structure + * @param cmdresp_no cmd no + * @param pcmd_buf cmdresp buf + * @param pioctl A pointer to ioctl buf + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ops_uap_process_cmdresp(IN t_void *priv, + IN t_u16 cmdresp_no, + IN t_void *pcmd_buf, IN t_void *pioctl) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = (mlan_private *)priv; + HostCmd_DS_COMMAND *resp = (HostCmd_DS_COMMAND *)pcmd_buf; + mlan_ioctl_req *pioctl_buf = (mlan_ioctl_req *)pioctl; + mlan_adapter *pmadapter = pmpriv->adapter; + int ctr; + const mlan_sdio_device *psdio_device = pmadapter->psdio_device; + + ENTER(); + + /* If the command is not successful, cleanup and return failure */ + if (resp->result != HostCmd_RESULT_OK) { + uap_process_cmdresp_error(pmpriv, resp, pioctl_buf); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + /* Command successful, handle response */ + switch (cmdresp_no) { + case HOST_CMD_APCMD_BSS_STOP: + pmpriv->uap_bss_started = MFALSE; + wlan_11h_check_update_radar_det_state(pmpriv); + + if (pmpriv->adapter->state_rdh.stage == RDH_STOP_INTFS) + wlan_11h_radar_detected_callback((t_void *)pmpriv); + wlan_coex_ampdu_rxwinsize(pmadapter); + break; + case HOST_CMD_APCMD_BSS_START: + if (pmpriv->adapter->state_rdh.stage == RDH_RESTART_INTFS) + wlan_11h_radar_detected_callback((t_void *)pmpriv); + /* Stop pps_uapsd_mode once bss_start */ + pmpriv->adapter->tx_lock_flag = MFALSE; + pmpriv->adapter->pps_uapsd_mode = MFALSE; + pmpriv->adapter->delay_null_pkt = MFALSE; + + break; + case HOST_CMD_APCMD_SYS_RESET: + pmpriv->uap_bss_started = MFALSE; + ret = wlan_uap_ret_sys_reset(pmpriv, resp, pioctl_buf); + wlan_11h_check_update_radar_det_state(pmpriv); + wlan_coex_ampdu_rxwinsize(pmadapter); + break; + case HOST_CMD_APCMD_SYS_INFO: + break; + case HOST_CMD_APCMD_SYS_CONFIGURE: + ret = wlan_uap_ret_sys_config(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_PS_MODE_ENH: + ret = wlan_ret_enh_power_mode(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_SDIO_GPIO_INT_CONFIG: + break; + case HostCmd_CMD_FUNC_INIT: + case HostCmd_CMD_FUNC_SHUTDOWN: + break; + case HostCmd_CMD_802_11_SNMP_MIB: + ret = wlan_uap_ret_snmp_mib(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11D_DOMAIN_INFO: + ret = wlan_ret_802_11d_domain_info(pmpriv, resp); + break; + case HostCmd_CMD_CHAN_REPORT_REQUEST: + ret = wlan_11h_cmdresp_process(pmpriv, resp); + break; + case HOST_CMD_APCMD_STA_DEAUTH: + break; + case HOST_CMD_APCMD_REPORT_MIC: + break; + case HostCmd_CMD_802_11_KEY_MATERIAL: + break; + case HOST_CMD_APCMD_STA_LIST: + ret = wlan_uap_ret_sta_list(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_GET_HW_SPEC: + ret = wlan_ret_get_hw_spec(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_CFG_DATA: + ret = wlan_ret_cfg_data(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_MAC_CONTROL: + ret = wlan_ret_mac_control(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_HS_CFG_ENH: + ret = wlan_ret_802_11_hs_cfg(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_HS_WAKEUP_REASON: + ret = wlan_ret_hs_wakeup_reason(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_11N_ADDBA_REQ: + ret = wlan_ret_11n_addba_req(pmpriv, resp); + break; + case HostCmd_CMD_11N_DELBA: + ret = wlan_ret_11n_delba(pmpriv, resp); + break; + case HostCmd_CMD_11N_ADDBA_RSP: + ret = wlan_ret_11n_addba_resp(pmpriv, resp); + break; + case HostCmd_CMD_SET_BSS_MODE: + break; + case HostCmd_CMD_RECONFIGURE_TX_BUFF: + pmadapter->tx_buf_size = + (t_u16)wlan_le16_to_cpu(resp->params.tx_buf.buff_size); + pmadapter->tx_buf_size = + (pmadapter->tx_buf_size / MLAN_SDIO_BLOCK_SIZE) * + MLAN_SDIO_BLOCK_SIZE; + pmadapter->curr_tx_buf_size = pmadapter->tx_buf_size; + pmadapter->mp_end_port = + wlan_le16_to_cpu(resp->params.tx_buf.mp_end_port); + pmadapter->mp_data_port_mask = + psdio_device->reg->data_port_mask; + + for (ctr = 1; + ctr <= psdio_device->max_ports - pmadapter->mp_end_port; + ctr++) { + pmadapter->mp_data_port_mask &= + ~(1 << (psdio_device->max_ports - ctr)); + } + + if (psdio_device->supports_sdio_new_mode) { + pmadapter->curr_wr_port = 0; + pmadapter->mpa_tx.pkt_aggr_limit = + MIN(psdio_device->mp_aggr_pkt_limit, + (pmadapter->mp_end_port >> 1)); + } else { + pmadapter->curr_wr_port = 1; + } + PRINTM(MCMND, "end port %d, data port mask %x\n", + wlan_le16_to_cpu(resp->params.tx_buf.mp_end_port), + pmadapter->mp_data_port_mask); + PRINTM(MCMND, "max_tx_buf_size=%d, tx_buf_size=%d\n", + pmadapter->max_tx_buf_size, pmadapter->tx_buf_size); + break; + case HostCmd_CMD_AMSDU_AGGR_CTRL: + ret = wlan_ret_amsdu_aggr_ctrl(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_11N_CFG: + ret = wlan_ret_11n_cfg(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_REJECT_ADDBA_REQ: + ret = wlan_ret_reject_addba_req(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_TX_BF_CFG: + ret = wlan_ret_tx_bf_cfg(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_VERSION_EXT: + ret = wlan_ret_ver_ext(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_RX_MGMT_IND: + ret = wlan_ret_rx_mgmt_ind(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_CFG_TX_DATA_PAUSE: + ret = wlan_uap_ret_txdatapause(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_RADIO_CONTROL: + ret = wlan_ret_802_11_radio_control(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_TX_RATE_CFG: + ret = wlan_ret_tx_rate_cfg(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_802_11_TX_RATE_QUERY: + ret = wlan_ret_802_11_tx_rate_query(pmpriv, resp, pioctl_buf); + break; +#ifdef WIFI_DIRECT_SUPPORT + case HostCmd_CMD_802_11_REMAIN_ON_CHANNEL: + ret = wlan_ret_remain_on_channel(pmpriv, resp, pioctl_buf); + break; + case HOST_CMD_WIFI_DIRECT_MODE_CONFIG: + ret = wlan_ret_wifi_direct_mode(pmpriv, resp, pioctl_buf); + break; + case HOST_CMD_P2P_PARAMS_CONFIG: + ret = wlan_ret_p2p_params_config(pmpriv, resp, pioctl_buf); + break; +#endif + case HostCmd_CMD_802_11_RF_ANTENNA: + ret = wlan_ret_802_11_rf_antenna(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_11AC_CFG: + ret = wlan_ret_11ac_cfg(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_MAC_REG_ACCESS: + case HostCmd_CMD_BBP_REG_ACCESS: + case HostCmd_CMD_RF_REG_ACCESS: + case HostCmd_CMD_CAU_REG_ACCESS: + case HostCmd_CMD_802_11_EEPROM_ACCESS: + ret = wlan_ret_reg_access(pmpriv->adapter, cmdresp_no, resp, + pioctl_buf); + break; + case HostCmd_CMD_MEM_ACCESS: + ret = wlan_ret_mem_access(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_WMM_QUEUE_CONFIG: + ret = wlan_ret_wmm_queue_config(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_MULTI_CHAN_CONFIG: + ret = wlan_ret_multi_chan_cfg(pmpriv, resp, pioctl_buf); + break; + case HostCmd_CMD_MULTI_CHAN_POLICY: + ret = wlan_ret_multi_chan_policy(pmpriv, resp, pioctl_buf); + break; +#ifdef RX_PACKET_COALESCE + case HostCmd_CMD_RX_PKT_COALESCE_CFG: + ret = wlan_ret_rx_pkt_coalesce_cfg(pmpriv, resp, pioctl_buf); + break; +#endif + case HOST_CMD_APCMD_OPER_CTRL: + ret = wlan_uap_ret_oper_ctrl(pmpriv, resp, pioctl_buf); + break; + default: + PRINTM(MERROR, "CMD_RESP: Unknown command response %#x\n", + resp->command); + if (pioctl_buf) + pioctl_buf->status_code = MLAN_ERROR_CMD_RESP_FAIL; + break; + } + LEAVE(); + return ret; +} + +/** + * @brief This function handles events generated by firmware + * + * @param priv A pointer to mlan_private structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ops_uap_process_event(IN t_void *priv) +{ + pmlan_private pmpriv = (pmlan_private)priv; + pmlan_adapter pmadapter = pmpriv->adapter; + pmlan_callbacks pcb = &pmadapter->callbacks; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u32 eventcause = pmadapter->event_cause; + pmlan_buffer pmbuf = pmadapter->pmlan_buffer_event; + t_u8 *event_buf = MNULL; + mlan_event *pevent = MNULL; + t_u8 sta_addr[MLAN_MAC_ADDR_LENGTH]; + sta_node *sta_ptr = MNULL; + t_u8 i = 0; + + ENTER(); + + /* Event length check */ + if ((pmbuf->data_len - sizeof(eventcause)) > MAX_EVENT_SIZE) { + pmbuf->status_code = MLAN_ERROR_PKT_SIZE_INVALID; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + /* Allocate memory for event buffer */ + ret = pcb->moal_malloc(pmadapter->pmoal_handle, MAX_EVENT_SIZE, + MLAN_MEM_DEF, &event_buf); + if ((ret != MLAN_STATUS_SUCCESS) || !event_buf) { + PRINTM(MERROR, "Could not allocate buffer for event buf\n"); + if (pmbuf) + pmbuf->status_code = MLAN_ERROR_NO_MEM; + goto done; + } + pevent = (pmlan_event)event_buf; + memset(pmadapter, &pevent->event_id, 0, sizeof(pevent->event_id)); + + if (eventcause != EVENT_PS_SLEEP && eventcause != EVENT_PS_AWAKE && + pmbuf->data_len > sizeof(eventcause)) + DBG_HEXDUMP(MEVT_D, "EVENT", pmbuf->pbuf + pmbuf->data_offset, + pmbuf->data_len); + + switch (eventcause) { + case EVENT_MICRO_AP_BSS_START: + PRINTM(MEVENT, "EVENT: MICRO_AP_BSS_START\n"); + pmpriv->uap_bss_started = MTRUE; + memcpy(pmadapter, pmpriv->curr_addr, pmadapter->event_body + 2, + MLAN_MAC_ADDR_LENGTH); + pevent->event_id = MLAN_EVENT_ID_UAP_FW_BSS_START; + wlan_check_uap_capability(pmpriv, pmbuf); + wlan_coex_ampdu_rxwinsize(pmadapter); + break; + case EVENT_MICRO_AP_BSS_ACTIVE: + PRINTM(MEVENT, "EVENT: MICRO_AP_BSS_ACTIVE\n"); + pmpriv->media_connected = MTRUE; + pmpriv->port_open = MTRUE; + pevent->event_id = MLAN_EVENT_ID_UAP_FW_BSS_ACTIVE; + break; + case EVENT_MICRO_AP_BSS_IDLE: + PRINTM(MEVENT, "EVENT: MICRO_AP_BSS_IDLE\n"); + pevent->event_id = MLAN_EVENT_ID_UAP_FW_BSS_IDLE; + pmpriv->media_connected = MFALSE; + wlan_clean_txrx(pmpriv); + wlan_notify_station_deauth(pmpriv); + wlan_delete_station_list(pmpriv); + pmpriv->port_open = MFALSE; + break; + case EVENT_MICRO_AP_MIC_COUNTERMEASURES: + PRINTM(MEVENT, "EVENT: MICRO_AP_MIC_COUNTERMEASURES\n"); + pevent->event_id = MLAN_EVENT_ID_UAP_FW_MIC_COUNTERMEASURES; + break; + case EVENT_PS_AWAKE: + PRINTM(MINFO, "EVENT: AWAKE\n"); + PRINTM(MEVENT, "||"); + /* Handle unexpected PS AWAKE event */ + if (pmadapter->ps_state == PS_STATE_SLEEP_CFM) + break; + pmadapter->pm_wakeup_card_req = MFALSE; + pmadapter->pm_wakeup_fw_try = MFALSE; + pmadapter->ps_state = PS_STATE_AWAKE; + break; + case EVENT_PS_SLEEP: + PRINTM(MINFO, "EVENT: SLEEP\n"); + PRINTM(MEVENT, "__"); + /* Handle unexpected PS SLEEP event */ + if (pmadapter->ps_state == PS_STATE_SLEEP_CFM) + break; + pmadapter->ps_state = PS_STATE_PRE_SLEEP; + wlan_check_ps_cond(pmadapter); + break; + case EVENT_MICRO_AP_STA_ASSOC: + wlan_process_sta_assoc_event(pmpriv, pevent, pmbuf); + memcpy(pmadapter, sta_addr, pmadapter->event_body + 2, + MLAN_MAC_ADDR_LENGTH); + sta_ptr = wlan_add_station_entry(pmpriv, sta_addr); + PRINTM(MMSG, "wlan: EVENT: MICRO_AP_STA_ASSOC " MACSTR "\n", + MAC2STR(sta_addr)); + if (pmpriv->is_11n_enabled) { + wlan_check_sta_capability(pmpriv, pmbuf, sta_ptr); + for (i = 0; i < MAX_NUM_TID; i++) { + if (sta_ptr->is_11n_enabled) + sta_ptr->ampdu_sta[i] = + pmpriv->aggr_prio_tbl[i]. + ampdu_user; + else + sta_ptr->ampdu_sta[i] = + BA_STREAM_NOT_ALLOWED; + } + memset(pmadapter, sta_ptr->rx_seq, 0xff, + sizeof(sta_ptr->rx_seq)); + } + if (pmpriv->sec_info.wapi_enabled) + wlan_update_wapi_info_tlv(pmpriv, pmbuf); + pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; + break; + case EVENT_MICRO_AP_STA_DEAUTH: + pevent->event_id = MLAN_EVENT_ID_UAP_FW_STA_DISCONNECT; + pevent->bss_index = pmpriv->bss_index; + pevent->event_len = pmbuf->data_len - 4; + /* skip event length field */ + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset + 4, pevent->event_len); + wlan_recv_event(pmpriv, pevent->event_id, pevent); + memcpy(pmadapter, sta_addr, pmadapter->event_body + 2, + MLAN_MAC_ADDR_LENGTH); + PRINTM(MMSG, "wlan: EVENT: MICRO_AP_STA_DEAUTH " MACSTR "\n", + MAC2STR(sta_addr)); + if (pmpriv->is_11n_enabled) { + wlan_cleanup_reorder_tbl(pmpriv, sta_addr); + pmadapter->callbacks.moal_spin_lock(pmadapter-> + pmoal_handle, + pmpriv->wmm. + ra_list_spinlock); + wlan_11n_cleanup_txbastream_tbl(pmpriv, sta_addr); + pmadapter->callbacks.moal_spin_unlock(pmadapter-> + pmoal_handle, + pmpriv->wmm. + ra_list_spinlock); + } + wlan_wmm_delete_peer_ralist(pmpriv, sta_addr); + wlan_delete_station_entry(pmpriv, sta_addr); + pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; + break; + case EVENT_HS_ACT_REQ: + PRINTM(MEVENT, "EVENT: HS_ACT_REQ\n"); + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_HS_CFG_ENH, 0, + 0, MNULL, MNULL); + break; + case EVENT_ADDBA: + PRINTM(MEVENT, "EVENT: ADDBA Request\n"); + if (pmpriv->media_connected == MTRUE) + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_11N_ADDBA_RSP, + HostCmd_ACT_GEN_SET, 0, MNULL, + pmadapter->event_body); + else + PRINTM(MERROR, + "Ignore ADDBA Request event in BSS idle state\n"); + break; + case EVENT_DELBA: + PRINTM(MEVENT, "EVENT: DELBA Request\n"); + if (pmpriv->media_connected == MTRUE) + wlan_11n_delete_bastream(pmpriv, pmadapter->event_body); + else + PRINTM(MERROR, + "Ignore DELBA Request event in BSS idle state\n"); + break; + case EVENT_BA_STREAM_TIMEOUT: + PRINTM(MEVENT, "EVENT: BA Stream timeout\n"); + if (pmpriv->media_connected == MTRUE) + wlan_11n_ba_stream_timeout(pmpriv, + (HostCmd_DS_11N_BATIMEOUT *) + pmadapter->event_body); + else + PRINTM(MERROR, + "Ignore BA Stream timeout event in BSS idle state\n"); + break; + case EVENT_RXBA_SYNC: + PRINTM(MEVENT, "EVENT: RXBA_SYNC\n"); + wlan_11n_rxba_sync_event(pmpriv, pmadapter->event_body, + pmbuf->data_len - sizeof(eventcause)); + break; + case EVENT_AMSDU_AGGR_CTRL: + PRINTM(MEVENT, "EVENT: AMSDU_AGGR_CTRL %d\n", + *(t_u16 *)pmadapter->event_body); + pmadapter->tx_buf_size = + MIN(pmadapter->curr_tx_buf_size, + wlan_le16_to_cpu(*(t_u16 *)pmadapter->event_body)); + PRINTM(MEVENT, "tx_buf_size %d\n", pmadapter->tx_buf_size); + break; + case EVENT_TX_DATA_PAUSE: + PRINTM(MEVENT, "EVENT: TX_DATA_PAUSE\n"); + wlan_process_tx_pause_event(priv, pmbuf); + break; + case EVENT_RADAR_DETECTED: + PRINTM(MEVENT, "EVENT: Radar Detected\n"); + + /* Send as passthru first, this event can cause other events */ + memset(pmadapter, event_buf, 0x00, MAX_EVENT_SIZE); + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; + pevent->event_len = pmbuf->data_len; + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset, pevent->event_len); + wlan_recv_event(pmpriv, pevent->event_id, pevent); + pevent->event_id = 0; /* clear to avoid resending at end of + fcn */ + + if (pmadapter->state_rdh.stage == RDH_OFF) { + pmadapter->state_rdh.stage = RDH_CHK_INTFS; + wlan_11h_radar_detected_handling(pmadapter); + } else { + PRINTM(MEVENT, "Ignore Event Radar Detected - handling" + " already in progress.\n"); + } + break; + case EVENT_CHANNEL_REPORT_RDY: + PRINTM(MEVENT, "EVENT: Channel Report Ready\n"); + memset(pmadapter, event_buf, 0x00, MAX_EVENT_SIZE); + /* Setup event buffer */ + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_FW_CHANNEL_REPORT_RDY; + pevent->event_len = pmbuf->data_len - sizeof(eventcause); + /* Copy event data */ + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset + sizeof(eventcause), + pevent->event_len); + /* Handle / pass event data, and free buffer */ + ret = wlan_11h_handle_event_chanrpt_ready(pmpriv, pevent); + + /* Send up this Event to unblock MOAL waitqueue */ + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_MEAS_REPORT, MNULL); + pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; + break; +#ifdef WIFI_DIRECT_SUPPORT + case EVENT_REMAIN_ON_CHANNEL_EXPIRED: + PRINTM(MEVENT, "EVENT: REMAIN_ON_CHANNEL_EXPIRED reason=%d\n", + *(t_u16 *)pmadapter->event_body); + wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_FLUSH_RX_WORK, MNULL); + pevent->event_id = MLAN_EVENT_ID_FW_REMAIN_ON_CHAN_EXPIRED; + break; +#endif + case EVENT_MULTI_CHAN_INFO: + PRINTM(MEVENT, "EVENT: MULTI_CHAN_INFO\n"); + wlan_handle_event_multi_chan_info(pmpriv, pmbuf); + break; + + case EVENT_FW_DEBUG_INFO: + PRINTM(MERROR, "EVENT: FW Debug Info\n"); + memset(pmadapter, event_buf, 0x00, MAX_EVENT_SIZE); + pevent->bss_index = pmpriv->bss_index; + pevent->event_id = MLAN_EVENT_ID_FW_DEBUG_INFO; + pevent->event_len = pmbuf->data_len - sizeof(eventcause); + memcpy(pmadapter, + (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset + sizeof(eventcause), + pevent->event_len); + wlan_recv_event(pmpriv, pevent->event_id, pevent); + pevent->event_id = 0; /* clear to avoid resending at end of + fcn */ + break; + case EVENT_TX_STATUS_REPORT: + PRINTM(MINFO, "EVENT: TX_STATUS\n"); + pevent->event_id = MLAN_EVENT_ID_FW_TX_STATUS; + break; + case EVENT_BT_COEX_WLAN_PARA_CHANGE: + PRINTM(MEVENT, "EVENT: BT coex wlan param update\n"); + wlan_bt_coex_wlan_param_update_event(pmpriv, pmbuf); + break; + + default: + pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU; + break; + } + + if (pevent->event_id) { + pevent->bss_index = pmpriv->bss_index; + pevent->event_len = pmbuf->data_len; + memcpy(pmadapter, (t_u8 *)pevent->event_buf, + pmbuf->pbuf + pmbuf->data_offset, pevent->event_len); + wlan_recv_event(pmpriv, pevent->event_id, pevent); + } +done: + if (event_buf) + pcb->moal_mfree(pmadapter->pmoal_handle, event_buf); + LEAVE(); + return ret; +} + +/** + * @brief This function issues commands to initialize firmware + * + * @param priv A pointer to mlan_private structure + * @param first_bss flag for first BSS + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_PENDING or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ops_uap_init_cmd(IN t_void *priv, IN t_u8 first_bss) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private pmpriv = (pmlan_private)priv; + t_u16 last_cmd = 0; + + ENTER(); + + if (first_bss) { + if (wlan_adapter_init_cmd(pmpriv->adapter) == + MLAN_STATUS_FAILURE) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + } + + ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, + HostCmd_ACT_GEN_GET, 0, MNULL, MNULL); + if (ret) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + last_cmd = HOST_CMD_APCMD_SYS_CONFIGURE; + /** set last_init_cmd */ + if (last_cmd) { + pmpriv->adapter->last_init_cmd = last_cmd; + ret = MLAN_STATUS_PENDING; + } +done: + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_uap_ioctl.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_uap_ioctl.c new file mode 100644 index 00000000..cd1fd857 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_uap_ioctl.c @@ -0,0 +1,1796 @@ +/** @file mlan_uap_ioctl.c + * + * @brief This file contains the handling of AP mode ioctls + * + * Copyright (C) 2009-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/******************************************************** +Change log: + 02/05/2009: initial version +********************************************************/ + +#include "mlan.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#ifdef STA_SUPPORT +#include "mlan_join.h" +#endif +#include "mlan_main.h" +#include "mlan_uap.h" +#include "mlan_sdio.h" +#include "mlan_11n.h" +#include "mlan_fw.h" +#include "mlan_11h.h" +#include "mlan_11ac.h" + +/******************************************************** + Global Variables +********************************************************/ +extern t_u8 tos_to_tid_inv[]; + +/******************************************************** + Local Functions +********************************************************/ +/** + * @brief Stop BSS + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_bss_ioctl_stop(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + ret = wlan_prepare_cmd(pmpriv, + HOST_CMD_APCMD_BSS_STOP, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_req, MNULL); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +static t_bool +wlan_can_radar_det_skip(mlan_private *priv) +{ + mlan_private *priv_list[MLAN_MAX_BSS_NUM]; + mlan_private *pmpriv; + mlan_adapter *pmadapter = priv->adapter; + t_u8 pcount, i; + + /* In MBSS environment, if one of the BSS is already beaconing and DRCS + is off then 11n_radar detection is not required for subsequent BSSes + since they will follow the primary bss. */ + if (!priv->adapter->mc_policy && + (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP)) { + memset(pmadapter, priv_list, 0x00, sizeof(priv_list)); + pcount = wlan_get_privs_by_cond(pmadapter, wlan_is_intf_active, + priv_list); + for (i = 0; i < pcount; i++) { + pmpriv = priv_list[i]; + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_UAP) + return MTRUE; + } + } + return MFALSE; +} + +/** + * @brief Callback to finish BSS IOCTL START + * Not to be called directly to initiate bss_start + * + * @param priv A pointer to mlan_private structure (cast from t_void*) + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + * @sa wlan_uap_bss_ioctl_start + */ +static mlan_status +wlan_uap_callback_bss_ioctl_start(IN t_void *priv) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = (mlan_private *)priv; + mlan_callbacks *pcb = (mlan_callbacks *)&pmpriv->adapter->callbacks; + wlan_uap_get_info_cb_t *puap_state_chan_cb = &pmpriv->uap_state_chan_cb; + t_u8 old_channel; + t_bool under_nop = MFALSE; + + ENTER(); + /* clear callback now that we're here */ + puap_state_chan_cb->get_chan_callback = MNULL; + + /* + * Check if the region and channel requires we check for radar. + */ + if ((puap_state_chan_cb->band_config & BAND_CONFIG_5GHZ) && + !wlan_can_radar_det_skip(pmpriv) && + wlan_11h_radar_detect_required(pmpriv, + puap_state_chan_cb->channel)) { + + /* first check if channel is under NOP */ + if (wlan_11h_is_channel_under_nop(pmpriv->adapter, + puap_state_chan_cb-> + channel)) { + /* recently we've seen radar on this channel */ + ret = MLAN_STATUS_FAILURE; + under_nop = MTRUE; + } + + /* Check cached radar check on the channel */ + if (ret == MLAN_STATUS_SUCCESS) + ret = wlan_11h_check_chan_report(pmpriv, + puap_state_chan_cb-> + channel); + + /* Found radar: try to switch to a non-dfs channel */ + if (ret != MLAN_STATUS_SUCCESS) { + old_channel = puap_state_chan_cb->channel; + ret = wlan_11h_switch_non_dfs_chan(pmpriv, + &puap_state_chan_cb-> + channel); + + if (ret == MLAN_STATUS_SUCCESS) { + ret = wlan_uap_set_channel(pmpriv, + pmpriv-> + uap_state_chan_cb. + band_config, + puap_state_chan_cb-> + channel); + if (ret == MLAN_STATUS_SUCCESS) { + if (under_nop) { + PRINTM(MMSG, + "Channel %d under NOP," + " switched to new channel %d successfully.\n", + old_channel, + puap_state_chan_cb-> + channel); + } else { + PRINTM(MMSG, + "Radar found on channel %d," + " switched to new channel %d successfully.\n", + old_channel, + puap_state_chan_cb-> + channel); + } + } else { + if (under_nop) { + PRINTM(MMSG, + "Channel %d under NOP," + " switch to new channel %d failed.\n", + old_channel, + puap_state_chan_cb-> + channel); + } else { + PRINTM(MMSG, + "Radar found on channel %d," + " switch to new channel %d failed.\n", + old_channel, + puap_state_chan_cb-> + channel); + } + pcb->moal_ioctl_complete(pmpriv-> + adapter-> + pmoal_handle, + puap_state_chan_cb-> + pioctl_req_curr, + MLAN_STATUS_FAILURE); + goto done; + } + } else { + if (under_nop) { + PRINTM(MMSG, + "Channel %d under NOP, no switch channel available.\n", + old_channel); + } else { + PRINTM(MMSG, + "Radar found on channel %d, no switch channel available.\n", + old_channel); + } + /* No command sent with the ioctl, need + manually signal completion */ + pcb->moal_ioctl_complete(pmpriv->adapter-> + pmoal_handle, + puap_state_chan_cb-> + pioctl_req_curr, + MLAN_STATUS_FAILURE); + goto done; + } + } else { + PRINTM(MINFO, "No Radar found on channel %d\n", + puap_state_chan_cb->channel); + } + } + + /* else okay to send command: not DFS channel or no radar */ + ret = wlan_prepare_cmd(pmpriv, + HOST_CMD_APCMD_BSS_START, + HostCmd_ACT_GEN_SET, + 0, + (t_void *)puap_state_chan_cb->pioctl_req_curr, + MNULL); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + +done: + puap_state_chan_cb->pioctl_req_curr = MNULL; /* prevent re-use */ + LEAVE(); + return ret; +} + +/** + * @brief Start BSS + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +/** + * @sa wlan_uap_callback_bss_ioctl_start + */ +static mlan_status +wlan_uap_bss_ioctl_start(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + /* if FW supports ACS+DFS then sequence is different */ + + /* First check channel report, defer BSS_START CMD to callback. */ + /* store params, issue command to get UAP channel, whose CMD_RESP will + callback remainder of bss_start handling */ + pmpriv->uap_state_chan_cb.pioctl_req_curr = pioctl_req; + pmpriv->uap_state_chan_cb.get_chan_callback = + wlan_uap_callback_bss_ioctl_start; + + ret = wlan_uap_get_channel(pmpriv); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief reset BSS + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_bss_ioctl_reset(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + t_u8 i = 0; + + ENTER(); + + /* + * Reset any uap private parameters here + */ + for (i = 0; i < pmadapter->max_mgmt_ie_index; i++) + memset(pmadapter, &pmpriv->mgmt_ie[i], 0, sizeof(custom_ie)); + pmpriv->add_ba_param.timeout = MLAN_DEFAULT_BLOCK_ACK_TIMEOUT; + pmpriv->add_ba_param.tx_win_size = + pmadapter->psdio_device->ampdu_info->ampdu_uap_txwinsize; + pmpriv->add_ba_param.rx_win_size = + pmadapter->psdio_device->ampdu_info->ampdu_uap_rxwinsize; + for (i = 0; i < MAX_NUM_TID; i++) { + pmpriv->aggr_prio_tbl[i].ampdu_user = tos_to_tid_inv[i]; + pmpriv->aggr_prio_tbl[i].amsdu = BA_STREAM_NOT_ALLOWED; + pmpriv->addba_reject[i] = ADDBA_RSP_STATUS_ACCEPT; + } + pmpriv->aggr_prio_tbl[6].ampdu_user = + pmpriv->aggr_prio_tbl[7].ampdu_user = BA_STREAM_NOT_ALLOWED; + pmpriv->addba_reject[6] = + pmpriv->addba_reject[7] = ADDBA_RSP_STATUS_REJECT; + + /* hs_configured, hs_activated are reset by main loop */ + pmadapter->hs_cfg.conditions = HOST_SLEEP_DEF_COND; + pmadapter->hs_cfg.gpio = HOST_SLEEP_DEF_GPIO; + pmadapter->hs_cfg.gap = HOST_SLEEP_DEF_GAP; + + ret = wlan_prepare_cmd(pmpriv, + HOST_CMD_APCMD_SYS_RESET, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_req, MNULL); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get MAC address + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_bss_ioctl_mac_address(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_bss *bss = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 cmd_action = 0; + + ENTER(); + + bss = (mlan_ds_bss *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) { + memcpy(pmadapter, pmpriv->curr_addr, &bss->param.mac_addr, + MLAN_MAC_ADDR_LENGTH); + cmd_action = HostCmd_ACT_GEN_SET; + } else + cmd_action = HostCmd_ACT_GEN_GET; + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, + cmd_action, 0, (t_void *)pioctl_req, MNULL); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get wmm param + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_bss_ioctl_uap_wmm_param(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_bss *bss = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 cmd_action = 0; + + ENTER(); + + bss = (mlan_ds_bss *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, + cmd_action, 0, (t_void *)pioctl_req, MNULL); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get scan channels + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_bss_ioctl_uap_scan_channels(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_bss *bss = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 cmd_action = 0; + + ENTER(); + + bss = (mlan_ds_bss *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, + cmd_action, 0, (t_void *)pioctl_req, MNULL); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get UAP channel + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_bss_ioctl_uap_channel(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_bss *bss = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 cmd_action = 0; + + ENTER(); + + bss = (mlan_ds_bss *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, + cmd_action, 0, (t_void *)pioctl_req, MNULL); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get UAP operation control vaule + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_bss_ioctl_uap_oper_ctrl(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_bss *bss = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 cmd_action = 0; + + ENTER(); + + if (pmadapter->fw_ver == HOST_API_VERSION_V15 + && pmadapter->fw_min_ver >= FW_MINOR_VERSION_1) { + bss = (mlan_ds_bss *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_OPER_CTRL, + cmd_action, 0, (t_void *)pioctl_req, + (t_void *)pioctl_req->pbuf); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + } else { + PRINTM(MMSG, "FW don't support uap oper ctrl\n"); + } + LEAVE(); + return ret; +} + +/** + * @brief Get Uap statistics + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_get_stats(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_SNMP_MIB, + HostCmd_ACT_GEN_GET, + 0, (t_void *)pioctl_req, MNULL); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get AP config + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_bss_ioctl_config(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 cmd_action = 0; + + ENTER(); + + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, + cmd_action, 0, (t_void *)pioctl_req, MNULL); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief deauth sta + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_bss_ioctl_deauth_sta(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_bss *bss = MNULL; + + ENTER(); + + bss = (mlan_ds_bss *)pioctl_req->pbuf; + ret = wlan_prepare_cmd(pmpriv, + HOST_CMD_APCMD_STA_DEAUTH, + HostCmd_ACT_GEN_SET, + 0, + (t_void *)pioctl_req, + (t_void *)&bss->param.deauth_param); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Get station list + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_get_sta_list(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HOST_CMD_APCMD_STA_LIST, + HostCmd_ACT_GEN_GET, + 0, (t_void *)pioctl_req, MNULL); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief soft_reset + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_misc_ioctl_soft_reset(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_SOFT_RESET, + HostCmd_ACT_GEN_SET, + 0, (t_void *)pioctl_req, MNULL); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Tx data pause + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_misc_ioctl_txdatapause(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_misc_cfg *pmisc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 cmd_action = 0; + + ENTER(); + + if (pioctl_req->action == MLAN_ACT_SET) + cmd_action = HostCmd_ACT_GEN_SET; + else + cmd_action = HostCmd_ACT_GEN_GET; + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_CFG_TX_DATA_PAUSE, + cmd_action, + 0, + (t_void *)pioctl_req, + &(pmisc->param.tx_datapause)); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Power mode + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_pm_ioctl_mode(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_pm_cfg *pm = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u16 cmd_action = 0; + t_u32 cmd_oid = 0; + + ENTER(); + + pm = (mlan_ds_pm_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_SET) { + if (pm->param.ps_mgmt.ps_mode == PS_MODE_INACTIVITY) { + cmd_action = EN_AUTO_PS; + cmd_oid = BITMAP_UAP_INACT_PS; + } else if (pm->param.ps_mgmt.ps_mode == PS_MODE_PERIODIC_DTIM) { + cmd_action = EN_AUTO_PS; + cmd_oid = BITMAP_UAP_DTIM_PS; + } else { + cmd_action = DIS_AUTO_PS; + cmd_oid = BITMAP_UAP_INACT_PS | BITMAP_UAP_DTIM_PS; + } + } else { + cmd_action = GET_PS; + cmd_oid = BITMAP_UAP_INACT_PS | BITMAP_UAP_DTIM_PS; + } + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_PS_MODE_ENH, + cmd_action, cmd_oid, (t_void *)pioctl_req, + (t_void *)&pm->param.ps_mgmt); + if ((ret == MLAN_STATUS_SUCCESS) && + (pioctl_req->action == MLAN_ACT_SET) && + (cmd_action == DIS_AUTO_PS)) { + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_PS_MODE_ENH, GET_PS, + 0, MNULL, MNULL); + } + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set WAPI IE + * + * @param priv A pointer to mlan_private structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_set_wapi_ie(mlan_private *priv, pmlan_ioctl_req pioctl_req) +{ + mlan_ds_misc_cfg *misc = MNULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + if (misc->param.gen_ie.len) { + if (misc->param.gen_ie.len > sizeof(priv->wapi_ie)) { + PRINTM(MWARN, "failed to copy WAPI IE, too big\n"); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + memcpy(priv->adapter, priv->wapi_ie, misc->param.gen_ie.ie_data, + misc->param.gen_ie.len); + priv->wapi_ie_len = misc->param.gen_ie.len; + PRINTM(MIOCTL, "Set wapi_ie_len=%d IE=%#x\n", priv->wapi_ie_len, + priv->wapi_ie[0]); + DBG_HEXDUMP(MCMD_D, "wapi_ie", priv->wapi_ie, + priv->wapi_ie_len); + if (priv->wapi_ie[0] == WAPI_IE) + priv->sec_info.wapi_enabled = MTRUE; + } else { + memset(priv->adapter, priv->wapi_ie, 0, sizeof(priv->wapi_ie)); + priv->wapi_ie_len = misc->param.gen_ie.len; + PRINTM(MINFO, "Reset wapi_ie_len=%d IE=%#x\n", + priv->wapi_ie_len, priv->wapi_ie[0]); + priv->sec_info.wapi_enabled = MFALSE; + } + + /* Send request to firmware */ + ret = wlan_prepare_cmd(priv, HOST_CMD_APCMD_SYS_CONFIGURE, + HostCmd_ACT_GEN_SET, 0, (t_void *)pioctl_req, + MNULL); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set generic IE + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_misc_ioctl_gen_ie(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_misc_cfg *misc = MNULL; + IEEEtypes_VendorHeader_t *pvendor_ie = MNULL; + + ENTER(); + + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + + if ((misc->param.gen_ie.type == MLAN_IE_TYPE_GEN_IE) && + (pioctl_req->action == MLAN_ACT_SET)) { + if (misc->param.gen_ie.len) { + pvendor_ie = + (IEEEtypes_VendorHeader_t *)misc->param.gen_ie. + ie_data; + if (pvendor_ie->element_id == WAPI_IE) { + /* IE is a WAPI IE so call set_wapi function */ + ret = wlan_uap_set_wapi_ie(pmpriv, pioctl_req); + } + } else { + /* clear WAPI IE */ + ret = wlan_uap_set_wapi_ie(pmpriv, pioctl_req); + } + } + LEAVE(); + return ret; +} + +/** + * @brief Set/Get WAPI status + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_uap_sec_ioctl_wapi_enable(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_sec_cfg *sec = MNULL; + ENTER(); + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) { + if (pmpriv->wapi_ie_len) + sec->param.wapi_enabled = MTRUE; + else + sec->param.wapi_enabled = MFALSE; + } else { + if (sec->param.wapi_enabled == MFALSE) { + memset(pmpriv->adapter, pmpriv->wapi_ie, 0, + sizeof(pmpriv->wapi_ie)); + pmpriv->wapi_ie_len = 0; + PRINTM(MINFO, "Reset wapi_ie_len=%d IE=%#x\n", + pmpriv->wapi_ie_len, pmpriv->wapi_ie[0]); + pmpriv->sec_info.wapi_enabled = MFALSE; + } + } + pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; + LEAVE(); + return ret; +} + +/** + * @brief report mic error + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_sec_ioctl_report_mic_error(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_sec_cfg *sec = MNULL; + + ENTER(); + + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + ret = wlan_prepare_cmd(pmpriv, + HOST_CMD_APCMD_REPORT_MIC, + HostCmd_ACT_GEN_SET, + 0, + (t_void *)pioctl_req, + (t_void *)sec->param.sta_mac); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Set encrypt key + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_sec_ioctl_set_encrypt_key(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_sec_cfg *sec = MNULL; + + ENTER(); + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + if (pioctl_req->action != MLAN_ACT_SET) { + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + if (!sec->param.encrypt_key.key_remove && + !sec->param.encrypt_key.key_len) { + PRINTM(MCMND, "Skip set key with key_len = 0\n"); + LEAVE(); + return ret; + } + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_KEY_MATERIAL, + HostCmd_ACT_GEN_SET, + KEY_INFO_ENABLED, + (t_void *)pioctl_req, &sec->param.encrypt_key); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + LEAVE(); + return ret; +} + +/** + * @brief Get BSS information + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_uap_get_bss_info(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_get_info *info; + + ENTER(); + + info = (mlan_ds_get_info *)pioctl_req->pbuf; + /* Connection status */ + info->param.bss_info.media_connected = pmpriv->media_connected; + + /* Radio status */ + info->param.bss_info.radio_on = pmadapter->radio_on; + + /* BSSID */ + memcpy(pmadapter, &info->param.bss_info.bssid, pmpriv->curr_addr, + MLAN_MAC_ADDR_LENGTH); + info->param.bss_info.is_hs_configured = pmadapter->is_hs_configured; + pioctl_req->data_read_written = + sizeof(mlan_bss_info) + MLAN_SUB_COMMAND_SIZE; + + LEAVE(); + return ret; +} + +/** + * @brief Set Host Sleep configurations + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCES/MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_pm_ioctl_deepsleep(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_pm_cfg *pm = MNULL; + mlan_ds_auto_ds auto_ds; + t_u32 mode; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_pm_cfg)) { + PRINTM(MWARN, "MLAN bss IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_pm_cfg); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + pm = (mlan_ds_pm_cfg *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_GET) { + if (pmadapter->is_deep_sleep) { + pm->param.auto_deep_sleep.auto_ds = DEEP_SLEEP_ON; + pm->param.auto_deep_sleep.idletime = + pmadapter->idle_time; + } else + pm->param.auto_deep_sleep.auto_ds = DEEP_SLEEP_OFF; + } else { + if (pmadapter->is_deep_sleep && + pm->param.auto_deep_sleep.auto_ds == DEEP_SLEEP_ON) { + PRINTM(MMSG, "uAP already in deep sleep mode\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + if (((mlan_ds_pm_cfg *)pioctl_req->pbuf)->param.auto_deep_sleep. + auto_ds == DEEP_SLEEP_ON) { + auto_ds.auto_ds = DEEP_SLEEP_ON; + mode = EN_AUTO_PS; + PRINTM(MINFO, "Auto Deep Sleep: on\n"); + } else { + mode = DIS_AUTO_PS; + auto_ds.auto_ds = DEEP_SLEEP_OFF; + PRINTM(MINFO, "Auto Deep Sleep: off\n"); + } + if (((mlan_ds_pm_cfg *)pioctl_req->pbuf)->param.auto_deep_sleep. + idletime) + auto_ds.idletime = + ((mlan_ds_pm_cfg *)pioctl_req->pbuf)->param. + auto_deep_sleep.idletime; + else + auto_ds.idletime = pmadapter->idle_time; + ret = wlan_prepare_cmd(pmpriv, + HostCmd_CMD_802_11_PS_MODE_ENH, + (t_u16)mode, + BITMAP_AUTO_DS, + (t_void *)pioctl_req, &auto_ds); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + } + LEAVE(); + return ret; +} + +/** + * @brief Set SNMP MIB for 11D + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_uap_snmp_mib_11d(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_snmp_mib *snmp = MNULL; + state_11d_t flag; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_snmp_mib)) { + PRINTM(MWARN, "MLAN snmp_mib IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_snmp_mib); + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + + if ((pioctl_req->action == MLAN_ACT_SET) && pmpriv->uap_bss_started) { + PRINTM(MIOCTL, + "11D setting cannot be changed while UAP bss is started.\n"); + pioctl_req->data_read_written = 0; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + snmp = (mlan_ds_snmp_mib *)pioctl_req->pbuf; + flag = (snmp->param.oid_value) ? ENABLE_11D : DISABLE_11D; + + ret = wlan_11d_enable(pmpriv, (t_void *)pioctl_req, flag); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Callback to finish domain_info handling + * Not to be called directly to initiate domain_info setting. + * + * @param pmpriv A pointer to mlan_private structure (cast from t_void*) + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + * @sa wlan_uap_domain_info + */ +static mlan_status +wlan_uap_callback_domain_info(IN t_void *priv) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = (mlan_private *)priv; + wlan_uap_get_info_cb_t *puap_state_chan_cb = &pmpriv->uap_state_chan_cb; + mlan_ds_11d_cfg *cfg11d; + t_u8 band; + pmlan_adapter pmadapter = pmpriv->adapter; + pmlan_callbacks pcb = &pmadapter->callbacks; + + ENTER(); + /* clear callback now that we're here */ + puap_state_chan_cb->get_chan_callback = MNULL; + + if (!puap_state_chan_cb->pioctl_req_curr) { + PRINTM(MERROR, "pioctl_req_curr is null\n"); + LEAVE(); + return ret; + } + cfg11d = (mlan_ds_11d_cfg *)puap_state_chan_cb->pioctl_req_curr->pbuf; + band = (puap_state_chan_cb-> + band_config & BAND_CONFIG_5GHZ) ? BAND_A : BAND_B; + + ret = wlan_11d_handle_uap_domain_info(pmpriv, band, + cfg11d->param.domain_tlv, + puap_state_chan_cb-> + pioctl_req_curr); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + else { + puap_state_chan_cb->pioctl_req_curr->status_code = + MLAN_STATUS_FAILURE; + pcb->moal_ioctl_complete(pmadapter->pmoal_handle, + puap_state_chan_cb->pioctl_req_curr, + MLAN_STATUS_FAILURE); + } + + puap_state_chan_cb->pioctl_req_curr = MNULL; /* prevent re-use */ + LEAVE(); + return ret; +} + +/** + * @brief Set Domain Info for 11D + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + * @sa wlan_uap_callback_domain_info + */ +static mlan_status +wlan_uap_domain_info(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_11d_cfg)) { + PRINTM(MWARN, "MLAN 11d_cfg IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_11d_cfg); + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + + if ((pioctl_req->action == MLAN_ACT_SET) && pmpriv->uap_bss_started) { + PRINTM(MIOCTL, + "Domain_info cannot be changed while UAP bss is started.\n"); + pioctl_req->data_read_written = 0; + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + /* store params, issue command to get UAP channel, whose CMD_RESP will + callback remainder of domain_info handling */ + pmpriv->uap_state_chan_cb.pioctl_req_curr = pioctl_req; + pmpriv->uap_state_chan_cb.get_chan_callback = + wlan_uap_callback_domain_info; + + ret = wlan_uap_get_channel(pmpriv); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Callback to finish 11H channel check handling. + * Not to be called directly to initiate channel check. + * + * @param priv A pointer to mlan_private structure (cast from t_void*) + * + * @return MLAN_STATUS_SUCCESS/PENDING --success, otherwise fail + * @sa wlan_uap_11h_channel_check_req + */ +static mlan_status +wlan_uap_callback_11h_channel_check_req(IN t_void *priv) +{ + mlan_status ret = MLAN_STATUS_FAILURE; + mlan_private *pmpriv = (mlan_private *)priv; + mlan_callbacks *pcb = (mlan_callbacks *)&pmpriv->adapter->callbacks; + wlan_uap_get_info_cb_t *puap_state_chan_cb = &pmpriv->uap_state_chan_cb; + Band_Config_t *pband_cfg = + (Band_Config_t *)(&puap_state_chan_cb->band_config); + /* keep copy as local variable */ + pmlan_ioctl_req pioctl = puap_state_chan_cb->pioctl_req_curr; + + ENTER(); + /* clear callback now that we're here */ + puap_state_chan_cb->get_chan_callback = MNULL; + /* clear early to avoid race condition */ + puap_state_chan_cb->pioctl_req_curr = MNULL; + + /* + * Check if the region and channel requires a channel availability + * check. + */ + if ((puap_state_chan_cb->band_config & BAND_CONFIG_5GHZ) && + !wlan_can_radar_det_skip(pmpriv) && + wlan_11h_radar_detect_required(pmpriv, puap_state_chan_cb->channel) + && !wlan_11h_is_channel_under_nop(pmpriv->adapter, + puap_state_chan_cb->channel)) { + + /* + * Radar detection is required for this channel, make sure + * 11h is activated in the firmware + */ + ret = wlan_11h_activate(pmpriv, MNULL, MTRUE); + ret = wlan_11h_config_master_radar_det(pmpriv, MTRUE); + ret = wlan_11h_check_update_radar_det_state(pmpriv); + + /* Check for radar on the channel */ + ret = wlan_11h_issue_radar_detect(pmpriv, + pioctl, + puap_state_chan_cb->channel, + pband_cfg->chanWidth); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + } else { + /* No command sent with the ioctl, need manually signal + completion */ + pcb->moal_ioctl_complete(pmpriv->adapter->pmoal_handle, + pioctl, MLAN_STATUS_COMPLETE); + } + + LEAVE(); + return ret; +} + +/** + * @brief 802.11h uap start channel check + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + * @sa wlan_uap_callback_11h_channel_check_req + */ +static mlan_status +wlan_uap_11h_channel_check_req(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_11h_cfg)) { + PRINTM(MWARN, "MLAN 11h_cfg IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_11h_cfg); + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + + /* store params, issue command to get UAP channel, whose CMD_RESP will + callback remainder of 11H channel check handling */ + pmpriv->uap_state_chan_cb.pioctl_req_curr = pioctl_req; + pmpriv->uap_state_chan_cb.get_chan_callback = + wlan_uap_callback_11h_channel_check_req; + + ret = wlan_uap_get_channel(pmpriv); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Callback to finish 11H handling + * Not to be called directly to initiate 11H setting. + * + * @param pmpriv A pointer to mlan_private structure (cast from t_void*) + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + * @sa wlan_uap_snmp_mib_11h + */ +static mlan_status +wlan_uap_callback_snmp_mib_11h(IN t_void *priv) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = (mlan_private *)priv; + wlan_uap_get_info_cb_t *puap_state_chan_cb = &pmpriv->uap_state_chan_cb; + mlan_ds_snmp_mib *snmp; + t_bool enable_11h; + + ENTER(); + /* clear callback now that we're here */ + puap_state_chan_cb->get_chan_callback = MNULL; + + snmp = (mlan_ds_snmp_mib *)puap_state_chan_cb->pioctl_req_curr->pbuf; + enable_11h = (snmp->param.oid_value) ? MTRUE : MFALSE; + + if (enable_11h) { + if ((puap_state_chan_cb->band_config & BAND_CONFIG_5GHZ) && + !wlan_can_radar_det_skip(pmpriv) && + wlan_11h_radar_detect_required(pmpriv, + puap_state_chan_cb-> + channel)) { + if (!wlan_11h_is_master_radar_det_active(pmpriv)) + wlan_11h_config_master_radar_det(pmpriv, MTRUE); + } + } + + ret = wlan_11h_activate(pmpriv, + (t_void *)puap_state_chan_cb->pioctl_req_curr, + enable_11h); + wlan_11h_check_update_radar_det_state(pmpriv); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + puap_state_chan_cb->pioctl_req_curr = MNULL; /* prevent re-use */ + LEAVE(); + return ret; +} + +/** + * @brief Set SNMP MIB for 11H + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + * @sa wlan_uap_callback_snmp_mib_11h + */ +static mlan_status +wlan_uap_snmp_mib_11h(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_snmp_mib *snmp = MNULL; + t_bool enable; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_snmp_mib)) { + PRINTM(MWARN, "MLAN snmp_mib IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_snmp_mib); + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + snmp = (mlan_ds_snmp_mib *)pioctl_req->pbuf; + enable = (snmp->param.oid_value) ? MTRUE : MFALSE; + + if (enable) { + /* first enable 11D if it is not enabled */ + if (!wlan_11d_is_enabled(pmpriv)) { + ret = wlan_11d_enable(pmpriv, MNULL, ENABLE_11D); + if (ret != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, + "Failed to first enable 11D before enabling 11H.\n"); + LEAVE(); + return ret; + } + } + } + + /* store params, issue command to get UAP channel, whose CMD_RESP will + callback remainder of 11H handling (and radar detect if DFS chan) */ + pmpriv->uap_state_chan_cb.pioctl_req_curr = pioctl_req; + pmpriv->uap_state_chan_cb.get_chan_callback = + wlan_uap_callback_snmp_mib_11h; + + ret = wlan_uap_get_channel(pmpriv); + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/******************************************************** + Global Functions +********************************************************/ + +/** + * @brief Issue CMD to UAP firmware to get current channel + * + * @param pmpriv A pointer to mlan_private structure + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +mlan_status +wlan_uap_get_channel(IN pmlan_private pmpriv) +{ + MrvlIEtypes_channel_band_t tlv_chan_band; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + memset(pmpriv->adapter, &tlv_chan_band, 0, sizeof(tlv_chan_band)); + tlv_chan_band.header.type = TLV_TYPE_UAP_CHAN_BAND_CONFIG; + tlv_chan_band.header.len = sizeof(MrvlIEtypes_channel_band_t) + - sizeof(MrvlIEtypesHeader_t); + + ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, + HostCmd_ACT_GEN_GET, 0, MNULL, &tlv_chan_band); + LEAVE(); + return ret; +} + +/** + * @brief Issue CMD to UAP firmware to set current channel + * + * @param pmpriv A pointer to mlan_private structure + * @param uap_band_cfg UAP band configuration + * @param channel New channel + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +mlan_status +wlan_uap_set_channel(IN pmlan_private pmpriv, + IN t_u8 uap_band_cfg, IN t_u8 channel) +{ + MrvlIEtypes_channel_band_t tlv_chan_band; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + memset(pmpriv->adapter, &tlv_chan_band, 0, sizeof(tlv_chan_band)); + tlv_chan_band.header.type = TLV_TYPE_UAP_CHAN_BAND_CONFIG; + tlv_chan_band.header.len = sizeof(MrvlIEtypes_channel_band_t) + - sizeof(MrvlIEtypesHeader_t); + tlv_chan_band.band_config = uap_band_cfg; + tlv_chan_band.channel = channel; + + ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, + HostCmd_ACT_GEN_SET, 0, MNULL, &tlv_chan_band); + LEAVE(); + return ret; +} + +/** + * @brief Issue CMD to UAP firmware to get current beacon and dtim periods + * + * @param pmpriv A pointer to mlan_private structure + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +mlan_status +wlan_uap_get_beacon_dtim(IN pmlan_private pmpriv) +{ + t_u8 tlv_buffer[sizeof(MrvlIEtypes_beacon_period_t) + + sizeof(MrvlIEtypes_dtim_period_t)]; + MrvlIEtypes_beacon_period_t *ptlv_beacon_pd; + MrvlIEtypes_dtim_period_t *ptlv_dtim_pd; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(pmpriv->adapter, &tlv_buffer, 0, sizeof(tlv_buffer)); + ptlv_beacon_pd = (MrvlIEtypes_beacon_period_t *)tlv_buffer; + ptlv_beacon_pd->header.type = TLV_TYPE_UAP_BEACON_PERIOD; + ptlv_beacon_pd->header.len = sizeof(MrvlIEtypes_beacon_period_t) + - sizeof(MrvlIEtypesHeader_t); + + ptlv_dtim_pd = (MrvlIEtypes_dtim_period_t *)(tlv_buffer + + + sizeof + (MrvlIEtypes_beacon_period_t)); + ptlv_dtim_pd->header.type = TLV_TYPE_UAP_DTIM_PERIOD; + ptlv_dtim_pd->header.len = sizeof(MrvlIEtypes_dtim_period_t) + - sizeof(MrvlIEtypesHeader_t); + + ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, + HostCmd_ACT_GEN_GET, 0, MNULL, tlv_buffer); + LEAVE(); + return ret; +} + +/** + * @brief MLAN uap ioctl handler + * + * @param adapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +mlan_status +wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req) +{ + pmlan_adapter pmadapter = (pmlan_adapter)adapter; + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_ds_bss *bss = MNULL; + mlan_ds_get_info *pget_info = MNULL; + mlan_ds_misc_cfg *misc = MNULL; + mlan_ds_sec_cfg *sec = MNULL; + mlan_ds_pm_cfg *pm = MNULL; + mlan_ds_11d_cfg *cfg11d = MNULL; + mlan_ds_snmp_mib *snmp = MNULL; + mlan_ds_11h_cfg *cfg11h = MNULL; + mlan_ds_radio_cfg *radiocfg = MNULL; + mlan_ds_rate *rate = MNULL; + mlan_ds_reg_mem *reg_mem = MNULL; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) + mlan_ds_scan *pscan; +#endif + + ENTER(); + + switch (pioctl_req->req_id) { + case MLAN_IOCTL_BSS: + bss = (mlan_ds_bss *)pioctl_req->pbuf; + if (bss->sub_command == MLAN_OID_BSS_MAC_ADDR) + status = wlan_uap_bss_ioctl_mac_address(pmadapter, + pioctl_req); + else if (bss->sub_command == MLAN_OID_BSS_STOP) + status = wlan_uap_bss_ioctl_stop(pmadapter, pioctl_req); + else if (bss->sub_command == MLAN_OID_BSS_START) + status = wlan_uap_bss_ioctl_start(pmadapter, + pioctl_req); + else if (bss->sub_command == MLAN_OID_UAP_BSS_CONFIG) + status = wlan_uap_bss_ioctl_config(pmadapter, + pioctl_req); + else if (bss->sub_command == MLAN_OID_UAP_DEAUTH_STA) + status = wlan_uap_bss_ioctl_deauth_sta(pmadapter, + pioctl_req); + else if (bss->sub_command == MLAN_OID_UAP_BSS_RESET) + status = wlan_uap_bss_ioctl_reset(pmadapter, + pioctl_req); +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) + else if (bss->sub_command == MLAN_OID_BSS_ROLE) + status = wlan_bss_ioctl_bss_role(pmadapter, pioctl_req); +#endif +#ifdef WIFI_DIRECT_SUPPORT + else if (bss->sub_command == MLAN_OID_WIFI_DIRECT_MODE) + status = wlan_bss_ioctl_wifi_direct_mode(pmadapter, + pioctl_req); +#endif + else if (bss->sub_command == MLAN_OID_BSS_REMOVE) + status = wlan_bss_ioctl_bss_remove(pmadapter, + pioctl_req); + else if (bss->sub_command == MLAN_OID_UAP_CFG_WMM_PARAM) + status = wlan_uap_bss_ioctl_uap_wmm_param(pmadapter, + pioctl_req); + else if (bss->sub_command == MLAN_OID_UAP_SCAN_CHANNELS) + status = wlan_uap_bss_ioctl_uap_scan_channels(pmadapter, + pioctl_req); + else if (bss->sub_command == MLAN_OID_UAP_CHANNEL) + status = wlan_uap_bss_ioctl_uap_channel(pmadapter, + pioctl_req); + else if (bss->sub_command == MLAN_OID_UAP_OPER_CTRL) + status = wlan_uap_bss_ioctl_uap_oper_ctrl(pmadapter, + pioctl_req); + break; +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) + case MLAN_IOCTL_SCAN: + pscan = (mlan_ds_scan *)pioctl_req->pbuf; + if ((pscan->sub_command == MLAN_OID_SCAN_NORMAL) && + (pioctl_req->action == MLAN_ACT_GET)) { + PRINTM(MIOCTL, "Get scan table in uap\n"); + pscan->param.scan_resp.pscan_table = + (t_u8 *)pmadapter->pscan_table; + pscan->param.scan_resp.num_in_scan_table = + pmadapter->num_in_scan_table; + pscan->param.scan_resp.age_in_secs = + pmadapter->age_in_secs; + pioctl_req->data_read_written = + sizeof(mlan_scan_resp) + MLAN_SUB_COMMAND_SIZE; + pscan->param.scan_resp.pchan_stats = + (t_u8 *)pmadapter->pchan_stats; + pscan->param.scan_resp.num_in_chan_stats = + pmadapter->num_in_chan_stats; + } + break; +#endif + case MLAN_IOCTL_GET_INFO: + pget_info = (mlan_ds_get_info *)pioctl_req->pbuf; + if (pget_info->sub_command == MLAN_OID_GET_VER_EXT) + status = wlan_get_info_ver_ext(pmadapter, pioctl_req); + else if (pget_info->sub_command == MLAN_OID_GET_DEBUG_INFO) + status = wlan_get_info_debug_info(pmadapter, + pioctl_req); + else if (pget_info->sub_command == MLAN_OID_GET_STATS) + status = wlan_uap_get_stats(pmadapter, pioctl_req); + else if (pget_info->sub_command == MLAN_OID_UAP_STA_LIST) + status = wlan_uap_get_sta_list(pmadapter, pioctl_req); + else if (pget_info->sub_command == MLAN_OID_GET_BSS_INFO) + status = wlan_uap_get_bss_info(pmadapter, pioctl_req); + else if (pget_info->sub_command == MLAN_OID_GET_FW_INFO) { + pioctl_req->data_read_written = + sizeof(mlan_fw_info) + MLAN_SUB_COMMAND_SIZE; + memcpy(pmadapter, &pget_info->param.fw_info.mac_addr, + pmpriv->curr_addr, MLAN_MAC_ADDR_LENGTH); + pget_info->param.fw_info.fw_ver = + pmadapter->fw_release_number; + pget_info->param.fw_info.fw_bands = pmadapter->fw_bands; + pget_info->param.fw_info.hw_dev_mcs_support = + pmadapter->hw_dev_mcs_support; + pget_info->param.fw_info.hw_dot_11n_dev_cap = + pmadapter->hw_dot_11n_dev_cap; + pget_info->param.fw_info.hw_dot_11ac_mcs_support = + pmadapter->hw_dot_11ac_mcs_support; + pget_info->param.fw_info.hw_dot_11ac_dev_cap = + pmadapter->hw_dot_11ac_dev_cap; + pget_info->param.fw_info.region_code = + pmadapter->region_code; + } + break; + case MLAN_IOCTL_MISC_CFG: + misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf; + if (misc->sub_command == MLAN_OID_MISC_INIT_SHUTDOWN) + status = wlan_misc_ioctl_init_shutdown(pmadapter, + pioctl_req); + if (misc->sub_command == MLAN_OID_MISC_SOFT_RESET) + status = wlan_uap_misc_ioctl_soft_reset(pmadapter, + pioctl_req); + if (misc->sub_command == MLAN_OID_MISC_HOST_CMD) + status = wlan_misc_ioctl_host_cmd(pmadapter, + pioctl_req); + if (misc->sub_command == MLAN_OID_MISC_GEN_IE) + status = wlan_uap_misc_ioctl_gen_ie(pmadapter, + pioctl_req); + if (misc->sub_command == MLAN_OID_MISC_CUSTOM_IE) + status = wlan_misc_ioctl_custom_ie_list(pmadapter, + pioctl_req, + MTRUE); + if (misc->sub_command == MLAN_OID_MISC_TX_DATAPAUSE) + status = wlan_uap_misc_ioctl_txdatapause(pmadapter, + pioctl_req); + if (misc->sub_command == MLAN_OID_MISC_RX_MGMT_IND) + status = wlan_reg_rx_mgmt_ind(pmadapter, pioctl_req); +#ifdef DEBUG_LEVEL1 + if (misc->sub_command == MLAN_OID_MISC_DRVDBG) + status = wlan_set_drvdbg(pmadapter, pioctl_req); +#endif + if (misc->sub_command == MLAN_OID_MISC_TXCONTROL) + status = wlan_misc_ioctl_txcontrol(pmadapter, + pioctl_req); + if (misc->sub_command == MLAN_OID_MISC_MAC_CONTROL) + status = wlan_misc_ioctl_mac_control(pmadapter, + pioctl_req); + if (misc->sub_command == MLAN_OID_MISC_MULTI_CHAN_CFG) + status = wlan_misc_ioctl_multi_chan_config(pmadapter, + pioctl_req); + if (misc->sub_command == MLAN_OID_MISC_MULTI_CHAN_POLICY) + status = wlan_misc_ioctl_multi_chan_policy(pmadapter, + pioctl_req); +#ifdef RX_PACKET_COALESCE + if (misc->sub_command == MLAN_OID_MISC_RX_PACKET_COALESCE) + status = wlan_misc_ioctl_rx_pkt_coalesce_config + (pmadapter, pioctl_req); +#endif +#ifdef WIFI_DIRECT_SUPPORT + if (misc->sub_command == MLAN_OID_MISC_WIFI_DIRECT_CONFIG) + status = wlan_misc_p2p_config(pmadapter, pioctl_req); +#endif + + break; + case MLAN_IOCTL_PM_CFG: + pm = (mlan_ds_pm_cfg *)pioctl_req->pbuf; + if (pm->sub_command == MLAN_OID_PM_CFG_PS_MODE) + status = wlan_uap_pm_ioctl_mode(pmadapter, pioctl_req); + if (pm->sub_command == MLAN_OID_PM_CFG_DEEP_SLEEP) + status = wlan_uap_pm_ioctl_deepsleep(pmadapter, + pioctl_req); + if (pm->sub_command == MLAN_OID_PM_CFG_HS_CFG) + status = wlan_pm_ioctl_hscfg(pmadapter, pioctl_req); + if (pm->sub_command == MLAN_OID_PM_HS_WAKEUP_REASON) + status = wlan_get_hs_wakeup_reason(pmadapter, + pioctl_req); + if (pm->sub_command == MLAN_OID_PM_INFO) + status = wlan_get_pm_info(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_SNMP_MIB: + snmp = (mlan_ds_snmp_mib *)pioctl_req->pbuf; + if (snmp->sub_command == MLAN_OID_SNMP_MIB_DOT11D) + status = wlan_uap_snmp_mib_11d(pmadapter, pioctl_req); + if (snmp->sub_command == MLAN_OID_SNMP_MIB_DOT11H) + status = wlan_uap_snmp_mib_11h(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_SEC_CFG: + sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf; + if (sec->sub_command == MLAN_OID_SEC_CFG_ENCRYPT_KEY) + status = wlan_uap_sec_ioctl_set_encrypt_key(pmadapter, + pioctl_req); + if (sec->sub_command == MLAN_OID_SEC_CFG_WAPI_ENABLED) + status = wlan_uap_sec_ioctl_wapi_enable(pmadapter, + pioctl_req); + if (sec->sub_command == MLAN_OID_SEC_CFG_REPORT_MIC_ERR) + status = wlan_uap_sec_ioctl_report_mic_error(pmadapter, + pioctl_req); + break; + case MLAN_IOCTL_11N_CFG: + status = wlan_11n_cfg_ioctl(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_11D_CFG: + cfg11d = (mlan_ds_11d_cfg *)pioctl_req->pbuf; + if (cfg11d->sub_command == MLAN_OID_11D_DOMAIN_INFO) + status = wlan_uap_domain_info(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_11H_CFG: + cfg11h = (mlan_ds_11h_cfg *)pioctl_req->pbuf; + if (cfg11h->sub_command == MLAN_OID_11H_CHANNEL_CHECK) + status = wlan_uap_11h_channel_check_req(pmadapter, + pioctl_req); +#if defined(DFS_TESTING_SUPPORT) + if (cfg11h->sub_command == MLAN_OID_11H_DFS_TESTING) + status = wlan_11h_ioctl_dfs_testing(pmadapter, + pioctl_req); +#endif + if (cfg11h->sub_command == MLAN_OID_11H_CHAN_REPORT_REQUEST) + status = wlan_11h_ioctl_dfs_cancel_chan_report(pmpriv, + pioctl_req); + break; + case MLAN_IOCTL_RADIO_CFG: + radiocfg = (mlan_ds_radio_cfg *)pioctl_req->pbuf; + if (radiocfg->sub_command == MLAN_OID_RADIO_CTRL) + status = wlan_radio_ioctl_radio_ctl(pmadapter, + pioctl_req); +#ifdef WIFI_DIRECT_SUPPORT + if (radiocfg->sub_command == MLAN_OID_REMAIN_CHAN_CFG) + status = wlan_radio_ioctl_remain_chan_cfg(pmadapter, + pioctl_req); +#endif + if (radiocfg->sub_command == MLAN_OID_ANT_CFG) + status = wlan_radio_ioctl_ant_cfg(pmadapter, + pioctl_req); + break; + case MLAN_IOCTL_RATE: + rate = (mlan_ds_rate *)pioctl_req->pbuf; + if (rate->sub_command == MLAN_OID_RATE_CFG) + status = wlan_rate_ioctl_cfg(pmadapter, pioctl_req); + else if (rate->sub_command == MLAN_OID_GET_DATA_RATE) + status = wlan_rate_ioctl_get_data_rate(pmadapter, + pioctl_req); + break; + case MLAN_IOCTL_11AC_CFG: + status = wlan_11ac_cfg_ioctl(pmadapter, pioctl_req); + break; + case MLAN_IOCTL_REG_MEM: + reg_mem = (mlan_ds_reg_mem *)pioctl_req->pbuf; + if (reg_mem->sub_command == MLAN_OID_REG_RW) + status = wlan_reg_mem_ioctl_reg_rw(pmadapter, + pioctl_req); + else if (reg_mem->sub_command == MLAN_OID_EEPROM_RD) + status = wlan_reg_mem_ioctl_read_eeprom(pmadapter, + pioctl_req); + else if (reg_mem->sub_command == MLAN_OID_MEM_RW) + status = wlan_reg_mem_ioctl_mem_rw(pmadapter, + pioctl_req); + break; + case MLAN_IOCTL_WMM_CFG: + status = wlan_wmm_cfg_ioctl(pmadapter, pioctl_req); + break; + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + break; + } + LEAVE(); + return status; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_uap_txrx.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_uap_txrx.c new file mode 100644 index 00000000..7717d6d5 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_uap_txrx.c @@ -0,0 +1,673 @@ +/** @file mlan_uap_txrx.c + * + * @brief This file contains AP mode transmit and receive functions + * + * Copyright (C) 2009-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/******************************************************** +Change log: + 02/05/2009: initial version +********************************************************/ + +#include "mlan.h" +#include "mlan_util.h" +#include "mlan_fw.h" +#ifdef STA_SUPPORT +#include "mlan_join.h" +#endif +#include "mlan_main.h" +#include "mlan_uap.h" +#include "mlan_sdio.h" +#include "mlan_wmm.h" +#include "mlan_11n_aggr.h" +#include "mlan_11n_rxreorder.h" + +/******************************************************** + Local Functions +********************************************************/ + +/** + * @brief This function processes received packet and forwards it + * to kernel/upper layer + * + * @param pmadapter A pointer to mlan_adapter + * @param pmbuf A pointer to mlan_buffer which includes the received packet + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +wlan_upload_uap_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private priv = pmadapter->priv[pmbuf->bss_index]; + UapRxPD *prx_pd; + ENTER(); + prx_pd = (UapRxPD *)(pmbuf->pbuf + pmbuf->data_offset); + + /* Chop off RxPD */ + pmbuf->data_len -= prx_pd->rx_pkt_offset; + pmbuf->data_offset += prx_pd->rx_pkt_offset; + pmbuf->pparent = MNULL; + + DBG_HEXDUMP(MDAT_D, "uAP RxPD", (t_u8 *)prx_pd, + MIN(sizeof(UapRxPD), MAX_DATA_DUMP_LEN)); + DBG_HEXDUMP(MDAT_D, "uAP Rx Payload", + ((t_u8 *)prx_pd + prx_pd->rx_pkt_offset), + MIN(prx_pd->rx_pkt_length, MAX_DATA_DUMP_LEN)); + + pmadapter->callbacks.moal_get_system_time(pmadapter->pmoal_handle, + &pmbuf->out_ts_sec, + &pmbuf->out_ts_usec); + PRINTM_NETINTF(MDATA, priv); + PRINTM(MDATA, "%lu.%06lu : Data => kernel seq_num=%d tid=%d\n", + pmbuf->out_ts_sec, pmbuf->out_ts_usec, prx_pd->seq_num, + prx_pd->priority); + ret = pmadapter->callbacks.moal_recv_packet(pmadapter->pmoal_handle, + pmbuf); + if (ret == MLAN_STATUS_FAILURE) { + PRINTM(MERROR, + "uAP Rx Error: moal_recv_packet returned error\n"); + pmbuf->status_code = MLAN_ERROR_PKT_INVALID; + } + + if (ret != MLAN_STATUS_PENDING) + wlan_free_mlan_buffer(pmadapter, pmbuf); + LEAVE(); + + return ret; + +} + +/** + * @brief This function will check if unicast packet need be dropped + * + * @param priv A pointer to mlan_private + * @param mac mac address to find in station list table + * + * @return MLAN_STATUS_FAILURE -- drop packet, otherwise forward to network stack + */ +static mlan_status +wlan_check_unicast_packet(mlan_private *priv, t_u8 *mac) +{ + int j; + sta_node *sta_ptr = MNULL; + pmlan_adapter pmadapter = priv->adapter; + pmlan_private pmpriv = MNULL; + t_u8 pkt_type = 0; + mlan_status ret = MLAN_STATUS_SUCCESS; + ENTER(); + for (j = 0; j < MLAN_MAX_BSS_NUM; ++j) { + pmpriv = pmadapter->priv[j]; + if (pmpriv) { + if (GET_BSS_ROLE(pmpriv) == MLAN_BSS_ROLE_STA) + continue; + sta_ptr = wlan_get_station_entry(pmpriv, mac); + if (sta_ptr) { + if (pmpriv == priv) + pkt_type = PKT_INTRA_UCAST; + else + pkt_type = PKT_INTER_UCAST; + break; + } + } + } + if ((pkt_type == PKT_INTRA_UCAST) && + (priv->pkt_fwd & PKT_FWD_INTRA_UCAST)) { + PRINTM(MDATA, "Drop INTRA_UCAST packet\n"); + ret = MLAN_STATUS_FAILURE; + } else if ((pkt_type == PKT_INTER_UCAST) && + (priv->pkt_fwd & PKT_FWD_INTER_UCAST)) { + PRINTM(MDATA, "Drop INTER_UCAST packet\n"); + ret = MLAN_STATUS_FAILURE; + } + LEAVE(); + return ret; +} + +/******************************************************** + Global Functions +********************************************************/ +/** + * @brief This function fill the txpd for tx packet + * + * @param priv A pointer to mlan_private structure + * @param pmbuf A pointer to the mlan_buffer for process + * + * @return headptr or MNULL + */ +t_void * +wlan_ops_uap_process_txpd(IN t_void *priv, IN pmlan_buffer pmbuf) +{ + pmlan_private pmpriv = (pmlan_private)priv; + UapTxPD *plocal_tx_pd; + t_u8 *head_ptr = MNULL; + t_u32 pkt_type; + t_u32 tx_control; + ENTER(); + + if (!pmbuf->data_len) { + PRINTM(MERROR, "uAP Tx Error: Invalid packet length: %d\n", + pmbuf->data_len); + pmbuf->status_code = MLAN_ERROR_PKT_SIZE_INVALID; + goto done; + } + if (pmbuf->buf_type == MLAN_BUF_TYPE_RAW_DATA) { + memcpy(pmpriv->adapter, &pkt_type, + pmbuf->pbuf + pmbuf->data_offset, sizeof(pkt_type)); + memcpy(pmpriv->adapter, &tx_control, + pmbuf->pbuf + pmbuf->data_offset + sizeof(pkt_type), + sizeof(tx_control)); + pmbuf->data_offset += sizeof(pkt_type) + sizeof(tx_control); + pmbuf->data_len -= sizeof(pkt_type) + sizeof(tx_control); + } + if (pmbuf->data_offset < (sizeof(UapTxPD) + INTF_HEADER_LEN + + DMA_ALIGNMENT)) { + PRINTM(MERROR, + "not enough space for UapTxPD: headroom=%d pkt_len=%d, required=%d\n", + pmbuf->data_offset, pmbuf->data_len, + sizeof(UapTxPD) + INTF_HEADER_LEN + DMA_ALIGNMENT); + DBG_HEXDUMP(MDAT_D, "drop pkt", + pmbuf->pbuf + pmbuf->data_offset, pmbuf->data_len); + pmbuf->status_code = MLAN_ERROR_PKT_SIZE_INVALID; + goto done; + } + + /* head_ptr should be aligned */ + head_ptr = + pmbuf->pbuf + pmbuf->data_offset - sizeof(UapTxPD) - + INTF_HEADER_LEN; + head_ptr = (t_u8 *)((t_ptr)head_ptr & ~((t_ptr)(DMA_ALIGNMENT - 1))); + + plocal_tx_pd = (UapTxPD *)(head_ptr + INTF_HEADER_LEN); + memset(pmpriv->adapter, plocal_tx_pd, 0, sizeof(UapTxPD)); + + /* Set the BSS number to TxPD */ + plocal_tx_pd->bss_num = GET_BSS_NUM(pmpriv); + plocal_tx_pd->bss_type = pmpriv->bss_type; + + plocal_tx_pd->tx_pkt_length = (t_u16)pmbuf->data_len; + + plocal_tx_pd->priority = (t_u8)pmbuf->priority; + plocal_tx_pd->pkt_delay_2ms = + wlan_wmm_compute_driver_packet_delay(pmpriv, pmbuf); + + if (plocal_tx_pd->priority < + NELEMENTS(pmpriv->wmm.user_pri_pkt_tx_ctrl)) + /* + * Set the priority specific tx_control field, setting of 0 will + * cause the default value to be used later in this function + */ + plocal_tx_pd->tx_control + = + pmpriv->wmm.user_pri_pkt_tx_ctrl[plocal_tx_pd-> + priority]; + + if (pmbuf->flags & MLAN_BUF_FLAG_TX_STATUS) { + plocal_tx_pd->tx_token_id = (t_u8)pmbuf->tx_seq_num; + plocal_tx_pd->flags |= MRVDRV_TxPD_FLAGS_TX_PACKET_STATUS; + } + + /* Offset of actual data */ + plocal_tx_pd->tx_pkt_offset = + (t_u16)((t_ptr)pmbuf->pbuf + pmbuf->data_offset - + (t_ptr)plocal_tx_pd); + + if (!plocal_tx_pd->tx_control) { + /* TxCtrl set by user or default */ + plocal_tx_pd->tx_control = pmpriv->pkt_tx_ctrl; + } + + if (pmbuf->buf_type == MLAN_BUF_TYPE_RAW_DATA) { + plocal_tx_pd->tx_pkt_type = (t_u16)pkt_type; + plocal_tx_pd->tx_control = tx_control; + } + uap_endian_convert_TxPD(plocal_tx_pd); + + /* Adjust the data offset and length to include TxPD in pmbuf */ + pmbuf->data_len += pmbuf->data_offset; + pmbuf->data_offset = (t_u32)((t_ptr)head_ptr - (t_ptr)pmbuf->pbuf); + pmbuf->data_len -= pmbuf->data_offset; + +done: + LEAVE(); + return head_ptr; +} + +/** + * @brief This function processes received packet and forwards it + * to kernel/upper layer + * + * @param adapter A pointer to mlan_adapter + * @param pmbuf A pointer to mlan_buffer which includes the received packet + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_ops_uap_process_rx_packet(IN t_void *adapter, IN pmlan_buffer pmbuf) +{ + pmlan_adapter pmadapter = (pmlan_adapter)adapter; + mlan_status ret = MLAN_STATUS_SUCCESS; + UapRxPD *prx_pd; + wlan_mgmt_pkt *puap_pkt_hdr = MNULL; + + RxPacketHdr_t *prx_pkt; + pmlan_private priv = pmadapter->priv[pmbuf->bss_index]; + t_u8 ta[MLAN_MAC_ADDR_LENGTH]; + t_u16 rx_pkt_type = 0; + sta_node *sta_ptr = MNULL; + t_u8 adj_rx_rate = 0; + + ENTER(); + + prx_pd = (UapRxPD *)(pmbuf->pbuf + pmbuf->data_offset); + /* Endian conversion */ + uap_endian_convert_RxPD(prx_pd); + priv->rxpd_rate = prx_pd->rx_rate; + + priv->rxpd_rate_info = prx_pd->rate_info; + if (!priv->adapter->psdio_device->v15_fw_api) + priv->rxpd_rate_info = + wlan_convert_v14_rate_ht_info(priv->rxpd_rate_info); + + if (priv->bss_type == MLAN_BSS_TYPE_UAP) { + adj_rx_rate = + wlan_adjust_data_rate(priv, priv->rxpd_rate, + priv->rxpd_rate_info); + pmadapter->callbacks.moal_hist_data_add(pmadapter->pmoal_handle, + pmbuf->bss_index, + adj_rx_rate, + prx_pd->snr, prx_pd->nf, + prx_pd->antenna); + } + + rx_pkt_type = prx_pd->rx_pkt_type; + prx_pkt = (RxPacketHdr_t *)((t_u8 *)prx_pd + prx_pd->rx_pkt_offset); + + PRINTM(MINFO, + "RX Data: data_len - prx_pd->rx_pkt_offset = %d - %d = %d\n", + pmbuf->data_len, prx_pd->rx_pkt_offset, + pmbuf->data_len - prx_pd->rx_pkt_offset); + + if ((prx_pd->rx_pkt_offset + prx_pd->rx_pkt_length) > + (t_u16)pmbuf->data_len) { + PRINTM(MERROR, + "Wrong rx packet: len=%d,rx_pkt_offset=%d," + " rx_pkt_length=%d\n", pmbuf->data_len, + prx_pd->rx_pkt_offset, prx_pd->rx_pkt_length); + pmbuf->status_code = MLAN_ERROR_PKT_SIZE_INVALID; + ret = MLAN_STATUS_FAILURE; + wlan_free_mlan_buffer(pmadapter, pmbuf); + goto done; + } + pmbuf->data_len = prx_pd->rx_pkt_offset + prx_pd->rx_pkt_length; + + if (pmadapter->priv[pmbuf->bss_index]->mgmt_frame_passthru_mask && + prx_pd->rx_pkt_type == PKT_TYPE_MGMT_FRAME) { + /* Check if this is mgmt packet and needs to forwarded to app + as an event */ + puap_pkt_hdr = + (wlan_mgmt_pkt *)((t_u8 *)prx_pd + + prx_pd->rx_pkt_offset); + puap_pkt_hdr->frm_len = wlan_le16_to_cpu(puap_pkt_hdr->frm_len); + if ((puap_pkt_hdr->wlan_header. + frm_ctl & IEEE80211_FC_MGMT_FRAME_TYPE_MASK) == 0) + wlan_process_802dot11_mgmt_pkt(pmadapter-> + priv[pmbuf->bss_index], + (t_u8 *)&puap_pkt_hdr-> + wlan_header, + puap_pkt_hdr->frm_len + + sizeof(wlan_mgmt_pkt) - + sizeof(puap_pkt_hdr-> + frm_len), + (RxPD *)prx_pd); + wlan_free_mlan_buffer(pmadapter, pmbuf); + goto done; + } + + pmbuf->priority = prx_pd->priority; + memcpy(pmadapter, ta, prx_pkt->eth803_hdr.src_addr, + MLAN_MAC_ADDR_LENGTH); + if ((rx_pkt_type != PKT_TYPE_BAR) && (prx_pd->priority < MAX_NUM_TID)) { + sta_ptr = wlan_get_station_entry(priv, ta); + if (sta_ptr) + sta_ptr->rx_seq[prx_pd->priority] = prx_pd->seq_num; + } + /* check if UAP enable 11n */ + if (!priv->is_11n_enabled || + (!wlan_11n_get_rxreorder_tbl + ((mlan_private *)priv, prx_pd->priority, ta) + && (prx_pd->rx_pkt_type != PKT_TYPE_AMSDU) + )) { + if (priv->pkt_fwd) + wlan_process_uap_rx_packet(priv, pmbuf); + else + wlan_upload_uap_rx_packet(pmadapter, pmbuf); + goto done; + } + /* Reorder and send to OS */ + ret = mlan_11n_rxreorder_pkt(priv, prx_pd->seq_num, + prx_pd->priority, ta, + (t_u8)prx_pd->rx_pkt_type, (void *)pmbuf); + if (ret || (rx_pkt_type == PKT_TYPE_BAR)) { + wlan_free_mlan_buffer(pmadapter, pmbuf); + } +done: + LEAVE(); + return ret; +} + +/** + * @brief This function processes received packet and forwards it + * to kernel/upper layer or send back to firmware + * + * @param priv A pointer to mlan_private + * @param pmbuf A pointer to mlan_buffer which includes the received packet + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_uap_recv_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf) +{ + pmlan_adapter pmadapter = priv->adapter; + mlan_status ret = MLAN_STATUS_SUCCESS; + RxPacketHdr_t *prx_pkt; + pmlan_buffer newbuf = MNULL; + + ENTER(); + + prx_pkt = (RxPacketHdr_t *)((t_u8 *)pmbuf->pbuf + pmbuf->data_offset); + + DBG_HEXDUMP(MDAT_D, "uap_recv_packet", pmbuf->pbuf + pmbuf->data_offset, + MIN(pmbuf->data_len, MAX_DATA_DUMP_LEN)); + + PRINTM(MDATA, "AMSDU dest " MACSTR "\n", + MAC2STR(prx_pkt->eth803_hdr.dest_addr)); + + /* don't do packet forwarding in disconnected state */ + if ((priv->media_connected == MFALSE) || + (pmbuf->data_len > MV_ETH_FRAME_LEN)) + goto upload; + + if (prx_pkt->eth803_hdr.dest_addr[0] & 0x01) { + if (!(priv->pkt_fwd & PKT_FWD_INTRA_BCAST)) { + /* Multicast pkt */ + newbuf = wlan_alloc_mlan_buffer(pmadapter, + MLAN_TX_DATA_BUF_SIZE_2K, + 0, MOAL_MALLOC_BUFFER); + if (newbuf) { + newbuf->bss_index = pmbuf->bss_index; + newbuf->buf_type = pmbuf->buf_type; + newbuf->priority = pmbuf->priority; + newbuf->in_ts_sec = pmbuf->in_ts_sec; + newbuf->in_ts_usec = pmbuf->in_ts_usec; + newbuf->data_offset = + (sizeof(UapTxPD) + INTF_HEADER_LEN + + DMA_ALIGNMENT); + util_scalar_increment(pmadapter->pmoal_handle, + &pmadapter-> + pending_bridge_pkts, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + + newbuf->flags |= MLAN_BUF_FLAG_BRIDGE_BUF; + + /* copy the data */ + memcpy(pmadapter, + (t_u8 *)newbuf->pbuf + + newbuf->data_offset, + pmbuf->pbuf + pmbuf->data_offset, + pmbuf->data_len); + newbuf->data_len = pmbuf->data_len; + wlan_wmm_add_buf_txqueue(pmadapter, newbuf); + if (util_scalar_read(pmadapter->pmoal_handle, + &pmadapter-> + pending_bridge_pkts, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock) > + RX_HIGH_THRESHOLD) + wlan_drop_tx_pkts(priv); + wlan_recv_event(priv, + MLAN_EVENT_ID_DRV_DEFER_HANDLING, + MNULL); + } + } + } else { + if ((!(priv->pkt_fwd & PKT_FWD_INTRA_UCAST)) && + (wlan_get_station_entry + (priv, prx_pkt->eth803_hdr.dest_addr))) { + /* Intra BSS packet */ + newbuf = wlan_alloc_mlan_buffer(pmadapter, + MLAN_TX_DATA_BUF_SIZE_2K, + 0, MOAL_MALLOC_BUFFER); + if (newbuf) { + newbuf->bss_index = pmbuf->bss_index; + newbuf->buf_type = pmbuf->buf_type; + newbuf->priority = pmbuf->priority; + newbuf->in_ts_sec = pmbuf->in_ts_sec; + newbuf->in_ts_usec = pmbuf->in_ts_usec; + newbuf->data_offset = + (sizeof(UapTxPD) + INTF_HEADER_LEN + + DMA_ALIGNMENT); + util_scalar_increment(pmadapter->pmoal_handle, + &pmadapter-> + pending_bridge_pkts, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + newbuf->flags |= MLAN_BUF_FLAG_BRIDGE_BUF; + + /* copy the data */ + memcpy(pmadapter, + (t_u8 *)newbuf->pbuf + + newbuf->data_offset, + pmbuf->pbuf + pmbuf->data_offset, + pmbuf->data_len); + newbuf->data_len = pmbuf->data_len; + wlan_wmm_add_buf_txqueue(pmadapter, newbuf); + if (util_scalar_read(pmadapter->pmoal_handle, + &pmadapter-> + pending_bridge_pkts, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock) > + RX_HIGH_THRESHOLD) + wlan_drop_tx_pkts(priv); + wlan_recv_event(priv, + MLAN_EVENT_ID_DRV_DEFER_HANDLING, + MNULL); + } + goto done; + } else if (MLAN_STATUS_FAILURE == + wlan_check_unicast_packet(priv, + prx_pkt->eth803_hdr. + dest_addr)) { + /* drop packet */ + PRINTM(MDATA, "Drop AMSDU dest " MACSTR "\n", + MAC2STR(prx_pkt->eth803_hdr.dest_addr)); + goto done; + } + } +upload: + /** send packet to moal */ + ret = pmadapter->callbacks.moal_recv_packet(pmadapter->pmoal_handle, + pmbuf); +done: + LEAVE(); + return ret; +} + +/** + * @brief This function processes received packet and forwards it + * to kernel/upper layer or send back to firmware + * + * @param priv A pointer to mlan_private + * @param pmbuf A pointer to mlan_buffer which includes the received packet + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +wlan_process_uap_rx_packet(IN mlan_private *priv, IN pmlan_buffer pmbuf) +{ + pmlan_adapter pmadapter = priv->adapter; + mlan_status ret = MLAN_STATUS_SUCCESS; + UapRxPD *prx_pd; + RxPacketHdr_t *prx_pkt; + pmlan_buffer newbuf = MNULL; + + ENTER(); + + prx_pd = (UapRxPD *)(pmbuf->pbuf + pmbuf->data_offset); + prx_pkt = (RxPacketHdr_t *)((t_u8 *)prx_pd + prx_pd->rx_pkt_offset); + + DBG_HEXDUMP(MDAT_D, "uAP RxPD", prx_pd, + MIN(sizeof(UapRxPD), MAX_DATA_DUMP_LEN)); + DBG_HEXDUMP(MDAT_D, "uAP Rx Payload", + ((t_u8 *)prx_pd + prx_pd->rx_pkt_offset), + MIN(prx_pd->rx_pkt_length, MAX_DATA_DUMP_LEN)); + + PRINTM(MINFO, + "RX Data: data_len - prx_pd->rx_pkt_offset = %d - %d = %d\n", + pmbuf->data_len, prx_pd->rx_pkt_offset, + pmbuf->data_len - prx_pd->rx_pkt_offset); + PRINTM(MDATA, "Rx dest " MACSTR "\n", + MAC2STR(prx_pkt->eth803_hdr.dest_addr)); + + /* don't do packet forwarding in disconnected state */ + /* don't do packet forwarding when packet > 1514 */ + if ((priv->media_connected == MFALSE) || + ((pmbuf->data_len - prx_pd->rx_pkt_offset) > MV_ETH_FRAME_LEN)) + goto upload; + + if (prx_pkt->eth803_hdr.dest_addr[0] & 0x01) { + if (!(priv->pkt_fwd & PKT_FWD_INTRA_BCAST)) { + /* Multicast pkt */ + newbuf = wlan_alloc_mlan_buffer(pmadapter, + MLAN_TX_DATA_BUF_SIZE_2K, + 0, MOAL_MALLOC_BUFFER); + if (newbuf) { + newbuf->bss_index = pmbuf->bss_index; + newbuf->buf_type = pmbuf->buf_type; + newbuf->priority = pmbuf->priority; + newbuf->in_ts_sec = pmbuf->in_ts_sec; + newbuf->in_ts_usec = pmbuf->in_ts_usec; + newbuf->data_offset = + (sizeof(UapTxPD) + INTF_HEADER_LEN + + DMA_ALIGNMENT); + util_scalar_increment(pmadapter->pmoal_handle, + &pmadapter-> + pending_bridge_pkts, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + newbuf->flags |= MLAN_BUF_FLAG_BRIDGE_BUF; + + /* copy the data, skip rxpd */ + memcpy(pmadapter, + (t_u8 *)newbuf->pbuf + + newbuf->data_offset, + pmbuf->pbuf + pmbuf->data_offset + + prx_pd->rx_pkt_offset, + pmbuf->data_len - prx_pd->rx_pkt_offset); + newbuf->data_len = + pmbuf->data_len - prx_pd->rx_pkt_offset; + wlan_wmm_add_buf_txqueue(pmadapter, newbuf); + if (util_scalar_read(pmadapter->pmoal_handle, + &pmadapter-> + pending_bridge_pkts, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock) > + RX_HIGH_THRESHOLD) + wlan_drop_tx_pkts(priv); + wlan_recv_event(priv, + MLAN_EVENT_ID_DRV_DEFER_HANDLING, + MNULL); + } + } + } else { + if ((!(priv->pkt_fwd & PKT_FWD_INTRA_UCAST)) && + (wlan_get_station_entry + (priv, prx_pkt->eth803_hdr.dest_addr))) { + /* Forwarding Intra-BSS packet */ + pmbuf->data_len -= prx_pd->rx_pkt_offset; + pmbuf->data_offset += prx_pd->rx_pkt_offset; + pmbuf->flags |= MLAN_BUF_FLAG_BRIDGE_BUF; + util_scalar_increment(pmadapter->pmoal_handle, + &pmadapter->pending_bridge_pkts, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock); + wlan_wmm_add_buf_txqueue(pmadapter, pmbuf); + if (util_scalar_read(pmadapter->pmoal_handle, + &pmadapter->pending_bridge_pkts, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock) > + RX_HIGH_THRESHOLD) + wlan_drop_tx_pkts(priv); + wlan_recv_event(priv, MLAN_EVENT_ID_DRV_DEFER_HANDLING, + MNULL); + goto done; + } else if (MLAN_STATUS_FAILURE == + wlan_check_unicast_packet(priv, + prx_pkt->eth803_hdr. + dest_addr)) { + PRINTM(MDATA, "Drop Pkts: Rx dest " MACSTR "\n", + MAC2STR(prx_pkt->eth803_hdr.dest_addr)); + pmbuf->status_code = MLAN_ERROR_PKT_INVALID; + wlan_free_mlan_buffer(pmadapter, pmbuf); + goto done; + } + } + +upload: + /* Chop off RxPD */ + pmbuf->data_len -= prx_pd->rx_pkt_offset; + pmbuf->data_offset += prx_pd->rx_pkt_offset; + pmbuf->pparent = MNULL; + + pmadapter->callbacks.moal_get_system_time(pmadapter->pmoal_handle, + &pmbuf->out_ts_sec, + &pmbuf->out_ts_usec); + PRINTM_NETINTF(MDATA, priv); + PRINTM(MDATA, "%lu.%06lu : Data => kernel seq_num=%d tid=%d\n", + pmbuf->out_ts_sec, pmbuf->out_ts_usec, prx_pd->seq_num, + prx_pd->priority); + ret = pmadapter->callbacks.moal_recv_packet(pmadapter->pmoal_handle, + pmbuf); + if (ret == MLAN_STATUS_FAILURE) { + PRINTM(MERROR, + "uAP Rx Error: moal_recv_packet returned error\n"); + pmbuf->status_code = MLAN_ERROR_PKT_INVALID; + } + + if (ret != MLAN_STATUS_PENDING) + wlan_free_mlan_buffer(pmadapter, pmbuf); +done: + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_util.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_util.h new file mode 100644 index 00000000..2e3c3bc9 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_util.h @@ -0,0 +1,537 @@ +/** @file mlan_util.h + * + * @brief This file contains wrappers for linked-list, + * spinlock and timer defines. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 10/28/2008: initial version +******************************************************/ + +#ifndef _MLAN_UTIL_H_ +#define _MLAN_UTIL_H_ + +/** Circular doubly linked list */ +typedef struct _mlan_linked_list { + /** Pointer to previous node */ + struct _mlan_linked_list *pprev; + /** Pointer to next node */ + struct _mlan_linked_list *pnext; +} mlan_linked_list, *pmlan_linked_list; + +/** List head */ +typedef struct _mlan_list_head { + /** Pointer to previous node */ + struct _mlan_linked_list *pprev; + /** Pointer to next node */ + struct _mlan_linked_list *pnext; + /** Pointer to lock */ + t_void *plock; +} mlan_list_head, *pmlan_list_head; + +/** + * @brief This function initializes a list without locking + * + * @param phead List head + * + * @return N/A + */ +static INLINE t_void +util_init_list(pmlan_linked_list phead) +{ + /* Both next and prev point to self */ + phead->pprev = phead->pnext = (pmlan_linked_list)phead; +} + +/** + * @brief This function initializes a list + * + * @param phead List head + * @param lock_required A flag for spinlock requirement + * @param moal_init_lock A pointer to init lock handler + * + * @return N/A + */ +static INLINE t_void +util_init_list_head(t_void *pmoal_handle, + pmlan_list_head phead, + t_u8 lock_required, + mlan_status (*moal_init_lock) (t_void *handle, + t_void **pplock)) +{ + /* Both next and prev point to self */ + util_init_list((pmlan_linked_list)phead); + if (lock_required) + moal_init_lock(pmoal_handle, &phead->plock); + else + phead->plock = 0; +} + +/** + * @brief This function frees a list + * + * @param phead List head + * @param moal_free_lock A pointer to free lock handler + * + * @return N/A + */ +static INLINE t_void +util_free_list_head(t_void *pmoal_handle, + pmlan_list_head phead, + mlan_status (*moal_free_lock) (t_void *handle, + t_void *plock)) +{ + phead->pprev = phead->pnext = 0; + if (phead->plock) + moal_free_lock(pmoal_handle, phead->plock); +} + +/** + * @brief This function peeks into a list + * + * @param phead List head + * @param moal_spin_lock A pointer to spin lock handler + * @param moal_spin_unlock A pointer to spin unlock handler + * + * @return List node + */ +static INLINE pmlan_linked_list +util_peek_list(t_void *pmoal_handle, + pmlan_list_head phead, + mlan_status (*moal_spin_lock) (t_void *handle, t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, t_void *plock)) +{ + pmlan_linked_list pnode = 0; + + if (moal_spin_lock) + moal_spin_lock(pmoal_handle, phead->plock); + if (phead->pnext != (pmlan_linked_list)phead) + pnode = phead->pnext; + if (moal_spin_unlock) + moal_spin_unlock(pmoal_handle, phead->plock); + return pnode; +} + +/** + * @brief This function queues a node at the list tail + * + * @param phead List head + * @param pnode List node to queue + * @param moal_spin_lock A pointer to spin lock handler + * @param moal_spin_unlock A pointer to spin unlock handler + * + * @return N/A + */ +static INLINE t_void +util_enqueue_list_tail(t_void *pmoal_handle, + pmlan_list_head phead, + pmlan_linked_list pnode, + mlan_status (*moal_spin_lock) (t_void *handle, + t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) +{ + pmlan_linked_list pold_last; + + if (moal_spin_lock) + moal_spin_lock(pmoal_handle, phead->plock); + pold_last = phead->pprev; + pnode->pprev = pold_last; + pnode->pnext = (pmlan_linked_list)phead; + + phead->pprev = pold_last->pnext = pnode; + if (moal_spin_unlock) + moal_spin_unlock(pmoal_handle, phead->plock); +} + +/** + * @brief This function adds a node at the list head + * + * @param phead List head + * @param pnode List node to add + * @param moal_spin_lock A pointer to spin lock handler + * @param moal_spin_unlock A pointer to spin unlock handler + * + * @return N/A + */ +static INLINE t_void +util_enqueue_list_head(t_void *pmoal_handle, + pmlan_list_head phead, + pmlan_linked_list pnode, + mlan_status (*moal_spin_lock) (t_void *handle, + t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) +{ + pmlan_linked_list pold_first; + + if (moal_spin_lock) + moal_spin_lock(pmoal_handle, phead->plock); + pold_first = phead->pnext; + pnode->pprev = (pmlan_linked_list)phead; + pnode->pnext = pold_first; + + phead->pnext = pold_first->pprev = pnode; + if (moal_spin_unlock) + moal_spin_unlock(pmoal_handle, phead->plock); +} + +/** + * @brief This function removes a node from the list + * + * @param phead List head + * @param pnode List node to remove + * @param moal_spin_lock A pointer to spin lock handler + * @param moal_spin_unlock A pointer to spin unlock handler + * + * @return N/A + */ +static INLINE t_void +util_unlink_list(t_void *pmoal_handle, + pmlan_list_head phead, + pmlan_linked_list pnode, + mlan_status (*moal_spin_lock) (t_void *handle, t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) +{ + pmlan_linked_list pmy_prev; + pmlan_linked_list pmy_next; + + if (moal_spin_lock) + moal_spin_lock(pmoal_handle, phead->plock); + pmy_prev = pnode->pprev; + pmy_next = pnode->pnext; + pmy_next->pprev = pmy_prev; + pmy_prev->pnext = pmy_next; + + pnode->pnext = pnode->pprev = 0; + if (moal_spin_unlock) + moal_spin_unlock(pmoal_handle, phead->plock); +} + +/** + * @brief This function dequeues a node from the list + * + * @param phead List head + * @param moal_spin_lock A pointer to spin lock handler + * @param moal_spin_unlock A pointer to spin unlock handler + * + * @return List node + */ +static INLINE pmlan_linked_list +util_dequeue_list(t_void *pmoal_handle, + pmlan_list_head phead, + mlan_status (*moal_spin_lock) (t_void *handle, t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) +{ + pmlan_linked_list pnode; + + if (moal_spin_lock) + moal_spin_lock(pmoal_handle, phead->plock); + pnode = phead->pnext; + if (pnode && (pnode != (pmlan_linked_list)phead)) + util_unlink_list(pmoal_handle, phead, pnode, 0, 0); + else + pnode = 0; + if (moal_spin_unlock) + moal_spin_unlock(pmoal_handle, phead->plock); + return pnode; +} + +/** Access controlled scalar variable */ +typedef struct _mlan_scalar { + /** Value */ + t_s32 value; + /** Pointer to lock */ + t_void *plock; + /** Control flags */ + t_u32 flags; +} mlan_scalar, *pmlan_scalar; + +/** Flag to scalar lock acquired */ +#define MLAN_SCALAR_FLAG_UNIQUE_LOCK MBIT(16) + +/** scalar conditional value list */ +typedef enum _MLAN_SCALAR_CONDITIONAL { + MLAN_SCALAR_COND_EQUAL, + MLAN_SCALAR_COND_NOT_EQUAL, + MLAN_SCALAR_COND_GREATER_THAN, + MLAN_SCALAR_COND_GREATER_OR_EQUAL, + MLAN_SCALAR_COND_LESS_THAN, + MLAN_SCALAR_COND_LESS_OR_EQUAL +} MLAN_SCALAR_CONDITIONAL; + +/** + * @brief This function initializes a scalar + * + * @param pscalar Pointer to scalar + * @param val Initial scalar value + * @param plock_to_use A new lock is created if NULL, else lock to use + * @param moal_init_lock A pointer to init lock handler + * + * @return N/A + */ +static INLINE t_void +util_scalar_init(t_void *pmoal_handle, + pmlan_scalar pscalar, + t_s32 val, + t_void *plock_to_use, + mlan_status (*moal_init_lock) (t_void *handle, + t_void **pplock)) +{ + pscalar->value = val; + pscalar->flags = 0; + if (plock_to_use) { + pscalar->flags &= ~MLAN_SCALAR_FLAG_UNIQUE_LOCK; + pscalar->plock = plock_to_use; + } else { + pscalar->flags |= MLAN_SCALAR_FLAG_UNIQUE_LOCK; + moal_init_lock(pmoal_handle, &pscalar->plock); + } +} + +/** + * @brief This function frees a scalar + * + * @param pscalar Pointer to scalar + * @param moal_free_lock A pointer to free lock handler + * + * @return N/A + */ +static INLINE t_void +util_scalar_free(t_void *pmoal_handle, + pmlan_scalar pscalar, + mlan_status (*moal_free_lock) (t_void *handle, t_void *plock)) +{ + if (pscalar->flags & MLAN_SCALAR_FLAG_UNIQUE_LOCK) + moal_free_lock(pmoal_handle, pscalar->plock); +} + +/** + * @brief This function reads value from scalar + * + * @param pscalar Pointer to scalar + * @param moal_spin_lock A pointer to spin lock handler + * @param moal_spin_unlock A pointer to spin unlock handler + * + * @return Stored value + */ +static INLINE t_s32 +util_scalar_read(t_void *pmoal_handle, + pmlan_scalar pscalar, + mlan_status (*moal_spin_lock) (t_void *handle, t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) +{ + t_s32 val; + + if (moal_spin_lock) + moal_spin_lock(pmoal_handle, pscalar->plock); + val = pscalar->value; + if (moal_spin_unlock) + moal_spin_unlock(pmoal_handle, pscalar->plock); + + return val; +} + +/** + * @brief This function writes value to scalar + * + * @param pscalar Pointer to scalar + * @param val Value to write + * @param moal_spin_lock A pointer to spin lock handler + * @param moal_spin_unlock A pointer to spin unlock handler + * + * @return N/A + */ +static INLINE t_void +util_scalar_write(t_void *pmoal_handle, + pmlan_scalar pscalar, + t_s32 val, + mlan_status (*moal_spin_lock) (t_void *handle, t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) +{ + if (moal_spin_lock) + moal_spin_lock(pmoal_handle, pscalar->plock); + pscalar->value = val; + if (moal_spin_unlock) + moal_spin_unlock(pmoal_handle, pscalar->plock); +} + +/** + * @brief This function increments the value in scalar + * + * @param pscalar Pointer to scalar + * @param moal_spin_lock A pointer to spin lock handler + * @param moal_spin_unlock A pointer to spin unlock handler + * + * @return N/A + */ +static INLINE t_void +util_scalar_increment(t_void *pmoal_handle, + pmlan_scalar pscalar, + mlan_status (*moal_spin_lock) (t_void *handle, + t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) +{ + if (moal_spin_lock) + moal_spin_lock(pmoal_handle, pscalar->plock); + pscalar->value++; + if (moal_spin_unlock) + moal_spin_unlock(pmoal_handle, pscalar->plock); +} + +/** + * @brief This function decrements the value in scalar + * + * @param pscalar Pointer to scalar + * @param moal_spin_lock A pointer to spin lock handler + * @param moal_spin_unlock A pointer to spin unlock handler + * + * @return N/A + */ +static INLINE t_void +util_scalar_decrement(t_void *pmoal_handle, + pmlan_scalar pscalar, + mlan_status (*moal_spin_lock) (t_void *handle, + t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) +{ + if (moal_spin_lock) + moal_spin_lock(pmoal_handle, pscalar->plock); + pscalar->value--; + if (moal_spin_unlock) + moal_spin_unlock(pmoal_handle, pscalar->plock); +} + +/** + * @brief This function adds an offset to the value in scalar, + * and returns the new value + * + * @param pscalar Pointer to scalar + * @param offset Offset value (can be negative) + * @param moal_spin_lock A pointer to spin lock handler + * @param moal_spin_unlock A pointer to spin unlock handler + * + * @return Value after offset + */ +static INLINE t_s32 +util_scalar_offset(t_void *pmoal_handle, + pmlan_scalar pscalar, + t_s32 offset, + mlan_status (*moal_spin_lock) (t_void *handle, + t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) +{ + t_s32 newval; + + if (moal_spin_lock) + moal_spin_lock(pmoal_handle, pscalar->plock); + newval = (pscalar->value += offset); + if (moal_spin_unlock) + moal_spin_unlock(pmoal_handle, pscalar->plock); + + return newval; +} + +/** + * @brief This function writes the value to the scalar + * if existing value compared with other value is true. + * + * @param pscalar Pointer to scalar + * @param condition Condition to check + * @param val_compare Value to compare against current value + * ((A X B), where B = val_compare) + * @param val_to_set Value to set if comparison is true + * @param moal_spin_lock A pointer to spin lock handler + * @param moal_spin_unlock A pointer to spin unlock handler + * + * @return Comparison result (MTRUE or MFALSE) + */ +static INLINE t_u8 +util_scalar_conditional_write(t_void *pmoal_handle, + pmlan_scalar pscalar, + MLAN_SCALAR_CONDITIONAL condition, + t_s32 val_compare, + t_s32 val_to_set, + mlan_status (*moal_spin_lock) (t_void *handle, + t_void *plock), + mlan_status (*moal_spin_unlock) (t_void *handle, + t_void *plock)) +{ + t_u8 update; + if (moal_spin_lock) + moal_spin_lock(pmoal_handle, pscalar->plock); + + switch (condition) { + case MLAN_SCALAR_COND_EQUAL: + update = (pscalar->value == val_compare); + break; + case MLAN_SCALAR_COND_NOT_EQUAL: + update = (pscalar->value != val_compare); + break; + case MLAN_SCALAR_COND_GREATER_THAN: + update = (pscalar->value > val_compare); + break; + case MLAN_SCALAR_COND_GREATER_OR_EQUAL: + update = (pscalar->value >= val_compare); + break; + case MLAN_SCALAR_COND_LESS_THAN: + update = (pscalar->value < val_compare); + break; + case MLAN_SCALAR_COND_LESS_OR_EQUAL: + update = (pscalar->value <= val_compare); + break; + default: + update = MFALSE; + break; + } + if (update) + pscalar->value = val_to_set; + + if (moal_spin_unlock) + moal_spin_unlock(pmoal_handle, pscalar->plock); + return (update) ? MTRUE : MFALSE; +} + +/** + * @brief This function counts the bits of unsigned int number + * + * @param num number + * @return number of bits + */ +static t_u32 INLINE +bitcount(t_u32 num) +{ + t_u32 count = 0; + static t_u32 nibblebits[] = { + 0, 1, 1, 2, 1, 2, 2, 3, + 1, 2, 2, 3, 2, 3, 3, 4 + }; + for (; num != 0; num >>= 4) + count += nibblebits[num & 0x0f]; + return count; +} + +#endif /* !_MLAN_UTIL_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_wmm.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_wmm.c new file mode 100644 index 00000000..ef4ab307 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_wmm.c @@ -0,0 +1,3613 @@ +/** @file mlan_wmm.c + * + * @brief This file contains functions for WMM. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/******************************************************** +Change log: + 10/24/2008: initial version +********************************************************/ + +#include "mlan.h" +#ifdef STA_SUPPORT +#include "mlan_join.h" +#endif +#include "mlan_util.h" +#include "mlan_fw.h" +#include "mlan_main.h" +#include "mlan_wmm.h" +#include "mlan_11n.h" +#include "mlan_sdio.h" + +/******************************************************** + Local Variables +********************************************************/ + +/** Maximum value FW can accept for driver delay in packet transmission */ +#define DRV_PKT_DELAY_TO_FW_MAX 512 + +/* + * Upper and Lower threshold for packet queuing in the driver + + * - When the number of packets queued reaches the upper limit, + * the driver will stop the net queue in the app/kernel space. + + * - When the number of packets drops beneath the lower limit after + * having reached the upper limit, the driver will restart the net + * queue. + */ + +/** Lower threshold for packet queuing in the driver. + * When the number of packets drops beneath the lower limit after having + * reached the upper limit, the driver will restart the net queue. + */ +#define WMM_QUEUED_PACKET_LOWER_LIMIT 180 + +/** Upper threshold for packet queuing in the driver. + * When the number of packets queued reaches the upper limit, the driver + * will stop the net queue in the app/kernel space. + */ +#define WMM_QUEUED_PACKET_UPPER_LIMIT 200 + +/** Offset for TOS field in the IP header */ +#define IPTOS_OFFSET 5 + +/** WMM information IE */ +static const t_u8 wmm_info_ie[] = { WMM_IE, 0x07, + 0x00, 0x50, 0xf2, 0x02, + 0x00, 0x01, 0x00 +}; + +/** + * AC Priorities go from AC_BK to AC_VO. The ACI enumeration for AC_BK (1) + * is higher than the enumeration for AC_BE (0); hence the needed + * mapping conversion for wmm AC to priority Queue Index + */ +static const t_u8 wmm_aci_to_qidx_map[] = { WMM_AC_BE, + WMM_AC_BK, + WMM_AC_VI, + WMM_AC_VO +}; + +/** + * This table will be used to store the tid values based on ACs. + * It is initialized to default values per TID. + */ +t_u8 tos_to_tid[] = { + /* TID DSCP_P2 DSCP_P1 DSCP_P0 WMM_AC */ + 0x01, /* 0 1 0 AC_BK */ + 0x02, /* 0 0 0 AC_BK */ + 0x00, /* 0 0 1 AC_BE */ + 0x03, /* 0 1 1 AC_BE */ + 0x04, /* 1 0 0 AC_VI */ + 0x05, /* 1 0 1 AC_VI */ + 0x06, /* 1 1 0 AC_VO */ + 0x07 /* 1 1 1 AC_VO */ +}; + +/** + * This table inverses the tos_to_tid operation to get a priority + * which is in sequential order, and can be compared. + * Use this to compare the priority of two different TIDs. + */ +t_u8 tos_to_tid_inv[] = { 0x02, /* from tos_to_tid[2] = 0 */ + 0x00, /* from tos_to_tid[0] = 1 */ + 0x01, /* from tos_to_tid[1] = 2 */ + 0x03, + 0x04, + 0x05, + 0x06, + 0x07 +}; + +/** + * This table will provide the tid value for given ac. This table does not + * change and will be used to copy back the default values to tos_to_tid in + * case of disconnect. + */ +const t_u8 ac_to_tid[4][2] = { {1, 2}, {0, 3}, {4, 5}, {6, 7} }; + +/* Map of TOS UP values to WMM AC */ +static const mlan_wmm_ac_e tos_to_ac[] = { WMM_AC_BE, + WMM_AC_BK, + WMM_AC_BK, + WMM_AC_BE, + WMM_AC_VI, + WMM_AC_VI, + WMM_AC_VO, + WMM_AC_VO +}; + +raListTbl *wlan_wmm_get_ralist_node(pmlan_private priv, t_u8 tid, + t_u8 *ra_addr); + +/******************************************************** + Local Functions +********************************************************/ +#ifdef DEBUG_LEVEL2 +/** + * @brief Debug print function to display the priority parameters for a WMM AC + * + * @param pac_param Pointer to the AC parameters to display + * + * @return N/A + */ +static void +wlan_wmm_ac_debug_print(const IEEEtypes_WmmAcParameters_t *pac_param) +{ + const char *ac_str[] = { "BK", "BE", "VI", "VO" }; + + ENTER(); + + PRINTM(MINFO, "WMM AC_%s: ACI=%d, ACM=%d, Aifsn=%d, " + "EcwMin=%d, EcwMax=%d, TxopLimit=%d\n", + ac_str[wmm_aci_to_qidx_map[pac_param->aci_aifsn.aci]], + pac_param->aci_aifsn.aci, pac_param->aci_aifsn.acm, + pac_param->aci_aifsn.aifsn, pac_param->ecw.ecw_min, + pac_param->ecw.ecw_max, + wlan_le16_to_cpu(pac_param->tx_op_limit)); + + LEAVE(); +} + +/** Print the WMM AC for debug purpose */ +#define PRINTM_AC(pac_param) wlan_wmm_ac_debug_print(pac_param) +#else +/** Print the WMM AC for debug purpose */ +#define PRINTM_AC(pac_param) +#endif + +/** + * @brief Allocate route address + * + * @param pmadapter Pointer to the mlan_adapter structure + * @param ra Pointer to the route address + * + * @return ra_list + */ +static +raListTbl * +wlan_wmm_allocate_ralist_node(pmlan_adapter pmadapter, t_u8 *ra) +{ + raListTbl *ra_list = MNULL; + + ENTER(); + + if (pmadapter->callbacks. + moal_malloc(pmadapter->pmoal_handle, sizeof(raListTbl), + MLAN_MEM_DEF, (t_u8 **)&ra_list)) { + PRINTM(MERROR, "Fail to allocate ra_list\n"); + goto done; + } + util_init_list((pmlan_linked_list)ra_list); + util_init_list_head((t_void *)pmadapter->pmoal_handle, + &ra_list->buf_head, MFALSE, + pmadapter->callbacks.moal_init_lock); + + memcpy(pmadapter, ra_list->ra, ra, MLAN_MAC_ADDR_LENGTH); + + ra_list->total_pkts = 0; + ra_list->tx_pause = 0; + PRINTM(MINFO, "RAList: Allocating buffers for TID %p\n", ra_list); +done: + LEAVE(); + return ra_list; +} + +/** + * @brief Add packet to TDLS pending TX queue + * + * @param priv A pointer to mlan_private + * @param pmbuf Pointer to the mlan_buffer data struct + * + * @return N/A + */ +static t_void +wlan_add_buf_tdls_txqueue(pmlan_private priv, pmlan_buffer pmbuf) +{ + mlan_adapter *pmadapter = priv->adapter; + ENTER(); + util_enqueue_list_tail(pmadapter->pmoal_handle, &priv->tdls_pending_txq, + (pmlan_linked_list)pmbuf, + pmadapter->callbacks.moal_spin_lock, + pmadapter->callbacks.moal_spin_unlock); + LEAVE(); +} + +/** + * @brief Clean up the tdls pending TX queue + * + * @param priv A pointer to mlan_private + * + * @return N/A + */ +static t_void +wlan_cleanup_tdls_txq(pmlan_private priv) +{ + pmlan_buffer pmbuf; + mlan_adapter *pmadapter = priv->adapter; + ENTER(); + + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + priv->tdls_pending_txq.plock); + while ((pmbuf = + (pmlan_buffer)util_peek_list(pmadapter->pmoal_handle, + &priv->tdls_pending_txq, MNULL, + MNULL))) { + util_unlink_list(pmadapter->pmoal_handle, + &priv->tdls_pending_txq, + (pmlan_linked_list)pmbuf, MNULL, MNULL); + wlan_write_data_complete(pmadapter, pmbuf, MLAN_STATUS_FAILURE); + } + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->tdls_pending_txq.plock); + LEAVE(); +} + +/** + * @brief Map ACs to TID + * + * @param priv Pointer to the mlan_private driver data struct + * @param queue_priority Queue_priority structure + * + * @return N/A + */ +static void +wlan_wmm_queue_priorities_tid(pmlan_private priv, t_u8 queue_priority[]) +{ + int i; + + ENTER(); + + for (i = 0; i < 4; ++i) { + tos_to_tid[7 - (i * 2)] = ac_to_tid[queue_priority[i]][1]; + tos_to_tid[6 - (i * 2)] = ac_to_tid[queue_priority[i]][0]; + } + + for (i = 0; i < MAX_NUM_TID; i++) + tos_to_tid_inv[tos_to_tid[i]] = (t_u8)i; + + /* in case priorities have changed, force highest priority so next + packet will check from top to re-establish the highest */ + util_scalar_write(priv->adapter->pmoal_handle, + &priv->wmm.highest_queued_prio, + HIGH_PRIO_TID, + priv->adapter->callbacks.moal_spin_lock, + priv->adapter->callbacks.moal_spin_unlock); + + LEAVE(); +} + +/** + * @brief Evaluate whether or not an AC is to be downgraded + * + * @param priv Pointer to the mlan_private driver data struct + * @param eval_ac AC to evaluate for downgrading + * + * @return WMM AC The eval_ac traffic is to be sent on. + */ +static mlan_wmm_ac_e +wlan_wmm_eval_downgrade_ac(pmlan_private priv, mlan_wmm_ac_e eval_ac) +{ + int down_ac; + mlan_wmm_ac_e ret_ac; + WmmAcStatus_t *pac_status; + + ENTER(); + + pac_status = &priv->wmm.ac_status[eval_ac]; + + if (pac_status->disabled == MFALSE) { + LEAVE(); + /* Okay to use this AC, its enabled */ + return eval_ac; + } + + /* Setup a default return value of the lowest priority */ + ret_ac = WMM_AC_BK; + + /* + * Find the highest AC that is enabled and does not require admission + * control. The spec disallows downgrading to an AC, which is enabled + * due to a completed admission control. Unadmitted traffic is not + * to be sent on an AC with admitted traffic. + */ + for (down_ac = WMM_AC_BK; down_ac < eval_ac; down_ac++) { + pac_status = &priv->wmm.ac_status[down_ac]; + + if ((pac_status->disabled == MFALSE) + && (pac_status->flow_required == MFALSE)) + /* AC is enabled and does not require admission control + */ + ret_ac = (mlan_wmm_ac_e)down_ac; + } + + LEAVE(); + return ret_ac; +} + +/** + * @brief Convert the IP TOS field to an WMM AC Queue assignment + * + * @param pmadapter A pointer to mlan_adapter structure + * @param tos IP TOS field + * + * @return WMM AC Queue mapping of the IP TOS field + */ +static mlan_wmm_ac_e INLINE +wlan_wmm_convert_tos_to_ac(pmlan_adapter pmadapter, t_u32 tos) +{ + ENTER(); + + if (tos >= NELEMENTS(tos_to_ac)) { + LEAVE(); + return WMM_AC_BE; + } + + LEAVE(); + return tos_to_ac[tos]; +} + +/** + * @brief Evaluate a given TID and downgrade it to a lower TID if the + * WMM Parameter IE received from the AP indicates that the AP + * is disabled (due to call admission control (ACM bit). Mapping + * of TID to AC is taken care internally + * + * @param priv Pointer to the mlan_private data struct + * @param tid tid to evaluate for downgrading + * + * @return Same tid as input if downgrading not required or + * the tid the traffic for the given tid should be downgraded to + */ +static t_u8 INLINE +wlan_wmm_downgrade_tid(pmlan_private priv, t_u32 tid) +{ + mlan_wmm_ac_e ac_down; + pmlan_adapter pmadapter = priv->adapter; + + ENTER(); + + ac_down = + priv->wmm. + ac_down_graded_vals[wlan_wmm_convert_tos_to_ac(pmadapter, tid)]; + LEAVE(); + /* + * Send the index to tid array, picking from the array will be + * taken care by dequeuing function + */ + if (tid == 1 || tid == 2) + return ac_to_tid[ac_down][(tid + 1) % 2]; + else if (tid >= MAX_NUM_TID) + return ac_to_tid[ac_down][0]; + else + return ac_to_tid[ac_down][tid % 2]; +} + +/** + * @brief Delete packets in RA node + * + * @param priv Pointer to the mlan_private driver data struct + * @param ra_list Pointer to raListTbl + * + * @return N/A + */ +static INLINE void +wlan_wmm_del_pkts_in_ralist_node(pmlan_private priv, raListTbl *ra_list) +{ + pmlan_buffer pmbuf; + pmlan_adapter pmadapter = priv->adapter; + + ENTER(); + while ((pmbuf = + (pmlan_buffer)util_peek_list(pmadapter->pmoal_handle, + &ra_list->buf_head, MNULL, + MNULL))) { + util_unlink_list(pmadapter->pmoal_handle, &ra_list->buf_head, + (pmlan_linked_list)pmbuf, MNULL, MNULL); + wlan_write_data_complete(pmadapter, pmbuf, MLAN_STATUS_FAILURE); + } + util_free_list_head((t_void *)pmadapter->pmoal_handle, + &ra_list->buf_head, + pmadapter->callbacks.moal_free_lock); + + LEAVE(); +} + +/** + * @brief Delete packets in RA list + * + * @param priv Pointer to the mlan_private driver data struct + * @param ra_list_head ra list header + * + * @return N/A + */ +static INLINE void +wlan_wmm_del_pkts_in_ralist(pmlan_private priv, mlan_list_head *ra_list_head) +{ + raListTbl *ra_list; + + ENTER(); + + ra_list = + (raListTbl *)util_peek_list(priv->adapter->pmoal_handle, + ra_list_head, MNULL, MNULL); + + while (ra_list && ra_list != (raListTbl *)ra_list_head) { + wlan_wmm_del_pkts_in_ralist_node(priv, ra_list); + + ra_list = ra_list->pnext; + } + + LEAVE(); +} + +/** + * @brief Clean up the wmm queue + * + * @param priv Pointer to the mlan_private driver data struct + * + * @return N/A + */ +static void +wlan_wmm_cleanup_queues(pmlan_private priv) +{ + int i; + + ENTER(); + + for (i = 0; i < MAX_NUM_TID; i++) { + wlan_wmm_del_pkts_in_ralist(priv, + &priv->wmm.tid_tbl_ptr[i].ra_list); + priv->wmm.pkts_queued[i] = 0; + priv->wmm.pkts_paused[i] = 0; + } + util_scalar_write(priv->adapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, 0, MNULL, MNULL); + util_scalar_write(priv->adapter->pmoal_handle, + &priv->wmm.highest_queued_prio, HIGH_PRIO_TID, MNULL, + MNULL); + + LEAVE(); +} + +/** + * @brief Delete all route address from RA list + * + * @param priv Pointer to the mlan_private driver data struct + * + * @return N/A + */ +static void +wlan_wmm_delete_all_ralist(pmlan_private priv) +{ + raListTbl *ra_list; + int i; + pmlan_adapter pmadapter = priv->adapter; + + ENTER(); + + for (i = 0; i < MAX_NUM_TID; ++i) { + PRINTM(MINFO, "RAList: Freeing buffers for TID %d\n", i); + while ((ra_list = + (raListTbl *)util_peek_list(pmadapter->pmoal_handle, + &priv->wmm.tid_tbl_ptr[i]. + ra_list, MNULL, MNULL))) { + util_unlink_list(pmadapter->pmoal_handle, + &priv->wmm.tid_tbl_ptr[i].ra_list, + (pmlan_linked_list)ra_list, MNULL, + MNULL); + + pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)ra_list); + } + + util_init_list((pmlan_linked_list) + &priv->wmm.tid_tbl_ptr[i].ra_list); + priv->wmm.tid_tbl_ptr[i].ra_list_curr = MNULL; + } + + LEAVE(); +} + +/** + * @brief Get queue RA pointer + * + * @param priv Pointer to the mlan_private driver data struct + * @param tid TID + * @param ra_addr Pointer to the route address + * + * @return ra_list + */ +static raListTbl * +wlan_wmm_get_queue_raptr(pmlan_private priv, t_u8 tid, t_u8 *ra_addr) +{ + raListTbl *ra_list; +#if defined(UAP_SUPPORT) + t_u8 bcast_addr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; +#endif + + ENTER(); + ra_list = wlan_wmm_get_ralist_node(priv, tid, ra_addr); + if (ra_list) { + LEAVE(); + return ra_list; + } +#if defined(UAP_SUPPORT) + if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) && + (0 != + memcmp(priv->adapter, ra_addr, bcast_addr, sizeof(bcast_addr)))) { + if (MNULL == wlan_get_station_entry(priv, ra_addr)) { + PRINTM(MDATA, "Drop packets to unknown station\n"); + LEAVE(); + return MNULL; + } + } +#endif + wlan_ralist_add(priv, ra_addr); + + ra_list = wlan_wmm_get_ralist_node(priv, tid, ra_addr); + LEAVE(); + return ra_list; +} + +#ifdef STA_SUPPORT +/** + * @brief Sends wmmac host event + * + * @param priv Pointer to the mlan_private driver data struct + * @param type_str Type of host event + * @param src_addr Pointer to the source Address + * @param tid TID + * @param up User priority + * @param status Status code or Reason code + * + * @return N/A + */ +static void +wlan_send_wmmac_host_event(pmlan_private priv, + char *type_str, + t_u8 *src_addr, t_u8 tid, t_u8 up, t_u8 status) +{ + t_u8 event_buf[100]; + mlan_event *pevent; + t_u8 *pout_buf; + + ENTER(); + + /* Format one of the following two output strings: ** - + TSPEC:ADDTS_RSP:[]:TID=X:UP=Y ** - + TSPEC:DELTS_RX:[]:TID=X:UP=Y */ + pevent = (mlan_event *)event_buf; + pout_buf = pevent->event_buf; + + memcpy(priv->adapter, pout_buf, (t_u8 *)"TSPEC:", 6); + pout_buf += 6; + + memcpy(priv->adapter, pout_buf, (t_u8 *)type_str, + wlan_strlen(type_str)); + pout_buf += wlan_strlen(type_str); + + *pout_buf++ = ':'; + *pout_buf++ = '['; + + if (status >= 100) { + *pout_buf++ = (status / 100) + '0'; + status = (status % 100); + } + + if (status >= 10) { + *pout_buf++ = (status / 10) + '0'; + status = (status % 10); + } + + *pout_buf++ = status + '0'; + + memcpy(priv->adapter, pout_buf, (t_u8 *)"]:TID", 5); + pout_buf += 5; + *pout_buf++ = tid + '0'; + + memcpy(priv->adapter, pout_buf, (t_u8 *)":UP", 3); + pout_buf += 3; + *pout_buf++ = up + '0'; + + *pout_buf = '\0'; + + pevent->bss_index = priv->bss_index; + pevent->event_id = MLAN_EVENT_ID_DRV_REPORT_STRING; + pevent->event_len = wlan_strlen((const char *)(pevent->event_buf)); + + wlan_recv_event(priv, MLAN_EVENT_ID_DRV_REPORT_STRING, pevent); + LEAVE(); +} +#endif /* STA_SUPPORT */ + +/** + * @brief This function gets the highest priority list pointer + * + * @param pmadapter A pointer to mlan_adapter + * @param priv A pointer to mlan_private + * @param tid A pointer to return tid + * + * @return raListTbl + */ +static raListTbl * +wlan_wmm_get_highest_priolist_ptr(pmlan_adapter pmadapter, + pmlan_private *priv, int *tid) +{ + pmlan_private priv_tmp; + raListTbl *ptr, *head; + mlan_bssprio_node *bssprio_node, *bssprio_head; + tid_tbl_t *tid_ptr; + int i, j; + int next_prio = 0; + int next_tid = 0; + ENTER(); + + PRINTM(MDAT_D, "POP\n"); + for (j = pmadapter->priv_num - 1; j >= 0; --j) { + if (!(util_peek_list(pmadapter->pmoal_handle, + &pmadapter->bssprio_tbl[j].bssprio_head, + MNULL, MNULL))) + continue; + + if (pmadapter->bssprio_tbl[j].bssprio_cur == + (mlan_bssprio_node *) + &pmadapter->bssprio_tbl[j].bssprio_head) { + pmadapter->bssprio_tbl[j].bssprio_cur = + pmadapter->bssprio_tbl[j].bssprio_cur->pnext; + } + + bssprio_head + = bssprio_node = pmadapter->bssprio_tbl[j].bssprio_cur; + + do { + priv_tmp = bssprio_node->priv; + + if ((priv_tmp->port_ctrl_mode == MTRUE) + && (priv_tmp->port_open == MFALSE)) { + PRINTM(MINFO, "get_highest_prio_ptr(): " + "PORT_CLOSED Ignore pkts from BSS%d\n", + priv_tmp->bss_index); + /* Ignore data pkts from a BSS if port is + closed */ + goto next_intf; + } + + pmadapter->callbacks.moal_spin_lock(pmadapter-> + pmoal_handle, + priv_tmp->wmm. + ra_list_spinlock); + + for (i = util_scalar_read(pmadapter->pmoal_handle, + &priv_tmp->wmm. + highest_queued_prio, MNULL, + MNULL); i >= LOW_PRIO_TID; + --i) { + + tid_ptr = + &(priv_tmp)->wmm. + tid_tbl_ptr[tos_to_tid[i]]; + if (!util_peek_list + (pmadapter->pmoal_handle, &tid_ptr->ra_list, + MNULL, MNULL)) + continue; + + /* + * Always choose the next ra we transmitted + * last time, this way we pick the ra's in + * round robin fashion. + */ + head = ptr = tid_ptr->ra_list_curr->pnext; + if (ptr == (raListTbl *)&tid_ptr->ra_list) + head = ptr = ptr->pnext; + + do { + if (!ptr->tx_pause && + util_peek_list(pmadapter-> + pmoal_handle, + &ptr->buf_head, + MNULL, MNULL)) { + + /* Because WMM only support + BK/BE/VI/VO, we have 8 tid + We should balance the + traffic of the same AC */ + if (i % 2) + next_prio = i - 1; + else + next_prio = i + 1; + next_tid = + tos_to_tid[next_prio]; + if (priv_tmp->wmm. + pkts_queued[next_tid] && + (priv_tmp->wmm. + pkts_queued[next_tid] > + priv_tmp->wmm. + pkts_paused[next_tid])) + util_scalar_write + (pmadapter-> + pmoal_handle, + &priv_tmp->wmm. + highest_queued_prio, + next_prio, + MNULL, MNULL); + else + /* if + highest_queued_prio + > i, set it to i */ + util_scalar_conditional_write + (pmadapter-> + pmoal_handle, + &priv_tmp->wmm. + highest_queued_prio, + MLAN_SCALAR_COND_GREATER_THAN, + i, i, MNULL, + MNULL); + *priv = priv_tmp; + *tid = tos_to_tid[i]; + /* hold priv->ra_list_spinlock + to maintain ptr */ + PRINTM(MDAT_D, + "get highest prio ptr %p, tid %d\n", + ptr, *tid); + LEAVE(); + return ptr; + } + + ptr = ptr->pnext; + if (ptr == + (raListTbl *)&tid_ptr->ra_list) + ptr = ptr->pnext; + } while (ptr != head); + } + + /* If priv still has packets queued, reset to + HIGH_PRIO_TID */ + if (util_scalar_read(pmadapter->pmoal_handle, + &priv_tmp->wmm.tx_pkts_queued, + MNULL, MNULL)) + util_scalar_write(pmadapter->pmoal_handle, + &priv_tmp->wmm. + highest_queued_prio, + HIGH_PRIO_TID, MNULL, MNULL); + else + /* No packet at any TID for this priv. Mark as + such to skip checking TIDs for this priv + (until pkt is added). */ + util_scalar_write(pmadapter->pmoal_handle, + &priv_tmp->wmm. + highest_queued_prio, + NO_PKT_PRIO_TID, MNULL, + MNULL); + + pmadapter->callbacks.moal_spin_unlock(pmadapter-> + pmoal_handle, + priv_tmp->wmm. + ra_list_spinlock); + +next_intf: + bssprio_node = bssprio_node->pnext; + if (bssprio_node == (mlan_bssprio_node *) + &pmadapter->bssprio_tbl[j].bssprio_head) + bssprio_node = bssprio_node->pnext; + pmadapter->bssprio_tbl[j].bssprio_cur = bssprio_node; + } while (bssprio_node != bssprio_head); + } + + LEAVE(); + return MNULL; +} + +/** + * @brief This function gets the number of packets in the Tx queue + * + * @param priv A pointer to mlan_private + * @param ptr A pointer to RA list table + * @param max_buf_size Maximum buffer size + * + * @return Packet count + */ +static int +wlan_num_pkts_in_txq(mlan_private *priv, raListTbl *ptr, int max_buf_size) +{ + int count = 0, total_size = 0; + pmlan_buffer pmbuf; + + ENTER(); + + for (pmbuf = (pmlan_buffer)ptr->buf_head.pnext; + pmbuf != (pmlan_buffer)(&ptr->buf_head); pmbuf = pmbuf->pnext) { + + total_size += pmbuf->data_len; + if (total_size < max_buf_size) + ++count; + else + break; + } + + LEAVE(); + return count; +} + +/** + * @brief This function sends a single packet + * + * @param priv A pointer to mlan_private + * @param ptr A pointer to RA list table + * @param ptrindex ptr's TID index + * + * @return N/A + */ +static void INLINE +wlan_send_single_packet(pmlan_private priv, raListTbl *ptr, int ptrindex) +{ + pmlan_buffer pmbuf; + pmlan_buffer pmbuf_next; + mlan_tx_param tx_param; + pmlan_adapter pmadapter = priv->adapter; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + pmbuf = (pmlan_buffer)util_dequeue_list(pmadapter->pmoal_handle, + &ptr->buf_head, MNULL, MNULL); + if (pmbuf) { + PRINTM(MINFO, "Dequeuing the packet %p %p\n", ptr, pmbuf); + priv->wmm.pkts_queued[ptrindex]--; + util_scalar_decrement(pmadapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, MNULL, MNULL); + ptr->total_pkts--; + pmbuf_next = + (pmlan_buffer)util_peek_list(pmadapter->pmoal_handle, + &ptr->buf_head, MNULL, + MNULL); + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm. + ra_list_spinlock); + + tx_param.next_pkt_len = ((pmbuf_next) + ? pmbuf_next->data_len + + sizeof(TxPD) : 0); + status = wlan_process_tx(priv, pmbuf, &tx_param); + + if (status == MLAN_STATUS_RESOURCE) { + /** Queue the packet back at the head */ + PRINTM(MDAT_D, "Queuing pkt back to raList %p %p\n", + ptr, pmbuf); + pmadapter->callbacks.moal_spin_lock(pmadapter-> + pmoal_handle, + priv->wmm. + ra_list_spinlock); + + if (!wlan_is_ralist_valid(priv, ptr, ptrindex)) { + pmadapter->callbacks. + moal_spin_unlock(pmadapter-> + pmoal_handle, + priv->wmm. + ra_list_spinlock); + wlan_write_data_complete(pmadapter, pmbuf, + MLAN_STATUS_FAILURE); + LEAVE(); + return; + } + priv->wmm.pkts_queued[ptrindex]++; + util_scalar_increment(pmadapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, MNULL, + MNULL); + util_enqueue_list_head(pmadapter->pmoal_handle, + &ptr->buf_head, + (pmlan_linked_list)pmbuf, MNULL, + MNULL); + + ptr->total_pkts++; + pmbuf->flags |= MLAN_BUF_FLAG_REQUEUED_PKT; + pmadapter->callbacks.moal_spin_unlock(pmadapter-> + pmoal_handle, + priv->wmm. + ra_list_spinlock); + } else { + pmadapter->callbacks.moal_spin_lock(pmadapter-> + pmoal_handle, + priv->wmm. + ra_list_spinlock); + if (wlan_is_ralist_valid(priv, ptr, ptrindex)) { + priv->wmm.packets_out[ptrindex]++; + priv->wmm.tid_tbl_ptr[ptrindex].ra_list_curr = + ptr; + } + pmadapter->bssprio_tbl[priv->bss_priority].bssprio_cur = + pmadapter->bssprio_tbl[priv->bss_priority]. + bssprio_cur->pnext; + pmadapter->callbacks.moal_spin_unlock(pmadapter-> + pmoal_handle, + priv->wmm. + ra_list_spinlock); + } + } else { + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm. + ra_list_spinlock); + PRINTM(MINFO, "Nothing to send\n"); + } + + LEAVE(); +} + +/** + * @brief This function checks if this mlan_buffer is already processed. + * + * @param priv A pointer to mlan_private + * @param ptr A pointer to RA list table + * + * @return MTRUE or MFALSE + */ +static int INLINE +wlan_is_ptr_processed(mlan_private *priv, raListTbl *ptr) +{ + pmlan_buffer pmbuf; + + pmbuf = (pmlan_buffer)util_peek_list(priv->adapter->pmoal_handle, + &ptr->buf_head, MNULL, MNULL); + if (pmbuf && (pmbuf->flags & MLAN_BUF_FLAG_REQUEUED_PKT)) + return MTRUE; + + return MFALSE; +} + +/** + * @brief This function sends a single packet that has been processed + * + * @param priv A pointer to mlan_private + * @param ptr A pointer to RA list table + * @param ptrindex ptr's TID index + * + * @return N/A + */ +static void INLINE +wlan_send_processed_packet(pmlan_private priv, raListTbl *ptr, int ptrindex) +{ + pmlan_buffer pmbuf_next = MNULL; + mlan_tx_param tx_param; + pmlan_buffer pmbuf; + pmlan_adapter pmadapter = priv->adapter; + mlan_status ret = MLAN_STATUS_FAILURE; + + pmbuf = (pmlan_buffer)util_dequeue_list(pmadapter->pmoal_handle, + &ptr->buf_head, MNULL, MNULL); + if (pmbuf) { + pmbuf_next = + (pmlan_buffer)util_peek_list(pmadapter->pmoal_handle, + &ptr->buf_head, MNULL, + MNULL); + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm. + ra_list_spinlock); + tx_param.next_pkt_len = + ((pmbuf_next) ? pmbuf_next->data_len + + sizeof(TxPD) : 0); + ret = wlan_sdio_host_to_card(pmadapter, MLAN_TYPE_DATA, pmbuf, + &tx_param); + switch (ret) { + case MLAN_STATUS_RESOURCE: + PRINTM(MINFO, "MLAN_STATUS_RESOURCE is returned\n"); + pmadapter->callbacks.moal_spin_lock(pmadapter-> + pmoal_handle, + priv->wmm. + ra_list_spinlock); + + if (!wlan_is_ralist_valid(priv, ptr, ptrindex)) { + pmadapter->callbacks. + moal_spin_unlock(pmadapter-> + pmoal_handle, + priv->wmm. + ra_list_spinlock); + wlan_write_data_complete(pmadapter, pmbuf, + MLAN_STATUS_FAILURE); + LEAVE(); + return; + } + util_enqueue_list_head(pmadapter->pmoal_handle, + &ptr->buf_head, + (pmlan_linked_list)pmbuf, + MNULL, MNULL); + + pmbuf->flags |= MLAN_BUF_FLAG_REQUEUED_PKT; + pmadapter->callbacks.moal_spin_unlock(pmadapter-> + pmoal_handle, + priv->wmm. + ra_list_spinlock); + break; + case MLAN_STATUS_FAILURE: + pmadapter->data_sent = MFALSE; + PRINTM(MERROR, "Error: Failed to write data\n"); + pmadapter->dbg.num_tx_host_to_card_failure++; + pmbuf->status_code = MLAN_ERROR_DATA_TX_FAIL; + wlan_write_data_complete(pmadapter, pmbuf, ret); + break; + case MLAN_STATUS_PENDING: + break; + case MLAN_STATUS_SUCCESS: + DBG_HEXDUMP(MDAT_D, "Tx", + pmbuf->pbuf + pmbuf->data_offset, + MIN(pmbuf->data_len + sizeof(TxPD), + MAX_DATA_DUMP_LEN)); + wlan_write_data_complete(pmadapter, pmbuf, ret); + break; + default: + break; + } + if (ret != MLAN_STATUS_RESOURCE) { + pmadapter->callbacks.moal_spin_lock(pmadapter-> + pmoal_handle, + priv->wmm. + ra_list_spinlock); + if (wlan_is_ralist_valid(priv, ptr, ptrindex)) { + priv->wmm.packets_out[ptrindex]++; + priv->wmm.tid_tbl_ptr[ptrindex].ra_list_curr = + ptr; + ptr->total_pkts--; + } + pmadapter->bssprio_tbl[priv->bss_priority].bssprio_cur = + pmadapter->bssprio_tbl[priv->bss_priority]. + bssprio_cur->pnext; + priv->wmm.pkts_queued[ptrindex]--; + util_scalar_decrement(pmadapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, + MNULL, MNULL); + pmadapter->callbacks.moal_spin_unlock(pmadapter-> + pmoal_handle, + priv->wmm. + ra_list_spinlock); + } + } else { + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm. + ra_list_spinlock); + } +} + +/** + * @brief This function dequeues a packet + * + * @param pmadapter A pointer to mlan_adapter + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static int +wlan_dequeue_tx_packet(pmlan_adapter pmadapter) +{ + raListTbl *ptr; + pmlan_private priv = MNULL; + int ptrindex = 0; + t_u8 ra[MLAN_MAC_ADDR_LENGTH]; + int tid_del = 0; + int tid = 0; + + ENTER(); + + ptr = wlan_wmm_get_highest_priolist_ptr(pmadapter, &priv, &ptrindex); + if (!ptr) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + /* Note:- Spinlock is locked in wlan_wmm_get_highest_priolist_ptr when + it returns a pointer (for the priv it returns), and is unlocked in + wlan_send_processed_packet, wlan_send_single_packet or + wlan_11n_aggregate_pkt. The spinlock would be required for some + parts of both of function. But, the the bulk of these function + will execute w/o spinlock. Unlocking the spinlock inside these + function will help us avoid taking the spinlock again, check to see + if the ptr is still valid and then proceed. This is done purely to + increase execution time. */ + + /* Note:- Also, anybody adding code which does not get into + wlan_send_processed_packet, wlan_send_single_packet, or + wlan_11n_aggregate_pkt should make sure ra_list_spinlock is freed. + Otherwise there would be a lock up. */ + + tid = wlan_get_tid(priv->adapter, ptr); + if (tid >= MAX_NUM_TID) + tid = wlan_wmm_downgrade_tid(priv, tid); + + if (wlan_is_ptr_processed(priv, ptr)) { + wlan_send_processed_packet(priv, ptr, ptrindex); + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + + if (!ptr->is_11n_enabled || ptr->ba_status +#ifdef STA_SUPPORT + || priv->wps.session_enable +#endif /* STA_SUPPORT */ + ) { + if (ptr->is_11n_enabled && ptr->ba_status + && ptr->amsdu_in_ampdu + && wlan_is_amsdu_allowed(priv, ptr, tid) + && (wlan_num_pkts_in_txq(priv, ptr, pmadapter->tx_buf_size) + >= MIN_NUM_AMSDU)) { + wlan_11n_aggregate_pkt(priv, ptr, INTF_HEADER_LEN, + ptrindex); + } else + wlan_send_single_packet(priv, ptr, ptrindex); + } else { + if (wlan_is_ampdu_allowed(priv, ptr, tid) && + (ptr->packet_count > ptr->ba_packet_threshold)) { + if (wlan_is_bastream_avail(priv)) { + PRINTM(MINFO, + "BA setup threshold %d reached. tid=%d\n", + ptr->packet_count, tid); + if (!wlan_11n_get_txbastream_tbl + (priv, tid, ptr->ra)) { + wlan_11n_create_txbastream_tbl(priv, + ptr->ra, + tid, + BA_STREAM_SETUP_INPROGRESS); + wlan_send_addba(priv, tid, ptr->ra); + } + } else if (wlan_find_stream_to_delete(priv, ptr, + tid, &tid_del, + ra)) { + PRINTM(MDAT_D, "tid_del=%d tid=%d\n", tid_del, + tid); + if (!wlan_11n_get_txbastream_tbl + (priv, tid, ptr->ra)) { + wlan_11n_create_txbastream_tbl(priv, + ptr->ra, + tid, + BA_STREAM_SETUP_INPROGRESS); + wlan_send_delba(priv, MNULL, tid_del, + ra, 1); + } + } + } + if (wlan_is_amsdu_allowed(priv, ptr, tid) && + (wlan_num_pkts_in_txq(priv, ptr, + pmadapter->tx_buf_size) >= + MIN_NUM_AMSDU)) { + wlan_11n_aggregate_pkt(priv, ptr, INTF_HEADER_LEN, + ptrindex); + } else { + wlan_send_single_packet(priv, ptr, ptrindex); + } + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief update tx_pause flag in ra_list + * + * @param priv A pointer to mlan_private + * @param mac peer mac address + * @param tx_pause tx_pause flag (0/1) + * + * @return N/A + */ +t_void +wlan_update_ralist_tx_pause(pmlan_private priv, t_u8 *mac, t_u8 tx_pause) +{ + raListTbl *ra_list; + int i; + pmlan_adapter pmadapter = priv->adapter; + t_u32 pkt_cnt = 0; + t_u32 tx_pkts_queued = 0; + ENTER(); + + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + for (i = 0; i < MAX_NUM_TID; ++i) { + ra_list = wlan_wmm_get_ralist_node(priv, i, mac); + if (ra_list && ra_list->tx_pause != tx_pause) { + pkt_cnt += ra_list->total_pkts; + ra_list->tx_pause = tx_pause; + if (tx_pause) + priv->wmm.pkts_paused[i] += ra_list->total_pkts; + else + priv->wmm.pkts_paused[i] -= ra_list->total_pkts; + + } + } + if (pkt_cnt) { + tx_pkts_queued = util_scalar_read(pmadapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, + MNULL, MNULL); + if (tx_pause) + tx_pkts_queued -= pkt_cnt; + else + tx_pkts_queued += pkt_cnt; + util_scalar_write(priv->adapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, tx_pkts_queued, + MNULL, MNULL); + util_scalar_write(priv->adapter->pmoal_handle, + &priv->wmm.highest_queued_prio, HIGH_PRIO_TID, + MNULL, MNULL); + } + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + LEAVE(); +} + +#ifdef STA_SUPPORT +/** + * @brief update tx_pause flag in none tdls ra_list + * + * @param priv A pointer to mlan_private + * @param mac peer mac address + * @param tx_pause tx_pause flag (0/1) + * + * @return N/A + */ +t_void +wlan_update_non_tdls_ralist(mlan_private *priv, t_u8 *mac, t_u8 tx_pause) +{ + raListTbl *ra_list; + int i; + pmlan_adapter pmadapter = priv->adapter; + t_u32 pkt_cnt = 0; + t_u32 tx_pkts_queued = 0; + ENTER(); + + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + for (i = 0; i < MAX_NUM_TID; ++i) { + ra_list = + (raListTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->wmm.tid_tbl_ptr[i]. + ra_list, MNULL, MNULL); + while (ra_list && + (ra_list != + (raListTbl *)&priv->wmm.tid_tbl_ptr[i].ra_list)) { + if (memcmp + (priv->adapter, ra_list->ra, mac, + MLAN_MAC_ADDR_LENGTH) && + ra_list->tx_pause != tx_pause) { + pkt_cnt += ra_list->total_pkts; + ra_list->tx_pause = tx_pause; + if (tx_pause) + priv->wmm.pkts_paused[i] += + ra_list->total_pkts; + else + priv->wmm.pkts_paused[i] -= + ra_list->total_pkts; + } + ra_list = ra_list->pnext; + } + } + if (pkt_cnt) { + tx_pkts_queued = util_scalar_read(pmadapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, + MNULL, MNULL); + if (tx_pause) + tx_pkts_queued -= pkt_cnt; + else + tx_pkts_queued += pkt_cnt; + util_scalar_write(priv->adapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, tx_pkts_queued, + MNULL, MNULL); + util_scalar_write(priv->adapter->pmoal_handle, + &priv->wmm.highest_queued_prio, HIGH_PRIO_TID, + MNULL, MNULL); + } + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + LEAVE(); + return; +} + +/** + * @brief find tdls buffer from ralist + * + * @param priv A pointer to mlan_private + * @param ralist A pointer to ralistTbl + * @param mac TDLS peer mac address + * + * @return pmlan_buffer or MNULL + */ +static pmlan_buffer +wlan_find_tdls_packets(mlan_private *priv, raListTbl *ra_list, t_u8 *mac) +{ + pmlan_buffer pmbuf = MNULL; + mlan_adapter *pmadapter = priv->adapter; + t_u8 ra[MLAN_MAC_ADDR_LENGTH]; + ENTER(); + pmbuf = (pmlan_buffer)util_peek_list(priv->adapter->pmoal_handle, + &ra_list->buf_head, MNULL, MNULL); + if (!pmbuf) { + LEAVE(); + return MNULL; + } + while (pmbuf != (pmlan_buffer)&ra_list->buf_head) { + memcpy(pmadapter, ra, pmbuf->pbuf + pmbuf->data_offset, + MLAN_MAC_ADDR_LENGTH); + if (!memcmp(priv->adapter, ra, mac, MLAN_MAC_ADDR_LENGTH)) { + LEAVE(); + return pmbuf; + } + pmbuf = pmbuf->pnext; + } + LEAVE(); + return MNULL; +} + +/** + * @brief find tdls buffer from tdls pending queue + * + * @param priv A pointer to mlan_private + * @param mac TDLS peer mac address + * + * @return pmlan_buffer or MNULL + */ +static pmlan_buffer +wlan_find_packets_tdls_txq(mlan_private *priv, t_u8 *mac) +{ + pmlan_buffer pmbuf = MNULL; + mlan_adapter *pmadapter = priv->adapter; + t_u8 ra[MLAN_MAC_ADDR_LENGTH]; + ENTER(); + pmbuf = (pmlan_buffer)util_peek_list(priv->adapter->pmoal_handle, + &priv->tdls_pending_txq, + MNULL, MNULL); + if (!pmbuf) { + LEAVE(); + return MNULL; + } + while (pmbuf != (pmlan_buffer)&priv->tdls_pending_txq) { + memcpy(pmadapter, ra, pmbuf->pbuf + pmbuf->data_offset, + MLAN_MAC_ADDR_LENGTH); + if (!memcmp(priv->adapter, ra, mac, MLAN_MAC_ADDR_LENGTH)) { + LEAVE(); + return pmbuf; + } + pmbuf = pmbuf->pnext; + } + LEAVE(); + return MNULL; +} + +/** + * @brief Remove TDLS ralist and move packets to AP's ralist + * + * @param priv A pointer to mlan_private + * @param mac TDLS peer mac address + * + * @return N/A + */ +static t_void +wlan_wmm_delete_tdls_ralist(pmlan_private priv, t_u8 *mac) +{ + raListTbl *ra_list; + raListTbl *ra_list_ap = MNULL; + int i; + pmlan_adapter pmadapter = priv->adapter; + pmlan_buffer pmbuf; + ENTER(); + + for (i = 0; i < MAX_NUM_TID; ++i) { + ra_list = wlan_wmm_get_ralist_node(priv, i, mac); + if (ra_list) { + PRINTM(MDATA, "delete TDLS ralist %p\n", ra_list); + ra_list_ap = + (raListTbl *)util_peek_list(pmadapter-> + pmoal_handle, + &priv->wmm. + tid_tbl_ptr[i]. + ra_list, MNULL, + MNULL); + while ((pmbuf = + (pmlan_buffer)util_peek_list(pmadapter-> + pmoal_handle, + &ra_list->buf_head, + MNULL, MNULL))) { + util_unlink_list(pmadapter->pmoal_handle, + &ra_list->buf_head, + (pmlan_linked_list)pmbuf, + MNULL, MNULL); + util_enqueue_list_tail(pmadapter->pmoal_handle, + &ra_list_ap->buf_head, + (pmlan_linked_list)pmbuf, + MNULL, MNULL); + ra_list_ap->total_pkts++; + ra_list_ap->packet_count++; + } + util_free_list_head((t_void *)pmadapter->pmoal_handle, + &ra_list->buf_head, + pmadapter->callbacks. + moal_free_lock); + + util_unlink_list(pmadapter->pmoal_handle, + &priv->wmm.tid_tbl_ptr[i].ra_list, + (pmlan_linked_list)ra_list, MNULL, + MNULL); + pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)ra_list); + if (priv->wmm.tid_tbl_ptr[i].ra_list_curr == ra_list) + priv->wmm.tid_tbl_ptr[i].ra_list_curr = + ra_list_ap; + } + } + + LEAVE(); + +} +#endif /* STA_SUPPORT */ +/******************************************************** + Global Functions +********************************************************/ + +/** + * @brief Get the threshold value for BA setup using system time. + * + * @param pmadapter Pointer to the mlan_adapter structure + * + * @return threshold value. + */ +t_u8 +wlan_get_random_ba_threshold(pmlan_adapter pmadapter) +{ + t_u32 sec, usec; + t_u8 ba_threshold = 0; + + ENTER(); + + /* setup ba_packet_threshold here random number between + [BA_SETUP_PACKET_OFFSET, + BA_SETUP_PACKET_OFFSET+BA_SETUP_MAX_PACKET_THRESHOLD-1] */ + +#define BA_SETUP_MAX_PACKET_THRESHOLD 16 +#define BA_SETUP_PACKET_OFFSET 16 + + pmadapter->callbacks.moal_get_system_time(pmadapter->pmoal_handle, &sec, + &usec); + sec = (sec & 0xFFFF) + (sec >> 16); + usec = (usec & 0xFFFF) + (usec >> 16); + + ba_threshold = + (((sec << 16) + usec) % BA_SETUP_MAX_PACKET_THRESHOLD) + + BA_SETUP_PACKET_OFFSET; + PRINTM(MINFO, "setup BA after %d packets\n", ba_threshold); + + LEAVE(); + return ba_threshold; +} + +/** + * @brief This function cleans Tx/Rx queues + * + * @param priv A pointer to mlan_private + * + * @return N/A + */ +t_void +wlan_clean_txrx(pmlan_private priv) +{ + mlan_adapter *pmadapter = priv->adapter; + t_u8 i = 0; + + ENTER(); + + wlan_cleanup_bypass_txq(priv); + + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) { + wlan_cleanup_tdls_txq(priv); + } + wlan_11n_cleanup_reorder_tbl(priv); + + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + + wlan_wmm_cleanup_queues(priv); + wlan_11n_deleteall_txbastream_tbl(priv); + + wlan_wmm_delete_all_ralist(priv); + memcpy(pmadapter, tos_to_tid, ac_to_tid, sizeof(tos_to_tid)); + for (i = 0; i < MAX_NUM_TID; i++) + tos_to_tid_inv[tos_to_tid[i]] = (t_u8)i; +#if defined(UAP_SUPPORT) + priv->num_drop_pkts = 0; +#endif +#ifdef SDIO_MULTI_PORT_TX_AGGR + memset(pmadapter, pmadapter->mpa_tx_count, 0, + sizeof(pmadapter->mpa_tx_count)); + pmadapter->mpa_sent_no_ports = 0; + pmadapter->mpa_sent_last_pkt = 0; +#endif +#ifdef SDIO_MULTI_PORT_RX_AGGR + memset(pmadapter, pmadapter->mpa_rx_count, 0, + sizeof(pmadapter->mpa_rx_count)); +#endif + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + + LEAVE(); +} + +/** + * @brief Set the WMM queue priorities to their default values + * + * @param priv Pointer to the mlan_private driver data struct + * + * @return N/A + */ +void +wlan_wmm_default_queue_priorities(pmlan_private priv) +{ + ENTER(); + + /* Default queue priorities: VO->VI->BE->BK */ + priv->wmm.queue_priority[0] = WMM_AC_VO; + priv->wmm.queue_priority[1] = WMM_AC_VI; + priv->wmm.queue_priority[2] = WMM_AC_BE; + priv->wmm.queue_priority[3] = WMM_AC_BK; + + LEAVE(); +} + +/** + * @brief Initialize WMM priority queues + * + * @param priv Pointer to the mlan_private driver data struct + * @param pwmm_ie Pointer to the IEEEtypes_WmmParameter_t data struct + * + * @return N/A + */ +void +wlan_wmm_setup_queue_priorities(pmlan_private priv, + IEEEtypes_WmmParameter_t *pwmm_ie) +{ + t_u16 cw_min, avg_back_off, tmp[4]; + t_u32 i, j, num_ac; + t_u8 ac_idx; + + ENTER(); + + if (!pwmm_ie || priv->wmm_enabled == MFALSE) { + /* WMM is not enabled, just set the defaults and return */ + wlan_wmm_default_queue_priorities(priv); + LEAVE(); + return; + } + memset(priv->adapter, tmp, 0, sizeof(tmp)); + + HEXDUMP("WMM: setup_queue_priorities: param IE", + (t_u8 *)pwmm_ie, sizeof(IEEEtypes_WmmParameter_t)); + + PRINTM(MINFO, "WMM Parameter IE: version=%d, " + "qos_info Parameter Set Count=%d, Reserved=%#x\n", + pwmm_ie->vend_hdr.version, pwmm_ie->qos_info.para_set_count, + pwmm_ie->reserved); + + for (num_ac = 0; num_ac < NELEMENTS(pwmm_ie->ac_params); num_ac++) { + cw_min = (1 << pwmm_ie->ac_params[num_ac].ecw.ecw_min) - 1; + avg_back_off + = + (cw_min >> 1) + + pwmm_ie->ac_params[num_ac].aci_aifsn.aifsn; + + ac_idx = wmm_aci_to_qidx_map[pwmm_ie->ac_params[num_ac]. + aci_aifsn.aci]; + priv->wmm.queue_priority[ac_idx] = ac_idx; + tmp[ac_idx] = avg_back_off; + + PRINTM(MCMND, "WMM: CWmax=%d CWmin=%d Avg Back-off=%d\n", + (1 << pwmm_ie->ac_params[num_ac].ecw.ecw_max) - 1, + cw_min, avg_back_off); + PRINTM_AC(&pwmm_ie->ac_params[num_ac]); + } + + HEXDUMP("WMM: avg_back_off", (t_u8 *)tmp, sizeof(tmp)); + HEXDUMP("WMM: queue_priority", priv->wmm.queue_priority, + sizeof(priv->wmm.queue_priority)); + + /* Bubble sort */ + for (i = 0; i < num_ac; i++) { + for (j = 1; j < num_ac - i; j++) { + if (tmp[j - 1] > tmp[j]) { + SWAP_U16(tmp[j - 1], tmp[j]); + SWAP_U8(priv->wmm.queue_priority[j - 1], + priv->wmm.queue_priority[j]); + } else if (tmp[j - 1] == tmp[j]) { + if (priv->wmm.queue_priority[j - 1] + < priv->wmm.queue_priority[j]) { + SWAP_U8(priv->wmm.queue_priority[j - 1], + priv->wmm.queue_priority[j]); + } + } + } + } + + wlan_wmm_queue_priorities_tid(priv, priv->wmm.queue_priority); + + HEXDUMP("WMM: avg_back_off, sort", (t_u8 *)tmp, sizeof(tmp)); + DBG_HEXDUMP(MCMD_D, "WMM: queue_priority, sort", + priv->wmm.queue_priority, sizeof(priv->wmm.queue_priority)); + LEAVE(); +} + +/** + * @brief Downgrade WMM priority queue + * + * @param priv Pointer to the mlan_private driver data struct + * + * @return N/A + */ +void +wlan_wmm_setup_ac_downgrade(pmlan_private priv) +{ + int ac_val; + + ENTER(); + + PRINTM(MINFO, "WMM: AC Priorities: BK(0), BE(1), VI(2), VO(3)\n"); + + if (priv->wmm_enabled == MFALSE) { + /* WMM is not enabled, default priorities */ + for (ac_val = WMM_AC_BK; ac_val <= WMM_AC_VO; ac_val++) { + priv->wmm.ac_down_graded_vals[ac_val] = + (mlan_wmm_ac_e)ac_val; + } + } else { + for (ac_val = WMM_AC_BK; ac_val <= WMM_AC_VO; ac_val++) { + priv->wmm.ac_down_graded_vals[ac_val] + = wlan_wmm_eval_downgrade_ac(priv, + (mlan_wmm_ac_e) + ac_val); + PRINTM(MINFO, "WMM: AC PRIO %d maps to %d\n", ac_val, + priv->wmm.ac_down_graded_vals[ac_val]); + } + } + + LEAVE(); +} + +/** + * @brief Allocate and add a RA list for all TIDs with the given RA + * + * @param priv Pointer to the mlan_private driver data struct + * @param ra Address of the receiver STA (AP in case of infra) + * + * @return N/A + */ +void +wlan_ralist_add(mlan_private *priv, t_u8 *ra) +{ + int i; + raListTbl *ra_list; + pmlan_adapter pmadapter = priv->adapter; + tdlsStatus_e status; + + ENTER(); + + for (i = 0; i < MAX_NUM_TID; ++i) { + ra_list = wlan_wmm_allocate_ralist_node(pmadapter, ra); + PRINTM(MINFO, "Creating RA List %p for tid %d\n", ra_list, i); + if (!ra_list) + break; + ra_list->max_amsdu = 0; + ra_list->ba_status = BA_STREAM_NOT_SETUP; + ra_list->amsdu_in_ampdu = MFALSE; + if (queuing_ra_based(priv)) { + ra_list->is_11n_enabled = wlan_is_11n_enabled(priv, ra); + if (ra_list->is_11n_enabled) + ra_list->max_amsdu = + get_station_max_amsdu_size(priv, ra); + ra_list->tx_pause = wlan_is_tx_pause(priv, ra); + } else { + ra_list->is_tdls_link = MFALSE; + ra_list->tx_pause = MFALSE; + status = wlan_get_tdls_link_status(priv, ra); + if (MTRUE == wlan_is_tdls_link_setup(status)) { + ra_list->is_11n_enabled = + is_station_11n_enabled(priv, ra); + if (ra_list->is_11n_enabled) + ra_list->max_amsdu = + get_station_max_amsdu_size(priv, + ra); + ra_list->is_tdls_link = MTRUE; + } else { + ra_list->is_11n_enabled = IS_11N_ENABLED(priv); + if (ra_list->is_11n_enabled) + ra_list->max_amsdu = priv->max_amsdu; + } + } + + PRINTM_NETINTF(MDATA, priv); + PRINTM(MDATA, "ralist %p: is_11n_enabled=%d max_amsdu=%d\n", + ra_list, ra_list->is_11n_enabled, ra_list->max_amsdu); + + if (ra_list->is_11n_enabled) { + ra_list->packet_count = 0; + ra_list->ba_packet_threshold = + wlan_get_random_ba_threshold(pmadapter); + } + + util_enqueue_list_tail(pmadapter->pmoal_handle, + &priv->wmm.tid_tbl_ptr[i].ra_list, + (pmlan_linked_list)ra_list, MNULL, + MNULL); + + if (!priv->wmm.tid_tbl_ptr[i].ra_list_curr) + priv->wmm.tid_tbl_ptr[i].ra_list_curr = ra_list; + } + + LEAVE(); +} + +/** + * @brief Initialize the WMM state information and the WMM data path queues. + * + * @param pmadapter Pointer to the mlan_adapter data structure + * + * @return N/A + */ +t_void +wlan_wmm_init(pmlan_adapter pmadapter) +{ + int i, j; + pmlan_private priv; + + ENTER(); + + for (j = 0; j < pmadapter->priv_num; ++j) { + priv = pmadapter->priv[j]; + if (priv) { + for (i = 0; i < MAX_NUM_TID; ++i) { + if (pmadapter->max_tx_buf_size > + MLAN_TX_DATA_BUF_SIZE_2K) + priv->aggr_prio_tbl[i].amsdu = + tos_to_tid_inv[i]; + else + priv->aggr_prio_tbl[i].amsdu = + BA_STREAM_NOT_ALLOWED; + priv->aggr_prio_tbl[i].ampdu_ap = + priv->aggr_prio_tbl[i].ampdu_user = + tos_to_tid_inv[i]; + priv->wmm.pkts_queued[i] = 0; + priv->wmm.pkts_paused[i] = 0; + priv->wmm.tid_tbl_ptr[i].ra_list_curr = MNULL; + } + priv->wmm.drv_pkt_delay_max = WMM_DRV_DELAY_MAX; + + priv->aggr_prio_tbl[6].amsdu = BA_STREAM_NOT_ALLOWED; + priv->aggr_prio_tbl[7].amsdu = BA_STREAM_NOT_ALLOWED; + priv->aggr_prio_tbl[6].ampdu_ap + = priv->aggr_prio_tbl[6].ampdu_user = + BA_STREAM_NOT_ALLOWED; + + priv->aggr_prio_tbl[7].ampdu_ap + = priv->aggr_prio_tbl[7].ampdu_user = + BA_STREAM_NOT_ALLOWED; + + priv->add_ba_param.timeout = + MLAN_DEFAULT_BLOCK_ACK_TIMEOUT; +#ifdef STA_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_STA) { + priv->add_ba_param.tx_win_size = + pmadapter->psdio_device->ampdu_info-> + ampdu_sta_txwinsize; + priv->add_ba_param.rx_win_size = + MLAN_STA_AMPDU_DEF_RXWINSIZE; + } +#endif +#ifdef WIFI_DIRECT_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) { + priv->add_ba_param.tx_win_size = + pmadapter->psdio_device->ampdu_info-> + ampdu_wfd_txrxwinsize; + priv->add_ba_param.rx_win_size = + pmadapter->psdio_device->ampdu_info-> + ampdu_wfd_txrxwinsize; + } +#endif +#ifdef UAP_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_UAP) { + priv->add_ba_param.tx_win_size = + pmadapter->psdio_device->ampdu_info-> + ampdu_uap_txwinsize; + priv->add_ba_param.rx_win_size = + pmadapter->psdio_device->ampdu_info-> + ampdu_uap_rxwinsize; + } +#endif + priv->add_ba_param.tx_amsdu = MTRUE; + priv->add_ba_param.rx_amsdu = MTRUE; + memset(priv->adapter, priv->rx_seq, 0xff, + sizeof(priv->rx_seq)); + wlan_wmm_default_queue_priorities(priv); + } + } + + LEAVE(); +} + +/** + * @brief Setup the queue priorities and downgrade any queues as required + * by the WMM info. Setups default values if WMM is not active + * for this association. + * + * @param priv Pointer to the mlan_private driver data struct + * + * @return N/A + */ +void +wlan_wmm_setup_queues(pmlan_private priv) +{ + ENTER(); + wlan_wmm_setup_queue_priorities(priv, MNULL); + wlan_wmm_setup_ac_downgrade(priv); + LEAVE(); +} + +#ifdef STA_SUPPORT +/** + * @brief Send a command to firmware to retrieve the current WMM status + * + * @param priv Pointer to the mlan_private driver data struct + * + * @return MLAN_STATUS_SUCCESS; MLAN_STATUS_FAILURE + */ +mlan_status +wlan_cmd_wmm_status_change(pmlan_private priv) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + ret = wlan_prepare_cmd(priv, HostCmd_CMD_WMM_GET_STATUS, 0, 0, 0, + MNULL); + LEAVE(); + return ret; +} +#endif + +/** + * @brief Check if wmm TX queue is empty + * + * @param pmadapter Pointer to the mlan_adapter driver data struct + * + * @return MFALSE if not empty; MTRUE if empty + */ +int +wlan_wmm_lists_empty(pmlan_adapter pmadapter) +{ + int j; + pmlan_private priv; + + ENTER(); + + for (j = 0; j < pmadapter->priv_num; ++j) { + priv = pmadapter->priv[j]; + if (priv) { + if ((priv->port_ctrl_mode == MTRUE) && + (priv->port_open == MFALSE)) { + PRINTM(MINFO, + "wmm_lists_empty: PORT_CLOSED Ignore pkts from BSS%d\n", + j); + continue; + } + + if (util_scalar_read(pmadapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, + pmadapter->callbacks. + moal_spin_lock, + pmadapter->callbacks. + moal_spin_unlock)) { + LEAVE(); + return MFALSE; + } + } + } + + LEAVE(); + return MTRUE; +} + +/** + * @brief Get ralist node + * + * @param priv Pointer to the mlan_private driver data struct + * @param tid TID + * @param ra_addr Pointer to the route address + * + * @return ra_list or MNULL + */ +raListTbl * +wlan_wmm_get_ralist_node(pmlan_private priv, t_u8 tid, t_u8 *ra_addr) +{ + raListTbl *ra_list; + ENTER(); + ra_list = + (raListTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->wmm.tid_tbl_ptr[tid].ra_list, + MNULL, MNULL); + while (ra_list && (ra_list != (raListTbl *) + &priv->wmm.tid_tbl_ptr[tid].ra_list)) { + if (!memcmp + (priv->adapter, ra_list->ra, ra_addr, + MLAN_MAC_ADDR_LENGTH)) { + LEAVE(); + return ra_list; + } + ra_list = ra_list->pnext; + } + LEAVE(); + return MNULL; +} + +/** + * @brief Check if RA list is valid or not + * + * @param priv Pointer to the mlan_private driver data struct + * @param ra_list Pointer to raListTbl + * @param ptrindex TID pointer index + * + * @return MTRUE- valid. MFALSE- invalid. + */ +int +wlan_is_ralist_valid(mlan_private *priv, raListTbl *ra_list, int ptrindex) +{ + raListTbl *rlist; + + ENTER(); + + rlist = (raListTbl *)util_peek_list(priv->adapter->pmoal_handle, + &priv->wmm.tid_tbl_ptr[ptrindex]. + ra_list, MNULL, MNULL); + + while (rlist && (rlist != (raListTbl *) + &priv->wmm.tid_tbl_ptr[ptrindex].ra_list)) { + if (rlist == ra_list) { + LEAVE(); + return MTRUE; + } + + rlist = rlist->pnext; + } + LEAVE(); + return MFALSE; +} + +/** + * @brief Update an existing raList with a new RA and 11n capability + * + * @param priv Pointer to the mlan_private driver data struct + * @param old_ra Old receiver address + * @param new_ra New receiver address + * + * @return integer count of updated nodes + */ +int +wlan_ralist_update(mlan_private *priv, t_u8 *old_ra, t_u8 *new_ra) +{ + t_u8 tid; + int update_count; + raListTbl *ra_list; + + ENTER(); + + update_count = 0; + + for (tid = 0; tid < MAX_NUM_TID; ++tid) { + + ra_list = wlan_wmm_get_ralist_node(priv, tid, old_ra); + + if (ra_list) { + update_count++; + + if (queuing_ra_based(priv)) + ra_list->is_11n_enabled = + wlan_is_11n_enabled(priv, new_ra); + else + ra_list->is_11n_enabled = IS_11N_ENABLED(priv); + ra_list->packet_count = 0; + ra_list->ba_packet_threshold = + wlan_get_random_ba_threshold(priv->adapter); + ra_list->amsdu_in_ampdu = MFALSE; + ra_list->ba_status = BA_STREAM_NOT_SETUP; + PRINTM(MINFO, + "ralist_update: %p, %d, " MACSTR "-->" MACSTR + "\n", ra_list, ra_list->is_11n_enabled, + MAC2STR(ra_list->ra), MAC2STR(new_ra)); + + memcpy(priv->adapter, ra_list->ra, new_ra, + MLAN_MAC_ADDR_LENGTH); + } + } + + LEAVE(); + return update_count; +} + +/** + * @brief Add packet to WMM queue + * + * @param pmadapter Pointer to the mlan_adapter driver data struct + * @param pmbuf Pointer to the mlan_buffer data struct + * + * @return N/A + */ +t_void +wlan_wmm_add_buf_txqueue(pmlan_adapter pmadapter, pmlan_buffer pmbuf) +{ + pmlan_private priv = pmadapter->priv[pmbuf->bss_index]; + t_u32 tid; + raListTbl *ra_list; + t_u8 ra[MLAN_MAC_ADDR_LENGTH], tid_down; + tdlsStatus_e status; +#if defined(UAP_SUPPORT) + sta_node *sta_ptr = MNULL; +#endif + + ENTER(); + + pmbuf->buf_type = MLAN_BUF_TYPE_DATA; + if (!priv->media_connected) { + PRINTM_NETINTF(MWARN, priv); + PRINTM(MWARN, "Drop packet %p in disconnect state\n", pmbuf); + wlan_write_data_complete(pmadapter, pmbuf, MLAN_STATUS_FAILURE); + LEAVE(); + return; + } + tid = pmbuf->priority; + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + tid_down = wlan_wmm_downgrade_tid(priv, tid); + + /* In case of infra as we have already created the list during + association we just don't have to call get_queue_raptr, we will have + only 1 raptr for a tid in case of infra */ + if (!queuing_ra_based(priv)) { + memcpy(pmadapter, ra, pmbuf->pbuf + pmbuf->data_offset, + MLAN_MAC_ADDR_LENGTH); + status = wlan_get_tdls_link_status(priv, ra); + if (MTRUE == wlan_is_tdls_link_setup(status)) { + ra_list = wlan_wmm_get_queue_raptr(priv, tid_down, ra); + pmbuf->flags |= MLAN_BUF_FLAG_TDLS; + } else if (status == TDLS_SETUP_INPROGRESS) { + wlan_add_buf_tdls_txqueue(priv, pmbuf); + pmadapter->callbacks.moal_spin_unlock(pmadapter-> + pmoal_handle, + priv->wmm. + ra_list_spinlock); + LEAVE(); + return; + } else + ra_list = + (raListTbl *)util_peek_list(pmadapter-> + pmoal_handle, + &priv->wmm. + tid_tbl_ptr + [tid_down].ra_list, + MNULL, MNULL); + } else { + memcpy(pmadapter, ra, pmbuf->pbuf + pmbuf->data_offset, + MLAN_MAC_ADDR_LENGTH); + /** put multicast/broadcast packet in the same ralist */ + if (ra[0] & 0x01) + memset(pmadapter, ra, 0xff, sizeof(ra)); +#if defined(UAP_SUPPORT) + else if (priv->bss_type == MLAN_BSS_TYPE_UAP) { + sta_ptr = wlan_get_station_entry(priv, ra); + if (sta_ptr) { + if (!sta_ptr->is_wmm_enabled + && !priv->is_11ac_enabled) { + tid_down = + wlan_wmm_downgrade_tid(priv, + 0xff); + } + } + } +#endif + ra_list = wlan_wmm_get_queue_raptr(priv, tid_down, ra); + } + + if (!ra_list) { + PRINTM_NETINTF(MWARN, priv); + PRINTM(MWARN, + "Drop packet %p, ra_list=%p, media_connected=%d\n", + pmbuf, ra_list, priv->media_connected); + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm. + ra_list_spinlock); + wlan_write_data_complete(pmadapter, pmbuf, MLAN_STATUS_FAILURE); + LEAVE(); + return; + } + + PRINTM_NETINTF(MDATA, priv); + PRINTM(MDATA, + "Adding pkt %p (priority=%d, tid_down=%d) to ra_list %p\n", + pmbuf, pmbuf->priority, tid_down, ra_list); + util_enqueue_list_tail(pmadapter->pmoal_handle, &ra_list->buf_head, + (pmlan_linked_list)pmbuf, MNULL, MNULL); + + ra_list->total_pkts++; + ra_list->packet_count++; + + priv->wmm.pkts_queued[tid_down]++; + if (ra_list->tx_pause) { + priv->wmm.pkts_paused[tid_down]++; + } else { + util_scalar_increment(pmadapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, MNULL, MNULL); + /* if highest_queued_prio < prio(tid_down), set it to + prio(tid_down) */ + util_scalar_conditional_write(pmadapter->pmoal_handle, + &priv->wmm.highest_queued_prio, + MLAN_SCALAR_COND_LESS_THAN, + tos_to_tid_inv[tid_down], + tos_to_tid_inv[tid_down], + MNULL, MNULL); + } + /* Record the current time the packet was queued; used to determine the + amount of time the packet was queued in the driver before it was + sent to the firmware. The delay is then sent along with the packet + to the firmware for aggregate delay calculation for stats and MSDU + lifetime expiry. */ + pmadapter->callbacks.moal_get_system_time(pmadapter->pmoal_handle, + &pmbuf->in_ts_sec, + &pmbuf->in_ts_usec); + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + + LEAVE(); +} + +#ifdef STA_SUPPORT +/** + * @brief Process the GET_WMM_STATUS command response from firmware + * + * The GET_WMM_STATUS response may contain multiple TLVs for: + * - AC Queue status TLVs + * - Current WMM Parameter IE TLV + * - Admission Control action frame TLVs + * + * This function parses the TLVs and then calls further functions + * to process any changes in the queue prioritize or state. + * + * @param priv Pointer to the mlan_private driver data struct + * @param ptlv Pointer to the tlv block returned in the response. + * @param resp_len Length of TLV block + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_wmm_get_status(pmlan_private priv, t_u8 *ptlv, int resp_len) +{ + t_u8 *pcurrent = ptlv; + t_u32 tlv_len; + t_u8 send_wmm_event; + MrvlIEtypes_Data_t *ptlv_hdr; + MrvlIEtypes_WmmQueueStatus_t *ptlv_wmm_q_status; + IEEEtypes_WmmParameter_t *pwmm_param_ie = MNULL; + WmmAcStatus_t *pac_status; + + MrvlIETypes_ActionFrame_t *ptlv_action; + IEEEtypes_Action_WMM_AddTsRsp_t *padd_ts_rsp; + IEEEtypes_Action_WMM_DelTs_t *pdel_ts; + + ENTER(); + + send_wmm_event = MFALSE; + + PRINTM(MINFO, "WMM: WMM_GET_STATUS cmdresp received: %d\n", resp_len); + HEXDUMP("CMD_RESP: WMM_GET_STATUS", pcurrent, resp_len); + + while (resp_len >= sizeof(ptlv_hdr->header)) { + ptlv_hdr = (MrvlIEtypes_Data_t *)pcurrent; + tlv_len = wlan_le16_to_cpu(ptlv_hdr->header.len); + if ((tlv_len + sizeof(ptlv_hdr->header)) > resp_len) { + PRINTM(MERROR, + "WMM get status: Error in processing TLV buffer\n"); + resp_len = 0; + continue; + } + + switch (wlan_le16_to_cpu(ptlv_hdr->header.type)) { + case TLV_TYPE_WMMQSTATUS: + ptlv_wmm_q_status = + (MrvlIEtypes_WmmQueueStatus_t *)ptlv_hdr; + PRINTM(MEVENT, "WMM_STATUS: QSTATUS TLV: %d\n", + ptlv_wmm_q_status->queue_index); + + PRINTM(MINFO, + "CMD_RESP: WMM_GET_STATUS: QSTATUS TLV: %d, %d, %d\n", + ptlv_wmm_q_status->queue_index, + ptlv_wmm_q_status->flow_required, + ptlv_wmm_q_status->disabled); + + pac_status = + &priv->wmm.ac_status[ptlv_wmm_q_status-> + queue_index]; + pac_status->disabled = ptlv_wmm_q_status->disabled; + pac_status->flow_required = + ptlv_wmm_q_status->flow_required; + pac_status->flow_created = + ptlv_wmm_q_status->flow_created; + break; + + case WMM_IE: + /* + * Point the regular IEEE IE 2 bytes into the Marvell IE + * and setup the IEEE IE type and length byte fields + */ + + PRINTM(MEVENT, "WMM STATUS: WMM IE\n"); + + HEXDUMP("WMM: WMM TLV:", (t_u8 *)ptlv_hdr, tlv_len + 4); + + pwmm_param_ie = + (IEEEtypes_WmmParameter_t *)(pcurrent + 2); + pwmm_param_ie->vend_hdr.len = (t_u8)tlv_len; + pwmm_param_ie->vend_hdr.element_id = WMM_IE; + + PRINTM(MINFO, + "CMD_RESP: WMM_GET_STATUS: WMM Parameter Set: %d\n", + pwmm_param_ie->qos_info.para_set_count); + + memcpy(priv->adapter, + (t_u8 *)&priv->curr_bss_params.bss_descriptor. + wmm_ie, pwmm_param_ie, + MIN(sizeof(IEEEtypes_WmmParameter_t), + (pwmm_param_ie->vend_hdr.len + 2))); + send_wmm_event = MTRUE; + break; + + case TLV_TYPE_IEEE_ACTION_FRAME: + PRINTM(MEVENT, "WMM_STATUS: IEEE Action Frame\n"); + ptlv_action = (MrvlIETypes_ActionFrame_t *)pcurrent; + + if (ptlv_action->actionFrame.wmmAc.tspecAct.category + == IEEE_MGMT_ACTION_CATEGORY_WMM_TSPEC) { + + switch (ptlv_action->actionFrame.wmmAc.tspecAct. + action) { + case TSPEC_ACTION_CODE_ADDTS_RSP: + padd_ts_rsp = + &ptlv_action->actionFrame.wmmAc. + addTsRsp; + wlan_send_wmmac_host_event(priv, + "ADDTS_RSP", + ptlv_action-> + srcAddr, + padd_ts_rsp-> + tspecIE. + TspecBody. + TSInfo.TID, + padd_ts_rsp-> + tspecIE. + TspecBody. + TSInfo. + UserPri, + padd_ts_rsp-> + statusCode); + break; + + case TSPEC_ACTION_CODE_DELTS: + pdel_ts = + &ptlv_action->actionFrame.wmmAc. + delTs; + wlan_send_wmmac_host_event(priv, + "DELTS_RX", + ptlv_action-> + srcAddr, + pdel_ts-> + tspecIE. + TspecBody. + TSInfo.TID, + pdel_ts-> + tspecIE. + TspecBody. + TSInfo. + UserPri, + pdel_ts-> + reasonCode); + break; + + case TSPEC_ACTION_CODE_ADDTS_REQ: + default: + break; + } + } + break; + + default: + break; + } + + pcurrent += (tlv_len + sizeof(ptlv_hdr->header)); + resp_len -= (tlv_len + sizeof(ptlv_hdr->header)); + } + + wlan_wmm_setup_queue_priorities(priv, pwmm_param_ie); + wlan_wmm_setup_ac_downgrade(priv); + + if (send_wmm_event) { + wlan_recv_event(priv, MLAN_EVENT_ID_FW_WMM_CONFIG_CHANGE, + MNULL); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Call back from the command module to allow insertion of a WMM TLV + * + * If the BSS we are associating to supports WMM, add the required WMM + * Information IE to the association request command buffer in the form + * of a Marvell extended IEEE IE. + * + * @param priv Pointer to the mlan_private driver data struct + * @param ppassoc_buf Output parameter: Pointer to the TLV output buffer, + * modified on return to point after the appended WMM TLV + * @param pwmm_ie Pointer to the WMM IE for the BSS we are joining + * @param pht_cap Pointer to the HT IE for the BSS we are joining + * + * @return Length of data appended to the association tlv buffer + */ +t_u32 +wlan_wmm_process_association_req(pmlan_private priv, + t_u8 **ppassoc_buf, + IEEEtypes_WmmParameter_t *pwmm_ie, + IEEEtypes_HTCap_t *pht_cap) +{ + MrvlIEtypes_WmmParamSet_t *pwmm_tlv; + t_u32 ret_len = 0; + + ENTER(); + + /* Null checks */ + if (!ppassoc_buf) { + LEAVE(); + return 0; + } + if (!(*ppassoc_buf)) { + LEAVE(); + return 0; + } + + if (!pwmm_ie) { + LEAVE(); + return 0; + } + + PRINTM(MINFO, "WMM: process assoc req: bss->wmmIe=0x%x\n", + pwmm_ie->vend_hdr.element_id); + + if ((priv->wmm_required + || (pht_cap && (pht_cap->ieee_hdr.element_id == HT_CAPABILITY) + && (priv->config_bands & BAND_GN + || priv->config_bands & BAND_AN)) + ) + && pwmm_ie->vend_hdr.element_id == WMM_IE) { + pwmm_tlv = (MrvlIEtypes_WmmParamSet_t *)*ppassoc_buf; + pwmm_tlv->header.type = (t_u16)wmm_info_ie[0]; + pwmm_tlv->header.type = wlan_cpu_to_le16(pwmm_tlv->header.type); + pwmm_tlv->header.len = (t_u16)wmm_info_ie[1]; + memcpy(priv->adapter, pwmm_tlv->wmm_ie, &wmm_info_ie[2], + pwmm_tlv->header.len); + if (pwmm_ie->qos_info.qos_uapsd) + memcpy(priv->adapter, + (t_u8 *)(pwmm_tlv->wmm_ie + + pwmm_tlv->header.len - + sizeof(priv->wmm_qosinfo)), + &priv->wmm_qosinfo, sizeof(priv->wmm_qosinfo)); + + ret_len = sizeof(pwmm_tlv->header) + pwmm_tlv->header.len; + pwmm_tlv->header.len = wlan_cpu_to_le16(pwmm_tlv->header.len); + + HEXDUMP("ASSOC_CMD: WMM IE", (t_u8 *)pwmm_tlv, ret_len); + *ppassoc_buf += ret_len; + } + + LEAVE(); + return ret_len; +} +#endif /* STA_SUPPORT */ + +/** + * @brief Compute the time delay in the driver queues for a given packet. + * + * When the packet is received at the OS/Driver interface, the current + * time is set in the packet structure. The difference between the present + * time and that received time is computed in this function and limited + * based on pre-compiled limits in the driver. + * + * @param priv Ptr to the mlan_private driver data struct + * @param pmbuf Ptr to the mlan_buffer which has been previously timestamped + * + * @return Time delay of the packet in 2ms units after having limit applied + */ +t_u8 +wlan_wmm_compute_driver_packet_delay(pmlan_private priv, + const pmlan_buffer pmbuf) +{ + t_u8 ret_val = 0; + t_u32 out_ts_sec, out_ts_usec; + t_s32 queue_delay; + + ENTER(); + + priv->adapter->callbacks.moal_get_system_time(priv->adapter-> + pmoal_handle, &out_ts_sec, + &out_ts_usec); + + queue_delay = (t_s32)(out_ts_sec - pmbuf->in_ts_sec) * 1000; + queue_delay += (t_s32)(out_ts_usec - pmbuf->in_ts_usec) / 1000; + + /* + * Queue delay is passed as a uint8 in units of 2ms (ms shifted + * by 1). Min value (other than 0) is therefore 2ms, max is 510ms. + * + * Pass max value if queue_delay is beyond the uint8 range + */ + ret_val = (t_u8)(MIN(queue_delay, priv->wmm.drv_pkt_delay_max) >> 1); + + PRINTM(MINFO, "WMM: Pkt Delay: %d ms, %d ms sent to FW\n", + queue_delay, ret_val); + + LEAVE(); + return ret_val; +} + +/** + * @brief Transmit the highest priority packet awaiting in the WMM Queues + * + * @param pmadapter Pointer to the mlan_adapter driver data struct + * + * @return N/A + */ +void +wlan_wmm_process_tx(pmlan_adapter pmadapter) +{ + ENTER(); + + do { + if (wlan_dequeue_tx_packet(pmadapter)) + break; + if (pmadapter->sdio_ireg & UP_LD_CMD_PORT_HOST_INT_STATUS) { +#ifdef SDIO_MULTI_PORT_TX_AGGR + wlan_send_mp_aggr_buf(pmadapter); +#endif + break; + } + /* Check if busy */ + } while (!pmadapter->data_sent && !pmadapter->tx_lock_flag + && !wlan_wmm_lists_empty(pmadapter)); + + LEAVE(); + return; +} + +/** + * @brief select wmm queue + * + * @param pmpriv A pointer to mlan_private structure + * @param tid TID 0-7 + * + * @return wmm_queue priority (0-3) + */ +t_u8 +wlan_wmm_select_queue(mlan_private *pmpriv, t_u8 tid) +{ + pmlan_adapter pmadapter = pmpriv->adapter; + t_u8 i; + mlan_wmm_ac_e ac_down = + pmpriv->wmm. + ac_down_graded_vals[wlan_wmm_convert_tos_to_ac(pmadapter, tid)]; + + ENTER(); + + for (i = 0; i < 4; i++) { + if (pmpriv->wmm.queue_priority[i] == ac_down) { + LEAVE(); + return i; + } + } + LEAVE(); + return 0; +} + +#if defined(UAP_SUPPORT) +/** + * @brief Delete tx packets in RA list + * + * @param priv Pointer to the mlan_private driver data struct + * @param ra_list_head ra list header + * @param tid tid + * + * @return N/A + */ +static INLINE t_u8 +wlan_del_tx_pkts_in_ralist(pmlan_private priv, + mlan_list_head *ra_list_head, int tid) +{ + raListTbl *ra_list = MNULL; + pmlan_adapter pmadapter = priv->adapter; + pmlan_buffer pmbuf = MNULL; + t_u8 ret = MFALSE; + ENTER(); + ra_list = + (raListTbl *)util_peek_list(priv->adapter->pmoal_handle, + ra_list_head, MNULL, MNULL); + while (ra_list && ra_list != (raListTbl *)ra_list_head) { + if (ra_list->total_pkts && (ra_list->tx_pause || + (ra_list->total_pkts > + RX_LOW_THRESHOLD))) { + pmbuf = (pmlan_buffer)util_dequeue_list(pmadapter-> + pmoal_handle, + &ra_list-> + buf_head, MNULL, + MNULL); + if (pmbuf) { + PRINTM(MDATA, + "Drop pkts: tid=%d tx_pause=%d pkts=%d " + MACSTR "\n", tid, ra_list->tx_pause, + ra_list->total_pkts, + MAC2STR(ra_list->ra)); + wlan_write_data_complete(pmadapter, pmbuf, + MLAN_STATUS_FAILURE); + priv->wmm.pkts_queued[tid]--; + priv->num_drop_pkts++; + ra_list->total_pkts--; + if (ra_list->tx_pause) + priv->wmm.pkts_paused[tid]--; + else + util_scalar_decrement(pmadapter-> + pmoal_handle, + &priv->wmm. + tx_pkts_queued, + MNULL, MNULL); + ret = MTRUE; + break; + } + } + ra_list = ra_list->pnext; + } + + LEAVE(); + return ret; +} + +/** + * @brief Drop tx pkts + * + * @param priv Pointer to the mlan_private driver data struct + * + * @return N/A + */ +t_void +wlan_drop_tx_pkts(pmlan_private priv) +{ + int j; + static int i; + pmlan_adapter pmadapter = priv->adapter; + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + for (j = 0; j < MAX_NUM_TID; j++, i++) { + if (i == MAX_NUM_TID) + i = 0; + if (wlan_del_tx_pkts_in_ralist + (priv, &priv->wmm.tid_tbl_ptr[i].ra_list, i)) { + i++; + break; + } + } + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + return; +} + +/** + * @brief Remove peer ralist + * + * @param priv A pointer to mlan_private + * @param mac peer mac address + * + * @return N/A + */ +t_void +wlan_wmm_delete_peer_ralist(pmlan_private priv, t_u8 *mac) +{ + raListTbl *ra_list; + int i; + pmlan_adapter pmadapter = priv->adapter; + t_u32 pkt_cnt = 0; + t_u32 tx_pkts_queued = 0; + + ENTER(); + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + for (i = 0; i < MAX_NUM_TID; ++i) { + ra_list = wlan_wmm_get_ralist_node(priv, i, mac); + if (ra_list) { + PRINTM(MINFO, "delete sta ralist %p\n", ra_list); + priv->wmm.pkts_queued[i] -= ra_list->total_pkts; + if (ra_list->tx_pause) + priv->wmm.pkts_paused[i] -= ra_list->total_pkts; + else + pkt_cnt += ra_list->total_pkts; + wlan_wmm_del_pkts_in_ralist_node(priv, ra_list); + + util_unlink_list(pmadapter->pmoal_handle, + &priv->wmm.tid_tbl_ptr[i].ra_list, + (pmlan_linked_list)ra_list, MNULL, + MNULL); + pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle, + (t_u8 *)ra_list); + if (priv->wmm.tid_tbl_ptr[i].ra_list_curr == ra_list) + priv->wmm.tid_tbl_ptr[i].ra_list_curr = + (raListTbl *)&priv->wmm.tid_tbl_ptr[i]. + ra_list; + } + } + if (pkt_cnt) { + tx_pkts_queued = util_scalar_read(pmadapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, + MNULL, MNULL); + tx_pkts_queued -= pkt_cnt; + util_scalar_write(priv->adapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, tx_pkts_queued, + MNULL, MNULL); + util_scalar_write(priv->adapter->pmoal_handle, + &priv->wmm.highest_queued_prio, HIGH_PRIO_TID, + MNULL, MNULL); + } + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + LEAVE(); +} +#endif + +#ifdef STA_SUPPORT +/** + * @brief Hold TDLS packets to tdls pending queue + * + * @param priv A pointer to mlan_private + * @param mac station mac address + * + * @return N/A + */ +t_void +wlan_hold_tdls_packets(pmlan_private priv, t_u8 *mac) +{ + pmlan_buffer pmbuf; + mlan_adapter *pmadapter = priv->adapter; + raListTbl *ra_list = MNULL; + t_u8 i; + + ENTER(); + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + PRINTM(MDATA, "wlan_hold_tdls_packets: " MACSTR "\n", MAC2STR(mac)); + for (i = 0; i < MAX_NUM_TID; ++i) { + ra_list = (raListTbl *)util_peek_list(pmadapter->pmoal_handle, + &priv->wmm.tid_tbl_ptr[i]. + ra_list, MNULL, MNULL); + if (ra_list) { + while ((pmbuf = + wlan_find_tdls_packets(priv, ra_list, mac))) { + util_unlink_list(pmadapter->pmoal_handle, + &ra_list->buf_head, + (pmlan_linked_list)pmbuf, + MNULL, MNULL); + ra_list->total_pkts--; + priv->wmm.pkts_queued[i]--; + util_scalar_decrement(pmadapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, + MNULL, MNULL); + ra_list->packet_count--; + wlan_add_buf_tdls_txqueue(priv, pmbuf); + PRINTM(MDATA, "hold tdls packet=%p\n", pmbuf); + } + } + } + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + LEAVE(); +} + +/** + * @brief move TDLS packets back to ralist + * + * @param priv A pointer to mlan_private + * @param mac TDLS peer mac address + * @param status tdlsStatus + * + * @return pmlan_buffer or MNULL + */ +t_void +wlan_restore_tdls_packets(pmlan_private priv, t_u8 *mac, tdlsStatus_e status) +{ + pmlan_buffer pmbuf; + mlan_adapter *pmadapter = priv->adapter; + raListTbl *ra_list = MNULL; + t_u32 tid; + t_u32 tid_down; + + ENTER(); + PRINTM(MDATA, "wlan_restore_tdls_packets: " MACSTR " status=%d\n", + MAC2STR(mac), status); + + pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + + while ((pmbuf = wlan_find_packets_tdls_txq(priv, mac))) { + util_unlink_list(pmadapter->pmoal_handle, + &priv->tdls_pending_txq, + (pmlan_linked_list)pmbuf, MNULL, MNULL); + tid = pmbuf->priority; + tid_down = wlan_wmm_downgrade_tid(priv, tid); + if (status == TDLS_SETUP_COMPLETE) { + ra_list = wlan_wmm_get_queue_raptr(priv, tid_down, mac); + pmbuf->flags |= MLAN_BUF_FLAG_TDLS; + } else { + ra_list = + (raListTbl *)util_peek_list(pmadapter-> + pmoal_handle, + &priv->wmm. + tid_tbl_ptr + [tid_down].ra_list, + MNULL, MNULL); + pmbuf->flags &= ~MLAN_BUF_FLAG_TDLS; + } + if (!ra_list) { + PRINTM_NETINTF(MWARN, priv); + PRINTM(MWARN, + "Drop packet %p, ra_list=%p media_connected=%d\n", + pmbuf, ra_list, priv->media_connected); + wlan_write_data_complete(pmadapter, pmbuf, + MLAN_STATUS_FAILURE); + continue; + } + PRINTM_NETINTF(MDATA, priv); + PRINTM(MDATA, + "ADD TDLS pkt %p (priority=%d) back to ra_list %p\n", + pmbuf, pmbuf->priority, ra_list); + util_enqueue_list_tail(pmadapter->pmoal_handle, + &ra_list->buf_head, + (pmlan_linked_list)pmbuf, MNULL, MNULL); + ra_list->total_pkts++; + ra_list->packet_count++; + priv->wmm.pkts_queued[tid_down]++; + util_scalar_increment(pmadapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, MNULL, MNULL); + util_scalar_conditional_write(pmadapter->pmoal_handle, + &priv->wmm.highest_queued_prio, + MLAN_SCALAR_COND_LESS_THAN, + tos_to_tid_inv[tid_down], + tos_to_tid_inv[tid_down], MNULL, + MNULL); + } + if (status != TDLS_SETUP_COMPLETE) + wlan_wmm_delete_tdls_ralist(priv, mac); + pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle, + priv->wmm.ra_list_spinlock); + LEAVE(); +} + +/** + * @brief This function prepares the command of ADDTS + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_wmm_addts_req(IN pmlan_private pmpriv, + OUT HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) +{ + mlan_ds_wmm_addts *paddts = (mlan_ds_wmm_addts *)pdata_buf; + HostCmd_DS_WMM_ADDTS_REQ *pcmd_addts = &cmd->params.add_ts; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_WMM_ADDTS_REQ); + cmd->size = wlan_cpu_to_le16(sizeof(pcmd_addts->dialog_token) + + sizeof(pcmd_addts->timeout_ms) + + sizeof(pcmd_addts->command_result) + + sizeof(pcmd_addts->ieee_status_code) + + paddts->ie_data_len + S_DS_GEN); + cmd->result = 0; + + pcmd_addts->timeout_ms = wlan_cpu_to_le32(paddts->timeout); + pcmd_addts->dialog_token = paddts->dialog_tok; + memcpy(pmpriv->adapter, + pcmd_addts->tspec_data, + paddts->ie_data, MIN(WMM_TSPEC_SIZE, paddts->ie_data_len)); + + LEAVE(); + + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of ADDTS + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_wmm_addts_req(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_wmm_cfg *pwmm = MNULL; + mlan_ds_wmm_addts *paddts = MNULL; + const HostCmd_DS_WMM_ADDTS_REQ *presp_addts = &resp->params.add_ts; + + ENTER(); + + if (pioctl_buf) { + pwmm = (mlan_ds_wmm_cfg *)pioctl_buf->pbuf; + paddts = (mlan_ds_wmm_addts *)&pwmm->param.addts; + paddts->result = presp_addts->command_result; + paddts->dialog_tok = presp_addts->dialog_token; + paddts->status_code = (t_u32)presp_addts->ieee_status_code; + + if (presp_addts->command_result == MLAN_CMD_RESULT_SUCCESS) { + /* The tspecData field is potentially variable in size + due to extra IEs that may have been in the ADDTS + response action frame. Calculate the data length + from the firmware command response. */ + paddts->ie_data_len + = (t_u8)(resp->size + - sizeof(presp_addts->command_result) + - sizeof(presp_addts->timeout_ms) + - sizeof(presp_addts->dialog_token) + - sizeof(presp_addts->ieee_status_code) + - S_DS_GEN); + + /* Copy the TSPEC data include any extra IEs after the + TSPEC */ + memcpy(pmpriv->adapter, + paddts->ie_data, + presp_addts->tspec_data, paddts->ie_data_len); + } else { + paddts->ie_data_len = 0; + } + PRINTM(MINFO, "TSPEC: ADDTS ret = %d,%d sz=%d\n", + paddts->result, paddts->status_code, + paddts->ie_data_len); + + HEXDUMP("TSPEC: ADDTS data", + paddts->ie_data, paddts->ie_data_len); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares the command of DELTS + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_wmm_delts_req(IN pmlan_private pmpriv, + OUT HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) +{ + mlan_ds_wmm_delts *pdelts = (mlan_ds_wmm_delts *)pdata_buf; + HostCmd_DS_WMM_DELTS_REQ *pcmd_delts = &cmd->params.del_ts; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_WMM_DELTS_REQ); + cmd->size = wlan_cpu_to_le16(sizeof(pcmd_delts->dialog_token) + + sizeof(pcmd_delts->command_result) + + sizeof(pcmd_delts->ieee_reason_code) + + pdelts->ie_data_len + S_DS_GEN); + cmd->result = 0; + pcmd_delts->ieee_reason_code = (t_u8)pdelts->status_code; + memcpy(pmpriv->adapter, + pcmd_delts->tspec_data, + pdelts->ie_data, MIN(WMM_TSPEC_SIZE, pdelts->ie_data_len)); + + LEAVE(); + + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of DELTS + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_wmm_delts_req(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_wmm_cfg *pwmm; + IEEEtypes_WMM_TSPEC_t *ptspec_ie; + const HostCmd_DS_WMM_DELTS_REQ *presp_delts = &resp->params.del_ts; + + ENTER(); + + if (pioctl_buf) { + pwmm = (mlan_ds_wmm_cfg *)pioctl_buf->pbuf; + pwmm->param.delts.result = presp_delts->command_result; + + PRINTM(MINFO, "TSPEC: DELTS result = %d\n", + presp_delts->command_result); + + if (presp_delts->command_result == 0) { + ptspec_ie = + (IEEEtypes_WMM_TSPEC_t *)presp_delts-> + tspec_data; + wlan_send_wmmac_host_event(pmpriv, "DELTS_TX", MNULL, + ptspec_ie->TspecBody.TSInfo. + TID, + ptspec_ie->TspecBody.TSInfo. + UserPri, + presp_delts-> + ieee_reason_code); + + } + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares the command of WMM_QUEUE_STATS + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_wmm_queue_stats(IN pmlan_private pmpriv, + OUT HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) +{ + mlan_ds_wmm_queue_stats *pqstats = (mlan_ds_wmm_queue_stats *)pdata_buf; + HostCmd_DS_WMM_QUEUE_STATS *pcmd_qstats = &cmd->params.queue_stats; + t_u8 id; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_WMM_QUEUE_STATS); + cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_WMM_QUEUE_STATS) + + S_DS_GEN); + cmd->result = 0; + + pcmd_qstats->action = pqstats->action; + pcmd_qstats->select_is_userpri = 1; + pcmd_qstats->select_bin = pqstats->user_priority; + pcmd_qstats->pkt_count = wlan_cpu_to_le16(pqstats->pkt_count); + pcmd_qstats->pkt_loss = wlan_cpu_to_le16(pqstats->pkt_loss); + pcmd_qstats->avg_queue_delay = + wlan_cpu_to_le32(pqstats->avg_queue_delay); + pcmd_qstats->avg_tx_delay = wlan_cpu_to_le32(pqstats->avg_tx_delay); + pcmd_qstats->used_time = wlan_cpu_to_le16(pqstats->used_time); + pcmd_qstats->policed_time = wlan_cpu_to_le16(pqstats->policed_time); + for (id = 0; id < MLAN_WMM_STATS_PKTS_HIST_BINS; id++) { + pcmd_qstats->delay_histogram[id] = + wlan_cpu_to_le16(pqstats->delay_histogram[id]); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of WMM_QUEUE_STATS + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_wmm_queue_stats(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_wmm_cfg *pwmm = MNULL; + mlan_ds_wmm_queue_stats *pqstats = MNULL; + const HostCmd_DS_WMM_QUEUE_STATS *presp_qstats = + &resp->params.queue_stats; + t_u8 id; + + ENTER(); + + if (pioctl_buf) { + pwmm = (mlan_ds_wmm_cfg *)pioctl_buf->pbuf; + pqstats = (mlan_ds_wmm_queue_stats *)&pwmm->param.q_stats; + + pqstats->action = presp_qstats->action; + pqstats->user_priority = presp_qstats->select_bin; + pqstats->pkt_count = wlan_le16_to_cpu(presp_qstats->pkt_count); + pqstats->pkt_loss = wlan_le16_to_cpu(presp_qstats->pkt_loss); + pqstats->avg_queue_delay + = wlan_le32_to_cpu(presp_qstats->avg_queue_delay); + pqstats->avg_tx_delay + = wlan_le32_to_cpu(presp_qstats->avg_tx_delay); + pqstats->used_time = wlan_le16_to_cpu(presp_qstats->used_time); + pqstats->policed_time + = wlan_le16_to_cpu(presp_qstats->policed_time); + for (id = 0; id < MLAN_WMM_STATS_PKTS_HIST_BINS; id++) { + pqstats->delay_histogram[id] + = wlan_le16_to_cpu(presp_qstats-> + delay_histogram[id]); + } + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prepares the command of WMM_TS_STATUS + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_wmm_ts_status(IN pmlan_private pmpriv, + OUT HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) +{ + mlan_ds_wmm_ts_status *pts_status = (mlan_ds_wmm_ts_status *)pdata_buf; + HostCmd_DS_WMM_TS_STATUS *pcmd_ts_status = &cmd->params.ts_status; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_WMM_TS_STATUS); + cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_WMM_TS_STATUS) + + S_DS_GEN); + cmd->result = 0; + + memcpy(pmpriv->adapter, (t_void *)pcmd_ts_status, (t_void *)pts_status, + sizeof(HostCmd_DS_WMM_TS_STATUS)); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of WMM_TS_STATUS + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_wmm_ts_status(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_wmm_cfg *pwmm = MNULL; + HostCmd_DS_WMM_TS_STATUS *presp_ts_status = &resp->params.ts_status; + + ENTER(); + + if (pioctl_buf) { + pwmm = (mlan_ds_wmm_cfg *)pioctl_buf->pbuf; + presp_ts_status->medium_time + = wlan_le16_to_cpu(presp_ts_status->medium_time); + memcpy(pmpriv->adapter, + (t_void *)&pwmm->param.ts_status, + (t_void *)presp_ts_status, + sizeof(mlan_ds_wmm_ts_status)); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Set/Get WMM status + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_wmm_ioctl_enable(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_wmm_cfg *wmm = MNULL; + ENTER(); + wmm = (mlan_ds_wmm_cfg *)pioctl_req->pbuf; + if (pioctl_req->action == MLAN_ACT_GET) + wmm->param.wmm_enable = (t_u32)pmpriv->wmm_required; + else + pmpriv->wmm_required = (t_u8)wmm->param.wmm_enable; + pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE; + LEAVE(); + return ret; +} + +/** + * @brief Set/Get WMM QoS configuration + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_wmm_ioctl_qos(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_wmm_cfg *wmm = MNULL; + + ENTER(); + + wmm = (mlan_ds_wmm_cfg *)pioctl_req->pbuf; + + if (pioctl_req->action == MLAN_ACT_GET) + wmm->param.qos_cfg = pmpriv->wmm_qosinfo; + else { + pmpriv->wmm_qosinfo = wmm->param.qos_cfg; + pmpriv->saved_wmm_qosinfo = wmm->param.qos_cfg; + } + + pioctl_req->data_read_written = sizeof(t_u8) + MLAN_SUB_COMMAND_SIZE; + + LEAVE(); + return ret; +} + +/** + * @brief Request for add a TSPEC + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_wmm_ioctl_addts_req(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_wmm_cfg *cfg = MNULL; + + ENTER(); + cfg = (mlan_ds_wmm_cfg *)pioctl_req->pbuf; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_WMM_ADDTS_REQ, + 0, 0, (t_void *)pioctl_req, + (t_void *)&cfg->param.addts); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Request for delete a TSPEC + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_wmm_ioctl_delts_req(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_wmm_cfg *cfg = MNULL; + + ENTER(); + cfg = (mlan_ds_wmm_cfg *)pioctl_req->pbuf; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_WMM_DELTS_REQ, + 0, 0, (t_void *)pioctl_req, + (t_void *)&cfg->param.delts); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief To get and start/stop queue stats on a WMM AC + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_wmm_ioctl_queue_stats(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_wmm_cfg *cfg = MNULL; + + ENTER(); + cfg = (mlan_ds_wmm_cfg *)pioctl_req->pbuf; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_WMM_QUEUE_STATS, + 0, 0, (t_void *)pioctl_req, + (t_void *)&cfg->param.q_stats); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief Get the status of the WMM AC queues + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success + */ +static mlan_status +wlan_wmm_ioctl_queue_status(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_wmm_cfg *cfg = MNULL; + mlan_ds_wmm_queue_status *pqstatus = MNULL; + WmmAcStatus_t *pac_status = MNULL; + mlan_wmm_ac_e ac_idx; + + ENTER(); + + cfg = (mlan_ds_wmm_cfg *)pioctl_req->pbuf; + pqstatus = (mlan_ds_wmm_queue_status *)&cfg->param.q_status; + + for (ac_idx = WMM_AC_BK; ac_idx <= WMM_AC_VO; ac_idx++) { + pac_status = &pmpriv->wmm.ac_status[ac_idx]; + + /* Firmware status */ + pqstatus->ac_status[ac_idx].flow_required = + pac_status->flow_required; + pqstatus->ac_status[ac_idx].flow_created = + pac_status->flow_created; + pqstatus->ac_status[ac_idx].disabled = pac_status->disabled; + + /* ACM bit reflected in firmware status (redundant) */ + pqstatus->ac_status[ac_idx].wmm_acm = pac_status->flow_required; + } + + LEAVE(); + return ret; +} + +/** + * @brief Get the status of the WMM Traffic Streams + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_wmm_ioctl_ts_status(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_wmm_cfg *cfg = MNULL; + + ENTER(); + + cfg = (mlan_ds_wmm_cfg *)pioctl_req->pbuf; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_WMM_TS_STATUS, + 0, 0, (t_void *)pioctl_req, + (t_void *)&cfg->param.ts_status); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} +#endif /* STA_SUPPORT */ + +/** + * @brief This function prepares the command of WMM_QUEUE_CONFIG + * + * @param pmpriv A pointer to mlan_private structure + * @param cmd A pointer to HostCmd_DS_COMMAND structure + * @param pdata_buf A pointer to data buffer + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_cmd_wmm_queue_config(IN pmlan_private pmpriv, + OUT HostCmd_DS_COMMAND *cmd, IN t_void *pdata_buf) +{ + mlan_ds_wmm_queue_config *pqcfg = (mlan_ds_wmm_queue_config *)pdata_buf; + HostCmd_DS_WMM_QUEUE_CONFIG *pcmd_qcfg = &cmd->params.queue_config; + + ENTER(); + + cmd->command = wlan_cpu_to_le16(HostCmd_CMD_WMM_QUEUE_CONFIG); + cmd->size = wlan_cpu_to_le16(sizeof(pcmd_qcfg->action) + + sizeof(pcmd_qcfg->access_category) + + sizeof(pcmd_qcfg->msdu_lifetime_expiry) + + S_DS_GEN); + cmd->result = 0; + + pcmd_qcfg->action = pqcfg->action; + pcmd_qcfg->access_category = pqcfg->access_category; + pcmd_qcfg->msdu_lifetime_expiry = + wlan_cpu_to_le16(pqcfg->msdu_lifetime_expiry); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function handles the command response of WMM_QUEUE_CONFIG + * + * @param pmpriv A pointer to mlan_private structure + * @param resp A pointer to HostCmd_DS_COMMAND + * @param pioctl_buf A pointer to mlan_ioctl_req structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +wlan_ret_wmm_queue_config(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf) +{ + mlan_ds_wmm_cfg *pwmm = MNULL; + const HostCmd_DS_WMM_QUEUE_CONFIG *presp_qcfg = + &resp->params.queue_config; + + ENTER(); + + if (pioctl_buf) { + pwmm = (mlan_ds_wmm_cfg *)pioctl_buf->pbuf; + pwmm->param.q_cfg.action = presp_qcfg->action; + pwmm->param.q_cfg.access_category = presp_qcfg->access_category; + pwmm->param.q_cfg.msdu_lifetime_expiry = + wlan_le16_to_cpu(presp_qcfg->msdu_lifetime_expiry); + } + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Set/Get a specified AC Queue's parameters + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_PENDING --success, otherwise fail + */ +static mlan_status +wlan_wmm_ioctl_queue_config(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index]; + mlan_ds_wmm_cfg *cfg = MNULL; + + ENTER(); + cfg = (mlan_ds_wmm_cfg *)pioctl_req->pbuf; + + /* Send request to firmware */ + ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_WMM_QUEUE_CONFIG, + 0, 0, (t_void *)pioctl_req, + (t_void *)&cfg->param.q_cfg); + + if (ret == MLAN_STATUS_SUCCESS) + ret = MLAN_STATUS_PENDING; + + LEAVE(); + return ret; +} + +/** + * @brief WMM configuration handler + * + * @param pmadapter A pointer to mlan_adapter structure + * @param pioctl_req A pointer to ioctl request buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +mlan_status +wlan_wmm_cfg_ioctl(IN pmlan_adapter pmadapter, IN pmlan_ioctl_req pioctl_req) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + mlan_ds_wmm_cfg *wmm = MNULL; + + ENTER(); + + if (pioctl_req->buf_len < sizeof(mlan_ds_wmm_cfg)) { + PRINTM(MWARN, "MLAN bss IOCTL length is too short.\n"); + pioctl_req->data_read_written = 0; + pioctl_req->buf_len_needed = sizeof(mlan_ds_wmm_cfg); + pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER; + LEAVE(); + return MLAN_STATUS_RESOURCE; + } + wmm = (mlan_ds_wmm_cfg *)pioctl_req->pbuf; + switch (wmm->sub_command) { +#ifdef STA_SUPPORT + case MLAN_OID_WMM_CFG_ENABLE: + status = wlan_wmm_ioctl_enable(pmadapter, pioctl_req); + break; + case MLAN_OID_WMM_CFG_QOS: + status = wlan_wmm_ioctl_qos(pmadapter, pioctl_req); + break; + case MLAN_OID_WMM_CFG_ADDTS: + status = wlan_wmm_ioctl_addts_req(pmadapter, pioctl_req); + break; + case MLAN_OID_WMM_CFG_DELTS: + status = wlan_wmm_ioctl_delts_req(pmadapter, pioctl_req); + break; + case MLAN_OID_WMM_CFG_QUEUE_STATS: + status = wlan_wmm_ioctl_queue_stats(pmadapter, pioctl_req); + break; + case MLAN_OID_WMM_CFG_QUEUE_STATUS: + status = wlan_wmm_ioctl_queue_status(pmadapter, pioctl_req); + break; + case MLAN_OID_WMM_CFG_TS_STATUS: + status = wlan_wmm_ioctl_ts_status(pmadapter, pioctl_req); + break; +#endif + case MLAN_OID_WMM_CFG_QUEUE_CONFIG: + status = wlan_wmm_ioctl_queue_config(pmadapter, pioctl_req); + break; + default: + pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; + status = MLAN_STATUS_FAILURE; + break; + } + LEAVE(); + return status; +} + +/** + * @brief Get ralist info + * + * @param priv A pointer to mlan_private structure + * @param buf A pointer to ralist_info structure + * @return number of ralist entry + * + */ +int +wlan_get_ralist_info(mlan_private *priv, ralist_info *buf) +{ + ralist_info *plist = buf; + mlan_list_head *ra_list_head = MNULL; + raListTbl *ra_list; + int i; + int count = 0; + for (i = 0; i < MAX_NUM_TID; i++) { + ra_list_head = &priv->wmm.tid_tbl_ptr[i].ra_list; + ra_list = + (raListTbl *)util_peek_list(priv->adapter->pmoal_handle, + ra_list_head, MNULL, MNULL); + while (ra_list && ra_list != (raListTbl *)ra_list_head) { + if (ra_list->total_pkts) { + plist->total_pkts = ra_list->total_pkts; + plist->tid = i; + plist->tx_pause = ra_list->tx_pause; + memcpy(priv->adapter, plist->ra, ra_list->ra, + MLAN_MAC_ADDR_LENGTH); + plist++; + count++; + if (count >= MLAN_MAX_RALIST_NUM) + break; + } + ra_list = ra_list->pnext; + } + } + LEAVE(); + return count; +} + +/** + * @brief dump ralist info + * + * @param priv A pointer to mlan_private structure + * + * @return N/A + * + */ +void +wlan_dump_ralist(mlan_private *priv) +{ + mlan_list_head *ra_list_head = MNULL; + raListTbl *ra_list; + mlan_adapter *pmadapter = priv->adapter; + int i; + t_u32 tx_pkts_queued; + + tx_pkts_queued = + util_scalar_read(pmadapter->pmoal_handle, + &priv->wmm.tx_pkts_queued, MNULL, MNULL); + PRINTM(MERROR, "bss_index = %d, tx_pkts_queued = %d\n", priv->bss_index, + tx_pkts_queued); + if (!tx_pkts_queued) + return; + for (i = 0; i < MAX_NUM_TID; i++) { + ra_list_head = &priv->wmm.tid_tbl_ptr[i].ra_list; + ra_list = + (raListTbl *)util_peek_list(priv->adapter->pmoal_handle, + ra_list_head, MNULL, MNULL); + while (ra_list && ra_list != (raListTbl *)ra_list_head) { + if (ra_list->total_pkts) { + PRINTM(MERROR, + "ralist ra: %02x:%02x:%02x:%02x:%02x:%02x tid=%d pkts=%d pause=%d\n", + ra_list->ra[0], ra_list->ra[1], + ra_list->ra[2], ra_list->ra[3], + ra_list->ra[4], ra_list->ra[5], i, + ra_list->total_pkts, ra_list->tx_pause); + } + ra_list = ra_list->pnext; + } + } + return; +} + +/** + * @brief get tid down + * + * @param priv A pointer to mlan_private structure + * @param tid tid + * + * @return tid_down + * + */ +int +wlan_get_wmm_tid_down(mlan_private *priv, int tid) +{ + return wlan_wmm_downgrade_tid(priv, tid); +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_wmm.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_wmm.h new file mode 100644 index 00000000..acac29fa --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlan/mlan_wmm.h @@ -0,0 +1,187 @@ +/** @file mlan_wmm.h + * + * @brief This file contains related macros, enum, and struct + * of wmm functionalities + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/**************************************************** +Change log: + 10/24/2008: initial version +****************************************************/ + +#ifndef _MLAN_WMM_H_ +#define _MLAN_WMM_H_ + +/** + * @brief This function gets the TID + * + * @param pmadapter A pointer to mlan_adapter structure + * @param ptr A pointer to RA list table + * + * @return TID + */ +static INLINE int +wlan_get_tid(pmlan_adapter pmadapter, raListTbl *ptr) +{ + pmlan_buffer mbuf; + + ENTER(); + mbuf = (pmlan_buffer)util_peek_list(pmadapter->pmoal_handle, + &ptr->buf_head, MNULL, MNULL); + LEAVE(); + + return mbuf->priority; +} + +/** + * @brief This function gets the length of a list + * + * @param pmadapter A pointer to mlan_adapter structure + * @param head A pointer to mlan_list_head + * + * @return Length of list + */ +static INLINE int +wlan_wmm_list_len(pmlan_adapter pmadapter, pmlan_list_head head) +{ + pmlan_linked_list pos; + int count = 0; + + ENTER(); + + pos = head->pnext; + + while (pos != (pmlan_linked_list)head) { + ++count; + pos = pos->pnext; + } + + LEAVE(); + return count; +} + +/** Add buffer to WMM Tx queue */ +void wlan_wmm_add_buf_txqueue(pmlan_adapter pmadapter, pmlan_buffer pmbuf); +/** Add to RA list */ +void wlan_ralist_add(mlan_private *priv, t_u8 *ra); +/** Update the RA list */ +int wlan_ralist_update(mlan_private *priv, t_u8 *old_ra, t_u8 *new_ra); + +/** WMM status change command handler */ +mlan_status wlan_cmd_wmm_status_change(pmlan_private priv); +/** Check if WMM lists are empty */ +int wlan_wmm_lists_empty(pmlan_adapter pmadapter); +/** Process WMM transmission */ +t_void wlan_wmm_process_tx(pmlan_adapter pmadapter); +/** Test to see if the ralist ptr is valid */ +int wlan_is_ralist_valid(mlan_private *priv, raListTbl *ra_list, int tid); + +raListTbl *wlan_wmm_get_ralist_node(pmlan_private priv, t_u8 tid, + t_u8 *ra_addr); +t_u8 wlan_get_random_ba_threshold(pmlan_adapter pmadapter); + +/** Compute driver packet delay */ +t_u8 wlan_wmm_compute_driver_packet_delay(pmlan_private priv, + const pmlan_buffer pmbuf); +/** Initialize WMM */ +t_void wlan_wmm_init(pmlan_adapter pmadapter); +/** Setup WMM queues */ +extern void wlan_wmm_setup_queues(pmlan_private priv); +/* Setup default queues */ +void wlan_wmm_default_queue_priorities(pmlan_private priv); + +#ifdef STA_SUPPORT +/** Process WMM association request */ +extern t_u32 wlan_wmm_process_association_req(pmlan_private priv, + t_u8 **ppAssocBuf, + IEEEtypes_WmmParameter_t *pWmmIE, + IEEEtypes_HTCap_t *pHTCap); +#endif /* STA_SUPPORT */ + +/** setup wmm queue priorities */ +void wlan_wmm_setup_queue_priorities(pmlan_private priv, + IEEEtypes_WmmParameter_t *wmm_ie); + +/* Get tid_down from tid */ +int wlan_get_wmm_tid_down(mlan_private *priv, int tid); +/** Downgrade WMM priority queue */ +void wlan_wmm_setup_ac_downgrade(pmlan_private priv); +/** select WMM queue */ +t_u8 wlan_wmm_select_queue(mlan_private *pmpriv, t_u8 tid); +#ifdef UAP_SUPPORT +t_void wlan_wmm_delete_peer_ralist(pmlan_private priv, t_u8 *mac); +#endif + +#ifdef STA_SUPPORT +/* + * Functions used in the cmd handling routine + */ +/** WMM ADDTS request command handler */ +extern mlan_status wlan_cmd_wmm_addts_req(IN pmlan_private pmpriv, + OUT HostCmd_DS_COMMAND *cmd, + IN t_void *pdata_buf); +/** WMM DELTS request command handler */ +extern mlan_status wlan_cmd_wmm_delts_req(IN pmlan_private pmpriv, + OUT HostCmd_DS_COMMAND *cmd, + IN t_void *pdata_buf); +/** WMM QUEUE_STATS command handler */ +extern mlan_status wlan_cmd_wmm_queue_stats(IN pmlan_private pmpriv, + OUT HostCmd_DS_COMMAND *cmd, + IN t_void *pdata_buf); +/** WMM TS_STATUS command handler */ +extern mlan_status wlan_cmd_wmm_ts_status(IN pmlan_private pmpriv, + OUT HostCmd_DS_COMMAND *cmd, + IN t_void *pdata_buf); + +/* + * Functions used in the cmdresp handling routine + */ +/** WMM get status command response handler */ +extern mlan_status wlan_ret_wmm_get_status(IN pmlan_private priv, + IN t_u8 *ptlv, IN int resp_len); +/** WMM ADDTS request command response handler */ +extern mlan_status wlan_ret_wmm_addts_req(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf); +/** WMM DELTS request command response handler */ +extern mlan_status wlan_ret_wmm_delts_req(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf); +/** WMM QUEUE_STATS command response handler */ +extern mlan_status wlan_ret_wmm_queue_stats(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf); +/** WMM TS_STATUS command response handler */ +extern mlan_status wlan_ret_wmm_ts_status(IN pmlan_private pmpriv, + IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf); +#endif /* STA_SUPPORT */ + +/** WMM QUEUE_CONFIG command handler */ +extern mlan_status wlan_cmd_wmm_queue_config(IN pmlan_private pmpriv, + OUT HostCmd_DS_COMMAND *cmd, + IN t_void *pdata_buf); + +/** WMM QUEUE_CONFIG command response handler */ +extern mlan_status wlan_ret_wmm_queue_config(IN pmlan_private pmpriv, + const IN HostCmd_DS_COMMAND *resp, + OUT mlan_ioctl_req *pioctl_buf); + +mlan_status wlan_wmm_cfg_ioctl(IN pmlan_adapter pmadapter, + IN pmlan_ioctl_req pioctl_req); +#endif /* !_MLAN_WMM_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/mlan.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/mlan.h new file mode 100644 index 00000000..effba0d0 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/mlan.h @@ -0,0 +1,35 @@ +/** @file mlan.h + * + * @brief This file declares all APIs that will be called from MOAL module. + * It also defines the data structures used for APIs between MLAN and MOAL. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 10/13/2008: initial version + 11/07/2008: split mlan.h into mlan_decl.h & mlan_ioctl.h +******************************************************/ + +#ifndef _MLAN_H_ +#define _MLAN_H_ + +#include "mlan_decl.h" +#include "mlan_ioctl.h" +#include "mlan_ieee.h" + +#endif /* !_MLAN_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/mlan_decl.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/mlan_decl.h new file mode 100644 index 00000000..fa2eb3c5 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/mlan_decl.h @@ -0,0 +1,1230 @@ +/** @file mlan_decl.h + * + * @brief This file declares the generic data structures and APIs. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 11/07/2008: initial version +******************************************************/ + +#ifndef _MLAN_DECL_H_ +#define _MLAN_DECL_H_ + +/** MLAN release version */ +#define MLAN_RELEASE_VERSION "C098.p1.r1" + +/** Re-define generic data types for MLAN/MOAL */ +/** Signed char (1-byte) */ +typedef signed char t_s8; +/** Unsigned char (1-byte) */ +typedef unsigned char t_u8; +/** Signed short (2-bytes) */ +typedef short t_s16; +/** Unsigned short (2-bytes) */ +typedef unsigned short t_u16; +/** Signed long (4-bytes) */ +typedef int t_s32; +/** Unsigned long (4-bytes) */ +typedef unsigned int t_u32; +/** Signed long long 8-bytes) */ +typedef long long t_s64; +/** Unsigned long long 8-bytes) */ +typedef unsigned long long t_u64; +/** Void pointer (4-bytes) */ +typedef void t_void; +/** Size type */ +typedef t_u32 t_size; +/** Boolean type */ +typedef t_u8 t_bool; + +#ifdef MLAN_64BIT +/** Pointer type (64-bit) */ +typedef t_u64 t_ptr; +/** Signed value (64-bit) */ +typedef t_s64 t_sval; +#else +/** Pointer type (32-bit) */ +typedef t_u32 t_ptr; +/** Signed value (32-bit) */ +typedef t_s32 t_sval; +#endif + +/** Constants below */ + +#ifdef __GNUC__ +/** Structure packing begins */ +#define MLAN_PACK_START +/** Structure packeing end */ +#define MLAN_PACK_END __attribute__((packed)) +#else /* !__GNUC__ */ +#ifdef PRAGMA_PACK +/** Structure packing begins */ +#define MLAN_PACK_START +/** Structure packeing end */ +#define MLAN_PACK_END +#else /* !PRAGMA_PACK */ +/** Structure packing begins */ +#define MLAN_PACK_START __packed +/** Structure packing end */ +#define MLAN_PACK_END +#endif /* PRAGMA_PACK */ +#endif /* __GNUC__ */ + +#ifndef INLINE +#ifdef __GNUC__ +/** inline directive */ +#define INLINE inline +#else +/** inline directive */ +#define INLINE __inline +#endif +#endif + +/** MLAN TRUE */ +#define MTRUE (1) +/** MLAN FALSE */ +#define MFALSE (0) + +#ifndef MACSTR +/** MAC address security format */ +#define MACSTR "%02x:XX:XX:XX:%02x:%02x" +#endif + +#ifndef MAC2STR +/** MAC address security print arguments */ +#define MAC2STR(a) (a)[0], (a)[4], (a)[5] +#endif + +/** Macros for Data Alignment : size */ +#define ALIGN_SZ(p, a) \ + (((p) + ((a) - 1)) & ~((a) - 1)) + +/** Macros for Data Alignment : address */ +#define ALIGN_ADDR(p, a) \ + ((((t_ptr)(p)) + (((t_ptr)(a)) - 1)) & ~(((t_ptr)(a)) - 1)) + +/** Return the byte offset of a field in the given structure */ +#define MLAN_FIELD_OFFSET(type, field) ((t_u32)(t_ptr)&(((type *)0)->field)) +/** Return aligned offset */ +#define OFFSET_ALIGN_ADDR(p, a) (t_u32)(ALIGN_ADDR(p, a) - (t_ptr)p) + +/** Maximum BSS numbers */ +#define MLAN_MAX_BSS_NUM (16) + +/** NET IP alignment */ +#define MLAN_NET_IP_ALIGN 0 + +/** DMA alignment */ +/* SDIO3.0 Inrevium Adapter require 32 bit DMA alignment */ +#define DMA_ALIGNMENT 32 + +/** max size of TxPD */ +#define MAX_TXPD_SIZE 32 + +/** Minimum data header length */ +#define MLAN_MIN_DATA_HEADER_LEN (DMA_ALIGNMENT+MAX_TXPD_SIZE) + +/** rx data header length */ +#define MLAN_RX_HEADER_LEN MLAN_MIN_DATA_HEADER_LEN + +/** This is current limit on Maximum Tx AMPDU allowed */ +#define MLAN_MAX_TX_BASTREAM_SUPPORTED 16 +#define MLAN_MAX_TX_BASTREAM_DEFAULT 2 +#define MLAN_MAX_TX_BASTREAM_SUPPORTED_NOV15 2 +/** This is current limit on Maximum Rx AMPDU allowed */ +#define MLAN_MAX_RX_BASTREAM_SUPPORTED 16 + +/** station ampdu tx win size */ +#define MLAN_STA_AMPDU_DEF_TXWINSIZE_NOV15 32 +/** uap ampdu tx win size */ +#define MLAN_UAP_AMPDU_DEF_TXWINSIZE_NOV15 32 +/** uap ampdu rx win size */ +#define MLAN_UAP_AMPDU_DEF_RXWINSIZE_NOV15 32 +/** wfd ampdu tx/rx win size */ +#define MLAN_WFD_AMPDU_DEF_TXRXWINSIZE_NOV15 32 + +#ifdef STA_SUPPORT +/** Default Win size attached during ADDBA request */ +#define MLAN_STA_AMPDU_DEF_TXWINSIZE 64 +/** Default Win size attached during ADDBA response */ +#define MLAN_STA_AMPDU_DEF_RXWINSIZE 64 +/** RX winsize for COEX */ +#define MLAN_STA_COEX_AMPDU_DEF_RXWINSIZE 16 +#endif /* STA_SUPPORT */ +#ifdef UAP_SUPPORT +/** Default Win size attached during ADDBA request */ +#define MLAN_UAP_AMPDU_DEF_TXWINSIZE 48 +/** Default Win size attached during ADDBA response */ +#define MLAN_UAP_AMPDU_DEF_RXWINSIZE 32 +/** RX winsize for COEX */ +#define MLAN_UAP_COEX_AMPDU_DEF_RXWINSIZE 16 +#endif /* UAP_SUPPORT */ + +#ifdef WIFI_DIRECT_SUPPORT +/** WFD use the same window size for tx/rx */ +#define MLAN_WFD_AMPDU_DEF_TXRXWINSIZE 64 +/** RX winsize for COEX */ +#define MLAN_WFD_COEX_AMPDU_DEF_RXWINSIZE 16 +#endif +/** Block ack timeout value */ +#define MLAN_DEFAULT_BLOCK_ACK_TIMEOUT 0xffff +/** Maximum Tx Win size configured for ADDBA request [10 bits] */ +#define MLAN_AMPDU_MAX_TXWINSIZE 0x3ff +/** Maximum Rx Win size configured for ADDBA request [10 bits] */ +#define MLAN_AMPDU_MAX_RXWINSIZE 0x3ff + +/** Rate index for HR/DSSS 0 */ +#define MLAN_RATE_INDEX_HRDSSS0 0 +/** Rate index for HR/DSSS 3 */ +#define MLAN_RATE_INDEX_HRDSSS3 3 +/** Rate index for OFDM 0 */ +#define MLAN_RATE_INDEX_OFDM0 4 +/** Rate index for OFDM 7 */ +#define MLAN_RATE_INDEX_OFDM7 11 +/** Rate index for MCS 0 */ +#define MLAN_RATE_INDEX_MCS0 0 +/** Rate index for MCS 7 */ +#define MLAN_RATE_INDEX_MCS7 7 +/** Rate index for MCS 9 */ +#define MLAN_RATE_INDEX_MCS9 9 +/** Rate index for MCS15 */ +#define MLAN_RATE_INDEX_MCS15 15 +/** Rate index for MCS 32 */ +#define MLAN_RATE_INDEX_MCS32 32 +/** Rate index for MCS 127 */ +#define MLAN_RATE_INDEX_MCS127 127 +#define MLAN_RATE_NSS1 1 +#define MLAN_RATE_NSS2 2 + +/** Rate bitmap for OFDM 0 */ +#define MLAN_RATE_BITMAP_OFDM0 16 +/** Rate bitmap for OFDM 7 */ +#define MLAN_RATE_BITMAP_OFDM7 23 +/** Rate bitmap for MCS 0 */ +#define MLAN_RATE_BITMAP_MCS0 32 +/** Rate bitmap for MCS 127 */ +#define MLAN_RATE_BITMAP_MCS127 159 +#define MLAN_RATE_BITMAP_NSS1_MCS0 160 +#define MLAN_RATE_BITMAP_NSS1_MCS9 169 +#define MLAN_RATE_BITMAP_NSS2_MCS0 176 +#define MLAN_RATE_BITMAP_NSS2_MCS9 185 + +/** Size of rx data buffer */ +#define MLAN_RX_DATA_BUF_SIZE (4 * 1024) +/** Size of rx command buffer */ +#define MLAN_RX_CMD_BUF_SIZE (2 * 1024) + +#define MLAN_USB_RX_DATA_BUF_SIZE MLAN_RX_DATA_BUF_SIZE + +/** MLAN MAC Address Length */ +#define MLAN_MAC_ADDR_LENGTH (6) +/** MLAN 802.11 MAC Address */ +typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH]; + +/** MLAN Maximum SSID Length */ +#define MLAN_MAX_SSID_LENGTH (32) + +/** RTS/FRAG related defines */ +/** Minimum RTS value */ +#define MLAN_RTS_MIN_VALUE (0) +/** Maximum RTS value */ +#define MLAN_RTS_MAX_VALUE (2347) +/** Minimum FRAG value */ +#define MLAN_FRAG_MIN_VALUE (256) +/** Maximum FRAG value */ +#define MLAN_FRAG_MAX_VALUE (2346) + +/** Minimum tx retry count */ +#define MLAN_TX_RETRY_MIN (0) +/** Maximum tx retry count */ +#define MLAN_TX_RETRY_MAX (14) + +/** define SDIO block size for data Tx/Rx */ +/* We support up to 480-byte block size due to FW buffer limitation. */ +#define MLAN_SDIO_BLOCK_SIZE 256 + +/** define SDIO block size for firmware download */ +#define MLAN_SDIO_BLOCK_SIZE_FW_DNLD MLAN_SDIO_BLOCK_SIZE + +/** define allocated buffer size */ +#define ALLOC_BUF_SIZE (4 * 1024) +/** SDIO MP aggr pkt limit */ +#define SDIO_MP_AGGR_DEF_PKT_LIMIT (16) +/** SDIO MP aggr pkt limit 8 */ +#define SDIO_MP_AGGR_DEF_PKT_LIMIT_8 (8) +/** SDIO MP aggr pkt limit 16*/ +#define SDIO_MP_AGGR_DEF_PKT_LIMIT_16 (16) +/** max SDIO MP aggr pkt limit */ +#define SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX (16) + +/** SDIO IO Port mask */ +#define MLAN_SDIO_IO_PORT_MASK 0xfffff +/** SDIO Block/Byte mode mask */ +#define MLAN_SDIO_BYTE_MODE_MASK 0x80000000 + +/** Max retry number of IO write */ +#define MAX_WRITE_IOMEM_RETRY 2 + +/** IN parameter */ +#define IN +/** OUT parameter */ +#define OUT + +/** BIT value */ +#define MBIT(x) (((t_u32)1) << (x)) + +/** Buffer flag for requeued packet */ +#define MLAN_BUF_FLAG_REQUEUED_PKT MBIT(0) +/** Buffer flag for transmit buf from moal */ +#define MLAN_BUF_FLAG_MOAL_TX_BUF MBIT(1) +/** Buffer flag for malloc mlan_buffer */ +#define MLAN_BUF_FLAG_MALLOC_BUF MBIT(2) + +/** Buffer flag for bridge packet */ +#define MLAN_BUF_FLAG_BRIDGE_BUF MBIT(3) + +/** Buffer flag for TDLS */ +#define MLAN_BUF_FLAG_TDLS MBIT(8) + +/** Buffer flag for TCP_ACK */ +#define MLAN_BUF_FLAG_TCP_ACK MBIT(9) + +/** Buffer flag for TX_STATUS */ +#define MLAN_BUF_FLAG_TX_STATUS MBIT(10) + +#ifdef DEBUG_LEVEL1 +/** Debug level bit definition */ +#define MMSG MBIT(0) +#define MFATAL MBIT(1) +#define MERROR MBIT(2) +#define MDATA MBIT(3) +#define MCMND MBIT(4) +#define MEVENT MBIT(5) +#define MINTR MBIT(6) +#define MIOCTL MBIT(7) + +#define MMPA_D MBIT(15) +#define MDAT_D MBIT(16) +#define MCMD_D MBIT(17) +#define MEVT_D MBIT(18) +#define MFW_D MBIT(19) +#define MIF_D MBIT(20) + +#define MENTRY MBIT(28) +#define MWARN MBIT(29) +#define MINFO MBIT(30) +#define MHEX_DUMP MBIT(31) +#endif /* DEBUG_LEVEL1 */ + +/** Memory allocation type: DMA */ +#define MLAN_MEM_DMA MBIT(0) + +/** Default memory allocation flag */ +#define MLAN_MEM_DEF 0 + +/** mlan_status */ +typedef enum _mlan_status { + MLAN_STATUS_FAILURE = 0xffffffff, + MLAN_STATUS_SUCCESS = 0, + MLAN_STATUS_PENDING, + MLAN_STATUS_RESOURCE, + MLAN_STATUS_COMPLETE, +} mlan_status; + +/** mlan_error_code */ +typedef enum _mlan_error_code { + /** No error */ + MLAN_ERROR_NO_ERROR = 0, + /** Firmware/device errors below (MSB=0) */ + MLAN_ERROR_FW_NOT_READY = 0x00000001, + MLAN_ERROR_FW_BUSY = 0x00000002, + MLAN_ERROR_FW_CMDRESP = 0x00000003, + MLAN_ERROR_DATA_TX_FAIL = 0x00000004, + MLAN_ERROR_DATA_RX_FAIL = 0x00000005, + /** Driver errors below (MSB=1) */ + MLAN_ERROR_PKT_SIZE_INVALID = 0x80000001, + MLAN_ERROR_PKT_TIMEOUT = 0x80000002, + MLAN_ERROR_PKT_INVALID = 0x80000003, + MLAN_ERROR_CMD_INVALID = 0x80000004, + MLAN_ERROR_CMD_TIMEOUT = 0x80000005, + MLAN_ERROR_CMD_DNLD_FAIL = 0x80000006, + MLAN_ERROR_CMD_CANCEL = 0x80000007, + MLAN_ERROR_CMD_RESP_FAIL = 0x80000008, + MLAN_ERROR_CMD_ASSOC_FAIL = 0x80000009, + MLAN_ERROR_CMD_SCAN_FAIL = 0x8000000A, + MLAN_ERROR_IOCTL_INVALID = 0x8000000B, + MLAN_ERROR_IOCTL_FAIL = 0x8000000C, + MLAN_ERROR_EVENT_UNKNOWN = 0x8000000D, + MLAN_ERROR_INVALID_PARAMETER = 0x8000000E, + MLAN_ERROR_NO_MEM = 0x8000000F, + /** More to add */ +} mlan_error_code; + +/** mlan_buf_type */ +typedef enum _mlan_buf_type { + MLAN_BUF_TYPE_CMD = 1, + MLAN_BUF_TYPE_DATA, + MLAN_BUF_TYPE_EVENT, + MLAN_BUF_TYPE_RAW_DATA, +} mlan_buf_type; + +/** MLAN BSS type */ +typedef enum _mlan_bss_type { + MLAN_BSS_TYPE_STA = 0, + MLAN_BSS_TYPE_UAP = 1, +#ifdef WIFI_DIRECT_SUPPORT + MLAN_BSS_TYPE_WIFIDIRECT = 2, +#endif + MLAN_BSS_TYPE_ANY = 0xff, +} mlan_bss_type; + +/** MLAN BSS role */ +typedef enum _mlan_bss_role { + MLAN_BSS_ROLE_STA = 0, + MLAN_BSS_ROLE_UAP = 1, + MLAN_BSS_ROLE_ANY = 0xff, +} mlan_bss_role; + +/** BSS role bit mask */ +#define BSS_ROLE_BIT_MASK MBIT(0) + +/** Get BSS role */ +#define GET_BSS_ROLE(priv) ((priv)->bss_role & BSS_ROLE_BIT_MASK) + +/** mlan_data_frame_type */ +typedef enum _mlan_data_frame_type { + MLAN_DATA_FRAME_TYPE_ETH_II = 0, + MLAN_DATA_FRAME_TYPE_802_11, +} mlan_data_frame_type; + +/** mlan_event_id */ +typedef enum _mlan_event_id { + /* Event generated by firmware (MSB=0) */ + MLAN_EVENT_ID_FW_UNKNOWN = 0x00000001, + MLAN_EVENT_ID_FW_ADHOC_LINK_SENSED = 0x00000002, + MLAN_EVENT_ID_FW_ADHOC_LINK_LOST = 0x00000003, + MLAN_EVENT_ID_FW_DISCONNECTED = 0x00000004, + MLAN_EVENT_ID_FW_MIC_ERR_UNI = 0x00000005, + MLAN_EVENT_ID_FW_MIC_ERR_MUL = 0x00000006, + MLAN_EVENT_ID_FW_BCN_RSSI_LOW = 0x00000007, + MLAN_EVENT_ID_FW_BCN_RSSI_HIGH = 0x00000008, + MLAN_EVENT_ID_FW_BCN_SNR_LOW = 0x00000009, + MLAN_EVENT_ID_FW_BCN_SNR_HIGH = 0x0000000A, + MLAN_EVENT_ID_FW_MAX_FAIL = 0x0000000B, + MLAN_EVENT_ID_FW_DATA_RSSI_LOW = 0x0000000C, + MLAN_EVENT_ID_FW_DATA_RSSI_HIGH = 0x0000000D, + MLAN_EVENT_ID_FW_DATA_SNR_LOW = 0x0000000E, + MLAN_EVENT_ID_FW_DATA_SNR_HIGH = 0x0000000F, + MLAN_EVENT_ID_FW_LINK_QUALITY = 0x00000010, + MLAN_EVENT_ID_FW_PORT_RELEASE = 0x00000011, + MLAN_EVENT_ID_FW_PRE_BCN_LOST = 0x00000012, + MLAN_EVENT_ID_FW_DEBUG_INFO = 0x00000013, + MLAN_EVENT_ID_FW_WMM_CONFIG_CHANGE = 0x0000001A, + MLAN_EVENT_ID_FW_HS_WAKEUP = 0x0000001B, + MLAN_EVENT_ID_FW_BG_SCAN = 0x0000001D, + MLAN_EVENT_ID_FW_BG_SCAN_STOPPED = 0x0000001E, + MLAN_EVENT_ID_FW_WEP_ICV_ERR = 0x00000020, + MLAN_EVENT_ID_FW_STOP_TX = 0x00000021, + MLAN_EVENT_ID_FW_START_TX = 0x00000022, + MLAN_EVENT_ID_FW_CHANNEL_SWITCH_ANN = 0x00000023, + MLAN_EVENT_ID_FW_RADAR_DETECTED = 0x00000024, + MLAN_EVENT_ID_FW_CHANNEL_REPORT_RDY = 0x00000025, + MLAN_EVENT_ID_FW_BW_CHANGED = 0x00000026, +#ifdef WIFI_DIRECT_SUPPORT + MLAN_EVENT_ID_FW_REMAIN_ON_CHAN_EXPIRED = 0x0000002B, +#endif +#ifdef UAP_SUPPORT + MLAN_EVENT_ID_UAP_FW_BSS_START = 0x0000002C, + MLAN_EVENT_ID_UAP_FW_BSS_ACTIVE = 0x0000002D, + MLAN_EVENT_ID_UAP_FW_BSS_IDLE = 0x0000002E, + MLAN_EVENT_ID_UAP_FW_MIC_COUNTERMEASURES = 0x0000002F, + MLAN_EVENT_ID_UAP_FW_STA_CONNECT = 0x00000030, + MLAN_EVENT_ID_UAP_FW_STA_DISCONNECT = 0x00000031, +#endif + + MLAN_EVENT_ID_FW_DUMP_INFO = 0x00000033, + + MLAN_EVENT_ID_FW_TX_STATUS = 0x00000034, + /* Event generated by MLAN driver (MSB=1) */ + MLAN_EVENT_ID_DRV_CONNECTED = 0x80000001, + MLAN_EVENT_ID_DRV_DEFER_HANDLING = 0x80000002, + MLAN_EVENT_ID_DRV_HS_ACTIVATED = 0x80000003, + MLAN_EVENT_ID_DRV_HS_DEACTIVATED = 0x80000004, + MLAN_EVENT_ID_DRV_MGMT_FRAME = 0x80000005, + MLAN_EVENT_ID_DRV_OBSS_SCAN_PARAM = 0x80000006, + MLAN_EVENT_ID_DRV_PASSTHRU = 0x80000007, + MLAN_EVENT_ID_DRV_SCAN_REPORT = 0x80000009, + MLAN_EVENT_ID_DRV_MEAS_REPORT = 0x8000000A, + MLAN_EVENT_ID_DRV_ASSOC_FAILURE_REPORT = 0x8000000B, + MLAN_EVENT_ID_DRV_REPORT_STRING = 0x8000000F, + MLAN_EVENT_ID_DRV_DBG_DUMP = 0x80000012, + MLAN_EVENT_ID_DRV_BGSCAN_RESULT = 0x80000013, + MLAN_EVENT_ID_DRV_FLUSH_RX_WORK = 0x80000015, + MLAN_EVENT_ID_DRV_DEFER_RX_WORK = 0x80000016, + MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ = 0x80000017, + MLAN_EVENT_ID_DRV_FT_RESPONSE = 0x80000018, + MLAN_EVENT_ID_DRV_FLUSH_MAIN_WORK = 0x80000019, +} mlan_event_id; + +/** Data Structures */ +/** mlan_image data structure */ +typedef struct _mlan_fw_image { + /** Helper image buffer pointer */ + t_u8 *phelper_buf; + /** Helper image length */ + t_u32 helper_len; + /** Firmware image buffer pointer */ + t_u8 *pfw_buf; + /** Firmware image length */ + t_u32 fw_len; +} mlan_fw_image, *pmlan_fw_image; + +/** Custom data structure */ +typedef struct _mlan_init_param { + /** Cal data buffer pointer */ + t_u8 *pcal_data_buf; + /** Cal data length */ + t_u32 cal_data_len; + /** Other custom data */ +} mlan_init_param, *pmlan_init_param; + +/** mlan_event data structure */ +typedef struct _mlan_event { + /** BSS index number for multiple BSS support */ + t_u32 bss_index; + /** Event ID */ + mlan_event_id event_id; + /** Event length */ + t_u32 event_len; + /** Event buffer */ + t_u8 event_buf[1]; +} mlan_event, *pmlan_event; + +/** mlan_event_scan_result data structure */ +typedef MLAN_PACK_START struct _mlan_event_scan_result { + /** Event ID */ + t_u16 event_id; + /** BSS index number for multiple BSS support */ + t_u8 bss_index; + /** BSS type */ + t_u8 bss_type; + /** More event available or not */ + t_u8 more_event; + /** Reserved */ + t_u8 reserved[3]; + /** Size of the response buffer */ + t_u16 buf_size; + /** Number of BSS in scan response */ + t_u8 num_of_set; +} MLAN_PACK_END mlan_event_scan_result, *pmlan_event_scan_result; + +/** mlan_ioctl_req data structure */ +typedef struct _mlan_ioctl_req { + /** Status code from firmware/driver */ + t_u32 status_code; + /** BSS index number for multiple BSS support */ + t_u32 bss_index; + /** Request id */ + t_u32 req_id; + /** Action: set or get */ + t_u32 action; + /** Pointer to buffer */ + t_u8 *pbuf; + /** Length of buffer */ + t_u32 buf_len; + /** Length of the data read/written in buffer */ + t_u32 data_read_written; + /** Length of buffer needed */ + t_u32 buf_len_needed; + /** Reserved for MOAL module */ + t_ptr reserved_1; +} mlan_ioctl_req, *pmlan_ioctl_req; + +/** mlan_buffer data structure */ +typedef struct _mlan_buffer { + /** Pointer to previous mlan_buffer */ + struct _mlan_buffer *pprev; + /** Pointer to next mlan_buffer */ + struct _mlan_buffer *pnext; + /** Status code from firmware/driver */ + t_u32 status_code; + /** Flags for this buffer */ + t_u32 flags; + /** BSS index number for multiple BSS support */ + t_u32 bss_index; + /** Buffer descriptor, e.g. skb in Linux */ + t_void *pdesc; + /** Pointer to buffer */ + t_u8 *pbuf; + /** Offset to data */ + t_u32 data_offset; + /** Data length */ + t_u32 data_len; + /** Buffer type: data, cmd, event etc. */ + mlan_buf_type buf_type; + + /** Fields below are valid for data packet only */ + /** QoS priority */ + t_u32 priority; + /** Time stamp when packet is received (seconds) */ + t_u32 in_ts_sec; + /** Time stamp when packet is received (micro seconds) */ + t_u32 in_ts_usec; + /** Time stamp when packet is processed (seconds) */ + t_u32 out_ts_sec; + /** Time stamp when packet is processed (micro seconds) */ + t_u32 out_ts_usec; + /** tx_seq_num */ + t_u32 tx_seq_num; + + /** Fields below are valid for MLAN module only */ + /** Pointer to parent mlan_buffer */ + struct _mlan_buffer *pparent; + /** Use count for this buffer */ + t_u32 use_count; +} mlan_buffer, *pmlan_buffer; + +/** mlan_bss_attr data structure */ +typedef struct _mlan_bss_attr { + /** BSS type */ + t_u32 bss_type; + /** Data frame type: Ethernet II, 802.11, etc. */ + t_u32 frame_type; + /** The BSS is active (non-0) or not (0). */ + t_u32 active; + /** BSS Priority */ + t_u32 bss_priority; + /** BSS number */ + t_u32 bss_num; + /** The BSS is virtual */ + t_u32 bss_virtual; +} mlan_bss_attr, *pmlan_bss_attr; + +#ifdef PRAGMA_PACK +#pragma pack(push, 1) +#endif + +/** Type enumeration for the command result */ +typedef MLAN_PACK_START enum _mlan_cmd_result_e { + MLAN_CMD_RESULT_SUCCESS = 0, + MLAN_CMD_RESULT_FAILURE = 1, + MLAN_CMD_RESULT_TIMEOUT = 2, + MLAN_CMD_RESULT_INVALID_DATA = 3 +} MLAN_PACK_END mlan_cmd_result_e; + +/** Type enumeration of WMM AC_QUEUES */ +typedef MLAN_PACK_START enum _mlan_wmm_ac_e { + WMM_AC_BK, + WMM_AC_BE, + WMM_AC_VI, + WMM_AC_VO +} MLAN_PACK_END mlan_wmm_ac_e; + +/** Type enumeration for the action field in the Queue Config command */ +typedef MLAN_PACK_START enum _mlan_wmm_queue_config_action_e { + MLAN_WMM_QUEUE_CONFIG_ACTION_GET = 0, + MLAN_WMM_QUEUE_CONFIG_ACTION_SET = 1, + MLAN_WMM_QUEUE_CONFIG_ACTION_DEFAULT = 2, + MLAN_WMM_QUEUE_CONFIG_ACTION_MAX +} MLAN_PACK_END mlan_wmm_queue_config_action_e; + +/** Type enumeration for the action field in the queue stats command */ +typedef MLAN_PACK_START enum _mlan_wmm_queue_stats_action_e { + MLAN_WMM_STATS_ACTION_START = 0, + MLAN_WMM_STATS_ACTION_STOP = 1, + MLAN_WMM_STATS_ACTION_GET_CLR = 2, + MLAN_WMM_STATS_ACTION_SET_CFG = 3, /* Not currently used */ + MLAN_WMM_STATS_ACTION_GET_CFG = 4, /* Not currently used */ + MLAN_WMM_STATS_ACTION_MAX +} MLAN_PACK_END mlan_wmm_queue_stats_action_e; + +/** + * @brief IOCTL structure for a Traffic stream status. + * + */ +typedef MLAN_PACK_START struct { + /** TSID: Range: 0->7 */ + t_u8 tid; + /** TSID specified is valid */ + t_u8 valid; + /** AC TSID is active on */ + t_u8 access_category; + /** UP specified for the TSID */ + t_u8 user_priority; + /** Power save mode for TSID: 0 (legacy), 1 (UAPSD) */ + t_u8 psb; + /** Upstream(0), Downlink(1), Bidirectional(3) */ + t_u8 flow_dir; + /** Medium time granted for the TSID */ + t_u16 medium_time; +} MLAN_PACK_END wlan_ioctl_wmm_ts_status_t, +/** Type definition of mlan_ds_wmm_ts_status for MLAN_OID_WMM_CFG_TS_STATUS */ +mlan_ds_wmm_ts_status, *pmlan_ds_wmm_ts_status; + +/** Max Ie length */ +#define MAX_IE_SIZE 256 + +/** custom IE */ +typedef MLAN_PACK_START struct _custom_ie { + /** IE Index */ + t_u16 ie_index; + /** Mgmt Subtype Mask */ + t_u16 mgmt_subtype_mask; + /** IE Length */ + t_u16 ie_length; + /** IE buffer */ + t_u8 ie_buffer[MAX_IE_SIZE]; +} MLAN_PACK_END custom_ie; + +/** Max IE index to FW */ +#define MAX_MGMT_IE_INDEX_TO_FW 4 +/** Max IE index per BSS */ +#define MAX_MGMT_IE_INDEX 16 + +/** custom IE info */ +typedef MLAN_PACK_START struct _custom_ie_info { + /** size of buffer */ + t_u16 buf_size; + /** no of buffers of buf_size */ + t_u16 buf_count; +} MLAN_PACK_END custom_ie_info; + +/** TLV buffer : Max Mgmt IE */ +typedef MLAN_PACK_START struct _tlvbuf_max_mgmt_ie { + /** Type */ + t_u16 type; + /** Length */ + t_u16 len; + /** No of tuples */ + t_u16 count; + /** custom IE info tuples */ + custom_ie_info info[MAX_MGMT_IE_INDEX]; +} MLAN_PACK_END tlvbuf_max_mgmt_ie; + +/** TLV buffer : custom IE */ +typedef MLAN_PACK_START struct _tlvbuf_custom_ie { + /** Type */ + t_u16 type; + /** Length */ + t_u16 len; + /** IE data */ + custom_ie ie_data_list[MAX_MGMT_IE_INDEX_TO_FW]; + /** Max mgmt IE TLV */ + tlvbuf_max_mgmt_ie max_mgmt_ie; +} MLAN_PACK_END mlan_ds_misc_custom_ie; + +/** Max TDLS config data length */ +#define MAX_TDLS_DATA_LEN 1024 + +/** Action commands for TDLS enable/disable */ +#define WLAN_TDLS_CONFIG 0x00 +/** Action commands for TDLS configuration :Set */ +#define WLAN_TDLS_SET_INFO 0x01 +/** Action commands for TDLS configuration :Discovery Request */ +#define WLAN_TDLS_DISCOVERY_REQ 0x02 +/** Action commands for TDLS configuration :Setup Request */ +#define WLAN_TDLS_SETUP_REQ 0x03 +/** Action commands for TDLS configuration :Tear down Request */ +#define WLAN_TDLS_TEAR_DOWN_REQ 0x04 +/** Action ID for TDLS power mode */ +#define WLAN_TDLS_POWER_MODE 0x05 +/**Action ID for init TDLS Channel Switch*/ +#define WLAN_TDLS_INIT_CHAN_SWITCH 0x06 +/** Action ID for stop TDLS Channel Switch */ +#define WLAN_TDLS_STOP_CHAN_SWITCH 0x07 +/** Action ID for configure CS related parameters */ +#define WLAN_TDLS_CS_PARAMS 0x08 +/** Action ID for Disable CS */ +#define WLAN_TDLS_CS_DISABLE 0x09 +/** Action ID for TDLS link status */ +#define WLAN_TDLS_LINK_STATUS 0x0A +/** Action ID for TDLS CS immediate return */ +#define WLAN_TDLS_DEBUG_CS_RET_IM 0xFFF7 +/** Action ID for TDLS Stop RX */ +#define WLAN_TDLS_DEBUG_STOP_RX 0xFFF8 +/** Action ID for TDLS Allow weak security for links establish */ +#define WLAN_TDLS_DEBUG_ALLOW_WEAK_SECURITY 0xFFF9 +/** Action ID for TDLS Ignore key lifetime expiry */ +#define WLAN_TDLS_DEBUG_IGNORE_KEY_EXPIRY 0xFFFA +/** Action ID for TDLS Higher/Lower mac Test */ +#define WLAN_TDLS_DEBUG_HIGHER_LOWER_MAC 0xFFFB +/** Action ID for TDLS Prohibited Test */ +#define WLAN_TDLS_DEBUG_SETUP_PROHIBITED 0xFFFC +/** Action ID for TDLS Existing link Test */ +#define WLAN_TDLS_DEBUG_SETUP_SAME_LINK 0xFFFD +/** Action ID for TDLS Fail Setup Confirm */ +#define WLAN_TDLS_DEBUG_FAIL_SETUP_CONFIRM 0xFFFE +/** Action commands for TDLS debug: Wrong BSS Request */ +#define WLAN_TDLS_DEBUG_WRONG_BSS 0xFFFF + +/** tdls each link rate information */ +typedef MLAN_PACK_START struct _tdls_link_rate_info { + /** Tx Data Rate */ + t_u8 tx_data_rate; + /** Tx Rate HT info*/ + t_u8 tx_rate_htinfo; +} MLAN_PACK_END tdls_link_rate_info; + +/** tdls each link status */ +typedef MLAN_PACK_START struct _tdls_each_link_status { + /** peer mac Address */ + t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; + /** Link Flags */ + t_u8 link_flags; + /** Traffic Status */ + t_u8 traffic_status; + /** Tx Failure Count */ + t_u8 tx_fail_count; + /** Channel Number */ + t_u32 active_channel; + /** Last Data RSSI in dBm */ + t_s16 data_rssi_last; + /** Last Data NF in dBm */ + t_s16 data_nf_last; + /** AVG DATA RSSI in dBm */ + t_s16 data_rssi_avg; + /** AVG DATA NF in dBm */ + t_s16 data_nf_avg; + union { + /** tdls rate info */ + tdls_link_rate_info rate_info; + /** tdls link final rate*/ + t_u16 final_data_rate; + } u; + /** Security Method */ + t_u8 security_method; + /** Key Lifetime in milliseconds */ + t_u32 key_lifetime; + /** Key Length */ + t_u8 key_length; + /** actual key */ + t_u8 key[0]; +} MLAN_PACK_END tdls_each_link_status; + +/** TDLS configuration data */ +typedef MLAN_PACK_START struct _tdls_all_config { + union { + /** TDLS state enable disable */ + MLAN_PACK_START struct _tdls_config { + /** enable or disable */ + t_u16 enable; + } MLAN_PACK_END tdls_config; + /** TDLS set info */ + MLAN_PACK_START struct _tdls_set_data { + /** (tlv + capInfo) length */ + t_u16 tlv_length; + /** Cap Info */ + t_u16 cap_info; + /** TLV buffer */ + t_u8 tlv_buffer[0]; + } MLAN_PACK_END tdls_set; + + /** TDLS discovery and others having mac argument */ + MLAN_PACK_START struct _tdls_discovery_data { + /** peer mac Address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + } MLAN_PACK_END tdls_discovery, tdls_stop_chan_switch, + tdls_link_status_req; + + /** TDLS discovery Response */ + MLAN_PACK_START struct _tdls_discovery_resp { + /** payload length */ + t_u16 payload_len; + /** peer mac Address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** RSSI */ + t_s8 rssi; + /** Cap Info */ + t_u16 cap_info; + /** TLV buffer */ + t_u8 tlv_buffer[0]; + } MLAN_PACK_END tdls_discovery_resp; + + /** TDLS setup request */ + MLAN_PACK_START struct _tdls_setup_data { + /** peer mac Address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** timeout value in milliseconds */ + t_u32 setup_timeout; + /** key lifetime in milliseconds */ + t_u32 key_lifetime; + } MLAN_PACK_END tdls_setup; + + /** TDLS tear down info */ + MLAN_PACK_START struct _tdls_tear_down_data { + /** peer mac Address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** reason code */ + t_u16 reason_code; + } MLAN_PACK_END tdls_tear_down, tdls_cmd_resp; + + /** TDLS power mode info */ + MLAN_PACK_START struct _tdls_power_mode_data { + /** peer mac Address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** Power Mode */ + t_u16 power_mode; + } MLAN_PACK_END tdls_power_mode; + + /** TDLS channel switch info */ + MLAN_PACK_START struct _tdls_chan_switch { + /** peer mac Address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** Channel Switch primary channel no */ + t_u8 primary_channel; + /** Channel Switch secondary channel offset */ + t_u8 secondary_channel_offset; + /** Channel Switch Band */ + t_u8 band; + /** Channel Switch time in milliseconds */ + t_u16 switch_time; + /** Channel Switch timeout in milliseconds */ + t_u16 switch_timeout; + /** Channel Regulatory class*/ + t_u8 regulatory_class; + /** peridicity flag*/ + t_u8 periodicity; + } MLAN_PACK_END tdls_chan_switch; + + /** TDLS channel switch paramters */ + MLAN_PACK_START struct _tdls_cs_params { + /** unit time, multiples of 10ms */ + t_u8 unit_time; + /** threshold for other link */ + t_u8 threshold_otherlink; + /** threshold for direct link */ + t_u8 threshold_directlink; + } MLAN_PACK_END tdls_cs_params; + + /** tdls disable channel switch */ + MLAN_PACK_START struct _tdls_disable_cs { + /** Data*/ + t_u16 data; + } MLAN_PACK_END tdls_disable_cs; + /** TDLS debug data */ + MLAN_PACK_START struct _tdls_debug_data { + /** debug data */ + t_u16 debug_data; + } MLAN_PACK_END tdls_debug_data; + + /** TDLS link status Response */ + MLAN_PACK_START struct _tdls_link_status_resp { + /** payload length */ + t_u16 payload_len; + /** number of links */ + t_u8 active_links; + /** structure for link status */ + tdls_each_link_status link_stats[1]; + } MLAN_PACK_END tdls_link_status_resp; + + } u; +} MLAN_PACK_END tdls_all_config; + +/** TDLS configuration buffer */ +typedef MLAN_PACK_START struct _buf_tdls_config { + /** TDLS Action */ + t_u16 tdls_action; + /** TDLS data */ + t_u8 tdls_data[MAX_TDLS_DATA_LEN]; +} MLAN_PACK_END mlan_ds_misc_tdls_config; + +/** Event structure for tear down */ +typedef struct _tdls_tear_down_event { + /** Peer mac address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** Reason code */ + t_u16 reason_code; +} tdls_tear_down_event; + +#ifdef PRAGMA_PACK +#pragma pack(pop) +#endif + +/** mlan_callbacks data structure */ +typedef struct _mlan_callbacks { + /** moal_get_fw_data */ + mlan_status (*moal_get_fw_data) (IN t_void *pmoal_handle, + IN t_u32 offset, + IN t_u32 len, OUT t_u8 *pbuf); + /** moal_init_fw_complete */ + mlan_status (*moal_init_fw_complete) (IN t_void *pmoal_handle, + IN mlan_status status); + /** moal_shutdown_fw_complete */ + mlan_status (*moal_shutdown_fw_complete) (IN t_void *pmoal_handle, + IN mlan_status status); + /** moal_send_packet_complete */ + mlan_status (*moal_send_packet_complete) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf, + IN mlan_status status); + /** moal_recv_complete */ + mlan_status (*moal_recv_complete) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf, + IN t_u32 port, + IN mlan_status status); + /** moal_recv_packet */ + mlan_status (*moal_recv_packet) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf); + /** moal_recv_event */ + mlan_status (*moal_recv_event) (IN t_void *pmoal_handle, + IN pmlan_event pmevent); + /** moal_ioctl_complete */ + mlan_status (*moal_ioctl_complete) (IN t_void *pmoal_handle, + IN pmlan_ioctl_req pioctl_req, + IN mlan_status status); + + /** moal_alloc_mlan_buffer */ + mlan_status (*moal_alloc_mlan_buffer) (IN t_void *pmoal_handle, + IN t_u32 size, + OUT pmlan_buffer *pmbuf); + /** moal_free_mlan_buffer */ + mlan_status (*moal_free_mlan_buffer) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf); + + /** moal_write_reg */ + mlan_status (*moal_write_reg) (IN t_void *pmoal_handle, + IN t_u32 reg, IN t_u32 data); + /** moal_read_reg */ + mlan_status (*moal_read_reg) (IN t_void *pmoal_handle, + IN t_u32 reg, OUT t_u32 *data); + /** moal_write_data_sync */ + mlan_status (*moal_write_data_sync) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf, + IN t_u32 port, IN t_u32 timeout); + /** moal_read_data_sync */ + mlan_status (*moal_read_data_sync) (IN t_void *pmoal_handle, + IN OUT pmlan_buffer pmbuf, + IN t_u32 port, IN t_u32 timeout); + /** moal_malloc */ + mlan_status (*moal_malloc) (IN t_void *pmoal_handle, + IN t_u32 size, + IN t_u32 flag, OUT t_u8 **ppbuf); + /** moal_mfree */ + mlan_status (*moal_mfree) (IN t_void *pmoal_handle, IN t_u8 *pbuf); + /** moal_vmalloc */ + mlan_status (*moal_vmalloc) (IN t_void *pmoal_handle, + IN t_u32 size, OUT t_u8 **ppbuf); + /** moal_vfree */ + mlan_status (*moal_vfree) (IN t_void *pmoal_handle, IN t_u8 *pbuf); + /** moal_memset */ + t_void *(*moal_memset) (IN t_void *pmoal_handle, + IN t_void *pmem, IN t_u8 byte, IN t_u32 num); + /** moal_memcpy */ + t_void *(*moal_memcpy) (IN t_void *pmoal_handle, + IN t_void *pdest, + IN const t_void *psrc, IN t_u32 num); + /** moal_memmove */ + t_void *(*moal_memmove) (IN t_void *pmoal_handle, + IN t_void *pdest, + IN const t_void *psrc, IN t_u32 num); + /** moal_memcmp */ + t_s32 (*moal_memcmp) (IN t_void *pmoal_handle, + IN const t_void *pmem1, + IN const t_void *pmem2, IN t_u32 num); + /** moal_udelay */ + t_void (*moal_udelay) (IN t_void *pmoal_handle, IN t_u32 udelay); + /** moal_get_system_time */ + mlan_status (*moal_get_system_time) (IN t_void *pmoal_handle, + OUT t_u32 *psec, OUT t_u32 *pusec); + /** moal_init_timer*/ + mlan_status (*moal_init_timer) (IN t_void *pmoal_handle, + OUT t_void **pptimer, + IN t_void (*callback) (t_void + *pcontext), + IN t_void *pcontext); + /** moal_free_timer */ + mlan_status (*moal_free_timer) (IN t_void *pmoal_handle, + IN t_void *ptimer); + /** moal_start_timer*/ + mlan_status (*moal_start_timer) (IN t_void *pmoal_handle, + IN t_void *ptimer, + IN t_u8 periodic, IN t_u32 msec); + /** moal_stop_timer*/ + mlan_status (*moal_stop_timer) (IN t_void *pmoal_handle, + IN t_void *ptimer); + /** moal_init_lock */ + mlan_status (*moal_init_lock) (IN t_void *pmoal_handle, + OUT t_void **pplock); + /** moal_free_lock */ + mlan_status (*moal_free_lock) (IN t_void *pmoal_handle, + IN t_void *plock); + /** moal_spin_lock */ + mlan_status (*moal_spin_lock) (IN t_void *pmoal_handle, + IN t_void *plock); + /** moal_spin_unlock */ + mlan_status (*moal_spin_unlock) (IN t_void *pmoal_handle, + IN t_void *plock); + /** moal_print */ + t_void (*moal_print) (IN t_void *pmoal_handle, + IN t_u32 level, IN char *pformat, IN ... + ); + /** moal_print_netintf */ + t_void (*moal_print_netintf) (IN t_void *pmoal_handle, + IN t_u32 bss_index, IN t_u32 level); + /** moal_assert */ + t_void (*moal_assert) (IN t_void *pmoal_handle, IN t_u32 cond); + + /** moal_tcp_ack_tx_ind */ + t_void (*moal_tcp_ack_tx_ind) (IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf); + /** moal_hist_data_add */ + t_void (*moal_hist_data_add) (IN t_void *pmoal_handle, + IN t_u32 bss_index, + IN t_u8 rx_rate, + IN t_s8 snr, + IN t_s8 nflr, IN t_u8 antenna); + t_void (*moal_updata_peer_signal) (IN t_void *pmoal_handle, + IN t_u32 bss_index, + IN t_u8 *peer_addr, + IN t_s8 snr, IN t_s8 nflr); +} mlan_callbacks, *pmlan_callbacks; + +/** Interrupt Mode SDIO */ +#define INT_MODE_SDIO 0 +/** Interrupt Mode GPIO */ +#define INT_MODE_GPIO 1 + +/** Parameter unchanged, use MLAN default setting */ +#define MLAN_INIT_PARA_UNCHANGED 0 +/** Parameter enabled, override MLAN default setting */ +#define MLAN_INIT_PARA_ENABLED 1 +/** Parameter disabled, override MLAN default setting */ +#define MLAN_INIT_PARA_DISABLED 2 + +/** Control bit for stream 2X2 */ +#define FEATURE_CTRL_STREAM_2X2 MBIT(6) +/** Control bit for DFS support */ +#define FEATURE_CTRL_DFS_SUPPORT MBIT(7) + +/** Default feature control */ +#define FEATURE_CTRL_DEFAULT 0xffffffff + +/** mlan_device data structure */ +typedef struct _mlan_device { + /** MOAL Handle */ + t_void *pmoal_handle; + /** BSS Attributes */ + mlan_bss_attr bss_attr[MLAN_MAX_BSS_NUM]; + /** Callbacks */ + mlan_callbacks callbacks; +#ifdef MFG_CMD_SUPPORT + /** MFG mode */ + t_u32 mfg_mode; +#endif + /** SDIO interrupt mode (0: INT_MODE_SDIO, 1: INT_MODE_GPIO) */ + t_u32 int_mode; + /** GPIO interrupt pin number */ + t_u32 gpio_pin; +#ifdef DEBUG_LEVEL1 + /** Driver debug bit masks */ + t_u32 drvdbg; +#endif +#ifdef SDIO_MULTI_PORT_TX_AGGR + /** SDIO MPA Tx */ + t_u32 mpa_tx_cfg; +#endif +#ifdef SDIO_MULTI_PORT_RX_AGGR + /** SDIO MPA Rx */ + t_u32 mpa_rx_cfg; +#endif +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + /* see blk_queue_max_segment_size */ + t_u32 max_seg_size; + /* see blk_queue_max_segments */ + t_u16 max_segs; +#endif + /** Auto deep sleep */ + t_u32 auto_ds; + /** IEEE PS mode */ + t_u32 ps_mode; + /** Max Tx buffer size */ + t_u32 max_tx_buf; +#if defined(STA_SUPPORT) + /** 802.11d configuration */ + t_u32 cfg_11d; +#endif + /** FW download CRC check flag */ + t_u32 fw_crc_check; + /** Feature control bitmask */ + t_u32 feature_control; + /** enable/disable rx work */ + t_u8 rx_work; + /** dev cap mask */ + t_u32 dev_cap_mask; + /** card type */ + t_u16 card_type; +} mlan_device, *pmlan_device; + +/** MLAN API function prototype */ +#define MLAN_API + +/** Registration */ +MLAN_API mlan_status mlan_register(IN pmlan_device pmdevice, + OUT t_void **ppmlan_adapter); + +/** Un-registration */ +MLAN_API mlan_status mlan_unregister(IN t_void *pmlan_adapter + ); + +/** Firmware Downloading */ +MLAN_API mlan_status mlan_dnld_fw(IN t_void *pmlan_adapter, + IN pmlan_fw_image pmfw); + +/** Custom data pass API */ +MLAN_API mlan_status mlan_set_init_param(IN t_void *pmlan_adapter, + IN pmlan_init_param pparam); + +/** Firmware Initialization */ +MLAN_API mlan_status mlan_init_fw(IN t_void *pmlan_adapter + ); + +/** Firmware Shutdown */ +MLAN_API mlan_status mlan_shutdown_fw(IN t_void *pmlan_adapter + ); + +/** Main Process */ +MLAN_API mlan_status mlan_main_process(IN t_void *pmlan_adapter + ); + +/** Rx process */ +mlan_status mlan_rx_process(IN t_void *pmlan_adapter + ); + +/** Packet Transmission */ +MLAN_API mlan_status mlan_send_packet(IN t_void *pmlan_adapter, + IN pmlan_buffer pmbuf); + +/** Packet Reception complete callback */ +MLAN_API mlan_status mlan_recv_packet_complete(IN t_void *pmlan_adapter, + IN pmlan_buffer pmbuf, + IN mlan_status status); + +/** interrupt handler */ +MLAN_API t_void mlan_interrupt(IN t_void *pmlan_adapter); + +MLAN_API t_void mlan_pm_wakeup_card(IN t_void *pmlan_adapter); + +MLAN_API t_u8 mlan_is_main_process_running(IN t_void *adapter); + +/** mlan ioctl */ +MLAN_API mlan_status mlan_ioctl(IN t_void *pmlan_adapter, + IN pmlan_ioctl_req pioctl_req); +/** mlan select wmm queue */ +MLAN_API t_u8 mlan_select_wmm_queue(IN t_void *pmlan_adapter, + IN t_u8 bss_num, IN t_u8 tid); +#endif /* !_MLAN_DECL_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/mlan_ieee.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/mlan_ieee.h new file mode 100644 index 00000000..24a40835 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/mlan_ieee.h @@ -0,0 +1,1878 @@ +/** @file mlan_ieee.h + * + * @brief This file contains IEEE information element related + * definitions used in MLAN and MOAL module. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 11/03/2008: initial version +******************************************************/ + +#ifndef _MLAN_IEEE_H_ +#define _MLAN_IEEE_H_ + +/** FIX IES size in beacon buffer */ +#define WLAN_802_11_FIXED_IE_SIZE 12 +/** WLAN supported rates */ +#define WLAN_SUPPORTED_RATES 14 + +/** WLAN supported rates extension */ +#define WLAN_SUPPORTED_RATES_EXT 60 + +/** Enumeration definition*/ +/** WLAN_802_11_NETWORK_TYPE */ +typedef enum _WLAN_802_11_NETWORK_TYPE { + Wlan802_11FH, + Wlan802_11DS, + /* Defined as upper bound */ + Wlan802_11NetworkTypeMax +} WLAN_802_11_NETWORK_TYPE; + +#ifdef BIG_ENDIAN_SUPPORT +/** Frame control: Type Mgmt frame */ +#define IEEE80211_FC_MGMT_FRAME_TYPE_MASK 0x3000 +/** Frame control: SubType Mgmt frame */ +#define IEEE80211_GET_FC_MGMT_FRAME_SUBTYPE(fc) (((fc) & 0xF000) >> 12) +#else +/** Frame control: Type Mgmt frame */ +#define IEEE80211_FC_MGMT_FRAME_TYPE_MASK 0x000C +/** Frame control: SubType Mgmt frame */ +#define IEEE80211_GET_FC_MGMT_FRAME_SUBTYPE(fc) (((fc) & 0x00F0) >> 4) +#endif + +#ifdef PRAGMA_PACK +#pragma pack(push, 1) +#endif + +/* Reason codes */ +#define IEEE_80211_REASONCODE_UNSPECIFIED 1 + +/** IEEE Type definitions */ +typedef MLAN_PACK_START enum _IEEEtypes_ElementId_e { + SSID = 0, + SUPPORTED_RATES = 1, + + FH_PARAM_SET = 2, + DS_PARAM_SET = 3, + CF_PARAM_SET = 4, + + IBSS_PARAM_SET = 6, + +#ifdef STA_SUPPORT + COUNTRY_INFO = 7, +#endif /* STA_SUPPORT */ + + POWER_CONSTRAINT = 32, + POWER_CAPABILITY = 33, + TPC_REQUEST = 34, + TPC_REPORT = 35, + CHANNEL_SWITCH_ANN = 37, + QUIET = 40, + IBSS_DFS = 41, + SUPPORTED_CHANNELS = 36, + REGULATORY_CLASS = 59, + HT_CAPABILITY = 45, + QOS_INFO = 46, + HT_OPERATION = 61, + BSSCO_2040 = 72, + OVERLAPBSSSCANPARAM = 74, + EXT_CAPABILITY = 127, + LINK_ID = 101, + /* IEEE802.11r */ + MOBILITY_DOMAIN = 54, + FAST_BSS_TRANSITION = 55, + TIMEOUT_INTERVAL = 56, + RIC = 57, + VHT_CAPABILITY = 191, + VHT_OPERATION = 192, + EXT_BSS_LOAD = 193, + BW_CHANNEL_SWITCH = 194, + VHT_TX_POWER_ENV = 195, + EXT_POWER_CONSTR = 196, + AID_INFO = 197, + QUIET_CHAN = 198, + OPER_MODE_NTF = 199, + + ERP_INFO = 42, + + EXTENDED_SUPPORTED_RATES = 50, + + VENDOR_SPECIFIC_221 = 221, + WMM_IE = VENDOR_SPECIFIC_221, + + WPS_IE = VENDOR_SPECIFIC_221, + + WPA_IE = VENDOR_SPECIFIC_221, + RSN_IE = 48, + VS_IE = VENDOR_SPECIFIC_221, + WAPI_IE = 68, +} MLAN_PACK_END IEEEtypes_ElementId_e; + +/** IEEE IE header */ +typedef MLAN_PACK_START struct _IEEEtypes_Header_t { + /** Element ID */ + t_u8 element_id; + /** Length */ + t_u8 len; +} MLAN_PACK_END IEEEtypes_Header_t, *pIEEEtypes_Header_t; + +/** Vendor specific IE header */ +typedef MLAN_PACK_START struct _IEEEtypes_VendorHeader_t { + /** Element ID */ + t_u8 element_id; + /** Length */ + t_u8 len; + /** OUI */ + t_u8 oui[3]; + /** OUI type */ + t_u8 oui_type; + /** OUI subtype */ + t_u8 oui_subtype; + /** Version */ + t_u8 version; +} MLAN_PACK_END IEEEtypes_VendorHeader_t, *pIEEEtypes_VendorHeader_t; + +/** Vendor specific IE */ +typedef MLAN_PACK_START struct _IEEEtypes_VendorSpecific_t { + /** Vendor specific IE header */ + IEEEtypes_VendorHeader_t vend_hdr; + /** IE Max - size of previous fields */ + t_u8 data[IEEE_MAX_IE_SIZE - sizeof(IEEEtypes_VendorHeader_t)]; +} MLAN_PACK_END IEEEtypes_VendorSpecific_t, *pIEEEtypes_VendorSpecific_t; + +/** IEEE IE */ +typedef MLAN_PACK_START struct _IEEEtypes_Generic_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** IE Max - size of previous fields */ + t_u8 data[IEEE_MAX_IE_SIZE - sizeof(IEEEtypes_Header_t)]; +} MLAN_PACK_END IEEEtypes_Generic_t, *pIEEEtypes_Generic_t; + +/**ft capability policy*/ +typedef MLAN_PACK_START struct _IEEEtypes_FtCapPolicy_t { +#ifdef BIG_ENDIAN_SUPPORT + /** Reserved */ + t_u8 reserved:6; + /** RIC support */ + t_u8 ric:1; + /** FT over the DS capable */ + t_u8 ft_over_ds:1; +#else + /** FT over the DS capable */ + t_u8 ft_over_ds:1; + /** RIC support */ + t_u8 ric:1; + /** Reserved */ + t_u8 reserved:6; +#endif +} MLAN_PACK_END IEEEtypes_FtCapPolicy_t; + +/** Mobility domain IE */ +typedef MLAN_PACK_START struct _IEEEtypes_MobilityDomain_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** Mobility Domain ID */ + t_u16 mdid; + /** FT Capability policy */ + t_u8 ft_cap; +} MLAN_PACK_END IEEEtypes_MobilityDomain_t; + +/**FT MIC Control*/ +typedef MLAN_PACK_START struct _IEEEtypes_FT_MICControl_t { + /** reserved */ + t_u8 reserved; + /** element count */ + t_u8 element_count; +} MLAN_PACK_END IEEEtypes_FT_MICControl_t; + +/** FTIE MIC LEN */ +#define FTIE_MIC_LEN 16 + +/**FT IE*/ +typedef MLAN_PACK_START struct _IEEEtypes_FastBssTransElement_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** mic control */ + IEEEtypes_FT_MICControl_t mic_control; + /** mic */ + t_u8 mic[FTIE_MIC_LEN]; + /** ANonce */ + t_u8 a_nonce[32]; + /** SNonce */ + t_u8 s_nonce[32]; + /** sub element */ + t_u8 sub_element[1]; +} MLAN_PACK_END IEEEtypes_FastBssTransElement_t; + +/** auth frame body*/ +typedef MLAN_PACK_START struct { + /** auth alg */ + t_u16 auth_alg; + /** auth transaction */ + t_u16 auth_transaction; + /** status code */ + t_u16 status_code; + /** variable */ + t_u8 variable[0]; +} MLAN_PACK_END IEEEtypes_Auth_framebody; + +/*Category for FT*/ +#define FT_CATEGORY 6 +/** FT ACTION request */ +#define FT_ACTION_REQUEST 1 +/** FT ACTION response */ +#define FT_ACTION_RESPONSE 2 + +/*FT response and FT ack*/ +typedef MLAN_PACK_START struct { + /** category */ + t_u8 category; + /** action */ + t_u8 action; + /** sta address */ + t_u8 sta_addr[MLAN_MAC_ADDR_LENGTH]; + /** target ap address */ + t_u8 target_ap_addr[MLAN_MAC_ADDR_LENGTH]; + /** status code */ + t_u16 status_code; + /** varible */ + t_u8 variable[0]; +} MLAN_PACK_END IEEEtypes_Ft_action_response; + +/**FT request */ +typedef MLAN_PACK_START struct { + /** category */ + t_u8 category; + /** action */ + t_u8 action; + /** sta address */ + t_u8 sta_addr[MLAN_MAC_ADDR_LENGTH]; + /** target ap address */ + t_u8 target_ap_addr[MLAN_MAC_ADDR_LENGTH]; + /** varible */ + t_u8 variable[0]; +} MLAN_PACK_END IEEEtypes_Ft_action_request; + +/*Mgmt frame*/ +typedef MLAN_PACK_START struct { + /** frame control */ + t_u16 frame_control; + /** duration */ + t_u16 duration; + /** dest address */ + t_u8 da[MLAN_MAC_ADDR_LENGTH]; + /** source address */ + t_u8 sa[MLAN_MAC_ADDR_LENGTH]; + /** bssid */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; + /** seq control */ + t_u16 seq_ctrl; + /** address 4 */ + t_u8 addr4[MLAN_MAC_ADDR_LENGTH]; + union { + IEEEtypes_Auth_framebody auth; + IEEEtypes_Ft_action_response ft_resp; + IEEEtypes_Ft_action_request ft_req; + } u; +} MLAN_PACK_END IEEE80211_MGMT; + +/** TLV header */ +typedef MLAN_PACK_START struct _TLV_Generic_t { + /** Type */ + t_u16 type; + /** Length */ + t_u16 len; +} MLAN_PACK_END TLV_Generic_t, *pTLV_Generic_t; + +/** Capability information mask */ +#define CAPINFO_MASK \ +(~(MBIT(15) | MBIT(14) | MBIT(12) | MBIT(11) | MBIT(9))) + +/** Capability Bit Map*/ +#ifdef BIG_ENDIAN_SUPPORT +typedef MLAN_PACK_START struct _IEEEtypes_CapInfo_t { + t_u8 rsrvd1:2; + t_u8 dsss_ofdm:1; + t_u8 rsvrd2:2; + t_u8 short_slot_time:1; + t_u8 rsrvd3:1; + t_u8 spectrum_mgmt:1; + t_u8 chan_agility:1; + t_u8 pbcc:1; + t_u8 short_preamble:1; + t_u8 privacy:1; + t_u8 cf_poll_rqst:1; + t_u8 cf_pollable:1; + t_u8 ibss:1; + t_u8 ess:1; +} MLAN_PACK_END IEEEtypes_CapInfo_t, *pIEEEtypes_CapInfo_t; +#else +typedef MLAN_PACK_START struct _IEEEtypes_CapInfo_t { + /** Capability Bit Map : ESS */ + t_u8 ess:1; + /** Capability Bit Map : IBSS */ + t_u8 ibss:1; + /** Capability Bit Map : CF pollable */ + t_u8 cf_pollable:1; + /** Capability Bit Map : CF poll request */ + t_u8 cf_poll_rqst:1; + /** Capability Bit Map : privacy */ + t_u8 privacy:1; + /** Capability Bit Map : Short preamble */ + t_u8 short_preamble:1; + /** Capability Bit Map : PBCC */ + t_u8 pbcc:1; + /** Capability Bit Map : Channel agility */ + t_u8 chan_agility:1; + /** Capability Bit Map : Spectrum management */ + t_u8 spectrum_mgmt:1; + /** Capability Bit Map : Reserved */ + t_u8 rsrvd3:1; + /** Capability Bit Map : Short slot time */ + t_u8 short_slot_time:1; + /** Capability Bit Map : APSD */ + t_u8 Apsd:1; + /** Capability Bit Map : Reserved */ + t_u8 rsvrd2:1; + /** Capability Bit Map : DSS OFDM */ + t_u8 dsss_ofdm:1; + /** Capability Bit Map : Reserved */ + t_u8 rsrvd1:2; +} MLAN_PACK_END IEEEtypes_CapInfo_t, *pIEEEtypes_CapInfo_t; +#endif /* BIG_ENDIAN_SUPPORT */ + +/** IEEEtypes_CfParamSet_t */ +typedef MLAN_PACK_START struct _IEEEtypes_CfParamSet_t { + /** CF peremeter : Element ID */ + t_u8 element_id; + /** CF peremeter : Length */ + t_u8 len; + /** CF peremeter : Count */ + t_u8 cfp_cnt; + /** CF peremeter : Period */ + t_u8 cfp_period; + /** CF peremeter : Maximum duration */ + t_u16 cfp_max_duration; + /** CF peremeter : Remaining duration */ + t_u16 cfp_duration_remaining; +} MLAN_PACK_END IEEEtypes_CfParamSet_t, *pIEEEtypes_CfParamSet_t; + +/** IEEEtypes_IbssParamSet_t */ +typedef MLAN_PACK_START struct _IEEEtypes_IbssParamSet_t { + /** Element ID */ + t_u8 element_id; + /** Length */ + t_u8 len; + /** ATIM window value in milliseconds */ + t_u16 atim_window; +} MLAN_PACK_END IEEEtypes_IbssParamSet_t, *pIEEEtypes_IbssParamSet_t; + +/** IEEEtypes_SsParamSet_t */ +typedef MLAN_PACK_START union _IEEEtypes_SsParamSet_t { + /** SS parameter : CF parameter set */ + IEEEtypes_CfParamSet_t cf_param_set; + /** SS parameter : IBSS parameter set */ + IEEEtypes_IbssParamSet_t ibss_param_set; +} MLAN_PACK_END IEEEtypes_SsParamSet_t, *pIEEEtypes_SsParamSet_t; + +/** IEEEtypes_FhParamSet_t */ +typedef MLAN_PACK_START struct _IEEEtypes_FhParamSet_t { + /** FH parameter : Element ID */ + t_u8 element_id; + /** FH parameter : Length */ + t_u8 len; + /** FH parameter : Dwell time in milliseconds */ + t_u16 dwell_time; + /** FH parameter : Hop set */ + t_u8 hop_set; + /** FH parameter : Hop pattern */ + t_u8 hop_pattern; + /** FH parameter : Hop index */ + t_u8 hop_index; +} MLAN_PACK_END IEEEtypes_FhParamSet_t, *pIEEEtypes_FhParamSet_t; + +/** IEEEtypes_DsParamSet_t */ +typedef MLAN_PACK_START struct _IEEEtypes_DsParamSet_t { + /** DS parameter : Element ID */ + t_u8 element_id; + /** DS parameter : Length */ + t_u8 len; + /** DS parameter : Current channel */ + t_u8 current_chan; +} MLAN_PACK_END IEEEtypes_DsParamSet_t, *pIEEEtypes_DsParamSet_t; + +/** IEEEtypes_PhyParamSet_t */ +typedef MLAN_PACK_START union _IEEEtypes_PhyParamSet_t { + /** FH parameter set */ + IEEEtypes_FhParamSet_t fh_param_set; + /** DS parameter set */ + IEEEtypes_DsParamSet_t ds_param_set; +} MLAN_PACK_END IEEEtypes_PhyParamSet_t, *pIEEEtypes_PhyParamSet_t; + +/** IEEEtypes_ERPInfo_t */ +typedef MLAN_PACK_START struct _IEEEtypes_ERPInfo_t { + /** Element ID */ + t_u8 element_id; + /** Length */ + t_u8 len; + /** ERP flags */ + t_u8 erp_flags; +} MLAN_PACK_END IEEEtypes_ERPInfo_t, *pIEEEtypes_ERPInfo_t; + +/** IEEEtypes_AId_t */ +typedef t_u16 IEEEtypes_AId_t; + +/** IEEEtypes_StatusCode_t */ +typedef t_u16 IEEEtypes_StatusCode_t; + +/** Fixed size in assoc_resp */ +#define ASSOC_RESP_FIXED_SIZE 6 +/** IEEEtypes_AssocRsp_t */ +typedef MLAN_PACK_START struct _IEEEtypes_AssocRsp_t { + /** Capability information */ + IEEEtypes_CapInfo_t capability; + /** Association response status code */ + IEEEtypes_StatusCode_t status_code; + /** Association ID */ + IEEEtypes_AId_t a_id; + /** IE data buffer */ + t_u8 ie_buffer[1]; +} MLAN_PACK_END IEEEtypes_AssocRsp_t, *pIEEEtypes_AssocRsp_t; + +/** 802.11 supported rates */ +typedef t_u8 WLAN_802_11_RATES[WLAN_SUPPORTED_RATES]; + +/** cipher TKIP */ +#define WPA_CIPHER_TKIP 2 +/** cipher AES */ +#define WPA_CIPHER_AES_CCM 4 +/** AKM: 8021x */ +#define RSN_AKM_8021X 1 +/** AKM: PSK */ +#define RSN_AKM_PSK 2 +/** AKM: PSK SHA256 */ +#define RSN_AKM_PSK_SHA256 6 +#if defined(STA_SUPPORT) +/** Pairwise Cipher Suite length */ +#define PAIRWISE_CIPHER_SUITE_LEN 4 +/** AKM Suite length */ +#define AKM_SUITE_LEN 4 +/** MFPC bit in RSN capability */ +#define MFPC_BIT 7 +/** MFPR bit in RSN capability */ +#define MFPR_BIT 6 +/** PMF ORing mask */ +#define PMF_MASK 0x00c0 +#endif + +/** wpa_suite_t */ +typedef MLAN_PACK_START struct _wpa_suite_t { + /** OUI */ + t_u8 oui[3]; + /** tyep */ + t_u8 type; +} MLAN_PACK_END wpa_suite, wpa_suite_mcast_t; + +/** wpa_suite_ucast_t */ +typedef MLAN_PACK_START struct { + /* count */ + t_u16 count; + /** wpa_suite list */ + wpa_suite list[1]; +} MLAN_PACK_END wpa_suite_ucast_t, wpa_suite_auth_key_mgmt_t; + +/** IEEEtypes_Rsn_t */ +typedef MLAN_PACK_START struct _IEEEtypes_Rsn_t { + /** Rsn : Element ID */ + t_u8 element_id; + /** Rsn : Length */ + t_u8 len; + /** Rsn : version */ + t_u16 version; + /** Rsn : group cipher */ + wpa_suite_mcast_t group_cipher; + /** Rsn : pairwise cipher */ + wpa_suite_ucast_t pairwise_cipher; +} MLAN_PACK_END IEEEtypes_Rsn_t, *pIEEEtypes_Rsn_t; + +/** IEEEtypes_Wpa_t */ +typedef MLAN_PACK_START struct _IEEEtypes_Wpa_t { + /** Wpa : Element ID */ + t_u8 element_id; + /** Wpa : Length */ + t_u8 len; + /** Wpa : oui */ + t_u8 oui[4]; + /** version */ + t_u16 version; + /** Wpa : group cipher */ + wpa_suite_mcast_t group_cipher; + /** Wpa : pairwise cipher */ + wpa_suite_ucast_t pairwise_cipher; +} MLAN_PACK_END IEEEtypes_Wpa_t, *pIEEEtypes_Wpa_t; + +/** Maximum number of AC QOS queues available in the driver/firmware */ +#define MAX_AC_QUEUES 4 + +/** Data structure of WMM QoS information */ +typedef MLAN_PACK_START struct _IEEEtypes_WmmQosInfo_t { +#ifdef BIG_ENDIAN_SUPPORT + /** QoS UAPSD */ + t_u8 qos_uapsd:1; + /** Reserved */ + t_u8 reserved:3; + /** Parameter set count */ + t_u8 para_set_count:4; +#else + /** Parameter set count */ + t_u8 para_set_count:4; + /** Reserved */ + t_u8 reserved:3; + /** QoS UAPSD */ + t_u8 qos_uapsd:1; +#endif /* BIG_ENDIAN_SUPPORT */ +} MLAN_PACK_END IEEEtypes_WmmQosInfo_t, *pIEEEtypes_WmmQosInfo_t; + +/** Data structure of WMM Aci/Aifsn */ +typedef MLAN_PACK_START struct _IEEEtypes_WmmAciAifsn_t { +#ifdef BIG_ENDIAN_SUPPORT + /** Reserved */ + t_u8 reserved:1; + /** Aci */ + t_u8 aci:2; + /** Acm */ + t_u8 acm:1; + /** Aifsn */ + t_u8 aifsn:4; +#else + /** Aifsn */ + t_u8 aifsn:4; + /** Acm */ + t_u8 acm:1; + /** Aci */ + t_u8 aci:2; + /** Reserved */ + t_u8 reserved:1; +#endif /* BIG_ENDIAN_SUPPORT */ +} MLAN_PACK_END IEEEtypes_WmmAciAifsn_t, *pIEEEtypes_WmmAciAifsn_t; + +/** Data structure of WMM ECW */ +typedef MLAN_PACK_START struct _IEEEtypes_WmmEcw_t { +#ifdef BIG_ENDIAN_SUPPORT + /** Maximum Ecw */ + t_u8 ecw_max:4; + /** Minimum Ecw */ + t_u8 ecw_min:4; +#else + /** Minimum Ecw */ + t_u8 ecw_min:4; + /** Maximum Ecw */ + t_u8 ecw_max:4; +#endif /* BIG_ENDIAN_SUPPORT */ +} MLAN_PACK_END IEEEtypes_WmmEcw_t, *pIEEEtypes_WmmEcw_t; + +/** Data structure of WMM AC parameters */ +typedef MLAN_PACK_START struct _IEEEtypes_WmmAcParameters_t { + IEEEtypes_WmmAciAifsn_t aci_aifsn; /**< AciAifSn */ + IEEEtypes_WmmEcw_t ecw; /**< Ecw */ + t_u16 tx_op_limit; /**< Tx op limit */ +} MLAN_PACK_END IEEEtypes_WmmAcParameters_t, *pIEEEtypes_WmmAcParameters_t; + +/** Data structure of WMM Info IE */ +typedef MLAN_PACK_START struct _IEEEtypes_WmmInfo_t { + + /** + * WMM Info IE - Vendor Specific Header: + * element_id [221/0xdd] + * Len [7] + * Oui [00:50:f2] + * OuiType [2] + * OuiSubType [0] + * Version [1] + */ + IEEEtypes_VendorHeader_t vend_hdr; + + /** QoS information */ + IEEEtypes_WmmQosInfo_t qos_info; + +} MLAN_PACK_END IEEEtypes_WmmInfo_t, *pIEEEtypes_WmmInfo_t; + +/** Data structure of WMM parameter IE */ +typedef MLAN_PACK_START struct _IEEEtypes_WmmParameter_t { + /** + * WMM Parameter IE - Vendor Specific Header: + * element_id [221/0xdd] + * Len [24] + * Oui [00:50:f2] + * OuiType [2] + * OuiSubType [1] + * Version [1] + */ + IEEEtypes_VendorHeader_t vend_hdr; + + /** QoS information */ + IEEEtypes_WmmQosInfo_t qos_info; + /** Reserved */ + t_u8 reserved; + + /** AC Parameters Record WMM_AC_BE, WMM_AC_BK, WMM_AC_VI, WMM_AC_VO */ + IEEEtypes_WmmAcParameters_t ac_params[MAX_AC_QUEUES]; +} MLAN_PACK_END IEEEtypes_WmmParameter_t, *pIEEEtypes_WmmParameter_t; + +/** Enumerator for TSPEC direction */ +typedef MLAN_PACK_START enum _IEEEtypes_WMM_TSPEC_TS_Info_Direction_e { + + TSPEC_DIR_UPLINK = 0, + TSPEC_DIR_DOWNLINK = 1, + /* 2 is a reserved value */ + TSPEC_DIR_BIDIRECT = 3, + +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_Info_Direction_e; + +/** Enumerator for TSPEC PSB */ +typedef MLAN_PACK_START enum _IEEEtypes_WMM_TSPEC_TS_Info_PSB_e { + + TSPEC_PSB_LEGACY = 0, + TSPEC_PSB_TRIG = 1, + +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_Info_PSB_e; + +/** Enumerator for TSPEC Ack Policy */ +typedef MLAN_PACK_START enum _IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e { + + TSPEC_ACKPOLICY_NORMAL = 0, + TSPEC_ACKPOLICY_NOACK = 1, + /* 2 is reserved */ + TSPEC_ACKPOLICY_BLOCKACK = 3, + +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e; + +/** Enumerator for TSPEC Trafffice type */ +typedef MLAN_PACK_START enum _IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e { + + TSPEC_TRAFFIC_APERIODIC = 0, + TSPEC_TRAFFIC_PERIODIC = 1, + +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e; + +/** Data structure of WMM TSPEC information */ +typedef MLAN_PACK_START struct { +#ifdef BIG_ENDIAN_SUPPORT + t_u8 Reserved17_23:7; /* ! Reserved */ + t_u8 Schedule:1; + IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy:2; + t_u8 UserPri:3; /* ! 802.1d User Priority */ + IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior:1; /* ! + Legacy/Trigg + */ + t_u8 Aggregation:1; /* ! Reserved */ + t_u8 AccessPolicy2:1; /* ! */ + t_u8 AccessPolicy1:1; /* ! */ + IEEEtypes_WMM_TSPEC_TS_Info_Direction_e Direction:2; + t_u8 TID:4; /* ! Unique identifier */ + IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType:1; +#else + IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType:1; + t_u8 TID:4; /* ! Unique identifier */ + IEEEtypes_WMM_TSPEC_TS_Info_Direction_e Direction:2; + t_u8 AccessPolicy1:1; /* ! */ + t_u8 AccessPolicy2:1; /* ! */ + t_u8 Aggregation:1; /* ! Reserved */ + IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior:1; /* ! + Legacy/Trigg + */ + t_u8 UserPri:3; /* ! 802.1d User Priority */ + IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy:2; + t_u8 Schedule:1; + t_u8 Reserved17_23:7; /* ! Reserved */ +#endif +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_Info_t; + +/** Data structure of WMM TSPEC Nominal Size */ +typedef MLAN_PACK_START struct { +#ifdef BIG_ENDIAN_SUPPORT + t_u16 Fixed:1; /* ! 1: Fixed size given in Size, 0: Var, size + is nominal */ + t_u16 Size:15; /* ! Nominal size in octets */ +#else + t_u16 Size:15; /* ! Nominal size in octets */ + t_u16 Fixed:1; /* ! 1: Fixed size given in Size, 0: Var, size + is nominal */ +#endif +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_NomMSDUSize_t; + +/** Data structure of WMM TSPEC SBWA */ +typedef MLAN_PACK_START struct { +#ifdef BIG_ENDIAN_SUPPORT + t_u16 Whole:3; /* ! Whole portion */ + t_u16 Fractional:13; /* ! Fractional portion */ +#else + t_u16 Fractional:13; /* ! Fractional portion */ + t_u16 Whole:3; /* ! Whole portion */ +#endif +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_SBWA; + +/** Data structure of WMM TSPEC Body */ +typedef MLAN_PACK_START struct { + + IEEEtypes_WMM_TSPEC_TS_Info_t TSInfo; + IEEEtypes_WMM_TSPEC_NomMSDUSize_t NomMSDUSize; + t_u16 MaximumMSDUSize; + t_u32 MinServiceInterval; + t_u32 MaxServiceInterval; + t_u32 InactivityInterval; + t_u32 SuspensionInterval; + t_u32 ServiceStartTime; + t_u32 MinimumDataRate; + t_u32 MeanDataRate; + t_u32 PeakDataRate; + t_u32 MaxBurstSize; + t_u32 DelayBound; + t_u32 MinPHYRate; + IEEEtypes_WMM_TSPEC_SBWA SurplusBWAllowance; + t_u16 MediumTime; +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_Body_t; + +/** Data structure of WMM TSPEC all elements */ +typedef MLAN_PACK_START struct { + t_u8 ElementId; + t_u8 Len; + t_u8 OuiType[4]; /* 00:50:f2:02 */ + t_u8 OuiSubType; /* 01 */ + t_u8 Version; + + IEEEtypes_WMM_TSPEC_Body_t TspecBody; + +} MLAN_PACK_END IEEEtypes_WMM_TSPEC_t; + +/** WMM Action Category values */ +typedef MLAN_PACK_START enum _IEEEtypes_ActionCategory_e { + + IEEE_MGMT_ACTION_CATEGORY_SPECTRUM_MGMT = 0, + IEEE_MGMT_ACTION_CATEGORY_QOS = 1, + IEEE_MGMT_ACTION_CATEGORY_DLS = 2, + IEEE_MGMT_ACTION_CATEGORY_BLOCK_ACK = 3, + IEEE_MGMT_ACTION_CATEGORY_PUBLIC = 4, + IEEE_MGMT_ACTION_CATEGORY_RADIO_RSRC = 5, + IEEE_MGMT_ACTION_CATEGORY_FAST_BSS_TRANS = 6, + IEEE_MGMT_ACTION_CATEGORY_HT = 7, + + IEEE_MGMT_ACTION_CATEGORY_WNM = 10, + IEEE_MGMT_ACTION_CATEGORY_UNPROTECT_WNM = 11, + + IEEE_MGMT_ACTION_CATEGORY_WMM_TSPEC = 17 +} MLAN_PACK_END IEEEtypes_ActionCategory_e; + +/** WMM TSPEC operations */ +typedef MLAN_PACK_START enum _IEEEtypes_WMM_Tspec_Action_e { + + TSPEC_ACTION_CODE_ADDTS_REQ = 0, + TSPEC_ACTION_CODE_ADDTS_RSP = 1, + TSPEC_ACTION_CODE_DELTS = 2, + +} MLAN_PACK_END IEEEtypes_WMM_Tspec_Action_e; + +/** WMM TSPEC Category Action Base */ +typedef MLAN_PACK_START struct { + + IEEEtypes_ActionCategory_e category; + IEEEtypes_WMM_Tspec_Action_e action; + t_u8 dialogToken; + +} MLAN_PACK_END IEEEtypes_WMM_Tspec_Action_Base_Tspec_t; + +/** WMM TSPEC AddTS request structure */ +typedef MLAN_PACK_START struct { + + IEEEtypes_WMM_Tspec_Action_Base_Tspec_t tspecAct; + t_u8 statusCode; + IEEEtypes_WMM_TSPEC_t tspecIE; + + /* Place holder for additional elements after the TSPEC */ + t_u8 subElem[256]; + +} MLAN_PACK_END IEEEtypes_Action_WMM_AddTsReq_t; + +/** WMM TSPEC AddTS response structure */ +typedef MLAN_PACK_START struct { + IEEEtypes_WMM_Tspec_Action_Base_Tspec_t tspecAct; + t_u8 statusCode; + IEEEtypes_WMM_TSPEC_t tspecIE; + + /* Place holder for additional elements after the TSPEC */ + t_u8 subElem[256]; + +} MLAN_PACK_END IEEEtypes_Action_WMM_AddTsRsp_t; + +/** WMM TSPEC DelTS structure */ +typedef MLAN_PACK_START struct { + IEEEtypes_WMM_Tspec_Action_Base_Tspec_t tspecAct; + t_u8 reasonCode; + IEEEtypes_WMM_TSPEC_t tspecIE; + +} MLAN_PACK_END IEEEtypes_Action_WMM_DelTs_t; + +/** union of WMM TSPEC structures */ +typedef MLAN_PACK_START union { + IEEEtypes_WMM_Tspec_Action_Base_Tspec_t tspecAct; + + IEEEtypes_Action_WMM_AddTsReq_t addTsReq; + IEEEtypes_Action_WMM_AddTsRsp_t addTsRsp; + IEEEtypes_Action_WMM_DelTs_t delTs; + +} MLAN_PACK_END IEEEtypes_Action_WMMAC_t; + +/** union of WMM TSPEC & Action category */ +typedef MLAN_PACK_START union { + IEEEtypes_ActionCategory_e category; + + IEEEtypes_Action_WMMAC_t wmmAc; + +} MLAN_PACK_END IEEEtypes_ActionFrame_t; + +/** Data structure for subband set */ +typedef MLAN_PACK_START struct _IEEEtypes_SubbandSet_t { + /** First channel */ + t_u8 first_chan; + /** Number of channels */ + t_u8 no_of_chan; + /** Maximum Tx power in dBm */ + t_u8 max_tx_pwr; +} MLAN_PACK_END IEEEtypes_SubbandSet_t, *pIEEEtypes_SubbandSet_t; + +#ifdef STA_SUPPORT +/** Data structure for Country IE */ +typedef MLAN_PACK_START struct _IEEEtypes_CountryInfoSet_t { + /** Element ID */ + t_u8 element_id; + /** Length */ + t_u8 len; + /** Country code */ + t_u8 country_code[COUNTRY_CODE_LEN]; + /** Set of subbands */ + IEEEtypes_SubbandSet_t sub_band[1]; +} MLAN_PACK_END IEEEtypes_CountryInfoSet_t, *pIEEEtypes_CountryInfoSet_t; + +/** Data structure for Country IE full set */ +typedef MLAN_PACK_START struct _IEEEtypes_CountryInfoFullSet_t { + /** Element ID */ + t_u8 element_id; + /** Length */ + t_u8 len; + /** Country code */ + t_u8 country_code[COUNTRY_CODE_LEN]; + /** Set of subbands */ + IEEEtypes_SubbandSet_t sub_band[MRVDRV_MAX_SUBBAND_802_11D]; +} MLAN_PACK_END IEEEtypes_CountryInfoFullSet_t, + *pIEEEtypes_CountryInfoFullSet_t; + +#endif /* STA_SUPPORT */ + +/** Data structure for Link ID */ +typedef MLAN_PACK_START struct _IEEEtypes_LinkIDElement_t { + /** Element ID */ + t_u8 element_id; + /** Length */ + t_u8 len; + /** bssid */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; + /** initial sta address */ + t_u8 init_sta[MLAN_MAC_ADDR_LENGTH]; + /** respose sta address */ + t_u8 resp_sta[MLAN_MAC_ADDR_LENGTH]; +} MLAN_PACK_END IEEEtypes_LinkIDElement_t, *pIEEEtypes_LinkIDElement_t; + +/** HT Capabilities Data */ +typedef struct MLAN_PACK_START _HTCap_t { + /** HT Capabilities Info field */ + t_u16 ht_cap_info; + /** A-MPDU Parameters field */ + t_u8 ampdu_param; + /** Supported MCS Set field */ + t_u8 supported_mcs_set[16]; + /** HT Extended Capabilities field */ + t_u16 ht_ext_cap; + /** Transmit Beamforming Capabilities field */ + t_u32 tx_bf_cap; + /** Antenna Selection Capability field */ + t_u8 asel; +} MLAN_PACK_END HTCap_t, *pHTCap_t; + +/** HT Information Data */ +typedef struct MLAN_PACK_START _HTInfo_t { + /** Primary channel */ + t_u8 pri_chan; + /** Field 2 */ + t_u8 field2; + /** Field 3 */ + t_u16 field3; + /** Field 4 */ + t_u16 field4; + /** Bitmap indicating MCSs supported by all HT STAs in the BSS */ + t_u8 basic_mcs_set[16]; +} MLAN_PACK_END HTInfo_t, *pHTInfo_t; + +/** 20/40 BSS Coexistence Data */ +typedef struct MLAN_PACK_START _BSSCo2040_t { + /** 20/40 BSS Coexistence value */ + t_u8 bss_co_2040_value; +} MLAN_PACK_END BSSCo2040_t, *pBSSCo2040_t; + +#ifdef BIG_ENDIAN_SUPPORT +/** Extended Capabilities Data */ +typedef struct MLAN_PACK_START _ExtCap_t { + /** Extended Capabilities value */ + t_u8 rsvdBit63:1; /* bit 63 */ + t_u8 OperModeNtf:1; /* bit 62 */ + t_u8 TDLSWildBandwidth:1; /* bit 61 */ + t_u8 rsvdBit60:1; /* bit 60 */ + t_u8 rsvdBit59:1; /* bit 59 */ + t_u8 rsvdBit58:1; /* bit 58 */ + t_u8 rsvdBit57:1; /* bit 57 */ + t_u8 rsvdBit56:1; /* bit 56 */ + t_u8 rsvdBit55:1; /* bit 55 */ + t_u8 rsvdBit54:1; /* bit 54 */ + t_u8 rsvdBit53:1; /* bit 53 */ + t_u8 rsvdBit52:1; /* bit 52 */ + t_u8 rsvdBit51:1; /* bit 51 */ + t_u8 rsvdBit50:1; /* bit 50 */ + t_u8 rsvdBit49:1; /* bit 49 */ + t_u8 rsvdBit48:1; /* bit 48 */ + t_u8 rsvdBit47:1; /* bit 47 */ + t_u8 rsvdBit46:1; /* bit 46 */ + t_u8 rsvdBit45:1; /* bit 45 */ + t_u8 rsvdBit44:1; /* bit 44 */ + t_u8 rsvdBit43:1; /* bit 43 */ + t_u8 rsvdBit42:1; /* bit 42 */ + t_u8 rsvdBit41:1; /* bit 41 */ + t_u8 rsvdBit40:1; /* bit 40 */ + t_u8 TDLSChlSwitchProhib:1; /* bit 39 */ + t_u8 TDLSProhibited:1; /* bit 38 */ + t_u8 TDLSSupport:1; /* bit 37 */ + t_u8 MSGCF_Capa:1; /* bit 36 */ + t_u8 Reserved35:1; /* bit 35 */ + t_u8 SSPN_Interface:1; /* bit 34 */ + t_u8 EBR:1; /* bit 33 */ + t_u8 Qos_Map:1; /* bit 32 */ + t_u8 Interworking:1; /* bit 31 */ + t_u8 TDLSChannelSwitching:1; /* bit 30 */ + t_u8 TDLSPeerPSMSupport:1; /* bit 29 */ + t_u8 TDLSPeerUAPSDSupport:1; /* bit 28 */ + t_u8 UTC:1; /* bit 27 */ + t_u8 DMS:1; /* bit 26 */ + t_u8 SSID_List:1; /* bit 25 */ + t_u8 ChannelUsage:1; /* bit 24 */ + t_u8 TimingMeasurement:1; /* bit 23 */ + t_u8 MultipleBSSID:1; /* bit 22 */ + t_u8 AC_StationCount:1; /* bit 21 */ + t_u8 QoSTrafficCap:1; /* bit 20 */ + t_u8 BSS_Transition:1; /* bit 19 */ + t_u8 TIM_Broadcast:1; /* bit 18 */ + t_u8 WNM_Sleep:1; /* bit 17 */ + t_u8 TFS:1; /* bit 16 */ + t_u8 GeospatialLocation:1; /* bit 15 */ + t_u8 CivicLocation:1; /* bit 14 */ + t_u8 CollocatedIntf:1; /* bit 13 */ + t_u8 ProxyARPService:1; /* bit 12 */ + t_u8 FMS:1; /* bit 11 */ + t_u8 LocationTracking:1; /* bit 10 */ + t_u8 MulticastDiagnostics:1; /* bit 9 */ + t_u8 Diagnostics:1; /* bit 8 */ + t_u8 Event:1; /* bit 7 */ + t_u8 SPSMP_Support:1; /* bit 6 */ + t_u8 Reserved5:1; /* bit 5 */ + t_u8 PSMP_Capable:1; /* bit 4 */ + t_u8 RejectUnadmFrame:1; /* bit 3 */ + t_u8 ExtChanSwitching:1; /* bit 2 */ + t_u8 Reserved1:1; /* bit 1 */ + t_u8 BSS_CoexistSupport:1; /* bit 0 */ +} MLAN_PACK_END ExtCap_t, *pExtCap_t; +#else +/** Extended Capabilities Data */ +typedef struct MLAN_PACK_START _ExtCap_t { + /** Extended Capabilities value */ + t_u8 BSS_CoexistSupport:1; /* bit 0 */ + t_u8 Reserved1:1; /* bit 1 */ + t_u8 ExtChanSwitching:1; /* bit 2 */ + t_u8 RejectUnadmFrame:1; /* bit 3 */ + t_u8 PSMP_Capable:1; /* bit 4 */ + t_u8 Reserved5:1; /* bit 5 */ + t_u8 SPSMP_Support:1; /* bit 6 */ + t_u8 Event:1; /* bit 7 */ + t_u8 Diagnostics:1; /* bit 8 */ + t_u8 MulticastDiagnostics:1; /* bit 9 */ + t_u8 LocationTracking:1; /* bit 10 */ + t_u8 FMS:1; /* bit 11 */ + t_u8 ProxyARPService:1; /* bit 12 */ + t_u8 CollocatedIntf:1; /* bit 13 */ + t_u8 CivicLocation:1; /* bit 14 */ + t_u8 GeospatialLocation:1; /* bit 15 */ + t_u8 TFS:1; /* bit 16 */ + t_u8 WNM_Sleep:1; /* bit 17 */ + t_u8 TIM_Broadcast:1; /* bit 18 */ + t_u8 BSS_Transition:1; /* bit 19 */ + t_u8 QoSTrafficCap:1; /* bit 20 */ + t_u8 AC_StationCount:1; /* bit 21 */ + t_u8 MultipleBSSID:1; /* bit 22 */ + t_u8 TimingMeasurement:1; /* bit 23 */ + t_u8 ChannelUsage:1; /* bit 24 */ + t_u8 SSID_List:1; /* bit 25 */ + t_u8 DMS:1; /* bit 26 */ + t_u8 UTC:1; /* bit 27 */ + t_u8 TDLSPeerUAPSDSupport:1; /* bit 28 */ + t_u8 TDLSPeerPSMSupport:1; /* bit 29 */ + t_u8 TDLSChannelSwitching:1; /* bit 30 */ + t_u8 Interworking:1; /* bit 31 */ + t_u8 Qos_Map:1; /* bit 32 */ + t_u8 EBR:1; /* bit 33 */ + t_u8 SSPN_Interface:1; /* bit 34 */ + t_u8 Reserved35:1; /* bit 35 */ + t_u8 MSGCF_Capa:1; /* bit 36 */ + t_u8 TDLSSupport:1; /* bit 37 */ + t_u8 TDLSProhibited:1; /* bit 38 */ + t_u8 TDLSChlSwitchProhib:1; /* bit 39 */ + t_u8 rsvdBit40:1; /* bit 40 */ + t_u8 rsvdBit41:1; /* bit 41 */ + t_u8 rsvdBit42:1; /* bit 42 */ + t_u8 rsvdBit43:1; /* bit 43 */ + t_u8 rsvdBit44:1; /* bit 44 */ + t_u8 rsvdBit45:1; /* bit 45 */ + t_u8 rsvdBit46:1; /* bit 46 */ + t_u8 rsvdBit47:1; /* bit 47 */ + t_u8 rsvdBit48:1; /* bit 48 */ + t_u8 rsvdBit49:1; /* bit 49 */ + t_u8 rsvdBit50:1; /* bit 50 */ + t_u8 rsvdBit51:1; /* bit 51 */ + t_u8 rsvdBit52:1; /* bit 52 */ + t_u8 rsvdBit53:1; /* bit 53 */ + t_u8 rsvdBit54:1; /* bit 54 */ + t_u8 rsvdBit55:1; /* bit 55 */ + t_u8 rsvdBit56:1; /* bit 56 */ + t_u8 rsvdBit57:1; /* bit 57 */ + t_u8 rsvdBit58:1; /* bit 58 */ + t_u8 rsvdBit59:1; /* bit 59 */ + t_u8 rsvdBit60:1; /* bit 60 */ + t_u8 TDLSWildBandwidth:1; /* bit 61 */ + t_u8 OperModeNtf:1; /* bit 62 */ + t_u8 rsvdBit63:1; /* bit 63 */ +} MLAN_PACK_END ExtCap_t, *pExtCap_t; +#endif + +/** Overlapping BSS Scan Parameters Data */ +typedef struct MLAN_PACK_START _OverlapBSSScanParam_t { + /** OBSS Scan Passive Dwell in milliseconds */ + t_u16 obss_scan_passive_dwell; + /** OBSS Scan Active Dwell in milliseconds */ + t_u16 obss_scan_active_dwell; + /** BSS Channel Width Trigger Scan Interval in seconds */ + t_u16 bss_chan_width_trigger_scan_int; + /** OBSS Scan Passive Total Per Channel */ + t_u16 obss_scan_passive_total; + /** OBSS Scan Active Total Per Channel */ + t_u16 obss_scan_active_total; + /** BSS Width Channel Transition Delay Factor */ + t_u16 bss_width_chan_trans_delay; + /** OBSS Scan Activity Threshold */ + t_u16 obss_scan_active_threshold; +} MLAN_PACK_END OBSSScanParam_t, *pOBSSScanParam_t; + +/** HT Capabilities IE */ +typedef MLAN_PACK_START struct _IEEEtypes_HTCap_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** HTCap struct */ + HTCap_t ht_cap; +} MLAN_PACK_END IEEEtypes_HTCap_t, *pIEEEtypes_HTCap_t; + +/** HT Information IE */ +typedef MLAN_PACK_START struct _IEEEtypes_HTInfo_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** HTInfo struct */ + HTInfo_t ht_info; +} MLAN_PACK_END IEEEtypes_HTInfo_t, *pIEEEtypes_HTInfo_t; + +/** 20/40 BSS Coexistence IE */ +typedef MLAN_PACK_START struct _IEEEtypes_2040BSSCo_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** BSSCo2040_t struct */ + BSSCo2040_t bss_co_2040; +} MLAN_PACK_END IEEEtypes_2040BSSCo_t, *pIEEEtypes_2040BSSCo_t; + +/** Extended Capabilities IE */ +typedef MLAN_PACK_START struct _IEEEtypes_ExtCap_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** ExtCap_t struct */ + ExtCap_t ext_cap; +} MLAN_PACK_END IEEEtypes_ExtCap_t, *pIEEEtypes_ExtCap_t; + +/** Overlapping BSS Scan Parameters IE */ +typedef MLAN_PACK_START struct _IEEEtypes_OverlapBSSScanParam_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** OBSSScanParam_t struct */ + OBSSScanParam_t obss_scan_param; +} MLAN_PACK_END IEEEtypes_OverlapBSSScanParam_t, + *pIEEEtypes_OverlapBSSScanParam_t; + +/** VHT MCS rate set field, refer to 802.11ac */ +typedef MLAN_PACK_START struct _VHT_MCS_set { + t_u16 rx_mcs_map; + t_u16 rx_max_rate; /* bit 29-31 reserved */ + t_u16 tx_mcs_map; + t_u16 tx_max_rate; /* bit 61-63 reserved */ +} MLAN_PACK_END VHT_MCS_set_t, *pVHT_MCS_set_t; + +/** VHT Capabilities info field, reference 802.11ac D1.4 p89 */ +typedef MLAN_PACK_START struct _VHT_capa { +#if 0 +#ifdef BIG_ENDIAN_SUPPORT + t_u8 mpdu_max_len:2; + t_u8 chan_width:2; + t_u8 rx_LDPC:1; + t_u8 sgi_80:1; + t_u8 sgi_160:1; + t_u8 tx_STBC:1; + t_u8 rx_STBC:3; + t_u8 SU_beamformer_capa:1; + t_u8 SU_beamformee_capa:1; + t_u8 beamformer_ante_num:3; + t_u8 sounding_dim_num:3; + t_u8 MU_beamformer_capa:1; + t_u8 MU_beamformee_capa:1; + t_u8 VHT_TXOP_ps:1; + t_u8 HTC_VHT_capa:1; + t_u8 max_ampdu_len:3; + t_u8 link_apapt_capa:2; + t_u8 reserved_1:4; +#else + t_u8 reserved_1:4; + t_u8 link_apapt_capa:2; + t_u8 max_ampdu_len:3; + t_u8 HTC_VHT_capa:1; + t_u8 VHT_TXOP_ps:1; + t_u8 MU_beamformee_capa:1; + t_u8 MU_beamformer_capa:1; + t_u8 sounding_dim_num:3; + t_u8 beamformer_ante_num:3; + t_u8 SU_beamformee_capa:1; + t_u8 SU_beamformer_capa:1; + t_u8 rx_STBC:3; + t_u8 tx_STBC:1; + t_u8 sgi_160:1; + t_u8 sgi_80:1; + t_u8 rx_LDPC:1; + t_u8 chan_width:2; + t_u8 mpdu_max_len:2; +#endif /* BIG_ENDIAN_SUPPORT */ +#endif + t_u32 vht_cap_info; + VHT_MCS_set_t mcs_sets; +} MLAN_PACK_END VHT_capa_t, *pVHT_capa_t; + +/** VHT Capabilities IE */ +typedef MLAN_PACK_START struct _IEEEtypes_VHTCap_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + VHT_capa_t vht_cap; +} MLAN_PACK_END IEEEtypes_VHTCap_t, *pIEEEtypes_VHTCap_t; + +#define VHT_CAP_CHWD_80MHZ 0 +#define VHT_CAP_CHWD_160MHZ 1 +#define VHT_CAP_CHWD_80_80MHZ 2 + +/** VHT Operations IE */ +typedef MLAN_PACK_START struct _IEEEtypes_VHTOprat_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + t_u8 chan_width; + t_u8 chan_center_freq_1; + t_u8 chan_center_freq_2; + /** Basic MCS set map, each 2 bits stands for a Nss */ + t_u16 basic_MCS_map; +} MLAN_PACK_END IEEEtypes_VHTOprat_t, *pIEEEtypes_VHTOprat_t; + +#define VHT_OPER_CHWD_20_40MHZ 0 +#define VHT_OPER_CHWD_80MHZ 1 +#define VHT_OPER_CHWD_160MHZ 2 +#define VHT_OPER_CHWD_80_80MHZ 3 + +/** VHT Transmit Power Envelope IE */ +typedef MLAN_PACK_START struct _IEEEtypes_VHTtxpower_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + t_u8 max_tx_power; + t_u8 chan_center_freq; + t_u8 chan_width; +} MLAN_PACK_END IEEEtypes_VHTtxpower_t, *pIEEEtypes_VHTtxpower_t; + +/** Extended Power Constraint IE */ +typedef MLAN_PACK_START struct _IEEEtypes_ExtPwerCons_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** channel width */ + t_u8 chan_width; + /** local power constraint */ + t_u8 local_power_cons; +} MLAN_PACK_END IEEEtypes_ExtPwerCons_t, *pIEEEtypes_ExtPwerCons_t; + +/** Extended BSS Load IE */ +typedef MLAN_PACK_START struct _IEEEtypes_ExtBSSload_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + t_u8 MU_MIMO_capa_count; + t_u8 stream_underutilization; + t_u8 VHT40_util; + t_u8 VHT80_util; + t_u8 VHT160_util; +} MLAN_PACK_END IEEEtypes_ExtBSSload_t, *pIEEEtypes_ExtBSSload_t; + +/** Quiet Channel IE */ +typedef MLAN_PACK_START struct _IEEEtypes_QuietChan_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + t_u8 AP_quiet_mode; + t_u8 quiet_count; + t_u8 quiet_period; + t_u16 quiet_dur; + t_u16 quiet_offset; +} MLAN_PACK_END IEEEtypes_QuietChan_t, *pIEEEtypes_QuietChan_t; + +/** Wide Bandwidth Channel Switch IE */ +typedef MLAN_PACK_START struct _IEEEtypes_BWSwitch_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + t_u8 new_chan_width; + t_u8 new_chan_center_freq_1; + t_u8 new_chan_center_freq_2; +} MLAN_PACK_END IEEEtypes_BWSwitch_t, *pIEEEtypes_BWSwitch_t; + +/** AID IE */ +typedef MLAN_PACK_START struct _IEEEtypes_AID_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** AID number */ + t_u16 AID; +} MLAN_PACK_END IEEEtypes_AID_t, *pIEEEtypes_AID_t; + +/** Operating Mode Notificaton IE */ +typedef MLAN_PACK_START struct _IEEEtypes_OperModeNtf_t { + /** Generic IE header */ + IEEEtypes_Header_t ieee_hdr; + /** Operating Mode */ + t_u8 oper_mode; +} MLAN_PACK_END IEEEtypes_OperModeNtf_t, *pIEEEtypes_OperModeNtf_t; + +/** Maximum number of subbands in the IEEEtypes_SupportedChannels_t structure */ +#define WLAN_11H_MAX_SUBBANDS 5 + +/** Maximum number of DFS channels configured in IEEEtypes_IBSS_DFS_t */ +#define WLAN_11H_MAX_IBSS_DFS_CHANNELS 25 + +/** IEEE Power Constraint element (7.3.2.15) */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 32 */ + t_u8 len; /**< Element length after id and len */ + t_u8 local_constraint; + /**< Local power constraint applied to 11d + chan info */ +} MLAN_PACK_END IEEEtypes_PowerConstraint_t; + +/** IEEE Power Capability element (7.3.2.16) */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 33 */ + t_u8 len; /**< Element length after id and len */ + t_s8 min_tx_power_capability; + /**< Minimum Transmit power (dBm) */ + t_s8 max_tx_power_capability; + /**< Maximum Transmit power (dBm) */ +} MLAN_PACK_END IEEEtypes_PowerCapability_t; + +/** IEEE TPC Report element (7.3.2.18) */ +typedef MLAN_PACK_START struct { + t_u8 element_id;/**< IEEE Element ID = 35 */ + t_u8 len; /**< Element length after id and len */ + t_s8 tx_power; /**< Max power used to transmit the TPC Report frame (dBm) */ + t_s8 link_margin; + /**< Link margin when TPC Request received (dB) */ +} MLAN_PACK_END IEEEtypes_TPCReport_t; + +/* IEEE Supported Channel sub-band description (7.3.2.19) */ +/** + * Sub-band description used in the supported channels element. + */ +typedef MLAN_PACK_START struct { + t_u8 start_chan;/**< Starting channel in the subband */ + t_u8 num_chans; /**< Number of channels in the subband */ + +} MLAN_PACK_END IEEEtypes_SupportChan_Subband_t; + +/* IEEE Supported Channel element (7.3.2.19) */ +/** + * Sent in association requests. Details the sub-bands and number + * of channels supported in each subband + */ +typedef MLAN_PACK_START struct { + t_u8 element_id;/**< IEEE Element ID = 36 */ + t_u8 len; /**< Element length after id and len */ + + /** Configured sub-bands information in the element */ + IEEEtypes_SupportChan_Subband_t subband[WLAN_11H_MAX_SUBBANDS]; + +} MLAN_PACK_END IEEEtypes_SupportedChannels_t; + +/* IEEE Channel Switch Announcement Element (7.3.2.20) */ +/** + * Provided in beacons and probe responses. Used to advertise when + * and to which channel it is changing to. Only starting STAs in + * an IBSS and APs are allowed to originate a chan switch element. + */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 37 */ + t_u8 len; /**< Element length after id and len */ + t_u8 chan_switch_mode; /**< STA should not transmit any frames if 1 */ + t_u8 new_channel_num; /**< Channel # that AP/IBSS is moving to */ + t_u8 chan_switch_count; /**< # of TBTTs before channel switch */ + +} MLAN_PACK_END IEEEtypes_ChanSwitchAnn_t; + +/* IEEE Wide Bandwidth Channel Switch Element */ +/** + * Provided in beacons and probe responses. Used to advertise when + * and to which channel it is changing to. Only starting STAs in + * an IBSS and APs are allowed to originate a wide bandwidth chan + * switch element. + */ +typedef MLAN_PACK_START struct { + /** Generic IE header IEEE Element ID = 194*/ + IEEEtypes_Header_t ieee_hdr; + t_u8 new_channel_width; + t_u8 new_channel_center_freq0; + t_u8 new_channel_center_freq1; +} MLAN_PACK_END IEEEtypes_WideBWChanSwitch_t; + +/* IEEE VHT Transmit Power Envelope Element */ +/** + * Provided in beacons and probe responses. Used to advertise the max + * TX power in sepeate bandwidth and as a sub element of Channel Switch + * Wrapper IE. + */ +typedef MLAN_PACK_START struct { + /** Generic IE header IEEE Element ID = 195*/ + IEEEtypes_Header_t ieee_hdr; + t_u8 tpc_info; /**< Transmit Power Information>*/ + t_u8 local_max_tp_20mhz;/**< Local Maximum Transmit Power for 20 MHZ>*/ + t_u8 local_max_tp_40mhz;/**< Local Maximum Transmit Power for 40 MHZ>*/ + t_u8 local_max_tp_80mhz;/**< Local Maximum Transmit Power for 80 MHZ>*/ +} MLAN_PACK_END IEEEtypes_VhtTpcEnvelope_t; + +/* IEEE Quiet Period Element (7.3.2.23) */ +/** + * Provided in beacons and probe responses. Indicates times during + * which the STA should not be transmitting data. Only starting STAs in + * an IBSS and APs are allowed to originate a quiet element. + */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 40 */ + t_u8 len; /**< Element length after id and len */ + t_u8 quiet_count; /**< Number of TBTTs until beacon with the quiet period */ + t_u8 quiet_period; /**< Regular quiet period, # of TBTTS between periods */ + t_u16 quiet_duration; + /**< Duration of the quiet period in TUs */ + t_u16 quiet_offset; /**< Offset in TUs from the TBTT for the quiet period */ + +} MLAN_PACK_END IEEEtypes_Quiet_t; + +/** +*** @brief Map octet of the basic measurement report (7.3.2.22.1) +**/ +typedef MLAN_PACK_START struct { +#ifdef BIG_ENDIAN_SUPPORT + /**< Reserved */ + t_u8 rsvd5_7:3; + /**< Channel is unmeasured */ + t_u8 unmeasured:1; + /**< Radar detected on channel */ + t_u8 radar:1; + /**< Unidentified signal found on channel */ + t_u8 unidentified_sig:1; + /**< OFDM preamble detected on channel */ + t_u8 ofdm_preamble:1; + /**< At least one valid MPDU received on channel */ + t_u8 bss:1; +#else + /**< At least one valid MPDU received on channel */ + t_u8 bss:1; + /**< OFDM preamble detected on channel */ + t_u8 ofdm_preamble:1; + /**< Unidentified signal found on channel */ + t_u8 unidentified_sig:1; + /**< Radar detected on channel */ + t_u8 radar:1; + /**< Channel is unmeasured */ + t_u8 unmeasured:1; + /**< Reserved */ + t_u8 rsvd5_7:3; +#endif /* BIG_ENDIAN_SUPPORT */ + +} MLAN_PACK_END MeasRptBasicMap_t; + +/* IEEE DFS Channel Map field (7.3.2.24) */ +/** + * Used to list supported channels and provide a octet "map" field which + * contains a basic measurement report for that channel in the + * IEEEtypes_IBSS_DFS_t element + */ +typedef MLAN_PACK_START struct { + t_u8 channel_number; /**< Channel number */ + MeasRptBasicMap_t rpt_map; + /**< Basic measurement report for the channel */ + +} MLAN_PACK_END IEEEtypes_ChannelMap_t; + +/* IEEE IBSS DFS Element (7.3.2.24) */ +/** + * IBSS DFS element included in ad hoc beacons and probe responses. + * Provides information regarding the IBSS DFS Owner as well as the + * originating STAs supported channels and basic measurement results. + */ +typedef MLAN_PACK_START struct { + t_u8 element_id; /**< IEEE Element ID = 41 */ + t_u8 len; /**< Element length after id and len */ + t_u8 dfs_owner[MLAN_MAC_ADDR_LENGTH]; + /**< DFS Owner STA Address */ + t_u8 dfs_recovery_interval; /**< DFS Recovery time in TBTTs */ + + /** Variable length map field, one Map entry for each supported channel */ + IEEEtypes_ChannelMap_t channel_map[WLAN_11H_MAX_IBSS_DFS_CHANNELS]; + +} MLAN_PACK_END IEEEtypes_IBSS_DFS_t; + +/* 802.11h BSS information kept for each BSSID received in scan results */ +/** + * IEEE BSS information needed from scan results for later processing in + * join commands + */ +typedef struct { + t_u8 sensed_11h; + /**< Capability bit set or 11h IE found in this BSS */ + + IEEEtypes_PowerConstraint_t power_constraint; + /**< Power Constraint IE */ + IEEEtypes_PowerCapability_t power_capability; + /**< Power Capability IE */ + IEEEtypes_TPCReport_t tpc_report; /**< TPC Report IE */ + IEEEtypes_ChanSwitchAnn_t chan_switch_ann;/**< Channel Switch Announcement IE */ + IEEEtypes_Quiet_t quiet; /**< Quiet IE */ + IEEEtypes_IBSS_DFS_t ibss_dfs; /**< IBSS DFS Element IE */ + +} wlan_11h_bss_info_t; + +/** Ethernet packet type for TDLS */ +#define MLAN_ETHER_PKT_TYPE_TDLS_ACTION (0x890D) + +/*802.11z TDLS action frame type and strcuct */ +typedef MLAN_PACK_START struct { + /* link indentifier ie =101 */ + t_u8 element_id; + /* len = 18 */ + t_u8 len; + /** bssid */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; + /** init sta mac address */ + t_u8 init_sta[MLAN_MAC_ADDR_LENGTH]; + /** resp sta mac address */ + t_u8 resp_sta[MLAN_MAC_ADDR_LENGTH]; +} MLAN_PACK_END IEEEtypes_tdls_linkie; + +/** action code for tdls setup request */ +#define TDLS_SETUP_REQUEST 0 +/** action code for tdls setup response */ +#define TDLS_SETUP_RESPONSE 1 +/** action code for tdls setup confirm */ +#define TDLS_SETUP_CONFIRM 2 +/** action code for tdls tear down */ +#define TDLS_TEARDOWN 3 +/** action code for tdls traffic indication */ +#define TDLS_PEER_TRAFFIC_INDICATION 4 +/** action code for tdls channel switch request */ +#define TDLS_CHANNEL_SWITCH_REQUEST 5 +/** action code for tdls channel switch response */ +#define TDLS_CHANNEL_SWITCH_RESPONSE 6 +/** action code for tdls psm request */ +#define TDLS_PEER_PSM_REQUEST 7 +/** action code for tdls psm response */ +#define TDLS_PEER_PSM_RESPONSE 8 +/** action code for tdls traffic response */ +#define TDLS_PEER_TRAFFIC_RESPONSE 9 +/** action code for tdls discovery request */ +#define TDLS_DISCOVERY_REQUEST 10 +/** action code for TDLS discovery response */ +#define TDLS_DISCOVERY_RESPONSE 14 +/** category public */ +#define CATEGORY_PUBLIC 4 + +/** action code for 20/40 BSS Coexsitence Management frame */ +#define BSS_20_40_COEX 0 + +#ifdef STA_SUPPORT +/** Macro for maximum size of scan response buffer */ +#define MAX_SCAN_RSP_BUF (16 * 1024) + +/** Maximum number of channels that can be sent in user scan config */ +#define WLAN_USER_SCAN_CHAN_MAX 50 + +/** Maximum length of SSID list */ +#define MRVDRV_MAX_SSID_LIST_LENGTH 10 + +/** Scan all the channels in specified band */ +#define BAND_SPECIFIED 0x80 + +/** + * IOCTL SSID List sub-structure sent in wlan_ioctl_user_scan_cfg + * + * Used to specify SSID specific filters as well as SSID pattern matching + * filters for scan result processing in firmware. + */ +typedef MLAN_PACK_START struct _wlan_user_scan_ssid { + /** SSID */ + t_u8 ssid[MLAN_MAX_SSID_LENGTH + 1]; + /** Maximum length of SSID */ + t_u8 max_len; +} MLAN_PACK_END wlan_user_scan_ssid; + +/** + * @brief IOCTL channel sub-structure sent in wlan_ioctl_user_scan_cfg + * + * Multiple instances of this structure are included in the IOCTL command + * to configure a instance of a scan on the specific channel. + */ +typedef MLAN_PACK_START struct _wlan_user_scan_chan { + /** Channel Number to scan */ + t_u8 chan_number; + /** Radio type: 'B/G' Band = 0, 'A' Band = 1 */ + t_u8 radio_type; + /** Scan type: Active = 1, Passive = 2 */ + t_u8 scan_type; + /** Reserved */ + t_u8 reserved; + /** Scan duration in milliseconds; if 0 default used */ + t_u32 scan_time; +} MLAN_PACK_END wlan_user_scan_chan; + +/** channel statictics */ +typedef MLAN_PACK_START struct _ChanStatistics_t { + /** channle number */ + t_u8 chan_num; + /** band info */ + t_u8 bandconfig; + /** flags */ + t_u8 flags; + /** noise */ + t_s8 noise; + /** total network */ + t_u16 total_networks; + /** scan duration */ + t_u16 cca_scan_duration; + /** busy duration */ + t_u16 cca_busy_duration; +} MLAN_PACK_END ChanStatistics_t; + +/** + * Input structure to configure an immediate scan cmd to firmware + * + * Specifies a number of parameters to be used in general for the scan + * as well as a channel list (wlan_user_scan_chan) for each scan period + * desired. + */ +typedef MLAN_PACK_START struct { + /** + * Flag set to keep the previous scan table intact + * + * If set, the scan results will accumulate, replacing any previous + * matched entries for a BSS with the new scan data + */ + t_u8 keep_previous_scan; + /** + * BSS mode to be sent in the firmware command + * + * Field can be used to restrict the types of networks returned in the + * scan. Valid settings are: + * + * - MLAN_SCAN_MODE_BSS (infrastructure) + * - MLAN_SCAN_MODE_IBSS (adhoc) + * - MLAN_SCAN_MODE_ANY (unrestricted, adhoc and infrastructure) + */ + t_u8 bss_mode; + /** + * Configure the number of probe requests for active chan scans + */ + t_u8 num_probes; + /** + * @brief Reserved + */ + t_u8 reserved; + /** + * @brief BSSID filter sent in the firmware command to limit the results + */ + t_u8 specific_bssid[MLAN_MAC_ADDR_LENGTH]; + /** + * SSID filter list used in the to limit the scan results + */ + wlan_user_scan_ssid ssid_list[MRVDRV_MAX_SSID_LIST_LENGTH]; + /** + * Variable number (fixed maximum) of channels to scan up + */ + wlan_user_scan_chan chan_list[WLAN_USER_SCAN_CHAN_MAX]; + /** scan channel gap */ + t_u16 scan_chan_gap; +} MLAN_PACK_END wlan_user_scan_cfg; + +/** Default scan interval in millisecond*/ +#define DEFAULT_BGSCAN_INTERVAL 30000 + +/** action get all, except pps/uapsd config */ +#define BG_SCAN_ACT_GET 0x0000 +/** action set all, except pps/uapsd config */ +#define BG_SCAN_ACT_SET 0x0001 +/** action get pps/uapsd config */ +#define BG_SCAN_ACT_GET_PPS_UAPSD 0x0100 +/** action set pps/uapsd config */ +#define BG_SCAN_ACT_SET_PPS_UAPSD 0x0101 +/** action set all */ +#define BG_SCAN_ACT_SET_ALL 0xff01 +/** ssid match */ +#define BG_SCAN_SSID_MATCH 0x0001 +/** ssid match and RSSI exceeded */ +#define BG_SCAN_SSID_RSSI_MATCH 0x0004 +/**wait for all channel scan to complete to report scan result*/ +#define BG_SCAN_WAIT_ALL_CHAN_DONE 0x80000000 +/** Maximum number of channels that can be sent in bg scan config */ +#define WLAN_BG_SCAN_CHAN_MAX 38 + +/** + * Input structure to configure bs scan cmd to firmware + */ +typedef MLAN_PACK_START struct { + /** action */ + t_u16 action; + /** enable/disable */ + t_u8 enable; + /** BSS type: + * MLAN_SCAN_MODE_BSS (infrastructure) + * MLAN_SCAN_MODE_IBSS (adhoc) + * MLAN_SCAN_MODE_ANY (unrestricted, adhoc and infrastructure) + */ + t_u8 bss_type; + /** number of channel scanned during each scan */ + t_u8 chan_per_scan; + /** interval between consecutive scan */ + t_u32 scan_interval; + /** bit 0: ssid match bit 1: ssid match and SNR exceeded + * bit 2: ssid match and RSSI exceeded + * bit 31: wait for all channel scan to complete to report scan result + */ + t_u32 report_condition; + /* Configure the number of probe requests for active chan scans */ + t_u8 num_probes; + /** RSSI threshold */ + t_u8 rssi_threshold; + /** SNR threshold */ + t_u8 snr_threshold; + /** repeat count */ + t_u16 repeat_count; + /** start later flag */ + t_u16 start_later; + /** SSID filter list used in the to limit the scan results */ + wlan_user_scan_ssid ssid_list[MRVDRV_MAX_SSID_LIST_LENGTH]; + /** Variable number (fixed maximum) of channels to scan up */ + wlan_user_scan_chan chan_list[WLAN_BG_SCAN_CHAN_MAX]; + /** scan channel gap */ + t_u16 scan_chan_gap; +} MLAN_PACK_END wlan_bgscan_cfg; +#endif /* STA_SUPPORT */ + +#ifdef PRAGMA_PACK +#pragma pack(pop) +#endif + +/** BSSDescriptor_t + * Structure used to store information for beacon/probe response + */ +typedef struct _BSSDescriptor_t { + /** MAC address */ + mlan_802_11_mac_addr mac_address; + + /** SSID */ + mlan_802_11_ssid ssid; + + /** WEP encryption requirement */ + t_u32 privacy; + + /** Receive signal strength in dBm */ + t_s32 rssi; + + /** Channel */ + t_u32 channel; + + /** Freq */ + t_u32 freq; + + /** Beacon period */ + t_u16 beacon_period; + + /** ATIM window */ + t_u32 atim_window; + + /** ERP flags */ + t_u8 erp_flags; + + /** Type of network in use */ + WLAN_802_11_NETWORK_TYPE network_type_use; + + /** Network infrastructure mode */ + t_u32 bss_mode; + + /** Network supported rates */ + WLAN_802_11_RATES supported_rates; + + /** Supported data rates */ + t_u8 data_rates[WLAN_SUPPORTED_RATES]; + + /** Network band. + * BAND_B(0x01): 'b' band + * BAND_G(0x02): 'g' band + * BAND_A(0X04): 'a' band + */ + t_u16 bss_band; + + /** TSF timestamp from the current firmware TSF */ + t_u64 network_tsf; + + /** TSF value included in the beacon/probe response */ + t_u8 time_stamp[8]; + + /** PHY parameter set */ + IEEEtypes_PhyParamSet_t phy_param_set; + + /** SS parameter set */ + IEEEtypes_SsParamSet_t ss_param_set; + + /** Capability information */ + IEEEtypes_CapInfo_t cap_info; + + /** WMM IE */ + IEEEtypes_WmmParameter_t wmm_ie; + + /** 802.11h BSS information */ + wlan_11h_bss_info_t wlan_11h_bss_info; + + /** Indicate disabling 11n when associate with AP */ + t_u8 disable_11n; + /** 802.11n BSS information */ + /** HT Capabilities IE */ + IEEEtypes_HTCap_t *pht_cap; + /** HT Capabilities Offset */ + t_u16 ht_cap_offset; + /** HT Information IE */ + IEEEtypes_HTInfo_t *pht_info; + /** HT Information Offset */ + t_u16 ht_info_offset; + /** 20/40 BSS Coexistence IE */ + IEEEtypes_2040BSSCo_t *pbss_co_2040; + /** 20/40 BSS Coexistence Offset */ + t_u16 bss_co_2040_offset; + /** Extended Capabilities IE */ + IEEEtypes_ExtCap_t *pext_cap; + /** Extended Capabilities Offset */ + t_u16 ext_cap_offset; + /** Overlapping BSS Scan Parameters IE */ + IEEEtypes_OverlapBSSScanParam_t *poverlap_bss_scan_param; + /** Overlapping BSS Scan Parameters Offset */ + t_u16 overlap_bss_offset; + + /** VHT Capabilities IE */ + IEEEtypes_VHTCap_t *pvht_cap; + /** VHT Capabilities IE offset */ + t_u16 vht_cap_offset; + /** VHT Operations IE */ + IEEEtypes_VHTOprat_t *pvht_oprat; + /** VHT Operations IE offset */ + t_u16 vht_oprat_offset; + /** VHT Transmit Power Envelope IE */ + IEEEtypes_VHTtxpower_t *pvht_txpower; + /** VHT Transmit Power Envelope IE offset */ + t_u16 vht_txpower_offset; + /** Extended Power Constraint IE */ + IEEEtypes_ExtPwerCons_t *pext_pwer; + /** Extended Power Constraint IE offset */ + t_u16 ext_pwer_offset; + /** Extended BSS Load IE */ + IEEEtypes_ExtBSSload_t *pext_bssload; + /** Extended BSS Load IE offset */ + t_u16 ext_bssload_offset; + /** Quiet Channel IE */ + IEEEtypes_QuietChan_t *pquiet_chan; + /** Quiet Channel IE offset */ + t_u16 quiet_chan_offset; + /** Operating Mode Notification IE */ + IEEEtypes_OperModeNtf_t *poper_mode; + /** Operating Mode Notification IE offset */ + t_u16 oper_mode_offset; + +#ifdef STA_SUPPORT + /** Country information set */ + IEEEtypes_CountryInfoFullSet_t country_info; +#endif /* STA_SUPPORT */ + + /** WPA IE */ + IEEEtypes_VendorSpecific_t *pwpa_ie; + /** WPA IE offset in the beacon buffer */ + t_u16 wpa_offset; + /** RSN IE */ + IEEEtypes_Generic_t *prsn_ie; + /** RSN IE offset in the beacon buffer */ + t_u16 rsn_offset; +#ifdef STA_SUPPORT + /** WAPI IE */ + IEEEtypes_Generic_t *pwapi_ie; + /** WAPI IE offset in the beacon buffer */ + t_u16 wapi_offset; +#endif + /* Hotspot 2.0 OSEN AKM IE */ + IEEEtypes_Generic_t *posen_ie; + /** osen IE offset in the beacon buffer */ + t_u16 osen_offset; + /* Mobility domain IE */ + IEEEtypes_MobilityDomain_t *pmd_ie; + /** Mobility domain IE offset in the beacon buffer */ + t_u16 md_offset; + + /** Pointer to the returned scan response */ + t_u8 *pbeacon_buf; + /** Length of the stored scan response */ + t_u32 beacon_buf_size; + /** Max allocated size for updated scan response */ + t_u32 beacon_buf_size_max; + +} BSSDescriptor_t, *pBSSDescriptor_t; + +#endif /* !_MLAN_IEEE_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/mlan_ioctl.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/mlan_ioctl.h new file mode 100644 index 00000000..709a1efd --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/mlan_ioctl.h @@ -0,0 +1,3615 @@ +/** @file mlan_ioctl.h + * + * @brief This file declares the IOCTL data structures and APIs. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + */ + +/****************************************************** +Change log: + 11/07/2008: initial version +******************************************************/ + +#ifndef _MLAN_IOCTL_H_ +#define _MLAN_IOCTL_H_ + +/** Enumeration for IOCTL request ID */ +enum _mlan_ioctl_req_id { + /* Scan Group */ + MLAN_IOCTL_SCAN = 0x00010000, + MLAN_OID_SCAN_NORMAL = 0x00010001, + MLAN_OID_SCAN_SPECIFIC_SSID = 0x00010002, + MLAN_OID_SCAN_USER_CONFIG = 0x00010003, + MLAN_OID_SCAN_CONFIG = 0x00010004, + MLAN_OID_SCAN_GET_CURRENT_BSS = 0x00010005, + MLAN_OID_SCAN_CANCEL = 0x00010006, + MLAN_OID_SCAN_TABLE_FLUSH = 0x0001000A, + MLAN_OID_SCAN_BGSCAN_CONFIG = 0x0001000B, + /* BSS Configuration Group */ + MLAN_IOCTL_BSS = 0x00020000, + MLAN_OID_BSS_START = 0x00020001, + MLAN_OID_BSS_STOP = 0x00020002, + MLAN_OID_BSS_MODE = 0x00020003, + MLAN_OID_BSS_CHANNEL = 0x00020004, + MLAN_OID_BSS_CHANNEL_LIST = 0x00020005, + MLAN_OID_BSS_MAC_ADDR = 0x00020006, + MLAN_OID_BSS_MULTICAST_LIST = 0x00020007, + MLAN_OID_BSS_FIND_BSS = 0x00020008, + MLAN_OID_IBSS_BCN_INTERVAL = 0x00020009, + MLAN_OID_IBSS_ATIM_WINDOW = 0x0002000A, + MLAN_OID_IBSS_CHANNEL = 0x0002000B, +#ifdef UAP_SUPPORT + MLAN_OID_UAP_BSS_CONFIG = 0x0002000C, + MLAN_OID_UAP_DEAUTH_STA = 0x0002000D, + MLAN_OID_UAP_BSS_RESET = 0x0002000E, +#endif +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) + MLAN_OID_BSS_ROLE = 0x0002000F, +#endif +#ifdef WIFI_DIRECT_SUPPORT + MLAN_OID_WIFI_DIRECT_MODE = 0x00020010, +#endif +#ifdef STA_SUPPORT + MLAN_OID_BSS_LISTEN_INTERVAL = 0x00020011, +#endif + MLAN_OID_BSS_REMOVE = 0x00020014, +#ifdef UAP_SUPPORT + MLAN_OID_UAP_CFG_WMM_PARAM = 0x00020015, +#endif + MLAN_OID_BSS_11D_CHECK_CHANNEL = 0x00020016, +#ifdef UAP_SUPPORT + MLAN_OID_UAP_SCAN_CHANNELS = 0x00020018, + MLAN_OID_UAP_CHANNEL = 0x00020019, + MLAN_OID_UAP_OPER_CTRL = 0x0002001A, +#endif + + /* Radio Configuration Group */ + MLAN_IOCTL_RADIO_CFG = 0x00030000, + MLAN_OID_RADIO_CTRL = 0x00030001, + MLAN_OID_BAND_CFG = 0x00030002, + MLAN_OID_ANT_CFG = 0x00030003, +#ifdef WIFI_DIRECT_SUPPORT + MLAN_OID_REMAIN_CHAN_CFG = 0x00030004, +#endif + + /* SNMP MIB Group */ + MLAN_IOCTL_SNMP_MIB = 0x00040000, + MLAN_OID_SNMP_MIB_RTS_THRESHOLD = 0x00040001, + MLAN_OID_SNMP_MIB_FRAG_THRESHOLD = 0x00040002, + MLAN_OID_SNMP_MIB_RETRY_COUNT = 0x00040003, +#if defined(UAP_SUPPORT) + MLAN_OID_SNMP_MIB_DOT11D = 0x00040004, + MLAN_OID_SNMP_MIB_DOT11H = 0x00040005, +#endif + MLAN_OID_SNMP_MIB_DTIM_PERIOD = 0x00040006, + + /* Status Information Group */ + MLAN_IOCTL_GET_INFO = 0x00050000, + MLAN_OID_GET_STATS = 0x00050001, + MLAN_OID_GET_SIGNAL = 0x00050002, + MLAN_OID_GET_FW_INFO = 0x00050003, + MLAN_OID_GET_VER_EXT = 0x00050004, + MLAN_OID_GET_BSS_INFO = 0x00050005, + MLAN_OID_GET_DEBUG_INFO = 0x00050006, +#ifdef UAP_SUPPORT + MLAN_OID_UAP_STA_LIST = 0x00050007, +#endif + + /* Security Configuration Group */ + MLAN_IOCTL_SEC_CFG = 0x00060000, + MLAN_OID_SEC_CFG_AUTH_MODE = 0x00060001, + MLAN_OID_SEC_CFG_ENCRYPT_MODE = 0x00060002, + MLAN_OID_SEC_CFG_WPA_ENABLED = 0x00060003, + MLAN_OID_SEC_CFG_ENCRYPT_KEY = 0x00060004, + MLAN_OID_SEC_CFG_PASSPHRASE = 0x00060005, + MLAN_OID_SEC_CFG_EWPA_ENABLED = 0x00060006, + MLAN_OID_SEC_CFG_ESUPP_MODE = 0x00060007, + MLAN_OID_SEC_CFG_WAPI_ENABLED = 0x00060009, + MLAN_OID_SEC_CFG_PORT_CTRL_ENABLED = 0x0006000A, +#ifdef UAP_SUPPORT + MLAN_OID_SEC_CFG_REPORT_MIC_ERR = 0x0006000B, +#endif + MLAN_OID_SEC_QUERY_KEY = 0x0006000C, + + /* Rate Group */ + MLAN_IOCTL_RATE = 0x00070000, + MLAN_OID_RATE_CFG = 0x00070001, + MLAN_OID_GET_DATA_RATE = 0x00070002, + MLAN_OID_SUPPORTED_RATES = 0x00070003, + + /* Power Configuration Group */ + MLAN_IOCTL_POWER_CFG = 0x00080000, + MLAN_OID_POWER_CFG = 0x00080001, + MLAN_OID_POWER_CFG_EXT = 0x00080002, + + /* Power Management Configuration Group */ + MLAN_IOCTL_PM_CFG = 0x00090000, + MLAN_OID_PM_CFG_IEEE_PS = 0x00090001, + MLAN_OID_PM_CFG_HS_CFG = 0x00090002, + MLAN_OID_PM_CFG_INACTIVITY_TO = 0x00090003, + MLAN_OID_PM_CFG_DEEP_SLEEP = 0x00090004, + MLAN_OID_PM_CFG_SLEEP_PD = 0x00090005, + MLAN_OID_PM_CFG_PS_CFG = 0x00090006, + MLAN_OID_PM_CFG_SLEEP_PARAMS = 0x00090008, +#ifdef UAP_SUPPORT + MLAN_OID_PM_CFG_PS_MODE = 0x00090009, +#endif /* UAP_SUPPORT */ + MLAN_OID_PM_INFO = 0x0009000A, + MLAN_OID_PM_HS_WAKEUP_REASON = 0x0009000B, + + /* WMM Configuration Group */ + MLAN_IOCTL_WMM_CFG = 0x000A0000, + MLAN_OID_WMM_CFG_ENABLE = 0x000A0001, + MLAN_OID_WMM_CFG_QOS = 0x000A0002, + MLAN_OID_WMM_CFG_ADDTS = 0x000A0003, + MLAN_OID_WMM_CFG_DELTS = 0x000A0004, + MLAN_OID_WMM_CFG_QUEUE_CONFIG = 0x000A0005, + MLAN_OID_WMM_CFG_QUEUE_STATS = 0x000A0006, + MLAN_OID_WMM_CFG_QUEUE_STATUS = 0x000A0007, + MLAN_OID_WMM_CFG_TS_STATUS = 0x000A0008, + + /* WPS Configuration Group */ + MLAN_IOCTL_WPS_CFG = 0x000B0000, + MLAN_OID_WPS_CFG_SESSION = 0x000B0001, + + /* 802.11n Configuration Group */ + MLAN_IOCTL_11N_CFG = 0x000C0000, + MLAN_OID_11N_CFG_TX = 0x000C0001, + MLAN_OID_11N_HTCAP_CFG = 0x000C0002, + MLAN_OID_11N_CFG_ADDBA_REJECT = 0x000C0003, + MLAN_OID_11N_CFG_AGGR_PRIO_TBL = 0x000C0004, + MLAN_OID_11N_CFG_ADDBA_PARAM = 0x000C0005, + MLAN_OID_11N_CFG_MAX_TX_BUF_SIZE = 0x000C0006, + MLAN_OID_11N_CFG_AMSDU_AGGR_CTRL = 0x000C0007, + MLAN_OID_11N_CFG_SUPPORTED_MCS_SET = 0x000C0008, + MLAN_OID_11N_CFG_TX_BF_CAP = 0x000C0009, + MLAN_OID_11N_CFG_TX_BF_CFG = 0x000C000A, + MLAN_OID_11N_CFG_STREAM_CFG = 0x000C000B, + MLAN_OID_11N_CFG_DELBA = 0x000C000C, + MLAN_OID_11N_CFG_REJECT_ADDBA_REQ = 0x000C000D, + MLAN_OID_11N_CFG_COEX_RX_WINSIZE = 0x000C000E, + MLAN_OID_11N_CFG_TX_AGGR_CTRL = 0x000C000F, + + /* 802.11d Configuration Group */ + MLAN_IOCTL_11D_CFG = 0x000D0000, +#ifdef STA_SUPPORT + MLAN_OID_11D_CFG_ENABLE = 0x000D0001, + MLAN_OID_11D_CLR_CHAN_TABLE = 0x000D0002, +#endif /* STA_SUPPORT */ + MLAN_OID_11D_DOMAIN_INFO = 0x000D0003, + + /* Register Memory Access Group */ + MLAN_IOCTL_REG_MEM = 0x000E0000, + MLAN_OID_REG_RW = 0x000E0001, + MLAN_OID_EEPROM_RD = 0x000E0002, + MLAN_OID_MEM_RW = 0x000E0003, + + /* Multi-Radio Configuration Group */ + MLAN_IOCTL_MFR_CFG = 0x00100000, + + /* 802.11h Configuration Group */ + MLAN_IOCTL_11H_CFG = 0x00110000, + MLAN_OID_11H_CHANNEL_CHECK = 0x00110001, + MLAN_OID_11H_LOCAL_POWER_CONSTRAINT = 0x00110002, +#if defined(DFS_TESTING_SUPPORT) + MLAN_OID_11H_DFS_TESTING = 0x00110003, +#endif + MLAN_OID_11H_CHAN_REPORT_REQUEST = 0x00110004, + + /* 802.11n Configuration Group RANDYTODO for value assign */ + MLAN_IOCTL_11AC_CFG = 0x00120000, + MLAN_OID_11AC_VHT_CFG = 0x00120001, + MLAN_OID_11AC_CFG_SUPPORTED_MCS_SET = 0x00120002, + + /* Miscellaneous Configuration Group */ + MLAN_IOCTL_MISC_CFG = 0x00200000, + MLAN_OID_MISC_GEN_IE = 0x00200001, + MLAN_OID_MISC_REGION = 0x00200002, + MLAN_OID_MISC_WARM_RESET = 0x00200003, +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + MLAN_OID_MISC_SDIO_MPA_CTRL = 0x00200006, +#endif + MLAN_OID_MISC_HOST_CMD = 0x00200007, + MLAN_OID_MISC_SYS_CLOCK = 0x00200009, + MLAN_OID_MISC_SOFT_RESET = 0x0020000A, + MLAN_OID_MISC_WWS = 0x0020000B, + MLAN_OID_MISC_ASSOC_RSP = 0x0020000C, + MLAN_OID_MISC_INIT_SHUTDOWN = 0x0020000D, + MLAN_OID_MISC_COALESCING_STATUS = 0x0020000E, + MLAN_OID_MISC_CUSTOM_IE = 0x0020000F, + MLAN_OID_MISC_TDLS_CONFIG = 0x00200010, + MLAN_OID_MISC_TX_DATAPAUSE = 0x00200012, + MLAN_OID_MISC_IP_ADDR = 0x00200013, + MLAN_OID_MISC_MAC_CONTROL = 0x00200014, + MLAN_OID_MISC_MEF_CFG = 0x00200015, + MLAN_OID_MISC_CFP_CODE = 0x00200016, + MLAN_OID_MISC_COUNTRY_CODE = 0x00200017, + MLAN_OID_MISC_THERMAL = 0x00200018, + MLAN_OID_MISC_RX_MGMT_IND = 0x00200019, + MLAN_OID_MISC_SUBSCRIBE_EVENT = 0x0020001A, +#ifdef DEBUG_LEVEL1 + MLAN_OID_MISC_DRVDBG = 0x0020001B, +#endif + MLAN_OID_MISC_HOTSPOT_CFG = 0x0020001C, + MLAN_OID_MISC_OTP_USER_DATA = 0x0020001D, + MLAN_OID_MISC_TXCONTROL = 0x00200020, +#ifdef STA_SUPPORT + MLAN_OID_MISC_EXT_CAP_CFG = 0x00200021, +#endif +#if defined(STA_SUPPORT) + MLAN_OID_MISC_PMFCFG = 0x00200022, +#endif + MLAN_OID_MISC_MULTI_CHAN_CFG = 0x00200023, + MLAN_OID_MISC_MULTI_CHAN_POLICY = 0x00200024, +#ifdef WIFI_DIRECT_SUPPORT + MLAN_OID_MISC_WIFI_DIRECT_CONFIG = 0x00200025, +#endif + MLAN_OID_MISC_TDLS_OPER = 0x00200026, + MLAN_OID_MISC_GET_TDLS_IES = 0x00200027, + MLAN_OID_MISC_LOW_PWR_MODE = 0x00200029, +#ifdef RX_PACKET_COALESCE + MLAN_OID_MISC_RX_PACKET_COALESCE = 0x0020002C, +#endif + MLAN_OID_MISC_COALESCE_CFG = 0x0020002E, + MLAN_OID_MISC_TDLS_IDLE_TIME = 0x0020002F, +}; + +/** Sub command size */ +#define MLAN_SUB_COMMAND_SIZE 4 + +/** Enumeration for the action of IOCTL request */ +enum _mlan_act_ioctl { + MLAN_ACT_SET = 1, + MLAN_ACT_GET, + MLAN_ACT_CANCEL +}; + +/** Enumeration for generic enable/disable */ +enum _mlan_act_generic { + MLAN_ACT_DISABLE = 0, + MLAN_ACT_ENABLE = 1 +}; + +/** Enumeration for scan mode */ +enum _mlan_scan_mode { + MLAN_SCAN_MODE_UNCHANGED = 0, + MLAN_SCAN_MODE_BSS, + MLAN_SCAN_MODE_IBSS, + MLAN_SCAN_MODE_ANY +}; + +/** Enumeration for scan type */ +enum _mlan_scan_type { + MLAN_SCAN_TYPE_UNCHANGED = 0, + MLAN_SCAN_TYPE_ACTIVE, + MLAN_SCAN_TYPE_PASSIVE +}; + +/** Max number of supported rates */ +#define MLAN_SUPPORTED_RATES 32 + +/** RSSI scan */ +#define SCAN_RSSI(RSSI) (0x100 - ((t_u8)(RSSI))) + +/** Max passive scan time for each channel in milliseconds */ +#define MRVDRV_MAX_PASSIVE_SCAN_CHAN_TIME 2000 + +/** Max active scan time for each channel in milliseconds */ +#define MRVDRV_MAX_ACTIVE_SCAN_CHAN_TIME 500 + +/** Maximum number of probes to send on each channel */ +#define MAX_PROBES 4 + +/** Default number of probes to send on each channel */ +#define DEFAULT_PROBES 4 + +/** + * @brief Sub-structure passed in wlan_ioctl_get_scan_table_entry for each BSS + * + * Fixed field information returned for the scan response in the IOCTL + * response. + */ +typedef struct _wlan_get_scan_table_fixed { + /** BSSID of this network */ + t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; + /** Channel this beacon/probe response was detected */ + t_u8 channel; + /** RSSI for the received packet */ + t_u8 rssi; + /** TSF value in microseconds from the firmware at packet reception */ + t_u64 network_tsf; +} wlan_get_scan_table_fixed; + +/** mlan_802_11_ssid data structure */ +typedef struct _mlan_802_11_ssid { + /** SSID Length */ + t_u32 ssid_len; + /** SSID information field */ + t_u8 ssid[MLAN_MAX_SSID_LENGTH]; +} mlan_802_11_ssid, *pmlan_802_11_ssid; + +typedef MLAN_PACK_START struct _tx_status_event { + /** packet type */ + t_u8 packet_type; + /** tx_token_id */ + t_u8 tx_token_id; + /** 0--success, 1--fail, 2--watchdogtimeout */ + t_u8 status; +} MLAN_PACK_END tx_status_event; + +/** + * Sructure to retrieve the scan table + */ +typedef struct { + /** + * - Zero based scan entry to start retrieval in command request + * - Number of scans entries returned in command response + */ + t_u32 scan_number; + /** + * Buffer marker for multiple wlan_ioctl_get_scan_table_entry structures. + * Each struct is padded to the nearest 32 bit boundary. + */ + t_u8 scan_table_entry_buf[1]; +} wlan_ioctl_get_scan_table_info; + +/** + * Structure passed in the wlan_ioctl_get_scan_table_info for each + * BSS returned in the WLAN_GET_SCAN_RESP IOCTL + */ +typedef struct _wlan_ioctl_get_scan_table_entry { + /** + * Fixed field length included in the response. + * + * Length value is included so future fixed fields can be added to the + * response without breaking backwards compatibility. Use the length + * to find the offset for the bssInfoLength field, not a sizeof() calc. + */ + t_u32 fixed_field_length; + + /** + * Length of the BSS Information (probe resp or beacon) that + * follows after the fixed_field_length + */ + t_u32 bss_info_length; + + /** + * Always present, fixed length data fields for the BSS + */ + wlan_get_scan_table_fixed fixed_fields; + + /* + * Probe response or beacon scanned for the BSS. + * + * Field layout: + * - TSF 8 octets + * - Beacon Interval 2 octets + * - Capability Info 2 octets + * + * - IEEE Infomation Elements; variable number & length per 802.11 spec + */ + /* t_u8 bss_info_buffer[0]; */ +} wlan_ioctl_get_scan_table_entry; + +/** Type definition of mlan_scan_time_params */ +typedef struct _mlan_scan_time_params { + /** Scan channel time for specific scan in milliseconds */ + t_u32 specific_scan_time; + /** Scan channel time for active scan in milliseconds */ + t_u32 active_scan_time; + /** Scan channel time for passive scan in milliseconds */ + t_u32 passive_scan_time; +} mlan_scan_time_params, *pmlan_scan_time_params; + +/** Type definition of mlan_user_scan */ +typedef struct _mlan_user_scan { + /** Length of scan_cfg_buf */ + t_u32 scan_cfg_len; + /** Buffer of scan config */ + t_u8 scan_cfg_buf[1]; +} mlan_user_scan, *pmlan_user_scan; + +/** Type definition of mlan_scan_req */ +typedef struct _mlan_scan_req { + /** BSS mode for scanning */ + t_u32 scan_mode; + /** Scan type */ + t_u32 scan_type; + /** SSID */ + mlan_802_11_ssid scan_ssid; + /** Scan time parameters */ + mlan_scan_time_params scan_time; + /** Scan config parameters in user scan */ + mlan_user_scan user_scan; +} mlan_scan_req, *pmlan_scan_req; + +/** Type defnition of mlan_scan_resp */ +typedef struct _mlan_scan_resp { + /** Number of scan result */ + t_u32 num_in_scan_table; + /** Scan table */ + t_u8 *pscan_table; + /* Age in seconds */ + t_u32 age_in_secs; + /** channel statstics */ + t_u8 *pchan_stats; + /** Number of records in the chan_stats */ + t_u32 num_in_chan_stats; +} mlan_scan_resp, *pmlan_scan_resp; + +/** Type definition of mlan_scan_cfg */ +typedef struct _mlan_scan_cfg { + /** Scan type */ + t_u32 scan_type; + /** BSS mode for scanning */ + t_u32 scan_mode; + /** Scan probe */ + t_u32 scan_probe; + /** Scan time parameters */ + mlan_scan_time_params scan_time; + /** Extended Scan */ + t_u32 ext_scan; +} mlan_scan_cfg, *pmlan_scan_cfg; + +/** Type defnition of mlan_ds_scan for MLAN_IOCTL_SCAN */ +typedef struct _mlan_ds_scan { + /** Sub-command */ + t_u32 sub_command; + /** Scan request/response */ + union { + /** Scan request */ + mlan_scan_req scan_req; + /** Scan response */ + mlan_scan_resp scan_resp; + /** Scan config parameters in user scan */ + mlan_user_scan user_scan; + /** Scan config parameters */ + mlan_scan_cfg scan_cfg; + } param; +} mlan_ds_scan, *pmlan_ds_scan; + +/*-----------------------------------------------------------------*/ +/** BSS Configuration Group */ +/*-----------------------------------------------------------------*/ +/** Enumeration for BSS mode */ +enum _mlan_bss_mode { + MLAN_BSS_MODE_INFRA = 1, + MLAN_BSS_MODE_IBSS, + MLAN_BSS_MODE_AUTO +}; + +/** Maximum key length */ +#define MLAN_MAX_KEY_LENGTH 32 + +/** max Wmm AC queues */ +#define MAX_AC_QUEUES 4 + +/** Maximum atim window in milliseconds */ +#define MLAN_MAX_ATIM_WINDOW 50 + +/** Minimum beacon interval */ +#define MLAN_MIN_BEACON_INTERVAL 20 +/** Maximum beacon interval */ +#define MLAN_MAX_BEACON_INTERVAL 1000 +/** Default beacon interval */ +#define MLAN_BEACON_INTERVAL 100 + +/** Receive all packets */ +#define MLAN_PROMISC_MODE 1 +/** Receive multicast packets in multicast list */ +#define MLAN_MULTICAST_MODE 2 +/** Receive all multicast packets */ +#define MLAN_ALL_MULTI_MODE 4 + +/** Maximum size of multicast list */ +#define MLAN_MAX_MULTICAST_LIST_SIZE 32 + +/** mlan_multicast_list data structure for MLAN_OID_BSS_MULTICAST_LIST */ +typedef struct _mlan_multicast_list { + /** Multicast mode */ + t_u32 mode; + /** Number of multicast addresses in the list */ + t_u32 num_multicast_addr; + /** Multicast address list */ + mlan_802_11_mac_addr mac_list[MLAN_MAX_MULTICAST_LIST_SIZE]; +} mlan_multicast_list, *pmlan_multicast_list; + +/** Max channel */ +#define MLAN_MAX_CHANNEL 165 + +/** Maximum number of channels in table */ +#define MLAN_MAX_CHANNEL_NUM 128 + +/** Channel/frequence for MLAN_OID_BSS_CHANNEL */ +typedef struct _chan_freq { + /** Channel Number */ + t_u32 channel; + /** Frequency of this Channel */ + t_u32 freq; +} chan_freq; + +/** mlan_chan_list data structure for MLAN_OID_BSS_CHANNEL_LIST */ +typedef struct _mlan_chan_list { + /** Number of channel */ + t_u32 num_of_chan; + /** Channel-Frequency table */ + chan_freq cf[MLAN_MAX_CHANNEL_NUM]; +} mlan_chan_list; + +/** mlan_ssid_bssid data structure for + * MLAN_OID_BSS_START and MLAN_OID_BSS_FIND_BSS + */ +typedef struct _mlan_ssid_bssid { + /** SSID */ + mlan_802_11_ssid ssid; + /** BSSID */ + mlan_802_11_mac_addr bssid; + /** index in BSSID list, start from 1 */ + t_u32 idx; + /** Receive signal strength in dBm */ + t_s32 rssi; + /**mobility domain value*/ + t_u16 ft_md; + /**ft capability*/ + t_u8 ft_cap; + /**channel*/ + t_u16 channel; +} mlan_ssid_bssid; + +#ifdef UAP_SUPPORT +/** Maximum packet forward control value */ +#define MAX_PKT_FWD_CTRL 15 +/** Maximum BEACON period */ +#define MAX_BEACON_PERIOD 4000 +/** Minimum BEACON period */ +#define MIN_BEACON_PERIOD 50 +/** Maximum DTIM period */ +#define MAX_DTIM_PERIOD 100 +/** Minimum DTIM period */ +#define MIN_DTIM_PERIOD 1 +/** Maximum TX Power Limit */ +#define MAX_TX_POWER 20 +/** Minimum TX Power Limit */ +#define MIN_TX_POWER 0 +/** MAX station count */ +#define MAX_STA_COUNT 10 +/** Maximum RTS threshold */ +#define MAX_RTS_THRESHOLD 2347 +/** Maximum fragmentation threshold */ +#define MAX_FRAG_THRESHOLD 2346 +/** Minimum fragmentation threshold */ +#define MIN_FRAG_THRESHOLD 256 +/** data rate 54 M */ +#define DATA_RATE_54M 108 +/** antenna A */ +#define ANTENNA_MODE_A 0 +/** antenna B */ +#define ANTENNA_MODE_B 1 +/** transmit antenna */ +#define TX_ANTENNA 1 +/** receive antenna */ +#define RX_ANTENNA 0 +/** Maximum stage out time */ +#define MAX_STAGE_OUT_TIME 864000 +/** Minimum stage out time */ +#define MIN_STAGE_OUT_TIME 300 +/** Maximum Retry Limit */ +#define MAX_RETRY_LIMIT 14 + +/** Maximum group key timer in seconds */ +#define MAX_GRP_TIMER 86400 + +/** Maximum value of 4 byte configuration */ +#define MAX_VALID_DWORD 0x7FFFFFFF /* (1 << 31) - 1 */ + +/** setting for band_config - band=5GHZ */ +#define BAND_CONFIG_5GHZ 0x01 +/** default UAP BAND 2.4G */ +#define DEFAULT_UAP_BAND 0 +/** default UAP channel 6 */ +#define DEFAULT_UAP_CHANNEL 6 +/** Band config ACS mode */ +#define BAND_CONFIG_ACS_MODE 0x40 +/** Band config manual */ +#define BAND_CONFIG_MANUAL 0x00 + +/** Maximum data rates */ +#define MAX_DATA_RATES 14 + +/** auto data rate */ +#define DATA_RATE_AUTO 0 + +/**filter mode: disable */ +#define MAC_FILTER_MODE_DISABLE 0 +/**filter mode: block mac address */ +#define MAC_FILTER_MODE_ALLOW_MAC 1 +/**filter mode: block mac address */ +#define MAC_FILTER_MODE_BLOCK_MAC 2 +/** Maximum mac filter num */ +#define MAX_MAC_FILTER_NUM 16 + +/* Bitmap for protocol to use */ +/** No security */ +#define PROTOCOL_NO_SECURITY 0x01 +/** Static WEP */ +#define PROTOCOL_STATIC_WEP 0x02 +/** WPA */ +#define PROTOCOL_WPA 0x08 +/** WPA2 */ +#define PROTOCOL_WPA2 0x20 +/** WP2 Mixed */ +#define PROTOCOL_WPA2_MIXED 0x28 +/** EAP */ +#define PROTOCOL_EAP 0x40 +/** WAPI */ +#define PROTOCOL_WAPI 0x80 + +/** Key_mgmt_psk */ +#define KEY_MGMT_NONE 0x04 +/** Key_mgmt_none */ +#define KEY_MGMT_PSK 0x02 +/** Key_mgmt_eap */ +#define KEY_MGMT_EAP 0x01 +/** Key_mgmt_psk_sha256 */ +#define KEY_MGMT_PSK_SHA256 0x100 + +/** TKIP */ +#define CIPHER_TKIP 0x04 +/** AES CCMP */ +#define CIPHER_AES_CCMP 0x08 + +/** Valid cipher bitmap */ +#define VALID_CIPHER_BITMAP 0x0c + +/** Channel List Entry */ +typedef struct _channel_list { + /** Channel Number */ + t_u8 chan_number; + /** Band Config */ + t_u8 band_config_type; +} scan_chan_list; + +/** mac_filter data structure */ +typedef struct _mac_filter { + /** mac filter mode */ + t_u16 filter_mode; + /** mac adress count */ + t_u16 mac_count; + /** mac address list */ + mlan_802_11_mac_addr mac_list[MAX_MAC_FILTER_NUM]; +} mac_filter; + +/** wpa parameter */ +typedef struct _wpa_param { + /** Pairwise cipher WPA */ + t_u8 pairwise_cipher_wpa; + /** Pairwise cipher WPA2 */ + t_u8 pairwise_cipher_wpa2; + /** group cipher */ + t_u8 group_cipher; + /** RSN replay protection */ + t_u8 rsn_protection; + /** passphrase length */ + t_u32 length; + /** passphrase */ + t_u8 passphrase[64]; + /**group key rekey time in seconds */ + t_u32 gk_rekey_time; +} wpa_param; + +/** wep key */ +typedef struct _wep_key { + /** key index 0-3 */ + t_u8 key_index; + /** is default */ + t_u8 is_default; + /** length */ + t_u16 length; + /** key data */ + t_u8 key[26]; +} wep_key; + +/** wep param */ +typedef struct _wep_param { + /** key 0 */ + wep_key key0; + /** key 1 */ + wep_key key1; + /** key 2 */ + wep_key key2; + /** key 3 */ + wep_key key3; +} wep_param; + +/** Data structure of WMM QoS information */ +typedef struct _wmm_qos_info_t { +#ifdef BIG_ENDIAN_SUPPORT + /** QoS UAPSD */ + t_u8 qos_uapsd:1; + /** Reserved */ + t_u8 reserved:3; + /** Parameter set count */ + t_u8 para_set_count:4; +#else + /** Parameter set count */ + t_u8 para_set_count:4; + /** Reserved */ + t_u8 reserved:3; + /** QoS UAPSD */ + t_u8 qos_uapsd:1; +#endif /* BIG_ENDIAN_SUPPORT */ +} wmm_qos_info_t, *pwmm_qos_info_t; + +/** Data structure of WMM ECW */ +typedef struct _wmm_ecw_t { +#ifdef BIG_ENDIAN_SUPPORT + /** Maximum Ecw */ + t_u8 ecw_max:4; + /** Minimum Ecw */ + t_u8 ecw_min:4; +#else + /** Minimum Ecw */ + t_u8 ecw_min:4; + /** Maximum Ecw */ + t_u8 ecw_max:4; +#endif /* BIG_ENDIAN_SUPPORT */ +} wmm_ecw_t, *pwmm_ecw_t; + +/** Data structure of WMM Aci/Aifsn */ +typedef struct _wmm_aci_aifsn_t { +#ifdef BIG_ENDIAN_SUPPORT + /** Reserved */ + t_u8 reserved:1; + /** Aci */ + t_u8 aci:2; + /** Acm */ + t_u8 acm:1; + /** Aifsn */ + t_u8 aifsn:4; +#else + /** Aifsn */ + t_u8 aifsn:4; + /** Acm */ + t_u8 acm:1; + /** Aci */ + t_u8 aci:2; + /** Reserved */ + t_u8 reserved:1; +#endif /* BIG_ENDIAN_SUPPORT */ +} wmm_aci_aifsn_t, *pwmm_aci_aifsn_t; + +/** Data structure of WMM AC parameters */ +typedef struct _wmm_ac_parameters_t { + wmm_aci_aifsn_t aci_aifsn; /**< AciAifSn */ + wmm_ecw_t ecw; /**< Ecw */ + t_u16 tx_op_limit; /**< Tx op limit */ +} wmm_ac_parameters_t, *pwmm_ac_parameters_t; + +/** Data structure of WMM parameter IE */ +typedef struct _wmm_parameter_t { + /** OuiType: 00:50:f2:02 */ + t_u8 ouitype[4]; + /** Oui subtype: 01 */ + t_u8 ouisubtype; + /** version: 01 */ + t_u8 version; + /** QoS information */ + t_u8 qos_info; + /** Reserved */ + t_u8 reserved; + /** AC Parameters Record WMM_AC_BE, WMM_AC_BK, WMM_AC_VI, WMM_AC_VO */ + wmm_ac_parameters_t ac_params[MAX_AC_QUEUES]; +} wmm_parameter_t, *pwmm_parameter_t; + +/** 5G band */ +#define BAND_CONFIG_5G 0x01 +/** 2.4 G band */ +#define BAND_CONFIG_2G 0x00 +/** MAX BG channel */ +#define MAX_BG_CHANNEL 14 +/** mlan_bss_param + * Note: For each entry you must enter an invalid value + * in the MOAL function woal_set_sys_config_invalid_data(). + * Otherwise for a valid data an unwanted TLV will be + * added to that command. + */ +typedef struct _mlan_uap_bss_param { + /** AP mac addr */ + mlan_802_11_mac_addr mac_addr; + /** SSID */ + mlan_802_11_ssid ssid; + /** Broadcast ssid control */ + t_u8 bcast_ssid_ctl; + /** Radio control: on/off */ + t_u8 radio_ctl; + /** dtim period */ + t_u8 dtim_period; + /** beacon period */ + t_u16 beacon_period; + /** rates */ + t_u8 rates[MAX_DATA_RATES]; + /** Tx data rate */ + t_u16 tx_data_rate; + /** multicast/broadcast data rate */ + t_u16 mcbc_data_rate; + /** Tx power level in dBm */ + t_u8 tx_power_level; + /** Tx antenna */ + t_u8 tx_antenna; + /** Rx antenna */ + t_u8 rx_antenna; + /** packet forward control */ + t_u8 pkt_forward_ctl; + /** max station count */ + t_u16 max_sta_count; + /** mac filter */ + mac_filter filter; + /** station ageout timer in unit of 100ms */ + t_u32 sta_ageout_timer; + /** PS station ageout timer in unit of 100ms */ + t_u32 ps_sta_ageout_timer; + /** RTS threshold */ + t_u16 rts_threshold; + /** fragmentation threshold */ + t_u16 frag_threshold; + /** retry_limit */ + t_u16 retry_limit; + /** pairwise update timeout in milliseconds */ + t_u32 pairwise_update_timeout; + /** pairwise handshake retries */ + t_u32 pwk_retries; + /** groupwise update timeout in milliseconds */ + t_u32 groupwise_update_timeout; + /** groupwise handshake retries */ + t_u32 gwk_retries; + /** preamble type */ + t_u8 preamble_type; + /** band cfg */ + t_u8 band_cfg; + /** channel */ + t_u8 channel; + /** auth mode */ + t_u16 auth_mode; + /** encryption protocol */ + t_u16 protocol; + /** key managment type */ + t_u16 key_mgmt; + /** wep param */ + wep_param wep_cfg; + /** wpa param */ + wpa_param wpa_cfg; + /** Mgmt IE passthru mask */ + t_u32 mgmt_ie_passthru_mask; + /* + * 11n HT Cap HTCap_t ht_cap + */ + /** HT Capabilities Info field */ + t_u16 ht_cap_info; + /** A-MPDU Parameters field */ + t_u8 ampdu_param; + /** Supported MCS Set field */ + t_u8 supported_mcs_set[16]; + /** HT Extended Capabilities field */ + t_u16 ht_ext_cap; + /** Transmit Beamforming Capabilities field */ + t_u32 tx_bf_cap; + /** Antenna Selection Capability field */ + t_u8 asel; + /** Enable 2040 Coex */ + t_u8 enable_2040coex; + /** key management operation */ + t_u16 key_mgmt_operation; + /** BSS status */ + t_u16 bss_status; +#ifdef WIFI_DIRECT_SUPPORT + /* pre shared key */ + t_u8 psk[MLAN_MAX_KEY_LENGTH]; +#endif /* WIFI_DIRECT_SUPPORT */ + /** Number of channels in scan_channel_list */ + t_u32 num_of_chan; + /** scan channel list in ACS mode */ + scan_chan_list chan_list[MLAN_MAX_CHANNEL]; + /** Wmm parameters */ + wmm_parameter_t wmm_para; +} mlan_uap_bss_param; + +/** mlan_deauth_param */ +typedef struct _mlan_deauth_param { + /** STA mac addr */ + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** deauth reason */ + t_u16 reason_code; +} mlan_deauth_param; + +/** mlan_uap_scan_channels */ +typedef struct _mlan_uap_scan_channels { + /** flag for remove nop channel*/ + t_u8 remove_nop_channel; + /** num of removed channel */ + t_u8 num_remvoed_channel; + /** Number of channels in scan_channel_list */ + t_u32 num_of_chan; + /** scan channel list in ACS mode */ + scan_chan_list chan_list[MLAN_MAX_CHANNEL]; +} mlan_uap_scan_channels; + +/** mlan_uap_channel */ +typedef struct _mlan_uap_channel { + /** band cfg */ + t_u8 band_cfg; + /** channel */ + t_u8 channel; +} mlan_uap_channel; + +/** mlan_uap_oper_ctrl */ +typedef struct _mlan_uap_oper_ctrl { + /** control value + * 0: do nothing, + * 2: uap stops and restarts automaticaly + */ + t_u16 ctrl_value; + /** channel opt + * 1: uap restart on default 2.4G/channel 6 + * 2: uap restart on the band/channel configured by driver previously + * 3: uap restart on the band/channel specified by band_cfg and channel + */ + t_u16 chan_opt; + /** band cfg 0 + * 0: 20Mhz 2: 40 Mhz 3: 80Mhz + */ + t_u8 band_cfg; + /** channel */ + t_u8 channel; +} mlan_uap_oper_ctrl; + +#endif + +#ifdef WIFI_DIRECT_SUPPORT +/** mode: disable wifi direct */ +#define WIFI_DIRECT_MODE_DISABLE 0 +/** mode: listen */ +#define WIFI_DIRECT_MODE_LISTEN 1 +/** mode: GO */ +#define WIFI_DIRECT_MODE_GO 2 +/** mode: client */ +#define WIFI_DIRECT_MODE_CLIENT 3 +/** mode: find */ +#define WIFI_DIRECT_MODE_FIND 4 +/** mode: stop find */ +#define WIFI_DIRECT_MODE_STOP_FIND 5 +#endif + +/** Type definition of mlan_ds_bss for MLAN_IOCTL_BSS */ +typedef struct _mlan_ds_bss { + /** Sub-command */ + t_u32 sub_command; + /** BSS parameter */ + union { + /** SSID-BSSID for MLAN_OID_BSS_START */ + mlan_ssid_bssid ssid_bssid; + /** BSSID for MLAN_OID_BSS_STOP */ + mlan_802_11_mac_addr bssid; + /** BSS mode for MLAN_OID_BSS_MODE */ + t_u32 bss_mode; + /** BSS channel/frequency for MLAN_OID_BSS_CHANNEL */ + chan_freq bss_chan; + /** BSS channel list for MLAN_OID_BSS_CHANNEL_LIST */ + mlan_chan_list chanlist; + /** MAC address for MLAN_OID_BSS_MAC_ADDR */ + mlan_802_11_mac_addr mac_addr; + /** Multicast list for MLAN_OID_BSS_MULTICAST_LIST */ + mlan_multicast_list multicast_list; + /** Beacon interval for MLAN_OID_IBSS_BCN_INTERVAL */ + t_u32 bcn_interval; + /** ATIM window for MLAN_OID_IBSS_ATIM_WINDOW */ + t_u32 atim_window; +#ifdef UAP_SUPPORT + /** BSS param for AP mode for MLAN_OID_UAP_BSS_CONFIG */ + mlan_uap_bss_param bss_config; + /** deauth param for MLAN_OID_UAP_DEAUTH_STA */ + mlan_deauth_param deauth_param; + /** AP Wmm parameters for MLAN_OID_UAP_CFG_WMM_PARAM */ + wmm_parameter_t ap_wmm_para; + /** ap scan channels for MLAN_OID_UAP_SCAN_CHANNELS*/ + mlan_uap_scan_channels ap_scan_channels; + /** ap channel for MLAN_OID_UAP_CHANNEL*/ + mlan_uap_channel ap_channel; + /** ap operation control for MLAN_OID_UAP_OPER_CTRL*/ + mlan_uap_oper_ctrl ap_oper_ctrl; +#endif +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) + /** BSS role for MLAN_OID_BSS_ROLE */ + t_u8 bss_role; +#endif +#ifdef WIFI_DIRECT_SUPPORT + /** wifi direct mode for MLAN_OID_WIFI_DIRECT_MODE */ + t_u16 wfd_mode; +#endif +#ifdef STA_SUPPORT + /** Listen interval for MLAN_OID_BSS_LISTEN_INTERVAL */ + t_u16 listen_interval; +#endif + } param; +} mlan_ds_bss, *pmlan_ds_bss; + +/*-----------------------------------------------------------------*/ +/** Radio Control Group */ +/*-----------------------------------------------------------------*/ +/** Enumeration for band */ +enum _mlan_band_def { + BAND_B = 1, + BAND_G = 2, + BAND_A = 4, + BAND_GN = 8, + BAND_AN = 16, + BAND_GAC = 32, + BAND_AAC = 64, +}; + +/** NO secondary channel */ +#define NO_SEC_CHANNEL 0 +/** secondary channel is above primary channel */ +#define SEC_CHANNEL_ABOVE 1 +/** secondary channel is below primary channel */ +#define SEC_CHANNEL_BELOW 3 +/** Channel bandwidth */ +#define CHANNEL_BW_20MHZ 0 +#define CHANNEL_BW_40MHZ_ABOVE 1 +#define CHANNEL_BW_40MHZ_BELOW 3 +/** secondary channel is 80Mhz bandwidth for 11ac */ +#define CHANNEL_BW_80MHZ 4 +#define CHANNEL_BW_160MHZ 5 + +/** RF antenna selection */ +#define RF_ANTENNA_MASK(n) ((1<<(n))-1) +/** RF antenna auto select */ +#define RF_ANTENNA_AUTO 0xFFFF + +/** Type definition of mlan_ds_band_cfg for MLAN_OID_BAND_CFG */ +typedef struct _mlan_ds_band_cfg { + /** Infra band */ + t_u32 config_bands; + /** Ad-hoc start band */ + t_u32 adhoc_start_band; + /** Ad-hoc start channel */ + t_u32 adhoc_channel; + /** Ad-hoc channel bandwidth */ + t_u32 adhoc_chan_bandwidth; + /** fw supported band */ + t_u32 fw_bands; +} mlan_ds_band_cfg; + +/** Type definition of mlan_ds_ant_cfg for MLAN_OID_ANT_CFG */ +typedef struct _mlan_ds_ant_cfg { + /** Tx antenna mode */ + t_u32 tx_antenna; + /** Rx antenna mode */ + t_u32 rx_antenna; +} mlan_ds_ant_cfg, *pmlan_ds_ant_cfg; +/** Type definition of mlan_ds_ant_cfg_1x1 for MLAN_OID_ANT_CFG */ +typedef struct _mlan_ds_ant_cfg_1x1 { + /** Antenna mode */ + t_u32 antenna; + /** Evaluate time */ + t_u16 evaluate_time; + /** Current antenna */ + t_u16 current_antenna; +} mlan_ds_ant_cfg_1x1, *pmlan_ds_ant_cfg_1x1; + +#ifdef WIFI_DIRECT_SUPPORT +/** Type definition of mlan_ds_remain_chan for MLAN_OID_REMAIN_CHAN_CFG */ +typedef struct _mlan_ds_remain_chan { + /** remove flag */ + t_u16 remove; + /** status */ + t_u8 status; + /** Band cfg */ + t_u8 bandcfg; + /** channel */ + t_u8 channel; + /** remain time: Unit ms*/ + t_u32 remain_period; +} mlan_ds_remain_chan, *pmlan_ds_remain_chan; +#endif + +/** Type definition of mlan_ds_radio_cfg for MLAN_IOCTL_RADIO_CFG */ +typedef struct _mlan_ds_radio_cfg { + /** Sub-command */ + t_u32 sub_command; + /** Radio control parameter */ + union { + /** Radio on/off for MLAN_OID_RADIO_CTRL */ + t_u32 radio_on_off; + /** Band info for MLAN_OID_BAND_CFG */ + mlan_ds_band_cfg band_cfg; + /** Antenna info for MLAN_OID_ANT_CFG */ + mlan_ds_ant_cfg ant_cfg; + /** Antenna info for MLAN_OID_ANT_CFG */ + mlan_ds_ant_cfg_1x1 ant_cfg_1x1; +#ifdef WIFI_DIRECT_SUPPORT + /** remain on channel for MLAN_OID_REMAIN_CHAN_CFG */ + mlan_ds_remain_chan remain_chan; +#endif + } param; +} mlan_ds_radio_cfg, *pmlan_ds_radio_cfg; + +enum COALESCE_OPERATION { + RECV_FILTER_MATCH_TYPE_EQ = 0x80, + RECV_FILTER_MATCH_TYPE_NE, +}; + +enum COALESCE_PACKET_TYPE { + PACKET_TYPE_UNICAST = 1, + PACKET_TYPE_MULTICAST = 2, + PACKET_TYPE_BROADCAST = 3 +}; + +#define COALESCE_MAX_RULES 8 +#define COALESCE_MAX_BYTESEQ 4 /* non-adjustable */ +#define COALESCE_MAX_FILTERS 4 +#define MAX_COALESCING_DELAY 100 /* in msecs */ +#define MAX_PATTERN_LEN 20 +#define MAX_OFFSET_LEN 100 + +struct filt_field_param { + t_u8 operation; + t_u8 operand_len; + t_u16 offset; + t_u8 operand_byte_stream[COALESCE_MAX_BYTESEQ]; +}; + +struct coalesce_rule { + t_u16 max_coalescing_delay; + t_u8 num_of_fields; + t_u8 pkt_type; + struct filt_field_param params[COALESCE_MAX_FILTERS]; +}; + +typedef struct _mlan_ds_coalesce_cfg { + t_u16 num_of_rules; + struct coalesce_rule rule[COALESCE_MAX_RULES]; +} mlan_ds_coalesce_cfg; + +/*-----------------------------------------------------------------*/ +/** SNMP MIB Group */ +/*-----------------------------------------------------------------*/ +/** Type definition of mlan_ds_snmp_mib for MLAN_IOCTL_SNMP_MIB */ +typedef struct _mlan_ds_snmp_mib { + /** Sub-command */ + t_u32 sub_command; + /** SNMP MIB parameter */ + union { + /** RTS threshold for MLAN_OID_SNMP_MIB_RTS_THRESHOLD */ + t_u32 rts_threshold; + /** Fragment threshold for MLAN_OID_SNMP_MIB_FRAG_THRESHOLD */ + t_u32 frag_threshold; + /** Retry count for MLAN_OID_SNMP_MIB_RETRY_COUNT */ + t_u32 retry_count; +#if defined(UAP_SUPPORT) + /** OID value for MLAN_OID_SNMP_MIB_DOT11D/H */ + t_u32 oid_value; +#endif + /** DTIM period for MLAN_OID_SNMP_MIB_DTIM_PERIOD */ + t_u32 dtim_period; + } param; +} mlan_ds_snmp_mib, *pmlan_ds_snmp_mib; + +/*-----------------------------------------------------------------*/ +/** Status Information Group */ +/*-----------------------------------------------------------------*/ +/** Enumeration for ad-hoc status */ +enum _mlan_adhoc_status { + ADHOC_IDLE, + ADHOC_STARTED, + ADHOC_JOINED, + ADHOC_COALESCED, ADHOC_STARTING +}; + +/** Type definition of mlan_ds_get_stats for MLAN_OID_GET_STATS */ +typedef struct _mlan_ds_get_stats { + /** Statistics counter */ + /** Multicast transmitted frame count */ + t_u32 mcast_tx_frame; + /** Failure count */ + t_u32 failed; + /** Retry count */ + t_u32 retry; + /** Multi entry count */ + t_u32 multi_retry; + /** Duplicate frame count */ + t_u32 frame_dup; + /** RTS success count */ + t_u32 rts_success; + /** RTS failure count */ + t_u32 rts_failure; + /** Ack failure count */ + t_u32 ack_failure; + /** Rx fragmentation count */ + t_u32 rx_frag; + /** Multicast Tx frame count */ + t_u32 mcast_rx_frame; + /** FCS error count */ + t_u32 fcs_error; + /** Tx frame count */ + t_u32 tx_frame; + /** WEP ICV error count */ + t_u32 wep_icv_error[4]; + /** beacon recv count */ + t_u32 bcn_rcv_cnt; + /** beacon miss count */ + t_u32 bcn_miss_cnt; +} mlan_ds_get_stats, *pmlan_ds_get_stats; + +/** Type definition of mlan_ds_uap_stats for MLAN_OID_GET_STATS */ +typedef struct _mlan_ds_uap_stats { + /** tkip mic failures */ + t_u32 tkip_mic_failures; + /** ccmp decrypt errors */ + t_u32 ccmp_decrypt_errors; + /** wep undecryptable count */ + t_u32 wep_undecryptable_count; + /** wep icv error count */ + t_u32 wep_icv_error_count; + /** decrypt failure count */ + t_u32 decrypt_failure_count; + /** dot11 multicast tx count */ + t_u32 mcast_tx_count; + /** dot11 failed count */ + t_u32 failed_count; + /** dot11 retry count */ + t_u32 retry_count; + /** dot11 multi retry count */ + t_u32 multi_retry_count; + /** dot11 frame duplicate count */ + t_u32 frame_dup_count; + /** dot11 rts success count */ + t_u32 rts_success_count; + /** dot11 rts failure count */ + t_u32 rts_failure_count; + /** dot11 ack failure count */ + t_u32 ack_failure_count; + /** dot11 rx ragment count */ + t_u32 rx_fragment_count; + /** dot11 mcast rx frame count */ + t_u32 mcast_rx_frame_count; + /** dot11 fcs error count */ + t_u32 fcs_error_count; + /** dot11 tx frame count */ + t_u32 tx_frame_count; + /** dot11 rsna tkip cm invoked */ + t_u32 rsna_tkip_cm_invoked; + /** dot11 rsna 4way handshake failures */ + t_u32 rsna_4way_hshk_failures; +} mlan_ds_uap_stats, *pmlan_ds_uap_stats; + +/** Mask of last beacon RSSI */ +#define BCN_RSSI_LAST_MASK 0x00000001 +/** Mask of average beacon RSSI */ +#define BCN_RSSI_AVG_MASK 0x00000002 +/** Mask of last data RSSI */ +#define DATA_RSSI_LAST_MASK 0x00000004 +/** Mask of average data RSSI */ +#define DATA_RSSI_AVG_MASK 0x00000008 +/** Mask of last beacon SNR */ +#define BCN_SNR_LAST_MASK 0x00000010 +/** Mask of average beacon SNR */ +#define BCN_SNR_AVG_MASK 0x00000020 +/** Mask of last data SNR */ +#define DATA_SNR_LAST_MASK 0x00000040 +/** Mask of average data SNR */ +#define DATA_SNR_AVG_MASK 0x00000080 +/** Mask of last beacon NF */ +#define BCN_NF_LAST_MASK 0x00000100 +/** Mask of average beacon NF */ +#define BCN_NF_AVG_MASK 0x00000200 +/** Mask of last data NF */ +#define DATA_NF_LAST_MASK 0x00000400 +/** Mask of average data NF */ +#define DATA_NF_AVG_MASK 0x00000800 +/** Mask of all RSSI_INFO */ +#define ALL_RSSI_INFO_MASK 0x00000fff + +/** Type definition of mlan_ds_get_signal for MLAN_OID_GET_SIGNAL */ +typedef struct _mlan_ds_get_signal { + /** Selector of get operation */ + /* + * Bit0: Last Beacon RSSI, Bit1: Average Beacon RSSI, + * Bit2: Last Data RSSI, Bit3: Average Data RSSI, + * Bit4: Last Beacon SNR, Bit5: Average Beacon SNR, + * Bit6: Last Data SNR, Bit7: Average Data SNR, + * Bit8: Last Beacon NF, Bit9: Average Beacon NF, + * Bit10: Last Data NF, Bit11: Average Data NF + */ + t_u16 selector; + + /** RSSI */ + /** RSSI of last beacon */ + t_s16 bcn_rssi_last; + /** RSSI of beacon average */ + t_s16 bcn_rssi_avg; + /** RSSI of last data packet */ + t_s16 data_rssi_last; + /** RSSI of data packet average */ + t_s16 data_rssi_avg; + + /** SNR */ + /** SNR of last beacon */ + t_s16 bcn_snr_last; + /** SNR of beacon average */ + t_s16 bcn_snr_avg; + /** SNR of last data packet */ + t_s16 data_snr_last; + /** SNR of data packet average */ + t_s16 data_snr_avg; + + /** NF */ + /** NF of last beacon */ + t_s16 bcn_nf_last; + /** NF of beacon average */ + t_s16 bcn_nf_avg; + /** NF of last data packet */ + t_s16 data_nf_last; + /** NF of data packet average */ + t_s16 data_nf_avg; +} mlan_ds_get_signal, *pmlan_ds_get_signal; + +/** mlan_fw_info data structure for MLAN_OID_GET_FW_INFO */ +typedef struct _mlan_fw_info { + /** Firmware version */ + t_u32 fw_ver; + /** MAC address */ + mlan_802_11_mac_addr mac_addr; + /** 802.11n device capabilities */ + t_u32 hw_dot_11n_dev_cap; + /** Device support for MIMO abstraction of MCSs */ + t_u8 hw_dev_mcs_support; + /** 802.11ac device capabilities */ + t_u32 hw_dot_11ac_dev_cap; + /** 802.11ac device support for MIMO abstraction of MCSs */ + t_u32 hw_dot_11ac_mcs_support; + /** fw supported band */ + t_u8 fw_bands; + /** region code */ + t_u16 region_code; +} mlan_fw_info, *pmlan_fw_info; + +/** Version string buffer length */ +#define MLAN_MAX_VER_STR_LEN 128 + +/** mlan_ver_ext data structure for MLAN_OID_GET_VER_EXT */ +typedef struct _mlan_ver_ext { + /** Selected version string */ + t_u32 version_str_sel; + /** Version string */ + char version_str[MLAN_MAX_VER_STR_LEN]; +} mlan_ver_ext, *pmlan_ver_ext; + +/** mlan_bss_info data structure for MLAN_OID_GET_BSS_INFO */ +typedef struct _mlan_bss_info { + /** BSS mode */ + t_u32 bss_mode; + /** SSID */ + mlan_802_11_ssid ssid; + /** Table index */ + t_u32 scan_table_idx; + /** Channel */ + t_u32 bss_chan; + /** Band */ + t_u8 bss_band; + /** Region code */ + t_u32 region_code; + /** Connection status */ + t_u32 media_connected; + /** Radio on */ + t_u32 radio_on; + /** Max power level in dBm */ + t_s32 max_power_level; + /** Min power level in dBm */ + t_s32 min_power_level; + /** Adhoc state */ + t_u32 adhoc_state; + /** NF of last beacon */ + t_s32 bcn_nf_last; + /** wep status */ + t_u32 wep_status; + /** scan block status */ + t_u8 scan_block; + /** Host Sleep configured flag */ + t_u32 is_hs_configured; + /** Deep Sleep flag */ + t_u32 is_deep_sleep; + /** BSSID */ + mlan_802_11_mac_addr bssid; +#ifdef STA_SUPPORT + /** Capability Info */ + t_u16 capability_info; + /** Beacon Interval */ + t_u16 beacon_interval; + /** Listen Interval */ + t_u16 listen_interval; + /** Association Id */ + t_u16 assoc_id; + /** AP/Peer supported rates */ + t_u8 peer_supp_rates[MLAN_SUPPORTED_RATES]; +#endif /* STA_SUPPORT */ + /** Mobility Domain ID */ + t_u16 mdid; + /** FT Capability policy */ + t_u8 ft_cap; +} mlan_bss_info, *pmlan_bss_info; + +/** MAXIMUM number of TID */ +#define MAX_NUM_TID 8 + +/** Max RX Win size */ +#define MAX_RX_WINSIZE 64 + +/** rx_reorder_tbl */ +typedef struct { + /** TID */ + t_u16 tid; + /** TA */ + t_u8 ta[MLAN_MAC_ADDR_LENGTH]; + /** Start window */ + t_u32 start_win; + /** Window size */ + t_u32 win_size; + /** amsdu flag */ + t_u8 amsdu; + /** buffer status */ + t_u32 buffer[MAX_RX_WINSIZE]; +} rx_reorder_tbl; + +/** tx_ba_stream_tbl */ +typedef struct { + /** TID */ + t_u16 tid; + /** RA */ + t_u8 ra[MLAN_MAC_ADDR_LENGTH]; + /** amsdu flag */ + t_u8 amsdu; +} tx_ba_stream_tbl; + +/** Debug command number */ +#define DBG_CMD_NUM 10 + +#ifdef SDIO_MULTI_PORT_TX_AGGR +/** sdio mp debug number */ +#define SDIO_MP_DBG_NUM 10 +#endif + +/** Maximum size of IEEE Information Elements */ +#define IEEE_MAX_IE_SIZE 256 + +/** support up to 8 TDLS peer */ +#define MLAN_MAX_TDLS_PEER_SUPPORTED 8 +/** TDLS peer info */ +typedef struct _tdls_peer_info { + /** station mac address */ + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** SNR */ + t_s8 snr; + /** Noise Floor */ + t_s8 nf; + /** Extended Capabilities IE */ + t_u8 ext_cap[IEEE_MAX_IE_SIZE]; + /** HT Capabilities IE */ + t_u8 ht_cap[IEEE_MAX_IE_SIZE]; + /** VHT Capabilities IE */ + t_u8 vht_cap[IEEE_MAX_IE_SIZE]; +} tdls_peer_info; + +/** max ralist num */ +#define MLAN_MAX_RALIST_NUM 8 +/** ralist info */ +typedef struct _ralist_info { + /** RA list buffer */ + t_u8 ra[MLAN_MAC_ADDR_LENGTH]; + /** total packets in RA list */ + t_u16 total_pkts; + /** tid num */ + t_u8 tid; + /** tx_pause flag */ + t_u8 tx_pause; +} ralist_info; + +/** mlan_debug_info data structure for MLAN_OID_GET_DEBUG_INFO */ +typedef struct _mlan_debug_info { + /* WMM AC_BK count */ + t_u32 wmm_ac_bk; + /* WMM AC_BE count */ + t_u32 wmm_ac_be; + /* WMM AC_VI count */ + t_u32 wmm_ac_vi; + /* WMM AC_VO count */ + t_u32 wmm_ac_vo; + /** Corresponds to max_tx_buf_size member of mlan_adapter*/ + t_u32 max_tx_buf_size; + /** Corresponds to tx_buf_size member of mlan_adapter*/ + t_u32 tx_buf_size; + /** Corresponds to curr_tx_buf_size member of mlan_adapter*/ + t_u32 curr_tx_buf_size; + /** Tx table num */ + t_u32 tx_tbl_num; + /** Tx ba stream table */ + tx_ba_stream_tbl tx_tbl[MLAN_MAX_TX_BASTREAM_SUPPORTED]; + /** Rx table num */ + t_u32 rx_tbl_num; + /** Rx reorder table*/ + rx_reorder_tbl rx_tbl[MLAN_MAX_RX_BASTREAM_SUPPORTED]; + /** TDLS peer number */ + t_u32 tdls_peer_num; + /** TDLS peer list*/ + tdls_peer_info tdls_peer_list[MLAN_MAX_TDLS_PEER_SUPPORTED]; + /** ralist num */ + t_u32 ralist_num; + /** ralist info */ + ralist_info ralist[MLAN_MAX_RALIST_NUM]; + /** Corresponds to ps_mode member of mlan_adapter */ + t_u16 ps_mode; + /** Corresponds to ps_state member of mlan_adapter */ + t_u32 ps_state; +#ifdef STA_SUPPORT + /** Corresponds to is_deep_sleep member of mlan_adapter */ + t_u8 is_deep_sleep; +#endif /** STA_SUPPORT */ + /** Corresponds to pm_wakeup_card_req member of mlan_adapter */ + t_u8 pm_wakeup_card_req; + /** Corresponds to pm_wakeup_fw_try member of mlan_adapter */ + t_u32 pm_wakeup_fw_try; + /** time stamp when host try to wake up firmware */ + t_u32 pm_wakeup_in_secs; + /** Corresponds to is_hs_configured member of mlan_adapter */ + t_u8 is_hs_configured; + /** Corresponds to hs_activated member of mlan_adapter */ + t_u8 hs_activated; + /** Corresponds to pps_uapsd_mode member of mlan_adapter */ + t_u16 pps_uapsd_mode; + /** Corresponds to sleep_period.period member of mlan_adapter */ + t_u16 sleep_pd; + /** Corresponds to wmm_qosinfo member of mlan_private */ + t_u8 qos_cfg; + /** Corresponds to tx_lock_flag member of mlan_adapter */ + t_u8 tx_lock_flag; + /** Corresponds to port_open member of mlan_private */ + t_u8 port_open; + /** bypass pkt count */ + t_u16 bypass_pkt_count; + /** Corresponds to scan_processing member of mlan_adapter */ + t_u32 scan_processing; + /** Number of host to card command failures */ + t_u32 num_cmd_host_to_card_failure; + /** Number of host to card sleep confirm failures */ + t_u32 num_cmd_sleep_cfm_host_to_card_failure; + /** Number of host to card Tx failures */ + t_u32 num_tx_host_to_card_failure; + /** Number of card to host command/event failures */ + t_u32 num_cmdevt_card_to_host_failure; + /** Number of card to host Rx failures */ + t_u32 num_rx_card_to_host_failure; + /** Number of interrupt read failures */ + t_u32 num_int_read_failure; + /** Last interrupt status */ + t_u32 last_int_status; + /** number of interrupt receive */ + t_u32 num_of_irq; + /** FW update port number */ + t_u32 mp_update[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX * 2]; + /** Invalid port update count */ + t_u32 mp_invalid_update; +#ifdef SDIO_MULTI_PORT_TX_AGGR + /** Number of packets tx aggr */ + t_u32 mpa_tx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; + /** no more packets count*/ + t_u32 mpa_sent_last_pkt; + /** no write_ports count */ + t_u32 mpa_sent_no_ports; + /** last recv wr_bitmap */ + t_u32 last_recv_wr_bitmap; + /** last mp_wr_bitmap */ + t_u32 last_mp_wr_bitmap[SDIO_MP_DBG_NUM]; + /** last ports for cmd53 write data */ + t_u32 last_mp_wr_ports[SDIO_MP_DBG_NUM]; + /** last len for cmd53 write data */ + t_u32 last_mp_wr_len[SDIO_MP_DBG_NUM]; + /** last curr_wr_port */ + t_u8 last_curr_wr_port[SDIO_MP_DBG_NUM]; + /** length info for cmd53 write data */ + t_u16 last_mp_wr_info[SDIO_MP_DBG_NUM * SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; + /** last mp_index */ + t_u8 last_mp_index; + /** buffer for mp debug */ + t_u8 *mpa_buf; + /** length info for mp buf size */ + t_u32 mpa_buf_size; +#endif +#ifdef SDIO_MULTI_PORT_RX_AGGR + /** Number of packets rx aggr */ + t_u32 mpa_rx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; +#endif +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + /** mp aggr_pkt limit */ + t_u8 mp_aggr_pkt_limit; +#endif + /** Number of deauthentication events */ + t_u32 num_event_deauth; + /** Number of disassosiation events */ + t_u32 num_event_disassoc; + /** Number of link lost events */ + t_u32 num_event_link_lost; + /** Number of deauthentication commands */ + t_u32 num_cmd_deauth; + /** Number of association comamnd successes */ + t_u32 num_cmd_assoc_success; + /** Number of association command failures */ + t_u32 num_cmd_assoc_failure; + /** Number of Tx timeouts */ + t_u32 num_tx_timeout; + /** Number of command timeouts */ + t_u32 num_cmd_timeout; + /** Number of command timeouts */ + t_u32 dbg_num_cmd_timeout; + /** Timeout command ID */ + t_u16 timeout_cmd_id; + /** Timeout command action */ + t_u16 timeout_cmd_act; + /** List of last command IDs */ + t_u16 last_cmd_id[DBG_CMD_NUM]; + /** List of last command actions */ + t_u16 last_cmd_act[DBG_CMD_NUM]; + /** Last command index */ + t_u16 last_cmd_index; + /** List of last command response IDs */ + t_u16 last_cmd_resp_id[DBG_CMD_NUM]; + /** Last command response index */ + t_u16 last_cmd_resp_index; + /** List of last events */ + t_u16 last_event[DBG_CMD_NUM]; + /** Last event index */ + t_u16 last_event_index; + /** Number of no free command node */ + t_u16 num_no_cmd_node; + /** pending command id */ + t_u16 pending_cmd; + /** time stamp for dnld last cmd */ + t_u32 dnld_cmd_in_secs; + /** Corresponds to data_sent member of mlan_adapter */ + t_u8 data_sent; + /** Corresponds to cmd_sent member of mlan_adapter */ + t_u8 cmd_sent; + /** SDIO multiple port read bitmap */ + t_u32 mp_rd_bitmap; + /** SDIO multiple port write bitmap */ + t_u32 mp_wr_bitmap; + /** Current available port for read */ + t_u8 curr_rd_port; + /** Current available port for write */ + t_u8 curr_wr_port; + /** Corresponds to cmdresp_received member of mlan_adapter */ + t_u8 cmd_resp_received; + /** Corresponds to event_received member of mlan_adapter */ + t_u8 event_received; + /** pendig tx pkts */ + t_u32 tx_pkts_queued; +#ifdef UAP_SUPPORT + /** pending bridge pkts */ + t_u16 num_bridge_pkts; + /** dropped pkts */ + t_u32 num_drop_pkts; +#endif + /** mlan_processing */ + t_u32 mlan_processing; + /** mlan_rx_processing */ + t_u32 mlan_rx_processing; + /** rx pkts queued */ + t_u32 rx_pkts_queued; + /** mlan_adapter pointer */ + t_void *mlan_adapter; + /** mlan_adapter_size */ + t_u32 mlan_adapter_size; + /** mlan_priv vector */ + t_void *mlan_priv[MLAN_MAX_BSS_NUM]; + /** mlan_priv_size */ + t_u32 mlan_priv_size[MLAN_MAX_BSS_NUM]; + /** mlan_priv_num */ + t_u8 mlan_priv_num; +} mlan_debug_info, *pmlan_debug_info; + +#ifdef UAP_SUPPORT +/** Maximum number of clients supported by AP */ +#define MAX_NUM_CLIENTS MAX_STA_COUNT + +/** station info */ +typedef struct _sta_info { + /** STA MAC address */ + t_u8 mac_address[MLAN_MAC_ADDR_LENGTH]; + /** Power mfg status */ + t_u8 power_mfg_status; + /** RSSI */ + t_s8 rssi; +} sta_info; + +/** mlan_ds_sta_list structure for MLAN_OID_UAP_STA_LIST */ +typedef struct _mlan_ds_sta_list { + /** station count */ + t_u16 sta_count; + /** station list */ + sta_info info[MAX_NUM_CLIENTS]; +} mlan_ds_sta_list, *pmlan_ds_sta_list; +#endif + +/** Type definition of mlan_ds_get_info for MLAN_IOCTL_GET_INFO */ +typedef struct _mlan_ds_get_info { + /** Sub-command */ + t_u32 sub_command; + + /** Status information parameter */ + union { + /** Signal information for MLAN_OID_GET_SIGNAL */ + mlan_ds_get_signal signal; + /** Statistics information for MLAN_OID_GET_STATS */ + mlan_ds_get_stats stats; + /** Firmware information for MLAN_OID_GET_FW_INFO */ + mlan_fw_info fw_info; + /** Extended version information for MLAN_OID_GET_VER_EXT */ + mlan_ver_ext ver_ext; + /** BSS information for MLAN_OID_GET_BSS_INFO */ + mlan_bss_info bss_info; + /** Debug information for MLAN_OID_GET_DEBUG_INFO */ + t_u8 debug_info[1]; +#ifdef UAP_SUPPORT + /** UAP Statistics information for MLAN_OID_GET_STATS */ + mlan_ds_uap_stats ustats; + /** UAP station list for MLAN_OID_UAP_STA_LIST */ + mlan_ds_sta_list sta_list; +#endif + } param; +} mlan_ds_get_info, *pmlan_ds_get_info; + +/*-----------------------------------------------------------------*/ +/** Security Configuration Group */ +/*-----------------------------------------------------------------*/ +/** Enumeration for authentication mode */ +enum _mlan_auth_mode { + MLAN_AUTH_MODE_OPEN = 0x00, + MLAN_AUTH_MODE_SHARED = 0x01, + MLAN_AUTH_MODE_FT = 0x02, + MLAN_AUTH_MODE_NETWORKEAP = 0x80, + MLAN_AUTH_MODE_AUTO = 0xFF, +}; + +/**Enumeration for AssocAgent authentication mode, sync from FW.*/ +typedef enum { + AssocAgentAuth_Open, + AssocAgentAuth_Shared, + AssocAgentAuth_FastBss, + AssocAgentAuth_FastBss_Skip, + AssocAgentAuth_Network_EAP, + AssocAgentAuth_Auto, +} AssocAgentAuthType_e; + +/** Enumeration for encryption mode */ +enum _mlan_encryption_mode { + MLAN_ENCRYPTION_MODE_NONE = 0, + MLAN_ENCRYPTION_MODE_WEP40 = 1, + MLAN_ENCRYPTION_MODE_TKIP = 2, + MLAN_ENCRYPTION_MODE_CCMP = 3, + MLAN_ENCRYPTION_MODE_WEP104 = 4, +}; + +/** Enumeration for PSK */ +enum _mlan_psk_type { + MLAN_PSK_PASSPHRASE = 1, + MLAN_PSK_PMK, + MLAN_PSK_CLEAR, + MLAN_PSK_QUERY, +}; + +/** The bit to indicate the key is for unicast */ +#define MLAN_KEY_INDEX_UNICAST 0x40000000 +/** The key index to indicate default key */ +#define MLAN_KEY_INDEX_DEFAULT 0x000000ff +/** Maximum key length */ +/* #define MLAN_MAX_KEY_LENGTH 32 */ +/** Minimum passphrase length */ +#define MLAN_MIN_PASSPHRASE_LENGTH 8 +/** Maximum passphrase length */ +#define MLAN_MAX_PASSPHRASE_LENGTH 63 +/** PMK length */ +#define MLAN_PMK_HEXSTR_LENGTH 64 +/* A few details needed for WEP (Wireless Equivalent Privacy) */ +/** 104 bits */ +#define MAX_WEP_KEY_SIZE 13 +/** 40 bits RC4 - WEP */ +#define MIN_WEP_KEY_SIZE 5 +/** packet number size */ +#define PN_SIZE 16 +/** max seq size of wpa/wpa2 key */ +#define SEQ_MAX_SIZE 8 + +/** key flag for tx_seq */ +#define KEY_FLAG_TX_SEQ_VALID 0x00000001 +/** key flag for rx_seq */ +#define KEY_FLAG_RX_SEQ_VALID 0x00000002 +/** key flag for group key */ +#define KEY_FLAG_GROUP_KEY 0x00000004 +/** key flag for tx */ +#define KEY_FLAG_SET_TX_KEY 0x00000008 +/** key flag for mcast IGTK */ +#define KEY_FLAG_AES_MCAST_IGTK 0x00000010 +/** key flag for remove key */ +#define KEY_FLAG_REMOVE_KEY 0x80000000 + +/** Type definition of mlan_ds_encrypt_key for MLAN_OID_SEC_CFG_ENCRYPT_KEY */ +typedef struct _mlan_ds_encrypt_key { + /** Key disabled, all other fields will be + * ignore when this flag set to MTRUE + */ + t_u32 key_disable; + /** key removed flag, when this flag is set + * to MTRUE, only key_index will be check + */ + t_u32 key_remove; + /** Key index, used as current tx key index + * when is_current_wep_key is set to MTRUE + */ + t_u32 key_index; + /** Current Tx key flag */ + t_u32 is_current_wep_key; + /** Key length */ + t_u32 key_len; + /** Key */ + t_u8 key_material[MLAN_MAX_KEY_LENGTH]; + /** mac address */ + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** wapi key flag */ + t_u32 is_wapi_key; + /** Initial packet number */ + t_u8 pn[PN_SIZE]; + /** key flags */ + t_u32 key_flags; +} mlan_ds_encrypt_key, *pmlan_ds_encrypt_key; + +/** Type definition of mlan_passphrase_t */ +typedef struct _mlan_passphrase_t { + /** Length of passphrase */ + t_u32 passphrase_len; + /** Passphrase */ + t_u8 passphrase[MLAN_MAX_PASSPHRASE_LENGTH]; +} mlan_passphrase_t; + +/** Type defnition of mlan_pmk_t */ +typedef struct _mlan_pmk_t { + /** PMK */ + t_u8 pmk[MLAN_MAX_KEY_LENGTH]; +} mlan_pmk_t; + +/** Embedded supplicant RSN type: No RSN */ +#define RSN_TYPE_NO_RSN MBIT(0) +/** Embedded supplicant RSN type: WPA */ +#define RSN_TYPE_WPA MBIT(3) +/** Embedded supplicant RSN type: WPA-NONE */ +#define RSN_TYPE_WPANONE MBIT(4) +/** Embedded supplicant RSN type: WPA2 */ +#define RSN_TYPE_WPA2 MBIT(5) +/** Embedded supplicant RSN type: RFU */ +#define RSN_TYPE_VALID_BITS (RSN_TYPE_NO_RSN | RSN_TYPE_WPA | RSN_TYPE_WPANONE | RSN_TYPE_WPA2) + +/** Embedded supplicant cipher type: TKIP */ +#define EMBED_CIPHER_TKIP MBIT(2) +/** Embedded supplicant cipher type: AES */ +#define EMBED_CIPHER_AES MBIT(3) +/** Embedded supplicant cipher type: RFU */ +#define EMBED_CIPHER_VALID_BITS (EMBED_CIPHER_TKIP | EMBED_CIPHER_AES) + +/** Type definition of mlan_ds_passphrase for MLAN_OID_SEC_CFG_PASSPHRASE */ +typedef struct _mlan_ds_passphrase { + /** SSID may be used */ + mlan_802_11_ssid ssid; + /** BSSID may be used */ + mlan_802_11_mac_addr bssid; + /** Flag for passphrase or pmk used */ + t_u16 psk_type; + /** Passphrase or PMK */ + union { + /** Passphrase */ + mlan_passphrase_t passphrase; + /** PMK */ + mlan_pmk_t pmk; + } psk; +} mlan_ds_passphrase, *pmlan_ds_passphrase; + +/** Type definition of mlan_ds_esupp_mode for MLAN_OID_SEC_CFG_ESUPP_MODE */ +typedef struct _mlan_ds_ewpa_mode { + /** RSN mode */ + t_u32 rsn_mode; + /** Active pairwise cipher */ + t_u32 act_paircipher; + /** Active pairwise cipher */ + t_u32 act_groupcipher; +} mlan_ds_esupp_mode, *pmlan_ds_esupp_mode; + +/** Type definition of mlan_ds_sec_cfg for MLAN_IOCTL_SEC_CFG */ +typedef struct _mlan_ds_sec_cfg { + /** Sub-command */ + t_u32 sub_command; + /** Security configuration parameter */ + union { + /** Authentication mode for MLAN_OID_SEC_CFG_AUTH_MODE */ + t_u32 auth_mode; + /** Encryption mode for MLAN_OID_SEC_CFG_ENCRYPT_MODE */ + t_u32 encrypt_mode; + /** WPA enabled flag for MLAN_OID_SEC_CFG_WPA_ENABLED */ + t_u32 wpa_enabled; + /** WAPI enabled flag for MLAN_OID_SEC_CFG_WAPI_ENABLED */ + t_u32 wapi_enabled; + /** Port Control enabled flag for MLAN_OID_SEC_CFG_PORT_CTRL */ + t_u32 port_ctrl_enabled; + /** Encryption key for MLAN_OID_SEC_CFG_ENCRYPT_KEY */ + mlan_ds_encrypt_key encrypt_key; + /** Passphrase for MLAN_OID_SEC_CFG_PASSPHRASE */ + mlan_ds_passphrase passphrase; + /** Embedded supplicant WPA enabled flag for + * MLAN_OID_SEC_CFG_EWPA_ENABLED + */ + t_u32 ewpa_enabled; + /** Embedded supplicant mode for MLAN_OID_SEC_CFG_ESUPP_MODE */ + mlan_ds_esupp_mode esupp_mode; +#ifdef UAP_SUPPORT + t_u8 sta_mac[MLAN_MAC_ADDR_LENGTH]; +#endif + } param; +} mlan_ds_sec_cfg, *pmlan_ds_sec_cfg; + +/*-----------------------------------------------------------------*/ +/** Rate Configuration Group */ +/*-----------------------------------------------------------------*/ +/** Enumeration for rate type */ +enum _mlan_rate_type { + MLAN_RATE_INDEX, + MLAN_RATE_VALUE, + MLAN_RATE_BITMAP +}; + +/** Enumeration for rate format */ +enum _mlan_rate_format { + MLAN_RATE_FORMAT_LG = 0, + MLAN_RATE_FORMAT_HT, + MLAN_RATE_FORMAT_VHT, + MLAN_RATE_FORMAT_AUTO = 0xFF, +}; +/** Max bitmap rates size */ +#define MAX_BITMAP_RATES_SIZE 18 + +/** Type definition of mlan_rate_cfg_t for MLAN_OID_RATE_CFG */ +typedef struct _mlan_rate_cfg_t { + /** Fixed rate: 0, auto rate: 1 */ + t_u32 is_rate_auto; + /** Rate type. 0: index; 1: value; 2: bitmap */ + t_u32 rate_type; + /** Rate/MCS index or rate value if fixed rate */ + t_u32 rate; + /** Rate Bitmap */ + t_u16 bitmap_rates[MAX_BITMAP_RATES_SIZE]; + /** NSS */ + t_u32 nss; + /* LG rate: 0, HT rate: 1, VHT rate: 2 */ + t_u32 rate_format; +} mlan_rate_cfg_t; + +/** HT channel bandwidth */ +typedef enum _mlan_ht_bw { + MLAN_HT_BW20, + MLAN_HT_BW40, +/** VHT channel bandwidth */ + MLAN_VHT_BW80, + MLAN_VHT_BW160, +} mlan_ht_bw; + +/** HT guard interval */ +typedef enum _mlan_ht_gi { + MLAN_HT_LGI, + MLAN_HT_SGI, +} mlan_ht_gi; + +typedef enum _mlan_vht_stbc { + MLAN_VHT_STBC, + MLAN_VHT_NO_STBC, +} mlan_vht_stbc; + +typedef enum _mlan_vht_ldpc { + MLAN_VHT_LDPC, + MLAN_VHT_NO_LDPC, +} mlan_vht_ldpc; + +/** Band and BSS mode */ +typedef struct _mlan_band_data_rate { + /** Band configuration */ + t_u8 config_bands; + /** BSS mode (Infra or IBSS) */ + t_u8 bss_mode; +} mlan_band_data_rate; + +/** Type definition of mlan_data_rate for MLAN_OID_GET_DATA_RATE */ +typedef struct _mlan_data_rate { + /** Tx data rate */ + t_u32 tx_data_rate; + /** Rx data rate */ + t_u32 rx_data_rate; + + /** Tx channel bandwidth */ + t_u32 tx_ht_bw; + /** Tx guard interval */ + t_u32 tx_ht_gi; + /** Rx channel bandwidth */ + t_u32 rx_ht_bw; + /** Rx guard interval */ + t_u32 rx_ht_gi; + /** MCS index */ + t_u32 tx_mcs_index; + t_u32 rx_mcs_index; + /** NSS */ + t_u32 tx_nss; + t_u32 rx_nss; + /* LG rate: 0, HT rate: 1, VHT rate: 2 */ + t_u32 tx_rate_format; + t_u32 rx_rate_format; +} mlan_data_rate; + +/** Type definition of mlan_ds_rate for MLAN_IOCTL_RATE */ +typedef struct _mlan_ds_rate { + /** Sub-command */ + t_u32 sub_command; + /** Rate configuration parameter */ + union { + /** Rate configuration for MLAN_OID_RATE_CFG */ + mlan_rate_cfg_t rate_cfg; + /** Data rate for MLAN_OID_GET_DATA_RATE */ + mlan_data_rate data_rate; + /** Supported rates for MLAN_OID_SUPPORTED_RATES */ + t_u8 rates[MLAN_SUPPORTED_RATES]; + /** Band/BSS mode for getting supported rates */ + mlan_band_data_rate rate_band_cfg; + } param; +} mlan_ds_rate, *pmlan_ds_rate; + +/*-----------------------------------------------------------------*/ +/** Power Configuration Group */ +/*-----------------------------------------------------------------*/ + +/** Type definition of mlan_power_cfg_t for MLAN_OID_POWER_CFG */ +typedef struct _mlan_power_cfg_t { + /** Is power auto */ + t_u32 is_power_auto; + /** Power level in dBm */ + t_s32 power_level; +} mlan_power_cfg_t; + +/** max power table size */ +#define MAX_POWER_TABLE_SIZE 128 +#define TX_PWR_CFG_AUTO_CTRL_OFF 0xFF +#define MAX_POWER_GROUP 64 +/** Type definition of mlan_power group info */ +typedef struct mlan_power_group { + + /** rate format (LG: 0, HT: 1, VHT: 2, no auto ctrl: 0xFF) */ + t_u32 rate_format; + /** bandwidth (LG: 20 MHz, HT: 20/40 MHz, VHT: 80/160/80+80 MHz) */ + t_u8 bandwidth; + /** NSS */ + t_u32 nss; + /** LG: first rate index, HT/VHT: first MCS */ + t_u8 first_rate_ind; + /** LG: last rate index, HT/VHT: last MCS */ + t_u8 last_rate_ind; + /** minmum tx power (dBm) */ + t_s8 power_min; + /** maximum tx power (dBm) */ + t_s8 power_max; + /** tx power step (dB) */ + t_s8 power_step; +} mlan_power_group; + +/** Type definition of mlan_power_cfg_ext for MLAN_OID_POWER_CFG_EXT */ +typedef struct _mlan_power_cfg_ext { + /** number of power_groups */ + t_u32 num_pwr_grp; + /** array of power groups */ + mlan_power_group power_group[MAX_POWER_GROUP]; +} mlan_power_cfg_ext; + +/** Type definition of mlan_ds_power_cfg for MLAN_IOCTL_POWER_CFG */ +typedef struct _mlan_ds_power_cfg { + /** Sub-command */ + t_u32 sub_command; + /** Power configuration parameter */ + union { + /** Power configuration for MLAN_OID_POWER_CFG */ + mlan_power_cfg_t power_cfg; + /** Extended power configuration for MLAN_OID_POWER_CFG_EXT */ + mlan_power_cfg_ext power_ext; + } param; +} mlan_ds_power_cfg, *pmlan_ds_power_cfg; + +/*-----------------------------------------------------------------*/ +/** Power Management Configuration Group */ +/*-----------------------------------------------------------------*/ +/** Host sleep config conditions : Cancel */ +#define HOST_SLEEP_CFG_CANCEL 0xffffffff + +/** Host sleep config condition: broadcast data */ +#define HOST_SLEEP_COND_BROADCAST_DATA MBIT(0) +/** Host sleep config condition: unicast data */ +#define HOST_SLEEP_COND_UNICAST_DATA MBIT(1) +/** Host sleep config condition: mac event */ +#define HOST_SLEEP_COND_MAC_EVENT MBIT(2) +/** Host sleep config condition: multicast data */ +#define HOST_SLEEP_COND_MULTICAST_DATA MBIT(3) +/** Host sleep config condition: IPV6 packet */ +#define HOST_SLEEP_COND_IPV6_PACKET MBIT(31) + +/** Host sleep config conditions: Default */ +#define HOST_SLEEP_DEF_COND (HOST_SLEEP_COND_BROADCAST_DATA | HOST_SLEEP_COND_UNICAST_DATA | HOST_SLEEP_COND_MAC_EVENT) +/** Host sleep config GPIO : Default */ +#define HOST_SLEEP_DEF_GPIO 0xff +/** Host sleep config gap : Default */ +#define HOST_SLEEP_DEF_GAP 200 +/** Host sleep config min wake holdoff */ +#define HOST_SLEEP_DEF_WAKE_HOLDOFF 0; + +/** Type definition of mlan_ds_hs_cfg for MLAN_OID_PM_CFG_HS_CFG */ +typedef struct _mlan_ds_hs_cfg { + /** MTRUE to invoke the HostCmd, MFALSE otherwise */ + t_u32 is_invoke_hostcmd; + /** Host sleep config condition */ + /** Bit0: broadcast data + * Bit1: unicast data + * Bit2: mac event + * Bit3: multicast data + */ + t_u32 conditions; + /** GPIO pin or 0xff for interface */ + t_u32 gpio; + /** Gap in milliseconds or or 0xff for special + * setting when GPIO is used to wakeup host + */ + t_u32 gap; +} mlan_ds_hs_cfg, *pmlan_ds_hs_cfg; + +/** Enable deep sleep mode */ +#define DEEP_SLEEP_ON 1 +/** Disable deep sleep mode */ +#define DEEP_SLEEP_OFF 0 + +/** Default idle time in milliseconds for auto deep sleep */ +#define DEEP_SLEEP_IDLE_TIME 100 + +typedef struct _mlan_ds_auto_ds { + /** auto ds mode, 0 - disable, 1 - enable */ + t_u16 auto_ds; + /** auto ds idle time in milliseconds */ + t_u16 idletime; +} mlan_ds_auto_ds; + +/** Type definition of mlan_ds_inactivity_to + * for MLAN_OID_PM_CFG_INACTIVITY_TO + */ +typedef struct _mlan_ds_inactivity_to { + /** Timeout unit in microsecond, 0 means 1000us (1ms) */ + t_u32 timeout_unit; + /** Inactivity timeout for unicast data */ + t_u32 unicast_timeout; + /** Inactivity timeout for multicast data */ + t_u32 mcast_timeout; + /** Timeout for additional Rx traffic after Null PM1 packet exchange */ + t_u32 ps_entry_timeout; +} mlan_ds_inactivity_to, *pmlan_ds_inactivity_to; + +/** Minimum sleep period in milliseconds */ +#define MIN_SLEEP_PERIOD 10 +/** Maximum sleep period in milliseconds */ +#define MAX_SLEEP_PERIOD 60 +/** Special setting for UPSD certification tests */ +#define SLEEP_PERIOD_RESERVED_FF 0xFF + +/** PS null interval disable */ +#define PS_NULL_DISABLE (-1) + +/** Local listen interval disable */ +#define MRVDRV_LISTEN_INTERVAL_DISABLE (-1) +/** Minimum listen interval */ +#define MRVDRV_MIN_LISTEN_INTERVAL 0 + +/** Minimum multiple DTIM */ +#define MRVDRV_MIN_MULTIPLE_DTIM 0 +/** Maximum multiple DTIM */ +#define MRVDRV_MAX_MULTIPLE_DTIM 5 +/** Ignore multiple DTIM */ +#define MRVDRV_IGNORE_MULTIPLE_DTIM 0xfffe +/** Match listen interval to closest DTIM */ +#define MRVDRV_MATCH_CLOSEST_DTIM 0xfffd + +/** Minimum adhoc awake period */ +#define MIN_ADHOC_AWAKE_PD 0 +/** Maximum adhoc awake period */ +#define MAX_ADHOC_AWAKE_PD 31 +/** Special adhoc awake period */ +#define SPECIAL_ADHOC_AWAKE_PD 255 + +/** Minimum beacon miss timeout in milliseconds */ +#define MIN_BCN_MISS_TO 0 +/** Maximum beacon miss timeout in milliseconds */ +#define MAX_BCN_MISS_TO 50 +/** Disable beacon miss timeout */ +#define DISABLE_BCN_MISS_TO 65535 + +/** Minimum delay to PS in milliseconds */ +#define MIN_DELAY_TO_PS 0 +/** Maximum delay to PS in milliseconds */ +#define MAX_DELAY_TO_PS 65535 +/** Delay to PS unchanged */ +#define DELAY_TO_PS_UNCHANGED (-1) +/** Default delay to PS in milliseconds */ +#define DELAY_TO_PS_DEFAULT 1000 + +/** PS mode: Unchanged */ +#define PS_MODE_UNCHANGED 0 +/** PS mode: Auto */ +#define PS_MODE_AUTO 1 +/** PS mode: Poll */ +#define PS_MODE_POLL 2 +/** PS mode: Null */ +#define PS_MODE_NULL 3 + +/** Type definition of mlan_ds_ps_cfg for MLAN_OID_PM_CFG_PS_CFG */ +typedef struct _mlan_ds_ps_cfg { + /** PS null interval in seconds */ + t_u32 ps_null_interval; + /** Multiple DTIM interval */ + t_u32 multiple_dtim_interval; + /** Listen interval */ + t_u32 listen_interval; + /** Adhoc awake period */ + t_u32 adhoc_awake_period; + /** Beacon miss timeout in milliseconds */ + t_u32 bcn_miss_timeout; + /** Delay to PS in milliseconds */ + t_s32 delay_to_ps; + /** PS mode */ + t_u32 ps_mode; +} mlan_ds_ps_cfg, *pmlan_ds_ps_cfg; + +/** Type definition of mlan_ds_sleep_params for MLAN_OID_PM_CFG_SLEEP_PARAMS */ +typedef struct _mlan_ds_sleep_params { + /** Error */ + t_u32 error; + /** Offset in microseconds */ + t_u32 offset; + /** Stable time in microseconds */ + t_u32 stable_time; + /** Calibration control */ + t_u32 cal_control; + /** External sleep clock */ + t_u32 ext_sleep_clk; + /** Reserved */ + t_u32 reserved; +} mlan_ds_sleep_params, *pmlan_ds_sleep_params; + +/** sleep_param */ +typedef struct _ps_sleep_param { + /** control bitmap */ + t_u32 ctrl_bitmap; + /** minimum sleep period (micro second) */ + t_u32 min_sleep; + /** maximum sleep period (micro second) */ + t_u32 max_sleep; +} ps_sleep_param; + +/** inactivity sleep_param */ +typedef struct _inact_sleep_param { + /** inactivity timeout (micro second) */ + t_u32 inactivity_to; + /** miniumu awake period (micro second) */ + t_u32 min_awake; + /** maximum awake period (micro second) */ + t_u32 max_awake; +} inact_sleep_param; + +/** flag for ps mode */ +#define PS_FLAG_PS_MODE 1 +/** flag for sleep param */ +#define PS_FLAG_SLEEP_PARAM 2 +/** flag for inactivity sleep param */ +#define PS_FLAG_INACT_SLEEP_PARAM 4 + +/** Disable power mode */ +#define PS_MODE_DISABLE 0 +/** Enable periodic dtim ps */ +#define PS_MODE_PERIODIC_DTIM 1 +/** Enable inactivity ps */ +#define PS_MODE_INACTIVITY 2 + +/** mlan_ds_ps_mgmt */ +typedef struct _mlan_ds_ps_mgmt { + /** flags for valid field */ + t_u16 flags; + /** power mode */ + t_u16 ps_mode; + /** sleep param */ + ps_sleep_param sleep_param; + /** inactivity sleep param */ + inact_sleep_param inact_param; +} mlan_ds_ps_mgmt; + +/** mlan_ds_ps_info */ +typedef struct _mlan_ds_ps_info { + /** suspend allowed flag */ + t_u32 is_suspend_allowed; +} mlan_ds_ps_info; + +/** Type definition of mlan_ds_wakeup_reason for MLAN_OID_PM_HS_WAKEUP_REASON */ +typedef struct _mlan_ds_hs_wakeup_reason { + t_u16 hs_wakeup_reason; +} mlan_ds_hs_wakeup_reason; + +/** Type definition of mlan_ds_pm_cfg for MLAN_IOCTL_PM_CFG */ +typedef struct _mlan_ds_pm_cfg { + /** Sub-command */ + t_u32 sub_command; + /** Power management parameter */ + union { + /** Power saving mode for MLAN_OID_PM_CFG_IEEE_PS */ + t_u32 ps_mode; + /** Host Sleep configuration for MLAN_OID_PM_CFG_HS_CFG */ + mlan_ds_hs_cfg hs_cfg; + /** Deep sleep mode for MLAN_OID_PM_CFG_DEEP_SLEEP */ + mlan_ds_auto_ds auto_deep_sleep; + /** Inactivity timeout for MLAN_OID_PM_CFG_INACTIVITY_TO */ + mlan_ds_inactivity_to inactivity_to; + /** Sleep period for MLAN_OID_PM_CFG_SLEEP_PD */ + t_u32 sleep_period; + /** PS configuration parameters for MLAN_OID_PM_CFG_PS_CFG */ + mlan_ds_ps_cfg ps_cfg; + /** PS configuration parameters for MLAN_OID_PM_CFG_SLEEP_PARAMS */ + mlan_ds_sleep_params sleep_params; + /** PS configuration parameters for MLAN_OID_PM_CFG_PS_MODE */ + mlan_ds_ps_mgmt ps_mgmt; + /** power info for MLAN_OID_PM_INFO */ + mlan_ds_ps_info ps_info; + /** hs wakeup reason for MLAN_OID_PM_HS_WAKEUP_REASON */ + mlan_ds_hs_wakeup_reason wakeup_reason; + } param; +} mlan_ds_pm_cfg, *pmlan_ds_pm_cfg; + +#ifdef RX_PACKET_COALESCE +typedef struct { + mlan_cmd_result_e cmd_result; /**< Firmware execution result */ + + t_u32 pkt_threshold; + /** Packet threshold */ + t_u16 delay; + /** Timeout value in milliseconds */ +} wlan_ioctl_rx_pkt_coalesce_config_t; +#endif + +/*-----------------------------------------------------------------*/ +/** WMM Configuration Group */ +/*-----------------------------------------------------------------*/ + +/** WMM TSpec size */ +#define MLAN_WMM_TSPEC_SIZE 63 +/** WMM Add TS extra IE bytes */ +#define MLAN_WMM_ADDTS_EXTRA_IE_BYTES 256 +/** WMM statistics for packets hist bins */ +#define MLAN_WMM_STATS_PKTS_HIST_BINS 7 +/** Maximum number of AC QOS queues available */ +#define MLAN_WMM_MAX_AC_QUEUES 4 + +/** + * @brief IOCTL structure to send an ADDTS request and retrieve the response. + * + * IOCTL structure from the application layer relayed to firmware to + * instigate an ADDTS management frame with an appropriate TSPEC IE as well + * as any additional IEs appended in the ADDTS Action frame. + * + * @sa woal_wmm_addts_req_ioctl + */ +typedef struct { + mlan_cmd_result_e cmd_result; /**< Firmware execution result */ + + t_u32 timeout_ms; /**< Timeout value in milliseconds */ + t_u8 ieee_status_code; /**< IEEE status code */ + + t_u32 ie_data_len; /**< Length of ie block in ie_data */ + t_u8 ie_data[MLAN_WMM_TSPEC_SIZE + /**< TSPEC to send in the ADDTS */ + + MLAN_WMM_ADDTS_EXTRA_IE_BYTES]; + /**< Extra IE buf*/ +} wlan_ioctl_wmm_addts_req_t; + +/** + * @brief IOCTL structure to send a DELTS request. + * + * IOCTL structure from the application layer relayed to firmware to + * instigate an DELTS management frame with an appropriate TSPEC IE. + * + * @sa woal_wmm_delts_req_ioctl + */ +typedef struct { + mlan_cmd_result_e cmd_result; + /**< Firmware execution result */ + t_u8 ieee_reason_code; /**< IEEE reason code sent, unused for WMM */ + t_u32 ie_data_len; /**< Length of ie block in ie_data */ + t_u8 ie_data[MLAN_WMM_TSPEC_SIZE]; + /**< TSPEC to send in the DELTS */ +} wlan_ioctl_wmm_delts_req_t; + +/** + * @brief IOCTL structure to configure a specific AC Queue's parameters + * + * IOCTL structure from the application layer relayed to firmware to + * get, set, or default the WMM AC queue parameters. + * + * - msdu_lifetime_expiry is ignored if set to 0 on a set command + * + * @sa woal_wmm_queue_config_ioctl + */ +typedef struct { + mlan_wmm_queue_config_action_e action;/**< Set, Get, or Default */ + mlan_wmm_ac_e access_category; /**< WMM_AC_BK(0) to WMM_AC_VO(3) */ + t_u16 msdu_lifetime_expiry; /**< lifetime expiry in TUs */ + t_u8 supported_rates[10]; /**< Not supported yet */ +} wlan_ioctl_wmm_queue_config_t; + +/** + * @brief IOCTL structure to start, stop, and get statistics for a WMM AC + * + * IOCTL structure from the application layer relayed to firmware to + * start or stop statistical collection for a given AC. Also used to + * retrieve and clear the collected stats on a given AC. + * + * @sa woal_wmm_queue_stats_ioctl + */ +typedef struct { + /** Action of Queue Config : Start, Stop, or Get */ + mlan_wmm_queue_stats_action_e action; + /** User Priority */ + t_u8 user_priority; + /** Number of successful packets transmitted */ + t_u16 pkt_count; + /** Packets lost; not included in pkt_count */ + t_u16 pkt_loss; + /** Average Queue delay in microseconds */ + t_u32 avg_queue_delay; + /** Average Transmission delay in microseconds */ + t_u32 avg_tx_delay; + /** Calculated used time in units of 32 microseconds */ + t_u16 used_time; + /** Calculated policed time in units of 32 microseconds */ + t_u16 policed_time; + /** Queue Delay Histogram; number of packets per queue delay range + * + * [0] - 0ms <= delay < 5ms + * [1] - 5ms <= delay < 10ms + * [2] - 10ms <= delay < 20ms + * [3] - 20ms <= delay < 30ms + * [4] - 30ms <= delay < 40ms + * [5] - 40ms <= delay < 50ms + * [6] - 50ms <= delay < msduLifetime (TUs) + */ + t_u16 delay_histogram[MLAN_WMM_STATS_PKTS_HIST_BINS]; +} wlan_ioctl_wmm_queue_stats_t, +/** Type definition of mlan_ds_wmm_queue_stats + * for MLAN_OID_WMM_CFG_QUEUE_STATS + */ +mlan_ds_wmm_queue_stats, *pmlan_ds_wmm_queue_stats; + +/** + * @brief IOCTL sub structure for a specific WMM AC Status + */ +typedef struct { + /** WMM Acm */ + t_u8 wmm_acm; + /** Flow required flag */ + t_u8 flow_required; + /** Flow created flag */ + t_u8 flow_created; + /** Disabled flag */ + t_u8 disabled; +} wlan_ioctl_wmm_queue_status_ac_t; + +/** + * @brief IOCTL structure to retrieve the WMM AC Queue status + * + * IOCTL structure from the application layer to retrieve: + * - ACM bit setting for the AC + * - Firmware status (flow required, flow created, flow disabled) + * + * @sa woal_wmm_queue_status_ioctl + */ +typedef struct { + /** WMM AC queue status */ + wlan_ioctl_wmm_queue_status_ac_t ac_status[MLAN_WMM_MAX_AC_QUEUES]; +} wlan_ioctl_wmm_queue_status_t, +/** Type definition of mlan_ds_wmm_queue_status + * for MLAN_OID_WMM_CFG_QUEUE_STATUS + */ +mlan_ds_wmm_queue_status, *pmlan_ds_wmm_queue_status; + +/** Type definition of mlan_ds_wmm_addts for MLAN_OID_WMM_CFG_ADDTS */ +typedef struct _mlan_ds_wmm_addts { + /** Result of ADDTS request */ + mlan_cmd_result_e result; + /** Timeout value in milliseconds */ + t_u32 timeout; + /** IEEE status code */ + t_u32 status_code; + /** Dialog token */ + t_u8 dialog_tok; + /** TSPEC data length */ + t_u32 ie_data_len; + /** TSPEC to send in the ADDTS + buffering for any extra IEs */ + t_u8 ie_data[MLAN_WMM_TSPEC_SIZE + MLAN_WMM_ADDTS_EXTRA_IE_BYTES]; +} mlan_ds_wmm_addts, *pmlan_ds_wmm_addts; + +/** Type definition of mlan_ds_wmm_delts for MLAN_OID_WMM_CFG_DELTS */ +typedef struct _mlan_ds_wmm_delts { + /** Result of DELTS request */ + mlan_cmd_result_e result; + /** IEEE status code */ + t_u32 status_code; + /** TSPEC data length */ + t_u8 ie_data_len; + /** TSPEC to send in the DELTS */ + t_u8 ie_data[MLAN_WMM_TSPEC_SIZE]; +} mlan_ds_wmm_delts, *pmlan_ds_wmm_delts; + +/** Type definition of mlan_ds_wmm_queue_config + * for MLAN_OID_WMM_CFG_QUEUE_CONFIG + */ +typedef struct _mlan_ds_wmm_queue_config { + /** Action of Queue Config : Set, Get, or Default */ + mlan_wmm_queue_config_action_e action; + /** WMM Access Category: WMM_AC_BK(0) to WMM_AC_VO(3) */ + mlan_wmm_ac_e access_category; + /** Lifetime expiry in TUs */ + t_u16 msdu_lifetime_expiry; + /** Reserve for future use */ + t_u8 reserved[10]; +} mlan_ds_wmm_queue_config, *pmlan_ds_wmm_queue_config; + +/** Type definition of mlan_ds_wmm_cfg for MLAN_IOCTL_WMM_CFG */ +typedef struct _mlan_ds_wmm_cfg { + /** Sub-command */ + t_u32 sub_command; + /** WMM configuration parameter */ + union { + /** WMM enable for MLAN_OID_WMM_CFG_ENABLE */ + t_u32 wmm_enable; + /** QoS configuration for MLAN_OID_WMM_CFG_QOS */ + t_u8 qos_cfg; + /** WMM add TS for MLAN_OID_WMM_CFG_ADDTS */ + mlan_ds_wmm_addts addts; + /** WMM delete TS for MLAN_OID_WMM_CFG_DELTS */ + mlan_ds_wmm_delts delts; + /** WMM queue configuration for MLAN_OID_WMM_CFG_QUEUE_CONFIG */ + mlan_ds_wmm_queue_config q_cfg; + /** WMM queue status for MLAN_OID_WMM_CFG_QUEUE_STATS */ + mlan_ds_wmm_queue_stats q_stats; + /** WMM queue status for MLAN_OID_WMM_CFG_QUEUE_STATUS */ + mlan_ds_wmm_queue_status q_status; + /** WMM TS status for MLAN_OID_WMM_CFG_TS_STATUS */ + mlan_ds_wmm_ts_status ts_status; + } param; +} mlan_ds_wmm_cfg, *pmlan_ds_wmm_cfg; + +/*-----------------------------------------------------------------*/ +/** WPS Configuration Group */ +/*-----------------------------------------------------------------*/ +/** Enumeration for WPS session */ +enum _mlan_wps_status { + MLAN_WPS_CFG_SESSION_START = 1, + MLAN_WPS_CFG_SESSION_END = 0 +}; + +/** Type definition of mlan_ds_wps_cfg for MLAN_IOCTL_WPS_CFG */ +typedef struct _mlan_ds_wps_cfg { + /** Sub-command */ + t_u32 sub_command; + /** WPS configuration parameter */ + union { + /** WPS session for MLAN_OID_WPS_CFG_SESSION */ + t_u32 wps_session; + } param; +} mlan_ds_wps_cfg, *pmlan_ds_wps_cfg; + +/*-----------------------------------------------------------------*/ +/** 802.11n Configuration Group */ +/*-----------------------------------------------------------------*/ +/** Maximum MCS */ +#define NUM_MCS_FIELD 16 + +/** Supported stream modes */ +#define HT_STREAM_MODE_1X1 0x11 +#define HT_STREAM_MODE_2X2 0x22 + +/* Both 2.4G and 5G band selected */ +#define BAND_SELECT_BOTH 0 +/* Band 2.4G selected */ +#define BAND_SELECT_BG 1 +/* Band 5G selected */ +#define BAND_SELECT_A 2 + +/** Type definition of mlan_ds_11n_htcap_cfg for MLAN_OID_11N_HTCAP_CFG */ +typedef struct _mlan_ds_11n_htcap_cfg { + /** HT Capability information */ + t_u32 htcap; + /** Band selection */ + t_u32 misc_cfg; + /** Hardware HT cap information required */ + t_u32 hw_cap_req; +} mlan_ds_11n_htcap_cfg, *pmlan_ds_11n_htcap_cfg; + +/** Type definition of mlan_ds_11n_addba_param + * for MLAN_OID_11N_CFG_ADDBA_PARAM + */ +typedef struct _mlan_ds_11n_addba_param { + /** Timeout */ + t_u32 timeout; + /** Buffer size for ADDBA request */ + t_u32 txwinsize; + /** Buffer size for ADDBA response */ + t_u32 rxwinsize; + /** amsdu for ADDBA request */ + t_u8 txamsdu; + /** amsdu for ADDBA response */ + t_u8 rxamsdu; +} mlan_ds_11n_addba_param, *pmlan_ds_11n_addba_param; + +/** Type definition of mlan_ds_11n_tx_cfg for MLAN_OID_11N_CFG_TX */ +typedef struct _mlan_ds_11n_tx_cfg { + /** HTTxCap */ + t_u16 httxcap; + /** HTTxInfo */ + t_u16 httxinfo; + /** Band selection */ + t_u32 misc_cfg; +} mlan_ds_11n_tx_cfg, *pmlan_ds_11n_tx_cfg; + +/** BF Global Configuration */ +#define BF_GLOBAL_CONFIGURATION 0x00 +/** Performs NDP sounding for PEER specified */ +#define TRIGGER_SOUNDING_FOR_PEER 0x01 +/** TX BF interval for channel sounding */ +#define SET_GET_BF_PERIODICITY 0x02 +/** Tell FW not to perform any sounding for peer */ +#define TX_BF_FOR_PEER_ENBL 0x03 +/** TX BF SNR threshold for peer */ +#define SET_SNR_THR_PEER 0x04 + +/* Maximum number of peer MAC and status/SNR tuples */ +#define MAX_PEER_MAC_TUPLES 10 + +/** Any new subcommand structure should be declare here */ + +/** bf global cfg args */ +typedef struct _mlan_bf_global_cfg_args { + /** Global enable/disable bf */ + t_u8 bf_enbl; + /** Global enable/disable sounding */ + t_u8 sounding_enbl; + /** FB Type */ + t_u8 fb_type; + /** SNR Threshold */ + t_u8 snr_threshold; + /** Sounding interval in milliseconds */ + t_u16 sounding_interval; + /** BF mode */ + t_u8 bf_mode; + /** Reserved */ + t_u8 reserved; +} mlan_bf_global_cfg_args; + +/** trigger sounding args */ +typedef struct _mlan_trigger_sound_args { + /** Peer MAC address */ + t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; + /** Status */ + t_u8 status; +} mlan_trigger_sound_args; + +/** bf periodicity args */ +typedef struct _mlan_bf_periodicity_args { + /** Peer MAC address */ + t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; + /** Current Tx BF Interval in milliseconds */ + t_u16 interval; + /** Status */ + t_u8 status; +} mlan_bf_periodicity_args; + +/** tx bf peer args */ +typedef struct _mlan_tx_bf_peer_args { + /** Peer MAC address */ + t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; + /** Reserved */ + t_u16 reserved; + /** Enable/Disable Beamforming */ + t_u8 bf_enbl; + /** Enable/Disable sounding */ + t_u8 sounding_enbl; + /** FB Type */ + t_u8 fb_type; +} mlan_tx_bf_peer_args; + +/** SNR threshold args */ +typedef struct _mlan_snr_thr_args { + /** Peer MAC address */ + t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; + /** SNR for peer */ + t_u8 snr; +} mlan_snr_thr_args; + +/** Type definition of mlan_ds_11n_tx_bf_cfg for MLAN_OID_11N_CFG_TX_BF_CFG */ +typedef struct _mlan_ds_11n_tx_bf_cfg { + /** BF Action */ + t_u16 bf_action; + /** Action */ + t_u16 action; + /** Number of peers */ + t_u32 no_of_peers; + union { + mlan_bf_global_cfg_args bf_global_cfg; + mlan_trigger_sound_args bf_sound[MAX_PEER_MAC_TUPLES]; + mlan_bf_periodicity_args bf_periodicity[MAX_PEER_MAC_TUPLES]; + mlan_tx_bf_peer_args tx_bf_peer[MAX_PEER_MAC_TUPLES]; + mlan_snr_thr_args bf_snr[MAX_PEER_MAC_TUPLES]; + } body; +} mlan_ds_11n_tx_bf_cfg, *pmlan_ds_11n_tx_bf_cfg; + +/** Type definition of mlan_ds_11n_amsdu_aggr_ctrl for + * MLAN_OID_11N_AMSDU_AGGR_CTRL*/ +typedef struct _mlan_ds_11n_amsdu_aggr_ctrl { + /** Enable/Disable */ + t_u16 enable; + /** Current AMSDU size valid */ + t_u16 curr_buf_size; +} mlan_ds_11n_amsdu_aggr_ctrl, *pmlan_ds_11n_amsdu_aggr_ctrl; + +/** Type definition of mlan_ds_11n_aggr_prio_tbl + * for MLAN_OID_11N_CFG_AGGR_PRIO_TBL + */ +typedef struct _mlan_ds_11n_aggr_prio_tbl { + /** ampdu priority table */ + t_u8 ampdu[MAX_NUM_TID]; + /** amsdu priority table */ + t_u8 amsdu[MAX_NUM_TID]; +} mlan_ds_11n_aggr_prio_tbl, *pmlan_ds_11n_aggr_prio_tbl; + +/** DelBA All TIDs */ +#define DELBA_ALL_TIDS 0xff +/** DelBA Tx */ +#define DELBA_TX MBIT(0) +/** DelBA Rx */ +#define DELBA_RX MBIT(1) + +/** Type definition of mlan_ds_11n_delba for MLAN_OID_11N_CFG_DELBA */ +typedef struct _mlan_ds_11n_delba { + /** TID */ + t_u8 tid; + /** Peer MAC address */ + t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** Direction (Tx: bit 0, Rx: bit 1) */ + t_u8 direction; +} mlan_ds_11n_delba, *pmlan_ds_11n_delba; + +/** Type definition of mlan_ds_delba for MLAN_OID_11N_CFG_REJECT_ADDBA_REQ */ +typedef struct _mlan_ds_reject_addba_req { + /** Bit0 : host sleep activated + * Bit1 : auto reconnect enabled + * Others : reserved + */ + t_u32 conditions; +} mlan_ds_reject_addba_req, *pmlan_ds_reject_addba_req; + +/** Type definition of mlan_ds_11n_cfg for MLAN_IOCTL_11N_CFG */ +typedef struct _mlan_ds_11n_cfg { + /** Sub-command */ + t_u32 sub_command; + /** 802.11n configuration parameter */ + union { + /** Tx param for 11n for MLAN_OID_11N_CFG_TX */ + mlan_ds_11n_tx_cfg tx_cfg; + /** Aggr priority table for MLAN_OID_11N_CFG_AGGR_PRIO_TBL */ + mlan_ds_11n_aggr_prio_tbl aggr_prio_tbl; + /** Add BA param for MLAN_OID_11N_CFG_ADDBA_PARAM */ + mlan_ds_11n_addba_param addba_param; + /** Add BA Reject paramters for MLAN_OID_11N_CFG_ADDBA_REJECT */ + t_u8 addba_reject[MAX_NUM_TID]; + /** Tx buf size for MLAN_OID_11N_CFG_MAX_TX_BUF_SIZE */ + t_u32 tx_buf_size; + /** HT cap info configuration for MLAN_OID_11N_HTCAP_CFG */ + mlan_ds_11n_htcap_cfg htcap_cfg; + /** Tx param for 11n for MLAN_OID_11N_AMSDU_AGGR_CTRL */ + mlan_ds_11n_amsdu_aggr_ctrl amsdu_aggr_ctrl; + /** Supported MCS Set field */ + t_u8 supported_mcs_set[NUM_MCS_FIELD]; + /** Transmit Beamforming Capabilities field */ + t_u32 tx_bf_cap; + /** Transmit Beamforming configuration */ + mlan_ds_11n_tx_bf_cfg tx_bf; + /** HT stream configuration */ + t_u32 stream_cfg; + /** DelBA for MLAN_OID_11N_CFG_DELBA */ + mlan_ds_11n_delba del_ba; + /** Reject Addba Req for MLAN_OID_11N_CFG_REJECT_ADDBA_REQ */ + mlan_ds_reject_addba_req reject_addba_req; + /** Control coex RX window size configuration */ + t_u32 coex_rx_winsize; + /** Control TX AMPDU configuration */ + t_u32 txaggrctrl; + } param; +} mlan_ds_11n_cfg, *pmlan_ds_11n_cfg; + +#define NUM_MCS_SUPP 20 +#define VHT_MCS_SET_LEN 8 + +/** Type definition of mlan_ds_11ac_vhtcap_cfg for MLAN_OID_11AC_VHTCAP_CFG */ +typedef struct _mlan_ds_11ac_vhtcap_cfg { + /** HT Capability information */ + t_u32 vhtcap; + /** Band selection */ + t_u32 misc_cfg; + /** Hardware HT cap information required */ + t_u32 hw_cap_req; +} mlan_ds_11ac_vhtcap_cfg, *pmlan_ds_11ac_vhtcap_cfg; + +/** Type definition of mlan_ds_11ac_tx_cfg for MLAN_OID_11AC_CFG_TX */ +typedef struct _mlan_ds_11ac_tx_cfg { + /** Band selection */ + t_u8 band_cfg; + /** misc configuration */ + t_u8 misc_cfg; + /** HTTxCap */ + t_u16 vhttxcap; + /** HTTxInfo */ + t_u16 vhttxinfo; +} mlan_ds_11ac_tx_cfg, *pmlan_ds_11ac_tx_cfg; + +/** Tx */ +#define MLAN_RADIO_TX MBIT(0) +/** Rx */ +#define MLAN_RADIO_RX MBIT(1) +/** Tx & Rx */ +#define MLAN_RADIO_TXRX (MLAN_RADIO_TX | MLAN_RADIO_RX) + +/** Type definition of mlan_ds_11ac_tx_cfg for MLAN_OID_11AC_CFG */ +typedef struct _mlan_ds_11ac_vht_cfg { + /** Band selection (1: 2.4G, 2: 5 G, 3: both 2.4G and 5G) */ + t_u32 band; + /** TxRx (1: Tx, 2: Rx, 3: both Tx and Rx) */ + t_u32 txrx; + /** BW CFG (0: 11N CFG, 1: vhtcap) */ + t_u32 bwcfg; + /** VHT capabilities. */ + t_u32 vht_cap_info; + /** VHT Tx mcs */ + t_u32 vht_tx_mcs; + /** VHT Rx mcs */ + t_u32 vht_rx_mcs; + /** VHT rx max rate */ + t_u16 vht_rx_max_rate; + /** VHT max tx rate */ + t_u16 vht_tx_max_rate; +} mlan_ds_11ac_vht_cfg, *pmlan_ds_11ac_vht_cfg; + +/** Type definition of mlan_ds_11ac_cfg for MLAN_IOCTL_11AC_CFG */ +typedef struct _mlan_ds_11ac_cfg { + /** Sub-command */ + t_u32 sub_command; + /** 802.11n configuration parameter */ + union { + /** VHT configuration for MLAN_OID_11AC_VHT_CFG */ + mlan_ds_11ac_vht_cfg vht_cfg; + /** Supported MCS Set field */ + t_u8 supported_mcs_set[NUM_MCS_SUPP]; + } param; +} mlan_ds_11ac_cfg, *pmlan_ds_11ac_cfg; + +/** Country code length */ +#define COUNTRY_CODE_LEN 3 + +/*-----------------------------------------------------------------*/ +/** 802.11d Configuration Group */ +/*-----------------------------------------------------------------*/ +/** Maximum subbands for 11d */ +#define MRVDRV_MAX_SUBBAND_802_11D 83 + +#ifdef STA_SUPPORT +/** Data structure for subband set */ +typedef struct _mlan_ds_subband_set_t { + /** First channel */ + t_u8 first_chan; + /** Number of channels */ + t_u8 no_of_chan; + /** Maximum Tx power in dBm */ + t_u8 max_tx_pwr; +} mlan_ds_subband_set_t; + +/** Domain regulatory information */ +typedef struct _mlan_ds_11d_domain_info { + /** Country Code */ + t_u8 country_code[COUNTRY_CODE_LEN]; + /** Band that channels in sub_band belong to */ + t_u8 band; + /** No. of subband in below */ + t_u8 no_of_sub_band; + /** Subband data to send/last sent */ + mlan_ds_subband_set_t sub_band[MRVDRV_MAX_SUBBAND_802_11D]; +} mlan_ds_11d_domain_info; +#endif + +/** Type definition of mlan_ds_11d_cfg for MLAN_IOCTL_11D_CFG */ +typedef struct _mlan_ds_11d_cfg { + /** Sub-command */ + t_u32 sub_command; + /** 802.11d configuration parameter */ + union { +#ifdef STA_SUPPORT + /** Enable for MLAN_OID_11D_CFG_ENABLE */ + t_u32 enable_11d; + /** Domain info for MLAN_OID_11D_DOMAIN_INFO */ + mlan_ds_11d_domain_info domain_info; +#endif /* STA_SUPPORT */ +#ifdef UAP_SUPPORT + /** tlv data for MLAN_OID_11D_DOMAIN_INFO */ + t_u8 domain_tlv[MAX_IE_SIZE]; +#endif /* UAP_SUPPORT */ + } param; +} mlan_ds_11d_cfg, *pmlan_ds_11d_cfg; + +/*-----------------------------------------------------------------*/ +/** Register Memory Access Group */ +/*-----------------------------------------------------------------*/ +/** Enumeration for CSU target device type */ +enum _mlan_csu_target_type { + MLAN_CSU_TARGET_CAU = 1, + MLAN_CSU_TARGET_PSU, +}; + +/** Enumeration for register type */ +enum _mlan_reg_type { + MLAN_REG_MAC = 1, + MLAN_REG_BBP, + MLAN_REG_RF, + MLAN_REG_CAU = 5, + MLAN_REG_PSU = 6, +}; + +/** Type definition of mlan_ds_reg_rw for MLAN_OID_REG_RW */ +typedef struct _mlan_ds_reg_rw { + /** Register type */ + t_u32 type; + /** Offset */ + t_u32 offset; + /** Value */ + t_u32 value; +} mlan_ds_reg_rw; + +/** Maximum EEPROM data */ +#define MAX_EEPROM_DATA 256 + +/** Type definition of mlan_ds_read_eeprom for MLAN_OID_EEPROM_RD */ +typedef struct _mlan_ds_read_eeprom { + /** Multiples of 4 */ + t_u16 offset; + /** Number of bytes */ + t_u16 byte_count; + /** Value */ + t_u8 value[MAX_EEPROM_DATA]; +} mlan_ds_read_eeprom; + +/** Type definition of mlan_ds_mem_rw for MLAN_OID_MEM_RW */ +typedef struct _mlan_ds_mem_rw { + /** Address */ + t_u32 addr; + /** Value */ + t_u32 value; +} mlan_ds_mem_rw; + +/** Type definition of mlan_ds_reg_mem for MLAN_IOCTL_REG_MEM */ +typedef struct _mlan_ds_reg_mem { + /** Sub-command */ + t_u32 sub_command; + /** Register memory access parameter */ + union { + /** Register access for MLAN_OID_REG_RW */ + mlan_ds_reg_rw reg_rw; + /** EEPROM access for MLAN_OID_EEPROM_RD */ + mlan_ds_read_eeprom rd_eeprom; + /** Memory access for MLAN_OID_MEM_RW */ + mlan_ds_mem_rw mem_rw; + } param; +} mlan_ds_reg_mem, *pmlan_ds_reg_mem; + +/*-----------------------------------------------------------------*/ +/** Multi-Radio Configuration Group */ +/*-----------------------------------------------------------------*/ + +/*-----------------------------------------------------------------*/ +/** 802.11h Configuration Group */ +/*-----------------------------------------------------------------*/ +#if defined(DFS_TESTING_SUPPORT) +/** Type definition of mlan_ds_11h_dfs_testing for MLAN_OID_11H_DFS_TESTING */ +typedef struct _mlan_ds_11h_dfs_testing { + /** User-configured CAC period in milliseconds, 0 to use default */ + t_u16 usr_cac_period_msec; + /** User-configured NOP period in seconds, 0 to use default */ + t_u16 usr_nop_period_sec; + /** User-configured skip channel change, 0 to disable */ + t_u8 usr_no_chan_change; + /** User-configured fixed channel to change to, 0 to use random channel */ + t_u8 usr_fixed_new_chan; +} mlan_ds_11h_dfs_testing, *pmlan_ds_11h_dfs_testing; +#endif + +typedef struct _mlan_ds_11h_chan_rep_req { + t_u16 startFreq; + t_u8 chanWidth; + t_u8 chanNum; + t_u32 millisec_dwell_time; + /**< Channel dwell time in milliseconds */ +} mlan_ds_11h_chan_rep_req; + +/** Type definition of mlan_ds_11h_cfg for MLAN_IOCTL_11H_CFG */ +typedef struct _mlan_ds_11h_cfg { + /** Sub-command */ + t_u32 sub_command; + union { + /** Local power constraint for MLAN_OID_11H_LOCAL_POWER_CONSTRAINT */ + t_s8 usr_local_power_constraint; +#if defined(DFS_TESTING_SUPPORT) + /** User-configuation for MLAN_OID_11H_DFS_TESTING */ + mlan_ds_11h_dfs_testing dfs_testing; +#endif + mlan_ds_11h_chan_rep_req chan_rpt_req; + } param; +} mlan_ds_11h_cfg, *pmlan_ds_11h_cfg; + +/*-----------------------------------------------------------------*/ +/** Miscellaneous Configuration Group */ +/*-----------------------------------------------------------------*/ + +/** CMD buffer size */ +#define MLAN_SIZE_OF_CMD_BUFFER 2048 + +/** LDO Internal */ +#define LDO_INTERNAL 0 +/** LDO External */ +#define LDO_EXTERNAL 1 + +/** Enumeration for IE type */ +enum _mlan_ie_type { + MLAN_IE_TYPE_GEN_IE = 0, +#ifdef STA_SUPPORT + MLAN_IE_TYPE_ARP_FILTER, +#endif /* STA_SUPPORT */ +}; + +/** Type definition of mlan_ds_misc_gen_ie for MLAN_OID_MISC_GEN_IE */ +typedef struct _mlan_ds_misc_gen_ie { + /** IE type */ + t_u32 type; + /** IE length */ + t_u32 len; + /** IE buffer */ + t_u8 ie_data[MAX_IE_SIZE]; +} mlan_ds_misc_gen_ie; + +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) +/** Type definition of mlan_ds_misc_sdio_mpa_ctrl + * for MLAN_OID_MISC_SDIO_MPA_CTRL + */ +typedef struct _mlan_ds_misc_sdio_mpa_ctrl { + /** SDIO MP-A TX enable/disable */ + t_u16 tx_enable; + /** SDIO MP-A RX enable/disable */ + t_u16 rx_enable; + /** SDIO MP-A TX buf size */ + t_u16 tx_buf_size; + /** SDIO MP-A RX buf size */ + t_u16 rx_buf_size; + /** SDIO MP-A TX Max Ports */ + t_u16 tx_max_ports; + /** SDIO MP-A RX Max Ports */ + t_u16 rx_max_ports; +} mlan_ds_misc_sdio_mpa_ctrl; +#endif + +/** Type definition of mlan_ds_misc_cmd for MLAN_OID_MISC_HOST_CMD */ +typedef struct _mlan_ds_misc_cmd { + /** Command length */ + t_u32 len; + /** Command buffer */ + t_u8 cmd[MLAN_SIZE_OF_CMD_BUFFER]; +} mlan_ds_misc_cmd; + +/** Maximum number of system clocks */ +#define MLAN_MAX_CLK_NUM 16 + +/** Clock type : Configurable */ +#define MLAN_CLK_CONFIGURABLE 0 +/** Clock type : Supported */ +#define MLAN_CLK_SUPPORTED 1 + +/** Type definition of mlan_ds_misc_sys_clock for MLAN_OID_MISC_SYS_CLOCK */ +typedef struct _mlan_ds_misc_sys_clock { + /** Current system clock */ + t_u16 cur_sys_clk; + /** Clock type */ + t_u16 sys_clk_type; + /** Number of clocks */ + t_u16 sys_clk_num; + /** System clocks */ + t_u16 sys_clk[MLAN_MAX_CLK_NUM]; +} mlan_ds_misc_sys_clock; + +/** Maximum response buffer length */ +#define ASSOC_RSP_BUF_SIZE 500 + +/** Type definition of mlan_ds_misc_assoc_rsp for MLAN_OID_MISC_ASSOC_RSP */ +typedef struct _mlan_ds_misc_assoc_rsp { + /** Associate response buffer */ + t_u8 assoc_resp_buf[ASSOC_RSP_BUF_SIZE]; + /** Response buffer length */ + t_u32 assoc_resp_len; +} mlan_ds_misc_assoc_rsp; + +/** Enumeration for function init/shutdown */ +enum _mlan_func_cmd { + MLAN_FUNC_INIT = 1, + MLAN_FUNC_SHUTDOWN, +}; + +/** Enumeration for Coalescing status */ +enum _mlan_coal_status { + MLAN_MISC_COALESCING_ENABLE = 1, + MLAN_MISC_COALESCING_DISABLE = 0 +}; + +/** Type definition of mlan_ds_misc_tx_datapause + * for MLAN_OID_MISC_TX_DATAPAUSE + */ +typedef struct _mlan_ds_misc_tx_datapause { + /** Tx data pause flag */ + t_u16 tx_pause; + /** Max number of Tx buffers for all PS clients */ + t_u16 tx_buf_cnt; +} mlan_ds_misc_tx_datapause; + +/** IP address length */ +#define IPADDR_LEN (16) +/** Max number of ip */ +#define MAX_IPADDR (4) +/** IP address type - NONE*/ +#define IPADDR_TYPE_NONE (0) +/** IP address type - IPv4*/ +#define IPADDR_TYPE_IPV4 (1) +/** IP operation remove */ +#define MLAN_IPADDR_OP_IP_REMOVE (0) +/** IP operation ARP filter */ +#define MLAN_IPADDR_OP_ARP_FILTER MBIT(0) +/** IP operation ARP response */ +#define MLAN_IPADDR_OP_AUTO_ARP_RESP MBIT(1) + +/** Type definition of mlan_ds_misc_ipaddr_cfg for MLAN_OID_MISC_IP_ADDR */ +typedef struct _mlan_ds_misc_ipaddr_cfg { + /** Operation code */ + t_u32 op_code; + /** IP address type */ + t_u32 ip_addr_type; + /** Number of IP */ + t_u32 ip_addr_num; + /** IP address */ + t_u8 ip_addr[MAX_IPADDR][IPADDR_LEN]; +} mlan_ds_misc_ipaddr_cfg; + +/* MEF configuration disable */ +#define MEF_CFG_DISABLE 0 +/* MEF configuration Rx filter enable */ +#define MEF_CFG_RX_FILTER_ENABLE 1 +/* MEF configuration auto ARP response */ +#define MEF_CFG_AUTO_ARP_RESP 2 +/* MEF configuration host command */ +#define MEF_CFG_HOSTCMD 0xFFFF + +/** Type definition of mlan_ds_misc_mef_cfg for MLAN_OID_MISC_MEF_CFG */ +typedef struct _mlan_ds_misc_mef_cfg { + /** Sub-ID for operation */ + t_u32 sub_id; + /** Parameter according to sub-ID */ + union { + /** MEF command buffer for MEF_CFG_HOSTCMD */ + mlan_ds_misc_cmd cmd_buf; + } param; +} mlan_ds_misc_mef_cfg; + +/** Type definition of mlan_ds_misc_cfp_code for MLAN_OID_MISC_CFP_CODE */ +typedef struct _mlan_ds_misc_cfp_code { + /** CFP table code for 2.4GHz */ + t_u32 cfp_code_bg; + /** CFP table code for 5GHz */ + t_u32 cfp_code_a; +} mlan_ds_misc_cfp_code; + +/** Type definition of mlan_ds_misc_country_code + * for MLAN_OID_MISC_COUNTRY_CODE + */ +typedef struct _mlan_ds_misc_country_code { + /** Country Code */ + t_u8 country_code[COUNTRY_CODE_LEN]; +} mlan_ds_misc_country_code; + +/** action for set */ +#define SUBSCRIBE_EVT_ACT_BITWISE_SET 0x0002 +/** action for clear */ +#define SUBSCRIBE_EVT_ACT_BITWISE_CLR 0x0003 +/** BITMAP for subscribe event rssi low */ +#define SUBSCRIBE_EVT_RSSI_LOW MBIT(0) +/** BITMAP for subscribe event snr low */ +#define SUBSCRIBE_EVT_SNR_LOW MBIT(1) +/** BITMAP for subscribe event max fail */ +#define SUBSCRIBE_EVT_MAX_FAIL MBIT(2) +/** BITMAP for subscribe event beacon missed */ +#define SUBSCRIBE_EVT_BEACON_MISSED MBIT(3) +/** BITMAP for subscribe event rssi high */ +#define SUBSCRIBE_EVT_RSSI_HIGH MBIT(4) +/** BITMAP for subscribe event snr high */ +#define SUBSCRIBE_EVT_SNR_HIGH MBIT(5) +/** BITMAP for subscribe event data rssi low */ +#define SUBSCRIBE_EVT_DATA_RSSI_LOW MBIT(6) +/** BITMAP for subscribe event data snr low */ +#define SUBSCRIBE_EVT_DATA_SNR_LOW MBIT(7) +/** BITMAP for subscribe event data rssi high */ +#define SUBSCRIBE_EVT_DATA_RSSI_HIGH MBIT(8) +/** BITMAP for subscribe event data snr high */ +#define SUBSCRIBE_EVT_DATA_SNR_HIGH MBIT(9) +/** BITMAP for subscribe event link quality */ +#define SUBSCRIBE_EVT_LINK_QUALITY MBIT(10) +/** BITMAP for subscribe event pre_beacon_lost */ +#define SUBSCRIBE_EVT_PRE_BEACON_LOST MBIT(11) +/** default PRE_BEACON_MISS_COUNT */ +#define DEFAULT_PRE_BEACON_MISS 30 + +/** Type definition of mlan_ds_subscribe_evt for MLAN_OID_MISC_CFP_CODE */ +typedef struct _mlan_ds_subscribe_evt { + /** evt action */ + t_u16 evt_action; + /** bitmap for subscribe event */ + t_u16 evt_bitmap; + /** Absolute value of RSSI threshold value (dBm) */ + t_u8 low_rssi; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 low_rssi_freq; + /** SNR threshold value (dB) */ + t_u8 low_snr; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 low_snr_freq; + /** Failure count threshold */ + t_u8 failure_count; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 failure_count_freq; + /** num of missed beacons */ + t_u8 beacon_miss; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 beacon_miss_freq; + /** Absolute value of RSSI threshold value (dBm) */ + t_u8 high_rssi; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 high_rssi_freq; + /** SNR threshold value (dB) */ + t_u8 high_snr; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 high_snr_freq; + /** Absolute value of data RSSI threshold value (dBm) */ + t_u8 data_low_rssi; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 data_low_rssi_freq; + /** Absolute value of data SNR threshold value (dBm) */ + t_u8 data_low_snr; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 data_low_snr_freq; + /** Absolute value of data RSSI threshold value (dBm) */ + t_u8 data_high_rssi; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 data_high_rssi_freq; + /** Absolute value of data SNR threshold value (dBm) */ + t_u8 data_high_snr; + /** 0--report once, 1--report everytime happen, + * N -- report only happend > N consecutive times + */ + t_u8 data_high_snr_freq; + /* Link SNR threshold (dB) */ + t_u16 link_snr; + /* Link SNR frequency */ + t_u16 link_snr_freq; + /* Second minimum rate value as per the rate table below */ + t_u16 link_rate; + /* Second minimum rate frequency */ + t_u16 link_rate_freq; + /* Tx latency value (us) */ + t_u16 link_tx_latency; + /* Tx latency frequency */ + t_u16 link_tx_lantency_freq; + /* Number of pre missed beacons */ + t_u8 pre_beacon_miss; +} mlan_ds_subscribe_evt; + +/** Max OTP user data length */ +#define MAX_OTP_USER_DATA_LEN 252 + +/** Type definition of mlan_ds_misc_otp_user_data + * for MLAN_OID_MISC_OTP_USER_DATA + */ +typedef struct _mlan_ds_misc_otp_user_data { + /** Reserved */ + t_u16 reserved; + /** OTP user data length */ + t_u16 user_data_length; + /** User data buffer */ + t_u8 user_data[MAX_OTP_USER_DATA_LEN]; +} mlan_ds_misc_otp_user_data; + +#ifdef WIFI_DIRECT_SUPPORT +/** flag for NOA */ +#define WIFI_DIRECT_NOA 1 +/** flag for OPP_PS */ +#define WIFI_DIRECT_OPP_PS 2 +/** Type definition of mlan_ds_wifi_direct_config + * for MLAN_OID_MISC_WIFI_DIRECT_CONFIG + */ +typedef struct _mlan_ds_wifi_direct_config { + /** flags for NOA/OPP_PS */ + t_u8 flags; + /** NoA enable/disable */ + t_u8 noa_enable; + /** index */ + t_u16 index; + /** NoA count */ + t_u8 noa_count; + /** NoA duration */ + t_u32 noa_duration; + /** NoA interval */ + t_u32 noa_interval; + /** opp ps enable/disable */ + t_u8 opp_ps_enable; + /** CT window value */ + t_u8 ct_window; +} mlan_ds_wifi_direct_config; +#endif + +#if defined(STA_SUPPORT) +typedef struct _mlan_ds_misc_pmfcfg { + /** Management Frame Protection Capable */ + t_u8 mfpc; + /** Management Frame Protection Required */ + t_u8 mfpr; +} mlan_ds_misc_pmfcfg; +#endif + +typedef MLAN_PACK_START struct _mlan_ds_multi_chan_cfg { + /** Channel Time */ + t_u32 channel_time; + /** Buffer Weight */ + t_u8 buffer_weight; + /** tlv len */ + t_u16 tlv_len; + /** TLV buffer */ + t_u8 tlv_buf[0]; +} MLAN_PACK_END mlan_ds_multi_chan_cfg; + +/**Action ID for TDLS disable link*/ +#define WLAN_TDLS_DISABLE_LINK 0x00 +/**Action ID for TDLS enable link*/ +#define WLAN_TDLS_ENABLE_LINK 0x01 +/**Action ID for TDLS create link*/ +#define WLAN_TDLS_CREATE_LINK 0x02 +/**Action ID for TDLS config link*/ +#define WLAN_TDLS_CONFIG_LINK 0x03 +/*reason code*/ +#define MLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED 26 +/** TDLS operation buffer */ +typedef struct _mlan_ds_misc_tdls_oper { + /** TDLS Action */ + t_u16 tdls_action; + /** TDLS peer address */ + t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; + /** peer capability */ + t_u16 capability; + /** peer qos info */ + t_u8 qos_info; + /** peer extend capability */ + t_u8 *ext_capab; + /** extend capability len */ + t_u8 ext_capab_len; + /** support rates */ + t_u8 *supported_rates; + /** supported rates len */ + t_u8 supported_rates_len; + /** peer ht_cap */ + t_u8 *ht_capa; + /** peer vht capability */ + t_u8 *vht_cap; +} mlan_ds_misc_tdls_oper; + +/** flag for TDLS extcap */ +#define TDLS_IE_FLAGS_EXTCAP 0x0001 +/** flag for TDLS HTCAP */ +#define TDLS_IE_FLAGS_HTCAP 0x0002 +/** flag for TDLS HTINFO */ +#define TDLS_IE_FLAGS_HTINFO 0x0004 +/** flag for TDLS VHTCAP */ +#define TDLS_IE_FLAGS_VHTCAP 0x0008 +/** flag for TDLS VHTOPRAT */ +#define TDLS_IE_FLAGS_VHTOPRAT 0x0010 +/** flag for TDLS AID inof */ +#define TDLS_IE_FLAGS_AID 0x0020 +/** flag for TDLS Supported channels and regulatory class IE*/ +#define TDLS_IE_FLAGS_SUPP_CS_IE 0x0040 + +/** TDLS ie buffer */ +typedef struct _mlan_ds_misc_tdls_ies { + /** TDLS peer address */ + t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; + /** flags for request IEs */ + t_u16 flags; + /** Extended Capabilities IE */ + t_u8 ext_cap[IEEE_MAX_IE_SIZE]; + /** HT Capabilities IE */ + t_u8 ht_cap[IEEE_MAX_IE_SIZE]; + /** HT Information IE */ + t_u8 ht_info[IEEE_MAX_IE_SIZE]; + /** VHT Capabilities IE */ + t_u8 vht_cap[IEEE_MAX_IE_SIZE]; + /** VHT Operations IE */ + t_u8 vht_oprat[IEEE_MAX_IE_SIZE]; + /** aid Info */ + t_u8 aid_info[IEEE_MAX_IE_SIZE]; +} mlan_ds_misc_tdls_ies; + +#ifdef RX_PACKET_COALESCE +typedef struct _mlan_ds_misc_rx_packet_coalesce { + /** packet threshold */ + t_u32 packet_threshold; + /** timeout value */ + t_u16 delay; +} mlan_ds_misc_rx_packet_coalesce; +#endif + +#define WOWLAN_MAX_PATTERN_LEN 20 +#define WOWLAN_MAX_OFFSET_LEN 50 +#define MAX_NUM_FILTERS 10 + +/** Type definition of mlan_ds_misc_cfg for MLAN_IOCTL_MISC_CFG */ +typedef struct _mlan_ds_misc_cfg { + /** Sub-command */ + t_u32 sub_command; + /** Miscellaneous configuration parameter */ + union { + /** Generic IE for MLAN_OID_MISC_GEN_IE */ + mlan_ds_misc_gen_ie gen_ie; + /** Region code for MLAN_OID_MISC_REGION */ + t_u32 region_code; +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + /** SDIO MP-A Ctrl command for MLAN_OID_MISC_SDIO_MPA_CTRL */ + mlan_ds_misc_sdio_mpa_ctrl mpa_ctrl; +#endif + /** Hostcmd for MLAN_OID_MISC_HOST_CMD */ + mlan_ds_misc_cmd hostcmd; + /** System clock for MLAN_OID_MISC_SYS_CLOCK */ + mlan_ds_misc_sys_clock sys_clock; + /** WWS set/get for MLAN_OID_MISC_WWS */ + t_u32 wws_cfg; + /** Get associate response for MLAN_OID_MISC_ASSOC_RSP */ + mlan_ds_misc_assoc_rsp assoc_resp; + /** Function init/shutdown for MLAN_OID_MISC_INIT_SHUTDOWN */ + t_u32 func_init_shutdown; + /** Coalescing status for MLAN_OID_MISC_COALESCING_STATUS */ + t_u16 coalescing_status; + /** Custom IE for MLAN_OID_MISC_CUSTOM_IE */ + mlan_ds_misc_custom_ie cust_ie; + t_u16 tdls_idle_time; + /** TDLS configuration for MLAN_OID_MISC_TDLS_CONFIG */ + mlan_ds_misc_tdls_config tdls_config; + /** TDLS operation for MLAN_OID_MISC_TDLS_OPER */ + mlan_ds_misc_tdls_oper tdls_oper; + /** TDLS ies for MLAN_OID_MISC_GET_TDLS_IES */ + mlan_ds_misc_tdls_ies tdls_ies; + /** Tx data pause for MLAN_OID_MISC_TX_DATAPAUSE */ + mlan_ds_misc_tx_datapause tx_datapause; + /** IP address configuration */ + mlan_ds_misc_ipaddr_cfg ipaddr_cfg; + /** MAC control for MLAN_OID_MISC_MAC_CONTROL */ + t_u32 mac_ctrl; + /** MEF configuration for MLAN_OID_MISC_MEF_CFG */ + mlan_ds_misc_mef_cfg mef_cfg; + /** CFP code for MLAN_OID_MISC_CFP_CODE */ + mlan_ds_misc_cfp_code cfp_code; + /** Country code for MLAN_OID_MISC_COUNTRY_CODE */ + mlan_ds_misc_country_code country_code; + /** Thermal reading for MLAN_OID_MISC_THERMAL */ + t_u32 thermal; + /** Mgmt subtype mask for MLAN_OID_MISC_RX_MGMT_IND */ + t_u32 mgmt_subtype_mask; + /** subscribe event for MLAN_OID_MISC_SUBSCRIBE_EVENT */ + mlan_ds_subscribe_evt subscribe_event; +#ifdef DEBUG_LEVEL1 + /** Driver debug bit masks */ + t_u32 drvdbg; +#endif + /** Hotspot config param set */ + t_u32 hotspot_cfg; +#ifdef STA_SUPPORT + t_u8 ext_cap[8]; +#endif + mlan_ds_misc_otp_user_data otp_user_data; + /** Tx control */ + t_u32 tx_control; +#if defined(STA_SUPPORT) + mlan_ds_misc_pmfcfg pmfcfg; +#endif + /** Multi-channel config for MLAN_OID_MISC_MULTI_CHAN_CFG */ + mlan_ds_multi_chan_cfg multi_chan_cfg; + /** Multi-channel policy for MLAN_OID_MISC_MULTI_CHAN_POLICY */ + t_u16 multi_chan_policy; +#ifdef WIFI_DIRECT_SUPPORT + mlan_ds_wifi_direct_config p2p_config; +#endif + mlan_ds_coalesce_cfg coalesce_cfg; + t_u8 low_pwr_mode; +#ifdef RX_PACKET_COALESCE + mlan_ds_misc_rx_packet_coalesce rx_coalesce; +#endif + /** FW reload flag */ + t_u8 fw_reload; + } param; +} mlan_ds_misc_cfg, *pmlan_ds_misc_cfg; + +/** Hotspot status enable */ +#define HOTSPOT_ENABLED MBIT(0) +/** Hotspot status disable */ +#define HOTSPOT_DISABLED MFALSE +/** Keep Hotspot2.0 compatible in mwu and wpa_supplicant */ +#define HOTSPOT_BY_SUPPLICANT MBIT(1) +#endif /* !_MLAN_IOCTL_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_cfg80211.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_cfg80211.c new file mode 100644 index 00000000..115b4ed0 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_cfg80211.c @@ -0,0 +1,3337 @@ +/** @file moal_cfg80211.c + * + * @brief This file contains the functions for CFG80211. + * + * Copyright (C) 2011-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#include "moal_cfg80211.h" +#ifdef UAP_CFG80211 +#ifdef UAP_SUPPORT +#include "moal_uap.h" +#endif +#endif + +/******************************************************** + Local Variables +********************************************************/ +/** Supported rates to be advertised to the cfg80211 */ +static struct ieee80211_rate cfg80211_rates[] = { + {.bitrate = 10,.hw_value = 2,}, + {.bitrate = 20,.hw_value = 4,}, + {.bitrate = 55,.hw_value = 11}, + {.bitrate = 110,.hw_value = 22,}, + {.bitrate = 220,.hw_value = 44,}, + {.bitrate = 60,.hw_value = 12,}, + {.bitrate = 90,.hw_value = 18,}, + {.bitrate = 120,.hw_value = 24,}, + {.bitrate = 180,.hw_value = 36,}, + {.bitrate = 240,.hw_value = 48,}, + {.bitrate = 360,.hw_value = 72,}, + {.bitrate = 480,.hw_value = 96,}, + {.bitrate = 540,.hw_value = 108,}, + {.bitrate = 720,.hw_value = 144,}, +}; + +/** Channel definitions for 2 GHz to be advertised to cfg80211 */ +static struct ieee80211_channel cfg80211_channels_2ghz[] = { + {.center_freq = 2412,.hw_value = 1,.max_power = 20}, + {.center_freq = 2417,.hw_value = 2,.max_power = 20}, + {.center_freq = 2422,.hw_value = 3,.max_power = 20}, + {.center_freq = 2427,.hw_value = 4,.max_power = 20}, + {.center_freq = 2432,.hw_value = 5,.max_power = 20}, + {.center_freq = 2437,.hw_value = 6,.max_power = 20}, + {.center_freq = 2442,.hw_value = 7,.max_power = 20}, + {.center_freq = 2447,.hw_value = 8,.max_power = 20}, + {.center_freq = 2452,.hw_value = 9,.max_power = 20}, + {.center_freq = 2457,.hw_value = 10,.max_power = 20}, + {.center_freq = 2462,.hw_value = 11,.max_power = 20}, + {.center_freq = 2467,.hw_value = 12,.max_power = 20}, + {.center_freq = 2472,.hw_value = 13,.max_power = 20}, + {.center_freq = 2484,.hw_value = 14,.max_power = 20}, +}; + +/** Channel definitions for 5 GHz to be advertised to cfg80211 */ +static struct ieee80211_channel cfg80211_channels_5ghz[] = { + {.center_freq = 5180,.hw_value = 36,.max_power = 20}, + {.center_freq = 5200,.hw_value = 40,.max_power = 20}, + {.center_freq = 5220,.hw_value = 44,.max_power = 20}, + {.center_freq = 5240,.hw_value = 48,.max_power = 20}, + {.center_freq = 5260,.hw_value = 52,.max_power = 20}, + {.center_freq = 5280,.hw_value = 56,.max_power = 20}, + {.center_freq = 5300,.hw_value = 60,.max_power = 20}, + {.center_freq = 5320,.hw_value = 64,.max_power = 20}, + {.center_freq = 5500,.hw_value = 100,.max_power = 20}, + {.center_freq = 5520,.hw_value = 104,.max_power = 20}, + {.center_freq = 5540,.hw_value = 108,.max_power = 20}, + {.center_freq = 5560,.hw_value = 112,.max_power = 20}, + {.center_freq = 5580,.hw_value = 116,.max_power = 20}, + {.center_freq = 5600,.hw_value = 120,.max_power = 20}, + {.center_freq = 5620,.hw_value = 124,.max_power = 20}, + {.center_freq = 5640,.hw_value = 128,.max_power = 20}, + {.center_freq = 5660,.hw_value = 132,.max_power = 20}, + {.center_freq = 5680,.hw_value = 136,.max_power = 20}, + {.center_freq = 5700,.hw_value = 140,.max_power = 20}, + {.center_freq = 5720,.hw_value = 144,.max_power = 20}, + {.center_freq = 5745,.hw_value = 149,.max_power = 20}, + {.center_freq = 5765,.hw_value = 153,.max_power = 20}, + {.center_freq = 5785,.hw_value = 157,.max_power = 20}, + {.center_freq = 5805,.hw_value = 161,.max_power = 20}, + {.center_freq = 5825,.hw_value = 165,.max_power = 20}, +}; + +/******************************************************** + Global Variables +********************************************************/ +extern int cfg80211_wext; + +struct ieee80211_supported_band cfg80211_band_2ghz = { + .channels = cfg80211_channels_2ghz, + .n_channels = ARRAY_SIZE(cfg80211_channels_2ghz), + .bitrates = cfg80211_rates, + .n_bitrates = ARRAY_SIZE(cfg80211_rates), +}; + +struct ieee80211_supported_band cfg80211_band_5ghz = { + .channels = cfg80211_channels_5ghz, + .n_channels = ARRAY_SIZE(cfg80211_channels_5ghz), + .bitrates = cfg80211_rates + 5, + .n_bitrates = ARRAY_SIZE(cfg80211_rates) - 5, +}; + +#ifndef WLAN_CIPHER_SUITE_SMS4 +#define WLAN_CIPHER_SUITE_SMS4 0x00000020 +#endif + +#ifndef WLAN_CIPHER_SUITE_AES_CMAC +#define WLAN_CIPHER_SUITE_AES_CMAC 0x000FAC06 +#endif + +/* Supported crypto cipher suits to be advertised to cfg80211 */ +const u32 cfg80211_cipher_suites[] = { + WLAN_CIPHER_SUITE_WEP40, + WLAN_CIPHER_SUITE_WEP104, + WLAN_CIPHER_SUITE_TKIP, + WLAN_CIPHER_SUITE_CCMP, + WLAN_CIPHER_SUITE_SMS4, + WLAN_CIPHER_SUITE_AES_CMAC, +}; + +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) +#ifdef UAP_SUPPORT +/** Network device handlers for uAP */ +extern const struct net_device_ops woal_uap_netdev_ops; +#endif +#ifdef STA_SUPPORT +/** Network device handlers for STA */ +extern const struct net_device_ops woal_netdev_ops; +#endif +#endif + +/******************************************************** + Local Functions +********************************************************/ + +/******************************************************** + Global Functions +********************************************************/ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) +/**marvell vendor command and event*/ +#define MRVL_VENDOR_ID 0x005043 +/** vendor events */ +const struct nl80211_vendor_cmd_info vendor_events[] = { + {.vendor_id = MRVL_VENDOR_ID,.subcmd = event_hang,}, /* event_id 0 */ + /**add vendor event here*/ +}; + +/** + * @brief get the event id of the events array + * + * @param event vendor event + * + * @return index of events array + */ +int +woal_get_event_id(int event) +{ + int i = 0; + + for (i = 0; i < ARRAY_SIZE(vendor_events); i++) { + if (vendor_events[i].subcmd == event) + return i; + } + + return event_max; +} + +/** + * @brief send vendor event to kernel + * + * @param priv A pointer to moal_private + * @param event vendor event + * @param data a pointer to data + * @param len data length + * + * @return 0: success 1: fail + */ +int +woal_cfg80211_vendor_event(IN moal_private *priv, + IN int event, IN t_u8 *data, IN int len) +{ + struct wiphy *wiphy = priv->wdev->wiphy; + struct sk_buff *skb = NULL; + int event_id = 0; + t_u8 *pos = NULL; + int ret = 0; + + ENTER(); + + PRINTM(MEVENT, "vendor event :0x%x\n", event); + event_id = woal_get_event_id(event); + if (event_max == event_id) { + PRINTM(MERROR, "Not find this event %d \n", event_id); + ret = 1; + LEAVE(); + return ret; + } + + /**allocate skb*/ + skb = cfg80211_vendor_event_alloc(wiphy, len, event_id, GFP_KERNEL); + if (!skb) { + PRINTM(MERROR, "allocate memory fail for vendor event\n"); + ret = 1; + LEAVE(); + return ret; + } + pos = skb_put(skb, len); + memcpy(pos, data, len); + /**send event*/ + cfg80211_vendor_event(skb, GFP_KERNEL); + + LEAVE(); + return ret; +} + +/** + * @brief vendor command to set drvdbg + * + * @param wiphy A pointer to wiphy struct + * @param wdev A pointer to wireless_dev struct + * @param data a pointer to data + * @param len data length + * + * @return 0: success 1: fail + */ +static int +woal_cfg80211_subcmd_set_drvdbg(struct wiphy *wiphy, + struct wireless_dev *wdev, + const void *data, int data_len) +{ + struct net_device *dev = wdev->netdev; + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + struct sk_buff *skb = NULL; + t_u8 *pos = NULL; + int ret = 0; + + ENTER(); + /**handle this sub command*/ + DBG_HEXDUMP(MCMD_D, "Vendor drvdbg", (t_u8 *)data, data_len); + + if (data_len) { + /* Get the driver debug bit masks from user */ + drvdbg = *((t_u32 *)data); + PRINTM(MIOCTL, "new drvdbg %x\n", drvdbg); + /* Set the driver debug bit masks into mlan */ + if (woal_set_drvdbg(priv, drvdbg)) { + PRINTM(MERROR, "Set drvdbg failed!\n"); + ret = 1; + } + } + /** Allocate skb for cmd reply*/ + skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, sizeof(drvdbg)); + if (!skb) { + PRINTM(MERROR, "allocate memory fail for vendor cmd\n"); + ret = 1; + LEAVE(); + return ret; + } + pos = skb_put(skb, sizeof(drvdbg)); + memcpy(pos, &drvdbg, sizeof(drvdbg)); + ret = cfg80211_vendor_cmd_reply(skb); + LEAVE(); + return ret; +} + +const struct wiphy_vendor_command vendor_commands[] = { + { + .info = {.vendor_id = MRVL_VENDOR_ID,.subcmd = sub_cmd_set_drvdbg,}, + .flags = WIPHY_VENDOR_CMD_NEED_WDEV | + WIPHY_VENDOR_CMD_NEED_NETDEV | WIPHY_VENDOR_CMD_NEED_RUNNING, + .doit = woal_cfg80211_subcmd_set_drvdbg, + }, + +}; + +/** + * @brief register vendor commands and events + * + * @param wiphy A pointer to wiphy struct + * + * @return + */ +void +woal_register_cfg80211_vendor_command(struct wiphy *wiphy) +{ + ENTER(); + wiphy->vendor_commands = vendor_commands; + wiphy->n_vendor_commands = ARRAY_SIZE(vendor_commands); + wiphy->vendor_events = vendor_events; + wiphy->n_vendor_events = ARRAY_SIZE(vendor_events); + LEAVE(); +} +#endif + +/** + * @brief Get the private structure from wiphy + * + * @param wiphy A pointer to wiphy structure + * + * @return Pointer to moal_private + */ +void * +woal_get_wiphy_priv(struct wiphy *wiphy) +{ + return (void *)(*(unsigned long *)wiphy_priv(wiphy)); +} + +/** + * @brief Get the private structure from net device + * + * @param dev A pointer to net_device structure + * + * @return Pointer to moal_private + */ +void * +woal_get_netdev_priv(struct net_device *dev) +{ + return (void *)netdev_priv(dev); +} + +/** + * @brief Get current frequency of active interface + * + * @param priv A pointer to moal_private + * + * @return channel frequency + */ +int +woal_get_active_intf_freq(moal_private *priv) +{ + moal_handle *handle = priv->phandle; + int i; + for (i = 0; i < handle->priv_num; i++) { +#ifdef STA_SUPPORT + if (GET_BSS_ROLE(handle->priv[i]) == MLAN_BSS_ROLE_STA) { + if ((handle->priv[i]->media_connected == MTRUE) && + (handle->priv[i]->bss_type == priv->bss_type)) + return ieee80211_channel_to_frequency(handle-> + priv[i]-> + channel +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) || defined(COMPAT_WIRELESS) + , + (handle-> + priv[i]-> + channel + <= + 14 ? + IEEE80211_BAND_2GHZ + : + IEEE80211_BAND_5GHZ) +#endif + ); + + } +#endif +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(handle->priv[i]) == MLAN_BSS_ROLE_UAP) { + if ((handle->priv[i]->bss_started == MTRUE) && + (handle->priv[i]->bss_type == priv->bss_type)) + return ieee80211_channel_to_frequency(handle-> + priv[i]-> + channel +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) || defined(COMPAT_WIRELESS) + , + (handle-> + priv[i]-> + channel + <= + 14 ? + IEEE80211_BAND_2GHZ + : + IEEE80211_BAND_5GHZ) +#endif + ); + } +#endif + } + return 0; +} + +/** + * @brief Convert driver band configuration to IEEE band type + * + * @param band Driver band configuration + * + * @return IEEE band type + */ +t_u8 +woal_band_cfg_to_ieee_band(t_u32 band) +{ + t_u8 ret_radio_type; + + ENTER(); + + switch (band) { + case BAND_A: + case BAND_AN: + case BAND_A | BAND_AN: + ret_radio_type = IEEE80211_BAND_5GHZ; + break; + case BAND_B: + case BAND_G: + case BAND_B | BAND_G: + case BAND_GN: + case BAND_B | BAND_GN: + default: + ret_radio_type = IEEE80211_BAND_2GHZ; + break; + } + + LEAVE(); + return ret_radio_type; +} + +/** + * @brief Set/Enable encryption key + * + * @param priv A pointer to moal_private structure + * @param is_enable_wep Enable WEP default key + * @param cipher Cipher suite selector + * @param key A pointer to key + * @param key_len Key length + * @param seq A pointer to sequence + * @param seq_len Sequence length + * @param key_index Key index + * @param addr Mac for which key is to be set + * @param disable Key disabled or not + * @param wait_option wait option + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_cfg80211_set_key(moal_private *priv, t_u8 is_enable_wep, + t_u32 cipher, const t_u8 *key, int key_len, + const t_u8 *seq, int seq_len, t_u8 key_index, + const t_u8 *addr, int disable, t_u8 wait_option) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u8 bcast_addr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + + ENTER(); + +#ifdef UAP_CFG80211 +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + if (is_enable_wep) { + PRINTM(MIOCTL, "Enable UAP default key=%d\n", + key_index); + priv->uap_wep_key[key_index].is_default = MTRUE; + goto done; + } + if (key && key_len && + ((cipher == WLAN_CIPHER_SUITE_WEP40) || + (cipher == WLAN_CIPHER_SUITE_WEP104))) { + priv->uap_wep_key[key_index].length = key_len; + memcpy(priv->uap_wep_key[key_index].key, key, key_len); + priv->cipher = cipher; + priv->uap_wep_key[key_index].key_index = key_index; + priv->uap_wep_key[key_index].is_default = MFALSE; + PRINTM(MIOCTL, "Set UAP WEP key: key_index=%d len=%d\n", + key_index, key_len); + goto done; + } + } +#endif +#endif + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_SET; + + if (is_enable_wep) { + sec->param.encrypt_key.key_index = key_index; + sec->param.encrypt_key.is_current_wep_key = MTRUE; + } else if (!disable) { + if (cipher != WLAN_CIPHER_SUITE_WEP40 && + cipher != WLAN_CIPHER_SUITE_WEP104 && + cipher != WLAN_CIPHER_SUITE_TKIP && + cipher != WLAN_CIPHER_SUITE_SMS4 && + cipher != WLAN_CIPHER_SUITE_AES_CMAC && + cipher != WLAN_CIPHER_SUITE_CCMP) { + PRINTM(MERROR, "Invalid cipher suite specified\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + sec->param.encrypt_key.key_index = key_index; + if (key && key_len) { + memcpy(sec->param.encrypt_key.key_material, key, + key_len); + sec->param.encrypt_key.key_len = key_len; + } + /* Set WAPI key */ + if (cipher == WLAN_CIPHER_SUITE_SMS4) { + sec->param.encrypt_key.is_wapi_key = MTRUE; + if (seq_len) { + memcpy(sec->param.encrypt_key.pn, seq, PN_SIZE); + DBG_HEXDUMP(MCMD_D, "WAPI PN", + sec->param.encrypt_key.pn, seq_len); + } + } + if (addr) { + memcpy(sec->param.encrypt_key.mac_addr, addr, ETH_ALEN); + if (0 == + memcmp(sec->param.encrypt_key.mac_addr, bcast_addr, + ETH_ALEN)) + sec->param.encrypt_key.key_flags = + KEY_FLAG_GROUP_KEY; + else + sec->param.encrypt_key.key_flags = + KEY_FLAG_SET_TX_KEY; + } else { + memcpy(sec->param.encrypt_key.mac_addr, bcast_addr, + ETH_ALEN); + sec->param.encrypt_key.key_flags = KEY_FLAG_GROUP_KEY; + } + if (seq && seq_len) { + memcpy(sec->param.encrypt_key.pn, seq, seq_len); + sec->param.encrypt_key.key_flags |= + KEY_FLAG_RX_SEQ_VALID; + } + + if (cipher == WLAN_CIPHER_SUITE_AES_CMAC) { + sec->param.encrypt_key.key_flags |= + KEY_FLAG_AES_MCAST_IGTK; + } + } else { + if (key_index == KEY_INDEX_CLEAR_ALL) + sec->param.encrypt_key.key_disable = MTRUE; + else { + sec->param.encrypt_key.key_remove = MTRUE; + sec->param.encrypt_key.key_index = key_index; + } + sec->param.encrypt_key.key_flags = KEY_FLAG_REMOVE_KEY; + if (addr) + memcpy(sec->param.encrypt_key.mac_addr, addr, ETH_ALEN); + } + + /* Send IOCTL request to MLAN */ + ret = woal_request_ioctl(priv, req, wait_option); + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Enable the WEP key to driver + * + * @param priv A pointer to moal_private structure + * @param key A pointer to key data + * @param key_len Length of the key data + * @param index Key index + * @param wait_option wait_option + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_cfg80211_set_wep_keys(moal_private *priv, const t_u8 *key, int key_len, + t_u8 index, t_u8 wait_option) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u32 cipher = 0; + + ENTER(); + + if (key_len) { + if (key_len == 5) + cipher = WLAN_CIPHER_SUITE_WEP40; + else + cipher = WLAN_CIPHER_SUITE_WEP104; + ret = woal_cfg80211_set_key(priv, 0, cipher, key, key_len, NULL, + 0, index, NULL, 0, wait_option); + } else { + /* No key provided so it is enable key. We want to just set the + transmit key index */ + woal_cfg80211_set_key(priv, 1, cipher, key, key_len, NULL, 0, + index, NULL, 0, wait_option); + } + + LEAVE(); + return ret; +} + +/** + * @brief clear all mgmt ies + * + * @param priv A pointer to moal private structure + * @param wait_option wait_option + * @return N/A + */ +void +woal_clear_all_mgmt_ies(moal_private *priv, t_u8 wait_option) +{ + t_u16 mask = 0; + /* clear BEACON WPS/P2P IE */ + if (priv->beacon_wps_index != MLAN_CUSTOM_IE_AUTO_IDX_MASK) { + PRINTM(MCMND, "Clear BEACON WPS ie\n"); + woal_cfg80211_mgmt_frame_ie(priv, NULL, 0, NULL, 0, NULL, 0, + NULL, 0, MGMT_MASK_BEACON_WPS_P2P, + wait_option); + } + /* clear mgmt frame ies */ + if (priv->probereq_index != MLAN_CUSTOM_IE_AUTO_IDX_MASK) + mask |= MGMT_MASK_PROBE_REQ; + if (priv->beacon_index != MLAN_CUSTOM_IE_AUTO_IDX_MASK) + mask |= MGMT_MASK_BEACON; + if (priv->proberesp_index != MLAN_CUSTOM_IE_AUTO_IDX_MASK) + mask |= MGMT_MASK_PROBE_RESP; + if (priv->assocresp_index != MLAN_CUSTOM_IE_AUTO_IDX_MASK) + mask |= MGMT_MASK_ASSOC_RESP; + if (mask) { + PRINTM(MCMND, "Clear IES: 0x%x 0x%x 0x%x 0x%x\n", + priv->beacon_index, priv->probereq_index, + priv->proberesp_index, priv->assocresp_index); + woal_cfg80211_mgmt_frame_ie(priv, NULL, 0, NULL, 0, NULL, 0, + NULL, 0, mask, wait_option); + } +} + +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) +/** + * @brief set bss role + * + * @param priv A pointer to moal private structure + * @param action Action: set or get + * @param role A pointer to bss role + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_bss_role_cfg(moal_private *priv, t_u16 action, t_u8 *bss_role) +{ + int ret = 0; + + ENTER(); + + if (action == MLAN_ACT_SET) { + /* Reset interface */ + woal_reset_intf(priv, MOAL_IOCTL_WAIT, MFALSE); + } + + if (MLAN_STATUS_SUCCESS != + woal_bss_role_cfg(priv, action, MOAL_IOCTL_WAIT, bss_role)) { + ret = -EFAULT; + goto done; + } + + if (action == MLAN_ACT_SET) { + /* set back the mac address */ + woal_request_set_mac_address(priv); + /* clear the mgmt ies */ + woal_clear_all_mgmt_ies(priv, MOAL_IOCTL_WAIT); + /* Initialize private structures */ + woal_init_priv(priv, MOAL_IOCTL_WAIT); + + /* Enable interfaces */ + netif_device_attach(priv->netdev); + woal_start_queue(priv->netdev); + } + +done: + LEAVE(); + return ret; +} +#endif + +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION +/** + * @brief This function display P2P public action frame type + * + * @param buf A buffer to a management frame + * @param len buffer len + * @param chan the channel + * @param flag Tx/Rx flag. Tx:flag = 1;Rx:flag = 0; + * + * @return N/A + */ +void +woal_cfg80211_display_p2p_actframe(const t_u8 *buf, int len, + struct ieee80211_channel *chan, + const t_u8 flag) +{ + const t_u8 p2p_oui[] = { 0x50, 0x6f, 0x9a, 0x09 }; + t_u8 subtype; + + ENTER(); + + if (!buf || len < (P2P_ACT_FRAME_OUI_SUBTYPE_OFFSET + 1)) { + LEAVE(); + return; + } + + if (((struct ieee80211_mgmt *)buf)->u.action.category == + P2P_ACT_FRAME_CATEGORY && + !memcmp(buf + P2P_ACT_FRAME_OUI_OFFSET, p2p_oui, sizeof(p2p_oui))) { + subtype = *(buf + P2P_ACT_FRAME_OUI_SUBTYPE_OFFSET); + switch (subtype) { + case P2P_GO_NEG_REQ: + PRINTM(MMSG, + "wlan: %s P2P Group Owner Negotiation Req Frame, channel=%d\n", + (flag) ? "TX" : "RX", + (chan) ? chan->hw_value : 0); + break; + case P2P_GO_NEG_RSP: + PRINTM(MMSG, + "wlan: %s P2P Group Owner Negotiation Rsp Frame, channel=%d\n", + (flag) ? "TX" : "RX", + (chan) ? chan->hw_value : 0); + break; + case P2P_GO_NEG_CONF: + PRINTM(MMSG, + "wlan: %s P2P Group Owner Negotiation Confirm Frame, channel=%d\n", + (flag) ? "TX" : "RX", + (chan) ? chan->hw_value : 0); + break; + case P2P_INVITE_REQ: + PRINTM(MMSG, + "wlan: %s P2P Invitation Request, channel=%d\n", + (flag) ? "TX" : "RX", + (chan) ? chan->hw_value : 0); + break; + case P2P_INVITE_RSP: + PRINTM(MMSG, + "wlan: %s P2P Invitation Response, channel=%d\n", + (flag) ? "TX" : "RX", + (chan) ? chan->hw_value : 0); + break; + case P2P_DEVDIS_REQ: + PRINTM(MMSG, + "wlan: %s P2P Device Discoverability Request, channel=%d\n", + (flag) ? "TX" : "RX", + (chan) ? chan->hw_value : 0); + break; + case P2P_DEVDIS_RSP: + PRINTM(MIOCTL, + "wlan: %s P2P Device Discoverability Response, channel=%d\n", + (flag) ? "TX" : "RX", + (chan) ? chan->hw_value : 0); + break; + case P2P_PROVDIS_REQ: + PRINTM(MMSG, + "wlan: %s P2P Provision Discovery Request, channel=%d\n", + (flag) ? "TX" : "RX", + (chan) ? chan->hw_value : 0); + break; + case P2P_PROVDIS_RSP: + PRINTM(MMSG, + "wlan: %s P2P Provision Discovery Response, channnel=%d\n", + (flag) ? "TX" : "RX", + (chan) ? chan->hw_value : 0); + break; + default: + PRINTM(MMSG, + "wlan: %s Unknow P2P Action Frame, channel=%d, subtype=%d\n", + (flag) ? "TX" : "RX", + (chan) ? chan->hw_value : 0, subtype); + break; + } + } + + LEAVE(); + return; +} + +/** + * @brief initialize p2p client for wpa_supplicant + * + * @param priv A pointer to moal private structure + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_init_p2p_client(moal_private *priv) +{ + int ret = MLAN_STATUS_SUCCESS; + t_u16 wifi_direct_mode = WIFI_DIRECT_MODE_DISABLE; + t_u8 bss_role; + + ENTER(); + + /* bss type check */ + if (priv->bss_type != MLAN_BSS_TYPE_WIFIDIRECT) { + PRINTM(MERROR, "Unexpected bss type when init p2p client\n"); + ret = -EFAULT; + goto done; + } + + /* get the bss role */ + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_bss_role_cfg(priv, MLAN_ACT_GET, &bss_role)) { + ret = -EFAULT; + goto done; + } + + if (bss_role != MLAN_BSS_ROLE_STA) { + bss_role = MLAN_BSS_ROLE_STA; + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_bss_role_cfg(priv, MLAN_ACT_SET, &bss_role)) { + ret = -EFAULT; + goto done; + } + } + + wifi_direct_mode = WIFI_DIRECT_MODE_DISABLE; + if (MLAN_STATUS_SUCCESS != + woal_wifi_direct_mode_cfg(priv, MLAN_ACT_SET, &wifi_direct_mode)) { + ret = -EFAULT; + goto done; + } + + /* first, init wifi direct to listen mode */ + wifi_direct_mode = WIFI_DIRECT_MODE_LISTEN; + if (MLAN_STATUS_SUCCESS != + woal_wifi_direct_mode_cfg(priv, MLAN_ACT_SET, &wifi_direct_mode)) { + ret = -EFAULT; + goto done; + } + + /* second, init wifi direct client */ + wifi_direct_mode = WIFI_DIRECT_MODE_CLIENT; + if (MLAN_STATUS_SUCCESS != + woal_wifi_direct_mode_cfg(priv, MLAN_ACT_SET, &wifi_direct_mode)) { + ret = -EFAULT; + goto done; + } +done: + LEAVE(); + return ret; +} + +/** + * @brief initialize p2p GO for wpa_supplicant + * + * @param priv A pointer to moal private structure + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_init_p2p_go(moal_private *priv) +{ + int ret = MLAN_STATUS_SUCCESS; + t_u16 wifi_direct_mode; + t_u8 bss_role; + mlan_ds_wifi_direct_config p2p_config; + mlan_ds_ps_mgmt ps_mgmt; + + ENTER(); + + /* bss type check */ + if (priv->bss_type != MLAN_BSS_TYPE_WIFIDIRECT) { + PRINTM(MERROR, "Unexpected bss type when init p2p GO\n"); + ret = -EFAULT; + goto done; + } + + wifi_direct_mode = WIFI_DIRECT_MODE_DISABLE; + if (MLAN_STATUS_SUCCESS != + woal_wifi_direct_mode_cfg(priv, MLAN_ACT_SET, &wifi_direct_mode)) { + ret = -EFAULT; + goto done; + } + + /* first, init wifi direct to listen mode */ + wifi_direct_mode = WIFI_DIRECT_MODE_LISTEN; + if (MLAN_STATUS_SUCCESS != + woal_wifi_direct_mode_cfg(priv, MLAN_ACT_SET, &wifi_direct_mode)) { + ret = -EFAULT; + goto done; + } + + /* second, init wifi direct to GO mode */ + wifi_direct_mode = WIFI_DIRECT_MODE_GO; + if (MLAN_STATUS_SUCCESS != + woal_wifi_direct_mode_cfg(priv, MLAN_ACT_SET, &wifi_direct_mode)) { + ret = -EFAULT; + goto done; + } + + /* get the bss role, and set it to uAP */ + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_bss_role_cfg(priv, MLAN_ACT_GET, &bss_role)) { + ret = -EFAULT; + goto done; + } + + if (bss_role != MLAN_BSS_ROLE_UAP) { + bss_role = MLAN_BSS_ROLE_UAP; + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_bss_role_cfg(priv, MLAN_ACT_SET, &bss_role)) { + ret = -EFAULT; + goto done; + } + } +/* NoA:-- Interval = 100TUs and Duration= 50TUs, count=255*/ +#define DEF_NOA_COUNT 255 + if (priv->phandle->noa_duration && priv->phandle->card_info->go_noa) { + memset(&p2p_config, 0, sizeof(p2p_config)); + p2p_config.noa_enable = MTRUE; + p2p_config.index = 0; + p2p_config.noa_count = DEF_NOA_COUNT; + p2p_config.noa_duration = priv->phandle->noa_duration; + p2p_config.noa_interval = priv->phandle->noa_interval; + p2p_config.flags = WIFI_DIRECT_NOA; + woal_p2p_config(priv, MLAN_ACT_SET, &p2p_config); + memset(&ps_mgmt, 0, sizeof(ps_mgmt)); + ps_mgmt.flags = PS_FLAG_PS_MODE; + ps_mgmt.ps_mode = PS_MODE_INACTIVITY; + woal_set_get_uap_power_mode(priv, MLAN_ACT_SET, &ps_mgmt); + PRINTM(MMSG, "Enable NOA: duration=%d, interval=%d\n", + priv->phandle->noa_duration, + priv->phandle->noa_interval); + } +done: + LEAVE(); + return ret; +} + +/** + * @brief reset bss role and wifi direct mode for wpa_supplicant + * + * @param priv A pointer to moal private structure + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_deinit_p2p(moal_private *priv) +{ + int ret = MLAN_STATUS_SUCCESS; + t_u16 wifi_direct_mode; + t_u8 bss_role; + t_u8 channel_status; + moal_private *remain_priv = NULL; + mlan_ds_ps_mgmt ps_mgmt; + + ENTER(); + + /* bss type check */ + if (priv->bss_type != MLAN_BSS_TYPE_WIFIDIRECT) { + PRINTM(MERROR, "Unexpected bss type when deinit p2p\n"); + ret = -EFAULT; + goto done; + } + /* unregister mgmt frame from FW */ + if (priv->mgmt_subtype_mask) { + priv->mgmt_subtype_mask = 0; + if (woal_reg_rx_mgmt_ind(priv, MLAN_ACT_SET, + &priv->mgmt_subtype_mask, + MOAL_IOCTL_WAIT)) { + PRINTM(MERROR, + "deinit_p2p: fail to unregister mgmt frame\n"); + ret = -EFAULT; + goto done; + } + } + /* cancel previous remain on channel */ + if (priv->phandle->remain_on_channel) { + remain_priv = + priv->phandle->priv[priv->phandle->remain_bss_index]; + if (!remain_priv) { + PRINTM(MERROR, + "deinit_p2p: wrong remain_bss_index=%d\n", + priv->phandle->remain_bss_index); + ret = -EFAULT; + goto done; + } + if (woal_cfg80211_remain_on_channel_cfg + (remain_priv, MOAL_IOCTL_WAIT, MTRUE, &channel_status, NULL, + 0, 0)) { + PRINTM(MERROR, + "deinit_p2p: Fail to cancel remain on channel\n"); + ret = -EFAULT; + goto done; + } + if (priv->phandle->cookie) { + cfg80211_remain_on_channel_expired( +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + remain_priv-> + netdev, +#else + remain_priv-> + wdev, +#endif + priv-> + phandle-> + cookie, + &priv-> + phandle->chan, +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + priv-> + phandle-> + channel_type, +#endif + GFP_ATOMIC); + priv->phandle->cookie = 0; + } + priv->phandle->remain_on_channel = MFALSE; + } + + /* get the bss role */ + if (MLAN_STATUS_SUCCESS != woal_cfg80211_bss_role_cfg(priv, + MLAN_ACT_GET, + &bss_role)) { + ret = -EFAULT; + goto done; + } + + /* reset bss role */ + if (bss_role != MLAN_BSS_ROLE_STA) { + memset(&ps_mgmt, 0, sizeof(ps_mgmt)); + ps_mgmt.flags = PS_FLAG_PS_MODE; + ps_mgmt.ps_mode = PS_MODE_DISABLE; + woal_set_get_uap_power_mode(priv, MLAN_ACT_SET, &ps_mgmt); + bss_role = MLAN_BSS_ROLE_STA; + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_bss_role_cfg(priv, MLAN_ACT_SET, &bss_role)) { + ret = -EFAULT; + goto done; + } + } + + wifi_direct_mode = WIFI_DIRECT_MODE_DISABLE; + if (MLAN_STATUS_SUCCESS != + woal_wifi_direct_mode_cfg(priv, MLAN_ACT_SET, &wifi_direct_mode)) { + ret = -EFAULT; + goto done; + } +done: + LEAVE(); + return ret; +} +#endif /* KERNEL_VERSION */ +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ + +/** + * @brief Request the driver to change the interface type + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param type Virtual interface types + * @param flags Flags + * @param params A pointer to vif_params structure + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_change_virtual_intf(struct wiphy *wiphy, + struct net_device *dev, + enum nl80211_iftype type, u32 *flags, + struct vif_params *params) +{ + int ret = 0; + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *req = NULL; +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) + t_u8 bss_role; +#endif + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (priv->wdev->iftype == type) { + PRINTM(MINFO, "Already set to required type\n"); + goto done; + } +#ifdef UAP_SUPPORT + if ((priv->bss_type == MLAN_BSS_TYPE_UAP) && (priv->bss_index > 0)) { + priv->wdev->iftype = type; + PRINTM(MMSG, "%s: Skip change virtual intf on uap: type=%d\n", + dev->name, type); + goto done; + } +#endif + + PRINTM(MIOCTL, "%s: change virturl intf=%d\n", dev->name, type); +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + /** cancel previous remain on channel to avoid firmware hang */ + if (priv->phandle->remain_on_channel) { + t_u8 channel_status; + moal_private *remain_priv = NULL; + remain_priv = + priv->phandle->priv[priv->phandle->remain_bss_index]; + if (!remain_priv) { + PRINTM(MERROR, + "change_virtual_intf:wrong remain_bss_index=%d\n", + priv->phandle->remain_bss_index); + ret = -EFAULT; + goto done; + } + if (woal_cfg80211_remain_on_channel_cfg + (remain_priv, MOAL_IOCTL_WAIT, MTRUE, &channel_status, NULL, + 0, 0)) { + PRINTM(MERROR, + "change_virtual_intf: Fail to cancel remain on channel\n"); + ret = -EFAULT; + goto done; + } + if (priv->phandle->cookie) { + cfg80211_remain_on_channel_expired( +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + remain_priv-> + netdev, +#else + remain_priv-> + wdev, +#endif + priv-> + phandle-> + cookie, + &priv-> + phandle->chan, +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + priv-> + phandle-> + channel_type, +#endif + GFP_ATOMIC); + priv->phandle->cookie = 0; + } + priv->phandle->remain_on_channel = MFALSE; + } +#endif +#endif + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_BSS_MODE; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_SET; + + switch (type) { + case NL80211_IFTYPE_ADHOC: + bss->param.bss_mode = MLAN_BSS_MODE_IBSS; + priv->wdev->iftype = NL80211_IFTYPE_ADHOC; + PRINTM(MINFO, "Setting interface type to adhoc\n"); + break; + case NL80211_IFTYPE_STATION: +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT + && (priv->wdev->iftype == NL80211_IFTYPE_AP + || priv->wdev->iftype == NL80211_IFTYPE_P2P_GO + || priv->wdev->iftype == NL80211_IFTYPE_P2P_CLIENT)) { + if (priv->phandle->is_go_timer_set) { + woal_cancel_timer(&priv->phandle->go_timer); + priv->phandle->is_go_timer_set = MFALSE; + } + /* if we support wifi direct && priv->bss_type == + wifi_direct, and currently the interface type is AP + or GO or client, that means wpa_supplicant deinit() + wifi direct interface, so we should deinit bss_role + and wifi direct mode, for other bss_type, we should + not update bss_role and wifi direct mode */ + + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_deinit_p2p(priv)) { + ret = -EFAULT; + goto done; + } + } +#endif /* KERNEL_VERSION */ +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) + if (priv->bss_type == MLAN_BSS_TYPE_UAP) { + woal_cfg80211_del_beacon(wiphy, dev); + bss_role = MLAN_BSS_ROLE_STA; + woal_cfg80211_bss_role_cfg(priv, MLAN_ACT_SET, + &bss_role); + PRINTM(MIOCTL, "set bss role for STA\n"); + } +#endif + bss->param.bss_mode = MLAN_BSS_MODE_INFRA; + priv->wdev->iftype = NL80211_IFTYPE_STATION; + PRINTM(MINFO, "Setting interface type to managed\n"); + break; +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + case NL80211_IFTYPE_P2P_CLIENT: + if (priv->phandle->is_go_timer_set) { + woal_cancel_timer(&priv->phandle->go_timer); + priv->phandle->is_go_timer_set = MFALSE; + } + + if (MLAN_STATUS_SUCCESS != woal_cfg80211_init_p2p_client(priv)) { + ret = -EFAULT; + goto done; + } + + bss->param.bss_mode = MLAN_BSS_MODE_INFRA; + priv->wdev->iftype = NL80211_IFTYPE_P2P_CLIENT; + PRINTM(MINFO, "Setting interface type to P2P client\n"); + + break; +#endif /* KERNEL_VERSION */ +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ + case NL80211_IFTYPE_AP: +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + case NL80211_IFTYPE_P2P_GO: + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) { + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_init_p2p_go(priv)) { + ret = -EFAULT; + goto done; + } + priv->phandle->is_go_timer_set = MTRUE; + woal_mod_timer(&priv->phandle->go_timer, + MOAL_TIMER_10S); + } + if (type == NL80211_IFTYPE_P2P_GO) + priv->wdev->iftype = NL80211_IFTYPE_P2P_GO; +#endif +#endif +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) + if (priv->bss_type == MLAN_BSS_TYPE_STA) { + if (priv->probereq_index != + MLAN_CUSTOM_IE_AUTO_IDX_MASK) + woal_cfg80211_mgmt_frame_ie(priv, NULL, 0, NULL, + 0, NULL, 0, NULL, 0, + MGMT_MASK_PROBE_REQ, + MOAL_IOCTL_WAIT); + bss_role = MLAN_BSS_ROLE_UAP; + woal_cfg80211_bss_role_cfg(priv, MLAN_ACT_SET, + &bss_role); + PRINTM(MIOCTL, "set bss role for AP\n"); + } +#endif + if (type == NL80211_IFTYPE_AP) + priv->wdev->iftype = NL80211_IFTYPE_AP; + PRINTM(MINFO, "Setting interface type to P2P GO\n"); + + /* there is no need for P2P GO to set bss_mode */ + goto done; + + break; + + case NL80211_IFTYPE_UNSPECIFIED: + bss->param.bss_mode = MLAN_BSS_MODE_AUTO; + priv->wdev->iftype = NL80211_IFTYPE_STATION; + PRINTM(MINFO, "Setting interface type to auto\n"); + break; + default: + ret = -EINVAL; + break; + } + if (ret) + goto done; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (MLAN_STATUS_SUCCESS != status) { + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Request the driver to change the value of fragment + * threshold or rts threshold or retry limit + * + * @param wiphy A pointer to wiphy structure + * @param changed Change flags + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed) +{ + moal_private *priv = NULL; + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); +#ifdef UAP_CFG80211 +#ifdef UAP_SUPPORT + mlan_uap_bss_param sys_cfg; +#endif +#endif + int frag_thr = wiphy->frag_threshold; + int rts_thr = wiphy->frag_threshold; + int retry = wiphy->retry_long; + + ENTER(); + + priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY); + if (rts_thr == MLAN_FRAG_RTS_DISABLED) + rts_thr = MLAN_RTS_MAX_VALUE; + if (frag_thr == MLAN_FRAG_RTS_DISABLED) + frag_thr = MLAN_FRAG_MAX_VALUE; + +#ifdef UAP_CFG80211 +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + /* Initialize the invalid values so that the correct values + below are downloaded to firmware */ + woal_set_sys_config_invalid_data(&sys_cfg); + sys_cfg.frag_threshold = frag_thr; + sys_cfg.rts_threshold = rts_thr; + sys_cfg.retry_limit = retry; + + if ((changed & WIPHY_PARAM_RTS_THRESHOLD) || + (changed & WIPHY_PARAM_FRAG_THRESHOLD) || + (changed & + (WIPHY_PARAM_RETRY_LONG | WIPHY_PARAM_RETRY_SHORT))) { + if (woal_set_get_sys_config + (priv, MLAN_ACT_SET, MOAL_IOCTL_WAIT, &sys_cfg)) + goto fail; + } + } +#endif +#endif + +#ifdef STA_CFG80211 +#ifdef STA_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) { + if (changed & WIPHY_PARAM_RTS_THRESHOLD) { + if (woal_set_get_rts + (priv, MLAN_ACT_SET, MOAL_IOCTL_WAIT, &rts_thr)) + goto fail; + } + if (changed & WIPHY_PARAM_FRAG_THRESHOLD) { + if (woal_set_get_frag + (priv, MLAN_ACT_SET, MOAL_IOCTL_WAIT, &frag_thr)) + goto fail; + } + if (changed & + (WIPHY_PARAM_RETRY_LONG | WIPHY_PARAM_RETRY_SHORT)) + if (woal_set_get_retry + (priv, MLAN_ACT_SET, MOAL_IOCTL_WAIT, &retry)) + goto fail; + } +#endif +#endif + + LEAVE(); + return 0; + +fail: + PRINTM(MERROR, "Failed to change wiphy params %x\n", changed); + LEAVE(); + return -EFAULT; +} + +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) || defined(COMPAT_WIRELESS) +/** + * @brief Request the driver to add a key + * + * @param wiphy A pointer to wiphy structure + * @param netdev A pointer to net_device structure + * @param key_index Key index + * @param pairwise Flag to indicate pairwise or group (for kernel > 2.6.36) + * @param mac_addr MAC address (NULL for group key) + * @param params A pointer to key_params structure + * + * @return 0 -- success, otherwise fail + */ +#else +/** + * @brief Request the driver to add a key + * + * @param wiphy A pointer to wiphy structure + * @param netdev A pointer to net_device structure + * @param key_index Key index + * @param mac_addr MAC address (NULL for group key) + * @param params A pointer to key_params structure + * + * @return 0 -- success, otherwise fail + */ +#endif +int +woal_cfg80211_add_key(struct wiphy *wiphy, struct net_device *netdev, + t_u8 key_index, +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) || defined(COMPAT_WIRELESS) + bool pairwise, +#endif + const t_u8 *mac_addr, struct key_params *params) +{ + moal_private *priv = (moal_private *)woal_get_netdev_priv(netdev); + + ENTER(); + if (priv->ft_pre_connect) { + PRINTM(MINFO, "Skip set keys during ft connecting\n"); + return -EFAULT; + } + if (woal_cfg80211_set_key(priv, 0, params->cipher, params->key, + params->key_len, params->seq, params->seq_len, + key_index, mac_addr, 0, MOAL_IOCTL_WAIT)) { + PRINTM(MERROR, "Error adding the crypto keys\n"); + LEAVE(); + return -EFAULT; + } + + PRINTM(MINFO, "Crypto keys added\n"); + + LEAVE(); + return 0; +} + +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) || defined(COMPAT_WIRELESS) +/** + * @brief Request the driver to delete a key + * + * @param wiphy A pointer to wiphy structure + * @param netdev A pointer to net_device structure + * @param key_index Key index + * @param pairwise Flag to indicate pairwise or group (for kernel > 2.6.36) + * @param mac_addr MAC address (NULL for group key) + * + * @return 0 -- success, otherwise fail + */ +#else +/** + * @brief Request the driver to delete a key + * + * @param wiphy A pointer to wiphy structure + * @param netdev A pointer to net_device structure + * @param key_index Key index + * @param mac_addr MAC address (NULL for group key) + * + * @return 0 -- success, otherwise fail + */ +#endif +int +woal_cfg80211_del_key(struct wiphy *wiphy, struct net_device *netdev, + t_u8 key_index, +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) || defined(COMPAT_WIRELESS) + bool pairwise, +#endif + const t_u8 *mac_addr) +{ + moal_private *priv = (moal_private *)woal_get_netdev_priv(netdev); + + ENTER(); + priv->phandle->driver_state = woal_check_driver_status(priv->phandle); + if (priv->phandle->driver_state) { + PRINTM(MERROR, + "Block woal_cfg80211_del_key in abnormal driver state\n"); + LEAVE(); + return 0; + } + + if (MLAN_STATUS_FAILURE == + woal_cfg80211_set_key(priv, 0, 0, NULL, 0, NULL, 0, key_index, + mac_addr, 1, MOAL_NO_WAIT)) { + PRINTM(MERROR, "Error deleting the crypto keys\n"); + LEAVE(); + return -EFAULT; + } + + PRINTM(MINFO, "Crypto keys deleted\n"); + LEAVE(); + return 0; +} + +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) +/** + * @brief Request to enable WEP key to driver + * + * @param wiphy A pointer to wiphy structure + * @param netdev A pointer to net_device structure + * @param key_index Key index + * @param ucast Unicast flag (for kernel > 2.6.37) + * @param mcast Multicast flag (for kernel > 2.6.37) + * + * @return 0 -- success, otherwise fail + */ +#else +/** + * @brief Request to enable WEP key to driver + * + * @param wiphy A pointer to wiphy structure + * @param netdev A pointer to net_device structure + * @param key_index Key index + * + * @return 0 -- success, otherwise fail + */ +#endif +int +woal_cfg80211_set_default_key(struct wiphy *wiphy, + struct net_device *netdev, t_u8 key_index +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) + , bool ucast, bool mcast +#endif + ) +{ + int ret = 0; + moal_private *priv = (moal_private *)woal_get_netdev_priv(netdev); + mlan_bss_info bss_info; + + ENTER(); + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) { + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + if (!bss_info.wep_status) { + LEAVE(); + return ret; + } + } + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_set_wep_keys(priv, NULL, 0, key_index, + MOAL_IOCTL_WAIT)) { + ret = -EFAULT; + } + LEAVE(); + return ret; +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30) || defined(COMPAT_WIRELESS) +int +woal_cfg80211_set_default_mgmt_key(struct wiphy *wiphy, + struct net_device *netdev, t_u8 key_index) +{ + PRINTM(MINFO, "set default mgmt key, key index=%d\n", key_index); + + return 0; +} +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 5, 0) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 34) || defined(COMPAT_WIRELESS) +/** + * @brief Request the driver to change the channel + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param chan A pointer to ieee80211_channel structure + * @param channel_type Channel type of nl80211_channel_type + * + * @return 0 -- success, otherwise fail + */ +#else +/** + * @brief Request the driver to change the channel + * + * @param wiphy A pointer to wiphy structure + * @param chan A pointer to ieee80211_channel structure + * @param channel_type Channel type of nl80211_channel_type + * + * @return 0 -- success, otherwise fail + */ +#endif +int +woal_cfg80211_set_channel(struct wiphy *wiphy, +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 34) || defined(COMPAT_WIRELESS) + struct net_device *dev, +#endif + struct ieee80211_channel *chan, + enum nl80211_channel_type channel_type) +{ + int ret = 0; + moal_private *priv = NULL; + + ENTER(); + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 5, 0) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 34) || defined(COMPAT_WIRELESS) + if (dev) + priv = woal_get_netdev_priv(dev); +#endif +#endif + if (!priv) { + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); + if (handle) + priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY); + } + if (priv) { +#ifdef STA_CFG80211 +#ifdef STA_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) { + if (priv->media_connected == MTRUE) { + PRINTM(MERROR, + "This configuration is valid only when station " + "is not connected\n"); + LEAVE(); + return -EINVAL; + } + ret = woal_set_rf_channel(priv, chan, channel_type, + MOAL_IOCTL_WAIT); + } +#endif +#endif + priv->channel = + ieee80211_frequency_to_channel(chan->center_freq); + } + /* set monitor channel support */ + + LEAVE(); + return ret; +} +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) +static bool +woal_is_pattern_supported(struct cfg80211_pkt_pattern *pat, t_u8 *byte_seq, + t_u8 max_byte_seq) +{ + int j, k, valid_byte_cnt = 0; + bool dont_care_byte = false; + + for (j = 0; j < DIV_ROUND_UP(pat->pattern_len, 8); j++) { + for (k = 0; k < 8; k++) { + if (pat->mask[j] & 1 << k) { + memcpy(byte_seq + valid_byte_cnt, + &pat->pattern[j * 8 + k], 1); + valid_byte_cnt++; + if (dont_care_byte) + return false; + } else { + if (valid_byte_cnt) + dont_care_byte = true; + } + + if (valid_byte_cnt > max_byte_seq) + return false; + } + } + + byte_seq[max_byte_seq] = valid_byte_cnt; + + return true; +} + +static int +woal_get_coalesce_pkt_type(t_u8 *byte_seq) +{ + const t_u8 ipv4_mc_mac[] = { 0x33, 0x33 }; + const t_u8 ipv6_mc_mac[] = { 0x01, 0x00, 0x5e }; + const t_u8 bc_mac[] = { 0xff, 0xff, 0xff, 0xff }; + + if ((byte_seq[0] & 0x01) && (byte_seq[COALESCE_MAX_BYTESEQ] == 1)) + return PACKET_TYPE_UNICAST; + else if (!memcmp(byte_seq, bc_mac, 4)) + return PACKET_TYPE_BROADCAST; + else if ((!memcmp(byte_seq, ipv4_mc_mac, 2) && + byte_seq[COALESCE_MAX_BYTESEQ] == 2) || + (!memcmp(byte_seq, ipv6_mc_mac, 3) && + byte_seq[COALESCE_MAX_BYTESEQ] == 3)) + return PACKET_TYPE_MULTICAST; + + return 0; +} + +static int +woal_fill_coalesce_rule_info(struct cfg80211_coalesce_rules *crule, + struct coalesce_rule *mrule) +{ + t_u8 byte_seq[COALESCE_MAX_BYTESEQ + 1]; + struct filt_field_param *param; + int i; + + mrule->max_coalescing_delay = crule->delay; + + param = mrule->params; + + for (i = 0; i < crule->n_patterns; i++) { + memset(byte_seq, 0, sizeof(byte_seq)); + if (!woal_is_pattern_supported(&crule->patterns[i], + byte_seq, + COALESCE_MAX_BYTESEQ)) { + PRINTM(MERROR, "Pattern not supported\n"); + return -EOPNOTSUPP; + } + + if (!crule->patterns[i].pkt_offset) { + u8 pkt_type; + + pkt_type = woal_get_coalesce_pkt_type(byte_seq); + if (pkt_type && mrule->pkt_type) { + PRINTM(MERROR, + "Multiple packet types not allowed\n"); + return -EOPNOTSUPP; + } else if (pkt_type) { + mrule->pkt_type = pkt_type; + continue; + } + } + + if (crule->condition == NL80211_COALESCE_CONDITION_MATCH) + param->operation = RECV_FILTER_MATCH_TYPE_EQ; + else + param->operation = RECV_FILTER_MATCH_TYPE_NE; + + param->operand_len = byte_seq[COALESCE_MAX_BYTESEQ]; + memcpy(param->operand_byte_stream, byte_seq, + param->operand_len); + param->offset = crule->patterns[i].pkt_offset; + param++; + + mrule->num_of_fields++; + } + + if (!mrule->pkt_type) { + PRINTM(MERROR, "Packet type can not be determined\n"); + return -EOPNOTSUPP; + } + + return 0; +} + +/** + * @brief Set coalesce parameter + * + * @param priv A pointer to moal_private structure + * @param action MLAN_ACT_SET or MLAN_ACT_GET + * @param coalesce_cfg A pointer to coalesce structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_set_coalesce(moal_private *priv, t_u16 action, + mlan_ds_coalesce_cfg * coalesce_cfg) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc_cfg = NULL; + mlan_ioctl_req *req = NULL; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + misc_cfg = (mlan_ds_misc_cfg *)req->pbuf; + misc_cfg->sub_command = MLAN_OID_MISC_COALESCE_CFG; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = action; + + memcpy(&misc_cfg->param.coalesce_cfg, coalesce_cfg, + sizeof(mlan_ds_coalesce_cfg)); + + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Request the driver to set the coalesce + * + * @param wiphy A pointer to wiphy structure + * @param coalesce A pointer to cfg80211_coalesce structure + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_set_coalesce(struct wiphy *wiphy, + struct cfg80211_coalesce *coalesce) +{ + int ret = 0; + int i; + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); + moal_private *priv = NULL; + mlan_ds_coalesce_cfg coalesce_cfg; + + ENTER(); + + if (!handle) { + PRINTM(MFATAL, "Unable to get handle\n"); + ret = -EINVAL; + goto done; + } + priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY); + if (!priv) { + ret = -EINVAL; + goto done; + } + + memset(&coalesce_cfg, 0, sizeof(coalesce_cfg)); + if (!coalesce) { + PRINTM(MMSG, "Disable coalesce and reset all previous rules\n"); + } else { + coalesce_cfg.num_of_rules = coalesce->n_rules; + for (i = 0; i < coalesce->n_rules; i++) { + ret = woal_fill_coalesce_rule_info(&coalesce->rules[i], + &coalesce_cfg. + rule[i]); + if (ret) { + PRINTM(MERROR, + "Recheck the patterns provided for rule %d\n", + i + 1); + return ret; + } + } + } + + if (MLAN_STATUS_SUCCESS != + woal_set_coalesce(priv, MLAN_ACT_SET, &coalesce_cfg)) { + PRINTM(MERROR, "wlan: Fail to set coalesce\n"); + ret = -EFAULT; + } + +done: + LEAVE(); + return ret; +} +#endif + +/** + * @brief Request the driver to set the bitrate + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param peer A pointer to peer address + * @param mask A pointer to cfg80211_bitrate_mask structure + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_set_bitrate_mask(struct wiphy *wiphy, + struct net_device *dev, + const u8 *peer, + const struct cfg80211_bitrate_mask *mask) +{ + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + mlan_bss_info bss_info; + enum ieee80211_band band; + mlan_ioctl_req *req = NULL; + mlan_ds_rate *rate = NULL; + mlan_rate_cfg_t *rate_cfg = NULL; + + ENTER(); + + if (priv->media_connected == MFALSE) { + PRINTM(MERROR, "Can not set data rate in disconnected state\n"); + ret = -EINVAL; + goto done; + } + + status = woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + if (status) + goto done; + band = woal_band_cfg_to_ieee_band(bss_info.bss_band); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_rate)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + rate = (mlan_ds_rate *)req->pbuf; + rate_cfg = &rate->param.rate_cfg; + rate->sub_command = MLAN_OID_RATE_CFG; + req->req_id = MLAN_IOCTL_RATE; + req->action = MLAN_ACT_SET; + rate_cfg->rate_type = MLAN_RATE_BITMAP; + + /* Fill HR/DSSS rates. */ + if (band == IEEE80211_BAND_2GHZ) + rate_cfg->bitmap_rates[0] = mask->control[band].legacy & 0x000f; + + /* Fill OFDM rates */ + if (band == IEEE80211_BAND_2GHZ) + rate_cfg->bitmap_rates[1] = + (mask->control[band].legacy & 0x0ff0) >> 4; + else + rate_cfg->bitmap_rates[1] = mask->control[band].legacy; + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) + /* Fill MCS rates */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) + rate_cfg->bitmap_rates[2] = mask->control[band].ht_mcs[0]; +#else + rate_cfg->bitmap_rates[2] = mask->control[band].mcs[0]; +#endif +#if defined(SD_8XXX) + if (priv->phandle->card_type == +#if defined(SD_8XXX) + CARD_TYPE_SD8797 +#endif + ) +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) + rate_cfg->bitmap_rates[2] |= mask->control[band].ht_mcs[1] << 8; +#else + rate_cfg->bitmap_rates[2] |= mask->control[band].mcs[1] << 8; +#endif +#endif + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (MLAN_STATUS_SUCCESS != status) { + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) || defined(COMPAT_WIRELESS) +/** + * @brief Request the driver to set antenna configuration + * + * @param wiphy A pointer to wiphy structure + * @param tx_ant Bitmaps of allowed antennas to use for TX + * @param rx_ant Bitmaps of allowed antennas to use for RX + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant) +{ + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); + moal_private *priv = NULL; + mlan_ds_radio_cfg *radio = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + int ret = 0; + + ENTER(); + + if (!handle) { + PRINTM(MFATAL, "Unable to get handle\n"); + ret = -EINVAL; + goto done; + } + priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY); + if (!priv) { + ret = -EINVAL; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_radio_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + radio = (mlan_ds_radio_cfg *)req->pbuf; + radio->sub_command = MLAN_OID_ANT_CFG; + req->req_id = MLAN_IOCTL_RADIO_CFG; + req->action = MLAN_ACT_SET; + radio->param.ant_cfg.tx_antenna = tx_ant; + radio->param.ant_cfg.rx_antenna = rx_ant; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (MLAN_STATUS_SUCCESS != status) { + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + /* Driver must return -EINVAL to cfg80211 */ + if (ret) + ret = -EINVAL; + LEAVE(); + return ret; +} +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) +/** + * @brief register/unregister mgmt frame forwarding + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param frame_type Bit mask for mgmt frame type + * @param reg Register or unregister + * + * @return 0 -- success, otherwise fail + */ +void +woal_cfg80211_mgmt_frame_register(struct wiphy *wiphy, + struct net_device *dev, u16 frame_type, + bool reg) +#else +/** + * @brief register/unregister mgmt frame forwarding + * + * @param wiphy A pointer to wiphy structure + * @param wdev A pointer to wireless_dev structure + * @param frame_type Bit mask for mgmt frame type + * @param reg Register or unregister + * + * @return 0 -- success, otherwise fail + */ +void +woal_cfg80211_mgmt_frame_register(struct wiphy *wiphy, + struct wireless_dev *wdev, u16 frame_type, + bool reg) +#endif +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) + struct net_device *dev = wdev->netdev; +#endif + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + mlan_status status = MLAN_STATUS_SUCCESS; + t_u32 mgmt_subtype_mask = 0x0; + t_u32 last_mgmt_subtype_mask = priv->mgmt_subtype_mask; + + ENTER(); + if (reg == MTRUE) { + /* set mgmt_subtype_mask based on origin value */ + mgmt_subtype_mask = + last_mgmt_subtype_mask | BIT(frame_type >> 4); + } else { + /* clear mgmt_subtype_mask */ + mgmt_subtype_mask = + last_mgmt_subtype_mask & ~BIT(frame_type >> 4); + } + PRINTM(MIOCTL, + "%s: mgmt_subtype_mask=0x%x last_mgmt_subtype_mask=0x%x\n", + dev->name, mgmt_subtype_mask, last_mgmt_subtype_mask); + if (mgmt_subtype_mask != last_mgmt_subtype_mask) { + + last_mgmt_subtype_mask = mgmt_subtype_mask; + /* Notify driver that a mgmt frame type was registered. * Note + that this callback may not sleep, and cannot run * + concurrently with itself. */ + status = woal_reg_rx_mgmt_ind(priv, MLAN_ACT_SET, + &mgmt_subtype_mask, MOAL_NO_WAIT); + priv->mgmt_subtype_mask = last_mgmt_subtype_mask; + } + + LEAVE(); +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) +/** + * @brief tx mgmt frame + * + * @param wiphy A pointer to wiphy structure + * @param wdev A pointer to wireless_dev structure + * @param params A pointer to cfg80211_mgmt_tx_params structure + * @param cookie A pointer to frame cookie + * + * @return 0 -- success, otherwise fail + */ +#else +/** + * @brief tx mgmt frame + * + * @param wiphy A pointer to wiphy structure + * @param wdev A pointer to wireless_dev structure + * @param chan A pointer to ieee80211_channel structure + * @param offchan Off channel or not + * @param wait Duration to wait + * @param buf Frame buffer + * @param len Frame length + * @param no_cck No CCK check + * @param dont_wait_for_ack Do not wait for ACK + * @param cookie A pointer to frame cookie + * + * @return 0 -- success, otherwise fail + */ +#endif +#else +/** + * @brief tx mgmt frame + * + * @param wiphy A pointer to wiphy structure + * @param wdev A pointer to wireless_dev structure + * @param chan A pointer to ieee80211_channel structure + * @param offchan Off channel or not + * @param channel_type Channel type + * @param channel_type_valid Is channel type valid or not + * @param wait Duration to wait + * @param buf Frame buffer + * @param len Frame length + * @param no_cck No CCK check + * @param dont_wait_for_ack Do not wait for ACK + * @param cookie A pointer to frame cookie + * + * @return 0 -- success, otherwise fail + */ +#endif +#else +/** + * @brief tx mgmt frame + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param chan A pointer to ieee80211_channel structure + * @param offchan Off channel or not + * @param channel_type Channel type + * @param channel_type_valid Is channel type valid or not + * @param wait Duration to wait + * @param buf Frame buffer + * @param len Frame length + * @param no_cck No CCK check + * @param dont_wait_for_ack Do not wait for ACK + * @param cookie A pointer to frame cookie + * + * @return 0 -- success, otherwise fail + */ +#endif +#else +/** + * @brief tx mgmt frame + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param chan A pointer to ieee80211_channel structure + * @param offchan Off channel or not + * @param channel_type Channel type + * @param channel_type_valid Is channel type valid or not + * @param wait Duration to wait + * @param buf Frame buffer + * @param len Frame length + * @param no_cck No CCK check + * @param cookie A pointer to frame cookie + * + * @return 0 -- success, otherwise fail + */ +#endif +#else +/** + * @brief tx mgmt frame + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param chan A pointer to ieee80211_channel structure + * @param offchan Off channel or not + * @param channel_type Channel type + * @param channel_type_valid Is channel type valid or not + * @param wait Duration to wait + * @param buf Frame buffer + * @param len Frame length + * @param cookie A pointer to frame cookie + * + * @return 0 -- success, otherwise fail + */ +#endif +int +woal_cfg80211_mgmt_tx(struct wiphy *wiphy, +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + struct net_device *dev, +#else + struct wireless_dev *wdev, +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) + struct cfg80211_mgmt_tx_params *params, +#else + struct ieee80211_channel *chan, bool offchan, +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + enum nl80211_channel_type channel_type, + bool channel_type_valid, +#endif + unsigned int wait, const u8 *buf, size_t len, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) + bool no_cck, +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) + bool dont_wait_for_ack, +#endif +#endif + u64 * cookie) +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) + struct net_device *dev = wdev->netdev; +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) +#if defined(WIFI_DIRECT_SUPPORT) + struct ieee80211_channel *chan = params->chan; + unsigned int wait = params->wait; +#endif + const u8 *buf = params->buf; + size_t len = params->len; +#endif + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + int ret = 0; + pmlan_buffer pmbuf = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + t_u16 packet_len = 0; + t_u8 addr[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; + t_u32 pkt_type; + t_u32 tx_control; +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + t_u8 channel_status; + t_u32 duration; + moal_private *remain_priv = NULL; +#endif +#endif +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + unsigned long flags; + struct sk_buff *skb = NULL; + struct tx_status_info *tx_info = NULL; +#endif +#endif + + ENTER(); + + if (buf == NULL || len == 0) { + PRINTM(MERROR, "woal_cfg80211_mgmt_tx() corrupt data\n"); + LEAVE(); + return -EFAULT; + } + + /* If the packet is probe response, that means we are in listen phase, + so we should not call remain_on_channel_cfg because remain_on_channl + already handled it. If the packet if action, that means we are in + PD/GO negotiation, so we should call remain_on_channel_cfg in order + to receive action frame from peer device */ + if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) && + ieee80211_is_probe_resp(((struct ieee80211_mgmt *)buf)-> + frame_control)) { + PRINTM(MIOCTL, "Skip send probe_resp in GO/UAP mode\n"); + goto done; + } +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (ieee80211_is_action(((struct ieee80211_mgmt *)buf)->frame_control)) { + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) + woal_cfg80211_display_p2p_actframe(buf, len, chan, + MTRUE); + if (priv->phandle->is_go_timer_set) { + woal_cancel_timer(&priv->phandle->go_timer); + priv->phandle->is_go_timer_set = MFALSE; + } + if (priv->phandle->is_remain_timer_set) { + woal_cancel_timer(&priv->phandle->remain_timer); + woal_remain_timer_func(priv->phandle); + } + /* With sd8777 We have difficulty to receive response packet in + 500ms */ +#define MGMT_TX_DEFAULT_WAIT_TIME 1500 + if (priv->phandle->remain_on_channel) + remain_priv = + priv->phandle->priv[priv->phandle-> + remain_bss_index]; + /** cancel previous remain on channel */ + if (priv->phandle->remain_on_channel && remain_priv) { + if ((priv->phandle->chan.center_freq != + chan->center_freq) + ) { + if (woal_cfg80211_remain_on_channel_cfg + (remain_priv, MOAL_IOCTL_WAIT, MTRUE, + &channel_status, NULL, 0, 0)) + PRINTM(MERROR, + "mgmt_tx:Fail to cancel remain on channel\n"); + } + if (priv->phandle->cookie) { + cfg80211_remain_on_channel_expired( +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + remain_priv-> + netdev, +#else + remain_priv-> + wdev, +#endif + priv-> + phandle-> + cookie, + &priv-> + phandle-> + chan, +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + priv-> + phandle-> + channel_type, +#endif + GFP_ATOMIC); + priv->phandle->cookie = 0; + } + priv->phandle->remain_on_channel = MFALSE; + } +#ifdef STA_CFG80211 + /** cancel pending scan */ + woal_cancel_scan(priv, MOAL_IOCTL_WAIT); +#endif + + duration = + (wait > + MGMT_TX_DEFAULT_WAIT_TIME) ? wait : + MGMT_TX_DEFAULT_WAIT_TIME; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + if (channel_type_valid) + ret = woal_cfg80211_remain_on_channel_cfg(priv, + MOAL_IOCTL_WAIT, + MFALSE, + &channel_status, + chan, + channel_type, + duration); + else +#endif + ret = woal_cfg80211_remain_on_channel_cfg(priv, + MOAL_IOCTL_WAIT, + MFALSE, + &channel_status, + chan, 0, + duration); + if (ret) { + /* Return fail will cause p2p connnection fail */ + woal_sched_timeout(2); +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + if (channel_type_valid) + ret = woal_cfg80211_remain_on_channel_cfg(priv, + MOAL_IOCTL_WAIT, + MFALSE, + &channel_status, + chan, + channel_type, + duration); + else +#endif + ret = woal_cfg80211_remain_on_channel_cfg(priv, + MOAL_IOCTL_WAIT, + MFALSE, + &channel_status, + chan, + 0, + duration); + PRINTM(MERROR, + "Try configure remain on channel again, ret=%d\n", + ret); + ret = 0; + } else { + priv->phandle->remain_on_channel = MTRUE; + priv->phandle->remain_bss_index = priv->bss_index; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + priv->phandle->channel_type = channel_type; +#endif + memcpy(&priv->phandle->chan, chan, + sizeof(struct ieee80211_channel)); + PRINTM(MIOCTL, + "%s: Mgmt Tx: Set remain channel=%d duration=%d\n", + dev->name, + ieee80211_frequency_to_channel(chan-> + center_freq), + duration); + } + } +#endif +#endif + + /* pkt_type + tx_control */ +#define HEADER_SIZE 8 + packet_len = (t_u16)len + MLAN_MAC_ADDR_LENGTH; + pmbuf = woal_alloc_mlan_buffer(priv->phandle, + MLAN_MIN_DATA_HEADER_LEN + HEADER_SIZE + + packet_len + sizeof(packet_len)); + if (!pmbuf) { + PRINTM(MERROR, "Fail to allocate mlan_buffer\n"); + ret = -ENOMEM; + goto done; + } +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + *cookie = random32() | 1; +#else + *cookie = prandom_u32() | 1; +#endif + pmbuf->data_offset = MLAN_MIN_DATA_HEADER_LEN; + pkt_type = MRVL_PKT_TYPE_MGMT_FRAME; + tx_control = 0; + /* Add pkt_type and tx_control */ + memcpy(pmbuf->pbuf + pmbuf->data_offset, &pkt_type, sizeof(pkt_type)); + memcpy(pmbuf->pbuf + pmbuf->data_offset + sizeof(pkt_type), &tx_control, + sizeof(tx_control)); + /* frmctl + durationid + addr1 + addr2 + addr3 + seqctl */ +#define PACKET_ADDR4_POS (2 + 2 + 6 + 6 + 6 + 2) + memcpy(pmbuf->pbuf + pmbuf->data_offset + HEADER_SIZE, &packet_len, + sizeof(packet_len)); + memcpy(pmbuf->pbuf + pmbuf->data_offset + HEADER_SIZE + + sizeof(packet_len), buf, PACKET_ADDR4_POS); + memcpy(pmbuf->pbuf + pmbuf->data_offset + HEADER_SIZE + + sizeof(packet_len) + + PACKET_ADDR4_POS, addr, MLAN_MAC_ADDR_LENGTH); + memcpy(pmbuf->pbuf + pmbuf->data_offset + HEADER_SIZE + + sizeof(packet_len) + + PACKET_ADDR4_POS + MLAN_MAC_ADDR_LENGTH, + buf + PACKET_ADDR4_POS, len - PACKET_ADDR4_POS); + + pmbuf->data_len = HEADER_SIZE + packet_len + sizeof(packet_len); + pmbuf->buf_type = MLAN_BUF_TYPE_RAW_DATA; + pmbuf->bss_index = priv->bss_index; +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (ieee80211_is_action(((struct ieee80211_mgmt *)buf)->frame_control)) { + pmbuf->flags = MLAN_BUF_FLAG_TX_STATUS; + pmbuf->tx_seq_num = ++priv->tx_seq_num; + tx_info = kzalloc(sizeof(struct tx_status_info), GFP_ATOMIC); + if (tx_info) { + skb = alloc_skb(len, GFP_ATOMIC); + if (skb) { + memcpy(skb->data, buf, len); + skb_put(skb, len); + spin_lock_irqsave(&priv->tx_stat_lock, flags); + tx_info->tx_cookie = *cookie; + tx_info->tx_skb = skb; + tx_info->tx_seq_num = pmbuf->tx_seq_num; + INIT_LIST_HEAD(&tx_info->link); + list_add_tail(&tx_info->link, + &priv->tx_stat_queue); + spin_unlock_irqrestore(&priv->tx_stat_lock, + flags); + } else { + kfree(tx_info); + tx_info = NULL; + } + } + } +#endif +#endif + status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf); + + switch (status) { + case MLAN_STATUS_PENDING: + atomic_inc(&priv->phandle->tx_pending); + queue_work(priv->phandle->workqueue, &priv->phandle->main_work); + +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + /* Delay 30ms to guarantee the packet has been already tx'ed, + becuase if we call cfg80211_mgmt_tx_status() immediately, + then wpa_supplicant will call cancel_remain_on_channel(), + which may affect the mgmt frame tx. Meanwhile it is only + necessary for P2P action handshake to wait 30ms. */ + if (ieee80211_is_action + (((struct ieee80211_mgmt *)buf)->frame_control)) { + if (tx_info) + break; + else + woal_sched_timeout(30); + } +#endif +#endif + + /* Notify the mgmt tx status */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + cfg80211_mgmt_tx_status(dev, *cookie, buf, len, true, + GFP_ATOMIC); +#else + cfg80211_mgmt_tx_status(priv->wdev, *cookie, buf, len, true, + GFP_ATOMIC); +#endif +#endif + break; + case MLAN_STATUS_SUCCESS: + woal_free_mlan_buffer(priv->phandle, pmbuf); + break; + case MLAN_STATUS_FAILURE: + default: + woal_free_mlan_buffer(priv->phandle, pmbuf); + ret = -EFAULT; + break; + } + +done: +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (status != MLAN_STATUS_PENDING) { + if (tx_info) + woal_remove_tx_info(priv, tx_info->tx_seq_num); + + } +#endif +#endif + LEAVE(); + return ret; +} + +/** + * @brief Add custom ie to mgmt frames. + * + * @param priv A pointer to moal private structure + * @param beacon_ies_data Beacon ie + * @param beacon_index The index for beacon when auto index + * @param proberesp_ies_data Probe resp ie + * @param proberesp_index The index for probe resp when auto index + * @param assocresp_ies_data Assoc resp ie + * @param assocresp_index The index for assoc resp when auto index + * @param probereq_ies_data Probe req ie + * @param probereq_index The index for probe req when auto index + * @param wait_option wait option + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_custom_ie(moal_private *priv, + custom_ie *beacon_ies_data, t_u16 *beacon_index, + custom_ie *proberesp_ies_data, t_u16 *proberesp_index, + custom_ie *assocresp_ies_data, t_u16 *assocresp_index, + custom_ie *probereq_ies_data, t_u16 *probereq_index, + t_u8 wait_option) +{ + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_misc_cfg *misc = NULL; + mlan_ds_misc_custom_ie *custom_ie = NULL; + t_u8 *pos = NULL; + t_u16 len = 0; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + custom_ie = kzalloc(sizeof(mlan_ds_misc_custom_ie), GFP_KERNEL); + if (!custom_ie) { + ret = -ENOMEM; + goto done; + } + + custom_ie->type = TLV_TYPE_MGMT_IE; + + pos = (t_u8 *)custom_ie->ie_data_list; + if (beacon_ies_data) { + len = sizeof(*beacon_ies_data) - MAX_IE_SIZE + + beacon_ies_data->ie_length; + memcpy(pos, beacon_ies_data, len); + pos += len; + custom_ie->len += len; + } + + if (proberesp_ies_data) { + len = sizeof(*proberesp_ies_data) - MAX_IE_SIZE + + proberesp_ies_data->ie_length; + memcpy(pos, proberesp_ies_data, len); + pos += len; + custom_ie->len += len; + } + + if (assocresp_ies_data) { + len = sizeof(*assocresp_ies_data) - MAX_IE_SIZE + + assocresp_ies_data->ie_length; + memcpy(pos, assocresp_ies_data, len); + custom_ie->len += len; + } + + if (probereq_ies_data) { + len = sizeof(*probereq_ies_data) - MAX_IE_SIZE + + probereq_ies_data->ie_length; + memcpy(pos, probereq_ies_data, len); + pos += len; + custom_ie->len += len; + } + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; + misc->sub_command = MLAN_OID_MISC_CUSTOM_IE; + ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; + ioctl_req->action = MLAN_ACT_SET; + + memcpy(&misc->param.cust_ie, custom_ie, sizeof(mlan_ds_misc_custom_ie)); + + status = woal_request_ioctl(priv, ioctl_req, wait_option); + if (MLAN_STATUS_SUCCESS != status) { + ret = -EFAULT; + goto done; + } + + /* get the assigned index */ + pos = (t_u8 *)(&misc->param.cust_ie.ie_data_list[0].ie_index); + if (beacon_ies_data && beacon_ies_data->ie_length + && beacon_ies_data->ie_index == MLAN_CUSTOM_IE_AUTO_IDX_MASK) { + /* save beacon ie index after auto-indexing */ + *beacon_index = misc->param.cust_ie.ie_data_list[0].ie_index; + len = sizeof(*beacon_ies_data) - MAX_IE_SIZE + + beacon_ies_data->ie_length; + pos += len; + } + + if (proberesp_ies_data && proberesp_ies_data->ie_length + && proberesp_ies_data->ie_index == MLAN_CUSTOM_IE_AUTO_IDX_MASK) { + /* save probe resp ie index after auto-indexing */ + *proberesp_index = *((t_u16 *)pos); + len = sizeof(*proberesp_ies_data) - MAX_IE_SIZE + + proberesp_ies_data->ie_length; + pos += len; + } + + if (assocresp_ies_data && assocresp_ies_data->ie_length + && assocresp_ies_data->ie_index == MLAN_CUSTOM_IE_AUTO_IDX_MASK) { + /* save assoc resp ie index after auto-indexing */ + *assocresp_index = *((t_u16 *)pos); + len = sizeof(*assocresp_ies_data) - MAX_IE_SIZE + + assocresp_ies_data->ie_length; + pos += len; + } + if (probereq_ies_data && probereq_ies_data->ie_length + && probereq_ies_data->ie_index == MLAN_CUSTOM_IE_AUTO_IDX_MASK) { + /* save probe resp ie index after auto-indexing */ + *probereq_index = *((t_u16 *)pos); + len = sizeof(*probereq_ies_data) - MAX_IE_SIZE + + probereq_ies_data->ie_length; + pos += len; + } + + if (ioctl_req->status_code == MLAN_ERROR_IOCTL_FAIL) + ret = -EFAULT; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + kfree(custom_ie); + LEAVE(); + return ret; +} + +/** + * @brief Find first P2P ie + * + * @param ie Pointer to IEs + * @param len Total length of ie + * @param ie_out Pointer to out IE buf + * + * @return out IE length + */ +static t_u16 +woal_get_first_p2p_ie(const t_u8 *ie, int len, t_u8 *ie_out) +{ + int left_len = len; + const t_u8 *pos = ie; + int length; + t_u8 id = 0; + t_u16 out_len = 0; + IEEEtypes_VendorSpecific_t *pvendor_ie = NULL; + const u8 p2p_oui[4] = { 0x50, 0x6f, 0x9a, 0x09 }; + + while (left_len >= 2) { + length = *(pos + 1); + id = *pos; + if ((length + 2) > left_len) + break; + if (id == VENDOR_SPECIFIC_221) { + pvendor_ie = (IEEEtypes_VendorSpecific_t *)pos; + if (!memcmp + (pvendor_ie->vend_hdr.oui, p2p_oui, + sizeof(pvendor_ie->vend_hdr.oui)) && + pvendor_ie->vend_hdr.oui_type == p2p_oui[3]) { + memcpy(ie_out + out_len, pos, length + 2); + out_len += length + 2; + break; + } + } + pos += (length + 2); + left_len -= (length + 2); + } + return out_len; +} + +/** + * @brief Find specific IE from IE buffer + * + * @param ie Pointer to IEs + * @param len Total length of ie + * @param spec_ie Pointer to specific IE buffer + * @param spec_len Total length of specifc IE + * + * @return out IE length + */ +static t_u8 +woal_find_ie(const t_u8 *ie, int len, const t_u8 *spec_ie, int spec_len) +{ + int left_len = len; + const t_u8 *pos = ie; + int length; + t_u8 id = 0; + + while (left_len >= 2) { + length = *(pos + 1); + id = *pos; + if ((length + 2) > left_len) + break; + if ((length + 2) == spec_len) { + if (!memcmp(pos, spec_ie, spec_len)) { + return MTRUE; + } + } + pos += (length + 2); + left_len -= (length + 2); + } + return MFALSE; +} + +/** + * @brief Filter specific IE in ie buf + * + * @param ie Pointer to IEs + * @param len Total length of ie + * @param ie_out Pointer to out IE buf + * @param wps_flag flag for wps/p2p + * @param dup_ie Pointer to duplicate ie + * @param dup_ie_len duplicate IE len + * + * @return out IE length + */ +static t_u16 +woal_filter_beacon_ies(const t_u8 *ie, int len, t_u8 *ie_out, t_u16 wps_flag, + const t_u8 *dup_ie, int dup_ie_len) +{ + int left_len = len; + const t_u8 *pos = ie; + int length; + t_u8 id = 0; + t_u16 out_len = 0; + IEEEtypes_VendorSpecific_t *pvendor_ie = NULL; + const u8 wps_oui[4] = { 0x00, 0x50, 0xf2, 0x04 }; + const u8 p2p_oui[4] = { 0x50, 0x6f, 0x9a, 0x09 }; + const u8 wfd_oui[4] = { 0x50, 0x6f, 0x9a, 0x0a }; + const t_u8 wmm_oui[4] = { 0x00, 0x50, 0xf2, 0x02 }; + t_u8 find_p2p_ie = MFALSE; + + /* ERP_INFO/EXTENDED_SUPPORT_RATES/HT_CAPABILITY/HT_OPERATION/WMM and + WPS/P2P/WFD IE will be fileter out */ + while (left_len >= 2) { + length = *(pos + 1); + id = *pos; + if ((length + 2) > left_len) + break; + if (dup_ie && dup_ie_len && + woal_find_ie(dup_ie, dup_ie_len, pos, length + 2)) { + PRINTM(MIOCTL, "skip duplicate IE\n"); + pos += (length + 2); + left_len -= (length + 2); + continue; + } + switch (id) { + case EXTENDED_SUPPORTED_RATES: + case WLAN_EID_ERP_INFO: + case HT_CAPABILITY: + case HT_OPERATION: + case VHT_CAPABILITY: + case VHT_OPERATION: + break; + case VENDOR_SPECIFIC_221: + /* filter out wmm ie */ + pvendor_ie = (IEEEtypes_VendorSpecific_t *)pos; + if (!memcmp + (pvendor_ie->vend_hdr.oui, wmm_oui, + sizeof(pvendor_ie->vend_hdr.oui)) && + pvendor_ie->vend_hdr.oui_type == wmm_oui[3]) + break; + /* filter out wps ie */ + if ((!memcmp + (pvendor_ie->vend_hdr.oui, wps_oui, + sizeof(pvendor_ie->vend_hdr.oui)) && + pvendor_ie->vend_hdr.oui_type == wps_oui[3]) && + (wps_flag & IE_MASK_WPS)) + break; + /* filter out first p2p ie */ + if ((!memcmp + (pvendor_ie->vend_hdr.oui, p2p_oui, + sizeof(pvendor_ie->vend_hdr.oui)) && + pvendor_ie->vend_hdr.oui_type == p2p_oui[3])) { + if (!find_p2p_ie && (wps_flag & IE_MASK_P2P)) { + find_p2p_ie = MTRUE; + break; + } + } + /* filter out wfd ie */ + if ((!memcmp + (pvendor_ie->vend_hdr.oui, wfd_oui, + sizeof(pvendor_ie->vend_hdr.oui)) && + pvendor_ie->vend_hdr.oui_type == wfd_oui[3]) && + (wps_flag & IE_MASK_WFD)) + break; + memcpy(ie_out + out_len, pos, length + 2); + out_len += length + 2; + break; + default: + memcpy(ie_out + out_len, pos, length + 2); + out_len += length + 2; + break; + } + pos += (length + 2); + left_len -= (length + 2); + } + return out_len; +} + +#ifdef WIFI_DIRECT_SUPPORT +/** + * @brief Check if selected_registrar_on in wps_ie + * + * @param ie Pointer to IEs + * @param len Total length of ie + * + * @return MTRUE/MFALSE + */ +t_u8 +is_selected_registrar_on(const t_u8 *ie, int len) +{ +#define WPS_IE_FIX_LEN 6 +#define TLV_ID_SELECTED_REGISTRAR 0x1041 + int left_len = len - WPS_IE_FIX_LEN; + TLV_Generic_t *tlv = (TLV_Generic_t *)(ie + WPS_IE_FIX_LEN); + u16 tlv_type, tlv_len; + u8 *pos = NULL; + while (left_len > sizeof(TLV_Generic_t)) { + tlv_type = ntohs(tlv->type); + tlv_len = ntohs(tlv->len); + if (tlv_type == TLV_ID_SELECTED_REGISTRAR) { + PRINTM(MIOCTL, "Selected Registrar found !"); + pos = (u8 *)tlv + sizeof(TLV_Generic_t); + if (*pos == 1) + return MTRUE; + else + return MFALSE; + } + tlv = (TLV_Generic_t *)((u8 *)tlv + tlv_len + + sizeof(TLV_Generic_t)); + left_len -= tlv_len + sizeof(TLV_Generic_t); + } + return MFALSE; +} + +/** + * @brief Check if selected_registrar_on in ies + * + * @param ie Pointer to IEs + * @param len Total length of ie + * + * + * @return MTRUE/MFALSE + */ +static t_u16 +woal_is_selected_registrar_on(const t_u8 *ie, int len) +{ + int left_len = len; + const t_u8 *pos = ie; + int length; + t_u8 id = 0; + IEEEtypes_VendorSpecific_t *pvendor_ie = NULL; + const u8 wps_oui[4] = { 0x00, 0x50, 0xf2, 0x04 }; + + while (left_len >= 2) { + length = *(pos + 1); + id = *pos; + if ((length + 2) > left_len) + break; + switch (id) { + case VENDOR_SPECIFIC_221: + pvendor_ie = (IEEEtypes_VendorSpecific_t *)pos; + if (!memcmp + (pvendor_ie->vend_hdr.oui, wps_oui, + sizeof(pvendor_ie->vend_hdr.oui)) && + pvendor_ie->vend_hdr.oui_type == wps_oui[3]) { + PRINTM(MIOCTL, "Find WPS ie\n"); + return is_selected_registrar_on(pos, + length + 2); + } + break; + default: + break; + } + pos += (length + 2); + left_len -= (length + 2); + } + return MFALSE; +} +#endif + +/** + * @brief config AP or GO for mgmt frame ies. + * + * @param priv A pointer to moal private structure + * @param beacon_ies A pointer to beacon ies + * @param beacon_ies_len Beacon ies length + * @param proberesp_ies A pointer to probe resp ies + * @param proberesp_ies_len Probe resp ies length + * @param assocresp_ies A pointer to probe resp ies + * @param assocresp_ies_len Assoc resp ies length + * @param probereq_ies A pointer to probe req ies + * @param probereq_ies_len Probe req ies length * + * @param mask Mgmt frame mask + * @param wait_option wait_option + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_mgmt_frame_ie(moal_private *priv, + const t_u8 *beacon_ies, size_t beacon_ies_len, + const t_u8 *proberesp_ies, size_t proberesp_ies_len, + const t_u8 *assocresp_ies, size_t assocresp_ies_len, + const t_u8 *probereq_ies, size_t probereq_ies_len, + t_u16 mask, t_u8 wait_option) +{ + int ret = 0; + t_u8 *pos = NULL; + custom_ie *beacon_ies_data = NULL; + custom_ie *proberesp_ies_data = NULL; + custom_ie *assocresp_ies_data = NULL; + custom_ie *probereq_ies_data = NULL; + + /* static variables for mgmt frame ie auto-indexing */ + t_u16 beacon_index = priv->beacon_index; + t_u16 proberesp_index = priv->proberesp_index; + t_u16 assocresp_index = priv->assocresp_index; + t_u16 probereq_index = priv->probereq_index; + t_u16 beacon_wps_index = priv->beacon_wps_index; + t_u16 proberesp_p2p_index = priv->proberesp_p2p_index; + + ENTER(); + + if (mask & MGMT_MASK_BEACON_WPS_P2P) { + beacon_ies_data = kzalloc(sizeof(custom_ie), GFP_KERNEL); + if (!beacon_ies_data) { + ret = -ENOMEM; + goto done; + } + if (beacon_ies && beacon_ies_len) { +#ifdef WIFI_DIRECT_SUPPORT + if (woal_is_selected_registrar_on + (beacon_ies, beacon_ies_len)) { + PRINTM(MIOCTL, "selected_registrar is on\n"); + priv->phandle->is_go_timer_set = MTRUE; + woal_mod_timer(&priv->phandle->go_timer, + MOAL_TIMER_10S); + } else + PRINTM(MIOCTL, "selected_registrar is off\n"); +#endif + beacon_ies_data->ie_index = beacon_wps_index; + beacon_ies_data->mgmt_subtype_mask = MGMT_MASK_BEACON; + beacon_ies_data->ie_length = beacon_ies_len; + pos = beacon_ies_data->ie_buffer; + memcpy(pos, beacon_ies, beacon_ies_len); + } else { + /* clear the beacon wps ies */ + if (beacon_wps_index > MAX_MGMT_IE_INDEX) { + PRINTM(MERROR, + "Invalid beacon wps index for mgmt frame ie.\n"); + goto done; + } + + beacon_ies_data->ie_index = beacon_wps_index; + beacon_ies_data->mgmt_subtype_mask = + MLAN_CUSTOM_IE_DELETE_MASK; + beacon_ies_data->ie_length = 0; + beacon_wps_index = MLAN_CUSTOM_IE_AUTO_IDX_MASK; + } + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_custom_ie(priv, beacon_ies_data, + &beacon_wps_index, + proberesp_ies_data, + &proberesp_index, + assocresp_ies_data, + &assocresp_index, probereq_ies_data, + &probereq_index, wait_option)) { + PRINTM(MERROR, "Fail to set beacon wps IE\n"); + ret = -EFAULT; + } + priv->beacon_wps_index = beacon_wps_index; + PRINTM(MIOCTL, "beacon_wps_index=0x%x\n", beacon_wps_index); + goto done; + } + + if (mask & MGMT_MASK_BEACON) { + beacon_ies_data = kzalloc(sizeof(custom_ie), GFP_KERNEL); + if (!beacon_ies_data) { + ret = -ENOMEM; + goto done; + } + } + + if (mask & MGMT_MASK_PROBE_RESP) { + /** set or clear proberesp ie */ + if (proberesp_ies_len || + (!proberesp_ies_len && !beacon_ies_len)) { + proberesp_ies_data = + kzalloc(sizeof(custom_ie), GFP_KERNEL); + if (!proberesp_ies_data) { + ret = -ENOMEM; + goto done; + } + } + } + + if (mask & MGMT_MASK_ASSOC_RESP) { + /** set or clear assocresp ie */ + if (assocresp_ies_len || + (!assocresp_ies_len && !beacon_ies_len)) { + assocresp_ies_data = + kzalloc(sizeof(custom_ie), GFP_KERNEL); + if (!assocresp_ies_data) { + ret = -ENOMEM; + goto done; + } + } + } + if (mask & MGMT_MASK_PROBE_REQ) { + probereq_ies_data = kzalloc(sizeof(custom_ie), GFP_KERNEL); + if (!probereq_ies_data) { + ret = -ENOMEM; + goto done; + } + } + + if (beacon_ies_data) { + if (beacon_ies && beacon_ies_len) { + /* set the beacon ies */ + beacon_ies_data->ie_index = beacon_index; + beacon_ies_data->mgmt_subtype_mask = MGMT_MASK_BEACON | + MGMT_MASK_ASSOC_RESP | MGMT_MASK_PROBE_RESP; + beacon_ies_data->ie_length = + woal_filter_beacon_ies(beacon_ies, + beacon_ies_len, + beacon_ies_data-> + ie_buffer, + IE_MASK_WPS | IE_MASK_WFD + | IE_MASK_P2P, + proberesp_ies, + proberesp_ies_len); + } else { + /* clear the beacon ies */ + if (beacon_index > MAX_MGMT_IE_INDEX) { + PRINTM(MINFO, + "Invalid beacon index for mgmt frame ie.\n"); + goto done; + } + + beacon_ies_data->ie_index = beacon_index; + beacon_ies_data->mgmt_subtype_mask = + MLAN_CUSTOM_IE_DELETE_MASK; + beacon_ies_data->ie_length = 0; + beacon_index = MLAN_CUSTOM_IE_AUTO_IDX_MASK; + } + } + + if (proberesp_ies_data) { + if (proberesp_ies && proberesp_ies_len) { + /* set the probe response p2p ies */ + proberesp_ies_data->ie_index = proberesp_p2p_index; + proberesp_ies_data->mgmt_subtype_mask = + MGMT_MASK_PROBE_RESP; + proberesp_ies_data->ie_length = + woal_get_first_p2p_ie(proberesp_ies, + proberesp_ies_len, + proberesp_ies_data-> + ie_buffer); + } else { + /* clear the probe response p2p ies */ + if (proberesp_p2p_index > MAX_MGMT_IE_INDEX) { + PRINTM(MERROR, + "Invalid proberesp_p2p_index for mgmt frame ie.\n"); + goto done; + } + proberesp_ies_data->ie_index = proberesp_p2p_index; + proberesp_ies_data->mgmt_subtype_mask = + MLAN_CUSTOM_IE_DELETE_MASK; + proberesp_ies_data->ie_length = 0; + proberesp_p2p_index = MLAN_CUSTOM_IE_AUTO_IDX_MASK; + } + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_custom_ie(priv, NULL, &beacon_index, + proberesp_ies_data, + &proberesp_p2p_index, NULL, + &assocresp_index, NULL, + &probereq_index, wait_option)) { + PRINTM(MERROR, "Fail to set proberesp p2p IE\n"); + ret = -EFAULT; + goto done; + } + priv->proberesp_p2p_index = proberesp_p2p_index; + PRINTM(MIOCTL, "proberesp_p2p=0x%x\n", proberesp_p2p_index); + memset(proberesp_ies_data, 0x00, sizeof(custom_ie)); + if (proberesp_ies && proberesp_ies_len) { + /* set the probe response ies */ + proberesp_ies_data->ie_index = proberesp_index; + proberesp_ies_data->mgmt_subtype_mask = + MGMT_MASK_PROBE_RESP; + if (MLAN_CUSTOM_IE_AUTO_IDX_MASK == proberesp_index) + proberesp_ies_data->mgmt_subtype_mask |= + MLAN_CUSTOM_IE_NEW_MASK; + proberesp_ies_data->ie_length = + woal_filter_beacon_ies(proberesp_ies, + proberesp_ies_len, + proberesp_ies_data-> + ie_buffer, IE_MASK_P2P, + NULL, 0); + } else { + /* clear the probe response ies */ + if (proberesp_index > MAX_MGMT_IE_INDEX) { + PRINTM(MERROR, + "Invalid probe resp index for mgmt frame ie.\n"); + goto done; + } + proberesp_ies_data->ie_index = proberesp_index; + proberesp_ies_data->mgmt_subtype_mask = + MLAN_CUSTOM_IE_DELETE_MASK; + proberesp_ies_data->ie_length = 0; + proberesp_index = MLAN_CUSTOM_IE_AUTO_IDX_MASK; + } + } + if (assocresp_ies_data) { + if (assocresp_ies && assocresp_ies_len) { + /* set the assoc response ies */ + assocresp_ies_data->ie_index = assocresp_index; + assocresp_ies_data->mgmt_subtype_mask = + MGMT_MASK_ASSOC_RESP; + assocresp_ies_data->ie_length = assocresp_ies_len; + pos = assocresp_ies_data->ie_buffer; + memcpy(pos, assocresp_ies, assocresp_ies_len); + } else { + /* clear the assoc response ies */ + if (assocresp_index > MAX_MGMT_IE_INDEX) { + PRINTM(MERROR, + "Invalid assoc resp index for mgmt frame ie.\n"); + goto done; + } + + assocresp_ies_data->ie_index = assocresp_index; + assocresp_ies_data->mgmt_subtype_mask = + MLAN_CUSTOM_IE_DELETE_MASK; + assocresp_ies_data->ie_length = 0; + assocresp_index = MLAN_CUSTOM_IE_AUTO_IDX_MASK; + } + } + + if (probereq_ies_data) { + if (probereq_ies && probereq_ies_len) { + /* set the probe req ies */ + probereq_ies_data->ie_index = probereq_index; + probereq_ies_data->mgmt_subtype_mask = + MGMT_MASK_PROBE_REQ; +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (priv->bss_type != MLAN_BSS_TYPE_WIFIDIRECT) { + /* filter out P2P/WFD ie */ + probereq_ies_data->ie_length = + woal_filter_beacon_ies(probereq_ies, + probereq_ies_len, + probereq_ies_data-> + ie_buffer, + IE_MASK_P2P | + IE_MASK_WFD, + NULL, 0); + } else { +#endif /* KERNEL_VERSION */ +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ + probereq_ies_data->ie_length = probereq_ies_len; + pos = probereq_ies_data->ie_buffer; + memcpy(pos, probereq_ies, probereq_ies_len); +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + } +#endif /* KERNEL_VERSION */ +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ + } else { + /* clear the probe req ies */ + if (probereq_index > MAX_MGMT_IE_INDEX) { + PRINTM(MERROR, + "Invalid probe req index for mgmt frame ie.\n"); + goto done; + } + probereq_ies_data->ie_index = probereq_index; + probereq_ies_data->mgmt_subtype_mask = + MLAN_CUSTOM_IE_DELETE_MASK; + probereq_ies_data->ie_length = 0; + probereq_index = MLAN_CUSTOM_IE_AUTO_IDX_MASK; + } + } + + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_custom_ie(priv, beacon_ies_data, &beacon_index, + proberesp_ies_data, &proberesp_index, + assocresp_ies_data, &assocresp_index, + probereq_ies_data, &probereq_index, + wait_option)) { + PRINTM(MERROR, + "Fail to set beacon proberesp assoc probereq IES\n"); + ret = -EFAULT; + goto done; + } + if (beacon_ies_data) + priv->beacon_index = beacon_index; + if (assocresp_ies_data) + priv->assocresp_index = assocresp_index; + if (proberesp_ies_data) + priv->proberesp_index = proberesp_index; + if (probereq_ies_data) + priv->probereq_index = probereq_index; + PRINTM(MIOCTL, "beacon=%x assocresp=%x proberesp=%x probereq=%x\n", + beacon_index, assocresp_index, proberesp_index, probereq_index); +done: + kfree(beacon_ies_data); + kfree(proberesp_ies_data); + kfree(assocresp_ies_data); + kfree(probereq_ies_data); + + LEAVE(); + + return ret; +} + +/** + * @brief Sets up the CFG802.11 specific HT capability fields + * with default values + * + * @param ht_info A pointer to ieee80211_sta_ht_cap structure + * @param dev_cap Device capability informations + * @param mcs_set Device MCS sets + * + * @return N/A + */ +void +woal_cfg80211_setup_ht_cap(struct ieee80211_sta_ht_cap *ht_info, + t_u32 dev_cap, t_u8 *mcs_set) +{ + ENTER(); + + ht_info->ht_supported = true; + ht_info->ampdu_factor = 0x3; + ht_info->ampdu_density = 0; + + memset(&ht_info->mcs, 0, sizeof(ht_info->mcs)); + ht_info->cap = 0; + if (mcs_set) + memcpy(ht_info->mcs.rx_mask, mcs_set, + sizeof(ht_info->mcs.rx_mask)); + if (dev_cap & MBIT(8)) /* 40Mhz intolarance enabled */ + ht_info->cap |= IEEE80211_HT_CAP_40MHZ_INTOLERANT; + if (dev_cap & MBIT(17)) /* Channel width 20/40Mhz support */ + ht_info->cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40; + if ((dev_cap >> 20) & 0x03) /* Delayed ACK supported */ + ht_info->cap |= IEEE80211_HT_CAP_DELAY_BA; + if (dev_cap & MBIT(22)) /* Rx LDPC supported */ + ht_info->cap |= IEEE80211_HT_CAP_LDPC_CODING; + if (dev_cap & MBIT(23)) /* Short GI @ 20Mhz supported */ + ht_info->cap |= IEEE80211_HT_CAP_SGI_20; + if (dev_cap & MBIT(24)) /* Short GI @ 40Mhz supported */ + ht_info->cap |= IEEE80211_HT_CAP_SGI_40; + if (dev_cap & MBIT(25)) /* Tx STBC supported */ + ht_info->cap |= IEEE80211_HT_CAP_TX_STBC; + if (dev_cap & MBIT(26)) /* Rx STBC supported */ + ht_info->cap |= IEEE80211_HT_CAP_RX_STBC; + if (dev_cap & MBIT(27)) /* MIMO PS supported */ + ht_info->cap |= IEEE80211_HT_CAP_SM_PS; + if (dev_cap & MBIT(29)) /* Green field supported */ + ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD; + if (dev_cap & MBIT(31)) /* MAX AMSDU supported */ + ht_info->cap |= IEEE80211_HT_CAP_MAX_AMSDU; + ht_info->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED; + + LEAVE(); +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) +/** + * @brief Sets up the CFG802.11 specific VHT capability fields + * with default values + * + * @param priv A pointer to moal private structure + * @param vht_cap A pointer to ieee80211_sta_vht_cap structure + * + * @return N/A + */ +void +woal_cfg80211_setup_vht_cap(moal_private *priv, + struct ieee80211_sta_vht_cap *vht_cap) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_11ac_cfg *cfg_11ac = NULL; + mlan_status status; + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11ac_cfg)); + if (req == NULL) { + status = MLAN_STATUS_FAILURE; + PRINTM(MERROR, "Fail to allocate buf for setup vht_cap\n"); + goto done; + } + cfg_11ac = (mlan_ds_11ac_cfg *)req->pbuf; + cfg_11ac->sub_command = MLAN_OID_11AC_VHT_CFG; + req->req_id = MLAN_IOCTL_11AC_CFG; + req->action = MLAN_ACT_GET; + cfg_11ac->param.vht_cfg.band = BAND_SELECT_A; + cfg_11ac->param.vht_cfg.txrx = MLAN_RADIO_RX; + status = woal_request_ioctl(priv, req, MOAL_CMD_WAIT); + if (MLAN_STATUS_SUCCESS != status) { + PRINTM(MERROR, "Fail to get vht_cfg\n"); + goto done; + } + vht_cap->vht_supported = true; + vht_cap->cap = cfg_11ac->param.vht_cfg.vht_cap_info; + vht_cap->vht_mcs.rx_mcs_map = (t_u16)cfg_11ac->param.vht_cfg.vht_rx_mcs; + vht_cap->vht_mcs.rx_highest = + (t_u16)cfg_11ac->param.vht_cfg.vht_rx_max_rate; + vht_cap->vht_mcs.tx_mcs_map = (t_u16)cfg_11ac->param.vht_cfg.vht_tx_mcs; + vht_cap->vht_mcs.tx_highest = + (t_u16)cfg_11ac->param.vht_cfg.vht_tx_max_rate; + PRINTM(MCMND, + "vht_cap=0x%x rx_mcs_map=0x%x rx_max=0x%x tx_mcs_map=0x%x tx_max=0x%x\n", + vht_cap->cap, vht_cap->vht_mcs.rx_mcs_map, + vht_cap->vht_mcs.rx_highest, vht_cap->vht_mcs.tx_mcs_map, + vht_cap->vht_mcs.tx_highest); +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return; +} +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_cfg80211.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_cfg80211.h new file mode 100644 index 00000000..5838e403 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_cfg80211.h @@ -0,0 +1,365 @@ +/** @file moal_cfg80211.h + * + * @brief This file contains the CFG80211 specific defines. + * + * Copyright (C) 2011-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#ifndef _MOAL_CFG80211_H_ +#define _MOAL_CFG80211_H_ + +#include "moal_main.h" + +/* Clear all key indexes */ +#define KEY_INDEX_CLEAR_ALL (0x0000000F) + +/** RTS/FRAG disabled value */ +#define MLAN_FRAG_RTS_DISABLED (0xFFFFFFFF) + +#ifndef WLAN_CIPHER_SUITE_WAPI +#define WLAN_CIPHER_SUITE_WAPI 0x00000020 +#endif + +/* define for custom ie operation */ +#define MLAN_CUSTOM_IE_AUTO_IDX_MASK 0xffff +#define MLAN_CUSTOM_IE_DELETE_MASK 0x0 +#define MLAN_CUSTOM_IE_NEW_MASK 0x8000 +#define TLV_TYPE_MGMT_IE 0x0169 +#define MGMT_MASK_ASSOC_REQ 0x01 +#define MGMT_MASK_REASSOC_REQ 0x04 +#define MGMT_MASK_ASSOC_RESP 0x02 +#define MGMT_MASK_REASSOC_RESP 0x08 +#define MGMT_MASK_PROBE_REQ 0x10 +#define MGMT_MASK_PROBE_RESP 0x20 +#define MGMT_MASK_BEACON 0x100 +#define MGMT_MASK_BEACON_WPS_P2P 0x8000 +#define IE_MASK_WPS 0x0001 +#define IE_MASK_P2P 0x0002 +#define IE_MASK_WFD 0x0004 + +#define MRVL_PKT_TYPE_MGMT_FRAME 0xE5 + +/** + * If multiple wiphys are registered e.g. a regular netdev with + * assigned ieee80211_ptr and you won't know whether it points + * to a wiphy your driver has registered or not. Assign this to + * something global to your driver to help determine whether + * you own this wiphy or not. + */ +static const void *const mrvl_wiphy_privid = &mrvl_wiphy_privid; + +/* Get the private structure from wiphy */ +void *woal_get_wiphy_priv(struct wiphy *wiphy); + +/* Get the private structure from net device */ +void *woal_get_netdev_priv(struct net_device *dev); +#ifdef STA_SUPPORT +/** get scan interface */ +moal_private *woal_get_scan_interface(moal_handle *handle); +#endif + +t_u8 woal_band_cfg_to_ieee_band(t_u32 band); + +int woal_cfg80211_change_virtual_intf(struct wiphy *wiphy, + struct net_device *dev, + enum nl80211_iftype type, + u32 *flags, struct vif_params *params); + +int woal_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed); + +int woal_cfg80211_add_key(struct wiphy *wiphy, + struct net_device *dev, t_u8 key_index, +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) || defined(COMPAT_WIRELESS) + bool pairwise, +#endif + const t_u8 *mac_addr, struct key_params *params); + +int woal_cfg80211_del_key(struct wiphy *wiphy, + struct net_device *dev, t_u8 key_index, +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) || defined(COMPAT_WIRELESS) + bool pairwise, +#endif + const t_u8 *mac_addr); + +int woal_cfg80211_set_bitrate_mask(struct wiphy *wiphy, + struct net_device *dev, + const u8 *peer, + const struct cfg80211_bitrate_mask *mask); + +int woal_cfg80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant); + +#ifdef STA_CFG80211 +#ifdef STA_SUPPORT +int woal_set_rf_channel(moal_private *priv, + struct ieee80211_channel *chan, + enum nl80211_channel_type channel_type, + t_u8 wait_option); +mlan_status woal_inform_bss_from_scan_result(moal_private *priv, + mlan_ssid_bssid *ssid_bssid, + t_u8 wait_option); +#endif +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 5, 0) +int woal_cfg80211_set_channel(struct wiphy *wiphy, +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 34) || defined(COMPAT_WIRELESS) + struct net_device *dev, +#endif + struct ieee80211_channel *chan, + enum nl80211_channel_type channel_type); +#endif + +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) +int woal_cfg80211_set_default_key(struct wiphy *wiphy, + struct net_device *dev, t_u8 key_index, + bool ucast, bool mcast); +#else +int woal_cfg80211_set_default_key(struct wiphy *wiphy, + struct net_device *dev, t_u8 key_index); +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30) || defined(COMPAT_WIRELESS) +int woal_cfg80211_set_default_mgmt_key(struct wiphy *wiphy, + struct net_device *netdev, + t_u8 key_index); +#endif + +void woal_cfg80211_mgmt_frame_register(struct wiphy *wiphy, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) + struct wireless_dev *wdev, +#else + struct net_device *dev, +#endif + t_u16 frame_type, bool reg); + +int woal_cfg80211_mgmt_tx(struct wiphy *wiphy, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) + struct wireless_dev *wdev, +#else + struct net_device *dev, +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) + struct cfg80211_mgmt_tx_params *params, +#else + struct ieee80211_channel *chan, bool offchan, +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + enum nl80211_channel_type channel_type, + bool channel_type_valid, +#endif + unsigned int wait, const u8 *buf, size_t len, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) + bool no_cck, +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) + bool dont_wait_for_ack, +#endif +#endif + u64 * cookie); + +mlan_status woal_register_cfg80211(moal_private *priv); + +extern struct ieee80211_supported_band cfg80211_band_2ghz; +extern struct ieee80211_supported_band cfg80211_band_5ghz; +extern const u32 cfg80211_cipher_suites[10]; + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) +/**vendor event*/ +enum vendor_event { + event_hang = 0, + event_max, +}; +/**vendor sub command*/ +enum vendor_sub_command { + sub_cmd_set_drvdbg = 0, + sub_cmd_max, +}; +void woal_register_cfg80211_vendor_command(struct wiphy *wiphy); +int woal_cfg80211_vendor_event(IN moal_private *priv, + IN int event, IN t_u8 *data, IN int len); +#endif + +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) +int woal_cfg80211_bss_role_cfg(moal_private *priv, t_u16 action, + t_u8 *bss_role); +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0) +struct wireless_dev *woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, + const char *name, + enum nl80211_iftype type, + u32 *flags, + struct vif_params *params); +#else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) +struct wireless_dev *woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, + char *name, + enum nl80211_iftype type, + u32 *flags, + struct vif_params *params); +#else +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) +struct net_device *woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, + char *name, + enum nl80211_iftype type, + u32 *flags, + struct vif_params *params); +#else +int woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, + char *name, enum nl80211_iftype type, + u32 *flags, struct vif_params *params); +#endif +#endif +#endif +int woal_cfg80211_del_virt_if(struct wiphy *wiphy, struct net_device *dev); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) +int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy, + struct wireless_dev *wdev); +#else +int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy, struct net_device *dev); +#endif + +#if defined(WIFI_DIRECT_SUPPORT) +/* Group Owner Negotiation Req */ +#define P2P_GO_NEG_REQ 0 +/* Group Owner Negotiation Rsp */ +#define P2P_GO_NEG_RSP 1 +/* Group Owner Negotiation Confirm */ +#define P2P_GO_NEG_CONF 2 +/* P2P Invitation Request */ +#define P2P_INVITE_REQ 3 +/* P2P Invitation Response */ +#define P2P_INVITE_RSP 4 +/* Device Discoverability Request */ +#define P2P_DEVDIS_REQ 5 +/* Device Discoverability Response */ +#define P2P_DEVDIS_RSP 6 +/* Provision Discovery Request */ +#define P2P_PROVDIS_REQ 7 +/* Provision Discovery Response */ +#define P2P_PROVDIS_RSP 8 +/** P2P category */ +#define P2P_ACT_FRAME_CATEGORY 0x04 +/** P2P oui offset */ +#define P2P_ACT_FRAME_OUI_OFFSET 26 +/** P2P subtype offset */ +#define P2P_ACT_FRAME_OUI_SUBTYPE_OFFSET 30 +void woal_cfg80211_display_p2p_actframe(const t_u8 *buf, int len, + struct ieee80211_channel *chan, + const t_u8 flag); + +/** Define kernel version for wifi direct */ +#if !defined(COMPAT_WIRELESS) +#define WIFI_DIRECT_KERNEL_VERSION KERNEL_VERSION(2, 6, 39) +#else +#define WIFI_DIRECT_KERNEL_VERSION KERNEL_VERSION(2, 6, 33) +#endif /* COMPAT_WIRELESS */ +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION +/** Define for remain on channel duration timer */ +#define MAX_REMAIN_ON_CHANNEL_DURATION (1000) + +int woal_cfg80211_init_p2p_client(moal_private *priv); + +int woal_cfg80211_init_p2p_go(moal_private *priv); + +int woal_cfg80211_deinit_p2p(moal_private *priv); + +int woal_cfg80211_remain_on_channel_cfg(moal_private *priv, + t_u8 wait_option, t_u8 remove, + t_u8 *status, + struct ieee80211_channel *chan, + enum nl80211_channel_type channel_type, + t_u32 duration); +int woal_uap_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *mac, +#else + u8 *mac, +#endif + struct station_info *stainfo); + +void woal_remove_virtual_interface(moal_handle *handle); + +#endif /* KERNEL_VERSION */ +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ + +#ifdef UAP_CFG80211 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) +int woal_cfg80211_set_mac_acl(struct wiphy *wiphy, struct net_device *dev, + const struct cfg80211_acl_data *params); +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)|| defined(COMPAT_WIRELESS) +int woal_cfg80211_set_txq_params(struct wiphy *wiphy, struct net_device *dev, + struct ieee80211_txq_params *params); +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) +int woal_cfg80211_set_coalesce(struct wiphy *wiphy, + struct cfg80211_coalesce *coalesce); +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) +int woal_cfg80211_add_beacon(struct wiphy *wiphy, + struct net_device *dev, + struct cfg80211_ap_settings *params); + +int woal_cfg80211_set_beacon(struct wiphy *wiphy, + struct net_device *dev, + struct cfg80211_beacon_data *params); +#else +int woal_cfg80211_add_beacon(struct wiphy *wiphy, + struct net_device *dev, + struct beacon_parameters *params); + +int woal_cfg80211_set_beacon(struct wiphy *wiphy, + struct net_device *dev, + struct beacon_parameters *params); +#endif + +int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev); +int woal_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) + struct station_del_parameters *param); +#else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *mac_addr); +#else + u8 *mac_addr); +#endif +#endif +#endif /* UAP_CFG80211 */ + +void woal_clear_all_mgmt_ies(moal_private *priv, t_u8 wait_option); +int woal_cfg80211_mgmt_frame_ie(moal_private *priv, + const t_u8 *beacon_ies, size_t beacon_ies_len, + const t_u8 *proberesp_ies, + size_t proberesp_ies_len, + const t_u8 *assocresp_ies, + size_t assocresp_ies_len, + const t_u8 *probereq_ies, + size_t probereq_ies_len, t_u16 mask, + t_u8 wait_option); + +int woal_get_active_intf_freq(moal_private *priv); + +void woal_cfg80211_setup_ht_cap(struct ieee80211_sta_ht_cap *ht_info, + t_u32 dev_cap, t_u8 *mcs_set); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) +void woal_cfg80211_setup_vht_cap(moal_private *priv, + struct ieee80211_sta_vht_cap *vht_cap); +#endif +int woal_cfg80211_assoc(moal_private *priv, void *sme, t_u8 wait_option); + +#endif /* _MOAL_CFG80211_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_debug.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_debug.c new file mode 100644 index 00000000..f783487f --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_debug.c @@ -0,0 +1,1157 @@ +/** @file moal_debug.c + * + * @brief This file contains functions for debug proc file. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/******************************************************** +Change log: + 11/03/2008: initial version +********************************************************/ + +#include "moal_main.h" + +/******************************************************** + Global Variables +********************************************************/ +/** MLAN debug info */ +extern mlan_debug_info info; + +/******************************************************** + Local Variables +********************************************************/ +#ifdef CONFIG_PROC_FS + +/** Get info item size */ +#define item_size(n) (sizeof(info.n)) +/** Get info item address */ +#define item_addr(n) ((t_ptr) &(info.n)) + +/** Get moal_private member size */ +#define item_priv_size(n) (sizeof((moal_private *)0)->n) +/** Get moal_private member address */ +#define item_priv_addr(n) ((t_ptr) &((moal_private *)0)->n) + +/** Get moal_handle member size */ +#define item_handle_size(n) (sizeof((moal_handle *)0)->n) +/** Get moal_handle member address */ +#define item_handle_addr(n) ((t_ptr) &((moal_handle *)0)->n) + +#ifdef STA_SUPPORT +static struct debug_data items[] = { +#ifdef DEBUG_LEVEL1 + {"drvdbg", sizeof(drvdbg), (t_ptr)&drvdbg}, +#endif + {"wmm_ac_vo", item_size(wmm_ac_vo), item_addr(wmm_ac_vo)}, + {"wmm_ac_vi", item_size(wmm_ac_vi), item_addr(wmm_ac_vi)}, + {"wmm_ac_be", item_size(wmm_ac_be), item_addr(wmm_ac_be)}, + {"wmm_ac_bk", item_size(wmm_ac_bk), item_addr(wmm_ac_bk)}, + {"max_tx_buf_size", item_size(max_tx_buf_size), + item_addr(max_tx_buf_size)}, + {"tx_buf_size", item_size(tx_buf_size), item_addr(tx_buf_size)}, + {"curr_tx_buf_size", item_size(curr_tx_buf_size), + item_addr(curr_tx_buf_size)}, + {"ps_mode", item_size(ps_mode), item_addr(ps_mode)}, + {"ps_state", item_size(ps_state), item_addr(ps_state)}, + {"is_deep_sleep", item_size(is_deep_sleep), item_addr(is_deep_sleep)}, + {"wakeup_dev_req", item_size(pm_wakeup_card_req), + item_addr(pm_wakeup_card_req)}, + {"wakeup_tries", item_size(pm_wakeup_fw_try), + item_addr(pm_wakeup_fw_try)}, + {"hs_configured", item_size(is_hs_configured), + item_addr(is_hs_configured)}, + {"hs_activated", item_size(hs_activated), item_addr(hs_activated)}, + {"rx_pkts_queued", item_size(rx_pkts_queued), + item_addr(rx_pkts_queued)}, + {"tx_pkts_queued", item_size(tx_pkts_queued), + item_addr(tx_pkts_queued)}, + {"pps_uapsd_mode", item_size(pps_uapsd_mode), + item_addr(pps_uapsd_mode)}, + {"sleep_pd", item_size(sleep_pd), item_addr(sleep_pd)}, + {"qos_cfg", item_size(qos_cfg), item_addr(qos_cfg)}, + {"tx_lock_flag", item_size(tx_lock_flag), item_addr(tx_lock_flag)}, + {"port_open", item_size(port_open), item_addr(port_open)}, + {"bypass_pkt_count", item_size(bypass_pkt_count), + item_addr(bypass_pkt_count)}, + {"scan_processing", item_size(scan_processing), + item_addr(scan_processing)}, + {"num_tx_timeout", item_size(num_tx_timeout), + item_addr(num_tx_timeout)}, + {"num_cmd_timeout", item_size(num_cmd_timeout), + item_addr(num_cmd_timeout)}, + {"dbg.num_cmd_timeout", item_size(dbg_num_cmd_timeout), + item_addr(dbg_num_cmd_timeout)}, + {"timeout_cmd_id", item_size(timeout_cmd_id), + item_addr(timeout_cmd_id)}, + {"timeout_cmd_act", item_size(timeout_cmd_act), + item_addr(timeout_cmd_act)}, + {"last_cmd_id", item_size(last_cmd_id), item_addr(last_cmd_id)}, + {"last_cmd_act", item_size(last_cmd_act), item_addr(last_cmd_act)}, + {"last_cmd_index", item_size(last_cmd_index), + item_addr(last_cmd_index)}, + {"last_cmd_resp_id", item_size(last_cmd_resp_id), + item_addr(last_cmd_resp_id)}, + {"last_cmd_resp_index", item_size(last_cmd_resp_index), + item_addr(last_cmd_resp_index)}, + {"last_event", item_size(last_event), item_addr(last_event)}, + {"last_event_index", item_size(last_event_index), + item_addr(last_event_index)}, + {"num_no_cmd_node", item_size(num_no_cmd_node), + item_addr(num_no_cmd_node)}, + {"num_cmd_h2c_fail", item_size(num_cmd_host_to_card_failure), + item_addr(num_cmd_host_to_card_failure)}, + {"num_cmd_sleep_cfm_fail", + item_size(num_cmd_sleep_cfm_host_to_card_failure), + item_addr(num_cmd_sleep_cfm_host_to_card_failure)}, + {"num_tx_h2c_fail", item_size(num_tx_host_to_card_failure), + item_addr(num_tx_host_to_card_failure)}, + {"num_cmdevt_c2h_fail", item_size(num_cmdevt_card_to_host_failure), + item_addr(num_cmdevt_card_to_host_failure)}, + {"num_rx_c2h_fail", item_size(num_rx_card_to_host_failure), + item_addr(num_rx_card_to_host_failure)}, + {"num_int_read_fail", item_size(num_int_read_failure), + item_addr(num_int_read_failure)}, + {"last_int_status", item_size(last_int_status), + item_addr(last_int_status)}, + {"num_of_irq", item_size(num_of_irq), item_addr(num_of_irq)}, + {"mp_invalid_update", item_size(mp_invalid_update), + item_addr(mp_invalid_update)}, +#ifdef SDIO_MULTI_PORT_TX_AGGR + {"mpa_sent_last_pkt", item_size(mpa_sent_last_pkt), + item_addr(mpa_sent_last_pkt)}, + {"mpa_sent_no_ports", item_size(mpa_sent_no_ports), + item_addr(mpa_sent_no_ports)}, +#endif + {"num_evt_deauth", item_size(num_event_deauth), + item_addr(num_event_deauth)}, + {"num_evt_disassoc", item_size(num_event_disassoc), + item_addr(num_event_disassoc)}, + {"num_evt_link_lost", item_size(num_event_link_lost), + item_addr(num_event_link_lost)}, + {"num_cmd_deauth", item_size(num_cmd_deauth), + item_addr(num_cmd_deauth)}, + {"num_cmd_assoc_ok", item_size(num_cmd_assoc_success), + item_addr(num_cmd_assoc_success)}, + {"num_cmd_assoc_fail", item_size(num_cmd_assoc_failure), + item_addr(num_cmd_assoc_failure)}, + {"cmd_sent", item_size(cmd_sent), item_addr(cmd_sent)}, + {"data_sent", item_size(data_sent), item_addr(data_sent)}, + {"mp_rd_bitmap", item_size(mp_rd_bitmap), item_addr(mp_rd_bitmap)}, + {"curr_rd_port", item_size(curr_rd_port), item_addr(curr_rd_port)}, + {"mp_wr_bitmap", item_size(mp_wr_bitmap), item_addr(mp_wr_bitmap)}, + {"curr_wr_port", item_size(curr_wr_port), item_addr(curr_wr_port)}, + {"cmd_resp_received", item_size(cmd_resp_received), + item_addr(cmd_resp_received)}, + {"event_received", item_size(event_received), + item_addr(event_received)}, + + {"ioctl_pending", item_handle_size(ioctl_pending), + item_handle_addr(ioctl_pending)}, + {"tx_pending", item_handle_size(tx_pending), + item_handle_addr(tx_pending)}, + {"rx_pending", item_handle_size(rx_pending), + item_handle_addr(rx_pending)}, + {"lock_count", item_handle_size(lock_count), + item_handle_addr(lock_count)}, + {"malloc_count", item_handle_size(malloc_count), + item_handle_addr(malloc_count)}, + {"vmalloc_count", item_handle_size(vmalloc_count), + item_handle_addr(vmalloc_count)}, + {"mbufalloc_count", item_handle_size(mbufalloc_count), + item_handle_addr(mbufalloc_count)}, + {"main_state", item_handle_size(main_state), + item_handle_addr(main_state)}, + {"driver_state", item_handle_size(driver_state), + item_handle_addr(driver_state)}, +#ifdef SDIO_MMC_DEBUG + {"sdiocmd53w", item_handle_size(cmd53w), item_handle_addr(cmd53w)}, + {"sdiocmd53r", item_handle_size(cmd53r), item_handle_addr(cmd53r)}, +#endif +#if defined(SDIO_SUSPEND_RESUME) + {"hs_skip_count", item_handle_size(hs_skip_count), + item_handle_addr(hs_skip_count)}, + {"hs_force_count", item_handle_size(hs_force_count), + item_handle_addr(hs_force_count)}, +#endif +}; + +#endif + +#ifdef UAP_SUPPORT +static struct debug_data uap_items[] = { +#ifdef DEBUG_LEVEL1 + {"drvdbg", sizeof(drvdbg), (t_ptr)&drvdbg}, +#endif + {"wmm_ac_vo", item_size(wmm_ac_vo), item_addr(wmm_ac_vo)}, + {"wmm_ac_vi", item_size(wmm_ac_vi), item_addr(wmm_ac_vi)}, + {"wmm_ac_be", item_size(wmm_ac_be), item_addr(wmm_ac_be)}, + {"wmm_ac_bk", item_size(wmm_ac_bk), item_addr(wmm_ac_bk)}, + {"max_tx_buf_size", item_size(max_tx_buf_size), + item_addr(max_tx_buf_size)}, + {"tx_buf_size", item_size(tx_buf_size), item_addr(tx_buf_size)}, + {"curr_tx_buf_size", item_size(curr_tx_buf_size), + item_addr(curr_tx_buf_size)}, + {"ps_mode", item_size(ps_mode), item_addr(ps_mode)}, + {"ps_state", item_size(ps_state), item_addr(ps_state)}, + {"wakeup_dev_req", item_size(pm_wakeup_card_req), + item_addr(pm_wakeup_card_req)}, + {"wakeup_tries", item_size(pm_wakeup_fw_try), + item_addr(pm_wakeup_fw_try)}, + {"hs_configured", item_size(is_hs_configured), + item_addr(is_hs_configured)}, + {"hs_activated", item_size(hs_activated), item_addr(hs_activated)}, + {"rx_pkts_queued", item_size(rx_pkts_queued), + item_addr(rx_pkts_queued)}, + {"tx_pkts_queued", item_size(tx_pkts_queued), + item_addr(tx_pkts_queued)}, + {"bypass_pkt_count", item_size(bypass_pkt_count), + item_addr(bypass_pkt_count)}, + {"num_bridge_pkts", item_size(num_bridge_pkts), + item_addr(num_bridge_pkts)}, + {"num_drop_pkts", item_size(num_drop_pkts), item_addr(num_drop_pkts)}, + {"num_tx_timeout", item_size(num_tx_timeout), + item_addr(num_tx_timeout)}, + {"num_cmd_timeout", item_size(num_cmd_timeout), + item_addr(num_cmd_timeout)}, + {"timeout_cmd_id", item_size(timeout_cmd_id), + item_addr(timeout_cmd_id)}, + {"timeout_cmd_act", item_size(timeout_cmd_act), + item_addr(timeout_cmd_act)}, + {"last_cmd_id", item_size(last_cmd_id), item_addr(last_cmd_id)}, + {"last_cmd_act", item_size(last_cmd_act), item_addr(last_cmd_act)}, + {"last_cmd_index", item_size(last_cmd_index), + item_addr(last_cmd_index)}, + {"last_cmd_resp_id", item_size(last_cmd_resp_id), + item_addr(last_cmd_resp_id)}, + {"last_cmd_resp_index", item_size(last_cmd_resp_index), + item_addr(last_cmd_resp_index)}, + {"last_event", item_size(last_event), item_addr(last_event)}, + {"last_event_index", item_size(last_event_index), + item_addr(last_event_index)}, + {"num_no_cmd_node", item_size(num_no_cmd_node), + item_addr(num_no_cmd_node)}, + {"num_cmd_h2c_fail", item_size(num_cmd_host_to_card_failure), + item_addr(num_cmd_host_to_card_failure)}, + {"num_cmd_sleep_cfm_fail", + item_size(num_cmd_sleep_cfm_host_to_card_failure), + item_addr(num_cmd_sleep_cfm_host_to_card_failure)}, + {"num_tx_h2c_fail", item_size(num_tx_host_to_card_failure), + item_addr(num_tx_host_to_card_failure)}, + {"num_cmdevt_c2h_fail", item_size(num_cmdevt_card_to_host_failure), + item_addr(num_cmdevt_card_to_host_failure)}, + {"num_rx_c2h_fail", item_size(num_rx_card_to_host_failure), + item_addr(num_rx_card_to_host_failure)}, + {"num_int_read_fail", item_size(num_int_read_failure), + item_addr(num_int_read_failure)}, + {"last_int_status", item_size(last_int_status), + item_addr(last_int_status)}, + {"num_of_irq", item_size(num_of_irq), item_addr(num_of_irq)}, + {"mp_invalid_update", item_size(mp_invalid_update), + item_addr(mp_invalid_update)}, +#ifdef SDIO_MULTI_PORT_TX_AGGR + {"mpa_sent_last_pkt", item_size(mpa_sent_last_pkt), + item_addr(mpa_sent_last_pkt)}, + {"mpa_sent_no_ports", item_size(mpa_sent_no_ports), + item_addr(mpa_sent_no_ports)}, +#endif + {"cmd_sent", item_size(cmd_sent), item_addr(cmd_sent)}, + {"data_sent", item_size(data_sent), item_addr(data_sent)}, + {"mp_rd_bitmap", item_size(mp_rd_bitmap), item_addr(mp_rd_bitmap)}, + {"curr_rd_port", item_size(curr_rd_port), item_addr(curr_rd_port)}, + {"mp_wr_bitmap", item_size(mp_wr_bitmap), item_addr(mp_wr_bitmap)}, + {"curr_wr_port", item_size(curr_wr_port), item_addr(curr_wr_port)}, + {"cmd_resp_received", item_size(cmd_resp_received), + item_addr(cmd_resp_received)}, + {"event_received", item_size(event_received), + item_addr(event_received)}, + + {"ioctl_pending", item_handle_size(ioctl_pending), + item_handle_addr(ioctl_pending)}, + {"tx_pending", item_handle_size(tx_pending), + item_handle_addr(tx_pending)}, + {"rx_pending", item_handle_size(rx_pending), + item_handle_addr(rx_pending)}, + {"lock_count", item_handle_size(lock_count), + item_handle_addr(lock_count)}, + {"malloc_count", item_handle_size(malloc_count), + item_handle_addr(malloc_count)}, + {"vmalloc_count", item_handle_size(vmalloc_count), + item_handle_addr(vmalloc_count)}, + {"mbufalloc_count", item_handle_size(mbufalloc_count), + item_handle_addr(mbufalloc_count)}, + {"main_state", item_handle_size(main_state), + item_handle_addr(main_state)}, + {"driver_state", item_handle_size(driver_state), + item_handle_addr(driver_state)}, +#ifdef SDIO_MMC_DEBUG + {"sdiocmd53w", item_handle_size(cmd53w), item_handle_addr(cmd53w)}, + {"sdiocmd53r", item_handle_size(cmd53r), item_handle_addr(cmd53r)}, +#endif +#if defined(SDIO_SUSPEND_RESUME) + {"hs_skip_count", item_handle_size(hs_skip_count), + item_handle_addr(hs_skip_count)}, + {"hs_force_count", item_handle_size(hs_force_count), + item_handle_addr(hs_force_count)}, +#endif +}; +#endif /* UAP_SUPPORT */ + +/** + * @brief This function reset histogram data + * + * @param priv A pointer to moal_private + * + * @return N/A + */ +void +woal_hist_do_reset(void *data) +{ + hgm_data *phist_data = (hgm_data *)data; + int ix; + + if (!phist_data) + return; + atomic_set(&(phist_data->num_samples), 0); + for (ix = 0; ix < RX_RATE_MAX; ix++) + atomic_set(&(phist_data->rx_rate[ix]), 0); + for (ix = 0; ix < SNR_MAX; ix++) + atomic_set(&(phist_data->snr[ix]), 0); + for (ix = 0; ix < NOISE_FLR_MAX; ix++) + atomic_set(&(phist_data->noise_flr[ix]), 0); + for (ix = 0; ix < SIG_STRENGTH_MAX; ix++) + atomic_set(&(phist_data->sig_str[ix]), 0); +} + /** + * @brief This function reset all histogram data + * + * @param priv A pointer to moal_private + * + * @return N/A + */ +void +woal_hist_data_reset(moal_private *priv) +{ + int i = 0; + for(i = 0; i < priv->phandle->histogram_table_num; i++) + woal_hist_do_reset(priv->hist_data[i]); +} +/** + * @brief This function reset histogram data according to antenna + * + * @param priv A pointer to moal_private + * + * @return N/A + */ +void +woal_hist_reset_table(moal_private *priv, t_u8 antenna) +{ + hgm_data *phist_data = priv->hist_data[antenna]; + + woal_hist_do_reset(phist_data); +} + + +/** + * @brief This function set histogram data + * + * @param priv A pointer to moal_private + * @param rx_rate rx rate + * @param snr snr + * @param nflr NF + * + * @return N/A + */ +static void +woal_hist_data_set(moal_private *priv, t_u8 rx_rate, t_s8 snr, t_s8 nflr, + t_u8 antenna) +{ + hgm_data *phist_data = priv->hist_data[antenna]; + + atomic_inc(&(phist_data->num_samples)); + atomic_inc(&(phist_data->rx_rate[rx_rate])); + atomic_inc(&(phist_data->snr[snr])); + atomic_inc(&(phist_data->noise_flr[128 + nflr])); + atomic_inc(&(phist_data->sig_str[nflr - snr])); +} + +/** + * @brief This function add histogram data + * + * @param priv A pointer to moal_private + * @param rx_rate rx rate + * @param snr snr + * @param nflr NF + * + * @return N/A + */ +void +woal_hist_data_add(moal_private *priv, t_u8 rx_rate, t_s8 snr, t_s8 nflr, + t_u8 antenna) +{ + hgm_data *phist_data = NULL; + unsigned long curr_size; + + if((antenna + 1) > priv->phandle->histogram_table_num) + antenna = 0; + phist_data = priv->hist_data[antenna]; + curr_size = atomic_read(&(phist_data->num_samples)); + if (curr_size > HIST_MAX_SAMPLES) + woal_hist_reset_table(priv, antenna); + woal_hist_data_set(priv, rx_rate, snr, nflr, antenna); +} + +#define MAX_MCS_NUM_SUPP 16 +#define MAX_MCS_NUM_AC 10 +#define RATE_INDEX_MCS0 12 +/** + * @brief histogram info in proc + * + * @param sfp pointer to seq_file structure + * @param data + * + * @return Number of output data or MLAN_STATUS_FAILURE + */ +static int +woal_histogram_info(struct seq_file *sfp, void *data) +{ + hgm_data *phist_data = (hgm_data *)data; + int i = 0; + int value = 0; + t_bool sgi_enable = 0; + t_u8 bw = 0; + t_u8 mcs_index = 0; + t_u8 nss = 0; + + ENTER(); + if (MODULE_GET == 0) { + LEAVE(); + return -EFAULT; + } + + seq_printf(sfp, "total samples = %d \n", + atomic_read(&(phist_data->num_samples))); + seq_printf(sfp, "rx rates (in Mbps):\n"); + seq_printf(sfp, "\t0-3: B-MCS 0-3\n"); + seq_printf(sfp, "\t4-11: G-MCS 0-7\n"); + seq_printf(sfp, + "\t12-27: N-MCS 0-15(BW20) 28-43: N-MCS 0-15(BW40)\n"); + seq_printf(sfp, + "\t44-59: N-MCS 0-15(BW20:SGI) 60-75: N-MCS 0-15(BW40:SGI)\n"); + seq_printf(sfp, + "\t76-85: AC-MCS 0-9(VHT:BW20:NSS1) 86-95: AC-MCS 0-9(VHT:BW20:NSS2)\n"); + seq_printf(sfp, + "\t96-105: AC-MCS 0-9(VHT:BW40:NSS1) 106-115: AC-MCS 0-9(VHT:BW40:NSS2)\n"); + seq_printf(sfp, + "\t116-125: AC-MCS 0-9(VHT:BW80:NSS1) 126-135: AC-MCS 0-9(VHT:BW80:NSS2)\n"); + seq_printf(sfp, + "\t136-145: AC-MCS 0-9(VHT:BW20:NSS1:SGI) 146-155: AC-MCS 0-9(VHT:BW20:NSS2:SGI)\n"); + seq_printf(sfp, + "\t156-165: AC-MCS 0-9(VHT:BW40:NSS1:SGI) 166-175: AC-MCS 0-9(VHT:BW40:NSS2:SGI)\n"); + seq_printf(sfp, + "\t176-185: AC-MCS 0-9(VHT:BW80:NSS1:SGI) 186-195: AC-MCS 0-9(VHT:BW80:NSS2:SGI)\n\n"); + + for (i = 0; i < RX_RATE_MAX; i++) { + value = atomic_read(&(phist_data->rx_rate[i])); + if (value) { + if (i <= 11) + seq_printf(sfp, "rx_rate[%03d] = %d\n", i, + value); + else if (i <= 75) { + sgi_enable = (i - 12) / (MAX_MCS_NUM_SUPP * 2); // 0:LGI, + // 1:SGI + bw = ((i - 12) % (MAX_MCS_NUM_SUPP * 2)) / MAX_MCS_NUM_SUPP; // 0:20MHz, + // 1:40MHz + mcs_index = (i - 12) % MAX_MCS_NUM_SUPP; + seq_printf(sfp, + "rx_rate[%03d] = %d (MCS:%d HT BW:%dMHz%s)\n", + i, value, mcs_index, (1 << bw) * 20, + sgi_enable ? " SGI" : ""); + } else if (i <= 195) { + sgi_enable = (i - 76) / (MAX_MCS_NUM_AC * 6); // 0:LGI, + // 1:SGI + bw = ((i - 76) % (MAX_MCS_NUM_AC * 6)) / (MAX_MCS_NUM_AC * 2); // 0:20MHz, + // 1:40MHz, + // 2:80MHz + nss = (((i - 76) % (MAX_MCS_NUM_AC * 6)) % (MAX_MCS_NUM_AC * 2)) / MAX_MCS_NUM_AC; // 0:NSS1, + // 1:NSS2 + mcs_index = (i - 76) % MAX_MCS_NUM_AC; + + seq_printf(sfp, + "rx_rate[%03d] = %d (MCS:%d VHT BW:%dMHz NSS:%d%s)\n", + i, value, mcs_index, (1 << bw) * 20, + nss + 1, sgi_enable ? " SGI" : ""); + } + } + } + for (i = 0; i < SNR_MAX; i++) { + value = atomic_read(&(phist_data->snr[i])); + if (value) + seq_printf(sfp, "snr[%02ddB] = %d\n", i, value); + } + for (i = 0; i < NOISE_FLR_MAX; i++) { + value = atomic_read(&(phist_data->noise_flr[i])); + if (value) + seq_printf(sfp, "noise_flr[-%02ddBm] = %d\n", + (int)(i - 128), value); + } + for (i = 0; i < SIG_STRENGTH_MAX; i++) { + value = atomic_read(&(phist_data->sig_str[i])); + if (value) + seq_printf(sfp, "sig_strength[-%02ddBm] = %d\n", i, + value); + } + + MODULE_PUT; + LEAVE(); + return 0; +} + +/** + * @brief Proc read function for histogram + * + * @param sfp pointer to seq_file structure + * @param data + * + * @return Number of output data or MLAN_STATUS_FAILURE + */ +static int +woal_histogram_read(struct seq_file *sfp, void *data) +{ + wlan_hist_proc_data *hist_data = (wlan_hist_proc_data *) sfp->private; + moal_private *priv = (moal_private *)hist_data->priv; + + ENTER(); + if (!priv){ + LEAVE(); + return -EFAULT; + } + + if(!priv->hist_data){ + LEAVE(); + return -EFAULT; + } + if (hist_data->ant_idx < priv->phandle->histogram_table_num) + woal_histogram_info(sfp, priv->hist_data[hist_data->ant_idx]); + + LEAVE(); + return 0; +} + +static int +woal_histogram_proc_open(struct inode *inode, struct file *file) +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) + return single_open(file, woal_histogram_read, PDE_DATA(inode)); +#else + return single_open(file, woal_histogram_read, PDE(inode)->data); +#endif +} + +/** + * @brief Proc write function for histogram + * + * @param f file pointer + * @param buf pointer to data buffer + * @param count data number to write + * @param off Offset + * + * @return number of data + */ +static ssize_t +woal_histogram_write(struct file *f, const char __user * buf, size_t count, + loff_t * off) +{ + struct seq_file *sfp = f->private_data; + wlan_hist_proc_data *hist_data = (wlan_hist_proc_data *) sfp->private; + moal_private *priv = (moal_private *)hist_data->priv; + woal_hist_reset_table(priv, hist_data->ant_idx); + return count; +} + +/** + * @brief Proc read function for log + * + * @param sfp pointer to seq_file structure + * @param data + * + * @return Number of output data or MLAN_STATUS_FAILURE + */ +static int +woal_log_read(struct seq_file *sfp, void *data) +{ +#ifdef STA_SUPPORT + moal_private *priv = (moal_private *)sfp->private; + mlan_ds_get_stats stats; + ENTER(); + if (!priv) { + LEAVE(); + return -EFAULT; + } + if (MODULE_GET == 0) { + LEAVE(); + return -EFAULT; + } + if (GET_BSS_ROLE(priv) != MLAN_BSS_ROLE_STA) { + MODULE_PUT; + LEAVE(); + return 0; + } + + memset(&stats, 0x00, sizeof(stats)); + if (MLAN_STATUS_SUCCESS != + woal_get_stats_info(priv, MOAL_PROC_WAIT, &stats)) { + PRINTM(MERROR, + "woal_log_read: Get log: Failed to get stats info!"); + MODULE_PUT; + LEAVE(); + return -EFAULT; + } + + seq_printf(sfp, "mcasttxframe = %d\n", stats.mcast_tx_frame); + seq_printf(sfp, "failed = %d\n", stats.failed); + seq_printf(sfp, "retry = %d\n", stats.retry); + seq_printf(sfp, "multiretry = %d\n", stats.multi_retry); + seq_printf(sfp, "framedup = %d\n", stats.frame_dup); + seq_printf(sfp, "rtssuccess = %d\n", stats.rts_success); + seq_printf(sfp, "rtsfailure = %d\n", stats.rts_failure); + seq_printf(sfp, "ackfailure = %d\n", stats.ack_failure); + seq_printf(sfp, "rxfrag = %d\n", stats.rx_frag); + seq_printf(sfp, "mcastrxframe = %d\n", stats.mcast_rx_frame); + seq_printf(sfp, "fcserror = %d\n", stats.fcs_error); + seq_printf(sfp, "txframe = %d\n", stats.tx_frame); + seq_printf(sfp, "wepicverrcnt-1 = %d\n", stats.wep_icv_error[0]); + seq_printf(sfp, "wepicverrcnt-2 = %d\n", stats.wep_icv_error[1]); + seq_printf(sfp, "wepicverrcnt-3 = %d\n", stats.wep_icv_error[2]); + seq_printf(sfp, "wepicverrcnt-4 = %d\n", stats.wep_icv_error[3]); + seq_printf(sfp, "beacon_rcnt = %d\n", stats.bcn_rcv_cnt); + seq_printf(sfp, "beacon_mcnt = %d\n", stats.bcn_miss_cnt); + + MODULE_PUT; +#endif + LEAVE(); + return 0; +} + +/** + * @brief Proc read function for log + * + * @param inode pointer to inode + * @param file file pointer + * + * @return number of data + */ +static int +woal_log_proc_open(struct inode *inode, struct file *file) +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) + return single_open(file, woal_log_read, PDE_DATA(inode)); +#else + return single_open(file, woal_log_read, PDE(inode)->data); +#endif +} + +/******************************************************** + Local Functions +********************************************************/ +/** + * @brief Proc read function + * + * @param sfp pointer to seq_file structure + * @param data + * + * @return Number of output data or MLAN_STATUS_FAILURE + */ +static int +woal_debug_read(struct seq_file *sfp, void *data) +{ + int val = 0; + unsigned int i; + + struct debug_data_priv *items_priv = + (struct debug_data_priv *)sfp->private; + struct debug_data *d = items_priv->items; + moal_private *priv = items_priv->priv; +#ifdef SDIO_MULTI_PORT_TX_AGGR + unsigned int j; + t_u8 mp_aggr_pkt_limit = 0; +#endif + + ENTER(); + + if (priv == NULL) { + LEAVE(); + return -EFAULT; + } + + if (MODULE_GET == 0) { + LEAVE(); + return -EFAULT; + } + + priv->phandle->driver_state = woal_check_driver_status(priv->phandle); + /* Get debug information */ + if (woal_get_debug_info(priv, MOAL_PROC_WAIT, &info)) + goto exit; + + for (i = 0; i < (unsigned int)items_priv->num_of_items; i++) { + if (d[i].size == 1) + val = *((t_u8 *)d[i].addr); + else if (d[i].size == 2) + val = *((t_u16 *)d[i].addr); + else if (d[i].size == 4) + val = *((t_ptr *)d[i].addr); + else { + unsigned int j; + seq_printf(sfp, "%s=", d[i].name); + for (j = 0; j < d[i].size; j += 2) { + val = *(t_u16 *)(d[i].addr + j); + seq_printf(sfp, "0x%x ", val); + } + seq_printf(sfp, "\n"); + continue; + } + if (strstr(d[i].name, "id") + || strstr(d[i].name, "bitmap") + ) + seq_printf(sfp, "%s=0x%x\n", d[i].name, val); + else + seq_printf(sfp, "%s=%d\n", d[i].name, val); + } +#ifdef SDIO_MULTI_PORT_TX_AGGR + mp_aggr_pkt_limit = info.mp_aggr_pkt_limit; + seq_printf(sfp, "last_recv_wr_bitmap=0x%x last_mp_index=%d\n", + info.last_recv_wr_bitmap, info.last_mp_index); + for (i = 0; i < SDIO_MP_DBG_NUM; i++) { + seq_printf(sfp, + "mp_wr_bitmap: 0x%x mp_wr_ports=0x%x len=%d curr_wr_port=0x%x\n", + info.last_mp_wr_bitmap[i], info.last_mp_wr_ports[i], + info.last_mp_wr_len[i], info.last_curr_wr_port[i]); + for (j = 0; j < mp_aggr_pkt_limit; j++) { + seq_printf(sfp, "0x%02x ", + info.last_mp_wr_info[i * mp_aggr_pkt_limit + + j]); + } + seq_printf(sfp, "\n"); + } + seq_printf(sfp, "SDIO MPA Tx: "); + for (i = 0; i < mp_aggr_pkt_limit; i++) + seq_printf(sfp, "%d ", info.mpa_tx_count[i]); + seq_printf(sfp, "\n"); +#endif +#ifdef SDIO_MULTI_PORT_RX_AGGR + seq_printf(sfp, "SDIO MPA Rx: "); + for (i = 0; i < mp_aggr_pkt_limit; i++) + seq_printf(sfp, "%d ", info.mpa_rx_count[i]); + seq_printf(sfp, "\n"); +#endif + seq_printf(sfp, "SDIO MP Update: "); + for (i = 0; i < (mp_aggr_pkt_limit * 2); i++) + seq_printf(sfp, "%d ", info.mp_update[i]); + seq_printf(sfp, "\n"); + seq_printf(sfp, "tcp_ack_drop_cnt=%d\n", priv->tcp_ack_drop_cnt); + seq_printf(sfp, "tcp_ack_cnt=%d\n", priv->tcp_ack_cnt); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + for (i = 0; i < 4; i++) + seq_printf(sfp, "wmm_tx_pending[%d]:%d\n", i, + atomic_read(&priv->wmm_tx_pending[i])); +#endif + if (info.tx_tbl_num) { + seq_printf(sfp, "Tx BA stream table:\n"); + for (i = 0; i < info.tx_tbl_num; i++) { + seq_printf(sfp, + "tid = %d, ra = %02x:%02x:%02x:%02x:%02x:%02x amsdu=%d\n", + (int)info.tx_tbl[i].tid, + info.tx_tbl[i].ra[0], info.tx_tbl[i].ra[1], + info.tx_tbl[i].ra[2], info.tx_tbl[i].ra[3], + info.tx_tbl[i].ra[4], info.tx_tbl[i].ra[5], + (int)info.tx_tbl[i].amsdu); + } + } + if (info.rx_tbl_num) { + seq_printf(sfp, "Rx reorder table:\n"); + for (i = 0; i < info.rx_tbl_num; i++) { + unsigned int j; + + seq_printf(sfp, + "tid = %d, ta = %02x:%02x:%02x:%02x:%02x:%02x, start_win = %d, " + "win_size = %d, amsdu=%d\n", + (int)info.rx_tbl[i].tid, + info.rx_tbl[i].ta[0], info.rx_tbl[i].ta[1], + info.rx_tbl[i].ta[2], info.rx_tbl[i].ta[3], + info.rx_tbl[i].ta[4], info.rx_tbl[i].ta[5], + (int)info.rx_tbl[i].start_win, + (int)info.rx_tbl[i].win_size, + (int)info.rx_tbl[i].amsdu); + seq_printf(sfp, "buffer: "); + for (j = 0; j < info.rx_tbl[i].win_size; j++) { + if (info.rx_tbl[i].buffer[j] == MTRUE) + seq_printf(sfp, "1 "); + else + seq_printf(sfp, "0 "); + } + seq_printf(sfp, "\n"); + } + } + for (i = 0; i < info.ralist_num; i++) { + seq_printf(sfp, + "ralist ra: %02x:%02x:%02x:%02x:%02x:%02x tid=%d pkts=%d pause=%d\n", + info.ralist[i].ra[0], info.ralist[i].ra[1], + info.ralist[i].ra[2], info.ralist[i].ra[3], + info.ralist[i].ra[4], info.ralist[i].ra[5], + info.ralist[i].tid, info.ralist[i].total_pkts, + info.ralist[i].tx_pause); + } + + for (i = 0; i < info.tdls_peer_num; i++) { + unsigned int j; + seq_printf(sfp, + "tdls peer: %02x:%02x:%02x:%02x:%02x:%02x snr=%d nf=%d\n", + info.tdls_peer_list[i].mac_addr[0], + info.tdls_peer_list[i].mac_addr[1], + info.tdls_peer_list[i].mac_addr[2], + info.tdls_peer_list[i].mac_addr[3], + info.tdls_peer_list[i].mac_addr[4], + info.tdls_peer_list[i].mac_addr[5], + info.tdls_peer_list[i].snr, + -info.tdls_peer_list[i].nf); + seq_printf(sfp, "htcap: "); + for (j = 0; j < sizeof(IEEEtypes_HTCap_t); j++) + seq_printf(sfp, "%02x ", + info.tdls_peer_list[i].ht_cap[j]); + seq_printf(sfp, "\nExtcap: "); + for (j = 0; j < sizeof(IEEEtypes_ExtCap_t); j++) + seq_printf(sfp, "%02x ", + info.tdls_peer_list[i].ext_cap[j]); + seq_printf(sfp, "\n"); + seq_printf(sfp, "vhtcap: "); + for (j = 0; j < sizeof(IEEEtypes_VHTCap_t); j++) + seq_printf(sfp, "%02x ", + info.tdls_peer_list[i].vht_cap[j]); + seq_printf(sfp, "\n"); + } +exit: + MODULE_PUT; + LEAVE(); + return 0; +} + +/** + * @brief Proc write function + * + * @param f file pointer + * @param buf pointer to data buffer + * @param count data number to write + * @param off Offset + * + * @return number of data + */ +static ssize_t +woal_debug_write(struct file *f, const char __user * buf, size_t count, + loff_t * off) +{ + int r, i; + char *pdata; + char *p; + char *p0; + char *p1; + char *p2; + struct seq_file *sfp = f->private_data; + struct debug_data_priv *items_priv = + (struct debug_data_priv *)sfp->private; + struct debug_data *d = items_priv->items; + moal_private *priv = items_priv->priv; +#ifdef DEBUG_LEVEL1 + t_u32 last_drvdbg = drvdbg; +#endif + gfp_t flag; + + ENTER(); + + if (MODULE_GET == 0) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + pdata = kzalloc(count + 1, flag); + if (pdata == NULL) { + MODULE_PUT; + LEAVE(); + return 0; + } + + if (copy_from_user(pdata, buf, count)) { + PRINTM(MERROR, "Copy from user failed\n"); + kfree(pdata); + MODULE_PUT; + LEAVE(); + return 0; + } + + if (woal_get_debug_info(priv, MOAL_PROC_WAIT, &info)) { + kfree(pdata); + MODULE_PUT; + LEAVE(); + return 0; + } + + p0 = pdata; + for (i = 0; i < items_priv->num_of_items; i++) { + do { + p = strstr(p0, d[i].name); + if (p == NULL) + break; + p1 = strchr(p, '\n'); + if (p1 == NULL) + break; + p0 = p1++; + p2 = strchr(p, '='); + if (!p2) + break; + p2++; + r = woal_string_to_number(p2); + if (d[i].size == 1) + *((t_u8 *)d[i].addr) = (t_u8)r; + else if (d[i].size == 2) + *((t_u16 *)d[i].addr) = (t_u16)r; + else if (d[i].size == 4) + *((t_ptr *)d[i].addr) = (t_ptr)r; + break; + } while (MTRUE); + } + kfree(pdata); + +#ifdef DEBUG_LEVEL1 + if (last_drvdbg != drvdbg) + woal_set_drvdbg(priv, drvdbg); + +#endif + MODULE_PUT; + LEAVE(); + return count; +} + +static int +woal_debug_proc_open(struct inode *inode, struct file *file) +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) + return single_open(file, woal_debug_read, PDE_DATA(inode)); +#else + return single_open(file, woal_debug_read, PDE(inode)->data); +#endif +} + +static const struct file_operations debug_proc_fops = { + .owner = THIS_MODULE, + .open = woal_debug_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, + .write = woal_debug_write, +}; + +static const struct file_operations histogram_proc_fops = { + .owner = THIS_MODULE, + .open = woal_histogram_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, + .write = woal_histogram_write, +}; + +static const struct file_operations log_proc_fops = { + .owner = THIS_MODULE, + .open = woal_log_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +/******************************************************** + Global Functions +********************************************************/ +/** + * @brief Create debug proc file + * + * @param priv A pointer to a moal_private structure + * + * @return N/A + */ +void +woal_debug_entry(moal_private *priv) +{ + struct proc_dir_entry *r; + int i; + int handle_items; + char hist_entry[50]; + + ENTER(); + + if (priv->proc_entry == NULL) { + LEAVE(); + return; + } +#ifdef STA_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) { + priv->items_priv.items = kmalloc(sizeof(items), GFP_KERNEL); + if (!priv->items_priv.items) { + PRINTM(MERROR, + "Failed to allocate memory for debug data\n"); + LEAVE(); + return; + } + memcpy(priv->items_priv.items, items, sizeof(items)); + priv->items_priv.num_of_items = ARRAY_SIZE(items); + } +#endif +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + priv->items_priv.items = kmalloc(sizeof(uap_items), GFP_KERNEL); + if (!priv->items_priv.items) { + PRINTM(MERROR, + "Failed to allocate memory for debug data\n"); + LEAVE(); + return; + } + memcpy(priv->items_priv.items, uap_items, sizeof(uap_items)); + priv->items_priv.num_of_items = ARRAY_SIZE(uap_items); + } +#endif + + priv->items_priv.priv = priv; + handle_items = 9; +#ifdef SDIO_MMC_DEBUG + handle_items += 2; +#endif +#if defined(SDIO_SUSPEND_RESUME) + handle_items += 2; +#endif + for (i = 1; i <= handle_items; i++) + priv->items_priv.items[priv->items_priv.num_of_items - + i].addr += (t_ptr)(priv->phandle); + + /* Create proc entry */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + r = proc_create_data("debug", 0644, priv->proc_entry, &debug_proc_fops, + &priv->items_priv); + if (r == NULL) +#else + r = create_proc_entry("debug", 0644, priv->proc_entry); + if (r) { + r->data = &priv->items_priv; + r->proc_fops = &debug_proc_fops; + } else +#endif + { + PRINTM(MMSG, "Fail to create proc debug entry\n"); + LEAVE(); + return; + } + if (priv->bss_type == MLAN_BSS_TYPE_STA || + priv->bss_type == MLAN_BSS_TYPE_UAP) { + priv->hist_entry = proc_mkdir("histogram", priv->proc_entry); + if (!priv->hist_entry) { + PRINTM(MERROR, "Fail to mkdir histogram!\n"); + LEAVE(); + return; + } + for (i = 0; i < priv->phandle->histogram_table_num; i++) { + priv->hist_proc[i].ant_idx = i; + priv->hist_proc[i].priv = priv; + snprintf(hist_entry, sizeof(hist_entry), "wlan-ant%d", + i); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + r = proc_create_data(hist_entry, 0664, priv->hist_entry, + &histogram_proc_fops, + &priv->hist_proc[i]); + if (r == NULL) +#else + r = create_proc_entry("histogram", 0664, + priv->hist_entry); + if (r) { + r->data = &priv->hist_proc[i]; + r->proc_fops = &histogram_proc_fops; + } else +#endif + { + PRINTM(MMSG, + "Fail to create proc histogram entry %s\n", + hist_entry); + LEAVE(); + return; + } + r->uid = 0; + r->gid = 1008; // wifi group + } + } + + if (priv->bss_type == MLAN_BSS_TYPE_STA || + priv->bss_type == MLAN_BSS_TYPE_UAP) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + r = proc_create_data("log", 0644, priv->proc_entry, + &log_proc_fops, priv); + if (r == NULL) +#else + r = create_proc_entry("log", 0644, priv->proc_entry); + if (r) { + r->data = priv; + r->proc_fops = &log_proc_fops; + } else +#endif + { + PRINTM(MMSG, "Fail to create proc log entry\n"); + LEAVE(); + return; + } + } + + LEAVE(); +} + +/** + * @brief Remove proc file + * + * @param priv A pointer to a moal_private structure + * + * @return N/A + */ +void +woal_debug_remove(moal_private *priv) +{ + char hist_entry[50]; + int i; + ENTER(); + + kfree(priv->items_priv.items); + /* Remove proc entry */ + remove_proc_entry("debug", priv->proc_entry); + if (priv->bss_type == MLAN_BSS_TYPE_STA || + priv->bss_type == MLAN_BSS_TYPE_UAP) { + for (i = 0; i < priv->phandle->histogram_table_num; i++) { + snprintf(hist_entry, sizeof(hist_entry), "wlan-ant%d", + i); + remove_proc_entry(hist_entry, priv->hist_entry); + } + remove_proc_entry("histogram", priv->proc_entry); + } + if (priv->bss_type == MLAN_BSS_TYPE_STA || + priv->bss_type == MLAN_BSS_TYPE_UAP) + remove_proc_entry("log", priv->proc_entry); + + LEAVE(); +} +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_eth_ioctl.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_eth_ioctl.c new file mode 100644 index 00000000..ace10d22 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_eth_ioctl.c @@ -0,0 +1,11833 @@ +/** @file moal_eth_ioctl.c + * + * @brief This file contains private ioctl functions + * + * Copyright (C) 2014-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/************************************************************************ +Change log: + 01/05/2012: initial version +************************************************************************/ + +#include "moal_main.h" +#include "moal_eth_ioctl.h" +#include "mlan_ioctl.h" +#if defined(STA_WEXT) || defined(UAP_WEXT) +#include "moal_priv.h" +#endif + +#if defined(STA_CFG80211) || defined(UAP_CFG80211) +#include "moal_cfg80211.h" +#endif +#ifdef UAP_SUPPORT +#include "moal_uap.h" +#endif +#include "moal_sdio.h" +/******************************************************** + Local Variables +********************************************************/ + +/** Bands supported in Infra mode */ +static t_u8 SupportedInfraBand[] = { + BAND_B, + BAND_B | BAND_G, BAND_G, + BAND_GN, BAND_B | BAND_G | BAND_GN, BAND_G | BAND_GN, + BAND_A, BAND_B | BAND_A, BAND_B | BAND_G | BAND_A, BAND_G | BAND_A, + BAND_A | BAND_B | BAND_G | BAND_AN | BAND_GN, + BAND_A | BAND_G | BAND_AN | BAND_GN, BAND_A | BAND_AN, + BAND_GN | BAND_GAC, BAND_B | BAND_G | BAND_GN | BAND_GAC, + BAND_G | BAND_GN | BAND_GAC, + BAND_A | BAND_B | BAND_G | BAND_AN | BAND_GN | BAND_AAC | BAND_GAC, + BAND_A | BAND_G | BAND_AN | BAND_GN | BAND_AAC, + BAND_A | BAND_AN | BAND_AAC, +}; + +/** Bands supported in Ad-Hoc mode */ +static t_u8 SupportedAdhocBand[] = { + BAND_B, BAND_B | BAND_G, BAND_G, + BAND_GN, BAND_B | BAND_G | BAND_GN, BAND_G | BAND_GN, + BAND_GN | BAND_GAC, BAND_B | BAND_G | BAND_GN | BAND_GAC, + BAND_G | BAND_GN | BAND_GAC, + BAND_A, + BAND_AN, BAND_A | BAND_AN, + BAND_AN | BAND_AAC, BAND_A | BAND_AN | BAND_AAC, +}; + +/******************************************************** + Global Variables +********************************************************/ +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) +#ifdef UAP_SUPPORT +/** Network device handlers for uAP */ +extern const struct net_device_ops woal_uap_netdev_ops; +#endif +#ifdef STA_SUPPORT +/** Network device handlers for STA */ +extern const struct net_device_ops woal_netdev_ops; +#endif +#endif +extern int cfg80211_wext; + +extern int hw_test; +/******************************************************** + Local Functions +********************************************************/ +/** + * @brief Parse a string to extract numerical arguments + * + * @param pos Pointer to the arguments string + * @param data Pointer to the arguments buffer + * @param datalen Length of the arguments buffer + * @param user_data_len Pointer to the number of arguments extracted + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +parse_arguments(t_u8 *pos, int *data, int datalen, int *user_data_len) +{ + unsigned int i, j, k; + char cdata[10]; + int is_hex = 0; + + if (strlen(pos) == 0) { + *user_data_len = 0; + return MLAN_STATUS_SUCCESS; + } + + memset(cdata, 0, sizeof(cdata)); + for (i = 0, j = 0, k = 0; i <= strlen(pos); i++) { + if ((k == 0) && (i <= (strlen(pos) - 2))) { + if ((pos[i] == '0') && (pos[i + 1] == 'x')) { + is_hex = 1; + i = i + 2; + } + } + if (pos[i] == '\0' || pos[i] == ' ') { + if (j >= datalen) { + j++; + break; + } + if (is_hex) { + data[j] = woal_atox(cdata); + is_hex = 0; + } else { + woal_atoi(&data[j], cdata); + } + j++; + k = 0; + memset(cdata, 0, sizeof(cdata)); + if (pos[i] == '\0') + break; + } else { + cdata[k] = pos[i]; + k++; + } + } + + *user_data_len = j; + return MLAN_STATUS_SUCCESS; +} + +#if defined(STA_CFG80211) && defined(UAP_CFG80211) +/** + * @brief Set wps & p2p ie in AP mode + * + * @param priv Pointer to priv stucture + * @param ie Pointer to ies data + * @param len Length of data + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_set_ap_wps_p2p_ie(moal_private *priv, t_u8 *ie, size_t len) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u8 *pos = ie; + t_u32 ie_len; + + ENTER(); + + ie_len = len - 2; + if (ie_len <= 0) { + PRINTM(MERROR, "IE len error: %d\n", ie_len); + ret = -EFAULT; + goto done; + } + + /* Android cmd format: "SET_AP_WPS_P2P_IE 1" -- beacon IE + "SET_AP_WPS_P2P_IE 2" -- proberesp IE "SET_AP_WPS_P2P_IE 4" -- + assocresp IE */ + if (*pos == '1') { + /* set the beacon wps/p2p ies */ + pos += 2; + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_mgmt_frame_ie(priv, pos, ie_len, NULL, 0, + NULL, 0, NULL, 0, + MGMT_MASK_BEACON_WPS_P2P, + MOAL_IOCTL_WAIT)) { + PRINTM(MERROR, "Failed to set beacon wps/p2p ie\n"); + ret = -EFAULT; + goto done; + } + } else if (*pos == '2') { + /* set the probe resp ies */ + pos += 2; + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_mgmt_frame_ie(priv, NULL, 0, pos, ie_len, + NULL, 0, NULL, 0, + MGMT_MASK_PROBE_RESP, + MOAL_IOCTL_WAIT)) { + PRINTM(MERROR, "Failed to set probe resp ie\n"); + ret = -EFAULT; + goto done; + } + } else if (*pos == '4') { + /* set the assoc resp ies */ + pos += 2; + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_mgmt_frame_ie(priv, NULL, 0, NULL, 0, pos, + ie_len, NULL, 0, + MGMT_MASK_ASSOC_RESP, + MOAL_IOCTL_WAIT)) { + PRINTM(MERROR, "Failed to set assoc resp ie\n"); + ret = -EFAULT; + goto done; + } + } + +done: + LEAVE(); + return ret; +} +#endif + +#ifdef WIFI_DIRECT_SUPPORT +#if defined(STA_CFG80211) || defined(UAP_CFG80211) +/** + * @brief Set miracast mode + * + * @param priv Pointer to priv stucture + * @param pdata Pointer to cmd buffer + * @param len Length of data + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_set_miracast_mode(moal_private *priv, t_u8 *pdata, size_t len) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u8 *pos = pdata; + + ENTER(); + if (!pos) { + PRINTM(MERROR, "%s: Null buf!\n", __func__); + ret = MLAN_STATUS_FAILURE; + goto done; + } + while (!isdigit(*pos) && --len > 0) + pos++; + switch (*pos) { + case '0': + /* disable miracast mode */ + priv->phandle->miracast_mode = 0; + break; + case '1': + /* Source */ + priv->phandle->miracast_mode = 1; + break; + case '2': + /* Sink */ + priv->phandle->miracast_mode = 2; + break; + default: + PRINTM(MERROR, "%s: Unknown miracast mode (%c)\n", + priv->netdev->name, *pos); + ret = MLAN_STATUS_FAILURE; + break; + } +done: + LEAVE(); + return ret; +} +#endif +#endif + +/** + * @brief Get Driver Version + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_get_priv_driver_version(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) +{ + int len = 0, ret = -1; + char buf[MLAN_MAX_VER_STR_LEN]; + + ENTER(); + + if (!respbuf) { + LEAVE(); + return 0; + } + + memset(buf, 0, sizeof(buf)); + + /* Get version string to local buffer */ + woal_get_version(priv->phandle, buf, sizeof(buf) - 1); + len = strlen(buf); + + if (len) { + /* Copy back the retrieved version string */ + PRINTM(MINFO, "MOAL VERSION: %s\n", buf); + ret = MIN(len, (respbuflen - 1)); + memcpy(respbuf, buf, ret); + } else { + ret = -1; + PRINTM(MERROR, "Get version failed!\n"); + } + + LEAVE(); + return ret; +} + +/** + * @brief Hostcmd interface from application + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * @param wait_option Wait option + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_hostcmd(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen, + t_u8 wait_option) +{ + int ret = 0; + t_u8 *data_ptr; + t_u32 buf_len = 0; + HostCmd_Header cmd_header; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *misc_cfg = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + data_ptr = respbuf + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_HOSTCMD)); + buf_len = *((t_u32 *)data_ptr); + memcpy(&cmd_header, data_ptr + sizeof(buf_len), sizeof(HostCmd_Header)); + + PRINTM(MINFO, "Host command len = %d\n", + woal_le16_to_cpu(cmd_header.size)); + if (woal_le16_to_cpu(cmd_header.size) > MLAN_SIZE_OF_CMD_BUFFER) { + LEAVE(); + return -EINVAL; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto error; + } + misc_cfg = (mlan_ds_misc_cfg *)req->pbuf; + misc_cfg->sub_command = MLAN_OID_MISC_HOST_CMD; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = MLAN_ACT_SET; + misc_cfg->param.hostcmd.len = woal_le16_to_cpu(cmd_header.size); + /* get the whole command */ + memcpy(misc_cfg->param.hostcmd.cmd, data_ptr + sizeof(buf_len), + misc_cfg->param.hostcmd.len); + + status = woal_request_ioctl(priv, req, wait_option); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto error; + } + memcpy(data_ptr + sizeof(buf_len), misc_cfg->param.hostcmd.cmd, + misc_cfg->param.hostcmd.len); + ret = misc_cfg->param.hostcmd.len + sizeof(buf_len) + + strlen(CMD_MARVELL) + strlen(PRIV_CMD_HOSTCMD); + memcpy(data_ptr, (t_u8 *)&ret, sizeof(t_u32)); + +error: + if (status != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} + +/** + * @brief Custom IE setting + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_customie(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + t_u8 *data_ptr; + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_misc_cfg *misc = NULL; + mlan_ds_misc_custom_ie *custom_ie = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + data_ptr = respbuf + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_CUSTOMIE)); + + custom_ie = (mlan_ds_misc_custom_ie *)data_ptr; + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; + misc->sub_command = MLAN_OID_MISC_CUSTOM_IE; + ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; + if ((custom_ie->len == 0)||(custom_ie->len == + sizeof(custom_ie->ie_data_list[0]. + ie_index))) + ioctl_req->action = MLAN_ACT_GET; + else + ioctl_req->action = MLAN_ACT_SET; + + memcpy(&misc->param.cust_ie, custom_ie, sizeof(mlan_ds_misc_custom_ie)); + + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + custom_ie = (mlan_ds_misc_custom_ie *)data_ptr; + memcpy(custom_ie, &misc->param.cust_ie, sizeof(mlan_ds_misc_custom_ie)); + ret = sizeof(mlan_ds_misc_custom_ie); + if (ioctl_req->status_code == MLAN_ERROR_IOCTL_FAIL) { + /* send a separate error code to indicate error from driver */ + ret = EFAULT; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Band and Adhoc-band setting + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_setget_priv_bandcfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + unsigned int i; + int data[4]; + int user_data_len = 0; + t_u32 infra_band = 0; + t_u32 adhoc_band = 0; + t_u32 adhoc_channel = 0; + t_u32 adhoc_chan_bandwidth = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_radio_cfg *radio_cfg = NULL; + mlan_ds_band_cfg *band_cfg = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (strlen(respbuf) == (strlen(CMD_MARVELL) + strlen(PRIV_CMD_BANDCFG))) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_BANDCFG), data, + ARRAY_SIZE(data), &user_data_len); + } + + if (sizeof(int) * user_data_len > sizeof(data)) { + PRINTM(MERROR, "Too many arguments\n"); + LEAVE(); + return -EINVAL; + } + + if (user_data_len > 0) { + if (priv->media_connected == MTRUE) { + LEAVE(); + return -EOPNOTSUPP; + } + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_radio_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto error; + } + radio_cfg = (mlan_ds_radio_cfg *)req->pbuf; + radio_cfg->sub_command = MLAN_OID_BAND_CFG; + req->req_id = MLAN_IOCTL_RADIO_CFG; + + if (user_data_len == 0) { + /* Get config_bands, adhoc_start_band and adhoc_channel values + from MLAN */ + req->action = MLAN_ACT_GET; + } else { + /* To support only */ + infra_band = data[0]; + for (i = 0; i < sizeof(SupportedInfraBand); i++) + if (infra_band == SupportedInfraBand[i]) + break; + if (i == sizeof(SupportedInfraBand)) { + ret = -EINVAL; + goto error; + } + + /* Set Adhoc band */ + if (user_data_len >= 2) { + adhoc_band = data[1]; + for (i = 0; i < sizeof(SupportedAdhocBand); i++) + if (adhoc_band == SupportedAdhocBand[i]) + break; + if (i == sizeof(SupportedAdhocBand)) { + ret = -EINVAL; + goto error; + } + } + + /* Set Adhoc channel */ + if (user_data_len >= 3) { + adhoc_channel = data[2]; + if (adhoc_channel == 0) { + /* Check if specified adhoc channel is non-zero + */ + ret = -EINVAL; + goto error; + } + } + if (user_data_len == 4) { + if (!(adhoc_band & (BAND_GN + | BAND_GAC | BAND_AN | BAND_AAC))) { + PRINTM(MERROR, + "11n is not enabled for adhoc, can not set HT/VHT channel bandwidth\n"); + ret = -EINVAL; + goto error; + } + adhoc_chan_bandwidth = data[3]; + /* sanity test */ + if ((adhoc_chan_bandwidth != CHANNEL_BW_20MHZ) && + (adhoc_chan_bandwidth != CHANNEL_BW_40MHZ_ABOVE) && + (adhoc_chan_bandwidth != CHANNEL_BW_40MHZ_BELOW) + && (adhoc_chan_bandwidth != CHANNEL_BW_80MHZ) + ) { + PRINTM(MERROR, + "Invalid secondary channel bandwidth, only allowed 0, 1, 3 or 4\n"); + ret = -EINVAL; + goto error; + } + + /* VHT 80 MHz is valid only for 5G band */ + if ((adhoc_chan_bandwidth == CHANNEL_BW_80MHZ) && + ((adhoc_band & BAND_AAC) == 0)) { + PRINTM(MERROR, + "Invalid adhoc band for 11ac 80 Mhz, only 5G is allowed.\n"); + ret = -EINVAL; + goto error; + } + } + /* Set config_bands and adhoc_start_band values to MLAN */ + req->action = MLAN_ACT_SET; + radio_cfg->param.band_cfg.config_bands = infra_band; + radio_cfg->param.band_cfg.adhoc_start_band = adhoc_band; + radio_cfg->param.band_cfg.adhoc_channel = adhoc_channel; + radio_cfg->param.band_cfg.adhoc_chan_bandwidth = + adhoc_chan_bandwidth; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto error; + } + + band_cfg = (mlan_ds_band_cfg *)respbuf; + + memcpy(band_cfg, &radio_cfg->param.band_cfg, sizeof(mlan_ds_band_cfg)); + + ret = sizeof(mlan_ds_band_cfg); + +error: + if (status != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get 11n configurations + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_setget_priv_httxcfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + t_u32 data[2]; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + int ret = 0; + int user_data_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (strlen(respbuf) == (strlen(CMD_MARVELL) + strlen(PRIV_CMD_HTTXCFG))) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_HTTXCFG), data, + ARRAY_SIZE(data), &user_data_len); + } + + if (user_data_len > 2) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_TX; + req->req_id = MLAN_IOCTL_11N_CFG; + + if (user_data_len == 0) { + /* Get 11n tx parameters from MLAN */ + req->action = MLAN_ACT_GET; + cfg_11n->param.tx_cfg.misc_cfg = BAND_SELECT_BG; + } else { + cfg_11n->param.tx_cfg.httxcap = data[0]; + PRINTM(MINFO, "SET: httxcap:0x%x\n", data[0]); + cfg_11n->param.tx_cfg.misc_cfg = BAND_SELECT_BOTH; + if (user_data_len == 2) { + if (data[1] != BAND_SELECT_BG && + data[1] != BAND_SELECT_A && + data[1] != BAND_SELECT_BOTH) { + PRINTM(MERROR, "Invalid band selection\n"); + ret = -EINVAL; + goto done; + } + cfg_11n->param.tx_cfg.misc_cfg = data[1]; + PRINTM(MINFO, "SET: httxcap band:0x%x\n", data[1]); + } + /* Update 11n tx parameters in MLAN */ + req->action = MLAN_ACT_SET; + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + data[0] = cfg_11n->param.tx_cfg.httxcap; + PRINTM(MINFO, "GET: httxcap:0x%x\n", data[0]); + + if (req->action == MLAN_ACT_GET) { + cfg_11n->param.tx_cfg.httxcap = 0; + cfg_11n->param.tx_cfg.misc_cfg = BAND_SELECT_A; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + data[1] = cfg_11n->param.tx_cfg.httxcap; + PRINTM(MINFO, "GET: httxcap for 5GHz:0x%x\n", data[1]); + } + + memcpy(respbuf, data, sizeof(data)); + ret = sizeof(data); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get 11n capability information + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_setget_priv_htcapinfo(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data[2]; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + woal_ht_cap_info *ht_cap = NULL; + int ret = 0; + int user_data_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (strlen(respbuf) == + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_HTCAPINFO))) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_HTCAPINFO), data, + ARRAY_SIZE(data), &user_data_len); + } + + if (user_data_len > 2) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_HTCAP_CFG; + req->req_id = MLAN_IOCTL_11N_CFG; + + if (user_data_len == 0) { + /* Get 11n tx parameters from MLAN */ + req->action = MLAN_ACT_GET; + cfg_11n->param.htcap_cfg.misc_cfg = BAND_SELECT_BG; + } else { + cfg_11n->param.htcap_cfg.htcap = data[0]; + PRINTM(MINFO, "SET: htcapinfo:0x%x\n", data[0]); + cfg_11n->param.htcap_cfg.misc_cfg = BAND_SELECT_BOTH; + if (user_data_len == 2) { + if (data[1] != BAND_SELECT_BG && + data[1] != BAND_SELECT_A && + data[1] != BAND_SELECT_BOTH) { + PRINTM(MERROR, "Invalid band selection\n"); + ret = -EINVAL; + goto done; + } + cfg_11n->param.htcap_cfg.misc_cfg = data[1]; + PRINTM(MINFO, "SET: htcapinfo band:0x%x\n", data[1]); + } + /* Update 11n tx parameters in MLAN */ + req->action = MLAN_ACT_SET; + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + data[0] = cfg_11n->param.htcap_cfg.htcap; + PRINTM(MINFO, "GET: htcapinfo for 2.4GHz:0x%x\n", data[0]); + + if (req->action == MLAN_ACT_GET) { + cfg_11n->param.htcap_cfg.htcap = 0; + cfg_11n->param.htcap_cfg.misc_cfg = BAND_SELECT_A; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + data[1] = cfg_11n->param.htcap_cfg.htcap; + PRINTM(MINFO, "GET: htcapinfo for 5GHz:0x%x\n", data[1]); + } + + ht_cap = (woal_ht_cap_info *)respbuf; + ht_cap->ht_cap_info_bg = data[0]; + ht_cap->ht_cap_info_a = data[1]; + ret = sizeof(woal_ht_cap_info); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get add BA parameters + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_setget_priv_addbapara(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data[5]; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + woal_addba *addba = NULL; + int ret = 0; + int user_data_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (strlen(respbuf) == + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_ADDBAPARA))) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_ADDBAPARA), data, + ARRAY_SIZE(data), &user_data_len); + + if (user_data_len != ARRAY_SIZE(data)) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + if (data[0] < 0 || data[0] > MLAN_DEFAULT_BLOCK_ACK_TIMEOUT) { + PRINTM(MERROR, "Incorrect addba timeout value.\n"); + ret = -EFAULT; + goto done; + } + if (data[1] <= 0 || data[1] > MLAN_AMPDU_MAX_TXWINSIZE || + data[2] <= 0 || data[2] > MLAN_AMPDU_MAX_RXWINSIZE) { + PRINTM(MERROR, "Incorrect Tx/Rx window size.\n"); + ret = -EFAULT; + goto done; + } + if (data[3] < 0 || data[3] > 1 || data[4] < 0 || data[4] > 1) { + PRINTM(MERROR, "Incorrect Tx/Rx amsdu.\n"); + ret = -EFAULT; + goto done; + } + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_ADDBA_PARAM; + req->req_id = MLAN_IOCTL_11N_CFG; + + if (user_data_len == 0) { + /* Get add BA parameters from MLAN */ + req->action = MLAN_ACT_GET; + } else { + cfg_11n->param.addba_param.timeout = data[0]; + cfg_11n->param.addba_param.txwinsize = data[1]; + cfg_11n->param.addba_param.rxwinsize = data[2]; + cfg_11n->param.addba_param.txamsdu = data[3]; + cfg_11n->param.addba_param.rxamsdu = data[4]; + PRINTM(MINFO, + "SET: timeout:%d txwinsize:%d rxwinsize:%d txamsdu=%d rxamsdu=%d\n", + data[0], data[1], data[2], data[3], data[4]); + /* Update add BA parameters in MLAN */ + req->action = MLAN_ACT_SET; + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + addba = (woal_addba *)respbuf; + + addba->time_out = cfg_11n->param.addba_param.timeout; + addba->tx_win_size = cfg_11n->param.addba_param.txwinsize; + addba->rx_win_size = cfg_11n->param.addba_param.rxwinsize; + addba->tx_amsdu = cfg_11n->param.addba_param.txamsdu; + addba->rx_amsdu = cfg_11n->param.addba_param.rxamsdu; + PRINTM(MINFO, + "GET: timeout:%d txwinsize:%d rxwinsize:%d txamsdu=%d, rxamsdu=%d\n", + addba->time_out, addba->tx_win_size, addba->rx_win_size, + addba->tx_amsdu, addba->rx_amsdu); + + ret = sizeof(woal_addba); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; + +} + +/** + * @brief Delete selective BA based on parameters + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_delba(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + t_u32 data[2] = { 0xFF, 0xFF }; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + mlan_ds_11n_delba *del_ba = NULL; + int ret = 0; + int user_data_len = 0; + int header_len = 0; + t_u8 *mac_pos = NULL; + t_u8 peer_mac[ETH_ALEN] = { 0 }; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_DELBA); + + if (strlen(respbuf) == header_len) { + /* Incorrect number of arguments */ + PRINTM(MERROR, "%d: Invalid arguments\n", __LINE__); + ret = -EINVAL; + goto done; + } + + mac_pos = strstr(respbuf + header_len, " "); + if (mac_pos) + mac_pos = strstr(mac_pos + 1, " "); + if (mac_pos) { +#define MAC_STRING_LENGTH 17 + if (strlen(mac_pos + 1) != MAC_STRING_LENGTH) { + PRINTM(MERROR, "%d: Invalid arguments\n", __LINE__); + ret = -EINVAL; + goto done; + } + woal_mac2u8(peer_mac, mac_pos + 1); + *mac_pos = '\0'; + } + + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + + if (mac_pos) + user_data_len++; + + if (user_data_len > 3 || + (!(data[0] & (DELBA_TX | DELBA_RX))) || + (data[1] != DELBA_ALL_TIDS && !(data[1] <= 7))) { + /* Incorrect number of arguments */ + PRINTM(MERROR, "%d: Invalid arguments\n", __LINE__); + ret = -EINVAL; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + req->req_id = MLAN_IOCTL_11N_CFG; + cfg_11n->sub_command = MLAN_OID_11N_CFG_DELBA; + + del_ba = &cfg_11n->param.del_ba; + memset(del_ba, 0, sizeof(mlan_ds_11n_delba)); + del_ba->direction = (t_u8)data[0]; + del_ba->tid = DELBA_ALL_TIDS; + if (user_data_len > 1) + del_ba->tid = (t_u8)data[1]; + if (user_data_len > 2) + memcpy(del_ba->peer_mac_addr, peer_mac, ETH_ALEN); + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + ret = sprintf(respbuf, "OK. BA deleted successfully.\n") + 1; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get the reject addba requst conditions + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_rejectaddbareq(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + t_u32 data[1]; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + int ret = 0; + int user_data_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (strlen(respbuf) == + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_REJECTADDBAREQ))) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_REJECTADDBAREQ), data, + ARRAY_SIZE(data), &user_data_len); + } + + if (user_data_len > 1) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_REJECT_ADDBA_REQ; + req->req_id = MLAN_IOCTL_11N_CFG; + + if (user_data_len == 0) { + /* Get the reject addba req conditions */ + req->action = MLAN_ACT_GET; + } else { + /* Set the reject addba req conditions */ + cfg_11n->param.reject_addba_req.conditions = data[0]; + req->action = MLAN_ACT_SET; + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (req->action == MLAN_ACT_GET) { + sprintf(respbuf, "0x%x", + cfg_11n->param.reject_addba_req.conditions); + ret = strlen(respbuf) + 1; + } else { + ret = sprintf(respbuf, "OK\n") + 1; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; + +} + +/** + * @brief Set/Get the addba reject setting + * + * @param priv A pointer to moal_private structure + * @param action Action set or get + * @param addba_reject A pointer to addba_reject array. + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_ioctl_addba_reject(moal_private *priv, t_u32 action, t_u8 *addba_reject) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_ADDBA_REJECT; + req->req_id = MLAN_IOCTL_11N_CFG; + + req->action = action; + if (action == MLAN_ACT_SET) + memcpy(cfg_11n->param.addba_reject, addba_reject, + sizeof(cfg_11n->param.addba_reject)); + /* Send IOCTL request to MLAN */ + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + if (action == MLAN_ACT_GET) + memcpy(addba_reject, cfg_11n->param.addba_reject, + sizeof(cfg_11n->param.addba_reject)); +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get addba prio_tbl + * + * @param priv A pointer to moal_private structure + * @param action Action set or get + * @param aggr_prio_tbl A pointer to mlan_ds_11n_aggr_prio_tbl. + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_ioctl_aggr_prio_tbl(moal_private *priv, t_u32 action, + mlan_ds_11n_aggr_prio_tbl *aggr_prio_tbl) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_AGGR_PRIO_TBL; + req->req_id = MLAN_IOCTL_11N_CFG; + + req->action = action; + if (action == MLAN_ACT_SET) + memcpy(&cfg_11n->param.aggr_prio_tbl, aggr_prio_tbl, + sizeof(mlan_ds_11n_aggr_prio_tbl)); + /* Send IOCTL request to MLAN */ + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + if (action == MLAN_ACT_GET) + memcpy(aggr_prio_tbl, &cfg_11n->param.aggr_prio_tbl, + sizeof(mlan_ds_11n_aggr_prio_tbl)); +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; + +} + +/** + * @brief Set/Get addba_param + * + * @param priv A pointer to moal_private structure + * @param action Action set or get + * @param addba_param A pointer to mlan_ds_11n_addba_param. + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_ioctl_addba_param(moal_private *priv, t_u32 action, + mlan_ds_11n_addba_param *addba_param) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_ADDBA_PARAM; + req->req_id = MLAN_IOCTL_11N_CFG; + + req->action = action; + if (action == MLAN_ACT_SET) + memcpy(&cfg_11n->param.addba_param, addba_param, + sizeof(mlan_ds_11n_addba_param)); + /* Send IOCTL request to MLAN */ + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + if (action == MLAN_ACT_GET) + memcpy(addba_param, &cfg_11n->param.addba_param, + sizeof(mlan_ds_11n_addba_param)); +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; + +} + +/** + * @brief Configuring rx block-ack window size + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise failure + */ +int +woal_set_rx_ba_winsize(moal_private *priv, t_u8 *respbuf, int respbuflen) +{ + int data[2]; + t_u8 addba_reject[MAX_NUM_TID]; + mlan_ds_11n_addba_param addba_param; + int ret = 0; + int user_data_len = 0; + + ENTER(); + + memset((char *)data, 0, sizeof(data)); + if (respbuf && strlen(respbuf) > 0) + parse_arguments(respbuf, data, ARRAY_SIZE(data), + &user_data_len); + + if (user_data_len != 2) { + PRINTM(MERROR, "Invalid arguments for ba_winsize command\n"); + ret = -EINVAL; + goto done; + } + if (data[0] > 7 || data[0] < 0) { + PRINTM(MERROR, "Invalid tid %d\n", data[0]); + ret = -EINVAL; + goto done; + } + if (data[1] < 0) { + PRINTM(MERROR, "Invalid winsize %d\n", data[1]); + ret = -EINVAL; + goto done; + } + memset(addba_reject, 0, sizeof(addba_reject)); + if (MLAN_STATUS_SUCCESS != + woal_ioctl_addba_reject(priv, MLAN_ACT_GET, addba_reject)) { + ret = -EFAULT; + goto done; + } + /* disable tx ba */ + if (data[1] == 0) { + addba_reject[data[0]] = MTRUE; + if (MLAN_STATUS_SUCCESS != + woal_ioctl_addba_reject(priv, MLAN_ACT_SET, addba_reject)) + ret = -EFAULT; + } else { + if (addba_reject[data[0]] == MTRUE) { + addba_reject[data[0]] = MFALSE; + if (MLAN_STATUS_SUCCESS != + woal_ioctl_addba_reject(priv, MLAN_ACT_SET, + addba_reject)) { + ret = -EFAULT; + goto done; + } + } + memset(&addba_param, 0, sizeof(addba_param)); + if (MLAN_STATUS_SUCCESS != + woal_ioctl_addba_param(priv, MLAN_ACT_GET, &addba_param)) { + ret = -EFAULT; + goto done; + } + if (data[1] != addba_param.rxwinsize) { + addba_param.rxwinsize = data[1]; + if (MLAN_STATUS_SUCCESS != + woal_ioctl_addba_param(priv, MLAN_ACT_SET, + &addba_param)) + ret = -EFAULT; + } + + } +done: + LEAVE(); + return ret; + +} + +/** + * @brief Configuring trx block-ack window size + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise failure + */ +int +woal_set_tx_ba_winsize(moal_private *priv, t_u8 *respbuf, int respbuflen) +{ + int data[2]; + mlan_ds_11n_aggr_prio_tbl aggr_prio_tbl; + mlan_ds_11n_addba_param addba_param; + t_u8 tos_to_tid_inv[] = { + 0x02, 0x00, 0x01, 0x03, + 0x04, 0x05, 0x06, 0x07 + }; + int ret = 0; + int user_data_len = 0; + + ENTER(); + + memset((char *)data, 0, sizeof(data)); + if (respbuf && strlen(respbuf) > 0) + parse_arguments(respbuf, data, ARRAY_SIZE(data), + &user_data_len); + + if (user_data_len != 2) { + PRINTM(MERROR, "Invalid arguments for ba_winsize command\n"); + ret = -EINVAL; + goto done; + } + if (data[0] > 7 || data[0] < 0) { + PRINTM(MERROR, "Invalid tid %d\n", data[0]); + ret = -EINVAL; + goto done; + } + if (data[1] < 0) { + PRINTM(MERROR, "Invalid winsize %d\n", data[1]); + ret = -EINVAL; + goto done; + } + memset(&aggr_prio_tbl, 0, sizeof(aggr_prio_tbl)); + if (MLAN_STATUS_SUCCESS != + woal_ioctl_aggr_prio_tbl(priv, MLAN_ACT_GET, &aggr_prio_tbl)) { + ret = -EFAULT; + goto done; + } + /* disable tx ba */ + if (data[1] == 0) { + if (aggr_prio_tbl.ampdu[data[0]] != 0xff) { + aggr_prio_tbl.ampdu[data[0]] = 0xff; + if (MLAN_STATUS_SUCCESS != + woal_ioctl_aggr_prio_tbl(priv, MLAN_ACT_SET, + &aggr_prio_tbl)) + ret = -EFAULT; + } + } else { + if (aggr_prio_tbl.ampdu[data[0]] == 0xff) { + aggr_prio_tbl.ampdu[data[0]] = tos_to_tid_inv[data[0]]; + if (MLAN_STATUS_SUCCESS != + woal_ioctl_aggr_prio_tbl(priv, MLAN_ACT_SET, + &aggr_prio_tbl)) { + ret = -EFAULT; + goto done; + } + } + memset(&addba_param, 0, sizeof(addba_param)); + if (MLAN_STATUS_SUCCESS != + woal_ioctl_addba_param(priv, MLAN_ACT_GET, &addba_param)) { + ret = -EFAULT; + goto done; + } + if (data[1] != addba_param.txwinsize) { + addba_param.txwinsize = data[1]; + if (MLAN_STATUS_SUCCESS != + woal_ioctl_addba_param(priv, MLAN_ACT_SET, + &addba_param)) + ret = -EFAULT; + } + + } +done: + LEAVE(); + return ret; + +} + +/** + * @brief Set/Get aggregation priority table configurations + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_setget_priv_aggrpriotbl(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) +{ + int data[MAX_NUM_TID * 2], i, j; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + int ret = 0; + int user_data_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (strlen(respbuf) == + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_AGGRPRIOTBL))) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_AGGRPRIOTBL), data, + ARRAY_SIZE(data), &user_data_len); + + if (user_data_len != ARRAY_SIZE(data)) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + for (i = 0, j = 0; i < user_data_len; i = i + 2, ++j) { + if ((data[i] > 7 && data[i] != 0xff) || + (data[i + 1] > 7 && data[i + 1] != 0xff)) { + PRINTM(MERROR, + "Invalid priority, valid value 0-7 or 0xff.\n"); + ret = -EFAULT; + goto done; + } + } + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_AGGR_PRIO_TBL; + req->req_id = MLAN_IOCTL_11N_CFG; + + if (user_data_len == 0) { + /* Get aggr priority table from MLAN */ + req->action = MLAN_ACT_GET; + } else { + for (i = 0, j = 0; i < user_data_len; i = i + 2, ++j) { + cfg_11n->param.aggr_prio_tbl.ampdu[j] = data[i]; + cfg_11n->param.aggr_prio_tbl.amsdu[j] = data[i + 1]; + } + /* Update aggr priority table in MLAN */ + req->action = MLAN_ACT_SET; + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + for (i = 0, j = 0; i < (MAX_NUM_TID * 2); i = i + 2, ++j) { + respbuf[i] = cfg_11n->param.aggr_prio_tbl.ampdu[j]; + respbuf[i + 1] = cfg_11n->param.aggr_prio_tbl.amsdu[j]; + } + + ret = sizeof(data); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; + +} + +/** + * @brief Set/Get Add BA reject configurations + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_setget_priv_addbareject(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) +{ + int data[MAX_NUM_TID], i; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + int ret = 0; + int user_data_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (strlen(respbuf) == + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_ADDBAREJECT))) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_ADDBAREJECT), data, + ARRAY_SIZE(data), &user_data_len); + + if (user_data_len != ARRAY_SIZE(data)) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + for (i = 0; i < user_data_len; i++) { + if (data[i] != 0 && data[i] != 1) { + PRINTM(MERROR, + "addba reject only takes argument as 0 or 1\n"); + ret = -EFAULT; + goto done; + } + } + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_ADDBA_REJECT; + req->req_id = MLAN_IOCTL_11N_CFG; + + if (user_data_len == 0) { + /* Get add BA reject configuration from MLAN */ + req->action = MLAN_ACT_GET; + } else { + for (i = 0; i < user_data_len; i++) + cfg_11n->param.addba_reject[i] = data[i]; + /* Update add BA reject configuration in MLAN */ + req->action = MLAN_ACT_SET; + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + for (i = 0; i < MAX_NUM_TID; i++) + respbuf[i] = cfg_11n->param.addba_reject[i]; + + ret = sizeof(data); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; + +} + +/** + * @brief Set/Get 11AC configurations + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_setget_priv_vhtcfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data[6]; + mlan_ioctl_req *req = NULL; + mlan_ds_11ac_cfg *cfg_11ac = NULL; + mlan_ds_11ac_vht_cfg *vhtcfg = NULL; + int ret = 0; + int user_data_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (strlen(respbuf) == (strlen(CMD_MARVELL) + strlen(PRIV_CMD_VHTCFG))) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen(CMD_MARVELL) + strlen(PRIV_CMD_VHTCFG), + data, ARRAY_SIZE(data), &user_data_len); + + if ((user_data_len > 6) || (user_data_len < 2)) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11ac_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg_11ac = (mlan_ds_11ac_cfg *)req->pbuf; + cfg_11ac->sub_command = MLAN_OID_11AC_VHT_CFG; + req->req_id = MLAN_IOCTL_11AC_CFG; + + /* Band */ + if ((data[0] < 0) || (data[0] > 2)) { + PRINTM(MERROR, "Invalid band selection\n"); + ret = -EINVAL; + goto done; + } else { + if (data[0] == BAND_SELECT_BOTH) { + cfg_11ac->param.vht_cfg.band = + (BAND_SELECT_BG | BAND_SELECT_A); + } else { + cfg_11ac->param.vht_cfg.band = data[0]; + } + PRINTM(MINFO, "GET/SET: vhtcfg band: 0x%x\n", data[0]); + } + + /* Tx/Rx */ + if ((data[1] <= 0) || (data[1] > 3)) { + PRINTM(MERROR, "Invalid Tx/Rx selection\n"); + ret = -EINVAL; + goto done; + } else { + cfg_11ac->param.vht_cfg.txrx = data[1]; + PRINTM(MINFO, "GET/SET: vhtcfg txrx: 0x%x\n", data[1]); + } + + if (user_data_len == 2) { + /* GET operation */ + if (data[0] == BAND_SELECT_BOTH) { + /* if get both bands, get BG first */ + cfg_11ac->param.vht_cfg.band = BAND_SELECT_BG; + } + if (priv->bss_role == MLAN_BSS_ROLE_UAP) + cfg_11ac->param.vht_cfg.txrx = MLAN_RADIO_RX; + + req->action = MLAN_ACT_GET; + } else { + if (user_data_len == 3) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + if (user_data_len >= 4) { + /* BW cfg */ + if ((data[2] < 0) || (data[2] > 1) || + ((data[2] == 1) && (data[0] & BAND_SELECT_BG))) { + PRINTM(MERROR, "Invalid BW cfg selection\n"); + ret = -EINVAL; + goto done; + } else { + cfg_11ac->param.vht_cfg.bwcfg = data[2]; + PRINTM(MINFO, "SET: vhtcfg bw cfg:0x%x\n", + data[2]); + } + + cfg_11ac->param.vht_cfg.vht_cap_info = data[3]; + PRINTM(MINFO, "SET: vhtcfg vht_cap_info:0x%x\n", + data[3]); + } + if (user_data_len == 4) { + data[4] = 0xffffffff; + data[5] = 0xffffffff; + } + if (user_data_len == 5) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + if (user_data_len >= 4) { + cfg_11ac->param.vht_cfg.vht_tx_mcs = data[4]; + cfg_11ac->param.vht_cfg.vht_rx_mcs = data[5]; + } + /* Update 11AC parameters in MLAN */ + req->action = MLAN_ACT_SET; + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* number of vhtcfg entries */ + *respbuf = 1; + vhtcfg = (mlan_ds_11ac_vht_cfg *)(respbuf + 1); + memcpy(vhtcfg, &cfg_11ac->param.vht_cfg, sizeof(mlan_ds_11ac_vht_cfg)); + ret = 1 + sizeof(mlan_ds_11ac_vht_cfg); + + if ((req->action == MLAN_ACT_GET) && (data[0] == BAND_SELECT_BOTH)) { + cfg_11ac->param.vht_cfg.band = BAND_SELECT_A; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + /* number of vhtcfg entries */ + *respbuf = 2; + vhtcfg++; + memcpy(vhtcfg, &cfg_11ac->param.vht_cfg, + sizeof(mlan_ds_11ac_vht_cfg)); + ret += sizeof(mlan_ds_11ac_vht_cfg); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; + +} + +/** + * @brief Set/Get 11AC configurations + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_get_priv_datarate(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_rate *rate = NULL; + mlan_data_rate *data_rate = NULL; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_rate)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + rate = (mlan_ds_rate *)req->pbuf; + rate->sub_command = MLAN_OID_GET_DATA_RATE; + req->req_id = MLAN_IOCTL_RATE; + req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + data_rate = (mlan_data_rate *)respbuf; + + memcpy(data_rate, &rate->param.data_rate, sizeof(mlan_data_rate)); + + ret = sizeof(mlan_data_rate); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; + +} + +/** + * @brief Set/Get tx rate configurations + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_setget_priv_txratecfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + t_u32 data[3]; + mlan_ioctl_req *req = NULL; + mlan_ds_rate *rate = NULL; + woal_tx_rate_cfg *ratecfg = NULL; + int ret = 0; + int user_data_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (strlen(respbuf) == + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_TXRATECFG))) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_TXRATECFG), data, + ARRAY_SIZE(data), &user_data_len); + } + + if (user_data_len >= 4) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_rate)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + req->req_id = MLAN_IOCTL_RATE; + rate = (mlan_ds_rate *)req->pbuf; + rate->sub_command = MLAN_OID_RATE_CFG; + rate->param.rate_cfg.rate_type = MLAN_RATE_INDEX; + + if (user_data_len == 0) { + /* Get operation */ + req->action = MLAN_ACT_GET; + } else { + /* Set operation */ + req->action = MLAN_ACT_SET; + /* format */ + if ((data[0] != AUTO_RATE) && (data[0] >= 3)) { + PRINTM(MERROR, "Invalid format selection\n"); + ret = -EINVAL; + goto done; + } + if (data[0] == AUTO_RATE) { + /* auto */ + rate->param.rate_cfg.is_rate_auto = 1; + } else { + /* fixed rate */ + PRINTM(MINFO, "SET: txratefg format: 0x%x\n", data[0]); + if ((data[0] != AUTO_RATE) && + (data[0] > MLAN_RATE_FORMAT_VHT) + ) { + PRINTM(MERROR, "Invalid format selection\n"); + ret = -EINVAL; + goto done; + } + rate->param.rate_cfg.rate_format = data[0]; + } + + if ((user_data_len >= 2) && (data[0] != AUTO_RATE)) { + PRINTM(MINFO, "SET: txratefg index: 0x%x\n", data[1]); + /* sanity check */ + if (((data[0] == MLAN_RATE_FORMAT_LG) && + (data[1] > MLAN_RATE_INDEX_OFDM7)) + || ((data[0] == MLAN_RATE_FORMAT_HT) && + (data[1] != 32) && (data[1] > 15)) + || ((data[0] == MLAN_RATE_FORMAT_VHT) && + (data[1] > MLAN_RATE_INDEX_MCS9)) + ) { + PRINTM(MERROR, "Invalid index selection\n"); + ret = -EINVAL; + goto done; + } + + PRINTM(MINFO, "SET: txratefg index: 0x%x\n", data[1]); + rate->param.rate_cfg.rate = data[1]; + + } + + if ((user_data_len >= 3) && (data[0] != AUTO_RATE)) { + PRINTM(MINFO, "SET: txratefg nss: 0x%x\n", data[2]); + /* NSS is supported up to 2 */ + if ((data[2] <= 0) || (data[2] >= 3)) { + PRINTM(MERROR, "Invalid nss selection\n"); + ret = -EINVAL; + goto done; + } + rate->param.rate_cfg.nss = data[2]; + } + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + ratecfg = (woal_tx_rate_cfg *)respbuf; + if (rate->param.rate_cfg.is_rate_auto == MTRUE) { + ratecfg->rate_format = 0xFF; + } else { + /* fixed rate */ + ratecfg->rate_format = rate->param.rate_cfg.rate_format; + ratecfg->rate_index = rate->param.rate_cfg.rate; + if (rate->param.rate_cfg.rate_format == MLAN_RATE_FORMAT_VHT) + ratecfg->nss = rate->param.rate_cfg.nss; + } + + ret = sizeof(woal_tx_rate_cfg); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; + +} + +#ifdef STA_SUPPORT +/** + * @brief Get statistics information + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param stats A pointer to mlan_ds_get_stats structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_get_stats_info(moal_private *priv, t_u8 wait_option, + mlan_ds_get_stats *stats) +{ + int ret = 0; + mlan_ds_get_info *info = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + info = (mlan_ds_get_info *)req->pbuf; + info->sub_command = MLAN_OID_GET_STATS; + req->req_id = MLAN_IOCTL_GET_INFO; + req->action = MLAN_ACT_GET; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); + if (status == MLAN_STATUS_SUCCESS) { + if (stats) + memcpy(stats, &info->param.stats, + sizeof(mlan_ds_get_stats)); +#if defined(STA_WEXT) || defined(UAP_WEXT) + priv->w_stats.discard.fragment = info->param.stats.fcs_error; + priv->w_stats.discard.retries = info->param.stats.retry; + priv->w_stats.discard.misc = info->param.stats.ack_failure; +#endif + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Get wireless stats information + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_get_priv_getlog(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + mlan_ds_get_stats *stats; + ENTER(); + + if (respbuflen < sizeof(*stats)) { + PRINTM(MERROR, "Get log: respbuflen (%d) too small!", + (int)respbuflen); + ret = -EFAULT; + goto done; + } + stats = (mlan_ds_get_stats *)respbuf; + if (MLAN_STATUS_SUCCESS != + woal_get_stats_info(priv, MOAL_IOCTL_WAIT, stats)) { + PRINTM(MERROR, "Get log: Failed to get stats info!"); + ret = -EFAULT; + goto done; + } + + ret = sizeof(mlan_ds_get_stats); + +done: + LEAVE(); + return ret; +} +#endif + +/** + * @brief Set/Get esupplicant mode configurations + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_setget_priv_esuppmode(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + t_u32 data[3]; + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + woal_esuppmode_cfg *esupp_mode = NULL; + int ret = 0; + int user_data_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (!priv->phandle->card_info->embedded_supp) { + PRINTM(MERROR, "Not supported cmd on this card\n"); + ret = -EOPNOTSUPP; + goto done; + } + if (strlen(respbuf) == + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_ESUPPMODE))) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_ESUPPMODE), data, + ARRAY_SIZE(data), &user_data_len); + } + + if (user_data_len >= 4 || user_data_len == 1 || user_data_len == 2) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + req->req_id = MLAN_IOCTL_SEC_CFG; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_ESUPP_MODE; + + if (user_data_len == 0) { + /* Get operation */ + req->action = MLAN_ACT_GET; + } else { + /* Set operation */ + req->action = MLAN_ACT_SET; + /* RSN mode */ + sec->param.esupp_mode.rsn_mode = data[0]; + /* Pairwise cipher */ + sec->param.esupp_mode.act_paircipher = (data[1] & 0xFF); + /* Group cipher */ + sec->param.esupp_mode.act_groupcipher = (data[2] & 0xFF); + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + esupp_mode = (woal_esuppmode_cfg *)respbuf; + esupp_mode->rsn_mode = + (t_u16)((sec->param.esupp_mode.rsn_mode) & 0xFFFF); + esupp_mode->pairwise_cipher = + (t_u8)((sec->param.esupp_mode.act_paircipher) & 0xFF); + esupp_mode->group_cipher = + (t_u8)((sec->param.esupp_mode.act_groupcipher) & 0xFF); + + ret = sizeof(woal_esuppmode_cfg); +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; + +} + +/** + * @brief Set/Get esupplicant passphrase configurations + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_setget_priv_passphrase(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + int ret = 0, action = -1, i = 0; + char *begin, *end, *opt; + t_u16 len = 0; + t_u8 zero_mac[] = { 0, 0, 0, 0, 0, 0 }; + t_u8 *mac = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + if (!priv->phandle->card_info->embedded_supp) { + PRINTM(MERROR, "Not supported cmd on this card\n"); + ret = -EOPNOTSUPP; + goto done; + } + + if (strlen(respbuf) == + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_PASSPHRASE))) { + PRINTM(MERROR, "No arguments provided\n"); + ret = -EINVAL; + goto done; + } + + /* Parse the buf to get the cmd_action */ + begin = respbuf + strlen(CMD_MARVELL) + strlen(PRIV_CMD_PASSPHRASE); + end = woal_strsep(&begin, ';', '/'); + if (end) + action = woal_atox(end); + if (action < 0 || action > 2 || end[1] != '\0') { + PRINTM(MERROR, "Invalid action argument %s\n", end); + ret = -EINVAL; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + req->req_id = MLAN_IOCTL_SEC_CFG; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_PASSPHRASE; + if (action == 0) + req->action = MLAN_ACT_GET; + else + req->action = MLAN_ACT_SET; + + while (begin) { + end = woal_strsep(&begin, ';', '/'); + opt = woal_strsep(&end, '=', '/'); + if (!opt || !end || !end[0]) { + PRINTM(MERROR, "Invalid option\n"); + ret = -EINVAL; + break; + } else if (!strnicmp(opt, "ssid", strlen(opt))) { + if (strlen(end) > MLAN_MAX_SSID_LENGTH) { + PRINTM(MERROR, + "SSID length exceeds max length\n"); + ret = -EFAULT; + break; + } + sec->param.passphrase.ssid.ssid_len = strlen(end); + strncpy((char *)sec->param.passphrase.ssid.ssid, end, + strlen(end)); + PRINTM(MINFO, "ssid=%s, len=%d\n", + sec->param.passphrase.ssid.ssid, + (int)sec->param.passphrase.ssid.ssid_len); + } else if (!strnicmp(opt, "bssid", strlen(opt))) { + woal_mac2u8((t_u8 *)&sec->param.passphrase.bssid, end); + } else if (!strnicmp(opt, "psk", strlen(opt)) && + req->action == MLAN_ACT_SET) { + if (strlen(end) != MLAN_PMK_HEXSTR_LENGTH) { + PRINTM(MERROR, "Invalid PMK length\n"); + ret = -EINVAL; + break; + } + woal_ascii2hex((t_u8 *)(sec->param.passphrase.psk.pmk. + pmk), end, + MLAN_PMK_HEXSTR_LENGTH / 2); + sec->param.passphrase.psk_type = MLAN_PSK_PMK; + } else if (!strnicmp(opt, "passphrase", strlen(opt)) && + req->action == MLAN_ACT_SET) { + if (strlen(end) < MLAN_MIN_PASSPHRASE_LENGTH || + strlen(end) > MLAN_MAX_PASSPHRASE_LENGTH) { + PRINTM(MERROR, + "Invalid length for passphrase\n"); + ret = -EINVAL; + break; + } + sec->param.passphrase.psk_type = MLAN_PSK_PASSPHRASE; + memcpy(sec->param.passphrase.psk.passphrase.passphrase, + end, + sizeof(sec->param.passphrase.psk.passphrase. + passphrase)); + sec->param.passphrase.psk.passphrase.passphrase_len = + strlen(end); + PRINTM(MINFO, "passphrase=%s, len=%d\n", + sec->param.passphrase.psk.passphrase.passphrase, + (int)sec->param.passphrase.psk.passphrase. + passphrase_len); + } else { + PRINTM(MERROR, "Invalid option %s\n", opt); + ret = -EINVAL; + break; + } + } + if (ret) + goto done; + + if (action == 2) + sec->param.passphrase.psk_type = MLAN_PSK_CLEAR; + else if (action == 0) + sec->param.passphrase.psk_type = MLAN_PSK_QUERY; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memset(respbuf, 0, respbuflen); + if (sec->param.passphrase.ssid.ssid_len) { + len += sprintf(respbuf + len, "ssid:"); + memcpy(respbuf + len, sec->param.passphrase.ssid.ssid, + sec->param.passphrase.ssid.ssid_len); + len += sec->param.passphrase.ssid.ssid_len; + len += sprintf(respbuf + len, " "); + } + if (memcmp(&sec->param.passphrase.bssid, zero_mac, sizeof(zero_mac))) { + mac = (t_u8 *)&sec->param.passphrase.bssid; + len += sprintf(respbuf + len, "bssid:"); + for (i = 0; i < ETH_ALEN - 1; ++i) + len += sprintf(respbuf + len, "%02x:", mac[i]); + len += sprintf(respbuf + len, "%02x ", mac[i]); + } + if (sec->param.passphrase.psk_type == MLAN_PSK_PMK) { + len += sprintf(respbuf + len, "psk:"); + for (i = 0; i < MLAN_MAX_KEY_LENGTH; ++i) + len += sprintf(respbuf + len, "%02x", + sec->param.passphrase.psk.pmk.pmk[i]); + len += sprintf(respbuf + len, "\n"); + } + if (sec->param.passphrase.psk_type == MLAN_PSK_PASSPHRASE) + len += sprintf(respbuf + len, "passphrase:%s\n", + sec->param.passphrase.psk.passphrase.passphrase); + + ret = len; +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; + +} + +/** + * @brief Deauthenticate + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_deauth(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + t_u8 mac[ETH_ALEN]; + + ENTER(); + + if (strlen(respbuf) > (strlen(CMD_MARVELL) + strlen(PRIV_CMD_DEAUTH))) { + /* Deauth mentioned BSSID */ + woal_mac2u8(mac, + respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_DEAUTH)); + if (MLAN_STATUS_SUCCESS != + woal_disconnect(priv, MOAL_IOCTL_WAIT, mac)) { + ret = -EFAULT; + goto done; + } + } else { + if (MLAN_STATUS_SUCCESS != + woal_disconnect(priv, MOAL_IOCTL_WAIT, NULL)) + ret = -EFAULT; + } + +done: + LEAVE(); + return ret; +} + +#ifdef UAP_SUPPORT +/** + * @brief uap station deauth ioctl handler + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_ap_deauth(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + t_u8 *data_ptr; + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_bss *bss = NULL; + mlan_deauth_param deauth_param; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + data_ptr = respbuf + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_AP_DEAUTH)); + memset(&deauth_param, 0, sizeof(mlan_deauth_param)); + memcpy(&deauth_param, data_ptr, sizeof(mlan_deauth_param)); + + PRINTM(MIOCTL, "ioctl deauth station: " MACSTR ", reason=%d\n", + MAC2STR(deauth_param.mac_addr), deauth_param.reason_code); + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + bss = (mlan_ds_bss *)ioctl_req->pbuf; + + bss->sub_command = MLAN_OID_UAP_DEAUTH_STA; + ioctl_req->req_id = MLAN_IOCTL_BSS; + ioctl_req->action = MLAN_ACT_SET; + + memcpy(&bss->param.deauth_param, &deauth_param, + sizeof(mlan_deauth_param)); + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memcpy(data_ptr, &ioctl_req->status_code, sizeof(t_u32)); + ret = sizeof(t_u32); +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief uap get station list handler + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_priv_get_sta_list(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + mlan_ds_get_info *info = NULL; + mlan_ds_sta_list *sta_list = NULL; + mlan_ioctl_req *ioctl_req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Allocate an IOCTL request buffer */ + ioctl_req = + (mlan_ioctl_req *) + woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + + info = (mlan_ds_get_info *)ioctl_req->pbuf; + info->sub_command = MLAN_OID_UAP_STA_LIST; + ioctl_req->req_id = MLAN_IOCTL_GET_INFO; + ioctl_req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + sta_list = + (mlan_ds_sta_list *)(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_GET_STA_LIST)); + memcpy(sta_list, &info->param.sta_list, sizeof(mlan_ds_sta_list)); + ret = sizeof(mlan_ds_sta_list); +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief uap bss_config handler + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_priv_bss_config(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *ioctl_req = NULL; + t_u32 action = 0; + int offset = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + offset = strlen(CMD_MARVELL) + strlen(PRIV_CMD_BSS_CONFIG); + memcpy((u8 *)&action, respbuf + offset, sizeof(action)); + offset += sizeof(action); + + /* Allocate an IOCTL request buffer */ + ioctl_req = + (mlan_ioctl_req *) + woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + + bss = (mlan_ds_bss *)ioctl_req->pbuf; + bss->sub_command = MLAN_OID_UAP_BSS_CONFIG; + ioctl_req->req_id = MLAN_IOCTL_BSS; + if (action == 1) { + ioctl_req->action = MLAN_ACT_SET; + /* Get the BSS config from user */ + memcpy(&bss->param.bss_config, respbuf + offset, + sizeof(mlan_uap_bss_param)); + } else { + ioctl_req->action = MLAN_ACT_GET; + } + + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (ioctl_req->action == MLAN_ACT_GET) { + memcpy(respbuf + offset, &bss->param.bss_config, + sizeof(mlan_uap_bss_param)); + } + ret = sizeof(mlan_uap_bss_param); +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} +#endif + +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) +/** + * @brief Set/Get BSS role + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_bssrole(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + t_u32 data[1]; + int ret = 0; + int user_data_len = 0; + t_u8 action = MLAN_ACT_GET; + + ENTER(); + + memset((char *)data, 0, sizeof(data)); + if (strlen(respbuf) == (strlen(CMD_MARVELL) + strlen(PRIV_CMD_BSSROLE))) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_BSSROLE), data, + ARRAY_SIZE(data), &user_data_len); + } + + if (user_data_len >= 2) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto error; + } + + if (user_data_len == 0) { + action = MLAN_ACT_GET; + } else { + if ((data[0] != MLAN_BSS_ROLE_STA && + data[0] != MLAN_BSS_ROLE_UAP) || + priv->bss_type != MLAN_BSS_TYPE_WIFIDIRECT) { + PRINTM(MWARN, "Invalid BSS role\n"); + ret = -EINVAL; + goto error; + } + if (data[0] == GET_BSS_ROLE(priv)) { + PRINTM(MWARN, "Already BSS is in desired role\n"); + goto done; + } + action = MLAN_ACT_SET; + /* Reset interface */ + woal_reset_intf(priv, MOAL_IOCTL_WAIT, MFALSE); + } + + if (MLAN_STATUS_SUCCESS != woal_bss_role_cfg(priv, + action, MOAL_IOCTL_WAIT, + (t_u8 *)data)) { + ret = -EFAULT; + goto error; + } + + if (user_data_len) { + /* Initialize private structures */ + woal_init_priv(priv, MOAL_IOCTL_WAIT); + /* Enable interfaces */ + netif_device_attach(priv->netdev); + woal_start_queue(priv->netdev); + } + +done: + memset(respbuf, 0, respbuflen); + respbuf[0] = (t_u8)data[0]; + ret = 1; + +error: + LEAVE(); + return ret; +} +#endif /* STA_SUPPORT && UAP_SUPPORT */ +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ + +#ifdef STA_SUPPORT +/** + * @brief Set user scan + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_setuserscan(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + wlan_user_scan_cfg scan_cfg; + int ret = 0; + + ENTER(); + + /* Create the scan_cfg structure */ + memset(&scan_cfg, 0, sizeof(scan_cfg)); + + /* We expect the scan_cfg structure to be passed in respbuf */ + memcpy((char *)&scan_cfg, + respbuf + strlen(CMD_MARVELL) + strlen(PRIV_CMD_SETUSERSCAN), + sizeof(wlan_user_scan_cfg)); + + /* Call for scan */ + if (MLAN_STATUS_FAILURE == woal_do_scan(priv, &scan_cfg)) + ret = -EFAULT; + + LEAVE(); + return ret; +} + +/** + * @brief Retrieve the scan response/beacon table + * + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * @param scan_resp A pointer to mlan_scan_resp structure + * @param scan_start Argument + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +int +moal_ret_get_scan_table_ioctl(t_u8 *respbuf, t_u32 respbuflen, + mlan_scan_resp *scan_resp, t_u32 scan_start) +{ + pBSSDescriptor_t pbss_desc, scan_table; + wlan_ioctl_get_scan_table_info *prsp_info; + int ret_code; + int ret_len; + int space_left; + t_u8 *pcurrent; + t_u8 *pbuffer_end; + t_u32 num_scans_done; + + ENTER(); + + num_scans_done = 0; + ret_code = MLAN_STATUS_SUCCESS; + + prsp_info = (wlan_ioctl_get_scan_table_info *)respbuf; + pcurrent = (t_u8 *)prsp_info->scan_table_entry_buf; + + pbuffer_end = respbuf + respbuflen - 1; + space_left = pbuffer_end - pcurrent; + scan_table = (BSSDescriptor_t *)(scan_resp->pscan_table); + + PRINTM(MINFO, "GetScanTable: scan_start req = %d\n", scan_start); + PRINTM(MINFO, "GetScanTable: length avail = %d\n", respbuflen); + + if (!scan_start) { + PRINTM(MINFO, "GetScanTable: get current BSS Descriptor\n"); + + /* Use to get current association saved descriptor */ + pbss_desc = scan_table; + + ret_code = wlan_get_scan_table_ret_entry(pbss_desc, + &pcurrent, + &space_left); + + if (ret_code == MLAN_STATUS_SUCCESS) + num_scans_done = 1; + + } else { + scan_start--; + + while (space_left + && (scan_start + num_scans_done < + scan_resp->num_in_scan_table) + && (ret_code == MLAN_STATUS_SUCCESS)) { + + pbss_desc = + (scan_table + (scan_start + num_scans_done)); + + PRINTM(MINFO, + "GetScanTable: get current BSS Descriptor [%d]\n", + scan_start + num_scans_done); + + ret_code = wlan_get_scan_table_ret_entry(pbss_desc, + &pcurrent, + &space_left); + + if (ret_code == MLAN_STATUS_SUCCESS) + num_scans_done++; + + } + } + + prsp_info->scan_number = num_scans_done; + ret_len = pcurrent - respbuf; + + LEAVE(); + return ret_len; +} + +/** + * @brief Get scan table + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_getscantable(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_scan *scan = NULL; + t_u32 scan_start; + mlan_status status = MLAN_STATUS_SUCCESS; + moal_handle *handle = priv->phandle; + + ENTER(); + + /* First make sure scanning is not in progress */ + if (handle->scan_pending_on_block == MTRUE) { + ret = -EAGAIN; + goto done; + } + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_scan)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + scan = (mlan_ds_scan *)req->pbuf; + req->req_id = MLAN_IOCTL_SCAN; + req->action = MLAN_ACT_GET; + + /* Get the whole command from user */ + memcpy(&scan_start, + respbuf + strlen(CMD_MARVELL) + strlen(PRIV_CMD_GETSCANTABLE), + sizeof(scan_start)); + if (scan_start) + scan->sub_command = MLAN_OID_SCAN_NORMAL; + else + scan->sub_command = MLAN_OID_SCAN_GET_CURRENT_BSS; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status == MLAN_STATUS_SUCCESS) { + ret = moal_ret_get_scan_table_ioctl(respbuf, respbuflen, + &scan->param.scan_resp, + scan_start); + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Extended capabilities configuration + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_extcapcfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret, header; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *cfg = NULL; + IEEEtypes_Header_t *ie; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (!respbuf) { + LEAVE(); + return 0; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg = (mlan_ds_misc_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_MISC_EXT_CAP_CFG; + req->req_id = MLAN_IOCTL_MISC_CFG; + header = strlen(CMD_MARVELL) + strlen(PRIV_CMD_EXTCAPCFG); + if (strlen(respbuf) == header) + /* GET operation */ + req->action = MLAN_ACT_GET; + else { + /* SET operation */ + ie = (IEEEtypes_Header_t *)(respbuf + header); + if (ie->len > sizeof(ExtCap_t)) { + PRINTM(MERROR, + "Extended Capability lenth is invalid\n"); + ret = -EFAULT; + goto done; + } + req->action = MLAN_ACT_SET; + memset(&cfg->param.ext_cap, 0, sizeof(ExtCap_t)); + memcpy(&cfg->param.ext_cap, ie + 1, ie->len); + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memset(respbuf, 0, respbuflen); + ie = (IEEEtypes_Header_t *)respbuf; + ie->element_id = EXT_CAPABILITY; + ie->len = sizeof(ExtCap_t); + memcpy(ie + 1, &cfg->param.ext_cap, sizeof(ExtCap_t)); + + ret = sizeof(IEEEtypes_Header_t) + ie->len; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} +#endif + +/** + * @brief Set/Get deep sleep mode configurations + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_setgetdeepsleep(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + t_u32 data[2]; + int ret = 0; + int user_data_len = 0; + + ENTER(); + + if (strlen(respbuf) == + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_DEEPSLEEP))) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_DEEPSLEEP), data, + ARRAY_SIZE(data), &user_data_len); + } + + if (user_data_len >= 3) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + + if (user_data_len == 0) { + if (MLAN_STATUS_SUCCESS != woal_get_deep_sleep(priv, data)) { + ret = -EFAULT; + goto done; + } + sprintf(respbuf, "%d %d", data[0], data[1]); + ret = strlen(respbuf) + 1; + } else { + if (data[0] == DEEP_SLEEP_OFF) { + PRINTM(MINFO, "Exit Deep Sleep Mode\n"); + ret = woal_set_deep_sleep(priv, MOAL_IOCTL_WAIT, MFALSE, + 0); + if (ret != MLAN_STATUS_SUCCESS) { + ret = -EINVAL; + goto done; + } + } else if (data[0] == DEEP_SLEEP_ON) { + PRINTM(MINFO, "Enter Deep Sleep Mode\n"); + if (user_data_len != 2) + data[1] = 0; + ret = woal_set_deep_sleep(priv, MOAL_IOCTL_WAIT, MTRUE, + data[1]); + if (ret != MLAN_STATUS_SUCCESS) { + ret = -EINVAL; + goto done; + } + } else { + PRINTM(MERROR, "Unknown option = %u\n", data[0]); + ret = -EINVAL; + goto done; + } + ret = sprintf(respbuf, "OK\n") + 1; + } + +done: + LEAVE(); + return ret; + +} + +/** + * @brief Set/Get IP address configurations + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_setgetipaddr(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *misc = NULL; + int ret = 0, op_code = 0, data_length = 0, header = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (priv->bss_type != MLAN_BSS_TYPE_STA) { + PRINTM(MIOCTL, "Bss type[%d]: Not STA, ignore it\n", + priv->bss_type); + ret = sprintf(respbuf, "OK\n") + 1; + goto done; + } + + header = strlen(CMD_MARVELL) + strlen(PRIV_CMD_IPADDR); + data_length = strlen(respbuf) - header; + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + misc = (mlan_ds_misc_cfg *)req->pbuf; + + if (data_length < 1) { /* GET */ + req->action = MLAN_ACT_GET; + } else { + /* Make sure we have the operation argument */ + if (data_length > 2 && respbuf[header + 1] != ';') { + PRINTM(MERROR, + "No operation argument. Separate with ';'\n"); + ret = -EINVAL; + goto done; + } else { + respbuf[header + 1] = '\0'; + } + req->action = MLAN_ACT_SET; + + /* Only one IP is supported in current firmware */ + memset(misc->param.ipaddr_cfg.ip_addr[0], 0, IPADDR_LEN); + in4_pton(&respbuf[header + 2], + MIN((IPADDR_MAX_BUF - 3), (data_length - 2)), + misc->param.ipaddr_cfg.ip_addr[0], ' ', NULL); + misc->param.ipaddr_cfg.ip_addr_num = 1; + misc->param.ipaddr_cfg.ip_addr_type = IPADDR_TYPE_IPV4; + + if (woal_atoi(&op_code, &respbuf[header]) != + MLAN_STATUS_SUCCESS) { + ret = -EINVAL; + goto done; + } + misc->param.ipaddr_cfg.op_code = (t_u32)op_code; + } + + req->req_id = MLAN_IOCTL_MISC_CFG; + misc->sub_command = MLAN_OID_MISC_IP_ADDR; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (req->action == MLAN_ACT_GET) { + snprintf(respbuf, IPADDR_MAX_BUF, "%d;%d.%d.%d.%d", + misc->param.ipaddr_cfg.op_code, + misc->param.ipaddr_cfg.ip_addr[0][0], + misc->param.ipaddr_cfg.ip_addr[0][1], + misc->param.ipaddr_cfg.ip_addr[0][2], + misc->param.ipaddr_cfg.ip_addr[0][3]); + ret = IPADDR_MAX_BUF + 1; + } else { + ret = sprintf(respbuf, "OK\n") + 1; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get WPS session configurations + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_setwpssession(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_wps_cfg *pwps = NULL; + t_u32 data[1]; + int ret = 0; + int user_data_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset((char *)data, 0, sizeof(data)); + if (strlen(respbuf) == + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_WPSSESSION))) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_WPSSESSION), data, + ARRAY_SIZE(data), &user_data_len); + } + + if (user_data_len > 1) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wps_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + pwps = (mlan_ds_wps_cfg *)req->pbuf; + + req->req_id = MLAN_IOCTL_WPS_CFG; + req->action = MLAN_ACT_SET; + pwps->sub_command = MLAN_OID_WPS_CFG_SESSION; + + if (data[0] == 1) + pwps->param.wps_session = MLAN_WPS_CFG_SESSION_START; + else + pwps->param.wps_session = MLAN_WPS_CFG_SESSION_END; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + ret = sprintf(respbuf, "OK\n") + 1; +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Get OTP user data + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_otpuserdata(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data[1]; + int user_data_len = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *misc = NULL; + mlan_ds_misc_otp_user_data *otp = NULL; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (strlen(respbuf) == + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_OTPUSERDATA))) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_OTPUSERDATA), data, ARRAY_SIZE(data), + &user_data_len); + + if (user_data_len != 1) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + req->action = MLAN_ACT_GET; + req->req_id = MLAN_IOCTL_MISC_CFG; + + misc = (mlan_ds_misc_cfg *)req->pbuf; + misc->sub_command = MLAN_OID_MISC_OTP_USER_DATA; + misc->param.otp_user_data.user_data_length = data[0]; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + otp = (mlan_ds_misc_otp_user_data *)req->pbuf; + + if (req->action == MLAN_ACT_GET) { + ret = MIN(otp->user_data_length, data[0]); + memcpy(respbuf, otp->user_data, ret); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set / Get country code + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_set_get_countrycode(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) +{ + int ret = 0; + /* char data[COUNTRY_CODE_LEN] = {0, 0, 0}; */ + int header = 0, data_length = 0; /* wrq->u.data.length; */ + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *pcfg_misc = NULL; + mlan_ds_misc_country_code *country_code = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header = strlen(CMD_MARVELL) + strlen(PRIV_CMD_COUNTRYCODE); + data_length = strlen(respbuf) - header; + + if (data_length > COUNTRY_CODE_LEN) { + PRINTM(MERROR, "Invalid argument!\n"); + ret = -EINVAL; + goto done; + } + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + pcfg_misc = (mlan_ds_misc_cfg *)req->pbuf; + country_code = &pcfg_misc->param.country_code; + pcfg_misc->sub_command = MLAN_OID_MISC_COUNTRY_CODE; + req->req_id = MLAN_IOCTL_MISC_CFG; + + if (data_length <= 1) { + req->action = MLAN_ACT_GET; + } else { + memset(country_code->country_code, 0, COUNTRY_CODE_LEN); + memcpy(country_code->country_code, respbuf + header, + COUNTRY_CODE_LEN); + req->action = MLAN_ACT_SET; + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (req->action == MLAN_ACT_GET) { + ret = data_length = COUNTRY_CODE_LEN; + memset(respbuf + header, 0, COUNTRY_CODE_LEN); + memcpy(respbuf, country_code->country_code, COUNTRY_CODE_LEN); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get TCP Ack enhancement configurations + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_setgettcpackenh(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + t_u32 data[1]; + int ret = 0; + int user_data_len = 0; + + ENTER(); + + if (strlen(respbuf) == + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_TCPACKENH))) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_TCPACKENH), data, + ARRAY_SIZE(data), &user_data_len); + } + + if (user_data_len >= 2) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + + if (user_data_len == 0) { + /* get operation */ + respbuf[0] = priv->enable_tcp_ack_enh; + } else { + /* set operation */ + if (data[0] == MTRUE) { + PRINTM(MINFO, "Enabling TCP Ack enhancement\n"); + priv->enable_tcp_ack_enh = MTRUE; + } else if (data[0] == MFALSE) { + PRINTM(MINFO, "Disabling TCP Ack enhancement\n"); + priv->enable_tcp_ack_enh = MFALSE; + /* release the tcp sessions if any */ + woal_flush_tcp_sess_queue(priv); + } else { + PRINTM(MERROR, "Unknown option = %u\n", data[0]); + ret = -EINVAL; + goto done; + } + respbuf[0] = priv->enable_tcp_ack_enh; + } + ret = 1; + +done: + LEAVE(); + return ret; + +} + +#ifdef REASSOCIATION +/** + * @brief Set Asynced ESSID + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_assocessid(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_802_11_ssid req_ssid; + mlan_ssid_bssid ssid_bssid; + moal_handle *handle = priv->phandle; + int ret = 0; + t_u8 *essid_ptr; + t_u16 essid_length = 0; + + ENTER(); + + if (strlen(respbuf) == + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_ASSOCESSID))) { + PRINTM(MERROR, "No argument, invalid operation!\n"); + ret = -EINVAL; + LEAVE(); + return ret; + } else { + /* SET operation */ + essid_ptr = + respbuf + (strlen(CMD_MARVELL) + + strlen(PRIV_CMD_ASSOCESSID)); + essid_length = strlen(essid_ptr); + } + + /* Cancel re-association */ + priv->reassoc_required = MFALSE; + + if (MOAL_ACQ_SEMAPHORE_BLOCK(&handle->reassoc_sem)) { + PRINTM(MERROR, "Acquire semaphore error, woal_set_essid\n"); + ret = -EBUSY; + LEAVE(); + return ret; + } + + /* Check the size of the string */ + if (essid_length > MW_ESSID_MAX_SIZE + 1) { + ret = -E2BIG; + goto setessid_ret; + } + if (priv->scan_type == MLAN_SCAN_TYPE_PASSIVE) + woal_set_scan_type(priv, MLAN_SCAN_TYPE_ACTIVE); + memset(&req_ssid, 0, sizeof(mlan_802_11_ssid)); + memset(&ssid_bssid, 0, sizeof(mlan_ssid_bssid)); + + req_ssid.ssid_len = essid_length; + + /* Set the SSID */ + memcpy(req_ssid.ssid, essid_ptr, + MIN(req_ssid.ssid_len, MLAN_MAX_SSID_LENGTH)); + if (!req_ssid.ssid_len || (MFALSE == woal_ssid_valid(&req_ssid))) { + PRINTM(MERROR, "Invalid SSID - aborting set_essid\n"); + ret = -EINVAL; + goto setessid_ret; + } + + PRINTM(MINFO, "Requested new SSID = %s\n", (char *)req_ssid.ssid); + memcpy(&ssid_bssid.ssid, &req_ssid, sizeof(mlan_802_11_ssid)); + if (MTRUE == woal_is_connected(priv, &ssid_bssid)) { + PRINTM(MIOCTL, "Already connect to the network\n"); + ret = sprintf(respbuf, + "Has already connected to this ESSID!\n") + 1; + goto setessid_ret; + } + + memcpy(&priv->prev_ssid_bssid.ssid, &req_ssid, + sizeof(mlan_802_11_ssid)); + /* disconnect before driver assoc */ + woal_disconnect(priv, MOAL_IOCTL_WAIT, NULL); + priv->set_asynced_essid_flag = MTRUE; + priv->reassoc_required = MTRUE; + priv->phandle->is_reassoc_timer_set = MTRUE; + woal_mod_timer(&priv->phandle->reassoc_timer, 0); + ret = sprintf(respbuf, "%s\n", essid_ptr) + 1; + +setessid_ret: + if (priv->scan_type == MLAN_SCAN_TYPE_PASSIVE) + woal_set_scan_type(priv, MLAN_SCAN_TYPE_PASSIVE); + MOAL_REL_SEMAPHORE(&handle->reassoc_sem); + LEAVE(); + return ret; +} +#endif + +/** + * @brief Get wakeup reason + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_getwakeupreason(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_pm_cfg *pm_cfg = NULL; + t_u32 data; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (strlen(respbuf) == + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_WAKEUPREASON))) { + /* GET operation */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); + if (req == NULL) { + LEAVE(); + return -ENOMEM; + } + + pm_cfg = (mlan_ds_pm_cfg *)req->pbuf; + pm_cfg->sub_command = MLAN_OID_PM_HS_WAKEUP_REASON; + req->req_id = MLAN_IOCTL_PM_CFG; + req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + if (status != MLAN_STATUS_PENDING) + kfree(req); + goto done; + } else { + data = pm_cfg->param.wakeup_reason.hs_wakeup_reason; + sprintf(respbuf, " %d", data); + ret = strlen(respbuf) + 1; + kfree(req); + } + } else { + PRINTM(MERROR, "Not need argument, invalid operation!\n"); + ret = -EINVAL; + goto done; + } + +done: + LEAVE(); + return ret; + +} + +#ifdef STA_SUPPORT +/** + * @brief Set / Get listen interval + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_set_get_listeninterval(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) +{ + int data[1]; + int user_data_len = 0; + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_bss *pcfg_bss = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (strlen(respbuf) == + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_LISTENINTERVAL))) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_LISTENINTERVAL), data, + ARRAY_SIZE(data), &user_data_len); + } + + if (user_data_len > 1) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + pcfg_bss = (mlan_ds_bss *)req->pbuf; + pcfg_bss->sub_command = MLAN_OID_BSS_LISTEN_INTERVAL; + req->req_id = MLAN_IOCTL_BSS; + + if (user_data_len) { + pcfg_bss->param.listen_interval = (t_u16)data[0]; + req->action = MLAN_ACT_SET; + } else { + req->action = MLAN_ACT_GET; + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (req->action == MLAN_ACT_GET) { + sprintf(respbuf, "%d", pcfg_bss->param.listen_interval); + ret = strlen(respbuf) + 1; + } else { + ret = sprintf(respbuf, "OK\n") + 1; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} +#endif + +#ifdef DEBUG_LEVEL1 +/** + * @brief Set / Get driver debug level + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_set_get_drvdbg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data[4]; + int user_data_len = 0; + int ret = 0; + + ENTER(); + + if (strlen(respbuf) == (strlen(CMD_MARVELL) + strlen(PRIV_CMD_DRVDBG))) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_DRVDBG), data, ARRAY_SIZE(data), + &user_data_len); + } + + if (user_data_len > 1) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + + if (user_data_len) { + /* Get the driver debug bit masks from user */ + drvdbg = data[0]; + /* Set the driver debug bit masks into mlan */ + if (woal_set_drvdbg(priv, drvdbg)) { + PRINTM(MERROR, "Set drvdbg failed!\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + } + + ret = sizeof(drvdbg); + + memcpy(respbuf, &drvdbg, sizeof(drvdbg)); + + printk(KERN_ALERT "drvdbg = 0x%08x\n", drvdbg); +#ifdef DEBUG_LEVEL2 + printk(KERN_ALERT "MINFO (%08x) %s\n", MINFO, + (drvdbg & MINFO) ? "X" : ""); + printk(KERN_ALERT "MWARN (%08x) %s\n", MWARN, + (drvdbg & MWARN) ? "X" : ""); + printk(KERN_ALERT "MENTRY (%08x) %s\n", MENTRY, + (drvdbg & MENTRY) ? "X" : ""); +#endif + printk(KERN_ALERT "MMPA_D (%08x) %s\n", MMPA_D, + (drvdbg & MMPA_D) ? "X" : ""); + printk(KERN_ALERT "MIF_D (%08x) %s\n", MIF_D, + (drvdbg & MIF_D) ? "X" : ""); + printk(KERN_ALERT "MFW_D (%08x) %s\n", MFW_D, + (drvdbg & MFW_D) ? "X" : ""); + printk(KERN_ALERT "MEVT_D (%08x) %s\n", MEVT_D, + (drvdbg & MEVT_D) ? "X" : ""); + printk(KERN_ALERT "MCMD_D (%08x) %s\n", MCMD_D, + (drvdbg & MCMD_D) ? "X" : ""); + printk(KERN_ALERT "MDAT_D (%08x) %s\n", MDAT_D, + (drvdbg & MDAT_D) ? "X" : ""); + printk(KERN_ALERT "MIOCTL (%08x) %s\n", MIOCTL, + (drvdbg & MIOCTL) ? "X" : ""); + printk(KERN_ALERT "MINTR (%08x) %s\n", MINTR, + (drvdbg & MINTR) ? "X" : ""); + printk(KERN_ALERT "MEVENT (%08x) %s\n", MEVENT, + (drvdbg & MEVENT) ? "X" : ""); + printk(KERN_ALERT "MCMND (%08x) %s\n", MCMND, + (drvdbg & MCMND) ? "X" : ""); + printk(KERN_ALERT "MDATA (%08x) %s\n", MDATA, + (drvdbg & MDATA) ? "X" : ""); + printk(KERN_ALERT "MERROR (%08x) %s\n", MERROR, + (drvdbg & MERROR) ? "X" : ""); + printk(KERN_ALERT "MFATAL (%08x) %s\n", MFATAL, + (drvdbg & MFATAL) ? "X" : ""); + printk(KERN_ALERT "MMSG (%08x) %s\n", MMSG, + (drvdbg & MMSG) ? "X" : ""); + +done: + LEAVE(); + return ret; +} + +#endif + +/** + * @brief Set/Get Host Sleep configuration + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * @param invoke_hostcmd MTRUE --invoke HostCmd, otherwise MFALSE + * + * @return 0 --success, otherwise fail + */ +int +woal_priv_hscfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen, + BOOLEAN invoke_hostcmd) +{ + int data[3]; + int user_data_len = 0; + int ret = 0; + mlan_ds_hs_cfg hscfg; + t_u16 action; + mlan_bss_info bss_info; + int is_negative = MFALSE; + t_u8 *arguments = NULL; + + ENTER(); + + memset(data, 0, sizeof(data)); + memset(&hscfg, 0, sizeof(mlan_ds_hs_cfg)); + + if (strlen(respbuf) == (strlen(CMD_MARVELL) + strlen(PRIV_CMD_HSCFG))) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + arguments = + respbuf + strlen(CMD_MARVELL) + strlen(PRIV_CMD_HSCFG); + if (*arguments == '-') { + is_negative = MTRUE; + arguments += 1; + } + parse_arguments(arguments, data, ARRAY_SIZE(data), + &user_data_len); + + if (is_negative == MTRUE) { + if (data[0] == 1) { + data[0] = -1; + } else { + PRINTM(MERROR, "Invalid arguments\n"); + ret = -EINVAL; + goto done; + } + } + } + + if (sizeof(int) * user_data_len > sizeof(data)) { + PRINTM(MERROR, "Too many arguments\n"); + LEAVE(); + return -EINVAL; + } + + if (user_data_len == 0) { + action = MLAN_ACT_GET; + } else { + if (user_data_len >= 1 && user_data_len <= 3) { + action = MLAN_ACT_SET; + } else { + PRINTM(MERROR, "Invalid arguments\n"); + ret = -EINVAL; + goto done; + } + } + + /* HS config is blocked if HS is already activated */ + if (user_data_len && + (data[0] != HOST_SLEEP_CFG_CANCEL || invoke_hostcmd == MFALSE)) { + memset(&bss_info, 0, sizeof(bss_info)); + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + if (bss_info.is_hs_configured) { + PRINTM(MERROR, "HS already configured\n"); + ret = -EFAULT; + goto done; + } + } + + /* Do a GET first if some arguments are not provided */ + if (user_data_len >= 1 && user_data_len < 3) { + woal_set_get_hs_params(priv, MLAN_ACT_GET, MOAL_IOCTL_WAIT, + &hscfg); + } + + if (user_data_len) + hscfg.conditions = data[0]; + if (user_data_len >= 2) + hscfg.gpio = data[1]; + if (user_data_len == 3) + hscfg.gap = data[2]; + + if ((invoke_hostcmd == MTRUE) && (action == MLAN_ACT_SET)) { + /* Need to issue an extra IOCTL first to set up parameters */ + hscfg.is_invoke_hostcmd = MFALSE; + if (MLAN_STATUS_SUCCESS != + woal_set_get_hs_params(priv, MLAN_ACT_SET, MOAL_IOCTL_WAIT, + &hscfg)) { + ret = -EFAULT; + goto done; + } + } + hscfg.is_invoke_hostcmd = invoke_hostcmd; + if (MLAN_STATUS_SUCCESS != + woal_set_get_hs_params(priv, action, MOAL_IOCTL_WAIT, &hscfg)) { + ret = -EFAULT; + goto done; + } + + if (action == MLAN_ACT_GET) { + /* Return the current driver host sleep configurations */ + memcpy(respbuf, &hscfg, sizeof(mlan_ds_hs_cfg)); + ret = sizeof(mlan_ds_hs_cfg); + } +done: + LEAVE(); + return ret; +} + +/** + * @brief Set Host Sleep parameters + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +int +woal_priv_hssetpara(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data[3]; + int user_data_len = 0; + int ret = 0; + + ENTER(); + + if (strlen(respbuf) == + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_HSSETPARA))) { + PRINTM(MERROR, "Invalid arguments\n"); + ret = -EINVAL; + goto done; + } else { + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_HSSETPARA), data, + ARRAY_SIZE(data), &user_data_len); + } + + if (sizeof(int) * user_data_len > sizeof(data)) { + PRINTM(MERROR, "Too many arguments\n"); + LEAVE(); + return -EINVAL; + } + + if (user_data_len >= 1 && user_data_len <= 3) { + sprintf(respbuf, "%s%s%s", CMD_MARVELL, PRIV_CMD_HSCFG, + respbuf + (strlen(CMD_MARVELL) + + strlen(PRIV_CMD_HSSETPARA))); + respbuflen = strlen(respbuf); + ret = woal_priv_hscfg(priv, respbuf, respbuflen, MFALSE); + goto done; + } +done: + LEAVE(); + return ret; +} + +/** + * @brief Set/Get scan configuration parameters + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +int +woal_priv_set_get_scancfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + int user_data_len = 0; + int arg_len = 7; + int data[arg_len]; + mlan_ds_scan *scan = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(data, 0, sizeof(data)); + if (strlen(respbuf) == (strlen(CMD_MARVELL) + strlen(PRIV_CMD_SCANCFG))) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_SCANCFG), data, + ARRAY_SIZE(data), &user_data_len); + } + + if (sizeof(int) * user_data_len > sizeof(data)) { + PRINTM(MERROR, "Too many arguments\n"); + LEAVE(); + return -EINVAL; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_scan)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + scan = (mlan_ds_scan *)req->pbuf; + scan->sub_command = MLAN_OID_SCAN_CONFIG; + req->req_id = MLAN_IOCTL_SCAN; + + if (user_data_len) { + if ((data[0] < 0) || (data[0] > MLAN_SCAN_TYPE_PASSIVE)) { + PRINTM(MERROR, "Invalid argument for scan type\n"); + ret = -EINVAL; + goto done; + } + if ((data[1] < 0) || (data[1] > MLAN_SCAN_MODE_ANY)) { + PRINTM(MERROR, "Invalid argument for scan mode\n"); + ret = -EINVAL; + goto done; + } + if ((data[2] < 0) || (data[2] > MAX_PROBES)) { + PRINTM(MERROR, "Invalid argument for scan probes\n"); + ret = -EINVAL; + goto done; + } + if (((data[3] < 0) || + (data[3] > MRVDRV_MAX_ACTIVE_SCAN_CHAN_TIME)) || + ((data[4] < 0) || + (data[4] > MRVDRV_MAX_ACTIVE_SCAN_CHAN_TIME)) || + ((data[5] < 0) || + (data[5] > MRVDRV_MAX_PASSIVE_SCAN_CHAN_TIME))) { + PRINTM(MERROR, "Invalid argument for scan time\n"); + ret = -EINVAL; + goto done; + } + if ((data[6] < 0) || (data[6] > 1)) { + PRINTM(MERROR, "Invalid argument for extended scan\n"); + ret = -EINVAL; + goto done; + } + req->action = MLAN_ACT_SET; + memcpy(&scan->param.scan_cfg, data, sizeof(data)); + } else + req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (!user_data_len) { + memcpy(respbuf, &scan->param.scan_cfg, sizeof(mlan_scan_cfg)); + ret = sizeof(mlan_scan_cfg); + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +#ifdef STA_SUPPORT +/** + * @brief Set AP settings + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written if successful, otherwise fail + */ +static int +woal_priv_set_ap(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + t_u8 *data_ptr; + const t_u8 bcast[MLAN_MAC_ADDR_LENGTH] = + { 255, 255, 255, 255, 255, 255 }; + const t_u8 zero_mac[MLAN_MAC_ADDR_LENGTH] = { 0, 0, 0, 0, 0, 0 }; + mlan_ssid_bssid ssid_bssid; + mlan_bss_info bss_info; + struct mwreq *mwr; + struct sockaddr *awrq; + + ENTER(); + data_ptr = respbuf + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_SET_AP)); + + mwr = (struct mwreq *)data_ptr; + + if (mwr->u.ap_addr.sa_family != ARPHRD_ETHER) { + ret = -EINVAL; + goto done; + } + + awrq = (struct sockaddr *)&(mwr->u.ap_addr); + + PRINTM(MINFO, "ASSOC: WAP: sa_data: " MACSTR "\n", + MAC2STR((t_u8 *)awrq->sa_data)); + + if (MLAN_STATUS_SUCCESS != + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info)) { + ret = -EFAULT; + goto done; + } +#ifdef REASSOCIATION + /* Cancel re-association */ + priv->reassoc_required = MFALSE; +#endif + + /* zero_mac means disconnect */ + if (!memcmp(zero_mac, awrq->sa_data, MLAN_MAC_ADDR_LENGTH)) { + woal_disconnect(priv, MOAL_IOCTL_WAIT, NULL); + goto done; + } + + /* Broadcast MAC means search for best network */ + memset(&ssid_bssid, 0, sizeof(mlan_ssid_bssid)); + + if (memcmp(bcast, awrq->sa_data, MLAN_MAC_ADDR_LENGTH)) { + /* Check if we are already assoicated to the AP */ + if (bss_info.media_connected == MTRUE) { + if (!memcmp(awrq->sa_data, &bss_info.bssid, ETH_ALEN)) + goto done; + } + memcpy(&ssid_bssid.bssid, awrq->sa_data, ETH_ALEN); + } + + if (MLAN_STATUS_SUCCESS != woal_find_best_network(priv, + MOAL_IOCTL_WAIT, + &ssid_bssid)) { + PRINTM(MERROR, + "ASSOC: WAP: MAC address not found in BSSID List\n"); + ret = -ENETUNREACH; + goto done; + } + /* Zero SSID implies use BSSID to connect */ + memset(&ssid_bssid.ssid, 0, sizeof(mlan_802_11_ssid)); + if (MLAN_STATUS_SUCCESS != woal_bss_start(priv, + MOAL_IOCTL_WAIT, + &ssid_bssid)) { + ret = -EFAULT; + goto done; + } +#ifdef REASSOCIATION + memset(&bss_info, 0, sizeof(bss_info)); + if (MLAN_STATUS_SUCCESS != woal_get_bss_info(priv, + MOAL_IOCTL_WAIT, + &bss_info)) { + ret = -EFAULT; + goto done; + } + memcpy(&priv->prev_ssid_bssid.ssid, &bss_info.ssid, + sizeof(mlan_802_11_ssid)); + memcpy(&priv->prev_ssid_bssid.bssid, &bss_info.bssid, + MLAN_MAC_ADDR_LENGTH); +#endif /* REASSOCIATION */ + +done: + LEAVE(); + return ret; + +} +#endif + +/** + * @brief Set BSS mode + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written if successful, otherwise fail + */ +static int +woal_priv_set_bss_mode(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *req = NULL; + struct mwreq *mwr; + t_u8 *data_ptr; + t_u32 mode; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + data_ptr = + respbuf + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_SET_BSS_MODE)); + + mwr = (struct mwreq *)data_ptr; + mode = mwr->u.mode; + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_BSS_MODE; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_SET; + + switch (mode) { + case MW_MODE_INFRA: + bss->param.bss_mode = MLAN_BSS_MODE_INFRA; + break; + case MW_MODE_ADHOC: + bss->param.bss_mode = MLAN_BSS_MODE_IBSS; + break; + case MW_MODE_AUTO: + bss->param.bss_mode = MLAN_BSS_MODE_AUTO; + break; + default: + ret = -EINVAL; + break; + } + if (ret) + goto done; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +#ifdef STA_SUPPORT +/** + * @brief Set power management + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written if successful, otherwise fail + */ +static int +woal_priv_set_power(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + struct mwreq *mwr; + t_u8 *data_ptr; + int ret = 0, disabled; + + ENTER(); + + if (hw_test) { + PRINTM(MIOCTL, "block set power in hw_test mode\n"); + LEAVE(); + return ret; + } + + data_ptr = respbuf + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_SET_POWER)); + + mwr = (struct mwreq *)data_ptr; + disabled = mwr->u.power.disabled; + + if (MLAN_STATUS_SUCCESS != woal_set_get_power_mgmt(priv, + MLAN_ACT_SET, + &disabled, + mwr->u.power.flags, + MOAL_IOCTL_WAIT)) { + return -EFAULT; + } + LEAVE(); + return ret; +} + +/** + * @brief Set essid + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written if successful, otherwise fail + */ +static int +woal_priv_set_essid(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_802_11_ssid req_ssid; + mlan_ssid_bssid ssid_bssid; +#ifdef REASSOCIATION + moal_handle *handle = priv->phandle; + mlan_bss_info bss_info; +#endif + int ret = 0; + t_u32 mode = 0; + struct mwreq *mwr; + t_u8 *data_ptr; + + ENTER(); + + data_ptr = respbuf + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_SET_ESSID)); + + mwr = (struct mwreq *)data_ptr; + +#ifdef REASSOCIATION + /* Cancel re-association */ + priv->reassoc_required = MFALSE; + + if (MOAL_ACQ_SEMAPHORE_BLOCK(&handle->reassoc_sem)) { + PRINTM(MERROR, "Acquire semaphore error, woal_set_essid\n"); + LEAVE(); + return -EBUSY; + } +#endif /* REASSOCIATION */ + + /* Check the size of the string */ + if (mwr->u.essid.length > MW_ESSID_MAX_SIZE + 1) { + ret = -E2BIG; + goto setessid_ret; + } + if (priv->scan_type == MLAN_SCAN_TYPE_PASSIVE) + woal_set_scan_type(priv, MLAN_SCAN_TYPE_ACTIVE); + memset(&req_ssid, 0, sizeof(mlan_802_11_ssid)); + memset(&ssid_bssid, 0, sizeof(mlan_ssid_bssid)); + + req_ssid.ssid_len = mwr->u.essid.length; + + /* Check if we asked for 'any' or 'particular' */ + if (!mwr->u.essid.flags) { +#ifdef REASSOCIATION + if (!req_ssid.ssid_len) { + memset(&priv->prev_ssid_bssid.ssid, 0x00, + sizeof(mlan_802_11_ssid)); + memset(&priv->prev_ssid_bssid.bssid, 0x00, + MLAN_MAC_ADDR_LENGTH); + goto setessid_ret; + } +#endif + /* Do normal SSID scanning */ + if (MLAN_STATUS_SUCCESS != + woal_request_scan(priv, MOAL_IOCTL_WAIT, NULL)) { + ret = -EFAULT; + goto setessid_ret; + } + } else { + /* Set the SSID */ + memcpy(req_ssid.ssid, mwr->u.essid.pointer, + MIN(req_ssid.ssid_len, MLAN_MAX_SSID_LENGTH)); + if (!req_ssid.ssid_len || + (MFALSE == woal_ssid_valid(&req_ssid))) { + PRINTM(MERROR, "Invalid SSID - aborting set_essid\n"); + ret = -EINVAL; + goto setessid_ret; + } + + PRINTM(MINFO, "Requested new SSID = %s\n", + (char *)req_ssid.ssid); + memcpy(&ssid_bssid.ssid, &req_ssid, sizeof(mlan_802_11_ssid)); + if (MTRUE == woal_is_connected(priv, &ssid_bssid)) { + PRINTM(MIOCTL, "Already connect to the network\n"); + goto setessid_ret; + } + + if (mwr->u.essid.flags != 0xFFFF) { + if (MLAN_STATUS_SUCCESS != + woal_find_essid(priv, &ssid_bssid, + MOAL_IOCTL_WAIT)) { + /* Do specific SSID scanning */ + if (MLAN_STATUS_SUCCESS != + woal_request_scan(priv, MOAL_IOCTL_WAIT, + &req_ssid)) { + ret = -EFAULT; + goto setessid_ret; + } + } + } + + } + + mode = woal_get_mode(priv, MOAL_IOCTL_WAIT); + + if (mode != MW_MODE_ADHOC) { + if (MLAN_STATUS_SUCCESS != + woal_find_best_network(priv, MOAL_IOCTL_WAIT, + &ssid_bssid)) { + ret = -EFAULT; + goto setessid_ret; + } + } else if (MLAN_STATUS_SUCCESS != + woal_find_best_network(priv, MOAL_IOCTL_WAIT, &ssid_bssid)) + /* Adhoc start, Check the channel command */ + woal_11h_channel_check_ioctl(priv, MOAL_IOCTL_WAIT); + + /* Connect to BSS by ESSID */ + memset(&ssid_bssid.bssid, 0, MLAN_MAC_ADDR_LENGTH); + + if (MLAN_STATUS_SUCCESS != woal_bss_start(priv, + MOAL_IOCTL_WAIT, + &ssid_bssid)) { + ret = -EFAULT; + goto setessid_ret; + } +#ifdef REASSOCIATION + memset(&bss_info, 0, sizeof(bss_info)); + if (MLAN_STATUS_SUCCESS != woal_get_bss_info(priv, + MOAL_IOCTL_WAIT, + &bss_info)) { + ret = -EFAULT; + goto setessid_ret; + } + memcpy(&priv->prev_ssid_bssid.ssid, &bss_info.ssid, + sizeof(mlan_802_11_ssid)); + memcpy(&priv->prev_ssid_bssid.bssid, &bss_info.bssid, + MLAN_MAC_ADDR_LENGTH); +#endif /* REASSOCIATION */ + +setessid_ret: + if (priv->scan_type == MLAN_SCAN_TYPE_PASSIVE) + woal_set_scan_type(priv, MLAN_SCAN_TYPE_PASSIVE); +#ifdef REASSOCIATION + MOAL_REL_SEMAPHORE(&handle->reassoc_sem); +#endif + LEAVE(); + return ret; +} + +/** + * @brief Set authentication mode parameters + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written if successful, otherwise fail + */ +static int +woal_priv_set_auth(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + struct mwreq *mwr; + t_u8 *data_ptr; + int ret = 0; + t_u32 auth_mode = 0; + t_u32 encrypt_mode = 0; + + ENTER(); + + data_ptr = respbuf + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_SET_AUTH)); + + mwr = (struct mwreq *)data_ptr; + + switch (mwr->u.param.flags & MW_AUTH_INDEX) { + case MW_AUTH_CIPHER_PAIRWISE: + case MW_AUTH_CIPHER_GROUP: + if (mwr->u.param.value & MW_AUTH_CIPHER_NONE) + encrypt_mode = MLAN_ENCRYPTION_MODE_NONE; + else if (mwr->u.param.value & MW_AUTH_CIPHER_WEP40) + encrypt_mode = MLAN_ENCRYPTION_MODE_WEP40; + else if (mwr->u.param.value & MW_AUTH_CIPHER_WEP104) + encrypt_mode = MLAN_ENCRYPTION_MODE_WEP104; + else if (mwr->u.param.value & MW_AUTH_CIPHER_TKIP) + encrypt_mode = MLAN_ENCRYPTION_MODE_TKIP; + else if (mwr->u.param.value & MW_AUTH_CIPHER_CCMP) + encrypt_mode = MLAN_ENCRYPTION_MODE_CCMP; + if (MLAN_STATUS_SUCCESS != + woal_set_encrypt_mode(priv, MOAL_IOCTL_WAIT, encrypt_mode)) + ret = -EFAULT; + break; + case MW_AUTH_80211_AUTH_ALG: + switch (mwr->u.param.value) { + case MW_AUTH_ALG_SHARED_KEY: + PRINTM(MINFO, "Auth mode shared key!\n"); + auth_mode = MLAN_AUTH_MODE_SHARED; + break; + case MW_AUTH_ALG_LEAP: + PRINTM(MINFO, "Auth mode LEAP!\n"); + auth_mode = MLAN_AUTH_MODE_NETWORKEAP; + break; + case MW_AUTH_ALG_OPEN_SYSTEM: + PRINTM(MINFO, "Auth mode open!\n"); + auth_mode = MLAN_AUTH_MODE_OPEN; + break; + case MW_AUTH_ALG_SHARED_KEY | MW_AUTH_ALG_OPEN_SYSTEM: + default: + PRINTM(MINFO, "Auth mode auto!\n"); + auth_mode = MLAN_AUTH_MODE_AUTO; + break; + } + if (MLAN_STATUS_SUCCESS != + woal_set_auth_mode(priv, MOAL_IOCTL_WAIT, auth_mode)) + ret = -EFAULT; + break; + case MW_AUTH_WPA_ENABLED: + if (MLAN_STATUS_SUCCESS != + woal_set_wpa_enable(priv, MOAL_IOCTL_WAIT, + mwr->u.param.value)) + ret = -EFAULT; + break; +#define MW_AUTH_WAPI_ENABLED 0x20 + case MW_AUTH_WAPI_ENABLED: + if (MLAN_STATUS_SUCCESS != + woal_set_wapi_enable(priv, MOAL_IOCTL_WAIT, + mwr->u.param.value)) + ret = -EFAULT; + break; + case MW_AUTH_WPA_VERSION: + /* set WPA_VERSION_DISABLED/VERSION_WPA/VERSION_WP2 */ + priv->wpa_version = mwr->u.param.value; + break; + case MW_AUTH_KEY_MGMT: + /* set KEY_MGMT_802_1X/KEY_MGMT_PSK */ + priv->key_mgmt = mwr->u.param.value; + break; + case MW_AUTH_TKIP_COUNTERMEASURES: + case MW_AUTH_DROP_UNENCRYPTED: + case MW_AUTH_RX_UNENCRYPTED_EAPOL: + case MW_AUTH_ROAMING_CONTROL: + case MW_AUTH_PRIVACY_INVOKED: + break; + default: + ret = -EOPNOTSUPP; + break; + } + LEAVE(); + return ret; +} + +/** + * @brief Get current BSSID + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written if successful else negative value + */ +static int +woal_priv_get_ap(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + struct mwreq *mwr; + t_u8 *data_ptr; + int ret = 0; + mlan_bss_info bss_info; + + ENTER(); + + data_ptr = respbuf + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_GET_AP)); + + mwr = (struct mwreq *)data_ptr; + + memset(&bss_info, 0, sizeof(bss_info)); + + ret = woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + if (ret != MLAN_STATUS_SUCCESS) + return -EFAULT; + + if (bss_info.media_connected == MTRUE) { + memcpy(mwr->u.ap_addr.sa_data, &bss_info.bssid, + MLAN_MAC_ADDR_LENGTH); + } else { + memset(mwr->u.ap_addr.sa_data, 0, MLAN_MAC_ADDR_LENGTH); + } + mwr->u.ap_addr.sa_family = ARPHRD_ETHER; + ret = strlen(CMD_MARVELL) + strlen(PRIV_CMD_GET_AP) + + sizeof(struct mwreq); + + LEAVE(); + return ret; +} + +/** + * @brief Get power management + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written if successful else negative value + */ +static int +woal_priv_get_power(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + struct mwreq *mwr; + t_u8 *data_ptr; + int ret = 0, ps_mode; + + ENTER(); + + data_ptr = respbuf + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_GET_POWER)); + + mwr = (struct mwreq *)data_ptr; + + if (MLAN_STATUS_SUCCESS != woal_set_get_power_mgmt(priv, + MLAN_ACT_GET, + &ps_mode, 0, + MOAL_IOCTL_WAIT)) { + return -EFAULT; + } + + if (ps_mode) + mwr->u.power.disabled = 0; + else + mwr->u.power.disabled = 1; + + mwr->u.power.value = 0; + ret = strlen(CMD_MARVELL) + strlen(PRIV_CMD_GET_POWER) + + sizeof(struct mwreq); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get power save mode + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +static int +woal_priv_set_get_psmode(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + int data = 0; + int user_data_len = 0, header_len = 0; + t_u32 action = MLAN_ACT_GET; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_PSMODE); + + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + action = MLAN_ACT_GET; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, + sizeof(data) / sizeof(int), &user_data_len); + action = MLAN_ACT_SET; + } + + if (sizeof(int) * user_data_len > sizeof(data)) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + + /* Flip the value */ + data = !data; + + if (MLAN_STATUS_SUCCESS != + woal_set_get_power_mgmt(priv, action, &data, 0, MOAL_IOCTL_WAIT)) { + ret = -EFAULT; + goto done; + } + + if (action == MLAN_ACT_SET) + data = !data; + + memcpy(respbuf, (t_u8 *)&data, sizeof(data)); + ret = sizeof(data); + +done: + LEAVE(); + return ret; +} +#endif /* STA_SUPPORT */ + +/** + * @brief Performs warm reset + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written if successful else negative value + */ +static int +woal_priv_warmreset(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + int intf_num; + moal_handle *handle = priv->phandle; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *misc = NULL; +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) +#if defined(STA_WEXT) || defined(UAP_WEXT) + t_u8 bss_role = MLAN_BSS_ROLE_STA; +#endif +#endif +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + woal_cancel_cac_block(priv); + + /* Reset all interfaces */ + ret = woal_reset_intf(priv, MOAL_IOCTL_WAIT, MTRUE); + + /* Initialize private structures */ + for (intf_num = 0; intf_num < handle->priv_num; intf_num++) { + woal_init_priv(handle->priv[intf_num], MOAL_IOCTL_WAIT); +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) +#if defined(STA_WEXT) || defined(UAP_WEXT) + if ((handle->priv[intf_num]->bss_type == + MLAN_BSS_TYPE_WIFIDIRECT) && + (GET_BSS_ROLE(handle->priv[intf_num]) == + MLAN_BSS_ROLE_UAP)) { + if (MLAN_STATUS_SUCCESS != + woal_bss_role_cfg(handle->priv[intf_num], + MLAN_ACT_SET, MOAL_IOCTL_WAIT, + &bss_role)) { + ret = -EFAULT; + goto done; + } + } +#endif /* STA_WEXT || UAP_WEXT */ +#endif /* STA_SUPPORT && UAP_SUPPORT */ +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ + } + + /* Restart the firmware */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req) { + misc = (mlan_ds_misc_cfg *)req->pbuf; + misc->sub_command = MLAN_OID_MISC_WARM_RESET; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = MLAN_ACT_SET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + if (status != MLAN_STATUS_PENDING) + kfree(req); + goto done; + } + kfree(req); + } + + /* Enable interfaces */ + for (intf_num = 0; intf_num < handle->priv_num; intf_num++) { + netif_device_attach(handle->priv[intf_num]->netdev); + woal_start_queue(handle->priv[intf_num]->netdev); + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Set/Get TX power configurations + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +static int +woal_priv_txpowercfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data[5]; + int user_data_len; + int ret = 0; + mlan_bss_info bss_info; + mlan_ds_power_cfg *pcfg = NULL; + mlan_ioctl_req *req = NULL; + t_u8 *arguments = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + memset(data, 0, sizeof(data)); + memset(&bss_info, 0, sizeof(bss_info)); + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + + if (strlen(respbuf) == + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_TXPOWERCFG))) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + arguments = + respbuf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_TXPOWERCFG); + parse_arguments(arguments, data, ARRAY_SIZE(data), + &user_data_len); + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_power_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + pcfg = (mlan_ds_power_cfg *)req->pbuf; + pcfg->sub_command = MLAN_OID_POWER_CFG_EXT; + req->req_id = MLAN_IOCTL_POWER_CFG; + + if (!user_data_len) + req->action = MLAN_ACT_GET; + else { + /* SET operation */ + req->action = MLAN_ACT_SET; + if (sizeof(int) * user_data_len > sizeof(data)) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + switch (user_data_len) { + case 1: + if (data[0] == 0xFF) + pcfg->param.power_ext.power_group[0]. + rate_format = TX_PWR_CFG_AUTO_CTRL_OFF; + else + ret = -EINVAL; + break; + case 3: + case 5: + switch (data[0]) { + case 0: /* LG */ + pcfg->param.power_ext.power_group[0]. + rate_format = MLAN_RATE_FORMAT_LG; + pcfg->param.power_ext.power_group[0].bandwidth = + MLAN_HT_BW20; + break; + case 1: /* 20 MHz HT */ + pcfg->param.power_ext.power_group[0]. + rate_format = MLAN_RATE_FORMAT_HT; + pcfg->param.power_ext.power_group[0].bandwidth = + MLAN_HT_BW20; + break; + case 2: /* 40 MHz HT */ + pcfg->param.power_ext.power_group[0]. + rate_format = MLAN_RATE_FORMAT_HT; + pcfg->param.power_ext.power_group[0].bandwidth = + MLAN_HT_BW40; + break; + case 3: /* 1 NSS 20 MHZ VHT */ + pcfg->param.power_ext.power_group[0]. + rate_format = MLAN_RATE_FORMAT_VHT; + pcfg->param.power_ext.power_group[0].bandwidth = + MLAN_HT_BW20; + pcfg->param.power_ext.power_group[0].nss = 1; + break; + case 4: /* 2 NSS 20 MHZ VHT */ + pcfg->param.power_ext.power_group[0]. + rate_format = MLAN_RATE_FORMAT_VHT; + pcfg->param.power_ext.power_group[0].bandwidth = + MLAN_HT_BW20; + pcfg->param.power_ext.power_group[0].nss = 2; + break; + case 5: /* 1 NSS 40 MHZ VHT */ + pcfg->param.power_ext.power_group[0]. + rate_format = MLAN_RATE_FORMAT_VHT; + pcfg->param.power_ext.power_group[0].bandwidth = + MLAN_HT_BW40; + pcfg->param.power_ext.power_group[0].nss = 1; + break; + case 6: /* 2 NSS 40 MHZ VHT */ + pcfg->param.power_ext.power_group[0]. + rate_format = MLAN_RATE_FORMAT_VHT; + pcfg->param.power_ext.power_group[0].bandwidth = + MLAN_HT_BW40; + pcfg->param.power_ext.power_group[0].nss = 2; + break; + case 7: /* 1 NSS 80 MHZ VHT */ + pcfg->param.power_ext.power_group[0]. + rate_format = MLAN_RATE_FORMAT_VHT; + pcfg->param.power_ext.power_group[0].bandwidth = + MLAN_VHT_BW80; + pcfg->param.power_ext.power_group[0].nss = 1; + break; + case 8: /* 2 NSS 80 MHZ VHT */ + pcfg->param.power_ext.power_group[0]. + rate_format = MLAN_RATE_FORMAT_VHT; + pcfg->param.power_ext.power_group[0].bandwidth = + MLAN_VHT_BW80; + pcfg->param.power_ext.power_group[0].nss = 2; + break; + default: + ret = -EINVAL; + break; + } + pcfg->param.power_ext.power_group[0].first_rate_ind = + data[1]; + pcfg->param.power_ext.power_group[0].last_rate_ind = + data[1]; + if (data[2] < bss_info.min_power_level) { + PRINTM(MERROR, + "The set powercfg rate value %d dBm is out of range (%d dBm-%d dBm)!\n", + data[2], (int)bss_info.min_power_level, + (int)bss_info.max_power_level); + ret = -EINVAL; + break; + } + if (data[2] > bss_info.max_power_level) { + PRINTM(MERROR, + "The set powercfg rate value %d dBm is out of range (%d dBm-%d dBm)!\n", + data[2], (int)bss_info.min_power_level, + (int)bss_info.max_power_level); + ret = -EINVAL; + break; + } + pcfg->param.power_ext.power_group[0].power_min = + data[2]; + pcfg->param.power_ext.power_group[0].power_max = + data[2]; + pcfg->param.power_ext.power_group[0].power_step = 0; + pcfg->param.power_ext.num_pwr_grp = 1; + + break; + default: + ret = -EINVAL; + break; + } + if (ret) + goto done; + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (!user_data_len) { + /* GET operation */ + memcpy(respbuf, (t_u8 *)&pcfg->param.power_ext, + sizeof(pcfg->param.power_ext.num_pwr_grp) + + (pcfg->param.power_ext.num_pwr_grp * + sizeof(mlan_power_group))); + ret = sizeof(pcfg->param.power_ext.num_pwr_grp) + + (pcfg->param.power_ext.num_pwr_grp * + sizeof(mlan_power_group)); + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get PS configuration parameters + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +static int +woal_priv_pscfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data[7] = { 0 }, ret = 0; + mlan_ds_pm_cfg *pm_cfg = NULL; + mlan_ioctl_req *req = NULL; + int allowed = 3; + int i = 3; + int user_data_len = 0, header_len = 0; + t_u8 *arguments = NULL, *space_ind = NULL; + t_u32 is_negative_1 = MFALSE, is_negative_2 = MFALSE; + mlan_status status = MLAN_STATUS_SUCCESS; + gfp_t flag; + + ENTER(); + + allowed++; /* For ad-hoc awake period parameter */ + allowed++; /* For beacon missing timeout parameter */ + allowed += 2; /* For delay to PS and PS mode parameters */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_PSCFG); + + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + flag = (in_atomic() || + irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + arguments = kzalloc(strlen(respbuf) * sizeof(char), flag); + if (arguments == NULL) { + ret = -ENOMEM; + goto done; + } + strcpy(arguments, respbuf + header_len); + if (*(char *)arguments == '-') { + is_negative_1 = MTRUE; + arguments += sizeof(char); + } + space_ind = strstr((char *)arguments, " "); + if (space_ind) + space_ind = strstr(space_ind + 1, " "); + if (space_ind) { + if (*(char *)(space_ind + 1) == '-') { + is_negative_2 = MTRUE; + arguments[space_ind + 1 - arguments] = '\0'; + strcat(arguments, space_ind + 2); + } + } + parse_arguments(arguments, data, ARRAY_SIZE(data), + &user_data_len); + if (is_negative_1 == MTRUE) + data[0] = -1; + if (is_negative_2 == MTRUE) + data[2] = -1; + } + + if (user_data_len && user_data_len > allowed) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + pm_cfg = (mlan_ds_pm_cfg *)req->pbuf; + pm_cfg->sub_command = MLAN_OID_PM_CFG_PS_CFG; + req->req_id = MLAN_IOCTL_PM_CFG; + if (user_data_len) { + if ((data[0] < PS_NULL_DISABLE)) { + PRINTM(MERROR, + "Invalid argument for PS null interval\n"); + ret = -EINVAL; + goto done; + } + if ((data[1] != MRVDRV_IGNORE_MULTIPLE_DTIM) + && (data[1] != MRVDRV_MATCH_CLOSEST_DTIM) + && ((data[1] < MRVDRV_MIN_MULTIPLE_DTIM) + || (data[1] > MRVDRV_MAX_MULTIPLE_DTIM))) { + PRINTM(MERROR, "Invalid argument for multiple DTIM\n"); + ret = -EINVAL; + goto done; + } + + if ((data[2] < MRVDRV_MIN_LISTEN_INTERVAL) + && (data[2] != MRVDRV_LISTEN_INTERVAL_DISABLE)) { + PRINTM(MERROR, + "Invalid argument for listen interval\n"); + ret = -EINVAL; + goto done; + } + + if ((data[i] != SPECIAL_ADHOC_AWAKE_PD) && + ((data[i] < MIN_ADHOC_AWAKE_PD) || + (data[i] > MAX_ADHOC_AWAKE_PD))) { + PRINTM(MERROR, + "Invalid argument for adhoc awake period\n"); + ret = -EINVAL; + goto done; + } + i++; + if ((data[i] != DISABLE_BCN_MISS_TO) && + ((data[i] < MIN_BCN_MISS_TO) || + (data[i] > MAX_BCN_MISS_TO))) { + PRINTM(MERROR, + "Invalid argument for beacon miss timeout\n"); + ret = -EINVAL; + goto done; + } + i++; + if (user_data_len < allowed - 1) + data[i] = DELAY_TO_PS_UNCHANGED; + else if ((data[i] < MIN_DELAY_TO_PS) || + (data[i] > MAX_DELAY_TO_PS)) { + PRINTM(MERROR, "Invalid argument for delay to PS\n"); + ret = -EINVAL; + goto done; + } + i++; + if ((data[i] != PS_MODE_UNCHANGED) && (data[i] != PS_MODE_AUTO) + && (data[i] != PS_MODE_POLL) && (data[i] != PS_MODE_NULL)) { + PRINTM(MERROR, "Invalid argument for PS mode\n"); + ret = -EINVAL; + goto done; + } + i++; + req->action = MLAN_ACT_SET; + memcpy(&pm_cfg->param.ps_cfg, data, + MIN(sizeof(pm_cfg->param.ps_cfg), sizeof(data))); + } else + req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + memcpy(data, &pm_cfg->param.ps_cfg, + MIN((sizeof(int) * allowed), sizeof(pm_cfg->param.ps_cfg))); + memcpy(respbuf, (t_u8 *)data, sizeof(int) * allowed); + ret = sizeof(int) * allowed; + if (req->action == MLAN_ACT_SET) { + pm_cfg = (mlan_ds_pm_cfg *)req->pbuf; + pm_cfg->sub_command = MLAN_OID_PM_CFG_IEEE_PS; + pm_cfg->param.ps_mode = 1; + req->req_id = MLAN_IOCTL_PM_CFG; + req->action = MLAN_ACT_SET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + kfree(arguments); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get sleep period + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +static int +woal_priv_sleeppd(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + mlan_ds_pm_cfg *pm_cfg = NULL; + mlan_ioctl_req *req = NULL; + int data = 0; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + pm_cfg = (mlan_ds_pm_cfg *)req->pbuf; + pm_cfg->sub_command = MLAN_OID_PM_CFG_SLEEP_PD; + req->req_id = MLAN_IOCTL_PM_CFG; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_SLEEPPD); + + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, + sizeof(data) / sizeof(int), &user_data_len); + } + + if (sizeof(int) * user_data_len > sizeof(data)) { + PRINTM(MERROR, "Too many arguments\n"); + LEAVE(); + return -EINVAL; + } + + if (user_data_len) { + if ((data <= MAX_SLEEP_PERIOD && data >= MIN_SLEEP_PERIOD) || + (data == 0) + || (data == SLEEP_PERIOD_RESERVED_FF) + ) { + req->action = MLAN_ACT_SET; + pm_cfg->param.sleep_period = data; + } else { + ret = -EINVAL; + goto done; + } + } else + req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (!user_data_len) { + data = pm_cfg->param.sleep_period; + memcpy(respbuf, (t_u8 *)&data, sizeof(data)); + ret = sizeof(data); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Tx control flag + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +static int +woal_priv_txcontrol(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + mlan_ds_misc_cfg *misc_cfg = NULL; + mlan_ioctl_req *req = NULL; + int data = 0; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + misc_cfg = (mlan_ds_misc_cfg *)req->pbuf; + misc_cfg->sub_command = MLAN_OID_MISC_TXCONTROL; + req->req_id = MLAN_IOCTL_MISC_CFG; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_TXCONTROL); + + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, + sizeof(data) / sizeof(int), &user_data_len); + } + + if (sizeof(int) * user_data_len > sizeof(data)) { + PRINTM(MERROR, "Too many arguments\n"); + LEAVE(); + return -EINVAL; + } + + if (user_data_len) { + req->action = MLAN_ACT_SET; + misc_cfg->param.tx_control = (t_u32)data; + } else { + req->action = MLAN_ACT_GET; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (!user_data_len) { + data = misc_cfg->param.tx_control; + memcpy(respbuf, (t_u8 *)&data, sizeof(data)); + ret = sizeof(data); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Read/Write adapter registers value + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +static int +woal_priv_regrdwr(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data[3]; + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_reg_mem *reg_mem = NULL; + int user_data_len = 0, header_len = 0; + t_u8 *arguments = NULL, *space_ind = NULL; + t_u32 is_negative_val = MFALSE; + mlan_status status = MLAN_STATUS_SUCCESS; + gfp_t flag; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_reg_mem)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + reg_mem = (mlan_ds_reg_mem *)req->pbuf; + reg_mem->sub_command = MLAN_OID_REG_RW; + req->req_id = MLAN_IOCTL_REG_MEM; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_REGRDWR); + + if (strlen(respbuf) == header_len) { + ret = -EINVAL; + goto done; + } + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + arguments = kzalloc(strlen(respbuf) * sizeof(char), flag); + if (arguments == NULL) { + ret = -ENOMEM; + goto done; + } + strcpy(arguments, respbuf + header_len); + space_ind = strstr((char *)arguments, " "); + if (space_ind) + space_ind = strstr(space_ind + 1, " "); + if (space_ind) { + if (*(char *)(space_ind + 1) == '-') { + is_negative_val = MTRUE; + arguments[space_ind + 1 - arguments] = '\0'; + strcat(arguments, space_ind + 2); + } + } + parse_arguments(arguments, data, ARRAY_SIZE(data), &user_data_len); + if (is_negative_val == MTRUE) + data[2] *= -1; + + if (user_data_len == 2) { + req->action = MLAN_ACT_GET; + } else if (user_data_len == 3) { + req->action = MLAN_ACT_SET; + } else { + ret = -EINVAL; + goto done; + } + + reg_mem->param.reg_rw.type = (t_u32)data[0]; + reg_mem->param.reg_rw.offset = (t_u32)data[1]; + if (user_data_len == 3) + reg_mem->param.reg_rw.value = (t_u32)data[2]; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (req->action == MLAN_ACT_GET) { + memcpy(respbuf, ®_mem->param.reg_rw, + sizeof(reg_mem->param.reg_rw)); + ret = sizeof(reg_mem->param.reg_rw); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + kfree(arguments); + LEAVE(); + return ret; +} + +/** + * @brief Read the EEPROM contents of the card + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +static int +woal_priv_rdeeprom(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data[2]; + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_reg_mem *reg_mem = NULL; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_reg_mem)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + reg_mem = (mlan_ds_reg_mem *)req->pbuf; + reg_mem->sub_command = MLAN_OID_EEPROM_RD; + req->req_id = MLAN_IOCTL_REG_MEM; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_RDEEPROM); + + if (strlen(respbuf) == header_len) { + ret = -EINVAL; + goto done; + } + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + + if (user_data_len == 2) { + req->action = MLAN_ACT_GET; + } else { + ret = -EINVAL; + goto done; + } + + reg_mem->param.rd_eeprom.offset = (t_u16)data[0]; + reg_mem->param.rd_eeprom.byte_count = (t_u16)data[1]; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (req->action == MLAN_ACT_GET) { + memcpy(respbuf, ®_mem->param.rd_eeprom, + sizeof(reg_mem->param.rd_eeprom)); + ret = sizeof(reg_mem->param.rd_eeprom); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Read/Write device memory value + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +static int +woal_priv_memrdwr(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data[2]; + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_reg_mem *reg_mem = NULL; + int user_data_len = 0, header_len = 0; + t_u8 *arguments = NULL, *space_ind = NULL; + t_u32 is_negative_1 = MFALSE, is_negative_2 = MFALSE; + mlan_status status = MLAN_STATUS_SUCCESS; + gfp_t flag; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_reg_mem)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + reg_mem = (mlan_ds_reg_mem *)req->pbuf; + reg_mem->sub_command = MLAN_OID_MEM_RW; + req->req_id = MLAN_IOCTL_REG_MEM; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_MEMRDWR); + + if (strlen(respbuf) == header_len) { + ret = -EINVAL; + goto done; + } + /* SET operation */ + memset((char *)data, 0, sizeof(data)); + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + arguments = kzalloc(strlen(respbuf) * sizeof(char), flag); + if (arguments == NULL) { + ret = -ENOMEM; + goto done; + } + strcpy(arguments, respbuf + header_len); + if (*(char *)arguments == '-') { + is_negative_1 = MTRUE; + arguments += sizeof(char); + } + space_ind = strstr((char *)arguments, " "); + if (space_ind) { + if (*(char *)(space_ind + 1) == '-') { + is_negative_2 = MTRUE; + arguments[space_ind + 1 - arguments] = '\0'; + strcat(arguments, space_ind + 2); + } + } + parse_arguments(arguments, data, ARRAY_SIZE(data), &user_data_len); + if (is_negative_1 == MTRUE) + data[0] *= -1; + if (is_negative_2 == MTRUE) + data[1] *= -1; + + if (user_data_len == 1) { + PRINTM(MINFO, "MEM_RW: GET\n"); + req->action = MLAN_ACT_GET; + } else if (user_data_len == 2) { + PRINTM(MINFO, "MEM_RW: SET\n"); + req->action = MLAN_ACT_SET; + } else { + ret = -EINVAL; + goto done; + } + + reg_mem->param.mem_rw.addr = (t_u32)data[0]; + if (user_data_len == 2) + reg_mem->param.mem_rw.value = (t_u32)data[1]; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (req->action == MLAN_ACT_GET) { + memcpy(respbuf, ®_mem->param.mem_rw, + sizeof(reg_mem->param.mem_rw)); + ret = sizeof(reg_mem->param.mem_rw); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + kfree(arguments); + LEAVE(); + return ret; +} + +/** + * @brief Cmd52 read/write register + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static int +woal_priv_sdcmd52rw(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + t_u8 rw = 0, func, data = 0; + int buf[3], reg, ret = MLAN_STATUS_SUCCESS; + int user_data_len = 0, header_len = 0; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_SDCMD52RW); + memset((t_u8 *)buf, 0, sizeof(buf)); + + if (strlen(respbuf) == header_len) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + parse_arguments(respbuf + header_len, buf, ARRAY_SIZE(buf), + &user_data_len); + + if (user_data_len < 2 || user_data_len > 3) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + + func = (t_u8)buf[0]; + if (func > 7) { + PRINTM(MERROR, "Invalid function number!\n"); + ret = -EINVAL; + goto done; + } + reg = (t_u32)buf[1]; + if (user_data_len == 2) { + rw = 0; /* CMD52 read */ + PRINTM(MINFO, "Cmd52 read, func=%d, reg=0x%08X\n", func, reg); + } + if (user_data_len == 3) { + rw = 1; /* CMD52 write */ + data = (t_u8)buf[2]; + PRINTM(MINFO, "Cmd52 write, func=%d, reg=0x%08X, data=0x%02X\n", + func, reg, data); + } + + if (!rw) { + sdio_claim_host(((struct sdio_mmc_card *)priv->phandle->card)-> + func); + if (func) + data = sdio_readb(((struct sdio_mmc_card *)priv-> + phandle->card)->func, reg, &ret); + else + data = sdio_f0_readb(((struct sdio_mmc_card *)priv-> + phandle->card)->func, reg, &ret); + sdio_release_host(((struct sdio_mmc_card *)priv->phandle-> + card)->func); + if (ret) { + PRINTM(MERROR, + "sdio_readb: reading register 0x%X failed\n", + reg); + goto done; + } + } else { + sdio_claim_host(((struct sdio_mmc_card *)priv->phandle->card)-> + func); + if (func) + sdio_writeb(((struct sdio_mmc_card *)priv->phandle-> + card)->func, data, reg, &ret); + else + sdio_f0_writeb(((struct sdio_mmc_card *)priv->phandle-> + card)->func, data, reg, &ret); + sdio_release_host(((struct sdio_mmc_card *)priv->phandle-> + card)->func); + if (ret) { + PRINTM(MERROR, + "sdio_writeb: writing register 0x%X failed\n", + reg); + goto done; + } + } + + /* Action = GET */ + buf[0] = data; + + memcpy(respbuf, &buf, sizeof(int)); + ret = sizeof(int); + +done: + LEAVE(); + return ret; +} + +#ifdef STA_SUPPORT +/** + * @brief arpfilter ioctl function + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +static int +woal_priv_arpfilter(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + mlan_ds_misc_cfg *misc = NULL; + mlan_ioctl_req *req = NULL; + t_u8 *data_ptr = NULL; + t_u32 buf_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + misc = (mlan_ds_misc_cfg *)req->pbuf; + misc->sub_command = MLAN_OID_MISC_GEN_IE; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = MLAN_ACT_SET; + misc->param.gen_ie.type = MLAN_IE_TYPE_ARP_FILTER; + + data_ptr = respbuf + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_ARPFILTER)); + buf_len = *((t_u16 *)data_ptr); + misc->param.gen_ie.len = buf_len; + memcpy((void *)(misc->param.gen_ie.ie_data), data_ptr + sizeof(buf_len), + buf_len); + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} +#endif /* STA_SUPPORT */ + +/** + * @brief Set/Get hotspot mode configurations + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +int +woal_priv_hotspotcfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *cfg = NULL; + int data = 0; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_HOTSPOTCFG); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, 1, &user_data_len); + } + if (user_data_len >= 2) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } else { + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg = (mlan_ds_misc_cfg *)req->pbuf; + if (user_data_len == 0) { + req->action = MLAN_ACT_GET; + } else { + cfg->param.hotspot_cfg = data; + req->action = MLAN_ACT_SET; + } + } + cfg->sub_command = MLAN_OID_MISC_HOTSPOT_CFG; + req->req_id = MLAN_IOCTL_MISC_CFG; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + data = cfg->param.hotspot_cfg; + memcpy(respbuf, (t_u8 *)&data, sizeof(data)); + ret = sizeof(data); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; + +} + +/** + * @brief Set/Get Mgmt Frame passthru mask + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +int +woal_priv_mgmt_frame_passthru_ctrl(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) +{ + int ret = 0; + int data = 0; + int user_data_len = 0, header_len = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *mgmt_cfg = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_MGMT_FRAME_CTRL); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, 1, &user_data_len); + } + + if (user_data_len >= 2) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } else { + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + mgmt_cfg = (mlan_ds_misc_cfg *)req->pbuf; + req->req_id = MLAN_IOCTL_MISC_CFG; + mgmt_cfg->sub_command = MLAN_OID_MISC_RX_MGMT_IND; + + if (user_data_len == 0) { /* Get */ + req->action = MLAN_ACT_GET; + } else { /* Set */ + mgmt_cfg->param.mgmt_subtype_mask = data; + req->action = MLAN_ACT_SET; + } + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + data = mgmt_cfg->param.mgmt_subtype_mask; + memcpy(respbuf, (t_u8 *)&data, sizeof(data)); + ret = sizeof(data); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; + +} + +/** + * @brief Private IOCTL entry to send an ADDTS TSPEC + * + * Receive a ADDTS command from the application. The command structure + * contains a TSPEC and timeout in milliseconds. The timeout is performed + * in the firmware after the ADDTS command frame is sent. + * + * The TSPEC is received in the API as an opaque block. The firmware will + * send the entire data block, including the bytes after the TSPEC. This + * is done to allow extra IEs to be packaged with the TSPEC in the ADDTS + * action frame. + * + * The IOCTL structure contains two return fields: + * - The firmware command result, which indicates failure and timeouts + * - The IEEE Status code which contains the corresponding value from + * any ADDTS response frame received. + * + * In addition, the opaque TSPEC data block passed in is replaced with the + * TSPEC received in the ADDTS response frame. In case of failure, the + * AP may modify the TSPEC on return and in the case of success, the + * medium time is returned as calculated by the AP. Along with the TSPEC, + * any IEs that are sent in the ADDTS response are also returned and can be + * parsed using the IOCTL length as an indicator of extra elements. + * + * The return value to the application layer indicates a driver execution + * success or failure. A successful return could still indicate a firmware + * failure or AP negotiation failure via the commandResult field copied + * back to the application. + * + * @param priv Pointer to the mlan_private driver data struct + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written if successful else negative value + */ +static int +woal_priv_wmm_addts_req_ioctl(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_wmm_cfg *cfg = NULL; + wlan_ioctl_wmm_addts_req_t addts_ioctl; + int ret = 0, header_len = 0, copy_len = sizeof(addts_ioctl); + t_u8 *data_ptr; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_ADDTS); + data_ptr = respbuf + header_len; + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wmm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + req->req_id = MLAN_IOCTL_WMM_CFG; + cfg = (mlan_ds_wmm_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_WMM_CFG_ADDTS; + + memset(&addts_ioctl, 0x00, sizeof(addts_ioctl)); + + memcpy((t_u8 *)&addts_ioctl, data_ptr, sizeof(addts_ioctl)); + + cfg->param.addts.timeout = addts_ioctl.timeout_ms; + cfg->param.addts.ie_data_len = addts_ioctl.ie_data_len; + + memcpy(cfg->param.addts.ie_data, + addts_ioctl.ie_data, cfg->param.addts.ie_data_len); + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + addts_ioctl.cmd_result = cfg->param.addts.result; + addts_ioctl.ieee_status_code = (t_u8)cfg->param.addts.status_code; + addts_ioctl.ie_data_len = cfg->param.addts.ie_data_len; + + memcpy(addts_ioctl.ie_data, + cfg->param.addts.ie_data, cfg->param.addts.ie_data_len); + + copy_len = (sizeof(addts_ioctl) + - sizeof(addts_ioctl.ie_data) + + cfg->param.addts.ie_data_len); + + memcpy(respbuf, (t_u8 *)&addts_ioctl, copy_len); + ret = copy_len; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Private IOCTL entry to send a DELTS TSPEC + * + * Receive a DELTS command from the application. The command structure + * contains a TSPEC and reason code along with space for a command result + * to be returned. The information is packaged is sent to the wlan_cmd.c + * firmware command prep and send routines for execution in the firmware. + * + * The reason code is not used for WMM implementations but is indicated in + * the 802.11e specification. + * + * The return value to the application layer indicates a driver execution + * success or failure. A successful return could still indicate a firmware + * failure via the cmd_result field copied back to the application. + * + * @param priv Pointer to the mlan_private driver data struct + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written if successful else negative value + */ +static int +woal_priv_wmm_delts_req_ioctl(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_wmm_cfg *cfg = NULL; + wlan_ioctl_wmm_delts_req_t delts_ioctl; + int ret = 0, header_len = 0, copy_len = 0; + t_u8 *data_ptr; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_DELTS); + data_ptr = respbuf + header_len; + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wmm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + req->req_id = MLAN_IOCTL_WMM_CFG; + cfg = (mlan_ds_wmm_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_WMM_CFG_DELTS; + + memset(&delts_ioctl, 0x00, sizeof(delts_ioctl)); + + if (strlen(respbuf) > header_len) { + copy_len = MIN(strlen(data_ptr), sizeof(delts_ioctl)); + memcpy((t_u8 *)&delts_ioctl, data_ptr, copy_len); + + cfg->param.delts.status_code = + (t_u32)delts_ioctl.ieee_reason_code; + cfg->param.delts.ie_data_len = (t_u8)delts_ioctl.ie_data_len; + + memcpy(cfg->param.delts.ie_data, + delts_ioctl.ie_data, cfg->param.delts.ie_data_len); + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* Return the firmware command result back to the application + layer */ + delts_ioctl.cmd_result = cfg->param.delts.result; + copy_len = sizeof(delts_ioctl); + memcpy(respbuf, (t_u8 *)&delts_ioctl, copy_len); + ret = copy_len; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Private IOCTL entry to get/set a specified AC Queue's parameters + * + * Receive a AC Queue configuration command which is used to get, set, or + * default the parameters associated with a specific WMM AC Queue. + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +static int +woal_priv_qconfig(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_wmm_cfg *pwmm = NULL; + mlan_ds_wmm_queue_config *pqcfg = NULL; + wlan_ioctl_wmm_queue_config_t qcfg_ioctl; + t_u8 *data_ptr; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wmm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + req->req_id = MLAN_IOCTL_WMM_CFG; + pwmm = (mlan_ds_wmm_cfg *)req->pbuf; + pwmm->sub_command = MLAN_OID_WMM_CFG_QUEUE_CONFIG; + + memset(&qcfg_ioctl, 0x00, sizeof(qcfg_ioctl)); + pqcfg = (mlan_ds_wmm_queue_config *)&pwmm->param.q_cfg; + data_ptr = respbuf + (strlen(CMD_MARVELL) + strlen(PRIV_CMD_QCONFIG)); + + memcpy((t_u8 *)&qcfg_ioctl, data_ptr, sizeof(qcfg_ioctl)); + pqcfg->action = qcfg_ioctl.action; + pqcfg->access_category = qcfg_ioctl.access_category; + pqcfg->msdu_lifetime_expiry = qcfg_ioctl.msdu_lifetime_expiry; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + memset(&qcfg_ioctl, 0x00, sizeof(qcfg_ioctl)); + qcfg_ioctl.action = pqcfg->action; + qcfg_ioctl.access_category = pqcfg->access_category; + qcfg_ioctl.msdu_lifetime_expiry = pqcfg->msdu_lifetime_expiry; + memcpy(data_ptr, (t_u8 *)&qcfg_ioctl, sizeof(qcfg_ioctl)); + ret = strlen(CMD_MARVELL) + strlen(PRIV_CMD_QCONFIG) + + sizeof(qcfg_ioctl); +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Private IOCTL entry to get the status of the WMM queues + * + * Return the following information for each WMM AC: + * - WMM IE Acm Required + * - Firmware Flow Required + * - Firmware Flow Established + * - Firmware Queue Enabled + * - Firmware Delivery Enabled + * - Firmware Trigger Enabled + * + * @param priv Pointer to the moal_private driver data struct + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written if successful else negative value + */ +static int +woal_priv_wmm_queue_status_ioctl(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_wmm_cfg *pwmm = NULL; + wlan_ioctl_wmm_queue_status_t qstatus_ioctl; + int ret = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_QSTATUS); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wmm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + req->req_id = MLAN_IOCTL_WMM_CFG; + pwmm = (mlan_ds_wmm_cfg *)req->pbuf; + pwmm->sub_command = MLAN_OID_WMM_CFG_QUEUE_STATUS; + + if (strlen(respbuf) == header_len) { + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memset(&qstatus_ioctl, 0x00, sizeof(qstatus_ioctl)); + memcpy((void *)&qstatus_ioctl, (void *)&pwmm->param.q_status, + sizeof(qstatus_ioctl)); + memcpy(respbuf, (t_u8 *)&qstatus_ioctl, sizeof(qstatus_ioctl)); + ret = sizeof(qstatus_ioctl); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Private IOCTL entry to get the status of the WMM Traffic Streams + * + * @param priv Pointer to the moal_private driver data struct + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written if successful else negative value + */ +static int +woal_priv_wmm_ts_status_ioctl(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_wmm_cfg *pwmm = NULL; + wlan_ioctl_wmm_ts_status_t ts_status_ioctl; + int ret = 0, header_len = 0; + t_u8 *data_ptr; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_TS_STATUS); + data_ptr = respbuf + header_len; + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wmm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + req->req_id = MLAN_IOCTL_WMM_CFG; + pwmm = (mlan_ds_wmm_cfg *)req->pbuf; + pwmm->sub_command = MLAN_OID_WMM_CFG_TS_STATUS; + + memset(&ts_status_ioctl, 0x00, sizeof(ts_status_ioctl)); + + memcpy((t_u8 *)&ts_status_ioctl, data_ptr, sizeof(ts_status_ioctl)); + + memset(&pwmm->param.ts_status, 0x00, sizeof(ts_status_ioctl)); + pwmm->param.ts_status.tid = ts_status_ioctl.tid; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memset(&ts_status_ioctl, 0x00, sizeof(ts_status_ioctl)); + memcpy((void *)&ts_status_ioctl, (void *)&pwmm->param.ts_status, + sizeof(ts_status_ioctl)); + memcpy(respbuf, (t_u8 *)&ts_status_ioctl, sizeof(ts_status_ioctl)); + ret = sizeof(ts_status_ioctl); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get MAC control + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_macctrl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *cfg = NULL; + int ret = 0; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_MAC_CTRL); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, 1, &user_data_len); + } + + if (user_data_len > 1) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg = (mlan_ds_misc_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_MISC_MAC_CONTROL; + req->req_id = MLAN_IOCTL_MISC_CFG; + + if (user_data_len == 0) + req->action = MLAN_ACT_GET; + else { + cfg->param.mac_ctrl = (t_u32)data; + req->action = MLAN_ACT_SET; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memcpy(respbuf, (t_u8 *)&cfg->param.mac_ctrl, sizeof(data)); + ret = sizeof(data); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Get connection status + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +int +woal_priv_getwap(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; +#ifdef STA_SUPPORT + mlan_bss_info bss_info; +#endif + + ENTER(); + +#ifdef STA_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) { + memset(&bss_info, 0, sizeof(bss_info)); + + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + + if (bss_info.media_connected == MTRUE) { + memcpy(respbuf, (t_u8 *)&bss_info.bssid, + MLAN_MAC_ADDR_LENGTH); + } else { + memset(respbuf, 0, MLAN_MAC_ADDR_LENGTH); + } + } +#endif +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + if (priv->bss_started) { + memcpy(respbuf, priv->current_addr, + MLAN_MAC_ADDR_LENGTH); + } else { + memset(respbuf, 0, MLAN_MAC_ADDR_LENGTH); + } + } +#endif + ret = MLAN_MAC_ADDR_LENGTH; + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Region Code + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_region_code(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *cfg = NULL; + int ret = 0; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_REGION_CODE); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, 1, &user_data_len); + } + + if (user_data_len > 1) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg = (mlan_ds_misc_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_MISC_REGION; + req->req_id = MLAN_IOCTL_MISC_CFG; + + if (user_data_len == 0) + req->action = MLAN_ACT_GET; + else { + cfg->param.region_code = (t_u32)data; + req->action = MLAN_ACT_SET; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memcpy(respbuf, (t_u8 *)&cfg->param.region_code, sizeof(data)); + ret = sizeof(data); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get channel time and buffer weight + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_multi_chan_config(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *cfg = NULL; + t_u8 *data_ptr; + int ret = 0; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + data_ptr = + respbuf + strlen(CMD_MARVELL) + strlen(PRIV_CMD_MULTI_CHAN_CFG); + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_MULTI_CHAN_CFG); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + user_data_len = sizeof(mlan_ds_multi_chan_cfg); + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg = (mlan_ds_misc_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_MISC_MULTI_CHAN_CFG; + req->req_id = MLAN_IOCTL_MISC_CFG; + + if (user_data_len == 0) { + req->action = MLAN_ACT_GET; + } else { + req->action = MLAN_ACT_SET; + memcpy(&cfg->param.multi_chan_cfg, data_ptr, + sizeof(mlan_ds_multi_chan_cfg)); + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memcpy(respbuf, (mlan_ds_multi_chan_cfg *)&cfg->param.multi_chan_cfg, + req->buf_len); + ret = req->buf_len; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get multi_channel policy setting + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_multi_chan_policy(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + int user_data_len = 0, header_len = 0; + int data = 0; + t_u16 enable; + t_u8 action; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_MULTI_CHAN_POLICY); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, 1, &user_data_len); + } + + if (user_data_len > 1) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + + if (user_data_len == 0) { + action = MLAN_ACT_GET; + } else { + action = MLAN_ACT_SET; + enable = (t_u16)data; + } + + if (MLAN_STATUS_SUCCESS != + woal_mc_policy_cfg(priv, &enable, MOAL_IOCTL_WAIT, action)) { + ret = -EFAULT; + goto done; + } + memcpy(respbuf, &enable, sizeof(t_u16)); + ret = sizeof(t_u16); + +done: + LEAVE(); + return ret; +} + +#ifdef RX_PACKET_COALESCE +/** + * @brief Set/Get RX packet coalesceing setting + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_rx_pkt_coalesce_cfg(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) +{ + int ret = 0; + t_u32 data[2]; + int user_data_len = 0, header_len = 0; + mlan_ds_misc_cfg *cfg = NULL; + t_u8 *data_ptr; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + data_ptr = respbuf + strlen(CMD_MARVELL) + strlen(PRIV_CMD_RX_COAL_CFG); + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_RX_COAL_CFG); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + } + + if (sizeof(int) * user_data_len > sizeof(data)) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + + if ((user_data_len != 0) && (user_data_len != 2)) { + PRINTM(MERROR, "Invalid arguments\n"); + ret = -EINVAL; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg = (mlan_ds_misc_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_MISC_RX_PACKET_COALESCE; + req->req_id = MLAN_IOCTL_MISC_CFG; + + if (user_data_len == 0) { + req->action = MLAN_ACT_GET; + } else { + req->action = MLAN_ACT_SET; + cfg->param.rx_coalesce.packet_threshold = data[0]; + cfg->param.rx_coalesce.delay = data[1]; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memcpy(respbuf, + (mlan_ds_misc_rx_packet_coalesce *)&cfg->param.rx_coalesce, + req->buf_len); + ret = req->buf_len; + +done: + LEAVE(); + return ret; +} +#endif +/** + * @brief Set/Get FW side mac address + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +int +woal_priv_fwmacaddr(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + t_u8 data[ETH_ALEN]; + int ret = 0; + int header_len = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_bss *bss = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_FWMACADDR); + + /* Allocate an IOCTL request buffer */ + req = (mlan_ioctl_req *)woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + /* Fill request buffer */ + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_BSS_MAC_ADDR; + req->req_id = MLAN_IOCTL_BSS; + + if (strlen(respbuf) == header_len) { + /* GET operation */ + req->action = MLAN_ACT_GET; + } else { + /* SET operation */ + req->action = MLAN_ACT_SET; + memset(data, 0, sizeof(data)); + woal_mac2u8(data, respbuf + header_len); + memcpy(bss->param.mac_addr, data, ETH_ALEN); + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memcpy(respbuf, bss->param.mac_addr, sizeof(data)); + ret = sizeof(data); + HEXDUMP("FW MAC Addr:", respbuf, ETH_ALEN); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +#if defined(WIFI_DIRECT_SUPPORT) +#ifdef STA_CFG80211 +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION +/** + * @brief Set offchannel + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +int +woal_priv_offchannel(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data[3]; + int ret = 0; + t_u8 status = 1; + int user_data_len = 0, header_len = 0; + + ENTER(); + + memset(data, 0, sizeof(data)); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_OFFCHANNEL); + + if (header_len == strlen(respbuf)) { + /* Query current remain on channel status */ + if (priv->phandle->remain_on_channel) + ret = sprintf(respbuf, + "There is pending remain on channel from bss %d\n", + priv->phandle->remain_bss_index) + 1; + else + ret = sprintf(respbuf, + "There is no pending remain on channel\n") + + 1; + goto done; + } else + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + + if (sizeof(int) * user_data_len > sizeof(data)) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + + if (user_data_len >= 1) { + if ((data[0] != 0) && (data[0] != 1)) { + PRINTM(MERROR, "action (%d) must be either 0 or 1\n", + data[0]); + ret = -EINVAL; + goto done; + } + } + if (user_data_len == 2) { + if (data[0] == 1) { + PRINTM(MERROR, + "channel and duration must both the mentioned\n"); + ret = -EINVAL; + goto done; + } else { + PRINTM(MWARN, + "extra arguments are ignored since action is 'cancel'\n"); + } + } + if (user_data_len == 3) { + if (data[0] == 1) { + if (data[1] < 0) { + PRINTM(MERROR, "channel cannot be negative\n"); + ret = -EINVAL; + goto done; + } + if (data[2] < 0) { + PRINTM(MERROR, "duration cannot be negative\n"); + ret = -EINVAL; + goto done; + } + } + } + + if (data[0] == 0) { + if (!priv->phandle->remain_on_channel) { + ret = sprintf(respbuf, + "There is no pending remain on channel to be canceled\n") + + 1; + goto done; + } + if (woal_cfg80211_remain_on_channel_cfg + (priv, MOAL_IOCTL_WAIT, MTRUE, &status, NULL, 0, 0)) { + PRINTM(MERROR, "remain_on_channel: Failed to cancel\n"); + ret = -EFAULT; + goto done; + } + if (status == MLAN_STATUS_SUCCESS) + priv->phandle->remain_on_channel = MFALSE; + } else if (data[0] == 1) { + if (woal_cfg80211_remain_on_channel_cfg + (priv, MOAL_IOCTL_WAIT, MFALSE, &status, + ieee80211_get_channel(priv->wdev->wiphy, + ieee80211_channel_to_frequency(data + [1] +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) || defined(COMPAT_WIRELESS) + , + (data + [1] + <= + 14 ? + IEEE80211_BAND_2GHZ + : + IEEE80211_BAND_5GHZ) +#endif + )), 0, (t_u32)data[2])) { + PRINTM(MERROR, "remain_on_channel: Failed to start\n"); + ret = -EFAULT; + goto done; + } + if (status == MLAN_STATUS_SUCCESS) { + priv->phandle->remain_on_channel = MTRUE; + priv->phandle->remain_bss_index = priv->bss_index; + } + } + + if (status != MLAN_STATUS_SUCCESS) + ret = -EFAULT; + else + ret = sprintf(respbuf, "OK\n") + 1; + +done: + LEAVE(); + return ret; +} +#endif +#endif +#endif + +/** + * @brief Get extended driver version + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +int +woal_priv_get_driver_verext(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data = 0; + mlan_ds_get_info *info = NULL; + mlan_ioctl_req *req = NULL; + int ret = 0; + int copy_size = 0; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info)); + if (req == NULL) { + ret = ENOMEM; + goto done; + } + + info = (mlan_ds_get_info *)req->pbuf; + info->sub_command = MLAN_OID_GET_VER_EXT; + req->req_id = MLAN_IOCTL_GET_INFO; + req->action = MLAN_ACT_GET; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_VEREXT); + + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, 1, &user_data_len); + } + + if (user_data_len > 1) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + info->param.ver_ext.version_str_sel = data; + if (((t_s32)(info->param.ver_ext.version_str_sel)) < 0) { + PRINTM(MERROR, "Invalid arguments!\n"); + ret = -EINVAL; + goto done; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* + * Set the amount to copy back to the application as the minimum of the + * available assoc resp data or the buffer provided by the application + */ + copy_size = MIN(strlen(info->param.ver_ext.version_str), respbuflen); + memcpy(respbuf, info->param.ver_ext.version_str, copy_size); + ret = copy_size; + PRINTM(MINFO, "MOAL EXTENDED VERSION: %s\n", + info->param.ver_ext.version_str); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +#if defined(STA_SUPPORT) +/** + * @brief SET/Get radio + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_radio_ctrl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0, option = 0; + int user_data_len = 0, header_len = 0; + mlan_bss_info bss_info; + + ENTER(); + + memset(&bss_info, 0, sizeof(bss_info)); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_RADIO_CTRL); + + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &option, 1, + &user_data_len); + } + + if (user_data_len > 1) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + if (user_data_len == 1) { + /* Set radio */ + if (option < 0 || option > 1) { + PRINTM(MERROR, "Invalid arguments!\n"); + ret = -EINVAL; + goto done; + } + if (MLAN_STATUS_SUCCESS != woal_set_radio(priv, (t_u8)option)) + ret = -EFAULT; + goto done; + } else { + /* Get radio status */ + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + memcpy(respbuf, &bss_info.radio_on, sizeof(bss_info.radio_on)); + ret = sizeof(bss_info.radio_on); + } +done: + LEAVE(); + return ret; +} +#endif + +/** + * @brief Implement WMM enable command + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_wmm_cfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data = 0; + mlan_ds_wmm_cfg *wmm = NULL; + mlan_ioctl_req *req = NULL; + int ret = 0; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wmm_cfg)); + if (req == NULL) { + ret = ENOMEM; + goto done; + } + + wmm = (mlan_ds_wmm_cfg *)req->pbuf; + wmm->sub_command = MLAN_OID_WMM_CFG_ENABLE; + req->req_id = MLAN_IOCTL_WMM_CFG; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_WMM_CFG); + + if (strlen(respbuf) == header_len) { + /* GET operation */ + req->action = MLAN_ACT_GET; + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, 1, &user_data_len); + if (user_data_len == 1) { + /* Set wmm */ + if ((data < CMD_DISABLED) || (data > CMD_ENABLED)) { + PRINTM(MERROR, "Invalid arguments!\n"); + ret = -EINVAL; + goto done; + } + req->action = MLAN_ACT_SET; + if (data == CMD_DISABLED) + wmm->param.wmm_enable = MFALSE; + else + wmm->param.wmm_enable = MTRUE; + } else { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memcpy(respbuf, &wmm->param.wmm_enable, sizeof(wmm->param.wmm_enable)); + ret = sizeof(wmm->param.wmm_enable); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +#if defined(STA_SUPPORT) +/** + * @brief Implement 802.11D enable command + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_11d_cfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data = 0; + mlan_ds_11d_cfg *pcfg_11d = NULL; + mlan_ioctl_req *req = NULL; + int ret = 0; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11d_cfg)); + if (req == NULL) { + ret = ENOMEM; + goto done; + } + + pcfg_11d = (mlan_ds_11d_cfg *)req->pbuf; + pcfg_11d->sub_command = MLAN_OID_11D_CFG_ENABLE; + req->req_id = MLAN_IOCTL_11D_CFG; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_11D_CFG); + + if (strlen(respbuf) == header_len) { + /* GET operation */ + req->action = MLAN_ACT_GET; + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, 1, &user_data_len); + if (user_data_len == 1) { + if ((data < CMD_DISABLED) || (data > CMD_ENABLED)) { + PRINTM(MERROR, "Invalid arguments!\n"); + ret = -EINVAL; + goto done; + } + req->action = MLAN_ACT_SET; + if (data == CMD_DISABLED) + pcfg_11d->param.enable_11d = MFALSE; + else + pcfg_11d->param.enable_11d = MTRUE; + } else { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memcpy(respbuf, &pcfg_11d->param.enable_11d, + sizeof(pcfg_11d->param.enable_11d)); + ret = sizeof(pcfg_11d->param.enable_11d); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Implement 802.11D clear chan table command + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise fail + */ +static int +woal_priv_11d_clr_chan_tbl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_ds_11d_cfg *pcfg_11d = NULL; + mlan_ioctl_req *req = NULL; + int ret = 0; + int header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11d_cfg)); + if (req == NULL) { + ret = ENOMEM; + goto done; + } + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_11D_CLR_TBL); + + if (strlen(respbuf) != header_len) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + pcfg_11d = (mlan_ds_11d_cfg *)req->pbuf; + pcfg_11d->sub_command = MLAN_OID_11D_CLR_CHAN_TABLE; + req->req_id = MLAN_IOCTL_11D_CFG; + req->action = MLAN_ACT_SET; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} +#endif + +/** + * @brief Set/Get WWS mode + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_wws_cfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data = 0; + mlan_ds_misc_cfg *wws = NULL; + mlan_ioctl_req *req = NULL; + int ret = 0; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = ENOMEM; + goto done; + } + + wws = (mlan_ds_misc_cfg *)req->pbuf; + wws->sub_command = MLAN_OID_MISC_WWS; + req->req_id = MLAN_IOCTL_MISC_CFG; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_WWS_CFG); + + if (strlen(respbuf) == header_len) { + /* GET operation */ + req->action = MLAN_ACT_GET; + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, 1, &user_data_len); + if (user_data_len == 1) { + if ((data < CMD_DISABLED) || (data > CMD_ENABLED)) { + PRINTM(MERROR, + "Invalid arguments, WWS config not changed!\n"); + ret = -EINVAL; + goto done; + } + req->action = MLAN_ACT_SET; + wws->param.wws_cfg = (t_u16)data; + } else { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memcpy(respbuf, &wws->param.wws_cfg, sizeof(wws->param.wws_cfg)); + ret = sizeof(wws->param.wws_cfg); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +#if defined(REASSOCIATION) +/** + * @brief Set/Get reassociation settings + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_set_get_reassoc(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + moal_handle *handle = priv->phandle; + int data = 0; + int ret = 0; + int user_data_len = 0, header_len = 0; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_REASSOCTRL); + + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + data = (int)(priv->reassoc_on); + memcpy(respbuf, &data, sizeof(data)); + ret = sizeof(data); + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, 1, &user_data_len); + if (user_data_len == 1) { + if (data == 0) { + handle->reassoc_on &= ~MBIT(priv->bss_index); + priv->reassoc_on = MFALSE; + priv->reassoc_required = MFALSE; + if (!handle->reassoc_on && + handle->is_reassoc_timer_set == MTRUE) { + woal_cancel_timer(&handle-> + reassoc_timer); + handle->is_reassoc_timer_set = MFALSE; + } + } else if (data == 1) { + handle->reassoc_on |= MBIT(priv->bss_index); + priv->reassoc_on = MTRUE; + } else { + PRINTM(MERROR, "Invalid arguments!\n"); + ret = -EINVAL; + } + } else { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + } + } + + LEAVE(); + return ret; +} +#endif /* REASSOCIATION */ + +/** + * @brief Get Transmit buffer size + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_txbuf_cfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_ds_11n_cfg *cfg_11n = NULL; + mlan_ioctl_req *req = NULL; + int ret = 0; + int buf_size = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = ENOMEM; + goto done; + } + + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_MAX_TX_BUF_SIZE; + req->req_id = MLAN_IOCTL_11N_CFG; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_TXBUF_CFG); + + if (strlen(respbuf) != header_len) { + PRINTM(MERROR, + "Don't support set Tx buffer size after driver loaded!\n"); + ret = -EINVAL; + goto done; + } else { + /* Get Tx buffer size from MLAN */ + req->action = MLAN_ACT_GET; + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + buf_size = cfg_11n->param.tx_buf_size; + memcpy(respbuf, &buf_size, sizeof(buf_size)); + ret = sizeof(buf_size); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +#ifdef STA_SUPPORT +/** + * @brief Set/Get auth type + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_auth_type(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int auth_type; + t_u32 auth_mode; + int ret = 0; + int user_data_len = 0, header_len = 0; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_AUTH_TYPE); + + if (strlen(respbuf) == header_len) { + /* GET operation */ + if (MLAN_STATUS_SUCCESS != + woal_get_auth_mode(priv, MOAL_IOCTL_WAIT, &auth_mode)) { + ret = -EFAULT; + goto done; + } + user_data_len = 0; + auth_type = auth_mode; + memcpy(respbuf, &auth_type, sizeof(auth_type)); + ret = sizeof(auth_type); + goto done; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &auth_type, 1, + &user_data_len); + if (user_data_len == 1) { + PRINTM(MINFO, "SET: auth_type %d\n", auth_type); + if (((auth_type < MLAN_AUTH_MODE_OPEN) || + (auth_type > MLAN_AUTH_MODE_SHARED)) + && (auth_type != MLAN_AUTH_MODE_AUTO)) { + ret = -EINVAL; + goto done; + } + auth_mode = auth_type; + if (MLAN_STATUS_SUCCESS != + woal_set_auth_mode(priv, MOAL_IOCTL_WAIT, + auth_mode)) { + ret = -EFAULT; + goto done; + } + } else { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + } + } + +done: + LEAVE(); + return ret; +} +#endif + +/** + * @brief Set/get user provisioned local power constraint + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_11h_local_pwr_constraint(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) +{ + int data = 0; + mlan_ds_11h_cfg *ds_11hcfg = NULL; + mlan_ioctl_req *req = NULL; + int ret = 0; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11h_cfg)); + if (req == NULL) { + ret = ENOMEM; + goto done; + } + + ds_11hcfg = (mlan_ds_11h_cfg *)req->pbuf; + ds_11hcfg->sub_command = MLAN_OID_11H_LOCAL_POWER_CONSTRAINT; + req->req_id = MLAN_IOCTL_11H_CFG; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_POWER_CONS); + + if (strlen(respbuf) == header_len) { + /* GET operation */ + req->action = MLAN_ACT_GET; + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, 1, &user_data_len); + if (user_data_len == 1) { + req->action = MLAN_ACT_SET; + ds_11hcfg->param.usr_local_power_constraint = + (t_s8)data; + } else { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (req->action == MLAN_ACT_GET) { + data = (int)ds_11hcfg->param.usr_local_power_constraint; + memcpy(respbuf, &data, sizeof(data)); + ret = sizeof(data); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/get HT stream configurations + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_ht_stream_cfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data = 0; + mlan_ds_11n_cfg *cfg = NULL; + mlan_ioctl_req *req = NULL; + int ret = 0; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = ENOMEM; + goto done; + } + + cfg = (mlan_ds_11n_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_11N_CFG_STREAM_CFG; + req->req_id = MLAN_IOCTL_11N_CFG; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_HT_STREAM_CFG); + + if (strlen(respbuf) == header_len) { + /* GET operation */ + req->action = MLAN_ACT_GET; + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, 1, &user_data_len); + if (user_data_len == 1) { + if (data != HT_STREAM_MODE_1X1 && + data != HT_STREAM_MODE_2X2) { + PRINTM(MERROR, "Invalid arguments!\n"); + ret = -EINVAL; + goto done; + } + req->action = MLAN_ACT_SET; + cfg->param.stream_cfg = data; + } else { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + data = ((mlan_ds_11n_cfg *)req->pbuf)->param.stream_cfg; + memcpy(respbuf, &data, sizeof(data)); + ret = sizeof(data); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Get thermal reading + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_thermal(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_ds_misc_cfg *cfg = NULL; + mlan_ioctl_req *req = NULL; + int ret = 0, header_len = 0, data = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = ENOMEM; + goto done; + } + + cfg = (mlan_ds_misc_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_MISC_THERMAL; + req->req_id = MLAN_IOCTL_MISC_CFG; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_THERMAL); + + if (strlen(respbuf) != header_len) { + PRINTM(MERROR, "Set is not supported for this command\n"); + ret = -EINVAL; + goto done; + } + req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + data = (int)cfg->param.thermal; + memcpy(respbuf, &data, sizeof(data)); + ret = sizeof(data); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get beacon interval + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_beacon_interval(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data = 0; + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *req = NULL; + int ret = 0; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = ENOMEM; + goto done; + } + + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_IBSS_BCN_INTERVAL; + req->req_id = MLAN_IOCTL_BSS; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_BCN_INTERVAL); + + if (strlen(respbuf) == header_len) { + /* GET operation */ + req->action = MLAN_ACT_GET; + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, 1, &user_data_len); + if (user_data_len == 1) { + if ((data < MLAN_MIN_BEACON_INTERVAL) || + (data > MLAN_MAX_BEACON_INTERVAL)) { + PRINTM(MERROR, "Invalid arguments!\n"); + ret = -EINVAL; + goto done; + } + req->action = MLAN_ACT_SET; + bss->param.bcn_interval = data; + } else { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + data = ((mlan_ds_bss *)req->pbuf)->param.bcn_interval; + memcpy(respbuf, &data, sizeof(data)); + ret = sizeof(data); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +#ifdef STA_SUPPORT +/** + * @brief Get signal + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_get_signal(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ +/** Input data size */ +#define IN_DATA_SIZE 2 +/** Output data size */ +#define OUT_DATA_SIZE 12 + int ret = 0; + int in_data[IN_DATA_SIZE]; + int out_data[OUT_DATA_SIZE]; + mlan_ds_get_signal signal; + int data_length = 0; + int buflen = 0; + int user_data_len = 0, header_len = 0; + + ENTER(); + + memset(in_data, 0, sizeof(in_data)); + memset(out_data, 0, sizeof(out_data)); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_GET_SIGNAL); + + if (strlen(respbuf) != header_len) + parse_arguments(respbuf + header_len, in_data, IN_DATA_SIZE, + &user_data_len); + buflen = MIN(user_data_len, IN_DATA_SIZE); + + if (priv->media_connected == MFALSE) { + PRINTM(MERROR, "Can not get RSSI in disconnected state\n"); + ret = -ENOTSUPP; + goto done; + } + + if (user_data_len) { + if (user_data_len > IN_DATA_SIZE) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + } + + switch (user_data_len) { + case 0: /* No checking, get everything */ + break; + case 2: /* Check subtype range */ + if (in_data[1] < 1 || in_data[1] > 4) { + ret = -EINVAL; + goto done; + } + /* Fall through */ + case 1: /* Check type range */ + if (in_data[0] < 1 || in_data[0] > 3) { + ret = -EINVAL; + goto done; + } + break; + default: + ret = -EINVAL; + goto done; + } + + memset(&signal, 0, sizeof(mlan_ds_get_signal)); + if (MLAN_STATUS_SUCCESS != + woal_get_signal_info(priv, MOAL_IOCTL_WAIT, &signal)) { + ret = -EFAULT; + goto done; + } + PRINTM(MINFO, "RSSI Beacon Last : %d\n", (int)signal.bcn_rssi_last); + PRINTM(MINFO, "RSSI Beacon Average: %d\n", (int)signal.bcn_rssi_avg); + PRINTM(MINFO, "RSSI Data Last : %d\n", (int)signal.data_rssi_last); + PRINTM(MINFO, "RSSI Data Average : %d\n", (int)signal.data_rssi_avg); + PRINTM(MINFO, "SNR Beacon Last : %d\n", (int)signal.bcn_snr_last); + PRINTM(MINFO, "SNR Beacon Average : %d\n", (int)signal.bcn_snr_avg); + PRINTM(MINFO, "SNR Data Last : %d\n", (int)signal.data_snr_last); + PRINTM(MINFO, "SNR Data Average : %d\n", (int)signal.data_snr_avg); + PRINTM(MINFO, "NF Beacon Last : %d\n", (int)signal.bcn_nf_last); + PRINTM(MINFO, "NF Beacon Average : %d\n", (int)signal.bcn_nf_avg); + PRINTM(MINFO, "NF Data Last : %d\n", (int)signal.data_nf_last); + PRINTM(MINFO, "NF Data Average : %d\n", (int)signal.data_nf_avg); + + /* Check type */ + switch (in_data[0]) { + case 0: /* Send everything */ + out_data[data_length++] = signal.bcn_rssi_last; + out_data[data_length++] = signal.bcn_rssi_avg; + out_data[data_length++] = signal.data_rssi_last; + out_data[data_length++] = signal.data_rssi_avg; + out_data[data_length++] = signal.bcn_snr_last; + out_data[data_length++] = signal.bcn_snr_avg; + out_data[data_length++] = signal.data_snr_last; + out_data[data_length++] = signal.data_snr_avg; + out_data[data_length++] = signal.bcn_nf_last; + out_data[data_length++] = signal.bcn_nf_avg; + out_data[data_length++] = signal.data_nf_last; + out_data[data_length++] = signal.data_nf_avg; + break; + case 1: /* RSSI */ + /* Check subtype */ + switch (in_data[1]) { + case 0: /* Everything */ + out_data[data_length++] = signal.bcn_rssi_last; + out_data[data_length++] = signal.bcn_rssi_avg; + out_data[data_length++] = signal.data_rssi_last; + out_data[data_length++] = signal.data_rssi_avg; + break; + case 1: /* bcn last */ + out_data[data_length++] = signal.bcn_rssi_last; + break; + case 2: /* bcn avg */ + out_data[data_length++] = signal.bcn_rssi_avg; + break; + case 3: /* data last */ + out_data[data_length++] = signal.data_rssi_last; + break; + case 4: /* data avg */ + out_data[data_length++] = signal.data_rssi_avg; + break; + default: + break; + } + break; + case 2: /* SNR */ + /* Check subtype */ + switch (in_data[1]) { + case 0: /* Everything */ + out_data[data_length++] = signal.bcn_snr_last; + out_data[data_length++] = signal.bcn_snr_avg; + out_data[data_length++] = signal.data_snr_last; + out_data[data_length++] = signal.data_snr_avg; + break; + case 1: /* bcn last */ + out_data[data_length++] = signal.bcn_snr_last; + break; + case 2: /* bcn avg */ + out_data[data_length++] = signal.bcn_snr_avg; + break; + case 3: /* data last */ + out_data[data_length++] = signal.data_snr_last; + break; + case 4: /* data avg */ + out_data[data_length++] = signal.data_snr_avg; + break; + default: + break; + } + break; + case 3: /* NF */ + /* Check subtype */ + switch (in_data[1]) { + case 0: /* Everything */ + out_data[data_length++] = signal.bcn_nf_last; + out_data[data_length++] = signal.bcn_nf_avg; + out_data[data_length++] = signal.data_nf_last; + out_data[data_length++] = signal.data_nf_avg; + break; + case 1: /* bcn last */ + out_data[data_length++] = signal.bcn_nf_last; + break; + case 2: /* bcn avg */ + out_data[data_length++] = signal.bcn_nf_avg; + break; + case 3: /* data last */ + out_data[data_length++] = signal.data_nf_last; + break; + case 4: /* data avg */ + out_data[data_length++] = signal.data_nf_avg; + break; + default: + break; + } + break; + default: + break; + } + + memcpy(respbuf, out_data, (data_length * sizeof(int))); + ret = data_length * sizeof(int); + +done: + LEAVE(); + return ret; +} +#endif + +#if defined(STA_SUPPORT) +/** + * @brief Make PMF bit required/optional + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return 0 -- success, otherwise fail + */ +int +woal_priv_set_get_pmfcfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data[2] = { 0, 0 }; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *cfg = NULL; + mlan_ds_misc_pmfcfg *pmfcfg; + int ret = 0; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (!priv->phandle->card_info->embedded_supp) { + PRINTM(MERROR, "Not supported cmd on this card\n"); + ret = -EOPNOTSUPP; + goto done; + } + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_PMFCFG); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + } + + if (user_data_len > 2) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg = (mlan_ds_misc_cfg *)req->pbuf; + pmfcfg = (mlan_ds_misc_pmfcfg *)&cfg->param.pmfcfg; + cfg->sub_command = MLAN_OID_MISC_PMFCFG; + req->req_id = MLAN_IOCTL_MISC_CFG; + + if (user_data_len == 0) + req->action = MLAN_ACT_GET; + else { + pmfcfg->mfpc = (t_u8)data[0]; + pmfcfg->mfpr = (t_u8)data[1]; + req->action = MLAN_ACT_SET; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memcpy(respbuf, (t_u8 *)&cfg->param.pmfcfg, + sizeof(mlan_ds_misc_pmfcfg)); + ret = sizeof(mlan_ds_misc_pmfcfg); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} +#endif + +/** + * @brief Get/Set inactivity timeout extend + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_inactivity_timeout_ext(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) +{ + int data[4]; + mlan_ioctl_req *req = NULL; + mlan_ds_pm_cfg *pmcfg = NULL; + pmlan_ds_inactivity_to inac_to = NULL; + int ret = 0; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_INACTIVITYTO); + memset(data, 0, sizeof(data)); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + } + + if (user_data_len != 0 && user_data_len != 3 && user_data_len != 4) { + PRINTM(MERROR, "Invalid number of parameters\n"); + ret = -EINVAL; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + pmcfg = (mlan_ds_pm_cfg *)req->pbuf; + inac_to = &pmcfg->param.inactivity_to; + pmcfg->sub_command = MLAN_OID_PM_CFG_INACTIVITY_TO; + req->req_id = MLAN_IOCTL_PM_CFG; + req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (user_data_len) { + inac_to->timeout_unit = data[0]; + inac_to->unicast_timeout = data[1]; + inac_to->mcast_timeout = data[2]; + if (user_data_len == 4) + inac_to->ps_entry_timeout = data[3]; + req->action = MLAN_ACT_SET; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + } else { + data[0] = inac_to->timeout_unit; + data[1] = inac_to->unicast_timeout; + data[2] = inac_to->mcast_timeout; + data[3] = inac_to->ps_entry_timeout; + + memcpy(respbuf, (t_u8 *)data, sizeof(data)); + ret = sizeof(data); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Enable/Disable amsdu_aggr_ctrl + * + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_11n_amsdu_aggr_ctrl(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + int ret = 0, data[2]; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_AMSDU_AGGR_CTRL); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_AMSDU_AGGR_CTRL; + req->req_id = MLAN_IOCTL_11N_CFG; + + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + req->action = MLAN_ACT_GET; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, data, 1, &user_data_len); + + if (user_data_len != 1) { + PRINTM(MERROR, "Invalid number of parameters\n"); + ret = -EINVAL; + goto done; + } + req->action = MLAN_ACT_SET; + cfg_11n->param.amsdu_aggr_ctrl.enable = data[0]; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + data[0] = cfg_11n->param.amsdu_aggr_ctrl.enable; + data[1] = cfg_11n->param.amsdu_aggr_ctrl.curr_buf_size; + + memcpy(respbuf, (t_u8 *)data, sizeof(data)); + ret = sizeof(data); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Transmit beamforming capabilities + * + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_tx_bf_cap_ioctl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *bf_cfg = NULL; + int ret = 0, bf_cap = 0; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_TX_BF_CAP); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + bf_cfg = (mlan_ds_11n_cfg *)req->pbuf; + bf_cfg->sub_command = MLAN_OID_11N_CFG_TX_BF_CAP; + req->req_id = MLAN_IOCTL_11N_CFG; + + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + req->action = MLAN_ACT_GET; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &bf_cap, 1, + &user_data_len); + + if (user_data_len != 1) { + PRINTM(MERROR, "Invalid number of parameters\n"); + ret = -EINVAL; + goto done; + } + req->action = MLAN_ACT_SET; + bf_cfg->param.tx_bf_cap = bf_cap; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + bf_cap = bf_cfg->param.tx_bf_cap; + + memcpy(respbuf, (t_u8 *)&bf_cap, sizeof(bf_cap)); + ret = sizeof(bf_cap); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Turn on/off the sdio clock + * + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_sdio_clock_ioctl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + int data = 2; + int user_data_len = 0, header_len = 0; + /* Initialize the clock state as on */ + static int clock_state = 1; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_SDIO_CLOCK); + if (strlen(respbuf) == header_len) { + /* GET operation */ + memcpy(respbuf, (t_u8 *)&clock_state, sizeof(clock_state)); + ret = sizeof(clock_state); + goto done; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, 1, &user_data_len); + + if (user_data_len != 1) { + PRINTM(MERROR, "Invalid number of parameters\n"); + ret = -EINVAL; + goto done; + } + } + switch (data) { + case CMD_DISABLED: + PRINTM(MINFO, "SDIO clock is turned off\n"); + ret = woal_sdio_set_bus_clock(priv->phandle, MFALSE); + clock_state = data; + break; + case CMD_ENABLED: + PRINTM(MINFO, "SDIO clock is turned on\n"); + ret = woal_sdio_set_bus_clock(priv->phandle, MTRUE); + clock_state = data; + break; + default: + ret = -EINVAL; + PRINTM(MINFO, "sdioclock: wrong parameter\n"); + break; + } +done: + LEAVE(); + return ret; +} + +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) +/** + * @brief Set SDIO Multi-point aggregation control parameters + * + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_sdio_mpa_ctrl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *misc = NULL; + int ret = 0, data[6]; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(data, 0, sizeof(data)); + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_MPA_CTRL); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + + if (user_data_len > 6) { + PRINTM(MERROR, "Invalid number of parameters\n"); + ret = -EINVAL; + goto done; + } + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + misc = (mlan_ds_misc_cfg *)req->pbuf; + misc->sub_command = MLAN_OID_MISC_SDIO_MPA_CTRL; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = MLAN_ACT_GET; + /* Get the values first, then modify these values if user had modified + them */ + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "woal_request_ioctl returned %d\n", ret); + ret = -EFAULT; + goto done; + } + + if (user_data_len == 0) { + data[0] = misc->param.mpa_ctrl.tx_enable; + data[1] = misc->param.mpa_ctrl.rx_enable; + data[2] = misc->param.mpa_ctrl.tx_buf_size; + data[3] = misc->param.mpa_ctrl.rx_buf_size; + data[4] = misc->param.mpa_ctrl.tx_max_ports; + data[5] = misc->param.mpa_ctrl.rx_max_ports; + + PRINTM(MINFO, "Get Param: %d %d %d %d %d %d\n", data[0], + data[1], data[2], data[3], data[4], data[5]); + + memcpy(respbuf, (t_u8 *)data, sizeof(data)); + ret = sizeof(data); + goto done; + } + + switch (user_data_len) { + case 6: + misc->param.mpa_ctrl.rx_max_ports = data[5]; + case 5: + misc->param.mpa_ctrl.tx_max_ports = data[4]; + case 4: + misc->param.mpa_ctrl.rx_buf_size = data[3]; + case 3: + misc->param.mpa_ctrl.tx_buf_size = data[2]; + case 2: + misc->param.mpa_ctrl.rx_enable = data[1]; + case 1: + /* Set cmd */ + req->action = MLAN_ACT_SET; + + PRINTM(MINFO, "Set Param: %d %d %d %d %d %d\n", data[0], + data[1], data[2], data[3], data[4], data[5]); + + misc->param.mpa_ctrl.tx_enable = data[0]; + break; + default: + PRINTM(MERROR, "Default case error\n"); + ret = -EINVAL; + goto done; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} +#endif + +/** + * @brief Configure sleep parameters + * + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_sleep_params_ioctl(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_pm_cfg *pm = NULL; + mlan_ds_sleep_params *psleep_params = NULL; + int data[6] = { 0 }, i; + int user_data_len = 0, header_len = 0; + char err_str[][35] = { {"sleep clock error in ppm"}, + {"wakeup offset in usec"}, + {"clock stabilization time in usec"}, + {"value of reserved for debug"} + }; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(data, 0, sizeof(data)); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + pm = (mlan_ds_pm_cfg *)req->pbuf; + pm->sub_command = MLAN_OID_PM_CFG_SLEEP_PARAMS; + req->req_id = MLAN_IOCTL_PM_CFG; + psleep_params = (pmlan_ds_sleep_params)&pm->param.sleep_params; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_SLEEP_PARAMS); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + req->action = MLAN_ACT_GET; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + if (user_data_len != 6) { + PRINTM(MERROR, "Invalid number of parameters\n"); + ret = -EINVAL; + goto done; + } +#define MIN_VAL 0x0000 +#define MAX_VAL 0xFFFF + for (i = 0; i < 6; i++) { + if ((i == 3) || (i == 4)) { + /* These two cases are handled below the loop */ + continue; + } + if (data[i] < MIN_VAL || data[i] > MAX_VAL) { + PRINTM(MERROR, "Invalid %s (0-65535)!\n", + err_str[i]); + ret = -EINVAL; + goto done; + } + } + if (data[3] < 0 || data[3] > 2) { + PRINTM(MERROR, + "Invalid control periodic calibration (0-2)!\n"); + ret = -EINVAL; + goto done; + } + if (data[4] < 0 || data[4] > 2) { + PRINTM(MERROR, + "Invalid control of external sleep clock (0-2)!\n"); + ret = -EINVAL; + goto done; + } + req->action = MLAN_ACT_SET; + psleep_params->error = data[0]; + psleep_params->offset = data[1]; + psleep_params->stable_time = data[2]; + psleep_params->cal_control = data[3]; + psleep_params->ext_sleep_clk = data[4]; + psleep_params->reserved = data[5]; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + data[0] = psleep_params->error; + data[1] = psleep_params->offset; + data[2] = psleep_params->stable_time; + data[3] = psleep_params->cal_control; + data[4] = psleep_params->ext_sleep_clk; + data[5] = psleep_params->reserved; + + memcpy(respbuf, (t_u8 *)data, sizeof(data)); + ret = sizeof(data); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} + +#if defined(DFS_TESTING_SUPPORT) +/** + * @brief Set/Get DFS Testing settings + * + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_dfs_testing(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_11h_cfg *ds_11hcfg = NULL; + int ret = 0; + int data[4]; + int user_data_len = 0, header_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_DFS_TESTING); + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11h_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + ds_11hcfg = (mlan_ds_11h_cfg *)req->pbuf; + ds_11hcfg->sub_command = MLAN_OID_11H_DFS_TESTING; + req->req_id = MLAN_IOCTL_11H_CFG; + + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + req->action = MLAN_ACT_GET; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + if (user_data_len != 4) { + PRINTM(MERROR, "Invalid number of args!\n"); + ret = -EINVAL; + goto done; + } + if ((unsigned)data[0] > 0xFFFF) { + PRINTM(MERROR, "The maximum user CAC is 65535 msec.\n"); + ret = -EINVAL; + goto done; + } + if ((unsigned)data[1] > 0xFFFF) { + PRINTM(MERROR, "The maximum user NOP is 65535 sec.\n"); + ret = -EINVAL; + goto done; + } + if ((unsigned)data[3] > 0xFF) { + PRINTM(MERROR, + "The maximum user fixed channel is 255.\n"); + ret = -EINVAL; + goto done; + } + ds_11hcfg->param.dfs_testing.usr_cac_period_msec = + (t_u16)data[0]; + ds_11hcfg->param.dfs_testing.usr_nop_period_sec = + (t_u16)data[1]; + ds_11hcfg->param.dfs_testing.usr_no_chan_change = + data[2] ? 1 : 0; + ds_11hcfg->param.dfs_testing.usr_fixed_new_chan = (t_u8)data[3]; + priv->phandle->cac_period_jiffies = (t_u16)data[0] * HZ / 1000; + req->action = MLAN_ACT_SET; + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (!user_data_len) { + data[0] = ds_11hcfg->param.dfs_testing.usr_cac_period_msec; + data[1] = ds_11hcfg->param.dfs_testing.usr_nop_period_sec; + data[2] = ds_11hcfg->param.dfs_testing.usr_no_chan_change; + data[3] = ds_11hcfg->param.dfs_testing.usr_fixed_new_chan; + memcpy(respbuf, (t_u8 *)data, sizeof(data)); + ret = sizeof(data); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} +#endif /* DFS_SUPPORT && DFS_TESTING_SUPPORT */ + +/** + * @brief Set/Get CFP table codes + * + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_cfp_code(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + int user_data_len = 0, header_len = 0; + int data[2]; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *misc_cfg = NULL; + mlan_ds_misc_cfp_code *cfp_code = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_CFP_CODE); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + misc_cfg = (mlan_ds_misc_cfg *)req->pbuf; + cfp_code = &misc_cfg->param.cfp_code; + misc_cfg->sub_command = MLAN_OID_MISC_CFP_CODE; + req->req_id = MLAN_IOCTL_MISC_CFG; + + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + req->action = MLAN_ACT_GET; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + if (user_data_len > 2) { + PRINTM(MERROR, "Invalid number of args!\n"); + ret = -EINVAL; + goto done; + } + cfp_code->cfp_code_bg = data[0]; + if (user_data_len == 2) + cfp_code->cfp_code_a = data[1]; + req->action = MLAN_ACT_SET; + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (!user_data_len) { + data[0] = cfp_code->cfp_code_bg; + data[1] = cfp_code->cfp_code_a; + memcpy(respbuf, (t_u8 *)data, sizeof(data)); + ret = sizeof(data); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Tx/Rx antenna + * + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_set_get_tx_rx_ant(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + int user_data_len = 0, header_len = 0; + mlan_ds_radio_cfg *radio = NULL; + mlan_ioctl_req *req = NULL; + int data[3] = { 0 }; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_ANT_CFG); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_radio_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + radio = (mlan_ds_radio_cfg *)req->pbuf; + radio->sub_command = MLAN_OID_ANT_CFG; + req->req_id = MLAN_IOCTL_RADIO_CFG; + + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + req->action = MLAN_ACT_GET; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + if (user_data_len > 2) { + PRINTM(MERROR, "Invalid number of args!\n"); + ret = -EINVAL; + goto done; + } + if (priv->phandle->feature_control & FEATURE_CTRL_STREAM_2X2) { + radio->param.ant_cfg.tx_antenna = data[0]; + radio->param.ant_cfg.rx_antenna = data[0]; + if (user_data_len == 2) + radio->param.ant_cfg.rx_antenna = data[1]; + } else { + radio->param.ant_cfg_1x1.antenna = data[0]; + if (user_data_len == 2) + radio->param.ant_cfg_1x1.evaluate_time = + data[1]; + } + req->action = MLAN_ACT_SET; + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (!user_data_len) { + if (priv->phandle->feature_control & FEATURE_CTRL_STREAM_2X2) { + data[0] = radio->param.ant_cfg.tx_antenna; + data[1] = radio->param.ant_cfg.rx_antenna; + if (data[0] && data[1]) + ret = sizeof(int) * 2; + else + ret = sizeof(int) * 1; + memcpy(respbuf, (t_u8 *)data, sizeof(data)); + } else { + data[0] = (int)radio->param.ant_cfg_1x1.antenna; + data[1] = (int)radio->param.ant_cfg_1x1.evaluate_time; + data[2] = (int)radio->param.ant_cfg_1x1.current_antenna; + memcpy(respbuf, (t_u8 *)data, sizeof(data)); + ret = sizeof(data); + } + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Get/Set system clock + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_sysclock(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int data[65]; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *cfg = NULL; + int ret = 0, i = 0; + int user_data_len = 0, header_len = 0; + int data_length = 0, length_index = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_SYSCLOCK); + memset(data, 0, sizeof(data)); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + } + + if (user_data_len > MLAN_MAX_CLK_NUM) { + PRINTM(MERROR, "Invalid number of parameters\n"); + ret = -EINVAL; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg = (mlan_ds_misc_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_MISC_SYS_CLOCK; + req->req_id = MLAN_IOCTL_MISC_CFG; + + if (user_data_len) { + /* SET operation */ + req->action = MLAN_ACT_SET; + + /* Set configurable clocks */ + cfg->param.sys_clock.sys_clk_type = MLAN_CLK_CONFIGURABLE; + cfg->param.sys_clock.sys_clk_num = + MIN(MLAN_MAX_CLK_NUM, user_data_len); + for (i = 0; i < cfg->param.sys_clock.sys_clk_num; i++) + cfg->param.sys_clock.sys_clk[i] = (t_u16)data[i]; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + } else { + /* GET operation */ + req->action = MLAN_ACT_GET; + + /* Get configurable clocks */ + cfg->param.sys_clock.sys_clk_type = MLAN_CLK_CONFIGURABLE; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* Current system clock */ + data[1] = (int)cfg->param.sys_clock.cur_sys_clk; + data_length = 1; + + length_index = + MIN(cfg->param.sys_clock.sys_clk_num, MLAN_MAX_CLK_NUM); + + /* Configurable clocks */ + for (i = 1; i <= length_index; i++) + data[i + data_length] = + (int)cfg->param.sys_clock.sys_clk[i - 1]; + + data_length += length_index; + + /* Get supported clocks */ + cfg->param.sys_clock.sys_clk_type = MLAN_CLK_SUPPORTED; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + length_index = + MIN(cfg->param.sys_clock.sys_clk_num, MLAN_MAX_CLK_NUM); + + /* Supported clocks */ + for (i = 1; i <= length_index; i++) + data[i + data_length] = + (int)cfg->param.sys_clock.sys_clk[i - 1]; + + data_length += length_index; + + /* Send length as first element */ + data[0] = data_length; + data_length++; + + memcpy(respbuf, data, sizeof(int) * data_length); + ret = data_length * sizeof(int); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** AES key length */ +#define AES_KEY_LEN 16 +/** + * @brief Adhoc AES control + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_adhoc_aes(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + static char buf[256]; + int ret = 0, action = -1; + unsigned int i; + t_u8 key_ascii[32]; + t_u8 key_hex[16]; + t_u8 *tmp; + mlan_bss_info bss_info; + mlan_ds_sec_cfg *sec = NULL; + mlan_ioctl_req *req = NULL; + t_u8 bcast_addr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + int header_len = 0; + int copy_len = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_ADHOC_AES); + memset(key_ascii, 0x00, sizeof(key_ascii)); + memset(key_hex, 0x00, sizeof(key_hex)); + memset(buf, 0x00, sizeof(buf)); + + /* Get current BSS information */ + memset(&bss_info, 0, sizeof(bss_info)); + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + if (bss_info.bss_mode != MLAN_BSS_MODE_IBSS || + bss_info.media_connected == MTRUE) { + PRINTM(MERROR, "STA is connected or not in IBSS mode.\n"); + ret = -EOPNOTSUPP; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + if (strlen(respbuf) == header_len) { + /* Get Adhoc AES Key */ + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; + sec->param.encrypt_key.key_len = AES_KEY_LEN; + sec->param.encrypt_key.key_index = MLAN_KEY_INDEX_UNICAST; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memcpy(key_hex, sec->param.encrypt_key.key_material, + sizeof(key_hex)); + HEXDUMP("Adhoc AES Key (HEX)", key_hex, sizeof(key_hex)); + + tmp = key_ascii; + for (i = 0; i < sizeof(key_hex); i++) + tmp += sprintf((char *)tmp, "%02x", key_hex[i]); + } else { + /* SET operation */ + copy_len = (strlen(respbuf) - header_len); + if (copy_len >= sizeof(buf)) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + memcpy(buf, respbuf + header_len, copy_len); + + /* Parse the buf to get the cmd_action */ + action = woal_atox(&buf[0]); + if (action < 1 || action > 2) { + PRINTM(MERROR, "Invalid action argument %d\n", action); + ret = -EINVAL; + goto done; + } + + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_SET; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; + + if (action == 1) { + /* Set Adhoc AES Key */ + memcpy(key_ascii, &buf[2], sizeof(key_ascii)); + woal_ascii2hex(key_hex, (char *)key_ascii, + sizeof(key_hex)); + HEXDUMP("Adhoc AES Key (HEX)", key_hex, + sizeof(key_hex)); + + sec->param.encrypt_key.key_len = AES_KEY_LEN; + sec->param.encrypt_key.key_index = + MLAN_KEY_INDEX_UNICAST; + sec->param.encrypt_key.key_flags = + KEY_FLAG_SET_TX_KEY | KEY_FLAG_GROUP_KEY; + memcpy(sec->param.encrypt_key.mac_addr, + (u8 *)bcast_addr, ETH_ALEN); + memcpy(sec->param.encrypt_key.key_material, key_hex, + sec->param.encrypt_key.key_len); + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + } else { + /* Clear Adhoc AES Key */ + sec->param.encrypt_key.key_len = AES_KEY_LEN; + sec->param.encrypt_key.key_index = + MLAN_KEY_INDEX_UNICAST; + sec->param.encrypt_key.key_flags = KEY_FLAG_REMOVE_KEY; + memcpy(sec->param.encrypt_key.mac_addr, + (u8 *)bcast_addr, ETH_ALEN); + memset(sec->param.encrypt_key.key_material, 0, + sizeof(sec->param.encrypt_key.key_material)); + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + } + } + + HEXDUMP("Adhoc AES Key (ASCII)", key_ascii, sizeof(key_ascii)); + copy_len = sizeof(key_ascii); + memcpy(respbuf, &key_ascii, copy_len); + ret = copy_len; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} + +/** + * @brief Get GTK/PTK + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_get_key(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0, copy_len = 0; + int header_len = 0; + unsigned int i; + t_u8 key_ascii[256]; + t_u8 *tmp; + mlan_ds_sec_cfg *sec = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_GET_KEY); + if (strlen(respbuf) != header_len) { + PRINTM(MERROR, "Invalid number of parameters\n"); + ret = -EINVAL; + goto done; + } + memset(key_ascii, 0x00, sizeof(key_ascii)); + tmp = key_ascii; + + if (priv->media_connected == MFALSE) { + PRINTM(MERROR, "Can't get key in un-associated state\n"); + ret = -EFAULT; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Get Unicast Key */ + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_QUERY_KEY; + sec->param.encrypt_key.key_index = 0; + sec->param.encrypt_key.key_flags = 0; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (sec->param.encrypt_key.key_len) { + sprintf((char *)tmp, "\n%s", "PTK: "); + tmp += 5; + for (i = 0; i < sec->param.encrypt_key.key_len; i++) + tmp += sprintf((char *)tmp, "%02x", + sec->param.encrypt_key.key_material[i]); + } + + /* Get Multicase Key */ + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_QUERY_KEY; + sec->param.encrypt_key.key_index = 0; + sec->param.encrypt_key.key_flags = KEY_FLAG_GROUP_KEY; + memset(sec->param.encrypt_key.mac_addr, 0x0, MLAN_MAC_ADDR_LENGTH); + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (sec->param.encrypt_key.key_len) { + sprintf((char *)tmp, "\n%s", "GTK: "); + tmp += 5; + for (i = 0; i < sec->param.encrypt_key.key_len; i++) + tmp += sprintf((char *)tmp, "%02x", + sec->param.encrypt_key.key_material[i]); + } + + /* Get IGTK Key */ + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_QUERY_KEY; + sec->param.encrypt_key.key_index = 0; + sec->param.encrypt_key.key_flags = KEY_FLAG_AES_MCAST_IGTK; + memset(sec->param.encrypt_key.mac_addr, 0x0, MLAN_MAC_ADDR_LENGTH); + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (sec->param.encrypt_key.key_len) { + sprintf((char *)tmp, "\n%s", "IGTK: "); + tmp += 6; + for (i = 0; i < sec->param.encrypt_key.key_len; i++) + tmp += sprintf((char *)tmp, "%02x", + sec->param.encrypt_key.key_material[i]); + } + + copy_len = tmp - key_ascii; + memcpy(respbuf, &key_ascii, copy_len); + ret = copy_len; +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} + +/** + * @brief Associate to a specific indexed entry in the ScanTable + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_associate_ssid_bssid(moal_private *priv, t_u8 *respbuf, + t_u32 respbuflen) +{ + int ret = 0, copy_len = 0; + int header_len = 0; + mlan_ssid_bssid ssid_bssid; +#ifdef REASSOCIATION + mlan_bss_info bss_info; +#endif + char buf[64]; + t_u8 buflen; + t_u8 mac_idx; + t_u8 i; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_ASSOCIATE); + if (strlen(respbuf) == header_len) { + PRINTM(MERROR, "Invalid number of parameters\n"); + ret = -EINVAL; + goto done; + } + copy_len = strlen(respbuf) - header_len; + mac_idx = 0; + buflen = MIN(copy_len, (sizeof(buf) - 1)); + memset(buf, 0, sizeof(buf)); + + if (buflen < (3 * ETH_ALEN) + 2) { + PRINTM(MERROR, + "Associate: Insufficient length in IOCTL input\n"); + + /* buffer should be at least 3 characters per BSSID octet "00:" + ** plus a space separater and at least 1 char in the SSID */ + ret = -EINVAL; + goto done; + } + + memcpy(buf, respbuf + header_len, buflen); + + /* Skip white space */ + for (i = 0; (i < buflen) && (buf[i] == ' '); i++) ; + + /* Copy/Convert the BSSID */ + for (; (i < buflen) && (mac_idx < ETH_ALEN) && (buf[i] != ' '); i++) { + if (buf[i] == ':') { + mac_idx++; + } else { + ssid_bssid.bssid[mac_idx] = (t_u8)woal_atox(buf + i); + + while ((isxdigit(buf[i + 1]) && (i < buflen))) + /* Skip entire hex value */ + i++; + } + } + + /* Skip one space between the BSSID and start of the SSID */ + i++; + + /* Copy the SSID */ + ssid_bssid.ssid.ssid_len = buflen - i; + memcpy(ssid_bssid.ssid.ssid, buf + i, sizeof(ssid_bssid.ssid.ssid)); + + PRINTM(MCMND, "iwpriv assoc: AP=[" MACSTR "], ssid(%d)=[%s]\n", + MAC2STR(ssid_bssid.bssid), + (int)ssid_bssid.ssid.ssid_len, ssid_bssid.ssid.ssid); + + if (MLAN_STATUS_SUCCESS != woal_bss_start(priv, + MOAL_IOCTL_WAIT, + &ssid_bssid)) { + ret = -EFAULT; + goto done; + } +#ifdef REASSOCIATION + memset(&bss_info, 0x00, sizeof(bss_info)); + if (MLAN_STATUS_SUCCESS == woal_get_bss_info(priv, + MOAL_IOCTL_WAIT, + &bss_info)) { + memcpy(&priv->prev_ssid_bssid.ssid, + &bss_info.ssid, sizeof(mlan_802_11_ssid)); + memcpy(&priv->prev_ssid_bssid.bssid, + &bss_info.bssid, MLAN_MAC_ADDR_LENGTH); + } +#endif /* REASSOCIATION */ + +done: + LEAVE(); + return 0; +} + +/* Maximum input output characters in group WOAL_SET_GET_256_CHAR */ +#define MAX_IN_OUT_CHAR 256 +/** Tx BF Global conf argument index */ +#define BF_ENABLE_PARAM 1 +#define SOUND_ENABLE_PARAM 2 +#define FB_TYPE_PARAM 3 +#define SNR_THRESHOLD_PARAM 4 +#define SOUND_INTVL_PARAM 5 +#define BF_MODE_PARAM 6 +#define MAX_TX_BF_GLOBAL_ARGS 6 +#define BF_CFG_ACT_GET 0 +#define BF_CFG_ACT_SET 1 + +/** + * @brief Set/Get Transmit beamforming configuration + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_tx_bf_cfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int header_len = 0; + int ret = 0, copy_len = 0; + int bf_action = 0, interval = 0; + int snr = 0, i, tmp_val; + t_u8 buf[MAX_IN_OUT_CHAR], char_count = 0; + t_u8 *str, *token, *pos; + t_u16 action = 0; + + mlan_ds_11n_tx_bf_cfg bf_cfg; + mlan_trigger_sound_args *bf_sound = NULL; + mlan_tx_bf_peer_args *tx_bf_peer = NULL; + mlan_snr_thr_args *bf_snr = NULL; + mlan_bf_periodicity_args *bf_periodicity = NULL; + mlan_bf_global_cfg_args *bf_global = NULL; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_TX_BF_CFG); + if (strlen(respbuf) == header_len) { + PRINTM(MERROR, "Invalid number of parameters\n"); + ret = -EINVAL; + goto done; + } + memset(&bf_cfg, 0, sizeof(bf_cfg)); + /* Pointer to corresponding buffer */ + bf_sound = bf_cfg.body.bf_sound; + tx_bf_peer = bf_cfg.body.tx_bf_peer; + bf_snr = bf_cfg.body.bf_snr; + bf_periodicity = bf_cfg.body.bf_periodicity; + bf_global = &bf_cfg.body.bf_global_cfg; + + /* Total characters in buffer */ + char_count = strlen(respbuf) - header_len; + copy_len = char_count; + memset(buf, 0, sizeof(buf)); + if (char_count) { + if (copy_len > sizeof(buf)) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + memcpy(buf, respbuf + header_len, copy_len); + + if (char_count > 1 && buf[1] != ';') { + PRINTM(MERROR, + "No action argument. Separate with ';'\n"); + ret = -EINVAL; + goto done; + } + /* Replace ';' with NULL in the string to separate args */ + for (i = 0; i < char_count; i++) { + if (buf[i] == ';') + buf[i] = '\0'; + } + /* The first byte represents the beamforming action */ + if (woal_atoi(&bf_action, &buf[0]) != MLAN_STATUS_SUCCESS) { + ret = -EINVAL; + goto done; + } + switch (bf_action) { + case BF_GLOBAL_CONFIGURATION: + if (char_count == 1) { + action = MLAN_ACT_GET; + bf_cfg.action = BF_CFG_ACT_GET; + } else { + action = MLAN_ACT_SET; + bf_cfg.action = BF_CFG_ACT_SET; + /* Eliminate action field */ + token = &buf[2]; + for (i = 1, str = &buf[2]; token != NULL; i++) { + token = strstr(str, " "); + pos = str; + if (token != NULL) { + *token = '\0'; + str = token + 1; + } + woal_atoi(&tmp_val, pos); + switch (i) { + case BF_ENABLE_PARAM: + bf_global->bf_enbl = + (t_u8)tmp_val; + break; + case SOUND_ENABLE_PARAM: + bf_global->sounding_enbl = + (t_u8)tmp_val; + break; + case FB_TYPE_PARAM: + bf_global->fb_type = + (t_u8)tmp_val; + break; + case SNR_THRESHOLD_PARAM: + bf_global->snr_threshold = + (t_u8)tmp_val; + break; + case SOUND_INTVL_PARAM: + bf_global->sounding_interval = + (t_u16)tmp_val; + break; + case BF_MODE_PARAM: + bf_global->bf_mode = + (t_u8)tmp_val; + break; + default: + PRINTM(MERROR, + "Invalid Argument\n"); + ret = -EINVAL; + goto done; + } + } + } + break; + case TRIGGER_SOUNDING_FOR_PEER: + /* First arg = 2 BfAction Second arg = 17 MAC + "00:50:43:20:BF:64" */ + if (char_count != 19) { + PRINTM(MERROR, "Invalid argument\n"); + ret = -EINVAL; + goto done; + } + woal_mac2u8(bf_sound->peer_mac, &buf[2]); + action = MLAN_ACT_SET; + bf_cfg.action = BF_CFG_ACT_SET; + break; + case SET_GET_BF_PERIODICITY: + /* First arg = 2 BfAction Second arg = 18 MAC + "00:50:43:20:BF:64;" Third arg = 1 (min char) TX BF + interval 10 (max char) u32 maximum value 4294967295 */ + if (char_count < 19 || char_count > 30) { + PRINTM(MERROR, "Invalid argument\n"); + ret = -EINVAL; + goto done; + } + + woal_mac2u8(bf_periodicity->peer_mac, &buf[2]); + if (char_count == 19) { + action = MLAN_ACT_GET; + bf_cfg.action = BF_CFG_ACT_GET; + } else { + action = MLAN_ACT_SET; + bf_cfg.action = BF_CFG_ACT_SET; + if (woal_atoi(&interval, &buf[20]) != + MLAN_STATUS_SUCCESS) { + ret = -EINVAL; + goto done; + } + bf_periodicity->interval = interval; + } + break; + case TX_BF_FOR_PEER_ENBL: + /* Handle only SET operation here First arg = 2 + BfAction Second arg = 18 MAC "00:50:43:20:BF:64;" + Third arg = 2 enable/disable bf Fourth arg = 2 + enable/disable sounding Fifth arg = 1 FB Type */ + if (char_count != 25 && char_count != 1) { + PRINTM(MERROR, "Invalid argument\n"); + ret = -EINVAL; + goto done; + } + if (char_count == 1) { + action = MLAN_ACT_GET; + bf_cfg.action = BF_CFG_ACT_GET; + } else { + woal_mac2u8(tx_bf_peer->peer_mac, &buf[2]); + woal_atoi(&tmp_val, &buf[20]); + tx_bf_peer->bf_enbl = (t_u8)tmp_val; + woal_atoi(&tmp_val, &buf[22]); + tx_bf_peer->sounding_enbl = (t_u8)tmp_val; + woal_atoi(&tmp_val, &buf[24]); + tx_bf_peer->fb_type = (t_u8)tmp_val; + action = MLAN_ACT_SET; + bf_cfg.action = BF_CFG_ACT_SET; + } + break; + case SET_SNR_THR_PEER: + /* First arg = 2 BfAction Second arg = 18 MAC + "00:50:43:20:BF:64;" Third arg = 1/2 SNR u8 - can be + 1/2 charerters */ + if (char_count != 1 && + !(char_count == 21 || char_count == 22)) { + PRINTM(MERROR, "Invalid argument\n"); + ret = -EINVAL; + goto done; + } + if (char_count == 1) { + action = MLAN_ACT_GET; + bf_cfg.action = BF_CFG_ACT_GET; + } else { + woal_mac2u8(bf_snr->peer_mac, &buf[2]); + if (woal_atoi(&snr, &buf[20]) != + MLAN_STATUS_SUCCESS) { + ret = -EINVAL; + goto done; + } + bf_snr->snr = snr; + action = MLAN_ACT_SET; + bf_cfg.action = BF_CFG_ACT_SET; + } + break; + default: + ret = -EINVAL; + goto done; + } + + /* Save the value */ + bf_cfg.bf_action = bf_action; + if (MLAN_STATUS_SUCCESS != + woal_set_get_tx_bf_cfg(priv, action, &bf_cfg)) { + ret = -EFAULT; + goto done; + } + } else { + ret = -EINVAL; + goto done; + } + + if (action == MLAN_ACT_GET) { + copy_len = 0; + memset(buf, 0, sizeof(buf)); + switch (bf_action) { + case BF_GLOBAL_CONFIGURATION: + copy_len += + sprintf(buf + copy_len, "%d ", + (int)bf_global->bf_enbl); + copy_len += + sprintf(buf + copy_len, "%d ", + (int)bf_global->sounding_enbl); + copy_len += + sprintf(buf + copy_len, "%d ", + (int)bf_global->fb_type); + copy_len += + sprintf(buf + copy_len, "%d ", + (int)bf_global->snr_threshold); + copy_len += + sprintf(buf + copy_len, "%d ", + (int)bf_global->sounding_interval); + copy_len += + sprintf(buf + copy_len, "%d ", + (int)bf_global->bf_mode); + break; + case SET_GET_BF_PERIODICITY: + copy_len += sprintf(buf + copy_len, + "%02x:%02x:%02x:%02x:%02x:%02x", + bf_periodicity->peer_mac[0], + bf_periodicity->peer_mac[1], + bf_periodicity->peer_mac[2], + bf_periodicity->peer_mac[3], + bf_periodicity->peer_mac[4], + bf_periodicity->peer_mac[5]); + copy_len += sprintf(buf + copy_len, "%c", ' '); + copy_len += + sprintf(buf + copy_len, "%d", + bf_periodicity->interval); + break; + case TX_BF_FOR_PEER_ENBL: + for (i = 0; i < bf_cfg.no_of_peers; i++) { + copy_len += sprintf(buf + copy_len, + "%02x:%02x:%02x:%02x:%02x:%02x", + tx_bf_peer->peer_mac[0], + tx_bf_peer->peer_mac[1], + tx_bf_peer->peer_mac[2], + tx_bf_peer->peer_mac[3], + tx_bf_peer->peer_mac[4], + tx_bf_peer->peer_mac[5]); + copy_len += sprintf(buf + copy_len, "%c", ' '); + copy_len += + sprintf(buf + copy_len, "%d;", + tx_bf_peer->bf_enbl); + copy_len += + sprintf(buf + copy_len, "%d;", + tx_bf_peer->sounding_enbl); + copy_len += + sprintf(buf + copy_len, "%d ", + tx_bf_peer->fb_type); + tx_bf_peer++; + } + break; + case SET_SNR_THR_PEER: + for (i = 0; i < bf_cfg.no_of_peers; i++) { + copy_len += sprintf(buf + copy_len, + "%02x:%02x:%02x:%02x:%02x:%02x", + bf_snr->peer_mac[0], + bf_snr->peer_mac[1], + bf_snr->peer_mac[2], + bf_snr->peer_mac[3], + bf_snr->peer_mac[4], + bf_snr->peer_mac[5]); + copy_len += sprintf(buf + copy_len, "%c", ';'); + copy_len += + sprintf(buf + copy_len, "%d", + bf_snr->snr); + copy_len += sprintf(buf + copy_len, "%c", ' '); + bf_snr++; + } + break; + } + buf[copy_len] = '\0'; + } + + memcpy(respbuf, buf, copy_len); + ret = copy_len; + +done: + LEAVE(); + return ret; +} + +/** + * @brief Cmd53 read/write register + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_cmd53rdwr(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int header_len = 0; + int ret = 0; + t_u8 *buf = NULL; + t_u8 *data = NULL; + t_u8 rw, func, mode; + t_u16 blklen = 0, blknum = 0; + int reg = 0; + t_u32 pattern_len = 0, total_len = 0; + t_u16 cmd_len; + gfp_t flag; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_SD_CMD53_RW); + + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + data = kzalloc(WOAL_2K_BYTES, flag); + if (!data) { + PRINTM(MERROR, "Cannot allocate buffer for command!\n"); + ret = -EFAULT; + goto done; + } + memcpy(&cmd_len, respbuf + header_len, sizeof(cmd_len)); + buf = respbuf + header_len + sizeof(cmd_len); + + rw = buf[0]; /* read/write (0/1) */ + func = buf[1]; /* func (0/1/2) */ + reg = buf[5]; /* address */ + reg = (reg << 8) | buf[4]; + reg = (reg << 8) | buf[3]; + reg = (reg << 8) | buf[2]; + mode = buf[6]; /* byte mode/block mode (0/1) */ + blklen = buf[8]; /* block size */ + blklen = (blklen << 8) | buf[7]; + blknum = buf[10]; /* block number or byte number */ + blknum = (blknum << 8) | buf[9]; + + if (mode == BYTE_MODE) + blklen = 1; + else + mode = BLOCK_MODE; + + total_len = (mode == BLOCK_MODE) ? blknum * blklen : blknum; + if (total_len > WOAL_2K_BYTES) { + PRINTM(MERROR, "Total data length is too large!\n"); + ret = -EINVAL; + goto done; + } + PRINTM(MINFO, "CMD53 read/write, func = %d, addr = %#x, mode = %d, " + "block size = %d, block(byte) number = %d\n", + func, reg, mode, blklen, blknum); + + if (!rw) { + sdio_claim_host(((struct sdio_mmc_card *)priv->phandle->card)-> + func); + if (sdio_readsb + (((struct sdio_mmc_card *)priv->phandle->card)->func, + respbuf, reg, total_len)) { + PRINTM(MERROR, + "sdio_readsb: reading memory 0x%x failed\n", + reg); + goto done; + } + sdio_release_host(((struct sdio_mmc_card *)priv->phandle-> + card)->func); + ret = total_len; + } else { + int pos = 0; + pattern_len = cmd_len - 11; + if (pattern_len > total_len) + pattern_len = total_len; + + /* Copy/duplicate the pattern to data buffer */ + for (pos = 0; pos < total_len; pos++) + data[pos] = buf[11 + (pos % pattern_len)]; + sdio_claim_host(((struct sdio_mmc_card *)priv->phandle->card)-> + func); + if (sdio_writesb + (((struct sdio_mmc_card *)priv->phandle->card)->func, reg, + data, total_len)) + PRINTM(MERROR, + "sdio_writesb: writing memory 0x%x failed\n", + reg); + sdio_release_host(((struct sdio_mmc_card *)priv->phandle-> + card)->func); + } + +done: + kfree(data); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Port Control mode + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_port_ctrl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int header_len = 0, user_data_len = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + int ret = 0, data = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_PORT_CTRL_ENABLED; + req->req_id = MLAN_IOCTL_SEC_CFG; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_PORT_CTRL); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + req->action = MLAN_ACT_GET; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, + sizeof(data) / sizeof(int), &user_data_len); + if (user_data_len == 1) { + sec->param.port_ctrl_enabled = data; + req->action = MLAN_ACT_SET; + } else { + PRINTM(MERROR, "Invalid number of parameters\n"); + ret = -EINVAL; + goto done; + } + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (!user_data_len) { + memcpy(respbuf, &sec->param.port_ctrl_enabled, sizeof(int)); + ret = sizeof(int); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} + +/** + * @brief Private IOCTL entry to get the By-passed TX packet from upper layer + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_bypassed_packet(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int header_len = 0; + int ret = 0; + struct sk_buff *skb = NULL; + struct ethhdr *eth; + t_u16 moreLen = 0, copyLen = 0; + ENTER(); + +#define MLAN_BYPASS_PKT_EXTRA_OFFSET (4) + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_PB_BYPASS); + copyLen = strlen(respbuf) - header_len; + moreLen = MLAN_MIN_DATA_HEADER_LEN + MLAN_BYPASS_PKT_EXTRA_OFFSET + + sizeof(mlan_buffer); + + skb = alloc_skb(copyLen + moreLen, GFP_KERNEL); + if (skb == NULL) { + PRINTM(MERROR, "kmalloc no memory !!\n"); + LEAVE(); + return -ENOMEM; + } + + skb_reserve(skb, moreLen); + + memcpy(skb_put(skb, copyLen), respbuf + header_len, copyLen); + + eth = (struct ethhdr *)skb->data; + eth->h_proto = __constant_htons(eth->h_proto); + skb->dev = priv->netdev; + + HEXDUMP("Bypass TX Data", skb->data, MIN(skb->len, 100)); + + woal_hard_start_xmit(skb, priv->netdev); + + LEAVE(); + return ret; +} + +/** + * @brief Control Coalescing status Enable/Disable + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_coalescing_status(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int header_len = 0, user_data_len = 0; + int ret = 0, data = 0; + mlan_ds_misc_cfg *pcoal = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + pcoal = (mlan_ds_misc_cfg *)req->pbuf; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_COALESCE_STATUS); + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + req->action = MLAN_ACT_GET; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, + sizeof(data) / sizeof(int), &user_data_len); + if (user_data_len == 1) { + if (data == 1) + pcoal->param.coalescing_status = + MLAN_MISC_COALESCING_ENABLE; + else + pcoal->param.coalescing_status = + MLAN_MISC_COALESCING_DISABLE; + req->action = MLAN_ACT_SET; + } else { + PRINTM(MERROR, "Invalid number of parameters\n"); + ret = -EINVAL; + goto done; + } + } + + req->req_id = MLAN_IOCTL_MISC_CFG; + pcoal->sub_command = MLAN_OID_MISC_COALESCING_STATUS; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + data = (int)(((mlan_ds_misc_cfg *)req->pbuf)->param.coalescing_status); + + memcpy(respbuf, &data, sizeof(int)); + ret = sizeof(int); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(UAP_CFG80211) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION +/** + * @brief Set/Get P2P NoA (Notice of Absence) parameters + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_cfg_noa(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int header_len = 0, user_data_len = 0; + int ret = 0, data[7]; + mlan_ds_wifi_direct_config noa_cfg; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_CFG_NOA); + memset(&noa_cfg, 0, sizeof(noa_cfg)); + + memset(data, 0, sizeof(data)); + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + + if (user_data_len > 5) { + PRINTM(MERROR, "invalid parameters\n"); + ret = -EINVAL; + goto done; + } + + noa_cfg.flags |= WIFI_DIRECT_NOA; + + if (woal_p2p_config(priv, MLAN_ACT_GET, &noa_cfg) != + MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "Could not get P2P noa config\n"); + ret = -EINVAL; + goto done; + } + + if (strlen(respbuf) == header_len) { + /* GET operation */ + memcpy(respbuf, &noa_cfg, sizeof(noa_cfg)); + ret = sizeof(noa_cfg); + } else { + switch (user_data_len) { + case 5: + noa_cfg.noa_interval = (t_u32)data[4]; + case 4: + noa_cfg.noa_duration = (t_u32)data[3]; + case 3: + if (data[2] < 1 || data[2] > 255) { + PRINTM(MERROR, + "Invalid number of absence intervals\n"); + ret = -EINVAL; + goto done; + } + noa_cfg.noa_count = (t_u8)data[2]; + case 2: + if (data[1] < 0 || data[1] > 255) { + PRINTM(MERROR, "Invalid Index\n"); + ret = -EINVAL; + goto done; + } + noa_cfg.index = (t_u16)data[1]; + case 1: + if (data[0] < 0 || data[0] > 1) { + PRINTM(MERROR, "Invalid noa enable\n"); + ret = -EINVAL; + goto done; + } + noa_cfg.noa_enable = (t_u8)data[0]; + noa_cfg.flags |= WIFI_DIRECT_NOA; + break; + default: + break; + } + woal_p2p_config(priv, MLAN_ACT_SET, &noa_cfg); + } + +done: + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get P2P OPP-PS parameters + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_cfg_opp_ps(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int header_len = 0, user_data_len = 0; + int ret = 0, data[7]; + mlan_ds_wifi_direct_config opp_ps_cfg; + + ENTER(); + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_CFG_OPP_PS); + memset(&opp_ps_cfg, 0, sizeof(opp_ps_cfg)); + + memset(data, 0, sizeof(data)); + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + + if (user_data_len > 2) { + PRINTM(MERROR, "invalid parameters\n"); + ret = -EINVAL; + goto done; + } + + opp_ps_cfg.flags |= WIFI_DIRECT_OPP_PS; + + if (woal_p2p_config(priv, MLAN_ACT_GET, &opp_ps_cfg) != + MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "Could not get P2P opp ps config\n"); + ret = -EINVAL; + goto done; + } + + if (strlen(respbuf) == header_len) { + /* GET operation */ + memcpy(respbuf, &opp_ps_cfg, sizeof(opp_ps_cfg)); + ret = sizeof(opp_ps_cfg); + } else { + switch (user_data_len) { + case 2: + opp_ps_cfg.ct_window = (t_u8)data[1]; + case 1: + if (data[0] < 0 || data[0] > 1) { + PRINTM(MERROR, "Invalid ps enable\n"); + ret = -EINVAL; + goto done; + } + opp_ps_cfg.opp_ps_enable = (t_u8)data[0]; + opp_ps_cfg.flags |= WIFI_DIRECT_OPP_PS; + default: + break; + } + woal_p2p_config(priv, MLAN_ACT_SET, &opp_ps_cfg); + } + +done: + + LEAVE(); + return ret; +} +#endif +#endif +#endif + +#if defined(STA_CFG80211) || defined(UAP_CFG80211) +#define DEF_NOA_INTERVAL 100 +/** + ** @brief Set/Get P2P NoA (Notice of Absence) parameters + ** @param priv Pointer to moal_private structure + ** @param respbuf Pointer to response buffer + ** @param resplen Response buffer length + ** + ** @return Number of bytes written, negative for failure. + **/ +static int +woal_p2p_ps_cfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int user_data_len = 0; + int ret = 0, data[2]; + u32 duration = priv->phandle->noa_duration; + u32 interval = 0; + + ENTER(); + if (strlen(respbuf) > strlen("P2P_PERIODIC_SLEEP")) { + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen("P2P_PERIODIC_SLEEP") + 1, + data, ARRAY_SIZE(data), &user_data_len); + } + if ((user_data_len != 1) && (user_data_len != 2)) { + PRINTM(MERROR, + " Invalid parameter number for P2P_PERIODIC_SLEEP"); + ret = -EINVAL; + goto done; + } + if (data[0] < DEF_NOA_INTERVAL) + interval = DEF_NOA_INTERVAL; + else + interval = + (data[0] + DEF_NOA_INTERVAL - + 1) / DEF_NOA_INTERVAL * DEF_NOA_INTERVAL; + + if (user_data_len == 2) + duration = data[1]; + if (duration >= interval) { + PRINTM(MERROR, + " Invalid noa duration/interval! duration=%d interval=%d\n", + duration, interval); + ret = -EINVAL; + goto done; + } + priv->phandle->noa_interval = interval; + priv->phandle->noa_duration = duration; + PRINTM(MIOCTL, "configure noa interval=%d, duration=%d\n", + priv->phandle->noa_interval, priv->phandle->noa_duration); +done: + LEAVE(); + return ret; +} +#endif + +#ifdef WIFI_DIRECT_SUPPORT +#if defined(STA_CFG80211) || defined(UAP_CFG80211) +/** + * @brief Set/Get MIRACAST configuration parameters + * + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_miracast_cfg(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + int user_data_len = 0, header_len = 0, data[3] = { 0, 0, 0 }; + + ENTER(); + + if (!priv || !priv->phandle) { + PRINTM(MERROR, "priv or handle is null\n"); + ret = -EFAULT; + goto done; + } + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_MIRACAST_CFG); + + if (strlen(respbuf) == header_len) { + /* GET operation */ + data[0] = priv->phandle->miracast_mode; + data[1] = priv->phandle->miracast_scan_time; + data[2] = priv->phandle->scan_chan_gap; + + memcpy(respbuf, (t_u8 *)data, sizeof(data)); + ret = sizeof(data); + } else { + /* SET operation */ + memset(data, 0, sizeof(data)); + parse_arguments(respbuf + header_len, data, ARRAY_SIZE(data), + &user_data_len); + + if (user_data_len > 3) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + if (data[0] < 0 || data[0] > 2 || data[1] < 0 || data[2] < 0) { + PRINTM(MERROR, "Invalid argument\n"); + ret = -EINVAL; + goto done; + } + } + + if (user_data_len >= 1) + priv->phandle->miracast_mode = (t_u8)data[0]; + if (user_data_len >= 2) + priv->phandle->miracast_scan_time = (t_u16)data[1]; + if (user_data_len == 3) + priv->phandle->scan_chan_gap = (t_u16)data[2]; + +done: + LEAVE(); + return ret; +} + +/** + * @brief Configuring scan gap for miracast mode + * + * @param priv A pointer to moal_private structure + * @param respbuf A pointer to response buffer + * @param respbuflen Available length of response buffer + * + * @return 0 --success, otherwise failure + */ +int +woal_set_scan_chan_gap(moal_private *priv, t_u8 *respbuf, int respbuflen) +{ + t_u32 data[2]; + int ret = 0; + int user_data_len = 0; + + ENTER(); + + if (strlen(respbuf) > strlen("SCAN_TIMING")) { + memset((char *)data, 0, sizeof(data)); + parse_arguments(respbuf + strlen("SCAN_TIMING") + 1, data, + ARRAY_SIZE(data), &user_data_len); + } + + if (user_data_len != 2) { + PRINTM(MERROR, "Invalid arguments for scan timing\n"); + ret = -EINVAL; + goto done; + } + priv->phandle->miracast_scan_time = (t_u16)data[0]; + priv->phandle->scan_chan_gap = (t_u16)data[1]; +done: + LEAVE(); + return ret; + +} +#endif +#endif + +/** + * @brief Set/Get control to coex RX window size configuration + * + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_coex_rx_winsize(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + int user_data_len = 0, header_len = 0, data; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (!priv || !priv->phandle) { + PRINTM(MERROR, "priv or handle is null\n"); + ret = -EFAULT; + goto done; + } + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_COEX_RX_WINSIZE); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + req->req_id = MLAN_IOCTL_11N_CFG; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_COEX_RX_WINSIZE; + + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + req->action = MLAN_ACT_GET; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, + sizeof(data) / sizeof(int), &user_data_len); + if (user_data_len != 1) { + PRINTM(MERROR, "Invalid number of args! %d\n", + user_data_len); + ret = -EINVAL; + goto done; + } + if ((data != MTRUE) && (data != MFALSE)) { + PRINTM(MERROR, + "Invalid coex RX window size parameter %d\n", + data); + ret = -EINVAL; + goto done; + } + cfg_11n->param.coex_rx_winsize = data; + req->action = MLAN_ACT_SET; + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (!user_data_len) { + memcpy(respbuf, (t_u8 *)&cfg_11n->param.coex_rx_winsize, + sizeof(t_u32)); + ret = sizeof(t_u32); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get control to TX AMPDU configuration on infra link + * + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_txaggrctrl(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + int user_data_len = 0, header_len = 0, data; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (!priv || !priv->phandle) { + PRINTM(MERROR, "priv or handle is null\n"); + ret = -EFAULT; + goto done; + } + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_TX_AGGR_CTRL); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + req->req_id = MLAN_IOCTL_11N_CFG; + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_TX_AGGR_CTRL; + + if (strlen(respbuf) == header_len) { + /* GET operation */ + user_data_len = 0; + req->action = MLAN_ACT_GET; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, + sizeof(data) / sizeof(int), &user_data_len); + if (user_data_len != 1) { + PRINTM(MERROR, "Invalid number of args! %d\n", + user_data_len); + ret = -EINVAL; + goto done; + } + if ((data != MTRUE) && (data != MFALSE)) { + PRINTM(MERROR, "Invalid txaggrctrl parameter %d\n", + data); + ret = -EINVAL; + goto done; + } + cfg_11n->param.txaggrctrl = data; + req->action = MLAN_ACT_SET; + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (!user_data_len) { + memcpy(respbuf, (t_u8 *)&cfg_11n->param.txaggrctrl, + sizeof(t_u32)); + ret = sizeof(t_u32); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get control to enable/disable auto TDLS + * + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + * + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_auto_tdls(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + int ret = 0; + int user_data_len = 0, header_len = 0, data; + + ENTER(); + + if (!priv || !priv->phandle) { + PRINTM(MERROR, "priv or handle is null\n"); + ret = -EFAULT; + goto done; + } + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_AUTO_TDLS); + + if (strlen(respbuf) == header_len) { + /* GET operation */ + data = priv->enable_auto_tdls; + memcpy(respbuf, (t_u8 *)&data, sizeof(data)); + ret = sizeof(data); + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, + sizeof(data) / sizeof(int), &user_data_len); + if (user_data_len != 1) { + PRINTM(MERROR, "Invalid number of args! %d\n", + user_data_len); + ret = -EINVAL; + goto done; + } + if ((data != MTRUE) && (data != MFALSE)) { + PRINTM(MERROR, "Invalid autotdls parameter %d\n", data); + ret = -EINVAL; + goto done; + } + priv->enable_auto_tdls = (t_u8)data; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Set/Get TDLS idle timeout value + * + * @param priv Pointer to moal_private structure + * @param respbuf Pointer to response buffer + * @param resplen Response buffer length + + * @return Number of bytes written, negative for failure. + */ +static int +woal_priv_tdls_idle_time(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen) +{ + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_misc_cfg *misc = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + int ret = 0; + int user_data_len = 0, header_len = 0, data; + + ENTER(); + + if (!priv || !priv->phandle) { + PRINTM(MERROR, "priv or handle is null\n"); + ret = -EFAULT; + goto done; + } + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; + misc->sub_command = MLAN_OID_MISC_TDLS_IDLE_TIME; + ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; + + header_len = strlen(CMD_MARVELL) + strlen(PRIV_CMD_TDLS_IDLE_TIME); + if (strlen(respbuf) == header_len) { + /* GET operation */ + ioctl_req->action = MLAN_ACT_GET; + } else { + /* SET operation */ + parse_arguments(respbuf + header_len, &data, + sizeof(data) / sizeof(int), &user_data_len); + if (user_data_len != 1) { + PRINTM(MERROR, "Invalid number of args! %d\n", + user_data_len); + ret = -EINVAL; + goto done; + } + ioctl_req->action = MLAN_ACT_SET; + misc->param.tdls_idle_time = (t_u16)data; + } + + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memcpy(respbuf, (t_u8 *)&misc->param.tdls_idle_time, sizeof(t_u16)); + ret = sizeof(t_u16); + + PRINTM(MIOCTL, "tdls idle time %d\n", misc->param.tdls_idle_time); +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + + LEAVE(); + return ret; +} + +/** + * @brief Set priv command for Android + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * + * @return 0 --success, otherwise fail + */ +int +woal_android_priv_cmd(struct net_device *dev, struct ifreq *req) +{ + int ret = 0; + android_wifi_priv_cmd priv_cmd; + moal_private *priv = (moal_private *)netdev_priv(dev); + char *buf = NULL; + char *pdata; +#ifdef STA_SUPPORT + int power_mode = 0; + int band = 0; + char *pband = NULL; + mlan_bss_info bss_info; + mlan_ds_get_signal signal; + mlan_rate_cfg_t rate; + t_u8 country_code[COUNTRY_CODE_LEN]; + int copy_len = 0; +#endif + int len = 0; + gfp_t flag; + char *cmd_buf = NULL; + + ENTER(); + if (!priv || !priv->phandle) { + PRINTM(MERROR, "priv or handle is NULL\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user(&priv_cmd, req->ifr_data, + sizeof(android_wifi_priv_cmd))) { + ret = -EFAULT; + goto done; + } +#define CMD_BUF_LEN 2048 + if (priv_cmd.used_len < 0 || priv_cmd.total_len <= 0 || + priv_cmd.used_len > priv_cmd.total_len) { + PRINTM(MERROR, + "Invalid Android priv cmd len. used_len: %d, total_len: %d\n", + priv_cmd.used_len, priv_cmd.total_len); + ret = -EINVAL; + goto done; + } + if (priv_cmd.total_len + 1 > CMD_BUF_LEN) + priv_cmd.total_len = CMD_BUF_LEN - 1; + + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + buf = kzalloc(CMD_BUF_LEN, flag); + if (!buf) { + PRINTM(MERROR, "%s: failed to allocate memory\n", __FUNCTION__); + ret = -ENOMEM; + goto done; + } +#ifdef USERSPACE_32BIT_OVER_KERNEL_64BIT + memcpy(&cmd_buf, &priv_cmd.buf, sizeof(cmd_buf)); +#else + cmd_buf = priv_cmd.buf; +#endif + if (copy_from_user(buf, cmd_buf, priv_cmd.total_len)) { + ret = -EFAULT; + goto done; + } + buf[CMD_BUF_LEN - 1] = '\0'; + + PRINTM(MIOCTL, "Android priv cmd: [%s] on [%s]\n", buf, req->ifr_name); + + if (strncmp(buf, CMD_MARVELL, strlen(CMD_MARVELL)) && + woal_check_driver_status(priv->phandle)) { + PRINTM(MERROR, "%s fail when driver hang\n", buf); + ret = -EFAULT; + goto done; + } + + if (strncmp(buf, CMD_MARVELL, strlen(CMD_MARVELL)) == 0) { + /* This command has come from mlanutl app */ + + /* Check command */ + if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_VERSION, + strlen(PRIV_CMD_VERSION)) == 0) { + /* Get version */ + len = woal_get_priv_driver_version(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_BANDCFG, + strlen(PRIV_CMD_BANDCFG)) == 0) { + /* Set/Get band configuration */ + len = woal_setget_priv_bandcfg(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_HOSTCMD, + strlen(PRIV_CMD_HOSTCMD)) == 0) { + /* hostcmd configuration */ + len = woal_priv_hostcmd(priv, buf, priv_cmd.total_len, + MOAL_IOCTL_WAIT); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_HTTXCFG, + strlen(PRIV_CMD_HTTXCFG)) == 0) { + /* Set/Get HT Tx configuration */ + len = woal_setget_priv_httxcfg(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_HTCAPINFO, + strlen(PRIV_CMD_HTCAPINFO)) == 0) { + /* Set/Get HT Capability information */ + len = woal_setget_priv_htcapinfo(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_ADDBAPARA, + strlen(PRIV_CMD_ADDBAPARA)) == 0) { + /* Set/Get Add BA parameters */ + len = woal_setget_priv_addbapara(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_AGGRPRIOTBL, + strlen(PRIV_CMD_AGGRPRIOTBL)) == 0) { + /* Set/Get Aggregation priority table parameters */ + len = woal_setget_priv_aggrpriotbl(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_ADDBAREJECT, + strlen(PRIV_CMD_ADDBAREJECT)) == 0) { + /* Set/Get Add BA reject parameters */ + len = woal_setget_priv_addbareject(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_DELBA, + strlen(PRIV_CMD_DELBA)) == 0) { + /* Delete selective BA based on parameters */ + len = woal_priv_delba(priv, buf, priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_REJECTADDBAREQ, + strlen(PRIV_CMD_REJECTADDBAREQ)) == 0) { + /* Set/Get the reject addba requst conditions */ + len = woal_priv_rejectaddbareq(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_VHTCFG, + strlen(PRIV_CMD_VHTCFG)) == 0) { + /* Set/Get 11AC configuration */ + len = woal_setget_priv_vhtcfg(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_DATARATE, + strlen(PRIV_CMD_DATARATE)) == 0) { + /* Get data rate */ + len = woal_get_priv_datarate(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_TXRATECFG, + strlen(PRIV_CMD_TXRATECFG)) == 0) { + /* Set/Get tx rate cfg */ + len = woal_setget_priv_txratecfg(priv, buf, + priv_cmd.total_len); + goto handled; +#ifdef STA_SUPPORT + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_GETLOG, + strlen(PRIV_CMD_GETLOG)) == 0) { + /* Get wireless stats information */ + len = woal_get_priv_getlog(priv, buf, + priv_cmd.total_len); + goto handled; +#endif + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_CUSTOMIE, + strlen(PRIV_CMD_CUSTOMIE)) == 0) { + /* Custom IE configuration */ + len = woal_priv_customie(priv, buf, priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_ESUPPMODE, + strlen(PRIV_CMD_ESUPPMODE)) == 0) { + /* Esupplicant mode configuration */ + len = woal_setget_priv_esuppmode(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_PASSPHRASE, + strlen(PRIV_CMD_PASSPHRASE)) == 0) { + /* Esupplicant passphrase configuration */ + len = woal_setget_priv_passphrase(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_DEAUTH, + strlen(PRIV_CMD_DEAUTH)) == 0) { + /* Deauth */ + len = woal_priv_deauth(priv, buf, priv_cmd.total_len); + goto handled; +#ifdef UAP_SUPPORT + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_AP_DEAUTH, + strlen(PRIV_CMD_AP_DEAUTH)) == 0) { + /* AP Deauth */ + len = woal_priv_ap_deauth(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_GET_STA_LIST, + strlen(PRIV_CMD_GET_STA_LIST)) == 0) { + /* Get STA list */ + len = woal_priv_get_sta_list(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_BSS_CONFIG, + strlen(PRIV_CMD_BSS_CONFIG)) == 0) { + /* BSS config */ + len = woal_priv_bss_config(priv, buf, + priv_cmd.total_len); + goto handled; +#endif +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_BSSROLE, + strlen(PRIV_CMD_BSSROLE)) == 0) { + /* BSS Role */ + len = woal_priv_bssrole(priv, buf, + (t_u32)priv_cmd.total_len); + goto handled; +#endif +#endif +#ifdef STA_SUPPORT + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_SETUSERSCAN, + strlen(PRIV_CMD_SETUSERSCAN)) == 0) { + /* Set user scan */ + len = woal_priv_setuserscan(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_GETSCANTABLE, + strlen(PRIV_CMD_GETSCANTABLE)) == 0) { + /* Get scan table */ + len = woal_priv_getscantable(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_EXTCAPCFG, + strlen(PRIV_CMD_EXTCAPCFG)) == 0) { + /* Extended capabilities configure */ + len = woal_priv_extcapcfg(priv, buf, + (t_u32)priv_cmd.total_len); + goto handled; +#endif + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_DEEPSLEEP, + strlen(PRIV_CMD_DEEPSLEEP)) == 0) { + /* Deep sleep */ + len = woal_priv_setgetdeepsleep(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_IPADDR, + strlen(PRIV_CMD_IPADDR)) == 0) { + /* IP address */ + len = woal_priv_setgetipaddr(priv, buf, + (t_u32)priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_WPSSESSION, + strlen(PRIV_CMD_WPSSESSION)) == 0) { + /* WPS Session */ + len = woal_priv_setwpssession(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_OTPUSERDATA, + strlen(PRIV_CMD_OTPUSERDATA)) == 0) { + /* OTP user data */ + len = woal_priv_otpuserdata(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_COUNTRYCODE, + strlen(PRIV_CMD_COUNTRYCODE)) == 0) { + /* Country code */ + len = woal_priv_set_get_countrycode(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_TCPACKENH, + strlen(PRIV_CMD_TCPACKENH)) == 0) { + /* TCP ack enhancement */ + len = woal_priv_setgettcpackenh(priv, buf, + priv_cmd.total_len); + goto handled; +#ifdef REASSOCIATION + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_ASSOCESSID, + strlen(PRIV_CMD_ASSOCESSID)) == 0) { + /* Associate to essid */ + len = woal_priv_assocessid(priv, buf, + priv_cmd.total_len); + goto handled; +#endif + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_WAKEUPREASON, + strlen(PRIV_CMD_WAKEUPREASON)) == 0) { + /* wakeup reason */ + len = woal_priv_getwakeupreason(priv, buf, + priv_cmd.total_len); + goto handled; +#ifdef STA_SUPPORT + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_LISTENINTERVAL, + strlen(PRIV_CMD_LISTENINTERVAL)) == 0) { + /* Listen Interval */ + len = woal_priv_set_get_listeninterval(priv, buf, + priv_cmd. + total_len); + goto handled; +#endif +#ifdef DEBUG_LEVEL1 + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_DRVDBG, + strlen(PRIV_CMD_DRVDBG)) == 0) { + /* Driver debug bit mask */ + len = woal_priv_set_get_drvdbg(priv, buf, + priv_cmd.total_len); + goto handled; +#endif + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_HSCFG, + strlen(PRIV_CMD_HSCFG)) == 0) { + /* HS configuration */ + len = woal_priv_hscfg(priv, buf, priv_cmd.total_len, + MTRUE); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_HSSETPARA, + strlen(PRIV_CMD_HSSETPARA)) == 0) { + /* Set HS parameter */ + len = woal_priv_hssetpara(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_SCANCFG, + strlen(PRIV_CMD_SCANCFG)) == 0) { + /* Scan configuration */ + len = woal_priv_set_get_scancfg(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_SET_BSS_MODE, + strlen(PRIV_CMD_SET_BSS_MODE)) == 0) { + /* Set bss mode */ + len = woal_priv_set_bss_mode(priv, buf, + priv_cmd.total_len); + goto handled; +#ifdef STA_SUPPORT + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_SET_AP, + strlen(PRIV_CMD_SET_AP)) == 0) { + /* Set AP */ + len = woal_priv_set_ap(priv, buf, priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_SET_POWER, + strlen(PRIV_CMD_SET_POWER)) == 0) { + /* Set power management parameters */ + len = woal_priv_set_power(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_SET_ESSID, + strlen(PRIV_CMD_SET_ESSID)) == 0) { + /* Set essid */ + len = woal_priv_set_essid(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_SET_AUTH, + strlen(PRIV_CMD_SET_AUTH)) == 0) { + /* Set authentication mode parameters */ + len = woal_priv_set_auth(priv, buf, priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_GET_AP, + strlen(PRIV_CMD_GET_AP)) == 0) { + /* Get AP */ + len = woal_priv_get_ap(priv, buf, priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_GET_POWER, + strlen(PRIV_CMD_GET_POWER)) == 0) { + /* Get power management parameters */ + len = woal_priv_get_power(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_PSMODE, + strlen(PRIV_CMD_PSMODE)) == 0) { + /* Set/Get PS mode */ + len = woal_priv_set_get_psmode(priv, buf, + priv_cmd.total_len); + goto handled; +#endif + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_WARMRESET, + strlen(PRIV_CMD_WARMRESET)) == 0) { + /* Performs warm reset */ + len = woal_priv_warmreset(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_TXPOWERCFG, + strlen(PRIV_CMD_TXPOWERCFG)) == 0) { + /* TX power configurations */ + len = woal_priv_txpowercfg(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_PSCFG, + strlen(PRIV_CMD_PSCFG)) == 0) { + /* PS configurations */ + len = woal_priv_pscfg(priv, buf, priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_SLEEPPD, + strlen(PRIV_CMD_SLEEPPD)) == 0) { + /* Sleep period */ + len = woal_priv_sleeppd(priv, buf, priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_TXCONTROL, + strlen(PRIV_CMD_TXCONTROL)) == 0) { + /* Tx control */ + len = woal_priv_txcontrol(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_REGRDWR, + strlen(PRIV_CMD_REGRDWR)) == 0) { + /* Register Read/Write */ + len = woal_priv_regrdwr(priv, buf, priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_RDEEPROM, + strlen(PRIV_CMD_RDEEPROM)) == 0) { + /* Read the EEPROM contents of the card */ + len = woal_priv_rdeeprom(priv, buf, priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_MEMRDWR, + strlen(PRIV_CMD_MEMRDWR)) == 0) { + /* Memory Read/Write */ + len = woal_priv_memrdwr(priv, buf, priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_SDCMD52RW, + strlen(PRIV_CMD_SDCMD52RW)) == 0) { + /* Cmd52 read/write register */ + len = woal_priv_sdcmd52rw(priv, buf, + priv_cmd.total_len); + goto handled; +#ifdef STA_SUPPORT + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_ARPFILTER, + strlen(PRIV_CMD_ARPFILTER)) == 0) { + /* ARPFilter Configuration */ + len = woal_priv_arpfilter(priv, buf, + priv_cmd.total_len); + goto handled; +#endif + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_HOTSPOTCFG, + strlen(PRIV_CMD_HOTSPOTCFG)) == 0) { + /* Hotspot CFG */ + len = woal_priv_hotspotcfg(priv, buf, + priv_cmd.total_len); + goto handled; +#ifdef RX_PACKET_COALESCE + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_RX_COAL_CFG, + strlen(PRIV_CMD_RX_COAL_CFG)) == 0) { + /* RX packet coalescing Configuration */ + len = woal_priv_rx_pkt_coalesce_cfg(priv, buf, + priv_cmd.total_len); + goto handled; +#endif + + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_MGMT_FRAME_CTRL, + strlen(PRIV_CMD_MGMT_FRAME_CTRL)) == 0) { + /* Mgmt Frame Passthrough Ctrl */ + len = woal_priv_mgmt_frame_passthru_ctrl(priv, buf, + priv_cmd. + total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_QCONFIG, + strlen(PRIV_CMD_QCONFIG)) == 0) { + /* Queue config */ + len = woal_priv_qconfig(priv, buf, priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_ADDTS, + strlen(PRIV_CMD_ADDTS)) == 0) { + /* Send an ADDTS TSPEC */ + len = woal_priv_wmm_addts_req_ioctl(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_DELTS, + strlen(PRIV_CMD_DELTS)) == 0) { + /* Send a DELTS TSPE */ + len = woal_priv_wmm_delts_req_ioctl(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_QSTATUS, + strlen(PRIV_CMD_QSTATUS)) == 0) { + /* Get the status of the WMM queues */ + len = woal_priv_wmm_queue_status_ioctl(priv, buf, + priv_cmd. + total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_TS_STATUS, + strlen(PRIV_CMD_TS_STATUS)) == 0) { + /* Get the status of the WMM Traffic Streams */ + len = woal_priv_wmm_ts_status_ioctl(priv, buf, + priv_cmd.total_len); + goto handled; +#ifdef STA_SUPPORT + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_QOS_CFG, + strlen(PRIV_CMD_QOS_CFG)) == 0) { + t_u32 action = MLAN_ACT_GET; + if (strlen(buf) == + strlen(CMD_MARVELL) + strlen(PRIV_CMD_QOS_CFG)) { + pdata = buf; /* GET operation */ + } else { + pdata = buf + strlen(CMD_MARVELL) + + strlen(PRIV_CMD_QOS_CFG); + action = MLAN_ACT_SET; /* SET operation */ + } + if (MLAN_STATUS_SUCCESS != + woal_priv_qos_cfg(priv, action, pdata)) { + ret = -EFAULT; + goto done; + } + if (action == MLAN_ACT_GET) + len = sizeof(t_u8); + goto handled; +#endif + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_MAC_CTRL, + strlen(PRIV_CMD_MAC_CTRL)) == 0) { + /* MAC CTRL */ + len = woal_priv_macctrl(priv, buf, priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_GETWAP, + strlen(PRIV_CMD_GETWAP)) == 0) { + /* Get WAP */ + len = woal_priv_getwap(priv, buf, priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_REGION_CODE, + strlen(PRIV_CMD_REGION_CODE)) == 0) { + /* Region Code */ + len = woal_priv_region_code(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_MULTI_CHAN_CFG, + strlen(PRIV_CMD_MULTI_CHAN_CFG)) == 0) { + /* Channel time and buffer weight configuration */ + len = woal_priv_multi_chan_config(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), + PRIV_CMD_MULTI_CHAN_POLICY, + strlen(PRIV_CMD_MULTI_CHAN_POLICY)) == 0) { + /* Multi-channel Policy enable/disable */ + len = woal_priv_multi_chan_policy(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_FWMACADDR, + strlen(PRIV_CMD_FWMACADDR)) == 0) { + /* Set FW MAC address */ + len = woal_priv_fwmacaddr(priv, buf, + priv_cmd.total_len); + goto handled; +#if defined(WIFI_DIRECT_SUPPORT) +#ifdef STA_CFG80211 +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_OFFCHANNEL, + strlen(PRIV_CMD_OFFCHANNEL)) == 0) { + if (IS_STA_CFG80211(cfg80211_wext)) { + /* Set offchannel */ + len = woal_priv_offchannel(priv, buf, + priv_cmd.total_len); + } else + len = sprintf(buf, + "CFG80211 is not enabled\n") + 1; + goto handled; +#endif +#endif +#endif + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_VEREXT, + strlen(PRIV_CMD_VEREXT)) == 0) { + /* Get Extended version */ + len = woal_priv_get_driver_verext(priv, buf, + priv_cmd.total_len); + goto handled; +#if defined(STA_SUPPORT) + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_RADIO_CTRL, + strlen(PRIV_CMD_RADIO_CTRL)) == 0) { + /* Set/Get radio */ + len = woal_priv_radio_ctrl(priv, buf, + priv_cmd.total_len); + goto handled; +#endif + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_WMM_CFG, + strlen(PRIV_CMD_WMM_CFG)) == 0) { + /* Implement WMM enable command */ + len = woal_priv_wmm_cfg(priv, buf, priv_cmd.total_len); + goto handled; +#if defined(STA_SUPPORT) + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_11D_CFG, + strlen(PRIV_CMD_11D_CFG)) == 0) { + /* Implement 802.11D enable command */ + len = woal_priv_11d_cfg(priv, buf, priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_11D_CLR_TBL, + strlen(PRIV_CMD_11D_CLR_TBL)) == 0) { + /* Implement 802.11D clear chan table command */ + len = woal_priv_11d_clr_chan_tbl(priv, buf, + priv_cmd.total_len); + goto handled; +#endif + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_WWS_CFG, + strlen(PRIV_CMD_WWS_CFG)) == 0) { + /* Set/Get WWS configuration */ + len = woal_priv_wws_cfg(priv, buf, priv_cmd.total_len); + goto handled; +#if defined(REASSOCIATION) + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_REASSOCTRL, + strlen(PRIV_CMD_REASSOCTRL)) == 0) { + /* Set/Get reassociation settings */ + len = woal_priv_set_get_reassoc(priv, buf, + priv_cmd.total_len); + goto handled; +#endif + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_TXBUF_CFG, + strlen(PRIV_CMD_TXBUF_CFG)) == 0) { + /* Get Transmit buffer size */ + len = woal_priv_txbuf_cfg(priv, buf, + priv_cmd.total_len); + goto handled; +#ifdef STA_SUPPORT + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_AUTH_TYPE, + strlen(PRIV_CMD_AUTH_TYPE)) == 0) { + /* Set/Get auth type */ + len = woal_priv_auth_type(priv, buf, + priv_cmd.total_len); + goto handled; +#endif + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_POWER_CONS, + strlen(PRIV_CMD_POWER_CONS)) == 0) { + /* Set/get user provisioned local power constraint */ + len = woal_priv_11h_local_pwr_constraint(priv, buf, + priv_cmd. + total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_HT_STREAM_CFG, + strlen(PRIV_CMD_HT_STREAM_CFG)) == 0) { + /* Set/get HT stream configurations */ + len = woal_priv_ht_stream_cfg(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_THERMAL, + strlen(PRIV_CMD_THERMAL)) == 0) { + /* Get thermal reading */ + len = woal_priv_thermal(priv, buf, priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_BCN_INTERVAL, + strlen(PRIV_CMD_BCN_INTERVAL)) == 0) { + /* Set/Get beacon interval */ + len = woal_priv_beacon_interval(priv, buf, + priv_cmd.total_len); + goto handled; +#ifdef STA_SUPPORT + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_GET_SIGNAL, + strlen(PRIV_CMD_GET_SIGNAL)) == 0) { + /* Get signal */ + len = woal_priv_get_signal(priv, buf, + priv_cmd.total_len); + goto handled; +#endif +#if defined(STA_SUPPORT) + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_PMFCFG, + strlen(PRIV_CMD_PMFCFG)) == 0) { + /* Configure PMF */ + len = woal_priv_set_get_pmfcfg(priv, buf, + priv_cmd.total_len); + goto handled; +#endif + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_INACTIVITYTO, + strlen(PRIV_CMD_INACTIVITYTO)) == 0) { + /* Get/Set inactivity timeout extend */ + len = woal_priv_inactivity_timeout_ext(priv, buf, + priv_cmd. + total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_AMSDU_AGGR_CTRL, + strlen(PRIV_CMD_AMSDU_AGGR_CTRL)) == 0) { + /* Enable/Disable amsdu_aggr_ctrl */ + len = woal_priv_11n_amsdu_aggr_ctrl(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_TX_BF_CAP, + strlen(PRIV_CMD_TX_BF_CAP)) == 0) { + /* Set/Get Transmit beamforming capabilities */ + len = woal_priv_tx_bf_cap_ioctl(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_SDIO_CLOCK, + strlen(PRIV_CMD_SDIO_CLOCK)) == 0) { + /* Turn on/off the sdio clock */ + len = woal_priv_sdio_clock_ioctl(priv, buf, + priv_cmd.total_len); + goto handled; +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_MPA_CTRL, + strlen(PRIV_CMD_MPA_CTRL)) == 0) { + /* Set SDIO Multi-point aggregation control parameters */ + len = woal_priv_sdio_mpa_ctrl(priv, buf, + priv_cmd.total_len); + goto handled; +#endif + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_SLEEP_PARAMS, + strlen(PRIV_CMD_SLEEP_PARAMS)) == 0) { + /* Configure sleep parameters */ + len = woal_priv_sleep_params_ioctl(priv, buf, + priv_cmd.total_len); + goto handled; +#if defined(DFS_TESTING_SUPPORT) + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_DFS_TESTING, + strlen(PRIV_CMD_DFS_TESTING)) == 0) { + /* Set/Get DFS Testing settings */ + len = woal_priv_dfs_testing(priv, buf, + priv_cmd.total_len); + goto handled; +#endif + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_CFP_CODE, + strlen(PRIV_CMD_CFP_CODE)) == 0) { + /* Set/Get CFP table codes */ + len = woal_priv_cfp_code(priv, buf, priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_ANT_CFG, + strlen(PRIV_CMD_ANT_CFG)) == 0) { + /* Set/Get Tx/Rx antenna */ + len = woal_priv_set_get_tx_rx_ant(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_SYSCLOCK, + strlen(PRIV_CMD_SYSCLOCK)) == 0) { + /* Get/Set system clock */ + len = woal_priv_sysclock(priv, buf, priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_ADHOC_AES, + strlen(PRIV_CMD_ADHOC_AES)) == 0) { + /* Adhoc AES control */ + len = woal_priv_adhoc_aes(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_GET_KEY, + strlen(PRIV_CMD_GET_KEY)) == 0) { + /* Get GTK/PTK */ + len = woal_priv_get_key(priv, buf, priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_ASSOCIATE, + strlen(PRIV_CMD_ASSOCIATE)) == 0) { + /* Associate to a specific indexed entry in the + ScanTable */ + len = woal_priv_associate_ssid_bssid(priv, buf, + priv_cmd. + total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_TX_BF_CFG, + strlen(PRIV_CMD_TX_BF_CFG)) == 0) { + /* Set/Get Transmit beamforming configuration */ + len = woal_priv_tx_bf_cfg(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_SD_CMD53_RW, + strlen(PRIV_CMD_SD_CMD53_RW)) == 0) { + /* Cmd53 read/write register */ + len = woal_priv_cmd53rdwr(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_PORT_CTRL, + strlen(PRIV_CMD_PORT_CTRL)) == 0) { + /* Set/Get Port Control mode */ + len = woal_priv_port_ctrl(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_PB_BYPASS, + strlen(PRIV_CMD_PB_BYPASS)) == 0) { + /* Private IOCTL entry to get the By-passed TX packet + from upper layer */ + len = woal_priv_bypassed_packet(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_COALESCE_STATUS, + strlen(PRIV_CMD_COALESCE_STATUS)) == 0) { + /* Control Coalescing status Enable/Disable */ + len = woal_priv_coalescing_status(priv, buf, + priv_cmd.total_len); + goto handled; +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(UAP_CFG80211) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_CFG_NOA, + strlen(PRIV_CMD_CFG_NOA)) == 0) { + /* Set/Get P2P NoA (Notice of Absence) parameters */ + len = woal_priv_cfg_noa(priv, buf, priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_CFG_OPP_PS, + strlen(PRIV_CMD_CFG_OPP_PS)) == 0) { + /* Set/Get P2P OPP-PS parameters */ + len = woal_priv_cfg_opp_ps(priv, buf, + priv_cmd.total_len); + goto handled; +#endif +#endif +#endif +#ifdef WIFI_DIRECT_SUPPORT +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_MIRACAST_CFG, + strlen(PRIV_CMD_MIRACAST_CFG)) == 0) { + /* Set/Get MIRACAST configuration parameters */ + len = woal_priv_miracast_cfg(priv, buf, + priv_cmd.total_len); + goto handled; +#endif +#endif + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_COEX_RX_WINSIZE, + strlen(PRIV_CMD_COEX_RX_WINSIZE)) == 0) { + /* Set/Get control to coex RX window size */ + len = woal_priv_coex_rx_winsize(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_TX_AGGR_CTRL, + strlen(PRIV_CMD_TX_AGGR_CTRL)) == 0) { + /* Set/Get control to TX AMPDU on infra link */ + len = woal_priv_txaggrctrl(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_AUTO_TDLS, + strlen(PRIV_CMD_AUTO_TDLS)) == 0) { + /* Set/Get control to enable/disable auto TDLS */ + len = woal_priv_auto_tdls(priv, buf, + priv_cmd.total_len); + goto handled; + } else if (strnicmp + (buf + strlen(CMD_MARVELL), PRIV_CMD_TDLS_IDLE_TIME, + strlen(PRIV_CMD_TDLS_IDLE_TIME)) == 0) { + /* Set/Get TDLS idle timeout value */ + len = woal_priv_tdls_idle_time(priv, buf, + priv_cmd.total_len); + goto handled; + } else { + /* Fall through, after stripping off the custom header */ + buf += strlen(CMD_MARVELL); + } + } +#ifdef STA_SUPPORT + if (strncmp(buf, "RSSILOW-THRESHOLD", strlen("RSSILOW-THRESHOLD")) == 0) { + pdata = buf + strlen("RSSILOW-THRESHOLD") + 1; + if (MLAN_STATUS_SUCCESS != + woal_set_rssi_low_threshold(priv, pdata, MOAL_IOCTL_WAIT)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "SCAN-CFG", strlen("SCAN-CFG")) == 0) { + PRINTM(MIOCTL, "Set SCAN CFG\n"); + if (MLAN_STATUS_SUCCESS != + woal_set_scan_cfg(priv, buf, priv_cmd.total_len)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "RSSI", strlen("RSSI")) == 0) { + if (MLAN_STATUS_SUCCESS != woal_get_bss_info(priv, + MOAL_IOCTL_WAIT, + &bss_info)) { + ret = -EFAULT; + goto done; + } + if (bss_info.media_connected) { + if (MLAN_STATUS_SUCCESS != woal_get_signal_info(priv, + MOAL_IOCTL_WAIT, + &signal)) + { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "%.32s rssi %d\n", + bss_info.ssid.ssid, + signal.bcn_rssi_avg) + 1; + } else { + len = sprintf(buf, "OK\n") + 1; + } + } else if (strncmp(buf, "LINKSPEED", strlen("LINKSPEED")) == 0) { + if (MLAN_STATUS_SUCCESS != + woal_set_get_data_rate(priv, MLAN_ACT_GET, &rate)) { + ret = -EFAULT; + goto done; + } + PRINTM(MIOCTL, "tx rate=%d\n", (int)rate.rate); + len = sprintf(buf, "LinkSpeed %d\n", + (int)(rate.rate * 500000 / 1000000)) + + 1; + } else +#endif + if (strncmp(buf, "MACADDR", strlen("MACADDR")) == 0) { + len = sprintf(buf, "Macaddr = %02X:%02X:%02X:%02X:%02X:%02X\n", + priv->current_addr[0], priv->current_addr[1], + priv->current_addr[2], priv->current_addr[3], + priv->current_addr[4], priv->current_addr[5]) + 1; + } +#ifdef STA_SUPPORT + else if (strncmp(buf, "GETPOWER", strlen("GETPOWER")) == 0) { + if (MLAN_STATUS_SUCCESS != + woal_get_powermode(priv, &power_mode)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "powermode = %d\n", power_mode) + 1; + } else if (strncmp(buf, "SCAN-ACTIVE", strlen("SCAN-ACTIVE")) == 0) { + if (MLAN_STATUS_SUCCESS != woal_set_scan_type(priv, + MLAN_SCAN_TYPE_ACTIVE)) + { + ret = -EFAULT; + goto done; + } + priv->scan_type = MLAN_SCAN_TYPE_ACTIVE; + PRINTM(MIOCTL, "Set Active Scan\n"); + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "SCAN-PASSIVE", strlen("SCAN-PASSIVE")) == 0) { + if (MLAN_STATUS_SUCCESS != woal_set_scan_type(priv, + MLAN_SCAN_TYPE_PASSIVE)) + { + ret = -EFAULT; + goto done; + } + priv->scan_type = MLAN_SCAN_TYPE_PASSIVE; + PRINTM(MIOCTL, "Set Passive Scan\n"); + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "POWERMODE", strlen("POWERMODE")) == 0) { + pdata = buf + strlen("POWERMODE") + 1; + if (!hw_test) { + if (MLAN_STATUS_SUCCESS != + woal_set_powermode(priv, pdata)) { + ret = -EFAULT; + goto done; + } + } + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "SETROAMING", strlen("SETROAMING")) == 0) { + pdata = buf + strlen("SETROAMING") + 1; +#ifdef STA_CFG80211 + if (*pdata == '1') { + priv->roaming_enabled = MTRUE; + PRINTM(MIOCTL, "Roaming enabled\n"); + } else if (*pdata == '0') { + priv->roaming_enabled = MFALSE; + PRINTM(MIOCTL, "Roaming disabled\n"); + } +#endif + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "ROAM", strlen("ROAM")) == 0) { + pdata = buf + strlen("ROAM") + 1; +#ifdef STA_CFG80211 + if (*pdata == '1') { + priv->roaming_enabled = MTRUE; + PRINTM(MIOCTL, "Roaming enabled\n"); + } else if (*pdata == '0') { + priv->roaming_enabled = MFALSE; + PRINTM(MIOCTL, "Roaming disabled\n"); + } +#endif + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "COUNTRY", strlen("COUNTRY")) == 0) { + copy_len = strlen(buf) - strlen("COUNTRY") - 1; + if (copy_len > COUNTRY_CODE_LEN || copy_len <= 0) { + PRINTM(MERROR, "Invalid country length\n"); + ret = -EFAULT; + goto done; + } + memset(country_code, 0, sizeof(country_code)); + memcpy(country_code, buf + strlen("COUNTRY") + 1, copy_len); + PRINTM(MIOCTL, "Set COUNTRY %s\n", country_code); + if (MLAN_STATUS_SUCCESS != + woal_request_country_power_table(priv, country_code)) { + ret = -EFAULT; + goto done; + } +#ifdef STA_CFG80211 + if (IS_STA_CFG80211(cfg80211_wext)) { + PRINTM(MIOCTL, "Notify country code=%s\n", + country_code); + regulatory_hint(priv->wdev->wiphy, country_code); + len = sprintf(buf, "OK\n") + 1; + goto done; + } +#endif + if (MLAN_STATUS_SUCCESS != + woal_set_region_code(priv, country_code)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else if (memcmp(buf, WEXT_CSCAN_HEADER, WEXT_CSCAN_HEADER_SIZE) == 0) { + PRINTM(MIOCTL, "Set Combo Scan\n"); + if (MLAN_STATUS_SUCCESS != woal_set_combo_scan(priv, buf, + priv_cmd. + total_len)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "GETBAND", strlen("GETBAND")) == 0) { + if (MLAN_STATUS_SUCCESS != woal_get_band(priv, &band)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "Band %d\n", band) + 1; + } else if (strncmp(buf, "SETBAND", strlen("SETBAND")) == 0) { + pband = buf + strlen("SETBAND") + 1; + if (MLAN_STATUS_SUCCESS != woal_set_band(priv, pband)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } +#endif + else if (strncmp(buf, "START", strlen("START")) == 0) { + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "STOP", strlen("STOP")) == 0) { + len = sprintf(buf, "OK\n") + 1; + } +#ifdef UAP_SUPPORT + else if (strncmp(buf, "AP_BSS_START", strlen("AP_BSS_START")) == 0) { + ret = woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, UAP_BSS_START); + if (ret) + goto done; + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "AP_BSS_STOP", strlen("AP_BSS_STOP")) == 0) { + ret = woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, UAP_BSS_STOP); + if (ret) + goto done; + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "AP_SET_CFG", strlen("AP_SET_CFG")) == 0) { + if (priv_cmd.total_len <= strlen("AP_SET_CFG") + 1) + goto done; + pdata = buf + strlen("AP_SET_CFG") + 1; + ret = woal_uap_set_ap_cfg(priv, pdata, + priv_cmd.total_len - + strlen("AP_SET_CFG") - 1); + if (ret) + goto done; + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "WL_FW_RELOAD", strlen("WL_FW_RELOAD")) == 0) { + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "AP_GET_STA_LIST", strlen("AP_GET_STA_LIST")) == + 0) { + /* TODO Add STA list support */ + len = sprintf(buf, "OK\n") + 1; + } +#endif + else if (strncmp(buf, "SETSUSPENDOPT", strlen("SETSUSPENDOPT")) == 0) { + /* it will be done by GUI */ + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "SETSUSPENDMODE", strlen("SETSUSPENDMODE")) == + 0) { + /* it will be done by GUI */ + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "BTCOEXMODE", strlen("BTCOEXMODE")) == 0) { + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "BTCOEXSCAN-START", strlen("BTCOEXSCAN-START")) + == 0) { + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "BTCOEXSCAN-STOP", strlen("BTCOEXSCAN-STOP")) == + 0) { + len = sprintf(buf, "OK\n") + 1; + } +#ifdef STA_SUPPORT + else if (strncmp(buf, "BGSCAN-START", strlen("BGSCAN-START")) == 0) { + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "BGSCAN-CONFIG", strlen("BGSCAN-CONFIG")) == 0) { + if (MLAN_STATUS_SUCCESS != + woal_set_bg_scan(priv, buf, priv_cmd.total_len)) { + ret = -EFAULT; + goto done; + } + priv->bg_scan_start = MTRUE; + priv->bg_scan_reported = MFALSE; + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "BGSCAN-STOP", strlen("BGSCAN-STOP")) == 0) { + if (priv->bg_scan_start && !priv->scan_cfg.rssi_threshold) { + if (MLAN_STATUS_SUCCESS != + woal_stop_bg_scan(priv, MOAL_NO_WAIT)) { + ret = -EFAULT; + goto done; + } + priv->bg_scan_start = MFALSE; + priv->bg_scan_reported = MFALSE; + } + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "RXFILTER-START", strlen("RXFILTER-START")) == + 0) { +#ifdef MEF_CFG_RX_FILTER + ret = woal_set_rxfilter(priv, MTRUE); + if (ret) + goto done; +#endif + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "RXFILTER-STOP", strlen("RXFILTER-STOP")) == 0) { +#ifdef MEF_CFG_RX_FILTER + ret = woal_set_rxfilter(priv, MFALSE); + if (ret) + goto done; +#endif + len = sprintf(buf, "OK\n") + 1; + } +#ifdef STA_CFG80211 + else if (strncmp(buf, "GET_EVENT", strlen("GET_EVENT")) == 0) { + if (IS_STA_CFG80211(cfg80211_wext)) { + if (priv->last_event & EVENT_BG_SCAN_REPORT) + woal_inform_bss_from_scan_result(priv, NULL, + MOAL_IOCTL_WAIT); + } + len = sprintf(buf, "EVENT=%d\n", priv->last_event) + 1; + priv->last_event = 0; + } else if (strncmp(buf, "GET_802_11W", strlen("GET_802_11W")) == 0) { + len = sprintf(buf, "802_11W=ENABLED\n") + 1; + } +#endif /* STA_CFG80211 */ + else if (strncmp(buf, "RXFILTER-ADD", strlen("RXFILTER-ADD")) == 0) { + pdata = buf + strlen("RXFILTER-ADD") + 1; + if (MLAN_STATUS_SUCCESS != woal_add_rxfilter(priv, pdata)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "RXFILTER-REMOVE", strlen("RXFILTER-REMOVE")) == + 0) { + pdata = buf + strlen("RXFILTER-REMOVE") + 1; + if (MLAN_STATUS_SUCCESS != woal_remove_rxfilter(priv, pdata)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "QOSINFO", strlen("QOSINFO")) == 0) { + pdata = buf + strlen("QOSINFO") + 1; +#ifdef STA_SUPPORT + if (MLAN_STATUS_SUCCESS != + woal_priv_qos_cfg(priv, MLAN_ACT_SET, pdata)) { + ret = -EFAULT; + goto done; + } +#endif + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "SLEEPPD", strlen("SLEEPPD")) == 0) { + pdata = buf + strlen("SLEEPPD") + 1; + if (MLAN_STATUS_SUCCESS != woal_set_sleeppd(priv, pdata)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "SET_AP_WPS_P2P_IE", + strlen("SET_AP_WPS_P2P_IE")) == 0) { + pdata = buf + strlen("SET_AP_WPS_P2P_IE") + 1; + /* Android cmd format: "SET_AP_WPS_P2P_IE 1" -- beacon IE + "SET_AP_WPS_P2P_IE 2" -- proberesp IE "SET_AP_WPS_P2P_IE 4" + -- assocresp IE */ +#if defined(STA_CFG80211) && defined(UAP_CFG80211) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0) + if (MLAN_STATUS_SUCCESS != + woal_set_ap_wps_p2p_ie(priv, (t_u8 *)pdata, + priv_cmd.used_len - + strlen("SET_AP_WPS_P2P_IE") - 1)) { + ret = -EFAULT; + goto done; + } +#endif +#endif + len = sprintf(buf, "OK\n") + 1; + } +#endif + else if (strncmp(buf, "P2P_DEV_ADDR", strlen("P2P_DEV_ADDR")) == 0) { + memset(buf, 0x0, (size_t) priv_cmd.total_len); + memcpy(buf, priv->current_addr, ETH_ALEN); + len = ETH_ALEN; + } else if (strncmp(buf, ("P2P_GET_NOA"), strlen("P2P_GET_NOA")) == 0) { + /* TODO Just return '\0' */ + memset(buf, 0x0, (size_t) priv_cmd.total_len); + *buf = 0; + len = 1; + } else if (strnicmp(buf, "MIRACAST", strlen("MIRACAST")) == 0) { + pdata = buf + strlen("MIRACAST"); + /* Android cmd format: "MIRACAST 0" -- disabled "MIRACAST 1" -- + operating as source "MIRACAST 2" -- operating as sink */ +#ifdef WIFI_DIRECT_SUPPORT +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + if (MLAN_STATUS_SUCCESS != + woal_set_miracast_mode(priv, (t_u8 *)pdata, + priv_cmd.used_len - + strlen("MIRACAST"))) { + ret = -EFAULT; + goto done; + } +#endif +#endif + len = sprintf(buf, "OK\n") + 1; + } else if (strnicmp(buf, "SCAN_TIMING", strlen("SCAN_TIMING")) == 0) { +#ifdef WIFI_DIRECT_SUPPORT +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + if (MLAN_STATUS_SUCCESS != + woal_set_scan_chan_gap(priv, buf, priv_cmd.total_len)) { + ret = -EFAULT; + goto done; + } +#endif +#endif + len = sprintf(buf, "OK\n") + 1; + } else if (strnicmp(buf, "BA_WSIZE_RX", strlen("BA_WSIZE_RX")) == 0) { + pdata = buf + strlen("BA_WSIZE_RX") + 1; + len = priv_cmd.total_len - strlen("BA_WSIZE_RX") - 1; + if (MLAN_STATUS_SUCCESS != + woal_set_rx_ba_winsize(priv, pdata, len)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else if (strnicmp(buf, "BA_WSIZE_TX", strlen("BA_WSIZE_TX")) == 0) { + pdata = buf + strlen("BA_WSIZE_TX") + 1; + len = priv_cmd.total_len - strlen("BA_WSIZE_TX") - 1; + if (MLAN_STATUS_SUCCESS != + woal_set_tx_ba_winsize(priv, pdata, len)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp + (buf, "FAKE_SCAN_COMPLETE", + strlen("FAKE_SCAN_COMPLETE")) == 0) { + pdata = buf + strlen("FAKE_SCAN_COMPLETE") + 1; +#ifdef STA_CFG80211 + if (*pdata == '1') { + priv->fake_scan_complete = MTRUE; + PRINTM(MIOCTL, "fake scan complete enabled\n"); + } else if (*pdata == '0') { + priv->fake_scan_complete = MFALSE; + PRINTM(MIOCTL, "fake scan complete disabled\n"); + } +#endif + len = sprintf(buf, "OK\n") + 1; + } +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + else if (strncmp + (buf, "P2P_PERIODIC_SLEEP", + strlen("P2P_PERIODIC_SLEEP")) == 0) { + if (MLAN_STATUS_SUCCESS != + woal_p2p_ps_cfg(priv, buf, priv_cmd.total_len)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } +#endif + else if (strncmp(buf, "WLS_BATCHING", strlen("WLS_BATCHING")) == 0) { + /* TODO */ + len = sprintf(buf, "OK\n") + 1; + } else { + PRINTM(MIOCTL, "Unknown PRIVATE command: %s, ignored\n", buf); + ret = -EFAULT; + goto done; + } + +handled: + PRINTM(MIOCTL, "PRIV Command return: %s, length=%d\n", buf, len); + + if (len > 0) { + priv_cmd.used_len = len; + if (priv_cmd.used_len <= priv_cmd.total_len) { + memset(cmd_buf + priv_cmd.used_len, 0, + (size_t) (priv_cmd.total_len - + priv_cmd.used_len)); + if (copy_to_user(cmd_buf, buf, priv_cmd.used_len)) { + PRINTM(MERROR, + "%s: failed to copy data to user buffer\n", + __FUNCTION__); + ret = -EFAULT; + goto done; + } + if (copy_to_user + (req->ifr_data, &priv_cmd, + sizeof(android_wifi_priv_cmd))) { + PRINTM(MERROR, + "%s: failed to copy command header to user buffer\n", + __FUNCTION__); + ret = -EFAULT; + } + } else { + PRINTM(MERROR, + "%s: the buffer supplied by appl is too small (supplied: %d, used: %d)\n", + __FUNCTION__, priv_cmd.total_len, + priv_cmd.used_len); + ret = -EFAULT; + } + } else { + ret = len; + } + +done: + kfree(buf); + LEAVE(); + return ret; +} + +/******************************************************** + Global Functions +********************************************************/ +/** + * @brief Create a brief scan resp to relay basic BSS info to the app layer + * + * When the beacon/probe response has not been buffered, use the saved BSS + * information available to provide a minimum response for the application + * ioctl retrieval routines. Include: + * - Timestamp + * - Beacon Period + * - Capabilities (including WMM Element if available) + * - SSID + * + * @param ppbuffer Output parameter: Buffer used to create basic scan rsp + * @param pbss_desc Pointer to a BSS entry in the scan table to create + * scan response from for delivery to the application layer + * + * @return N/A + */ +void +wlan_scan_create_brief_table_entry(t_u8 **ppbuffer, BSSDescriptor_t *pbss_desc) +{ + t_u8 *ptmp_buf = *ppbuffer; + t_u8 tmp_ssid_hdr[2]; + t_u8 ie_len = 0; + + ENTER(); + + memcpy(ptmp_buf, pbss_desc->time_stamp, sizeof(pbss_desc->time_stamp)); + ptmp_buf += sizeof(pbss_desc->time_stamp); + + memcpy(ptmp_buf, &pbss_desc->beacon_period, + sizeof(pbss_desc->beacon_period)); + ptmp_buf += sizeof(pbss_desc->beacon_period); + + memcpy(ptmp_buf, &pbss_desc->cap_info, sizeof(pbss_desc->cap_info)); + ptmp_buf += sizeof(pbss_desc->cap_info); + + tmp_ssid_hdr[0] = 0; /* Element ID for SSID is zero */ + tmp_ssid_hdr[1] = pbss_desc->ssid.ssid_len; + memcpy(ptmp_buf, tmp_ssid_hdr, sizeof(tmp_ssid_hdr)); + ptmp_buf += sizeof(tmp_ssid_hdr); + + memcpy(ptmp_buf, pbss_desc->ssid.ssid, pbss_desc->ssid.ssid_len); + ptmp_buf += pbss_desc->ssid.ssid_len; + + if (pbss_desc->wmm_ie.vend_hdr.element_id == WMM_IE) { + ie_len = sizeof(IEEEtypes_Header_t) + + pbss_desc->wmm_ie.vend_hdr.len; + memcpy(ptmp_buf, &pbss_desc->wmm_ie, ie_len); + ptmp_buf += ie_len; + } + + if (pbss_desc->pwpa_ie) { + if ((*(pbss_desc->pwpa_ie)).vend_hdr.element_id == WPA_IE) { + ie_len = sizeof(IEEEtypes_Header_t) + + (*(pbss_desc->pwpa_ie)).vend_hdr.len; + memcpy(ptmp_buf, pbss_desc->pwpa_ie, ie_len); + } + + ptmp_buf += ie_len; + } + + if (pbss_desc->prsn_ie) { + if ((*(pbss_desc->prsn_ie)).ieee_hdr.element_id == RSN_IE) { + ie_len = sizeof(IEEEtypes_Header_t) + + (*(pbss_desc->prsn_ie)).ieee_hdr.len; + memcpy(ptmp_buf, pbss_desc->prsn_ie, ie_len); + } + + ptmp_buf += ie_len; + } + + *ppbuffer = ptmp_buf; + LEAVE(); +} + +/** + * @brief Create a wlan_ioctl_get_scan_table_entry for a given BSS + * Descriptor for inclusion in the ioctl response to the user space + * application. + * + * + * @param pbss_desc Pointer to a BSS entry in the scan table to form + * scan response from for delivery to the application layer + * @param ppbuffer Output parameter: Buffer used to output scan return struct + * @param pspace_left Output parameter: Number of bytes available in the + * response buffer. + * + * @return MLAN_STATUS_SUCCESS, or < 0 with IOCTL error code + */ +int +wlan_get_scan_table_ret_entry(BSSDescriptor_t *pbss_desc, + t_u8 **ppbuffer, int *pspace_left) +{ + wlan_ioctl_get_scan_table_entry *prsp_entry; + wlan_ioctl_get_scan_table_entry tmp_rsp_entry; + int space_needed; + t_u8 *pcurrent; + int variable_size; + + const int fixed_size = sizeof(wlan_ioctl_get_scan_table_entry); + + ENTER(); + + pcurrent = *ppbuffer; + + /* The variable size returned is the stored beacon size */ + variable_size = pbss_desc->beacon_buf_size; + + /* If we stored a beacon and its size was zero, set the variable size + return value to the size of the brief scan response + wlan_scan_create_brief_table_entry creates. Also used if we are not + configured to store beacons in the first place */ + if (!variable_size) { + variable_size = pbss_desc->ssid.ssid_len + 2; + variable_size += (sizeof(pbss_desc->beacon_period) + + sizeof(pbss_desc->time_stamp) + + sizeof(pbss_desc->cap_info)); + if (pbss_desc->wmm_ie.vend_hdr.element_id == WMM_IE) { + variable_size += (sizeof(IEEEtypes_Header_t) + + pbss_desc->wmm_ie.vend_hdr.len); + } + + if (pbss_desc->pwpa_ie) { + if ((*(pbss_desc->pwpa_ie)).vend_hdr.element_id == + WPA_IE) { + variable_size += (sizeof(IEEEtypes_Header_t) + + + (*(pbss_desc->pwpa_ie)). + vend_hdr.len); + } + } + + if (pbss_desc->prsn_ie) { + if ((*(pbss_desc->prsn_ie)).ieee_hdr.element_id == + RSN_IE) { + variable_size += (sizeof(IEEEtypes_Header_t) + + + (*(pbss_desc->prsn_ie)). + ieee_hdr.len); + } + } + } + + space_needed = fixed_size + variable_size; + + PRINTM(MINFO, "GetScanTable: need(%d), left(%d)\n", + space_needed, *pspace_left); + + if (space_needed >= *pspace_left) { + *pspace_left = 0; + LEAVE(); + return -E2BIG; + } + + *pspace_left -= space_needed; + + tmp_rsp_entry.fixed_field_length = (sizeof(tmp_rsp_entry) + - + sizeof(tmp_rsp_entry. + fixed_field_length) + - + sizeof(tmp_rsp_entry. + bss_info_length)); + + memcpy(tmp_rsp_entry.fixed_fields.bssid, + pbss_desc->mac_address, sizeof(prsp_entry->fixed_fields.bssid)); + + tmp_rsp_entry.fixed_fields.rssi = pbss_desc->rssi; + tmp_rsp_entry.fixed_fields.channel = pbss_desc->channel; + tmp_rsp_entry.fixed_fields.network_tsf = pbss_desc->network_tsf; + tmp_rsp_entry.bss_info_length = variable_size; + + /* + * Copy fixed fields to user space + */ + memcpy(pcurrent, &tmp_rsp_entry, fixed_size); + pcurrent += fixed_size; + + if (pbss_desc->pbeacon_buf) { + /* + * Copy variable length elements to user space + */ + memcpy(pcurrent, pbss_desc->pbeacon_buf, + pbss_desc->beacon_buf_size); + + pcurrent += pbss_desc->beacon_buf_size; + } else { + wlan_scan_create_brief_table_entry(&pcurrent, pbss_desc); + } + + *ppbuffer = pcurrent; + + LEAVE(); + + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief ioctl function - entry point + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @param cmd Command + * + * @return 0 --success, otherwise fail + */ +int +woal_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd) +{ + int ret = 0; + + ENTER(); + + PRINTM(MINFO, "woal_do_ioctl: ioctl cmd = 0x%x\n", cmd); + switch (cmd) { + case WOAL_ANDROID_DEF_CMD: + /** android default ioctl ID is SIOCDEVPRIVATE + 1 */ + ret = woal_android_priv_cmd(dev, req); + break; + case WOAL_CUSTOM_IE_CFG: + ret = woal_custom_ie_ioctl(dev, req); + break; + case WOAL_MGMT_FRAME_TX: + ret = woal_send_host_packet(dev, req); + break; + case WOAL_TDLS_CONFIG: + ret = woal_tdls_config_ioctl(dev, req); + break; + case WOAL_ANDROID_PRIV_CMD: + ret = woal_android_priv_cmd(dev, req); + break; + case WOAL_GET_BSS_TYPE: + ret = woal_get_bss_type(dev, req); + break; + default: +#if defined(STA_WEXT) +#ifdef STA_SUPPORT + ret = woal_wext_do_ioctl(dev, req, cmd); +#else + ret = -EINVAL; +#endif +#else + ret = -EINVAL; +#endif + break; + } + + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_eth_ioctl.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_eth_ioctl.h new file mode 100644 index 00000000..d573c43e --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_eth_ioctl.h @@ -0,0 +1,398 @@ +/** @file moal_eth_ioctl.h + * + * @brief This file contains definition for private IOCTL call. + * + * Copyright (C) 2014-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/******************************************************** +Change log: + 01/05/2012: initial version +********************************************************/ +#if defined(STA_CFG80211) || defined(UAP_CFG80211) +#include "moal_cfg80211.h" +#endif + +#ifndef _WOAL_ETH_PRIV_H_ +#define _WOAL_ETH_PRIV_H_ + +/** Command disabled */ +#define CMD_DISABLED 0 +/** Command enabled */ +#define CMD_ENABLED 1 +/** Command get */ +#define CMD_GET 2 + +/** 2K bytes */ +#define WOAL_2K_BYTES 2000 + +/** Marvell private command identifier string */ +#define CMD_MARVELL "MRVL_CMD" + +/** Private command: Version */ +#define PRIV_CMD_VERSION "version" +/** Private command: Band cfg */ +#define PRIV_CMD_BANDCFG "bandcfg" +/** Private command: Host cmd */ +#define PRIV_CMD_HOSTCMD "hostcmd" +/** Private command: Custom IE config*/ +#define PRIV_CMD_CUSTOMIE "customie" +/** Private command: HT Tx Cfg */ +#define PRIV_CMD_HTTXCFG "httxcfg" +/** Private command: HT Cap Info */ +#define PRIV_CMD_HTCAPINFO "htcapinfo" +/** Private command: Add BA para */ +#define PRIV_CMD_ADDBAPARA "addbapara" +/** Private command: Aggragation priority table */ +#define PRIV_CMD_AGGRPRIOTBL "aggrpriotbl" +/** Private command: Add BA reject cfg */ +#define PRIV_CMD_ADDBAREJECT "addbareject" +/** Private command: Delete BA */ +#define PRIV_CMD_DELBA "delba" +/** Private command: Reject Addba Req */ +#define PRIV_CMD_REJECTADDBAREQ "rejectaddbareq" +/** Private command: 11AC Cfg */ +#define PRIV_CMD_VHTCFG "vhtcfg" +#define PRIV_CMD_DATARATE "getdatarate" +#define PRIV_CMD_TXRATECFG "txratecfg" +#define PRIV_CMD_GETLOG "getlog" +#define PRIV_CMD_ESUPPMODE "esuppmode" +#define PRIV_CMD_PASSPHRASE "passphrase" +#define PRIV_CMD_DEAUTH "deauth" +#ifdef UAP_SUPPORT +#define PRIV_CMD_AP_DEAUTH "apdeauth" +#define PRIV_CMD_GET_STA_LIST "getstalist" +#define PRIV_CMD_BSS_CONFIG "bssconfig" +#endif +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) +#define PRIV_CMD_BSSROLE "bssrole" +#endif +#endif +#ifdef STA_SUPPORT +#define PRIV_CMD_GETSCANTABLE "getscantable" +#define PRIV_CMD_SETUSERSCAN "setuserscan" +#define PRIV_CMD_EXTCAPCFG "extcapcfg" +#endif +#define PRIV_CMD_DEEPSLEEP "deepsleep" +#define PRIV_CMD_IPADDR "ipaddr" +#define PRIV_CMD_WPSSESSION "wpssession" +#define PRIV_CMD_OTPUSERDATA "otpuserdata" +#define PRIV_CMD_COUNTRYCODE "countrycode" +#define PRIV_CMD_TCPACKENH "tcpackenh" +#ifdef REASSOCIATION +#define PRIV_CMD_ASSOCESSID "assocessid" +#endif +#define PRIV_CMD_WAKEUPREASON "wakeupreason" +#ifdef STA_SUPPORT +#define PRIV_CMD_LISTENINTERVAL "listeninterval" +#endif +#ifdef DEBUG_LEVEL1 +#define PRIV_CMD_DRVDBG "drvdbg" +#endif +#define PRIV_CMD_HSCFG "hscfg" +#define PRIV_CMD_HSSETPARA "hssetpara" +#define PRIV_CMD_SCANCFG "scancfg" +#define PRIV_CMD_SET_BSS_MODE "setbssmode" +#ifdef STA_SUPPORT +#define PRIV_CMD_SET_AP "setap" +#define PRIV_CMD_SET_POWER "setpower" +#define PRIV_CMD_SET_ESSID "setessid" +#define PRIV_CMD_SET_AUTH "setauth" +#define PRIV_CMD_GET_AP "getap" +#define PRIV_CMD_GET_POWER "getpower" +#define PRIV_CMD_PSMODE "psmode" +#endif +#define PRIV_CMD_WARMRESET "warmreset" +#define PRIV_CMD_TXPOWERCFG "txpowercfg" +#define PRIV_CMD_PSCFG "pscfg" +#define PRIV_CMD_SLEEPPD "sleeppd" +#define PRIV_CMD_TXCONTROL "txcontrol" +#define PRIV_CMD_REGRDWR "regrdwr" +#define PRIV_CMD_RDEEPROM "rdeeprom" +#define PRIV_CMD_MEMRDWR "memrdwr" +#define PRIV_CMD_SDCMD52RW "sdcmd52rw" +#define PRIV_CMD_ARPFILTER "arpfilter" +#define PRIV_CMD_HOTSPOTCFG "hotspotcfg" +#define PRIV_CMD_MGMT_FRAME_CTRL "mgmtframectrl" +#define PRIV_CMD_QCONFIG "qconfig" +#define PRIV_CMD_ADDTS "addts" +#define PRIV_CMD_DELTS "delts" +#define PRIV_CMD_QSTATUS "qstatus" +#define PRIV_CMD_TS_STATUS "ts_status" +#define PRIV_CMD_QOS_CFG "qoscfg" +#define PRIV_CMD_MAC_CTRL "macctrl" +#define PRIV_CMD_GETWAP "getwap" +#define PRIV_CMD_REGION_CODE "regioncode" +#define PRIV_CMD_FWMACADDR "fwmacaddr" +#if defined(WIFI_DIRECT_SUPPORT) +#define PRIV_CMD_OFFCHANNEL "offchannel" +#endif +/** Private command: Verext */ +#define PRIV_CMD_VEREXT "verext" +#if defined(STA_SUPPORT) +#define PRIV_CMD_RADIO_CTRL "radioctrl" +#endif +#define PRIV_CMD_WMM_CFG "wmmcfg" +#if defined(STA_SUPPORT) +#define PRIV_CMD_11D_CFG "11dcfg" +#define PRIV_CMD_11D_CLR_TBL "11dclrtbl" +#endif +#define PRIV_CMD_WWS_CFG "wwscfg" +#if defined(REASSOCIATION) +#define PRIV_CMD_REASSOCTRL "reassoctrl" +#endif +#define PRIV_CMD_TXBUF_CFG "txbufcfg" +#ifdef STA_SUPPORT +#define PRIV_CMD_AUTH_TYPE "authtype" +#endif +#define PRIV_CMD_POWER_CONS "powercons" +#define PRIV_CMD_HT_STREAM_CFG "htstreamcfg" +#define PRIV_CMD_THERMAL "thermal" +#define PRIV_CMD_BCN_INTERVAL "bcninterval" +#ifdef STA_SUPPORT +#define PRIV_CMD_GET_SIGNAL "getsignal" +#endif +#if defined(STA_SUPPORT) +#define PRIV_CMD_PMFCFG "pmfcfg" +#endif +#define PRIV_CMD_INACTIVITYTO "inactivityto" +#define PRIV_CMD_AMSDU_AGGR_CTRL "amsduaggrctrl" +#define PRIV_CMD_TX_BF_CAP "httxbfcap" +#define PRIV_CMD_SDIO_CLOCK "sdioclock" +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) +#define PRIV_CMD_MPA_CTRL "mpactrl" +#endif +#define PRIV_CMD_SLEEP_PARAMS "sleepparams" +#if defined(DFS_TESTING_SUPPORT) +#define PRIV_CMD_DFS_TESTING "dfstesting" +#endif +#define PRIV_CMD_CFP_CODE "cfpcode" +#define PRIV_CMD_ANT_CFG "antcfg" +#define PRIV_CMD_SYSCLOCK "sysclock" +#define PRIV_CMD_ADHOC_AES "adhocaes" +#define PRIV_CMD_GET_KEY "getkey" +#define PRIV_CMD_ASSOCIATE "associate" +#define PRIV_CMD_TX_BF_CFG "httxbfcfg" +#define PRIV_CMD_PORT_CTRL "port_ctrl" +#define PRIV_CMD_PB_BYPASS "pb_bypass" +#define PRIV_CMD_COALESCE_STATUS "coalesce_status" +#define PRIV_CMD_SD_CMD53_RW "sdcmd53rw" +#ifdef RX_PACKET_COALESCE +#define PRIV_CMD_RX_COAL_CFG "rxpktcoal_cfg" +#endif +#define PRIV_CMD_MULTI_CHAN_CFG "mc_cfg" +#define PRIV_CMD_MULTI_CHAN_POLICY "mc_policy" +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(UAP_CFG80211) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION +#define PRIV_CMD_CFG_NOA "cfg_noa" +#define PRIV_CMD_CFG_OPP_PS "cfg_opp_ps" +#endif +#endif +#endif +#ifdef WIFI_DIRECT_SUPPORT +#if defined(STA_CFG80211) || defined(UAP_CFG80211) +#define PRIV_CMD_MIRACAST_CFG "miracastcfg" +#endif +#endif +#define PRIV_CMD_COEX_RX_WINSIZE "coex_rx_winsize" +#define PRIV_CMD_TX_AGGR_CTRL "txaggrctrl" +#define PRIV_CMD_AUTO_TDLS "autotdls" + +#define PRIV_CMD_TDLS_IDLE_TIME "tdls_idle_time" + +/** Private command ID for Android default commands */ +#define WOAL_ANDROID_DEF_CMD (SIOCDEVPRIVATE + 1) + +/** Private command ID to send TLD configuration */ +#define WOAL_TDLS_CONFIG (SIOCDEVPRIVATE + 5) + +/** Private command ID to pass mgmt frame */ +#define WOAL_MGMT_FRAME_TX WOAL_MGMT_FRAME_TX_IOCTL + +/** Private command ID to pass custom IE list */ +#define WOAL_CUSTOM_IE_CFG (SIOCDEVPRIVATE + 13) + +/** Private command ID for Android ICS priv CMDs */ +#define WOAL_ANDROID_PRIV_CMD (SIOCDEVPRIVATE + 14) + +/** Private command ID to get BSS type */ +#define WOAL_GET_BSS_TYPE (SIOCDEVPRIVATE + 15) + +int woal_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd); + +/* + * For android private commands, fixed value of ioctl is used. + * Internally commands are differentiated using strings. + * + * application needs to specify "total_len" of data for copy_from_user + * kernel updates "used_len" during copy_to_user + */ +/** Private command structure from app */ +#ifdef USERSPACE_32BIT_OVER_KERNEL_64BIT +typedef struct _android_wifi_priv_cmd { + /** Buffer pointer */ + t_u64 buf; + /** buffer updated by driver */ + int used_len; + /** buffer sent by application */ + int total_len; +} __attribute__ ((packed)) + android_wifi_priv_cmd; +#else +typedef struct _android_wifi_priv_cmd { + /** Buffer pointer */ + char *buf; + /** buffer updated by driver */ + int used_len; + /** buffer sent by application */ + int total_len; +} android_wifi_priv_cmd; +#endif + +#ifndef IFNAMSIZ +#define IFNAMSIZ 16 +#endif + +/* Maximum size of the ESSID and NICKN strings */ +#define MW_ESSID_MAX_SIZE 32 + +/* Modes of operation */ +#define MW_MODE_AUTO 0 /* Let the driver decides */ +#define MW_MODE_ADHOC 1 /* Single cell network */ +#define MW_MODE_INFRA 2 /* Multi cell network, roaming, ... */ +#define MW_MODE_MASTER 3 /* Synchronisation master or Access Point */ +#define MW_MODE_REPEAT 4 /* Wireless Repeater (forwarder) */ +#define MW_MODE_SECOND 5 /* Secondary master/repeater (backup) */ +#define MW_MODE_MONITOR 6 /* Passive monitor (listen only) */ +#define MW_MODE_MESH 7 /* Mesh (IEEE 802.11s) network */ + +#define MW_POWER_TYPE 0xF000 /* Type of parameter */ +#define MW_POWER_PERIOD 0x1000 /* Value is a period/duration of */ +#define MW_POWER_TIMEOUT 0x2000 /* Value is a timeout (to go asleep) */ + +#define MW_AUTH_INDEX 0x0FFF +#define MW_AUTH_FLAGS 0xF000 +#define MW_AUTH_WPA_VERSION 0 +#define MW_AUTH_CIPHER_PAIRWISE 1 +#define MW_AUTH_CIPHER_GROUP 2 +#define MW_AUTH_KEY_MGMT 3 +#define MW_AUTH_TKIP_COUNTERMEASURES 4 +#define MW_AUTH_DROP_UNENCRYPTED 5 +#define MW_AUTH_80211_AUTH_ALG 6 +#define MW_AUTH_WPA_ENABLED 7 +#define MW_AUTH_RX_UNENCRYPTED_EAPOL 8 +#define MW_AUTH_ROAMING_CONTROL 9 +#define MW_AUTH_PRIVACY_INVOKED 10 +#define MW_AUTH_CIPHER_GROUP_MGMT 11 +#define MW_AUTH_MFP 12 + +#define MW_AUTH_CIPHER_NONE 0x00000001 +#define MW_AUTH_CIPHER_WEP40 0x00000002 +#define MW_AUTH_CIPHER_TKIP 0x00000004 +#define MW_AUTH_CIPHER_CCMP 0x00000008 +#define MW_AUTH_CIPHER_WEP104 0x00000010 +#define MW_AUTH_CIPHER_AES_CMAC 0x00000020 + +#define MW_AUTH_ALG_OPEN_SYSTEM 0x00000001 +#define MW_AUTH_ALG_SHARED_KEY 0x00000002 +#define MW_AUTH_ALG_LEAP 0x00000004 + +/* Generic format for most parameters that fit in an int */ +struct mw_param { + t_s32 value; /* The value of the parameter itself */ + t_u8 fixed; /* Hardware should not use auto select */ + t_u8 disabled; /* Disable the feature */ + t_u16 flags; /* Various specifc flags (if any) */ +}; + +/* + * For all data larger than 16 octets, we need to use a + * pointer to memory allocated in user space. + */ +struct mw_point { + t_u8 *pointer; /* Pointer to the data (in user space) */ + t_u16 length; /* number of fields or size in bytes */ + t_u16 flags; /* Optional params */ +}; + +/* + * This structure defines the payload of an ioctl, and is used + * below. + */ +union mwreq_data { + /* Config - generic */ + char name[IFNAMSIZ]; + + struct mw_point essid; /* Extended network name */ + t_u32 mode; /* Operation mode */ + struct mw_param power; /* PM duration/timeout */ + struct sockaddr ap_addr; /* Access point address */ + struct mw_param param; /* Other small parameters */ + struct mw_point data; /* Other large parameters */ +}; + + /* The structure to exchange data for ioctl */ +struct mwreq { + union { + char ifrn_name[IFNAMSIZ]; /* if name, e.g. "eth0" */ + } ifr_ifrn; + + /* Data part */ + union mwreq_data u; +}; + +typedef struct woal_priv_ht_cap_info { + t_u32 ht_cap_info_bg; + t_u32 ht_cap_info_a; +} woal_ht_cap_info; + +typedef struct woal_priv_addba { + t_u32 time_out; + t_u32 tx_win_size; + t_u32 rx_win_size; + t_u32 tx_amsdu; + t_u32 rx_amsdu; +} woal_addba; + +/** data structure for cmd txratecfg */ +typedef struct woal_priv_tx_rate_cfg { + /* LG rate: 0, HT rate: 1, VHT rate: 2 */ + t_u32 rate_format; + /** Rate/MCS index (0xFF: auto) */ + t_u32 rate_index; + /** Data rate */ + t_u32 rate; + /** NSS */ + t_u32 nss; +} woal_tx_rate_cfg; + +typedef struct woal_priv_esuppmode_cfg { + /* RSN mode */ + t_u16 rsn_mode; + /* Pairwise cipher */ + t_u8 pairwise_cipher; + /* Group cipher */ + t_u8 group_cipher; +} woal_esuppmode_cfg; + +mlan_status woal_set_ap_wps_p2p_ie(moal_private *priv, t_u8 *ie, size_t len); + +int woal_android_priv_cmd(struct net_device *dev, struct ifreq *req); + +#endif /* _WOAL_ETH_PRIV_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_ioctl.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_ioctl.c new file mode 100644 index 00000000..33183c4a --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_ioctl.c @@ -0,0 +1,5560 @@ +/** @file moal_ioctl.c + * + * @brief This file contains ioctl function to MLAN + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/******************************************************** +Change log: + 10/21/2008: initial version +********************************************************/ + +#include "moal_main.h" +#include "moal_eth_ioctl.h" +#include "moal_sdio.h" +#ifdef UAP_SUPPORT +#include "moal_uap.h" +#endif + +#if defined(STA_CFG80211) || defined(UAP_CFG80211) +#include "moal_cfg80211.h" +#endif + +/******************************************************** + Local Variables +********************************************************/ +#define MRVL_TLV_HEADER_SIZE 4 +/* Marvell Channel config TLV ID */ +#define MRVL_CHANNELCONFIG_TLV_ID (0x0100 + 0x2a) /* 0x012a */ + +typedef struct _hostcmd_header { + /** Command Header : Command */ + t_u16 command; + /** Command Header : Size */ + t_u16 size; + /** Command Header : Sequence number */ + t_u16 seq_num; + /** Command Header : Result */ + t_u16 result; + /** Command action */ + t_u16 action; +} hostcmd_header, *phostcmd_header; + +#ifdef STA_SUPPORT +/** Region code mapping */ +typedef struct _region_code_mapping_t { + /** Region */ + t_u8 region[COUNTRY_CODE_LEN]; + /** Code */ + t_u8 code; +} region_code_mapping_t; + +/** Region code mapping table */ +static region_code_mapping_t region_code_mapping[] = { + {"US ", 0x10}, /* US FCC */ + {"CA ", 0x20}, /* IC Canada */ + {"SG ", 0x10}, /* Singapore */ + {"EU ", 0x30}, /* ETSI */ + {"AU ", 0x30}, /* Australia */ + {"KR ", 0x30}, /* Republic Of Korea */ + {"FR ", 0x32}, /* France */ + {"CN ", 0x50}, /* China */ + {"JP ", 0xFF}, /* Japan special */ +}; + +/** EEPROM Region code mapping table */ +static region_code_mapping_t hw_region_code_mapping[] = { + {"US ", 0x10}, /* US FCC */ + {"CA ", 0x20}, /* IC Canada */ + {"KR ", 0x30}, /* Korea */ + {"CN ", 0x50}, /* China */ + {"ES ", 0x31}, /* Spain */ + {"FR ", 0x32}, /* France */ + {"JP ", 0x40}, /* Japan */ + {"JP ", 0x41}, /* Japan */ +}; +#endif + +/******************************************************** + Global Variables +********************************************************/ + +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) +#ifdef UAP_SUPPORT +/** Network device handlers for uAP */ +extern const struct net_device_ops woal_uap_netdev_ops; +#endif +#ifdef STA_SUPPORT +/** Network device handlers for STA */ +extern const struct net_device_ops woal_netdev_ops; +#endif +#endif +extern int cfg80211_wext; + +/******************************************************** + Local Functions +********************************************************/ +#ifdef STA_SUPPORT +/** + * @brief This function converts region string to region code + * + * @param region_string Region string + * + * @return Region code + */ +static t_u8 +region_string_2_region_code(char *region_string) +{ + t_u8 i; + + ENTER(); + for (i = 0; i < ARRAY_SIZE(region_code_mapping); i++) { + if (!memcmp(region_string, + region_code_mapping[i].region, + strlen(region_string))) { + LEAVE(); + return region_code_mapping[i].code; + } + } + /* Default is US */ + LEAVE(); + return region_code_mapping[0].code; +} + +/** + * @brief This function converts region string to region code + * + * @param region_code region code + * + * @return Region string or NULL + */ +char * +region_code_2_string(t_u8 region_code) +{ + t_u8 i; + + ENTER(); + for (i = 0; i < ARRAY_SIZE(hw_region_code_mapping); i++) { + if (hw_region_code_mapping[i].code == region_code) { + LEAVE(); + return hw_region_code_mapping[i].region; + } + } + LEAVE(); + return NULL; +} + +t_u8 +woal_is_valid_alpha2(char *alpha2) +{ + if (!alpha2 || strlen(alpha2) < 2) + return MFALSE; + if (isalpha(alpha2[0]) && isalpha(alpha2[1])) + return MTRUE; + return MFALSE; +} +#endif + +/** + * @brief Copy mc address to the mlist + * + * @param mlist A pointer to mlan_multicast_list structure + * @param mac mc address + * + * @return N/A + */ +static inline void +woal_copy_mc_addr(mlan_multicast_list *mlist, mlan_802_11_mac_addr mac) +{ + int i = 0; + for (i = 0; i < mlist->num_multicast_addr; i++) { + if (!memcmp(&mlist->mac_list[i], mac, ETH_ALEN)) + return; + } + if (mlist->num_multicast_addr < MLAN_MAX_MULTICAST_LIST_SIZE) + memcpy(&mlist->mac_list[mlist->num_multicast_addr], mac, + ETH_ALEN); + mlist->num_multicast_addr++; + return; +} + +/** + * @brief Copy multicast table + * + * @param mlist A pointer to mlan_multicast_list structure + * @param dev A pointer to net_device structure + * + * @return Number of multicast addresses + */ +static inline int +woal_copy_mcast_addr(mlan_multicast_list *mlist, struct net_device *dev) +{ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) + struct dev_mc_list *mcptr = dev->mc_list; + int i = 0; +#else + struct netdev_hw_addr *mcptr = NULL; +#endif /* < 2.6.35 */ + + ENTER(); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) + for (i = 0; i < dev->mc_count && mcptr; i++) { + woal_copy_mc_addr(mlist, mcptr->dmi_addr); + mcptr = mcptr->next; + } +#else + netdev_for_each_mc_addr(mcptr, dev) + woal_copy_mc_addr(mlist, mcptr->addr); +#endif /* < 2.6.35 */ + LEAVE(); + return mlist->num_multicast_addr; +} + +/** + * @brief copy mc list from all the active interface + * + * @param handle A pointer to moal_handle + * @param mlist A pointer to multicast list + * + * @return total_mc_count + */ +static int +woal_copy_all_mc_list(moal_handle *handle, mlan_multicast_list *mlist) +{ + int i; + moal_private *priv = NULL; +#ifdef STA_SUPPORT + int mc_count = 0; +#endif + ENTER(); + for (i = 0; i < handle->priv_num && (priv = handle->priv[i]); i++) { +#ifdef STA_SUPPORT + if (GET_BSS_ROLE(handle->priv[i]) == MLAN_BSS_ROLE_STA) { + if (handle->priv[i]->media_connected == MTRUE) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) + mc_count = priv->netdev->mc_count; +#else + mc_count = netdev_mc_count(priv->netdev); +#endif + if (mc_count) + woal_copy_mcast_addr(mlist, + priv->netdev); + } + } +#endif + } + PRINTM(MIOCTL, "total mc_count=%d\n", mlist->num_multicast_addr); + LEAVE(); + return mlist->num_multicast_addr; +} + +/** + * @brief Fill in wait queue + * + * @param priv A pointer to moal_private structure + * @param wait A pointer to wait_queue structure + * @param wait_option Wait option + * + * @return N/A + */ +static inline void +woal_fill_wait_queue(moal_private *priv, wait_queue *wait, t_u8 wait_option) +{ + ENTER(); + wait->start_time = jiffies; + wait->condition = MFALSE; + wait->wait_timeout = MFALSE; + switch (wait_option) { + case MOAL_NO_WAIT: + break; + case MOAL_IOCTL_WAIT: + wait->wait = &priv->ioctl_wait_q; + break; + case MOAL_IOCTL_WAIT_TIMEOUT: + wait->wait = &priv->ioctl_wait_q; + wait->wait_timeout = MTRUE; + break; + case MOAL_CMD_WAIT: + wait->wait = &priv->cmd_wait_q; + break; + case MOAL_CMD_WAIT_TIMEOUT: + wait->wait = &priv->cmd_wait_q; + wait->wait_timeout = MTRUE; + break; +#ifdef CONFIG_PROC_FS + case MOAL_PROC_WAIT: + wait->wait = &priv->proc_wait_q; + break; +#endif +#if defined(STA_WEXT) || defined(UAP_WEXT) + case MOAL_WSTATS_WAIT: + if (IS_STA_OR_UAP_WEXT(cfg80211_wext)) + wait->wait = &priv->w_stats_wait_q; + break; +#endif + } + LEAVE(); + return; +} + +/** + * @brief Wait mlan ioctl complete + * + * @param priv A pointer to moal_private structure + * @param req A pointer to mlan_ioctl_req structure + * @param wait_option Wait option + * + * @return N/A + */ +static inline mlan_status +woal_wait_ioctl_complete(moal_private *priv, mlan_ioctl_req *req, + t_u8 wait_option) +{ + mlan_status status; + wait_queue *wait = (wait_queue *)req->reserved_1; + unsigned long flags; + + ENTER(); + + priv->phandle->ioctl_timeout = MFALSE; + + switch (wait_option) { + case MOAL_NO_WAIT: + break; + case MOAL_IOCTL_WAIT: + wait_event_interruptible_exclusive(priv->ioctl_wait_q, + wait->condition); + break; + case MOAL_IOCTL_WAIT_TIMEOUT: + wait_event_timeout(priv->ioctl_wait_q, wait->condition, + MOAL_IOCTL_TIMEOUT); + break; + case MOAL_CMD_WAIT: + wait_event_interruptible_exclusive(priv->cmd_wait_q, + wait->condition); + break; + case MOAL_CMD_WAIT_TIMEOUT: + wait_event_timeout(priv->cmd_wait_q, wait->condition, + MOAL_IOCTL_TIMEOUT); + break; +#ifdef CONFIG_PROC_FS + case MOAL_PROC_WAIT: + wait_event_interruptible_exclusive(priv->proc_wait_q, + wait->condition); + break; +#endif +#if defined(STA_WEXT) || defined(UAP_WEXT) + case MOAL_WSTATS_WAIT: + if (IS_STA_OR_UAP_WEXT(cfg80211_wext)) + wait_event_interruptible_exclusive(priv->w_stats_wait_q, + wait->condition); + break; +#endif + } + spin_lock_irqsave(&priv->phandle->driver_lock, flags); + if (wait->condition == MFALSE) { + if ((wait_option == MOAL_IOCTL_WAIT_TIMEOUT) || + (wait_option == MOAL_CMD_WAIT_TIMEOUT)) { + priv->phandle->ioctl_timeout = MTRUE; + PRINTM(MMSG, + "wlan: IOCTL timeout %p id=0x%x, sub_id=0x%x, wait_option=%d, action=%d\n", + req, req->req_id, (*(t_u32 *)req->pbuf), + wait_option, (int)req->action); + } else { + PRINTM(MMSG, + "wlan: IOCTL by signal %p id=0x%x, sub_id=0x%x, wait_option=%d, action=%d\n", + req, req->req_id, (*(t_u32 *)req->pbuf), + wait_option, (int)req->action); + } + req->reserved_1 = 0; + status = MLAN_STATUS_PENDING; + } else { + status = wait->status; + } + spin_unlock_irqrestore(&priv->phandle->driver_lock, flags); + + LEAVE(); + return status; +} + +/** + * @brief CAC period block cmd handler + * + * @param priv A pointer to moal_private structure + * @param req A pointer to mlan_ioctl_req buffer + * + * @return MTRUE/MFALSE + */ +static inline t_bool +woal_cac_period_block_cmd(moal_private *priv, pmlan_ioctl_req req) +{ + mlan_status ret = MFALSE; + t_u32 sub_command; + + ENTER(); + if (req == NULL || req->pbuf == NULL) + goto done; + + sub_command = *(t_u32 *)req->pbuf; + + switch (req->req_id) { + case MLAN_IOCTL_SCAN: + if (sub_command == MLAN_OID_SCAN_NORMAL || + sub_command == MLAN_OID_SCAN_SPECIFIC_SSID || + sub_command == MLAN_OID_SCAN_USER_CONFIG) + ret = MTRUE; + break; + case MLAN_IOCTL_BSS: + if (sub_command == MLAN_OID_BSS_STOP || +#ifdef UAP_SUPPORT + sub_command == MLAN_OID_UAP_BSS_CONFIG || +#endif + sub_command == MLAN_OID_BSS_CHANNEL + /* sub_command == MLAN_OID_BSS_ROLE */ ) + ret = MTRUE; + break; + case MLAN_IOCTL_RADIO_CFG: + if (sub_command == MLAN_OID_BAND_CFG) + ret = MTRUE; + break; +#if defined(UAP_SUPPORT) + case MLAN_IOCTL_SNMP_MIB: + if (sub_command == MLAN_OID_SNMP_MIB_DOT11D || + sub_command == MLAN_OID_SNMP_MIB_DOT11H) + ret = MTRUE; + break; +#endif + case MLAN_IOCTL_11D_CFG: +#ifdef STA_SUPPORT + if (sub_command == MLAN_OID_11D_CFG_ENABLE) + ret = MTRUE; +#endif + if (sub_command == MLAN_OID_11D_DOMAIN_INFO) + ret = MTRUE; + break; + case MLAN_IOCTL_MISC_CFG: + if (sub_command == MLAN_OID_MISC_REGION) + ret = MTRUE; + if (sub_command == MLAN_OID_MISC_HOST_CMD) { + phostcmd_header phostcmd; + t_u8 *ptlv_buf; + t_u16 tag, length; + + phostcmd = + (phostcmd_header)((pmlan_ds_misc_cfg)req-> + pbuf)->param.hostcmd.cmd; + ptlv_buf = (t_u8 *)phostcmd + sizeof(hostcmd_header); + if (phostcmd->action == MLAN_ACT_SET) { + while (ptlv_buf < + (t_u8 *)phostcmd + phostcmd->size) { + tag = *(t_u16 *)ptlv_buf; + length = *(t_u16 *)(ptlv_buf + 2); + /* Check Blocking TLV here, should add + more... */ + if (tag == MRVL_CHANNELCONFIG_TLV_ID) { + ret = MTRUE; + break; + } + ptlv_buf += + (length + MRVL_TLV_HEADER_SIZE); + } + } + } + break; + case MLAN_IOCTL_11H_CFG: + /* Prevent execute more than once */ + if (sub_command == MLAN_OID_11H_CHANNEL_CHECK) + ret = MTRUE; + break; + default: + ret = MFALSE; + break; + } + +done: + LEAVE(); + return ret; +} + +/******************************************************** + Global Functions +********************************************************/ + +/** + * @brief Send ioctl request to MLAN + * + * @param priv A pointer to moal_private structure + * @param req A pointer to mlan_ioctl_req buffer + * @param wait_option Wait option (MOAL_WAIT or MOAL_NO_WAIT) + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING + * -- success, otherwise fail + */ +mlan_status +woal_request_ioctl(moal_private *priv, mlan_ioctl_req *req, t_u8 wait_option) +{ + wait_queue *wait = NULL; + mlan_status status; + unsigned long flags; + + ENTER(); + + if (priv->phandle->surprise_removed == MTRUE) { + PRINTM(MERROR, + "IOCTL is not allowed while the device is not present\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } +#if defined(SDIO_SUSPEND_RESUME) + if (priv->phandle->is_suspended == MTRUE) { + PRINTM(MERROR, "IOCTL is not allowed while suspended\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } +#endif + + /* For MLAN_OID_MISC_HOST_CMD, action is 0, "action set" is checked + later */ + if ((req->action == MLAN_ACT_SET || req->action == 0) && + priv->phandle->cac_period == MTRUE) { + t_u32 sub_command; + /* CAC checking period left to complete jiffies */ + long cac_left_jiffies; + + sub_command = *(t_u32 *)req->pbuf; + + /* cac_left_jiffies will be negative if and only if * event + MLAN_EVENT_ID_DRV_MEAS_REPORT recieved from FW * after CAC + measure period ends, * usually this could be considered as a + FW bug */ + cac_left_jiffies = MEAS_REPORT_TIME - + (jiffies - priv->phandle->meas_start_jiffies); +#ifdef DFS_TESTING_SUPPORT + if (priv->phandle->cac_period_jiffies) { + cac_left_jiffies = priv->phandle->cac_period_jiffies - + (jiffies - priv->phandle->meas_start_jiffies); + } +#endif + if (cac_left_jiffies < 0) { + /* Avoid driver hang in FW died during CAC measure + period */ + priv->phandle->cac_period = MFALSE; + PRINTM(MERROR, + "CAC measure period spends longer than scheduled time " + "or meas done event never received\n"); + status = MLAN_STATUS_FAILURE; + goto done; + } + + /* Check BSS START first */ + if (sub_command == MLAN_OID_BSS_START) { + mlan_ds_bss *bss; + bss = (mlan_ds_bss *)req->pbuf; + /* + * Bss delay start after channel report received, + * not block the driver by delay executing. This is + * because a BSS_START cmd is always executed right + * after channel check issued. + */ + if (priv->phandle->delay_bss_start == MFALSE) { + PRINTM(MMSG, + "Received BSS Start command during CAC period, delay executing %ld seconds\n", + cac_left_jiffies / HZ); + priv->phandle->delay_bss_start = MTRUE; + memcpy(&priv->phandle->delay_ssid_bssid, + &bss->param.ssid_bssid, + sizeof(mlan_ssid_bssid)); + /* TODO: return success to allow the half below + of routines of which calling BSS start to + execute */ + status = MLAN_STATUS_SUCCESS; + goto done; + } else { + /* TODO: not blocking it, just return failure */ + PRINTM(MMSG, + "Only one BSS Start command allowed for delay executing!\n"); + status = MLAN_STATUS_FAILURE; + goto done; + } + } + if (woal_cac_period_block_cmd(priv, req)) { + priv->phandle->meas_wait_q_woken = MFALSE; + PRINTM(MMSG, + "CAC check is on going... Blocking Command %ld seconds\n", + cac_left_jiffies / HZ); + /* blocking timeout set to 1.5 * CAC checking period + left time */ + wait_event_interruptible_timeout(priv->phandle-> + meas_wait_q, + priv->phandle-> + meas_wait_q_woken, + cac_left_jiffies * 3 / + 2); + } + } else if (priv->phandle->cac_period) { + PRINTM(MINFO, "Operation during CAC check period.\n"); + } + wait = (wait_queue *)req->reserved_1; + req->bss_index = priv->bss_index; + if (wait_option) + woal_fill_wait_queue(priv, wait, wait_option); + else + req->reserved_1 = 0; + + /* Call MLAN ioctl handle */ + atomic_inc(&priv->phandle->ioctl_pending); + spin_lock_irqsave(&priv->phandle->ioctl_lock, flags); + status = mlan_ioctl(priv->phandle->pmlan_adapter, req); + spin_unlock_irqrestore(&priv->phandle->ioctl_lock, flags); + switch (status) { + case MLAN_STATUS_PENDING: + if (wait_option == MOAL_NO_WAIT) + PRINTM(MIOCTL, "IOCTL MOAL_NO_WAIT: %p\n", req); + else + PRINTM(MIOCTL, + "IOCTL pending: %p id=0x%x, sub_id=0x%x wait_option=%d, action=%d\n", + req, req->req_id, (*(t_u32 *)req->pbuf), + wait_option, (int)req->action); + /* Status pending, wake up main process */ + queue_work(priv->phandle->workqueue, &priv->phandle->main_work); + + /* Wait for completion */ + if (wait_option) + status = woal_wait_ioctl_complete(priv, req, + wait_option); + break; + case MLAN_STATUS_SUCCESS: + case MLAN_STATUS_FAILURE: + case MLAN_STATUS_RESOURCE: + PRINTM(MIOCTL, + "IOCTL: %p id=0x%x, sub_id=0x%x wait_option=%d, action=%d status=%d\n", + req, req->req_id, (*(t_u32 *)req->pbuf), wait_option, + (int)req->action, status); + atomic_dec(&priv->phandle->ioctl_pending); + break; + default: + atomic_dec(&priv->phandle->ioctl_pending); + break; + } + +done: + LEAVE(); + return status; +} + +/** + * @brief Send set MAC address request to MLAN + * + * @param priv A pointer to moal_private structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING + * -- success, otherwise fail + */ +mlan_status +woal_request_set_mac_address(moal_private *priv) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_bss *bss = NULL; + mlan_status status; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = (mlan_ioctl_req *)woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + status = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_BSS_MAC_ADDR; + memcpy(&bss->param.mac_addr, priv->current_addr, + sizeof(mlan_802_11_mac_addr)); + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_SET; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_CMD_WAIT); + if (status == MLAN_STATUS_SUCCESS) { + memcpy(priv->netdev->dev_addr, priv->current_addr, ETH_ALEN); + HEXDUMP("priv->MacAddr:", priv->current_addr, ETH_ALEN); + } else { + PRINTM(MERROR, + "set mac address failed! status=%d, error_code=0x%x\n", + status, req->status_code); + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Send multicast list request to MLAN + * + * @param priv A pointer to moal_private structure + * @param dev A pointer to net_device structure + * + * @return N/A + */ +void +woal_request_set_multicast_list(moal_private *priv, struct net_device *dev) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_bss *bss = NULL; + mlan_status status; + int mc_count = 0; + + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = (mlan_ioctl_req *)woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + PRINTM(MERROR, "%s:Fail to allocate ioctl req buffer\n", + __func__); + goto done; + } + + /* Fill request buffer */ + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_BSS_MULTICAST_LIST; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_SET; + if (dev->flags & IFF_PROMISC) { + bss->param.multicast_list.mode = MLAN_PROMISC_MODE; + } else if (dev->flags & IFF_ALLMULTI) { + bss->param.multicast_list.mode = MLAN_ALL_MULTI_MODE; + } else { + bss->param.multicast_list.mode = MLAN_MULTICAST_MODE; + mc_count = + woal_copy_all_mc_list(priv->phandle, + &bss->param.multicast_list); + if (mc_count > MLAN_MAX_MULTICAST_LIST_SIZE) + bss->param.multicast_list.mode = MLAN_ALL_MULTI_MODE; + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_NO_WAIT); + if (status != MLAN_STATUS_PENDING) + kfree(req); +done: + LEAVE(); + return; +} + +/** + * @brief Send deauth command to MLAN + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param mac MAC address to deauthenticate + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_disconnect(moal_private *priv, t_u8 wait_option, t_u8 *mac) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_bss *bss = NULL; + mlan_status status; + + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = (mlan_ioctl_req *)woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + status = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_BSS_STOP; + if (mac) + memcpy((t_u8 *)&bss->param.bssid, mac, + sizeof(mlan_802_11_mac_addr)); + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_SET; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); +#ifdef REASSOCIATION + priv->reassoc_required = MFALSE; +#endif /* REASSOCIATION */ + LEAVE(); + return status; +} + +/** + * @brief Send bss_start command to MLAN + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param ssid_bssid A point to mlan_ssid_bssid structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_bss_start(moal_private *priv, t_u8 wait_option, + mlan_ssid_bssid *ssid_bssid) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_bss *bss = NULL; + mlan_status status; + + ENTER(); + + /* Stop the O.S. TX queue When we are roaming */ + woal_stop_queue(priv->netdev); + if (priv->media_connected == MFALSE) { + if (netif_carrier_ok(priv->netdev)) + netif_carrier_off(priv->netdev); + } + + /* Allocate an IOCTL request buffer */ + req = (mlan_ioctl_req *)woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + status = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_BSS_START; + if (ssid_bssid) + memcpy(&bss->param.ssid_bssid, ssid_bssid, + sizeof(mlan_ssid_bssid)); + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_SET; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); +#ifdef STA_CFG80211 +#ifdef STA_SUPPORT + priv->assoc_status = req->status_code; +#endif +#endif +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Get BSS info + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param bss_info A pointer to mlan_bss_info structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_get_bss_info(moal_private *priv, t_u8 wait_option, mlan_bss_info *bss_info) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_get_info *info = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info)); + if (req == NULL) { + PRINTM(MERROR, + "Fail to allocate the buffer for get bss_info\n"); + status = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + info = (mlan_ds_get_info *)req->pbuf; + info->sub_command = MLAN_OID_GET_BSS_INFO; + req->req_id = MLAN_IOCTL_GET_INFO; + req->action = MLAN_ACT_GET; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); + if (status == MLAN_STATUS_SUCCESS) { + if (bss_info) + memcpy(bss_info, &info->param.bss_info, + sizeof(mlan_bss_info)); + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +#ifdef STA_SUPPORT +/** + * @brief Set/Get retry count + * + * @param priv A pointer to moal_private structure + * @param action Action set or get + * @param wait_option Wait option + * @param value Retry value + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_set_get_retry(moal_private *priv, t_u32 action, + t_u8 wait_option, int *value) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_snmp_mib *mib = NULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_snmp_mib)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + mib = (mlan_ds_snmp_mib *)req->pbuf; + mib->sub_command = MLAN_OID_SNMP_MIB_RETRY_COUNT; + req->req_id = MLAN_IOCTL_SNMP_MIB; + req->action = action; + + if (action == MLAN_ACT_SET) { + if (*value < MLAN_TX_RETRY_MIN || *value > MLAN_TX_RETRY_MAX) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + mib->param.retry_count = *value; + } + + /* Send IOCTL request to MLAN */ + ret = woal_request_ioctl(priv, req, wait_option); + if (ret == MLAN_STATUS_SUCCESS && action == MLAN_ACT_GET) + *value = mib->param.retry_count; +#ifdef STA_CFG80211 + /* If set is invoked from other than iw i.e iwconfig, wiphy retry count + should be updated as well */ + if (IS_STA_CFG80211(cfg80211_wext) && priv->wdev && priv->wdev->wiphy && + (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) && + (action == MLAN_ACT_SET)) { + priv->wdev->wiphy->retry_long = (t_u8)*value; + priv->wdev->wiphy->retry_short = (t_u8)*value; + } +#endif + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get RTS threshold + * + * @param priv A pointer to moal_private structure + * @param action Action set or get + * @param wait_option Wait option + * @param value RTS threshold value + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_set_get_rts(moal_private *priv, t_u32 action, t_u8 wait_option, int *value) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_snmp_mib *mib = NULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_snmp_mib)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + mib = (mlan_ds_snmp_mib *)req->pbuf; + mib->sub_command = MLAN_OID_SNMP_MIB_RTS_THRESHOLD; + req->req_id = MLAN_IOCTL_SNMP_MIB; + req->action = action; + + if (action == MLAN_ACT_SET) { + if (*value < MLAN_RTS_MIN_VALUE || *value > MLAN_RTS_MAX_VALUE) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + mib->param.rts_threshold = *value; + } + + /* Send IOCTL request to MLAN */ + ret = woal_request_ioctl(priv, req, wait_option); + if (ret == MLAN_STATUS_SUCCESS && action == MLAN_ACT_GET) + *value = mib->param.rts_threshold; +#ifdef STA_CFG80211 + /* If set is invoked from other than iw i.e iwconfig, wiphy RTS + threshold should be updated as well */ + if (IS_STA_CFG80211(cfg80211_wext) && priv->wdev && priv->wdev->wiphy && + (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) && + (action == MLAN_ACT_SET)) + priv->wdev->wiphy->rts_threshold = *value; +#endif + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Fragment threshold + * + * @param priv A pointer to moal_private structure + * @param action Action set or get + * @param wait_option Wait option + * @param value Fragment threshold value + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_set_get_frag(moal_private *priv, t_u32 action, + t_u8 wait_option, int *value) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_snmp_mib *mib = NULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_snmp_mib)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + mib = (mlan_ds_snmp_mib *)req->pbuf; + mib->sub_command = MLAN_OID_SNMP_MIB_FRAG_THRESHOLD; + req->req_id = MLAN_IOCTL_SNMP_MIB; + req->action = action; + + if (action == MLAN_ACT_SET) { + if (*value < MLAN_FRAG_MIN_VALUE || + *value > MLAN_FRAG_MAX_VALUE) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + mib->param.frag_threshold = *value; + } + + /* Send IOCTL request to MLAN */ + ret = woal_request_ioctl(priv, req, wait_option); + if (ret == MLAN_STATUS_SUCCESS && action == MLAN_ACT_GET) + *value = mib->param.frag_threshold; +#ifdef STA_CFG80211 + /* If set is invoked from other than iw i.e iwconfig, wiphy fragment + threshold should be updated as well */ + if (IS_STA_CFG80211(cfg80211_wext) && priv->wdev && priv->wdev->wiphy && + (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) && + (action == MLAN_ACT_SET)) + priv->wdev->wiphy->frag_threshold = *value; +#endif + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get generic IE + * + * @param priv A pointer to moal_private structure + * @param action Action set or get + * @param ie Information element + * @param ie_len Length of the IE + * @param wait_option wait option + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_set_get_gen_ie(moal_private *priv, t_u32 action, + t_u8 *ie, int *ie_len, t_u8 wait_option) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc = NULL; + mlan_ioctl_req *req = NULL; + + ENTER(); + + if ((action == MLAN_ACT_GET) && (ie == NULL || ie_len == NULL)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + if (action == MLAN_ACT_SET && *ie_len > MAX_IE_SIZE) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + misc = (mlan_ds_misc_cfg *)req->pbuf; + misc->sub_command = MLAN_OID_MISC_GEN_IE; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = action; + misc->param.gen_ie.type = MLAN_IE_TYPE_GEN_IE; + + if (action == MLAN_ACT_SET) { + misc->param.gen_ie.len = *ie_len; + if (*ie_len) + memcpy(misc->param.gen_ie.ie_data, ie, *ie_len); + } + + ret = woal_request_ioctl(priv, req, wait_option); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + + if (action == MLAN_ACT_GET) { + *ie_len = misc->param.gen_ie.len; + if (*ie_len) + memcpy(ie, misc->param.gen_ie.ie_data, *ie_len); + } + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get TX power + * + * @param priv A pointer to moal_private structure + * @param action Action set or get + * @param power_cfg A pinter to mlan_power_cfg_t structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_set_get_tx_power(moal_private *priv, + t_u32 action, mlan_power_cfg_t *power_cfg) +{ + mlan_ds_power_cfg *pcfg = NULL; + mlan_ioctl_req *req = NULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_power_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + pcfg = (mlan_ds_power_cfg *)req->pbuf; + pcfg->sub_command = MLAN_OID_POWER_CFG; + req->req_id = MLAN_IOCTL_POWER_CFG; + req->action = action; + if (action == MLAN_ACT_SET && power_cfg) + memcpy(&pcfg->param.power_cfg, power_cfg, + sizeof(mlan_power_cfg_t)); + + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + + if (ret == MLAN_STATUS_SUCCESS && power_cfg) + memcpy(power_cfg, &pcfg->param.power_cfg, + sizeof(mlan_power_cfg_t)); + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get IEEE power management + * + * @param priv A pointer to moal_private structure + * @param action Action set or get + * @param disabled A pointer to disabled flag + * @param power_type IEEE power type + * @param wait_option wait option + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_set_get_power_mgmt(moal_private *priv, + t_u32 action, int *disabled, int power_type, + t_u8 wait_option) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ioctl_req *req = NULL; + mlan_ds_pm_cfg *pm_cfg = NULL; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + pm_cfg = (mlan_ds_pm_cfg *)req->pbuf; + pm_cfg->sub_command = MLAN_OID_PM_CFG_IEEE_PS; + req->req_id = MLAN_IOCTL_PM_CFG; + req->action = action; + + if (action == MLAN_ACT_SET) { + PRINTM(MINFO, "PS_MODE set power disabled=%d power type=%#x\n", + *disabled, power_type); + if (*disabled) + pm_cfg->param.ps_mode = 0; + else { + /* Check not support case only (vwrq->disabled == + FALSE) */ + if ((power_type & MW_POWER_TYPE) == MW_POWER_TIMEOUT) { + PRINTM(MERROR, + "Setting power timeout is not supported\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } else if ((power_type & MW_POWER_TYPE) == + MW_POWER_PERIOD) { + PRINTM(MERROR, + "Setting power period is not supported\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + pm_cfg->param.ps_mode = 1; + } + } + + ret = woal_request_ioctl(priv, req, wait_option); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + + if (ret == MLAN_STATUS_SUCCESS && action == MLAN_ACT_GET) + *disabled = pm_cfg->param.ps_mode; + +#ifdef STA_CFG80211 + /* If set is invoked from other than iw i.e iwconfig, wiphy IEEE power + save mode should be updated */ + if (IS_STA_CFG80211(cfg80211_wext) && priv->wdev && + (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) && + (action == MLAN_ACT_SET)) { + if (*disabled) + priv->wdev->ps = MFALSE; + else + priv->wdev->ps = MTRUE; + } +#endif + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set region code + * + * @param priv A pointer to moal_private structure + * @param region A pointer to region string + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise fail + */ +mlan_status +woal_set_region_code(moal_private *priv, char *region) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *cfg = NULL; + mlan_ioctl_req *req = NULL; + + ENTER(); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + cfg = (mlan_ds_misc_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_MISC_REGION; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = MLAN_ACT_SET; + cfg->param.region_code = region_string_2_region_code(region); + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get data rate + * + * @param priv A pointer to moal_private structure + * @param action Action set or get + * @param datarate A pointer to mlan_rate_cfg_t structure + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_set_get_data_rate(moal_private *priv, + t_u8 action, mlan_rate_cfg_t *datarate) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_rate *rate = NULL; + mlan_ioctl_req *req = NULL; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_rate)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + rate = (mlan_ds_rate *)req->pbuf; + rate->param.rate_cfg.rate_type = MLAN_RATE_VALUE; + rate->sub_command = MLAN_OID_RATE_CFG; + req->req_id = MLAN_IOCTL_RATE; + req->action = action; + + if (datarate && (action == MLAN_ACT_SET)) + memcpy(&rate->param.rate_cfg, datarate, + sizeof(mlan_rate_cfg_t)); + + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (ret == MLAN_STATUS_SUCCESS && datarate && action == MLAN_ACT_GET) + memcpy(datarate, &rate->param.rate_cfg, + sizeof(mlan_rate_cfg_t)); + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Get assoc_resp buffer + * + * @param priv A pointer to moal_private structure + * @param assoc_rsp A pointer to mlan_ds_misc_assoc_rsp structure + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_get_assoc_rsp(moal_private *priv, mlan_ds_misc_assoc_rsp *assoc_rsp) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_misc_cfg *misc = NULL; + mlan_ioctl_req *req = NULL; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + PRINTM(MERROR, "Fail to allocate buffer for get assoc resp\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + req->req_id = MLAN_IOCTL_MISC_CFG; + misc = (pmlan_ds_misc_cfg)req->pbuf; + misc->sub_command = MLAN_OID_MISC_ASSOC_RSP; + req->action = MLAN_ACT_GET; + + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (ret == MLAN_STATUS_SUCCESS && assoc_rsp) + memcpy(assoc_rsp, &misc->param.assoc_resp, + sizeof(mlan_ds_misc_assoc_rsp)); + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} +#endif + +/** + * @brief Send get FW info request to MLAN + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param fw_info FW information + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_request_get_fw_info(moal_private *priv, t_u8 wait_option, + mlan_fw_info *fw_info) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_get_info *info; + mlan_status status; + ENTER(); + memset(priv->current_addr, 0xff, ETH_ALEN); + + /* Allocate an IOCTL request buffer */ + req = (mlan_ioctl_req *) + woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info)); + if (req == NULL) { + status = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + info = (mlan_ds_get_info *)req->pbuf; + req->req_id = MLAN_IOCTL_GET_INFO; + req->action = MLAN_ACT_GET; + info->sub_command = MLAN_OID_GET_FW_INFO; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); + if (status == MLAN_STATUS_SUCCESS) { + priv->phandle->fw_release_number = info->param.fw_info.fw_ver; + if (priv->current_addr[0] == 0xff) + memcpy(priv->current_addr, + &info->param.fw_info.mac_addr, + sizeof(mlan_802_11_mac_addr)); + memcpy(priv->netdev->dev_addr, priv->current_addr, ETH_ALEN); + if (fw_info) + memcpy(fw_info, &info->param.fw_info, + sizeof(mlan_fw_info)); + DBG_HEXDUMP(MCMD_D, "mac", priv->current_addr, 6); + } else + PRINTM(MERROR, + "get fw info failed! status=%d, error_code=0x%x\n", + status, req->status_code); +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +#ifdef PROC_DEBUG +/** + * @brief Get debug info + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param debug_info A pointer to mlan_debug_info structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_get_debug_info(moal_private *priv, t_u8 wait_option, + mlan_debug_info *debug_info) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_get_info *info = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(t_u32) + + sizeof(mlan_debug_info)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + info = (mlan_ds_get_info *)req->pbuf; + info->sub_command = MLAN_OID_GET_DEBUG_INFO; + req->req_id = MLAN_IOCTL_GET_INFO; + req->action = MLAN_ACT_GET; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); + if (status == MLAN_STATUS_SUCCESS) { + if (debug_info) { + memcpy(debug_info, &info->param.debug_info, + sizeof(mlan_debug_info)); + } + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} +#endif /* PROC_DEBUG */ + +#if defined(STA_WEXT) || defined(UAP_WEXT) +/** + * @brief host command ioctl function + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * @return 0 --success, otherwise fail + */ +int +woal_host_command(moal_private *priv, struct iwreq *wrq) +{ + HostCmd_Header cmd_header; + int ret = 0; + mlan_ds_misc_cfg *misc = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Sanity check */ + if (wrq->u.data.pointer == NULL) { + PRINTM(MERROR, "hostcmd IOCTL corrupt data\n"); + ret = -EINVAL; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + misc = (mlan_ds_misc_cfg *)req->pbuf; + memset(&cmd_header, 0, sizeof(cmd_header)); + + /* get command header */ + if (copy_from_user + (&cmd_header, wrq->u.data.pointer, sizeof(HostCmd_Header))) { + PRINTM(MERROR, "copy from user failed: Host command header\n"); + ret = -EFAULT; + goto done; + } + misc->param.hostcmd.len = woal_le16_to_cpu(cmd_header.size); + + PRINTM(MINFO, "Host command len = %u\n", misc->param.hostcmd.len); + + if (!misc->param.hostcmd.len || + misc->param.hostcmd.len > MLAN_SIZE_OF_CMD_BUFFER) { + PRINTM(MERROR, "Invalid data buffer length\n"); + ret = -EINVAL; + goto done; + } + + /* get the whole command from user */ + if (copy_from_user + (misc->param.hostcmd.cmd, wrq->u.data.pointer, + woal_le16_to_cpu(cmd_header.size))) { + PRINTM(MERROR, "copy from user failed\n"); + ret = -EFAULT; + goto done; + } + misc->sub_command = MLAN_OID_MISC_HOST_CMD; + req->req_id = MLAN_IOCTL_MISC_CFG; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (copy_to_user + (wrq->u.data.pointer, (t_u8 *)misc->param.hostcmd.cmd, + misc->param.hostcmd.len)) { + ret = -EFAULT; + goto done; + } + wrq->u.data.length = misc->param.hostcmd.len; +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} +#endif + +#if defined(WIFI_DIRECT_SUPPORT) || defined(UAP_SUPPORT) +/** + * @brief host command ioctl function + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +/********* format of ifr_data *************/ +/* buf_len + Hostcmd_body */ +/* buf_len: 4 bytes */ +/* the length of the buf which */ +/* can be used to return data */ +/* to application */ +/* Hostcmd_body */ +/*******************************************/ +int +woal_hostcmd_ioctl(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + t_u32 buf_len = 0; + HostCmd_Header cmd_header; + int ret = 0; + mlan_ds_misc_cfg *misc = NULL; + mlan_ioctl_req *ioctl_req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "uap_hostcmd_ioctl() corrupt data\n"); + ret = -EFAULT; + goto done; + } + + if (copy_from_user(&buf_len, req->ifr_data, sizeof(buf_len))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + memset(&cmd_header, 0, sizeof(cmd_header)); + + /* get command header */ + if (copy_from_user + (&cmd_header, req->ifr_data + sizeof(buf_len), + sizeof(HostCmd_Header))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + PRINTM(MINFO, "Host command len = %d\n", + woal_le16_to_cpu(cmd_header.size)); + + if (woal_le16_to_cpu(cmd_header.size) > MLAN_SIZE_OF_CMD_BUFFER) { + ret = -EINVAL; + goto done; + } + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; + + misc->param.hostcmd.len = woal_le16_to_cpu(cmd_header.size); + + /* get the whole command from user */ + if (copy_from_user + (misc->param.hostcmd.cmd, req->ifr_data + sizeof(buf_len), + misc->param.hostcmd.len)) { + PRINTM(MERROR, "copy from user failed\n"); + ret = -EFAULT; + goto done; + } + misc->sub_command = MLAN_OID_MISC_HOST_CMD; + ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; + + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (misc->param.hostcmd.len > buf_len) { + PRINTM(MERROR, + "buf_len is too small, resp_len=%d, buf_len=%d\n", + (int)misc->param.hostcmd.len, (int)buf_len); + ret = -EFAULT; + goto done; + } + if (copy_to_user + (req->ifr_data + sizeof(buf_len), (t_u8 *)misc->param.hostcmd.cmd, + misc->param.hostcmd.len)) { + ret = -EFAULT; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} +#endif + +/** + * @brief CUSTOM_IE ioctl handler + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +int +woal_custom_ie_ioctl(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_misc_cfg *misc = NULL; + mlan_ds_misc_custom_ie *custom_ie = NULL; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + gfp_t flag; + + ENTER(); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "woal_custom_ie_ioctl() corrupt data\n"); + ret = -EFAULT; + goto done; + } + + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + custom_ie = kzalloc(sizeof(mlan_ds_misc_custom_ie), flag); + if (!custom_ie) { + ret = -ENOMEM; + goto done; + } + + if (copy_from_user + (custom_ie, req->ifr_data, sizeof(mlan_ds_misc_custom_ie))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; + misc->sub_command = MLAN_OID_MISC_CUSTOM_IE; + ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; + if ((custom_ie->len == 0)||(custom_ie->len == + sizeof(custom_ie->ie_data_list[0]. + ie_index))) + ioctl_req->action = MLAN_ACT_GET; + else + ioctl_req->action = MLAN_ACT_SET; + + memcpy(&misc->param.cust_ie, custom_ie, sizeof(mlan_ds_misc_custom_ie)); + + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (ioctl_req->action == MLAN_ACT_GET) { + if (copy_to_user + (req->ifr_data, &misc->param.cust_ie, + sizeof(mlan_ds_misc_custom_ie))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } + } else if (ioctl_req->status_code == MLAN_ERROR_IOCTL_FAIL) { + /* send a separate error code to indicate error from driver */ + ret = EFAULT; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + kfree(custom_ie); + LEAVE(); + return ret; +} + +/** + * @brief send raw data packet ioctl function + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +int +woal_send_host_packet(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + t_u32 packet_len = 0; + int ret = 0; + pmlan_buffer pmbuf = NULL; + mlan_status status; + + ENTER(); + + if (!priv || !priv->phandle) { + PRINTM(MERROR, "priv or handle is NULL\n"); + ret = -EFAULT; + goto done; + } + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "woal_send_host_packet() corrupt data\n"); + ret = -EFAULT; + goto done; + } + + if (copy_from_user(&packet_len, req->ifr_data, sizeof(packet_len))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } +#define PACKET_HEADER_LEN 8 +#define MV_ETH_FRAME_LEN 1514 + if (packet_len > MV_ETH_FRAME_LEN) { + PRINTM(MERROR, "Invalid packet length %d\n", packet_len); + ret = -EFAULT; + goto done; + } + pmbuf = woal_alloc_mlan_buffer(priv->phandle, + (int)(MLAN_MIN_DATA_HEADER_LEN + + (int)packet_len + + PACKET_HEADER_LEN)); + if (!pmbuf) { + PRINTM(MERROR, "Fail to allocate mlan_buffer\n"); + ret = -ENOMEM; + goto done; + } + pmbuf->data_offset = MLAN_MIN_DATA_HEADER_LEN; + + /* get whole packet and header */ + if (copy_from_user + (pmbuf->pbuf + pmbuf->data_offset, + req->ifr_data + sizeof(packet_len), + PACKET_HEADER_LEN + packet_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + woal_free_mlan_buffer(priv->phandle, pmbuf); + goto done; + } + pmbuf->data_len = PACKET_HEADER_LEN + packet_len; + pmbuf->buf_type = MLAN_BUF_TYPE_RAW_DATA; + pmbuf->bss_index = priv->bss_index; + status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf); + switch (status) { + case MLAN_STATUS_PENDING: + atomic_inc(&priv->phandle->tx_pending); + queue_work(priv->phandle->workqueue, &priv->phandle->main_work); + break; + case MLAN_STATUS_SUCCESS: + woal_free_mlan_buffer(priv->phandle, pmbuf); + break; + case MLAN_STATUS_FAILURE: + default: + woal_free_mlan_buffer(priv->phandle, pmbuf); + ret = -EFAULT; + break; + } +done: + LEAVE(); + return ret; +} + +#if defined(UAP_WEXT) +/** + * @brief Set/Get CUSTOM_IE ioctl handler + * + * @param priv A pointer to moal_private structure + * @param mask Mask to set or clear from caller + * @param ie IE buffer to set for beacon + * @param ie_len Length of the IE + * + * @return 0 --success, otherwise fail + */ +int +woal_set_get_custom_ie(moal_private *priv, t_u16 mask, t_u8 *ie, int ie_len) +{ + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_misc_cfg *misc = NULL; + mlan_ds_misc_custom_ie *misc_ie = NULL; + int ret = 0; + custom_ie *pcust_bcn_ie = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (ioctl_req == NULL) { + LEAVE(); + return -ENOMEM; + } + + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; + misc->sub_command = MLAN_OID_MISC_CUSTOM_IE; + ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; + ioctl_req->action = MLAN_ACT_SET; + misc_ie = &misc->param.cust_ie; + +#ifndef TLV_TYPE_MGMT_IE +#define TLV_TYPE_MGMT_IE (0x169) +#endif + misc_ie->type = TLV_TYPE_MGMT_IE; + misc_ie->len = (sizeof(custom_ie) - MAX_IE_SIZE) + ie_len; + pcust_bcn_ie = misc_ie->ie_data_list; + pcust_bcn_ie->ie_index = 0xffff; + pcust_bcn_ie->mgmt_subtype_mask = mask; + pcust_bcn_ie->ie_length = ie_len; + memcpy(pcust_bcn_ie->ie_buffer, ie, ie_len); + + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) + ret = -EFAULT; + + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} +#endif /* defined(HOST_TXRX_MGMT_FRAME) && defined(UAP_WEXT) */ + +/** + * @brief TDLS configuration ioctl handler + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +int +woal_tdls_config_ioctl(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_misc_cfg *misc = NULL; + mlan_ds_misc_tdls_config *tdls_data = NULL; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + gfp_t flag; + + ENTER(); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "woal_tdls_config_ioctl() corrupt data\n"); + ret = -EFAULT; + goto done; + } + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + tdls_data = kzalloc(sizeof(mlan_ds_misc_tdls_config), flag); + if (!tdls_data) { + ret = -ENOMEM; + goto done; + } + + if (copy_from_user + (tdls_data, req->ifr_data, sizeof(mlan_ds_misc_tdls_config))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; + misc->sub_command = MLAN_OID_MISC_TDLS_CONFIG; + ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; + if (tdls_data->tdls_action == WLAN_TDLS_DISCOVERY_REQ + || tdls_data->tdls_action == WLAN_TDLS_LINK_STATUS) + ioctl_req->action = MLAN_ACT_GET; + else + ioctl_req->action = MLAN_ACT_SET; + + memcpy(&misc->param.tdls_config, tdls_data, + sizeof(mlan_ds_misc_tdls_config)); + + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (tdls_data->tdls_action == WLAN_TDLS_DISCOVERY_REQ + || tdls_data->tdls_action == WLAN_TDLS_LINK_STATUS) { + if (copy_to_user(req->ifr_data, &misc->param.tdls_config, + sizeof(mlan_ds_misc_tdls_config))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + kfree(tdls_data); + LEAVE(); + return ret; +} + +/** + * @brief ioctl function get BSS type + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +int +woal_get_bss_type(struct net_device *dev, struct ifreq *req) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + int bss_type; + + ENTER(); + + bss_type = (int)priv->bss_type; + if (copy_to_user(req->ifr_data, &bss_type, sizeof(int))) { + PRINTM(MINFO, "Copy to user failed!\n"); + ret = -EFAULT; + } + + LEAVE(); + return ret; +} + +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) +/** + * @brief Swithces BSS role of interface + * + * @param priv A pointer to moal_private structure + * @param action Action: set or get + * @param wait_option Wait option (MOAL_WAIT or MOAL_NO_WAIT) + * @param bss_role A pointer to bss role + * + * @return 0 --success, otherwise fail + */ +mlan_status +woal_bss_role_cfg(moal_private *priv, t_u8 action, + t_u8 wait_option, t_u8 *bss_role) +{ + int ret = 0; + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *req = NULL; + struct net_device *dev = priv->netdev; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_BSS_ROLE; + req->req_id = MLAN_IOCTL_BSS; + req->action = action; + if (action == MLAN_ACT_SET) { + if (priv->bss_role == *bss_role) { + PRINTM(MWARN, "BSS is in desired role already\n"); + goto done; + } else { + bss->param.bss_role = *bss_role; + } + } + status = woal_request_ioctl(priv, req, wait_option); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (action == MLAN_ACT_GET) { + *bss_role = bss->param.bss_role; + } else { + /* Update moal_private */ + priv->bss_role = *bss_role; + if (priv->bss_type == MLAN_BSS_TYPE_UAP) + priv->bss_type = MLAN_BSS_TYPE_STA; + else if (priv->bss_type == MLAN_BSS_TYPE_STA) + priv->bss_type = MLAN_BSS_TYPE_UAP; + + if (*bss_role == MLAN_BSS_ROLE_UAP) { + /* Switch: STA -> uAP */ + /* Setup the OS Interface to our functions */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 29) + dev->do_ioctl = woal_uap_do_ioctl; + dev->set_multicast_list = woal_uap_set_multicast_list; +#else + dev->netdev_ops = &woal_uap_netdev_ops; +#endif +#ifdef UAP_WEXT + if (IS_UAP_WEXT(cfg80211_wext)) { +#if WIRELESS_EXT < 21 + dev->get_wireless_stats = + woal_get_uap_wireless_stats; +#endif + dev->wireless_handlers = + (struct iw_handler_def *) + &woal_uap_handler_def; + init_waitqueue_head(&priv->w_stats_wait_q); + } +#endif /* UAP_WEXT */ + } else if (*bss_role == MLAN_BSS_ROLE_STA) { + /* Switch: uAP -> STA */ + /* Setup the OS Interface to our functions */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 29) + dev->do_ioctl = woal_do_ioctl; + dev->set_multicast_list = woal_set_multicast_list; +#else + dev->netdev_ops = &woal_netdev_ops; +#endif +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) { +#if WIRELESS_EXT < 21 + dev->get_wireless_stats = + woal_get_wireless_stats; +#endif + dev->wireless_handlers = + (struct iw_handler_def *) + &woal_handler_def; + init_waitqueue_head(&priv->w_stats_wait_q); + } +#endif /* STA_WEXT */ + } + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +#if defined(STA_WEXT) || defined(UAP_WEXT) +/** + * @brief Set/Get BSS role + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +int +woal_set_get_bss_role(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + int bss_role = 0; + t_u8 action = MLAN_ACT_GET; + + ENTER(); + + if (wrq->u.data.length) { + if (copy_from_user(&bss_role, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if ((bss_role != MLAN_BSS_ROLE_STA && + bss_role != MLAN_BSS_ROLE_UAP) +#if defined(WIFI_DIRECT_SUPPORT) + || (priv->bss_type != MLAN_BSS_TYPE_WIFIDIRECT) +#endif + ) { + PRINTM(MWARN, "Invalid BSS role\n"); + ret = -EINVAL; + goto done; + } + if (bss_role == GET_BSS_ROLE(priv)) { + PRINTM(MWARN, "Already BSS is in desired role\n"); + ret = -EINVAL; + goto done; + } + action = MLAN_ACT_SET; + /* Reset interface */ + woal_reset_intf(priv, MOAL_IOCTL_WAIT, MFALSE); + } + + if (MLAN_STATUS_SUCCESS != woal_bss_role_cfg(priv, + action, MOAL_IOCTL_WAIT, + (t_u8 *)&bss_role)) { + ret = -EFAULT; + goto done; + } + + if (!wrq->u.data.length) { + if (copy_to_user(wrq->u.data.pointer, &bss_role, sizeof(int))) { + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + } else { +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + if (IS_STA_OR_UAP_CFG80211(cfg80211_wext)) + woal_clear_all_mgmt_ies(priv, MOAL_IOCTL_WAIT); +#endif + /* Initialize private structures */ + woal_init_priv(priv, MOAL_IOCTL_WAIT); + + /* Enable interfaces */ + netif_device_attach(priv->netdev); + woal_start_queue(priv->netdev); + } + +done: + LEAVE(); + return ret; +} +#endif /* STA_WEXT || UAP_WEXT */ +#endif /* STA_SUPPORT && UAP_SUPPORT */ + +/** + * @brief Set auto arp resp + * + * @param handle A pointer to moal_handle structure + * @param enable enable/disable + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +static mlan_status +woal_set_auto_arp(moal_handle *handle, t_u8 enable) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + int i = 0; + moal_private *priv = NULL; + mlan_ds_misc_cfg *misc = NULL; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_ipaddr_cfg ipaddr_cfg; + + ENTER(); + + memset(&ipaddr_cfg, 0, sizeof(ipaddr_cfg)); + for (i = 0; i < handle->priv_num && (priv = handle->priv[i]); i++) { + if (priv->ip_addr_type != IPADDR_TYPE_NONE) { + memcpy(ipaddr_cfg.ip_addr[ipaddr_cfg.ip_addr_num], + priv->ip_addr, IPADDR_LEN); + ipaddr_cfg.ip_addr_num++; + } + } + if (ipaddr_cfg.ip_addr_num == 0) { + PRINTM(MIOCTL, "No IP addr configured.\n"); + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + PRINTM(MIOCTL, "IOCTL req allocated failed!\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + misc = (mlan_ds_misc_cfg *)req->pbuf; + misc->sub_command = MLAN_OID_MISC_IP_ADDR; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = MLAN_ACT_SET; + memcpy(&misc->param.ipaddr_cfg, &ipaddr_cfg, sizeof(ipaddr_cfg)); + if (enable) { + misc->param.ipaddr_cfg.op_code = MLAN_IPADDR_OP_ARP_FILTER | + MLAN_IPADDR_OP_AUTO_ARP_RESP; + misc->param.ipaddr_cfg.ip_addr_type = IPADDR_TYPE_IPV4; + } else { + /** remove ip */ + misc->param.ipaddr_cfg.op_code = MLAN_IPADDR_OP_IP_REMOVE; + } + ret = woal_request_ioctl(woal_get_priv(handle, MLAN_BSS_ROLE_ANY), req, + MOAL_NO_WAIT); + if (ret != MLAN_STATUS_SUCCESS && ret != MLAN_STATUS_PENDING) + PRINTM(MIOCTL, "Set auto arp IOCTL failed!\n"); +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Get Host Sleep parameters + * + * @param priv A pointer to moal_private structure + * @param action Action: set or get + * @param wait_option Wait option (MOAL_WAIT or MOAL_NO_WAIT) + * @param hscfg A pointer to mlan_ds_hs_cfg structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_set_get_hs_params(moal_private *priv, t_u16 action, t_u8 wait_option, + mlan_ds_hs_cfg *hscfg) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_pm_cfg *pmcfg = NULL; + mlan_ioctl_req *req = NULL; + + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + pmcfg = (mlan_ds_pm_cfg *)req->pbuf; + pmcfg->sub_command = MLAN_OID_PM_CFG_HS_CFG; + req->req_id = MLAN_IOCTL_PM_CFG; + req->action = action; + if (action == MLAN_ACT_SET) + memcpy(&pmcfg->param.hs_cfg, hscfg, sizeof(mlan_ds_hs_cfg)); + + /* Send IOCTL request to MLAN */ + ret = woal_request_ioctl(priv, req, wait_option); + if (ret == MLAN_STATUS_SUCCESS) { + if (hscfg && action == MLAN_ACT_GET) { + memcpy(hscfg, &pmcfg->param.hs_cfg, + sizeof(mlan_ds_hs_cfg)); + } + } +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Cancel Host Sleep configuration + * + * @param priv A pointer to moal_private structure + * @param wait_option wait option + * + * @return MLAN_STATUS_SUCCESS, MLAN_STATUS_PENDING, + * or MLAN_STATUS_FAILURE + */ +mlan_status +woal_cancel_hs(moal_private *priv, t_u8 wait_option) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_hs_cfg hscfg; + + ENTER(); + + /* Cancel Host Sleep */ + hscfg.conditions = HOST_SLEEP_CFG_CANCEL; + hscfg.is_invoke_hostcmd = MTRUE; + ret = woal_set_get_hs_params(priv, MLAN_ACT_SET, wait_option, &hscfg); + + /* remove auto arp from FW */ + woal_set_auto_arp(priv->phandle, MFALSE); + + LEAVE(); + return ret; +} + +#if defined(SDIO_SUSPEND_RESUME) +/** @brief This function enables the host sleep + * + * @param priv A Pointer to the moal_private structure + * @return MTRUE or MFALSE + */ +int +woal_enable_hs(moal_private *priv) +{ + mlan_ds_hs_cfg hscfg; + moal_handle *handle = NULL; + int hs_actived = MFALSE; + int timeout = 0; +#ifdef SDIO_SUSPEND_RESUME + mlan_ds_ps_info pm_info; +#endif + + ENTER(); + + if (priv == NULL) { + PRINTM(MERROR, "Invalid priv\n"); + goto done; + } + handle = priv->phandle; + if (handle->hs_activated == MTRUE) { + PRINTM(MIOCTL, "HS Already actived\n"); + hs_actived = MTRUE; + goto done; + } +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_CFG80211) && defined(UAP_CFG80211) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (priv->phandle->is_remain_timer_set) { + woal_cancel_timer(&priv->phandle->remain_timer); + woal_remain_timer_func(priv->phandle); + } + /* cancel pending remain on channel */ + if (priv->phandle->remain_on_channel) { + t_u8 channel_status; + moal_private *remain_priv = + priv->phandle->priv[priv->phandle->remain_bss_index]; + if (remain_priv) { + woal_cfg80211_remain_on_channel_cfg(remain_priv, + MOAL_NO_WAIT, MTRUE, + &channel_status, + NULL, 0, 0); + if (priv->phandle->cookie) { + cfg80211_remain_on_channel_expired( +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + remain_priv-> + netdev, +#else + remain_priv-> + wdev, +#endif + priv-> + phandle-> + cookie, + &priv-> + phandle-> + chan, +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + priv-> + phandle-> + channel_type, +#endif + GFP_ATOMIC); + priv->phandle->cookie = 0; + } + } + priv->phandle->remain_on_channel = MFALSE; + } +#endif +#endif +#endif + +#ifdef STA_SUPPORT + woal_reconfig_bgscan(priv->phandle); +#endif + + /* Set auto arp response configuration to Fw */ + woal_set_auto_arp(handle, MTRUE); + /* Enable Host Sleep */ + handle->hs_activate_wait_q_woken = MFALSE; + memset(&hscfg, 0, sizeof(mlan_ds_hs_cfg)); + hscfg.is_invoke_hostcmd = MTRUE; + if (woal_set_get_hs_params(priv, MLAN_ACT_SET, MOAL_NO_WAIT, &hscfg) == + MLAN_STATUS_FAILURE) { + PRINTM(MIOCTL, "IOCTL request HS enable failed\n"); + goto done; + } + timeout = wait_event_interruptible_timeout(handle->hs_activate_wait_q, + handle-> + hs_activate_wait_q_woken, + HS_ACTIVE_TIMEOUT); + sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func); + if ((handle->hs_activated == MTRUE) || (handle->is_suspended == MTRUE)) { + PRINTM(MCMND, "suspend success! force=%u skip=%u\n", + handle->hs_force_count, handle->hs_skip_count); + hs_actived = MTRUE; + } +#ifdef SDIO_SUSPEND_RESUME + else { + handle->suspend_fail = MTRUE; + woal_get_pm_info(priv, &pm_info); + if (pm_info.is_suspend_allowed == MTRUE) { +#ifdef MMC_PM_FUNC_SUSPENDED + woal_wlan_is_suspended(priv->phandle); +#endif + handle->hs_force_count++; + PRINTM(MCMND, "suspend allowed! force=%u skip=%u\n", + handle->hs_force_count, handle->hs_skip_count); + hs_actived = MTRUE; + } + } +#endif /* SDIO_SUSPEND_RESUME */ + sdio_release_host(((struct sdio_mmc_card *)handle->card)->func); + if (hs_actived != MTRUE) { + handle->hs_skip_count++; +#ifdef SDIO_SUSPEND_RESUME + PRINTM(MCMND, + "suspend skipped! timeout=%d allow=%d force=%u skip=%u\n", + timeout, (int)pm_info.is_suspend_allowed, + handle->hs_force_count, handle->hs_skip_count); +#else + PRINTM(MCMND, "suspend skipped! timeout=%d skip=%u\n", + timeout, handle->hs_skip_count); +#endif + woal_cancel_hs(priv, MOAL_NO_WAIT); + } +done: + LEAVE(); + return hs_actived; +} +#endif + +#ifdef CONFIG_PROC_FS +/** + * @brief This function send soft_reset command to firmware + * + * @param handle A pointer to moal_handle structure + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING on success, + * otherwise failure code + */ +mlan_status +woal_request_soft_reset(moal_handle *handle) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *misc = NULL; + + ENTER(); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req) { + misc = (mlan_ds_misc_cfg *)req->pbuf; + misc->sub_command = MLAN_OID_MISC_SOFT_RESET; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = MLAN_ACT_SET; + ret = woal_request_ioctl(woal_get_priv + (handle, MLAN_BSS_ROLE_ANY), req, + MOAL_PROC_WAIT); + } + + handle->surprise_removed = MTRUE; + woal_sched_timeout(5); + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} +#endif /* CONFIG_PROC_FS */ + +/** + * @brief Set wapi enable + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param enable MTRUE or MFALSE + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_set_wapi_enable(moal_private *priv, t_u8 wait_option, t_u32 enable) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_WAPI_ENABLED; + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_SET; + sec->param.wapi_enabled = enable; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Get version + * + * @param handle A pointer to moal_handle structure + * @param version A pointer to version buffer + * @param max_len max length of version buffer + * + * @return N/A + */ +void +woal_get_version(moal_handle *handle, char *version, int max_len) +{ + union { + t_u32 l; + t_u8 c[4]; + } ver; + char fw_ver[32]; + + ENTER(); + + ver.l = handle->fw_release_number; + snprintf(fw_ver, sizeof(fw_ver), "%u.%u.%u.p%u", + ver.c[2], ver.c[1], ver.c[0], ver.c[3]); + + snprintf(version, max_len, handle->driver_version, fw_ver); + + LEAVE(); +} + +#if defined(STA_WEXT) || defined(UAP_WEXT) +/** + * @brief Get Driver Version + * + * @param priv A pointer to moal_private structure + * @param req A pointer to ifreq structure + * + * @return 0 --success, otherwise fail + */ +int +woal_get_driver_version(moal_private *priv, struct ifreq *req) +{ + struct iwreq *wrq = (struct iwreq *)req; + int len; + char buf[MLAN_MAX_VER_STR_LEN]; + ENTER(); + + woal_get_version(priv->phandle, buf, sizeof(buf) - 1); + + len = strlen(buf); + if (wrq->u.data.pointer) { + if (copy_to_user(wrq->u.data.pointer, buf, len)) { + PRINTM(MERROR, "Copy to user failed\n"); + LEAVE(); + return -EFAULT; + } + wrq->u.data.length = len; + } + PRINTM(MINFO, "MOAL VERSION: %s\n", buf); + LEAVE(); + return 0; +} + +/** + * @brief Get extended driver version + * + * @param priv A pointer to moal_private structure + * @param ireq A pointer to ifreq structure + * + * @return 0 --success, otherwise fail + */ +int +woal_get_driver_verext(moal_private *priv, struct ifreq *ireq) +{ + struct iwreq *wrq = (struct iwreq *)ireq; + mlan_ds_get_info *info = NULL; + mlan_ioctl_req *req = NULL; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info)); + if (req == NULL) { + LEAVE(); + return -ENOMEM; + } + + info = (mlan_ds_get_info *)req->pbuf; + info->sub_command = MLAN_OID_GET_VER_EXT; + req->req_id = MLAN_IOCTL_GET_INFO; + req->action = MLAN_ACT_GET; + + if (!wrq->u.data.flags) { + info->param.ver_ext.version_str_sel = + *((int *)(wrq->u.name + SUBCMD_OFFSET)); + } else { + if (copy_from_user + (&info->param.ver_ext.version_str_sel, wrq->u.data.pointer, + sizeof(info->param.ver_ext.version_str_sel))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } else { + if (((t_s32)(info->param.ver_ext.version_str_sel)) < 0) { + PRINTM(MERROR, "Invalid arguments!\n"); + ret = -EINVAL; + goto done; + } + } + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (wrq->u.data.pointer) { + if (copy_to_user + (wrq->u.data.pointer, info->param.ver_ext.version_str, + strlen(info->param.ver_ext.version_str))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = strlen(info->param.ver_ext.version_str); + } + + PRINTM(MINFO, "MOAL EXTENDED VERSION: %s\n", + info->param.ver_ext.version_str); +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} +#endif + +#ifdef DEBUG_LEVEL1 +/** + * @brief Set driver debug bit masks to mlan in order to enhance performance + * + * @param priv A pointer to moal_private structure + * @param drvdbg Driver debug level + * + * @return 0 --success, otherwise fail + */ +int +woal_set_drvdbg(moal_private *priv, t_u32 drvdbg) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *misc = NULL; + int ret = 0; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + LEAVE(); + return -ENOMEM; + } + + misc = (mlan_ds_misc_cfg *)req->pbuf; + misc->sub_command = MLAN_OID_MISC_DRVDBG; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = MLAN_ACT_SET; + misc->param.drvdbg = drvdbg; + + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + + if (ret != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} +#endif + +/** + * @brief Mgmt frame forward registration + * + * @param priv A pointer to moal_private structure + * @param action Action: set or get + * @param pmgmt_subtype_mask A Pointer to mgmt frame subtype mask + * @param wait_option wait option (MOAL_WAIT or MOAL_NO_WAIT) + * + * @return 0 --success, otherwise fail + */ +int +woal_reg_rx_mgmt_ind(moal_private *priv, t_u16 action, + t_u32 *pmgmt_subtype_mask, t_u8 wait_option) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *misc = NULL; + int ret = 0; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + LEAVE(); + return -ENOMEM; + } + + misc = (mlan_ds_misc_cfg *)req->pbuf; + misc->sub_command = MLAN_OID_MISC_RX_MGMT_IND; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = action; + misc->param.mgmt_subtype_mask = *pmgmt_subtype_mask; + if (req->action == MLAN_ACT_SET) + memcpy(&misc->param.mgmt_subtype_mask, + pmgmt_subtype_mask, + sizeof(misc->param.mgmt_subtype_mask)); + + ret = woal_request_ioctl(priv, req, wait_option); + + if (req->action == MLAN_ACT_GET) + memcpy(pmgmt_subtype_mask, &misc->param.mgmt_subtype_mask, + sizeof(misc->param.mgmt_subtype_mask)); + + if (ret != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Transmit beamforming capabilities + * + * @param priv A pointer to moal_private structure + * @param action Action: set or get + * @param tx_bf_cap A pointer to tx_buf_cap buffer + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_set_get_tx_bf_cap(moal_private *priv, t_u16 action, t_u32 *tx_bf_cap) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *bf_cfg = NULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (!tx_bf_cap) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + bf_cfg = (mlan_ds_11n_cfg *)req->pbuf; + req->req_id = MLAN_IOCTL_11N_CFG; + bf_cfg->sub_command = MLAN_OID_11N_CFG_TX_BF_CAP; + req->action = action; + if (action == MLAN_ACT_SET) + bf_cfg->param.tx_bf_cap = *tx_bf_cap; + + /* Send IOCTL request to MLAN */ + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (ret != MLAN_STATUS_SUCCESS) { + goto done; + } + + if (action == MLAN_ACT_GET) + *tx_bf_cap = bf_cfg->param.tx_bf_cap; + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Transmit beamforming configuration + * + * @param priv A pointer to moal_private structure + * @param action Action: set or get + * @param tx_bf_cfg A pointer to tx_bf_cfg structure + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_set_get_tx_bf_cfg(moal_private *priv, t_u16 action, + mlan_ds_11n_tx_bf_cfg *tx_bf_cfg) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *bf_cfg = NULL; + + ENTER(); + + /* Sanity test */ + if (tx_bf_cfg == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + bf_cfg = (mlan_ds_11n_cfg *)req->pbuf; + req->req_id = MLAN_IOCTL_11N_CFG; + bf_cfg->sub_command = MLAN_OID_11N_CFG_TX_BF_CFG; + + req->action = action; + memcpy(&bf_cfg->param.tx_bf, tx_bf_cfg, sizeof(mlan_ds_11n_tx_bf_cfg)); + + /* Send IOCTL request to MLAN */ + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + + if (action == MLAN_ACT_GET) + memcpy(tx_bf_cfg, &bf_cfg->param.tx_bf, + sizeof(mlan_ds_11n_tx_bf_cfg)); + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Handle ioctl resp + * + * @param priv Pointer to moal_private structure + * @param req Pointer to mlan_ioctl_req structure + * + * @return N/A + */ +void +woal_process_ioctl_resp(moal_private *priv, mlan_ioctl_req *req) +{ + ENTER(); + + if (priv == NULL) { + LEAVE(); + return; + } + switch (req->req_id) { + case MLAN_IOCTL_GET_INFO: +#ifdef STA_WEXT +#ifdef STA_SUPPORT + if (IS_STA_WEXT(cfg80211_wext) && + GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) + woal_ioctl_get_info_resp(priv, + (mlan_ds_get_info *)req->pbuf); +#endif +#endif +#ifdef UAP_WEXT +#ifdef UAP_SUPPORT + if (IS_UAP_WEXT(cfg80211_wext) && + GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) + woal_ioctl_get_uap_info_resp(priv, + (mlan_ds_get_info *)req-> + pbuf); +#endif +#endif + break; +#ifdef STA_WEXT +#ifdef STA_SUPPORT + case MLAN_IOCTL_BSS: + if (IS_STA_WEXT(cfg80211_wext) && + GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) + woal_ioctl_get_bss_resp(priv, (mlan_ds_bss *)req->pbuf); + break; +#endif +#endif + default: + break; + } + + LEAVE(); + return; +} + +/** + * @brief Get PM info + * + * @param priv A pointer to moal_private structure + * @param pm_info A pointer to mlan_ds_ps_info structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_get_pm_info(moal_private *priv, mlan_ds_ps_info *pm_info) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_pm_cfg *pmcfg = NULL; + mlan_ioctl_req *req = NULL; + + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); + if (req == NULL) { + PRINTM(MERROR, "Fail to alloc mlan_ds_pm_cfg buffer\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + pmcfg = (mlan_ds_pm_cfg *)req->pbuf; + pmcfg->sub_command = MLAN_OID_PM_INFO; + req->req_id = MLAN_IOCTL_PM_CFG; + req->action = MLAN_ACT_GET; + + /* Send IOCTL request to MLAN */ + ret = woal_request_ioctl(priv, req, MOAL_CMD_WAIT); + if (ret == MLAN_STATUS_SUCCESS) { + if (pm_info) { + memcpy(pm_info, &pmcfg->param.ps_info, + sizeof(mlan_ds_ps_info)); + } + } +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Get Deep Sleep + * + * @param priv Pointer to the moal_private driver data struct + * @param data Pointer to return deep_sleep setting + * + * @return 0 --success, otherwise fail + */ +int +woal_get_deep_sleep(moal_private *priv, t_u32 *data) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_pm_cfg *pm = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); + if (req == NULL) { + LEAVE(); + return -ENOMEM; + } + pm = (mlan_ds_pm_cfg *)req->pbuf; + pm->sub_command = MLAN_OID_PM_CFG_DEEP_SLEEP; + req->req_id = MLAN_IOCTL_PM_CFG; + + req->action = MLAN_ACT_GET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + *data = pm->param.auto_deep_sleep.auto_ds; + *(data + 1) = pm->param.auto_deep_sleep.idletime; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set Deep Sleep + * + * @param priv Pointer to the moal_private driver data struct + * @param wait_option wait option + * @param bdeep_sleep TRUE--enalbe deepsleep, FALSE--disable deepsleep + * @param idletime Idle time for optimized PS API + * + * @return 0 --success, otherwise fail + */ +int +woal_set_deep_sleep(moal_private *priv, t_u8 wait_option, BOOLEAN bdeep_sleep, + t_u16 idletime) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_pm_cfg *pm = NULL; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); + if (req == NULL) { + LEAVE(); + return -ENOMEM; + } + pm = (mlan_ds_pm_cfg *)req->pbuf; + pm->sub_command = MLAN_OID_PM_CFG_DEEP_SLEEP; + req->req_id = MLAN_IOCTL_PM_CFG; + + req->action = MLAN_ACT_SET; + if (bdeep_sleep == MTRUE) { + PRINTM(MIOCTL, "Deep Sleep: sleep\n"); + pm->param.auto_deep_sleep.auto_ds = DEEP_SLEEP_ON; + if (idletime) + pm->param.auto_deep_sleep.idletime = idletime; + ret = woal_request_ioctl(priv, req, wait_option); + if (ret != MLAN_STATUS_SUCCESS && ret != MLAN_STATUS_PENDING) { + ret = -EFAULT; + goto done; + } + } else { + PRINTM(MIOCTL, "%lu : Deep Sleep: wakeup\n", jiffies); + pm->param.auto_deep_sleep.auto_ds = DEEP_SLEEP_OFF; + ret = woal_request_ioctl(priv, req, wait_option); + if (ret != MLAN_STATUS_SUCCESS && ret != MLAN_STATUS_PENDING) { + ret = -EFAULT; + goto done; + } + } +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +extern int woal_11h_cancel_chan_report_ioctl(moal_private *priv, + t_u8 wait_option); +/** + * @brief Cancel CAC period block + * + * @param priv A pointer to moal_private structure + * + * @return N/A + */ +void +woal_cancel_cac_block(moal_private *priv) +{ + ENTER(); + /* if during CAC period, wake up wait queue */ + if (priv->phandle->cac_period == MTRUE) { + /* Make sure Chan Report is cancelled */ + woal_11h_cancel_chan_report_ioctl(priv, MOAL_CMD_WAIT); + priv->phandle->cac_period = MFALSE; + priv->phandle->meas_start_jiffies = 0; + if (priv->phandle->delay_bss_start == MTRUE) + priv->phandle->delay_bss_start = MFALSE; + if (priv->phandle->meas_wait_q_woken == MFALSE) { + priv->phandle->meas_wait_q_woken = MTRUE; + wake_up_interruptible(&priv->phandle->meas_wait_q); + } + } + LEAVE(); +} + +/** MEAS report timeout value in seconds */ + +/** + * @brief Issue MLAN_OID_11H_CHANNEL_CHECK ioctl + * + * @param priv Pointer to the moal_private driver data struct + * @param wait_option wait option + * + * @return 0 --success, otherwise fail + */ +int +woal_11h_channel_check_ioctl(moal_private *priv, t_u8 wait_option) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_11h_cfg *ds_11hcfg = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (woal_is_any_interface_active(priv->phandle)) { + /* When any other interface is active Get rid of CAC timer when + drcs is disabled */ + t_u16 enable = 0; + ret = woal_mc_policy_cfg(priv, &enable, wait_option, + MLAN_ACT_GET); + if (!enable) { + LEAVE(); + return status; + } + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11h_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + ds_11hcfg = (mlan_ds_11h_cfg *)req->pbuf; + + ds_11hcfg->sub_command = MLAN_OID_11H_CHANNEL_CHECK; + req->req_id = MLAN_IOCTL_11H_CFG; + req->action = MLAN_ACT_SET; + /* Send Channel Check command and wait until the report is ready */ + status = woal_request_ioctl(priv, req, wait_option); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* set flag from here */ + priv->phandle->cac_period = MTRUE; + priv->phandle->meas_start_jiffies = jiffies; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Issue MLAN_OID_11H_CHAN_REPORT_REQUEST ioctl to cancel dozer + * + * @param priv Pointer to the moal_private driver data struct + * @param wait_option wait option + * + * @return 0 --success, otherwise fail + */ +int +woal_11h_cancel_chan_report_ioctl(moal_private *priv, t_u8 wait_option) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_11h_cfg *ds_11hcfg = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11h_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + ds_11hcfg = (mlan_ds_11h_cfg *)req->pbuf; + + ds_11hcfg->sub_command = MLAN_OID_11H_CHAN_REPORT_REQUEST; + req->req_id = MLAN_IOCTL_11H_CFG; + req->action = MLAN_ACT_SET; + ds_11hcfg->param.chan_rpt_req.millisec_dwell_time = 0; + /* Send Channel Check command and wait until the report is ready */ + status = woal_request_ioctl(priv, req, wait_option); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* set flag from here */ + priv->phandle->cac_period = MTRUE; + priv->phandle->meas_start_jiffies = jiffies; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +#if defined(WIFI_DIRECT_SUPPORT) +/** + * @brief set/get wifi direct mode + * + * @param priv A pointer to moal_private structure + * @param action set or get + * @param mode A pointer to wifi direct mode + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_wifi_direct_mode_cfg(moal_private *priv, t_u16 action, t_u16 *mode) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ioctl_req *req = NULL; + mlan_ds_bss *bss = NULL; + + ENTER(); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_WIFI_DIRECT_MODE; + req->req_id = MLAN_IOCTL_BSS; + + req->action = action; + if (action == MLAN_ACT_SET) + bss->param.wfd_mode = *mode; + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (ret == MLAN_STATUS_SUCCESS) { + *mode = bss->param.wfd_mode; + PRINTM(MIOCTL, "ACT=%d, wifi_direct_mode=%d\n", action, *mode); + } +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief set remain channel + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param pchan A pointer to mlan_ds_remain_chan structure + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_set_remain_channel_ioctl(moal_private *priv, t_u8 wait_option, + mlan_ds_remain_chan *pchan) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ioctl_req *req = NULL; + mlan_ds_radio_cfg *radio_cfg = NULL; + + ENTER(); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_radio_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + radio_cfg = (mlan_ds_radio_cfg *)req->pbuf; + radio_cfg->sub_command = MLAN_OID_REMAIN_CHAN_CFG; + req->req_id = MLAN_IOCTL_RADIO_CFG; + + req->action = MLAN_ACT_SET; + memcpy(&radio_cfg->param.remain_chan, pchan, + sizeof(mlan_ds_remain_chan)); + ret = woal_request_ioctl(priv, req, wait_option); + if (ret == MLAN_STATUS_SUCCESS) { + memcpy(pchan, &radio_cfg->param.remain_chan, + sizeof(mlan_ds_remain_chan)); + } +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set p2p config + * + * @param priv A pointer to moal_private structure + * @param action Action set or get + * @param p2p_config A pointer to mlan_ds_wifi_direct_config structure + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_p2p_config(moal_private *priv, t_u32 action, + mlan_ds_wifi_direct_config *p2p_config) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *misc_cfg = NULL; + + ENTER(); + if (!p2p_config) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + misc_cfg = (mlan_ds_misc_cfg *)req->pbuf; + misc_cfg->sub_command = MLAN_OID_MISC_WIFI_DIRECT_CONFIG; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = action; + memcpy(&misc_cfg->param.p2p_config, p2p_config, + sizeof(mlan_ds_wifi_direct_config)); + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (ret == MLAN_STATUS_SUCCESS) { + if (action == MLAN_ACT_GET) + memcpy(p2p_config, &misc_cfg->param.p2p_config, + sizeof(mlan_ds_wifi_direct_config)); + } +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} +#endif /* WIFI_DIRECT_SUPPORT */ + +#ifdef STA_SUPPORT +/** + * @brief Get RSSI info + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param signal A pointer tp mlan_ds_get_signal structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_get_signal_info(moal_private *priv, t_u8 wait_option, + mlan_ds_get_signal *signal) +{ + int ret = 0; + mlan_ds_get_info *info = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + info = (mlan_ds_get_info *)req->pbuf; + info->sub_command = MLAN_OID_GET_SIGNAL; + info->param.signal.selector = ALL_RSSI_INFO_MASK; + req->req_id = MLAN_IOCTL_GET_INFO; + req->action = MLAN_ACT_GET; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); + if (status == MLAN_STATUS_SUCCESS) { + if (signal) + memcpy(signal, &info->param.signal, + sizeof(mlan_ds_get_signal)); +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) { + if (info->param.signal.selector & BCN_RSSI_AVG_MASK) + priv->w_stats.qual.level = + info->param.signal.bcn_rssi_avg; + if (info->param.signal.selector & BCN_NF_AVG_MASK) + priv->w_stats.qual.noise = + info->param.signal.bcn_nf_avg; + } +#endif + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Get scan table + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param scan_resp A pointer to mlan_scan_resp structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_get_scan_table(moal_private *priv, t_u8 wait_option, + mlan_scan_resp *scan_resp) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_scan *scan = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_scan)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + scan = (mlan_ds_scan *)req->pbuf; + scan->sub_command = MLAN_OID_SCAN_NORMAL; + req->req_id = MLAN_IOCTL_SCAN; + req->action = MLAN_ACT_GET; + memcpy((void *)&scan->param.scan_resp, (void *)scan_resp, + sizeof(mlan_scan_resp)); + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); + if (status == MLAN_STATUS_SUCCESS) { + if (scan_resp) { + memcpy(scan_resp, &scan->param.scan_resp, + sizeof(mlan_scan_resp)); + } + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Request a scan + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param req_ssid A pointer to mlan_802_11_ssid structure + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_request_scan(moal_private *priv, + t_u8 wait_option, mlan_802_11_ssid *req_ssid) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + moal_handle *handle = priv->phandle; + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_scan *scan = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + if (MOAL_ACQ_SEMAPHORE_BLOCK(&handle->async_sem)) { + PRINTM(MERROR, "Acquire semaphore error, request_scan\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + handle->scan_pending_on_block = MTRUE; + + /* Allocate an IOCTL request buffer */ + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_scan)); + if (ioctl_req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + scan = (mlan_ds_scan *)ioctl_req->pbuf; + + if (req_ssid && req_ssid->ssid_len != 0) { + /* Specific SSID scan */ + ioctl_req->req_id = MLAN_IOCTL_SCAN; + ioctl_req->action = MLAN_ACT_SET; + + scan->sub_command = MLAN_OID_SCAN_SPECIFIC_SSID; + + memcpy(scan->param.scan_req.scan_ssid.ssid, + req_ssid->ssid, + MIN(MLAN_MAX_SSID_LENGTH, req_ssid->ssid_len)); + scan->param.scan_req.scan_ssid.ssid_len = + MIN(MLAN_MAX_SSID_LENGTH, req_ssid->ssid_len); + } else { + /* Normal scan */ + ioctl_req->req_id = MLAN_IOCTL_SCAN; + ioctl_req->action = MLAN_ACT_SET; + + scan->sub_command = MLAN_OID_SCAN_NORMAL; + } + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, ioctl_req, wait_option); + + if (status == MLAN_STATUS_FAILURE) { + ret = MLAN_STATUS_FAILURE; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + + if (ret == MLAN_STATUS_FAILURE) { + handle->scan_pending_on_block = MFALSE; + MOAL_REL_SEMAPHORE(&handle->async_sem); + } + LEAVE(); + return ret; +} + +/** + * @brief Change Adhoc Channel + * + * @param priv A pointer to moal_private structure + * @param channel The channel to be set. + * @param wait_option wait_option + * + * @return MLAN_STATUS_SUCCESS--success, MLAN_STATUS_FAILURE--fail + */ +mlan_status +woal_change_adhoc_chan(moal_private *priv, int channel, t_u8 wait_option) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_bss_info bss_info; + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *req = NULL; + + ENTER(); + + memset(&bss_info, 0, sizeof(bss_info)); + + /* Get BSS information */ + if (MLAN_STATUS_SUCCESS != + woal_get_bss_info(priv, wait_option, &bss_info)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + if (bss_info.bss_mode == MLAN_BSS_MODE_INFRA) { + ret = MLAN_STATUS_SUCCESS; + goto done; + } + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Get current channel */ + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_IBSS_CHANNEL; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_GET; + + /* Send IOCTL request to MLAN */ + ret = woal_request_ioctl(priv, req, wait_option); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + + if (bss->param.bss_chan.channel == (unsigned int)channel) { + ret = MLAN_STATUS_SUCCESS; + goto done; + } + PRINTM(MINFO, "Updating Channel from %d to %d\n", + (int)bss->param.bss_chan.channel, channel); + + if (bss_info.media_connected != MTRUE) { + ret = MLAN_STATUS_SUCCESS; + goto done; + } + + /* Do disonnect */ + bss->sub_command = MLAN_OID_BSS_STOP; + memset((t_u8 *)&bss->param.bssid, 0, ETH_ALEN); + + /* Send IOCTL request to MLAN */ + ret = woal_request_ioctl(priv, req, wait_option); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + + /* Do specific SSID scanning */ + if (MLAN_STATUS_SUCCESS != + woal_request_scan(priv, wait_option, &bss_info.ssid)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + /* Start/Join Adhoc network */ + bss->sub_command = MLAN_OID_BSS_START; + memset(&bss->param.ssid_bssid, 0, sizeof(mlan_ssid_bssid)); + memcpy(&bss->param.ssid_bssid.ssid, &bss_info.ssid, + sizeof(mlan_802_11_ssid)); + + /* Send IOCTL request to MLAN */ + ret = woal_request_ioctl(priv, req, wait_option); + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Find the best network to associate + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param ssid_bssid A pointer to mlan_ssid_bssid structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_find_best_network(moal_private *priv, t_u8 wait_option, + mlan_ssid_bssid *ssid_bssid) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_bss *bss = NULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u8 *mac = 0; + + ENTER(); + + if (!ssid_bssid) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + bss = (mlan_ds_bss *)req->pbuf; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_GET; + bss->sub_command = MLAN_OID_BSS_FIND_BSS; + + memcpy(&bss->param.ssid_bssid, ssid_bssid, sizeof(mlan_ssid_bssid)); + + /* Send IOCTL request to MLAN */ + ret = woal_request_ioctl(priv, req, wait_option); + if (ret == MLAN_STATUS_SUCCESS) { + memcpy(ssid_bssid, &bss->param.ssid_bssid, + sizeof(mlan_ssid_bssid)); + mac = (t_u8 *)&ssid_bssid->bssid; + PRINTM(MINFO, "Find network: ssid=%s, " MACSTR ", idx=%d\n", + ssid_bssid->ssid.ssid, MAC2STR(mac), + (int)ssid_bssid->idx); + } + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Check if AP channel is valid for STA Region + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param ssid_bssid A pointer to mlan_ssid_bssid structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_11d_check_ap_channel(moal_private *priv, t_u8 wait_option, + mlan_ssid_bssid *ssid_bssid) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_bss *bss = NULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u8 *mac = 0; + + ENTER(); + + if (!ssid_bssid) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + bss = (mlan_ds_bss *)req->pbuf; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_GET; + bss->sub_command = MLAN_OID_BSS_11D_CHECK_CHANNEL; + + memcpy(&bss->param.ssid_bssid, ssid_bssid, sizeof(mlan_ssid_bssid)); + + mac = (t_u8 *)&ssid_bssid->bssid; + PRINTM(MINFO, "ssid=%s, " MACSTR ", idx=%d\n", + ssid_bssid->ssid.ssid, MAC2STR(mac), (int)ssid_bssid->idx); + + /* Send IOCTL request to MLAN */ + ret = woal_request_ioctl(priv, req, wait_option); + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Get authentication mode + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param auth_mode A pointer to authentication mode + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_get_auth_mode(moal_private *priv, t_u8 wait_option, t_u32 *auth_mode) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_AUTH_MODE; + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); + if (status == MLAN_STATUS_SUCCESS && auth_mode) + *auth_mode = sec->param.auth_mode; +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Get encrypt mode + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param encrypt_mode A pointer to encrypt mode + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_get_encrypt_mode(moal_private *priv, t_u8 wait_option, t_u32 *encrypt_mode) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_MODE; + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); + if (status == MLAN_STATUS_SUCCESS && encrypt_mode) + *encrypt_mode = sec->param.encrypt_mode; +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Get WPA enable + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param enable A pointer to wpa enable status + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_get_wpa_enable(moal_private *priv, t_u8 wait_option, t_u32 *enable) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_WPA_ENABLED; + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); + if (status == MLAN_STATUS_SUCCESS && enable) + *enable = sec->param.wpa_enabled; +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Set authentication mode + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param auth_mode Authentication mode + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_set_auth_mode(moal_private *priv, t_u8 wait_option, t_u32 auth_mode) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_AUTH_MODE; + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_SET; + sec->param.auth_mode = auth_mode; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Set encrypt mode + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param encrypt_mode Encryption mode + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_set_encrypt_mode(moal_private *priv, t_u8 wait_option, t_u32 encrypt_mode) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_MODE; + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_SET; + sec->param.encrypt_mode = encrypt_mode; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Set wpa enable + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param enable MTRUE or MFALSE + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_set_wpa_enable(moal_private *priv, t_u8 wait_option, t_u32 enable) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_WPA_ENABLED; + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_SET; + sec->param.wpa_enabled = enable; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief enable wep key + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_enable_wep_key(moal_private *priv, t_u8 wait_option) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_SET; + sec->param.encrypt_key.key_disable = MFALSE; + sec->param.encrypt_key.key_index = MLAN_KEY_INDEX_DEFAULT; + sec->param.encrypt_key.is_current_wep_key = MTRUE; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Request user scan + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param scan_cfg A pointer to wlan_user_scan_config structure + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_request_userscan(moal_private *priv, + t_u8 wait_option, wlan_user_scan_cfg *scan_cfg) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_scan *scan = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + moal_handle *handle = priv->phandle; + ENTER(); + + if (MOAL_ACQ_SEMAPHORE_BLOCK(&handle->async_sem)) { + PRINTM(MERROR, "Acquire semaphore error, request_scan\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + handle->scan_pending_on_block = MTRUE; + + /* Allocate an IOCTL request buffer */ + ioctl_req = + woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_scan) + + sizeof(wlan_user_scan_cfg)); + if (ioctl_req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + scan = (mlan_ds_scan *)ioctl_req->pbuf; + scan->sub_command = MLAN_OID_SCAN_USER_CONFIG; + ioctl_req->req_id = MLAN_IOCTL_SCAN; + ioctl_req->action = MLAN_ACT_SET; + memcpy(scan->param.user_scan.scan_cfg_buf, scan_cfg, + sizeof(wlan_user_scan_cfg)); + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, ioctl_req, wait_option); + if (status == MLAN_STATUS_FAILURE) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + + if (ret == MLAN_STATUS_FAILURE) { + handle->scan_pending_on_block = MFALSE; + MOAL_REL_SEMAPHORE(&handle->async_sem); + } + LEAVE(); + return ret; +} + +/** + * @brief woal_get_scan_config + * + * @param priv A pointer to moal_private structure + * @param scan_cfg A pointer to scan_cfg structure + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_get_scan_config(moal_private *priv, mlan_scan_cfg *scan_cfg) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_scan *scan = NULL; + mlan_ioctl_req *req = NULL; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_scan)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + scan = (mlan_ds_scan *)req->pbuf; + scan->sub_command = MLAN_OID_SCAN_CONFIG; + req->req_id = MLAN_IOCTL_SCAN; + req->action = MLAN_ACT_GET; + memset(&scan->param.scan_cfg, 0, sizeof(mlan_scan_cfg)); + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (ret == MLAN_STATUS_SUCCESS && scan_cfg) + memcpy(scan_cfg, &scan->param.scan_cfg, sizeof(mlan_scan_cfg)); + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief set scan time + * + * @param priv A pointer to moal_private structure + * @param active_scan_time Active scan time + * @param passive_scan_time Passive scan time + * @param specific_scan_time Specific scan time + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_set_scan_time(moal_private *priv, t_u16 active_scan_time, + t_u16 passive_scan_time, t_u16 specific_scan_time) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_scan *scan = NULL; + mlan_ioctl_req *req = NULL; + mlan_scan_cfg scan_cfg; + + ENTER(); + + memset(&scan_cfg, 0, sizeof(scan_cfg)); + if (MLAN_STATUS_SUCCESS != woal_get_scan_config(priv, &scan_cfg)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_scan)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + scan = (mlan_ds_scan *)req->pbuf; + scan->sub_command = MLAN_OID_SCAN_CONFIG; + req->req_id = MLAN_IOCTL_SCAN; + req->action = MLAN_ACT_SET; + memset(&scan->param.scan_cfg, 0, sizeof(mlan_scan_cfg)); + scan_cfg.scan_time.active_scan_time = active_scan_time; + scan_cfg.scan_time.specific_scan_time = specific_scan_time; + scan_cfg.scan_time.passive_scan_time = passive_scan_time; + PRINTM(MIOCTL, "Set specific=%d, active=%d, passive=%d\n", + (int)active_scan_time, (int)passive_scan_time, + (int)specific_scan_time); + memcpy(&scan->param.scan_cfg, &scan_cfg, sizeof(mlan_scan_cfg)); + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief request scan + * + * @param priv A pointer to moal_private structure + * @param scan_cfg A pointer to wlan_user_scan_cfg structure + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_do_scan(moal_private *priv, wlan_user_scan_cfg *scan_cfg) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + moal_handle *handle = priv->phandle; + + ENTER(); + if (handle->scan_pending_on_block == MTRUE) { + PRINTM(MINFO, "scan already in processing...\n"); + LEAVE(); + return ret; + } +#ifdef REASSOCIATION + if (MOAL_ACQ_SEMAPHORE_BLOCK(&handle->reassoc_sem)) { + PRINTM(MERROR, "Acquire semaphore error, woal_do_combo_scan\n"); + LEAVE(); + return -EBUSY; + } +#endif /* REASSOCIATION */ + priv->report_scan_result = MTRUE; + + if (!scan_cfg) + ret = woal_request_scan(priv, MOAL_NO_WAIT, NULL); + else + ret = woal_request_userscan(priv, MOAL_NO_WAIT, scan_cfg); + +#ifdef REASSOCIATION + MOAL_REL_SEMAPHORE(&handle->reassoc_sem); +#endif + LEAVE(); + return ret; +} + +/** + * @brief Cancel pending scan + * + * @param priv A pointer to moal_private structure + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_cancel_scan(moal_private *priv, t_u8 wait_option) +{ + mlan_ioctl_req *req = NULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + moal_handle *handle = priv->phandle; +#ifdef STA_CFG80211 + unsigned long flags; + moal_private *scan_priv = handle->scan_priv; +#endif + + /* If scan is in process, cancel the scan command */ + if (!handle->scan_pending_on_block) + return ret; + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_scan)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + req->req_id = MLAN_IOCTL_SCAN; + req->action = MLAN_ACT_SET; + ((mlan_ds_scan *)req->pbuf)->sub_command = MLAN_OID_SCAN_CANCEL; + ret = woal_request_ioctl(priv, req, wait_option); + handle->scan_pending_on_block = MFALSE; + MOAL_REL_SEMAPHORE(&handle->async_sem); +#ifdef STA_CFG80211 + spin_lock_irqsave(&handle->scan_req_lock, flags); + if (IS_STA_CFG80211(cfg80211_wext) && handle->scan_request) { + /** some supplicant can not handle SCAN abort event */ + if (scan_priv->bss_type == MLAN_BSS_TYPE_STA) + cfg80211_scan_done(handle->scan_request, MTRUE); + else + cfg80211_scan_done(handle->scan_request, MFALSE); + handle->scan_request = NULL; + handle->scan_priv = NULL; + } + spin_unlock_irqrestore(&handle->scan_req_lock, flags); +#endif +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + return ret; +} + +/** + * @brief find ssid in scan_table + * + * @param priv A pointer to moal_private + * @param ssid_bssid A pointer to mlan_ssid_bssid structure + * + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_FAILURE + */ +int +woal_find_essid(moal_private *priv, mlan_ssid_bssid *ssid_bssid, + t_u8 wait_option) +{ + int ret = 0; + mlan_scan_resp scan_resp; + struct timeval t; + ENTER(); + + if (MLAN_STATUS_SUCCESS != + woal_get_scan_table(priv, wait_option, &scan_resp)) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } +#ifdef STA_CFG80211 + if (priv->ft_pre_connect) { + /** skip check the scan age out */ + ret = woal_find_best_network(priv, wait_option, ssid_bssid); + LEAVE(); + return ret; + } +#endif + do_gettimeofday(&t); +/** scan result timeout value */ +#define SCAN_RESULT_AGEOUT 10 + if (t.tv_sec > (scan_resp.age_in_secs + SCAN_RESULT_AGEOUT)) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + ret = woal_find_best_network(priv, wait_option, ssid_bssid); + LEAVE(); + return ret; +} + +/** + * @brief Request user scan + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param scan_cfg A pointer to wlan_bgscan_cfg structure + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_request_bgscan(moal_private *priv, + t_u8 wait_option, wlan_bgscan_cfg *scan_cfg) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_scan *scan = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + ioctl_req = + woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_scan) + + sizeof(wlan_bgscan_cfg)); + if (ioctl_req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + scan = (mlan_ds_scan *)ioctl_req->pbuf; + scan->sub_command = MLAN_OID_SCAN_BGSCAN_CONFIG; + ioctl_req->req_id = MLAN_IOCTL_SCAN; + ioctl_req->action = MLAN_ACT_SET; + memcpy(scan->param.user_scan.scan_cfg_buf, scan_cfg, + sizeof(wlan_bgscan_cfg)); + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, ioctl_req, wait_option); + if (status == MLAN_STATUS_FAILURE) { + ret = MLAN_STATUS_FAILURE; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief set bgscan config + * + * @param priv A pointer to moal_private structure + * @param buf A pointer to scan command buf + * @param length buf length + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_set_bg_scan(moal_private *priv, char *buf, int length) +{ + t_u8 *ptr = buf + strlen("BGSCAN-CONFIG") + 1; + int buf_left = length - (strlen("BGSCAN-CONFIG") + 1); + int band = 0; + int num_ssid = 0; + int ssid_len = 0; + mlan_status ret = MLAN_STATUS_FAILURE; + + ENTER(); + memset(&priv->scan_cfg, 0, sizeof(priv->scan_cfg)); + priv->scan_cfg.report_condition = + BG_SCAN_SSID_MATCH | BG_SCAN_WAIT_ALL_CHAN_DONE; + while (buf_left >= 2) { + switch (*ptr) { + case WEXT_CSCAN_SSID_SECTION: + ssid_len = *(ptr + 1); + if ((buf_left < (ssid_len + 2)) || + (ssid_len > MLAN_MAX_SSID_LENGTH)) { + PRINTM(MERROR, + "Invalid ssid, buf_left=%d, ssid_len=%d\n", + buf_left, ssid_len); + buf_left = 0; + break; + } + if (ssid_len && + (num_ssid < (MRVDRV_MAX_SSID_LIST_LENGTH - 1))) { + strncpy(priv->scan_cfg.ssid_list[num_ssid].ssid, + ptr + 2, ssid_len); + priv->scan_cfg.ssid_list[num_ssid].max_len = 0; + PRINTM(MIOCTL, "BG scan: ssid=%s\n", + priv->scan_cfg.ssid_list[num_ssid].ssid); + num_ssid++; + } + buf_left -= ssid_len + 2; + ptr += ssid_len + 2; + break; + case WEXT_BGSCAN_RSSI_SECTION: + priv->scan_cfg.report_condition = + BG_SCAN_SSID_RSSI_MATCH | + BG_SCAN_WAIT_ALL_CHAN_DONE; + priv->scan_cfg.rssi_threshold = ptr[1]; + PRINTM(MIOCTL, "BG scan: rssi_threshold=%d\n", + (int)priv->scan_cfg.rssi_threshold); + ptr += 2; + buf_left -= 2; + break; + case WEXT_BGSCAN_REPEAT_SECTION: + priv->scan_cfg.repeat_count = (t_u16)ptr[1]; + PRINTM(MIOCTL, "BG scan: repeat_count=%d\n", + (int)priv->scan_cfg.repeat_count); + ptr += 2; + buf_left -= 2; + break; + case WEXT_BGSCAN_INTERVAL_SECTION: + if (buf_left < 3) { + PRINTM(MERROR, + "Invalid scan_interval, buf_left=%d\n", + buf_left); + buf_left = 0; + break; + } + priv->scan_cfg.scan_interval = + (ptr[2] << 8 | ptr[1]) * 1000; + PRINTM(MIOCTL, "BG scan: scan_interval=%d\n", + (int)priv->scan_cfg.scan_interval); + ptr += 3; + buf_left -= 3; + break; + default: + buf_left = 0; + break; + } + } + /** set bgscan when ssid_num > 0 */ + if (num_ssid) { + if (MLAN_STATUS_SUCCESS != woal_get_band(priv, &band)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + switch (band) { + case WIFI_FREQUENCY_BAND_2GHZ: + priv->scan_cfg.chan_list[0].radio_type = + 0 | BAND_SPECIFIED; + break; + case WIFI_FREQUENCY_BAND_5GHZ: + priv->scan_cfg.chan_list[0].radio_type = + 1 | BAND_SPECIFIED; + break; + default: + break; + } + priv->scan_cfg.bss_type = MLAN_BSS_MODE_INFRA; + priv->scan_cfg.action = BG_SCAN_ACT_SET; + priv->scan_cfg.enable = MTRUE; + ret = woal_request_bgscan(priv, MOAL_IOCTL_WAIT, + &priv->scan_cfg); + } +done: + LEAVE(); + return ret; +} + +#ifdef STA_CFG80211 +/** + * @brief set bgscan and new rssi_low_threshold + * + * @param priv A pointer to moal_private structure + * @param set_rssi flag for set rssi_low_threshold + * + * @return N/A + */ +void +woal_config_bgscan_and_rssi(moal_private *priv, t_u8 set_rssi) +{ + char rssi_low[10]; + mlan_bss_info bss_info; + int band = 0; + + ENTER(); + memset(&bss_info, 0, sizeof(bss_info)); + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + if (!bss_info.media_connected) { + PRINTM(MIOCTL, "We already lost connection\n"); + LEAVE(); + return; + } + memset(&priv->scan_cfg, 0, sizeof(priv->scan_cfg)); + strncpy(priv->scan_cfg.ssid_list[0].ssid, bss_info.ssid.ssid, + bss_info.ssid.ssid_len); + priv->scan_cfg.ssid_list[0].max_len = 0; + + priv->scan_cfg.report_condition = + BG_SCAN_SSID_RSSI_MATCH | BG_SCAN_WAIT_ALL_CHAN_DONE; + priv->scan_cfg.rssi_threshold = priv->rssi_low - RSSI_HYSTERESIS; + priv->scan_cfg.repeat_count = DEF_REPEAT_COUNT; + priv->scan_cfg.scan_interval = MIN_BGSCAN_INTERVAL; + woal_get_band(priv, &band); + switch (band) { + case WIFI_FREQUENCY_BAND_2GHZ: + priv->scan_cfg.chan_list[0].radio_type = 0 | BAND_SPECIFIED; + break; + case WIFI_FREQUENCY_BAND_5GHZ: + priv->scan_cfg.chan_list[0].radio_type = 1 | BAND_SPECIFIED; + break; + default: + break; + } + priv->scan_cfg.bss_type = MLAN_BSS_MODE_INFRA; + priv->scan_cfg.action = BG_SCAN_ACT_SET; + priv->scan_cfg.enable = MTRUE; + woal_request_bgscan(priv, MOAL_NO_WAIT, &priv->scan_cfg); + if (set_rssi && + ((priv->rssi_low + RSSI_HYSTERESIS) <= LOWEST_RSSI_THRESHOLD)) { + priv->rssi_low += RSSI_HYSTERESIS; + sprintf(rssi_low, "%d", priv->rssi_low); + woal_set_rssi_low_threshold(priv, rssi_low, MOAL_NO_WAIT); + } + LEAVE(); +} +#endif + +/** + * @brief stop bg scan + * + * @param priv A pointer to moal_private structure + * @param wait_option wait option + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_stop_bg_scan(moal_private *priv, t_u8 wait_option) +{ + wlan_bgscan_cfg scan_cfg; + mlan_status ret = MLAN_STATUS_SUCCESS; + ENTER(); + + memset(&scan_cfg, 0, sizeof(scan_cfg)); + scan_cfg.action = BG_SCAN_ACT_SET; + scan_cfg.enable = MFALSE; + ret = woal_request_bgscan(priv, wait_option, &scan_cfg); + + LEAVE(); + return ret; +} + +/** + * @brief set bgscan config + * + * @param handle A pointer to moal_handle structure + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +void +woal_reconfig_bgscan(moal_handle *handle) +{ + int i; + for (i = 0; i < MIN(handle->priv_num, MLAN_MAX_BSS_NUM); i++) { + if (handle->priv[i] && + (GET_BSS_ROLE(handle->priv[i]) == MLAN_BSS_ROLE_STA)) { + if (handle->priv[i]->bg_scan_start && + handle->priv[i]->bg_scan_reported) { + PRINTM(MIOCTL, "Reconfig BGSCAN\n"); + woal_request_bgscan(handle->priv[i], + MOAL_NO_WAIT, + &handle->priv[i]->scan_cfg); + handle->priv[i]->bg_scan_reported = MFALSE; + } + } + } +} + +/** + * @brief set rssi low threshold + * + * @param priv A pointer to moal_private structure + * @param rssi A pointer to low rssi + * @param wait_option Wait option + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_set_rssi_low_threshold(moal_private *priv, char *rssi, t_u8 wait_option) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *misc = NULL; + int low_rssi = 0; + + ENTER(); + if (priv->media_connected == MFALSE) + goto done; + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + misc = (mlan_ds_misc_cfg *)req->pbuf; + req->req_id = MLAN_IOCTL_MISC_CFG; + misc->sub_command = MLAN_OID_MISC_SUBSCRIBE_EVENT; + req->action = MLAN_ACT_SET; + misc->param.subscribe_event.evt_action = SUBSCRIBE_EVT_ACT_BITWISE_SET; + misc->param.subscribe_event.evt_bitmap = SUBSCRIBE_EVT_RSSI_LOW; + misc->param.subscribe_event.evt_bitmap |= SUBSCRIBE_EVT_PRE_BEACON_LOST; + misc->param.subscribe_event.pre_beacon_miss = DEFAULT_PRE_BEACON_MISS; + + if (MLAN_STATUS_SUCCESS != woal_atoi(&low_rssi, rssi)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } +#ifdef STA_CFG80211 + priv->mrvl_rssi_low = low_rssi; +#endif + misc->param.subscribe_event.low_rssi = low_rssi; + misc->param.subscribe_event.low_rssi_freq = 0; + ret = woal_request_ioctl(priv, req, wait_option); + if (ret == MLAN_STATUS_FAILURE) { + PRINTM(MERROR, "request set rssi_low_threshold fail!\n"); + goto done; + } +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +#ifdef STA_CFG80211 +/** + * @brief set rssi low threshold + * + * @param priv A pointer to moal_private structure + * @param event_id event id. + * @param wait_option wait option + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_set_rssi_threshold(moal_private *priv, t_u32 event_id, t_u8 wait_option) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *misc = NULL; + + ENTER(); + if (priv->media_connected == MFALSE) + goto done; + if (priv->mrvl_rssi_low) + goto done; + if (event_id == MLAN_EVENT_ID_FW_BCN_RSSI_LOW) { + if (priv->last_rssi_low < 100) + priv->last_rssi_low += priv->cqm_rssi_hyst; + priv->last_rssi_high = abs(priv->cqm_rssi_thold); + } else if (event_id == MLAN_EVENT_ID_FW_BCN_RSSI_HIGH) { + priv->last_rssi_low = abs(priv->cqm_rssi_thold); + if (priv->last_rssi_high > priv->cqm_rssi_hyst) + priv->last_rssi_high -= priv->cqm_rssi_hyst; + } else { + priv->last_rssi_low = abs(priv->cqm_rssi_thold); + priv->last_rssi_high = abs(priv->cqm_rssi_thold); + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + misc = (mlan_ds_misc_cfg *)req->pbuf; + req->req_id = MLAN_IOCTL_MISC_CFG; + misc->sub_command = MLAN_OID_MISC_SUBSCRIBE_EVENT; + req->action = MLAN_ACT_SET; + if (!event_id && !priv->cqm_rssi_thold && !priv->cqm_rssi_hyst) + misc->param.subscribe_event.evt_action = + SUBSCRIBE_EVT_ACT_BITWISE_CLR; + else + misc->param.subscribe_event.evt_action = + SUBSCRIBE_EVT_ACT_BITWISE_SET; + misc->param.subscribe_event.evt_bitmap = + SUBSCRIBE_EVT_RSSI_LOW | SUBSCRIBE_EVT_RSSI_HIGH; + misc->param.subscribe_event.low_rssi_freq = 0; + misc->param.subscribe_event.low_rssi = priv->last_rssi_low; + misc->param.subscribe_event.high_rssi_freq = 0; + misc->param.subscribe_event.high_rssi = priv->last_rssi_high; + PRINTM(MIOCTL, "rssi_low=%d, rssi_high=%d action=%d\n", + (int)priv->last_rssi_low, (int)priv->last_rssi_high, + misc->param.subscribe_event.evt_action); + ret = woal_request_ioctl(priv, req, wait_option); +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} +#endif + +/** + * @brief Get power mode + * + * @param priv A pointer to moal_private structure + * @param powermode A pointer to powermode buf + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_get_powermode(moal_private *priv, int *powermode) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + int ps_mode; + + ENTER(); + + if (MLAN_STATUS_SUCCESS != + woal_set_get_power_mgmt(priv, MLAN_ACT_GET, &ps_mode, 0, + MOAL_IOCTL_WAIT)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + if (ps_mode) + *powermode = MFALSE; + else + *powermode = MTRUE; + +done: + LEAVE(); + return ret; +} + +/** + * @brief set scan type + * + * @param priv A pointer to moal_private structure + * @param scan_type MLAN_SCAN_TYPE_ACTIVE/MLAN_SCAN_TYPE_PASSIVE + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_set_scan_type(moal_private *priv, t_u32 scan_type) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_scan *scan = NULL; + mlan_ioctl_req *req = NULL; + mlan_scan_cfg scan_cfg; + + ENTER(); + memset(&scan_cfg, 0, sizeof(scan_cfg)); + if (MLAN_STATUS_SUCCESS != woal_get_scan_config(priv, &scan_cfg)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_scan)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + scan = (mlan_ds_scan *)req->pbuf; + scan->sub_command = MLAN_OID_SCAN_CONFIG; + req->req_id = MLAN_IOCTL_SCAN; + req->action = MLAN_ACT_SET; + memset(&scan->param.scan_cfg, 0, sizeof(mlan_scan_cfg)); + scan_cfg.scan_type = scan_type; + PRINTM(MIOCTL, "Set scan_type=%d\n", (int)scan_type); + memcpy(&scan->param.scan_cfg, &scan_cfg, sizeof(mlan_scan_cfg)); + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief enable/disable ext_scan + * + * @param priv A pointer to moal_private structure + * @param enable MTRUE -- enable, MFALSE --disable + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_enable_ext_scan(moal_private *priv, t_u8 enable) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_scan *scan = NULL; + mlan_ioctl_req *req = NULL; + mlan_scan_cfg scan_cfg; + + ENTER(); + memset(&scan_cfg, 0, sizeof(scan_cfg)); + if (MLAN_STATUS_SUCCESS != woal_get_scan_config(priv, &scan_cfg)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_scan)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + scan = (mlan_ds_scan *)req->pbuf; + scan->sub_command = MLAN_OID_SCAN_CONFIG; + req->req_id = MLAN_IOCTL_SCAN; + req->action = MLAN_ACT_SET; + memset(&scan->param.scan_cfg, 0, sizeof(mlan_scan_cfg)); + scan_cfg.ext_scan = enable; + PRINTM(MIOCTL, "Set ext_scan=%d\n", (int)enable); + memcpy(&scan->param.scan_cfg, &scan_cfg, sizeof(mlan_scan_cfg)); + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief set power mode + * + * @param priv A pointer to moal_private structure + * @param powermode A pointer to powermode string. + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_set_powermode(moal_private *priv, char *powermode) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + int disabled; + + ENTER(); + + if (*powermode == '1') { + PRINTM(MIOCTL, "Disable power save\n"); + disabled = 1; + } else if (*powermode == '0') { + PRINTM(MIOCTL, "Enable power save\n"); + disabled = 0; + } else { + PRINTM(MERROR, "unsupported power mode\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + if (MLAN_STATUS_SUCCESS != + woal_set_get_power_mgmt(priv, MLAN_ACT_SET, &disabled, 0, + MOAL_IOCTL_WAIT)) + ret = MLAN_STATUS_FAILURE; + +done: + LEAVE(); + return ret; +} + +/** + * @brief set combo scan + * + * @param priv A pointer to moal_private structure + * @param buf A pointer to scan command buf + * @param length buf length + * + * @return 0 -- success, otherwise fail + */ +int +woal_set_combo_scan(moal_private *priv, char *buf, int length) +{ + int ret = 0; + wlan_user_scan_cfg scan_cfg; + t_u8 *ptr = buf + WEXT_CSCAN_HEADER_SIZE; + int buf_left = length - WEXT_CSCAN_HEADER_SIZE; + int num_ssid = 0; + int num_chan = 0; + int ssid_len = 0; + int i = 0; + t_u16 passive_scan_time = 0; + t_u16 specific_scan_time = 0; + + ENTER(); + memset(&scan_cfg, 0, sizeof(scan_cfg)); + while (buf_left >= 2) { + switch (*ptr) { + case WEXT_CSCAN_SSID_SECTION: + ssid_len = *(ptr + 1); + if ((buf_left < (ssid_len + 2)) || + (ssid_len > MLAN_MAX_SSID_LENGTH)) { + PRINTM(MERROR, + "Invalid ssid, buf_left=%d, ssid_len=%d\n", + buf_left, ssid_len); + buf_left = 0; + break; + } + if (ssid_len && + (num_ssid < (MRVDRV_MAX_SSID_LIST_LENGTH - 1))) { + strncpy(scan_cfg.ssid_list[num_ssid].ssid, + ptr + 2, ssid_len); + scan_cfg.ssid_list[num_ssid].max_len = 0; + PRINTM(MIOCTL, "Combo scan: ssid=%s\n", + scan_cfg.ssid_list[num_ssid].ssid); + num_ssid++; + } + buf_left -= ssid_len + 2; + ptr += ssid_len + 2; + break; + case WEXT_CSCAN_CHANNEL_SECTION: + num_chan = ptr[1]; + if ((buf_left < (num_chan + 2)) || + (num_chan > WLAN_USER_SCAN_CHAN_MAX)) { + PRINTM(MERROR, + "Invalid channel list, buf_left=%d, num_chan=%d\n", + buf_left, num_chan); + buf_left = 0; + break; + } + for (i = 0; i < num_chan; i++) { + scan_cfg.chan_list[i].chan_number = ptr[2 + i]; + PRINTM(MIOCTL, "Combo scan: chan=%d\n", + scan_cfg.chan_list[i].chan_number); + } + buf_left -= 2 + num_chan; + ptr += 2 + num_chan; + break; + case WEXT_CSCAN_PASV_DWELL_SECTION: + if (buf_left < 3) { + PRINTM(MERROR, + "Invalid PASV_DWELL_SECTION, buf_left=%d\n", + buf_left); + buf_left = 0; + break; + } + passive_scan_time = ptr[2] << 8 | ptr[1]; + ptr += 3; + buf_left -= 3; + break; + case WEXT_CSCAN_HOME_DWELL_SECTION: + if (buf_left < 3) { + PRINTM(MERROR, + "Invalid HOME_DWELL_SECTION, buf_left=%d\n", + buf_left); + buf_left = 0; + break; + } + specific_scan_time = ptr[2] << 8 | ptr[1]; + ptr += 3; + buf_left -= 3; + break; + default: + buf_left = 0; + break; + } + } + if (passive_scan_time || specific_scan_time) { + PRINTM(MIOCTL, + "Set passive_scan_time=%d specific_scan_time=%d\n", + passive_scan_time, specific_scan_time); + if (MLAN_STATUS_FAILURE == + woal_set_scan_time(priv, 0, passive_scan_time, + specific_scan_time)) { + ret = -EFAULT; + goto done; + } + } + if (num_ssid || num_chan) { + if (num_ssid) { + /* Add broadcast scan to ssid_list */ + scan_cfg.ssid_list[num_ssid].max_len = 0xff; + if (priv->scan_type == MLAN_SCAN_TYPE_PASSIVE) + woal_set_scan_type(priv, MLAN_SCAN_TYPE_ACTIVE); + } + if (MLAN_STATUS_FAILURE == woal_do_scan(priv, &scan_cfg)) + ret = -EFAULT; + if (num_ssid && (priv->scan_type == MLAN_SCAN_TYPE_PASSIVE)) + woal_set_scan_type(priv, MLAN_SCAN_TYPE_PASSIVE); + } else { + /* request broadcast scan */ + if (MLAN_STATUS_FAILURE == woal_do_scan(priv, NULL)) + ret = -EFAULT; + } +done: + LEAVE(); + return ret; +} + +/** + * @brief Get band + * + * @param priv A pointer to moal_private structure + * @param band A pointer to band buf + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_get_band(moal_private *priv, int *band) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ioctl_req *req = NULL; + mlan_ds_radio_cfg *radio_cfg = NULL; + int support_band = 0; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_radio_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + radio_cfg = (mlan_ds_radio_cfg *)req->pbuf; + radio_cfg->sub_command = MLAN_OID_BAND_CFG; + req->req_id = MLAN_IOCTL_RADIO_CFG; + /* Get config_bands, adhoc_start_band and adhoc_channel values from + MLAN */ + req->action = MLAN_ACT_GET; + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + + if (radio_cfg->param.band_cfg. + config_bands & (BAND_B | BAND_G | BAND_GN)) + support_band |= WIFI_FREQUENCY_BAND_2GHZ; + if (radio_cfg->param.band_cfg.config_bands & (BAND_A | BAND_AN)) + support_band |= WIFI_FREQUENCY_BAND_5GHZ; + *band = support_band; + if (support_band == WIFI_FREQUENCY_ALL_BAND) + *band = WIFI_FREQUENCY_BAND_AUTO; +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief set band + * + * @param priv A pointer to moal_private structure + * @param pband A pointer to band string. + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_set_band(moal_private *priv, char *pband) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + int band = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_radio_cfg *radio_cfg = NULL; + + ENTER(); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_radio_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + radio_cfg = (mlan_ds_radio_cfg *)req->pbuf; + radio_cfg->sub_command = MLAN_OID_BAND_CFG; + req->req_id = MLAN_IOCTL_RADIO_CFG; + + /* Get fw supported values from MLAN */ + req->action = MLAN_ACT_GET; + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + + if (*pband == '0') { + PRINTM(MIOCTL, "Set band to AUTO\n"); + band = radio_cfg->param.band_cfg.fw_bands; +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + if (IS_STA_OR_UAP_CFG80211(cfg80211_wext) && priv->wdev && + priv->wdev->wiphy) { + if (radio_cfg->param.band_cfg.fw_bands & BAND_A) + priv->wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = + &cfg80211_band_5ghz; + priv->wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = + &cfg80211_band_2ghz; + } +#endif + } else if (*pband == '1') { + PRINTM(MIOCTL, "Set band to 5G\n"); + if (!(radio_cfg->param.band_cfg.fw_bands & BAND_A)) { + PRINTM(MERROR, "Don't support 5G band\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + band = BAND_A; + band |= BAND_AN; +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + if (IS_STA_OR_UAP_CFG80211(cfg80211_wext) && priv->wdev && + priv->wdev->wiphy) { + priv->wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = + &cfg80211_band_5ghz; + priv->wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = NULL; + } +#endif + } else if (*pband == '2') { + PRINTM(MIOCTL, "Set band to 2G\n"); + band = BAND_B | BAND_G; + band |= BAND_GN; +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + if (IS_STA_OR_UAP_CFG80211(cfg80211_wext) && priv->wdev && + priv->wdev->wiphy) { + priv->wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = NULL; + priv->wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = + &cfg80211_band_2ghz; + } +#endif + } else { + PRINTM(MERROR, "unsupported band\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + /* Set config_bands to MLAN */ + req->action = MLAN_ACT_SET; + memset(&radio_cfg->param.band_cfg, 0, sizeof(mlan_ds_band_cfg)); + radio_cfg->param.band_cfg.config_bands = band; + radio_cfg->param.band_cfg.adhoc_start_band = band; + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Add RX Filter + * + * @param priv A pointer to moal_private structure + * @param rxfilter A pointer to rxfilter string. + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_add_rxfilter(moal_private *priv, char *rxfilter) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + ENTER(); + /* Android command: "DRIVER RXFILTER-ADD 0" "DRIVER RXFILTER-ADD 1" + "DRIVER RXFILTER-ADD 3" */ + if (*rxfilter == '0') { + PRINTM(MIOCTL, "Add IPV4 multicast filter\n"); + priv->rx_filter |= RX_FILTER_IPV4_MULTICAST; + } else if (*rxfilter == '1') { + PRINTM(MIOCTL, "Add broadcast filter\n"); + priv->rx_filter |= RX_FILTER_BROADCAST; + } else if (*rxfilter == '2') { + PRINTM(MIOCTL, "Add unicast filter\n"); + priv->rx_filter |= RX_FILTER_UNICAST; + } else if (*rxfilter == '3') { + PRINTM(MIOCTL, "Add IPV6 multicast fitler\n"); + priv->rx_filter |= RX_FILTER_IPV6_MULTICAST; + } else { + PRINTM(MERROR, "unsupported rx fitler\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } +done: + LEAVE(); + return ret; +} + +/** + * @brief Remove RX Filter + * + * @param priv A pointer to moal_private structure + * @param rxfilter A pointer to rxfilter string. + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_remove_rxfilter(moal_private *priv, char *rxfilter) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + ENTER(); + if (*rxfilter == '0') { + PRINTM(MIOCTL, "Remove IPV4 multicast filter\n"); + priv->rx_filter &= ~RX_FILTER_IPV4_MULTICAST; + } else if (*rxfilter == '1') { + PRINTM(MIOCTL, "Remove broadcast filter\n"); + priv->rx_filter &= ~RX_FILTER_BROADCAST; + } else if (*rxfilter == '2') { + PRINTM(MIOCTL, "Remove unicast filter\n"); + priv->rx_filter &= ~RX_FILTER_UNICAST; + } else if (*rxfilter == '3') { + PRINTM(MIOCTL, "Remove IPV6 multicast fitler\n"); + priv->rx_filter &= ~RX_FILTER_IPV6_MULTICAST; + } else { + PRINTM(MERROR, "unsupported rx fitler\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } +done: + LEAVE(); + return ret; +} + +/** + * @brief Set/Get WMM IE QoS configuration + * + * @param priv A pointer to moal_private structure + * @param action Action set or get + * @param qos_cfg A pointer to QoS configuration structure + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_priv_qos_cfg(moal_private *priv, t_u32 action, char *qos_cfg) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_wmm_cfg *cfg = NULL; + mlan_ioctl_req *req = NULL; + int qosinfo = 0; + + ENTER(); + + if (qos_cfg == NULL) { + PRINTM(MERROR, "QOS info buffer is null\n"); + return MLAN_STATUS_FAILURE; + } + if ((action == MLAN_ACT_SET) && + (MLAN_STATUS_SUCCESS != woal_atoi(&qosinfo, qos_cfg))) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wmm_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + cfg = (mlan_ds_wmm_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_WMM_CFG_QOS; + req->req_id = MLAN_IOCTL_WMM_CFG; + req->action = action; + if (action == MLAN_ACT_SET) { + cfg->param.qos_cfg = (t_u8)qosinfo; + PRINTM(MIOCTL, "set qosinfo=%d\n", qosinfo); + } + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + + if (action == MLAN_ACT_GET) + *qos_cfg = cfg->param.qos_cfg; +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set sleep period + * + * @param priv A pointer to moal_private structure + * @param psleeppd A pointer to sleep period configuration structure + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_set_sleeppd(moal_private *priv, char *psleeppd) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_pm_cfg *pm_cfg = NULL; + mlan_ioctl_req *req = NULL; + int sleeppd = 0; + + ENTER(); + + if (MLAN_STATUS_SUCCESS != woal_atoi(&sleeppd, psleeppd)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + PRINTM(MIOCTL, "set sleeppd=%d\n", sleeppd); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + pm_cfg = (mlan_ds_pm_cfg *)req->pbuf; + pm_cfg->sub_command = MLAN_OID_PM_CFG_SLEEP_PD; + req->req_id = MLAN_IOCTL_PM_CFG; + if ((sleeppd <= MAX_SLEEP_PERIOD && sleeppd >= MIN_SLEEP_PERIOD) || + (sleeppd == 0) + || (sleeppd == SLEEP_PERIOD_RESERVED_FF) + ) { + req->action = MLAN_ACT_SET; + pm_cfg->param.sleep_period = sleeppd; + } else { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set scan period function + * + * @param priv A pointer to moal_private structure + * @param buf A pointer to scan command buf + * @param length buf length + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +int +woal_set_scan_cfg(moal_private *priv, char *buf, int length) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u8 *ptr = buf + NL80211_SCANCFG_HEADER_SIZE; + int buf_left = length - NL80211_SCANCFG_HEADER_SIZE; + t_u16 active_scan_time = 0; + t_u16 passive_scan_time = 0; + t_u16 specific_scan_time = 0; + + ENTER(); + while (buf_left >= 2) { + switch (*ptr) { + case NL80211_SCANCFG_ACTV_DWELL_SECTION: + if (buf_left < 3) { + PRINTM(MERROR, + "Invalid ACTV_DWELL_SECTION, buf_left=%d\n", + buf_left); + buf_left = 0; + break; + } + active_scan_time = ptr[2] << 8 | ptr[1]; + ptr += 3; + buf_left -= 3; + break; + case NL80211_SCANCFG_PASV_DWELL_SECTION: + if (buf_left < 3) { + PRINTM(MERROR, + "Invalid PASV_DWELL_SECTION, buf_left=%d\n", + buf_left); + buf_left = 0; + break; + } + passive_scan_time = ptr[2] << 8 | ptr[1]; + ptr += 3; + buf_left -= 3; + break; + case NL80211_SCANCFG_SPCF_DWELL_SECTION: + if (buf_left < 3) { + PRINTM(MERROR, + "Invalid SPCF_DWELL_SECTION, buf_left=%d\n", + buf_left); + buf_left = 0; + break; + } + specific_scan_time = ptr[2] << 8 | ptr[1]; + ptr += 3; + buf_left -= 3; + break; + default: + buf_left = 0; + break; + } + } + + if (active_scan_time || passive_scan_time || specific_scan_time) { + PRINTM(MIOCTL, + "Set active_scan_time= %d passive_scan_time=%d specific_scan_time=%d\n", + active_scan_time, passive_scan_time, specific_scan_time); + if (MLAN_STATUS_FAILURE == + woal_set_scan_time(priv, active_scan_time, + passive_scan_time, specific_scan_time)) { + ret = -EFAULT; + } + } + + LEAVE(); + return ret; +} + +/** + * @brief Set Radio On/OFF + * + * @param priv A pointer to moal_private structure + * @param option Radio Option + * + * @return 0 --success, otherwise fail + */ +int +woal_set_radio(moal_private *priv, t_u8 option) +{ + int ret = 0; + mlan_ds_radio_cfg *radio = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + if ((option != 0) && (option != 1)) { + ret = -EINVAL; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_radio_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + radio = (mlan_ds_radio_cfg *)req->pbuf; + radio->sub_command = MLAN_OID_RADIO_CTRL; + req->req_id = MLAN_IOCTL_RADIO_CFG; + req->action = MLAN_ACT_SET; + radio->param.radio_on_off = option; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) + ret = -EFAULT; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +#endif /* STA_SUPPORT */ + +/** + * @brief Set/Get configure multi-channel policy + * + * @param priv A pointer to moal_private structure + * @param enable A pointer to enable + * @param wait_option wait_option of ioctl + * @param action action of ioctl + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_mc_policy_cfg(moal_private *priv, t_u16 *enable, + t_u8 wait_option, t_u8 action) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *cfg = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + status = MLAN_STATUS_FAILURE; + goto done; + } + + cfg = (mlan_ds_misc_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_MISC_MULTI_CHAN_POLICY; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = action; + if (MLAN_ACT_SET == action) + cfg->param.multi_chan_policy = *enable; + status = woal_request_ioctl(priv, req, wait_option); + if (status != MLAN_STATUS_SUCCESS) + goto done; + if (MLAN_ACT_GET == action) + *enable = cfg->param.multi_chan_policy; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Set hotspot configuration value to mlan layer + * + * @param priv A pointer to moal_private structure + * @param wait_option wait option + * @param hotspotcfg Hotspot configuration value + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_set_hotspotcfg(moal_private *priv, t_u8 wait_option, t_u32 hotspotcfg) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *cfg = NULL; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + cfg = (mlan_ds_misc_cfg *)req->pbuf; + cfg->param.hotspot_cfg = hotspotcfg; + req->action = MLAN_ACT_SET; + + cfg->sub_command = MLAN_OID_MISC_HOTSPOT_CFG; + req->req_id = MLAN_IOCTL_MISC_CFG; + + ret = woal_request_ioctl(priv, req, wait_option); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_main.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_main.c new file mode 100644 index 00000000..ee552147 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_main.c @@ -0,0 +1,8320 @@ +/** @file moal_main.c + * + * @brief This file contains the major functions in WLAN + * driver. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/******************************************************** +Change log: + 10/21/2008: initial version +********************************************************/ + +#include "moal_main.h" +#include "moal_sdio.h" +#ifdef UAP_SUPPORT +#include "moal_uap.h" +#endif +#if defined(STA_CFG80211) || defined(UAP_CFG80211) +#include "moal_cfg80211.h" +#endif +#ifdef STA_CFG80211 +#ifdef STA_SUPPORT +#include "moal_sta_cfg80211.h" +#endif +#endif +#ifdef UAP_CFG80211 +#ifdef UAP_SUPPORT +#include "moal_uap_cfg80211.h" +#endif +#endif +#include "moal_eth_ioctl.h" + +#include +#include +#include +#include +#include + +#ifdef CONFIG_OF +#include +#endif + +/******************************************************** + Local Variables +********************************************************/ + +/** card info for sd877 */ +static struct _card_info card_info_sd8777 = { + .embedded_supp = 1, + .drcs = 0, + .go_noa = 0, + .v15_update = 0, +}; + +/** card info for sd8787 */ +static struct _card_info card_info_sd8787 = { + .embedded_supp = 1, + .drcs = 0, + .go_noa = 0, + .v15_update = 0, +}; + +/** card info for sd8797 */ +static struct _card_info card_info_sd8797 = { + .embedded_supp = 1, + .drcs = 0, + .go_noa = 0, + .v15_update = 0, +}; + +/** card info for sd887 */ +static struct _card_info card_info_sd8887 = { + .embedded_supp = 1, + .drcs = 1, + .go_noa = 1, + .v15_update = 1, +}; + +/** card info for sd8801 */ +static struct _card_info card_info_sd8801 = { + .embedded_supp = 0, + .drcs = 0, + .go_noa = 0, + .v15_update = 0, +}; + +/** card info for sd8897 */ +static struct _card_info card_info_sd8897 = { + .embedded_supp = 1, + .drcs = 1, + .go_noa = 1, + .v15_update = 1, +}; + +#define KERN_VERSION "3X" + +/** Driver version */ +char driver_version[] = + "SD8XXX-%s-C" KERN_VERSION "15" MLAN_RELEASE_VERSION + "-GPL" "-(" "FP" FPNUM ")" +#ifdef DEBUG_LEVEL2 + "-dbg" +#endif + " "; + +/** SD8787 Card */ +#define CARD_SD8787 "SD8787" +/** SD8777 Card */ +#define CARD_SD8777 "SD8777" +/** SD8887 Card */ +#define CARD_SD8887 "SD8887" +/** SD8801 Card */ +#define CARD_SD8801 "SD8801" +/** SD8897 Card */ +#define CARD_SD8897 "SD8897" +/** SD8797 Card */ +#define CARD_SD8797 "SD8797" + +/** Firmware name */ +char *fw_name; +int req_fw_nowait = 1; + +/** MAC address */ +char *mac_addr; + +#ifdef MFG_CMD_SUPPORT +/** Mfg mode */ +int mfg_mode; +#endif + +/** SDIO interrupt mode (0: INT_MODE_SDIO, 1: INT_MODE_GPIO) */ +int intmode = INT_MODE_SDIO; +/** GPIO interrupt pin number */ +int gpiopin; + +#ifdef CONFIG_OF +#if defined(STA_CFG80211) || defined(UAP_CFG80211) +/** Region alpha2 string */ +extern char *reg_alpha2; +#endif +extern int cfg80211_drcs; +#endif + +/** Auto deep sleep */ +int auto_ds = 2; + +/** IEEE PS mode */ +int ps_mode = 2; + +/** Max Tx buffer size */ +int max_tx_buf; + +#ifdef STA_SUPPORT +/** Max STA interfaces */ +int max_sta_bss = DEF_STA_BSS; +/** STA interface name */ +char *sta_name; +#endif + +#ifdef UAP_SUPPORT +/** Max uAP interfaces */ +int max_uap_bss = DEF_UAP_BSS; +/** uAP interface name */ +char *uap_name; +#endif + +#if defined(WIFI_DIRECT_SUPPORT) +/** Max WIFIDIRECT interfaces */ +int max_wfd_bss = DEF_WIFIDIRECT_BSS; +/** WIFIDIRECT interface name */ +char *wfd_name; +#if defined(STA_CFG80211) && defined(UAP_CFG80211) +/** max VIRTUAL bss */ +int max_vir_bss = DEF_VIRTUAL_BSS; +#endif +#endif + +#ifdef SDIO_SUSPEND_RESUME +/** PM keep power */ +int pm_keep_power = 1; +/** HS when shutdown */ +int shutdown_hs; +#endif + +/** SDIO slew rate */ +int slew_rate = 3; + +#if defined(STA_SUPPORT) +/** 802.11d configuration */ +int cfg_11d; +#endif + +/** FW download CRC check */ +int fw_crc_check = 1; + +/** fw serial download check */ +int fw_serial = 0; + +/** CAL data config file */ +char *cal_data_cfg; +/** Init config file (MAC address, register etc.) */ +char *init_cfg; + +/** Set configuration data of Tx power limitation */ +char *txpwrlimit_cfg; +/** Set configuration data of Tx power limitatio */ +char *country_txpwrlimit; + +/** Init hostcmd file */ +char *init_hostcmd_cfg; + +/** CFG80211 and WEXT mode */ +#if defined(STA_WEXT) && defined(UAP_WEXT) && defined(STA_CFG80211) && \ + defined(UAP_CFG80211) +int cfg80211_wext = STA_WEXT_MASK | UAP_WEXT_MASK | STA_CFG80211_MASK| UAP_CFG80211_MASK; +#elif defined(STA_WEXT) || defined(UAP_WEXT) +int cfg80211_wext = STA_WEXT_MASK | UAP_WEXT_MASK; +#else +int cfg80211_wext = STA_CFG80211_MASK | UAP_CFG80211_MASK; +#endif + + +/** Work queue priority */ +int wq_sched_prio; +/** Work queue scheduling policy */ +int wq_sched_policy = SCHED_NORMAL; +/** rx_work flag */ +int rx_work; + +int low_power_mode_enable; + +int hw_test; + +#ifdef CONFIG_OF +int dts_enable = 1; +#endif + +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_CFG80211) && defined(UAP_CFG80211) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION +int p2p_enh; +#endif +#endif +#endif + +/** woal_callbacks */ +static mlan_callbacks woal_callbacks = { + .moal_get_fw_data = moal_get_fw_data, + .moal_init_fw_complete = moal_init_fw_complete, + .moal_shutdown_fw_complete = moal_shutdown_fw_complete, + .moal_send_packet_complete = moal_send_packet_complete, + .moal_recv_packet = moal_recv_packet, + .moal_recv_event = moal_recv_event, + .moal_ioctl_complete = moal_ioctl_complete, + .moal_alloc_mlan_buffer = moal_alloc_mlan_buffer, + .moal_free_mlan_buffer = moal_free_mlan_buffer, + + .moal_write_reg = moal_write_reg, + .moal_read_reg = moal_read_reg, + .moal_write_data_sync = moal_write_data_sync, + .moal_read_data_sync = moal_read_data_sync, + .moal_malloc = moal_malloc, + .moal_mfree = moal_mfree, + .moal_vmalloc = moal_vmalloc, + .moal_vfree = moal_vfree, + .moal_memset = moal_memset, + .moal_memcpy = moal_memcpy, + .moal_memmove = moal_memmove, + .moal_memcmp = moal_memcmp, + .moal_udelay = moal_udelay, + .moal_get_system_time = moal_get_system_time, + .moal_init_timer = moal_init_timer, + .moal_free_timer = moal_free_timer, + .moal_start_timer = moal_start_timer, + .moal_stop_timer = moal_stop_timer, + .moal_init_lock = moal_init_lock, + .moal_free_lock = moal_free_lock, + .moal_spin_lock = moal_spin_lock, + .moal_spin_unlock = moal_spin_unlock, + .moal_print = moal_print, + .moal_print_netintf = moal_print_netintf, + .moal_assert = moal_assert, + .moal_tcp_ack_tx_ind = moal_tcp_ack_tx_ind, + .moal_hist_data_add = moal_hist_data_add, + .moal_updata_peer_signal = moal_updata_peer_signal, +}; + +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) +#if defined(WIFI_DIRECT_SUPPORT) +int drv_mode = (DRV_MODE_STA | DRV_MODE_UAP | DRV_MODE_WIFIDIRECT); +#else +int drv_mode = (DRV_MODE_STA | DRV_MODE_UAP); +#endif +#else +#ifdef STA_SUPPORT +int drv_mode = DRV_MODE_STA; +#else +int drv_mode = DRV_MODE_UAP; +#endif /* STA_SUPPORT */ +#endif /* STA_SUPPORT & UAP_SUPPORT */ + + +t_u32 uap_oper_ctrl = 0; +/** all the feature are enabled */ +#define DEFAULT_DEV_CAP_MASK 0xffffffff +t_u32 dev_cap_mask = DEFAULT_DEV_CAP_MASK; + +int antcfg = 0xffff; +/******************************************************** + Global Variables +********************************************************/ + +/** Semaphore for add/remove card */ +struct semaphore AddRemoveCardSem; +/** Semaphore to ensure WiFi is initialized prior to Bluetooth */ +unsigned long mlan_WiFiInitSem; +struct semaphore gWiFiInitSem; +/** Semaphore for user init data, eg: cal data */ +struct semaphore gUserInitDataSem; + +/** + * The global variable of a pointer to moal_handle + * structure variable + **/ +moal_handle *m_handle[MAX_MLAN_ADAPTER]; + +#ifdef DEBUG_LEVEL1 +#ifdef DEBUG_LEVEL2 +#define DEFAULT_DEBUG_MASK (0xffffffff) +#else +#define DEFAULT_DEBUG_MASK (MMSG | MFATAL | MERROR) +#endif /* DEBUG_LEVEL2 */ +t_u32 drvdbg = DEFAULT_DEBUG_MASK; + +#endif /* DEBUG_LEVEL1 */ + +int woal_open(struct net_device *dev); +int woal_close(struct net_device *dev); +int woal_set_mac_address(struct net_device *dev, void *addr); +void woal_tx_timeout(struct net_device *dev); +struct net_device_stats *woal_get_stats(struct net_device *dev); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) +u16 woal_select_queue(struct net_device *dev, struct sk_buff *skb, + void *accel_priv, select_queue_fallback_t fallback); +#else +u16 woal_select_queue(struct net_device *dev, struct sk_buff *skb, + void *accel_priv); +#endif +#else +u16 woal_select_queue(struct net_device *dev, struct sk_buff *skb); +#endif +#endif + +mlan_debug_info info; + +static moal_handle *reset_handle; +/** Hang workqueue */ +static struct workqueue_struct *hang_workqueue; +/** Hang work */ +static struct work_struct hang_work; + +/** + * @brief This function process FW hang + * + * @param handle Pointer to structure moal_handle + * + * @return N/A + */ +static void +woal_hang_work_queue(struct work_struct *work) +{ + int i; + ENTER(); + if (!reset_handle) { + LEAVE(); + return; + } + for (i = 0; i < reset_handle->priv_num; i++) { + if (reset_handle->priv[i] && reset_handle->priv[i]->netdev) { + PRINTM(MMSG, "Close netdev %s\n", + reset_handle->priv[i]->netdev->name); + rtnl_lock(); + dev_close(reset_handle->priv[i]->netdev); + rtnl_unlock(); + break; + } + } + reset_handle = NULL; + LEAVE(); +} + +/** + * @brief This function process FW hang + * + * @param handle Pointer to structure moal_handle + * + * @return N/A + */ +void +woal_process_hang(moal_handle *handle) +{ + ENTER(); + if (reset_handle == NULL) { + PRINTM(MMSG, "Process hang\n"); + reset_handle = handle; + queue_work(hang_workqueue, &hang_work); + } + LEAVE(); +} + +/** + * @brief Check if any interface is active + * + * @param handle A pointer to moal_handle + * + * + * @return MTRUE/MFALSE; + */ +t_u8 +woal_is_any_interface_active(moal_handle *handle) +{ + int i; + for (i = 0; i < handle->priv_num; i++) { +#ifdef STA_SUPPORT + if (GET_BSS_ROLE(handle->priv[i]) == MLAN_BSS_ROLE_STA) { + if (handle->priv[i]->media_connected == MTRUE) + return MTRUE; + } +#endif +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(handle->priv[i]) == MLAN_BSS_ROLE_UAP) { + if (handle->priv[i]->bss_started == MTRUE) + return MTRUE; + } +#endif + } + return MFALSE; +} + +static int woal_netdevice_event(struct notifier_block *nb, unsigned long event, + void *ptr); +static struct notifier_block woal_notifier = { + .notifier_call = woal_netdevice_event +}; + +/** + * @brief This function handle the net interface ipaddr change event + * + * @param nb pointer to the notifier_block + * @param event event type + * @param ptr pointer to event struct + * + * @return NOTIFY_DONE or NOTIFY_OK + */ +static int +woal_netdevice_event(struct notifier_block *nb, unsigned long event, void *ptr) +{ + struct in_ifaddr *ifa = (struct in_ifaddr *)ptr; + struct net_device *ndev; + moal_private *priv; + + int ret = NOTIFY_OK; +#ifdef STA_CFG80211 + char rssi_low[10]; +#endif + + ENTER(); + + ndev = ifa->ifa_dev->dev; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + if (!ndev || ndev->netdev_ops->ndo_open != woal_open) +#else + if (!ndev || ndev->open != woal_open) +#endif + { + PRINTM(MIOCTL, "IP changes not for us, ignore. ndev[%p]\n", + ndev); + if (ndev) + PRINTM(MIOCTL, "changes on %s\n", ndev->name); + ret = NOTIFY_DONE; + goto done; + } + priv = (moal_private *)netdev_priv(ndev); + if (priv->bss_type != MLAN_BSS_TYPE_STA +#if defined(WIFI_DIRECT_SUPPORT) + && priv->bss_type != MLAN_BSS_TYPE_WIFIDIRECT +#endif + ) { + PRINTM(MIOCTL, "Bss type [%d] is not STA/P2P, ignore\n", + (int)priv->bss_type); + ret = NOTIFY_DONE; + goto done; + } + + switch (event) { + case NETDEV_UP: + PRINTM(MIOCTL, "[%s]: New ip addr: 0x%08x\n", ndev->name, + ifa->ifa_address); + /* Save the IP addr now */ + memcpy(priv->ip_addr, &ifa->ifa_address, + sizeof(ifa->ifa_address)); + priv->ip_addr_type = IPADDR_TYPE_IPV4; +#ifdef STA_CFG80211 + if (!hw_test && priv->roaming_enabled) { + sprintf(rssi_low, "%d", priv->rssi_low); + woal_set_rssi_low_threshold(priv, rssi_low, + MOAL_CMD_WAIT); + } +#endif + break; + case NETDEV_DOWN: + PRINTM(MIOCTL, "[%s]: Ip addr removed.\n", ndev->name); + priv->ip_addr_type = IPADDR_TYPE_NONE; + memset(priv->ip_addr, 0, sizeof(priv->ip_addr)); + break; + default: + PRINTM(MIOCTL, "[%s]: Ignore event: %u\n", ndev->name, + (unsigned int)event); + ret = NOTIFY_DONE; + goto done; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief This function validates a SSID as being able to be printed + * + * @param pssid SSID structure to validate + * + * @return MTRUE or MFALSE + */ +BOOLEAN +woal_ssid_valid(mlan_802_11_ssid *pssid) +{ +#ifdef ASCII_SSID_CHECK + unsigned int ssid_idx; + + ENTER(); + + for (ssid_idx = 0; ssid_idx < pssid->ssid_len; ssid_idx++) { + if ((pssid->ssid[ssid_idx] < 0x20) || + (pssid->ssid[ssid_idx] > 0x7e)) { + LEAVE(); + return MFALSE; + } + } + LEAVE(); +#endif + return MTRUE; +} + +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_CFG80211) && defined(UAP_CFG80211) +/** + * @brief GO timeout function + * + * @param context A pointer to context + * @return N/A + */ +void +woal_go_timer_func(void *context) +{ + moal_handle *handle = (moal_handle *)context; + + ENTER(); + + PRINTM(MEVENT, "go_timer fired.\n"); + handle->is_go_timer_set = MFALSE; + + LEAVE(); + return; +} + +/** + * @brief Remain on Channel timeout function + * + * @param context A pointer to context + * @return N/A + */ +void +woal_remain_timer_func(void *context) +{ + moal_handle *handle = (moal_handle *)context; + moal_private *priv = handle->priv[handle->remain_bss_index]; + + ENTER(); + + PRINTM(MEVENT, "remain_timer fired.\n"); + if (handle->cookie) { + cfg80211_remain_on_channel_expired( +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + priv->netdev, +#else + priv->wdev, +#endif + handle->cookie, + &handle->chan, +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + handle->channel_type, +#endif + GFP_ATOMIC); + handle->cookie = 0; + } + handle->is_remain_timer_set = MFALSE; + + LEAVE(); + return; +} +#endif +#endif + +/** + * @brief check if we already connect to the AP. + * @param priv A pointer to moal_private structure + * @param ssid_bssid A pointer to mlan_ssid_bssid structure + * + * @return MTRUE/MFALSE; + */ +int +woal_is_connected(moal_private *priv, mlan_ssid_bssid *ssid_bssid) +{ + mlan_bss_info bss_info; + int ret = MFALSE; + t_u8 zero_mac[] = { 0, 0, 0, 0, 0, 0 }; + ENTER(); + memset(&bss_info, 0, sizeof(bss_info)); + if (MLAN_STATUS_SUCCESS != + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info)) + goto done; + if (bss_info.media_connected) { + if (memcmp(ssid_bssid->bssid, zero_mac, sizeof(zero_mac))) { + if (ssid_bssid->ssid.ssid_len) { /* compare ssid + and bssid */ + if ((ssid_bssid->ssid.ssid_len == + bss_info.ssid.ssid_len) && + !memcmp(ssid_bssid->ssid.ssid, + bss_info.ssid.ssid, + bss_info.ssid.ssid_len) && + !memcmp(ssid_bssid->bssid, bss_info.bssid, + MLAN_MAC_ADDR_LENGTH)) + ret = MTRUE; + } else { /* compare bssid */ + if (!memcmp + (ssid_bssid->bssid, bss_info.bssid, + MLAN_MAC_ADDR_LENGTH)) { + memcpy(&ssid_bssid->ssid, + &bss_info.ssid, + sizeof(bss_info.ssid)); + ret = MTRUE; + } + } + } else { /* compare ssid */ + if (ssid_bssid->ssid.ssid_len && + (ssid_bssid->ssid.ssid_len == + bss_info.ssid.ssid_len) && + !memcmp(ssid_bssid->ssid.ssid, bss_info.ssid.ssid, + bss_info.ssid.ssid_len)) { + memcpy(&ssid_bssid->bssid, &bss_info.bssid, + MLAN_MAC_ADDR_LENGTH); + ret = MTRUE; + } + } + } +done: + LEAVE(); + return ret; +} + +/** + * @brief Look up specific IE in a buf + * + * @param ie Pointer to IEs + * @param len Total length of ie + * @param id Element id to lookup + * + * @return Pointer of the specific IE -- success, NULL -- fail + */ +const t_u8 * +woal_parse_ie_tlv(const t_u8 *ie, int len, t_u8 id) +{ + int left_len = len; + const t_u8 *pos = ie; + int length; + + /* IE format: | u8 | id | | u8 | len | | var | data | */ + while (left_len >= 2) { + length = *(pos + 1); + if ((*pos == id) && (length + 2) <= left_len) + return pos; + pos += (length + 2); + left_len -= (length + 2); + } + + return NULL; +} + +/** + * @brief Get mode + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option (MOAL_WAIT or MOAL_NO_WAIT) + * + * @return Wireless mode + */ +t_u32 +woal_get_mode(moal_private *priv, t_u8 wait_option) +{ + int ret = 0; + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + t_u32 mode = 0; + + ENTER(); + +#if defined(STA_WEXT) || defined(UAP_WEXT) + mode = priv->w_stats.status; +#endif + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_BSS_MODE; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_GET; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); + if (status == MLAN_STATUS_SUCCESS) { + switch (bss->param.bss_mode) { + case MLAN_BSS_MODE_INFRA: + mode = MW_MODE_INFRA; + break; + case MLAN_BSS_MODE_IBSS: + mode = MW_MODE_ADHOC; + break; + default: + mode = MW_MODE_AUTO; + break; + } + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return mode; +} + +/******************************************************** + Local Functions +********************************************************/ + +/** + * @brief This function dynamically populates the driver mode table + * + * @param handle A pointer to moal_handle structure + * @param drv_mode_local Driver mode + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +woal_update_drv_tbl(moal_handle *handle, int drv_mode_local) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + unsigned int intf_num = 0; + int i = 0, j = 0; + mlan_bss_attr *bss_tbl = NULL; +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_CFG80211) && defined(UAP_CFG80211) + int last_wfd_index = 0; +#endif +#endif + + ENTER(); + + /* Calculate number of interfaces */ +#ifdef STA_SUPPORT + if (drv_mode_local & DRV_MODE_STA) { + if ((max_sta_bss < 1) || (max_sta_bss > MAX_STA_BSS)) { + PRINTM(MWARN, + "Unsupported max_sta_bss (%d), setting to default\n", + max_sta_bss); + max_sta_bss = DEF_STA_BSS; + } + intf_num += max_sta_bss; + } +#endif /* STA_SUPPORT */ + +#ifdef UAP_SUPPORT + if (drv_mode_local & DRV_MODE_UAP) { + if ((max_uap_bss < 1) || (max_uap_bss > MAX_UAP_BSS)) { + PRINTM(MWARN, + "Unsupported max_uap_bss (%d), setting to default\n", + max_uap_bss); + max_uap_bss = DEF_UAP_BSS; + } + intf_num += max_uap_bss; + } +#endif /* UAP_SUPPORT */ + +#if defined(WIFI_DIRECT_SUPPORT) + if (drv_mode_local & DRV_MODE_WIFIDIRECT) { + if ((max_wfd_bss < 1) || (max_wfd_bss > MAX_WIFIDIRECT_BSS)) { + PRINTM(MWARN, + "Unsupported max_wfd_bss (%d), setting to default\n", + max_wfd_bss); + max_wfd_bss = DEF_WIFIDIRECT_BSS; + } + intf_num += max_wfd_bss; +#if defined(STA_CFG80211) && defined(UAP_CFG80211) + intf_num += max_vir_bss; +#endif + } +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ + + /* Create BSS attribute table */ + if ((intf_num == 0) || (intf_num > MLAN_MAX_BSS_NUM)) { + PRINTM(MERROR, "Unsupported number of BSS %d\n", intf_num); + ret = MLAN_STATUS_FAILURE; + goto done; + } else { + /* Create new table */ + bss_tbl = kmalloc(sizeof(mlan_bss_attr) * intf_num, GFP_KERNEL); + if (!bss_tbl) { + PRINTM(MERROR, + "Could not create BSS attribute table\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + } + + /* Populate BSS attribute table */ +#ifdef STA_SUPPORT + if (drv_mode_local & DRV_MODE_STA) { + for (j = 0; j < max_sta_bss; j++) { + if (i >= intf_num) + break; + bss_tbl[i].bss_type = MLAN_BSS_TYPE_STA; + bss_tbl[i].frame_type = MLAN_DATA_FRAME_TYPE_ETH_II; + bss_tbl[i].active = MTRUE; + bss_tbl[i].bss_priority = 0; + bss_tbl[i].bss_num = j; + bss_tbl[i].bss_virtual = MFALSE; + i++; + } + } +#endif /* STA_SUPPORT */ + +#ifdef UAP_SUPPORT + if (drv_mode_local & DRV_MODE_UAP) { + for (j = 0; j < max_uap_bss; j++) { + if (i >= intf_num) + break; + bss_tbl[i].bss_type = MLAN_BSS_TYPE_UAP; + bss_tbl[i].frame_type = MLAN_DATA_FRAME_TYPE_ETH_II; + bss_tbl[i].active = MTRUE; + bss_tbl[i].bss_priority = 0; + bss_tbl[i].bss_num = j; + bss_tbl[i].bss_virtual = MFALSE; + i++; + } + } +#endif /* UAP_SUPPORT */ + +#if defined(WIFI_DIRECT_SUPPORT) + if (drv_mode_local & DRV_MODE_WIFIDIRECT) { + for (j = 0; j < max_wfd_bss; j++) { + if (i >= intf_num) + break; + bss_tbl[i].bss_type = MLAN_BSS_TYPE_WIFIDIRECT; + bss_tbl[i].frame_type = MLAN_DATA_FRAME_TYPE_ETH_II; + bss_tbl[i].active = MTRUE; + bss_tbl[i].bss_priority = 0; + bss_tbl[i].bss_num = j; + bss_tbl[i].bss_virtual = MFALSE; + i++; + } +#if defined(STA_CFG80211) && defined(UAP_CFG80211) + last_wfd_index = j; +#endif + } +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ + +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_CFG80211) && defined(UAP_CFG80211) + /** append virtual interface at the end of table */ + for (j = 0; j < max_vir_bss; j++) { + if (i >= intf_num) + break; + bss_tbl[i].bss_type = MLAN_BSS_TYPE_WIFIDIRECT; + bss_tbl[i].frame_type = MLAN_DATA_FRAME_TYPE_ETH_II; + bss_tbl[i].active = MTRUE; + bss_tbl[i].bss_priority = 0; + bss_tbl[i].bss_num = j + last_wfd_index; + bss_tbl[i].bss_virtual = MTRUE; + i++; + } +#endif +#endif + /* Clear existing table, if any */ + kfree(handle->drv_mode.bss_attr); + handle->drv_mode.bss_attr = NULL; + + /* Create moal_drv_mode entry */ + handle->drv_mode.drv_mode = drv_mode; + handle->drv_mode.intf_num = intf_num; + handle->drv_mode.bss_attr = bss_tbl; + if (fw_name) { + handle->drv_mode.fw_name = fw_name; +#ifdef MFG_CMD_SUPPORT + if (mfg_mode == MLAN_INIT_PARA_ENABLED) + fw_name = NULL; +#endif + } else { +#if defined(UAP_SUPPORT) && defined(STA_SUPPORT) + if (handle->card_type == CARD_TYPE_SD8777) + handle->drv_mode.fw_name = DEFAULT_AP_STA_FW_NAME_8777; + else if (handle->card_type == CARD_TYPE_SD8787) + handle->drv_mode.fw_name = DEFAULT_AP_STA_FW_NAME_8787; + else if (handle->card_type == CARD_TYPE_SD8887) + handle->drv_mode.fw_name = DEFAULT_AP_STA_FW_NAME_8887; + else if (handle->card_type == CARD_TYPE_SD8801) + handle->drv_mode.fw_name = DEFAULT_AP_STA_FW_NAME_8801; + else if (handle->card_type == CARD_TYPE_SD8897) + handle->drv_mode.fw_name = DEFAULT_AP_STA_FW_NAME_8897; + else if (handle->card_type == CARD_TYPE_SD8797) + handle->drv_mode.fw_name = DEFAULT_AP_STA_FW_NAME_8797; + else + handle->drv_mode.fw_name = DEFAULT_AP_STA_FW_NAME; +#else +#ifdef UAP_SUPPORT + if (handle->card_type == CARD_TYPE_SD8777) + handle->drv_mode.fw_name = DEFAULT_AP_FW_NAME_8777; + else if (handle->card_type == CARD_TYPE_SD8787) + handle->drv_mode.fw_name = DEFAULT_AP_FW_NAME_8787; + else if (handle->card_type == CARD_TYPE_SD8887) + handle->drv_mode.fw_name = DEFAULT_AP_FW_NAME_8887; + else if (handle->card_type == CARD_TYPE_SD8801) + handle->drv_mode.fw_name = DEFAULT_AP_FW_NAME_8801; + else if (handle->card_type == CARD_TYPE_SD8897) + handle->drv_mode.fw_name = DEFAULT_AP_FW_NAME_8897; + else if (handle->card_type == CARD_TYPE_SD8797) + handle->drv_mode.fw_name = DEFAULT_AP_FW_NAME_8797; + else + handle->drv_mode.fw_name = DEFAULT_AP_FW_NAME; +#else + if (handle->card_type == CARD_TYPE_SD8777) + handle->drv_mode.fw_name = DEFAULT_FW_NAME_8777; + else if (handle->card_type == CARD_TYPE_SD8787) + handle->drv_mode.fw_name = DEFAULT_FW_NAME_8787; + else if (handle->card_type == CARD_TYPE_SD8887) + handle->drv_mode.fw_name = DEFAULT_FW_NAME_8887; + else if (handle->card_type == CARD_TYPE_SD8801) + handle->drv_mode.fw_name = DEFAULT_FW_NAME_8801; + else if (handle->card_type == CARD_TYPE_SD8897) + handle->drv_mode.fw_name = DEFAULT_FW_NAME_8897; + else if (handle->card_type == CARD_TYPE_SD8797) + handle->drv_mode.fw_name = DEFAULT_FW_NAME_8797; + else + handle->drv_mode.fw_name = DEFAULT_FW_NAME; +#endif /* UAP_SUPPORT */ +#endif /* UAP_SUPPORT && STA_SUPPORT */ + } + +done: + LEAVE(); + return ret; +} + +#ifdef CONFIG_OF +/** + * @brief This function read the initial parameter from device tress + * + * @param handle A pointer to moal_handle structure + * + * @return N/A + */ +static void +woal_init_from_dev_tree(void) +{ + struct device_node *dt_node = NULL; + struct property *prop; + t_u32 data; + const char *string_data; + + ENTER(); + + if (!dts_enable) { + PRINTM(MIOCTL, "DTS is disabled!"); + return; + } + + dt_node = of_find_node_by_name(NULL, "sd8xxx-wlan"); + if (!dt_node) { + LEAVE(); + return; + } + for_each_property_of_node(dt_node, prop) { + if (!strncmp(prop->name, "drv_mode", strlen("drv_mode"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(MIOCTL, "drv_mode=0x%x\n", data); + drv_mode = data; + } + } else if (!strncmp(prop->name, "drvdbg", strlen("drvdbg"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(MIOCTL, "drvdbg=0x%x\n", data); + drvdbg = data; + } + } else if (!strncmp + (prop->name, "dev_cap_mask", + strlen("dev_cap_mask"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(MIOCTL, "dev_cap_mask=0x%x\n", data); + dev_cap_mask = data; + } + } else if (!strncmp(prop->name, "hw_test", strlen("hw_test"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(MIOCTL, "hw_test=0x%x\n", data); + hw_test = data; + } + } +#ifdef MFG_CMD_SUPPORT + else if (!strncmp(prop->name, "mfg_mode", strlen("mfg_mode"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(MIOCTL, "mfg_mode=0x%x\n", data); + mfg_mode = data; + } + } +#endif + else if (!strncmp(prop->name, "mac_addr", strlen("mac_addr"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + mac_addr = (char *)string_data; + PRINTM(MIOCTL, "mac_addr=%s\n", mac_addr); + } + } else if (!strncmp(prop->name, "fw_name", strlen("fw_name"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + fw_name = (char *)string_data; + PRINTM(MIOCTL, "fw_name=%s\n", fw_name); + } + } +#if defined(STA_WEXT) || defined(UAP_WEXT) + else if (!strncmp + (prop->name, "cfg80211_wext", + strlen("cfg80211_wext"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(MIOCTL, "cfg80211_wext=0x%x\n", data); + cfg80211_wext = data; + } + } +#endif +#ifdef STA_SUPPORT + else if (!strncmp(prop->name, "sta_name", strlen("sta_name"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + sta_name = (char *)string_data; + PRINTM(MIOCTL, "sta_name=%s\n", sta_name); + } + } +#endif +#if defined(WIFI_DIRECT_SUPPORT) + else if (!strncmp(prop->name, "wfd_name", strlen("wfd_name"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + wfd_name = (char *)string_data; + PRINTM(MIOCTL, "wfd_name=%s\n", wfd_name); + } + } +#endif +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + else if (!strncmp + (prop->name, "reg_alpha2", strlen("reg_alpha2"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + reg_alpha2 = (char *)string_data; + PRINTM(MIOCTL, "reg_alpha2=%s\n", reg_alpha2); + } + } +#endif +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_CFG80211) && defined(UAP_CFG80211) + else if (!strncmp + (prop->name, "max_vir_bss", strlen("max_vir_bss"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(MIOCTL, "max_vir_bss=0x%x\n", data); + max_vir_bss = data; + } + } else if (!strncmp(prop->name, "p2p_enh", strlen("p2p_enh"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(MIOCTL, "p2p_enh=0x%x\n", data); + p2p_enh = data; + } + } else if (!strncmp + (prop->name, "cfg80211_drcs", + strlen("cfg80211_drcs"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(MIOCTL, "cfg80211_drcs=0x%x\n", data); + cfg80211_drcs = data; + } + } +#endif +#endif + else if (!strncmp(prop->name, "init_cfg", strlen("init_cfg"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + init_cfg = (char *)string_data; + PRINTM(MIOCTL, "init_cfg=%s\n", init_cfg); + } + } else if (!strncmp + (prop->name, "cal_data_cfg", + strlen("cal_data_cfg"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + cal_data_cfg = (char *)string_data; + PRINTM(MIOCTL, "cal_data_cfg=%s\n", + cal_data_cfg); + } + } else if (!strncmp + (prop->name, "txpwrlimit_cfg", + strlen("txpwrlimit_cfg"))) { + if (!of_property_read_string + (dt_node, prop->name, &string_data)) { + txpwrlimit_cfg = (char *)string_data; + PRINTM(MIOCTL, "txpwrlimit_cfg=%s\n", + txpwrlimit_cfg); + } + } else if (!strncmp(prop->name, "antcfg", strlen("antcfg"))) { + if (!of_property_read_string + (dt_node, prop->name, &data)) { + antcfg = data; + PRINTM(MIOCTL, "antcfg=%d\n", antcfg); + } + } + } + LEAVE(); + return; +} +#endif + +/** + * @brief This function initializes software + * + * @param handle A pointer to moal_handle structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +woal_init_sw(moal_handle *handle) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + unsigned int i; + mlan_device device; + t_void *pmlan; + + ENTER(); + + /* Initialize moal_handle structure */ + handle->hardware_status = HardwareStatusInitializing; + handle->main_state = MOAL_STATE_IDLE; + +#ifdef STA_SUPPORT + if ((drv_mode & DRV_MODE_STA) +#ifdef STA_WEXT + && !IS_STA_WEXT(cfg80211_wext) +#endif +#ifdef STA_CFG80211 + && !IS_STA_CFG80211(cfg80211_wext) +#endif + ) { + PRINTM(MERROR, + "STA without WEXT or CFG80211 bit definition!\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } +#endif /* STA_SUPPORT */ + +#if defined(STA_CFG80211) && defined(STA_SUPPORT) + if (IS_STA_CFG80211(cfg80211_wext)) + cfg80211_wext |= STA_CFG80211_MASK | UAP_CFG80211_MASK; +#endif + +#if defined(UAP_CFG80211) && defined(UAP_SUPPORT) + if (IS_UAP_CFG80211(cfg80211_wext)) + cfg80211_wext |= STA_CFG80211_MASK | UAP_CFG80211_MASK; +#endif + + /* Update driver version */ + if (handle->card_type == CARD_TYPE_SD8787) + memcpy(driver_version, CARD_SD8787, strlen(CARD_SD8787)); + else if (handle->card_type == CARD_TYPE_SD8777) + memcpy(driver_version, CARD_SD8777, strlen(CARD_SD8777)); + else if (handle->card_type == CARD_TYPE_SD8887) + memcpy(driver_version, CARD_SD8887, strlen(CARD_SD8887)); + else if (handle->card_type == CARD_TYPE_SD8801) + memcpy(driver_version, CARD_SD8801, strlen(CARD_SD8801)); + else if (handle->card_type == CARD_TYPE_SD8897) + memcpy(driver_version, CARD_SD8897, strlen(CARD_SD8897)); + else if (handle->card_type == CARD_TYPE_SD8797) + memcpy(driver_version, CARD_SD8797, strlen(CARD_SD8797)); + memcpy(handle->driver_version, driver_version, strlen(driver_version)); + + if (woal_update_drv_tbl(handle, drv_mode) != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "Could not update driver mode table\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + /** user config file */ + init_waitqueue_head(&handle->init_user_conf_wait_q); + + /* PnP and power profile */ + handle->surprise_removed = MFALSE; + init_waitqueue_head(&handle->init_wait_q); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + spin_lock_init(&handle->queue_lock); +#endif + spin_lock_init(&handle->driver_lock); + spin_lock_init(&handle->ioctl_lock); + spin_lock_init(&handle->scan_req_lock); + +#if defined(SDIO_SUSPEND_RESUME) + handle->is_suspended = MFALSE; + handle->hs_activated = MFALSE; + handle->suspend_fail = MFALSE; +#ifdef SDIO_SUSPEND_RESUME + handle->suspend_notify_req = MFALSE; +#endif + handle->hs_skip_count = 0; + handle->hs_force_count = 0; + handle->cmd52_func = 0; + handle->cmd52_reg = 0; + handle->cmd52_val = 0; +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + handle->scan_chan_gap = DEF_SCAN_CHAN_GAP; +#ifdef WIFI_DIRECT_SUPPORT + handle->miracast_scan_time = DEF_MIRACAST_SCAN_TIME; +#define DEF_NOA_DURATION 0 +#define DEF_NOA_INTERVAL 100 + handle->noa_duration = DEF_NOA_DURATION; + handle->noa_interval = DEF_NOA_INTERVAL; +#endif +#endif + init_waitqueue_head(&handle->hs_activate_wait_q); +#endif + + /* Initialize measurement wait queue */ + handle->meas_wait_q_woken = MFALSE; + handle->meas_start_jiffies = 0; + handle->cac_period = MFALSE; + handle->delay_bss_start = MFALSE; + init_waitqueue_head(&handle->meas_wait_q); +#ifdef DFS_TESTING_SUPPORT + handle->cac_period_jiffies = 0; +#endif + +#ifdef REASSOCIATION + MOAL_INIT_SEMAPHORE(&handle->reassoc_sem); + handle->reassoc_on = 0; + + /* Initialize the timer for the reassociation */ + woal_initialize_timer(&handle->reassoc_timer, + woal_reassoc_timer_func, handle); + + handle->is_reassoc_timer_set = MFALSE; +#endif /* REASSOCIATION */ + +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_CFG80211) && defined(UAP_CFG80211) + /* Initialize the timer for GO timeout */ + woal_initialize_timer(&handle->go_timer, woal_go_timer_func, handle); + + handle->is_go_timer_set = MFALSE; + handle->remain_on_channel = MFALSE; + + /* Initialize the timer for remain on channel */ + woal_initialize_timer(&handle->remain_timer, + woal_remain_timer_func, handle); + + handle->is_remain_timer_set = MFALSE; +#endif +#endif + + /* Register to MLAN */ + memset(&device, 0, sizeof(mlan_device)); + device.pmoal_handle = handle; + device.card_type = handle->card_type; + +#ifdef MFG_CMD_SUPPORT + device.mfg_mode = (t_u32)mfg_mode; +#endif + device.int_mode = (t_u32)intmode; + device.gpio_pin = (t_u32)gpiopin; +#ifdef DEBUG_LEVEL1 + device.drvdbg = drvdbg; +#endif + device.auto_ds = (t_u32)auto_ds; + device.ps_mode = (t_u32)ps_mode; + device.max_tx_buf = (t_u32)max_tx_buf; +#if defined(STA_SUPPORT) + device.cfg_11d = (t_u32)cfg_11d; +#endif + if (handle->card_type == CARD_TYPE_SD8787 || + handle->card_type == CARD_TYPE_SD8777) + device.fw_crc_check = (t_u32)fw_crc_check; +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) + device.max_segs = + ((struct sdio_mmc_card *)handle->card)->func->card->host-> + max_segs; + device.max_seg_size = + ((struct sdio_mmc_card *)handle->card)->func->card->host-> + max_seg_size; +#endif + PRINTM(MMSG, "SDIO: max_segs=%d max_seg_size=%d\n", device.max_segs, + device.max_seg_size); +#endif +#ifdef SDIO_MULTI_PORT_TX_AGGR +#ifdef MMC_QUIRK_BLKSZ_FOR_BYTE_MODE + device.mpa_tx_cfg = MLAN_INIT_PARA_ENABLED; +#else + device.mpa_tx_cfg = MLAN_INIT_PARA_DISABLED; +#endif +#endif +#ifdef SDIO_MULTI_PORT_RX_AGGR +#ifdef MMC_QUIRK_BLKSZ_FOR_BYTE_MODE + device.mpa_rx_cfg = MLAN_INIT_PARA_ENABLED; +#else + device.mpa_rx_cfg = MLAN_INIT_PARA_DISABLED; +#endif +#endif + device.feature_control = FEATURE_CTRL_DEFAULT; + if (handle->card_type == CARD_TYPE_SD8777 || + handle->card_type == CARD_TYPE_SD8787 || + handle->card_type == CARD_TYPE_SD8801 || + handle->card_type == CARD_TYPE_SD8887) + device.feature_control &= ~FEATURE_CTRL_STREAM_2X2; + handle->feature_control = device.feature_control; + + if (rx_work == MLAN_INIT_PARA_ENABLED) + device.rx_work = MTRUE; + else if (rx_work == MLAN_INIT_PARA_DISABLED) + device.rx_work = MFALSE; + else { + if (num_possible_cpus() > 1) + device.rx_work = MTRUE; + else + device.rx_work = MFALSE; + } + PRINTM(MMSG, "rx_work=%d cpu_num=%d\n", device.rx_work, + num_possible_cpus()); + + device.dev_cap_mask = dev_cap_mask; + + for (i = 0; i < handle->drv_mode.intf_num; i++) { + device.bss_attr[i].bss_type = + handle->drv_mode.bss_attr[i].bss_type; + device.bss_attr[i].frame_type = + handle->drv_mode.bss_attr[i].frame_type; + device.bss_attr[i].active = handle->drv_mode.bss_attr[i].active; + device.bss_attr[i].bss_priority = + handle->drv_mode.bss_attr[i].bss_priority; + device.bss_attr[i].bss_num = + handle->drv_mode.bss_attr[i].bss_num; + device.bss_attr[i].bss_virtual = + handle->drv_mode.bss_attr[i].bss_virtual; + } + memcpy(&device.callbacks, &woal_callbacks, sizeof(mlan_callbacks)); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) + sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + if (MLAN_STATUS_SUCCESS == mlan_register(&device, &pmlan)) + handle->pmlan_adapter = pmlan; + else + ret = MLAN_STATUS_FAILURE; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) + sdio_release_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + + LEAVE(); + return ret; +} + +/** + * @brief This function frees the structure of moal_handle + * + * @param handle A pointer to moal_handle structure + * + * @return N/A + */ +static void +woal_free_moal_handle(moal_handle *handle) +{ + ENTER(); + if (!handle) { + PRINTM(MERROR, "The handle is NULL\n"); + LEAVE(); + return; + } +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + /* Unregister wiphy device and free */ + if (handle->wiphy) { + wiphy_unregister(handle->wiphy); + wiphy_free(handle->wiphy); + handle->wiphy = NULL; + } +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) + if ((handle->nl_sk) && ((handle->nl_sk)->sk_socket)) { + sock_release((handle->nl_sk)->sk_socket); + handle->nl_sk = NULL; + } +#else + netlink_kernel_release(handle->nl_sk); +#endif + + if (handle->pmlan_adapter) + mlan_unregister(handle->pmlan_adapter); + + /* Free BSS attribute table */ + kfree(handle->drv_mode.bss_attr); + handle->drv_mode.bss_attr = NULL; + PRINTM(MINFO, "Free Adapter\n"); + if (atomic_read(&handle->lock_count) || + atomic_read(&handle->malloc_count) || + atomic_read(&handle->mbufalloc_count)) { + PRINTM(MERROR, + "mlan has memory leak: lock_count=%d, malloc_count=%d, mbufalloc_count=%d\n", + atomic_read(&handle->lock_count), + atomic_read(&handle->malloc_count), + atomic_read(&handle->mbufalloc_count)); + } + /* Free allocated memory for fwdump filename */ + kfree(handle->fwdump_fname); + /* Free the moal handle itself */ + kfree(handle); + LEAVE(); +} + +/** + * @brief WOAL get one line data from ASCII format data + * + * @param data Source data + * @param size Source data length + * @param line_pos Destination data + * @return routnine status + */ +static t_size +parse_cfg_get_line(t_u8 *data, t_size size, t_u8 *line_pos) +{ + t_u8 *src, *dest; + static t_s32 pos; + + ENTER(); + + if (pos >= size) { /* reach the end */ + pos = 0; /* Reset position for rfkill */ + LEAVE(); + return -1; + } + memset(line_pos, 0, MAX_LINE_LEN); + src = data + pos; + dest = line_pos; + + while (pos < size && *src != '\x0A' && *src != '\0') { + if (*src != ' ' && *src != '\t') /* parse space */ + *dest++ = *src++; + else + src++; + pos++; + } + /* parse new line */ + pos++; + *dest = '\0'; + LEAVE(); + return strlen(line_pos); +} + +/** + * @brief Process register access request + * @param type_string String format Register type + * @param offset_string String format Register offset + * @param value_string String format Pointer to value + * @return MLAN_STATUS_SUCCESS--success, otherwise--fail + */ +static t_u32 +woal_process_regrdwr(moal_handle *handle, t_u8 *type_string, + t_u8 *offset_string, t_u8 *value_string) +{ + mlan_status ret = MLAN_STATUS_FAILURE; + int type, offset, value; + pmlan_ioctl_req ioctl_req = NULL; + mlan_ds_reg_mem *reg = NULL; + + ENTER(); + + /* Alloc ioctl_req */ + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_reg_mem)); + + if (ioctl_req == NULL) { + PRINTM(MERROR, "Can't alloc memory\n"); + goto done; + } + + if (MLAN_STATUS_SUCCESS != woal_atoi(&type, type_string)) + goto done; + if (MLAN_STATUS_SUCCESS != woal_atoi(&offset, offset_string)) + goto done; + if (MLAN_STATUS_SUCCESS != woal_atoi(&value, value_string)) + goto done; + + ioctl_req->req_id = MLAN_IOCTL_REG_MEM; + ioctl_req->action = MLAN_ACT_SET; + + reg = (mlan_ds_reg_mem *)ioctl_req->pbuf; + reg->sub_command = MLAN_OID_REG_RW; + if (type < 5) { + reg->param.reg_rw.type = type; + } else { + PRINTM(MERROR, "Unsupported Type\n"); + goto done; + } + reg->param.reg_rw.offset = offset; + reg->param.reg_rw.value = value; + + /* request ioctl for STA */ + ret = woal_request_ioctl(handle->priv[0], ioctl_req, MOAL_CMD_WAIT); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + PRINTM(MINFO, "Register type: %d, offset: 0x%x, value: 0x%x\n", type, + offset, value); + ret = MLAN_STATUS_SUCCESS; + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief Read/Write registers value + * + * @param priv A pointer to moal_private structure + * @param action get / set action + * @param type type of register + * @param offset offset of register + * @param value value of registere + * + * @return 0 --success, otherwise fail + */ +static int +woal_getset_regrdwr(moal_private *priv, t_u32 action, t_u32 type, t_u32 offset, + t_u32 *value) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_reg_mem *reg_mem = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_reg_mem)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + reg_mem = (mlan_ds_reg_mem *)req->pbuf; + reg_mem->sub_command = MLAN_OID_REG_RW; + req->req_id = MLAN_IOCTL_REG_MEM; + req->action = action; + + reg_mem->param.reg_rw.type = type; + reg_mem->param.reg_rw.offset = offset; + if (req->action == MLAN_ACT_SET) + reg_mem->param.reg_rw.value = *value; + + status = woal_request_ioctl(priv, req, MOAL_CMD_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + *value = reg_mem->param.reg_rw.value; + PRINTM(MINFO, "woal_getset_regrdwr value=%x\n", *value); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief set slew rate mode + * + * @param handle MOAL handle + * @return MLAN_STATUS_SUCCESS--success, otherwise--fail + */ +static t_u32 +woal_set_sdio_slew_rate(moal_handle *handle) +{ + t_u32 value = 0; + mlan_status ret = MLAN_STATUS_SUCCESS; + moal_private *priv = NULL; + t_u32 new_value = 0; + + priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY); + if (!priv) + return MLAN_STATUS_FAILURE; + if (slew_rate > 3 || slew_rate < 0) + return MLAN_STATUS_FAILURE; + ret = woal_getset_regrdwr(priv, MLAN_ACT_GET, MLAN_REG_MAC, 0x8000231C, + &value); + if (ret < 0) { + PRINTM(MERROR, "woal_getset_regrdwr get REG_MAC failed\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + new_value = value & ~0xC000; + new_value |= (t_u32)slew_rate << 14; + /* Set 0x8000231C[15:14] = 0-3 */ + if (value != new_value) { + PRINTM(MMSG, "Set REG 0x8000231C: 0x%x slew_rate=%d\n", + new_value, slew_rate); + ret = woal_getset_regrdwr(priv, MLAN_ACT_SET, MLAN_REG_MAC, + 0x8000231C, &new_value); + if (ret < 0) { + PRINTM(MERROR, + "woal_getset_regrdwr get REG_MAC failed\n"); + ret = MLAN_STATUS_FAILURE; + } + } +done: + return ret; +} + +#ifdef UAP_SUPPORT +/** + * @brief set uap operation contrl value + * + * @param handle MOAL handle + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +woal_set_uap_operation_ctrl(moal_handle *handle) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + moal_private *priv = NULL; + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *req = NULL; + + ENTER(); + + priv = woal_get_priv(handle, MLAN_BSS_ROLE_UAP); + if (!priv) { + PRINTM(MERROR, + "woal_set_uap_operation_ctrl failed, no uap interface\n"); + LEAVE(); + return ret; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_UAP_OPER_CTRL; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_SET; + + bss->param.ap_oper_ctrl.ctrl_value = + (t_u16)((uap_oper_ctrl & 0xffff0000) >> 16); + bss->param.ap_oper_ctrl.chan_opt = (t_u16)(uap_oper_ctrl & 0xffff); + PRINTM(MMSG, "Uap oper_ctrl=0x%x chan_opt=0x%x\n", + bss->param.ap_oper_ctrl.ctrl_value, + bss->param.ap_oper_ctrl.chan_opt); + ret = woal_request_ioctl(priv, req, MOAL_CMD_WAIT); + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; + +} +#endif +/** + * @brief WOAL parse ASCII format data to MAC address + * + * @param handle MOAL handle + * @param data Source data + * @param size data length + * @return MLAN_STATUS_SUCCESS--success, otherwise--fail + */ +static t_u32 +woal_process_init_cfg(moal_handle *handle, t_u8 *data, t_size size) +{ + mlan_status ret = MLAN_STATUS_FAILURE; + t_u8 *pos; + t_u8 *intf_s, *intf_e; + t_u8 s[MAX_LINE_LEN]; /* 1 line data */ + t_size line_len; + t_u8 index = 0; + t_u32 i; + t_u8 bss_mac_addr[MAX_MAC_ADDR_LEN]; + t_u8 bss_mac_name[MAX_PARAM_LEN]; + t_u8 type[MAX_PARAM_LEN]; + t_u8 offset[MAX_PARAM_LEN]; + t_u8 value[MAX_PARAM_LEN]; + + ENTER(); + + while ((line_len = parse_cfg_get_line(data, size, s)) != -1) { + + pos = s; + while (*pos == ' ' || *pos == '\t') + pos++; + + if (*pos == '#' || (*pos == '\r' && *(pos + 1) == '\n') || + *pos == '\n' || *pos == '\0') + continue; /* Needn't process this line */ + + /* Process MAC addr */ + if (strncmp(pos, "mac_addr", 8) == 0) { + intf_s = strchr(pos, '='); + if (intf_s != NULL) + intf_e = strchr(intf_s, ':'); + else + intf_e = NULL; + if (intf_s != NULL && intf_e != NULL) { + strncpy(bss_mac_addr, intf_e + 1, + MAX_MAC_ADDR_LEN - 1); + bss_mac_addr[MAX_MAC_ADDR_LEN - 1] = '\0'; + if ((intf_e - intf_s) > MAX_PARAM_LEN) { + PRINTM(MERROR, + "Too long interface name %d\n", + __LINE__); + goto done; + } + strncpy(bss_mac_name, intf_s + 1, + intf_e - intf_s - 1); + bss_mac_name[intf_e - intf_s - 1] = '\0'; + for (i = 0; i < handle->priv_num; i++) { + if (strcmp + (bss_mac_name, + handle->priv[i]->netdev->name) == + 0) { + memset(handle->priv[i]-> + current_addr, 0, + ETH_ALEN); + PRINTM(MINFO, + "Interface name: %s mac: %s\n", + bss_mac_name, + bss_mac_addr); + woal_mac2u8(handle->priv[i]-> + current_addr, + bss_mac_addr); +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_CFG80211) && defined(UAP_CFG80211) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (handle->priv[i]->bss_type == + MLAN_BSS_TYPE_WIFIDIRECT) { + handle->priv[i]-> + current_addr[0] + |= 0x02; + PRINTM(MCMND, + "Set WFD device addr: " + MACSTR "\n", + MAC2STR(handle-> + priv[i]-> + current_addr)); + } +#endif +#endif +#endif + /* Set WLAN MAC addresses */ + if (MLAN_STATUS_SUCCESS != + woal_request_set_mac_address + (handle->priv[i])) { + PRINTM(MERROR, + "Set MAC address failed\n"); + goto done; + } + memcpy(handle->priv[i]->netdev-> + dev_addr, + handle->priv[i]-> + current_addr, ETH_ALEN); + index++; /* Mark found + one + interface + matching */ + } + } + } else { + PRINTM(MERROR, "Wrong config file format %d\n", + __LINE__); + goto done; + } + } + /* Process REG value */ + else if (strncmp(pos, "wlan_reg", 8) == 0) { + intf_s = strchr(pos, '='); + if (intf_s != NULL) + intf_e = strchr(intf_s, ','); + else + intf_e = NULL; + if (intf_s != NULL && intf_e != NULL) { + /* Copy type */ + strncpy(type, intf_s + 1, 1); + type[1] = '\0'; + } else { + PRINTM(MERROR, "Wrong config file format %d\n", + __LINE__); + goto done; + } + intf_s = intf_e + 1; + intf_e = strchr(intf_s, ','); + if (intf_e != NULL) { + if ((intf_e - intf_s) >= MAX_PARAM_LEN) { + PRINTM(MERROR, + "Regsier offset is too long %d\n", + __LINE__); + goto done; + } + /* Copy offset */ + strncpy(offset, intf_s, intf_e - intf_s); + offset[intf_e - intf_s] = '\0'; + } else { + PRINTM(MERROR, "Wrong config file format %d\n", + __LINE__); + goto done; + } + intf_s = intf_e + 1; + if ((strlen(intf_s) >= MAX_PARAM_LEN)) { + PRINTM(MERROR, "Regsier value is too long %d\n", + __LINE__); + goto done; + } + /* Copy value */ + strncpy(value, intf_s, strlen(intf_s)); + + if (MLAN_STATUS_SUCCESS != + woal_process_regrdwr(handle, type, offset, value)) { + PRINTM(MERROR, "Access Reg failed\n"); + goto done; + } + PRINTM(MINFO, "Reg type: %s, offset: %s, value: %s\n", + type, offset, value); + } + } + + if (index == 0) + PRINTM(MINFO, "Can't find any matching MAC Address"); + ret = MLAN_STATUS_SUCCESS; + +done: + LEAVE(); + return ret; +} + +/** + * @brief WOAL parse ASCII format raw data to hex format + * + * @param handle MOAL handle + * @param data Source data + * @param size data length + * @param wait_option wait option + * @return MLAN_STATUS_SUCCESS--success, otherwise--fail + */ +static t_u32 +woal_process_hostcmd_cfg(moal_handle *handle, t_u8 *data, t_size size, + t_u8 wait_option) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + t_u8 *pos = data; + t_u8 *intf_s, *intf_e; + t_u8 *buf = NULL; + t_u8 *ptr = NULL; + t_u32 cmd_len = 0; + t_u8 start_raw = MFALSE; + gfp_t flag; + +#define CMD_STR "MRVL_CMDhostcmd" +#define CMD_BUF_LEN 2048 + + ENTER(); + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + buf = kzalloc(CMD_BUF_LEN, flag); + if (!buf) { + PRINTM(MERROR, "Could not allocate buffer space!\n"); + goto done; + } + ptr = buf; + strcpy(ptr, CMD_STR); + ptr = buf + strlen(CMD_STR) + sizeof(t_u32); + while ((pos - data) < size) { + while (*pos == ' ' || *pos == '\t') + pos++; + if (*pos == '#') { /* Line comment */ + while (*pos != '\n') + pos++; + pos++; + } + if ((*pos == '\r' && *(pos + 1) == '\n') || + *pos == '\n' || *pos == '\0') { + pos++; + continue; /* Needn't process this line */ + } + + if (*pos == '}') { + cmd_len = + *((t_u16 *)(buf + strlen(CMD_STR) + + sizeof(t_u32) + sizeof(t_u16))); + memcpy(buf + strlen(CMD_STR), &cmd_len, sizeof(t_u32)); + + /* fire the hostcommand from here */ + woal_priv_hostcmd(handle->priv[0], buf, CMD_BUF_LEN, + wait_option); + memset(buf + strlen(CMD_STR), 0, + CMD_BUF_LEN - strlen(CMD_STR)); + ptr = buf + strlen(CMD_STR) + sizeof(t_u32); + start_raw = MFALSE; + pos++; + continue; + } + + if (start_raw == MFALSE) { + intf_s = strchr(pos, '='); + if (intf_s) + intf_e = strchr(intf_s, '{'); + else + intf_e = NULL; + + if (intf_s && intf_e) { + start_raw = MTRUE; + pos = intf_e + 1; + continue; + } + } + + if (start_raw) { + /* Raw data block exists */ + while (*pos != '\n') { + if ((*pos <= 'f' && *pos >= 'a') || + (*pos <= 'F' && *pos >= 'A') || + (*pos <= '9' && *pos >= '0')) { + *ptr++ = woal_atox(pos); + pos += 2; + } else + pos++; + } + } + } + +done: + kfree(buf); + LEAVE(); + return ret; +} + +#define INIT_CFG_DATA 0x00 +#define TXPWRLIMIT_CFG_DATA 0x01 +#define INIT_HOSTCMD_CFG_DATA 0x02 +#define COUNTRY_POWER_TABLE 0x04 + +/** + * @brief Request init conf firmware callback + * This function is invoked by request_firmware_nowait system call + * + * @param firmware A pointer to firmware image + * @param context A pointer to moal_handle structure + * + * @return N/A + */ +static void +woal_request_init_user_conf_callback(const struct firmware *firmware, + void *context) +{ + moal_handle *handle; + + ENTER(); + + handle = (moal_handle *)context; + if (firmware && handle) + handle->user_data = firmware; + else + PRINTM(MERROR, "User init config request firmware failed\n"); + + handle->init_user_conf_wait_flag = MTRUE; + wake_up_interruptible(&handle->init_user_conf_wait_q); + + LEAVE(); + return; +} + +/** + * @brief WOAL set user defined init data and param + * + * @param handle MOAL handle structure + * @param wait_option wait option + * @return MLAN_STATUS_SUCCESS--success, otherwise--fail + */ +static t_u32 +woal_set_user_init_data(moal_handle *handle, int type, t_u8 wait_option) +{ + mlan_status ret = MLAN_STATUS_FAILURE; + t_u8 *cfg_data = NULL; + t_size len; + + ENTER(); + + if (type == INIT_CFG_DATA) { + PRINTM(MMSG,"Loading init config data: %s\n",init_cfg); + if (req_fw_nowait) { + MOAL_ACQ_SEMAPHORE_BLOCK(&gUserInitDataSem); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) + if ((request_firmware_nowait + (THIS_MODULE, FW_ACTION_HOTPLUG, init_cfg, + handle->hotplug_device, GFP_KERNEL, handle, + woal_request_init_user_conf_callback)) < 0) { +#else +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 13) + if ((request_firmware_nowait + (THIS_MODULE, FW_ACTION_HOTPLUG, init_cfg, + handle->hotplug_device, handle, + woal_request_init_user_conf_callback)) < 0) { +#else + if ((request_firmware_nowait + (THIS_MODULE, init_cfg, handle->hotplug_device, + handle, + woal_request_init_user_conf_callback)) < 0) { +#endif +#endif + MOAL_REL_SEMAPHORE(&gUserInitDataSem); + PRINTM(MERROR, + "Init config file request_firmware_nowait(%s) failed\n",init_cfg); + goto done; + } + handle->init_user_conf_wait_flag = MFALSE; + wait_event_interruptible(handle->init_user_conf_wait_q, + handle-> + init_user_conf_wait_flag); + } else { + if ((request_firmware + (&handle->user_data, init_cfg, + handle->hotplug_device)) < 0) { + PRINTM(MERROR, + "Init config file request_firmware(%s) failed\n",init_cfg); + goto done; + } + } + } else if (type == TXPWRLIMIT_CFG_DATA) { + PRINTM(MMSG,"Loading tx power limit config: %s\n",txpwrlimit_cfg); + if (req_fw_nowait) { + MOAL_ACQ_SEMAPHORE_BLOCK(&gUserInitDataSem); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) + if ((request_firmware_nowait + (THIS_MODULE, FW_ACTION_HOTPLUG, txpwrlimit_cfg, + handle->hotplug_device, GFP_KERNEL, handle, + woal_request_init_user_conf_callback)) < 0) { +#else +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 13) + if ((request_firmware_nowait + (THIS_MODULE, FW_ACTION_HOTPLUG, txpwrlimit_cfg, + handle->hotplug_device, handle, + woal_request_init_user_conf_callback)) < 0) { +#else + if ((request_firmware_nowait + (THIS_MODULE, txpwrlimit_cfg, + handle->hotplug_device, handle, + woal_request_init_user_conf_callback)) < 0) { +#endif +#endif + MOAL_REL_SEMAPHORE(&gUserInitDataSem); + PRINTM(MERROR, + "txpwrlimit config file request_firmware_nowait(%s) failed\n",txpwrlimit_cfg); + goto done; + } + handle->init_user_conf_wait_flag = MFALSE; + wait_event_interruptible(handle->init_user_conf_wait_q, + handle-> + init_user_conf_wait_flag); + } else { + if ((request_firmware + (&handle->user_data, txpwrlimit_cfg, + handle->hotplug_device)) < 0) { + PRINTM(MERROR, + "txpwrlimit config file request_firmware(%s) failed\n",txpwrlimit_cfg); + goto done; + } + } + } else if (type == COUNTRY_POWER_TABLE) { + PRINTM(MMSG,"Loading country power table: %s\n",country_txpwrlimit); + if (req_fw_nowait) { + MOAL_ACQ_SEMAPHORE_BLOCK(&gUserInitDataSem); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) + if ((request_firmware_nowait + (THIS_MODULE, FW_ACTION_HOTPLUG, + country_txpwrlimit, handle->hotplug_device, + GFP_KERNEL, handle, + woal_request_init_user_conf_callback)) < 0) { +#else +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 13) + if ((request_firmware_nowait + (THIS_MODULE, FW_ACTION_HOTPLUG, + country_txpwrlimit, handle->hotplug_device, + handle, + woal_request_init_user_conf_callback)) < 0) { +#else + if ((request_firmware_nowait + (THIS_MODULE, country_txpwrlimit, + handle->hotplug_device, handle, + woal_request_init_user_conf_callback)) < 0) { +#endif +#endif + MOAL_REL_SEMAPHORE(&gUserInitDataSem); + PRINTM(MERROR, + "country txpwrlimit config file request_firmware_nowait(%s) failed\n",country_txpwrlimit); + goto done; + } + handle->init_user_conf_wait_flag = MFALSE; + wait_event_interruptible(handle->init_user_conf_wait_q, + handle-> + init_user_conf_wait_flag); + } else { + int status = + request_firmware(&handle->user_data, + country_txpwrlimit, + handle->hotplug_device); + /* File does not exist, skip download */ + if (status == -ENOENT) { + PRINTM(MIOCTL, + "Country power table file %s does not exist\n",country_txpwrlimit); + ret = MLAN_STATUS_SUCCESS; + } else if (status) { + PRINTM(MERROR, + "country txpwrlimit config file request_firmware(%s) failed\n",country_txpwrlimit); + goto done; + } + } + } else if (type == INIT_HOSTCMD_CFG_DATA) { + PRINTM(MMSG,"Loading init hostcmd config data: %s\n",init_hostcmd_cfg); + if (req_fw_nowait) { + MOAL_ACQ_SEMAPHORE_BLOCK(&gUserInitDataSem); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) + if ((request_firmware_nowait + (THIS_MODULE, FW_ACTION_HOTPLUG, init_hostcmd_cfg, + handle->hotplug_device, GFP_KERNEL, handle, + woal_request_init_user_conf_callback)) < 0) { +#else +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 13) + if ((request_firmware_nowait + (THIS_MODULE, FW_ACTION_HOTPLUG, init_hostcmd_cfg, + handle->hotplug_device, handle, + woal_request_init_user_conf_callback)) < 0) { +#else + if ((request_firmware_nowait + (THIS_MODULE, init_hostcmd_cfg, + handle->hotplug_device, handle, + woal_request_init_user_conf_callback)) < 0) { +#endif +#endif + MOAL_REL_SEMAPHORE(&gUserInitDataSem); + PRINTM(MERROR, + "Init hostcmd config file request_firmware_nowait(%s) failed\n",init_hostcmd_cfg); + goto done; + } + handle->init_user_conf_wait_flag = MFALSE; + wait_event_interruptible(handle->init_user_conf_wait_q, + handle-> + init_user_conf_wait_flag); + } else { + if ((request_firmware + (&handle->user_data, init_hostcmd_cfg, + handle->hotplug_device)) < 0) { + PRINTM(MERROR, + "Init hostcmd config file request_firmware(%s) failed\n",init_hostcmd_cfg); + goto done; + } + } + } + + if (handle->user_data) { + cfg_data = (t_u8 *)(handle->user_data)->data; + len = (handle->user_data)->size; + if (type == INIT_CFG_DATA) { + if (MLAN_STATUS_SUCCESS != + woal_process_init_cfg(handle, cfg_data, len)) { + PRINTM(MERROR, + "Can't process init config file\n"); + goto done; + } + } else if (type == TXPWRLIMIT_CFG_DATA || + type == INIT_HOSTCMD_CFG_DATA || + type == COUNTRY_POWER_TABLE) { + if (MLAN_STATUS_SUCCESS != + woal_process_hostcmd_cfg(handle, cfg_data, len, + wait_option)) { + PRINTM(MERROR, + "Can't process hostcmd config file\n"); + goto done; + } + } + ret = MLAN_STATUS_SUCCESS; + } + +done: + if (handle->user_data) { + release_firmware(handle->user_data); + handle->user_data = NULL; + } + if (req_fw_nowait) { + MOAL_REL_SEMAPHORE(&gUserInitDataSem); + } + LEAVE(); + return ret; +} + +/** + * @brief Add interfaces DPC + * + * @param handle A pointer to moal_handle structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +woal_add_card_dpc(moal_handle *handle) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + int i; + char str_buf[MLAN_MAX_VER_STR_LEN]; + + ENTER(); + +#ifdef CONFIG_PROC_FS + /* Initialize proc fs */ + woal_proc_init(handle); +#endif /* CONFIG_PROC_FS */ + + /* Add interfaces */ + for (i = 0; i < handle->drv_mode.intf_num; i++) { + if (handle->drv_mode.bss_attr[i].bss_virtual) + continue; + if (!woal_add_interface + (handle, handle->priv_num, + handle->drv_mode.bss_attr[i].bss_type)) { + PRINTM(MFATAL, "%s: woal_add_interface failure\n", __func__); + ret = MLAN_STATUS_FAILURE; + goto err; + } + } + woal_get_version(handle, str_buf, sizeof(str_buf) - 1); + PRINTM(MMSG, "wlan: version = %s\n", str_buf); + register_inetaddr_notifier(&woal_notifier); + if (init_cfg) { + if (MLAN_STATUS_SUCCESS != + woal_set_user_init_data(handle, INIT_CFG_DATA, + MOAL_CMD_WAIT)) { + PRINTM(MFATAL, "Set user init data and param failed\n"); + ret = MLAN_STATUS_FAILURE; + goto err; + } + } + if (txpwrlimit_cfg) { + if (MLAN_STATUS_SUCCESS != + woal_set_user_init_data(handle, TXPWRLIMIT_CFG_DATA, + MOAL_CMD_WAIT)) { + PRINTM(MFATAL, + "Set user tx power limit data and param failed\n"); + ret = MLAN_STATUS_FAILURE; + goto err; + } + } + if (init_hostcmd_cfg) { + if (MLAN_STATUS_SUCCESS != + woal_set_user_init_data(handle, INIT_HOSTCMD_CFG_DATA, + MOAL_CMD_WAIT)) { + PRINTM(MFATAL, + "Set user init hostcmd data and param failed\n"); + ret = MLAN_STATUS_FAILURE; + goto err; + } + } + /* Add low power mode check */ + if ((handle->card_type == CARD_TYPE_SD8801 || + handle->card_type == CARD_TYPE_SD8887) && low_power_mode_enable && + woal_set_low_pwr_mode(handle, MOAL_CMD_WAIT)) { + /* Proceed with Warning */ + PRINTM(MERROR, "Unable to set Low Power Mode\n"); + } + + if (handle->card_type == CARD_TYPE_SD8801) + woal_set_sdio_slew_rate(handle); + + /* Avoiding setting of antcfg as mfg firmware + * currently does not support this option */ + if (mfg_mode == MLAN_INIT_PARA_ENABLED) + PRINTM(MMSG,"mfg_mode set, skipping antcfg setting!\n"); + else if (antcfg && (handle->card_type == CARD_TYPE_SD8887)){ + if (MLAN_STATUS_SUCCESS != + woal_set_user_antcfg(handle, MOAL_CMD_WAIT)) { + PRINTM(MFATAL, "Set user antcfg data failed\n"); + ret = MLAN_STATUS_FAILURE; + goto err; + } + } +#ifdef UAP_SUPPORT + if (uap_oper_ctrl) + woal_set_uap_operation_ctrl(handle); +#endif + +err: + if (ret != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "Failed to add interface\n"); + unregister_inetaddr_notifier(&woal_notifier); + for (i = 0; i < handle->priv_num; i++) + woal_remove_interface(handle, i); + handle->priv_num = 0; +#ifdef CONFIG_PROC_FS + woal_proc_exit(handle); +#endif + } + + PRINTM(MMSG, "%s: done\n", __func__); + LEAVE(); + return ret; +} + +/** + * @brief Download and Initialize firmware DPC + * + * @param handle A pointer to moal_handle structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +woal_init_fw_dpc(moal_handle *handle) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_fw_image fw; + + mlan_init_param param; + + ENTER(); + + if (handle->firmware) { + memset(&fw, 0, sizeof(mlan_fw_image)); + fw.pfw_buf = (t_u8 *)handle->firmware->data; + fw.fw_len = handle->firmware->size; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) + sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + ret = mlan_dnld_fw(handle->pmlan_adapter, &fw); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) + sdio_release_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + if (ret == MLAN_STATUS_FAILURE) { + PRINTM(MERROR, "WLAN: Download FW with nowwait: %d\n", + req_fw_nowait); + goto done; + } + PRINTM(MMSG, "WLAN FW is active\n"); + } + + /** Cal data request */ + memset(¶m, 0, sizeof(mlan_init_param)); + if (cal_data_cfg && strncmp(cal_data_cfg, "none", strlen("none"))) { + if (req_fw_nowait) { + MOAL_ACQ_SEMAPHORE_BLOCK(&gUserInitDataSem); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) + if ((request_firmware_nowait + (THIS_MODULE, FW_ACTION_HOTPLUG, cal_data_cfg, + handle->hotplug_device, GFP_KERNEL, handle, + woal_request_init_user_conf_callback)) < 0) { +#else +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 13) + if ((request_firmware_nowait + (THIS_MODULE, FW_ACTION_HOTPLUG, cal_data_cfg, + handle->hotplug_device, handle, + woal_request_init_user_conf_callback)) < 0) { +#else + if ((request_firmware_nowait + (THIS_MODULE, cal_data_cfg, handle->hotplug_device, + handle, + woal_request_init_user_conf_callback)) < 0) { +#endif +#endif + PRINTM(MERROR, + "Cal data request_firmware_nowait() failed\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + handle->init_user_conf_wait_flag = MFALSE; + wait_event_interruptible(handle->init_user_conf_wait_q, + handle-> + init_user_conf_wait_flag); + } else { + if ((request_firmware + (&handle->user_data, cal_data_cfg, + handle->hotplug_device)) < 0) { + PRINTM(MERROR, + "Cal data request_firmware() failed\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + } + } else if (!cal_data_cfg) { + if (handle->card_type == CARD_TYPE_SD8887) { + PRINTM(MERROR, "Please add cal_data_cfg for 8887\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + } + + if (handle->user_data) { + param.pcal_data_buf = (t_u8 *)handle->user_data->data; + param.cal_data_len = handle->user_data->size; + } + + handle->hardware_status = HardwareStatusFwReady; + if (ret != MLAN_STATUS_SUCCESS) + goto done; + if (handle->fw_reload) + goto done; + handle->init_wait_q_woken = MFALSE; + + ret = mlan_set_init_param(handle->pmlan_adapter, ¶m); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) + sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + ret = mlan_init_fw(handle->pmlan_adapter); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) + sdio_release_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + if (ret == MLAN_STATUS_FAILURE) + goto done; + else if (ret == MLAN_STATUS_SUCCESS) { + handle->hardware_status = HardwareStatusReady; + goto done; + } + /* Wait for mlan_init to complete */ + wait_event_interruptible(handle->init_wait_q, + handle->init_wait_q_woken); + if (handle->hardware_status != HardwareStatusReady) { + woal_moal_debug_info(woal_get_priv(handle, MLAN_BSS_ROLE_ANY), + handle, MTRUE); +#if defined(DEBUG_LEVEL1) + if (drvdbg & MFW_D) { + drvdbg &= ~MFW_D; + woal_dump_firmware_info(handle); + } +#endif + ret = MLAN_STATUS_FAILURE; + goto done; + } + ret = MLAN_STATUS_SUCCESS; +done: + if (handle->user_data) { + release_firmware(handle->user_data); + handle->user_data = NULL; + } + if (req_fw_nowait) { + MOAL_REL_SEMAPHORE(&gUserInitDataSem); + //CalData is downloaded. Signalling BT to resume init. + MOAL_REL_SEMAPHORE(&gWiFiInitSem); + } + LEAVE(); + return ret; +} + +/** + * @brief Request firmware DPC + * + * @param handle A pointer to moal_handle structure + * @param firmware A pointer to firmware image + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +woal_request_fw_dpc(moal_handle *handle, const struct firmware *firmware) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + struct timeval tstamp; + + ENTER(); + + if (!firmware) { + do_gettimeofday(&tstamp); + if (tstamp.tv_sec > + (handle->req_fw_time.tv_sec + REQUEST_FW_TIMEOUT)) { + PRINTM(MERROR, + "No firmware image found. Skipping download\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + PRINTM(MERROR, + "request_firmware_nowait failed for %s. Retrying..\n", + handle->drv_mode.fw_name); + woal_sched_timeout(MOAL_TIMER_1S); + woal_request_fw(handle); + LEAVE(); + return ret; + } + handle->firmware = firmware; + + ret = woal_init_fw_dpc(handle); + if (ret) { + PRINTM(MFATAL, "%s: woal_init_fw_dpc failed: %d\n", + __func__, ret); + goto done; + } + + ret = woal_add_card_dpc(handle); + if (ret) { + PRINTM(MFATAL, "%s: woal_add_card_dpc failed: %d\n", + __func__, ret); + goto done; + } +done: + /* We should hold the semaphore until callback finishes execution */ + MOAL_REL_SEMAPHORE(&AddRemoveCardSem); + LEAVE(); + return ret; +} + +/** + * @brief Request firmware callback + * This function is invoked by request_firmware_nowait system call + * + * @param firmware A pointer to firmware image + * @param context A pointer to moal_handle structure + * + * @return N/A + */ +static void +woal_request_fw_callback(const struct firmware *firmware, void *context) +{ + ENTER(); + woal_request_fw_dpc((moal_handle *)context, firmware); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) + if (firmware) + release_firmware(firmware); +#endif + LEAVE(); + return; +} + +#define SD8887_REV_REG 0xc8 +#define SD8887_A0 0x0 +#define SD8887_A2 0x2 +/** + * @brief Get FW name for differnt chip revision + * + * @param handle A pointer to moal_handle structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +void +woal_check_fw_name(moal_handle *handle) +{ + t_u32 rev_id_reg = 0; + t_u32 revision_id = 0; + + if (handle->card_type == CARD_TYPE_SD8887) + rev_id_reg = SD8887_REV_REG; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) + sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + woal_read_reg(handle, rev_id_reg, &revision_id); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) + sdio_release_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + /* Check revision ID */ + if (handle->card_type == CARD_TYPE_SD8887) { + switch (revision_id) { + case SD8887_A0: + if (fw_serial) + handle->drv_mode.fw_name = SD8887_A0_FW_NAME; + else + handle->drv_mode.fw_name = + SD8887_WLAN_A0_FW_NAME; + break; + case SD8887_A2: + if (fw_serial) + handle->drv_mode.fw_name = SD8887_A2_FW_NAME; + else + handle->drv_mode.fw_name = + SD8887_WLAN_A2_FW_NAME; + break; + default: + break; + } + } + return; +} + +/** + * @brief Download firmware using helper + * + * @param handle A pointer to moal_handle structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_request_fw(moal_handle *handle) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + int err; + + ENTER(); + + if ( +#ifdef MFG_CMD_SUPPORT + mfg_mode != MLAN_INIT_PARA_ENABLED && +#endif + !fw_name && handle->card_type == CARD_TYPE_SD8887) + woal_check_fw_name(handle); + + PRINTM(MINFO,"%s(): Attempting to load %s\n",__FUNCTION__, + handle->drv_mode.fw_name); + + if (req_fw_nowait) { +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) + PRINTM(MERROR, " %s():%d Downloading WiFi FW\n",__FUNCTION__,__LINE__); + err = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, + handle->drv_mode.fw_name, + handle->hotplug_device, + GFP_KERNEL, handle, + woal_request_fw_callback); +#else +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 13) + err = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, + handle->drv_mode.fw_name, + handle->hotplug_device, handle, + woal_request_fw_callback); +#else + err = request_firmware_nowait(THIS_MODULE, + handle->drv_mode.fw_name, + handle->hotplug_device, handle, + woal_request_fw_callback); +#endif +#endif + if (err < 0) { + PRINTM(MFATAL, + "WLAN: request_firmware_nowait() failed, error code = %d\n", + err); + ret = MLAN_STATUS_FAILURE; + } + } else { + PRINTM(MERROR, " %s():%d Downloading WiFi FW(sync)\n",__FUNCTION__,__LINE__); + err = request_firmware(&handle->firmware, + handle->drv_mode.fw_name, + handle->hotplug_device); + if (err < 0) { + PRINTM(MFATAL, + "WLAN: request_firmware() failed, error code = %d\n", + err); + ret = MLAN_STATUS_FAILURE; + } else { + if (handle->fw_reload) + ret = woal_init_fw_dpc(handle); + else + ret = woal_request_fw_dpc(handle, + handle->firmware); + release_firmware(handle->firmware); + } + } + + LEAVE(); + return ret; +} + +/** + * @brief This function initializes firmware + * + * @param handle A pointer to moal_handle structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +woal_init_fw(moal_handle *handle) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + do_gettimeofday(&handle->req_fw_time); + + ret = woal_request_fw(handle); + if (ret < 0) { + PRINTM(MFATAL, "woal_request_fw failed\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief This function will fill in the mlan_buffer + * + * @param pmbuf A pointer to mlan_buffer + * @param skb A pointer to struct sk_buff + * + * @return N/A + */ +static void +woal_fill_mlan_buffer(moal_private *priv, + mlan_buffer *pmbuf, struct sk_buff *skb) +{ + struct timeval tstamp; + struct ethhdr *eth; + t_u8 tid; + + ENTER(); + /* + * skb->priority values from 256->263 are magic values to + * directly indicate a specific 802.1d priority. This is used + * to allow 802.1d priority to be passed directly in from VLAN + * tags, etc. + */ + if (IS_SKB_MAGIC_VLAN(skb)) { + tid = GET_VLAN_PRIO(skb); + } else { + eth = (struct ethhdr *)skb->data; + + switch (eth->h_proto) { + case __constant_htons(ETH_P_IP): + tid = (IPTOS_PREC(SKB_TOS(skb)) >> IPTOS_OFFSET); + PRINTM(MDAT_D, + "packet type ETH_P_IP: %04x, tid=%#x prio=%#x\n", + eth->h_proto, tid, skb->priority); + break; + case __constant_htons(ETH_P_IPV6): + tid = SKB_TIDV6(skb); + PRINTM(MDAT_D, + "packet type ETH_P_IPV6: %04x, tid=%#x prio=%#x\n", + eth->h_proto, tid, skb->priority); + break; + case __constant_htons(ETH_P_ARP): + PRINTM(MDATA, "ARP packet %04x\n", eth->h_proto); + tid = 0; + break; + default: + tid = 0; + break; + } + } + skb->priority = tid; + + /* Record the current time the packet was queued; used to determine the + amount of time the packet was queued in the driver before it was + sent to the firmware. The delay is then sent along with the packet + to the firmware for aggregate delay calculation for stats and MSDU + lifetime expiry. */ + do_gettimeofday(&tstamp); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) + skb->tstamp = timeval_to_ktime(tstamp); +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) + skb_set_timestamp(skb, &tstamp); +#else + memcpy(&skb->stamp, &tstamp, sizeof(skb->stamp)); +#endif + + pmbuf->pdesc = skb; + pmbuf->pbuf = skb->head + sizeof(mlan_buffer); + pmbuf->data_offset = skb->data - (skb->head + sizeof(mlan_buffer)); + pmbuf->data_len = skb->len; + pmbuf->priority = skb->priority; + pmbuf->buf_type = 0; + pmbuf->in_ts_sec = (t_u32)tstamp.tv_sec; + pmbuf->in_ts_usec = (t_u32)tstamp.tv_usec; + + LEAVE(); + return; +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) +static struct device_type wlan_type = {.name = "wlan", }; +#endif + +#ifdef STA_SUPPORT +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) +/** Network device handlers */ +const struct net_device_ops woal_netdev_ops = { + .ndo_open = woal_open, + .ndo_start_xmit = woal_hard_start_xmit, + .ndo_stop = woal_close, + .ndo_do_ioctl = woal_do_ioctl, + .ndo_set_mac_address = woal_set_mac_address, + .ndo_tx_timeout = woal_tx_timeout, + .ndo_get_stats = woal_get_stats, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) + .ndo_set_rx_mode = woal_set_multicast_list, +#else + .ndo_set_multicast_list = woal_set_multicast_list, +#endif + .ndo_select_queue = woal_select_queue, +}; +#endif + +/** + * @brief This function initializes the private structure + * and dev structure for station mode + * + * @param dev A pointer to net_device structure + * @param priv A pointer to moal_private structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +woal_init_sta_dev(struct net_device *dev, moal_private *priv) +{ + ENTER(); + + /* Setup the OS Interface to our functions */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 29) + dev->open = woal_open; + dev->hard_start_xmit = woal_hard_start_xmit; + dev->stop = woal_close; + dev->do_ioctl = woal_do_ioctl; + dev->set_mac_address = woal_set_mac_address; + dev->tx_timeout = woal_tx_timeout; + dev->get_stats = woal_get_stats; + dev->set_multicast_list = woal_set_multicast_list; +#else + dev->netdev_ops = &woal_netdev_ops; +#endif + dev->watchdog_timeo = MRVDRV_DEFAULT_WATCHDOG_TIMEOUT; + dev->hard_header_len += MLAN_MIN_DATA_HEADER_LEN + sizeof(mlan_buffer) + + priv->extra_tx_head_len; +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) { +#if WIRELESS_EXT < 21 + dev->get_wireless_stats = woal_get_wireless_stats; +#endif + dev->wireless_handlers = + (struct iw_handler_def *)&woal_handler_def; + } +#endif + dev->flags |= IFF_BROADCAST | IFF_MULTICAST; + + /* Initialize private structure */ + init_waitqueue_head(&priv->ioctl_wait_q); + init_waitqueue_head(&priv->cmd_wait_q); +#ifdef CONFIG_PROC_FS + init_waitqueue_head(&priv->proc_wait_q); +#endif +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + init_waitqueue_head(&priv->w_stats_wait_q); +#endif +#ifdef STA_CFG80211 + if (IS_STA_CFG80211(cfg80211_wext)) + init_waitqueue_head(&priv->ft_wait_q); +#endif + LEAVE(); + return MLAN_STATUS_SUCCESS; +} +#endif /* STA_SUPPORT */ + +#ifdef UAP_SUPPORT +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) +/** Network device handlers */ +const struct net_device_ops woal_uap_netdev_ops = { + .ndo_open = woal_open, + .ndo_start_xmit = woal_hard_start_xmit, + .ndo_stop = woal_close, + .ndo_do_ioctl = woal_uap_do_ioctl, + .ndo_set_mac_address = woal_set_mac_address, + .ndo_tx_timeout = woal_tx_timeout, + .ndo_get_stats = woal_get_stats, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) + .ndo_set_rx_mode = woal_uap_set_multicast_list, +#else + .ndo_set_multicast_list = woal_uap_set_multicast_list, +#endif + .ndo_select_queue = woal_select_queue, +}; +#endif + +/** + * @brief This function initializes the private structure + * and dev structure for uap mode + * + * @param dev A pointer to net_device structure + * @param priv A pointer to moal_private structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +woal_init_uap_dev(struct net_device *dev, moal_private *priv) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Setup the OS Interface to our functions */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 29) + dev->open = woal_open; + dev->hard_start_xmit = woal_hard_start_xmit; + dev->stop = woal_close; + dev->set_mac_address = woal_set_mac_address; + dev->tx_timeout = woal_tx_timeout; + dev->get_stats = woal_get_stats; + dev->do_ioctl = woal_uap_do_ioctl; + dev->set_multicast_list = woal_uap_set_multicast_list; +#else + dev->netdev_ops = &woal_uap_netdev_ops; +#endif + dev->watchdog_timeo = MRVDRV_DEFAULT_UAP_WATCHDOG_TIMEOUT; + dev->hard_header_len += MLAN_MIN_DATA_HEADER_LEN + sizeof(mlan_buffer) + + priv->extra_tx_head_len; +#ifdef UAP_WEXT + if (IS_UAP_WEXT(cfg80211_wext)) { +#if WIRELESS_EXT < 21 + dev->get_wireless_stats = woal_get_uap_wireless_stats; +#endif + dev->wireless_handlers = + (struct iw_handler_def *)&woal_uap_handler_def; + } +#endif /* UAP_WEXT */ + dev->flags |= IFF_BROADCAST | IFF_MULTICAST; + + /* Initialize private structure */ + init_waitqueue_head(&priv->ioctl_wait_q); + init_waitqueue_head(&priv->cmd_wait_q); +#ifdef CONFIG_PROC_FS + init_waitqueue_head(&priv->proc_wait_q); +#endif +#ifdef UAP_WEXT + if (IS_UAP_WEXT(cfg80211_wext)) + init_waitqueue_head(&priv->w_stats_wait_q); +#endif + + LEAVE(); + return status; +} +#endif /* UAP_SUPPORT */ + +/** + * @brief This function adds a new interface. It will + * allocate, initialize and register the device. + * + * @param handle A pointer to moal_handle structure + * @param bss_index BSS index number + * @param bss_type BSS type + * + * @return A pointer to the new priv structure + */ +moal_private * +woal_add_interface(moal_handle *handle, t_u8 bss_index, t_u8 bss_type) +{ + struct net_device *dev = NULL; + moal_private *priv = NULL; + char name[256]; + int i = 0; + + ENTER(); + +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) +#define MAX_WMM_QUEUE 4 + /* Allocate an Ethernet device */ + dev = alloc_etherdev_mq(sizeof(moal_private), MAX_WMM_QUEUE); +#else + dev = alloc_etherdev(sizeof(moal_private)); +#endif + if (!dev) { + PRINTM(MFATAL, "Init virtual ethernet device failed\n"); + goto error; + } + /* Allocate device name */ +#ifdef STA_SUPPORT + memset(name, 0, sizeof(name)); + if (sta_name) + snprintf(name, sizeof(name), "%s%%d", sta_name); + else + sprintf(name, "mlan%%d"); + if ((bss_type == MLAN_BSS_TYPE_STA) && (dev_alloc_name(dev, name) < 0)) { + PRINTM(MERROR, "Could not allocate mlan device name\n"); + goto error; + } +#endif +#ifdef UAP_SUPPORT + memset(name, 0, sizeof(name)); + if (uap_name) + snprintf(name, sizeof(name), "%s%%d", uap_name); + else + sprintf(name, "uap%%d"); + if ((bss_type == MLAN_BSS_TYPE_UAP) && (dev_alloc_name(dev, name) < 0)) { + PRINTM(MERROR, "Could not allocate uap device name\n"); + goto error; + } +#endif +#if defined(WIFI_DIRECT_SUPPORT) + memset(name, 0, sizeof(name)); + if (wfd_name) + snprintf(name, sizeof(name), "%s%%d", wfd_name); + else + sprintf(name, "wfd%%d"); + if ((bss_type == MLAN_BSS_TYPE_WIFIDIRECT) && + (dev_alloc_name(dev, name) < 0)) { + PRINTM(MERROR, "Could not allocate wifidirect device name\n"); + goto error; + } +#endif + priv = (moal_private *)netdev_priv(dev); + /* Save the priv to handle */ + handle->priv[bss_index] = priv; + + /* Use the same handle structure */ + priv->phandle = handle; + priv->netdev = dev; + priv->bss_index = bss_index; + priv->bss_type = bss_type; + priv->extra_tx_head_len = 0; + if (bss_type == MLAN_BSS_TYPE_STA) + priv->bss_role = MLAN_BSS_ROLE_STA; + else if (bss_type == MLAN_BSS_TYPE_UAP) + priv->bss_role = MLAN_BSS_ROLE_UAP; +#if defined(WIFI_DIRECT_SUPPORT) + else if (bss_type == MLAN_BSS_TYPE_WIFIDIRECT) + priv->bss_role = MLAN_BSS_ROLE_STA; +#endif + + INIT_LIST_HEAD(&priv->tcp_sess_queue); + spin_lock_init(&priv->tcp_sess_lock); +#ifdef STA_SUPPORT + INIT_LIST_HEAD(&priv->tdls_list); + spin_lock_init(&priv->tdls_lock); +#endif + + INIT_LIST_HEAD(&priv->tx_stat_queue); + spin_lock_init(&priv->tx_stat_lock); +#ifdef STA_CFG80211 +#ifdef STA_SUPPORT + spin_lock_init(&priv->connect_lock); +#endif +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) + SET_MODULE_OWNER(dev); +#endif +#ifdef STA_SUPPORT + if (bss_type == MLAN_BSS_TYPE_STA +#if defined(WIFI_DIRECT_SUPPORT) + || bss_type == MLAN_BSS_TYPE_WIFIDIRECT +#endif + ) + woal_init_sta_dev(dev, priv); +#endif +#ifdef UAP_SUPPORT + if (bss_type == MLAN_BSS_TYPE_UAP) { + if (MLAN_STATUS_SUCCESS != woal_init_uap_dev(dev, priv)) { + PRINTM(MERROR, "%s: woal_init_uap_dev failed\n", + __func__); + goto error; + } + } +#endif + handle->priv_num++; +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + if (!priv->phandle->wiphy && IS_STA_OR_UAP_CFG80211(cfg80211_wext)) { + if (woal_register_cfg80211(priv)) { + PRINTM(MERROR, "Cannot register with cfg80211\n"); + goto error; + } + } +#endif + +#ifdef STA_CFG80211 +#ifdef STA_SUPPORT + if ((priv->bss_role == MLAN_BSS_ROLE_STA) && + IS_STA_CFG80211(cfg80211_wext)) { + if (bss_type == MLAN_BSS_TYPE_STA +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + || bss_type == MLAN_BSS_TYPE_WIFIDIRECT +#endif +#endif + ) + /* Register cfg80211 for STA or Wifi direct */ + if (woal_register_sta_cfg80211(dev, bss_type)) { + PRINTM(MERROR, + "Cannot register STA with cfg80211\n"); + goto error; + } + } +#endif /* STA_SUPPORT */ +#endif /* STA_CFG80211 */ +#ifdef UAP_CFG80211 +#ifdef UAP_SUPPORT + if ((priv->bss_role == MLAN_BSS_ROLE_UAP) && + IS_UAP_CFG80211(cfg80211_wext)) { + /* Register cfg80211 for UAP */ + if (woal_register_uap_cfg80211(dev, bss_type)) { + PRINTM(MERROR, "Cannot register UAP with cfg80211\n"); + goto error; + } + } +#endif +#endif /* UAP_CFG80211 */ + + /* Initialize priv structure */ + woal_init_priv(priv, MOAL_CMD_WAIT); + +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + SET_NETDEV_DEV(dev, handle->hotplug_device); +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) + SET_NETDEV_DEVTYPE(dev, &wlan_type); +#endif + + /* Register network device */ + if (register_netdev(dev)) { + PRINTM(MERROR, "Cannot register virtual network device\n"); + goto error; + } + netif_carrier_off(dev); + woal_stop_queue(dev); + + PRINTM(MMSG, "%s: %s: Marvell 802.11 Adapter\n", __func__, dev->name); + /* Set MAC address from the insmod command line */ + if (handle->set_mac_addr) { + memset(priv->current_addr, 0, ETH_ALEN); + memcpy(priv->current_addr, handle->mac_addr, ETH_ALEN); +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_CFG80211) && defined(UAP_CFG80211) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) { + priv->current_addr[0] |= 0x02; + PRINTM(MCMND, "Set WFD device addr: " MACSTR "\n", + MAC2STR(priv->current_addr)); + } +#endif +#endif +#endif + + if (MLAN_STATUS_SUCCESS != woal_request_set_mac_address(priv)) { + PRINTM(MERROR, "Set MAC address failed\n"); + goto error; + } + memcpy(dev->dev_addr, priv->current_addr, ETH_ALEN); + } + if (bss_type == MLAN_BSS_TYPE_STA || + priv->bss_type == MLAN_BSS_TYPE_UAP) { + for(i = 0; i < handle->histogram_table_num; i++) + priv->hist_data[i] = + kmalloc(sizeof(hgm_data), GFP_KERNEL); + if (priv->hist_data) + woal_hist_data_reset(priv); + } +#ifdef CONFIG_PROC_FS + woal_create_proc_entry(priv); +#ifdef PROC_DEBUG + woal_debug_entry(priv); +#endif /* PROC_DEBUG */ +#endif /* CONFIG_PROC_FS */ + + LEAVE(); + return priv; +error: + handle->priv_num = bss_index; +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + /* Unregister wiphy device and free */ + if (priv) { + if (priv->wdev && IS_STA_OR_UAP_CFG80211(cfg80211_wext)) + priv->wdev = NULL; + } +#endif + if (dev && dev->reg_state == NETREG_REGISTERED) + unregister_netdev(dev); + if (dev) + free_netdev(dev); + LEAVE(); + return NULL; +} + +/** + * @brief This function removes an interface. + * + * @param handle A pointer to the moal_handle structure + * @param bss_index BSS index number + * + * @return N/A + */ +void +woal_remove_interface(moal_handle *handle, t_u8 bss_index) +{ + struct net_device *dev = NULL; + moal_private *priv = handle->priv[bss_index]; +#if defined(STA_WEXT) || defined(UAP_WEXT) + union iwreq_data wrqu; +#endif + int i = 0; + + ENTER(); + if (!priv || !priv->netdev) + goto error; + dev = priv->netdev; + + if (priv->media_connected == MTRUE) { + priv->media_connected = MFALSE; +#if defined(STA_WEXT) || defined(UAP_WEXT) + if (IS_STA_OR_UAP_WEXT(cfg80211_wext) && + GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) { + memset(wrqu.ap_addr.sa_data, 0x00, ETH_ALEN); + wrqu.ap_addr.sa_family = ARPHRD_ETHER; + wireless_send_event(priv->netdev, SIOCGIWAP, &wrqu, + NULL); + } +#endif + } + woal_flush_tcp_sess_queue(priv); + + woal_flush_tx_stat_queue(priv); + + if (priv->bss_type == MLAN_BSS_TYPE_STA) + woal_flush_tdls_list(priv); + if (priv->bss_type == MLAN_BSS_TYPE_STA || + priv->bss_type == MLAN_BSS_TYPE_UAP) { + for(i = 0; i < handle->histogram_table_num; i++){ + kfree(priv->hist_data[i]); + priv->hist_data[i] = NULL; + } + } +#ifdef CONFIG_PROC_FS +#ifdef PROC_DEBUG + /* Remove proc debug */ + woal_debug_remove(priv); +#endif /* PROC_DEBUG */ + woal_proc_remove(priv); +#endif /* CONFIG_PROC_FS */ + /* Last reference is our one */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) + PRINTM(MINFO, "refcnt = %d\n", atomic_read(&dev->refcnt)); +#else + PRINTM(MINFO, "refcnt = %d\n", netdev_refcnt_read(dev)); +#endif + + PRINTM(MINFO, "netdev_finish_unregister: %s\n", dev->name); + + if (dev->reg_state == NETREG_REGISTERED) + unregister_netdev(dev); + +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + /* Unregister wiphy device and free */ + if (priv->wdev && IS_STA_OR_UAP_CFG80211(cfg80211_wext)) + priv->wdev = NULL; +#endif + + /* Clear the priv in handle */ + priv->phandle->priv[priv->bss_index] = NULL; + priv->phandle = NULL; + priv->netdev = NULL; + free_netdev(dev); +error: + LEAVE(); + return; +} + +/** + * @brief Configure antcfg + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, + * otherwise fail + */ +mlan_status +woal_set_user_antcfg(moal_handle *handle, t_u8 wait_option) +{ + moal_private *priv = NULL; + mlan_ioctl_req *req = NULL; + mlan_ds_radio_cfg *radio = NULL; + mlan_status status; + + ENTER(); + + priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY); + + /* Allocate an IOCTL request buffer */ + req = (mlan_ioctl_req *) + woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_radio_cfg)); + if (req == NULL) { + status = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + radio = (mlan_ds_radio_cfg *)req->pbuf; + radio->sub_command = MLAN_OID_ANT_CFG; + req->req_id = MLAN_IOCTL_RADIO_CFG; + req->action = MLAN_ACT_SET; + + radio->param.ant_cfg_1x1.antenna = antcfg; + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); +done: + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Configure MLAN for low power mode + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, + * otherwise fail + */ +mlan_status +woal_set_low_pwr_mode(moal_handle *handle, t_u8 wait_option) +{ + moal_private *priv = NULL; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *misc = NULL; + mlan_status status; + + ENTER(); + + priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY); + + /* Allocate an IOCTL request buffer */ + req = (mlan_ioctl_req *) + woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + status = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + misc = (mlan_ds_misc_cfg *)req->pbuf; + misc->sub_command = MLAN_OID_MISC_LOW_PWR_MODE; + misc->param.low_pwr_mode = low_power_mode_enable; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = MLAN_ACT_SET; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); +done: + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Send FW shutdown command to MLAN + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, + * otherwise fail + */ +static mlan_status +woal_shutdown_fw(moal_private *priv, t_u8 wait_option) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *misc = NULL; + mlan_status status; + + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = (mlan_ioctl_req *) + woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + status = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + misc = (mlan_ds_misc_cfg *)req->pbuf; + misc->sub_command = MLAN_OID_MISC_INIT_SHUTDOWN; + misc->param.func_init_shutdown = MLAN_FUNC_SHUTDOWN; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = MLAN_ACT_SET; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); + /* add 100 ms delay to avoid back to back init/shutdown */ + mdelay(100); +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Return hex value of a give character + * + * @param chr Character to be converted + * + * @return The converted character if chr is a valid hex, else 0 + */ +static int +woal_hexval(char chr) +{ + if (chr >= '0' && chr <= '9') + return chr - '0'; + if (chr >= 'A' && chr <= 'F') + return chr - 'A' + 10; + if (chr >= 'a' && chr <= 'f') + return chr - 'a' + 10; + + return 0; +} + +#ifdef STA_SUPPORT +#endif + +/** + * @brief This function cancel all works in the queue + * and destroy the main workqueue. + * + * @param handle A pointer to moal_handle + * + * @return N/A + */ +static void +woal_terminate_workqueue(moal_handle *handle) +{ + ENTER(); + + /* Terminate main workqueue */ + if (handle->workqueue) { + flush_workqueue(handle->workqueue); + destroy_workqueue(handle->workqueue); + handle->workqueue = NULL; + } + if (handle->rx_workqueue) { + flush_workqueue(handle->rx_workqueue); + destroy_workqueue(handle->rx_workqueue); + handle->rx_workqueue = NULL; + } + LEAVE(); +} + +/******************************************************** + Global Functions +********************************************************/ + +/** + * @brief This function opens the network device + * + * @param dev A pointer to net_device structure + * + * @return 0 --success, otherwise fail + */ +int +woal_open(struct net_device *dev) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + t_u8 carrier_on = MFALSE; + + ENTER(); + + if (priv->phandle->surprise_removed == MTRUE) { + PRINTM(MERROR, + "open is not allowed in surprise remove state.\n"); + LEAVE(); + return -EFAULT; + } + + if (!MODULE_GET) { + LEAVE(); + return -EFAULT; + } +#ifdef UAP_SUPPORT + if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) && + (priv->media_connected)) + carrier_on = MTRUE; +#endif +#ifdef STA_SUPPORT + if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) && + (priv->media_connected || priv->is_adhoc_link_sensed)) + carrier_on = MTRUE; +#endif +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_CFG80211) && defined(UAP_CFG80211) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (!p2p_enh) { + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT && + IS_STA_CFG80211(cfg80211_wext)) { + priv->phandle->wiphy->interface_modes |= + MBIT(NL80211_IFTYPE_P2P_GO) | + MBIT(NL80211_IFTYPE_P2P_CLIENT); + } + } +#endif +#endif +#endif + if (carrier_on == MTRUE) { + if (!netif_carrier_ok(priv->netdev)) + netif_carrier_on(priv->netdev); + woal_wake_queue(priv->netdev); + } else { + if (netif_carrier_ok(priv->netdev)) + netif_carrier_off(priv->netdev); + } + + LEAVE(); + return 0; +} + +/** + * @brief This function closes the network device + * + * @param dev A pointer to net_device structure + * + * @return 0 + */ +int +woal_close(struct net_device *dev) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); +#if defined(STA_SUPPORT) && defined(STA_CFG80211) + unsigned long flags; +#endif + + ENTER(); + woal_flush_tx_stat_queue(priv); + +#ifdef STA_SUPPORT +#ifdef STA_CFG80211 + if (IS_STA_CFG80211(cfg80211_wext) && + (priv->bss_type == MLAN_BSS_TYPE_STA)) + woal_clear_conn_params(priv); + spin_lock_irqsave(&priv->phandle->scan_req_lock, flags); + if (IS_STA_CFG80211(cfg80211_wext) && priv->phandle->scan_request) { + cfg80211_scan_done(priv->phandle->scan_request, MTRUE); + priv->phandle->scan_request = NULL; + priv->phandle->scan_priv = NULL; + } + spin_unlock_irqrestore(&priv->phandle->scan_req_lock, flags); + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) + if (IS_STA_CFG80211(cfg80211_wext) && priv->wdev->current_bss) + cfg80211_disconnected(priv->netdev, 0, NULL, 0, GFP_KERNEL); +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) + if (IS_STA_CFG80211(cfg80211_wext) && priv->sched_scanning) { + woal_stop_bg_scan(priv, MOAL_IOCTL_WAIT); + priv->bg_scan_start = MFALSE; + priv->bg_scan_reported = MFALSE; + cfg80211_sched_scan_stopped(priv->wdev->wiphy); + priv->sched_scanning = MFALSE; + } +#endif +#endif +#endif + if (!priv->bss_virtual) + woal_stop_queue(priv->netdev); +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_CFG80211) && defined(UAP_CFG80211) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (!p2p_enh) { + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT && + !priv->bss_virtual && + IS_STA_CFG80211(cfg80211_wext) && + IS_UAP_CFG80211(cfg80211_wext)) { + priv->phandle->wiphy->interface_modes &= + ~(MBIT(NL80211_IFTYPE_P2P_GO) | + MBIT(NL80211_IFTYPE_P2P_CLIENT)); + } + } +#endif +#endif +#endif + MODULE_PUT; + + LEAVE(); + return 0; +} + +/** + * @brief This function sets the MAC address to firmware. + * + * @param dev A pointer to mlan_private structure + * @param addr MAC address to set + * + * @return 0 --success, otherwise fail + */ +int +woal_set_mac_address(struct net_device *dev, void *addr) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + struct sockaddr *phw_addr = (struct sockaddr *)addr; + t_u8 prev_addr[ETH_ALEN]; + + ENTER(); + + if (priv->phandle->surprise_removed == MTRUE) { + PRINTM(MERROR, + "Set mac address is not allowed in surprise remove state.\n"); + LEAVE(); + return -EFAULT; + } + + memcpy(prev_addr, priv->current_addr, ETH_ALEN); + memset(priv->current_addr, 0, ETH_ALEN); + /* dev->dev_addr is 6 bytes */ + HEXDUMP("dev->dev_addr:", dev->dev_addr, ETH_ALEN); + + HEXDUMP("addr:", (t_u8 *)phw_addr->sa_data, ETH_ALEN); + memcpy(priv->current_addr, phw_addr->sa_data, ETH_ALEN); +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_CFG80211) && defined(UAP_CFG80211) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) { + priv->current_addr[0] |= 0x02; + PRINTM(MCMND, "Set WFD device addr: " MACSTR "\n", + MAC2STR(priv->current_addr)); + } +#endif +#endif +#endif + if (MLAN_STATUS_SUCCESS != woal_request_set_mac_address(priv)) { + PRINTM(MERROR, "Set MAC address failed\n"); + /* For failure restore the MAC address */ + memcpy(priv->current_addr, prev_addr, ETH_ALEN); + ret = -EFAULT; + goto done; + } + HEXDUMP("priv->MacAddr:", priv->current_addr, ETH_ALEN); + memcpy(dev->dev_addr, priv->current_addr, ETH_ALEN); +done: + LEAVE(); + return ret; +} + +/** + * @brief Check driver status + * + * @param handle A pointer to moal_handle + * + * @return MTRUE/MFALSE + */ +t_u8 +woal_check_driver_status(moal_handle *handle) +{ + moal_private *priv = NULL; + struct timeval t; + int i = 0; + ENTER(); + + priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY); + if (!priv || woal_get_debug_info(priv, MOAL_CMD_WAIT, &info)) { + PRINTM(MERROR, + "Could not retrieve debug information from MLAN\n"); + LEAVE(); + return MTRUE; + } +#define MOAL_CMD_TIMEOUT_MAX 9 + do_gettimeofday(&t); + if (info.pending_cmd && + (t.tv_sec > (info.dnld_cmd_in_secs + MOAL_CMD_TIMEOUT_MAX))) { + PRINTM(MERROR, "Timeout cmd id = 0x%x wait=%d\n", + info.pending_cmd, + (int)(t.tv_sec - info.dnld_cmd_in_secs)); + LEAVE(); + return MTRUE; + } + if (info.num_cmd_timeout) { + PRINTM(MERROR, "num_cmd_timeout = %d\n", info.num_cmd_timeout); + PRINTM(MERROR, "Timeout cmd id = 0x%x, act = 0x%x\n", + info.timeout_cmd_id, info.timeout_cmd_act); + LEAVE(); + return MTRUE; + } + if (info.num_cmd_host_to_card_failure) { + PRINTM(MERROR, "num_cmd_host_to_card_failure = %d\n", + info.num_cmd_host_to_card_failure); + LEAVE(); + return MTRUE; + } + if (info.num_no_cmd_node) { + PRINTM(MERROR, "num_no_cmd_node = %d\n", info.num_no_cmd_node); + LEAVE(); + return MTRUE; + } + for (i = 0; i < handle->priv_num; i++) { + priv = handle->priv[i]; + if (priv) { + if (priv->num_tx_timeout >= NUM_TX_TIMEOUT_THRESHOLD) { + PRINTM(MERROR, "num_tx_timeout = %d\n", + priv->num_tx_timeout); + LEAVE(); + return MTRUE; + } + } + } + if (info.pm_wakeup_card_req && info.pm_wakeup_fw_try) { +#define MAX_WAIT_TIME 3 + if (t.tv_sec > (info.pm_wakeup_in_secs + MAX_WAIT_TIME)) { + PRINTM(MERROR, + "wakeup_dev_req=%d wakeup_tries=%d wait=%d\n", + info.pm_wakeup_card_req, info.pm_wakeup_fw_try, + (int)(t.tv_sec - info.pm_wakeup_in_secs)); + LEAVE(); + return MTRUE; + } + } + LEAVE(); + return MFALSE; +} + +/** + * @brief Display MLAN debug information + * + * @param priv A pointer to moal_private + * + * @return N/A + */ +void +woal_mlan_debug_info(moal_private *priv) +{ + int i; +#ifdef SDIO_MULTI_PORT_TX_AGGR + int j; + t_u8 mp_aggr_pkt_limit = 0; +#endif + char str[512] = { 0 }; + char *s; + + ENTER(); + + if (!priv || woal_get_debug_info(priv, MOAL_CMD_WAIT, &info)) { + PRINTM(MERROR, + "Could not retrieve debug information from MLAN\n"); + LEAVE(); + return; + } + PRINTM(MERROR, "------------mlan_debug_info-------------\n"); + PRINTM(MERROR, "mlan_processing =%d\n", info.mlan_processing); + PRINTM(MERROR, "mlan_rx_processing =%d\n", info.mlan_rx_processing); + PRINTM(MERROR, "rx_pkts_queued=%d\n", info.rx_pkts_queued); + PRINTM(MERROR, "tx_pkts_queued=%d\n", info.tx_pkts_queued); + + PRINTM(MERROR, "num_cmd_timeout = %d\n", info.num_cmd_timeout); + PRINTM(MERROR, "dbg.num_cmd_timeout = %d\n", info.dbg_num_cmd_timeout); + PRINTM(MERROR, "Timeout cmd id = 0x%x, act = 0x%x\n", + info.timeout_cmd_id, info.timeout_cmd_act); + + PRINTM(MERROR, "last_cmd_index = %d\n", info.last_cmd_index); + for (s = str, i = 0; i < DBG_CMD_NUM; i++) + s += sprintf(s, "0x%x ", info.last_cmd_id[i]); + PRINTM(MERROR, "last_cmd_id = %s\n", str); + for (s = str, i = 0; i < DBG_CMD_NUM; i++) + s += sprintf(s, "0x%x ", info.last_cmd_act[i]); + PRINTM(MERROR, "last_cmd_act = %s\n", str); + PRINTM(MERROR, "last_cmd_resp_index = %d\n", info.last_cmd_resp_index); + for (s = str, i = 0; i < DBG_CMD_NUM; i++) + s += sprintf(s, "0x%x ", info.last_cmd_resp_id[i]); + PRINTM(MERROR, "last_cmd_resp_id = %s\n", str); + PRINTM(MERROR, "last_event_index = %d\n", info.last_event_index); + for (s = str, i = 0; i < DBG_CMD_NUM; i++) + s += sprintf(s, "0x%x ", info.last_event[i]); + PRINTM(MERROR, "last_event = %s", str); + + PRINTM(MERROR, "num_data_h2c_failure = %d\n", + info.num_tx_host_to_card_failure); + PRINTM(MERROR, "num_cmd_h2c_failure = %d\n", + info.num_cmd_host_to_card_failure); + PRINTM(MERROR, "num_data_c2h_failure = %d\n", + info.num_rx_card_to_host_failure); + PRINTM(MERROR, "num_cmdevt_c2h_failure = %d\n", + info.num_cmdevt_card_to_host_failure); + PRINTM(MERROR, "num_int_read_failure = %d\n", + info.num_int_read_failure); + PRINTM(MERROR, "last_int_status = %d\n", info.last_int_status); + + PRINTM(MERROR, "num_event_deauth = %d\n", info.num_event_deauth); + PRINTM(MERROR, "num_event_disassoc = %d\n", info.num_event_disassoc); + PRINTM(MERROR, "num_event_link_lost = %d\n", info.num_event_link_lost); + PRINTM(MERROR, "num_cmd_deauth = %d\n", info.num_cmd_deauth); + PRINTM(MERROR, "num_cmd_assoc_success = %d\n", + info.num_cmd_assoc_success); + PRINTM(MERROR, "num_cmd_assoc_failure = %d\n", + info.num_cmd_assoc_failure); + PRINTM(MERROR, "cmd_resp_received = %d\n", info.cmd_resp_received); + PRINTM(MERROR, "event_received = %d\n", info.event_received); + + PRINTM(MERROR, "max_tx_buf_size = %d\n", info.max_tx_buf_size); + PRINTM(MERROR, "tx_buf_size = %d\n", info.tx_buf_size); + PRINTM(MERROR, "curr_tx_buf_size = %d\n", info.curr_tx_buf_size); + + PRINTM(MERROR, "data_sent=%d cmd_sent=%d\n", info.data_sent, + info.cmd_sent); + + PRINTM(MERROR, "ps_mode=%d ps_state=%d\n", info.ps_mode, info.ps_state); + PRINTM(MERROR, "wakeup_dev_req=%d wakeup_tries=%d\n", + info.pm_wakeup_card_req, info.pm_wakeup_fw_try); + PRINTM(MERROR, "hs_configured=%d hs_activated=%d\n", + info.is_hs_configured, info.hs_activated); + PRINTM(MERROR, "pps_uapsd_mode=%d sleep_pd=%d\n", + info.pps_uapsd_mode, info.sleep_pd); + PRINTM(MERROR, "tx_lock_flag = %d\n", info.tx_lock_flag); + PRINTM(MERROR, "port_open = %d\n", info.port_open); + PRINTM(MERROR, "scan_processing = %d\n", info.scan_processing); + + PRINTM(MERROR, "mp_rd_bitmap=0x%x curr_rd_port=0x%x\n", + (unsigned int)info.mp_rd_bitmap, info.curr_rd_port); + PRINTM(MERROR, "mp_wr_bitmap=0x%x curr_wr_port=0x%x\n", + (unsigned int)info.mp_wr_bitmap, info.curr_wr_port); + PRINTM(MERROR, "mp_invalid_update=%d\n", info.mp_invalid_update); +#ifdef SDIO_MULTI_PORT_TX_AGGR + mp_aggr_pkt_limit = info.mp_aggr_pkt_limit; + PRINTM(MERROR, "last_recv_wr_bitmap=0x%x last_mp_index = %d\n", + info.last_recv_wr_bitmap, info.last_mp_index); + for (i = 0; i < SDIO_MP_DBG_NUM; i++) { + for (s = str, j = 0; j < mp_aggr_pkt_limit; j++) + s += sprintf(s, "0x%02x ", + info.last_mp_wr_info[i * + mp_aggr_pkt_limit + + j]); + + PRINTM(MERROR, + "mp_wr_bitmap: 0x%x mp_wr_ports=0x%x len=%d curr_wr_port=0x%x\n%s\n", + info.last_mp_wr_bitmap[i], info.last_mp_wr_ports[i], + info.last_mp_wr_len[i], info.last_curr_wr_port[i], str); + } +#endif + for (i = 0; i < info.ralist_num; i++) { + PRINTM(MERROR, + "ralist ra: %02x:%02x:%02x:%02x:%02x:%02x tid=%d pkts=%d pause=%d\n", + info.ralist[i].ra[0], info.ralist[i].ra[1], + info.ralist[i].ra[2], info.ralist[i].ra[3], + info.ralist[i].ra[4], info.ralist[i].ra[5], + info.ralist[i].tid, info.ralist[i].total_pkts, + info.ralist[i].tx_pause); + } + + PRINTM(MERROR, "------------mlan_debug_info End-------------\n"); + LEAVE(); +} + +/** + * @brief This function handle the shutdown timeout issue + * + * @param handle Pointer to structure moal_handle + * + * @return N/A + */ +void +woal_ioctl_timeout(moal_handle *handle) +{ + moal_private *priv = NULL; + + ENTER(); + + PRINTM(MMSG, "woal_ioctl_timout.\n"); + priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY); + if (priv) { + woal_mlan_debug_info(priv); + woal_moal_debug_info(priv, NULL, MFALSE); + } + LEAVE(); + return; +} + +/** + * @brief This function handles the timeout of packet + * transmission + * + * @param dev A pointer to net_device structure + * + * @return N/A + */ +void +woal_tx_timeout(struct net_device *dev) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + + ENTER(); + + priv->num_tx_timeout++; + PRINTM(MERROR, "%lu : %s (bss=%d): Tx timeout (%d)\n", + jiffies, dev->name, priv->bss_index, priv->num_tx_timeout); + woal_set_trans_start(dev); + + if (priv->num_tx_timeout == NUM_TX_TIMEOUT_THRESHOLD) { + woal_mlan_debug_info(priv); + woal_moal_debug_info(priv, NULL, MFALSE); + woal_broadcast_event(priv, CUS_EVT_DRIVER_HANG, + strlen(CUS_EVT_DRIVER_HANG)); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + woal_cfg80211_vendor_event(priv, event_hang, + CUS_EVT_DRIVER_HANG, + strlen(CUS_EVT_DRIVER_HANG)); +#endif +#endif + woal_process_hang(priv->phandle); + } + + LEAVE(); +} + +/** + * @brief This function returns the network statistics + * + * @param dev A pointer to net_device structure + * + * @return A pointer to net_device_stats structure + */ +struct net_device_stats * +woal_get_stats(struct net_device *dev) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + return &priv->stats; +} + +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) +/** + * @brief This function handles wmm queue select + * + * @param dev A pointer to net_device structure + * @param skb A pointer to sk_buff structure + * + * @return tx_queue index (0-3) + */ +u16 +woal_select_queue(struct net_device *dev, struct sk_buff *skb +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0) + , void *accel_priv +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) + , select_queue_fallback_t fallback +#endif +#endif + ) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + struct ethhdr *eth = NULL; + t_u8 tid = 0; + t_u8 index = 0; + + ENTER(); + + /* + * skb->priority values from 256->263 are magic values to + * directly indicate a specific 802.1d priority. This is used + * to allow 802.1d priority to be passed directly in from VLAN + * tags, etc. + */ + if (IS_SKB_MAGIC_VLAN(skb)) { + tid = GET_VLAN_PRIO(skb); + } else { + eth = (struct ethhdr *)skb->data; + switch (eth->h_proto) { + case __constant_htons(ETH_P_IP): + tid = (IPTOS_PREC(SKB_TOS(skb)) >> IPTOS_OFFSET); + break; + case __constant_htons(ETH_P_IPV6): + tid = SKB_TIDV6(skb); + break; + case __constant_htons(ETH_P_ARP): + default: + break; + } + } + + index = mlan_select_wmm_queue(priv->phandle->pmlan_adapter, + priv->bss_index, tid); + PRINTM(MDATA, "select queue: tid=%d, index=%d\n", tid, index); + LEAVE(); + return index; +} +#endif + +/** + * @brief This function flush tx status queue + * + * @param priv A pointer to moal_private structure + * + * @return N/A + */ +void +woal_flush_tx_stat_queue(moal_private *priv) +{ + struct tx_status_info *tx_info = NULL, *tmp_node; + unsigned long flags; + struct sk_buff *skb = NULL; + spin_lock_irqsave(&priv->tx_stat_lock, flags); + list_for_each_entry_safe(tx_info, tmp_node, &priv->tx_stat_queue, link) { + list_del(&tx_info->link); + skb = (struct sk_buff *)tx_info->tx_skb; + if (tx_info->tx_cookie) { +#if defined(STA_CFG80211) || defined(UAP_CFG80211) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + cfg80211_mgmt_tx_status(priv->netdev, + tx_info->tx_cookie, skb->data, + skb->len, true, GFP_ATOMIC); +#else + cfg80211_mgmt_tx_status(priv->wdev, tx_info->tx_cookie, + skb->data, skb->len, true, + GFP_ATOMIC); +#endif +#endif +#endif + } + dev_kfree_skb_any(skb); + kfree(tx_info); + } + INIT_LIST_HEAD(&priv->tx_stat_queue); + spin_unlock_irqrestore(&priv->tx_stat_lock, flags); +} + +/** + * @brief This function gets tx info from tx_stat_queue + * + * @param priv A pointer to moal_private structure + * @param tx_seq_num tx seq number + * + * @return A pointer to the tcp tx_status_info structure, if found. + * Otherwise, null + */ +struct tx_status_info * +woal_get_tx_info(moal_private *priv, t_u8 tx_seq_num) +{ + struct tx_status_info *tx_info = NULL; + ENTER(); + + list_for_each_entry(tx_info, &priv->tx_stat_queue, link) { + if (tx_info->tx_seq_num == tx_seq_num) { + LEAVE(); + return tx_info; + } + } + LEAVE(); + return NULL; +} + +/** + * @brief This function remove tx info from queue + * + * @param priv A pointer to moal_private structure + * @param tx_seq_num tx seq number + * + * @return N/A + */ +void +woal_remove_tx_info(moal_private *priv, t_u8 tx_seq_num) +{ + struct tx_status_info *tx_info, *tmp = NULL; + unsigned long flags; + ENTER(); + + spin_lock_irqsave(&priv->tx_stat_lock, flags); + list_for_each_entry_safe(tx_info, tmp, &priv->tx_stat_queue, link) { + if (tx_info->tx_seq_num == tx_seq_num) { + list_del(&tx_info->link); + dev_kfree_skb_any((struct sk_buff *)tx_info->tx_skb); + kfree(tx_info); + break; + } + } + spin_unlock_irqrestore(&priv->tx_stat_lock, flags); + + LEAVE(); +} + +/** + * @brief This function flush tcp session queue + * + * @param priv A pointer to moal_private structure + * + * @return N/A + */ +void +woal_flush_tdls_list(moal_private *priv) +{ + struct tdls_peer *peer = NULL, *tmp_node; + unsigned long flags; + spin_lock_irqsave(&priv->tdls_lock, flags); + list_for_each_entry_safe(peer, tmp_node, &priv->tdls_list, link) { + list_del(&peer->link); + kfree(peer); + } + INIT_LIST_HEAD(&priv->tdls_list); + spin_unlock_irqrestore(&priv->tdls_lock, flags); + priv->tdls_check_tx = MFALSE; +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) +/** + * @brief check the tx packet for tdls auto set up + * + * @param priv A pointer to moal_private structure + * @param skb A pointer to skb buffer. + * + * @return N/A + */ +void +woal_tdls_check_tx(moal_private *priv, struct sk_buff *skb) +{ + struct tdls_peer *peer = NULL; + unsigned long flags; + t_u8 ra[MLAN_MAC_ADDR_LENGTH]; + ENTER(); + memcpy(ra, skb->data, MLAN_MAC_ADDR_LENGTH); + spin_lock_irqsave(&priv->tdls_lock, flags); + list_for_each_entry(peer, &priv->tdls_list, link) { + if (!memcmp(peer->peer_addr, ra, ETH_ALEN)) { + if (peer->rssi && + (peer->rssi <= TDLS_RSSI_HIGH_THRESHOLD)) { + if ((peer->link_status == TDLS_NOT_SETUP) && + (peer->num_failure < + TDLS_MAX_FAILURE_COUNT)) { + peer->link_status = + TDLS_SETUP_INPROGRESS; + PRINTM(MMSG, + "Wlan: Set up TDLS link,peer=" + MACSTR " rssi=%d\n", + MAC2STR(peer->peer_addr), + -peer->rssi); + cfg80211_tdls_oper_request(priv->netdev, + peer-> + peer_addr, + NL80211_TDLS_SETUP, + 0, + GFP_ATOMIC); + priv->tdls_check_tx = MFALSE; + } + + } + break; + } + } + spin_unlock_irqrestore(&priv->tdls_lock, flags); + LEAVE(); +} +#endif + +/** + * @brief This function flush tcp session queue + * + * @param priv A pointer to moal_private structure + * + * @return N/A + */ +void +woal_flush_tcp_sess_queue(moal_private *priv) +{ + struct tcp_sess *tcp_sess = NULL, *tmp_node; + unsigned long flags; + spin_lock_irqsave(&priv->tcp_sess_lock, flags); + list_for_each_entry_safe(tcp_sess, tmp_node, &priv->tcp_sess_queue, + link) { + list_del(&tcp_sess->link); + kfree(tcp_sess); + } + INIT_LIST_HEAD(&priv->tcp_sess_queue); + priv->tcp_ack_drop_cnt = 0; + priv->tcp_ack_cnt = 0; + spin_unlock_irqrestore(&priv->tcp_sess_lock, flags); +} + +/** + * @brief This function gets tcp session from the tcp session queue + * + * @param priv A pointer to moal_private structure + * @param src_ip IP address of the device + * @param src_port TCP port of the device + * @param dst_ip IP address of the client + * @param dst_port TCP port of the client + * + * @return A pointer to the tcp session data structure, if found. + * Otherwise, null + */ +static inline struct tcp_sess * +woal_get_tcp_sess(moal_private *priv, + t_u32 src_ip, t_u16 src_port, t_u32 dst_ip, t_u16 dst_port) +{ + struct tcp_sess *tcp_sess = NULL; + ENTER(); + + list_for_each_entry(tcp_sess, &priv->tcp_sess_queue, link) { + if ((tcp_sess->src_ip_addr == src_ip) && + (tcp_sess->src_tcp_port == src_port) && + (tcp_sess->dst_ip_addr == dst_ip) && + (tcp_sess->dst_tcp_port == dst_port)) { + LEAVE(); + return tcp_sess; + } + } + LEAVE(); + return NULL; +} + +/** + * @brief This function free the tcp ack session node + * + * @param priv A pointer to moal_private structure + * @param pmbuf A pointer to mlan_buffer associated with a skb + * + * @return N/A + */ +void +woal_tcp_ack_tx_indication(moal_private *priv, mlan_buffer *pmbuf) +{ + struct tcp_sess *tcp_sess = NULL, *tmp = NULL; + unsigned long flags; + ENTER(); + + spin_lock_irqsave(&priv->tcp_sess_lock, flags); + list_for_each_entry_safe(tcp_sess, tmp, &priv->tcp_sess_queue, link) { + if (tcp_sess->ack_skb == pmbuf->pdesc) { + list_del(&tcp_sess->link); + kfree(tcp_sess); + break; + } + } + spin_unlock_irqrestore(&priv->tcp_sess_lock, flags); + + LEAVE(); + return; +} + +/** + * @brief This function get the tcp ack session node + * + * @param priv A pointer to moal_private structure + * @param pmbuf A pointer to mlan_buffer associated with a skb + * + * @return 1, if it's dropped; 0, if not dropped + */ +int +woal_process_tcp_ack(moal_private *priv, mlan_buffer *pmbuf) +{ + int ret = 0; + unsigned long flags; + struct tcp_sess *tcp_session; + struct ethhdr *ethh = NULL; + struct iphdr *iph = NULL; + struct tcphdr *tcph = NULL; + t_u32 ack_seq; + struct sk_buff *skb; + + ENTER(); + + /** check the tcp packet */ + ethh = (struct ethhdr *)(pmbuf->pbuf + pmbuf->data_offset); + if (ntohs(ethh->h_proto) != ETH_P_IP) { + LEAVE(); + return 0; + } + iph = (struct iphdr *)((t_u8 *)ethh + sizeof(struct ethhdr)); + if (iph->protocol != IPPROTO_TCP) { + LEAVE(); + return 0; + } + tcph = (struct tcphdr *)((t_u8 *)iph + iph->ihl * 4); + + if (*((t_u8 *)tcph + 13) == 0x10) { + /* Only replace ACK */ + if (ntohs(iph->tot_len) > (iph->ihl + tcph->doff) * 4) { + /* Don't drop ACK with payload */ + /* TODO: should we delete previous TCP session */ + LEAVE(); + return ret; + } + priv->tcp_ack_cnt++; + spin_lock_irqsave(&priv->tcp_sess_lock, flags); + tcp_session = woal_get_tcp_sess(priv, iph->saddr, + tcph->source, iph->daddr, + tcph->dest); + if (!tcp_session) { + tcp_session = + kmalloc(sizeof(struct tcp_sess), GFP_ATOMIC); + if (!tcp_session) { + PRINTM(MERROR, "Fail to allocate tcp_sess.\n"); + spin_unlock_irqrestore(&priv->tcp_sess_lock, + flags); + goto done; + } + tcp_session->ack_skb = pmbuf->pdesc; + tcp_session->src_ip_addr = iph->saddr; + tcp_session->dst_ip_addr = iph->daddr; + tcp_session->src_tcp_port = tcph->source; + tcp_session->dst_tcp_port = tcph->dest; + tcp_session->ack_seq = ntohl(tcph->ack_seq); + list_add_tail(&tcp_session->link, + &priv->tcp_sess_queue); + pmbuf->flags |= MLAN_BUF_FLAG_TCP_ACK; + spin_unlock_irqrestore(&priv->tcp_sess_lock, flags); + LEAVE(); + return ret; + } + ack_seq = ntohl(tcph->ack_seq); + skb = (struct sk_buff *)tcp_session->ack_skb; + if (likely(ack_seq > tcp_session->ack_seq) && + (skb->len == pmbuf->data_len)) { + memcpy(skb->data, pmbuf->pbuf + pmbuf->data_offset, + pmbuf->data_len); + tcp_session->ack_seq = ack_seq; + ret = 1; + spin_unlock_irqrestore(&priv->tcp_sess_lock, flags); + skb = (struct sk_buff *)pmbuf->pdesc; + dev_kfree_skb_any(skb); + priv->tcp_ack_drop_cnt++; + } else { + spin_unlock_irqrestore(&priv->tcp_sess_lock, flags); + LEAVE(); + return ret; + } + } +done: + LEAVE(); + return ret; +} + +/** + * @brief This function handles packet transmission + * + * @param skb A pointer to sk_buff structure + * @param dev A pointer to net_device structure + * + * @return 0 --success + */ +int +woal_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_buffer *pmbuf = NULL; + mlan_status status; + struct sk_buff *new_skb = NULL; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + t_u32 index = 0; +#endif + + ENTER(); + + PRINTM(MDATA, "%lu : %s (bss=%d): Data <= kernel\n", + jiffies, dev->name, priv->bss_index); + + if (priv->phandle->surprise_removed == MTRUE) { + dev_kfree_skb_any(skb); + priv->stats.tx_dropped++; + goto done; + } + priv->num_tx_timeout = 0; + if (!skb->len || (skb->len > ETH_FRAME_LEN)) { + PRINTM(MERROR, "Tx Error: Bad skb length %d : %d\n", + skb->len, ETH_FRAME_LEN); + dev_kfree_skb_any(skb); + priv->stats.tx_dropped++; + goto done; + } + if (skb_headroom(skb) < (MLAN_MIN_DATA_HEADER_LEN + + sizeof(mlan_buffer) + + priv->extra_tx_head_len)) { + PRINTM(MWARN, "Tx: Insufficient skb headroom %d\n", + skb_headroom(skb)); + /* Insufficient skb headroom - allocate a new skb */ + new_skb = skb_realloc_headroom(skb, MLAN_MIN_DATA_HEADER_LEN + + sizeof(mlan_buffer) + + priv->extra_tx_head_len); + if (unlikely(!new_skb)) { + PRINTM(MERROR, "Tx: Cannot allocate skb\n"); + dev_kfree_skb_any(skb); + priv->stats.tx_dropped++; + goto done; + } + if (new_skb != skb) + dev_kfree_skb_any(skb); + skb = new_skb; + PRINTM(MINFO, "new skb headroom %d\n", skb_headroom(skb)); + } + pmbuf = (mlan_buffer *)skb->head; + memset((t_u8 *)pmbuf, 0, sizeof(mlan_buffer)); + pmbuf->bss_index = priv->bss_index; + woal_fill_mlan_buffer(priv, pmbuf, skb); + if (priv->enable_tcp_ack_enh == MTRUE) { + if (woal_process_tcp_ack(priv, pmbuf)) { + /* the ack packet has been dropped */ + priv->stats.tx_dropped++; + goto done; + } + } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) + if (priv->enable_auto_tdls && priv->tdls_check_tx) + woal_tdls_check_tx(priv, skb); +#endif + status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf); + switch (status) { + case MLAN_STATUS_PENDING: + atomic_inc(&priv->phandle->tx_pending); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + index = skb_get_queue_mapping(skb); + atomic_inc(&priv->wmm_tx_pending[index]); + if (atomic_read(&priv->wmm_tx_pending[index]) >= MAX_TX_PENDING) { + struct netdev_queue *txq = + netdev_get_tx_queue(priv->netdev, index); + netif_tx_stop_queue(txq); + PRINTM(MINFO, "Stop Kernel Queue : %d\n", index); + } +#else + if (atomic_read(&priv->phandle->tx_pending) >= MAX_TX_PENDING) + woal_stop_queue(priv->netdev); +#endif /* #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,29) */ + if (!mlan_is_main_process_running(priv->phandle->pmlan_adapter)) + queue_work(priv->phandle->workqueue, + &priv->phandle->main_work); + break; + case MLAN_STATUS_SUCCESS: + priv->stats.tx_packets++; + priv->stats.tx_bytes += skb->len; + dev_kfree_skb_any(skb); + break; + case MLAN_STATUS_FAILURE: + default: + priv->stats.tx_dropped++; + dev_kfree_skb_any(skb); + break; + } +done: + LEAVE(); + return 0; +} + +/** + * @brief Convert ascii string to Hex integer + * + * @param d A pointer to integer buf + * @param s A pointer to ascii string + * @param dlen The byte number of ascii string in hex + * + * @return Number of integer + */ +int +woal_ascii2hex(t_u8 *d, char *s, t_u32 dlen) +{ + unsigned int i; + t_u8 n; + + ENTER(); + + memset(d, 0x00, dlen); + + for (i = 0; i < dlen * 2; i++) { + if ((s[i] >= 48) && (s[i] <= 57)) + n = s[i] - 48; + else if ((s[i] >= 65) && (s[i] <= 70)) + n = s[i] - 55; + else if ((s[i] >= 97) && (s[i] <= 102)) + n = s[i] - 87; + else + break; + if (!(i % 2)) + n = n * 16; + d[i / 2] += n; + } + + LEAVE(); + return i; +} + +/** + * @brief Return integer value of a given ascii string + * + * @param data Converted data to be returned + * @param a String to be converted + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_atoi(int *data, char *a) +{ + int i, val = 0, len; + int mul = 1; + + ENTER(); + + len = strlen(a); + if (len > 2) { + if (!strncmp(a, "0x", 2)) { + a = a + 2; + len -= 2; + *data = woal_atox(a); + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + } + for (i = 0; i < len; i++) { + if (isdigit(a[i])) { + val = val * 10 + (a[i] - '0'); + } else { + if ((i == 0) && (a[i] == '-')) { + mul = -1; + } else { + PRINTM(MERROR, "Invalid char %c in string %s\n", + a[i], a); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + } + } + *data = (mul * val); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Return hex value of a given ascii string + * + * @param a String to be converted to ascii + * + * @return The converted character if a is a valid hex, else 0 + */ +int +woal_atox(char *a) +{ + int i = 0; + + ENTER(); + + while (isxdigit(*a)) + i = i * 16 + woal_hexval(*a++); + + LEAVE(); + return i; +} + +/** + * @brief Extension of strsep lib command. This function will also take care + * escape character + * + * @param s A pointer to array of chars to process + * @param delim The delimiter character to end the string + * @param esc The escape character to ignore for delimiter + * + * @return Pointer to the separated string if delim found, else NULL + */ +char * +woal_strsep(char **s, char delim, char esc) +{ + char *se = *s, *sb; + + ENTER(); + + if (!(*s) || (*se == '\0')) { + LEAVE(); + return NULL; + } + + for (sb = *s; *sb != '\0'; ++sb) { + if (*sb == esc && *(sb + 1) == esc) { + /* + * We get a esc + esc seq then keep the one esc + * and chop off the other esc character + */ + memmove(sb, sb + 1, strlen(sb)); + continue; + } + if (*sb == esc && *(sb + 1) == delim) { + /* + * We get a delim + esc seq then keep the delim + * and chop off the esc character + */ + memmove(sb, sb + 1, strlen(sb)); + continue; + } + if (*sb == delim) + break; + } + + if (*sb == '\0') + sb = NULL; + else + *sb++ = '\0'; + + *s = sb; + + LEAVE(); + return se; +} + +/** + * @brief Convert mac address from string to t_u8 buffer. + * + * @param mac_addr The buffer to store the mac address in. + * @param buf The source of mac address which is a string. + * + * @return N/A + */ +void +woal_mac2u8(t_u8 *mac_addr, char *buf) +{ + char *begin, *end, *mac_buff; + int i; + + ENTER(); + + if (!buf) { + LEAVE(); + return; + } + + mac_buff = kzalloc(strlen(buf) + 1, GFP_KERNEL); + if (!mac_buff) { + LEAVE(); + return; + } + memcpy(mac_buff, buf, strlen(buf)); + + begin = mac_buff; + for (i = 0; i < ETH_ALEN; ++i) { + end = woal_strsep(&begin, ':', '/'); + if (end) + mac_addr[i] = woal_atox(end); + } + + kfree(mac_buff); + LEAVE(); +} + +#ifdef STA_SUPPORT +/** + * @brief This function sets multicast addresses to firmware + * + * @param dev A pointer to net_device structure + * + * @return N/A + */ +void +woal_set_multicast_list(struct net_device *dev) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + ENTER(); + woal_request_set_multicast_list(priv, dev); + LEAVE(); +} +#endif + +/** + * @brief This function initializes the private structure + * and set default value to the member of moal_private. + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * + * @return N/A + */ +void +woal_init_priv(moal_private *priv, t_u8 wait_option) +{ + ENTER(); +#ifdef STA_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) { + priv->current_key_index = 0; + priv->rate_index = AUTO_RATE; + priv->is_adhoc_link_sensed = MFALSE; + priv->scan_type = MLAN_SCAN_TYPE_ACTIVE; + priv->bg_scan_start = MFALSE; + priv->bg_scan_reported = MFALSE; + memset(&priv->nick_name, 0, sizeof(priv->nick_name)); + priv->num_tx_timeout = 0; + priv->rx_filter = 0; + +#ifdef REASSOCIATION + priv->reassoc_on = MFALSE; + priv->set_asynced_essid_flag = MFALSE; +#endif + } +#endif /* STA_SUPPORT */ +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) + priv->bss_started = MFALSE; +#endif + priv->media_connected = MFALSE; + +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + priv->probereq_index = MLAN_CUSTOM_IE_AUTO_IDX_MASK; + priv->beacon_index = MLAN_CUSTOM_IE_AUTO_IDX_MASK; + priv->proberesp_index = MLAN_CUSTOM_IE_AUTO_IDX_MASK; + priv->assocresp_index = MLAN_CUSTOM_IE_AUTO_IDX_MASK; + priv->beacon_wps_index = MLAN_CUSTOM_IE_AUTO_IDX_MASK; + priv->proberesp_p2p_index = MLAN_CUSTOM_IE_AUTO_IDX_MASK; +#endif +#ifdef STA_SUPPORT +#endif + + priv->enable_tcp_ack_enh = MTRUE; + + priv->enable_auto_tdls = MFALSE; + priv->tdls_check_tx = MFALSE; + + woal_request_get_fw_info(priv, wait_option, NULL); + +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_CFG80211) && defined(UAP_CFG80211) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION +#ifdef MFG_CMD_SUPPORT + if (mfg_mode != MLAN_INIT_PARA_ENABLED) +#endif + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) { + if (priv->bss_virtual) { + if (priv->pa_netdev) { + memcpy(priv->current_addr, + priv->pa_netdev->dev_addr, + ETH_ALEN); + priv->current_addr[4] ^= 0x80; + woal_request_set_mac_address(priv); + memcpy(priv->netdev->dev_addr, + priv->current_addr, ETH_ALEN); + PRINTM(MCMND, + "Set WFD interface addr: " MACSTR + "\n", + MAC2STR(priv->current_addr)); + } + } else { + priv->current_addr[0] |= 0x02; + woal_request_set_mac_address(priv); + memcpy(priv->netdev->dev_addr, + priv->current_addr, ETH_ALEN); + PRINTM(MCMND, + "Set WFD device addr: " MACSTR "\n", + MAC2STR(priv->current_addr)); + } + } +#endif +#endif +#endif + LEAVE(); +} + +/** + * @brief Reset all interfaces if all_intf flag is TRUE, + * otherwise specified interface only + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param all_intf TRUE : all interfaces + * FALSE : current interface only + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +int +woal_reset_intf(moal_private *priv, t_u8 wait_option, int all_intf) +{ + int ret = MLAN_STATUS_SUCCESS; + int intf_num; + moal_handle *handle = priv->phandle; + mlan_bss_info bss_info; + + ENTER(); + + /* Stop queue and detach device */ + if (!all_intf) { + woal_stop_queue(priv->netdev); + netif_device_detach(priv->netdev); + } else { + for (intf_num = 0; intf_num < handle->priv_num; intf_num++) { + woal_stop_queue(handle->priv[intf_num]->netdev); + netif_device_detach(handle->priv[intf_num]->netdev); + } + } + + /* Get BSS info */ + memset(&bss_info, 0, sizeof(bss_info)); + woal_get_bss_info(priv, wait_option, &bss_info); + +#ifdef STA_SUPPORT + woal_cancel_scan(priv, wait_option); +#endif + + /* Cancel host sleep */ + if (bss_info.is_hs_configured) { + if (MLAN_STATUS_SUCCESS != woal_cancel_hs(priv, wait_option)) { + ret = -EFAULT; + goto done; + } + } + + /* Disconnect from network */ + if (!all_intf) { + /* Disconnect specified interface only */ + if ((priv->media_connected == MTRUE) +#ifdef UAP_SUPPORT + || (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) +#endif + ) { + woal_disconnect(priv, wait_option, NULL); + priv->media_connected = MFALSE; + } + } else { + /* Disconnect all interfaces */ + for (intf_num = 0; intf_num < handle->priv_num; intf_num++) { + if (handle->priv[intf_num]->media_connected == MTRUE +#ifdef UAP_SUPPORT + || (GET_BSS_ROLE(handle->priv[intf_num]) == + MLAN_BSS_ROLE_UAP) +#endif + ) { + woal_disconnect(handle->priv[intf_num], + wait_option, NULL); + handle->priv[intf_num]->media_connected = + MFALSE; + } + } + } + +#ifdef REASSOCIATION + /* Reset the reassoc timer and status */ + if (!all_intf) { + handle->reassoc_on &= ~MBIT(priv->bss_index); + priv->reassoc_on = MFALSE; + priv->set_asynced_essid_flag = MFALSE; + } else { + handle->reassoc_on = 0; + for (intf_num = 0; intf_num < handle->priv_num; intf_num++) { + handle->priv[intf_num]->reassoc_on = MFALSE; + handle->priv[intf_num]->set_asynced_essid_flag = MFALSE; + } + } + if (!handle->reassoc_on && handle->is_reassoc_timer_set) { + woal_cancel_timer(&handle->reassoc_timer); + handle->is_reassoc_timer_set = MFALSE; + } +#endif /* REASSOCIATION */ + +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_CFG80211) && defined(UAP_CFG80211) + if (handle->is_go_timer_set) { + woal_cancel_timer(&handle->go_timer); + handle->is_go_timer_set = MFALSE; + } + if (handle->is_remain_timer_set) { + woal_cancel_timer(&handle->remain_timer); + woal_remain_timer_func(handle); + } +#endif +#endif + +done: + LEAVE(); + return ret; +} + +/** + * @brief This function return the point to structure moal_private + * + * @param handle Pointer to structure moal_handle + * @param bss_index BSS index number + * + * @return moal_private pointer or NULL + */ +moal_private * +woal_bss_index_to_priv(moal_handle *handle, t_u8 bss_index) +{ + int i; + + ENTER(); + if (!handle) { + LEAVE(); + return NULL; + } + for (i = 0; i < MLAN_MAX_BSS_NUM; i++) { + if (handle->priv[i] && + (handle->priv[i]->bss_index == bss_index)) { + LEAVE(); + return handle->priv[i]; + } + } + + LEAVE(); + return NULL; +} + +/** + * @brief This function alloc mlan_buffer. + * @param handle A pointer to moal_handle structure + * @param size buffer size to allocate + * + * @return mlan_buffer pointer or NULL + */ +pmlan_buffer +woal_alloc_mlan_buffer(moal_handle *handle, int size) +{ + mlan_buffer *pmbuf = NULL; + struct sk_buff *skb; + gfp_t flag; + + ENTER(); + + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + if (size <= 0) { + PRINTM(MERROR, "Buffer size must be positive\n"); + LEAVE(); + return NULL; + } + + skb = __dev_alloc_skb(size + sizeof(mlan_buffer), flag); + if (!skb) { + PRINTM(MERROR, "%s: No free skb\n", __func__); + LEAVE(); + return NULL; + } + skb_reserve(skb, sizeof(mlan_buffer)); + pmbuf = (mlan_buffer *)skb->head; + memset((u8 *)pmbuf, 0, sizeof(mlan_buffer)); + pmbuf->pdesc = (t_void *)skb; + pmbuf->pbuf = (t_u8 *)skb->data; + atomic_inc(&handle->mbufalloc_count); + LEAVE(); + return pmbuf; +} + +/** + * @brief This function alloc mlan_ioctl_req. + * + * @param size buffer size to allocate + * + * @return mlan_ioctl_req pointer or NULL + */ +pmlan_ioctl_req +woal_alloc_mlan_ioctl_req(int size) +{ + mlan_ioctl_req *req = NULL; + gfp_t flag; + + ENTER(); + + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + req = kzalloc((sizeof(mlan_ioctl_req) + size + sizeof(int) + + sizeof(wait_queue)), flag); + if (!req) { + PRINTM(MERROR, "%s: Fail to alloc ioctl buffer\n", __func__); + LEAVE(); + return NULL; + } + req->pbuf = (t_u8 *)req + sizeof(mlan_ioctl_req) + sizeof(wait_queue); + req->buf_len = (t_u32)size; + req->reserved_1 = (t_ptr)((t_u8 *)req + sizeof(mlan_ioctl_req)); + + LEAVE(); + return req; +} + +/** + * @brief This function frees mlan_buffer. + * @param handle A pointer to moal_handle structure + * @param pmbuf Pointer to mlan_buffer + * + * @return N/A + */ +void +woal_free_mlan_buffer(moal_handle *handle, pmlan_buffer pmbuf) +{ + ENTER(); + if (!pmbuf) { + LEAVE(); + return; + } + if (pmbuf->pdesc) + dev_kfree_skb_any((struct sk_buff *)pmbuf->pdesc); + else + PRINTM(MERROR, "free mlan buffer without pdesc\n"); + atomic_dec(&handle->mbufalloc_count); + LEAVE(); + return; +} + +#ifdef STA_SUPPORT +#endif /* STA_SUPPORT */ + +/** + * @brief This function handles events generated by firmware + * + * @param priv A pointer to moal_private structure + * @param payload A pointer to payload buffer + * @param len Length of the payload + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_broadcast_event(moal_private *priv, t_u8 *payload, t_u32 len) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + struct sk_buff *skb = NULL; + struct nlmsghdr *nlh = NULL; + moal_handle *handle = priv->phandle; + struct net_device *netdev = priv->netdev; + struct sock *sk = handle->nl_sk; + + ENTER(); + + /* interface name to be prepended to event */ + if ((len + IFNAMSIZ) > NL_MAX_PAYLOAD +#ifdef WIFI_DIRECT_SUPPORT + * 2 +#endif + ) { + PRINTM(MERROR, "event size is too big, len=%d\n", (int)len); + ret = MLAN_STATUS_FAILURE; + goto done; + } + if (sk) { + /* Allocate skb */ +#ifdef WIFI_DIRECT_SUPPORT + if ((len + IFNAMSIZ) > NL_MAX_PAYLOAD) { + skb = alloc_skb(NLMSG_SPACE(NL_MAX_PAYLOAD * 2), + GFP_ATOMIC); + if (!skb) { + PRINTM(MERROR, + "Could not allocate skb for netlink\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + } else { +#endif + skb = alloc_skb(NLMSG_SPACE(NL_MAX_PAYLOAD), + GFP_ATOMIC); + if (!skb) { + PRINTM(MERROR, + "Could not allocate skb for netlink\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } +#ifdef WIFI_DIRECT_SUPPORT + } +#endif + nlh = (struct nlmsghdr *)skb->data; + nlh->nlmsg_len = NLMSG_SPACE(len + IFNAMSIZ); + + /* From kernel */ + nlh->nlmsg_pid = 0; + nlh->nlmsg_flags = 0; + + /* Data */ + skb_put(skb, nlh->nlmsg_len); + memcpy(NLMSG_DATA(nlh), netdev->name, IFNAMSIZ); + memcpy(((t_u8 *)(NLMSG_DATA(nlh))) + IFNAMSIZ, payload, len); + + /* From Kernel */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0) + NETLINK_CB(skb).pid = 0; +#else + NETLINK_CB(skb).portid = 0; +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) + /* Multicast message */ + NETLINK_CB(skb).dst_pid = 0; +#endif + + /* Multicast group number */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14) + NETLINK_CB(skb).dst_groups = NL_MULTICAST_GROUP; +#else + NETLINK_CB(skb).dst_group = NL_MULTICAST_GROUP; +#endif + + /* Send message */ + ret = netlink_broadcast(sk, skb, 0, NL_MULTICAST_GROUP, + GFP_ATOMIC); + if (ret) { + PRINTM(MWARN, "netlink_broadcast failed: ret=%d\n", + ret); + goto done; + } + + ret = MLAN_STATUS_SUCCESS; + } else { + PRINTM(MERROR, + "Could not send event through NETLINK. Link down.\n"); + ret = MLAN_STATUS_FAILURE; + } +done: + LEAVE(); + return ret; +} + +#ifdef REASSOCIATION +/** + * @brief This function handles re-association. it is triggered + * by re-assoc timer. + * + * @param data A pointer to wlan_thread structure + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +int +woal_reassociation_thread(void *data) +{ + moal_thread *pmoal_thread = data; + moal_private *priv = NULL; + moal_handle *handle = (moal_handle *)pmoal_thread->handle; + wait_queue_t wait; + int i; + BOOLEAN reassoc_timer_req; + mlan_802_11_ssid req_ssid; + mlan_ssid_bssid ssid_bssid; + mlan_status status; + mlan_bss_info bss_info; + t_u32 timer_val = MOAL_TIMER_10S; + + ENTER(); + + woal_activate_thread(pmoal_thread); + init_waitqueue_entry(&wait, current); + + current->flags |= PF_NOFREEZE; + + for (;;) { + add_wait_queue(&pmoal_thread->wait_q, &wait); + set_current_state(TASK_INTERRUPTIBLE); + + schedule(); + + set_current_state(TASK_RUNNING); + remove_wait_queue(&pmoal_thread->wait_q, &wait); + + /* Cancel re-association timer */ + if (handle->is_reassoc_timer_set == MTRUE) { + woal_cancel_timer(&handle->reassoc_timer); + handle->is_reassoc_timer_set = MFALSE; + } + + if (handle->surprise_removed) + break; + if (kthread_should_stop()) + break; + + if (handle->hardware_status != HardwareStatusReady) { + PRINTM(MINFO, + "Reassoc: Hardware status is not correct\n"); + continue; + } + + PRINTM(MEVENT, "Reassoc: Thread waking up...\n"); + reassoc_timer_req = MFALSE; +#ifdef STA_CFG80211 + for (i = 0; + i < MIN(handle->priv_num, MLAN_MAX_BSS_NUM) && + (priv = handle->priv[i]); i++) { + if (priv->roaming_required) { + priv->roaming_required = MFALSE; + PRINTM(MEVENT, "Try to roaming......\n"); + woal_start_roaming(priv); + break; + } + } +#endif + + for (i = 0; + i < MIN(handle->priv_num, MLAN_MAX_BSS_NUM) && + (priv = handle->priv[i]); i++) { + + if (priv->reassoc_required == MFALSE) { + priv->set_asynced_essid_flag = MFALSE; + continue; + } + + memset(&bss_info, 0x00, sizeof(bss_info)); + + if (MLAN_STATUS_SUCCESS != woal_get_bss_info(priv, + MOAL_CMD_WAIT, + &bss_info)) + { + PRINTM(MINFO, "Ressoc: Fail to get bss info\n"); + priv->reassoc_required = MFALSE; + priv->set_asynced_essid_flag = MFALSE; + continue; + } + + if (bss_info.bss_mode != MLAN_BSS_MODE_INFRA || + priv->media_connected != MFALSE) { + PRINTM(MINFO, + "Reassoc: ad-hoc mode or media connected\n"); + priv->reassoc_required = MFALSE; + priv->set_asynced_essid_flag = MFALSE; + continue; + } + /** avoid on going scan from other thread */ + if (handle->scan_pending_on_block) { + reassoc_timer_req = MTRUE; + break; + } + + /* The semaphore is used to avoid reassociation thread + and wlan_set_scan/wlan_set_essid interrupting each + other. Reassociation should be disabled completely + by application if + wlan_set_user_scan_ioctl/wlan_set_wap is used. */ + if (MOAL_ACQ_SEMAPHORE_BLOCK(&handle->reassoc_sem)) { + PRINTM(MERROR, + "Acquire semaphore error, reassociation thread\n"); + reassoc_timer_req = MTRUE; + break; + } + + PRINTM(MINFO, "Reassoc: Required ESSID: %s\n", + priv->prev_ssid_bssid.ssid.ssid); + PRINTM(MINFO, "Reassoc: Performing Active Scan\n"); + + memset(&req_ssid, 0x00, sizeof(mlan_802_11_ssid)); + memcpy(&req_ssid, + &priv->prev_ssid_bssid.ssid, + sizeof(mlan_802_11_ssid)); + + /* Do specific SSID scanning */ + if (MLAN_STATUS_SUCCESS != + woal_request_scan(priv, MOAL_CMD_WAIT, &req_ssid)) { + PRINTM(MERROR, + "Reassoc: Fail to do specific scan\n"); + reassoc_timer_req = MTRUE; + MOAL_REL_SEMAPHORE(&handle->reassoc_sem); + break; + } + + if (handle->surprise_removed) { + MOAL_REL_SEMAPHORE(&handle->reassoc_sem); + break; + } + + memset(&ssid_bssid, 0, sizeof(mlan_ssid_bssid)); + if (priv->set_asynced_essid_flag == MTRUE) { + /* Search AP by ESSID for asynced essid setting + */ + PRINTM(MINFO, + "Set asynced essid: Search AP by ESSID\n"); + memcpy(&ssid_bssid.ssid, + &priv->prev_ssid_bssid.ssid, + sizeof(mlan_802_11_ssid)); + } else { + /* Search AP by BSSID first */ + PRINTM(MINFO, + "Reassoc: Search AP by BSSID first\n"); + memcpy(&ssid_bssid.bssid, + &priv->prev_ssid_bssid.bssid, + MLAN_MAC_ADDR_LENGTH); + } + + status = woal_find_best_network(priv, MOAL_CMD_WAIT, + &ssid_bssid); +#ifdef STA_WEXT + if (status == MLAN_STATUS_SUCCESS) { + if (MLAN_STATUS_SUCCESS != + woal_11d_check_ap_channel(priv, + MOAL_CMD_WAIT, + &ssid_bssid)) { + PRINTM(MERROR, + "Reassoc: The AP's channel is invalid for current region\n"); + status = MLAN_STATUS_FAILURE; + } + } +#endif + /** The find AP without ssid, we need re-search */ + if (status == MLAN_STATUS_SUCCESS && + !ssid_bssid.ssid.ssid_len) { + PRINTM(MINFO, + "Reassoc: Skip AP without ssid\n"); + status = MLAN_STATUS_FAILURE; + } + + if (priv->set_asynced_essid_flag != MTRUE && + MLAN_STATUS_SUCCESS != status) { + PRINTM(MINFO, + "Reassoc: AP not found in scan list\n"); + PRINTM(MINFO, "Reassoc: Search AP by SSID\n"); + /* Search AP by SSID */ + memset(&ssid_bssid, 0, sizeof(mlan_ssid_bssid)); + memcpy(&ssid_bssid.ssid, + &priv->prev_ssid_bssid.ssid, + sizeof(mlan_802_11_ssid)); + status = woal_find_best_network(priv, + MOAL_CMD_WAIT, + &ssid_bssid); +#ifdef STA_WEXT + if (status == MLAN_STATUS_SUCCESS) { + if (MLAN_STATUS_SUCCESS != + woal_11d_check_ap_channel(priv, + MOAL_CMD_WAIT, + &ssid_bssid)) + { + PRINTM(MERROR, + "Reassoc: The AP's channel is invalid for current region\n"); + status = MLAN_STATUS_FAILURE; + } + } +#endif + } + + if (status == MLAN_STATUS_SUCCESS) { + /* set the wep key */ + if (bss_info.wep_status) + woal_enable_wep_key(priv, + MOAL_CMD_WAIT); + /* Zero SSID implies use BSSID to connect */ + memset(&ssid_bssid.ssid, 0, + sizeof(mlan_802_11_ssid)); + status = woal_bss_start(priv, MOAL_CMD_WAIT, + &ssid_bssid); + } + + if (priv->media_connected == MFALSE) + reassoc_timer_req = MTRUE; + else { + mlan_ds_rate *rate = NULL; + mlan_ioctl_req *req = NULL; + + reassoc_timer_req = MFALSE; + if (priv->set_asynced_essid_flag == MTRUE) { + memset(&bss_info, 0, sizeof(bss_info)); + if (MLAN_STATUS_SUCCESS != + woal_get_bss_info(priv, + MOAL_CMD_WAIT, + &bss_info)) { + PRINTM(MINFO, + "Set asynced essid: Fail to get bss info after assoc\n"); + } else { + memcpy(&priv->prev_ssid_bssid. + ssid, &bss_info.ssid, + sizeof + (mlan_802_11_ssid)); + memcpy(&priv->prev_ssid_bssid. + bssid, &bss_info.bssid, + MLAN_MAC_ADDR_LENGTH); + } + priv->set_asynced_essid_flag = MFALSE; + } + if (priv->rate_index != AUTO_RATE) { + req = woal_alloc_mlan_ioctl_req(sizeof + (mlan_ds_rate)); + + if (req == NULL) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + rate = (mlan_ds_rate *)req->pbuf; + rate->param.rate_cfg.rate_type = + MLAN_RATE_INDEX; + rate->sub_command = MLAN_OID_RATE_CFG; + req->req_id = MLAN_IOCTL_RATE; + + req->action = MLAN_ACT_SET; + + rate->param.rate_cfg.rate = + priv->rate_index; + + status = woal_request_ioctl(priv, req, + MOAL_CMD_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + if (status != + MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + kfree(req); + } + } + + MOAL_REL_SEMAPHORE(&handle->reassoc_sem); + } + + if (handle->surprise_removed) + break; + + if (reassoc_timer_req == MTRUE) { + handle->is_reassoc_timer_set = MTRUE; + if (priv && (priv->set_asynced_essid_flag == MTRUE)) { + PRINTM(MERROR, + "Set Async ESSID: No AP found or assoc failed.\n"); + priv->set_asynced_essid_flag = MFALSE; + } else { + PRINTM(MEVENT, + "Reassoc: No AP found or assoc failed. " + "Restarting re-assoc Timer: %d\n", + (int)timer_val); + woal_mod_timer(&handle->reassoc_timer, + timer_val); + } + } else { + if (priv) { + priv->set_asynced_essid_flag = MFALSE; + } + } + } + woal_deactivate_thread(pmoal_thread); + + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function triggers re-association by waking up + * re-assoc thread. + * + * @param context A pointer to context + * @return N/A + */ +void +woal_reassoc_timer_func(void *context) +{ + moal_handle *handle = (moal_handle *)context; + + ENTER(); + + PRINTM(MINFO, "reassoc_timer fired.\n"); + handle->is_reassoc_timer_set = MFALSE; + + PRINTM(MINFO, "Waking Up the Reassoc Thread\n"); + wake_up_interruptible(&handle->reassoc_thread.wait_q); + + LEAVE(); + return; +} +#endif /* REASSOCIATION */ + +#ifdef STA_SUPPORT + +/** + * @brief Sends disconnect event + * + * @param priv A pointer to moal_private struct + * @return N/A + */ +t_void +woal_send_disconnect_to_system(moal_private *priv) +{ + int custom_len = 0; + t_u8 event_buf[32]; +#ifdef STA_WEXT + union iwreq_data wrqu; +#endif +#ifdef STA_CFG80211 + unsigned long flags; +#endif + + ENTER(); + priv->media_connected = MFALSE; + woal_stop_queue(priv->netdev); + if (netif_carrier_ok(priv->netdev)) + netif_carrier_off(priv->netdev); + woal_flush_tcp_sess_queue(priv); + if (priv->bss_type == MLAN_BSS_TYPE_STA) + woal_flush_tdls_list(priv); + if (priv->bss_type == MLAN_BSS_TYPE_STA && priv->hist_data) + woal_hist_data_reset(priv); + +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) { + memset(wrqu.ap_addr.sa_data, 0x00, ETH_ALEN); + wrqu.ap_addr.sa_family = ARPHRD_ETHER; + wireless_send_event(priv->netdev, SIOCGIWAP, &wrqu, NULL); + } +#endif +#ifdef STA_CFG80211 + if (IS_STA_CFG80211(cfg80211_wext)) { + spin_lock_irqsave(&priv->connect_lock, flags); + if (!priv->cfg_disconnect && !priv->cfg_connect && + priv->wdev && priv->wdev->iftype != NL80211_IFTYPE_ADHOC) { + PRINTM(MMSG, + "wlan: Disconnected from " MACSTR + ": Reason code %d\n", MAC2STR(priv->cfg_bssid), + WLAN_REASON_DEAUTH_LEAVING); + spin_unlock_irqrestore(&priv->connect_lock, flags); + /* This function must be called only when disconnect + issued by the FW, i.e. disconnected by AP. For IBSS + mode this call is not valid */ + cfg80211_disconnected(priv->netdev, + WLAN_REASON_DEAUTH_LEAVING, NULL, + 0, GFP_KERNEL); + } else { + spin_unlock_irqrestore(&priv->connect_lock, flags); + } + if (!woal_is_any_interface_active(priv->phandle)) + woal_set_scan_time(priv, ACTIVE_SCAN_CHAN_TIME, + PASSIVE_SCAN_CHAN_TIME, + SPECIFIC_SCAN_CHAN_TIME); + priv->ft_ie_len = 0; + priv->ft_pre_connect = MFALSE; + } +#endif /* STA_CFG80211 */ + + memset(event_buf, 0, sizeof(event_buf)); + custom_len = strlen(CUS_EVT_AP_CONNECTED); + strncpy(event_buf, CUS_EVT_AP_CONNECTED, + MIN((sizeof(event_buf) - 1), custom_len)); + woal_broadcast_event(priv, event_buf, custom_len + ETH_ALEN); + LEAVE(); +} +#endif /* STA_SUPPORT */ + +/** + * @brief This function stores the FW dumps received from events in a file + * + * @param priv A pointer to moal_private + * @param pmevent A pointer to mlan_event structure + * + * @return N/A + */ + +t_void +woal_store_firmware_dump(moal_private *priv, mlan_event *pmevent) +{ + struct file *pfile_fwdump = NULL; + loff_t pos; + + ENTER(); + if (priv->phandle->fwdump_fname) + pfile_fwdump = + filp_open(priv->phandle->fwdump_fname, + O_CREAT | O_WRONLY | O_APPEND, 0644); + else { + pfile_fwdump = + filp_open("/var/log/MRVL_fwdump.hex", + O_CREAT | O_WRONLY | O_APPEND, 0644); + if (IS_ERR(pfile_fwdump)) + pfile_fwdump = + filp_open("/data/MRVL_fwdump.hex", + O_CREAT | O_WRONLY | O_APPEND, 0644); + } + if (IS_ERR(pfile_fwdump)) { + PRINTM(MERROR, "Cannot create firmware dump file\n"); + LEAVE(); + return; + } + vfs_write(pfile_fwdump, pmevent->event_buf, pmevent->event_len, &pos); + filp_close(pfile_fwdump, NULL); + LEAVE(); + return; +} + +#define DRV_INFO_SIZE 0x40000 +#define ROW_SIZE_16 16 +#define ROW_SIZE_32 32 +/** + * @brief This function save moal_priv's debug log + * + * @param phandle A pointer to moal_handle + * @param buf A pointer buffer saving log + * + * @return The length of this log + */ +static int +woal_dump_priv_drv_info(moal_handle *handle, t_u8 *buf) +{ + char *ptr = (char *)buf; + int index; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + int i = 0; +#endif + moal_private *priv; + + ENTER(); + if (!handle || !buf) { + PRINTM(MMSG, "%s: can't retreive info\n", __func__); + LEAVE(); + return 0; + } + for (index = 0; index < MIN(handle->priv_num, MLAN_MAX_BSS_NUM); + index++) { + priv = handle->priv[index]; + if (priv) { + ptr += sprintf(ptr, "[Interface : %s]\n", + priv->proc_entry_name); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + ptr += sprintf(ptr, "wmm_tx_pending[0] = %d\n", + atomic_read(&priv->wmm_tx_pending[0])); + ptr += sprintf(ptr, "wmm_tx_pending[1] = %d\n", + atomic_read(&priv->wmm_tx_pending[1])); + ptr += sprintf(ptr, "wmm_tx_pending[2] = %d\n", + atomic_read(&priv->wmm_tx_pending[2])); + ptr += sprintf(ptr, "wmm_tx_pending[3] = %d\n", + atomic_read(&priv->wmm_tx_pending[3])); +#endif + ptr += sprintf(ptr, "Media state = \"%s\"\n", + ((priv->media_connected == + MFALSE) ? "Disconnected" : + "Connected")); + ptr += sprintf(ptr, "carrier %s\n", + ((netif_carrier_ok(priv->netdev)) ? "on" + : "off")); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + for (i = 0; i < (priv->netdev->num_tx_queues); i++) { + ptr += sprintf(ptr, "tx queue %d: %s\n", i, + ((netif_tx_queue_stopped + (netdev_get_tx_queue + (priv->netdev, + i))) ? "stopped" : + "started")); + } +#else + ptr += sprintf(ptr, "tx queue %s\n", + ((netif_queue_stopped(priv->netdev)) ? + "stopped" : "started")); +#endif + ptr += sprintf(ptr, "%s: num_tx_timeout = %d\n", + priv->netdev->name, + priv->num_tx_timeout); + } + } + + LEAVE(); + return ptr - (char *)buf; +} + +#define SDIO_SCRATCH_REG 0x60 +/** + * @brief This function save sdio reg info + * + * @param phandle A pointer to moal_handle + * @param buf A pointer buffer saving log + * + * @return The length of this log + */ +static int +woal_dump_sdio_reg_info(moal_handle *phandle, t_u8 *drv_buf) +{ + char *drv_ptr = (char *)drv_buf; + int ret = 0; + t_u8 loop, index = 0, func, data; + unsigned int reg, reg_start, reg_end; + unsigned int scratch_reg = SDIO_SCRATCH_REG; + unsigned int reg_table_8887[] = + { 0x08, 0x58, 0x5C, 0x5D, 0x60, 0x61, 0x62, + 0x64, 0x65, 0x66, 0x68, 0x69, 0x6a + }; + unsigned int reg_table_8897[] = + { 0x4C, 0x50, 0x54, 0x55, 0x58, 0x59, 0x5c, + 0x5d + }; + /** for sd8787/sd8777 */ + unsigned int reg_table_other[] = { 0x28, 0x30, 0x34, 0x38, 0x3c }; + unsigned int *reg_table = NULL; + t_u8 reg_table_size = 0; + char buf[256], *ptr; + + ENTER(); + + if (!phandle || !drv_buf) { + PRINTM(MMSG, "%s: can't retreive info\n", __func__); + LEAVE(); + return 0; + } + mlan_pm_wakeup_card(phandle->pmlan_adapter); +#define SDIO_SCRATCH_REG_8887 0x90 +#define SDIO_SCRATCH_REG_8897 0xC0 +#define SDIO_SCRATCH_REG_OTHER 0x60 + if (phandle->card_type == CARD_TYPE_SD8887) { + reg_table = reg_table_8887; + reg_table_size = sizeof(reg_table_8887) / sizeof(int); + scratch_reg = SDIO_SCRATCH_REG_8887; + } else if (phandle->card_type == CARD_TYPE_SD8897) { + reg_table = reg_table_8897; + reg_table_size = sizeof(reg_table_8897) / sizeof(int); + scratch_reg = SDIO_SCRATCH_REG_8897; + } else { + reg_table = reg_table_other; + reg_table_size = sizeof(reg_table_other) / sizeof(int); + scratch_reg = SDIO_SCRATCH_REG_OTHER; + } + + drv_ptr += sprintf(drv_ptr, "--------sdio_reg_debug_info---------\n"); + sdio_claim_host(((struct sdio_mmc_card *)phandle->card)->func); + for (loop = 0; loop < 5; loop++) { + memset(buf, 0, sizeof(buf)); + ptr = buf; + if (loop == 0) { + /* Read the registers of SDIO function0 */ + func = loop; + reg_start = 0; + reg_end = 9; + + } else if (loop == 1) { + /* Read the registers of SDIO function1 */ + func = loop; + if (phandle->card_type == CARD_TYPE_SD8897) { + reg_start = 4; + reg_end = 0xB; + } else if (phandle->card_type == CARD_TYPE_SD8887) { + reg_start = 0x10; + reg_end = 0x17; + } else { + reg_start = 4; + reg_end = 9; + } + } else if (loop == 2) { + /* Read specific registers of SDIO function1 */ + index = 0; + func = 1; + reg_start = reg_table[index++]; + reg_end = reg_table[reg_table_size - 1]; + } else { + /* Read the scratch registers of SDIO function1 */ + if (loop == 4) + mdelay(100); + func = 1; + reg_start = scratch_reg; + reg_end = scratch_reg + 10; + } + if (loop != 2) + ptr += sprintf(ptr, "SDIO Func%d (%#x-%#x): ", func, + reg_start, reg_end); + else + ptr += sprintf(ptr, "SDIO Func%d: ", func); + for (reg = reg_start; reg <= reg_end;) { + if (func == 0) + data = sdio_f0_readb(((struct sdio_mmc_card *) + phandle->card)->func, reg, + &ret); + else + data = sdio_readb(((struct sdio_mmc_card *) + phandle->card)->func, reg, + &ret); + if (loop == 2) + ptr += sprintf(ptr, "(%#x) ", reg); + if (!ret) + ptr += sprintf(ptr, "%02x ", data); + else { + ptr += sprintf(ptr, "ERR"); + break; + } + if (loop == 2 && reg < reg_end) + reg = reg_table[index++]; + else + reg++; + } + drv_ptr += sprintf(drv_ptr, "%s\n", buf); + } + sdio_release_host(((struct sdio_mmc_card *)phandle->card)->func); + + drv_ptr += + sprintf(drv_ptr, "--------sdio_reg_debug_info End---------\n"); + + LEAVE(); + return drv_ptr - (char *)drv_buf; +} + +/** + * @brief This function save moal_handle's info + * + * @param phandle A pointer to moal_handle + * @param buf A pointer buffer saving log + * + * @return The length of this log + */ +static int +woal_dump_moal_drv_info(moal_handle *phandle, t_u8 *buf) +{ + char *ptr; + char str_buf[MLAN_MAX_VER_STR_LEN]; + + ENTER(); + if (!phandle || !buf) { + PRINTM(MMSG, "%s: can't retreive info\n", __func__); + LEAVE(); + return 0; + } + ptr = (char *)buf; + ptr += sprintf(ptr, "------------moal_debug_info-------------\n"); + woal_get_version(phandle, str_buf, sizeof(str_buf) - 1); + ptr += sprintf(ptr, "Driver version = %s\n", str_buf); + ptr += sprintf(ptr, "main_state = %d\n", phandle->main_state); + ptr += sprintf(ptr, "ioctl_pending = %d\n", + atomic_read(&phandle->ioctl_pending)); + ptr += sprintf(ptr, "tx_pending = %d\n", + atomic_read(&phandle->tx_pending)); + ptr += sprintf(ptr, "rx_pending = %d\n", + atomic_read(&phandle->rx_pending)); + ptr += sprintf(ptr, "lock_count = %d\n", + atomic_read(&phandle->lock_count)); + ptr += sprintf(ptr, "malloc_count = %d\n", + atomic_read(&phandle->malloc_count)); + ptr += sprintf(ptr, "mbufalloc_count = %d\n", + atomic_read(&phandle->mbufalloc_count)); +#if defined(SDIO_SUSPEND_RESUME) + ptr += sprintf(ptr, "hs_skip_count = %u\n", phandle->hs_skip_count); + ptr += sprintf(ptr, "hs_force_count = %u\n", phandle->hs_force_count); +#endif + + ptr += woal_dump_priv_drv_info(phandle, ptr); + ptr += sprintf(ptr, "------------moal_debug_info End-------------\n"); + + ptr += woal_dump_sdio_reg_info(phandle, ptr); + + LEAVE(); + return ptr - (char *)buf; +} + +/** + * @brief This function save mlan's info + * + * @param phandle A pointer to moal_handle + * @param buf A pointer buffer saving log + * + * @return The length of this log + */ +static int +woal_dump_mlan_drv_info(moal_private *priv, t_u8 *buf) +{ + char *ptr = (char *)buf; + int i; +#ifdef SDIO_MULTI_PORT_TX_AGGR + int j; + t_u8 mp_aggr_pkt_limit = 0; +#endif + char str[11 * DBG_CMD_NUM + 1] = { 0 }; + char *s; + + ENTER(); + if (!priv || woal_get_debug_info(priv, MOAL_CMD_WAIT, &info)) { + PRINTM(MERROR, + "Could not retrieve debug information from MLAN\n"); + LEAVE(); + return 0; + } + ptr += sprintf(ptr, "------------mlan_debug_info-------------\n"); + ptr += sprintf(ptr, "mlan_processing =%d\n", info.mlan_processing); + ptr += sprintf(ptr, "mlan_rx_processing =%d\n", + info.mlan_rx_processing); + ptr += sprintf(ptr, "rx_pkts_queued =%d\n", info.rx_pkts_queued); + ptr += sprintf(ptr, "tx_pkts_queued =%d\n", info.tx_pkts_queued); + + ptr += sprintf(ptr, "num_cmd_timeout = %d\n", info.num_cmd_timeout); + ptr += sprintf(ptr, "dbg.num_cmd_timeout = %d\n", + info.dbg_num_cmd_timeout); + ptr += sprintf(ptr, "Timeout cmd id = 0x%x, act = 0x%x\n", + info.timeout_cmd_id, info.timeout_cmd_act); + ptr += sprintf(ptr, "last_cmd_index = %d\n", info.last_cmd_index); + for (s = str, i = 0; i < DBG_CMD_NUM; i++) + s += sprintf(s, "0x%x ", info.last_cmd_id[i]); + ptr += sprintf(ptr, "last_cmd_id = %s\n", str); + + for (s = str, i = 0; i < DBG_CMD_NUM; i++) + s += sprintf(s, "0x%x ", info.last_cmd_act[i]); + + ptr += sprintf(ptr, "last_cmd_act = %s\n", str); + ptr += sprintf(ptr, "last_cmd_resp_index = %d\n", + info.last_cmd_resp_index); + for (s = str, i = 0; i < DBG_CMD_NUM; i++) + s += sprintf(s, "0x%x ", info.last_cmd_resp_id[i]); + + ptr += sprintf(ptr, "last_cmd_resp_id = %s\n", str); + ptr += sprintf(ptr, "last_event_index = %d\n", info.last_event_index); + for (s = str, i = 0; i < DBG_CMD_NUM; i++) + s += sprintf(s, "0x%x ", info.last_event[i]); + + ptr += sprintf(ptr, "last_event = %s\n", str); + ptr += sprintf(ptr, "num_data_h2c_failure = %d\n", + info.num_tx_host_to_card_failure); + ptr += sprintf(ptr, "num_cmd_h2c_failure = %d\n", + info.num_cmd_host_to_card_failure); + ptr += sprintf(ptr, "num_data_c2h_failure = %d\n", + info.num_rx_card_to_host_failure); + ptr += sprintf(ptr, "num_cmdevt_c2h_failure = %d\n", + info.num_cmdevt_card_to_host_failure); + ptr += sprintf(ptr, "num_int_read_failure = %d\n", + info.num_int_read_failure); + ptr += sprintf(ptr, "last_int_status = %d\n", info.last_int_status); + ptr += sprintf(ptr, "num_event_deauth = %d\n", info.num_event_deauth); + ptr += sprintf(ptr, "num_event_disassoc = %d\n", + info.num_event_disassoc); + ptr += sprintf(ptr, "num_event_link_lost = %d\n", + info.num_event_link_lost); + ptr += sprintf(ptr, "num_cmd_deauth = %d\n", info.num_cmd_deauth); + ptr += sprintf(ptr, "num_cmd_assoc_success = %d\n", + info.num_cmd_assoc_success); + ptr += sprintf(ptr, "num_cmd_assoc_failure = %d\n", + info.num_cmd_assoc_failure); + ptr += sprintf(ptr, "cmd_resp_received = %d\n", info.cmd_resp_received); + ptr += sprintf(ptr, "event_received = %d\n", info.event_received); + ptr += sprintf(ptr, "max_tx_buf_size = %d\n", info.max_tx_buf_size); + ptr += sprintf(ptr, "tx_buf_size = %d\n", info.tx_buf_size); + ptr += sprintf(ptr, "curr_tx_buf_size = %d\n", info.curr_tx_buf_size); + + ptr += sprintf(ptr, "data_sent=%d cmd_sent=%d\n", info.data_sent, + info.cmd_sent); + ptr += sprintf(ptr, "ps_mode=%d ps_state=%d\n", info.ps_mode, + info.ps_state); + ptr += sprintf(ptr, "wakeup_dev_req=%d wakeup_tries=%d\n", + info.pm_wakeup_card_req, info.pm_wakeup_fw_try); + ptr += sprintf(ptr, "hs_configured=%d hs_activated=%d\n", + info.is_hs_configured, info.hs_activated); + ptr += sprintf(ptr, "pps_uapsd_mode=%d sleep_pd=%d\n", + info.pps_uapsd_mode, info.sleep_pd); + ptr += sprintf(ptr, "tx_lock_flag = %d\n", info.tx_lock_flag); + ptr += sprintf(ptr, "port_open = %d\n", info.port_open); + ptr += sprintf(ptr, "scan_processing = %d\n", info.scan_processing); + + ptr += sprintf(ptr, "mp_rd_bitmap=0x%x curr_rd_port=0x%x\n", + (unsigned int)info.mp_rd_bitmap, info.curr_rd_port); + ptr += sprintf(ptr, "mp_wr_bitmap=0x%x curr_wr_port=0x%x\n", + (unsigned int)info.mp_wr_bitmap, info.curr_wr_port); + ptr += sprintf(ptr, "mp_invalid_update=%d\n", info.mp_invalid_update); +#ifdef SDIO_MULTI_PORT_TX_AGGR + mp_aggr_pkt_limit = info.mp_aggr_pkt_limit; + ptr += sprintf(ptr, "last_recv_wr_bitmap=0x%x last_mp_index = %d\n", + info.last_recv_wr_bitmap, info.last_mp_index); + for (i = 0; i < SDIO_MP_DBG_NUM; i++) { + for (s = str, j = 0; j < mp_aggr_pkt_limit; j++) + s += sprintf(s, "0x%02x ", + info.last_mp_wr_info[i * + mp_aggr_pkt_limit + + j]); + + ptr += sprintf(ptr, + "mp_wr_bitmap: 0x%x mp_wr_ports=0x%x len=%d curr_wr_port=0x%x\n%s\n", + info.last_mp_wr_bitmap[i], + info.last_mp_wr_ports[i], info.last_mp_wr_len[i], + info.last_curr_wr_port[i], str); + } +#endif + ptr += sprintf(ptr, "------------mlan_debug_info End-------------\n"); + + LEAVE(); + return ptr - (char *)buf; +} + +/** + * @brief This function dump hex to file + * + * @param phandle A pointer to moal_handle + * @param buf A pointer to buffer to dump + * @param len lengh of buf + * @param ascii Whether add ascii at the end + * @param save_buf Buffer which is saved to + * + * @return The length of this log + */ +static int +woal_save_hex_dump(int rowsize, const void *buf, size_t len, + bool ascii, t_u8 *save_buf) +{ + const u8 *ptr = buf; + int i, linelen, remaining = len; + unsigned char linebuf[ROW_SIZE_32 * 3 + 2 + ROW_SIZE_32 + 1]; + char *pos = (char *)save_buf; + + if (rowsize != ROW_SIZE_16 && rowsize != ROW_SIZE_32) + rowsize = ROW_SIZE_16; + + for (i = 0; i < len; i += rowsize) { + linelen = min(remaining, rowsize); + remaining -= rowsize; + + hex_dump_to_buffer(ptr + i, linelen, rowsize, 1, linebuf, + sizeof(linebuf), ascii); + + pos += sprintf(pos, "%p: %s\n", ptr + i, linebuf); + } + + return pos - (char *)save_buf; +} + +/** + * @brief This function dump moal hex to file + * + * @param phandle A pointer to moal_handle + * @param buf A pointer to buffer + * + * @return The length of this log + */ +static int +woal_dump_moal_hex(moal_handle *phandle, t_u8 *buf) +{ + char *ptr = (char *)buf; + int i; + ENTER(); + + if (!phandle || !buf) { + PRINTM(MMSG, "%s: can't retreive info\n", __func__); + LEAVE(); + return 0; + } + + ptr += sprintf(ptr, "<--moal_handle-->\n"); + ptr += sprintf(ptr, "moal_handle=%p, size=%ld(0x%lx)\n", phandle, + (long int)sizeof(*phandle), + (long unsigned int)sizeof(*phandle)); + ptr += woal_save_hex_dump(ROW_SIZE_16, phandle, sizeof(*phandle), MTRUE, + ptr); + ptr += sprintf(ptr, "<--moal_handle End-->\n"); + + for (i = 0; i < phandle->priv_num; i++) { + ptr += sprintf(ptr, "<--moal_private(%d)-->\n", i); + ptr += sprintf(ptr, "moal_private=%p, size=%ld(0x%lx)\n", + phandle->priv[i], + (long int)sizeof(*(phandle->priv[i])), + (long unsigned int)sizeof(*(phandle->priv[i]))); + ptr += woal_save_hex_dump(ROW_SIZE_16, phandle->priv[i], + sizeof(*(phandle->priv[i])), MTRUE, + ptr); + ptr += sprintf(ptr, "<--moal_private(%d) End-->\n", i); + } + LEAVE(); + return ptr - (char *)buf; +} + +/** + * @brief This function dump mlan hex to file + * + * @param priv A pointer to moal_private structure + * @param buf A pointer to buffer + * @param pfile A pointer to file structure + * + * @return The length of this log + */ +static int +woal_dump_mlan_hex(moal_private *priv, t_u8 *buf, struct file *pfile) +{ + char *ptr = (char *)buf; + int i; + int len = 0; + + ENTER(); + + if (!buf || !priv || !pfile || + woal_get_debug_info(priv, MOAL_CMD_WAIT, &info)) { + PRINTM(MMSG, "%s: can't retreive info\n", __func__); + LEAVE(); + return 0; + } + + ptr += sprintf(ptr, "<--mlan_adapter-->\n"); + ptr += sprintf(ptr, "mlan_adapter=%p, size=%d(0x%x)\n", + info.mlan_adapter, info.mlan_adapter_size, + info.mlan_adapter_size); + ptr += woal_save_hex_dump(ROW_SIZE_16, info.mlan_adapter, + info.mlan_adapter_size, MTRUE, ptr); + ptr += sprintf(ptr, "<--mlan_adapter End-->\n"); + vfs_write(pfile, buf, ptr - (char *)buf, &pfile->f_pos); + len += ptr - (char *)buf; +#ifdef SDIO_MULTI_PORT_TX_AGGR + if (info.mpa_buf && info.mpa_buf_size) { + ptr = (char *)buf; + ptr += sprintf(ptr, "<--mlan_mpa_buf-->\n"); + ptr += sprintf(ptr, "mlan_mpa_buf=%p, size=%d(0x%x)\n", + info.mpa_buf, info.mpa_buf_size, + info.mpa_buf_size); + ptr += woal_save_hex_dump(ROW_SIZE_16, info.mpa_buf, + info.mpa_buf_size, MTRUE, ptr); + ptr += sprintf(ptr, "<--mlan_mpa_buf End-->\n"); + vfs_write(pfile, buf, ptr - (char *)buf, &pfile->f_pos); + len += ptr - (char *)buf; + } +#endif + for (i = 0; i < info.mlan_priv_num; i++) { + ptr = (char *)buf; + ptr += sprintf(ptr, "<--mlan_private(%d)-->\n", i); + ptr += sprintf(ptr, "mlan_private=%p, size=%d(0x%x)\n", + info.mlan_priv[i], info.mlan_priv_size[i], + info.mlan_priv_size[i]); + ptr += woal_save_hex_dump(ROW_SIZE_16, info.mlan_priv[i], + info.mlan_priv_size[i], MTRUE, ptr); + ptr += sprintf(ptr, "<--mlan_private(%d) End-->\n", i); + vfs_write(pfile, buf, ptr - (char *)buf, &pfile->f_pos); + len += ptr - (char *)buf; + } + + LEAVE(); + return len; +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0) +/** + * @brief This function create dump directory + * + * @param phandle A pointer to moal_handle + * @param dir_buf A pointer to dir_buf buffer + * @param buf_size Size of dir_buf buffer + * + * @return N/A + */ +void +woal_create_dump_dir(moal_handle *phandle, char *dir_buf, int buf_size) +{ + struct dentry *dentry; + struct path path; + t_u32 sec, usec; + int ret; + + ENTER(); + + if (!phandle || !dir_buf) { + PRINTM(MERROR, "Can't create directory\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + moal_get_system_time(phandle, &sec, &usec); + memset(dir_buf, 0, buf_size); + sprintf(dir_buf, "%s%u", "/data/dump_", sec); + + dentry = kern_path_create(AT_FDCWD, dir_buf, &path, 1); + if (IS_ERR(dentry)) { + PRINTM(MMSG, + "Create directory %s error, try create dir in /var", + dir_buf); + memset(dir_buf, 0, buf_size); + sprintf(dir_buf, "%s%u", "/var/dump_", sec); + dentry = kern_path_create(AT_FDCWD, dir_buf, &path, 1); + } + if (IS_ERR(dentry)) { + PRINTM(MMSG, "Create directory %s error, use default folder", + dir_buf); + goto default_dir; + } + ret = vfs_mkdir(path.dentry->d_inode, dentry, 0777); + mutex_unlock(&path.dentry->d_inode->i_mutex); + if (ret < 0) { + PRINTM(MMSG, "Create directory failure, use default folder\n"); + goto default_dir; + } else { + PRINTM(MMSG, "Create directory %s successfully\n", dir_buf); + goto done; + } + +default_dir: + memset(dir_buf, 0, buf_size); + sprintf(dir_buf, "%s", "/data"); +done: + LEAVE(); +} +#endif + +/** + * @brief This function save dump buf to file + * + * @param dir_name A pointer to directory name + * @param file_name A pointer to file name + * @param buf A pointer to dump data + * @param buf_len The length of dump buf + * + * @return SUCCESS OR FAILURE + */ +mlan_status +woal_save_dump_info_to_file(char *dir_name, char *file_name, t_u8 *buf, + t_u32 buf_len) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + struct file *pfile = NULL; + t_u8 name[64]; + mm_segment_t fs; + loff_t pos; + + ENTER(); + + if (!dir_name || !file_name || !buf) { + PRINTM(MERROR, "Can't save dump info to file\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + memset(name, 0, sizeof(name)); + sprintf(name, "%s/%s", dir_name, file_name); + pfile = filp_open(name, O_CREAT | O_RDWR, 0644); + if (IS_ERR(pfile)) { + PRINTM(MMSG, + "Create file %s error, try to save dump file in /var\n", + name); + memset(name, 0, sizeof(name)); + sprintf(name, "%s/%s", "/var", file_name); + pfile = filp_open(name, O_CREAT | O_RDWR, 0644); + } + if (IS_ERR(pfile)) { + PRINTM(MERROR, "Create Dump file for %s error\n", name); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + PRINTM(MMSG, "Dump data %s saved in %s\n", file_name, name); + + fs = get_fs(); + set_fs(KERNEL_DS); + pos = 0; + vfs_write(pfile, buf, buf_len, &pos); + filp_close(pfile, NULL); + set_fs(fs); + + PRINTM(MMSG, "Dump data %s saved in %s successfully\n", file_name, + name); + +done: + LEAVE(); + return ret; +} + +/** + * @brief This function dump drv info to file + * + * @param phandle A pointer to moal_handle + * @param dir_name A pointer to directory name + * + * @return N/A + */ +void +woal_dump_drv_info(moal_handle *phandle, t_u8 *dir_name) +{ + int ret = 0; + struct file *pfile = NULL; + mm_segment_t fs; + t_u8 *drv_buf; + t_u8 file_name[64]; + t_u32 len = 0; + t_u32 total_len = 0; + + ENTER(); + + PRINTM(MMSG, "=== START DRIVER INFO DUMP==="); + ret = moal_vmalloc(phandle, DRV_INFO_SIZE + 1, &drv_buf); + if ((ret != MLAN_STATUS_SUCCESS) || !drv_buf) { + PRINTM(MERROR, "Error: vmalloc drv buffer failed!\n"); + goto done; + } + memset(file_name, 0, sizeof(file_name)); + sprintf(file_name, "%s/%s", dir_name, "file_drv_info"); + pfile = filp_open(file_name, O_CREAT | O_RDWR, 0644); + if (IS_ERR(pfile)) { + PRINTM(MMSG, + "Create file %s error, try create /var/file_drv_info", + file_name); + pfile = filp_open("/var/file_drv_info", O_CREAT | O_RDWR, 0644); + } else { + PRINTM(MMSG, "DRV dump data in %s\n", file_name); + } + if (IS_ERR(pfile)) { + PRINTM(MMSG, "Create file_drv_info file failed\n"); + goto done; + } + fs = get_fs(); + set_fs(KERNEL_DS); + + len = woal_dump_moal_drv_info(phandle, drv_buf); + total_len += len; + vfs_write(pfile, drv_buf, len, &pfile->f_pos); + + len = woal_dump_mlan_drv_info(woal_get_priv(phandle, MLAN_BSS_ROLE_ANY), + drv_buf); + total_len += len; + vfs_write(pfile, drv_buf, len, &pfile->f_pos); + + len = woal_dump_moal_hex(phandle, drv_buf); + total_len += len; + vfs_write(pfile, drv_buf, len, &pfile->f_pos); + + len = woal_dump_mlan_hex(woal_get_priv(phandle, MLAN_BSS_ROLE_ANY), + drv_buf, pfile); + total_len += len; + + PRINTM(MMSG, "Drv info total bytes = %ld (0x%lx)\n", + (long int)total_len, (long unsigned int)total_len); + + filp_close(pfile, NULL); + set_fs(fs); + + PRINTM(MMSG, "=== DRIVER INFO DUMP END==="); +done: + if (drv_buf) + moal_vfree(phandle, drv_buf); + LEAVE(); +} + +#define DEBUG_HOST_READY 0xEE +#define DEBUG_FW_DONE 0xFF +#define MAX_POLL_TRIES 100 +#define DEBUG_ITCM_DONE 0xaa +#define DEBUG_DTCM_DONE 0xbb +#define DEBUG_SQRAM_DONE 0xcc + +#define DEBUG_DUMP_CTRL_REG 0x63 +#define DEBUG_DUMP_FIRST_REG 0x62 +#define DEBUG_DUMP_START_REG 0x64 +#define DEBUG_DUMP_END_REG 0x6a +#define ITCM_SIZE 0x60000 +/* SD8777 */ +#define SQRAM_SIZE_8777 0x33000 +#define DTCM_SIZE_8777 0x14000 +/* SD8787 */ +#define SQRAM_SIZE_8787 0x33000 +#define DTCM_SIZE_8787 0xA700 +/* SD8801 */ +#define SQRAM_SIZE_8801 0x33000 +#define DTCM_SIZE_8801 0x14000 +/* SD8797 */ +#define SQRAM_SIZE_8797 0x7c000 +#define DTCM_SIZE_8797 0x14000 + +#define SQRAM_SIZE 0x33500 + +#define DTCM_SIZE 0x10000 + +/** + * @brief This function dump firmware memory to file + * + * @param phandle A pointer to moal_handle + * + * @return N/A + */ +void +woal_dump_firmware_info(moal_handle *phandle) +{ + + int ret = 0; + unsigned int reg, reg_start, reg_end; + t_u8 path_name[64], file_name[32]; + t_u8 *ITCM_Ptr = NULL; + t_u8 *DTCM_Ptr = NULL; + t_u8 *SQRAM_Ptr = NULL; + t_u8 *dbg_ptr = NULL; + t_u32 sec, usec; + t_u8 ctrl_data = 0; + t_u32 dtcm_size = 0; + t_u32 sqram_size = SQRAM_SIZE; + t_u8 *end_ptr = NULL; + int tries; + + if (!phandle) { + PRINTM(MERROR, "Could not dump firmwware info\n"); + return; + } + + if ((phandle->card_type == CARD_TYPE_SD8887) || + (phandle->card_type == CARD_TYPE_SD8897)) { + woal_dump_firmware_info_v2(phandle); + return; + } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0) + /** Create dump directort*/ + woal_create_dump_dir(phandle, path_name, sizeof(path_name)); +#else + memset(path_name, 0, sizeof(path_name)); + strcpy(path_name, "/data"); +#endif + PRINTM(MMSG, "Directory name is %s\n", path_name); + + woal_dump_drv_info(phandle, path_name); + mlan_pm_wakeup_card(phandle->pmlan_adapter); + sdio_claim_host(((struct sdio_mmc_card *)phandle->card)->func); + phandle->fw_dump = MTRUE; + /* start dump fw memory */ + moal_get_system_time(phandle, &sec, &usec); + PRINTM(MMSG, "==== DEBUG MODE OUTPUT START: %u.%06u ====\n", sec, usec); + ret = moal_vmalloc(phandle, ITCM_SIZE + 1, (t_u8 **)&ITCM_Ptr); + if ((ret != MLAN_STATUS_SUCCESS) || !ITCM_Ptr) { + PRINTM(MERROR, "Error: vmalloc ITCM buffer failed!!!\n"); + goto done; + } + if (phandle->card_type == CARD_TYPE_SD8787) { + dtcm_size = DTCM_SIZE_8787; + sqram_size = SQRAM_SIZE_8787; + } else if (phandle->card_type == CARD_TYPE_SD8777) { + dtcm_size = DTCM_SIZE_8777; + sqram_size = SQRAM_SIZE_8777; + } else if (phandle->card_type == CARD_TYPE_SD8801) { + dtcm_size = DTCM_SIZE_8801; + sqram_size = SQRAM_SIZE_8801; + } else if (phandle->card_type == CARD_TYPE_SD8797) { + dtcm_size = DTCM_SIZE_8797; + sqram_size = SQRAM_SIZE_8797; + } else + dtcm_size = DTCM_SIZE; + + PRINTM(MMSG, "DTCM_SIZE=0x%x\n", dtcm_size); + ret = moal_vmalloc(phandle, dtcm_size + 1, (t_u8 **)&DTCM_Ptr); + if ((ret != MLAN_STATUS_SUCCESS) || !DTCM_Ptr) { + PRINTM(MERROR, "Error: vmalloc DTCM buffer failed!!!\n"); + goto done; + } + ret = moal_vmalloc(phandle, sqram_size + 1, (t_u8 **)&SQRAM_Ptr); + if ((ret != MLAN_STATUS_SUCCESS) || !SQRAM_Ptr) { + PRINTM(MERROR, "Error: vmalloc SQRAM buffer failed!!!\n"); + goto done; + } + dbg_ptr = ITCM_Ptr; + end_ptr = ITCM_Ptr + ITCM_SIZE; + moal_get_system_time(phandle, &sec, &usec); + PRINTM(MMSG, "Start ITCM output %u.%06u, please wait...\n", sec, usec); + reg_start = DEBUG_DUMP_START_REG; + reg_end = DEBUG_DUMP_END_REG; + do { + sdio_writeb(((struct sdio_mmc_card *)phandle->card)->func, + DEBUG_HOST_READY, DEBUG_DUMP_CTRL_REG, &ret); + if (ret) { + PRINTM(MERROR, "SDIO Write ERR\n"); + goto done; + } + for (tries = 0; tries < MAX_POLL_TRIES; tries++) { + ctrl_data = + sdio_readb(((struct sdio_mmc_card *)phandle-> + card)->func, DEBUG_DUMP_CTRL_REG, + &ret); + if (ret) { + PRINTM(MERROR, "SDIO READ ERR\n"); + goto done; + } + if ((ctrl_data == DEBUG_FW_DONE) || + (ctrl_data == DEBUG_ITCM_DONE) + || (ctrl_data == DEBUG_DTCM_DONE) || + (ctrl_data == DEBUG_SQRAM_DONE)) + break; + if (ctrl_data != DEBUG_HOST_READY) { + sdio_writeb(((struct sdio_mmc_card *)phandle-> + card)->func, DEBUG_HOST_READY, + DEBUG_DUMP_CTRL_REG, &ret); + if (ret) { + PRINTM(MERROR, "SDIO Write ERR\n"); + goto done; + } + } + udelay(100); + } + if (ctrl_data == DEBUG_HOST_READY) { + PRINTM(MERROR, "Fail to pull ctrl_data\n"); + goto done; + } + reg = DEBUG_DUMP_FIRST_REG; + *dbg_ptr = + sdio_readb(((struct sdio_mmc_card *)phandle->card)-> + func, reg, &ret); + if (ret) { + PRINTM(MMSG, "SDIO READ ERR\n"); + goto done; + } + if (dbg_ptr < end_ptr) + dbg_ptr++; + else { + PRINTM(MERROR, "pre-allocced buf is not enough\n"); + goto done; + } + for (reg = reg_start; reg <= reg_end; reg++) { + *dbg_ptr = + sdio_readb(((struct sdio_mmc_card *)phandle-> + card)->func, reg, &ret); + if (ret) { + PRINTM(MMSG, "SDIO READ ERR\n"); + goto done; + } + if (dbg_ptr < end_ptr) + dbg_ptr++; + else + PRINTM(MMSG, + "pre-allocced buf is not enough\n"); + } + switch (ctrl_data) { + case DEBUG_ITCM_DONE: +#ifdef MLAN_64BIT + PRINTM(MMSG, "ITCM done: size=0x%lx\n", + dbg_ptr - ITCM_Ptr); +#else + PRINTM(MMSG, "ITCM done: size=0x%x\n", + dbg_ptr - ITCM_Ptr); +#endif + memset(file_name, 0, sizeof(file_name)); + sprintf(file_name, "%s", "file_sdio_ITCM"); + if (MLAN_STATUS_SUCCESS != + woal_save_dump_info_to_file(path_name, file_name, + ITCM_Ptr, ITCM_SIZE)) + PRINTM(MMSG, "Can't save dump file %s in %s\n", + file_name, path_name); + dbg_ptr = DTCM_Ptr; + end_ptr = DTCM_Ptr + dtcm_size; + moal_get_system_time(phandle, &sec, &usec); + PRINTM(MMSG, + "Start DTCM output %u.%06u, please wait...\n", + sec, usec); + break; + case DEBUG_DTCM_DONE: +#ifdef MLAN_64BIT + PRINTM(MMSG, "DTCM done: size=0x%lx\n", + dbg_ptr - DTCM_Ptr); +#else + PRINTM(MMSG, "DTCM done: size=0x%x\n", + dbg_ptr - DTCM_Ptr); +#endif + memset(file_name, 0, sizeof(file_name)); + sprintf(file_name, "%s", "file_sdio_DTCM"); + if (MLAN_STATUS_SUCCESS != + woal_save_dump_info_to_file(path_name, file_name, + DTCM_Ptr, dtcm_size)) + PRINTM(MMSG, "Can't save dump file %s in %s\n", + file_name, path_name); + dbg_ptr = SQRAM_Ptr; + end_ptr = SQRAM_Ptr + sqram_size; + moal_get_system_time(phandle, &sec, &usec); + PRINTM(MMSG, + "Start SQRAM output %u.%06u, please wait...\n", + sec, usec); + break; + case DEBUG_SQRAM_DONE: +#ifdef MLAN_64BIT + PRINTM(MMSG, "SQRAM done: size=0x%lx\n", + dbg_ptr - SQRAM_Ptr); +#else + PRINTM(MMSG, "SQRAM done: size=0x%x\n", + dbg_ptr - SQRAM_Ptr); +#endif + memset(file_name, 0, sizeof(file_name)); + sprintf(file_name, "%s", "file_sdio_SQRAM"); + if (MLAN_STATUS_SUCCESS != + woal_save_dump_info_to_file(path_name, file_name, + SQRAM_Ptr, sqram_size)) + PRINTM(MMSG, "Can't save dump file %s in %s\n", + file_name, path_name); + PRINTM(MMSG, "End output!\n"); + break; + default: + break; + } + } while (ctrl_data != DEBUG_SQRAM_DONE); + + PRINTM(MMSG, + "The output ITCM/DTCM/SQRAM have been saved to files successfully!\n"); + moal_get_system_time(phandle, &sec, &usec); + PRINTM(MMSG, "==== DEBUG MODE OUTPUT END: %u.%06u ====\n", sec, usec); + /* end dump fw memory */ +done: + phandle->fw_dump = MFALSE; + sdio_release_host(((struct sdio_mmc_card *)phandle->card)->func); + if (ITCM_Ptr) + moal_vfree(phandle, ITCM_Ptr); + if (DTCM_Ptr) + moal_vfree(phandle, DTCM_Ptr); + if (SQRAM_Ptr) + moal_vfree(phandle, SQRAM_Ptr); + PRINTM(MMSG, "==== DEBUG MODE END ====\n"); + return; +} + +#define DEBUG_DUMP_CTRL_REG_8887 0xA2 +#define DEBUG_DUMP_START_REG_8887 0xA3 +#define DEBUG_DUMP_END_REG_8887 0xAA + +#define DEBUG_DUMP_CTRL_REG_8897 0xE2 +#define DEBUG_DUMP_START_REG_8897 0xE3 +#define DEBUG_DUMP_END_REG_8897 0xEA + +typedef enum { + DUMP_TYPE_ITCM = 0, + DUMP_TYPE_DTCM = 1, + DUMP_TYPE_SQRAM = 2, + DUMP_TYPE_APU_REGS = 3, + DUMP_TYPE_CIU_REGS = 4, + DUMP_TYPE_ICU_REGS = 5, + DUMP_TYPE_MAC_REGS = 6, + DUMP_TYPE_EXTEND_7 = 7, + DUMP_TYPE_EXTEND_8 = 8, + DUMP_TYPE_EXTEND_9 = 9, + DUMP_TYPE_EXTEND_10 = 10, + DUMP_TYPE_EXTEND_11 = 11, + DUMP_TYPE_EXTEND_12 = 12, + DUMP_TYPE_EXTEND_13 = 13, + DUMP_TYPE_EXTEND_LAST = 14 +} dumped_mem_type; + +#define MAX_NAME_LEN 8 +#define MAX_FULL_NAME_LEN 32 +t_u8 *name_prefix = "/data/file_"; + +typedef struct { + t_u8 mem_name[MAX_NAME_LEN]; + t_u8 *mem_Ptr; + struct file *pfile_mem; + t_u8 done_flag; +} memory_type_mapping; + +memory_type_mapping mem_type_mapping_tbl[] = { + {"ITCM", NULL, NULL, 0xF0}, + {"DTCM", NULL, NULL, 0xF1}, + {"SQRAM", NULL, NULL, 0xF2}, + {"APU", NULL, NULL, 0xF3}, + {"CIU", NULL, NULL, 0xF4}, + {"ICU", NULL, NULL, 0xF5}, + {"MAC", NULL, NULL, 0xF6}, + {"EXT7", NULL, NULL, 0xF7}, + {"EXT8", NULL, NULL, 0xF8}, + {"EXT9", NULL, NULL, 0xF9}, + {"EXT10", NULL, NULL, 0xFA}, + {"EXT11", NULL, NULL, 0xFB}, + {"EXT12", NULL, NULL, 0xFC}, + {"EXT13", NULL, NULL, 0xFD}, + {"EXTLAST", NULL, NULL, 0xFE}, +}; + +typedef enum { + RDWR_STATUS_SUCCESS = 0, + RDWR_STATUS_FAILURE = 1, + RDWR_STATUS_DONE = 2 +} rdwr_status; + +/** + * @brief This function read/write firmware via cmd52 + * + * @param phandle A pointer to moal_handle + * + * @return MLAN_STATUS_SUCCESS + */ +rdwr_status +woal_cmd52_rdwr_firmware(moal_handle *phandle, t_u8 doneflag) +{ + int ret = 0; + int tries = 0; + t_u8 ctrl_data = 0; + t_u8 dbg_dump_ctrl_reg = 0; + + if (phandle->card_type == CARD_TYPE_SD8887) + dbg_dump_ctrl_reg = DEBUG_DUMP_CTRL_REG_8887; + else if (phandle->card_type == CARD_TYPE_SD8897) + dbg_dump_ctrl_reg = DEBUG_DUMP_CTRL_REG_8897; + sdio_writeb(((struct sdio_mmc_card *)phandle->card)->func, + DEBUG_HOST_READY, dbg_dump_ctrl_reg, &ret); + if (ret) { + PRINTM(MERROR, "SDIO Write ERR\n"); + return RDWR_STATUS_FAILURE; + } + for (tries = 0; tries < MAX_POLL_TRIES; tries++) { + ctrl_data = + sdio_readb(((struct sdio_mmc_card *)phandle->card)-> + func, dbg_dump_ctrl_reg, &ret); + if (ret) { + PRINTM(MERROR, "SDIO READ ERR\n"); + return RDWR_STATUS_FAILURE; + } + if (ctrl_data == DEBUG_FW_DONE) + break; + if (doneflag && ctrl_data == doneflag) + return RDWR_STATUS_DONE; + if (ctrl_data != DEBUG_HOST_READY) { + PRINTM(MMSG, + "The ctrl reg was changed, re-try again!\n"); + sdio_writeb(((struct sdio_mmc_card *)phandle->card)-> + func, DEBUG_HOST_READY, dbg_dump_ctrl_reg, + &ret); + if (ret) { + PRINTM(MERROR, "SDIO Write ERR\n"); + return RDWR_STATUS_FAILURE; + } + } + udelay(100); + } + if (ctrl_data == DEBUG_HOST_READY) { + PRINTM(MERROR, "Fail to pull ctrl_data\n"); + return RDWR_STATUS_FAILURE; + } + + return RDWR_STATUS_SUCCESS; +} + +/** + * @brief This function dump firmware memory to file + * + * @param phandle A pointer to moal_handle + * + * @return N/A + */ +void +woal_dump_firmware_info_v2(moal_handle *phandle) +{ + + int ret = 0; + unsigned int reg, reg_start, reg_end; + t_u8 *dbg_ptr = NULL; + t_u32 sec, usec; + t_u8 dump_num = 0; + t_u8 idx = 0; + t_u8 doneflag = 0; + rdwr_status stat; + t_u8 i = 0; + t_u8 read_reg = 0; + t_u32 memory_size = 0; + t_u8 path_name[64], file_name[32]; + t_u8 *end_ptr = NULL; + t_u8 dbg_dump_start_reg = 0; + t_u8 dbg_dump_end_reg = 0; + + if (!phandle) { + PRINTM(MERROR, "Could not dump firmwware info\n"); + return; + } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0) + /** Create dump directort*/ + woal_create_dump_dir(phandle, path_name, sizeof(path_name)); +#else + memset(path_name, 0, sizeof(path_name)); + strcpy(path_name, "/data"); +#endif + PRINTM(MMSG, "Directory name is %s\n", path_name); + + woal_dump_drv_info(phandle, path_name); + if (phandle->card_type == CARD_TYPE_SD8887) { + dbg_dump_start_reg = DEBUG_DUMP_START_REG_8887; + dbg_dump_end_reg = DEBUG_DUMP_END_REG_8887; + } else if (phandle->card_type == CARD_TYPE_SD8897) { + dbg_dump_start_reg = DEBUG_DUMP_START_REG_8897; + dbg_dump_end_reg = DEBUG_DUMP_END_REG_8897; + } + mlan_pm_wakeup_card(phandle->pmlan_adapter); + phandle->fw_dump = MTRUE; + sdio_claim_host(((struct sdio_mmc_card *)phandle->card)->func); + /* start dump fw memory */ + moal_get_system_time(phandle, &sec, &usec); + PRINTM(MMSG, "==== DEBUG MODE OUTPUT START: %u.%06u ====\n", sec, usec); + /* read the number of the memories which will dump */ + if (RDWR_STATUS_FAILURE == woal_cmd52_rdwr_firmware(phandle, doneflag)) + goto done; + reg = dbg_dump_start_reg; + dump_num = + sdio_readb(((struct sdio_mmc_card *)phandle->card)->func, reg, + &ret); + if (ret) { + PRINTM(MMSG, "SDIO READ MEM NUM ERR\n"); + goto done; + } + + /* read the length of every memory which will dump */ + for (idx = 0; idx < dump_num; idx++) { + if (RDWR_STATUS_FAILURE == + woal_cmd52_rdwr_firmware(phandle, doneflag)) + goto done; + memory_size = 0; + reg = dbg_dump_start_reg; + for (i = 0; i < 4; i++) { + read_reg = + sdio_readb(((struct sdio_mmc_card *)phandle-> + card)->func, reg, &ret); + if (ret) { + PRINTM(MMSG, "SDIO READ ERR\n"); + goto done; + } + memory_size |= (read_reg << i * 8); + reg++; + } + if (memory_size == 0) { + PRINTM(MMSG, "Firmware Dump Finished!\n"); + break; + } else { + PRINTM(MMSG, "%s_SIZE=0x%x\n", + mem_type_mapping_tbl[idx].mem_name, memory_size); + ret = moal_vmalloc(phandle, memory_size + 1, + (t_u8 **)&mem_type_mapping_tbl[idx]. + mem_Ptr); + if ((ret != MLAN_STATUS_SUCCESS) || + !mem_type_mapping_tbl[idx].mem_Ptr) { + PRINTM(MERROR, + "Error: vmalloc %s buffer failed!!!\n", + mem_type_mapping_tbl[idx].mem_name); + goto done; + } + dbg_ptr = mem_type_mapping_tbl[idx].mem_Ptr; + end_ptr = dbg_ptr + memory_size; + } + doneflag = mem_type_mapping_tbl[idx].done_flag; + moal_get_system_time(phandle, &sec, &usec); + PRINTM(MMSG, "Start %s output %u.%06u, please wait...\n", + mem_type_mapping_tbl[idx].mem_name, sec, usec); + do { + stat = woal_cmd52_rdwr_firmware(phandle, doneflag); + if (RDWR_STATUS_FAILURE == stat) + goto done; + + reg_start = dbg_dump_start_reg; + reg_end = dbg_dump_end_reg; + for (reg = reg_start; reg <= reg_end; reg++) { + *dbg_ptr = + sdio_readb(((struct sdio_mmc_card *) + phandle->card)->func, reg, + &ret); + if (ret) { + PRINTM(MMSG, "SDIO READ ERR\n"); + goto done; + } + if (dbg_ptr < end_ptr) + dbg_ptr++; + else + PRINTM(MMSG, + "pre-allocced buf is not enough\n"); + } + if (RDWR_STATUS_DONE == stat) { + PRINTM(MMSG, "%s done:" +#ifdef MLAN_64BIT + "size = 0x%lx\n", +#else + "size = 0x%x\n", +#endif + mem_type_mapping_tbl[idx].mem_name, + dbg_ptr - + mem_type_mapping_tbl[idx].mem_Ptr); + memset(file_name, 0, sizeof(file_name)); + sprintf(file_name, "%s%s", "file_sdio_", + mem_type_mapping_tbl[idx].mem_name); + if (MLAN_STATUS_SUCCESS != + woal_save_dump_info_to_file(path_name, + file_name, + mem_type_mapping_tbl + [idx].mem_Ptr, + memory_size)) + PRINTM(MMSG, + "Can't save dump file %s in %s\n", + file_name, path_name); + moal_vfree(phandle, + mem_type_mapping_tbl[idx].mem_Ptr); + mem_type_mapping_tbl[idx].mem_Ptr = NULL; + break; + } + } while (1); + } + moal_get_system_time(phandle, &sec, &usec); + PRINTM(MMSG, "==== DEBUG MODE OUTPUT END: %u.%06u ====\n", sec, usec); + /* end dump fw memory */ +done: + phandle->fw_dump = MFALSE; + sdio_release_host(((struct sdio_mmc_card *)phandle->card)->func); + for (idx = 0; idx < dump_num; idx++) { + if (mem_type_mapping_tbl[idx].mem_Ptr) { + moal_vfree(phandle, mem_type_mapping_tbl[idx].mem_Ptr); + mem_type_mapping_tbl[idx].mem_Ptr = NULL; + } + } + PRINTM(MMSG, "==== DEBUG MODE END ====\n"); + return; +} + +/** + * @brief This function get card info from card type + * + * @param phandle A pointer to moal_handle + * + * @return N/A + */ +static int +woal_get_card_info(moal_handle *phandle) +{ + int ret = 0; + t_u16 card_type = phandle->card_type; + + ENTER(); + + switch (card_type) { + case CARD_TYPE_SD8777: + phandle->card_info = &card_info_sd8777; + break; + case CARD_TYPE_SD8787: + phandle->card_info = &card_info_sd8787; + break; + case CARD_TYPE_SD8887: + phandle->card_info = &card_info_sd8887; + break; + case CARD_TYPE_SD8801: + phandle->card_info = &card_info_sd8801; + break; + case CARD_TYPE_SD8897: + phandle->card_info = &card_info_sd8897; + break; + case CARD_TYPE_SD8797: + phandle->card_info = &card_info_sd8797; + break; + default: + PRINTM(MERROR, + "woal_get_card_info can't get right card type \n"); + ret = -1; + break; + } + + LEAVE(); + return ret; +} + +/** + * @brief This function reads and displays SDIO registers for debugging + * + * @param phandle A pointer to moal_handle + * + * @return N/A + */ +void +woal_sdio_reg_dbg(moal_handle *phandle) +{ + int ret = 0; + t_u8 loop, index = 0, func, data; + unsigned int reg, reg_start, reg_end; + unsigned int scratch_reg = SDIO_SCRATCH_REG; + unsigned int reg_table_8887[] = + { 0x08, 0x58, 0x5C, 0x5D, 0x60, 0x61, 0x62, + 0x64, 0x65, 0x66, 0x68, 0x69, 0x6a + }; + unsigned int reg_table_8897[] = + { 0x4C, 0x50, 0x54, 0x55, 0x58, 0x59, 0x5c, 0x5d }; + unsigned int reg_table_other[] = { 0x28, 0x30, 0x34, 0x38, 0x3c }; + unsigned int *reg_table = NULL; + t_u8 reg_table_size = 0; + char buf[256], *ptr; + + mlan_pm_wakeup_card(phandle->pmlan_adapter); +#define SDIO_SCRATCH_REG_8887 0x90 +#define SDIO_SCRATCH_REG_8897 0xC0 +#define SDIO_SCRATCH_REG_OTHER 0x60 + if (phandle->card_type == CARD_TYPE_SD8887) { + reg_table = reg_table_8887; + reg_table_size = sizeof(reg_table_8887) / sizeof(int); + scratch_reg = SDIO_SCRATCH_REG_8887; + } else if (phandle->card_type == CARD_TYPE_SD8897) { + reg_table = reg_table_8897; + reg_table_size = sizeof(reg_table_8897) / sizeof(int); + scratch_reg = SDIO_SCRATCH_REG_8897; + } else { + reg_table = reg_table_other; + reg_table_size = sizeof(reg_table_other) / sizeof(int); + scratch_reg = SDIO_SCRATCH_REG_OTHER; + } + + sdio_claim_host(((struct sdio_mmc_card *)phandle->card)->func); + for (loop = 0; loop < 5; loop++) { + memset(buf, 0, sizeof(buf)); + ptr = buf; + if (loop == 0) { + /* Read the registers of SDIO function0 */ + func = loop; + reg_start = 0; + reg_end = 9; + + } else if (loop == 1) { + /* Read the registers of SDIO function1 */ + func = loop; + if (phandle->card_type == CARD_TYPE_SD8897) { + reg_start = 4; + reg_end = 0xB; + } else if (phandle->card_type == CARD_TYPE_SD8887) { + reg_start = 0x10; + reg_end = 0x17; + } else { + reg_start = 4; + reg_end = 9; + } + } else if (loop == 2) { + /* Read specific registers of SDIO function1 */ + index = 0; + func = 1; + reg_start = reg_table[index++]; + reg_end = reg_table[reg_table_size - 1]; + } else { + /* Read the scratch registers of SDIO function1 */ + if (loop == 4) + mdelay(100); + func = 1; + reg_start = scratch_reg; + reg_end = scratch_reg + 10; + } + if (loop != 2) + ptr += sprintf(ptr, "SDIO Func%d (%#x-%#x): ", func, + reg_start, reg_end); + else + ptr += sprintf(ptr, "SDIO Func%d: ", func); + for (reg = reg_start; reg <= reg_end;) { + if (func == 0) + data = sdio_f0_readb(((struct sdio_mmc_card *) + phandle->card)->func, reg, + &ret); + else + data = sdio_readb(((struct sdio_mmc_card *) + phandle->card)->func, reg, + &ret); + if (loop == 2) + ptr += sprintf(ptr, "(%#x) ", reg); + if (!ret) + ptr += sprintf(ptr, "%02x ", data); + else { + ptr += sprintf(ptr, "ERR"); + break; + } + if (loop == 2 && reg < reg_end) + reg = reg_table[index++]; + else + reg++; + } + PRINTM(MMSG, "%s\n", buf); + } + sdio_release_host(((struct sdio_mmc_card *)phandle->card)->func); +} + +/** + * @brief This function displays extra MOAL debug information + * + * @param priv A pointer to moal_private + * @param handle A pointer to moal_handle + * @param flag Indicates whether register read can be done directly + * + * @return N/A + */ +void +woal_moal_debug_info(moal_private *priv, moal_handle *handle, u8 flag) +{ + moal_handle *phandle = NULL; + char buf[MLAN_MAX_VER_STR_LEN]; + int i = 0; + + ENTER(); + + if (!priv) { + if (handle) { + phandle = handle; + } else { + PRINTM(MERROR, + "Could not retrieve debug information from MOAL\n"); + LEAVE(); + return; + } + } else { + phandle = priv->phandle; + } + + woal_get_version(phandle, buf, sizeof(buf) - 1); + PRINTM(MERROR, "Driver version = %s\n", buf); + PRINTM(MERROR, "main_state = %d\n", phandle->main_state); + PRINTM(MERROR, "ioctl_pending = %d\n", + atomic_read(&phandle->ioctl_pending)); + PRINTM(MERROR, "tx_pending = %d\n", atomic_read(&phandle->tx_pending)); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + if (priv) { + PRINTM(MERROR, "wmm_tx_pending[0] = %d\n", + atomic_read(&priv->wmm_tx_pending[0])); + PRINTM(MERROR, "wmm_tx_pending[1] = %d\n", + atomic_read(&priv->wmm_tx_pending[1])); + PRINTM(MERROR, "wmm_tx_pending[2] = %d\n", + atomic_read(&priv->wmm_tx_pending[2])); + PRINTM(MERROR, "wmm_tx_pending[3] = %d\n", + atomic_read(&priv->wmm_tx_pending[3])); + } +#endif + PRINTM(MERROR, "rx_pending = %d\n", atomic_read(&phandle->rx_pending)); + PRINTM(MERROR, "lock_count = %d\n", atomic_read(&phandle->lock_count)); + PRINTM(MERROR, "malloc_count = %d\n", + atomic_read(&phandle->malloc_count)); + PRINTM(MERROR, "mbufalloc_count = %d\n", + atomic_read(&phandle->mbufalloc_count)); +#if defined(SDIO_SUSPEND_RESUME) + PRINTM(MERROR, "hs_skip_count = %u\n", phandle->hs_skip_count); + PRINTM(MERROR, "hs_force_count = %u\n", phandle->hs_force_count); +#endif + + if (priv) { + PRINTM(MERROR, "Media state = \"%s\"\n", + ((priv->media_connected == + MFALSE) ? "Disconnected" : "Connected")); + PRINTM(MERROR, "carrier %s\n", + ((netif_carrier_ok(priv->netdev)) ? "on" : "off")); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + for (i = 0; i < (priv->netdev->num_tx_queues); i++) { + PRINTM(MERROR, "tx queue %d: %s\n", i, + ((netif_tx_queue_stopped + (netdev_get_tx_queue(priv->netdev, i))) ? + "stopped" : "started")); + } +#else + PRINTM(MERROR, "tx queue %s\n", + ((netif_queue_stopped(priv->netdev)) ? "stopped" : + "started")); +#endif + } + + for (i = 0; i < phandle->priv_num; i++) { + priv = phandle->priv[i]; + if (priv) + PRINTM(MERROR, "%s: num_tx_timeout = %d\n", + priv->netdev->name, priv->num_tx_timeout); + } + +#if defined(SDIO_SUSPEND_RESUME) + if (phandle->is_suspended == MTRUE) { + LEAVE(); + return; + } +#endif + + /* Display SDIO registers */ + if (flag && + ((phandle->main_state == MOAL_END_MAIN_PROCESS) || + (phandle->main_state == MOAL_STATE_IDLE))) { + woal_sdio_reg_dbg(phandle); + } else { + phandle->sdio_reg_dbg = MTRUE; + queue_work(phandle->workqueue, &phandle->main_work); + } + + LEAVE(); + return; +} + +/** + * @brief Download power table to firmware for a specific country + * + * @param priv A pointer to moal_private + * @param country ISO 3166-1 alpha-2 country code + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_request_country_power_table(moal_private *priv, char *country) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + moal_handle *handle = NULL; + char country_name[] = "txpower_XX.bin"; + char file_path[256]; + char *last_slash = NULL; + + ENTER(); + + if (!priv || !priv->phandle) { + PRINTM(MERROR, "Priv or handle is null\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + if (!country) { + PRINTM(MERROR, "Country is null\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + handle = priv->phandle; + + /* Replace XX with ISO 3166-1 alpha-2 country code */ + strncpy(strstr(country_name, "XX"), country, strlen(country)); + + memset(file_path, 0, sizeof(file_path)); + /* file_path should be Null terminated */ + if (fw_name && (strlen(fw_name) < sizeof(file_path))) { + strncpy(file_path, fw_name, strlen(fw_name)); + last_slash = strrchr(file_path, '/'); + if (last_slash) + memset(last_slash + 1, 0, + sizeof(file_path) - 1 - (last_slash - + file_path)); + else + memset(file_path, 0, sizeof(file_path)); + } else { + strncpy(file_path, "mrvl/", sizeof(file_path)); + } + country_txpwrlimit = strncat(file_path, country_name, + sizeof(file_path) - strlen(file_path)); + + if (MLAN_STATUS_SUCCESS != + woal_set_user_init_data(handle, COUNTRY_POWER_TABLE, + MOAL_IOCTL_WAIT)) { + PRINTM(MFATAL, "Download power table to firmware failed\n"); + ret = MLAN_STATUS_FAILURE; + } + LEAVE(); + return ret; +} + +/** + * @brief This workqueue function handles rx_process + * + * @param work A pointer to work_struct + * + * @return N/A + */ +t_void +woal_rx_work_queue(struct work_struct *work) +{ + moal_handle *handle = container_of(work, moal_handle, rx_work); + ENTER(); + if (handle->surprise_removed == MTRUE) { + LEAVE(); + return; + } + mlan_rx_process(handle->pmlan_adapter); + LEAVE(); +} + +/** + * @brief This workqueue function handles main_process + * + * @param work A pointer to work_struct + * + * @return N/A + */ +t_void +woal_main_work_queue(struct work_struct *work) +{ + moal_handle *handle = container_of(work, moal_handle, main_work); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) + struct sched_param sp = {.sched_priority = wq_sched_prio }; +#endif + + ENTER(); + + if (handle->surprise_removed == MTRUE) { + LEAVE(); + return; + } + + if (handle->sdio_reg_dbg == MTRUE) { + handle->sdio_reg_dbg = MFALSE; + woal_sdio_reg_dbg(handle); +#if defined(DEBUG_LEVEL1) + if (drvdbg & MFW_D) { + drvdbg &= ~MFW_D; + woal_dump_firmware_info(handle); + } +#endif + LEAVE(); + return; + } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) + /* Change the priority and scheduling policy of main work queue */ + if ((wq_sched_prio != current->rt_priority) || + (wq_sched_policy != current->policy)) { + PRINTM(MMSG, + "Set work queue priority %d and scheduling policy %d\n", + wq_sched_prio, wq_sched_policy); + sched_setscheduler(current, wq_sched_policy, &sp); + } +#endif + + handle->main_state = MOAL_ENTER_WORK_QUEUE; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) + sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + handle->main_state = MOAL_START_MAIN_PROCESS; + /* Call MLAN main process */ + mlan_main_process(handle->pmlan_adapter); + handle->main_state = MOAL_END_MAIN_PROCESS; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) + sdio_release_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + + LEAVE(); +} + +/** + * @brief Handles interrupt + * + * @param handle A pointer to moal_handle struct + * + * @return N/A + */ +void +woal_interrupt(moal_handle *handle) +{ + ENTER(); + handle->main_state = MOAL_RECV_INT; + PRINTM(MINTR, "*\n"); + if (handle->surprise_removed == MTRUE) { + LEAVE(); + return; + } + /* call mlan_interrupt to read int status */ + mlan_interrupt(handle->pmlan_adapter); +#ifdef SDIO_SUSPEND_RESUME + if (handle->is_suspended) { + PRINTM(MINTR, "Receive interrupt in hs_suspended\n"); + LEAVE(); + return; + } +#endif + handle->main_state = MOAL_START_MAIN_PROCESS; + /* Call MLAN main process */ + mlan_main_process(handle->pmlan_adapter); + handle->main_state = MOAL_END_MAIN_PROCESS; + LEAVE(); +} + +/** + * @brief This function adds the card. it will probe the + * card, allocate the mlan_private and initialize the device. + * + * @param card A pointer to card + * + * @return A pointer to moal_handle structure + */ +moal_handle * +woal_add_card(void *card) +{ + moal_handle *handle = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + int netlink_num = NETLINK_MARVELL; + int index = 0; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) + struct netlink_kernel_cfg cfg = { + .groups = NL_MULTICAST_GROUP, + }; +#endif + + ENTER(); + + if (MOAL_ACQ_SEMAPHORE_BLOCK(&AddRemoveCardSem)) + goto exit_sem_err; + + /* Allocate buffer for moal_handle */ + handle = kzalloc(sizeof(moal_handle), GFP_KERNEL); + if (!handle) { + PRINTM(MERROR, "Allocate buffer for moal_handle failed!\n"); + goto err_handle; + } + + /* Init moal_handle */ + handle->card = card; + /* Save the handle */ + for (index = 0; index < MAX_MLAN_ADAPTER; index++) { + if (m_handle[index] == NULL) + break; + } + if (index < MAX_MLAN_ADAPTER) { + m_handle[index] = handle; + handle->handle_idx = index; + } else { + PRINTM(MERROR, "Exceeded maximum cards supported!\n"); + goto err_kmalloc; + } + + if (mac_addr +#ifdef MFG_CMD_SUPPORT + && mfg_mode != MLAN_INIT_PARA_ENABLED +#endif + ) { + t_u8 temp[20]; + t_u8 len = strlen(mac_addr) + 1; + if (len < sizeof(temp)) { + memcpy(temp, mac_addr, len); + handle->set_mac_addr = 1; + /* note: the following function overwrites the temp + buffer */ + woal_mac2u8(handle->mac_addr, temp); + } + } + + /* Update card type */ + woal_sdio_update_card_type(handle, card); + /* Get card info */ + woal_get_card_info(handle); + if (handle->card_type == CARD_TYPE_SD8887) + handle->histogram_table_num = 3; + else + handle->histogram_table_num = 1; + + ((struct sdio_mmc_card *)card)->handle = handle; + +#ifdef STA_SUPPORT + handle->scan_pending_on_block = MFALSE; + MOAL_INIT_SEMAPHORE(&handle->async_sem); +#endif + + /* Init SW */ + if (MLAN_STATUS_SUCCESS != woal_init_sw(handle)) { + PRINTM(MFATAL, "Software Init Failed\n"); + goto err_kmalloc; + } + + do { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14) + handle->nl_sk = netlink_kernel_create(netlink_num, NULL); +#else +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) + handle->nl_sk = + netlink_kernel_create(netlink_num, NL_MULTICAST_GROUP, + NULL, THIS_MODULE); +#else +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) + handle->nl_sk = + netlink_kernel_create(netlink_num, NL_MULTICAST_GROUP, + NULL, NULL, THIS_MODULE); +#else +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + handle->nl_sk = + netlink_kernel_create(&init_net, netlink_num, + NL_MULTICAST_GROUP, NULL, NULL, + THIS_MODULE); +#else +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0) + handle->nl_sk = + netlink_kernel_create(&init_net, netlink_num, + THIS_MODULE, &cfg); +#else + handle->nl_sk = + netlink_kernel_create(&init_net, netlink_num, &cfg); +#endif +#endif +#endif +#endif +#endif + if (handle->nl_sk) { + PRINTM(MINFO, "Netlink number = %d\n", netlink_num); + handle->netlink_num = netlink_num; + break; + } + netlink_num--; + } while (netlink_num > 0); + + if (handle->nl_sk == NULL) { + PRINTM(MERROR, + "Could not initialize netlink event passing mechanism!\n"); + goto err_kmalloc; + } + + /* Create workqueue for main process */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14) + /* For kernel less than 2.6.14 name can not be greater than 10 + characters */ + handle->workqueue = create_workqueue("MOAL_WORKQ"); +#else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) + handle->workqueue = + alloc_workqueue("MOAL_WORK_QUEUE", + WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, 1); +#else + handle->workqueue = create_workqueue("MOAL_WORK_QUEUE"); +#endif +#endif + if (!handle->workqueue) + goto err_kmalloc; + + MLAN_INIT_WORK(&handle->main_work, woal_main_work_queue); + /* Create workqueue for rx process */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14) + /* For kernel less than 2.6.14 name can not be * greater than 10 + characters */ + handle->rx_workqueue = create_workqueue("MOAL_RX_WORKQ"); +#else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) + handle->rx_workqueue = + alloc_workqueue("MOAL_RX_WORK_QUEUE", + WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, 1); +#else + handle->rx_workqueue = create_workqueue("MOAL_RX_WORK_QUEUE"); +#endif +#endif + if (!handle->rx_workqueue) { + woal_terminate_workqueue(handle); + goto err_kmalloc; + } + MLAN_INIT_WORK(&handle->rx_work, woal_rx_work_queue); + +#ifdef REASSOCIATION + PRINTM(MINFO, "Starting re-association thread...\n"); + handle->reassoc_thread.handle = handle; + woal_create_thread(woal_reassociation_thread, + &handle->reassoc_thread, "woal_reassoc_service"); + + while (!handle->reassoc_thread.pid) + woal_sched_timeout(2); +#endif /* REASSOCIATION */ + + /* Register the device. Fill up the private data structure with + relevant information from the card and request for the required IRQ. + */ + if (woal_register_dev(handle) != MLAN_STATUS_SUCCESS) { + PRINTM(MFATAL, "Failed to register wlan device!\n"); + goto err_registerdev; + } + + /* Init FW and HW */ + if (MLAN_STATUS_SUCCESS != woal_init_fw(handle)) { + PRINTM(MFATAL, "Firmware Init Failed\n"); + goto err_init_fw; + } + + if (handle->card_type == CARD_TYPE_SD8777 || + handle->card_type == CARD_TYPE_SD8887) { + union { + t_u32 l; + t_u8 c[4]; + } ver; + ver.l = handle->fw_release_number; + if (ver.c[1] == 75) { + handle->card_info->embedded_supp = 0; + PRINTM(MMSG, + "Disable EMBEDED Supplicant for SD8777/8887-FP75\n"); + } + } + LEAVE(); + return handle; + +err_init_fw: + if ((handle->hardware_status == HardwareStatusFwReady) || + (handle->hardware_status == HardwareStatusReady)) { + PRINTM(MINFO, "shutdown mlan\n"); + handle->init_wait_q_woken = MFALSE; + status = mlan_shutdown_fw(handle->pmlan_adapter); + if (status == MLAN_STATUS_PENDING) + wait_event_interruptible(handle->init_wait_q, + handle->init_wait_q_woken); + } + /* Unregister device */ + PRINTM(MINFO, "unregister device\n"); + woal_unregister_dev(handle); +err_registerdev: + handle->surprise_removed = MTRUE; +#ifdef REASSOCIATION + if (handle->reassoc_thread.pid) + wake_up_interruptible(&handle->reassoc_thread.wait_q); + /* waiting for main thread quit */ + while (handle->reassoc_thread.pid) + woal_sched_timeout(2); +#endif /* REASSOCIATION */ + woal_terminate_workqueue(handle); +err_kmalloc: + woal_free_moal_handle(handle); + if (index < MAX_MLAN_ADAPTER) + m_handle[index] = NULL; + ((struct sdio_mmc_card *)card)->handle = NULL; +err_handle: + MOAL_REL_SEMAPHORE(&AddRemoveCardSem); +exit_sem_err: + LEAVE(); + return NULL; +} + +/** + * @brief This function removes the card. + * + * @param card A pointer to card + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +woal_remove_card(void *card) +{ + moal_handle *handle = NULL; + moal_private *priv = NULL; + mlan_status status; + int i; + int index = 0; + + ENTER(); + + if (MOAL_ACQ_SEMAPHORE_BLOCK(&AddRemoveCardSem)) + goto exit_sem_err; + /* Find the correct handle */ + for (index = 0; index < MAX_MLAN_ADAPTER; index++) { + if (m_handle[index] && (m_handle[index]->card == card)) { + handle = m_handle[index]; + break; + } + } + if (!handle) + goto exit_remove; + handle->surprise_removed = MTRUE; + + flush_workqueue(handle->workqueue); + flush_workqueue(handle->rx_workqueue); + + /* Stop data */ + for (i = 0; i < MIN(handle->priv_num, MLAN_MAX_BSS_NUM); i++) { + priv = handle->priv[i]; + if (priv) { +#ifdef STA_CFG80211 + if (IS_STA_CFG80211(cfg80211_wext) && + GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA && + priv->media_connected == MTRUE && + priv->wdev && + priv->wdev->iftype != NL80211_IFTYPE_ADHOC) { + PRINTM(MMSG, + "wlan: Disconnected from " MACSTR "\n", + MAC2STR(priv->cfg_bssid)); + cfg80211_disconnected(priv->netdev, + WLAN_REASON_DEAUTH_LEAVING, + NULL, 0, GFP_KERNEL); + } +#endif + woal_stop_queue(priv->netdev); + if (netif_carrier_ok(priv->netdev)) + netif_carrier_off(priv->netdev); + } + } + + if ((handle->hardware_status == HardwareStatusFwReady) || + (handle->hardware_status == HardwareStatusReady)) { + /* Shutdown firmware */ + PRINTM(MIOCTL, "mlan_shutdown_fw.....\n"); + handle->init_wait_q_woken = MFALSE; + + status = mlan_shutdown_fw(handle->pmlan_adapter); + if (status == MLAN_STATUS_PENDING) + wait_event_interruptible(handle->init_wait_q, + handle->init_wait_q_woken); + PRINTM(MIOCTL, "mlan_shutdown_fw done!\n"); + } + if (atomic_read(&handle->rx_pending) || atomic_read(&handle->tx_pending) + || atomic_read(&handle->ioctl_pending)) { + PRINTM(MERROR, + "ERR: rx_pending=%d,tx_pending=%d,ioctl_pending=%d\n", + atomic_read(&handle->rx_pending), + atomic_read(&handle->tx_pending), + atomic_read(&handle->ioctl_pending)); + } + unregister_inetaddr_notifier(&woal_notifier); + +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_CFG80211) && defined(UAP_CFG80211) + if (handle->is_go_timer_set) { + woal_cancel_timer(&handle->go_timer); + handle->is_go_timer_set = MFALSE; + } + if (handle->is_remain_timer_set) { + woal_cancel_timer(&handle->remain_timer); + woal_remain_timer_func(handle); + } +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + /* Remove virtual interface */ + woal_remove_virtual_interface(handle); +#endif +#endif +#endif + /* Remove interface */ + for (i = 0; i < handle->priv_num; i++) + woal_remove_interface(handle, i); + + woal_terminate_workqueue(handle); + +#ifdef REASSOCIATION + PRINTM(MINFO, "Free reassoc_timer\n"); + if (handle->is_reassoc_timer_set) { + woal_cancel_timer(&handle->reassoc_timer); + handle->is_reassoc_timer_set = MFALSE; + } + if (handle->reassoc_thread.pid) + wake_up_interruptible(&handle->reassoc_thread.wait_q); + + /* waiting for main thread quit */ + while (handle->reassoc_thread.pid) + woal_sched_timeout(2); +#endif /* REASSOCIATION */ +#ifdef CONFIG_PROC_FS + woal_proc_exit(handle); +#endif + /* Unregister device */ + PRINTM(MINFO, "unregister device\n"); + woal_unregister_dev(handle); + /* Free adapter structure */ + PRINTM(MINFO, "Free Adapter\n"); + woal_free_moal_handle(handle); + + for (index = 0; index < MAX_MLAN_ADAPTER; index++) { + if (m_handle[index] == handle) { + m_handle[index] = NULL; + break; + } + } +exit_remove: + MOAL_REL_SEMAPHORE(&AddRemoveCardSem); +exit_sem_err: + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +#ifdef CONFIG_PROC_FS +/** + * @brief This function switch the drv_mode + * + * @param handle A pointer to moal_handle structure + * @param mode new drv_mode to switch. + * + * @return MLAN_STATUS_SUCCESS /MLAN_STATUS_FAILURE /MLAN_STATUS_PENDING + */ +mlan_status +woal_switch_drv_mode(moal_handle *handle, t_u32 mode) +{ + unsigned int i; + mlan_status status = MLAN_STATUS_SUCCESS; + moal_private *priv = NULL; + + ENTER(); + + if (MOAL_ACQ_SEMAPHORE_BLOCK(&AddRemoveCardSem)) + goto exit_sem_err; + + if (woal_update_drv_tbl(handle, mode) != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "Could not update driver mode table!\n"); + status = MLAN_STATUS_FAILURE; + goto exit; + } + + /* Reset all interfaces */ + priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY); + woal_reset_intf(priv, MOAL_PROC_WAIT, MTRUE); + + status = woal_shutdown_fw(priv, MOAL_CMD_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "func shutdown failed!\n"); + goto exit; + } + + /* Shutdown firmware */ + PRINTM(MIOCTL, "mlan_shutdown_fw.....\n"); + handle->init_wait_q_woken = MFALSE; + status = mlan_shutdown_fw(handle->pmlan_adapter); + if (status == MLAN_STATUS_PENDING) + wait_event_interruptible(handle->init_wait_q, + handle->init_wait_q_woken); + PRINTM(MIOCTL, "mlan_shutdown_fw done!\n"); + if (atomic_read(&handle->rx_pending) || atomic_read(&handle->tx_pending) + || atomic_read(&handle->ioctl_pending)) { + PRINTM(MERROR, + "ERR: rx_pending=%d,tx_pending=%d,ioctl_pending=%d\n", + atomic_read(&handle->rx_pending), + atomic_read(&handle->tx_pending), + atomic_read(&handle->ioctl_pending)); + } + + unregister_inetaddr_notifier(&woal_notifier); + + /* Remove interface */ + for (i = 0; i < handle->priv_num; i++) + woal_remove_interface(handle, i); + + /* Unregister mlan */ + if (handle->pmlan_adapter) { + mlan_unregister(handle->pmlan_adapter); + if (atomic_read(&handle->lock_count) || + atomic_read(&handle->malloc_count) || + atomic_read(&handle->mbufalloc_count)) { + PRINTM(MERROR, + "mlan has memory leak: lock_count=%d, malloc_count=%d, mbufalloc_count=%d\n", + atomic_read(&handle->lock_count), + atomic_read(&handle->malloc_count), + atomic_read(&handle->mbufalloc_count)); + } + handle->pmlan_adapter = NULL; + } + + handle->priv_num = 0; + drv_mode = mode; + /* Init SW */ + if (woal_init_sw(handle)) { + PRINTM(MFATAL, "Software Init Failed\n"); + goto exit; + } + /* Init FW and HW */ + if (woal_init_fw(handle)) { + PRINTM(MFATAL, "Firmware Init Failed\n"); + goto exit; + } + LEAVE(); + return status; +exit: + MOAL_REL_SEMAPHORE(&AddRemoveCardSem); +exit_sem_err: + LEAVE(); + return status; +} +#endif + +#define FW_POLL_TRIES 100 +#define SD8897_FW_RESET_REG 0x0E8 +#define SD8887_FW_RESET_REG 0x0B6 + +/** + * @brief This function reload fw + * + * @param handle A pointer to moal_handle structure + * + * @return 0--success, otherwise failure + */ +static int +woal_reload_fw(moal_handle *handle) +{ + int ret = 0, tries = 0; + t_u32 value = 1; + t_u32 reset_reg = 0; + + ENTER(); + mlan_pm_wakeup_card(handle->pmlan_adapter); + + if (handle->card_type == CARD_TYPE_SD8887) + reset_reg = SD8887_FW_RESET_REG; + else if (handle->card_type == CARD_TYPE_SD8897) + reset_reg = SD8897_FW_RESET_REG; + /** wait SOC fully wake up */ + for (tries = 0; tries < FW_POLL_TRIES; ++tries) { + ret = woal_write_reg(handle, reset_reg, 0xba); + if (ret == MLAN_STATUS_SUCCESS) { + woal_read_reg(handle, reset_reg, &value); + if (value == 0xba) { + PRINTM(MMSG, "FW wake up\n"); + break; + } + } + udelay(1000); + } + /* Write register to notify FW */ + if (woal_write_reg(handle, reset_reg, 1) != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "Failed to write register.\n"); + ret = -EFAULT; + goto done; + } + + /* Poll register around 100 ms */ + for (tries = 0; tries < FW_POLL_TRIES; ++tries) { + woal_read_reg(handle, reset_reg, &value); + if (value == 0) + /* FW is ready */ + break; + udelay(1000); + } + + if (value) { + PRINTM(MERROR, "Failed to poll FW reset register %X=0x%x\n", + reset_reg, value); + ret = -EFAULT; + goto done; + } + /* Download FW */ + ret = woal_request_fw(handle); + if (ret) { + ret = -EFAULT; + goto done; + } + PRINTM(MMSG, "FW Reload successfully."); +done: + LEAVE(); + return ret; +} + +/** + * @brief This function reload fw + * + * @param handle A pointer to moal_handle structure + * + * @return 0--success, otherwise failure + */ +void +woal_request_fw_reload(moal_handle *handle) +{ + int intf_num; + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *misc = NULL; +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) +#if defined(STA_WEXT) || defined(UAP_WEXT) + t_u8 bss_role = MLAN_BSS_ROLE_STA; +#endif +#endif +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ + + ENTER(); + if (fw_serial) { + PRINTM(MERROR, "We don't support fw reload in serail mode\n"); + LEAVE(); + return; + } + if ((handle->card_type != CARD_TYPE_SD8887) && + (handle->card_type != CARD_TYPE_SD8897)) { + PRINTM(MERROR, "Card type=%d, Don't support FW reload\n", + handle->card_type); + LEAVE(); + return; + } + /** detach network interface */ + for (intf_num = 0; intf_num < handle->priv_num; intf_num++) { + woal_stop_queue(handle->priv[intf_num]->netdev); + netif_device_detach(handle->priv[intf_num]->netdev); + } + handle->fw_reload = MTRUE; + if (woal_reload_fw(handle)) { + PRINTM(MERROR, "FW reload fail\n"); + goto done; + } + handle->fw_reload = MFALSE; + + /* Restart the firmware */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req) { + misc = (mlan_ds_misc_cfg *)req->pbuf; + misc->sub_command = MLAN_OID_MISC_WARM_RESET; + misc->param.fw_reload = MTRUE; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = MLAN_ACT_SET; + if (MLAN_STATUS_SUCCESS != + woal_request_ioctl(woal_get_priv(handle, MLAN_BSS_ROLE_ANY), + req, MOAL_PROC_WAIT)) { + ret = -EFAULT; + kfree(req); + goto done; + } + kfree(req); + } + + /* Reset all interfaces */ + ret = woal_reset_intf(woal_get_priv(handle, MLAN_BSS_ROLE_ANY), + MOAL_PROC_WAIT, MTRUE); + /* Initialize private structures */ + for (intf_num = 0; intf_num < handle->priv_num; intf_num++) { + woal_init_priv(handle->priv[intf_num], MOAL_PROC_WAIT); +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) +#if defined(STA_WEXT) || defined(UAP_WEXT) + if ((handle->priv[intf_num]->bss_type == + MLAN_BSS_TYPE_WIFIDIRECT) && + (GET_BSS_ROLE(handle->priv[intf_num]) == + MLAN_BSS_ROLE_UAP)) { + if (MLAN_STATUS_SUCCESS != + woal_bss_role_cfg(handle->priv[intf_num], + MLAN_ACT_SET, MOAL_PROC_WAIT, + &bss_role)) { + ret = -EFAULT; + goto done; + } + } +#endif /* STA_WEXT || UAP_WEXT */ +#endif /* STA_SUPPORT && UAP_SUPPORT */ +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ + } + + /* Enable interfaces */ + for (intf_num = 0; intf_num < handle->priv_num; intf_num++) { + netif_device_attach(handle->priv[intf_num]->netdev); + woal_start_queue(handle->priv[intf_num]->netdev); + } +done: + LEAVE(); + return; +} + + +/** + * @brief This function initializes module. + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static int +woal_init_module(void) +{ + int ret = (int)MLAN_STATUS_SUCCESS; + int index = 0; + + ENTER(); + + PRINTM(MMSG, "wlan: Loading MWLAN driver\n"); + /* Init the wlan_private pointer array first */ + for (index = 0; index < MAX_MLAN_ADAPTER; index++) + m_handle[index] = NULL; + /* Init mutex */ + MOAL_INIT_SEMAPHORE(&AddRemoveCardSem); + + MOAL_INIT_SEMAPHORE(&gWiFiInitSem); + mlan_WiFiInitSem = (unsigned long) &gWiFiInitSem; + MOAL_ACQ_SEMAPHORE_BLOCK(&gWiFiInitSem); + + MOAL_INIT_SEMAPHORE(&gUserInitDataSem); + +#ifdef CONFIG_OF + woal_init_from_dev_tree(); +#endif + + /* Create workqueue for hang process */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14) + /* For kernel less than 2.6.14 name can not be greater than 10 + characters */ + hang_workqueue = create_workqueue("MOAL_HANG_WORKQ"); +#else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) + hang_workqueue = alloc_workqueue("MOAL_HANG_WORK_QUEUE", + WQ_HIGHPRI | WQ_MEM_RECLAIM | + WQ_UNBOUND, 1); +#else + hang_workqueue = create_workqueue("MOAL_HANG_WORK_QUEUE"); +#endif +#endif + MLAN_INIT_WORK(&hang_work, woal_hang_work_queue); + + /* Register with bus */ + ret = woal_bus_register(); + if (ret == MLAN_STATUS_SUCCESS) + PRINTM(MMSG, "wlan: Driver loaded successfully\n"); + else + PRINTM(MMSG, "wlan: Driver loading failed\n"); + + LEAVE(); + return ret; +} + +/** + * @brief This function cleans module + * + * @return N/A + */ +static void +woal_cleanup_module(void) +{ + moal_handle *handle = NULL; + int index = 0; + int i; +#if defined(STA_SUPPORT) && defined(STA_CFG80211) + unsigned long flags; +#endif + + ENTER(); + + PRINTM(MMSG, "wlan: Unloading MWLAN driver\n"); + if (MOAL_ACQ_SEMAPHORE_BLOCK(&AddRemoveCardSem)) + goto exit_sem_err; + for (index = 0; index < MAX_MLAN_ADAPTER; index++) { + handle = m_handle[index]; + if (!handle) + continue; + if (!handle->priv_num) + goto exit; + if (MTRUE == woal_check_driver_status(handle)) + goto exit; + +#ifdef SDIO_SUSPEND_RESUME +#ifdef MMC_PM_KEEP_POWER + if (handle->is_suspended == MTRUE) { + woal_sdio_resume(& + (((struct sdio_mmc_card *)handle-> + card)->func)->dev); + } +#endif /* MMC_PM_KEEP_POWER */ +#endif /* SDIO_SUSPEND_RESUME */ + + for (i = 0; i < handle->priv_num; i++) { +#ifdef STA_SUPPORT + if (GET_BSS_ROLE(handle->priv[i]) == MLAN_BSS_ROLE_STA) { + if (handle->priv[i]->media_connected == MTRUE) { + woal_disconnect(handle->priv[i], + MOAL_CMD_WAIT_TIMEOUT, + NULL); + if (handle->ioctl_timeout) { + woal_ioctl_timeout(handle); + goto exit; + } + } +#ifdef STA_CFG80211 + if (IS_STA_CFG80211(cfg80211_wext) && + (handle->priv[i]->bss_type == + MLAN_BSS_TYPE_STA)) + woal_clear_conn_params(handle->priv[i]); + spin_lock_irqsave(&handle->scan_req_lock, + flags); + if (IS_STA_CFG80211(cfg80211_wext) && + handle->scan_request) { + cfg80211_scan_done(handle->scan_request, + MTRUE); + handle->scan_request = NULL; + handle->scan_priv = NULL; + } + spin_unlock_irqrestore(&handle->scan_req_lock, + flags); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) + if (IS_STA_CFG80211(cfg80211_wext) && + handle->priv[i]->sched_scanning) { + woal_stop_bg_scan(handle->priv[i], + MOAL_IOCTL_WAIT_TIMEOUT); + if (handle->ioctl_timeout) { + woal_ioctl_timeout(handle); + goto exit; + } + handle->priv[i]->bg_scan_start = MFALSE; + handle->priv[i]->bg_scan_reported = + MFALSE; + cfg80211_sched_scan_stopped(handle-> + priv[i]-> + wdev-> + wiphy); + handle->priv[i]->sched_scanning = + MFALSE; + } +#endif +#endif + } +#endif +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(handle->priv[i]) == MLAN_BSS_ROLE_UAP) { +#ifdef MFG_CMD_SUPPORT + if (mfg_mode != MLAN_INIT_PARA_ENABLED) +#endif + woal_disconnect(handle->priv[i], + MOAL_CMD_WAIT_TIMEOUT, + NULL); + if (handle->ioctl_timeout) { + woal_ioctl_timeout(handle); + goto exit; + } + } +#endif +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + woal_clear_all_mgmt_ies(handle->priv[i], + MOAL_CMD_WAIT_TIMEOUT); + if (handle->ioctl_timeout) { + woal_ioctl_timeout(handle); + goto exit; + } + woal_flush_tx_stat_queue(handle->priv[i]); +#endif + } + +#ifdef MFG_CMD_SUPPORT + if (mfg_mode != MLAN_INIT_PARA_ENABLED) +#endif + woal_set_deep_sleep(woal_get_priv + (handle, MLAN_BSS_ROLE_ANY), + MOAL_CMD_WAIT_TIMEOUT, MFALSE, 0); + +#ifdef MFG_CMD_SUPPORT + if (mfg_mode != MLAN_INIT_PARA_ENABLED) +#endif + woal_shutdown_fw(woal_get_priv + (handle, MLAN_BSS_ROLE_ANY), + MOAL_CMD_WAIT_TIMEOUT); + if (handle->ioctl_timeout) { + woal_ioctl_timeout(handle); + goto exit; + } + } + +exit: + MOAL_REL_SEMAPHORE(&AddRemoveCardSem); +exit_sem_err: + /* Unregister from bus */ + woal_bus_unregister(); + PRINTM(MMSG, "wlan: Driver unloaded\n"); + if (hang_workqueue) { + flush_workqueue(hang_workqueue); + destroy_workqueue(hang_workqueue); + hang_workqueue = NULL; + } + + LEAVE(); +} + +#ifndef MODULE +#ifdef MFG_CMD_SUPPORT +/** + * @brief This function handle the mfg_mode from kernel boot command + * + * @param str buffer for mfg_mode + * @return N/A + */ +static int __init +mfg_mode_setup(char *str) +{ + int val = -1; + get_option(&str, &val); + if (val > 0) + mfg_mode = 1; + PRINTM(MMSG, "mfg_mode=%d\n", mfg_mode); + return 1; +} + +__setup("mfg_mode=", mfg_mode_setup); +#endif +#endif + +module_init(woal_init_module); +module_exit(woal_cleanup_module); + +module_param(hw_test, int, 0660); +MODULE_PARM_DESC(hw_test, "0: Disable hardware test; 1: Enable hardware test"); +#ifdef CONFIG_OF +module_param(dts_enable, int, 0); +MODULE_PARM_DESC(dts_enable, "0: Disable DTS; 1: Enable DTS"); +#endif +module_param(fw_name, charp, 0660); +MODULE_PARM_DESC(fw_name, "Firmware name"); +module_param(req_fw_nowait, int, 0); +MODULE_PARM_DESC(req_fw_nowait, + "0: Use request_firmware API; 1: Use request_firmware_nowait API"); +module_param(fw_crc_check, int, 0); +MODULE_PARM_DESC(fw_crc_check, + "1: Enable FW download CRC check (default); 0: Disable FW download CRC check"); +module_param(fw_serial, int, 0); +MODULE_PARM_DESC(fw_serial, + "0: support parallel download FW; 1: support serial download FW"); +module_param(mac_addr, charp, 0660); +MODULE_PARM_DESC(mac_addr, "MAC address"); +#ifdef MFG_CMD_SUPPORT +module_param(mfg_mode, int, 0660); +MODULE_PARM_DESC(mfg_mode, + "0: Download normal firmware; 1: Download MFG firmware"); +#endif /* MFG_CMD_SUPPORT */ +module_param(drv_mode, int, 0660); +#if defined(WIFI_DIRECT_SUPPORT) +MODULE_PARM_DESC(drv_mode, "Bit 0: STA; Bit 1: uAP; Bit 2: WIFIDIRECT"); +#else +MODULE_PARM_DESC(drv_mode, "Bit 0: STA; Bit 1: uAP"); +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ +#ifdef STA_SUPPORT +module_param(max_sta_bss, int, 0); +MODULE_PARM_DESC(max_sta_bss, "Number of STA interfaces (1)"); +module_param(sta_name, charp, 0); +MODULE_PARM_DESC(sta_name, "STA interface name"); +#endif /* STA_SUPPORT */ +#ifdef UAP_SUPPORT +module_param(max_uap_bss, int, 0); +MODULE_PARM_DESC(max_uap_bss, "Number of uAP interfaces (1)"); +module_param(uap_name, charp, 0); +MODULE_PARM_DESC(uap_name, "uAP interface name"); +#endif /* UAP_SUPPORT */ +#if defined(WIFI_DIRECT_SUPPORT) +module_param(max_wfd_bss, int, 0); +MODULE_PARM_DESC(max_wfd_bss, "Number of WIFIDIRECT interfaces (1)"); +module_param(wfd_name, charp, 0); +MODULE_PARM_DESC(wfd_name, "WIFIDIRECT interface name"); +#if defined(STA_CFG80211) && defined(UAP_CFG80211) +module_param(max_vir_bss, int, 0); +MODULE_PARM_DESC(max_vir_bss, "Number of Virtual interfaces (0)"); +#endif +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ +#ifdef DEBUG_LEVEL1 +module_param(drvdbg, uint, 0660); +MODULE_PARM_DESC(drvdbg, "Driver debug"); +#endif /* DEBUG_LEVEL1 */ +module_param(auto_ds, int, 0660); +MODULE_PARM_DESC(auto_ds, + "0: MLAN default; 1: Enable auto deep sleep; 2: Disable auto deep sleep"); +module_param(ps_mode, int, 0660); +MODULE_PARM_DESC(ps_mode, + "0: MLAN default; 1: Enable IEEE PS mode; 2: Disable IEEE PS mode"); +module_param(max_tx_buf, int, 0); +MODULE_PARM_DESC(max_tx_buf, "Maximum Tx buffer size (2048/4096/8192)"); +module_param(slew_rate, int, 0); +MODULE_PARM_DESC(slew_rate, + "0:has the slowest slew rate, then 01, then 02, and 03 has the highest slew rate"); +#ifdef SDIO_SUSPEND_RESUME +module_param(pm_keep_power, int, 0); +MODULE_PARM_DESC(pm_keep_power, "1: PM keep power; 0: PM no power"); +module_param(shutdown_hs, int, 0); +MODULE_PARM_DESC(shutdown_hs, + "1: Enable HS when shutdown; 0: No HS when shutdown"); +#endif +#if defined(STA_SUPPORT) +module_param(cfg_11d, int, 0); +MODULE_PARM_DESC(cfg_11d, + "0: MLAN default; 1: Enable 802.11d; 2: Disable 802.11d"); +#endif +module_param(init_cfg, charp, 0); +MODULE_PARM_DESC(init_cfg, "Init config file name"); +module_param(cal_data_cfg, charp, 0); +MODULE_PARM_DESC(cal_data_cfg, "Calibration data file name"); +module_param(txpwrlimit_cfg, charp, 0); +MODULE_PARM_DESC(txpwrlimit_cfg, + "Set configuration data of Tx power limitation"); +module_param(init_hostcmd_cfg, charp, 0); +MODULE_PARM_DESC(init_hostcmd_cfg, "Init hostcmd file name"); +module_param(cfg80211_wext, int, 0660); +MODULE_PARM_DESC(cfg80211_wext, +#ifdef STA_WEXT + "Bit 0: STA WEXT; " +#endif +#ifdef UAP_WEXT + "Bit 1: UAP WEXT; " +#endif +#ifdef STA_CFG80211 + "Bit 2: STA CFG80211; " +#endif +#ifdef UAP_CFG80211 + "Bit 3: UAP CFG80211;" +#endif + ); +module_param(wq_sched_prio, int, 0); +module_param(wq_sched_policy, int, 0); +MODULE_PARM_DESC(wq_sched_prio, "Priority of work queue"); +MODULE_PARM_DESC(wq_sched_policy, + "0: SCHED_NORMAL; 1: SCHED_FIFO; 2: SCHED_RR; 3: SCHED_BATCH; 5: SCHED_IDLE"); +module_param(rx_work, int, 0); +MODULE_PARM_DESC(rx_work, + "0: default; 1: Enable rx_work_queue; 2: Disable rx_work_queue"); +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_CFG80211) && defined(UAP_CFG80211) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION +module_param(p2p_enh, int, 0); +MODULE_PARM_DESC(p2p_enh, "1: Enable enhanced P2P; 0: Disable enhanced P2P"); +#endif +#endif +#endif +module_param(low_power_mode_enable, int, 0); +MODULE_PARM_DESC(low_power_mode_enable, "0/1: Disable/Enable Low Power Mode"); + +module_param(dev_cap_mask, uint, 0); +MODULE_PARM_DESC(dev_cap_mask, "Device capability mask"); + +module_param(antcfg, int, 0660); +MODULE_PARM_DESC(antcfg, + "0:default; 1:Tx/Rx antenna 1, 2:Tx/Rx antenna 2, 0xffff:enable antenna diversity"); + +module_param(uap_oper_ctrl, uint, 0); +MODULE_PARM_DESC(uap_oper_ctrl, "0:default; 0x20001:uap restarts on channel 6"); + +MODULE_DESCRIPTION("M-WLAN Driver"); +MODULE_AUTHOR("Marvell International Ltd."); +MODULE_VERSION(MLAN_RELEASE_VERSION); +MODULE_LICENSE("GPL"); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_main.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_main.h new file mode 100644 index 00000000..1e6ef84e --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_main.h @@ -0,0 +1,2218 @@ +/** @file moal_main.h + * + * @brief This file contains wlan driver specific defines etc. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/******************************************************** +Change log: + 10/21/2008: initial version +********************************************************/ + +#ifndef _MOAL_MAIN_H +#define _MOAL_MAIN_H + +/* warnfix for FS redefination if any? */ +#ifdef FS +#undef FS +#endif + +/* Linux header files */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0) +#include +#include +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18) +#include +#endif + +/* ASM files */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) +#include +#else +#include +#endif +#include +#include +#include +#include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) +#include +#else +#include +#endif + +/* Net header files */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "mlan.h" +#include "moal_shim.h" +/* Wireless header */ +#if defined(STA_CFG80211) || defined(UAP_CFG80211) +#include +#include +#include +#endif +#if defined(STA_WEXT) || defined(UAP_WEXT) +#include +#include +#include "moal_wext.h" +#endif +#ifdef STA_WEXT +#include "moal_priv.h" +#endif + +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 24) +#define REFDATA __refdata +#else +#define REFDATA +#endif + +/** + * Linux Kernels later 3.9 use CONFIG_PM_RUNTIME instead of + * CONFIG_USB_SUSPEND + */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) +#ifdef CONFIG_PM +#ifndef CONFIG_USB_SUSPEND +#define CONFIG_USB_SUSPEND +#endif +#endif +#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */ +#ifdef CONFIG_PM_RUNTIME +#ifndef CONFIG_USB_SUSPEND +#define CONFIG_USB_SUSPEND +#endif +#endif +#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */ +#endif + +/** + * Linux kernel later 3.10 use strncasecmp instead of strnicmp + */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0) +#define strnicmp strncasecmp +#endif + +/** Define BOOLEAN */ +typedef t_u8 BOOLEAN; + +/** Driver version */ +extern char driver_version[]; + +/** Private structure for MOAL */ +typedef struct _moal_private moal_private; +/** Handle data structure for MOAL */ +typedef struct _moal_handle moal_handle; + +/** Hardware status codes */ +typedef enum _MOAL_HARDWARE_STATUS { + HardwareStatusReady, + HardwareStatusInitializing, + HardwareStatusFwReady, + HardwareStatusReset, + HardwareStatusClosing, + HardwareStatusNotReady +} MOAL_HARDWARE_STATUS; + +/** moal_wait_option */ +enum { + MOAL_NO_WAIT, + MOAL_IOCTL_WAIT, + MOAL_CMD_WAIT, +#ifdef CONFIG_PROC_FS + MOAL_PROC_WAIT, +#endif + MOAL_WSTATS_WAIT, + MOAL_IOCTL_WAIT_TIMEOUT, + MOAL_CMD_WAIT_TIMEOUT +}; + +/** moal_main_state */ +enum { + MOAL_STATE_IDLE, + MOAL_RECV_INT, + MOAL_ENTER_WORK_QUEUE, + MOAL_START_MAIN_PROCESS, + MOAL_END_MAIN_PROCESS +}; + +/** HostCmd_Header */ +typedef struct _HostCmd_Header { + /** Command */ + t_u16 command; + /** Size */ + t_u16 size; +} HostCmd_Header; + +#ifndef MIN +/** Find minimum */ +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif + +/** Find maximum */ +#ifndef MAX +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#endif + +/* + * OS timer specific + */ + +/** Timer structure */ +typedef struct _moal_drv_timer { + /** Timer list */ + struct timer_list tl; + /** Timer function */ + void (*timer_function) (void *context); + /** Timer function context */ + void *function_context; + /** Time period */ + t_u32 time_period; + /** Is timer periodic ? */ + t_u32 timer_is_periodic; + /** Is timer cancelled ? */ + t_u32 timer_is_canceled; +} moal_drv_timer, *pmoal_drv_timer; + +/** + * @brief Timer handler + * + * @param fcontext Timer context + * + * @return N/A + */ +static inline void +woal_timer_handler(unsigned long fcontext) +{ + pmoal_drv_timer timer = (pmoal_drv_timer)fcontext; + + timer->timer_function(timer->function_context); + + if (timer->timer_is_periodic == MTRUE) { + mod_timer(&timer->tl, + jiffies + ((timer->time_period * HZ) / 1000)); + } else { + timer->timer_is_canceled = MTRUE; + timer->time_period = 0; + } +} + +/** + * @brief Initialize timer + * + * @param timer Timer structure + * @param TimerFunction Timer function + * @param FunctionContext Timer function context + * + * @return N/A + */ +static inline void +woal_initialize_timer(pmoal_drv_timer timer, + void (*TimerFunction) (void *context), + void *FunctionContext) +{ + /* First, setup the timer to trigger the wlan_timer_handler proxy */ + init_timer(&timer->tl); + timer->tl.function = woal_timer_handler; + timer->tl.data = (t_ptr)timer; + + /* Then tell the proxy which function to call and what to pass it */ + timer->timer_function = TimerFunction; + timer->function_context = FunctionContext; + timer->timer_is_canceled = MTRUE; + timer->time_period = 0; + timer->timer_is_periodic = MFALSE; +} + +/** + * @brief Modify timer + * + * @param timer Timer structure + * @param millisecondperiod Time period in millisecond + * + * @return N/A + */ +static inline void +woal_mod_timer(pmoal_drv_timer timer, t_u32 millisecondperiod) +{ + timer->time_period = millisecondperiod; + mod_timer(&timer->tl, jiffies + (millisecondperiod * HZ) / 1000); + timer->timer_is_canceled = MFALSE; +} + +/** + * @brief Cancel timer + * + * @param timer Timer structure + * + * @return N/A + */ +static inline void +woal_cancel_timer(moal_drv_timer *timer) +{ + if (timer->timer_is_periodic || in_atomic() || irqs_disabled()) + del_timer(&timer->tl); + else + del_timer_sync(&timer->tl); + timer->timer_is_canceled = MTRUE; + timer->time_period = 0; +} + +#ifdef REASSOCIATION +/* + * OS Thread Specific + */ + +#include + +/** Kernel thread structure */ +typedef struct _moal_thread { + /** Task control structrue */ + struct task_struct *task; + /** Pointer to wait_queue_head */ + wait_queue_head_t wait_q; + /** PID */ + pid_t pid; + /** Pointer to moal_handle */ + void *handle; +} moal_thread; + +/** + * @brief Activate thread + * + * @param thr Thread structure + * @return N/A + */ +static inline void +woal_activate_thread(moal_thread *thr) +{ + /** Initialize the wait queue */ + init_waitqueue_head(&thr->wait_q); + + /** Record the thread pid */ + thr->pid = current->pid; +} + +/** + * @brief De-activate thread + * + * @param thr Thread structure + * @return N/A + */ +static inline void +woal_deactivate_thread(moal_thread *thr) +{ + /* Reset the pid */ + thr->pid = 0; +} + +/** + * @brief Create and run the thread + * + * @param threadfunc Thread function + * @param thr Thread structure + * @param name Thread name + * @return N/A + */ +static inline void +woal_create_thread(int (*threadfunc) (void *), moal_thread *thr, char *name) +{ + /* Create and run the thread */ + thr->task = kthread_run(threadfunc, thr, "%s", name); +} +#endif /* REASSOCIATION */ + +/* The following macros are neccessary to retain compatibility + * around the workqueue chenges happened in kernels >= 2.6.20: + * - INIT_WORK changed to take 2 arguments and let the work function + * get its own data through the container_of macro + * - delayed works have been split from normal works to save some + * memory usage in struct work_struct + */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) +/** Work_queue work initialization */ +#define MLAN_INIT_WORK(_work, _fun) INIT_WORK(_work, ((void (*)(void *))_fun), _work) +/** Work_queue delayed work initialization */ +#define MLAN_INIT_DELAYED_WORK(_work, _fun) INIT_WORK(_work, ((void (*)(void *))_fun), _work) +/** Work_queue container parameter */ +#define MLAN_DELAYED_CONTAINER_OF(_ptr, _type, _m) container_of(_ptr, _type, _m) +#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) */ +/** Work_queue work initialization */ +#define MLAN_INIT_WORK INIT_WORK +/** Work_queue delayed work initialization */ +#define MLAN_INIT_DELAYED_WORK INIT_DELAYED_WORK +/** Work_queue container parameter */ +#define MLAN_DELAYED_CONTAINER_OF(_ptr, _type, _m) container_of(_ptr, _type, _m.work) +#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) */ + +/** + * @brief Schedule timeout + * + * @param millisec Timeout duration in milli second + * + * @return N/A + */ +static inline void +woal_sched_timeout(t_u32 millisec) +{ + set_current_state(TASK_INTERRUPTIBLE); + + schedule_timeout((millisec * HZ) / 1000); +} + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) +#define IN6PTON_XDIGIT 0x00010000 +#define IN6PTON_DIGIT 0x00020000 +#define IN6PTON_COLON_MASK 0x00700000 +#define IN6PTON_COLON_1 0x00100000 /* single : requested */ +#define IN6PTON_COLON_2 0x00200000 /* second : requested */ +#define IN6PTON_COLON_1_2 0x00400000 /* :: requested */ +#define IN6PTON_DOT 0x00800000 /* . */ +#define IN6PTON_DELIM 0x10000000 +#define IN6PTON_NULL 0x20000000 /* first/tail */ +#define IN6PTON_UNKNOWN 0x40000000 + +static inline int +xdigit2bin(char c, int delim) +{ + if (c == delim || c == '\0') + return IN6PTON_DELIM; + if (c == ':') + return IN6PTON_COLON_MASK; + if (c == '.') + return IN6PTON_DOT; + if (c >= '0' && c <= '9') + return IN6PTON_XDIGIT | IN6PTON_DIGIT | (c - '0'); + if (c >= 'a' && c <= 'f') + return IN6PTON_XDIGIT | (c - 'a' + 10); + if (c >= 'A' && c <= 'F') + return IN6PTON_XDIGIT | (c - 'A' + 10); + if (delim == -1) + return IN6PTON_DELIM; + return IN6PTON_UNKNOWN; +} + +static inline int +in4_pton(const char *src, int srclen, u8 *dst, int delim, const char **end) +{ + const char *s; + u8 *d; + u8 dbuf[4]; + int ret = 0; + int i; + int w = 0; + + if (srclen < 0) + srclen = strlen(src); + s = src; + d = dbuf; + i = 0; + while (1) { + int c; + c = xdigit2bin(srclen > 0 ? *s : '\0', delim); + if (! + (c & + (IN6PTON_DIGIT | IN6PTON_DOT | IN6PTON_DELIM | + IN6PTON_COLON_MASK))) { + goto out; + } + if (c & (IN6PTON_DOT | IN6PTON_DELIM | IN6PTON_COLON_MASK)) { + if (w == 0) + goto out; + *d++ = w & 0xff; + w = 0; + i++; + if (c & (IN6PTON_DELIM | IN6PTON_COLON_MASK)) { + if (i != 4) + goto out; + break; + } + goto cont; + } + w = (w * 10) + c; + if ((w & 0xffff) > 255) + goto out; +cont: + if (i >= 4) + goto out; + s++; + srclen--; + } + ret = 1; + memcpy(dst, dbuf, sizeof(dbuf)); +out: + if (end) + *end = s; + return ret; +} +#endif /* < 2.6.19 */ + +#ifndef __ATTRIB_ALIGN__ +#define __ATTRIB_ALIGN__ __attribute__((aligned(4))) +#endif + +#ifndef __ATTRIB_PACK__ +#define __ATTRIB_PACK__ __attribute__ ((packed)) +#endif + +/** Get module */ +#define MODULE_GET try_module_get(THIS_MODULE) +/** Put module */ +#define MODULE_PUT module_put(THIS_MODULE) + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) +/** Initialize semaphore */ +#define MOAL_INIT_SEMAPHORE(x) init_MUTEX(x) +/** Initialize semaphore */ +#define MOAL_INIT_SEMAPHORE_LOCKED(x) init_MUTEX_LOCKED(x) +#else +/** Initialize semaphore */ +#define MOAL_INIT_SEMAPHORE(x) sema_init(x, 1) +/** Initialize semaphore */ +#define MOAL_INIT_SEMAPHORE_LOCKED(x) sema_init(x, 0) +#endif + +/** Acquire semaphore and with blocking */ +#define MOAL_ACQ_SEMAPHORE_BLOCK(x) down_interruptible(x) +/** Acquire semaphore without blocking */ +#define MOAL_ACQ_SEMAPHORE_NOBLOCK(x) down_trylock(x) +/** Release semaphore */ +#define MOAL_REL_SEMAPHORE(x) up(x) + +/** Request FW timeout in second */ +#define REQUEST_FW_TIMEOUT 30 + +/** Default watchdog timeout */ +#define MRVDRV_DEFAULT_WATCHDOG_TIMEOUT (10 * HZ) + +#ifdef UAP_SUPPORT +/** Default watchdog timeout + Increase the value to avoid kernel Tx timeout message in case + station in PS mode or left. + The default value of PS station ageout timer is 40 seconds. + Hence, the watchdog timer is set to a value higher than it. +*/ +#define MRVDRV_DEFAULT_UAP_WATCHDOG_TIMEOUT (41 * HZ) +#endif + +/* IOCTL Timeout */ +#define MOAL_IOCTL_TIMEOUT (20 * HZ) + +/** Threshold value of number of times the Tx timeout happened */ +#define NUM_TX_TIMEOUT_THRESHOLD 5 + +/** Custom event : DRIVER HANG */ +#define CUS_EVT_DRIVER_HANG "EVENT=DRIVER_HANG" + +/** TDLS connected event */ +#define CUS_EVT_TDLS_CONNECTED "EVENT=TDLS_CONNECTED" +/** TDLS tear down event */ +#define CUS_EVT_TDLS_TEARDOWN "EVENT=TDLS_TEARDOWN" +/** wmm info */ +#define WMM_TYPE_INFO 0 +/** wmm parameter */ +#define WMM_TYPE_PARAMETER 1 + +/** AP connected event */ +#define CUS_EVT_AP_CONNECTED "EVENT=AP_CONNECTED" + +/** Custom event : BW changed */ +#define CUS_EVT_BW_CHANGED "EVENT=BW_CHANGED" +/** Custom event : OBSS scan parameter */ +#define CUS_EVT_OBSS_SCAN_PARAM "EVENT=OBSS_SCAN_PARAM" + +/** Custom event : AdHoc link sensed */ +#define CUS_EVT_ADHOC_LINK_SENSED "EVENT=ADHOC_LINK_SENSED" +/** Custom event : AdHoc link lost */ +#define CUS_EVT_ADHOC_LINK_LOST "EVENT=ADHOC_LINK_LOST" +/** Custom event : MIC failure, unicast */ +#define CUS_EVT_MLME_MIC_ERR_UNI "MLME-MICHAELMICFAILURE.indication unicast" +/** Custom event : MIC failure, multicast */ +#define CUS_EVT_MLME_MIC_ERR_MUL "MLME-MICHAELMICFAILURE.indication multicast" +/** Custom event : Beacon RSSI low */ +#define CUS_EVT_BEACON_RSSI_LOW "EVENT=BEACON_RSSI_LOW" +/** Custom event : Beacon SNR low */ +#define CUS_EVT_BEACON_SNR_LOW "EVENT=BEACON_SNR_LOW" +/** Custom event : Beacon RSSI high */ +#define CUS_EVT_BEACON_RSSI_HIGH "EVENT=BEACON_RSSI_HIGH" +/** Custom event : Beacon SNR high */ +#define CUS_EVT_BEACON_SNR_HIGH "EVENT=BEACON_SNR_HIGH" +/** Custom event : Max fail */ +#define CUS_EVT_MAX_FAIL "EVENT=MAX_FAIL" +/** Custom event : Data RSSI low */ +#define CUS_EVT_DATA_RSSI_LOW "EVENT=DATA_RSSI_LOW" +/** Custom event : Data SNR low */ +#define CUS_EVT_DATA_SNR_LOW "EVENT=DATA_SNR_LOW" +/** Custom event : Data RSSI high */ +#define CUS_EVT_DATA_RSSI_HIGH "EVENT=DATA_RSSI_HIGH" +/** Custom event : Data SNR high */ +#define CUS_EVT_DATA_SNR_HIGH "EVENT=DATA_SNR_HIGH" +/** Custom event : Link Quality */ +#define CUS_EVT_LINK_QUALITY "EVENT=LINK_QUALITY" +/** Custom event : Port Release */ +#define CUS_EVT_PORT_RELEASE "EVENT=PORT_RELEASE" +/** Custom event : Pre-Beacon Lost */ +#define CUS_EVT_PRE_BEACON_LOST "EVENT=PRE_BEACON_LOST" + +/** Custom event : Deep Sleep awake */ +#define CUS_EVT_DEEP_SLEEP_AWAKE "EVENT=DS_AWAKE" + +/** Custom event : Host Sleep activated */ +#define CUS_EVT_HS_ACTIVATED "HS_ACTIVATED" +/** Custom event : Host Sleep deactivated */ +#define CUS_EVT_HS_DEACTIVATED "HS_DEACTIVATED" +/** Custom event : Host Sleep wakeup */ +#define CUS_EVT_HS_WAKEUP "HS_WAKEUP" + +/** Custom event : WEP ICV error */ +#define CUS_EVT_WEP_ICV_ERR "EVENT=WEP_ICV_ERR" + +/** Custom event : Channel Switch Announcment */ +#define CUS_EVT_CHANNEL_SWITCH_ANN "EVENT=CHANNEL_SWITCH_ANN" + +/** Custom indiciation message sent to the application layer for WMM changes */ +#define WMM_CONFIG_CHANGE_INDICATION "WMM_CONFIG_CHANGE.indication" + +#ifdef UAP_SUPPORT +/** Custom event : STA connected */ +#define CUS_EVT_STA_CONNECTED "EVENT=STA_CONNECTED" +/** Custom event : STA disconnected */ +#define CUS_EVT_STA_DISCONNECTED "EVENT=STA_DISCONNECTED" +#endif + +/** 10 seconds */ +#define MOAL_TIMER_10S 10000 +/** 5 seconds */ +#define MOAL_TIMER_5S 5000 +/** 1 second */ +#define MOAL_TIMER_1S 1000 + +/** passive scan time */ +#define PASSIVE_SCAN_CHAN_TIME 110 +/** active scan time */ +#define ACTIVE_SCAN_CHAN_TIME 110 +/** specific scan time */ +#define SPECIFIC_SCAN_CHAN_TIME 110 +/** passive scan time */ +#define INIT_PASSIVE_SCAN_CHAN_TIME 80 +/** active scan time */ +#define INIT_ACTIVE_SCAN_CHAN_TIME 80 +/** specific scan time */ +#define INIT_SPECIFIC_SCAN_CHAN_TIME 80 +/** specific scan time after connected */ +#define MIN_SPECIFIC_SCAN_CHAN_TIME 40 + +/** Default value of re-assoc timer */ +#define REASSOC_TIMER_DEFAULT 500 + +/** Netlink protocol number */ +#define NETLINK_MARVELL (MAX_LINKS - 1) +/** Netlink maximum payload size */ +#define NL_MAX_PAYLOAD 1024 +/** Netlink multicast group number */ +#define NL_MULTICAST_GROUP 1 + +#define MAX_RX_PENDING_THRHLD 50 + +/** high rx pending packets */ +#define HIGH_RX_PENDING 100 +/** low rx pending packets */ +#define LOW_RX_PENDING 80 + +/** MAX Tx Pending count */ +#define MAX_TX_PENDING 100 + +/** LOW Tx Pending count */ +#define LOW_TX_PENDING 80 + +/** Offset for subcommand */ +#define SUBCMD_OFFSET 4 + +/** default scan channel gap */ +#define DEF_SCAN_CHAN_GAP 50 +/** default scan time per channel in miracast mode */ +#define DEF_MIRACAST_SCAN_TIME 20 + +/** Macro to extract the TOS field from a skb */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) +#define SKB_TOS(skb) (ip_hdr(skb)->tos) +#else +#define SKB_TOS(skb) (skb->nh.iph->tos) +#endif +#define SKB_TIDV6(skb) (ipv6_get_dsfield(ipv6_hdr(skb))) +#define IS_SKB_MAGIC_VLAN(skb) (skb->priority >= 256 && skb->priority <= 263) +#define GET_VLAN_PRIO(skb) (skb->priority - 256) + +/** Offset for TOS field in the IP header */ +#define IPTOS_OFFSET 5 + +/** Offset for DSCP in the tos field */ +#define DSCP_OFFSET 2 + +/** wait_queue structure */ +typedef struct _wait_queue { + /** Pointer to wait_queue_head */ + wait_queue_head_t *wait; + /** Wait condition */ + BOOLEAN condition; + /** Start time */ + long start_time; + /** Status from MLAN */ + mlan_status status; + /** flag for wait_timeout */ + t_u8 wait_timeout; +} wait_queue, *pwait_queue; + +/** Auto Rate */ +#define AUTO_RATE 0xFF + +#define STA_WEXT_MASK MBIT(0) +#define UAP_WEXT_MASK MBIT(1) +#define STA_CFG80211_MASK MBIT(2) +#define UAP_CFG80211_MASK MBIT(3) +#ifdef STA_CFG80211 +#ifdef STA_SUPPORT +/** Is STA CFG80211 enabled in module param */ +#define IS_STA_CFG80211(x) (x & STA_CFG80211_MASK) +#endif +#endif +#ifdef UAP_CFG80211 +#ifdef UAP_SUPPORT +/** Is UAP CFG80211 enabled in module param */ +#define IS_UAP_CFG80211(x) (x & UAP_CFG80211_MASK) +#endif +#endif +#if defined(STA_CFG80211) || defined(UAP_CFG80211) +/** Is UAP or STA CFG80211 enabled in module param */ +#define IS_STA_OR_UAP_CFG80211(x) (x & (STA_CFG80211_MASK | UAP_CFG80211_MASK)) +#endif + +#ifdef STA_WEXT +/** Is STA WEXT enabled in module param */ +#define IS_STA_WEXT(x) (x & STA_WEXT_MASK) +#endif /* STA_WEXT */ +#ifdef UAP_WEXT +/** Is UAP WEXT enabled in module param */ +#define IS_UAP_WEXT(x) (x & UAP_WEXT_MASK) +#endif /* UAP_WEXT */ +#if defined(STA_WEXT) || defined(UAP_WEXT) +/** Is UAP or STA WEXT enabled in module param */ +#define IS_STA_OR_UAP_WEXT(x) (x & (STA_WEXT_MASK | UAP_WEXT_MASK)) +#endif + +#ifdef STA_SUPPORT +/** Driver mode STA bit */ +#define DRV_MODE_STA MBIT(0) +/** Maximum STA BSS */ +#define MAX_STA_BSS 1 +/** Default STA BSS */ +#define DEF_STA_BSS 1 +#endif +#ifdef UAP_SUPPORT +/** Driver mode uAP bit */ +#define DRV_MODE_UAP MBIT(1) +/** Maximum uAP BSS */ +#define MAX_UAP_BSS 2 +/** Default uAP BSS */ +#define DEF_UAP_BSS 1 +#endif +#if defined(WIFI_DIRECT_SUPPORT) +/** Driver mode WIFIDIRECT bit */ +#define DRV_MODE_WIFIDIRECT MBIT(2) +/** Maximum WIFIDIRECT BSS */ +#define MAX_WIFIDIRECT_BSS 2 +/** Default WIFIDIRECT BSS */ +#define DEF_WIFIDIRECT_BSS 1 +#if defined(STA_CFG80211) && defined(UAP_CFG80211) +#define DEF_VIRTUAL_BSS 0 +#endif +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ + +/** + * the maximum number of adapter supported + **/ +#define MAX_MLAN_ADAPTER 2 + +typedef struct _moal_drv_mode { + /** driver mode */ + t_u16 drv_mode; + /** total number of interfaces */ + t_u16 intf_num; + /** attribute of bss */ + mlan_bss_attr *bss_attr; + /** name of firmware image */ + char *fw_name; +} moal_drv_mode; + +#ifdef PROC_DEBUG +/** Debug data */ +struct debug_data { + /** Name */ + char name[32]; + /** Size */ + t_u32 size; + /** Address */ + t_ptr addr; +}; + +/** Private debug data */ +struct debug_data_priv { + /** moal_private handle */ + moal_private *priv; + /** Debug items */ + struct debug_data *items; + /** numbre of item */ + int num_of_items; +}; +#endif + +/** Maximum IP address buffer length */ +#define IPADDR_MAX_BUF 20 +/** IP address operation: Remove */ +#define IPADDR_OP_REMOVE 0 + +struct tcp_sess { + struct list_head link; + /** tcp session info */ + t_u32 src_ip_addr; + t_u32 dst_ip_addr; + t_u16 src_tcp_port; + t_u16 dst_tcp_port; + /** tx ack packet info */ + t_u32 ack_seq; + /** tcp ack buffer */ + void *ack_skb; +}; + +struct tx_status_info { + struct list_head link; + /** cookie */ + t_u64 tx_cookie; + /** seq_num */ + t_u8 tx_seq_num; + /** skb */ + void *tx_skb; +}; + +/** default rssi low threshold */ +#define TDLS_RSSI_LOW_THRESHOLD 55 +/** default rssi high threshold */ +#define TDLS_RSSI_HIGH_THRESHOLD 50 +/** TDLS idle time */ +#define TDLS_IDLE_TIME (10*HZ) +/** TDLS max failure count */ +#define TDLS_MAX_FAILURE_COUNT 4 +/** TDLS tear down reason */ +#define TDLS_TEARN_DOWN_REASON_UNSPECIFIC 26 + +/** TDLS status */ +typedef enum _tdlsStatus_e { + TDLS_NOT_SETUP = 0, + TDLS_SETUP_INPROGRESS, + TDLS_SETUP_COMPLETE, + TDLS_SETUP_FAILURE, + TDLS_TEAR_DOWN, + TDLS_SWITCHING_CHANNEL, + TDLS_IN_BASE_CHANNEL, + TDLS_IN_OFF_CHANNEL, +} tdlsStatus_e; + +/** tdls peer_info */ +struct tdls_peer { + struct list_head link; + /** MAC address information */ + t_u8 peer_addr[ETH_ALEN]; + /** rssi */ + int rssi; + /** jiffies with rssi */ + long rssi_jiffies; + /** link status */ + tdlsStatus_e link_status; + /** num of set up failure */ + t_u8 num_failure; +}; + +/** Number of samples in histogram (/proc/mwlan/mlan0/histogram).*/ +#define HIST_MAX_SAMPLES 1048576 +#define RX_RATE_MAX 196 + +/** SRN MAX */ +#define SNR_MAX 256 +/** NOISE FLR MAX */ +#define NOISE_FLR_MAX 256 +/** SIG STRENTGH MAX */ +#define SIG_STRENGTH_MAX 256 +/** historgram data */ +typedef struct _hgm_data { + /** rx rate */ + atomic_t rx_rate[RX_RATE_MAX]; + /** snr */ + atomic_t snr[SNR_MAX]; + /** noise flr */ + atomic_t noise_flr[NOISE_FLR_MAX]; + /** sig_str */ + atomic_t sig_str[SIG_STRENGTH_MAX]; + /** num sample */ + atomic_t num_samples; +} hgm_data; + +/** max antenna number */ +#define MAX_ANTENNA_NUM 3 + +/* wlan_hist_proc_data */ +typedef struct _wlan_hist_proc_data { + /** antenna */ + u8 ant_idx; + /** Private structure */ + struct _moal_private *priv; +} wlan_hist_proc_data; + +/** Private structure for MOAL */ +struct _moal_private { + /** Handle structure */ + moal_handle *phandle; + /** Tx timeout count */ + t_u32 num_tx_timeout; + /** BSS index */ + t_u8 bss_index; + /** BSS type */ + t_u8 bss_type; + /** BSS role */ + t_u8 bss_role; + /** bss virtual flag */ + t_u8 bss_virtual; + /** MAC address information */ + t_u8 current_addr[ETH_ALEN]; + /** Media connection status */ + BOOLEAN media_connected; + /** Statistics of tcp ack tx dropped */ + t_u32 tcp_ack_drop_cnt; + /** Statistics of tcp ack tx in total from kernel */ + t_u32 tcp_ack_cnt; +#ifdef UAP_SUPPORT + /** uAP started or not */ + BOOLEAN bss_started; +#endif + /** IP addr type */ + t_u32 ip_addr_type; + /** IP addr */ + t_u8 ip_addr[IPADDR_LEN]; +#ifdef STA_SUPPORT + /** scan type */ + t_u8 scan_type; + /** bg_scan_start */ + t_u8 bg_scan_start; + /** bg_scan reported */ + t_u8 bg_scan_reported; + /** bg_scan config */ + wlan_bgscan_cfg scan_cfg; + /** sched scaning flag */ + t_u8 sched_scanning; +#ifdef STA_CFG80211 + /** roaming enabled flag */ + t_u8 roaming_enabled; + /** rssi low threshold */ + int rssi_low; + /** channel for connect */ + struct ieee80211_channel conn_chan; + /** bssid for connect */ + t_u8 conn_bssid[ETH_ALEN]; + /** ssid for connect */ + t_u8 conn_ssid[MLAN_MAX_SSID_LENGTH]; + /** key data */ + t_u8 conn_wep_key[MAX_WEP_KEY_SIZE]; + /** connection param */ + struct cfg80211_connect_params sme_current; + /** roaming required flag */ + t_u8 roaming_required; +#endif +#endif + /** Net device pointer */ + struct net_device *netdev; + /** Net device statistics structure */ + struct net_device_stats stats; +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + /** Wireless device pointer */ + struct wireless_dev *wdev; + /** Wireless device */ + struct wireless_dev w_dev; + /** Net device pointer */ + struct net_device *pa_netdev; + /** channel parameter for UAP/GO */ + t_u16 channel; +#ifdef UAP_SUPPORT + /** wep key */ + wep_key uap_wep_key[4]; + /** cipher */ + t_u32 cipher; +#endif + /** beacon ie index */ + t_u16 beacon_index; + /** proberesp ie index */ + t_u16 proberesp_index; + /** proberesp_p2p_index */ + t_u16 proberesp_p2p_index; + /** assocresp ie index */ + t_u16 assocresp_index; + /** probereq index for mgmt ie */ + t_u16 probereq_index; + /** mgmt_subtype_mask */ + t_u32 mgmt_subtype_mask; + /** beacon wps index for mgmt ie */ + t_u16 beacon_wps_index; +#endif +#ifdef STA_CFG80211 +#ifdef STA_SUPPORT + /** CFG80211 association description */ + t_u8 cfg_bssid[ETH_ALEN]; + /** Disconnect request from CFG80211 */ + bool cfg_disconnect; + /** connect request from CFG80211 */ + bool cfg_connect; + /** lock for cfg connect */ + spinlock_t connect_lock; + /** assoc status */ + t_u32 assoc_status; + /** rssi_threshold */ + s32 cqm_rssi_thold; + /** rssi hysteresis */ + u32 cqm_rssi_hyst; + /** last rssi_low */ + u8 last_rssi_low; + /** last rssi_high */ + u8 last_rssi_high; + /** mrvl rssi threshold */ + u8 mrvl_rssi_low; + /** last event */ + u32 last_event; + /** fake scan flag */ + u8 fake_scan_complete; + /**ft ie*/ + t_u8 ft_ie[MAX_IE_SIZE]; + /**ft ie len*/ + t_u8 ft_ie_len; + /**mobility domain value*/ + t_u16 ft_md; + /**ft capability*/ + t_u8 ft_cap; + /**set true during ft connection*/ + t_bool ft_pre_connect; + /**ft roaming triggered by driver or not*/ + t_bool ft_roaming_triggered_by_driver; + /**target ap mac address for Fast Transition*/ + t_u8 target_ap_bssid[ETH_ALEN]; + /** IOCTL wait queue for FT*/ + wait_queue_head_t ft_wait_q __ATTRIB_ALIGN__; + /** ft wait condition */ + t_bool ft_wait_condition; +#endif /* STA_SUPPORT */ +#endif /* STA_CFG80211 */ + /** IOCTL wait queue */ + wait_queue_head_t ioctl_wait_q __ATTRIB_ALIGN__; + /** CMD wait queue */ + wait_queue_head_t cmd_wait_q __ATTRIB_ALIGN__; +#ifdef CONFIG_PROC_FS + /** Proc entry */ + struct proc_dir_entry *proc_entry; + /** Proc entry name */ + char proc_entry_name[IFNAMSIZ]; + /** proc entry for hist */ + struct proc_dir_entry *hist_entry; + /** ant_hist_proc_data */ + wlan_hist_proc_data hist_proc[MAX_ANTENNA_NUM]; + /** PROC wait queue */ + wait_queue_head_t proc_wait_q __ATTRIB_ALIGN__; +#endif /* CONFIG_PROC_FS */ +#ifdef STA_SUPPORT + /** Nickname */ + t_u8 nick_name[16]; + /** AdHoc link sensed flag */ + BOOLEAN is_adhoc_link_sensed; + /** Current WEP key index */ + t_u16 current_key_index; +#ifdef REASSOCIATION + mlan_ssid_bssid prev_ssid_bssid; + /** Re-association required */ + BOOLEAN reassoc_required; + /** Flag of re-association on/off */ + BOOLEAN reassoc_on; + /** Set asynced essid flag */ + BOOLEAN set_asynced_essid_flag; +#endif /* REASSOCIATION */ + /** Report scan result */ + t_u8 report_scan_result; + /** wpa_version */ + t_u8 wpa_version; + /** key mgmt */ + t_u8 key_mgmt; + /** rx_filter */ + t_u8 rx_filter; +#endif /* STA_SUPPORT */ + /** Rate index */ + t_u16 rate_index; +#if defined(STA_WEXT) || defined(UAP_WEXT) + /** IW statistics */ + struct iw_statistics w_stats; + /** w_stats wait queue */ + wait_queue_head_t w_stats_wait_q __ATTRIB_ALIGN__; +#endif +#ifdef UAP_WEXT + /** Pairwise Cipher used for WPA/WPA2 mode */ + t_u16 pairwise_cipher; + /** Group Cipher */ + t_u16 group_cipher; + /** Protocol stored during uap wext configuratoin */ + t_u16 uap_protocol; + /** Key Mgmt whether PSK or 1x */ + t_u16 uap_key_mgmt; + /** Beacon IE length from hostapd */ + t_u16 bcn_ie_len; + /** Beacon IE buffer from hostapd */ + t_u8 bcn_ie_buf[MAX_IE_SIZE]; +#endif + +#ifdef PROC_DEBUG + /** MLAN debug info */ + struct debug_data_priv items_priv; +#endif + + /** tcp session queue */ + struct list_head tcp_sess_queue; + /** TCP Ack enhance flag */ + t_u8 enable_tcp_ack_enh; + /** TCP session spin lock */ + spinlock_t tcp_sess_lock; + /** tcp list */ + struct list_head tdls_list; + /** tdls spin lock */ + spinlock_t tdls_lock; + /** auto tdls flag */ + t_u8 enable_auto_tdls; + /** check tx packet for tdls peer */ + t_u8 tdls_check_tx; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + atomic_t wmm_tx_pending[4]; +#endif + /** per interface extra headroom */ + t_u16 extra_tx_head_len; + /** TX status spin lock */ + spinlock_t tx_stat_lock; + /** tx_seq_num */ + t_u8 tx_seq_num; + /** tx status queue */ + struct list_head tx_stat_queue; + + /** rx hgm data */ + hgm_data *hist_data[3]; +}; +/** card info */ +typedef struct _card_info { + /** support embeded supp */ + t_bool embedded_supp; + /** support drcs */ + t_bool drcs; + /** support Go NOA*/ + t_bool go_noa; + /** support V15_UPDATE*/ + t_bool v15_update; +} card_info; + +/** Handle data structure for MOAL */ +struct _moal_handle { + /** MLAN adapter structure */ + t_void *pmlan_adapter; + /** Private pointer */ + moal_private *priv[MLAN_MAX_BSS_NUM]; + /** Priv number */ + t_u8 priv_num; + /** Bss attr */ + moal_drv_mode drv_mode; + /** set mac address flag */ + t_u8 set_mac_addr; + /** MAC address */ + t_u8 mac_addr[ETH_ALEN]; +#ifdef CONFIG_PROC_FS + /** Proc top level directory entry */ + struct proc_dir_entry *proc_mwlan; +#endif + /** Firmware */ + const struct firmware *firmware; + /** Firmware request start time */ + struct timeval req_fw_time; + /** Init config file */ + const struct firmware *user_data; + /** Init user configure wait queue token */ + t_u16 init_user_conf_wait_flag; + /** Init user configure file wait queue */ + wait_queue_head_t init_user_conf_wait_q __ATTRIB_ALIGN__; + /** Hotplug device */ + struct device *hotplug_device; + /** STATUS variables */ + MOAL_HARDWARE_STATUS hardware_status; + BOOLEAN fw_reload; + /** POWER MANAGEMENT AND PnP SUPPORT */ + BOOLEAN surprise_removed; + /** Firmware release number */ + t_u32 fw_release_number; + /** Init wait queue token */ + t_u16 init_wait_q_woken; + /** Init wait queue */ + wait_queue_head_t init_wait_q __ATTRIB_ALIGN__; +#if defined(SDIO_SUSPEND_RESUME) + /** Device suspend flag */ + BOOLEAN is_suspended; +#ifdef SDIO_SUSPEND_RESUME + /** suspend notify flag */ + BOOLEAN suspend_notify_req; +#endif + /** Host Sleep activated flag */ + t_u8 hs_activated; + /** Host Sleep activated event wait queue token */ + t_u16 hs_activate_wait_q_woken; + /** Host Sleep activated event wait queue */ + wait_queue_head_t hs_activate_wait_q __ATTRIB_ALIGN__; +#endif + /** Card pointer */ + t_void *card; + /** Rx pending in MLAN */ + atomic_t rx_pending; + /** Tx packet pending count in mlan */ + atomic_t tx_pending; + /** IOCTL pending count in mlan */ + atomic_t ioctl_pending; + /** lock count */ + atomic_t lock_count; + /** Malloc count */ + atomic_t malloc_count; + /** vmalloc count */ + atomic_t vmalloc_count; + /** mlan buffer alloc count */ + atomic_t mbufalloc_count; +#if defined(SDIO_SUSPEND_RESUME) + /** hs skip count */ + t_u32 hs_skip_count; + /** hs force count */ + t_u32 hs_force_count; + /** suspend_fail flag */ + BOOLEAN suspend_fail; +#endif +#ifdef REASSOCIATION + /** Re-association thread */ + moal_thread reassoc_thread; + /** Re-association timer set flag */ + BOOLEAN is_reassoc_timer_set; + /** Re-association timer */ + moal_drv_timer reassoc_timer __ATTRIB_ALIGN__; + /** */ + struct semaphore reassoc_sem; + /** Bitmap for re-association on/off */ + t_u8 reassoc_on; +#endif /* REASSOCIATION */ + /** Driver workqueue */ + struct workqueue_struct *workqueue; + /** main work */ + struct work_struct main_work; + /** Driver workqueue */ + struct workqueue_struct *rx_workqueue; + /** main work */ + struct work_struct rx_work; +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + struct wiphy *wiphy; + /** Country code for regulatory domain */ + t_u8 country_code[COUNTRY_CODE_LEN]; + /** band */ + enum ieee80211_band band; + /** first scan done flag */ + t_u8 first_scan_done; + /** scan channel gap */ + t_u16 scan_chan_gap; +#ifdef WIFI_DIRECT_SUPPORT + /** NoA duration */ + t_u32 noa_duration; + /** NoA interval */ + t_u32 noa_interval; + /** miracast mode */ + t_u8 miracast_mode; + /** scan time in miracast mode */ + t_u16 miracast_scan_time; + /** remain on channel flag */ + t_u8 remain_on_channel; + /** bss index for remain on channel */ + t_u8 remain_bss_index; + /** ieee802_11_channel */ + struct ieee80211_channel chan; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + /** channel type */ + enum nl80211_channel_type channel_type; +#endif + /** cookie */ + t_u64 cookie; + /** GO timer set flag */ + BOOLEAN is_go_timer_set; + /** GO timer */ + moal_drv_timer go_timer __ATTRIB_ALIGN__; + /** remain_on_channel timer set flag */ + BOOLEAN is_remain_timer_set; + /** remani_on_channel_timer */ + moal_drv_timer remain_timer __ATTRIB_ALIGN__; +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) + /** cfg80211_suspend status */ + t_u8 cfg80211_suspend; +#endif +#endif + /** Read SDIO registers for debugging */ + t_u32 sdio_reg_dbg; + /** Netlink kernel socket */ + struct sock *nl_sk; + /** Netlink kernel socket number */ + t_u32 netlink_num; + /** w_stats wait queue token */ + BOOLEAN meas_wait_q_woken; + /** w_stats wait queue */ + wait_queue_head_t meas_wait_q __ATTRIB_ALIGN__; + /** Measurement start jiffes */ + long meas_start_jiffies; + /** CAC checking period flag */ + BOOLEAN cac_period; + /** BSS START command delay executing flag */ + BOOLEAN delay_bss_start; + /** SSID,BSSID parameter of delay executing */ + mlan_ssid_bssid delay_ssid_bssid; +#ifdef DFS_TESTING_SUPPORT + /** cac period length, valid only when dfs testing is enabled */ + long cac_period_jiffies; +#endif + /** handle index - for multiple card supports */ + t_u8 handle_idx; +#ifdef SDIO_MMC_DEBUG + /** cmd53 write state */ + u8 cmd53w; + /** cmd53 read state */ + u8 cmd53r; +#endif +#ifdef STA_SUPPORT + /** Scan pending on blocked flag */ + t_u8 scan_pending_on_block; + /** Async scan semaphore */ + struct semaphore async_sem; +#ifdef STA_CFG80211 + /** CFG80211 scan request description */ + struct cfg80211_scan_request *scan_request; + /** Scan Private pointer */ + moal_private *scan_priv; +#endif +#endif + /** main state */ + t_u8 main_state; + /** driver state */ + t_u8 driver_state; + /** ioctl timeout */ + t_u8 ioctl_timeout; + /** FW dump state */ + t_u8 fw_dump; + /** cmd52 function */ + t_u8 cmd52_func; + /** cmd52 register */ + t_u8 cmd52_reg; + /** cmd52 value */ + t_u8 cmd52_val; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + /** spinlock to stop_queue/wake_queue*/ + spinlock_t queue_lock; +#endif + /** Driver spin lock */ + spinlock_t driver_lock; + /** Driver ioctl spin lock */ + spinlock_t ioctl_lock; + /** lock for scan_request */ + spinlock_t scan_req_lock; + /** Card type */ + t_u16 card_type; + /** card info */ + card_info *card_info; + /** Card specific driver version */ + t_s8 driver_version[MLAN_MAX_VER_STR_LEN]; + char *fwdump_fname; + t_u8 histogram_table_num; + /* feature_control */ + t_u8 feature_control; +}; +/** + * @brief set trans_start for each TX queue. + * + * @param dev A pointer to net_device structure + * + * @return N/A + */ +static inline void +woal_set_trans_start(struct net_device *dev) +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31) + unsigned int i; + for (i = 0; i < dev->num_tx_queues; i++) + netdev_get_tx_queue(dev, i)->trans_start = jiffies; +#endif + dev->trans_start = jiffies; +} + +/** + * @brief Start queue + * + * @param dev A pointer to net_device structure + * + * @return N/A + */ +static inline void +woal_start_queue(struct net_device *dev) +{ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 29) + netif_start_queue(dev); +#else + netif_tx_start_all_queues(dev); +#endif +} + +/** + * @brief Stop queue + * + * @param dev A pointer to net_device structure + * + * @return N/A + */ +static inline void +woal_stop_queue(struct net_device *dev) +{ +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + unsigned long flags; + moal_private *priv = (moal_private *)netdev_priv(dev); + spin_lock_irqsave(&priv->phandle->queue_lock, flags); + woal_set_trans_start(dev); + if (!netif_queue_stopped(dev)) + netif_tx_stop_all_queues(dev); + spin_unlock_irqrestore(&priv->phandle->queue_lock, flags); +#else + woal_set_trans_start(dev); + if (!netif_queue_stopped(dev)) + netif_stop_queue(dev); +#endif +} + +/** + * @brief wake queue + * + * @param dev A pointer to net_device structure + * + * @return N/A + */ +static inline void +woal_wake_queue(struct net_device *dev) +{ +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + unsigned long flags; + moal_private *priv = (moal_private *)netdev_priv(dev); + spin_lock_irqsave(&priv->phandle->queue_lock, flags); + if (netif_queue_stopped(dev)) + netif_tx_wake_all_queues(dev); + spin_unlock_irqrestore(&priv->phandle->queue_lock, flags); +#else + if (netif_queue_stopped(dev)) + netif_wake_queue(dev); +#endif +} + +/** Debug Macro definition*/ +#ifdef DEBUG_LEVEL1 +extern t_u32 drvdbg; + +#define LOG_CTRL(level) (0) + +#ifdef DEBUG_LEVEL2 +#define PRINTM_MINFO(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MINFO) printk(KERN_DEBUG msg); \ +} while (0) +#define PRINTM_MWARN(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MWARN) printk(KERN_DEBUG msg); \ +} while (0) +#define PRINTM_MENTRY(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MENTRY) printk(KERN_DEBUG msg); \ +} while (0) +#else +#define PRINTM_MINFO(level, msg...) do {} while (0) +#define PRINTM_MWARN(level, msg...) do {} while (0) +#define PRINTM_MENTRY(level, msg...) do {} while (0) +#endif /* DEBUG_LEVEL2 */ + +#define PRINTM_MFW_D(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MFW_D) printk(KERN_DEBUG msg); \ +} while (0) +#define PRINTM_MCMD_D(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MCMD_D) printk(KERN_DEBUG msg); \ +} while (0) +#define PRINTM_MDAT_D(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MDAT_D) printk(KERN_DEBUG msg); \ +} while (0) +#define PRINTM_MIF_D(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MIF_D) printk(KERN_DEBUG msg); \ +} while (0) + +#define PRINTM_MIOCTL(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MIOCTL) printk(KERN_DEBUG msg); \ +} while (0) +#define PRINTM_MINTR(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MINTR) printk(KERN_DEBUG msg); \ +} while (0) +#define PRINTM_MEVENT(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MEVENT) printk(msg); \ +} while (0) +#define PRINTM_MCMND(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MCMND) printk(KERN_DEBUG msg); \ +} while (0) +#define PRINTM_MDATA(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MDATA) printk(KERN_DEBUG msg); \ +} while (0) +#define PRINTM_MERROR(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MERROR) printk(KERN_ERR msg); \ +} while (0) +#define PRINTM_MFATAL(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MFATAL) printk(KERN_ERR msg); \ +} while (0) +#define PRINTM_MMSG(level, msg...) do { \ + woal_print(level, msg); \ + if (drvdbg & MMSG) printk(KERN_ALERT msg); \ +} while (0) + +static inline void +woal_print(t_u32 level, char *fmt, ...) +{ +} + +#define PRINTM(level, msg...) PRINTM_##level(level, msg) + +#else + +#define PRINTM(level, msg...) do {} while (0) + +#endif /* DEBUG_LEVEL1 */ + +/** Wait until a condition becomes true */ +#define MASSERT(cond) \ +do { \ + if (!(cond)) { \ + PRINTM(MFATAL, "ASSERT: %s: %i\n", __func__, __LINE__); \ + panic("Assert failed: Panic!"); \ + } \ +} while (0) + +/** Log entry point for debugging */ +#define ENTER() PRINTM(MENTRY, "Enter: %s\n", \ + __func__) +/** Log exit point for debugging */ +#define LEAVE() PRINTM(MENTRY, "Leave: %s\n", \ + __func__) + +#ifdef DEBUG_LEVEL1 +#define DBG_DUMP_BUF_LEN 64 +#define MAX_DUMP_PER_LINE 16 + +static inline void +hexdump(t_u32 level, char *prompt, t_u8 *buf, int len) +{ + int i; + char dbgdumpbuf[DBG_DUMP_BUF_LEN]; + char *ptr = dbgdumpbuf; + + if (drvdbg & level) + printk(KERN_DEBUG "%s:\n", prompt); + for (i = 1; i <= len; i++) { + ptr += snprintf(ptr, 4, "%02x ", *buf); + buf++; + if (i % MAX_DUMP_PER_LINE == 0) { + *ptr = 0; + if (drvdbg & level) + printk(KERN_DEBUG "%s\n", dbgdumpbuf); + ptr = dbgdumpbuf; + } + } + if (len % MAX_DUMP_PER_LINE) { + *ptr = 0; + if (drvdbg & level) + printk(KERN_DEBUG "%s\n", dbgdumpbuf); + } +} + +#define DBG_HEXDUMP_MERROR(x, y, z) do { \ + if ((drvdbg & MERROR) || LOG_CTRL(MERROR)) \ + hexdump(MERROR, x, y, z); \ +} while (0) +#define DBG_HEXDUMP_MCMD_D(x, y, z) do { \ + if ((drvdbg & MCMD_D) || LOG_CTRL(MCMD_D)) \ + hexdump(MCMD_D, x, y, z); \ +} while (0) +#define DBG_HEXDUMP_MDAT_D(x, y, z) do { \ + if ((drvdbg & MDAT_D) || LOG_CTRL(MDAT_D)) \ + hexdump(MDAT_D, x, y, z); \ +} while (0) +#define DBG_HEXDUMP_MIF_D(x, y, z) do { \ + if ((drvdbg & MIF_D) || LOG_CTRL(MIF_D)) \ + hexdump(MIF_D, x, y, z); \ +} while (0) +#define DBG_HEXDUMP_MEVT_D(x, y, z) do { \ + if ((drvdbg & MEVT_D) || LOG_CTRL(MEVT_D)) \ + hexdump(MEVT_D, x, y, z); \ +} while (0) +#define DBG_HEXDUMP_MFW_D(x, y, z) do { \ + if ((drvdbg & MFW_D) || LOG_CTRL(MFW_D)) \ + hexdump(MFW_D, x, y, z); \ +} while (0) +#define DBG_HEXDUMP(level, x, y, z) DBG_HEXDUMP_##level(x, y, z) + +#else +/** Do nothing since debugging is not turned on */ +#define DBG_HEXDUMP(level, x, y, z) do {} while (0) +#endif + +#ifdef DEBUG_LEVEL2 +#define HEXDUMP(x, y, z) do { \ + if ((drvdbg & MINFO) || LOG_CTRL(MINFO)) \ + hexdump(MINFO, x, y, z); \ +} while (0) +#else +/** Do nothing since debugging is not turned on */ +#define HEXDUMP(x, y, z) do {} while (0) +#endif + +#ifdef BIG_ENDIAN_SUPPORT +/** Convert from 16 bit little endian format to CPU format */ +#define woal_le16_to_cpu(x) le16_to_cpu(x) +/** Convert from 32 bit little endian format to CPU format */ +#define woal_le32_to_cpu(x) le32_to_cpu(x) +/** Convert from 64 bit little endian format to CPU format */ +#define woal_le64_to_cpu(x) le64_to_cpu(x) +/** Convert to 16 bit little endian format from CPU format */ +#define woal_cpu_to_le16(x) cpu_to_le16(x) +/** Convert to 32 bit little endian format from CPU format */ +#define woal_cpu_to_le32(x) cpu_to_le32(x) +/** Convert to 64 bit little endian format from CPU format */ +#define woal_cpu_to_le64(x) cpu_to_le64(x) +#else +/** Do nothing */ +#define woal_le16_to_cpu(x) x +/** Do nothing */ +#define woal_le32_to_cpu(x) x +/** Do nothing */ +#define woal_le64_to_cpu(x) x +/** Do nothing */ +#define woal_cpu_to_le16(x) x +/** Do nothing */ +#define woal_cpu_to_le32(x) x +/** Do nothing */ +#define woal_cpu_to_le64(x) x +#endif + +/** + * @brief This function returns first available priv + * based on the BSS role + * + * @param handle A pointer to moal_handle + * @param bss_role BSS role or MLAN_BSS_ROLE_ANY + * + * @return Pointer to moal_private + */ +static inline moal_private * +woal_get_priv(moal_handle *handle, mlan_bss_role bss_role) +{ + int i; + + for (i = 0; i < MIN(handle->priv_num, MLAN_MAX_BSS_NUM); i++) { + if (handle->priv[i]) { + if (bss_role == MLAN_BSS_ROLE_ANY || + GET_BSS_ROLE(handle->priv[i]) == bss_role) + return handle->priv[i]; + } + } + return NULL; +} + +/** + * @brief This function returns first available priv + * based on the BSS type + * + * @param handle A pointer to moal_handle + * @param bss_type BSS type or MLAN_BSS_TYPE_ANY + * + * @return Pointer to moal_private + */ +static inline moal_private * +woal_get_priv_bss_type(moal_handle *handle, mlan_bss_type bss_type) +{ + int i; + + for (i = 0; i < MIN(handle->priv_num, MLAN_MAX_BSS_NUM); i++) { + if (handle->priv[i]) { + if (bss_type == MLAN_BSS_TYPE_ANY || + handle->priv[i]->bss_type == bss_type) + return handle->priv[i]; + } + } + return NULL; +} + +/* CAC Measure report default time 60 seconds */ +#define MEAS_REPORT_TIME (60 * HZ) + +/** Max line length allowed in init config file */ +#define MAX_LINE_LEN 256 +/** Max MAC address string length allowed */ +#define MAX_MAC_ADDR_LEN 18 +/** Max register type/offset/value etc. parameter length allowed */ +#define MAX_PARAM_LEN 12 + +/** HostCmd_CMD_CFG_DATA for CAL data */ +#define HostCmd_CMD_CFG_DATA 0x008f +/** HostCmd action set */ +#define HostCmd_ACT_GEN_SET 0x0001 +/** HostCmd CAL data header length */ +#define CFG_DATA_HEADER_LEN 6 + +typedef struct _HostCmd_DS_GEN { + t_u16 command; + t_u16 size; + t_u16 seq_num; + t_u16 result; +} HostCmd_DS_GEN; + +typedef struct _HostCmd_DS_802_11_CFG_DATA { + /** Action */ + t_u16 action; + /** Type */ + t_u16 type; + /** Data length */ + t_u16 data_len; + /** Data */ + t_u8 data[1]; +} __ATTRIB_PACK__ HostCmd_DS_802_11_CFG_DATA; + +/** SD8787 card type */ +#define CARD_TYPE_SD8787 0x01 +/** SD8777 card type */ +#define CARD_TYPE_SD8777 0x02 +/** SD8887 card type */ +#define CARD_TYPE_SD8887 0x03 +/** SD8801 card type */ +#define CARD_TYPE_SD8801 0x04 +/** SD8897 card type */ +#define CARD_TYPE_SD8897 0x05 +/** SD8797 card type */ +#define CARD_TYPE_SD8797 0x06 + +/** combo scan header */ +#define WEXT_CSCAN_HEADER "CSCAN S\x01\x00\x00S\x00" +/** combo scan header size */ +#define WEXT_CSCAN_HEADER_SIZE 12 +/** combo scan ssid section */ +#define WEXT_CSCAN_SSID_SECTION 'S' +/** commbo scan channel section */ +#define WEXT_CSCAN_CHANNEL_SECTION 'C' +/** commbo scan passive dwell section */ +#define WEXT_CSCAN_PASV_DWELL_SECTION 'P' +/** commbo scan home dwell section */ +#define WEXT_CSCAN_HOME_DWELL_SECTION 'H' +/** BGSCAN RSSI section */ +#define WEXT_BGSCAN_RSSI_SECTION 'R' +/** BGSCAN SCAN INTERVAL SECTION */ +#define WEXT_BGSCAN_INTERVAL_SECTION 'T' +/** BGSCAN REPEAT SECTION */ +#define WEXT_BGSCAN_REPEAT_SECTION 'E' +/** Min BGSCAN interval 30 second */ +#define MIN_BGSCAN_INTERVAL 30000 +/** default repeat count */ +#define DEF_REPEAT_COUNT 6 + +/** default rssi low threshold */ +#define DEFAULT_RSSI_LOW_THRESHOLD 70 +/** RSSI HYSTERSIS */ +#define RSSI_HYSTERESIS 6 +/** lowest rssi threshold */ +#define LOWEST_RSSI_THRESHOLD 82 +/** delta rssi */ +#define DELTA_RSSI 10 + +/** NL80211 scan configuration header */ +#define NL80211_SCANCFG_HEADER "SCAN-CFG " +/** NL80211 scan configuration header length */ +#define NL80211_SCANCFG_HEADER_SIZE 9 +/** NL80211 scan configuration active scan section */ +#define NL80211_SCANCFG_ACTV_DWELL_SECTION 'A' +/** NL80211 scan configuration passive scan section */ +#define NL80211_SCANCFG_PASV_DWELL_SECTION 'P' +/** NL80211 scan configuration specific scan section */ +#define NL80211_SCANCFG_SPCF_DWELL_SECTION 'S' + +/** band AUTO */ +#define WIFI_FREQUENCY_BAND_AUTO 0 +/** band 5G */ +#define WIFI_FREQUENCY_BAND_5GHZ 1 +/** band 2G */ +#define WIFI_FREQUENCY_BAND_2GHZ 2 +/** All band */ +#define WIFI_FREQUENCY_ALL_BAND 3 + +/** Rx filter: IPV4 multicast */ +#define RX_FILTER_IPV4_MULTICAST 1 +/** Rx filter: broadcast */ +#define RX_FILTER_BROADCAST 2 +/** Rx filter: unicast */ +#define RX_FILTER_UNICAST 4 +/** Rx filter: IPV6 multicast */ +#define RX_FILTER_IPV6_MULTICAST 8 + +/** Convert ASCII string to hex value */ +int woal_ascii2hex(t_u8 *d, char *s, t_u32 dlen); +/** parse ie */ +const t_u8 *woal_parse_ie_tlv(const t_u8 *ie, int len, t_u8 id); +/** Convert mac address from string to t_u8 buffer */ +void woal_mac2u8(t_u8 *mac_addr, char *buf); +/** Extract token from string */ +char *woal_strsep(char **s, char delim, char esc); +/** Return int value of a given ASCII string */ +mlan_status woal_atoi(int *data, char *a); +/** Return hex value of a given ASCII string */ +int woal_atox(char *a); +/** Allocate buffer */ +pmlan_buffer woal_alloc_mlan_buffer(moal_handle *handle, int size); +/** Allocate IOCTL request buffer */ +pmlan_ioctl_req woal_alloc_mlan_ioctl_req(int size); +/** Free buffer */ +void woal_free_mlan_buffer(moal_handle *handle, pmlan_buffer pmbuf); +/** Get private structure of a BSS by index */ +moal_private *woal_bss_index_to_priv(moal_handle *handle, t_u8 bss_index); +/* Functions in interface module */ +/** Add card */ +moal_handle *woal_add_card(void *card); +/** Remove card */ +mlan_status woal_remove_card(void *card); +/** broadcast event */ +mlan_status woal_broadcast_event(moal_private *priv, t_u8 *payload, t_u32 len); +#ifdef CONFIG_PROC_FS +/** switch driver mode */ +mlan_status woal_switch_drv_mode(moal_handle *handle, t_u32 mode); +#endif + +/** Interrupt handler */ +void woal_interrupt(moal_handle *handle); + +/** check if any interface is up */ +t_u8 woal_is_any_interface_active(moal_handle *handle); +/** Get version */ +void woal_get_version(moal_handle *handle, char *version, int maxlen); +/** Get Driver Version */ +int woal_get_driver_version(moal_private *priv, struct ifreq *req); +/** Get extended driver version */ +int woal_get_driver_verext(moal_private *priv, struct ifreq *ireq); +/** check driver status */ +t_u8 woal_check_driver_status(moal_handle *handle); +/** Mgmt frame forward registration */ +int woal_reg_rx_mgmt_ind(moal_private *priv, t_u16 action, + t_u32 *pmgmt_subtype_mask, t_u8 wait_option); +#ifdef DEBUG_LEVEL1 +/** Set driver debug bit masks */ +int woal_set_drvdbg(moal_private *priv, t_u32 drvdbg); +#endif +mlan_status woal_set_get_tx_bf_cap(moal_private *priv, t_u16 action, + t_u32 *tx_bf_cap); +/** Set/Get TX beamforming configurations */ +mlan_status woal_set_get_tx_bf_cfg(moal_private *priv, t_u16 action, + mlan_ds_11n_tx_bf_cfg *bf_cfg); +/** Request MAC address setting */ +mlan_status woal_request_set_mac_address(moal_private *priv); +/** Request multicast list setting */ +void woal_request_set_multicast_list(moal_private *priv, + struct net_device *dev); +/** Request IOCTL action */ +mlan_status woal_request_ioctl(moal_private *priv, mlan_ioctl_req *req, + t_u8 wait_option); +#ifdef CONFIG_PROC_FS +mlan_status woal_request_soft_reset(moal_handle *handle); +#endif +void woal_request_fw_reload(moal_handle *handle); + +#ifdef PROC_DEBUG +/** Get debug information */ +mlan_status woal_get_debug_info(moal_private *priv, t_u8 wait_option, + mlan_debug_info *debug_info); +/** Set debug information */ +mlan_status woal_set_debug_info(moal_private *priv, t_u8 wait_option, + mlan_debug_info *debug_info); +#endif +/** Disconnect */ +mlan_status woal_disconnect(moal_private *priv, t_u8 wait_option, t_u8 *mac); +/** associate */ +mlan_status woal_bss_start(moal_private *priv, t_u8 wait_option, + mlan_ssid_bssid *ssid_bssid); +/** Request firmware information */ +mlan_status woal_request_get_fw_info(moal_private *priv, t_u8 wait_option, + mlan_fw_info *fw_info); +/** Set/get Host Sleep parameters */ +mlan_status woal_set_get_hs_params(moal_private *priv, t_u16 action, + t_u8 wait_option, mlan_ds_hs_cfg *hscfg); +/** Cancel Host Sleep configuration */ +mlan_status woal_cancel_hs(moal_private *priv, t_u8 wait_option); +#if defined(SDIO_SUSPEND_RESUME) +/** Enable Host Sleep configuration */ +int woal_enable_hs(moal_private *priv); +/** hs active timeout 2 second */ +#define HS_ACTIVE_TIMEOUT (2 * HZ) +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0) +void woal_create_dump_dir(moal_handle *phandle, char *dir_buf, int buf_size); +#endif +mlan_status woal_save_dump_info_to_file(char *dir_name, char *file_name, + t_u8 *buf, t_u32 buf_len); +void woal_dump_drv_info(moal_handle *phandle, t_u8 *dir_name); + +void woal_dump_firmware_info(moal_handle *phandle); +void woal_dump_firmware_info_v2(moal_handle *phandle); +/* Store the FW dumps received from events in a file */ +void woal_store_firmware_dump(moal_private *priv, mlan_event *pmevent); + +/** get deep sleep */ +int woal_get_deep_sleep(moal_private *priv, t_u32 *data); +/** set deep sleep */ +int woal_set_deep_sleep(moal_private *priv, t_u8 wait_option, + BOOLEAN bdeep_sleep, t_u16 idletime); +/** process hang */ +void woal_process_hang(moal_handle *handle); +/** Get BSS information */ +mlan_status woal_get_bss_info(moal_private *priv, t_u8 wait_option, + mlan_bss_info *bss_info); +void woal_process_ioctl_resp(moal_private *priv, mlan_ioctl_req *req); +#ifdef STA_SUPPORT +void woal_send_disconnect_to_system(moal_private *priv); +void woal_send_mic_error_event(moal_private *priv, t_u32 event); +void woal_ioctl_get_bss_resp(moal_private *priv, mlan_ds_bss *bss); +void woal_ioctl_get_info_resp(moal_private *priv, mlan_ds_get_info *info); +mlan_status woal_get_assoc_rsp(moal_private *priv, + mlan_ds_misc_assoc_rsp *assoc_rsp); +/** Get signal information */ +mlan_status woal_get_signal_info(moal_private *priv, t_u8 wait_option, + mlan_ds_get_signal *signal); +/** Get mode */ +t_u32 woal_get_mode(moal_private *priv, t_u8 wait_option); +char *region_code_2_string(t_u8 region_code); +t_u8 woal_is_valid_alpha2(char *alpha2); +/** Get statistics information */ +mlan_status woal_get_stats_info(moal_private *priv, t_u8 wait_option, + mlan_ds_get_stats *stats); +#ifdef STA_WEXT +/** Get data rates */ +mlan_status woal_get_data_rates(moal_private *priv, t_u8 wait_option, + moal_802_11_rates *m_rates); +void woal_send_iwevcustom_event(moal_private *priv, char *str); +/** Get channel list */ +mlan_status woal_get_channel_list(moal_private *priv, t_u8 wait_option, + mlan_chan_list *chanlist); +mlan_status woal_11d_check_ap_channel(moal_private *priv, t_u8 wait_option, + mlan_ssid_bssid *ssid_bssid); +#endif +/** Set/Get retry count */ +mlan_status woal_set_get_retry(moal_private *priv, t_u32 action, + t_u8 wait_option, int *value); +/** Set/Get RTS threshold */ +mlan_status woal_set_get_rts(moal_private *priv, t_u32 action, t_u8 wait_option, + int *value); +/** Set/Get fragment threshold */ +mlan_status woal_set_get_frag(moal_private *priv, t_u32 action, + t_u8 wait_option, int *value); +/** Set/Get generic element */ +mlan_status woal_set_get_gen_ie(moal_private *priv, t_u32 action, t_u8 *ie, + int *ie_len, t_u8 wait_option); +/** Set/Get TX power */ +mlan_status woal_set_get_tx_power(moal_private *priv, t_u32 action, + mlan_power_cfg_t *pwr); +/** Set/Get power IEEE management */ +mlan_status woal_set_get_power_mgmt(moal_private *priv, t_u32 action, + int *disabled, int type, t_u8 wait_option); +/** Get data rate */ +mlan_status woal_set_get_data_rate(moal_private *priv, t_u8 action, + mlan_rate_cfg_t *datarate); +/** Request a network scan */ +mlan_status woal_request_scan(moal_private *priv, t_u8 wait_option, + mlan_802_11_ssid *req_ssid); +/** Set radio on/off */ +int woal_set_radio(moal_private *priv, t_u8 option); +/** Set region code */ +mlan_status woal_set_region_code(moal_private *priv, char *region); +/** Set authentication mode */ +mlan_status woal_set_auth_mode(moal_private *priv, t_u8 wait_option, + t_u32 auth_mode); +/** Set encryption mode */ +mlan_status woal_set_encrypt_mode(moal_private *priv, t_u8 wait_option, + t_u32 encrypt_mode); +/** Enable wep key */ +mlan_status woal_enable_wep_key(moal_private *priv, t_u8 wait_option); +/** Set WPA enable */ +mlan_status woal_set_wpa_enable(moal_private *priv, t_u8 wait_option, + t_u32 enable); + +/** cancel scan command */ +mlan_status woal_cancel_scan(moal_private *priv, t_u8 wait_option); +/** Find best network to connect */ +mlan_status woal_find_best_network(moal_private *priv, t_u8 wait_option, + mlan_ssid_bssid *ssid_bssid); +/** Set Ad-Hoc channel */ +mlan_status woal_change_adhoc_chan(moal_private *priv, int channel, + t_u8 wait_option); + +/** Get scan table */ +mlan_status woal_get_scan_table(moal_private *priv, t_u8 wait_option, + mlan_scan_resp *scanresp); +/** Get authentication mode */ +mlan_status woal_get_auth_mode(moal_private *priv, t_u8 wait_option, + t_u32 *auth_mode); +/** Get encryption mode */ +mlan_status woal_get_encrypt_mode(moal_private *priv, t_u8 wait_option, + t_u32 *encrypt_mode); +/** Get WPA state */ +mlan_status woal_get_wpa_enable(moal_private *priv, t_u8 wait_option, + t_u32 *enable); +#endif /**STA_SUPPORT */ + +mlan_status woal_set_wapi_enable(moal_private *priv, t_u8 wait_option, + t_u32 enable); + +/** Initialize priv */ +void woal_init_priv(moal_private *priv, t_u8 wait_option); +/** Reset interface(s) */ +int woal_reset_intf(moal_private *priv, t_u8 wait_option, int all_intf); +/** common ioctl for uap, station */ +int woal_custom_ie_ioctl(struct net_device *dev, struct ifreq *req); +int woal_send_host_packet(struct net_device *dev, struct ifreq *req); +/** Private command ID to pass mgmt frame */ +#define WOAL_MGMT_FRAME_TX_IOCTL (SIOCDEVPRIVATE + 12) +/** common ioctl for TDLS */ +int woal_tdls_config_ioctl(struct net_device *dev, struct ifreq *req); + +int woal_get_bss_type(struct net_device *dev, struct ifreq *req); +#if defined(STA_WEXT) || defined(UAP_WEXT) +int woal_host_command(moal_private *priv, struct iwreq *wrq); +#endif +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) +mlan_status woal_bss_role_cfg(moal_private *priv, t_u8 action, + t_u8 wait_option, t_u8 *bss_role); +#if defined(STA_CFG80211) && defined(UAP_CFG80211) +void woal_go_timer_func(void *context); +#endif +#if defined(STA_WEXT) || defined(UAP_WEXT) +int woal_set_get_bss_role(moal_private *priv, struct iwreq *wrq); +#endif +#endif +#if defined(WIFI_DIRECT_SUPPORT) || defined(UAP_SUPPORT) +/** hostcmd ioctl for uap, wifidirect */ +int woal_hostcmd_ioctl(struct net_device *dev, struct ifreq *req); +#endif + +#if defined(WIFI_DIRECT_SUPPORT) +mlan_status woal_set_remain_channel_ioctl(moal_private *priv, t_u8 wait_option, + mlan_ds_remain_chan *pchan); +mlan_status woal_wifi_direct_mode_cfg(moal_private *priv, t_u16 action, + t_u16 *mode); +mlan_status woal_p2p_config(moal_private *priv, t_u32 action, + mlan_ds_wifi_direct_config *p2p_config); +void woal_remain_timer_func(void *context); +#endif /* WIFI_DIRECT_SUPPORT */ + +#ifdef CONFIG_PROC_FS +/** Initialize proc fs */ +void woal_proc_init(moal_handle *handle); +/** Clean up proc fs */ +void woal_proc_exit(moal_handle *handle); +/** Create proc entry */ +void woal_create_proc_entry(moal_private *priv); +/** Remove proc entry */ +void woal_proc_remove(moal_private *priv); +/** string to number */ +int woal_string_to_number(char *s); +#endif + +#ifdef PROC_DEBUG +/** Create debug proc fs */ +void woal_debug_entry(moal_private *priv); +/** Remove debug proc fs */ +void woal_debug_remove(moal_private *priv); +#endif /* PROC_DEBUG */ + +/** check pm info */ +mlan_status woal_get_pm_info(moal_private *priv, mlan_ds_ps_info *pm_info); +/** get mlan debug info */ +void woal_mlan_debug_info(moal_private *priv); + +#ifdef REASSOCIATION +int woal_reassociation_thread(void *data); +void woal_reassoc_timer_func(void *context); +#endif /* REASSOCIATION */ + +t_void woal_main_work_queue(struct work_struct *work); +t_void woal_rx_work_queue(struct work_struct *work); + +int woal_hard_start_xmit(struct sk_buff *skb, struct net_device *dev); +#ifdef STA_SUPPORT +mlan_status woal_init_sta_dev(struct net_device *dev, moal_private *priv); +#endif +#ifdef UAP_SUPPORT +mlan_status woal_init_uap_dev(struct net_device *dev, moal_private *priv); +#endif +moal_private *woal_add_interface(moal_handle *handle, t_u8 bss_num, + t_u8 bss_type); +void woal_remove_interface(moal_handle *handle, t_u8 bss_index); +void woal_set_multicast_list(struct net_device *dev); +mlan_status woal_request_fw(moal_handle *handle); +int woal_11h_channel_check_ioctl(moal_private *priv, t_u8 wait_option); +void woal_cancel_cac_block(moal_private *priv); +void woal_moal_debug_info(moal_private *priv, moal_handle *handle, u8 flag); + +#ifdef STA_SUPPORT +mlan_status woal_get_powermode(moal_private *priv, int *powermode); +mlan_status woal_set_scan_type(moal_private *priv, t_u32 scan_type); +mlan_status woal_enable_ext_scan(moal_private *priv, t_u8 enable); +mlan_status woal_set_powermode(moal_private *priv, char *powermode); +int woal_find_essid(moal_private *priv, mlan_ssid_bssid *ssid_bssid, + t_u8 wait_option); +mlan_status woal_request_userscan(moal_private *priv, t_u8 wait_option, + wlan_user_scan_cfg *scan_cfg); +mlan_status woal_do_scan(moal_private *priv, wlan_user_scan_cfg *scan_cfg); +int woal_set_combo_scan(moal_private *priv, char *buf, int length); +mlan_status woal_set_scan_time(moal_private *priv, t_u16 active_scan_time, + t_u16 passive_scan_time, + t_u16 specific_scan_time); +mlan_status woal_get_band(moal_private *priv, int *band); +mlan_status woal_set_band(moal_private *priv, char *pband); +mlan_status woal_add_rxfilter(moal_private *priv, char *rxfilter); +mlan_status woal_remove_rxfilter(moal_private *priv, char *rxfilter); +mlan_status woal_priv_qos_cfg(moal_private *priv, t_u32 action, char *qos_cfg); +mlan_status woal_set_sleeppd(moal_private *priv, char *psleeppd); +int woal_set_scan_cfg(moal_private *priv, char *buf, int length); + +/* EVENT: BCN_RSSI_LOW */ +#define EVENT_BCN_RSSI_LOW 0x0001 +/* EVENT: PRE_BCN_LOST */ +#define EVENT_PRE_BCN_LOST 0x0002 +mlan_status woal_set_rssi_low_threshold(moal_private *priv, char *rssi, + t_u8 wait_option); +mlan_status woal_set_rssi_threshold(moal_private *priv, t_u32 event_id, + t_u8 wait_option); +/* EVENT: BG_SCAN_REPORT */ +#define EVENT_BG_SCAN_REPORT 0x0004 +mlan_status woal_set_bg_scan(moal_private *priv, char *buf, int length); +mlan_status woal_stop_bg_scan(moal_private *priv, t_u8 wait_option); +void woal_reconfig_bgscan(moal_handle *handle); +#ifdef STA_CFG80211 +void woal_config_bgscan_and_rssi(moal_private *priv, t_u8 set_rssi); +void woal_start_roaming(moal_private *priv); +#endif +#ifdef STA_CFG80211 +void woal_save_conn_params(moal_private *priv, + struct cfg80211_connect_params *sme); +void woal_clear_conn_params(moal_private *priv); +#endif +mlan_status woal_request_bgscan(moal_private *priv, t_u8 wait_option, + wlan_bgscan_cfg *scan_cfg); +#endif + +void woal_flush_tcp_sess_queue(moal_private *priv); +void woal_flush_tdls_list(moal_private *priv); +void wlan_scan_create_brief_table_entry(t_u8 **ppbuffer, + BSSDescriptor_t *pbss_desc); +int wlan_get_scan_table_ret_entry(BSSDescriptor_t *pbss_desc, t_u8 **ppbuffer, + int *pspace_left); +BOOLEAN woal_ssid_valid(mlan_802_11_ssid *pssid); +int woal_is_connected(moal_private *priv, mlan_ssid_bssid *ssid_bssid); +int woal_priv_hostcmd(moal_private *priv, t_u8 *respbuf, t_u32 respbuflen, + t_u8 wait_option); +void woal_tcp_ack_tx_indication(moal_private *priv, mlan_buffer *pmbuf); + +void woal_flush_tx_stat_queue(moal_private *priv); +struct tx_status_info *woal_get_tx_info(moal_private *priv, t_u8 tx_seq_num); +void woal_remove_tx_info(moal_private *priv, t_u8 tx_seq_num); +mlan_status woal_request_country_power_table(moal_private *priv, char *region); +mlan_status woal_mc_policy_cfg(moal_private *priv, t_u16 *enable, + t_u8 wait_option, t_u8 action); +#ifdef RX_PACKET_COALESCE +mlan_status woal_rx_pkt_coalesce_cfg(moal_private *priv, t_u16 *enable, + t_u8 wait_option, t_u8 action); +#endif +mlan_status woal_set_low_pwr_mode(moal_handle *handle, t_u8 wait_option); +mlan_status woal_set_user_antcfg(moal_handle *handle, t_u8 wait_option); +void woal_hist_data_reset(moal_private *priv); +void woal_hist_do_reset(void *data); +void woal_hist_reset_table(moal_private *priv,t_u8 antenna); +void woal_hist_data_add(moal_private *priv, t_u8 rx_rate, t_s8 snr, t_s8 nflr, + t_u8 antenna); +mlan_status woal_set_hotspotcfg(moal_private *priv, t_u8 wait_option, + t_u32 hotspotcfg); +#endif /* _MOAL_MAIN_H */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_priv.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_priv.c new file mode 100644 index 00000000..ceeeacac --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_priv.c @@ -0,0 +1,7046 @@ +/** @file moal_priv.c + * + * @brief This file contains standard ioctl functions + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/************************************************************************ +Change log: + 10/30/2008: initial version +************************************************************************/ + +#include "moal_main.h" +#include "moal_sdio.h" + +#include "moal_eth_ioctl.h" + +/******************************************************** + Local Variables +********************************************************/ +/** Bands supported in Infra mode */ +static t_u8 SupportedInfraBand[] = { + BAND_B, + BAND_B | BAND_G, BAND_G, + BAND_GN, BAND_B | BAND_G | BAND_GN, BAND_G | BAND_GN, + BAND_A, BAND_B | BAND_A, BAND_B | BAND_G | BAND_A, BAND_G | BAND_A, + BAND_A | BAND_B | BAND_G | BAND_AN | BAND_GN, + BAND_A | BAND_G | BAND_AN | BAND_GN, BAND_A | BAND_AN, + BAND_GN | BAND_GAC, BAND_B | BAND_G | BAND_GN | BAND_GAC, + BAND_G | BAND_GN | BAND_GAC, + BAND_A | BAND_B | BAND_G | BAND_AN | BAND_GN | BAND_AAC, + BAND_A | BAND_G | BAND_AN | BAND_GN | BAND_AAC, + BAND_A | BAND_AN | BAND_AAC, +}; + +/** Bands supported in Ad-Hoc mode */ +static t_u8 SupportedAdhocBand[] = { + BAND_B, BAND_B | BAND_G, BAND_G, + BAND_GN, BAND_B | BAND_G | BAND_GN, BAND_G | BAND_GN, + BAND_GN | BAND_GAC, BAND_B | BAND_G | BAND_GN | BAND_GAC, + BAND_G | BAND_GN | BAND_GAC, + BAND_A, + BAND_AN, BAND_A | BAND_AN, + BAND_AN | BAND_AAC, BAND_A | BAND_AN | BAND_AAC, +}; + +/******************************************************** + Global Variables +********************************************************/ + +extern int cfg80211_wext; + +/******************************************************** + Local Functions +********************************************************/ + +/** + * @brief Associated to a specific indexed entry in the ScanTable + * + * @param priv A pointer to moal_private structure + * @param req A pointer to ifreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_associate_ssid_bssid(moal_private *priv, struct iwreq *wrq) +{ + mlan_ssid_bssid ssid_bssid; +#ifdef REASSOCIATION + mlan_bss_info bss_info; +#endif + char buf[64]; + t_u8 buflen; + t_u8 mac_idx; + t_u8 i; + + ENTER(); + + memset(&ssid_bssid, 0, sizeof(ssid_bssid)); + mac_idx = 0; + buflen = MIN(wrq->u.data.length, (sizeof(buf) - 1)); + memset(buf, 0, sizeof(buf)); + + if (buflen < (3 * ETH_ALEN) + 2) { + PRINTM(MERROR, + "Associate: Insufficient length in IOCTL input\n"); + + /* buffer should be at least 3 characters per BSSID octet "00:" + ** plus a space separater and at least 1 char in the SSID */ + LEAVE(); + return -EINVAL; + } + + if (copy_from_user(buf, wrq->u.data.pointer, buflen) != 0) { + /* copy_from_user failed */ + PRINTM(MERROR, "Associate: copy from user failed\n"); + LEAVE(); + return -EINVAL; + } + + for (i = 0; (i < buflen) && (buf[i] == ' '); i++) { + /* Skip white space */ + } + + /* Copy/Convert the BSSID */ + for (; (i < buflen) && (mac_idx < ETH_ALEN) && (buf[i] != ' '); i++) { + if (buf[i] == ':') { + mac_idx++; + } else { + if (mac_idx < ETH_ALEN) + ssid_bssid.bssid[mac_idx] = + (t_u8)woal_atox(buf + i); + + while ((i < buflen) && (isxdigit(buf[i + 1]))) { + /* Skip entire hex value */ + i++; + } + } + } + + /* Skip one space between the BSSID and start of the SSID */ + i++; + + /* Copy the SSID */ + ssid_bssid.ssid.ssid_len = buflen - i - 1; + memcpy(ssid_bssid.ssid.ssid, buf + i, sizeof(ssid_bssid.ssid.ssid)); + + PRINTM(MCMND, "iwpriv assoc: AP=[" MACSTR "], ssid(%d)=[%s]\n", + MAC2STR(ssid_bssid.bssid), + (int)ssid_bssid.ssid.ssid_len, ssid_bssid.ssid.ssid); + + if (MLAN_STATUS_SUCCESS != woal_bss_start(priv, + MOAL_IOCTL_WAIT, + &ssid_bssid)) { + LEAVE(); + return -EFAULT; + } +#ifdef REASSOCIATION + memset(&bss_info, 0x00, sizeof(bss_info)); + if (MLAN_STATUS_SUCCESS == woal_get_bss_info(priv, + MOAL_IOCTL_WAIT, + &bss_info)) { + memcpy(&priv->prev_ssid_bssid.ssid, + &bss_info.ssid, sizeof(mlan_802_11_ssid)); + memcpy(&priv->prev_ssid_bssid.bssid, + &bss_info.bssid, MLAN_MAC_ADDR_LENGTH); + } +#endif /* REASSOCIATION */ + + LEAVE(); + return 0; +} + +/** + * @brief Copy Rates + * + * @param dest A pointer to destination buffer + * @param pos The position for copy + * @param src A pointer to source buffer + * @param len Length of the source buffer + * + * @return Number of rates copied + */ +static inline int +woal_copy_rates(t_u8 *dest, int pos, t_u8 *src, int len) +{ + int i; + + for (i = 0; i < len && src[i]; i++, pos++) { + if (pos >= MLAN_SUPPORTED_RATES) + break; + dest[pos] = src[i]; + } + return pos; +} + +/** + * @brief Performs warm reset + * + * @param priv A pointer to moal_private structure + * + * @return 0/MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static int +woal_warm_reset(moal_private *priv) +{ + int ret = 0; + int intf_num; + moal_handle *handle = priv->phandle; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *misc = NULL; +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) +#if defined(STA_WEXT) || defined(UAP_WEXT) + t_u8 bss_role = MLAN_BSS_ROLE_STA; +#endif +#endif +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + woal_cancel_cac_block(priv); + + /* Reset all interfaces */ + ret = woal_reset_intf(priv, MOAL_IOCTL_WAIT, MTRUE); + + /* Initialize private structures */ + for (intf_num = 0; intf_num < handle->priv_num; intf_num++) { + woal_init_priv(handle->priv[intf_num], MOAL_IOCTL_WAIT); +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) +#if defined(STA_WEXT) || defined(UAP_WEXT) + if ((handle->priv[intf_num]->bss_type == + MLAN_BSS_TYPE_WIFIDIRECT) && + (GET_BSS_ROLE(handle->priv[intf_num]) == + MLAN_BSS_ROLE_UAP)) { + if (MLAN_STATUS_SUCCESS != + woal_bss_role_cfg(handle->priv[intf_num], + MLAN_ACT_SET, MOAL_IOCTL_WAIT, + &bss_role)) { + ret = -EFAULT; + goto done; + } + } +#endif /* STA_WEXT || UAP_WEXT */ +#endif /* STA_SUPPORT && UAP_SUPPORT */ +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ + } + + /* Restart the firmware */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req) { + misc = (mlan_ds_misc_cfg *)req->pbuf; + misc->sub_command = MLAN_OID_MISC_WARM_RESET; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = MLAN_ACT_SET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + if (status != MLAN_STATUS_PENDING) + kfree(req); + goto done; + } + kfree(req); + } + + /* Enable interfaces */ + for (intf_num = 0; intf_num < handle->priv_num; intf_num++) { + netif_device_attach(handle->priv[intf_num]->netdev); + woal_start_queue(handle->priv[intf_num]->netdev); + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Get signal + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_signal(moal_private *priv, struct iwreq *wrq) +{ +/** Input data size */ +#define IN_DATA_SIZE 2 +/** Output data size */ +#define OUT_DATA_SIZE 12 + int ret = 0; + int in_data[IN_DATA_SIZE]; + int out_data[OUT_DATA_SIZE]; + mlan_ds_get_signal signal; + int data_length = 0; + int buflen = 0; + + ENTER(); + + memset(in_data, 0, sizeof(in_data)); + memset(out_data, 0, sizeof(out_data)); + buflen = MIN(wrq->u.data.length, IN_DATA_SIZE); + + if (priv->media_connected == MFALSE) { + PRINTM(MERROR, "Can not get RSSI in disconnected state\n"); + ret = -ENOTSUPP; + goto done; + } + + if (wrq->u.data.length) { + if (sizeof(int) * wrq->u.data.length > sizeof(in_data)) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + if (copy_from_user + (in_data, wrq->u.data.pointer, sizeof(int) * buflen)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + } + + switch (wrq->u.data.length) { + case 0: /* No checking, get everything */ + break; + case 2: /* Check subtype range */ + if (in_data[1] < 1 || in_data[1] > 4) { + ret = -EINVAL; + goto done; + } + /* Fall through */ + case 1: /* Check type range */ + if (in_data[0] < 1 || in_data[0] > 3) { + ret = -EINVAL; + goto done; + } + break; + default: + ret = -EINVAL; + goto done; + } + + memset(&signal, 0, sizeof(mlan_ds_get_signal)); + if (MLAN_STATUS_SUCCESS != + woal_get_signal_info(priv, MOAL_IOCTL_WAIT, &signal)) { + ret = -EFAULT; + goto done; + } + PRINTM(MINFO, "RSSI Beacon Last : %d\n", (int)signal.bcn_rssi_last); + PRINTM(MINFO, "RSSI Beacon Average: %d\n", (int)signal.bcn_rssi_avg); + PRINTM(MINFO, "RSSI Data Last : %d\n", (int)signal.data_rssi_last); + PRINTM(MINFO, "RSSI Data Average : %d\n", (int)signal.data_rssi_avg); + PRINTM(MINFO, "SNR Beacon Last : %d\n", (int)signal.bcn_snr_last); + PRINTM(MINFO, "SNR Beacon Average : %d\n", (int)signal.bcn_snr_avg); + PRINTM(MINFO, "SNR Data Last : %d\n", (int)signal.data_snr_last); + PRINTM(MINFO, "SNR Data Average : %d\n", (int)signal.data_snr_avg); + PRINTM(MINFO, "NF Beacon Last : %d\n", (int)signal.bcn_nf_last); + PRINTM(MINFO, "NF Beacon Average : %d\n", (int)signal.bcn_nf_avg); + PRINTM(MINFO, "NF Data Last : %d\n", (int)signal.data_nf_last); + PRINTM(MINFO, "NF Data Average : %d\n", (int)signal.data_nf_avg); + + /* Check type */ + switch (in_data[0]) { + case 0: /* Send everything */ + out_data[data_length++] = signal.bcn_rssi_last; + out_data[data_length++] = signal.bcn_rssi_avg; + out_data[data_length++] = signal.data_rssi_last; + out_data[data_length++] = signal.data_rssi_avg; + out_data[data_length++] = signal.bcn_snr_last; + out_data[data_length++] = signal.bcn_snr_avg; + out_data[data_length++] = signal.data_snr_last; + out_data[data_length++] = signal.data_snr_avg; + out_data[data_length++] = signal.bcn_nf_last; + out_data[data_length++] = signal.bcn_nf_avg; + out_data[data_length++] = signal.data_nf_last; + out_data[data_length++] = signal.data_nf_avg; + break; + case 1: /* RSSI */ + /* Check subtype */ + switch (in_data[1]) { + case 0: /* Everything */ + out_data[data_length++] = signal.bcn_rssi_last; + out_data[data_length++] = signal.bcn_rssi_avg; + out_data[data_length++] = signal.data_rssi_last; + out_data[data_length++] = signal.data_rssi_avg; + break; + case 1: /* bcn last */ + out_data[data_length++] = signal.bcn_rssi_last; + break; + case 2: /* bcn avg */ + out_data[data_length++] = signal.bcn_rssi_avg; + break; + case 3: /* data last */ + out_data[data_length++] = signal.data_rssi_last; + break; + case 4: /* data avg */ + out_data[data_length++] = signal.data_rssi_avg; + break; + default: + break; + } + break; + case 2: /* SNR */ + /* Check subtype */ + switch (in_data[1]) { + case 0: /* Everything */ + out_data[data_length++] = signal.bcn_snr_last; + out_data[data_length++] = signal.bcn_snr_avg; + out_data[data_length++] = signal.data_snr_last; + out_data[data_length++] = signal.data_snr_avg; + break; + case 1: /* bcn last */ + out_data[data_length++] = signal.bcn_snr_last; + break; + case 2: /* bcn avg */ + out_data[data_length++] = signal.bcn_snr_avg; + break; + case 3: /* data last */ + out_data[data_length++] = signal.data_snr_last; + break; + case 4: /* data avg */ + out_data[data_length++] = signal.data_snr_avg; + break; + default: + break; + } + break; + case 3: /* NF */ + /* Check subtype */ + switch (in_data[1]) { + case 0: /* Everything */ + out_data[data_length++] = signal.bcn_nf_last; + out_data[data_length++] = signal.bcn_nf_avg; + out_data[data_length++] = signal.data_nf_last; + out_data[data_length++] = signal.data_nf_avg; + break; + case 1: /* bcn last */ + out_data[data_length++] = signal.bcn_nf_last; + break; + case 2: /* bcn avg */ + out_data[data_length++] = signal.bcn_nf_avg; + break; + case 3: /* data last */ + out_data[data_length++] = signal.data_nf_last; + break; + case 4: /* data avg */ + out_data[data_length++] = signal.data_nf_avg; + break; + default: + break; + } + break; + default: + break; + } + + wrq->u.data.length = data_length; + if (copy_to_user(wrq->u.data.pointer, out_data, + wrq->u.data.length * sizeof(out_data[0]))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } +done: + LEAVE(); + return ret; +} + +/** + * @brief Get/Set DeepSleep mode + * + * @param priv Pointer to the moal_private driver data struct + * @param wreq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_deep_sleep_ioctl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + int user_data_len; + t_u32 deep_sleep = DEEP_SLEEP_OFF; + t_u32 data[2]; + int copy_len; + t_u16 idletime = DEEP_SLEEP_IDLE_TIME; + + ENTER(); + + user_data_len = wrq->u.data.length; + copy_len = MIN(sizeof(data), sizeof(int) * user_data_len); + if (user_data_len == 1 || user_data_len == 2) { + if (copy_from_user(&data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + LEAVE(); + return -EFAULT; + } + deep_sleep = data[0]; + if (deep_sleep == DEEP_SLEEP_OFF) { + PRINTM(MINFO, "Exit Deep Sleep Mode\n"); + ret = woal_set_deep_sleep(priv, MOAL_IOCTL_WAIT, MFALSE, + 0); + if (ret != MLAN_STATUS_SUCCESS) { + LEAVE(); + return -EINVAL; + } + } else if (deep_sleep == DEEP_SLEEP_ON) { + PRINTM(MINFO, "Enter Deep Sleep Mode\n"); + if (user_data_len == 2) + idletime = data[1]; + else + idletime = 0; + ret = woal_set_deep_sleep(priv, MOAL_IOCTL_WAIT, MTRUE, + idletime); + if (ret != MLAN_STATUS_SUCCESS) { + LEAVE(); + return -EINVAL; + } + } else { + PRINTM(MERROR, "Unknown option = %u\n", deep_sleep); + LEAVE(); + return -EINVAL; + } + } else if (user_data_len > 2) { + PRINTM(MERROR, "Invalid number of arguments %d\n", + user_data_len); + LEAVE(); + return -EINVAL; + } else { /* Display Deep Sleep settings */ + PRINTM(MINFO, "Get Deep Sleep Mode\n"); + if (MLAN_STATUS_SUCCESS != woal_get_deep_sleep(priv, data)) { + LEAVE(); + return -EFAULT; + } + if (data[0] == 0) + wrq->u.data.length = 1; + else + wrq->u.data.length = 2; + } + + /* Copy the Deep Sleep setting to user */ + if (copy_to_user + (wrq->u.data.pointer, data, wrq->u.data.length * sizeof(int))) { + PRINTM(MERROR, "Copy to user failed\n"); + LEAVE(); + return -EINVAL; + } + + LEAVE(); + return 0; +} + +/** + * @brief Set/Get Usr 11n configuration request + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_11n_htcap_cfg(moal_private *priv, struct iwreq *wrq) +{ + int data[2], copy_len; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + int ret = 0; + int data_length = wrq->u.data.length; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (data_length > 2) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_HTCAP_CFG; + req->req_id = MLAN_IOCTL_11N_CFG; + + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + if (data_length == 0) { + /* Get 11n tx parameters from MLAN */ + req->action = MLAN_ACT_GET; + cfg_11n->param.htcap_cfg.misc_cfg = BAND_SELECT_BG; + } else { + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + cfg_11n->param.htcap_cfg.htcap = data[0]; + PRINTM(MINFO, "SET: htcapinfo:0x%x\n", data[0]); + cfg_11n->param.htcap_cfg.misc_cfg = BAND_SELECT_BOTH; + if (data_length == 2) { + if (data[1] != BAND_SELECT_BG && + data[1] != BAND_SELECT_A && + data[1] != BAND_SELECT_BOTH) { + PRINTM(MERROR, "Invalid band selection\n"); + ret = -EINVAL; + goto done; + } + cfg_11n->param.htcap_cfg.misc_cfg = data[1]; + PRINTM(MINFO, "SET: htcapinfo band:0x%x\n", data[1]); + } + /* Update 11n tx parameters in MLAN */ + req->action = MLAN_ACT_SET; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + data[0] = cfg_11n->param.htcap_cfg.htcap; + + if (req->action == MLAN_ACT_GET) { + data_length = 1; + cfg_11n->param.htcap_cfg.htcap = 0; + cfg_11n->param.htcap_cfg.misc_cfg = BAND_SELECT_A; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (cfg_11n->param.htcap_cfg.htcap != data[0]) { + data_length = 2; + data[1] = cfg_11n->param.htcap_cfg.htcap; + PRINTM(MINFO, "GET: htcapinfo for 2.4GHz:0x%x\n", + data[0]); + PRINTM(MINFO, "GET: htcapinfo for 5GHz:0x%x\n", + data[1]); + } else + PRINTM(MINFO, "GET: htcapinfo:0x%x\n", data[0]); + } + + if (copy_to_user(wrq->u.data.pointer, data, sizeof(data))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + + wrq->u.data.length = data_length; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Enable/Disable amsdu_aggr_ctrl + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_11n_amsdu_aggr_ctrl(moal_private *priv, struct iwreq *wrq) +{ + int data[2], copy_len; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + int ret = 0; + int data_length = wrq->u.data.length; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if ((data_length != 0) && (data_length != 1)) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_AMSDU_AGGR_CTRL; + req->req_id = MLAN_IOCTL_11N_CFG; + + if (data_length == 0) { + /* Get 11n tx parameters from MLAN */ + req->action = MLAN_ACT_GET; + } else if (data_length == 1) { + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + cfg_11n->param.amsdu_aggr_ctrl.enable = data[0]; + /* Update 11n tx parameters in MLAN */ + req->action = MLAN_ACT_SET; + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + data[0] = cfg_11n->param.amsdu_aggr_ctrl.enable; + data[1] = cfg_11n->param.amsdu_aggr_ctrl.curr_buf_size; + + if (copy_to_user(wrq->u.data.pointer, data, sizeof(data))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 2; +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get 11n configuration request + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_11n_tx_cfg(moal_private *priv, struct iwreq *wrq) +{ + int data[2], copy_len; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + int ret = 0; + int data_length = wrq->u.data.length; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (data_length > 2) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_TX; + req->req_id = MLAN_IOCTL_11N_CFG; + + if (data_length == 0) { + /* Get 11n tx parameters from MLAN */ + req->action = MLAN_ACT_GET; + cfg_11n->param.tx_cfg.misc_cfg = BAND_SELECT_BG; + } else { + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + cfg_11n->param.tx_cfg.httxcap = data[0]; + PRINTM(MINFO, "SET: httxcap:0x%x\n", data[0]); + cfg_11n->param.tx_cfg.misc_cfg = BAND_SELECT_BOTH; + if (data_length == 2) { + if (data[1] != BAND_SELECT_BG && + data[1] != BAND_SELECT_A && + data[1] != BAND_SELECT_BOTH) { + PRINTM(MERROR, "Invalid band selection\n"); + ret = -EINVAL; + goto done; + } + cfg_11n->param.tx_cfg.misc_cfg = data[1]; + PRINTM(MINFO, "SET: httxcap band:0x%x\n", data[1]); + } + /* Update 11n tx parameters in MLAN */ + req->action = MLAN_ACT_SET; + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + data[0] = cfg_11n->param.tx_cfg.httxcap; + + if (req->action == MLAN_ACT_GET) { + data_length = 1; + cfg_11n->param.tx_cfg.httxcap = 0; + cfg_11n->param.tx_cfg.misc_cfg = BAND_SELECT_A; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (cfg_11n->param.tx_cfg.httxcap != data[0]) { + data_length = 2; + data[1] = cfg_11n->param.tx_cfg.httxcap; + PRINTM(MINFO, "GET: httxcap for 2.4GHz:0x%x\n", + data[0]); + PRINTM(MINFO, "GET: httxcap for 5GHz:0x%x\n", data[1]); + } else + PRINTM(MINFO, "GET: httxcap:0x%x\n", data[0]); + } + + if (copy_to_user(wrq->u.data.pointer, data, sizeof(data))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = data_length; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Enable/Disable TX Aggregation + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_11n_prio_tbl(moal_private *priv, struct iwreq *wrq) +{ + int data[MAX_NUM_TID * 2], i, j, copy_len; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + int ret = 0; + int data_length = wrq->u.data.length; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if ((wrq->u.data.pointer == NULL)) { + LEAVE(); + return -EINVAL; + } + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + LEAVE(); + return -ENOMEM; + } + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_AGGR_PRIO_TBL; + req->req_id = MLAN_IOCTL_11N_CFG; + + if (data_length == 0) { + /* Get aggr priority table from MLAN */ + req->action = MLAN_ACT_GET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto error; + } + wrq->u.data.length = MAX_NUM_TID * 2; + for (i = 0, j = 0; i < (wrq->u.data.length); i = i + 2, ++j) { + data[i] = cfg_11n->param.aggr_prio_tbl.ampdu[j]; + data[i + 1] = cfg_11n->param.aggr_prio_tbl.amsdu[j]; + } + + if (copy_to_user(wrq->u.data.pointer, data, + sizeof(int) * wrq->u.data.length)) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto error; + } + } else if (data_length == 16) { + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto error; + } + for (i = 0, j = 0; i < (data_length); i = i + 2, ++j) { + if ((data[i] > 7 && data[i] != 0xff) || + (data[i + 1] > 7 && data[i + 1] != 0xff)) { + PRINTM(MERROR, + "Invalid priority, valid value 0-7 or 0xff.\n"); + ret = -EFAULT; + goto error; + } + cfg_11n->param.aggr_prio_tbl.ampdu[j] = data[i]; + cfg_11n->param.aggr_prio_tbl.amsdu[j] = data[i + 1]; + } + + /* Update aggr priority table in MLAN */ + req->action = MLAN_ACT_SET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto error; + } + } else { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto error; + } + +error: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get add BA Reject parameters + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_addba_reject(moal_private *priv, struct iwreq *wrq) +{ + int data[MAX_NUM_TID], ret = 0, i, copy_len; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + int data_length = wrq->u.data.length; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + LEAVE(); + return -ENOMEM; + } + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_ADDBA_REJECT; + req->req_id = MLAN_IOCTL_11N_CFG; + + if (data_length == 0) { + PRINTM(MERROR, "Addba reject moal\n"); + /* Get aggr priority table from MLAN */ + req->action = MLAN_ACT_GET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto error; + } + + wrq->u.data.length = MAX_NUM_TID; + for (i = 0; i < (wrq->u.data.length); ++i) + data[i] = cfg_11n->param.addba_reject[i]; + + if (copy_to_user(wrq->u.data.pointer, data, + sizeof(int) * wrq->u.data.length)) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto error; + } + } else if (data_length == 8) { + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto error; + } + for (i = 0; i < (data_length); ++i) { + if (data[i] != 0 && data[i] != 1) { + PRINTM(MERROR, + "addba reject only takes argument as 0 or 1\n"); + ret = -EFAULT; + goto error; + } + cfg_11n->param.addba_reject[i] = data[i]; + } + + /* Update aggr priority table in MLAN */ + req->action = MLAN_ACT_SET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto error; + } + } else { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto error; + } +error: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get add BA parameters + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_addba_para_updt(moal_private *priv, struct iwreq *wrq) +{ + int data[5], ret = 0, copy_len; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + int data_length = wrq->u.data.length; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + LEAVE(); + return -ENOMEM; + } + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_ADDBA_PARAM; + req->req_id = MLAN_IOCTL_11N_CFG; + + if (data_length == 0) { + /* Get Add BA parameters from MLAN */ + req->action = MLAN_ACT_GET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto error; + } + data[0] = cfg_11n->param.addba_param.timeout; + data[1] = cfg_11n->param.addba_param.txwinsize; + data[2] = cfg_11n->param.addba_param.rxwinsize; + data[3] = cfg_11n->param.addba_param.txamsdu; + data[4] = cfg_11n->param.addba_param.rxamsdu; + PRINTM(MINFO, + "GET: timeout:%d txwinsize:%d rxwinsize:%d txamsdu=%d, rxamsdu=%d\n", + data[0], data[1], data[2], data[3], data[4]); + wrq->u.data.length = 5; + if (copy_to_user(wrq->u.data.pointer, data, + wrq->u.data.length * sizeof(int))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto error; + } + } else if (data_length == 5) { + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto error; + } + if (data[0] < 0 || data[0] > MLAN_DEFAULT_BLOCK_ACK_TIMEOUT) { + PRINTM(MERROR, "Incorrect addba timeout value.\n"); + ret = -EFAULT; + goto error; + } + if (data[1] <= 0 || data[1] > MLAN_AMPDU_MAX_TXWINSIZE || + data[2] <= 0 || data[2] > MLAN_AMPDU_MAX_RXWINSIZE) { + PRINTM(MERROR, "Incorrect Tx/Rx window size.\n"); + ret = -EFAULT; + goto error; + } + cfg_11n->param.addba_param.timeout = data[0]; + cfg_11n->param.addba_param.txwinsize = data[1]; + cfg_11n->param.addba_param.rxwinsize = data[2]; + if (data[3] < 0 || data[3] > 1 || data[4] < 0 || data[4] > 1) { + PRINTM(MERROR, "Incorrect Tx/Rx amsdu.\n"); + ret = -EFAULT; + goto error; + } + cfg_11n->param.addba_param.txamsdu = data[3]; + cfg_11n->param.addba_param.rxamsdu = data[4]; + PRINTM(MINFO, + "SET: timeout:%d txwinsize:%d rxwinsize:%d txamsdu=%d rxamsdu=%d\n", + data[0], data[1], data[2], data[3], data[4]); + /* Update Add BA parameters in MLAN */ + req->action = MLAN_ACT_SET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = MLAN_STATUS_FAILURE; + goto error; + } + } else { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto error; + } + +error: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Transmit buffer size + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_txbuf_cfg(moal_private *priv, struct iwreq *wrq) +{ + int buf_size; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_MAX_TX_BUF_SIZE; + req->req_id = MLAN_IOCTL_11N_CFG; + + if (wrq->u.data.length == 0) { + /* Get Tx buffer size from MLAN */ + req->action = MLAN_ACT_GET; + } else { + ret = -EINVAL; + PRINTM(MERROR, + "Don't support set Tx buffer size after driver loaded!\n"); + goto done; + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + buf_size = cfg_11n->param.tx_buf_size; + if (copy_to_user(wrq->u.data.pointer, &buf_size, sizeof(buf_size))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Host Sleep configuration + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * @param invoke_hostcmd MTRUE --invoke HostCmd, otherwise MFALSE + * + * @return 0 --success, otherwise fail + */ +static int +woal_hs_cfg(moal_private *priv, struct iwreq *wrq, BOOLEAN invoke_hostcmd) +{ + int data[3], copy_len; + int ret = 0; + mlan_ds_hs_cfg hscfg; + t_u16 action; + mlan_bss_info bss_info; + int data_length = wrq->u.data.length; + + ENTER(); + + memset(data, 0, sizeof(data)); + memset(&hscfg, 0, sizeof(mlan_ds_hs_cfg)); + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + + if (data_length == 0) { + action = MLAN_ACT_GET; + } else { + action = MLAN_ACT_SET; + if (data_length >= 1 && data_length <= 3) { + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + } else { + PRINTM(MERROR, "Invalid arguments\n"); + ret = -EINVAL; + goto done; + } + } + + /* HS config is blocked if HS is already activated */ + if (data_length && + (data[0] != HOST_SLEEP_CFG_CANCEL || invoke_hostcmd == MFALSE)) { + memset(&bss_info, 0, sizeof(bss_info)); + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + if (bss_info.is_hs_configured) { + PRINTM(MERROR, "HS already configured\n"); + ret = -EFAULT; + goto done; + } + } + + /* Do a GET first if some arguments are not provided */ + if (data_length >= 1 && data_length < 3) { + woal_set_get_hs_params(priv, MLAN_ACT_GET, MOAL_IOCTL_WAIT, + &hscfg); + } + + if (data_length) + hscfg.conditions = data[0]; + if (data_length >= 2) + hscfg.gpio = data[1]; + if (data_length == 3) + hscfg.gap = data[2]; + + if ((invoke_hostcmd == MTRUE) && (action == MLAN_ACT_SET)) { + /* Need to issue an extra IOCTL first to set up parameters */ + hscfg.is_invoke_hostcmd = MFALSE; + if (MLAN_STATUS_SUCCESS != + woal_set_get_hs_params(priv, MLAN_ACT_SET, MOAL_IOCTL_WAIT, + &hscfg)) { + ret = -EFAULT; + goto done; + } + } + hscfg.is_invoke_hostcmd = invoke_hostcmd; + if (MLAN_STATUS_SUCCESS != + woal_set_get_hs_params(priv, action, MOAL_IOCTL_WAIT, &hscfg)) { + ret = -EFAULT; + goto done; + } + + if (action == MLAN_ACT_GET) { + data[0] = hscfg.conditions; + data[1] = hscfg.gpio; + data[2] = hscfg.gap; + wrq->u.data.length = 3; + if (copy_to_user + (wrq->u.data.pointer, data, + sizeof(int) * wrq->u.data.length)) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + } +done: + LEAVE(); + return ret; +} + +/** + * @brief Set Host Sleep parameters + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_hs_setpara(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + int data_length = wrq->u.data.length; + + ENTER(); + + if (data_length >= 1 && data_length <= 3) { + ret = woal_hs_cfg(priv, wrq, MFALSE); + goto done; + } else { + PRINTM(MERROR, "Invalid arguments\n"); + ret = -EINVAL; + goto done; + } +done: + LEAVE(); + return ret; +} + +/** + * @brief Get/Set inactivity timeout extend + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_inactivity_timeout_ext(moal_private *priv, struct iwreq *wrq) +{ + int data[4], copy_len; + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_pm_cfg *pmcfg = NULL; + pmlan_ds_inactivity_to inac_to = NULL; + int data_length = wrq->u.data.length; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + memset(data, 0, sizeof(data)); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + pmcfg = (mlan_ds_pm_cfg *)req->pbuf; + inac_to = &pmcfg->param.inactivity_to; + pmcfg->sub_command = MLAN_OID_PM_CFG_INACTIVITY_TO; + req->req_id = MLAN_IOCTL_PM_CFG; + + if ((data_length != 0 && data_length != 3 && data_length != 4) || + sizeof(int) * data_length > sizeof(data)) { + PRINTM(MERROR, "Invalid number of parameters\n"); + ret = -EINVAL; + goto done; + } + + req->action = MLAN_ACT_GET; + if (data_length) { + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + req->action = MLAN_ACT_SET; + inac_to->timeout_unit = data[0]; + inac_to->unicast_timeout = data[1]; + inac_to->mcast_timeout = data[2]; + inac_to->ps_entry_timeout = data[3]; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* Copy back current values regardless of GET/SET */ + data[0] = inac_to->timeout_unit; + data[1] = inac_to->unicast_timeout; + data[2] = inac_to->mcast_timeout; + data[3] = inac_to->ps_entry_timeout; + + if (req->action == MLAN_ACT_GET) { + wrq->u.data.length = 4; + if (copy_to_user + (wrq->u.data.pointer, data, + wrq->u.data.length * sizeof(int))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get system clock + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_ecl_sys_clock(moal_private *priv, struct iwreq *wrq) +{ + int data[64], copy_len; + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *cfg = NULL; + int data_length = wrq->u.data.length; + int i = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(data, 0, sizeof(data)); + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg = (mlan_ds_misc_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_MISC_SYS_CLOCK; + req->req_id = MLAN_IOCTL_MISC_CFG; + + if (!data_length) + req->action = MLAN_ACT_GET; + else if (data_length <= MLAN_MAX_CLK_NUM) { + req->action = MLAN_ACT_SET; + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + } else { + PRINTM(MERROR, "Invalid arguments\n"); + ret = -EINVAL; + goto done; + } + + if (req->action == MLAN_ACT_GET) { + /* Get configurable clocks */ + cfg->param.sys_clock.sys_clk_type = MLAN_CLK_CONFIGURABLE; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* Current system clock */ + data[0] = (int)cfg->param.sys_clock.cur_sys_clk; + wrq->u.data.length = 1; + + data_length = + MIN(cfg->param.sys_clock.sys_clk_num, MLAN_MAX_CLK_NUM); + + /* Configurable clocks */ + for (i = 0; i < data_length; i++) { + data[i + wrq->u.data.length] = + (int)cfg->param.sys_clock.sys_clk[i]; + } + wrq->u.data.length += data_length; + + /* Get supported clocks */ + cfg->param.sys_clock.sys_clk_type = MLAN_CLK_SUPPORTED; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + data_length = + MIN(cfg->param.sys_clock.sys_clk_num, MLAN_MAX_CLK_NUM); + + /* Supported clocks */ + for (i = 0; i < data_length; i++) { + data[i + wrq->u.data.length] = + (int)cfg->param.sys_clock.sys_clk[i]; + } + + wrq->u.data.length += data_length; + + if (copy_to_user + (wrq->u.data.pointer, data, + sizeof(int) * wrq->u.data.length)) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + } else { + /* Set configurable clocks */ + cfg->param.sys_clock.sys_clk_type = MLAN_CLK_CONFIGURABLE; + cfg->param.sys_clock.sys_clk_num = + MIN(MLAN_MAX_CLK_NUM, data_length); + for (i = 0; i < cfg->param.sys_clock.sys_clk_num; i++) + cfg->param.sys_clock.sys_clk[i] = (t_u16)data[i]; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Band and Adhoc-band setting + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_band_cfg(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + unsigned int i; + int data[4]; + int user_data_len = wrq->u.data.length, copy_len; + t_u32 infra_band = 0; + t_u32 adhoc_band = 0; + t_u32 adhoc_channel = 0; + t_u32 adhoc_chan_bandwidth = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_radio_cfg *radio_cfg = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (sizeof(int) * user_data_len > sizeof(data)) { + PRINTM(MERROR, "Too many arguments\n"); + LEAVE(); + return -EINVAL; + } + + if (user_data_len > 0) { + if (priv->media_connected == MTRUE) { + LEAVE(); + return -EOPNOTSUPP; + } + } + + copy_len = MIN(sizeof(data), sizeof(int) * user_data_len); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_radio_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto error; + } + radio_cfg = (mlan_ds_radio_cfg *)req->pbuf; + radio_cfg->sub_command = MLAN_OID_BAND_CFG; + req->req_id = MLAN_IOCTL_RADIO_CFG; + + if (wrq->u.data.length == 0) { + /* Get config_bands, adhoc_start_band and adhoc_channel values + from MLAN */ + req->action = MLAN_ACT_GET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto error; + } + /* Infra Band */ + data[0] = radio_cfg->param.band_cfg.config_bands; + /* Adhoc Band */ + data[1] = radio_cfg->param.band_cfg.adhoc_start_band; + /* Adhoc Channel */ + data[2] = radio_cfg->param.band_cfg.adhoc_channel; + wrq->u.data.length = 3; + if (radio_cfg->param.band_cfg.adhoc_start_band & BAND_GN + || radio_cfg->param.band_cfg.adhoc_start_band & BAND_AN + || radio_cfg->param.band_cfg.adhoc_start_band & BAND_GAC + || radio_cfg->param.band_cfg.adhoc_start_band & BAND_AAC) { + /* secondary bandwidth */ + data[3] = + radio_cfg->param.band_cfg.adhoc_chan_bandwidth; + wrq->u.data.length = 4; + } + + if (copy_to_user + (wrq->u.data.pointer, data, + sizeof(int) * wrq->u.data.length)) { + ret = -EFAULT; + goto error; + } + } else { + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto error; + } + + /* To support only */ + infra_band = data[0]; + for (i = 0; i < sizeof(SupportedInfraBand); i++) + if (infra_band == SupportedInfraBand[i]) + break; + if (i == sizeof(SupportedInfraBand)) { + ret = -EINVAL; + goto error; + } + + /* Set Adhoc band */ + if (user_data_len >= 2) { + adhoc_band = data[1]; + for (i = 0; i < sizeof(SupportedAdhocBand); i++) + if (adhoc_band == SupportedAdhocBand[i]) + break; + if (i == sizeof(SupportedAdhocBand)) { + ret = -EINVAL; + goto error; + } + } + + /* Set Adhoc channel */ + if (user_data_len >= 3) { + adhoc_channel = data[2]; + if (adhoc_channel == 0) { + /* Check if specified adhoc channel is non-zero + */ + ret = -EINVAL; + goto error; + } + } + if (user_data_len == 4) { + if (!(adhoc_band & (BAND_GN + | BAND_GAC | BAND_AN | BAND_AAC))) { + PRINTM(MERROR, + "11n is not enabled for adhoc, can not set HT/VHT channel bandwidth\n"); + ret = -EINVAL; + goto error; + } + adhoc_chan_bandwidth = data[3]; + if ((adhoc_chan_bandwidth != CHANNEL_BW_20MHZ) && + (adhoc_chan_bandwidth != CHANNEL_BW_40MHZ_ABOVE) && + (adhoc_chan_bandwidth != CHANNEL_BW_40MHZ_BELOW) + && (adhoc_chan_bandwidth != CHANNEL_BW_80MHZ) + ) { + PRINTM(MERROR, + "Invalid secondary channel bandwidth, only allowed 0, 1, 3 or 4\n"); + ret = -EINVAL; + goto error; + } + } + /* Set config_bands and adhoc_start_band values to MLAN */ + req->action = MLAN_ACT_SET; + radio_cfg->param.band_cfg.config_bands = infra_band; + radio_cfg->param.band_cfg.adhoc_start_band = adhoc_band; + radio_cfg->param.band_cfg.adhoc_channel = adhoc_channel; + radio_cfg->param.band_cfg.adhoc_chan_bandwidth = + adhoc_chan_bandwidth; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto error; + } + } + +error: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Read/Write adapter registers value + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_reg_read_write(moal_private *priv, struct iwreq *wrq) +{ + int data[3], copy_len; + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_reg_mem *reg = NULL; + int data_length = wrq->u.data.length; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(data, 0, sizeof(data)); + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_reg_mem)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + reg = (mlan_ds_reg_mem *)req->pbuf; + reg->sub_command = MLAN_OID_REG_RW; + req->req_id = MLAN_IOCTL_REG_MEM; + + if (data_length == 2) { + req->action = MLAN_ACT_GET; + } else if (data_length == 3) { + req->action = MLAN_ACT_SET; + } else { + ret = -EINVAL; + goto done; + } + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + reg->param.reg_rw.type = (t_u32)data[0]; + reg->param.reg_rw.offset = (t_u32)data[1]; + if (data_length == 3) + reg->param.reg_rw.value = (t_u32)data[2]; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (req->action == MLAN_ACT_GET) { + if (copy_to_user + (wrq->u.data.pointer, ®->param.reg_rw.value, + sizeof(int))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Read the EEPROM contents of the card + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_read_eeprom(moal_private *priv, struct iwreq *wrq) +{ + int data[2], copy_len; + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_reg_mem *reg = NULL; + int data_length = wrq->u.data.length; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(data, 0, sizeof(data)); + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_reg_mem)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + reg = (mlan_ds_reg_mem *)req->pbuf; + reg->sub_command = MLAN_OID_EEPROM_RD; + req->req_id = MLAN_IOCTL_REG_MEM; + + if (data_length == 2) { + req->action = MLAN_ACT_GET; + } else { + ret = -EINVAL; + goto done; + } + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + reg->param.rd_eeprom.offset = (t_u16)data[0]; + reg->param.rd_eeprom.byte_count = (t_u16)data[1]; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (req->action == MLAN_ACT_GET) { + wrq->u.data.length = reg->param.rd_eeprom.byte_count; + if (copy_to_user + (wrq->u.data.pointer, reg->param.rd_eeprom.value, + MIN(wrq->u.data.length, MAX_EEPROM_DATA))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Read/Write device memory value + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_mem_read_write(moal_private *priv, struct iwreq *wrq) +{ + t_u32 data[2]; + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_reg_mem *reg_mem = NULL; + int data_length = wrq->u.data.length, copy_len; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(data, 0, sizeof(data)); + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_reg_mem)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + reg_mem = (mlan_ds_reg_mem *)req->pbuf; + reg_mem->sub_command = MLAN_OID_MEM_RW; + req->req_id = MLAN_IOCTL_REG_MEM; + + if (data_length == 1) { + PRINTM(MINFO, "MEM_RW: GET\n"); + req->action = MLAN_ACT_GET; + } else if (data_length == 2) { + PRINTM(MINFO, "MEM_RW: SET\n"); + req->action = MLAN_ACT_SET; + } else { + ret = -EINVAL; + goto done; + } + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + reg_mem->param.mem_rw.addr = (t_u32)data[0]; + if (data_length == 2) + reg_mem->param.mem_rw.value = (t_u32)data[1]; + + PRINTM(MINFO, "MEM_RW: Addr=0x%x, Value=0x%x\n", + (int)reg_mem->param.mem_rw.addr, + (int)reg_mem->param.mem_rw.value); + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (req->action == MLAN_ACT_GET) { + if (copy_to_user + (wrq->u.data.pointer, ®_mem->param.mem_rw.value, + sizeof(int))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Get LOG + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_log(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ds_get_stats stats; + char *buf = NULL; + + ENTER(); + + PRINTM(MINFO, " GET STATS\n"); + buf = kmalloc(GETLOG_BUFSIZE, GFP_KERNEL); + if (!buf) { + PRINTM(MERROR, "kmalloc failed!\n"); + ret = -ENOMEM; + goto done; + } + + memset(&stats, 0, sizeof(mlan_ds_get_stats)); + if (MLAN_STATUS_SUCCESS != + woal_get_stats_info(priv, MOAL_IOCTL_WAIT, &stats)) { + ret = -EFAULT; + goto done; + } + + if (wrq->u.data.pointer) { + sprintf(buf, "\n" + "mcasttxframe %u\n" + "failed %u\n" + "retry %u\n" + "multiretry %u\n" + "framedup %u\n" + "rtssuccess %u\n" + "rtsfailure %u\n" + "ackfailure %u\n" + "rxfrag %u\n" + "mcastrxframe %u\n" + "fcserror %u\n" + "txframe %u\n" + "wepicverrcnt-1 %u\n" + "wepicverrcnt-2 %u\n" + "wepicverrcnt-3 %u\n" + "wepicverrcnt-4 %u\n" + "beacon_rcnt %u\n" + "beacon_mcnt %u\n", + stats.mcast_tx_frame, + stats.failed, + stats.retry, + stats.multi_retry, + stats.frame_dup, + stats.rts_success, + stats.rts_failure, + stats.ack_failure, + stats.rx_frag, + stats.mcast_rx_frame, + stats.fcs_error, + stats.tx_frame, + stats.wep_icv_error[0], + stats.wep_icv_error[1], + stats.wep_icv_error[2], + stats.wep_icv_error[3], + stats.bcn_rcv_cnt, stats.bcn_miss_cnt); + wrq->u.data.length = strlen(buf) + 1; + if (copy_to_user(wrq->u.data.pointer, buf, wrq->u.data.length)) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + } + } +done: + kfree(buf); + LEAVE(); + return ret; +} + +/** + * @brief Deauthenticate + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_deauth(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + struct sockaddr saddr; + + ENTER(); + if (wrq->u.data.length) { + /* Deauth mentioned BSSID */ + if (copy_from_user(&saddr, wrq->u.data.pointer, sizeof(saddr))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if (MLAN_STATUS_SUCCESS != + woal_disconnect(priv, MOAL_IOCTL_WAIT, + (t_u8 *)saddr.sa_data)) { + ret = -EFAULT; + goto done; + } + } else { + if (MLAN_STATUS_SUCCESS != + woal_disconnect(priv, MOAL_IOCTL_WAIT, NULL)) + ret = -EFAULT; + } +done: + LEAVE(); + return ret; +} + +/** + * @brief Set/Get TX power configurations + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_tx_power_cfg(moal_private *priv, struct iwreq *wrq) +{ + int data[5], user_data_len, copy_len; + int ret = 0; + mlan_bss_info bss_info; + mlan_ds_power_cfg *pcfg = NULL; + mlan_ioctl_req *req = NULL; + int power_data[MAX_POWER_TABLE_SIZE]; + int i, power_ext_len = 0; + int *ptr = power_data; + mlan_power_group *pwr_grp = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + memset(&bss_info, 0, sizeof(bss_info)); + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + + memset(data, 0, sizeof(data)); + user_data_len = wrq->u.data.length; + copy_len = MIN(sizeof(data), sizeof(int) * user_data_len); + + if (user_data_len) { + if (sizeof(int) * user_data_len > sizeof(data)) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + switch (user_data_len) { + case 1: + if (data[0] != 0xFF) + ret = -EINVAL; + break; + case 2: + case 4: + if (data[0] == 0xFF) { + ret = -EINVAL; + break; + } + if (data[1] < bss_info.min_power_level) { + PRINTM(MERROR, + "The set powercfg rate value %d dBm is out of range (%d dBm-%d dBm)!\n", + data[1], (int)bss_info.min_power_level, + (int)bss_info.max_power_level); + ret = -EINVAL; + break; + } + if (user_data_len == 4) { + if (data[1] > data[2]) { + PRINTM(MERROR, + "Min power should be less than maximum!\n"); + ret = -EINVAL; + break; + } + if (data[3] < 0) { + PRINTM(MERROR, + "Step should not less than 0!\n"); + ret = -EINVAL; + break; + } + if (data[2] > bss_info.max_power_level) { + PRINTM(MERROR, + "The set powercfg rate value %d dBm is out of range (%d dBm-%d dBm)!\n", + data[2], + (int)bss_info.min_power_level, + (int)bss_info.max_power_level); + ret = -EINVAL; + break; + } + if (data[3] > data[2] - data[1]) { + PRINTM(MERROR, + "Step should not greater than power difference!\n"); + ret = -EINVAL; + break; + } + } + break; + default: + ret = -EINVAL; + break; + } + if (ret) + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_power_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + pcfg = (mlan_ds_power_cfg *)req->pbuf; + pcfg->sub_command = MLAN_OID_POWER_CFG_EXT; + req->req_id = MLAN_IOCTL_POWER_CFG; + if (!user_data_len) + req->action = MLAN_ACT_GET; + else { + req->action = MLAN_ACT_SET; + if (data[0] == 0xFF) + pcfg->param.power_ext.power_group[0].rate_format = + TX_PWR_CFG_AUTO_CTRL_OFF; + else { + pcfg->param.power_ext.power_group[0].power_step = 0; + pcfg->param.power_ext.power_group[0].first_rate_ind = + data[0]; + pcfg->param.power_ext.power_group[0].last_rate_ind = + data[0]; + if (data[0] <= 11) { + pcfg->param.power_ext.power_group[0]. + rate_format = MLAN_RATE_FORMAT_LG; + pcfg->param.power_ext.power_group[0].bandwidth = + MLAN_HT_BW20; + } else if (data[0] <= 27) { + pcfg->param.power_ext.power_group[0]. + rate_format = MLAN_RATE_FORMAT_HT; + pcfg->param.power_ext.power_group[0].bandwidth = + MLAN_HT_BW20; + pcfg->param.power_ext.power_group[0]. + first_rate_ind -= 12; + pcfg->param.power_ext.power_group[0]. + last_rate_ind -= 12; + } else if ((140 <= data[0]) && (data[0] <= 155)) { + pcfg->param.power_ext.power_group[0]. + rate_format = MLAN_RATE_FORMAT_HT; + pcfg->param.power_ext.power_group[0].bandwidth = + MLAN_HT_BW40; + pcfg->param.power_ext.power_group[0]. + first_rate_ind -= 140; + pcfg->param.power_ext.power_group[0]. + last_rate_ind -= 140; + } + if (user_data_len == 2) { + pcfg->param.power_ext.power_group[0].power_min = + data[1]; + pcfg->param.power_ext.power_group[0].power_max = + data[1]; + } else if (user_data_len == 4) { + pcfg->param.power_ext.power_group[0].power_min = + data[1]; + pcfg->param.power_ext.power_group[0].power_max = + data[2]; + pcfg->param.power_ext.power_group[0]. + power_step = data[3]; + } + pcfg->param.power_ext.num_pwr_grp = 1; + } + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (!user_data_len) { + /* GET operation */ + i = 0; + power_ext_len = 0; + ptr = power_data; + while ((i < pcfg->param.power_ext.num_pwr_grp) && + (power_ext_len < MAX_POWER_TABLE_SIZE)) { + pwr_grp = &pcfg->param.power_ext.power_group[i]; + if (pwr_grp->rate_format == MLAN_RATE_FORMAT_HT) { + if (pwr_grp->bandwidth == MLAN_HT_BW20){ + pwr_grp->first_rate_ind += 12; + pwr_grp->last_rate_ind += 12; + } else if (pwr_grp->bandwidth == MLAN_HT_BW40) { + pwr_grp->first_rate_ind += 140; + pwr_grp->last_rate_ind += 140; + } + } + + if ((pwr_grp->rate_format == MLAN_RATE_FORMAT_LG) || + (pwr_grp->rate_format == MLAN_RATE_FORMAT_HT)) { + *ptr = pwr_grp->first_rate_ind; + ptr++; + *ptr = pwr_grp->last_rate_ind; + ptr++; + *ptr = pwr_grp->power_min; + ptr++; + *ptr = pwr_grp->power_max; + ptr++; + *ptr = pwr_grp->power_step; + ptr++; + power_ext_len += 5; + } + i++; + } + if (copy_to_user(wrq->u.data.pointer, (t_u8 *)power_data, + sizeof(int) * power_ext_len)) { + ret = -EFAULT; + goto done; + } + wrq->u.data.length = power_ext_len; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Get Tx/Rx data rates + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_txrx_rate(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ds_rate *rate = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_rate)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + rate = (mlan_ds_rate *)req->pbuf; + rate->sub_command = MLAN_OID_GET_DATA_RATE; + req->req_id = MLAN_IOCTL_RATE; + req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (copy_to_user + (wrq->u.data.pointer, (t_u8 *)&rate->param.data_rate, + sizeof(int) * 2)) { + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 2; +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Turn on/off the sdio clock + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0/MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static int +woal_sdio_clock_ioctl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + int data = 2; + /* Initialize the clock state as on */ + static int clock_state = 1; + + ENTER(); + + if (wrq->u.data.length) { + if (copy_from_user(&data, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + } else { + wrq->u.data.length = sizeof(clock_state) / sizeof(int); + if (copy_to_user + (wrq->u.data.pointer, &clock_state, sizeof(int))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + goto done; + } + switch (data) { + case CMD_DISABLED: + PRINTM(MINFO, "SDIO clock is turned off\n"); + ret = woal_sdio_set_bus_clock(priv->phandle, MFALSE); + clock_state = data; + break; + case CMD_ENABLED: + PRINTM(MINFO, "SDIO clock is turned on\n"); + ret = woal_sdio_set_bus_clock(priv->phandle, MTRUE); + clock_state = data; + break; + default: + ret = -EINVAL; + PRINTM(MINFO, "sdioclock: wrong parameter\n"); + break; + } +done: + LEAVE(); + return ret; +} + +/** + * @brief Set/Get beacon interval + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_beacon_interval(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *req = NULL; + int bcn = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (wrq->u.data.length) { + if (copy_from_user(&bcn, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if ((bcn < MLAN_MIN_BEACON_INTERVAL) || + (bcn > MLAN_MAX_BEACON_INTERVAL)) { + ret = -EINVAL; + goto done; + } + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_IBSS_BCN_INTERVAL; + req->req_id = MLAN_IOCTL_BSS; + if (!wrq->u.data.length) + req->action = MLAN_ACT_GET; + else { + req->action = MLAN_ACT_SET; + bss->param.bcn_interval = bcn; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (copy_to_user + (wrq->u.data.pointer, (t_u8 *)&bss->param.bcn_interval, + sizeof(int))) { + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get TX data rate + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_get_txrate(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ds_rate *rate = NULL; + mlan_ioctl_req *req = NULL; + int rateindex = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + if (wrq->u.data.length) { + if (copy_from_user + (&rateindex, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_rate)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + rate = (mlan_ds_rate *)req->pbuf; + rate->param.rate_cfg.rate_type = MLAN_RATE_INDEX; + rate->sub_command = MLAN_OID_RATE_CFG; + req->req_id = MLAN_IOCTL_RATE; + if (!wrq->u.data.length) + req->action = MLAN_ACT_GET; + else { + req->action = MLAN_ACT_SET; + if (rateindex == AUTO_RATE) + rate->param.rate_cfg.is_rate_auto = 1; + else { + if ((rateindex != MLAN_RATE_INDEX_MCS32) && + ((rateindex < 0) || + (rateindex > MLAN_RATE_INDEX_MCS15))) { + ret = -EINVAL; + goto done; + } + } + rate->param.rate_cfg.rate = rateindex; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } else { + if (wrq->u.data.length) + priv->rate_index = rateindex; + } + if (!wrq->u.data.length) { + if (rate->param.rate_cfg.is_rate_auto) + rateindex = AUTO_RATE; + else + rateindex = rate->param.rate_cfg.rate; + wrq->u.data.length = 1; + if (copy_to_user(wrq->u.data.pointer, &rateindex, sizeof(int))) + ret = -EFAULT; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get region code + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_get_regioncode(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ds_misc_cfg *cfg = NULL; + mlan_ioctl_req *req = NULL; + int region = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (wrq->u.data.length) { + if (copy_from_user(®ion, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg = (mlan_ds_misc_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_MISC_REGION; + req->req_id = MLAN_IOCTL_MISC_CFG; + if (!wrq->u.data.length) + req->action = MLAN_ACT_GET; + else { + req->action = MLAN_ACT_SET; + cfg->param.region_code = region; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (!wrq->u.data.length) { + wrq->u.data.length = 1; + if (copy_to_user + (wrq->u.data.pointer, &cfg->param.region_code, sizeof(int))) + ret = -EFAULT; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get radio + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_get_radio(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_bss_info bss_info; + int option = 0; + + ENTER(); + + memset(&bss_info, 0, sizeof(bss_info)); + + if (wrq->u.data.length) { + /* Set radio */ + if (copy_from_user(&option, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if (MLAN_STATUS_SUCCESS != woal_set_radio(priv, (t_u8)option)) + ret = -EFAULT; + } else { + /* Get radio status */ + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + wrq->u.data.length = 1; + if (copy_to_user + (wrq->u.data.pointer, &bss_info.radio_on, + sizeof(bss_info.radio_on))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + } + } +done: + LEAVE(); + return ret; +} + +#ifdef DEBUG_LEVEL1 +/** + * @brief Get/Set the bit mask of driver debug message control + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to wrq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_drv_dbg(moal_private *priv, struct iwreq *wrq) +{ + int data[4], copy_len; + int ret = 0; + int data_length = wrq->u.data.length; + ENTER(); + + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + if (!data_length) { + data[0] = drvdbg; + /* Return the current driver debug bit masks */ + if (copy_to_user(wrq->u.data.pointer, data, sizeof(int))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto drvdbgexit; + } + wrq->u.data.length = 1; + } else if (data_length < 3) { + /* Get the driver debug bit masks from user */ + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto drvdbgexit; + } + drvdbg = data[0]; + /* Set the driver debug bit masks into mlan */ + woal_set_drvdbg(priv, drvdbg); + } else { + PRINTM(MERROR, "Invalid parameter number\n"); + goto drvdbgexit; + } + + printk(KERN_ALERT "drvdbg = 0x%08x\n", drvdbg); +#ifdef DEBUG_LEVEL2 + printk(KERN_ALERT "MINFO (%08x) %s\n", MINFO, + (drvdbg & MINFO) ? "X" : ""); + printk(KERN_ALERT "MWARN (%08x) %s\n", MWARN, + (drvdbg & MWARN) ? "X" : ""); + printk(KERN_ALERT "MENTRY (%08x) %s\n", MENTRY, + (drvdbg & MENTRY) ? "X" : ""); +#endif + printk(KERN_ALERT "MMPA_D (%08x) %s\n", MMPA_D, + (drvdbg & MMPA_D) ? "X" : ""); + printk(KERN_ALERT "MIF_D (%08x) %s\n", MIF_D, + (drvdbg & MIF_D) ? "X" : ""); + printk(KERN_ALERT "MFW_D (%08x) %s\n", MFW_D, + (drvdbg & MFW_D) ? "X" : ""); + printk(KERN_ALERT "MEVT_D (%08x) %s\n", MEVT_D, + (drvdbg & MEVT_D) ? "X" : ""); + printk(KERN_ALERT "MCMD_D (%08x) %s\n", MCMD_D, + (drvdbg & MCMD_D) ? "X" : ""); + printk(KERN_ALERT "MDAT_D (%08x) %s\n", MDAT_D, + (drvdbg & MDAT_D) ? "X" : ""); + printk(KERN_ALERT "MIOCTL (%08x) %s\n", MIOCTL, + (drvdbg & MIOCTL) ? "X" : ""); + printk(KERN_ALERT "MINTR (%08x) %s\n", MINTR, + (drvdbg & MINTR) ? "X" : ""); + printk(KERN_ALERT "MEVENT (%08x) %s\n", MEVENT, + (drvdbg & MEVENT) ? "X" : ""); + printk(KERN_ALERT "MCMND (%08x) %s\n", MCMND, + (drvdbg & MCMND) ? "X" : ""); + printk(KERN_ALERT "MDATA (%08x) %s\n", MDATA, + (drvdbg & MDATA) ? "X" : ""); + printk(KERN_ALERT "MERROR (%08x) %s\n", MERROR, + (drvdbg & MERROR) ? "X" : ""); + printk(KERN_ALERT "MFATAL (%08x) %s\n", MFATAL, + (drvdbg & MFATAL) ? "X" : ""); + printk(KERN_ALERT "MMSG (%08x) %s\n", MMSG, + (drvdbg & MMSG) ? "X" : ""); + +drvdbgexit: + LEAVE(); + return ret; +} +#endif /* DEBUG_LEVEL1 */ + +/** + * @brief Set/Get QoS configuration + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_get_qos_cfg(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ds_wmm_cfg *cfg = NULL; + mlan_ioctl_req *req = NULL; + int data = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wmm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + cfg = (mlan_ds_wmm_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_WMM_CFG_QOS; + req->req_id = MLAN_IOCTL_WMM_CFG; + if (wrq->u.data.length) { + if (copy_from_user(&data, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + req->action = MLAN_ACT_SET; + cfg->param.qos_cfg = (t_u8)data; + } else + req->action = MLAN_ACT_GET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (!wrq->u.data.length) { + data = (int)cfg->param.qos_cfg; + if (copy_to_user(wrq->u.data.pointer, &data, sizeof(int))) { + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get WWS mode + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_wws_cfg(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ds_misc_cfg *wws = NULL; + mlan_ioctl_req *req = NULL; + int data = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + wws = (mlan_ds_misc_cfg *)req->pbuf; + wws->sub_command = MLAN_OID_MISC_WWS; + req->req_id = MLAN_IOCTL_MISC_CFG; + if (wrq->u.data.length) { + if (copy_from_user(&data, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if (data != CMD_DISABLED && data != CMD_ENABLED) { + ret = -EINVAL; + goto done; + } + req->action = MLAN_ACT_SET; + wws->param.wws_cfg = data; + } else + req->action = MLAN_ACT_GET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (!wrq->u.data.length) { + data = wws->param.wws_cfg; + if (copy_to_user(wrq->u.data.pointer, &data, sizeof(int))) { + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get sleep period + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_sleep_pd(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ds_pm_cfg *pm_cfg = NULL; + mlan_ioctl_req *req = NULL; + int data = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + pm_cfg = (mlan_ds_pm_cfg *)req->pbuf; + pm_cfg->sub_command = MLAN_OID_PM_CFG_SLEEP_PD; + req->req_id = MLAN_IOCTL_PM_CFG; + if (wrq->u.data.length) { + if (copy_from_user(&data, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if ((data <= MAX_SLEEP_PERIOD && data >= MIN_SLEEP_PERIOD) || + (data == 0) + || (data == SLEEP_PERIOD_RESERVED_FF) + ) { + req->action = MLAN_ACT_SET; + pm_cfg->param.sleep_period = data; + } else { + ret = -EINVAL; + goto done; + } + } else + req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (!wrq->u.data.length) { + data = pm_cfg->param.sleep_period; + if (copy_to_user(wrq->u.data.pointer, &data, sizeof(int))) { + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Configure sleep parameters + * + * @param priv A pointer to moal_private structure + * @param req A pointer to ifreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_sleep_params_ioctl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_pm_cfg *pm = NULL; + mlan_ds_sleep_params *psleep_params = NULL; + int data[6] = { 0 }, i, copy_len; + int data_length = wrq->u.data.length; +#ifdef DEBUG_LEVEL1 + char err_str[][35] = { {"sleep clock error in ppm"}, + {"wakeup offset in usec"}, + {"clock stabilization time in usec"}, + {"value of reserved for debug"} + }; +#endif + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); + if (req == NULL) { + LEAVE(); + return -ENOMEM; + } + + pm = (mlan_ds_pm_cfg *)req->pbuf; + pm->sub_command = MLAN_OID_PM_CFG_SLEEP_PARAMS; + req->req_id = MLAN_IOCTL_PM_CFG; + psleep_params = (pmlan_ds_sleep_params)&pm->param.sleep_params; + + if (data_length == 0) { + req->action = MLAN_ACT_GET; + } else if (data_length == 6) { + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + /* copy_from_user failed */ + PRINTM(MERROR, "S_PARAMS: copy from user failed\n"); + LEAVE(); + return -EINVAL; + } +#define MIN_VAL 0x0000 +#define MAX_VAL 0xFFFF + for (i = 0; i < 6; i++) { + if ((i == 3) || (i == 4)) { + /* These two cases are handled below the loop */ + continue; + } + if (data[i] < MIN_VAL || data[i] > MAX_VAL) { + PRINTM(MERROR, "Invalid %s (0-65535)!\n", + err_str[i]); + ret = -EINVAL; + goto done; + } + } + if (data[3] < 0 || data[3] > 2) { + PRINTM(MERROR, + "Invalid control periodic calibration (0-2)!\n"); + ret = -EINVAL; + goto done; + } + if (data[4] < 0 || data[4] > 2) { + PRINTM(MERROR, + "Invalid control of external sleep clock (0-2)!\n"); + ret = -EINVAL; + goto done; + } + req->action = MLAN_ACT_SET; + psleep_params->error = data[0]; + psleep_params->offset = data[1]; + psleep_params->stable_time = data[2]; + psleep_params->cal_control = data[3]; + psleep_params->ext_sleep_clk = data[4]; + psleep_params->reserved = data[5]; + } else { + ret = -EINVAL; + goto done; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + data[0] = psleep_params->error; + data[1] = psleep_params->offset; + data[2] = psleep_params->stable_time; + data[3] = psleep_params->cal_control; + data[4] = psleep_params->ext_sleep_clk; + data[5] = psleep_params->reserved; + wrq->u.data.length = 6; + + if (copy_to_user(wrq->u.data.pointer, data, sizeof(int) * + wrq->u.data.length)) { + PRINTM(MERROR, "QCONFIG: copy to user failed\n"); + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Control Coalescing status Enable/Disable + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq Pointer to user data + * + * @return 0 --success, otherwise fail + */ +static int +woal_coalescing_status_ioctl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ds_misc_cfg *pcoal = NULL; + mlan_ioctl_req *req = NULL; + char buf[8]; + struct iwreq *wreq = (struct iwreq *)wrq; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + pcoal = (mlan_ds_misc_cfg *)req->pbuf; + + memset(buf, 0, sizeof(buf)); + if (!wrq->u.data.length) { + req->action = MLAN_ACT_GET; + } else { + req->action = MLAN_ACT_SET; + if (copy_from_user(buf, wrq->u.data.pointer, + MIN(sizeof(buf) - 1, wreq->u.data.length))) { + PRINTM(MINFO, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if (buf[0] == 1) + pcoal->param.coalescing_status = + MLAN_MISC_COALESCING_ENABLE; + else + pcoal->param.coalescing_status = + MLAN_MISC_COALESCING_DISABLE; + } + + req->req_id = MLAN_IOCTL_MISC_CFG; + pcoal->sub_command = MLAN_OID_MISC_COALESCING_STATUS; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + buf[0] = ((mlan_ds_misc_cfg *)req->pbuf)->param.coalescing_status; + + if (copy_to_user(wrq->u.data.pointer, buf, wrq->u.data.length)) { + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/get user provisioned local power constraint + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_set_get_11h_local_pwr_constraint(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0, data = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_11h_cfg *ds_11hcfg = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11h_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + ds_11hcfg = (mlan_ds_11h_cfg *)req->pbuf; + if (wrq->u.data.length) { + if (copy_from_user(&data, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MINFO, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + ds_11hcfg->param.usr_local_power_constraint = (t_s8)data; + req->action = MLAN_ACT_SET; + } else + req->action = MLAN_ACT_GET; + + ds_11hcfg->sub_command = MLAN_OID_11H_LOCAL_POWER_CONSTRAINT; + req->req_id = MLAN_IOCTL_11H_CFG; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* Copy response to user */ + if (req->action == MLAN_ACT_GET) { + data = (int)ds_11hcfg->param.usr_local_power_constraint; + if (copy_to_user(wrq->u.data.pointer, &data, sizeof(int))) { + PRINTM(MINFO, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/get HT stream configurations + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_ht_stream_cfg_ioctl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0, data = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *cfg = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + cfg = (mlan_ds_11n_cfg *)req->pbuf; + if (wrq->u.data.length) { + if (copy_from_user(&data, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MINFO, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if (data != HT_STREAM_MODE_1X1 && data != HT_STREAM_MODE_2X2) { + PRINTM(MINFO, "Invalid argument\n"); + ret = -EINVAL; + goto done; + } + cfg->param.stream_cfg = data; + req->action = MLAN_ACT_SET; + } else + req->action = MLAN_ACT_GET; + + cfg->sub_command = MLAN_OID_11N_CFG_STREAM_CFG; + req->req_id = MLAN_IOCTL_11N_CFG; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* Copy response to user */ + data = (int)cfg->param.stream_cfg; + if (copy_to_user(wrq->u.data.pointer, &data, sizeof(int))) { + PRINTM(MINFO, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/get MAC control configuration + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_mac_control_ioctl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0, data = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *cfg = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + cfg = (mlan_ds_misc_cfg *)req->pbuf; + if (wrq->u.data.length) { + if (copy_from_user(&data, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MINFO, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + /* Validation will be done later */ + cfg->param.mac_ctrl = data; + req->action = MLAN_ACT_SET; + } else + req->action = MLAN_ACT_GET; + + cfg->sub_command = MLAN_OID_MISC_MAC_CONTROL; + req->req_id = MLAN_IOCTL_MISC_CFG; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* Copy response to user */ + data = (int)cfg->param.mac_ctrl; + if (copy_to_user(wrq->u.data.pointer, &data, sizeof(int))) { + PRINTM(MINFO, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Get thermal reading + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_thermal_ioctl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0, data = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *cfg = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + cfg = (mlan_ds_misc_cfg *)req->pbuf; + if (wrq->u.data.length) { + PRINTM(MERROR, "Set is not supported for this command\n"); + ret = -EINVAL; + goto done; + } + req->action = MLAN_ACT_GET; + + cfg->sub_command = MLAN_OID_MISC_THERMAL; + req->req_id = MLAN_IOCTL_MISC_CFG; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* Copy response to user */ + data = (int)cfg->param.thermal; + if (copy_to_user(wrq->u.data.pointer, &data, sizeof(int))) { + PRINTM(MINFO, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/get hotspot enable state + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq Pointer to user data + * + * @return 0 --success, otherwise fail + */ +static int +woal_cfg_hotspot(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *cfg = NULL; + int config; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (wrq->u.data.length > 1) { + PRINTM(MERROR, "Invalid no of arguments!\n"); + ret = -EINVAL; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + cfg = (mlan_ds_misc_cfg *)req->pbuf; + if (wrq->u.data.length == 0) + req->action = MLAN_ACT_GET; + else { + if (copy_from_user(&config, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MERROR, "copy from user failed\n"); + ret = -EFAULT; + goto done; + } + cfg->param.hotspot_cfg = config; + req->action = MLAN_ACT_SET; + } + + cfg->sub_command = MLAN_OID_MISC_HOTSPOT_CFG; + req->req_id = MLAN_IOCTL_MISC_CFG; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + config = cfg->param.hotspot_cfg; + if (copy_to_user(wrq->u.data.pointer, &config, sizeof(int))) { + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +#if defined(REASSOCIATION) +/** + * @brief Set/Get reassociation settings + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_get_reassoc(moal_private *priv, struct iwreq *wrq) +{ + moal_handle *handle = priv->phandle; + int ret = 0; + int data = 0; + + ENTER(); + + if (wrq->u.data.length) { + if (copy_from_user(&data, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if (data == 0) { + handle->reassoc_on &= ~MBIT(priv->bss_index); + priv->reassoc_on = MFALSE; + priv->reassoc_required = MFALSE; + if (!handle->reassoc_on && + handle->is_reassoc_timer_set == MTRUE) { + woal_cancel_timer(&handle->reassoc_timer); + handle->is_reassoc_timer_set = MFALSE; + } + } else { + handle->reassoc_on |= MBIT(priv->bss_index); + priv->reassoc_on = MTRUE; + } + } else { + data = (int)(priv->reassoc_on); + if (copy_to_user(wrq->u.data.pointer, &data, sizeof(int))) { + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + } + +done: + LEAVE(); + return ret; +} +#endif /* REASSOCIATION */ + +/** + * @brief implement WMM enable command + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq Pointer to user data + * + * @return 0 --success, otherwise fail + */ +static int +woal_wmm_enable_ioctl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ds_wmm_cfg *wmm = NULL; + mlan_ioctl_req *req = NULL; + int data = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wmm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + wmm = (mlan_ds_wmm_cfg *)req->pbuf; + req->req_id = MLAN_IOCTL_WMM_CFG; + wmm->sub_command = MLAN_OID_WMM_CFG_ENABLE; + + if (wrq->u.data.length) { + /* Set WMM configuration */ + if (copy_from_user(&data, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if ((data < CMD_DISABLED) || (data > CMD_ENABLED)) { + ret = -EINVAL; + goto done; + } + req->action = MLAN_ACT_SET; + if (data == CMD_DISABLED) + wmm->param.wmm_enable = MFALSE; + else + wmm->param.wmm_enable = MTRUE; + } else { + /* Get WMM status */ + req->action = MLAN_ACT_GET; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (wrq->u.data.pointer) { + if (copy_to_user + (wrq->u.data.pointer, &wmm->param.wmm_enable, + sizeof(wmm->param.wmm_enable))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Implement 802.11D enable command + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq Pointer to user data + * + * @return 0 --success, otherwise fail + */ +static int +woal_11d_enable_ioctl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ds_11d_cfg *pcfg_11d = NULL; + mlan_ioctl_req *req = NULL; + int data = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11d_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + pcfg_11d = (mlan_ds_11d_cfg *)req->pbuf; + req->req_id = MLAN_IOCTL_11D_CFG; + pcfg_11d->sub_command = MLAN_OID_11D_CFG_ENABLE; + if (wrq->u.data.length) { + /* Set 11D configuration */ + if (copy_from_user(&data, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if ((data < CMD_DISABLED) || (data > CMD_ENABLED)) { + ret = -EINVAL; + goto done; + } + if (data == CMD_DISABLED) + pcfg_11d->param.enable_11d = MFALSE; + else + pcfg_11d->param.enable_11d = MTRUE; + req->action = MLAN_ACT_SET; + } else { + req->action = MLAN_ACT_GET; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (wrq->u.data.pointer) { + if (copy_to_user + (wrq->u.data.pointer, &pcfg_11d->param.enable_11d, + sizeof(pcfg_11d->param.enable_11d))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Implement 802.11D clear chan table command + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq Pointer to user data + * + * @return 0 --success, otherwise fail + */ +static int +woal_11d_clr_chan_table(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ds_11d_cfg *pcfg_11d = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11d_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + pcfg_11d = (mlan_ds_11d_cfg *)req->pbuf; + req->req_id = MLAN_IOCTL_11D_CFG; + pcfg_11d->sub_command = MLAN_OID_11D_CLR_CHAN_TABLE; + req->action = MLAN_ACT_SET; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Control WPS Session Enable/Disable + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq Pointer to user data + * + * @return 0 --success, otherwise fail + */ +static int +woal_wps_cfg_ioctl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ds_wps_cfg *pwps = NULL; + mlan_ioctl_req *req = NULL; + char buf[8]; + struct iwreq *wreq = (struct iwreq *)wrq; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + PRINTM(MINFO, "WOAL_WPS_SESSION\n"); + + memset(buf, 0, sizeof(buf)); + if (copy_from_user(buf, wreq->u.data.pointer, + MIN(sizeof(buf) - 1, wreq->u.data.length))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wps_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + pwps = (mlan_ds_wps_cfg *)req->pbuf; + req->req_id = MLAN_IOCTL_WPS_CFG; + req->action = MLAN_ACT_SET; + pwps->sub_command = MLAN_OID_WPS_CFG_SESSION; + if (buf[0] == 1) + pwps->param.wps_session = MLAN_WPS_CFG_SESSION_START; + else + pwps->param.wps_session = MLAN_WPS_CFG_SESSION_END; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set WPA passphrase and SSID + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to user data + * + * @return 0 --success, otherwise fail + */ +static int +woal_passphrase(moal_private *priv, struct iwreq *wrq) +{ + t_u16 len = 0; + char buf[256]; + char *begin = NULL, *end = NULL, *opt = NULL; + int ret = 0, action = -1, i; + mlan_ds_sec_cfg *sec = NULL; + mlan_ioctl_req *req = NULL; + t_u8 zero_mac[] = { 0, 0, 0, 0, 0, 0 }; + t_u8 *mac = NULL; + int data_length = wrq->u.data.length, copy_len; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (!priv->phandle->card_info->embedded_supp) { + PRINTM(MERROR, "Not supported cmd on this card\n"); + ret = -EOPNOTSUPP; + goto done; + } + if (!data_length || data_length >= sizeof(buf)) { + PRINTM(MERROR, + "Argument missing or too long for setpassphrase\n"); + ret = -EINVAL; + goto done; + } + memset(buf, 0, sizeof(buf)); + copy_len = data_length; + + if (copy_from_user(buf, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + /* Parse the buf to get the cmd_action */ + begin = buf; + end = woal_strsep(&begin, ';', '/'); + if (!end) { + PRINTM(MERROR, "Invalid option\n"); + ret = -EINVAL; + goto done; + } + action = woal_atox(end); + if (action < 0 || action > 2 || end[1] != '\0') { + PRINTM(MERROR, "Invalid action argument %s\n", end); + ret = -EINVAL; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_PASSPHRASE; + req->req_id = MLAN_IOCTL_SEC_CFG; + if (action == 0) + req->action = MLAN_ACT_GET; + else + req->action = MLAN_ACT_SET; + while (begin) { + end = woal_strsep(&begin, ';', '/'); + opt = woal_strsep(&end, '=', '/'); + if (!opt || !end || !end[0]) { + PRINTM(MERROR, "Invalid option\n"); + ret = -EINVAL; + break; + } else if (!strnicmp(opt, "ssid", strlen(opt))) { + if (strlen(end) > MLAN_MAX_SSID_LENGTH) { + PRINTM(MERROR, + "SSID length exceeds max length\n"); + ret = -EFAULT; + break; + } + sec->param.passphrase.ssid.ssid_len = strlen(end); + strncpy((char *)sec->param.passphrase.ssid.ssid, end, + strlen(end)); + PRINTM(MINFO, "ssid=%s, len=%d\n", + sec->param.passphrase.ssid.ssid, + (int)sec->param.passphrase.ssid.ssid_len); + } else if (!strnicmp(opt, "bssid", strlen(opt))) { + woal_mac2u8(sec->param.passphrase.bssid, end); + } else if (!strnicmp(opt, "psk", strlen(opt)) && + req->action == MLAN_ACT_SET) { + if (strlen(end) != MLAN_PMK_HEXSTR_LENGTH) { + PRINTM(MERROR, "Invalid PMK length\n"); + ret = -EINVAL; + break; + } + woal_ascii2hex((t_u8 *)(sec->param.passphrase.psk.pmk. + pmk), end, + MLAN_PMK_HEXSTR_LENGTH / 2); + sec->param.passphrase.psk_type = MLAN_PSK_PMK; + } else if (!strnicmp(opt, "passphrase", strlen(opt)) && + req->action == MLAN_ACT_SET) { + if (strlen(end) < MLAN_MIN_PASSPHRASE_LENGTH || + strlen(end) > MLAN_MAX_PASSPHRASE_LENGTH) { + PRINTM(MERROR, + "Invalid length for passphrase\n"); + ret = -EINVAL; + break; + } + sec->param.passphrase.psk_type = MLAN_PSK_PASSPHRASE; + memcpy(sec->param.passphrase.psk.passphrase.passphrase, + end, + sizeof(sec->param.passphrase.psk.passphrase. + passphrase)); + sec->param.passphrase.psk.passphrase.passphrase_len = + strlen(end); + PRINTM(MINFO, "passphrase=%s, len=%d\n", + sec->param.passphrase.psk.passphrase.passphrase, + (int)sec->param.passphrase.psk.passphrase. + passphrase_len); + } else { + PRINTM(MERROR, "Invalid option %s\n", opt); + ret = -EINVAL; + break; + } + } + if (ret) + goto done; + + if (action == 2) + sec->param.passphrase.psk_type = MLAN_PSK_CLEAR; + else if (action == 0) + sec->param.passphrase.psk_type = MLAN_PSK_QUERY; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (action == 0) { + memset(buf, 0, sizeof(buf)); + if (sec->param.passphrase.ssid.ssid_len) { + len += sprintf(buf + len, "ssid:"); + memcpy(buf + len, sec->param.passphrase.ssid.ssid, + sec->param.passphrase.ssid.ssid_len); + len += sec->param.passphrase.ssid.ssid_len; + len += sprintf(buf + len, " "); + } + if (memcmp + (&sec->param.passphrase.bssid, zero_mac, + sizeof(zero_mac))) { + mac = (t_u8 *)&sec->param.passphrase.bssid; + len += sprintf(buf + len, "bssid:"); + for (i = 0; i < ETH_ALEN - 1; ++i) + len += sprintf(buf + len, "%02x:", mac[i]); + len += sprintf(buf + len, "%02x ", mac[i]); + } + if (sec->param.passphrase.psk_type == MLAN_PSK_PMK) { + len += sprintf(buf + len, "psk:"); + for (i = 0; i < MLAN_MAX_KEY_LENGTH; ++i) + len += sprintf(buf + len, "%02x", + sec->param.passphrase.psk.pmk. + pmk[i]); + len += sprintf(buf + len, "\n"); + } + if (sec->param.passphrase.psk_type == MLAN_PSK_PASSPHRASE) { + len += sprintf(buf + len, "passphrase:%s\n", + sec->param.passphrase.psk.passphrase. + passphrase); + } + if (wrq->u.data.pointer) { + if (copy_to_user + (wrq->u.data.pointer, buf, MIN(len, sizeof(buf)))) { + PRINTM(MERROR, "Copy to user failed, len %d\n", + len); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = len; + } + + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Get esupp mode + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_esupp_mode(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ds_sec_cfg *sec = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (!priv->phandle->card_info->embedded_supp) { + PRINTM(MERROR, "Not supported cmd on this card\n"); + ret = -EOPNOTSUPP; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_ESUPP_MODE; + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (copy_to_user + (wrq->u.data.pointer, (t_u8 *)&sec->param.esupp_mode, + sizeof(int) * 3)) { + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 3; +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** AES key length */ +#define AES_KEY_LEN 16 +/** + * @brief Adhoc AES control + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to user data + * + * @return 0 --success, otherwise fail + */ +static int +woal_adhoc_aes_ioctl(moal_private *priv, struct iwreq *wrq) +{ + static char buf[256]; + int ret = 0, action = -1; + unsigned int i; + t_u8 key_ascii[32]; + t_u8 key_hex[16]; + t_u8 *tmp = NULL; + mlan_bss_info bss_info; + mlan_ds_sec_cfg *sec = NULL; + mlan_ioctl_req *req = NULL; + t_u8 bcast_addr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + int data_length = wrq->u.data.length, copy_len; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + memset(key_ascii, 0x00, sizeof(key_ascii)); + memset(key_hex, 0x00, sizeof(key_hex)); + memset(buf, 0x00, sizeof(buf)); + + /* Get current BSS information */ + memset(&bss_info, 0, sizeof(bss_info)); + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + if (bss_info.bss_mode != MLAN_BSS_MODE_IBSS || + bss_info.media_connected == MTRUE) { + PRINTM(MERROR, "STA is connected or not in IBSS mode.\n"); + ret = -EOPNOTSUPP; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + copy_len = data_length; + + if (data_length > 0) { + if (data_length >= sizeof(buf)) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + if (copy_from_user(buf, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + if (data_length == 1) { + /* Get Adhoc AES Key */ + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; + sec->param.encrypt_key.key_len = AES_KEY_LEN; + sec->param.encrypt_key.key_index = + MLAN_KEY_INDEX_UNICAST; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memcpy(key_hex, sec->param.encrypt_key.key_material, + sizeof(key_hex)); + HEXDUMP("Adhoc AES Key (HEX)", key_hex, + sizeof(key_hex)); + + wrq->u.data.length = sizeof(key_ascii) + 1; + + tmp = key_ascii; + for (i = 0; i < sizeof(key_hex); i++) + tmp += sprintf((char *)tmp, "%02x", key_hex[i]); + } else if (data_length >= 2) { + /* Parse the buf to get the cmd_action */ + action = woal_atox(buf); + if (action < 1 || action > 2) { + PRINTM(MERROR, "Invalid action argument %d\n", + action); + ret = -EINVAL; + goto done; + } + + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_SET; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; + + if (action == 1) { + /* Set Adhoc AES Key */ + memcpy(key_ascii, &buf[2], sizeof(key_ascii)); + woal_ascii2hex(key_hex, (char *)key_ascii, + sizeof(key_hex)); + HEXDUMP("Adhoc AES Key (HEX)", key_hex, + sizeof(key_hex)); + + sec->param.encrypt_key.key_len = AES_KEY_LEN; + sec->param.encrypt_key.key_index = + MLAN_KEY_INDEX_UNICAST; + sec->param.encrypt_key.key_flags = + KEY_FLAG_SET_TX_KEY | + KEY_FLAG_GROUP_KEY; + memcpy(sec->param.encrypt_key.mac_addr, + (u8 *)bcast_addr, ETH_ALEN); + memcpy(sec->param.encrypt_key.key_material, + key_hex, sec->param.encrypt_key.key_len); + + status = woal_request_ioctl(priv, req, + MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + } else { + /* Clear Adhoc AES Key */ + sec->param.encrypt_key.key_len = AES_KEY_LEN; + sec->param.encrypt_key.key_index = + MLAN_KEY_INDEX_UNICAST; + sec->param.encrypt_key.key_flags = + KEY_FLAG_REMOVE_KEY; + memcpy(sec->param.encrypt_key.mac_addr, + (u8 *)bcast_addr, ETH_ALEN); + memset(sec->param.encrypt_key.key_material, 0, + sizeof(sec->param.encrypt_key. + key_material)); + + status = woal_request_ioctl(priv, req, + MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + } + } + + HEXDUMP("Adhoc AES Key (ASCII)", key_ascii, sizeof(key_ascii)); + wrq->u.data.length = sizeof(key_ascii); + if (wrq->u.data.pointer) { + if (copy_to_user(wrq->u.data.pointer, &key_ascii, + sizeof(key_ascii))) { + PRINTM(MERROR, "copy_to_user failed\n"); + ret = -EFAULT; + goto done; + } + } + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Get GTK/PTK + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to user data + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_key_ioctl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + unsigned int i; + t_u8 key_ascii[256]; + t_u8 *tmp; + mlan_ds_sec_cfg *sec = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(key_ascii, 0x00, sizeof(key_ascii)); + tmp = key_ascii; + + if (priv->media_connected == MFALSE) { + PRINTM(MERROR, "Can't get key in un-associated state\n"); + ret = -EFAULT; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Get Unicast Key */ + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_QUERY_KEY; + sec->param.encrypt_key.key_index = 0; + sec->param.encrypt_key.key_flags = 0; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (sec->param.encrypt_key.key_len) { + sprintf((char *)tmp, "\n%s", "PTK: "); + tmp += 5; + for (i = 0; i < sec->param.encrypt_key.key_len; i++) + tmp += sprintf((char *)tmp, "%02x", + sec->param.encrypt_key.key_material[i]); + } + + /* Get Multicase Key */ + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_QUERY_KEY; + sec->param.encrypt_key.key_index = 0; + sec->param.encrypt_key.key_flags = KEY_FLAG_GROUP_KEY; + memset(sec->param.encrypt_key.mac_addr, 0x0, MLAN_MAC_ADDR_LENGTH); + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (sec->param.encrypt_key.key_len) { + sprintf((char *)tmp, "\n%s", "GTK: "); + tmp += 5; + for (i = 0; i < sec->param.encrypt_key.key_len; i++) + tmp += sprintf((char *)tmp, "%02x", + sec->param.encrypt_key.key_material[i]); + } + + /* Get IGTK Key */ + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_QUERY_KEY; + sec->param.encrypt_key.key_index = 0; + sec->param.encrypt_key.key_flags = KEY_FLAG_AES_MCAST_IGTK; + memset(sec->param.encrypt_key.mac_addr, 0x0, MLAN_MAC_ADDR_LENGTH); + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (sec->param.encrypt_key.key_len) { + sprintf((char *)tmp, "\n%s", "IGTK: "); + tmp += 6; + for (i = 0; i < sec->param.encrypt_key.key_len; i++) + tmp += sprintf((char *)tmp, "%02x", + sec->param.encrypt_key.key_material[i]); + } + + wrq->u.data.length = sizeof(key_ascii) + 1; + if (wrq->u.data.pointer) { + if (copy_to_user + (wrq->u.data.pointer, &key_ascii, tmp - key_ascii)) { + PRINTM(MERROR, "copy_to_user failed\n"); + ret = -EFAULT; + goto done; + } + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief arpfilter ioctl function + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_arp_filter(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ds_misc_cfg *misc = NULL; + mlan_ioctl_req *req = NULL; + int data_length = wrq->u.data.length, copy_len; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + copy_len = + MIN(sizeof(misc->param.gen_ie.ie_data), + sizeof(int) * data_length); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + misc = (mlan_ds_misc_cfg *)req->pbuf; + misc->sub_command = MLAN_OID_MISC_GEN_IE; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = MLAN_ACT_SET; + misc->param.gen_ie.type = MLAN_IE_TYPE_ARP_FILTER; + misc->param.gen_ie.len = data_length; + + /* get the whole command from user */ + if (copy_from_user + (misc->param.gen_ie.ie_data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/get IP address + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_set_get_ip_addr(moal_private *priv, struct iwreq *wrq) +{ + char buf[IPADDR_MAX_BUF]; + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_misc_cfg *misc = NULL; + int ret = 0, op_code = 0, data_length = wrq->u.data.length; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(buf, 0, IPADDR_MAX_BUF); + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; + + if (data_length <= 1) { /* GET */ + ioctl_req->action = MLAN_ACT_GET; + } else { + if (copy_from_user(buf, wrq->u.data.pointer, + MIN(IPADDR_MAX_BUF - 1, data_length))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + /* Make sure we have the operation argument */ + if (data_length > 2 && buf[1] != ';') { + PRINTM(MERROR, + "No operation argument. Separate with ';'\n"); + ret = -EINVAL; + goto done; + } else { + buf[1] = '\0'; + } + ioctl_req->action = MLAN_ACT_SET; + /* only one IP is supported in current firmware */ + memset(misc->param.ipaddr_cfg.ip_addr[0], 0, IPADDR_LEN); + in4_pton(&buf[2], MIN((IPADDR_MAX_BUF - 3), (data_length - 2)), + misc->param.ipaddr_cfg.ip_addr[0], ' ', NULL); + /* only one IP is supported in current firmware */ + misc->param.ipaddr_cfg.ip_addr_num = 1; + misc->param.ipaddr_cfg.ip_addr_type = IPADDR_TYPE_IPV4; + } + if (woal_atoi(&op_code, buf) != MLAN_STATUS_SUCCESS) { + ret = -EINVAL; + goto done; + } + misc->param.ipaddr_cfg.op_code = (t_u32)op_code; + ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; + misc->sub_command = MLAN_OID_MISC_IP_ADDR; + + /* Send ioctl to mlan */ + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (ioctl_req->action == MLAN_ACT_GET) { + snprintf(buf, IPADDR_MAX_BUF, "%d;%d.%d.%d.%d", + misc->param.ipaddr_cfg.op_code, + misc->param.ipaddr_cfg.ip_addr[0][0], + misc->param.ipaddr_cfg.ip_addr[0][1], + misc->param.ipaddr_cfg.ip_addr[0][2], + misc->param.ipaddr_cfg.ip_addr[0][3]); + wrq->u.data.length = IPADDR_MAX_BUF; + if (copy_to_user(wrq->u.data.pointer, buf, IPADDR_MAX_BUF)) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + } + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Transmit beamforming capabilities + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 -- success, otherwise fail + */ +static int +woal_tx_bf_cap_ioctl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0, data_length = wrq->u.data.length; + mlan_ioctl_req *req = NULL; + mlan_ds_11n_cfg *bf_cfg = NULL; + int bf_cap = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (data_length > 1) { + PRINTM(MERROR, "Invalid no of arguments!\n"); + ret = -EINVAL; + goto done; + } + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + bf_cfg = (mlan_ds_11n_cfg *)req->pbuf; + req->req_id = MLAN_IOCTL_11N_CFG; + bf_cfg->sub_command = MLAN_OID_11N_CFG_TX_BF_CAP; + req->action = MLAN_ACT_GET; + if (data_length) { /* SET */ + if (copy_from_user(&bf_cap, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MERROR, "copy from user failed\n"); + ret = -EFAULT; + goto done; + } + bf_cfg->param.tx_bf_cap = bf_cap; + req->action = MLAN_ACT_SET; + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + bf_cap = bf_cfg->param.tx_bf_cap; + if (copy_to_user(wrq->u.data.pointer, &bf_cap, sizeof(int))) { + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/* Maximum input output characters in group WOAL_SET_GET_256_CHAR */ +#define MAX_IN_OUT_CHAR 256 +/** Tx BF Global conf argument index */ +#define BF_ENABLE_PARAM 1 +#define SOUND_ENABLE_PARAM 2 +#define FB_TYPE_PARAM 3 +#define SNR_THRESHOLD_PARAM 4 +#define SOUND_INTVL_PARAM 5 +#define BF_MODE_PARAM 6 +#define MAX_TX_BF_GLOBAL_ARGS 6 +#define BF_CFG_ACT_GET 0 +#define BF_CFG_ACT_SET 1 + +/** + * @brief Set/Get Transmit beamforming configuration + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 -- success, otherwise fail + */ +static int +woal_tx_bf_cfg_ioctl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0, data_length = wrq->u.data.length; + int bf_action = 0, interval = 0; + int snr = 0, i, tmp_val; + t_u8 buf[MAX_IN_OUT_CHAR], char_count = 0; + t_u8 *str, *token, *pos; + t_u16 action = 0; + + mlan_ds_11n_tx_bf_cfg bf_cfg; + mlan_trigger_sound_args *bf_sound = NULL; + mlan_tx_bf_peer_args *tx_bf_peer = NULL; + mlan_snr_thr_args *bf_snr = NULL; + mlan_bf_periodicity_args *bf_periodicity = NULL; + mlan_bf_global_cfg_args *bf_global = NULL; + + ENTER(); + + memset(&bf_cfg, 0, sizeof(bf_cfg)); + /* Pointer to corresponding buffer */ + bf_sound = bf_cfg.body.bf_sound; + tx_bf_peer = bf_cfg.body.tx_bf_peer; + bf_snr = bf_cfg.body.bf_snr; + bf_periodicity = bf_cfg.body.bf_periodicity; + bf_global = &bf_cfg.body.bf_global_cfg; + + /* Total characters in buffer */ + char_count = data_length - 1; + memset(buf, 0, sizeof(buf)); + if (char_count) { + if (data_length > sizeof(buf)) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + if (copy_from_user(buf, wrq->u.data.pointer, data_length)) { + PRINTM(MERROR, "copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + if (char_count > 1 && buf[1] != ';') { + PRINTM(MERROR, + "No action argument. Separate with ';'\n"); + ret = -EINVAL; + goto done; + } + /* Replace ';' with NULL in the string to separate args */ + for (i = 0; i < char_count; i++) { + if (buf[i] == ';') + buf[i] = '\0'; + } + /* The first byte represents the beamforming action */ + if (woal_atoi(&bf_action, &buf[0]) != MLAN_STATUS_SUCCESS) { + ret = -EINVAL; + goto done; + } + switch (bf_action) { + case BF_GLOBAL_CONFIGURATION: + if (char_count == 1) { + action = MLAN_ACT_GET; + bf_cfg.action = BF_CFG_ACT_GET; + } else { + action = MLAN_ACT_SET; + bf_cfg.action = BF_CFG_ACT_SET; + /* Eliminate action field */ + token = &buf[2]; + for (i = 1, str = &buf[2]; token != NULL; i++) { + token = strstr(str, " "); + pos = str; + if (token != NULL) { + *token = '\0'; + str = token + 1; + } + woal_atoi(&tmp_val, pos); + switch (i) { + case BF_ENABLE_PARAM: + bf_global->bf_enbl = + (t_u8)tmp_val; + break; + case SOUND_ENABLE_PARAM: + bf_global->sounding_enbl = + (t_u8)tmp_val; + break; + case FB_TYPE_PARAM: + bf_global->fb_type = + (t_u8)tmp_val; + break; + case SNR_THRESHOLD_PARAM: + bf_global->snr_threshold = + (t_u8)tmp_val; + break; + case SOUND_INTVL_PARAM: + bf_global->sounding_interval = + (t_u16)tmp_val; + break; + case BF_MODE_PARAM: + bf_global->bf_mode = + (t_u8)tmp_val; + break; + default: + PRINTM(MERROR, + "Invalid Argument\n"); + ret = -EINVAL; + goto done; + } + } + } + break; + case TRIGGER_SOUNDING_FOR_PEER: + /* + * First arg = 2 BfAction + * Second arg = 17 MAC "00:50:43:20:BF:64" + */ + if (char_count != 19) { + PRINTM(MERROR, "Invalid argument\n"); + ret = -EINVAL; + goto done; + } + woal_mac2u8(bf_sound->peer_mac, &buf[2]); + action = MLAN_ACT_SET; + bf_cfg.action = BF_CFG_ACT_SET; + break; + case SET_GET_BF_PERIODICITY: + /* + * First arg = 2 BfAction + * Second arg = 18 MAC "00:50:43:20:BF:64;" + * Third arg = 1 (min char) TX BF interval + * 10 (max char) u32 maximum value 4294967295 + */ + if (char_count < 19 || char_count > 30) { + PRINTM(MERROR, "Invalid argument\n"); + ret = -EINVAL; + goto done; + } + + woal_mac2u8(bf_periodicity->peer_mac, &buf[2]); + if (char_count == 19) { + action = MLAN_ACT_GET; + bf_cfg.action = BF_CFG_ACT_GET; + } else { + action = MLAN_ACT_SET; + bf_cfg.action = BF_CFG_ACT_SET; + if (woal_atoi(&interval, &buf[20]) != + MLAN_STATUS_SUCCESS) { + ret = -EINVAL; + goto done; + } + bf_periodicity->interval = interval; + } + break; + case TX_BF_FOR_PEER_ENBL: + /* + * Handle only SET operation here + * First arg = 2 BfAction + * Second arg = 18 MAC "00:50:43:20:BF:64;" + * Third arg = 2 enable/disable bf + * Fourth arg = 2 enable/disable sounding + * Fifth arg = 1 FB Type + */ + if (char_count != 25 && char_count != 1) { + PRINTM(MERROR, "Invalid argument\n"); + ret = -EINVAL; + goto done; + } + if (char_count == 1) { + action = MLAN_ACT_GET; + bf_cfg.action = BF_CFG_ACT_GET; + } else { + woal_mac2u8(tx_bf_peer->peer_mac, &buf[2]); + woal_atoi(&tmp_val, &buf[20]); + tx_bf_peer->bf_enbl = (t_u8)tmp_val; + woal_atoi(&tmp_val, &buf[22]); + tx_bf_peer->sounding_enbl = (t_u8)tmp_val; + woal_atoi(&tmp_val, &buf[24]); + tx_bf_peer->fb_type = (t_u8)tmp_val; + action = MLAN_ACT_SET; + bf_cfg.action = BF_CFG_ACT_SET; + } + break; + case SET_SNR_THR_PEER: + /* + * First arg = 2 BfAction + * Second arg = 18 MAC "00:50:43:20:BF:64;" + * Third arg = 1/2 SNR u8 - can be 1/2 charerters + */ + if (char_count != 1 && + !(char_count == 21 || char_count == 22)) { + PRINTM(MERROR, "Invalid argument\n"); + ret = -EINVAL; + goto done; + } + if (char_count == 1) { + action = MLAN_ACT_GET; + bf_cfg.action = BF_CFG_ACT_GET; + } else { + woal_mac2u8(bf_snr->peer_mac, &buf[2]); + if (woal_atoi(&snr, &buf[20]) != + MLAN_STATUS_SUCCESS) { + ret = -EINVAL; + goto done; + } + bf_snr->snr = snr; + action = MLAN_ACT_SET; + bf_cfg.action = BF_CFG_ACT_SET; + } + break; + default: + ret = -EINVAL; + goto done; + } + + /* Save the value */ + bf_cfg.bf_action = bf_action; + if (MLAN_STATUS_SUCCESS != + woal_set_get_tx_bf_cfg(priv, action, &bf_cfg)) { + ret = -EFAULT; + goto done; + } + } else { + ret = -EINVAL; + goto done; + } + + if (action == MLAN_ACT_GET) { + data_length = 0; + memset(buf, 0, sizeof(buf)); + switch (bf_action) { + case BF_GLOBAL_CONFIGURATION: + data_length += + sprintf(buf + data_length, "%d ", + (int)bf_global->bf_enbl); + data_length += + sprintf(buf + data_length, "%d ", + (int)bf_global->sounding_enbl); + data_length += + sprintf(buf + data_length, "%d ", + (int)bf_global->fb_type); + data_length += + sprintf(buf + data_length, "%d ", + (int)bf_global->snr_threshold); + data_length += + sprintf(buf + data_length, "%d ", + (int)bf_global->sounding_interval); + data_length += + sprintf(buf + data_length, "%d ", + (int)bf_global->bf_mode); + break; + case SET_GET_BF_PERIODICITY: + data_length += sprintf(buf + data_length, + "%02x:%02x:%02x:%02x:%02x:%02x", + bf_periodicity->peer_mac[0], + bf_periodicity->peer_mac[1], + bf_periodicity->peer_mac[2], + bf_periodicity->peer_mac[3], + bf_periodicity->peer_mac[4], + bf_periodicity->peer_mac[5]); + data_length += sprintf(buf + data_length, "%c", ' '); + data_length += + sprintf(buf + data_length, "%d", + bf_periodicity->interval); + break; + case TX_BF_FOR_PEER_ENBL: + for (i = 0; i < bf_cfg.no_of_peers; i++) { + data_length += sprintf(buf + data_length, + "%02x:%02x:%02x:%02x:%02x:%02x", + tx_bf_peer->peer_mac[0], + tx_bf_peer->peer_mac[1], + tx_bf_peer->peer_mac[2], + tx_bf_peer->peer_mac[3], + tx_bf_peer->peer_mac[4], + tx_bf_peer->peer_mac[5]); + data_length += + sprintf(buf + data_length, "%c", ' '); + data_length += + sprintf(buf + data_length, "%d;", + tx_bf_peer->bf_enbl); + data_length += + sprintf(buf + data_length, "%d;", + tx_bf_peer->sounding_enbl); + data_length += + sprintf(buf + data_length, "%d ", + tx_bf_peer->fb_type); + tx_bf_peer++; + } + break; + case SET_SNR_THR_PEER: + for (i = 0; i < bf_cfg.no_of_peers; i++) { + data_length += sprintf(buf + data_length, + "%02x:%02x:%02x:%02x:%02x:%02x", + bf_snr->peer_mac[0], + bf_snr->peer_mac[1], + bf_snr->peer_mac[2], + bf_snr->peer_mac[3], + bf_snr->peer_mac[4], + bf_snr->peer_mac[5]); + data_length += + sprintf(buf + data_length, "%c", ';'); + data_length += + sprintf(buf + data_length, "%d", + bf_snr->snr); + data_length += + sprintf(buf + data_length, "%c", ' '); + bf_snr++; + } + break; + } + buf[data_length] = '\0'; + } + + wrq->u.data.length = data_length; + if (copy_to_user(wrq->u.data.pointer, buf, wrq->u.data.length)) { + ret = -EFAULT; + goto done; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Retrieve the scan response/beacon table + * + * @param wrq A pointer to iwreq structure + * @param scan_resp A pointer to mlan_scan_resp structure + * @param scan_start argument + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static int +moal_ret_get_scan_table_ioctl(struct iwreq *wrq, + mlan_scan_resp *scan_resp, t_u32 scan_start) +{ + pBSSDescriptor_t pbss_desc, scan_table; + wlan_ioctl_get_scan_table_info *prsp_info; + int ret_code; + int ret_len; + int space_left; + t_u8 *pcurrent; + t_u8 *pbuffer_end; + t_u32 num_scans_done; + + ENTER(); + + num_scans_done = 0; + ret_code = MLAN_STATUS_SUCCESS; + + prsp_info = (wlan_ioctl_get_scan_table_info *)wrq->u.data.pointer; + pcurrent = (t_u8 *)prsp_info->scan_table_entry_buf; + + pbuffer_end = wrq->u.data.pointer + wrq->u.data.length - 1; + space_left = pbuffer_end - pcurrent; + scan_table = (BSSDescriptor_t *)(scan_resp->pscan_table); + + PRINTM(MINFO, "GetScanTable: scan_start req = %d\n", scan_start); + PRINTM(MINFO, "GetScanTable: length avail = %d\n", wrq->u.data.length); + + if (!scan_start) { + PRINTM(MINFO, "GetScanTable: get current BSS Descriptor\n"); + + /* Use to get current association saved descriptor */ + pbss_desc = scan_table; + + ret_code = wlan_get_scan_table_ret_entry(pbss_desc, + &pcurrent, + &space_left); + + if (ret_code == MLAN_STATUS_SUCCESS) + num_scans_done = 1; + } else { + scan_start--; + + while (space_left + && (scan_start + num_scans_done < + scan_resp->num_in_scan_table) + && (ret_code == MLAN_STATUS_SUCCESS)) { + + pbss_desc = + (scan_table + (scan_start + num_scans_done)); + + PRINTM(MINFO, + "GetScanTable: get current BSS Descriptor [%d]\n", + scan_start + num_scans_done); + + ret_code = wlan_get_scan_table_ret_entry(pbss_desc, + &pcurrent, + &space_left); + + if (ret_code == MLAN_STATUS_SUCCESS) + num_scans_done++; + } + } + + prsp_info->scan_number = num_scans_done; + ret_len = pcurrent - (t_u8 *)wrq->u.data.pointer; + + wrq->u.data.length = ret_len; + + /* Return ret_code (EFAULT or E2BIG) in the case where no scan results + were successfully encoded. */ + LEAVE(); + return num_scans_done ? MLAN_STATUS_SUCCESS : ret_code; +} + +/** + * @brief Get scan table ioctl + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +static mlan_status +woal_get_scan_table_ioctl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_scan *scan = NULL; + t_u32 scan_start; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_scan)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + scan = (mlan_ds_scan *)req->pbuf; + req->req_id = MLAN_IOCTL_SCAN; + req->action = MLAN_ACT_GET; + + /* get the whole command from user */ + if (copy_from_user + (&scan_start, wrq->u.data.pointer, sizeof(scan_start))) { + PRINTM(MERROR, "copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if (scan_start) + scan->sub_command = MLAN_OID_SCAN_NORMAL; + else + scan->sub_command = MLAN_OID_SCAN_GET_CURRENT_BSS; + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status == MLAN_STATUS_SUCCESS) { + status = moal_ret_get_scan_table_ioctl(wrq, + &scan->param.scan_resp, + scan_start); + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Set user scan ext -- Async mode, without wait + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 -- success, otherwise fail + */ +static int +woal_set_user_scan_ext_ioctl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + wlan_user_scan_cfg scan_req; + ENTER(); + memset(&scan_req, 0x00, sizeof(scan_req)); + if (copy_from_user + (&scan_req, wrq->u.data.pointer, + MIN(wrq->u.data.length, sizeof(scan_req)))) { + PRINTM(MINFO, "Copy from user failed\n"); + LEAVE(); + return -EFAULT; + } + if (MLAN_STATUS_FAILURE == woal_do_scan(priv, &scan_req)) + ret = -EFAULT; + LEAVE(); + return ret; +} + +/** + * @brief Set user scan + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +static mlan_status +woal_set_user_scan_ioctl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_scan *scan = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + union iwreq_data wrqu; + moal_handle *handle = priv->phandle; + + ENTER(); + + if (handle->scan_pending_on_block == MTRUE) { + PRINTM(MINFO, "scan already in processing...\n"); + LEAVE(); + return ret; + } + if (MOAL_ACQ_SEMAPHORE_BLOCK(&handle->async_sem)) { + PRINTM(MERROR, "Acquire semaphore error, request_scan\n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + handle->scan_pending_on_block = MTRUE; + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_scan) + + wrq->u.data.length); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + scan = (mlan_ds_scan *)req->pbuf; + scan->sub_command = MLAN_OID_SCAN_USER_CONFIG; + req->req_id = MLAN_IOCTL_SCAN; + req->action = MLAN_ACT_SET; + + if (copy_from_user(scan->param.user_scan.scan_cfg_buf, + wrq->u.data.pointer, wrq->u.data.length)) { + PRINTM(MINFO, "Copy from user failed\n"); + LEAVE(); + return -EFAULT; + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status == MLAN_STATUS_SUCCESS) { + memset(&wrqu, 0, sizeof(union iwreq_data)); + wireless_send_event(priv->netdev, SIOCGIWSCAN, &wrqu, NULL); + } + handle->scan_pending_on_block = MFALSE; + MOAL_REL_SEMAPHORE(&handle->async_sem); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Cmd52 read/write register + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static int +woal_cmd52rdwr_ioctl(moal_private *priv, struct iwreq *wrq) +{ + t_u8 rw = 0, func, data = 0; + int buf[3], reg, ret = MLAN_STATUS_SUCCESS; + int data_length = wrq->u.data.length; + + ENTER(); + + if (data_length < 2 || data_length > 3) { + PRINTM(MERROR, "Invalid number of arguments\n"); + ret = -EINVAL; + goto done; + } + + if (copy_from_user(buf, wrq->u.data.pointer, sizeof(int) * data_length)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + func = (t_u8)buf[0]; + if (func > 7) { + PRINTM(MERROR, "Invalid function number!\n"); + ret = -EINVAL; + goto done; + } + reg = (t_u32)buf[1]; + if (data_length == 2) { + rw = 0; /* CMD52 read */ + PRINTM(MINFO, "Cmd52 read, func=%d, reg=0x%08X\n", func, reg); + } + if (data_length == 3) { + rw = 1; /* CMD52 write */ + data = (t_u8)buf[2]; + PRINTM(MINFO, "Cmd52 write, func=%d, reg=0x%08X, data=0x%02X\n", + func, reg, data); + } + + if (!rw) { + sdio_claim_host(((struct sdio_mmc_card *)priv->phandle->card)-> + func); + if (func) + data = sdio_readb(((struct sdio_mmc_card *)priv-> + phandle->card)->func, reg, &ret); + else + data = sdio_f0_readb(((struct sdio_mmc_card *)priv-> + phandle->card)->func, reg, &ret); + sdio_release_host(((struct sdio_mmc_card *)priv->phandle-> + card)->func); + if (ret) { + PRINTM(MERROR, + "sdio_readb: reading register 0x%X failed\n", + reg); + goto done; + } + } else { + sdio_claim_host(((struct sdio_mmc_card *)priv->phandle->card)-> + func); + if (func) + sdio_writeb(((struct sdio_mmc_card *)priv->phandle-> + card)->func, data, reg, &ret); + else + sdio_f0_writeb(((struct sdio_mmc_card *)priv->phandle-> + card)->func, data, reg, &ret); + sdio_release_host(((struct sdio_mmc_card *)priv->phandle-> + card)->func); + if (ret) { + PRINTM(MERROR, + "sdio_writeb: writing register 0x%X failed\n", + reg); + goto done; + } + } + + buf[0] = data; + wrq->u.data.length = 1; + if (copy_to_user(wrq->u.data.pointer, buf, sizeof(int))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Cmd53 read/write register + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static int +woal_cmd53rdwr_ioctl(moal_private *priv, struct iwreq *wrq) +{ + t_u8 *buf = NULL; + t_u8 rw, func, mode; + t_u16 blklen = 0, blknum = 0; + int reg = 0, pattern_len = 0, pos = 0, ret = MLAN_STATUS_SUCCESS; + t_u32 total_len = 0; + t_u8 *data = NULL; + + ENTER(); + + buf = kmalloc(WOAL_2K_BYTES, GFP_KERNEL); + if (!buf) { + PRINTM(MERROR, "Cannot allocate buffer for command!\n"); + ret = -EFAULT; + goto done; + } + data = kmalloc(WOAL_2K_BYTES, GFP_KERNEL); + if (!data) { + PRINTM(MERROR, "Cannot allocate buffer for command!\n"); + ret = -EFAULT; + goto done; + } + if (wrq->u.data.length > WOAL_2K_BYTES) { + PRINTM(MERROR, "Data lengh is too large!\n"); + ret = -EINVAL; + goto done; + } + if (copy_from_user(buf, wrq->u.data.pointer, wrq->u.data.length)) { + PRINTM(MINFO, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + rw = buf[0]; /* read/write (0/1) */ + func = buf[1]; /* func (0/1/2) */ + reg = buf[5]; /* address */ + reg = (reg << 8) + buf[4]; + reg = (reg << 8) + buf[3]; + reg = (reg << 8) + buf[2]; + mode = buf[6]; /* byte mode/block mode (0/1) */ + blklen = buf[8]; /* block size */ + blklen = (blklen << 8) + buf[7]; + blknum = buf[10]; /* block number or byte number */ + blknum = (blknum << 8) + buf[9]; + + if (mode != BYTE_MODE) + mode = BLOCK_MODE; + total_len = (mode == BLOCK_MODE) ? blknum * blklen : blknum; + if (total_len > WOAL_2K_BYTES) { + PRINTM(MERROR, "Total data length is too large!\n"); + ret = -EINVAL; + goto done; + } + PRINTM(MINFO, + "CMD53 read/write, func = %d, addr = %#x, mode = %d, block size = %d, block(byte) number = %d\n", + func, reg, mode, blklen, blknum); + + if (!rw) { + sdio_claim_host(((struct sdio_mmc_card *)priv->phandle->card)-> + func); + if (sdio_readsb + (((struct sdio_mmc_card *)priv->phandle->card)->func, data, + reg, total_len)) + PRINTM(MERROR, + "sdio_readsb: reading memory 0x%x failed\n", + reg); + sdio_release_host(((struct sdio_mmc_card *)priv->phandle-> + card)->func); + + if (copy_to_user(wrq->u.data.pointer, data, total_len)) { + PRINTM(MINFO, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = total_len; + } else { + pattern_len = wrq->u.data.length - 11; + if (pattern_len > total_len) + pattern_len = total_len; + memset(data, 0, WOAL_2K_BYTES); + + /* Copy/duplicate the pattern to data buffer */ + for (pos = 0; pos < total_len; pos++) + data[pos] = buf[11 + (pos % pattern_len)]; + + sdio_claim_host(((struct sdio_mmc_card *)priv->phandle->card)-> + func); + if (sdio_writesb + (((struct sdio_mmc_card *)priv->phandle->card)->func, reg, + data, total_len)) + PRINTM(MERROR, + "sdio_writesb: writing memory 0x%x failed\n", + reg); + sdio_release_host(((struct sdio_mmc_card *)priv->phandle-> + card)->func); + } + +done: + kfree(buf); + kfree(data); + LEAVE(); + return ret; +} + +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) +/** + * @brief Set SDIO Multi-point aggregation control parameters + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0/MLAN_STATUS_PENDING --success, otherwise fail + */ +static int +woal_do_sdio_mpa_ctrl(moal_private *priv, struct iwreq *wrq) +{ + int data[6], data_length = wrq->u.data.length, copy_len; + int ret = 0; + mlan_ds_misc_cfg *misc = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (sizeof(int) * wrq->u.data.length > sizeof(data)) { + PRINTM(MERROR, "Too many arguments\n"); + ret = -EINVAL; + goto done; + } + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + misc = (mlan_ds_misc_cfg *)req->pbuf; + memset(misc, 0, sizeof(mlan_ds_misc_cfg)); + + misc->sub_command = MLAN_OID_MISC_SDIO_MPA_CTRL; + req->req_id = MLAN_IOCTL_MISC_CFG; + + /* Get the values first, then modify these values if user had modified + them */ + + req->action = MLAN_ACT_GET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "woal_request_ioctl returned %d\n", ret); + ret = -EFAULT; + goto done; + } + + if (data_length == 0) { + data[0] = misc->param.mpa_ctrl.tx_enable; + data[1] = misc->param.mpa_ctrl.rx_enable; + data[2] = misc->param.mpa_ctrl.tx_buf_size; + data[3] = misc->param.mpa_ctrl.rx_buf_size; + data[4] = misc->param.mpa_ctrl.tx_max_ports; + data[5] = misc->param.mpa_ctrl.rx_max_ports; + + PRINTM(MINFO, "Get Param: %d %d %d %d %d %d\n", data[0], + data[1], data[2], data[3], data[4], data[5]); + + if (copy_to_user(wrq->u.data.pointer, data, sizeof(data))) { + ret = -EFAULT; + goto done; + } + wrq->u.data.length = ARRAY_SIZE(data); + goto done; + } + + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MINFO, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + switch (data_length) { + case 6: + misc->param.mpa_ctrl.rx_max_ports = data[5]; + case 5: + misc->param.mpa_ctrl.tx_max_ports = data[4]; + case 4: + misc->param.mpa_ctrl.rx_buf_size = data[3]; + case 3: + misc->param.mpa_ctrl.tx_buf_size = data[2]; + case 2: + misc->param.mpa_ctrl.rx_enable = data[1]; + case 1: + /* Set cmd */ + req->action = MLAN_ACT_SET; + + PRINTM(MINFO, "Set Param: %d %d %d %d %d %d\n", data[0], + data[1], data[2], data[3], data[4], data[5]); + + misc->param.mpa_ctrl.tx_enable = data[0]; + break; + default: + PRINTM(MERROR, "Default case error\n"); + ret = -EINVAL; + goto done; + } + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "woal_request_ioctl returned %d\n", ret); + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} +#endif /* SDIO_MULTI_PORT_TX_AGGR || SDIO_MULTI_PORT_RX_AGGR */ + +/** + * @brief Set/Get scan configuration parameters + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_get_scan_cfg(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + int arg_len = 7; + int data[arg_len], copy_len; + mlan_ds_scan *scan = NULL; + mlan_ioctl_req *req = NULL; + int data_length = wrq->u.data.length; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_scan)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + if (data_length > arg_len) { + ret = -EINVAL; + goto done; + } + scan = (mlan_ds_scan *)req->pbuf; + scan->sub_command = MLAN_OID_SCAN_CONFIG; + req->req_id = MLAN_IOCTL_SCAN; + memset(data, 0, sizeof(data)); + + if (data_length) { + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if ((data[0] < 0) || (data[0] > MLAN_SCAN_TYPE_PASSIVE)) { + PRINTM(MERROR, "Invalid argument for scan type\n"); + ret = -EINVAL; + goto done; + } + if ((data[1] < 0) || (data[1] > MLAN_SCAN_MODE_ANY)) { + PRINTM(MERROR, "Invalid argument for scan mode\n"); + ret = -EINVAL; + goto done; + } + if ((data[2] < 0) || (data[2] > MAX_PROBES)) { + PRINTM(MERROR, "Invalid argument for scan probes\n"); + ret = -EINVAL; + goto done; + } + if (((data[3] < 0) || + (data[3] > MRVDRV_MAX_ACTIVE_SCAN_CHAN_TIME)) || + ((data[4] < 0) || + (data[4] > MRVDRV_MAX_ACTIVE_SCAN_CHAN_TIME)) || + ((data[5] < 0) || + (data[5] > MRVDRV_MAX_PASSIVE_SCAN_CHAN_TIME))) { + PRINTM(MERROR, "Invalid argument for scan time\n"); + ret = -EINVAL; + goto done; + } + if ((data[6] < 0) || (data[6] > 1)) { + PRINTM(MERROR, "Invalid argument for extended scan\n"); + ret = -EINVAL; + goto done; + } + req->action = MLAN_ACT_SET; + memcpy(&scan->param.scan_cfg, data, sizeof(data)); + } else + req->action = MLAN_ACT_GET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (!data_length) { + memcpy(data, &scan->param.scan_cfg, sizeof(data)); + if (copy_to_user(wrq->u.data.pointer, data, sizeof(data))) { + ret = -EFAULT; + goto done; + } + wrq->u.data.length = ARRAY_SIZE(data); + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get PS configuration parameters + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_get_ps_cfg(moal_private *priv, struct iwreq *wrq) +{ + int data[7], copy_len, ret = 0; + mlan_ds_pm_cfg *pm_cfg = NULL; + mlan_ioctl_req *req = NULL; + int allowed = 3; + int i = 3; + int data_length = wrq->u.data.length; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + allowed++; /* For ad-hoc awake period parameter */ + allowed++; /* For beacon missing timeout parameter */ + allowed += 2; /* For delay to PS and PS mode parameters */ + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + if (data_length > allowed) { + ret = -EINVAL; + goto done; + } + pm_cfg = (mlan_ds_pm_cfg *)req->pbuf; + pm_cfg->sub_command = MLAN_OID_PM_CFG_PS_CFG; + req->req_id = MLAN_IOCTL_PM_CFG; + memset(data, 0, sizeof(data)); + + if (data_length) { + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if ((data[0] < PS_NULL_DISABLE)) { + PRINTM(MERROR, + "Invalid argument for PS null interval\n"); + ret = -EINVAL; + goto done; + } + if ((data[1] != MRVDRV_IGNORE_MULTIPLE_DTIM) + && (data[1] != MRVDRV_MATCH_CLOSEST_DTIM) + && ((data[1] < MRVDRV_MIN_MULTIPLE_DTIM) + || (data[1] > MRVDRV_MAX_MULTIPLE_DTIM))) { + PRINTM(MERROR, "Invalid argument for multiple DTIM\n"); + ret = -EINVAL; + goto done; + } + + if ((data[2] < MRVDRV_MIN_LISTEN_INTERVAL) + && (data[2] != MRVDRV_LISTEN_INTERVAL_DISABLE)) { + PRINTM(MERROR, + "Invalid argument for listen interval\n"); + ret = -EINVAL; + goto done; + } + + if ((data[i] != SPECIAL_ADHOC_AWAKE_PD) && + ((data[i] < MIN_ADHOC_AWAKE_PD) || + (data[i] > MAX_ADHOC_AWAKE_PD))) { + PRINTM(MERROR, + "Invalid argument for adhoc awake period\n"); + ret = -EINVAL; + goto done; + } + i++; + if ((data[i] != DISABLE_BCN_MISS_TO) && + ((data[i] < MIN_BCN_MISS_TO) || + (data[i] > MAX_BCN_MISS_TO))) { + PRINTM(MERROR, + "Invalid argument for beacon miss timeout\n"); + ret = -EINVAL; + goto done; + } + i++; + if (data_length < allowed - 1) + data[i] = DELAY_TO_PS_UNCHANGED; + else if ((data[i] < MIN_DELAY_TO_PS) || + (data[i] > MAX_DELAY_TO_PS)) { + PRINTM(MERROR, "Invalid argument for delay to PS\n"); + ret = -EINVAL; + goto done; + } + i++; + if ((data[i] != PS_MODE_UNCHANGED) && (data[i] != PS_MODE_AUTO) + && (data[i] != PS_MODE_POLL) && (data[i] != PS_MODE_NULL)) { + PRINTM(MERROR, "Invalid argument for PS mode\n"); + ret = -EINVAL; + goto done; + } + i++; + req->action = MLAN_ACT_SET; + memcpy(&pm_cfg->param.ps_cfg, data, + MIN(sizeof(pm_cfg->param.ps_cfg), sizeof(data))); + } else + req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + memcpy(data, &pm_cfg->param.ps_cfg, + MIN((sizeof(int) * allowed), sizeof(pm_cfg->param.ps_cfg))); + if (copy_to_user(wrq->u.data.pointer, data, sizeof(int) * allowed)) { + ret = -EFAULT; + goto done; + } + wrq->u.data.length = allowed; + + if (req->action == MLAN_ACT_SET) { + pm_cfg = (mlan_ds_pm_cfg *)req->pbuf; + pm_cfg->sub_command = MLAN_OID_PM_CFG_IEEE_PS; + pm_cfg->param.ps_mode = 1; + req->req_id = MLAN_IOCTL_PM_CFG; + req->action = MLAN_ACT_SET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Private IOCTL entry to send an ADDTS TSPEC + * + * Receive a ADDTS command from the application. The command structure + * contains a TSPEC and timeout in milliseconds. The timeout is performed + * in the firmware after the ADDTS command frame is sent. + * + * The TSPEC is received in the API as an opaque block. The firmware will + * send the entire data block, including the bytes after the TSPEC. This + * is done to allow extra IEs to be packaged with the TSPEC in the ADDTS + * action frame. + * + * The IOCTL structure contains two return fields: + * - The firmware command result, which indicates failure and timeouts + * - The IEEE Status code which contains the corresponding value from + * any ADDTS response frame received. + * + * In addition, the opaque TSPEC data block passed in is replaced with the + * TSPEC received in the ADDTS response frame. In case of failure, the + * AP may modify the TSPEC on return and in the case of success, the + * medium time is returned as calculated by the AP. Along with the TSPEC, + * any IEs that are sent in the ADDTS response are also returned and can be + * parsed using the IOCTL length as an indicator of extra elements. + * + * The return value to the application layer indicates a driver execution + * success or failure. A successful return could still indicate a firmware + * failure or AP negotiation failure via the commandResult field copied + * back to the application. + * + * @param priv Pointer to the mlan_private driver data struct + * @param wrq A pointer to iwreq structure containing the + * wlan_ioctl_wmm_addts_req_t struct for this ADDTS request + * + * @return 0 if successful; IOCTL error code otherwise + */ +static int +woal_wmm_addts_req_ioctl(moal_private *priv, struct iwreq *wrq) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_wmm_cfg *cfg = NULL; + wlan_ioctl_wmm_addts_req_t addts_ioctl; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wmm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + req->req_id = MLAN_IOCTL_WMM_CFG; + cfg = (mlan_ds_wmm_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_WMM_CFG_ADDTS; + + memset(&addts_ioctl, 0x00, sizeof(addts_ioctl)); + + if (wrq->u.data.length) { + if (copy_from_user(&addts_ioctl, wrq->u.data.pointer, + MIN(wrq->u.data.length, + sizeof(addts_ioctl)))) { + PRINTM(MERROR, "TSPEC: ADDTS copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + cfg->param.addts.timeout = addts_ioctl.timeout_ms; + cfg->param.addts.ie_data_len = addts_ioctl.ie_data_len; + + if (cfg->param.addts.ie_data_len > + sizeof(cfg->param.addts.ie_data)) { + PRINTM(MERROR, "IE data length too large\n"); + ret = -EFAULT; + goto done; + } + + memcpy(cfg->param.addts.ie_data, + addts_ioctl.ie_data, cfg->param.addts.ie_data_len); + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + addts_ioctl.cmd_result = cfg->param.addts.result; + addts_ioctl.ieee_status_code = + (t_u8)cfg->param.addts.status_code; + addts_ioctl.ie_data_len = cfg->param.addts.ie_data_len; + + memcpy(addts_ioctl.ie_data, + cfg->param.addts.ie_data, cfg->param.addts.ie_data_len); + + wrq->u.data.length = (sizeof(addts_ioctl) + - sizeof(addts_ioctl.ie_data) + + cfg->param.addts.ie_data_len); + + if (copy_to_user(wrq->u.data.pointer, + &addts_ioctl, wrq->u.data.length)) { + PRINTM(MERROR, "TSPEC: ADDTS copy to user failed\n"); + ret = -EFAULT; + goto done; + } + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Private IOCTL entry to send a DELTS TSPEC + * + * Receive a DELTS command from the application. The command structure + * contains a TSPEC and reason code along with space for a command result + * to be returned. The information is packaged is sent to the wlan_cmd.c + * firmware command prep and send routines for execution in the firmware. + * + * The reason code is not used for WMM implementations but is indicated in + * the 802.11e specification. + * + * The return value to the application layer indicates a driver execution + * success or failure. A successful return could still indicate a firmware + * failure via the cmd_result field copied back to the application. + * + * @param priv Pointer to the mlan_private driver data struct + * @param wrq A pointer to iwreq structure containing the + * wlan_ioctl_wmm_delts_req_t struct for this DELTS request + * + * @return 0 if successful; IOCTL error code otherwise + */ +static int +woal_wmm_delts_req_ioctl(moal_private *priv, struct iwreq *wrq) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_wmm_cfg *cfg = NULL; + wlan_ioctl_wmm_delts_req_t delts_ioctl; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wmm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + req->req_id = MLAN_IOCTL_WMM_CFG; + cfg = (mlan_ds_wmm_cfg *)req->pbuf; + cfg->sub_command = MLAN_OID_WMM_CFG_DELTS; + + memset(&delts_ioctl, 0x00, sizeof(delts_ioctl)); + + if (wrq->u.data.length) { + if (copy_from_user(&delts_ioctl, wrq->u.data.pointer, + MIN(wrq->u.data.length, + sizeof(delts_ioctl)))) { + PRINTM(MERROR, "TSPEC: DELTS copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + cfg->param.delts.status_code = + (t_u32)delts_ioctl.ieee_reason_code; + cfg->param.delts.ie_data_len = (t_u8)delts_ioctl.ie_data_len; + + if ((cfg->param.delts.ie_data_len) > + sizeof(cfg->param.delts.ie_data)) { + PRINTM(MERROR, "IE data length too large\n"); + ret = -EFAULT; + goto done; + } + + memcpy(cfg->param.delts.ie_data, + delts_ioctl.ie_data, cfg->param.delts.ie_data_len); + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* Return the firmware command result back to the application + layer */ + delts_ioctl.cmd_result = cfg->param.delts.result; + wrq->u.data.length = sizeof(delts_ioctl); + + if (copy_to_user(wrq->u.data.pointer, + &delts_ioctl, wrq->u.data.length)) { + PRINTM(MERROR, "TSPEC: DELTS copy to user failed\n"); + ret = -EFAULT; + goto done; + } + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Private IOCTL entry to get/set a specified AC Queue's parameters + * + * Receive a AC Queue configuration command which is used to get, set, or + * default the parameters associated with a specific WMM AC Queue. + * + * @param priv Pointer to the mlan_private driver data struct + * @param wrq A pointer to iwreq structure containing the + * wlan_ioctl_wmm_queue_config_t struct + * + * @return 0 if successful; IOCTL error code otherwise + */ +static int +woal_wmm_queue_config_ioctl(moal_private *priv, struct iwreq *wrq) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_wmm_cfg *pwmm = NULL; + mlan_ds_wmm_queue_config *pqcfg = NULL; + wlan_ioctl_wmm_queue_config_t qcfg_ioctl; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wmm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + req->req_id = MLAN_IOCTL_WMM_CFG; + pwmm = (mlan_ds_wmm_cfg *)req->pbuf; + pwmm->sub_command = MLAN_OID_WMM_CFG_QUEUE_CONFIG; + + memset(&qcfg_ioctl, 0x00, sizeof(qcfg_ioctl)); + pqcfg = (mlan_ds_wmm_queue_config *)&pwmm->param.q_cfg; + + if (wrq->u.data.length) { + if (copy_from_user(&qcfg_ioctl, wrq->u.data.pointer, + MIN(wrq->u.data.length, + sizeof(qcfg_ioctl)))) { + PRINTM(MERROR, "QCONFIG: copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + pqcfg->action = qcfg_ioctl.action; + pqcfg->access_category = qcfg_ioctl.access_category; + pqcfg->msdu_lifetime_expiry = qcfg_ioctl.msdu_lifetime_expiry; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + memset(&qcfg_ioctl, 0x00, sizeof(qcfg_ioctl)); + qcfg_ioctl.action = pqcfg->action; + qcfg_ioctl.access_category = pqcfg->access_category; + qcfg_ioctl.msdu_lifetime_expiry = pqcfg->msdu_lifetime_expiry; + wrq->u.data.length = sizeof(qcfg_ioctl); + + if (copy_to_user + (wrq->u.data.pointer, &qcfg_ioctl, wrq->u.data.length)) { + PRINTM(MERROR, "QCONFIG: copy to user failed\n"); + ret = -EFAULT; + goto done; + } + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Private IOCTL entry to get and start/stop queue stats on a WMM AC + * + * Receive a AC Queue statistics command from the application for a specific + * WMM AC. The command can: + * - Turn stats on + * - Turn stats off + * - Collect and clear the stats + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq A pointer to iwreq structure containing the + * wlan_ioctl_wmm_queue_stats_t struct + * + * @return 0 if successful; IOCTL error code otherwise + */ +static int +woal_wmm_queue_stats_ioctl(moal_private *priv, struct iwreq *wrq) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_wmm_cfg *pwmm = NULL; + mlan_ds_wmm_queue_stats *pqstats = NULL; + wlan_ioctl_wmm_queue_stats_t qstats_ioctl; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wmm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + req->req_id = MLAN_IOCTL_WMM_CFG; + pwmm = (mlan_ds_wmm_cfg *)req->pbuf; + pwmm->sub_command = MLAN_OID_WMM_CFG_QUEUE_STATS; + + memset(&qstats_ioctl, 0x00, sizeof(qstats_ioctl)); + pqstats = (mlan_ds_wmm_queue_stats *)&pwmm->param.q_stats; + + if (wrq->u.data.length) { + if (copy_from_user(&qstats_ioctl, wrq->u.data.pointer, + MIN(wrq->u.data.length, + sizeof(qstats_ioctl)))) { + PRINTM(MERROR, "QSTATS: copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + memcpy((void *)pqstats, (void *)&qstats_ioctl, + sizeof(qstats_ioctl)); + PRINTM(MINFO, "QSTATS: IOCTL [%d,%d]\n", qstats_ioctl.action, + qstats_ioctl.user_priority); + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memset(&qstats_ioctl, 0x00, sizeof(qstats_ioctl)); + memcpy((void *)&qstats_ioctl, (void *)pqstats, + sizeof(qstats_ioctl)); + wrq->u.data.length = sizeof(qstats_ioctl); + + if (copy_to_user + (wrq->u.data.pointer, &qstats_ioctl, wrq->u.data.length)) { + PRINTM(MERROR, "QSTATS: copy to user failed\n"); + ret = -EFAULT; + goto done; + } + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Private IOCTL entry to get the status of the WMM queues + * + * Return the following information for each WMM AC: + * - WMM IE Acm Required + * - Firmware Flow Required + * - Firmware Flow Established + * - Firmware Queue Enabled + * - Firmware Delivery Enabled + * - Firmware Trigger Enabled + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq A pointer to iwreq structure containing the + * wlan_ioctl_wmm_queue_status_t struct for request + * + * @return 0 if successful; IOCTL error code otherwise + */ +static int +woal_wmm_queue_status_ioctl(moal_private *priv, struct iwreq *wrq) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_wmm_cfg *pwmm = NULL; + wlan_ioctl_wmm_queue_status_t qstatus_ioctl; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wmm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + req->req_id = MLAN_IOCTL_WMM_CFG; + pwmm = (mlan_ds_wmm_cfg *)req->pbuf; + pwmm->sub_command = MLAN_OID_WMM_CFG_QUEUE_STATUS; + + if (wrq->u.data.length == sizeof(qstatus_ioctl)) { + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memset(&qstatus_ioctl, 0x00, sizeof(qstatus_ioctl)); + memcpy((void *)&qstatus_ioctl, (void *)&pwmm->param.q_status, + sizeof(qstatus_ioctl)); + wrq->u.data.length = sizeof(qstatus_ioctl); + } else { + wrq->u.data.length = 0; + } + + if (copy_to_user + (wrq->u.data.pointer, &qstatus_ioctl, wrq->u.data.length)) { + PRINTM(MERROR, "QSTATUS: copy to user failed\n"); + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Private IOCTL entry to get the status of the WMM Traffic Streams + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq A pointer to iwreq structure containing the + * wlan_ioctl_wmm_ts_status_t struct for request + * + * @return 0 if successful; IOCTL error code otherwise + */ +static int +woal_wmm_ts_status_ioctl(moal_private *priv, struct iwreq *wrq) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_wmm_cfg *pwmm = NULL; + wlan_ioctl_wmm_ts_status_t ts_status_ioctl; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wmm_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + req->req_id = MLAN_IOCTL_WMM_CFG; + pwmm = (mlan_ds_wmm_cfg *)req->pbuf; + pwmm->sub_command = MLAN_OID_WMM_CFG_TS_STATUS; + + memset(&ts_status_ioctl, 0x00, sizeof(ts_status_ioctl)); + + if (wrq->u.data.length == sizeof(ts_status_ioctl)) { + if (copy_from_user(&ts_status_ioctl, wrq->u.data.pointer, + MIN(wrq->u.data.length, + sizeof(ts_status_ioctl)))) { + PRINTM(MERROR, "TS_STATUS: copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + memset(&pwmm->param.ts_status, 0x00, sizeof(ts_status_ioctl)); + pwmm->param.ts_status.tid = ts_status_ioctl.tid; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + memset(&ts_status_ioctl, 0x00, sizeof(ts_status_ioctl)); + memcpy((void *)&ts_status_ioctl, (void *)&pwmm->param.ts_status, + sizeof(ts_status_ioctl)); + wrq->u.data.length = sizeof(ts_status_ioctl); + } else { + wrq->u.data.length = 0; + } + + if (copy_to_user + (wrq->u.data.pointer, &ts_status_ioctl, wrq->u.data.length)) { + PRINTM(MERROR, "TS_STATUS: copy to user failed\n"); + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Private IOCTL entry to get the By-passed TX packet from upper layer + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq A pointer to iwreq structure containing the packet + * + * @return 0 if successful; IOCTL error code otherwise + */ +static int +woal_bypassed_packet_ioctl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + struct sk_buff *skb = NULL; + struct ethhdr *eth; + t_u16 moreLen = 0, copyLen = 0; + ENTER(); + +#define MLAN_BYPASS_PKT_EXTRA_OFFSET (4) + + copyLen = wrq->u.data.length; + moreLen = MLAN_MIN_DATA_HEADER_LEN + MLAN_BYPASS_PKT_EXTRA_OFFSET + + sizeof(mlan_buffer); + + skb = alloc_skb(copyLen + moreLen, GFP_KERNEL); + if (skb == NULL) { + PRINTM(MERROR, "kmalloc no memory !!\n"); + LEAVE(); + return -ENOMEM; + } + + skb_reserve(skb, moreLen); + + if (copy_from_user(skb_put(skb, copyLen), wrq->u.data.pointer, copyLen)) { + PRINTM(MERROR, "PortBlock: copy from user failed\n"); + dev_kfree_skb_any(skb); + ret = -EFAULT; + goto done; + } + + eth = (struct ethhdr *)skb->data; + eth->h_proto = __constant_htons(eth->h_proto); + skb->dev = priv->netdev; + + HEXDUMP("Bypass TX Data", skb->data, MIN(skb->len, 100)); + + woal_hard_start_xmit(skb, priv->netdev); +done: + LEAVE(); + return ret; +} + +/** + * @brief Set/Get auth type + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_auth_type(moal_private *priv, struct iwreq *wrq) +{ + int auth_type; + t_u32 auth_mode; + int ret = 0; + + ENTER(); + if (wrq->u.data.length == 0) { + if (MLAN_STATUS_SUCCESS != + woal_get_auth_mode(priv, MOAL_IOCTL_WAIT, &auth_mode)) { + ret = -EFAULT; + goto done; + } + auth_type = auth_mode; + if (copy_to_user + (wrq->u.data.pointer, &auth_type, sizeof(auth_type))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + } else { + if (copy_from_user + (&auth_type, wrq->u.data.pointer, sizeof(auth_type))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + PRINTM(MINFO, "SET: auth_type %d\n", auth_type); + if (((auth_type < MLAN_AUTH_MODE_OPEN) || + (auth_type > MLAN_AUTH_MODE_SHARED)) + && (auth_type != MLAN_AUTH_MODE_AUTO)) { + ret = -EINVAL; + goto done; + } + auth_mode = auth_type; + if (MLAN_STATUS_SUCCESS != + woal_set_auth_mode(priv, MOAL_IOCTL_WAIT, auth_mode)) { + ret = -EFAULT; + goto done; + } + } +done: + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Port Control mode + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_port_ctrl(moal_private *priv, struct iwreq *wrq) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_PORT_CTRL_ENABLED; + req->req_id = MLAN_IOCTL_SEC_CFG; + + if (wrq->u.data.length) { + if (copy_from_user(&sec->param.port_ctrl_enabled, + wrq->u.data.pointer, sizeof(int)) != 0) { + PRINTM(MERROR, "port_ctrl:Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + req->action = MLAN_ACT_SET; + } else { + req->action = MLAN_ACT_GET; + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (!wrq->u.data.length) { + if (copy_to_user + (wrq->u.data.pointer, &sec->param.port_ctrl_enabled, + sizeof(int))) { + PRINTM(MERROR, "port_ctrl:Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +#if defined(DFS_TESTING_SUPPORT) +/** + * @brief Set/Get DFS Testing settings + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_dfs_testing(moal_private *priv, struct iwreq *wrq) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_11h_cfg *ds_11hcfg = NULL; + int ret = 0; + int data[4], copy_len; + int data_length = wrq->u.data.length; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11h_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + ds_11hcfg = (mlan_ds_11h_cfg *)req->pbuf; + ds_11hcfg->sub_command = MLAN_OID_11H_DFS_TESTING; + req->req_id = MLAN_IOCTL_11H_CFG; + + if (!data_length) { + req->action = MLAN_ACT_GET; + } else if (data_length == 4) { + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if ((unsigned)data[0] > 0xFFFF) { + PRINTM(MERROR, "The maximum user CAC is 65535 msec.\n"); + ret = -EINVAL; + goto done; + } + if ((unsigned)data[1] > 0xFFFF) { + PRINTM(MERROR, "The maximum user NOP is 65535 sec.\n"); + ret = -EINVAL; + goto done; + } + if ((unsigned)data[3] > 0xFF) { + PRINTM(MERROR, + "The maximum user fixed channel is 255.\n"); + ret = -EINVAL; + goto done; + } + ds_11hcfg->param.dfs_testing.usr_cac_period_msec = + (t_u16)data[0]; + ds_11hcfg->param.dfs_testing.usr_nop_period_sec = + (t_u16)data[1]; + ds_11hcfg->param.dfs_testing.usr_no_chan_change = + data[2] ? 1 : 0; + ds_11hcfg->param.dfs_testing.usr_fixed_new_chan = (t_u8)data[3]; + priv->phandle->cac_period_jiffies = (t_u16)data[0] * HZ / 1000; + req->action = MLAN_ACT_SET; + } else { + PRINTM(MERROR, "Invalid number of args!\n"); + ret = -EINVAL; + goto done; + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (!data_length) { + data[0] = ds_11hcfg->param.dfs_testing.usr_cac_period_msec; + data[1] = ds_11hcfg->param.dfs_testing.usr_nop_period_sec; + data[2] = ds_11hcfg->param.dfs_testing.usr_no_chan_change; + data[3] = ds_11hcfg->param.dfs_testing.usr_fixed_new_chan; + if (copy_to_user(wrq->u.data.pointer, &data, sizeof(int) * 4)) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 4; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} +#endif /* DFS_SUPPORT && DFS_TESTING_SUPPORT */ + +/** + * @brief Set/Get Mgmt Frame passthru mask + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 -- success, otherwise fail + */ +static int +woal_mgmt_frame_passthru_ctrl(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0, data_length = wrq->u.data.length; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *mgmt_cfg = NULL; + int mask = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (data_length > 1) { + PRINTM(MERROR, "Invalid no of arguments!\n"); + ret = -EINVAL; + goto done; + } + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + mgmt_cfg = (mlan_ds_misc_cfg *)req->pbuf; + req->req_id = MLAN_IOCTL_MISC_CFG; + mgmt_cfg->sub_command = MLAN_OID_MISC_RX_MGMT_IND; + + if (data_length) { /* SET */ + if (copy_from_user(&mask, wrq->u.data.pointer, sizeof(int))) { + PRINTM(MERROR, "copy from user failed\n"); + ret = -EFAULT; + goto done; + } + mgmt_cfg->param.mgmt_subtype_mask = mask; + req->action = MLAN_ACT_SET; + } else { + req->action = MLAN_ACT_GET; + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + mask = mgmt_cfg->param.mgmt_subtype_mask; + if (copy_to_user(wrq->u.data.pointer, &mask, sizeof(int))) { + ret = -EFAULT; + goto done; + } + wrq->u.data.length = 1; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get CFP table codes + * + * @param priv Pointer to the moal_private driver data struct + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_cfp_code(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + int data[2], copy_len; + int data_length = wrq->u.data.length; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *misc_cfg = NULL; + mlan_ds_misc_cfp_code *cfp_code = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (data_length > 2) { + PRINTM(MERROR, "Invalid number of argument!\n"); + ret = -EINVAL; + goto done; + } + copy_len = MIN(sizeof(data), sizeof(int) * data_length); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + misc_cfg = (mlan_ds_misc_cfg *)req->pbuf; + cfp_code = &misc_cfg->param.cfp_code; + misc_cfg->sub_command = MLAN_OID_MISC_CFP_CODE; + req->req_id = MLAN_IOCTL_MISC_CFG; + + if (!data_length) { + req->action = MLAN_ACT_GET; + } else { + if (copy_from_user(data, wrq->u.data.pointer, copy_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + cfp_code->cfp_code_bg = data[0]; + if (data_length == 2) + cfp_code->cfp_code_a = data[1]; + req->action = MLAN_ACT_SET; + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (!data_length) { + data[0] = cfp_code->cfp_code_bg; + data[1] = cfp_code->cfp_code_a; + data_length = 2; + if (copy_to_user + (wrq->u.data.pointer, &data, sizeof(int) * data_length)) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + goto done; + } + wrq->u.data.length = data_length; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Tx/Rx antenna + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_get_tx_rx_ant(moal_private *priv, struct iwreq *wrq) +{ + int ret = 0; + mlan_ds_radio_cfg *radio = NULL; + mlan_ioctl_req *req = NULL; + int data[3] = { 0 }; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (wrq->u.data.length > 2) { + PRINTM(MERROR, "Invalid number of argument!\n"); + ret = -EFAULT; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_radio_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + radio = (mlan_ds_radio_cfg *)req->pbuf; + radio->sub_command = MLAN_OID_ANT_CFG; + req->req_id = MLAN_IOCTL_RADIO_CFG; + if (wrq->u.data.length) { + if (copy_from_user + (data, wrq->u.data.pointer, + wrq->u.data.length * sizeof(int))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + if (priv->phandle->feature_control & FEATURE_CTRL_STREAM_2X2) { + radio->param.ant_cfg.tx_antenna = data[0]; + radio->param.ant_cfg.rx_antenna = data[0]; + if (wrq->u.data.length == 2) + radio->param.ant_cfg.rx_antenna = data[1]; + } else { + radio->param.ant_cfg_1x1.antenna = data[0]; + if (wrq->u.data.length == 2) + radio->param.ant_cfg_1x1.evaluate_time = + data[1]; + } + req->action = MLAN_ACT_SET; + } else + req->action = MLAN_ACT_GET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (!wrq->u.data.length) { + wrq->u.data.length = 1; + if (priv->phandle->feature_control & FEATURE_CTRL_STREAM_2X2) { + data[0] = radio->param.ant_cfg.tx_antenna; + data[1] = radio->param.ant_cfg.rx_antenna; + if (data[0] && data[1] && (data[0] != data[1])) + wrq->u.data.length = 2; + } else { + data[0] = (int)radio->param.ant_cfg_1x1.antenna; + data[1] = (int)radio->param.ant_cfg_1x1.evaluate_time; + data[2] = (int)radio->param.ant_cfg_1x1.current_antenna; + if (data[0] == 0xffff && data[2] > 0) + wrq->u.data.length = 3; + else if (data[0] == 0xffff) + wrq->u.data.length = 2; + } + if (copy_to_user + (wrq->u.data.pointer, data, + wrq->u.data.length * sizeof(int))) + { + ret = -EFAULT; + goto done; + } + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/******************************************************** + Global Functions +********************************************************/ +/** + * @brief ioctl function - entry point + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @param cmd Command + * + * @return 0 --success, otherwise fail + */ +int +woal_wext_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + struct iwreq *wrq = (struct iwreq *)req; + int ret = 0; + + if (!IS_STA_WEXT(cfg80211_wext)) + return -EOPNOTSUPP; + + ENTER(); + + PRINTM(MINFO, "woal_wext_do_ioctl: ioctl cmd = 0x%x\n", cmd); + switch (cmd) { + case WOAL_SETONEINT_GETWORDCHAR: + switch (wrq->u.data.flags) { + case WOAL_VERSION: /* Get driver version */ + ret = woal_get_driver_version(priv, req); + break; + case WOAL_VEREXT: /* Get extended driver version */ + ret = woal_get_driver_verext(priv, req); + break; + default: + ret = -EOPNOTSUPP; + break; + } + break; + case WOAL_SETNONE_GETNONE: + switch (wrq->u.data.flags) { + case WOAL_WARMRESET: + ret = woal_warm_reset(priv); + break; + case WOAL_11D_CLR_CHAN_TABLE: + ret = woal_11d_clr_chan_table(priv, wrq); + break; + default: + ret = -EOPNOTSUPP; + break; + } + break; + case WOAL_SETONEINT_GETONEINT: + switch (wrq->u.data.flags) { + case WOAL_SET_GET_TXRATE: + ret = woal_set_get_txrate(priv, wrq); + break; + case WOAL_SET_GET_REGIONCODE: + ret = woal_set_get_regioncode(priv, wrq); + break; + case WOAL_SET_RADIO: + ret = woal_set_get_radio(priv, wrq); + break; + case WOAL_WMM_ENABLE: + ret = woal_wmm_enable_ioctl(priv, wrq); + break; + case WOAL_11D_ENABLE: + ret = woal_11d_enable_ioctl(priv, wrq); + break; + case WOAL_SET_GET_QOS_CFG: + ret = woal_set_get_qos_cfg(priv, wrq); + break; +#if defined(REASSOCIATION) + case WOAL_SET_GET_REASSOC: + ret = woal_set_get_reassoc(priv, wrq); + break; +#endif /* REASSOCIATION */ + case WOAL_TXBUF_CFG: + ret = woal_txbuf_cfg(priv, wrq); + break; + case WOAL_SET_GET_WWS_CFG: + ret = woal_wws_cfg(priv, wrq); + break; + case WOAL_SLEEP_PD: + ret = woal_sleep_pd(priv, wrq); + break; + case WOAL_AUTH_TYPE: + ret = woal_auth_type(priv, wrq); + break; + case WOAL_PORT_CTRL: + ret = woal_port_ctrl(priv, wrq); + break; + case WOAL_COALESCING_STATUS: + ret = woal_coalescing_status_ioctl(priv, wrq); + break; +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) + case WOAL_SET_GET_BSS_ROLE: + ret = woal_set_get_bss_role(priv, wrq); + break; +#endif +#endif + case WOAL_SET_GET_11H_LOCAL_PWR_CONSTRAINT: + ret = woal_set_get_11h_local_pwr_constraint(priv, wrq); + break; + case WOAL_HT_STREAM_CFG: + ret = woal_ht_stream_cfg_ioctl(priv, wrq); + break; + case WOAL_MAC_CONTROL: + ret = woal_mac_control_ioctl(priv, wrq); + break; + case WOAL_THERMAL: + ret = woal_thermal_ioctl(priv, wrq); + break; + case WOAL_CFG_HOTSPOT: + ret = woal_cfg_hotspot(priv, wrq); + break; + default: + ret = -EOPNOTSUPP; + break; + } + break; + + case WOAL_SET_GET_SIXTEEN_INT: + switch ((int)wrq->u.data.flags) { + case WOAL_TX_POWERCFG: + ret = woal_tx_power_cfg(priv, wrq); + break; +#ifdef DEBUG_LEVEL1 + case WOAL_DRV_DBG: + ret = woal_drv_dbg(priv, wrq); + break; +#endif + case WOAL_BEACON_INTERVAL: + ret = woal_beacon_interval(priv, wrq); + break; + case WOAL_SIGNAL: + ret = woal_get_signal(priv, wrq); + break; + case WOAL_DEEP_SLEEP: + ret = woal_deep_sleep_ioctl(priv, wrq); + break; + case WOAL_11N_TX_CFG: + ret = woal_11n_tx_cfg(priv, wrq); + break; + case WOAL_11N_AMSDU_AGGR_CTRL: + ret = woal_11n_amsdu_aggr_ctrl(priv, wrq); + break; + case WOAL_11N_HTCAP_CFG: + ret = woal_11n_htcap_cfg(priv, wrq); + break; + case WOAL_PRIO_TBL: + ret = woal_11n_prio_tbl(priv, wrq); + break; + case WOAL_ADDBA_UPDT: + ret = woal_addba_para_updt(priv, wrq); + break; + case WOAL_ADDBA_REJECT: + ret = woal_addba_reject(priv, wrq); + break; + case WOAL_TX_BF_CAP: + ret = woal_tx_bf_cap_ioctl(priv, wrq); + break; + case WOAL_HS_CFG: + ret = woal_hs_cfg(priv, wrq, MTRUE); + break; + case WOAL_HS_SETPARA: + ret = woal_hs_setpara(priv, wrq); + break; + case WOAL_REG_READ_WRITE: + ret = woal_reg_read_write(priv, wrq); + break; + case WOAL_INACTIVITY_TIMEOUT_EXT: + ret = woal_inactivity_timeout_ext(priv, wrq); + break; + case WOAL_SDIO_CLOCK: + ret = woal_sdio_clock_ioctl(priv, wrq); + break; + case WOAL_CMD_52RDWR: + ret = woal_cmd52rdwr_ioctl(priv, wrq); + break; + case WOAL_BAND_CFG: + ret = woal_band_cfg(priv, wrq); + break; + case WOAL_SCAN_CFG: + ret = woal_set_get_scan_cfg(priv, wrq); + break; + case WOAL_PS_CFG: + ret = woal_set_get_ps_cfg(priv, wrq); + break; + case WOAL_MEM_READ_WRITE: + ret = woal_mem_read_write(priv, wrq); + break; +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + case WOAL_SDIO_MPA_CTRL: + ret = woal_do_sdio_mpa_ctrl(priv, wrq); + break; +#endif + case WOAL_SLEEP_PARAMS: + ret = woal_sleep_params_ioctl(priv, wrq); + break; +#if defined(DFS_TESTING_SUPPORT) + case WOAL_DFS_TESTING: + ret = woal_dfs_testing(priv, wrq); + break; +#endif + case WOAL_MGMT_FRAME_CTRL: + ret = woal_mgmt_frame_passthru_ctrl(priv, wrq); + break; + case WOAL_CFP_CODE: + ret = woal_cfp_code(priv, wrq); + break; + case WOAL_SET_GET_TX_RX_ANT: + ret = woal_set_get_tx_rx_ant(priv, wrq); + break; + default: + ret = -EINVAL; + break; + } + break; + + case WOALGETLOG: + ret = woal_get_log(priv, wrq); + break; + + case WOAL_SET_GET_256_CHAR: + switch (wrq->u.data.flags) { + case WOAL_PASSPHRASE: + ret = woal_passphrase(priv, wrq); + break; + case WOAL_ADHOC_AES: + ret = woal_adhoc_aes_ioctl(priv, wrq); + break; + case WOAL_GET_KEY: + ret = woal_get_key_ioctl(priv, wrq); + break; + case WOAL_ASSOCIATE: + ret = woal_associate_ssid_bssid(priv, wrq); + break; + case WOAL_WMM_QUEUE_STATUS: + ret = woal_wmm_queue_status_ioctl(priv, wrq); + break; + + case WOAL_WMM_TS_STATUS: + ret = woal_wmm_ts_status_ioctl(priv, wrq); + break; + case WOAL_IP_ADDRESS: + ret = woal_set_get_ip_addr(priv, wrq); + break; + case WOAL_TX_BF_CFG: + ret = woal_tx_bf_cfg_ioctl(priv, wrq); + break; + default: + ret = -EINVAL; + break; + } + break; + + case WOAL_SETADDR_GETNONE: + switch ((int)wrq->u.data.flags) { + case WOAL_DEAUTH: + ret = woal_deauth(priv, wrq); + break; + default: + ret = -EINVAL; + break; + } + break; + + case WOAL_SETNONE_GETTWELVE_CHAR: + /* + * We've not used IW_PRIV_TYPE_FIXED so sub-ioctl number is + * in flags of iwreq structure, otherwise it will be in + * mode member of iwreq structure. + */ + switch ((int)wrq->u.data.flags) { + case WOAL_WPS_SESSION: + ret = woal_wps_cfg_ioctl(priv, wrq); + break; + default: + ret = -EINVAL; + break; + } + break; + case WOAL_SETNONE_GET_FOUR_INT: + switch ((int)wrq->u.data.flags) { + case WOAL_DATA_RATE: + ret = woal_get_txrx_rate(priv, wrq); + break; + case WOAL_ESUPP_MODE: + ret = woal_get_esupp_mode(priv, wrq); + break; + default: + ret = -EINVAL; + break; + } + break; + + case WOAL_SET_GET_64_INT: + switch ((int)wrq->u.data.flags) { + case WOAL_ECL_SYS_CLOCK: + ret = woal_ecl_sys_clock(priv, wrq); + break; + } + + break; + + case WOAL_HOST_CMD: + ret = woal_host_command(priv, wrq); + break; + case WOAL_ARP_FILTER: + ret = woal_arp_filter(priv, wrq); + break; + case WOAL_SET_INTS_GET_CHARS: + switch ((int)wrq->u.data.flags) { + case WOAL_READ_EEPROM: + ret = woal_read_eeprom(priv, wrq); + break; + } + break; + case WOAL_SET_GET_2K_BYTES: + switch ((int)wrq->u.data.flags) { + case WOAL_CMD_53RDWR: + ret = woal_cmd53rdwr_ioctl(priv, wrq); + break; + case WOAL_SET_USER_SCAN: + ret = woal_set_user_scan_ioctl(priv, wrq); + break; + case WOAL_GET_SCAN_TABLE: + ret = woal_get_scan_table_ioctl(priv, wrq); + break; + case WOAL_SET_USER_SCAN_EXT: + ret = woal_set_user_scan_ext_ioctl(priv, wrq); + break; + case WOAL_WMM_ADDTS: + ret = woal_wmm_addts_req_ioctl(priv, wrq); + break; + case WOAL_WMM_DELTS: + ret = woal_wmm_delts_req_ioctl(priv, wrq); + break; + case WOAL_WMM_QUEUE_CONFIG: + ret = woal_wmm_queue_config_ioctl(priv, wrq); + break; + case WOAL_WMM_QUEUE_STATS: + ret = woal_wmm_queue_stats_ioctl(priv, wrq); + break; + case WOAL_BYPASSED_PACKET: + ret = woal_bypassed_packet_ioctl(priv, wrq); + break; + default: + ret = -EINVAL; + break; + } + break; + +#ifdef UAP_WEXT + case WOAL_FROYO_START: + break; + case WOAL_FROYO_WL_FW_RELOAD: + break; + case WOAL_FROYO_STOP: + if (IS_UAP_WEXT(cfg80211_wext) && MLAN_STATUS_SUCCESS != + woal_disconnect(priv, MOAL_IOCTL_WAIT, NULL)) { + ret = -EFAULT; + } + break; +#endif + default: + ret = -EINVAL; + break; + } + + LEAVE(); + return ret; +} + +/** + * @brief Get data rates + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param m_rates A pointer to moal_802_11_rates structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_get_data_rates(moal_private *priv, t_u8 wait_option, + moal_802_11_rates *m_rates) +{ + int ret = 0; + mlan_ds_rate *rate = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_rate)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + rate = (mlan_ds_rate *)req->pbuf; + rate->sub_command = MLAN_OID_SUPPORTED_RATES; + req->req_id = MLAN_IOCTL_RATE; + req->action = MLAN_ACT_GET; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); + if (status == MLAN_STATUS_SUCCESS) { + if (m_rates) + m_rates->num_of_rates = + woal_copy_rates(m_rates->rates, + m_rates->num_of_rates, + rate->param.rates, + MLAN_SUPPORTED_RATES); + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Get channel list + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param chan_list A pointer to mlan_chan_list structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_get_channel_list(moal_private *priv, t_u8 wait_option, + mlan_chan_list *chan_list) +{ + int ret = 0; + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + /* Fill request buffer */ + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_BSS_CHANNEL_LIST; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_GET; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); + if (status == MLAN_STATUS_SUCCESS) { + if (chan_list) { + memcpy(chan_list, &bss->param.chanlist, + sizeof(mlan_chan_list)); + } + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Handle get info resp + * + * @param priv Pointer to moal_private structure + * @param info Pointer to mlan_ds_get_info structure + * + * @return N/A + */ +void +woal_ioctl_get_info_resp(moal_private *priv, mlan_ds_get_info *info) +{ + ENTER(); + switch (info->sub_command) { + case MLAN_OID_GET_STATS: + priv->w_stats.discard.fragment = info->param.stats.fcs_error; + priv->w_stats.discard.retries = info->param.stats.retry; + priv->w_stats.discard.misc = info->param.stats.ack_failure; + break; + case MLAN_OID_GET_SIGNAL: + if (info->param.signal.selector & BCN_RSSI_AVG_MASK) + priv->w_stats.qual.level = + info->param.signal.bcn_rssi_avg; + if (info->param.signal.selector & BCN_NF_AVG_MASK) + priv->w_stats.qual.noise = + info->param.signal.bcn_nf_avg; + break; + default: + break; + } + LEAVE(); +} + +/** + * @brief Handle get BSS resp + * + * @param priv Pointer to moal_private structure + * @param bss Pointer to mlan_ds_bss structure + * + * @return N/A + */ +void +woal_ioctl_get_bss_resp(moal_private *priv, mlan_ds_bss *bss) +{ + t_u32 mode = 0; + + ENTER(); + + switch (bss->sub_command) { + case MLAN_OID_BSS_MODE: + if (bss->param.bss_mode == MLAN_BSS_MODE_INFRA) + mode = IW_MODE_INFRA; + else if (bss->param.bss_mode == MLAN_BSS_MODE_IBSS) + mode = IW_MODE_ADHOC; + else + mode = IW_MODE_AUTO; + priv->w_stats.status = mode; + break; + default: + break; + } + + LEAVE(); + return; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_priv.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_priv.h new file mode 100644 index 00000000..7253e6e0 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_priv.h @@ -0,0 +1,762 @@ +/** @file moal_priv.h + * + * @brief This file contains definition for extended private IOCTL call. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/******************************************************** +Change log: + 10/31/2008: initial version +********************************************************/ + +#ifndef _WOAL_PRIV_H_ +#define _WOAL_PRIV_H_ + +/** 2K bytes */ +#define WOAL_2K_BYTES 2000 + +/** PRIVATE CMD ID */ +#define WOAL_IOCTL (SIOCIWFIRSTPRIV) /* 0x8BE0 defined in + wireless.h */ + +/** Private command ID to set one int/get word char */ +#define WOAL_SETONEINT_GETWORDCHAR (WOAL_IOCTL + 1) +/** Private command ID to get version */ +#define WOAL_VERSION 1 +/** Private command ID to get extended version */ +#define WOAL_VEREXT 2 + +/** Private command ID to set/get none */ +#define WOAL_SETNONE_GETNONE (WOAL_IOCTL + 2) +/** Private command ID for warm reset */ +#define WOAL_WARMRESET 1 + +/** + * Linux Kernels later 3.9 use CONFIG_PM_RUNTIME instead of + * CONFIG_USB_SUSPEND + */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) +#ifdef CONFIG_PM +#ifndef CONFIG_USB_SUSPEND +#define CONFIG_USB_SUSPEND +#endif +#endif +#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */ +#ifdef CONFIG_PM_RUNTIME +#ifndef CONFIG_USB_SUSPEND +#define CONFIG_USB_SUSPEND +#endif +#endif +#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */ +#endif + +/** Private command ID to clear 11d chan table */ +#define WOAL_11D_CLR_CHAN_TABLE 4 + +/** Private command ID to set/get sixteen int */ +#define WOAL_SET_GET_SIXTEEN_INT (WOAL_IOCTL + 3) +/** Private command ID to set/get TX power configurations */ +#define WOAL_TX_POWERCFG 1 +#ifdef DEBUG_LEVEL1 +/** Private command ID to set/get driver debug */ +#define WOAL_DRV_DBG 2 +#endif +/** Private command ID to set/get beacon interval */ +#define WOAL_BEACON_INTERVAL 3 +/** Private command ID to get RSSI */ +#define WOAL_SIGNAL 5 +/** Private command ID to set/get Deep Sleep mode */ +#define WOAL_DEEP_SLEEP 7 +/** Private command ID for 11n ht configration */ +#define WOAL_11N_TX_CFG 8 +/** Private command ID for 11n usr ht configration */ +#define WOAL_11N_HTCAP_CFG 9 +/** Private command ID for TX Aggregation */ +#define WOAL_PRIO_TBL 10 +/** Private command ID for Updating ADDBA variables */ +#define WOAL_ADDBA_UPDT 11 +/** Private command ID to set/get Host Sleep configuration */ +#define WOAL_HS_CFG 12 +/** Private command ID to set Host Sleep parameters */ +#define WOAL_HS_SETPARA 13 +/** Private command ID to read/write registers */ +#define WOAL_REG_READ_WRITE 14 +/** Private command ID to set/get band/adhocband */ +#define WOAL_BAND_CFG 15 +/** Private command ID for TX Aggregation */ +#define WOAL_11N_AMSDU_AGGR_CTRL 17 +/** Private command ID to set/get Inactivity timeout */ +#define WOAL_INACTIVITY_TIMEOUT_EXT 18 +/** Private command ID to turn on/off sdio clock */ +#define WOAL_SDIO_CLOCK 19 +/** Private command ID to read/write Command 52 */ +#define WOAL_CMD_52RDWR 20 +/** Private command ID to set/get scan configuration parameter */ +#define WOAL_SCAN_CFG 21 +/** Private command ID to set/get PS configuration parameter */ +#define WOAL_PS_CFG 22 +/** Private command ID to read/write memory */ +#define WOAL_MEM_READ_WRITE 23 +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) +/** Private command ID to control SDIO MP-A */ +#define WOAL_SDIO_MPA_CTRL 25 +#endif +/** Private command ID for Updating ADDBA variables */ +#define WOAL_ADDBA_REJECT 27 +/** Private command ID to set/get sleep parameters */ +#define WOAL_SLEEP_PARAMS 28 +/** Private command ID to set/get TX BF capabilities */ +#define WOAL_TX_BF_CAP 31 +#if defined(DFS_TESTING_SUPPORT) +/** Private command ID to set/get dfs testing settings */ +#define WOAL_DFS_TESTING 33 +#endif +/** Private command ID to set/get CFP table codes */ +#define WOAL_CFP_CODE 34 +/** Private command ID to set/get tx/rx antenna */ +#define WOAL_SET_GET_TX_RX_ANT 35 +/** Private command ID to set/get management frame passthru mask */ +#define WOAL_MGMT_FRAME_CTRL 36 + +/** Private command ID to set one int/get one int */ +#define WOAL_SETONEINT_GETONEINT (WOAL_IOCTL + 5) +/** Private command ID to set/get Tx rate */ +#define WOAL_SET_GET_TXRATE 1 +/** Private command ID to set/get region code */ +#define WOAL_SET_GET_REGIONCODE 2 +/** Private command ID to turn on/off radio */ +#define WOAL_SET_RADIO 3 +/** Private command ID to enable WMM */ +#define WOAL_WMM_ENABLE 4 +/** Private command ID to enable 802.11D */ +#define WOAL_11D_ENABLE 5 +/** Private command ID to set/get QoS configuration */ +#define WOAL_SET_GET_QOS_CFG 7 +#if defined(REASSOCIATION) +/** Private command ID to set/get reassociation setting */ +#define WOAL_SET_GET_REASSOC 9 +#endif /* REASSOCIATION */ +/** Private command ID for Updating Transmit buffer configration */ +#define WOAL_TXBUF_CFG 10 +/** Private command ID to set/get WWS mode */ +#define WOAL_SET_GET_WWS_CFG 12 +/** Private command ID to set/get sleep period */ +#define WOAL_SLEEP_PD 13 +/** Private command ID to set/get auth type */ +#define WOAL_AUTH_TYPE 18 +/** Private command ID to set/get port control */ +#define WOAL_PORT_CTRL 19 +/** Private command ID for coalesced status */ +#define WOAL_COALESCING_STATUS 20 +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) +/** Private command ID for set/get BSS role */ +#define WOAL_SET_GET_BSS_ROLE 21 +#endif +#endif +/** Private command ID for set/get 11h local power constraint */ +#define WOAL_SET_GET_11H_LOCAL_PWR_CONSTRAINT 22 +/** Private command ID to set/get 11N HT stream configuration */ +#define WOAL_HT_STREAM_CFG 23 +/** Private command ID to set/get MAC control */ +#define WOAL_MAC_CONTROL 24 +/** Private command ID to get thermal value */ +#define WOAL_THERMAL 25 +/** Private command ID to set/get hs cfg param */ +#define WOAL_CFG_HOTSPOT 26 + +/** Private command ID to get log */ +#define WOALGETLOG (WOAL_IOCTL + 7) + +/** Private command ID to set a wext address variable */ +#define WOAL_SETADDR_GETNONE (WOAL_IOCTL + 8) +/** Private command ID to send deauthentication */ +#define WOAL_DEAUTH 1 + +/** Private command to get/set 256 chars */ +#define WOAL_SET_GET_256_CHAR (WOAL_IOCTL + 9) +/** Private command to read/write passphrase */ +#define WOAL_PASSPHRASE 1 +/** Private command to get/set Ad-Hoc AES */ +#define WOAL_ADHOC_AES 2 +#define WOAL_ASSOCIATE 3 +/** Private command ID to get WMM queue status */ +#define WOAL_WMM_QUEUE_STATUS 4 +/** Private command ID to get Traffic stream status */ +#define WOAL_WMM_TS_STATUS 5 +#define WOAL_IP_ADDRESS 7 +/** Private command ID to set/get TX bemaforming */ +#define WOAL_TX_BF_CFG 8 +/** Private command ID to get PTK/GTK */ +#define WOAL_GET_KEY 9 + +/** Get log buffer size */ +#define GETLOG_BUFSIZE 512 + +/** Private command ID to set none/get twelve chars*/ +#define WOAL_SETNONE_GETTWELVE_CHAR (WOAL_IOCTL + 11) +/** Private command ID for WPS session */ +#define WOAL_WPS_SESSION 1 + +/** Private command ID to set none/get four int */ +#define WOAL_SETNONE_GET_FOUR_INT (WOAL_IOCTL + 13) +/** Private command ID to get data rates */ +#define WOAL_DATA_RATE 1 +/** Private command ID to get E-Supplicant mode */ +#define WOAL_ESUPP_MODE 2 + +/** Private command to get/set 64 ints */ +#define WOAL_SET_GET_64_INT (WOAL_IOCTL + 15) +/** Private command ID to set/get ECL system clock */ +#define WOAL_ECL_SYS_CLOCK 1 + +/** Private command ID for hostcmd */ +#define WOAL_HOST_CMD (WOAL_IOCTL + 17) + +/** Private command ID for arpfilter */ +#define WOAL_ARP_FILTER (WOAL_IOCTL + 19) + +/** Private command ID to set ints and get chars */ +#define WOAL_SET_INTS_GET_CHARS (WOAL_IOCTL + 21) +/** Private command ID to read EEPROM data */ +#define WOAL_READ_EEPROM 1 + +/** Private command ID to set/get 2K bytes */ +#define WOAL_SET_GET_2K_BYTES (WOAL_IOCTL + 23) + +/** Private command ID to read/write Command 53 */ +#define WOAL_CMD_53RDWR 2 + +/** Private command ID for setuserscan */ +#define WOAL_SET_USER_SCAN 3 +/** Private command ID for getscantable */ +#define WOAL_GET_SCAN_TABLE 4 +/** Private command ID for setuserscanext: async without wait */ +#define WOAL_SET_USER_SCAN_EXT 5 + +/** Private command ID to request ADDTS */ +#define WOAL_WMM_ADDTS 7 +/** Private command ID to request DELTS */ +#define WOAL_WMM_DELTS 8 +/** Private command ID to queue configuration */ +#define WOAL_WMM_QUEUE_CONFIG 9 +/** Private command ID to queue stats */ +#define WOAL_WMM_QUEUE_STATS 10 +/** Private command ID to Bypass auth packet */ +#define WOAL_BYPASSED_PACKET 11 + +#ifdef UAP_WEXT +/** The following command IDs are for Froyo app */ +/** Private command ID to start driver */ +#define WOAL_FROYO_START (WOAL_IOCTL + 28) +/** Private command ID to reload FW */ +#define WOAL_FROYO_WL_FW_RELOAD (WOAL_IOCTL + 29) +/** Private command ID to stop driver */ +#define WOAL_FROYO_STOP (WOAL_IOCTL + 30) +#endif + +/** + * iwpriv ioctl handlers + */ +static const struct iw_priv_args woal_private_args[] = { + { + WOAL_SETONEINT_GETWORDCHAR, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_CHAR | 128, + ""}, + { + WOAL_VERSION, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_CHAR | 128, + "version"}, + { + WOAL_VEREXT, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_CHAR | 128, + "verext"}, + { + WOAL_SETNONE_GETNONE, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_NONE, + ""}, + { + WOAL_WARMRESET, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_NONE, + "warmreset"}, + { + WOAL_SETONEINT_GETONEINT, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + ""}, + { + WOAL_SET_GET_TXRATE, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "txratecfg"}, + { + WOAL_SET_GET_REGIONCODE, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "regioncode"}, + { + WOAL_SET_RADIO, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "radioctrl"}, + { + WOAL_WMM_ENABLE, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "wmmcfg"}, + { + WOAL_11D_ENABLE, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "11dcfg"}, + { + WOAL_11D_CLR_CHAN_TABLE, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_NONE, + "11dclrtbl"}, + { + WOAL_SET_GET_QOS_CFG, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "qoscfg"}, + { + WOAL_SET_GET_WWS_CFG, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "wwscfg"}, +#if defined(REASSOCIATION) + { + WOAL_SET_GET_REASSOC, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "reassoctrl"}, +#endif + { + WOAL_TXBUF_CFG, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "txbufcfg"}, + { + WOAL_SLEEP_PD, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "sleeppd"}, + { + WOAL_AUTH_TYPE, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "authtype"}, + { + WOAL_PORT_CTRL, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "port_ctrl"}, + { + WOAL_COALESCING_STATUS, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "coalesce_status"}, +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) + { + WOAL_SET_GET_BSS_ROLE, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "bssrole"}, +#endif +#endif + { + WOAL_SET_GET_11H_LOCAL_PWR_CONSTRAINT, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "powercons"}, + { + WOAL_HT_STREAM_CFG, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "htstreamcfg"}, + { + WOAL_MAC_CONTROL, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "macctrl"}, + { + WOAL_THERMAL, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "thermal"}, + { + WOAL_CFG_HOTSPOT, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "hotspotcfg"}, + { + WOAL_SET_GET_SIXTEEN_INT, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + ""}, + { + WOAL_TX_POWERCFG, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "txpowercfg"}, +#ifdef DEBUG_LEVEL1 + { + WOAL_DRV_DBG, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "drvdbg"}, +#endif + { + WOAL_BEACON_INTERVAL, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "bcninterval"}, + { + WOAL_SIGNAL, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "getsignal"}, + { + WOAL_DEEP_SLEEP, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "deepsleep", + }, + { + WOAL_11N_TX_CFG, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "httxcfg"}, + { + WOAL_11N_HTCAP_CFG, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "htcapinfo"}, + { + WOAL_PRIO_TBL, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "aggrpriotbl"}, + { + WOAL_11N_AMSDU_AGGR_CTRL, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "amsduaggrctrl"}, + { + WOAL_ADDBA_UPDT, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "addbapara"}, + { + WOAL_ADDBA_REJECT, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "addbareject"}, + { + WOAL_TX_BF_CAP, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "httxbfcap"}, + { + WOAL_HS_CFG, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "hscfg"}, + { + WOAL_HS_SETPARA, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "hssetpara"}, + { + WOAL_REG_READ_WRITE, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "regrdwr"}, + { + WOAL_BAND_CFG, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "bandcfg"}, + { + WOAL_INACTIVITY_TIMEOUT_EXT, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "inactivityto"}, + { + WOAL_SDIO_CLOCK, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "sdioclock"}, + { + WOAL_CMD_52RDWR, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "sdcmd52rw"}, + { + WOAL_SCAN_CFG, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "scancfg"}, + { + WOAL_PS_CFG, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "pscfg"}, + { + WOAL_MEM_READ_WRITE, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "memrdwr"}, +#if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) + { + WOAL_SDIO_MPA_CTRL, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "mpactrl"}, +#endif + { + WOAL_SLEEP_PARAMS, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "sleepparams"}, +#if defined(DFS_TESTING_SUPPORT) + { + WOAL_DFS_TESTING, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "dfstesting"}, +#endif + { + WOAL_MGMT_FRAME_CTRL, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "mgmtframectrl"}, + { + WOAL_CFP_CODE, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "cfpcode"}, + { + WOAL_SET_GET_TX_RX_ANT, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_INT | 16, + "antcfg"}, + { + WOALGETLOG, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_CHAR | GETLOG_BUFSIZE, + "getlog"}, + { + WOAL_SETADDR_GETNONE, + IW_PRIV_TYPE_ADDR | 1, + IW_PRIV_TYPE_NONE, + ""}, + { + WOAL_DEAUTH, + IW_PRIV_TYPE_ADDR | 1, + IW_PRIV_TYPE_NONE, + "deauth"}, + { + WOAL_SET_GET_256_CHAR, + IW_PRIV_TYPE_CHAR | 256, + IW_PRIV_TYPE_CHAR | 256, + ""}, + { + WOAL_PASSPHRASE, + IW_PRIV_TYPE_CHAR | 256, + IW_PRIV_TYPE_CHAR | 256, + "passphrase"}, + { + WOAL_ADHOC_AES, + IW_PRIV_TYPE_CHAR | 256, + IW_PRIV_TYPE_CHAR | 256, + "adhocaes"}, + { + WOAL_GET_KEY, + IW_PRIV_TYPE_CHAR | 256, + IW_PRIV_TYPE_CHAR | 256, + "getkey"}, + { + WOAL_ASSOCIATE, + IW_PRIV_TYPE_CHAR | 256, + IW_PRIV_TYPE_CHAR | 256, + "associate"}, + { + WOAL_WMM_QUEUE_STATUS, + IW_PRIV_TYPE_CHAR | 256, + IW_PRIV_TYPE_CHAR | 256, + "qstatus"}, + { + WOAL_WMM_TS_STATUS, + IW_PRIV_TYPE_CHAR | 256, + IW_PRIV_TYPE_CHAR | 256, + "ts_status"}, + { + WOAL_IP_ADDRESS, + IW_PRIV_TYPE_CHAR | 256, + IW_PRIV_TYPE_CHAR | 256, + "ipaddr"}, + { + WOAL_TX_BF_CFG, + IW_PRIV_TYPE_CHAR | 256, + IW_PRIV_TYPE_CHAR | 256, + "httxbfcfg"}, + { + WOAL_SETNONE_GETTWELVE_CHAR, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_CHAR | 12, + ""}, + { + WOAL_WPS_SESSION, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_CHAR | 12, + "wpssession"}, + { + WOAL_SETNONE_GET_FOUR_INT, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_INT | 4, + ""}, + { + WOAL_DATA_RATE, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_INT | 4, + "getdatarate"}, + { + WOAL_ESUPP_MODE, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_INT | 4, + "esuppmode"}, + { + WOAL_SET_GET_64_INT, + IW_PRIV_TYPE_INT | 64, + IW_PRIV_TYPE_INT | 64, + ""}, + { + WOAL_ECL_SYS_CLOCK, + IW_PRIV_TYPE_INT | 64, + IW_PRIV_TYPE_INT | 64, + "sysclock"}, + { + WOAL_HOST_CMD, + IW_PRIV_TYPE_BYTE | 2047, + IW_PRIV_TYPE_BYTE | 2047, + "hostcmd"}, + { + WOAL_ARP_FILTER, + IW_PRIV_TYPE_BYTE | 2047, + IW_PRIV_TYPE_BYTE | 2047, + "arpfilter"}, + { + WOAL_SET_INTS_GET_CHARS, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_BYTE | 256, + ""}, + { + WOAL_READ_EEPROM, + IW_PRIV_TYPE_INT | 16, + IW_PRIV_TYPE_BYTE | 256, + "rdeeprom"}, + { + WOAL_SET_GET_2K_BYTES, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + ""}, + { + WOAL_CMD_53RDWR, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + "sdcmd53rw"}, + { + WOAL_SET_USER_SCAN, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + "setuserscan"}, + { + WOAL_GET_SCAN_TABLE, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + "getscantable"}, + { + WOAL_SET_USER_SCAN_EXT, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + "setuserscanext"}, + { + WOAL_WMM_ADDTS, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + "addts"}, + { + WOAL_WMM_DELTS, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + "delts"}, + { + WOAL_WMM_QUEUE_CONFIG, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + "qconfig"}, + { + WOAL_WMM_QUEUE_STATS, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + "qstats"}, + { + WOAL_BYPASSED_PACKET, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, + "pb_bypass"}, +#ifdef UAP_WEXT + { + WOAL_FROYO_START, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_NONE, + "START"}, + { + WOAL_FROYO_STOP, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_NONE, + "STOP"}, + { + WOAL_FROYO_WL_FW_RELOAD, + IW_PRIV_TYPE_CHAR | 256, + IW_PRIV_TYPE_CHAR | 256, + "WL_FW_RELOAD"}, +#endif +}; + +/** moal_802_11_rates */ +typedef struct _moal_802_11_rates { + /** Num of rates */ + t_u8 num_of_rates; + /** Rates */ + t_u8 rates[MLAN_SUPPORTED_RATES]; +} moal_802_11_rates; + +#if defined(STA_WEXT) || defined(UAP_WEXT) +int woal_wext_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd); +#endif + +#endif /* _WOAL_PRIV_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_proc.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_proc.c new file mode 100644 index 00000000..014bec1e --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_proc.c @@ -0,0 +1,761 @@ +/** @file moal_proc.c + * + * @brief This file contains functions for proc file. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/******************************************************** +Change log: + 10/21/2008: initial version +********************************************************/ + +#include "moal_main.h" +#ifdef UAP_SUPPORT +#include "moal_uap.h" +#endif +#include "moal_sdio.h" + +/******************************************************** + Local Variables +********************************************************/ +#ifdef CONFIG_PROC_FS +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +#define PROC_DIR NULL +#define MWLAN_PROC_DIR "mwlan/" +/** Proc top level directory entry */ +struct proc_dir_entry *proc_mwlan; +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) +#define PROC_DIR (&proc_root) +#else +#define PROC_DIR proc_net +#endif + +#ifdef STA_SUPPORT +static char *szModes[] = { + "Unknown", + "Managed", + "Ad-hoc", + "Auto", +}; +#endif + +extern int drv_mode; + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ +/** + * @brief Proc read function for info + * + * @param sfp pointer to seq_file structure + * @param data + * + * @return Number of output data + */ +static int +woal_info_proc_read(struct seq_file *sfp, void *data) +{ + struct net_device *netdev = (struct net_device *)sfp->private; + char fmt[MLAN_MAX_VER_STR_LEN]; + moal_private *priv = (moal_private *)netdev_priv(netdev); +#ifdef STA_SUPPORT + int i = 0; + moal_handle *handle = NULL; + mlan_bss_info info; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) + struct dev_mc_list *mcptr = netdev->mc_list; + int mc_count = netdev->mc_count; +#else + struct netdev_hw_addr *mcptr = NULL; + int mc_count = netdev_mc_count(netdev); +#endif /* < 2.6.35 */ +#else +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + int i = 0; +#endif /* >= 2.6.29 */ +#endif +#ifdef UAP_SUPPORT + mlan_ds_uap_stats ustats; +#endif + + ENTER(); + + if (priv == NULL) + goto exit; +#ifdef STA_SUPPORT + handle = priv->phandle; + if (handle == NULL) + goto exit; +#endif + + if (!MODULE_GET) { + LEAVE(); + return 0; + } + + memset(fmt, 0, sizeof(fmt)); +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + seq_printf(sfp, "driver_name = " "\"uap\"\n"); + woal_uap_get_version(priv, fmt, sizeof(fmt) - 1); + if (MLAN_STATUS_SUCCESS != + woal_uap_get_stats(priv, MOAL_PROC_WAIT, &ustats)) { + MODULE_PUT; + LEAVE(); + return -EFAULT; + } + } +#endif /* UAP_SUPPORT */ +#ifdef STA_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) { + woal_get_version(handle, fmt, sizeof(fmt) - 1); + memset(&info, 0, sizeof(info)); + if (MLAN_STATUS_SUCCESS != + woal_get_bss_info(priv, MOAL_PROC_WAIT, &info)) { + MODULE_PUT; + LEAVE(); + return -EFAULT; + } + seq_printf(sfp, "driver_name = " "\"wlan\"\n"); + } +#endif + seq_printf(sfp, "driver_version = %s", fmt); + seq_printf(sfp, "\ninterface_name=\"%s\"\n", netdev->name); +#if defined(WIFI_DIRECT_SUPPORT) + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) { + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) + seq_printf(sfp, "bss_mode = \"WIFIDIRECT-Client\"\n"); + else + seq_printf(sfp, "bss_mode = \"WIFIDIRECT-GO\"\n"); + } +#endif +#ifdef STA_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_STA) + seq_printf(sfp, "bss_mode =\"%s\"\n", szModes[info.bss_mode]); +#endif + seq_printf(sfp, "media_state=\"%s\"\n", + ((priv->media_connected == + MFALSE) ? "Disconnected" : "Connected")); + seq_printf(sfp, "mac_address=\"%02x:%02x:%02x:%02x:%02x:%02x\"\n", + netdev->dev_addr[0], netdev->dev_addr[1], + netdev->dev_addr[2], netdev->dev_addr[3], + netdev->dev_addr[4], netdev->dev_addr[5]); +#ifdef STA_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) { + seq_printf(sfp, "multicast_count=\"%d\"\n", mc_count); + seq_printf(sfp, "essid=\"%s\"\n", info.ssid.ssid); + seq_printf(sfp, "bssid=\"%02x:%02x:%02x:%02x:%02x:%02x\"\n", + info.bssid[0], info.bssid[1], + info.bssid[2], info.bssid[3], + info.bssid[4], info.bssid[5]); + seq_printf(sfp, "channel=\"%d\"\n", (int)info.bss_chan); + seq_printf(sfp, "region_code = \"%02x\"\n", + (t_u8)info.region_code); + + /* + * Put out the multicast list + */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) + for (i = 0; i < netdev->mc_count; i++) { + seq_printf(sfp, + "multicast_address[%d]=\"%02x:%02x:%02x:%02x:%02x:%02x\"\n", + i, + mcptr->dmi_addr[0], mcptr->dmi_addr[1], + mcptr->dmi_addr[2], mcptr->dmi_addr[3], + mcptr->dmi_addr[4], mcptr->dmi_addr[5]); + + mcptr = mcptr->next; + } +#else + netdev_for_each_mc_addr(mcptr, netdev) + seq_printf(sfp, + "multicast_address[%d]=\"%02x:%02x:%02x:%02x:%02x:%02x\"\n", + i++, + mcptr->addr[0], mcptr->addr[1], + mcptr->addr[2], mcptr->addr[3], + mcptr->addr[4], mcptr->addr[5]); +#endif /* < 2.6.35 */ + } +#endif + seq_printf(sfp, "num_tx_bytes = %lu\n", priv->stats.tx_bytes); + seq_printf(sfp, "num_rx_bytes = %lu\n", priv->stats.rx_bytes); + seq_printf(sfp, "num_tx_pkts = %lu\n", priv->stats.tx_packets); + seq_printf(sfp, "num_rx_pkts = %lu\n", priv->stats.rx_packets); + seq_printf(sfp, "num_tx_pkts_dropped = %lu\n", priv->stats.tx_dropped); + seq_printf(sfp, "num_rx_pkts_dropped = %lu\n", priv->stats.rx_dropped); + seq_printf(sfp, "num_tx_pkts_err = %lu\n", priv->stats.tx_errors); + seq_printf(sfp, "num_rx_pkts_err = %lu\n", priv->stats.rx_errors); + seq_printf(sfp, "carrier %s\n", + ((netif_carrier_ok(priv->netdev)) ? "on" : "off")); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + for (i = 0; i < netdev->num_tx_queues; i++) { + seq_printf(sfp, "tx queue %d: %s\n", i, + ((netif_tx_queue_stopped + (netdev_get_tx_queue(netdev, 0))) ? "stopped" : + "started")); + } +#else + seq_printf(sfp, "tx queue %s\n", + ((netif_queue_stopped(priv->netdev)) ? "stopped" : + "started")); +#endif +#ifdef UAP_SUPPORT + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + seq_printf(sfp, "tkip_mic_failures = %u\n", + ustats.tkip_mic_failures); + seq_printf(sfp, "ccmp_decrypt_errors = %u\n", + ustats.ccmp_decrypt_errors); + seq_printf(sfp, "wep_undecryptable_count = %u\n", + ustats.wep_undecryptable_count); + seq_printf(sfp, "wep_icv_error_count = %u\n", + ustats.wep_icv_error_count); + seq_printf(sfp, "decrypt_failure_count = %u\n", + ustats.decrypt_failure_count); + seq_printf(sfp, "mcast_tx_count = %u\n", ustats.mcast_tx_count); + seq_printf(sfp, "failed_count = %u\n", ustats.failed_count); + seq_printf(sfp, "retry_count = %u\n", ustats.retry_count); + seq_printf(sfp, "multiple_retry_count = %u\n", + ustats.multi_retry_count); + seq_printf(sfp, "frame_duplicate_count = %u\n", + ustats.frame_dup_count); + seq_printf(sfp, "rts_success_count = %u\n", + ustats.rts_success_count); + seq_printf(sfp, "rts_failure_count = %u\n", + ustats.rts_failure_count); + seq_printf(sfp, "ack_failure_count = %u\n", + ustats.ack_failure_count); + seq_printf(sfp, "rx_fragment_count = %u\n", + ustats.rx_fragment_count); + seq_printf(sfp, "mcast_rx_frame_count = %u\n", + ustats.mcast_rx_frame_count); + seq_printf(sfp, "fcs_error_count = %u\n", + ustats.fcs_error_count); + seq_printf(sfp, "tx_frame_count = %u\n", ustats.tx_frame_count); + seq_printf(sfp, "rsna_tkip_cm_invoked = %u\n", + ustats.rsna_tkip_cm_invoked); + seq_printf(sfp, "rsna_4way_hshk_failures = %u\n", + ustats.rsna_4way_hshk_failures); + } +#endif /* UAP_SUPPORT */ +exit: + LEAVE(); + MODULE_PUT; + return 0; +} + +static int +woal_info_proc_open(struct inode *inode, struct file *file) +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) + return single_open(file, woal_info_proc_read, PDE_DATA(inode)); +#else + return single_open(file, woal_info_proc_read, PDE(inode)->data); +#endif +} + +static const struct file_operations info_proc_fops = { + .owner = THIS_MODULE, + .open = woal_info_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +#define CMD52_STR_LEN 50 +/* + * @brief Parse cmd52 string + * + * @param buffer A pointer user buffer + * @param len Length user buffer + * @param func Parsed func number + * @param reg Parsed reg value + * @param val Parsed value to set + * @return BT_STATUS_SUCCESS + */ +static int +parse_cmd52_string(const char *buffer, size_t len, int *func, int *reg, + int *val) +{ + int ret = MLAN_STATUS_SUCCESS; + char *string = NULL; + char *pos = NULL; + gfp_t flag; + + ENTER(); + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + string = kzalloc(CMD52_STR_LEN, flag); + if (string == NULL) + return -ENOMEM; + + memcpy(string, buffer + strlen("sdcmd52rw="), + MIN((CMD52_STR_LEN - 1), (len - strlen("sdcmd52rw=")))); + string = strstrip(string); + + *func = -1; + *reg = -1; + *val = -1; + + /* Get func */ + pos = strsep(&string, " \t"); + if (pos) + *func = woal_string_to_number(pos); + + /* Get reg */ + pos = strsep(&string, " \t"); + if (pos) + *reg = woal_string_to_number(pos); + + /* Get val (optional) */ + pos = strsep(&string, " \t"); + if (pos) + *val = woal_string_to_number(pos); + kfree(string); + LEAVE(); + return ret; +} + +/** + * @brief config proc write function + * + * @param f file pointer + * @param buf pointer to data buffer + * @param count data number to write + * @param off Offset + * + * @return number of data + */ +static ssize_t +woal_config_write(struct file *f, const char __user * buf, size_t count, + loff_t * off) +{ + char databuf[101]; + char *line = NULL; + t_u32 config_data = 0; + struct seq_file *sfp = f->private_data; + moal_handle *handle = (moal_handle *)sfp->private; + + int func = 0, reg = 0, val = 0; + int copy_len; + moal_private *priv = NULL; + + ENTER(); + if (!MODULE_GET) { + LEAVE(); + return 0; + } + + if (count >= sizeof(databuf)) { + MODULE_PUT; + LEAVE(); + return (int)count; + } + memset(databuf, 0, sizeof(databuf)); + copy_len = MIN((sizeof(databuf) - 1), count); + if (copy_from_user(databuf, buf, copy_len)) { + MODULE_PUT; + LEAVE(); + return 0; + } + line = databuf; + if (!strncmp(databuf, "soft_reset", strlen("soft_reset"))) { + line += strlen("soft_reset") + 1; + config_data = (t_u32)woal_string_to_number(line); + PRINTM(MINFO, "soft_reset: %d\n", (int)config_data); + if (woal_request_soft_reset(handle) == MLAN_STATUS_SUCCESS) + handle->hardware_status = HardwareStatusReset; + else + PRINTM(MERROR, "Could not perform soft reset\n"); + } + if (!strncmp(databuf, "drv_mode", strlen("drv_mode"))) { + line += strlen("drv_mode") + 1; + config_data = (t_u32)woal_string_to_number(line); + PRINTM(MINFO, "drv_mode: %d\n", (int)config_data); + if (config_data != (t_u32)drv_mode) + if (woal_switch_drv_mode(handle, config_data) != + MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "Could not switch drv mode\n"); + } + } + if (!strncmp(databuf, "sdcmd52rw=", strlen("sdcmd52rw=")) && + count > strlen("sdcmd52rw=")) { + parse_cmd52_string((const char *)databuf, (size_t) count, &func, + ®, &val); + woal_sdio_read_write_cmd52(handle, func, reg, val); + } + if (!strncmp(databuf, "debug_dump", strlen("debug_dump"))) { + priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY); + if (priv) { + PRINTM(MERROR, "Recevie debug_dump command\n"); + drvdbg &= ~MFW_D; + woal_mlan_debug_info(priv); + woal_moal_debug_info(priv, NULL, MFALSE); + + woal_dump_firmware_info(handle); + } + } + + if (handle->card_info->v15_update) { + if (!strncmp(databuf, "fwdump_file=", strlen("fwdump_file="))) { + int len = strlen(databuf) - strlen("fwdump_file="); + gfp_t flag; + if (len) { + kfree(handle->fwdump_fname); + flag = (in_atomic() || + irqs_disabled())? GFP_ATOMIC : + GFP_KERNEL; + handle->fwdump_fname = kzalloc(len, flag); + if (handle->fwdump_fname) + memcpy(handle->fwdump_fname, + databuf + strlen("fwdump_file="), + len - 1); + } + } + if (!strncmp(databuf, "fw_reload", strlen("fw_reload"))) { + PRINTM(MMSG, "Request fw_reload...\n"); + woal_request_fw_reload(handle); + } + } + MODULE_PUT; + LEAVE(); + return (int)count; +} + +/** + * @brief config proc read function + * + * @param sfp pointer to seq_file structure + * @param data + * + * @return number of output data + */ +static int +woal_config_read(struct seq_file *sfp, void *data) +{ + moal_handle *handle = (moal_handle *)sfp->private; + + ENTER(); + + if (!MODULE_GET) { + LEAVE(); + return 0; + } + + seq_printf(sfp, "hardware_status=%d\n", (int)handle->hardware_status); + seq_printf(sfp, "netlink_num=%d\n", (int)handle->netlink_num); + seq_printf(sfp, "drv_mode=%d\n", (int)drv_mode); + seq_printf(sfp, "sdcmd52rw=%d 0x%0x 0x%02X\n", handle->cmd52_func, + handle->cmd52_reg, handle->cmd52_val); + + MODULE_PUT; + LEAVE(); + return 0; +} + +static int +woal_config_proc_open(struct inode *inode, struct file *file) +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) + return single_open(file, woal_config_read, PDE_DATA(inode)); +#else + return single_open(file, woal_config_read, PDE(inode)->data); +#endif +} + +static const struct file_operations config_proc_fops = { + .owner = THIS_MODULE, + .open = woal_config_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, + .write = woal_config_write, +}; + +/******************************************************** + Global Functions +********************************************************/ +/** + * @brief Convert string to number + * + * @param s Pointer to numbered string + * + * @return Converted number from string s + */ +int +woal_string_to_number(char *s) +{ + int r = 0; + int base = 0; + int pn = 1; + + if (!strncmp(s, "-", 1)) { + pn = -1; + s++; + } + if (!strncmp(s, "0x", 2) || !strncmp(s, "0X", 2)) { + base = 16; + s += 2; + } else + base = 10; + + for (s = s; *s; s++) { + if ((*s >= '0') && (*s <= '9')) + r = (r * base) + (*s - '0'); + else if ((*s >= 'A') && (*s <= 'F')) + r = (r * base) + (*s - 'A' + 10); + else if ((*s >= 'a') && (*s <= 'f')) + r = (r * base) + (*s - 'a' + 10); + else + break; + } + + return r * pn; +} + +/** + * @brief Create the top level proc directory + * + * @param handle Pointer to woal_handle + * + * @return N/A + */ +void +woal_proc_init(moal_handle *handle) +{ + struct proc_dir_entry *r; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) + struct proc_dir_entry *pde = PROC_DIR; +#endif + char config_proc_dir[20]; + + ENTER(); + + PRINTM(MINFO, "Create Proc Interface\n"); + if (!handle->proc_mwlan) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) + /* Check if directory already exists */ + for (pde = pde->subdir; pde; pde = pde->next) { + if (pde->namelen && !strcmp("mwlan", pde->name)) { + /* Directory exists */ + PRINTM(MWARN, + "proc interface already exists!\n"); + handle->proc_mwlan = pde; + break; + } + } + if (pde == NULL) { + handle->proc_mwlan = proc_mkdir("mwlan", PROC_DIR); + if (!handle->proc_mwlan) + PRINTM(MERROR, + "Cannot create proc interface!\n"); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) + else + atomic_set(&handle->proc_mwlan->count, 1); +#endif + } +#else + if (!proc_mwlan) { + handle->proc_mwlan = proc_mkdir("mwlan", PROC_DIR); + if (!handle->proc_mwlan) { + PRINTM(MERROR, + "Cannot create proc interface!\n"); + } + } else { + handle->proc_mwlan = proc_mwlan; + } +#endif + if (handle->proc_mwlan) { + if (handle->handle_idx) + sprintf(config_proc_dir, "config%d", + handle->handle_idx); + else + strcpy(config_proc_dir, "config"); + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + r = proc_create_data(config_proc_dir, 0644, + handle->proc_mwlan, + &config_proc_fops, handle); + if (r == NULL) +#else + r = create_proc_entry(config_proc_dir, 0644, + handle->proc_mwlan); + if (r) { + r->data = handle; + r->proc_fops = &config_proc_fops; + } else +#endif + PRINTM(MMSG, "Fail to create proc config\n"); + } +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 26) + proc_mwlan = handle->proc_mwlan; +#endif + } + + LEAVE(); +} + +/** + * @brief Remove the top level proc directory + * + * @param handle pointer moal_handle + * + * @return N/A + */ +void +woal_proc_exit(moal_handle *handle) +{ + ENTER(); + + PRINTM(MINFO, "Remove Proc Interface\n"); + if (handle->proc_mwlan) { + char config_proc_dir[20]; + if (handle->handle_idx) + sprintf(config_proc_dir, "config%d", + handle->handle_idx); + else + strcpy(config_proc_dir, "config"); + remove_proc_entry(config_proc_dir, handle->proc_mwlan); + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) + /* Remove only if we are the only instance using this */ + if (atomic_read(&(handle->proc_mwlan->count)) > 1) { + PRINTM(MWARN, "More than one interface using proc!\n"); + } else { +#endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) + atomic_dec(&(handle->proc_mwlan->count)); +#endif + remove_proc_entry("mwlan", PROC_DIR); + handle->proc_mwlan = NULL; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 26) + proc_mwlan = NULL; +#endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) + } +#endif + } + + LEAVE(); +} + +/** + * @brief Create proc file for interface + * + * @param priv pointer moal_private + * + * @return N/A + */ +void +woal_create_proc_entry(moal_private *priv) +{ + struct proc_dir_entry *r; + struct net_device *dev = priv->netdev; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + char proc_dir_name[20]; +#endif + + ENTER(); + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + if (!priv->proc_entry) { + memset(proc_dir_name, 0, sizeof(proc_dir_name)); + strcpy(proc_dir_name, MWLAN_PROC_DIR); + strcat(proc_dir_name, dev->name); + /* Try to create mwlan/mlanX first */ + priv->proc_entry = proc_mkdir(proc_dir_name, PROC_DIR); + if (priv->proc_entry) { + /* Success. Continue normally */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) + if (!priv->phandle->proc_mwlan) { + priv->phandle->proc_mwlan = + priv->proc_entry->parent; + } + atomic_inc(&(priv->phandle->proc_mwlan->count)); +#endif + } else { + /* Failure. mwlan may not exist. Try to create that + first */ + priv->phandle->proc_mwlan = + proc_mkdir("mwlan", PROC_DIR); + if (!priv->phandle->proc_mwlan) { + /* Failure. Something broken */ + LEAVE(); + return; + } else { + /* Success. Now retry creating mlanX */ + priv->proc_entry = + proc_mkdir(proc_dir_name, PROC_DIR); +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) + atomic_inc(&(priv->phandle->proc_mwlan->count)); +#endif + } + } +#else + if (priv->phandle->proc_mwlan && !priv->proc_entry) { + priv->proc_entry = + proc_mkdir(dev->name, priv->phandle->proc_mwlan); +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) + atomic_inc(&(priv->phandle->proc_mwlan->count)); +#endif /* < 3.10.0 */ +#endif /* < 2.6.26 */ + strcpy(priv->proc_entry_name, dev->name); + if (priv->proc_entry) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + r = proc_create_data("info", 0, priv->proc_entry, + &info_proc_fops, dev); + if (r == NULL) +#else + r = create_proc_entry("info", 0, priv->proc_entry); + if (r) { + r->data = dev; + r->proc_fops = &info_proc_fops; + } else +#endif + PRINTM(MMSG, "Fail to create proc info\n"); + } + } + + LEAVE(); +} + +/** + * @brief Remove proc file + * + * @param priv Pointer moal_private + * + * @return N/A + */ +void +woal_proc_remove(moal_private *priv) +{ + ENTER(); + if (priv->phandle->proc_mwlan && priv->proc_entry) { + remove_proc_entry("info", priv->proc_entry); + remove_proc_entry(priv->proc_entry_name, + priv->phandle->proc_mwlan); +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) + atomic_dec(&(priv->phandle->proc_mwlan->count)); +#endif + priv->proc_entry = NULL; + } + LEAVE(); +} +#endif diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_sdio.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_sdio.h new file mode 100644 index 00000000..7c04ef05 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_sdio.h @@ -0,0 +1,149 @@ +/** @file moal_sdio.h + * + * @brief This file contains definitions for SDIO interface. + * driver. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ +/**************************************************** +Change log: +****************************************************/ + +#ifndef _MOAL_SDIO_H +#define _MOAL_SDIO_H + +#include +#include +#include +#include +#include + +#include "moal_main.h" + +#ifndef BLOCK_MODE +/** Block mode */ +#define BLOCK_MODE 1 +#endif + +#ifndef BYTE_MODE +/** Byte Mode */ +#define BYTE_MODE 0 +#endif + +#ifndef FIXED_ADDRESS +/** Fixed address mode */ +#define FIXED_ADDRESS 0 +#endif + +#ifdef STA_SUPPORT +/** Default firmware name */ + +#define DEFAULT_FW_NAME_8777 "mrvl/sd8777_uapsta.bin" +#define DEFAULT_FW_NAME_8787 "mrvl/sd8787_uapsta.bin" +#define DEFAULT_FW_NAME_8887 "mrvl/sd8887_uapsta.bin" +#define DEFAULT_FW_NAME_8801 "mrvl/sd8801_uapsta.bin" +#define DEFAULT_FW_NAME_8897 "mrvl/sd8897_uapsta.bin" +#define DEFAULT_FW_NAME_8797 "mrvl/sd8797_uapsta.bin" +#define SD8887_A0_FW_NAME "mrvl/sd8887_uapsta.bin" +#define SD8887_A2_FW_NAME "mrvl/sd8887_uapsta_a2.bin" +#define SD8887_WLAN_A2_FW_NAME "mrvl/sd8887_wlan_a2.bin" +#define SD8887_WLAN_A0_FW_NAME "mrvl/sd8887_wlan.bin" +#ifndef DEFAULT_FW_NAME +#define DEFAULT_FW_NAME "" +#endif +#endif /* STA_SUPPORT */ + +#ifdef UAP_SUPPORT +/** Default firmware name */ + +#define DEFAULT_AP_FW_NAME_8777 "mrvl/sd8777_uapsta.bin" +#define DEFAULT_AP_FW_NAME_8787 "mrvl/sd8787_uapsta.bin" +#define DEFAULT_AP_FW_NAME_8887 "mrvl/sd8887_uapsta.bin" +#define DEFAULT_AP_FW_NAME_8801 "mrvl/sd8801_uapsta.bin" +#define DEFAULT_AP_FW_NAME_8897 "mrvl/sd8897_uapsta.bin" +#define DEFAULT_AP_FW_NAME_8797 "mrvl/sd8797_uapsta.bin" +#ifndef DEFAULT_AP_FW_NAME +#define DEFAULT_AP_FW_NAME "" +#endif +#endif /* UAP_SUPPORT */ + +/** Default firmaware name */ + +#define DEFAULT_AP_STA_FW_NAME_8777 "mrvl/sd8777_uapsta.bin" +#define DEFAULT_AP_STA_FW_NAME_8787 "mrvl/sd8787_uapsta.bin" +#define DEFAULT_AP_STA_FW_NAME_8887 "mrvl/sd8887_uapsta.bin" +#define DEFAULT_AP_STA_FW_NAME_8801 "mrvl/sd8801_uapsta.bin" +#define DEFAULT_AP_STA_FW_NAME_8897 "mrvl/sd8897_uapsta.bin" +#define DEFAULT_AP_STA_FW_NAME_8797 "mrvl/sd8797_uapsta.bin" +#ifndef DEFAULT_AP_STA_FW_NAME +#define DEFAULT_AP_STA_FW_NAME "" +#endif + +/******************************************************** + Global Functions +********************************************************/ +/** Function to update the SDIO card type */ +t_void woal_sdio_update_card_type(moal_handle *handle, t_void *card); + +/** Function to write register */ +mlan_status woal_write_reg(moal_handle *handle, t_u32 reg, t_u32 data); +/** Function to read register */ +mlan_status woal_read_reg(moal_handle *handle, t_u32 reg, t_u32 *data); +/** Function to write data to IO memory */ +mlan_status woal_write_data_sync(moal_handle *handle, mlan_buffer *pmbuf, + t_u32 port, t_u32 timeout); +/** Function to read data from IO memory */ +mlan_status woal_read_data_sync(moal_handle *handle, mlan_buffer *pmbuf, + t_u32 port, t_u32 timeout); + +/** Register to bus driver function */ +mlan_status woal_bus_register(void); +/** Unregister from bus driver function */ +void woal_bus_unregister(void); + +/** Register device function */ +mlan_status woal_register_dev(moal_handle *handle); +/** Unregister device function */ +void woal_unregister_dev(moal_handle *handle); + +int woal_sdio_set_bus_clock(moal_handle *handle, t_u8 option); + +#ifdef SDIO_SUSPEND_RESUME +#ifdef MMC_PM_FUNC_SUSPENDED +/** Notify SDIO bus driver that WLAN is suspended */ +void woal_wlan_is_suspended(moal_handle *handle); +#endif +/** SDIO Suspend */ +int woal_sdio_suspend(struct device *dev); +/** SDIO Resume */ +int woal_sdio_resume(struct device *dev); +#endif /* SDIO_SUSPEND_RESUME */ + +/** Structure: SDIO MMC card */ +struct sdio_mmc_card { + /** sdio_func structure pointer */ + struct sdio_func *func; + /** moal_handle structure pointer */ + moal_handle *handle; + /** saved host clock value */ + unsigned int host_clock; +}; + +/** cmd52 read write */ +int woal_sdio_read_write_cmd52(moal_handle *handle, int func, int reg, int val); + +#endif /* _MOAL_SDIO_H */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_sdio_mmc.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_sdio_mmc.c new file mode 100644 index 00000000..8ee6f246 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_sdio_mmc.c @@ -0,0 +1,979 @@ +/** @file moal_sdio_mmc.c + * + * @brief This file contains SDIO MMC IF (interface) module + * related functions. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ +/**************************************************** +Change log: + 02/25/09: Initial creation - + This file supports SDIO MMC only +****************************************************/ + +#include + +#include "moal_sdio.h" + +/** define marvell vendor id */ +#define MARVELL_VENDOR_ID 0x02df + +/******************************************************** + Local Variables +********************************************************/ + +/******************************************************** + Global Variables +********************************************************/ + +#ifdef SDIO_SUSPEND_RESUME +/** PM keep power */ +extern int pm_keep_power; +extern int shutdown_hs; +#endif + +/** Device ID for SD8777 */ +#define SD_DEVICE_ID_8777 (0x9131) +/** Device ID for SD8787 */ +#define SD_DEVICE_ID_8787 (0x9119) +/** Device ID for SD8887 */ +#define SD_DEVICE_ID_8887 (0x9135) +/** Device ID for SD8801 FN1 */ +#define SD_DEVICE_ID_8801 (0x9139) +/** Device ID for SD8897 */ +#define SD_DEVICE_ID_8897 (0x912d) +/** Device ID for SD8797 */ +#define SD_DEVICE_ID_8797 (0x9129) + +/** WLAN IDs */ +static const struct sdio_device_id wlan_ids[] = { + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8777)}, + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8787)}, + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8887)}, + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8801)}, + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8897)}, + {SDIO_DEVICE(MARVELL_VENDOR_ID, SD_DEVICE_ID_8797)}, + {}, +}; + +MODULE_DEVICE_TABLE(sdio, wlan_ids); + +int woal_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id); +void woal_sdio_remove(struct sdio_func *func); + +#ifdef SDIO_SUSPEND_RESUME +#ifdef MMC_PM_KEEP_POWER +int woal_sdio_suspend(struct device *dev); +int woal_sdio_resume(struct device *dev); + +static struct dev_pm_ops wlan_sdio_pm_ops = { + .suspend = woal_sdio_suspend, + .resume = woal_sdio_resume, +}; + +void woal_sdio_shutdown(struct device *dev); +#endif +#endif +static struct sdio_driver REFDATA wlan_sdio = { + .name = "wlan_sdio", + .id_table = wlan_ids, + .probe = woal_sdio_probe, + .remove = woal_sdio_remove, +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + .drv = { + .owner = THIS_MODULE, +#ifdef SDIO_SUSPEND_RESUME +#ifdef MMC_PM_KEEP_POWER + .pm = &wlan_sdio_pm_ops, + .shutdown = woal_sdio_shutdown, +#endif +#endif + + } +#else +#ifdef SDIO_SUSPEND_RESUME +#ifdef MMC_PM_KEEP_POWER + .drv = { + .pm = &wlan_sdio_pm_ops, + .shutdown = woal_sdio_shutdown, + } +#endif +#endif +#endif +}; + +/******************************************************** + Local Functions +********************************************************/ +/** @brief This function dump the sdio register + * + * @param handle A Pointer to the moal_handle structure + * @return N/A + */ +void +woal_dump_sdio_reg(moal_handle *handle) +{ + int ret = 0; + t_u8 data, i; + int fun0_reg[] = { 0x05, 0x04 }; + t_u8 array_size = 0; + int fun1_reg_8897[] = { 0x03, 0x04, 0x05, 0x06, 0x07, 0xC0, 0xC1 }; + int fun1_reg_other[] = { 0x03, 0x04, 0x05, 0x60, 0x61 }; + int *fun1_reg = NULL; + + for (i = 0; i < ARRAY_SIZE(fun0_reg); i++) { + data = sdio_f0_readb(((struct sdio_mmc_card *)handle->card)-> + func, fun0_reg[i], &ret); + PRINTM(MMSG, "fun0: reg 0x%02x=0x%02x ret=%d\n", fun0_reg[i], + data, ret); + } + + if (handle->card_type == CARD_TYPE_SD8897) { + fun1_reg = fun1_reg_8897; + array_size = sizeof(fun1_reg_8897) / sizeof(int); + } else { + fun1_reg = fun1_reg_other; + array_size = sizeof(fun1_reg_other) / sizeof(int); + } + for (i = 0; i < array_size; i++) { + data = sdio_readb(((struct sdio_mmc_card *)handle->card)->func, + fun1_reg[i], &ret); + PRINTM(MMSG, "fun1: reg 0x%02x=0x%02x ret=%d\n", fun1_reg[i], + data, ret); + } + return; +} + +/******************************************************** + Global Functions +********************************************************/ +/** @brief This function updates the SDIO card types + * + * @param handle A Pointer to the moal_handle structure + * @param card A Pointer to card + * + * @return N/A + */ +t_void +woal_sdio_update_card_type(moal_handle *handle, t_void *card) +{ + struct sdio_mmc_card *cardp = (struct sdio_mmc_card *)card; + + /* Update card type */ + if (cardp->func->device == SD_DEVICE_ID_8777) + handle->card_type = CARD_TYPE_SD8777; + else if (cardp->func->device == SD_DEVICE_ID_8787) + handle->card_type = CARD_TYPE_SD8787; + else if (cardp->func->device == SD_DEVICE_ID_8887) + handle->card_type = CARD_TYPE_SD8887; + else if (cardp->func->device == SD_DEVICE_ID_8801) + handle->card_type = CARD_TYPE_SD8801; + else if (cardp->func->device == SD_DEVICE_ID_8897) + handle->card_type = CARD_TYPE_SD8897; + else if (cardp->func->device == SD_DEVICE_ID_8797) + handle->card_type = CARD_TYPE_SD8797; +} + +/** + * @brief This function handles the interrupt. + * + * @param func A pointer to the sdio_func structure + * @return N/A + */ +static void +woal_sdio_interrupt(struct sdio_func *func) +{ + moal_handle *handle; + struct sdio_mmc_card *card; + + ENTER(); + + card = sdio_get_drvdata(func); + if (!card || !card->handle) { + PRINTM(MINFO, + "sdio_mmc_interrupt(func = %p) card or handle is NULL, card=%p\n", + func, card); + LEAVE(); + return; + } + handle = card->handle; + + PRINTM(MINFO, "*** IN SDIO IRQ ***\n"); + woal_interrupt(handle); + + LEAVE(); +} + +/** @brief This function handles client driver probe. + * + * @param func A pointer to sdio_func structure. + * @param id A pointer to sdio_device_id structure. + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE/error code + */ +int +woal_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id) +{ + int ret = MLAN_STATUS_SUCCESS; + struct sdio_mmc_card *card = NULL; + + ENTER(); + + PRINTM(MMSG, "vendor=0x%4.04X device=0x%4.04X class=%d function=%d\n", + func->vendor, func->device, func->class, func->num); + + card = kzalloc(sizeof(struct sdio_mmc_card), GFP_KERNEL); + if (!card) { + PRINTM(MFATAL, + "Failed to allocate memory in probe function!\n"); + LEAVE(); + return -ENOMEM; + } + + card->func = func; + +#ifdef MMC_QUIRK_BLKSZ_FOR_BYTE_MODE + /* The byte mode patch is available in kernel MMC driver which fixes + one issue in MP-A transfer. bit1: use func->cur_blksize for byte + mode */ + func->card->quirks |= MMC_QUIRK_BLKSZ_FOR_BYTE_MODE; +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) + /* wait for chip fully wake up */ + if (!func->enable_timeout) + func->enable_timeout = 200; +#endif + sdio_claim_host(func); + ret = sdio_enable_func(func); + if (ret) { + sdio_disable_func(func); + sdio_release_host(func); + kfree(card); + PRINTM(MFATAL, "sdio_enable_func() failed: ret=%d\n", ret); + LEAVE(); + return -EIO; + } + sdio_release_host(func); + if (NULL == woal_add_card(card)) { + PRINTM(MERROR, "woal_add_card failed\n"); + kfree(card); + sdio_claim_host(func); + sdio_disable_func(func); + sdio_release_host(func); + ret = MLAN_STATUS_FAILURE; + } + + LEAVE(); + return ret; +} + +/** @brief This function handles client driver remove. + * + * @param func A pointer to sdio_func structure. + * @return N/A + */ +void +woal_sdio_remove(struct sdio_func *func) +{ + struct sdio_mmc_card *card; + + ENTER(); + + PRINTM(MINFO, "SDIO func=%d\n", func->num); + + if (func) { + card = sdio_get_drvdata(func); + if (card) { + woal_remove_card(card); + kfree(card); + } + } + + LEAVE(); +} + +#ifdef SDIO_SUSPEND_RESUME +#ifdef MMC_PM_KEEP_POWER +#ifdef MMC_PM_FUNC_SUSPENDED +/** @brief This function tells lower driver that WLAN is suspended + * + * @param handle A Pointer to the moal_handle structure + * @return N/A + */ +void +woal_wlan_is_suspended(moal_handle *handle) +{ + ENTER(); + if (handle->suspend_notify_req == MTRUE) { + handle->is_suspended = MTRUE; + sdio_func_suspended(((struct sdio_mmc_card *)handle->card)-> + func); + } + LEAVE(); +} +#endif + +#define SHUTDOWN_HOST_SLEEP_DEF_GAP 100 +#define SHUTDOWN_HOST_SLEEP_DEF_GPIO 0x3 +#define SHUTDOWN_HOST_SLEEP_DEF_COND 0x0 + +/** @brief This function handles client driver shutdown + * + * @param dev A pointer to device structure + * @return N/A + */ +void +woal_sdio_shutdown(struct device *dev) +{ + struct sdio_func *func = dev_to_sdio_func(dev); + moal_handle *handle = NULL; + struct sdio_mmc_card *cardp; + mlan_ds_hs_cfg hscfg; + int timeout = 0; + int i; + + ENTER(); + PRINTM(MCMND, "<--- Enter woal_sdio_shutdown --->\n"); + cardp = sdio_get_drvdata(func); + if (!cardp || !cardp->handle) { + PRINTM(MERROR, "Card or moal_handle structure is not valid\n"); + LEAVE(); + return; + } + handle = cardp->handle; + for (i = 0; i < handle->priv_num; i++) + netif_device_detach(handle->priv[i]->netdev); + if (shutdown_hs) { + memset(&hscfg, 0, sizeof(mlan_ds_hs_cfg)); + hscfg.is_invoke_hostcmd = MFALSE; + hscfg.conditions = SHUTDOWN_HOST_SLEEP_DEF_COND; + hscfg.gap = SHUTDOWN_HOST_SLEEP_DEF_GAP; + hscfg.gpio = SHUTDOWN_HOST_SLEEP_DEF_GPIO; + if (woal_set_get_hs_params + (woal_get_priv(handle, MLAN_BSS_ROLE_ANY), MLAN_ACT_SET, + MOAL_IOCTL_WAIT, &hscfg) == MLAN_STATUS_FAILURE) { + PRINTM(MERROR, + "Fail to set HS parameter in shutdown: 0x%x 0x%x 0x%x\n", + hscfg.conditions, hscfg.gap, hscfg.gpio); + goto done; + } + /* Enable Host Sleep */ + handle->hs_activate_wait_q_woken = MFALSE; + memset(&hscfg, 0, sizeof(mlan_ds_hs_cfg)); + hscfg.is_invoke_hostcmd = MTRUE; + if (woal_set_get_hs_params + (woal_get_priv(handle, MLAN_BSS_ROLE_ANY), MLAN_ACT_SET, + MOAL_NO_WAIT, &hscfg) == MLAN_STATUS_FAILURE) { + PRINTM(MERROR, + "Request HS enable failed in shutdown\n"); + goto done; + } + timeout = + wait_event_interruptible_timeout(handle-> + hs_activate_wait_q, + handle-> + hs_activate_wait_q_woken, + HS_ACTIVE_TIMEOUT); + if (handle->hs_activated == MTRUE) + PRINTM(MMSG, "HS actived in shutdown\n"); + else + PRINTM(MMSG, "Fail to enable HS in shutdown\n"); + } +done: + PRINTM(MCMND, "<--- Leave woal_sdio_shutdown --->\n"); + LEAVE(); + return; +} + +/** @brief This function handles client driver suspend + * + * @param dev A pointer to device structure + * @return MLAN_STATUS_SUCCESS or error code + */ +int +woal_sdio_suspend(struct device *dev) +{ + struct sdio_func *func = dev_to_sdio_func(dev); + mmc_pm_flag_t pm_flags = 0; + moal_handle *handle = NULL; + struct sdio_mmc_card *cardp; + int i; + int ret = MLAN_STATUS_SUCCESS; + int hs_actived = 0; + mlan_ds_ps_info pm_info; + + ENTER(); + PRINTM(MCMND, "<--- Enter woal_sdio_suspend --->\n"); + pm_flags = sdio_get_host_pm_caps(func); + PRINTM(MCMND, "%s: suspend: PM flags = 0x%x\n", sdio_func_id(func), + pm_flags); + if (!(pm_flags & MMC_PM_KEEP_POWER)) { + PRINTM(MERROR, + "%s: cannot remain alive while host is suspended\n", + sdio_func_id(func)); + LEAVE(); + return -ENOSYS; + } + cardp = sdio_get_drvdata(func); + if (!cardp || !cardp->handle) { + PRINTM(MERROR, "Card or moal_handle structure is not valid\n"); + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + + handle = cardp->handle; + if (handle->is_suspended == MTRUE) { + PRINTM(MWARN, "Device already suspended\n"); + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + if (handle->fw_dump) { + PRINTM(MMSG, "suspend not allowed while FW dump!"); + ret = -EBUSY; + goto done; + } + handle->suspend_fail = MFALSE; + memset(&pm_info, 0, sizeof(pm_info)); + if (MLAN_STATUS_SUCCESS == + woal_get_pm_info(woal_get_priv(handle, MLAN_BSS_ROLE_ANY), + &pm_info)) { + if (pm_info.is_suspend_allowed == MFALSE) { + PRINTM(MMSG, "suspend not allowed!"); + ret = -EBUSY; + goto done; + } + } + for (i = 0; i < handle->priv_num; i++) + netif_device_detach(handle->priv[i]->netdev); + + if (pm_keep_power) { + /* Enable the Host Sleep */ +#ifdef MMC_PM_FUNC_SUSPENDED + handle->suspend_notify_req = MTRUE; +#endif + hs_actived = + woal_enable_hs(woal_get_priv + (handle, MLAN_BSS_ROLE_ANY)); +#ifdef MMC_PM_FUNC_SUSPENDED + handle->suspend_notify_req = MFALSE; +#endif + if (hs_actived) { +#ifdef MMC_PM_SKIP_RESUME_PROBE + PRINTM(MCMND, + "suspend with MMC_PM_KEEP_POWER and MMC_PM_SKIP_RESUME_PROBE\n"); + ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER | + MMC_PM_SKIP_RESUME_PROBE); +#else + PRINTM(MCMND, "suspend with MMC_PM_KEEP_POWER\n"); + ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); +#endif + } else { + PRINTM(MMSG, "HS not actived, suspend fail!"); + handle->suspend_fail = MTRUE; + for (i = 0; i < handle->priv_num; i++) + netif_device_attach(handle->priv[i]->netdev); + ret = -EBUSY; + goto done; + } + } + + /* Indicate device suspended */ + handle->is_suspended = MTRUE; +done: + PRINTM(MCMND, "<--- Leave woal_sdio_suspend --->\n"); + LEAVE(); + return ret; +} + +/** @brief This function handles client driver resume + * + * @param dev A pointer to device structure + * @return MLAN_STATUS_SUCCESS + */ +int +woal_sdio_resume(struct device *dev) +{ + struct sdio_func *func = dev_to_sdio_func(dev); + mmc_pm_flag_t pm_flags = 0; + moal_handle *handle = NULL; + struct sdio_mmc_card *cardp; + int i; + + ENTER(); + PRINTM(MCMND, "<--- Enter woal_sdio_resume --->\n"); + pm_flags = sdio_get_host_pm_caps(func); + PRINTM(MCMND, "%s: resume: PM flags = 0x%x\n", sdio_func_id(func), + pm_flags); + cardp = sdio_get_drvdata(func); + if (!cardp || !cardp->handle) { + PRINTM(MERROR, "Card or moal_handle structure is not valid\n"); + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + handle = cardp->handle; + + if (handle->is_suspended == MFALSE) { + PRINTM(MWARN, "Device already resumed\n"); + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + handle->is_suspended = MFALSE; + if (woal_check_driver_status(handle)) { + PRINTM(MERROR, "Resuem, device is in hang state\n"); + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + for (i = 0; i < handle->priv_num; i++) + netif_device_attach(handle->priv[i]->netdev); + + /* Disable Host Sleep */ + woal_cancel_hs(woal_get_priv(handle, MLAN_BSS_ROLE_ANY), MOAL_NO_WAIT); + PRINTM(MCMND, "<--- Leave woal_sdio_resume --->\n"); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} +#endif +#endif /* SDIO_SUSPEND_RESUME */ + +/** + * @brief This function writes data into card register + * + * @param handle A Pointer to the moal_handle structure + * @param reg Register offset + * @param data Value + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_write_reg(moal_handle *handle, t_u32 reg, t_u32 data) +{ + mlan_status ret = MLAN_STATUS_FAILURE; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) + sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + sdio_writeb(((struct sdio_mmc_card *)handle->card)->func, (t_u8)data, + reg, (int *)&ret); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) + sdio_release_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + return ret; +} + +/** + * @brief This function reads data from card register + * + * @param handle A Pointer to the moal_handle structure + * @param reg Register offset + * @param data Value + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_read_reg(moal_handle *handle, t_u32 reg, t_u32 *data) +{ + mlan_status ret = MLAN_STATUS_FAILURE; + t_u8 val; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) + sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + val = sdio_readb(((struct sdio_mmc_card *)handle->card)->func, reg, + (int *)&ret); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) + sdio_release_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + *data = val; + + return ret; +} + +/** + * @brief This function use SG mode to read/write data into card memory + * + * @param handle A Pointer to the moal_handle structure + * @param pmbuf_list Pointer to a linked list of mlan_buffer structure + * @param port Port + * @param write write flag + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_sdio_rw_mb(moal_handle *handle, pmlan_buffer pmbuf_list, t_u32 port, + t_u8 write) +{ + struct scatterlist sg_list[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX]; + int num_sg = pmbuf_list->use_count; + int i = 0; + mlan_buffer *pmbuf = NULL; + struct mmc_request mmc_req; + struct mmc_command mmc_cmd; + struct mmc_data mmc_dat; + struct sdio_func *func = ((struct sdio_mmc_card *)handle->card)->func; + t_u32 ioport = (port & MLAN_SDIO_IO_PORT_MASK); + t_u32 blkcnt = pmbuf_list->data_len / MLAN_SDIO_BLOCK_SIZE; + + if (num_sg > SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX) { + PRINTM(MERROR, "ERROR: num_sg=%d", num_sg); + return MLAN_STATUS_FAILURE; + } + sg_init_table(sg_list, num_sg); + pmbuf = pmbuf_list->pnext; + for (i = 0; i < num_sg; i++) { + if (pmbuf == pmbuf_list) + break; + sg_set_buf(&sg_list[i], pmbuf->pbuf + pmbuf->data_offset, + pmbuf->data_len); + pmbuf = pmbuf->pnext; + } + memset(&mmc_req, 0, sizeof(struct mmc_request)); + memset(&mmc_cmd, 0, sizeof(struct mmc_command)); + memset(&mmc_dat, 0, sizeof(struct mmc_data)); + + mmc_dat.sg = sg_list; + mmc_dat.sg_len = num_sg; + mmc_dat.blksz = MLAN_SDIO_BLOCK_SIZE; + mmc_dat.blocks = blkcnt; + mmc_dat.flags = write ? MMC_DATA_WRITE : MMC_DATA_READ; + + mmc_cmd.opcode = SD_IO_RW_EXTENDED; + mmc_cmd.arg = write ? 1 << 31 : 0; + mmc_cmd.arg |= (func->num & 0x7) << 28; + mmc_cmd.arg |= 1 << 27; /* block basic */ + mmc_cmd.arg |= 0; /* fix address */ + mmc_cmd.arg |= (ioport & 0x1FFFF) << 9; + mmc_cmd.arg |= blkcnt & 0x1FF; + mmc_cmd.flags = MMC_RSP_SPI_R5 | MMC_RSP_R5 | MMC_CMD_ADTC; + + mmc_req.cmd = &mmc_cmd; + mmc_req.data = &mmc_dat; + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) + sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + mmc_set_data_timeout(&mmc_dat, + ((struct sdio_mmc_card *)handle->card)->func-> + card); + mmc_wait_for_req(((struct sdio_mmc_card *)handle->card)->func->card-> + host, &mmc_req); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) + sdio_release_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + if (mmc_cmd.error || mmc_dat.error) { + PRINTM(MERROR, "CMD53 %s cmd_error = %d data_error=%d\n", + write ? "write" : "read", mmc_cmd.error, mmc_dat.error); + return MLAN_STATUS_FAILURE; + } + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function writes multiple bytes into card memory + * + * @param handle A Pointer to the moal_handle structure + * @param pmbuf Pointer to mlan_buffer structure + * @param port Port + * @param timeout Time out value + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_write_data_sync(moal_handle *handle, mlan_buffer *pmbuf, t_u32 port, + t_u32 timeout) +{ + mlan_status ret = MLAN_STATUS_FAILURE; + t_u8 *buffer = (t_u8 *)(pmbuf->pbuf + pmbuf->data_offset); + t_u8 blkmode = + (port & MLAN_SDIO_BYTE_MODE_MASK) ? BYTE_MODE : BLOCK_MODE; + t_u32 blksz = (blkmode == BLOCK_MODE) ? MLAN_SDIO_BLOCK_SIZE : 1; + t_u32 blkcnt = + (blkmode == + BLOCK_MODE) ? (pmbuf->data_len / + MLAN_SDIO_BLOCK_SIZE) : pmbuf->data_len; + t_u32 ioport = (port & MLAN_SDIO_IO_PORT_MASK); + int status = 0; + if (pmbuf->use_count > 1) + return woal_sdio_rw_mb(handle, pmbuf, port, MTRUE); +#ifdef SDIO_MMC_DEBUG + handle->cmd53w = 1; +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) + sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + status = sdio_writesb(((struct sdio_mmc_card *)handle->card)->func, + ioport, buffer, blkcnt * blksz); + if (!status) + ret = MLAN_STATUS_SUCCESS; + else + PRINTM(MERROR, "cmd53 write error=%d\n", status); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) + sdio_release_host(((struct sdio_mmc_card *)handle->card)->func); +#endif +#ifdef SDIO_MMC_DEBUG + handle->cmd53w = 2; +#endif + return ret; +} + +/** + * @brief This function reads multiple bytes from card memory + * + * @param handle A Pointer to the moal_handle structure + * @param pmbuf Pointer to mlan_buffer structure + * @param port Port + * @param timeout Time out value + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_read_data_sync(moal_handle *handle, mlan_buffer *pmbuf, t_u32 port, + t_u32 timeout) +{ + mlan_status ret = MLAN_STATUS_FAILURE; + t_u8 *buffer = (t_u8 *)(pmbuf->pbuf + pmbuf->data_offset); + t_u8 blkmode = + (port & MLAN_SDIO_BYTE_MODE_MASK) ? BYTE_MODE : BLOCK_MODE; + t_u32 blksz = (blkmode == BLOCK_MODE) ? MLAN_SDIO_BLOCK_SIZE : 1; + t_u32 blkcnt = + (blkmode == + BLOCK_MODE) ? (pmbuf->data_len / + MLAN_SDIO_BLOCK_SIZE) : pmbuf->data_len; + t_u32 ioport = (port & MLAN_SDIO_IO_PORT_MASK); + int status = 0; + if (pmbuf->use_count > 1) + return woal_sdio_rw_mb(handle, pmbuf, port, MFALSE); +#ifdef SDIO_MMC_DEBUG + handle->cmd53r = 1; +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) + sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func); +#endif + status = sdio_readsb(((struct sdio_mmc_card *)handle->card)->func, + buffer, ioport, blkcnt * blksz); + if (!status) { + ret = MLAN_STATUS_SUCCESS; + } else { + PRINTM(MERROR, "cmd53 read error=%d\n", status); + woal_dump_sdio_reg(handle); + } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) + sdio_release_host(((struct sdio_mmc_card *)handle->card)->func); +#endif +#ifdef SDIO_MMC_DEBUG + handle->cmd53r = 2; +#endif + return ret; +} + +/** + * @brief This function registers the IF module in bus driver + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_bus_register(void) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* SDIO Driver Registration */ + if (sdio_register_driver(&wlan_sdio)) { + PRINTM(MFATAL, "SDIO Driver Registration Failed \n"); + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + LEAVE(); + return ret; +} + +/** + * @brief This function de-registers the IF module in bus driver + * + * @return N/A + */ +void +woal_bus_unregister(void) +{ + ENTER(); + + /* SDIO Driver Unregistration */ + sdio_unregister_driver(&wlan_sdio); + + LEAVE(); +} + +/** + * @brief This function de-registers the device + * + * @param handle A pointer to moal_handle structure + * @return N/A + */ +void +woal_unregister_dev(moal_handle *handle) +{ + ENTER(); + if (handle->card) { + /* Release the SDIO IRQ */ + sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func); + sdio_release_irq(((struct sdio_mmc_card *)handle->card)->func); + sdio_disable_func(((struct sdio_mmc_card *)handle->card)->func); + sdio_release_host(((struct sdio_mmc_card *)handle->card)->func); + + sdio_set_drvdata(((struct sdio_mmc_card *)handle->card)->func, + NULL); + + PRINTM(MWARN, "Making the sdio dev card as NULL\n"); + } + + LEAVE(); +} + +/** + * @brief This function registers the device + * + * @param handle A pointer to moal_handle structure + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_register_dev(moal_handle *handle) +{ + int ret = MLAN_STATUS_SUCCESS; + struct sdio_mmc_card *card = handle->card; + struct sdio_func *func; + + ENTER(); + + func = card->func; + sdio_claim_host(func); + /* Request the SDIO IRQ */ + ret = sdio_claim_irq(func, woal_sdio_interrupt); + if (ret) { + PRINTM(MFATAL, "sdio_claim_irq failed: ret=%d\n", ret); + goto release_host; + } + + /* Set block size */ + ret = sdio_set_block_size(card->func, MLAN_SDIO_BLOCK_SIZE); + if (ret) { + PRINTM(MERROR, + "sdio_set_block_seize(): cannot set SDIO block size\n"); + ret = MLAN_STATUS_FAILURE; + goto release_irq; + } + + sdio_release_host(func); + sdio_set_drvdata(func, card); + + handle->hotplug_device = &func->dev; + + LEAVE(); + return MLAN_STATUS_SUCCESS; + +release_irq: + sdio_release_irq(func); +release_host: + sdio_release_host(func); + handle->card = NULL; + + LEAVE(); + return MLAN_STATUS_FAILURE; +} + +/** + * @brief This function set bus clock on/off + * + * @param handle A pointer to moal_handle structure + * @param option TRUE--on , FALSE--off + * @return MLAN_STATUS_SUCCESS + */ +int +woal_sdio_set_bus_clock(moal_handle *handle, t_u8 option) +{ + struct sdio_mmc_card *cardp = (struct sdio_mmc_card *)handle->card; + struct mmc_host *host = cardp->func->card->host; + + ENTER(); + if (option == MTRUE) { + /* restore value if non-zero */ + if (cardp->host_clock) + host->ios.clock = cardp->host_clock; + } else { + /* backup value if non-zero, then clear */ + if (host->ios.clock) + cardp->host_clock = host->ios.clock; + host->ios.clock = 0; + } + + host->ops->set_ios(host, &host->ios); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function updates card reg based on the Cmd52 value in dev structure + * + * @param handle A pointer to moal_handle structure + * @param func A pointer to store func variable + * @param reg A pointer to store reg variable + * @param val A pointer to store val variable + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +int +woal_sdio_read_write_cmd52(moal_handle *handle, int func, int reg, int val) +{ + int ret = MLAN_STATUS_SUCCESS; + struct sdio_mmc_card *card = (struct sdio_mmc_card *)handle->card; + + ENTER(); + /* Save current func and reg for read */ + handle->cmd52_func = func; + handle->cmd52_reg = reg; + sdio_claim_host(card->func); + if (val >= 0) { + /* Perform actual write only if val is provided */ + if (func) + sdio_writeb(card->func, val, reg, &ret); + else + sdio_f0_writeb(card->func, val, reg, &ret); + if (ret) { + PRINTM(MERROR, + "Cannot write value (0x%x) to func %d reg 0x%x\n", + val, func, reg); + } else { + PRINTM(MMSG, "write value (0x%x) to func %d reg 0x%x\n", + (u8)val, func, reg); + handle->cmd52_val = val; + } + } else { + if (func) + val = sdio_readb(card->func, reg, &ret); + else + val = sdio_f0_readb(card->func, reg, &ret); + if (ret) { + PRINTM(MERROR, + "Cannot read value from func %d reg 0x%x\n", + func, reg); + } else { + PRINTM(MMSG, + "read value (0x%x) from func %d reg 0x%x\n", + (u8)val, func, reg); + handle->cmd52_val = val; + } + } + sdio_release_host(card->func); + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_shim.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_shim.c new file mode 100644 index 00000000..504cc2b0 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_shim.c @@ -0,0 +1,2173 @@ +/** @file moal_shim.c + * + * @brief This file contains the callback functions registered to MLAN + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/******************************************************** +Change log: + 10/21/2008: initial version +********************************************************/ + +#include "moal_main.h" +#include "moal_sdio.h" +#ifdef UAP_SUPPORT +#include "moal_uap.h" +#endif +#ifdef STA_CFG80211 +#include "moal_cfg80211.h" +#endif + +/******************************************************** + Local Variables +********************************************************/ +/** moal_lock */ +typedef struct _moal_lock { + /** Lock */ + spinlock_t lock; + /** Flags */ + unsigned long flags; +} moal_lock; + +/******************************************************** + Global Variables +********************************************************/ +extern int cfg80211_wext; + +extern int hw_test; +/******************************************************** + Local Functions +********************************************************/ + +/******************************************************** + Global Functions +********************************************************/ +/** + * @brief Alloc a buffer + * + * @param pmoal_handle Pointer to the MOAL context + * @param size The size of the buffer to be allocated + * @param flag The type of the buffer to be allocated + * @param ppbuf Pointer to a buffer location to store buffer pointer allocated + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +moal_malloc(IN t_void *pmoal_handle, + IN t_u32 size, IN t_u32 flag, OUT t_u8 **ppbuf) +{ + moal_handle *handle = (moal_handle *)pmoal_handle; + t_u32 mem_flag = (in_interrupt() || irqs_disabled() || + !write_can_lock(&dev_base_lock)) ? GFP_ATOMIC : + GFP_KERNEL; + + if (flag & MLAN_MEM_DMA) + mem_flag |= GFP_DMA; + + *ppbuf = kmalloc(size, mem_flag); + if (*ppbuf == NULL) { + PRINTM(MERROR, "%s: allocate memory (%d bytes) failed!\n", + __func__, (int)size); + return MLAN_STATUS_FAILURE; + } + atomic_inc(&handle->malloc_count); + + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Free a buffer + * + * @param pmoal_handle Pointer to the MOAL context + * @param pbuf Pointer to the buffer to be freed + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +moal_mfree(IN t_void *pmoal_handle, IN t_u8 *pbuf) +{ + moal_handle *handle = (moal_handle *)pmoal_handle; + + if (!pbuf) + return MLAN_STATUS_FAILURE; + kfree(pbuf); + atomic_dec(&handle->malloc_count); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Alloc a vitual-address-continuous buffer + * + * @param pmoal_handle Pointer to the MOAL context + * @param size The size of the buffer to be allocated + * @param ppbuf Pointer to a buffer location to store buffer pointer allocated + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +moal_vmalloc(IN t_void *pmoal_handle, IN t_u32 size, OUT t_u8 **ppbuf) +{ + moal_handle *handle = (moal_handle *)pmoal_handle; + + *ppbuf = vmalloc(size); + if (*ppbuf == NULL) { + PRINTM(MERROR, "%s: vmalloc (%d bytes) failed!", __func__, + (int)size); + return MLAN_STATUS_FAILURE; + } + atomic_inc(&handle->vmalloc_count); + + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Free a buffer allocated by vmalloc + * + * @param pmoal_handle Pointer to the MOAL context + * @param pbuf Pointer to the buffer to be freed + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +moal_vfree(IN t_void *pmoal_handle, IN t_u8 *pbuf) +{ + moal_handle *handle = (moal_handle *)pmoal_handle; + + if (!pbuf) + return MLAN_STATUS_FAILURE; + vfree(pbuf); + atomic_dec(&handle->vmalloc_count); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Fill memory with constant byte + * + * @param pmoal_handle Pointer to the MOAL context + * @param pmem Pointer to the memory area + * @param byte A constant byte + * @param num Number of bytes to fill + * + * @return Pointer to the memory area + */ +t_void * +moal_memset(IN t_void *pmoal_handle, + IN t_void *pmem, IN t_u8 byte, IN t_u32 num) +{ + t_void *p = pmem; + + if (pmem && num) + p = memset(pmem, byte, num); + + return p; +} + +/** + * @brief Copy memory from one area to another + * + * @param pmoal_handle Pointer to the MOAL context + * @param pdest Pointer to the dest memory + * @param psrc Pointer to the src memory + * @param num Number of bytes to move + * + * @return Pointer to the dest memory + */ +t_void * +moal_memcpy(IN t_void *pmoal_handle, + IN t_void *pdest, IN const t_void *psrc, IN t_u32 num) +{ + t_void *p = pdest; + + if (pdest && psrc && num) + p = memcpy(pdest, psrc, num); + + return p; +} + +/** + * @brief Move memory from one area to another + * + * @param pmoal_handle Pointer to the MOAL context + * @param pdest Pointer to the dest memory + * @param psrc Pointer to the src memory + * @param num Number of bytes to move + * + * @return Pointer to the dest memory + */ +t_void * +moal_memmove(IN t_void *pmoal_handle, + IN t_void *pdest, IN const t_void *psrc, IN t_u32 num) +{ + t_void *p = pdest; + + if (pdest && psrc && num) + p = memmove(pdest, psrc, num); + + return p; +} + +/** + * @brief Compare two memory areas + * + * @param pmoal_handle Pointer to the MOAL context + * @param pmem1 Pointer to the first memory + * @param pmem2 Pointer to the second memory + * @param num Number of bytes to compare + * + * @return Compare result returns by memcmp + */ +t_s32 +moal_memcmp(IN t_void *pmoal_handle, + IN const t_void *pmem1, IN const t_void *pmem2, IN t_u32 num) +{ + t_s32 result; + + result = memcmp(pmem1, pmem2, num); + + return result; +} + +/** + * @brief Delay function + * + * @param pmoal_handle Pointer to the MOAL context + * @param delay delay in micro-second + * + * @return N/A + */ +t_void +moal_udelay(IN t_void *pmoal_handle, IN t_u32 delay) +{ + if (delay >= 1000) + mdelay(delay / 1000); + if (delay % 1000) + udelay(delay % 1000); +} + +/** + * @brief Retrieves the current system time + * + * @param pmoal_handle Pointer to the MOAL context + * @param psec Pointer to buf for the seconds of system time + * @param pusec Pointer to buf the micro seconds of system time + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +moal_get_system_time(IN t_void *pmoal_handle, OUT t_u32 *psec, OUT t_u32 *pusec) +{ + struct timeval t; + + do_gettimeofday(&t); + *psec = (t_u32)t.tv_sec; + *pusec = (t_u32)t.tv_usec; + + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Initializes the timer + * + * @param pmoal_handle Pointer to the MOAL context + * @param pptimer Pointer to the timer + * @param callback Pointer to callback function + * @param pcontext Pointer to context + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +moal_init_timer(IN t_void *pmoal_handle, + OUT t_void **pptimer, + IN t_void (*callback) (t_void *pcontext), IN t_void *pcontext) +{ + moal_drv_timer *timer = NULL; + t_u32 mem_flag = (in_interrupt() || irqs_disabled() || + !write_can_lock(&dev_base_lock)) ? GFP_ATOMIC : + GFP_KERNEL; + + timer = kmalloc(sizeof(moal_drv_timer), mem_flag); + if (timer == NULL) + return MLAN_STATUS_FAILURE; + woal_initialize_timer(timer, callback, pcontext); + *pptimer = (t_void *)timer; + + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Free the timer + * + * @param pmoal_handle Pointer to the MOAL context + * @param ptimer Pointer to the timer + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +moal_free_timer(IN t_void *pmoal_handle, IN t_void *ptimer) +{ + moal_drv_timer *timer = (moal_drv_timer *)ptimer; + + if (timer) { + if ((timer->timer_is_canceled == MFALSE) && timer->time_period) { + PRINTM(MWARN, + "mlan try to free timer without stop timer!\n"); + woal_cancel_timer(timer); + } + kfree(timer); + } + + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Start the timer + * + * @param pmoal_handle Pointer to the MOAL context + * @param ptimer Pointer to the timer + * @param periodic Periodic timer + * @param msec Timer value in milliseconds + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +moal_start_timer(IN t_void *pmoal_handle, + IN t_void *ptimer, IN t_u8 periodic, IN t_u32 msec) +{ + if (!ptimer) + return MLAN_STATUS_FAILURE; + + ((moal_drv_timer *)ptimer)->timer_is_periodic = periodic; + woal_mod_timer((moal_drv_timer *)ptimer, msec); + + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Stop the timer + * + * @param pmoal_handle Pointer to the MOAL context + * @param ptimer Pointer to the timer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +moal_stop_timer(IN t_void *pmoal_handle, IN t_void *ptimer) +{ + if (!ptimer) + return MLAN_STATUS_FAILURE; + woal_cancel_timer((moal_drv_timer *)ptimer); + + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Initializes the lock + * + * @param pmoal_handle Pointer to the MOAL context + * @param pplock Pointer to the lock + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +moal_init_lock(IN t_void *pmoal_handle, OUT t_void **pplock) +{ + moal_handle *handle = (moal_handle *)pmoal_handle; + moal_lock *mlock = NULL; + + mlock = kmalloc(sizeof(moal_lock), GFP_ATOMIC); + if (!mlock) + return MLAN_STATUS_FAILURE; + spin_lock_init(&mlock->lock); + *pplock = (t_void *)mlock; + + atomic_inc(&handle->lock_count); + + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Free the lock + * + * @param pmoal_handle Pointer to the MOAL context + * @param plock Lock + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +moal_free_lock(IN t_void *pmoal_handle, IN t_void *plock) +{ + moal_handle *handle = (moal_handle *)pmoal_handle; + moal_lock *mlock = plock; + + kfree(mlock); + if (mlock) + atomic_dec(&handle->lock_count); + + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief Request a spin lock + * + * @param pmoal_handle Pointer to the MOAL context + * @param plock Pointer to the lock + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +moal_spin_lock(IN t_void *pmoal_handle, IN t_void *plock) +{ + moal_lock *mlock = plock; + unsigned long flags = 0; + + if (mlock) { + spin_lock_irqsave(&mlock->lock, flags); + mlock->flags = flags; + return MLAN_STATUS_SUCCESS; + } else { + return MLAN_STATUS_FAILURE; + } +} + +/** + * @brief Request a spin_unlock + * + * @param pmoal_handle Pointer to the MOAL context + * @param plock Pointer to the lock + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +moal_spin_unlock(IN t_void *pmoal_handle, IN t_void *plock) +{ + moal_lock *mlock = (moal_lock *)plock; + + if (mlock) { + spin_unlock_irqrestore(&mlock->lock, mlock->flags); + + return MLAN_STATUS_SUCCESS; + } else { + return MLAN_STATUS_FAILURE; + } +} + +/** + * @brief This function reads one block of firmware data from MOAL + * + * @param pmoal_handle Pointer to the MOAL context + * @param offset Offset from where the data will be copied + * @param len Length to be copied + * @param pbuf Buffer where the data will be copied + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +moal_get_fw_data(IN t_void *pmoal_handle, + IN t_u32 offset, IN t_u32 len, OUT t_u8 *pbuf) +{ + moal_handle *handle = (moal_handle *)pmoal_handle; + + if (!pbuf || !len) + return MLAN_STATUS_FAILURE; + + if (offset + len > handle->firmware->size) + return MLAN_STATUS_FAILURE; + + memcpy(pbuf, handle->firmware->data + offset, len); + + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function is called when MLAN completes the initialization firmware. + * + * @param pmoal_handle Pointer to the MOAL context + * @param status The status code for mlan_init_fw request + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +moal_init_fw_complete(IN t_void *pmoal_handle, IN mlan_status status) +{ + moal_handle *handle = (moal_handle *)pmoal_handle; + ENTER(); + if (status == MLAN_STATUS_SUCCESS) + handle->hardware_status = HardwareStatusReady; + handle->init_wait_q_woken = MTRUE; + wake_up_interruptible(&handle->init_wait_q); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function is called when MLAN shutdown firmware is completed. + * + * @param pmoal_handle Pointer to the MOAL context + * @param status The status code for mlan_shutdown request + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +moal_shutdown_fw_complete(IN t_void *pmoal_handle, IN mlan_status status) +{ + moal_handle *handle = (moal_handle *)pmoal_handle; + ENTER(); + handle->hardware_status = HardwareStatusNotReady; + handle->init_wait_q_woken = MTRUE; + wake_up_interruptible(&handle->init_wait_q); + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function is called when an MLAN IOCTL is completed. + * + * @param pmoal_handle Pointer to the MOAL context + * @param pioctl_req pointer to structure mlan_ioctl_req + * @param status The status code for mlan_ioctl request + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +moal_ioctl_complete(IN t_void *pmoal_handle, + IN pmlan_ioctl_req pioctl_req, IN mlan_status status) +{ + moal_handle *handle = (moal_handle *)pmoal_handle; + moal_private *priv = NULL; + wait_queue *wait; + unsigned long flags = 0; + ENTER(); + + if (!atomic_read(&handle->ioctl_pending)) + PRINTM(MERROR, "ERR: Unexpected IOCTL completed: %p\n", + pioctl_req); + else + atomic_dec(&handle->ioctl_pending); + priv = woal_bss_index_to_priv(handle, pioctl_req->bss_index); + if (!priv) { + PRINTM(MERROR, + "IOCTL %p complete with NULL priv, bss_index=%d\n", + pioctl_req, pioctl_req->bss_index); + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + + if (status != MLAN_STATUS_SUCCESS && status != MLAN_STATUS_COMPLETE) + PRINTM(MERROR, + "IOCTL failed: %p id=0x%x, sub_id=0x%x action=%d, status_code=0x%x\n", + pioctl_req, pioctl_req->req_id, + (*(t_u32 *)pioctl_req->pbuf), (int)pioctl_req->action, + pioctl_req->status_code); + else + PRINTM(MIOCTL, + "IOCTL completed: %p id=0x%x sub_id=0x%x, action=%d, status=%d, status_code=0x%x\n", + pioctl_req, pioctl_req->req_id, + (*(t_u32 *)pioctl_req->pbuf), (int)pioctl_req->action, + status, pioctl_req->status_code); + + spin_lock_irqsave(&handle->driver_lock, flags); + wait = (wait_queue *)pioctl_req->reserved_1; + if (wait) { + wait->condition = MTRUE; + wait->status = status; + if (wait->wait_timeout) { + wake_up(wait->wait); + } else { + if ((status != MLAN_STATUS_SUCCESS) && + (pioctl_req->status_code == + MLAN_ERROR_CMD_TIMEOUT)) { + PRINTM(MERROR, "IOCTL: command timeout\n"); + } else { + wake_up_interruptible(wait->wait); + } + } + spin_unlock_irqrestore(&handle->driver_lock, flags); + } else { + spin_unlock_irqrestore(&handle->driver_lock, flags); + if ((status == MLAN_STATUS_SUCCESS) && + (pioctl_req->action == MLAN_ACT_GET)) + woal_process_ioctl_resp(priv, pioctl_req); + kfree(pioctl_req); + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function allocates mlan_buffer. + * + * @param pmoal_handle Pointer to the MOAL context + * @param size allocation size requested + * @param pmbuf pointer to pointer to the allocated buffer + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +moal_alloc_mlan_buffer(IN t_void *pmoal_handle, + IN t_u32 size, OUT pmlan_buffer *pmbuf) +{ + *pmbuf = woal_alloc_mlan_buffer((moal_handle *)pmoal_handle, size); + if (NULL == *pmbuf) + return MLAN_STATUS_FAILURE; + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function frees mlan_buffer. + * + * @param pmoal_handle Pointer to the MOAL context + * @param pmbuf pointer to buffer to be freed + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +moal_free_mlan_buffer(IN t_void *pmoal_handle, IN pmlan_buffer pmbuf) +{ + if (!pmbuf) + return MLAN_STATUS_FAILURE; + woal_free_mlan_buffer((moal_handle *)pmoal_handle, pmbuf); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function is called when MLAN complete send data packet. + * + * @param pmoal_handle Pointer to the MOAL context + * @param pmbuf Pointer to the mlan buffer structure + * @param status The status code for mlan_send_packet request + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +moal_send_packet_complete(IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf, IN mlan_status status) +{ + moal_private *priv = NULL; + moal_handle *handle = (moal_handle *)pmoal_handle; + struct sk_buff *skb = NULL; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + t_u32 index = 0; +#endif + + ENTER(); + if (pmbuf && pmbuf->buf_type == MLAN_BUF_TYPE_RAW_DATA) { + woal_free_mlan_buffer(handle, pmbuf); + atomic_dec(&handle->tx_pending); + LEAVE(); + return MLAN_STATUS_SUCCESS; + } + if (pmbuf) { + priv = woal_bss_index_to_priv(pmoal_handle, pmbuf->bss_index); + skb = (struct sk_buff *)pmbuf->pdesc; + if (priv) { + woal_set_trans_start(priv->netdev); + if (skb) { + if (status == MLAN_STATUS_SUCCESS) { + priv->stats.tx_packets++; + priv->stats.tx_bytes += skb->len; + } else { + priv->stats.tx_errors++; + } +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + index = skb_get_queue_mapping(skb); + atomic_dec(&handle->tx_pending); + if (atomic_dec_return + (&priv->wmm_tx_pending[index]) == + LOW_TX_PENDING) { + struct netdev_queue *txq = + netdev_get_tx_queue(priv-> + netdev, + index); + if (netif_tx_queue_stopped(txq)) { + netif_tx_wake_queue(txq); + PRINTM(MINFO, + "Wakeup Kernel Queue:%d\n", + index); + } + } +#else /* #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,29) */ + if (atomic_dec_return(&handle->tx_pending) < + LOW_TX_PENDING) { + int i; + for (i = 0; i < handle->priv_num; i++) { +#ifdef STA_SUPPORT + if ((GET_BSS_ROLE + (handle->priv[i]) == + MLAN_BSS_ROLE_STA) && + (handle->priv[i]-> + media_connected || + priv-> + is_adhoc_link_sensed)) { + woal_wake_queue(handle-> + priv + [i]-> + netdev); + } +#endif +#ifdef UAP_SUPPORT + if ((GET_BSS_ROLE + (handle->priv[i]) == + MLAN_BSS_ROLE_UAP) && + (handle->priv[i]-> + media_connected)) { + woal_wake_queue(handle-> + priv + [i]-> + netdev); + } +#endif + } + } +#endif /* #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,29) */ + } + } + if (skb) + dev_kfree_skb_any(skb); + } + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function write a command/data packet to card. + * This function blocks the call until it finishes + * + * @param pmoal_handle Pointer to the MOAL context + * @param pmbuf Pointer to the mlan buffer structure + * @param port Port number for sent + * @param timeout Timeout value in milliseconds (if 0 the wait is forever) + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +moal_write_data_sync(IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf, IN t_u32 port, IN t_u32 timeout) +{ + return woal_write_data_sync((moal_handle *)pmoal_handle, pmbuf, port, + timeout); +} + +/** + * @brief This function read data packet/event/command from card. + * This function blocks the call until it finish + * + * @param pmoal_handle Pointer to the MOAL context + * @param pmbuf Pointer to the mlan buffer structure + * @param port Port number for read + * @param timeout Timeout value in milliseconds (if 0 the wait is forever) + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +moal_read_data_sync(IN t_void *pmoal_handle, + IN OUT pmlan_buffer pmbuf, IN t_u32 port, IN t_u32 timeout) +{ + return woal_read_data_sync((moal_handle *)pmoal_handle, pmbuf, port, + timeout); +} + +/** + * @brief This function writes data into card register. + * + * @param pmoal_handle Pointer to the MOAL context + * @param reg register offset + * @param data value + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +moal_write_reg(IN t_void *pmoal_handle, IN t_u32 reg, IN t_u32 data) +{ + return woal_write_reg((moal_handle *)pmoal_handle, reg, data); +} + +/** + * @brief This function reads data from card register. + * + * @param pmoal_handle Pointer to the MOAL context + * @param reg register offset + * @param data value + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +moal_read_reg(IN t_void *pmoal_handle, IN t_u32 reg, OUT t_u32 *data) +{ + return woal_read_reg((moal_handle *)pmoal_handle, reg, data); +} + +/** + * @brief This function uploads the packet to the network stack + * + * @param pmoal_handle Pointer to the MOAL context + * @param pmbuf Pointer to the mlan buffer structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +moal_recv_packet(IN t_void *pmoal_handle, IN pmlan_buffer pmbuf) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + moal_private *priv = NULL; + struct sk_buff *skb = NULL; + moal_handle *handle = (moal_handle *)pmoal_handle; + ENTER(); + if (pmbuf) { + priv = woal_bss_index_to_priv(pmoal_handle, pmbuf->bss_index); + skb = (struct sk_buff *)pmbuf->pdesc; + if (priv) { + if (skb) { + skb_reserve(skb, pmbuf->data_offset); + skb_put(skb, pmbuf->data_len); + pmbuf->pdesc = NULL; + pmbuf->pbuf = NULL; + pmbuf->data_offset = pmbuf->data_len = 0; + /* pkt been submit to kernel, no need to free + by mlan */ + status = MLAN_STATUS_PENDING; + atomic_dec(&handle->mbufalloc_count); + } else { + PRINTM(MERROR, "%s without skb attach!!!\n", + __func__); + skb = dev_alloc_skb(pmbuf->data_len + + MLAN_NET_IP_ALIGN); + if (!skb) { + PRINTM(MERROR, "%s fail to alloc skb\n", + __func__); + status = MLAN_STATUS_FAILURE; + priv->stats.rx_dropped++; + goto done; + } + skb_reserve(skb, MLAN_NET_IP_ALIGN); + memcpy(skb->data, + (t_u8 *)(pmbuf->pbuf + + pmbuf->data_offset), + pmbuf->data_len); + skb_put(skb, pmbuf->data_len); + } + skb->dev = priv->netdev; + skb->protocol = eth_type_trans(skb, priv->netdev); + skb->ip_summed = CHECKSUM_NONE; + + priv->stats.rx_bytes += skb->len; + priv->stats.rx_packets++; + if (in_interrupt()) + netif_rx(skb); + else { + if (atomic_read(&handle->rx_pending) > + MAX_RX_PENDING_THRHLD) + netif_rx(skb); + else + netif_rx_ni(skb); + } + } + } +done: + LEAVE(); + return status; +} + +/** + * @brief This function handles event receive + * + * @param pmoal_handle Pointer to the MOAL context + * @param pmevent Pointer to the mlan event structure + * + * @return MLAN_STATUS_SUCCESS + */ +mlan_status +moal_recv_event(IN t_void *pmoal_handle, IN pmlan_event pmevent) +{ +#ifdef STA_SUPPORT + int custom_len = 0; +#ifdef STA_CFG80211 + unsigned long flags; +#endif +#endif + moal_private *priv = NULL; +#if defined(STA_SUPPORT) || defined(UAP_SUPPORT) + moal_private *pmpriv = NULL; +#endif +#if defined(STA_WEXT) || defined(UAP_WEXT) +#if defined(STA_SUPPORT) || defined(UAP_WEXT) +#if defined(UAP_SUPPORT) || defined(STA_WEXT) + union iwreq_data wrqu; +#endif +#endif +#endif +#if defined(SDIO_SUSPEND_RESUME) + mlan_ds_ps_info pm_info; +#endif + + ENTER(); + + if ((pmevent->event_id != MLAN_EVENT_ID_DRV_DEFER_RX_WORK) && + (pmevent->event_id != MLAN_EVENT_ID_DRV_DEFER_HANDLING) && + (pmevent->event_id != MLAN_EVENT_ID_DRV_MGMT_FRAME)) + PRINTM(MEVENT, "event id:0x%x\n", pmevent->event_id); + priv = woal_bss_index_to_priv(pmoal_handle, pmevent->bss_index); + if (priv == NULL) { + PRINTM(MERROR, "%s: priv is null\n", __func__); + goto done; + } + if (priv->netdev == NULL) { + PRINTM(MERROR, "%s: netdev is null\n", __func__); + goto done; + } + switch (pmevent->event_id) { +#ifdef STA_SUPPORT + case MLAN_EVENT_ID_FW_ADHOC_LINK_SENSED: + priv->is_adhoc_link_sensed = MTRUE; + if (!netif_carrier_ok(priv->netdev)) + netif_carrier_on(priv->netdev); + woal_wake_queue(priv->netdev); +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, + CUS_EVT_ADHOC_LINK_SENSED); +#endif + woal_broadcast_event(priv, CUS_EVT_ADHOC_LINK_SENSED, + strlen(CUS_EVT_ADHOC_LINK_SENSED)); + break; + + case MLAN_EVENT_ID_FW_ADHOC_LINK_LOST: + woal_stop_queue(priv->netdev); + if (netif_carrier_ok(priv->netdev)) + netif_carrier_off(priv->netdev); + priv->is_adhoc_link_sensed = MFALSE; +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, + CUS_EVT_ADHOC_LINK_LOST); +#endif + woal_broadcast_event(priv, CUS_EVT_ADHOC_LINK_LOST, + strlen(CUS_EVT_ADHOC_LINK_LOST)); + break; + + case MLAN_EVENT_ID_DRV_CONNECTED: +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext) && + pmevent->event_len == ETH_ALEN) { + memset(wrqu.ap_addr.sa_data, 0x00, ETH_ALEN); + memcpy(wrqu.ap_addr.sa_data, pmevent->event_buf, + ETH_ALEN); + wrqu.ap_addr.sa_family = ARPHRD_ETHER; + wireless_send_event(priv->netdev, SIOCGIWAP, &wrqu, + NULL); + } +#endif +#ifdef STA_CFG80211 + if (IS_STA_CFG80211(cfg80211_wext)) { + memcpy(priv->cfg_bssid, pmevent->event_buf, ETH_ALEN); + woal_set_scan_time(priv, ACTIVE_SCAN_CHAN_TIME, + PASSIVE_SCAN_CHAN_TIME, + MIN_SPECIFIC_SCAN_CHAN_TIME); + } +#endif + custom_len = strlen(CUS_EVT_AP_CONNECTED); + memmove(pmevent->event_buf + custom_len, pmevent->event_buf, + pmevent->event_len); + memcpy(pmevent->event_buf, CUS_EVT_AP_CONNECTED, custom_len); + pmevent->event_len += custom_len; + woal_broadcast_event(priv, pmevent->event_buf, + pmevent->event_len); + priv->media_connected = MTRUE; + if (!netif_carrier_ok(priv->netdev)) + netif_carrier_on(priv->netdev); + woal_wake_queue(priv->netdev); + + break; + + case MLAN_EVENT_ID_DRV_SCAN_REPORT: + PRINTM(MINFO, "Scan report\n"); + if (priv->report_scan_result) { + priv->report_scan_result = MFALSE; +#ifdef STA_CFG80211 + if (IS_STA_CFG80211(cfg80211_wext)) { + if (priv->phandle->scan_request) { + PRINTM(MINFO, + "Reporting scan results\n"); + woal_inform_bss_from_scan_result(priv, + NULL, + MOAL_NO_WAIT); + if (!priv->phandle->first_scan_done) { + priv->phandle->first_scan_done = + MTRUE; + woal_set_scan_time(priv, + ACTIVE_SCAN_CHAN_TIME, + PASSIVE_SCAN_CHAN_TIME, + SPECIFIC_SCAN_CHAN_TIME); + } + spin_lock_irqsave(&priv->phandle-> + scan_req_lock, flags); + if (priv->phandle->scan_request) { + cfg80211_scan_done(priv-> + phandle-> + scan_request, + MFALSE); + priv->phandle->scan_request = + NULL; + priv->phandle->scan_priv = NULL; + } + spin_unlock_irqrestore(&priv->phandle-> + scan_req_lock, + flags); + } + } +#endif /* STA_CFG80211 */ + +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) { + memset(&wrqu, 0, sizeof(union iwreq_data)); + wireless_send_event(priv->netdev, SIOCGIWSCAN, + &wrqu, NULL); + } +#endif + woal_broadcast_event(priv, (t_u8 *)&pmevent->event_id, + sizeof(mlan_event_id)); + + } + if (priv->phandle->scan_pending_on_block == MTRUE) { + priv->phandle->scan_pending_on_block = MFALSE; + MOAL_REL_SEMAPHORE(&priv->phandle->async_sem); + } + break; + + case MLAN_EVENT_ID_DRV_OBSS_SCAN_PARAM: + memmove((pmevent->event_buf + strlen(CUS_EVT_OBSS_SCAN_PARAM) + + 1), pmevent->event_buf, pmevent->event_len); + memcpy(pmevent->event_buf, (t_u8 *)CUS_EVT_OBSS_SCAN_PARAM, + strlen(CUS_EVT_OBSS_SCAN_PARAM)); + pmevent->event_buf[strlen(CUS_EVT_OBSS_SCAN_PARAM)] = 0; + woal_broadcast_event(priv, pmevent->event_buf, + pmevent->event_len + + strlen(CUS_EVT_OBSS_SCAN_PARAM)); + +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) { + memset(&wrqu, 0, sizeof(union iwreq_data)); + wrqu.data.pointer = pmevent->event_buf; + wrqu.data.length = + pmevent->event_len + + strlen(CUS_EVT_OBSS_SCAN_PARAM) + 1; + wireless_send_event(priv->netdev, IWEVCUSTOM, &wrqu, + pmevent->event_buf); + } +#endif + break; + case MLAN_EVENT_ID_FW_BW_CHANGED: + memmove((pmevent->event_buf + strlen(CUS_EVT_BW_CHANGED) + 1), + pmevent->event_buf, pmevent->event_len); + memcpy(pmevent->event_buf, (t_u8 *)CUS_EVT_BW_CHANGED, + strlen(CUS_EVT_BW_CHANGED)); + pmevent->event_buf[strlen(CUS_EVT_BW_CHANGED)] = 0; + woal_broadcast_event(priv, pmevent->event_buf, + pmevent->event_len + + strlen(CUS_EVT_BW_CHANGED)); + +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) { + memset(&wrqu, 0, sizeof(union iwreq_data)); + wrqu.data.pointer = pmevent->event_buf; + wrqu.data.length = + pmevent->event_len + + strlen(CUS_EVT_BW_CHANGED) + 1; + wireless_send_event(priv->netdev, IWEVCUSTOM, &wrqu, + pmevent->event_buf); + } +#endif + break; + + case MLAN_EVENT_ID_FW_DISCONNECTED: + woal_send_disconnect_to_system(priv); +#ifdef STA_WEXT + /* Reset wireless stats signal info */ + if (IS_STA_WEXT(cfg80211_wext)) { + priv->w_stats.qual.level = 0; + priv->w_stats.qual.noise = 0; + } +#endif +#ifdef REASSOCIATION + if (priv->reassoc_on == MTRUE) { + PRINTM(MINFO, "Reassoc: trigger the timer\n"); + priv->reassoc_required = MTRUE; + priv->phandle->is_reassoc_timer_set = MTRUE; + woal_mod_timer(&priv->phandle->reassoc_timer, + REASSOC_TIMER_DEFAULT); + } else { + priv->rate_index = AUTO_RATE; + } +#endif /* REASSOCIATION */ + break; + + case MLAN_EVENT_ID_FW_MIC_ERR_UNI: +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) { +#if WIRELESS_EXT >= 18 + woal_send_mic_error_event(priv, + MLAN_EVENT_ID_FW_MIC_ERR_UNI); +#else + woal_send_iwevcustom_event(priv, + CUS_EVT_MLME_MIC_ERR_UNI); +#endif + } +#endif /* STA_WEXT */ +#ifdef STA_CFG80211 + if (IS_STA_CFG80211(cfg80211_wext)) { + cfg80211_michael_mic_failure(priv->netdev, + priv->cfg_bssid, + NL80211_KEYTYPE_PAIRWISE, + -1, NULL, GFP_KERNEL); + } +#endif + woal_broadcast_event(priv, CUS_EVT_MLME_MIC_ERR_UNI, + strlen(CUS_EVT_MLME_MIC_ERR_UNI)); + break; + case MLAN_EVENT_ID_FW_MIC_ERR_MUL: +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) { +#if WIRELESS_EXT >= 18 + woal_send_mic_error_event(priv, + MLAN_EVENT_ID_FW_MIC_ERR_MUL); +#else + woal_send_iwevcustom_event(priv, + CUS_EVT_MLME_MIC_ERR_MUL); +#endif + } +#endif /* STA_WEXT */ +#ifdef STA_CFG80211 + if (IS_STA_CFG80211(cfg80211_wext)) { + cfg80211_michael_mic_failure(priv->netdev, + priv->cfg_bssid, + NL80211_KEYTYPE_GROUP, -1, + NULL, GFP_KERNEL); + } +#endif + woal_broadcast_event(priv, CUS_EVT_MLME_MIC_ERR_MUL, + strlen(CUS_EVT_MLME_MIC_ERR_MUL)); + break; + case MLAN_EVENT_ID_FW_BCN_RSSI_LOW: +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, + CUS_EVT_BEACON_RSSI_LOW); +#endif +#ifdef STA_CFG80211 + if (IS_STA_CFG80211(cfg80211_wext)) { +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35) || defined(COMPAT_WIRELESS) + cfg80211_cqm_rssi_notify(priv->netdev, + NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW, + GFP_KERNEL); + priv->last_event |= EVENT_BCN_RSSI_LOW; +#endif + if (!hw_test && priv->roaming_enabled) + woal_config_bgscan_and_rssi(priv, MTRUE); + } +#endif + woal_broadcast_event(priv, CUS_EVT_BEACON_RSSI_LOW, + strlen(CUS_EVT_BEACON_RSSI_LOW)); + break; + case MLAN_EVENT_ID_FW_BCN_RSSI_HIGH: +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, + CUS_EVT_BEACON_RSSI_HIGH); +#endif +#ifdef STA_CFG80211 + if (IS_STA_CFG80211(cfg80211_wext)) { + if (!priv->mrvl_rssi_low) { +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35) || defined(COMPAT_WIRELESS) + cfg80211_cqm_rssi_notify(priv->netdev, + NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH, + GFP_KERNEL); +#endif + woal_set_rssi_threshold(priv, + MLAN_EVENT_ID_FW_BCN_RSSI_HIGH, + MOAL_NO_WAIT); + } + } +#endif + woal_broadcast_event(priv, CUS_EVT_BEACON_RSSI_HIGH, + strlen(CUS_EVT_BEACON_RSSI_HIGH)); + break; + case MLAN_EVENT_ID_FW_BCN_SNR_LOW: +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, + CUS_EVT_BEACON_SNR_LOW); +#endif + woal_broadcast_event(priv, CUS_EVT_BEACON_SNR_LOW, + strlen(CUS_EVT_BEACON_SNR_LOW)); + break; + case MLAN_EVENT_ID_FW_BCN_SNR_HIGH: +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, + CUS_EVT_BEACON_SNR_HIGH); +#endif + woal_broadcast_event(priv, CUS_EVT_BEACON_SNR_HIGH, + strlen(CUS_EVT_BEACON_SNR_HIGH)); + break; + case MLAN_EVENT_ID_FW_MAX_FAIL: +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, CUS_EVT_MAX_FAIL); +#endif + woal_broadcast_event(priv, CUS_EVT_MAX_FAIL, + strlen(CUS_EVT_MAX_FAIL)); + break; + case MLAN_EVENT_ID_FW_DATA_RSSI_LOW: +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, CUS_EVT_DATA_RSSI_LOW); +#endif + woal_broadcast_event(priv, CUS_EVT_DATA_RSSI_LOW, + strlen(CUS_EVT_DATA_RSSI_LOW)); + break; + case MLAN_EVENT_ID_FW_DATA_SNR_LOW: +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, CUS_EVT_DATA_SNR_LOW); +#endif + woal_broadcast_event(priv, CUS_EVT_DATA_SNR_LOW, + strlen(CUS_EVT_DATA_SNR_LOW)); + break; + case MLAN_EVENT_ID_FW_DATA_RSSI_HIGH: +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, + CUS_EVT_DATA_RSSI_HIGH); +#endif + woal_broadcast_event(priv, CUS_EVT_DATA_RSSI_HIGH, + strlen(CUS_EVT_DATA_RSSI_HIGH)); + break; + case MLAN_EVENT_ID_FW_DATA_SNR_HIGH: +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, CUS_EVT_DATA_SNR_HIGH); +#endif + woal_broadcast_event(priv, CUS_EVT_DATA_SNR_HIGH, + strlen(CUS_EVT_DATA_SNR_HIGH)); + break; + case MLAN_EVENT_ID_FW_LINK_QUALITY: +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, CUS_EVT_LINK_QUALITY); +#endif + woal_broadcast_event(priv, CUS_EVT_LINK_QUALITY, + strlen(CUS_EVT_LINK_QUALITY)); + break; + case MLAN_EVENT_ID_FW_PORT_RELEASE: +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, CUS_EVT_PORT_RELEASE); +#endif + woal_broadcast_event(priv, CUS_EVT_PORT_RELEASE, + strlen(CUS_EVT_PORT_RELEASE)); + break; + case MLAN_EVENT_ID_FW_PRE_BCN_LOST: +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, + CUS_EVT_PRE_BEACON_LOST); +#endif +#ifdef STA_CFG80211 +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35) || defined(COMPAT_WIRELESS) + if (IS_STA_CFG80211(cfg80211_wext)) { + struct cfg80211_bss *bss = NULL; + bss = cfg80211_get_bss(priv->wdev->wiphy, NULL, + priv->cfg_bssid, NULL, 0, + WLAN_CAPABILITY_ESS, + WLAN_CAPABILITY_ESS); + if (bss) + cfg80211_unlink_bss(priv->wdev->wiphy, bss); + if (!hw_test && priv->roaming_enabled) + woal_config_bgscan_and_rssi(priv, MFALSE); + priv->last_event |= EVENT_PRE_BCN_LOST; + } +#endif +#endif + woal_broadcast_event(priv, CUS_EVT_PRE_BEACON_LOST, + strlen(CUS_EVT_PRE_BEACON_LOST)); + break; + case MLAN_EVENT_ID_FW_DEBUG_INFO: +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, pmevent->event_buf); +#endif + woal_broadcast_event(priv, pmevent->event_buf, + pmevent->event_len); + break; + case MLAN_EVENT_ID_FW_WMM_CONFIG_CHANGE: +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, + WMM_CONFIG_CHANGE_INDICATION); +#endif + woal_broadcast_event(priv, WMM_CONFIG_CHANGE_INDICATION, + strlen(WMM_CONFIG_CHANGE_INDICATION)); + break; + + case MLAN_EVENT_ID_DRV_REPORT_STRING: + PRINTM(MINFO, "Report string %s\n", pmevent->event_buf); +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, pmevent->event_buf); +#endif + woal_broadcast_event(priv, pmevent->event_buf, + strlen(pmevent->event_buf)); + break; + case MLAN_EVENT_ID_FW_WEP_ICV_ERR: + DBG_HEXDUMP(MCMD_D, "WEP ICV error", pmevent->event_buf, + pmevent->event_len); +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, CUS_EVT_WEP_ICV_ERR); +#endif + woal_broadcast_event(priv, CUS_EVT_WEP_ICV_ERR, + strlen(CUS_EVT_WEP_ICV_ERR)); + break; + + case MLAN_EVENT_ID_DRV_DEFER_HANDLING: + queue_work(priv->phandle->workqueue, &priv->phandle->main_work); + break; + case MLAN_EVENT_ID_DRV_FLUSH_RX_WORK: + flush_workqueue(priv->phandle->rx_workqueue); + break; + case MLAN_EVENT_ID_DRV_FLUSH_MAIN_WORK: + flush_workqueue(priv->phandle->workqueue); + break; + case MLAN_EVENT_ID_DRV_DEFER_RX_WORK: + queue_work(priv->phandle->rx_workqueue, + &priv->phandle->rx_work); + break; + case MLAN_EVENT_ID_DRV_DBG_DUMP: + priv->phandle->driver_state = MTRUE; + woal_moal_debug_info(priv, NULL, MFALSE); + woal_broadcast_event(priv, CUS_EVT_DRIVER_HANG, + strlen(CUS_EVT_DRIVER_HANG)); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) +#ifdef STA_CFG80211 + woal_cfg80211_vendor_event(priv, event_hang, + CUS_EVT_DRIVER_HANG, + strlen(CUS_EVT_DRIVER_HANG)); +#endif +#endif + woal_process_hang(priv->phandle); + break; + case MLAN_EVENT_ID_FW_BG_SCAN: + if (priv->media_connected == MTRUE) + priv->bg_scan_start = MFALSE; + priv->bg_scan_reported = MTRUE; +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) { + memset(&wrqu, 0, sizeof(union iwreq_data)); + wireless_send_event(priv->netdev, SIOCGIWSCAN, &wrqu, + NULL); + } +#endif +#ifdef STA_CFG80211 + if (IS_STA_CFG80211(cfg80211_wext)) { + priv->last_event |= EVENT_BG_SCAN_REPORT; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) + if (priv->sched_scanning && + !priv->phandle->cfg80211_suspend) { + mlan_scan_resp scan_resp; + woal_get_scan_table(priv, MOAL_NO_WAIT, + &scan_resp); + PRINTM(MIOCTL, + "Trigger mlan get bgscan result\n"); + } +#endif + if (!hw_test && priv->roaming_enabled) { + priv->roaming_required = MTRUE; + wake_up_interruptible(&priv->phandle-> + reassoc_thread.wait_q); + } + } +#endif + break; + case MLAN_EVENT_ID_FW_BG_SCAN_STOPPED: +#ifdef STA_CFG80211 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) + if (IS_STA_CFG80211(cfg80211_wext)) { + if (priv->sched_scanning) { + cfg80211_sched_scan_stopped(priv->wdev->wiphy); + PRINTM(MEVENT, "Sched_Scan stopped\n"); + priv->sched_scanning = MFALSE; + } + } +#endif +#endif + break; + case MLAN_EVENT_ID_DRV_BGSCAN_RESULT: +#ifdef STA_CFG80211 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) + if (IS_STA_CFG80211(cfg80211_wext)) { + if (priv->sched_scanning && + !priv->phandle->cfg80211_suspend) { + woal_inform_bss_from_scan_result(priv, NULL, + MOAL_NO_WAIT); + cfg80211_sched_scan_results(priv->wdev->wiphy); + priv->last_event = 0; + PRINTM(MEVENT, + "Reporting Sched_Scan results\n"); + } + } +#endif +#endif + break; + case MLAN_EVENT_ID_FW_CHANNEL_SWITCH_ANN: +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) + woal_send_iwevcustom_event(priv, + CUS_EVT_CHANNEL_SWITCH_ANN); +#endif + woal_broadcast_event(priv, CUS_EVT_CHANNEL_SWITCH_ANN, + strlen(CUS_EVT_CHANNEL_SWITCH_ANN)); + break; +#endif /* STA_SUPPORT */ + case MLAN_EVENT_ID_FW_STOP_TX: + woal_stop_queue(priv->netdev); + if (netif_carrier_ok(priv->netdev)) + netif_carrier_off(priv->netdev); + break; + case MLAN_EVENT_ID_FW_START_TX: + if (!netif_carrier_ok(priv->netdev)) + netif_carrier_on(priv->netdev); + woal_wake_queue(priv->netdev); + break; + case MLAN_EVENT_ID_FW_HS_WAKEUP: + /* simulate HSCFG_CANCEL command */ + woal_cancel_hs(priv, MOAL_NO_WAIT); +#ifdef STA_SUPPORT + pmpriv = woal_get_priv((moal_handle *)pmoal_handle, + MLAN_BSS_ROLE_STA); +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext) && pmpriv) + woal_send_iwevcustom_event(pmpriv, CUS_EVT_HS_WAKEUP); +#endif /* STA_WEXT */ + if (pmpriv) + woal_broadcast_event(pmpriv, CUS_EVT_HS_WAKEUP, + strlen(CUS_EVT_HS_WAKEUP)); +#endif /* STA_SUPPORT */ +#ifdef UAP_SUPPORT + pmpriv = woal_get_priv((moal_handle *)pmoal_handle, + MLAN_BSS_ROLE_UAP); + if (pmpriv) { + pmevent->event_id = UAP_EVENT_ID_HS_WAKEUP; + woal_broadcast_event(pmpriv, (t_u8 *)&pmevent->event_id, + sizeof(t_u32)); + } +#endif /* UAP_SUPPORT */ + break; + case MLAN_EVENT_ID_DRV_HS_ACTIVATED: +#ifdef STA_SUPPORT + pmpriv = woal_get_priv((moal_handle *)pmoal_handle, + MLAN_BSS_ROLE_STA); +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext) && pmpriv) + woal_send_iwevcustom_event(pmpriv, + CUS_EVT_HS_ACTIVATED); +#endif /* STA_WEXT */ + if (pmpriv) + woal_broadcast_event(pmpriv, CUS_EVT_HS_ACTIVATED, + strlen(CUS_EVT_HS_ACTIVATED)); +#endif /* STA_SUPPORT */ +#if defined(UAP_SUPPORT) + pmpriv = woal_get_priv((moal_handle *)pmoal_handle, + MLAN_BSS_ROLE_UAP); + if (pmpriv) { + pmevent->event_id = UAP_EVENT_ID_DRV_HS_ACTIVATED; + woal_broadcast_event(pmpriv, (t_u8 *)&pmevent->event_id, + sizeof(t_u32)); + } +#endif +#if defined(SDIO_SUSPEND_RESUME) + if (priv->phandle->suspend_fail == MFALSE) { + woal_get_pm_info(priv, &pm_info); + if (pm_info.is_suspend_allowed == MTRUE) { + priv->phandle->hs_activated = MTRUE; +#ifdef MMC_PM_FUNC_SUSPENDED + woal_wlan_is_suspended(priv->phandle); +#endif + } + priv->phandle->hs_activate_wait_q_woken = MTRUE; + wake_up_interruptible(&priv->phandle-> + hs_activate_wait_q); + } +#endif + break; + case MLAN_EVENT_ID_DRV_HS_DEACTIVATED: +#ifdef STA_SUPPORT + pmpriv = woal_get_priv((moal_handle *)pmoal_handle, + MLAN_BSS_ROLE_STA); +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext) && pmpriv) + woal_send_iwevcustom_event(pmpriv, + CUS_EVT_HS_DEACTIVATED); +#endif /* STA_WEXT */ + if (pmpriv) + woal_broadcast_event(pmpriv, CUS_EVT_HS_DEACTIVATED, + strlen(CUS_EVT_HS_DEACTIVATED)); +#endif /* STA_SUPPORT */ +#if defined(UAP_SUPPORT) + pmpriv = woal_get_priv((moal_handle *)pmoal_handle, + MLAN_BSS_ROLE_UAP); + if (pmpriv) { + pmevent->event_id = UAP_EVENT_ID_DRV_HS_DEACTIVATED; + woal_broadcast_event(pmpriv, (t_u8 *)&pmevent->event_id, + sizeof(t_u32)); + } +#endif +#if defined(SDIO_SUSPEND_RESUME) + priv->phandle->hs_activated = MFALSE; +#endif + break; +#ifdef UAP_SUPPORT + case MLAN_EVENT_ID_UAP_FW_BSS_START: + if (priv->hist_data) + woal_hist_data_reset(priv); + priv->bss_started = MTRUE; + if (!netif_carrier_ok(priv->netdev)) + netif_carrier_on(priv->netdev); + woal_start_queue(priv->netdev); + memcpy(priv->current_addr, pmevent->event_buf + 6, ETH_ALEN); + memcpy(priv->netdev->dev_addr, priv->current_addr, ETH_ALEN); + woal_broadcast_event(priv, pmevent->event_buf, + pmevent->event_len); +#ifdef STA_SUPPORT +#ifdef STA_CFG80211 + pmpriv = woal_get_priv((moal_handle *)pmoal_handle, + MLAN_BSS_ROLE_STA); + if (IS_STA_CFG80211(cfg80211_wext) && pmpriv) + woal_set_scan_time(pmpriv, ACTIVE_SCAN_CHAN_TIME, + PASSIVE_SCAN_CHAN_TIME, + MIN_SPECIFIC_SCAN_CHAN_TIME); +#endif +#endif + break; + case MLAN_EVENT_ID_UAP_FW_BSS_ACTIVE: + priv->media_connected = MTRUE; + if (!netif_carrier_ok(priv->netdev)) + netif_carrier_on(priv->netdev); + woal_wake_queue(priv->netdev); + woal_broadcast_event(priv, pmevent->event_buf, + pmevent->event_len); + break; + case MLAN_EVENT_ID_UAP_FW_BSS_IDLE: + priv->media_connected = MFALSE; + woal_broadcast_event(priv, pmevent->event_buf, + pmevent->event_len); + break; + case MLAN_EVENT_ID_UAP_FW_MIC_COUNTERMEASURES: + { + t_u16 status = 0; + status = *(t_u16 *)(pmevent->event_buf + 4); + if (status) { + priv->media_connected = MFALSE; + woal_stop_queue(priv->netdev); + if (netif_carrier_ok(priv->netdev)) + netif_carrier_off(priv->netdev); + } else { + priv->media_connected = MTRUE; + if (!netif_carrier_ok(priv->netdev)) + netif_carrier_on(priv->netdev); + woal_wake_queue(priv->netdev); + } + woal_broadcast_event(priv, pmevent->event_buf, + pmevent->event_len); + } + break; +#ifdef WIFI_DIRECT_SUPPORT +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + case MLAN_EVENT_ID_FW_REMAIN_ON_CHAN_EXPIRED: + if (IS_STA_OR_UAP_CFG80211(cfg80211_wext)) { + PRINTM(MEVENT, + "FW_REMAIN_ON_CHANNEL_EXPIRED cookie = %#llx\n", + priv->phandle->cookie); + priv->phandle->remain_on_channel = MFALSE; + if (priv->phandle->cookie && + !priv->phandle->is_remain_timer_set) { + cfg80211_remain_on_channel_expired( +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + priv-> + netdev, +#else + priv-> + wdev, +#endif + priv-> + phandle-> + cookie, + &priv-> + phandle-> + chan, +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + priv-> + phandle-> + channel_type, +#endif + GFP_ATOMIC); + priv->phandle->cookie = 0; + } + } + break; +#endif +#endif + case MLAN_EVENT_ID_UAP_FW_STA_CONNECT: +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + if (IS_STA_OR_UAP_CFG80211(cfg80211_wext)) { + struct station_info sinfo; + t_u8 addr[ETH_ALEN]; + + sinfo.filled = 0; + sinfo.generation = 0; + /* copy the station mac address */ + memset(addr, 0xFF, ETH_ALEN); + memcpy(addr, pmevent->event_buf, ETH_ALEN); + /** these field add in kernel 3.2, but some + * kernel do have the pacth to support it, + * like T3T and pxa978T 3.0.31 JB, these + * patch are needed to support + * wpa_supplicant 2.x */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 31) || defined(COMPAT_WIRELESS) + if (pmevent->event_len > ETH_ALEN) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0) + /* set station info filled flag */ + sinfo.filled |= STATION_INFO_ASSOC_REQ_IES; +#endif + /* get the assoc request ies and length */ + sinfo.assoc_req_ies = + (const t_u8 *)(pmevent->event_buf + + ETH_ALEN); + sinfo.assoc_req_ies_len = + pmevent->event_len - ETH_ALEN; + + } +#endif /* KERNEL_VERSION */ + if (priv->netdev && priv->wdev) + cfg80211_new_sta(priv->netdev, + (t_u8 *)addr, &sinfo, + GFP_KERNEL); + } +#endif /* UAP_CFG80211 */ + memmove((pmevent->event_buf + strlen(CUS_EVT_STA_CONNECTED) + + 1), pmevent->event_buf, pmevent->event_len); + memcpy(pmevent->event_buf, (t_u8 *)CUS_EVT_STA_CONNECTED, + strlen(CUS_EVT_STA_CONNECTED)); + pmevent->event_buf[strlen(CUS_EVT_STA_CONNECTED)] = 0; + woal_broadcast_event(priv, pmevent->event_buf, + pmevent->event_len + + strlen(CUS_EVT_STA_CONNECTED)); +#ifdef UAP_WEXT + if (IS_UAP_WEXT(cfg80211_wext)) { + memset(&wrqu, 0, sizeof(union iwreq_data)); + wrqu.data.pointer = pmevent->event_buf; + if ((pmevent->event_len + + strlen(CUS_EVT_STA_CONNECTED) + 1) > IW_CUSTOM_MAX) + wrqu.data.length = + ETH_ALEN + + strlen(CUS_EVT_STA_CONNECTED) + 1; + else + wrqu.data.length = + pmevent->event_len + + strlen(CUS_EVT_STA_CONNECTED) + 1; + wireless_send_event(priv->netdev, IWEVCUSTOM, &wrqu, + pmevent->event_buf); + } +#endif /* UAP_WEXT */ + break; + case MLAN_EVENT_ID_UAP_FW_STA_DISCONNECT: +#ifdef UAP_CFG80211 + if (IS_UAP_CFG80211(cfg80211_wext)) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0) || defined(COMPAT_WIRELESS) + /* skip 2 bytes extra header will get the mac address */ + if (priv->netdev && priv->wdev) + cfg80211_del_sta(priv->netdev, + pmevent->event_buf + 2, + GFP_KERNEL); +#endif /* KERNEL_VERSION */ + } +#endif /* UAP_CFG80211 */ + memmove((pmevent->event_buf + strlen(CUS_EVT_STA_DISCONNECTED) + + 1), pmevent->event_buf, pmevent->event_len); + memcpy(pmevent->event_buf, (t_u8 *)CUS_EVT_STA_DISCONNECTED, + strlen(CUS_EVT_STA_DISCONNECTED)); + pmevent->event_buf[strlen(CUS_EVT_STA_DISCONNECTED)] = 0; + woal_broadcast_event(priv, pmevent->event_buf, + pmevent->event_len + + strlen(CUS_EVT_STA_DISCONNECTED)); + +#ifdef UAP_WEXT + if (IS_UAP_WEXT(cfg80211_wext)) { + memset(&wrqu, 0, sizeof(union iwreq_data)); + wrqu.data.pointer = pmevent->event_buf; + wrqu.data.length = + pmevent->event_len + + strlen(CUS_EVT_STA_DISCONNECTED) + 1; + wireless_send_event(priv->netdev, IWEVCUSTOM, &wrqu, + pmevent->event_buf); + } +#endif /* UAP_WEXT */ + break; + case MLAN_EVENT_ID_DRV_MGMT_FRAME: +#ifdef UAP_WEXT + if (IS_UAP_WEXT(cfg80211_wext)) { + woal_broadcast_event(priv, pmevent->event_buf, + pmevent->event_len); + } +#endif /* UAP_WEXT */ +#ifdef WIFI_DIRECT_SUPPORT +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + if (IS_STA_OR_UAP_CFG80211(cfg80211_wext)) { +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (priv->netdev + && priv->netdev->ieee80211_ptr->wiphy->mgmt_stypes + && priv->mgmt_subtype_mask) { + /* frmctl + durationid + addr1 + addr2 + addr3 + + seqctl */ +#define PACKET_ADDR4_POS (2 + 2 + 6 + 6 + 6 + 2) + t_u8 *pkt; + int freq = + priv->phandle-> + remain_on_channel ? priv->phandle->chan. + center_freq : + woal_get_active_intf_freq(priv); + if (!freq) { + if (!priv->phandle->chan.center_freq) { + PRINTM(MINFO, + "Skip to report mgmt packet to cfg80211\n"); + break; + } + freq = priv->phandle->chan.center_freq; + } + + pkt = ((t_u8 *)pmevent->event_buf + + sizeof(pmevent->event_id)); + + /* move addr4 */ + memmove(pkt + PACKET_ADDR4_POS, + pkt + PACKET_ADDR4_POS + ETH_ALEN, + pmevent->event_len - + sizeof(pmevent->event_id) + - PACKET_ADDR4_POS - ETH_ALEN); + if (ieee80211_is_action + (((struct ieee80211_mgmt *)pkt)-> + frame_control)) + woal_cfg80211_display_p2p_actframe(pkt, + pmevent-> + event_len + - + sizeof + (pmevent-> + event_id) + - + MLAN_MAC_ADDR_LENGTH, + ieee80211_get_channel + (priv-> + wdev-> + wiphy, + freq), + MFALSE); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) + cfg80211_rx_mgmt( +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) + priv->wdev, +#else + priv->netdev, +#endif + freq, 0, + ((const t_u8 *)pmevent-> + event_buf) + + sizeof(pmevent-> + event_id), + pmevent->event_len - + sizeof(pmevent-> + event_id) - + MLAN_MAC_ADDR_LENGTH +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) + , 0 +#endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) + , GFP_ATOMIC +#endif + ); +#else + cfg80211_rx_mgmt(priv->netdev, freq, + ((const t_u8 *)pmevent-> + event_buf) + + sizeof(pmevent->event_id), + pmevent->event_len - + sizeof(pmevent->event_id) - + MLAN_MAC_ADDR_LENGTH, + GFP_ATOMIC); +#endif + } +#endif /* KERNEL_VERSION */ + } +#endif /* STA_CFG80211 || UAP_CFG80211 */ +#endif /* WIFI_DIRECT_SUPPORT */ + break; +#endif /* UAP_SUPPORT */ + case MLAN_EVENT_ID_DRV_PASSTHRU: + woal_broadcast_event(priv, pmevent->event_buf, + pmevent->event_len); + break; + case MLAN_EVENT_ID_DRV_ASSOC_FAILURE_REPORT: + PRINTM(MINFO, "Assoc result\n"); + + if (priv->media_connected) { + PRINTM(MINFO, "Assoc_Rpt: Media Connected\n"); + if (!netif_carrier_ok(priv->netdev)) { + PRINTM(MINFO, "Assoc_Rpt: Carrier On\n"); + netif_carrier_on(priv->netdev); + } + PRINTM(MINFO, "Assoc_Rpt: Queue Start\n"); + woal_wake_queue(priv->netdev); + } + break; + case MLAN_EVENT_ID_DRV_MEAS_REPORT: + /* We have received measurement report, wakeup measurement wait + queue */ + PRINTM(MINFO, "Measurement Report\n"); + /* Going out of CAC checking period */ + if (priv->phandle->cac_period == MTRUE) { + priv->phandle->cac_period = MFALSE; + if (priv->phandle->meas_wait_q_woken == MFALSE) { + priv->phandle->meas_wait_q_woken = MTRUE; + wake_up_interruptible(&priv->phandle-> + meas_wait_q); + } + + /* Execute delayed BSS START command */ + if (priv->phandle->delay_bss_start == MTRUE) { + mlan_ioctl_req *req = NULL; + mlan_ds_bss *bss = NULL; + + /* Clear flag */ + priv->phandle->delay_bss_start = MFALSE; + + PRINTM(MMSG, + "Now CAC measure period end. Execute delayed BSS Start command.\n"); + + req = woal_alloc_mlan_ioctl_req(sizeof + (mlan_ds_bss)); + if (!req) { + PRINTM(MERROR, + "Failed to allocate ioctl request buffer\n"); + goto done; + } + bss = (mlan_ds_bss *)req->pbuf; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_SET; + bss->sub_command = MLAN_OID_BSS_START; + memcpy(&bss->param.ssid_bssid, + &priv->phandle->delay_ssid_bssid, + sizeof(mlan_ssid_bssid)); + + if (woal_request_ioctl(priv, req, MOAL_NO_WAIT) + != MLAN_STATUS_PENDING) { + PRINTM(MERROR, + "Delayed BSS Start operation failed!\n"); + kfree(req); + } + + PRINTM(MMSG, "BSS START Complete!\n"); + } + } + break; + case MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ: +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) +#ifdef STA_CFG80211 + if (IS_STA_CFG80211(cfg80211_wext)) { + tdls_tear_down_event *tdls_event = + (tdls_tear_down_event *)pmevent->event_buf; + cfg80211_tdls_oper_request(priv->netdev, + tdls_event->peer_mac_addr, + NL80211_TDLS_TEARDOWN, + tdls_event->reason_code, + GFP_KERNEL); + } +#endif +#endif + break; + case MLAN_EVENT_ID_FW_TX_STATUS: +#if defined(STA_CFG80211) || defined(UAP_CFG80211) + if (IS_STA_OR_UAP_CFG80211(cfg80211_wext)) { + unsigned long flag; + tx_status_event *tx_status = + (tx_status_event *)(pmevent->event_buf + 4); + struct tx_status_info *tx_info = NULL; + PRINTM(MINFO, + "Receive Tx status: tx_token=%d, pkt_type=0x%x, status=%d tx_seq_num=%d\n", + tx_status->tx_token_id, tx_status->packet_type, + tx_status->status, priv->tx_seq_num); + spin_lock_irqsave(&priv->tx_stat_lock, flag); + tx_info = + woal_get_tx_info(priv, tx_status->tx_token_id); + if (tx_info) { + bool ack; + struct sk_buff *skb = + (struct sk_buff *)tx_info->tx_skb; + if (!tx_status->status) + ack = true; + else + ack = false; + PRINTM(MEVENT, "Wlan: Tx status=%d\n", ack); + if (tx_info->tx_cookie) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + cfg80211_mgmt_tx_status(priv->netdev, + tx_info-> + tx_cookie, + skb->data, + skb->len, ack, + GFP_ATOMIC); +#else + cfg80211_mgmt_tx_status(priv->wdev, + tx_info-> + tx_cookie, + skb->data, + skb->len, ack, + GFP_ATOMIC); +#endif +#endif + } + list_del(&tx_info->link); + dev_kfree_skb_any(skb); + kfree(tx_info); + } + spin_unlock_irqrestore(&priv->tx_stat_lock, flag); + } +#endif + break; + case MLAN_EVENT_ID_DRV_FT_RESPONSE: +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) +#ifdef STA_CFG80211 + if (IS_STA_CFG80211(cfg80211_wext)) { + struct cfg80211_ft_event_params ft_event; + if (priv->ft_pre_connect) + break; + memset(&ft_event, 0, + sizeof(struct cfg80211_ft_event_params)); + PRINTM(MMSG, + "wlan : FT response target AP " MACSTR "\n", + MAC2STR((t_u8 *)pmevent->event_buf)); + DBG_HEXDUMP(MDAT_D, "FT-event ", pmevent->event_buf, + pmevent->event_len); + memcpy(priv->target_ap_bssid, pmevent->event_buf, + ETH_ALEN); + ft_event.target_ap = priv->target_ap_bssid; + ft_event.ies = pmevent->event_buf + ETH_ALEN; + ft_event.ies_len = pmevent->event_len - ETH_ALEN; + /* TSPEC info is needed by RIC, However the TS + operation is configured by mlanutl */ + /* So do not add RIC temporally */ + /* when add RIC, 1. query TS status, 2. copy tspec from + addts command */ + ft_event.ric_ies = NULL; + ft_event.ric_ies_len = 0; + + cfg80211_ft_event(priv->netdev, &ft_event); + priv->ft_pre_connect = MTRUE; + + if (priv->ft_roaming_triggered_by_driver || + !(priv->ft_cap & MBIT(0))) { + priv->ft_wait_condition = MTRUE; + wake_up(&priv->ft_wait_q); + } + } +#endif +#endif + break; + case MLAN_EVENT_ID_FW_DUMP_INFO: + woal_store_firmware_dump(priv, pmevent); + break; + default: + break; + } +done: + LEAVE(); + return MLAN_STATUS_SUCCESS; +} + +/** + * @brief This function prints the debug message in mlan + * + * @param pmoal_handle Pointer to the MOAL context + * @param level debug level + * @param pformat point to string format buf + * + * @return N/A + */ +t_void +moal_print(IN t_void *pmoal_handle, IN t_u32 level, IN char *pformat, IN ...) +{ +#ifdef DEBUG_LEVEL1 + va_list args; + + if (level & MHEX_DUMP) { + t_u8 *buf = NULL; + int len = 0; + + va_start(args, pformat); + buf = (t_u8 *)va_arg(args, t_u8 *); + len = (int)va_arg(args, int); + va_end(args); + +#ifdef DEBUG_LEVEL2 + if (level & MINFO) + HEXDUMP((char *)pformat, buf, len); + else +#endif /* DEBUG_LEVEL2 */ + { + if (level & MERROR) + DBG_HEXDUMP(MERROR, (char *)pformat, buf, len); + if (level & MCMD_D) + DBG_HEXDUMP(MCMD_D, (char *)pformat, buf, len); + if (level & MDAT_D) + DBG_HEXDUMP(MDAT_D, (char *)pformat, buf, len); + if (level & MIF_D) + DBG_HEXDUMP(MIF_D, (char *)pformat, buf, len); + if (level & MFW_D) + DBG_HEXDUMP(MFW_D, (char *)pformat, buf, len); + if (level & MEVT_D) + DBG_HEXDUMP(MEVT_D, (char *)pformat, buf, len); + } + } else { + if (drvdbg & level) { + va_start(args, pformat); + vprintk(pformat, args); + va_end(args); + } + } +#endif /* DEBUG_LEVEL1 */ +} + +/** + * @brief This function prints the network interface name + * + * @param pmoal_handle Pointer to the MOAL context + * @param bss_index BSS index + * @param level debug level + * + * @return N/A + */ +t_void +moal_print_netintf(IN t_void *pmoal_handle, IN t_u32 bss_index, IN t_u32 level) +{ +#ifdef DEBUG_LEVEL1 + moal_handle *phandle = (moal_handle *)pmoal_handle; + + if (phandle) { + if ((bss_index < MLAN_MAX_BSS_NUM) && phandle->priv[bss_index] + && phandle->priv[bss_index]->netdev) { + if (drvdbg & level) + printk("%s: ", + phandle->priv[bss_index]->netdev->name); + } + } +#endif /* DEBUG_LEVEL1 */ +} + +/** + * @brief This function asserts the existence of the passed argument + * + * @param pmoal_handle A pointer to moal_private structure + * @param cond Condition to check + * + * @return N/A + */ +t_void +moal_assert(IN t_void *pmoal_handle, IN t_u32 cond) +{ + if (!cond) { + panic("Assert failed: Panic!"); + } +} + +/** + * @brief This function indicate tcp ack tx + * + * @param pmoal_handle A pointer to moal_private structure + * @param pmbuf Pointer to the mlan buffer structure + * + * @return N/A + */ +t_void +moal_tcp_ack_tx_ind(IN t_void *pmoal_handle, IN pmlan_buffer pmbuf) +{ + moal_handle *phandle = (moal_handle *)pmoal_handle; + pmbuf->flags &= ~MLAN_BUF_FLAG_TCP_ACK; + woal_tcp_ack_tx_indication(phandle->priv[pmbuf->bss_index], pmbuf); +} + +/** + * @brief This function save the histogram data + * + * @param pmoal_handle A pointer to moal_private structure + * @param bss_index BSS index + * @param rx_rate rx rate index + * @param snr snr + * @param nflr noise floor + * + * @return N/A + */ +t_void +moal_hist_data_add(IN t_void *pmoal_handle, IN t_u32 bss_index, IN t_u8 rx_rate, + IN t_s8 snr, IN t_s8 nflr, IN t_u8 antenna) +{ + moal_private *priv = NULL; + priv = woal_bss_index_to_priv(pmoal_handle, bss_index); + if (antenna >= priv->phandle->histogram_table_num) + antenna = 0; + if(priv && priv->hist_data[antenna]) + woal_hist_data_add(priv, rx_rate, snr, nflr, antenna); +} + +/** + * @brief This function update the peer signal + * + * @param pmoal_handle A pointer to moal_private structure + * @param bss_index BSS index + * @param snr snr + * @param nflr noise floor + * + * @return N/A + */ +t_void +moal_updata_peer_signal(IN t_void *pmoal_handle, IN t_u32 bss_index, + IN t_u8 *peer_addr, IN t_s8 snr, IN t_s8 nflr) +{ + moal_private *priv = NULL; + struct tdls_peer *peer = NULL; + unsigned long flags; + priv = woal_bss_index_to_priv(pmoal_handle, bss_index); + if (priv && priv->enable_auto_tdls) { + spin_lock_irqsave(&priv->tdls_lock, flags); + list_for_each_entry(peer, &priv->tdls_list, link) { + if (!memcmp(peer->peer_addr, peer_addr, ETH_ALEN)) { + peer->rssi = nflr - snr; + peer->rssi_jiffies = jiffies; + break; + } + } + spin_unlock_irqrestore(&priv->tdls_lock, flags); + } +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_shim.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_shim.h new file mode 100644 index 00000000..567c0364 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_shim.h @@ -0,0 +1,106 @@ +/** @file moal_shim.h + * + * @brief This file contains declaration referring to + * functions defined in moal module + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ +/************************************************************* +Change Log: + 10/21/2008: initial version +************************************************************/ + +#ifndef _MOAL_H +#define _MOAL_H + +mlan_status moal_get_fw_data(IN t_void *pmoal_handle, + IN t_u32 offset, IN t_u32 len, OUT t_u8 *pbuf); +mlan_status moal_init_fw_complete(IN t_void *pmoal_handle, + IN mlan_status status); +mlan_status moal_shutdown_fw_complete(IN t_void *pmoal_handle, + IN mlan_status status); +mlan_status moal_ioctl_complete(IN t_void *pmoal_handle, + IN pmlan_ioctl_req pioctl_req, + IN mlan_status status); +mlan_status moal_alloc_mlan_buffer(IN t_void *pmoal_handle, IN t_u32 size, + OUT pmlan_buffer *pmbuf); +mlan_status moal_free_mlan_buffer(IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf); +mlan_status moal_send_packet_complete(IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf, + IN mlan_status status); + +/** moal_write_reg */ +mlan_status moal_write_reg(IN t_void *pmoal_handle, + IN t_u32 reg, IN t_u32 data); +/** moal_read_reg */ +mlan_status moal_read_reg(IN t_void *pmoal_handle, + IN t_u32 reg, OUT t_u32 *data); +mlan_status moal_write_data_sync(IN t_void *pmoal_handle, + IN pmlan_buffer pmbuf, + IN t_u32 port, IN t_u32 timeout); +mlan_status moal_read_data_sync(IN t_void *pmoal_handle, + IN OUT pmlan_buffer pmbuf, + IN t_u32 port, IN t_u32 timeout); +mlan_status moal_recv_packet(IN t_void *pmoal_handle, IN pmlan_buffer pmbuf); +mlan_status moal_recv_event(IN t_void *pmoal_handle, IN pmlan_event pmevent); +mlan_status moal_malloc(IN t_void *pmoal_handle, + IN t_u32 size, IN t_u32 flag, OUT t_u8 **ppbuf); +mlan_status moal_mfree(IN t_void *pmoal_handle, IN t_u8 *pbuf); +mlan_status moal_vmalloc(IN t_void *pmoal_handle, + IN t_u32 size, OUT t_u8 **ppbuf); +mlan_status moal_vfree(IN t_void *pmoal_handle, IN t_u8 *pbuf); +t_void *moal_memset(IN t_void *pmoal_handle, + IN t_void *pmem, IN t_u8 byte, IN t_u32 num); +t_void *moal_memcpy(IN t_void *pmoal_handle, + IN t_void *pdest, IN const t_void *psrc, IN t_u32 num); +t_void *moal_memmove(IN t_void *pmoal_handle, + IN t_void *pdest, IN const t_void *psrc, IN t_u32 num); +t_s32 moal_memcmp(IN t_void *pmoal_handle, + IN const t_void *pmem1, IN const t_void *pmem2, IN t_u32 num); +/** moal_udelay */ +t_void moal_udelay(IN t_void *pmoal_handle, IN t_u32 udelay); +mlan_status moal_get_system_time(IN t_void *pmoal_handle, OUT t_u32 *psec, + OUT t_u32 *pusec); +mlan_status moal_init_lock(IN t_void *pmoal_handle, OUT t_void **pplock); +mlan_status moal_free_lock(IN t_void *pmoal_handle, IN t_void *plock); +mlan_status moal_spin_lock(IN t_void *pmoal_handle, IN t_void *plock); +mlan_status moal_spin_unlock(IN t_void *pmoal_handle, IN t_void *plock); +t_void moal_print(IN t_void *pmoal_handle, IN t_u32 level, IN char *pformat, + IN ...); +t_void moal_print_netintf(IN t_void *pmoal_handle, IN t_u32 bss_index, + IN t_u32 level); +t_void moal_assert(IN t_void *pmoal_handle, IN t_u32 cond); +t_void moal_tcp_ack_tx_ind(IN t_void *pmoal_handle, IN pmlan_buffer pmbuf); +t_void moal_hist_data_add(IN t_void *pmoal_handle, IN t_u32 bss_index, + IN t_u8 rx_rate, IN t_s8 snr, IN t_s8 nflr, + IN t_u8 antenna); + +t_void moal_updata_peer_signal(IN t_void *pmoal_handle, IN t_u32 bss_index, + IN t_u8 *peer_addr, IN t_s8 snr, IN t_s8 nflr); + +mlan_status moal_init_timer(IN t_void *pmoal_handle, + OUT t_void **pptimer, + IN t_void (*callback) (t_void *pcontext), + IN t_void *pcontext); +mlan_status moal_free_timer(IN t_void *pmoal_handle, IN t_void *ptimer); +mlan_status moal_start_timer(IN t_void *pmoal_handle, + IN t_void *ptimer, + IN t_u8 periodic, IN t_u32 msec); +mlan_status moal_stop_timer(IN t_void *pmoal_handle, IN t_void *ptimer); + +#endif /*_MOAL_H */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_sta_cfg80211.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_sta_cfg80211.c new file mode 100644 index 00000000..b048e297 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_sta_cfg80211.c @@ -0,0 +1,6215 @@ +/** @file moal_sta_cfg80211.c + * + * @brief This file contains the functions for STA CFG80211. + * + * Copyright (C) 2011-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#include "moal_cfg80211.h" +#include "moal_sta_cfg80211.h" +#include "moal_eth_ioctl.h" +#ifdef UAP_SUPPORT +#include "moal_uap.h" +#endif + +extern int cfg80211_wext; + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) +static void +#else +static int +#endif + +woal_cfg80211_reg_notifier(struct wiphy *wiphy, + struct regulatory_request *request); + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) +static int woal_cfg80211_scan(struct wiphy *wiphy, + struct cfg80211_scan_request *request); +#else +static int woal_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev, + struct cfg80211_scan_request *request); +#endif + +static int woal_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, + struct cfg80211_connect_params *sme); + +static int woal_cfg80211_disconnect(struct wiphy *wiphy, + struct net_device *dev, t_u16 reason_code); + +static int woal_cfg80211_get_station(struct wiphy *wiphy, + struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const t_u8 *mac, +#else + t_u8 *mac, +#endif + struct station_info *sinfo); + +static int woal_cfg80211_dump_station(struct wiphy *wiphy, + struct net_device *dev, int idx, + t_u8 *mac, struct station_info *sinfo); + +static int woal_cfg80211_dump_survey(struct wiphy *wiphy, + struct net_device *dev, int idx, + struct survey_info *survey); + +static int woal_cfg80211_set_power_mgmt(struct wiphy *wiphy, + struct net_device *dev, bool enabled, + int timeout); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35) || defined(COMPAT_WIRELESS) +static int woal_cfg80211_set_cqm_rssi_config(struct wiphy *wiphy, + struct net_device *dev, + s32 rssi_thold, u32 rssi_hyst); +#endif + +static int woal_cfg80211_set_tx_power(struct wiphy *wiphy, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) + struct wireless_dev *wdev, +#endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) && !defined(COMPAT_WIRELESS) + enum tx_power_setting type, +#else + enum nl80211_tx_power_setting type, +#endif + int dbm); + +static int woal_cfg80211_join_ibss(struct wiphy *wiphy, + struct net_device *dev, + struct cfg80211_ibss_params *params); + +static int woal_cfg80211_leave_ibss(struct wiphy *wiphy, + struct net_device *dev); + +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION +static int woal_cfg80211_mgmt_tx_cancel_wait(struct wiphy *wiphy, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) + struct wireless_dev *wdev, +#else + struct net_device *dev, +#endif + u64 cookie); + +static int woal_cfg80211_remain_on_channel(struct wiphy *wiphy, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) + struct wireless_dev *wdev, +#else + struct net_device *dev, +#endif + struct ieee80211_channel *chan, +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + enum nl80211_channel_type + channel_type, +#endif + unsigned int duration, u64 * cookie); + +static int woal_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) + struct wireless_dev *wdev, +#else + struct net_device *dev, +#endif + u64 cookie); +#endif /* KERNEL_VERSION */ +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) +int woal_cfg80211_sched_scan_start(struct wiphy *wiphy, + struct net_device *dev, + struct cfg80211_sched_scan_request *request); +int woal_cfg80211_sched_scan_stop(struct wiphy *wiphy, struct net_device *dev); +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) +int woal_cfg80211_resume(struct wiphy *wiphy); +int woal_cfg80211_suspend(struct wiphy *wiphy, struct cfg80211_wowlan *wow); +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0) +static void woal_cfg80211_set_wakeup(struct wiphy *wiphy, bool enabled); +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)|| defined(COMPAT_WIRELESS) +void woal_check_auto_tdls(struct wiphy *wiphy, struct net_device *dev); +int woal_cfg80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *peer, +#else + u8 *peer, +#endif + enum nl80211_tdls_operation oper); +int woal_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *peer, +#else + u8 *peer, +#endif + u8 action_code, u8 dialog_token, u16 status_code, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) + u32 peer_capability, +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0) + bool initiator, +#endif + const u8 *extra_ies, size_t extra_ies_len); +static int + woal_cfg80211_add_station(struct wiphy *wiphy, struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *mac, +#else + u8 *mac, +#endif + struct station_parameters *params); +static int + woal_cfg80211_change_station(struct wiphy *wiphy, struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *mac, +#else + u8 *mac, +#endif + struct station_parameters *params); +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) +int woal_cfg80211_update_ft_ies(struct wiphy *wiphy, struct net_device *dev, + struct cfg80211_update_ft_ies_params *ftie); +#endif +/** cfg80211 operations */ +static struct cfg80211_ops woal_cfg80211_ops = { + .change_virtual_intf = woal_cfg80211_change_virtual_intf, + .scan = woal_cfg80211_scan, + .connect = woal_cfg80211_connect, + .disconnect = woal_cfg80211_disconnect, + .get_station = woal_cfg80211_get_station, + .dump_station = woal_cfg80211_dump_station, + .dump_survey = woal_cfg80211_dump_survey, + .set_wiphy_params = woal_cfg80211_set_wiphy_params, +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 5, 0) + .set_channel = woal_cfg80211_set_channel, +#endif + .join_ibss = woal_cfg80211_join_ibss, + .leave_ibss = woal_cfg80211_leave_ibss, + .add_key = woal_cfg80211_add_key, + .del_key = woal_cfg80211_del_key, + .set_default_key = woal_cfg80211_set_default_key, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30) || defined(COMPAT_WIRELESS) + .set_default_mgmt_key = woal_cfg80211_set_default_mgmt_key, +#endif + .set_power_mgmt = woal_cfg80211_set_power_mgmt, + .set_tx_power = woal_cfg80211_set_tx_power, + .set_bitrate_mask = woal_cfg80211_set_bitrate_mask, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) + .sched_scan_start = woal_cfg80211_sched_scan_start, + .sched_scan_stop = woal_cfg80211_sched_scan_stop, +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) + .suspend = woal_cfg80211_suspend, + .resume = woal_cfg80211_resume, +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0) + .set_wakeup = woal_cfg80211_set_wakeup, +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) || defined(COMPAT_WIRELESS) + .set_antenna = woal_cfg80211_set_antenna, +#endif +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35) || defined(COMPAT_WIRELESS) + .set_cqm_rssi_config = woal_cfg80211_set_cqm_rssi_config, +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) || defined(COMPAT_WIRELESS) + .tdls_oper = woal_cfg80211_tdls_oper, + .tdls_mgmt = woal_cfg80211_tdls_mgmt, + .add_station = woal_cfg80211_add_station, + .change_station = woal_cfg80211_change_station, +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) + .update_ft_ies = woal_cfg80211_update_ft_ies, +#endif +#ifdef UAP_CFG80211 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) + .set_coalesce = woal_cfg80211_set_coalesce, +#endif + .add_virtual_intf = woal_cfg80211_add_virtual_intf, + .del_virtual_intf = woal_cfg80211_del_virtual_intf, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) + .start_ap = woal_cfg80211_add_beacon, + .change_beacon = woal_cfg80211_set_beacon, + .stop_ap = woal_cfg80211_del_beacon, +#else + .add_beacon = woal_cfg80211_add_beacon, + .set_beacon = woal_cfg80211_set_beacon, + .del_beacon = woal_cfg80211_del_beacon, +#endif + .del_station = woal_cfg80211_del_station, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0) || defined(COMPAT_WIRELESS) + .set_txq_params = woal_cfg80211_set_txq_params, +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) + .set_mac_acl = woal_cfg80211_set_mac_acl, +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) + .mgmt_frame_register = woal_cfg80211_mgmt_frame_register, + .mgmt_tx = woal_cfg80211_mgmt_tx, +#endif +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + .mgmt_tx_cancel_wait = woal_cfg80211_mgmt_tx_cancel_wait, + .remain_on_channel = woal_cfg80211_remain_on_channel, + .cancel_remain_on_channel = woal_cfg80211_cancel_remain_on_channel, +#endif +#endif +#endif +}; + +/** Region code mapping */ +typedef struct _region_code_t { + /** Region */ + t_u8 region[COUNTRY_CODE_LEN]; +} region_code_t; + +/******************************************************** + Local Variables +********************************************************/ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) +static const struct ieee80211_txrx_stypes + ieee80211_mgmt_stypes[NUM_NL80211_IFTYPES] = { + [NL80211_IFTYPE_ADHOC] = { + .tx = 0x0000, + .rx = 0x0000, + }, + [NL80211_IFTYPE_STATION] = { + .tx = BIT(IEEE80211_STYPE_ACTION >> 4) | + BIT(IEEE80211_STYPE_PROBE_RESP >> 4), + .rx = BIT(IEEE80211_STYPE_ACTION >> 4) | + BIT(IEEE80211_STYPE_PROBE_REQ >> 4), + }, + [NL80211_IFTYPE_AP] = { + .tx = 0xffff, + .rx = BIT(IEEE80211_STYPE_ASSOC_REQ >> 4) | + BIT(IEEE80211_STYPE_REASSOC_REQ >> 4) | + BIT(IEEE80211_STYPE_PROBE_REQ >> 4) | + BIT(IEEE80211_STYPE_DISASSOC >> 4) | + BIT(IEEE80211_STYPE_AUTH >> 4) | + BIT(IEEE80211_STYPE_DEAUTH >> 4) | + BIT(IEEE80211_STYPE_ACTION >> 4), + }, + [NL80211_IFTYPE_AP_VLAN] = { + .tx = 0x0000, + .rx = 0x0000, + }, +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + [NL80211_IFTYPE_P2P_CLIENT] = { + .tx = BIT(IEEE80211_STYPE_ACTION >> 4) | + BIT(IEEE80211_STYPE_PROBE_RESP >> 4), + .rx = BIT(IEEE80211_STYPE_ACTION >> 4) | + BIT(IEEE80211_STYPE_PROBE_REQ >> 4), + }, + [NL80211_IFTYPE_P2P_GO] = { + .tx = BIT(IEEE80211_STYPE_ACTION >> 4) | + BIT(IEEE80211_STYPE_PROBE_RESP >> 4), + .rx = BIT(IEEE80211_STYPE_ASSOC_REQ >> 4) | + BIT(IEEE80211_STYPE_REASSOC_REQ >> 4) | + BIT(IEEE80211_STYPE_PROBE_REQ >> 4) | + BIT(IEEE80211_STYPE_DISASSOC >> 4) | + BIT(IEEE80211_STYPE_AUTH >> 4) | + BIT(IEEE80211_STYPE_DEAUTH >> 4) | + BIT(IEEE80211_STYPE_ACTION >> 4), + }, +#endif +#endif + [NL80211_IFTYPE_MESH_POINT] = { + .tx = 0x0000, + .rx = 0x0000, + }, + +}; +#endif + +#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0) +/** + * NOTE: types in all the sets must be equals to the + * initial value of wiphy->interface_modes + */ +static const struct ieee80211_iface_limit cfg80211_ap_sta_limits[] = { + { + .max = 4, + .types = MBIT(NL80211_IFTYPE_STATION) | +#ifdef UAP_CFG80211 + MBIT(NL80211_IFTYPE_AP) | +#endif +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + MBIT(NL80211_IFTYPE_P2P_GO) | MBIT(NL80211_IFTYPE_P2P_CLIENT) | +#endif +#endif + MBIT(NL80211_IFTYPE_ADHOC) + } +}; + +static struct ieee80211_iface_combination cfg80211_iface_comb_ap_sta = { + .limits = cfg80211_ap_sta_limits, + .num_different_channels = 1, + .n_limits = ARRAY_SIZE(cfg80211_ap_sta_limits), + .max_interfaces = 4, + .beacon_int_infra_match = MTRUE, +}; +#endif + +extern moal_handle *m_handle[]; +extern int hw_test; +extern int ps_mode; +/** Region alpha2 string */ +char *reg_alpha2; + +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION +extern int p2p_enh; +#endif +#endif + +int cfg80211_drcs = 1; + +#ifdef CONFIG_PM +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) +static const struct wiphy_wowlan_support wowlan_support = { + .flags = WIPHY_WOWLAN_ANY | WIPHY_WOWLAN_MAGIC_PKT, + .n_patterns = MAX_NUM_FILTERS, + .pattern_min_len = 1, + .pattern_max_len = WOWLAN_MAX_PATTERN_LEN, + .max_pkt_offset = WOWLAN_MAX_OFFSET_LEN, +}; +#endif +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) +static const struct wiphy_coalesce_support coalesce_support = { + .n_rules = COALESCE_MAX_RULES, + .max_delay = MAX_COALESCING_DELAY, + .n_patterns = COALESCE_MAX_FILTERS, + .pattern_min_len = 1, + .pattern_max_len = MAX_PATTERN_LEN, + .max_pkt_offset = MAX_OFFSET_LEN, +}; +#endif + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ + +/** + * @brief This function check cfg80211 special region code. + * + * @param region_string Region string + * + * @return MTRUE/MFALSE + */ +t_u8 +is_cfg80211_special_region_code(char *region_string) +{ + t_u8 i; + region_code_t cfg80211_special_region_code[] = { + {"00 "}, {"99 "}, {"98 "}, {"97 "} + }; + + for (i = 0; i < COUNTRY_CODE_LEN && region_string[i]; i++) + region_string[i] = toupper(region_string[i]); + + for (i = 0; i < ARRAY_SIZE(cfg80211_special_region_code); i++) { + if (!memcmp(region_string, + cfg80211_special_region_code[i].region, + COUNTRY_CODE_LEN)) { + PRINTM(MIOCTL, "special region code=%s\n", + region_string); + return MTRUE; + } + } + return MFALSE; +} + +/** + * @brief Get the encryption mode from cipher + * + * @param cipher Cipher cuite + * @param wpa_enabled WPA enable or disable + * + * @return MLAN_ENCRYPTION_MODE_* + */ +static int +woal_cfg80211_get_encryption_mode(t_u32 cipher, int *wpa_enabled) +{ + int encrypt_mode; + + ENTER(); + + *wpa_enabled = 0; + switch (cipher) { + case MW_AUTH_CIPHER_NONE: + encrypt_mode = MLAN_ENCRYPTION_MODE_NONE; + break; + case WLAN_CIPHER_SUITE_WEP40: + encrypt_mode = MLAN_ENCRYPTION_MODE_WEP40; + break; + case WLAN_CIPHER_SUITE_WEP104: + encrypt_mode = MLAN_ENCRYPTION_MODE_WEP104; + break; + case WLAN_CIPHER_SUITE_TKIP: + encrypt_mode = MLAN_ENCRYPTION_MODE_TKIP; + *wpa_enabled = 1; + break; + case WLAN_CIPHER_SUITE_CCMP: + encrypt_mode = MLAN_ENCRYPTION_MODE_CCMP; + *wpa_enabled = 1; + break; + default: + encrypt_mode = -1; + } + + LEAVE(); + return encrypt_mode; +} + +/** + * @brief get associate failure status code + * + * @param priv Pointer to the moal_private driver data struct + * + * @return IEEE status code + */ +static int +woal_get_assoc_status(moal_private *priv) +{ + int ret = WLAN_STATUS_UNSPECIFIED_FAILURE; + t_u16 status = (t_u16)(priv->assoc_status & 0xffff); + t_u16 cap = (t_u16)(priv->assoc_status >> 16); + + switch (cap) { + case 0xfffd: + case 0xfffe: + ret = status; + break; + case 0xfffc: + ret = WLAN_STATUS_AUTH_TIMEOUT; + break; + default: + break; + } + PRINTM(MCMND, "Assoc fail: status=%d, cap=0x%x, IEEE status=%d\n", + status, cap, ret); + return ret; +} + +/** + * @brief Check the pairwise or group cipher for + * WEP enabled or not + * + * @param cipher MLAN Cipher cuite + * + * @return 1 -- enable or 0 -- disable + */ +static int +woal_cfg80211_is_alg_wep(t_u32 cipher) +{ + int alg = 0; + ENTER(); + + if (cipher == MLAN_ENCRYPTION_MODE_WEP40 || + cipher == MLAN_ENCRYPTION_MODE_WEP104) + alg = 1; + + LEAVE(); + return alg; +} + +/** + * @brief Convert NL802.11 channel type into driver channel type + * + * The mapping is as follows - + * NL80211_CHAN_NO_HT -> NO_SEC_CHANNEL + * NL80211_CHAN_HT20 -> NO_SEC_CHANNEL + * NL80211_CHAN_HT40PLUS -> SEC_CHANNEL_ABOVE + * NL80211_CHAN_HT40MINUS -> SEC_CHANNEL_BELOW + * Others -> NO_SEC_CHANNEL + * + * @param channel_type Channel type + * + * @return Driver channel type + */ +static int +woal_cfg80211_channel_type_to_channel(enum nl80211_channel_type channel_type) +{ + int channel; + + ENTER(); + + switch (channel_type) { + case NL80211_CHAN_NO_HT: + case NL80211_CHAN_HT20: + channel = NO_SEC_CHANNEL; + break; + case NL80211_CHAN_HT40PLUS: + channel = SEC_CHANNEL_ABOVE; + break; + case NL80211_CHAN_HT40MINUS: + channel = SEC_CHANNEL_BELOW; + break; + default: + channel = NO_SEC_CHANNEL; + } + LEAVE(); + return channel; +} + +/** + * @brief Convert secondary channel type to NL80211 channel type + * + * The mapping is as follows - + * NO_SEC_CHANNEL -> NL80211_CHAN_HT20 + * SEC_CHANNEL_ABOVE -> NL80211_CHAN_HT40PLUS + * SEC_CHANNEL_BELOW -> NL80211_CHAN_HT40MINUS + * Others -> NL80211_CHAN_HT20 + * + * @param channel_type Driver channel type + * + * @return nl80211_channel_type type + */ +static enum nl80211_channel_type +woal_channel_to_nl80211_channel_type(int channel_type) +{ + enum nl80211_channel_type channel; + + ENTER(); + + switch (channel_type) { + case NO_SEC_CHANNEL: + channel = NL80211_CHAN_HT20; + break; + case SEC_CHANNEL_ABOVE: + channel = NL80211_CHAN_HT40PLUS; + break; + case SEC_CHANNEL_BELOW: + channel = NL80211_CHAN_HT40MINUS; + break; + default: + channel = NL80211_CHAN_HT20; + } + LEAVE(); + return channel; +} + +/** + * @brief Convert NL80211 interface type to MLAN_BSS_MODE_* + * + * @param iftype Interface type of NL80211 + * + * @return Driver bss mode + */ +static t_u32 +woal_nl80211_iftype_to_mode(enum nl80211_iftype iftype) +{ + switch (iftype) { + case NL80211_IFTYPE_ADHOC: + return MLAN_BSS_MODE_IBSS; + case NL80211_IFTYPE_STATION: + return MLAN_BSS_MODE_INFRA; + case NL80211_IFTYPE_UNSPECIFIED: + default: + return MLAN_BSS_MODE_AUTO; + } +} + +/** + * @brief Control WPS Session Enable/Disable + * + * @param priv Pointer to the moal_private driver data struct + * @param enable enable/disable flag + * + * @return 0 --success, otherwise fail + */ +static int +woal_wps_cfg(moal_private *priv, int enable) +{ + int ret = 0; + mlan_ds_wps_cfg *pwps = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + PRINTM(MINFO, "WOAL_WPS_SESSION\n"); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wps_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + pwps = (mlan_ds_wps_cfg *)req->pbuf; + req->req_id = MLAN_IOCTL_WPS_CFG; + req->action = MLAN_ACT_SET; + pwps->sub_command = MLAN_OID_WPS_CFG_SESSION; + if (enable) + pwps->param.wps_session = MLAN_WPS_CFG_SESSION_START; + else + pwps->param.wps_session = MLAN_WPS_CFG_SESSION_END; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief configure ASSOC IE + * + * @param priv A pointer to moal private structure + * @param ie A pointer to ie data + * @param ie_len The length of ie data + * @param wait_option wait option + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_assoc_ies_cfg(moal_private *priv, t_u8 *ie, int ie_len, + t_u8 wait_option) +{ + int bytes_left = ie_len; + t_u8 *pcurrent_ptr = ie; + int total_ie_len; + t_u8 element_len; + int ret = MLAN_STATUS_SUCCESS; + IEEEtypes_ElementId_e element_id; + IEEEtypes_VendorSpecific_t *pvendor_ie; + t_u8 wps_oui[] = { 0x00, 0x50, 0xf2, 0x04 }; + t_u8 hs20_oui[] = { 0x50, 0x6f, 0x9a, 0x10 }; + + while (bytes_left >= 2) { + element_id = (IEEEtypes_ElementId_e)(*((t_u8 *)pcurrent_ptr)); + element_len = *((t_u8 *)pcurrent_ptr + 1); + total_ie_len = element_len + sizeof(IEEEtypes_Header_t); + if (bytes_left < total_ie_len) { + PRINTM(MERROR, + "InterpretIE: Error in processing IE, bytes left < IE length\n"); + bytes_left = 0; + continue; + } + switch (element_id) { + case RSN_IE: + if (MLAN_STATUS_SUCCESS != + woal_set_get_gen_ie(priv, MLAN_ACT_SET, + pcurrent_ptr, &total_ie_len, + wait_option)) { + PRINTM(MERROR, "Fail to set RSN IE\n"); + ret = -EFAULT; + goto done; + } + PRINTM(MIOCTL, "Set RSN IE\n"); + break; + case VENDOR_SPECIFIC_221: + pvendor_ie = (IEEEtypes_VendorSpecific_t *)pcurrent_ptr; + if (!memcmp + (pvendor_ie->vend_hdr.oui, wps_oui, + sizeof(pvendor_ie->vend_hdr.oui)) && + (pvendor_ie->vend_hdr.oui_type == wps_oui[3])) { + PRINTM(MIOCTL, "Enable WPS session\n"); + woal_wps_cfg(priv, MTRUE); + } + if (!memcmp + (pvendor_ie->vend_hdr.oui, hs20_oui, + sizeof(hs20_oui))) { + PRINTM(MIOCTL, + "Hotspot2.0 is enabled for this bss\n"); + if (MLAN_STATUS_SUCCESS != + woal_set_hotspotcfg(priv, wait_option, + (HOTSPOT_BY_SUPPLICANT | + HOTSPOT_ENABLED))) { + PRINTM(MERROR, + "Fail to enable hotspot 2.0\n"); + ret = -EFAULT; + goto done; + } + } + if (MLAN_STATUS_SUCCESS != + woal_set_get_gen_ie(priv, MLAN_ACT_SET, + pcurrent_ptr, &total_ie_len, + wait_option)) { + PRINTM(MERROR, + "Fail to Set VENDOR SPECIFIC IE\n"); + ret = -EFAULT; + goto done; + } + PRINTM(MIOCTL, + "Set VENDOR SPECIFIC IE, OUI: %02x:%02x:%02x:%02x\n", + pvendor_ie->vend_hdr.oui[0], + pvendor_ie->vend_hdr.oui[1], + pvendor_ie->vend_hdr.oui[2], + pvendor_ie->vend_hdr.oui_type); + break; + case MOBILITY_DOMAIN: + break; + case FAST_BSS_TRANSITION: + if (MLAN_STATUS_SUCCESS != + woal_set_get_gen_ie(priv, MLAN_ACT_SET, + pcurrent_ptr, &total_ie_len, + wait_option)) { + PRINTM(MERROR, + "Fail to set" + "FAST_BSS_TRANSITION IE\n"); + ret = -EFAULT; + goto done; + } + PRINTM(MIOCTL, "Set FAST_BSS_TRANSITION IE\n"); + break; + case RIC: + if (MLAN_STATUS_SUCCESS != + woal_set_get_gen_ie(priv, MLAN_ACT_SET, + pcurrent_ptr, &total_ie_len, + wait_option)) { + PRINTM(MERROR, + "Fail to set" + "RESOURCE INFORMATION CONTAINER IE\n"); + ret = -EFAULT; + goto done; + } + PRINTM(MIOCTL, + "Set RESOURCE INFORMATION CONTAINER IE\n"); + break; + default: + if (MLAN_STATUS_SUCCESS != + woal_set_get_gen_ie(priv, MLAN_ACT_SET, + pcurrent_ptr, &total_ie_len, + wait_option)) { + PRINTM(MERROR, "Fail to set GEN IE\n"); + ret = -EFAULT; + goto done; + } + PRINTM(MIOCTL, "Set GEN IE\n"); + break; + } + pcurrent_ptr += element_len + 2; + /* Need to account for IE ID and IE Len */ + bytes_left -= (element_len + 2); + } +done: + return ret; +} + +/** + * @brief Send domain info command to FW + * + * @param priv A pointer to moal_private structure + * @param wait_option wait option + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +woal_send_domain_info_cmd_fw(moal_private *priv, t_u8 wait_option) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + enum ieee80211_band band; + struct ieee80211_supported_band *sband = NULL; + struct ieee80211_channel *channel = NULL; + t_u8 no_of_sub_band = 0; + t_u8 no_of_parsed_chan = 0; + t_u8 first_chan = 0, next_chan = 0, max_pwr = 0; + t_u8 i, flag = 0; + mlan_ds_11d_cfg *cfg_11d = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (!priv->wdev || !priv->wdev->wiphy) { + PRINTM(MERROR, "No wdev or wiphy in priv\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + band = priv->phandle->band; + if (!priv->wdev->wiphy->bands[band]) { + PRINTM(MERROR, "11D: setting domain info in FW failed band=%d", + band); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + if (MTRUE == + is_cfg80211_special_region_code(priv->phandle->country_code)) { + PRINTM(MIOCTL, + "skip region code config, cfg80211 special region code: %s\n", + priv->phandle->country_code); + goto done; + } + PRINTM(MIOCTL, "Send domain info: country=%c%c band=%d\n", + priv->phandle->country_code[0], priv->phandle->country_code[1], + band); + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11d_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + cfg_11d = (mlan_ds_11d_cfg *)req->pbuf; + cfg_11d->sub_command = MLAN_OID_11D_DOMAIN_INFO; + req->req_id = MLAN_IOCTL_11D_CFG; + req->action = MLAN_ACT_SET; + + /* Set country code */ + cfg_11d->param.domain_info.country_code[0] = + priv->phandle->country_code[0]; + cfg_11d->param.domain_info.country_code[1] = + priv->phandle->country_code[1]; + cfg_11d->param.domain_info.country_code[2] = ' '; + cfg_11d->param.domain_info.band = band; + + sband = priv->wdev->wiphy->bands[band]; + for (i = 0; (i < sband->n_channels) && + (no_of_sub_band < MRVDRV_MAX_SUBBAND_802_11D); i++) { + channel = &sband->channels[i]; + if (channel->flags & IEEE80211_CHAN_DISABLED) + continue; + + if (!flag) { + flag = 1; + next_chan = first_chan = (t_u32)channel->hw_value; + max_pwr = channel->max_power; + no_of_parsed_chan = 1; + continue; + } + + if (channel->hw_value == next_chan + 1 && + channel->max_power == max_pwr) { + next_chan++; + no_of_parsed_chan++; + } else { + cfg_11d->param.domain_info.sub_band[no_of_sub_band] + .first_chan = first_chan; + cfg_11d->param.domain_info.sub_band[no_of_sub_band] + .no_of_chan = no_of_parsed_chan; + cfg_11d->param.domain_info.sub_band[no_of_sub_band] + .max_tx_pwr = max_pwr; + no_of_sub_band++; + next_chan = first_chan = (t_u32)channel->hw_value; + max_pwr = channel->max_power; + no_of_parsed_chan = 1; + } + } + + if (flag) { + cfg_11d->param.domain_info.sub_band[no_of_sub_band] + .first_chan = first_chan; + cfg_11d->param.domain_info.sub_band[no_of_sub_band] + .no_of_chan = no_of_parsed_chan; + cfg_11d->param.domain_info.sub_band[no_of_sub_band] + .max_tx_pwr = max_pwr; + no_of_sub_band++; + } + cfg_11d->param.domain_info.no_of_sub_band = no_of_sub_band; + + /* Send domain info command to FW */ + status = woal_request_ioctl(priv, req, wait_option); + if (status != MLAN_STATUS_SUCCESS) { + ret = MLAN_STATUS_FAILURE; + PRINTM(MERROR, "11D: Error setting domain info in FW\n"); + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Request the driver to change the channel and + * change domain info according to that channel + * + * @param priv A pointer to moal_private structure + * @param chan A pointer to ieee80211_channel structure + * @param channel_type Channel type of nl80211_channel_type + * @param wait_option wait option + * + * @return 0 -- success, otherwise fail + */ +int +woal_set_rf_channel(moal_private *priv, + struct ieee80211_channel *chan, + enum nl80211_channel_type channel_type, t_u8 wait_option) +{ + int ret = 0; + t_u32 mode, config_bands = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_radio_cfg *radio_cfg = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (!chan) { + LEAVE(); + return -EINVAL; + } + mode = woal_nl80211_iftype_to_mode(priv->wdev->iftype); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_radio_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + radio_cfg = (mlan_ds_radio_cfg *)req->pbuf; + radio_cfg->sub_command = MLAN_OID_BAND_CFG; + req->req_id = MLAN_IOCTL_RADIO_CFG; + /* Get config_bands, adhoc_start_band and adhoc_channel values from + MLAN */ + req->action = MLAN_ACT_GET; + status = woal_request_ioctl(priv, req, wait_option); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + req->action = MLAN_ACT_SET; + priv->phandle->band = chan->band; + /* Set appropriate bands */ + if (chan->band == IEEE80211_BAND_2GHZ) + config_bands = BAND_B | BAND_G | BAND_GN; + else + config_bands = BAND_AN | BAND_A; + if (mode == MLAN_BSS_MODE_IBSS) { + radio_cfg->param.band_cfg.adhoc_start_band = config_bands; + radio_cfg->param.band_cfg.adhoc_channel = + ieee80211_frequency_to_channel(chan->center_freq); + } + /* Set channel offset */ + radio_cfg->param.band_cfg.adhoc_chan_bandwidth = + woal_cfg80211_channel_type_to_channel(channel_type); + + status = woal_request_ioctl(priv, req, wait_option); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + woal_send_domain_info_cmd_fw(priv, wait_option); + + PRINTM(MINFO, + "Setting band %d, channel bandwidth %d and mode = %d channel=%d\n", + config_bands, radio_cfg->param.band_cfg.adhoc_chan_bandwidth, + mode, ieee80211_frequency_to_channel(chan->center_freq)); + + if (MLAN_STATUS_SUCCESS != + woal_change_adhoc_chan(priv, + ieee80211_frequency_to_channel(chan-> + center_freq), + wait_option)) { + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set ewpa mode + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param ssid_bssid A pointer to mlan_ssid_bssid structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_set_ewpa_mode(moal_private *priv, t_u8 wait_option, + mlan_ssid_bssid *ssid_bssid) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (!priv->phandle->card_info->embedded_supp) { + ret = -EOPNOTSUPP; + goto error; + } + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto error; + } + /* Fill request buffer */ + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_PASSPHRASE; + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + + /* Try Get All */ + memset(&sec->param.passphrase, 0, sizeof(mlan_ds_passphrase)); + memcpy(&sec->param.passphrase.ssid, &ssid_bssid->ssid, + sizeof(sec->param.passphrase.ssid)); + memcpy(&sec->param.passphrase.bssid, &ssid_bssid->bssid, + MLAN_MAC_ADDR_LENGTH); + sec->param.passphrase.psk_type = MLAN_PSK_QUERY; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); + if (status != MLAN_STATUS_SUCCESS) + goto error; + sec->param.ewpa_enabled = MFALSE; + if (sec->param.passphrase.psk_type == MLAN_PSK_PASSPHRASE) { + if (sec->param.passphrase.psk.passphrase.passphrase_len > 0) + sec->param.ewpa_enabled = MTRUE; + } else if (sec->param.passphrase.psk_type == MLAN_PSK_PMK) + sec->param.ewpa_enabled = MTRUE; + + sec->sub_command = MLAN_OID_SEC_CFG_EWPA_ENABLED; + req->action = MLAN_ACT_SET; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, wait_option); + +error: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Set encryption mode and enable WPA + * + * @param priv A pointer to moal_private structure + * @param encrypt_mode Encryption mode + * @param wpa_enabled WPA enable or not + * @param wait_option wait option + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_set_auth(moal_private *priv, int encrypt_mode, + int wpa_enabled, t_u8 wait_option) +{ + int ret = 0; + + ENTER(); + + if (MLAN_STATUS_SUCCESS != + woal_set_encrypt_mode(priv, wait_option, encrypt_mode)) + ret = -EFAULT; + + if (wpa_enabled) { + if (MLAN_STATUS_SUCCESS != + woal_set_wpa_enable(priv, wait_option, 1)) + ret = -EFAULT; + } + + LEAVE(); + return ret; +} + +/** + * @brief Informs the CFG802.11 subsystem of a new BSS connection. + * + * The following information are sent to the CFG802.11 subsystem + * to register the new BSS connection. If we do not register the new BSS, + * a kernel panic will result. + * - MAC address + * - Capabilities + * - Beacon period + * - RSSI value + * - Channel + * - Supported rates IE + * - Extended capabilities IE + * - DS parameter set IE + * - HT Capability IE + * - Vendor Specific IE (221) + * - WPA IE + * - RSN IE + * + * @param priv A pointer to moal_private structure + * @param ssid_bssid A pointer to A pointer to mlan_ssid_bssid structure + * @param wait_option wait_option + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_inform_bss_from_scan_result(moal_private *priv, + mlan_ssid_bssid *ssid_bssid, t_u8 wait_option) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + struct ieee80211_channel *chan; + mlan_scan_resp scan_resp; + BSSDescriptor_t *scan_table; + t_u64 ts = 0; + u16 cap_info = 0; + int i = 0; + struct cfg80211_bss *pub = NULL; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) + struct timespec tstamp; +#endif + ENTER(); + if (!priv->wdev || !priv->wdev->wiphy) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + memset(&scan_resp, 0, sizeof(scan_resp)); + if (MLAN_STATUS_SUCCESS != woal_get_scan_table(priv, + wait_option, + &scan_resp)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + if (scan_resp.num_in_scan_table) { + scan_table = (BSSDescriptor_t *)scan_resp.pscan_table; + for (i = 0; i < scan_resp.num_in_scan_table; i++) { + if (ssid_bssid) { + /* Inform specific BSS only */ + if (memcmp + (ssid_bssid->ssid.ssid, + scan_table[i].ssid.ssid, + ssid_bssid->ssid.ssid_len) || + memcmp(ssid_bssid->bssid, + scan_table[i].mac_address, ETH_ALEN)) + continue; + } + if (!scan_table[i].freq) { + scan_table[i].freq = + ieee80211_channel_to_frequency((int) + scan_table + [i]. + channel +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) || defined(COMPAT_WIRELESS) + , + woal_band_cfg_to_ieee_band + (scan_table + [i]. + bss_band) +#endif + ); + } + chan = ieee80211_get_channel(priv->wdev->wiphy, + scan_table[i].freq); + if (!chan) { + PRINTM(MCMND, + "Fail to get chan with freq: channel=%d freq=%d\n", + (int)scan_table[i].channel, + (int)scan_table[i].freq); + continue; + } +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT && + !ssid_bssid) { + if (!strncmp + (scan_table[i].ssid.ssid, "DIRECT-", + strlen("DIRECT-"))) { + PRINTM(MCMND, + "wlan: P2P device " MACSTR + " found, channel=%d\n", + MAC2STR(scan_table[i]. + mac_address), + (int)chan->hw_value); + } + } +#endif +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) + /** Andorid's Location service is expecting timestamp to be + * local time (in microsecond) since boot; + * and not the TSF found in the beacon. */ + get_monotonic_boottime(&tstamp); + ts = (t_u64)tstamp.tv_sec * 1000000 + + tstamp.tv_nsec / 1000; +#else + memcpy(&ts, scan_table[i].time_stamp, sizeof(ts)); +#endif + memcpy(&cap_info, &scan_table[i].cap_info, + sizeof(cap_info)); + pub = cfg80211_inform_bss(priv->wdev->wiphy, chan, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) + CFG80211_BSS_FTYPE_UNKNOWN, +#endif + scan_table[i].mac_address, + ts, cap_info, + scan_table[i].beacon_period, + scan_table[i].pbeacon_buf + + WLAN_802_11_FIXED_IE_SIZE, + scan_table[i]. + beacon_buf_size - + WLAN_802_11_FIXED_IE_SIZE, + -RSSI_DBM_TO_MDM(scan_table + [i].rssi), + GFP_KERNEL); + if (pub) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + pub->len_information_elements = + pub->len_beacon_ies; +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) + cfg80211_put_bss(priv->wdev->wiphy, pub); +#else + cfg80211_put_bss(pub); +#endif + } + } + } +done: + LEAVE(); + return ret; +} + +/** + * @brief Informs the CFG802.11 subsystem of a new IBSS connection. + * + * The following information are sent to the CFG802.11 subsystem + * to register the new IBSS connection. If we do not register the + * new IBSS, a kernel panic will result. + * - MAC address + * - Capabilities + * - Beacon period + * - RSSI value + * - Channel + * - Supported rates IE + * - Extended capabilities IE + * - DS parameter set IE + * - HT Capability IE + * - Vendor Specific IE (221) + * - WPA IE + * - RSN IE + * + * @param priv A pointer to moal_private structure + * @param cahn A pointer to ieee80211_channel structure + * @param beacon_interval Beacon interval + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +static mlan_status +woal_cfg80211_inform_ibss_bss(moal_private *priv, + struct ieee80211_channel *chan, + t_u16 beacon_interval) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_bss_info bss_info; + mlan_ds_get_signal signal; + t_u8 ie_buf[MLAN_MAX_SSID_LENGTH + sizeof(IEEEtypes_Header_t)]; + int ie_len = 0; + struct cfg80211_bss *bss = NULL; + + ENTER(); + + ret = woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + if (ret) + goto done; + + memset(ie_buf, 0, sizeof(ie_buf)); + ie_buf[0] = WLAN_EID_SSID; + ie_buf[1] = bss_info.ssid.ssid_len; + + memcpy(&ie_buf[sizeof(IEEEtypes_Header_t)], + &bss_info.ssid.ssid, bss_info.ssid.ssid_len); + ie_len = ie_buf[1] + sizeof(IEEEtypes_Header_t); + + /* Get signal information from the firmware */ + memset(&signal, 0, sizeof(mlan_ds_get_signal)); + if (MLAN_STATUS_SUCCESS != + woal_get_signal_info(priv, MOAL_IOCTL_WAIT, &signal)) { + PRINTM(MERROR, "Error getting signal information\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + bss = cfg80211_inform_bss(priv->wdev->wiphy, chan, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) + CFG80211_BSS_FTYPE_UNKNOWN, +#endif + bss_info.bssid, 0, WLAN_CAPABILITY_IBSS, + beacon_interval, ie_buf, ie_len, + signal.bcn_rssi_avg, GFP_KERNEL); + if (bss) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) + cfg80211_put_bss(priv->wdev->wiphy, bss); +#else + cfg80211_put_bss(bss); +#endif +done: + LEAVE(); + return ret; +} + +/** + * @brief Process country IE before assoicate + * + * @param priv A pointer to moal_private structure + * @param bss A pointer to cfg80211_bss structure + * + * @return 0 -- success, otherwise fail + */ +static int +woal_process_country_ie(moal_private *priv, struct cfg80211_bss *bss) +{ + u8 *country_ie, country_ie_len; + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_11d_cfg *cfg_11d = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + country_ie = (u8 *)ieee80211_bss_get_ie(bss, WLAN_EID_COUNTRY); + if (!country_ie) { + PRINTM(MIOCTL, "No country IE found!\n"); + woal_send_domain_info_cmd_fw(priv, MOAL_IOCTL_WAIT); + LEAVE(); + return 0; + } + + country_ie_len = country_ie[1]; + if (country_ie_len < IEEE80211_COUNTRY_IE_MIN_LEN) { + PRINTM(MIOCTL, "Wrong Country IE length!\n"); + woal_send_domain_info_cmd_fw(priv, MOAL_IOCTL_WAIT); + LEAVE(); + return 0; + } + PRINTM(MIOCTL, "Find bss country IE: %c%c band=%d\n", country_ie[2], + country_ie[3], priv->phandle->band); + priv->phandle->country_code[0] = country_ie[2]; + priv->phandle->country_code[1] = country_ie[3]; + priv->phandle->country_code[2] = ' '; + if (MLAN_STATUS_SUCCESS != + woal_set_region_code(priv, priv->phandle->country_code)) + PRINTM(MERROR, "Set country code failed!\n"); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11d_cfg)); + if (req == NULL) { + PRINTM(MERROR, "Fail to allocate mlan_ds_11d_cfg buffer\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + cfg_11d = (mlan_ds_11d_cfg *)req->pbuf; + cfg_11d->sub_command = MLAN_OID_11D_DOMAIN_INFO; + req->req_id = MLAN_IOCTL_11D_CFG; + req->action = MLAN_ACT_SET; + + /* Set country code */ + cfg_11d->param.domain_info.country_code[0] = + priv->phandle->country_code[0]; + cfg_11d->param.domain_info.country_code[1] = + priv->phandle->country_code[1]; + cfg_11d->param.domain_info.country_code[2] = ' '; + + /** IEEE80211_BAND_2GHZ or IEEE80211_BAND_5GHZ */ + cfg_11d->param.domain_info.band = priv->phandle->band; + + country_ie_len -= COUNTRY_CODE_LEN; + cfg_11d->param.domain_info.no_of_sub_band = + country_ie_len / sizeof(struct ieee80211_country_ie_triplet); + memcpy((u8 *)cfg_11d->param.domain_info.sub_band, + &country_ie[2] + COUNTRY_CODE_LEN, country_ie_len); + + /* Send domain info command to FW */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = MLAN_STATUS_FAILURE; + PRINTM(MERROR, "11D: Error setting domain info in FW\n"); + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Request scan based on connect parameter + * + * @param priv A pointer to moal_private structure + * @param conn_param A pointer to connect parameters + * @param wait_option wait option + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_connect_scan(moal_private *priv, + struct cfg80211_connect_params *conn_param, + t_u8 wait_option) +{ + moal_handle *handle = priv->phandle; + int ret = 0; + wlan_user_scan_cfg scan_req; + enum ieee80211_band band; + struct ieee80211_supported_band *sband; + struct ieee80211_channel *ch; + int chan_idx = 0, i; + ENTER(); + if (handle->scan_pending_on_block == MTRUE) { + PRINTM(MINFO, "scan already in processing...\n"); + LEAVE(); + return ret; + } +#ifdef REASSOCIATION + if (MOAL_ACQ_SEMAPHORE_BLOCK(&handle->reassoc_sem)) { + PRINTM(MERROR, "Acquire semaphore error, woal_do_combo_scan\n"); + LEAVE(); + return -EBUSY; + } +#endif /* REASSOCIATION */ + priv->report_scan_result = MTRUE; + memset(&scan_req, 0x00, sizeof(scan_req)); + memcpy(scan_req.ssid_list[0].ssid, conn_param->ssid, + conn_param->ssid_len); + scan_req.ssid_list[0].max_len = 0; + if (conn_param->channel) { + scan_req.chan_list[0].chan_number = + conn_param->channel->hw_value; + scan_req.chan_list[0].radio_type = conn_param->channel->band; + if (conn_param->channel-> + flags & (IEEE80211_CHAN_PASSIVE_SCAN | + IEEE80211_CHAN_RADAR)) + scan_req.chan_list[0].scan_type = + MLAN_SCAN_TYPE_PASSIVE; + else + scan_req.chan_list[0].scan_type = MLAN_SCAN_TYPE_ACTIVE; + scan_req.chan_list[0].scan_time = 0; + } else { + for (band = 0; (band < IEEE80211_NUM_BANDS); band++) { + if (!priv->wdev->wiphy->bands[band]) + continue; + sband = priv->wdev->wiphy->bands[band]; + for (i = 0; (i < sband->n_channels); i++) { + ch = &sband->channels[i]; + if (ch->flags & IEEE80211_CHAN_DISABLED) + continue; + scan_req.chan_list[chan_idx].radio_type = band; + if (ch-> + flags & (IEEE80211_CHAN_PASSIVE_SCAN | + IEEE80211_CHAN_RADAR)) + scan_req.chan_list[chan_idx].scan_type = + MLAN_SCAN_TYPE_PASSIVE; + else + scan_req.chan_list[chan_idx].scan_type = + MLAN_SCAN_TYPE_ACTIVE; + scan_req.chan_list[chan_idx].chan_number = + (u32)ch->hw_value; + chan_idx++; + } + } + } + ret = woal_request_userscan(priv, wait_option, &scan_req); +#ifdef REASSOCIATION + MOAL_REL_SEMAPHORE(&handle->reassoc_sem); +#endif + LEAVE(); + return ret; + +} + +/** + * @brief Request the driver for (re)association + * + * @param priv A pointer to moal_private structure + * @param sme A pointer to connect parameters + * @param wait_option wait option + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_assoc(moal_private *priv, void *sme, t_u8 wait_option) +{ + struct cfg80211_ibss_params *ibss_param = NULL; + struct cfg80211_connect_params *conn_param = NULL; + mlan_802_11_ssid req_ssid; + mlan_ssid_bssid ssid_bssid; + mlan_ds_radio_cfg *radio_cfg = NULL; + mlan_ioctl_req *req = NULL; + int ret = 0; + t_u32 auth_type = 0, mode; + int wpa_enabled = 0; + int group_enc_mode = 0, pairwise_enc_mode = 0; + int alg_is_wep = 0; + + t_u8 *ssid, ssid_len = 0, *bssid; + t_u8 *ie = NULL; + int ie_len = 0; + struct ieee80211_channel *channel = NULL; + t_u16 beacon_interval = 0; + bool privacy; + struct cfg80211_bss *bss = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + t_u8 wait_timeout = 0; + + ENTER(); + + mode = woal_nl80211_iftype_to_mode(priv->wdev->iftype); + + if (mode == MLAN_BSS_MODE_IBSS) { + ibss_param = (struct cfg80211_ibss_params *)sme; + ssid = (t_u8 *)ibss_param->ssid; + ssid_len = ibss_param->ssid_len; + bssid = (t_u8 *)ibss_param->bssid; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + channel = ibss_param->channel; +#else + channel = ibss_param->chandef.chan; +#endif + if (channel) + priv->phandle->band = channel->band; + if (ibss_param->ie_len) + ie = (t_u8 *)ibss_param->ie; + ie_len = ibss_param->ie_len; + beacon_interval = ibss_param->beacon_interval; + privacy = ibss_param->privacy; + + } else { + conn_param = (struct cfg80211_connect_params *)sme; + ssid = (t_u8 *)conn_param->ssid; + ssid_len = conn_param->ssid_len; + bssid = (t_u8 *)conn_param->bssid; + channel = conn_param->channel; + if (channel) + priv->phandle->band = channel->band; + if (conn_param->ie_len) + ie = (t_u8 *)conn_param->ie; + ie_len = conn_param->ie_len; + privacy = conn_param->privacy; + bss = cfg80211_get_bss(priv->wdev->wiphy, channel, bssid, ssid, + ssid_len, WLAN_CAPABILITY_ESS, + WLAN_CAPABILITY_ESS); + if (bss) { + woal_process_country_ie(priv, bss); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) + cfg80211_put_bss(priv->wdev->wiphy, bss); +#else + cfg80211_put_bss(bss); +#endif + } else + woal_send_domain_info_cmd_fw(priv, wait_option); +#ifdef STA_WEXT + if (IS_STA_WEXT(cfg80211_wext)) { + switch (conn_param->crypto.wpa_versions) { + case NL80211_WPA_VERSION_2: + priv->wpa_version = IW_AUTH_WPA_VERSION_WPA2; + break; + case NL80211_WPA_VERSION_1: + priv->wpa_version = IW_AUTH_WPA_VERSION_WPA; + break; + default: + priv->wpa_version = 0; + break; + } + if (conn_param->crypto.n_akm_suites) { + switch (conn_param->crypto.akm_suites[0]) { + case WLAN_AKM_SUITE_PSK: + priv->key_mgmt = IW_AUTH_KEY_MGMT_PSK; + break; + case WLAN_AKM_SUITE_8021X: + priv->key_mgmt = + IW_AUTH_KEY_MGMT_802_1X; + break; + default: + priv->key_mgmt = 0; + break; + } + } + } +#endif + } + + memset(&req_ssid, 0, sizeof(mlan_802_11_ssid)); + memset(&ssid_bssid, 0, sizeof(mlan_ssid_bssid)); + + req_ssid.ssid_len = ssid_len; + if (ssid_len > MW_ESSID_MAX_SIZE) { + PRINTM(MERROR, "Invalid SSID - aborting\n"); + ret = -EINVAL; + goto done; + } + + memcpy(req_ssid.ssid, ssid, ssid_len); + if (!req_ssid.ssid_len || req_ssid.ssid[0] < 0x20) { + PRINTM(MERROR, "Invalid SSID - aborting\n"); + ret = -EINVAL; + goto done; + } + + if ((mode == MLAN_BSS_MODE_IBSS) && channel) { + /* Get the secondary channel offset */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_radio_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + radio_cfg = (mlan_ds_radio_cfg *)req->pbuf; + radio_cfg->sub_command = MLAN_OID_BAND_CFG; + req->req_id = MLAN_IOCTL_RADIO_CFG; + req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, req, wait_option); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (MLAN_STATUS_SUCCESS != woal_set_rf_channel(priv, + channel, + woal_channel_to_nl80211_channel_type + (radio_cfg-> + param.band_cfg. + adhoc_chan_bandwidth), + wait_option)) { + ret = -EFAULT; + goto done; + } + } + + if (priv->phandle->card_info->embedded_supp) + if (MLAN_STATUS_SUCCESS != + woal_set_ewpa_mode(priv, wait_option, &ssid_bssid)) { + ret = -EFAULT; + goto done; + } + + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_set_key(priv, 0, 0, NULL, 0, NULL, 0, + KEY_INDEX_CLEAR_ALL, NULL, 1, wait_option)) { + /* Disable keys and clear all previous security settings */ + ret = -EFAULT; + goto done; + } + if ((priv->ft_pre_connect || + (conn_param && conn_param->auth_type == NL80211_AUTHTYPE_FT)) + && priv->ft_ie_len) { + ie = priv->ft_ie; + ie_len = priv->ft_ie_len; + priv->ft_ie_len = 0; + } + if (ie && ie_len) { /* Set the IE */ + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_assoc_ies_cfg(priv, ie, ie_len, + wait_option)) { + ret = -EFAULT; + goto done; + } + } + + if (conn_param && mode != MLAN_BSS_MODE_IBSS) { + /* These parameters are only for managed mode */ + if (conn_param->auth_type == NL80211_AUTHTYPE_OPEN_SYSTEM) + auth_type = MLAN_AUTH_MODE_OPEN; + else if (conn_param->auth_type == NL80211_AUTHTYPE_SHARED_KEY) + auth_type = MLAN_AUTH_MODE_SHARED; + else if (conn_param->auth_type == NL80211_AUTHTYPE_NETWORK_EAP) + auth_type = MLAN_AUTH_MODE_NETWORKEAP; + else if (conn_param->auth_type == NL80211_AUTHTYPE_FT) + auth_type = MLAN_AUTH_MODE_FT; + else + auth_type = MLAN_AUTH_MODE_AUTO; + if (priv->ft_pre_connect) + auth_type = MLAN_AUTH_MODE_FT; + if (MLAN_STATUS_SUCCESS != + woal_set_auth_mode(priv, wait_option, auth_type)) { + ret = -EFAULT; + goto done; + } + + if (conn_param->crypto.n_ciphers_pairwise) { + pairwise_enc_mode = + woal_cfg80211_get_encryption_mode(conn_param-> + crypto.ciphers_pairwise + [0], + &wpa_enabled); + ret = woal_cfg80211_set_auth(priv, pairwise_enc_mode, + wpa_enabled, wait_option); + if (ret) + goto done; + } + + if (conn_param->crypto.cipher_group) { + group_enc_mode = + woal_cfg80211_get_encryption_mode(conn_param-> + crypto.cipher_group, + &wpa_enabled); + ret = woal_cfg80211_set_auth(priv, group_enc_mode, + wpa_enabled, wait_option); + if (ret) + goto done; + } + + if (conn_param->key) { + alg_is_wep = + woal_cfg80211_is_alg_wep(pairwise_enc_mode) | + woal_cfg80211_is_alg_wep(group_enc_mode); + if (alg_is_wep) { + PRINTM(MINFO, + "Setting wep encryption with key len %d\n", + conn_param->key_len); + /* Set the WEP key */ + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_set_wep_keys(priv, + conn_param->key, + conn_param-> + key_len, + conn_param-> + key_idx, + wait_option)) { + ret = -EFAULT; + goto done; + } + /* Enable the WEP key by key index */ + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_set_wep_keys(priv, NULL, 0, + conn_param-> + key_idx, + wait_option)) { + ret = -EFAULT; + goto done; + } + } + } + } + + if (mode == MLAN_BSS_MODE_IBSS) { + mlan_ds_bss *bss = NULL; + /* Change beacon interval */ + if ((beacon_interval < MLAN_MIN_BEACON_INTERVAL) || + (beacon_interval > MLAN_MAX_BEACON_INTERVAL)) { + ret = -EINVAL; + goto done; + } + kfree(req); + req = NULL; + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + bss = (mlan_ds_bss *)req->pbuf; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_SET; + bss->sub_command = MLAN_OID_IBSS_BCN_INTERVAL; + bss->param.bcn_interval = beacon_interval; + status = woal_request_ioctl(priv, req, wait_option); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* "privacy" is set only for ad-hoc mode */ + if (privacy) { + /* + * Keep MLAN_ENCRYPTION_MODE_WEP40 for now so that + * the firmware can find a matching network from the + * scan. cfg80211 does not give us the encryption + * mode at this stage so just setting it to wep here + */ + if (MLAN_STATUS_SUCCESS != + woal_set_auth_mode(priv, wait_option, + MLAN_AUTH_MODE_OPEN)) { + ret = -EFAULT; + goto done; + } + + wpa_enabled = 0; + ret = woal_cfg80211_set_auth(priv, + MLAN_ENCRYPTION_MODE_WEP104, + wpa_enabled, wait_option); + if (ret) + goto done; + } + } + memcpy(&ssid_bssid.ssid, &req_ssid, sizeof(mlan_802_11_ssid)); + if (bssid) + memcpy(&ssid_bssid.bssid, bssid, ETH_ALEN); + if (MLAN_STATUS_SUCCESS != + woal_find_essid(priv, &ssid_bssid, wait_option)) { + /* Do specific SSID scanning */ + if (mode != MLAN_BSS_MODE_IBSS) + ret = woal_cfg80211_connect_scan(priv, conn_param, + wait_option); + else + ret = woal_request_scan(priv, wait_option, &req_ssid); + if (ret) { + ret = -EFAULT; + goto done; + } + } + + /* Disconnect before try to associate */ + if (mode == MLAN_BSS_MODE_IBSS) + woal_disconnect(priv, wait_option, NULL); + + if (mode != MLAN_BSS_MODE_IBSS) { + if (MLAN_STATUS_SUCCESS != + woal_find_best_network(priv, wait_option, &ssid_bssid)) { + ret = -EFAULT; + goto done; + } + /* Inform the BSS information to kernel, otherwise kernel will + give a panic after successful assoc */ + if (MLAN_STATUS_SUCCESS != + woal_inform_bss_from_scan_result(priv, &ssid_bssid, + wait_option)) { + ret = -EFAULT; + goto done; + } + } else if (MLAN_STATUS_SUCCESS != + woal_find_best_network(priv, wait_option, &ssid_bssid)) + /* Adhoc start, Check the channel command */ + woal_11h_channel_check_ioctl(priv, wait_option); + + PRINTM(MINFO, "Trying to associate to %s and bssid " MACSTR "\n", + (char *)req_ssid.ssid, MAC2STR(ssid_bssid.bssid)); + + /* Zero SSID implies use BSSID to connect */ + if (bssid) + memset(&ssid_bssid.ssid, 0, sizeof(mlan_802_11_ssid)); + else /* Connect to BSS by ESSID */ + memset(&ssid_bssid.bssid, 0, MLAN_MAC_ADDR_LENGTH); + + if (wait_option == MOAL_IOCTL_WAIT) + wait_timeout = MOAL_IOCTL_WAIT_TIMEOUT; + else + wait_timeout = MOAL_CMD_WAIT_TIMEOUT; + if (MLAN_STATUS_SUCCESS != + woal_bss_start(priv, wait_timeout, &ssid_bssid)) { + ret = -EFAULT; + goto done; + } + + /* Inform the IBSS information to kernel, otherwise kernel will give a + panic after successful assoc */ + if (mode == MLAN_BSS_MODE_IBSS) { + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_inform_ibss_bss(priv, channel, + beacon_interval)) { + ret = -EFAULT; + goto done; + } + } + +done: + if (ret) { + /* clear the encryption mode */ + woal_cfg80211_set_auth(priv, MLAN_ENCRYPTION_MODE_NONE, MFALSE, + wait_option); + /* clear IE */ + ie_len = 0; + if (MLAN_STATUS_SUCCESS != + woal_set_get_gen_ie(priv, MLAN_ACT_SET, NULL, &ie_len, + wait_option)) { + PRINTM(MERROR, "Could not clear RSN IE\n"); + ret = -EFAULT; + } + } + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0) || defined(COMPAT_WIRELESS) +/** + * @brief Set/Get DTIM period + * + * @param priv A pointer to moal_private structure + * @param action Action set or get + * @param wait_option Wait option + * @param value DTIM period + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +static mlan_status +woal_set_get_dtim_period(moal_private *priv, + t_u32 action, t_u8 wait_option, t_u8 *value) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_snmp_mib *mib = NULL; + mlan_status ret = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_snmp_mib)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + mib = (mlan_ds_snmp_mib *)req->pbuf; + mib->sub_command = MLAN_OID_SNMP_MIB_DTIM_PERIOD; + req->req_id = MLAN_IOCTL_SNMP_MIB; + req->action = action; + + if (action == MLAN_ACT_SET) + mib->param.dtim_period = *value; + + /* Send IOCTL request to MLAN */ + ret = woal_request_ioctl(priv, req, wait_option); + if (ret == MLAN_STATUS_SUCCESS && action == MLAN_ACT_GET) + *value = (t_u8)mib->param.dtim_period; + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} +#endif + +/** + * @brief Request the driver to dump the station information + * + * @param priv A pointer to moal_private structure + * @param sinfo A pointer to station_info structure + * + * @return 0 -- success, otherwise fail + */ +static mlan_status +woal_cfg80211_dump_station_info(moal_private *priv, struct station_info *sinfo) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_get_signal signal; + mlan_ds_get_stats stats; + mlan_ioctl_req *req = NULL; + mlan_ds_rate *rate = NULL; + t_u16 Rates[12] = { + 0x02, 0x04, 0x0B, 0x16, + 0x0C, 0x12, 0x18, 0x24, + 0x30, 0x48, 0x60, 0x6c + }; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0) || defined(COMPAT_WIRELESS) + mlan_bss_info bss_info; + t_u8 dtim_period = 0; +#endif + + ENTER(); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0) + sinfo->filled = + BIT(NL80211_STA_INFO_RX_BYTES) | BIT(NL80211_STA_INFO_TX_BYTES) + | BIT(NL80211_STA_INFO_RX_PACKETS) | + BIT(NL80211_STA_INFO_TX_PACKETS) | BIT(NL80211_STA_INFO_SIGNAL) + | BIT(NL80211_STA_INFO_TX_BITRATE); +#else + sinfo->filled = STATION_INFO_RX_BYTES | STATION_INFO_TX_BYTES | + STATION_INFO_RX_PACKETS | STATION_INFO_TX_PACKETS | + STATION_INFO_SIGNAL | STATION_INFO_TX_BITRATE; +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0) + sinfo->filled |= BIT(NL80211_STA_INFO_TX_FAILED); +#else + sinfo->filled |= STATION_INFO_TX_FAILED; +#endif +#endif + + /* Get signal information from the firmware */ + memset(&signal, 0, sizeof(mlan_ds_get_signal)); + if (MLAN_STATUS_SUCCESS != + woal_get_signal_info(priv, MOAL_IOCTL_WAIT, &signal)) { + PRINTM(MERROR, "Error getting signal information\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + /* Get stats information from the firmware */ + memset(&stats, 0, sizeof(mlan_ds_get_stats)); + if (MLAN_STATUS_SUCCESS != + woal_get_stats_info(priv, MOAL_IOCTL_WAIT, &stats)) { + PRINTM(MERROR, "Error getting stats information\n"); + ret = MLAN_STATUS_FAILURE; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_rate)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + rate = (mlan_ds_rate *)req->pbuf; + rate->sub_command = MLAN_OID_GET_DATA_RATE; + req->req_id = MLAN_IOCTL_RATE; + req->action = MLAN_ACT_GET; + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + if (rate->param.data_rate.tx_rate_format != MLAN_RATE_FORMAT_LG) { + sinfo->txrate.flags = RATE_INFO_FLAGS_MCS; + if (rate->param.data_rate.tx_ht_bw == MLAN_HT_BW40) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0) + sinfo->txrate.flags |= RATE_INFO_BW_40; +#else + sinfo->txrate.flags |= RATE_INFO_FLAGS_40_MHZ_WIDTH; +#endif + if (rate->param.data_rate.tx_ht_gi == MLAN_HT_SGI) + sinfo->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI; + sinfo->txrate.mcs = rate->param.data_rate.tx_mcs_index; + } else { + /* Bit rate is in 500 kb/s units. Convert it to 100kb/s units */ + sinfo->txrate.legacy = + Rates[rate->param.data_rate.tx_data_rate] * 5; + } + sinfo->rx_bytes = priv->stats.rx_bytes; + sinfo->tx_bytes = priv->stats.tx_bytes; + sinfo->rx_packets = priv->stats.rx_packets; + sinfo->tx_packets = priv->stats.tx_packets; + sinfo->signal = signal.bcn_rssi_avg; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) + sinfo->tx_failed = stats.failed; +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0) || defined(COMPAT_WIRELESS) + /* Update BSS information */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0) + sinfo->filled |= BIT(NL80211_STA_INFO_BSS_PARAM); +#else + sinfo->filled |= STATION_INFO_BSS_PARAM; +#endif + sinfo->bss_param.flags = 0; + ret = woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + if (ret) + goto done; + if (bss_info.capability_info & WLAN_CAPABILITY_SHORT_PREAMBLE) + sinfo->bss_param.flags |= BSS_PARAM_FLAGS_SHORT_PREAMBLE; + if (bss_info.capability_info & WLAN_CAPABILITY_SHORT_SLOT_TIME) + sinfo->bss_param.flags |= BSS_PARAM_FLAGS_SHORT_SLOT_TIME; + sinfo->bss_param.beacon_interval = bss_info.beacon_interval; + /* Get DTIM period */ + ret = woal_set_get_dtim_period(priv, MLAN_ACT_GET, + MOAL_IOCTL_WAIT, &dtim_period); + if (ret) { + PRINTM(MERROR, "Get DTIM period failed\n"); + goto done; + } + sinfo->bss_param.dtim_period = dtim_period; +#endif + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} + +/******************************************************** + Global Functions +********************************************************/ + +/** + * @brief Request the driver to change regulatory domain + * + * @param wiphy A pointer to wiphy structure + * @param request A pointer to regulatory_request structure + * + * @return 0 + */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) +static void +#else +static int +#endif +woal_cfg80211_reg_notifier(struct wiphy *wiphy, + struct regulatory_request *request) +{ + moal_private *priv = NULL; + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); + t_u8 region[COUNTRY_CODE_LEN]; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0) + int ret = 0; +#endif + + ENTER(); + + priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY); + if (!priv) { + PRINTM(MFATAL, "Unable to get priv in %s()\n", __func__); + LEAVE(); +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0) + return -EINVAL; +#else + return; +#endif + } + + PRINTM(MIOCTL, "cfg80211 regulatory domain callback " + "%c%c\n", request->alpha2[0], request->alpha2[1]); + memset(region, 0, sizeof(region)); + memcpy(region, request->alpha2, sizeof(request->alpha2)); + region[2] = ' '; + if (MTRUE == is_cfg80211_special_region_code(region)) { + PRINTM(MIOCTL, "Skip configure special region code\n"); + LEAVE(); +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0) + return ret; +#else + return; +#endif + } + if ((handle->country_code[0] != request->alpha2[0]) || + (handle->country_code[1] != request->alpha2[1])) { + t_u8 country_code[COUNTRY_CODE_LEN]; + memset(country_code, 0, sizeof(country_code)); + country_code[0] = request->alpha2[0]; + country_code[1] = request->alpha2[1]; + if (MLAN_STATUS_SUCCESS != + woal_request_country_power_table(priv, country_code)) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0) + return -EFAULT; +#else + return; +#endif + } + } + handle->country_code[0] = request->alpha2[0]; + handle->country_code[1] = request->alpha2[1]; + handle->country_code[2] = ' '; + if (MLAN_STATUS_SUCCESS != + woal_set_region_code(priv, handle->country_code)) + PRINTM(MERROR, "Set country code failed!\n"); + switch (request->initiator) { + case NL80211_REGDOM_SET_BY_DRIVER: + PRINTM(MIOCTL, "Regulatory domain BY_DRIVER\n"); + break; + case NL80211_REGDOM_SET_BY_CORE: + PRINTM(MIOCTL, "Regulatory domain BY_CORE\n"); + break; + case NL80211_REGDOM_SET_BY_USER: + PRINTM(MIOCTL, "Regulatory domain BY_USER\n"); + break; + /* TODO: apply driver specific changes in channel flags based + on the request initiator if necessory. * */ + case NL80211_REGDOM_SET_BY_COUNTRY_IE: + PRINTM(MIOCTL, "Regulatory domain BY_COUNTRY_IE\n"); + break; + } + if (priv->wdev && priv->wdev->wiphy && + (request->initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE)) + woal_send_domain_info_cmd_fw(priv, MOAL_IOCTL_WAIT); + LEAVE(); +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0) + return ret; +#endif +} + +#ifdef UAP_CFG80211 +/** + * @brief Swithces BSS role of interface + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option (MOAL_WAIT or MOAL_NO_WAIT) + * @param bss_role bss role + * + * @return 0 --success, otherwise fail + */ +mlan_status +woal_role_switch(moal_private *priv, t_u8 wait_option, t_u8 bss_role) +{ + int ret = 0; + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_BSS_ROLE; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_SET; + bss->param.bss_role = bss_role; + + status = woal_request_ioctl(priv, req, wait_option); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief request scan + * + * @param priv A pointer to moal_private structure + * @param scan_cfg A pointer to wlan_user_scan_cfg structure + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +mlan_status +woal_uap_scan(moal_private *priv, wlan_user_scan_cfg *scan_cfg) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + moal_handle *handle = priv->phandle; + moal_private *tmp_priv; + u8 role; + + ENTER(); + if (priv->bss_index > 0) + tmp_priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY); + else + tmp_priv = priv; + role = GET_BSS_ROLE(tmp_priv); + if (role == MLAN_BSS_ROLE_UAP) + woal_role_switch(tmp_priv, MOAL_IOCTL_WAIT, MLAN_BSS_ROLE_STA); +#ifdef REASSOCIATION + if (MOAL_ACQ_SEMAPHORE_BLOCK(&handle->reassoc_sem)) { + PRINTM(MERROR, "Acquire semaphore error, woal_do_combo_scan\n"); + goto done; + } +#endif /* REASSOCIATION */ + tmp_priv->report_scan_result = MTRUE; + ret = woal_request_userscan(tmp_priv, MOAL_IOCTL_WAIT, scan_cfg); + woal_sched_timeout(5); +#ifdef REASSOCIATION + MOAL_REL_SEMAPHORE(&handle->reassoc_sem); +#endif +done: + if (role == MLAN_BSS_ROLE_UAP) + woal_role_switch(tmp_priv, MOAL_IOCTL_WAIT, MLAN_BSS_ROLE_UAP); + LEAVE(); + return ret; +} +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) +/** + * @brief Request the driver to do a scan. Always returning + * zero meaning that the scan request is given to driver, + * and will be valid until passed to cfg80211_scan_done(). + * To inform scan results, call cfg80211_inform_bss(). + * + * @param wiphy A pointer to wiphy structure + * @param request A pointer to cfg80211_scan_request structure + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request) +#else +/** + * @brief Request the driver to do a scan. Always returning + * zero meaning that the scan request is given to driver, + * and will be valid until passed to cfg80211_scan_done(). + * To inform scan results, call cfg80211_inform_bss(). + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param request A pointer to cfg80211_scan_request structure + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev, + struct cfg80211_scan_request *request) +#endif +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) + struct net_device *dev = request->wdev->netdev; +#endif + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + wlan_user_scan_cfg scan_req; + mlan_bss_info bss_info; + struct ieee80211_channel *chan; + int ret = 0, i; + unsigned long flags; + + ENTER(); + + PRINTM(MINFO, "Received scan request on %s\n", dev->name); + if (priv->phandle->scan_pending_on_block == MTRUE) { + PRINTM(MCMND, "scan already in processing...\n"); + LEAVE(); + return -EAGAIN; + } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) + if (priv->last_event & EVENT_BG_SCAN_REPORT) { + PRINTM(MCMND, "block scan while pending BGSCAN result\n"); + priv->last_event = 0; + LEAVE(); + return -EAGAIN; + } +#endif +#if defined(STA_CFG80211) || defined(UAP_CFG80211) +#ifdef WIFI_DIRECT_SUPPORT + if (priv->phandle->is_go_timer_set && + priv->wdev->iftype != NL80211_IFTYPE_P2P_GO) { + PRINTM(MCMND, "block scan in go timer....\n"); + LEAVE(); + return -EAGAIN; + } +#endif +#endif + if (priv->fake_scan_complete) { + PRINTM(MEVENT, "Reporting fake scan results\n"); + woal_inform_bss_from_scan_result(priv, NULL, MOAL_IOCTL_WAIT); + cfg80211_scan_done(request, MFALSE); + return ret; + } + memset(&bss_info, 0, sizeof(bss_info)); + if (MLAN_STATUS_SUCCESS == + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info)) { + if (bss_info.scan_block) { + PRINTM(MEVENT, "Block scan in mlan module\n"); + woal_inform_bss_from_scan_result(priv, NULL, + MOAL_IOCTL_WAIT); + cfg80211_scan_done(request, MFALSE); + return ret; + } + } + if (priv->phandle->scan_request && + priv->phandle->scan_request != request) { + PRINTM(MCMND, + "different scan_request is coming before previous one is finished on %s...\n", + dev->name); + LEAVE(); + return -EBUSY; + } + spin_lock_irqsave(&priv->phandle->scan_req_lock, flags); + priv->phandle->scan_request = request; + priv->phandle->scan_priv = priv; + spin_unlock_irqrestore(&priv->phandle->scan_req_lock, flags); + memset(&scan_req, 0x00, sizeof(scan_req)); + +#ifdef WIFI_DIRECT_SUPPORT + if (priv->phandle->miracast_mode || + woal_is_any_interface_active(priv->phandle)) + scan_req.scan_chan_gap = priv->phandle->scan_chan_gap; + else + scan_req.scan_chan_gap = 0; +#endif + for (i = 0; i < priv->phandle->scan_request->n_ssids; i++) { + memcpy(scan_req.ssid_list[i].ssid, + priv->phandle->scan_request->ssids[i].ssid, + priv->phandle->scan_request->ssids[i].ssid_len); + if (priv->phandle->scan_request->ssids[i].ssid_len) + scan_req.ssid_list[i].max_len = 0; + else + scan_req.ssid_list[i].max_len = 0xff; + PRINTM(MIOCTL, "scan: ssid=%s\n", scan_req.ssid_list[i].ssid); + } +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT && + priv->phandle->scan_request->n_ssids) { + if (!memcmp(scan_req.ssid_list[0].ssid, "DIRECT-", 7)) + scan_req.ssid_list[0].max_len = 0xfe; + } +#endif +#endif + for (i = 0; + i < MIN(WLAN_USER_SCAN_CHAN_MAX, + priv->phandle->scan_request->n_channels); i++) { + chan = priv->phandle->scan_request->channels[i]; + scan_req.chan_list[i].chan_number = chan->hw_value; + scan_req.chan_list[i].radio_type = chan->band; + if (chan-> + flags & (IEEE80211_CHAN_PASSIVE_SCAN | + IEEE80211_CHAN_RADAR)) + scan_req.chan_list[i].scan_type = + MLAN_SCAN_TYPE_PASSIVE; + else + scan_req.chan_list[i].scan_type = MLAN_SCAN_TYPE_ACTIVE; + scan_req.chan_list[i].scan_time = 0; +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT && + priv->phandle->scan_request->n_ssids) { + if (!memcmp(scan_req.ssid_list[0].ssid, "DIRECT-", 7)) + scan_req.chan_list[i].scan_time = + MIN_SPECIFIC_SCAN_CHAN_TIME; + } +#endif +#endif +#ifdef WIFI_DIRECT_SUPPORT + if (priv->phandle->miracast_mode) + scan_req.chan_list[i].scan_time = + priv->phandle->miracast_scan_time; + else if (woal_is_any_interface_active(priv->phandle)) + scan_req.chan_list[i].scan_time = + MIN_SPECIFIC_SCAN_CHAN_TIME; +#endif +#ifdef UAP_CFG80211 + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) + scan_req.chan_list[i].scan_time = + MIN_SPECIFIC_SCAN_CHAN_TIME; +#endif + } + if (priv->phandle->scan_request->ie && + priv->phandle->scan_request->ie_len) { + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_mgmt_frame_ie(priv, NULL, 0, NULL, 0, NULL, 0, + (t_u8 *)priv->phandle-> + scan_request->ie, + priv->phandle->scan_request-> + ie_len, MGMT_MASK_PROBE_REQ, + MOAL_IOCTL_WAIT)) { + PRINTM(MERROR, "Fail to set scan request IE\n"); + ret = -EFAULT; + goto done; + } + } else { + /** Clear SCAN IE in Firmware */ + if (priv->probereq_index != MLAN_CUSTOM_IE_AUTO_IDX_MASK) + woal_cfg80211_mgmt_frame_ie(priv, NULL, 0, NULL, 0, + NULL, 0, NULL, 0, + MGMT_MASK_PROBE_REQ, + MOAL_IOCTL_WAIT); + } +#ifdef UAP_CFG80211 + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + /** use sync scan for uap */ + ret = woal_uap_scan(priv, &scan_req); + if (!ret) { + LEAVE(); + return ret; + } else { + PRINTM(MERROR, "Uap SCAN failure\n"); + goto done; + } + } +#endif + if (MLAN_STATUS_SUCCESS != woal_do_scan(priv, &scan_req)) { + PRINTM(MERROR, "woal_do_scan fails!\n"); + ret = -EAGAIN; + goto done; + } +done: + if (ret) { + spin_lock_irqsave(&priv->phandle->scan_req_lock, flags); + cfg80211_scan_done(request, MTRUE); + priv->phandle->scan_request = NULL; + priv->phandle->scan_priv = NULL; + spin_unlock_irqrestore(&priv->phandle->scan_req_lock, flags); + } else + PRINTM(MMSG, "wlan: %s START SCAN\n", dev->name); + LEAVE(); + return ret; +} + +/** + * @brief construct and send ft action request + * +* @param priv A pointer to moal_private structure + * @param ie A pointer to ft ie + * @param le Value of ie len + * @param bssid A pointer to target ap bssid + * @ + * @return 0 -- success, otherwise fail + */ +static int +woal_send_ft_action_requst(moal_private *priv, t_u8 *ie, t_u8 len, t_u8 *bssid, + t_u8 *target_ap) +{ + IEEE80211_MGMT *mgmt = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + pmlan_buffer pmbuf = NULL; + t_u32 pkt_type; + t_u32 tx_control; + t_u16 packet_len = 0; + t_u8 addr[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; + int ret = 0; + + ENTER(); + + /* pkt_type + tx_control */ +#define HEADER_SIZE 8 + /* frmctl + durationid + addr1 + addr2 + addr3 + seqctl + addr4 */ +#define MGMT_HEADER_LEN (2 + 2 + 6 + 6 + 6 + 2 +6) + /* 14 = category + action + sta addr + target ap */ +#define FT_REQUEST_LEN 14 + packet_len = (t_u16)len + MGMT_HEADER_LEN + FT_REQUEST_LEN; + pmbuf = woal_alloc_mlan_buffer(priv->phandle, + MLAN_MIN_DATA_HEADER_LEN + HEADER_SIZE + + packet_len + sizeof(packet_len)); + if (!pmbuf) { + PRINTM(MERROR, "Fail to allocate mlan_buffer\n"); + ret = -ENOMEM; + goto done; + } + + pmbuf->data_offset = MLAN_MIN_DATA_HEADER_LEN; + pkt_type = MRVL_PKT_TYPE_MGMT_FRAME; + tx_control = 0; + /* Add pkt_type and tx_control */ + memcpy(pmbuf->pbuf + pmbuf->data_offset, &pkt_type, sizeof(pkt_type)); + memcpy(pmbuf->pbuf + pmbuf->data_offset + sizeof(pkt_type), &tx_control, + sizeof(tx_control)); + /* Add packet len */ + memcpy(pmbuf->pbuf + pmbuf->data_offset + HEADER_SIZE, &packet_len, + sizeof(packet_len)); + + mgmt = (IEEE80211_MGMT *)(pmbuf->pbuf + pmbuf->data_offset + + HEADER_SIZE + sizeof(packet_len)); + memset(mgmt, 0, MGMT_HEADER_LEN); + mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | + IEEE80211_STYPE_ACTION); + memcpy(mgmt->da, bssid, ETH_ALEN); + memcpy(mgmt->sa, priv->current_addr, ETH_ALEN); + memcpy(mgmt->bssid, bssid, ETH_ALEN); + memcpy(mgmt->addr4, addr, ETH_ALEN); + + mgmt->u.ft_req.category = 0x06; /**ft action code 0x6*/ + mgmt->u.ft_req.action = 0x1; /**ft action request*/ + memcpy(mgmt->u.ft_req.sta_addr, priv->current_addr, ETH_ALEN); + memcpy(mgmt->u.ft_req.target_ap_addr, target_ap, ETH_ALEN); + + if (ie && len) + memcpy((t_u8 *)(&mgmt->u.ft_req.variable), ie, len); + + pmbuf->data_len = HEADER_SIZE + packet_len + sizeof(packet_len); + pmbuf->buf_type = MLAN_BUF_TYPE_RAW_DATA; + pmbuf->bss_index = priv->bss_index; + pmbuf->priority = 7; + + status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf); + + switch (status) { + case MLAN_STATUS_PENDING: + atomic_inc(&priv->phandle->tx_pending); + queue_work(priv->phandle->workqueue, &priv->phandle->main_work); + break; + case MLAN_STATUS_SUCCESS: + woal_free_mlan_buffer(priv->phandle, pmbuf); + break; + case MLAN_STATUS_FAILURE: + default: + woal_free_mlan_buffer(priv->phandle, pmbuf); + ret = -EFAULT; + break; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief construct and send ft auth request + * +* @param priv A pointer to moal_private structure + * @param ie A pointer to ft ie + * @param le Value of ie len + * @param bssid A pointer to target ap bssid + * @ + * @return 0 -- success, otherwise fail + */ +static int +woal_send_ft_auth_requst(moal_private *priv, t_u8 *ie, t_u8 len, t_u8 *bssid) +{ + IEEE80211_MGMT *mgmt = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + pmlan_buffer pmbuf = NULL; + t_u32 pkt_type; + t_u32 tx_control; + t_u16 packet_len = 0; + t_u8 addr[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; + int ret = 0; + + ENTER(); + /* pkt_type + tx_control */ +#define HEADER_SIZE 8 + /* frmctl + durationid + addr1 + addr2 + addr3 + seqctl + addr4 */ +#define MGMT_HEADER_LEN (2 + 2 + 6 + 6 + 6 + 2 +6) + /* 6 = auth_alg + auth_transaction +auth_status */ +#define AUTH_BODY_LEN 6 + packet_len = (t_u16)len + MGMT_HEADER_LEN + AUTH_BODY_LEN; + pmbuf = woal_alloc_mlan_buffer(priv->phandle, + MLAN_MIN_DATA_HEADER_LEN + HEADER_SIZE + + packet_len + sizeof(packet_len)); + if (!pmbuf) { + PRINTM(MERROR, "Fail to allocate mlan_buffer\n"); + ret = -ENOMEM; + goto done; + } + + pmbuf->data_offset = MLAN_MIN_DATA_HEADER_LEN; + pkt_type = MRVL_PKT_TYPE_MGMT_FRAME; + tx_control = 0; + /* Add pkt_type and tx_control */ + memcpy(pmbuf->pbuf + pmbuf->data_offset, &pkt_type, sizeof(pkt_type)); + memcpy(pmbuf->pbuf + pmbuf->data_offset + sizeof(pkt_type), &tx_control, + sizeof(tx_control)); + /* Add packet len */ + memcpy(pmbuf->pbuf + pmbuf->data_offset + HEADER_SIZE, &packet_len, + sizeof(packet_len)); + + mgmt = (IEEE80211_MGMT *)(pmbuf->pbuf + pmbuf->data_offset + + HEADER_SIZE + sizeof(packet_len)); + memset(mgmt, 0, MGMT_HEADER_LEN); + mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | + IEEE80211_STYPE_AUTH); + memcpy(mgmt->da, bssid, ETH_ALEN); + memcpy(mgmt->sa, priv->current_addr, ETH_ALEN); + memcpy(mgmt->bssid, bssid, ETH_ALEN); + memcpy(mgmt->addr4, addr, ETH_ALEN); + + mgmt->u.auth.auth_alg = cpu_to_le16(WLAN_AUTH_FT); + mgmt->u.auth.auth_transaction = cpu_to_le16(1); + mgmt->u.auth.status_code = cpu_to_le16(0); + if (ie && len) + memcpy((t_u8 *)(&mgmt->u.auth.variable), ie, len); + + pmbuf->data_len = HEADER_SIZE + packet_len + sizeof(packet_len); + pmbuf->buf_type = MLAN_BUF_TYPE_RAW_DATA; + pmbuf->bss_index = priv->bss_index; + pmbuf->priority = 7; + + status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf); + + switch (status) { + case MLAN_STATUS_PENDING: + atomic_inc(&priv->phandle->tx_pending); + queue_work(priv->phandle->workqueue, &priv->phandle->main_work); + break; + case MLAN_STATUS_SUCCESS: + woal_free_mlan_buffer(priv->phandle, pmbuf); + break; + case MLAN_STATUS_FAILURE: + default: + woal_free_mlan_buffer(priv->phandle, pmbuf); + ret = -EFAULT; + break; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief connect the AP through ft over air. + * + * @param priv A pointer to moal_private structure + * @param bssid A pointer to bssid + * @param chan struct ieee80211_channel + * + * @return 0 -- success, otherwise fail + */ +static int +woal_connect_ft_over_air(moal_private *priv, t_u8 *bssid, + struct ieee80211_channel *chan) +{ + struct wiphy *wiphy = priv->wdev->wiphy; + mlan_bss_info bss_info; + t_u8 status = 0, wait_option = MOAL_CMD_WAIT; + int ret = 0; + long timeout = 0; + + ENTER(); + + if (!priv->ft_roaming_triggered_by_driver) { + wait_option = MOAL_IOCTL_WAIT; + memset(&bss_info, 0, sizeof(bss_info)); + woal_get_bss_info(priv, wait_option, &bss_info); + } + + if (priv->ft_roaming_triggered_by_driver || (priv->media_connected && + bss_info.mdid == + priv->ft_md && + bss_info.ft_cap == + priv->ft_cap)) { + ret = MTRUE; + + /* enable auth register frame */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + woal_cfg80211_mgmt_frame_register(wiphy, priv->netdev, + IEEE80211_STYPE_AUTH, MTRUE); +#else + woal_cfg80211_mgmt_frame_register(wiphy, priv->wdev, + IEEE80211_STYPE_AUTH, MTRUE); +#endif +#define AUTH_TX_DEFAULT_WAIT_TIME 1200 + woal_cfg80211_remain_on_channel_cfg(priv, wait_option, MFALSE, + &status, chan, 0, + AUTH_TX_DEFAULT_WAIT_TIME); + /* construct auth request and send out */ + woal_send_ft_auth_requst(priv, priv->ft_ie, priv->ft_ie_len, + bssid); + PRINTM(MMSG, "wlan: send out FT auth,wait for auth response\n"); + /* wait until received auth response */ + priv->ft_wait_condition = MFALSE; + timeout = + wait_event_timeout(priv->ft_wait_q, + priv->ft_wait_condition, 1 * HZ); + if (!timeout) { + /* connet fail */ + if (!priv->ft_roaming_triggered_by_driver) { + woal_inform_bss_from_scan_result(priv, NULL, + wait_option); + cfg80211_connect_result(priv->netdev, + priv->cfg_bssid, NULL, + 0, NULL, 0, + WLAN_STATUS_SUCCESS, + GFP_KERNEL); + } + priv->ft_roaming_triggered_by_driver = MFALSE; + PRINTM(MMSG, + "wlan: keep connected to bssid " MACSTR "\n", + MAC2STR(priv->cfg_bssid)); + } else { + PRINTM(MMSG, "wlan: FT auth received \n"); + memcpy(priv->target_ap_bssid, bssid, ETH_ALEN); + } + woal_cfg80211_remain_on_channel_cfg(priv, wait_option, MTRUE, + &status, NULL, 0, 0); +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + woal_cfg80211_mgmt_frame_register(wiphy, priv->netdev, + IEEE80211_STYPE_AUTH, MFALSE); +#else + woal_cfg80211_mgmt_frame_register(wiphy, priv->wdev, + IEEE80211_STYPE_AUTH, MFALSE); +#endif + } + + LEAVE(); + return ret; +} + +/** + * @brief connect the AP through ft over DS. + * + * @param priv A pointer to moal_private structure + * @param bssid A pointer to bssid + * @param chan struct ieee80211_channel + * + * @return 0 -- success, otherwise fail + */ +static int +woal_connect_ft_over_ds(moal_private *priv, t_u8 *bssid, + struct ieee80211_channel *pchan) +{ + t_u8 status = 0, wait_option = MOAL_CMD_WAIT; + struct ieee80211_channel chan; + mlan_bss_info bss_info; + int ret = 0; + long timeout = 0; + + ENTER(); + + if (!priv->ft_roaming_triggered_by_driver) + wait_option = MOAL_IOCTL_WAIT; + + memset(&bss_info, 0, sizeof(bss_info)); + woal_get_bss_info(priv, wait_option, &bss_info); + chan.band = (bss_info.bss_chan < 36) ? + IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; + chan.center_freq = + ieee80211_channel_to_frequency(bss_info.bss_chan, chan.band); + + if (priv->media_connected) { + woal_cfg80211_remain_on_channel_cfg(priv, wait_option, MFALSE, + &status, &chan, 0, 1200); + /* construct ft action request and send out */ + woal_send_ft_action_requst(priv, priv->ft_ie, priv->ft_ie_len, + (t_u8 *)priv->cfg_bssid, bssid); + PRINTM(MMSG, + "wlan: send out FT request,wait for FT response\n"); + /* wait until received auth response */ + priv->ft_wait_condition = MFALSE; + timeout = + wait_event_timeout(priv->ft_wait_q, + priv->ft_wait_condition, 1 * HZ); + if (!timeout) { + /* go over air, as current AP may be unreachable */ + PRINTM(MMSG, "wlan: go over air\n"); + woal_cfg80211_remain_on_channel_cfg(priv, wait_option, + MTRUE, &status, + NULL, 0, 0); + woal_connect_ft_over_air(priv, bssid, pchan); + LEAVE(); + return ret; + } else { + PRINTM(MMSG, "wlan: received FT response\n"); + memcpy(priv->target_ap_bssid, bssid, ETH_ALEN); + } + woal_cfg80211_remain_on_channel_cfg(priv, wait_option, MTRUE, + &status, NULL, 0, 0); + + } + + LEAVE(); + return ret; +} + +/** + * @brief start FT Roaming. + * + * @param priv A pointer to moal_private structure + * @param ssid_bssid A pointer to mlan_ssid_bssid structure + * + * + * @return 0 -- success, otherwise fail + */ +static int +woal_start_ft_roaming(moal_private *priv, mlan_ssid_bssid *ssid_bssid) +{ + struct ieee80211_channel chan; + int ret = 0; + + ENTER(); + PRINTM(MEVENT, "Try to start FT roaming......\n"); + chan.band = (ssid_bssid->channel < 36) ? + IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; + chan.center_freq = + ieee80211_channel_to_frequency(ssid_bssid->channel, chan.band); + + priv->ft_roaming_triggered_by_driver = MTRUE; + if (!(priv->last_event & EVENT_PRE_BCN_LOST) && + (ssid_bssid->ft_cap & MBIT(0))) { + woal_connect_ft_over_ds(priv, (t_u8 *)&ssid_bssid->bssid, + &chan); + } else { + /* if pre beacon lost, it need to send auth request instead ft + action request when ft over ds */ + + woal_connect_ft_over_air(priv, (t_u8 *)&ssid_bssid->bssid, + &chan); + } + + LEAVE(); + return ret; +} + +/** + * @brief Request the driver to connect to the ESS with + * the specified parameters from kernel + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param sme A pointer to cfg80211_connect_params structure + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, + struct cfg80211_connect_params *sme) +{ + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + int ret = 0; + mlan_bss_info bss_info; + unsigned long flags; + mlan_ds_misc_assoc_rsp assoc_rsp; + IEEEtypes_AssocRsp_t *passoc_rsp = NULL; + mlan_ssid_bssid ssid_bssid; + moal_handle *handle = priv->phandle; + int i; + + ENTER(); + + PRINTM(MINFO, "Received association request on %s\n", dev->name); +#ifdef UAP_CFG80211 + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + LEAVE(); + return 0; + } +#endif + if (priv->wdev->iftype != NL80211_IFTYPE_STATION +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) + && priv->wdev->iftype != NL80211_IFTYPE_P2P_CLIENT +#endif /* KERNEL_VERSION */ +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ + ) { + PRINTM(MERROR, + "Received infra assoc request when station not in infra mode\n"); + LEAVE(); + return -EINVAL; + } + + memset(&ssid_bssid, 0, sizeof(ssid_bssid)); + memcpy(&ssid_bssid.ssid.ssid, sme->ssid, sme->ssid_len); + ssid_bssid.ssid.ssid_len = sme->ssid_len; + if (sme->bssid) + memcpy(&ssid_bssid.bssid, sme->bssid, ETH_ALEN); + /* Not allowed to connect to the same AP which is already connected + with other interface */ + for (i = 0; i < handle->priv_num; i++) { + if (handle->priv[i] != priv && + MTRUE == woal_is_connected(handle->priv[i], &ssid_bssid)) { + PRINTM(MMSG, + "wlan: already connected with other interface, bssid " + MACSTR "\n", + MAC2STR(handle->priv[i]->cfg_bssid)); + LEAVE(); + return -EINVAL; + } + } + + if (MTRUE == woal_is_connected(priv, &ssid_bssid)) { + /* Inform the BSS information to kernel, otherwise * kernel + will give a panic after successful assoc */ + woal_inform_bss_from_scan_result(priv, &ssid_bssid, + MOAL_IOCTL_WAIT); + cfg80211_connect_result(priv->netdev, priv->cfg_bssid, NULL, 0, + NULL, 0, WLAN_STATUS_SUCCESS, + GFP_KERNEL); + PRINTM(MMSG, "wlan: already connected to bssid " MACSTR "\n", + MAC2STR(priv->cfg_bssid)); + LEAVE(); + return 0; + } + + /** cancel pending scan */ + woal_cancel_scan(priv, MOAL_IOCTL_WAIT); + +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT + && (priv->wdev->iftype == NL80211_IFTYPE_STATION + || priv->wdev->iftype == NL80211_IFTYPE_P2P_CLIENT)) { + /* if bsstype == wifi direct, and iftype == station or p2p + client, that means wpa_supplicant wants to enable wifi + direct functionality, so we should init p2p client. Note + that due to kernel iftype check, ICS wpa_supplicant could + not updaet iftype to init p2p client, so we have to done it + here. */ + if (MLAN_STATUS_SUCCESS != woal_cfg80211_init_p2p_client(priv)) { + PRINTM(MERROR, + "Init p2p client for wpa_supplicant failed.\n"); + ret = -EFAULT; + + LEAVE(); + return ret; + } + } + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) { + /* WAR for P2P connection with Samsung TV */ + woal_sched_timeout(200); + } +#endif +#endif + /* Fast BSS Transition use ft-over-air */ + if (priv->media_connected && priv->ft_ie_len && + !(priv->ft_cap & MBIT(0))) { + ret = woal_connect_ft_over_air(priv, (t_u8 *)sme->bssid, + sme->channel); + if (ret == MTRUE) { + LEAVE(); + return 0; + } + } + priv->cfg_connect = MTRUE; + if (priv->scan_type == MLAN_SCAN_TYPE_PASSIVE) + woal_set_scan_type(priv, MLAN_SCAN_TYPE_ACTIVE); + priv->assoc_status = 0; + ret = woal_cfg80211_assoc(priv, (void *)sme, MOAL_IOCTL_WAIT); + + if (priv->scan_type == MLAN_SCAN_TYPE_PASSIVE) + woal_set_scan_type(priv, MLAN_SCAN_TYPE_PASSIVE); + if (!ret) { + memset(&assoc_rsp, 0, sizeof(mlan_ds_misc_assoc_rsp)); + woal_get_assoc_rsp(priv, &assoc_rsp); + passoc_rsp = (IEEEtypes_AssocRsp_t *)assoc_rsp.assoc_resp_buf; + priv->rssi_low = DEFAULT_RSSI_LOW_THRESHOLD; + if (priv->bss_type == MLAN_BSS_TYPE_STA) + woal_save_conn_params(priv, sme); + memset(&bss_info, 0, sizeof(bss_info)); + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + priv->channel = bss_info.bss_chan; + } + spin_lock_irqsave(&priv->connect_lock, flags); + priv->cfg_connect = MFALSE; + if (!ret && priv->media_connected) { + PRINTM(MMSG, + "wlan: Connected to bssid " MACSTR " successfully\n", + MAC2STR(priv->cfg_bssid)); + spin_unlock_irqrestore(&priv->connect_lock, flags); + cfg80211_connect_result(priv->netdev, priv->cfg_bssid, NULL, 0, + passoc_rsp->ie_buffer, + assoc_rsp.assoc_resp_len - + ASSOC_RESP_FIXED_SIZE, + WLAN_STATUS_SUCCESS, GFP_KERNEL); + } else { + PRINTM(MINFO, "wlan: Failed to connect to bssid " MACSTR "\n", + MAC2STR(priv->cfg_bssid)); + memset(priv->cfg_bssid, 0, ETH_ALEN); + priv->ft_ie_len = 0; + priv->ft_pre_connect = MFALSE; + spin_unlock_irqrestore(&priv->connect_lock, flags); + cfg80211_connect_result(priv->netdev, priv->cfg_bssid, NULL, 0, + NULL, 0, woal_get_assoc_status(priv), + GFP_KERNEL); + + } + LEAVE(); + return 0; +} + +/** + * @brief Request the driver to disconnect + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param reason_code Reason code + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev, + t_u16 reason_code) +{ + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + long start_time; + + ENTER(); + PRINTM(MMSG, "wlan: Received disassociation request on %s\n", + dev->name); +#ifdef UAP_CFG80211 + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + LEAVE(); + return 0; + } +#endif + priv->phandle->driver_state = woal_check_driver_status(priv->phandle); + if (priv->phandle->driver_state) { + PRINTM(MERROR, + "Block woal_cfg80211_disconnect in abnormal driver state\n"); + LEAVE(); + return 0; + } + + if (priv->cfg_disconnect) { + PRINTM(MERROR, "Disassociation already in progress\n"); + LEAVE(); + return -EBUSY; + } + + if (priv->media_connected == MFALSE) { + PRINTM(MMSG, " Already disconnected\n"); + LEAVE(); + return 0; + } + + priv->cfg_disconnect = MTRUE; + + start_time = jiffies; + if (woal_disconnect(priv, MOAL_IOCTL_WAIT_TIMEOUT, priv->cfg_bssid) != + MLAN_STATUS_SUCCESS) { + priv->cfg_disconnect = MFALSE; + LEAVE(); + return -EFAULT; + } + /**Add delay to avoid auth failure after wps success */ + if ((jiffies - start_time) < 1 * HZ) + woal_sched_timeout(1500); + + priv->cfg_disconnect = MFALSE; + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) + if (priv->wdev->iftype == NL80211_IFTYPE_STATION) + cfg80211_disconnected(priv->netdev, 0, NULL, 0, GFP_KERNEL); +#endif + + memset(priv->cfg_bssid, 0, ETH_ALEN); + if (priv->bss_type == MLAN_BSS_TYPE_STA) + woal_clear_conn_params(priv); + priv->channel = 0; + + LEAVE(); + return 0; +} + +/** + * @brief Request the driver to get the station information + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param mac MAC address of the station + * @param sinfo A pointer to station_info structure + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const t_u8 *mac, +#else + t_u8 *mac, +#endif + struct station_info *sinfo) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + + ENTER(); + +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + LEAVE(); + return woal_uap_cfg80211_get_station(wiphy, dev, mac, sinfo); + } +#endif +#endif + if (priv->media_connected == MFALSE) { + PRINTM(MINFO, "cfg80211: Media not connected!\n"); + LEAVE(); + return -ENOENT; + } + if (memcmp(mac, priv->cfg_bssid, ETH_ALEN)) { + PRINTM(MINFO, "cfg80211: Request not for this station!\n"); + LEAVE(); + return -ENOENT; + } + + if (MLAN_STATUS_SUCCESS != woal_cfg80211_dump_station_info(priv, sinfo)) { + PRINTM(MERROR, "cfg80211: Failed to get station info\n"); + ret = -EFAULT; + } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)|| defined(COMPAT_WIRELESS) + woal_check_auto_tdls(wiphy, dev); +#endif + LEAVE(); + return ret; +} + +/** + * @brief Request the driver to dump the station information + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param idx Station index + * @param mac MAC address of the station + * @param sinfo A pointer to station_info structure + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_dump_station(struct wiphy *wiphy, + struct net_device *dev, int idx, + t_u8 *mac, struct station_info *sinfo) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + + ENTER(); + + if (!priv->media_connected || idx != 0) { + PRINTM(MINFO, + "cfg80211: Media not connected or not for this station!\n"); + LEAVE(); + return -ENOENT; + } + + memcpy(mac, priv->cfg_bssid, ETH_ALEN); + + if (MLAN_STATUS_SUCCESS != woal_cfg80211_dump_station_info(priv, sinfo)) { + PRINTM(MERROR, "cfg80211: Failed to get station info\n"); + ret = -EFAULT; + } + + LEAVE(); + return ret; +} + +/** + * @brief Request the driver to dump survey info + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param idx Station index + * @param survey A pointer to survey_info structure + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_dump_survey(struct wiphy *wiphy, struct net_device *dev, + int idx, struct survey_info *survey) +{ + int ret = -ENOENT; + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + mlan_bss_info bss_info; + enum ieee80211_band band; + + ChanStatistics_t *pchan_stats = NULL; + mlan_scan_resp scan_resp; + + ENTER(); + PRINTM(MIOCTL, "dump_survey idx=%d\n", idx); + if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) && priv->media_connected + && idx == 0) { + memset(&bss_info, 0, sizeof(bss_info)); + if (MLAN_STATUS_SUCCESS != + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info)) { + ret = -EFAULT; + goto done; + } + band = woal_band_cfg_to_ieee_band(bss_info.bss_band); + survey->channel = + ieee80211_get_channel(wiphy, + ieee80211_channel_to_frequency + (bss_info.bss_chan +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) || defined(COMPAT_WIRELESS) + , band +#endif + )); + + if (bss_info.bcn_nf_last) { + survey->filled = SURVEY_INFO_NOISE_DBM; + survey->noise = bss_info.bcn_nf_last; + } + ret = 0; + } else { + memset(&scan_resp, 0, sizeof(scan_resp)); + if (MLAN_STATUS_SUCCESS != woal_get_scan_table(priv, + MOAL_IOCTL_WAIT, + &scan_resp)) { + ret = -EFAULT; + goto done; + } + pchan_stats = (ChanStatistics_t *)scan_resp.pchan_stats; + if (idx >= scan_resp.num_in_chan_stats) + goto done; + if (!pchan_stats[idx].cca_scan_duration) + goto done; + ret = 0; + memset(survey, 0, sizeof(struct survey_info)); + band = woal_band_cfg_to_ieee_band(pchan_stats[idx].bandconfig); + survey->channel = + ieee80211_get_channel(wiphy, + ieee80211_channel_to_frequency + (pchan_stats[idx].chan_num +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) || defined(COMPAT_WIRELESS) + , band +#endif + )); + survey->filled = SURVEY_INFO_NOISE_DBM; + survey->noise = pchan_stats[idx].noise; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0) + survey->filled |= SURVEY_INFO_TIME | SURVEY_INFO_TIME_BUSY; + survey->time = pchan_stats[idx].cca_scan_duration; + survey->time_busy = pchan_stats[idx].cca_busy_duration; +#else + survey->filled |= + SURVEY_INFO_CHANNEL_TIME | + SURVEY_INFO_CHANNEL_TIME_BUSY; + survey->channel_time = pchan_stats[idx].cca_scan_duration; + survey->channel_time_busy = pchan_stats[idx].cca_busy_duration; +#endif +#endif + } +done: + LEAVE(); + return ret; +} + +/** + * @brief Request the driver to Join the specified + * IBSS (or create if necessary) + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param params A pointer to cfg80211_ibss_params structure + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, + struct cfg80211_ibss_params *params) +{ + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + int ret = 0; + + ENTER(); + + if (priv->wdev->iftype != NL80211_IFTYPE_ADHOC) { + PRINTM(MERROR, + "Request IBSS join received when station not in ibss mode\n"); + LEAVE(); + return -EINVAL; + } + + ret = woal_cfg80211_assoc(priv, (void *)params, MOAL_IOCTL_WAIT); + + if (!ret) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) + cfg80211_ibss_joined(priv->netdev, priv->cfg_bssid, + params->chandef.chan, GFP_KERNEL); +#else + cfg80211_ibss_joined(priv->netdev, priv->cfg_bssid, GFP_KERNEL); +#endif + PRINTM(MINFO, "Joined/created adhoc network with bssid" + MACSTR " successfully\n", MAC2STR(priv->cfg_bssid)); + } else { + PRINTM(MINFO, "Failed creating/joining adhoc network\n"); + memset(priv->cfg_bssid, 0, ETH_ALEN); + } + + LEAVE(); + return ret; +} + +/** + * @brief Request the driver to leave the IBSS + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev) +{ + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + + ENTER(); + + if (priv->cfg_disconnect) { + PRINTM(MERROR, "IBSS leave already in progress\n"); + LEAVE(); + return -EBUSY; + } + + if (priv->media_connected == MFALSE) { + LEAVE(); + return -EINVAL; + } + + priv->cfg_disconnect = 1; + + PRINTM(MINFO, "Leaving from IBSS " MACSTR "\n", + MAC2STR(priv->cfg_bssid)); + if (woal_disconnect(priv, MOAL_IOCTL_WAIT, priv->cfg_bssid) != + MLAN_STATUS_SUCCESS) { + LEAVE(); + return -EFAULT; + } + + memset(priv->cfg_bssid, 0, ETH_ALEN); + + LEAVE(); + return 0; +} + +/** + * @brief Request the driver to change the IEEE power save + * mdoe + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param enabled Enable or disable + * @param timeout Timeout value + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_set_power_mgmt(struct wiphy *wiphy, + struct net_device *dev, bool enabled, int timeout) +{ + int ret = 0, disabled; + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + + ENTER(); + if (hw_test || (ps_mode == MLAN_INIT_PARA_DISABLED)) { + PRINTM(MIOCTL, "block set power hw_test=%d ps_mode=%d\n", + hw_test, ps_mode); + LEAVE(); + return -EFAULT; + } + priv->phandle->driver_state = woal_check_driver_status(priv->phandle); + if (priv->phandle->driver_state) { + PRINTM(MERROR, + "Block woal_cfg80211_set_power_mgmt in abnormal driver state\n"); + LEAVE(); + return 0; + } +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) { + PRINTM(MIOCTL, "skip set power for p2p interface\n"); + LEAVE(); + return ret; + } +#endif +#endif + if (enabled) + disabled = 0; + else + disabled = 1; + + if (MLAN_STATUS_SUCCESS != + woal_set_get_power_mgmt(priv, MLAN_ACT_SET, &disabled, timeout, + MOAL_IOCTL_WAIT)) { + ret = -EOPNOTSUPP; + } + + LEAVE(); + return ret; +} + +/** + * @brief Request the driver to change the transmit power + * + * @param wiphy A pointer to wiphy structure + * @param type TX power adjustment type + * @param dbm TX power in dbm + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_set_tx_power(struct wiphy *wiphy, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) + struct wireless_dev *wdev, +#endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) && !defined(COMPAT_WIRELESS) + enum tx_power_setting type, +#else + enum nl80211_tx_power_setting type, +#endif + int dbm) +{ + int ret = 0; + moal_private *priv = NULL; + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); + mlan_power_cfg_t power_cfg; + + ENTER(); + + priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY); + if (!priv) { + PRINTM(MFATAL, "Unable to get priv in %s()\n", __func__); + LEAVE(); + return -EFAULT; + } + + if (type) { + power_cfg.is_power_auto = 0; + power_cfg.power_level = dbm; + } else + power_cfg.is_power_auto = 1; + + if (MLAN_STATUS_SUCCESS != + woal_set_get_tx_power(priv, MLAN_ACT_SET, &power_cfg)) + ret = -EFAULT; + + LEAVE(); + return ret; +} + +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35) || defined(COMPAT_WIRELESS) +/** + * CFG802.11 operation handler for connection quality monitoring. + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param rssi_thold rssi threshold + * @param rssi_hyst rssi hysteresis + */ +static int +woal_cfg80211_set_cqm_rssi_config(struct wiphy *wiphy, + struct net_device *dev, + s32 rssi_thold, u32 rssi_hyst) +{ + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + ENTER(); + priv->cqm_rssi_thold = rssi_thold; + priv->cqm_rssi_hyst = rssi_hyst; + + PRINTM(MIOCTL, "rssi_thold=%d rssi_hyst=%d\n", + (int)rssi_thold, (int)rssi_hyst); + woal_set_rssi_threshold(priv, 0, MOAL_IOCTL_WAIT); + LEAVE(); + return 0; +} +#endif + +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION +/** + * @brief remain on channel config + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param cancel cancel remain on channel flag + * @param status A pointer to status, success, in process or reject + * @param chan A pointer to ieee80211_channel structure + * @param channel_type channel_type, + * @param duration Duration wait to receive frame + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_remain_on_channel_cfg(moal_private *priv, + t_u8 wait_option, t_u8 remove, t_u8 *status, + struct ieee80211_channel *chan, + enum nl80211_channel_type channel_type, + t_u32 duration) +{ + mlan_ds_remain_chan chan_cfg; + int ret = 0; + + ENTER(); + + if (!status || (!chan && !remove)) { + LEAVE(); + return -EFAULT; + } + memset(&chan_cfg, 0, sizeof(mlan_ds_remain_chan)); + if (remove) { + chan_cfg.remove = MTRUE; + } else { + if (priv->phandle->is_go_timer_set) { + PRINTM(MINFO, + "block remain on channel while go timer is on\n"); + LEAVE(); + return -EBUSY; + } + if (chan->band == IEEE80211_BAND_2GHZ) + chan_cfg.bandcfg = 0; + else if (chan->band == IEEE80211_BAND_5GHZ) + chan_cfg.bandcfg = 1; + switch (channel_type) { + case NL80211_CHAN_HT40MINUS: + chan_cfg.bandcfg |= SEC_CHANNEL_BELOW; + break; + case NL80211_CHAN_HT40PLUS: + chan_cfg.bandcfg |= SEC_CHANNEL_ABOVE; + break; + + case NL80211_CHAN_NO_HT: + case NL80211_CHAN_HT20: + default: + break; + } + chan_cfg.channel = + ieee80211_frequency_to_channel(chan->center_freq); + chan_cfg.remain_period = duration; + } + if (MLAN_STATUS_SUCCESS == + woal_set_remain_channel_ioctl(priv, wait_option, &chan_cfg)) + *status = chan_cfg.status; + else + ret = -EFAULT; + LEAVE(); + return ret; +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) +/** + * @brief tx mgmt frame + * + * @param wiphy A pointer to wiphy structure + * @param wdev A pointer to wireless_dev structure + * @param cookie A pointer to frame cookie + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_mgmt_tx_cancel_wait(struct wiphy *wiphy, + struct wireless_dev *wdev, u64 cookie) +#else +/** + * @brief tx mgmt frame + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param cookie A pointer to frame cookie + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_mgmt_tx_cancel_wait(struct wiphy *wiphy, + struct net_device *dev, u64 cookie) +#endif +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) + struct net_device *dev = wdev->netdev; +#endif + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + int ret = 0; + t_u8 status = 1; + moal_private *remain_priv = NULL; + + ENTER(); + + if (priv->phandle->remain_on_channel) { + remain_priv = + priv->phandle->priv[priv->phandle->remain_bss_index]; + if (!remain_priv) { + PRINTM(MERROR, + "mgmt_tx_cancel_wait: Wrong remain_bss_index=%d\n", + priv->phandle->remain_bss_index); + ret = -EFAULT; + goto done; + } + if (woal_cfg80211_remain_on_channel_cfg + (remain_priv, MOAL_IOCTL_WAIT, MTRUE, &status, NULL, 0, + 0)) { + PRINTM(MERROR, + "mgmt_tx_cancel_wait: Fail to cancel remain on channel\n"); + ret = -EFAULT; + goto done; + } + if (priv->phandle->cookie) { + cfg80211_remain_on_channel_expired( +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + remain_priv-> + netdev, +#else + remain_priv-> + wdev, +#endif + priv-> + phandle-> + cookie, + &priv-> + phandle->chan, +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + priv-> + phandle-> + channel_type, +#endif + GFP_ATOMIC); + priv->phandle->cookie = 0; + } + priv->phandle->remain_on_channel = MFALSE; + } + +done: + LEAVE(); + return ret; +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) +/** + * @brief Make chip remain on channel + * + * @param wiphy A pointer to wiphy structure + * @param wdev A pointer to wireless_dev structure + * @param chan A pointer to ieee80211_channel structure + * @param channel_type Channel type + * @param duration Duration for timer + * @param cookie A pointer to timer cookie + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_remain_on_channel(struct wiphy *wiphy, + struct wireless_dev *wdev, + struct ieee80211_channel *chan, +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + enum nl80211_channel_type channel_type, +#endif + unsigned int duration, u64 * cookie) +#else +/** + * @brief Make chip remain on channel + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param chan A pointer to ieee80211_channel structure + * @param channel_type Channel type + * @param duration Duration for timer + * @param cookie A pointer to timer cookie + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_remain_on_channel(struct wiphy *wiphy, + struct net_device *dev, + struct ieee80211_channel *chan, + enum nl80211_channel_type channel_type, + unsigned int duration, u64 * cookie) +#endif +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) + struct net_device *dev = wdev->netdev; +#endif + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + int ret = 0; + t_u8 status = 1; + moal_private *remain_priv = NULL; + + ENTER(); + + if (!chan || !cookie) { + PRINTM(MERROR, "Invalid parameter for remain on channel\n"); + ret = -EFAULT; + goto done; + } + /** cancel previous remain on channel */ + if (priv->phandle->remain_on_channel && + ((priv->phandle->chan.center_freq != chan->center_freq) + )) { + remain_priv = + priv->phandle->priv[priv->phandle->remain_bss_index]; + if (!remain_priv) { + PRINTM(MERROR, + "remain_on_channel: Wrong remain_bss_index=%d\n", + priv->phandle->remain_bss_index); + ret = -EFAULT; + goto done; + } + if (woal_cfg80211_remain_on_channel_cfg + (remain_priv, MOAL_IOCTL_WAIT, MTRUE, &status, NULL, 0, + 0)) { + PRINTM(MERROR, + "remain_on_channel: Fail to cancel remain on channel\n"); + ret = -EFAULT; + goto done; + } + priv->phandle->cookie = 0; + priv->phandle->remain_on_channel = MFALSE; + } + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_remain_on_channel_cfg(priv, MOAL_IOCTL_WAIT, + MFALSE, &status, chan, +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + channel_type, +#else + 0, +#endif + (t_u32)duration)) { + ret = -EFAULT; + goto done; + } + + if (status) { + PRINTM(MMSG, + "%s: Set remain on Channel: channel=%d with status=%d\n", + dev->name, + ieee80211_frequency_to_channel(chan->center_freq), + status); + if (!priv->phandle->remain_on_channel) { + priv->phandle->is_remain_timer_set = MTRUE; + woal_mod_timer(&priv->phandle->remain_timer, duration); + } + } + + /* remain on channel operation success */ + /* we need update the value cookie */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + *cookie = (u64) random32() | 1; +#else + *cookie = (u64) prandom_u32() | 1; +#endif + priv->phandle->remain_on_channel = MTRUE; + priv->phandle->remain_bss_index = priv->bss_index; + priv->phandle->cookie = *cookie; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + priv->phandle->channel_type = channel_type; +#endif + memcpy(&priv->phandle->chan, chan, sizeof(struct ieee80211_channel)); + + if (status == 0) + PRINTM(MIOCTL, + "%s: Set remain on Channel: channel=%d cookie = %#llx\n", + dev->name, + ieee80211_frequency_to_channel(chan->center_freq), + priv->phandle->cookie); + + cfg80211_ready_on_channel( +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + dev, +#else + priv->wdev, +#endif + *cookie, chan, +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + channel_type, +#endif + duration, GFP_KERNEL); + +done: + LEAVE(); + return ret; +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) +/** + * @brief Cancel remain on channel + * + * @param wiphy A pointer to wiphy structure + * @param wdev A pointer to wireless_dev structure + * @param cookie A pointer to timer cookie + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy, + struct wireless_dev *wdev, u64 cookie) +#else +/** + * @brief Cancel remain on channel + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param cookie A pointer to timer cookie + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy, + struct net_device *dev, u64 cookie) +#endif +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) + struct net_device *dev = wdev->netdev; +#endif + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + moal_private *remain_priv = NULL; + int ret = 0; + t_u8 status = 1; + + ENTER(); + PRINTM(MIOCTL, "Cancel remain on Channel: cookie = %#llx\n", cookie); + remain_priv = priv->phandle->priv[priv->phandle->remain_bss_index]; + if (!remain_priv) { + PRINTM(MERROR, + "cancel_remain_on_channel: Wrong remain_bss_index=%d\n", + priv->phandle->remain_bss_index); + ret = -EFAULT; + goto done; + } + if (woal_cfg80211_remain_on_channel_cfg + (remain_priv, MOAL_IOCTL_WAIT, MTRUE, &status, NULL, 0, 0)) { + PRINTM(MERROR, + "cancel_remain_on_channel: Fail to cancel remain on channel\n"); + ret = -EFAULT; + goto done; + } + + priv->phandle->remain_on_channel = MFALSE; + if (priv->phandle->cookie) + priv->phandle->cookie = 0; +done: + LEAVE(); + return ret; +} +#endif /* KERNEL_VERSION */ +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) +/** + * @brief start sched scan + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param request A pointer to struct cfg80211_sched_scan_request + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_sched_scan_start(struct wiphy *wiphy, + struct net_device *dev, + struct cfg80211_sched_scan_request *request) +{ + struct ieee80211_channel *chan = NULL; + int i = 0; + int ret = 0; + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + struct cfg80211_ssid *ssid = NULL; + ENTER(); +#ifdef UAP_CFG80211 + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) { + LEAVE(); + return -EFAULT; + } +#endif + + memset(&priv->scan_cfg, 0, sizeof(priv->scan_cfg)); + if ((!request || !request->n_ssids || !request->n_match_sets)) { + PRINTM(MERROR, "Invalid sched_scan req parameter\n"); + LEAVE(); + return -EINVAL; + } + PRINTM(MIOCTL, + "%s sched scan: n_ssids=%d n_match_sets=%d n_channels=%d interval=%d ie_len=%d\n", + priv->netdev->name, request->n_ssids, request->n_match_sets, + request->n_channels, request->interval, (int)request->ie_len); + /** We have pending scan, start bgscan later */ + if (priv->phandle->scan_pending_on_block) + priv->scan_cfg.start_later = MTRUE; + for (i = 0; i < request->n_match_sets; i++) { + ssid = &request->match_sets[i].ssid; + strncpy(priv->scan_cfg.ssid_list[i].ssid, ssid->ssid, + ssid->ssid_len); + priv->scan_cfg.ssid_list[i].max_len = 0; + PRINTM(MIOCTL, "sched scan: ssid=%s\n", ssid->ssid); + } + for (i = 0; i < MIN(WLAN_BG_SCAN_CHAN_MAX, request->n_channels); i++) { + chan = request->channels[i]; + priv->scan_cfg.chan_list[i].chan_number = chan->hw_value; + priv->scan_cfg.chan_list[i].radio_type = chan->band; + if (chan-> + flags & (IEEE80211_CHAN_PASSIVE_SCAN | + IEEE80211_CHAN_RADAR)) + priv->scan_cfg.chan_list[i].scan_type = + MLAN_SCAN_TYPE_PASSIVE; + else + priv->scan_cfg.chan_list[i].scan_type = + MLAN_SCAN_TYPE_ACTIVE; + priv->scan_cfg.chan_list[i].scan_time = 0; +#ifdef WIFI_DIRECT_SUPPORT + if (priv->phandle->miracast_mode) + priv->scan_cfg.chan_list[i].scan_time = + priv->phandle->miracast_scan_time; +#endif + } + priv->scan_cfg.chan_per_scan = + MIN(WLAN_BG_SCAN_CHAN_MAX, request->n_channels); + + /** set scan request IES */ + if (request->ie && request->ie_len) { + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_mgmt_frame_ie(priv, NULL, 0, + NULL, 0, NULL, 0, + (t_u8 *)request->ie, + request->ie_len, + MGMT_MASK_PROBE_REQ, + MOAL_IOCTL_WAIT)) { + PRINTM(MERROR, "Fail to set sched scan IE\n"); + ret = -EFAULT; + goto done; + } + } else { + /** Clear SCAN IE in Firmware */ + if (priv->probereq_index != MLAN_CUSTOM_IE_AUTO_IDX_MASK) + woal_cfg80211_mgmt_frame_ie(priv, NULL, 0, NULL, 0, + NULL, 0, NULL, 0, + MGMT_MASK_PROBE_REQ, + MOAL_IOCTL_WAIT); + } + + /* Interval between scan cycles in milliseconds,supplicant set to 10 + second */ + /* We want to use 30 second for per scan cycle */ + priv->scan_cfg.scan_interval = MIN_BGSCAN_INTERVAL; + if (request->interval > MIN_BGSCAN_INTERVAL) + priv->scan_cfg.scan_interval = request->interval; + + priv->scan_cfg.repeat_count = DEF_REPEAT_COUNT; + priv->scan_cfg.report_condition = + BG_SCAN_SSID_MATCH | BG_SCAN_WAIT_ALL_CHAN_DONE; + priv->scan_cfg.bss_type = MLAN_BSS_MODE_INFRA; + priv->scan_cfg.action = BG_SCAN_ACT_SET; + priv->scan_cfg.enable = MTRUE; +#ifdef WIFI_DIRECT_SUPPORT + if (priv->phandle->miracast_mode) + priv->scan_cfg.scan_chan_gap = priv->phandle->scan_chan_gap; + else + priv->scan_cfg.scan_chan_gap = 0; +#endif + + if (MLAN_STATUS_SUCCESS == + woal_request_bgscan(priv, MOAL_IOCTL_WAIT, &priv->scan_cfg)) { + priv->sched_scanning = MTRUE; + priv->bg_scan_start = MTRUE; + priv->bg_scan_reported = MFALSE; + } else + ret = -EFAULT; +done: + LEAVE(); + return ret; +} + +/** + * @brief stop sched scan + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_sched_scan_stop(struct wiphy *wiphy, struct net_device *dev) +{ + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + ENTER(); + PRINTM(MIOCTL, "sched scan stop\n"); + priv->sched_scanning = MFALSE; + woal_stop_bg_scan(priv, MOAL_NO_WAIT); + priv->bg_scan_start = MFALSE; + priv->bg_scan_reported = MFALSE; + LEAVE(); + return 0; +} +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) +/** + * @brief cfg80211_resume handler + * + * @param wiphy A pointer to wiphy structure + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_resume(struct wiphy *wiphy) +{ + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); + int i; + for (i = 0; i < MIN(handle->priv_num, MLAN_MAX_BSS_NUM); i++) { + if (handle->priv[i] && + (GET_BSS_ROLE(handle->priv[i]) == MLAN_BSS_ROLE_STA)) { + if ((handle->priv[i]->last_event & EVENT_BG_SCAN_REPORT) + && handle->priv[i]->sched_scanning) { + woal_inform_bss_from_scan_result(handle-> + priv[i], NULL, + MOAL_CMD_WAIT); + cfg80211_sched_scan_results(handle->priv[i]-> + wdev->wiphy); + handle->priv[i]->last_event = 0; + PRINTM(MIOCTL, + "Report sched scan result in cfg80211 resume\n"); + } + } + } + handle->cfg80211_suspend = MFALSE; + PRINTM(MIOCTL, "woal_cfg80211_resume\n"); + return 0; +} + +/** + * @brief cfg80211_suspend handler + * + * @param wiphy A pointer to wiphy structure + * @param wow A pointer to cfg80211_wowlan + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_suspend(struct wiphy *wiphy, struct cfg80211_wowlan *wow) +{ + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); + int i; + for (i = 0; i < MIN(handle->priv_num, MLAN_MAX_BSS_NUM); i++) { + if (handle->priv[i] && + (GET_BSS_ROLE(handle->priv[i]) == MLAN_BSS_ROLE_STA)) { + if (handle->scan_request) { + PRINTM(MIOCTL, + "Cancel pending scan in woal_cfg80211_suspend\n"); + woal_cancel_scan(handle->priv[i], + MOAL_IOCTL_WAIT); + } + handle->priv[i]->last_event = 0; + } + } + PRINTM(MIOCTL, "woal_cfg80211_suspended\n"); + handle->cfg80211_suspend = MTRUE; + return 0; +} +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0) +static void +woal_cfg80211_set_wakeup(struct wiphy *wiphy, bool enabled) +{ + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); + + device_set_wakeup_enable(handle->hotplug_device, enabled); +} +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) || defined(COMPAT_WIRELESS) +/** + * @brief TDLS operation ioctl handler + * + * @param priv A pointer to moal_private structure + * @param peer A pointer to peer mac + * @apram action action for TDLS + * @return 0 --success, otherwise fail + */ +static int +woal_tdls_oper(moal_private *priv, u8 *peer, t_u8 action) +{ + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_misc_cfg *misc = NULL; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; + misc->sub_command = MLAN_OID_MISC_TDLS_OPER; + ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; + ioctl_req->action = MLAN_ACT_SET; + misc->param.tdls_oper.tdls_action = action; + memcpy(misc->param.tdls_oper.peer_mac, peer, ETH_ALEN); + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief TDLS operation ioctl handler + * + * @param priv A pointer to moal_private structure + * @param peer A pointer to peer mac + * @param tdls_ies A pointer to mlan_ds_misc_tdls_ies structure + * @param flags TDLS ie flags + * + * @return 0 --success, otherwise fail + */ +static int +woal_tdls_get_ies(moal_private *priv, u8 *peer, mlan_ds_misc_tdls_ies *tdls_ies, + t_u16 flags) +{ + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_misc_cfg *misc = NULL; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; + misc->sub_command = MLAN_OID_MISC_GET_TDLS_IES; + ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; + ioctl_req->action = MLAN_ACT_GET; + misc->param.tdls_ies.flags = flags; + memcpy(misc->param.tdls_ies.peer_mac, peer, ETH_ALEN); + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (tdls_ies) + memcpy(tdls_ies, &misc->param.tdls_ies, + sizeof(mlan_ds_misc_tdls_ies)); +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief append tdls ext_capability + * + * @param skb A pointer to sk_buff structure + * + * @return N/A + */ +static void +woal_tdls_add_ext_capab(struct sk_buff *skb, mlan_ds_misc_tdls_ies *tdls_ies) +{ + u8 *pos = NULL; + if (tdls_ies->ext_cap[0] == WLAN_EID_EXT_CAPABILITY) { + pos = (void *)skb_put(skb, sizeof(IEEEtypes_ExtCap_t)); + memcpy(pos, tdls_ies->ext_cap, sizeof(IEEEtypes_ExtCap_t)); + } else { + PRINTM(MERROR, "Fail to append tdls ext_capability\n"); + } +} + +/** + * @brief append supported rates + * + * @param priv A pointer to moal_private structure + * @param skb A pointer to sk_buff structure + * @param band AP's band + * + * @return N/A + */ +static void +woal_add_supported_rates_ie(moal_private *priv, struct sk_buff *skb, + enum ieee80211_band band) +{ + t_u8 basic_rates[] = { + 0x82, 0x84, 0x8b, 0x96, + 0x0c, 0x12, 0x18, 0x24 + }; + t_u8 basic_rates_5G[] = { + 0x0c, 0x12, 0x18, 0x24, + 0x30, 0x48, 0x60, 0x6c + }; + t_u8 *pos; + t_u8 rate_num = 0; + if (band == IEEE80211_BAND_2GHZ) + rate_num = sizeof(basic_rates); + else + rate_num = sizeof(basic_rates_5G); + + if (skb_tailroom(skb) < rate_num + 2) + return; + + pos = skb_put(skb, rate_num + 2); + *pos++ = WLAN_EID_SUPP_RATES; + *pos++ = rate_num; + if (band == IEEE80211_BAND_2GHZ) + memcpy(pos, basic_rates, rate_num); + else + memcpy(pos, basic_rates_5G, rate_num); + return; +} + +/** + * @brief append ext_supported rates + * + * @param priv A pointer to moal_private structure + * @param skb A pointer to sk_buff structure + * @param band AP's band + * + * @return N/A + */ +static void +woal_add_ext_supported_rates_ie(moal_private *priv, struct sk_buff *skb, + enum ieee80211_band band) +{ + t_u8 ext_rates[] = { 0x0c, 0x12, 0x18, 0x60 }; + t_u8 *pos; + t_u8 rate_num = sizeof(ext_rates); + + if (band != IEEE80211_BAND_2GHZ) + return; + + if (skb_tailroom(skb) < rate_num + 2) + return; + + pos = skb_put(skb, rate_num + 2); + *pos++ = WLAN_EID_EXT_SUPP_RATES; + *pos++ = rate_num; + memcpy(pos, ext_rates, rate_num); + return; +} + +/** + * @brief append wmm ie + * + * @param priv A pointer to moal_private structure + * @param skb A pointer to sk_buff structure + * @param wmm_type WMM_TYPE_INFO/WMM_TYPE_PARAMETER + * + * @return N/A + */ +static void +woal_add_wmm_ie(moal_private *priv, struct sk_buff *skb, t_u8 wmm_type) +{ + t_u8 wmmInfoElement[] = { 0x00, 0x50, 0xf2, + 0x02, 0x00, 0x01 + }; + t_u8 wmmParamElement[] = { 0x00, 0x50, 0xf2, + 0x02, 0x01, 0x01 + }; + t_u8 ac_vi[] = { 0x42, 0x43, 0x5e, 0x00 }; + t_u8 ac_vo[] = { 0x62, 0x32, 0x2f, 0x00 }; + t_u8 ac_be[] = { 0x03, 0xa4, 0x00, 0x00 }; + t_u8 ac_bk[] = { 0x27, 0xa4, 0x00, 0x00 }; + t_u8 qosInfo = 0x0; + t_u8 reserved = 0; + t_u8 wmm_id = 221; + t_u8 wmmParamIe_len = 24; + t_u8 wmmInfoIe_len = 7; + t_u8 len = 0; + t_u8 *pos; + + if (skb_tailroom(skb) < wmmParamIe_len + 2) + return; + + qosInfo = 0xf; + /* wmm parameter */ + if (wmm_type == WMM_TYPE_PARAMETER) { + pos = skb_put(skb, wmmParamIe_len + 2); + len = wmmParamIe_len; + } else { + pos = skb_put(skb, wmmInfoIe_len + 2); + len = wmmInfoIe_len; + } + + *pos++ = wmm_id; + *pos++ = len; + /* wmm parameter */ + if (wmm_type == WMM_TYPE_PARAMETER) { + memcpy(pos, wmmParamElement, sizeof(wmmParamElement)); + pos += sizeof(wmmParamElement); + } else { + memcpy(pos, wmmInfoElement, sizeof(wmmInfoElement)); + pos += sizeof(wmmInfoElement); + } + *pos++ = qosInfo; + /* wmm parameter */ + if (wmm_type == WMM_TYPE_PARAMETER) { + *pos++ = reserved; + memcpy(pos, ac_be, sizeof(ac_be)); + pos += sizeof(ac_be); + memcpy(pos, ac_bk, sizeof(ac_bk)); + pos += sizeof(ac_bk); + memcpy(pos, ac_vi, sizeof(ac_vi)); + pos += sizeof(ac_vi); + memcpy(pos, ac_vo, sizeof(ac_vo)); + } + return; +} + +/** + * @brief update tdls peer status + * + * @param priv A pointer to moal_private structure + * @param peer_addr A point to peer mac address + * @param link_status link status + * + * @return N/A +*/ +t_void +woal_updata_peer_status(moal_private *priv, t_u8 *peer_addr, + tdlsStatus_e link_status) +{ + struct tdls_peer *peer = NULL; + unsigned long flags; + if (priv && priv->enable_auto_tdls) { + spin_lock_irqsave(&priv->tdls_lock, flags); + list_for_each_entry(peer, &priv->tdls_list, link) { + if (!memcmp(peer->peer_addr, peer_addr, ETH_ALEN)) { + if ((link_status == TDLS_NOT_SETUP) && + (peer->link_status == + TDLS_SETUP_INPROGRESS)) + peer->num_failure++; + else if (link_status == TDLS_SETUP_COMPLETE) + peer->num_failure = 0; + peer->link_status = link_status; + break; + } + } + spin_unlock_irqrestore(&priv->tdls_lock, flags); + } +} + +/** + * @brief add tdls peer + * + * @param priv A pointer to moal_private structure + * @param peer A point to peer address + * + * @return N/A +*/ +t_void +woal_add_tdls_peer(moal_private *priv, t_u8 *peer) +{ + struct tdls_peer *tdls_peer = NULL; + unsigned long flags; + t_u8 find_peer = MFALSE; + if (priv && priv->enable_auto_tdls) { + spin_lock_irqsave(&priv->tdls_lock, flags); + list_for_each_entry(tdls_peer, &priv->tdls_list, link) { + if (!memcmp(tdls_peer->peer_addr, peer, ETH_ALEN)) { + tdls_peer->link_status = TDLS_SETUP_INPROGRESS; + tdls_peer->rssi_jiffies = jiffies; + find_peer = MTRUE; + break; + } + } + if (!find_peer) { + /* create new TDLS peer */ + tdls_peer = + kzalloc(sizeof(struct tdls_peer), GFP_ATOMIC); + if (tdls_peer) { + memcpy(tdls_peer->peer_addr, peer, ETH_ALEN); + tdls_peer->link_status = TDLS_SETUP_INPROGRESS; + tdls_peer->rssi_jiffies = jiffies; + INIT_LIST_HEAD(&tdls_peer->link); + list_add_tail(&tdls_peer->link, + &priv->tdls_list); + PRINTM(MCMND, + "Add to TDLS list: peer=" MACSTR "\n", + MAC2STR(peer)); + } + } + spin_unlock_irqrestore(&priv->tdls_lock, flags); + } +} + +/** + * @brief check auto tdls + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * + * @return N/A +*/ +void +woal_check_auto_tdls(struct wiphy *wiphy, struct net_device *dev) +{ + t_u8 bcast_addr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + struct tdls_peer *tdls_peer = NULL; + unsigned long flags; + t_u8 tdls_discovery = MFALSE; + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + + ENTER(); + if (priv && priv->enable_auto_tdls) { + priv->tdls_check_tx = MFALSE; + spin_lock_irqsave(&priv->tdls_lock, flags); + list_for_each_entry(tdls_peer, &priv->tdls_list, link) { + if ((jiffies - tdls_peer->rssi_jiffies) > + TDLS_IDLE_TIME) { + tdls_peer->rssi = 0; + if (tdls_peer->num_failure < + TDLS_MAX_FAILURE_COUNT) + tdls_discovery = MTRUE; + } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) + if (tdls_peer->rssi && + (tdls_peer->rssi >= TDLS_RSSI_LOW_THRESHOLD)) { + if (tdls_peer->link_status == + TDLS_SETUP_COMPLETE) { + tdls_peer->link_status = TDLS_TEAR_DOWN; + PRINTM(MMSG, + "Wlan: Tear down TDLS link, peer=" + MACSTR " rssi=%d\n", + MAC2STR(tdls_peer->peer_addr), + -tdls_peer->rssi); + cfg80211_tdls_oper_request(dev, + tdls_peer-> + peer_addr, + NL80211_TDLS_TEARDOWN, + TDLS_TEARN_DOWN_REASON_UNSPECIFIC, + GFP_ATOMIC); + } + } else if (tdls_peer->rssi && + (tdls_peer->rssi <= + TDLS_RSSI_HIGH_THRESHOLD)) { + if ((tdls_peer->link_status == TDLS_NOT_SETUP) + && (tdls_peer->num_failure < + TDLS_MAX_FAILURE_COUNT)) { + priv->tdls_check_tx = MTRUE; + PRINTM(MCMND, + "Wlan: Find TDLS peer=" MACSTR + " rssi=%d\n", + MAC2STR(tdls_peer->peer_addr), + -tdls_peer->rssi); + + } + } +#endif + } + spin_unlock_irqrestore(&priv->tdls_lock, flags); + } + if (tdls_discovery) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0) + woal_cfg80211_tdls_mgmt(wiphy, dev, bcast_addr, + TDLS_DISCOVERY_REQUEST, 1, 0, 0, 0, + NULL, 0); +#else + woal_cfg80211_tdls_mgmt(wiphy, dev, bcast_addr, + TDLS_DISCOVERY_REQUEST, 1, 0, 0, NULL, + 0); +#endif +#else + woal_cfg80211_tdls_mgmt(wiphy, dev, bcast_addr, + TDLS_DISCOVERY_REQUEST, 1, 0, NULL, 0); +#endif + LEAVE(); +} + +/** + * @brief woal construct tdls data frame + * + * @param priv A pointer to moal_private structure + * @param peer A pointer to peer mac + * @param action_code tdls action code + * @param dialog_token dialog_token + * @param status_code status_code + * @param skb skb buffer + * + * @return 0 -- success, otherwise fail + */ +static int +woal_construct_tdls_data_frame(moal_private *priv, + t_u8 *peer, t_u8 action_code, t_u8 dialog_token, + t_u16 status_code, struct sk_buff *skb) +{ + + struct ieee80211_tdls_data *tf; + t_u16 capability; + IEEEtypes_HTCap_t *HTcap; + IEEEtypes_HTInfo_t *HTInfo; + IEEEtypes_2040BSSCo_t *BSSCo; + IEEEtypes_VHTCap_t *VHTcap; + IEEEtypes_VHTOprat_t *vht_oprat; + IEEEtypes_AID_t *AidInfo; + mlan_ds_misc_tdls_ies *tdls_ies = NULL; + int ret = 0; + mlan_bss_info bss_info; + enum ieee80211_band band; + mlan_fw_info fw_info; + + ENTER(); + + memset(&bss_info, 0, sizeof(bss_info)); + if (MLAN_STATUS_SUCCESS != + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info)) { + PRINTM(MERROR, "Fail to get bss info\n"); + LEAVE(); + return -EFAULT; + } + band = woal_band_cfg_to_ieee_band(bss_info.bss_band); + tdls_ies = kzalloc(sizeof(mlan_ds_misc_tdls_ies), GFP_KERNEL); + if (!tdls_ies) { + PRINTM(MERROR, "Fail to alloc memory for tdls_ies\n"); + LEAVE(); + return -ENOMEM; + } + if (band == IEEE80211_BAND_2GHZ) + capability = 0x2421; + else + capability = 0; + + tf = (void *)skb_put(skb, offsetof(struct ieee80211_tdls_data, u)); + memcpy(tf->da, peer, ETH_ALEN); + memcpy(tf->sa, priv->current_addr, ETH_ALEN); + tf->ether_type = cpu_to_be16(MLAN_ETHER_PKT_TYPE_TDLS_ACTION); + tf->payload_type = WLAN_TDLS_SNAP_RFTYPE; + woal_request_get_fw_info(priv, MOAL_IOCTL_WAIT, &fw_info); + + switch (action_code) { + case WLAN_TDLS_SETUP_REQUEST: + if (fw_info.fw_bands & BAND_AAC) + woal_tdls_get_ies(priv, peer, tdls_ies, + TDLS_IE_FLAGS_EXTCAP | + TDLS_IE_FLAGS_HTCAP | + TDLS_IE_FLAGS_VHTCAP | + TDLS_IE_FLAGS_AID | + TDLS_IE_FLAGS_SUPP_CS_IE); + else + woal_tdls_get_ies(priv, peer, tdls_ies, + TDLS_IE_FLAGS_EXTCAP | + TDLS_IE_FLAGS_HTCAP | + TDLS_IE_FLAGS_SUPP_CS_IE); + + tf->category = WLAN_CATEGORY_TDLS; + tf->action_code = WLAN_TDLS_SETUP_REQUEST; + skb_put(skb, sizeof(tf->u.setup_req)); + tf->u.setup_req.dialog_token = dialog_token; + tf->u.setup_req.capability = cpu_to_le16(capability); + woal_add_supported_rates_ie(priv, skb, band); + woal_add_ext_supported_rates_ie(priv, skb, band); + break; + case WLAN_TDLS_SETUP_RESPONSE: + if (fw_info.fw_bands & BAND_AAC) + woal_tdls_get_ies(priv, peer, tdls_ies, + TDLS_IE_FLAGS_EXTCAP | + TDLS_IE_FLAGS_HTCAP | + TDLS_IE_FLAGS_VHTCAP | + TDLS_IE_FLAGS_AID | + TDLS_IE_FLAGS_SUPP_CS_IE); + else + woal_tdls_get_ies(priv, peer, tdls_ies, + TDLS_IE_FLAGS_EXTCAP | + TDLS_IE_FLAGS_HTCAP | + TDLS_IE_FLAGS_SUPP_CS_IE); + + tf->category = WLAN_CATEGORY_TDLS; + tf->action_code = WLAN_TDLS_SETUP_RESPONSE; + + skb_put(skb, sizeof(tf->u.setup_resp)); + tf->u.setup_resp.status_code = cpu_to_le16(status_code); + tf->u.setup_resp.dialog_token = dialog_token; + tf->u.setup_resp.capability = cpu_to_le16(capability); + + woal_add_supported_rates_ie(priv, skb, band); + woal_add_ext_supported_rates_ie(priv, skb, band); + break; + case WLAN_TDLS_SETUP_CONFIRM: + if (fw_info.fw_bands & BAND_AAC) + woal_tdls_get_ies(priv, peer, tdls_ies, + TDLS_IE_FLAGS_EXTCAP | + TDLS_IE_FLAGS_HTINFO | + TDLS_IE_FLAGS_VHTOPRAT); + else + woal_tdls_get_ies(priv, peer, tdls_ies, + TDLS_IE_FLAGS_EXTCAP | + TDLS_IE_FLAGS_HTINFO); + + tf->category = WLAN_CATEGORY_TDLS; + tf->action_code = WLAN_TDLS_SETUP_CONFIRM; + + skb_put(skb, sizeof(tf->u.setup_cfm)); + tf->u.setup_cfm.status_code = cpu_to_le16(status_code); + tf->u.setup_cfm.dialog_token = dialog_token; + + break; + case WLAN_TDLS_TEARDOWN: + tf->category = WLAN_CATEGORY_TDLS; + tf->action_code = WLAN_TDLS_TEARDOWN; + + skb_put(skb, sizeof(tf->u.teardown)); + tf->u.teardown.reason_code = cpu_to_le16(status_code); + break; + case WLAN_TDLS_DISCOVERY_REQUEST: + tf->category = WLAN_CATEGORY_TDLS; + tf->action_code = WLAN_TDLS_DISCOVERY_REQUEST; + + skb_put(skb, sizeof(tf->u.discover_req)); + tf->u.discover_req.dialog_token = dialog_token; + break; + default: + ret = -EINVAL; + goto done; + } + + if (action_code == WLAN_TDLS_SETUP_REQUEST || + action_code == WLAN_TDLS_SETUP_RESPONSE) { + woal_tdls_add_ext_capab(skb, tdls_ies); + } + + /* TODO we should fill in ht_cap and htinfo with correct value */ + switch (action_code) { + case WLAN_TDLS_SETUP_REQUEST: + case WLAN_TDLS_SETUP_RESPONSE: + /* HT capability */ + if (tdls_ies->ht_cap[0] == HT_CAPABILITY) { + HTcap = (void *)skb_put(skb, sizeof(IEEEtypes_HTCap_t)); + memset(HTcap, 0, sizeof(IEEEtypes_HTCap_t)); + memcpy(HTcap, tdls_ies->ht_cap, + sizeof(IEEEtypes_HTCap_t)); + } else { + PRINTM(MERROR, "Fail to append TDLS HT capability\n"); + } + + /* 20_40_bss_coexist */ + BSSCo = (void *)skb_put(skb, sizeof(IEEEtypes_2040BSSCo_t)); + memset(BSSCo, 0, sizeof(IEEEtypes_2040BSSCo_t)); + BSSCo->ieee_hdr.element_id = BSSCO_2040; + BSSCo->ieee_hdr.len = + sizeof(IEEEtypes_2040BSSCo_t) - + sizeof(IEEEtypes_Header_t); + BSSCo->bss_co_2040.bss_co_2040_value = 0x01; + + /* VHT capability */ + if (tdls_ies->vht_cap[0] == VHT_CAPABILITY) { + VHTcap = (void *)skb_put(skb, + sizeof(IEEEtypes_VHTCap_t)); + memset(VHTcap, 0, sizeof(IEEEtypes_VHTCap_t)); + memcpy(VHTcap, tdls_ies->vht_cap, + sizeof(IEEEtypes_VHTCap_t)); + } else { + PRINTM(MIOCTL, "NO TDLS VHT capability\n"); + } + /* AID info */ + if (tdls_ies->aid_info[0] == AID_INFO) { + AidInfo = (void *)skb_put(skb, sizeof(IEEEtypes_AID_t)); + memset(AidInfo, 0, sizeof(IEEEtypes_AID_t)); + memcpy(AidInfo, tdls_ies->aid_info, + sizeof(IEEEtypes_AID_t)); + } else { + PRINTM(MERROR, "Fail to appened TDLS AID info\n"); + } + break; + case WLAN_TDLS_SETUP_CONFIRM: + /* HT information */ + if (tdls_ies->ht_info[0] == HT_OPERATION) { + HTInfo = (void *)skb_put(skb, + sizeof(IEEEtypes_HTInfo_t)); + memset(HTInfo, 0, sizeof(IEEEtypes_HTInfo_t)); + memcpy(HTInfo, tdls_ies->ht_info, + sizeof(IEEEtypes_HTInfo_t)); + } else + PRINTM(MERROR, "Fail to append TDLS HT information\n"); + /** VHT operation */ + if (tdls_ies->vht_oprat[0] == VHT_OPERATION) { + vht_oprat = + (void *)skb_put(skb, + sizeof(IEEEtypes_VHTOprat_t)); + memset(vht_oprat, 0, sizeof(IEEEtypes_VHTOprat_t)); + memcpy(vht_oprat, tdls_ies->vht_oprat, + sizeof(IEEEtypes_VHTOprat_t)); + } else + PRINTM(MIOCTL, "NO TDLS VHT Operation IE\n"); + break; + default: + break; + } + + if (action_code == WLAN_TDLS_SETUP_REQUEST || + action_code == WLAN_TDLS_SETUP_RESPONSE) { + /* wmm info */ + woal_add_wmm_ie(priv, skb, WMM_TYPE_INFO); + } else if (action_code == WLAN_TDLS_SETUP_CONFIRM) { + /* wmm parameter */ + woal_add_wmm_ie(priv, skb, WMM_TYPE_PARAMETER); + } + +done: + kfree(tdls_ies); + return ret; +} + +/** + * @brief woal construct tdls action frame + * + * @param priv A pointer to moal_private structure + * @param peer A pointer to peer mac + * @param action_code tdls action code + * @param dialog_token dialog_token + * @param status_code status_code + * @param skb skb buffer + * + * @return 0 -- success, otherwise fail + */ +static int +woal_construct_tdls_action_frame(moal_private *priv, + t_u8 *peer, t_u8 action_code, + t_u8 dialog_token, t_u16 status_code, + struct sk_buff *skb) +{ + struct ieee80211_mgmt *mgmt; + t_u8 addr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + t_u16 capability; + t_u8 *pos = NULL; + mlan_ds_misc_tdls_ies *tdls_ies = NULL; + mlan_bss_info bss_info; + enum ieee80211_band band; + + int ret = 0; + + ENTER(); + + memset(&bss_info, 0, sizeof(bss_info)); + if (MLAN_STATUS_SUCCESS != + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info)) { + PRINTM(MERROR, "Fail to get bss info\n"); + LEAVE(); + return -EFAULT; + } + band = woal_band_cfg_to_ieee_band(bss_info.bss_band); + + tdls_ies = kzalloc(sizeof(mlan_ds_misc_tdls_ies), GFP_KERNEL); + if (!tdls_ies) { + PRINTM(MERROR, "Fail to alloc memory for tdls_ies\n"); + LEAVE(); + return -ENOMEM; + } + + mgmt = (void *)skb_put(skb, 24); + memset(mgmt, 0, 24); + memcpy(mgmt->da, peer, ETH_ALEN); + memcpy(mgmt->sa, priv->current_addr, ETH_ALEN); + memcpy(mgmt->bssid, priv->cfg_bssid, ETH_ALEN); + + mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | + IEEE80211_STYPE_ACTION); + /* add address 4 */ + pos = skb_put(skb, ETH_ALEN); + + if (band == IEEE80211_BAND_2GHZ) + capability = 0x2421; + else + capability = 0; + + switch (action_code) { + case WLAN_PUB_ACTION_TDLS_DISCOVER_RES: + woal_tdls_get_ies(priv, peer, tdls_ies, + TDLS_IE_FLAGS_EXTCAP | + TDLS_IE_FLAGS_SUPP_CS_IE); + skb_put(skb, 1 + sizeof(mgmt->u.action.u.tdls_discover_resp)); + mgmt->u.action.category = WLAN_CATEGORY_PUBLIC; + mgmt->u.action.u.tdls_discover_resp.action_code = + WLAN_PUB_ACTION_TDLS_DISCOVER_RES; + mgmt->u.action.u.tdls_discover_resp.dialog_token = dialog_token; + mgmt->u.action.u.tdls_discover_resp.capability = + cpu_to_le16(capability); + /* move back for addr4 */ + memmove(pos + ETH_ALEN, &mgmt->u.action.category, + 1 + sizeof(mgmt->u.action.u.tdls_discover_resp)); + /** init address 4 */ + memcpy(pos, addr, ETH_ALEN); + + woal_add_supported_rates_ie(priv, skb, band); + woal_add_ext_supported_rates_ie(priv, skb, band); + woal_tdls_add_ext_capab(skb, tdls_ies); + break; + default: + ret = -EINVAL; + break; + } + if (tdls_ies) + kfree(tdls_ies); + return ret; +} + +/** + * @brief woal add tdls link identifier ie + * + * @param skb skb buffer + * @param src_addr source address + * @param peer peer address + * @param bssid AP's bssid + * + * @return NA + */ +static void +woal_tdls_add_link_ie(struct sk_buff *skb, u8 *src_addr, u8 *peer, u8 *bssid) +{ + struct ieee80211_tdls_lnkie *lnkid; + + lnkid = (void *)skb_put(skb, sizeof(struct ieee80211_tdls_lnkie)); + + lnkid->ie_type = WLAN_EID_LINK_ID; + lnkid->ie_len = sizeof(struct ieee80211_tdls_lnkie) - 2; + + memcpy(lnkid->bssid, bssid, ETH_ALEN); + memcpy(lnkid->init_sta, src_addr, ETH_ALEN); + memcpy(lnkid->resp_sta, peer, ETH_ALEN); +} + +/** + * @brief woal send tdls action frame + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param peer A pointer to peer mac + * @param action_code tdls action code + * @param dialog_token dialog_token + * @param status_code status_code + * @param skb skb buffer + * + * @return 0 -- success, otherwise fail + */ +static int +woal_send_tdls_action_frame(struct wiphy *wiphy, struct net_device *dev, + t_u8 *peer, u8 action_code, t_u8 dialog_token, + t_u16 status_code, const t_u8 *extra_ies, + size_t extra_ies_len) +{ + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + pmlan_buffer pmbuf = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + struct sk_buff *skb = NULL; + t_u8 *pos; + t_u32 pkt_type; + t_u32 tx_control; + t_u16 pkt_len; + int ret = 0; + + ENTER(); + +#define HEADER_SIZE 8 /* pkt_type + + tx_control */ + + pmbuf = woal_alloc_mlan_buffer(priv->phandle, MLAN_MIN_DATA_HEADER_LEN + HEADER_SIZE + sizeof(pkt_len) + max(sizeof(struct ieee80211_mgmt), sizeof(struct ieee80211_tdls_data)) + 50 + /* supported + rates + */ + sizeof(IEEEtypes_ExtCap_t) + /* ext + capab + */ + extra_ies_len + + sizeof(IEEEtypes_tdls_linkie)); + if (!pmbuf) { + PRINTM(MERROR, "Fail to allocate mlan_buffer\n"); + ret = -ENOMEM; + goto done; + } + + skb = (struct sk_buff *)pmbuf->pdesc; + + skb_put(skb, MLAN_MIN_DATA_HEADER_LEN); + + pos = skb_put(skb, HEADER_SIZE + sizeof(pkt_len)); + pkt_type = MRVL_PKT_TYPE_MGMT_FRAME; + tx_control = 0; + memset(pos, 0, HEADER_SIZE + sizeof(pkt_len)); + memcpy(pos, &pkt_type, sizeof(pkt_type)); + memcpy(pos + sizeof(pkt_type), &tx_control, sizeof(tx_control)); + + woal_construct_tdls_action_frame(priv, peer, action_code, + dialog_token, status_code, skb); + + if (extra_ies_len) + memcpy(skb_put(skb, extra_ies_len), extra_ies, extra_ies_len); + + /* the TDLS link IE is always added last */ + /* we are the responder */ + woal_tdls_add_link_ie(skb, peer, priv->current_addr, priv->cfg_bssid); + + /* + * According to 802.11z: Setup req/resp are sent in AC_BK, otherwise + * we should default to AC_VI. + */ + skb_set_queue_mapping(skb, WMM_AC_VI); + skb->priority = 5; + + pmbuf->data_offset = MLAN_MIN_DATA_HEADER_LEN; + pmbuf->data_len = skb->len - pmbuf->data_offset; + pmbuf->priority = skb->priority; + pmbuf->buf_type = MLAN_BUF_TYPE_RAW_DATA; + pmbuf->bss_index = priv->bss_index; + + pkt_len = pmbuf->data_len - HEADER_SIZE - sizeof(pkt_len); + memcpy(pmbuf->pbuf + pmbuf->data_offset + HEADER_SIZE, &pkt_len, + sizeof(pkt_len)); + + DBG_HEXDUMP(MDAT_D, "TDLS action:", pmbuf->pbuf + pmbuf->data_offset, + pmbuf->data_len); + + status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf); + + switch (status) { + case MLAN_STATUS_PENDING: + atomic_inc(&priv->phandle->tx_pending); + queue_work(priv->phandle->workqueue, &priv->phandle->main_work); + break; + case MLAN_STATUS_SUCCESS: + woal_free_mlan_buffer(priv->phandle, pmbuf); + break; + case MLAN_STATUS_FAILURE: + default: + woal_free_mlan_buffer(priv->phandle, pmbuf); + ret = -EFAULT; + break; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief woal send tdls data frame + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param peer A pointer to peer mac + * @param action_code tdls action code + * @param dialog_token dialog_token + * @param status_code status_code + * @param skb skb buffer + * + * @return 0 -- success, otherwise fail + */ +static int +woal_send_tdls_data_frame(struct wiphy *wiphy, struct net_device *dev, + t_u8 *peer, u8 action_code, t_u8 dialog_token, + t_u16 status_code, const t_u8 *extra_ies, + size_t extra_ies_len) +{ + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + pmlan_buffer pmbuf = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + struct sk_buff *skb = NULL; + int ret = 0; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + t_u32 index = 0; +#endif + + ENTER(); + + skb = dev_alloc_skb(priv->extra_tx_head_len + MLAN_MIN_DATA_HEADER_LEN + sizeof(mlan_buffer) + max(sizeof(struct ieee80211_mgmt), sizeof(struct ieee80211_tdls_data)) + 50 + /* supported + rates + */ + sizeof(IEEEtypes_ExtCap_t) + /* ext capab */ + 3 + /* Qos Info */ + sizeof(IEEEtypes_WmmParameter_t) + /* wmm ie */ + sizeof(IEEEtypes_HTCap_t) + + sizeof(IEEEtypes_2040BSSCo_t) + + sizeof(IEEEtypes_HTInfo_t) + + sizeof(IEEEtypes_VHTCap_t) + + sizeof(IEEEtypes_VHTOprat_t) + + sizeof(IEEEtypes_AID_t) + extra_ies_len + + sizeof(IEEEtypes_tdls_linkie)); + if (!skb) + return -ENOMEM; + + skb_reserve(skb, + MLAN_MIN_DATA_HEADER_LEN + sizeof(mlan_buffer) + + priv->extra_tx_head_len); + + woal_construct_tdls_data_frame(priv, peer, + action_code, dialog_token, + status_code, skb); + + if (extra_ies_len) + memcpy(skb_put(skb, extra_ies_len), extra_ies, extra_ies_len); + + /* the TDLS link IE is always added last */ + switch (action_code) { + case WLAN_TDLS_SETUP_REQUEST: + case WLAN_TDLS_SETUP_CONFIRM: + case WLAN_TDLS_TEARDOWN: + case WLAN_TDLS_DISCOVERY_REQUEST: + /* we are the initiator */ + woal_tdls_add_link_ie(skb, priv->current_addr, peer, + priv->cfg_bssid); + break; + case WLAN_TDLS_SETUP_RESPONSE: + /* we are the responder */ + woal_tdls_add_link_ie(skb, peer, priv->current_addr, + priv->cfg_bssid); + break; + default: + ret = -ENOTSUPP; + goto fail; + } + + /* + * According to 802.11z: Setup req/resp are sent in AC_BK, otherwise + * we should default to AC_VI. + */ + switch (action_code) { + case WLAN_TDLS_SETUP_REQUEST: + case WLAN_TDLS_SETUP_RESPONSE: + skb_set_queue_mapping(skb, WMM_AC_BK); + skb->priority = 2; + break; + default: + skb_set_queue_mapping(skb, WMM_AC_VI); + skb->priority = 5; + break; + } + + pmbuf = (mlan_buffer *)skb->head; + memset((t_u8 *)pmbuf, 0, sizeof(mlan_buffer)); + pmbuf->bss_index = priv->bss_index; + pmbuf->pdesc = skb; + pmbuf->pbuf = skb->head + sizeof(mlan_buffer); + + pmbuf->data_offset = skb->data - (skb->head + sizeof(mlan_buffer)); + pmbuf->data_len = skb->len; + pmbuf->priority = skb->priority; + pmbuf->buf_type = MLAN_BUF_TYPE_DATA; + + DBG_HEXDUMP(MDAT_D, "TDLS data:", pmbuf->pbuf + pmbuf->data_offset, + pmbuf->data_len); + + status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf); + + switch (status) { + case MLAN_STATUS_PENDING: + atomic_inc(&priv->phandle->tx_pending); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + index = skb_get_queue_mapping(skb); + atomic_inc(&priv->wmm_tx_pending[index]); +#endif + queue_work(priv->phandle->workqueue, &priv->phandle->main_work); + /* delay 10 ms to guarantee the teardown frame can be sent out + before disalbe tdls link * if we don't delay and return + immediately, wpa_supplicant will call disalbe tdls link * + this may cause tdls link disabled before teardown frame sent + out */ + if (action_code == WLAN_TDLS_TEARDOWN) + woal_sched_timeout(10); + break; + case MLAN_STATUS_SUCCESS: + dev_kfree_skb(skb); + break; + case MLAN_STATUS_FAILURE: + default: + dev_kfree_skb(skb); + ret = -ENOTSUPP; + break; + } + + LEAVE(); + return ret; +fail: + dev_kfree_skb(skb); + return ret; +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0) +/** + * @brief Tx TDLS packet + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param peer A pointer to peer mac + * @param action_code tdls action code + * @param dialog_token dialog_token + * @param status_code status_code + * @param peer_capability peer capability + * @param initiator initiator + * @param extra_ie A pointer to extra ie buffer + * @param extra_ie_len etra ie len + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev, + const t_u8 *peer, + u8 action_code, t_u8 dialog_token, + t_u16 status_code, t_u32 peer_capability, + bool initiator, + const t_u8 *extra_ies, size_t extra_ies_len) +#else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) +/** + * @brief Tx TDLS packet + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param peer A pointer to peer mac + * @param action_code tdls action code + * @param dialog_token dialog_token + * @param status_code status_code + * @param peer_capability peer capability + * @param extra_ie A pointer to extra ie buffer + * @param extra_ie_len etra ie len + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const t_u8 *peer, +#else + t_u8 *peer, +#endif + u8 action_code, t_u8 dialog_token, + t_u16 status_code, t_u32 peer_capability, + const t_u8 *extra_ies, size_t extra_ies_len) +#else +/** + * @brief Tx TDLS packet + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param peer A pointer to peer mac + * @param action_code tdls action code + * @param dialog_token dialog_token + * @param status_code status_code + * @param extra_ie A pointer to extra ie buffer + * @param extra_ie_len etra ie len + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev, + t_u8 *peer, u8 action_code, t_u8 dialog_token, + t_u16 status_code, const t_u8 *extra_ies, + size_t extra_ies_len) +#endif +#endif +{ + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + int ret = 0; + + ENTER(); + + if (!(wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS)) + return -ENOTSUPP; + /* make sure we are not in uAP mode and Go mode */ + if (priv->bss_type != MLAN_BSS_TYPE_STA) + return -ENOTSUPP; + + switch (action_code) { + case TDLS_SETUP_REQUEST: + woal_add_tdls_peer(priv, (t_u8 *)peer); + PRINTM(MMSG, + "wlan: Send TDLS Setup Request to " MACSTR + " status_code=%d\n", MAC2STR(peer), status_code); + ret = woal_send_tdls_data_frame(wiphy, dev, (t_u8 *)peer, + action_code, dialog_token, + status_code, extra_ies, + extra_ies_len); + break; + case TDLS_SETUP_RESPONSE: + PRINTM(MMSG, + "wlan: Send TDLS Setup Response to " MACSTR + " status_code=%d\n", MAC2STR(peer), status_code); + ret = woal_send_tdls_data_frame(wiphy, dev, (t_u8 *)peer, + action_code, dialog_token, + status_code, extra_ies, + extra_ies_len); + break; + case TDLS_SETUP_CONFIRM: + PRINTM(MMSG, + "wlan: Send TDLS Confirm to " MACSTR " status_code=%d\n", + MAC2STR(peer), status_code); + ret = woal_send_tdls_data_frame(wiphy, dev, (t_u8 *)peer, + action_code, dialog_token, + status_code, extra_ies, + extra_ies_len); + break; + case TDLS_TEARDOWN: + PRINTM(MMSG, "wlan: Send TDLS Tear down to " MACSTR "\n", + MAC2STR(peer)); + ret = woal_send_tdls_data_frame(wiphy, dev, (t_u8 *)peer, + action_code, dialog_token, + status_code, extra_ies, + extra_ies_len); + break; + case TDLS_DISCOVERY_REQUEST: + PRINTM(MMSG, + "wlan: Send TDLS Discovery Request to " MACSTR "\n", + MAC2STR(peer)); + ret = woal_send_tdls_data_frame(wiphy, dev, (t_u8 *)peer, + action_code, dialog_token, + status_code, extra_ies, + extra_ies_len); + break; + case TDLS_DISCOVERY_RESPONSE: + PRINTM(MMSG, + "wlan: Send TDLS Discovery Response to " MACSTR "\n", + MAC2STR(peer)); + ret = woal_send_tdls_action_frame(wiphy, dev, (t_u8 *)peer, + action_code, dialog_token, + status_code, extra_ies, + extra_ies_len); + break; + default: + break; + } + + LEAVE(); + return ret; + +} + +/** + * @brief cfg80211_tdls_oper handler + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param peer tdls peer mac + * @param oper tdls operation code + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *peer, +#else + u8 *peer, +#endif + enum nl80211_tdls_operation oper) +{ + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + t_u8 action; + int ret = 0; + t_u8 event_buf[32]; + int custom_len = 0; + + ENTER(); + + if (!(wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS)) + return -ENOTSUPP; + + if (!(wiphy->flags & WIPHY_FLAG_TDLS_EXTERNAL_SETUP)) + return -ENOTSUPP; + /* make sure we are in managed mode, and associated */ + if (priv->bss_type != MLAN_BSS_TYPE_STA) + return -ENOTSUPP; + + PRINTM(MIOCTL, "wlan: TDLS peer=" MACSTR ", oper=%d\n", MAC2STR(peer), + oper); + switch (oper) { + case NL80211_TDLS_ENABLE_LINK: + woal_updata_peer_status(priv, (t_u8 *)peer, + TDLS_SETUP_COMPLETE); + PRINTM(MMSG, "wlan: TDLS_ENABLE_LINK: peer=" MACSTR "\n", + MAC2STR(peer)); + action = WLAN_TDLS_ENABLE_LINK; + memset(event_buf, 0, sizeof(event_buf)); + custom_len = strlen(CUS_EVT_TDLS_CONNECTED); + memcpy(event_buf, CUS_EVT_TDLS_CONNECTED, custom_len); + memcpy(event_buf + custom_len, peer, ETH_ALEN); + woal_broadcast_event(priv, event_buf, custom_len + ETH_ALEN); + break; + case NL80211_TDLS_DISABLE_LINK: + woal_updata_peer_status(priv, (t_u8 *)peer, TDLS_NOT_SETUP); + PRINTM(MMSG, "wlan: TDLS_DISABLE_LINK: peer=" MACSTR "\n", + MAC2STR(peer)); + action = WLAN_TDLS_DISABLE_LINK; + memset(event_buf, 0, sizeof(event_buf)); + custom_len = strlen(CUS_EVT_TDLS_TEARDOWN); + memcpy(event_buf, CUS_EVT_TDLS_TEARDOWN, custom_len); + memcpy(event_buf + custom_len, peer, ETH_ALEN); + woal_broadcast_event(priv, event_buf, custom_len + ETH_ALEN); + break; + case NL80211_TDLS_TEARDOWN: + case NL80211_TDLS_SETUP: + case NL80211_TDLS_DISCOVERY_REQ: + return 0; + + default: + return -ENOTSUPP; + } + ret = woal_tdls_oper(priv, (u8 *)peer, action); + + LEAVE(); + + return ret; +} + +/** + * @brief add station + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param mac A pointer to peer mac + * @param params station parameters + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_add_station(struct wiphy *wiphy, struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *mac, +#else + u8 *mac, +#endif + struct station_parameters *params) +{ + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + int ret = 0; + ENTER(); + if (!(params->sta_flags_set & MBIT(NL80211_STA_FLAG_TDLS_PEER))) + goto done; + /* make sure we are in connected mode */ + if ((priv->bss_type != MLAN_BSS_TYPE_STA) || + (priv->media_connected == MFALSE)) { + ret = -ENOTSUPP; + goto done; + } + PRINTM(MMSG, "wlan: TDLS add peer station, address =" MACSTR "\n", + MAC2STR(mac)); + ret = woal_tdls_oper(priv, (u8 *)mac, WLAN_TDLS_CREATE_LINK); +done: + return ret; +} + +/** + * @brief change station info + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param mac A pointer to peer mac + * @param params station parameters + * + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_change_station(struct wiphy *wiphy, struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *mac, +#else + u8 *mac, +#endif + struct station_parameters *params) +{ + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_misc_cfg *misc = NULL; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + if (!(params->sta_flags_set & MBIT(NL80211_STA_FLAG_TDLS_PEER))) + goto done; + /* make sure we are in connected mode */ + if ((priv->bss_type != MLAN_BSS_TYPE_STA) || + (priv->media_connected == MFALSE)) { + ret = -ENOTSUPP; + goto done; + } + PRINTM(MMSG, "wlan: TDLS change peer info " MACSTR "\n", MAC2STR(mac)); + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; + misc->sub_command = MLAN_OID_MISC_TDLS_OPER; + ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; + ioctl_req->action = MLAN_ACT_SET; + misc->param.tdls_oper.tdls_action = WLAN_TDLS_CONFIG_LINK; + memcpy(misc->param.tdls_oper.peer_mac, mac, ETH_ALEN); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0) + misc->param.tdls_oper.capability = params->capability; +#endif + misc->param.tdls_oper.qos_info = + params->uapsd_queues | (params->max_sp << 5); + + if (params->supported_rates) { + misc->param.tdls_oper.supported_rates = + (t_u8 *)params->supported_rates; + misc->param.tdls_oper.supported_rates_len = + params->supported_rates_len; + } + + if (params->ht_capa) + misc->param.tdls_oper.ht_capa = (t_u8 *)params->ht_capa; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0) + if (params->ext_capab) { + misc->param.tdls_oper.ext_capab = (t_u8 *)params->ext_capab; + misc->param.tdls_oper.ext_capab_len = params->ext_capab_len; + } +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0) + if (params->vht_capa) + misc->param.tdls_oper.vht_cap = (t_u8 *)params->vht_capa; +#endif + + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) +/** + * @brief Update ft ie for Fast BSS Transition + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param ftie A pointer to cfg80211_update_ft_ies_params structure + * + * @return 0 success , other failure + */ +int +woal_cfg80211_update_ft_ies(struct wiphy *wiphy, struct net_device *dev, + struct cfg80211_update_ft_ies_params *ftie) +{ + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + IEEEtypes_MobilityDomain_t *md_ie = NULL; + int ret = 0; + mlan_ds_misc_assoc_rsp assoc_rsp; + IEEEtypes_AssocRsp_t *passoc_rsp = NULL; + mlan_bss_info bss_info; + + ENTER(); + +#ifdef MLAN_64BIT + PRINTM(MINFO, "==>woal_cfg80211_update_ft_ies %lx \n", ftie->ie_len); +#else + PRINTM(MINFO, "==>woal_cfg80211_update_ft_ies %x \n", ftie->ie_len); +#endif + if (!ftie) { + LEAVE(); + return ret; + } + md_ie = (IEEEtypes_MobilityDomain_t *)woal_parse_ie_tlv(ftie->ie, + ftie->ie_len, + MOBILITY_DOMAIN); + if (!md_ie) { + PRINTM(MERROR, "No Mobility domain IE\n"); + LEAVE(); + return ret; + } + priv->ft_cap = md_ie->ft_cap; + memset(priv->ft_ie, 0, MAX_IE_SIZE); + memcpy(priv->ft_ie, ftie->ie, MIN(ftie->ie_len, MAX_IE_SIZE)); + priv->ft_ie_len = ftie->ie_len; + priv->ft_md = ftie->md; + + if (!priv->ft_pre_connect) { + LEAVE(); + return ret; + } + /* check if is different AP */ + if (!memcmp + (&priv->target_ap_bssid, priv->cfg_bssid, MLAN_MAC_ADDR_LENGTH)) { + PRINTM(MMSG, "This is the same AP, no Fast bss transition\n"); + priv->ft_pre_connect = MFALSE; + priv->ft_ie_len = 0; + LEAVE(); + return 0; + } + + /* start fast BSS transition to target AP */ + priv->assoc_status = 0; + priv->sme_current.bssid = priv->conn_bssid; + memcpy((void *)priv->sme_current.bssid, &priv->target_ap_bssid, + MLAN_MAC_ADDR_LENGTH); + ret = woal_cfg80211_assoc(priv, (void *)&priv->sme_current, + MOAL_IOCTL_WAIT); + + if ((priv->ft_cap & MBIT(0)) || priv->ft_roaming_triggered_by_driver) { + if (!ret) { + woal_inform_bss_from_scan_result(priv, NULL, + MOAL_IOCTL_WAIT); + memset(&assoc_rsp, 0, sizeof(mlan_ds_misc_assoc_rsp)); + woal_get_assoc_rsp(priv, &assoc_rsp); + passoc_rsp = + (IEEEtypes_AssocRsp_t *)assoc_rsp. + assoc_resp_buf; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0) || defined(COMPAT_WIRELESS) + cfg80211_roamed(priv->netdev, NULL, priv->cfg_bssid, + priv->sme_current.ie, + priv->sme_current.ie_len, + passoc_rsp->ie_buffer, + assoc_rsp.assoc_resp_len - + ASSOC_RESP_FIXED_SIZE, GFP_KERNEL); +#else + cfg80211_roamed(priv->netdev, priv->cfg_bssid, + priv->sme_current.ie, + priv->sme_current.ie_len, + passoc_rsp->ie_buffer, + assoc_rsp.assoc_resp_len - + ASSOC_RESP_FIXED_SIZE, GFP_KERNEL); +#endif + PRINTM(MMSG, + "Fast BSS transition to bssid " MACSTR + " successfully\n", MAC2STR(priv->cfg_bssid)); + } else { + PRINTM(MMSG, + "Fast BSS transition failed, keep connect to " + MACSTR " \n", MAC2STR(priv->cfg_bssid)); + priv->ft_ie_len = 0; + } + priv->ft_roaming_triggered_by_driver = MFALSE; + + } else { + PRINTM(MMSG, "Fast BSS Transition use ft-over-air\n"); + if (!ret) { + memset(&assoc_rsp, 0, sizeof(mlan_ds_misc_assoc_rsp)); + woal_get_assoc_rsp(priv, &assoc_rsp); + passoc_rsp = + (IEEEtypes_AssocRsp_t *)assoc_rsp. + assoc_resp_buf; + cfg80211_connect_result(priv->netdev, priv->cfg_bssid, + NULL, 0, passoc_rsp->ie_buffer, + assoc_rsp.assoc_resp_len - + ASSOC_RESP_FIXED_SIZE, + WLAN_STATUS_SUCCESS, + GFP_KERNEL); + PRINTM(MMSG, + "wlan: Fast Bss transition to bssid " MACSTR + " successfully\n", MAC2STR(priv->cfg_bssid)); + + memset(&bss_info, 0, sizeof(bss_info)); + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + priv->channel = bss_info.bss_chan; + } else { + PRINTM(MMSG, + "wlan: Failed to connect to bssid " MACSTR "\n", + MAC2STR(priv->cfg_bssid)); + cfg80211_connect_result(priv->netdev, priv->cfg_bssid, + NULL, 0, NULL, 0, + woal_get_assoc_status(priv), + GFP_KERNEL); + memset(priv->cfg_bssid, 0, ETH_ALEN); + priv->ft_ie_len = 0; + } + } + + priv->ft_pre_connect = MFALSE; + LEAVE(); + return 0; +} +#endif + +/** + * @brief Save connect parameters for roaming + * + * @param priv A pointer to moal_private + * @param sme A pointer to cfg80211_connect_params structure + */ +void +woal_save_conn_params(moal_private *priv, struct cfg80211_connect_params *sme) +{ + ENTER(); + woal_clear_conn_params(priv); + memcpy(&priv->sme_current, sme, sizeof(struct cfg80211_connect_params)); + if (sme->channel) { + priv->sme_current.channel = &priv->conn_chan; + memcpy(priv->sme_current.channel, sme->channel, + sizeof(struct ieee80211_channel)); + } + if (sme->bssid) { + priv->sme_current.bssid = priv->conn_bssid; + memcpy((void *)priv->sme_current.bssid, sme->bssid, + MLAN_MAC_ADDR_LENGTH); + } + if (sme->ssid && sme->ssid_len) { + priv->sme_current.ssid = priv->conn_ssid; + memset(priv->conn_ssid, 0, MLAN_MAX_SSID_LENGTH); + memcpy((void *)priv->sme_current.ssid, sme->ssid, + sme->ssid_len); + } + if (sme->ie && sme->ie_len) { + priv->sme_current.ie = kzalloc(sme->ie_len, GFP_KERNEL); + memcpy((void *)priv->sme_current.ie, sme->ie, sme->ie_len); + } + if (sme->key && sme->key_len && (sme->key_len <= MAX_WEP_KEY_SIZE)) { + priv->sme_current.key = priv->conn_wep_key; + memcpy((t_u8 *)priv->sme_current.key, sme->key, sme->key_len); + } +} + +/** + * @brief clear connect parameters for ing + * + * @param priv A pointer to moal_private + */ +void +woal_clear_conn_params(moal_private *priv) +{ + ENTER(); + if (priv->sme_current.ie_len) + kfree(priv->sme_current.ie); + memset(&priv->sme_current, 0, sizeof(struct cfg80211_connect_params)); + priv->roaming_required = MFALSE; + LEAVE(); +} + +/** + * @brief Start roaming: driver handle roaming + * + * @param priv A pointer to moal_private structure + * + * @return N/A + */ +void +woal_start_roaming(moal_private *priv) +{ + mlan_ds_get_signal signal; + mlan_ssid_bssid ssid_bssid; + char rssi_low[10]; + int ret = 0; + mlan_ds_misc_assoc_rsp assoc_rsp; + IEEEtypes_AssocRsp_t *passoc_rsp = NULL; + + ENTER(); + if (priv->ft_roaming_triggered_by_driver) { + PRINTM(MIOCTL, "FT roaming is in processing ...... \n"); + LEAVE(); + return; + } + + if (priv->last_event & EVENT_BG_SCAN_REPORT) { + woal_inform_bss_from_scan_result(priv, NULL, MOAL_CMD_WAIT); + PRINTM(MIOCTL, "Report bgscan result\n"); + } + if (priv->media_connected == MFALSE || !priv->sme_current.ssid_len) { + PRINTM(MIOCTL, "Not connected, ignore roaming\n"); + LEAVE(); + return; + } + + /* Get signal information from the firmware */ + memset(&signal, 0, sizeof(mlan_ds_get_signal)); + if (MLAN_STATUS_SUCCESS != + woal_get_signal_info(priv, MOAL_CMD_WAIT, &signal)) { + PRINTM(MERROR, "Error getting signal information\n"); + ret = -EFAULT; + goto done; + } + memset(&ssid_bssid, 0, sizeof(mlan_ssid_bssid)); + ssid_bssid.ssid.ssid_len = priv->sme_current.ssid_len; + memcpy(ssid_bssid.ssid.ssid, priv->sme_current.ssid, + priv->sme_current.ssid_len); + if (MLAN_STATUS_SUCCESS != + woal_find_best_network(priv, MOAL_CMD_WAIT, &ssid_bssid)) { + PRINTM(MIOCTL, "Can not find better network\n"); + ret = -EFAULT; + goto done; + } + /* check if we found different AP */ + if (!memcmp(&ssid_bssid.bssid, priv->cfg_bssid, MLAN_MAC_ADDR_LENGTH)) { + PRINTM(MIOCTL, "This is the same AP, no roaming\n"); + ret = -EFAULT; + goto done; + } + PRINTM(MIOCTL, "Find AP: bssid=" MACSTR ", signal=%d\n", + MAC2STR(ssid_bssid.bssid), ssid_bssid.rssi); + /* check signal */ + if (!(priv->last_event & EVENT_PRE_BCN_LOST)) { + if ((abs(signal.bcn_rssi_avg) - abs(ssid_bssid.rssi)) < + DELTA_RSSI) { + PRINTM(MERROR, "New AP's signal is not good too.\n"); + ret = -EFAULT; + goto done; + } + } +/**check if need start FT Roaming*/ + if (priv->ft_ie_len && (priv->ft_md == ssid_bssid.ft_md) && + (priv->ft_cap == ssid_bssid.ft_cap)) { + woal_start_ft_roaming(priv, &ssid_bssid); + goto done; + } + /* start roaming to new AP */ + priv->sme_current.bssid = priv->conn_bssid; + memcpy((void *)priv->sme_current.bssid, &ssid_bssid.bssid, + MLAN_MAC_ADDR_LENGTH); + ret = woal_cfg80211_assoc(priv, (void *)&priv->sme_current, + MOAL_CMD_WAIT); + if (!ret) { + woal_inform_bss_from_scan_result(priv, NULL, MOAL_CMD_WAIT); + memset(&assoc_rsp, 0, sizeof(mlan_ds_misc_assoc_rsp)); + woal_get_assoc_rsp(priv, &assoc_rsp); + passoc_rsp = (IEEEtypes_AssocRsp_t *)assoc_rsp.assoc_resp_buf; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0) || defined(COMPAT_WIRELESS) + cfg80211_roamed(priv->netdev, NULL, priv->cfg_bssid, + priv->sme_current.ie, priv->sme_current.ie_len, + passoc_rsp->ie_buffer, + assoc_rsp.assoc_resp_len - + ASSOC_RESP_FIXED_SIZE, GFP_KERNEL); +#else + cfg80211_roamed(priv->netdev, priv->cfg_bssid, + priv->sme_current.ie, priv->sme_current.ie_len, + passoc_rsp->ie_buffer, + assoc_rsp.assoc_resp_len - + ASSOC_RESP_FIXED_SIZE, GFP_KERNEL); +#endif + PRINTM(MMSG, "Roamed to bssid " MACSTR " successfully\n", + MAC2STR(priv->cfg_bssid)); + } else { + PRINTM(MIOCTL, "Roaming to bssid " MACSTR " failed\n", + MAC2STR(ssid_bssid.bssid)); + } +done: + /* config rssi low threshold again */ + priv->last_event = 0; + priv->rssi_low = DEFAULT_RSSI_LOW_THRESHOLD; + sprintf(rssi_low, "%d", priv->rssi_low); + woal_set_rssi_low_threshold(priv, rssi_low, MOAL_CMD_WAIT); + LEAVE(); + return; +} + +/** + * @brief Register the device with cfg80211 + * + * @param dev A pointer to net_device structure + * @param bss_type BSS type + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_register_sta_cfg80211(struct net_device *dev, t_u8 bss_type) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + moal_private *priv = (moal_private *)netdev_priv(dev); + struct wireless_dev *wdev = NULL; + int psmode = 0; + + ENTER(); + + wdev = (struct wireless_dev *)&priv->w_dev; + memset(wdev, 0, sizeof(struct wireless_dev)); + wdev->wiphy = priv->phandle->wiphy; + if (!wdev->wiphy) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + if (bss_type == MLAN_BSS_TYPE_STA) { + wdev->iftype = NL80211_IFTYPE_STATION; + priv->roaming_enabled = MFALSE; + priv->roaming_required = MFALSE; + } +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (bss_type == MLAN_BSS_TYPE_WIFIDIRECT) + wdev->iftype = NL80211_IFTYPE_STATION; +#endif +#endif + + dev_net_set(dev, wiphy_net(wdev->wiphy)); + dev->ieee80211_ptr = wdev; + SET_NETDEV_DEV(dev, wiphy_dev(wdev->wiphy)); + priv->wdev = wdev; + /* Get IEEE power save mode */ + if (MLAN_STATUS_SUCCESS == + woal_set_get_power_mgmt(priv, MLAN_ACT_GET, &psmode, 0, + MOAL_CMD_WAIT)) { + /* Save the IEEE power save mode to wiphy, because after * + warmreset wiphy power save should be updated instead * of + using the last saved configuration */ + if (psmode) + priv->wdev->ps = MTRUE; + else + priv->wdev->ps = MFALSE; + } + woal_send_domain_info_cmd_fw(priv, MOAL_CMD_WAIT); + LEAVE(); + return ret; +} + +/** + * @brief Initialize the wiphy + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_cfg80211_init_wiphy(moal_private *priv, t_u8 wait_option) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + int retry_count, rts_thr, frag_thr; + struct wiphy *wiphy = NULL; + mlan_ioctl_req *req = NULL; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) || defined(COMPAT_WIRELESS) + mlan_ds_radio_cfg *radio = NULL; +#endif + mlan_ds_11n_cfg *cfg_11n = NULL; + t_u32 hw_dev_cap; +#ifdef UAP_SUPPORT + mlan_uap_bss_param sys_cfg; +#endif + + ENTER(); + + wiphy = priv->phandle->wiphy; + /* Get 11n tx parameters from MLAN */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + cfg_11n = (mlan_ds_11n_cfg *)req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_HTCAP_CFG; + req->req_id = MLAN_IOCTL_11N_CFG; + req->action = MLAN_ACT_GET; + cfg_11n->param.htcap_cfg.hw_cap_req = MTRUE; + + ret = woal_request_ioctl(priv, req, wait_option); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + hw_dev_cap = cfg_11n->param.htcap_cfg.htcap; + + /* Get supported MCS sets */ + memset(req->pbuf, 0, sizeof(mlan_ds_11n_cfg)); + cfg_11n->sub_command = MLAN_OID_11N_CFG_SUPPORTED_MCS_SET; + req->req_id = MLAN_IOCTL_11N_CFG; + req->action = MLAN_ACT_GET; + + ret = woal_request_ioctl(priv, req, wait_option); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + + /* Initialize parameters for 2GHz and 5GHz bands */ + woal_cfg80211_setup_ht_cap(&wiphy->bands[IEEE80211_BAND_2GHZ]->ht_cap, + hw_dev_cap, + cfg_11n->param.supported_mcs_set); + /* For 2.4G band only card, this shouldn't be set */ + if (wiphy->bands[IEEE80211_BAND_5GHZ]) { + woal_cfg80211_setup_ht_cap(&wiphy->bands[IEEE80211_BAND_5GHZ]-> + ht_cap, hw_dev_cap, + cfg_11n->param.supported_mcs_set); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) + woal_cfg80211_setup_vht_cap(priv, + &wiphy->bands[IEEE80211_BAND_5GHZ]-> + vht_cap); +#endif + } + kfree(req); + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) || defined(COMPAT_WIRELESS) + /* Get antenna modes */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_radio_cfg)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + radio = (mlan_ds_radio_cfg *)req->pbuf; + radio->sub_command = MLAN_OID_ANT_CFG; + req->req_id = MLAN_IOCTL_RADIO_CFG; + req->action = MLAN_ACT_GET; + + ret = woal_request_ioctl(priv, req, wait_option); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + + /* Set available antennas to wiphy */ + wiphy->available_antennas_tx = radio->param.ant_cfg.tx_antenna; + wiphy->available_antennas_rx = radio->param.ant_cfg.rx_antenna; +#endif /* LINUX_VERSION_CODE */ + + /* Set retry limit count to wiphy */ + if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) { + if (MLAN_STATUS_SUCCESS != + woal_set_get_retry(priv, MLAN_ACT_GET, wait_option, + &retry_count)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + } +#ifdef UAP_SUPPORT + else { + memset(&sys_cfg, 0x00, sizeof(sys_cfg)); + if (MLAN_STATUS_SUCCESS != + woal_set_get_sys_config(priv, MLAN_ACT_GET, wait_option, + &sys_cfg)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + retry_count = sys_cfg.retry_limit; + } +#endif + wiphy->retry_long = (t_u8)retry_count; + wiphy->retry_short = (t_u8)retry_count; + wiphy->max_scan_ie_len = MAX_IE_SIZE; + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) + wiphy->mgmt_stypes = ieee80211_mgmt_stypes; +#endif +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + wiphy->max_remain_on_channel_duration = MAX_REMAIN_ON_CHANNEL_DURATION; +#endif /* KERNEL_VERSION */ +#endif /* WIFI_DIRECT_SUPPORT && V14_FEATURE */ + + /* Set RTS threshold to wiphy */ + if (MLAN_STATUS_SUCCESS != + woal_set_get_rts(priv, MLAN_ACT_GET, wait_option, &rts_thr)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + if (rts_thr < MLAN_RTS_MIN_VALUE || rts_thr > MLAN_RTS_MAX_VALUE) + rts_thr = MLAN_FRAG_RTS_DISABLED; + wiphy->rts_threshold = (t_u32)rts_thr; + + /* Set fragment threshold to wiphy */ + if (MLAN_STATUS_SUCCESS != + woal_set_get_frag(priv, MLAN_ACT_GET, wait_option, &frag_thr)) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + if (frag_thr < MLAN_RTS_MIN_VALUE || frag_thr > MLAN_RTS_MAX_VALUE) + frag_thr = MLAN_FRAG_RTS_DISABLED; + wiphy->frag_threshold = (t_u32)frag_thr; +#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0) + /* Enable multi-channel by default if multi-channel is supported */ + if (cfg80211_iface_comb_ap_sta.num_different_channels > 1) { + t_u16 enable = 1; + ret = woal_mc_policy_cfg(priv, &enable, wait_option, + MLAN_ACT_SET); + } +#endif + +done: + LEAVE(); + if (ret != MLAN_STATUS_PENDING) + kfree(req); + return ret; +} + +/* + * This function registers the device with CFG802.11 subsystem. + * + * @param priv A pointer to moal_private + * + */ +mlan_status +woal_register_cfg80211(moal_private *priv) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + struct wiphy *wiphy; + void *wdev_priv = NULL; + mlan_fw_info fw_info; + char *country = NULL; + int index = 0; + + ENTER(); + + wiphy = wiphy_new(&woal_cfg80211_ops, sizeof(moal_handle *)); + if (!wiphy) { + PRINTM(MERROR, "Could not allocate wiphy device\n"); + ret = MLAN_STATUS_FAILURE; + goto err_wiphy; + } +#ifdef CONFIG_PM +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) + wiphy->wowlan = &wowlan_support; +#else + wiphy->wowlan.flags = WIPHY_WOWLAN_ANY | WIPHY_WOWLAN_MAGIC_PKT; + wiphy->wowlan.n_patterns = MAX_NUM_FILTERS; + wiphy->wowlan.pattern_min_len = 1; + wiphy->wowlan.pattern_max_len = WOWLAN_MAX_PATTERN_LEN; + wiphy->wowlan.max_pkt_offset = WOWLAN_MAX_OFFSET_LEN; +#endif +#endif +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) + wiphy->coalesce = &coalesce_support; +#endif + wiphy->max_scan_ssids = MRVDRV_MAX_SSID_LIST_LENGTH; + wiphy->max_scan_ie_len = MAX_IE_SIZE; + wiphy->interface_modes = 0; + wiphy->interface_modes = + MBIT(NL80211_IFTYPE_STATION) | MBIT(NL80211_IFTYPE_ADHOC) | + MBIT(NL80211_IFTYPE_AP); + +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + wiphy->interface_modes |= MBIT(NL80211_IFTYPE_P2P_GO) | + MBIT(NL80211_IFTYPE_P2P_CLIENT); +#endif +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) + woal_register_cfg80211_vendor_command(wiphy); +#endif + /* Make this wiphy known to this driver only */ + wiphy->privid = mrvl_wiphy_privid; + woal_request_get_fw_info(priv, MOAL_CMD_WAIT, &fw_info); + + /* Supported bands */ + wiphy->bands[IEEE80211_BAND_2GHZ] = &cfg80211_band_2ghz; + if (fw_info.fw_bands & BAND_A) { + wiphy->bands[IEEE80211_BAND_5GHZ] = &cfg80211_band_5ghz; + /** reduce scan time from 110ms to 80ms */ + woal_set_scan_time(priv, INIT_ACTIVE_SCAN_CHAN_TIME, + INIT_PASSIVE_SCAN_CHAN_TIME, + INIT_SPECIFIC_SCAN_CHAN_TIME); + } else + woal_set_scan_time(priv, ACTIVE_SCAN_CHAN_TIME, + PASSIVE_SCAN_CHAN_TIME, + SPECIFIC_SCAN_CHAN_TIME); + + priv->phandle->band = IEEE80211_BAND_2GHZ; + + /* Initialize cipher suits */ + wiphy->cipher_suites = cfg80211_cipher_suites; + wiphy->n_cipher_suites = ARRAY_SIZE(cfg80211_cipher_suites); +#ifdef UAP_CFG80211 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) + wiphy->max_acl_mac_addrs = MAX_MAC_FILTER_NUM; +#endif +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0) + if (cfg80211_drcs && priv->phandle->card_info->drcs) + cfg80211_iface_comb_ap_sta.num_different_channels = 2; + /* Initialize interface combinations */ + wiphy->iface_combinations = &cfg80211_iface_comb_ap_sta; + wiphy->n_iface_combinations = 1; +#endif + + memcpy(wiphy->perm_addr, priv->current_addr, ETH_ALEN); + wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; + + wiphy->flags = 0; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) + wiphy->flags |= WIPHY_FLAG_PS_ON_BY_DEFAULT; +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) + wiphy->flags |= + WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL | WIPHY_FLAG_OFFCHAN_TX; + wiphy->flags |= + WIPHY_FLAG_HAVE_AP_SME | WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD; +#endif +#ifdef ANDROID_KERNEL + wiphy->flags |= WIPHY_FLAG_HAVE_AP_SME; +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) + wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN; + wiphy->max_sched_scan_ssids = MRVDRV_MAX_SSID_LIST_LENGTH; + wiphy->max_sched_scan_ie_len = MAX_IE_SIZE; + wiphy->max_match_sets = MRVDRV_MAX_SSID_LIST_LENGTH; +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) || defined(COMPAT_WIRELESS) + wiphy->flags |= + WIPHY_FLAG_SUPPORTS_TDLS | WIPHY_FLAG_TDLS_EXTERNAL_SETUP; +#endif + wiphy->reg_notifier = woal_cfg80211_reg_notifier; + + /* Set struct moal_handle pointer in wiphy_priv */ + wdev_priv = wiphy_priv(wiphy); + *(unsigned long *)wdev_priv = (unsigned long)priv->phandle; + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) || defined(COMPAT_WIRELESS) + set_wiphy_dev(wiphy, (struct device *)priv->phandle->hotplug_device); +#endif + /* Set phy name */ + for (index = 0; index < MAX_MLAN_ADAPTER; index++) { + if (m_handle[index] == priv->phandle) { + dev_set_name(&wiphy->dev, "mwiphy%d", index); + break; + } + } + if (wiphy_register(wiphy) < 0) { + PRINTM(MERROR, "Wiphy device registration failed!\n"); + ret = MLAN_STATUS_FAILURE; + goto err_wiphy; + } +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + if (!p2p_enh) + wiphy->interface_modes &= ~(MBIT(NL80211_IFTYPE_P2P_GO) | + MBIT(NL80211_IFTYPE_P2P_CLIENT)); +#endif +#endif + + /** we will try driver parameter first */ + if (reg_alpha2 && woal_is_valid_alpha2(reg_alpha2)) { + PRINTM(MIOCTL, "Notify reg_alpha2 %c%c\n", reg_alpha2[0], + reg_alpha2[1]); + regulatory_hint(wiphy, reg_alpha2); + } else { + country = region_code_2_string(fw_info.region_code); + if (country) { + PRINTM(MIOCTL, "Notify hw region code=%d %c%c\n", + fw_info.region_code, country[0], country[1]); + regulatory_hint(wiphy, country); + } else + PRINTM(MERROR, "hw region code=%d not supported\n", + fw_info.region_code); + } + + priv->phandle->wiphy = wiphy; + woal_cfg80211_init_wiphy(priv, MOAL_CMD_WAIT); + + return ret; +err_wiphy: + if (wiphy) + wiphy_free(wiphy); + LEAVE(); + return ret; +} + +module_param(cfg80211_drcs, int, 0); +MODULE_PARM_DESC(cfg80211_drcs, + "1: Enable DRCS support; 0: Disable DRCS support"); +module_param(reg_alpha2, charp, 0660); +MODULE_PARM_DESC(reg_alpha2, "Regulatory alpha2"); diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_sta_cfg80211.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_sta_cfg80211.h new file mode 100644 index 00000000..30dd0a7d --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_sta_cfg80211.h @@ -0,0 +1,47 @@ +/** @file moal_sta_cfg80211.h + * + * @brief This file contains the STA CFG80211 specific defines. + * + * Copyright (C) 2014-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#ifndef _MOAL_STA_CFG80211_H_ +#define _MOAL_STA_CFG80211_H_ + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) +#define IEEE80211_CHAN_PASSIVE_SCAN IEEE80211_CHAN_NO_IR +#define IEEE80211_CHAN_NO_IBSS IEEE80211_CHAN_NO_IR +#endif + +/** Convert RSSI signal strength from dBm to mBm (100*dBm) */ +#define RSSI_DBM_TO_MDM(x) ((x) * 100) + +mlan_status woal_register_sta_cfg80211(struct net_device *dev, t_u8 bss_type); + +mlan_status + +woal_cfg80211_set_key(moal_private *priv, t_u8 is_enable_wep, + t_u32 cipher, const t_u8 *key, int key_len, + const t_u8 *seq, int seq_len, t_u8 key_index, + const t_u8 *addr, int disable, t_u8 wait_option); + +mlan_status + +woal_cfg80211_set_wep_keys(moal_private *priv, const t_u8 *key, int key_len, + t_u8 index, t_u8 wait_option); + +#endif /* _MOAL_STA_CFG80211_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap.c new file mode 100644 index 00000000..f090528b --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap.c @@ -0,0 +1,3741 @@ +/** @file moal_uap.c + * + * @brief This file contains the major functions in UAP + * driver. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/******************************************************** +Change log: + 10/21/2008: initial version +********************************************************/ + +#include "moal_main.h" +#include "moal_uap.h" +#include "moal_sdio.h" +#include "moal_eth_ioctl.h" +#if defined(STA_CFG80211) && defined(UAP_CFG80211) +#include "moal_cfg80211.h" +#endif + +/******************************************************** + Local Variables +********************************************************/ + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ +/** + * @brief uap addba parameter handler + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_addba_param(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + addba_param param; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + memset(¶m, 0, sizeof(param)); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "uap_addba_param() corrupt data\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user(¶m, req->ifr_data, sizeof(param))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + PRINTM(MIOCTL, + "addba param: action=%d, timeout=%d, txwinsize=%d, rxwinsize=%d txamsdu=%d rxamsdu=%d\n", + (int)param.action, (int)param.timeout, (int)param.txwinsize, + (int)param.rxwinsize, (int)param.txamsdu, (int)param.rxamsdu); + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (ioctl_req == NULL) { + LEAVE(); + return -ENOMEM; + } + cfg_11n = (mlan_ds_11n_cfg *)ioctl_req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_ADDBA_PARAM; + ioctl_req->req_id = MLAN_IOCTL_11N_CFG; + + if (!param.action) + /* Get addba param from MLAN */ + ioctl_req->action = MLAN_ACT_GET; + else { + /* Set addba param in MLAN */ + ioctl_req->action = MLAN_ACT_SET; + cfg_11n->param.addba_param.timeout = param.timeout; + cfg_11n->param.addba_param.txwinsize = param.txwinsize; + cfg_11n->param.addba_param.rxwinsize = param.rxwinsize; + cfg_11n->param.addba_param.txamsdu = param.txamsdu; + cfg_11n->param.addba_param.rxamsdu = param.rxamsdu; + } + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + param.timeout = cfg_11n->param.addba_param.timeout; + param.txwinsize = cfg_11n->param.addba_param.txwinsize; + param.rxwinsize = cfg_11n->param.addba_param.rxwinsize; + param.txamsdu = cfg_11n->param.addba_param.txamsdu; + param.rxamsdu = cfg_11n->param.addba_param.rxamsdu; + + /* Copy to user */ + if (copy_to_user(req->ifr_data, ¶m, sizeof(param))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief uap aggr priority tbl + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_aggr_priotbl(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + aggr_prio_tbl param; + int ret = 0; + int i = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + memset(¶m, 0, sizeof(param)); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "woal_uap_aggr_priotbl() corrupt data\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user(¶m, req->ifr_data, sizeof(param))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + DBG_HEXDUMP(MCMD_D, "aggr_prio_tbl", (t_u8 *)¶m, sizeof(param)); + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (ioctl_req == NULL) { + LEAVE(); + return -ENOMEM; + } + cfg_11n = (mlan_ds_11n_cfg *)ioctl_req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_AGGR_PRIO_TBL; + ioctl_req->req_id = MLAN_IOCTL_11N_CFG; + + if (!param.action) { + /* Get aggr_prio_tbl from MLAN */ + ioctl_req->action = MLAN_ACT_GET; + } else { + /* Set aggr_prio_tbl in MLAN */ + ioctl_req->action = MLAN_ACT_SET; + for (i = 0; i < MAX_NUM_TID; i++) { + cfg_11n->param.aggr_prio_tbl.ampdu[i] = param.ampdu[i]; + cfg_11n->param.aggr_prio_tbl.amsdu[i] = param.amsdu[i]; + } + } + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + for (i = 0; i < MAX_NUM_TID; i++) { + param.ampdu[i] = cfg_11n->param.aggr_prio_tbl.ampdu[i]; + param.amsdu[i] = cfg_11n->param.aggr_prio_tbl.amsdu[i]; + } + /* Copy to user */ + if (copy_to_user(req->ifr_data, ¶m, sizeof(param))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief uap addba reject tbl + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_addba_reject(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_11n_cfg *cfg_11n = NULL; + addba_reject_para param; + int ret = 0; + int i = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + memset(¶m, 0, sizeof(param)); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "woal_uap_addba_reject() corrupt data\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user(¶m, req->ifr_data, sizeof(param))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + DBG_HEXDUMP(MCMD_D, "addba_reject tbl", (t_u8 *)¶m, sizeof(param)); + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (ioctl_req == NULL) { + LEAVE(); + return -ENOMEM; + } + cfg_11n = (mlan_ds_11n_cfg *)ioctl_req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_ADDBA_REJECT; + ioctl_req->req_id = MLAN_IOCTL_11N_CFG; + + if (!param.action) { + /* Get addba_reject tbl from MLAN */ + ioctl_req->action = MLAN_ACT_GET; + } else { + /* Set addba_reject tbl in MLAN */ + ioctl_req->action = MLAN_ACT_SET; + for (i = 0; i < MAX_NUM_TID; i++) + cfg_11n->param.addba_reject[i] = param.addba_reject[i]; + } + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + for (i = 0; i < MAX_NUM_TID; i++) + param.addba_reject[i] = cfg_11n->param.addba_reject[i]; + /* Copy to user */ + if (copy_to_user(req->ifr_data, ¶m, sizeof(param))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief uap get_fw_info handler + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_get_fw_info(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + fw_info fw; + mlan_fw_info fw_info; + int ret = 0; + + ENTER(); + memset(&fw, 0, sizeof(fw)); + memset(&fw_info, 0, sizeof(fw_info)); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "woal_uap_get_fw_info() corrupt data\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user(&fw, req->ifr_data, sizeof(fw))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if (MLAN_STATUS_SUCCESS != + woal_request_get_fw_info(priv, MOAL_IOCTL_WAIT, &fw_info)) { + ret = -EFAULT; + goto done; + } + fw.fw_release_number = fw_info.fw_ver; + fw.hw_dev_mcs_support = fw_info.hw_dev_mcs_support; + fw.region_code = fw_info.region_code; + fw.hw_dot_11n_dev_cap = fw_info.hw_dot_11n_dev_cap; + /* Copy to user */ + if (copy_to_user(req->ifr_data, &fw, sizeof(fw))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } +done: + LEAVE(); + return ret; +} + +/** + * @brief configure deep sleep + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_deep_sleep(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_pm_cfg *pm = NULL; + deep_sleep_para param; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + memset(¶m, 0, sizeof(param)); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "woal_uap_deep_sleep() corrupt data\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user(¶m, req->ifr_data, sizeof(param))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + DBG_HEXDUMP(MCMD_D, "deep_sleep_para", (t_u8 *)¶m, sizeof(param)); + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); + if (ioctl_req == NULL) { + LEAVE(); + return -ENOMEM; + } + pm = (mlan_ds_pm_cfg *)ioctl_req->pbuf; + pm->sub_command = MLAN_OID_PM_CFG_DEEP_SLEEP; + ioctl_req->req_id = MLAN_IOCTL_PM_CFG; + + if (!param.action) { + /* Get deep_sleep status from MLAN */ + ioctl_req->action = MLAN_ACT_GET; + } else { + /* Set deep_sleep in MLAN */ + ioctl_req->action = MLAN_ACT_SET; + if (param.deep_sleep == MTRUE) { + pm->param.auto_deep_sleep.auto_ds = DEEP_SLEEP_ON; + pm->param.auto_deep_sleep.idletime = param.idle_time; + } else { + pm->param.auto_deep_sleep.auto_ds = DEEP_SLEEP_OFF; + } + } + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (pm->param.auto_deep_sleep.auto_ds == DEEP_SLEEP_ON) + param.deep_sleep = MTRUE; + else + param.deep_sleep = MFALSE; + param.idle_time = pm->param.auto_deep_sleep.idletime; + /* Copy to user */ + if (copy_to_user(req->ifr_data, ¶m, sizeof(param))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief configure tx_pause settings + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_txdatapause(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_misc_cfg *misc = NULL; + tx_data_pause_para param; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + memset(¶m, 0, sizeof(param)); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "woal_uap_txdatapause corrupt data\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user(¶m, req->ifr_data, sizeof(param))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + DBG_HEXDUMP(MCMD_D, "tx_data_pause_para", (t_u8 *)¶m, + sizeof(param)); + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (ioctl_req == NULL) { + LEAVE(); + return -ENOMEM; + } + misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf; + misc->sub_command = MLAN_OID_MISC_TX_DATAPAUSE; + ioctl_req->req_id = MLAN_IOCTL_MISC_CFG; + + if (!param.action) { + /* Get Tx data pause status from MLAN */ + ioctl_req->action = MLAN_ACT_GET; + } else { + /* Set Tx data pause in MLAN */ + ioctl_req->action = MLAN_ACT_SET; + misc->param.tx_datapause.tx_pause = param.txpause; + misc->param.tx_datapause.tx_buf_cnt = param.txbufcnt; + } + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + param.txpause = misc->param.tx_datapause.tx_pause; + param.txbufcnt = misc->param.tx_datapause.tx_buf_cnt; + + /* Copy to user */ + if (copy_to_user(req->ifr_data, ¶m, sizeof(param))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief uap sdcmd52rw ioctl handler + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_sdcmd52_rw(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + sdcmd52_para param; + t_u8 func, data = 0; + int ret = 0, reg; + + ENTER(); + memset(¶m, 0, sizeof(param)); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "woal_uap_sdcmd52_rw() corrupt data\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user(¶m, req->ifr_data, sizeof(param))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + func = (t_u8)param.cmd52_params[0]; + reg = (t_u32)param.cmd52_params[1]; + + if (!param.action) { + PRINTM(MINFO, "Cmd52 read, func=%d, reg=0x%08X\n", func, reg); + sdio_claim_host(((struct sdio_mmc_card *)priv->phandle->card)-> + func); + if (func) + data = sdio_readb(((struct sdio_mmc_card *)priv-> + phandle->card)->func, reg, &ret); + else + data = sdio_f0_readb(((struct sdio_mmc_card *)priv-> + phandle->card)->func, reg, &ret); + sdio_release_host(((struct sdio_mmc_card *)priv->phandle-> + card)->func); + if (ret) { + PRINTM(MERROR, + "sdio_readb: reading register 0x%X failed\n", + reg); + goto done; + } + param.cmd52_params[2] = data; + } else { + data = (t_u8)param.cmd52_params[2]; + PRINTM(MINFO, "Cmd52 write, func=%d, reg=0x%08X, data=0x%02X\n", + func, reg, data); + sdio_claim_host(((struct sdio_mmc_card *)priv->phandle->card)-> + func); + if (func) + sdio_writeb(((struct sdio_mmc_card *)priv->phandle-> + card)->func, data, reg, &ret); + else + sdio_f0_writeb(((struct sdio_mmc_card *)priv->phandle-> + card)->func, data, reg, &ret); + sdio_release_host(((struct sdio_mmc_card *)priv->phandle-> + card)->func); + if (ret) { + PRINTM(MERROR, + "sdio_writeb: writing register 0x%X failed\n", + reg); + goto done; + } + } + /* Copy to user */ + if (copy_to_user(req->ifr_data, ¶m, sizeof(param))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + } +done: + LEAVE(); + return ret; +} + +/** + * @brief configure snmp mib + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_snmp_mib(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_snmp_mib *snmp = NULL; + snmp_mib_para param; + t_u8 value[MAX_SNMP_VALUE_SIZE]; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + memset(¶m, 0, sizeof(param)); + memset(value, 0, MAX_SNMP_VALUE_SIZE); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "woal_uap_snmp_mib() corrupt data\n"); + ret = -EFAULT; + goto done; + } + + /* Copy from user */ + if (copy_from_user(¶m, req->ifr_data, sizeof(param))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + DBG_HEXDUMP(MCMD_D, "snmp_mib_para", (t_u8 *)¶m, sizeof(param)); + if (param.action) { + if (copy_from_user(value, req->ifr_data + sizeof(param), + MIN(param.oid_val_len, + MAX_SNMP_VALUE_SIZE))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + DBG_HEXDUMP(MCMD_D, "snmp_mib_para value", value, + MIN(param.oid_val_len, sizeof(t_u32))); + } + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_snmp_mib)); + if (ioctl_req == NULL) { + LEAVE(); + return -ENOMEM; + } + snmp = (mlan_ds_snmp_mib *)ioctl_req->pbuf; + ioctl_req->req_id = MLAN_IOCTL_SNMP_MIB; + switch (param.oid) { + case OID_80211D_ENABLE: + snmp->sub_command = MLAN_OID_SNMP_MIB_DOT11D; + break; + case OID_80211H_ENABLE: + snmp->sub_command = MLAN_OID_SNMP_MIB_DOT11H; + break; + default: + PRINTM(MERROR, "%s: Unsupported SNMP_MIB OID (%d).\n", __func__, + param.oid); + goto done; + } + + if (!param.action) { + /* Get mib value from MLAN */ + ioctl_req->action = MLAN_ACT_GET; + } else { + /* Set mib value to MLAN */ + ioctl_req->action = MLAN_ACT_SET; + snmp->param.oid_value = *(t_u32 *)value; + } + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* Copy to user */ + if (copy_to_user(req->ifr_data, ¶m, sizeof(param))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } + if (!param.action) { /* GET */ + if (copy_to_user + (req->ifr_data + sizeof(param), &snmp->param.oid_value, + MIN(param.oid_val_len, sizeof(t_u32)))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief configure domain info + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_domain_info(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_11d_cfg *cfg11d = NULL; + domain_info_para param; + t_u8 tlv[MAX_DOMAIN_TLV_LEN]; + t_u16 tlv_data_len = 0; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + memset(¶m, 0, sizeof(param)); + memset(tlv, 0, MAX_DOMAIN_TLV_LEN); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "woal_uap_domain_info() corrupt data\n"); + ret = -EFAULT; + goto done; + } + + /* Copy from user */ + if (copy_from_user(¶m, req->ifr_data, sizeof(param))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + DBG_HEXDUMP(MCMD_D, "domain_info_para", (t_u8 *)¶m, sizeof(param)); + if (param.action) { + /* get tlv header */ + if (copy_from_user + (tlv, req->ifr_data + sizeof(param), TLV_HEADER_LEN)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + tlv_data_len = ((t_u16 *)(tlv))[1]; + if ((TLV_HEADER_LEN + tlv_data_len) > sizeof(tlv)) { + PRINTM(MERROR, "TLV buffer is overflowed"); + ret = -EINVAL; + goto done; + } + /* get full tlv */ + if (copy_from_user(tlv, req->ifr_data + sizeof(param), + TLV_HEADER_LEN + tlv_data_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + DBG_HEXDUMP(MCMD_D, "domain_info_para tlv", tlv, + TLV_HEADER_LEN + tlv_data_len); + } + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11d_cfg)); + if (ioctl_req == NULL) { + LEAVE(); + return -ENOMEM; + } + cfg11d = (mlan_ds_11d_cfg *)ioctl_req->pbuf; + ioctl_req->req_id = MLAN_IOCTL_11D_CFG; + cfg11d->sub_command = MLAN_OID_11D_DOMAIN_INFO; + + if (!param.action) { + /* Get mib value from MLAN */ + ioctl_req->action = MLAN_ACT_GET; + } else { + /* Set mib value to MLAN */ + ioctl_req->action = MLAN_ACT_SET; + memcpy(cfg11d->param.domain_tlv, tlv, + MIN(MAX_IE_SIZE, (TLV_HEADER_LEN + tlv_data_len))); + } + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* Copy to user */ + if (copy_to_user(req->ifr_data, ¶m, sizeof(param))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } + if (!param.action) { /* GET */ + tlv_data_len = ((t_u16 *)(cfg11d->param.domain_tlv))[1]; + if (copy_to_user + (req->ifr_data + sizeof(param), &cfg11d->param.domain_tlv, + TLV_HEADER_LEN + tlv_data_len)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +#if defined(DFS_TESTING_SUPPORT) +/** + * @brief configure dfs testing settings + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_dfs_testing(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_11h_cfg *cfg11h = NULL; + dfs_testing_para param; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + memset(¶m, 0, sizeof(param)); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "woal_uap_dfs_testing() corrupt data\n"); + ret = -EFAULT; + goto done; + } + + /* Copy from user */ + if (copy_from_user(¶m, req->ifr_data, sizeof(param))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + DBG_HEXDUMP(MCMD_D, "dfs_testing_para", (t_u8 *)¶m, sizeof(param)); + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11h_cfg)); + if (ioctl_req == NULL) { + LEAVE(); + return -ENOMEM; + } + cfg11h = (mlan_ds_11h_cfg *)ioctl_req->pbuf; + ioctl_req->req_id = MLAN_IOCTL_11H_CFG; + cfg11h->sub_command = MLAN_OID_11H_DFS_TESTING; + + if (!param.action) { + /* Get mib value from MLAN */ + ioctl_req->action = MLAN_ACT_GET; + } else { + /* Set mib value to MLAN */ + ioctl_req->action = MLAN_ACT_SET; + cfg11h->param.dfs_testing.usr_cac_period_msec = + param.usr_cac_period; + cfg11h->param.dfs_testing.usr_nop_period_sec = + param.usr_nop_period; + cfg11h->param.dfs_testing.usr_no_chan_change = + param.no_chan_change; + cfg11h->param.dfs_testing.usr_fixed_new_chan = + param.fixed_new_chan; + priv->phandle->cac_period_jiffies = + param.usr_cac_period * HZ / 1000; + } + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (!param.action) { /* GET */ + param.usr_cac_period = + cfg11h->param.dfs_testing.usr_cac_period_msec; + param.usr_nop_period = + cfg11h->param.dfs_testing.usr_nop_period_sec; + param.no_chan_change = + cfg11h->param.dfs_testing.usr_no_chan_change; + param.fixed_new_chan = + cfg11h->param.dfs_testing.usr_fixed_new_chan; + } + /* Copy to user */ + if (copy_to_user(req->ifr_data, ¶m, sizeof(param))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} +#endif + +/** + * @brief Configure TX beamforming support + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_tx_bf_cfg(struct net_device *dev, struct ifreq *req) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ds_11n_tx_bf_cfg bf_cfg; + tx_bf_cfg_para_hdr param; + t_u16 action = 0; + + ENTER(); + + memset(¶m, 0, sizeof(param)); + memset(&bf_cfg, 0, sizeof(bf_cfg)); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "woal_uap_tx_bf_cfg corrupt data\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user(¶m, req->ifr_data, sizeof(param))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if (!param.action) + /* Get BF configurations */ + action = MLAN_ACT_GET; + else + /* Set BF configurations */ + action = MLAN_ACT_SET; + if (copy_from_user(&bf_cfg, req->ifr_data + sizeof(tx_bf_cfg_para_hdr), + sizeof(bf_cfg))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + DBG_HEXDUMP(MCMD_D, "bf_cfg", (t_u8 *)&bf_cfg, sizeof(bf_cfg)); + + if (MLAN_STATUS_SUCCESS != + woal_set_get_tx_bf_cfg(priv, action, &bf_cfg)) { + ret = -EFAULT; + goto done; + } + + /* Copy to user */ + if (copy_to_user(req->ifr_data + sizeof(tx_bf_cfg_para_hdr), + &bf_cfg, sizeof(bf_cfg))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Set/Get 11n configurations + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_ht_tx_cfg(struct net_device *dev, struct ifreq *req) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ds_11n_cfg *cfg_11n = NULL; + mlan_ds_11n_tx_cfg httx_cfg; + mlan_ioctl_req *ioctl_req = NULL; + ht_tx_cfg_para_hdr param; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(¶m, 0, sizeof(ht_tx_cfg_para_hdr)); + memset(&httx_cfg, 0, sizeof(mlan_ds_11n_tx_cfg)); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "woal_uap_ht_tx_cfg corrupt data\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user(¶m, req->ifr_data, sizeof(ht_tx_cfg_para_hdr))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + cfg_11n = (mlan_ds_11n_cfg *)ioctl_req->pbuf; + cfg_11n->sub_command = MLAN_OID_11N_CFG_TX; + ioctl_req->req_id = MLAN_IOCTL_11N_CFG; + if (copy_from_user + (&httx_cfg, req->ifr_data + sizeof(ht_tx_cfg_para_hdr), + sizeof(mlan_ds_11n_tx_cfg))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if (!param.action) { + /* Get 11n tx parameters from MLAN */ + ioctl_req->action = MLAN_ACT_GET; + cfg_11n->param.tx_cfg.misc_cfg = BAND_SELECT_BG; + } else { + /* Set HT Tx configurations */ + cfg_11n->param.tx_cfg.httxcap = httx_cfg.httxcap; + PRINTM(MINFO, "SET: httxcap:0x%x\n", httx_cfg.httxcap); + cfg_11n->param.tx_cfg.misc_cfg = httx_cfg.misc_cfg; + PRINTM(MINFO, "SET: httxcap band:0x%x\n", httx_cfg.misc_cfg); + /* Update 11n tx parameters in MLAN */ + ioctl_req->action = MLAN_ACT_SET; + } + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (ioctl_req->action == MLAN_ACT_GET) { + httx_cfg.httxcap = cfg_11n->param.tx_cfg.httxcap; + PRINTM(MINFO, "GET: httxcap:0x%x\n", httx_cfg.httxcap); + cfg_11n->param.tx_cfg.httxcap = 0; + cfg_11n->param.tx_cfg.misc_cfg = BAND_SELECT_A; + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + httx_cfg.misc_cfg = cfg_11n->param.tx_cfg.httxcap; + PRINTM(MINFO, "GET: httxcap for 5GHz:0x%x\n", + httx_cfg.misc_cfg); + } + /* Copy to user */ + if (copy_to_user(req->ifr_data + sizeof(ht_tx_cfg_para_hdr), + &httx_cfg, sizeof(mlan_ds_11n_tx_cfg))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get Set/Get 11AC configurations + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_vht_cfg(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + int ret = 0, resbuf_len = 0; + mlan_ds_11ac_cfg *cfg_11ac = NULL; + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_11ac_vht_cfg *vhtcfg = NULL, vht_cfg; + t_u8 *respbuf = NULL; + vht_cfg_para_hdr param; + mlan_status status = MLAN_STATUS_SUCCESS; +#define CMD_RESPBUF_LEN 2048 + gfp_t flag; + + ENTER(); + + memset(¶m, 0, sizeof(vht_cfg_para_hdr)); + + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + respbuf = kzalloc(CMD_RESPBUF_LEN, flag); + if (!respbuf) { + ret = -ENOMEM; + goto done; + } + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "woal_uap_ht_tx_cfg corrupt data\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user(¶m, req->ifr_data, sizeof(vht_cfg_para_hdr))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11ac_cfg)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + cfg_11ac = (mlan_ds_11ac_cfg *)ioctl_req->pbuf; + cfg_11ac->sub_command = MLAN_OID_11AC_VHT_CFG; + ioctl_req->req_id = MLAN_IOCTL_11AC_CFG; + if (copy_from_user(&vht_cfg, req->ifr_data + sizeof(vht_cfg_para_hdr), + sizeof(mlan_ds_11ac_vht_cfg))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if (vht_cfg.band == BAND_SELECT_BOTH) { + cfg_11ac->param.vht_cfg.band = (BAND_SELECT_BG | BAND_SELECT_A); + } else { + cfg_11ac->param.vht_cfg.band = vht_cfg.band; + } + if (!param.action) { + /* GET operation */ + if (vht_cfg.band == BAND_SELECT_BOTH) { + /* if get both bands, get BG first */ + cfg_11ac->param.vht_cfg.band = BAND_SELECT_BG; + } + PRINTM(MINFO, "GET: vhtcfg band: 0x%x\n", + cfg_11ac->param.vht_cfg.band); + if (priv->bss_role == MLAN_BSS_ROLE_UAP) + cfg_11ac->param.vht_cfg.txrx = MLAN_RADIO_RX; + else + cfg_11ac->param.vht_cfg.txrx = vht_cfg.txrx; + PRINTM(MINFO, "GET: vhtcfg txrx: 0x%x\n", + cfg_11ac->param.vht_cfg.txrx); + ioctl_req->action = MLAN_ACT_GET; + } else { + /* Band */ + cfg_11ac->param.vht_cfg.band = vht_cfg.band; + PRINTM(MINFO, "SET: vhtcfg band: 0x%x\n", + cfg_11ac->param.vht_cfg.band); + /* Tx/Rx */ + cfg_11ac->param.vht_cfg.txrx = vht_cfg.txrx; + PRINTM(MINFO, "SET: vhtcfg txrx: 0x%x\n", + cfg_11ac->param.vht_cfg.txrx); + /* BW cfg */ + cfg_11ac->param.vht_cfg.bwcfg = vht_cfg.bwcfg; + PRINTM(MINFO, "SET: vhtcfg bw cfg:0x%x\n", + cfg_11ac->param.vht_cfg.bwcfg); + + cfg_11ac->param.vht_cfg.vht_cap_info = vht_cfg.vht_cap_info; + PRINTM(MINFO, "SET: vhtcfg vht_cap_info:0x%x\n", + cfg_11ac->param.vht_cfg.vht_cap_info); + cfg_11ac->param.vht_cfg.vht_tx_mcs = vht_cfg.vht_tx_mcs; + cfg_11ac->param.vht_cfg.vht_rx_mcs = vht_cfg.vht_rx_mcs; + /* Update 11AC parameters in MLAN */ + ioctl_req->action = MLAN_ACT_SET; + } + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* number of vhtcfg entries */ + *respbuf = 1; + vhtcfg = (mlan_ds_11ac_vht_cfg *)(respbuf + 1); + memcpy(vhtcfg, &cfg_11ac->param.vht_cfg, sizeof(mlan_ds_11ac_vht_cfg)); + resbuf_len = 1 + sizeof(mlan_ds_11ac_vht_cfg); + + if ((ioctl_req->action == MLAN_ACT_GET) && + (vht_cfg.band == BAND_SELECT_BOTH)) { + cfg_11ac->param.vht_cfg.band = BAND_SELECT_A; + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + /* number of vhtcfg entries */ + *respbuf = 2; + vhtcfg++; + memcpy(vhtcfg, &cfg_11ac->param.vht_cfg, + sizeof(mlan_ds_11ac_vht_cfg)); + resbuf_len += sizeof(mlan_ds_11ac_vht_cfg); + } + if (ioctl_req->action == MLAN_ACT_GET) { + if (copy_to_user(req->ifr_data, respbuf, resbuf_len)) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + } + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + if (respbuf) + kfree(respbuf); + LEAVE(); + return ret; +} + +/** + * @brief uap hs_cfg ioctl handler + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_hs_cfg(struct net_device *dev, struct ifreq *req, + BOOLEAN invoke_hostcmd) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ds_hs_cfg hscfg; + ds_hs_cfg hs_cfg; + mlan_bss_info bss_info; + t_u16 action; + int ret = 0; + + ENTER(); + + memset(&hscfg, 0, sizeof(mlan_ds_hs_cfg)); + memset(&hs_cfg, 0, sizeof(ds_hs_cfg)); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "uap_hs_cfg() corrupt data\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user(&hs_cfg, req->ifr_data, sizeof(ds_hs_cfg))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + PRINTM(MIOCTL, + "ioctl hscfg: flags=0x%x condition=0x%x gpio=%d gap=0x%x\n", + hs_cfg.flags, hs_cfg.conditions, (int)hs_cfg.gpio, hs_cfg.gap); + + /* HS config is blocked if HS is already activated */ + if ((hs_cfg.flags & HS_CFG_FLAG_CONDITION) && + (hs_cfg.conditions != HOST_SLEEP_CFG_CANCEL || + invoke_hostcmd == MFALSE)) { + memset(&bss_info, 0, sizeof(bss_info)); + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + if (bss_info.is_hs_configured) { + PRINTM(MERROR, "HS already configured\n"); + ret = -EFAULT; + goto done; + } + } + + if (hs_cfg.flags & HS_CFG_FLAG_SET) { + action = MLAN_ACT_SET; + if (hs_cfg.flags != HS_CFG_FLAG_ALL) { + woal_set_get_hs_params(priv, MLAN_ACT_GET, + MOAL_IOCTL_WAIT, &hscfg); + } + if (hs_cfg.flags & HS_CFG_FLAG_CONDITION) + hscfg.conditions = hs_cfg.conditions; + if (hs_cfg.flags & HS_CFG_FLAG_GPIO) + hscfg.gpio = hs_cfg.gpio; + if (hs_cfg.flags & HS_CFG_FLAG_GAP) + hscfg.gap = hs_cfg.gap; + + if (invoke_hostcmd == MTRUE) { + /* Issue IOCTL to set up parameters */ + hscfg.is_invoke_hostcmd = MFALSE; + if (MLAN_STATUS_SUCCESS != + woal_set_get_hs_params(priv, action, + MOAL_IOCTL_WAIT, &hscfg)) { + ret = -EFAULT; + goto done; + } + } + } else { + action = MLAN_ACT_GET; + } + + /* Issue IOCTL to invoke hostcmd */ + hscfg.is_invoke_hostcmd = invoke_hostcmd; + if (MLAN_STATUS_SUCCESS != + woal_set_get_hs_params(priv, action, MOAL_IOCTL_WAIT, &hscfg)) { + ret = -EFAULT; + goto done; + } + if (!(hs_cfg.flags & HS_CFG_FLAG_SET)) { + hs_cfg.flags = + HS_CFG_FLAG_CONDITION | HS_CFG_FLAG_GPIO | + HS_CFG_FLAG_GAP; + hs_cfg.conditions = hscfg.conditions; + hs_cfg.gpio = hscfg.gpio; + hs_cfg.gap = hscfg.gap; + /* Copy to user */ + if (copy_to_user(req->ifr_data, &hs_cfg, sizeof(ds_hs_cfg))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Set Host Sleep parameters + * + * @param priv A pointer to moal_private structure + * @param wrq A pointer to iwreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_uap_hs_set_para(struct net_device *dev, struct ifreq *req) +{ + int ret = 0; + + ENTER(); + + if (req->ifr_data != NULL) { + ret = woal_uap_hs_cfg(dev, req, MFALSE); + goto done; + } else { + PRINTM(MERROR, "Invalid data\n"); + ret = -EINVAL; + goto done; + } +done: + LEAVE(); + return ret; +} + +/** + * @brief uap mgmt_frame_control ioctl handler + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_mgmt_frame_control(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + int ret = 0; + t_u16 action = 0; + mgmt_frame_ctrl param; + mlan_uap_bss_param sys_config; + + ENTER(); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "uap_mgmt_frame_ctrl() corrupt data\n"); + ret = -EFAULT; + goto done; + } + + /* Get user data */ + if (copy_from_user(¶m, req->ifr_data, sizeof(param))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if (param.action) + action = MLAN_ACT_SET; + else + action = MLAN_ACT_GET; + if (action == MLAN_ACT_SET) { + /* Initialize the invalid values so that the correct values + below are downloaded to firmware */ + woal_set_sys_config_invalid_data(&sys_config); + sys_config.mgmt_ie_passthru_mask = param.mask; + } + + if (MLAN_STATUS_SUCCESS != + woal_set_get_sys_config(priv, action, MOAL_IOCTL_WAIT, + &sys_config)) { + ret = -EFAULT; + goto done; + } + + if (action == MLAN_ACT_GET) { + param.mask = sys_config.mgmt_ie_passthru_mask; + if (copy_to_user(req->ifr_data, ¶m, sizeof(param))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + } + } +done: + LEAVE(); + return ret; +} + +/** + * @brief Set/Get tx rate + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_uap_tx_rate_cfg(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + int ret = 0, i = 0; + mlan_ds_rate *rate = NULL; + mlan_ioctl_req *mreq = NULL; + tx_rate_cfg_t tx_rate_config; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "uap_tx_rate_cfg() corrupt data\n"); + ret = -EFAULT; + goto done; + } + + memset(&tx_rate_config, 0, sizeof(tx_rate_cfg_t)); + /* Get user data */ + if (copy_from_user + (&tx_rate_config, req->ifr_data, sizeof(tx_rate_cfg_t))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + mreq = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_rate)); + if (mreq == NULL) { + ret = -ENOMEM; + goto done; + } + rate = (mlan_ds_rate *)mreq->pbuf; + rate->param.rate_cfg.rate_type = MLAN_RATE_INDEX; + rate->sub_command = MLAN_OID_RATE_CFG; + mreq->req_id = MLAN_IOCTL_RATE; + if (!(tx_rate_config.action)) + mreq->action = MLAN_ACT_GET; + else { + if ((tx_rate_config.user_data_cnt <= 0) || + (tx_rate_config.user_data_cnt > 3)) { + PRINTM(MERROR, "Invalid user_data_cnt\n"); + ret = -EINVAL; + goto done; + } + + mreq->action = MLAN_ACT_SET; + if (tx_rate_config.rate_format == AUTO_RATE) + rate->param.rate_cfg.is_rate_auto = 1; + else { + if ((tx_rate_config.rate_format < 0) || + (tx_rate_config.rate < 0)) { + PRINTM(MERROR, + "Invalid format or rate selection\n"); + ret = -EINVAL; + goto done; + } + /* rate_format sanity check */ + if ((tx_rate_config.rate_format > MLAN_RATE_FORMAT_VHT) + ) { + PRINTM(MERROR, "Invalid format selection\n"); + ret = -EINVAL; + goto done; + } + rate->param.rate_cfg.rate_format = + tx_rate_config.rate_format; + + /* rate sanity check */ + if (tx_rate_config.user_data_cnt >= 2) { + if (((tx_rate_config.rate_format == + MLAN_RATE_FORMAT_LG) && + (tx_rate_config.rate > + MLAN_RATE_INDEX_OFDM7)) + || + ((tx_rate_config.rate_format == + MLAN_RATE_FORMAT_HT) && + (tx_rate_config.rate != 32) && + (tx_rate_config.rate > 15) + ) + || + ((tx_rate_config.rate_format == + MLAN_RATE_FORMAT_VHT) && + (tx_rate_config.rate > + MLAN_RATE_INDEX_MCS9)) + ) { + PRINTM(MERROR, + "Invalid rate selection\n"); + ret = -EINVAL; + goto done; + } + rate->param.rate_cfg.rate = tx_rate_config.rate; + } + + /* nss sanity check */ + if (tx_rate_config.user_data_cnt == 3) { + if ((tx_rate_config.nss < 1) || + (tx_rate_config.nss > 2)) { + PRINTM(MERROR, + "Invalid nss selection %d\n", + tx_rate_config.nss); + ret = -EINVAL; + goto done; + } + rate->param.rate_cfg.nss = tx_rate_config.nss; + } + } + } + + status = woal_request_ioctl(priv, mreq, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (tx_rate_config.action) { + priv->rate_index = tx_rate_config.action; + } else { + if (rate->param.rate_cfg.is_rate_auto) + tx_rate_config.rate_format = AUTO_RATE; + else { + /* fixed rate */ + tx_rate_config.rate_format = + rate->param.rate_cfg.rate_format; + tx_rate_config.rate = rate->param.rate_cfg.rate; + if (rate->param.rate_cfg.rate_format == + MLAN_RATE_FORMAT_VHT) + tx_rate_config.nss = rate->param.rate_cfg.nss; + } + for (i = 0; i < MAX_BITMAP_RATES_SIZE; i++) { + tx_rate_config.bitmap_rates[i] = + rate->param.rate_cfg.bitmap_rates[i]; + } + + if (copy_to_user + (req->ifr_data, &tx_rate_config, sizeof(tx_rate_cfg_t))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + } + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(mreq); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get RF antenna mode + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_uap_antenna_cfg(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + int ret = 0; + mlan_ds_radio_cfg *radio = NULL; + mlan_ioctl_req *mreq = NULL; + ant_cfg_t antenna_config; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "uap_antenna_cfg() corrupt data\n"); + ret = -EFAULT; + goto done; + } + + memset(&antenna_config, 0, sizeof(ant_cfg_t)); + /* Get user data */ + if (copy_from_user(&antenna_config, req->ifr_data, sizeof(ant_cfg_t))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + mreq = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_radio_cfg)); + if (mreq == NULL) { + ret = -ENOMEM; + goto done; + } + radio = (mlan_ds_radio_cfg *)mreq->pbuf; + radio->sub_command = MLAN_OID_ANT_CFG; + mreq->req_id = MLAN_IOCTL_RADIO_CFG; + if (!(antenna_config.action)) + mreq->action = MLAN_ACT_GET; + else { + mreq->action = MLAN_ACT_SET; + radio->param.ant_cfg.tx_antenna = antenna_config.tx_mode; + radio->param.ant_cfg.rx_antenna = antenna_config.rx_mode; + } + + status = woal_request_ioctl(priv, mreq, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (mreq->action == MLAN_ACT_GET) { + antenna_config.tx_mode = radio->param.ant_cfg.tx_antenna; + antenna_config.rx_mode = radio->param.ant_cfg.rx_antenna; + if (copy_to_user + (req->ifr_data, &antenna_config, sizeof(ant_cfg_t))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + } + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(mreq); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get HT stream configurations + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_uap_htstream_cfg(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + int ret = 0; + mlan_ds_11n_cfg *cfg = NULL; + mlan_ioctl_req *ioctl_req = NULL; + htstream_cfg_t htstream_cfg; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(&htstream_cfg, 0, sizeof(htstream_cfg_t)); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "woal_uap_htstream_cfg corrupt data\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user + (&htstream_cfg, req->ifr_data, sizeof(htstream_cfg_t))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + cfg = (mlan_ds_11n_cfg *)ioctl_req->pbuf; + cfg->sub_command = MLAN_OID_11N_CFG_STREAM_CFG; + ioctl_req->req_id = MLAN_IOCTL_11N_CFG; + + if (!htstream_cfg.action) { + /* Get operation */ + ioctl_req->action = MLAN_ACT_GET; + } else { + /* Update HT stream parameter in MLAN */ + ioctl_req->action = MLAN_ACT_SET; + /* Set HT Stream configuration */ + cfg->param.stream_cfg = htstream_cfg.stream_cfg; + PRINTM(MINFO, "SET: htstream_cfg:0x%x\n", + cfg->param.stream_cfg); + } + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + /* Copy to user */ + if (ioctl_req->action == MLAN_ACT_GET) { + PRINTM(MINFO, "GET: htstream_cfg:0x%x\n", + htstream_cfg.stream_cfg); + htstream_cfg.stream_cfg = cfg->param.stream_cfg; + if (copy_to_user(req->ifr_data, + &htstream_cfg, sizeof(htstream_cfg_t))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief Get DFS_REPEATER mode + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_uap_cac_timer_status(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + int ret = 0; + cac_timer_status param; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "uap_antenna_cfg() corrupt data\n"); + ret = -EFAULT; + goto done; + } + + memset(¶m, 0, sizeof(cac_timer_status)); + + /* Get user data */ + if (copy_from_user(¶m, req->ifr_data, sizeof(cac_timer_status))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + /* Currently default action is get */ + param.mode = 0; + + if (priv->phandle->cac_period == MTRUE) { + long cac_left_jiffies; + + cac_left_jiffies = MEAS_REPORT_TIME - + (jiffies - priv->phandle->meas_start_jiffies); + + /* cac_left_jiffies would be negative if timer has already + elapsed. positive if timer is still yet to lapsed */ + if (cac_left_jiffies > 0) + param.mode = (t_u32)cac_left_jiffies / HZ; + } + + if (copy_to_user(req->ifr_data, ¶m, sizeof(cac_timer_status))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + } +done: + if (status != MLAN_STATUS_PENDING) + LEAVE(); + return ret; +} + +/** + * @brief set/get uap operation control + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_uap_operation_ctrl(struct net_device *dev, struct ifreq *req) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_uap_oper_ctrl uap_oper; + uap_oper_para_hdr param; + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *ioctl_req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(¶m, 0, sizeof(uap_oper_para_hdr)); + memset(&uap_oper, 0, sizeof(mlan_uap_oper_ctrl)); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "woal_uap_operation_ctrl corrupt data\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user(¶m, req->ifr_data, sizeof(uap_oper_para_hdr))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (ioctl_req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + bss = (mlan_ds_bss *)ioctl_req->pbuf; + bss->sub_command = MLAN_OID_UAP_OPER_CTRL; + ioctl_req->req_id = MLAN_IOCTL_BSS; + if (copy_from_user(&uap_oper, req->ifr_data + sizeof(uap_oper_para_hdr), + sizeof(mlan_uap_oper_ctrl))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + if (!param.action) { + /* Get uap operation control parameters from FW */ + ioctl_req->action = MLAN_ACT_GET; + } else { + /* Set uap operation control configurations */ + ioctl_req->action = MLAN_ACT_SET; + bss->param.ap_oper_ctrl.ctrl_value = uap_oper.ctrl_value; + if (uap_oper.ctrl_value == 2) + bss->param.ap_oper_ctrl.chan_opt = uap_oper.chan_opt; + if (uap_oper.chan_opt == 3) { + bss->param.ap_oper_ctrl.band_cfg = uap_oper.band_cfg; + bss->param.ap_oper_ctrl.channel = uap_oper.channel; + } + + } + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + /* Copy to user */ + if (copy_to_user(req->ifr_data + sizeof(uap_oper_para_hdr), + &bss->param.ap_oper_ctrl, + sizeof(mlan_uap_oper_ctrl))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief uap ioctl handler + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_ioctl(struct net_device *dev, struct ifreq *req) +{ + int ret = 0; + t_u32 subcmd = 0; + ENTER(); + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "uap_ioctl() corrupt data\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user(&subcmd, req->ifr_data, sizeof(subcmd))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + PRINTM(MIOCTL, "ioctl subcmd=%d\n", (int)subcmd); + switch (subcmd) { + case UAP_ADDBA_PARA: + ret = woal_uap_addba_param(dev, req); + break; + case UAP_AGGR_PRIOTBL: + ret = woal_uap_aggr_priotbl(dev, req); + break; + case UAP_ADDBA_REJECT: + ret = woal_uap_addba_reject(dev, req); + break; + case UAP_FW_INFO: + ret = woal_uap_get_fw_info(dev, req); + break; + case UAP_DEEP_SLEEP: + ret = woal_uap_deep_sleep(dev, req); + break; + case UAP_TX_DATA_PAUSE: + ret = woal_uap_txdatapause(dev, req); + break; + case UAP_SDCMD52_RW: + ret = woal_uap_sdcmd52_rw(dev, req); + break; + case UAP_SNMP_MIB: + ret = woal_uap_snmp_mib(dev, req); + break; +#ifdef DFS_TESTING_SUPPORT + case UAP_DFS_TESTING: + ret = woal_uap_dfs_testing(dev, req); + break; +#endif + case UAP_DOMAIN_INFO: + ret = woal_uap_domain_info(dev, req); + break; + case UAP_TX_BF_CFG: + ret = woal_uap_tx_bf_cfg(dev, req); + break; + case UAP_HT_TX_CFG: + ret = woal_uap_ht_tx_cfg(dev, req); + break; + case UAP_VHT_CFG: + ret = woal_uap_vht_cfg(dev, req); + break; + case UAP_HS_CFG: + ret = woal_uap_hs_cfg(dev, req, MTRUE); + break; + case UAP_HS_SET_PARA: + ret = woal_uap_hs_set_para(dev, req); + break; + case UAP_MGMT_FRAME_CONTROL: + ret = woal_uap_mgmt_frame_control(dev, req); + break; + case UAP_TX_RATE_CFG: + ret = woal_uap_tx_rate_cfg(dev, req); + break; + case UAP_ANTENNA_CFG: + ret = woal_uap_antenna_cfg(dev, req); + break; + case UAP_HT_STREAM_CFG: + ret = woal_uap_htstream_cfg(dev, req); + break; + case UAP_CAC_TIMER_STATUS: + ret = woal_uap_cac_timer_status(dev, req); + break; + case UAP_OPERATION_CTRL: + ret = woal_uap_operation_ctrl(dev, req); + break; + default: + break; + } +done: + LEAVE(); + return ret; +} + +/** + * @brief uap station deauth ioctl handler + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_sta_deauth_ioctl(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_bss *bss = NULL; + mlan_deauth_param deauth_param; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(&deauth_param, 0, sizeof(mlan_deauth_param)); + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "uap_sta_deauth_ioctl() corrupt data\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user + (&deauth_param, req->ifr_data, sizeof(mlan_deauth_param))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + PRINTM(MIOCTL, "ioctl deauth station: " MACSTR ", reason=%d\n", + MAC2STR(deauth_param.mac_addr), deauth_param.reason_code); + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + bss = (mlan_ds_bss *)ioctl_req->pbuf; + + bss->sub_command = MLAN_OID_UAP_DEAUTH_STA; + ioctl_req->req_id = MLAN_IOCTL_BSS; + ioctl_req->action = MLAN_ACT_SET; + + memcpy(&bss->param.deauth_param, &deauth_param, + sizeof(mlan_deauth_param)); + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + if (copy_to_user + (req->ifr_data, &ioctl_req->status_code, sizeof(t_u32))) + PRINTM(MERROR, "Copy to user failed!\n"); + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get radio + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_uap_radio_ctl(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + int ret = 0; + mlan_ds_radio_cfg *radio = NULL; + mlan_ioctl_req *mreq = NULL; + int data[2] = { 0, 0 }; + mlan_bss_info bss_info; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "uap_radio_ctl() corrupt data\n"); + ret = -EFAULT; + goto done; + } + + /* Get user data */ + if (copy_from_user(&data, req->ifr_data, sizeof(data))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + if (data[0]) { + mreq = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_radio_cfg)); + if (mreq == NULL) { + ret = -ENOMEM; + goto done; + } + radio = (mlan_ds_radio_cfg *)mreq->pbuf; + radio->sub_command = MLAN_OID_RADIO_CTRL; + mreq->req_id = MLAN_IOCTL_RADIO_CFG; + mreq->action = MLAN_ACT_SET; + radio->param.radio_on_off = (t_u32)data[1]; + status = woal_request_ioctl(priv, mreq, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) + ret = -EFAULT; + if (status != MLAN_STATUS_PENDING) + kfree(mreq); + } else { + /* Get radio status */ + memset(&bss_info, 0, sizeof(bss_info)); + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + + data[1] = bss_info.radio_on; + if (copy_to_user(req->ifr_data, data, sizeof(data))) { + PRINTM(MERROR, "Copy to user failed\n"); + ret = -EFAULT; + } + } +done: + LEAVE(); + return ret; +} + +/** + * @brief uap bss control ioctl handler + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_bss_ctrl_ioctl(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + int ret = 0, data = 0; + + ENTER(); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "uap_bss_ctrl() corrupt data\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user(&data, req->ifr_data, sizeof(data))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + ret = woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, data); + +done: + LEAVE(); + return ret; +} + +/** + * @brief uap report mic error ioctl handler + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_report_mic_ioctl(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_sec_cfg *sec = NULL; + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(mac_addr, 0, MLAN_MAC_ADDR_LENGTH); + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "uap_report_mic_ioctl() corrupt data\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user(mac_addr, req->ifr_data, MLAN_MAC_ADDR_LENGTH)) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + PRINTM(MINFO, "ioctl report mic err station: " MACSTR "\n", + MAC2STR(mac_addr)); + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + + sec = (mlan_ds_sec_cfg *)ioctl_req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_REPORT_MIC_ERR; + ioctl_req->req_id = MLAN_IOCTL_SEC_CFG; + ioctl_req->action = MLAN_ACT_SET; + memcpy(sec->param.sta_mac, mac_addr, MLAN_MAC_ADDR_LENGTH); + + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief uap set key ioctl handler + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_set_key_ioctl(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_sec_cfg *sec = NULL; + encrypt_key key; + int ret = 0; + t_u8 bcast_addr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(&key, 0, sizeof(encrypt_key)); + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "uap_set_key_ioctl() corrupt data\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user(&key, req->ifr_data, sizeof(encrypt_key))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + PRINTM(MIOCTL, + "ioctl report set key: " MACSTR " key_index=%d, key_len=%d \n", + MAC2STR(key.mac_addr), (int)key.key_index, (int)key.key_len); + + if ((key.key_len > MLAN_MAX_KEY_LENGTH) || (key.key_index > 3)) { + ret = -EINVAL; + goto done; + } + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + + sec = (mlan_ds_sec_cfg *)ioctl_req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY, + ioctl_req->req_id = MLAN_IOCTL_SEC_CFG; + ioctl_req->action = MLAN_ACT_SET; + + memcpy(sec->param.encrypt_key.mac_addr, key.mac_addr, + MLAN_MAC_ADDR_LENGTH); + sec->param.encrypt_key.key_index = key.key_index; + sec->param.encrypt_key.key_len = key.key_len; + memcpy(sec->param.encrypt_key.key_material, key.key_material, + key.key_len); + if (0 == memcmp(sec->param.encrypt_key.mac_addr, bcast_addr, ETH_ALEN)) + sec->param.encrypt_key.key_flags = KEY_FLAG_GROUP_KEY; + else + sec->param.encrypt_key.key_flags = KEY_FLAG_SET_TX_KEY; + + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get uap power mode + * + * @param priv A pointer to moal_private structure + * @param action Action set or get + * @param ps_mgmt A pointer to mlan_ds_ps_mgmt structure + * + * @return MLAN_STATUS_SUCCESS -- success, otherwise fail + */ +int +woal_set_get_uap_power_mode(moal_private *priv, t_u32 action, + mlan_ds_ps_mgmt *ps_mgmt) +{ + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_pm_cfg *pm_cfg = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + if (!ps_mgmt) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); + if (ioctl_req == NULL) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + pm_cfg = (mlan_ds_pm_cfg *)ioctl_req->pbuf; + pm_cfg->sub_command = MLAN_OID_PM_CFG_PS_MODE; + ioctl_req->req_id = MLAN_IOCTL_PM_CFG; + ioctl_req->action = action; + if (action == MLAN_ACT_SET) + memcpy(&pm_cfg->param.ps_mgmt, ps_mgmt, + sizeof(mlan_ds_ps_mgmt)); + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status == MLAN_STATUS_SUCCESS) { + if (action == MLAN_ACT_GET) + memcpy(ps_mgmt, &pm_cfg->param.ps_mgmt, + sizeof(mlan_ds_ps_mgmt)); + } + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return status; +} + +/** + * @brief uap power mode ioctl handler + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_power_mode_ioctl(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_pm_cfg *pm_cfg = NULL; + mlan_ds_ps_mgmt ps_mgmt; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(&ps_mgmt, 0, sizeof(mlan_ds_ps_mgmt)); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "uap_power_mode_ioctl() corrupt data\n"); + ret = -EFAULT; + goto done; + } + if (copy_from_user(&ps_mgmt, req->ifr_data, sizeof(mlan_ds_ps_mgmt))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + PRINTM(MIOCTL, + "ioctl power: flag=0x%x ps_mode=%d ctrl_bitmap=%d min_sleep=%d max_sleep=%d " + "inact_to=%d min_awake=%d max_awake=%d\n", ps_mgmt.flags, + (int)ps_mgmt.ps_mode, (int)ps_mgmt.sleep_param.ctrl_bitmap, + (int)ps_mgmt.sleep_param.min_sleep, + (int)ps_mgmt.sleep_param.max_sleep, + (int)ps_mgmt.inact_param.inactivity_to, + (int)ps_mgmt.inact_param.min_awake, + (int)ps_mgmt.inact_param.max_awake); + + if (ps_mgmt. + flags & ~(PS_FLAG_PS_MODE | PS_FLAG_SLEEP_PARAM | + PS_FLAG_INACT_SLEEP_PARAM)) { + PRINTM(MERROR, "Invalid parameter: flags = 0x%x\n", + ps_mgmt.flags); + ret = -EINVAL; + goto done; + } + + if (ps_mgmt.ps_mode > PS_MODE_INACTIVITY) { + PRINTM(MERROR, "Invalid parameter: ps_mode = %d\n", + (int)ps_mgmt.flags); + ret = -EINVAL; + goto done; + } + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_pm_cfg)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + pm_cfg = (mlan_ds_pm_cfg *)ioctl_req->pbuf; + pm_cfg->sub_command = MLAN_OID_PM_CFG_PS_MODE; + ioctl_req->req_id = MLAN_IOCTL_PM_CFG; + if (ps_mgmt.flags) { + ioctl_req->action = MLAN_ACT_SET; + memcpy(&pm_cfg->param.ps_mgmt, &ps_mgmt, + sizeof(mlan_ds_ps_mgmt)); + } else { + ioctl_req->action = MLAN_ACT_GET; + } + + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + if (copy_to_user + (req->ifr_data, &ioctl_req->status_code, sizeof(t_u32))) + PRINTM(MERROR, "Copy to user failed!\n"); + goto done; + } + if (!ps_mgmt.flags) { + /* Copy to user */ + if (copy_to_user + (req->ifr_data, &pm_cfg->param.ps_mgmt, + sizeof(mlan_ds_ps_mgmt))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief uap BSS config ioctl handler + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_bss_cfg_ioctl(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + int ret = 0; + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *ioctl_req = NULL; + int offset = 0; + t_u32 action = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "uap_bss_cfg_ioctl() corrupt data\n"); + ret = -EFAULT; + goto done; + } + + /* Get action */ + if (copy_from_user(&action, req->ifr_data + offset, sizeof(action))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + offset += sizeof(action); + + /* Allocate an IOCTL request buffer */ + ioctl_req = + (mlan_ioctl_req *) + woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + + bss = (mlan_ds_bss *)ioctl_req->pbuf; + bss->sub_command = MLAN_OID_UAP_BSS_CONFIG; + ioctl_req->req_id = MLAN_IOCTL_BSS; + if (action == 1) + ioctl_req->action = MLAN_ACT_SET; + else + ioctl_req->action = MLAN_ACT_GET; + + if (ioctl_req->action == MLAN_ACT_SET) { + /* Get the BSS config from user */ + if (copy_from_user + (&bss->param.bss_config, req->ifr_data + offset, + sizeof(mlan_uap_bss_param))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + } + + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (ioctl_req->action == MLAN_ACT_GET) { + offset = sizeof(action); + + /* Copy to user : BSS config */ + if (copy_to_user + (req->ifr_data + offset, &bss->param.bss_config, + sizeof(mlan_uap_bss_param))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief uap get station list handler + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_get_sta_list_ioctl(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + int ret = 0; + mlan_ds_get_info *info = NULL; + mlan_ioctl_req *ioctl_req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "uap_get_sta_list_ioctl() corrupt data\n"); + ret = -EFAULT; + goto done; + } + + /* Allocate an IOCTL request buffer */ + ioctl_req = + (mlan_ioctl_req *) + woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + + info = (mlan_ds_get_info *)ioctl_req->pbuf; + info->sub_command = MLAN_OID_UAP_STA_LIST; + ioctl_req->req_id = MLAN_IOCTL_GET_INFO; + ioctl_req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + + if (ioctl_req->action == MLAN_ACT_GET) { + /* Copy to user : sta_list */ + if (copy_to_user + (req->ifr_data, &info->param.sta_list, + sizeof(mlan_ds_sta_list))) { + PRINTM(MERROR, "Copy to user failed!\n"); + ret = -EFAULT; + goto done; + } + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief uAP set WAPI key ioctl + * + * @param priv A pointer to moal_private structure + * @param msg A pointer to wapi_msg structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_uap_set_wapi_key_ioctl(moal_private *priv, wapi_msg *msg) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + int ret = 0; + wapi_key_msg *key_msg = NULL; + t_u8 bcast_addr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + if (msg->msg_len != sizeof(wapi_key_msg)) { + ret = -EINVAL; + goto done; + } + key_msg = (wapi_key_msg *)msg->msg; + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_SET; + + sec->param.encrypt_key.is_wapi_key = MTRUE; + sec->param.encrypt_key.key_len = MLAN_MAX_KEY_LENGTH; + memcpy(sec->param.encrypt_key.mac_addr, key_msg->mac_addr, ETH_ALEN); + sec->param.encrypt_key.key_index = key_msg->key_id; + if (0 == memcmp(key_msg->mac_addr, bcast_addr, ETH_ALEN)) + sec->param.encrypt_key.key_flags = KEY_FLAG_GROUP_KEY; + else + sec->param.encrypt_key.key_flags = KEY_FLAG_SET_TX_KEY; + memcpy(sec->param.encrypt_key.key_material, key_msg->key, + sec->param.encrypt_key.key_len); + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) + ret = -EFAULT; +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Enable/Disable wapi in firmware + * + * @param priv A pointer to moal_private structure + * @param enable MTRUE/MFALSE + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +static mlan_status +woal_enable_wapi(moal_private *priv, t_u8 enable) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_bss *bss = NULL; + mlan_status status; + + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = (mlan_ioctl_req *)woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + status = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_UAP_BSS_CONFIG; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_GET; + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, + "Get AP setting failed! status=%d, error_code=0x%x\n", + status, req->status_code); + } + + /* Change AP default setting */ + req->action = MLAN_ACT_SET; + if (enable == MFALSE) { + bss->param.bss_config.auth_mode = MLAN_AUTH_MODE_OPEN; + bss->param.bss_config.protocol = PROTOCOL_NO_SECURITY; + } else { + bss->param.bss_config.auth_mode = MLAN_AUTH_MODE_OPEN; + bss->param.bss_config.protocol = PROTOCOL_WAPI; + } + + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, + "Set AP setting failed! status=%d, error_code=0x%x\n", + status, req->status_code); + } + if (enable) + woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, UAP_BSS_START); +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief uAP set WAPI flag ioctl + * + * @param priv A pointer to moal_private structure + * @param msg A pointer to wapi_msg structure + * + * @return 0 --success, otherwise fail + */ +static int +woal_uap_set_wapi_flag_ioctl(moal_private *priv, wapi_msg *msg) +{ + t_u8 wapi_psk_ie[] = { + 0x44, 0x14, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x14, + 0x72, 0x02, 0x01, 0x00, + 0x00, 0x14, 0x72, 0x01, + 0x00, 0x14, 0x72, 0x01, + 0x00, 0x00 + }; + t_u8 wapi_cert_ie[] = { + 0x44, 0x14, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x14, + 0x72, 0x01, 0x01, 0x00, + 0x00, 0x14, 0x72, 0x01, + 0x00, 0x14, 0x72, 0x01, + 0x00, 0x00 + }; + mlan_ds_misc_cfg *misc = NULL; + mlan_ioctl_req *req = NULL; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, UAP_BSS_STOP); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + misc = (mlan_ds_misc_cfg *)req->pbuf; + misc->sub_command = MLAN_OID_MISC_GEN_IE; + req->req_id = MLAN_IOCTL_MISC_CFG; + req->action = MLAN_ACT_SET; + + misc->param.gen_ie.type = MLAN_IE_TYPE_GEN_IE; + misc->param.gen_ie.len = sizeof(wapi_psk_ie); + if (msg->msg[0] & WAPI_MODE_PSK) { + memcpy(misc->param.gen_ie.ie_data, wapi_psk_ie, + misc->param.gen_ie.len); + } else if (msg->msg[0] & WAPI_MODE_CERT) { + memcpy(misc->param.gen_ie.ie_data, wapi_cert_ie, + misc->param.gen_ie.len); + } else if (msg->msg[0] == 0) { + /* disable WAPI in driver */ + if (MLAN_STATUS_SUCCESS != + woal_set_wapi_enable(priv, MOAL_IOCTL_WAIT, 0)) + ret = -EFAULT; + woal_enable_wapi(priv, MFALSE); + goto done; + } else { + ret = -EINVAL; + goto done; + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + woal_enable_wapi(priv, MTRUE); +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief set wapi ioctl function + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @return 0 --success, otherwise fail + */ +static int +woal_uap_set_wapi(struct net_device *dev, struct ifreq *req) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + wapi_msg msg; + int ret = 0; + + ENTER(); + + /* Sanity check */ + if (req->ifr_data == NULL) { + PRINTM(MERROR, "uap_set_wapi() corrupt data\n"); + ret = -EFAULT; + goto done; + } + + memset(&msg, 0, sizeof(msg)); + + if (copy_from_user(&msg, req->ifr_data, sizeof(msg))) { + PRINTM(MERROR, "Copy from user failed\n"); + ret = -EFAULT; + goto done; + } + + PRINTM(MIOCTL, "set wapi msg_type = %d, msg_len=%d\n", msg.msg_type, + msg.msg_len); + DBG_HEXDUMP(MCMD_D, "wapi msg", msg.msg, + MIN(msg.msg_len, sizeof(msg.msg))); + + switch (msg.msg_type) { + case P80211_PACKET_WAPIFLAG: + ret = woal_uap_set_wapi_flag_ioctl(priv, &msg); + break; + case P80211_PACKET_SETKEY: + ret = woal_uap_set_wapi_key_ioctl(priv, &msg); + break; + default: + ret = -EOPNOTSUPP; + break; + } +done: + LEAVE(); + return ret; +} + +/******************************************************** + Global Functions +********************************************************/ +/** + * @brief Initialize the members of mlan_uap_bss_param + * which are uploaded from firmware + * + * @param priv A pointer to moal_private structure + * @param sys_cfg A pointer to mlan_uap_bss_param structure + * @param wait_option Wait option + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_uap_get_bss_param(moal_private *priv, mlan_uap_bss_param *sys_cfg, + t_u8 wait_option) +{ + mlan_ds_bss *info = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + info = (mlan_ds_bss *)req->pbuf; + info->sub_command = MLAN_OID_UAP_BSS_CONFIG; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, req, wait_option); + if (status != MLAN_STATUS_SUCCESS) { + PRINTM(MERROR, "Get bss info failed!\n"); + status = MLAN_STATUS_FAILURE; + goto done; + } + memcpy(sys_cfg, &info->param.bss_config, sizeof(mlan_uap_bss_param)); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Set 11n status based on the configured security mode + * + * @param sys_cfg A pointer to mlan_uap_bss_param structure + * @param action MLAN_ACT_DISABLE or MLAN_ACT_ENABLE + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_uap_set_11n_status(mlan_uap_bss_param *sys_cfg, t_u8 action) +{ + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + if (action == MLAN_ACT_DISABLE) { + if ((sys_cfg->supported_mcs_set[0] == 0) + && (sys_cfg->supported_mcs_set[4] == 0) + && (sys_cfg->supported_mcs_set[1] == 0) + ) { + goto done; + } else { + sys_cfg->supported_mcs_set[0] = 0; + sys_cfg->supported_mcs_set[4] = 0; + sys_cfg->supported_mcs_set[1] = 0; + } + } + + if (action == MLAN_ACT_ENABLE) { + if ((sys_cfg->supported_mcs_set[0] != 0) + || (sys_cfg->supported_mcs_set[4] != 0) + || (sys_cfg->supported_mcs_set[1] != 0) + ) { + goto done; + } else { + sys_cfg->supported_mcs_set[0] = 0xFF; + sys_cfg->supported_mcs_set[4] = 0x01; + sys_cfg->supported_mcs_set[1] = 0xFF; + } + } + +done: + LEAVE(); + return status; +} + +#define VHT_CAP_11AC_MASK 0x007fffff +/** clear SU Beanformer and MU beanformer and MU beanformee */ +#define DEFALUT_11AC_CAP_BEAMFORMING_RESET_MASK (MBIT(11)|MBIT(16)|MBIT(17)|MBIT(18)|MBIT(19)|MBIT(20)) + +/** + * @brief enable/disable 11AC + * + * @param priv A pointer to moal_private structure + * @param action MLAN_ACT_DISABLE or MLAN_ACT_ENABLE + * @param vht20_40 Enable VHT 20 MHz or 40 MHz band + * + * @return 0--success, otherwise failure + */ +int +woal_uap_set_11ac_status(moal_private *priv, t_u8 action, t_u8 vht20_40) +{ + + mlan_ioctl_req *req = NULL; + mlan_ds_11ac_cfg *cfg_11ac = NULL; + mlan_fw_info fw_info; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + woal_request_get_fw_info(priv, MOAL_IOCTL_WAIT, &fw_info); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11ac_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + cfg_11ac = (mlan_ds_11ac_cfg *)req->pbuf; + cfg_11ac->sub_command = MLAN_OID_11AC_VHT_CFG; + req->req_id = MLAN_IOCTL_11AC_CFG; + req->action = MLAN_ACT_SET; + + cfg_11ac->param.vht_cfg.band = BAND_SELECT_A; + cfg_11ac->param.vht_cfg.txrx = MLAN_RADIO_TXRX; + + cfg_11ac->param.vht_cfg.vht_cap_info = fw_info.hw_dot_11ac_dev_cap; + if (action == MLAN_ACT_DISABLE) { + cfg_11ac->param.vht_cfg.bwcfg = MFALSE; + cfg_11ac->param.vht_cfg.vht_cap_info &= ~VHT_CAP_11AC_MASK; + cfg_11ac->param.vht_cfg.vht_rx_mcs = + cfg_11ac->param.vht_cfg.vht_tx_mcs = 0xffff; + } else { + if (vht20_40) + cfg_11ac->param.vht_cfg.bwcfg = MFALSE; + else + cfg_11ac->param.vht_cfg.bwcfg = MTRUE; + cfg_11ac->param.vht_cfg.vht_cap_info &= + ~DEFALUT_11AC_CAP_BEAMFORMING_RESET_MASK; + cfg_11ac->param.vht_cfg.vht_tx_mcs = + fw_info.hw_dot_11ac_mcs_support >> 16; + cfg_11ac->param.vht_cfg.vht_rx_mcs = + fw_info.hw_dot_11ac_mcs_support & 0xffff; + } + PRINTM(MCMND, + "Uap:11ac=%d vht_cap_info=0x%x, vht_tx_mcs=0x%x, vht_rx_mcs=0x%x\n", + action, cfg_11ac->param.vht_cfg.vht_cap_info, + cfg_11ac->param.vht_cfg.vht_tx_mcs, + cfg_11ac->param.vht_cfg.vht_rx_mcs); + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; + +} + +/** + * @brief Parse AP configuration from ASCII string + * + * @param ap_cfg A pointer to mlan_uap_bss_param structure + * @param buf A pointer to user data + * + * @return 0 --success, otherwise fail + */ +int +woal_uap_ap_cfg_parse_data(mlan_uap_bss_param *ap_cfg, char *buf) +{ + int ret = 0, atoi_ret; + int set_sec = 0, set_key = 0, set_chan = 0; + int set_preamble = 0, set_scb = 0, set_ssid = 0; + char *begin = buf, *value = NULL, *opt = NULL; + + ENTER(); + + while (begin) { + value = woal_strsep(&begin, ',', '/'); + opt = woal_strsep(&value, '=', '/'); + if (opt && !strncmp(opt, "END", strlen("END"))) { + if (!ap_cfg->ssid.ssid_len) { + PRINTM(MERROR, + "Minimum option required is SSID\n"); + ret = -EINVAL; + goto done; + } + PRINTM(MINFO, "Parsing terminated by string END\n"); + break; + } + if (!opt || !value || !value[0]) { + PRINTM(MERROR, "Invalid option\n"); + ret = -EINVAL; + goto done; + } else if (!strncmp(opt, "ASCII_CMD", strlen("ASCII_CMD"))) { + if (strncmp(value, "AP_CFG", strlen("AP_CFG"))) { + PRINTM(MERROR, + "ASCII_CMD: %s not matched with AP_CFG\n", + value); + ret = -EFAULT; + goto done; + } + value = woal_strsep(&begin, ',', '/'); + opt = woal_strsep(&value, '=', '/'); + if (!opt || !value || !value[0]) { + PRINTM(MERROR, + "Minimum option required is SSID\n"); + ret = -EINVAL; + goto done; + } else if (!strncmp(opt, "SSID", strlen("SSID"))) { + if (set_ssid) { + PRINTM(MWARN, + "Skipping SSID, found again!\n"); + continue; + } + if (strlen(value) > MLAN_MAX_SSID_LENGTH) { + PRINTM(MERROR, + "SSID length exceeds max length\n"); + ret = -EFAULT; + goto done; + } + ap_cfg->ssid.ssid_len = strlen(value); + strncpy((char *)ap_cfg->ssid.ssid, value, + strlen(value)); + PRINTM(MINFO, "ssid=%s, len=%d\n", + ap_cfg->ssid.ssid, + (int)ap_cfg->ssid.ssid_len); + set_ssid = 1; + } else { + PRINTM(MERROR, + "AP_CFG: Invalid option %s, expect SSID\n", + opt); + ret = -EINVAL; + goto done; + } + } else if (!strncmp(opt, "SEC", strlen("SEC"))) { + if (set_sec) { + PRINTM(MWARN, "Skipping SEC, found again!\n"); + continue; + } + if (!strnicmp(value, "open", strlen("open"))) { + ap_cfg->auth_mode = MLAN_AUTH_MODE_OPEN; + if (set_key) + ap_cfg->wpa_cfg.length = 0; + ap_cfg->key_mgmt = KEY_MGMT_NONE; + ap_cfg->protocol = PROTOCOL_NO_SECURITY; + } else if (!strnicmp + (value, "wpa2-psk", strlen("wpa2-psk"))) { + ap_cfg->auth_mode = MLAN_AUTH_MODE_OPEN; + ap_cfg->protocol = PROTOCOL_WPA2; + ap_cfg->key_mgmt = KEY_MGMT_PSK; + ap_cfg->wpa_cfg.pairwise_cipher_wpa = + CIPHER_AES_CCMP; + ap_cfg->wpa_cfg.pairwise_cipher_wpa2 = + CIPHER_AES_CCMP; + ap_cfg->wpa_cfg.group_cipher = CIPHER_AES_CCMP; + } else if (!strnicmp + (value, "wpa-psk", strlen("wpa-psk"))) { + ap_cfg->auth_mode = MLAN_AUTH_MODE_OPEN; + ap_cfg->protocol = PROTOCOL_WPA; + ap_cfg->key_mgmt = KEY_MGMT_PSK; + ap_cfg->wpa_cfg.pairwise_cipher_wpa = + CIPHER_TKIP; + ap_cfg->wpa_cfg.group_cipher = CIPHER_TKIP; + } else if (!strnicmp(value, "wep128", strlen("wep128"))) { + ap_cfg->auth_mode = MLAN_AUTH_MODE_OPEN; + if (set_key) + ap_cfg->wpa_cfg.length = 0; + ap_cfg->key_mgmt = KEY_MGMT_NONE; + ap_cfg->protocol = PROTOCOL_STATIC_WEP; + } else { + PRINTM(MERROR, + "AP_CFG: Invalid value=%s for %s\n", + value, opt); + ret = -EFAULT; + goto done; + } + set_sec = 1; + } else if (!strncmp(opt, "KEY", strlen("KEY"))) { + if (set_key) { + PRINTM(MWARN, "Skipping KEY, found again!\n"); + continue; + } + if (set_sec && ap_cfg->protocol == PROTOCOL_STATIC_WEP) { + if (strlen(value) != MAX_WEP_KEY_SIZE) { + PRINTM(MERROR, + "Invalid WEP KEY length\n"); + ret = -EFAULT; + goto done; + } + ap_cfg->wep_cfg.key0.key_index = 0; + ap_cfg->wep_cfg.key0.is_default = 1; + ap_cfg->wep_cfg.key0.length = strlen(value); + memcpy(ap_cfg->wep_cfg.key0.key, value, + strlen(value)); + set_key = 1; + continue; + } + if (set_sec && ap_cfg->protocol != PROTOCOL_WPA2 + && ap_cfg->protocol != PROTOCOL_WPA) { + PRINTM(MWARN, + "Warning! No KEY for open mode\n"); + set_key = 1; + continue; + } + if (strlen(value) < MLAN_MIN_PASSPHRASE_LENGTH || + strlen(value) > MLAN_PMK_HEXSTR_LENGTH) { + PRINTM(MERROR, "Invalid PSK/PMK length\n"); + ret = -EINVAL; + goto done; + } + ap_cfg->wpa_cfg.length = strlen(value); + memcpy(ap_cfg->wpa_cfg.passphrase, value, + strlen(value)); + set_key = 1; + } else if (!strncmp(opt, "CHANNEL", strlen("CHANNEL"))) { + if (set_chan) { + PRINTM(MWARN, + "Skipping CHANNEL, found again!\n"); + continue; + } + if (woal_atoi(&atoi_ret, value)) { + ret = -EINVAL; + goto done; + } + if (atoi_ret < 1 || atoi_ret > MLAN_MAX_CHANNEL) { + PRINTM(MERROR, + "AP_CFG: Channel must be between 1 and %d" + "(both included)\n", MLAN_MAX_CHANNEL); + ret = -EINVAL; + goto done; + } + ap_cfg->channel = atoi_ret; + set_chan = 1; + } else if (!strncmp(opt, "PREAMBLE", strlen("PREAMBLE"))) { + if (set_preamble) { + PRINTM(MWARN, + "Skipping PREAMBLE, found again!\n"); + continue; + } + if (woal_atoi(&atoi_ret, value)) { + ret = -EINVAL; + goto done; + } + /* This is a READ only value from FW, so we can not set + this and pass it successfully */ + set_preamble = 1; + } else if (!strncmp(opt, "MAX_SCB", strlen("MAX_SCB"))) { + if (set_scb) { + PRINTM(MWARN, + "Skipping MAX_SCB, found again!\n"); + continue; + } + if (woal_atoi(&atoi_ret, value)) { + ret = -EINVAL; + goto done; + } + if (atoi_ret < 1 || atoi_ret > MAX_STA_COUNT) { + PRINTM(MERROR, + "AP_CFG: MAX_SCB must be between 1 to %d " + "(both included)\n", MAX_STA_COUNT); + ret = -EINVAL; + goto done; + } + ap_cfg->max_sta_count = (t_u16)atoi_ret; + set_scb = 1; + } else { + PRINTM(MERROR, "Invalid option %s\n", opt); + ret = -EINVAL; + goto done; + } + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Set AP configuration + * + * @param priv A pointer to moal_private structure + * @param data A pointer to user data + * @param len Length of buf + * + * @return 0 --success, otherwise fail + */ +int +woal_uap_set_ap_cfg(moal_private *priv, t_u8 *data, int len) +{ + int ret = 0; + static char buf[MAX_BUF_LEN]; + mlan_uap_bss_param sys_config; + int restart = 0; + + ENTER(); + +#define MIN_AP_CFG_CMD_LEN 16 /* strlen("ASCII_CMD=AP_CFG") */ + if ((len - 1) <= MIN_AP_CFG_CMD_LEN) { + PRINTM(MERROR, "Invalid length of command\n"); + ret = -EINVAL; + goto done; + } + + memset(buf, 0, MAX_BUF_LEN); + memcpy(buf, data, MIN(len, (sizeof(buf) - 1))); + + /* Initialize the uap bss values which are uploaded from firmware */ + woal_uap_get_bss_param(priv, &sys_config, MOAL_IOCTL_WAIT); + + /* Setting the default values */ + sys_config.channel = 6; + sys_config.preamble_type = 0; + + ret = woal_uap_ap_cfg_parse_data(&sys_config, buf); + if (ret) + goto done; + + /* If BSS already started stop it first and restart after changing the + setting */ + if (priv->bss_started == MTRUE) { + ret = woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, UAP_BSS_STOP); + if (ret) + goto done; + restart = 1; + } + + /* If the security mode is configured as WEP or WPA-PSK, it will + disable 11n automatically, and if configured as open(off) or + wpa2-psk, it will automatically enable 11n */ + if ((sys_config.protocol == PROTOCOL_STATIC_WEP) + || (sys_config.protocol == PROTOCOL_WPA)) { + if (MLAN_STATUS_SUCCESS != + woal_uap_set_11n_status(&sys_config, MLAN_ACT_DISABLE)) { + ret = -EFAULT; + goto done; + } + } else { + if (MLAN_STATUS_SUCCESS != + woal_uap_set_11n_status(&sys_config, MLAN_ACT_ENABLE)) { + ret = -EFAULT; + goto done; + } + } + + if (MLAN_STATUS_SUCCESS != + woal_set_get_sys_config(priv, MLAN_ACT_SET, MOAL_IOCTL_WAIT, + &sys_config)) { + ret = -EFAULT; + goto done; + } + + /* Start the BSS after successful configuration */ + if (restart) + ret = woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, UAP_BSS_START); + +done: + LEAVE(); + return ret; +} + +/** + * @brief Set/Get ap scan channel list + * + * @param priv A pointer to moal_private structure + * @param action MLAN_ACT_SET or MLAN_ACT_GET + * @param scan_channels A pointer to mlan_uap_scan_channels structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_set_get_ap_scan_channels(moal_private *priv, t_u16 action, + mlan_uap_scan_channels * scan_channels) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *req = NULL; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_UAP_SCAN_CHANNELS; + req->req_id = MLAN_IOCTL_BSS; + req->action = action; + + memcpy(&bss->param.ap_scan_channels, scan_channels, + sizeof(mlan_uap_scan_channels)); + + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + if (action == MLAN_ACT_GET) + memcpy(scan_channels, &bss->param.ap_scan_channels, + sizeof(mlan_uap_scan_channels)); + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get uap channel + * + * @param priv A pointer to moal_private structure + * @param action MLAN_ACT_SET or MLAN_ACT_GET + * @param uap_channel A pointer to mlan_uap_channel structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_set_get_ap_channel(moal_private *priv, t_u16 action, + mlan_uap_channel * uap_channel) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *req = NULL; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_UAP_CHANNEL; + req->req_id = MLAN_IOCTL_BSS; + req->action = action; + + memcpy(&bss->param.ap_channel, uap_channel, sizeof(mlan_uap_channel)); + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + if (action == MLAN_ACT_GET) + memcpy(uap_channel, &bss->param.ap_channel, + sizeof(mlan_uap_channel)); + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief uap BSS control ioctl handler + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param data BSS control type + * @return 0 --success, otherwise fail + */ +int +woal_uap_bss_ctrl(moal_private *priv, t_u8 wait_option, int data) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_bss *bss = NULL; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + PRINTM(MIOCTL, "ioctl bss ctrl=%d\n", data); + if ((data != UAP_BSS_START) && (data != UAP_BSS_STOP) && + (data != UAP_BSS_RESET)) { + PRINTM(MERROR, "Invalid parameter: %d\n", data); + ret = -EINVAL; + goto done; + } + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + bss = (mlan_ds_bss *)req->pbuf; + switch (data) { + case UAP_BSS_START: + if (priv->bss_started == MTRUE) { + PRINTM(MWARN, "Warning: BSS already started!\n"); + /* goto done; */ + } else { + /* about to start bss: issue channel check */ + woal_11h_channel_check_ioctl(priv, wait_option); + } + bss->sub_command = MLAN_OID_BSS_START; + break; + case UAP_BSS_STOP: + if (priv->bss_started == MFALSE) { + PRINTM(MWARN, "Warning: BSS already stopped!\n"); + /* This is a situation where CAC it started and BSS + start is dealyed and before CAC timer expires BSS + stop is triggered. Do not skip sending the BSS_STOP + command since there are many routines triggered on + BSS_STOP command response. */ + woal_cancel_cac_block(priv); + } + bss->sub_command = MLAN_OID_BSS_STOP; + break; + case UAP_BSS_RESET: + bss->sub_command = MLAN_OID_UAP_BSS_RESET; + woal_cancel_cac_block(priv); + break; + } + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_SET; + + status = woal_request_ioctl(priv, req, wait_option); + if (status == MLAN_STATUS_FAILURE) { + ret = -EFAULT; + goto done; + } + + if (data == UAP_BSS_STOP || data == UAP_BSS_RESET) { + priv->bss_started = MFALSE; + woal_stop_queue(priv->netdev); + if (netif_carrier_ok(priv->netdev)) + netif_carrier_off(priv->netdev); + woal_flush_tcp_sess_queue(priv); + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief This function sets multicast addresses to firmware + * + * @param dev A pointer to net_device structure + * @return N/A + */ +void +woal_uap_set_multicast_list(struct net_device *dev) +{ + ENTER(); + + LEAVE(); +} + +/** + * @brief ioctl function - entry point + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @param cmd Command + * + * @return 0 --success, otherwise fail + */ +int +woal_uap_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd) +{ + int ret = 0; + ENTER(); + PRINTM(MIOCTL, "uap_do_ioctl: ioctl cmd = 0x%x\n", cmd); + switch (cmd) { + case WOAL_ANDROID_DEF_CMD: + /** android default ioctl ID is SIOCDEVPRIVATE + 1 */ + ret = woal_android_priv_cmd(dev, req); + break; + case UAP_IOCTL_CMD: + ret = woal_uap_ioctl(dev, req); + break; + case UAP_POWER_MODE: + ret = woal_uap_power_mode_ioctl(dev, req); + break; + case UAP_BSS_CTRL: + ret = woal_uap_bss_ctrl_ioctl(dev, req); + break; + case UAP_WAPI_MSG: + ret = woal_uap_set_wapi(dev, req); + break; + case UAP_BSS_CONFIG: + ret = woal_uap_bss_cfg_ioctl(dev, req); + break; + case UAP_STA_DEAUTH: + ret = woal_uap_sta_deauth_ioctl(dev, req); + break; + case UAP_RADIO_CTL: + ret = woal_uap_radio_ctl(dev, req); + break; + case UAP_REPORT_MIC_ERR: + ret = woal_uap_report_mic_ioctl(dev, req); + break; + case UAP_SET_KEY: + ret = woal_uap_set_key_ioctl(dev, req); + break; + case UAPHOSTPKTINJECT: + ret = woal_send_host_packet(dev, req); + break; + case UAP_GET_STA_LIST: + ret = woal_uap_get_sta_list_ioctl(dev, req); + break; + case UAP_CUSTOM_IE: + ret = woal_custom_ie_ioctl(dev, req); + break; + case UAP_GET_BSS_TYPE: + ret = woal_get_bss_type(dev, req); + break; + case WOAL_ANDROID_PRIV_CMD: + ret = woal_android_priv_cmd(dev, req); + break; + default: +#ifdef UAP_WEXT + ret = woal_uap_do_priv_ioctl(dev, req, cmd); +#else + ret = -EOPNOTSUPP; +#endif + break; + } + + LEAVE(); + return ret; +} + +#ifdef CONFIG_PROC_FS +/** + * @brief Get version + * + * @param priv A pointer to moal_private structure + * @param version A pointer to version buffer + * @param max_len max length of version buffer + * + * @return N/A + */ +void +woal_uap_get_version(moal_private *priv, char *version, int max_len) +{ + mlan_ds_get_info *info = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info)); + if (req == NULL) { + LEAVE(); + return; + } + + info = (mlan_ds_get_info *)req->pbuf; + info->sub_command = MLAN_OID_GET_VER_EXT; + req->req_id = MLAN_IOCTL_GET_INFO; + req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, req, MOAL_PROC_WAIT); + if (status == MLAN_STATUS_SUCCESS) { + PRINTM(MINFO, "MOAL UAP VERSION: %s\n", + info->param.ver_ext.version_str); + snprintf(version, max_len, priv->phandle->driver_version, + info->param.ver_ext.version_str); + } + + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return; +} +#endif + +/** + * @brief Get uap statistics + * + * @param priv A pointer to moal_private structure + * @param wait_option Wait option + * @param ustats A pointer to mlan_ds_uap_stats structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_uap_get_stats(moal_private *priv, t_u8 wait_option, + mlan_ds_uap_stats *ustats) +{ + mlan_ds_get_info *info = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info)); + if (req == NULL) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + + info = (mlan_ds_get_info *)req->pbuf; + info->sub_command = MLAN_OID_GET_STATS; + req->req_id = MLAN_IOCTL_GET_INFO; + req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, req, wait_option); + if (status == MLAN_STATUS_SUCCESS) { + if (ustats) + memcpy(ustats, &info->param.ustats, + sizeof(mlan_ds_uap_stats)); +#ifdef UAP_WEXT + priv->w_stats.discard.fragment = + info->param.ustats.fcs_error_count; + priv->w_stats.discard.retries = info->param.ustats.retry_count; + priv->w_stats.discard.misc = + info->param.ustats.ack_failure_count; +#endif + } + + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief Set/Get system configuration parameters + * + * @param priv A pointer to moal_private structure + * @param action MLAN_ACT_SET or MLAN_ACT_GET + * @param ap_wmm_para A pointer to wmm_parameter_t structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_set_get_ap_wmm_para(moal_private *priv, t_u16 action, + wmm_parameter_t *ap_wmm_para) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *req = NULL; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_UAP_CFG_WMM_PARAM; + req->req_id = MLAN_IOCTL_BSS; + req->action = action; + + if (action == MLAN_ACT_SET) + memcpy(&bss->param.ap_wmm_para, ap_wmm_para, + sizeof(wmm_parameter_t)); + + ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + if (bss->param.ap_wmm_para.reserved != MLAN_STATUS_COMPLETE) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + if (action == MLAN_ACT_GET) + memcpy(ap_wmm_para, &bss->param.ap_wmm_para, + sizeof(wmm_parameter_t)); + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set/Get system configuration parameters + * + * @param priv A pointer to moal_private structure + * @param action MLAN_ACT_SET or MLAN_ACT_GET + * @param wait_option Wait option + * @param sys_cfg A pointer to mlan_uap_bss_param structure + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_set_get_sys_config(moal_private *priv, t_u16 action, t_u8 wait_option, + mlan_uap_bss_param *sys_cfg) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *req = NULL; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = MLAN_STATUS_FAILURE; + goto done; + } + + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_UAP_BSS_CONFIG; + req->req_id = MLAN_IOCTL_BSS; + req->action = action; + + if (action == MLAN_ACT_SET) + memcpy(&bss->param.bss_config, sys_cfg, + sizeof(mlan_uap_bss_param)); + + ret = woal_request_ioctl(priv, req, wait_option); + if (ret != MLAN_STATUS_SUCCESS) + goto done; + + if (action == MLAN_ACT_GET) + memcpy(sys_cfg, &bss->param.bss_config, + sizeof(mlan_uap_bss_param)); + +done: + if (ret != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set invalid data for each member of mlan_uap_bss_param + * structure + * + * @param config A pointer to mlan_uap_bss_param structure + * + * @return N/A + */ +void +woal_set_sys_config_invalid_data(mlan_uap_bss_param *config) +{ + ENTER(); + + memset(config, 0, sizeof(mlan_uap_bss_param)); + config->bcast_ssid_ctl = 0x7F; + config->radio_ctl = 0x7F; + config->dtim_period = 0x7F; + config->beacon_period = 0x7FFF; + config->tx_data_rate = 0x7FFF; + config->mcbc_data_rate = 0x7FFF; + config->tx_power_level = 0x7F; + config->tx_antenna = 0x7F; + config->rx_antenna = 0x7F; + config->pkt_forward_ctl = 0x7F; + config->max_sta_count = 0x7FFF; + config->auth_mode = 0x7F; + config->sta_ageout_timer = 0x7FFFFFFF; + config->pairwise_update_timeout = 0x7FFFFFFF; + config->pwk_retries = 0x7FFFFFFF; + config->groupwise_update_timeout = 0x7FFFFFFF; + config->gwk_retries = 0x7FFFFFFF; + config->mgmt_ie_passthru_mask = 0x7FFFFFFF; + config->ps_sta_ageout_timer = 0x7FFFFFFF; + config->rts_threshold = 0x7FFF; + config->frag_threshold = 0x7FFF; + config->retry_limit = 0x7FFF; + config->filter.filter_mode = 0x7FFF; + config->filter.mac_count = 0x7FFF; + config->wpa_cfg.rsn_protection = 0x7F; + config->wpa_cfg.gk_rekey_time = 0x7FFFFFFF; + config->enable_2040coex = 0x7F; + config->wmm_para.qos_info = 0x7F; + + LEAVE(); +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap.h new file mode 100644 index 00000000..c2b5a523 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap.h @@ -0,0 +1,487 @@ +/** @file moal_uap.h + * + * @brief This file contains uap driver specific defines etc. + * + * Copyright (C) 2009-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/******************************************************** +Change log: + 02/02/2009: initial version +********************************************************/ + +#ifndef _MOAL_UAP_H +#define _MOAL_UAP_H + +/** Maximum buffer length for WOAL_UAP_SET_GET_256_CHAR */ +#define MAX_BUF_LEN 256 + +/** Private command ID to send ioctl */ +#define UAP_IOCTL_CMD (SIOCDEVPRIVATE + 2) +/** Updating ADDBA variables */ +#define UAP_ADDBA_PARA 0 +/** Updating priority table for AMPDU/AMSDU */ +#define UAP_AGGR_PRIOTBL 1 +/** Updating addbareject table */ +#define UAP_ADDBA_REJECT 2 +/** Get FW INFO */ +#define UAP_FW_INFO 4 +/** Updating Deep sleep variables */ +#define UAP_DEEP_SLEEP 3 +/** Tx data pause subcommand */ +#define UAP_TX_DATA_PAUSE 5 +/** sdcmd52 read write subcommand */ +#define UAP_SDCMD52_RW 6 +/** snmp mib subcommand */ +#define UAP_SNMP_MIB 7 +/** domain info subcommand */ +#define UAP_DOMAIN_INFO 8 +/** TX beamforming configuration */ +#define UAP_TX_BF_CFG 9 +#ifdef DFS_TESTING_SUPPORT +/** dfs testing subcommand */ +#define UAP_DFS_TESTING 10 +#endif +/** sub command ID to set/get Host Sleep configuration */ +#define UAP_HS_CFG 11 +/** sub command ID to set/get Host Sleep Parameters */ +#define UAP_HS_SET_PARA 12 + +/** Management Frame Control Mask */ +#define UAP_MGMT_FRAME_CONTROL 13 + +#define UAP_TX_RATE_CFG 14 + +/** Subcommand ID to set/get antenna configuration */ +#define UAP_ANTENNA_CFG 15 + +#define UAP_CAC_TIMER_STATUS 17 + +#define UAP_HT_TX_CFG 19 + +#define UAP_VHT_CFG 20 + +#define UAP_HT_STREAM_CFG 21 + +#define UAP_OPERATION_CTRL 22 + +/** Private command ID to Power Mode */ +#define UAP_POWER_MODE (SIOCDEVPRIVATE + 3) + +/** Private command id to start/stop/reset bss */ +#define UAP_BSS_CTRL (SIOCDEVPRIVATE + 4) +/** BSS START */ +#define UAP_BSS_START 0 +/** BSS STOP */ +#define UAP_BSS_STOP 1 +/** BSS RESET */ +#define UAP_BSS_RESET 2 +/** Band config 5GHz */ +#define BAND_CONFIG_5GHZ 0x01 + +/** wapi_msg */ +typedef struct _wapi_msg { + /** message type */ + t_u16 msg_type; + /** message len */ + t_u16 msg_len; + /** message */ + t_u8 msg[96]; +} wapi_msg; + +/* wapi key msg */ +typedef struct _wapi_key_msg { + /** mac address */ + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; + /** pad */ + t_u8 pad; + /** key id */ + t_u8 key_id; + /** key */ + t_u8 key[32]; +} wapi_key_msg; + +typedef struct _tx_rate_cfg_t { + /** sub command */ + int subcmd; + /** Action */ + int action; + /** Rate format */ + int rate_format; + /** Rate configured */ + int rate; + /** nss */ + int nss; + /** user_data_cnt */ + int user_data_cnt; + /** Rate bitmap */ + t_u16 bitmap_rates[MAX_BITMAP_RATES_SIZE]; +} tx_rate_cfg_t; + +/** ant_cfg structure */ +typedef struct _ant_cfg_t { + /** Subcommand */ + int subcmd; + /** Action */ + int action; + /** TX mode configured */ + int tx_mode; + /** RX mode configured */ + int rx_mode; +} ant_cfg_t; + +/** htstream_cfg structure */ +typedef struct _htstream_cfg_t { + /** Subcommand */ + int subcmd; + /** Action */ + int action; + /** HT stream configuration */ + t_u32 stream_cfg; +} htstream_cfg_t; + +/* */ +typedef struct _cac_timer_status { + /** subcmd */ + t_u32 subcmd; + /** set/get */ + t_u32 action; + /** mode */ + t_u32 mode; +} cac_timer_status; + +/** Private command ID to set wapi info */ +#define UAP_WAPI_MSG (SIOCDEVPRIVATE + 10) +/** set wapi flag */ +#define P80211_PACKET_WAPIFLAG 0x0001 +/** set wapi key */ +#define P80211_PACKET_SETKEY 0x0003 +/** wapi mode psk */ +#define WAPI_MODE_PSK 0x04 +/** wapi mode certificate */ +#define WAPI_MODE_CERT 0x08 + +/** radio control command */ +#define UAP_RADIO_CTL (SIOCDEVPRIVATE + 5) + +/** Private command ID to BSS config */ +#define UAP_BSS_CONFIG (SIOCDEVPRIVATE + 6) + +/** deauth station */ +#define UAP_STA_DEAUTH (SIOCDEVPRIVATE + 7) + +/** enable UAP report mic error */ +#define UAP_REPORT_MIC_ERR (SIOCDEVPRIVATE + 8) +/** uap set key */ +#define UAP_SET_KEY (SIOCDEVPRIVATE + 9) +/** encrypt key */ +typedef struct _encrypt_key { + /** Key index */ + t_u32 key_index; + /** Key length */ + t_u32 key_len; + /** Key */ + t_u8 key_material[MLAN_MAX_KEY_LENGTH]; + /** mac address */ + t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; +} encrypt_key; + +/** Packet inject command ioctl number */ +#define UAPHOSTPKTINJECT WOAL_MGMT_FRAME_TX_IOCTL +/** pkt_header */ +typedef struct _pkt_header { + /** pkt_len */ + u32 pkt_len; + /** pkt_type */ + u32 TxPktType; + /** tx control */ + u32 TxControl; +} pkt_header; +/** uap get station list */ +#define UAP_GET_STA_LIST (SIOCDEVPRIVATE + 11) + +/** Private command ID to set/get custom IE buffer */ +#define UAP_CUSTOM_IE (SIOCDEVPRIVATE + 13) + +/** HS WAKE UP event id */ +#define UAP_EVENT_ID_HS_WAKEUP 0x80000001 +/** HS_ACTIVATED event id */ +#define UAP_EVENT_ID_DRV_HS_ACTIVATED 0x80000002 +/** HS DEACTIVATED event id */ +#define UAP_EVENT_ID_DRV_HS_DEACTIVATED 0x80000003 + +/** Host sleep flag set */ +#define HS_CFG_FLAG_GET 0 +/** Host sleep flag get */ +#define HS_CFG_FLAG_SET 1 +/** Host sleep flag for condition */ +#define HS_CFG_FLAG_CONDITION 2 +/** Host sleep flag for GPIO */ +#define HS_CFG_FLAG_GPIO 4 +/** Host sleep flag for Gap */ +#define HS_CFG_FLAG_GAP 8 +/** Host sleep flag for all */ +#define HS_CFG_FLAG_ALL 0x0f +/** Host sleep mask to get condition */ +#define HS_CFG_CONDITION_MASK 0x0f + +/** ds_hs_cfg */ +typedef struct _ds_hs_cfg { + /** subcmd */ + t_u32 subcmd; + /** Bit0: 0 - Get, 1 Set + * Bit1: 1 - conditions is valid + * Bit2: 2 - gpio is valid + * Bit3: 3 - gap is valid + */ + t_u32 flags; + /** Host sleep config condition */ + /** Bit0: non-unicast data + * Bit1: unicast data + * Bit2: mac events + * Bit3: magic packet + */ + t_u32 conditions; + /** GPIO */ + t_u32 gpio; + /** Gap in milliseconds */ + t_u32 gap; +} ds_hs_cfg; + +/** Private command ID to get BSS type */ +#define UAP_GET_BSS_TYPE (SIOCDEVPRIVATE + 15) + +/** addba_param */ +typedef struct _addba_param { + /** subcmd */ + t_u32 subcmd; + /** Set/Get */ + t_u32 action; + /** block ack timeout for ADDBA request */ + t_u32 timeout; + /** Buffer size for ADDBA request */ + t_u32 txwinsize; + /** Buffer size for ADDBA response */ + t_u32 rxwinsize; + /** amsdu for ADDBA request */ + t_u8 txamsdu; + /** amsdu for ADDBA response */ + t_u8 rxamsdu; +} addba_param; + +/** aggr_prio_tbl */ +typedef struct _aggr_prio_tbl { + /** subcmd */ + t_u32 subcmd; + /** Set/Get */ + t_u32 action; + /** ampdu priority table */ + t_u8 ampdu[MAX_NUM_TID]; + /** amsdu priority table */ + t_u8 amsdu[MAX_NUM_TID]; +} aggr_prio_tbl; + +/** addba_reject parameters */ +typedef struct _addba_reject_para { + /** subcmd */ + t_u32 subcmd; + /** Set/Get */ + t_u32 action; + /** BA Reject paramters */ + t_u8 addba_reject[MAX_NUM_TID]; +} addba_reject_para; + +/** fw_info */ +typedef struct _fw_info { + /** subcmd */ + t_u32 subcmd; + /** Get */ + t_u32 action; + /** Firmware release number */ + t_u32 fw_release_number; + /** Device support for MIMO abstraction of MCSs */ + t_u8 hw_dev_mcs_support; + /** Region Code */ + t_u16 region_code; + /** 802.11n device capabilities */ + t_u32 hw_dot_11n_dev_cap; +} fw_info; + +typedef struct _ht_tx_cfg_para_hdr { + /** Sub command */ + t_u32 subcmd; + /** Action: Set/Get */ + t_u32 action; +} ht_tx_cfg_para_hdr; + +typedef struct _tx_bf_cfg_para_hdr { + /** Sub command */ + t_u32 subcmd; + /** Action: Set/Get */ + t_u32 action; +} tx_bf_cfg_para_hdr; + +typedef struct _vht_cfg_para_hdr { + /** Sub command */ + t_u32 subcmd; + /** Action: Set/Get */ + t_u32 action; +} vht_cfg_para_hdr; + +typedef struct _uap_oper_para_hdr { + /** Sub command */ + t_u32 subcmd; + /** Action: Set/Get */ + t_u32 action; +} uap_oper_para_hdr; + +/** sdcmd52rw parameters */ +typedef struct _sdcmd52_para { + /** subcmd */ + t_u32 subcmd; + /** Write /Read */ + t_u32 action; + /** Command 52 paramters */ + t_u8 cmd52_params[3]; +} sdcmd52_para; + +/** deep_sleep parameters */ +typedef struct _deep_sleep_para { + /** subcmd */ + t_u32 subcmd; + /** Set/Get */ + t_u32 action; + /** enable/disable deepsleep*/ + t_u16 deep_sleep; + /** idle_time */ + t_u16 idle_time; +} deep_sleep_para; + +/** tx_data_pause parameters */ +typedef struct _tx_data_pause_para { + /** subcmd */ + t_u32 subcmd; + /** Set/Get */ + t_u32 action; + /** enable/disable Tx data pause*/ + t_u16 txpause; + /** Max number of TX buffer allowed for all PS client*/ + t_u16 txbufcnt; +} tx_data_pause_para; + +/** mgmt_frame_ctrl */ +typedef struct _mgmt_frame_ctrl { + /** subcmd */ + t_u32 subcmd; + /** Set/Get */ + t_u32 action; + /** mask */ + t_u32 mask; +} mgmt_frame_ctrl; + +typedef struct _snmp_mib_para { + /** subcmd */ + t_u32 subcmd; + /** Set/Get */ + t_u32 action; + /** oid to set/get */ + t_u16 oid; + /** length of oid value */ + t_u16 oid_val_len; + /** oid value to set/get */ + t_u8 oid_value[0]; +} snmp_mib_para; + +/** Max length for oid_value field */ +#define MAX_SNMP_VALUE_SIZE 128 + +/** Oid for 802.11D enable/disable */ +#define OID_80211D_ENABLE 0x0009 +/** Oid for 802.11H enable/disable */ +#define OID_80211H_ENABLE 0x000a + +#ifdef DFS_TESTING_SUPPORT +/** dfs_testing parameters */ +typedef struct _dfs_testing_param { + /** subcmd */ + t_u32 subcmd; + /** Set/Get */ + t_u32 action; + /** user CAC period (msec) */ + t_u16 usr_cac_period; + /** user NOP period (sec) */ + t_u16 usr_nop_period; + /** don't change channel on radar */ + t_u8 no_chan_change; + /** fixed channel to change to on radar */ + t_u8 fixed_new_chan; +} dfs_testing_para; +#endif + +/** domain_info parameters */ +typedef struct _domain_info_param { + /** subcmd */ + t_u32 subcmd; + /** Set/Get */ + t_u32 action; + /** domain_param TLV (incl. header) */ + t_u8 tlv[0]; +} domain_info_para; + +/** DOMAIN_INFO param sizes */ +#define TLV_HEADER_LEN (2 + 2) +#define SUB_BAND_LEN 3 +#define MAX_SUB_BANDS 40 + +/** MAX domain TLV length */ +#define MAX_DOMAIN_TLV_LEN (TLV_HEADER_LEN + COUNTRY_CODE_LEN \ + + (SUB_BAND_LEN * MAX_SUB_BANDS)) + +int woal_set_get_uap_power_mode(moal_private *priv, t_u32 action, + mlan_ds_ps_mgmt *ps_mgmt); +void woal_uap_set_multicast_list(struct net_device *dev); +int woal_uap_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd); +int woal_uap_bss_ctrl(moal_private *priv, t_u8 wait_option, int data); +#ifdef CONFIG_PROC_FS +void woal_uap_get_version(moal_private *priv, char *version, int max_len); +#endif +mlan_status woal_uap_get_stats(moal_private *priv, t_u8 wait_option, + mlan_ds_uap_stats *ustats); +#if defined(UAP_WEXT) || defined(UAP_CFG80211) +extern struct iw_handler_def woal_uap_handler_def; +struct iw_statistics *woal_get_uap_wireless_stats(struct net_device *dev); +/** IOCTL function for wireless private IOCTLs */ +int woal_uap_do_priv_ioctl(struct net_device *dev, struct ifreq *req, int cmd); +#endif +/** Set invalid data for each member of mlan_uap_bss_param */ +void woal_set_sys_config_invalid_data(mlan_uap_bss_param *config); +/** Set/Get system configuration parameters */ +mlan_status woal_set_get_sys_config(moal_private *priv, + t_u16 action, t_u8 wait_option, + mlan_uap_bss_param *sys_cfg); +/** Set get AP wmm parameter */ +mlan_status woal_set_get_ap_wmm_para(moal_private *priv, t_u16 action, + wmm_parameter_t *ap_wmm_para); +int woal_uap_set_ap_cfg(moal_private *priv, t_u8 *data, int len); +int woal_uap_set_11ac_status(moal_private *priv, t_u8 action, t_u8 vht20_40); +mlan_status woal_uap_set_11n_status(mlan_uap_bss_param *sys_cfg, t_u8 action); +#ifdef UAP_WEXT +void woal_ioctl_get_uap_info_resp(moal_private *priv, mlan_ds_get_info *info); +int woal_set_get_custom_ie(moal_private *priv, t_u16 mask, t_u8 *ie, + int ie_len); +#endif /* UAP_WEXT */ +#endif /* _MOAL_UAP_H */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap_cfg80211.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap_cfg80211.c new file mode 100644 index 00000000..30e2ccc4 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap_cfg80211.c @@ -0,0 +1,2101 @@ +/** @file moal_uap_cfg80211.c + * + * @brief This file contains the functions for uAP CFG80211. + * + * Copyright (C) 2011-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#include "moal_cfg80211.h" +#include "moal_uap_cfg80211.h" +/** secondary channel is below */ +#define SECOND_CHANNEL_BELOW 0x30 +/** secondary channel is above */ +#define SECOND_CHANNEL_ABOVE 0x10 +/** no secondary channel */ +#define SECONDARY_CHANNEL_NONE 0x00 +/******************************************************** + Local Variables +********************************************************/ + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ + +/******************************************************** + Global Functions +********************************************************/ + +/** + * @brief send deauth to station + * + * @param A pointer to moal_private + * @param mac A pointer to station mac address + * + * @return 0 -- success, otherwise fail + */ +static int +woal_deauth_station(moal_private *priv, u8 *mac_addr) +{ + mlan_ioctl_req *ioctl_req = NULL; + mlan_ds_bss *bss = NULL; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + bss = (mlan_ds_bss *)ioctl_req->pbuf; + bss->sub_command = MLAN_OID_UAP_DEAUTH_STA; + ioctl_req->req_id = MLAN_IOCTL_BSS; + ioctl_req->action = MLAN_ACT_SET; + + memcpy(bss->param.deauth_param.mac_addr, mac_addr, + MLAN_MAC_ADDR_LENGTH); +#define REASON_CODE_DEAUTH_LEAVING 3 + bss->param.deauth_param.reason_code = REASON_CODE_DEAUTH_LEAVING; + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +/** + * @brief send deauth to all station + * + * @param A pointer to moal_private + * @param mac A pointer to station mac address + * + * @return 0 -- success, otherwise fail + */ +static int +woal_deauth_all_station(moal_private *priv) +{ + int ret = -EFAULT; + int i = 0; + mlan_ds_get_info *info = NULL; + mlan_ioctl_req *ioctl_req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + if (priv->media_connected == MFALSE) { + PRINTM(MINFO, "cfg80211: Media not connected!\n"); + LEAVE(); + return 0; + } + PRINTM(MIOCTL, "del all station\n"); + /* Allocate an IOCTL request buffer */ + ioctl_req = + (mlan_ioctl_req *) + woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + + info = (mlan_ds_get_info *)ioctl_req->pbuf; + info->sub_command = MLAN_OID_UAP_STA_LIST; + ioctl_req->req_id = MLAN_IOCTL_GET_INFO; + ioctl_req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) + goto done; + if (!info->param.sta_list.sta_count) + goto done; + for (i = 0; i < info->param.sta_list.sta_count; i++) { + PRINTM(MIOCTL, "deauth station " MACSTR "\n", + MAC2STR(info->param.sta_list.info[i].mac_address)); + ret = woal_deauth_station(priv, + info->param.sta_list.info[i]. + mac_address); + } + woal_sched_timeout(200); +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + return ret; +} + +/** + * @brief Verify RSN IE + * + * @param rsn_ie Pointer RSN IE + * @param sys_config Pointer to mlan_uap_bss_param structure + * + * @return MTRUE/MFALSE + */ +static t_u8 +woal_check_rsn_ie(IEEEtypes_Rsn_t *rsn_ie, mlan_uap_bss_param *sys_config) +{ + int left = 0; + int count = 0; + int i = 0; + wpa_suite_auth_key_mgmt_t *key_mgmt = NULL; + left = rsn_ie->len + 2; + if (left < sizeof(IEEEtypes_Rsn_t)) + return MFALSE; + sys_config->wpa_cfg.group_cipher = 0; + sys_config->wpa_cfg.pairwise_cipher_wpa2 = 0; + sys_config->key_mgmt = 0; + /* check the group cipher */ + switch (rsn_ie->group_cipher.type) { + case WPA_CIPHER_TKIP: + sys_config->wpa_cfg.group_cipher = CIPHER_TKIP; + break; + case WPA_CIPHER_AES_CCM: + sys_config->wpa_cfg.group_cipher = CIPHER_AES_CCMP; + break; + default: + break; + } + count = le16_to_cpu(rsn_ie->pairwise_cipher.count); + for (i = 0; i < count; i++) { + switch (rsn_ie->pairwise_cipher.list[i].type) { + case WPA_CIPHER_TKIP: + sys_config->wpa_cfg.pairwise_cipher_wpa2 |= CIPHER_TKIP; + break; + case WPA_CIPHER_AES_CCM: + sys_config->wpa_cfg.pairwise_cipher_wpa2 |= + CIPHER_AES_CCMP; + break; + default: + break; + } + } + left -= sizeof(IEEEtypes_Rsn_t) + (count - 1) * sizeof(wpa_suite); + if (left < sizeof(wpa_suite_auth_key_mgmt_t)) + return MFALSE; + key_mgmt = + (wpa_suite_auth_key_mgmt_t *)((u8 *)rsn_ie + + sizeof(IEEEtypes_Rsn_t) + (count - + 1) * + sizeof(wpa_suite)); + count = le16_to_cpu(key_mgmt->count); + if (left < + (sizeof(wpa_suite_auth_key_mgmt_t) + + (count - 1) * sizeof(wpa_suite))) + return MFALSE; + for (i = 0; i < count; i++) { + switch (key_mgmt->list[i].type) { + case RSN_AKM_8021X: + sys_config->key_mgmt |= KEY_MGMT_EAP; + break; + case RSN_AKM_PSK: + sys_config->key_mgmt |= KEY_MGMT_PSK; + break; + case RSN_AKM_PSK_SHA256: + sys_config->key_mgmt |= KEY_MGMT_PSK_SHA256; + break; + } + } + return MTRUE; +} + +/** + * @brief Verify WPA IE + * + * @param wpa_ie Pointer WPA IE + * @param sys_config Pointer to mlan_uap_bss_param structure + * + * @return MTRUE/MFALSE + */ +static t_u8 +woal_check_wpa_ie(IEEEtypes_Wpa_t *wpa_ie, mlan_uap_bss_param *sys_config) +{ + int left = 0; + int count = 0; + int i = 0; + wpa_suite_auth_key_mgmt_t *key_mgmt = NULL; + left = wpa_ie->len + 2; + if (left < sizeof(IEEEtypes_Wpa_t)) + return MFALSE; + sys_config->wpa_cfg.group_cipher = 0; + sys_config->wpa_cfg.pairwise_cipher_wpa = 0; + switch (wpa_ie->group_cipher.type) { + case WPA_CIPHER_TKIP: + sys_config->wpa_cfg.group_cipher = CIPHER_TKIP; + break; + case WPA_CIPHER_AES_CCM: + sys_config->wpa_cfg.group_cipher = CIPHER_AES_CCMP; + break; + default: + break; + } + count = le16_to_cpu(wpa_ie->pairwise_cipher.count); + for (i = 0; i < count; i++) { + switch (wpa_ie->pairwise_cipher.list[i].type) { + case WPA_CIPHER_TKIP: + sys_config->wpa_cfg.pairwise_cipher_wpa |= CIPHER_TKIP; + break; + case WPA_CIPHER_AES_CCM: + sys_config->wpa_cfg.pairwise_cipher_wpa |= + CIPHER_AES_CCMP; + break; + default: + break; + } + } + left -= sizeof(IEEEtypes_Wpa_t) + (count - 1) * sizeof(wpa_suite); + if (left < sizeof(wpa_suite_auth_key_mgmt_t)) + return MFALSE; + key_mgmt = + (wpa_suite_auth_key_mgmt_t *)((u8 *)wpa_ie + + sizeof(IEEEtypes_Wpa_t) + (count - + 1) * + sizeof(wpa_suite)); + count = le16_to_cpu(key_mgmt->count); + if (left < + (sizeof(wpa_suite_auth_key_mgmt_t) + + (count - 1) * sizeof(wpa_suite))) + return MFALSE; + for (i = 0; i < count; i++) { + switch (key_mgmt->list[i].type) { + case RSN_AKM_8021X: + sys_config->key_mgmt = KEY_MGMT_EAP; + break; + case RSN_AKM_PSK: + sys_config->key_mgmt = KEY_MGMT_PSK; + break; + } + } + return MTRUE; +} + +/** + * @brief Find RSN/WPA IES + * + * @param ie Pointer IE buffer + * @param sys_config Pointer to mlan_uap_bss_param structure + * + * @return MTRUE/MFALSE + */ +static t_u8 +woal_find_wpa_ies(const t_u8 *ie, int len, mlan_uap_bss_param *sys_config) +{ + int bytes_left = len; + const t_u8 *pcurrent_ptr = ie; + t_u16 total_ie_len; + t_u8 element_len; + t_u8 wpa2 = 0; + t_u8 wpa = 0; + t_u8 ret = MFALSE; + IEEEtypes_ElementId_e element_id; + IEEEtypes_VendorSpecific_t *pvendor_ie; + const t_u8 wpa_oui[4] = { 0x00, 0x50, 0xf2, 0x01 }; + + while (bytes_left >= 2) { + element_id = (IEEEtypes_ElementId_e)(*((t_u8 *)pcurrent_ptr)); + element_len = *((t_u8 *)pcurrent_ptr + 1); + total_ie_len = element_len + sizeof(IEEEtypes_Header_t); + if (bytes_left < total_ie_len) { + PRINTM(MERROR, + "InterpretIE: Error in processing IE, bytes left < IE length\n"); + bytes_left = 0; + continue; + } + switch (element_id) { + case RSN_IE: + wpa2 = woal_check_rsn_ie((IEEEtypes_Rsn_t *) + pcurrent_ptr, sys_config); + break; + case VENDOR_SPECIFIC_221: + pvendor_ie = (IEEEtypes_VendorSpecific_t *)pcurrent_ptr; + if (!memcmp + (pvendor_ie->vend_hdr.oui, wpa_oui, + sizeof(pvendor_ie->vend_hdr.oui)) && + (pvendor_ie->vend_hdr.oui_type == wpa_oui[3])) { + wpa = woal_check_wpa_ie((IEEEtypes_Wpa_t *) + pcurrent_ptr, + sys_config); + } + break; + default: + break; + } + pcurrent_ptr += element_len + 2; + /* Need to account for IE ID and IE Len */ + bytes_left -= (element_len + 2); + } + if (wpa && wpa2) { + sys_config->protocol = PROTOCOL_WPA | PROTOCOL_WPA2; + ret = MTRUE; + } else if (wpa2) { + sys_config->protocol = PROTOCOL_WPA2; + ret = MTRUE; + } else if (wpa) { + sys_config->protocol = PROTOCOL_WPA; + ret = MTRUE; + } + return ret; +} + +/** + * @brief Find and set WMM IES + * + * @param ie Pointer IE buffer + * @param sys_config Pointer to mlan_uap_bss_param structure + * + * @return N/A + */ +static t_void +woal_set_wmm_ies(const t_u8 *ie, int len, mlan_uap_bss_param *sys_config) +{ + int bytes_left = len; + const t_u8 *pcurrent_ptr = ie; + t_u16 total_ie_len; + t_u8 element_len; + IEEEtypes_VendorSpecific_t *pvendor_ie; + IEEEtypes_ElementId_e element_id; + const t_u8 wmm_oui[4] = { 0x00, 0x50, 0xf2, 0x02 }; + + while (bytes_left >= 2) { + element_id = (IEEEtypes_ElementId_e)(*((t_u8 *)pcurrent_ptr)); + element_len = *((t_u8 *)pcurrent_ptr + 1); + total_ie_len = element_len + sizeof(IEEEtypes_Header_t); + if (bytes_left < total_ie_len) { + PRINTM(MERROR, + "InterpretIE: Error in processing IE, bytes left < IE length\n"); + bytes_left = 0; + continue; + } + switch (element_id) { + case VENDOR_SPECIFIC_221: + pvendor_ie = (IEEEtypes_VendorSpecific_t *)pcurrent_ptr; + if (!memcmp + (pvendor_ie->vend_hdr.oui, wmm_oui, + sizeof(wmm_oui))) { + if (total_ie_len == + sizeof(IEEEtypes_WmmParameter_t)) { + /* + * Only accept and copy the WMM IE if + * it matches the size expected for the + * WMM Parameter IE. + */ + memcpy(&sys_config->wmm_para, + pcurrent_ptr + + sizeof(IEEEtypes_Header_t), + element_len); + } + } + + break; + default: + break; + } + pcurrent_ptr += element_len + 2; + /* Need to account for IE ID and IE Len */ + bytes_left -= (element_len + 2); + } + +} + +/** + * @brief Get second channel offset + * + * @param chan channel num + * @return second channel offset + */ +static t_u8 +woal_get_second_channel_offset(int chan) +{ + t_u8 chan2Offset = SECONDARY_CHANNEL_NONE; + + switch (chan) { + case 36: + case 44: + case 52: + case 60: + case 100: + case 108: + case 116: + case 124: + case 132: + case 140: + case 149: + case 157: + chan2Offset = SECOND_CHANNEL_ABOVE; + break; + case 40: + case 48: + case 56: + case 64: + case 104: + case 112: + case 120: + case 128: + case 136: + case 144: + case 153: + case 161: + chan2Offset = SECOND_CHANNEL_BELOW; + break; + case 165: + /* Special Case: 20Mhz-only Channel */ + chan2Offset = SECONDARY_CHANNEL_NONE; + break; + } + return chan2Offset; +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) +/** + * @brief initialize AP or GO bss config + * @param priv A pointer to moal private structure + * @param params A pointer to cfg80211_ap_settings structure + * @return 0 -- success, otherwise fail + */ +t_u8 +woal_check_11ac_capability(moal_private *priv, + struct cfg80211_ap_settings *params) +#else +/** + * @brief initialize AP or GO bss config + * @param priv A pointer to moal private structure + * @return 0 -- success, otherwise fail + */ +t_u8 +woal_check_11ac_capability(moal_private *priv) +#endif +{ + mlan_fw_info fw_info; + t_u8 enable_11ac = MFALSE; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) + const u8 *vht_ie = NULL; +#endif + ENTER(); + woal_request_get_fw_info(priv, MOAL_IOCTL_WAIT, &fw_info); + if (!(fw_info.fw_bands & BAND_AAC)) { + LEAVE(); + return enable_11ac; + } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) + vht_ie = cfg80211_find_ie(WLAN_EID_VHT_CAPABILITY, params->beacon.tail, + params->beacon.tail_len); + if (vht_ie) + enable_11ac = MTRUE; + else + enable_11ac = MFALSE; +#else + enable_11ac = MTRUE; +#endif + LEAVE(); + return enable_11ac; +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) +/** + * @brief initialize AP or GO bss config + * + * @param priv A pointer to moal private structure + * @param params A pointer to cfg80211_ap_settings structure + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_beacon_config(moal_private *priv, + struct cfg80211_ap_settings *params) +#else +/** + * @brief initialize AP or GO bss config + * + * @param priv A pointer to moal private structure + * @param params A pointer to beacon_parameters structure + * @return 0 -- success, otherwise fail + */ +static int +woal_cfg80211_beacon_config(moal_private *priv, + struct beacon_parameters *params) +#endif +{ + int ret = 0; + mlan_uap_bss_param sys_config; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) + int i = 0; +#else + t_u8 wpa_ies; + const t_u8 *ssid_ie = NULL; + struct ieee80211_mgmt *head = NULL; + t_u16 capab_info = 0; +#endif + t_u8 rates_bg[13] = { + 0x82, 0x84, 0x8b, 0x96, + 0x0c, 0x12, 0x18, 0x24, + 0x30, 0x48, 0x60, 0x6c, + 0x00 + }; + t_u8 rates_a[9] = { + 0x8c, 0x12, 0x98, 0x24, + 0xb0, 0x48, 0x60, 0x6c, + 0x00 + }; +#ifdef WIFI_DIRECT_SUPPORT + t_u8 rates_wfd[9] = { + 0x8c, 0x12, 0x18, 0x24, + 0x30, 0x48, 0x60, 0x6c, + 0x00 + }; +#endif + t_u8 chan2Offset = 0; + t_u8 enable_11n = MTRUE; + t_u8 enable_11ac = MFALSE; + t_u8 vht20_40 = MFALSE; + ENTER(); + + if (params == NULL) { + ret = -EFAULT; + goto done; + } + + if (priv->bss_type != MLAN_BSS_TYPE_UAP +#ifdef WIFI_DIRECT_SUPPORT + && priv->bss_type != MLAN_BSS_TYPE_WIFIDIRECT +#endif + ) { + ret = -EFAULT; + goto done; + } + + /* Initialize the uap bss values which are uploaded from firmware */ + if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, + MLAN_ACT_GET, + MOAL_IOCTL_WAIT, + &sys_config)) { + PRINTM(MERROR, "Error getting AP confiruration\n"); + ret = -EFAULT; + goto done; + } + + /* Setting the default values */ + sys_config.channel = 6; + sys_config.preamble_type = 0; + sys_config.mgmt_ie_passthru_mask = priv->mgmt_subtype_mask; + memcpy(sys_config.mac_addr, priv->current_addr, ETH_ALEN); + + if (priv->bss_type == MLAN_BSS_TYPE_UAP) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) + if (params->beacon_interval) + sys_config.beacon_period = params->beacon_interval; +#else + if (params->interval) + sys_config.beacon_period = params->interval; +#endif + if (params->dtim_period) + sys_config.dtim_period = params->dtim_period; + } + if (priv->channel) { + memset(sys_config.rates, 0, sizeof(sys_config.rates)); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) + switch (params->chandef.width) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) + case NL80211_CHAN_WIDTH_5: + case NL80211_CHAN_WIDTH_10: +#endif + case NL80211_CHAN_WIDTH_20_NOHT: + enable_11n = MFALSE; + break; + case NL80211_CHAN_WIDTH_20: + break; + case NL80211_CHAN_WIDTH_40: + if (params->chandef.center_freq1 < + params->chandef.chan->center_freq) + chan2Offset = SECOND_CHANNEL_BELOW; + else + chan2Offset = SECOND_CHANNEL_ABOVE; + break; + case NL80211_CHAN_WIDTH_80: + case NL80211_CHAN_WIDTH_80P80: + case NL80211_CHAN_WIDTH_160: + chan2Offset = + woal_get_second_channel_offset(priv->channel); + break; + default: + PRINTM(MWARN, "Unknown channel width: %d\n", + params->chandef.width); + break; + } +#else + switch (params->channel_type) { + case NL80211_CHAN_NO_HT: + enable_11n = MFALSE; + break; + case NL80211_CHAN_HT20: + break; + case NL80211_CHAN_HT40PLUS: + chan2Offset = SECOND_CHANNEL_ABOVE; + break; + case NL80211_CHAN_HT40MINUS: + chan2Offset = SECOND_CHANNEL_BELOW; + break; + default: + PRINTM(MWARN, "Unknown channel type: %d\n", + params->channel_type); + break; + } +#endif +#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) */ + sys_config.channel = priv->channel; + if (priv->channel <= MAX_BG_CHANNEL) { + sys_config.band_cfg = BAND_CONFIG_2G; +#ifdef WIFI_DIRECT_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) + memcpy(sys_config.rates, rates_wfd, + sizeof(rates_wfd)); + else +#endif + memcpy(sys_config.rates, rates_bg, + sizeof(rates_bg)); + } else { + sys_config.band_cfg = BAND_CONFIG_5G; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + chan2Offset = + woal_get_second_channel_offset(priv->channel); +#else +#ifdef WIFI_DIRECT_SUPPORT + /* Force enable 40MHZ on WFD interface */ + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) + chan2Offset = + woal_get_second_channel_offset(priv-> + channel); +#endif +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) + enable_11ac = woal_check_11ac_capability(priv, params); + if (enable_11ac && + ((params->chandef.width == NL80211_CHAN_WIDTH_20) + || (params->chandef.width == + NL80211_CHAN_WIDTH_40))) + vht20_40 = MTRUE; +#else + enable_11ac = woal_check_11ac_capability(priv); +#endif +#ifdef WIFI_DIRECT_SUPPORT + if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) + memcpy(sys_config.rates, rates_wfd, + sizeof(rates_wfd)); + else +#endif + memcpy(sys_config.rates, rates_a, + sizeof(rates_a)); + } + /* Disable GreenField by default */ + sys_config.ht_cap_info = 0x10c; + if (enable_11n) + sys_config.ht_cap_info |= 0x20; + if (chan2Offset) { + sys_config.band_cfg |= chan2Offset; + sys_config.ht_cap_info |= 0x1042; + sys_config.ampdu_param = 3; + } + PRINTM(MCMND, + "11n=%d, ht_cap=0x%x, channel=%d, band_cfg=0x%x\n", + enable_11n, sys_config.ht_cap_info, priv->channel, + sys_config.band_cfg); + } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) + if (!params->ssid || !params->ssid_len) { + ret = -EINVAL; + goto done; + } + memcpy(sys_config.ssid.ssid, params->ssid, + MIN(MLAN_MAX_SSID_LENGTH, params->ssid_len)); + sys_config.ssid.ssid_len = MIN(MLAN_MAX_SSID_LENGTH, params->ssid_len); + if (params->hidden_ssid) + sys_config.bcast_ssid_ctl = 0; + else + sys_config.bcast_ssid_ctl = 1; + if (params->auth_type == NL80211_AUTHTYPE_SHARED_KEY) + sys_config.auth_mode = MLAN_AUTH_MODE_SHARED; + else + sys_config.auth_mode = MLAN_AUTH_MODE_OPEN; + if (params->crypto.n_akm_suites) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) + woal_find_wpa_ies(params->beacon.tail, + (int)params->beacon.tail_len, &sys_config); +#else + woal_find_wpa_ies(params->tail, params->tail_len, &sys_config); +#endif + } + for (i = 0; i < params->crypto.n_akm_suites; i++) { + switch (params->crypto.akm_suites[i]) { + case WLAN_AKM_SUITE_8021X: + sys_config.key_mgmt |= KEY_MGMT_EAP; + if ((params->crypto. + wpa_versions & NL80211_WPA_VERSION_1) && + (params->crypto. + wpa_versions & NL80211_WPA_VERSION_2)) + sys_config.protocol = + PROTOCOL_WPA | PROTOCOL_WPA2; + else if (params->crypto. + wpa_versions & NL80211_WPA_VERSION_2) + sys_config.protocol = PROTOCOL_WPA2; + else if (params->crypto. + wpa_versions & NL80211_WPA_VERSION_1) + sys_config.protocol = PROTOCOL_WPA; + break; + case WLAN_AKM_SUITE_PSK: + sys_config.key_mgmt |= KEY_MGMT_PSK; + if ((params->crypto. + wpa_versions & NL80211_WPA_VERSION_1) && + (params->crypto. + wpa_versions & NL80211_WPA_VERSION_2)) + sys_config.protocol = + PROTOCOL_WPA | PROTOCOL_WPA2; + else if (params->crypto. + wpa_versions & NL80211_WPA_VERSION_2) + sys_config.protocol = PROTOCOL_WPA2; + else if (params->crypto. + wpa_versions & NL80211_WPA_VERSION_1) + sys_config.protocol = PROTOCOL_WPA; + break; + } + } + sys_config.wpa_cfg.pairwise_cipher_wpa = 0; + sys_config.wpa_cfg.pairwise_cipher_wpa2 = 0; + for (i = 0; i < params->crypto.n_ciphers_pairwise; i++) { + switch (params->crypto.ciphers_pairwise[i]) { + case WLAN_CIPHER_SUITE_WEP40: + case WLAN_CIPHER_SUITE_WEP104: + break; + case WLAN_CIPHER_SUITE_TKIP: + if (params->crypto.wpa_versions & NL80211_WPA_VERSION_1) + sys_config.wpa_cfg.pairwise_cipher_wpa |= + CIPHER_TKIP; + if (params->crypto.wpa_versions & NL80211_WPA_VERSION_2) + sys_config.wpa_cfg.pairwise_cipher_wpa2 |= + CIPHER_TKIP; + break; + case WLAN_CIPHER_SUITE_CCMP: + if (params->crypto.wpa_versions & NL80211_WPA_VERSION_1) + sys_config.wpa_cfg.pairwise_cipher_wpa |= + CIPHER_AES_CCMP; + if (params->crypto.wpa_versions & NL80211_WPA_VERSION_2) + sys_config.wpa_cfg.pairwise_cipher_wpa2 |= + CIPHER_AES_CCMP; + break; + } + } + switch (params->crypto.cipher_group) { + case WLAN_CIPHER_SUITE_WEP40: + case WLAN_CIPHER_SUITE_WEP104: + if ((priv->cipher == WLAN_CIPHER_SUITE_WEP40) || + (priv->cipher == WLAN_CIPHER_SUITE_WEP104)) { + sys_config.protocol = PROTOCOL_STATIC_WEP; + sys_config.key_mgmt = KEY_MGMT_NONE; + sys_config.wpa_cfg.length = 0; + memcpy(&sys_config.wep_cfg.key0, &priv->uap_wep_key[0], + sizeof(wep_key)); + memcpy(&sys_config.wep_cfg.key1, &priv->uap_wep_key[1], + sizeof(wep_key)); + memcpy(&sys_config.wep_cfg.key2, &priv->uap_wep_key[2], + sizeof(wep_key)); + memcpy(&sys_config.wep_cfg.key3, &priv->uap_wep_key[3], + sizeof(wep_key)); + } + break; + case WLAN_CIPHER_SUITE_TKIP: + sys_config.wpa_cfg.group_cipher = CIPHER_TKIP; + break; + case WLAN_CIPHER_SUITE_CCMP: + sys_config.wpa_cfg.group_cipher = CIPHER_AES_CCMP; + break; + } +#else + /* Since in Android ICS 4.0.1's wpa_supplicant, there is no way to set + ssid when GO (AP) starts up, so get it from beacon head parameter + TODO: right now use hard code 24 -- ieee80211 header lenth, 12 -- + fixed element length for beacon */ +#define BEACON_IE_OFFSET 36 + /* Find SSID in head SSID IE id: 0, right now use hard code */ + ssid_ie = woal_parse_ie_tlv(params->head + BEACON_IE_OFFSET, + params->head_len - BEACON_IE_OFFSET, 0); + + if (!ssid_ie) { + PRINTM(MERROR, "No ssid IE found.\n"); + ret = -EFAULT; + goto done; + } + if (*(ssid_ie + 1) > 32) { + PRINTM(MERROR, "ssid len error: %d\n", *(ssid_ie + 1)); + ret = -EFAULT; + goto done; + } + memcpy(sys_config.ssid.ssid, ssid_ie + 2, *(ssid_ie + 1)); + sys_config.ssid.ssid_len = *(ssid_ie + 1); + head = (struct ieee80211_mgmt *)params->head; + + capab_info = le16_to_cpu(head->u.beacon.capab_info); + PRINTM(MIOCTL, "capab_info=0x%x\n", head->u.beacon.capab_info); + sys_config.auth_mode = MLAN_AUTH_MODE_OPEN; + /** For ICS, we don't support OPEN mode */ + if ((priv->cipher == WLAN_CIPHER_SUITE_WEP40) || + (priv->cipher == WLAN_CIPHER_SUITE_WEP104)) { + sys_config.protocol = PROTOCOL_STATIC_WEP; + sys_config.key_mgmt = KEY_MGMT_NONE; + sys_config.wpa_cfg.length = 0; + memcpy(&sys_config.wep_cfg.key0, &priv->uap_wep_key[0], + sizeof(wep_key)); + memcpy(&sys_config.wep_cfg.key1, &priv->uap_wep_key[1], + sizeof(wep_key)); + memcpy(&sys_config.wep_cfg.key2, &priv->uap_wep_key[2], + sizeof(wep_key)); + memcpy(&sys_config.wep_cfg.key3, &priv->uap_wep_key[3], + sizeof(wep_key)); + } else { + /** Get cipher and key_mgmt from RSN/WPA IE */ + if (capab_info & WLAN_CAPABILITY_PRIVACY) { + wpa_ies = + woal_find_wpa_ies(params->tail, + params->tail_len, + &sys_config); + if (wpa_ies == MFALSE) { + /* hard code setting to wpa2-psk */ + sys_config.protocol = PROTOCOL_WPA2; + sys_config.key_mgmt = KEY_MGMT_PSK; + sys_config.wpa_cfg.pairwise_cipher_wpa2 = + CIPHER_AES_CCMP; + sys_config.wpa_cfg.group_cipher = + CIPHER_AES_CCMP; + } + } + } +#endif /* COMPAT_WIRELESS */ + + if (priv->bss_type == MLAN_BSS_TYPE_UAP) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) + /* find and set wmm ie */ + woal_set_wmm_ies(params->beacon.tail, + (int)params->beacon.tail_len, &sys_config); +#else + woal_set_wmm_ies(params->tail, params->tail_len, &sys_config); +#endif + } + /* If the security mode is configured as WEP or WPA-PSK, it will + disable 11n automatically, and if configured as open(off) or + wpa2-psk, it will automatically enable 11n */ + if ((sys_config.protocol == PROTOCOL_STATIC_WEP) || + (sys_config.protocol == PROTOCOL_WPA)) + enable_11n = MFALSE; + if (!enable_11n) { + woal_uap_set_11n_status(&sys_config, MLAN_ACT_DISABLE); + } else { + woal_uap_set_11n_status(&sys_config, MLAN_ACT_ENABLE); + woal_set_get_tx_bf_cap(priv, MLAN_ACT_GET, + &sys_config.tx_bf_cap); + } + if (sys_config.band_cfg & BAND_CONFIG_5G) { + if (enable_11ac && enable_11n) + woal_uap_set_11ac_status(priv, MLAN_ACT_ENABLE, + vht20_40); + else + woal_uap_set_11ac_status(priv, MLAN_ACT_DISABLE, + vht20_40); + } + if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, + MLAN_ACT_SET, + MOAL_IOCTL_WAIT, + &sys_config)) { + ret = -EFAULT; + goto done; + } +done: + LEAVE(); + return ret; +} + +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION +/** + * @brief Callback function for virtual interface + * setup + * + * @param dev A pointer to structure net_device + * + * @return N/A + */ +static void +woal_virt_if_setup(struct net_device *dev) +{ + ENTER(); + ether_setup(dev); + dev->destructor = free_netdev; + LEAVE(); +} + +/** + * @brief This function adds a new interface. It will + * allocate, initialize and register the device. + * + * @param handle A pointer to moal_handle structure + * @param bss_index BSS index number + * @param bss_type BSS type + * + * @return A pointer to the new priv structure + */ +moal_private * +woal_alloc_virt_interface(moal_handle *handle, t_u8 bss_index, t_u8 bss_type, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0) + const +#endif + char *name) +{ + struct net_device *dev = NULL; + moal_private *priv = NULL; + ENTER(); + +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) +#ifndef MAX_WMM_QUEUE +#define MAX_WMM_QUEUE 4 +#endif + /* Allocate an Ethernet device */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0) + dev = alloc_netdev_mq(sizeof(moal_private), name, NET_NAME_UNKNOWN, + woal_virt_if_setup, MAX_WMM_QUEUE); +#else + dev = alloc_netdev_mq(sizeof(moal_private), name, woal_virt_if_setup, + MAX_WMM_QUEUE); +#endif +#else + dev = alloc_netdev(sizeof(moal_private), name, woal_virt_if_setup); +#endif + if (!dev) { + PRINTM(MFATAL, "Init virtual ethernet device failed\n"); + goto error; + } + /* Allocate device name */ + if ((dev_alloc_name(dev, name) < 0)) { + PRINTM(MERROR, "Could not allocate device name\n"); + goto error; + } + + priv = (moal_private *)netdev_priv(dev); + /* Save the priv to handle */ + handle->priv[bss_index] = priv; + + /* Use the same handle structure */ + priv->phandle = handle; + priv->netdev = dev; + priv->bss_index = bss_index; + priv->bss_type = bss_type; + priv->bss_role = MLAN_BSS_ROLE_STA; + + INIT_LIST_HEAD(&priv->tcp_sess_queue); + spin_lock_init(&priv->tcp_sess_lock); + + INIT_LIST_HEAD(&priv->tx_stat_queue); + spin_lock_init(&priv->tx_stat_lock); + spin_lock_init(&priv->connect_lock); + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) + SET_MODULE_OWNER(dev); +#endif + + PRINTM(MCMND, "Alloc virtual interface%s\n", dev->name); + + LEAVE(); + return priv; +error: + if (dev) + free_netdev(dev); + LEAVE(); + return NULL; +} + +/** + * @brief Request the driver to add a virtual interface + * + * @param wiphy A pointer to wiphy structure + * @param name Virtual interface name + * @param type Virtual interface type + * @param flags Flags for the virtual interface + * @param params A pointer to vif_params structure + * @param new_dev new net_device to return + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_add_virt_if(struct wiphy *wiphy, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0) + const +#endif + char *name, enum nl80211_iftype type, u32 *flags, + struct vif_params *params, + struct net_device **new_dev) +{ + int ret = 0; + struct net_device *ndev = NULL; + moal_private *priv = NULL, *new_priv = NULL; + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); + struct wireless_dev *wdev = NULL; + moal_private *vir_priv; + int i = 0; + + ENTER(); + ASSERT_RTNL(); + priv = (moal_private *)woal_get_priv_bss_type(handle, + MLAN_BSS_TYPE_WIFIDIRECT); + if (!priv || !priv->phandle) { + PRINTM(MERROR, "priv or handle is NULL\n"); + LEAVE(); + return -EFAULT; + } + if (priv->phandle->drv_mode.intf_num == priv->phandle->priv_num) { + PRINTM(MERROR, "max virtual interface limit reached\n"); + for (i = 0; i < priv->phandle->priv_num; i++) { + vir_priv = priv->phandle->priv[i]; + if (vir_priv->bss_virtual) { + woal_cfg80211_del_virt_if(wiphy, + vir_priv->netdev); + break; + } + } + if (priv->phandle->drv_mode.intf_num == priv->phandle->priv_num) { + LEAVE(); + return -ENOMEM; + } + } + PRINTM(MMSG, "Add virtual interface %s\n", name); + if ((type != NL80211_IFTYPE_P2P_CLIENT) && + (type != NL80211_IFTYPE_P2P_GO)) { + PRINTM(MERROR, "Invalid iftype: %d\n", type); + LEAVE(); + return -EINVAL; + } + + handle = priv->phandle; + /* Cancel previous scan req */ + woal_cancel_scan(priv, MOAL_IOCTL_WAIT); + new_priv = + woal_alloc_virt_interface(handle, handle->priv_num, + MLAN_BSS_TYPE_WIFIDIRECT, name); + if (!new_priv) { + PRINTM(MERROR, "Add virtual interface fail."); + LEAVE(); + return -EFAULT; + } + handle->priv_num++; + + wdev = (struct wireless_dev *)&new_priv->w_dev; + memset(wdev, 0, sizeof(struct wireless_dev)); + ndev = new_priv->netdev; + SET_NETDEV_DEV(ndev, wiphy_dev(wiphy)); + ndev->ieee80211_ptr = wdev; + wdev->iftype = type; + wdev->wiphy = wiphy; + new_priv->wdev = wdev; + new_priv->bss_virtual = MTRUE; + new_priv->pa_netdev = priv->netdev; + + woal_init_sta_dev(ndev, new_priv); + + /* Initialize priv structure */ + woal_init_priv(new_priv, MOAL_CMD_WAIT); + /** Init to GO/CLIENT mode */ + if (type == NL80211_IFTYPE_P2P_CLIENT) + woal_cfg80211_init_p2p_client(new_priv); + else if (type == NL80211_IFTYPE_P2P_GO) + woal_cfg80211_init_p2p_go(new_priv); + ret = register_netdevice(ndev); + if (ret) { + handle->priv[new_priv->bss_index] = NULL; + handle->priv_num--; + if (ndev->reg_state == NETREG_REGISTERED) { + unregister_netdevice(ndev); + free_netdev(ndev); + ndev = NULL; + } + PRINTM(MFATAL, "register net_device failed, ret=%d\n", ret); + goto done; + } + netif_carrier_off(ndev); + woal_stop_queue(ndev); + if (new_dev) + *new_dev = ndev; +#ifdef CONFIG_PROC_FS + woal_create_proc_entry(new_priv); +#ifdef PROC_DEBUG + woal_debug_entry(new_priv); +#endif /* PROC_DEBUG */ +#endif /* CONFIG_PROC_FS */ +done: + LEAVE(); + return ret; +} + +/** + * @brief Notify mlan BSS will be removed. + * + * @param priv A pointer to moal_private structure + * + * @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail + */ +mlan_status +woal_bss_remove(moal_private *priv) +{ + mlan_ioctl_req *req = NULL; + mlan_ds_bss *bss = NULL; + mlan_status status; + + ENTER(); + + /* Allocate an IOCTL request buffer */ + req = (mlan_ioctl_req *)woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + status = MLAN_STATUS_FAILURE; + goto done; + } + + /* Fill request buffer */ + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_BSS_REMOVE; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_SET; + /* Send IOCTL request to MLAN */ + status = woal_request_ioctl(priv, req, MOAL_CMD_WAIT); + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return status; +} + +/** + * @brief This function removes an virtual interface. + * + * @param wiphy A pointer to the wiphy structure + * @param dev A pointer to the net_device structure + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_del_virt_if(struct wiphy *wiphy, struct net_device *dev) +{ + int ret = 0; + int i = 0; + moal_private *priv = NULL; + moal_private *vir_priv = NULL; + moal_private *remain_priv = NULL; + moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy); + + priv = (moal_private *)woal_get_priv_bss_type(handle, + MLAN_BSS_TYPE_WIFIDIRECT); + if (!priv) + return ret; + for (i = 0; i < priv->phandle->priv_num; i++) { + vir_priv = priv->phandle->priv[i]; + if (vir_priv) { + if (vir_priv->netdev == dev) { + PRINTM(MMSG, + "Del virtual interface %s, index=%d\n", + dev->name, i); + break; + } + } + } + if (vir_priv && vir_priv->netdev == dev) { + woal_stop_queue(dev); + netif_carrier_off(dev); + netif_device_detach(dev); + if (handle->is_remain_timer_set) { + woal_cancel_timer(&handle->remain_timer); + woal_remain_timer_func(handle); + } + + /*** cancel pending scan */ + woal_cancel_scan(vir_priv, MOAL_IOCTL_WAIT); + + woal_flush_tx_stat_queue(vir_priv); + + /* cancel previous remain on channel to avoid firmware hang */ + if (priv->phandle->remain_on_channel) { + t_u8 channel_status; + remain_priv = + priv->phandle->priv[priv->phandle-> + remain_bss_index]; + if (remain_priv) { + if (woal_cfg80211_remain_on_channel_cfg + (remain_priv, MOAL_IOCTL_WAIT, MTRUE, + &channel_status, NULL, 0, 0)) + PRINTM(MERROR, + "del_virt_if: Fail to cancel remain on channel\n"); + + if (priv->phandle->cookie) { + cfg80211_remain_on_channel_expired( +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + remain_priv-> + netdev, +#else + remain_priv-> + wdev, +#endif + priv-> + phandle-> + cookie, + &priv-> + phandle-> + chan, +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + priv-> + phandle-> + channel_type, +#endif + GFP_ATOMIC); + priv->phandle->cookie = 0; + } + priv->phandle->remain_on_channel = MFALSE; + } + } + + woal_clear_all_mgmt_ies(vir_priv, MOAL_IOCTL_WAIT); + woal_cfg80211_deinit_p2p(vir_priv); + woal_bss_remove(vir_priv); +#ifdef CONFIG_PROC_FS +#ifdef PROC_DEBUG + /* Remove proc debug */ + woal_debug_remove(vir_priv); +#endif /* PROC_DEBUG */ + woal_proc_remove(vir_priv); +#endif /* CONFIG_PROC_FS */ + /* Last reference is our one */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) + PRINTM(MINFO, "refcnt = %d\n", atomic_read(&dev->refcnt)); +#else + PRINTM(MINFO, "refcnt = %d\n", netdev_refcnt_read(dev)); +#endif + PRINTM(MINFO, "netdev_finish_unregister: %s\n", dev->name); + /* Clear the priv in handle */ + vir_priv->phandle->priv[vir_priv->bss_index] = NULL; + priv->phandle->priv_num--; + if (dev->reg_state == NETREG_REGISTERED) + unregister_netdevice(dev); + } + return ret; +} + +/** + * @brief This function removes an virtual interface. + * + * @param handle A pointer to the moal_handle structure + * + * @return N/A + */ +void +woal_remove_virtual_interface(moal_handle *handle) +{ + moal_private *priv = NULL; + int vir_intf = 0; + int i = 0; + ENTER(); + rtnl_lock(); + for (i = 0; i < handle->priv_num; i++) { + priv = handle->priv[i]; + if (priv) { + if (priv->bss_virtual) { + PRINTM(MCMND, "Remove virtual interface %s\n", + priv->netdev->name); +#ifdef CONFIG_PROC_FS +#ifdef PROC_DEBUG + /* Remove proc debug */ + woal_debug_remove(priv); +#endif /* PROC_DEBUG */ + woal_proc_remove(priv); +#endif /* CONFIG_PROC_FS */ + netif_device_detach(priv->netdev); + if (priv->netdev->reg_state == + NETREG_REGISTERED) + unregister_netdevice(priv->netdev); + handle->priv[i] = NULL; + vir_intf++; + } + } + } + rtnl_unlock(); + handle->priv_num -= vir_intf; + LEAVE(); +} +#endif +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) +/** + * @brief Request the driver to add a virtual interface + * + * @param wiphy A pointer to wiphy structure + * @param name Virtual interface name + * @param type Virtual interface type + * @param flags Flags for the virtual interface + * @param params A pointer to vif_params structure + * + * @return A pointer to net_device -- success, otherwise null + */ +struct net_device * +woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, + char *name, enum nl80211_iftype type, u32 *flags, + struct vif_params *params) +#else +/** + * @brief Request the driver to add a virtual interface + * + * @param wiphy A pointer to wiphy structure + * @param name Virtual interface name + * @param type Virtual interface type + * @param flags Flags for the virtual interface + * @param params A pointer to vif_params structure + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, + char *name, enum nl80211_iftype type, u32 *flags, + struct vif_params *params) +#endif +#else +/** + * @brief Request the driver to add a virtual interface + * + * @param wiphy A pointer to wiphy structure + * @param name Virtual interface name + * @param type Virtual interface type + * @param flags Flags for the virtual interface + * @param params A pointer to vif_params structure + * + * @return A pointer to wireless_dev -- success, otherwise null + */ +struct wireless_dev * +woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0) + const +#endif + char *name, enum nl80211_iftype type, u32 *flags, + struct vif_params *params) +#endif +{ +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) + struct net_device *ndev = NULL; +#endif + int ret = 0; + + ENTER(); + PRINTM(MIOCTL, "add virtual intf: %d name: %s\n", type, name); + switch (type) { +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + case NL80211_IFTYPE_P2P_CLIENT: + case NL80211_IFTYPE_P2P_GO: + ret = woal_cfg80211_add_virt_if(wiphy, name, type, flags, + params, &ndev); + break; +#endif +#endif + default: + PRINTM(MWARN, "Not supported if type: %d\n", type); + ret = -EFAULT; + break; + } + LEAVE(); +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 37) || defined(COMPAT_WIRELESS) + if (ret) + return ERR_PTR(ret); + else + return ndev; +#else + return ret; +#endif +#else + if (ret) + return ERR_PTR(ret); + else + return ndev->ieee80211_ptr; +#endif +} + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) +/** + * @brief Request the driver to del a virtual interface + * + * @param wiphy A pointer to wiphy structure + * @param dev The pointer to net_device + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_del_virtual_intf(struct wiphy *wiphy, struct net_device *dev) +#else +/** + * @brief Request the driver to del a virtual interface + * + * @param wiphy A pointer to wiphy structure + * @param wdev The pointer to wireless_dev + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev) +#endif +{ + int ret = 0; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) + struct net_device *dev = wdev->netdev; +#endif + ENTER(); + + PRINTM(MIOCTL, "del virtual intf %s\n", dev->name); + ASSERT_RTNL(); +#if defined(WIFI_DIRECT_SUPPORT) +#if LINUX_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION + ret = woal_cfg80211_del_virt_if(wiphy, dev); +#endif +#endif + LEAVE(); + return ret; +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) +/** + * @brief initialize AP or GO parameters + + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param params A pointer to cfg80211_ap_settings structure + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_add_beacon(struct wiphy *wiphy, + struct net_device *dev, + struct cfg80211_ap_settings *params) +#else +/** + * @brief initialize AP or GO parameters + + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param params A pointer to beacon_parameters structure + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_add_beacon(struct wiphy *wiphy, + struct net_device *dev, + struct beacon_parameters *params) +#endif +{ + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + int ret = 0; + + ENTER(); + + PRINTM(MMSG, "wlan: Starting AP\n"); +#ifdef STA_CFG80211 + /*** cancel pending scan */ + woal_cancel_scan(priv, MOAL_IOCTL_WAIT); +#endif + if (params != NULL) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) + priv->channel = + ieee80211_frequency_to_channel(params->chandef.chan-> + center_freq); +#else + priv->channel = + ieee80211_frequency_to_channel(params->channel-> + center_freq); +#endif +#endif + /* bss config */ + if (MLAN_STATUS_SUCCESS != + woal_cfg80211_beacon_config(priv, params)) { + ret = -EFAULT; + goto done; + } + + /* set mgmt frame ies */ + ret = woal_cfg80211_mgmt_frame_ie(priv, +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0) && !defined(COMPAT_WIRELESS) + params->tail, + params->tail_len, NULL, 0, + NULL, 0, NULL, 0, + MGMT_MASK_BEACON +#else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) + params->beacon.tail, + params->beacon.tail_len, + params->beacon.proberesp_ies, + params->beacon. + proberesp_ies_len, + params->beacon.assocresp_ies, + params->beacon. + assocresp_ies_len, +#else + params->tail, + params->tail_len, + params->proberesp_ies, + params->proberesp_ies_len, + params->assocresp_ies, + params->assocresp_ies_len, +#endif + NULL, 0, + MGMT_MASK_BEACON | + MGMT_MASK_PROBE_RESP | + MGMT_MASK_ASSOC_RESP +#endif + , MOAL_IOCTL_WAIT); + if (ret) + goto done; + } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || defined(COMPAT_WIRELESS) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) + if (params->beacon.beacon_ies && params->beacon.beacon_ies_len) { + ret = woal_cfg80211_mgmt_frame_ie(priv, + params->beacon.beacon_ies, + params->beacon.beacon_ies_len, + NULL, 0, NULL, 0, NULL, 0, + MGMT_MASK_BEACON_WPS_P2P, + MOAL_IOCTL_WAIT); + if (ret) { + PRINTM(MERROR, "Failed to set beacon wps/p2p ie\n"); + goto done; + } + } +#else + if (params->beacon_ies && params->beacon_ies_len) { + ret = woal_cfg80211_mgmt_frame_ie(priv, + params->beacon_ies, + params->beacon_ies_len, NULL, + 0, NULL, 0, NULL, 0, + MGMT_MASK_BEACON_WPS_P2P, + MOAL_IOCTL_WAIT); + if (ret) { + PRINTM(MERROR, "Failed to set beacon wps/p2p ie\n"); + goto done; + } + } +#endif +#endif + /* if the bss is stopped, then start it */ + if (priv->bss_started == MFALSE) { + if (MLAN_STATUS_SUCCESS != + woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, UAP_BSS_START)) { + ret = -EFAULT; + goto done; + } + } + + PRINTM(MMSG, "wlan: AP started\n"); +done: + LEAVE(); + return ret; +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) +/** + * @brief set AP or GO parameter + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param params A pointer to cfg80211_beacon_data structure + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_set_beacon(struct wiphy *wiphy, + struct net_device *dev, + struct cfg80211_beacon_data *params) +#else +/** + * @brief set AP or GO parameter + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param params A pointer to beacon_parameters structure + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_set_beacon(struct wiphy *wiphy, + struct net_device *dev, + struct beacon_parameters *params) +#endif +{ + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + int ret = 0; + + ENTER(); + + PRINTM(MIOCTL, "set beacon\n"); + if (params != NULL) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0) && !defined(COMPAT_WIRELESS) + if (params->tail && params->tail_len) { + ret = woal_cfg80211_mgmt_frame_ie(priv, + params->tail, + params->tail_len, + NULL, 0, NULL, 0, + NULL, 0, + MGMT_MASK_BEACON, + MOAL_IOCTL_WAIT); + if (ret) + goto done; + } +#else + t_u16 mask = 0; + if (params->tail && params->tail_len) + mask |= MGMT_MASK_BEACON; + if (params->proberesp_ies && params->proberesp_ies_len) + mask |= MGMT_MASK_PROBE_RESP; + if (params->assocresp_ies && params->assocresp_ies_len) + mask |= MGMT_MASK_ASSOC_RESP; + PRINTM(MIOCTL, "Set beacon: mask=0x%x\n", mask); + if (mask) { + ret = woal_cfg80211_mgmt_frame_ie(priv, params->tail, + params->tail_len, + params->proberesp_ies, + params-> + proberesp_ies_len, + params->assocresp_ies, + params-> + assocresp_ies_len, + NULL, 0, mask, + MOAL_IOCTL_WAIT); + if (ret) + goto done; + } + if (params->beacon_ies && params->beacon_ies_len) { + ret = woal_cfg80211_mgmt_frame_ie(priv, + params->beacon_ies, + params-> + beacon_ies_len, NULL, + 0, NULL, 0, NULL, 0, + MGMT_MASK_BEACON_WPS_P2P, + MOAL_IOCTL_WAIT); + if (ret) { + PRINTM(MERROR, + "Failed to set beacon wps/p2p ie\n"); + goto done; + } + } +#endif + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief reset AP or GO parameters + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev) +{ + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + int ret = 0; +#ifdef STA_SUPPORT + moal_private *pmpriv = NULL; +#endif + + ENTER(); + + priv->phandle->driver_state = woal_check_driver_status(priv->phandle); + if (priv->phandle->driver_state) { + PRINTM(MERROR, + "Block woal_cfg80211_del_beacon in abnormal driver state\n"); + LEAVE(); + return 0; + } + PRINTM(MMSG, "wlan: Stoping AP\n"); + woal_deauth_all_station(priv); + /* if the bss is still running, then stop it */ + if (priv->bss_started == MTRUE) { + if (MLAN_STATUS_SUCCESS != + woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, UAP_BSS_STOP)) { + ret = -EFAULT; + goto done; + } + if (MLAN_STATUS_SUCCESS != + woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, UAP_BSS_RESET)) { + ret = -EFAULT; + goto done; + } + /* Set WLAN MAC addresses */ + if (MLAN_STATUS_SUCCESS != woal_request_set_mac_address(priv)) { + PRINTM(MERROR, "Set MAC address failed\n"); + ret = -EFAULT; + goto done; + } + } + woal_clear_all_mgmt_ies(priv, MOAL_IOCTL_WAIT); + +#ifdef STA_SUPPORT + if (!woal_is_any_interface_active(priv->phandle)) { + pmpriv = woal_get_priv((moal_handle *)priv->phandle, + MLAN_BSS_ROLE_STA); + if (pmpriv) + woal_set_scan_time(pmpriv, ACTIVE_SCAN_CHAN_TIME, + PASSIVE_SCAN_CHAN_TIME, + SPECIFIC_SCAN_CHAN_TIME); + } +#endif + + priv->cipher = 0; + memset(priv->uap_wep_key, 0, sizeof(priv->uap_wep_key)); + priv->channel = 0; + PRINTM(MMSG, "wlan: AP stopped\n"); +done: + LEAVE(); + return ret; +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) +/** + * @brief del station + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param param A pointer tostation_del_parameters structure + * + * @return 0 -- success, otherwise fail + */ +#else +/** + * @brief del station + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param mac_addr A pointer to station mac address + * + * @return 0 -- success, otherwise fail + */ +#endif +int +woal_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) + struct station_del_parameters *param) +#else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *mac_addr) +#else + u8 *mac_addr) +#endif +#endif +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) + const u8 *mac_addr = NULL; +#endif + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + ENTER(); + if (priv->media_connected == MFALSE) { + PRINTM(MINFO, "cfg80211: Media not connected!\n"); + LEAVE(); + return 0; + } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) + mac_addr = param->mac; +#endif + /** we will not send deauth to p2p interface, it might cause WPS failure */ + if (mac_addr) { + PRINTM(MMSG, "wlan: deauth station " MACSTR "\n", + MAC2STR(mac_addr)); +#ifdef WIFI_DIRECT_SUPPORT + if (!priv->phandle->is_go_timer_set || + priv->bss_type != MLAN_BSS_TYPE_WIFIDIRECT) +#endif + woal_deauth_station(priv, (u8 *)mac_addr); + } else { + PRINTM(MIOCTL, "del all station\n"); + } + LEAVE(); + return 0; + +} + +/** + * @brief Get station info + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param mac A pointer to station mac address + * @param stainfo A pointer to station_info structure + * + * @return 0 -- success, otherwise fail + */ +int +woal_uap_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) + const u8 *mac, +#else + u8 *mac, +#endif + struct station_info *stainfo) +{ + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + int ret = -EFAULT; + int i = 0; + mlan_ds_get_info *info = NULL; + mlan_ioctl_req *ioctl_req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + if (priv->media_connected == MFALSE) { + PRINTM(MINFO, "cfg80211: Media not connected!\n"); + LEAVE(); + return -ENOENT; + } + + /* Allocate an IOCTL request buffer */ + ioctl_req = + (mlan_ioctl_req *) + woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info)); + if (ioctl_req == NULL) { + ret = -ENOMEM; + goto done; + } + + info = (mlan_ds_get_info *)ioctl_req->pbuf; + info->sub_command = MLAN_OID_UAP_STA_LIST; + ioctl_req->req_id = MLAN_IOCTL_GET_INFO; + ioctl_req->action = MLAN_ACT_GET; + + status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) + goto done; + for (i = 0; i < info->param.sta_list.sta_count; i++) { + if (!memcmp + (info->param.sta_list.info[i].mac_address, mac, ETH_ALEN)) { + PRINTM(MIOCTL, "Get station: " MACSTR " RSSI=%d\n", + MAC2STR(mac), + (int)info->param.sta_list.info[i].rssi); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0) + stainfo->filled = BIT(NL80211_STA_INFO_INACTIVE_TIME) | + BIT(NL80211_STA_INFO_SIGNAL); +#else + stainfo->filled = + STATION_INFO_INACTIVE_TIME | + STATION_INFO_SIGNAL; +#endif + stainfo->inactive_time = 0; + stainfo->signal = info->param.sta_list.info[i].rssi; + ret = 0; + break; + } + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(ioctl_req); + LEAVE(); + return ret; +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) +/** + * @brief set mac filter + * + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param params A pointer to cfg80211_acl_data structure + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_set_mac_acl(struct wiphy *wiphy, struct net_device *dev, + const struct cfg80211_acl_data *params) +{ + int ret = -EFAULT; + mlan_uap_bss_param sys_config; + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + u8 bss_started = MFALSE; + ENTER(); + + PRINTM(MIOCTL, "Set mac acl, entries=%d, policy=%d\n", + params->n_acl_entries, params->acl_policy); + /* Initialize the uap bss values which are uploaded from firmware */ + if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, + MLAN_ACT_GET, + MOAL_IOCTL_WAIT, + &sys_config)) { + PRINTM(MERROR, "Error getting AP confiruration\n"); + ret = -EFAULT; + goto done; + } + memset(&sys_config.filter, 0, sizeof(mac_filter)); + if (params->n_acl_entries <= MAX_MAC_FILTER_NUM) + sys_config.filter.mac_count = params->n_acl_entries; + else + sys_config.filter.mac_count = MAX_MAC_FILTER_NUM; + + if (params->acl_policy == NL80211_ACL_POLICY_DENY_UNLESS_LISTED) + sys_config.filter.filter_mode = MAC_FILTER_MODE_ALLOW_MAC; + else if (params->acl_policy == NL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED) + sys_config.filter.filter_mode = MAC_FILTER_MODE_BLOCK_MAC; + memcpy(sys_config.filter.mac_list, params->mac_addrs, + sys_config.filter.mac_count * sizeof(mlan_802_11_mac_addr)); + if (priv->bss_started == MTRUE) { + bss_started = MTRUE; + woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, UAP_BSS_STOP); + } + if (MLAN_STATUS_SUCCESS == woal_set_get_sys_config(priv, + MLAN_ACT_SET, + MOAL_IOCTL_WAIT, + &sys_config)) + ret = 0; +done: + if (bss_started) + woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, UAP_BSS_START); + LEAVE(); + return ret; +} +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)|| defined(COMPAT_WIRELESS) +/** + * @brief Set txq parameters + + * @param wiphy A pointer to wiphy structure + * @param dev A pointer to net_device structure + * @param params A pointer to ieee80211_txq_params structure + * + * @return 0 -- success, otherwise fail + */ +int +woal_cfg80211_set_txq_params(struct wiphy *wiphy, struct net_device *dev, + struct ieee80211_txq_params *params) +{ + int ret = 0; + u8 ac = 0; + wmm_parameter_t ap_wmm_para; + moal_private *priv = (moal_private *)woal_get_netdev_priv(dev); + + ENTER(); + + /* AC_BE: 0, AC_BK:1, AC_VI: 2, AC_VO:3 */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0) + switch (params->ac) { + case NL80211_AC_VO: + ac = 3; + break; + case NL80211_AC_VI: + ac = 2; + break; + case NL80211_AC_BK: + ac = 1; + break; + case NL80211_AC_BE: + ac = 0; + break; + default: + break; + } +#else + switch (params->queue) { + case NL80211_TXQ_Q_VO: + ac = 3; + break; + case NL80211_TXQ_Q_VI: + ac = 2; + break; + case NL80211_TXQ_Q_BK: + ac = 1; + break; + case NL80211_TXQ_Q_BE: + ac = 0; + break; + default: + break; + } +#endif + + PRINTM(MMSG, "Set AC=%d, txop=%d cwmin=%d, cwmax=%d aifs=%d\n", ac, + params->txop, params->cwmin, params->cwmax, params->aifs); + + memset(&ap_wmm_para, 0, sizeof(wmm_parameter_t)); + + if (MLAN_STATUS_SUCCESS != + woal_set_get_ap_wmm_para(priv, MLAN_ACT_GET, &ap_wmm_para)) { + PRINTM(MERROR, "wlan: We don't support AP WMM parameter\n"); + LEAVE(); + return ret; + } + ap_wmm_para.ac_params[ac].aci_aifsn.aifsn = params->aifs; + ap_wmm_para.ac_params[ac].ecw.ecw_max = ilog2(params->cwmax + 1); + ap_wmm_para.ac_params[ac].ecw.ecw_min = ilog2(params->cwmin + 1); + ap_wmm_para.ac_params[ac].tx_op_limit = params->txop; + if (MLAN_STATUS_SUCCESS != + woal_set_get_ap_wmm_para(priv, MLAN_ACT_SET, &ap_wmm_para)) { + PRINTM(MERROR, "wlan: Fail to set AP WMM parameter\n"); + ret = -EFAULT; + } + LEAVE(); + return ret; +} +#endif + +/** + * @brief Register the device with cfg80211 + * + * @param dev A pointer to net_device structure + * @param bss_type BSS type + * + * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE + */ +mlan_status +woal_register_uap_cfg80211(struct net_device *dev, t_u8 bss_type) +{ + mlan_status ret = MLAN_STATUS_SUCCESS; + moal_private *priv = (moal_private *)netdev_priv(dev); + struct wireless_dev *wdev = NULL; + + ENTER(); + + wdev = (struct wireless_dev *)&priv->w_dev; + memset(wdev, 0, sizeof(struct wireless_dev)); + + wdev->wiphy = priv->phandle->wiphy; + if (!wdev->wiphy) { + LEAVE(); + return MLAN_STATUS_FAILURE; + } + if (bss_type == MLAN_BSS_TYPE_UAP) + wdev->iftype = NL80211_IFTYPE_AP; + + dev_net_set(dev, wiphy_net(wdev->wiphy)); + dev->ieee80211_ptr = wdev; + SET_NETDEV_DEV(dev, wiphy_dev(wdev->wiphy)); + priv->wdev = wdev; + + LEAVE(); + return ret; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap_cfg80211.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap_cfg80211.h new file mode 100644 index 00000000..3c7d763e --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap_cfg80211.h @@ -0,0 +1,29 @@ +/** @file moal_uap_cfg80211.h + * + * @brief This file contains the uAP CFG80211 specific defines. + * + * Copyright (C) 2014-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +#ifndef _MOAL_UAP_CFG80211_H_ +#define _MOAL_UAP_CFG80211_H_ + +#include "moal_uap.h" + +mlan_status woal_register_uap_cfg80211(struct net_device *dev, t_u8 bss_type); + +#endif /* _MOAL_UAP_CFG80211_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap_priv.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap_priv.c new file mode 100644 index 00000000..b10ef49c --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap_priv.c @@ -0,0 +1,180 @@ +/** @file moal_uap_priv.c + * + * @brief This file contains standard ioctl functions + * + * Copyright (C) 2010-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/************************************************************************ +Change log: + 08/06/2010: initial version +************************************************************************/ + +#include "moal_main.h" +#include "moal_uap.h" +#include "moal_uap_priv.h" + +/******************************************************** + Local Variables +********************************************************/ + +/******************************************************** + Global Variables +********************************************************/ + +/******************************************************** + Local Functions +********************************************************/ + +/******************************************************** + Global Functions +********************************************************/ + +/** + * @brief ioctl function for wireless IOCTLs + * + * @param dev A pointer to net_device structure + * @param req A pointer to ifreq structure + * @param cmd Command + * + * @return 0 --success, otherwise fail + */ +int +woal_uap_do_priv_ioctl(struct net_device *dev, struct ifreq *req, int cmd) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + struct iwreq *wrq = (struct iwreq *)req; + int ret = 0; + + ENTER(); + + switch (cmd) { + case WOAL_UAP_SETNONE_GETNONE: + switch (wrq->u.data.flags) { + case WOAL_UAP_START: + break; + case WOAL_UAP_STOP: + ret = woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, + UAP_BSS_STOP); + break; + case WOAL_AP_BSS_START: + ret = woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, + UAP_BSS_START); + break; + case WOAL_AP_BSS_STOP: + ret = woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, + UAP_BSS_STOP); + break; + default: + ret = -EINVAL; + break; + } + break; + case WOAL_UAP_SETONEINT_GETWORDCHAR: + switch (wrq->u.data.flags) { + case WOAL_UAP_VERSION: + ret = woal_get_driver_version(priv, req); + break; + case WOAL_UAP_VEREXT: + ret = woal_get_driver_verext(priv, req); + break; + default: + ret = -EOPNOTSUPP; + break; + } + break; + case WOAL_UAP_SET_GET_256_CHAR: + switch (wrq->u.data.flags) { + case WOAL_WL_FW_RELOAD: + break; + case WOAL_AP_SET_CFG: + ret = woal_uap_set_ap_cfg(priv, wrq->u.data.pointer, + wrq->u.data.length); + break; + default: + ret = -EINVAL; + break; + } + break; +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) + case WOAL_UAP_SETONEINT_GETONEINT: + switch (wrq->u.data.flags) { + case WOAL_UAP_SET_GET_BSS_ROLE: + ret = woal_set_get_bss_role(priv, wrq); + break; + default: + ret = -EINVAL; + break; + } + break; +#endif +#endif + case WOAL_UAP_HOST_CMD: + ret = woal_host_command(priv, wrq); + break; + case WOAL_UAP_FROYO_START: + break; + case WOAL_UAP_FROYO_STOP: + ret = woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, UAP_BSS_STOP); + break; + case WOAL_UAP_FROYO_AP_BSS_START: + ret = woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, UAP_BSS_START); + break; + case WOAL_UAP_FROYO_AP_BSS_STOP: + ret = woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, UAP_BSS_STOP); + break; + case WOAL_UAP_FROYO_WL_FW_RELOAD: + break; + case WOAL_UAP_FROYO_AP_SET_CFG: + ret = woal_uap_set_ap_cfg(priv, wrq->u.data.pointer, + wrq->u.data.length); + break; + default: + ret = -EINVAL; + break; + } + + LEAVE(); + return ret; +} + +/** + * @brief Handle get info resp + * + * @param priv Pointer to moal_private structure + * @param info Pointer to mlan_ds_get_info structure + * + * @return N/A + */ +void +woal_ioctl_get_uap_info_resp(moal_private *priv, mlan_ds_get_info *info) +{ + ENTER(); + switch (info->sub_command) { + case MLAN_OID_GET_STATS: + priv->w_stats.discard.fragment = + info->param.ustats.fcs_error_count; + priv->w_stats.discard.retries = info->param.ustats.retry_count; + priv->w_stats.discard.misc = + info->param.ustats.ack_failure_count; + break; + default: + break; + } + LEAVE(); +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap_priv.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap_priv.h new file mode 100644 index 00000000..7af7ff8d --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap_priv.h @@ -0,0 +1,194 @@ +/** @file moal_uap_priv.h + * + * @brief This file contains definition for extended private IOCTL call. + * + * Copyright (C) 2010-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/************************************************************************ +Change log: + 08/06/2010: initial version +************************************************************************/ + +#ifndef _MOAL_UAP_PRIV_H_ +#define _MOAL_UAP_PRIV_H_ + +/** Private command ID */ +#define WOAL_UAP_IOCTL 0x8BE0 + +/** Private command to get/set 256 chars */ +#define WOAL_UAP_SET_GET_256_CHAR (WOAL_UAP_IOCTL + 1) +/** Private command ID to FW reload */ +#define WOAL_WL_FW_RELOAD 1 +/** Private command ID to set AP configuration */ +#define WOAL_AP_SET_CFG 2 + +/** Private command ID to set/get none */ +#define WOAL_UAP_SETNONE_GETNONE (WOAL_UAP_IOCTL + 2) +/** Private command ID to start UAP */ +#define WOAL_UAP_START 1 +/** Private command ID to stop UAP */ +#define WOAL_UAP_STOP 2 +/** Private command ID to start AP BSS */ +#define WOAL_AP_BSS_START 3 +/** Private command ID to stop AP BSS */ +#define WOAL_AP_BSS_STOP 4 + +/** Private command ID to set one int/get word char */ +#define WOAL_UAP_SETONEINT_GETWORDCHAR (WOAL_UAP_IOCTL + 3) +/** Private command ID to get version */ +#define WOAL_UAP_VERSION 1 +/** Private command ID to get extended version */ +#define WOAL_UAP_VEREXT 2 + +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) +/** Private command ID to set one int/get one int */ +#define WOAL_UAP_SETONEINT_GETONEINT (WOAL_UAP_IOCTL + 5) +/** Private command ID for set/get BSS role */ +#define WOAL_UAP_SET_GET_BSS_ROLE 1 +#endif +#endif + +/** Private command ID for hostcmd */ +#define WOAL_UAP_HOST_CMD (WOAL_UAP_IOCTL + 17) + +/** The following command IDs are for Froyo app */ +/** Private command ID to start AP BSS */ +#define WOAL_UAP_FROYO_AP_BSS_START (WOAL_UAP_IOCTL + 24) +/** Private command ID to stop AP BSS */ +#define WOAL_UAP_FROYO_AP_BSS_STOP (WOAL_UAP_IOCTL + 26) +/** Private command ID to set AP config */ +#define WOAL_UAP_FROYO_AP_SET_CFG (WOAL_UAP_IOCTL + 27) +/** Private command ID to start driver */ +#define WOAL_UAP_FROYO_START (WOAL_UAP_IOCTL + 28) +/** Private command ID to reload FW */ +#define WOAL_UAP_FROYO_WL_FW_RELOAD (WOAL_UAP_IOCTL + 29) +/** Private command ID to stop driver */ +#define WOAL_UAP_FROYO_STOP (WOAL_UAP_IOCTL + 30) + +/** + * iwpriv ioctl handlers + */ +static const struct iw_priv_args woal_uap_priv_args[] = { + { + WOAL_UAP_SETNONE_GETNONE, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_NONE, + ""}, + { + WOAL_UAP_START, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_NONE, + "start"}, + { + WOAL_UAP_STOP, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_NONE, + "stop"}, + { + WOAL_AP_BSS_START, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_NONE, + "bssstart"}, + { + WOAL_AP_BSS_STOP, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_NONE, + "bssstop"}, + { + WOAL_UAP_SETONEINT_GETWORDCHAR, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_CHAR | 128, + ""}, + { + WOAL_UAP_VERSION, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_CHAR | 128, + "version"}, + { + WOAL_UAP_VEREXT, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_CHAR | 128, + "verext"}, +#if defined(WIFI_DIRECT_SUPPORT) +#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) + { + WOAL_UAP_SETONEINT_GETONEINT, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + ""}, + { + WOAL_UAP_SET_GET_BSS_ROLE, + IW_PRIV_TYPE_INT | 1, + IW_PRIV_TYPE_INT | 1, + "bssrole"}, +#endif +#endif + { + WOAL_UAP_SET_GET_256_CHAR, + IW_PRIV_TYPE_CHAR | 256, + IW_PRIV_TYPE_CHAR | 256, + ""}, + { + WOAL_WL_FW_RELOAD, + IW_PRIV_TYPE_CHAR | 256, + IW_PRIV_TYPE_CHAR | 256, + "fwreload"}, + { + WOAL_AP_SET_CFG, + IW_PRIV_TYPE_CHAR | 256, + IW_PRIV_TYPE_CHAR | 256, + "apcfg"}, + { + WOAL_UAP_HOST_CMD, + IW_PRIV_TYPE_BYTE | 2047, + IW_PRIV_TYPE_BYTE | 2047, + "hostcmd"}, + { + WOAL_UAP_FROYO_START, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_NONE, + "START"}, + { + WOAL_UAP_FROYO_STOP, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_NONE, + "STOP"}, + { + WOAL_UAP_FROYO_AP_BSS_START, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_NONE, + "AP_BSS_START"}, + { + WOAL_UAP_FROYO_AP_BSS_STOP, + IW_PRIV_TYPE_NONE, + IW_PRIV_TYPE_NONE, + "AP_BSS_STOP"}, + { + WOAL_UAP_FROYO_WL_FW_RELOAD, + IW_PRIV_TYPE_CHAR | 256, + IW_PRIV_TYPE_CHAR | 256, + "WL_FW_RELOAD"}, + { + WOAL_UAP_FROYO_AP_SET_CFG, + IW_PRIV_TYPE_CHAR | 256, + IW_PRIV_TYPE_CHAR | 256, + "AP_SET_CFG"}, +}; + +#endif /* _MOAL_UAP_PRIV_H_ */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap_wext.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap_wext.c new file mode 100644 index 00000000..14013f7d --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_uap_wext.c @@ -0,0 +1,1809 @@ +/** @file moal_uap_wext.c + * + * @brief This file contains wireless extension standard ioctl functions + * + * Copyright (C) 2010-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/************************************************************************ +Change log: + 08/06/2010: initial version +************************************************************************/ + +#include "moal_main.h" +#include "moal_uap.h" +#include "moal_wext.h" +#include "moal_uap_priv.h" + +/******************************************************** + Global Variables +********************************************************/ +typedef struct _chan_to_freq_t { + /** Channel */ + t_u16 channel; + /** Frequency */ + t_u32 freq; + /** Band */ + t_u8 band; +} chan_to_freq_t; + +const chan_to_freq_t chan_to_freq[] = { + {1, 2412, 0}, + {2, 2417, 0}, + {3, 2422, 0}, + {4, 2427, 0}, + {5, 2432, 0}, + {6, 2437, 0}, + {7, 2442, 0}, + {8, 2447, 0}, + {9, 2452, 0}, + {10, 2457, 0}, + {11, 2462, 0}, + {12, 2467, 0}, + {13, 2472, 0}, + {14, 2484, 0}, + {183, 4915, 1}, + {184, 4920, 1}, + {185, 4925, 1}, + {187, 4935, 1}, + {188, 4940, 1}, + {189, 4945, 1}, + {192, 4960, 1}, + {196, 4980, 1}, + {7, 5035, 1}, + {8, 5040, 1}, + {9, 5045, 1}, + {11, 5055, 1}, + {12, 5060, 1}, + {16, 5080, 1}, + {34, 5170, 1}, + {36, 5180, 1}, + {38, 5190, 1}, + {40, 5200, 1}, + {42, 5210, 1}, + {44, 5220, 1}, + {46, 5230, 1}, + {48, 5240, 1}, + {52, 5260, 1}, + {56, 5280, 1}, + {60, 5300, 1}, + {64, 5320, 1}, + {100, 5500, 1}, + {104, 5520, 1}, + {108, 5540, 1}, + {112, 5560, 1}, + {116, 5580, 1}, + {120, 5600, 1}, + {124, 5620, 1}, + {128, 5640, 1}, + {132, 5660, 1}, + {136, 5680, 1}, + {140, 5700, 1}, + {144, 5720, 1}, + {149, 5745, 1}, + {153, 5765, 1}, + {157, 5785, 1}, + {161, 5805, 1}, + {165, 5825, 1}, +}; + +/** Convertion from frequency to channel */ +#define freq_to_chan(x) ((((x) - 2412) / 5) + 1) + +/******************************************************** + Local Functions +********************************************************/ + +/** + * @brief Sort Channels + * + * @param freq A pointer to iw_freq structure + * @param num Number of Channels + * + * @return N/A + */ +static inline void +woal_sort_channels(struct iw_freq *freq, int num) +{ + int i, j; + struct iw_freq temp; + + for (i = 0; i < num; i++) + for (j = i + 1; j < num; j++) + if (freq[i].i > freq[j].i) { + temp.i = freq[i].i; + temp.m = freq[i].m; + + freq[i].i = freq[j].i; + freq[i].m = freq[j].m; + + freq[j].i = temp.i; + freq[j].m = temp.m; + } +} + +/** + * @brief Get frequency for channel in given band + * + * @param channel channel + * @param band band + * + * @return freq + */ +static int +channel_to_frequency(t_u16 channel, t_u8 band) +{ + int i = 0; + + ENTER(); + for (i = 0; i < ARRAY_SIZE(chan_to_freq); i++) { + if (channel == chan_to_freq[i].channel && + band == chan_to_freq[i].band) { + LEAVE(); + return chan_to_freq[i].freq; + } + } + LEAVE(); + return 0; +} + +/** + * @brief Commit handler: called after a bunch of SET operations + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param cwrq A pointer to char buffer + * @param extra A pointer to extra data buf + * + * @return 0 --success + */ +static int +woal_config_commit(struct net_device *dev, + struct iw_request_info *info, char *cwrq, char *extra) +{ + ENTER(); + + LEAVE(); + return 0; +} + +/** + * @brief Get name + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param cwrq A pointer to char buffer + * @param extra A pointer to extra data buf + * + * @return 0 --success + */ +static int +woal_get_name(struct net_device *dev, struct iw_request_info *info, + char *cwrq, char *extra) +{ + ENTER(); + strcpy(cwrq, "IEEE 802.11-DS"); + LEAVE(); + return 0; +} + +/** + * @brief Get current BSSID + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param awrq A pointer to sockaddr structure + * @param extra A pointer to extra data buf + * + * @return 0 --success + */ +static int +woal_get_wap(struct net_device *dev, struct iw_request_info *info, + struct sockaddr *awrq, char *extra) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + int ret = 0; + + ENTER(); + + if (priv->bss_started) + memcpy(awrq->sa_data, priv->current_addr, MLAN_MAC_ADDR_LENGTH); + else + memset(awrq->sa_data, 0, MLAN_MAC_ADDR_LENGTH); + awrq->sa_family = ARPHRD_ETHER; + + LEAVE(); + return ret; +} + +/** + * @brief Change the AP BSSID + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param awrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_wap(struct net_device *dev, struct iw_request_info *info, + struct sockaddr *awrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + const t_u8 zero_mac[MLAN_MAC_ADDR_LENGTH] = { 0, 0, 0, 0, 0, 0 }; + + ENTER(); + + if (awrq->sa_family != ARPHRD_ETHER) { + ret = -EINVAL; + goto done; + } + + PRINTM(MINFO, "ASSOC: WAP: uAP bss : " MACSTR "\n", + MAC2STR((t_u8 *)awrq->sa_data)); + + /* + * Using this ioctl to start/stop the BSS, return if bss + * is already started/stopped. + */ + if (memcmp(zero_mac, awrq->sa_data, MLAN_MAC_ADDR_LENGTH)) { + if (priv->bss_started == MFALSE) + ret = woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, + UAP_BSS_START); + else + PRINTM(MINFO, "BSS is already started.\n"); + } else { + /* zero_mac means bss_stop */ + if (priv->bss_started == MTRUE) + ret = woal_uap_bss_ctrl(priv, MOAL_IOCTL_WAIT, + UAP_BSS_STOP); + else + PRINTM(MINFO, "BSS is already stopped.\n"); + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Set frequency/channel + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param fwrq A pointer to iw_freq structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_freq(struct net_device *dev, struct iw_request_info *info, + struct iw_freq *fwrq, char *extra) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_uap_bss_param *sys_cfg = NULL, *ap_cfg = NULL; + int ret = 0, chan = 0, i = 0; + + ENTER(); + + ap_cfg = kmalloc(sizeof(mlan_uap_bss_param), GFP_KERNEL); + if (ap_cfg == NULL) { + ret = -ENOMEM; + goto done; + } + + sys_cfg = kmalloc(sizeof(mlan_uap_bss_param), GFP_KERNEL); + if (sys_cfg == NULL) { + ret = -ENOMEM; + goto done; + } + + if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, + MLAN_ACT_GET, + MOAL_IOCTL_WAIT, + ap_cfg)) { + PRINTM(MERROR, "Error getting AP confiruration\n"); + ret = -EFAULT; + goto done; + } + i = ap_cfg->num_of_chan; + + /* Initialize the invalid values so that the correct values below are + downloaded to firmware */ + woal_set_sys_config_invalid_data(sys_cfg); + + /* If setting by frequency, convert to a channel */ + if (fwrq->e == 1) + chan = freq_to_chan(fwrq->m / 100000); + else + chan = fwrq->m; + if (chan > 0 && chan < MLAN_MAX_CHANNEL) + sys_cfg->channel = chan; + else { + ret = -EINVAL; + goto done; + } + for (i = 0; i < ap_cfg->num_of_chan; i++) + if (ap_cfg->chan_list[i].chan_number == chan) + break; + if (i == ap_cfg->num_of_chan) { + PRINTM(MERROR, "Channel %d is not supported\n", chan); + ret = -EINVAL; + goto done; + } + + if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, + MLAN_ACT_SET, + MOAL_IOCTL_WAIT, + sys_cfg)) { + PRINTM(MERROR, "Error setting AP confiruration\n"); + ret = -EFAULT; + goto done; + } + +done: + kfree(sys_cfg); + kfree(ap_cfg); + LEAVE(); + return ret; +} + +/** + * @brief Get frequency and channel + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param fwrq A pointer to iw_freq structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_freq(struct net_device *dev, struct iw_request_info *info, + struct iw_freq *fwrq, char *extra) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_uap_bss_param ap_cfg; + t_u8 band = 0; + int ret = 0; + + ENTER(); + + if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, + MLAN_ACT_GET, + MOAL_IOCTL_WAIT, + &ap_cfg)) { + PRINTM(MERROR, "Error getting AP confiruration\n"); + LEAVE(); + return -EFAULT; + } + + band = ap_cfg.band_cfg & BAND_CONFIG_5GHZ; + fwrq->m = (long)channel_to_frequency(ap_cfg.channel, band); + fwrq->i = (long)ap_cfg.channel; + fwrq->e = 6; + + LEAVE(); + return ret; +} + +/** + * @brief Set wlan mode + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param uwrq A pointer to t_u32 string + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_bss_mode(struct net_device *dev, struct iw_request_info *info, + t_u32 *uwrq, char *extra) +{ + int ret = 0; + ENTER(); + + switch (*uwrq) { + case IW_MODE_AUTO: + case IW_MODE_MASTER: + PRINTM(MINFO, "This is correct mode in AP mode\n"); + break; + default: + PRINTM(MERROR, "Invalid mode for AP\n"); + ret = -EINVAL; + } + + LEAVE(); + return ret; +} + +/** + * @brief Get wlan mode + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param uwrq A pointer to t_u32 string + * @param extra A pointer to extra data buf + * + * @return 0 --success + */ +static int +woal_get_bss_mode(struct net_device *dev, struct iw_request_info *info, + t_u32 *uwrq, char *extra) +{ + ENTER(); + + *uwrq = IW_MODE_MASTER; + + LEAVE(); + return 0; +} + +/** + * @brief Set encryption key + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_encode(struct net_device *dev, struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_uap_bss_param *sys_cfg = NULL, *ap_cfg = NULL; + wep_key *pkey = NULL; + int key_index = 0; + + ENTER(); + + /* Check index */ + key_index = (dwrq->flags & IW_ENCODE_INDEX) - 1; + if (key_index > 3) { + PRINTM(MERROR, "Key index #%d out of range\n", key_index); + ret = -EINVAL; + goto done; + } + + ap_cfg = kmalloc(sizeof(mlan_uap_bss_param), GFP_KERNEL); + if (ap_cfg == NULL) { + ret = -ENOMEM; + goto done; + } + + sys_cfg = kmalloc(sizeof(mlan_uap_bss_param), GFP_KERNEL); + if (sys_cfg == NULL) { + ret = -ENOMEM; + goto done; + } + + if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, + MLAN_ACT_GET, + MOAL_IOCTL_WAIT, + ap_cfg)) { + PRINTM(MERROR, "Error getting AP confiruration\n"); + ret = -EFAULT; + goto done; + } + + /* Initialize the invalid values so that the correct values below are + downloaded to firmware */ + woal_set_sys_config_invalid_data(sys_cfg); + sys_cfg->wep_cfg.key0.key_index = 0; + sys_cfg->wep_cfg.key1.key_index = 1; + sys_cfg->wep_cfg.key2.key_index = 2; + sys_cfg->wep_cfg.key3.key_index = 3; + + if (key_index >= 0 && key_index <= 3) { + if (key_index == 0) + pkey = &sys_cfg->wep_cfg.key0; + else if (key_index == 1) + pkey = &sys_cfg->wep_cfg.key1; + else if (key_index == 2) + pkey = &sys_cfg->wep_cfg.key2; + else if (key_index == 3) + pkey = &sys_cfg->wep_cfg.key3; + } + + if (!(dwrq->flags & IW_ENCODE_NOKEY) && dwrq->length) { + if (dwrq->length > MAX_WEP_KEY_SIZE) { + PRINTM(MERROR, "Key length (%d) out of range\n", + dwrq->length); + ret = -E2BIG; + goto done; + } + if (key_index < 0) { + /* Get current default key index */ + if (ap_cfg->wep_cfg.key0.is_default) + pkey = &sys_cfg->wep_cfg.key0; + if (ap_cfg->wep_cfg.key1.is_default) + pkey = &sys_cfg->wep_cfg.key1; + if (ap_cfg->wep_cfg.key2.is_default) + pkey = &sys_cfg->wep_cfg.key2; + if (ap_cfg->wep_cfg.key3.is_default) + pkey = &sys_cfg->wep_cfg.key3; + else { /* Something wrong, select first key as default + */ + PRINTM(MERROR, + "No default key set! Selecting first key.\n"); + pkey = &sys_cfg->wep_cfg.key0; + } + } + + sys_cfg->protocol = PROTOCOL_STATIC_WEP; + if (extra) + memcpy(pkey->key, extra, dwrq->length); + /* Set the length */ + if (dwrq->length > MIN_WEP_KEY_SIZE) + pkey->length = MAX_WEP_KEY_SIZE; + else + pkey->length = MIN_WEP_KEY_SIZE; + /* Set current key index as default */ + pkey->is_default = MTRUE; + } else { + /* + * No key provided so it is either enable key, + * on or off + */ + if (dwrq->flags & IW_ENCODE_DISABLED) { + PRINTM(MINFO, "*** iwconfig mlanX key off ***\n"); + sys_cfg->protocol = PROTOCOL_NO_SECURITY; + } else { + /* + * iwconfig mlanX key [n] + * iwconfig mlanX key on + * Do we want to just set the transmit key index ? + */ + if (key_index < 0) { + PRINTM(MINFO, + "*** iwconfig mlanX key on ***\n"); + } else { + /* Get current key configuration at key_index */ + if (key_index == 0) + memcpy(pkey, &ap_cfg->wep_cfg.key0, + sizeof(wep_key)); + if (key_index == 1) + memcpy(pkey, &ap_cfg->wep_cfg.key1, + sizeof(wep_key)); + if (key_index == 2) + memcpy(pkey, &ap_cfg->wep_cfg.key2, + sizeof(wep_key)); + if (key_index == 3) + memcpy(pkey, &ap_cfg->wep_cfg.key3, + sizeof(wep_key)); + /* Set current key index as default */ + pkey->is_default = MTRUE; + } + } + } + if (dwrq->flags & (IW_ENCODE_RESTRICTED | IW_ENCODE_OPEN)) { + switch (dwrq->flags & 0xf000) { + case IW_ENCODE_RESTRICTED: + /* iwconfig mlanX restricted key [1] */ + sys_cfg->auth_mode = MLAN_AUTH_MODE_SHARED; + PRINTM(MINFO, "Auth mode restricted!\n"); + break; + case IW_ENCODE_OPEN: + /* iwconfig mlanX key [2] open */ + sys_cfg->auth_mode = MLAN_AUTH_MODE_OPEN; + PRINTM(MINFO, "Auth mode open!\n"); + break; + case IW_ENCODE_RESTRICTED | IW_ENCODE_OPEN: + default: + /* iwconfig mlanX key [2] open restricted */ + PRINTM(MINFO, "Auth mode auto!\n"); + break; + } + } + + if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, + MLAN_ACT_SET, + MOAL_IOCTL_WAIT, + sys_cfg)) { + PRINTM(MERROR, "Error setting AP confiruration\n"); + ret = -EFAULT; + goto done; + } + +done: + kfree(sys_cfg); + kfree(ap_cfg); + LEAVE(); + return ret; +} + +/** + * @brief Get encryption key + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_encode(struct net_device *dev, struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + int index = (dwrq->flags & IW_ENCODE_INDEX); + wep_key *pkey = NULL; + mlan_uap_bss_param ap_cfg; + int ret = 0; + + ENTER(); + if (index < 0 || index > 4) { + PRINTM(MERROR, "Key index #%d out of range\n", index); + ret = -EINVAL; + goto done; + } + if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, + MLAN_ACT_GET, + MOAL_IOCTL_WAIT, + &ap_cfg)) { + PRINTM(MERROR, "Error getting AP confiruration\n"); + ret = -EFAULT; + goto done; + } + + dwrq->flags = 0; + /* + * Check encryption mode + */ + switch (ap_cfg.auth_mode) { + case MLAN_AUTH_MODE_OPEN: + dwrq->flags = IW_ENCODE_OPEN; + break; + case MLAN_AUTH_MODE_SHARED: + case MLAN_AUTH_MODE_NETWORKEAP: + dwrq->flags = IW_ENCODE_RESTRICTED; + break; + default: + dwrq->flags = IW_ENCODE_DISABLED | IW_ENCODE_OPEN; + break; + } + + switch (ap_cfg.protocol) { + case PROTOCOL_NO_SECURITY: + dwrq->flags |= IW_ENCODE_DISABLED; + break; + case PROTOCOL_STATIC_WEP: + if (ap_cfg.wep_cfg.key0.is_default) + pkey = &ap_cfg.wep_cfg.key0; + else if (ap_cfg.wep_cfg.key1.is_default) + pkey = &ap_cfg.wep_cfg.key1; + else if (ap_cfg.wep_cfg.key2.is_default) + pkey = &ap_cfg.wep_cfg.key2; + else if (ap_cfg.wep_cfg.key3.is_default) + pkey = &ap_cfg.wep_cfg.key3; + if (pkey) { + dwrq->flags |= (pkey->key_index + 1); + dwrq->length = pkey->length; + memcpy(extra, pkey->key, pkey->length); + dwrq->flags &= ~IW_ENCODE_DISABLED; + } else { + ret = -EFAULT; + } + break; + case PROTOCOL_WPA: + case PROTOCOL_WPA2: + case PROTOCOL_WPA2_MIXED: + memcpy(extra, ap_cfg.wpa_cfg.passphrase, ap_cfg.wpa_cfg.length); + dwrq->length = ap_cfg.wpa_cfg.length; + dwrq->flags |= 1; + dwrq->flags &= ~IW_ENCODE_DISABLED; + break; + default: + dwrq->flags &= ~IW_ENCODE_DISABLED; + break; + } + dwrq->flags |= IW_ENCODE_NOKEY; + +done: + LEAVE(); + return ret; +} + +#if (WIRELESS_EXT >= 18) +/** + * @brief Get IE + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return -EOPNOTSUPP + */ +static int +woal_get_gen_ie(struct net_device *dev, struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + ENTER(); + LEAVE(); + return -EOPNOTSUPP; +} + +/** + * @brief Set IE + * + * Pass an opaque block of data, expected to be IEEE IEs, to the driver + * for eventual passthrough to the firmware in an associate/join + * (and potentially start) command. + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_gen_ie(struct net_device *dev, struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_uap_bss_param sys_cfg; + IEEEtypes_Header_t *tlv = NULL; + int tlv_hdr_len = sizeof(IEEEtypes_Header_t), tlv_buf_left = 0; + int ret = 0; + + ENTER(); + + /* Initialize the invalid values so that the correct values below are + downloaded to firmware */ + woal_set_sys_config_invalid_data(&sys_cfg); + + tlv_buf_left = dwrq->length; + tlv = (IEEEtypes_Header_t *)extra; + while (tlv_buf_left >= tlv_hdr_len) { + if (tlv->element_id == WPA_IE) { + sys_cfg.protocol |= PROTOCOL_WPA; + if (priv->pairwise_cipher == CIPHER_TKIP) { + sys_cfg.wpa_cfg.pairwise_cipher_wpa = + CIPHER_TKIP; + PRINTM(MINFO, "Set IE Cipher TKIP\n"); + } + if (priv->pairwise_cipher == CIPHER_AES_CCMP) { + sys_cfg.wpa_cfg.pairwise_cipher_wpa = + CIPHER_AES_CCMP; + PRINTM(MINFO, "Set IE Cipher CCMP\n"); + } + if (priv->pairwise_cipher == + (CIPHER_TKIP | CIPHER_AES_CCMP)) { + sys_cfg.wpa_cfg.pairwise_cipher_wpa = + CIPHER_TKIP | CIPHER_AES_CCMP; + PRINTM(MINFO, "Set IE Cipher TKIP + CCMP\n"); + } + memcpy(priv->bcn_ie_buf + priv->bcn_ie_len, + ((t_u8 *)tlv), + sizeof(IEEEtypes_Header_t) + tlv->len); + priv->bcn_ie_len += + sizeof(IEEEtypes_Header_t) + tlv->len; + } + if (tlv->element_id == RSN_IE) { + sys_cfg.protocol |= PROTOCOL_WPA2; + if (priv->pairwise_cipher == CIPHER_TKIP) { + sys_cfg.wpa_cfg.pairwise_cipher_wpa2 = + CIPHER_TKIP; + } + if (priv->pairwise_cipher == CIPHER_AES_CCMP) { + sys_cfg.wpa_cfg.pairwise_cipher_wpa2 = + CIPHER_AES_CCMP; + } + if (priv->pairwise_cipher == + (CIPHER_TKIP | CIPHER_AES_CCMP)) { + sys_cfg.wpa_cfg.pairwise_cipher_wpa2 = + (CIPHER_TKIP | CIPHER_AES_CCMP); + } + memcpy(priv->bcn_ie_buf + priv->bcn_ie_len, + ((t_u8 *)tlv), + sizeof(IEEEtypes_Header_t) + tlv->len); + priv->bcn_ie_len += + sizeof(IEEEtypes_Header_t) + tlv->len; + } + if (priv->group_cipher == CIPHER_TKIP) + sys_cfg.wpa_cfg.group_cipher = CIPHER_TKIP; + if (priv->group_cipher == CIPHER_AES_CCMP) + sys_cfg.wpa_cfg.group_cipher = CIPHER_AES_CCMP; + tlv_buf_left -= (tlv_hdr_len + tlv->len); + tlv = (IEEEtypes_Header_t *)((t_u8 *)tlv + tlv_hdr_len + + tlv->len); + } + sys_cfg.key_mgmt = priv->uap_key_mgmt; + if (sys_cfg.key_mgmt & KEY_MGMT_PSK) + sys_cfg.key_mgmt_operation |= 0x01; + if (sys_cfg.key_mgmt & KEY_MGMT_EAP) + sys_cfg.key_mgmt_operation |= 0x03; + + if (sys_cfg.protocol) { + if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, + MLAN_ACT_SET, + MOAL_IOCTL_WAIT, + &sys_cfg)) { + PRINTM(MERROR, "Error setting AP configuration\n"); + ret = -EFAULT; + goto done; + } + priv->pairwise_cipher = 0; + priv->group_cipher = 0; + + /* custom IE command to set priv->bcn_ie_buf */ + if (MLAN_STATUS_SUCCESS != +#define UAP_RSN_MASK (BIT(8) | BIT(5) | BIT(1) | BIT(3)) + woal_set_get_custom_ie(priv, UAP_RSN_MASK, priv->bcn_ie_buf, + priv->bcn_ie_len)) { + PRINTM(MERROR, "Error setting wpa-rsn IE\n"); + ret = -EFAULT; + } + } else if (dwrq->length == 0) { + /* custom IE command to re-set priv->bcn_ie_buf */ + if (MLAN_STATUS_SUCCESS != + woal_set_get_custom_ie(priv, 0, priv->bcn_ie_buf, + priv->bcn_ie_len)) { + PRINTM(MERROR, "Error resetting wpa-rsn IE\n"); + ret = -EFAULT; + } + priv->bcn_ie_len = 0; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Extended version of encoding configuration + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_encode_ext(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; + moal_private *priv = (moal_private *)netdev_priv(dev); + int key_index; + t_u8 *pkey_material = NULL; + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + mlan_uap_bss_param sys_cfg; + wep_key *pwep_key = NULL; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + key_index = (dwrq->flags & IW_ENCODE_INDEX) - 1; + if (key_index < 0 || key_index > 5) { + ret = -EINVAL; + goto done; + } + if (ext->key_len > (dwrq->length - sizeof(struct iw_encode_ext))) { + ret = -EINVAL; + goto done; + } + + /* Initialize the invalid values so that the correct values below are + downloaded to firmware */ + woal_set_sys_config_invalid_data(&sys_cfg); + + pkey_material = (t_u8 *)(ext + 1); + /* Disable Key */ + if ((dwrq->flags & IW_ENCODE_DISABLED) && !ext->key_len) { + sys_cfg.protocol = PROTOCOL_NO_SECURITY; + } else if (ext->alg == IW_ENCODE_ALG_WEP) { + sys_cfg.protocol = PROTOCOL_STATIC_WEP; + /* Set WEP key */ + switch (key_index) { + case 0: + pwep_key = &sys_cfg.wep_cfg.key0; + break; + case 1: + pwep_key = &sys_cfg.wep_cfg.key1; + break; + case 2: + pwep_key = &sys_cfg.wep_cfg.key2; + break; + case 3: + pwep_key = &sys_cfg.wep_cfg.key3; + break; + } + if (pwep_key) { + pwep_key->key_index = key_index; + pwep_key->is_default = MTRUE; + pwep_key->length = ext->key_len; + memcpy(pwep_key->key, pkey_material, ext->key_len); + } + } else { + /* Set GTK/PTK key */ + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_SET; + sec->param.encrypt_key.key_len = ext->key_len; + sec->param.encrypt_key.key_index = key_index; + memcpy(sec->param.encrypt_key.key_material, pkey_material, + ext->key_len); + memcpy(sec->param.encrypt_key.mac_addr, ext->addr.sa_data, + ETH_ALEN); + sec->param.encrypt_key.key_flags = ext->ext_flags; + if (ext->ext_flags & IW_ENCODE_EXT_RX_SEQ_VALID) { + memcpy(sec->param.encrypt_key.pn, (t_u8 *)ext->rx_seq, + SEQ_MAX_SIZE); + DBG_HEXDUMP(MCMD_D, "Uap Rx PN", + sec->param.encrypt_key.pn, SEQ_MAX_SIZE); + } + if (ext->ext_flags & IW_ENCODE_EXT_TX_SEQ_VALID) { + memcpy(sec->param.encrypt_key.pn, (t_u8 *)ext->tx_seq, + SEQ_MAX_SIZE); + DBG_HEXDUMP(MCMD_D, "Uap Tx PN", + sec->param.encrypt_key.pn, SEQ_MAX_SIZE); + } + PRINTM(MIOCTL, + "set uap wpa key key_index=%d, key_len=%d key_flags=0x%x " + MACSTR "\n", key_index, ext->key_len, + sec->param.encrypt_key.key_flags, + MAC2STR(sec->param.encrypt_key.mac_addr)); + DBG_HEXDUMP(MCMD_D, "uap wpa key", pkey_material, ext->key_len); +#define IW_ENCODE_ALG_AES_CMAC 5 + + if (ext->alg == IW_ENCODE_ALG_AES_CMAC) + sec->param.encrypt_key.key_flags |= + KEY_FLAG_AES_MCAST_IGTK; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) + ret = -EFAULT; + /* Cipher set will be done in set generic IE */ + priv->pairwise_cipher = ext->alg; + priv->group_cipher = ext->alg; + goto done; /* No AP configuration */ + } + if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, + MLAN_ACT_SET, + MOAL_IOCTL_WAIT, + &sys_cfg)) { + PRINTM(MERROR, "Error setting AP confiruration\n"); + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Extended version of encoding configuration + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return -EOPNOTSUPP + */ +static int +woal_get_encode_ext(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + ENTER(); + LEAVE(); + return -EOPNOTSUPP; +} + +/** + * @brief Request MLME operation + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0--success, otherwise fail + */ +static int +woal_set_mlme(struct net_device *dev, + struct iw_request_info *info, struct iw_point *dwrq, char *extra) +{ + struct iw_mlme *mlme = (struct iw_mlme *)extra; + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ds_bss *bss = NULL; + mlan_ds_get_info *pinfo = NULL; + mlan_ioctl_req *req = NULL; + mlan_ds_sta_list *sta_list = NULL; + const t_u8 bc_addr[] = { 0XFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF }; + t_u8 sta_addr[ETH_ALEN]; + int ret = 0, i; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + memset(sta_addr, 0, ETH_ALEN); + if ((mlme->cmd == IW_MLME_DEAUTH) || (mlme->cmd == IW_MLME_DISASSOC)) { + memcpy(sta_addr, (t_u8 *)mlme->addr.sa_data, ETH_ALEN); + PRINTM(MIOCTL, + "Deauth station: " MACSTR ", reason=%d\n", + MAC2STR(sta_addr), mlme->reason_code); + + /* FIXME: For flushing all stations we need to use zero MAC, + but right now the FW does not support this. So, manually + delete each one individually. */ + /* If deauth all station, get the connected STA list first */ + if (!memcmp(bc_addr, sta_addr, ETH_ALEN)) { + PRINTM(MIOCTL, "Deauth all stations\n"); + req = woal_alloc_mlan_ioctl_req(sizeof + (mlan_ds_get_info)); + if (req == NULL) { + LEAVE(); + return -ENOMEM; + } + pinfo = (mlan_ds_get_info *)req->pbuf; + pinfo->sub_command = MLAN_OID_UAP_STA_LIST; + req->req_id = MLAN_IOCTL_GET_INFO; + req->action = MLAN_ACT_GET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + sta_list = + kmalloc(sizeof(mlan_ds_sta_list), GFP_KERNEL); + if (sta_list == NULL) { + PRINTM(MERROR, "Memory allocation failed!\n"); + ret = -ENOMEM; + goto done; + } + memcpy(sta_list, &pinfo->param.sta_list, + sizeof(mlan_ds_sta_list)); + kfree(req); + req = NULL; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_UAP_DEAUTH_STA; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_SET; + + if (!memcmp(bc_addr, sta_addr, ETH_ALEN)) { + for (i = 0; i < sta_list->sta_count; i++) { + memcpy(bss->param.deauth_param.mac_addr, + sta_list->info[i].mac_address, ETH_ALEN); + bss->param.deauth_param.reason_code = + mlme->reason_code; + + status = woal_request_ioctl(priv, req, + MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + } + } else { + memcpy(bss->param.deauth_param.mac_addr, sta_addr, + ETH_ALEN); + bss->param.deauth_param.reason_code = mlme->reason_code; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + } + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + kfree(sta_list); + LEAVE(); + return ret; +} + +/** @brief Set authentication mode parameters + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_auth(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_uap_bss_param sys_cfg; + + ENTER(); + + /* Initialize the invalid values so that the correct values below are + downloaded to firmware */ + woal_set_sys_config_invalid_data(&sys_cfg); + + switch (vwrq->flags & IW_AUTH_INDEX) { + case IW_AUTH_CIPHER_PAIRWISE: + /* Rest are not supported now */ + if (vwrq->value & IW_AUTH_CIPHER_NONE) + /* XXX Do not delete no-operation line */ + ; + else if (vwrq->value & IW_AUTH_CIPHER_WEP40) + /* XXX Do not delete no-operation line */ + ; + else if (vwrq->value & IW_AUTH_CIPHER_WEP104) + /* XXX Do not delete no-operation line */ + ; + else if (vwrq->value == IW_AUTH_CIPHER_TKIP) { + sys_cfg.wpa_cfg.pairwise_cipher_wpa = CIPHER_TKIP; + sys_cfg.wpa_cfg.pairwise_cipher_wpa2 = CIPHER_TKIP; + priv->pairwise_cipher = CIPHER_TKIP; + if (!priv->uap_key_mgmt) + priv->uap_key_mgmt = KEY_MGMT_PSK; + PRINTM(MINFO, "Set Auth Cipher TKIP\n"); + } else if (vwrq->value == IW_AUTH_CIPHER_CCMP) { + sys_cfg.wpa_cfg.pairwise_cipher_wpa = CIPHER_AES_CCMP; + sys_cfg.wpa_cfg.pairwise_cipher_wpa2 = CIPHER_AES_CCMP; + priv->pairwise_cipher = CIPHER_AES_CCMP; + if (!priv->uap_key_mgmt) + priv->uap_key_mgmt = KEY_MGMT_PSK; + PRINTM(MINFO, "Set Auth Cipher CCMP\n"); + } else if (vwrq->value == + (IW_AUTH_CIPHER_TKIP | IW_AUTH_CIPHER_CCMP)) { + sys_cfg.wpa_cfg.pairwise_cipher_wpa = + (CIPHER_TKIP | CIPHER_AES_CCMP); + sys_cfg.wpa_cfg.pairwise_cipher_wpa2 = + (CIPHER_TKIP | CIPHER_AES_CCMP); + priv->pairwise_cipher = (CIPHER_TKIP | CIPHER_AES_CCMP); + if (!priv->uap_key_mgmt) + priv->uap_key_mgmt = KEY_MGMT_PSK; + PRINTM(MINFO, "Set Auth Cipher TKIP + CCMP\n"); + } + break; + case IW_AUTH_CIPHER_GROUP: + /* Rest are not supported now */ + if (vwrq->value & IW_AUTH_CIPHER_NONE) + /* XXX Do not delete no-operation line */ + ; + else if (vwrq->value & IW_AUTH_CIPHER_WEP40) + /* XXX Do not delete no-operation line */ + ; + else if (vwrq->value & IW_AUTH_CIPHER_WEP104) + /* XXX Do not delete no-operation line */ + ; + else if (vwrq->value & IW_AUTH_CIPHER_TKIP) { + sys_cfg.wpa_cfg.group_cipher = CIPHER_TKIP; + priv->group_cipher = CIPHER_TKIP; + if (!priv->uap_key_mgmt) + priv->uap_key_mgmt = KEY_MGMT_PSK; + PRINTM(MINFO, "Set Auth Cipher TKIP\n"); + } else if (vwrq->value & IW_AUTH_CIPHER_CCMP) { + sys_cfg.wpa_cfg.group_cipher = CIPHER_AES_CCMP; + priv->group_cipher = CIPHER_AES_CCMP; + if (!priv->uap_key_mgmt) + priv->uap_key_mgmt = KEY_MGMT_PSK; + PRINTM(MINFO, "Set Auth Cipher CCMP\n"); + } + break; + case IW_AUTH_80211_AUTH_ALG: + switch (vwrq->value) { + case IW_AUTH_ALG_SHARED_KEY: + PRINTM(MINFO, "Auth mode shared key!\n"); + sys_cfg.auth_mode = MLAN_AUTH_MODE_SHARED; + break; + case IW_AUTH_ALG_LEAP: + break; + case IW_AUTH_ALG_OPEN_SYSTEM: + PRINTM(MINFO, "Auth mode open!\n"); + sys_cfg.auth_mode = MLAN_AUTH_MODE_OPEN; + break; + default: + PRINTM(MINFO, "Auth mode auto!\n"); + break; + } + break; + case IW_AUTH_WPA_VERSION: + switch (vwrq->value) { + case IW_AUTH_WPA_VERSION_DISABLED: + sys_cfg.protocol = PROTOCOL_NO_SECURITY; + break; + case IW_AUTH_WPA_VERSION_WPA: + sys_cfg.protocol = PROTOCOL_WPA; + break; + case IW_AUTH_WPA_VERSION_WPA2: + sys_cfg.protocol = PROTOCOL_WPA2; + break; + case IW_AUTH_WPA_VERSION_WPA | IW_AUTH_WPA_VERSION_WPA2: + sys_cfg.protocol = PROTOCOL_WPA2_MIXED; + break; + default: + break; + } + priv->uap_protocol = sys_cfg.protocol; + break; + case IW_AUTH_KEY_MGMT: + switch (vwrq->value) { + case IW_AUTH_KEY_MGMT_802_1X: + sys_cfg.key_mgmt |= KEY_MGMT_EAP; + priv->uap_key_mgmt |= KEY_MGMT_EAP; + break; + case IW_AUTH_KEY_MGMT_PSK: + sys_cfg.key_mgmt |= KEY_MGMT_PSK; + priv->uap_key_mgmt |= KEY_MGMT_PSK; + break; + default: + break; + } + break; + case IW_AUTH_WPA_ENABLED: + case IW_AUTH_TKIP_COUNTERMEASURES: + case IW_AUTH_DROP_UNENCRYPTED: + case IW_AUTH_RX_UNENCRYPTED_EAPOL: + case IW_AUTH_ROAMING_CONTROL: + case IW_AUTH_PRIVACY_INVOKED: + default: + LEAVE(); + return -EOPNOTSUPP; /* No AP configuration */ + } + if (!sys_cfg.key_mgmt) + sys_cfg.key_mgmt = priv->uap_key_mgmt; + if (sys_cfg.key_mgmt & KEY_MGMT_PSK) + sys_cfg.key_mgmt_operation |= 0x01; + if (sys_cfg.key_mgmt & KEY_MGMT_EAP) + sys_cfg.key_mgmt_operation |= 0x03; + if (!sys_cfg.protocol) + sys_cfg.protocol = priv->uap_protocol; + + /* Set AP configuration */ + if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, + MLAN_ACT_SET, + MOAL_IOCTL_WAIT, + &sys_cfg)) { + PRINTM(MERROR, "Error setting AP confiruration\n"); + ret = -EFAULT; + goto done; + } + +done: + LEAVE(); + return 0; +} + +/** + * @brief Get authentication mode parameters + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_auth(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_uap_bss_param ap_cfg; + + ENTER(); + + if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, + MLAN_ACT_GET, + MOAL_IOCTL_WAIT, + &ap_cfg)) { + PRINTM(MERROR, "Error getting AP confiruration\n"); + LEAVE(); + return -EFAULT; + } + switch (vwrq->flags & IW_AUTH_INDEX) { + case IW_AUTH_CIPHER_PAIRWISE: + if (ap_cfg.wpa_cfg.pairwise_cipher_wpa == CIPHER_TKIP || + ap_cfg.wpa_cfg.pairwise_cipher_wpa2 == CIPHER_TKIP) + vwrq->value = IW_AUTH_CIPHER_TKIP; + else if (ap_cfg.wpa_cfg.pairwise_cipher_wpa == CIPHER_AES_CCMP + || ap_cfg.wpa_cfg.pairwise_cipher_wpa2 == + CIPHER_AES_CCMP) + vwrq->value = IW_AUTH_CIPHER_CCMP; + else + vwrq->value = IW_AUTH_CIPHER_NONE; + break; + case IW_AUTH_CIPHER_GROUP: + if (ap_cfg.wpa_cfg.group_cipher == CIPHER_TKIP) + vwrq->value = IW_AUTH_CIPHER_TKIP; + else if (ap_cfg.wpa_cfg.group_cipher == CIPHER_AES_CCMP) + vwrq->value = IW_AUTH_CIPHER_CCMP; + else + vwrq->value = IW_AUTH_CIPHER_NONE; + break; + case IW_AUTH_80211_AUTH_ALG: + if (ap_cfg.auth_mode == MLAN_AUTH_MODE_SHARED) + vwrq->value = IW_AUTH_ALG_SHARED_KEY; + else if (ap_cfg.auth_mode == MLAN_AUTH_MODE_NETWORKEAP) + vwrq->value = IW_AUTH_ALG_LEAP; + else + vwrq->value = IW_AUTH_ALG_OPEN_SYSTEM; + break; + case IW_AUTH_WPA_ENABLED: + if (ap_cfg.protocol == PROTOCOL_WPA || + ap_cfg.protocol == PROTOCOL_WPA2 || + ap_cfg.protocol == PROTOCOL_WPA2_MIXED) + vwrq->value = 1; + else + vwrq->value = 0; + break; + case IW_AUTH_KEY_MGMT: + if (ap_cfg.key_mgmt & KEY_MGMT_EAP) + vwrq->value |= IW_AUTH_KEY_MGMT_802_1X; + if (ap_cfg.key_mgmt & KEY_MGMT_PSK) + vwrq->value |= IW_AUTH_KEY_MGMT_PSK; + break; + case IW_AUTH_WPA_VERSION: + case IW_AUTH_TKIP_COUNTERMEASURES: + case IW_AUTH_DROP_UNENCRYPTED: + case IW_AUTH_RX_UNENCRYPTED_EAPOL: + case IW_AUTH_ROAMING_CONTROL: + case IW_AUTH_PRIVACY_INVOKED: + default: + LEAVE(); + return -EOPNOTSUPP; + } + + LEAVE(); + return 0; +} +#endif /* WE >= 18 */ + +/* Data rate listing + * MULTI_BANDS: + * abg a b b/g + * Infra G(12) A(8) B(4) G(12) + * Adhoc A+B(12) A(8) B(4) B(4) + * non-MULTI_BANDS: + b b/g + * Infra B(4) G(12) + * Adhoc B(4) B(4) + */ +/** + * @brief Get Range Info + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_range(struct net_device *dev, struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_uap_bss_param ap_cfg; + struct iw_range *range = (struct iw_range *)extra; + t_u8 band = 0; + int i; + + ENTER(); + + if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, + MLAN_ACT_GET, + MOAL_IOCTL_WAIT, + &ap_cfg)) { + PRINTM(MERROR, "Error getting AP confiruration\n"); + LEAVE(); + return -EFAULT; + } + dwrq->length = sizeof(struct iw_range); + memset(range, 0, sizeof(struct iw_range)); + + range->min_nwid = 0; + range->max_nwid = 0; + + range->num_bitrates = MAX_DATA_RATES; + for (i = 0; i < MIN(MAX_DATA_RATES, IW_MAX_BITRATES) && + ap_cfg.rates[i]; i++) { + range->bitrate[i] = (ap_cfg.rates[i] & 0x7f) * 500000; + } + range->num_bitrates = i; + PRINTM(MINFO, "IW_MAX_BITRATES=%d num_bitrates=%d\n", + IW_MAX_BITRATES, range->num_bitrates); + + range->num_frequency = MIN(ap_cfg.num_of_chan, IW_MAX_FREQUENCIES); + + for (i = 0; i < range->num_frequency; i++) { + range->freq[i].i = (long)ap_cfg.chan_list[i].chan_number; + band = ap_cfg.chan_list[i].band_config_type & BAND_CONFIG_5GHZ; + range->freq[i].m = + (long)channel_to_frequency(ap_cfg.chan_list[i]. + chan_number, band) * 100000; + range->freq[i].e = 1; + } + + PRINTM(MINFO, "IW_MAX_FREQUENCIES=%d num_frequency=%d\n", + IW_MAX_FREQUENCIES, range->num_frequency); + + range->num_channels = range->num_frequency; + + woal_sort_channels(&range->freq[0], range->num_frequency); + + /* + * Set an indication of the max TCP throughput in bit/s that we can + * expect using this interface + */ + if (i > 2) + range->throughput = 5000 * 1000; + else + range->throughput = 1500 * 1000; + + range->min_rts = MLAN_RTS_MIN_VALUE; + range->max_rts = MLAN_RTS_MAX_VALUE; + range->min_frag = MLAN_FRAG_MIN_VALUE; + range->max_frag = MLAN_FRAG_MAX_VALUE; + + range->encoding_size[0] = 5; + range->encoding_size[1] = 13; + range->num_encoding_sizes = 2; + range->max_encoding_tokens = 4; + +/** Minimum power period */ +#define IW_POWER_PERIOD_MIN 1000000 /* 1 sec */ +/** Maximum power period */ +#define IW_POWER_PERIOD_MAX 120000000 /* 2 min */ +/** Minimum power timeout value */ +#define IW_POWER_TIMEOUT_MIN 1000 /* 1 ms */ +/** Maximim power timeout value */ +#define IW_POWER_TIMEOUT_MAX 1000000 /* 1 sec */ + + /* Power Management duration & timeout */ + range->min_pmp = IW_POWER_PERIOD_MIN; + range->max_pmp = IW_POWER_PERIOD_MAX; + range->min_pmt = IW_POWER_TIMEOUT_MIN; + range->max_pmt = IW_POWER_TIMEOUT_MAX; + range->pmp_flags = IW_POWER_PERIOD; + range->pmt_flags = IW_POWER_TIMEOUT; + range->pm_capa = IW_POWER_PERIOD | IW_POWER_TIMEOUT | IW_POWER_ALL_R; + + /* + * Minimum version we recommend + */ + range->we_version_source = 15; + + /* + * Version we are compiled with + */ + range->we_version_compiled = WIRELESS_EXT; + + range->retry_capa = IW_RETRY_LIMIT; + range->retry_flags = IW_RETRY_LIMIT | IW_RETRY_MAX; + + range->min_retry = MLAN_TX_RETRY_MIN; + range->max_retry = MLAN_TX_RETRY_MAX; + +#if (WIRELESS_EXT >= 18) + if (ap_cfg.protocol & PROTOCOL_WPA) + range->enc_capa |= IW_ENC_CAPA_WPA; + if (ap_cfg.protocol & PROTOCOL_WPA2) + range->enc_capa |= IW_ENC_CAPA_WPA2; + if (ap_cfg.wpa_cfg.pairwise_cipher_wpa == CIPHER_TKIP || + ap_cfg.wpa_cfg.pairwise_cipher_wpa2 == CIPHER_TKIP || + ap_cfg.wpa_cfg.group_cipher == CIPHER_TKIP) + range->enc_capa |= IW_ENC_CAPA_CIPHER_TKIP; + if (ap_cfg.wpa_cfg.pairwise_cipher_wpa == CIPHER_AES_CCMP || + ap_cfg.wpa_cfg.pairwise_cipher_wpa2 == CIPHER_AES_CCMP || + ap_cfg.wpa_cfg.group_cipher == CIPHER_AES_CCMP) + range->enc_capa |= IW_ENC_CAPA_CIPHER_CCMP; +#endif + + LEAVE(); + return 0; +} + +/** + * @brief Set priv command + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_priv(struct net_device *dev, struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + ENTER(); + LEAVE(); + return -EOPNOTSUPP; +} + +/** + * @brief Set essid + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0--success, otherwise fail + */ +static int +woal_set_essid(struct net_device *dev, struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_uap_bss_param sys_cfg; + int ret = 0; + + ENTER(); + + /* Check the size of the string */ + if (dwrq->length > IW_ESSID_MAX_SIZE + 1) { + ret = -E2BIG; + goto done; + } + + /* Initialize the invalid values so that the correct values below are + downloaded to firmware */ + woal_set_sys_config_invalid_data(&sys_cfg); + + /* Set the SSID */ +#if WIRELESS_EXT > 20 + sys_cfg.ssid.ssid_len = dwrq->length; +#else + sys_cfg.ssid.ssid_len = dwrq->length - 1; +#endif + + memcpy(sys_cfg.ssid.ssid, extra, + MIN(sys_cfg.ssid.ssid_len, MLAN_MAX_SSID_LENGTH)); + if (!sys_cfg.ssid.ssid_len || sys_cfg.ssid.ssid[0] < 0x20) { + PRINTM(MERROR, "Invalid SSID - aborting set_essid\n"); + ret = -EINVAL; + goto done; + } + PRINTM(MINFO, "Requested new SSID = %s\n", + (sys_cfg.ssid.ssid_len > 0) ? + (char *)sys_cfg.ssid.ssid : "NULL"); + + /* Set AP configuration */ + if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, + MLAN_ACT_SET, + MOAL_IOCTL_WAIT, + &sys_cfg)) { + PRINTM(MERROR, "Error setting AP confiruration\n"); + ret = -EFAULT; + goto done; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Get current essid + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0--success, otherwise fail + */ +static int +woal_get_essid(struct net_device *dev, struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_uap_bss_param ap_cfg; + + ENTER(); + + if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, + MLAN_ACT_GET, + MOAL_IOCTL_WAIT, + &ap_cfg)) { + PRINTM(MERROR, "Error getting AP confiruration\n"); + LEAVE(); + return -EFAULT; + } + + if (priv->bss_started) { + dwrq->length = MIN(dwrq->length, ap_cfg.ssid.ssid_len); + memcpy(extra, ap_cfg.ssid.ssid, dwrq->length); + } else + dwrq->length = 0; + + dwrq->flags = 1; + + LEAVE(); + return 0; +} + +/** + * iwconfig settable callbacks + */ +static const iw_handler woal_handler[] = { + (iw_handler) woal_config_commit, /* SIOCSIWCOMMIT */ + (iw_handler) woal_get_name, /* SIOCGIWNAME */ + (iw_handler) NULL, /* SIOCSIWNWID */ + (iw_handler) NULL, /* SIOCGIWNWID */ + (iw_handler) woal_set_freq, /* SIOCSIWFREQ */ + (iw_handler) woal_get_freq, /* SIOCGIWFREQ */ + (iw_handler) woal_set_bss_mode, /* SIOCSIWMODE */ + (iw_handler) woal_get_bss_mode, /* SIOCGIWMODE */ + (iw_handler) NULL, /* SIOCSIWSENS */ + (iw_handler) NULL, /* SIOCGIWSENS */ + (iw_handler) NULL, /* SIOCSIWRANGE */ + (iw_handler) woal_get_range, /* SIOCGIWRANGE */ + (iw_handler) woal_set_priv, /* SIOCSIWPRIV */ + (iw_handler) NULL, /* SIOCGIWPRIV */ + (iw_handler) NULL, /* SIOCSIWSTATS */ + (iw_handler) NULL, /* SIOCGIWSTATS */ +#if WIRELESS_EXT > 15 +#ifdef CONFIG_WEXT_SPY + iw_handler_set_spy, /* SIOCSIWSPY */ + iw_handler_get_spy, /* SIOCGIWSPY */ + iw_handler_set_thrspy, /* SIOCSIWTHRSPY */ + iw_handler_get_thrspy, /* SIOCGIWTHRSPY */ +#else + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ +#endif +#else /* WIRELESS_EXT > 15 */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ +#endif /* WIRELESS_EXT > 15 */ + (iw_handler) woal_set_wap, /* SIOCSIWAP */ + (iw_handler) woal_get_wap, /* SIOCGIWAP */ +#if WIRELESS_EXT >= 18 + (iw_handler) woal_set_mlme, /* SIOCSIWMLME */ +#else + (iw_handler) NULL, /* -- hole -- */ +#endif + /* (iw_handler) wlan_get_aplist, *//* SIOCGIWAPLIST */ + NULL, /* SIOCGIWAPLIST */ +#if WIRELESS_EXT > 13 + (iw_handler) NULL, /* SIOCSIWSCAN */ + (iw_handler) NULL, /* SIOCGIWSCAN */ +#else /* WIRELESS_EXT > 13 */ + (iw_handler) NULL, /* SIOCSIWSCAN */ + (iw_handler) NULL, /* SIOCGIWSCAN */ +#endif /* WIRELESS_EXT > 13 */ + (iw_handler) woal_set_essid, /* SIOCSIWESSID */ + (iw_handler) woal_get_essid, /* SIOCGIWESSID */ + (iw_handler) NULL, /* SIOCSIWNICKN */ + (iw_handler) NULL, /* SIOCGIWNICKN */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* SIOCSIWRATE */ + (iw_handler) NULL, /* SIOCGIWRATE */ + (iw_handler) NULL, /* SIOCSIWRTS */ + (iw_handler) NULL, /* SIOCGIWRTS */ + (iw_handler) NULL, /* SIOCSIWFRAG */ + (iw_handler) NULL, /* SIOCGIWFRAG */ + (iw_handler) NULL, /* SIOCSIWTXPOW */ + (iw_handler) NULL, /* SIOCGIWTXPOW */ + (iw_handler) NULL, /* SIOCSIWRETRY */ + (iw_handler) NULL, /* SIOCGIWRETRY */ + (iw_handler) woal_set_encode, /* SIOCSIWENCODE */ + (iw_handler) woal_get_encode, /* SIOCGIWENCODE */ + (iw_handler) NULL, /* SIOCSIWPOWER */ + (iw_handler) NULL, /* SIOCGIWPOWER */ +#if (WIRELESS_EXT >= 18) + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) woal_set_gen_ie, /* SIOCSIWGENIE */ + (iw_handler) woal_get_gen_ie, /* SIOCGIWGENIE */ + (iw_handler) woal_set_auth, /* SIOCSIWAUTH */ + (iw_handler) woal_get_auth, /* SIOCGIWAUTH */ + (iw_handler) woal_set_encode_ext, /* SIOCSIWENCODEEXT */ + (iw_handler) woal_get_encode_ext, /* SIOCGIWENCODEEXT */ +#endif /* WIRELESSS_EXT >= 18 */ +}; + +/** + * iwpriv settable callbacks + */ +static const iw_handler woal_private_handler[] = { + NULL, /* SIOCIWFIRSTPRIV */ +}; + +/******************************************************** + Global Functions +********************************************************/ + +/** wlan_handler_def */ +struct iw_handler_def woal_uap_handler_def = { +num_standard:ARRAY_SIZE(woal_handler), +num_private:ARRAY_SIZE(woal_private_handler), +num_private_args:ARRAY_SIZE(woal_uap_priv_args), +standard:(iw_handler *) woal_handler, +private:(iw_handler *) woal_private_handler, +private_args:(struct iw_priv_args *)woal_uap_priv_args, +#if WIRELESS_EXT > 20 +get_wireless_stats:woal_get_uap_wireless_stats, +#endif +}; + +/** + * @brief Get wireless statistics + * + * @param dev A pointer to net_device structure + * + * @return A pointer to iw_statistics buf + */ +struct iw_statistics * +woal_get_uap_wireless_stats(struct net_device *dev) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + t_u16 wait_option = MOAL_NO_WAIT; + + ENTER(); + + /* + * Since schedule() is not allowed from an atomic context + * such as when dev_base_lock for netdevices is acquired + * for reading/writing in kernel before this call, HostCmd + * is issued in non-blocking way in such contexts and + * blocking in other cases. + */ + if (write_can_lock(&dev_base_lock) + && (!in_atomic() || current->exit_state)) + wait_option = MOAL_WSTATS_WAIT; + + priv->w_stats.qual.qual = 0; + priv->w_stats.qual.level = 0; + priv->w_stats.discard.code = 0; + priv->w_stats.status = IW_MODE_MASTER; + woal_uap_get_stats(priv, wait_option, NULL); + + LEAVE(); + return &priv->w_stats; +} diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_wext.c b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_wext.c new file mode 100644 index 00000000..c235efc9 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_wext.c @@ -0,0 +1,3134 @@ +/** @file moal_wext.c + * + * @brief This file contains wireless extension standard ioctl functions + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/************************************************************************ +Change log: + 10/21/2008: initial version +************************************************************************/ + +#include "moal_main.h" + +#ifdef STA_SUPPORT +/** Approximate amount of data needed to pass a scan result back to iwlist */ +#define MAX_SCAN_CELL_SIZE \ + (IW_EV_ADDR_LEN \ + + MLAN_MAX_SSID_LENGTH \ + + IW_EV_UINT_LEN \ + + IW_EV_FREQ_LEN \ + + IW_EV_QUAL_LEN \ + + MLAN_MAX_SSID_LENGTH \ + + IW_EV_PARAM_LEN \ + + 40) /* 40 for WPAIE */ +/** Macro for minimum size of scan buffer */ +#define MIN_ACCEPTED_GET_SCAN_BUF 8000 + +/******************************************************** + Global Variables +********************************************************/ +extern int hw_test; +/******************************************************** + Local Functions +********************************************************/ + +/** + * @brief Compare two SSIDs + * + * @param ssid1 A pointer to ssid to compare + * @param ssid2 A pointer to ssid to compare + * + * @return 0--ssid is same, otherwise is different + */ +static t_s32 +woal_ssid_cmp(mlan_802_11_ssid *ssid1, mlan_802_11_ssid *ssid2) +{ + ENTER(); + + if (!ssid1 || !ssid2) { + LEAVE(); + return -1; + } + if (ssid1->ssid_len != ssid2->ssid_len) { + LEAVE(); + return -1; + } + + LEAVE(); + return memcmp(ssid1->ssid, ssid2->ssid, ssid1->ssid_len); +} + +/** + * @brief Sort Channels + * + * @param freq A pointer to iw_freq structure + * @param num Number of Channels + * + * @return N/A + */ +static inline void +woal_sort_channels(struct iw_freq *freq, int num) +{ + int i, j; + struct iw_freq temp; + + for (i = 0; i < num; i++) + for (j = i + 1; j < num; j++) + if (freq[i].i > freq[j].i) { + temp.i = freq[i].i; + temp.m = freq[i].m; + + freq[i].i = freq[j].i; + freq[i].m = freq[j].m; + + freq[j].i = temp.i; + freq[j].m = temp.m; + } +} + +/** + * @brief Convert RSSI to quality + * + * @param rssi RSSI in dBm + * + * @return Quality of the link (0-5) + */ +static t_u8 +woal_rssi_to_quality(t_s16 rssi) +{ +/** Macro for RSSI range */ +#define MOAL_RSSI_NO_SIGNAL -90 +#define MOAL_RSSI_VERY_LOW -80 +#define MOAL_RSSI_LOW -70 +#define MOAL_RSSI_GOOD -60 +#define MOAL_RSSI_VERY_GOOD -50 +#define MOAL_RSSI_INVALID 0 + if (rssi <= MOAL_RSSI_NO_SIGNAL || rssi == MOAL_RSSI_INVALID) + return 0; + else if (rssi <= MOAL_RSSI_VERY_LOW) + return 1; + else if (rssi <= MOAL_RSSI_LOW) + return 2; + else if (rssi <= MOAL_RSSI_GOOD) + return 3; + else if (rssi <= MOAL_RSSI_VERY_GOOD) + return 4; + else + return 5; +} + +/** + * @brief Set Adapter Node Name + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_nick(struct net_device *dev, struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + ENTER(); + /* + * Check the size of the string + */ + if (dwrq->length > 16) { + LEAVE(); + return -E2BIG; + } + memset(priv->nick_name, 0, sizeof(priv->nick_name)); + memcpy(priv->nick_name, extra, dwrq->length); + LEAVE(); + return 0; +} + +/** + * @brief Get Adapter Node Name + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0 --success + */ +static int +woal_get_nick(struct net_device *dev, struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + ENTER(); + /* + * Get the Nick Name saved + */ + strncpy(extra, (char *)priv->nick_name, 16); + extra[16] = '\0'; + /* + * If none, we may want to get the one that was set + */ + + /* + * Push it out ! + */ + dwrq->length = strlen(extra) + 1; + LEAVE(); + return 0; +} + +/** + * @brief Commit handler: called after a bunch of SET operations + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param cwrq A pointer to char buffer + * @param extra A pointer to extra data buf + * + * @return 0 --success + */ +static int +woal_config_commit(struct net_device *dev, + struct iw_request_info *info, char *cwrq, char *extra) +{ + ENTER(); + + LEAVE(); + return 0; +} + +/** + * @brief Get name + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param cwrq A pointer to char buffer + * @param extra A pointer to extra data buf + * + * @return 0 --success + */ +static int +woal_get_name(struct net_device *dev, struct iw_request_info *info, + char *cwrq, char *extra) +{ + ENTER(); + strcpy(cwrq, "IEEE 802.11-DS"); + LEAVE(); + return 0; +} + +/** + * @brief Set frequency + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param fwrq A pointer to iw_freq structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_freq(struct net_device *dev, struct iw_request_info *info, + struct iw_freq *fwrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + bss = (mlan_ds_bss *)req->pbuf; + /* + * If setting by frequency, convert to a channel + */ + if (fwrq->e == 1) { + long f = fwrq->m / 100000; + bss->param.bss_chan.freq = f; + } else + bss->param.bss_chan.channel = fwrq->m; + + bss->sub_command = MLAN_OID_BSS_CHANNEL; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_SET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (MLAN_STATUS_SUCCESS != + woal_change_adhoc_chan(priv, bss->param.bss_chan.channel, + MOAL_IOCTL_WAIT)) + ret = -EFAULT; + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Get frequency + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param fwrq A pointer to iw_freq structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_freq(struct net_device *dev, struct iw_request_info *info, + struct iw_freq *fwrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_BSS_CHANNEL; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_GET; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + fwrq->m = (long)bss->param.bss_chan.freq; + fwrq->i = (long)bss->param.bss_chan.channel; + fwrq->e = 6; + fwrq->flags = IW_FREQ_FIXED; +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set wlan mode + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param uwrq Wireless mode to set + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_bss_mode(struct net_device *dev, struct iw_request_info *info, + t_u32 *uwrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ds_bss *bss = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + bss = (mlan_ds_bss *)req->pbuf; + bss->sub_command = MLAN_OID_BSS_MODE; + req->req_id = MLAN_IOCTL_BSS; + req->action = MLAN_ACT_SET; + + switch (*uwrq) { + case IW_MODE_INFRA: + bss->param.bss_mode = MLAN_BSS_MODE_INFRA; + break; + case IW_MODE_ADHOC: + bss->param.bss_mode = MLAN_BSS_MODE_IBSS; + break; + case IW_MODE_AUTO: + bss->param.bss_mode = MLAN_BSS_MODE_AUTO; + break; + default: + ret = -EINVAL; + break; + } + if (ret) + goto done; + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Get current BSSID + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param awrq A pointer to sockaddr structure + * @param extra A pointer to extra data buf + * + * @return 0 --success + */ +static int +woal_get_wap(struct net_device *dev, struct iw_request_info *info, + struct sockaddr *awrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_bss_info bss_info; + + ENTER(); + + memset(&bss_info, 0, sizeof(bss_info)); + + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + + if (bss_info.media_connected == MTRUE) + memcpy(awrq->sa_data, &bss_info.bssid, MLAN_MAC_ADDR_LENGTH); + else + memset(awrq->sa_data, 0, MLAN_MAC_ADDR_LENGTH); + awrq->sa_family = ARPHRD_ETHER; + + LEAVE(); + return ret; +} + +/** + * @brief Connect to the AP or Ad-hoc Network with specific bssid + * + * NOTE: Scan should be issued by application before this function is called + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param awrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_wap(struct net_device *dev, struct iw_request_info *info, + struct sockaddr *awrq, char *extra) +{ + int ret = 0; + const t_u8 bcast[MLAN_MAC_ADDR_LENGTH] = { + 255, 255, 255, 255, 255, 255 + }; + const t_u8 zero_mac[MLAN_MAC_ADDR_LENGTH] = { + 0, 0, 0, 0, 0, 0 + }; + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ssid_bssid ssid_bssid; + mlan_bss_info bss_info; + + ENTER(); + + if (awrq->sa_family != ARPHRD_ETHER) { + ret = -EINVAL; + goto done; + } + + PRINTM(MINFO, "ASSOC: WAP: sa_data: " MACSTR "\n", + MAC2STR((t_u8 *)awrq->sa_data)); + + if (MLAN_STATUS_SUCCESS != + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info)) { + ret = -EFAULT; + goto done; + } +#ifdef REASSOCIATION + /* Cancel re-association */ + priv->reassoc_required = MFALSE; +#endif + + /* zero_mac means disconnect */ + if (!memcmp(zero_mac, awrq->sa_data, MLAN_MAC_ADDR_LENGTH)) { + woal_disconnect(priv, MOAL_IOCTL_WAIT, NULL); + goto done; + } + + /* Broadcast MAC means search for best network */ + memset(&ssid_bssid, 0, sizeof(mlan_ssid_bssid)); + + if (memcmp(bcast, awrq->sa_data, MLAN_MAC_ADDR_LENGTH)) { + /* Check if we are already assoicated to the AP */ + if (bss_info.media_connected == MTRUE) { + if (!memcmp(awrq->sa_data, &bss_info.bssid, ETH_ALEN)) + goto done; + } + memcpy(&ssid_bssid.bssid, awrq->sa_data, ETH_ALEN); + } + + if (MLAN_STATUS_SUCCESS != woal_find_best_network(priv, + MOAL_IOCTL_WAIT, + &ssid_bssid)) { + PRINTM(MERROR, + "ASSOC: WAP: MAC address not found in BSSID List\n"); + ret = -ENETUNREACH; + goto done; + } + /* Zero SSID implies use BSSID to connect */ + memset(&ssid_bssid.ssid, 0, sizeof(mlan_802_11_ssid)); + if (MLAN_STATUS_SUCCESS != woal_bss_start(priv, + MOAL_IOCTL_WAIT, + &ssid_bssid)) { + ret = -EFAULT; + goto done; + } +#ifdef REASSOCIATION + memset(&bss_info, 0, sizeof(bss_info)); + if (MLAN_STATUS_SUCCESS != woal_get_bss_info(priv, + MOAL_IOCTL_WAIT, + &bss_info)) { + ret = -EFAULT; + goto done; + } + memcpy(&priv->prev_ssid_bssid.ssid, &bss_info.ssid, + sizeof(mlan_802_11_ssid)); + memcpy(&priv->prev_ssid_bssid.bssid, &bss_info.bssid, + MLAN_MAC_ADDR_LENGTH); +#endif /* REASSOCIATION */ + +done: + + LEAVE(); + return ret; +} + +/** + * @brief Get wlan mode + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param uwrq A pointer to t_u32 string + * @param extra A pointer to extra data buf + * + * @return 0 --success + */ +static int +woal_get_bss_mode(struct net_device *dev, struct iw_request_info *info, + t_u32 *uwrq, char *extra) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + ENTER(); + *uwrq = woal_get_mode(priv, MOAL_IOCTL_WAIT); + LEAVE(); + return 0; +} + +/** + * @brief Set sensitivity + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return 0 --success + */ +static int +woal_set_sens(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + int ret = 0; + + ENTER(); + + LEAVE(); + return ret; +} + +/** + * @brief Get sensitivity + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return -1 + */ +static int +woal_get_sens(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + int ret = -1; + + ENTER(); + + LEAVE(); + return ret; +} + +/** + * @brief Set Tx power + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_txpow(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_power_cfg_t power_cfg; + + ENTER(); + if (vwrq->disabled) { + woal_set_radio(priv, 0); + goto done; + } + woal_set_radio(priv, 1); + + if (!vwrq->fixed) + power_cfg.is_power_auto = 1; + else { + power_cfg.is_power_auto = 0; + power_cfg.power_level = vwrq->value; + } + + if (MLAN_STATUS_SUCCESS != + woal_set_get_tx_power(priv, MLAN_ACT_SET, &power_cfg)) { + ret = -EFAULT; + goto done; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Get Tx power + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_txpow(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_power_cfg_t power_cfg; + mlan_bss_info bss_info; + + ENTER(); + + memset(&power_cfg, 0, sizeof(mlan_power_cfg_t)); + memset(&bss_info, 0, sizeof(bss_info)); + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + + if (MLAN_STATUS_SUCCESS != + woal_set_get_tx_power(priv, MLAN_ACT_GET, &power_cfg)) { + ret = -EFAULT; + goto done; + } + + vwrq->value = power_cfg.power_level; + if (power_cfg.is_power_auto) + vwrq->fixed = 0; + else + vwrq->fixed = 1; + if (bss_info.radio_on) { + vwrq->disabled = 0; + vwrq->flags = IW_TXPOW_DBM; + } else { + vwrq->disabled = 1; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Set power management + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static int +woal_set_power(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + int ret = 0, disabled; + moal_private *priv = (moal_private *)netdev_priv(dev); + + ENTER(); + + if (hw_test) { + PRINTM(MIOCTL, "block set power in hw_test mode\n"); + LEAVE(); + return ret; + } + disabled = vwrq->disabled; + + if (MLAN_STATUS_SUCCESS != woal_set_get_power_mgmt(priv, + MLAN_ACT_SET, + &disabled, + vwrq->flags, + MOAL_IOCTL_WAIT)) { + ret = -EFAULT; + } + + LEAVE(); + return ret; +} + +/** + * @brief Get power management + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return MLAN_STATUS_SUCCESS --success, otherwise fail + */ +static int +woal_get_power(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + int ret = 0, ps_mode; + moal_private *priv = (moal_private *)netdev_priv(dev); + + ENTER(); + + if (MLAN_STATUS_SUCCESS != woal_set_get_power_mgmt(priv, + MLAN_ACT_GET, + &ps_mode, 0, + MOAL_IOCTL_WAIT)) { + ret = -EFAULT; + } + + if (ps_mode) + vwrq->disabled = 0; + else + vwrq->disabled = 1; + + vwrq->value = 0; + + LEAVE(); + return ret; +} + +/** + * @brief Set Tx retry count + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_retry(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + int ret = 0, retry_val = vwrq->value; + moal_private *priv = (moal_private *)netdev_priv(dev); + + ENTER(); + + if (vwrq->flags == IW_RETRY_LIMIT) { + /* + * The MAC has a 4-bit Total_Tx_Count register + * Total_Tx_Count = 1 + Tx_Retry_Count + */ + + if (MLAN_STATUS_SUCCESS != + woal_set_get_retry(priv, MLAN_ACT_SET, + MOAL_IOCTL_WAIT, &retry_val)) { + ret = -EFAULT; + goto done; + } + } else { + ret = -EOPNOTSUPP; + goto done; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Get Tx retry count + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_retry(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + int retry_val, ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + + ENTER(); + + if (MLAN_STATUS_SUCCESS != + woal_set_get_retry(priv, MLAN_ACT_GET, + MOAL_IOCTL_WAIT, &retry_val)) { + ret = -EFAULT; + goto done; + } + + vwrq->disabled = 0; + if (!vwrq->flags) { + vwrq->flags = IW_RETRY_LIMIT; + /* Get Tx retry count */ + vwrq->value = retry_val; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Set encryption key + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_encode(struct net_device *dev, struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ds_sec_cfg *sec = NULL; + mlan_ioctl_req *req = NULL; + int index = 0; + t_u32 auth_mode = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_SET; + + /* Check index */ + index = (dwrq->flags & IW_ENCODE_INDEX) - 1; + if (index > 3) { + PRINTM(MERROR, "Key index #%d out of range\n", index); + ret = -EINVAL; + goto done; + } + + sec->param.encrypt_key.key_len = 0; + if (!(dwrq->flags & IW_ENCODE_NOKEY) && dwrq->length) { + if (dwrq->length > MAX_WEP_KEY_SIZE) { + PRINTM(MERROR, "Key length (%d) out of range\n", + dwrq->length); + ret = -EINVAL; + goto done; + } + if (index < 0) + sec->param.encrypt_key.key_index = + MLAN_KEY_INDEX_DEFAULT; + else + sec->param.encrypt_key.key_index = index; + memcpy(sec->param.encrypt_key.key_material, extra, + dwrq->length); + /* Set the length */ + if (dwrq->length > MIN_WEP_KEY_SIZE) + sec->param.encrypt_key.key_len = MAX_WEP_KEY_SIZE; + else + sec->param.encrypt_key.key_len = MIN_WEP_KEY_SIZE; + } else { + /* + * No key provided so it is either enable key, + * on or off + */ + if (dwrq->flags & IW_ENCODE_DISABLED) { + PRINTM(MINFO, "*** iwconfig mlanX key off ***\n"); + sec->param.encrypt_key.key_disable = MTRUE; + } else { + /* + * iwconfig mlanX key [n] + * iwconfig mlanX key on + * iwconfig mlanX key open + * iwconfig mlanX key restricted + * Do we want to just set the transmit key index ? + */ + if (index < 0) { + PRINTM(MINFO, + "*** iwconfig mlanX key on ***\n"); + sec->param.encrypt_key.key_index = + MLAN_KEY_INDEX_DEFAULT; + } else + sec->param.encrypt_key.key_index = index; + sec->param.encrypt_key.is_current_wep_key = MTRUE; + } + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + if (dwrq->flags & (IW_ENCODE_RESTRICTED | IW_ENCODE_OPEN)) { + switch (dwrq->flags & 0xf000) { + case IW_ENCODE_RESTRICTED: + /* iwconfig mlanX restricted key [1] */ + auth_mode = MLAN_AUTH_MODE_SHARED; + PRINTM(MINFO, "Auth mode restricted!\n"); + break; + case IW_ENCODE_OPEN: + /* iwconfig mlanX key [2] open */ + auth_mode = MLAN_AUTH_MODE_OPEN; + PRINTM(MINFO, "Auth mode open!\n"); + break; + case IW_ENCODE_RESTRICTED | IW_ENCODE_OPEN: + default: + /* iwconfig mlanX key [2] open restricted */ + auth_mode = MLAN_AUTH_MODE_AUTO; + PRINTM(MINFO, "Auth mode auto!\n"); + break; + } + if (MLAN_STATUS_SUCCESS != + woal_set_auth_mode(priv, MOAL_IOCTL_WAIT, auth_mode)) + ret = -EFAULT; + } +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Get encryption key + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_encode(struct net_device *dev, struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_ds_sec_cfg *sec = NULL; + mlan_ioctl_req *req = NULL; + t_u32 auth_mode; + int index = (dwrq->flags & IW_ENCODE_INDEX); + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + if (index < 0 || index > 4) { + PRINTM(MERROR, "Key index #%d out of range\n", index); + ret = -EINVAL; + goto done; + } + if (MLAN_STATUS_SUCCESS != + woal_get_auth_mode(priv, MOAL_IOCTL_WAIT, &auth_mode)) { + ret = -EFAULT; + goto done; + } + dwrq->flags = 0; + /* + * Check encryption mode + */ + switch (auth_mode) { + case MLAN_AUTH_MODE_OPEN: + dwrq->flags = IW_ENCODE_OPEN; + break; + + case MLAN_AUTH_MODE_SHARED: + case MLAN_AUTH_MODE_NETWORKEAP: + dwrq->flags = IW_ENCODE_RESTRICTED; + break; + + case MLAN_AUTH_MODE_AUTO: + dwrq->flags = IW_ENCODE_OPEN | IW_ENCODE_RESTRICTED; + break; + + default: + dwrq->flags = IW_ENCODE_DISABLED | IW_ENCODE_OPEN; + break; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_GET; + + if (!index) + sec->param.encrypt_key.key_index = MLAN_KEY_INDEX_DEFAULT; + else + sec->param.encrypt_key.key_index = index - 1; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + memset(extra, 0, 16); + if (sec->param.encrypt_key.key_len) { + memcpy(extra, sec->param.encrypt_key.key_material, + sec->param.encrypt_key.key_len); + dwrq->length = sec->param.encrypt_key.key_len; + dwrq->flags |= (sec->param.encrypt_key.key_index + 1); + dwrq->flags &= ~IW_ENCODE_DISABLED; + } else if (sec->param.encrypt_key.key_disable) + dwrq->flags |= IW_ENCODE_DISABLED; + else + dwrq->flags &= ~IW_ENCODE_DISABLED; + + dwrq->flags |= IW_ENCODE_NOKEY; +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Set data rate + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_rate(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_rate_cfg_t rate_cfg; + + ENTER(); + + if (vwrq->value == -1) { + rate_cfg.is_rate_auto = 1; + } else { + rate_cfg.is_rate_auto = 0; + rate_cfg.rate_type = MLAN_RATE_VALUE; + rate_cfg.rate = vwrq->value / 500000; + } + if (MLAN_STATUS_SUCCESS != woal_set_get_data_rate(priv, + MLAN_ACT_SET, + &rate_cfg)) { + ret = -EFAULT; + } + + LEAVE(); + return ret; +} + +/** + * @brief Get data rate + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_rate(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_rate_cfg_t rate_cfg; + + ENTER(); + + if (MLAN_STATUS_SUCCESS != woal_set_get_data_rate(priv, + MLAN_ACT_GET, + &rate_cfg)) { + ret = -EFAULT; + goto done; + } + + if (rate_cfg.is_rate_auto) + vwrq->fixed = 0; + else + vwrq->fixed = 1; + vwrq->value = rate_cfg.rate * 500000; +done: + LEAVE(); + return ret; +} + +/** + * @brief Set RTS threshold + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_rts(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + int rthr = vwrq->value; + + ENTER(); + + if (vwrq->disabled) { + rthr = MLAN_RTS_MAX_VALUE; + } else { + if (rthr < MLAN_RTS_MIN_VALUE || rthr > MLAN_RTS_MAX_VALUE) { + ret = -EINVAL; + goto done; + } + } + + if (MLAN_STATUS_SUCCESS != + woal_set_get_rts(priv, MLAN_ACT_SET, MOAL_IOCTL_WAIT, &rthr)) { + ret = -EFAULT; + goto done; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Get RTS threshold + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_rts(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + int rthr, ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + + ENTER(); + + if (MLAN_STATUS_SUCCESS != + woal_set_get_rts(priv, MLAN_ACT_GET, MOAL_IOCTL_WAIT, &rthr)) { + ret = -EFAULT; + goto done; + } + + vwrq->value = rthr; + vwrq->disabled = ((vwrq->value < MLAN_RTS_MIN_VALUE) + || (vwrq->value > MLAN_RTS_MAX_VALUE)); + vwrq->fixed = 1; + +done: + LEAVE(); + return ret; +} + +/** + * @brief Set Fragment threshold + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_frag(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + int fthr = vwrq->value; + + ENTER(); + + if (vwrq->disabled) { + fthr = MLAN_FRAG_MAX_VALUE; + } else { + if (fthr < MLAN_FRAG_MIN_VALUE || fthr > MLAN_FRAG_MAX_VALUE) { + ret = -EINVAL; + goto done; + } + } + + if (MLAN_STATUS_SUCCESS != + woal_set_get_frag(priv, MLAN_ACT_SET, MOAL_IOCTL_WAIT, &fthr)) { + ret = -EFAULT; + goto done; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Get Fragment threshold + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_frag(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + int ret = 0, fthr; + moal_private *priv = (moal_private *)netdev_priv(dev); + + ENTER(); + + if (MLAN_STATUS_SUCCESS != + woal_set_get_frag(priv, MLAN_ACT_GET, MOAL_IOCTL_WAIT, &fthr)) { + ret = -EFAULT; + goto done; + } + + vwrq->value = fthr; + vwrq->disabled = ((vwrq->value < MLAN_FRAG_MIN_VALUE) + || (vwrq->value > MLAN_FRAG_MAX_VALUE)); + vwrq->fixed = 1; + +done: + LEAVE(); + return ret; +} + +#if (WIRELESS_EXT >= 18) +/** + * @brief Get IE + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_gen_ie(struct net_device *dev, struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + int copy_size = 0, ie_len; + t_u8 ie[MAX_IE_SIZE]; + + ENTER(); + + if (MLAN_STATUS_SUCCESS != + woal_set_get_gen_ie(priv, MLAN_ACT_GET, ie, &ie_len, + MOAL_IOCTL_WAIT)) { + ret = -EFAULT; + goto done; + } + + copy_size = MIN(ie_len, dwrq->length); + memcpy(extra, ie, copy_size); + dwrq->length = copy_size; + +done: + LEAVE(); + return ret; +} + +/** + * @brief Set IE + * + * Pass an opaque block of data, expected to be IEEE IEs, to the driver + * for eventual passthrough to the firmware in an associate/join + * (and potentially start) command. + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_gen_ie(struct net_device *dev, struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + int ie_len = dwrq->length; + const t_u8 wps_oui[] = { 0x00, 0x50, 0xf2, 0x04 }; + mlan_ds_wps_cfg *pwps = NULL; + mlan_ioctl_req *req = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + /* extra + 2 to skip element id and length */ + if (!memcmp((t_u8 *)(extra + 2), wps_oui, sizeof(wps_oui))) { + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_wps_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + + pwps = (mlan_ds_wps_cfg *)req->pbuf; + req->req_id = MLAN_IOCTL_WPS_CFG; + req->action = MLAN_ACT_SET; + pwps->sub_command = MLAN_OID_WPS_CFG_SESSION; + pwps->param.wps_session = MLAN_WPS_CFG_SESSION_START; + + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + } + + if (MLAN_STATUS_SUCCESS != + woal_set_get_gen_ie(priv, MLAN_ACT_SET, (t_u8 *)extra, &ie_len, + MOAL_IOCTL_WAIT)) { + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + + LEAVE(); + return ret; +} + +/** + * @brief Extended version of encoding configuration + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_encode_ext(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; + moal_private *priv = (moal_private *)netdev_priv(dev); + int key_index; + t_u8 *pkey_material = NULL; + mlan_ioctl_req *req = NULL; + mlan_ds_sec_cfg *sec = NULL; + int ret = 0; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + key_index = (dwrq->flags & IW_ENCODE_INDEX) - 1; + if (key_index < 0 || key_index > 5) { + ret = -EINVAL; + goto done; + } + if (ext->key_len > (dwrq->length - sizeof(struct iw_encode_ext))) { + ret = -EINVAL; + goto done; + } + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + sec = (mlan_ds_sec_cfg *)req->pbuf; + sec->sub_command = MLAN_OID_SEC_CFG_ENCRYPT_KEY; + req->req_id = MLAN_IOCTL_SEC_CFG; + req->action = MLAN_ACT_SET; + pkey_material = (t_u8 *)(ext + 1); + sec->param.encrypt_key.key_len = ext->key_len; + memcpy(sec->param.encrypt_key.mac_addr, (u8 *)ext->addr.sa_data, + ETH_ALEN); + /* Disable and Remove Key */ + if ((dwrq->flags & IW_ENCODE_DISABLED) && !ext->key_len) { + sec->param.encrypt_key.key_remove = MTRUE; + sec->param.encrypt_key.key_index = key_index; + sec->param.encrypt_key.key_flags = KEY_FLAG_REMOVE_KEY; + PRINTM(MIOCTL, + "Remove key key_index=%d, dwrq->flags=0x%x " MACSTR "\n", + key_index, dwrq->flags, + MAC2STR(sec->param.encrypt_key.mac_addr)); + } else if (ext->key_len <= MAX_WEP_KEY_SIZE) { + /* Set WEP key */ + sec->param.encrypt_key.key_index = key_index; + sec->param.encrypt_key.key_flags = ext->ext_flags; + memcpy(sec->param.encrypt_key.key_material, pkey_material, + ext->key_len); + if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) + sec->param.encrypt_key.is_current_wep_key = MTRUE; + } else { + /* Set WPA key */ + sec->param.encrypt_key.key_index = key_index; + sec->param.encrypt_key.key_flags = ext->ext_flags; + if (ext->ext_flags & IW_ENCODE_EXT_RX_SEQ_VALID) { + memcpy(sec->param.encrypt_key.pn, (t_u8 *)ext->rx_seq, + SEQ_MAX_SIZE); + DBG_HEXDUMP(MCMD_D, "Rx PN", sec->param.encrypt_key.pn, + SEQ_MAX_SIZE); + } + if (ext->ext_flags & IW_ENCODE_EXT_TX_SEQ_VALID) { + memcpy(sec->param.encrypt_key.pn, (t_u8 *)ext->tx_seq, + SEQ_MAX_SIZE); + DBG_HEXDUMP(MCMD_D, "Tx PN", sec->param.encrypt_key.pn, + SEQ_MAX_SIZE); + } + memcpy(sec->param.encrypt_key.key_material, pkey_material, + ext->key_len); + PRINTM(MIOCTL, + "set wpa key key_index=%d, key_len=%d key_flags=0x%x " + MACSTR "\n", key_index, ext->key_len, + sec->param.encrypt_key.key_flags, + MAC2STR(sec->param.encrypt_key.mac_addr)); + DBG_HEXDUMP(MCMD_D, "wpa key", pkey_material, ext->key_len); +#define IW_ENCODE_ALG_AES_CMAC 5 + if (ext->alg == IW_ENCODE_ALG_AES_CMAC) + sec->param.encrypt_key.key_flags |= + KEY_FLAG_AES_MCAST_IGTK; +#define IW_ENCODE_ALG_SMS4 0x20 + /* Set WAPI key */ + if (ext->alg == IW_ENCODE_ALG_SMS4) { + sec->param.encrypt_key.is_wapi_key = MTRUE; + memcpy(sec->param.encrypt_key.pn, (t_u8 *)ext->tx_seq, + SEQ_MAX_SIZE); + memcpy(&sec->param.encrypt_key.pn[SEQ_MAX_SIZE], + (t_u8 *)ext->rx_seq, SEQ_MAX_SIZE); + DBG_HEXDUMP(MCMD_D, "WAPI PN", + sec->param.encrypt_key.pn, PN_SIZE); + } + } + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) + ret = -EFAULT; +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} + +/** + * @brief Extended version of encoding configuration + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return -EOPNOTSUPP + */ +static int +woal_get_encode_ext(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + ENTER(); + LEAVE(); + return -EOPNOTSUPP; +} + +/** + * @brief Request MLME operation + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0--success, otherwise fail + */ +static int +woal_set_mlme(struct net_device *dev, + struct iw_request_info *info, struct iw_point *dwrq, char *extra) +{ + struct iw_mlme *mlme = (struct iw_mlme *)extra; + moal_private *priv = (moal_private *)netdev_priv(dev); + int ret = 0; + + ENTER(); + if ((mlme->cmd == IW_MLME_DEAUTH) || (mlme->cmd == IW_MLME_DISASSOC)) { + + if (MLAN_STATUS_SUCCESS != + woal_disconnect(priv, MOAL_IOCTL_WAIT, + (t_u8 *)mlme->addr.sa_data)) + ret = -EFAULT; + } + LEAVE(); + return ret; +} + +/** @brief Set authentication mode parameters + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_auth(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + t_u32 auth_mode = 0; + t_u32 encrypt_mode = 0; + ENTER(); + + switch (vwrq->flags & IW_AUTH_INDEX) { + case IW_AUTH_CIPHER_PAIRWISE: + case IW_AUTH_CIPHER_GROUP: + if (vwrq->value & IW_AUTH_CIPHER_NONE) + encrypt_mode = MLAN_ENCRYPTION_MODE_NONE; + else if (vwrq->value & IW_AUTH_CIPHER_WEP40) + encrypt_mode = MLAN_ENCRYPTION_MODE_WEP40; + else if (vwrq->value & IW_AUTH_CIPHER_WEP104) + encrypt_mode = MLAN_ENCRYPTION_MODE_WEP104; + else if (vwrq->value & IW_AUTH_CIPHER_TKIP) + encrypt_mode = MLAN_ENCRYPTION_MODE_TKIP; + else if (vwrq->value & IW_AUTH_CIPHER_CCMP) + encrypt_mode = MLAN_ENCRYPTION_MODE_CCMP; + if (MLAN_STATUS_SUCCESS != + woal_set_encrypt_mode(priv, MOAL_IOCTL_WAIT, encrypt_mode)) + ret = -EFAULT; + break; + case IW_AUTH_80211_AUTH_ALG: + switch (vwrq->value) { + case IW_AUTH_ALG_SHARED_KEY: + PRINTM(MINFO, "Auth mode shared key!\n"); + auth_mode = MLAN_AUTH_MODE_SHARED; + break; + case IW_AUTH_ALG_LEAP: + PRINTM(MINFO, "Auth mode LEAP!\n"); + auth_mode = MLAN_AUTH_MODE_NETWORKEAP; + break; + case IW_AUTH_ALG_OPEN_SYSTEM: + PRINTM(MINFO, "Auth mode open!\n"); + auth_mode = MLAN_AUTH_MODE_OPEN; + break; + case IW_AUTH_ALG_SHARED_KEY | IW_AUTH_ALG_OPEN_SYSTEM: + default: + PRINTM(MINFO, "Auth mode auto!\n"); + auth_mode = MLAN_AUTH_MODE_AUTO; + break; + } + if (MLAN_STATUS_SUCCESS != + woal_set_auth_mode(priv, MOAL_IOCTL_WAIT, auth_mode)) + ret = -EFAULT; + break; + case IW_AUTH_WPA_ENABLED: + if (MLAN_STATUS_SUCCESS != + woal_set_wpa_enable(priv, MOAL_IOCTL_WAIT, vwrq->value)) + ret = -EFAULT; + break; +#define IW_AUTH_WAPI_ENABLED 0x20 + case IW_AUTH_WAPI_ENABLED: + if (MLAN_STATUS_SUCCESS != + woal_set_wapi_enable(priv, MOAL_IOCTL_WAIT, vwrq->value)) + ret = -EFAULT; + break; + case IW_AUTH_WPA_VERSION: + /* set WPA_VERSION_DISABLED/VERSION_WPA/VERSION_WP2 */ + priv->wpa_version = vwrq->value; + break; + case IW_AUTH_KEY_MGMT: + /* set KEY_MGMT_802_1X/KEY_MGMT_PSK */ + priv->key_mgmt = vwrq->value; + break; + case IW_AUTH_TKIP_COUNTERMEASURES: + case IW_AUTH_DROP_UNENCRYPTED: + case IW_AUTH_RX_UNENCRYPTED_EAPOL: + case IW_AUTH_ROAMING_CONTROL: + case IW_AUTH_PRIVACY_INVOKED: +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) + case IW_AUTH_MFP: +#endif + break; + default: + ret = -EOPNOTSUPP; + break; + } + LEAVE(); + return ret; +} + +/** + * @brief Get authentication mode parameters + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_auth(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + t_u32 encrypt_mode = 0; + t_u32 auth_mode; + t_u32 wpa_enable; + ENTER(); + switch (vwrq->flags & IW_AUTH_INDEX) { + case IW_AUTH_CIPHER_PAIRWISE: + case IW_AUTH_CIPHER_GROUP: + if (MLAN_STATUS_SUCCESS != + woal_get_encrypt_mode(priv, MOAL_IOCTL_WAIT, &encrypt_mode)) + ret = -EFAULT; + else { + if (encrypt_mode == MLAN_ENCRYPTION_MODE_NONE) + vwrq->value = IW_AUTH_CIPHER_NONE; + else if (encrypt_mode == MLAN_ENCRYPTION_MODE_WEP40) + vwrq->value = IW_AUTH_CIPHER_WEP40; + else if (encrypt_mode == MLAN_ENCRYPTION_MODE_TKIP) + vwrq->value = IW_AUTH_CIPHER_TKIP; + else if (encrypt_mode == MLAN_ENCRYPTION_MODE_CCMP) + vwrq->value = IW_AUTH_CIPHER_CCMP; + else if (encrypt_mode == MLAN_ENCRYPTION_MODE_WEP104) + vwrq->value = IW_AUTH_CIPHER_WEP104; + } + break; + case IW_AUTH_80211_AUTH_ALG: + if (MLAN_STATUS_SUCCESS != + woal_get_auth_mode(priv, MOAL_IOCTL_WAIT, &auth_mode)) + ret = -EFAULT; + else { + if (auth_mode == MLAN_AUTH_MODE_SHARED) + vwrq->value = IW_AUTH_ALG_SHARED_KEY; + else if (auth_mode == MLAN_AUTH_MODE_NETWORKEAP) + vwrq->value = IW_AUTH_ALG_LEAP; + else + vwrq->value = IW_AUTH_ALG_OPEN_SYSTEM; + } + break; + case IW_AUTH_WPA_ENABLED: + if (MLAN_STATUS_SUCCESS != + woal_get_wpa_enable(priv, MOAL_IOCTL_WAIT, &wpa_enable)) + ret = -EFAULT; + else + vwrq->value = wpa_enable; + break; + case IW_AUTH_WPA_VERSION: + vwrq->value = priv->wpa_version; + break; + case IW_AUTH_KEY_MGMT: + vwrq->value = priv->key_mgmt; + break; + case IW_AUTH_TKIP_COUNTERMEASURES: + case IW_AUTH_DROP_UNENCRYPTED: + case IW_AUTH_RX_UNENCRYPTED_EAPOL: + case IW_AUTH_ROAMING_CONTROL: + case IW_AUTH_PRIVACY_INVOKED: + default: + ret = -EOPNOTSUPP; + goto done; + } + +done: + LEAVE(); + return ret; +} + +/** + * @brief Set PMKSA Cache + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return -EOPNOTSUPP + */ +static int +woal_set_pmksa(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + ENTER(); + LEAVE(); + return -EOPNOTSUPP; +} + +#endif /* WE >= 18 */ + +/* Data rate listing + * MULTI_BANDS: + * abg a b b/g + * Infra G(12) A(8) B(4) G(12) + * Adhoc A+B(12) A(8) B(4) B(4) + * non-MULTI_BANDS: + b b/g + * Infra B(4) G(12) + * Adhoc B(4) B(4) + */ +/** + * @brief Get Range Info + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_get_range(struct net_device *dev, struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + int i; + moal_private *priv = (moal_private *)netdev_priv(dev); + struct iw_range *range = (struct iw_range *)extra; + moal_802_11_rates rates; + mlan_chan_list *pchan_list = NULL; + mlan_bss_info bss_info; + gfp_t flag; + + ENTER(); + + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + pchan_list = kzalloc(sizeof(mlan_chan_list), flag); + if (!pchan_list) { + LEAVE(); + return -ENOMEM; + } + + dwrq->length = sizeof(struct iw_range); + memset(range, 0, sizeof(struct iw_range)); + + range->min_nwid = 0; + range->max_nwid = 0; + + memset(&rates, 0, sizeof(rates)); + woal_get_data_rates(priv, MOAL_IOCTL_WAIT, &rates); + range->num_bitrates = rates.num_of_rates; + + for (i = 0; + i < MIN(range->num_bitrates, IW_MAX_BITRATES) && rates.rates[i]; + i++) { + range->bitrate[i] = (rates.rates[i] & 0x7f) * 500000; + } + range->num_bitrates = i; + PRINTM(MINFO, "IW_MAX_BITRATES=%d num_bitrates=%d\n", IW_MAX_BITRATES, + range->num_bitrates); + + range->num_frequency = 0; + + woal_get_channel_list(priv, MOAL_IOCTL_WAIT, pchan_list); + + range->num_frequency = MIN(pchan_list->num_of_chan, IW_MAX_FREQUENCIES); + + for (i = 0; i < range->num_frequency; i++) { + range->freq[i].i = (long)pchan_list->cf[i].channel; + range->freq[i].m = (long)pchan_list->cf[i].freq * 100000; + range->freq[i].e = 1; + } + kfree(pchan_list); + + PRINTM(MINFO, "IW_MAX_FREQUENCIES=%d num_frequency=%d\n", + IW_MAX_FREQUENCIES, range->num_frequency); + + range->num_channels = range->num_frequency; + + woal_sort_channels(&range->freq[0], range->num_frequency); + + /* + * Set an indication of the max TCP throughput in bit/s that we can + * expect using this interface + */ + if (i > 2) + range->throughput = 5000 * 1000; + else + range->throughput = 1500 * 1000; + + range->min_rts = MLAN_RTS_MIN_VALUE; + range->max_rts = MLAN_RTS_MAX_VALUE; + range->min_frag = MLAN_FRAG_MIN_VALUE; + range->max_frag = MLAN_FRAG_MAX_VALUE; + + range->encoding_size[0] = 5; + range->encoding_size[1] = 13; + range->num_encoding_sizes = 2; + range->max_encoding_tokens = 4; + +/** Minimum power period */ +#define IW_POWER_PERIOD_MIN 1000000 /* 1 sec */ +/** Maximum power period */ +#define IW_POWER_PERIOD_MAX 120000000 /* 2 min */ +/** Minimum power timeout value */ +#define IW_POWER_TIMEOUT_MIN 1000 /* 1 ms */ +/** Maximim power timeout value */ +#define IW_POWER_TIMEOUT_MAX 1000000 /* 1 sec */ + + /* Power Management duration & timeout */ + range->min_pmp = IW_POWER_PERIOD_MIN; + range->max_pmp = IW_POWER_PERIOD_MAX; + range->min_pmt = IW_POWER_TIMEOUT_MIN; + range->max_pmt = IW_POWER_TIMEOUT_MAX; + range->pmp_flags = IW_POWER_PERIOD; + range->pmt_flags = IW_POWER_TIMEOUT; + range->pm_capa = IW_POWER_PERIOD | IW_POWER_TIMEOUT | IW_POWER_ALL_R; + + /* + * Minimum version we recommend + */ + range->we_version_source = 15; + + /* + * Version we are compiled with + */ + range->we_version_compiled = WIRELESS_EXT; + + range->retry_capa = IW_RETRY_LIMIT; + range->retry_flags = IW_RETRY_LIMIT | IW_RETRY_MAX; + + range->min_retry = MLAN_TX_RETRY_MIN; + range->max_retry = MLAN_TX_RETRY_MAX; + + /* + * Set the qual, level and noise range values + */ + /* + * need to put the right values here + */ +/** Maximum quality percentage */ +#define IW_MAX_QUAL_PERCENT 5 +/** Average quality percentage */ +#define IW_AVG_QUAL_PERCENT 3 + range->max_qual.qual = IW_MAX_QUAL_PERCENT; + range->max_qual.level = 0; + range->max_qual.noise = 0; + + range->avg_qual.qual = IW_AVG_QUAL_PERCENT; + range->avg_qual.level = 0; + range->avg_qual.noise = 0; + + range->sensitivity = 0; + + /* + * Setup the supported power level ranges + */ + memset(range->txpower, 0, sizeof(range->txpower)); + + memset(&bss_info, 0, sizeof(bss_info)); + + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); + + range->txpower[0] = bss_info.min_power_level; + range->txpower[1] = bss_info.max_power_level; + range->num_txpower = 2; + range->txpower_capa = IW_TXPOW_DBM | IW_TXPOW_RANGE; + +#if (WIRELESS_EXT >= 18) + range->enc_capa = IW_ENC_CAPA_WPA | + IW_ENC_CAPA_WPA2 | + IW_ENC_CAPA_CIPHER_CCMP | IW_ENC_CAPA_CIPHER_TKIP; +#endif + + LEAVE(); + return 0; +} + +#ifdef MEF_CFG_RX_FILTER +/** + * @brief Enable/disable Rx broadcast/multicast filter in non-HS mode + * + * @param priv A pointer to moal_private structure + * @param enable MTRUE/MFALSE: enable/disable + * + * @return 0 -- success, otherwise fail + */ +static int +woal_set_rxfilter(moal_private *priv, BOOLEAN enable) +{ + int ret = 0; + mlan_ioctl_req *req = NULL; + mlan_ds_misc_cfg *misc = NULL; + mlan_ds_misc_mef_cfg *mef_cfg = NULL; + mlan_status status = MLAN_STATUS_SUCCESS; + + ENTER(); + + req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg)); + if (req == NULL) { + ret = -ENOMEM; + goto done; + } + misc = (mlan_ds_misc_cfg *)req->pbuf; + mef_cfg = &misc->param.mef_cfg; + req->req_id = MLAN_IOCTL_MISC_CFG; + misc->sub_command = MLAN_OID_MISC_MEF_CFG; + req->action = MLAN_ACT_SET; + + mef_cfg->sub_id = (enable ? MEF_CFG_RX_FILTER_ENABLE : MEF_CFG_DISABLE); + status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); + if (status != MLAN_STATUS_SUCCESS) { + ret = -EFAULT; + goto done; + } + +done: + if (status != MLAN_STATUS_PENDING) + kfree(req); + LEAVE(); + return ret; +} +#endif + +/** + * @brief Set priv command + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0 --success, otherwise fail + */ +static int +woal_set_priv(struct net_device *dev, struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + char *buf = NULL; + int power_mode = 0; + int band = 0; + char *pband = NULL; + mlan_bss_info bss_info; + mlan_ds_get_signal signal; + mlan_rate_cfg_t rate; + char *pdata = NULL; + t_u8 country_code[COUNTRY_CODE_LEN]; + int len = 0; + gfp_t flag; + ENTER(); + if (!priv || !priv->phandle) { + PRINTM(MERROR, "priv or handle is NULL\n"); + ret = -EFAULT; + goto done; + } + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + buf = kzalloc(dwrq->length + 1, flag); + if (!buf) { + ret = -ENOMEM; + goto done; + } + if (copy_from_user(buf, dwrq->pointer, dwrq->length)) { + ret = -EFAULT; + goto done; + } + PRINTM(MIOCTL, "SIOCSIWPRIV request = %s\n", buf); + if (strncmp(buf, "RSSILOW-THRESHOLD", strlen("RSSILOW-THRESHOLD")) == 0) { + if (dwrq->length > strlen("RSSILOW-THRESHOLD") + 1) { + pdata = buf + strlen("RSSILOW-THRESHOLD") + 1; + if (MLAN_STATUS_SUCCESS != + woal_set_rssi_low_threshold(priv, pdata, + MOAL_IOCTL_WAIT)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else { + ret = -EFAULT; + goto done; + } + } else if (strncmp(buf, "RSSI", strlen("RSSI")) == 0) { + if (MLAN_STATUS_SUCCESS != woal_get_bss_info(priv, + MOAL_IOCTL_WAIT, + &bss_info)) { + ret = -EFAULT; + goto done; + } + if (bss_info.media_connected) { + if (MLAN_STATUS_SUCCESS != + woal_get_signal_info(priv, MOAL_IOCTL_WAIT, + &signal)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "%s rssi %d\n", bss_info.ssid.ssid, + signal.bcn_rssi_avg) + 1; + } else { + len = sprintf(buf, "OK\n") + 1; + } + } else if (strncmp(buf, "LINKSPEED", strlen("LINKSPEED")) == 0) { + if (MLAN_STATUS_SUCCESS != + woal_set_get_data_rate(priv, MLAN_ACT_GET, &rate)) { + ret = -EFAULT; + goto done; + } + PRINTM(MIOCTL, "tx rate=%d\n", (int)rate.rate); + len = sprintf(buf, "LinkSpeed %d\n", + (int)(rate.rate * 500000 / 1000000)) + 1; + } else if (strncmp(buf, "MACADDR", strlen("MACADDR")) == 0) { + len = sprintf(buf, "Macaddr = %02X:%02X:%02X:%02X:%02X:%02X\n", + priv->current_addr[0], priv->current_addr[1], + priv->current_addr[2], priv->current_addr[3], + priv->current_addr[4], priv->current_addr[5]) + 1; + } else if (strncmp(buf, "GETPOWER", strlen("GETPOWER")) == 0) { + if (MLAN_STATUS_SUCCESS != + woal_get_powermode(priv, &power_mode)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "powermode = %d\n", power_mode) + 1; + } else if (strncmp(buf, "SCAN-ACTIVE", strlen("SCAN-ACTIVE")) == 0) { + if (MLAN_STATUS_SUCCESS != + woal_set_scan_type(priv, MLAN_SCAN_TYPE_ACTIVE)) { + ret = -EFAULT; + goto done; + } + priv->scan_type = MLAN_SCAN_TYPE_ACTIVE; + PRINTM(MIOCTL, "Set Active Scan\n"); + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "SCAN-PASSIVE", strlen("SCAN-PASSIVE")) == 0) { + if (MLAN_STATUS_SUCCESS != + woal_set_scan_type(priv, MLAN_SCAN_TYPE_PASSIVE)) { + ret = -EFAULT; + goto done; + } + priv->scan_type = MLAN_SCAN_TYPE_PASSIVE; + PRINTM(MIOCTL, "Set Passive Scan\n"); + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "POWERMODE", strlen("POWERMODE")) == 0) { + if (dwrq->length > strlen("POWERMODE") + 1) { + pdata = buf + strlen("POWERMODE") + 1; + if (!hw_test) { + if (MLAN_STATUS_SUCCESS != + woal_set_powermode(priv, pdata)) { + ret = -EFAULT; + goto done; + } + } + len = sprintf(buf, "OK\n") + 1; + } else { + ret = -EFAULT; + goto done; + } + } else if (strncmp(buf, "COUNTRY", strlen("COUNTRY")) == 0) { + memset(country_code, 0, sizeof(country_code)); + memcpy(country_code, buf + strlen("COUNTRY") + 1, + strlen(buf) - strlen("COUNTRY") - 1); + PRINTM(MIOCTL, "Set COUNTRY %s\n", country_code); + if (MLAN_STATUS_SUCCESS != + woal_set_region_code(priv, country_code)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else if (memcmp(buf, WEXT_CSCAN_HEADER, WEXT_CSCAN_HEADER_SIZE) == 0) { + PRINTM(MIOCTL, "Set Combo Scan\n"); + if (MLAN_STATUS_SUCCESS != + woal_set_combo_scan(priv, buf, dwrq->length)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "GETBAND", strlen("GETBAND")) == 0) { + if (MLAN_STATUS_SUCCESS != woal_get_band(priv, &band)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "Band %d\n", band) + 1; + } else if (strncmp(buf, "SETBAND", strlen("SETBAND")) == 0) { + pband = buf + strlen("SETBAND") + 1; + if (MLAN_STATUS_SUCCESS != woal_set_band(priv, pband)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "START", strlen("START")) == 0) { + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "STOP", strlen("STOP")) == 0) { + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "SETSUSPENDOPT", strlen("SETSUSPENDOPT")) == 0) { + /* it will be done by GUI */ + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "BTCOEXMODE", strlen("BTCOEXMODE")) == 0) { + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "BTCOEXSCAN-START", strlen("BTCOEXSCAN-START")) + == 0) { + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "BTCOEXSCAN-STOP", strlen("BTCOEXSCAN-STOP")) == + 0) { + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "BGSCAN-START", strlen("BGSCAN-START")) == 0) { + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "BGSCAN-CONFIG", strlen("BGSCAN-CONFIG")) == 0) { + if (MLAN_STATUS_SUCCESS != + woal_set_bg_scan(priv, buf, dwrq->length)) { + ret = -EFAULT; + goto done; + } + priv->bg_scan_start = MTRUE; + priv->bg_scan_reported = MFALSE; + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "BGSCAN-STOP", strlen("BGSCAN-STOP")) == 0) { + if (priv->bg_scan_start && !priv->scan_cfg.rssi_threshold) { + if (MLAN_STATUS_SUCCESS != + woal_stop_bg_scan(priv, MOAL_IOCTL_WAIT)) { + ret = -EFAULT; + goto done; + } + priv->bg_scan_start = MFALSE; + priv->bg_scan_reported = MFALSE; + } + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "RXFILTER-START", strlen("RXFILTER-START")) == + 0) { +#ifdef MEF_CFG_RX_FILTER + ret = woal_set_rxfilter(priv, MTRUE); + if (ret) + goto done; +#endif + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "RXFILTER-STOP", strlen("RXFILTER-STOP")) == 0) { +#ifdef MEF_CFG_RX_FILTER + ret = woal_set_rxfilter(priv, MFALSE); + if (ret) + goto done; +#endif + len = sprintf(buf, "OK\n") + 1; + } else if (strncmp(buf, "RXFILTER-ADD", strlen("RXFILTER-ADD")) == 0) { + if (dwrq->length > strlen("RXFILTER-ADD") + 1) { + pdata = buf + strlen("RXFILTER-ADD") + 1; + if (MLAN_STATUS_SUCCESS != + woal_add_rxfilter(priv, pdata)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else { + ret = -EFAULT; + goto done; + } + } else if (strncmp(buf, "RXFILTER-REMOVE", strlen("RXFILTER-REMOVE")) == + 0) { + if (dwrq->length > strlen("RXFILTER-REMOVE") + 1) { + pdata = buf + strlen("RXFILTER-REMOVE") + 1; + if (MLAN_STATUS_SUCCESS != + woal_remove_rxfilter(priv, pdata)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else { + ret = -EFAULT; + goto done; + } + } else if (strncmp(buf, "QOSINFO", strlen("QOSINFO")) == 0) { + if (dwrq->length > strlen("QOSINFO") + 1) { + pdata = buf + strlen("QOSINFO") + 1; + if (MLAN_STATUS_SUCCESS != + woal_priv_qos_cfg(priv, MLAN_ACT_SET, pdata)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else { + ret = -EFAULT; + goto done; + } + } else if (strncmp(buf, "SLEEPPD", strlen("SLEEPPD")) == 0) { + if (dwrq->length > strlen("SLEEPPD") + 1) { + pdata = buf + strlen("SLEEPPD") + 1; + if (MLAN_STATUS_SUCCESS != + woal_set_sleeppd(priv, pdata)) { + ret = -EFAULT; + goto done; + } + len = sprintf(buf, "OK\n") + 1; + } else { + ret = -EFAULT; + goto done; + } + } else { + PRINTM(MIOCTL, "Unknow PRIVATE command: %s, ignored\n", buf); + ret = -EFAULT; + goto done; + } + PRINTM(MIOCTL, "PRIV Command return: %s, length=%d\n", buf, len); + dwrq->length = (t_u16)len; + if (copy_to_user(dwrq->pointer, buf, dwrq->length)) + ret = -EFAULT; +done: + kfree(buf); + LEAVE(); + return ret; +} + +/** + * @brief Scan Network + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param vwrq A pointer to iw_param structure + * @param extra A pointer to extra data buf + * + * @return 0--success, otherwise fail + */ +static int +woal_set_scan(struct net_device *dev, struct iw_request_info *info, + struct iw_param *vwrq, char *extra) +{ + int ret = 0; + moal_private *priv = (moal_private *)netdev_priv(dev); + moal_handle *handle = priv->phandle; +#if WIRELESS_EXT >= 18 + struct iw_scan_req *req; + struct iw_point *dwrq = (struct iw_point *)vwrq; +#endif + mlan_802_11_ssid req_ssid; + + ENTER(); + if (handle->scan_pending_on_block == MTRUE) { + PRINTM(MINFO, "scan already in processing...\n"); + LEAVE(); + return ret; + } +#ifdef REASSOCIATION + if (MOAL_ACQ_SEMAPHORE_BLOCK(&handle->reassoc_sem)) { + PRINTM(MERROR, "Acquire semaphore error, woal_set_scan\n"); + LEAVE(); + return -EBUSY; + } +#endif /* REASSOCIATION */ + priv->report_scan_result = MTRUE; + + memset(&req_ssid, 0x00, sizeof(mlan_802_11_ssid)); + +#if WIRELESS_EXT >= 18 + if ((dwrq->flags & IW_SCAN_THIS_ESSID) && + (dwrq->length == sizeof(struct iw_scan_req))) { + req = (struct iw_scan_req *)extra; + + if (req->essid_len <= MLAN_MAX_SSID_LENGTH) { + + req_ssid.ssid_len = req->essid_len; + memcpy(req_ssid.ssid, + (t_u8 *)req->essid, req->essid_len); + if (MLAN_STATUS_SUCCESS != + woal_request_scan(priv, MOAL_NO_WAIT, &req_ssid)) { + ret = -EFAULT; + goto done; + } + } + } else { +#endif + if (MLAN_STATUS_SUCCESS != + woal_request_scan(priv, MOAL_NO_WAIT, NULL)) { + ret = -EFAULT; + goto done; + } +#if WIRELESS_EXT >= 18 + } +#endif + + if (priv->phandle->surprise_removed) { + ret = -EFAULT; + goto done; + } + +done: +#ifdef REASSOCIATION + MOAL_REL_SEMAPHORE(&handle->reassoc_sem); +#endif + + LEAVE(); + return ret; +} + +/** + * @brief Set essid + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0--success, otherwise fail + */ +static int +woal_set_essid(struct net_device *dev, struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_802_11_ssid req_ssid; + mlan_ssid_bssid ssid_bssid; +#ifdef REASSOCIATION + moal_handle *handle = priv->phandle; + mlan_bss_info bss_info; +#endif + int ret = 0; + t_u32 mode = 0; + + ENTER(); + +#ifdef REASSOCIATION + /* Cancel re-association */ + priv->reassoc_required = MFALSE; + + if (MOAL_ACQ_SEMAPHORE_BLOCK(&handle->reassoc_sem)) { + PRINTM(MERROR, "Acquire semaphore error, woal_set_essid\n"); + LEAVE(); + return -EBUSY; + } +#endif /* REASSOCIATION */ + + /* Check the size of the string */ + if (dwrq->length > IW_ESSID_MAX_SIZE + 1) { + ret = -E2BIG; + goto setessid_ret; + } + if (priv->scan_type == MLAN_SCAN_TYPE_PASSIVE) + woal_set_scan_type(priv, MLAN_SCAN_TYPE_ACTIVE); + memset(&req_ssid, 0, sizeof(mlan_802_11_ssid)); + memset(&ssid_bssid, 0, sizeof(mlan_ssid_bssid)); + +#if WIRELESS_EXT > 20 + req_ssid.ssid_len = dwrq->length; +#else + req_ssid.ssid_len = dwrq->length - 1; +#endif + + /* + * Check if we asked for `any' or 'particular' + */ + if (!dwrq->flags) { +#ifdef REASSOCIATION + if (!req_ssid.ssid_len) { + memset(&priv->prev_ssid_bssid.ssid, 0x00, + sizeof(mlan_802_11_ssid)); + memset(&priv->prev_ssid_bssid.bssid, 0x00, + MLAN_MAC_ADDR_LENGTH); + goto setessid_ret; + } +#endif + /* Do normal SSID scanning */ + if (MLAN_STATUS_SUCCESS != + woal_request_scan(priv, MOAL_IOCTL_WAIT, NULL)) { + ret = -EFAULT; + goto setessid_ret; + } + } else { + /* Set the SSID */ + memcpy(req_ssid.ssid, extra, + MIN(req_ssid.ssid_len, MLAN_MAX_SSID_LENGTH)); + if (!req_ssid.ssid_len || + (MFALSE == woal_ssid_valid(&req_ssid))) { + PRINTM(MERROR, "Invalid SSID - aborting set_essid\n"); + ret = -EINVAL; + goto setessid_ret; + } + + PRINTM(MINFO, "Requested new SSID = %s\n", + (char *)req_ssid.ssid); + memcpy(&ssid_bssid.ssid, &req_ssid, sizeof(mlan_802_11_ssid)); + if (MTRUE == woal_is_connected(priv, &ssid_bssid)) { + PRINTM(MIOCTL, "Already connect to the network\n"); + goto setessid_ret; + } + + if (dwrq->flags != 0xFFFF) { + if (MLAN_STATUS_SUCCESS != + woal_find_essid(priv, &ssid_bssid, + MOAL_IOCTL_WAIT)) { + /* Do specific SSID scanning */ + if (MLAN_STATUS_SUCCESS != + woal_request_scan(priv, MOAL_IOCTL_WAIT, + &req_ssid)) { + ret = -EFAULT; + goto setessid_ret; + } + } + } + + } + + mode = woal_get_mode(priv, MOAL_IOCTL_WAIT); + if (mode == IW_MODE_ADHOC) + /* disconnect before try to associate */ + woal_disconnect(priv, MOAL_IOCTL_WAIT, NULL); + + if (mode != IW_MODE_ADHOC) { + if (MLAN_STATUS_SUCCESS != + woal_find_best_network(priv, MOAL_IOCTL_WAIT, + &ssid_bssid)) { + ret = -EFAULT; + goto setessid_ret; + } + if (MLAN_STATUS_SUCCESS != + woal_11d_check_ap_channel(priv, MOAL_IOCTL_WAIT, + &ssid_bssid)) { + PRINTM(MERROR, + "The AP's channel is invalid for current region\n"); + ret = -EFAULT; + goto setessid_ret; + } + } else if (MLAN_STATUS_SUCCESS != + woal_find_best_network(priv, MOAL_IOCTL_WAIT, &ssid_bssid)) + /* Adhoc start, Check the channel command */ + woal_11h_channel_check_ioctl(priv, MOAL_IOCTL_WAIT); + + /* Connect to BSS by ESSID */ + memset(&ssid_bssid.bssid, 0, MLAN_MAC_ADDR_LENGTH); + + if (MLAN_STATUS_SUCCESS != woal_bss_start(priv, + MOAL_IOCTL_WAIT, + &ssid_bssid)) { + ret = -EFAULT; + goto setessid_ret; + } +#ifdef REASSOCIATION + memset(&bss_info, 0, sizeof(bss_info)); + if (MLAN_STATUS_SUCCESS != woal_get_bss_info(priv, + MOAL_IOCTL_WAIT, + &bss_info)) { + ret = -EFAULT; + goto setessid_ret; + } + memcpy(&priv->prev_ssid_bssid.ssid, &bss_info.ssid, + sizeof(mlan_802_11_ssid)); + memcpy(&priv->prev_ssid_bssid.bssid, &bss_info.bssid, + MLAN_MAC_ADDR_LENGTH); +#endif /* REASSOCIATION */ + +setessid_ret: + if (priv->scan_type == MLAN_SCAN_TYPE_PASSIVE) + woal_set_scan_type(priv, MLAN_SCAN_TYPE_PASSIVE); +#ifdef REASSOCIATION + MOAL_REL_SEMAPHORE(&handle->reassoc_sem); +#endif + + LEAVE(); + return ret; +} + +/** + * @brief Get current essid + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0--success, otherwise fail + */ +static int +woal_get_essid(struct net_device *dev, struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + mlan_bss_info bss_info; + int ret = 0; + + ENTER(); + + memset(&bss_info, 0, sizeof(bss_info)); + + if (MLAN_STATUS_SUCCESS != + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info)) { + ret = -EFAULT; + goto done; + } + + if (bss_info.media_connected) { + dwrq->length = MIN(dwrq->length, bss_info.ssid.ssid_len); + memcpy(extra, bss_info.ssid.ssid, dwrq->length); + } else + dwrq->length = 0; + + if (bss_info.scan_table_idx) + dwrq->flags = (bss_info.scan_table_idx + 1) & IW_ENCODE_INDEX; + else + dwrq->flags = 1; + +done: + LEAVE(); + return ret; +} + +/** + * @brief Retrieve the scan table entries via wireless tools IOCTL call + * + * @param dev A pointer to net_device structure + * @param info A pointer to iw_request_info structure + * @param dwrq A pointer to iw_point structure + * @param extra A pointer to extra data buf + * + * @return 0--success, otherwise fail + */ +static int +woal_get_scan(struct net_device *dev, struct iw_request_info *info, + struct iw_point *dwrq, char *extra) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + int ret = 0; + char *current_ev = extra; + char *end_buf = extra + IW_SCAN_MAX_DATA; + char *current_val; /* For rates */ + struct iw_event iwe; /* Temporary buffer */ + unsigned int i; + unsigned int j; + mlan_scan_resp scan_resp; + mlan_bss_info bss_info; + BSSDescriptor_t *scan_table; + mlan_ds_get_signal rssi; + t_u16 buf_size = 16 + 256 * 2; + char *buf = NULL; + char *ptr; +#if WIRELESS_EXT >= 18 + t_u8 *praw_data; +#endif + int beacon_size; + t_u8 *pbeacon; + IEEEtypes_ElementId_e element_id; + t_u8 element_len; + gfp_t flag; + + ENTER(); + + if (priv->phandle->scan_pending_on_block == MTRUE) { + LEAVE(); + return -EAGAIN; + } + flag = (in_atomic() || irqs_disabled())? GFP_ATOMIC : GFP_KERNEL; + buf = kzalloc((buf_size), flag); + if (!buf) { + PRINTM(MERROR, "Cannot allocate buffer!\n"); + ret = -EFAULT; + goto done; + } + + memset(&bss_info, 0, sizeof(bss_info)); + if (MLAN_STATUS_SUCCESS != + woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info)) { + ret = -EFAULT; + goto done; + } + memset(&scan_resp, 0, sizeof(scan_resp)); + if (MLAN_STATUS_SUCCESS != woal_get_scan_table(priv, + MOAL_IOCTL_WAIT, + &scan_resp)) { + ret = -EFAULT; + goto done; + } + scan_table = (BSSDescriptor_t *)scan_resp.pscan_table; + if (dwrq->length) + end_buf = extra + dwrq->length; + if (priv->media_connected == MTRUE) + PRINTM(MINFO, "Current Ssid: %-32s\n", bss_info.ssid.ssid); + PRINTM(MINFO, "Scan: Get: NumInScanTable = %d\n", + (int)scan_resp.num_in_scan_table); + +#if WIRELESS_EXT > 13 + /* The old API using SIOCGIWAPLIST had a hard limit of IW_MAX_AP. The + new API using SIOCGIWSCAN is only limited by buffer size WE-14 -> + WE-16 the buffer is limited to IW_SCAN_MAX_DATA bytes which is 4096. */ + for (i = 0; i < MIN(scan_resp.num_in_scan_table, 64); i++) { + if ((current_ev + MAX_SCAN_CELL_SIZE) >= end_buf) { + PRINTM(MINFO, + "i=%d break out: current_ev=%p end_buf=%p " + "MAX_SCAN_CELL_SIZE=%d\n", i, current_ev, + end_buf, (t_u32)MAX_SCAN_CELL_SIZE); + ret = -E2BIG; + break; + } + if (!scan_table[i].freq) { + PRINTM(MWARN, "Invalid channel number %d\n", + (int)scan_table[i].channel); + continue; + } + PRINTM(MINFO, "i=%d Ssid: %-32s\n", i, + scan_table[i].ssid.ssid); + + /* check ssid is valid or not, ex. hidden ssid will be filter + out */ + if (woal_ssid_valid(&scan_table[i].ssid) == MFALSE) + continue; + + /* First entry *MUST* be the AP MAC address */ + iwe.cmd = SIOCGIWAP; + iwe.u.ap_addr.sa_family = ARPHRD_ETHER; + memcpy(iwe.u.ap_addr.sa_data, &scan_table[i].mac_address, + ETH_ALEN); + + iwe.len = IW_EV_ADDR_LEN; + current_ev = + IWE_STREAM_ADD_EVENT(info, current_ev, end_buf, &iwe, + iwe.len); + + /* Add the ESSID */ + iwe.u.data.length = scan_table[i].ssid.ssid_len; + + if (iwe.u.data.length > 32) + iwe.u.data.length = 32; + + iwe.cmd = SIOCGIWESSID; + iwe.u.essid.flags = (i + 1) & IW_ENCODE_INDEX; + iwe.len = IW_EV_POINT_LEN + iwe.u.data.length; + current_ev = + IWE_STREAM_ADD_POINT(info, current_ev, end_buf, &iwe, + (char *)scan_table[i].ssid.ssid); + + /* Add mode */ + iwe.cmd = SIOCGIWMODE; + if (scan_table[i].bss_mode == MLAN_BSS_MODE_IBSS) + iwe.u.mode = IW_MODE_ADHOC; + else if (scan_table[i].bss_mode == MLAN_BSS_MODE_INFRA) + iwe.u.mode = IW_MODE_MASTER; + else + iwe.u.mode = IW_MODE_AUTO; + + iwe.len = IW_EV_UINT_LEN; + current_ev = + IWE_STREAM_ADD_EVENT(info, current_ev, end_buf, &iwe, + iwe.len); + + /* Frequency */ + iwe.cmd = SIOCGIWFREQ; + iwe.u.freq.m = (long)scan_table[i].freq; + iwe.u.freq.e = 6; + iwe.u.freq.flags = IW_FREQ_FIXED; + iwe.len = IW_EV_FREQ_LEN; + current_ev = + IWE_STREAM_ADD_EVENT(info, current_ev, end_buf, &iwe, + iwe.len); + + memset(&iwe, 0, sizeof(iwe)); + /* Add quality statistics */ + iwe.cmd = IWEVQUAL; + iwe.u.qual.level = SCAN_RSSI(scan_table[i].rssi); + if (!bss_info.bcn_nf_last) + iwe.u.qual.noise = MRVDRV_NF_DEFAULT_SCAN_VALUE; + else + iwe.u.qual.noise = bss_info.bcn_nf_last; + + if ((bss_info.bss_mode == MLAN_BSS_MODE_IBSS) && + !woal_ssid_cmp(&bss_info.ssid, &scan_table[i].ssid) + && bss_info.adhoc_state == ADHOC_STARTED) { + memset(&rssi, 0, sizeof(mlan_ds_get_signal)); + if (MLAN_STATUS_SUCCESS != + woal_get_signal_info(priv, MOAL_IOCTL_WAIT, + &rssi)) { + ret = -EFAULT; + break; + } + iwe.u.qual.level = rssi.data_rssi_avg; + } + iwe.u.qual.qual = + woal_rssi_to_quality((t_s16)(iwe.u.qual.level - 0x100)); + iwe.len = IW_EV_QUAL_LEN; + current_ev = + IWE_STREAM_ADD_EVENT(info, current_ev, end_buf, &iwe, + iwe.len); + + /* Add encryption capability */ + iwe.cmd = SIOCGIWENCODE; + if (scan_table[i].privacy) + iwe.u.data.flags = IW_ENCODE_ENABLED | IW_ENCODE_NOKEY; + else + iwe.u.data.flags = IW_ENCODE_DISABLED; + + iwe.u.data.length = 0; + iwe.len = IW_EV_POINT_LEN + iwe.u.data.length; + current_ev = + IWE_STREAM_ADD_POINT(info, current_ev, end_buf, &iwe, + NULL); + + current_val = current_ev + IW_EV_LCP_LEN; + + iwe.cmd = SIOCGIWRATE; + + iwe.u.bitrate.fixed = 0; + iwe.u.bitrate.disabled = 0; + iwe.u.bitrate.value = 0; + + /* Bit rate given in 500 kb/s units (+ 0x80) */ + for (j = 0; j < sizeof(scan_table[i].supported_rates); j++) { + if (!scan_table[i].supported_rates[j]) + break; + + iwe.u.bitrate.value = + (scan_table[i].supported_rates[j] & 0x7f) * + 500000; + iwe.len = IW_EV_PARAM_LEN; + current_val = + IWE_STREAM_ADD_VALUE(info, current_ev, + current_val, end_buf, &iwe, + iwe.len); + + } + if ((bss_info.bss_mode == MLAN_BSS_MODE_IBSS) && + !woal_ssid_cmp(&bss_info.ssid, &scan_table[i].ssid) + && bss_info.adhoc_state == ADHOC_STARTED) { + iwe.u.bitrate.value = 22 * 500000; + iwe.len = IW_EV_PARAM_LEN; + current_val = + IWE_STREAM_ADD_VALUE(info, current_ev, + current_val, end_buf, &iwe, + iwe.len); + } + + /* Check if an event is added */ + if ((unsigned int)(current_val - current_ev) >= IW_EV_PARAM_LEN) + current_ev = current_val; + + /* Beacon Interval */ + memset(&iwe, 0, sizeof(iwe)); + ptr = buf; + ptr += sprintf(ptr, "Beacon interval=%d", + scan_table[i].beacon_period); + + iwe.u.data.length = strlen(buf); + iwe.cmd = IWEVCUSTOM; + iwe.len = IW_EV_POINT_LEN + iwe.u.data.length; + current_ev = + IWE_STREAM_ADD_POINT(info, current_ev, end_buf, &iwe, + buf); + current_val = current_ev + IW_EV_LCP_LEN + strlen(buf); + + /* Parse and send the IEs */ + pbeacon = scan_table[i].pbeacon_buf; + beacon_size = scan_table[i].beacon_buf_size; + + /* Skip time stamp, beacon interval and capability */ + if (pbeacon) { + pbeacon += sizeof(scan_table[i].beacon_period) + + sizeof(scan_table[i].time_stamp) + + sizeof(scan_table[i].cap_info); + beacon_size -= sizeof(scan_table[i].beacon_period) + + sizeof(scan_table[i].time_stamp) + + sizeof(scan_table[i].cap_info); + + while ((unsigned int)beacon_size >= + sizeof(IEEEtypes_Header_t)) { + element_id = + (IEEEtypes_ElementId_e)(*(t_u8 *) + pbeacon); + element_len = *((t_u8 *)pbeacon + 1); + if ((unsigned int)beacon_size < + (unsigned int)element_len + + sizeof(IEEEtypes_Header_t)) { + PRINTM(MERROR, + "Get scan: Error in processing IE, " + "bytes left < IE length\n"); + break; + } + + switch (element_id) { +#if WIRELESS_EXT >= 18 + case VENDOR_SPECIFIC_221: + case RSN_IE: + case WAPI_IE: + praw_data = (t_u8 *)pbeacon; + memset(&iwe, 0, sizeof(iwe)); + memset(buf, 0, buf_size); + ptr = buf; + memcpy(buf, praw_data, + element_len + + sizeof(IEEEtypes_Header_t)); + iwe.cmd = IWEVGENIE; + iwe.u.data.length = + element_len + + sizeof(IEEEtypes_Header_t); + iwe.len = + IW_EV_POINT_LEN + + iwe.u.data.length; + current_ev = + IWE_STREAM_ADD_POINT(info, + current_ev, + end_buf, + &iwe, buf); + current_val = + current_ev + IW_EV_LCP_LEN + + strlen(buf); + break; +#endif + default: + break; + } + pbeacon += + element_len + + sizeof(IEEEtypes_Header_t); + beacon_size -= + element_len + + sizeof(IEEEtypes_Header_t); + } + } +#if WIRELESS_EXT > 14 + memset(&iwe, 0, sizeof(iwe)); + memset(buf, 0, buf_size); + ptr = buf; + ptr += sprintf(ptr, "band="); + memset(&iwe, 0, sizeof(iwe)); + if (scan_table[i].bss_band == BAND_A) + ptr += sprintf(ptr, "a"); + else + ptr += sprintf(ptr, "bg"); + iwe.u.data.length = strlen(buf); + PRINTM(MINFO, "iwe.u.data.length %d\n", iwe.u.data.length); + PRINTM(MINFO, "BUF: %s\n", buf); + iwe.cmd = IWEVCUSTOM; + iwe.len = IW_EV_POINT_LEN + iwe.u.data.length; + current_ev = + IWE_STREAM_ADD_POINT(info, current_ev, end_buf, &iwe, + buf); + current_val = current_ev + IW_EV_LCP_LEN + strlen(buf); +#endif + current_val = current_ev + IW_EV_LCP_LEN; + + /* + * Check if we added any event + */ + if ((unsigned int)(current_val - current_ev) > IW_EV_LCP_LEN) + current_ev = current_val; + } + + dwrq->length = (current_ev - extra); + dwrq->flags = 0; +#endif + +done: + kfree(buf); + LEAVE(); + return ret; +} + +/** + * iwconfig settable callbacks + */ +static const iw_handler woal_handler[] = { + (iw_handler) woal_config_commit, /* SIOCSIWCOMMIT */ + (iw_handler) woal_get_name, /* SIOCGIWNAME */ + (iw_handler) NULL, /* SIOCSIWNWID */ + (iw_handler) NULL, /* SIOCGIWNWID */ + (iw_handler) woal_set_freq, /* SIOCSIWFREQ */ + (iw_handler) woal_get_freq, /* SIOCGIWFREQ */ + (iw_handler) woal_set_bss_mode, /* SIOCSIWMODE */ + (iw_handler) woal_get_bss_mode, /* SIOCGIWMODE */ + (iw_handler) woal_set_sens, /* SIOCSIWSENS */ + (iw_handler) woal_get_sens, /* SIOCGIWSENS */ + (iw_handler) NULL, /* SIOCSIWRANGE */ + (iw_handler) woal_get_range, /* SIOCGIWRANGE */ + (iw_handler) woal_set_priv, /* SIOCSIWPRIV */ + (iw_handler) NULL, /* SIOCGIWPRIV */ + (iw_handler) NULL, /* SIOCSIWSTATS */ + (iw_handler) NULL, /* SIOCGIWSTATS */ +#if WIRELESS_EXT > 15 +#ifdef CONFIG_WEXT_SPY + iw_handler_set_spy, /* SIOCSIWSPY */ + iw_handler_get_spy, /* SIOCGIWSPY */ + iw_handler_set_thrspy, /* SIOCSIWTHRSPY */ + iw_handler_get_thrspy, /* SIOCGIWTHRSPY */ +#else + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ +#endif +#else /* WIRELESS_EXT > 15 */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ +#endif /* WIRELESS_EXT > 15 */ + (iw_handler) woal_set_wap, /* SIOCSIWAP */ + (iw_handler) woal_get_wap, /* SIOCGIWAP */ +#if WIRELESS_EXT >= 18 + (iw_handler) woal_set_mlme, /* SIOCSIWMLME */ +#else + (iw_handler) NULL, /* -- hole -- */ +#endif + /* (iw_handler) wlan_get_aplist, *//* SIOCGIWAPLIST */ + NULL, /* SIOCGIWAPLIST */ +#if WIRELESS_EXT > 13 + (iw_handler) woal_set_scan, /* SIOCSIWSCAN */ + (iw_handler) woal_get_scan, /* SIOCGIWSCAN */ +#else /* WIRELESS_EXT > 13 */ + (iw_handler) NULL, /* SIOCSIWSCAN */ + (iw_handler) NULL, /* SIOCGIWSCAN */ +#endif /* WIRELESS_EXT > 13 */ + (iw_handler) woal_set_essid, /* SIOCSIWESSID */ + (iw_handler) woal_get_essid, /* SIOCGIWESSID */ + (iw_handler) woal_set_nick, /* SIOCSIWNICKN */ + (iw_handler) woal_get_nick, /* SIOCGIWNICKN */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) woal_set_rate, /* SIOCSIWRATE */ + (iw_handler) woal_get_rate, /* SIOCGIWRATE */ + (iw_handler) woal_set_rts, /* SIOCSIWRTS */ + (iw_handler) woal_get_rts, /* SIOCGIWRTS */ + (iw_handler) woal_set_frag, /* SIOCSIWFRAG */ + (iw_handler) woal_get_frag, /* SIOCGIWFRAG */ + (iw_handler) woal_set_txpow, /* SIOCSIWTXPOW */ + (iw_handler) woal_get_txpow, /* SIOCGIWTXPOW */ + (iw_handler) woal_set_retry, /* SIOCSIWRETRY */ + (iw_handler) woal_get_retry, /* SIOCGIWRETRY */ + (iw_handler) woal_set_encode, /* SIOCSIWENCODE */ + (iw_handler) woal_get_encode, /* SIOCGIWENCODE */ + (iw_handler) woal_set_power, /* SIOCSIWPOWER */ + (iw_handler) woal_get_power, /* SIOCGIWPOWER */ +#if (WIRELESS_EXT >= 18) + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) woal_set_gen_ie, /* SIOCSIWGENIE */ + (iw_handler) woal_get_gen_ie, /* SIOCGIWGENIE */ + (iw_handler) woal_set_auth, /* SIOCSIWAUTH */ + (iw_handler) woal_get_auth, /* SIOCGIWAUTH */ + (iw_handler) woal_set_encode_ext, /* SIOCSIWENCODEEXT */ + (iw_handler) woal_get_encode_ext, /* SIOCGIWENCODEEXT */ + (iw_handler) woal_set_pmksa, /* SIOCSIWPMKSA */ +#endif /* WIRELESSS_EXT >= 18 */ +}; + +/** + * iwpriv settable callbacks + */ +static const iw_handler woal_private_handler[] = { + NULL, /* SIOCIWFIRSTPRIV */ +}; +#endif /* STA_SUPPORT */ + +/******************************************************** + Global Functions +********************************************************/ + +#if WIRELESS_EXT > 14 + +/** + * @brief This function sends customized event to application. + * + * @param priv A pointer to moal_private structure + * @param str A pointer to event string + * + * @return N/A + */ +void +woal_send_iwevcustom_event(moal_private *priv, char *str) +{ + union iwreq_data iwrq; + char buf[IW_CUSTOM_MAX]; + + ENTER(); + + memset(&iwrq, 0, sizeof(union iwreq_data)); + memset(buf, 0, sizeof(buf)); + + snprintf(buf, sizeof(buf) - 1, "%s", str); + + iwrq.data.pointer = buf; + iwrq.data.length = strlen(buf) + 1; + + /* Send Event to upper layer */ + wireless_send_event(priv->netdev, IWEVCUSTOM, &iwrq, buf); + PRINTM(MINFO, "Wireless event %s is sent to application\n", str); + + LEAVE(); + return; +} +#endif + +#if WIRELESS_EXT >= 18 +/** + * @brief This function sends mic error event to application. + * + * @param priv A pointer to moal_private structure + * @param event MIC MERROR EVENT. + * + * @return N/A + */ +void +woal_send_mic_error_event(moal_private *priv, t_u32 event) +{ + union iwreq_data iwrq; + struct iw_michaelmicfailure mic; + + ENTER(); + + memset(&iwrq, 0, sizeof(iwrq)); + memset(&mic, 0, sizeof(mic)); + if (event == MLAN_EVENT_ID_FW_MIC_ERR_UNI) + mic.flags = IW_MICFAILURE_PAIRWISE; + else + mic.flags = IW_MICFAILURE_GROUP; + iwrq.data.pointer = &mic; + iwrq.data.length = sizeof(mic); + + wireless_send_event(priv->netdev, IWEVMICHAELMICFAILURE, &iwrq, + (char *)&mic); + + LEAVE(); + return; +} +#endif + +#ifdef STA_SUPPORT +/** wlan_handler_def */ +struct iw_handler_def woal_handler_def = { +num_standard:ARRAY_SIZE(woal_handler), +num_private:ARRAY_SIZE(woal_private_handler), +num_private_args:ARRAY_SIZE(woal_private_args), +standard:(iw_handler *) woal_handler, +private:(iw_handler *) woal_private_handler, +private_args:(struct iw_priv_args *)woal_private_args, +#if WIRELESS_EXT > 20 +get_wireless_stats:woal_get_wireless_stats, +#endif +}; + +/** + * @brief Get wireless statistics + * + * @param dev A pointer to net_device structure + * + * @return A pointer to iw_statistics buf + */ +struct iw_statistics * +woal_get_wireless_stats(struct net_device *dev) +{ + moal_private *priv = (moal_private *)netdev_priv(dev); + t_u16 wait_option = MOAL_NO_WAIT; + + ENTER(); + + /* + * Since schedule() is not allowed from an atomic context + * such as when dev_base_lock for netdevices is acquired + * for reading/writing in kernel before this call, HostCmd + * is issued in non-blocking way in such contexts and + * blocking in other cases. + */ + if (write_can_lock(&dev_base_lock) + && (!in_atomic() || current->exit_state)) + wait_option = MOAL_WSTATS_WAIT; + + priv->w_stats.status = woal_get_mode(priv, wait_option); + priv->w_stats.discard.retries = priv->stats.tx_errors; + priv->w_stats.qual.qual = 0; + + /* Send RSSI command to get beacon RSSI/NF, valid only if associated */ + if (priv->media_connected == MTRUE) { + if (MLAN_STATUS_SUCCESS == + woal_get_signal_info(priv, wait_option, NULL)) + priv->w_stats.qual.qual = + woal_rssi_to_quality((t_s16) + (priv->w_stats.qual.level - + 0x100)); + } +#if WIRELESS_EXT > 18 + priv->w_stats.qual.updated |= (IW_QUAL_ALL_UPDATED | IW_QUAL_DBM); +#else + priv->w_stats.qual.updated |= 7; +#endif + if (!priv->w_stats.qual.noise && priv->media_connected == MTRUE) + priv->w_stats.qual.noise = MRVDRV_NF_DEFAULT_SCAN_VALUE; + + PRINTM(MINFO, "Link Quality = %#x\n", priv->w_stats.qual.qual); + PRINTM(MINFO, "Signal Level = %#x\n", priv->w_stats.qual.level); + PRINTM(MINFO, "Noise = %#x\n", priv->w_stats.qual.noise); + priv->w_stats.discard.code = 0; + woal_get_stats_info(priv, wait_option, NULL); + + LEAVE(); + return &priv->w_stats; +} +#endif /* STA_SUPPORT */ diff --git a/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_wext.h b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_wext.h new file mode 100644 index 00000000..1cf9b119 --- /dev/null +++ b/arch/arm/mach-berlin/modules/wlan_sd8887/mlinux/moal_wext.h @@ -0,0 +1,51 @@ +/** @file moal_wext.h + * + * @brief This file contains definition for wireless extension IOCTL call. + * + * Copyright (C) 2008-2015, Marvell International Ltd. + * + * This software file (the "File") is distributed by Marvell International + * Ltd. under the terms of the GNU General Public License Version 2, June 1991 + * (the "License"). You may use, redistribute and/or modify this File in + * accordance with the terms and conditions of the License, a copy of which + * is available by writing to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the + * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE + * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE + * ARE EXPRESSLY DISCLAIMED. The License provides additional details about + * this warranty disclaimer. + * + */ + +/******************************************************** +Change log: + 10/21/2008: initial version +********************************************************/ + +#ifndef _WOAL_WEXT_H_ +#define _WOAL_WEXT_H_ + +/** NF value for default scan */ +#define MRVDRV_NF_DEFAULT_SCAN_VALUE (-96) + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) +/** Add event */ +#define IWE_STREAM_ADD_EVENT(i, c, e, w, l) iwe_stream_add_event((i), (c), (e), (w), (l)) +/** Add point */ +#define IWE_STREAM_ADD_POINT(i, c, e, w, p) iwe_stream_add_point((i), (c), (e), (w), (p)) +/** Add value */ +#define IWE_STREAM_ADD_VALUE(i, c, v, e, w, l) iwe_stream_add_value((i), (c), (v), (e), (w), (l)) +#else +/** Add event */ +#define IWE_STREAM_ADD_EVENT(i, c, e, w, l) iwe_stream_add_event((c), (e), (w), (l)) +/** Add point */ +#define IWE_STREAM_ADD_POINT(i, c, e, w, p) iwe_stream_add_point((c), (e), (w), (p)) +/** Add value */ +#define IWE_STREAM_ADD_VALUE(i, c, v, e, w, l) iwe_stream_add_value((c), (v), (e), (w), (l)) +#endif + +extern struct iw_handler_def woal_handler_def; +struct iw_statistics *woal_get_wireless_stats(struct net_device *dev); +#endif /* _WOAL_WEXT_H_ */ diff --git a/arch/arm/mach-berlin/mv88de3006_bootinfo.c b/arch/arm/mach-berlin/mv88de3006_bootinfo.c new file mode 100644 index 00000000..4f4cf248 --- /dev/null +++ b/arch/arm/mach-berlin/mv88de3006_bootinfo.c @@ -0,0 +1,129 @@ +/* + * Process information shared by bootloader/EROM through bootinfo structure. + * + * Copyright (c) 2014 Google, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + */ +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +/* Location used by EROM to copy bootinfo */ +#define BOOTINFO_ADDRESS 0x01010000 +#define BOOTINFO_SIZE 0x10000 + +/* EROM copies non-secure fields from OTP to a well defined memory + * location during boot process. Following structure defines the + * contents of this memory. Structure defined in berlin_bootinfo.h + * in bootloader. + */ +struct cdp_bootinfo { + u32 otp_rkek_id[2]; /* rkek id from OTP */ + u32 otp_version; /* otp version */ + u32 otp_market_id; /* otp market id */ + u32 otp_ult[2]; /* otp ULT info */ + u32 chip_version; /* bg2cdp chip version*/ + u32 speed_tag; /* 0 - slow, 1 - full */ + u32 leakage_current;/* leakage current info */ + u32 temp_id; /* Temp ID in deg C */ + u32 erom_id; /* erom id*/ + u32 feature_bits; /* Feature flags */ +}; + +static __init struct cdp_bootinfo *get_bootinfo(void) +{ + void* bootinfo_v = NULL; + bootinfo_v = ioremap(BOOTINFO_ADDRESS, BOOTINFO_SIZE); + if (!bootinfo_v) + early_print(KERN_ERR "Failed to map BOOTINFO\n"); + return (struct cdp_bootinfo *)bootinfo_v; +} + +static __init void unmap_bootinfo(struct cdp_bootinfo *bootinfo_v) +{ + iounmap(bootinfo_v); +} + +/* Get SOC revision information */ +static __init unsigned char get_soc_rev(struct cdp_bootinfo *pinfo) +{ + return pinfo->chip_version & 0xFF; +} + +static __init u64 get_rkek_id(struct cdp_bootinfo *pinfo) +{ + u64 rkek_id = pinfo->otp_rkek_id[1]; + rkek_id = (rkek_id << 32) | pinfo->otp_rkek_id[0]; + return rkek_id; +} + +static __init u32 get_otp_ver(struct cdp_bootinfo *pinfo) +{ + return pinfo->otp_version; +} + +static __init u32 get_otp_mktid(struct cdp_bootinfo *pinfo) +{ + return pinfo->otp_market_id; +} + +static __init u32 get_speed_tag(struct cdp_bootinfo *pinfo) +{ + return pinfo->speed_tag; +} + +static __init u32 get_otp_feature_bits(struct cdp_bootinfo *pinfo) +{ + return pinfo->feature_bits; +} + +static __init u64 get_otp_ult(struct cdp_bootinfo *pinfo) +{ + u64 otp_ult = pinfo->otp_ult[1]; + otp_ult = (otp_ult << 32) | pinfo->otp_ult[0]; + return otp_ult; +} + +void __init mv88de3006_proc_bootinfo(int board_rev) +{ + u64 rkek_id, ult; + u32 chip_rev, ult_l, ult_h; + struct cdp_bootinfo *pinfo = get_bootinfo(); + + if (!pinfo) + return; + + rkek_id = get_rkek_id(pinfo); + chip_rev = get_soc_rev(pinfo); + ult = get_otp_ult(pinfo); + ult_l = ult & 0xFFFFFFFF; + ult_h = ult >> 32; + /* Since bootloader is not capable of generating DTB and device + * tree does not support setting of system_rev and serial, parse + * bootinfo to get and set this. + */ + system_rev = (board_rev << 8) | chip_rev; + system_serial_low = __builtin_bswap32(rkek_id & 0xFFFFFFFF); + system_serial_high = __builtin_bswap32(rkek_id >> 32); + + early_print(KERN_INFO "speed_tag: %d otp_ver: %d mkt_id: %d " + " otp_ult: 0x%08X%08X feature_bits:0x%08X\n", + get_speed_tag(pinfo), + get_otp_ver(pinfo), get_otp_mktid(pinfo), + ult_h, ult_l, get_otp_feature_bits(pinfo)); + unmap_bootinfo(pinfo); + return; +} diff --git a/arch/arm/mach-berlin/mv88de3100.mk b/arch/arm/mach-berlin/mv88de3100.mk index 2b69ae43..351a0bba 100644 --- a/arch/arm/mach-berlin/mv88de3100.mk +++ b/arch/arm/mach-berlin/mv88de3100.mk @@ -1,7 +1,7 @@ # __LINUX_KERNEL__ is used in OS-independent header files MV_DEFINE := -DBERLIN -DSoC_Galois -D__LINUX_KERNEL__ -D__CODE_LINK__=0 -DCPUINDEX=0 -MV_DEFINE += -DBERLIN_B_0=0x1000 -DBERLIN_C_0=0x2000 -DBERLIN_BG2=0x3000 -DBERLIN_BG2_Z2=0x3010 -DBERLIN_BG2_A0=0x3020 -DBERLIN_BG2CD_A0=0x3100 -DBERLIN_BG3=0x4000 +MV_DEFINE += -DBERLIN_B_0=0x1000 -DBERLIN_C_0=0x2000 -DBERLIN_BG2=0x3000 -DBERLIN_BG2_Z2=0x3010 -DBERLIN_BG2_A0=0x3020 -DBERLIN_BG2CD_A0=0x3100 -DBERLIN_BG2Q_A0=0x3200 -DBERLIN_BG2CDP=0x3300 -DBERLIN_BG3=0x4000 # define BERLIN_CHIP_VERSION ifeq ($(CONFIG_BERLIN2_Z1),y) @@ -20,6 +20,10 @@ ifeq ($(CONFIG_BERLIN2CD),y) MV_DEFINE += -DBERLIN_CHIP_VERSION=BERLIN_BG2CD_A0 FIRMWARE = Firmware_Berlin_BG2CD_A0 endif +ifeq ($(CONFIG_BERLIN2CDP),y) + MV_DEFINE += -DBERLIN_CHIP_VERSION=BERLIN_BG2CDP + FIRMWARE = Firmware_Berlin_BG2CDP +endif ifeq ($(CONFIG_BERLIN2_CT),y) MV_DEFINE += -DBERLIN_CHIP_VERSION=BERLIN_BG2_A0 FIRMWARE = Firmware_Berlin_BG2_CT diff --git a/arch/arm/mach-berlin/mv88de31xx_android.c b/arch/arm/mach-berlin/mv88de31xx_android.c index 13a41925..602ce066 100644 --- a/arch/arm/mach-berlin/mv88de31xx_android.c +++ b/arch/arm/mach-berlin/mv88de31xx_android.c @@ -35,8 +35,6 @@ static int bcb_fts_reboot_hook(struct notifier_block*, unsigned long, void*); static __initdata struct board_config { char *name; unsigned int board_rev; - unsigned long sdk_pool; /* how much memory is reserved, normal boot */ - unsigned long sdk_pool_recovery; /* ... recovery boot */ /* MTD layout(s) in cmdlinepart format */ const char *mtdparts; @@ -57,13 +55,9 @@ static __initdata struct board_config { int (*reboot_notifier)(struct notifier_block*, unsigned long, void*); } boards[] = { +#ifdef CONFIG_BERLIN2CD { .name = "bg2proto", .board_rev = 0, - /* TODO(kolla): Remove hardcoded system/sdk memory configs from - * kernel config and use board_config info. - */ - .sdk_pool = 224 * ONE_MB, - .sdk_pool_recovery = 224 * ONE_MB, .default_root = "/dev/mtdblock:rootfs", .reboot_notifier = bcb_fts_reboot_hook, @@ -95,11 +89,6 @@ static __initdata struct board_config { }, { .name = "eureka-b1", .board_rev = 1, - /* TODO(kolla): Remove hardcoded system/sdk memory configs from - * kernel config and use board_config info. - */ - .sdk_pool = 224 * ONE_MB, - .sdk_pool_recovery = 224 * ONE_MB, .default_root = "/dev/mtdblock:rootfs", .reboot_notifier = bcb_fts_reboot_hook, @@ -127,11 +116,6 @@ static __initdata struct board_config { }, { .name = "eureka-b2", .board_rev = 2, - /* TODO(kolla): Remove hardcoded system/sdk memory configs from - * kernel config and use board_config info. - */ - .sdk_pool = 224 * ONE_MB, - .sdk_pool_recovery = 224 * ONE_MB, .default_root = "/dev/mtdblock:rootfs", .reboot_notifier = bcb_fts_reboot_hook, @@ -159,11 +143,6 @@ static __initdata struct board_config { }, { .name = "eureka-b3", .board_rev = 3, - /* TODO(kolla): Remove hardcoded system/sdk memory configs from - * kernel config and use board_config info. - */ - .sdk_pool = 224 * ONE_MB, - .sdk_pool_recovery = 224 * ONE_MB, .default_root = "/dev/mtdblock:rootfs", .reboot_notifier = bcb_fts_reboot_hook, @@ -189,6 +168,238 @@ static __initdata struct board_config { .mtdparts_ro = EUREKA_B3_MTDPARTS("ro"), .mtdparts_recovery = EUREKA_B3_MTDPARTS(""), }, +#elif defined(CONFIG_BERLIN2CDP) + { .name = "salami-proto", + .board_rev = 0, + .default_root = "/dev/mtdblock:rootfs", + .reboot_notifier = bcb_fts_reboot_hook, + + /* 2G MLC, 4K pages, 1M block */ + /* + * MTD partition name has to be shorter than 14 bytes due to + * limitation of Android init. + */ +#define SALAMI_PROTO_MTDPARTS(__RO__,__RRO__) \ + "mv_nand:" \ + "1M(block0)ro," /* flash config params */ \ + "8M(bootloader)" __RO__ "," /* 8x copies */ \ + "7M(fts)ro," \ + "16M(kernel)"__RO__ "," \ + "60M(recovery)," \ + "80M(backupsys)," \ + "16M(factory_store)" \ + "400M(rootfs)" __RRO__"," \ + "300M(cache)," \ + "1024M(userdata)," \ + "8M@2040M(bbt)ro" + .mtdparts = SALAMI_PROTO_MTDPARTS("ro",""), + .mtdparts_ro = SALAMI_PROTO_MTDPARTS("ro","ro"), + .mtdparts_recovery = SALAMI_PROTO_MTDPARTS("",""), + }, + { .name = "lexx-b1", + .board_rev = 1, + .default_root = "/dev/mtdblock:rootfs", + .reboot_notifier = bcb_fts_reboot_hook, + + /* 512MB SLC, 2K page size, 128K block size */ + /* + * MTD partition name has to be shorter than 14 bytes due to + * limitation of Android init. + */ +#define LEXX_B1_MTDPARTS(__RO__,__RRO__) \ + "mv_nand:" \ + "128K(block0)ro," /* flash config params */ \ + "1M(prebootloader)" __RO__ "," /* 8x copies */ \ + "4M(TZ)" __RO__ "," \ + "4M(TZ-B)" __RO__ "," \ + "1M(postbootloader)" __RO__ "," \ + "1M(postbootloader-B)" __RO__ "," \ + "8M(kernel)" __RO__ "," \ + "110M(rootfs)" __RRO__"," \ + "332160K(cache)," \ + "40M(userdata)," \ + "15M(recovery)," \ + "512K(fts)ro," \ + "2M(factory_store)" __RO__ "," \ + "1M@511M(bbt)ro" + .mtdparts = LEXX_B1_MTDPARTS("ro",""), + .mtdparts_ro = LEXX_B1_MTDPARTS("ro","ro"), + .mtdparts_recovery = LEXX_B1_MTDPARTS("",""), + }, + { .name = "lexx-b2", + .board_rev = 2, + .default_root = "/dev/mtdblock:rootfs", + .reboot_notifier = bcb_fts_reboot_hook, + + /* 256MB SLC, 2K page size, 128K block size */ + /* + * MTD partition name has to be shorter than 14 bytes due to + * limitation of Android init. + */ +#define LEXX_B2_MTDPARTS(__RO__,__RRO__) \ + "mv_nand:" \ + "128K(block0)ro," /* flash config params */ \ + "1M(prebootloader)" __RO__ "," /* 8x copies */ \ + "4M(TZ)" __RO__ "," \ + "4M(TZ-B)" __RO__ "," \ + "512K(postbootloader)" __RO__ "," \ + "512K(postbootloader-B)" __RO__ "," \ + "8M(kernel)" __RO__ "," \ + "105M(rootfs)" __RRO__"," \ + "117120K(cache)," \ + "15M(recovery)," \ + "512K(fts)ro," \ + "2M(factory_store)" "," \ + "1M@255M(bbt)ro" + .mtdparts = LEXX_B2_MTDPARTS("ro",""), + .mtdparts_ro = LEXX_B2_MTDPARTS("ro","ro"), + .mtdparts_recovery = LEXX_B2_MTDPARTS("",""), + }, + { .name = "lexx-b3", + .board_rev = 3, + .default_root = "/dev/mtdblock:rootfs", + .reboot_notifier = bcb_fts_reboot_hook, + /* lexx-b3 uses same partition map as lexx-b2 */ + .mtdparts = LEXX_B2_MTDPARTS("ro",""), + .mtdparts_ro = LEXX_B2_MTDPARTS("ro","ro"), + .mtdparts_recovery = LEXX_B2_MTDPARTS("",""), + }, + { .name = "lexx-b4", + .board_rev = 4, + .default_root = "/dev/mtdblock:rootfs", + .reboot_notifier = bcb_fts_reboot_hook, + + /* 256MB SLC, 2K page size, 128K block size */ + /* + * MTD partition name has to be shorter than 14 bytes due to + * limitation of Android init. + */ +#define LEXX_B4_MTDPARTS(__RO__,__RRO__) \ + "mv_nand:" \ + "128K(block0)ro," /* flash config params */ \ + "1M(prebootloader)" __RO__ "," /* 8x copies */ \ + "2304K(TZ)" __RO__ "," \ + "2304K(TZ-B)" __RO__ "," \ + "512K(postbootloader)" __RO__ "," \ + "512K(postbootloader-B)" __RO__ "," \ + "4608K(kernel)" __RO__ "," \ + "90M(rootfs)" __RRO__"," \ + "146944K(cache)," \ + "9728K(recovery)," \ + "1M(factory_store)" "," \ + "512K(fts)ro," \ + "384K(bbt)ro" + .mtdparts = LEXX_B4_MTDPARTS("ro",""), + .mtdparts_ro = LEXX_B4_MTDPARTS("ro","ro"), + .mtdparts_recovery = LEXX_B4_MTDPARTS("",""), + }, + { .name = "earth-b1", + .board_rev = 1, + .default_root = "/dev/mtdblock:rootfs", + .reboot_notifier = bcb_fts_reboot_hook, + /* earth-b1 uses same partition map as lexx-b2 */ + .mtdparts = LEXX_B2_MTDPARTS("ro",""), + .mtdparts_ro = LEXX_B2_MTDPARTS("ro","ro"), + .mtdparts_recovery = LEXX_B2_MTDPARTS("",""), + }, + { .name = "earth-b2", + .board_rev = 2, + .default_root = "/dev/mtdblock:rootfs", + .reboot_notifier = bcb_fts_reboot_hook, + /* earth-b2 uses same partition map as lexx-b2 */ + .mtdparts = LEXX_B2_MTDPARTS("ro",""), + .mtdparts_ro = LEXX_B2_MTDPARTS("ro","ro"), + .mtdparts_recovery = LEXX_B2_MTDPARTS("",""), + }, + { .name = "earth-b3", + .board_rev = 3, + .default_root = "/dev/mtdblock:rootfs", + .reboot_notifier = bcb_fts_reboot_hook, + + /* 256MB SLC, 2K page size, 128K block size */ + /* + * MTD partition name has to be shorter than 14 bytes due to + * limitation of Android init. + */ +#define EARTH_B3_MTDPARTS(__RO__,__RRO__) \ + "mv_nand:" \ + "128K(block0)ro," /* flash config params */ \ + "1M(prebootloader)" __RO__ "," /* 8x copies */ \ + "4M(TZ)" __RO__ "," \ + "4M(TZ-B)" __RO__ "," \ + "640K(postbootloader)" __RO__ "," \ + "640K(postbootloader-B)" __RO__ "," \ + "8M(kernel)" __RO__ "," \ + "105M(rootfs)" __RRO__"," \ + "117120K(cache)," \ + "15104K(recovery)," \ + "512K(fts)ro," \ + "2M(factory_store)" "," \ + "1M@255M(bbt)ro" + .mtdparts = EARTH_B3_MTDPARTS("ro",""), + .mtdparts_ro = EARTH_B3_MTDPARTS("ro","ro"), + .mtdparts_recovery = EARTH_B3_MTDPARTS("",""), + }, + { .name = "earth-b4", + .board_rev = 4, + .default_root = "/dev/mtdblock:rootfs", + .reboot_notifier = bcb_fts_reboot_hook, + + /* 256MB SLC, 2K page size, 128K block size */ + /* + * MTD partition name has to be shorter than 14 bytes due to + * limitation of Android init. + */ +#define EARTH_B4_MTDPARTS(__RO__,__RRO__) \ + "mv_nand:" \ + "128K(block0)ro," /* flash config params */ \ + "1M(prebootloader)" __RO__ "," /* 8x copies */ \ + "2304K(TZ)" __RO__ "," \ + "2304K(TZ-B)" __RO__ "," \ + "640K(postbootloader)" __RO__ "," \ + "640K(postbootloader-B)" __RO__ "," \ + "4608K(kernel)" __RO__ "," \ + "90M(rootfs)" __RRO__"," \ + "146944K(cache)," \ + "9472K(recovery)," \ + "1M(factory_store)" "," \ + "512K(fts)ro," \ + "384K(bbt)ro" + .mtdparts = EARTH_B4_MTDPARTS("ro",""), + .mtdparts_ro = EARTH_B4_MTDPARTS("ro","ro"), + .mtdparts_recovery = EARTH_B4_MTDPARTS("",""), + }, + { .name = "hendrix-b1", + .board_rev = 1, + .default_root = "/dev/mtdblock:rootfs", + .reboot_notifier = bcb_fts_reboot_hook, + /* hendrix-b1 uses same partition map as lexx-b2 */ + .mtdparts = LEXX_B2_MTDPARTS("ro",""), + .mtdparts_ro = LEXX_B2_MTDPARTS("ro","ro"), + .mtdparts_recovery = LEXX_B2_MTDPARTS("",""), + }, + { .name = "hendrix-b3", + .board_rev = 3, + .default_root = "/dev/mtdblock:rootfs", + .reboot_notifier = bcb_fts_reboot_hook, + /* hendrix-b3 uses same partition map as earth-b3 */ + .mtdparts = EARTH_B3_MTDPARTS("ro",""), + .mtdparts_ro = EARTH_B3_MTDPARTS("ro","ro"), + .mtdparts_recovery = EARTH_B3_MTDPARTS("",""), + }, + { .name = "hendrix-b4", + .board_rev = 4, + .default_root = "/dev/mtdblock:rootfs", + .reboot_notifier = bcb_fts_reboot_hook, + + /* TODO(mtraver): If we decide to change hendrix rootfs size, + * make a new HENDRIX_B4_MTDPARTS. */ + /* hendrix-b4 uses same partition map as earth-b4 */ + .mtdparts = EARTH_B4_MTDPARTS("ro",""), + .mtdparts_ro = EARTH_B4_MTDPARTS("ro","ro"), + .mtdparts_recovery = EARTH_B4_MTDPARTS("",""), + }, +#endif /* CONFIG_BERLIN2CD */ }; /* This is what we will use if nothing has been passed by bootloader diff --git a/arch/arm/mach-berlin/opp.c b/arch/arm/mach-berlin/opp.c new file mode 100644 index 00000000..fe909795 --- /dev/null +++ b/arch/arm/mach-berlin/opp.c @@ -0,0 +1,201 @@ +/* + * MARVELL BERLIN OPP related functions + * + * Author: Jisheng Zhang + * Copyright (c) 2014 Marvell Technology Group Ltd. + * http://www.marvell.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define VARIANT_BERLIN2Q 0 +#define VARIANT_BERLIN2CDP 1 + +struct leakage_volt { + int leakage; + unsigned long vh_volt; + unsigned long vl_volt; +}; + +static struct leakage_volt berlin2q_lv[] = { + {1729, 1150000, 1125000}, + {1513, 1175000, 1150000}, + {1321, 1200000, 1175000}, + {1129, 1225000, 1200000}, + {913, 1250000, 1225000}, + {601, 1275000, 1250000}, + {313, 1300000, 1275000}, + {0, 1325000, 1300000}, +}; + +static struct leakage_volt berlin2cdp_lv[] = { + {353, 1025000, 975000}, + {305, 1050000, 1000000}, + {257, 1075000, 1025000}, + {234, 1100000, 1050000}, + {193, 1125000, 1075000}, + {0, 1150000, 1100000}, +}; + +static unsigned long berlin2q_freq[] = {600000000, 800000000, 1000000000, 1200000000}; +static unsigned long berlin2cdp_freq[] = {600000000, 800000000, 1000000000, 1300000000}; + +static int berlin_init_opp_table(unsigned long *freq_table, unsigned long vh_volt, + unsigned long vl_volt) +{ + int i, ret = 0; + struct device_node *np; + struct device *cpu_dev; + + np = of_find_node_by_path("/cpus/cpu@0"); + if (!np) { + pr_err("failed to find cpu0 node\n"); + return -ENODEV; + } + + cpu_dev = get_cpu_device(0); + if (!cpu_dev) { + pr_err("failed to get cpu0 device\n"); + ret = -ENODEV; + goto out_put_node; + } + cpu_dev->of_node = np; + + for (i = 0; i < ARRAY_SIZE(berlin2q_freq); i++) { + if (freq_table[i] > 1000000000) + opp_add(cpu_dev, freq_table[i], vh_volt); + else + opp_add(cpu_dev, freq_table[i], vl_volt); + } + + platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0); + +out_put_node: + of_node_put(np); + return ret; +} + +static int get_volt(const struct of_device_id *of_id, int leakage, + unsigned long *vh_volt, unsigned long *vl_volt) +{ + int variant, i; + + if (!of_id) + return -EINVAL; + + variant = (int)of_id->data; + switch (variant) { + case VARIANT_BERLIN2Q: + leakage = (leakage >> 8) & 0xFF; + leakage <<= 4; + for (i = 0; i < ARRAY_SIZE(berlin2q_lv); i++) { + if (berlin2q_lv[i].leakage <= leakage) + break; + } + if (i < ARRAY_SIZE(berlin2q_lv)) { + *vh_volt = berlin2q_lv[i].vh_volt; + *vl_volt = berlin2q_lv[i].vl_volt; + } + break; + case VARIANT_BERLIN2CDP: + for (i = 0; i < ARRAY_SIZE(berlin2cdp_lv); i++) { + if (berlin2cdp_lv[i].leakage <= leakage) + break; + } + if (i < ARRAY_SIZE(berlin2cdp_lv)) { + *vh_volt = berlin2cdp_lv[i].vh_volt; + *vl_volt = berlin2cdp_lv[i].vl_volt; + } + break; + default: + return -EINVAL; + } + + return 0; +} + +static int get_ft(const struct of_device_id *of_id, unsigned long **freq_table) +{ + int variant; + + if (!of_id) + return -EINVAL; + variant = (int)of_id->data; + switch (variant) { + case VARIANT_BERLIN2Q: + *freq_table = berlin2q_freq; + break; + case VARIANT_BERLIN2CDP: + *freq_table = berlin2cdp_freq; + break; + default: + return -EINVAL; + } + return 0; +} + +static struct of_device_id berlin_opp_match[] = { + { + .compatible = "marvell,berlin2q-opp", + .data = (void *)VARIANT_BERLIN2Q + }, + { + .compatible = "marvell,berlin2cdp-opp", + .data = (void *)VARIANT_BERLIN2CDP + }, + {}, +}; + +static int berlin_opp_probe(struct platform_device *pdev) +{ + void __iomem *otp_base; + int leakage; + unsigned long *freq_table; + unsigned long vh_volt = 1150000; + unsigned long vl_volt = 1150000; + const struct of_device_id *of_id; + struct device_node *np = pdev->dev.of_node; + + of_id = of_match_device(berlin_opp_match, &pdev->dev); + + otp_base = of_iomap(np, 0); + if (!otp_base) + goto out; + + leakage = readl(otp_base); + iounmap(otp_base); + + if (get_volt(of_id, leakage, &vh_volt, &vl_volt)) + return -EINVAL; +out: + if (get_ft(of_id, &freq_table)) + return -EINVAL; + printk("leakage:%d,vh:%d,vl:%d\n", leakage,vh_volt,vl_volt); + return berlin_init_opp_table(freq_table, vh_volt, vl_volt); +} + +static struct platform_driver berlin_opp_driver = { + .probe = berlin_opp_probe, + .driver = { + .name = "berlin_opp", + .owner = THIS_MODULE, + .of_match_table = berlin_opp_match, + }, +}; + +static int __init berlin_init_opp(void) +{ + return platform_driver_register(&berlin_opp_driver); +} +late_initcall(berlin_init_opp); diff --git a/arch/arm/mach-berlin/platsmp.c b/arch/arm/mach-berlin/platsmp.c new file mode 100644 index 00000000..eab0e996 --- /dev/null +++ b/arch/arm/mach-berlin/platsmp.c @@ -0,0 +1,181 @@ +/* + * linux/arch/arm/mach-berlin/platsmp.c + * + * Author: Jisheng Zhang + * Copyright (c) 2013 Marvell Technology Group Ltd. + * http://www.marvell.com + * + * Cloned from linux/arch/arm/plat-vexpress/platsmp.c + * + * Copyright (C) 2002 ARM Ltd. + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include "common.h" + +static void __iomem *jump_addr; + +extern void berlin_secondary_startup(void); + +/* + * Write pen_release in a way that is guaranteed to be visible to all + * observers, irrespective of whether they're taking part in coherency + * or not. This is necessary for the hotplug code to work reliably. + */ +static void __cpuinit write_pen_release(int val) +{ + pen_release = val; + smp_wmb(); + __cpuc_flush_dcache_area((void *)&pen_release, sizeof(pen_release)); + outer_clean_range(__pa(&pen_release), __pa(&pen_release + 1)); +} + +static DEFINE_SPINLOCK(boot_lock); + +static void __cpuinit berlin_secondary_init(unsigned int cpu) +{ + /* + * if any interrupts are already enabled for the primary + * core (e.g. timer irq), then they will not have been enabled + * for us: do so + */ + gic_secondary_init(0); + + /* + * let the primary processor know we're out of the + * pen, then head off into the C entry point + */ + write_pen_release(-1); + + /* + * Synchronise with the boot thread. + */ + spin_lock(&boot_lock); + spin_unlock(&boot_lock); +} + +static int __cpuinit berlin_boot_secondary(unsigned int cpu, struct task_struct *idle) +{ + unsigned long timeout; + + /* + * Set synchronisation state between this boot processor + * and the secondary one + */ + spin_lock(&boot_lock); + + /* + * This is really belt and braces; we hold unintended secondary + * CPUs in the holding pen until we're ready for them. However, + * since we haven't sent them a soft interrupt, they shouldn't + * be there. + */ + write_pen_release(cpu_logical_map(cpu)); + /* + * Send the secondary CPU a soft interrupt, thereby causing + * the boot monitor to read the system wide flags register, + * and branch to the address found there. + */ + gic_raise_softirq(cpumask_of(cpu), 0); + + timeout = jiffies + (1 * HZ); + while (time_before(jiffies, timeout)) { + smp_rmb(); + if (pen_release == -1) + break; + udelay(10); + } + /* + * now the secondary core is starting up let it run its + * calibrations, then wait for it to finish + */ + spin_unlock(&boot_lock); + return pen_release != -1 ? -ENOSYS : 0; +} + + +/* + * Initialise the CPU possible map early - this describes the CPUs + * which may be present or become present in the system. + */ +static void __init berlin_smp_init_cpus(void) +{ + set_smp_cross_call(gic_raise_softirq); +} + +static inline void mv_scu_enable(void) +{ + u32 scu_ctrl; + void __iomem *scu_base; + + if (scu_a9_has_base()) { + scu_base = IOMEM(scu_a9_get_base()); + /* Enabled SCU speculative linefill and IC, SCU standby */ + scu_ctrl = __raw_readl(scu_base); + if (!(scu_ctrl & 1)) { + scu_ctrl |= (1 << 3) | (3 << 5); + __raw_writel(scu_ctrl, scu_base); + } + scu_enable(scu_base); +} +} + +static void __init berlin_smp_prepare_cpus(unsigned int max_cpus) +{ + struct device_node *np; + + np = of_find_compatible_node(NULL, NULL, "marvell,berlin-sw_generic1"); + if (!np) { + pr_err("No sw_generic1 node, SMP may not work!\n"); + return; + } + + jump_addr = of_iomap(np, 0); + if (!jump_addr) { + pr_err("Can't map sw_generic1, SMP may not work!\n"); + return; + } + + of_node_put(np); + + /* + * Initialise the present map, which describes the set of CPUs + * actually populated at the present time. + */ + mv_scu_enable(); + + /* + * Write the address of secondary startup into the + * system-wide flags register. The boot monitor waits + * until it receives a soft interrupt, and then the + * secondary CPU branches to this address. + */ + writel(virt_to_phys(berlin_secondary_startup), jump_addr); +} + +struct smp_operations __initdata berlin_smp_ops = { + .smp_init_cpus = berlin_smp_init_cpus, + .smp_prepare_cpus = berlin_smp_prepare_cpus, + .smp_secondary_init = berlin_secondary_init, + .smp_boot_secondary = berlin_boot_secondary, +#ifdef CONFIG_HOTPLUG_CPU + .cpu_die = berlin_cpu_die, +#endif +}; diff --git a/arch/arm/mach-berlin/time.c b/arch/arm/mach-berlin/time.c index 6ac5c69b..bfd3abbb 100644 --- a/arch/arm/mach-berlin/time.c +++ b/arch/arm/mach-berlin/time.c @@ -19,7 +19,9 @@ #include #include #include +#include +#include "common.h" static struct dw_apb_clocksource *cs; static void timer_get_base_and_rate(struct device_node *np, @@ -85,6 +87,12 @@ static void __init apb_init(void) { struct device_node *event_timer, *source_timer; + berlin_clk_init(); + + if (!arch_timer_of_register()) { + arch_timer_sched_clock_init(); + return; + } event_timer = of_find_matching_node(NULL, apb_timer_ids); if (!event_timer) panic("No timer for clockevent"); diff --git a/arch/arm/mach-berlin/wdt_reset.c b/arch/arm/mach-berlin/wdt_reset.c index 50d08662..0deecb4a 100644 --- a/arch/arm/mach-berlin/wdt_reset.c +++ b/arch/arm/mach-berlin/wdt_reset.c @@ -1,3 +1,19 @@ +/******************************************************************************** + * Marvell GPL License Option + * + * If you received this File from Marvell, you may opt to use, redistribute and/or + * modify this File in accordance with the terms and conditions of the General + * Public License Version 2, June 1991 (the "GPL License"), a copy of which is + * available along with the File in the license.txt file or by writing to the Free + * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or + * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. + * + * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED + * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY + * DISCLAIMED. The GPL License provides additional details about this warranty + * disclaimer. + ******************************************************************************/ + #include #include #include @@ -8,20 +24,26 @@ #include #include #include +#include #include "common.h" -#include "clock.h" #ifndef CONFIG_BERLIN_SM -#define SM_APB_WDT_VER 0x3130332a + +#ifdef CONFIG_BERLIN2CDP + #define SM_APB_WDT_VER 0x3130372A + #define RA_smSysCtl_SM_WDT_MASK 0x003C +#else + #define SM_APB_WDT_VER 0x3130332A + #define RA_smSysCtl_SM_WDT_MASK 0x0034 +#endif #define SM_APB_ICTL_BASE (SOC_SM_APB_REG_BASE) #define SM_APB_WDT0_BASE (SOC_SM_APB_REG_BASE + 0x1000) #define SM_APB_WDT1_BASE (SOC_SM_APB_REG_BASE + 0x2000) #define SM_APB_WDT2_BASE (SOC_SM_APB_REG_BASE + 0x3000) -#define RA_smSysCtl_SM_WDT_MASK 0x0034 static void BFM_HOST_Bus_Write32(unsigned int addr, unsigned int val) { writel(val, addr); @@ -95,8 +117,7 @@ static int Galois_SM_WDT(unsigned int wdt_instance, unsigned int rst_type, int i BFM_HOST_Bus_Write32( (wdt_base+0x00),0x10); else BFM_HOST_Bus_Write32( (wdt_base+0x00),0x12); // - // time out around 2^(16 + 6) / 25M = 0.64 sec - BFM_HOST_Bus_Write32( (wdt_base+0x04),0x08); + BFM_HOST_Bus_Write32( (wdt_base+0x04),0x08); // time out around 2^(16 + 6) / 25M = 0.64 sec BFM_HOST_Bus_Read32((wdt_base+0x00),&read); read |=0x01; // enable WDT BFM_HOST_Bus_Write32( (wdt_base+0x00),read); @@ -144,12 +165,23 @@ static int Galois_SM_WDT(unsigned int wdt_instance, unsigned int rst_type, int i static galois_soc_watchdog_reset(void) { +#ifdef CONFIG_BERLIN2CDP + Galois_SM_WDT(0, 1, 0); +#else Galois_SM_WDT(3, 1, 0); +#endif for (;;); } + +static int __init reset_init(void) +{ + arm_pm_restart = galois_soc_watchdog_reset; + return 0; +} void galois_arch_reset(char mode, const char *cmd) { galois_soc_watchdog_reset(); } +late_initcall(reset_init); #endif diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index 7539ec27..2f880847 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S @@ -70,6 +70,9 @@ ENTRY(v7_flush_dcache_all) beq finished @ if loc is 0, then no need to clean mov r10, #0 @ start clean at cache level 0 flush_levels: +#ifdef CONFIG_ARM_ERRATA_814220 + dsb +#endif add r2, r10, r10, lsr #1 @ work out 3x current cache level mov r1, r0, lsr r2 @ extract cache type bits from clidr and r1, r1, #7 @ mask of the bits for current cache only diff --git a/arch/arm/mm/proc-v7-2level.S b/arch/arm/mm/proc-v7-2level.S old mode 100755 new mode 100644 diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c index 99c63d4b..7c7145d8 100644 --- a/arch/arm/oprofile/common.c +++ b/arch/arm/oprofile/common.c @@ -39,6 +39,7 @@ static struct op_perf_name { { "v6mpcore", "arm/mpcore" }, { "ARMv7 Cortex-A8", "arm/armv7" }, { "ARMv7 Cortex-A9", "arm/armv7-ca9" }, + { "ARMv7 Cortex-A7", "arm/armv7-ca7" }, }; char *op_name_from_perf_id(void) diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index ee90e87e..7e8f52d1 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile @@ -22,7 +22,9 @@ obj-$(CONFIG_ARCH_U8500) += ux500/ obj-$(CONFIG_ARCH_VT8500) += clk-vt8500.o obj-$(CONFIG_ARCH_SUNXI) += clk-sunxi.o obj-$(CONFIG_ARCH_ZYNQ) += clk-zynq.o - +ifeq ($(CONFIG_BERLIN2CDP), y) +obj-$(CONFIG_ARCH_BERLIN) += berlin/ +endif # Chip specific obj-$(CONFIG_COMMON_CLK_WM831X) += clk-wm831x.o obj-$(CONFIG_COMMON_CLK_MAX77686) += clk-max77686.o diff --git a/drivers/clk/berlin/Makefile b/drivers/clk/berlin/Makefile new file mode 100644 index 00000000..d2a14e3b --- /dev/null +++ b/drivers/clk/berlin/Makefile @@ -0,0 +1 @@ +obj-y += pll.o clk.o clk-berlin2q.o pll-berlin2q.o pll-berlin2cdp.o diff --git a/drivers/clk/berlin/clk-berlin2q.c b/drivers/clk/berlin/clk-berlin2q.c new file mode 100644 index 00000000..11e0de4d --- /dev/null +++ b/drivers/clk/berlin/clk-berlin2q.c @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2013 Marvell Technology Group Ltd. + * + * Author: Jisheng Zhang + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ +#include +#include +#include +#include + +#include "clk.h" + +static const struct grpclk_desc berlin2q_grpclk_desc[] __initconst = { + { "cfgclk", 9, 12 }, + { "nfceccclk", 27, 50 }, + {}, +}; + +void __init berlin2q_grpclk_setup(struct device_node *np) +{ + berlin_grpclk_setup(np, berlin2q_grpclk_desc); +} diff --git a/drivers/clk/berlin/clk.c b/drivers/clk/berlin/clk.c new file mode 100644 index 00000000..5796a51f --- /dev/null +++ b/drivers/clk/berlin/clk.c @@ -0,0 +1,298 @@ +/* + * Copyright (c) 2013 Marvell Technology Group Ltd. + * + * Author: Jisheng Zhang + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ +#include +#include +#include +#include +#include +#include + +#include "clk.h" + +#define CLKEN (1 << 0) +#define CLKPLLSEL_MASK 7 +#define CLKPLLSEL_SHIFT 1 +#define CLKPLLSWITCH (1 << 4) +#define CLKSWITCH (1 << 5) +#define CLKD3SWITCH (1 << 6) +#define CLKSEL_MASK 7 +#define CLKSEL_SHIFT 7 + +struct berlin_clk { + struct clk_hw hw; + void __iomem *base; +}; + +#define to_berlin_clk(hw) container_of(hw, struct berlin_clk, hw) + +static u8 clk_div[] = {1, 2, 4, 6, 8, 12, 1, 1}; + +static unsigned long berlin_clk_recalc_rate(struct clk_hw *hw, + unsigned long parent_rate) +{ + u32 val, divider; + struct berlin_clk *clk = to_berlin_clk(hw); + + val = readl_relaxed(clk->base); + if (val & CLKD3SWITCH) + divider = 3; + else { + if (val & CLKSWITCH) { + val >>= CLKSEL_SHIFT; + val &= CLKSEL_MASK; + divider = clk_div[val]; + } else + divider = 1; + } + + return parent_rate / divider; +} + +static u8 berlin_clk_get_parent(struct clk_hw *hw) +{ + u32 val; + struct berlin_clk *clk = to_berlin_clk(hw); + + val = readl_relaxed(clk->base); + if (val & CLKPLLSWITCH) { + val >>= CLKPLLSEL_SHIFT; + val &= CLKPLLSEL_MASK; + return val; + } + + return 0; +} + +static const struct clk_ops berlin_clk_ops = { + .recalc_rate = berlin_clk_recalc_rate, + .get_parent = berlin_clk_get_parent, +}; + +static void __init berlin_clk_setup(struct device_node *np) +{ + struct clk_init_data init; + struct berlin_clk *bclk; + struct clk *clk; + const char *parent_names[5]; + int i, ret; + + bclk = kzalloc(sizeof(*bclk), GFP_KERNEL); + if (WARN_ON(!bclk)) + return; + + bclk->base = of_iomap(np, 0); + if (WARN_ON(!bclk->base)) + return; + + init.name = np->name; + init.ops = &berlin_clk_ops; + for (i = 0; i < ARRAY_SIZE(parent_names); i++) { + parent_names[i] = of_clk_get_parent_name(np, i); + if (!parent_names[i]) + break; + } + init.parent_names = parent_names; + init.num_parents = i; + + bclk->hw.init = &init; + + clk = clk_register(NULL, &bclk->hw); + if (WARN_ON(IS_ERR(clk))) + return; + + ret = of_clk_add_provider(np, of_clk_src_simple_get, clk); + if (WARN_ON(ret)) + return; +} + +struct berlin_grpctl { + struct clk **clks; + void __iomem *switch_base; + void __iomem *select_base; + struct clk_onecell_data onecell_data; +}; + +struct berlin_grpclk { + struct clk_hw hw; + struct berlin_grpctl *ctl; + int switch_shift; + int select_shift; +}; + +#define to_berlin_grpclk(hw) container_of(hw, struct berlin_grpclk, hw) + +static u8 berlin_grpclk_get_parent(struct clk_hw *hw) +{ + u32 val; + struct berlin_grpclk *clk = to_berlin_grpclk(hw); + struct berlin_grpctl *ctl = clk->ctl; + void __iomem *base = ctl->switch_base; + + base += clk->switch_shift / 32 * 4; + val = readl_relaxed(base); + if (val & (1 << clk->switch_shift)) { + base = ctl->select_base; + base += clk->select_shift / 32 * 4; + val = readl_relaxed(base); + val >>= clk->select_shift; + val &= CLKPLLSEL_MASK; + return val; + } + + return 0; +} + +static unsigned long berlin_grpclk_recalc_rate(struct clk_hw *hw, + unsigned long parent_rate) +{ + u32 val, divider; + struct berlin_grpclk *clk = to_berlin_grpclk(hw); + struct berlin_grpctl *ctl = clk->ctl; + void __iomem *base = ctl->switch_base; + int shift; + + shift = clk->switch_shift + 2; + base += shift / 32 * 4; + shift = shift - shift / 32 * 32; + val = readl_relaxed(base); + if (val & (1 << shift)) + divider = 3; + else { + if (unlikely(base != ctl->switch_base)) + val = readl_relaxed(ctl->switch_base); + + shift = clk->switch_shift + 1; + shift = shift - shift / 32 * 32; + if (val & (1 << shift)) { + base = ctl->select_base; + shift = clk->select_shift + 3; + base += shift / 32 * 4; + shift = shift - shift / 32 * 32; + val = readl_relaxed(base); + val >>= shift; + val &= CLKSEL_MASK; + divider = clk_div[val]; + } else + divider = 1; + } + + return parent_rate / divider; +} + +static const struct clk_ops berlin_grpclk_ops = { + .recalc_rate = berlin_grpclk_recalc_rate, + .get_parent = berlin_grpclk_get_parent, +}; + +static struct clk * __init berlin_grpclk_register(const char *name, + const char **parent_names, int num_parents, + int switch_shift, int select_shift, + struct berlin_grpctl *ctl) +{ + struct berlin_grpclk *grpclk; + struct clk *clk; + struct clk_init_data init; + + /* allocate the gate */ + grpclk = kzalloc(sizeof(*grpclk), GFP_KERNEL); + if (!grpclk) { + pr_err("%s: could not allocate berlin grpclk\n", __func__); + return ERR_PTR(-ENOMEM); + } + + init.name = name; + init.ops = &berlin_grpclk_ops; + init.parent_names = parent_names; + init.num_parents = num_parents; + + grpclk->ctl = ctl; + grpclk->switch_shift = switch_shift; + grpclk->select_shift = select_shift; + grpclk->hw.init = &init; + + clk = clk_register(NULL, &grpclk->hw); + + if (IS_ERR(clk)) + kfree(grpclk); + + return clk; +} + +void __init berlin_grpclk_setup(struct device_node *np, + const struct grpclk_desc *desc) +{ + struct berlin_grpctl *ctl; + const char *parent_names[5]; + int i, n, ret; + + ctl = kzalloc(sizeof(*ctl), GFP_KERNEL); + if (WARN_ON(!ctl)) + return; + + ctl->switch_base = of_iomap(np, 0); + if (WARN_ON(!ctl->switch_base)) + return; + + ctl->select_base = of_iomap(np, 1); + if (WARN_ON(!ctl->select_base)) + return; + + /* Count, allocate, and register clock gates */ + for (n = 0; desc[n].name;) + n++; + + ctl->clks = kzalloc(n * sizeof(struct clk *), GFP_KERNEL); + if (WARN_ON(!ctl->clks)) + return; + + for (i = 0; i < ARRAY_SIZE(parent_names); i++) + parent_names[i] = of_clk_get_parent_name(np, i); + + for (i = 0; i < n; i++) { + ctl->clks[i] = berlin_grpclk_register(desc[i].name, + parent_names, ARRAY_SIZE(parent_names), + desc[i].switch_shift, desc[i].select_shift, + ctl); + WARN_ON(IS_ERR(ctl->clks[i])); + } + + ctl->onecell_data.clks = ctl->clks; + ctl->onecell_data.clk_num = i; + + ret = of_clk_add_provider(np, of_clk_src_onecell_get, + &ctl->onecell_data); + if (WARN_ON(ret)) + return; +} + +static const __initconst struct of_device_id clk_match[] = { + { .compatible = "fixed-clock", .data = of_fixed_clk_setup, }, + { .compatible = "fixed-factor-clock", .data = of_fixed_factor_clk_setup, }, + { .compatible = "marvell,berlin2q-pll", .data = berlin2q_pll_setup, }, + { .compatible = "marvell,berlin2q-avpll", .data = berlin2q_avpll_setup, }, + { .compatible = "marvell,berlin2cdp-pll", .data = berlin2cdp_pll_setup, }, + { .compatible = "marvell,berlin2cdp-avpll", .data = berlin2cdp_avpll_setup, }, + { .compatible = "marvell,berlin-clk", .data = berlin_clk_setup, }, + { .compatible = "marvell,berlin2q-grpclk", .data = berlin2q_grpclk_setup, }, + {} +}; + +void __init berlin_clk_init(void) +{ + of_clk_init(clk_match); +} diff --git a/drivers/clk/berlin/clk.h b/drivers/clk/berlin/clk.h new file mode 100644 index 00000000..1fbe4f5e --- /dev/null +++ b/drivers/clk/berlin/clk.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2013 Marvell Technology Group Ltd. + * + * Author: Jisheng Zhang + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ +#ifndef __BERLIN_CLK_H +#define __BERLIN_CLK_H + +#include + +struct berlin_pll { + struct clk_hw hw; + void __iomem *ctrl; + void __iomem *bypass; + u8 bypass_shift; +}; + +#define to_berlin_pll(hw) container_of(hw, struct berlin_pll, hw) + +struct berlin_avpllch { + struct clk_hw hw; + void __iomem *base; + u8 which; +}; + +#define to_berlin_avpllch(hw) container_of(hw, struct berlin_avpllch, hw); + +struct grpclk_desc { + const char *name; + int switch_shift; + int select_shift; +}; + +struct berlin_avplldata { + u32 offset; + u32 fbdiv; + u32 offset_mask; + u32 fbdiv_mask; + u8 offset_shift; + u8 fbdiv_shift; + const struct clk_ops *ops; +}; + +extern void __init berlin_grpclk_setup(struct device_node *np, + const struct grpclk_desc *desc); + +extern void __init berlin_pll_setup(struct device_node *np, + const struct clk_ops *ops); + +extern void __init berlin_avpll_setup(struct device_node *np, + struct berlin_avplldata *data); + +void __init berlin2q_grpclk_setup(struct device_node *np); +void __init berlin2cdp_pll_setup(struct device_node *np); +void __init berlin2cdp_avpll_setup(struct device_node *np); +void __init berlin2q_pll_setup(struct device_node *np); +void __init berlin2q_avpll_setup(struct device_node *np); +#endif /* BERLIN_CLK_H */ diff --git a/drivers/clk/berlin/pll-berlin2cdp.c b/drivers/clk/berlin/pll-berlin2cdp.c new file mode 100644 index 00000000..181ee359 --- /dev/null +++ b/drivers/clk/berlin/pll-berlin2cdp.c @@ -0,0 +1,283 @@ +/* + * Copyright (c) 2013 Marvell Technology Group Ltd. + * + * Author: Jisheng Zhang + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ +#include +#include +#include +#include +#include + +#include "clk.h" + +#define PLL_CTRL0 0x0 +#define PLL_CTRL1 0x4 +#define PLL_CTRL2 0x8 +#define PLL_CTRL3 0xC +#define PLL_CTRL4 0x10 +#define PLL_STATUS 0x14 + +#define AVPLL_CTRL0 0 +#define AVPLL_CTRL1 4 +#define AVPLL_CTRL2 8 +#define AVPLL_CTRL3 12 +#define AVPLLCH 28 +#define AVPLLCH_SIZE 16 +#define AVPLLCH_CTRL0 0 +#define AVPLLCH_CTRL1 4 +#define AVPLLCH_CTRL2 8 +#define AVPLLCH_CTRL3 12 + +static u8 vcodiv_berlin2cdp[] = {1, 2, 4, 8, 16, 32, 64, 128}; + +static unsigned long berlin2cdp_pll_recalc_rate(struct clk_hw *hw, + unsigned long parent_rate) +{ + u32 val, fbdiv, rfdiv, vcodivsel; + struct berlin_pll *pll = to_berlin_pll(hw); + + val = readl_relaxed(pll->ctrl + PLL_CTRL0); + fbdiv = (val >> 12) & 0x1FF; + rfdiv = (val >> 3) & 0x1FF; + val = readl_relaxed(pll->ctrl + PLL_CTRL1); + vcodivsel = (val >> 9) & 0x7; + return parent_rate * fbdiv * 4 / rfdiv / + vcodiv_berlin2cdp[vcodivsel]; +} + +static long berlin2cdp_pll_round_rate(struct clk_hw *hw, unsigned long rate, + unsigned long *parent_rate) +{ + int vcodivsel, pllintpi, kvco; + u32 vco, rfdiv, fbdiv, ctrl0; + struct berlin_pll *pll = to_berlin_pll(hw); + long ret; + + rate /= 1000000; + + if (rate <= 3000 && rate >= 1200) + vcodivsel = 0; + else if (rate < 1200 && rate >= 600) + vcodivsel = 1; + else if (rate < 600 && rate >= 300) + vcodivsel = 2; + else if (rate < 300 && rate >= 150) + vcodivsel = 3; + else if (rate < 150 && rate >= 75) + vcodivsel = 4; + else if (rate < 75 && rate >= 37) + vcodivsel = 5; + else + return berlin2cdp_pll_recalc_rate(hw, *parent_rate); + + vco = rate * vcodiv_berlin2cdp[vcodivsel]; + if (vco >= 1200 && vco <= 1350) + kvco = 8; + else if (vco <= 1500) + kvco = 9; + else if (vco <= 1750) + kvco = 0xA; + else if (vco <= 2000) + kvco = 0xB; + else if (vco <= 2200) + kvco = 0xC; + else if (vco <= 2400) + kvco = 0xD; + else if (vco <= 2600) + kvco = 0xE; + else if (vco <= 3000) + kvco = 0xF; + else + return berlin2cdp_pll_recalc_rate(hw, *parent_rate); + + if (vco>= 1500 && vco <= 2000) + pllintpi = 5; + else if (vco <= 2500) + pllintpi = 6; + else if (vco <= 3000) + pllintpi = 8; + else + return berlin2cdp_pll_recalc_rate(hw, *parent_rate); + + ctrl0 = readl_relaxed(pll->ctrl); + rfdiv = (ctrl0 >> 3) & 0x1FF; + fbdiv = (vco * rfdiv) / (4 * *parent_rate / 1000000); + fbdiv &= 0x1FF; + ret = *parent_rate * fbdiv * 4 / rfdiv / + vcodiv_berlin2cdp[vcodivsel]; + return ret; +} + +static int berlin2cdp_pll_set_rate(struct clk_hw *hw, unsigned long rate, + unsigned long parent_rate) +{ + int vcodivsel, pllintpi, kvco; + u32 vco, rfdiv, fbdiv, ctrl0, ctrl1, bypass; + struct berlin_pll *pll = to_berlin_pll(hw); + + rate /= 1000000; + + if (rate <= 3000 && rate >= 1200) + vcodivsel = 0; + else if (rate < 1200 && rate >= 600) + vcodivsel = 1; + else if (rate < 600 && rate >= 300) + vcodivsel = 2; + else if (rate < 300 && rate >= 150) + vcodivsel = 3; + else if (rate < 150 && rate >= 75) + vcodivsel = 4; + else if (rate < 75 && rate >= 37) + vcodivsel = 5; + else + return -EPERM; + + vco = rate * vcodiv_berlin2cdp[vcodivsel]; + if (vco >= 1200 && vco <= 1350) + kvco = 8; + else if (vco <= 1500) + kvco = 9; + else if (vco <= 1750) + kvco = 0xA; + else if (vco <= 2000) + kvco = 0xB; + else if (vco <= 2200) + kvco = 0xC; + else if (vco <= 2400) + kvco = 0xD; + else if (vco <= 2600) + kvco = 0xE; + else if (vco <= 3000) + kvco = 0xF; + else + return -EPERM; + + if (vco>= 1500 && vco <= 2000) + pllintpi = 5; + else if (vco <= 2500) + pllintpi = 6; + else if (vco <= 3000) + pllintpi = 8; + else + return -EPERM; + + ctrl0 = readl_relaxed(pll->ctrl + PLL_CTRL0); + ctrl1 = readl_relaxed(pll->ctrl + PLL_CTRL1); + rfdiv = (ctrl0 >> 3) & 0x1FF; + fbdiv = (vco * rfdiv) / (4 * parent_rate / 1000000); + fbdiv &= 0x1FF; + ctrl0 &= ~(0x1FF << 12); + ctrl0 |= (fbdiv << 12); + ctrl1 &= ~(0xf << 0); + ctrl1 |= (kvco << 0); + ctrl1 &= ~(0x7 << 6); + ctrl1 |= (vcodivsel << 6); + ctrl1 &= ~(0x7 << 9); + ctrl1 |= (vcodivsel << 9); + ctrl1 &= ~(0xf << 26); + ctrl1 |= (pllintpi << 26); + + /* Pll bypass enable */ + bypass = readl_relaxed(pll->bypass); + bypass |= (1 << pll->bypass_shift); + writel_relaxed(bypass, pll->bypass); + ctrl1 |= (1 << 14); + writel_relaxed(ctrl1, pll->ctrl + PLL_CTRL1); + + /* reset on */ + ctrl0 |= (1 << 1); + writel_relaxed(ctrl0, pll->ctrl + PLL_CTRL0); + + /* make sure RESET is high for at least 2us */ + udelay(2); + + /* clear reset */ + ctrl0 &= ~(1 << 1); + writel_relaxed(ctrl0, pll->ctrl + PLL_CTRL0); + + /* wait 50us */ + udelay(50); + + /* make sure pll locked */ + while (!(readl_relaxed(pll->ctrl + PLL_STATUS) & (1 << 0))) + cpu_relax(); + + /* pll bypass disable */ + ctrl1 &= ~(1 << 14); + writel_relaxed(ctrl1, pll->ctrl + PLL_CTRL1); + bypass &= ~(1 << pll->bypass_shift); + writel_relaxed(bypass, pll->bypass); + + return 0; +} + +static const struct clk_ops berlin2cdp_pll_ops = { + .recalc_rate = berlin2cdp_pll_recalc_rate, + .round_rate = berlin2cdp_pll_round_rate, + .set_rate = berlin2cdp_pll_set_rate, +}; + +void __init berlin2cdp_pll_setup(struct device_node *np) +{ + berlin_pll_setup(np, &berlin2cdp_pll_ops); +} + +static unsigned long berlin2cdp_avpllch_recalc_rate(struct clk_hw *hw, + unsigned long parent_rate) +{ + u32 val; + void __iomem *addr; + unsigned long pll; + int endpll, sync1, sync2, post_div, post_0p5_div; + struct berlin_avpllch *avpllch = to_berlin_avpllch(hw); + + + addr = avpllch->base + AVPLLCH + avpllch->which * AVPLLCH_SIZE; + val = readl_relaxed(addr + AVPLLCH_CTRL0); + endpll = val & (1 << 14); + post_div = val & 0x1FFF; + post_0p5_div = (val >> 13) & 1; + sync1 = readl_relaxed(addr + AVPLLCH_CTRL2) & 0xFFFFF; + sync2 = readl_relaxed(addr + AVPLLCH_CTRL3) & 0xFFFFF; + + parent_rate /= 1000000; + + if (endpll) + pll = parent_rate * sync2 / sync1; + else + pll = parent_rate; + + return 1000000 * 2 * pll / (2 * post_div + post_0p5_div); +} + +static const struct clk_ops berlin2cdp_avpllch_ops = { + .recalc_rate = berlin2cdp_avpllch_recalc_rate, +}; + +static struct berlin_avplldata avpll_data = { + .offset = 140, + .offset_mask = 0x7FFFF, + .offset_shift = 0, + .fbdiv = 4, + .fbdiv_mask = 0x1FF, + .fbdiv_shift = 17, + .ops = &berlin2cdp_avpllch_ops, +}; + +void __init berlin2cdp_avpll_setup(struct device_node *np) +{ + berlin_avpll_setup(np, &avpll_data); +} diff --git a/drivers/clk/berlin/pll-berlin2q.c b/drivers/clk/berlin/pll-berlin2q.c new file mode 100644 index 00000000..e746c95f --- /dev/null +++ b/drivers/clk/berlin/pll-berlin2q.c @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2013 Marvell Technology Group Ltd. + * + * Author: Jisheng Zhang + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ +#include +#include +#include +#include + +#include "clk.h" + +#define PLL_CTRL0 0x0 +#define PLL_CTRL1 0x4 +#define PLL_CTRL2 0x8 +#define PLL_CTRL3 0xC +#define PLL_CTRL4 0x10 +#define PLL_STATUS 0x14 + +#define AVPLL_CTRL0 0 +#define AVPLL_CTRL1 4 +#define AVPLL_CTRL2 8 +#define AVPLL_CTRL3 12 +#define AVPLLCH 32 +#define AVPLLCH_SIZE 16 +#define AVPLLCH_CTRL0 0 +#define AVPLLCH_CTRL1 4 +#define AVPLLCH_CTRL2 8 +#define AVPLLCH_CTRL3 12 + +static const u8 vcodiv_berlin2q[] = {1, 0, 2, 0, 3, 4, 0, 6, 8}; + +static unsigned long berlin2q_pll_recalc_rate(struct clk_hw *hw, + unsigned long parent_rate) +{ + u32 val, fbdiv, rfdiv, vcodivsel; + struct berlin_pll *pll = to_berlin_pll(hw); + + val = readl_relaxed(pll->ctrl + PLL_CTRL0); + fbdiv = (val >> 7) & 0x1FF; + rfdiv = (val >> 2) & 0x1F; + val = readl_relaxed(pll->ctrl + PLL_CTRL1); + vcodivsel = (val >> 9) & 0xF; + return parent_rate * fbdiv / rfdiv / vcodiv_berlin2q[vcodivsel]; +} + +static const struct clk_ops berlin2q_pll_ops = { + .recalc_rate = berlin2q_pll_recalc_rate, +}; + +void __init berlin2q_pll_setup(struct device_node *np) +{ + berlin_pll_setup(np, &berlin2q_pll_ops); +} + +static u8 hdmidiv[] = { 1, 2, 4, 6}; + +static unsigned long berlin2q_avpllch_recalc_rate(struct clk_hw *hw, + unsigned long parent_rate) +{ + u32 val; + void __iomem *addr; + unsigned long pll; + int endpll, sync1, sync2, divhdmi, divav1, divav2, divav3; + struct berlin_avpllch *avpllch = to_berlin_avpllch(hw); + + val = readl_relaxed(avpllch->base + AVPLL_CTRL3); + val &= 0xff; + endpll = val & (1 << avpllch->which); + + addr = avpllch->base + AVPLLCH + avpllch->which * AVPLLCH_SIZE; + sync1 = readl_relaxed(addr + AVPLLCH_CTRL1) & 0x1FFFF; + sync2 = readl_relaxed(addr + AVPLLCH_CTRL2) & 0x1FFFF; + val = readl_relaxed(addr + AVPLLCH_CTRL3); + divhdmi = val & 0x7; + divav1 = (val >> 3) & 0x7; + divav2 = (val >> 6) & 0x3F; + divav3 = (val >> 13) & 0xF; + + parent_rate /= 1000000; + + if (endpll) + pll = parent_rate * sync2 / sync1; + else + pll = parent_rate; + + if (divhdmi) { + divhdmi &= 0x3; + pll /= hdmidiv[divhdmi]; + } + + if (divav2) { + pll /= divav2; + if (divav3) + pll *= 2; + } + + return pll * 1000000; +} + +static const struct clk_ops berlin2q_avpllch_ops = { + .recalc_rate = berlin2q_avpllch_recalc_rate, +}; + +static struct berlin_avplldata avpll_data = { + .offset = 144, + .offset_mask = 0x7FFFF, + .offset_shift = 0, + .fbdiv = 4, + .fbdiv_mask = 0xFF, + .fbdiv_shift = 6, + .ops = &berlin2q_avpllch_ops, +}; + +void __init berlin2q_avpll_setup(struct device_node *np) +{ + berlin_avpll_setup(np, &avpll_data); +} diff --git a/drivers/clk/berlin/pll.c b/drivers/clk/berlin/pll.c new file mode 100644 index 00000000..4c1bb01c --- /dev/null +++ b/drivers/clk/berlin/pll.c @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2013 Marvell Technology Group Ltd. + * + * Author: Jisheng Zhang + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ +#include +#include +#include +#include +#include +#include + +#include "clk.h" + +void __init berlin_pll_setup(struct device_node *np, + const struct clk_ops *ops) +{ + struct clk_init_data init; + struct berlin_pll *pll; + const char *parent_name; + struct clk *clk; + int ret; + + pll = kzalloc(sizeof(*pll), GFP_KERNEL); + if (WARN_ON(!pll)) + return; + + pll->ctrl = of_iomap(np, 0); + pll->bypass = of_iomap(np, 1); + ret = of_property_read_u8(np, "bypass-shift", &pll->bypass_shift); + if (WARN_ON(!pll->ctrl || !pll->bypass || ret)) + return; + + init.name = np->name; + init.ops = ops; + parent_name = of_clk_get_parent_name(np, 0); + init.parent_names = &parent_name; + init.num_parents = 1; + + pll->hw.init = &init; + + clk = clk_register(NULL, &pll->hw); + if (WARN_ON(IS_ERR(clk))) + return; + + ret = of_clk_add_provider(np, of_clk_src_simple_get, clk); + if (WARN_ON(ret)) + return; +} + +struct berlin_avpll { + struct clk_hw hw; + struct clk_onecell_data onecell_data; + struct clk *chs[7]; + void __iomem *base; + void *data; +}; + +#define to_berlin_avpll(hw) container_of(hw, struct berlin_avpll, hw) + +static unsigned long berlin_avpll_recalc_rate(struct clk_hw *hw, + unsigned long parent_rate) +{ + int offset, fbdiv; + long rate; + u32 val; + struct berlin_avpll *avpll = to_berlin_avpll(hw); + struct berlin_avplldata *data = avpll->data; + + rate = parent_rate / 1000000; + val = readl_relaxed(avpll->base + data->offset); + offset = (val >> data->offset_shift) & data->offset_mask; + val = readl_relaxed(avpll->base + data->fbdiv); + fbdiv = (val >> data->fbdiv_shift) & data->fbdiv_mask; + if (offset & (1 << 18)) + offset = -(offset & ((1 << 18) - 1)); + rate = rate * fbdiv + rate * fbdiv * offset / 4194304; + + return rate * 1000000; +} + +static const struct clk_ops berlin_avpll_ops = { + .recalc_rate = berlin_avpll_recalc_rate, +}; + +static struct clk * __init berlin_avpllch_setup(struct device_node *np, + u8 which, void __iomem *base, + const struct clk_ops *ops) +{ + struct berlin_avpllch *avpllch; + struct clk_init_data init; + struct clk *clk; + int err; + + err = of_property_read_string_index(np, "clock-output-names", + which, &init.name); + if (WARN_ON(err)) + goto err_read_output_name; + + avpllch = kzalloc(sizeof(*avpllch), GFP_KERNEL); + if (!avpllch) + goto err_read_output_name; + + avpllch->base = base; + avpllch->which = which; + + init.ops = ops; + init.parent_names = &np->name; + init.num_parents = 1; + + avpllch->hw.init = &init; + + clk = clk_register(NULL, &avpllch->hw); + if (WARN_ON(IS_ERR(clk))) + goto err_clk_register; + + return clk; + +err_clk_register: + kfree(avpllch); +err_read_output_name: + return ERR_PTR(-EINVAL); +} + +void __init berlin_avpll_setup(struct device_node *np, + struct berlin_avplldata *data) +{ + struct clk_init_data init; + struct berlin_avpll *avpll; + const char *parent_name; + struct clk *clk; + int i, ret; + + avpll = kzalloc(sizeof(*avpll), GFP_KERNEL); + if (WARN_ON(!avpll)) + return; + + avpll->base = of_iomap(np, 0); + if (WARN_ON(!avpll->base)) + return; + + avpll->data = data; + init.name = np->name; + init.ops = &berlin_avpll_ops; + parent_name = of_clk_get_parent_name(np, 0); + init.parent_names = &parent_name; + init.num_parents = 1; + + avpll->hw.init = &init; + + clk = clk_register(NULL, &avpll->hw); + if (WARN_ON(IS_ERR(clk))) + return; + + ret = of_clk_add_provider(np, of_clk_src_simple_get, clk); + if (WARN_ON(ret)) + return; + + for (i = 0; i < 7; i++) { + avpll->chs[i] = berlin_avpllch_setup(np, i, avpll->base, + data->ops); + if (WARN_ON(IS_ERR(avpll->chs[i]))) + return; + } + + avpll->onecell_data.clks = avpll->chs; + avpll->onecell_data.clk_num = i; + + ret = of_clk_add_provider(np, of_clk_src_onecell_get, + &avpll->onecell_data); + if (WARN_ON(ret)) + return; +} diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c index a4899855..540b0080 100644 --- a/drivers/clk/clk-fixed-factor.c +++ b/drivers/clk/clk-fixed-factor.c @@ -11,6 +11,7 @@ #include #include #include +#include /* * DOC: basic fixed multiplier and divider clock that cannot gate @@ -28,8 +29,11 @@ static unsigned long clk_factor_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) { struct clk_fixed_factor *fix = to_clk_fixed_factor(hw); + unsigned long long int rate; - return parent_rate * fix->mult / fix->div; + rate = (unsigned long long int)parent_rate * fix->mult; + do_div(rate, fix->div); + return (unsigned long)rate; } static long clk_factor_round_rate(struct clk_hw *hw, unsigned long rate, @@ -93,3 +97,39 @@ struct clk *clk_register_fixed_factor(struct device *dev, const char *name, return clk; } +#ifdef CONFIG_OF +/** + * of_fixed_factor_clk_setup() - Setup function for simple fixed factor clock + */ +void __init of_fixed_factor_clk_setup(struct device_node *node) +{ + struct clk *clk; + const char *clk_name = node->name; + const char *parent_name; + u32 div, mult, flags = 0; + + if (of_property_read_u32(node, "clock-div", &div)) { + pr_err("%s Fixed factor clock <%s> must have a clock-div property\n", + __func__, node->name); + return; + } + + if (of_property_read_u32(node, "clock-mult", &mult)) { + pr_err("%s Fixed factor clock <%s> must have a clokc-mult property\n", + __func__, node->name); + return; + } + + if (of_property_read_bool(node, "set-rate-parent")) + flags |= CLK_SET_RATE_PARENT; + + of_property_read_string(node, "clock-output-names", &clk_name); + parent_name = of_clk_get_parent_name(node, 0); + + clk = clk_register_fixed_factor(NULL, clk_name, parent_name, flags, + mult, div); + if (!IS_ERR(clk)) + of_clk_add_provider(node, of_clk_src_simple_get, clk); +} +EXPORT_SYMBOL_GPL(of_fixed_factor_clk_setup); +#endif diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 251e45d6..a2eeb22c 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -700,6 +700,7 @@ static void __clk_recalc_rates(struct clk *clk, unsigned long msg) * is set, which means a recalc_rate will be issued. * If clk is NULL then returns 0. */ +#ifdef CONFIG_BERLIN2CDP unsigned long clk_get_rate(struct clk *clk) { unsigned long rate; @@ -715,7 +716,7 @@ unsigned long clk_get_rate(struct clk *clk) return rate; } EXPORT_SYMBOL_GPL(clk_get_rate); - +#endif /** * __clk_speculate_rates * @clk: first clk in the subtree diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c index debc5a7c..d6685e35 100644 --- a/drivers/cpufreq/cpufreq-cpu0.c +++ b/drivers/cpufreq/cpufreq-cpu0.c @@ -39,6 +39,116 @@ static unsigned int cpu0_get_speed(unsigned int cpu) return clk_get_rate(cpu_clk) / 1000; } +int __cpu_get_mv(struct cpufreq_policy *policy, + unsigned int *mv) +{ + unsigned long volt; + *mv = 0; + + if (cpu_reg) { + volt = regulator_get_voltage(cpu_reg); + *mv = volt/1000; + } + return 0; +} + +static int __cpu_get_cur_voltages(unsigned int *cur_volt, + unsigned int *norm_volt) +{ + unsigned int cur_freq; + struct opp *opp; + unsigned int tol; + + cur_freq = clk_get_rate(cpu_clk); + + if (cpu_reg) { + rcu_read_lock(); + opp = opp_find_freq_ceil(cpu_dev, &cur_freq); + if (IS_ERR(opp)) { + rcu_read_unlock(); + pr_err("failed to find OPP for %ld\n", cur_freq); + return PTR_ERR(opp); + } + *norm_volt = opp_get_voltage(opp); + rcu_read_unlock(); + *cur_volt = regulator_get_voltage(cpu_reg); + } + else + { + return 1; + } + return 0; +} + +int __cpu_get_boost(struct cpufreq_policy *policy, + unsigned int *boost) +{ + unsigned int cur_volt, norm_volt; + + if (__cpu_get_cur_voltages(&cur_volt,&norm_volt)) + { + *boost = 1; + return 1; + } + + if (cur_volt < norm_volt){ + *boost = 0; + return 0; + } + else if (cur_volt == norm_volt){ + *boost = 1; + return 1; + } + else{ + *boost = 2; + return 2; + } + +} + +int __cpu_set_boost(struct cpufreq_policy *policy, + unsigned int boost) +{ + int ret; + unsigned int cur_volt, norm_volt, new_volt,tol; + + if (__cpu_get_cur_voltages(&cur_volt,&norm_volt)) + { + pr_err("unable to determine current voltage\n"); + return 1; + } + + switch (boost){ + case 0: + new_volt = norm_volt - 25000; + break; + case 1: + new_volt = norm_volt; + break; + case 2: + new_volt = norm_volt + 25000; + break; + default: + new_volt = norm_volt; + } + + if (new_volt > 1180000){ + pr_err("voltage out of bounds\n"); + return -EINVAL; + } + + if (cpu_reg) { + tol = new_volt * voltage_tolerance / 100; + + ret = regulator_set_voltage_tol(cpu_reg, new_volt, tol); + if (ret) { + pr_err("failed to scale voltage: %d\n", ret); + return ret; + } + } + return 0; +} + static int cpu0_set_target(struct cpufreq_policy *policy, unsigned int target_freq, unsigned int relation) { @@ -48,6 +158,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy, unsigned int index, cpu; int ret; + ret = cpufreq_frequency_table_target(policy, freq_table, target_freq, relation, &index); if (ret) { @@ -62,6 +173,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy, freqs.new = freq_Hz / 1000; freqs.old = clk_get_rate(cpu_clk) / 1000; + if (freqs.old == freqs.new) return 0; @@ -203,17 +315,19 @@ static int cpu0_cpufreq_driver_init(void) pr_err("failed to get cpu0 clock: %d\n", ret); goto out_put_node; } - cpu_reg = regulator_get(cpu_dev, "cpu0"); if (IS_ERR(cpu_reg)) { pr_warn("failed to get cpu0 regulator\n"); cpu_reg = NULL; } - ret = of_init_opp_table(cpu_dev); - if (ret) { - pr_err("failed to init OPP table: %d\n", ret); - goto out_put_node; + ret = opp_get_opp_count(cpu_dev); + if (ret < 0) { + ret = of_init_opp_table(cpu_dev); + if (ret) { + pr_err("failed to init OPP table: %d\n", ret); + goto out_put_node; + } } ret = opp_init_cpufreq_table(cpu_dev, &freq_table); diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 1f93dbd7..8bc21b91 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -582,6 +582,41 @@ static ssize_t show_scaling_setspeed(struct cpufreq_policy *policy, char *buf) return policy->governor->show_setspeed(policy, buf); } +static ssize_t show_scaling_cur_mvolt(struct cpufreq_policy *policy, char *buf) +{ + unsigned int mv = 0; + __cpu_get_mv(policy,&mv); + return sprintf(buf, "core voltage = %dmV\n",mv); +} + +static ssize_t show_scaling_boost(struct cpufreq_policy *policy, char *buf) +{ + unsigned int boost = 0; + __cpu_get_boost(policy,&boost); + return sprintf(buf, " 0=-25mV 1=normal 2=+25mV current = %d\n\n",boost); +} + + +static ssize_t store_scaling_boost(struct cpufreq_policy *policy, + const char *buf, size_t count) +{ + unsigned int boost = 0; + unsigned int ret; + + if (!policy->governor) + return -EINVAL; + + ret = sscanf(buf, "%u", &boost); + if (ret != 1) + return -EINVAL; + + __cpu_set_boost(policy, boost); + + return count; +} + + + /** * show_bios_limit - show the current cpufreq HW/BIOS limitation */ @@ -611,6 +646,8 @@ cpufreq_freq_attr_rw(scaling_min_freq); cpufreq_freq_attr_rw(scaling_max_freq); cpufreq_freq_attr_rw(scaling_governor); cpufreq_freq_attr_rw(scaling_setspeed); +cpufreq_freq_attr_ro(scaling_cur_mvolt); +cpufreq_freq_attr_rw(scaling_boost); static struct attribute *default_attrs[] = { &cpuinfo_min_freq.attr, @@ -624,6 +661,8 @@ static struct attribute *default_attrs[] = { &scaling_driver.attr, &scaling_available_governors.attr, &scaling_setspeed.attr, + &scaling_cur_mvolt.attr, + &scaling_boost.attr, NULL }; diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 682de754..90e7462e 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -116,6 +116,15 @@ config GPIO_GENERIC_PLATFORM help Say yes here to support basic platform_device memory-mapped GPIO controllers. +config GPIO_DWAPB + bool "Synopsys DesignWare APB GPIO driver" + select GPIO_GENERIC + select GENERIC_IRQ_CHIP + depends on OF_GPIO && IRQ_DOMAIN + help + Say Y here to build support for the Synopsys DesignWare APB + GPIO block. This requires device tree support. + config GPIO_IT8761E tristate "IT8761E GPIO support" depends on X86 # unconditional access to IO space. diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index c5aebd00..1a164b77 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -22,7 +22,8 @@ obj-$(CONFIG_GPIO_CS5535) += gpio-cs5535.o obj-$(CONFIG_GPIO_DA9052) += gpio-da9052.o obj-$(CONFIG_GPIO_DA9055) += gpio-da9055.o obj-$(CONFIG_ARCH_DAVINCI) += gpio-davinci.o -obj-$(CONFIG_GPIO_EM) += gpio-em.o +obj-$(CONFIG_GPIO_EM) += gpio-em.o +obj-$(CONFIG_GPIO_DWAPB) += gpio-dwapb.o obj-$(CONFIG_GPIO_EP93XX) += gpio-ep93xx.o obj-$(CONFIG_GPIO_GE_FPGA) += gpio-ge.o obj-$(CONFIG_GPIO_ICH) += gpio-ich.o diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c new file mode 100644 index 00000000..07dd8fdd --- /dev/null +++ b/drivers/gpio/gpio-dwapb.c @@ -0,0 +1,427 @@ +/* + * Copyright (c) 2011 Jamie Iles + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * All enquiries to support@picochip.com + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define INT_EN_REG_OFFS 0x30 +#define INT_MASK_REG_OFFS 0x34 +#define INT_TYPE_REG_OFFS 0x38 +#define INT_POLARITY_REG_OFFS 0x3c +#define INT_STATUS_REG_OFFS 0x40 +#define EOI_REG_OFFS 0x4c +#define EXT_PORT_OFFS 0x50 +#define DW_MAX_BANK 4 + +struct dwapb_gpio; + +struct dwapb_gpio_bank { + struct bgpio_chip bgc; + bool is_registered; + struct dwapb_gpio *gpio; + struct irq_domain *domain; +}; + +struct dwapb_gpio { + struct device_node *of_node; + struct device *dev; + void __iomem *regs; + struct dwapb_gpio_bank *banks; + unsigned int nr_banks; + struct irq_chip_generic *irq_gc; + unsigned long toggle_edge; +#ifdef CONFIG_PM_SLEEP + u32 dr[DW_MAX_BANK]; + u32 ddr[DW_MAX_BANK]; + u32 int_type; + u32 int_en; + u32 int_polarity; +#endif +}; + +static unsigned int dwapb_gpio_nr_banks(struct device_node *of_node) +{ + unsigned int nr_banks = 0; + struct device_node *np; + + for_each_child_of_node(of_node, np) + ++nr_banks; + + return nr_banks; +} + +static int dwapb_gpio_to_irq(struct gpio_chip *gc, unsigned offset) +{ + struct dwapb_gpio_bank *bank; + + bank = container_of((struct bgpio_chip *)gc, struct dwapb_gpio_bank, bgc); + return irq_find_mapping(bank->domain, offset); +} + +static void dwapb_toggle_trigger(struct dwapb_gpio *gpio, unsigned int offs) +{ + u32 v = readl(gpio->regs + INT_POLARITY_REG_OFFS); + u32 in = readl(gpio->regs + EXT_PORT_OFFS); + + if (in & BIT(offs)) + v &= ~BIT(offs); + else + v |= BIT(offs); + + writel(v, gpio->regs + INT_POLARITY_REG_OFFS); +} + +static struct dwapb_gpio_bank* dwapb_irq_get_bank(struct dwapb_gpio *gpio, u32 irq) +{ + return &gpio->banks[0]; +} + +static void dwapb_irq_handler(u32 irq, struct irq_desc *desc) +{ + struct dwapb_gpio *gpio; + struct dwapb_gpio_bank *bank; + u32 irq_status; + + gpio = irq_get_handler_data(irq); + bank = dwapb_irq_get_bank(gpio, irq); + irq_status = readl(gpio->regs + INT_STATUS_REG_OFFS); + + while (irq_status) { + int irqoffset = fls(irq_status) - 1; + int irq = irq_find_mapping(bank->domain, irqoffset); + + generic_handle_irq(irq); + irq_status &= ~(1 << irqoffset); + if (gpio->toggle_edge & BIT(irqoffset)) + dwapb_toggle_trigger(gpio, irqoffset); + } +} + +static void dwapb_irq_enable(struct irq_data *d) +{ + struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d); + struct dwapb_gpio *gpio = gc->private; + + u32 val = readl(gpio->regs + INT_EN_REG_OFFS); + val |= 1 << d->hwirq; + writel(val, gpio->regs + INT_EN_REG_OFFS); +} + +static void dwapb_irq_disable(struct irq_data *d) +{ + struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d); + struct dwapb_gpio *gpio = gc->private; + + u32 val = readl(gpio->regs + INT_EN_REG_OFFS); + val &= ~(1 << d->hwirq); + writel(val, gpio->regs + INT_EN_REG_OFFS); +} + +static int dwapb_irq_set_type(struct irq_data *d, u32 type) +{ + struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d); + struct dwapb_gpio *gpio = gc->private; + int bit = d->hwirq; + unsigned long level, polarity; + + if (type & ~(IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING | + IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) + return -EINVAL; + + level = readl(gpio->regs + INT_TYPE_REG_OFFS); + polarity = readl(gpio->regs + INT_POLARITY_REG_OFFS); + + gpio->toggle_edge &= ~BIT(bit); + if (type == IRQ_TYPE_EDGE_BOTH) { + gpio->toggle_edge |= BIT(bit); + level |= (1 << bit); + dwapb_toggle_trigger(gpio, bit); + writel(level, gpio->regs + INT_TYPE_REG_OFFS); + return 0; + } else if (type == IRQ_TYPE_EDGE_RISING) { + level |= (1 << bit); + polarity |= (1 << bit); + } else if (type == IRQ_TYPE_EDGE_FALLING) { + level |= (1 << bit); + polarity &= ~(1 << bit); + } else if (type == IRQ_TYPE_LEVEL_HIGH) { + level &= ~(1 << bit); + polarity |= (1 << bit); + } else if (type == IRQ_TYPE_LEVEL_LOW) { + level &= ~(1 << bit); + polarity &= ~(1 << bit); + } else { + return -EINVAL; + } + + writel(level, gpio->regs + INT_TYPE_REG_OFFS); + writel(polarity, gpio->regs + INT_POLARITY_REG_OFFS); + + return 0; +} + +static int dwapb_create_irqchip(struct dwapb_gpio *gpio, + struct dwapb_gpio_bank *bank, + unsigned int irq_base) +{ + struct irq_chip_type *ct; + + gpio->irq_gc = irq_alloc_generic_chip("gpio-dwapb", 1, irq_base, + gpio->regs, handle_level_irq); + if (!gpio->irq_gc) + return -EIO; + + bank->domain->of_node = of_node_get(bank->bgc.gc.of_node); + gpio->irq_gc->private = gpio; + ct = gpio->irq_gc->chip_types; + ct->chip.irq_ack = irq_gc_ack_set_bit; + ct->chip.irq_mask = irq_gc_mask_set_bit; + ct->chip.irq_unmask = irq_gc_mask_clr_bit; + ct->chip.irq_set_type = dwapb_irq_set_type; + ct->chip.irq_enable = dwapb_irq_enable; + ct->chip.irq_disable = dwapb_irq_disable; + ct->regs.ack = EOI_REG_OFFS; + ct->regs.mask = INT_MASK_REG_OFFS; + irq_setup_generic_chip(gpio->irq_gc, IRQ_MSK(bank->bgc.gc.ngpio), + IRQ_GC_INIT_NESTED_LOCK, IRQ_NOREQUEST, 0); + + return 0; +} + +static int dwapb_configure_irqs(struct dwapb_gpio *gpio, + struct dwapb_gpio_bank *bank) +{ + unsigned int m, irq, ngpio = bank->bgc.gc.ngpio; + int irq_base; + + for (m = 0; m < ngpio; ++m) { + irq = irq_of_parse_and_map(bank->bgc.gc.of_node, m); + if (!irq && m == 0) { + dev_warn(gpio->dev, "no irq for bank %s\n", + bank->bgc.gc.of_node->full_name); + return -ENXIO; + } else if (!irq) { + break; + } + + irq_set_chained_handler(irq, dwapb_irq_handler); + irq_set_handler_data(irq, gpio); + } + + bank->bgc.gc.to_irq = dwapb_gpio_to_irq; + + irq_base = irq_alloc_descs(-1, 0, ngpio, NUMA_NO_NODE); + if (irq_base < 0) + return irq_base; + + /* only support irq in the first bank */ + bank->domain = irq_domain_add_legacy(gpio->of_node, + gpio->banks->bgc.gc.ngpio, + irq_base, 0, + &irq_domain_simple_ops, NULL); + + if (dwapb_create_irqchip(gpio, bank, irq_base)) + goto out_free_descs; + + return 0; + +out_free_descs: + irq_free_descs(irq_base, ngpio); + + return -EIO; +} + +static int dwapb_gpio_add_bank(struct dwapb_gpio *gpio, + struct device_node *bank_np, + unsigned int offs) +{ + struct dwapb_gpio_bank *bank; + u32 bank_idx, ngpio; + int err; + + if (of_property_read_u32(bank_np, "reg", &bank_idx)) { + dev_err(gpio->dev, "invalid bank index for %s\n", + bank_np->full_name); + return -EINVAL; + } + bank = &gpio->banks[offs]; + bank->gpio = gpio; + + if (of_property_read_u32(bank_np, "nr-gpio", &ngpio)) { + dev_err(gpio->dev, "failed to get number of gpios for %s\n", + bank_np->full_name); + return -EINVAL; + } + + err = bgpio_init(&bank->bgc, gpio->dev, 4, + gpio->regs + 0x50 + (bank_idx * 0x4), + gpio->regs + 0x00 + (bank_idx * 0xc), + NULL, gpio->regs + 0x04 + (bank_idx * 0xc), NULL, + false); + + if (err) { + dev_err(gpio->dev, "failed to init gpio chip for %s\n", + bank_np->full_name); + return err; + } + + bank->bgc.gc.ngpio = ngpio; + bank->bgc.gc.of_node = bank_np; + bank->bgc.dir = bank->bgc.read_reg(bank->bgc.reg_dir); + bank->bgc.data = bank->bgc.read_reg(bank->bgc.reg_set); + + /* + * Only bank A can provide interrupts in all configurations of the IP. + */ + if (bank_idx == 0 && of_get_property(bank_np, "interrupt-controller", NULL)) + dwapb_configure_irqs(gpio, bank); + + err = gpiochip_add(&bank->bgc.gc); + if (err) + dev_err(gpio->dev, "failed to register gpiochip for %s\n", + bank_np->full_name); + else + bank->is_registered = true; + + return err; +} + +static void dwapb_gpio_unregister(struct dwapb_gpio *gpio) +{ + unsigned int m; + + for (m = 0; m < gpio->nr_banks; ++m) + if (gpio->banks[m].is_registered) + WARN_ON(gpiochip_remove(&gpio->banks[m].bgc.gc)); + of_node_put(gpio->of_node); +} + +#ifdef CONFIG_PM_SLEEP +static int dwapb_gpio_resume(struct device *dev) +{ + unsigned long flags; + struct dwapb_gpio *gpio = (struct dwapb_gpio *)dev_get_drvdata(dev); + int b; + local_irq_save(flags); + for (b = 0; b < gpio->nr_banks; b++) { + writel(gpio->ddr[b], gpio->regs + 0x04 + (b * 0xc)); + writel(gpio->dr[b], gpio->regs + 0x00 + (b * 0xc)); + } + writel(gpio->int_type, gpio->regs + INT_TYPE_REG_OFFS); + writel(gpio->int_polarity, gpio->regs + INT_POLARITY_REG_OFFS); + writel(gpio->int_en, gpio->regs + INT_EN_REG_OFFS); + local_irq_restore(flags); + return 0; +} +static int dwapb_gpio_suspend(struct device *dev) +{ + unsigned long flags; + struct dwapb_gpio *gpio = (struct dwapb_gpio *)dev_get_drvdata(dev); + int b; + local_irq_save(flags); + for (b = 0; b < gpio->nr_banks; b++) { + gpio->dr[b] = readl(gpio->regs + 0x00 + (b * 0xc)); + gpio->ddr[b] = readl(gpio->regs + 0x04 + (b * 0xc)); + } + gpio->int_type = readl(gpio->regs + INT_TYPE_REG_OFFS); + gpio->int_polarity = readl(gpio->regs + INT_POLARITY_REG_OFFS); + gpio->int_en = readl(gpio->regs + INT_EN_REG_OFFS); + local_irq_restore(flags); + return 0; +} +#endif +static const struct dev_pm_ops dwapb_gpio_pm_ops = { + SET_SYSTEM_SLEEP_PM_OPS(dwapb_gpio_suspend, dwapb_gpio_resume) +}; +static int __devinit dwapb_gpio_probe(struct platform_device *pdev) +{ + struct resource *res; + struct dwapb_gpio *gpio; + struct device_node *np; + const char *dev_name; + int err; + unsigned int offs = 0; + + gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); + if (!gpio) + return -ENOMEM; + gpio->dev = &pdev->dev; + + gpio->nr_banks = dwapb_gpio_nr_banks(pdev->dev.of_node); + + if (!gpio->nr_banks || (gpio->nr_banks > DW_MAX_BANK)) + return -EINVAL; + gpio->banks = devm_kzalloc(&pdev->dev, gpio->nr_banks * + sizeof(*gpio->banks), GFP_KERNEL); + if (!gpio->banks) + return -ENOMEM; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) { + dev_err(&pdev->dev, "failed to get iomem\n"); + return -ENXIO; + } + + gpio->regs = devm_ioremap(&pdev->dev, res->start, resource_size(res)); + if (!gpio->regs) + return -ENOMEM; + + gpio->of_node = of_node_get(pdev->dev.of_node); + dev_name = of_get_property(gpio->of_node, "dev_name", NULL); + if (dev_name) + dev_set_name(gpio->dev, dev_name); + for_each_child_of_node(pdev->dev.of_node, np) { + err = dwapb_gpio_add_bank(gpio, np, offs++); + if (err) + goto out_unregister; + } + + platform_set_drvdata(pdev, gpio); + return 0; + +out_unregister: + dwapb_gpio_unregister(gpio); + + return err; +} + +static const struct of_device_id dwapb_of_match_table[] = { + { .compatible = "snps,dw-apb-gpio" }, + { /* Sentinel */ } +}; + +static struct platform_driver dwapb_gpio_driver = { + .driver = { + .name = "gpio-dwapb", + .owner = THIS_MODULE, + .pm = &dwapb_gpio_pm_ops, + .of_match_table = dwapb_of_match_table, + }, + .probe = dwapb_gpio_probe, +}; + +static int __init dwapb_gpio_init(void) +{ + return platform_driver_register(&dwapb_gpio_driver); +} +postcore_initcall(dwapb_gpio_init); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Jamie Iles"); +MODULE_DESCRIPTION("DesignWare APB GPIO driver"); diff --git a/drivers/hwmon/tsen-adc33.c b/drivers/hwmon/tsen-adc33.c index d6d0137a..014e8bab 100644 --- a/drivers/hwmon/tsen-adc33.c +++ b/drivers/hwmon/tsen-adc33.c @@ -9,12 +9,12 @@ #include #include #include - -#define SM_ADC_CTRL 0x0014 -#define SM_ADC_STATUS 0x001C -#define TSEN_ADC_CTRL 0x0074 -#define TSEN_ADC_STATUS 0x0024 -#define TSEN_ADC_DATA 0x0028 +#include +#ifdef CONFIG_BERLIN2CDP +#include +#include +#include +#endif #define BIT_SM_CTRL_SOC2SM_SW_INTR (1<<2) /* SoC to SM Software interrupt */ #define BIT_SM_CTRL_ADC_SEL0 (1<<5) /* adc input channel select */ @@ -37,75 +37,134 @@ #define TSEN_WAIT_MAX 50000 #define NR_ATTRS 2 +#define TSEN_VARIANT_BERLIN 1 +#define TSEN_VARIANT_BERLIN2CDP 2 + struct tsen_adc33_data { - void __iomem *base; + void __iomem *sm_adc_ctrl; + void __iomem *sm_adc_status; + void __iomem *tsen_adc_ctrl; + void __iomem *tsen_adc_status; + void __iomem *tsen_adc_data; +#ifdef CONFIG_BERLIN2CDP + int pwr_gpio; +#endif + int variant; struct mutex lock; struct device *hwmon_dev; struct sensor_device_attribute *attrs[NR_ATTRS]; }; -static inline u32 rdl(struct tsen_adc33_data *data, int offset) -{ - return readl_relaxed(data->base + offset); -} - -static inline void wrl(struct tsen_adc33_data *data, u32 value, int offset) -{ - writel_relaxed(value, data->base + offset); -} +static struct of_device_id tsen_adc33_match[] = { + { + .compatible = "mrvl,berlin-tsen-adc33", + .data = (void *)TSEN_VARIANT_BERLIN, + }, + { + .compatible = "mrvl,berlin2cdp-tsen-adc33", + .data = (void *)TSEN_VARIANT_BERLIN2CDP, + }, + {}, +}; +MODULE_DEVICE_TABLE(of, tsen_adc33_match); +#ifdef CONFIG_BERLIN2CDP +ktime_t ktime_get(void); +#endif static int tsen_raw_read(struct tsen_adc33_data *data) { - int raw, wait = 0; + static int raw; + int wait = 0; +#ifdef CONFIG_BERLIN2CDP + long long inter; + static ktime_t prev; +#endif unsigned int status, val; mutex_lock(&data->lock); - val = rdl(data, SM_ADC_CTRL); - val &= ~(1 << 29); - wrl(data, val, SM_ADC_CTRL); - val = rdl(data, TSEN_ADC_CTRL); +#ifdef CONFIG_BERLIN2CDP + inter = ktime_to_ms(ktime_sub(ktime_get(), prev)); + dev_dbg(data->hwmon_dev, "inter: %lldms\n", inter); + if (inter < 10420 && ktime_to_ms(prev) != 0) { + dev_dbg(data->hwmon_dev, "return previous sample\n"); + mutex_unlock(&data->lock); + return raw; + } + + if (data->pwr_gpio != -1) { + gpio_set_value(data->pwr_gpio, 1); + usleep_range(100, 120); + } +#endif + + val = readl_relaxed(data->sm_adc_ctrl); + val &= ~(1 << 29); /* uSM_CTRL_TSEN_RESET */ + writel_relaxed(val, data->sm_adc_ctrl); + + val = readl_relaxed(data->tsen_adc_ctrl); val &= ~(0xf << 21); - val |= (8 << 22); - val |= (1 << 21); - wrl(data, val, TSEN_ADC_CTRL); + val |= (8 << 22); /* uTSEN_ADC_CTRL_BG_DTRIM */ + val |= (1 << 21); /* uTSEN_ADC_CTRL_BG_CHP_SEL */ + writel_relaxed(val, data->tsen_adc_ctrl); - val = rdl(data, SM_ADC_CTRL); - val |= (1 << 19); - wrl(data, val, SM_ADC_CTRL); + val = readl_relaxed(data->sm_adc_ctrl); + val |= (1 << 19); /* uSM_CTRL_TSEN_EN */ + writel_relaxed(val, data->sm_adc_ctrl); + + val = readl_relaxed(data->tsen_adc_ctrl); + val |= (1 << 8); /* uTSEN_ADC_CTRL_TSEN_START */ + writel_relaxed(val, data->tsen_adc_ctrl); - val = rdl(data, TSEN_ADC_CTRL); - val |= (1 << 8); - wrl(data, val, TSEN_ADC_CTRL); while (1) { - status = rdl(data, TSEN_ADC_STATUS); + status = readl_relaxed(data->tsen_adc_status); if (status & 0x1) break; if (++wait > TSEN_WAIT_MAX) { + dev_warn(data->hwmon_dev, "timeout, status 0x%x.\n", + status); mutex_unlock(&data->lock); - printk(KERN_WARNING "%s timeout, status 0x%08x.\n", - __func__, status); - return -1; + return -ETIMEDOUT; } } - raw = rdl(data, TSEN_ADC_DATA); + raw = readl_relaxed(data->tsen_adc_data); + + val = readl_relaxed(data->tsen_adc_ctrl); + val &= ~(1 << 8); /* uTSEN_ADC_CTRL_TSEN_START */ + writel_relaxed(val, data->tsen_adc_ctrl); + + val = readl_relaxed(data->sm_adc_ctrl); + val |= (1 << 29); /* uSM_CTRL_TSEN_RESET */ + writel_relaxed(val, data->sm_adc_ctrl); + + val = readl_relaxed(data->sm_adc_ctrl); + val &= ~(1 << 19); /* uSM_CTRL_TSEN_EN */ + writel_relaxed(val, data->sm_adc_ctrl); + + status = readl_relaxed(data->tsen_adc_status); status &= ~0x1; - wrl(data, status, TSEN_ADC_STATUS); + writel_relaxed(status, data->tsen_adc_status); - val = rdl(data, TSEN_ADC_CTRL); - val &= ~(1 << 8); - wrl(data, val, TSEN_ADC_CTRL); - mutex_unlock(&data->lock); +#ifdef CONFIG_BERLIN2CDP + if (data->pwr_gpio != -1) { + gpio_set_value(data->pwr_gpio, 0); + } + prev = ktime_get(); +#endif + mutex_unlock(&data->lock); return raw; } -static inline int tsen_celcius_calc(int raw) +static inline int tsen_celcius_calc(int raw, int variant) { if (raw > 2047) raw = -(4096 - raw); - raw = (raw * 100) / 264 - 270; + if (variant == TSEN_VARIANT_BERLIN2CDP) + raw = (raw * 3904 - 2818000) / 10000; + else + raw = (raw * 100) / 264 - 270; return raw; } @@ -119,9 +178,9 @@ static ssize_t tsen_temp_show(struct device *dev, raw = tsen_raw_read(data); if (raw < 0) - printk(KERN_ERR "fail to read tsen.\n"); + return raw; - temp = tsen_celcius_calc(raw); + temp = tsen_celcius_calc(raw, data->variant); return sprintf(buf, "%u\n", temp); } @@ -132,30 +191,10 @@ static ssize_t tsen_temp_raw_show(struct device *dev, struct tsen_adc33_data *data = dev_get_drvdata(dev); temp = tsen_raw_read(data); - return sprintf(buf, "%u\n", temp); -} + if (temp < 0) + return temp; -static void tsen_reset(struct tsen_adc33_data *data) -{ - unsigned int val; - - val = rdl(data, SM_ADC_CTRL); - val |= BIT_SM_CTRL_SOC2SM_SW_INTR; - val |= BIT_SM_CTRL_ADC_PU; - val |= BIT_SM_CTRL_ADC_SEL0; - val |= BIT_SM_CTRL_ADC_SEL1; - val |= BIT_SM_CTRL_ADC_SEL2; - val &= ~BIT_SM_CTRL_ADC_SEL3; - val &= ~BIT_SM_CTRL_ADC_CKSEL0; - val &= ~BIT_SM_CTRL_ADC_CKSEL1; - val &= ~BIT_SM_CTRL_ADC_START; - val &= ~BIT_SM_CTRL_ADC_RESET; - wrl(data, val, SM_ADC_CTRL); - wrl(data, 0, SM_ADC_STATUS); - val |= BIT_SM_CTRL_ADC_RESET; - wrl(data, val, SM_ADC_CTRL); - val &= ~BIT_SM_CTRL_ADC_RESET; - wrl(data, val, SM_ADC_CTRL); + return sprintf(buf, "%u\n", temp); } static struct sensor_device_attribute tsen_sensor_attrs[] = { @@ -200,6 +239,7 @@ static int tsen_adc33_probe(struct platform_device *pdev) int ret; struct tsen_adc33_data *data; struct device_node *np = pdev->dev.of_node; + const struct of_device_id *of_id; data = devm_kzalloc(&pdev->dev, sizeof(struct tsen_adc33_data), GFP_KERNEL); @@ -208,8 +248,39 @@ static int tsen_adc33_probe(struct platform_device *pdev) return -ENOMEM; } - data->base = of_iomap(np, 0); - if (!data->base) { +#ifdef CONFIG_BERLIN2CDP + data->pwr_gpio = of_get_named_gpio(np, "pwr-gpio", 0); + if (!gpio_is_valid(data->pwr_gpio)) { + dev_err(&pdev->dev, "no pwr-gpio set\n"); + data->pwr_gpio = -1; + } else { + ret = gpio_request(data->pwr_gpio, "pwr-gpio"); + if (ret) { + dev_err(&pdev->dev, "can't request pwr gpio %d", data->pwr_gpio); + return ret; + } + dev_dbg(&pdev->dev, "pwr-gpio: %d\n", data->pwr_gpio); + + ret = gpio_direction_output(data->pwr_gpio, 0); + if (ret) + dev_err(&pdev->dev, "can't set pwr gpio dir\n"); + } +#endif + + of_id = of_match_device(tsen_adc33_match, &pdev->dev); + if (of_id) + data->variant = (int)of_id->data; + else + data->variant = TSEN_VARIANT_BERLIN; + + data->sm_adc_ctrl = of_iomap(np, 0); + data->sm_adc_status = of_iomap(np, 1); + data->tsen_adc_ctrl = of_iomap(np, 2); + data->tsen_adc_status = of_iomap(np, 3); + data->tsen_adc_data = of_iomap(np, 4); + if (!data->sm_adc_ctrl || !data->sm_adc_status || + !data->tsen_adc_ctrl || !data->tsen_adc_status || + !data->tsen_adc_data) { dev_err(&pdev->dev, "Failed to iomap memory\n"); return -ENOMEM; } @@ -220,7 +291,6 @@ static int tsen_adc33_probe(struct platform_device *pdev) mutex_init(&data->lock); platform_set_drvdata(pdev, data); - tsen_reset(data); data->hwmon_dev = hwmon_device_register(&pdev->dev); if (IS_ERR(data->hwmon_dev)) { @@ -228,12 +298,17 @@ static int tsen_adc33_probe(struct platform_device *pdev) dev_err(&pdev->dev, "Failed to register hwmon device\n"); goto err_create_group; } + return 0; err_create_group: tsen_remove_attrs(&pdev->dev, data->attrs); err_free: - iounmap(data->base); + iounmap(data->sm_adc_ctrl); + iounmap(data->sm_adc_status); + iounmap(data->tsen_adc_ctrl); + iounmap(data->tsen_adc_status); + iounmap(data->tsen_adc_data); return ret; } @@ -244,17 +319,15 @@ static int tsen_adc33_remove(struct platform_device *pdev) tsen_remove_attrs(&pdev->dev, data->attrs); hwmon_device_unregister(data->hwmon_dev); - iounmap(data->base); + iounmap(data->sm_adc_ctrl); + iounmap(data->sm_adc_status); + iounmap(data->tsen_adc_ctrl); + iounmap(data->tsen_adc_status); + iounmap(data->tsen_adc_data); platform_set_drvdata(pdev, NULL); return 0; } -static struct of_device_id tsen_adc33_match[] = { - { .compatible = "mrvl,berlin-tsen-adc33", }, - {}, -}; -MODULE_DEVICE_TABLE(of, tsen_adc33_match); - static struct platform_driver tsen_adc33_driver = { .driver = { .name = "tsen-adc33", diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 343357a2..e27a00a5 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -241,7 +241,7 @@ static int __init dw_i2c_init_driver(void) { return platform_driver_probe(&dw_i2c_driver, dw_i2c_probe); } -subsys_initcall(dw_i2c_init_driver); +module_init(dw_i2c_init_driver); static void __exit dw_i2c_exit_driver(void) { diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 2273ce6b..b20c051d 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -783,7 +783,7 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr, /* * Change to the card's maximum speed. */ - mmc_set_clock(host, mmc_sdio_get_max_clock(card)); + mmc_set_clock(host, mmc_sdio_get_max_clock(card)/2); /* * Switch to wider bus (if supported). diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index 916d6e9c..8b35acf1 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c @@ -1383,10 +1383,26 @@ int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt) struct nand_chip *this = mtd->priv; int block; uint8_t res; + int mtd_type; + loff_t dst; /* Get block number * 2 */ - block = (int)(offs >> (this->bbt_erase_shift - 1)); - res = (this->bbt[block >> 3] >> (block & 0x06)) & 0x03; + mtd_type = this->get_mtd_info(mtd, offs, &dst); + if ((mtd_type == MTD_ESLC) || (mtd_type == MTD_SLC)) { + /* the physical erase shift is erase_shift + 1 */ + block = (int)(dst >> this->bbt_erase_shift); + res = (this->bbt[block >> 3] >> (block & 0x06)) & 0x03; + } else if (mtd_type == MTD_DUAL_PLANE ) { + block = (int)((offs + (mtd->erasesize>>1)) >> (this->bbt_erase_shift - 2)); + res = (this->bbt[block >> 3] >> (block & 0x06)) & 0x03; + + block = (int)(offs >> (this->bbt_erase_shift - 2)); + res |= (this->bbt[block >> 3] >> (block & 0x06)) & 0x03; + } else { + block = (int)(offs >> (this->bbt_erase_shift - 1)); + res = (this->bbt[block >> 3] >> (block & 0x06)) & 0x03; + } + pr_debug("nand_isbad_bbt(): bbt info for offs 0x%08x: " "(block %d) 0x%02x\n", diff --git a/drivers/net/ethernet/marvell/geth.c b/drivers/net/ethernet/marvell/geth.c index 03144ba4..93c3a9c4 100644 --- a/drivers/net/ethernet/marvell/geth.c +++ b/drivers/net/ethernet/marvell/geth.c @@ -56,7 +56,6 @@ #include -#define CONFIG_BERLIN_ASIC #ifdef CONFIG_BERLIN_ASIC #define PHY_ADDR 0x00 #define PHY_NEGOTIATION_WORKAROUND @@ -468,7 +467,11 @@ static void phy_reset(struct geth_private *mp) static inline void ethSetTxClock(int clock_25_Mhz) { unsigned int val; +#ifdef CONFIG_BERLIN2CDP + void __iomem *reg = IOMEM(0xF7FCD040); +#else void __iomem *reg = IOMEM(0xF7FCD038); +#endif val = readl(reg); @@ -537,6 +540,33 @@ static void phy_init(struct geth_private *priv) //enable crossover & scrambler ethSetTxClock(1); mvEthPhyWrite(priv, priv->mii.phy_id, 0x10, 0x138); + +#ifdef CONFIG_BERLIN2CDP + + mvEthPhyWrite(priv, priv->mii.phy_id, 0x1D, 0x1B); + mvEthPhyWrite(priv, priv->mii.phy_id, 0x1E, 0x0E02); + + mvEthPhyWrite(priv, priv->mii.phy_id, 0x1D, 0x10); + mvEthPhyWrite(priv, priv->mii.phy_id, 0x1E, 0xC025); + + mvEthPhyWrite(priv, priv->mii.phy_id, 0x1D, 0x4); + mvEthPhyWrite(priv, priv->mii.phy_id, 0x1E, 0x07AC); + + mvEthPhyWrite(priv, priv->mii.phy_id, 0x1D, 0x9); + mvEthPhyWrite(priv, priv->mii.phy_id, 0x1F, 0x07A6); + + mvEthPhyWrite(priv, priv->mii.phy_id, 0x1D, 5); + mvEthPhyWrite(priv, priv->mii.phy_id, 0x1F, 0x8); + + + mvEthPhyWrite(priv, priv->mii.phy_id, 0x1D, 8); + mvEthPhyWrite(priv, priv->mii.phy_id, 0x1E, 0xE52D); + + mvEthPhyWrite(priv, priv->mii.phy_id, 0x1D, 2); + mvEthPhyWrite(priv, priv->mii.phy_id, 0x1E, 0x8000); + udelay(1000); + mvEthPhyWrite(priv, priv->mii.phy_id, 0x1E, 0); +#else mvEthPhyWrite(priv, priv->mii.phy_id, 0x1D, 4); mvEthPhyWrite(priv, priv->mii.phy_id, 0x1E, 0x39C);//Set ADC bias current mvEthPhyWrite(priv, priv->mii.phy_id, 0x1D, 5); @@ -549,6 +579,9 @@ static void phy_init(struct geth_private *priv) mvEthPhyWrite(priv, priv->mii.phy_id, 0x1D, 9); mvEthPhyWrite(priv, priv->mii.phy_id, 0x1F, 0x17C6); #endif + +#endif + return; #endif printk(KERN_INFO "Setting ethernet to auto-negotiation mode.\n"); diff --git a/drivers/regulator/88pg86x.c b/drivers/regulator/88pg86x.c new file mode 100644 index 00000000..2c627646 --- /dev/null +++ b/drivers/regulator/88pg86x.c @@ -0,0 +1,217 @@ +/* + * Author: Jisheng Zhang + * Copyright (c) 2013 Marvell Technology Group Ltd. + * http://www.marvell.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PG86x_NUM_REGS 2 + +struct pg86x_priv { + struct i2c_client *i2c; + u8 reg[PG86x_NUM_REGS]; + u8 vol1v[PG86x_NUM_REGS]; + u8 vol1p6v[PG86x_NUM_REGS]; + struct regulator_dev *rdev[PG86x_NUM_REGS]; + struct regulator_init_data *reg_data[PG86x_NUM_REGS]; + struct regulator_desc desc[PG86x_NUM_REGS]; +}; + +static int pg86x_is_enabled(struct regulator_dev *rdev) +{ + return 1; +} + +static int pg86x_list_voltage(struct regulator_dev *rdev, unsigned selector) +{ + int id = rdev_get_id(rdev); + struct pg86x_priv *priv = rdev_get_drvdata(rdev); + + if (selector >= priv->desc[id].n_voltages) + return -EINVAL; + if (selector >= 24) + return 1600000 + 50000 * (selector - 24); + return 1000000 + 25000 * selector; +} + +static int pg86x_get_voltage(struct regulator_dev *rdev) +{ + int ret, id = rdev_get_id(rdev); + struct pg86x_priv *priv = rdev_get_drvdata(rdev); + + ret = i2c_smbus_read_byte_data(priv->i2c, priv->reg[id]); + if (ret < 0) { + dev_err(&priv->i2c->dev, "I2C read error\n"); + return ret; + } + if (ret >= priv->desc[id].n_voltages) + return -EINVAL; + if (ret >= priv->vol1p6v[id]) + return 1600000 + 50000 * (ret - priv->vol1p6v[id]); + if (ret >= priv->vol1v[id]) + return 1000000 + 25000 * (ret - priv->vol1v[id]); + + return -EINVAL; +} + +static int pg86x_set_voltage(struct regulator_dev *rdev, int min_uV, + int max_uV, unsigned *selector) +{ + u8 val; + int ret, delta, id = rdev_get_id(rdev); + struct pg86x_priv *priv = rdev_get_drvdata(rdev); + + if (min_uV > 2200000 || min_uV < 1000000) + return -EINVAL; + if (max_uV > 2200000 || max_uV < 1000000) + return -EINVAL; + if (min_uV >= 1600000) { + delta = min_uV - 1600000; + delta = (delta + 50000 - 1 ) / 50000 * 50000; + if (delta > max_uV - 1600000) + return -EINVAL; + delta /= 50000; + *selector = delta; + val = delta + priv->vol1p6v[id]; + } + + if (min_uV >= 1000000) { + delta = min_uV - 1000000; + delta = (delta + 25000 - 1 ) / 25000 * 25000; + if (delta > max_uV - 1000000) + return -EINVAL; + delta /= 25000; + *selector = delta; + val = delta + priv->vol1v[id]; + } + + ret = i2c_smbus_write_byte_data(priv->i2c, priv->reg[id], val); + if (ret < 0) + dev_err(&priv->i2c->dev, "I2C write error\n"); + return 0; +} + +static struct regulator_ops pg86x_regulator_ops = { + .is_enabled = pg86x_is_enabled, + .list_voltage = pg86x_list_voltage, + .set_voltage = pg86x_set_voltage, + .get_voltage = pg86x_get_voltage, +}; + +static const struct i2c_device_id pg86x_i2c_id[] = { + { "pg86x", 0x867 }, + {}, +}; +MODULE_DEVICE_TABLE(i2c, pg86x_i2c_id); + +static const struct of_device_id pg86x_dt_ids[] = { + { .compatible = "marvell,pg86x", }, + {}, +}; +MODULE_DEVICE_TABLE(of, pg86x_dt_ids); + +static struct of_regulator_match pg86x_matches[] = { + { .name = "BK1_TV", }, + { .name = "BK2_TV", }, +}; + +static int pg86x_probe(struct i2c_client *i2c, const struct i2c_device_id *id) +{ + int i, ret; + struct pg86x_priv *priv; + struct regulator_config config = { }; + struct device_node *np = i2c->dev.of_node; + + priv = devm_kzalloc(&i2c->dev, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + ret = of_regulator_match(&i2c->dev, np, pg86x_matches, PG86x_NUM_REGS); + if (ret < 0) { + dev_err(&i2c->dev, "Error parsing regulator init data: %d\n", ret); + return ret; + } + + priv->i2c = i2c; + i2c_set_clientdata(i2c, priv); + + for (i = 0; i < PG86x_NUM_REGS; i++) { + struct regulator_dev *rdev; + + if (!pg86x_matches[i].init_data || + !pg86x_matches[i].of_node) { + continue; + } + + priv->reg_data[i] = pg86x_matches[i].init_data; + priv->desc[i].name = pg86x_matches[i].name; + priv->desc[i].id = i; + priv->desc[i].ops = &pg86x_regulator_ops; + priv->desc[i].type = REGULATOR_VOLTAGE; + priv->desc[i].owner = THIS_MODULE; + priv->desc[i].n_voltages = 37; + priv->reg[i] = (i == 0)? 0x24: 0x13; + priv->vol1v[i] = (i == 0)? 0xB: 0x10; + priv->vol1p6v[i] = (i == 0)? 0x23: 0x28; + config.dev = &i2c->dev; + config.init_data = priv->reg_data[i]; + config.driver_data = priv; + config.of_node = pg86x_matches[i].of_node; + rdev = regulator_register(&priv->desc[i], &config); + if (IS_ERR(rdev)) { + dev_err(&i2c->dev, "failed to register pg86x\n"); + ret = PTR_ERR(rdev); + + while (--i >= 0) + regulator_unregister(priv->rdev[i]); + + return ret; + } + priv->rdev[i] = rdev; + } + + return 0; +} + +static int pg86x_remove(struct i2c_client *i2c) +{ + struct pg86x_priv *priv = i2c_get_clientdata(i2c); + int i; + + for (i = 0; i < PG86x_NUM_REGS; i++) + regulator_unregister(priv->rdev[i]); + + return 0; +} + +static struct i2c_driver pg86x_driver = { + .id_table = pg86x_i2c_id, + .driver = { + .name = "pg86x", + .owner = THIS_MODULE, + .of_match_table = pg86x_dt_ids, + }, + .probe = pg86x_probe, + .remove = pg86x_remove, +}; + + +module_i2c_driver(pg86x_driver); + +MODULE_DESCRIPTION("Driver for Marvell 88PG86x PMIC"); +MODULE_AUTHOR("Jisheng Zhang "); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 93187579..8c97cae5 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -95,12 +95,6 @@ config REGULATOR_ARIZONA Support for the regulators found on Wolfson Arizona class devices. -config REGULATOR_BERLIN - tristate "Marvell Berlin SoC vqmmc regulator" - help - This driver provides support for the voltage regulators for vqmmc - on the Marvell Berlin SoC. - config REGULATOR_DA903X tristate "Dialog Semiconductor DA9030/DA9034 regulators" depends on PMIC_DA903X @@ -169,6 +163,12 @@ config REGULATOR_ISL6271A help This driver supports ISL6271A voltage regulator chip. +config REGULATOR_88PG86X + bool "Marvell 88PG86X Power regulators" + depends on I2C + help + This driver supports 88PG867, 88PG868 voltage regulator chips + config REGULATOR_88PM8607 bool "Marvell 88PM8607 Power regulators" depends on MFD_88PM860X=y diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index 12a440b3..044e46b2 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -9,6 +9,7 @@ obj-$(CONFIG_REGULATOR_FIXED_VOLTAGE) += fixed.o obj-$(CONFIG_REGULATOR_VIRTUAL_CONSUMER) += virtual.o obj-$(CONFIG_REGULATOR_USERSPACE_CONSUMER) += userspace-consumer.o +obj-$(CONFIG_REGULATOR_88PG86X) += 88pg86x.o obj-$(CONFIG_REGULATOR_88PM8607) += 88pm8607.o obj-$(CONFIG_REGULATOR_AAT2870) += aat2870-regulator.o obj-$(CONFIG_REGULATOR_AB3100) += ab3100.o @@ -17,7 +18,6 @@ obj-$(CONFIG_REGULATOR_AD5398) += ad5398.o obj-$(CONFIG_REGULATOR_ANATOP) += anatop-regulator.o obj-$(CONFIG_REGULATOR_ARIZONA) += arizona-micsupp.o arizona-ldo1.o obj-$(CONFIG_REGULATOR_AS3711) += as3711-regulator.o -obj-$(CONFIG_REGULATOR_BERLIN) += berlin-regulator.o obj-$(CONFIG_REGULATOR_DA903X) += da903x.o obj-$(CONFIG_REGULATOR_DA9052) += da9052-regulator.o obj-$(CONFIG_REGULATOR_DA9055) += da9055-regulator.o diff --git a/drivers/regulator/berlin-regulator.c b/drivers/regulator/berlin-regulator.c deleted file mode 100644 index b393ec0d..00000000 --- a/drivers/regulator/berlin-regulator.c +++ /dev/null @@ -1,495 +0,0 @@ -/* - * berlin-regulator.c -- Marvell berlin - * based on tps65910-regulator.c - * - * Copyright 2013 Marvell Inc. - * - * Author: Fan Wang - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* supported VMMC voltages in uV */ -static const unsigned int VMMC_VSEL_table[] = { - 3300000, -}; -/* supported VQMMC voltages in uV */ -static const unsigned int VQMMC_VSEL_table[] = { - 1800000, 3300000, -}; - -struct berlin_info { - const char *name; - const char *vin_name; - u8 n_voltages; - const unsigned int *voltage_table; - int enable_time_us; -}; - -struct berlin_regulator_init_data { - int idx; - struct regulator_init_data *init_data; - struct device_node *node; - int gpio_num; - bool is_sm; -}; - -/* regulator index definitions */ -#define BERLIN_REG_VMMC 0 -#define BERLIN_REG_VQMMC 1 -static struct berlin_info berlin_regs[] = { - { - .name = "vmmc_sd", - .n_voltages = ARRAY_SIZE(VMMC_VSEL_table), - .voltage_table = VMMC_VSEL_table, - .enable_time_us = 100, - }, - { - .name = "vqmmc_sd", - .n_voltages = ARRAY_SIZE(VQMMC_VSEL_table), - .voltage_table = VQMMC_VSEL_table, - .enable_time_us = 100, - }, -}; - -struct berlin_reg { - struct regulator_desc *desc; - struct regulator_dev **rdev; - struct berlin_info **info; - struct berlin_regulator_init_data **berlin_data; - int num_regulators; -}; - - -static int berlin_set_mode(struct regulator_dev *dev, unsigned int mode) -{ - switch (mode) { - case REGULATOR_MODE_NORMAL: - case REGULATOR_MODE_IDLE: - case REGULATOR_MODE_STANDBY: - return 0; - } - - return -EINVAL; -} - -static unsigned int berlin_get_mode(struct regulator_dev *dev) -{ - return 0; -} - -static int berlin_get_voltage(struct regulator_dev *dev) -{ - struct berlin_reg *pmic = rdev_get_drvdata(dev); - int ret = 1, value, id = rdev_get_id(dev); - int gpio_num = pmic->berlin_data[id]->gpio_num; - bool is_sm = pmic->berlin_data[id]->is_sm; - - pr_debug("in %s, idx:%d\n", __func__, pmic->berlin_data[id]->idx); - switch (pmic->berlin_data[id]->idx) { - case BERLIN_REG_VMMC: - value = pmic->info[id]->voltage_table[0]; - pr_debug("value:%d\n", value); - break; - case BERLIN_REG_VQMMC: - pr_debug("%s:gpio_num:%d, is_sm:%d\n", __func__, gpio_num, is_sm); - if (is_sm) - SM_GPIO_PortRead(gpio_num, &ret); - else - GPIO_PortRead(gpio_num, &ret); - value = pmic->info[id]->voltage_table[ret]; - break; - default: - value = pmic->info[id]->voltage_table[0]; - } - return value; -} - -static int berlin_set_voltage_gpio_sel(struct regulator_dev *dev, - unsigned selector) -{ - struct berlin_reg *pmic = rdev_get_drvdata(dev); - int id = rdev_get_id(dev), ret = 0; - int gpio_num = pmic->berlin_data[id]->gpio_num; - bool is_sm = pmic->berlin_data[id]->is_sm; - - pr_debug("in %s, idx:%d,selector:%d\n", __func__, - pmic->berlin_data[id]->idx, selector); - pr_debug("%s:gpio_num:%d, is_sm:%d\n", __func__, gpio_num, is_sm); - - switch (pmic->berlin_data[id]->idx) { - case BERLIN_REG_VMMC: - break; - case BERLIN_REG_VQMMC: - if (gpio_num >= 0) { - if (selector == 0) { /* 1v8 */ - if (is_sm) - SM_GPIO_PortWrite(gpio_num, 0); - else - GPIO_PortWrite(gpio_num, 0); - } else { /* 3v3 */ - if (is_sm) - SM_GPIO_PortWrite(gpio_num, 1); - else - GPIO_PortWrite(gpio_num, 1); - } - } else { - ret = -EINVAL; - } - break; - default: - break; - } - - return ret; -} - -static int berlin_list_voltage(struct regulator_dev *dev, - unsigned selector) -{ - struct berlin_reg *pmic = rdev_get_drvdata(dev); - int id = rdev_get_id(dev); - - pr_debug("in %s, n_voltages:%d, selector:%d\n", __func__, pmic->desc[id].n_voltages, - selector); - if (selector >= pmic->desc[id].n_voltages) - return -EINVAL; - pr_debug("voltage selected:%d\n", pmic->info[id]->voltage_table[selector]); - - return pmic->info[id]->voltage_table[selector]; -} - -static int berlin_gpio_regulator_is_enabled(struct regulator_dev *dev) -{ - struct berlin_reg *pmic = rdev_get_drvdata(dev); - int id = rdev_get_id(dev), ret = 0; - int gpio_num = pmic->berlin_data[id]->gpio_num; - bool is_sm = pmic->berlin_data[id]->is_sm; - - switch (pmic->berlin_data[id]->idx) { - case BERLIN_REG_VMMC: - pr_debug("%s:gpio_num:%d, is_sm:%d\n", __func__, gpio_num, is_sm); - if (gpio_num >= 0) { - if (is_sm) - SM_GPIO_PortRead(gpio_num, &ret); - else - GPIO_PortRead(gpio_num, &ret); - } else { - ret = -EINVAL; - } - break; - default: - ret = 1; - break; - } - pr_debug("in %s, is_enabled:%d\n", __func__, ret); - return ret; -} - -static int berlin_enable(struct regulator_dev *dev) -{ - struct berlin_reg *pmic = rdev_get_drvdata(dev); - int id = rdev_get_id(dev), ret = 0; - int gpio_num = pmic->berlin_data[id]->gpio_num; - bool is_sm = pmic->berlin_data[id]->is_sm; - - switch (pmic->berlin_data[id]->idx) { - case BERLIN_REG_VMMC: - if (gpio_num >= 0) { - if (is_sm) - SM_GPIO_PortWrite(gpio_num, 1); - else - GPIO_PortWrite(gpio_num, 1); - } else { - ret = -EINVAL; - } - - break; - default: - break; - } - return ret; -} - -static int berlin_disable(struct regulator_dev *dev) -{ - struct berlin_reg *pmic = rdev_get_drvdata(dev); - int id = rdev_get_id(dev), ret = 0; - int gpio_num = pmic->berlin_data[id]->gpio_num; - bool is_sm = pmic->berlin_data[id]->is_sm; - - switch (pmic->berlin_data[id]->idx) { - case BERLIN_REG_VMMC: - if (gpio_num >= 0) { - if (is_sm) - SM_GPIO_PortWrite(gpio_num, 0); - else - GPIO_PortWrite(gpio_num, 0); - } else { - ret = -EINVAL; - } - break; - default: - break; - } - return ret; -} - -static int berlin_enable_time(struct regulator_dev *dev) -{ - struct berlin_reg *pmic = rdev_get_drvdata(dev); - int id = rdev_get_id(dev); - return pmic->info[id]->enable_time_us; -} - -/* Regulator ops */ -static struct regulator_ops berlin_ops_gpio = { - .is_enabled = berlin_gpio_regulator_is_enabled, - .enable = berlin_enable, - .disable = berlin_disable, - .enable_time = berlin_enable_time, - .set_mode = berlin_set_mode, - .get_mode = berlin_get_mode, - .get_voltage = berlin_get_voltage, - .set_voltage_sel = berlin_set_voltage_gpio_sel, - .list_voltage = berlin_list_voltage, -}; - -static int berlin_get_num_regulators_dt(struct platform_device *pdev) -{ - struct device_node *np, *regulators; - int num = 0; - - np = pdev->dev.of_node; - regulators = of_find_node_by_name(np, "regulators"); - if (!regulators) { - dev_err(&pdev->dev, "regulator node not found\n"); - return 0; - } - for_each_child_of_node(regulators, np) - num++; - return num; -} - -static int berlin_parse_dt_reg_data( - struct platform_device *pdev, struct berlin_reg *pmic) -{ - struct device_node *np, *regulators; - struct berlin_regulator_init_data *berlin_data, *p; - int idx = 0; - - np = pdev->dev.of_node; - regulators = of_find_node_by_name(np, "regulators"); - if (!regulators) { - dev_err(&pdev->dev, "regulator node not found\n"); - return -EINVAL; - } - - berlin_data = devm_kzalloc(&pdev->dev, sizeof(*berlin_data) - * pmic->num_regulators, GFP_KERNEL); - if (!berlin_data) { - dev_err(&pdev->dev, "Memory allocation failed for init_data\n"); - return -ENOMEM; - } - - p = berlin_data; - for_each_child_of_node(regulators, np) { - for (idx = 0; idx < ARRAY_SIZE(berlin_regs); idx++) { - if (!of_node_cmp(np->name, - berlin_regs[idx].name)) { - p->idx = idx; - p->init_data = of_get_regulator_init_data( - &pdev->dev, np); - if (of_property_read_u32( - np, - "pwr-gpio", &p->gpio_num)) - p->gpio_num = -1; - - p->is_sm = of_property_match_string( - np, - "gpio-type", "sm") >= 0 ? true : false; - p->node = np; - pmic->berlin_data[idx] = p; - pr_debug("idx:%d,init_data:%p,node:%p,\ - gpio_num:%d, is_sm:%d\n", - idx, p->init_data, np, - p->gpio_num, p->is_sm); - p++; - break; - } - } - } - if (berlin_data == p) - return -EINVAL; - return 0; -} - -static int berlin_pmic_probe(struct platform_device *pdev) -{ - struct berlin_info *info; - struct regulator_init_data *reg_data; - struct regulator_dev *rdev; - struct berlin_reg *pmic; - struct regulator_config config = { }; - int i, err; - - pr_debug("berlin pmic probe.\n"); - pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL); - if (!pmic) { - dev_err(&pdev->dev, "Memory allocation failed for pmic\n"); - return -ENOMEM; - } - - platform_set_drvdata(pdev, pmic); - - pmic->num_regulators = berlin_get_num_regulators_dt(pdev); - pr_debug("num_regulators:%d\n", pmic->num_regulators); - - pmic->desc = devm_kzalloc(&pdev->dev, pmic->num_regulators * - sizeof(struct regulator_desc), GFP_KERNEL); - if (!pmic->desc) { - dev_err(&pdev->dev, "Memory alloc fails for desc\n"); - return -ENOMEM; - } - - pmic->info = devm_kzalloc(&pdev->dev, pmic->num_regulators * - sizeof(struct berlin_info *), GFP_KERNEL); - if (!pmic->info) { - dev_err(&pdev->dev, "Memory alloc fails for info\n"); - return -ENOMEM; - } - - pmic->berlin_data = devm_kzalloc(&pdev->dev, pmic->num_regulators * - sizeof(struct berlin_regulator_init_data *), GFP_KERNEL); - if (!pmic->berlin_data) { - dev_err(&pdev->dev, "Memory alloc fails for data\n"); - return -ENOMEM; - } - - pmic->rdev = devm_kzalloc(&pdev->dev, pmic->num_regulators * - sizeof(struct regulator_dev *), GFP_KERNEL); - if (!pmic->rdev) { - dev_err(&pdev->dev, "Memory alloc fails for rdev\n"); - return -ENOMEM; - } - - if (berlin_parse_dt_reg_data(pdev, pmic) < 0) - return -EINVAL; - - for (i = 0; i < pmic->num_regulators; i++) { - - reg_data = pmic->berlin_data[i]->init_data; - - /* Regulator API handles empty constraints but not NULL - * constraints */ - if (!reg_data) - continue; - - /* Register the regulators */ - info = berlin_regs + pmic->berlin_data[i]->idx; - pmic->info[i] = info; - - pmic->desc[i].name = info->name; - pmic->desc[i].supply_name = info->vin_name; - pmic->desc[i].id = i; - pmic->desc[i].n_voltages = info->n_voltages; - - if (pmic->berlin_data[i]->idx == BERLIN_REG_VMMC || - pmic->berlin_data[i]->idx == BERLIN_REG_VQMMC) { - pmic->desc[i].ops = &berlin_ops_gpio; - } else { - pmic->desc[i].ops = &berlin_ops_gpio; - } - - pmic->desc[i].type = REGULATOR_VOLTAGE; - pmic->desc[i].owner = THIS_MODULE; - - config.dev = &pdev->dev; - config.init_data = reg_data; - config.driver_data = pmic; - config.of_node = pmic->berlin_data[i]->node; - rdev = regulator_register(&pmic->desc[i], &config); - if (IS_ERR(rdev)) { - dev_err(&pdev->dev, - "failed to register %s regulator\n", - pdev->name); - err = PTR_ERR(rdev); - goto err_unregister_regulator; - } - - /* Save regulator for cleanup */ - pmic->rdev[i] = rdev; - } - return 0; - -err_unregister_regulator: - while (--i >= 0) - regulator_unregister(pmic->rdev[i]); - return err; -} - -static int berlin_pmic_remove(struct platform_device *pdev) -{ - struct berlin_reg *pmic = platform_get_drvdata(pdev); - int i; - - for (i = 0; i < pmic->num_regulators; i++) - regulator_unregister(pmic->rdev[i]); - - return 0; -} - -static void berlin_pmic_shutdown(struct platform_device *pdev) -{ - return; -} - -static const struct of_device_id berlin_pmic_of_match[] = { - {.compatible = "mrvl,berlin-pmic",}, - {}, -}; -MODULE_DEVICE_TABLE(of, berlin_pmic_of_match); -static struct platform_driver berlin_pmic_driver = { - .driver = { - .name = "berlin-pmic", - .of_match_table = berlin_pmic_of_match, - .owner = THIS_MODULE, - }, - .probe = berlin_pmic_probe, - .remove = berlin_pmic_remove, - .shutdown = berlin_pmic_shutdown, -}; - -static int __init berlin_pmic_init(void) -{ - return platform_driver_register(&berlin_pmic_driver); -} -subsys_initcall(berlin_pmic_init); - -static void __exit berlin_pmic_cleanup(void) -{ - platform_driver_unregister(&berlin_pmic_driver); -} -module_exit(berlin_pmic_cleanup); - -MODULE_AUTHOR("Fan Wang "); -MODULE_DESCRIPTION("Marvell Berlin BG2 voltage regulator driver"); -MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("platform:berlin-pmic"); diff --git a/drivers/usb/host/ehci-berlin.c b/drivers/usb/host/ehci-berlin.c old mode 100644 new mode 100755 index 2a8233be..bd72f104 --- a/drivers/usb/host/ehci-berlin.c +++ b/drivers/usb/host/ehci-berlin.c @@ -34,41 +34,101 @@ #define MV_USB_RESET_TRIGGER 0x0178 /* RA_Gbl_ResetTrigger */ +#define USB2_OTG_REG0 0x34 +#define USB2_CHARGER_REG0 0x38 +#define USB2_PLL_REG0 0x0 +#define USB2_PLL_REG1 0x4 +#define USB2_DIG_REG0 0x1c +#define USB2_TX_CH_CTRL0 0x0c +#define USB2_CAL_CTRL 8 + struct berlin_ehci_hcd { struct ehci_hcd *ehci; void __iomem *phy_base; - u32 reset; + int reset; int pwr_gpio; }; +static int berlin_cdp_reinit_phy(void __iomem *base) +{ + u32 data, timeout; + + /* powering up OTG */ + data = readl( base + USB2_OTG_REG0); + data |= 1<<4; + writel(data, (base + USB2_OTG_REG0)); + + /* powering Charger detector circuit */ + data = readl( base + USB2_CHARGER_REG0); + data |= 1<<5; + writel(data, (base + USB2_CHARGER_REG0)); + + /* Power up analog port */ + writel(0x03BE7F6F, (base + USB2_TX_CH_CTRL0)); + + /* Squelch setting */ + writel(0xC39F16CE, (base + USB2_DIG_REG0)); + + /* Impedance calibration */ + writel(0xf5930488, (base + USB2_CAL_CTRL)); + + /* Configuring FBDIV for SOC Clk 25 Mhz */ + data = readl( base + USB2_PLL_REG0); + data &= 0xce00ff80; + data |= 5 | (0x60<<16) | (0<<28); + writel(data, (base + USB2_PLL_REG0)); + + /* Power up PLL, Reset, Suspen_en disable */ + writel(0x407, (base + USB2_PLL_REG1)); + udelay(100); + + /* Deassert Reset */ + writel(0x403, (base + USB2_PLL_REG1)); + + /* Wait for PLL Lock */ + timeout = 0x1000000; + do { + data = readl( base + USB2_PLL_REG0); + if (!--timeout) + break; + } while ( !(data&0x80000000)); + + if (!timeout) + printk(KERN_ERR "ERROR: USB PHY PLL NOT LOCKED!\n"); + + return 0; +} + static void mv_start_ehc(struct usb_hcd *hcd) { - u32 temp; struct berlin_ehci_hcd *berlin = dev_get_drvdata(hcd->self.controller); - GPIO_PortWrite(berlin->pwr_gpio, 0); - + if (berlin->pwr_gpio >= 0) + GPIO_PortWrite(berlin->pwr_gpio, 0); +#ifdef CONFIG_BERLIN2CDP + berlin_cdp_reinit_phy(berlin->phy_base); +#else writel(PHY_PLL, berlin->phy_base + MV_USB_PHY_PLL_REG); writel(0x2235, berlin->phy_base + MV_USB_PHY_PLL_CONTROL_REG); writel(0x5680, berlin->phy_base + MV_USB_PHY_ANALOG_REG); writel(0xAA79, berlin->phy_base + MV_USB_PHY_RX_CTRL_REG); - /* set USBMODE to host mode */ -/* temp = ehci_readl(ehci, hcd->regs + MV_USBMODE); - temp |= USBMODE_CM_HOST; - ehci_writel(ehci, temp, hcd->regs + MV_USBMODE);*/ - - temp = 1 << berlin->reset; - writel(temp, IOMEM(MEMMAP_CHIP_CTRL_REG_BASE + MV_USB_RESET_TRIGGER)); - - GPIO_PortWrite(berlin->pwr_gpio, 1); + if (berlin->reset >= 0) { + u32 temp; + temp = 1 << berlin->reset; + writel(temp, IOMEM(MEMMAP_CHIP_CTRL_REG_BASE + MV_USB_RESET_TRIGGER)); + } +#endif + if (berlin->pwr_gpio >= 0) + GPIO_PortWrite(berlin->pwr_gpio, 1); } static void mv_stop_ehc(struct usb_hcd *hcd) { struct berlin_ehci_hcd *berlin = dev_get_drvdata(hcd->self.controller); - GPIO_PortWrite(berlin->pwr_gpio, 0); + if (berlin->pwr_gpio >= 0) + GPIO_PortWrite(berlin->pwr_gpio, 0); } static int ehci_mv_setup(struct usb_hcd *hcd) @@ -162,16 +222,18 @@ static int berlin_ehci_probe(struct platform_device *pdev) berlin->phy_base = (void __iomem *)val; if (of_property_read_u32(np, "reset-bit", &val)) { - dev_err(&pdev->dev, "no reset-bit set\n"); - return -EINVAL; + /* berlin2cdp don't need reset */ + berlin->reset = -1; + } else { + berlin->reset = val; } - berlin->reset = val; if (of_property_read_u32(np, "pwr-gpio", &val)) { - dev_err(&pdev->dev, "no pwr-gpio set\n"); - return -EINVAL; + /* some platform don't have pwr gpio */ + berlin->pwr_gpio = -1; + } else { + berlin->pwr_gpio = val; } - berlin->pwr_gpio = val; res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (!res) { diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index d8d52842..d49597ce 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -213,10 +213,9 @@ config SA1100_WATCHDOG config DW_WATCHDOG tristate "Synopsys DesignWare watchdog" - depends on ARM && HAVE_CLK help Say Y here if to include support for the Synopsys DesignWare - watchdog timer found in many ARM chips. + watchdog timer found in many chips. To compile this driver as a module, choose M here: the module will be called dw_wdt. diff --git a/drivers/watchdog/ar7_wdt.c b/drivers/watchdog/ar7_wdt.c index 3003e2a9..2f3cc8fb 100644 --- a/drivers/watchdog/ar7_wdt.c +++ b/drivers/watchdog/ar7_wdt.c @@ -285,11 +285,9 @@ static int ar7_wdt_probe(struct platform_device *pdev) return -ENODEV; } - ar7_wdt = devm_request_and_ioremap(&pdev->dev, ar7_regs_wdt); - if (!ar7_wdt) { - pr_err("could not ioremap registers\n"); - return -ENXIO; - } + ar7_wdt = devm_ioremap_resource(&pdev->dev, ar7_regs_wdt); + if (IS_ERR(ar7_wdt)) + return PTR_ERR(ar7_wdt); vbus_clk = clk_get(NULL, "vbus"); if (IS_ERR(vbus_clk)) { diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c index a0eba3c4..e36d086d 100644 --- a/drivers/watchdog/dw_wdt.c +++ b/drivers/watchdog/dw_wdt.c @@ -8,7 +8,7 @@ * 2 of the License, or (at your option) any later version. * * This file implements a driver for the Synopsys DesignWare watchdog device - * in the many ARM subsystems. The watchdog has 16 different timeout periods + * in the many subsystems. The watchdog has 16 different timeout periods * and these are a function of the input clock frequency. * * The DesignWare watchdog cannot be stopped once it has been started so we @@ -29,9 +29,9 @@ #include #include #include +#include #include #include -#include #include #include #include @@ -43,6 +43,8 @@ #define WDOG_COUNTER_RESTART_REG_OFFSET 0x0c #define WDOG_COUNTER_RESTART_KICK_VALUE 0x76 +#define WDOG_CONTROL_REG_RPL_SHIFT 2 + /* The maximum TOP (timeout period) value that can be set in the watchdog. */ #define DW_WDT_MAX_TOP 15 @@ -54,7 +56,6 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started " #define WDT_TIMEOUT (HZ / 2) static struct { - spinlock_t lock; void __iomem *regs; struct clk *clk; unsigned long in_use; @@ -136,26 +137,25 @@ static int dw_wdt_open(struct inode *inode, struct file *filp) /* Make sure we don't get unloaded. */ __module_get(THIS_MODULE); - spin_lock(&dw_wdt.lock); if (!dw_wdt_is_enabled()) { /* * The watchdog is not currently enabled. Set the timeout to * the maximum and then start it. */ dw_wdt_set_top(DW_WDT_MAX_TOP); - writel(WDOG_CONTROL_REG_WDT_EN_MASK, - dw_wdt.regs + WDOG_CONTROL_REG_OFFSET); + writel(WDOG_CONTROL_REG_WDT_EN_MASK | + readl(dw_wdt.regs + WDOG_CONTROL_REG_OFFSET), + dw_wdt.regs + WDOG_CONTROL_REG_OFFSET); + dw_wdt_keepalive(); } dw_wdt_set_next_heartbeat(); - spin_unlock(&dw_wdt.lock); - return nonseekable_open(inode, filp); } -ssize_t dw_wdt_write(struct file *filp, const char __user *buf, size_t len, - loff_t *offset) +static ssize_t dw_wdt_write(struct file *filp, const char __user *buf, + size_t len, loff_t *offset) { if (!len) return 0; @@ -203,12 +203,12 @@ static long dw_wdt_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) switch (cmd) { case WDIOC_GETSUPPORT: - return copy_to_user((struct watchdog_info *)arg, &dw_wdt_ident, + return copy_to_user((void __user *)arg, &dw_wdt_ident, sizeof(dw_wdt_ident)) ? -EFAULT : 0; case WDIOC_GETSTATUS: case WDIOC_GETBOOTSTATUS: - return put_user(0, (int *)arg); + return put_user(0, (int __user *)arg); case WDIOC_KEEPALIVE: dw_wdt_set_next_heartbeat(); @@ -252,7 +252,7 @@ static int dw_wdt_release(struct inode *inode, struct file *filp) return 0; } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int dw_wdt_suspend(struct device *dev) { clk_disable(dw_wdt.clk); @@ -271,12 +271,9 @@ static int dw_wdt_resume(struct device *dev) return 0; } +#endif /* CONFIG_PM_SLEEP */ -static const struct dev_pm_ops dw_wdt_pm_ops = { - .suspend = dw_wdt_suspend, - .resume = dw_wdt_resume, -}; -#endif /* CONFIG_PM */ +static SIMPLE_DEV_PM_OPS(dw_wdt_pm_ops, dw_wdt_suspend, dw_wdt_resume); static const struct file_operations wdt_fops = { .owner = THIS_MODULE, @@ -296,29 +293,34 @@ static struct miscdevice dw_wdt_miscdev = { static int dw_wdt_drv_probe(struct platform_device *pdev) { int ret; + u32 rpl = 0; + struct device_node *np = pdev->dev.of_node; struct resource *mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!mem) return -EINVAL; - dw_wdt.regs = devm_request_and_ioremap(&pdev->dev, mem); - if (!dw_wdt.regs) - return -ENOMEM; + dw_wdt.regs = devm_ioremap_resource(&pdev->dev, mem); + if (IS_ERR(dw_wdt.regs)) + return PTR_ERR(dw_wdt.regs); - dw_wdt.clk = clk_get(&pdev->dev, NULL); + dw_wdt.clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(dw_wdt.clk)) return PTR_ERR(dw_wdt.clk); ret = clk_enable(dw_wdt.clk); if (ret) - goto out_put_clk; - - spin_lock_init(&dw_wdt.lock); + return ret; ret = misc_register(&dw_wdt_miscdev); if (ret) goto out_disable_clk; + of_property_read_u32(np, "snps,rpl", &rpl); + if (rpl) + writel(rpl << WDOG_CONTROL_REG_RPL_SHIFT, + dw_wdt.regs + WDOG_CONTROL_REG_OFFSET); + dw_wdt_set_next_heartbeat(); setup_timer(&dw_wdt.timer, dw_wdt_ping, 0); mod_timer(&dw_wdt.timer, jiffies + WDT_TIMEOUT); @@ -327,8 +329,6 @@ static int dw_wdt_drv_probe(struct platform_device *pdev) out_disable_clk: clk_disable(dw_wdt.clk); -out_put_clk: - clk_put(dw_wdt.clk); return ret; } @@ -338,20 +338,26 @@ static int dw_wdt_drv_remove(struct platform_device *pdev) misc_deregister(&dw_wdt_miscdev); clk_disable(dw_wdt.clk); - clk_put(dw_wdt.clk); return 0; } +#ifdef CONFIG_OF +static const struct of_device_id dw_wdt_of_match[] = { + { .compatible = "snps,dw-wdt", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, dw_wdt_of_match); +#endif + static struct platform_driver dw_wdt_driver = { .probe = dw_wdt_drv_probe, .remove = dw_wdt_drv_remove, .driver = { .name = "dw_wdt", .owner = THIS_MODULE, -#ifdef CONFIG_PM + .of_match_table = of_match_ptr(dw_wdt_of_match), .pm = &dw_wdt_pm_ops, -#endif /* CONFIG_PM */ }, }; diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c index 9a45d029..7f023e2f 100644 --- a/drivers/watchdog/imx2_wdt.c +++ b/drivers/watchdog/imx2_wdt.c @@ -262,11 +262,9 @@ static int __init imx2_wdt_probe(struct platform_device *pdev) return -ENODEV; } - imx2_wdt.base = devm_request_and_ioremap(&pdev->dev, res); - if (!imx2_wdt.base) { - dev_err(&pdev->dev, "ioremap failed\n"); - return -ENOMEM; - } + imx2_wdt.base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(imx2_wdt.base)) + return PTR_ERR(imx2_wdt.base); imx2_wdt.clk = clk_get(&pdev->dev, NULL); if (IS_ERR(imx2_wdt.clk)) { diff --git a/drivers/watchdog/jz4740_wdt.c b/drivers/watchdog/jz4740_wdt.c index a61408fa..1cb25f69 100644 --- a/drivers/watchdog/jz4740_wdt.c +++ b/drivers/watchdog/jz4740_wdt.c @@ -171,9 +171,9 @@ static int jz4740_wdt_probe(struct platform_device *pdev) watchdog_set_drvdata(jz4740_wdt, drvdata); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - drvdata->base = devm_request_and_ioremap(&pdev->dev, res); - if (drvdata->base == NULL) { - ret = -EBUSY; + drvdata->base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(drvdata->base)) { + ret = PTR_ERR(drvdata->base); goto err_out; } diff --git a/drivers/watchdog/lantiq_wdt.c b/drivers/watchdog/lantiq_wdt.c index 79fe01b4..088fd0c9 100644 --- a/drivers/watchdog/lantiq_wdt.c +++ b/drivers/watchdog/lantiq_wdt.c @@ -197,11 +197,9 @@ ltq_wdt_probe(struct platform_device *pdev) return -ENOENT; } - ltq_wdt_membase = devm_request_and_ioremap(&pdev->dev, res); - if (!ltq_wdt_membase) { - dev_err(&pdev->dev, "cannot remap I/O memory region\n"); - return -ENOMEM; - } + ltq_wdt_membase = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(ltq_wdt_membase)) + return PTR_ERR(ltq_wdt_membase); /* we do not need to enable the clock as it is always running */ clk = clk_get_io(); diff --git a/drivers/watchdog/max63xx_wdt.c b/drivers/watchdog/max63xx_wdt.c index 773c6617..cc9d3280 100644 --- a/drivers/watchdog/max63xx_wdt.c +++ b/drivers/watchdog/max63xx_wdt.c @@ -14,6 +14,7 @@ * another interface, some abstraction will have to be introduced. */ +#include #include #include #include @@ -198,9 +199,9 @@ static int max63xx_wdt_probe(struct platform_device *pdev) heartbeat = current_timeout->twd; wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - wdt_base = devm_request_and_ioremap(&pdev->dev, wdt_mem); - if (!wdt_base) - return -ENOMEM; + wdt_base = devm_ioremap_resource(&pdev->dev, wdt_mem); + if (IS_ERR(wdt_base)) + return PTR_ERR(wdt_base); max63xx_wdt_dev.timeout = heartbeat; watchdog_set_nowayout(&max63xx_wdt_dev, nowayout); diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c index dcba5dab..de1f3fa1 100644 --- a/drivers/watchdog/pnx4008_wdt.c +++ b/drivers/watchdog/pnx4008_wdt.c @@ -155,9 +155,9 @@ static int pnx4008_wdt_probe(struct platform_device *pdev) heartbeat = DEFAULT_HEARTBEAT; r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - wdt_base = devm_request_and_ioremap(&pdev->dev, r); - if (!wdt_base) - return -EADDRINUSE; + wdt_base = devm_ioremap_resource(&pdev->dev, r); + if (IS_ERR(wdt_base)) + return PTR_ERR(wdt_base); wdt_clk = clk_get(&pdev->dev, NULL); if (IS_ERR(wdt_clk)) diff --git a/drivers/watchdog/txx9wdt.c b/drivers/watchdog/txx9wdt.c index 98e16373..626dc0b7 100644 --- a/drivers/watchdog/txx9wdt.c +++ b/drivers/watchdog/txx9wdt.c @@ -121,9 +121,9 @@ static int __init txx9wdt_probe(struct platform_device *dev) } res = platform_get_resource(dev, IORESOURCE_MEM, 0); - txx9wdt_reg = devm_request_and_ioremap(&dev->dev, res); - if (!txx9wdt_reg) { - ret = -EBUSY; + txx9wdt_reg = devm_ioremap_resource(&dev->dev, res); + if (IS_ERR(txx9wdt_reg)) { + ret = PTR_ERR(txx9wdt_reg); goto exit; } diff --git a/firmware/Makefile b/firmware/Makefile index ee3bdb40..a8093ffa 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -33,6 +33,9 @@ fw-shipped-$(CONFIG_ATARI_DSP56K) += dsp56k/bootstrap.bin fw-shipped-$(CONFIG_ATM_AMBASSADOR) += atmsar11.fw fw-shipped-$(CONFIG_BERLIN_SDIO_WLAN_8787) += mrvl/sd8787_uapsta.bin fw-shipped-$(CONFIG_BERLIN_SDIO_WLAN_8801) += mrvl/sd8801_uapsta.bin +fw-shipped-$(CONFIG_BERLIN_SDIO_WLAN_8801) += mrvl/WlanCalData_sd8801.conf +fw-shipped-$(CONFIG_BERLIN_SDIO_WLAN_8887) += mrvl/sd8887_wlan_a2.bin +fw-shipped-$(CONFIG_BERLIN_SDIO_BT_8887) += mrvl/sd8887_bt_a2.bin fw-shipped-$(CONFIG_BNX2X) += bnx2x/bnx2x-e1-6.2.9.0.fw \ bnx2x/bnx2x-e1h-6.2.9.0.fw \ bnx2x/bnx2x-e2-6.2.9.0.fw diff --git a/firmware/mrvl/sd8801_uapsta.bin.ihex b/firmware/mrvl/sd8801_uapsta.bin.ihex index 5e893759..ef08116c 100644 --- a/firmware/mrvl/sd8801_uapsta.bin.ihex +++ b/firmware/mrvl/sd8801_uapsta.bin.ihex @@ -1,32 +1,32 @@ :100000000100000000000000000400000094511AEC :100010001CF09FE51CF09FE51CF09FE51CF09FE5A0 :100020001CF09FE51CF09FE51CF09FE51CF09FE590 -:1000300024440E11EC740200C4740200C87402005F -:10004000CC740200D0740200D4740200D874020090 -:10005000E5740200000000EA6A8600EA28008FE2E8 +:1000300024440EC960750200387502003C75020048 +:100040004075020044750200487502004C750200BC +:1000500059750200000000EAD88500EA28008FE206 :10006000000C90E800A08AE000B08BE001704AE24A -:100070000B005AE16386000A0F00BAE814E04FE271 -:10008000010013E303F0471013FF2FE1187B020078 -:10009000587B02000030A0E30040A0E30050A0E342 +:100070000B005AE1D185000A0F00BAE814E04FE204 +:10008000010013E303F0471013FF2FE1B87B0200D8 +:10009000F87B02000030A0E30040A0E30050A0E3A2 :1000A0000060A0E3102052E27800A128FCFFFF8A44 :1000B000822EB0E13000A128003081451EFF2FE1E3 -:1000C00004309FE503308FE013FF2FE17D1C020019 +:1000C00004309FE503308FE013FF2FE1351A020063 :1000D0000020704710B5144C206800280CD100F0A7 -:1000E000BFFC2060114A2021A0600BF3A4F9104A44 +:1000E00027FD2060114A2021A0600BF3A4F9104ADB :1000F000606820210BF39FF910BD10B50A4C2068F1 :10010000002808D0002213210BF395F920680BF387 :1001100076F90020206010BD0200034810B5006889 -:1001200068210BF388F910BD80EF00C07D1D02002F -:100130009B1D020010B527F026EA05F33FFF0020C3 +:1001200068210BF388F910BDF0F100C0351B020007 +:10013000531B020010B527F060EA05F33FFF0020D3 :1001400010BDB64810B5006800022FD5B44CB54AB2 :100150000020C11C09016161236981005350031D06 :100160001B01636123698918801C0C284B60F0DB3C -:10017000AD48FFF7D1FF27F06AEAFF21AB4A2D31E6 +:10017000AD48FFF7D1FF27F0A4EAFF21AB4A2D31AC :1001800002E0401C8842FCDB50780028F9D0A848E7 :100190006061A8482061012040036061A648206199 :1001A000A348E03860610520206105E09E48401CBE -:1001B000FFF7B2FF27F04AEA012010BD9B4910B5B6 -:1001C000486000F0D3FE10BD202800D3FEE79B4A14 +:1001B000FFF7B2FF27F084EA012010BD9B4910B57C +:1001C000486000F03DFF10BD202800D3FEE79B4AA9 :1001D00080001358002B00D0FEE71150002070471C :1001E000964A002180001150080070470268836819 :1001F000C1681000184770B5052804D2904D8400DE @@ -46,28 +46,28 @@ :1002D000600705D5A86A04218843A8620BF31FFCB8 :1002E00020070AD5A86A08218843A8628020F06008 :1002F000C9436962B1680143B160012070BD70B546 -:100300000124524D8440EC60002022F05DFCA8687E +:100300000124524D8440EC60002022F003FCA868D8 :100310002043A860012070BD01214C4A814010B5E6 :10032000D1600F3800D5FEE7022800DBFEE7484C1D :100330000023800004192360454C403400190362F7 :10034000906808439060012010BDF8B5414DEC68FD :10035000E00702D0A817E8600440200606D58020F8 -:10036000C043E8608020844300F0D3FC200407D51C -:100370000126F603300000F0CCFCF043E860B44303 +:10036000C043E8608020844300F03DFD200407D5B1 +:100370000126F603300000F036FDF043E860B44398 :100380006003400F06D00720000421000140C9434C :10039000E96084432002000F09D00F273F052600A3 -:1003A0003E40300000F06AFCF043E860BC43E000EF +:1003A0003E40300000F0D4FCF043E860BC43E00085 :1003B000400F09D00727BF0626003E40300000F05E -:1003C000F7FBF043E860BC43E0060FD51020C043C4 -:1003D000E8601020844322F0E7FA002806D004F0F9 -:1003E00048FD002802D0102000F044FB002C05DA64 -:1003F0000120C00700F0F7FB1748E8601349886840 -:100400000122920510438860F8BD104B7DEDC8C3F2 +:1003C0005FFCF043E860BC43E0060FD51020C0435B +:1003D000E8601020844322F08DFA002806D004F053 +:1003E00027FE002802D0102000F0ACFB002C05DA1C +:1003F0000120C00700F05FFC1748E86013498868D7 +:100400000122920510438860F8BD104B65EA175E23 :1004100001000000FC030000000400005AEF5E131E :100420000122920510B5DA60FFF799FF012010BD97 -:100430000031008080290080005E02C04000010081 -:10044000D47B0200F0200000FF0C0000070080FFBA -:10045000B0430004F87D0200DD010000003400809C +:100430000031008080290080005C02C04000010083 +:10044000747C0200F0200000FF0C0000070080FF19 +:10045000D0430004587E0200DD010000003400801B :100460000030008040E8008080220080FFFFFF7F96 :1004700030B504002020208165692018AD7A057010 :100480006469E47A44700171090A4171110A827148 @@ -77,19 +77,19 @@ :1004C0001430A08067612027E019142127811CF3D4 :1004D0009EEB2B04029A1B0C14212000FFF7C8FF8F :1004E0003420208120182A0031001CF3CAEA0021A0 -:1004F000200021F0EEFC207B202804D1200021F0F8 -:10050000D9FC0020FEBD278124F0E5F8002802D0A8 -:1005100005200AF038FA21F091FCE84B0500E64886 +:1004F000200021F0CAFB207B202804D1200021F01D +:10050000B5FB0020FEBD278124F0B1F8002802D001 +:1005100005200AF0EEF821F06DFBE84B0500E648F7 :1005200021001C68002200680523A047280021F054 -:1005300089FC0120FEBDFFB50120904083B0039FE0 -:100540000406240EFF376137F87B0E0015002042A9 -:100550002FD1FF229132462301A902A804F043FFC4 -:10056000002826D0F87B17212043F873019C103413 +:1005300065FB0120FEBDFFB50120904083B0039F05 +:100540000406240EFF374137F8790E0015002042CB +:100550002FD1FF229132462301A902A805F023F8EA +:10056000002826D0F87917212043F871019C103417 :1005700020001CF34CEB0698002801D1052000E078 :100580000D20607225722000627A0C990A301CF3EB :1005900078EA310006220C31A01C1CF372EA607A62 :1005A00001990A308872000AC8720299039804F00F -:1005B000E5FE07B0F0BDFFB59FB006000800376844 +:1005B000C5FF07B0F0BDFFB59FB006000800376863 :1005C0000021179121997C69002910D040301E909C :1005D0001CF398EB229905004118C07820314006A1 :1005E00002D4B88823B0F0BD2888682801D800203C @@ -97,65 +97,65 @@ :1006000010F308F9280010F32CF9002853D0AC4857 :10061000002104AA01AB07C318ABAA4A00921D79B6 :1006200010AB1A7F38002B001AA90EF34CFB050003 -:100630002DD12000FF306130C17B090624D5002C6C -:100640000CD00521C9016118496A002906D018ABF0 -:100650001A79920068328B585B1C8B50C17B49061B -:10066000490EC1731E981CF34EEB18AB1D792199EE +:100630002DD12000FF304130C179090624D5002C8E +:100640000CD00521C90161180968002906D018AB32 +:100650001A79920068328B585B1C8B50C17949061D +:10066000490EC1711E981CF34EEB18AB1D792199F0 :100670002A01521B52180E320092010010AB1B7F50 :100680002A002000FFF757FF00203060AFE73560F9 :1006900028891E9940191CF346EB0088A880200089 -:1006A000FF30613018AB1B7901263200C17B9A40C4 -:1006B0009143C1731DE010AB197F009101952A8809 +:1006A000FF30413018AB1B7901263200C1799A40E6 +:1006B0009143C1711DE010AB197F009101952A880B :1006C00018991898643A091D1AAB12F3A8FD060090 -:1006D0001CD0200018AB1A79FF3061300123C17B98 -:1006E00093409943C173288808382880B88808380F -:1006F000B880002C08D00520C0012018406A0028CE +:1006D0001CD0200018AB1A79FF3041300123C179BA +:1006E00093409943C171288808382880B888083811 +:1006F000B880002C08D00520C00120180068002810 :1007000002D0416E491C416630006BE7002C14D0CA -:100710000520C0012018416A00290ED018AB1A79B3 -:10072000920068328B585B1C8B50416A0A69521CDC -:100730000A61406AC168491CC1601E981CF3E2EA64 +:100710000520C0012018016800290ED018AB1A79F5 +:10072000920068328B585B1C8B5001680A69521C1E +:100730000A610068C168491CC1601E981CF3E2EAA6 :10074000010018AB1879219A03011B1A9A180E326E :100750000092020010AB1B7F2000FFF7ECFED3E7F6 -:1007600000280CD00521C9014118486A002806D08C -:100770000269521C0261486AC16C491CC16470471D -:10078000FFB583B004001E000C9F0E9D24F022FDD7 +:1007600000280CD00521C90141180868002806D0CE +:100770000269521C02610868C16C491CC16470475F +:10078000FFB583B004001E000C9F0E9D24F020FDD9 :10079000002820D0607A02281DD0082E1BD3082FF5 :1007A00001D3012005E738001DF378FB030080002A -:1007B000B3250019AD00119A109940196D4607C56F -:1007C0005800B7210019890043180D9A059904981B +:1007B00055250019ED00119A109940196D4607C58D +:1007C000580057210019C90043180D9A059904983B :1007D0000FF374FFEDE60FA807C86C462B0007C4A3 :1007E000F3E7F7B592B014000F00129800680D906F :1007F00000200A900D9845690800403011901CF3C4 -:1008000082EA06002430099028000DF092F82100B9 -:100810002C311091091D203700280F919F3726C8D1 +:1008000082EA06002430099028000CF033FF210012 +:100810002C311091091D203700280F91473C12DA26 :1008200001000000F80700000004000009358D7F7A :1008300022D0109807AA08A903AB07C36B46E0793A :100840000F9A0107387E090F4007400F07C30021A8 :10085000B078099A03092800FFF79CFF00280BD005 -:10086000002D08D00520C0012818406A0028F8D0C3 +:10086000002D08D00520C001281800680028F8D005 :10087000016D491C016595E030886828FBD922008C :100880004C3268380304111F081F0692021F05919D :10089000049003920C3938381C3A0291019000926E :1008A000387E1B0C47077F0F1A00099930003B0068 :1008B00012F3D7FB070030000FF3DDFF002849D00B -:1008C00000200BAA0AA909E04000000484EF00C040 -:1008D000C0EF00C0305E02C0081D01C0009101924F +:1008C00000200BAA0AA909E078040004F4F100C092 +:1008D00030F200C0305C02C0B82001C0009101922B :1008E0000A900D9B099A310038000FF3A4FE0028EE -:1008F00058D0624A0092624A624B0D9831001CF354 +:1008F00058D0934A0092934A934B0D9831001CF3C1 :1009000053FF002802D1129908604BE012990600AB :1009100008600189081811991CF30EEA0E900A98D4 :1009200000284AD00BAA009209990E9823003200A1 :100930000FF3B0FE070040D1002D08D00520C00104 -:100940002818406A002802D00168491C01600E98EE +:1009400028180068002802D00168491C01600E9830 :10095000807922E0002F28D03807800F0FD0002D9B -:1009600020D00520C0012918486A00281AD0C26C7E -:10097000521CC264486A0169491C016112E0B8074F -:1009800010D5002D08D00520C0012818406A002885 +:1009600020D00520C0012918086800281AD0C26CC0 +:10097000521CC26408680169491C016112E0B80791 +:1009800010D5002D08D00520C001281800680028C7 :1009900002D00168491C0160B079C107C90F280065 -:1009A00026F06CEE002015B0F0BD30881438308091 +:1009A00026F0A6EE002015B0F0BD30881438308057 :1009B0000D980D99808814388880079C6B461A8C96 :1009C00010990F9823000FF380FE002F0AD1002DFD -:1009D00008D00520C0012818406A002802D0416EC6 +:1009D00008D00520C00128180068002802D0416E08 :1009E000491C41660120DEE7F7B582B0140007001C :1009F0000068009001900398002540301CF38CE9BA :100A000006000198F1784069490605D42030807EBF @@ -165,15593 +165,15730 @@ :100A4000220004236846FFF7C0FD050000983860C7 :100A5000B079C00710D1002D0ED0A07980070BD53A :100A6000A07AFD210840A07206E00521C9014018C6 -:100A7000406A8168491C81602800D0E7FC1C01C0E5 -:100A8000041D01C0305E02C0010002A010B50AF3CF -:100A90009AFC10BD7364696F0000000010B504007B -:100AA000C0200DF0AEFB00F008FAE00602D50BF016 -:100AB0004AF910BD0BF0EBF810BD0020EEE7000086 -:100AC000052803D259498000085C7047FF20704711 -:100AD0000A00032010B5FFF7F3FF904201D1FFF7A2 -:100AE000ECFF10BDFF280BD0504A00218B00D35CD7 -:100AF000834202D10806000E7047491C0529F5D330 -:100B0000FF207047FF280CD0484A00218B009B181B -:100B10005B78834202D18800105C7047491C05292C -:100B2000F4D3FF207047052804D2404980004018C4 -:100B300040787047FF207047FF280CD03B4A0021C7 -:100B40008B00D35C834203D18800801840787047C3 -:100B5000491C0529F4D3FF207047FF280CD0334AE5 -:100B600000218B00D35C834203D1880080188078F9 -:100B70007047491C0529F4D3FF2070472B4A0021F8 -:100B80008B00D35C834206D188008018C078400770 -:100B9000C017401C7047491C0529F1D3002070473D -:100BA00070B505000C00100000F041F9200000F0C5 -:100BB000C4F82800FFF7A6FF022805D0032803D0B9 -:100BC000042801D0052803D1200000F06BF870BD87 -:100BD00020000DF048FB70BD10B50400C00005D525 -:100BE0000122120311040C20FFF7DAFF200105D5C2 -:100BF0000122D20211040B20FFF7D2FF600105D5BC -:100C00000122920211040A20FFF7CAFF10BD012041 -:100C1000C00310B500F00BF90120C00700F08DF8FB -:100C20000349C86880229043C86010BDD0F7DBAB91 +:100A700000688168491C81602800D0E7F3B589B01F +:100A800005000A98002814D02C896E69611920226B +:100A900001A81CF300E86B46987901AF0007810FAD +:100AA0000120884029490988084204D1280021F002 +:100AB000E7F80BB0F0BD200020216C182038298108 +:100AC0002071000A6B466071988B00092072000A41 +:100AD0006072B07A2070F07A6070A0360E20305EBE +:100AE00023F0E3FA20730A20305E23F0D1FA60731A +:100AF000FF20A0720A9A3B002100280021F0D0F9C3 +:100B00000520A0710020E071012060742074A88885 +:100B1000A070000A22000B32E0700A98D11C1DF36D +:100B200062F821F071F80B4B060009481C6800229E +:100B3000290000680523A047300021F069F8B8E7D4 +:100B4000AC2001C0B42001C0305C02C02C04000401 +:100B5000F4F100C030F200C0010002A010B50AF3A9 +:100B600032FC10BD7364696F0000000010B5040012 +:100B7000C0200DF0B0F900F00AFAE00602D50AF044 +:100B800082FF10BD0AF023FF10BD0020EEE7000039 +:100B9000052803D259498000085C7047FF20704740 +:100BA0000A00032010B5FFF7F3FF904201D1FFF7D1 +:100BB000ECFF10BDFF280BD0504A00218B00D35C06 +:100BC000834202D10806000E7047491C0529F5D35F +:100BD000FF207047FF280CD0484A00218B009B184B +:100BE0005B78834202D18800105C7047491C05295C +:100BF000F4D3FF207047052804D2404980004018F4 +:100C000040787047FF207047FF280CD03B4A0021F6 +:100C10008B00D35C834203D18800801840787047F2 +:100C2000491C0529F4D3FF207047FF281A4FD4D55B :100C300001000000F40B000000040000FD5AF8CB96 -:100C400058F200C000280080F3B581B00F00019871 -:100C5000FFF752FF05000198FFF778FF06000198A3 -:100C6000FFF785FF0400032D07D1042E05D11020C6 -:100C700000F0E7F8B00400F073F8002F16D10198E7 -:100C8000FFF786FF002811D0231F1CF32AE9060F67 -:100C90000F0F0F07040F0021102005E02649A800C0 -:100CA0004018C0780021C00809F38BFEFF2201998B -:100CB0001000FFF717FFFEBD10B50400C00203D5FA -:100CC00001210220FFF7C0FFA00203D5012103206C -:100CD000FFF7BAFF600203D501210420FFF7B4FF3C -:100CE000200203D501210520FFF7AEFF01200007F8 -:100CF000844205D04010844202D0401084421AD170 -:100D0000FF208206A11808D0891804D0C2068918CD -:100D100004D10C2002E00B2000E00A20FFF7FCFECB -:100D2000022805D0032803D0042801D0052802D1C9 -:100D30000121FFF789FF10BD58F200C013490A686E -:100D400002430A608A6802438A60012070470F49A3 -:100D50000A6882430A608A6882438A600120704779 -:100D60000A49C043C8600120704710B5074C803461 -:100D7000216962690F23DB0199439A43002801D05E -:100D80001A4300E019432161626110BD8022008096 -:100D900083480068416801225204914341607047D2 -:100DA0007F48006841680122520411434160704746 -:100DB0007B480068816B0901090C01D00020704755 -:100DC000816B002904DA816B0906090FFBD100E071 -:100DD000806B01207047724909688A69120C1204FD -:100DE00002438A6170476E480068816BC907FCD076 -:100DF00041680122D2039143416070476849096804 -:100E00000A6B086348680122D203104348607047A8 -:100E100063480068406A70476149096880314A6ADE -:100E20000001120F1207000902434A6270475C4832 -:100E30000068C06A70475A490968CA698243CA6132 -:100E4000704757490968CA690243CA6170475449E3 -:100E500009680A6A02430A627047514909680A6AC6 -:100E600082430A6270474E480068803041684908F2 -:100E70004900416070474A4800688030416801225B -:100E800011434160704770B5454D28688030016856 -:100E90000122114301600168424C490205D50168F5 -:100EA000A14301600A2026F086EB286880300168A3 -:100EB0002143016070BD3A480068010080310A6832 -:100EC000520852000A60816BC900FCD47047344854 -:100ED000006880300168334A9143016070473048B0 -:100EE00000688030C068704770B52D4D29680E6964 -:100EF0000C00012109040E432661210080310E6996 -:100F0000086148694B618869F0208861C869CA61D5 -:100F1000A06810210843A060A06820229043A06030 -:100F20002868416B436B8B42FCD0FFF7D8FF002849 -:100F3000F6D128688168114381604168012252031B -:100F40001143416070BD16480068803000697047E9 -:100F5000134800688168202211438160704710485F -:100F60000068816820229143816070470C490968BC -:100F700080310A681F23DB05C0069A43000902433B -:100F80000A6008680122120710430860704704488D -:100F9000006880300168FF22521C114301607047D5 -:100FA00094EF00C00000400038B500240C4D01E073 -:100FB0008047641CA00028580028F9D109480B4933 -:100FC00002680092084A0A480A4B07F3BFFC0AF07D -:100FD0007EFD09480168002901D00020884738BDFE -:100FE0005CB602C084F200C0504F00043800000418 -:100FF0002C000004008002C098EF00C0FEB50D0078 -:101000001600089F0A9A0999002800D1FEE7046893 -:10101000002C00D1FEE7029201913200290020004D -:1010200000970EF077FDFEBD10B506F383FA0006BB -:10103000000E10BD10B506F30FFA0006F12398421A +:100C40000CD0334A00218B00D35C834203D188004F +:100C5000801880787047491C0529F4D3FF2070471D +:100C60002B4A00218B00D35C834206D18800801878 +:100C7000C0784007C017401C7047491C0529F1D3B4 +:100C80000020704770B505000C00100000F043F91B +:100C9000200000F0C6F82800FFF7A6FF022805D0C4 +:100CA000032803D0042801D0052803D1200000F038 +:100CB0006DF870BD20000DF04AF970BD70B50400EC +:100CC000144DC00004D52A00A9040C20FFF7DAFF58 +:100CD000200105D50122D20211040B20FFF7D2FF1B +:100CE000600105D501212A0089060A20FFF7CAFF05 +:100CF00070BD0120C00310B500F00DF90120C00740 +:100D000000F08FF80449C86880229043C86010BD85 +:100D1000BCF400C00004000000280080F3B581B0DE +:100D20000F000198FFF750FF05000198FFF776FFCD +:100D300006000198FFF783FF0400032D07D1042E5E +:100D400005D1102000F0E7F8B00400F073F8002F90 +:100D500016D10198FFF784FF002811D0231F1CF340 +:100D6000C0E8060F0F0F0F07040F0021102005E049 +:100D70002649A8004018C0780021C00809F321FEC8 +:100D8000FF2201991000FFF715FFFEBD10B504000A +:100D9000C00203D501210220FFF7C0FFA00203D546 +:100DA00001210320FFF7BAFF600203D501210420CF +:100DB000FFF7B4FF200203D501210520FFF7AEFFA6 +:100DC00001200007844205D04010844202D0401028 +:100DD00084421AD1FF208206A11808D0891804D0B5 +:100DE000C206891804D10C2002E00B2000E00A2082 +:100DF000FFF7FAFE022805D0032803D0042801D00B +:100E0000052802D10121FFF789FF10BDBCF400C005 +:100E100013490A6802430A608A6802438A60012013 +:100E200070470F490A6882430A608A6882438A6071 +:100E3000012070470A49C043C8600120704710B5BF +:100E4000074C8034216962690F23DB0199439A437F +:100E5000002801D01A4300E019432161626110BDEE +:100E60008022008083480068416801225204914337 +:100E7000416070477F480068416801225204114375 +:100E8000416070477B480068816B0901090C01D003 +:100E900000207047816B002904DA816B0906090F75 +:100EA000FBD100E0806B01207047724909688A69B4 +:100EB000120C120402438A6170476E480068816B0D +:100EC000C907FCD041680122D203914341607047B9 +:100ED000684909680A6B086348680122D203104315 +:100EE0004860704763480068406A70476149096814 +:100EF00080314A6A0001120F1207000902434A6258 +:100F000070475C480068C06A70475A490968CA69F6 +:100F10008243CA61704757490968CA690243CA6176 +:100F20007047544909680A6A02430A627047514986 +:100F300009680A6A82430A6270474E480068803036 +:100F4000416849084900416070474A48006880305C +:100F50004168012211434160704770B5454D2868D2 +:100F6000803001680122114301600168424C49024E +:100F700005D50168A14301600A2026F056EB2868D8 +:100F8000803001682143016070BD3A48006801006B +:100F900080310A68520852000A60816BC900FCD493 +:100FA00070473448006880300168334A91430160DB +:100FB0007047304800688030C068704770B52D4D6C +:100FC00029680E690C00012109040E4326612100E5 +:100FD00080310E69086148694B618869F020886139 +:100FE000C869CA61A06810210843A060A0682022D7 +:100FF0009043A0602868416B436B8B42FCD0FFF7A5 +:10100000D8FF0028F6D128688168114381604168C3 +:10101000012252031143416070BD164800688030C0 +:10102000006970471348006881682022114381607D +:101030007047104800688168202291431ACA59F10C :1010400001000000F00F000000040000AE802BA79C -:10105000000E10BD002810B501D006F343FA10BDF4 -:1010600038B514006A4606F39DF9009820700020F8 -:1010700038BD10B5040006F3EFF82060002010BD65 -:1010800010B506F3BFF910BD7CB50D001600079A28 -:101090000699002800D1FEE70468002C00D1FEE785 -:1010A000019200913200290020000EF01BFE002862 -:1010B00000D165637CBD10B5416B0EF02AFE10BDFA -:1010C0007CB50C001500069A002800D1FEE70068E8 -:1010D000002800D1FEE70021019200912A002100A2 -:1010E0000EF050FD7CBD10B50EF06BFD10BD00285C -:1010F00010B500D1FEE70068002800D1FEE70EF031 -:10110000D7FD10BD002810D00521C9014218516A31 -:1011100000290AD00B695B1C0B61516ACB685B1C10 -:10112000CB60516A0A6E521C0A66FF306130C17B87 -:1011300080221143C173704770470648142110B5CF -:101140001BF358ED04480121017000218160C1604A -:1011500010BD0000305E02C0FC1C01C09048416818 -:1011600010221143416070477047F1B582B00026EC -:1011700020F082FE00908B4800210068012806D1F3 -:101180008848029A00694369934200D141618648C8 -:101190004468019425001BE0A0008718B868029BF2 -:1011A0004169994206D1761C002120F055FE0020AD -:1011B000B86008E0A900891888600020102D01950A -:1011C00000D0681C05000020102C00D0601C04001A -:1011D000754A00201168102900D0481CA042DBD1BC -:1011E000002E07D070484168A94201D1446001E057 -:1011F000019901606B484068012807D16B4802994A -:10120000006842698A4201D10021416166484C3040 -:10121000446801942500002728E024206043029BB5 -:101220008618F0684169994208D17F1C21F05EFE62 -:1012300030000C3024211BF3DEEC12E02421694342 -:101240008B18D860306918613100180014311430DF -:101250001C221BF39EEC0020372D019500D0681C4A -:1012600005000020372C00D0601C04004E4A0020EE -:101270004C321168372900D0481CA042CDD1002F34 -:1012800008D049484C304168A94201D1446001E08E -:1012900001990160009820F0F3FDFEBDF8B505004E -:1012A000002420F0E9FD3F490A68012A04D10969B8 -:1012B0004969A94200D101243B4F00263B68796867 -:1012C0000BE08A00D21992685269AA4200D1012427 -:1012D0003200102900D04A1C1100002C05D1320028 -:1012E000102B00D05A1C8A42EBD120F0C9FD2000FF -:1012F000F8BD70B50E0004981D0001890C18207807 -:101300004007400F90420FD1E06D2900FF31801D52 -:101310000622723120F0D4FA002805D16820065543 -:101320002100280021F03CFE70BDFFB581B01E00F9 -:101330001C480168012906D1026901A8009207C86A -:101340003300FFF7D6FF184900270D683800102D2D -:1013500000D0681C4C68A04215D00EE01249A000D5 -:101360004018826801A8009207C83300FFF7C1FF48 -:101370003800102C00D0601C04003800102D00D064 -:10138000681CA042EAD105B0F0BD07480021C9435E -:10139000002206C044304260016004498160704709 -:1013A00000A000900400000468020004304400041F -:1013B0000020704710B512F011FC10BD0100FD486F -:1013C00010B5C068072221F02DFB002010BDF8B534 -:1013D0000700F84D0AF388F804000E00F6493800BB -:1013E0000FF365FA0AF380F8041BE86BB1410B00B8 -:1013F0000021001B994100D3EC6BEC63F8BDF1B503 -:1014000084B0EC4CA06A401CA0620AF36DF8EB4F6C -:101410000290FE6A0D00EA48F862EA48406921003D -:101420000190E9481E221C310FF34FFA002802D028 -:10143000A06B401CA063FE62E248806960620AF310 -:1014400053F8029A676B861AA9410D003A521C9B09 +:10105000816070470C49096880310A681F23DB05ED +:10106000C0069A43000902430A6008680122120779 +:101070001043086070470448006880300168FF2210 +:10108000521C11430160704704F200C00000400090 +:1010900038B500240C4D01E08047641CA00028589E +:1010A0000028F9D109480B4902680092084A0A4809 +:1010B0000A4B07F355FC0AF0B4FB09480168002904 +:1010C00001D00020884738BD60B602C0E8F400C0F7 +:1010D000704F00047004000464040004008002C027 +:1010E00008F200C0FEB50D001600089F0A9A099983 +:1010F000002800D1FEE70468002C00D1FEE7029230 +:10110000019132002900200000970EF017FCFEBD6F +:1011100010B506F319FA0006000E10BD10B506F35F +:10112000A5F90006000E10BD002810B501D006F389 +:10113000D9F910BD38B514006A4606F333F90098A2 +:101140002070002038BD10B5040006F385F820603B +:10115000002010BD10B506F355F910BD7CB50D008B +:101160001600079A0699002800D1FEE70468002CB3 +:1011700000D1FEE7019200913200290020000EF01C +:10118000BBFC002800D165637CBD10B5416B0EF03F +:10119000CAFC10BD7CB50C001500069A002800D1D1 +:1011A000FEE70068002800D1FEE7002101920091CF +:1011B0002A0021000EF0F0FB7CBD10B50EF00BFCF8 +:1011C00010BD002810B500D1FEE70068002800D14E +:1011D000FEE70EF077FC10BD002810D00521C901F4 +:1011E0004218116800290AD00B695B1C0B61116859 +:1011F000CB685B1CCB6011680A6E521C0A66FF301C +:101200004130C17980221143C1717047704706484F +:10121000142110B51BF3EEEC0448012101700021EC +:101220008160C16010BD0000305C02C0AC2001C014 +:101230009048416810221143416070477047F1B5F2 +:1012400082B0002620F0F4FC00908B48002100685A +:10125000012806D18848029A00694369934200D167 +:10126000416186484468019425001BE0A00087186E +:10127000B868029B4169994206D1761C002120F092 +:10128000C7FC0020B86008E0A90089188860002029 +:10129000102D019500D0681C05000020102C00D0F6 +:1012A000601C0400754A00201168102900D0481CF9 +:1012B000A042DBD1002E07D070484168A94201D17D +:1012C000446001E0019901606B484068012807D142 +:1012D0006B480299006842698A4201D1002141614C +:1012E00066484C30446801942500002728E02420FB +:1012F0006043029B8618F0684169994208D17F1CBF +:1013000021F09AFD30000C3024211BF374EC12E024 +:10131000242169438B18D8603069186131001800A6 +:10132000143114301C221BF334EC0020372D0195AE +:1013300000D0681C05000020372C00D0601C040081 +:101340004E4A00204C321168372900D0481CA04278 +:10135000CDD1002F08D049484C304168A94201D175 +:10136000446001E001990160009820F065FCFEBD39 +:10137000F8B50500002420F05BFC3F490A68012A0B +:1013800004D109694969A94200D101243B4F0026D3 +:101390003B6879680BE08A00D21992685269AA42C8 +:1013A00000D101243200102900D04A1C1100002C69 +:1013B00005D13200102B00D05A1C8A42EBD120F00C +:1013C0003BFC2000F8BD70B50E0004981D0001899B +:1013D0000C1820784007400F90420FD1E06D290093 +:1013E000FF31801D06224A3120F046F9002805D140 +:1013F000682006552100280021F078FD70BDFFB55A +:1014000081B01E001C480168012906D1026901A8AB +:10141000009207C83300FFF7D6FF184900270D6870 +:101420003800102D00D0681C4C68A04215D00EE08A +:101430001249A0004018826801A8009207C8330032 +:10144000FFF7C1FF3800102C00D0601CF30C4DA03A :1014500001000000EC1300000004000011450E1410 -:101460007A1C0020206B616B002348430021801907 -:1014700069411BF30CE92063606B401C6063E06A08 -:101480000021801BA94100D3E66AE662E069216A77 -:10149000884201D9E06900E0206A2062049A01993B -:1014A000CE481143884301D0FFF79BFFA26BE16A4E -:1014B000112019F031F905B0F0BDC94800880028A5 -:1014C00004D0C84901200978042900D000207047C1 -:1014D00020207DE7F8B50024BB4D6868002801D1C5 -:1014E0002000F8BD20F0D2FC0090A86901273B0045 -:1014F000002800D00023002039008140AA690E0096 -:10150000164202D10C000A43AA61401C002C01D1F2 -:101510001F28F1DD002B04D010F3D5FCFF20FFF7CE -:1015200078FF009820F0B6FCDAE770B5040020F0F0 -:10153000ADFC0500A44800224168002901D12260C9 -:1015400070BD2368816999438161226007D1FF20C2 -:10155000FFF747FF10F3AFFC0120FFF739FF28002A -:1015600020F098FC70BD38B5040041696A4622F04D -:1015700097FF002802D12000FFF726FF002802D1A4 -:1015800020001CF303F838BD38B505228E4C00212D -:10159000E06821F051FA944805220068002121F00A -:1015A0004BFA02E000981BF3F1FF206904220023AC -:1015B000694621F03DFA0F28F4D18C4800250570CA -:1015C0008B4812211BF320EB8A4825700560002010 -:1015D00038BD60235843884A10B58418A088E28833 -:1015E000824201D1012010BD8200A21892680A60D7 -:1015F0001421401C1BF3BCEFA180A06D401EA06510 -:10160000002010BD70B50C00417A160002290AD1E5 -:1016100006F0A9F8012806D130001C3802210AF092 -:10162000B2FA01280BD06021614373480C18E58899 -:101630001421681C1BF39CEFA088884201D1012073 -:1016400070BDA80020188660E180A06D401CA065D8 -:10165000002070BD6848602110B51BF3D6EA5A49D6 -:101660000020486110BD001F10B50406240E042C94 -:1016700013D2602060436049401860211BF3C4EA24 -:10168000514A01205169A04008431021A140014363 -:10169000FF20401CA0408143516110BDF8B5041FDC -:1016A000042C24D220F0F2FB0600474DFF20401C02 -:1016B0006969A04008420AD003E000981C3821F074 -:1016C00099FC20006946FFF784FF0028F5D0FF2130 -:1016D00012316869A14088436861602060434649CF -:1016E000401860211BF390EA300020F0D3FBF8BDD6 -:1016F000F8B5041F042C25D220F0C8FB0600324D9B -:10170000FF20401C6969A04008420BD004E000980B -:1017100000211C3820F0AAFB20006946FFF759FF82 -:101720000028F4D0FF2112316869A1408843686124 -:10173000602060433049401860211BF366EA3000A6 -:1017400020F0A8FBF8BDF8B5002425002A4EFF279D -:101750007F1C602060431C49355438004969A04013 -:10176000084202D00120FFF733FE641C042CF0DB9A -:10177000F8BDF8B5050020F089FB06001F49204898 -:1017800025F09EEFFFF7A6FE00902800FFF7F7FC7C -:1017900000242006000E290011F0CCFE641C042C4D -:1017A000F7DB6846FFF7C1FE300020F073FBF8BDA1 -:1017B0000B480088002805D00A480178032901D188 -:1017C00004210170704700002C7C0200FFFF000024 -:1017D000C0A60080FF7FFF7F40A20080FF030000C3 -:1017E000C43B01C0ADF100C0887C020028000004A9 -:1017F000FC4500047C7C02007C4400041111FFFFC6 -:10180000BBBBBBBBFF49002048607047FD490020BF -:1018100088607047F7B582B00600FA4DA8680028C6 -:101820004AD1FF21F84800222D311BF3D9FE0400D4 -:1018300042D001200221A86021736661617B0143CF -:10184000F2486173A061AC202081FF207930825B77 -:10185000EF480092006832000379BB204ED1F58A30 +:1014600004003800102D00D0681CA042EAD105B05D +:10147000F0BD07480021C943002206C04430426045 +:10148000016004498160704700A000903C040004A2 +:1014900098060004504400040020704710B512F074 +:1014A000EBF910BD0722010010B5FF48406921F09B +:1014B00069FA002010BDF7B584B000242500FC486F +:1014C0000194FA4E42690499430619430A43426162 +:1014D000F74980310A6907231B041A430A61F44B58 +:1014E000C0331968082291431960F2490B6893438D +:1014F0000B60806902900AF301F80090EE480F003B +:10150000FEF73CFEE8482AE009F3F8FF009A0023C2 +:10151000801AE54AB941D1649064E84A121A8B41B5 +:1015200009D2E1488168491C8160E1494869049A0F +:101530009043486116E0DE486D1C80690290E048E7 +:1015400000697F214905084003D001214905411A5E +:1015500003D1864201D1641C00E0002406000698F5 +:101560008442D1D3D04E0120B1680004002907DDA8 +:1015700006998C42F16801D3491C00E00918F1601A +:10158000FEF7FCFD09F3BAFF009A801AB941F16435 +:10159000B06402990498884301D001200190C549A4 +:1015A0000868082210430860C149C0310868104328 +:1015B0000860BF4A8032116907200004814311612D +:1015C00005980560019807B0F0BDF8B50700B64D65 +:1015D00009F394FF0E00B8490400F13938000FF305 +:1015E00070F909F38BFF041B686CB1410B000021FB +:1015F000001B994100D36C6C6C64F8BDF1B584B0EC +:10160000A94C206B401C206309F378FFA94F0D0003 +:10161000403F0290FE6AAB48F862A548406921004D +:101620000190A9481E222431FFF745FF002802D06F +:10163000206C401C2064FE629D488069E06209F3D2 +:101640005DFF029AE76B861AA9410D007A1C002003 +:10165000A06BE16B002348430021801969411BF313 +:1016600016E8A063E06B401CE063606B0021801B08 +:10167000A94100D3666B6663606AA16A884201D99A +:10168000606A00E0A06AA062049A01998E48114342 +:10169000884301D0FFF799FF226C616B112018F08D +:1016A000BFFE05B0F0BD89480088002804D08849F5 +:1016B00001200978042900D0002070472020F1E69D +:1016C000F8B50024784D6868002801D12000F8BDE5 +:1016D00020F0B8FA0090286A01273B00002800D0CB +:1016E00000230020390081402A6A0E00164202D1F0 +:1016F0000C000A432A62401C002C01D11F28F1DD96 +:10170000002B04D010F3DFFBFF20FFF777FF0098DA +:1017100020F09CFADAE770B5040020F093FA050097 +:10172000614800224168002901D1226070BD236810 +:10173000016A99430162226007D1FF20FFF745FF4C +:1017400010F3B9FB0120FFF7ADFE280020F07EFA70 +:1017500070BD38B5040041696A4622F06DFE00286C +:1017600002D12000FFF79AFE002802D120001BF3CF +:101770000DFF38BD38B505224B4C0021606921F0C2 +:1017800001F9544805220068002121F0FBF802E02D +:1017900000981BF3FBFEA06904220023694621F098 +:1017A000EDF80F28F4D14C48002505704B48122164 +:1017B0001BF32AEA4A4865700560002038BD6023A3 +:1017C0005843484A10B58418A088E288824201D163 +:1017D000012010BD8200A21892680A601421401CEA +:1017E0001BF3C6EEA180A06D401EA065002010BDB9 +:1017F00070B50C00417A160002290AD105F07FFE6F +:10180000012806D130001C3802210AF05CF80128BA +:101810000BD06021614333480C18E5881421681C03 +:101820001BF3A6EEA088884201D1012070BDA8005C +:1018300020188660E180A06D401CA065002070BD6E +:101840002848602110B51BF3E0E917490020C86162 +:1018500010BD001F10B50406240E042C95F84B3B58 :1018600001000000E817000000040000429FDD783E -:1018700080003118A23220000EF39BFE07001C20CE -:1018800025182081702128001BF3C8E9280060304A -:101890000499019041723000EF6512F0C2FAE34AF8 -:1018A000A8701279E049920605D4002803D0A868F0 -:1018B0004A071043A860019803220272200012F028 -:1018C00015FA002805D120001BF36AFE002005B0A0 -:1018D000F0BD0120FBE7FFB587B0070000200490B2 -:1018E0000A98002803D0CC48406800287ED1FF2405 -:1018F0002D3402E00120FFF7C1FB2100380004F085 -:10190000FCFC0500F6D028894619380023F094FC29 -:10191000002801D00C2000E00420BB210590387A7B -:1019200089003A007918A2320628019200910AD162 -:101930001300059ACF33022130000EF377FEF078C2 -:101940004008400008E01300059A022130000EF321 -:101950006DFEF07801210843F070F078EF21084027 -:1019600008992C00C907C90E0843F070FF20C01C5D -:101970003071000A70710020307070701C20288156 -:1019800002202900287330311C340391702120007B -:101990001BF344E9210060311198069177284872C1 -:1019A00001D0782804D1A068012149060843A0602D -:1019B000E6650A9800280AD00120C0079649A06071 -:1019C00001204860697B014399486973A861002040 -:1019D000208005980C2821D10999380023F038FC83 -:1019E00041072078490FC008C00000E06CE00843C0 -:1019F00041072070490F380023F046FD0101E06DDA -:101A0000028B1207120F0A430283E06D017E09095F -:101A10000901017620789F2108402070099A210051 -:101A20003800002323F042FC1098804E002806D195 -:101A3000069909200872380012F0F3F91FE000211E -:101A4000380016F0D1FF0328A0701CD93079C006E9 -:101A500004D576484030807D40060CD5787A02283F -:101A600011D1032000023818806813214901401861 -:101A70000079000707D50321380012F07EF9A07025 -:101A80000120000304903079800607D4A078002854 -:101A900004D0A068012189070843A0600399049835 -:101AA000C8613900280002AA22F004FD01280BD0E9 -:101AB0000499280012F01AF9002805D128000CF02A -:101AC000DBFA28001BF36CFD0BB0F0BDFFB5FF2166 -:101AD0002D31060085B004F010FC07007ED03000E8 -:101AE000FF30317A72300129049002D0707A0228D6 -:101AF00004D10499300023F093FB02E0300023F07E -:101B00009BFB6B460390187EF32108400830187643 -:101B10000399002903D00007000FC03002E000073E -:101B2000000F40306B46187638893200C519BB204B -:101B30008000A2323118019200911C7E049B200784 -:101B4000810F220928000EF371FDFF20C01C2871AF -:101B5000000A68716B46AC70587EE870707A022893 -:101B60000DD10221300025F0BAEDE9788A06D20FB6 -:101B70001043C007DF22800E11400143E9701C2092 -:101B800038813C183800BD6708997C3041720E9945 -:101B900001720398002835D06B46988B2080707AAC -:101BA000032820D130001CF061FC0100300023F03C -:101BB0004FFB41072078490FC008C0000843410788 -:101BC0002070490F300023F06FFC0101E06D028BA3 -:101BD0001207120F0A430283207800E033E09F21AE -:101BE000084020700EE00C4A50880101401C5080D3 -:101BF000687E2A7E000210430007000F0843287603 -:101C0000000A68760021300016F0EEFEA0700898F9 -:101C100031281BD002AA0DE00C1D01C06800000491 -:101C200099170000ECF500C002140000365C0004B7 -:101C3000911700003100380022F03CFC012805D14A -:101C4000029800280CD0012009B0F0BD0021380016 -:101C500012F04CF8012803D038001BF3A1FCF2E786 -:101C60000020F1E70200894810B500681D3104B278 +:1018700013D2602060432049401860211BF3CEE959 +:101880000E4A0120D169A04008431021A140014324 +:10189000FF20401CA0408143D16110BDF8B5041F5A +:1018A000042C45D220F0D8F90600044DFF20401C3E +:1018B000E969A04008422BD024E00000D0030004D6 +:1018C0004523010040A2008000A70080F000010035 +:1018D000A086010080A80080FF7FFF7FFF0300003B +:1018E0005C3A01C005F400C0E87C0200600400041A +:1018F0001C460004DC7C02009C44000400981C3858 +:1019000021F028FB20006946FFF763FF0028F5D08F +:10191000FF211231E869A1408843E86160206043FB +:101920003949401860211BF37AE9300020F098F91A +:10193000F8BDF8B5041F042C25D220F08DF906005F +:10194000324DFF20401CE969A04008420BD004E062 +:10195000009800211C3820F06FF920006946FFF73D +:1019600038FF0028F4D0FF211231E869A1408843F4 +:10197000E861602060432449401860211BF34EE970 +:10198000300020F06DF9F8BDF8B5002425001E4E9A +:10199000FF277F1C602060431C4935543800C9690B +:1019A000A040084202D00120FFF786FD641C042CF1 +:1019B000F0DBF8BDF8B5050020F04EF9060014493B +:1019C000144825F0C2EEFFF785FE00902800FFF7CF +:1019D0004AFC00242006000E290011F0F5FB641CCF +:1019E000042CF7DB6846FFF7A0FE300020F038F942 +:1019F000F8BD09480088002805D008480178032967 +:101A000001D10421017070479C440004D0030004FC +:101A10001111FFFFBBBBBBBB5C3A01C005F400C0AA +:101A2000FF49002048607047FD49002088607047EA +:101A3000F7B582B00600FA4DA86800284AD1FF2108 +:101A4000F84800222D311BF3D5FD040042D00120BF +:101A50000221A86021736661617B0143F2486173D2 +:101A6000A061AC202081FF205130825BEF480092C2 +:101A70000068320003795920C00031187E322000FE +:101A80000EF397FD07001C202518208170212800E7 +:101A90001BF3C4E8280060300499019041723000C3 +:101AA000EF6512F004F8E34AA8701279E049920653 +:101AB00005D4002803D0A8684A071043A8600198FD +:101AC00003220272200011F055FF002805D12000EA +:101AD0001BF366FD002005B0F0BD0120FBE7FFB55C +:101AE00087B00700002004900A98002803D0CC4853 +:101AF000406800287ED1FF242D3402E00120FFF74A +:101B000027FB2100380004F0BCFA0500F6D0288934 +:101B10004619380023F08EFB002801D00C2000E08D +:101B2000042059210590387AC9003A0079187E328C +:101B30000628019200910AD11300059ACB330221A5 +:101B400030000EF373FDF0784008400008E0130009 +:101B5000059A022130000EF369FDF0780121084357 +:101B6000F070F078EF21084008992C00C907C90EE1 +:101B70000843F070FF20C01C3071000A7071002013 +:101B8000307070701C2028810220290028733031A9 +:101B90001C340391702120001BF340E821006031C8 +:101BA000119806917728487201D0782804D1A0684E +:101BB000012149060843A060E6650A9800280AD07A +:101BC0000120C0079649A06001204860697B01435D +:101BD00099486973A8610020208005980C2821D1BC +:101BE0000999380023F032FB41072078490FC008DB +:101BF000C00000E06CE0084341072070490F380046 +:101C000023F040FC0101E06D028B1207120F0A4322 +:101C10000283E06D017E09090901017620789F2188 +:101C200008402070099A21003800002323F03CFB73 +:101C30001098804E002806D10699092008723800B5 +:101C400011F035FF1FE00021380016F09DFD03283C +:101C5000A0701CD93079C00604D576484030807D0C +:101C600040060CD5787A022811D10B20A308D1D1D7 :101C700001000000E41B000000040000B6F0A8CC46 -:101C800004210023FFF74DFA002804D10220FFF7BA -:101C9000B3FB002010BD012010BD70B50400814DC4 -:101CA00028680079A04201D000F073FB2868047115 -:101CB0007D48446170BD10B522F041FD002801D17E -:101CC000012010BD002010BD784970B50125096BB9 -:101CD000490719D5FF2804D1002412F088FA010021 -:101CE00001E001000400724B1E1F0AE0E000C21870 -:101CF000126880190068824200D00025641C012D02 -:101D000008D18C42F2D905E06A48816AC06A8142F2 -:101D100000D00025280070BDFF2010B5FFF7D4FFCC -:101D2000002801D012F0EEF810BD634870B50078BD -:101D300000284BD1614800220068082109F3C1FB4B -:101D4000002843D1FFF7E8FF00283FD05C4806F3A6 -:101D500074FE04005A48082106F3FEFD05005848A9 -:101D6000102106F3F9FD281884422FD1554806F3B7 -:101D700064FE04005348082106F3EEFD05005148B7 -:101D8000102106F3E9FD281884421FD14E4806F3BE -:101D900054FE04004C48082106F3DEFD05004A48C5 -:101DA000102106F3D9FD281884420FD1474806F3C5 -:101DB00044FE04004548082106F3CEFD05004348D3 -:101DC000102106F3C9FD2818844201D0002070BDFF -:101DD000012070BD70B501200BF0F6FA00285ED12D -:101DE0003B4C354D354E08E02078401C20700120DA -:101DF000FFF702FB0120FFF74BF928780028F3D109 -:101E000030680022082109F35CFB0028ECD102E0D5 -:101E10000120FFF73DF9FFF77FFF0028F8D02848A1 -:101E200006F30BFE04002648082106F395FD050085 -:101E30002348102106F390FD28188442E8D1214858 -:101E400006F3FBFD04001F48082106F385FD05008D -:101E50001C48102106F380FD28188442D8D11A4866 -:101E600006F3EBFD04001848082106F375FD050094 -:101E70001548102106F370FD28188442C8D1134874 -:101E800006F3DBFD04001148082106F365FD05009B -:101E90000E48102106F360FD28188442B8D170BDA9 -:101EA0003C7C0200ECF500C040A6008040A300800E -:101EB00034A9008000A000802800000480EF00C04A -:101EC0002C0000046800000448010004F80000042D -:101ED0000C1D01C0FF30853089080E2210B516F3A5 -:101EE00028FF800010BD10B504000C235843FF49A3 -:101EF000401800210A000B000EC0200010F372F9F8 -:101F0000200010F37AF9200010F361F910BDF7B545 -:101F100086B004001600F64A0025009207983100AA -:101F200004AA03AB04950EF352F96B46187C001F0C -:101F3000032859D83006000E05901BF3EBFF1BF366 -:101F4000FAFF0600607A032806D16B461B7B0599D1 -:101F5000320020001CF0A3FA6B46187C31001CF004 -:101F600021FB1FF0A7FF0700FFF7C8FA6B4602909E -:101F7000187BA423DD4958433031401880306B462C -:101F80000576DC4A187C68390EF3D7F86B46197C65 -:101F9000187B11F330FC6B46187CFFF793FB6B4604 -:101FA000187C059A31002300FFF7DDF96B46197B99 -:101FB000300011F32EFB6B46187C2200310011F02B -:101FC0000DFB02A8FFF7C5FA38001FF077FF6B463C -:101FD000197B079A200012F07AFD6B46187BFFF7F9 -:101FE00082FF012009B0F0BD0020FBE7F7B584B007 -:101FF00005001600BE4A009200240598310003AA8D -:1020000002AB03940EF3E3F8BC4FBB49380025F054 -:102010006CEB6B46187B001F032847D8F913380078 -:1020200025F062EB3006000E1BF374FF1BF383FFF9 -:1020300001006B46187B1CF0B5FA1FF03BFF060051 -:10204000FFF75CFA6B460190187AA423A74958431E -:102050003031401880306B460476A64A187B6839C8 -:102060000EF36BF86B46197B187A11F3C4FB6B46C1 -:10207000187BFFF751FB2800FFF795F8D7B7E3A5CA +:101C800080013818006A13214901401800790007C3 +:101C900007D50321380011F0BEFEA070012000031B +:101CA00004903079800607D4A078002804D0A0687A +:101CB000012189070843A06003990498C86139008D +:101CC000280002AA22F0CCFB01280BD0049928009E +:101CD00011F05AFE002805D128000CF03DF828002C +:101CE0001BF368FC0BB0F0BDFFB5FF212D310600E2 +:101CF00085B004F0D0F907007ED03000FF30317A93 +:101D00004A300129049002D0707A022804D1049943 +:101D1000300023F08EFA02E0300023F095FA6B4693 +:101D20000390187EF32108400830187603990029A3 +:101D300003D00007000FC03002E00007000F403062 +:101D40006B46187638893200C5195920C0007E329A +:101D50003118019200911C7E049B2007810F2209FB +:101D600028000EF36DFCFF20C01C2871000A68716A +:101D70006B46AC70587EE870707A02280DD1022153 +:101D8000300025F0F0ECE9788A06D20F1043C00746 +:101D9000DF22800E11400143E9701C2038813C187D +:101DA0003800BD6708997C3041720E990172039822 +:101DB000002835D06B46988B2080707A032820D17C +:101DC00030001CF0C1F90100300023F049FA41074E +:101DD0002078490FC008C000084341072070490F10 +:101DE000300023F069FB0101E06D028B1207120F36 +:101DF0000A430283207800E033E09F2108402070EE +:101E00000EE00C4A50880101401C5080687E2A7EFA +:101E1000000210430007000F08432876000A687686 +:101E20000021300016F0BAFCA070089831281BD0B1 +:101E300002AA0DE0BC2001C0A8040004A119000002 +:101E400034F800C0021400003A5C00049919000044 +:101E50003100380022F004FB012805D10298002847 +:101E60000CD0012009B0F0BD0021380011F08CFD2C +:101E7000012803D038001BF39DFBF2E70020F1E7B7 +:101E80000200894810B5006804210023FFF7B3F968 +:101E9000002804D10220FFF719FB002010BD01200B +:101EA00010BD70B50400814D28680079A04201D0B2 +:101EB00000F073FB286804717D48446170BD10B563 +:101EC00022F009FC002801D1012010BD002010BD26 +:101ED000784970B50125096B490719D5FF2804D148 +:101EE000002411F0B6FF010001E001000400724B74 +:101EF0001E1F0AE0E000C2181268801900688242C2 +:101F000000D00025641C012D08D18C42F2D905E0D7 +:101F10006A48816AC06A814200D00025280070BDED +:101F2000FF2010B5FFF7D4FF002801D011F002FE0A +:101F300010BD634870B5007800284BD1614800227D +:101F40000068082109F3BDFA002843D1FFF7E8FF34 +:101F500000283FD05C4806F370FD04005A48082171 +:101F600006F3FAFC05005848102106F3F5FC281882 +:101F700084422FD1554806F360FD040053480821E0 +:101F800006F3EAFC05005148102106F3E5FC281889 +:101F900084421FD14E4806F350FD04004C480821EE +:101FA00006F3DAFC05004A48102106F3D5FC281890 +:101FB00084420FD1474806F340FD040045480821FC +:101FC00006F3CAFC05004348102106F3C5FC281897 +:101FD000844201D0002070BD012070BD70B5012089 +:101FE0000BF089F800285ED13B4C354D354E08E0AA +:101FF0002078401C20700120FFF768FA0120FFF7CD +:10200000B1F828780028F3D130680022082109F3BC +:1020100058FA0028ECD102E00120FFF7A3F8FFF7FF +:102020007FFF0028F8D0284806F307FD0400264863 +:10203000082106F391FC05002348102106F38CFCCF +:1020400028188442E8D1214806F3F7FC04001F4811 +:10205000082106F381FC05001C48102106F37CFCD6 +:1020600028188442D8D11A4806F3E7FC040018481F +:10207000082106F371FC050015481021F3AD0C1B77 :1020800001000000E01F000000040000E52A7BA022 -:102090006B46187A11F361FB6B46187B290011F02F -:1020A00067FA01A8FFF75FFA30001FF011FF6B46D7 -:1020B000197A059A280012F014FD012007B0F0BD2E -:1020C0000020FBE7F8B50D00060000241FF0FCFE21 -:1020D0008C4A07002906090E603230001BF37EFC93 -:1020E0000A280DD2874A002100016032115480185D -:1020F000C1602900300011F3D2FC0BF00FF901246C -:1021000038001FF0E5FE2000F8BDF0B50500002006 -:1021100085B0019008780C000007400F16D111F32C -:1021200061F90700042811D077480EF342F8060041 -:10213000401C0BD03806000E3106090E0200049038 -:102140000F00200011F30BFA002802D1002005B087 -:10215000F0BD687A022831D1280022F099FF1321BE -:1021600049014018807B800706D56320405D8007C9 -:10217000002801DA012001900199049811F060FA19 -:10218000220004991432280012F095FC201D1AF345 -:1021900000EE0006000E1BF3C7FE1BF3D6FE0290F6 -:1021A000687A03280DD1201D1AF3F2ED0106049B75 -:1021B000090E3A0028001CF07CF908E0E8680006E7 -:1021C000D6E7022803D1029930001CF0FFF9022063 -:1021D0001BF3BBFE010030001CF0EEF94D484E4AE7 -:1021E000416A029840003030085A904200D1886A13 -:1021F0000104090C380011F0CAFA380011F3C6FBCB -:10220000300011F3B5FB3E4A0120B100383A50507E -:102210003C4A0092049A3B00210028000DF3C8FEBE -:102220003800FFF73EFA1FF04FFE0600FFF770F987 -:102230000390201D1AF3ACED02060298120E2B003B -:102240003900FFF79AF8201D1AF3A2ED0206029951 -:10225000120E2B00380011F0D7F903A8FFF783F90D -:1022600030001FF035FE012071E7F3B581B00600A4 -:102270001FF02AFE234F0024009018206043395C91 -:1022800000290BD0C51968781BF34EFE1BF35DFEC9 -:10229000B04203D1E878029911F079FA641C24065F -:1022A000240E042CE9D300981FF012FEFEBDF8B5F1 -:1022B0000025144F18206843395C002933D0C41915 -:1022C000201D22F05EFF06002DD061780022300034 -:1022D0000BF071FA6B46198800010907090F0143D9 -:1022E00000911878000900011870A078009911F386 -:1022F00002F96B46188800096081002020730DE008 -:1023000000820200C8800200707C02006666FFFF47 -:10231000BBBBBBBBE4580004FFFF00006073290097 -:10232000300001F0F7F96D1C2D062D0E042DC1D3E0 -:10233000F8BD70B505000C000FF369FF0C2169436F -:102340004E4B5A5812185A50226070BD70B5050095 -:102350000C000FF351FF0C226A43484951188A6858 -:1023600012188A60226070BD70B505000C000FF372 -:1023700038FF0C226A43414951184A6812184A60D2 -:10238000226070BD10B504001FF09EFD3C4A012183 -:102390001368A140194311601FF09AFD01208002CB -:1023A000FFF734F810BD36490F2010B50860012042 -:1023B0008002FFF72BF810BD70B51FF085FD2F4D83 -:1023C00000212F4E0C0030353268D30704D0A423EF -:1023D0004B435B1980331C765208491C0429326038 -:1023E000F2D31FF075FD70BDA4232449584330314A -:1023F00040187047F7B505000026204F34003037ED -:10240000A4206043C0198030017E01291ED1697863 -:10241000027D91421AD12978827D914216D1297B81 -:10242000427D914212D1C17D002902D1697BC9064A -:1024300008D501690198FF31723106221FF068FA50 -:10244000002803D102980126047002E0641C042CC9 -:10245000D6D33000FEBD30B51C00A4235843074B33 -:102460004D783033C018030080331D750D789D758D -:102470001A61097B5975DC7530BD000000820200CD -:102480006C7C0200F8B503242600032861C2FF8B90 +:1020900006F36CFC28188442C8D1134806F3D7FC19 +:1020A00004001148082106F361FC05000E481021C8 +:1020B00006F35CFC28188442B8D170BDE803000424 +:1020C00034F800C040A6008040A3008034A90080FE +:1020D00000A0008060040004F0F100C0640400046B +:1020E000A80400048805000438050004BC2001C0D1 +:1020F000FF305D3089080E2210B516F324FE8000F3 +:1021000010BD10B504000C235843FF4940180021AE +:102110000A000B000EC0200010F36EF8200010F330 +:1021200076F8200010F35DF810BDF7B586B0040016 +:102130001600F64A002500920798310004AA03AB66 +:1021400004950EF34EF86B46187C001F032859D8EF +:102150003006000E05901BF3E7FE1BF3F6FE0600AB +:10216000607A032806D16B461B7B0599320020005C +:102170001CF003F86B46187C31001CF081F81FF04E +:102180007FFD0700FFF7BAFA6B460290187BA42385 +:10219000DD4958433031401880306B460576DC4AC3 +:1021A000187C68390DF3D3FF6B46197C187B11F34B +:1021B0002CFB6B46187CFFF785FB6B46187C059A59 +:1021C00031002300FFF743F96B46197B300011F310 +:1021D0002AFA6B46187C2200310011F049F802A857 +:1021E000FFF7B7FA38001FF04FFD6B46197B079ACF +:1021F000200012F0C5FA6B46187BFFF782FF012022 +:1022000009B0F0BD0020FBE7F7B584B0050016006B +:10221000BE4A009200240598310003AA02AB039441 +:102220000DF3DFFFBC4FBB49380025F0A2EA6B4637 +:10223000187B001F032847D8F913380025F098EAC7 +:102240003006000E1BF370FE1BF37FFE01006B4691 +:10225000187B1CF015F81FF013FD0600FFF74EFA6F +:102260006B460190187AA423A7495843303140188F +:1022700080306B460476A64A187B68390DF367FFF9 +:102280006B46197B187A11F3C0FA6B46187BFFF77F +:1022900064FB2800FEF7FBFF6B46187A11F35DFA2A +:1022A0006B46187B290010F0A3FF01A8FFF751FA35 +:1022B00030001FF0E9FC6B46197A059A280012F0ED +:1022C0005FFA012007B0F0BD0020FBE7F8B50D0074 +:1022D000060000241FF0D4FC8C4A07002906090ED2 +:1022E000603230001BF37AFB0A280DD2874A0021A6 +:1022F0000001603211548018C1602900300011F3D0 +:10230000CEFB0AF09CFE012438001FF0BDFC20002B +:10231000F8BDF0B50500002085B0019008780C00EC +:102320000007400F16D111F35DF80700042811D003 +:1023300077480DF33EFF0600401C0BD03806000E18 +:102340003106090E020004900F00200011F307F976 +:10235000002802D1002005B0F0BD687A022831D1F2 +:10236000280022F08DFE132149014018807B800750 +:1023700006D56320405D8007002801DA0120019026 +:102380000199049810F09CFF22000499143228004F +:1023900012F0E0F9201D1AF3FCEC0006000E1BF30E +:1023A000C3FD1BF3D2FD0290687A03280DD1201DD6 +:1023B0001AF3EEEC0106049B090E3A0028001BF00C +:1023C000DCFE08E0E8680006D6E7022803D102999F +:1023D00030001BF05FFF02201BF3B7FD010030004F +:1023E0001BF04EFF4D484E4A416A02984000303083 +:1023F000085A904200D1886A0104090C380011F093 +:1024000006F8380011F3C2FA300011F3B1FA3E4A6F +:102410000120B100383A50503C4A0092049A3B00E7 +:10242000210028000DF3C4FD3800FFF730FA1FF03B +:1024300027FC0600FFF762F90390201D1AF3A8ECB1 +:1024400002060298120E2B003900FFF700F8201D3B +:102450001AF39EEC02060299120E2B00380010F0BF +:1024600013FF03A8FFF775F930001FF00DFC0120E2 +:1024700071E7F3B581B006001FF002FC234F002482 +:10248000009018206043395C00290BD025C8F24920 :1024900001000000DC23000000040000CDBBFE1D95 -:1024A00001D1002437E0032835DA0400461C32E06D -:1024B000FC4861010A1882206043FB4B95680021AB -:1024C000C0188173C173417CF84B4906490E4174B1 -:1024D00001211888A14088431880202110001AF398 -:1024E000BCEB002D16D00B2080012F18B86B0021FB -:1024F000C943E030C183280000F0E0FA002804D08E -:10250000E868012109048843E860B86BE030C18BBA -:10251000E6488160641CB442CADBF8BDF0B50C002B -:1025200007000120002985B003D10320FFF7B4FF85 -:1025300073E0E178A278090211430A00FF3A193AE0 -:102540006CD1617A4D066D0E032D67DAD54A6901AB -:10255000891803918968002901D0B9425ED1E07AD7 -:10256000A17A000208430B21890179180028029101 -:1025700003D12800FFF790FF49E082216943CA4850 -:102580000E186079217902020A433000921D210061 -:1025900008301AF3C6EAF17BB27B080210437D23B0 -:1025A000DB0058430090C1170191082230006946B2 -:1025B0001AF3B6EA039820211AF34EEB0398BB49AD -:1025C000876001200A88A84010430880607AC0090B -:1025D0001DD0F07BB17B0002084318D0F8680121C0 -:1025E00009040843F860F07BB27B010202981143B2 -:1025F000846BE01DF93000691AF3E2EFE034E18BFF -:10260000AB4A0004000C914200D00818E083029805 -:10261000806BE030C18BA5488160002005B0F0BD23 -:10262000F8B506009F4F0024822161439E48081898 -:10263000C17B827B0802104307D06001C519A868DE -:10264000B04202D10FF338FB03C5641C032CEBDB53 -:10265000F8BD032010B5FFF71FFF9248002160303E -:102660000A000B000EC00EC0080090494860886048 -:10267000C86010BDF0B5002089B0040007900FF3CA -:102680001BFB0E00069082216143874808180890C2 -:10269000C27B817B1002084345D0824861010D183E -:1026A0002A6806986B683100801A994106D32A6817 -:1026B00006986B683100801A994106E028686968BD -:1026C000069AC043C943801871417D220023D2007D -:1026D0001AF304E8049006980F0041C508220899EF -:1026E00002A81AF31EEA02A807C83B00121A8B417F -:1026F00010D20899082202A81AF312EA02A807C801 -:10270000801AB941019100900898082269461AF38D -:1027100008EA08E00898082266A11AF302EA079876 -:10272000012108430790641C032CACD3079809B01F -:10273000F0BDF3B581B08E1C0A2700245948610111 -:10274000081881680198814217D182216143564857 -:102750000D18687B297B02020A432900121D0A31E9 -:1027600030001AF3DEE9687B297B00020843361D3E -:1027700086193F1DC01907043F0C641C032CDDDBC8 -:102780003800FEBDF8B5420182234649584354182B -:102790004549A6684018407CC0094042304256D0A6 -:1027A0000B2080013518A86B414AFF30401C01887E -:1027B00091424CD02269A169914235D8E1686069A3 -:1027C00088423AD90FF378FAAB6B384FFF335B1C72 -:1027D0001A88521C1204120C1A80AB6B7A609C4649 -:1027E000FF335B1C002A28D0344F1A6957436246D6 -:1027F000FF3209320CCA801A994100233A1A8B41E0 -:102800001BD22A490122C8680223401CC860A86B59 -:102810000021FF30C943401C01803100FF3172317B -:10282000300017F023F908E0002101800FF344FA8B -:10283000AA6BFF32521CD16090606069E060A069B1 -:102840002061A86BFF30401C018818484160F8BD2A -:10285000F7B582B00D0014000298410111480F181D -:10286000BE68002D7ED0002C7CD0002E7AD002983D -:10287000FFF788FFFF21124800222D311AF3D8FEFE -:102880000028206008D1FF210E4800222D311AF3C4 -:10289000CFFE0028206065D0687AC0099217CC4628 +:1024A000C51968781BF34AFD1BF359FDB04203D1EF +:1024B000E878029910F0B5FF641C2406240E042C61 +:1024C000E9D300981FF0EAFBFEBDF8B50025144FD4 +:1024D00018206843395C002933D0C419201D22F02C +:1024E00059FE06002DD06178002230000BF00BF869 +:1024F0006B46198800010907090F014300911878FC +:10250000000900011870A078009910F3FEFF6B46D7 +:10251000188800096081002020730DE054810200BA +:102520001C800200D07C02006666FFFFBBBBBBBB09 +:10253000F0580004FFFF000060732900300001F034 +:10254000E8F96D1C2D062D0E042DC1D3F8BD70B514 +:1025500005000C000FF365FE0C2169434E4B5A58E1 +:1025600012185A50226070BD70B505000C000FF3B0 +:102570004DFE0C226A43484951188A6812188A6035 +:10258000226070BD70B505000C000FF334FE0C2204 +:102590006A43414951184A6812184A60226070BD66 +:1025A00010B504001FF076FB3C4A01211368A140DE +:1025B000194311601FF072FB01208002FEF79AFFA1 +:1025C00010BD36490F2010B5086001208002FEF7CB +:1025D00091FF10BD70B51FF05DFB2F4D00212F4EF8 +:1025E0000C0030353268D30704D0A4234B435B1969 +:1025F00080331C765208491C04293260F2D31FF044 +:102600004DFB70BDA4232449584330314018704716 +:10261000F7B505000026204F34003037A420604372 +:10262000C0198030017E01291ED16978027D914256 +:102630001AD12978827D914216D1297B427D91421F +:1026400012D1C17D002902D1697BC90608D5016973 +:102650000198FF314A3106221FF040F8002803D1CB +:1026600002980126047002E0641C042CD6D33000CA +:10267000FEBD30B51C00A4235843074B4D783033C2 +:10268000C018030080331D750D789D751A61097B94 +:102690005975DC7530BD000054810200CC7C02000D +:1026A000F8B503242600032801D1002439E00328CB +:1026B00037DA0400461C34E0FC4861010A18822025 +:1026C0006043FB4B95680021C0188173C173417C46 +:1026D000F84B4906490E417401211888A1408843EE +:1026E0001880202110001AF3B8EA002D18D00B2012 +:1026F00080012F1878690021FF30C94321304181C2 +:10270000280000F0DFFA002804D0E868012109045D +:102710008843E8607869FF3021304189E54881606D +:10272000641CB442C8DBF8BDF0B50C000700012002 +:10273000002985B003D10320FFF7B2FF75E0E178EF +:10274000A278090211430A00FF3A193A6ED1617A60 +:102750004D066D0E032D69DAD44A6901891803917B +:102760008968002901D0B94260D1E07AA17A0002DB +:1027700008430B21890179180028029103D1280010 +:10278000FFF78EFF4AE082216943C9480E1860793D +:10279000217902020A433000921D210008301AF309 +:1027A000C0E9F17BB27B080210437D23DB00584374 +:1027B0000090C11701910822300069461AF3B0E970 +:1027C000039820211AF348EA0398BA498760012048 +:1027D0000A88A84010430880607AC0091ED0F07BA8 +:1027E000B17B0002084319D0F868012109040843AD +:1027F000F860F07BB27B0102029811434469E01D4E +:10280000F930806B1AF3DCEEFF3421346189AA4A77 +:102810000004000C914200D00818608102984069C1 +:10282000FF3021304189A3488160002005B0F0BD10 +:10283000F8B506009D4F0024822161439C4808188A +:10284000C17B827B0802104307D06001C519A868CC +:10285000B04202D10FF330FA03C5641C032CEBDB4A +:10286000F8BD032010B5FFF71BFF90480021603032 +:102870000A000B000EC00EC008008E494860886038 +:10288000C86010BDF0B5002089B0040007900FF3B8 +:1028900013FA0E00069082216143854894FFA961D6 :1028A00001000000D8270000000400009E612D7187 -:1028B000786913D114E00000A83401C0203301C0AE -:1028C000A4EF00C0FFFF00000000000000000000B7 -:1028D00040420F0068000004F8000004401C7861CA -:1028E0000299944A8900505020684661216802206C -:1028F000087321681C20088120685A217C304172AD -:102900002168AC20088124681221AC3420001AF31D -:10291000D8E9142027180190B07A2070F07A2100AD -:102920006070083100201AF358EA0020A073A071EB -:10293000E07101982071000A6071E87AA97A0002BA -:102940000843010AA0700E28E1700CD2E87AA97A37 -:10295000000208430E21091AC0191AF3B2E90E2029 -:10296000A0700020E070300022F08EFC002800D023 -:10297000287A2073607B00E02CE040084000F121C1 -:1029800008406073E87AA97A02020A4329000C31F0 -:102990000C0038001AF3CEE8200018F0C7F9BB2469 -:1029A000A40000280BD0687AC00902D00622311991 -:1029B00002E006223100A23138001AF3BCE82800F8 -:1029C000123018F0B3F9002804D006223119B81DCE -:1029D0001AF3B0E82CE6FEB50027574E3C000297EC -:1029E000822060438519E87BA97B0002084322D03E -:1029F0000822290068461AF39EE801990098794058 -:102A0000084318D18220604302AA811908312000AE -:102A1000FFF728FFE87BA97B00027D230843DB004A -:102A200058430090C11701910822280069461AF303 -:102A300082E80298FEBD641C032CD1D30020FEBDA9 -:102A40003E48008870473D4A010012880020002A55 -:102A500005D0002903D0C968C90400D501207047FA -:102A600070B500281BD0334C0C34002918D12168D4 -:102A70000022491C21600B2189014418A06BFF3002 -:102A8000401C02800FF322F9A26BFF32521CD1606E -:102A90009060A06B2949FF30401C0088486070BDE1 -:102AA000244D0021603D4B015B199E6886420BD18D -:102AB0009E69761C002A9E6103D063685B1C63607C -:102AC00002E0A3685B1CA360491C0329EBDB70BD1B -:102AD000F8B5002406000B20012780013018009073 -:102AE00014486101603808188068B0421CD1822007 -:102AF000604311494018417CC90915D0C17B807BD6 -:102B00000027090201430FD00098856BE81DF930BA -:102B100000691AF360EDE035E98B094A0004000C06 -:102B2000914200D00818E883641C032CD8DB3800DD -:102B3000F8BD0000083501C0203301C0A4EF00C07B -:102B4000FFFF000070B50500002422F0B5FA060072 -:102B5000280009F0D6FD2B7A1AF308EA07050F05BD -:102B6000051818141800697A022902D13400643457 -:102B700013E0002911D004680FE003200002281898 -:102B800084680AE06120C0002C1806E01FF0B0F94C -:102B9000FF48FDF725FB24F0BEED200070BD70B5A9 -:102BA0000500002409F0ADFD297A002908D001298B -:102BB00008D003290CD1697A032901D001290FD14A -:102BC00044680DE00320000228188468183407E0E8 -:102BD0001FF08EF9EE48401CFDF702FB24F09AED41 -:102BE000200070BD70B50500002409F08AFD297A27 -:102BF000002908D0012908D003290CD1697A0329BA -:102C000001D001290FD1C4680DE00320000228186B -:102C10008468253407E01FF06BF9DD48801CFDF760 -:102C2000DFFA24F078ED200070BD017A012905D18A -:102C300003210902401880683530704761307047C1 -:102C400070B50400FFF77EFF0500200022F034FA83 -:102C5000617A022904D1132149014018807B0CE0DC -:102C600003F078FA0B21890161180128886B02D1E1 -:102C70002030807D01E02030007DC006C10F08D0EB -:102C80002000290061300DF3CDFE002801D0012085 -:102C900070BD002070BD70B504000D0022F00CFA6C -:102CA000617A022904D1132149014018599B8608F1 +:1028B00008180890C27B817B1002084345D08048ED +:1028C00061010D182A6806986B683100801A9941D9 +:1028D00006D32A6806986B683100801A994106E091 +:1028E00028686968069AC043C943801871417D22EF +:1028F0000023D20019F3FCEE049006980F0041C5A6 +:102900000822089902A81AF316E902A807C83B0092 +:10291000121A8B4110D20899082202A81AF30AE968 +:1029200002A807C8801AB9410191009008980822AE +:1029300069461AF300E908E00898082264A11AF32E +:10294000FAE80798012108430790641C032CACD3D4 +:10295000079809B0F0BDF3B581B08E1C0A2700249A +:1029600057486101081881680198814217D1822176 +:10297000614354480D18687B297B02020A432900F1 +:10298000121D0A3130001AF3D6E8687B297B000259 +:102990000843361D86193F1DC01907043F0C641CEF +:1029A000032CDDDB3800FEBDF8B54201822344492B +:1029B000584354184349A6684018407CC009404217 +:1029C000304253D00B208001351868693F4AFF30F0 +:1029D00021308189914249D02269A169914232D83E +:1029E000E1686069884237D90FF370F96A69364F38 +:1029F000FF32213293895B1C1B041B0C93816A6993 +:102A00007B6029D0D31DF9339F6B334BFF325F437B +:102A100031320CCA801A994100233A1A8B411BD2D9 +:102A200029490122C8680223401CC8606869002146 +:102A3000FF30C943213081813100FF314A313000FC +:102A400016F0EEFE08E0002181810FF33FF96A697C +:102A5000FF32521C516310636069E060A06920611D +:102A60006869FF302130818917484160F8BDF7B5AA +:102A700082B00D0014000298410111480F18BE6881 +:102A8000002D7ED0002C7CD0002E7AD00298FFF74B +:102A90008BFFFF21114800222D311AF3D3FD0028AE +:102AA000206008D1FF210E4800222D311AF3CAFD03 +:102AB0000028206065D0687AC009786912D113E0D7 +:102AC000903401C0083301C014F200C0FFFF0000C1 +:102AD000000000000000000040420F00A8040004B5 +:102AE00038050004401C78610299944A89005050CE +:102AF0002068466121680220087321681C20088133 +:102B000020685A217C3041722168AC2008812468F9 +:102B10001221AC3420001AF3D4E8142027180190B5 +:102B2000B07A2070F07A21006070083100201AF32A +:102B300054E90020A073A071E07101982071000A8F +:102B40006071E87AA97A00020843010AA0700E2891 +:102B5000E1700CD2E87AA97A000208430E21091A22 +:102B6000C0191AF3AEE80E20A0700020E07030000B +:102B700022F088FB002800D0287A2073607B400870 +:102B800000E02BE04000F12108406073E87AA97A68 +:102B900002020A4329000C310C00380019F3CAEF75 +:102BA000200017F0D7FE5924E40000280BD0687AE3 +:102BB000C00902D00622311902E0062231007E311E +:102BC000380019F3B8EF2800123017F0C3FE0028C0 +:102BD00004D006223119B81D19F3ACEF30E6FEB56A +:102BE0000027574E3C000297822060438519E87BFE +:102BF000A97B0002084322D008222900684619F365 +:102C00009AEF019900987940084318D182206043D7 +:102C100002AA811908312000FFF729FFE87BA97B70 +:102C200000027D230843DB0058430090C117019147 +:102C300008222800694619F37EEF0298FEBD641C45 +:102C4000032CD1D30020FEBD3E48008870473D4A8A +:102C5000010012880020002A05D0002903D0C9688D +:102C6000C90400D50120704770B500281BD0334C33 +:102C70000C34002918D121680022491C21600B2145 +:102C8000890144186069FF30213082810FF31EF8FA +:102C90006269FF32521C5163106360692949FF3039 +:102CA00021308089486070BD244D0021E30149E551 :102CB00001000000D42B0000000400006A0E58C57B -:102CC000807B12E0207A062802D16320005D0CE0B0 -:102CD00003F04AFA0B21890161180128886B02D19F -:102CE0002030807D01E02030007D81064006C30F4A -:102CF000CA0F2000290061300DF3ACFE70BD10B585 -:102D00000400407A022802D0207A062805D120004B -:102D1000FFF722FFC07840070DE003F025FA0B21F2 -:102D2000890161180128886B02D12030807D01E083 -:102D30002030007D8007C00F10BD603040798007D3 -:102D4000800F7047C0684006C00F70470100C96817 -:102D500000204A0602D5090600D501207047F7B5C4 -:102D600084B0002406000F00FFF7F6FE05003000D7 -:102D7000FFF71FFF03903000FFF73EFF0200300017 -:102D8000FFF75DFF0300F0684006C00F0AD003980C -:102D900000216E4607C61A00069938002B000DF375 -:102DA00070FE0400200007B0F0BD08B50168836A1A -:102DB00001290AD10022026001007B4A180000921A -:102DC0007A4A7B4B1C310DF3D3FE08BDF8B50D00DC -:102DD000FF21040017002D3103F0C1FA00282860FC -:102DE00011D0018922004618A232BB21890000922D -:102DF0003A0061180D2303F007FB032020363070E2 -:102E00002968AC200881F8BDF7B5FF210500060050 -:102E1000FF3672362D3182B003F0A1FA04001BD0C8 -:102E200020892A00A232BB212718890000922000A5 -:102E3000320069180D2303F0E7FA042020373870B8 -:102E4000AC202081049A039920000EF3EBF92000B6 -:102E500003F031FB05B0F0BD0020C043FAE7FFB539 -:102E600087B01C00060000200690524840680028E9 -:102E700002D0504817F3E2FC4E4F0898183700284C -:102E800030D12079E178000208432BD1307A012833 -:102E900004D0717A022901D0062807D16079002276 -:102EA0008006010F30000AF0A4FC05E0607980067E -:102EB000010F30000BF03CF9050060796B46187586 -:102EC000A0795875384ABB20800003923749099A87 -:102ED00030180291019000927A89059B29003000F8 -:102EE0000DF3B8FF300024F030EC05006079C32109 -:102EF0000840397A23008906090F89000843607168 -:102F0000069A0092099A089928000DF374FF280088 -:102F100024F01EEC0BB0F0BD7CB504001EF0F2FFF7 -:102F20002549050048686B46401C4860E079987068 -:102F3000207AD870A07A617A000208439880E0680D -:102F4000631C0122694624F008EC28001EF0DEFF15 -:102F50007CBD7FB504001EF0D5FF0500164A210098 -:102F600001A80EF349F9002807D001220092206938 -:102F7000621C022101ABFFF772FF28001EF0C6FFA2 -:102F80007FBDF8B50D000124417A022922D10B2121 -:102F900089014118896A01291CD122F0BEF8060076 -:102FA00028000BE003000100BF2C0000C8800200D5 -:102FB00028810200106102C0181D01C01AF3D2FF5F -:102FC0007D21895D00910100009804F06FFB0028CD -:102FD00000D000242000F8BDFEB50400401C22F003 -:102FE000EEF80500FF4F57D0E8684006C00F53D0F9 -:102FF000207A8006010F2800FFF7C3FF00284BD07E -:10300000207A8006010F0191687A032801D00128F7 -:103010000BD1280022F04EF9217A0600C32001408E -:103020003007800E0143217200E00E00EE493200AD -:1030300020000DF3B1FF411C46D0621C280002A9FC -:10304000FFF7C4FE0298002826D0287A012804D071 -:10305000697A022901D0062805D100223100280012 -:103060000AF0C7FB03E0310028000BF061F8010013 -:10307000029822000DF368FF207AC32108400199CD -:103080000907890E08432072D848E1790170029837 -:1030900003F011FA401C01D1380013E0D4480E228D -:1030A000210019F352EDD2480561183817F356FB89 -:1030B000CF4864220092CF4ACD4B01214DEA0C400B +:102CC000603D4B015B199E6886420BD19E69761C64 +:102CD000002A9E6103D063685B1C636002E0A36806 +:102CE0005B1CA360491C0329EBDB70BDF8B5060033 +:102CF0000B20800130184569012700241448610128 +:102D0000603808188068B0421CD1822161431148A4 +:102D10000818417CC90915D0C17B807B00270902B6 +:102D200001430FD0E81DF930806B1AF35EEC01040B +:102D30002800FF3021304289084B090C9A4200D00C +:102D400051184181641C032CD8DB3800F8BD000009 +:102D5000F03401C0083301C014F200C0FFFF0000CE +:102D600070B50500002422F0A9F90600280009F03A +:102D7000CBFB2B7A1AF304E907050F050518181485 +:102D80001800697A022902D13400643413E0002962 +:102D900011D004680FE00B2080012818046A0AE0B3 +:102DA000172040012C1806E01EF088FFFF48FDF7B1 +:102DB00021FA24F0F4EC200070BD70B50500002469 +:102DC00009F0A2FB297A002908D0012908D003299B +:102DD0000CD1697A032901D001290FD144680DE093 +:102DE0000B2080012818046A183407E01EF066FFE3 +:102DF000EE48401CFDF7FEF924F0D0EC200070BD39 +:102E000070B50500002409F07FFB297A002908D05D +:102E1000012908D003290CD1697A032901D001299D +:102E20000FD1C4680DE00B2080012818046A2534F6 +:102E300007E01EF043FFDD48801CFDF7DBF924F0BE +:102E4000AEEC200070BD017A012905D10B2189016A +:102E50004018006A353070476130704770B5040023 +:102E6000FFF77EFF0500200022F028F9617A022991 +:102E700004D1132149014018807B0CE003F048F88D +:102E80000B21890161180128486902D160308078DE +:102E900001E060300078C006C10F08D02000290092 +:102EA00061300DF3C9FD002801D0012070BD002064 +:102EB00070BD70B504000D0022F000F9617A02299E +:102EC00004D1132149014018807B12E0207A0628A2 +:102ED00002D16320005D0CE003F01AF80B21890198 +:102EE00061180128486902D16030807801E06030C3 +:102EF000007881064006C30FCA0F20002900613008 +:102F00000DF3A8FD70BD10B50400407A022802D070 +:102F1000207A062805D12000FFF722FFC07840075D +:102F20000DE002F0F5FF0B218901611801284869C5 +:102F300002D16030807801E0603000788007C00FF7 +:102F400010BD603040798007800F7047C068400630 +:102F5000C00F70470100C96800204A0602D5090663 +:102F600000D501207047F7B584B0002406000F009B +:102F7000FFF7F6FE05003000FFF71FFF039030005B +:102F8000FFF73EFF02003000FFF75DFF0300F0682F +:102F90004006C00F0AD0039800216E4607C61A00EB +:102FA000069938002B000DF36CFD0400200007B0DB +:102FB000F0BD08B50168836A01290AD100220260C8 +:102FC00001007B4A180000927A4A7B4B1C310DF3BA +:102FD000CFFD08BDF8B50D00FF21040017002D310D +:102FE00003F081F80028286011D0018922004618DA +:102FF0007E325921C90000923A0061180D2303F076 +:10300000C7F80320203630702968AC200881F8BD4D +:10301000F7B5FF2105000600FF364A362D3182B094 +:1030200003F061F804001BD020892A007E32592168 +:103030002718C90000922000320069180D2303F000 +:10304000A7F8042020373870AC202081049A039917 +:1030500020000EF3E7F8200003F0F0F805B0F0BD13 +:103060000020C043FAE7FFB587B01C00060000202F +:10307000069052484068002802D0504817F3DEFB03 +:103080004E4F08981837002830D12079E178000297 +:1030900008432BD1307A012804D0717A022901D05B +:1030A000062807D1607900228006010F30000AF05F +:1030B0003EFA05E060798006010F30003CC393F0D2 :1030C00001000000D02F00000004000039D48BA9BB -:1030D000183817F38CFB0120411C16D1617B227B31 -:1030E00009021143E181E17AA27A090211432173B5 -:1030F000090A6173217AA172617AE17201210022C9 -:10310000217262722170BE490A70FEBD7CB5040056 -:10311000401C22F05EF8B84E050012D0E868400668 -:10312000C00F0ED0621C280001A9FFF759FE0198BC -:10313000002806D021000DF353FF019803F0C5F9D4 -:103140000600701C02D1012020700CE0607A217A08 -:103150000002084307D1AD4A0092AD4A00212B007E -:1031600020000EF388F830007CBDFEB50400401C42 -:1031700022F02FF8A04E050003D0E8684006C00FEB -:1031800001D13000FEBD687A032801D001280AD1A0 -:10319000207A0109280022F097F8217A0907090FFF -:1031A000000101432172E0796B461872207A58724F -:1031B00002980190A07A617A07020F43621C2800EE -:1031C0006946FFF70DFE0098002801D1300006E0A7 -:1031D00001993A000DF35DFD009803F076F9411C6A -:1031E00002D101212170FEBD0028FCD185480B22AF -:1031F00021002C3019F3B2EC82482C30C56018380D -:1032000017F3B6FA7F486422143003000092814A13 -:103210000121183317F3EBFA0120FEBD70B50B0046 -:103220004A780D7811020B2292018018806B0024DD -:1032300029435430012902D10422991C02E00100E3 -:103240000422981C19F38AEC200070BD10B5FFF71A -:10325000E5FD002800D1012010BDF7B582B00500C2 -:103260000E004F6B8C6BFFF781FCE9684906C90FB4 -:103270000BD0297A012909D1674A2B0000926748AF -:10328000049AA23331000DF3F1FEEDE5697A0329CA -:1032900001D00129F9D1002CF7D0002FF5D0017908 -:1032A0004A07D30F22795207D20F934204D0FB234F -:1032B00019409200114301710179CA06D30F227996 -:1032C000D206D20F934204D0EF23194012011143CA -:1032D0000171C1780A07D30FE2781207D20F934227 -:1032E00004D0F7231940D2001143C170017922792B -:1032F0008B0792079B0F920F934203D08908890096 -:10330000114301712800FFF7AFFC020000212800E3 -:1033100015F0E1FCA8E570B50400C8798A790502CA -:103320000B20800115432018826B8B782032012DF1 -:1033300002D0022D1FD109E01375CB785375806B35 -:103340000A79203002764979417608E09375CB7886 -:10335000D375806B0A79203082764979C176200056 -:1033600015F0ECF82000FFF77FFC020000212000A0 -:1033700015F0B1FC70BD1375CB785375826B0B796A -:10338000203213764B795376826B8B782032DDE7CF -:1033900010B5CA798C7913020B2292018218906BB6 -:1033A00023432030022B0AD1837D8B70C07DC870EF -:1033B000906B2030827E0A71C07E487110BD037D03 -:1033C0008B70407DC870906B2030027E0A71407E09 -:1033D000F3E7F8B505000E0000240D4B3100200086 -:1033E0006A460CF36BFE01281DD121003000FEF768 -:1033F00091FE0022210013E0FFFFFFFFC8800200C2 -:10340000181D01C0286102C0672E0000BF2C0000FB -:10341000288102002D2E0000404B4C003A5C000435 -:1034200030000DF3EEFBF94A310020000CF375FE7D -:10343000012809D1220031002800FEF709FE0122EF -:10344000210030000DF3DDFB641C2406240E082C43 -:10345000C3D3F8BD38B50400FFF788FB0500E0686A -:10346000C02188430022E060E94811001300009267 -:103470000DF339FE207A01280AD100220320000230 -:103480002018009280681100353013000DF32BFED8 -:10349000E04A20000092E04A2900613000230DF349 -:1034A00022FE2100FF3172312000FFF792FF00223F -:1034B0001100200015F00FFC38BD002110B58186E9 -:1034C0000187C1864187010020310A7DF9824DA61E +:1030D0000AF09EFE050060796B461875A079587558 +:1030E000384A5920C00003923749099A3018029192 +:1030F000019000927A89059B290030000DF3B4FEFF +:10310000300024F066EB05006079C3210840397A6D +:1031100023008906090F890008436071069A00920E +:10312000099A089928000DF370FE280024F054EB4A +:103130000BB0F0BD7CB504001EF0CAFD25490500AA +:1031400048686B46401C4860E0799870207AD870D7 +:10315000A07A617A000208439880E068631C01222B +:10316000694624F03EEB28001EF0B6FD7CBD7FB51D +:1031700004001EF0ADFD0500164A210001A80EF363 +:1031800045F8002807D0012200922069621C022124 +:1031900001ABFFF772FF28001EF09EFD7FBDF8B562 +:1031A0000D000124417A022922D10B218901411805 +:1031B000496801291CD121F0B2FF060028000BE06C +:1031C00003000100C72E00001C8002007C8002006A +:1031D000105F02C0C82001C01AF3CEFE7D21895DB8 +:1031E00000910100009804F037F9002800D0002475 +:1031F0002000F8BDFEB50400401C21F0E9FF0500E9 +:10320000FF4F57D0E8684006C00F53D0207A8006A1 +:10321000010F2800FFF7C3FF00284BD0207A80065B +:10322000010F0191687A032801D001280BD12800F1 +:1032300022F048F8217A0600C32001403007800EB2 +:103240000143217200E00E00EE49320020000DF330 +:10325000ADFE411C46D0621C280002A9FFF7C4FE47 +:103260000298002826D0287A012804D0697A0229F9 +:1032700001D0062805D10022310028000AF061F9AA +:1032800003E0310028000AF0C3FD0100029822008B +:103290000DF364FE207AC321084001990907890EC5 +:1032A00008432072D848E1790170029802F0D0FFFB +:1032B000401C01D1380013E0D4480E22210019F33C +:1032C0004EECD2480561183817F352FACF48642201 +:1032D0000092CF4ACD4B0121183817F388FA01200C +:1032E000411C16D1617B227B09021143E181E17A05 +:1032F000A27A090211432173090A6173217AA1722A +:10330000617AE17201210022217262722170BE494C +:103310000A70FEBD7CB50400401C21F059FFB84E78 +:10332000050012D0E8684006C00F0ED0621C2800CD +:1033300001A9FFF759FE0198002806D021000DF3DE +:103340004FFE019802F084FF0600701C02D101209C +:1033500020700CE0607A217A0002084307D1AD4A60 +:103360000092AD4A00212B0020000DF384FF3000B5 +:103370007CBDFEB50400401C21F02AFFA04E0500D4 +:1033800003D0E8684006C00F01D13000FEBD687A66 +:10339000032801D001280AD1207A0109280021F050 +:1033A00091FF217A0907090F000101432172E07999 +:1033B0006B461872207A587202980190A07A617A4E +:1033C00007020F43621C28006946FFF70DFE0098B4 +:1033D000002801D1300006E001993A000DF359FCB4 +:1033E000009802F035FF411C02D101212170FEBD81 +:1033F0000028FCD185480B2221002C3019F3AEEBBC +:1034000082482C30C560183817F3B2F97F4864221F +:10341000143003000092814A0121183317F3E7F9B1 +:103420000120FEBD70B50B004A780D7811020B2209 +:10343000920180184069002429438030012902D17B +:103440000422991C02E001000422981C19F386EB67 +:10345000200070BD10B5FFF7E5FD002800D1012068 +:1034600010BDF7B582B005000E004F6B8C6BFFF7F7 +:1034700081FCE9684906C90F0BD0297A012909D1D5 +:10348000674A2B0000926748049A7E3331000DF39F +:10349000EDFDEDE5697A032901D00129F9D1002C70 +:1034A000F7D0002FF5D001794A07D30F22795207C0 +:1034B000D20F934204D0FB231940920011430171B3 +:1034C0000179CA06D30F2279D206D20FC158BC6C3B :1034D00001000000CC330000000400008611AE1A89 -:1034E00020231A430A758A7D3C301A4342231A432B -:1034F0008A75182119F3D8EB10BDF8B50E000189B3 -:1035000045690918CC6D2700203738000DF355FEAA -:10351000002813D0C34AA31D483200921C002A0081 -:10352000390030000DF30CFE0006000E05D023001C -:1035300032003900280024F024E9F8BD38000DF3EA -:1035400046FE0028F9D0287A0228F6D03200390049 -:10355000280024F01AE9F8BDFFB583B014000398E1 -:1035600021F0C8FD8F2189004018029000200190B1 -:103570006078217800020843052864D9401F0406BA -:103580000498240E401D00900398C17A007A08F038 -:1035900069FD21F0D6FD092686570700007A083715 -:1035A00080063500800F0B2101280BD1F21E012A65 -:1035B00000DDF01E050608002D16F11D0B290FDA9F -:1035C000F01D0DE0032839D10120F21F012A00DD92 -:1035D000F01F050608002D16F11C0B2900DAF01C5F -:1035E000060636162AE00098220049210CF016FD46 -:1035F000010028D04A78901C0006000E8446002066 -:10360000521E96460EE00B18DA78AA4207DBB24249 -:1036100005DC7B78934202D00120019004E0401C3D -:103620000006000E8645EED80098081A221A604659 -:10363000101A0406240E604608180090002C02D0D0 -:1036400001980028CFD002982030807C80070BD5CD -:10365000049800794007800F02D10198012803D116 -:103660000398002124F094E8049809210079084285 -:103670000BD048206B4618700120587000209870BD -:10368000039803226946FFF7D3FB012007B0F0BD82 -:10369000FEB50500160048780C0001270C360028FE -:1036A0000CD001282FD0022842D1E868C00440D5B0 -:1036B0002200310028000DF36CFB3AE0E868400678 -:1036C000C00F0BD020F03AFE002816D00B2080014E -:1036D0002818806B4030007DC0070ED032002800D3 -:1036E0006946FFF787FB0098002822D021000DF3E0 -:1036F000EFFA009802F0F3FE1BE02A0021003000F0 -:103700000DF303FB15E01EF011FC01904748A17872 -:10371000401E0278914207D100210170230032003F -:1037200028000091FFF7AFFB01981EF003FC00E0BA -:1037300000273800FEBDF8B501250700384E0024EB -:103740002D03FF377237182060438119305C0A005F -:103750000A3200280BD01088A84208D0091D062282 -:1037600038001EF007F9002801D10120F8BD641CC3 -:10377000042CE8D30020F8BDFEB504000D00407A0B -:1037800002280CD1200004F03EF8002807D0FF20CA -:103790007930015B0122200023F0FEEFFEBD1821ED -:1037A00069431F4802AA0D1868892F000D37019040 -:1037B000781E00900821200002F004FE0600EDD0E3 -:1037C00002980421C06D0170002141702030042155 -:1037D000040019F394EA20780421084320706078EB -:1037E00001076878090F000101436170E078A17852 -:1037F0000002084301990007000F09010843A07067 -:10380000000AE0700A49300010F0B6FA0028C5D06E -:103810003878401C3870009801210170FEBD00000E -:10382000C8800200F46002C0445E02C0191D01C0DD -:1038300002100000F8B505001EF078FB144E0700DA -:1038400000241820604381190A00305C0C32931E5A -:10385000002815D01078002812D1188801221203F0 -:1038600090420DD02800FF30091D062272301EF054 -:1038700081F8002804D12106090E2800FFF77CFFFB -:10388000641C042CDDD338001EF054FBF8BD00008E -:10389000C880020010B5FA4C606B002805D123F0F7 -:1038A00080EF002801D001206063606B10BD10B56F -:1038B00023F07AEFF2490020486310BD30B50020B4 -:1038C000F04D0D21040003008901691814E0E86837 -:1038D000401CE8601000526B8A62002A3DFFE6AC93 +:1034E000934204D0EF231940120111430171C178B6 +:1034F0000A07D30FE2781207D20F934204D0F723C2 +:103500001940D2001143C170017922798B079207CB +:103510009B0F920F934203D08908890011430171D8 +:103520002800FFF7AFFC02000021280015F0ADFADB +:10353000A8E510B50400C8798A7903020B20800140 +:103540002018406913438A786030012B02D0022B87 +:103550001BD107E00270CA7842700A79027149797A +:10356000417106E08270CA78C2700A798271497925 +:10357000C171200014F0BDFE2000FFF783FC0200A3 +:103580000021200015F081FA10BD0270CA78427047 +:103590000A7902714A7942718A78E3E7CA798B79AC +:1035A00012021A436030022A08D182788A70C278E7 +:1035B000CA7082790A71C0794871704702788A703E +:1035C0004278CA7002790A714079F5E7F8B50500CA +:1035D0000E000024154B310020006A460CF378FDE4 +:1035E000012808D121003000FEF7A2FE00222100B0 +:1035F00030000DF310FB084A310020000CF397FD5A +:1036000001281ED1220031002800FEF72FFE0122E2 +:10361000210013E0FFFFFFFF1C800200C82001C053 +:10362000285F02C06F300000C72E00007C800200BF +:1036300035300000404B4C003E5C000430000DF380 +:10364000EAFA641C2406240E082CC3D3F8BD38B54E +:103650000400FFF799FB0500E068C02188430022C1 +:103660001100E060FF48130000920DF346FD207A40 +:1036700001280AD100220B20800120180092006A44 +:103680001100353013000DF338FDF74A2000009289 +:10369000F64A2900613000230DF32FFD2100FF3190 +:1036A0004A312000FFF792FF00221100200015F0A0 +:1036B000ECF938BD02004032002110B5118491842C +:1036C000030051846033D18419782022114319708A +:1036D000997868301143422211439970182119F3E7 +:1036E000E4EA10BDF8B50E00018945690918CC6DF2 +:1036F0002700203738000DF360FD002813D0D94A89 +:10370000A31D483200921C002A00390030000DF33E +:1037100017FD0006000E05D02300320039002800F6 +:1037200024F068E8F8BD38000DF351FD0028F9D009 +:10373000287A0228F6D032003900280024F05EE80A +:10374000F8BDFFB583B01400039821F0CBFC8F21A6 +:1037500089004018029000200190607821780002D2 +:103760000843052864D9401F04060498240E401D10 +:1037700000900398C17A007A08F020FB21F0D9FC70 +:10378000092686570700007A083780063500800F23 +:103790000B2101280BD1F21E012A00DDF01E0506C7 +:1037A00008002D16F11D0B290FDAF01D0DE003287E +:1037B00039D10120F21F012A00DDF01F05060800A3 +:1037C0002D16F11C0B2900DAF01C060636162AE02D +:1037D0000098220049210CF02BFB010028D04A78E8 +:1037E000901C0006000E84460020521E96460EE0F5 +:1037F0000B18DA78AA4207DBB24205DC7B789342E9 +:1038000002D00120019004E0401C0006000E864515 +:10381000EED80098081A221A6046101A0406240EE0 +:10382000604608180090002C02D001980028CFD0E4 +:1038300002982030807C80070BD5049800794007DF +:10384000800F02D10198012803D10398002123F0B1 +:10385000DAEF04980921007908420BD048206B4622 +:103860001870012058700020987003980322694650 +:10387000FFF7E2FB012007B0F0BDFEB50500160022 +:1038800048780C0001270C3600280CD001282FD0D6 +:10389000022842D1E868C00440D522003100280047 +:1038A0000DF377FA3AE0E8684006C00F0BD020F03D +:1038B0000BFD002816D00B208001281840698030AD +:1038C0000078C0070ED0320028006946FFF796FB4B +:1038D0000098002822D021000DF3FAF95885F08EC7 :1038E00001000000C837000000040000D5CB7D7641 -:1038F00000D1CB620279052A0BD12A69521C2A61B8 -:103900008362036003710020002C02D18A6A002ABE -:10391000E7D130BD10B50A68DF4B002A03D1186823 -:10392000401C186010BD8A6A824203D05868401C4F -:10393000586010BDD7480024026A002A0FD08A427E -:1039400010D09A68521C9A6004220A71C26A002A36 -:1039500001D0516300E08162C1624C6310BD01225D -:1039600001620A71006A07228462CC484021006823 -:103970001FF0BCF810BD10B50A68002A10D0C54A67 -:10398000936B83420CD1106A002809D0884207D17A -:1039900000209063C1480722006880211FF0A6F82C -:1039A00010BDF0B5050085B000F0C4FB002000F0AC -:1039B000CFFB04007ED0286B2063B6480490416A98 -:1039C000491C4162216000F0BDFB0EF3A7F9039191 -:1039D0000290206800272E0039002036002803D1ED -:1039E000049A01205062206000232371307A6071B4 -:1039F000A079717A800889078000890F0843F32134 -:103A0000A0710840B17A8907090F0843CF21A0713E -:103A10000840F17A8907890E0843A071696928690D -:103A2000594008430DD02A6902986B690399121A0C -:103A30008B410AD3029A2869039B6969801A9941CC -:103A400002E0A869002800D00700029A039B002129 -:103A5000B8185941E160A060E8692061286A606196 -:103A6000686AA0612868E06168682062A86860628E -:103A700020002030417B327B490892074900D20F59 -:103A80001143FD2241731140327B5207D20F520085 -:103A90001143FB2241731140327BD206D20F9200B8 -:103AA0001143417302218173317B090701D506213E -:103AB000817300E012E0327B0121D20700D10221A4 -:103AC0000173827B23000092754828333A0021005D -:103AD00008F3ECF8002806D1206001E000F032FB8A -:103AE000002005B0F0BD2068FBE7F8B505250E0005 -:103AF00000F02EFB04006748016AA14216D1A06ABB -:103B0000002803D008F335F90020A062002E66617A -:103B10000CD000222300009261482833320021009B -:103B200008F3C4F80325002800D104252800F8BDB7 -:103B300070B5052500F00CFB04005648016AA1424F -:103B400007D1A06A002804D008F313F90020032548 -:103B5000A062280070BDF8B50F00052600F0F8FA45 -:103B60004C4C0500216A814215D1A06B002803D07E -:103B700008F3FFF80020A063002F0CD0454B002273 -:103B80000092484838333A00290008F38FF803269A -:103B9000002800D104263000F8BD70B5052500F0DE -:103BA000D7FA3C4C216A814207D1A06B002803D090 -:103BB00008F3DFF80020A0630325280070BD38B5A6 -:103BC0000120FDF75FFC334C2C20236AC15C5A6A4C -:103BD0001868DB699847206A006B02F005FA00F06C -:103BE000A9FA1EF0ADF9216A05000020086000F076 -:103BF000A9FAFFF76DFE206228001EF0A5F9216AE0 -:103C0000002909D02E20425C0B000092264A24484D -:103C1000283308F34BF801E0FFF753FE032038BDCB -:103C2000F8B50600072021F07FFA1A4F05004CE096 -:103C3000386A006BA84204D0280023F0C4ED0028A5 -:103C40003ED13400162E10D1280023F0C0ED0028FC -:103C500031D0687A02282ED1386A2030407B400764 -:103C600001D52A2427E0282425E0192E03D01A2E76 -:103C700001D0182E1FD10B2080012818806B817B6A -:103C8000002901D02C2416E0C07B00280ED0292466 -:103C900011E00000803801C0403501C004F600C0CA -:103CA000ED3700004F380000A0860100386A006B35 -:103CB000A84200D0182422000021280002F06DFC48 -:103CC0000721280008F082F90500002DB0D1F8BDC9 -:103CD000F8B505250F0000F03BFA040064D0A06A97 -:103CE0000026002802D008F344F8A6622B94C86886 +:1038F000009802F0C1FC1BE02A00210030000DF30B +:103900000EFA15E01EF0F8F901905D48A178401E0E +:103910000278914207D10021017023003200280073 +:103920000091FFF7BEFB01981EF0EAF900E00027C6 +:103930003800FEBDF8B501250700524E00242D03C6 +:10394000FF374A37182060438119305C0A000A3279 +:1039500000280BD01088A84208D0091D0622380084 +:103960001DF0EEFE002801D10120F8BD641C042CDE +:10397000E8D30020F8BDFEB504000D00407A02280F +:103980000CD1200003F015FE002807D0FF20513095 +:10399000015B0122200023F044EFFEBD18216943A2 +:1039A000384802AA0D1868892F000D370190781E3B +:1039B00000900821200002F0D3FB0600EDD0029811 +:1039C0000421C06D017000214170203004210400E9 +:1039D00019F39EE9207804210843207060780107DC +:1039E0006878090F000101436170E078A178000256 +:1039F000084301990007000F09010843A070000A5D +:103A0000E0702149300010F005F80028C5D0387862 +:103A1000401C3870009801210170FEBDF8B505000A +:103A20001EF06AF9174E0700002418206043811920 +:103A30000A00305C0C32931E002815D01078002844 +:103A400012D118880122120390420DD02800FF30B5 +:103A5000091D06224A301DF073FE002804D12106FC +:103A6000090E2800FFF787FF641C042CDDD3380003 +:103A70001EF046F9F8BD0000F45E02C0445C02C0CE +:103A8000C92001C01C8002000210000010B5FB4CD0 +:103A9000606B002805D123F0C8EE002801D001207A +:103AA0006063606B10BD10B523F0C2EEF3490020D7 +:103AB000486310BD30B50020F14D0D210400030016 +:103AC0008901691814E0E868401CE8601000526B36 +:103AD0008A62002A00D1CB620279052A0BD12A69B9 +:103AE000521C2A618362036003710020002C02D102 +:103AF0008A6A002AE7D130BD10B50A68E04B002A77 +:103B000003D11868401C186010BD8A6A824203D035 +:103B10005868401C586010BDD8480024026A002A2A +:103B20000FD08A4210D09A68521C9A6004220A71FF +:103B3000C26A002A01D0516300E08162C1624C6315 +:103B400010BD012201620A71006A07228462CD4819 +:103B5000402100681EF070FF10BD10B50A68002AF1 +:103B600010D0C64A936B83420CD1106A002809D04A +:103B7000884207D100209063C24807220068802154 +:103B80001EF05AFF10BDF0B5050085B000F0CCFB6B +:103B9000002000F0D7FB04007ED0286B2063B748DC +:103BA0000490416A491C4162216000F0C5FB0EF39C +:103BB000B5F803910290206800272E0039002036C6 +:103BC000002803D1049A0120506220600023237151 +:103BD000307A6071A079717A800889078000890F36 +:103BE0000843F321A0710840B17A8907090F0843FF +:103BF000CF21A0710840F17A8907890E0843A0718E +:103C000069692869594008430DD02A6902986B698F +:103C10000399121A8B410AD3029A2869039B696996 +:103C2000801A994102E0A869002800D00700029A92 +:103C3000039B0021B8185941E160A060E869206148 +:103C4000286A6061686AA0612868E061686820622B +:103C5000A868606220002030417B327B49089207CF +:103C60004900D20F1143FD2241731140327B5207AC +:103C7000D20F52001143FB2241731140327BD20616 +:103C8000D20F92001143F72241731140327B92060A +:103C9000D20FD200114300E01AE041730221817378 +:103CA000317B090701D506218173327B0121D207BF +:103CB00000D102210173827B2300009272482833D5 +:103CC0003A00210007F3F2FF002806D1206001E04E +:103CD00000F032FB002005B0F0BD2068FBE7F8B52E +:103CE00005250E0000F02EFB040064486736289B73 :103CF00001000000C43B00000004000021A408C231 -:103D0000FA4D286AA04257D100F01EFA2079022805 -:103D100001D003281ED1267100F01EFA286A203037 -:103D2000072F077308D0082F0BD11A20FFF782FF47 -:103D3000272006F0B4FE40E01920FFF77BFF262085 -:103D4000F7E7286A006B23F050ED1820FFF772FFA9 -:103D50002520EEE7012801D004282AD100F0FCF943 -:103D6000E369626A20680B219847286A006B02F0B9 -:103D700045F900F0E9F91EF0EDF82660070026711C -:103D800000F0EAF9FFF7AEFD286238001EF0E6F811 -:103D9000296A002909D02E20425C0B000092D44AE7 -:103DA000D448283307F38CFF01E0FFF794FD03208C -:103DB000F8BD00F0D1F900E0266003252800F8BD29 -:103DC00070B5040004251EF0C5F80600C748006A57 -:103DD000A04219D0217920680325042906D10521A4 -:103DE0002171E369626A0B2198470DE0A06A07F32D -:103DF000CAFF012808D1E369626A20680B2198474D -:103E00000021A1622160217130001EF0A7F8280076 -:103E100070BD70B50500042400F096F9280000F08C -:103E2000A1F9002802D0FFF7CBFF040000F094F9BD -:103E3000200070BDF8B505000E0000F085F9AE4F0A -:103E4000002438206043C019816900290ED0002D5C -:103E500003D04521095C890705D4002E06D04521F1 -:103E6000095CC90702D01830FFF7AAFF641C0F2CA9 -:103E7000E7D300F071F9F8BD01210020DAE710B5B1 -:103E800023F0B6EC002801D1012010BD002010BDA8 -:103E900038B523F0B2EC1620FFF7CCFE1520FFF763 -:103EA000C9FE924C206A4179002906D0817900919F -:103EB000417900980022FFF7E2FF216A0320087190 -:103EC000206A8069002808D00DF332FF256AAA68AD -:103ED000EB68801A9941A9690860216ACB694A6A2E -:103EE000086803219847216A4869002809D08A6A2E -:103EF000002A06D100920B0002007E48283307F307 -:103F0000DFFE032038BDF8B507007C4E774D3068E2 -:103F100000281ED12C6A23F074EC2C20015DE3698B -:103F2000626A20689847022824D0002F05D0162006 -:103F3000FFF780FE0120306005E01720FFF77AFED2 -:103F4000242006F0ACFD296A0220087130680028A0 -:103F500017D0286A2030407B40070DD5042009F097 -:103F600083FA002808D108F081F8040008F08BF8E3 -:103F7000844201D00220F8BD00203060232006F0EA -:103F80008EFD0320F8BDF7B586B0040016000025AD -:103F900013002F0003AA04A905A820F07BF8059BB5 -:103FA000002B14D06069002802D1306801256061BF -:103FB000039A079901920091220000211E000498A3 -:103FC0000B00B0470700002D01D0002060613800D1 -:103FD00009B0F0BD70B586B00600002503AA04A99B -:103FE00005A802AB20F056F8059C002C09D0039AD6 -:103FF000002101920A000091310004980023A0479B -:104000000500280006B070BD38482030017F491CEB -:1040100001773649096A00290AD00A79032A07D1AB -:10402000427F521C4277CB694A6A086809211847C7 -:1040300070472E4810B5006A00280BD02030017B55 -:10404000032907D1012101732D480722006840216F -:104050001EF056FD10BD70B50420244C236A002BC1 -:1040600024D02C21C95C18680325012909D1FFF748 -:1040700025FC002810D001200AE0206A20300573BA -:1040800013E0022913D1FFF719FC002804D0002007 -:10409000FFF739FF0328F0D00120FDF749F8184851 -:1040A0000722006840211EF02BFD032070BD03296C -:1040B0000ED1186B0B2189014018806B022101F091 -:1040C00019FF206A042120300173FFF7E1FEECE7BD -:1040D000062901D1062006E0072913D1002101207D -:1040E000FFF7A8FE0720FFF774FDDEE7803801C068 -:1040F000A0860100ED370000403501C05221CDFA05 +:103D0000016AA14216D1A06A002803D008F33BF84B +:103D10000020A062002E66610CD0002223000092D9 +:103D20005E4828333200210007F3CAFF032500282C +:103D300000D104252800F8BD70B5052500F00CFB66 +:103D400004005348016AA14207D1A06A002804D0A8 +:103D500008F319F800200325A062280070BDF8B50B +:103D60000F00052600F0F8FA494C0500216A81424F +:103D700015D1A06B002803D008F305F80020A0633C +:103D8000002F0CD0424B00220092454838333A00B5 +:103D9000290007F395FF0326002800D104263000F0 +:103DA000F8BD70B5052500F0D7FA394C216A81427B +:103DB00007D1A06B002803D007F3E5FF0020A06324 +:103DC0000325280070BD38B50120FDF7CFFB304C2E +:103DD0002C20236AC15C5A6A1868DB699847206AFC +:103DE000006B02F008F800F0A9FA1DF08FFF216ABD +:103DF00005000020086000F0A9FAFFF765FE2062C8 +:103E000028001DF087FF216A002909D02E20425C7E +:103E10000B000092234A2148283307F351FF01E0A9 +:103E2000FFF74BFE032038BDF8B50600072021F050 +:103E30007DF9174F05004BE0386A006BA84204D0AB +:103E4000280023F004ED00283DD13400162E10D1B7 +:103E5000280023F000ED002830D0687A02282DD108 +:103E6000386A2030407B400701D52A2426E02824E8 +:103E700024E0192E03D01A2E01D0182E1ED10B20AB +:103E8000800128184069817B00290DD02C2415E081 +:103E9000683801C0283501C04CF800C0D139000095 +:103EA000333A0000A0860100C07B002801D02924FD +:103EB00004E0386A006BA84200D0182422000021D8 +:103EC000280002F037FA0721280007F035FF050027 +:103ED000002DB1D1F8BDF8B505250F0000F03CFA72 +:103EE000040064D0A06A0026002802D007F34BFF2C +:103EF000A662FB4D286AA04257D100F01FFA207934 +:103F0000022801D003281ED1267100F01FFA286A6A +:103F10002030072F077308D0082F0BD11A20FFF786 +:103F200083FF272006F071FC40E01920FFF77CFF9B +:103F30002620F7E7286A006B23F090EC1820FFF7A3 +:103F400073FF2520EEE7012801D004282AD100F0D4 +:103F5000FDF9E369626A20680B219847286A006BC3 +:103F600001F049FF00F0EAF91DF0D0FE26600700DD +:103F7000267100F0EBF9FFF7A7FD286238001DF06D +:103F8000C9FE296A002909D02E20425C0B0000924C +:103F9000D44AD548283307F393FE01E0FFF78DFD9F +:103FA0000320F8BD00F0D2F900E0266003252800C8 +:103FB000F8BD70B5040004251DF0A8FE0600C84831 +:103FC000006AA04219D0217920680325042906D16E +:103FD00005212171E369626A0B2198470DE0A06A0F +:103FE00007F3D1FE012808D1E369626A20680B213A +:103FF00098470021A1622160217130001DF08AFEE6 +:10400000280070BD70B50500042400F097F9280061 +:1040100000F0A2F9002802D0FFF7CBFF040000F067 +:1040200095F9200070BDF8B505000E0000F086F986 +:10403000AE4F002438206043C019816900290ED09A +:10404000002D03D04521095C890705D4002E06D038 +:104050004521095CC90702D01830FFF7AAFF641C8C +:104060000F2CE7D300F072F9F8BD01210020DAE748 +:1040700010B523F0F8EB002801D1012010BD00207D +:1040800010BD38B523F0F2EB1620FFF7CDFE15205A +:10409000FFF7CAFE924C206A4179002906D0817947 +:1040A0000091417900980022FFF7E2FF216A032086 +:1040B0000871206A8069002808D00DF339FE256A4E +:1040C000AA68EB68801A9941A9690860216ACB69DE +:1040D0004A6A086803219847216A4869002809D07C +:1040E0008A6A002A06D100920B0002007E4828331B +:1040F00007F3E6FD032038BDF8B50700E97306377E :1041000001000000C03F000000040000727EDBAE32 -:10411000B4EF00C004F600C0082901D10820ECE784 -:104120005A6ADB699847CAE71D490420096A0029D1 -:1041300007D00A79032A04D1CB694A6A08680521A5 -:10414000184770471648006A002800D001207047C1 -:104150001348006A002800D0012070471048002151 -:1041600010B5006BC9431EF0D9FC10BD0C4810B54A -:10417000006B1EF0DAFC10BD30B50400094D0020C4 -:10418000010038224A4352199369A34201D1100019 -:104190001830491C002801D10F29F2D330BD00008E -:1041A000803801C0403501C010B5002420290FD04F -:1041B00065290BD1084819F313FB002805D10648DF -:1041C000143019F30DFB002800D00124200010BD8D -:1041D00002488260FAE7000010460004B8EF00C011 -:1041E000012210B5FF48042142700170FE480168A9 -:1041F000930519430160FD48016811430160FC48C3 -:104200000FF32AFF012010BD002010B50FF3FEFEB2 -:10421000F449491F487010BD012010B50FF3F6FE98 -:10422000F049491F887010BD0020704740420229A4 -:1042300000D90221EB4A890023328918ED4A12681D -:10424000012A01D18A5601E000228A561018022262 -:104250008A56824203DB03228A56824200DD100026 -:10426000000600167047E349DE4A09684042921C86 -:10427000012901D1515601E00021515608180221AF -:104280005156814203DB03215156814200DD080073 -:10429000000600167047D3490278891C0A7002791B -:1042A0004A70827821310A7082794A7042780A71A4 -:1042B00042794A71C2780A72C07948727047C94916 -:1042C0000220C043891C0870487021310870487072 -:1042D00008714871087248727047002801DD00209B -:1042E00004E06421C943884200DA08004042000625 -:1042F00000167047002070477CB56B460024B94E0D -:104300001970F61D5870009801A911F023F80028C3 -:104310000BD0A5006B465979705B0FF394FEA8197A -:104320006B46197940880FF38EFE641C012CEADB82 -:104330007CBD7CB56B460024AA4E19700B365870B4 -:10434000009801A910F0F2FF00280BD0A5006B46E1 -:104350005979705B0FF377FEA8196B46197940887D -:104360000FF371FE641C012CEADB7CBD7CB56B464F -:1043700000249C4E19700F365870009801A910F057 -:10438000FDFF00280BD0A5006B465979705B0FF339 -:104390005AFEA8196B46197940880FF354FE641C25 -:1043A000012CEADB7CBD3EB56B460C0019705870E1 -:1043B000009801A911F00CF8002803D001A8FFF71C -:1043C0006AFF3EBD2000FFF77AFF3EBD002800B522 -:1043D00011D1022A05D1092901D8481C00BD0820A5 -:1043E00000BD032A05D1052901D3C81E00BD022046 -:1043F00000BD481E00BD022A01D0032A40D1702909 -:1044000038D011DC8807800F38D18B10093B18F3A6 -:10441000EAED132727292935352B2B353535353549 -:104420003535352F2F31350088290DD00EDC7C290C -:1044300022D005DC742901D078291FD1762000BD57 -:10444000802919D0842919D1862000BD95290DD045 -:1044500099290BD09D2901D0A1290FD19F2000BD02 -:10446000262000BD2E2000BD3E2000BD972000BDAF -:10447000662000BD6E2000BD7E2000BD362000BD40 -:10448000080000BD10B50400FFF7A0FF002C00D10C -:10449000401C0006000E10BD002804D0012802D0E8 -:1044A000554A904205D14F4A921E1070002051701B -:1044B00070470120704710B54A4CA41E2078FF2891 -:1044C0001ED0012804D1042170200FF3DBFD03E08E -:1044D000042170200FF3E3FD5F200FF397FD617857 -:1044E00040180106090E5F200FF3ADFD60200FF3A9 -:1044F0008DFD617840180106090E60200FF3A3FDC1 -:1045000010BDF7B582B004000D003C4E8B4D508CB1 +:104110007C4E784D306800281ED12C6A23F0B4EB19 +:104120002C20015DE369626A20689847022824D048 +:10413000002F05D01620FFF781FE0120306005E03A +:104140001720FFF77BFE242006F069FB296A022076 +:1041500008713068002817D0286A2030407B40075B +:104160000DD5042009F021F8002808D107F034FE0D +:10417000040007F03EFE844201D00220F8BD00207A +:104180003060232006F04BFB0320F8BDF7B586B066 +:1041900004001600002513002F0003AA04A905A897 +:1041A0001FF048FF059B002B14D06069002802D146 +:1041B000306801256061039A0799019200912200FD +:1041C00000211E0004980B00B0470700002D01D00D +:1041D00000206061380009B0F0BD70B586B00600FF +:1041E000002503AA04A905A802AB1FF023FF059C24 +:1041F000002C09D0039A002101920A00009131009D +:1042000004980023A0470500280006B070BD394877 +:104210002030017F491C01773649096A00290AD0FC +:104220000A79032A07D1427F521C4277CB694A6A36 +:1042300008680921184770472E4810B5006A002801 +:104240000BD02030017B032907D1012101732E48B7 +:104250000722006840211EF003FC10BD70B5042049 +:10426000244C236A002B24D02C21C95C1868032518 +:10427000012909D1FFF71EFC002810D001200AE017 +:10428000206A2030057313E0022913D1FFF712FCD6 +:10429000002804D00020FFF739FF0328F0D00120C8 +:1042A000FCF7BAFF18480722006840211EF0D8FB2F +:1042B000032070BD03290ED1186B0B218901401812 +:1042C0004069022101F0A0FD206A04212030017321 +:1042D000FFF7E1FEECE7062901D1062006E00729F9 +:1042E00014D100210120FFF7A8FE0720FFF775FD7C +:1042F000DEE70000683801C0A0860100D139000067 +:10430000283501C024F200C04CF800C0082901D1B2 +:104310000820EBE75A6ADB699847C9E71D49042082 +:10432000096A002907D00A79032A04D1CB694A6AAD +:1043300008680521184770471648006A002800D011 +:10434000012070471348006A002800D00120704700 +:104350001048002110B5006BC9431EF085FB10BD4D +:104360000C4810B5006B1EF086FB10BD30B5040084 +:10437000094D0020010038224A4352199369A34293 +:1043800001D110001830491C002801D10F29F2D3A7 +:1043900030BD0000683801C0283501C010B50024C8 +:1043A00020290FD065290BD1084819F319FA0028E4 +:1043B00005D10648143019F313FA002800D001245F +:1043C000200010BD02488260FAE700003046000479 +:1043D00028F200C0012210B5FF4807214270017089 +:1043E000FE480168930519430160FD4801681143C7 +:1043F0000160FC480FF330FE012010BD002010B515 +:104400000FF304FEF449491F487010BD012010B598 +:104410000FF3FCFDF049491F887010BD0020704764 +:104420004042022900D90221EB4A8900233289182F +:10443000ED4A1268012A01D18A5601E000228A560B +:10444000101802228A56824203DB03228A568242D5 +:1044500000DD1000000600167047E349DE4A0968D7 +:104460004042921C012901D1515601E000215156D0 +:10447000081802215156814203DB03215156814223 +:1044800000DD0800000600167047D3490278891C39 +:104490000A7002794A70827821310A7082794A70F2 +:1044A00042780A7142794A71C2780A72C0794872B8 +:1044B0007047C9490220C043891C087048702131E7 +:1044C0000870487008714871087248727047002877 +:1044D00001DD002004E06421C943884200DA0800BD +:1044E0004042000600167047002070477CB56B46BE +:1044F0000024B94E1970F61D5870009801A910F0EB +:1045000065FD00280BD0A5006B465979AEAA4AFB81 :1045100001000000BC43000000040000708703B8E5 -:1045200001200490B06A3B490840B062706A3A4981 -:104530000843706210F048F90190802102200FF3C7 -:10454000ABFD01200AF0F0FF802102200FF3B1FD46 -:1045500001200AF0E9FF290020000FF0FBFF2948A5 -:104560000FF384FD2F063F0E04993A0020000FF050 -:104570006DFF002C0CD10E2D01D1284806E010F063 -:1045800066FC012801D1264800E026480FF36EFDA5 -:10459000FFF79BFF019810F01EF9049A21002800F4 -:1045A000FFF7EEFE049A21002800FFF7CCFE049AE4 -:1045B00021002800FFF7AAFE049A21002800FFF737 -:1045C000FCFE706A1449C943084070620BF000F8A1 -:1045D00004992A0020000EF0C5FF0BF034F82000EB -:1045E0000BF06DFA0AF0F4FF049A39002000FFF78F -:1045F00053FF0600200017E0CDEF00C080210080AF -:10460000002D00801C1F01C000000004FFFF0000FF -:1046100000A80080FCFDFFFFC0000080142001C046 -:104620000C2001C0102001C00AF047FE0700010065 -:1046300020000FF045FF390020000EF0B7FF0221E7 -:1046400007200DF3CFF80FF051FF002F04D01021F9 -:1046500007200DF3C7F803E0102107200DF3B7F88A -:10466000310020000EF0AAFF04992A0020000EF06D -:10467000F2FE0EF0CCFE0FF04BFF254E002F1FD0A8 -:1046800024480068002817DB07200DF367F880092D -:10469000012803D1F069401CF0610AE0022803D12F -:1046A000306A401C306204E0032802D1706A401C6A -:1046B0007062B069401CB061022107200DF387F8D9 -:1046C0000AF0C1FF144F002C01D1144800E0144837 -:1046D00038613078A0420FD0200034700AF092FE8A -:1046E00020000FF01FFC20000FF032FC012803D146 -:1046F000290020000FF048FC386908210843386180 -:10470000012005B0F0BD0249FF200870704700008D -:10471000C8EF00C0002B0080C0A2008008A80000E5 -:104720000868000070B5FF4D6969FF484165FF49A1 -:1047300009688165FE4800248461FCF728FC10208C -:10474000FCF70BFCE80CFCF708FC2C6070BD10B506 -:10475000F54C0200616B206B18F34AEC7D22D2000D -:1047600018F346ECE36AA26A18F308E810BDF8B53E -:104770007D220700EC4CD200616B206B18F338EC03 -:1047800005000E00E16AA06A3A0018F332EC33002B -:104790002A0017F3F4EFF8BD10B5E34C0200616B8B -:1047A000206B18F326EC7D22D20418F322ECE36A86 -:1047B000A26A17F3E4EF10BD10B5040009F06FFD15 -:1047C00021001DF0C6E9DB4A002317F3D8EF10BD26 -:1047D00070B50400D44D01206872D7480168820C7E -:1047E000114301600AF0F1FFD4494000085A6423E4 -:1047F0005843A8616043FCF78DFB70BD10B50124E0 -:10480000FCF77DFB200010BDC7480079704770B5EC -:10481000FCF78AFB0600FCF796FBC34C00252663D9 -:104820006563A169E5624143C348A1620168820CE6 -:10483000914301602079002804D10120FFF7ACFFEB -:10484000FCF776FB657270BD70B5B74C2069FFF759 -:104850007EFF618918F304EFE0610500B848A169A3 -:1048600018F3FEEE0100A84201D8E06901E008005B -:10487000E1617D21C90018F3F4EE206270BD0A20C9 -:1048800010B5FFF7A5FFFFF7B9FF040010D0FFF741 -:10489000BEFFFFF7D9FFA448016A08000A2907D91B -:1048A000FFF796FFFCF72BFBFFF7B1FFFFF7CCFFFD -:1048B000200010BD70B504009B4D012068729E4819 -:1048C0000168820C114301600AF07FFF9B494000A0 -:1048D000085A64214143002CA96102D008006043BA -:1048E00005E0E86948437D21C90018F3BAEEFCF7FA -:1048F00011FB70BD8C490A6A824206D84A7A002AA6 -:1049000003D14979002900D1D4E77047F3B583B0CA -:10491000002785490D006B6B2A6B39003B2F69B26C +:10452000705B0FF39AFDA8196B46197940880FF359 +:1045300094FD641C012CEADB7CBD7CB56B46002439 +:10454000AA4E19700B365870009801A910F033FD6F +:1045500000280BD0A5006B465979705B0FF37DFDE9 +:10456000A8196B46197940880FF377FD641C012C5C +:10457000EADB7CBD7CB56B4600249C4E19700F367F +:104580005870009801A910F03FFD00280BD0A5003D +:104590006B465979705B0FF360FDA8196B4619796A +:1045A00040880FF35AFD641C012CEADB7CBD3EB54C +:1045B0006B460C0019705870009801A910F04EFD60 +:1045C000002803D001A8FFF76AFF3EBD2000FFF7D7 +:1045D0007AFF3EBD002800B511D1022A05D1092974 +:1045E00001D8481C00BD082000BD032A05D10529BB +:1045F00001D3C81E00BD022000BD481E00BD022A16 +:1046000001D0032A40D1702938D011DC8807800FEF +:1046100038D18B10093B18F3F0EC132727292935E3 +:10462000352B2B35353535353535352F2F31350093 +:1046300088290DD00EDC7C2922D005DC742901D01C +:1046400078291FD1762000BD802919D0842919D15D +:10465000862000BD95290DD099290BD09D2901D028 +:10466000A1290FD19F2000BD262000BD2E2000BD16 +:104670003E2000BD972000BD662000BD6E2000BD1D +:104680007E2000BD362000BD080000BD10B504002E +:10469000FFF7A0FF002C00D1401C0006000E10BD4B +:1046A000002804D0012802D0554A904205D14F4A33 +:1046B000921E10700020517070470120704710B595 +:1046C0004A4CA41E2078FF281ED0012804D10421C2 +:1046D00070200FF3E1FC03E0042170200FF3E9FCEC +:1046E0005F200FF39DFC617840180106090E5F20E2 +:1046F0000FF3B3FC60200FF393FC617840180106C0 +:10470000090E60200FF3A9FC10BDF7B582B00400BC +:104710000D003C4E01200490B06A3B490840B06255 +:10472000706A3A49084370620FF0ACFE0190802134 +:1047300002200FF3B1FC01200AF08CFD8021022041 +:104740000FF3B7FC01200AF085FD290020000FF0CF +:104750005FFD29480FF38AFC2F063F0E04993A00AB +:1047600020000FF0D1FC002C0CD10E2D01D12848D7 +:1047700006E010F0BCF9012801D1264800E02648E7 +:104780000FF374FCFFF79BFF01980FF082FE049A71 +:1047900021002800FFF7EEFE049A21002800FFF711 +:1047A000CCFE049A21002800FFF7AAFE049A2100FB +:1047B0002800FFF7FCFE706A1449C9430840706284 +:1047C0000AF09CFD04992A0020000EF00BFD0AF06F +:1047D000D0FD20000BF07CF80AF090FD049A39001F +:1047E0002000FFF753FF0700200017E03DF200C054 +:1047F00080210080002D0080DC2201C038040004EC +:10480000FFFF000000A80080FCFDFFFFC00000804B +:10481000F42301C0EC2301C0F02301C00AF0E3FB44 +:104820000600010020000FF0A9FC310020000EF06E +:10483000FDFC022107200CF3D5FF0FF0B5FC002E84 +:1048400004D0102107200CF3CDFF03E01021072036 +:104850000CF3BDFF390020000EF0F0FC04992A0093 +:1048600020000EF037FC0EF011FC0FF0AFFC234DD2 +:10487000002E1FD022480068002817DB07200CF309 +:104880006DFF8009012803D1E869401CE8610AE056 +:10489000022803D1286A401C286204E0032802D1C0 +:1048A000686A401C6862A869401CA8610221072050 +:1048B0000CF38DFF0AF05DFD124E002C01D1124861 +:1048C00000E0124830612878A0420BD020002C7004 +:1048D0000AF02EFC20000FF06BF920000FF075F9A4 +:1048E0006B4618703069082108433061012005B01B +:1048F000F0BD0249FF2008707047000038F200C088 +:10490000002B0080C0A2008008A8000008680000FA +:1049100070B5FF4D6969FF484165FF49A2D200E4C7 :1049200001000000B847000000040000235DD0D45F -:1049300018F35CEC02900C00E96AA86A049A18F378 -:1049400062EB05000E00062218F35CEB3B0005222B -:1049500017F31EEF0191AA0FB10011430090A800B8 -:104960003B00052217F314EF029A2300121A8B4121 -:104970001AD3684607C8801AA14115D3072231000F -:10498000280018F340EB029A801861416B4C4A07EB -:10499000C0081043636B226BC90817F3FAEEE1629B -:1049A000A06204986763206305B0F0BD70B5634CE6 -:1049B0006079002811D1FCF7ACFAFCF7BFFA0500CA -:1049C000FCF7CBFA614A01001068930C9843106021 -:1049D000A06948432900FFF7A3FF2079002804D1EC -:1049E0000120FFF7E3FEFCF7ADFA0020607270BD16 -:1049F00070B5FF24514D5A342B68C31A1B1BFF3B63 -:104A0000FF3B1B1F002B04DC5349886A401C886253 -:104A100003E0814201D8824201D2002070BD18001B -:104A2000FFF7AFFE06002000FFF7D0FE0400286865 -:104A3000FFF7A7FE8219230000213000FCF7EAFAF5 -:104A40002879002806D12868FFF79BFE0004000C97 -:104A5000FCF757FA012070BDF8B505006846FCF771 -:104A600094FB3E4800990068814201D0FCF772FB3C -:104A70003B4800990068814201D0FCF76BFB394C40 -:104A8000394E2078FF280AD105F051FF002806D0C2 -:104A9000002D04D0306822000D21FCF76DFB009939 -:104AA0003068814201D0FCF755FB3048009900681E -:104AB000814201D0FCF74EFBF8BD284838B50068AC -:104AC000FCF74EFB26480068FCF74AFB264D286899 -:104AD000FCF746FB25480068FCF742FB214C217897 -:104AE000FF2905D028686A46FCF746FBFF202070A6 -:104AF00038BD1C4810B560380078C00705D00AF0F2 -:104B000071FD0EF039FB0AF0A8FD10BDF8B50AF0F2 -:104B1000EFFF114E00257560FFF7CFFF084880308A -:104B2000016B0822114301630E48114F6038007871 -:104B3000044CC0073DD01DE000A50080C03801C076 -:104B40008022008040A6008040420F0000210080AB -:104B5000307A0200002D310100F000C0347C0200E8 -:104B6000847C0200965C000400F600C0ECF100C0FA -:104B7000EFFFFFFF1DF00CFA009020690B21884326 -:104B800020612069F16808432061A561FCF709FAFA -:104B9000FCF77BFAFF48C760FF4801680822114311 -:104BA0000160FE4908681043086000981DF0F4F9A0 -:104BB00006E0A561FCF7F5F9FCF767FAF548C76070 -:104BC0000DF3FBF9F648F749406D48612069102163 -:104BD0008843206105F0A6FE002800D0022020F0C6 -:104BE0000BFB04000DD0200008F07EFC002801D053 -:104BF000042100E005210B2080012018806B01F0CA -:104C000097F907F33EF9F8BDE34810B5C0380169DC -:104C10000B22914301610169E34A926811430161EA -:104C2000002181610AF0DEFC0EF0A6FA0AF015FD03 -:104C3000D94A1068082108431060D84A1068084310 -:104C4000106010BDFFB583B004000027D74D05F0FC -:104C500069FE002800D0022020F0CEFA060002D023 -:104C6000F068C004C00FFFF7F7FE1DF091F90022B5 -:104C70000290CF48009200680822012101AB1DF08C -:104C800051FF0198002817D1CA48002200684A2124 -:104C900006F385FC002802D00C9800280CD0C049EF -:104CA000C54B086E496EFF221840F93200231140AF -:104CB0005940584008430AD0B948BF4C016E426E73 -:104CC000FF23F93321401A404266016620E0002CA0 -:104CD0002AD00DF34BF800900498226863680F0007 -:104CE000101A00218B41009A19003B00121A8B41C7 -:104CF0000AD2009A20686168801AB941069A05991B -:104D0000FFF776FE002806D1A7488169491C81611A -:104D1000FFF7FCFEE7E0A248626821688030C260CD -:104D2000816000F05FF907009C4A1068803414BE6F +:1049300009688165FE4800248461FCF79CFB102017 +:10494000FCF77FFB680DFCF77CFB2C6070BD10B59D +:10495000F54C0200616B206B18F354EB7D22D20002 +:1049600018F350EBE36AA26A17F312EF10BDF8B523 +:104970007D220700EC4CD200616B206B18F342EBF8 +:1049800005000E00E16AA06A3A0018F33CEB330020 +:104990002A0017F3FEEEF8BD10B5E34C0200616B80 +:1049A000206B18F330EB7D22D20418F32CEBE36A72 +:1049B000A26A17F3EEEE10BD10B5040009F0E3FA99 +:1049C00021001CF0ACEFDB4A002317F3E2EE10BD30 +:1049D00070B50400D44D01206872D7480168820C7C +:1049E000114301600AF091FDD4494000085A642344 +:1049F0005843A8616043FCF701FB70BD10B501246A +:104A0000FCF7F1FA200010BDC7480079704770B577 +:104A1000FCF7FEFA0600FCF70AFBC34C00252663F0 +:104A20006563A169E5624143C348A1620168820CE4 +:104A3000914301602079002804D10120FFF7ACFFE9 +:104A4000FCF7EAFA657270BD70B5B74C2069FFF7E4 +:104A50007EFF618918F30EEEE0610500B848A16998 +:104A600018F308EE0100A84201D8E06901E008004F +:104A7000E1617D21C90018F3FEED206270BD0A20BE +:104A800010B5FFF7A5FFFFF7B9FF040010D0FFF73F +:104A9000BEFFFFF7D9FFA448016A08000A2907D919 +:104AA000FFF796FFFCF79FFAFFF7B1FFFFF7CCFF88 +:104AB000200010BD70B504009B4D012068729E4817 +:104AC0000168820C114301600AF01FFD9B49400000 +:104AD000085A64214143002CA96102D008006043B8 +:104AE00005E0E86948437D21C90018F3C4EDFCF7EF +:104AF00085FA70BD8C490A6A824206D84A7A002A31 +:104B000003D14979002900D1D4E77047F3B583B0C8 +:104B1000002785490D006B6B2A6B390018F366EB93 +:104B200002900C00E96AA86A049A18F36CEA05007E +:104B30000E00062218F366EA3B00052217F328EE62 +:104B40000191AA0FB10011430090A8003B0005227B +:104B500017F31EEE029A2300121A8B411AD36846ED +:104B600007C8801AA14115D307223100280018F385 +:104B70004AEA029A801861416B4C4A07C008104308 +:104B8000636B226BC90817F304EEE162A06204981C +:104B90006763206305B0F0BD70B5634C6079002891 +:104BA00011D1FCF720FAFCF733FA0500FCF73FFAC5 +:104BB000614A01001068930C98431060A069484353 +:104BC0002900FFF7A3FF2079002804D10120FFF777 +:104BD000E3FEFCF721FA0020607270BD70B5FF247F +:104BE000514D5A342B68C31A1B1BFF3BFF3B1B1F45 +:104BF000002B04DC5349886A401C886203E0814230 +:104C000001D8824201D2002070BD1800FFF7AFFE2C +:104C100006002000FFF7D0FE04002868FFF7A7FE7B +:104C20008219230000213000FCF75EFA2879002861 +:104C300006D12868FFF79BFE0004000CFCF7CBF9B7 +:104C4000012070BDF8B505006846FCF708FB3E483A +:104C500000990068814201D0FCF7E6FA3B480099D0 +:104C60000068814201D0FCF7DFFA394C394E2078D8 +:104C7000FF280AD105F011FD002806D0002D04D030 +:104C8000306822000D21FCF7E1FA0099306881427A +:104C900001D0FCF7C9FA304800990068814201D080 +:104CA000FCF7C2FAF8BD284838B50068FCF7C2FA2C +:104CB00026480068FCF7BEFA264D2868FCF7BAFAC9 +:104CC00025480068FCF7B6FA214C2178FF2905D069 +:104CD00028686A46FCF7BAFAFF20207038BD1C48E5 +:104CE00010B560380078C00705D00AF011FB0EF04F +:104CF0008BF80AF048FB10BDF8B50AF002FE114E21 +:104D000000257560FFF7CFFF08498031086B082246 +:104D1000104308630E48114F60380078044CC007F8 +:104D20003DD01DE000A50080A83801C0758112C9E2 :104D300001000000B44B000000040000D732A56061 -:104D4000082188431060994A10688843106097488A -:104D5000C0380169994A04231940D1600169994317 -:104D60000161016903221143016143E09348416AF3 -:104D7000491C6D1E41623AD10500006A401C286240 -:104D800005F0E4FD0028924812D08169816901692B -:104D90000B2291430161864A11680823194311606F -:104DA0000169864AD2681143016107F374F8A4E0EF -:104DB00080698006800F012802D12869401C286183 -:104DC000FFF72CFF06F0F4FF794A106808218843AA -:104DD0001060764A1068884310607D48016904229B -:104DE000914301610169032211430161744D012066 -:104DF0000AF0AEFB764880698006800F0328B5D1A3 -:104E0000002C0DD000F0F8F806990700884202D86F -:104E10000598874204D26948C169491CC16168E0AC -:104E200065484169634A5165022141616948FCF75F -:104E300025F80DF3D4F85C498031086B08229043C3 -:104E40000863634801691022114301615B480078DF -:104E5000022801D1022500E04025002C02D000F0FC -:104E6000CBF80700002F01D001200543002E04D00D -:104E70000B2080013018806B00E00020012101F040 -:104E800061F80AF07EFDE807C00F01D0FCF78BF84F -:104E9000422005401BD068060AD51020FCF76BF8AD -:104EA0001020FCF774F80420FCF700F9FCF70FF968 -:104EB000A8070CD501252D032800FCF75CF8280075 -:104EC000FCF76BF80C20FCF7F1F8FCF700F93B4D10 -:104ED00001206860002C16D000F08EF806998842F8 -:104EE00002D8059988420ED2E869012109044018C8 -:104EF000E861FFF715FEFFF706FE02981DF056F871 -:104F0000002007B0F0BD0AF00BFEC02009F0A8F9A0 -:104F100002981DF04BF80022D2432A480092006804 -:104F20000822012101AB1DF007FE0120E9E710B5C1 -:104F300005F00CFD002803D020484068002801D06F -:104F4000FFF7EEFD10BDF8B5194A1D481168082697 -:104F5000B1431160154A1168B14311601C4C2169BD -:104F6000164D04273940A9602169B943216121699F -:104F70000B2211432161401E33D1FFF74FFE06F093 -:104F800017FF20693840A8602069B84320610849AC -:104F90000868B043086005490868B0430860A06924 -:104FA0008006800F012817E08022008000A7008083 -:104FB00000A30080C03801C000A5008000F000C040 -:104FC00088130000B01E01C080EF00C0180004006C -:104FD00040A600801000100002D16869401C686182 -:104FE0000E48A1698906890F0329C0D1F8BD0120A7 -:104FF00070470B48407A704710B5FCF744F804003E -:10500000FCF70DF8201A05D50649C86A401CC8628D -:10501000002010BDFFF7AFFB10BD0000881300009B -:10502000C03801C000F000C0704710B50124032053 -:105030000DF31FF9FF49096B0205090C0B05120D51 -:105040001B0D9A4204D1220310401140884200D126 -:105050000024200010BD24214143F74A10B58C18CC -:105060000DF307F9E2690100D204C9040120D20C52 -:10507000C90C8A4200D1002010BD10B502E0012009 -:10508000FCF77EF80420FFF7E6FF0028F7D102E0E6 -:105090000120FCF775F80520FFF7DDFF0028F7D1A8 -:1050A00002E00120FCF76CF80620FFF7D4FF00288F -:1050B000F7D1E24C0BE022F0D0EB002804D02068BE -:1050C0000022622106F375FA0120FCF759F803204B -:1050D000FFF7C1FF0028EED110BDD948402110B51F -:1050E00017F31EEE10BDF8B50D0007002420504345 -:1050F000D149402244183900280017F376ED2800E2 -:105100001FF0C2F82800403017F3B0EE39004031EC -:1051100020220D00009017F368ED29882269A0690C -:105120000D00603D0026521E904207D1E0680A1D26 -:10513000824203D90500643D0E1A361D2751409A5C +:104D40008022008040A6008040420F0000210080A9 +:104D5000B47A0200002D310170F200C0E0030004BB +:104D6000E47C02009A5C000448F800C044F400C0EF +:104D7000EFFFFFFF1CF0F2FF009020690B2188433A +:104D800020612069F16808432061A561FCF77DF985 +:104D9000FCF7EFF9F948C760F949086808221043A1 +:104DA0000860F84801681143016000981CF0DAFFC0 +:104DB00006E0A561FCF769F9FCF7DBF9EF48C7608D +:104DC0000DF305F9F048F149406D48612069102163 +:104DD0008843206107F35FF8F8BDE94810B5C03893 +:104DE00001690B22914301610169E94A926811430B +:104DF0000161002181610AF095FA0EF00FF80AF0C6 +:104E0000CCFADF4A1068082108431060DD4A1068B8 +:104E10000843106010BDFFB583B004000027DD4DCE +:104E200005F040FC002800D0022020F0E7F9060041 +:104E300002D0F068C004C00FFFF70EFF1CF08EFF19 +:104E400000220290D448009200680822012101ABA0 +:104E50001DF018FE0198002817D1D04800220068E4 +:104E60004A2106F3A6FB002802D00C9800280CD09B +:104E7000C549CB4B086E496EFF221840F93200231A +:104E800011405940584008430AD0BF48C44C016EF5 +:104E9000426EFF23F93321401A404266016620E04A +:104EA000002C2AD00CF36CFF0090049822686368F1 +:104EB0000F00101A00218B41009A19003B00121AB2 +:104EC0008B410AD2009A20686168801AB941069A1B +:104ED0000599FFF78DFE002806D1AD488169491C70 +:104EE0008161FFF713FFE7E0A7486268216880301F +:104EF000C260816000F05FF90700A24A10680821D3 +:104F0000884310609E4A1068884310609C48C038EF +:104F100001699F4A04231940D160016999430161E5 +:104F2000016903221143016143E09948416A491C28 +:104F30006D1E41623AD10500006A401C286205F0EE +:104F4000BBFB0028974812D08169816901690B2257 +:104F5000914301618B4A116808231943116001696B +:104F60008B4AD2681143016106F395FFA4E0806982 +:104F70008006800F012802D12869401C2861FFF7B4 +:104F80002CFF06F0B5FD7F4A1068082188431060A9 +:104F90007B4A10688843106082480169042291436B +:104FA000016101690322114301617A4D01200AF078 +:104FB00065F97C4880698006800F0328B5D1002CF4 +:104FC0000DD000F0F8F806990700884202D805983D +:104FD000874204D26E48C169491CC16168E06B48D0 +:104FE0004169694A5165022141616F48FBF7B0FF91 +:104FF0000CF3F5FF61498031086B08229043086388 +:105000006848016910221143016161480078022853 +:1050100001D1022500E04025002C02D000F0CBF8A1 +:105020000700002F01D001200543002E04D00B20E3 +:1050300080013018406900E00020012100F002FFEB +:105040000AF0C9FBE807C00F01D0FCF716F84220B0 +:1050500005401BD068060AD51020FBF7F6FF10208C +:10506000FBF7FFFF0420FCF78BF8FCF79AF8A80782 +:105070000CD50125AD022800FBF7E7FF2800FBF760 +:10508000F6FF0A20FCF77CF8FCF78BF8404D012076 +:105090006860002C16D000F08EF80699884202D87D +:1050A000059988420ED2E869012109044018E86197 +:1050B000FFF72CFEFFF71DFE02981CF053FE0020A8 +:1050C00007B0F0BD0AF035FCC02008F033FF0298AD +:1050D0001CF048FE0022D2432F48009200680822AC +:1050E000012101AB1DF0CEFC0120E9E710B505F070 +:1050F000E3FA002803D026484068002801D0FFF7D3 +:1051000005FE10BDF8B51F4A224811680826B143B4 +:1051100011601B4A1168B1431160224C21691C4D7A +:1051200004273940A9602169B943216121690B2213 +:1051300011432161401E1AD1FFF74FFE88C11A901A :1051400001000000B04F00000004000084E8760C6D -:105150000098390020302A006431009017F34EED9A -:10516000002E06D00098616940194968320017F393 -:1051700046EDF8BDFFB581B0002405000E00170014 -:10518000052018F325FE4188B34A91421BD1010046 -:10519000403128603160098840390904090C0AD07F -:1051A0000F229201914206D8643038600498203969 -:1051B0000124018007E005200EF36AFE0004000CC4 -:1051C00005210DF373F8200005B0F0BD38B50400DB -:1051D0001CF0F2FE05009C48403080699B49000CA1 -:1051E000C03148610520694618F309FE00280BD03C -:1051F0004188994A914207D198494180052221006E -:10520000FFF77BFF012400E0002428001CF0D8FEFB -:10521000200038BD38B504008B48403000698B4908 -:10522000000C803108630420694618F3E8FD00286B -:1052300012D04021095A8A4A6039914207D9200088 -:10524000403017F31EEE0021C943018003E0042221 -:105250002100FFF752FF012038BD38B504007A481D -:105260004030006A7949000CC031886306206946E5 -:1052700018F3C5FD00280BD0010040310A88682AC8 -:1052800001D968220A8006222100FFF736FF01209B -:1052900038BD6E49F0B56C310A006B486C32006B5A -:1052A000040C08001430C46067484030006A2705C9 -:1052B000030C080054308363CE69012031050500DA -:1052C000090D3F0DB94200D1002501273F03010020 -:1052D0003E403C40A64200D00021D269294315053A -:1052E0001E0504002D0D360DB54200D100240C43DF -:1052F0003A403B409A4200D000202043F0BDF8B530 -:1053000000210327574A51481060574A51481060FE -:10531000564A37201060564AFF20401C1060554AFC -:10532000102010604948042280300261524A4261D4 -:105330003F028761514DC76102224562026200222D -:10534000026301221203C2624B4A4D4ECB005C192C -:105350006260D219491C0129EE50F7D3474BC900AE -:10536000CC1862605E5039490622C0318A61454AD4 -:10537000CA6102221E008A62D20120360A62CE620F -:105380004A6200228A63012212033E4B3E4F4A6367 -:105390000022D400A5196B60FF335B1C521C012A4C -:1053A0003751F6D3354CD200203415196B60364B8B -:1053B000A350052242632200283282630222530254 -:1053C0004A6025009F00C363103D0F618D6000227D -:1053D0000B604A6122002D4E28320021CB005C195F -:1053E00062600124A4021219491C0129EE50F5D370 -:1053F000224BC9001033CC1862605E50134903225F -:10540000CA66234A0A673722CA67FF22521C8F677F -:105410004A67204D002187601D4E05600C00C16069 -:105420000421300017F3B0ECE00041194E60FF3664 -:105430001549761C641C362C2950F1D30421300008 -:1054400017F3A2ECE00027E0C0A300809046000420 -:1054500080EF00C040480004EFBE0000BAAB00007F -:105460004C07000048BB02004CBB020050BB0200CE -:1054700054BB020058BB0200007901C0B87001C0E3 -:1054800000300080007F01C00010008000400080DC -:10549000001802C0006F01C041194E600F49104A48 -:1054A0000024295014600E480E494030C161022387 -:1054B00083610B4940394F620A4E103E46610361D9 -:1054C0000F622036466203628F6255633720106395 -:1054D0000F610CF3A9FA04488460F8BD0000018054 -:1054E000C0A30080C87001C0C0A4008099481421E6 -:1054F00010B517F320EC10BD70B505000E0001D1FA -:10550000012070BD30898419607A217A0002084335 -:1055100001280DD1607B217B00020843032807D1BD -:10552000002D11D0280022F0A6E9002813D001E0B8 -:10553000002D03D0E87AA073A87AE073607A217A0C -:105540000002084301280AD10022310064E037A498 +:1051500006F0D8FC20693840A8602069B843206177 +:105160000D490868B04308600A490868B043086000 +:10517000A0698006800F012802D16869401C68611F +:105180000948A1698906890F0329D9D1F8BD000012 +:105190008022008000A7008000A30080A83801C002 +:1051A00000A5008070F200C088130000702201C0CA +:1051B000F0F100C01800040040A6008010001000AC +:1051C000012070470948407A704710B5FBF7CFFFC0 +:1051D0000400FBF798FF201A05D50549C86A401C52 +:1051E000C862002010BDFFF7C6FB10BDA83801C083 +:1051F00070F200C0704710B5012403200DF343F88E +:10520000FF49096B0205090C0B05120D1B0D9A4293 +:1052100004D1220310401140884200D10024200014 +:1052200010BD24214143F74A10B58C180DF32BF81B +:10523000E2690100D204C9040120D20CC90C8A42DF +:1052400000D1002010BD10B502E00120FCF70CF8E1 +:105250000420FFF7E6FF0028F7D102E00120FCF769 +:1052600003F80520FFF7DDFF0028F7D102E0012059 +:10527000FBF7FAFF0620FFF7D4FF0028F7D1E24C36 +:105280000BE022F02EEB002804D0206800226221DF +:1052900006F399F90120FBF7E7FF0320FFF7C1FFB1 +:1052A0000028EED110BDD948402110B517F342EDCA +:1052B00010BDF8B50D00070024205043D14940220D +:1052C00044183900280017F39AEC28001EF0ACFFB0 +:1052D0002800403017F3D4ED3900403120220D0072 +:1052E000009017F38CEC29882269A0690D00603DBD +:1052F0000026521E904207D1E0680A1D824203D95F +:105300000500643D0E1A361D0098390020302A0031 +:105310006431009017F372EC002E06D0009861699A +:1053200040194968320017F36AECF8BDFFB581B047 +:10533000002405000E001700052018F349FD4188E0 +:10534000B34A91421BD10100403128603160098885 +:1053500040390904090C0AD00F229201914206D863 +:1053600064303860049820390124018007E005206A +:105370000EF38EFD0004000C05210CF397FF2000B6 +:1053800005B0F0BD38B504001CF0F2FC05009C48E7 +:10539000403080699B49000CC03148610520694656 +:1053A00018F32DFD00280BD04188994A914207D16E +:1053B0009849418005222100FFF77BFF012400E08E +:1053C000002428001CF0D8FC200038BD38B50500AA +:1053D0008B48403000698B4C000C803420630420E3 +:1053E000694618F30CFD6B4619880905C90D00289C +:1053F000A16212D04021095A874A6039914207D9E7 +:105400002800403017F33CED0021C943018003E040 +:1054100004222900FFF74DFF012038BD38B50400F4 +:1054200077484030006A7749000CC0318863062015 +:10543000694618F3E4FC00280BD0010040310A88CB +:10544000682A01D968220A8006222100FFF731FF6D +:10545000012038BD6B49F0B56C310A0068486C32E8 +:10546000006B040C08001430C46065484030006ACA +:105470002705030C080054308363CE6901203105F1 +:105480000500090D3F0DB94200D1002501273F035A +:1054900001003E403C40A64200D00021D269294391 +:1054A00015051E0504002D0D360DB54200D1002452 +:1054B0000C433A403B409A4200D000202043F0BDCC +:1054C000F8B500210026554A4E481060544A4F480E +:1054D0001060544A37201060534AFF20401C10606F +:1054E000524A102010604748042280300261504A1E +:1054F000426102225302836102624E4D052206631D +:1055000012024562C2619A00C262494A4A4FCB0008 +:105510005C1962600124A4021219491C0129EF5090 +:10552000F5D3444BC900CC186260444A5A503549FF +:105530000622C0318A61424ACA6102221D008A6283 +:10554000D20120350A62CD624A620022489C86F36D :1055500001000000AC530000000400003B2D53BFCD -:10556000042000F0A6F9002803D1300018F3AEF8AB -:10557000D0E7002070BDF8B50D0004001100002632 -:105580007A481F00320018F3CBF80028206014D0AE -:105590000221017321682020088120680121203028 -:1055A00028600172002141722868390A077341732B -:1055B0002968002088720126C8723000F8BD1CB529 -:1055C0000C0003006422694601A8FFF7D4FF0028FD -:1055D0000FD0009800210174002C417405D001996E -:1055E00001234A7B1A434A738C6102218172002194 -:1055F000C17201981CBD10B5040008001100FFF72E -:10560000DEFF002803D001002000FFF77FFF10BD60 -:105610000022F0E77CB5140005000B006422694607 -:1056200001A8FFF7A8FF00280BD00098210A0474F6 -:105630004174022181720021C17201992800FFF793 -:1056400065FF7CBD7CB5040015000B00FF22913284 -:10565000694601A8FFF78FFF002811D000980021AC -:105660000174417406222900123017F3D2EA00991E -:10567000082088720020C87201992000FFF746FFB9 -:105680007CBD7CB51C00160005000B00FF2291328A -:10569000694601A8FFF76FFF00280DD0009822008F -:1056A0003100103017F3B4EA0098210A8472C172F5 -:1056B00001992800FFF72AFF7CBD7CB514001E006D -:1056C00005000B006422694601A8FFF754FF00287B -:1056D00011D00098210A047441740622310012305E -:1056E00017F396EA0099082088720020C872019981 -:1056F0002800FFF70BFF7CBD70B506001089150070 -:10570000841800222274200062740622123017F3DB -:1057100080EAE07AA17A000208430830A072000A09 -:10572000E07229003000FFF7F1FE70BDFEB51D00EC -:1057300006000F0014000B006422694601A8FFF761 -:105740001AFF00280ED0742F0CD10098E5210174A7 -:1057500044740321857481720021C1720199300063 -:10576000FFF7D4FEFEBD0000583901C0AC000004B4 -:1057700070B50500008944191FF075F800280AD09B -:10578000607B217B000208430B2804D00A2802D04A -:10579000052005F0C0F900222900FF480068FF4BF2 -:1057A0001C680223A04770BDFD48011F0860FD482A -:1057B00001214170002101707047F9490020091F43 -:1057C0000860F849487008707047F6484178002929 -:1057D00001D001210170704770B51CF0F7FB050086 -:1057E000F14818F306F8040028001CF0F3FB02252A -:1057F0000DE020002573FFF7BBFF1CF0E7FB060060 -:10580000E94817F3F6FF040030001CF0E3FB002C1E -:10581000EFD170BD70B51CF0D9FBE24C050060788B -:10582000002809D0DE4904200856411C04D0811C00 -:1058300002D0012105F379F9DC480078012802D172 -:10584000142005F054F9002020720420FBF760FEBC -:10585000D748002200680C2105F3BFFEFFF7BCFF0C -:1058600028001CF0B7FB70BD10B5FFF7D3FFCD4982 -:10587000002008704870CF49086010BDC948017AFF -:10588000032901D0032101727047FF2800D008408E -:105890007047C94910B509681CF082E97D22D20021 -:1058A00017F3CEEB8905800A084301D021F036EFCB -:1058B00010BDF8B50024160005000F0022000029D5 -:1058C00001D03889C2191EF089FD00287ED0B54963 -:1058D000087A03287BD00228FCD0680726D5002F41 -:1058E00024D0507B117B04020C430B2C08D010DC1D -:1058F000032C0BD0082C09D0092C07D00A2C13D16B -:10590000AE48AF490088097808430BD0FF2505262B -:1059100015E0102CFAD0122CF8D04F2C04D1FF2512 -:1059200007260CE004208543042608E0062E06D155 -:105930009B48001F006817F3AEEAC00554D498488E -:10594000001F006817F3A6EA01002800FFF79DFF7B -:10595000002849D093484030818A0029F9C71A4D60 +:105560008A63012212033B4B4A630022D40066196E +:105570007360FF33384E5B1C521C012A2E51F5D349 +:10558000314CD200203415196B603300A350052232 +:105590004263220028328263022253024A609E0044 +:1055A000C363103C0E618C6000220B604A612200D4 +:1055B00038320021CB001D196A600125AD02521955 +:1055C000491C0129E750F5D3C9000B195A606750EF +:1055D00011490322CA66214A0A673722CA67AA10FC +:1055E0004A6712018A671E4E002106601B4F8260C7 +:1055F0000D00C1600421380017F3D0EBE8008119D9 +:105600004F60FF3714497F1C6D1C362D3150F1D38C +:10561000042127E0C0A30080B0460004F0F100C0E0 +:1056200060480004EFBE0000BAAB0000DC080000D8 +:1056300048BB02004CBB020050BB020054BB02003E +:1056400058BB0200007601C0B86D01C00040008068 +:1056500000500080007F01C000100080001602C0D2 +:10566000006C01C0380017F39AEBE80081194F6015 +:105670000F49104B002531501D600E484030C46169 +:10568000022484610B4AC10C403A51620A4F4761BF +:105690000461116220374762046291625E633720C1 +:1056A000186311610CF3CAF904488560F8BD000065 +:1056B00000000180C0A30080B86D01C0C0A40080BC +:1056C0009948142110B517F340EB10BD70B50500D3 +:1056D0000E0001D1012070BD30898419607A217AD1 +:1056E0000002084301280DD1607B217B00020843A2 +:1056F000032807D1002D11D0280022F000E900284E +:1057000013D001E0002D03D0E87AA073A87AE073EB +:10571000607A217A0002084301280AD10022310070 +:10572000042000F0A6F9002803D1300017F3CEFFC3 +:10573000D0E7002070BDF8B50D0004001100002670 +:105740007A481F00320017F3EBFF0028206014D0C6 +:105750000221017321682020088120680121203066 +:1057600028600172002141722868390A0773417369 +:105770002968002088720126C8723000F8BD1CB567 +:105780000C0003006422694601A8FFF7D4FF00283B +:105790000FD0009800210174002C417405D00199AC +:1057A00001234A7B1A434A738C61022181720021D2 +:1057B000C17201981CBD10B5040008001100FFF76C +:1057C000DEFF002803D001002000FFF77FFF10BD9F +:1057D0000022F0E77CB5140005000B006422694646 +:1057E00001A8FFF7A8FF00280BD00098210A047435 +:1057F0004174022181720021C17201992800FFF7D2 +:1058000065FF7CBD7CB5040015000B00FF229132C2 +:10581000694601A8FFF78FFF002811D000980021EA +:105820000174417406222900123017F3F2E900993D +:10583000082088720020C87201992000FFF746FFF7 +:105840007CBD7CB51C00160005000B00FF229132C8 +:10585000694601A8FFF76FFF00280DD000982200CD +:105860003100103017F3D4E90098210A8472C17214 +:1058700001992800FFF72AFF7CBD7CB514001E00AB +:1058800005000B006422694601A8FFF754FF0028B9 +:1058900011D00098210A047441740622310012309C +:1058A00017F3B6E90099082088720020C8720199A0 +:1058B0002800FFF70BFF7CBD70B5060010891500AE +:1058C000841800222274200062740622123017F31A +:1058D000A0E9E07AA17A000208430830A072000A29 +:1058E000E07229003000FFF7F1FE70BDFEB51D002B +:1058F00006000F0014000B006422694601A8FFF7A0 +:105900001AFF00280ED0742F0CD10098E5210174E5 +:1059100044740321857481720021C17201993000A1 +:10592000FFF7D4FEFEBD0000403901C0EC040004C6 +:1059300070B50500008944191EF061FF00280AD0E7 +:10594000607B217B000208430B2804D00A2802D088 +:10595000052004F096FFFC4BFA481C68F7227F43B1 :1059600001000000A85700000004000068F780D381 -:1059700000D18682984E0025002C1AD0308800284D -:105980000DD08C4904200856401C08D1081F00681F -:105990004079FFF788FFFFF771FF358045E01CF085 -:1059A0001FFB04008548390017F385FF20001CF019 -:1059B0001BFB804C0420241F2168022208567E49CC -:1059C0000A72411C04D0811C02D0002105F3B7F8F3 -:1059D00020684079FF282BD0FFF765FF308801E071 -:1059E0001DE00DE0002823D01EF002FD002803D0AA -:1059F000FFF744FF35801BE0308819E00020F8BD38 -:105A0000680715D5002F13D01CF0EAFA04006B4884 -:105A1000390017F350FF20001CF0E6FA08E0680791 -:105A200006D5002F04D0FFF7E1FE3800FFF7AAFEED -:105A30000120F8BD6048582110B517F390E910BD5A -:105A4000F8B500200D005C4F1600B88232E068788F -:105A5000297800020843FF38163821D1E978AA785E -:105A600009021143CC082800E200914218D1121D0E -:105A700011040914B14213DC0821082C00D22100C2 -:105A8000CA00011D4C48143017F3CCE806E0E000D2 -:105A9000C019002114300A0006C0641C082CF6DB73 -:105AA000E978AA7808021043311A091F0E04361447 -:105AB0002D1D4519042ECADCF8BDFFB50A208BB098 -:105AC00000251F0005900B98099540692E0007904E -:105AD0001FF06AFB06900B980B990089441824313B -:105AE00040188446E078C00701D1A01D01E02000E5 -:105AF0001230A1780A07930F012B04D10809082856 -:105B00001FD13880CCE0910F02D14025092017E049 -:105B1000028832498A4209D142888A4206D1828863 -:105B20008A4203D101252E00280009E00078C00731 -:105B300003D008250326022002E002252E000320C0 -:105B40003880A0780007800F022866D10D980027C2 -:105B500007706046801D09900798407A02285CD142 -:105B60000C98002842D00C9820300A90007DC00686 -:105B7000800F012807D90C98183017F396E9000711 -:105B800001D5012000E00020A1780A07920F022A27 -:105B900003D10909090700D50127384326D00A98FF -:105BA0000F4A007E4107490F20001BE084EF00C030 -:105BB000C0EF00C034F000C06C3901C0583901C0DA -:105BC000F8F500C080EF00C024F200C02C1D01C019 -:105BD000C43B01C0ACF100C0B0F100C0FFFF000049 -:105BE000288102000C3017F385FF059004A903AA51 -:105BF0000091019206981121490140180378059AF5 -:105C0000079821001CF06DFB0398002802D00D9826 -:105C100001210170049800283FD02248006817F342 -:105C200044E9284239D0A0780007800F022837D1F4 -:105C30001D4FB88A002833D0C120C000002508902D -:105C400026E0B04202D0194988421ED1E08A1749A5 -:105C5000884207D021000998163102221BF0E4FE89 -:105C6000002812D1A069401C1AD00998022208A964 -:105C70001BF0DAFE002808D1099821001A301831EB -:105C800004221BF0D1FE00280AD06D1C082D04DA76 -:105C9000E800C419A08A0028D3D100200FB0F0BDBD -:105CA0000120FBE730F000C06C3901C0FFFF0000AD -:105CB000A74900208880091F08607047F8B50C00CC -:105CC0001CF08EF90090200017F3EEE8A04917F3BE -:105CD000FCE86079217900029D4F08430228B880D2 -:105CE00004D900981CF080F90020F8BDA41D994E3D -:105CF000002511E0682068432178315461788019CB -:105D00004170801CA11C00F0ECF8E078A178000242 -:105D10000843241D04196D1CB888A842EADC0098C9 -:105D20001CF062F90120F8BD10B50400884817F393 -:105D3000BCE8204000D0012010BDF7B582B00600BD -:105D40008348818800296BD0824F002464E01CF0D6 -:105D500047F9682161430500785C049A824303D0C7 -:105D600028001CF041F956E07A4AC9195AE4160F86 +:105970000022290000680223A04770BDF848011FDB +:105980000860F84801214170002101707047F44916 +:105990000020091F0860F349487008707047F148FB +:1059A0004178002901D001210170704770B51CF0C9 +:1059B000F3F90500EC4817F326FF040028001CF05B +:1059C000EFF902250DE020002573FFF7BBFF1CF067 +:1059D000E3F90600E44817F316FF040030001CF05A +:1059E000DFF9002CEFD170BD70B51CF0D5F9DD4C9E +:1059F00005006078002809D0D94904200856411CC8 +:105A000004D0811C02D0002105F399F8D748007812 +:105A1000012802D1142004F02AFF00202072042063 +:105A2000FBF7EAFDD248002200680C2105F3DFFDF8 +:105A3000FFF7BCFF28001CF0B3F970BD10B5FFF7ED +:105A4000D3FFC849002008704870CA49086010BDDB +:105A5000C448017A032901D0032101727047FF284D +:105A600000D008407047C44910B509681BF07EEFAC +:105A70007D22D20017F3EEEA8905800A084301D09F +:105A800021F090EE10BDF8B50024160005000F00BF +:105A90002200002901D03889C2191EF06FFC0028AD +:105AA0007DD0B049087A03287AD00228FCD0680754 +:105AB00026D5002F24D0507B117B04020C430B2CE5 +:105AC00008D010DC032C0BD0082C09D0092C07D0EF +:105AD0000A2C13D1A948AA490088097808430BD099 +:105AE000FF25052615E0102CFAD0122CF8D04F2CEB +:105AF00004D1FF2507260CE004208543042608E096 +:105B0000062E06D19648001F006817F3CEE9C0059F +:105B10005CD49348001F006817F3C6E90100280011 +:105B2000FFF79DFF002851D08E484030818A002920 +:105B300000D18682934E0025002C1AD03088002890 +:105B40000DD0874904200856401C08D1081F006862 +:105B50004079FFF788FFFFF771FF35804DE01CF0BB +:105B60001BF904008048390017F3A5FE20001CF043 +:105B700017F97B4F04243F1F3868022104577948E6 +:105B80000172601C0FD0A01C0DD00121200004F375 +:105B9000D6FFC82009F090FB0021200001E026E09C +:105BA00016E004F3CCFF38684079FF2828D0FFF7CF +:105BB0005AFF3088002823D01EF0E0FB002803D0D5 +:105BC000FFF73CFF35801BE0308819E00020F8BD6E +:105BD000680715D5002F13D01CF0DEF804006248CA +:105BE000390017F368FE20001CF0DAF808E06807B7 +:105BF00006D5002F04D0FFF7D9FE3800FFF7A2FE2C +:105C00000120F8BD5748582110B517F3A8E810BD7A +:105C1000F8B500200D00534F1600B88232E06878C6 +:105C2000297800020843FF38163821D1E978AA788C +:105C300009021143CC082800E200914218D1121D3C +:105C400011040914B14213DC0821082C00D22100F0 +:105C5000CA00011D4348143016F3E4EF06E0E000EB +:105C6000C019002114300A0006C0641C082CF6DBA1 +:105C7000E978AA7808021043311A091F0E04361475 +:105C80002D1D4519042ECADCF8BDFFB50A208BB0C6 +:105C900000251F0005900B98099540692E0007907C +:105CA0001FF07AFA06900B980B990089441824315A +:105CB00040188446E078C00701D1A01D01E0200013 +:105CC0001230A1780A07930F012B04D10809082884 +:105CD0001FD13880CAE0910F02D14025092017E07A +:105CE000028829498A4209D142888A4206D182889B +:105CF0008A4203D101252E00280009E00078C00760 +:105D000003D008250326022002E002252E000320EE +:105D10003880A0780007800F022864D10D980027F2 +:105D200007706046801D09900798407A02285AD172 +:105D30000C98002840D00C9820300A90007DC006B6 +:105D4000800F012822D90C98183017F3AEE800070D +:105D50001CD501201BE00000F4F100C030F200C0AF +:105D6000A4F200C0543901C0403901C0B938B38928 :105D700001000000A45B0000000400009C98F5678F -:105D8000D032107048785070891C901C00F0B3F825 -:105D900028001CF033F9300000F0B6F8002844D099 -:105DA000714D0024D035687801270009012803D1FE -:105DB000300000F04AF825E0022823D131897069CB -:105DC0008919009114F043FE040001D13C0017E052 -:105DD000200014F049FE0100644B300001AA0EF3CC -:105DE000B2FC002803D1200014F0BDFEEEE70099BC -:105DF0006B469B8800221231200014F039FE0024EB -:105E0000002C02D16878C00704D00398002C0760EA -:105E100008D102E00398002101606878800701D46E -:105E20000020B080012005B0F0BD641C4D48808882 -:105E3000A04296DC0020F6E701000020002903D0F4 -:105E40000968002900D001207047FEB5FF2100221B -:105E5000F53101904669464817F376FC040023D0DB -:105E6000AC20251820811221280016F3ACEF142055 -:105E7000287100202F0014376871009700980E21B8 -:105E800016F3A0EF02230020AB71E871BB20800065 -:105E90003218390001980E3102920EF3EAFB070026 -:105EA00003D1200017F326FCFEBD009802990622BC -:105EB000801D16F3C2EE390000980622123116F347 -:105EC000BCEE0099C120C0000873000A4873019815 -:105ED00004218088A0800820207330696061F07AF6 -:105EE0006870B07A28702A20A8700020E87020001E -:105EF0001CF030FEFEBD10B54A780B7812021A4332 -:105F0000921C16F39AEE10BD10B5018904002430DE -:105F100009188AB00E390E2206A816F38EEE114823 -:105F200016F3CCEF0100200004AA0EF3A4FC002815 -:105F300016D00EF3F9FA0C4C04A9D034A01C0EF3C1 -:105F4000F7FA002805D0A01C01A90EF307FA029C5D -:105F500000E0002405980E2206A916F36EEE20003C -:105F60000AB010BD40F000C0C43901C04C060000AA -:105F7000F800000410B515F000F8010006E0FD225D -:105F8000135C525C934200D2010000680028F6D1F5 -:105F9000080010BDF8B50028524E534F31D0E03004 -:105FA0004177007CFFF7E6FF0400E0300500007C4D -:105FB000385C12280AD04D48697F406803290FD108 -:105FC000002804D04948642114F3D3FCF8BD6422AE -:105FD0000092474A45482300012114F376FC04E06F -:105FE000002802D0414814F3A1FC687F400000194A -:105FF000E030837C427C287C395C30680EF3F8FC0E -:10600000F8BD0222397830680323F7E70421C1E79D -:1060100003000021E03310B5197433491C000C2231 -:10602000C91CF13016F308EE0520607710BD70B57D -:106030000D1D121F06001404240C1EE0042C23D393 -:106040006878297800020843FF38093806D001280B -:106050000AD12900300014F0B5FD06E0254A2900D8 -:10606000300014F0CDFD00E02000844203D3211A5B -:106070000C04240C00E000242D18002CDED1FD209F -:10608000815D3000FFF786FF70BD032210B58A7076 -:106090000022CA70091D14F0CFFD10BD70B50400B8 -:1060A0000525002802D10021080018E0207A0128E7 -:1060B0000BD1E068C00408D5200007F0DAFC002806 -:1060C00001D0042506E0032504E0200007F03EFA95 -:1060D0000028F6D10B2080012018806B2900FFF7E3 -:1060E00059FF70BDD0F500C046F000C0FC3A01C0B9 -:1060F000315E0000DF47310038B505000C0000219B -:10610000684621F0DAEB6B46187880070ED1012043 -:106110000DF003FF012C01D1092400E014240DF03F -:1061200002FF20000BF3A9FF002403E002200DF082 -:10613000F4FEF1E72100280008F049F801002000F2 -:106140000EF06BF9641C2406240E082CF2D338BD23 -:10615000FF4A106BFF494863506B8863704770B506 -:106160000400BB200D00800021182000A2300FF396 -:1061700089FBFFF7EDFF0BF393FF8034C3148A9381 +:105D800040F800C0F0F100C088F400C0DC2001C081 +:105D90005C3A01C004F400C008F400C0FFFF00003A +:105DA0000020A1780A07920F022A03D109090907E6 +:105DB00000D50127384309D00A98324A007E4107AE +:105DC0002000490F0C3017F39FFE059004A903AA89 +:105DD0000091019206981121490140180378059A13 +:105DE000079821001CF0C5F90398002802D00D98EF +:105DF00001210170049800283FD02348006817F360 +:105E00005EE8284239D0A0780007800F022837D1F9 +:105E10001E4FB88A002833D0C120C000002508904A +:105E200026E0B04202D01A4988421ED1E08A1849C1 +:105E3000884207D021000998163102221BF0DAFCB3 +:105E4000002812D1A069401C1AD00998022208A982 +:105E50001BF0D0FC002808D1099821001A30183115 +:105E600004221BF0C7FC00280AD06D1C082D04DAA0 +:105E7000E800C419A08A0028D3D100200FB0F0BDDB +:105E80000120FBE77C800200A0F200C0543901C071 +:105E9000FFFF00007047704738B505000C00002177 +:105EA000684621F044ED6B46187880070ED101203A +:105EB0000DF079FE012C01D1092400E014240DF02D +:105EC00078FE20000CF3D9F8002403E002200DF046 +:105ED0006AFEF1E72100280007F0DFFF0100200043 +:105EE0000EF0F9F8641C2406240E082CF2D338BDF9 +:105EF000FE4A106BFE494863506B8863704770B56B +:105F0000040059200D00C000211820007E300FF33E +:105F1000B9FCFFF7EDFF0CF3C3F80B20800120184C +:105F200040692030C17A28000FF3A8FC28000FF345 +:105F3000EEFC70BDEF49486A042290434862704706 +:105F4000002010B50FF355FD0021062007F0ADFA33 +:105F50000CF3CCF80121062007F07AFA0CF3CEF806 +:105F6000E34840380168820C114301600CF364FD82 +:105F700010BD10B50EF0E8FD10BDF8B505000E001F +:105F8000DD4C17002078A84202D16078B04206D0DC +:105F9000310028000EF0C6FD206125706670D748DC +:105FA000406A806900280DD03A003100280011F0C5 +:105FB000E5FD2169884213DA3A003100280011F02A +:105FC000DDFD0EE03A003100280011F0AEFD216940 +:105FD000884205DA3A003100280011F0A6FD00E001 +:105FE00008006168884200DB0800A168884200DB85 +:105FF0000800F8BD10B50CF030FF0006000E10BD13 +:1060000010B50CF02DFF10BD10B504000CF02BFFE7 +:10601000CF22F321002806D0022811D003282078AF +:1060200013D0084002E020780840001D1040207086 +:106030000CF016FF012820780BD0800880000BE0C0 +:106040002078084010401030F1E708403021084324 +:10605000EDE780088000401C207010BD0021080082 +:1060600010B511F00DFC10BDA34A5368834203D054 +:106070000029506000D0F1E770479F4A936883423F +:1060800003D00029906000D0E8E770479A48806804 +:106090000006000E704710B5140002688A4201D154 +:1060A000FF2909D1016007F0D9FB9349896888422B +:1060B00002D02100FFF7E1FF10BDF8B50500080090 +:1060C00000210091E9681600FF24C9050AD5694638 +:1060D0000BF030FC012805D16B468948197840182F +:1060E000403004790B208001320021002818FFF78E +:1060F000D2FFF8BD080010B504781900A407A40F5A +:1061000014700FF387FC10BD7B48C06870477A4954 +:10611000C8607047FFB50800002183B01700794DB3 +:1061200000912A881E000C00002A01D00124298039 +:1061300001788907890F029101A90FF36BFC6B4667 +:106140001A79197A03980CF02AFC0CF0F5FB0BF382 +:106150006DFD3800684F19D06B4869460DF00DFD94 +:10616000002813D17869401C78610098800602D419 +:10617000002005F0C5FC0098C00601D468220ABCC6 :1061800001000000A05F000000040000CF42260BC9 -:10619000A17F28000FF37CFB28000FF3C2FB70BD2A -:1061A000F249486A0422904348627047002010B5C3 -:1061B0000FF329FC0021062007F0EAFA0BF3A0FFF9 -:1061C0000121062007F0B7FA0BF3A2FFE64840389A -:1061D0000168820C114301600CF338FC10BD10B54E -:1061E0000EF06CFE10BDF8B505000E00E04C170077 -:1061F0002078A84202D16078B04206D03100280051 -:106200000EF04AFE206125706670DA48406A8069A7 -:1062100000280DD03A003100280011F0E8FD216976 -:10622000884213DA3A003100280011F0E0FD0EE058 -:106230003A003100280011F0B1FD2169884205DAE9 -:106240003A003100280011F0A9FD00E00800616863 -:10625000884200DB0800A168884200DB0800F8BD26 -:1062600010B50CF0BCFF0006000E10BD10B50CF010 -:10627000B9FF10BD10B504000CF0B7FFCF22F32119 -:10628000002806D0022811D00328207813D0084017 -:1062900002E020780840001D104020700CF0A2FFA2 -:1062A000012820780BD0800880000BE0207808407F -:1062B00010401030F1E7084030210843EDE7800836 -:1062C0008000401C207010BD0021080010B511F0A6 -:1062D00011FC10BDA64A5368834203D000295060C8 -:1062E00000D0F1E77047A24A9368834203D00029A7 -:1062F000906000D0E8E770479D4880680006000E77 -:10630000704710B5140002688A4201D1FF2909D1F3 -:10631000016007F00CFC96498968884202D0210090 -:10632000FFF7E1FF10BDF8B505000800002100915E -:10633000E9681600FF24C9050AD569460BF0DAFBA7 -:10634000012805D16B468C481978401840300479F3 -:10635000B9208000320021002818FFF7D2FFF8BDD5 -:10636000080010B504781900A407A40F14700FF3E7 -:106370005BFB10BD7E48C06870477D49C8607047B0 -:10638000FFB5002083B004001F007C4E00903188D0 -:106390000500002901D00124308014F076F800288F -:1063A00003D00125280014F07DF8049801A9007895 -:1063B0008007800F029004980FF336FB6B461A7922 -:1063C000197A03980CF0CCFB0CF097FB0BF338FC1C -:1063D000059800281AD06A4869460DF092FD0028F9 -:1063E00014D163494869401C48610098800602D472 -:1063F000002005F0EFFC0098C00601D405F00AFD6E -:106400000BF31EFC002069460DF07BFD58486B46DF -:10641000C7601A79187A03990CF0BFFEFFF754FF92 -:106420000DF07AFD0BF306FC002F05D16B461A79AF -:10643000197A03980CF0B9FB002D02D0002014F05B -:1064400031F8002C01D00120308007B0F0BD10B52C -:106450000CF3F6FA10BD10B50CF0C1FE0006000EEC -:1064600010BD70B50E040500360C46480022310000 -:1064700017F374F9040006D143480022310017F3E2 -:106480006DF904000AD0022020731C206561208170 -:106490002018702116F3A0ECAC202081200070BDE4 -:1064A000F7B5FF212D310700FFF7DBFF05002BD0EB -:1064B0001C202E18288102982C00AC340660202164 -:1064C000200016F38AECA078F321800880000840B1 -:1064D000001D01070198090F00010143BB20800046 -:1064E000A1703918200006220C3016F3B0EB3900E9 -:1064F000FF3106227231A01D16F3A8EB032168209C -:10650000F46581550520B0702800FEBDFFB583B04D -:106510001400018945690E181C214718018170215A -:10652000380016F330EC1948069900680C9B027984 -:10653000019200910499220030000FF389FA21881A -:1065400013480022814206D16188814203D1A1888B -:10655000814200D101220699280012F039FBB8705F -:10656000287A17E000A5008040A3008000A80080E2 -:10657000CCF000C0E4580004B04101C058F700C09E -:10658000204E000068000004F80000045C632160F5 +:1061900005F0E0FC0BF354FD002069460DF0F7FC20 +:1061A000FE606B461A79187A03990CF03EFEFFF7F1 +:1061B0005FFF0DF0F7FC0BF33DFD002E05D16B46A4 +:1061C0001A79197A03980CF019FC002C01D00120DF +:1061D000288007B0F0BD10B50CF332FC10BD10B52F +:1061E0000CF045FE0006000E10BD70B50E04050053 +:1061F000360C4B480022310017F3B0FA040006D1E8 +:1062000048480022310017F3A9FA04000AD00220FE +:1062100020731C20656120812018702116F3DCEDAD +:10622000AC202081200070BDF7B5FF212D31070083 +:10623000FFF7DBFF05002BD01C202E1828810298C9 +:106240002C00AC3406602021200016F3C6EDA078A7 +:10625000F321800880000840001D01070198090F04 +:10626000000101435920C000A17039182000062206 +:106270000C3016F3ECEC3900FF3106224A31A01D38 +:1062800016F3E4EC03216820F46581550520B07015 +:106290002800FEBDFFB583B01400018945690E18C2 +:1062A0001C21471801817021380016F36CED1E483F +:1062B000069900680C9B02790192009104992200D2 +:1062C00030000FF3C5FB218818480022814206D117 +:1062D0006188814203D1A188814200D101220699BF +:1062E000280012F045FBB870287A032826D10698BA +:1062F0000521042821D005281AD00D281ED11CE024 +:1063000000A5008040A3008000A8008024F300C006 +:10631000F0580004704001C08CF900C0204E00000D +:10632000A80400043805000434F800C0FFFF000092 +:10633000687A022801D0012800D1B970380048E7F6 +:1063400010B50400FBF746FE012805D1200017F325 +:10635000DBF90020C04310BD002010BDFFB5FF21B8 +:1063600081B006005D310B9FFFF73FFF040002D1B3 +:10637000401E05B0F0BD2089039A05190A23002F9D +:10638000009200D10C235920C0003118029A20003D +:10639000FFF780FF022028700020687004982035E5 +:1063A0002870000A6870218921810A998520015589 +:1063B0002000FFF7C5FFDCE77CB50C00150006994F +:1063C0000022019200912A002100FFF7C7FF7CBD47 +:1063D0007CB50C00150006990122019200912A005B +:1063E0002100FFF7BBFF7CBDF0B5150007000E00D4 +:1063F0000A0085B00024290068460FF36CFB0028D2 +:1064000013D12B001D3B16F33EEE11100A10101095 +:10641000100E0E0E0E0E1010100E10100E00307812 +:106420006B4618730CE00024E443072D06D1002EC0 +:1064300004D00822310003A816F308EC002C03D185 +:106440003800694621F080EA200092E7F0B5130099 +:1064500087B006AA00921A00002505AB07F0F9FBE9 +:106460000699059888422AD00DF07CF80DF0CFFCF3 +:10647000FD4E3068B10C88433060059800281ED06E +:10648000002401AF01200599A04008420BD0A000D4 +:1064900078556D1C042C06D101200BF3C5FB306828 +:1064A000E10208433060641C0D2CEBDD002D06DD9D +:1064B000FF20785501A80BF329FB0BF3DFFB88E6DF +:1064C0000A00012110B5FFF7C1FF012010BD10B572 +:1064D0008A781407A30F022B07D101282AD1C87884 +:1064E000C10727D1800725D422E0A40F15D11309B5 +:1064F00016F3C8ED0E080808081E1E20201E1E08F0 +:106500001E1E0A20022010BD012811D0032811D11F +:106510002031087804280DD10AE0012B0AD1130993 +:10652000083B16F3B0ED0807070705050505050745 +:10653000012010BD032010BD010070B50A008C7849 +:10654000123225070020AE0F931F022E0CD1CC78FB +:10655000E50705D1A00701D4100070BD180070BD7B +:10656000A207FCD4881D70BDAD0FF5D0012EFAD165 +:1065700022090A2AF6D00E2AF0D00F2AEED070BDDA +:1065800010B504001EF043FE617A022912DC2916C0 :10659000010000009C63000000040000E7D3A3B6E4 -:1065A000ECF500C0FFFF000003280ED1069805217E -:1065B000042809D0052802D00D2806D104E0687A05 -:1065C000022801D0012800D1B970380047E710B582 -:1065D0000400FBF705FC012805D1200017F39EF805 -:1065E0000020C04310BD002010BDFFB5FF2181B0C9 -:1065F00006005D310B9FFFF73EFF040002D1401EF5 -:1066000005B0F0BD2089039A05190A23002F0092D6 -:1066100000D10C23BB2080003118029A2000FFF724 -:106620007FFF0220287000206870049820352870B1 -:10663000000A6870218921810A998520015520006E -:10664000FFF7C5FFDCE77CB50C00150006990022BA -:10665000019200912A002100FFF7C7FF7CBD7CB5A5 -:106660000C00150006990122019200912A002100D8 -:10667000FFF7BBFF7CBDF0B5150007000E000A0058 -:1066800085B00024290068460FF32FFA002813D1A3 -:106690002B001D3B16F300ED11100A101010100E08 -:1066A0000E0E0E0E1010100E10100E0030786B46ED -:1066B00018730CE00024E443072D06D1002E04D00B -:1066C0000822310003A816F3CCEA002C03D13800CD -:1066D000694621F00AE9200092E7F0B5130087B07F -:1066E00006AA00921A00002505AB07F071FC069976 -:1066F000059888422AD00DF0FFF80DF065FDFE4E9A -:106700003068B10C88433060059800281ED0002402 -:1067100001AF01200599A04008420BD0A000785598 -:106720006D1C042C06D101200BF388FA3068E102BD -:1067300008433060641C0D2CEBDD002D06DDFF20CE -:10674000785501A80BF3ECF90BF3A2FA87E60A00DF -:10675000012110B5FFF7C1FF012010BD10B58A78E7 -:106760001407A30F022B07D101282AD1C878C1072B -:1067700027D1800725D422E0A40F15D1130916F3E1 -:106780008CEC0E080808081E1E20201E1E081E1E67 -:106790000A20022010BD012811D0032811D1203178 -:1067A000087804280DD10AE0012B0AD11309083B0F -:1067B00016F372EC08070707050505050507012014 -:1067C00010BD032010BD010070B50A008C78123294 -:1067D00025070020AE0F931F022E0CD1CC78E507C1 -:1067E00005D1A00701D4100070BD180070BDA2072C -:1067F000FCD4881D70BDAD0FF5D0012EFAD1220951 -:106800000A2AF6D00E2AF0D00F2AEED070BD10B5AD -:1068100004001EF00EFD617A022904D16030007878 -:10682000022807D203E0032904D0012902D0207AEC -:10683000012801D1012010BD002010BD002810B595 -:1068400009D01EF0CFFC002805D0192149014018BD -:10685000007A012800D0002010BD70B504001BF0A4 -:10686000DDFB0500E17AA07A1EF0F3FC0FE0E068A2 -:10687000C00407D52000FCF779FA020001212000AE -:1068800012F0ABFAE27AA17A200005F052FE040081 -:10689000EDD128001BF0C6FB70BD10B504001EF042 -:1068A000A1FC416C002909D09B2189004218934921 -:1068B00003004118643320000FF352FA10BD10B5E5 -:1068C00004008E4820180FF398FA1320400100218D -:1068D0002018017281720520C0012018816010BD4E -:1068E00070B505001EF07EFC040028001EF0A1FC1F -:1068F0008F218900007A61180C00820720342079EA -:10690000920F002817D0002A15D1227A25311207BC -:10691000D60F0FF324F9207A0007C00FB04201D040 -:10692000FBF7EBFD280010F0D3FC207A0007C10F25 -:10693000287A0CF09FFF70BD10B504001EF052FCC9 -:106940008F218900401800222D210A5425300FF391 -:106950001DF92000FFF7C4FF10BDF8B505001EF0BB -:1069600041FC1321490141180C780923DF22EF264D -:106970009B01022C07D10F79C01837400F71017E9F -:106980000024114019E05D4C443C245CE40702D132 -:106990008C78002C00D001240F7937406E78982B2A +:1065A00004D160300078022807D203E0032904D028 +:1065B000012902D0207A012801D1012010BD00203C +:1065C00010BD002810B509D01EF004FE002805D02B +:1065D000192149014018007A012800D0002010BD7F +:1065E00070B504001BF0F6FB0500E17AA07A1EF0FE +:1065F00028FE0FE0E068C00407D52000FCF7BAFCD5 +:1066000002000121200012F0B8FAE27AA17A2000FB +:1066100005F081FE0400EDD128001BF0DFFB70BD0A +:1066200010B504001EF0D6FD416C002909D09B2155 +:1066300089004218924903004118643320000FF387 +:106640008FFB10BD10B504008D4820180FF3D5FB4B +:106650001320400100212018017281720520C00121 +:106660002018816010BD70B505001EF0B3FD040058 +:1066700028001EF0D6FD8F218900007A61180C00D9 +:10668000820720342079920F002817D0002A15D1D4 +:10669000227A25311207D60F0FF361FA207A00070C +:1066A000C00FB04201D0FCF72CF8280010F090FC8D +:1066B000207A0007C10F287A0CF01CFF70BD10B5BE +:1066C00004001EF087FD8F218900401800222D2133 +:1066D0000A5425300FF35AFA2000FFF7C4FF10BD0B +:1066E000F8B505001EF076FD1321490141180C781C +:1066F0000923DF22EF269B01022C07D10F79C01856 +:1067000037400F71017E0024114019E05C4C443C7D +:10671000245CE40702D18C78002C00D001240F798E +:106720003740E607F60E3743002C0F7104D1C1182D +:10673000097E2022114302E0C118097E1140C018D1 +:106740000176280010F044FC280010F0C9FC20005D +:106750000CF344F8F8BD10B504001EF03BFD132205 +:1067600052010021801881702000FFF7B9FF10BD91 +:1067700010B5040020001EF054FD603000780128A0 +:1067800002D920001DF0E3FEE27AA17A200005F094 +:10679000C2FD0400EED110BD70B504001EF01AFD5C +:1067A0001321490143181A780921FB258901022A7E +:1067B00001D1002202E0002A05D101224018417EC9 +:1067C000294041760FE0DA78002A00D00122002A21 +:1067D00004D143185B7E04252B4302E043185B7E03 +:1067E0002B40401843760121002A00D000212000D0 +:1067F000FFF766FB200010F073FC70BD10B50400BD +:106800001EF0E8FC1322520100218018C170200004 +:10681000FFF7C2FF10BD1B4A831A90420ED005DC61 +:10682000194A801A0AD007280ED107E0174818180D +:1068300008D07D22D200801A06D101E000207047E6 +:1068400001207047022070470E29F9D8F6E7002989 +:1068500003D00E2901D10B4870470A48C01F70476A +:1068600010B5040008001100FFF7F1FF2070000AC6 +:106870006070012BE2700BD10A200EE000A30080B3 +:10688000610200006E09000060090000CEF9FFFF00 +:10689000022B01D1282000E01420A07010BD10B5FB +:1068A000040007F022F8012801DD012000E00020AB +:1068B000002C06D0012C07D0022C01D10BF32AFCAE +:1068C00010BD0DF0B5FB10BD0DF0C0FB10BDFEB549 +:1068D00004002120405C0E00210000257E312F00A5 +:1068E0000028019125D00B218901611849692B22CB +:1068F000525C90423BD130002C3122301AF08EFF96 +:10690000002834D1207A012502281FD130000C3014 +:106910001EF0E0FC00280AD0C168C90416D4A17A90 +:10692000827A914212D1E17AC07A81420ED1012756 +:106930000CE0207A022836D120001EF04BFCFF30FC +:10694000FF30801C407F800711D5012530001230B8 +:106950000199062200901AF061FF002807D0344800 +:10696000009906221AF05AFF002800D00025207A4C +:10697000022816D1012D07D101980622B11D1AF067 +:106980004DFF002800D101271DF061FF002808D02D +:10699000012F06D1012D04D102201EF01566A4227C :1069A000010000009867000000040000B40970DADC -:1069B000E607F60E3743002C0F7104D1C118097E8B -:1069C0002022114302E0C118097E1140C01801764F -:1069D000280010F087FC280010F010FD20000BF3B9 -:1069E00007FFF8BD10B504001EF006FC132252018B -:1069F0000021801881702000FFF7B9FF10BD10B58D -:106A0000040020001EF01FFC60300078012802D92D -:106A100020001DF0E0FDE27AA17A200005F093FD50 -:106A20000400EED110BD70B504001EF0E5FB13218B -:106A3000490143181A780921FB258901022A01D14D -:106A4000002202E0002A05D101224018417E29409F -:106A500041760FE0DA78002A00D00122002A04D122 -:106A600043185B7E04252B4302E043185B7E2B40DA -:106A7000401843760121002A00D000212000FFF7B2 -:106A800059FB200010F0BAFC70BD10B504001EF0D8 -:106A9000B3FB1322520100218018C1702000FFF7C0 -:106AA000C2FF10BD1B4A831A90420ED005DC1A4A61 -:106AB000801A0AD007280ED107E01848181808D005 -:106AC0007D22D200801A06D101E00020704701200B -:106AD0007047022070470E29F9D8F6E7002903D045 -:106AE0000E2901D10B4870470A48C01F704710B5E6 -:106AF000040008001100FFF7F1FF2070000A607029 -:106B0000012BE2700CD10A200FE0000000A30080EE -:106B1000610200006E09000060090000CEF9FFFF6D -:106B2000022B01D1282000E01420A07010BD10B568 -:106B3000040007F043F8012801DD012000E00020F7 -:106B4000002C06D0012C07D0022C01D10BF3ECFA5B -:106B500010BD0DF045FC10BD0DF050FC10BDFEB594 -:106B600004002120405C0E0021000025A2312F00EE -:106B70000028019122D09E210A5D90423CD1210043 -:106B800030007E3122301AF077FF002834D1207A8D -:106B9000012502281FD130000C301EF0A6FB002872 -:106BA0000AD0C168C90416D4A17A827A914212D15E -:106BB000E17AC07A81420ED101270CE0207A0228C6 -:106BC00036D120001EF018FBFF30FF30801C407FC4 -:106BD000800711D50125300012300199062200905E -:106BE0001AF04AFF002807D03348009906221AF00D -:106BF00043FF002800D00025207A022816D1012D5D -:106C000007D101980622B11D1AF036FF002800D1E5 -:106C100001271DF05AFE002808D0012F06D1012DB2 -:106C200004D102201EF038FB01F03AF82800FEBD26 -:106C30000128FBD1CEE7FFB583B01C000622070078 -:106C4000012001903800C030029046687761707B67 -:106C5000400840007073029840680500AC35B230BF -:106C600016F308E80598002805D0280005990622A3 -:106C70000C3016F300E8E87897210840E870387A7D -:106C8000022804D102984168380020F03CEE002C24 -:106C900003D020780121084320703000FFF7A1FCC9 -:106CA000002801D1019005E0002C03D02078400895 -:106CB00040002070019893E460EB31008168002966 -:106CC00007D17121095CC943090704D1C06D0028AF -:106CD00001D00120704700207047FF4AFE4B11543D -:106CE0004A00521892085B1C89081A545A1C115405 -:106CF000704770B50C0048780978F74E00020025FF -:106D00000843B61E012816D10221072006F03CFADE -:106D1000002801D0012070BDE078082803D90820A0 -:106D20007070E07000E07070A078307071780020B2 -:106D3000FFF7D3FF03E07078E0703078A070280090 -:106D400070BD0322002112028018C16201634163F9 -:106D5000816370470100E14810B504F3DDFE0100D6 -:106D6000DE480C3804F39AFE10BD4169496815E00D -:106D7000814212D10869002802D0CA68C26002E0CC -:106D80004A69C8685060C868002802D00969016172 -:106D900006E008694969886002E0C9680029E7D10E -:106DA0000020704770B505000C001EF0EF7CAC327F +:1069B0006BFC01F01EF82800FEBD0128FBD1CEE7DC +:1069C000FFB583B01C0006220700012001903800AB +:1069D0008030029086697761707B40084000707358 +:1069E000029880690500AC35B23016F344E9059889 +:1069F000002805D02800059906220C3016F33AE944 +:106A0000E87897210840E870387A022804D1029883 +:106A10008169380020F0B0EF002C03D020780121EC +:106A2000084320703000FFF79FFC002801D101903F +:106A300005E0002C03D02078400840002070019829 +:106A400091E4000060EB31008168002907D17121D9 +:106A5000095CC943090704D1C06D002801D0012099 +:106A6000704700207047FF4AFE4B11544A005218ED +:106A700092085B1C89081A545A1C1154704770B54F +:106A80000C0048780978F74E000200250843B61E2E +:106A9000012816D10221072006F009FA002801D0AA +:106AA000012070BDE078082803D908207070E070DC +:106AB00000E07070A078307071780020FFF7D3FF8D +:106AC00003E07078E0703078A070280070BD032279 +:106AD000002112028018C162016341638163704723 +:106AE0000100E14810B505F317F80100DE480C3845 +:106AF00004F3D4FF10BD4169496815E0814212D109 +:106B00000869002802D0CA68C26002E04A69C86801 +:106B10005060C868002802D00969016106E0086970 +:106B20004969886002E0C9680029E7D10020704700 +:106B300070B505000C001EF07EFB0C30C26D816844 +:106B400060305218FF2195312170090A61700821C7 +:106B5000A1700021E170807CA0722900FF31E272F7 +:106B600006224A31201D16F386E80C2070BDFEB5C2 +:106B700004000020050002900E00200000941EF08A +:106B800033FB070035E020001EF055FBE1680C30B8 +:106B9000C90428D5010060318A7CB24223D0002E7E +:106BA00002D0007D01281ED18E74029800280BD1DE +:106BB0002020C05D0C2242435523643201A902A863 +:106BC000FEF7EBFD019D103529002000FFF7B0FF17 +:106BD00001002D180198C27A837A12021A435118C3 +:106BE0008172090AC172E27AA17A200005F09DFB48 +:106BF0000400002CC7D10299002902D00098FEF7AA +:106C000097FDFEBD70B5050002201EF0FDFA0CE0F8 +:106C10002000FFF7E0FC002803D029002000FFF748 +:106C2000A6FF217A200005F0F5F80400F0D102203B +:106C300015F09FFA0DE02000FFF7CDFC002804D0EE +:106C400029002000FFF793FF70BD0221200015F0FE +:106C50009FFA0400EFD170BD70B50125002104F04A +:106C600004FF8048801E007800280FD07D4CE41C73 +:106C7000207800280AD0280004F0ABFE611E0978B5 +:106C8000884203D800202070FFF7BCFF70BD10B50C +:106C9000040010D060690168491E0160A068FFF718 +:106CA000DBFFA06800211BF08FF82000FFF723FF17 +:106CB0002000FFF715FF10BD10B51EF095FA8F21CB +:106CC00089004418C03401E0FFF7E1FFA06B002801 +:106CD000FAD110BD010010B54A7A0020022A03D172 +:106CE00008001EF0A8FA0C3010BD10B5FFF7F2FF37 +:106CF0000021C1650166416606216C3016F356E835 +:106D000010BD10B50400FFF7E5FF0021017581609B +:106D1000C16001612000FFF7E8FF10BD524870B567 +:106D20000C3804F38AFE504804F387FE4F4E0024CB +:106D3000250018206043811935504B484D600C38B0 +:106D400004F3ACFE641C0C2CF3D308210020FFF7E5 +:106D50008AFE002070BD70B505001EF06CFA0400BC +:106D60000C342000FFF770FE00281BD1A07FC00765 +:106D700018D10121280020F0B4ED002812D10B20F9 +:106D800080012818406940308189394816F3C2ECE7 +:106D90002168884206D22800FCF744FE002801D171 +:106DA000012070BD002070BD10B5FFF7FFB84AC8C4 :106DB00001000000946B0000000400004066056EB6 -:106DC0004CFA0C30C26D816860305218FF21953149 -:106DD0002170090A61700821A1700021E170807C96 -:106DE000A0722900FF31E27206227231201D15F3D4 -:106DF0004CEF0C2070BDFEB5040000200500029091 -:106E00000E00200000941EF001FA070035E020007B -:106E10001EF023FAE1680C30C90428D50100603166 -:106E20008A7CB24223D0002E02D0007D01281ED1E0 -:106E30008E74029800280BD12020C05D0C224243A2 -:106E40005523643201A902A8FEF7D1FB019D10353C -:106E500029002000FFF7B0FF01002D180198C27A29 -:106E6000837A12021A4351188172090AC172E27AB6 -:106E7000A17A200005F071FB0400002CC7D1029913 -:106E8000002902D00098FEF77DFBFEBD70B505001D -:106E900002201EF0CBF90CE02000FFF7E3FC0028F5 -:106EA00003D029002000FFF7A6FF217A200005F07B -:106EB0000FF90400F0D1022015F07BFB0DE020005B -:106EC000FFF7D0FC002804D029002000FFF793FF33 -:106ED00070BD0221200015F07BFB0400EFD170BDD6 -:106EE00070B50125002104F02AFF8048801E00783B -:106EF00000280FD07D4CE41C207800280AD0280000 -:106F000004F0D1FE611E0978884203D80020207069 -:106F1000FFF7BCFF70BD10B5040010D060690168B8 -:106F2000491E0160A068FFF7DBFFA06800211BF08D -:106F300079F82000FFF723FF2000FFF715FF10BDB1 -:106F400010B51EF063F98F2189004418C03401E0A8 -:106F5000FFF7E1FFA06B0028FAD110BD010010B5CA -:106F60004A7A0020022A03D108001EF076F90C307C -:106F700010BD10B5FFF7F2FF0021C1650166416643 -:106F800006216C3015F31CEF10BD10B50400FFF79F -:106F9000E5FF002101758160C16001612000FFF7FC -:106FA000E8FF10BD524870B50C3804F350FD50484E -:106FB00004F34DFD4F4E0024250018206043811935 -:106FC00035504B484D600C3804F372FD641C0C2C9A -:106FD000F3D308210020FFF78AFE002070BD70B5B2 -:106FE00005001EF03AF904000C342000FFF770FE93 -:106FF000002817D1A07FC00714D10121280020F05C -:1070000040EC00280ED1A020415B3B4816F38CEBEE -:107010002168884206D22800FCF719FC002801D11B -:10702000012070BD002070BD10B5FFF797FF040070 -:1070300001E0FFF770FF206E0028FAD110BDF3B514 -:1070400081B00E0001981EF008F9040001981EF0AE -:10705000DDF807000C341AF0F5FF0500002E11D002 -:10706000617D0020002900D06075217D012909D1B2 -:107070002075032000023818C16A491EC16201E070 -:10708000FFF749FFE0680028FAD10198FFF7CCFF2D -:107090000198FFF7A4FF002807D001980022FF30D5 -:1070A0006130018B019820F004EC28001AF0CEFF2B -:1070B000FEBDF7B584B005000E00486803902800B7 -:1070C000FFF74CFF009003980024002872D003982B -:1070D0008068029001890F183800143001903068E0 -:1070E000FC6D401E3060029808E0000072EF00C0A6 -:1070F000A03001C0742F01C08813000004F0EFFD20 -:10710000012802D10298FFF7EBFE01984078002891 -:1071100003D1E078F7210840E070687A02281DD199 -:10712000287A06281AD1A079C0070CD13068002827 -:107130000CD100986030807C002807D10221280003 -:1071400020F09EEB00E00698002803D0E078202194 -:10715000084302E0E078DF210840E070287A032845 -:1071600009D16820C05D001F042804D3019A3900AA -:10717000280016F0A4FD6820C05D0C28A07812D16C -:107180000007800F029802D10CF0CCFD01E00CF05A -:10719000F3FD0400687A02282DD1306800282AD136 -:1071A0000022110024E00107890F04D102980CF09D -:1071B000FBFD10E02BE000090C2801D0E234028234 +:106DC00093FF040001E0FFF76CFF206E0028FAD16A +:106DD00010BDF3B581B00E0001981EF036FA040024 +:106DE00001981EF00BFA07000C341BF007F80500A1 +:106DF000002E11D0617D0020002900D06075217D1A +:106E0000012909D12075032000023818C16A491EE2 +:106E1000C16201E0FFF745FFE0680028FAD1019860 +:106E2000FFF7CCFF0198FFF7A0FF002807D00198DB +:106E30000022FF304130018A019820F074ED2800D3 +:106E40001AF0E0FFFEBDF7B584B005000E004868FB +:106E500003902800FFF748FF0090039800240028C3 +:106E600071D003988068029001890F18380014309F +:106E70000190FC6D306807E0E2F100C0843001C091 +:106E8000582F01C088130000401E3060029804F0A3 +:106E9000C6FD012802D10298FFF7E8FE019840786C +:106EA000002803D1E078F7210840E070687A0228D2 +:106EB0001DD1287A06281AD1A079C0070CD13068D4 +:106EC00000280CD100986030807C002807D1022176 +:106ED000280020F010ED00E00698002803D0E078AC +:106EE0002021084302E0E078DF210840E070287AA2 +:106EF000032809D16820C05D001F042804D3019A2B +:106F00003900280016F03CFD6820C05D0C28A078F0 +:106F100012D10007800F029802D10CF047FD01E06A +:106F20000CF06EFD0400687A02282DD1306800282C +:106F30002AD10022110024E00107890F04D1029810 +:106F40000CF076FD10E02BE000090C2801D004289D +:106F500005D10198C16902980CF0DEFD04E00299A8 +:106F60003A0028001CF0BFF80400687A02280BD110 +:106F70002800FFF7FAFE002806D0FF205130415BC1 +:106F80000022280020F0CEEC002C03D10298002132 +:106F90001AF024FF0398FFF7B8FD0398FFF7AAFD46 +:106FA000200007B0F0BD70B505000C0004E0002221 +:106FB00021002800FFF747FF20680028F7D170BDA7 +:106FC0003EB569460400FFF7BDFD030055212000D2 +:106FD0006A46FEF772FC3EBDF3B5002483B00E0096 +:106FE00003982700019400F0A9FB009003981EF07D +:106FF00005F9332109014518002E36D0039800F019 +:107000009FFB04001DF037FC002813D002201EF067 +:1070100045F9039988420DD1208802280AD10098A9 +:10702000C030007E002805D1FBF74BF8002801D0C6 +:10703000012000E0002000280ED06068C00709D0C1 +:107040000398007A04F012FF002800D0012760683E +:10705000C00701D10120019003988030007A0CF024 +:1070600059FC04000C2002902EE0002017F32BF8AE +:10707000F9E7686880680189401860300299002E3D +:10708000017213D02968012901D0012C04D1019982 +:10709000002901D01421417228680022012801D85A +:1070A000002F08D0012C06D9012204E02868012213 +:1070B000012800D8002203982900FFF7C4FE012808 +:1070C00002D1002E00D0641E2868002803D0002EB4 +:1070D000CFD0002CCDD1002F0AD0002C08D00098A2 +:1070E00014228030C06B01040398090C00F027FEC5 +:1070F00005B0F0BDF8B505000E001AF07FFE0700E0 +:10710000287A032804D1280016F016FC00284FD056 +:10711000687A022841D128001EF070F80321090284 +:107120004018C06A002803D100212800FFF754FF4F +:107130002800FCF7F5FC002E04D00B208001281855 +:10714000406985682800FFF7CFFD0400E868C004A7 +:1071500019D5207D002816D121005C312800FFF7C9 +:1071600022FF210008312800FFF71DFFF9480078B1 +:10717000002808D06034A07C002804D00020A0742F +:107180002800FFF71DFF002E12D0EA7AA97A280006 +:1071900005F0D5F80500D5D10AE0297A032907D1F1 +:1071A000032805D17120C00029182800FFF7FBFE35 +:1071B00038001AF027FEF8BDF3B581B02B59C66927 :1071C00001000000906F00000004000013BCD60214 -:1071D000042805D10198C16902980CF063FE04E00F -:1071E00002993A0028001BF0E2FF0400687A0228A6 -:1071F0000BD12800FFF7FDFE002806D0FF207930D4 -:10720000415B0022280020F05EEB002C03D10298A5 -:1072100000211AF011FF0398FFF7BBFD0398FFF759 -:10722000ADFD200007B0F0BD70B505000C0004E016 -:10723000002221002800FFF746FF20680028F7D130 -:1072400070BD3EB569460400FFF7C0FD030055213F -:1072500020006A46FEF75BFA3EBDF3B5002483B01A -:107260000E0003982700019400F0A6FB00900398FD -:107270001DF0D6FF332109014518002E36D00398A2 -:1072800000F09CFB04001DF034FB002813D002200A -:107290001EF016F8039988420DD1208802280AD1E1 -:1072A0000098C030007E002805D1FAF710FE0028B3 -:1072B00001D0012000E0002000280ED06068C00747 -:1072C00009D00398007A04F02FFF002800D001278E -:1072D0006068C00701D1012001900398A030807D33 -:1072E0000CF0DEFC04000C2002902EE0002016F3CF -:1072F000F4FEF9E7686880680189401860300299F7 -:10730000002E017213D02968012901D0012C04D16B -:107310000199002901D01421417228680022012816 -:1073200001D8002F08D0012C06D9012204E02868DA -:107330000122012800D8002203982900FFF7C3FE8C -:10734000012802D1002E00D0641E2868002803D036 -:10735000002ECFD0002CCDD1002F0AD0002C08D089 -:10736000009814228030C06B01040398090C00F0CF -:107370004AFE05B0F0BDF8B505000E001AF06CFE2F -:107380000700287A032804D1280016F089FC002879 -:107390004FD0687A022841D128001DF041FF032117 -:1073A00009024018C06A002803D100212800FFF715 -:1073B00054FF2800FCF7D4FA002E04D00B208001E3 -:1073C0002818806B85682800FFF7D2FD0400E86864 -:1073D000C00419D5207D002816D121005C31280079 -:1073E000FFF722FF210008312800FFF71DFFF848B2 -:1073F0000078002808D06034A07C002804D0002049 -:10740000A0742800FFF71DFF002E12D0EA7AA97A97 -:10741000280005F0ACF80500D5D10AE0297A032947 -:1074200007D1032805D1F720800029182800FFF78D -:10743000FBFE38001AF014FEF8BDF3B581B00D0064 -:1074400001981DF014FF040001981DF0E9FE0600EC -:107450000C341AF001FE070003200002002D2575F0 -:107460000AD13018C16A002901D0491EC1620198B1 -:107470000021FFF780FF1FE0012D1DD1627D012358 -:1074800000211D00002A00D165753018C26A521C07 -:10749000C262CF48007800280ED0002218001300E6 -:1074A00004F02CFC012807D16034A07C002803D113 -:1074B000A5740198FFF7C5FE38001AF0D1FDFEBD96 -:1074C000F8B50D000600088901234718487BC0075E -:1074D0002CD1C04800220188BF481DF0A2FA040048 -:1074E00026D1BC4800220188BB4803231DF099FA2D -:1074F00004001DD1B649C868401CC860707A0228D3 -:1075000014D1F86D8179C90710D180780107890FEE -:107510000CD100090C2809D130001DF0A8FE8036DE -:10752000F17F0C3001600221403001750020F8BD70 -:10753000287B20736661A8881C26A080A51970226C -:1075400039002800268115F314ECAC202081201886 -:10755000E865F96D0A88203215F3A0EB200026813A -:10756000F8BDF3B585B00120002402900598019480 -:107570001DF07DFE0598FFF7FBFC070005005C375A -:107580001AF06AFD03900598007A032804D1059843 -:1075900016F086FB002875D060350495E87B400620 -:1075A000810F12D03968800F4000884200D3080054 -:1075B0000499897B401A05062D0E67D0786880688B -:1075C000018940186030067A1BE038682854161785 +:1071D0000D0001981EF043F8040001981EF018F805 +:1071E00006000C341AF014FE070003200002002DE4 +:1071F00025750AD13018C16A002901D0491EC16223 +:1072000001980021FFF780FF1FE0012D1DD1627D55 +:10721000012300211D00002A00D165753018C26AC3 +:10722000521CC262D048007800280ED000221800FC +:10723000130004F003FC012807D16034A07C00286F +:1072400003D1A5740198FFF7C5FE38001AF0E4FDDC +:10725000FEBDF8B50D000600088901234718487BDC +:10726000C00730D1C14800220188C1481DF0A5FBEC +:1072700004002AD1BD4800220188BD4803231DF027 +:107280009CFB040021D1B849C868401CC860707AD2 +:10729000022818D1F86D8179C90714D180780107C7 +:1072A000890F10D100090C280DD130001DF0D7FF37 +:1072B0000B218901711849690C304031897B0160CB +:1072C0000221403001750020F8BD287B20736661E3 +:1072D000A8881C26A080A5197022390028002681C4 +:1072E00015F346EDAC2020812018E865F96D0A8879 +:1072F000203215F3D4EC20002681F8BDF3B585B01B +:10730000012000240290059801941DF0A8FF059823 +:10731000FFF7F4FC070005005C371AF079FD0390D5 +:107320000598007A032804D1059816F00FFB002871 +:1073300075D060350495E87B4006810F12D039681E +:10734000800F4000884200D308000499897B401ACE +:1073500005062D0E67D07868806801894018603076 +:10736000067A1BE03868F3E77868002813D0806855 +:10737000641C018924064018322160304172007A71 +:10738000240EB04201D0002102910600059800228F +:107390003900FFF762FD6D1E2D062D0E012DE3D87D +:1073A00078688068018940180299012922D101007A +:1073B00060310A7AB2421DD1C26D641C92782406F3 +:1073C000240E1207920F06D1012101910078400787 +:1073D000400F069009E031224A7202780100143110 +:1073E00010231A430270008808840598002239008F +:1073F000FFF733FD049844730498C07B4006800F68 +:1074000004D004980499807B00198873019801289E +:1074100005D13968069A0598330016F0C0FF039825 +:107420001AF0FAFCC7E506980006000E16F344FEB3 +:1074300016F353FE0600ECE7FEB5040004F0F9FA7B +:1074400007006069029020890025061902981DF046 +:1074500006FF0C3001900120012F009010D0009900 +:10746000200004F016FB01280AD141492069884216 +:1074700001D1032F04D03C498868401C0125886055 +:1074800039480078002821D0374F01247F1D3878F3 +:1074900000280ED1009804F0B0FAB91E097888428D +:1074A00004D301203C70FFF7C1FB0FE038780028BF +:1074B0000CD0F06D8079C00708D101986030817CD4 +:1074C000002903D184740298FFF784FD2800FEBDD3 +:1074D00042695368002B03D150604169886070474E +:1074E000002907D1186141694A68C260002202611F +:1074F00048607047CA68002A01D0106101E04A69FB +:107500009060CA68C2600161C86070470100496943 +:107510000020496800290BD003E00800C968002951 +:1075200006D08A681389D218D26DD2781207F4D4A3 +:10753000704702000020002A08D0012A06D0022A43 +:1075400001D0032A07D18A4205D303E08A4201D041 +:10755000012900D10120704770B50E004069002557 +:107560004468002C16D009E0E0F100C026F400C009 +:10757000640400042500E468002C0BD0A068018995 +:10758000405C4007400F16F397FD3100FFF7D1FF35 +:107590000128EFD0280070BD03B50820C8406B4615 +:1075A0001978084000D001200CBD70B500241AF0F5 +:1075B0002FFC0500654804F35BFA002805D00400A1 +:1075C000010062480C3004F37DFA28006629E58743 :1075D000010000008C73000000040000AC79F3B1DE -:1075E000F3E77868002813D08068641C01892406BA -:1075F0004018322160304172007A240EB04201D02E -:10760000002102910600059800223900FFF765FD70 -:107610006D1E2D062D0E012DE3D878688068018936 -:1076200040180299012922D1010060310A7AB24240 -:107630001DD1C26D641C92782406240E1207920F8D -:1076400006D10121019100784007400F069009E022 -:1076500031224A7202780100143110231A43027059 -:1076600000880884059800223900FFF736FD049849 -:1076700044730498C07B4006800F04D0049804999A -:10768000807B001988730198012805D13968069A12 -:107690000598330017F029F803981AF0EBFCCBE5B6 -:1076A00006980006000E16F311FD16F320FD0600E5 -:1076B000ECE7FEB5040004F026FB070060690290C9 -:1076C00020890025061902981DF0DBFD0C30019081 -:1076D0000120012F009010D00099200004F043FBFE -:1076E00001280AD141492069884201D1032F04D0E1 -:1076F0003C498868401C012588603A480078002889 -:1077000021D0384F01247F1D387800280ED10098F1 -:1077100004F0DDFAB91E0978884204D301203C70D8 -:10772000FFF7C8FB0FE0387800280CD0F06D8079A7 -:10773000C00708D101986030817C002903D184748E -:107740000298FFF788FD2800FEBD42695368002BB0 -:1077500003D15060416988607047002907D11861E2 -:1077600041694A68C2600022026148607047CA6885 -:10777000002A01D0106101E04A699060CA68C260C5 -:107780000161C8607047010049690020496800290B -:107790000BD003E00800C968002906D08A68138965 -:1077A000D218D26DD2781207F4D4704702000020AC -:1077B000002A08D0012A06D0022A01D0032A07D1C4 -:1077C0008A4205D303E08A4201D0012900D1012079 -:1077D000704770B50E00406900254468002C17D032 -:1077E0000AE0000070EF00C0CEF100C02C000004E1 -:1077F0002500E468002C0BD0A0680189405C40079C -:10780000400F16F363FC3100FFF7D0FF0128EFD0E3 -:10781000280070BD03B50820C8406B4619780840A1 -:1078200000D001200CBD70B500241AF01FFC05002B -:10783000654804F327F9002805D0040001006248D8 -:107840000C3004F349F928001AF014FC200070BD34 -:10785000F7B584B005000F00FFF7E5FF040001D184 -:107860000120E9E41AF002FC00260290E660A7601D -:1078700026613889C719287A03280AD1687A03282B -:1078800007D1F720800028186061806800210191ED -:107890003FE0F86D8079C0070BD028001DF0CAFCCE -:1078A000332109014018002160618068012601919F -:1078B0002FE02800FFF766FB0390FF207930405B44 -:1078C000019038784007400F16F300FC06000B20AB -:1078D00080012818806A012816D1039F3100603783 -:1078E000787C0090FFF796FF00280DD003983100B8 -:1078F0005C3060612000FFF76CFF797C0126C94392 -:10790000090706D0002604E00398012608306061CC -:1079100080680699002902D02000FFF734FF01009B -:107920002000FFF712FF60690168491C012E016009 -:1079300004D10199012228001FF0CEEF02981AF01D -:1079400099FB002078E4002810B507D01DF099FCC1 -:10795000002803D00C30007D012800D0002010BD8D -:10796000FEB505001DF08DFC04001AF07FFB06003B -:10797000287A032809D1280016F09CF9002804D1A0 -:1079800030001AF077FB0120FEBD6069002806D0A8 -:107990002100002214312800FFF79FFB0FE0002098 -:1079A0006B460290597A02221143597201220092C9 -:1079B00002000190029928000023FAF76DF93000C7 -:1079C0001AF058FB0020FEBD943001C0FF487047FC -:1079D000007A022803D0032804D1FD485D0DD57339 +:1075E0001AF024FC200070BDF7B584B005000F0030 +:1075F000FFF7E5FF040001D10120E6E41AF012FCD8 +:1076000000260290E660A76026613889C719287AAB +:1076100003280AD1687A032807D17120C0002818EE +:1076200060618068002101913FE0F86D8079C007BA +:107630000BD028001DF0F6FD332109014018002170 +:1076400060618068012601912FE02800FFF760FB50 +:107650000390FF205130405B019038784007400F85 +:1076600016F334FD06000B2080012818406801281D +:1076700016D1039F31006037787C0090FFF796FFAA +:1076800000280DD0039831005C3060612000FFF7C6 +:107690006DFF797C0126C943090706D0002604E066 +:1076A000039801260830606180680699002902D09D +:1076B0002000FFF735FF01002000FFF713FF60698E +:1076C0000168491C012E016004D1019901222800A2 +:1076D00020F03CE902981AF0A9FB002075E400288C +:1076E00010B507D01DF0C5FD002803D00C30007D7B +:1076F000012800D0002010BDFEB505001DF0B9FD29 +:1077000004001AF08FFB0600287A032809D128000C +:1077100016F026F9002804D130001AF087FB01206A +:10772000FEBD6069002806D0210000221431280027 +:10773000FFF79DFB0FE000206B460290597A022272 +:10774000114359720122009202000190029928000F +:107750000023FAF7A5FB30001AF068FB0020FEBDFD +:10776000783001C0FC487047007A022803D0032813 +:1077700004D1FA487047F9481C3870470020704718 +:10778000FEB5040000200D0002901DF05BFD060018 +:107790002868270025002837C035102852D025DC5E +:1077A0002100E8310D2849D006DC801C71D0012869 +:1077B0006FD1210010313DE0260080360E2826D002 +:1077C0000F2866D1012068622068B84261D1A87F85 +:1077D00000285ED12000743000F330F9706A002870 +:1077E00001D1012030622100403123E0112829D04D +:1077F000122809D0212801D022284AD10100D848D6 +:10780000002204F39DF844E00120287741E00800BD +:1078100000F314F92068B8423BD10120D149286215 +:1078200000200860F06A012833D1B06A012830D105 +:1078300021003431200004F3A2F82AE0080000F30C +:10784000FDF826E02068B84201D101200290687F4F +:1078500002281ED2686A00281BD1A87F002818D1F0 +:10786000FAF743FC002814D0002E12D0F068C004B0 +:107870000FD5300016F044FD1522002101920200C0 +:107880000091029930000023FAF70FFA687F401C3C +:1078900068770020FEBD70B504000800096822006A +:1078A00023001032803323294AD015DC891C1FD0D5 +:1078B0002500C03501291DD0032934D0142918D141 +:1078C0000120A87700201DF0BDFC002810D0012168 +:1078D000490220F074E80BE024292AD0252903D09E +:1078E000262901D0272904D19D48002204F328F835 +:1078F000002070BDF9F7D2FF012003F0CCFA01207F +:1079000003F0CCFA9748002404602000FAF7A5FBA6 +:10791000287F002803D0122003F003F82C770020E2 +:1079200003F01EFAE4E7206F20F04CE821001C3140 +:1079300002E0210064319A63200004F320F8D7E7C5 +:10794000210058319A63F7E710B5086FFFF70CFF75 +:107950000020C0310861132002F0E3FF10BDF8B52C +:107960007D4DFFF701FF87691AF05CFA2C000600D5 +:10797000C0342069002803D004F391FA002020616C +:1079800000222B0000927848D0333A00290004F3FB +:1079900023FA30001AF04AFAF8BDF0B50800C030FA +:1079A00087B00690086F0E0080360C000590FFF738 +:1079B000DBFE05000AF348FA0490326C736C0F008A +:1079C000121A8B4106D2326C0498736C3900801AFB +:1079D000994106E0306C716C049AC043CAEED276CD :1079E000010000008877000000040000FFA320DDF4 -:1079F0007047FC481C38704700207047FEB50500F2 -:107A000000200C0002901DF02FFC060020682F00C3 -:107A10002C002837C034102875D025DC2900E83127 -:107A20000D286CD006DC801C45D0012843D12900EC -:107A300010315EE02E0080360E2847D00F28F5D199 -:107A4000012060622868B842F0D1A07F0028EDD103 -:107A500028007430FFF2FCFF706A002801D1012079 -:107A600030622900403144E011284CD0122823D044 -:107A700021286FD022286DD1A07E022801D00128B4 -:107A800068D1E07E411C0228E17618D2002E61D038 -:107A9000F068C0045ED5300016F0D8FD1322002136 -:107AA00001920091A17E012900D000210200300046 -:107AB0000023FAF700F84DE0012020774AE0CA4899 -:107AC0000722006840211BF0B1F843E00800FFF2F4 -:107AD000BFFF2868B8423DD10120C4492062002080 -:107AE0000860F06A012835D1B06A012832D1290036 -:107AF0003431280003F34DFF2CE004E0FFE70800D9 -:107B0000FFF2A6FF26E02868B84201D101200290CA -:107B1000607F02281ED2606A00281BD1A07F002847 -:107B200018D1FAF7E8F9002814D0002E12D0F06826 -:107B3000C0040FD5300016F089FD152200210192F6 -:107B400002000091029930000023F9F7B4FF607F32 -:107B5000401C60770020FEBD70B504000800096875 -:107B6000220023001032803323294AD015DC891CDF -:107B70001FD02500C03501291DD0032934D0142978 -:107B800018D10120A87700201DF06EFB002810D02E -:107B9000012149021FF0E2EE0BE024292AD0252919 -:107BA00003D0262901D0272904D19148002203F3CC -:107BB000D1FE002070BDF9F785FD012003F0BFFA6A -:107BC000012003F0BFFA8948002404602000FAF77E -:107BD0004AF9287F002803D0122002F0F6FF2C7704 -:107BE000002003F011FAE4E7206F1FF0BCEE210043 -:107BF0001C3102E0210064319A63200003F3C9FEC6 -:107C0000D7E7210058319A63F7E710B5086FFFF7FF -:107C1000E9FE0020C0310861132002F0D6FF10BD3C -:107C2000F8B56F4DFFF7DEFE87691AF029FA2C00D0 -:107C30000600C0342069002803D004F33AF900207C -:107C4000206100222B0000926A48D0333A002900BC -:107C500004F3CCF830001AF017FAF8BDF0B50800BC -:107C6000C03087B00690086F0E0080360C0005907B -:107C7000FFF7B8FE05000AF3F1F80490326C736C5C -:107C80000F00121A8B4106D2326C0498736C3900C3 -:107C9000801A994106E0306C716C049AC043C94364 -:107CA0008018794102902869029A0E00002733005B -:107CB000121ABB4112D22869029A3900801A002296 -:107CC000B1410092230002004B48D433210004F359 -:107CD0008DF806990120087607B0F0BD0698476137 -:107CE000077628880128F7D10598FFF799FFF3E771 -:107CF000FEB53B4EFFF776FE370004008037386B49 -:107D0000012826D020883500C035012806D12869F1 -:107D1000002803D004F3CDF8002129611AF0B0F94E -:107D200001900AF39BF8796438646869002808D1E7 -:107D300000223300009230482269D433310004F32A -:107D400055F80120287601981AF09EF9082002F0D3 -:107D50003CFFFEBD70B504007430FFF279FE2000D8 -:107D6000E830FFF275FEC034206904F3A2F8002564 -:107D70002561606904F39DF8656170BDF3B587B056 -:107D80000600006F0390FFF72DFE029000201DF00B -:107D90006BFA070008983100036830002831403042 -:107DA00005913500C0313400069034308035C03440 -:107DB000092B04917ED009DC9B1C15F3A0E90B3A3A -:107DC0004BA1A167CDD8A5A8BBF2A10031001C3101 -:107DD000232B70D030DC0A2B6ED00B2B6DD00DE036 -:107DE00080480004CC49000404F600C078E2222F49 +:1079F000C9438018794102902869029A0E00002735 +:107A00003300121ABB4112D22869029A3900801A37 +:107A10000022B1410092230002005948D4332100D2 +:107A200004F3E4F906990120087607B0F0BD069842 +:107A30004761077628880128F7D10598FFF799FF55 +:107A4000F3E7FEB5494EFFF799FE37000400803793 +:107A5000386B012826D020883500C035012806D192 +:107A60002869002803D004F324FA002129611AF0C0 +:107A7000E3F901900AF3F2F979643864686900283F +:107A800008D10022330000923D482269D4333100EE +:107A900004F3ACF90120287601981AF0D1F90820F6 +:107AA00002F049FFFEBD70B504007430FFF2D0FF54 +:107AB0002000E830FFF2CCFFC034206904F3F9F96C +:107AC00000252561606904F3F4F9656170BDF3B5C3 +:107AD00087B00600006F0390FFF750FE0290002071 +:107AE0001DF0BAFB07000898310003683000283108 +:107AF000403005913500C031340006903430803577 +:107B0000C034092B04917ED009DC9B1C15F3F6EAE6 +:107B10000B2B48808064C9D4A1A4B7FE800031003B +:107B20001C31232B70D02DDC0A2B6ED00B2B6DD08B +:107B3000122B6CD01C2B6BD1606904F3BAF90027AF +:107B400067612776206904F3B4F92761E86A0128A0 +:107B500007D131680698814203D10599300003F3BB +:107B600018FF01202863002009B0F0BDA0480004E0 +:107B7000EC490004084A000458F300C0F576000000 +:107B800047770000242B76D0252B03D0262B01D05D +:107B9000272BD0D100221900FF4803F3DBFEE2E7D8 +:107BA000002003F085F9002003F07FF9FB49012054 +:107BB00000270860A777207F002803D0122002F05A +:107BC000BAFE277701202862F549FF20F13048638B +:107BD0000398FFF736FFCCE0FDF756F8FDF7F4FA0F +:107BE000686A002801D101202862300000F086FD7B +:107BF0003000FFF758FF03981FF0EEEE002F22D061 +:107C0000F868C00405E071E06CE082E092E059E0C1 +:107C1000B1E018D5380016F07DFB15220021019245 +:107C2000020038000B000091FAF749F8002060626A +:107C30000498FFF20DFF049800226421FFF2BAFEBF +:107C40000498FFF2A7FE31001031300003F3A1FECB +:107C500089E7012068628CE00298807800280BD0C8 +:107C60000298008801289AD1207E002897D1039895 +:107C7000FFF77FFE77E731E00020607673E70120B1 +:107C8000002F60760DD05920039BC00039180622C2 +:107C9000181819F0F5FD002803D1C0490868401CE8 +:107CA000086002980088012863D1207E002860D1F6 +:107CB0000398FFF75EFE5CE001202862300000F0D0 +:107CC0001DFD56E00120A07700201DF0C5FA002818 +:107CD000BED0012149021FF07CEE44E7A9633100C8 +:107CE0006431B2E7A96331005831AEE70121E9629E +:107CF000FFF2AEFEA86A0128AAD131680598814238 +:107D0000A6D1206A0128A3D1310000E003E034317C +:107D10009BE700212963E96A002907D108990968CE +:107D2000082901D1FFF294FE01202862012003F00E +:107D300021F81EE0002F1CD0F868C00419D5039864 +:107D4000FFF77FFE380016F0E5FA152200210192B8 +:107D5000020038000B000091F9F7B1FF0498FFF220 +:107D600077FE049800226421FFF224FE0498FFF2BB +:107D700011FE069969E70898F6E6F7B586B0069809 +:107D8000FFF7FCFC059006981DF056FAFF210490C1 +:107D9000069800242D31FEF764FA050059D0288991 +:107DA000702146191C202C182881200015F326E884 +:107DB00006980BF06CFFA070E068A17840094001C4 +:107DC000084310210843E0601520000203902700BB +:107DD000E66508986037787206995920C00009183E +:107DE000009101916F4B04220221300056CC894151 :107DF00001000000847B0000000400000BCC5569EA -:107E000000F100C0E8490004A3790000F579000002 -:107E1000122B7ED01C2B7DD1606904F354F800270F -:107E200067612776206904F34EF82761E86A012824 -:107E300007D131680698814203D10599300003F3D8 -:107E4000B2FD01202863002009B0F0BD242B77D0BB -:107E5000252B03D0262B01D0272BDCD100221900A3 -:107E6000FF4803F381FDEEE7002003F075F90020E1 -:107E700003F06FF9FB49012000270860A777207FF6 -:107E8000002803D0122002F0AAFE277701202862E2 -:107E9000F549FF20F13048630398FFF733FFCCE04A -:107EA000FCF706FEFDF7BBF8686A002801D1012047 -:107EB0002862300000F07DFD3000FFF755FF039889 -:107EC0001FF05AED002F03E076E070E085E095E0CA -:107ED0001BD0F868C00418D5380016F0C1FB152275 -:107EE00000210192020038000B000091F9F7EDFD2E -:107EF000002060620498FFF2B5FD0498002264211E -:107F0000FFF262FD0498FFF24FFD310010313000A6 -:107F100001E03CE093E003F346FD94E70120686252 -:107F20008BE00298807800280BD002980088012806 -:107F300089D1207E002886D10398FFF77BFE82E757 -:107F400031E0002060767EE70120002F60760DD0C2 -:107F5000BB20039B800039180622181819F0BEFDBB -:107F6000002803D1BF490868401C086002980088B7 -:107F7000012862D1207E00285FD10398FFF75AFEC6 -:107F80005BE001202862300000F013FD55E0012085 -:107F9000A07700201DF072F90028BED0012149020F -:107FA0001FF0E6EC4FE7A96331006431AFE7A96346 -:107FB00031005831ABE712E00121E962FFF252FDD6 -:107FC000A86A0128A9D1316805988142A5D1206A03 -:107FD0000128A2D13100343199E700212963E96AEF -:107FE000002907D108990968082901D1FFF23AFD53 -:107FF00001202862012003F011F81EE0002F1CD0A0 -:10800000F868C00419D50398FFF77CFE380016F015 -:1080100027FB152200210192020038000B0000917D -:10802000F9F753FD0498FFF21DFD04980022642126 -:10803000FFF2CAFC0498FFF2B7FC069967E70898BC -:1080400002E7F7B586B00698FFF7D6FC05900698CC -:108050001DF004F9FF210490069800242D31FEF74D -:1080600046FA050059D02889702146191C202C1881 -:108070002881200014F3CCEE06980BF0CCFFA07002 -:10808000E068A17840094001084310210843E060FE -:108090001520000203902700E66508986037787283 -:1080A0000699BB2080000918009101916F4B0422B2 -:1080B0000221300008F3B4FBF07802210843F0708D -:1080C00007983071000A70710898142827D1059814 -:1080D000008802280AD10C203872039A06982100E1 -:1080E0000BF0B7FE28000BF06FFE10E00498406A1A -:1080F000012804D006981DF099F9002802D000202C -:1081000016F309F83872039928000BF0E9FE040011 -:1081100003D10021280019F0ADFF200094E60720CC -:10812000F0E7F0B51FB48AB00400002008902000EA -:10813000BC30019000201DF0A1F806007ED0F06850 -:10814000FF34C004641C002878DAA020805B0D99FD -:1081500080020290C517A2690C98E369801A9941C0 -:1081600008D3A2690C98E3690D99801A99410F0010 -:10817000069008E00C9AA0690D9B801AE169C04343 -:108180009941CF430690069A206A616A8018794126 -:1081900005910490029A06982B00390014F37AEBAB -:1081A00080360996F17F0E0015F3E6EAA06A441ABC -:1081B000002C00DC3419029A059904982B0014F362 -:1081C0006AEB16001F00029AE1172B00200015F33E -:1081D00090E8861B2648B94100780C00002811D091 -:1081E000870205208002874200D907000021B81BC2 -:1081F000A14105D200212300F61B8B41E064CE2172 +:107E000008F30EFDF07802210843F07007983071F6 +:107E1000000A70710898142827D105980088022854 +:107E20000AD10C203872039A069821000BF055FEF7 +:107E300028000BF00DFE10E00498406A012804D0E1 +:107E400006981DF0F1FA002802D0002016F363F91D +:107E50003872039928000BF087FE040003D100213B +:107E6000280019F0E3FF200088E60720F0E7F0B5CE +:107E70001FB48CB0040000202600BC360A901DF010 +:107E8000F5F900287ED0C168FF34CA040B218901AE +:107E9000641C002A76DA40180B9040690F99403034 +:107EA000808980020290C517A2690E98E369801A42 +:107EB000994108D3A2690E98E3690F99801A9941F4 +:107EC0000F00069008E00E9AA0690F9B801AE169E6 +:107ED000C0439941CF430690069A206A616A801890 +:107EE000794105910490029A06982B00390014F309 +:107EF000D2EC0B9949694031897B0F0015F33CECBA +:107F0000A06A441A002C00DC3C19029A05990498D6 +:107F10002B0014F3C0EC1F000092029A2000E1171E +:107F20002B0015F3E6E9009A801A08902348B9411E +:107F300000780C00002814D08702052080028742B8 +:107F400000D90700089A0021B81AA14107D2089A5F +:107F50000021D01B23008B411C00089001E000246D +:107F600008940B987D2740693F014030827B02983E +:107F7000290015F3CAE8089A05000021B81AA141A2 +:107F80002CD200E02CE0089AE81B00252300121AEE +:107F9000AB4123D2089A2300D01B040002003068B2 +:107FA000AB41121AAB411BD2290009E0084A000478 +:107FB00058F300C000A600806C7A02001DF400C0D7 +:107FC00034600E9A0F9BA018169A594103C2FF49BC +:107FD000FF4A096830688918884201D801200A9050 +:107FE0000A9811B0CBE5F0B507001FB482B0006F5E +:107FF000F84E0190B06900258402059904982B0081 +:10800000220014F348EC2900766BA51A99413C0034 +:10801000FA368034B54205D9E06B8019A84201D9FF +:10802000A81BE063E06B049A059B80180C9A002162 +:10803000594103C2206B01283FD0E06B8119A9424E +:108040003DD83C00C034617E012938D1DF49E04A87 +:1080500009688918884232D30198007A05F0C6FB76 +:1080600000282CD1207E002829D12069002826D183 +:108070001AF09CFD002822D11AF098FD00281ED18C +:10808000D54800220068462103F30BFB002816D1D7 +:10809000FDF71FF9002812D00C9A0092059B049A54 +:1080A0003800FFF7E4FE002809D1FAF732F800287B +:1080B00005D01FF0A0EC002801D10120BFE4002072 +:1080C000BDE4F3B58DB00600006F07901DF0BEF85B +:1080D0000798FFF75DFB070000201DF0C7F806902A +:1080E0000E983100006834310B910C310A91343113 +:1080F0000991743135003400C0358034122808915C +:108100007ED047DC801C7CD001287BD109F3B0FEF7 +:1081100004900020059102900390A062A064E064A6 +:10812000286268626877A8770120F9F7AAFFF868E3 +:10813000E0631CF0C8FB002838D002AA0092059B1F +:10814000049A3000FFF74FFF00282FD00698002830 +:108150002ED00698C068C0042AD5A0480068002820 +:1081600026D0069816F0E0F81522002101920200B0 +:108170000091069801210023F9F7ABFD0898FFF262 +:1081800071FC089800226421FFF21EFC0898FFF29F +:108190000BFC0FE01E2856D01F2874D10998FFF25F +:1081A00061FC606A002801D1012020620A9946E042 +:1081B00001202862606A012813D100206062012139 +:1081C000E062306F49031FF00EEC0998FFF24AFCA1 +:1081D0007D21099800220901FFF2F6FB0998FFF2C0 +:1081E000E3FB206B00281BD13888022818D0786860 +:1081F000C00715D07A49E06B884211D8610E4A4217 :1082000001000000807F0000000400005816860571 -:108210001C0001E00024260009987D27C27F0298F7 -:108220003F01290014F37AEF05000021B81BA1419A -:1082300030D2E81B00252300321AAB412AD2019A22 -:10824000F01B23001668AB410400821BAB4100E029 -:1082500022E021D2019A290014600C9A0D9BA018EB -:10826000149A594103C2084901980968074A0068ED -:1082700089180DE0E849000400F100C000A6008064 -:10828000E8790200C5F100C0C03801C02F08000025 -:10829000884201D80120089008980FB0F0BDF0B5D1 -:1082A00007001FB482B0006FFE4E0190B069002538 -:1082B0008402059904982B00220014F3F6EA2900A1 -:1082C000766BA51A99413C00FA368034B54205D93F -:1082D000E06B8019A84201D9A81BE063E06B049A07 -:1082E000059B80180C9A0021594103C2206B01287C -:1082F0003FD0E06B8119A9423DD83C00C034617E7B -:10830000012938D1E849E94A09688918884232D3F5 -:108310000198007A05F0D3FB00282CD1207E00289C -:1083200029D12069002826D11AF0A4FC002822D1E6 -:108330001AF0A0FC00281ED1DD480022006846216A -:1083400003F3B9F9002816D1FCF7F1FE002812D08A -:108350000C9A0092059B049A3800FFF7ECFE002867 -:1083600009D1F9F7DCFD002805D01FF014EB002837 -:1083700001D10120C4E40020C2E4F3B58DB00600B1 -:10838000006F07901CF074FF0798FFF73FFB070092 -:1083900000201CF07DFF06900E98310000683431FB -:1083A0000B910C310A91343109917431350034004C -:1083B000C0358034122808917ED047DC801C7CD0E8 -:1083C00001287BD109F35EFD049000200591029005 -:1083D0000390A062A064E064286268626877A8776E -:1083E0000120F9F754FDF868E0631CF0AAFA0028B0 -:1083F00038D002AA0092059B049A3000FFF74FFF85 -:1084000000282FD0069800282ED00698C068C004F7 -:108410002AD5A8480068002826D0069816F02AF920 -:1084200015220021019202000091069801210023EB -:10843000F9F755FB0898FFF21FFB0898002264210A -:10844000FFF2CCFA0898FFF2B9FA0FE01E2856D0D6 -:108450001F2873D10998FFF20FFB606A002801D131 -:10846000012020620A9946E001202862606A012802 -:1084700013D1002060620121E062306F49031FF0D8 -:1084800082EA0998FFF2F8FA7D2109980022090191 -:10849000FFF2A4FA0998FFF291FA206B00281BD191 -:1084A0003888022818D07868C00715D08249E06B58 -:1084B000884211D8079802E028E01FE03EE0007AE9 -:1084C00003F05AFE002807D0E06B14220104306F3D -:1084D000090CFFF7C0FD01E00120A062E06A01285D -:1084E0002AD1A06A012827D1286A012824D1099815 -:1084F000FFF2C2FA1EE0300003F35FFA1CE0012035 -:10850000A062E06A012817D1286A11E00127002043 -:10851000AF771CF0BDFE002802D079021FF032EACE -:108520002F620898FFF2A8FAE06A012804D1A06A35 -:10853000012801D10B99DEE70020AEE60E98ACE6EB -:10854000F0B50D0006005849006F096887B0FF318B -:108550005A310904090C0591FFF758FA09F392FC06 -:108560000F0000210291039104902868801C58D0CC -:1085700034008034012856D1E16CA06C00235940AE -:108580005840084325D0A26C0498E36C3900801A47 -:10859000994108D3A26C0498E36C801A3900994180 -:1085A0000D00009007E0049AA06CE16C801AC043B3 -:1085B000B941CD430090E06B009A00212B00121AC4 -:1085C0008B4104D2E06B009A801AA94100E00020A0 -:1085D000E063FCF777FA03F3B7FC1CF0B2F900286C -:1085E00016D0206B002813D102AA0092049A3B00F7 -:1085F0003000FFF754FE00280AD0012200927D22AD -:10860000E36B0599D20002A8FCF7A8FB386DB41102 +:10821000079802E028E01FE03FE0007A03F058FEF4 +:10822000002807D0E06B14220104306F090CFFF71F +:10823000B8FD01E00120A062E06A01282AD1A06A0D +:10824000012827D1286A012824D10998FFF214FCBB +:108250001EE0300003F3B1FB1CE00120A062E06AE5 +:10826000012817D1286A11E001270020AF771DF0FF +:1082700007F8002802D079021FF0BEEB2F620898A1 +:10828000FFF2FAFBE06A012804D1A06A012801D1BB +:108290000B99DEE700200FB07BE40E98FBE7F0B50A +:1082A0000D0006004E49006F096887B0FF315A3152 +:1082B0000904090C0591FFF775FA09F3E3FD0F00B6 +:1082C00000210291039104902868801C58D034004A +:1082D0008034012856D1E16CA06C002359405840ED +:1082E000084325D0A26C0498E36C3900801A9941A8 +:1082F00008D3A26C0498E36C801A390099410D00F0 +:10830000009007E0049AA06CE16C801AC043B94168 +:10831000CD430090E06B009A00212B00121A8B4194 +:1083200004D2E06B009A801AA94100E00020E063CB +:10833000FCF7BEFC03F308FE1CF0CFFA002816D0B1 +:10834000206B002813D102AA0092049A3B0030004F +:10835000FFF753FE00280AD0012200927D22E36B32 +:108360000599D20002A8FCF7D8FD002808D103F334 +:1083700014FE0020310020634031300003F31DFB68 +:108380000020A5E62800A3E6F8B504000F00066F5C +:108390003000FFF707FA050000201CF071FF386875 +:1083A000801C3FD0012805D0152836D016283BD197 +:1083B00001202FE00020F9F76EFE200000F0B2F956 +:1083C000F9F78AFAC034207F0027002803D0122052 +:1083D00002F0C5FA277705480022006869210BE002 +:1083E000A83801C02F08000000A60080F0F100C0EE +:1083F00058F300C0F07F000003F35DF96762677710 +:108400002888012805D1207E002802D13000FFF7FE +:10841000C4FA0520F9F754F904E0210028312000BE +:1084200003F3CBFA0020F8BD3800F8BD10B50B6897 +:10843000046F9B1C1AD0012B13D002008032032B37 +:1084400011D0042B17D1010010319163516A00291A +:1084500001D10121116200F065F920001FF0D0EA7E +:1084600007E0012003E01C309063F6E7002002F0F3 +:1084700036FD002010BD080010BDF3B585B0070023 +:10848000002003901CF0FCFE050006983A000068EE +:10849000B4323E003C0003218036C03425280492CB +:1084A0006AD008DC801C15D0012814D0232852D0B3 +:1084B00024287ED105E0262851D027284FD029280E +:1084C000F7D1A07E01282DD1E07E421C0228E27661 +:1084D00019D9A17686E03800FFF7F9FA0020A076D6 +:1084E000E076F9F7FBF9002D70637BD0E868C004F3 +:1084F00078D51BF038FE002874D10120F9F7CBFDA8 +:108500000120A07604E0002D72D0E868C0046FD589 +:10851000280015F013FF13220021019202000091A0 +:10852000012113E0022863D1E07E421C0228E2769A +:10853000CFD8002D5CD0E868C00459D5280015F0CC +:10854000FDFE132200210192020000912800002369 +:10855000F9F7C9FB4CE0A07E0128BAD048E0012021 +:1085600002F01CFC00252800A576F9F794FD04987C +:10857000F9F7DFF925772CE0B16B38001030814234 +:1085800021D1A07E03281ED10020F9F784FD8C495B +:10859000002008608B490860E0760220002DA0765C +:1085A00011D0E868C0040ED5280015F0C7FE1322CC +:1085B00000E014E001210192009102000021280056 +:1085C0000B00F9F790FB0498F9F7B3F9012002F0DA +:1085D000E5FBB16B380003F3F0F909E002E006981F +:1085E000039005E078480722006840211AF0D8FA85 +:1085F00003986DE5F8B505000020009008682E008E +:108600002C0000278036C034252820D03A206EE484 :10861000010000007C830000000400000E3FE545DF -:10862000002808D103F3C3FC00203100206340314F -:10863000300003F3CCF90020A6E62800A4E6F8B544 -:1086400004000F00066F3000FFF7EAF90500002074 -:108650001CF028FE3868801C3FD0012805D0152862 -:1086600036D016283BD1012022E00020F9F719FC72 -:10867000200000F0B2F9F9F743F8C034207F00275A -:10868000002803D0122002F0BEFA27770D480022FE -:108690000068692103F319F8676267772888012861 -:1086A00005D1207E002802D13000FFF7D7FA05203F -:1086B000F8F7A6FF11E0000000A60080C03801C056 -:1086C0002F08000080EF00C000F100C0F07F000024 -:1086D00021002831200003F37AF90020F8BD38008A -:1086E000F8BD10B50B68046F9B1C1AD0012B13D07A -:1086F00002008032032B11D0042B17D1010010315E -:108700009163516A002901D10121116200F065F9DC -:1087100020001FF046E907E0012003E01C309063D1 -:10872000F6E7002002F02FFD002010BD080010BD6C -:10873000F3B585B00700002003901CF0B3FD0500E1 -:1087400006983A000068B4323E003C0003218036AF -:10875000C034252804926AD008DC801C15D001287A -:1087600014D0232852D024287ED105E0262851D0C9 -:1087700027284FD02928F7D1A07E01282DD1E07ECF -:10878000421C0228E27619D9A17686E03800FFF76C -:10879000FFFA0020A076E076F8F7B4FF002D7063B2 -:1087A0007BD0E868C00478D51BF021FD002874D187 -:1087B0000120F9F776FB0120A07604E0002D72D0AD -:1087C000E868C0046FD5280015F05EFF1322002171 -:1087D000019202000091012113E0022863D1E07EA2 -:1087E000421C0228E276CFD8002D5CD0E868C00495 -:1087F00059D5280015F048FF1322002101920200EC -:10880000009128000023F9F774F94CE0A07E0128BC -:10881000BAD048E0012002F015FC00252800A5761A -:10882000F9F73FFB0498F8F798FF25772CE0B16B38 -:1088300038001030814221D1A07E03281ED10020B3 -:10884000F9F72FFB8B49002008608B490860E07620 -:108850000220002DA07611D0E868C0040ED52800B3 -:1088600015F012FF132200E014E0012101920091A3 -:108870000200002128000B00F9F73BF90498F8F7F3 -:108880006CFF012002F0DEFBB16B380003F39FF8B0 -:1088900009E002E00698039005E0784807220068A6 -:1088A00040211AF0E1F903986EE5F8B505000020C3 -:1088B000009008682E002C0000278036C034252840 -:1088C00020D012DC801C08D0012822D12800FFF71C -:1088D0005FFA0020F9F7E5FAE776684807220068B2 -:1088E00040211AF0C1F90098F8BD26280FD027289A -:1088F0000FD10020A776F9F7D4FAFCF7EDF8FCF7D2 -:10890000A2FB2777B16B280003F361F8EBE7A776AA -:10891000F7E70091E7E7F0B504000E0097B019F013 -:10892000CDFB05002000FFF733FA210074312C2223 -:108930000BA8169114F34EEA2100E8312C220F0007 -:10894000684614F348EAFF213131200014F374EA39 -:108950002C223800694614F33EEA16982C220BA903 -:1089600014F338EA200000F04BF8210010310F001A -:10897000200003F31CF820000121803001623E4AF0 -:10898000416200211160DA22876311553C49C163BD -:108990002800266719F096FB17B0F0BD0121018071 -:1089A00041603749C1608160364901617D2109011B -:1089B000816141617047344800B5FFF7EFFF3248ED -:1089C0001C30FFF7EBFF00BD020092780020120977 -:1089D000042A01D100220A70704710B5040001205A -:1089E000FCF728F820008030016A012907D1002116 -:1089F000016201214162206F09031EF0CEEF10BD1C -:108A000070B50400214A0021001D02F3D4FF2000AC -:108A10001F4A211D103002F3CEFF2000C8B1DE1A1C +:1086200012DC801C08D0012822D12800FFF759FA5B +:108630000020F9F73AFDE7766848072200684021F4 +:108640001AF0B8FA0098F8BD26280FD027280FD1C5 +:108650000020A776F9F729FDFCF734FBFCF7D2FDE3 +:108660002777B16B280003F3B2F9EBE7A776F7E7BA +:108670000091E7E7F0B504000E0097B019F0FAFB9F +:1086800005002000FFF72DFA210074312C220BA8E1 +:10869000169114F3A0EB2100E8312C220F0068465C +:1086A00014F398EBFF213131200014F3C6EB2C2298 +:1086B0003800694614F38EEB16982C220BA914F39C +:1086C0008AEB200000F04BF8210010310F00200051 +:1086D00003F36DF920000121803001623E4A4162BE +:1086E00000211160DA22876311553D49C1632800DA +:1086F000266719F0C3FB17B0F0BD0121018041606E +:108700003749C1608160374901617D21090181617B +:1087100041617047344800B5FFF7EFFF32481C3025 +:10872000FFF7EBFF00BD0200927800201209042A37 +:1087300001D100220A70704710B504000120FCF737 +:108740006FFA20008030016A012907D100210162FF +:1087500001214162206F09031FF058E910BD70B577 +:108760000400224A0021001D03F325F92000204ABD +:10877000211D103003F31FF920001C301D4A211D5C +:10878000050003F318F920004C301B4A211D060098 +:1087900003F311F92000194A2900283003F30BF9DB +:1087A0002000174A2900343003F305F92000154A48 +:1087B0002900403003F3FFF82000134A31005830FD +:1087C00003F3F9F82000114A3100643003F3F3F8A1 +:1087D00070BD000054F300C058F300C04CF800C056 +:1087E00068420000400D0300D04900042D750000D0 +:1087F00043760000677800009D810000477E0000FE +:108800000F800000F9800000EB810000658300000C +:10881000FF48808B4007800F012800D00020704760 +:1088200038B50400FB480D00406B03F360FBF949C9 +:10883000002234310092220028000B0003F3F4FAE6 +:1088400038BD10B5F34C606B03F351FB002060633F +:1088500010BDF049002010B50200C860EE48492163 +:10886000006802F332FF10BD70B50400EB4D68885C +:10887000002807D0200001F04BFF688821007C31E0 +:10888000288026E02000FF304130066BFCF71AFA02 +:10889000FCF7B8FCDF490120886100200866F02160 +:1088A000085309F3F9FAE21DF93251651065012008 +:1088B00002F07EFA02F0D0F803200DF0E7FD01216E +:1088C00000220903300001F002FF688821005831BE +:1088D0002880200003F37BF870BD202010B502F043 +:1088E00048F810BD10B5F9F728FC002822D0002068 +:1088F0001AF070F900281DD11AF06CF9002819D16E +:10890000FBF7C4FD002815D11FF08CE8002811D119 +:10891000C14800220068462102F3D7FE002809D191 +:1089200005F077FA002805D116F0BBF9002801D12F +:10893000012010BD002010BDB84810B52038408A75 +:10894000002805D0B248B349406B0969884227D155 +:10895000AF4880308069002822D1AF4C00222068C7 +:108960001B2102F3B2FE00281AD120680022462102 +:1089700002F3ABFE002813D1FBF788FD00280FD1CE +:108980001FF050E800280BD11AF024F9002807D175 +:108990001AF020F9002803D116F083F9002800D03E +:1089A0000120002804D1F9F7C8FB002801D10120DB +:1089B00010BD002010BDF8B500252C00954E944F39 +:1089C000708997494037884219D2796D386D614076 +:1089D000084314D009F360FA3A6D7B6D801A99410F +:1089E0007D27FF0023003A0013F368EF7689230008 +:1089F0003A0013F364EF801BA14100D30125280046 +:108A0000F8BD30B587B003A904A810F01BFF05001E +:108A100001220221684603F3F8FA0400C126B6B623 :108A20000100000078870000000400005DE53629A1 -:108A30001C301D4A211D050002F3C7FF20004C30E9 -:108A40001A4A211D060002F3C0FF2000184A29001F -:108A5000283002F3BAFF2000164A2900343002F30E -:108A6000B4FF2000144A2900403002F3AEFF20007A -:108A7000124A3100583002F3A8FF2000104A31009A -:108A8000643002F3A2FF70BDFCF000C000F100C032 -:108A900004F600C068420000400D0300B049000425 -:108AA00095770000F1780000157B00003F840000FE -:108AB000EB800000B18200009B8300008D840000E9 -:108AC00007860000FF48808B4007800F012800D0F8 -:108AD0000020704738B50400FB480D00406B03F3DD -:108AE00010FAF949002234310092220028000B00CC -:108AF00003F3A4F938BD10B5F34C606B03F301FA2E -:108B00000020606310BDF049002010B50200C8606D -:108B1000EE484921006802F3E2FD10BD70B5040083 -:108B2000EB4D6888002807D0200001F045FF6888D9 -:108B300021007C31288026E02000FF304130066B88 -:108B4000FBF7D4FFFCF789FADF4901208861002098 -:108B50000866F021085309F3A9F9E21DF9325165BD -:108B60001065012002F078FA02F0CAF803200DF037 -:108B70004DFE012100220903300001F0FCFE68884F -:108B8000210058312880200002F32BFF70BD2020E7 -:108B900010B502F042F810BD10B5F9F7D4F900286D -:108BA00022D000201AF07AF800281DD11AF076F8A9 -:108BB000002819D1FBF77AFB002815D11EF002EF2F -:108BC000002811D1C14800220068462102F387FD28 -:108BD000002809D105F0DBFA002805D116F007FAC4 -:108BE000002801D1012010BD002010BDB84810B5EB -:108BF0002038408A002805D0B248B349406B096943 -:108C0000884227D1AF4880308069002822D1AF4CFC -:108C1000002220681B2102F362FD00281AD120687F -:108C20000022462102F35BFD002813D1FBF73EFB37 -:108C300000280FD11EF0C6EE00280BD11AF02EF836 -:108C4000002807D11AF02AF8002803D116F0CFF92E -:108C5000002800D00120002804D1F9F774F9002879 -:108C600001D1012010BD002010BDF8B500252C0059 -:108C7000954E944F708997494037884219D2796D43 -:108C8000386D6140084314D009F310F93A6D7B6DDB -:108C9000801A99417D27FF0023003A0013F318EE54 -:108CA000768923003A0013F314EE801BA14100D310 -:108CB00001252800F8BD30B587B003A904A810F03D -:108CC000FBFE050001220221684603F3A8F9040017 -:108CD00009D0AC4207D2042002F0BEF900980199F5 -:108CE0000591049003E0052002F0B6F92C006B46D4 -:108CF0009889201803F3D9F9002805D0042002F040 -:108D0000ABF9012007B030BD002200926B46998973 -:108D10007D22D200230004A8FCF734F8F2E7FEB568 -:108D20000D00694E0968B1660100FF3141312B68C1 -:108D30000C000F6B2034222B49D012DC022B38D0D0 -:108D400008DC9B1C64D0012B13D0032B60D161483D -:108D5000163029E00120032B2ED0122B58D1207180 -:108D600056E0233B14F3F2E9070A0D1010105430BB -:108D700054000100343102F334FE49E05548133009 -:108D800012E0544814300FE03800FEF751FE01683D -:108D90004A6801004C318A4204D12968002202F35A -:108DA00001FE35E04B481530F7F70AFB1EF0A2ED47 -:108DB0002EE048481730F7E76071022002F04CF9C6 -:108DC000F06A401CF06223E0306A401C3062207878 -:108DD000022801D001281BD16078411C0228617053 -:108DE00010D2380015F05AFC132200210192009194 -:108DF0002178012900D00021020038000023F8F773 -:108E000082FE05E0344807220068402119F036FF51 -:108E10000020FEBD70B50400FF3441340A6825000F -:108E2000236B01262035012A0ED005DCB1BD62542A +:108A300009D0AC4207D2042002F0C4F90098019991 +:108A40000591049003E0052002F0BCF92C006B4670 +:108A50009889201803F329FB002805D0042002F090 +:108A6000B1F9012007B030BD002200926B46998910 +:108A70007D22D200230004A8FCF763FAF2E7FEB5DA +:108A80000D00694E0968B1660100FF3141312B6864 +:108A90000C000F6B2034222B49D012DC022B38D073 +:108AA00008DC9B1C64D0012B13D0032B60D16148E0 +:108AB000163029E00120032B2ED0122B58D1207123 +:108AC00056E0233B14F342EB070A0D10101054300C +:108AD00054000100343102F384FF49E0554813305B +:108AE00012E0544814300FE03800FEF76DFE0168C4 +:108AF0004A6801004C318A4204D12968002202F3FD +:108B000051FF35E04B481530F7F75AFC1EF02CEFBB +:108B10002EE048481730F7E76071022002F052F962 +:108B2000F06A401CF06223E0306A401C306220781A +:108B3000022801D001281BD16078411C02286170F5 +:108B400010D2380015F00EFC132200210192009182 +:108B50002178012900D00021020038000023F9F714 +:108B6000D6F805E034480722006840211AF02CF8B6 +:108B70000020FEBD70B50400FF3441340A682500B2 +:108B8000236B01262035012A0ED005DC921C12D061 +:108B9000012A15D101200FE0022A03D0282A0FD183 +:108BA000AE710BE0343001E05830AE71E061180076 +:108BB0001EF03AEF02E0002002F0A5F9002070BD9F +:108BC000080070BD70B50400FF304130056BFCF744 +:108BD00083F8FCF721FB1BF0DAFA012811D1002100 +:108BE000280001F08BFD2000FF3025300400FEF24C +:108BF00057FF002264212000FEF204FF2000FEF255 +:108C0000F1FE70BDF0B506003500FF35002041359E +:108C100085B00390286B029008682C0020340A2845 +:108C200074D00BE0C84A000440F300C0F0F100C06B +:108C3000283901C0FFFF00004CF800C00DDC801C8B +:108C40002FD001282BD00B2863D1E9693000643084 +:108C500081422CD15836EE6129E03700343725287F +:108C600028D0262801D0272853D13000FF302530C6 +:108C7000FEF216FFE869B84205D0012102980022F1 +:108C8000090301F02EFDEF61002738002770F9F786 +:108C900016FAFCF721F8FCF7BFFA27712EE0002046 +:108CA0006070F74807220068402119F08DFF039893 +:108CB00005B0F0BDE869B84203D13000FFF782FF8C +:108CC0001CE01BF064FA002811D1607001202070B4 +:108CD000F9F7F5F9029815F045FB132200210192EE +:108CE00002000091029801210023F9F710F8D92021 +:108CF000805D002802D0092001F045FE0120A0700F +:108D0000E969300002F36DFED1E7FFE70120E07072 +:108D1000CDE70391CBE7F3B585B006003500FF350D +:108D2000413500200390286B2A00029006982832D3 +:108D30000068140003210127083C222804923DD03A +:108D400030DC09286FD025DC801C40D001286BD195 +:108D5000002020706070F8F7D5FDA8620298C06806 +:108D6000C00434D50298407A032801D001282ED1BE +:108D70001BF00DFA00282AD10120F9F7A0F9C1490A +:108D800088694969084303D11BF0B0FD00281ED053 +:108D9000277025E00A2877D02128D8D1207801280B +:108DA0003ED113E0252871D026283ED027283CD07C +:108DB0002928CCD1B348C269521CC261207801284D +:108DC00018D16078421C0228627009D92170AC4821 +:108DD00007220068402119F0F7FE039807B0F0BDA4 +:108DE000029815F0BFFA13220021019202000091AF +:108DF000012110E00228F0D16078421C0228627044 +:108E000001D9217059E0029815F0ACFA1322002123 +:108E100001920200009102980023F8F778FFDCE746 +:108E20000228DAD149E051E05AE03000CD67A04D88 :108E300001000000748B000000040000A98A439D1B -:108E4000921C12D0012A15D101200FE0022A03D072 -:108E5000282A0FD1AE710BE0343001E05830AE71EA -:108E6000E06118001EF0B0ED02E0002002F09FF972 -:108E7000002070BD080070BD70B50400FF304130A7 -:108E8000056BFBF73DFEFCF7F2F81BF0C4F9012877 -:108E900011D10021280001F085FD2000FF30253090 -:108EA0000400FEF207FE002264212000FEF2B4FD61 -:108EB0002000FEF2A1FD70BDF0B506003500FF35C3 -:108EC0000020413585B00390286B029008682C0083 -:108ED00020340A2874D00BE0A84A0004E8F000C04F -:108EE00080EF00C0403901C0FFFF000004F600C061 -:108EF0000DDC801C2FD001282BD00B2863D1E96911 -:108F00003000643081422CD15836EE6129E03700C0 -:108F10003437252828D0262801D0272853D13000DF -:108F2000FF302530FEF2C6FDE869B84205D00121C8 -:108F300002980022090301F028FDEF6100273800A4 -:108F40002770F8F7C2FFFBF7DBFDFCF790F82771FD -:108F50002EE000206070FA4807220068402119F0D6 -:108F600097FE039805B0F0BDE869B84203D1300020 -:108F7000FFF782FF1CE01BF04EF9002811D1607052 -:108F800001202070F8F7A1FF029815F091FB132241 -:108F90000021019202000091029801210023F8F7BC -:108FA000BCFDD920805D002802D0092001F03FFEE1 -:108FB0000120A070E969300002F31DFDD1E7FFE751 -:108FC0000120E070CDE70391CBE7F0B50600350056 -:108FD000FF354135002085B02B000390286B2833E6 -:108FE000029008681C0003220127083C22280493F1 -:108FF0003DD030DC09287DD025DC801C40D0012804 -:1090000079D1002020706070F8F790FBA862029878 -:10901000C068C00434D50298407A032801D00128E2 -:109020002ED11BF0F8F800282AD10120F8F74DFFC7 -:10903000C44988694969084303D11BF095FC00289D -:109040001ED0277024E00A2873D02128D8D1207898 -:1090500001283DD113E025286DD026283BD02728B4 -:1090600039D02928CCD1B748C169491CC1612078C1 -:10907000012817D16078411C0228617008D922703C -:10908000AF4807220068402119F002FE039869E703 -:10909000029815F00DFB13220021019202000091AD -:1090A000012110E00228F1D16078411C0228617092 -:1090B00001D9227056E0029815F0FAFA1322002125 -:1090C00001920200009102980023F8F726FDDDE7E7 -:1090D0000228DBD146E03000FF302530FEF2EAFC0A -:1090E000012001F0C3FF01F015FE30003430E861CB -:1090F000002001E03FE048E0F8F7E7FE2078032891 -:1091000006D1029808F048FD002801D1207125E021 -:1091100000202070FBF7F4FCFBF7A9FF0498F8F798 -:1091200030FB00202071A770E969300002F363FC76 -:10913000ACE728E0FFE78349002048618861207898 -:1091400003280FD10020F8F7C0FEF8F706FF00282B -:1091500003D104F08DFD012804DD002060700220A1 -:109160002070A8E70498F8F70CFB012001F07EFFBF -:1091700001F0D0FDD7E7E96930006430814285D144 -:109180005836EE6182E7E77080E703917EE710B51D -:109190006C4CE41D01F075FC00280CD06A48008876 -:1091A000002808D02078000705D1E01FC0780028EB -:1091B00001D1012010BD002010BD10B5614C6348E5 -:1091C000E41D006B1CF05AF9002802D0207800073B -:1091D00003D15C48C078002805D05B48008800288F -:1091E00001D0012010BD002010BDF8B50A0001001B -:1091F0000400FF311068413126000D6BE036102865 -:1092000025D02FDC022874D01BDC801C40D0E71D49 -:10921000F93701283ED003286CD128001EF0D4EB8A -:10922000FFF7CBFF002803D1FFF7B1FF002862D082 -:10923000200001F0F5FB04200DF0F2FAAC8E76FC74 +:108E4000FF302530FEF236FE012001F0C5FF01F0B3 +:108E500017FE30003430E8610020F9F73AF906983F +:108E60000068262809D02078032806D1029808F047 +:108E7000BDFD002801D1207125E000202070FBF706 +:108E800035FFFCF7D3F90498F8F771FD0020207145 +:108E9000A770E969300002F3AEFDA8E728E0FFE71C +:108EA0007D49002048618861207803280FD1002087 +:108EB000F9F70FF9F9F755F9002803D104F079FD16 +:108EC000012804DD0020607002202070A5E70498CE +:108ED000F8F74DFD012001F07FFF01F0D1FDD7E74C +:108EE000E96930006430814281D15836EE617EE715 +:108EF000E7707CE70698039079E710B5664CE41DAF +:108F000001F075FC00280CD064480088002808D0C7 +:108F10002078000705D1E01FC078002801D101208A +:108F200010BD002010BD10B55B4C5D48E41D006B0A +:108F30001CF0A2FA002802D02078000703D156487E +:108F4000C078002805D055480088002801D00120AD +:108F500010BD002010BDF8B50A0001000400FF316B +:108F60001068413126000D6BE036102825D02FDC2B +:108F7000022874D01BDC801C40D0E71DF937012883 +:108F80003ED003286CD128001EF058EDFFF7CBFF30 +:108F9000002803D1FFF7B1FF002862D0200001F0C4 +:108FA000F5FB04200DF086FA21007C316AE00D28E3 +:108FB0007ED00F28E6D101203082E868C00479D540 +:108FC000308A002876D10021280001F0A1FB15E0AD +:108FD00023003433232877D009DC1128EDD0122860 +:108FE00076D10121490228001EF024ED06E0242854 +:108FF00066D028286CD12948418801800020F8BD1E +:109000002000FF306130002500908570F8F782FC69 +:10901000012001F07CFF35823D6500207D65F9F778 +:1090200058F8204805602048C0340580207E00287C +:1090300002D02576FBF7BEF900980079002804D00D +:10904000122001F0AAFC0098057106200DF032FAFA +:10905000164800220068692102F34BFBCEE715E0B9 +:1090600036E00D4901208861022001F0B5FE0320A1 +:109070000DF020FA0020308208F322FF79652100EC +:1090800058313865200002F3B6FCB7E728001EF01F +:10909000D6ECB3E74CF800C040F300C0283901C05B +:1090A000484B000488F400C018F400C0F0F100C080 +:1090B00000E009E02000FF302530FEF2FBFCE5E790 +:1090C000CB6121002831DDE7CB6121001C31D9E7DC +:1090D0001000F8BDF8B50400FF3041302500006BEA +:1090E000FF3561350090086826002F0034363C3F7C +:1090F000022839D015DC801C5BD001285DD100200E +:1091000001F008FF002001F002FF2879002804D0B8 +:10911000122001F042FC00202871002001F05CFECA +:1091200045E0122804D0282847D10120A8713EE04C +:10913000FBF7DCFDFCF77AF80020F8F7CAFF3800EF +:10914000FEF2B8FC2000F830FEF2B4FCFC4900202E +:109150000863FFF78AFB00981EF070EC012100986D +:1091600049021EF068EC1EE0FBF7C0FDFCF75EF85C +:109170001BF017F8012803D0F148806900280FD1AF +:109180000098002101F0C4FA3800FEF293FC00229E +:1091900064213800FEF240FC3800FEF22DFC02E0B3 +:1091A00000981EF04CEC3100200002F324FC00205B +:1091B000F8BD012001F0AEFEF9E70800F8BDF8B5F2 +:1091C0000400080021000268FF31260041315836B2 +:1091D0000F2A67D01EDC0B2A64D016DC921C61D0EB +:1091E000012A28D0052A25D1D64D2878FF2807D076 +:1091F0000100D5486A460068F8F7D2F8FF202870C9 +:10920000E820005D022847D144E00C2A4AD00E2A0B +:1092100010D147E0232A4BD004DC152A42D01A2A69 +:1092200008D13FE0242A3FD0292A03D1C44A516AF9 +:10923000491C5162F8BD2500FF35C148595633AC71 :1092400001000000708F000000040000FA5090F14F -:1092500021007C316AE00D2871D00F28E6D1012071 -:109260003082E868C0046AD5308A002867D10021BE -:10927000280001F0A1FB15E023003433232877D028 -:1092800009DC1128EDD0122876D1012149022800ED -:109290001EF0A0EB06E0242857D028286CD12F48D8 -:1092A000418801800020F8BD2000FF30613000259A -:1092B00000908570F8F742FA012001F07CFF3582BA -:1092C0003D6500207D65F8F70AFE264805602648C2 -:1092D000C0340580207E002802D02576FAF77BFF77 -:1092E00000980079002804D0122001F0AAFC009810 -:1092F000057106200DF09EFA1C48002200686921C5 -:1093000002F301FACEE715E036E013490120886147 -:10931000022001F0B5FE03200DF08CFA002030820F -:1093200008F3D8FD7965210058313865200002F333 -:109330006CFBB7E728001EF052EBB3E7FFE7200015 -:10934000FF302530FEF2C0FBF4E7CB61210028316D -:10935000ECE70DE004F600C0E8F000C0403901C0C1 -:10936000284B000424F200C0C0F100C080EF00C010 -:10937000CB6121001C31D9E71000F8BDF8B504001D -:10938000FF3041302500006BFF35613500900868E3 -:1093900026002F0034363C3F022839D015DC801CD3 -:1093A0005BD001285DD1002001F008FF002001F012 -:1093B00002FF2879002804D0122001F042FC00208E -:1093C0002871002001F05CFE45E0122804D0282816 -:1093D00047D10120A8713EE0FBF79CFBFBF751FE53 -:1093E0000020F8F77CFD3800FEF26EFB2000F8301C -:1093F000FEF26AFBFC4900200863FFF790FB00982F -:109400001EF0ECEA0121009849021EF0E4EA1EE099 -:10941000FBF780FBFBF735FE1AF007FF012803D0AE -:10942000F148806900280FD10098002101F0C4FAAA -:109430003800FEF249FB002264213800FEF2F6FA01 -:109440003800FEF2E3FA02E000981EF0C8EA3100AC -:10945000200002F3DAFA0020F8BD012001F0AEFE90 -:10946000F9E70800F8BDF8B504000800210002681B -:10947000FF312600413158360F2A67D01EDC0B2AF7 -:1094800064D016DC921C61D0012A28D0052A25D18F -:10949000D64D2878FF2807D00100D5486A460068D5 -:1094A000F7F71EFFFF202870E820005D022847D153 -:1094B00044E00C2A4AD00E2A10D147E0232A4BD090 -:1094C00004DC152A42D01A2A08D13FE0242A3FD0D2 -:1094D000292A03D1C44A516A491C5162F8BD2500AA -:1094E000FF35C14800276135AF708761076147616B -:1094F0000120F8F7F4FCFBF70DFBDA20075328797D -:10950000002803D0122001F09CFB2F7168790028FD -:1095100003D0022001F0B4FD10E0FFF7E0FB0028CB -:1095200014D1B4480822006E390010407940084335 -:109530000CD1012001F0A4FD01F0F6FB310012E096 -:109540000428FBD1A849C86E401CC8660020F8BD9D -:10955000CE612100283106E0A34A106F401C10673D -:10956000CE6121001C31200002F34FFAEEE710B566 -:10957000F9F76AFB002801D0F9F78AF910BDFEB5AA -:109580000200FF3206004132106B00900B6834007D -:10959000FF342534300001946430643C35002700EA -:1095A00002900020E035A037142B7ED00FDC924AC9 -:1095B0009B1C127A13F3DEED14CF4A969696D29640 -:1095C000969696969696E8FEFDFCFBFAFA961C2B6C -:1095D0006CD02CDC152B1AD08348162B006966D072 -:1095E0001A2B7ED01B2B7DD17F4D00282DD0FBF771 -:1095F000F0FE002829D1606A69698842FAD1608B3F -:10960000012822D8E06A0028F4D101F04BFB01F0D8 -:10961000A0FB0028EED1FFF7D3FA00287ED07648D1 -:10962000017A00297AD100690028FBD116E11D2BAF -:1096300075D034005834232B72D0242B71D0282BB2 -:10964000D1D1B8713000FFF77DFA77E1296C60362F +:1092500000276135AF708761076147610120F8F72A +:1092600042FFFBF74DFDDA2007532879002803D091 +:10927000122001F09CFB2F716879002803D0022096 +:1092800001F0B4FD10E0FFF7DAFB002814D1B44878 +:109290000822006E39001040794008430CD10120AB +:1092A00001F0A4FD01F0F6FB310012E00428FBD12F +:1092B000A849C86E401CC8660020F8BDCE612100D8 +:1092C000283106E0A34A106F401C1067CE612100D0 +:1092D0001C31200002F399FBEEE710B5F9F7B8FD59 +:1092E000002801D0F9F7DCFB10BDFEB50200FF320B +:1092F00006004132106B00900B683400FF342534B7 +:10930000300001946430643C350027000290002056 +:10931000E035A037142B7ED00FDC924A9B1C127ACA +:1093200013F328EF14CF4A969696D2969696969671 +:109330009696E8FEFDFCFBFAFA961C2B6CD02CDC12 +:10934000152B1AD08348162B006966D01A2B7ED0B5 +:109350001B2B7DD17F4D00282DD0FCF71BF9002859 +:1093600029D1606A69698842FAD1608B012822D8C4 +:10937000E06A0028F4D101F04BFB01F0A0FB0028CB +:10938000EED1FFF7CDFA00287ED07648017A002989 +:109390007AD100690028FBD116E11D2B75D034006D +:1093A0005834232B72D0242B71D0282BD1D1B871F3 +:1093B0003000FFF777FA77E10020B870F8F7B4FAD9 +:1093C0007879002804D0022001F010FD0020787187 +:1093D0003879002804D0122001F0E9FA0020387111 +:1093E000B879002809D00020B8713000FFF75AFA88 +:1093F0005B48803000880028DDD10120FBF72EFC7F +:109400000026A6832662666256486E822E82867089 +:109410005548066002E067E0BDE020E15348068061 +:10942000534806605348012700683200462102F382 +:109430006AF9002802D1287A022811D14D482E72EB +:1094400000680022692102F35EF9002801E018E1BA +:109450002CE105D1012100980022090301F055F902 +:10946000FFF73BFF002800D0092700981EF0FCEA18 +:10947000002804D001210098C9061EF0E6EA3E4803 +:10948000016801290BD103E0FFE07CE006E101E186 +:1094900006603A4807220068022119F0A9FB002063 +:1094A000F8F721FE3800F8F733F9608B002801D077 +:1094B00001F0EAFA207E002802D02676FAF784FF2F +:1094C000F2E001F0A5FAEFE0297A0229F8D10400D0 +:1094D000287200980022C90201F017F90120F8F75C +:1094E00017F923480460DFE001F0CEFA0120F8F715 +:1094F0000FF9D9E01B4D002AE2D1E06A00281BD009 +:109500001AF0C8FF002802D0E868002814D000989C +:10951000002101F007F904E064E061E056E08FE02B +:1095200040E00198FEF2D0FA019800226421FEF298 +:109530007DFA0198FEF26AFA0520F8F7E9F8054885 +:109540000169216240696062E06A002818D001F078 +:109550009BFAA9E040F300C09A5C000448F800C000 +:10956000A83801C0543901C088F400C018F400C004 +:1095700090F400C0F0F100C08CF400C04CF800C0C2 +:1095800001F099FA90E00121287200980022090365 +:1095900001F0BBF888E00198FEF296FAFF4801213D +:1095A000C16211E0002A7FD10520F8F7B1F8FC482C +:1095B000016921624069606201F081FA002873D17B +:1095C000FFF7AEF90028C2D002996AE00198FEF2D6 +:1095D0007BFA08F37FFCF21DF9325165106563E0F8 +:1095E00001202882086811285ED00F2813D1F8F7CF +:1095F000C2FD002803D00098002101F093F80198E3 +:10960000FEF262FA019800226421FEF20FFA01983C +:10961000FEF2FCF948E0102812D1688A401C0004D0 +:10962000000C6882298A00290AD1032808D2F8F799 +:10963000A2FD002804D00098002101F073F833E067 +:10964000D848C068002802D00120F8F7AB95E86A36 :10965000010000006C930000000400004595B54235 -:109660000020B870F8F774F87879002804D0022048 -:1096700001F010FD002078713879002804D0122004 -:1096800001F0E9FA00203871B879002809D00020EB -:10969000B8713000FFF760FA5B488030008800281E -:1096A000DDD10120FBF7EEF90026A6832662666273 -:1096B00056486E822E8286705548066002E067E04A -:1096C000BDE020E153480680534806605348012717 -:1096D00000683200462102F320F8002802D1287ADF -:1096E000022811D14D482E7200680022692102F330 -:1096F00014F8002801E018E12CE105D101210098BF -:109700000022090301F055F9FFF73BFF002800D0C4 -:10971000092700981EF078E9002804D0012100985C -:10972000C9061EF062E93E48016801290BD103E039 -:10973000FFE07CE006E101E106603A4807220068AC -:10974000022119F0B9FA0020F8F7D3FB3800F7F737 -:109750007FFF608B002801D001F0EAFA207E00280C -:1097600002D02676FAF741FDF2E001F0A5FAEFE02B -:10977000297A0229F8D10400287200980022C9022F -:1097800001F017F90120F7F763FF23480460DFE0D9 -:1097900001F0CEFA0120F7F75BFFD9E01B4D002A5C -:1097A000E2D1E06A00281BD01AF0B8FE002802D0EF -:1097B000E868002814D00098002101F007F904E0BF -:1097C00064E061E056E08FE040E00198FEF286F947 -:1097D000019800226421FEF233F90198FEF220F98B -:1097E0000520F7F735FF054801692162406960628D -:1097F000E06A002818D001F09BFAA9E0E8F000C068 -:10980000965C000400F600C0C03801C06C3901C08D -:1098100024F200C0C0F100C02CF200C080EF00C0F4 -:1098200028F200C004F600C001F099FA90E001218E -:10983000287200980022090301F0BBF888E0019823 -:10984000FEF24CF9FF480121C16211E0002A7FD1EC -:109850000520F7F7FDFEFC4801692162406960625E -:1098600001F081FA002873D1FFF7B4F90028C2D0C3 -:1098700002996AE00198FEF231F908F335FBF21D16 -:10988000F9325165106563E00120288208681128CB -:109890005ED00F2813D1F8F774FB002803D000988E -:1098A000002101F093F80198FEF218F901980022C6 -:1098B0006421FEF2C5F80198FEF2B2F848E01028E3 -:1098C00012D1688A401C0004000C6882298A002991 -:1098D0000AD1032808D2F8F754FB002804D00098D6 -:1098E000002101F073F833E0D848C068002802D0A6 -:1098F0000120F7F7ADFEA08B01210843A08301985A -:10990000FEF2ECF824E0D0494A69002A20D0002871 -:109910001ED0487901281BD1FFF75CF9002817D029 -:10992000FBF761FD0128A3D112E0C749012048716E -:109930000EE004F04AFC002899D009E031002831FB -:10994000D46102E031001C31D461300002F367F8C9 -:109950000020FEBD0800FEBDF0B5050000208DB062 -:1099600002902800FF3041300C90006B03902800DB -:109970000B6858300B900C380A90B4300990603066 -:109980000890B34807902800FF30253006902E003D -:109990002C382C00AB4F0A00E036C034102B059059 -:1099A00023D00EDCA8489B1C006913F3EEEB12FCDD -:1099B00035323232FB3232323232FAF91E1E1EF8A2 -:1099C000F732A048202BC06A7ED014DC152BE7D0DC -:1099D0000CDC112B79D0122B1BD1A08B4007800FF0 -:1099E000012816D1089801210171C7E1162BFCD07E -:1099F0001A2B0ED1C2E129006431232B66D0242B0F -:109A000071D0282B70D0292B03D18F48816A491C33 -:109A1000816210000DB0F0BD08998978002930D01E -:109A20000898C078002806D008990020C8700A203D -:109A300001F011F9A2E1A08B01210843A083059850 -:109A4000FEF24CF8834D059800222900FDF2F8FF44 -:109A50000598FDF2E5FF089900208870649CDFD12D +:1096600061F8A08B01210843A0830198FEF236FA2D +:1096700024E0D0494A69002A20D000281ED0487929 +:1096800001281BD1FFF756F9002817D0FBF78CFFF4 +:109690000128A3D112E0C749012048710EE004F06F +:1096A000E0FB002899D009E031002831D46102E0C4 +:1096B00031001C31D461300002F3B1F90020FEBD4D +:1096C0000800FEBDF0B5050000208DB00290280016 +:1096D000FF3041300C90006B039028000B6858302D +:1096E0000B900C380A90B430099060300890B34861 +:1096F00007902800FF30253006902E002C382C00D3 +:10970000AB4F0A00E036C034102B059023D00EDC9E +:10971000A8489B1C006913F338ED12FC3532323235 +:10972000FB3232323232FAF91E1E1EF8F732A048EE +:10973000202BC06A7ED014DC152BE7D00CDC112B5B +:1097400079D0122B1BD1A08B4007800F012816D196 +:10975000089801210171C7E1162BFCD01A2B0ED1FC +:10976000C2E129006431232B66D0242B71D0282B31 +:1097700070D0292B03D18F48816A491C8162100067 +:109780000DB0F0BD08998978002930D00898C078CC +:10979000002806D008990020C8700A2001F011F9AD +:1097A000A2E1A08B01210843A0830598FEF296F95F +:1097B000834D059800222900FEF242F90598FEF239 +:1097C0002FF9089900208870A18B8907C3D4F8620B +:1097D000A08B02210843A08303980022090300F014 +:1097E0009EFF0598FEF27AF900222900FFE00C9A0C +:1097F000002191613182718260636E4AA183D168D8 +:1098000001204003814202D100201100C8601AF0FB +:10981000DCFC04900120F8F770FC6648416980691F +:10982000014318D0049800281DD10398012100F0AD +:1098300083FF02E0F3E088E06CE10698FEF24EF967 +:10984000069800226421FEF2FBF80698FEF2E8F882 +:109850000DE04FE14AE1FFF7D6F8002803D00C985D +:1098600001218161E1E7A08B01210843A0831AF067 +:109870001BFE002802D00120029033E0307A02283B +:1098800001D10B9955E14F48002200684A2101F3AC +:1098900044FF002805D147480121C06809038842D8 +:1098A00020D1A08BC00706D10798408A00281DD17F +:1098B000F86A00281AD10020F862A08B0221084320 +:1098C000A08303980022090300F029FF0598FEF207 +:1098D00005F93B4905980022FEF2B2F80598FEF220 +:1098E0009FF803E0A08B06210843A083A08B0728E4 +:1098F00020D118F0E7FA0400029800280AD0F8F7FF +:1099000044FC00280FD10AE0A1E03FE0C5E0B2E04E +:1099100013E110E00398FFF737F8002803D0200088 +:1099200018F0D4FADCE00A99280002F378F8200055 +:1099300018F0CCFAD8E00020F8620598FEF2CEF8D4 +:109940001C48406E02F3FBFACEE0A18BCA07F1D1AE +:109950004907890F01290AD0002808D10398FFF789 +:1099600013F8002803D00698FEF2B8F8B8E0708A21 +:10997000401C0004000C7082318A002906D10328A3 +:1099800004D20398012100F0D7FEADE00698FEF264 +:10999000A5F808F3A9FA099A51651065A08BC107CB +:1099A000C8D1012108430728A0836DD0F86A0BE0D5 +:1099B000484B000440F300C0543901C0083901C0CD +:1099C000B80B0000F0F100C0002817D0F948416B37 +:1099D000F9480069814229D000220092F74A17E035 +:1099E000200018F073FAF4490020886178E00598A7 +:1099F000FEF226F80598FEF213F875E00798408A03 +:109A0000002871D00799002200920989484302007A +:109A1000E94BEB480021643302F32EFA64E000289E +:109A200004D10398FEF7B0FF002859D10020F86256 +:109A3000A08B02210843A08303980022090300F0B1 +:109A40006EFE0598FEF24AF8DE490022CFE70120BB +:109A50003082F8F79AFB002803D00398FFB252A88F :109A6000010000006897000000040000164F662EF9 -:109A7000A18B8907C3D4F862A08B02210843A0837D -:109A800003980022090300F09EFF0598FEF230F8CB -:109A900000222900FFE00C9A00219161318271823D -:109AA00060636E4AA183D16801204003814202D1E4 -:109AB00000201100C8601AF0CCFB04900120F8F7D8 -:109AC00022FA664841698069014318D00498002849 -:109AD0001DD10398012100F083FF02E0F3E088E04C -:109AE0006CE10698FEF204F8069800226421FDF26B -:109AF000B1FF0698FDF29EFF0DE04FE14AE1FFF74E -:109B0000DCF8002803D00C9801218161E1E7A08BEB -:109B100001210843A0831AF00BFD002802D0012088 -:109B2000029033E0307A022801D10B9955E14F4879 -:109B3000002200684A2101F3FAFD002805D14748B8 -:109B40000121C0680903884220D1A08BC00706D13B -:109B50000798408A00281DD1F86A00281AD10020F1 -:109B6000F862A08B02210843A08303980022090316 -:109B700000F029FF0598FDF2BBFF3B490598002244 -:109B8000FDF268FF0598FDF255FF03E0A08B06216A -:109B90000843A083A08B072820D118F0C1FA040045 -:109BA000029800280AD0F8F7F6F900280FD10AE049 -:109BB000A1E03FE0C5E0B2E013E110E00398FFF759 -:109BC0003DF8002803D0200018F0AEFADCE00A9936 -:109BD000280001F32EFF200018F0A6FAD8E000209C -:109BE000F8620598FDF284FF1C48406E02F3B1F95B -:109BF000CEE0A18BCA07F1D14907890F01290AD00C -:109C0000002808D10398FFF719F8002803D0069818 -:109C1000FDF26EFFB8E0708A401C0004000C7082F8 -:109C2000318A002906D1032804D20398012100F0CB -:109C3000D7FEADE00698FDF25BFF08F35FF9099AE5 -:109C400051651065A08BC107C8D1012108430728C1 -:109C5000A0836DD0F86A0BE0284B0004E8F000C048 -:109C60006C3901C0203901C0B80B000080EF00C082 -:109C7000002817D0F948416BF9480069814229D082 -:109C800000220092F74A17E0200018F04DFAF4493C -:109C90000020886178E00598FDF2DCFE0598FDF271 -:109CA000C9FE75E00798408A002871D00799002204 -:109CB0000092098948430200E94BEB4800216433D4 -:109CC00002F3E4F864E0002804D10398FEF7B6FF3D -:109CD000002859D10020F862A08B02210843A083FC -:109CE00003980022090300F06EFE0598FDF200FFC4 -:109CF000DE490022CFE701203082F8F74CF9002836 -:109D000003D00398012100F06BFE0698FDF2F0FEEF -:109D1000069800226421FDF29DFE0698BFE7059893 -:109D2000FDF2E6FEA08B062108430728A0832FD171 -:109D300018F0F6F904000398FEF780FF0028A3D17D -:109D400045E71AF0F5FB00280FD0C948002200684B -:109D5000462101F3ECFC002807D0C24805F0B6FC10 -:109D600005220021FF20FBF74EFE0398002100F0A2 -:109D700037FE0698FDF2BCFE069800226421FDF233 -:109D800069FE0698FDF256FE052001F08DF9CCE63D -:109D9000002049E6089901208871C6E6A28B520787 -:109DA000920F012A01D0002802D00C98C16102E074 -:109DB0000C990B98C861290028310EE0A28B52073C -:109DC000920F012A01D0002802D00C98C16102E054 -:109DD0000C990B98C86129001C31280001F329FE59 -:109DE000D6E7317A022900D01DE6A18B4907890FF9 -:109DF0000329F9D19A4E0024B4617169084304D053 -:109E000008F37CF8099A516510653461746106980D -:109E1000FDF26EFE89E610B5FFF7BDFB040008D128 -:109E20001AF0C3FD002804D0FEF747FF002800D039 -:109E30000124200010BD894810B5894C8030006B8A -:109E4000E41D1BF039FB002802D02078000703D165 -:109E50008348C078002805D086480088002801D0B3 -:109E6000012010BD002010BD10B57D4C6B1C9E560E +:109A7000012100F06BFE0698FEF23AF806980022EB +:109A80006421FDF2E7FF0698BFE70598FEF230F883 +:109A9000A08B062108430728A0832FD118F01CFAB9 +:109AA00004000398FEF77AFF0028A3D145E71AF0D7 +:109AB00005FD00280FD0C94800220068462101F3A7 +:109AC00036FE002807D0C24805F096FC052200218A +:109AD000FF20FCF778F80398002100F037FE069885 +:109AE000FEF206F8069800226421FDF2B3FF069804 +:109AF000FDF2A0FF052001F08DF9CCE6002049E63B +:109B0000089901208871C6E6A28B5207920F012A9C +:109B100001D0002802D00C98C16102E00C990B988A +:109B2000C861290028310EE0A28B5207920F012A4A +:109B300001D0002802D00C98C16102E00C990B986A +:109B4000C86129001C31280001F373FFD6E7317A80 +:109B5000022900D01DE6A18B4907890F0329F9D1FD +:109B60009A4E0024B4617169084304D008F3C6F921 +:109B7000099A51651065346174610698FDF2B8FF69 +:109B800089E610B5FFF7BDFB040008D11AF0D9FE35 +:109B9000002804D0FEF741FF002800D00124200057 +:109BA00010BD894810B5894C8030006BE41D1BF056 +:109BB00081FC002802D02078000703D18348C078B8 +:109BC000002805D086480088002801D0012010BD5B +:109BD000002010BD10B57D4CE41D00F026FE0028CD +:109BE0000CD02078000709D1E01FC078002805D1EB +:109BF0007B480088002801D0012010BD002010BD46 +:109C000010B5724CE41DFFF7ACF9012805D120789E +:109C1000C043000701D0012010BD002010BD70B569 +:109C200005006A4CE41DFFF7EBFF012807D128006F +:109C300012F323FB012181402078014201D0002052 +:109C400070BD012070BD03B56B4660481978C171C5 +:109C5000197901720CBD5D4910B54A6B824204D17D +:109C600000204863172000F0B6FE10BD574910B51C +:109C70004A6B824205D1002008634863032000F04C +:109C8000AAFE10BDF8B59402002506000F002B00B7 +:109C9000220012F346EE3B00B01AAB411900001946 +:109CA0006941F8BD7CB504000D0068460FF036FD33 +:109CB000009A019B121BAB4102D2019900987CBD16 +:109CC000002001007CBD10B5F8F760FA00281ED016 +:109CD000444801694069814219D140480022006826 +:109CE000082101F324FD002811D107F0E9FD002827 +:109CF0000DD118F0A1FF002809D118F09DFF002810 +:109D000005D139480078002801D1012010BD00207C +:109D100010BD2E4910B54A6B824203D10020486322 +:109D200000F001F810BD70B5FFF7CDFF01283FD15D +:109D30002E48FEF2B8FF04002C480821FEF242FF34 +:109D400005002A481021FEF23DFF281884422FD139 +:109D50002748FEF2A8FF040025480821FEF232FF42 +:109D6000050023481021FEF22DFF281884421FD140 +:109D70002048FEF298FF04001E480821FEF222FF50 +:109D800005001C481021FEF21DFF281884420FD147 +:109D90001948FEF288FF040017480821FEF212FF5E +:109DA000050015481021FEF20DFF2818844206D048 +:109DB000064C206E002802D1A07900281ED119205F +:109DC00000F009FE70BD0000C84A000440F300C066 +:109DD0008813000037860000B80B0000F0F100C0C7 +:109DE000283901C000A0008060040004640400045D +:109DF000A804000488050004380500040120F7F7D2 +:109E00009BFCA079401EA071FF49FF20F530FEF7B2 +:109E100039FDD7E710B5FFF7DDFE002808D0F8F7C9 +:109E200084F9002804D108F369F8F84AD1609060F9 +:109E300010BDF6490120803948717047002210B5E5 +:109E4000F7F736FF012804D108F358F8EF4A5161BB +:109E5000106110BD70B50600EC4C0D006169206901 +:109E60000023594058400843ACD008344194BC8486 :109E700001000000649B000000040000E220139A2F -:109E8000E41D00F026FE00280CD02078000709D140 -:109E9000E01FC078002805D17B480088002801D049 -:109EA000012010BD002010BD10B5724CE41DFFF75D -:109EB000ACF9012805D12078C043000701D001206A -:109EC00010BD002010BD70B505006A4CE41DFFF701 -:109ED000EBFF012807D1280012F3D9F901218140B5 -:109EE0002078014201D0002070BD012070BD03B573 -:109EF0006B4660481978C171197901720CBD5D49D2 -:109F000010B54A6B824204D100204863172000F04C -:109F1000B6FE10BD574910B54A6B824205D10020EC -:109F200008634863032000F0AAFE10BDF8B5940250 -:109F3000002506000F002B00220012F3FCEC3B0072 -:109F4000B01AAB41190000196941F8BD7CB5040095 -:109F50000D0068460FF01CFD009A019B121BAB41DF -:109F600002D2019900987CBD002001007CBD10B593 -:109F7000F8F712F800281ED0444801694069814270 -:109F800019D1404800220068082101F3DAFB0028BB -:109F900011D107F075FD00280DD118F0B1FE002891 -:109FA00009D118F0ADFE002805D139480078002805 -:109FB00001D1012010BD002010BD2E4910B54A6B03 -:109FC000824203D10020486300F001F810BD70B553 -:109FD000FFF7CDFF01283FD12E48FEF26EFE0400B0 -:109FE0002C480821FEF2F8FD05002A481021FEF257 -:109FF000F3FD281884422FD12748FEF25EFE0400AC -:10A0000025480821FEF2E8FD050023481021FEF254 -:10A01000E3FD281884421FD12048FEF24EFE0400C2 -:10A020001E480821FEF2D8FD05001C481021FEF252 -:10A03000D3FD281884420FD11948FEF23EFE0400D9 -:10A0400017480821FEF2C8FD050015481021FEF250 -:10A05000C3FD2818844206D0064C206E002802D189 -:10A06000A07900281ED1192000F009FE70BD000063 -:10A07000A84A0004E8F000C088130000D788000058 -:10A08000B80B000080EF00C0403901C000A0008084 -:10A09000280000042C0000046800000448010004AB -:10A0A000F80000040120F7F7E7FAA079401EA0713C -:10A0B000FF49FF20F530FEF73FFDD7E710B5FFF76A -:10A0C000DDFE002808D0F7F736FF002804D107F39B -:10A0D0001FFFF84AD160906010BDF6490120803919 -:10A0E00048717047002210B5F7F7E8FC012804D149 -:10A0F00007F30EFFEF4A5161106110BD70B5060005 -:10A10000EC4C0D0061692069002359405840084318 -:10A11000ACD008340FCC121A8B41A7D2F7F70BFF43 -:10A120000028A3D1FFF7AAFE00289FD000F0D1FF9E -:10A1300000289BD0E048983C0088002802D0206E80 -:10A14000002893D1FBF763F901288FD0002D04D0AC -:10A1500000213000FFF7C6FF88E717F0EBFF05008E -:10A16000D64800220068462101F3EBFA002802D00D -:10A170000120607002E01B2000F081FD280017F034 -:10A18000DDFF73E7F0B505002E00FF3600204136F5 -:10A1900085B00390306B029008682A0034000027D5 -:10A1A0003432203425281CD00ADC801CC03500281D -:10A1B00039D0012813D00B283FD10120687639E02F -:10A1C000262801D0272838D1F26100202770F7F720 -:10A1D000A4FEFAF7BDFCFAF772FF27711EE0677064 -:10A1E00022E0F069904203D12800FEF76DFE15E0F1 -:10A1F0001AF039F8002811D1012067702070F7F7A4 -:10A200008CFE029814F07CFA1322002101920200C5 -:10A210000091029801210023F7F7A7FCF1692800BB -:10A2200001F311FC06E06F76A54807220068402183 -:10A2300018F056FD039805B0F0BD0391FAE7FEB59E -:10A24000040025000020FF3541350190286B009067 -:10A2500008682600C03622286FD008DC801C64D035 -:10A26000012818D00B2843D0232866D067E02200AD -:10A27000FF32693227003437252802929D4C1BF9A2 +:109E80000FCC121A8B41A7D2F8F759F90028A3D1A9 +:109E9000FFF7AAFE00289FD000F0D1FF00289BD03A +:109EA000E048983C0088002802D0206E002893D11A +:109EB000FBF78EFB01288FD0002D04D0002130004D +:109EC000FFF7C6FF88E718F011F80500D648002212 +:109ED0000068462101F335FC002802D001206070A3 +:109EE00002E01B2000F081FD280018F003F873E762 +:109EF000F0B505002E00FF360020413685B00390F6 +:109F0000306B029008682A00340000273432203475 +:109F100025281CD00ADC801CC035002839D0012837 +:109F200013D00B283FD10120687639E0262801D0D4 +:109F3000272838D1F26100202770F8F7F2F8FAF7F5 +:109F4000FDFEFBF79BF927711EE0677022E0F069C8 +:109F5000904203D12800FEF767FE15E01AF049F998 +:109F6000002811D1012067702070F8F7DAF8029804 +:109F700014F02AFA132200210192020000910298A3 +:109F800001210023F7F7F5FEF169280001F35BFDDD +:109F900006E06F76A54807220068402118F046FECB +:109FA000039805B0F0BD0391FAE7FEB50400250063 +:109FB0000020FF3541350190286B0090086826008D +:109FC000C03622286FD008DC801C64D0012818D04D +:109FD0000B2843D0232866D067E02200FF32693285 +:109FE00027003437252802923BD026280DD0272879 +:109FF0000BD0292859D18A488038C169491CC161D0 +:10A0000051E0F7F7B1FCA86247E0FAF797FEFBF7DB +:10A0100035F92000FF302530FDF274FD062000F0F8 +:10A0200003FF2000FF3061300021060001700800AE +:10A03000F8F777F80298F7F7C2FCE869B84205D05C +:10A04000012100980022090300F07DFB00203071FF +:10A0500039002000EF6101F3F6FC1EE0012070766C +:10A0600021E0002030760298F7F7A9FCE869B842B1 +:10A0700006D10120F8F755F82000FEF7D5FD05E0E0 +:10A08000707E002802D0092000F0AFFCE9692000B2 +:10A0900001F3D9FC07E000207076644807220068CD +:10A0A000402118F0C3FD0198FEBD0191FBE7F0B51A +:10A0B000050008002900FF3141310C6B584F0A00A0 +:10A0C0002B0001687C33803F89B0172907931BD090 +:10A0D0001BDC032973D011DC891C37D001292BD05C +:10A0E00004296DD12800FEF79FFD012100220903FC +:10A0F000200000F028FB290034315CE00B29E6D079 +:10A100000C29E4D016295BD1F9E001231B29FBD0EF +:10A1100009DC2C000026803418297DD0192918D09C +:10A120001A294DD1EBE0232977D0242948D107986B +:10A130002900A031D0613EE0FEF7C7FBFEF7BDFB72 +:10A14000F86D401CF8650A20B871D3E0FBF796F86B +:10A15000D5E03548002200681B2101F3F2FA0028FF +:10A1600002D0FAF7EBFD25E0206B012810D1E06A60 +:10A170002B4901280CD10800C3698269A06CE16CED +:10A18000801A994103D326488661C6612663E66238 +:10A19000F86B012802D1FAF7D1FDFE6307F3B8FE90 +:10A1A000F967B867A26BE36B801A994102D2386EE7 +:10A1B000002806D00799280001F345FC9FE085E0C0 +:10A1C0009EE0BA6FA06BFB6FE16B801A9941B86596 +:10A1D00017F08CFE0490206B012832D01449B86D22 +:10A1E00088422ED30F4906910988C902814228D39B +:10A1F000FEF7C1FE012803D17969786C884220D12D +:10A20000FFF708FD002802D03879002819D1B87965 +:10A21000002816D000220DE065E06EE00B9A0000E9 +:10A22000C0F300C0283901C0F0F100C04CF800C0F4 +:10A230007C150000FC484621006801F382FA0028E2 +:10A240000DD0049817F056FE0F203863B86DF7490B +:10A250000004000CFEF720FB7E617E644FE0F448B2 +:10A260000088002809D0F3480221FEF2B5FC00283E +:10A2700003D0049817F03EFE9CE7EF48CED77C1F32 :10A2800001000000609F000000040000B1FAC0F669 -:10A290003BD026280DD027280BD0292859D18A4811 -:10A2A0008038C169491CC16151E0F7F771FAA862B1 -:10A2B00047E0FAF757FCFAF70CFF2000FF30253093 -:10A2C000FDF22AFC062000F003FF2000FF30613081 -:10A2D0000021060001700800F7F729FE0298F7F741 -:10A2E00082FAE869B84205D00121009800220903EA -:10A2F00000F07DFB0020307139002000EF6101F398 -:10A30000ACFB1EE00120707621E000203076029840 -:10A31000F7F769FAE869B84206D10120F7F707FEB6 -:10A320002000FEF7DBFD05E0707E002802D009204A -:10A3300000F0AFFCE969200001F38FFB07E000208B -:10A340007076644807220068402118F0D3FC019819 -:10A35000FEBD0191FBE7F0B5050008002900FF31C3 -:10A3600041310C6B584F0A002B0001687C33803F51 -:10A3700089B0172907931BD01BDC032973D011DC8C -:10A38000891C37D001292BD004296DD12800FEF774 -:10A39000A5FD012100220903200000F028FB29006F -:10A3A00034315CE00B29E6D00C29E4D016295BD1CE -:10A3B000F9E001231B29FBD009DC2C0000268034A6 -:10A3C00018297DD0192918D01A294DD1EBE023295D -:10A3D00077D0242948D107982900A031D0613EE0E8 -:10A3E000FEF7CDFBFEF7C3FBF86D401CF8650A20B5 -:10A3F000B871D3E0FAF76DFED5E035480022006869 -:10A400001B2101F3A8F9002802D0FAF7ABFB25E0E5 -:10A41000206B012810D1E06A2B4901280CD10800DB -:10A42000C3698269A06CE16C801A994103D3264804 -:10A430008661C6612663E662F86B012802D1FAF7ED -:10A4400091FBFE6307F36EFDF967B867A26BE36BE0 -:10A45000801A994102D2386E002806D00799280048 -:10A4600001F3FBFA9FE085E09EE0BA6FA06BFB6F03 -:10A47000E16B801A9941B86517F066FE0490206B75 -:10A48000012832D01449B86D88422ED30F49069165 -:10A490000988C902814228D3FEF7C1FE012803D1F1 -:10A4A0007969786C884220D1FFF708FD002802D036 -:10A4B0003879002819D1B879002816D000220DE08B -:10A4C00065E06EE09F9C000068F100C0403901C06B -:10A4D00080EF00C004F600C07C150000FC48462157 -:10A4E000006801F338F900280DD0049817F030FE09 -:10A4F0000F203863B86DF7490004000CFEF726FB07 -:10A500007E617E644FE0F4480088002809D0F3485B -:10A510000221FEF26BFB002803D0049817F018FE0E -:10A520009CE7EF48A26B806BE36B101AB34102907B -:10A5300003937E6106207E6400F0CAFD01F354FDA2 -:10A5400006980022009200887D228302E448D2000F -:10A5500000681E300104090C02A8FAF74FFC00281D -:10A56000049804D117F0F4FD01F367FD76E717F0C6 -:10A57000EFFD18E0DB4C2078FF28D1D00100DA484D -:10A5800005AA0068F6F7D4FEFF20207066E7E362B4 -:10A59000386B0F2807D13E63FEF7E9FAFFF721FD7C -:10A5A00001E0C0352B76002009B0F0BDF0B5050004 -:10A5B00008002900FF3141310A00096B87B0019181 -:10A5C00001682E002C008836803418297ED07EDC6D -:10A5D000C64A022952697BD07BDC891C7AD00129CA -:10A5E00079D1F7F7D3F82800FF30BD4E613081797B -:10A5F00000278036002906D087712800FEF7CAFAA6 -:10A600003088002868D0B948002707614761876112 -:10A61000476401004771803187708F60CF600F61A0 -:10A620004F6147700770076607F37CFCAF4A8032C2 -:10A6300003C23288FFF784FCA0630690E163A84858 -:10A640000591806F7D23A949DB00584380310CC9F7 -:10A6500039008018069A5941059B801A994108D300 -:10A660003088A26B8002E36BC11780185941E16307 -:10A67000A0639B487D27806FFF0047439B48E16BA9 -:10A6800080300CC80491A06B0390801A9B368283A3 +:10A29000A26B806BE36B101AB341029003937E6153 +:10A2A00006207E6400F0CAFD01F39EFE069800229F +:10A2B000009200887D228302E448D20000681E30AC +:10A2C0000104090C02A8FAF778FE0028049804D1CA +:10A2D00017F01AFE01F3B1FE76E717F015FE18E04D +:10A2E000DB4C2078FF28D1D00100DA4805AA0068AD +:10A2F000F7F788F8FF20207066E7E362386B0F28D5 +:10A3000007D13E63FEF7E3FAFFF721FD01E0C03518 +:10A310002B76002009B0F0BDF0B50500080029003B +:10A32000FF3141310A00096B87B0019101682E00AD +:10A330002C008836803418297ED07EDCC64A02295B +:10A3400052697BD07BDC891C7AD0012979D1F7F75F +:10A3500013FB2800FF30BD4E613081790027803625 +:10A36000002906D087712800FEF7C4FA308800283B +:10A3700068D0B948002707614761876147640100D9 +:10A380004771803187708F60CF600F614F61477078 +:10A390000770076607F3C6FDAF4A803203C23288F2 +:10A3A000FFF784FCA0630690E163A8480591806FE5 +:10A3B0007D23A949DB00584380310CC9390080183E +:10A3C000069A5941059B801A994108D33088A26B9F +:10A3D0008002E36BC11780185941E163A0639B4879 +:10A3E0007D27806FFF0047439B48E16B80300CC89E +:10A3F0000491A06B0390801A9941C01B0023964FD3 +:10A4000099419649B865884202900DD23088039AE6 +:10A410008002049BC11780185941E163A063308812 +:10A42000810202980818B8658B488D49806D000438 +:10A43000000CFEF73BFA06E0C7E06FE0CEE060E01C +:10A440008CE0C9E08EE081487D23C06FDB0058437B +:10A45000226D636D804F00218018594180373A6822 +:10A460007B68801A99410CD27968386861652065EB +:10A470000220FAF71BFC7848816B491C816301219B +:10A48000C1633288E16BA06BFFF720FCF961B86112 +:10A490000026E36BA26B7140704063640843226442 +:10A4A0000FD001202063E06A01280AD1BA69A06CAC +:10A4B000FB69E16C801A994102D3BE61FE6126639B +:10A4C000E66201220198110300F047F9E035287A8D +:10A4D000022800D12E7201981DF0EEEA002804D067 +:10A4E00001210198C9061DF0D8EAFEF738FD0028C1 +:10A4F00003D001980021FFF7B5FC0120F7F730F9F0 +:10A5000069E016292FD0172966D1FEF7E0F95248E5 +:10A51000016E491C0166416941643FE01B2942D03C +:10A5200012DC192957D01A2956D14B4CE078002853 +:10A5300051D1F7F716FA01284DD16071FEF70FFDE2 +:10A54000002848D0A0783DE0232941D0242943D1D8 +:10A5500028007C302900A031D06120E03E484264D0 +:10A56000FEF7B5F937E03C4C002A34D020690028CA +:10A5700031D0607901282ED1FFF7B9FB01282AD10B +:10A58000FBF730F8012826D0E078002823D1FEF729 +:10A590009EF9606D401C6065606960643100280050 +:10A5A00001F35BFA17E0FEF7DAFC002813D0FBF7A3 +:10A5B00019F800280FD12848016900290BD0012182 +:10A5C000817040790028E9D105E00120E06202E0D5 +:10A5D0000120C0352876002007B0F0BD2800FEF726 +:10A5E0002DFB012101980022090300F0B6F8290093 +:10A5F0003431D4E710B50400080022000968FF32A6 +:10A600004132891C33D0012932D1D820005D002885 +:10A6100005D02000883021009431D06124E00E491B +:10A62000012048720548002200681B2101F393F8BD +:10A63000002817D021007C3116E00000F0F100C0A6 +:10A64000659900005C3A01C0EC040004A83801C020 +:10A650009A5C000448F800C040F300C08813000072 +:10A660004F99000021007031200001F3F6F900201D +:10A6700010BDFEB505000E006A481400418B491C50 +:10A6800041831AF072F9002812D03100C14978CC08 :10A69000010000005CA3000000040000996B454B22 -:10A6A0009941C01B0023964F99419649B86588424D -:10A6B00002900DD23088039A8002049BC117801843 -:10A6C0005941E163A0633088810202980818B86597 -:10A6D0008B488D49806D0004000CFEF741FA06E0BE -:10A6E000C7E06FE0CEE060E08CE0C9E08EE081483A -:10A6F0007D23C06FDB005843226D636D804F0021C6 -:10A700008018594180373A687B68801A99410CD289 -:10A7100079683868616520650220FAF7DBF97848C6 -:10A72000816B491C81630121C1633288E16BA06B9D -:10A73000FFF720FCF961B8610026E36BA26B714062 -:10A7400070406364084322640FD001202063E06AF4 -:10A7500001280AD1BA69A06CFB69E16C801A9941A1 -:10A7600002D3BE61FE612663E662012201981103F5 -:10A7700000F047F9E035287A022800D12E720198BE -:10A780001DF06AE9002804D001210198C9061DF0D6 -:10A7900054E9FEF738FD002803D001980021FFF7A7 -:10A7A000B5FC0120F6F77CFF69E016292FD01729A8 -:10A7B00066D1FEF7E6F95248016E491C016641690F -:10A7C00041643FE01B2942D012DC192957D01A29D5 -:10A7D00056D14B4CE078002851D1F6F7D6FF01282E -:10A7E0004DD16071FEF70FFD002848D0A0783DE004 -:10A7F000232941D0242943D128007C302900A031CD -:10A80000D06120E03E484264FEF7BBF937E03C4CA3 -:10A81000002A34D02069002831D0607901282ED157 -:10A82000FFF7B9FB01282AD1FAF705FE012826D047 -:10A83000E078002823D1FEF7A4F9606D401C606524 -:10A84000606960643100280001F311F917E0FEF738 -:10A85000DAFC002813D0FAF7EEFD00280FD12848C3 -:10A86000016900290BD00121817040790028E9D1CC -:10A8700005E00120E06202E00120C03528760020DA -:10A8800007B0F0BD2800FEF733FB0121019800223C -:10A89000090300F0B6F829003431D4E710B50400FC -:10A8A000080022000968FF324132891C33D0012997 -:10A8B00032D1D820005D002805D02000883021004A -:10A8C0009431D06124E00E490120487205480022ED -:10A8D00000681B2100F349FF002817D021007C31BC -:10A8E00016E0000080EF00C0F99B0000C43B01C0EF -:10A8F000AC000004C03801C0965C000400F600C043 -:10A90000E8F000C088130000E39B000021007031D4 -:10A91000200001F3ACF8002010BDFEB505000E00CC -:10A920006A481400418B491C41831AF05CF80028E6 -:10A9300012D03100280010F00DF909210140022247 -:10A940001040002C02D0002805D000210200280071 -:10A95000002300F036FAFEBD3100280010F0FAF8AE -:10A960008007F8D500206B460290597A01221143E6 -:10A970005972009202000190029928000723F7F70C -:10A9800003FAFEBD524810B5006818F0C8F94F49E7 -:10A990008C390800343801F35AF84E48002101611F -:10A9A000416181611E21418110BD484980310863A8 -:10A9B00070474948C17882780902114306D00529B9 -:10A9C00002D9464A914201D3454A11604178027842 -:10A9D0000902114301D03F4A5181417902790902AC -:10A9E000114301D03F4A1180C17983790A023E495F -:10A9F0001A430A82417B027B08023C4910430880CB -:10AA0000704770B50C00334DE9688C4201D1002AC3 -:10AA100002D021001DF010E8EC6070BD7CB505008F -:10AA20000E000800F7F78DFA0124280013F07CFED1 -:10AA30001022019202003100280000230094F7F751 -:10AA4000A8F87CBD70B50400FF304130056B0520CF -:10AA500000F048FB1F49002008640866886388648A -:10AA6000C8640865487119F012FC002803D101215F -:10AA70002800FFF7D3FF07F35FFA80342064616496 -:10AA80006165206504200BF007FF01210022090306 -:10AA90002800FFF7B6FF70BD10B50E4977BA2B53EB +:10A6A000280010F0E9F80921014002221040002C96 +:10A6B00002D0002805D0002102002800002300F06D +:10A6C00036FAFEBD3100280010F0D6F88007F8D524 +:10A6D00000206B460290597A012211435972009270 +:10A6E00002000190029928000723F7F751FCFEBDF4 +:10A6F000524810B5006818F0B8FA4F498C39080074 +:10A70000343801F3A4F94E480021016141618161AF +:10A710001E21418110BD4849803108637047494876 +:10A72000C17882780902114306D0052902D9464A28 +:10A73000914201D3454A11604178027809021143E0 +:10A7400001D03F4A5181417902790902114301D078 +:10A750003F4A1180C17983790A023E491A430A822D +:10A76000417B027B08023C4910430880704770B56A +:10A770000C00334DE9688C4201D1002A02D021003F +:10A780001DF094E9EC6070BD7CB505000E0008007A +:10A79000F7F7DBFC0124280013F02AFE10220192B7 +:10A7A00002003100280000230094F7F7F6FA7CBD80 +:10A7B00070B50400FF304130056B052000F048FB08 +:10A7C0001F4900200864086688638864C8640865B7 +:10A7D000487119F022FD002803D101212800FFF75C +:10A7E000D3FF07F3A9FB80342064616461652065B1 +:10A7F00004200BF09BFE0121002209032800FFF733 +:10A80000B6FF70BD10B50E4904000020086408664C +:10A8100088638864C864086548712000FF3041304F +:10A82000006B0121FFF7B0FF07F386FB8034206443 +:10A8300061646165206510BDC84A0004F8F300C07A +:10A8400040F300C05E3A01C0FDFF0000ECF300C021 +:10A8500000F400C0283901C00AF400C0032010B57C +:10A8600002F076FF10BD012010B502F071FF10BD9F +:10A87000022010B502F06CFF10BD10B5FF48008833 +:10A88000002807D0FEF78BFB002803D1FEF771FBF1 +:10A89000002801D0002010BD012010BDF8B5012511 +:10A8A000F74CF84E2079F84F00281CD0F069400092 +:10A8B0004008F061380004F0BDFDFAF7C6F9F3492D +:10A8C000002848610CD100252571C821E76021616D +:10A8D00005216181C420657160610A20E08002E089 +:10A8E000207900280ED1EA488168020D91438160E9 +:10A8F000380004F09FFDF0690121C9070843F061A9 +:10A90000FAF7A3F92800F8BD70B5FF21E14DDB4847 +:10A91000F5312980002101800A21841C01821E203A +:10A920002070002060700120A0700020E070217174 +:10A9300060711DF0D0E8A071000AE071042020725F +:10A94000002060720320A0720020E072288820732B +:10A95000000A607370BDF8B5FAF7CAF8CE48002552 +:10A960000580CE48C64C0570CD480580CD480560B1 +:10A97000FF205A30A06304F0AEFECB494000085AD5 +:10A9800020600126657226627D276563FF00A5624F +:10A99000E7612663E56205F03EF820713222E68029 +:10A9A000C248E2602061C248608166712566C14884 +:10A9B00021006566803160610800B34B20384D602E +:10A9C000C38142818581458205810A220582828276 +:10A9D0000D80E767A667FFF78BFEFDF7EBFEFFF73D +:10A9E00093FFFFF75BFF0020F8BD10B50400FFF7F1 +:10A9F00035FF002807D002201AF0DCFCFCF72AFF04 +:10AA00000022210002E0AC480022210001F310F8EE +:10AA100010BDF1B517F07EFA994E0700756E346ED1 +:10AA2000009A0021012011F386EF2943204371662B +:10AA30003066380017F072FA0023290020005940D0 +:10AA4000584008430AD1FFF709FF002800D0022030 +:10AA50001AF0B0FC012189061DF028E8F8BD0F208E +:10AA6000D7E78A49CA69904203D10020C8611520FE +:10AA7000CFE7704710B5854CE06901F388FA0020F4 +:10AA8000E06110BDF8B505007D26F60017F042FA2A +:10AA90000700FFF7EFFF884901200A684B3C92A8A6 :10AAA0000100000058A7000000040000CAB196276A -:10AAB000040000200864086688638864C864086528 -:10AAC00048712000FF304130006B0121FFF7B0FFDB -:10AAD00007F33CFA8034206461646165206510BD31 -:10AAE000A84A0004A0F100C0E8F000C0C63B01C0C5 -:10AAF000FDFF000094F100C0A8F100C0403901C082 -:10AB0000B2F100C0032010B502F08EFF10BD01208D -:10AB100010B502F089FF10BD022010B502F084FFCD -:10AB200010BD10B5FF480088002807D0FEF78BFB4A -:10AB3000002803D1FEF771FB002801D0002010BDD2 -:10AB4000012010BDF8B50125F74CF84E2079F84FDB -:10AB500000281CD0F06940004008F061380004F083 -:10AB6000DDFDF9F786FFF349002848610CD1002587 -:10AB70002571C821E760216105216181C4206571CB -:10AB800060610A20E08002E0207900280ED1EA48C6 -:10AB90008168020D91438160380004F0BFFDF069C7 -:10ABA0000121C9070843F061F9F763FF2800F8BDE8 -:10ABB00070B5FF21E14DDB48F5312980002101808E -:10ABC0000A21841C01821E20207000206070012058 -:10ABD000A0700020E070217160711CF04CEFA0713A -:10ABE000000AE07104202072002060720320A0722D -:10ABF0000020E07228882073000A607370BDF8B5E9 -:10AC0000F9F78AFECE4800250580CE48C64C05706F -:10AC1000CD480580CD480560FF205A30A06304F080 -:10AC2000CEFECB494000085A20600126657226629C -:10AC30007D276563FF00A562E7612663E56204F096 -:10AC4000F1FF20713222E680C248E2602061C248F2 -:10AC5000608166712566C14821006566803160614A -:10AC60000800B34B20384D60C38142818581458205 -:10AC700005810A22058282820D80E767A667FFF7B9 -:10AC80008BFEFDF7F2FEFFF793FFFFF75BFF00205F -:10AC9000F8BD10B50400FFF735FF002807D00220EB -:10ACA0001AF09AFBFCF714FF0022210002E0AC48E6 -:10ACB0000022210000F3C6FE10BDF1B517F058FACE -:10ACC000994E0700756E346E009A0021012011F331 -:10ACD0003CEE2943204371663066380017F04CFA89 -:10ACE0000023290020005940584008430AD1FFF7AB -:10ACF00009FF002800D002201AF06EFB012189060E -:10AD00001CF0A4EEF8BD0F20D7E78A49CA6990422B -:10AD100003D10020C8611520CFE7704710B5854CDE -:10AD2000E06901F33EF90020E06110BDF8B50500CF -:10AD30007D26F60017F01CFA0700FFF7EFFF8849A1 -:10AD400001200A6858318A4200D0002000281DD016 -:10AD5000754C6034002D02D0A589002D00D1658985 -:10AD600019F00EFC002803D0A08A002800D00500AE -:10AD70002089002800D00600002200926D4B2A0096 -:10AD80007243784800211C3301F3A8F8380017F00B -:10AD9000F3F9F8BD64480021603081750800C5E70B -:10ADA000644808B5C06900280AD15F480022614B99 -:10ADB00060300092C2896B4800211C3301F38EF889 -:10ADC00008BD59486030807DB0E75A48C069002806 -:10ADD00000D001207047FFB585B00E001700002598 -:10ADE000FFF790FE0400FFF792FE5D49002806D0B1 -:10ADF0000A6808005830824201D1012000E000209A -:10AE000002900020002C019004D15548096834308C -:10AE100081422AD0FEF717FA012803D0FEF7FDF988 -:10AE2000012824D1002C22D117F0A2F90400002E11 -:10AE300008D107F38BF84A4A8032D1649064182015 -:10AE4000FFF73BFFFFF74EF801280BD1464D002FCF -:10AE500001D1002005E0002205981100F6F74CFE14 -:10AE600001202870200017F087F909B0F0BD029882 -:10AE70003E49204304914AD00120002C05D1384995 -:10AE8000E031097A052900D000203549029AC03105 -:10AE9000002A039103D00399CF6204998E7539007B -:10AEA000314301D10C2532E00B250028E5FF366047 +:10AAB00058318A4200D0002000281DD0754C6034E7 +:10AAC000002D02D0A589002D00D1658919F01EFD49 +:10AAD000002803D0A08A002800D005002089002883 +:10AAE00000D00600002200926D4B2A007243784885 +:10AAF00000211C3301F3F2F9380017F019FAF8BD00 +:10AB000064480021603081750800C5E7644808B5D5 +:10AB1000C06900280AD15F480022614B6030009272 +:10AB2000C2896B4800211C3301F3D8F908BD59488C +:10AB30006030807DB0E75A48C069002800D001200D +:10AB40007047FFB585B00E0017000025FFF790FE97 +:10AB50000400FFF792FE5D49002806D00A6808004D +:10AB60005830824201D1012000E0002002900020F4 +:10AB7000002C019004D155480968343081422AD014 +:10AB8000FEF717FA012803D0FEF7FDF9012824D1BA +:10AB9000002C22D117F0C8F90400002E08D107F3C9 +:10ABA000D5F94A4A8032D16490641820FFF73BFF00 +:10ABB000FFF74EF801280BD1464D002F01D10020A0 +:10ABC00005E0002205981100F7F79AF80120287097 +:10ABD000200017F0ADF909B0F0BD02983E492043BE +:10ABE00004914AD00120002C05D13849E031097A7E +:10ABF000052900D000203549029AC031002A03916E +:10AC000003D00399CF6204998E753900314301D185 +:10AC10000C2532E00B2500282FD0002E01D0092072 +:10AC200000E00020002F01D0022100E000210143BC +:10AC3000019119F06BFC00281AD02848006812F323 +:10AC4000FCE9022101430198FAF7D1FF00280FD156 +:10AC500001981CF04EEF00280AD101000500002CDD +:10AC6000019000D10C25002C07D10398C16204E0AB +:10AC7000002C02D11A490120C8600298002804D093 +:10AC8000002C02D1049901980882002DA3D029E05C +:10AC90005C3A01C0A83801C0002100808813000080 +:10ACA000E0F300C0802800800AF400C018F400C05F +:10ACB00004F400C008F400C00CF400C0CA7A02001A +:10ACC000204E0000830600000A1A0000084A000413 +:10ACD0001FA7000044F300C0083901C0A0F200C063 +:10ACE000543901C02800FFF79EFE74E770B50500D7 +:10ACF000AE48AF49006809680843AE49096808438F +:10AD00002FD1FEF756F900282BD1FEF73CF9002889 +:10AD100027D1FEF75EFFFFF7B0FDA74C002821D03A +:10AD200019F037FE00281DD019F0F0FB002803D1E0 +:10AD3000FFF7ADFD002815D0A0480068012807D016 +:10AD40009F48008800280DD09E480088002809D020 +:10AD500004F01FFE608B0121401C608328001CF062 +:10AD6000B0EE70BD608B0022401C60831100280093 +:10AD70000123FFF7E6FE70BD0A2054E670B5F9F72F +:10AD8000E5FB00280CD019F004FE00284FD0FFF797 +:10AD900074FD00284BD0FDF795FD002847D044E016 +:10ADA00089488A49C06888423FD019F0F2FD0028DE +:10ADB00035D00025FFF75CFD012400280CD00220CF +:10ADC0001AF002FBFCF750FD02682100403082427D +:10ADD00000D00021080070BDFFF74FFD00281CD0F7 +:10ADE0007549754AC03909682000683A914200D017 +:10ADF000002000280AD1704A8032D26A002A05D089 +:10AE00006D4A20005C3A914200D000206A4A443AE0 +:10AE1000914200D0002404432500280070BD6C48F6 +:10AE2000007A032801D0022801D1002070BD012042 +:10AE300070BD654910B50968002909D16049654AA6 +:10AE400009881278114303D00A2801D00B2801D1B8 +:10AE5000012010BD022019F0BEFD10BD5648203063 +:10AE6000007A7047544920310A7A022A03D1564A9F +:10AE70005268002A00D00872704770B5FFF7FDFCD9 +:10AE80000124002816D0FEF794F84B4DC03D002851 +:10AE900003D1FEF778F8002804D0474920002A683B +:10AEA000443903E044492A682000683948B3763CB5 :10AEB0000100000054AB0000000400003EDEE393FC -:10AEC0002FD0002E01D0092000E00020002F01D05B -:10AED000022100E000210143019119F05BFB0028F1 -:10AEE0001AD02848006812F3B2E802210143019801 -:10AEF000FAF7A7FD00280FD10198FAF7E7FF00281D -:10AF00000AD101000500002C019000D10C25002C75 -:10AF100007D10398C16204E0002C02D11A49012034 -:10AF2000C8600298002804D0002C02D1049901982E -:10AF30000882002DA3D029E0C43B01C0C03801C065 -:10AF4000002100808813000088F100C08028008064 -:10AF5000B2F100C0C0F100C0ACF100C0B0F100C05F -:10AF6000B4F100C0467A0200204E000083060000C3 -:10AF70000A1A0000E8490004B3A90000ECF000C080 -:10AF8000203901C030F000C06C3901C02800FFF743 -:10AF90009EFE74E770B50500AE48AF4900680968C9 -:10AFA0000843AE49096808432FD1FEF756F9002837 -:10AFB0002BD1FEF73CF9002827D1FEF75EFFFFF703 -:10AFC000B0FDA74C002821D019F021FD00281DD08C -:10AFD00019F0E0FA002803D1FFF7ADFD002815D0E5 -:10AFE000A0480068012807D09F48008800280DD09D -:10AFF0009E480088002809D004F0ACFD608B012138 -:10B00000401C608328001CF02CED70BD608B00227A -:10B01000401C6083110028000123FFF7E6FE70BD8D -:10B020000A2054E670B5F9F7A1F900280CD019F000 -:10B03000EEFC00284FD0FFF774FD00284BD0FDF741 -:10B040009BFD002847D044E089488A49C06888426F -:10B050003FD019F0DCFC002835D00025FFF75CFD5F -:10B06000012400280CD002201AF0C0F9FCF73AFDA8 -:10B07000026821004030824200D00021080070BDEB -:10B08000FFF74FFD00281CD07549754AC039096883 -:10B090002000683A914200D0002000280AD1704A6E -:10B0A0008032D26A002A05D06D4A20005C3A914273 -:10B0B00000D000206A4A443A914200D00024044360 -:10B0C0002500280070BD6C48007A032801D00228B2 -:10B0D00001D1002070BD012070BD654910B509681F -:10B0E000002909D16049654A09881278114303D0C3 -:10B0F0000A2801D00B2801D1012010BD022019F02F -:10B10000A8FC10BD56482030007A704754492031C1 -:10B110000A7A022A03D1564A5268002A00D00872DD -:10B12000704770B5FFF7FDFC0124002816D0FEF72C -:10B1300094F84B4DC03D002803D1FEF778F8002865 -:10B1400004D0474920002A68443903E044492A686A -:10B15000200068398A4200D0002070BDFFF7DCFC77 -:10B1600000280CD002201AF041F9FCF7BBFC026861 -:10B1700021004030824200D00021080070BD012033 -:10B1800070BD1FB500201AF031F900280AD0C06840 -:10B19000C00407D5FFF7C5FC002803D0FDF7E5FD87 -:10B1A00004B010BD0122022102A800F392FF0300A7 -:10B1B00008D00420FFF7AAFF00220092304A0021A5 -:10B1C00002A807E00220FFF7A1FF002211001000F3 -:10B1D00013000092F9F730FEE2E725480169C160EB -:10B1E0007047F8B5002407000E001AF0AFF81E4DA6 -:10B1F000F00608D52888102188432880FFF78CFCAA -:10B20000002800D10124B005800F002600280DD0B1 -:10B210003800FCF769FC2988032212029143298037 -:10B22000068019F0FCFB002800D001242888312179 -:10B230000901084203D10D4806801248066020002B -:10B24000F8BD0B49086070470949486070470849D4 -:10B250008860704700F100C0FCF000C0F8F000C04A -:10B26000A84A000424F200C0C43B01C0C0F100C0E1 -:10B2700088F100C0FFFF00006C3901C0ACF100C0D4 -:10B2800088130000B4F100C0FA480088002802D0FA -:10B29000F9490120886000207047F6480188F64887 -:10B2A000002901D0012181600178042901D1052103 -:10B2B000017000207047F04880687047347C8DA88A +:10AEC0008A4200D0002070BDFFF7DCFC00280CD0C7 +:10AED00002201AF083FAFCF7D1FC0268210040300E +:10AEE000824200D00021080070BD012070BD1FB556 +:10AEF00000201AF073FA00280AD0C068C00407D5F1 +:10AF0000FFF7C5FC002803D0FDF7DFFD04B010BD3E +:10AF10000122022102A801F3DCF8030008D004207A +:10AF2000FFF7AAFF00220092304A002102A807E0A2 +:10AF30000220FFF7A1FF0022110010001300009271 +:10AF4000FAF759F8E2E725480169C1607047F8B59A +:10AF5000002407000E001AF0F1F91E4DF00608D586 +:10AF60002888102188432880FFF78CFC002800D116 +:10AF70000124B005800F002600280DD03800FCF712 +:10AF80007FFC29880322120291432980068019F050 +:10AF900012FD002800D0012428883121090108422F +:10AFA00003D10D480680124806602000F8BD0B4909 +:10AFB00008607047094948607047084988607047D1 +:10AFC00058F300C054F300C050F300C0C84A000456 +:10AFD00088F400C05C3A01C018F400C0E0F300C07F +:10AFE000FFFF0000543901C004F400C088130000C2 +:10AFF0000CF400C0FD480088002802D0FC49012064 +:10B00000886000207047F9480188F948002901D07C +:10B01000012181600178042901D1052101700020FE +:10B020007047F3488068704710B50C00022011F09B +:10B030004AF9002803D10221080001F0E2FF617AF9 +:10B04000032902D0227A012A0CD1E268D2042ED53B +:10B05000002804D0FF304130007A072827D0207A1A +:10B06000012824D0022908D1FFF70CFC00281ED0AB +:10B07000FF204930005D072819D1E068C00409D5D8 +:10B08000607A032802D0207A012803D1D7480088AB +:10B09000C0060CD516F052FFD6490A78002A07D10F +:10B0A00001220A7016F04EFF0120FFF7C6FC10BD0A +:10B0B00016F048FF10BD10B5CD4C2069002803D014 +:10B0C00000F379FF0020206110BD38B50400FFF7C0 +:10B0D000D9FB002804D0C54800888005800F0ED019 +:10B0E000FFF7E9FF0022C2480092C0887D22D2000B +:10B0F000BF4B4243C0482100103300F3F9FE38BD76 +:10B1000010B502F0D3FB002805D002F056F9002854 +:10B1100001D1012010BD002010BD38B50D00B44C88 +:10B12000E168884228D10020E060FFF7E9FF0028AD +:10B1300020782AD002281FD11CF0E8EC00280FD17B +:10B14000F9F708FA00280BD1AC4800220068462124 +:10B1500000F31FFB002803D11CF0C8EC00280CD022 +:10B160000022009260887D22D200A14B4243A44875 +:10B1700029000C3300F3BCFE38BD032001212070F0 +:10B18000490328001CF0A6EC38BD0028FCD0062896 +:10B190000AD1FFF777FB002800D002201AF01EF931 +:10B1A000012109031CF096EC0720207038BD10B572 +:10B1B0008F4CE068002803D000F3FDFE0020E06023 +:10B1C00010BD70B516F0BAFE894C05002078002835 +:10B1D00005D0072803D0FFF7EAFF072020702800DA +:10B1E00016F0B0FE70BDF8B5060016F0A7FE804C54 +:10B1F00005002178002919D0012917D0072915D079 +:10B20000032913D0042911D005290FD006290DD008 +:10B21000FFF7CDFF0022009260887D22D2004243DA +:10B220002300774831000C3300F362FE280016F04B +:10B2300089FEF8BD70B5050016F080FE6C4C060066 +:10B240002078072808D1FFF75BFF002804D00220F0 +:10B2500020702800FFF7C7FF300016F073FE70BDA6 +:10B2600010B516F06BFE0400FFF7A1FF60490878E7 +:10B27000052803D0042801D0032801D1012000E0D3 +:10B2800000200870200016F05DFE10BD10B5FFF71D +:10B29000FEFA002801D05B4809E0FFF7F3FA002826 +:10B2A00007D002201AF09AF8FCF7E8FA7430FCF2A2 +:10B2B00051FC0A20FFF7C1FB10BDF8B573BEECE7E7 :10B2C0000100000050AF0000000400006D0430FFDA -:10B2D00010B50C00022011F016FA002803D102214B -:10B2E000080002F005F8617A032902D0227A012AC7 -:10B2F0000CD1E268D2042ED5002804D0FF30613092 -:10B30000007C072827D0207A012824D0022908D1E0 -:10B31000FFF70CFC00281ED0FF207130005D0728CD -:10B3200019D1E068C00409D5607A032802D0207AD8 -:10B33000012803D1D4480088C0060CD516F02CFF94 -:10B34000D3490A78002A07D101220A7016F028FF93 -:10B350000120FFF7C6FC10BD16F022FF10BD10B58E -:10B36000CA4C2069002803D000F32FFE0020206182 -:10B3700010BD38B50400FFF7D9FB002804D0C2483F -:10B3800000888005800F0ED0FFF7E9FF0022BF483C -:10B390000092C0887D22D200BC4B4243BD482100B0 -:10B3A000103300F3AFFD38BD10B502F0E8FB002804 -:10B3B00000D0012010BD38B50D00B44CE1688842C2 -:10B3C00028D10020E060FFF7EFFF002820782AD086 -:10B3D00002281FD11CF066EB00280FD1F8F7CAFF36 -:10B3E00000280BD1AC4800220068462100F3DBF9AD -:10B3F000002803D11CF04AEB00280CD00022009258 -:10B4000060887D22D200A14B4243A44829000C331E -:10B4100000F378FD38BD0320012120704903280086 -:10B420001CF028EB38BD0028FCD006280AD1FFF715 -:10B430007DFB002800D0022019F0E2FF0121090362 -:10B440001CF018EB0720207038BD10B58F4CE06859 -:10B45000002803D000F3B9FD0020E06010BD70B5F6 -:10B4600016F09AFE894C05002078002805D00728A0 -:10B4700003D0FFF7EAFF07202070280016F090FEA7 -:10B4800070BDF8B5060016F087FE804C05002178E7 -:10B49000002919D0012917D0072915D0032913D065 -:10B4A000042911D005290FD006290DD0FFF7CDFFB3 -:10B4B0000022009260887D22D20042432300774818 -:10B4C00031000C3300F31EFD280016F069FEF8BDB4 -:10B4D00070B5050016F060FE6C4C06002078072859 -:10B4E00008D1FFF761FF002804D002202070280057 -:10B4F000FFF7C7FF300016F053FE70BD10B516F011 -:10B500004BFE0400FFF7A1FF60490878052803D02F -:10B51000042801D0032801D1012000E00020087098 -:10B52000200016F03DFE10BD10B5FFF704FB00280B -:10B5300001D05B4809E0FFF7F9FA002807D00220A4 -:10B5400019F05EFFFCF7D8FA7430FCF20DFB0A200C -:10B55000FFF7C7FB10BDF8B5040045694B4E00204E -:10B56000B060FDF734FB484F3888002803D019F04D -:10B5700055FA002804D03078012801D0052857D189 -:10B58000454800220068462100F30DF9002834D117 -:10B59000F9F745FE002830D038880127002821D04F -:10B5A000687A032802D0287A012803D119F036FAE4 -:10B5B000002806D0687A022814D119F03AFA002837 -:10B5C00010D01020F5F7D1FD1020F5F7DAFD04209A -:10B5D000F5F766FEF5F775FE0920FFF782FB3148A7 -:10B5E00007703DE03078052820D12E4801210770F2 -:10B5F000062089053070280030E0388800280DD0FA -:10B600000020FFF791FF1020F5F7AFFD1020F5F7B0 -:10B61000B8FD0420F5F744FEF5F753FE3078052811 -:10B6200002D10220307016E0012819D10020F9E77C -:10B63000002810D007280ED0FFF7B6FE00280AD049 -:10B64000307802280CD1FFF7AFFE002808D019F09F -:10B65000E5F9002804D00121606909031CF00AEA19 -:10B660000020F8BD10B519F0E4F9002829D10648EA -:10B6700006490088002819D00B480088002815D0FA -:10B68000012048701DE00000C43B01C0ACF100C0C7 -:10B69000F8F500C051AF000080EF00C037B00000E7 -:10B6A000E04A0004A17C0200403901C0087800286B -:10B6B00001D0072805D119F0C9F9002801D1FFF7F9 -:10B6C00083FB002010BD70B501894469E83643D37F +:10B2D000040045694B4E0020B060FDF728FB484F45 +:10B2E0003888002803D019F065FB002804D0307896 +:10B2F000012801D0052857D1454800220068462181 +:10B3000000F351FA002834D1FAF765F8002830D05C +:10B3100038880127002821D0687A032802D0287AAB +:10B32000012803D119F046FB002806D0687A0228CC +:10B3300014D119F04AFB002810D01020F5F77FFF38 +:10B340001020F5F788FF0420F6F714F8F6F723F835 +:10B350000920FFF77CFB314807703DE03078052875 +:10B3600020D12E4801210770062089053070280061 +:10B3700030E0388800280DD00020FFF791FF102022 +:10B38000F5F75DFF1020F5F766FF0420F5F7F2FFF3 +:10B39000F6F701F83078052802D10220307016E067 +:10B3A000012819D10020F9E7002810D007280ED075 +:10B3B000FFF7B0FE00280AD0307802280CD1FFF742 +:10B3C000A9FE002808D019F0F5FA002804D00121C0 +:10B3D000606909031CF088EB0020F8BD10B519F076 +:10B3E000F4FA002829D1064806490088002819D017 +:10B3F0000B480088002815D0012048701DE000008F +:10B400005C3A01C004F400C040F800C0BDAC0000CC +:10B41000F0F100C0AFAD0000004B0004017D020060 +:10B42000283901C00878002801D0072805D119F073 +:10B43000D9FA002801D1FFF77DFB002010BD70B5BF +:10B44000018944690D18280010F30DF800281DD05B +:10B4500019F0B0FA00280AD01B480078002801D063 +:10B46000072804D10121890420001CF03EEBFFF7DE +:10B4700018FA002803D1FFF70FFA002806D019F0B8 +:10B480009CFA002802D01C20FFF7E1FA280010F3F4 +:10B4900004F8002805D00D48002200681E2100F3A2 +:10B4A00082F970BD0A480088002805D00648417816 +:10B4B000012901D1022141707047034841780229D6 +:10B4C00001D103214170704704F400C0F0F100C0C5 +:10B4D0005C3A01C0142359430918D031097C01207A +:10B4E000032900D20020704710B50400007C032817 +:10B4F00001D2401C207462682260A2686260A16070 +:10B5000022686068131ADB1C062B0DD8431ADB1C5B +:10B51000062B09D88B1ADB1C062B05D810184018EF +:10B52000032111F3BEED0BE0884201DA030000E0D5 +:10B530000B00934201DD100002E0884200DB0800AE +:10B54000E06010BD03000220032210B5411E14006C +:10B550008C402104090C8B4205D3401C0004000CD4 +:10B560000A28F3D90A2010BD30B50125446895405A +:10B570000368AC4203DA5918641C12C030BD1C00C9 +:10B5800014411A1B5118016030BD0A0010B5416802 +:10B59000002909D0012393400068994202DA11F38F +:10B5A00080ED10BD104110BD6120C04310BDF8B545 +:10B5B00004001000069A009202000F001D002000F7 +:10B5C0001CF0E2FB060019D0F87E0698296807688F +:10B5D0002000FF3003220D30FFF7C6FF2000FF30B0 +:10B5E000032239001530FFF7BFFFFF203D30025B1B +:10B5F0002000FF3039002D30FFF7B6FF3000F8BDD6 +:10B600007FB503AA040002AB009201AA1CF0BCFBA8 +:10B61000010020000122C030426000220029027394 +:10B6200032D025000398A035E88002980322010457 +:10B630000914A9800198288128006C30FFF794FF35 +:10B6400006212800695E03227430FFF78DFFFF207A +:10B650003F30025B06212800695E9430FFF784FFCB +:10B6600018F068FF002809D0FF48006811F3F8ECD3 +:10B6700001000420FAF7CFFA002805D020001CF0C2 +:10B6800054EA20001CF054EA7FBD70B504001DD0C0 +:10B69000072008560B268E572500E43501002800A8 +:10B6A000FFF722FF287C002801D0E96801E0612132 +:10B6B000C9432000FF3003221D30FFF755FF200053 +:10B6C000FF30032231002530FFF74EFFE76BFCCE41 :10B6D000010000004CB3000000040000D2C1154C72 -:10B6E0000D1828000FF3C9FE00281DD019F0A0F98D -:10B6F00000280AD01B480078002801D0072804D170 -:10B700000121890420001CF0C0E9FFF71EFA00287F -:10B7100003D1FFF715FA002806D019F08CF900289C -:10B7200002D01C20FFF7E7FA28000FF3C0FE002824 -:10B7300005D00D48002200681E2100F33EF870BDC0 -:10B740000A480088002805D006484178012901D11F -:10B7500002214170704703484178022901D1032139 -:10B7600041707047ACF100C080EF00C0C43B01C025 -:10B77000142359430918F831097C0120032900D208 -:10B780000020704710B50400007C032801D2401C43 -:10B79000207462682260A2686260A16022686068AA -:10B7A000131ADB1C062B0DD8431ADB1C062B09D8F9 -:10B7B0008B1ADB1C062B05D810184018032111F337 -:10B7C0007AEC0BE0884201DA030000E00B009342C0 -:10B7D00001DD100002E0884200DB0800E06010BDDF -:10B7E00003000220032210B5411E14008C402104E6 -:10B7F000090C8B4205D3401C0004000C0A28F3D925 -:10B800000A2010BD30B50125446895400368AC425C -:10B8100003DA5918641C12C030BD1C0014411A1BF5 -:10B820005118016030BD0A0010B54168002909D0E7 -:10B83000012393400068994202DA11F33CEC10BDF9 -:10B84000104110BD6120C04310BDF8B504001000C8 -:10B85000069A009202000F001D0020001CF05CFA06 -:10B86000060019D0F87E0698296807682000FF3086 -:10B8700003223530FFF7C6FF2000FF3003223900D6 -:10B880003D30FFF7BFFFFF206530025B2000FF3037 -:10B8900039005530FFF7B6FF3000F8BD7FB503AA79 -:10B8A000040002AB009201AA1CF036FA2500012127 -:10B8B000C035E9620022F42100280A5530D00398EF -:10B8C0006882029803220104091429820198A8823F -:10B8D00028007430FFF796FF12212800695E0322CA -:10B8E0007C30FFF78FFFFF206730025B12212800BA -:10B8F000695E9C30FFF786FF18F060FE002809D0D3 -:10B90000FB48006811F3B6EB01000420FAF7ADF82C -:10B91000002805D020001CF0D4E820001CF0D4E85A -:10B920007FBD70B504001ED00720085625000B26E9 -:10B930008E57FF350D3501002800FFF723FF287CC7 -:10B94000002801D0E96801E06121C9432000FF30EF -:10B9500003224530FFF756FF2000FF30032231005D -:10B960004D30FFF74FFF70BD0321FF3035305AE7F0 -:10B970000321FF303D3056E7FF216531095AFF3082 -:10B98000553050E7FF216731095AFF305D304AE7F3 -:10B9900070B50500FFF7F6FF04002800FFF7E4FF8D -:10B9A000201A70BD70B50500FFF7E2FF0400280003 -:10B9B000FFF7DAFF201A70BD70B50500FFF7DCFF56 -:10B9C00004002800FFF7D0FF201A70BD10B5040056 -:10B9D000FF300D30142111F3A8EA2000FF300021C0 -:10B9E00045300A0006C00400080003C410BD010071 -:10B9F000C03100224A836122D243CA82FF300A83C7 -:10BA0000553000210A0006C0704761220100D24370 -:10BA1000C03110B50A824A8200228A829C3113000A -:10BA20000CC100F0D0F910BD70B5040016F0BEFBDB -:10BA300005002000F830142111F376EA200000F010 -:10BA4000CDF9280016F0B6FB70BD70B5050016F0F4 -:10BA5000ADFB04002800FFF7E7FF2800FFF7D5FF44 -:10BA60002800FFF7C4FF200016F0A4FB70BD10B53E -:10BA70000400FF3003216130C18081802000FFF786 -:10BA8000A5FF2000FF30002155300A0006C006C087 -:10BA9000200000F0A3F910BD0100FF314131096819 -:10BAA0000120012900DA0020704770B50400FF3042 -:10BAB000401C826C416C82634163026DC16C026404 -:10BAC000C1632000FF3003214D30FFF7ACFE25009D -:10BAD000C0356882280000219C300A001F9026F1A2 +:10B6E00070BD0321FF300D3059E70321FF301530C5 +:10B6F00055E7FF213D31095AFF302D304FE7FF213B +:10B700003F31095AFF30353049E770B50500FFF782 +:10B71000F6FF04002800FFF7E4FF201A70BD70B5A3 +:10B720000500FFF7E2FF04002800FFF7DAFF201A08 +:10B7300070BD70B50500FFF7DCFF04002800FFF7BF +:10B74000D0FF201A70BD10B50400E430142111F3AD +:10B75000ECEB2000FF3000211D300A0006C0040081 +:10B76000080003C410BD0100A0310022CA8161227B +:10B77000D2434A81FF308A812D3000210A0006C061 +:10B78000704761220100D243A03110B58A80CA807F +:10B7900000220A81943113000CC100F0B5F910BDEC +:10B7A00070B5040016F0DEFB05002000D030142137 +:10B7B00011F3BAEB200000F0B2F9280016F0D6FB26 +:10B7C00070BD70B5050016F0CDFB04002800FFF732 +:10B7D000E7FF2800FFF7D5FF2800FFF7C4FF200090 +:10B7E00016F0C4FB70BD10B50400FF3003212130FA +:10B7F000C18381832000FFF7A6FF2000FF300021D6 +:10B800002D300A0006C006C0200000F088F910BDE7 +:10B810000100FF31491C89690120012900DA00205B +:10B82000704770B50400FF30401C026AC1690261B4 +:10B83000C160826A416A826141612000FF30032158 +:10B840002530FFF7ACFE2500A035E8802800002158 +:10B8500094300A0006C0200000F056F928000321A9 +:10B860007C30FFF79CFEA880E988081A2881200018 +:10B87000FFF769FF70BD002907D0017A002904D0C5 +:10B880000121C03041600021017370470121C030A7 +:10B89000416000210173704703000A000800C032B4 +:10B8A00010B51168994204D1002111600AF05CF9C9 +:10B8B00010BD73484168491C416010BD7048007854 +:10B8C0007047F0B504000B2080012018476989B04B +:10B8D000002004A906901CF006E9607A032831D103 +:10B8E000E068C0042ED53D00FF354135A86800282A +:10B8F00028D0FAF746FD0499884223D119F064F85C +:10B90000002802D1A87B00281CD05E4EA8684643C0 +:10B910000AF3E4F9FD1DF9352A6C6B6C801A994124 +:10B920000023321A8B410DD2012100220091002107 +:10B930000192072220000B00F6F757FA0AF3CEF91E +:10B94000696428640DF00BFF2500C0350590686818 +:10B95000002805D000204A496860A860487059E076 +:10B96000A86826008036002809D10120A8600AF3C3 +:10B97000B5F9F1634249B0630020487048E0200007 +:10B980001CF094E800283BD0FAF7FBFC04998842AD +:10B9900036D10AF3A3F9B26BF36B801A994105997A +:10B9A00011F376EF0006000E354906900128487025 +:10B9B0002ED906A80EF00DF86B461A7E00210A203B +:10B9C0000EF0BEFE6020005D00280BD06B46197E95 +:10B9D000884207D82C4901220878104308702000BB +:10B9E0001CF0B4E85F206B46005D197E88420FD8DA +:10B9F00000200100287307222000FAF7C7FD07E0A6 +:10BA00000598B26BF36B002180185941F163B06364 +:10BA10000120A8601A486B46197EFF374137017034 +:10BA2000B87B002853D0FAF7ACFC049988424ED179 +:10BA30000AF354F902900391E17A062000F0FEFA2D +:10BA400043E0F868C0043BD5032000023E18F08BA9 +:10BA5000002835D0306A00282FD1F16AB06A00235F +:10BA600059405840084328D0F08B064B5843089063 +:10BA7000C3170793F36AB26A039907E0A0F200C004 +:10BA80001CF400C040420F00B0F200C00298801ABF +:10BA9000089A9941079B121A8B4111D20121412228 +:10BAA000009100210192072238000B00F6F79DF962 +:10BAB00003990298F162B06202E000203062F7E779 +:10BAC000E27A0621380001F056FC0700B9D10022C5 +:10BAD00000921848059A2B00210000F3952040B8E9 :10BAE0000100000048B7000000040000811BC620D0 -:10BAF00006C0200000F071F9280003218430FFF710 -:10BB00009CFE2882698A081AA8822000FFF768FF35 -:10BB100070BD002909D0017A002906D00100012258 -:10BB2000C031CA620021E030017570470100012276 -:10BB3000C031CA620021E0300175704703000A007D -:10BB40000800C03210B5916A994204D10021916277 -:10BB50000AF0C9F910BD6C484168491C416010BD2C -:10BB6000694800787047F0B5040089B0002004A946 -:10BB700006901BF088EF0B20617A800125180329BD -:10BB80003FD1E068C0043CD5A86BFF30401C006A80 -:10BB9000002836D0FAF73BFD0499884231D118F0DD -:10BBA00051FF002803D018F013FD002805D1A86B21 -:10BBB000FF3021308079002823D0A86B534EFF300E -:10BBC000401C006A002746430AF392F8AA6BFF3232 -:10BBD00019320CCA801A99413B00321A8B4110D29B -:10BBE00001210022009100210192072220000B0078 -:10BBF000F6F701F80AF37CF8AA6BFF32521CD16108 -:10BC000090610DF0E6FE2600C0360590F06A00282F -:10BC100005D000203C49F0623063487059E0306B39 -:10BC200027008037002809D1012030630AF360F82B -:10BC30007966354938660020487048E020001BF0DE -:10BC400006EF00283BD0FAF7E2FC0499884236D18F -:10BC50000AF34EF83A6E7B6E801A9941059911F3FA -:10BC600022EE0006000E28490690012848702ED9C1 -:10BC700006A80DF0E8FF6B461A7E00210A200EF0A0 -:10BC8000E5FE6020005D00280BD06B46197E8842DF -:10BC900007D81F48012201781143017020001BF0D2 -:10BCA00022EF5F206B46005D197E88420FD800218D -:10BCB000F420015507222000FAF7AFFD07E00598B0 -:10BCC0003A6E7B6E002180185941796638660120F2 -:10BCD00030630D486B46197E0170A86BFF30213030 -:10BCE000807900285BD0FAF792FC0499884256D1FB -:10BCF00009F3FEFF02900391E17A062000F0FCFABE -:10BD00004BE0000030F000C0C4F100C040420F0022 -:10BD100058F000C0E868C0043AD50D2080012E1804 -:10BD2000F088002834D0B068002828D10320000211 -:10BD30002F18796D386D00235940584008431ED0A4 -:10BD4000F088304B039958430790C6173A6D029814 -:10BD50007B6D801A079A99413300121A8B4117D2D2 -:10BD600001214122009100210192072228000B00AD -:10BD7000F5F741FF039902987965386508E00020DE -:10BD8000B06003200002039A0299281842650165F9 -:10BD9000E27A0621280001F067FC0500BAD10022F2 -:10BDA000230000921848059AE833210000F3BEF8FA -:10BDB00009B0F0BD10B50400007A01280CD02000B5 -:10BDC000C030806A00F315F920001821E03011F32B -:10BDD000B6E82000FFF7C7FE10BDFF21673100B5B0 -:10BDE0000A5AD223195EFF305D30FFF715FD00BD02 -:10BDF0000100FF310022353113000CC10800110091 -:10BE000006C0704740420F0095B70000914200D92C -:10BE10001100484B80001A501A00103A11500120AE -:10BE200070474549800008587047444810B5FCF2F7 -:10BE30009DFF40491439086000200A1D8300D35833 -:10BE40000C68401CE31A0006000E04280B60F5D3B2 -:10BE50000868002800DAFEE710BD3749C07B1031C2 -:10BE6000085C7047F0B5060096469C46324A314B56 -:10BE7000B60097599B590024012025009F4213D2F8 -:10BE80008B00D1581A002B4B0020103B9A5891423E -:10BE900000D9012499598F4206D326490125143926 -:10BEA0000968214300D101207146002900D00C60AF -:10BEB0006146002900D00D60F0BDFEB505000020F0 -:10BEC0000E00019000901D492869884201D0012090 -:10BED000FEBD1948E97B1030475CB74201D1002014 -:10BEE000FEBD16F06DF9029039003000F2600AAA2A +:10BAF0001DFA09B0F0BD10B50400007A01280CD081 +:10BB00002000C030006800F374FA20001821B8301B +:10BB100011F314EA2000FFF7DEFE10BDFF213F31D4 +:10BB200000B50A5AA623195EFF303530FFF730FD05 +:10BB300000BD0100FF3100220D3113000CC10800CF +:10BB4000110006C07047000005B50000914200D901 +:10BB50001100484B80001A501A00103A1150012071 +:10BB600070474549800008587047444810B5FDF2B9 +:10BB7000FDF840491439086000200A1D8300D3589D +:10BB80000C68401CE31A0006000E04280B60F5D375 +:10BB90000868002800DAFEE710BD3749C07B103185 +:10BBA000085C7047F0B5060096469C46324A314B19 +:10BBB000B60097599B590024012025009F4213D2BB +:10BBC0008B00D1581A002B4B0020103B9A58914201 +:10BBD00000D9012499598F4206D3264901251439E9 +:10BBE0000968214300D101207146002900D00C6072 +:10BBF0006146002900D00D60F0BDFEB505000020B3 +:10BC00000E00019000901D492869884201D0012052 +:10BC1000FEBD1948E97B1030475CB74201D10020D6 +:10BC2000FEBD16F0A9F902903900300001AA6B465A +:10BC3000FFF7B8FF040017D10F4AB80011580029C8 +:10BC400000D1FEE7491E115000990198411A094898 +:10BC500014380368C91801600748E97B103046545E +:10BC6000B0001158491C1150029816F089F92000B3 +:10BC7000FEBD0000C0050004705000046404000410 +:10BC800070B50024B34D04E040194068F4F768FC37 +:10BC9000641CE00029580029F6D170BDAE4821216E +:10BCA00049018160816801229205114381607047DA +:10BCB00070B50024A74D04E040194068F4F75CFC1F +:10BCC000641CE00029580029F6D170BD70B504004D +:10BCD00006F392F806F32BFD142003F0DDFB002C95 +:10BCE00001D1F9F7B4FB16F047F9050007F058FE4B +:10BCF000F9F7DDFB06F30CFD002C01D106F376F815 +:10BD000006F30FFD280016F03BF970BD914810B501 +:10BD10003C38826B521C8263416812200EF01AFD7F +:10BD200016F02AF9040000F0C4F8200016F028F9F3 +:10BD300010BD042010B5FFF264F9012010BD70B5EC +:10BD40000220FFF7B7F8F9F7EFF8FEF7BEFD002481 +:10BD50000126002819D018F044FE002815D018F04C +:10BD6000FDFB002803D1FEF7BAFD00280DD018F026 +:10BD700040FE002809D118F0F1FB76493C39002833 +:10BD800000D08C62754804800E6307F044FC744850 +:10BD9000002200681921FFF21AFD18F0DFFB0028CD +:10BDA0000CD0704D2E72F9F739FF6F4801880029C9 +:10BDB00002D004802C7201E0F9F73AFF6B486C491D +:10BDC000006888420BD1FEF77BFD002800D00220DE +:10BDD00019F022FB012109031BF09AEE08E0FEF79F +:10BDE0006FFD002801D0042000E00320FEF743FE91 +:10BDF00000F0A5F870BDF8B5002019F00DFB002883 +:10BE000002D001200DF0A7FBF9F78EF8002019F001 +:10BE100003FB002802D002200DF09DFBFEF755FD2C +:10BE20004C4C544E00253C3C00282FD018F0D9FD36 +:10BE300000282BD018F092FB002803D1FEF74FFD0D +:10BE4000002823D018F0D5FD00281FD1206B434FC8 +:10BE500000280DD119F0E0FA1BF06AEE002807D196 +:10BE60003F48002200681B21FFF2B1FC002802D0ED +:10BE7000A5623D8015E030880125002800D03D8076 +:10BE800018F06CFB002811D0A5620FE018F0B1FD8E +:10BE9000002806D0206B002803D0256330880028B6 +:10BEA00001D0032000E00420FEF7E5FD00F047F894 +:10BEB000F8BDFEB5304C60693025284360612F4ED7 +:10BEC000706A02273843706206F00EFF01902C4919 +:10BED0002A4A0020C03A0870D068D10D8843D0604B +:10BEE00028480078C00701D1F9F785F8D218D36A3D :10BEF0000100000044BB0000000400007574B3940E -:10BF000001AA6B46FFF7B8FF040017D10F4AB8002B -:10BF10001158002900D1FEE7491E115000990198DF -:10BF2000411A094814380368C91801600748E97BB9 -:10BF300010304654B0001158491C1150029816F0A8 -:10BF40004DF92000FEBD000094010004645000047F -:10BF50002C00000470B50024AE4D04E04019406888 -:10BF6000F4F708FB641CE00029580029F6D170BDE5 -:10BF7000A94821214901816081680122920511436C -:10BF80008160704770B50024A24D04E040194068FC -:10BF9000F4F7FCFA641CE00029580029F6D170BDC2 -:10BFA00070B5040005F332FF06F3CBFB142003F059 -:10BFB000E7FB002C01D1F9F778F916F00BF9050031 -:10BFC00007F0B8FEF9F7A1F906F3ACFB002C01D19C -:10BFD00005F316FF06F3AFFB280016F0FFF870BD5F -:10BFE0008C4810B53038C26A521CC26241681220B7 -:10BFF0000EF036FD16F0EEF8040000F0C4F8200054 -:10C0000016F0ECF810BD042010B5FFF204F8012082 -:10C0100010BD70B50220FFF7A1F8F8F799FEFEF702 -:10C02000A8FD00240126002819D018F018FD0028CA -:10C0300015D018F0D7FA002803D1FEF7A4FD002888 -:10C040000DD018F014FD002809D118F0CBFA714971 -:10C050003039002800D0CC61704804804E6207F06F -:10C06000A4FC6F48002200681921FFF2BAFB18F007 -:10C07000B9FA00280CD06B4D2E72F9F7F9FC6A481A -:10C080000188002902D004802C7201E0F9F7FAFC43 -:10C0900066486749006888420BD1FEF765FD0028B5 -:10C0A00000D0022019F0CAF9012109031BF000EDAC -:10C0B00008E0FEF759FD002801D0042000E003202D -:10C0C000FEF72DFE00F09CF870BDF8B5002019F0C9 -:10C0D000B5F9002802D001200DF077FBF8F738FE03 -:10C0E000002019F0ABF9002802D002200DF06DFB02 -:10C0F000FEF73FFD474C4F4E0025303C00282FD027 -:10C1000018F0ADFC00282BD018F06CFA002803D1F1 -:10C11000FEF739FD002823D018F0A9FC00281FD114 -:10C12000606A3E4F00280DD119F088F91BF0D0EC61 -:10C13000002807D13A48002200681B21FFF251FB7A -:10C14000002802D0E5613D8015E0308801250028F7 -:10C1500000D03D8018F046FA002811D0E5610FE0CC -:10C1600018F085FC002806D0606A002803D06562BC -:10C170003088002801D0032000E00420FEF7CFFD26 -:10C1800000F03EF8F8BDFEB52B4C60693025284321 -:10C1900060612A4E706A02273843706206F026FFFB -:10C1A000019027480078C00701D1F8F74FFE02A898 -:10C1B000FAF746F907F059F9FAF7C2F90090FAF7D9 -:10C1C00035F9009B002202A9FAF7C0F912F06CF9C8 -:10C1D00006F3AEFE019806F022FF05F0AEFCF6F77E -:10C1E000ECF9F5F754FC16480078C00701D1F8F7D0 -:10C1F000C2FF6069A8436061706AB8437062FEBDA7 -:10C2000010B5F8F798FD0F4807220068012116F0D5 -:10C21000B7FD10BD38F200C000300080C0F100C092 -:10C2200080EF00C06C3901C0B0F100C094F100C0D3 -:10C23000FFFF0000C43B01C0C0A20080C0A8008076 -:10C24000365C0004B01E01C0FF4B10B55C68002CCA -:10C2500002D1586002604160002800D1586010BDD2 -:10C2600070B504000E00002515F0B4FFF64903E098 -:10C27000A14201D14C680DE049680029F8D10DE0D8 -:10C28000E168490505D5072E02D0217AB14200D1D7 -:10C2900025006468002C01D0002DF1D015F09EFF20 -:10C2A000280070BDF8B50025070015F093FF009039 -:10C2B000380019F083F804000926B6010FE02000C9 -:10C2C00019F06CF8002805D08019C069002801D049 -:10C2D000012506E039002000FFF7C2FF0400002C12 -:10C2E000EDD1009815F07AFF2800F8BDD748806896 -:10C2F0007047D6498868401C88607047075FE7A18F +:10BF000002A8FAF771F907F0F0F8FAF7EDF90090E6 +:10BF1000FAF760F9009B002202A9FAF7EBF912F098 +:10BF200027F907F305F8019806F001FF05F02FFD4A +:10BF3000F6F747FCF5F7C2FE17480078C00701D1B5 +:10BF4000F9F7F8F96069A8436061706AB8437062F4 +:10BF5000FEBD10B5F8F7E5FF104807220068012183 +:10BF600016F0B4FE10BD00009CF400C0003000804C +:10BF700018F400C0F0F100C0543901C008F400C04A +:10BF8000ECF300C0FFFF00005C3A01C0C0A20080DB +:10BF9000C0A80080D00300043A5C0004702201C0F5 +:10BFA000F84B10B55C68002C02D15860026041600B +:10BFB000002800D1586010BD70B504000E000025A7 +:10BFC00015F0E4FFEF4903E0A14201D14C680DE018 +:10BFD00049680029F8D10DE0E168490505D5072E2B +:10BFE00002D0217AB14200D125006468002C01D032 +:10BFF000002DF1D015F0CEFF280070BDF8B500255A +:10C00000070015F0C3FF0090380019F0CFF90400C5 +:10C010000926B6010FE0200019F0B8F9002805D074 +:10C020008019C069002801D0012506E039002000F0 +:10C03000FFF7C2FF0400002CEDD1009815F0AAFF15 +:10C040002800F8BDD04880687047CF498868401CF8 +:10C0500088607047CC498868401E88607047CA482D +:10C06000C068704770B505000E0015F08FFFC54918 +:10C070004C680AE0217AA94206D1E17AB14203D1A3 +:10C0800015F088FF200070BD6468002CF2D115F017 +:10C0900081FF002070BD70B5040005008034206968 +:10C0A0000026002834D1A069002831D1287A03283D +:10C0B0000FD1E87A01280CD100210320FFF7D2FF2D +:10C0C00080308169A16141696161006920614561D8 +:10C0D0001FE0AE480022642111F326FC0028A06175 +:10C0E00007D01C210181A06901003031616101216B +:10C0F0008173A7480022642111F316FC00282061F7 +:10C1000006D045612069002802D0A069002800D12E +:10C110000126300070BD70B505002C008034A16987 +:10C120000120002914D02269002A11D000268E7324 +:10C13000A06911F3CFFBA6616661287A032802D1BA +:10C14000E87A012802D0206911F3C4FB002026619F +:10C1500070BDFEB50400012615F018FF25008035DE +:10C160000190287AFF282BD1874F002039780123AE +:10C170001A0082400A4225D183401943287239703F +:10C180008100C9194C61810182480E18402130009C +:10C1900010F3DEEEEE60207A012811D0B868012895 +:10C1A00001D107F089FF0B2080012018416940313F +:10C1B0008A7B0092817B1300287A012207F0A6FF78 +:10C1C000002604E0401C0006000E0328D0D301988E +:10C1D00015F0E0FE3000FEBDFEB505000020029027 +:10C1E00015F0D4FE002D019004D08820405D04009D +:10C1F000FF2800D1FEE7297A634F012929D00B21BE +:10C20000890169184A694032927B00921300897B48 +:10C21000002207F07BFFB868A04215D011E0A00013 +:10C22000C019856945615B48A201803516182C72DA +:10C23000E9684022300010F35AEE641C2406240EF4 +:10C24000EE60B868A042EAD8B868002801D107F0CB +:10C250004CFF01213878A1408843A10038700020AC +:10C26000C9194861019815F095FE0298FEBD0200BB +:10C27000117A0020012905D0022903D0032901D019 +:10C28000042901D1100064E7704710B50400007A5A +:10C29000012805D0022803D0032801D0042807D1A3 +:10C2A0002000FFF799FF00208034E060FF2020721B +:10C2B000002010BD030010B501D1012010BD1800F1 +:10C2C00019F08BF80400D868400507D5606800288D +:10C2D00004D00EF06FFD002060602060002010BDD3 +:10C2E00070B50400C0680025400523D5207A0328D6 +:10C2F00001D0042803D12000FFF70DFF7CC02414D7 :10C300000100000040BF00000004000026AE60F8FD -:10C31000D3498868401E88607047D148C06870471C -:10C3200070B505000E0015F05FFFCC494C680AE0BF -:10C33000217AA94206D1E17AB14203D115F058FF22 -:10C34000200070BD6468002CF2D115F051FF002070 -:10C3500070BDF8B5050004008035E86B00270028A3 -:10C3600030D12600C036706800282BD1BD4800228D -:10C37000642111F3E3FA0028706007D01C210181C9 -:10C38000706801003031316001218173207A032807 -:10C3900009D1E07A012806D100210320FFF7C0FF70 -:10C3A0008030C06B04E0B0480022642111F3C6FA6B -:10C3B0000028E86306D04461E86B002802D070686A -:10C3C000002800D101273800F8BDF8B50400250089 -:10C3D000C03569680120002916D026008036F26B2E -:10C3E000002A11D000278F73686811F37DFA6F60FF -:10C3F0002F60207A032802D1E07A012802D0F06B66 -:10C4000011F372FA0020F763F8BDFEB505000020B5 -:10C41000029015F0E9FE002D019004D0B620405D99 -:10C420000400FF2800D1FEE7297A8D4F012929D089 -:10C430009F214A5D17214901009213006918897CE8 -:10C44000002208F03BF8B868A04216D012E0A00025 -:10C45000C01985694561B62044558448A201161863 -:10C460008035A96B4022300010F34AED641C24068D -:10C47000240EAE63B868A042E9D8B868002801D19C -:10C4800008F00BF801213878A1408843A1003870EA -:10C490000020C9194861019815F0AAFE0298FEBD56 -:10C4A000020010B5117A0020012905D0022903D01D -:10C4B000032901D0042902D1100001F007FF10BDAB -:10C4C00010B50400007A012805D0022803D0032803 -:10C4D00001D0042809D12000FFF797FF2000002198 -:10C4E00080308163FF20A034A075002010BD0300C0 -:10C4F00010B501D1012010BD180018F080FF040014 -:10C50000D868400507D56068002804D011F3ECF91D -:10C51000002060602060002010BD70B50400C0687D -:10C520000025400523D5207A032801D0042803D113 -:10C530002000FFF74AFF0500BB2080002118801D66 -:10C54000241822780120FF2A0ED00020030007F0D3 -:10C550003AFF002808D1424B267801225968B240A0 -:10C5600091435960FF212170012800D10125280045 -:10C5700070BD70B50500C068400517D5280018F0DB -:10C580003EFF04004068002820D1002238481100F6 -:10C5900011F3D4F9002801D1012070BD6060018938 -:10C5A0000818206028001BF0B6EA0FE0E97AA87AA4 -:10C5B00018F035FF0400280018F021FF03002000C8 -:10C5C00018F01DFF4168596000681860002070BDB8 -:10C5D00070B50500C0680024400511D5280001F0A1 -:10C5E000BAFE0400287A032801D0042806D12800C6 -:10C5F000FFF7AFFE012801D101240AE0002C08D189 -:10C60000287A022801D0032803D12800FFF7B1FFC0 -:10C610000400200070BD70B5040040213E3010F3CE -:10C62000CCEC00259E200555200020217E3010F303 -:10C63000C4EC20000621A23010F3BEECE06801211A -:10C6400009038843E060FF2071300555FE21382042 -:10C650000155200008F0B4FB70BD0000A4010004E7 -:10C66000845000043401000420010004F81602C0C4 -:10C670005C01000401000020002905D00A7A012A8B -:10C6800002D16120C0000818704770B50400FFF7A0 -:10C69000F1FF05004D20C00020180EF341FA2000E4 -:10C6A00008F02EFC2000FF300621723010F384ECDD -:10C6B00000206875D0E73F2210B5125CD2070ED07B -:10C6C000B9229200841800290AD0007A012806D1E4 -:10C6D0001BF024EA012201002000F9F702FF10BD3F -:10C6E0000122FF21F8E710B504000021FFF7E3FF66 -:10C6F0002000FFF7CAFF2000FFF78DFF10BD70B5C7 -:10C7000004000D00160015F06FFDFA493B47437F0A +:10C3100005005920C0002118801D24182278012012 +:10C32000FF2A0ED00020030007F07AFE002808D173 +:10C330001A4B267801225968B24091435960FF2177 +:10C340002170012800D10125280070BD70B50500BD +:10C35000C068400530D5280019F049F8040040684D +:10C36000002839D1287A03280FD1E87A01280CD186 +:10C3700000210320FFF780FE0B2189014018C16ACC +:10C380006160806A2060606802E00EF015FD606008 +:10C3900000280BD1012070BDD0050004905000048E +:10C3A00074050004600500042C1402C008302060ED +:10C3B00028001BF0EEEB0FE0E97AA87A19F027F8D5 +:10C3C0000400280019F013F80300200019F00FF8FA +:10C3D00041685960006818600020DCE770B505000E +:10C3E000C0680024400511D5280001F0BBFD040001 +:10C3F000287A032801D0042806D12800FFF755FE2B +:10C40000012801D101240AE0002C08D1287A022851 +:10C4100001D0032803D12800FFF798FF0400200073 +:10C42000B9E710B5040040213E3010F3C6ED2000FE +:10C4300006217E3010F3C0EDE06801210903884336 +:10C44000E060FF20002149300155FE2138200155D0 +:10C45000200008F004FB10BD01000020002905D0D9 +:10C460000A7A012A02D1172040010818704770B5D6 +:10C470000400FFF7F1FF05000920800120180EF3EA +:10C480004FFB200008F08BFB2000FF3006214A30D4 +:10C4900010F392ED002068757DE73F2210B5125C25 +:10C4A000D2070ED00B229201841800290AD0007AFC +:10C4B000012806D11BF070EB012201002000F9F7E2 +:10C4C000E4FE10BD0122FF21F8E710B504000021B1 +:10C4D000FFF7E3FF2000FFF7CAFF2000FFF7A1FFEF +:10C4E00010BD70B504000D00160015F059FDFF4990 +:10C4F00003E0A14201D14C680EE049680029F8D15F +:10C500000CE0A17AA94206D1E17AB14203D115F03B +:10C510004BFD20003FE76468002CF2D115F044FD8C +:10C52000002038E7F8B504000025C17A807A18F0B9 +:10C530006EFFE27AA17AFFF7D4FF002800D101252F +:10C540002000FF3006214A3010F336ED0922207A10 +:10C55000210027009201C031B837A618002808D062 +:10C56000012811D0022819D0032822D1607A03288B +:10C5700018D10868FFF251FD1821380010F3F2ECD1 +:10C5800030000EF3CDFA0FE02000FFF79EFF002DE4 +:10C5900002D02000FFF7AEFE00250AE02000FFF7E2 +:10C5A00093FE01E00228F9D0002D02D02000FFF711 +:10C5B000A1FE2800F8BD002802D0017A032901D08D +:10C5C000002070470B2189014018406A704770B500 +:10C5D000040018F00CFF200018F0E2FE0500E068EF +:10C5E000400503D50920800128184461C048206314 +:10C5F000C0486063A87F20342076E86F002818D1F7 +:10C6000003F0A0FD0028E86700D1FEE7040008342D +:10C610005421200010F3A6EC0321A171E079010957 +:10C620000901E171042148200155A07A410849001F +:10C63000A172B0E6F8B5040010D0AC4D28780328FC +:10C6400002D1E868A04209D0FEF74EF9002807D0D1 +:10C65000E868FF304130007A072801D10120F8BD99 +:10C66000237A0126032710F3FEED0604171E1B0F85 +:10C67000170F03200FF059FE23E0002F02D0F868B7 +:10C68000C00401D4AC602E702878012802D1A868BB +:10C69000FEF787F80020F8BD0220AC602870F3E7B1 +:10C6A000607A022808D12000FBF71AF92100FCF774 +:10C6B00077F8EC602F70E7E70328E5D1002018F049 +:10C6C0007FFE0700FEF715F90028DBD0D5E770B52F +:10C6D000040002206072200018F089FE200018F08B +:10C6E0005FFE0500E068400511D50920800128188B +:10C6F0004461E06840050AD57F488068002806D17B +:10C70000FEF7F7F8002802D12000FFF723F1A9BABD :10C71000010000003CC30000000400002457B8EEF4 -:10C7200003E0A14201D14C680EE049680029F8D12C -:10C730000CE0A17AA94206D1E17AB14203D115F009 -:10C7400061FD200092E76468002CF2D115F05AFDDB -:10C7500000208BE7F8B504000025C17A807A18F034 -:10C7600068FEE27AA17AFFF7D4FF002800D1012504 -:10C770002000FF300621723010F328EC4D22207A81 -:10C7800021002700D200C031E037A618002808D0C9 -:10C79000012811D0022819D0032822D1607A032859 -:10C7A00018D1886AFFF243FC1821380010F3E4EB3B -:10C7B00030000EF3BFF90FE02000FFF79EFF002DC1 -:10C7C00002D02000FFF7B3FE00250AE02000FFF7AB -:10C7D00098FE01E00228F9D0002D02D02000FFF7DA -:10C7E000A6FE2800F8BD002802D0017A032901D056 -:10C7F00000207047032109024018C068704770B5D7 -:10C80000040018F006FE200018F0DCFD0500E068CA -:10C81000400503D50920800128184461BB482063E6 -:10C82000BB486063A87F20342076E86F002818D1C9 -:10C8300003F088FD0028E86700D1FEE70400083413 -:10C840005421200010F398EB0321A171E079010934 -:10C850000901E171042148200155A07A41084900ED -:10C86000A17203E7F8B5040010D0A74D287803287B -:10C8700002D1E868A04209D0FEF78AF9002807D063 -:10C88000E868FF306130007C072801D10120F8BD45 -:10C89000237A0126032710F3F0EC0604171E1B0F62 -:10C8A000170F03200FF061FF23E0002F02D0F8687C -:10C8B000C00401D4AC602E702878012802D1A86889 -:10C8C000FEF7C3F80020F8BD0220AC602870F3E743 -:10C8D000607A022808D12000FBF740F92100FCF71C -:10C8E000BAF8EC602F70E7E70328E5D1002018F0D4 -:10C8F00079FD0700FEF751F90028DBD0D5E770B5C8 -:10C90000040002206072200018F083FD200018F05F -:10C9100059FD0500E068400511D50920800128185F -:10C920004461E06840050AD57A488068002806D14D -:10C93000FEF733F9002802D12000FFF793FF734878 -:10C94000206373486063A87F20342076E86F002856 -:10C9500018D103F0F7FC0028E86700D1FEE70400D7 -:10C9600008345421200010F308EB0321A171E07971 -:10C9700001090901E171042148200155A07A41080B -:10C980004900A17272E610B5040015F037FC0B21C6 -:10C9900089016118896B0122CA73617A02290FD15A -:10C9A0005C4BD968491CD9605B4BA034A17D9C6A63 -:10C9B000A14205D15C6B8A409443D90D0C435C6362 -:10C9C00015F020FC10BD10B5040015F017FC0B226B -:10C9D0009201A218926B0021D173617A022903D1CE -:10C9E0004C49CA68521ECA6015F00CFC10BD0021EB -:10C9F00000280AD0027A002A02D1C721890003E068 -:10CA0000032A02D13B210901411808007047002187 -:10CA100000280AD0027A002A02D16121C90003E06D -:10CA2000032A02D1E7218900411808007047002835 -:10CA300000B50BD0017A032908D1FFF7D4FE0021FD -:10CA40002922C94352018018C175017600BD70B515 -:10CA500004001FD0207A03281CD12000FFF7D7FF45 -:10CA6000050017D02000E4621BF066E82000FFF705 -:10CA7000F9FE2A4820632A4860630B2080012018B1 -:10CA8000806B3C302860274868602748E8602000B9 -:10CA90001BF056E8EAE570B50400FFF7B8FF0500A3 -:10CAA0001BD0032060722000E462FFF7DBFE1B480E -:10CAB00020631B4860630B2080012618B06B3C305C -:10CAC0002860184868601848E86020001BF038E8C3 -:10CAD000B06B0021FF3021308171C7E570B50400D3 -:10CAE00004206072E068400502D52000FFF7BAFE1E -:10CAF0000320000225180D492000A9601BF020E842 -:10CB000000206877B2E50000A4010004916300C032 -:10CB1000576300C084500004C0A200807E597EEBA1 +:10C7200093FF7848206378486063A87F20342076A0 +:10C73000E86F002818D103F00FFD0028E86700D14A +:10C74000FEE7040008345421200010F316EC032106 +:10C75000A171E07901090901E17104214820015525 +:10C76000A07A41084900A1721FE610B5040015F037 +:10C7700021FC0B218901611849690122CA73617A80 +:10C7800002290FD1614BD968491CD960604B8034B4 +:10C79000217A9C6AA14205D15C6B8A409443D90DF1 +:10C7A0000C435C6315F00AFC10BD10B5040015F0D5 +:10C7B00001FC0B229201A21852690021D173617A07 +:10C7C000022905D1514AD168002901D0491ED16002 +:10C7D00015F0F4FB10BD02000B2080011018416918 +:10C7E0000020002A05D0127A002A03D10800FF3069 +:10C7F00051307047032AFCD10800FF305530704794 +:10C80000002100280AD0027A002A02D1172149010A +:10C8100003E0032A02D1DD21890041180800704796 +:10C82000002800B50BD0017A032908D1FFF7CDFE0F +:10C8300000212922C94352018018C175017600BD2B +:10C8400070B504001FD0207A03281CD12000FFF708 +:10C85000D7FF050017D02000E4621BF0ACE92000F0 +:10C86000FFF7F2FE2B4820632B4860630B2080010A +:10C870002018406968302860284868602848E860C7 +:10C8800020001BF09CE990E570B50400FFF7B8FFAD +:10C8900005001BD0032060722000E462FFF7D4FE85 +:10C8A0001C4820631C4860630B20800126187069B7 +:10C8B00068302860194868601948E86020001BF05B +:10C8C0007EE970690021FF30413081736DE510B55C +:10C8D000040004206072E068400502D52000FFF7E4 +:10C8E000B3FE0B2189010F486118086220001BF07C +:10C8F00066E91721002049016118487510BD000044 +:10C90000D00500045D6400C0236400C090500004A2 +:10C91000C0A20080256100C0DF6300C0C92001C043 +:10C92000445C02C0A04701C030B50421417200211F +:10C93000F94A0163416313680B229201821854691A +:10C94000DD884034258254695D89403465825469AC +:10C950001D7A4034257552695B7A40325375032243 +:10C960001202801841830A22C1838283016281629C +:10C97000C16230BDE94A002138B50800117051602C +:10C9800011618300401C9B180006000E03285961AA +:10C99000F7D30EF087F9E24CE34922680092E14AAE +:10C9A000E248E34BFCF29EF9002804D0E148F3F79B +:10C9B0009DFD1BF070E822680092DF4ADF49E048E5 +:10C9C000E04BFCF28FF9002805D0DA48401CF3F761 +:10C9D0008DFD1BF060E80EF0E7F90EF0BDF9DB49C4 +:10C9E000D948486008001BF0EEE8002038BDFFB5CC +:10C9F00081B00D0000260399280018F012FD0700F1 +:10CA000000D101260EF062F9040002D1002005B029 +:10CA1000F0BD01982072A5720398E0720C98206115 +:10CA2000E068012189028843F107490D08430B2181 +:10CA300089016518E0600020A86161212000C943D8 +:10CA4000A03001824182FF2028600198052875D01E +:10CA5000002E75D06869002806D120000EF08FF9ED +:10CA60000028686100D1FEE76E690B9830730F20D3 +:10CA70008002306101212920815505213000C90142 +:10CA80008830611808603000F6F77CFF6969002083 +:10CA9000FF316131FF36761C48767061B0619E4887 +:10CAA000062201685920C000201810F334EAFF2044 +:10CAB00088210855A8732000FFF79AFC012873D03D +:10CAC0000A98002806D02000FF300A9906224A3032 +:10CAD00010F3B6E90520C001002120180181954A14 +:10CAE0002000FF301B3A4130028042800F228180BB +:10CAF00082710172FE2238200255E2683120000363 +:10CB000082430920800120184162C1610162C16233 +:10CB10008162016341630120C00382430051BA4F27 :10CB20000100000038C7000000040000778D6B8210 -:10CB3000596000C0136300C0191D01C0445E02C0EB -:10CB4000C44801C0042110B541720022FF490263AC -:10CB500042630B680100DC88A0310C815C894C8148 -:10CB60001C7A0C735B7A4B730D21890141184A8042 -:10CB70000A23CA808B808A6003210902401802655B -:10CB8000426510BDF24A002138B5080011705160AD -:10CB900011618300401C9B180006000E0328596198 -:10CBA000F7D30EF075FAEB4CEC4922680092EA4A92 -:10CBB000EB48EC4BFCF2A0F8002804D0EA48F3F76D -:10CBC0009FFC1AF038EF22680092E84AE849E948E9 -:10CBD000E94BFCF291F8002805D0E348401CF3F73C -:10CBE0008FFC1AF028EF0EF0AEFA22680092E34AAA -:10CBF000E349E448E44BFCF27FF8002805D0DA482A -:10CC0000801CF3F77DFC1AF016EFE149DF4848601D -:10CC100008001AF0A4EF002038BDFFB581B00D0068 -:10CC200000260399280018F00EFC070000D1012609 -:10CC30000EF043FA040002D1002005B0F0BD0198C7 -:10CC40002072A5720398E0720C982061E0680121BF -:10CC500089028843F107490D08430B2189016518B2 -:10CC6000E0600020E86361212000C943C030818377 -:10CC7000C183FF206862019805287ED0002E7DD0F8 -:10CC8000A86B002809D120000EF070FAA863F9F70C -:10CC9000CDFAA86B002800D1FEE7A86B0B990173B1 -:10CCA000A86B0F2189020161A86B0121203041721C -:10CCB000A86B05220100D2015C31A2185162F6F77F -:10CCC00078FDA96B0020C0318862A96B0622C031B3 -:10CCD000C8629E480168BB208000201810F324E938 -:10CCE00027001721FF20A03749016118B875887403 -:10CCF0002000FFF781FC012877D00A98002805D092 -:10CD000038000A990622D13010F3A4E8152040011A -:10CD100000262018868194492000FF301B3961309D -:10CD2000018141810F21868181730674FE213820A3 -:10CD30000155E1683120000381430520C00120181E -:10CD4000C660466086600661466186610120C00358 -:10CD500081432000E16040213E3010F342E9200091 -:10CD6000A2300621009010F33CE9200020217E3003 -:10CD700010F336E92000803001E015E030E08677DE -:10CD8000C6773E800498002804D0049900980622B3 -:10CD900010F360E8E068C0218843E0602000FEF7FF -:10CDA00098FE20000BF046FD684800260168200030 -:10CDB000CA88A03002814A8942810A7A0273497A7C -:10CDC0004173642101809F200655FF207030065575 -:10CDD000019B10F35CEA070B3A171B3D3D133D0026 -:10CDE000BB2006228000391877E712E02000E462B9 -:10CDF0001AF0ACEE2000FFF758FE29E02000FFF704 -:10CE0000A1FE25E02000FFF784FD21E00398022821 -:10CE100003D320000EF068F90EE70398AF23DB0080 -:10CE200058435C494018032109026118C86020007A -:10CE3000FFF707FE2000FFF714FE2000FFF7E9FCD4 -:10CE4000554820635548606302E02000FFF750FE1C -:10CE5000A86B002821D0E06840051ED50520C00140 -:10CE60002018406A8C2110F392E8A86BFD22403014 -:10CE70004683A96B4031087E400840000876A96BC4 -:10CE8000104040310876A86B7821FF30401C0161CA -:10CE9000A86B1E21FF30401C01622000CDE670B55A -:10CEA0000400007A16000025032801D0217200E05A -:10CEB0000D00002B06D02000FF3006221900723032 -:10CEC0000FF3C8EF15204001002120188181264A68 -:10CED0002000FF301B3A6130028142810F228181A4 -:10CEE00082730174FE2138200155E0680121090395 -:10CEF0008843E060200040213E3010F372E8002EAD -:10CF000005D0200006223100A2300FF3A4EF20004C -:10CF1000FEF7DFFD20000BF08DFC207A002849D0C1 -:10CF200001284BD0032852D1002D4BD13BDE0BDD25 +:10CB3000200040213E30E26010F352EA04980028C1 +:10CB40000DD02000049906227E3010F384E90BE01A +:10CB500014E0FFE759200622C0003918AEE7200094 +:10CB600006217E3010F33CEAE068C0218843E06093 +:10CB70002000FEF76AFE20000BF02DFDFF200026AE +:10CB800048300655019B10F382EB0705321116352C +:10CB9000350D35002000E4621BF016E82000FFF799 +:10CBA0007DFE27E02000FFF7C9FE23E02000FFF70D +:10CBB000A2FD1FE002E00398022803D320000EF03C +:10CBC000A6F82DE70398AF23DB00584365494018CA +:10CBD00068622000FFF72EFE2000FFF73BFE2000DA +:10CBE000FFF709FD604820636048606302E02000B1 +:10CBF000FFF777FE686900282ED0E16849052BD53C +:10CC0000050020212C3010F3C2E92B2046552800C6 +:10CC1000403064218673818144490968CA88028250 +:10CC20004A8942820A7A0275497A41750520C00113 +:10CC3000201800688C2110F3AAE928008030C680F3 +:10CC40000179FD22490849001140017178218030A5 +:10CC500081631E21403081602000E2E6F8B50400C7 +:10CC60001700007A0025032801D0217200E00D0092 +:10CC7000002B06D02000FF30062219004A3010F3A6 +:10CC8000EAE80520C00126182F4A20000021FF30C5 +:10CC90001B3A41303181028042800F2281808271B3 +:10CCA0000172FE2138200155E06801210903884303 +:10CCB000E060200040213E3010F392E9002F05D0C3 +:10CCC0002000062239007E3010F3C4E82000FEF771 +:10CCD000BCFD20000BF07FFC207A00281DD001282D +:10CCE0001FD003284DD1002D46D10B2080012018E4 +:10CCF00041690D2080016831201841631C4981631E +:10CD00000721C9011B4861180860174820631748AC +:10CD1000606320001AF05CEF33E02000FFF7BEFDF7 +:10CD20002FE02000FFF7DDFD2BE0000030F800C011 +:10CD300090500004E8F400C0385000046C05000472 +:10CD40006005000480E701C01A000100445000049F +:10CD50008005000474050004E0F301C049A9010046 +:10CD6000D42001C0905401C0256100C0DF6300C021 +:10CD7000C92001C0445C02C0022D02D12000FFF78F +:10CD80003AFCE068400505D53068002802D08C21C7 +:10CD900010F3FCE80020F8BD3EB500230C000A6942 +:10CDA0000021009102920191E27AA17A207AFFF7A4 +:10CDB00028FE617A417217214901621812784118E0 +:10CDC0000A70FB490163FB4941633EBD3EB5002348 +:10CDD0000C000A690021009102920191E27AA17A85 +:10CDE000207AFFF70EFE617A41723EBDFEB5002348 +:10CDF0000D0006000A690021009102920191EA7A71 +:10CE0000A97A0520FFF7FDFD04007ED0687A6072E4 +:10CE1000287A2072200014301AF0E2EEA069E46251 +:10CE2000243060612900200040223E313E3010F362 +:10CE300012E82900200006227E317E3010F30AE835 +:10CE40002000FF30062231004A3010F304E8592058 +:10CE5000C00029180622201810F366E82000FF30D1 +:10CE6000E821593010F392E8286B20632900203123 +:10CE70008E7E20002030827EF606EF23F60F1A40C9 +:10CE8000360132438276427EF72632404E7E3607A6 +:10CE9000F60FF600324342761A404B7EDB06DB0F7C +:10CEA0001B011A4342762A008032166913002200C1 +:10CEB000803216619B699361097E0176E0684021AA +:10CEC0008843E9684906C90F890108438021E06069 +:10CED0008843E9680906C90FC9010843FF21491CB5 +:10CEE000E0608843E968C905C90F090208430421C5 +:10CEF000E0608843E9684907C90F89000843E0609A +:10CF0000E86840070DD4092100E00AE089016818AB +:10CF1000C2696118CA61026A0A62426A4A62C06AE8 +:10CF2000C8622000FEBD0100FF3170B5036313CA63 :10CF30000100000034CB00000004000083E21E3634 -:10CF40000B2080012018816B07203C31C001201884 -:10CF5000C1611849016218498162144820632DE0BB -:10CF6000E8F500C08450000484F200C018500004AA -:10CF70002C01000420010004E0E501C01A000100BA -:10CF800024500004400100043401000440F201C0B8 -:10CF900054500004680100045C010004442001C0F6 -:10CFA00023AD0100241D01C0405701C0596000C0DD -:10CFB000136300C0191D01C0445E02C0FF486063D6 -:10CFC00020001AF0D2ED0CE02000FFF778FD08E019 -:10CFD0002000FFF797FD04E0022D02D12000FFF7AB -:10CFE00022FCE068400508D50520C0012018406AF1 -:10CFF000002802D08C210FF3D4EF002045E43EB589 -:10D0000000230D000A690021009102920191EA7A41 -:10D01000A97A287AFFF70BFE0400290020227E312E -:10D020007E300FF322EF28008030827F0100200045 -:10D0300080308277C97FC177A020415B0153697A34 -:10D040006172032109026818027A60180272DC49D1 -:10D050002163DC49200061633EBD3EB500230C0026 -:10D060000A690021009102920191E27AA17A207A64 -:10D07000FFF7DDFD0500210020227E317E300FF319 -:10D08000F4EE617A200080306972827F010028000E -:10D0900080308277C97FC177A0342188A020415396 -:10D0A00028003EBDF3B583B00D0005200A690021BC -:10D0B000009102920191EA7AA97A0023FFF7B7FD65 -:10D0C00004007ED0687A6072287A207220001430C2 -:10D0D0001AF052EDA069E46224306061290020005A -:10D0E00040223E313E300FF3C0EE290020000622E0 -:10D0F000A231A2300FF3B8EE2900200020227E31A9 -:10D100007E300FF3B2EE2E0080362700B07F8037DE -:10D11000B877F07FF8772800A03021000288A0318E -:10D120000A8002890A8142894A81027B0A73407B14 -:10D130004873380003990622F1300FF396EEBB20B6 -:10D1400080002918062220180FF3F8EEF81DE821B8 -:10D15000F9300FF326EF286B206320002030827E09 -:10D16000EF210A40290020318B7EDB06DB0F1B01FB -:10D170001A438276427EF7231A404B7E1B07DB0F51 -:10D18000DB001A43EF2342761A404B7EDB06DB0FAF -:10D190001B011A434276F26BFA632A00C0325368CD -:10D1A0002200C0325360097E0176E0684021884346 -:10D1B000E9684906C90F890108438021E060884376 -:10D1C00000E025E0E9680906C90FC9010843FF210D -:10D1D000491CE0608843E968C905C90F0902084392 -:10D1E0000421E0608843E9684907C90F89000843C2 -:10D1F000E060E86840070BD40521C901681842685F -:10D2000061184A6082688A60C268CA600069086101 -:10D2100020001CE50100FF3170B504007231F6F703 -:10D220005EFA0B2080012018806BFF30213081795D -:10D23000491E0906090E81710CD1E17A0020FFF721 -:10D240008DF818F0BBF9002804D10022110020004D -:10D2500011F0F0F90520C0012518286900260028E2 -:10D2600002D003F09BF82E61EE60E0680421884351 -:10D27000E0600021200005F03CF920006E61FFF71E -:10D2800022FA2000FFF7E5F96120C00020180DF018 -:10D2900046F813E4F3B583B00D000B27BF01CE1998 -:10D2A000B06B0A69017B00206B4607C32B00EA7A4A -:10D2B000A97AA2330620FFF7BAFC040030D0200080 -:10D2C0003930017810221143CA064908D20F4900AB -:10D2D00011430170FF300399062239300FF3C4ED7A -:10D2E000B06BE11988630520C0012918CA682018AD -:10D2F000C260E26801231B039A4302231A43E260DF -:10D30000CB68C36049694161FF200021713001553C -:10D3100004208243E8684007C00F80000243E260B7 -:10D32000200094E410B50C00097A020000200129C5 -:10D3300010D0022909D003291FD1617AB6B561F254 +:10CF400004004A31F6F7BEFC0B208001201840692E +:10CF5000FF304130817B491E0906090E81730CD1D7 +:10CF6000E17A0020FFF7A6F818F026FB002804D18C +:10CF700000221100200011F0C1F9092080012518BC +:10CF8000E86A0026002802D003F012F9EE626E6211 +:10CF9000E06804218843E0600021200005F0D9F911 +:10CFA00020002E63FFF781FA2000FFF758FA1720C0 +:10CFB000400120180DF0ABF879E4F3B583B00D0013 +:10CFC0000B27BF01CE1970690A69017B00206B46EF +:10CFD00007C32B00EA7AA97A7E330620FFF71BFDF0 +:10CFE000040030D020003930017810221143CA06E5 +:10CFF0004908D20F490011430170FF3003990622FE +:10D0000011300FF332EF7069E11948610920800196 +:10D0100029184A6A20184262E26801231B039A43D6 +:10D0200002231A43E2604B6A4362096B0163FF20EB +:10D0300000214930015504208243E8684007C00FB1 +:10D0400080000243E2602000F5E410B50C00097A8C +:10D0500002000020012910D0022909D003291FD184 +:10D06000617A02291CD121001000FFF79FFE08E021 +:10D0700021001000FFF7B4FE03E021001000FFF7CD +:10D08000BFFE00280CD00B229201A118496982181A +:10D090000029516104D005228831D2018218116023 +:10D0A00040E4F8B5002506000F0014F097FF47494B +:10D0B0004C6827E0E1684A0523D5072E02D0227A82 +:10D0C000B2421ED1042F02D0627ABA4219D1627ADA +:10D0D000022A05D1FF214931095D072911D10FE04D +:10D0E000032A02D1C9040CD50AE0217A012905D10D +:10D0F000FF214931095D062903D101E0042900D14E +:10D1000025006468002CD5D114F06CFF2800F8BD10 +:10D11000F8B5050002210320FFF7C3FF0700022135 +:10D120000800FFF7BEFF0600A84200D10026AF426C +:10D1300000D10027287A01242403002819D00228CE +:10D1400001D0032823D1FDF7EDFB002803D1FDF723 +:10D15000EEFB00281BD03000384324D0022018F00A +:10D160008DF9A84213D13C0032D13400002C2FD1CC +:10D170000DE0E8680321A043E8600800FFF791FF95 +:10D18000040004D0002018F079F9A04220D10F4803 +:10D19000017803292ED1002E2CD1002F2AD1002175 +:10D1A00001700800F8BDE8680321A043E8600800AA +:10D1B000FFF777FF04000BD10321FFF772FF040094 +:10D1C000D4E700005D6400C0236400C0D005000403 +:10D1D000AC420FD02000FFF74BFAFC4C207801281E +:10D1E00008D1FB480088C00604D51AF008EDA068F5 +:10D1F000FDF7BBFFFDF796FB002800D0022018F0DA +:10D200003DF9F8BDF8B504000B22E1689201012058 +:10D2100049050026A518002903DA2000FFF7A0F928 +:10D220001EE0237A10F33CE8071C05090D151C11BC +:10D230001C002000FFF767F914E02000FFF762F8F8 +:10D2400010E0607A0228F8D00CE02000FFF775FEAD +:10D2500008E0A86906702000AE6107F01EFC01E03E +:10D2600000281FD02000FFF753FF14F0B7FE07007F +:10D27000002C04D1D748F3F74DF91AF020ECE06800 +:10D28000400504D56869002801D00DF098FD0520FF +:10D29000C00120186E61066020000DF042FD3800CC +:10D2A00014F0A0FEF8BD10B514F098FEC74907E0D1 +:10D2B0003922525C120703D514F094FE0120EFE6E8 +:10D2C00049680029F4D114F08DFE0020E8E610B57D +:10D2D00014F084FEBD4906E0CA68520703D514F075 +:10D2E00081FE0120DCE649680029F5D114F07AFEC0 +:10D2F0000020D5E610B514F071FEB44906E0CA6806 +:10D30000D20603D514F06EFE0120C9E64968002953 +:10D31000F5D114F067FE0020C2E610B514F05EFEF1 +:10D32000AA490BE0FF224932525C002A06D0CA68A3 +:10D33000D20503D514F056FE0120B1E659BA675C58 :10D340000100000030CF000000040000D038CD5AAA -:10D3500002291CD121001000FFF75BFE08E021002C -:10D360001000FFF784FE03E021001000FFF7A4FE89 -:10D3700000280CD00B229201A118896B8218002979 -:10D38000916304D005225C31D2018218516210BD34 -:10D39000F8B5002506000F0014F04EFF0F494C6849 -:10D3A00030E0E1684A052CD5072E02D0227AB2423D -:10D3B00027D1042F02D0627ABA4222D1627A022A9D -:10D3C0000ED1FF217131095D07291AD118E0000043 -:10D3D000136300C0916300C0576300C0A401000440 -:10D3E000032A02D1C9040CD50AE0217A012905D10A -:10D3F000FF217131095D062903D101E0042900D123 -:10D4000025006468002CCCD114F01AFF2800F8BD68 -:10D41000F8B5050002210320FFF7BAFF070002213B -:10D420000800FFF7B5FF0600A84200D10026AF4272 -:10D4300000D10027287A01242403002819D00228CB -:10D4400001D0032823D1FDF7C1FB002803D1FDF74C -:10D45000C2FB00281BD03000384324D0022018F033 -:10D460001FF8A84213D13C002BD13400002C28D146 -:10D470000DE0E8680321A043E8600800FFF788FF9B -:10D48000040004D0002018F00BF8A04219D1F8488D -:10D490000178032927D1002E25D1002F23D1002187 -:10D4A00001700800F8BDE8680321A043E8600800A7 -:10D4B000FFF76EFF040004D10321FFF769FF0400AA -:10D4C000D4E7AC420FD02000FFF7EAF9E84C20780F -:10D4D000012808D1E7480088C00604D51AF05AEBA5 -:10D4E000A068FDF796FFFDF771FB002800D0022031 -:10D4F00017F0D6FFF8BDF8B504000B22E1689201E1 -:10D50000012049050026A518002903DA2000FFF7AD -:10D510003FF91EE0237A0FF3CEEE071C05090D1527 -:10D520001C111C002000FFF706F914E02000FFF793 -:10D5300006F810E0607A0228F8D00CE02000FFF72F -:10D5400073FE08E0E86B06702000EE6307F060FCF5 -:10D5500001E000281FD02000FFF75AFF14F06CFEF6 -:10D560000700002C04D1C448F2F7DEFF1AF076EA77 -:10D57000E068400504D5A86B002801D00DF016FE28 -:10D580000520C0012018AE63466220000DF0C0FDEA -:10D59000380014F055FEF8BD10B514F04DFEB44936 -:10D5A00007E03922525C120703D514F049FE01202E -:10D5B00010BD49680029F4D114F042FE002010BDCE -:10D5C00010B514F039FEAA4906E0CA68520703D51F -:10D5D00014F036FE012010BD49680029F5D114F081 -:10D5E0002FFE002010BD10B514F026FEA04906E065 -:10D5F000CA68D20603D514F023FE012010BD496885 -:10D600000029F5D114F01CFE002010BD10B514F057 -:10D6100013FE97490BE0FF227132525C002A06D0BC -:10D62000CA68D20503D514F00BFE012010BD49686D -:10D630000029F0D114F004FE002010BD10B514F044 -:10D64000FBFD8B4905234968DB0119E00A7A012AB1 -:10D6500015D1CA68520712D4CA18D268002A0ED04F -:10D660000832D4792407240F022C08D1002A06D0CE -:10D67000927AD20703D014F0E3FD012010BD49686F -:10D680000029E3D114F0DCFD002010BD10B5FFF738 -:10D6900083FF00280BD1FFF793FF002807D1FFF786 -:10D6A000A2FF002803D1FFF7C9FF002801D0012401 -:10D6B00000E000247149724802F326FD002C07D0D7 -:10D6C000002802D002F0C6FA10BD02F0B3FA10BD75 -:10D6D000002802D002F0B6FA10BD02F0A3FA10BD85 -:10D6E00070B504000D00160014F0A6FD604903E0BB -:10D6F000A14201D14C680EE049680029F8D10CE044 -:10D70000217AA94206D1E17AB14203D114F098FD01 -:10D7100020007DE46468002CF2D114F091FD00201B -:10D7200076E410B514F088FD514908E0FF2271320B -:10D73000525C002A03D014F083FD002010BD49681C -:10D740000029F3D114F07CFD012010BDA577FBE783 +:10D3500049680029F0D114F04FFE0020AAE610B56C +:10D3600014F046FE9E49092349689B0119E00A7A98 +:10D37000012A15D1CA68520712D4CA18526A002A63 +:10D380000ED00832D4792407240F022C08D1002AA9 +:10D3900006D0927AD20703D014F02EFE012089E63F +:10D3A00049680029E3D114F027FE002082E610B579 +:10D3B000FFF783FF00280BD1FFF793FF002807D169 +:10D3C000FFF7A2FF002803D1FFF7C9FF002801D013 +:10D3D000012400E000248549854802F395FE002CD5 +:10D3E00007D0002802D002F063FB63E602F04EFB98 +:10D3F00060E6002802D002F052FB5BE602F03DFB43 +:10D4000058E670B504000D00160014F0F1FD7449E3 +:10D4100003E0A14201D14C680EE049680029F8D12F +:10D420000CE0217AA94206D1E17AB14203D114F08D +:10D43000E3FD2000CAE56468002CF2D114F0DCFDA5 +:10D440000020C3E510B514F0D3FD654908E0FF22C4 +:10D450004932525C002A03D014F0CEFD002029E6A8 +:10D4600049680029F3D114F0C7FD012022E65C4889 +:10D470000069002800D00120704710B5040014F0A6 +:10D48000B7FD57494968002907D102E049680029DA +:10D4900003D114F0B1FD00200CE60A7AA242F5D1C6 +:10D4A00014F0AAFD012005E606227E3010B514F026 +:10D4B000C3FA002801D10120FCE50020FAE5F8B507 +:10D4C0000500002414F094FD0700002D01D1002078 +:10D4D000F8BD19262B7A76010FF3ECEE071115082B +:10D4E000051919111900687A022808D1280017F0C7 +:10D4F0007FFF8019007A012809D1012407E0E8683C +:10D50000C004FAD403E028001AF086EB04003800C7 +:10D5100014F072FD2000F8BD2030807E4021C2074B +:10D520003448002A026801D00A4300E08A430260BE +:10D53000704710B518F04AF8002823D1022017F0E0 +:10D5400067FF0EE0200017F053FFFF214931095D0E +:10D55000002902D0406A002814D102212000FEF7E1 +:10D560005DFD0400EED102200EF007FF10E0200068 +:10D5700017F03EFFFF214931095D002904D0406AC0 +:10D58000002801D0012095E5022120000EF004FFC3 +:10D590000400ECD18EE5184800687047F8B5012505 +:10D5A00007000C0014F024FD06003B000FF382EE90 +:10D5B0000B2E2643073D3D3D2E2E2E2E3D000320F3 +:10D5C0000EF0DBFE002803D117F022FF002834D034 +:10D5D000C168C90431D50400FF344A342DE000008D +:10D5E000D00500045C3A01C01D0001007C800200EF +:10D5F0001C80020000A3008030F800C0002C05D180 +:10D6000017F056FF002801D004007E3404210720C3 +:10D61000FFF751FD002800D0002504210120FFF76D +:10D620004AFD002807D000250CE0F948F2F77CFFFE +:10D630001AF04EEA01E0012D04D1200008F320FA8F +:10D64000F8F778FD300014F0D7FC2800F8BD70B56D +:10D650000400012514F0CCFC0600002C05D0012CA0 +:10D6600003D0032C01D0042C07D104210720FFF79D +:10D6700022FD002807D0002507E0E548401CF2F70E +:10D6800053FF1AF026EA04F30BFC300014F0B4FC4C +:10D6900028009BE4F8B505000E00012414F0A8FC56 +:10D6A00007002B000FF306EE11120A19190A0A0AD5 +:10D6B0000A0A0A12121212120A0A12000221072082 +:10D6C000FFF7F9FC00280AD000240BE0D048801CAA +:10D6D000F2F72AFF1AF0FCE901E0012C02D1300038 +:10D6E00004F378FD380014F087FC2000F8BDF8B58D +:10D6F00005000E00012414F07BFC07002B000FF343 +:10D70000DAED071B051B141B05051B000221072072 +:10D71000FFF7D1FC002800D0002404210120FFF7EE +:10D72000CAFC002808D000240BE003210720FFF7E3 +:10D73000C2FC0028F7D101E0012C02D1300004F333 +:10D740006AFD380014F058FC2000F8BD357951DE30 :10D75000010000002CD30000000400006FFDE8E988 -:10D7600010B5040014F072FD46494968002907D13C -:10D7700002E04968002903D114F06CFD002010BDBF -:10D780000A7AA242F5D114F065FD012010BD0622EF -:10D79000A23010B514F07EFA002801D1012010BD8E -:10D7A000002010BDF8B50500002414F04FFD07005F -:10D7B000002D01D10020F8BD19262B7A76010FF338 -:10D7C00084ED07111508051919111900687A022846 -:10D7D00008D1280017F01EFE8019007A012809D10F -:10D7E000012407E0E868C004FAD403E028001AF036 -:10D7F000E0E90400380014F02DFD2000F8BD2030D1 -:10D80000807E4021C2072448002A026801D00A43D2 -:10D8100000E08A430260704710B517F0E3FE00286D -:10D8200023D1022017F006FE0EE0200017F0F2FDD3 -:10D83000FF217131095D002902D0406A002814D10E -:10D8400002212000FEF748FD0400EED102200EF078 -:10D85000B4FF10E0200017F0DDFDFF217131095DFC -:10D86000002904D0406A002801D0012010BD022107 -:10D8700020000EF0B1FF0400ECD110BD0748006895 -:10D8800070470000A4010004C43B01C01D0001005A -:10D8900028810200C880020000A30080E8F500C0D3 -:10D8A000F8B5012507000C0014F0D0FC06003B0081 -:10D8B0000FF30AED0B1F1734072E2E2E1F1F1F1FED -:10D8C0002E0003200EF079FF002803D117F0B2FDDF -:10D8D000002825D0C168C90422D50400FF34723461 -:10D8E0001EE0002C05D117F0F5FD002801D0040042 -:10D8F000A23404210720FFF755FD002800D00025A1 -:10D9000004210120FFF74EFD002807D000250CE080 -:10D91000F848F2F713FE1AF0ACE801E0012D04D14B -:10D92000200008F3B7F8F8F73FFD300014F092FC40 -:10D930002800F8BD70B50400012514F087FC06002E -:10D94000002C05D0012C03D0032C01D0042C07D1CE -:10D9500004210720FFF726FD002807D0002507E057 -:10D96000E448401CF2F7EAFD1AF082E804F3A2FA58 -:10D97000300014F06FFC28009FE4F8B505000E009D -:10D98000012414F063FC07002B000FF39EEC11122E -:10D990000A19190A0A0A0A0A0A12121212120A0AA1 -:10D9A000120002210720FFF7FDFC00280AD0002406 -:10D9B0000BE0D048801CF2F7C1FD1AF05AE801E0F4 -:10D9C000012C02D1300004F30FFC380014F042FCAB -:10D9D0002000F8BDF8B505000E00012414F036FC57 -:10D9E00007002B000FF370EC071B051B141B05052C -:10D9F0001B0002210720FFF7D5FC002800D00024DF -:10DA000004210120FFF7CEFC002808D000240BE001 -:10DA100003210720FFF7C6FC0028F7D101E0012C05 -:10DA200002D1300004F301FC380014F013FC200094 -:10DA3000F8BDF0B50500012085B00C00049014F08D -:10DA400005FC0027002D039025D0012D52D0022D7A -:10DA500010D0032D4ED1002017F0ECFC002849D047 -:10DA6000C068C00446D508F389F96160206004F3FA -:10DA7000DBFA3DE003200EF0A0FE002803D117F0F2 -:10DA8000D9FC002836D0C068C00433D508F376F935 -:10DA9000616020602EE098488068002802D0002055 -:10DAA00004902AE0E668A569A068029004F311FBDF -:10DAB0000191009002983100794008430DD0029AFC -:10DAC0003900A818009A019B7141801A994104D32A -:10DAD000684607C8801AB1410CD202982A003B0060 -:10DAE00031000EF3B4EF401C79412A000FF3E8EB4C -:10DAF000E160A060200004F32CFB039814F0AAFB63 -:10DB0000049822E47D490978884201D10120B7E6D2 -:10DB10000020B5E610B50400FF3081300BF033F97A -:10DB2000200007F08EFA10BD0123C268DB02C9078E -:10DB30009A43090D0A43C260A2E610B5437A032B4B -:10DB400007D1002A02D017F085FE10BD17F072FE33 -:10DB500010BD4900091815204001091807C0FA39FD +:10D76000F0B50500012085B00C00049014F04AFCCF +:10D770000027002D039025D0012D52D0022D10D06E +:10D78000032D4ED1002017F04DFE002849D0C0686F +:10D79000C00446D508F3F2FA6160206004F344FC4B +:10D7A0003DE003200EF0F3FD002803D117F03AFE10 +:10D7B000002836D0C068C00433D508F3DFFA6160B2 +:10D7C00020602EE098488068002802D00020049055 +:10D7D0002AE0E668A569A068029004F37AFC01914A +:10D7E000009002983100794008430DD0029A390028 +:10D7F000A818009A019B7141801A994104D3684688 +:10D8000007C8801AB1410CD202982A003B003100AF +:10D810000FF31CE9401C79412A000FF352EDE1603F +:10D82000A060200004F395FC039814F0EFFB04982B +:10D830001EE47E490861002070477C4800697047FB +:10D840007A490978884201D1012070470020704749 +:10D8500010B50400FF3059300BF065F9200007F0D7 +:10D860003FFA31E40123C268DB02C9079A43090D7C +:10D870000A43C260704710B5437A032B07D1002AD0 +:10D8800002D017F0E5FF1FE417F0D2FF1CE44900B7 +:10D8900009180520C0010918088B012AF3D1421C80 +:10D8A0001205120D0A830FE410B50400C06840058C +:10D8B00003D42000FFF7BAFC06E4002903D02000BF +:10D8C000FEF735FE0FE501212000FEF718FE2000CF +:10D8D000FEF7FFFD07E570B5060014F093FB0500A9 +:10D8E0005248406807E0017A4468012902D13100BA +:10D8F000FFF7DAFF20000028F5D1280014F086FB9E +:10D90000A2E5FEB500210A00684606C04748446803 +:10D910000B2080012BE0207A012827D12000FF3046 +:10D920004A3006226946029014F090F800281DD073 +:10D930000B20800125182F6B04F3FFFB060020004D +:10D940001AF004E9002801D137002E6339003000B5 +:10D9500008F3D9FE3649884208D3029A21212000D3 +:10D96000F8F790F800212000FFF79EFF6468002C74 +:10D97000D1D1FEBD10B514F045FB2C4949680029F2 +:10D9800007D102E04968002903D114F03FFB0120D0 +:10D99000A9E4FF224932525C002AF3D014F036FB8E +:10D9A0000020A0E470B50400002514F02BFB060055 +:10D9B000200017F037FD03000DE0187AA04209D1CE +:10D9C000180017F046FD002804D04069002801D057 +:10D9D000012502E05B68002BEFD1300014F016FB4C +:10D9E000280031E570B504001500002904D020009E +:10D9F00006227E300FF34CEA002D06D02000FF30C7 +:10DA0000062229004A300FF344EA1DE570B50500EF +:10DA1000FF3000244A300DF04BF9002800D10124DA +:10DA2000280008E02000010090500004D005000408 +:10DA3000808D5B00641CC27A817AFEF784FD002829 +:10DA4000F8D1200000E5F8B5FCA1002609680228FD +:10DA5000009115D100256F46785D17F0E3FC0AE0D0 +:10DA6000607A022803D12000FFF7D0FF8619217ABF +:10DA70002000FEF7DDFA0400F2D16D1C022DEBD37D +:10DA80003000F8BD10B5040017F0BCFC217A012964 +:10DA900002D1E16849070BD5617A022906D1002835 +:10DAA00006D0FF3061300079002801D001201AE44F +:10DAB000002018E410B5FF2414F0A4FAE0490B2369 +:10DAC00049689B0105E0CA181268A24200DA1400F6 +:10DAD00049680029F7D114F099FA200003E4010005 +:10DAE00001200622030010B506F0CCFA002804D16C +:10DAF000D44940234A681A434A6007E401000622D9 +:10DB00000020012310B506F0BDFA002804D1CD4A4B +:10DB100040235168994351600BE470B514F072FAD8 +:10DB2000C7494968002903D114F070FA00208BE43A +:10DB30000022140001260D7A072D06D23300AB40D7 +:10DB40001D00154201D1641C1A4349680029F2D115 +:10DB500014F05CFA200077E4F8B5002556355FED47 :10DB60000100000028D70000000400003C273B858E -:10DB7000888B012AF6D1421C1205120D8A8310BD32 -:10DB800010B50400C068400503D42000FFF7C7FCAF -:10DB900010BD002903D02000FEF7E1FD10BD0121DA -:10DBA0002000FEF7C4FD2000FEF7ABFD10BD70B5F0 -:10DBB000060014F055FB05005548406807E0017A5F -:10DBC0004468012902D13100FFF7DAFF2000002864 -:10DBD000F5D1280014F048FBAFE5FEB500210A009E -:10DBE000684606C04A48446804F3B1FA05000326B3 -:10DBF000484F360224E0207A012820D12000FF304F -:10DC0000723006226946029014F04EF8002816D0B1 -:10DC1000200019F06CEF002801D1A0198561A0192E -:10DC20008169280008F379FDB84208D3029A2121BE -:10DC30002000F7F751FE00212000FFF7A1FF6468E4 -:10DC4000002CD8D1FEBD10B514F00AFB304949684C -:10DC5000002907D102E04968002903D114F004FB30 -:10DC6000012010BDFF227132525C002AF3D014F063 -:10DC7000FBFA002010BD70B50400002514F0F0FA86 -:10DC80000600200017F0E0FB03000DE0187AA04228 -:10DC900009D1180017F0EFFB002804D040690028D4 -:10DCA00001D0012502E05B68002BEFD1300014F0B9 -:10DCB000DBFA280041E570B504001500002904D006 -:10DCC00020000622A2300FF3EEE8002D06D020003F -:10DCD000FF300622290072300FF3E4E82DE570B51D -:10DCE0000500FF30002472300DF0D8F9002800D173 -:10DCF0000124280000E0641CC27A817AFEF73BFD13 -:10DD00000028F8D1200018E520000100845000040C -:10DD1000A4010004808D5B00F8B50026FFA109680E -:10DD20000228009115D100256F46785D17F08CFB15 -:10DD30000AE0607A022803D12000FFF7D0FF86199D -:10DD4000217A2000FEF7D2FA0400F2D16D1C022DD8 -:10DD5000EBD33000F8BD10B5040017F065FB217A55 -:10DD6000012902D1E16849070BD5617A022906D160 -:10DD7000002806D0FF3061300079002801D0012052 -:10DD800010BD002010BD10B5FF2414F069FAE4495D -:10DD90000B2349689B0105E0CA18526AA24200DAC7 -:10DDA000140049680029F7D114F05EFA200010BD74 -:10DDB000010001200622030010B506F040FB0028F8 -:10DDC00004D1D84940234A681A434A6010BD010073 -:10DDD00006220020012310B506F031FB002804D1F3 -:10DDE000D04A402351689943516010BD70B514F07A -:10DDF00037FACB494968002903D114F035FA0020DD -:10DE00009BE40022140001260D7A072D06D2330070 -:10DE1000AB401D00154201D1641C1A43496800291A -:10DE2000F2D114F021FA200087E4F8B500250700AC -:10DE30000DF034F9002801D00020F8BD14F010FADC -:10DE40000600B74844680CE0E068400508D52000AB -:10DE500006223900A23013F027FF002800D1250048 -:10DE60006468002C01D0002DEED0300014F0FCF9D5 -:10DE70002800F8BDAB498000401840690AE5FEB5AE -:10DE800000200500A74E3061A800801940690028D5 -:10DE90000BD0A0300088346904E021000FF352ED6C -:10DEA00020000C00002CF8D130616D1C2D062D0EC9 -:10DEB000032DE9D330690190B1680FF344ED0700F9 -:10DEC00000259849A80040184669002E21D034004A -:10DED000A034208801990FF336ED0022A073E2737D -:10DEE000A07D7843810230008030836B1961816BA3 -:10DEF00080234A61816BCA781A43CA70C27F172097 -:10DF0000400100923018817C1300A07D012206F0B0 -:10DF100011FB6D1C2D062D0E032DD2D3380004F3FA -:10DF2000D8F980488068401E06F026FBFEBD10B57B -:10DF300006F063FB002010BDFEB5FFF7A0FF06F062 -:10DF40002CFB441C06F076FA4443A50206F025FBA0 -:10DF5000040006F06FFA44430120A10280020F186A -:10DF6000281A0026019004F369F82A00388FE0A2ED +:10DB700007000DF0A7F8002801D00020F8BD14F030 +:10DB80004BFA0600B34844680CE0E068400508D54D +:10DB90002000062239007E3013F062FF002800D1F9 +:10DBA00025006468002C01D0002DEED0300014F068 +:10DBB00037FA2800F8BDA84980004018406970472E +:10DBC00010B506F04CFB002004E4FEB500F035FA79 +:10DBD00006F015FB441C06F05AFA4443A50206F071 +:10DBE0000EFB040006F053FA44430120A102800218 +:10DBF0000F18281A0026019004F320FA2A00330097 +:10DC00000EF32EEF1C003100B81A99410292F3D2A4 +:10DC1000029A01982300121AB341EDD206F0F5FAE8 +:10DC20000020FEBD70B50D00002805D00521C901FA +:10DC300040180468002C01D100200FE4E06C29009A +:10DC40000FF382EA2068291D0FF37EEA2900206D78 +:10DC500008310FF37AEA2900606D0C310FF374EA92 +:10DC60002900606810310FF370EA2900A0681431B0 +:10DC70000FF36AEA2900E06818310FF366EA290019 +:10DC8000206E1C310FF360EA2900203120690E005C +:10DC90000FF35AEA2900606E24310FF356EA200090 +:10DCA0006030018B3172090A7172418BB172090ABD +:10DCB000F172818B3173090A7173C08BB073000AE2 +:10DCC0008034F073208830352870000A68706088CE +:10DCD000A870000AE870A0882871000A6871E088BE +:10DCE000A871000AE87120892872000A68726089A8 +:10DCF000A872000AE8720120DFE4FEB5002000905F +:10DD000014F08AF901905348446861E0E0684005E6 +:10DD10005BD50B2080012618207A7569012812D066 +:10DD200002280CD0032814D120000DF0F6F80128A9 +:10DD300005D10198012414F073F92000FEBD2000E4 +:10DD400019F082EF27E00022110020001300FEF7F7 +:10DD5000ADFF424F280039684030CA8802824A89A4 +:10DD600042820A7A0275497A417500212B20415579 +:10DD7000280020212C300FF332E95920C0003968E7 +:10DD80002018062207000FF3F8E8B27B39000220C2 +:10DD9000012306F081F9002D19D00520C0012018BB +:10DDA00000688C210FF31AE92800F5F71DFEE81D25 +:10DDB0000021F930416186228161515378218163CC +:10DDC0001E20FF354135A86001E001200090646805 +:10DDD000002C9BD1019814F023F90098FEBDF3B5F7 +:10DDE00081B007000CF06EFF002801D00020FEBDBE +:10DDF00014F012F9060017480025446813E02000CB +:10DE0000FF30062239004A3013F02AFE002809D1DB +:10DE10002000029906227E3013F022FE002801D154 +:10DE2000250002E06468002CE9D1300014F0F8F815 +:10DE30002800FEBD10B5040003F096FE002804D1B2 +:10DE40002000F3F789FC002800D0012013E5000032 +:10DE500002030000D00500049050000430F800C018 +:10DE6000F8B5050014F0D8F80090A4480B26B601C8 +:10DE70004468012713E0E06840050FD5A019406908 +:10DE8000FF30401C4169A8780209380090400142E7 +:10DE900004D0E52229002000F2F711FD6468002C6F +:10DEA000E9D1009814F0BCF8F8BDFFB581B01C00B2 +:10DEB00015000A9E14F0B0F80021216031608F49EE +:10DEC0004A6828E0D168490524D50B2189015118F9 +:10DED0004969FF31491C8F694B693B4337683B43B4 +:10DEE0003360019B93420FD1029B002B236805D026 +:10DEF0008F693B432B4323604D610BE04F693B43EC +:10DF00002B4323608D6105E04B6989690B432168D0 +:10DF10000B4323605268002AD4D114F081F891E4B5 +:10DF200070B5002503212800FFF7D9F8040003216C +:10DF30000800FFF7D4F8002C01D0002815D12100EB +:10DF4000014313D0002C00D10400002C0ED0217A04 +:10DF50002000FEF777F8040008D0607A0328F6D195 +:10DF60002000FFF7C0FA0028F1D00125593C646574 :10DF70000100000024DB000000040000C8484E310E -:10DF800033000EF378ED1C003100B81A994102926B -:10DF9000F3D2029A01982300121AB341EDD206F08F -:10DFA0000CFB0020FEBD70B50D00002805D005213A -:10DFB000C9014018446A002C01D10020F0E4E06C53 -:10DFC00029000FF3CCE82068291D0FF3C8E82900C9 -:10DFD000206D08310FF3C2E82900606D0C310FF39A -:10DFE000BEE82900606810310FF3B8E82900A06886 -:10DFF00014310FF3B4E82900E06818310FF3AEE8EC -:10E000002900206E1C310FF3AAE829002031206975 -:10E010000E000FF3A4E82900606E24310FF39EE890 -:10E0200020006030018B3172090A7172418BB1722C -:10E03000090AF172818B3173090A7173C08BB07355 -:10E04000000A8034F073208830352870000A687028 -:10E050006088A870000AE870A0882871000A6871BA -:10E06000E088A871000AE87120892872000A6872A5 -:10E070006089A872000AE872012091E4F8B50026D0 -:10E0800014F0F8F800902B480B274468BF0168E0B3 -:10E09000E068400563D5207A012812D002280CD010 -:10E0A000032814D120000DF00CF9012805D10098A7 -:10E0B000012414F0E3F82000F8BD200019F090EDE1 -:10E0C00021E00022110020001300FEF71AFF1B4878 -:10E0D00001682000CA88A03002814A8942810A7AF8 -:10E0E00002734A7A4273BB20800020180622050082 -:10E0F0000EF34CEF172040012018827C29000220EB -:10E10000012306F0A6F9E519A86B002828D0052000 -:10E11000C0012018406A8C210EF36AEFA86BF5F756 -:10E120007AFBA96B0020C0318862A96BC03107E07F -:10E1300002030000A401000484500004E8F500C0BC -:10E14000C862A96B40314883A86B7821FF30401C1E -:10E150000161A86B1E21FF30401C016200E0012616 -:10E160006468002C94D1009814F088F83000F8BD51 -:10E17000F3B581B007000CF09BFF002801D0002010 -:10E18000FEBD14F077F80600AD480025446813E0A2 -:10E190002000FF3006223900723013F08FFD002876 -:10E1A00009D1200002990622A23013F087FD002831 -:10E1B00001D1250002E06468002CE9D1300014F0A0 -:10E1C0005DF82800FEBD10B5040003F0ADFD002889 -:10E1D00004D12000F3F760FA002800D0012010BD20 -:10E1E000F8B5050014F046F8009095480B26B601E6 -:10E1F0004468012712E0E06840050ED5A019806B45 -:10E20000C030816AA878020938009040014204D0E9 -:10E21000E52229002000F2F75CFB6468002CEAD1BB -:10E22000009814F02BF8F8BDFFB581B01C00150064 -:10E230000A9E14F01FF800212160316080494A686D -:10E2400027E0D168490523D50B2189015118896B35 -:10E25000C031CF6A8B6A3B4337683B433360019BD5 -:10E2600093420FD1029B002B236805D0CF6A3B431A -:10E270002B4323608D620BE08F6A3B432B4323606B -:10E28000CD6205E08B6AC96A0B4321680B432360AA -:10E290005268002AD5D113F0F1FF46E470B500258D -:10E2A00003212800FFF792F8040003210800FFF77C -:10E2B0008DF8002C01D0002815D12100014313D086 -:10E2C000002C00D10400002C0ED0217A2000FEF793 -:10E2D00017F8040008D0607A0328F6D12000FFF771 -:10E2E00075FA0028F1D0012528007FE410B5C26836 -:10E2F0000400D00415D5207A002808D0012811D0B8 -:10E3000003280ED1607A032801D0012809D1002901 -:10E3100004D1200019F09AFA002802D1200019F047 -:10E3200064EC10BD9003FCD4012040040243E26081 -:10E3300010BD10B513F09EFF414906E00A7A062A87 -:10E3400003D113F09BFF012010BD49680029F5D1CE -:10E3500013F094FF002010BDFEB50400012613F059 -:10E3600089FF2500A0350190A87DFF282DD1354FCC -:10E370000020397801231A0082400A42A11300C507 +:10DF80002800D1E410B5C2680400D00415D5207A69 +:10DF9000002808D0012811D003280ED1607A032868 +:10DFA00001D0012809D1002904D1200019F088FCF2 +:10DFB000002802D1200019F056EE66E49003FCD44C +:10DFC000012040040243E2605FE410B514F02EF833 +:10DFD0004F4906E00A7A062A03D114F02BF80120F3 +:10DFE00053E449680029F5D114F024F800204CE4EA +:10DFF00001000B22F8B592018A180092927B012051 +:10E000000500FF2A1ED10A7A022A00D100255922D2 +:10E0100000240127D2008E183E4A39005268A140E0 +:10E02000114210D12206120E2B003100012006F001 +:10E030003DF8002807D10099364A8C735168A740F3 +:10E0400039435160F8BD641C062CE5D3F8BDFEB51C +:10E0500000F03DF82F4C0290A1680FF37EEC0025F4 +:10E0600001902C48A90008184469002C21D00B20ED +:10E07000800127187E6902994036B0890FF36CEC55 +:10E08000B0750020F0758034217A019A5143E2681E +:10E0900089021161E16880224861E068C17811431A +:10E0A000C170B27B00921300B97B207A012206F086 +:10E0B0007DF86D1C2D062D0E032DD2D3019804F38F +:10E0C00012F914488068401E06F092F8FEBDF8B5BB +:10E0D000002005000F4E0B27BF013061A8008019FA +:10E0E000406900280DD0C0194069346940308089EA +:10E0F00004E021000FF330EC20000C00002CF8D1DC +:10E1000030616D1C2D062D0E032DE7D33069F8BD4F +:10E11000D00500049050000470477FB503000B2029 +:10E120008001181882690D00022404291BD21800EE +:10E1300017F06AFA002805D0142068438018007987 +:10E14000040910E01800FFF712FA00280BD0022192 +:10E15000684610F08FF8280010F05DFA80006946DC +:10E16000085C0407240F200004B070BD03000A00FF +:10E1700000B517F049FA002807D00B2080011818C5 +:10E18000816960205043B030085A00BD10B5F3F7E4 +:10E1900081F8002810D0F3F775F875490120800543 +:10E1A0008860C011F3F73CF800F038F919F01AEC68 +:10E1B00000F044F9F3F75EF810BD70B513F036FFC8 +:10E1C00006006C480168080609D5480607D5684C62 +:10E1D000A568E017E060FFF7D9FFA56001E019F03E +:10E1E00002EC300013F026FF70BDE6E710B513F027 +:10E1F0001DFF040000F0ECF800F0F4F8200013F02C +:10E2000019FF10BD70B5040013F010FF0500594848 +:10E21000016821430160600601D4200618D5480634 +:10E2200016D5080614D5F3F7A0F85149FF20401C75 +:10E23000C8604A68024200D088604F49086861227D +:10E240001205904308604D4988684D4A1040886027 +:10E25000280013F0EFFE70BD10B5F6F747FD00285B +:10E2600001D1484810BD484810BD10B501F0BFFAB3 +:10E2700046494000085A464B40495843C9680B0775 +:10E280001B0F0FF336E8080507060609090B0B06F6 +:10E29000400810BD800810BDC00810BD000910BDA9 +:10E2A00010B5FFF7E2FF3B49884201D13A4810BD63 +:10E2B0003A49884201D13A4810BD3A4A3A49904217 +:10E2C00019D03A4A904201D1394810BD394A90429A +:10E2D00002D13748D23810BD374A904201D1374871 +:10E2E00010BD374A904201D1364810BD364A90429F +:10E2F00001D1364810BD080010BD70B5040013F000 +:10E3000095FE05001B480168A1430160600601D429 +:10E31000200618D5480601D5080614D41648016809 +:10E320006122120511430160016842051143016039 +:10E330000F49C00D8860F3F730F810488168104A23 +:10E34000D24311438160280013F074FE70BD094A66 +:10E35000010012680020914300D101207047C000E5 +:10E3600005D5044818304068002800D000477047A1 +:10E3700000300080B8F400C000210080F47E0CE77B :10E380000100000020DF0000000400009B929D5D62 -:10E390002BD183401943A87539708100C9194C618C -:10E3A00081012E480E18402130000EF32CEE200083 -:10E3B0003100803006008163207A01280FD0B868D0 -:10E3C000012801D106F0A0F8F27F17204001009249 -:10E3D0002018817C1300A87D012206F0BFF80026DA -:10E3E000019813F055FF3000FEBD401C0006000EE2 -:10E3F0000328CAD3F4E701001722F8B552018A189E -:10E400000092927C01200500FF2A1ED10A7A022A7E -:10E4100000D10025BB220024012792008E180E4A4D -:10E4200039005268A140114210D12206120E2B0071 -:10E430003100012006F017F8002807D10099064A9C -:10E440008C745168A74039435160F8BD641C062C98 -:10E45000E5D3F8BDA401000484500004F81602C0FE -:10E4600070477FB503000B2080011818C26B0D00A8 -:10E47000022404291BD2180017F0D2F8002805D076 -:10E480001420684380180079040910E01800FFF791 -:10E49000E1F900280BD00221684610F091F828001D -:10E4A00010F05FFA80006946085C0407240F200022 -:10E4B00004B070BD03000A0000B517F0B1F80028E1 -:10E4C00007D00B2080011818C16B60205043B0307A -:10E4D000085A00BD10B5F2F77DFE00280CD0F2F707 -:10E4E00071FE7349012080058860C011F2F738FE83 -:10E4F00019F048EAF2F75EFE10BD70B513F0C4FEE5 -:10E5000006006C480168080609D5480607D5684C1E -:10E51000A568E017E060FFF7DDFFA56001E019F0F6 -:10E5200032EA300013F0B4FE70BDE6E710B513F028 -:10E53000ABFE040000F0ECF800F0F4F8200013F05B -:10E54000A7FE10BD70B5040013F09EFE05005948EB -:10E55000016821430160600601D4200618D54806F1 -:10E5600016D5080614D5F2F7A0FE5149FF20401C2D -:10E57000C8604A68024200D088604F49086861223A -:10E580001205904308604D4988684D4A10408860E4 -:10E59000280013F07DFE70BD10B5F6F7BBFA002819 -:10E5A00001D1484810BD484810BD10B501F093FA9C -:10E5B00046494000085A464B40495843C9680B0732 -:10E5C0001B0F0EF3A0EE080507060609090B0B0644 -:10E5D000400810BD800810BDC00810BD000910BD66 -:10E5E00010B5FFF7E2FF3B49884201D13A4810BD20 -:10E5F0003A49884201D13A4810BD3A4A3A499042D4 -:10E6000019D03A4A904201D1394810BD394A904256 -:10E6100002D13748D23810BD374A904201D137482D -:10E6200010BD374A904201D1364810BD364A90425B -:10E6300001D1364810BD080010BD70B5040013F0BC -:10E6400023FE05001B480168A1430160600601D458 -:10E65000200618D5480601D5080614D416480168C6 -:10E6600061221205114301600168420511430160F6 -:10E670000F49C00D8860F2F730FE10488168104ADB -:10E68000D24311438160280013F002FE70BD094A95 -:10E69000010012680020914300D101207047C000A2 -:10E6A00005D5044818304068002800D0004770475E -:10E6B0000030008054F200C000210080002800805B -:10E6C0007FFFDFFF3F3D00007F841E00307A0200A5 -:10E6D000A0860100001BB70054150000405DC60075 -:10E6E000B013000000F82401540D000000366E0144 -:10E6F000AA0A000080BA8C0100F04902AA060000B4 -:10E7000000751903EB040000007C9200AA1A0000B7 -:10E710002649002010B5086125490420086100F051 -:10E720001DF810BD002010B5F2F7E6FB0120F2F74E -:10E73000E3FB0320F2F7E0FB04000020F2F70FFCFC -:10E740000120F2F70CFC0320F2F709FC0200210083 -:10E750000320002300F03AF810BD7047144810B5AC -:10E760000168144A114001608168134A11408160B8 -:10E770004168124A114041608168052291438160DD -:10E780000F4948680F4A1040486001F0DD273E29D4 +:10E39000002800807FFFDFFF3F3D00007F841E00DC +:10E3A000B47A0200A0860100001BB70054150000DB +:10E3B000405DC600B013000000F82401540D0000B9 +:10E3C00000366E01AA0A000080BA8C0100F04902F2 +:10E3D000AA06000000751903EB040000007C9200FF +:10E3E000AA1A00003349002010B508613249042000 +:10E3F000086100F036F810BD002010B5F2F7E4FD1A +:10E400000120F2F7E1FD0320F2F7DEFD0400002019 +:10E41000F2F70DFE0120F2F70AFE0320F2F707FEE5 +:10E42000020021000320002300F058F810BD7047BF +:10E430002349224808602248312180304161B321BC +:10E4400041611F484030C16B02229143C163704754 +:10E450001B49B120803148611848194908380860C3 +:10E460007047154810B50168164A1140016081686F +:10E47000154A114081604168144A11404160816829 +:10E4800005229143816012494868124A1040486051 +:10E4900001F07AFA1048C069002803DB40210E2001 +:10E4A00001F099F908211F2001F095F901F041FAD6 +:10E4B00010BD00000029008000280080CD0200006F +:10E4C0000023008000CFFFCFEF7BFBABB5AAAABF34 +:10E4D0000022008040F0FFFF002100800A2A10B5D2 +:10E4E00011D00B2A0FD00C2A0DD1002B0BD10021FB +:10E4F0000420FCF231FC0448426910218A43426145 +:10E5000082698A43826110BD00020090F8B5FE481E +:10E51000FE4A018891421DD00200128801244188E0 +:10E520009440FB4F012904D1FD68A5432C432600EC +:10E5300003E0FE68A64334432500F6498088096855 +:10E5400013F068EB8905800A0843FD6001D019F0DB +:10E550007EEAFE60F8BDF8B501210600EA48012513 +:10E5600058388155E849102057398855EA48B10193 +:10E570000F18EA4800220188E948130016F035FB1D +:10E58000A9000091002878502FD0AC210181DE48ED +:10E59000B40050380059403045720098385801890D +:10E5A0004018D9495039095944310EF3E2ED009829 +:10E5B00008213858D44A01730123083A1800115928 +:10E5C000A84001431151110048390959121D8871A1 +:10E5D000000AC87110005438805D115983401943F6 +:10E5E0001151401C1100543988556D1C102DC0DB91 +:10E5F0000121002017F060F9F8BDC34910B5C068CB +:10E600005C39095C002908D1C6490A68002A02D190 +:10E61000C548086001E0FFF79EFF002010BDF8B577 +:10E6200085018400B84EBC4F5C3EB16A002912D10E +:10E6300030000C300059C17982790802310058311C +:10E64000095910430840310050310851C0072BD1FF +:10E650007859002828D17D21B448002209010FF300 +:10E66000BDF9002878511FD00021B162A64EAC221E +:10E67000503E02813059403041727859018940182A +:10E68000315944310EF374ED012031004831085105 +:10E69000315900228871CA7132004C32115901433C +:10E6A0001151795908200873F8BDF8B5040000200D +:10E6B000E168954E8900503E71588871C871E168D3 +:10E6C00089007158012208714871E1688900715808 +:10E6D00020310A76E16889007158370020310876C8 +:10E6E000E0680C3F395C002913D1800035586C3547 +:10E6F00028000EF32EED03218902084329000EF3B2 +:10E7000038EDE0688000305810226B3001781143FA +:10E7100001707D4801255C38056445648564C564E5 +:10E720008562E068395C002908D1FFF778FF7649F7 +:10E73000E06858390D54E068491C0D542000FFF77B +:10E740005CFFE0680721800030580023203001750D +:10E75000E068800030586D4920300377E068002879 +:10E7600003D1694A118051809180674A0D0A921D38 +:10E77000117055709170090AD1701100523900283A +:10E7800002D10868C37003E005228000729E57B36F :10E79000010000001CE3000000040000B30318E0C7 -:10E7A0009FFA0E48C069002803DB40210E2001F0CB -:10E7B00086F908211F2001F082F901F0B3FA10BD9B -:10E7C000002900800028008000CFFFCFEF7BFBAB4B -:10E7D000B5AAAABF0022008040F0FFFF0021008000 -:10E7E0000A2A10B511D00B2A0FD00C2A0DD1002BFC -:10E7F0000BD100210420FCF2B9FA0448426910212F -:10E800008A43426182698A43826110BD000200909E -:10E81000F8B5FE48FE4A018891421DD002001288D8 -:10E82000012441889440FB4F012904D1FD68A54390 -:10E830002C43260003E0FE68A64334432500F64936 -:10E840008088096813F014EB8905800A0843FD608D -:10E8500001D019F0CCE8FE60F8BDF8B50121060042 -:10E86000EA48012558388155E8491020573988551C -:10E87000EA48B1010F18EA4800220188E94813006C -:10E8800016F0F1F9A9000091002878502FD0AC21A2 -:10E890000181DE48B400503800594030457200987C -:10E8A000385801894018D9495039095944310EF373 -:10E8B0006AEC009808213858D44A01730123083AB9 -:10E8C00018001159A8400143115111004839095944 -:10E8D000121D8871000AC87110005438805D1159EA -:10E8E000834019431151401C1100543988556D1C47 -:10E8F000102DC0DB0121002016F0EAFFF8BDC3494E -:10E9000010B5C0685C39095C002908D1C6490A689D -:10E91000002A02D1C548086001E0FFF79EFF0020F1 -:10E9200010BDF8B585018400B84EBC4F5C3EB16A9D -:10E93000002912D130000C300059C17982790802C7 -:10E940003100583109591043084031005031085105 -:10E95000C0072BD17859002828D17D21B448002246 -:10E9600009010FF345F8002878511FD00021B1624A -:10E97000A64EAC22503E0281305940304172785947 -:10E9800001894018315944310EF3FCEB012031006C -:10E9900048310851315900228871CA7132004C3215 -:10E9A000115901431151795908200873F8BDF8B580 -:10E9B00004000020E168954E8900503E715888712E -:10E9C000C871E16889007158012208714871E168D5 -:10E9D0008900715820310A76E16889007158370042 -:10E9E00020310876E0680C3F395C002913D18000A3 -:10E9F00035586C3528000EF3B6EB03218902084325 -:10EA000029000EF3C0EBE0688000305810226B3014 -:10EA10000178114301707D4801255C380564456427 -:10EA20008564C5648562E068395C002908D1FFF718 -:10EA300078FF7649E06858390D54E068491C0D5458 -:10EA40002000FFF75CFFE0680721800030580023BA -:10EA500020300175E068800030586D492030037720 -:10EA6000E068002803D1694A118051809180674A8B -:10EA70000D0A921D117055709170090AD170110024 -:10EA80005239002802D10868C37003E005228000D3 -:10EA90000858C270E068800008588370E068800001 -:10EAA00008580371E068800008584371E0688100ED -:10EAB0007258D57996792A02324309D053480838DA -:10EAC00005004258183D6A50E16889004350E068EB -:10EAD0000C2116F0FDFE0020F8BD70B5040013F007 -:10EAE000DDFB4A4AEF25A100503A53582033002C51 -:10EAF0001D7603D05258172320321375434B002242 -:10EB00003C3B5A5013F0CEFB70BD70B5040014238B -:10EB1000424958433C3940180EF3FCFF3F4B3B4EF3 -:10EB20000121A20140330D00D318573E09E02A000D -:10EB3000002804D188001858002800D100221000B5 -:10EB4000491C002802D1325D8A42F0D870BD0120F4 -:10EB500008B500903748142100686A46FCF2A5FE0B -:10EB600008BD3548704770B50C000121C9078A7887 -:10EB7000264B8000383B1958A14230D0002C1C5045 -:10EB80000DD00020012185005D59A54204D0451C0F -:10EB90000E00AE40164222D1401C012890490B3A8B +:10E7A0000858C270E068800008588370E0688000F4 +:10E7B00008580371E068800008584371E0688100E0 +:10E7C0007258D57996792A02324309D053480838CD +:10E7D00005004258183D6A50E16889004350E068DE +:10E7E0000C2117F073F80020F8BD70B5040013F089 +:10E7F00031FC4A4AEF25A100503A53582033002CEF +:10E800001D7603D05258172320321375434B002234 +:10E810003C3B5A5013F022FC70BD70B50400142329 +:10E82000424958433C3940180FF374F93F4B3B4E73 +:10E830000121A20140330D00D318573E09E02A0000 +:10E84000002804D188001858002800D100221000A8 +:10E85000491C002802D1325D8A42F0D870BD0120E7 +:10E8600008B500903748142100686A46FDF21DF88B +:10E8700008BD3548704770B50C000121C9078A787A +:10E88000264B8000383B1958A14230D0002C1C5038 +:10E890000DD00020012185005D59A54204D0451C02 +:10E8A0000E00AE40164222D1401C0128F3D31B4D6E +:10E8B0005C3DA878A0421AD0280019496230002C8B +:10E8C00009D0C27883781002184388420FD000F034 +:10E8D00051FE012008E04278037810021843884274 +:10E8E00005D000F047FE0020F2F7C5FCAC7070BD0B +:10E8F000F0B505000024094A21008000503A135861 +:10E9000085B020331C7516580123203633761058F5 +:10E91000AE01203004760548371822E05C7D020005 +:10E92000FFFF000000020090DC2001C010950200F3 +:10E9300026F400C06404000408F200C0E7E0000010 +:10E94000C4040004F0F100C0DBE30000A000049068 +:10E950003858002804D00FF321F80499002078508B +:10E96000641C4948405DA042F0D8484F14203A004A +:10E97000143A110068437C310B00543BC3188218D1 +:10E98000C01901AF0DC70024A80147180AE0A00074 +:10E9900000903858002804D013F098FB009900200C +:10E9A0007850641C3848401C405DA042EFD8374C7A +:10E9B000683405E001980FF384F8A05113F086FB4A +:10E9C00001980FF3A7F80028F4D105E002980FF39F +:10E9D00078F8786013F07AFB02980FF39BF8002820 +:10E9E000F4D105E003980FF36CF8A05113F06EFB1F +:10E9F00003980FF38FF80028F4D12349A051012088 +:10EA0000091F08644864C864886405B0F0BDF8B59F +:10EA1000002425001C48A70034301426C5511B488B +:10EA200066431438301814210EF3F6EA17481421FF +:10EA300030180EF3F2EA15481421143030180EF392 +:10EA4000ECEA11483022001DC15910486243A83039 +:10EA50001018C4608160456185610D49C56101611F +:10EA60000C4901620C4985624162FCF287FE641C1C +:10EA7000012CCFDB09490820F1F7E0FD0849FF2010 +:10EA8000401C8860F8BD0000047D0200E89402008C +:10EA90003BE20000EB550200BB590200455F02005B +:10EAA0000030008031B56B461A7858789978002488 +:10EAB000012A0ED0022A0AD1484A10704848017033 +:10EAC00000F03AFE10F0A2FB040000F058FE200017 +:10EAD00038BD444A10704448017000F0F8FD10F051 +:10EAE000D9FB040000F019FEF1E7F8B500263F4F0E +:10EAF00034003D1DA00040190068FFF7D3FF002837 +:10EB000006D0A00039684019006888600120F8BD6F +:10EB1000641C052CEEDB002E05D138680121022291 +:10EB20008172027241720020F8BD304800220068F4 +:10EB3000017A01290CD0022929D1284B417A197078 +:10EB40002B49C1602B4901612B4941612B4916E0DA +:10EB5000244B417A1970817A234B02291970284B72 +:10EB6000C360284B0361284B436107D127490978CB +:10EB7000BF2901D01F2901D1254900E02549C261E3 +:10EB800042608161012142700170080070470020DD +:10EB9000704721497D20000110B50860DD284B1524 :10EBA0000100000018E7000000040000E0D9CB8C51 -:10EBB000F3D31B4D5C3DA878A0421AD02800194918 -:10EBC0006230002C09D0C278837810021843884242 -:10EBD0000FD000F043FE012008E0427803781002D5 -:10EBE0001843884205D000F039FE0020F2F7E3FA1E -:10EBF000AC7070BDF0B505000024094A210080000A -:10EC0000503A135885B020331C751658012320360E -:10EC100033761058AE01203004760548371822E0CC -:10EC2000FC7C0200FFFF0000000200902C1D01C0D0 -:10EC300070960200CEF100C02C00000498EF00C0D6 -:10EC4000D7E300008400000480EF00C0CBE60000A2 -:10EC5000A00004903858002804D00EF3A9FE0499AF -:10EC600000207850641C4948405DA042F0D8484FCD -:10EC700014203A00143A110068437C310B00543BD5 -:10EC8000C3188218C01901AF0DC70024A801471886 -:10EC90000AE0A00000903858002804D013F044FB8C -:10ECA000009900207850641C3848401C405DA04208 -:10ECB000EFD8374C683405E001980EF30CFFA051F3 -:10ECC00013F032FB01980EF32FFF0028F4D105E07A -:10ECD00002980EF300FF786013F026FB02980EF303 -:10ECE00023FF0028F4D105E003980EF3F4FEA051B1 -:10ECF00013F01AFB03980EF317FF0028F4D12349F1 -:10ED0000A0510120091F08644864C864886405B0E4 -:10ED1000F0BDF8B5002425001C48A70034301426A7 -:10ED2000C5511B4866431438301814210EF37EE990 -:10ED30001748142130180EF37AE9154814211430BD -:10ED400030180EF374E911483022001DC1591048E3 -:10ED50006243A8301018C4608160456185610D4927 -:10ED6000C56101610C4901620C4985624162FCF296 -:10ED70000FFD641C012CCFDB09490820F1F768FC6A -:10ED80000849FF20401C8860F8BD0000A47C0200F8 -:10ED9000489602002BE50000EF550200BF59020023 -:10EDA000495F02000030008031B56B461A78587810 -:10EDB00099780024012A0ED0022A0AD1484A1070FC -:10EDC0004848017000F02CFE10F0CAFB040000F06F -:10EDD0004AFE200038BD444A10704448017000F0DB -:10EDE000EAFD10F001FC040000F00BFEF1E7F8B5BD -:10EDF00000263F4F34003D1DA00040190068FFF77A -:10EE0000D3FF002806D0A000396840190068886048 -:10EE10000120F8BD641C052CEEDB002E05D13868FE -:10EE2000012102228172027241720020F8BD304835 -:10EE300000220068017A01290CD0022929D1284B2F -:10EE4000417A19702B49C1602B4901612B494161FD -:10EE50002B4916E0244B417A1970817A234B022901 -:10EE60001970284BC360284B0361284B436107D1BD -:10EE700027490978BF2901D01F2901D1254900E080 -:10EE80002549C26142608161012142700170080020 -:10EE900070470020704721497D20000110B50860AF -:10EEA00020491F4808602049114C086020680078FC -:10EEB000002803D1FFF79BFFFFF7B9FF2068C06868 -:10EEC000804710BD0A4800680069004710B50C0073 -:10EED00007490968496988472060012010BD000082 -:10EEE000B0B90200B1B90200B4B90200C4B902005D -:10EEF00088F200C089F50000CFF5000001AD3000B8 -:10EF000095AC30001FF500006BF50000FBAD300044 -:10EF1000C5B9020057AF3000F7AE3000B8B90200F3 -:10EF200010270000BCB90200C0B9020010B50400EF -:10EF300013F0BEF91F49012C0CD11F4A4A601F492A -:10EF40004B6A802213434B624B6A93434B6213F02C -:10EF5000B3F910BD184A521CF0E70800E6E770B597 -:10EF60000400401E044223D106F0B6F820421FD010 -:10EF700006F0A8F820421BD0200018F058EE104CE4 -:10EF8000616A6031C872FFF7D1FF606A00256030A6 -:10EF900045730AF0FEF90B480560616A6031C87A72 -:10EFA0008872FFF7C3FF606A60300573D62A145B6E +:10EBB00020491F4808602049114C086020680078EF +:10EBC000002803D1FFF79BFFFFF7B9FF2068C0685B +:10EBD000804710BD0A4800680069004710B50C0066 +:10EBE00007490968496988472060012010BD000075 +:10EBF000B0B90200B1B90200B4B90200C4B9020050 +:10EC0000ECF400C0B5F20000FBF2000001AD3000F2 +:10EC100095AC30004BF2000097F20000FBAD3000E5 +:10EC2000C5B9020057AF3000F7AE3000B8B90200E6 +:10EC300010270000BCB90200C0B9020010B50400E2 +:10EC400013F012FA1F49012C0CD11F4A4A601F49C8 +:10EC50004B6A802213434B624B6A93434B6213F01F +:10EC600007FA10BD184A521CF0E70800E6E770B535 +:10EC70000400401E044223D106F07EF820421FD03B +:10EC800006F070F820421BD0200019F00EE8104C5E +:10EC9000616A6031C872FFF7D1FF606A0025603099 +:10ECA00045730AF046FA0B480560616A6031C87A1C +:10ECB0008872FFF7C3FF606A60300573012070BD82 +:10ECC000002070BD002300800100030000A8008028 +:10ECD000F05800040C2401C010B5FAF27FFB10BDFF +:10ECE000FB4880787047FA48C0787047F848006958 +:10ECF0007047F7491F2088807047F8B50400F44D2D +:10ED0000F44F13E0A001060010F0C9FB00280AD060 +:10ED1000300010F0A1FB2A89D300DB1903C3601C6B +:10ED2000521CE8802A81641C2404240CA888844294 +:10ED3000E8D3F8BDF3B581B000240F00E44EF088AD +:10ED400000904018B18888422AD9FF20FEBDF08883 +:10ED5000B188884203D30098FFF7CFFFF5E7019A07 +:10ED6000E1008D186B682A68800110F077FBF0884D +:10ED7000800110F071FB0CCD5040594008431BD16D +:10ED8000F088800110F09CFBF088800110F087FB78 +:10ED9000002811D0F088401C641C2404240CF0804E +:10EDA000BC42D4D30098FFF7A8FFF1880098081A56 +:10EDB000C01B0004000CFEBDF088401CF080C6E7BC +:10EDC000F8B501240025C24FB888009070E0C14911 +:10EDD000E000411808784E7842065ED503003F3BBC +:10EDE0000EF3A4EA0B691C1C07110B0E1515151761 +:10EDF0001D00641C2404240C5AE088783861F8E76C +:10EE000088787870F5E7B44820220EF374E830195A +:10EE10004CE08878B870C878F870EAE7891C4A280E +:10EE20001CD07F281AD04888000B01D0088815E034 +:10EE300008780200AF3A072A01D9BF280ED10A7A12 +:10EE4000D303034310091B0400011B0C00021843E9 +:10EE5000B22803D1497A0907090D08439E4A0021C7 +:10EE600020320BE006234B43D35A834203D16D1E5D +:10EE70002D062D0E04E0491C0906090EA942F1D306 +:10EE800006235943505288184480467130190404AF +:10EE90006D1C240C2D062D0E0AE0022801D1897864 +:10EEA00039700121002800D0310008190404240C15 +:10EEB000009884428BD3F8BD8749002010B50870B4 +:10EEC0008348416900290FD101214161002010F0E0 +:10EED000E6FA002801D110F0F3FAFFF70AFF00204C +:10EEE000FFF70BFFFFF76CFF10BD7B4A00202032BD +:10EEF0000DE07F2908D106235843764980184088C1 +:10EF0000C000411803C97047401C202804DA0621BC +:10EF10004143515C0029ECD10020C04301007047FF +:10EF200070B506000D00FFF7E0FF0C00FCF292FF49 +:10EF30000004000C30602000FCF28CFF28600120EF +:10EF400070BD7CB504000020634A2032002C2BD019 +:10EF500025E00D2920D1062358435E4980184088BA +:10EF6000C00040188288110B01D1811C0FE01106EE +:10EF7000574B120B92001833D218090E801C403ADE +:10EF8000D56B6A4601ABA8476B461A7900992000F9 +:10EF90000DF3B0EF01207CBD401C202804DA0621CF +:10EFA0004143515C0029D4D100207CBD512359AA92 :10EFB0000100000014EB00000004000014B6BE388D -:10EFC000012070BD002070BD0023008001000300FF -:10EFD00000A80080E45800042C2001C010B5FAF20B -:10EFE00007FA10BDFF48C0687047FE491F204880DF -:10EFF0007047F8B50400FB4DFB4F13E0A00106007D -:10F0000010F0F7FB00280AD0300010F0CFFBEA88A0 -:10F01000D300DB1903C3601C521CA880EA80641C67 -:10F020002404240C68888442E8D3F8BDF3B581B089 -:10F0300000240F00EB4EB088009040187188884281 -:10F040002AD9FF20FEBDB0887188884203D300987A -:10F05000FFF7CFFFF5E7019AE1008D186B682A688A -:10F06000800110F0A5FBB088800110F09FFB0CCD53 -:10F070005040594008431BD1B088800110F0CAFBB2 -:10F08000B088800110F0B5FB002811D0B088401C7A -:10F09000641C2404240CB080BC42D4D30098FFF735 -:10F0A000A8FFB1880098081AC01B0004000CFEBD20 -:10F0B000B088401CB080C6E7F8B501240025C94FD0 -:10F0C000788800906AE0C849E000411808784E78D6 -:10F0D000420658D503003F3B0EF332E90A63161689 -:10F0E00006100A0D14141417641C2404240C55E093 -:10F0F0008878F860F8E788787870F5E7BB482022D0 -:10F100000DF302EF301947E0891C49281CD07F28F5 -:10F110001AD04888000B01D0088815E00878020052 -:10F12000AF3A072A01D9BF280ED10A7AD303034385 -:10F1300010091B0400011B0C00021843B22803D164 -:10F14000497A0907090D0843A84A002120320BE03B -:10F1500006234B43D35A834203D16D1E2D062D0E39 -:10F1600004E0491C0906090EA942F1D306235943BC -:10F170005052881844804671301904046D1C240CC8 -:10F180002D062D0E0AE0022801D18978397001215F -:10F19000002800D0310008190404240C009884428F -:10F1A00091D3F8BD9149002010B508708D480169D0 -:10F1B00000290FD101210161002010F01AFB002865 -:10F1C00001D110F027FBFFF710FF0020FFF711FF20 -:10F1D000FFF772FF10BD854A002020320DE07F2925 -:10F1E00008D106235843804980184088C000411840 -:10F1F00003C97047401C202804DA06214143515CB2 -:10F200000029ECD10020C0430100704770B5060012 -:10F210000D00FFF7E0FF0C00FCF226FE0004000CDE -:10F2200030602000FCF220FE2860012070BD7CB51B -:10F23000040000206D4A2032002C2BD025E00D293F -:10F2400020D106235843684980184088C0004018E0 -:10F250008288110B01D1811C0FE01106614B120B4A -:10F2600092001433D218090E801C403AD56B6A46BE -:10F2700001ABA8476B461A79009920000DF344EEC4 -:10F2800001207CBD401C202804DA06214143515C4A -:10F290000029D4D100207CBDF8B50D0016001A005D -:10F2A0000021002D3DD0514C4F4F2034002833D049 -:10F2B00000060016401C40424401FF200B308242F1 -:10F2C0002FD3202C2DDA010028000DF3E4EEE0000E -:10F2D000C119FF222800521C0A300DF316EEFF2040 -:10F2E0000B30308013E0492813D106204843001921 -:10F2F0004088C000C1194888001F0404240C9442AF -:10F300000FD8091D220028000DF3FEED34800020E7 -:10F31000F8BD491C202904DA06204843205C002857 -:10F32000E1D10120F8BD002310B51A00837004E07C -:10F33000845CE3181B061B0E521C8A42F8D3012181 -:10F34000C91A817010BDFFB5C3B06846FFF76FFFE3 -:10F3500000282FD06B465C88449884422AD8002528 -:10F360006E4605E07059FCF27FFD439948512D1D12 -:10F37000A542F7D345982018FCF276FD43994860E2 -:10F3800043982100FFF7CFFF1848002720306BE09B -:10F39000090666D51549449B203140184088C100B4 -:10F3A0001148081881880A0B0E05360DA1199942DB -:10F3B000419202D9012047B0F0BD002AB76C4D2020 +:10EFC000F8B50D0016001A000021002D3DD0474C69 +:10EFD000454F2034002833D000060016401C404224 +:10EFE0004401FF200B3082422FD3202C2DDA010068 +:10EFF00028000EF350E8E000C119FF222800521C3F +:10F000000A300DF382EFFF200B30308013E04A28E6 +:10F0100013D10620484300194088C000C119488810 +:10F02000001F0404240C94420FD8091D220028005C +:10F030000DF36AEF34800020F8BD491C202904DA62 +:10F0400006204843205C0028E1D10120F8BD0023C0 +:10F0500010B51A00837004E0845CE3181B061B0ED5 +:10F06000521C8A42F8D30121C91A817010BDFFB524 +:10F07000C3B06846FFF76FFF00282FD06B465C884F +:10F08000449884422AD800256E4605E07059FCF267 +:10F09000EBFE439948512D1DA542F7D34598201802 +:10F0A000FCF2E2FE4399486043982100FFF7CFFF4E +:10F0B0000E48002720306AE0090665D50B49449BBD +:10F0C000203140184088C1000748081881880A0B81 +:10F0D0000E05360DA1199942419209D9012047B078 +:10F0E000F0BD000004F500C0003E01C0003F01C0BB +:10F0F000002A02D1801C42900EE06D4B9200310636 +:10F10000D218090E801C403AD56B40AA41ABA847E3 +:10F11000409840AB42901E79006880218843FCF201 +:10F12000A3FE43990425085109E04299A8088000EC +:10F130000858FCF299FE439A61192D1D5050B542B2 +:10F14000F3D35C497D1C02E0000607D46D1C202D22 +:10F1500004D206206843085C0028F5D10020C04393 +:10F16000202D07D006226A43895C002902D04598E9 +:10F17000A1190818FCF278FE0100439800194160BB +:10F180003100FFF764FFA4197F1C202F05D2062051 +:10F190007843484A115C00298ED1469804800020AB +:10F1A0009DE7FFB5FF2100240500491C424881B0BE +:10F1B0000DF346EF404A286808211060042029E03A +:10F1C0002B5CE340A41C9B0724069B0F240E082CF9 +:10F1D00003D1401C00240006000E032B12D12B5C2F +:10F1E000002C04D1401C0006000E53540FE0401CBC +:10F1F000E3400006000E082753542E5C3F1BBE4020 +:10F200001E4303E0FF26022B00D01E005654491C6B +:10F210000906090E029B9842D2D304980170039804 +:10F22000026004980078508005B059E7F7B50024D3 +:10F23000160022481F4F151DFC2A36D817E04A2910 +:10F2400010D1C0194088C1001C4809184888A8423C +:10F2500012D10198091D320012F034FC002801D1AE +:10F260000020FEBD641C2406240E202C04D206209F +:10F270006043395C0029E2D1114C4A2020703000F3 +:10F280000B30C008607001993200201D0DF33CEE78 +:10F290002904090C6180C91DC9082000FFF754FD2D +:10F2A000FF2802D0FFF796FDDAE70120FEBD00003F +:10F2B0001CF500C0203F01C0003C01C0003E01C061 +:10F2C000003D01C0AB4908220028C86801D01043A6 +:10F2D00000E09043C8607047A749002010B548601F +:10F2E000F5F7ABFC10BDF0B503252D03A148A34CE9 +:10F2F000C030C20D9302870C00299E4E016A0AD0CD +:10F3000011430162016A99430162A0682843A06029 +:10F310003068384309E091430162016A1943016290 +:10F32000A068A843A0603068B8433060F0BD38B52D +:10F3300005000024684605F01DFE00281AD0002DA7 +:10F340000BD16B465878C10714D0400612D5987877 +:10F350008007800F0CE001240CE0012D0AD16B46E0 +:10F360005878810706D5C00904D098788006800FA8 +:10F370000128F0D0200038BD73B56B4605005C79DC +:10F38000600705D57C484168002901D10121416011 +:10F390002800FFF7CCFF0106090E2800FFF7A3FFA6 +:10F3A000600703D46B461879000900D00120FFF7ED +:10F3B00089FF7CBD33B56B4600281979E2D3DAE4C6 :10F3C0000100000010EF000000040000476C6D54C5 -:10F3D00002D1801C429016E0074B92001433310694 -:10F3E000D218090E801C403AD56B40AA41ABA84701 -:10F3F000409840AB429005E0A0F200C0403F01C001 -:10F40000404001C01E79006880218843FCF236FD2F -:10F4100043990425085109E04299A808800008583A -:10F42000FCF22CFD439A61192D1D5050B542F3D3C7 -:10F430005A497D1C02E0000607D46D1C202D04D221 -:10F4400006206843085C0028F5D10020C043202D29 -:10F4500007D006226A43895C002902D04598A11989 -:10F460000818FCF20BFD01004398001941603100BF -:10F47000FFF763FFA4197F1C202F05D206207843D5 -:10F48000464A115C00298DD14698048000209CE7F3 -:10F49000FFB5FF2100240500491C414881B00DF350 -:10F4A000DAED3F4A286808211060042029E02B5C2F -:10F4B000E340A41C9B0724069B0F240E082C03D1B9 -:10F4C000401C00240006000E032B12D12B5C002CE4 -:10F4D00004D1401C0006000E53540FE0401CE340D2 -:10F4E0000006000E082753542E5C3F1BBE401E43EF -:10F4F00003E0FF26022B00D01E005654491C0906CB -:10F50000090E029B9842D2D30498017003980260BE -:10F5100004980078508005B0F0BDF7B500241600BF -:10F5200020481E4F151DFC2A36D817E0492910D156 -:10F53000C0194088C1001B4809184888A84212D148 -:10F540000198091D320012F0EBFB002801D10020C8 -:10F55000FEBD641C2406240E202C04D20620604329 -:10F56000395C0029E2D1104C4920207030000B306A -:10F57000C008607001993200201D0DF3D0EC290401 -:10F58000090C6180C91DC9082000FFF759FDFF283B -:10F5900002D0FFF79BFDDAE70120FEBD604001C00D -:10F5A000403D01C0403F01C0403E01C0AB49082280 -:10F5B0000028C86801D0104300E09043C86070473D -:10F5C000A749002010B54860F5F74BFA10BDF0B51B -:10F5D00003252D03A148A34CC030C20D9302870C14 -:10F5E00000299E4E016A0AD011430162016A9943C3 -:10F5F0000162A0682843A0603068384309E0914365 -:10F600000162016A19430162A068A843A0603068E2 -:10F61000B8433060F0BD38B505000024684605F0F9 -:10F6200063FE00281AD0002D0BD16B465878C10715 -:10F6300014D0400612D598788007800F0CE0012482 -:10F640000CE0012D0AD16B465878810706D5C00918 -:10F6500004D098788006800F0128F0D0200038BDB3 -:10F6600073B56B4605005C79600705D57C48416839 -:10F67000002901D1012141602800FFF7CCFF0106DC -:10F68000090E2800FFF7A3FF600703D46B46187923 -:10F69000000900D00120FFF789FF7CBD33B56B4620 -:10F6A0000028197902D10807000F02E0012813D1C0 -:10F6B00008096D4A6949D443803100280DD06B4B4D -:10F6C0006B4D01280DD0092810D00F2804D1C81780 -:10F6D000C8600861C86108623CBDCA600A61CC614B -:10F6E00002E0CB600A61CD610C623CBDCB60614839 -:10F6F0000861CD616048EEE7F0B50028047A4578EE -:10F70000067947792BD001290CD10599012909D116 -:10F71000012A06D16540D90700D06640990700D577 -:10F7200067402C00554B1968914200D01A6001784F -:10F730002A0609040A4321020A4348492243C031E8 -:10F740004A628279C37812041B021A4332438A62E6 -:10F75000C279807812043B021A430243CA62F0BDA8 -:10F7600038B505000024684605F0BEFD002803D129 -:10F77000280000F00FF838BD6B4618780007000F1E -:10F7800001D0012804D10099280000F038F80400C5 -:10F79000200038BD30B5002485B0050021002200CE -:10F7A000230001A804940EC06B46187C1C74587C7E -:10F7B000012108435874987C9C741C715C718020F2 -:10F7C0009C71D8711C725C729872D872C387C82EF3 +:10F3D00002D10807000F02E0012813D108096D4A85 +:10F3E0006949D443803100280DD06B4B6B4D012807 +:10F3F0000DD0092810D00F2804D1C817C8600861A3 +:10F40000C86108623CBDCA600A61CC6102E0CB60A1 +:10F410000A61CD610C623CBDCB6061480861CD6181 +:10F420006048EEE7F0B50028047A45780679477918 +:10F430002BD001290CD10599012909D1012A06D126 +:10F440006540D90700D06640990700D567402C0079 +:10F45000554B1968914200D01A6001782A060904B8 +:10F460000A4321020A4348492243C0314A62827951 +:10F47000C37812041B021A4332438A62C27980782D +:10F4800012043B021A430243CA62F0BD38B50500BC +:10F490000024684605F078FD002803D1280000F01C +:10F4A0000FF838BD6B4618780007000F01D001280F +:10F4B00004D10099280000F038F80400200038BD7D +:10F4C00030B5002485B0050021002200230001A8EA +:10F4D00004940EC06B46187C1C74587C01210843B0 +:10F4E0005874987C9C741C715C7180209C71D871DC +:10F4F0001C725C729872D8721C7304992800FFF712 +:10F5000045FF6B46997C28000091FFF75DFF6B4635 +:10F51000187C23000207120F00922200210001A88C +:10F52000FFF780FF012005B030BDF3B585B00025A1 +:10F5300007001E482E00406A2C006030C27A380056 +:10F5400002A905F03CFD00281CD006993800FFF701 +:10F550001DFF6B46997E38000191FFF735FF6B4622 +:10F56000587EC10601D4800600D501256B46187E61 +:10F5700023000207120F00923200290002A8FFF7B1 +:10F5800051FF012007B0F0BD00A7008020F500C0AA +:10F590000028008011DD55DD1FDF5FDFEF2FAF2F6B +:10F5A000F1FDF5FDFEF2FAF238040004F058000413 +:10F5B000F94910B5096812F056EB8905800A08432D +:10F5C00001D018F06CEA10BDF448016A0F22114313 +:10F5D00001620220ECE7F148016A090909010162B0 +:10F5E0000120E5E7EE4970B50868082290430860FD +:10F5F000EC4A506840084000506010690B210843F5 +:10F600001061E94908009369DB0601D4401EFAD273 +:10F610009069800601D4491EFAD212F039FDE349FF +:10F620000A6801246406A2430A60E04A8032136833 +:10F63000DF4D2B4013601368ED432B4313600A68C2 +:10F6400022430A6012F028FD0120FFF7B1FFFFF707 +:10F65000BBFFFFF74BFE70BD70B5F4F2F8EFD54D70 +:10F6600004002878022812D1A869401CA86120064D +:10F6700004D4D148F0F7A8FF18F07AEA802C02D120 +:10F68000F4F2E4EF70BD2000F4F2EAEF70BD6869B7 +:10F69000002805D0C8480A38F0F796FF18F068EA45 +:10F6A00002206C6128700120A861C44DAC888002E2 +:10F6B0000440A8886B26A043F600B042E6D00220A2 +:10F6C00000F06EFA0028E1D03443AC8070BDB94937 +:10F6D00010B58869401E88610CD1486900224A61D2 +:10F6E000FF2280280A7002D1F4F2B0EF10BDF4F2CC +:10F6F000B8EF10BD0028FCDAF4F2A8EFAE480938E4 +:10F70000F0F762FF18F034EA10BD70B5A94E7069C9 +:10F71000002807D012F0BCFCA7482438F0F754FFAB +:10F7200018F026EA12F0B4FCA44D7061AC880120F8 +:10F7300080020440A888A04382280BD02888F0804B +:10F74000002000F02DFA002804D0A8883081822003 +:10F750000443AC8070BD974910B5984A0B8948693D +:10F760009380CB88138000224A61FF220A7012F036 +:10F7700093FC10BD10B58F4C6069002807D012F0C3 +:10F7800087FC8D482338F0F71FFF18F0F2E912F0DC +:10F790007FFC8A49606188880122920210408A8831 +:10F7A0008243022A08D00A88E2801A220A808A88C4 +:10F7B000228102221043888010BD7E4910B57F4A05 +:10F7C0000B8948699380CB88138000221E3D6A16FE :10F7D000010000000CF3000000040000F8A948E755 -:10F7E0001C7304992800FFF745FF6B46997C28009D -:10F7F0000091FFF75DFF6B46187C23000207120F94 -:10F8000000922200210001A8FFF780FF012005B02F -:10F8100030BDF3B585B0002507001E482E00406AB4 -:10F820002C006030C27A380002A905F082FD002861 -:10F830001CD006993800FFF71DFF6B46997E3800F3 -:10F840000191FFF735FF6B46587EC10601D4800653 -:10F8500000D501256B46187E23000207120F009287 -:10F860003200290002A8FFF751FF012007B0F0BDC8 -:10F8700000A70080B8F200C00028008011DD55DD2F -:10F880001FDF5FDFEF2FAF2FF1FDF5FDFEF2FAF284 -:10F8900000000004E4580004F84910B5096812F0AB -:10F8A00010EB8905800A084301D018F0C8E810BDA4 -:10F8B000F348016A0F22114301620220ECE7F0488D -:10F8C000016A0909090101620120E5E7ED4970B506 -:10F8D0000868082290430860EB4A506840084000DE -:10F8E000506010690B2108431061E84908009369D2 -:10F8F000DB0601D4401EFAD29069800601D4491E6D -:10F90000FAD212F0F3FCE2490A6801246406A24329 -:10F910000A60DF4A80321368DE4D2B4013601368A3 -:10F92000ED432B4313600A6822430A6012F0E2FCA5 -:10F930000120FFF7B1FFFFF7BBFFFFF74BFE70BDE4 -:10F9400070B5F4F28EEED44D04002878022812D15E -:10F95000A869401CA861200604D4D048F0F73EFEF8 -:10F9600018F0D6E8802C02D1F4F27AEE70BD2000B7 -:10F97000F4F280EE70BD6869002805D0C7480A38E7 -:10F98000F0F72CFE18F0C4E802206C61287001200A -:10F99000A861C34DAC8880020440A8886B26A043B0 -:10F9A000F600B042E6D0022000F001FA0028E1D0D3 -:10F9B0003443AC8070BDB84910B58869401E886179 -:10F9C0000CD1486900224A61FF2280280A7002D1C6 -:10F9D000F4F246EE10BDF4F24EEE10BD0028FCDA53 -:10F9E000F4F23EEEAD480938F0F7F8FD18F090E873 -:10F9F00010BD70B5A84E7069002807D012F076FCD3 -:10FA0000A6482438F0F7EAFD18F082E812F06EFC00 -:10FA1000A34D7061AC88012080020440A888A043F7 -:10FA200082280BD02888F080002000F0C0F9002840 -:10FA300004D0A888308182200443AC8070BD9649F0 -:10FA400010B5974A0B8948699380CB8813800022B0 -:10FA50004A61FF220A7012F04DFC10BD10B58E4CA9 -:10FA60006069002807D012F041FC8C482338F0F779 -:10FA7000B5FD18F04EE812F039FC894960618888BC -:10FA80000122920210408A888243022A08D00A8802 -:10FA9000E2801A220A808A8822810222104388800A -:10FAA00010BD7D4910B57E4A0B8948699380CB888B -:10FAB000138000224A61FF220A7012F01BFC10BD65 -:10FAC00070B505000E00FBF25EFE754C20342581FA -:10FAD000FBF259FEA680FBF256FE70BD70B5050024 -:10FAE0000E00FBF250FE6E4C20342581FBF24BFEE3 -:10FAF000A680FBF248FE70BD70B50500FBF243FE28 -:10FB0000674C20342581FBF23EFE207970BD70B534 -:10FB100004000D00FFF7F0FF284301002000FFF76D -:10FB2000DDFF70BD70B504000D00FFF7E5FFA843D1 -:10FB300001002000FFF7D2FF70BD5748417800292F -:10FB400009D158490968012209044270090F0200CD -:10FB50002432515C8170807870474F4AD0780028F9 -:10FB600018D110614F48006811008007800F1031D4 -:10FB70000123002807D0012807D0022807D0032836 -:10FB800007D1402004E0202002E00B6001E01020BB -:10FB90000860D37010697047434B59681C22914329 -:10FBA00010400843586070473F4B5968FF22E132CC -:10FBB0009143104008435860704710B50C00FFF7A0 -:10FBC000F3FF2000FFF7E8FF37493848086010BD11 -:10FBD00031480179002901D1012101716BFCEF0C41 +:10F7E0004A61FF220A7012F061FC10BD70B505007D +:10F7F0000E00FBF2C8FF764C20342581FBF2C3FFDC +:10F80000A680FBF2C0FF70BD70B505000E00FBF2D4 +:10F81000BAFF6F4C20342581FBF2B5FFA680FBF2C6 +:10F82000B2FF70BD70B50500FBF2ADFF684C20342F +:10F830002581FBF2A8FF207970BD70B504000D0092 +:10F84000FFF7F0FF284301002000FFF7DDFF70BD48 +:10F8500070B504000D00FFF7E5FFA843010020008C +:10F86000FFF7D2FF70BD58484178002909D15949A6 +:10F870000968012209044270090F02002432515C18 +:10F88000817080787047504AD078002818D1106174 +:10F890005048006811008007800F103101230028B4 +:10F8A00007D0012807D0022807D0032807D140201D +:10F8B00004E0202002E00B6001E010200860D3701B +:10F8C00010697047444B59681C229143104008430B +:10F8D00058607047404B5968FF22E1329143104015 +:10F8E00008435860704770B50C00FFF7F3FF200025 +:10F8F000FFF7E8FF384D39482860FFF70FFA384E18 +:10F90000FF2822D06868304068602C683548044081 +:10F91000FFF704FA000702D5012080060443FFF731 +:10F92000FDF9400702D5012080040443FFF7F6F9F2 +:10F93000800702D50120C0040443FFF7EFF9C00798 +:10F9400002D00120C00604432C60FFF7EAF9FF282B +:10F9500020D0A8683040A8602C6823480440FFF7F6 +:10F96000E0F9000702D5012080020443FFF7D9F92E +:10F97000400701D504200443FFF7D3F9800701D5E0 +:10F9800008200443FFF7CDF9C00702D00120C002D0 +:10F9900004432C6070BD0C4910B5486900224A61CF +:10F9A000FF220A7012F082FB10BD0000DC2001C0B3 +:10F9B00080A1008000A3008040A600808813000082 +:10F9C00000210080FFEFFFEF28F500C05700010085 +:10F9D00000080090002000800029008004FB04FB48 +:10F9E000FDFF7FFFFFFFF3F3F3F3FFFF70B57B4CE9 +:10F9F0006069002806D012F055FB7948F0F7EEFD5B +:10FA000018F0C0E812F04EFB764D6061AC88012022 +:10FA100080020440A888B526A0433601B04206D033 +:10FA2000022000F0C7F8002801D03443AC8070BD3C +:10FA300010B56A4C207900280BD101202071FFF706 +:10FA4000D5FF0620FFF7EEFEC006C00F6071FFF77E +:10FA5000A2FF6079A8E7F8B50700FFF7E9FF624C5D +:10FA6000250D660D00280FD0FFF7C0FF802126204E +:10FA7000FFF7E3FEFFF78FFFA0682843A060A068B0 +:10FA80003043A060002006E0A068A843A060A06802 +:10FA9000B043A060380000F0C3F8F8BD10B5040012 +:10FAA000F5F72AFD00281ED15048C168090909014F +:10FAB0002143C1608168090909012143816082688D +:10FAC000010C0A4382600269120912012243026199 +:10FAD00002690A43026182690A4382614449A000C3 +:10FAE0000858444908605FE74048803800880006AD +:10FAF000000E70473D48803800683F498874010C0B +:10FB00003D48203801863D494969816370473A483C +:10FB100010B52038016A002000F057F844E7364855 +:10FB200010B520388169002000F04FF83CE73248DA +:10FB300010B5203841688161002000F046F833E7B5 +:10FB40002D4810B5203881688161002000F03DF813 +:10FB50002AE7294810B52038C1688161002000F0EB +:10FB600034F821E7244810B520380169816100206C +:10FB700000F02BF818E71D48214A01681143016085 +:10FB800070471A491E4A0868904308607047164932 +:10FB90008868CA0C9043886028E713488168C20CC3 +:10FBA00011438160F7E6002070470C48C068704739 +:10FBB0000020704710210A2803D208494000343140 +:10FBC000095A084801800120704708000A49203975 +:10FBD0004A69824201D0486160E77047E67B7C1A3F :10FBE0000100000008F7000000040000AB739B8BCD -:10FBF00040797047020010B5FFF7F4FF2F498039B4 -:10FC00000B0D0028886803D018438860002002E0AC -:10FC100098438860100000F003F910BD10B504008F -:10FC2000F5F795FB00281ED11E48C1680909090196 -:10FC30002143C1608168090909012143816082680B -:10FC4000010C0A4382600269120912012243026117 -:10FC500002690A43026182690A4382611949A0006C -:10FC600008580B49086010BD0E488038008800060F -:10FC7000000E70470B488038006813498874010CE7 -:10FC80001148203801861149496981637047000095 -:10FC90002C1D01C080A1008000A3008040A6008030 -:10FCA0008813000000210080FFEFFFEFC0F200C0CA -:10FCB000570001000008009000200080002900800B -:10FCC00004FB04FBF07902000459000400A8008042 -:10FCD000454810B5016A002000F07EF810BD42488A -:10FCE00010B58169002000F077F810BD3E4810B5CE -:10FCF00041688161002000F06FF810BD3A4810B5EE -:10FD000081688161002000F067F810BD364810B5A9 -:10FD1000C1688161002000F05FF810BD324810B565 -:10FD200001698161002000F057F810BD30482F4A6A -:10FD3000016811430160A9E72D492C4A08689043E6 -:10FD40000860A3E770B52B4C6069002806D012F05C -:10FD5000D7FA2948F0F74CFC17F0E4EE12F0D0FA8D -:10FD6000264D6061AC88012080020440A888B52639 -:10FD7000A0433601B04206D0022000F022F800284D -:10FD800001D03443AC8070BD1A4910B548690022D7 -:10FD90004A61FF220A7012F0B7FA10BD184988684C -:10FDA000CA0C90438860CDE715488168C20C1143A6 -:10FDB0008160E9E7002069E70E48C06866E7002037 -:10FDC00064E710210A2803D20A4940003431095A55 -:10FDD0000A480180012059E7080003494A69824224 -:10FDE00001D048611AE751E7E45800040008208870 -:10FDF00000210080C0F200C0370001000008009020 -:10FE0000802800800449034808600449001F0078E6 -:10FE10000870704704F300C0ACB90200A8B9020032 -:10FE200070B505002924FFF78DFF2000FFF76EFE57 -:10FE300029002000FFF75CFEFFF7A6FF70BD7047AA -:10FE40007047704710B5FFF7EBF8411C02D0000671 -:10FE5000000E10BD4A2010BD10B500F040F810BDD6 -:10FE600010B5FFF79BFF10210420FFF765FE01216D -:10FE70000520FFF761FEFFF797FF10BD10B5FFF7F4 -:10FE80008DFF10210420FFF74CFE01210520FFF714 -:10FE900048FEFFF789FF10BD10B50400FFF752FFC1 -:10FEA000002C15D0FFF763FE000702D42C21192087 -:10FEB00009E0A4211920FFF71BFE60211A20FFF79B -:10FEC00017FE6C212820FFF713FEFFF75DFF10BD22 -:10FED0000F211920FFF70CFEFE216620F3E7F8B58D -:10FEE0000024672712F0CCFF00283DD1FFF72AFF3E -:10FEF00004211620FFF720FE1C4D0621286811F072 -:10FF0000EAEF8905800A084301D017F0A2EDFFF758 -:10FF100099FF01001F20FFF7EBFD10212020FFF7C4 -:10FF200000FE7D26F6002868062111F0D4EF890531 -:10FF3000800A084301D017F08CED0920FFF7E6FD99 -:10FF4000641C000602D4B442EDD303E00820FFF79E -:10FF5000DDFD070010212020FFF7EEFD0421162013 -:10FF6000FFF7DFFDFFF710FF3800F8BD2C1D01C0C3 -:10FF700003490A7FD207FCD101492031088270472A -:10FF8000000800908C4A8B49116001608B48007812 -:10FF9000002800D001207047002804D00A2803D090 -:10FFA000102803D1032070470F20704701207047AD -:10FFB000F0B587B00E008446110018000D9D0C9C12 -:10FFC00000220E9B009604920390059201910290EC -:10FFD0002A0021006046F7F2C5FA002801D0FFF799 -:10FFE000DBFF07B0F0BD70B50C00150093162919A2 +:10FBF00028F500C037000100000800908028008030 +:10FC000000210080747A0200DC2001C01059000439 +:10FC100000A80080000820880449034808600449BF +:10FC2000001F0078087070476CF500C0ACB9020086 +:10FC3000A8B9020070B505002924FFF7E1FE2000F5 +:10FC4000FFF7FAFD29002000FFF7E8FDFFF7ADFE02 +:10FC500070BD7047704710B5FFF770F8411C02D0B7 +:10FC60000006000E10BD4A2010BD10B500F040F88F +:10FC700010BD10B5FFF795FF10210420FFF7F2FD2E +:10FC800001210520FFF7EEFDFFF791FF10BD10B534 +:10FC9000FFF787FF10210420FFF7D9FD0121052080 +:10FCA000FFF7D5FDFFF783FF10BD10B50400FFF788 +:10FCB000A7FE002C15D0FFF7F0FD000702D42C2181 +:10FCC000192009E0A4211920FFF7A8FD60211A20BE +:10FCD000FFF7A4FD6C212820FFF7A0FDFFF765FECC +:10FCE00010BD0F211920FFF799FDFE216620F3E7D3 +:10FCF000F8B50024672713F069F800283DD1FFF715 +:10FD00007FFE04211620FFF7ADFD1D4D062128685A +:10FD100011F0BCEF8905800A084301D017F0D2EE3C +:10FD2000FFF799FF01001F20FFF778FD1021202029 +:10FD3000FFF78DFD7D26F6002868062111F0A6EF5D +:10FD40008905800A084301D017F0BCEE0920FFF7AF +:10FD500073FD641C000602D4B442EDD303E0082016 +:10FD6000FFF76AFD070010212020FFF77BFD04212B +:10FD70001620FFF76CFDFFF718FE3800F8BD0000F5 +:10FD8000DC2001C003490A7FD207FCD101492031A0 +:10FD900008827047000800908C4A8B49116001600E +:10FDA0008B480078002800D001207047002804D03C +:10FDB0000A2803D0102803D1032070470F20704772 +:10FDC00001207047F0B587B00E008446110018007E +:10FDD0000D9D0C9C00220E9B0096049203900592B0 +:10FDE000019102902A0021006046F7F2BBFB002837 +:10FDF00001D0FFF7DBFF07B0F0BD70B50C001500B8 +:10FE0000049A19000A2C04D113002A00F4F28CFE83 +:10FE100001E0F4F2B5FC002801D0FFF7C7FF70BD88 +:10FE20007CB55A43040006980D001600002801AB6B +:10FE30000AD1002265480092006832000A21FFF7CB +:10FE4000DCFF002800D0FEE7019B012229002000F2 +:10FE50000096F6F26FFE002800D0FEE77CBD1FB5CD +:10FE6000002202A9F7F21CF9002801D0FFF79EFF3B +:10FE700004B010BD1A0010B5F7F244F8002801D004 +:10FE8000FFF794FF10BD534910B54968F6F2FCF82E +:10FE9000002801D0FFF78AFF10BD052A10B507D052 +:10FEA000062A05D0072A01D0082A02D1002200E044 +:10FEB0000222F6F2EBF9002801D0FFF777FF10BD20 +:10FEC00000B587B00B0003AA04A901921A000091A3 +:10FED00006A905ABF6F2B2F9002801D0FFF766FFDC +:10FEE00007B000BD7CB5060010001D000023069A77 +:10FEF000052801930BD0062807D0072803D008282F +:10FF000006D1012004E0002002E0032000E00220EE +:10FF100000920200300001ABF6F228F904000198CB +:10FF20001A2C286001D0072C08D129003000FFF7D7 +:10FF3000C7FF02201A2C00D021207CBD002C01D14B +:10FF400000207CBD2000FFF731FF7CBD0A0022A10C +:10FF500010B5F7F287F9002801D0FFF727FF10BD91 +:10FF600010B5F7F2F3F9002801D0FFF71FFF10BD1D +:10FF700010B5F7F2AFFA002801D0FFF717FF10BD58 +:10FF800038B51400049D1A000A2905D1130011493F +:10FF90002200F4F25BFE05E000920E4923002A00E5 +:10FFA000F4F272FC002801D0FFF700FF38BD0A29E7 +:10FFB00010B502D1F4F28EFE01E0F4F2B1FC00289B +:10FFC00001D0FFF7F3FE10BDE87F0200C87C0200FD +:10FFD000C47C02008CF500C04F53415F53656D61D6 +:10FFE0000000000070B505000C00000996269D0871 :10FFF0000100000004FB0000000400005F1CEE3F55 :020000021000EC -:10000000049A19000A2C04D113002A00F4F296FD78 -:1000100001E0F4F2BFFB002801D0FFF7C7FF70BD7D -:100020007CB55A43040006980D001600002801AB69 -:100030000AD1002265480092006832000A21FFF7C9 -:10004000DCFF002800D0FEE7019B012229002000F0 -:100050000096F6F279FD002800D0FEE77CBD1FB5C2 -:10006000002202A9F7F226F8002801D0FFF79EFF30 -:1000700004B010BD1A0010B5F6F24EFF002801D0F2 -:10008000FFF794FF10BD534910B54968F6F206F822 -:10009000002801D0FFF78AFF10BD052A10B507D050 -:1000A000062A05D0072A01D0082A02D1002200E042 -:1000B0000222F6F2F5F8002801D0FFF777FF10BD15 -:1000C00000B587B00B0003AA04A901921A000091A1 -:1000D00006A905ABF6F2BCF8002801D0FFF766FFD1 -:1000E00007B000BD7CB5060010001D000023069A75 -:1000F000052801930BD0062807D0072803D008282D -:1001000006D1012004E0002002E0032000E00220EC -:1001100000920200300001ABF6F232F804000198C0 -:100120001A2C286001D0072C08D129003000FFF7D5 -:10013000C7FF02201A2C00D021207CBD002C01D149 -:1001400000207CBD2000FFF731FF7CBD0A0022A10A -:1001500010B5F7F291F8002801D0FFF727FF10BD86 -:1001600010B5F7F2FDF8002801D0FFF71FFF10BD12 -:1001700010B5F7F2B9F9002801D0FFF717FF10BD4D -:1001800038B51400049D1A000A2905D1130011493D -:100190002200F4F265FD05E000920E4923002A00DA -:1001A000F4F27CFB002801D0FFF700FF38BD0A29DC -:1001B00010B502D1F4F298FD01E0F4F2BBFB002887 -:1001C00001D0FFF7F3FE10BD887F0200287C0200FB -:1001D000247C020024F300C04F53415F53656D61DE -:1001E0000000000070B505000C00000900F0DEF80A -:1001F00020702807000F00F0D9F8607070BDF8B5C6 -:1002000005000C000026022875D077DC002D74D084 -:10021000012D7FD120000CF3BDFF001967A111F063 -:100220003BFE20000CF3B6FF0719FFF727FD000681 -:10023000000E3900FFF7D6FF20000CF3ABFF0019CA -:1002400061A111F029FE20000CF3A4FF00195FA1A9 -:1002500011F022FE20000CF39DFF0719F4F7AAF914 -:100260003900FFF7BFFF20000CF394FF001928218D -:100270000170467020000CF38DFF0719F4F7A2F906 -:100280003900FFF7AFFF20000CF384FF00192E2187 -:100290000170467020000CF37DFF0719F4F79AF9FE -:1002A0003900FFF79FFF20000CF374FF001948A1ED -:1002B00011F0F2FD20000CF36DFF071903F072F945 -:1002C0003900FFF78FFF20000CF364FF001928218D -:1002D0000170467020000CF35DFF071903F05FF911 -:1002E0003900FFF77FFF20000CF354FF001929218C -:1002F000017046700EE01CE000E00EE00A2D51D0C7 -:10030000632D07D134480078582803D133492000A1 -:1003100011F0C2FD30480570F8BD30492000273982 -:1003200011F0BAFD20000CF335FF00192038867754 -:10033000F0E720002AA111F0AFFD20000CF32AFF06 -:10034000011929484078FFF74DFF20000CF322FFE8 -:1003500000192E270770467020000CF31BFF0119AF -:1003600021480078FFF73EFF20000CF313FF00192F -:100370001EA111F091FD20000CF30CFF01191E4885 -:100380004078FFF72FFF20000CF304FF00190770DF -:10039000467020000CF3FEFE011917480078FFF7A5 -:1003A00021FFB7E71549B2E7154870470A2801D27F -:1003B000303000E057300006000E70474368697027 -:1003C0005265763A000000002C20000042423A00BC -:1003D000292C2052463A00002CF300C0AC7A0200CF -:1003E0004F2E522E3A000000CDEF00C02020436176 -:1003F0006C204F2E522E3A00CEFB00C0B3DA71763D +:1000000000F0DEF820702807000F00F0D9F86070CB +:1000100070BDF8B505000C000026022875D077DC0D +:10002000002D74D0012D7FD120000DF3B3F80019FD +:1000300067A111F00DFE20000DF3ACF80719FFF7D2 +:1000400067FD0006000E3900FFF7D6FF20000DF314 +:10005000A1F8001961A111F0FBFD20000DF39AF841 +:1000600000195FA111F0F4FD20000DF393F80719BA +:10007000F4F79AFB3900FFF7BFFF20000DF38AF871 +:10008000001928210170467020000DF383F807192C +:10009000F4F792FB3900FFF7AFFF20000DF37AF879 +:1000A00000192E210170467020000DF373F8071916 +:1000B000F4F78AFB3900FFF79FFF20000DF36AF881 +:1000C000001948A111F0C4FD20000DF363F80719D1 +:1000D00003F0A8F83900FFF78FFF20000DF35AF85E +:1000E000001928210170467020000DF353F80719FC +:1000F00003F095F83900FFF77FFF20000DF34AF871 +:1001000000192921017046700EE01CE000E00EE0AD +:100110000A2D51D0632D07D134480078582803D1D7 +:100120003349200011F094FD30480570F8BD304986 +:100130002000283911F08CFD20000DF32BF8001958 +:1001400020388677F0E720002AA111F081FD2000F9 +:100150000DF320F8011929484078FFF74DFF2000E2 +:100160000DF318F800192E270770467020000DF3C4 +:1001700011F8011921480078FFF73EFF20000DF328 +:1001800009F800191EA111F063FD20000DF302F81B +:1001900001191E484078FFF72FFF20000CF3FAFFEB +:1001A00000190770467020000CF3F4FF011917487E +:1001B0000078FFF721FFB7E71549B2E71548704708 +:1001C0000A2801D2303000E057300006000E704798 +:1001D000436869705265763A000000002C200000E8 +:1001E00042423A00292C2052463A000094F500C0C1 +:1001F0004D7B02004F2E522E3A0000003DF200C00F +:10020000202043616C204F2E522E3A00FEFD00C08C +:10021000FCF100C024440EC907E003788B4207D0EC +:100220004378801CD21A921E1818022AF5DA002090 +:10023000704700000448C1690029FCD0816A04228B +:10024000114381627047000000340080074800219C +:1002500010B50068C94312F0DDFD002010BD034851 +:1002600010B5006812F0DDFD10BD00006C2201C069 +:1002700070B511F02BFF0500FF48FBF257FD04009D +:1002800009D02000542108300CF302EFFA48210075 +:100290000C30FBF275FD280011F01CFF200070BD32 +:1002A00070B5040011F012FF0500002C0DD02000E5 +:1002B000542108300CF3ECEEEF4821000C30FBF237 +:1002C0009DFD0100EC48FBF25BFD280011F002FFF0 +:1002D00070BD10B5F1F7E9F9002010BD7047704707 +:1002E000002803D02030407E0007C00F7047002850 +:1002F00007D02030427EF723C9071A40090F0A436E +:1003000042767047002807D02030827EFB23C90741 +:100310001A40490F0A4382767047002806D0C26807 +:10032000C90752085200C90F0A43C260704700282B +:1003300006D0C2680223C9079A43890F0A43C260E4 +:100340007047002806D0C2681023C9079A43C90E17 +:100350000A43C2607047F8B500250E0017002C0054 +:10036000002824D0092189014218D16A002901D02E +:100370000D000835516A002901D00C000834330003 +:10038000220029000097FDF205F9002E06D0002D6D +:1003900004D0280048210C300CF37AEE002F06D050 +:1003A000002C04D0200048210C300CF372EEF8BD74 +:1003B00070B50400006800280BD0806D002500286F +:1003C00003D0FFF76DFF206885652068FFF768FFA1 +:1003D000256070BDF8B5040015F09FF8200015F0F9 +:1003E00075F8210020314B7EF72213404B76E568EB +:1003F0000426B5432122E560125C970701F2809A3A :100400000100000000FF0000000400000CC63D5386 -:100410008CEF00C024440E1108E003788B4208D012 -:100420004378801C18184378D21A921E022AF4DAF4 -:10043000002070470448C1690029FCD0816A042269 -:10044000114381627047000000340080074800219A -:1004500010B50068C94312F041FD002010BD0348EB -:1004600010B5006812F041FD10BD0000AC1E01C0C7 -:1004700070B511F059FF0500FF48FBF261FC040064 -:1004800009D02000542108300CF30CEEFA4821006A -:100490000C30FBF27FFC280011F04AFF200070BDF9 -:1004A00070B5040011F040FF0500002C0DD02000B5 -:1004B000542108300CF3F6EDEF4821000C30FBF22C -:1004C000A7FC0100EC48FBF265FC280011F030FFAE -:1004D00070BD10B5F1F789F8002010BD7047704766 -:1004E000002803D02030407E0007C00F704700284E -:1004F00007D02030427EF723C9071A40090F0A436C -:1005000042767047002807D02030827EFB23C9073F -:100510001A40490F0A4382767047002806D0C26805 -:10052000C90752085200C90F0A43C2607047002829 -:1005300006D0C2680223C9079A43890F0A43C260E2 -:100540007047002806D0C2681023C9079A43C90E15 -:100550000A43C2607047F8B500250E0017002C0052 -:10056000002824D00521C90142181169002901D0B1 -:100570000D000835D168002901D00C000834330083 -:10058000220029000097FDF20FF8002E06D0002D62 -:1005900004D0280048210C300CF384ED002F06D045 -:1005A000002C04D0200048210C300CF37CEDF8BD69 -:1005B00070B50400006800280BD0806D002500286D -:1005C00003D0FFF76DFF206885652068FFF768FF9F -:1005D000256070BDF8B5040014F0B1FF200014F0E0 -:1005E00087FF210020314B7EF72213404B76E568D0 -:1005F0000426B5432122E560125C97070AD505223F -:10060000D201C56FA218D560C06F106108200343E6 -:100610004B7605E0100701D4900601D53543E5601F -:10062000200017F044EB0020F8BD10B504000200D4 -:100630008034206800280FD0C17B20320907090FC1 -:1006400001290AD0022908D0032905D15078C00910 -:1006500002D12000FFF7ACFF10BD51780A07FBD490 -:100660008906F9D4FFF71CFF0020206010BD70B58B -:1006700014001D0000290AD0012809D0022801D049 -:10068000042804D10A00290020000CF370EC70BD8E -:100690001022290020000CF36AEC103520000822FB -:1006A000290010300CF362EC2900083108222000E8 -:1006B0001830EAE7FFB500208FB00E001400189F35 -:1006C0001D00002B0A9004D0E8790007000F2030AD -:1006D000E871002C04D0E0790007000F2030E071B1 -:1006E000002F04D0F8790007000F2030F8712100A6 -:1006F000F37A0C310E9129000C310D91210030005C -:1007000040310E300C910CF34EEE05048080FA80DF -:100710007F000700002C77D0002DFCD0B07A042891 -:1007200072D2707B317B000208434007A07A02D569 -:100730000121084301E040084000A072E079F17A0D -:10074000000909070001090F0843E071787839783A -:100750000002084320810320A0710C98B27A012185 -:10076000407A914008430C990D224872B07AB91C26 -:100770000301181A00190C300990801C0CF3F6EBD9 -:1007800078783978000208430D28E07A06D10821EC -:100790000843E07209980121417005E0F721084003 -:1007A000E0720999002048700998B17A0170707B55 -:1007B000317B00020843000702D50C98B17A017220 -:1007C000A07AC0071FD00F980121C06802220843F9 -:1007D00010430F9AD060A87AC20702D0EA791207B4 -:1007E00011D10843A872E8793F2200090001E8719D -:1007F0000320A871787839780002084328810E997F -:100800000D980CF31EEC1BE2F0E10990F27CB0CAEB +:100410000AD509229201C56FA2185562C06FD06239 +:10042000082003434B7605E0100701D4900601D560 +:100430003543E560200017F078EC0020F8BD10B5DA +:10044000040002008034206800280FD0C17B2032D5 +:100450000907090F01290AD0022908D0032905D16B +:100460005078C00902D12000FFF7ACFF10BD5178D1 +:100470000A07FBD48906F9D4FFF71CFF002020608F +:1004800010BD70B514001D0000290AD0012809D044 +:10049000022801D0042804D10A00290020000CF30E +:1004A00066ED70BD1022290020000CF360ED1035C0 +:1004B00020000822290010300CF358ED29000831E3 +:1004C000082220001830EAE7FFB591B00B200E009B +:1004D000800111991A9F0818109040690C90002013 +:1004E00014001D00002B0B9004D0E8790007000FCA +:1004F0002030E871002C04D0E0790007000F203094 +:10050000E071002F04D0F8790007000F2030F87157 +:100510002100F37A0C310F9129000C310E9121004A +:10052000300040310E300D910CF33CEF05047E7E1F +:10053000F37E7D000700002C75D0002DFCD0B07A32 +:10054000042870D2707B317B000208434007A07AF8 +:1005500002D50121084301E040084000A072E07983 +:10056000F17A000909070001090F0843E071787862 +:1005700039780002084320810320A0710D98B27AD7 +:100580000121407A914008430D990D224872B07ABA +:10059000B91C0301181A00190C300A90801C0CF3C6 +:1005A000E6EC78783978000208430D28E07A04D127 +:1005B000082108430121E07203E0F72108400021EF +:1005C000E0720A9841700A98B17A0170707B317BB1 +:1005D00000020843000702D50D98B17A0172A07A93 +:1005E000C0071FD011980121C068022208431043A0 +:1005F000119AD060A87AC20702D0EA79120711D105 +:100600000843A872E8793F2200090001E87103203D +:10061000A871787839780002084328810F990E98DC +:100620000CF30EED1EE2F3E1002D0A9072D0707B08 +:10063000317B0002084381076CD54007A87A02D5B8 +:100640000121084301E040084000A872E879F17AEE +:10065000000909070001090F0843E8710A98417A67 +:10066000027A0802104328810320A871B17A502031 +:1006700041550121E972A87AC00754D0119803218D +:10068000C06808431199C860002001E0BC940200D2 +:10069000431E2886EB621199132252018918888320 +:1006A00011990922920189188B630100119B4A005C +:1006B000D21815235B010020D2181083431E119A13 +:1006C000880080180522D2018018491C0429836201 +:1006D000ECDB00206863012028871198407A02280B +:1006E00043D1119814F0FCFE0990119814F01FFFEB +:1006F00009992031497889060DD5109949698031C9 +:100700000979C90707D080308068002803D001210B +:1007100002E0E5E01BE00021119801F09CFEA87AC0 +:10072000FD210840A87210984069FF306130407E7A +:10073000002801D001200B900A980A9B417A007A88 +:1007400009020143F07A0E9A0A33FFF79AFE002C51 +:1007500069D0707B317B00020843C10763D040073A +:10076000A07A06D50121084305E0A87A02210843B2 +:10077000D8E740084000A072E079F17A0009090743 +:100780000001090F0843E0710A98417A027A0802D1 +:10079000104320810320A0710D99B07A0874E07A8B +:1007A00002210843E072A07AC0072AD0707B317B17 +:1007B00000020843800614D50A9920000A782030E8 +:1007C0000274497841740A990422891C0C300CF394 +:1007D000CEEB208E002804D1E06A002801D1401E13 +:1007E000E062707B317B00020843C00603D5002025 +:1007F00060630120208711980321C0680843119984 +:10080000C8600C9880300079C00701D169F86F6921 :1008100001000000FC020100000400000E903B7A81 -:100820000F980B2189014018002D0B9072D0707B1E -:10083000317B0002084381076CD54007A87A02D5B6 -:100840000121084301E040084000A872E879F17AEC -:10085000000909070001090F0843E8710998417A66 -:10086000027A0802104328810320A871B17A50202F -:1008700041550121E972A87AC00754D00F9803218D -:10088000C06808430F99C860002001E01C96020070 -:10089000421E2886EA620F9915235B01C918088059 -:1008A0000F980521C9014018C26100200F9943002B -:1008B0005B180B21890100225B189A83511E0F9B44 -:1008C0008200D2180B239B01D218401C0428D1604F -:1008D000ECDB00206863012028870F98407A02280B -:1008E0003AD10F9814F00EFE08900F9814F031FED4 -:1008F00008992031497889060DD50B99896B4031CB -:10090000097EC90707D080308068002803D0012104 -:1009100002E0DDE012E000210F9801F076FEA87AF7 -:10092000FD210840A8720998099B417A007A0902C2 -:100930000143F07A0D9A0A33FFF7A3FE002C6AD028 -:10094000707B317B00020843C10764D04007A07A66 -:1009500006D50121084305E0A87A02210843E1E712 -:1009600040084000A072E079F17A0009090700010F -:10097000090F0843E0710998417A027A080210438E -:1009800020810320A0710C99B07A0874E07A0221CA -:100990000843E072A07AC0072AD0707B317B000246 -:1009A0000843800614D5099920000A782030027483 -:1009B0004978417409990422891C0C300CF3E0EA4F -:1009C000208E002804D1E06A002801D1401EE06298 -:1009D000707B317B00020843C00603D500206063B2 -:1009E000012020870F980321C06808430F99C86031 -:1009F0000B98806B4030007EC00701D101200A9027 -:100A00000998099B417A007A09020143F07A0E9A0B -:100A10000A33FFF736FE002F7DD0707B317B00025A -:100A20000843410577D54007B87A02D5012108432C -:100A300001E040084000B872F879F17A000909072E -:100A40000001090F0843F8710998417A027A0802F7 -:100A5000104338810320B871B17A5020C155F87A1B -:100A600040210843F872B87AC00724D0707B317BEC -:100A700000020843800614D5099938000A7820300E -:100A800002744978417409990422891C0C300CF3D2 -:100A900078EA388E002804D1F86A002801D1401E77 -:100AA000F862707B317B00020843C00603D500204A -:100AB0007863012038870998099B417A007A0902F6 -:100AC00001433A00F07A0A330C32FFF7DAFDBDE059 -:100AD0000021089004A80991FFA78ECF8EC00021A5 -:100AE0000A000B000F0068468EC0707B317B00024D -:100AF0000843810700D50995C00700D009940998DB -:100B000000287DD00998807AC00712D00998006D1E -:100B1000002807D100E096E0FFF7B4FC099900280F -:100B2000086506D009980999006D542208300CF325 -:100B300092EA0F990124497A2000022900D000206E -:100B4000717B327B0902114389071FD5002809D028 -:100B50000F981021C0686B4608430F99C860187C35 -:100B6000401C187409980521C1720F990998FF312A -:100B7000062272310CF304EA0F980F9AC068022122 -:100B800020430843D060099820304173707B317B4B -:100B900000020843C0070BD009991220C8720998B7 -:100BA00006210CF38AEA09982030447301200A9048 -:100BB0000998F17AC079090700090001090F084373 -:100BC0000999C8710998032181710898417C027CB8 -:100BD000080209991043088108991022684611F00B -:100BE000D1F800280DD1099810222E3004A90CF359 -:100BF000C8E9099810223E3004A90CF3C2E90CE0C0 -:100C000035E00998089910222E30FEF299FD0998D6 -:100C1000089910223E30FEF293FD0998CAA6C582BB +:1008200001200B900A980A9B417A007A0902014341 +:10083000F07A0F9A0A33FFF72EFE002F7DD0707BDF +:10084000317B00020843410577D54007B87A02D5CD +:100850000121084301E040084000B872F879F17ABC +:10086000000909070001090F0843F8710A98417A45 +:10087000027A0802104338810320B871B17A5020FF +:10088000C155F87A40210843F872B87AC00724D0DD +:10089000707B317B00020843800614D50A9938002A +:1008A0000A7820300274497841740A990422891C1C +:1008B0000C300CF366EB388E002804D1F86A00285F +:1008C00001D1401EF862707B317B00020843C006F4 +:1008D00003D500207863012038870A980A9B417A63 +:1008E000007A090201433A00F07A0A330C32FFF72A +:1008F000D2FDBDE00021099005A80A91FFA78ECF87 +:100900008EC000210A000B000F0001A88EC0707B72 +:10091000317B00020843810700D50A95C00700D04B +:100920000A940A9800287DD00A98807AC00712D0CD +:100930000A98006D002807D100E096E0FFF7ACFCB4 +:100940000A990028086506D00A980A99006D542271 +:1009500008300CF380EB11990124497A2000022918 +:1009600000D00020717B327B0902114389071FD51B +:10097000002809D011981021C0686B4608431199CE +:10098000C860187D401C18750A980521C17211991C +:100990000A98FF3106224A310CF3F2EA1198119AB3 +:1009A000C068022120430843D0600A982030417378 +:1009B000707B317B00020843C0070BD00A981221DC +:1009C000C1720A9806210CF378EB0A982030447320 +:1009D00001200B900A98F17AC079090700090001FB +:1009E000090F08430A99C8710A980321817109986F +:1009F000417C027C08020A9910430881099910225F +:100A000001A811F09BF800280DD10A9810222E3071 +:100A100005A90CF3B6EA0A9810223E3005A90CF39A +:100A2000B0EA0CE035E00A98099910222E30FEF267 +:100A300087FE0A98099910223E30FEF281FE0A983C +:100A4000B17A017309990A98102212311D300CF302 +:100A500098EA09990A98102222310D300CF390EA95 +:100A60000A980A99807A204388720B98002803D04C +:100A700011980021FDF7EAFAFCF71BFD002D05D0C7 +:100A8000A87AC00702D0119817F058E9002015B0D5 +:100A9000F0BD0120FBE7F7B582B0002702983E00C9 +:100AA000019714F027FD0299029B0922497A9201CD +:100AB0009C1802292AD1050020304078C10903D1B1 +:100AC000010701D480064AD52F00803738680028F6 +:100AD00004D1FFF7E1FB002838600ED03F68676261 +:100AE0000298083701F0DEFC00280AD0FFF7D4FB9B +:100AF000852189000028485103D10020C04305B05A +:100B0000F0BDFF35FF35AD1C686923E003290ED128 +:100B1000A06A002803D1FFF7BFFBA06207E0616A6B +:100B2000002907D00831083054220CF394EA606A97 +:100B3000002804D1FFF7B0FB0028606201D0676A8B +:100B40000837029801F0AEFC002801D1206B02E0CA +:100B5000FFF7A2FB2063002801D008300190E06A73 +:100B6000002804D1FFF798FB0028E06201D0E66A74 +:100B70000836019A00920499029833003A00FFF770 +:100B8000ADFCBCE770B505000C000026081D0AF09E +:100B900016F9002815D1201D0AF002F9002810D1FD +:100BA0005920C00029180622201D10F0C7FF002878 +:100BB00007D0201D14F01EFD050001D1012070BDDD +:100BC0000126220031002800FFF765FF70BDFFB548 +:100BD00089B004001F00129E002E77D0002CFCD09C +:100BE0002000403008902338079010380690401EAF +:100BF000059010300490083003903801C01B001994 +:100C0000029020003E30FF29019004D1E0790009D4 +:100C10000228E2D0E8E00229FCD1FF2022D910010D :100C200001000000F8060100000400005D4AE8161B -:100C3000B17A017308990998102212311D300CF312 -:100C4000AAE908990998102222310D300CF3A2E983 -:100C500009980999807A204388720A98002803D05D -:100C60000F980021FDF7B0FBFCF79CFD002D05D08F -:100C7000A87AC00702D00F9817F02CE8002013B014 -:100C8000F0BD0120FBE7F7B582B0002702983E00D7 -:100C9000019714F041FC0299029A4B7A0521C9018F -:100CA0005418022B2AD1050020304078C10903D105 -:100CB000010701D4800639D52F0080373868002815 -:100CC00004D1FFF7E9FB002838600ED03F68E760E9 -:100CD0000298083701F0C0FC00280AD0FFF7DCFBBF -:100CE000852189000028485103D10020C04305B068 -:100CF000F0BDFF35FF35AD1C686912E0E0680028E3 -:100D000004D1FFF7C9FB0028E06001D0E76808378D -:100D1000029801F0A1FC002801D1606902E0FFF710 -:100D2000BBFB6061002801D00830019020690028D9 -:100D300004D1FFF7B1FB0028206101D026690836F5 -:100D4000019A00920499029833003A00FFF7C6FC1A -:100D5000CDE770B505000C000026081D0AF025FA45 -:100D6000002815D1201D0AF011FA002810D1BB204F -:100D7000800029180622201D11F00EF8002807D047 -:100D8000201D14F042FC050001D1012070BD012698 -:100D9000220031002800FFF776FF70BDFFB589B053 -:100DA00004001F00129E002E77D0002CFCD02000E3 -:100DB000403008902338079010380690401E059068 -:100DC00010300490083003903801C01B00190290C5 -:100DD00020003E30FF29019004D1E079000902286B -:100DE000E2D0E8E00229FCD1FF209D303070000AFB -:100DF00070700A20B0700020F0700B990622301D30 -:100E00000CF3C8E8E0790007000FF072E07A4106C1 -:100E100002D50121890204E0800701D5012100E00B -:100E200002213173090A7173E07903071B0F300047 -:100E3000190010300CF3CAEA0504323232323100A4 -:100E4000042F2AD2B7720899097AB94208D1717B66 -:100E5000327B09021143082211433173090A71736D -:100E60000299497B002901D1052100E00D21B173D0 -:100E7000090AF173F17BB37B0A0202991A430E311E -:100E80000CF388E8F078B2780102F07B1143B27B72 -:100E9000000210430818801C35E02EE13500303583 -:100EA000032948D1217BB1722021070081730020E2 -:100EB000F87330000E300199102200900CF36AE8AC -:100EC00030000799102220300CF364E806991022B4 -:100ED00028000CF360E8019900981022FEF23AFC19 -:100EE000F078B17800020843F97B07E0365C365CA5 -:100EF000365C365C365C365C365C365CBA7B090246 -:100F0000114340181230B070000AF070A07AC00788 -:100F100008D0707B317B0002084304210843307302 -:100F2000000A7073F078B17800020843001D0004D5 -:100F3000000C0DB0F0BD08990A7CB2722289B2751E -:100F4000120AF275228E21001378B3735278F2736D -:100F500004222C310CF31EE8002131757175E07903 -:100F600001073000090F1830012911D12021B17576 -:100F70000021F175059910220CF30CE8300004995A -:100F8000082228300CF306E808220399280005E01F -:100F90002189B175090AF175228905990BF3FAEFD8 -:100FA000F078B2780102F07D1143B27D0002104367 -:100FB00008180A30A7E7E079351D0007000F3071E7 -:100FC000000A7071FF20401C3070000A002270700F -:100FD000B270F270E07A410602D50120800204E08E -:100FE000800701D5012000E00220A870000AE87007 -:100FF000E07901071ED1A81D042F7ED22189297115 -:10100000090A69710899097AB94202D1012141702E -:1010100000E042700770029922890E31801C0BF3A8 -:10102000BAEFF178B07809020143891C157A674E4E +:100C30009D303070000A70700A20B0700020F07093 +:100C40000B990622301D0CF3A6E9E0790007000F8E +:100C5000F072E07A410602D50121890204E08007A2 +:100C600001D5012100E002213173090A7173E07995 +:100C700003071B0F3000190010300CF3A8EB05041C +:100C8000323232323100042F2AD2B7720899097AEF +:100C9000B94208D1717B327B09021143082211430A +:100CA0003173090A71730299497B002901D1052129 +:100CB00000E00D21B173090AF173F17BB37B0A02E5 +:100CC00002991A430E310CF366E9F078B27801020A +:100CD000F07B1143B27B000210430818801C35E002 +:100CE0002EE135003035032948D1217BB172202116 +:100CF000070081730020F87330000E300199102234 +:100D000000900CF348E9102230000799203007E0EA +:100D1000365C365C365C365C365C365C365C365C43 +:100D20000CF338E90699102228000CF334E90199F4 +:100D300000981022FEF20EFDF078B1780002084310 +:100D4000F97BBA7B0902114340181230B070000AD7 +:100D5000F070A07AC00708D0707B317B0002084396 +:100D6000042108433073000A7073F078B1780002F0 +:100D70000843001D0004000C0DB0F0BD08990A7C6A +:100D8000B2722289B275120AF275228E210013788E +:100D9000B3735278F27304222C310CF3FCE8002177 +:100DA00031757175E07901073000090F183001299C +:100DB00011D12021B1750021F175059910220CF394 +:100DC000EAE830000499082228300CF3E4E808220D +:100DD0000399280005E02189B175090AF175228976 +:100DE00005990CF3D8E8F078B2780102F07D114350 +:100DF000B27D0002104308180A30A7E7E079351DDC +:100E00000007000F3071000A7071FF20401C307025 +:100E1000000A00227070B270F270E07A410602D5CA +:100E20000120800204E0800701D5012000E00220BB +:100E3000A870000AE870E07901071ED1A81D042FF0 +:100E40007ED221892971090A69710899097AB94202 +:100E500002D10121417000E042700770029922899D +:100E60000E31801C0CF396E8F178B078090201434A +:100E7000891CB170090AF17041E00007000F0128D8 +:100E800013D1202028710020687105991022A81D17 +:100E90000CF380E828000499082216300CF37AE855 +:100EA0000822280003991E300AE0022801D00428F5 +:100EB00009D1102028710020687105991022A81D01 +:100EC0000CF368E81BE0032853D120892871000A3D +:100ED0006871207BA8710120E871AF1D079910226D +:100EE000B81C0CF358E838000699102212300CF3A5 +:100EF00052E83800019910222230FEF22BFCA07A31 +:100F0000C00708D0E878A978000208430421084304 +:100F1000A870000AE870F178B27808026979104385 +:100F20002A79090211434018801D020AB070001D81 +:100F30000504F270E0792D0C000718D0741900E058 +:100F400017E0FF2121312170090A61700621A1708B +:100F50000021E1700B990622201D0CF31CE8E178BA +:100F6000A278080210432D1D401905042D0C2800FD +:100F700002E7002000E7FFB581B0002501980A9E36 +:100F8000C079000718D1042B16D3019F00244037E5 +:100F90000120797AA04001420AD0230601A80096D8 +:100FA00007C81B0EFFF71DFE3618281805042D0C68 +:100FB000641C042CECDB05E001A8009607C8FFF7D1 +:100FC00010FE05002800A4E5FFB583B0002405004D +:100FD0001E00C0680D9F40051DD5287A01281AD033 +:100FE000022818D1280014F08FFA0599002912D18F +:100FF000002810D08030006800280CD0F1073FD0C6 +:101000005921C9006A180499083000230097FFF796 +:10101000E8FD040034E02800FF304A300290092047 +:101020008001B1072D1800290BDAE86A264179946E :1010300001000000F40A010000040000A9259DA29F -:10104000B170090AF17041E00007000F012813D1C7 -:10105000202028710020687105991022A81D0BF32B -:10106000A4EF28000499082216300BF39EEF082203 -:10107000280003991E300AE0022801D0042809D173 -:10108000102028710020687105991022A81D0BF30B -:101090008CEF1BE0032853D120892871000A687166 -:1010A000207BA8710120E871AF1D07991022B81CA0 -:1010B0000BF37AEF38000699102212300BF374EF1D -:1010C0003800019910222230FEF24EFBA07AC007B0 -:1010D00008D0E878A9780002084304210843A870E2 -:1010E000000AE870F178B2780802697910432A7929 -:1010F000090211434018801D020AB070001D05044A -:10110000F270E0792D0C000718D0741900E017E098 -:10111000FF2121312170090A61700621A17000218F -:10112000E1700B990622201D0BF33EEFE178A278C7 -:10113000080210432D1D401905042D0C280002E75C -:10114000002000E7FFB581B0002501980A9EC07914 -:10115000000718D1042B16D3019F0024403701202B -:10116000797AA04001420AD0230601A8009607C858 -:101170001B0EFFF71DFE3618281805042D0C641CE5 -:10118000042CECDB05E001A8009607C8FFF710FE71 -:1011900005002800B5E5FFB583B0002405001E005A -:1011A000C0680D9F40051DD5287A01281AD0022855 -:1011B00018D1280014F0BAF90599002912D1002895 -:1011C00010D08030006800280CD0F1073FD0BB2140 -:1011D00089006A180499083000230097FFF7E8FD9A -:1011E000040034E02800FF30723002900520C00176 -:1011F000B1072D1800290BDA2869002808D00C9BAC -:10120000029A049908300097FFF79CFF3F180400EA -:10121000F0070DD0E86800280AD00C9B029A0499C8 -:1012200008300097FFF78EFF3F1820180404240CA5 -:1012300070050CD56869002809D00C9B029A0499A6 -:1012400008300097FFF77EFF20180404240C2000CC -:1012500007B0F0BDFFB587B0FF2100261F00089C36 -:10126000CC4B35003000062C059607D202000798BB -:1012700001970091FFF78FFF06007BE0140071E0FB -:10128000C4480490FF2003900020029060782178E9 -:1012900000020843C11FF9390FD10399019700914A -:1012A000E179A0790B020343029A07980021FFF726 -:1012B00072FF05003F18301844E00100FF399D39E6 -:1012C00042D107980690E078A178000208430628EA -:1012D00029D3201D09F073FF002814D1201D09F027 -:1012E0005FFF00280FD10798BB2189004118062213 -:1012F000201D10F05BFD002805D0201D14F08FF993 -:10130000069001200290E178A278080210430A2892 -:1013100009D3A07A0390627B237B9E481102194374 -:1013200000D0080004900698002809D0039901977E -:101330000091049B029A06980221FFF72CFF0500FA -:101340007F1970190604360CE078A1780002084372 -:1013500005998300091D41180904090C181804197E -:101360001434059108990598884203D21920800108 -:10137000864285D330000BB0F0BD70B5060004681E -:101380000834E07903071B0F934201D0012070BDA0 -:10139000000712D1042910D2250040350122687AB5 -:1013A0008A40904368720801401A00190C300F21DE -:1013B0000BF3C0EE687A002804D13068FFF78EF88E -:1013C00000203060002070BDFFB581B00400002017 -:1013D0001D000A9F0090E06800264005002827DADB -:1013E000207A012824D0022801D0032820D120000F -:1013F00014F09CF8217A032902D1617A022917D1CD -:10140000002F15D1002813D0803007000068002875 -:101410000ED0E9074CD0C17B0A070399120F8A420C -:1014200002D00399FF2943D1FFF758F83E603FE00F -:1014300005210298C9016718FF2815D109BAF5A43A +:10104000002808D00C9B029A049908300097FFF7FB +:101050009CFF3F180400F0070DD0686A00280AD0F2 +:101060000C9B029A049908300097FFF78EFF3F18F7 +:1010700020180404240C70050CD5286B002809D016 +:101080000C9B029A049908300097FFF77EFF201806 +:101090000404240C200007B0F0BDFFB587B0FF2189 +:1010A00000261F00089CD04B35003000062C05960A +:1010B00007D20200079801970091FFF78FFF060003 +:1010C0007BE0140071E0C8480490FF2003900020EA +:1010D00002906078217800020843C11FF9390FD1CE +:1010E000039901970091E179A0790B020343029AD9 +:1010F00007980021FFF772FF05003F18301844E001 +:101100000100FF399D3942D107980690E078A17817 +:1011100000020843062829D3201D09F064FE002898 +:1011200014D1201D09F050FE00280FD10798592135 +:10113000C90041180622201D10F014FD002805D01A +:10114000201D14F06BFA069001200290E178A2783D +:10115000080210430A2809D3A07A0390627B237BFC +:10116000A1481102194300D00800049006980028F5 +:1011700009D0039901970091049B029A06980221D5 +:10118000FFF72CFF05007F1970190604360CE07874 +:10119000A1780002084305998300091D411809043C +:1011A000090C1818041914340591089905988842F7 +:1011B00003D219208001864285D330000BB0F0BDE8 +:1011C00070B5060004680834E07903071B0F9342EA +:1011D00001D0012070BD000712D1042910D22500D2 +:1011E00040350122687A8A40904368720801401AAB +:1011F00000190C300F210BF39EEF687A002804D100 +:101200003068FFF775F800203060002070BDFFB532 +:1012100081B0040000201D000A9F0090E0680026B5 +:101220004005002827DA207A012824D0022801D09E +:10123000032820D1200014F071F9217A032902D16A +:10124000617A022917D1002F15D1002813D08030E0 +:101250000700006800280ED0E90752D0C17B0A07BA +:101260000399120F8A4202D00399FF2949D1FFF74F +:101270003FF83E6045E00921029889016718FF2880 +:101280001BD15A48854218D1F86A002802D0FFF7CE +:101290002FF8FE62786A002808D0FFF729F87E62EE +:1012A000B86A002802D0FFF723F8BE62386B002826 +:1012B00027D0FFF71DF83E6323E0F86A002808D026 +:1012C000A80706D59B208000039A02992018FFF7F3 +:1012D00077FF786A002808D0E80706D099208000B8 +:1012E000039A02992018FFF76BFF386B002808D08B +:1012F000680506D527200001039A02992018FFF7F8 +:101300005FFF00980FE4F7B586B0002707983E000E +:10131000062864D314005EE0FF20049003900020B0 +:1013200002906078217800020843304DC11FF939DE +:1013300001D1012643E00100FF399D393FD10698D4 +:101340000590E078A1780002084306282BD3201DE1 +:1013500009F049FD002814D1201D09F035FD0028B1 +:101360000FD106985921C90041180622201D10F0FE +:10137000F9FB002805D0201D14F050F9059001203C +:101380000290E178A278080210430A280BD3A07AD1 +:101390000490E07A0390617B207B0D0205431248A4 +:1013A000054000D1114D0598002808D0029A0092FE +:1013B000039A049905982B00FFF729FF0643E0786C +:1013C000A178000208433F1DC11983000F041818BB +:1013D0003F0C04191434079887429DD300E001267E +:1013E000300009B0F0BD000003040000FFFF000062 +:1013F00070B50C0010F092FE0500002C15D02000F6 +:1014000014F08CF8002810D00D21890140180279C1 +:101410000021012A0AD0022A04D10171C1602000F2 +:1014200000F06BF8280010F07DFE70BD0171F9E747 +:101430003EB5FF220400062101A810F02D5964E2F8 :1014400001000000F00E010000040000FAFF4ECE83 -:101450005648854212D13869002802D0FFF748F873 -:101460003E61F868002802D0FFF742F8FE60786914 -:10147000002827D0FFF73CF87E6123E03869002878 -:1014800008D0A80706D529200001039A0299201840 -:10149000FFF77DFFF868002808D0E80706D0A320F2 -:1014A0008000039A02992018FFF771FF78690028DD -:1014B00008D0680506D5A5208000039A0299201857 -:1014C000FFF765FF009826E4F7B586B00027079878 -:1014D0003E00062864D314005EE0FF2004900390D1 -:1014E0000020029060782178000208432F4DC11F30 -:1014F000F93901D1012643E00100FF399D393FD17F -:1015000006980590E078A1780002084306282BD3BE -:10151000201D09F05EFE002814D1201D09F04AFEAE -:1015200000280FD10698BB21890041180622201DF2 -:1015300010F046FC002805D0201D14F07AF8059024 -:1015400001200290E178A278080210430A280BD308 -:10155000A07A0490E07A0390617B207B0D02054322 -:101560001148054000D1114D0598002808D0029A75 -:101570000092039A049905982B00FFF72FFF06436A -:10158000E078A178000208433F1DC11983000F04D1 -:1015900018183F0C04191434079887429DD300E0B3 -:1015A0000126300009B0F0BD03040000FFFF000079 -:1015B00070B50C0010F0E0FE0500002C15D02000E6 -:1015C00013F0BEFF002810D00D21890140180279C8 -:1015D0000021012A0AD0022A04D10171C160200031 -:1015E00000F06BF8280010F0CBFE70BD0171F9E738 -:1015F0003EB5FF220400062101A810F00EEC0022E7 -:10160000009220000E2301AA01A9F5F7D6F910F0E7 -:10161000B3FE0500E17AA07A13F0C9FF07E02000CD -:1016200016F070EBE27AA17A2000FBF730F90400A3 -:10163000F5D1280010F0A4FE3EBDF1B582B00298AD -:1016400013F07EFF0D21890105004418A0680028D1 -:1016500028D010F091FE01902079352701263F0116 -:10166000002820D001281AD10220E66020712069CC -:10167000FAF29BFD00220092164A17480299EB19D4 -:10168000FAF230FD019810F07BFE0298272116F047 -:101690003EEBE06801040298090C00F00EF8019896 -:1016A00010F06EFEFEBD002200920A4A0A4802991E -:1016B000EB19FAF217FD2671F1E713B5040013F0E8 -:1016C0003FFF064B20001C684C21022301AAA047C3 -:1016D0001CBD00000087930351100100A8BA02004E -:1016E000FFB5A1B01100323110000F911188941C88 -:1016F00022390904090C1091811C07A81F001E2221 -:10170000801C11AE15AD0BF35AECA27F07A9019214 -:101710000091109A229921982B00FDF295FF00204C -:101720000F21221820320B1A1278401C1028F25474 -:10173000F7D30F990022781C03AB07C33A000F9828 -:1017400010992B001132801C6D4607C5320021997B -:101750000020FDF221FF25B0F0BDF7B5A0B08D1C33 -:1017600000200F270FAC13AE2A1820323B1A127933 -:10177000401C1028E254F7D308880F008238000478 -:10178000000C1F9088783637030700229B0F022B2E -:1017900003D10009082800D1012206A80E921E22BA -:1017A000891C801C0BF30AEC2035AA7806A901924B -:1017B00000911F9A20990E983300FDF245FF229860 -:1017C000390000221239401C03AB07C33300229AB0 -:1017D0001F991132029201910E9922000120009767 -:1017E000FDF2DAFE012023B0F0BD7FB504001E003B -:1017F00055480460002011F0A9FB544901200860FD -:10180000E07840210843E070A0780022010715002D -:10181000890F022903D10009082800D10125307B56 -:10182000A11C887730000C30CA7720310600FDF209 -:101830006FFF6B46187A33004107490F22002800DA -:10184000FFF74EFF7FBDF7B584B006004EB1B9FE7D +:10145000C0EB0022009220000E2301AA01A9F5F79B +:101460006FF910F065FE0500E17AA07A14F097F8A4 +:1014700007E0200016F084ECE27AA17A2000FBF766 +:10148000F8F80400F5D1280010F056FE3EBDF1B585 +:1014900082B0029814F04CF80D218901050044181F +:1014A000A068002828D010F043FE0190207935274D +:1014B00001263F01002820D001281AD10220E66031 +:1014C00020712069FAF271FE00220092164A174834 +:1014D0000299EB19FAF206FE019810F02DFE02981F +:1014E000272116F052ECE06801040298090C00F084 +:1014F0000EF8019810F020FEFEBD002200920A4A6C +:101500000A480299EB19FAF2EDFD2671F1E713B5DD +:10151000040014F00DF8064B20001C684C21022337 +:1015200001AAA0471CBD000000879303A50E01007F +:10153000A8BA0200FFB5A1B01100323110000F911E +:101540001188941C22390904090C1091811C07A8E8 +:101550001F001E22801C11AE15AD0BF330EDA27FD3 +:1015600007A901920091109A229921982B00FEF26E +:101570006BF800200F21221820320B1A1278401C21 +:101580001028F254F7D30F990022781C03AB07C33D +:101590003A000F9810992B001132801C6D4607C538 +:1015A000320021990020FDF2F7FF25B0F0BDF7B51C +:1015B000A0B08D1C00200F270FAC13AE2A182032CC +:1015C0003B1A1279401C1028E254F7D308880F0008 +:1015D00082380004000C1F908878363703070022F9 +:1015E0009B0F022B03D10009082800D1012206A875 +:1015F0000E921E22891C801C0BF3E0EC2035AA7889 +:1016000006A9019200911F9A20990E983300FEF2CC +:101610001BF82298390000221239401C03AB07C383 +:101620003300229A1F991132029201910E992200E1 +:1016300001200097FDF2B0FF012023B0F0BD7FB57F +:1016400004001E0055480460002011F025FC544998 +:1016500001200860E07840210843E070A078002273 +:1016600001071500890F022903D10009082800D1BC +:101670000125307BA11C887730000C30CA772031DF +:101680000600FEF245F86B46187A33004107490F11 +:1016900022002800FFF74EFF7FBDF7B584B006009B +:1016A0004069019008000F0040300BF3CAED069C22 +:1016B0000290C1780C34490650D5029909888229D4 +:1016C0004CD9851C2221495D2278606C914210D052 +:1016D000002802D0027D8A4204D032498868401C2A +:1016E00088603BE02F49040048681434401C48607F +:1016F00005E0002803D0FEF705FE00206064019895 +:10170000407A022801D1002000E00120009038003A +:1017100020300390007DC006800F012812D93800C8 +:1017200018300BF38EED00070CD52A0000982432F8 +:101730002100FEF230F8002813D11A490868401C35 +:1017400008600BE02A00009824322100FDF2F7FF28 +:10175000002806D113480168491C0160002007B029 +:10176000F0BDB08844222238B08003983900007E52 +:1017700045070D486D0F066008300BF320EC002084 +:1017800011F08AFB094901200860094906980860A0 +:10179000029922002800FFF70AFFE0E74404000452 +:1017A0003C040004707D0200504400044004000426 +:1017B00048040004FFB585B004001D008F480E9F4B +:1017C0000460002011F068FB8D4901200860E0787A +:1017D00040210843E070280026002030017E20369A +:1017E0003170407E2900707004223431301D0BF3BB +:1017F000E6EB0020B070F07820214009400108435A +:101800008006800EB9010843F07010F091FC0600CC +:1018100060880490218820000022283001AB07C393 +:101820002B000090079A04990C332000FEF29BF8DD +:10183000208810302080300010F07EFC288F401C63 +:101840000004000C288702D1686B401C5A1C6B7F77 :1018500001000000EC12010000040000453A6B7D1D -:101860004069019008000F0040300BF3F4EC069C37 -:101870000290C1780C34490650D502990988822912 -:101880004CD9851C2221495D2278606C914210D090 -:10189000002802D0027D8A4204D032498868401C68 -:1018A00088603BE02F49040048681434401C4860BD -:1018B00005E0002803D0FEF725FE002060640198B3 -:1018C000407A022801D1002000E001200090380079 -:1018D00020300390007DC006800F012812D9380007 -:1018E00018300BF3B8EC00070CD52A00009824320E -:1018F0002100FDF25AFF002813D11A490868401C44 -:1019000008600BE02A00009824322100FDF221FF3C -:10191000002806D113480168491C0160002007B067 -:10192000F0BDB08844222238B08003983900007E90 -:1019300045070D486D0F066008300BF34AEB002099 -:1019400011F00EFB0949012008600949069808605A -:10195000029922002800FFF70AFFE0E70C000004CC -:1019600004000004107D020030440004080000045C -:1019700010000004FFB585B004001D008F480E9FC5 -:101980000460002011F0ECFA8D4901200860E07835 -:1019900040210843E070280026002030017E2036D8 -:1019A0003170407E2900707004223431301D0BF3F9 -:1019B00010EB0020B070F07820214009400108436E -:1019C0008006800EB9010843F07010F0DFFC0600BD -:1019D00060880490218820000022283001AB07C3D2 -:1019E0002B000090079A04990C332000FDF2C5FFEC -:1019F000208810302080300010F0CCFC288F401C54 -:101A00000004000C288702D1686B401C686309B091 -:101A1000F0BDF8B5018943690C18E56EE66DE8790B -:101A20000007000F02280ED1B0792900C207D20F9B -:101A3000180011F062FB009022682B00002130009A -:101A4000FFF798FF07E0032805D122682B0000214B -:101A50003000FFF7D4FE0020F8BDF7B58CB01500BC -:101A60000C9846690D9840300BF3F4EB0400408865 -:101A700008AB099018790007800F02280AD10C984A -:101A80000C998088270010380004000C24378880C7 -:101A9000603803E020882700203710380A90F87853 -:101AA000800652D50A9800284FDD3000FCF7E9F98E -:101AB00000284DD00D98434A20300B90007E4107FE -:101AC0002000490F0C300CF3EBF93F4909688842BC -:101AD0003ED308AB187907AA0007800F08A910D1D8 -:101AE000A72080003018029201910090E879390017 -:101AF0000207152040013318120F0120FFF286F86B -:101B000016E028002C300592021D04910390E8791C -:101B100001070B98090F007E02924007400F0191C8 -:101B20000090A0783A00030901213000EFF7D0F8C7 -:101B300000280DD0002E08D00520C0013018406AC2 -:101B4000002802D0416D491C416500200FB0F0BD56 -:101B50001E4E0C98306030000D99442208300BF373 -:101B600038EA002011F0FCF91949012008601948F1 -:101B7000002205600A9803920104090C3A00083219 -:101B800002912B0001970092326C09990C332000CE -:101B9000FDF2C2FE0120D9E710B5D37904001B077E -:101BA00000201B0F022B03D12068FFF756FF10BD4A -:101BB000032BFCD12068FFF750FE10BD0C00000481 -:101BC0000400000428810200DCBA02003044000452 -:101BD0000800000410000004F7B582B00E0010F0F9 -:101BE000D5FB002437002037019018206043394985 -:101BF0000A5C002A45D04518797868780909884236 -:101C00003FD1281D0622B11D10F0E4F8002838D17C -:101C1000182161432F482E00081800210173FA781B -:101C2000BB780A36120230881A4301270D35120993 -:101C30003F03904219D104980069002802D0287807 -:101C4000042812D3378029700298407A02281BD1C9 -:101C50000298F5F768FB002807D00298A88EB6D244 +:10186000686309B0F0BDF8B5018943690C18E56EED +:10187000E66DE8790007000F02280ED1B079290043 +:10188000C207D20F180011F0DEFB009022682B0077 +:1018900000213000FFF798FF07E0032805D12268F8 +:1018A0002B0000213000FFF7D4FE0020F8BDF7B573 +:1018B0008CB015000C9846690D9840300BF3CAECBB +:1018C0000400408808AB099018790007800F0228AF +:1018D0000AD10C980C998088270010380004000C5D +:1018E00024378880603803E02088270020371038AC +:1018F0000A90F878800652D50A9800284FDD30000B +:10190000FCF760F900284DD00D98434A20300B9029 +:10191000007E41072000490F0C300CF3C1FA3F490B +:10192000096888423ED308AB187907AA0007800FE0 +:1019300008A910D14F20C0003018029201910090E8 +:10194000E879390002079F2080003318120F012028 +:10195000FFF25CF916E028002C300592021D04917C +:101960000390E87901070B98090F007E0292400767 +:10197000400F01910090A0783A0003090121300046 +:10198000EFF7A6F900280DD0002E08D00520C001E1 +:1019900030180068002802D0416D491C41650020C4 +:1019A0000FB0F0BD1E4E0C98306030000D994422EF +:1019B00008300BF30EEB002011F078FA19490120E2 +:1019C00008601948002205600A9803920104090C76 +:1019D0003A00083202912B0001970092326C09996B +:1019E0000C332000FDF298FF0120D9E710B5D37920 +:1019F00004001B0700201B0F022B03D12068FFF7F8 +:101A000056FF10BD032BFCD12068FFF750FE10BD20 +:101A1000440400043C0400047C800200DCBA0200A0 +:101A2000504400044004000448040004F7B582B0A8 +:101A30000E0010F087FB002437002037019018209B +:101A4000604339490A5C002A45D04518797868789E +:101A5000090988423FD1281D0622B11D10F096F8D1 +:101A6000002838D1182161432F482E000818002182 +:101A70000173FA78BB780A36120230881A430127BC +:101A80000D3512093F03904219D1049800690028CE +:101A900002D02878042812D3378029700298407A1F +:101AA00002281BD10298F5F704FB002807D0029802 +:101AB0000022FF304130018A029816F0D8E83088C1 +:101AC000B8420BD02878022808D221060298090EC5 +:101AD000F2F777F902E0641C042CB0D3019810F0FF +:101AE00035FB05B0F0BD10B58B7801241B09052B23 +:101AF00009D006DD0B2B0DD00C2B02D1110016F0F6 +:101B000052E9200010BD017A0229FAD116F04EE9FF +:101B10000024F6E720314A790B7911021943F0D0FD +:101B200016F048E9EDE700001C80020063480078E9 +:101B30007047FF216248393110B50BF3E6EA5F497F +:101B40000020087010BDFEB50020009010F0FAFAD9 +:101B500000250290012001905948E9004458002CCA +:101B600041D020890619606900280DD00B21890118 +:101B700041184969002720310F72017A032903D1E6 +:101B8000FAF7EBFD80308762F06D80780007800FF8 +:101B9000022802D12000FCF74BFB30006030070028 +:101BA000407A302802D1200009F042F8787A2128C2 +:101BB00001D101200090F16D88780007800F07D1D6 +:101BC0006069427A022A03D13200FFF78CFF01904C +:101BD00060690022310012F076FF0198002802D0DF +:101BE00020000BF353FF6D1C272DB3D3FFF7A1FF8C +:101BF0000098002801D001F043F8029810F0A6FAEE +:101C0000FEBDFEB510F09EFA009011F025F92B4CA8 +:101C1000002811D12B480169406981420CD00098FD +:101C200010F094FAA0680722401CA0602648012109 +:101C3000006811F027F9FEBD01A810F090FA019B91 +:101C4000E0682178181A002920D00A281ED3002223 +:101C50001B4F1000E36012E0C5007E59D19C6D69F6 :101C600001000000E81601000004000016E0B811B1 -:101C70000022FF306130018B029815F0C8EF3088E8 -:101C8000B8420BD02878022808D221060298090E03 -:101C9000F1F7ACFF02E0641C042CB0D3019810F003 -:101CA00083FB05B0F0BD10B58B7801241B09052B13 -:101CB00009D006DD0B2B0DD00C2B02D1110016F034 -:101CC0003EE8200010BD017A0229FAD116F03AE868 -:101CD0000024F6E720314A790B7911021943F0D03C -:101CE00016F034E8EDE70000C88002006348007891 -:101CF0007047FF216248413110B50BF310EA5F498C -:101D00000020087010BDFEB50020009010F048FBC8 -:101D100000250290012001905948E9004458002C08 -:101D200041D020890619606900280DD00B21890156 -:101D30004118896B002720310F72017A032903D1E2 -:101D4000FAF723FE80308762F06D80780007800FFD -:101D5000022802D12000FCF70FFC300060300700A1 -:101D6000407A302802D1200009F0D3F8787A21286F -:101D700001D101200090F16D88780007800F07D114 -:101D80006069427A022A03D13200FFF78CFF01908A -:101D900060690022310012F0D4FE0198002802D0C0 -:101DA00020000BF37DFE6D1C282DB3D3FFF7A1FFA0 -:101DB0000098002801D001F044F8029810F0F4FADD -:101DC000FEBDFEB510F0ECFA009011F0A9F82B4C16 -:101DD000002811D12B480169406981420CD000983C -:101DE00010F0E2FAA0680722401CA06026480121FA -:101DF000006811F0ABF8FEBD01A810F0DEFA019BFF -:101E0000E0682178181A002920D00A281ED3002261 -:101E10001B4F1000E36012E0C5007E59002E0BD06E -:101E2000ED196D68FF265D1B491E4B36B54203D97F -:101E300065886D1C521C6580401C282801D2002931 -:101E4000EADC002A02D01020EFF74CFD009810F0D9 -:101E5000ABFAFEBD030010B5094C00200100CA001A -:101E6000A258002A03D052699A4200D10120491C8D -:101E7000282901D20028F2D010BD00008C7C02007D -:101E8000BC59000400A00080887C020030B500220C -:101E9000AA4CE378002B0AD007E0A5182D798542DB -:101EA00002D101200A7030BD521C9342F5D80020A7 -:101EB00030BD10B5A14C0020E3780B2109E02218B9 -:101EC00012798A4200DB11000906401C091600063F -:101ED00000168342F3DC0B38042800D30B210806DC -:101EE000000E10BDC068C00505D59448C078002814 -:101EF00001D001207047002070479048032110B5A1 -:101F00000BF336E98D480021C1704021001D0BF311 -:101F100030E98A481422402144300FF092EF00202B -:101F200010BDF3B587B005000020049083484E1C17 -:101F3000C078002877D00720087000208C1C3070F3 -:101F40007E49032220000BF34EE83078E41CC01CCD -:101F500030700894687A022804D1280013F02BFB13 -:101F6000007A0AE0287A012801D0002808D100214F -:101F7000684615F078EE6B4618788007800F00E011 -:101F8000012001900020012705000290059033E018 -:101F9000002F05D1481940300079029A904214D0A0 -:101FA000059800274300181804194819027922706F -:101FB000403000790122A07062700290049805926E -:101FC000401C0006000E049002E06078401C607027 -:101FD0004819069001790391019903980DF0C0FD0D -:101FE0000399401801060698090E4079884200D0EE -:101FF00001276D1C2D062D0E5049C878A842C7D860 -:10200000049832784100091850183070089A8918DD -:10201000C00704D0002008703078401C3070307841 -:10202000801C0006000E09B0F0BD10B507220A7032 -:1020300000220C004A70891CFFF773FF002806D0AD -:10204000811EA170090A801C0006000EE17010BDFF -:1020500070B5040000780025072805D1FFF74DFF73 -:10206000641C2678002E01D1002070BD461C56ABA2 +:101C7000002E0BD0ED196D68FF265D1B491E4B36FB +:101C8000B54203D965886D1C521C6580401C27280D +:101C900001D20029EADC002A02D01020EFF78CFEE6 +:101CA000009810F05DFAFEBD030010B5094C00204D +:101CB0000100CA00A258002A03D052699A4200D1FA +:101CC0000120491C272901D20028F2D010BD0000B4 +:101CD000EC7C0200C859000400A00080E87C0200EF +:101CE00030B50022AA4CE378002B0AD007E0A518F3 +:101CF0002D79854202D101200A7030BD521C9342D9 +:101D0000F5D8002030BD10B5A14C0020E3780B21A0 +:101D100009E0221812798A4200DB11000906401CF2 +:101D20000916000600168342F3DC0B38042800D3A2 +:101D30000B210806000E10BDC068C00505D59448EB +:101D4000C078002801D001207047002070479048DB +:101D5000032110B50BF30CEA8D480021C17040211E +:101D6000001D0BF306EA8A481422402144300FF08C +:101D700044EF002010BDF3B587B0050000200490AB +:101D800083484E1CC078002877D0072008700020B8 +:101D90008C1C30707E49032220000BF324E930783C +:101DA000E41CC01C30700894687A022804D1280012 +:101DB00013F0F9FB007A0AE0287A012801D0002804 +:101DC00008D10021684615F088EF6B461878800727 +:101DD000800F00E001200190002001270500029003 +:101DE000059033E0002F05D1481940300079029A60 +:101DF000904214D005980027430018180419481978 +:101E000002792270403000790122A0706270029045 +:101E100004980592401C0006000E049002E06078D1 +:101E2000401C60704819069001790391019903984C +:101E30000DF0F6FC0399401801060698090E40794A +:101E4000884200D001276D1C2D062D0E5049C87800 +:101E5000A842C7D804983278410009185018307049 +:101E6000089A8918C00704D0002008703078401CF8 +:101E700030703078801C0006000E09B0F0BD10B53F +:101E800007220A7000220C004A70891CFFF773FFBA +:101E9000002806D0811EA170090A801C0006000ED1 +:101EA000E17010BD70B5040000780025072805D149 +:101EB000FFF74DFF641C2678002E01D1002070BD75 +:101EC000641C3348032221000BF38CE8E41CF61E4B +:101ED00032062F4E120E23E02078C9281CD200288B +:101EE0001AD0002011E0402D02D3FFF730FFE5E7C4 +:101EF00021780B1871190B716D1C40312D06401C97 +:101F0000A3782D0E0006000E0B7161788142EAD88D +:101F1000F17860780818F070D21E1206120EE41CD8 +:101F2000012AD9D8012070BD70B506000C00022A24 +:101F300006D1FBF7B0FA00280ED1FFF708FF25E025 +:101F40006078217800020843072805D1E178A0785D +:101F50000A020243FF2A01D9002070BD15062D0E8A +:101F60000721E570A01CA170FFF79CFF002803D19A +:101F7000280AA570E070EFE7F4F7FDFA01000122EE +:101F80003000F4F770FA280AA570E070012070BDE7 +:101F9000704001C0F8B50D0004001100F4F7F1FA2B +:101FA0000028286011D00189220046187E3259216C +:101FB000C9000092CB3261180D23F4F737FB0820DB +:101FC000203630702968AC200881F8BD38B515007E +:101FD0000C00FF222D326946FFF7DCFF0098002835 +:101FE00001D1401E38BD01892A0A0818010020319C +:101FF0004C708D70CA7004210170002141700098EE +:10200000F4F76AFB38BD0200080009218901411874 +:1020100010B54B6B934205D100224A630722002181 +:10202000F4F7AEFB10BD0200080009218901411838 +:1020300010B54B6B934207D100224A630100FF3178 +:1020400002224A3115F0C4EE10BD70B501254A7860 +:10205000002A0BD0012A07D1092189014418606B9D +:10206000FAF2B7F800206063280070BD4D8BB2A073 :1020700001000000E41A010000040000E28FCDA579 -:10208000641C3348032221000AF3B6EFE41CF61E59 -:1020900032062F4E120E23E02078C9281CD20028C9 -:1020A0001AD0002011E0402D02D3FFF730FFE5E702 -:1020B00021780B1871190B716D1C40312D06401CD5 -:1020C000A3782D0E0006000E0B7161788142EAD8CC -:1020D000F17860780818F070D21E1206120EE41C17 -:1020E000012AD9D8012070BD70B506000C00022A63 -:1020F00006D1FBF749FB00280ED1FFF708FF25E0CA -:102100006078217800020843072805D1E178A0789B -:102110000A020243FF2A01D9002070BD15062D0EC8 -:102120000721E570A01CA170FFF79CFF002803D1D8 -:10213000280AA570E070EFE7F4F763FB01000122C5 -:102140003000F4F7C6FA280AA570E070012070BDCF -:10215000B04101C0F8B50D0004001100F4F757FBC1 -:102160000028286011D0018922004618A232BB2124 -:1021700089000092CF3261180D23F4F79DFB0820EF -:10218000203630702968AC200881F8BD38B51500BC -:102190000C00FF222D326946FFF7DCFF0098002873 -:1021A00001D1401E38BD01892A0A081801002031DA -:1021B0004C708D70CA70042101700021417000982C -:1021C000F4F7D1FB38BD020008000521C901411810 -:1021D00010B58B69934205D100228A610722002144 -:1021E000F4F715FC10BD020008000521C9014118D3 -:1021F00010B58B69934207D100228A610100FF313B -:102200000222723115F0B0ED10BD70B501254A788B -:10221000002A0BD0012A07D10521C9014418A06961 -:10222000F9F2E1FF0020A061280070BDCA7889782A -:1022300012020A430121FFF7A9FFF5E7F0B587B0C5 -:1022400000274669CC6D300013F098F921002288F0 -:10225000203155180691717A022903D1FF30FF30E1 -:10226000801C02E00520C00130184669002E66D0AF -:10227000002D64D04C202870102068705820805D9C -:1022800068803000338F38302A1D011F5B1C1B040F -:102290001B0C338702D10B685B1C0B60008810801D -:1022A000901C096801600022FF21FF48D243F531EC -:1022B0000BF32AFC049001890F1828000A3008212A -:1022C00005900AF360EFA0783870E078C7210840E5 -:1022D00078700622A11DB81C0AF38EEE210038008A -:1022E00006220C3108300AF388EE2100380006225D -:1022F00012310E300AF380EE143722880699380026 -:102300000AF37AEE20881222C01929000AF374EE2B -:1023100020886B4612300204120C2280049814327A -:102320000189091830001430FAF20FF905980822D3 -:1023300069460AF362EE049801270BF3BBFB3800F1 -:1023400007B0F0BDF0B5002291B0050008004030A4 -:10235000069205920E920AF392EF010002886F69CD -:10236000040020314C20109108F327FE0600002FB6 -:102370007ED00520C00138180F904569002DF7D098 -:10238000002EF5D008353800FBF78FFD00280490AB -:102390001AD028002C3005AA06A96B4607C32B00CB -:1023A000E87930330207120F311D0020FEF242FCA3 -:1023B000002809D00F98406A002802D0C16D491C3E -:1023C000C165002011B0F0BD0022FF21B648D24304 -:1023D000F5310BF399FB01890700081831000A3128 -:1023E0000D9008220E000BA80AF306EE082130001B -:1023F0000AF3C8EE0D9EA1783170E178C720014044 -:1024000071700622A11DB01C0AF3F6ED2100300008 -:1024100006220C3108300AF3F0ED210030000622CC -:1024200012310E300AF3E8ED0D982288109914301D -:102430000AF3E2ED0F982288398940691432C919EC -:10244000143007ABFAF281F8082207A90BA80FF0A5 -:10245000D5FC002810D10498002808D0059C29003C -:102460006B461A8B2C31081D2300FEF2E0FB00E0C6 -:102470000CE001200E9006E00F98406A054A7EC1EC +:10208000CA78897812020A430121FFF7A9FFF5E710 +:10209000F0B587B000274669CC6D300013F066FAC2 +:1020A00021002288203155180691717A022904D125 +:1020B000FF30FF30801C466903E0092080013018A2 +:1020C000066B002E66D0002D64D04C2028701020A6 +:1020D00068705820805D68803000338F38302A1D4A +:1020E000011F5B1C1B041B0C338702D10B685B1C9C +:1020F0000B6000881080901C096800220160D243A8 +:10210000FF21F531FF480BF3FFFC049001890F1804 +:1021100028000A30082105900BF334E8A0783870C5 +:10212000E078C721084078700622A11DB81C0AF388 +:1021300064EF2100380006220C3108300AF35CEF0E +:1021400021003800062212310E300AF356EF143700 +:102150002288069938000AF350EF20881222C0190D +:1021600029000AF34AEF20886B4612300204120C51 +:102170002280049814320189091830001430FAF2D0 +:10218000E4F90598082269460AF336EF0498012716 +:102190000BF390FC380007B0F0BDF0B5002291B011 +:1021A000050008000492403005920E920BF366E899 +:1021B000010002886F69040020314C20109108F35F +:1021C000FCFE0600002F7ED00920800138180F90F9 +:1021D000056B002DF7D0002EF5D008353800FBF741 +:1021E00005FD002803901CD028002C3004AA05A966 +:1021F0006B4607C32B00E87930330207120F311DFD +:102200000020FEF217FD00280BD00520C001381871 +:102210000068002802D0C16D491CC165002011B0C2 +:10222000F0BD0022FF21B748D243F5310BF36CFC1F +:102230000D9001890822081831000A310C900E0017 +:102240000AA80AF3DAEE082130000AF39CEF0C9E8C +:10225000A1783170E178C720014071700622A11D7C +:10226000B01C0AF3CAEE2100300006220C310830FF +:102270000AF3C2EE21003000062212310E300AF3BA +:10228000BCEE0C982288109914300AF3B6EE0D9823 +:1022900022880189143209180F9806AB006B14309C +:1022A000FAF253F9082206A90AA80FF083FC0028C5 +:1022B00010D1039800280AD029002C316B469A8A45 +:1022C000049C081D00E011E02300FEF2B0FC012098 +:1022D0000E9008E00520C00138180068002802D0E0 +:1022E000816D491C81650D980BF3E4FB0E9896E710 +:1022F000F8B5050000260089401900906F69C46D8B +:10230000002F6CD0A079C00721D00B208001381895 +:10231000406980300079C00719D0A0780107890F83 +:1023200015D100090C2809D00A2807D00D280ED194 +:102330002000203000F014F9002808D0009928006F +:10234000FFF7A6FE002800D1A880002647E038004D +:10235000FF300622A11D4A300FF02CFC00283ED190 +:10236000F86821002031000439D5A0780207920FC7 +:1023700035D100090C2808D00A2806D00D282ED106 +:10238000080000F0EDF8002829D02889696944196F +:10239000E06D0026002922D0092292018918CF6A17 +:1023A000002F1CD008371AD0F9790907090F022924 +:1023B00015D1C17840221143C170417803780A02D7 +:1023C000010001261A43203128300FF028EC207834 +:1023D000C008C00020702800E76610F0CDFD300076 +:1023E000F8BDF3B5040081B00025029840300AF32F +:1023F00046EF61690600002971D0CA6830001204F6 +:102400006DD580780207920F69D100090C2803D09E +:102410000A2801D00D2862D1B2790027D207002AFC +:1024200008D002992000FFF7B8FE002800D1A7804D +:10243000002554E0F278520617D5092080010818CB +:10244000C26A0025002A0BD0083209D0D0790007D3 +:10245000000F022804D102990125200010F0C5FDCB +:10246000002D3CD10125A78039E00D2805D1300091 +:10247000203000F075F8002801D0012598542A9EDC :1024800001000000E01E010000040000B1551EC95B -:10249000002802D0816D491C816538000BF314FBC4 -:1024A0000E9899E7F8B505000026008940190090BC -:1024B0006F69C46D002F6CD0A079C00721D00B20AC -:1024C00080013818806B4030007EC00719D0A0789A -:1024D0000107890F15D100090C2809D00A2807D057 -:1024E0000D280ED12000203000F013F9002808D06C -:1024F00000992800FFF7ACFE002800D1A880002634 -:1025000047E03800FF300622A11D72300FF080FC3A -:1025100000283ED1F86821002031000439D5A07888 -:102520000207920F35D100090C2808D00A2806D0DE -:102530000D282ED1080000F0ECF8002829D02889B9 -:1025400069694419E06D0026002922D00522D201D4 -:1025500089180F69002F1CD008371AD0F97909079C -:10256000090F022915D1C17840221143C170417869 -:1025700003780A02010001261A43203128300FF0A7 -:102580007CEC2078C008C00020702800E76610F0BE -:1025900057FD3000F8BDF3B5040081B00025029866 -:1025A00040300AF376EE61690600002971D0CA68EE -:1025B000300012046DD580780207920F69D10009AE -:1025C0000C2803D00A2801D00D2862D1B279002747 -:1025D000D207002A08D002992000FFF7BDFE00288C -:1025E00000D1A780002554E0F278520617D50520C7 -:1025F000C001081802690025002A0BD0083209D052 -:10260000D0790007000F022804D10299012520008B -:1026100010F04FFD002D3CD10125A78039E00D2899 -:1026200005D13000203000F074F8002801D00125D9 -:10263000A780B07800090C2801D00A2829D12036BB -:102640007078317800020843062801D0072820D18D -:1026500061690520C00108188069002819D153203C -:102660000022C0000B180092154A1648F9F262FDCC -:1026700060690B26B6018119896B40314A8B0021B4 -:10268000FFF78EFD60698019806B4030418B491CDB -:1026900041832800FEBD10B5C2680123DB03C907D2 -:1026A0009A43090C0A430521C9014418C260A06974 -:1026B000F9F2A3FD0020A06110BD0000E4000004B9 -:1026C00040420F002B1C0100C0680004C00F70477F -:1026D0000B2110B5427A89014418022A0AD112F05E -:1026E00057FFA16B4031097EC90710D0FF30FF3082 -:1026F000801C07E0A16B4031097EC90707D0052186 -:10270000C90140184069002801D10120D4E7002008 -:10271000D2E7074A00780021535C834201D10120AF -:102720007047491C0906090E0929F5D30020704796 -:1027300034F300C02039012A01D1401800E0401ACA -:10274000FF2801DDFF207047002801DA00207047D4 -:102750000006000E7047F8B505000E00140000F0EA -:10276000F7FF400647163100280001F002F8000785 -:102770000017E11908187F2801DD7F2002E00028FA -:1027800000DA00200006000EF8BD10B5FF4C0A214B -:10279000206910F0F3FB00210028A16100D0012086 -:1027A00010BDFA4810B5406910F0EFFB10BDF3B54D -:1027B00000221C2183B0F6480BF3B0F9050002D1CA -:1027C000012005B0F0BD0220287300206861AC2014 -:1027D0002F182881EF48022102680092130001920D -:1027E00004223800FEF2B6F91C202E182881702130 -:1027F00030000AF3A8EC300008216030F765017260 -:1028000021214172112036650002766530630498FB -:1028100034001434002801D0DF48E061012020702A -:1028200067600398D949C0001C310A5C4018012A2E -:1028300006D14178012901D11E2707E0152705E0BF -:102840004188032901D8032700E00C272600203601 -:10285000317AD20749084900D20F11430E2F317245 -:1028600002D30222114301E0FD221140317240786F -:10287000FB22C0071140400F014338003172FFF2C4 -:1028800081FA218D7F224006D200800D4E3B472CDD +:10249000A780B07800090C2801D00A2829D120365D +:1024A0007078317800020843062801D0072820D12F +:1024B0006169092080010818406B002819D19D200E +:1024C000002280000B180092144A1548F9F232FEDF +:1024D00060690B26B601811949698031CA880021DB +:1024E000FFF788FD6069801940698030C188491C08 +:1024F000C1802800FEBD10B5C2680123DB03C907F7 +:102500009A43090C0A43092189014418C260606B8F +:10251000F9F273FE002005E02405000440420F009C +:102520007F1A0100606310BDC0680004C00F7047CF +:102530000B2110B5427A89014418022A0BD113F0FD +:102540001FF8616980310979C90711D0FF30FF3068 +:10255000801C406908E0616980310979C90707D0AA +:10256000092189014018006B002801D1012010BD0C +:10257000002010BD074A00780021535C834201D13E +:1025800001207047491C0906090E0929F5D30020CE +:10259000704700009CF500C02039012A01D1401885 +:1025A00000E0401AFF2801DDFF207047002801DA13 +:1025B000002070470006000E7047F8B505000E00B9 +:1025C000140000F004FF400647163100280000F018 +:1025D0000FFF00070017E11908187F2801DD7F2091 +:1025E00002E0002800DA00200006000EF8BD10B559 +:1025F000FF4C0A21E06810F067FC002100286161AF +:1026000000D0012010BDFA4810B5006910F063FC3D +:1026100010BDF3B500221C2183B0F6480BF37EFAFF +:10262000050002D1012005B0F0BD02202873002072 +:102630006861AC202F182881EF48022102680092BF +:102640001300019204223800FEF284FA1C202E1896 +:102650002881702130000AF376ED300008216030C7 +:10266000F7650172212141721120366500027665FD +:102670003063049834001434002801D0DF48E0614E +:102680000120207067600398D949C00018310A5CA6 +:102690004018012A06D14178012901D11E2707E0FF +:1026A000152705E04188032901D8032700E00C27FE +:1026B00026002036317AD20749084900D20F11434B +:1026C0000E2F317202D30222114301E0FD2211408C +:1026D00031724078FB22C0071140400F014338009F +:1026E0003172FFF24FFB218D7F224006D200800D18 +:1026F000914301432185707AE72108400830052F76 +:10270000707202D28021084301E04006400E7072D0 +:10271000B07A0399000909070001090F0843B07254 +:10272000280015F0AEF800207DE7B248D421002241 +:1027300010B50BF3F3F910BDF7B5002088B0012AEE +:10274000029001D2009201E000220092100001AB41 +:102750000CE0089C43001D19EC8801AEF4522D8951 +:10276000401C6C400C400006000EF452009B984246 +:10277000EFD9170090E00124780001A90790085ACA +:10278000099083E0641C00E0012630000999A04014 +:102790000842F7D09649E00018310690401805909D +:1027A00040680390FFF7C1FF050079D00120B840D1 +:1027B00001062006090E000EFFF72BFF012803D1AA +:1027C00028000BF381F96BE0022028730020686178 +:1027D0002900AC311C2004912E1828817021300072 +:1027E0000AF3B0EC04993000F16508216030017201 +:1027F0002121417276650499B16131007C4E069BBE +:10280000343118360A7AF35C5208DB075200DB0FCA +:102810001A43FB230A721A40059B4C385B78DB078E +:102820005B0F1A430A72028D7F23DB009A43059BDC +:102830005B885B069B0D1A4302858A7A230712097F +:1028400012011B0F1A438A724A7AE7231A40089B27 +:102850005B789B07DB0E1A434A7267493B000A68A4 +:10286000039902F0FAF80298401C0290280015F033 +:1028700008F808990798411801200A89A0400243E6 +:102880000A810999814309910998641C89DD34857D :1028900001000000DC2201000004000099C49B74C8 -:1028A000914301432185707AE72108400830052FC4 -:1028B000707202D28021084301E04006400E70721F -:1028C000B07A0399000909070001090F0843B072A3 -:1028D000280014F0A6FF00207DE7B248D421002292 -:1028E00010B50BF325F910BDF7B5002088B0012A0B -:1028F000029001D2009201E000220092100001AB90 -:102900000CE0089C43001D19EC8801AEF4522D899F -:10291000401C6C400C400006000EF452009B984294 -:10292000EFD9170090E00124780001A90790085A18 -:10293000099083E0641C00E0012630000999A04062 -:102940000842F7D09649E0001C31069040180590E7 -:1029500040680390FFF7C1FF050079D00120B8401F -:1029600001062006090E000EFFF72BFF012803D1F8 -:1029700028000BF3B3F86BE0022028730020686195 -:102980002900AC311C2004912E18288170213000C0 -:102990000AF3E2EB04993000F1650821603001721E -:1029A0002121417276650499B16131007C4E069B0C -:1029B00034311C360A7AF35C5208DB075200DB0F15 -:1029C0001A43FB230A721A40059B4C385B78DB07DD -:1029D0005B0F1A430A72028D7F23DB009A43059B2B -:1029E0005B885B069B0D1A4302858A7A23071209CE -:1029F00012011B0F1A438A724A7AE7231A40089B76 -:102A00005B789B07DB0E1A434A7267493B000A68F2 -:102A1000039902F0CEF90298401C0290280014F0AD -:102A200000FF08990798411801200A89A040024335 -:102A30000A810999814309910998641C002800D0F2 -:102A40007AE77F1C3F063F0E0098874200D86AE76E -:102A500002980BB0F0BD524810B5006910F09FFA13 -:102A600010BD4F4900200978FF2900D0242070476D -:102A7000F7B582B004000E0000F0A1FD019000F057 -:102A80009BFD009000F095FD020001990098FFF772 -:102A9000E8FF3040050046D0012007F0EDFE072793 -:102AA00000210E0001208840284206D00020621834 -:102AB0001318401C01281E73FADB491CB942F1DBD4 -:102AC00001F071F960700020012241000919CE80E7 -:102AD0000E8113004E81677883401F4200D0CD8065 -:102AE000401C0128F1DB00F064FD608000986071FB -:102AF00001982071022020700498002802D02849F3 -:102B00002B4888612B4802F06FF802F08DF82949B4 -:102B1000A843098A2940084302F08DF8FF222900C2 -:102B20002000FFF7E1FE56E6FEB504000E06002089 -:102B3000360E0B2E0096019073D20120B040E5882E -:102B40000004000C002705406BD0300002F07CF838 -:102B5000002803D11849885D401C8855182070430F -:102B6000009902191348183202F083F8002000F08F -:102B700091FD0700310000200DF06CF801223900B2 -:102B8000FFF7E2FDA7190200387331000020FFF7BC -:102B9000ECFD3873608901232843608100200DE03B -:102BA00040F300C048010004E8F500C000110040F7 -:102BB00093240100344201C05D7002C04100091934 -:102BC000CA882A4202D0498929420FD0401C0006F7 -:102BD000000E0128E3D3012B08D102F025F80100F3 -:102BE000FA48408A2840084302F025F801230020D3 -:102BF00041000919CA88002A02D04989914206D1A8 -:102C0000401C0006000E0128F2D3002B0AD10198C7 -:102C100040000019C188002903D0FF222000FFF7DF -:102C200063FEFEBD01202070002007F025FEE8486D -:102C300080690028F5D08047FEBDF8B50D00C100C1 -:102C40000918E24AC3007832490118188C18217813 -:102C5000400180180C30012600270B000AF3FCEB22 -:102C600004030E1E79BE2878032803D1002001F04A -:102C7000E2FFB3E00128FCD12670AFE028780428F9 -:102C800004D168686A780104090C42E00228F0D097 -:102C90000328EED1002001F0CEFFF2E783D10D5ED4 +:1028A000002800D07AE77F1C3F063F0E0098874241 +:1028B00000D86AE702980BB0F0BD524810B5C06866 +:1028C00010F013FB10BD4F4900200978FF2900D0FC +:1028D00024207047F7B582B004000E0000F0B7FC6A +:1028E000019000F0B1FC009000F0ABFC02000199F7 +:1028F0000098FFF7E8FF3040050043D0072700218C +:102900000E0001208840284206D0002062181318CB +:10291000401C01281E73FADB491CB942F1DB01F0AF +:1029200082F860700020012241000919CE800E81DA +:1029300013004E81677883401F4200D0CD80401C39 +:102940000128F1DB00F07DFC608000986071019847 +:102950002071022020700498002802D029492D48B7 +:1029600048612D4801F09EFF01F0BCFF2A49A843B1 +:10297000098A2940084301F0BCFFFF2229002000FA +:10298000FFF7E4FE59E6FEB504000E060020360E01 +:102990000B2E0096019073D20120B040E588000410 +:1029A000000C002705406BD0300001F0ABFF002881 +:1029B00003D11A49885D401C88551820704300993E +:1029C00002191548183201F0B2FF002000F0A2FCF5 +:1029D0000700310000200CF09DFF01223900FFF7B5 +:1029E000E5FDA7190200387331000020FFF7EFFD65 +:1029F0003873608901232843608100204100091950 +:102A0000CA880DE0A8F500C08805000430F800C0B1 +:102A100000110040F7220100F44001C0656E02C0C1 +:102A20002A4202D0498929420FD0401C0006000EDC +:102A30000128E3D3012B08D101F054FF0100F8482D +:102A4000408A2840084301F054FF01230020410040 +:102A50000919CA88002A02D04989914206D1401C2E +:102A60000006000E0128F2D3002B0AD10198400085 +:102A70000019C188002903D0FF222000FFF766FE5D +:102A8000FEBD01202070E74840690028F8D080474B +:102A9000FEBDF8B50D00C1000918E14AC300783247 +:102AA000490118188C182178400180180C30012633 +:102AB00000270B000AF3D0EC04030E1E79BB287824 +:102AC000032803D1002001F014FFB0E00128FCD15D +:102AD0002670ACE02878042804D168686A7801047C +:102AE000090C42E00228F0D00328EED1002001F0CA +:102AF00000FFF2E72978052904D169682000FFF773 +:102B000042FF94E0022902D1032020708FE00429C3 +:102B100019D10021320060788A4010420DD048005F +:102B20000019C2886B681A43C28002896B689A4395 +:102B3000028142896B689A434281491C0906090E49 +:102B40000129E7D373E0062919D1002041000919B2 +:102B5000C98800290DD0B3494969002901D0012253 +:102B600000E0002240000019C1882000FFF7B2FEFB +:102B70005DE0401C0006000E0128E7D357E007295E +:102B800055D10B210AF3E8EA002041000919401C45 +:102B90000006CF80000E0F8101284F81F5D3A14997 +:102BA000091D0888401C08803FE02978052927D1A5 +:102BB00068680106090E0B2939D2310081400804EA +:102BC000E2886189000C02401143012300206181E9 +:102BD00041000A191189002902D05289914226D157 +:102BE000401C0006000E0128F2D3002B1FD02670D7 +:102BF000FFF713FD8B484069002818D0804716E086 +:102C0000072914D10B210AF3A8EA00204100091971 +:102C1000401C0006CF80000E0F8101284F81F5D3A4 +:102C20008049091D4888401C488026704AE7207862 +:102C3000F8BD7CB500267B4D34002A78FF2A04D0ED +:102C4000012904D16A69002A01D001207CBD042237 +:102C50006B461A7059700190A868511F10F03EF928 +:102C600028786946FFF715FF6869002800D001241D +:102C7000A86810F03AF9002C02D0FFF7C2FC060059 +:102C800030007CBD7CB501206B4600241870654D7A +:102C90005C70811E0194A86810F020F95AC5B57ABD :102CA00001000000D826010000040000CA1E4818D8 -:102CB0002978052904D169682000FFF73FFF97E0D4 -:102CC000022902D10320207092E0042919D10021A9 -:102CD000320060788A4010420DD048000019C28846 -:102CE0006B681A43C28002896B689A4302814289E9 -:102CF0006B689A434281491C0906090E0129E7D3F2 -:102D000076E0062919D1002041000919C988002957 -:102D10000DD0B4498969002901D0012200E00022C8 -:102D200040000019C1882000FFF7ACFE60E0401CA5 -:102D30000006000E0128E7D35AE0072958D10B21DD -:102D40000AF314EA002041000919401C0006CF8054 -:102D5000000E0F8101284F81F5D3A249891D0888F3 -:102D6000401C088042E0297805292AD168680106BC -:102D7000090E0B293CD2310081400804E2886189A8 -:102D8000000C0240114301230020618141000A1917 -:102D90001189002902D05289914229D1401C000694 -:102DA000000E0128F2D3002B22D00020267007F05D -:102DB0006DFDFFF70AFD8B488069002818D0804719 -:102DC00016E0072914D10B210AF3D0E900204100B5 -:102DD0000919401C0006CF80000E0F8101284F8189 -:102DE000F5D38049891D4888401C4880267047E7F4 -:102DF0002078F8BD7CB500267A4D34002A78FF2A69 -:102E000004D0012904D1AA69002A01D001207CBD87 -:102E100004226B461A7059700190E868511F10F037 -:102E2000C1F828786946FFF712FFA869002800D08A -:102E30000124E86810F0BDF8002C02D0FFF7B9FCBF -:102E4000060030007CBD7CB501206B460024187064 -:102E5000644D5C70811E0194E86810F0A3F82000B6 -:102E600069462C70FFF7F3FEE86810F0A2F87CBD0D -:102E700010B5FFF7E8FF5C480121FFF7BBFF10BD6D -:102E80005A48012110B500680722490210F086F85F -:102E900010BD10B5534C2078FF2817D00021E068F2 -:102EA000C94310F07FF820784D49C300181840013D -:102EB0007831085C032806D04C48012100680722BD -:102EC000C90210F06BF8E06810F073F810BD4548C7 -:102ED00010B540690A2110F065F8002800D00120E3 -:102EE00010BD70B53F4D2878FF2815D03C49C30070 -:102EF00018184001783144180021E868C94310F0DF -:102F000051F8002001F0A1FE20000B210C300AF343 -:102F10002EE9E86810F04DF870BD1CB5314C2078F2 -:102F2000FF2810D007206B46187000205870411EF3 -:102F30000190E06810F036F820786946FFF787FEC8 -:102F4000E06810F036F81CBD7CB50024254D2878CB -:102F5000FF281DD0E868611E10F024F802206B469F -:102F6000187000205870019028786946FFF76FFEAE -:102F7000032800D10124E86810F01BF8002C07D0CA -:102F8000FFF7A5FF002803D0F9F738F9FFF7C5FFD1 -:102F90007CBD7CB50024134D2878FF281FD0E8683D -:102FA000611E0FF0FFFF03206B4618700120587060 -:102FB0000D48019028786946FFF749FEA869002866 -:102FC00000D00124E8680FF0F4FF002C07D0FFF7D1 -:102FD000F0FB002803D0F9F711F9FFF79EFF7CBD45 -:102FE000344201C040F300C0FF07000004F600C0F7 -:102FF000807D70477CB5A34C2178FF2901D1012049 -:10300000EDE705216B461970002159700190E068C9 -:10301000491E0FF0C7FF20786946FFF718FE05002C -:10302000E0680FF0C6FF2800D9E71CB5954C207862 -:10303000FF2812D004206B46187000205870924868 -:1030400000210190E068C9430FF0ACFF2078694689 -:10305000FFF7FDFDE0680FF0ACFF1CBDF7B50020E9 -:103060008AB017001080874A1078FF2807D00A9B83 -:103070008B4207D11079002801D0002010710A98E6 -:103080000DB0F0BDC30081491818400140180190EF -:103090000720002403900A9802942500079000203E -:1030A00008900198401909900899401873E346B8B0 +:102CB000200069462C70FFF7F6FEA86810F01FF997 +:102CC0007CBD10B5FFF7E8FF5C480121FFF7BBFFB3 +:102CD00010BD5B48012110B500680722490210F0C1 +:102CE00003F910BD10B5544C2078FF2817D00021EF +:102CF000A068C94310F0FCF820784E49C3001818AA +:102D000040017831085C032806D04D480121006855 +:102D10000722C90210F0E8F8A06810F0F0F810BD22 +:102D2000454810B500690A2110F0E2F8002800D0EB +:102D3000012010BD70B5404D2878FF2815D03D49C1 +:102D4000C30018184001783144180021A868C9430D +:102D500010F0CEF8002001F0D6FD20000B210C3041 +:102D60000AF304EAA86810F0CAF870BD1CB5324C2A +:102D70002078FF2810D007206B461870002058706C +:102D8000411E0190A06810F0B3F820786946FFF763 +:102D90008AFEA06810F0B3F81CBD7CB50024264D57 +:102DA0002878FF281DD0A868611E10F0A1F8022025 +:102DB0006B46187000205870019028786946FFF71C +:102DC00072FE032800D10124A86810F098F8002CA6 +:102DD00007D0FFF7A5FF002803D0F9F7AFF8FFF7FA +:102DE000C5FF7CBD7CB50024134D2878FF281FD07B +:102DF000A868611E10F07CF803206B461870012053 +:102E000058700E48019028786946FFF74CFE6869B3 +:102E1000002800D00124A86810F071F8002C07D019 +:102E2000FFF7F9FB002803D0F9F788F8FFF79EFFBA +:102E30007CBD0000F44001C0A8F500C0FF07000001 +:102E40004CF800C0807D70477CB5524C2178FF293A +:102E500001D10120ECE705216B4619700021597062 +:102E60000190A068491E10F043F820786946FFF7EA +:102E70001AFE0500A06810F042F82800D8E71CB53B +:102E8000444C2078FF2812D004206B461870002094 +:102E90005870414800210190A068C94310F028F8FB +:102EA00020786946FFF7FFFDA06810F028F81CBDE8 +:102EB0007CB50500374C2078FF28B9D014F0B4EF6A +:102EC0000128B5D00021A068C94310F011F80420F2 +:102ED0006B46187000205870019520786946FFF7FE +:102EE000E2FDA06810F00BF8A2E71CB5294C207891 +:102EF000FF2810D007206B46187000205870411E24 +:102F00000190A0680FF0F4FF20786946FFF7CBFD31 +:102F1000A0680FF0F4FF1CBD70B51E4C2078FF2890 +:102F200001D1002070BD0021A068C9430FF0E0FF6F +:102F300020781A49C300181840010D5C04220A5475 +:102F4000A0680FF0DCFF280070BD70B50500114CC3 +:102F50002078FF280DD00021A068C9430FF0C8FFDA +:102F600020780E49C300181840010D54A0680FF0D6 +:102F7000C6FF70BD074A1278FF2A01D100207047B2 +:102F8000D3009A18054B5201D21810184018007B34 +:102F900070470000A8F500C0FF0700006C4101C0A9 +:102FA00010B5040003280CD81120FEF211FECF2129 +:102FB00008402101103901430906090E1120FEF2D3 +:102FC00023FE10BD70B504000D001600FCF7D0FB09 +:102FD0002000FFF7E5FF31002800FEF215FE01207A +:102FE000FFF7DEFFFCF7FFFB70BD70B504000D00BE +:102FF000FCF7BEFB2000FFF7D3FF2800FEF2E8FD40 +:1030000004000120FFF7CCFFFCF7EDFB200070BDB2 +:103010000002FF30313070B500041407000C240F9B +:10302000CA070FD0491E4910081805042D0C2900A5 +:103030000220FFF7DAFF0007000F210101430A0613 +:10304000120E0BE04908081805042D0C2900022077 +:10305000FFF7CBFF000900012200024329000220F4 +:10306000FFF7B0FF70BD00024018FF3011300104BF +:10307000090C0220A6E7F8B50025FCF779FB3027FC +:103080002E023000FF30B6300404240C2000FEF283 +:103090009FFD384301002000FEF2B6FD3000FF30F6 +:1030A000BA300004000CFF21FEF2AEFD358CB5876E :1030B00001000000D42A0100000400003E713DAC74 -:1030C000067B002E54D0089829000CF0D7FD0A99F1 -:1030D0000122FFF74DFBB0420690069801D9801BF4 -:1030E00000E0301A0004000C04900C2130000AF3B8 -:1030F000FCEC059006980C210AF3F6EC059A824246 -:10310000049828D0644A937898421DD81079D278D0 -:10311000904219D201221000029BA84018430004DB -:10312000000C0290E00723D106981443B04203D963 -:103130000A98401A401E03E00C20401A0A99081809 -:103140000006000E079013E001213888A9400843CB -:10315000388008200BE050494978884206D3012185 -:103160003888A94008433880042000E00220044346 -:103170000898401C0006000E0128089001D209980A -:103180009CE76D1C03982D062D0E854291D3042CCF -:1031900004D3388802990843388001E0022C03D117 -:1031A0003D490020087174E73B490879401C0871CB -:1031B00007986FE77CB50500374C2078FF2815D0BD -:1031C00014F0FEED012811D00021E068C9430FF092 -:1031D000F3FE04206B46187000205870019520788B -:1031E0006946FFF73EFDE0680FF0EDFE01E71CB514 -:1031F000294C2078FF2810D007206B46187000203B -:103200005870411E0190E0680FF0D6FE20786946A4 -:10321000FFF727FDE0680FF0D6FE1CBD70B51E4C11 -:103220002078FF2801D1002070BD0021E068C9434B -:103230000FF0C2FE20781A49C300181840010D5C37 -:1032400004220A54E0680FF0BEFE280070BD70B57D -:103250000500114C2078FF280DD00021E068C943FB -:103260000FF0AAFE20780E49C300181840010D5433 -:10327000E0680FF0A8FE70BD074A1278FF2A01D15E -:1032800000207047D3009A18054B5201D21810182D -:103290004018007B7047000040F300C0FF070000AB -:1032A000AC4201C010B5040003280CD81120FEF276 -:1032B00099FCCF2108402101103901430906090E6C -:1032C0001120FEF2ABFC10BD70B504000D0016001D -:1032D000FCF7C2FB2000FFF7E5FF31002800FEF2FB -:1032E0009DFC0120FFF7DEFFFCF7F1FB70BD70B520 -:1032F00004000D00FCF7B0FB2000FFF7D3FF28000F -:10330000FEF270FC04000120FFF7CCFFFCF7DFFBAE -:10331000200070BD0002FF30313070B5000414078A -:10332000000C240FCA070FD0491E491008180504C5 -:103330002D0C29000220FFF7DAFF0007000F210102 -:1033400001430A06120E0BE04908081805042D0C6B -:1033500029000220FFF7CBFF0009000122000243F1 -:1033600029000220FFF7B0FF70BD00024018FF30B7 -:1033700011300104090C0220A6E70800110010B565 -:10338000FEF24CFC10BD080010B5FEF22BFC10BD87 -:1033900070B50C0015000800FEF224FCA8430100E3 -:1033A0002000FEF23BFC70BDF8B5FCF755FB002594 -:1033B0002C022000FF309F300004000C0721FEF299 -:1033C00055FC2000FF30A0300004000C0421FEF268 -:1033D0004DFC2806000E060010222021FFF7D8FF22 -:1033E000FF34BF342404240C80212000FEF233FC7F -:1033F00080212000FEF23AFC002427063F0E002226 -:1034000039003000FFF7B1FF002239003000FFF72C -:1034100081FF641C102CF0DB6D1C012DC8DBFCF758 -:1034200056FB00F0C7FFF8BDF8B50025FCF714FB0C -:1034300030272E023000FF30B6300404240C200068 -:10344000FEF2D0FB384301002000FEF2E7FB300023 -:10345000FF30BA300004000CFF21FEF2DFFB300029 -:10346000FF30BB300004000C0021FEF2D7FB30001F -:1034700041300004000C0421FEF2EDFB0024FF2289 -:10348000210028000CF0A8FB0022210028000CF0ED -:10349000B8FB002221002800FFF767FF002221006F -:1034A0002800FFF737FF641C2406240E102CE6D3F7 -:1034B0003000FF3017300004000C40211CBCFB52D0 +:1030C0003000FF30BB300004000C0021FEF2A6FDF2 +:1030D000300041300004000C0421FEF2BCFD00244D +:1030E000FF22210028000CF0D7FB0022210028003D +:1030F0000CF0E7FB002221002800FFF7BEFF0022B2 +:1031000021002800FFF78EFF641C2406240E102CDB +:10311000E6D33000FF3017300004000C4021FEF2EF +:103120009AFD3000FF30A0300404240C80212000E0 +:10313000FEF291FDFF369F363004000C0221FEF2B4 +:103140008AFD04212000FEF286FD6D1C2D062D0E49 +:10315000012D9FD3FCF751FBF8BD080010B5FEF21E +:1031600041FD10BD0800110010B5FEF257FD10BD65 +:10317000F3B581B000250E002C0001270198FEF266 +:1031800031FD3100814304D13800A04028430506B9 +:103190002D0E641C012CF1DB2800FEBD70B505006E +:1031A0000E00002431002800FEF238FD641C012CC2 +:1031B000F8DB70BD70B50C0015000800FEF212FDC2 +:1031C000284301002000FEF229FD70BD70B50C00FF +:1031D00015000800FEF206FDA84301002000FEF2E3 +:1031E0001DFD70BD70B505000E0000242006000E08 +:1031F00032002900FFF7DEFF641C012CF6DB70BDF6 +:1032000070B505000E0000242006000E32002900D3 +:10321000FFF7DCFF641C012CF6DB70BD491E480083 +:10322000F949085A7047F8B50024F84D2A88002A51 +:1032300002D0012400222A80F54BF64E596001226B +:1032400018705A703378002802D1DF273B4003E022 +:10325000012802D120273B433370F1F79AFC002C60 +:1032600001D0012028800120F8BDE948406870475E +:10327000E74800787047E64840787047E6487D2187 +:1032800010B5006849010EF084ED8905800A0843F5 +:10329000E24900E0401E0A68002A01DB0028F9DC50 +:1032A000002803D1DA498868401C886010BD0020DE +:1032B00010B5FEF297FCD64CA0700120FEF292FCF5 +:1032C000E07010BD08B5FCF75DFAFFF7F0FFD448D9 +:1032D000FEF2B1FCFCF791FA0020694602F0ECF82E +:1032E000002803D16B46187058709870FFF7CDFE18 +:1032F00000F0A6FEFCF746FAFCF77FFA08BD10B511 +:10330000FFF7E0FF01200CF01AFC012010BDC048BF +:10331000C0787047BE488078704770470002FF3021 +:1033200070B5BC3004040D00240CFCF72BFA290006 +:103330002000FEF273FCFCF760FA70BD0002FF3063 +:10334000BC3010B50404240CFCF71CFA2000FEF27B +:1033500049FC0400FCF751FA200010BDAC4970B5DF +:1033600000204C680978002912D1AE48455E01F072 +:10337000A0FD002803D0AB496000263102E0A94936 +:1033800060000A3140182038C08B40190004001436 +:1033900070BD0002FF3070B5E93005040A060C006C +:1033A0002D0C120E29000320FFF716FE2004020E3A +:1033B000681C0104090C0320FFF70EFE2002020E18 +:1033C000A81C0104090C0320FFF706FEED1C2904CC +:1033D000220E090C0320FFF7FFFD70BD000270B53F +:1033E00044182000FF3091300104090C0220FFF73F +:1033F00006FEFF34850771342104AD0F090C02204D +:10340000FFF7FDFD8000284370BD00024018FF302B +:1034100051300104090C022010B5FFF7F0FD400601 +:10342000400E10BD10B50CF0E6FA10BD0002FF30E2 +:1034300041300004000CCA0710B509D0491E4910DC +:1034400008180104090C0220FFF7D9FD000910BD7E +:10345000490808180104090C0220FFF7D0FD0007F5 +:10346000000F10BD0002FF30801D70B505042D0C4B +:103470000024FF2229000220FFF7AEFD6D1C641C12 +:103480002D0424062D0C240E022CF2D370BDFF2334 +:103490000A3370B5002A00D11B1FCA08D2180002D7 +:1034A000801804044D07240C6D0F21000220FFF743 +:1034B000A6FD0121A94001430A06120EB1CD55D740 :1034C00001000000D02E0100000400006DABEEC032 -:1034D000FEF2CBFB3000FF30A0300404240C80212E -:1034E0002000FEF2C2FBFF369F363004000C0221A2 -:1034F000FEF2BBFB04212000FEF2B7FB6D1C2D0683 -:103500002D0E012D9FD3FCF7ECFAF8BDF3B581B079 -:1035100000250E002C0001270198FEF26DFB310002 -:10352000814304D13800A040284305062D0E641CB9 -:10353000012CF1DB2800FEBD70B505000E00002453 -:1035400031002800FEF274FB641C012CF8DB70BD16 -:1035500070B50C0015000800FEF24EFB2843010078 -:103560002000FEF265FB70BD70B505000E00002462 -:103570002006000E32002900FFF7EAFF641C012C30 -:10358000F6DB70BD70B505000E0000242006000EAD -:1035900032002900FFF706FF641C012CF6DB70BD2A -:1035A000491E4800FD49085A7047F8B50024FC4DF3 -:1035B0002A88002A02D0012400222A80F94BFA4EE0 -:1035C0005960012218705A703378002802D1DF2721 -:1035D0003B4003E0012802D120273B433370F1F741 -:1035E000E8F9002C01D0012028800120F8BDED4829 -:1035F00040687047EB4800787047EA484078704769 -:10360000EA487D2110B5006849010EF0F0EC89050B -:10361000800A0843E64900E0401E0A68002A01DBF0 -:103620000028F9DC002803D1DE498868401C886046 -:1036300010BD002010B5FEF2DFFADA4CA0700120B8 -:10364000FEF2DAFAE07010BD08B5FCF70FFAFFF7EA -:10365000F0FFD848FEF2F9FAFCF743FA0020694679 -:1036600002F0F8F8002804D16B4618705870987072 -:1036700006E06B461878012802D1FFF79FFE03E0B1 -:10368000FFF7DCFE00F0A9FEFCF7F0F9FCF729FAE1 -:1036900008BD10B5FFF7D8FF01200CF0EEFB0120AC -:1036A00010BDC048C0787047BE48807870477047EA -:1036B0000002FF3070B5BC3004040D00240CFCF790 -:1036C000D5F929002000FEF2B3FAFCF70AFA70BD22 -:1036D0000002FF30BC3010B50404240CFCF7C6F91E -:1036E0002000FEF289FA0400FCF7FBF9200010BD6F -:1036F000AC4970B500204C680978002912D1AE4859 -:10370000455E01F090FD002803D0AB4960000A310E -:1037100002E0A4496000183140182038C08B4019DD -:103720000004001470BD0002FF3070B5E9300504DC -:103730000A060C002D0C120E29000320FFF7CEFD07 -:103740002004020E681C0104090C0320FFF7C6FDCB -:103750002002020EA81C0104090C0320FFF7BEFD85 -:10376000ED1C2904220E090C0320FFF7B7FD70BDE4 -:10377000000270B544182000FF3071300104090CBC -:103780000220FFF7BEFDFF3480049134050C2104B4 -:10379000090C0220FFF7B5FD8007800F284370BD9C -:1037A00000024018FF3051300104090C022010B50E -:1037B000FFF7A7FD4006400E10BD10B50CF0C5FA8E -:1037C00010BD0002FF3041300004000CCA0710B5E4 -:1037D00009D0491E491008180104090C0220FFF7FE -:1037E00090FD000910BD490808180104090C0220C9 -:1037F000FFF787FD0007000F10BD0002FF30801D9E -:1038000070B505042D0C0024FF2229000220FFF7CB -:1038100065FD6D1C641C2D0424062D0C240E022C49 -:10382000F2D370BDFF230A3370B5002A00D11B1FED -:10383000CA08D2180002801804044D07240C6D0F2A -:1038400021000220FFF75DFD0121A94001430A0686 -:10385000120E21000220FFF741FD70BDF7B5CD0823 -:103860004E07E91DFE31070278180104760F090C96 -:103870000220FFF746FD04000298002808D0FF351B -:103880000A3578190104090C0220FFF73AFD0443B8 -:1038900001200100B140214200D00020FEBD010006 -:1038A0000120002900D00020704710B501246420B9 -:1038B000FCF788F83D487D21006849010EF096EB41 -:1038C0008905800A08433A4900E0401EC1550F456A +:1034D00021000220FFF78AFD70BDF7B5CD084E0729 +:1034E000E91DFE31070278180104760F090C02204D +:1034F000FFF78FFD04000298002808D0FF350A3539 +:1035000078190104090C0220FFF783FD0443012010 +:103510000100B140214200D00020FEBD0100012089 +:10352000002900D00020704710B501246420FCF76A +:10353000DFF83E487D21006849010EF034EC890532 +:10354000800A08433A4900E0401E0A68002A01DB6D +:103550000028F9DC3349002805D1C868012200247D +:103560001204801801E0C868401CC860200010BD2B +:10357000F7B584B004000D000320FFF725FD2F4EA2 +:103580002F4F069A29002000FFF7BBF90090000694 +:10359000000E6B46187103900098000A58710024C1 +:1035A000029001200099A04008420FD0002507E0BA +:1035B0000019891900048978000CFEF239FB6D1C92 +:1035C000A900705A1F4A9042F2D10EE0002507E090 +:1035D0000019C91900048978000CFEF229FB6D1C42 +:1035E000A900785A174A9042F2D1641C2406240E8E +:1035F000102CD6D3FF200399ED30FEF219FBFF20EB +:103600000299EE30FEF214FB01F05DFC002832D08E +:103610000D4D0E4E0B4F00241FE00000E80D320050 +:103620008CF900C018F600C03A5C0004DC2001C030 +:10363000002B008084FA00C08C4201C05CFC00C0FA +:1036400050FC00C0FFFF00007CFC00C0D0FC00C0AC +:1036500049198978FEF2ECFA641CA100685AB84254 +:10366000F6D1002403E02021FEF2FFFA641CA00042 +:10367000305AB842F7D10120FFF7A6FC07B0F0BDE1 +:10368000002810B501D0012400E000240022012907 +:1036900006D04808012801D1012201E00022D243CE +:1036A0001549A0000858511C01D1002406E00C2146 +:1036B000114B61430833C91892008C58FEF2C5FAC9 +:1036C0002000FEF2C2FA10BD704710B5FCF761F998 +:1036D0000A494000085A10BD70B504000D00FFF7FC +:1036E000F4FF030029002000FFF7A2FD00221900CB +:1036F000FEF2D1FA70BD000028F600C0B47A0200D4 +:1037000070B50D00046C26001C3E002C09D0300062 +:1037100013F0C8FF002804D060343000257214F084 +:10372000D8F870BD10B5046C1C3C08D0200013F014 +:10373000B9FF002803D0002120000EF039FD10BD94 +:10374000F3B583B000250EF043FD009003983A498D +:1037500080000F583949095839480190386809687C +:10376000C405C905C90DE40D029121E003982106A5 +:103770000002090E08430199096808430668241DE0 +:10378000E405E40D3C60002D0DD004997068FF3114 +:10379000801D06224A310EF03FFA002803D1300086 +:1037A000FFF7C0FF04E003993000FFF7A9FF0125F0 +:1037B00002988442DAD100980EF00EFD05B0F0BDFB +:1037C00038B582001C4B9C581C4B9B581C4A0092DD +:1037D000220000F305FA38BDFEB5FF3305000C00EA +:1037E00015481600154A890040585158144A6F462A +:1037F00007C74A3332002100280000F31BFAFEBD40 +:10380000052010B50CF07CF80E490004084310BDEB +:1038100070B50C0001210903012800D80021000225 +:103820000D18FFF7EDFF002C02D00121890308439A +:1038300005496918886070BDE40500041C06000491 +:1038400000A000802880004040AA00800C4810B5ED +:10385000007802280AD10B48C16A10221143C162C4 +:103860000122094904201300F7F231FC10BD04487D +:1038700010B50078022802D10420F7F2D8FC10BD60 +:1038800070F200C0002300808BB90000FB4B10B524 +:1038900000201C00383481005A58126861580A60B0 +:1038A000401C0E28F7D3F64B00201C1FC100CA187D +:1038B000126809190A60401C0828F7D3002010BDBF +:1038C000803010B5C069FEF2D7FF10BD2751539963 :1038D00001000000CC32010000040000D26ECB7366 -:1038E0000A68002A01DB0028F9DC3349002805D1E9 -:1038F000C868012200241204801801E0C868401C36 -:10390000C860200010BDF7B584B004000D0003208E -:10391000FFF7DCFC2E4E2F4F069A29002000FFF700 -:10392000C8F800900006000E6B46187103900098CE -:10393000000A58710024029001200099A04008421A -:103940000FD0002507E00019891900048978000CC0 -:10395000FEF278F96D1CA900705A1F4A9042F2D10C -:103960000EE0002507E00019C91900048978000C51 -:10397000FEF268F96D1CA900785A174A9042F2D1FC -:10398000641C2406240E102CD6D3FF200399ED309E -:10399000FEF258F9FF200299EE30FEF253F901F0E1 -:1039A0004CFC002831D00D4D0D4E0B4F00241EE075 -:1039B000E80D320058F700C0B4F300C0365C0004D4 -:1039C0002C1D01C0002B008054F800C0CC4301C066 -:1039D0002CFA00C020FA00C0FFFF00004CFA00C023 -:1039E000A0FA00C049198978FEF22CF9641CA100E4 -:1039F000685AB842F6D1002403E02021FEF23FF9D4 -:103A0000641CA000305AB842F7D10120FFF75EFCD9 -:103A100007B0F0BD002810B501D0012400E000245B -:103A20000022012906D04808012801D1012201E025 -:103A30000022D2431549A0000858511C01D100248E -:103A400006E00C21114B61432433C91892008C58B5 -:103A5000FEF205F92000FEF202F910BD704710B524 -:103A6000FCF70BF90A494000085A10BD70B5040074 -:103A70000D00FFF7F4FF030029002000FFF79AFD77 -:103A800000221900FEF211F970BD0000C4F300C05D -:103A9000307A020070B50D00046C26001C3E002C2C -:103AA00009D0300013F0D2FD002804D0603430007B -:103AB000257213F0DEFE70BD10B5046C1C3C08D0FE -:103AC000200013F0C3FD002803D0002120000EF0D9 -:103AD0009DFC10BDF3B583B000250EF0A7FC00904F -:103AE00003983A4980000F583949095839480190DC -:103AF00038680968C405C905C90DE40D029121E0C3 -:103B0000039821060002090E084301990968084339 -:103B10000668241DE405E40D3C60002D0DD00499D9 -:103B20007068FF31801D062272310EF0A3F9002863 -:103B300003D13000FFF7C0FF04E003993000FFF726 -:103B4000A9FF012502988442DAD100980EF072FC98 -:103B500005B0F0BD38B582001C4B9C581C4B9B58DF -:103B60001C4A0092220000F345F838BDFEB5FF3331 -:103B700005000C0015481600154A89004058515898 -:103B8000144A6F4607C7723332002100280000F341 -:103B90005BF8FEBD052010B50CF05CF80E49000482 -:103BA000084310BD70B50C0001210903012800D89D -:103BB000002100020D18FFF7EDFF002C02D00121BB -:103BC0008903084305496918886070BDB401000481 -:103BD000EC01000400A000802880004040AA008082 -:103BE0000C4810B5007802280AD10B48C16A10228F -:103BF0001143C1620122094904201300F7F271FA4E -:103C000010BD044810B50078022802D10420F7F254 -:103C100018FB10BD00F000C0002300804BBC00006A -:103C2000F94B10B500201C00383481005A58126836 -:103C300061580A60401C0E28F7D3F44B00201C1F6B -:103C4000C100CA18126809190A60401C0828F7D375 -:103C5000002010BDC03010B58068FEF217FE10BD08 -:103C600038B51400049A0092C03080682200FEF239 -:103C700024FE38BD38B51400049A00922200FEF2EA -:103C800034FE38BD70B50500E1480C000188A14242 -:103C90001CD00480280011F0BDFCF9F7ADFE00280F -:103CA00014D1DC49002C12D0022D01D11F2600E0D6 -:103CB0000F260D00002431002000FEF25AFA2900E0 -:103CC0002000FEF260FA641C032CF4DD70BD0F20AE -:103CD0003F22FEF21CFE70BD01000020CC53A471F7 +:1038E00038B51400049A00928030C0692200FEF2BC +:1038F000E4FF38BD38B51400049A00922200FEF2AD +:10390000F4FF38BD70B50500E3480C000188A14202 +:103910001CD00480280011F075FEF9F704FF002880 +:1039200014D1DE49002C12D0022D01D11F2600E057 +:103930000F260D00002431002000FEF21AFC2900A1 +:103940002000FEF220FC641C032CF4DD70BD0F206F +:103950003F22FEF2DCFF70BD010000200E2907D2DD +:10396000CF48072901D889000818006B0004000C13 +:1039700070470E2805D2CA4A072803D8800080184D +:103980000163704711637047F0B5002087B0F9F705 +:103990006EFE002804D10120F9F769FE002801D04D +:1039A000012100E0002102200591F9F760FE04905A +:1039B0000320F9F75CFEBF4900914C140599B94A00 +:1039C000B94BBA4EBA4F250000290393029201D099 +:1039D00015001C00049901431FD0022008F0C7FD08 +:1039E000002801D035403C40032008F0C0FD0028ED +:1039F00003D00298039905400C40012008F0B7FD60 +:103A0000002805D000980299054003980D40044015 +:103A10000498002801D035403C40A748C5620463A3 +:103A200007B0F0BD70B50600FFF2F2FAA34C250C0A +:103A3000002E07D0A24900200862FFF7A5FFE0682A +:103A4000284316E0FAF752FB002810D0032100208B +:103A5000FEF2B0FC9248803001680122D206914308 +:103A6000016001680E224908490011430160E068C5 +:103A7000A843E06070BD8848C0687047864A0B0064 +:103A80000821A432480110B5FFF2BBF9002800D08C +:103A9000012010BD804A08212432002010B5FFF219 +:103AA00092F9002800D0012010BD10B50CF0E8F804 +:103AB0000CF0E0F8FFF7EEFF77480021C068000641 +:103AC000000EFFF7DBFF10BD10B5FFF7EEFF002083 +:103AD0000CF0AEF810BD10B5D02400212200080073 +:103AE000FFF20CF9641CFF2CF7D910BD38B5222069 +:103AF0006B46187032205870FF20987066480D0091 +:103B0000416081681400002904D101218160FBF724 +:103B100013FE02E00120F8F70FFA2800FFF218FA6E +:103B2000002872D0FFF7BCFE66485D49406A02007B +:103B3000203213790B6252794A62634A03789362A6 +:103B40004388D362806A0204120C002083005B1851 +:103B50001A63401C0728F9DD0120FFF247F8FEF246 +:103B6000CBF9FFF7B8FF6846FEF2E2F9494934396C +:103B7000886A05221206904388624F48C030016867 +:103B80008908890001604C491E2088622000F1F7F5 +:103B9000D1FEFFF25FFA41493F220F20FEF2B7FE4D +:103BA0003C494A488C310860FFF2AEFE00F370F9E0 +:103BB000FFF78AFFFEF25CFAFFF2B2FB44480168AD +:103BC0000B220904090C5204891801604149086854 +:103BD0008A0C90430860EDF709FD2E497439086896 +:103BE0000122D206104308602D49403108690A0DB0 +:103BF000104308613248C0380CF082F82849C031BF +:103C0000086B032210430863012038BD2B490420B0 +:103C100010B508600620FBF775FD2F480068C06BE3 +:103C2000F1F788FE10BD10B50C0011000B229201B7 +:103C30008018426920004032537D127D0C30FEF224 +:103C400033FF10BD70B506004965C86D0C000D004E +:103C50000188821D1434300013F0F7FD0200E96D75 +:103C60002000FEF23BFF28882084606880780009ED +:103C7000052833D1E069012149060843E0610321A9 +:103C80002800217002210C30FEF2FFFE2BE0000024 +:103C9000E405000434A90080002101C0FF030000F6 +:103CA00080A20080EBEFEBFFE8EEEAFFFAFEFAFFFE +:103CB000F8ECEAFFFFFFFEFF40A4008000A80080B0 +:103CC000C0A00080F058000400A60080010003009E +:103CD00000AE008000210080682201C0F73D53063D :103CE00001000000C83601000004000081B4181F64 -:103CF0000E2907D2CD48072901D889000818006B82 -:103D00000004000C70470E2805D2C84A072803D8C3 -:103D1000800080180163704711637047F0B5002080 -:103D200087B0F9F717FE002804D10120F9F712FE39 -:103D3000002801D0012100E0002102200591F9F7BF -:103D400009FE04900320F9F705FEBD4900914C14CB -:103D50000599B74AB74BB84EB84F250000290393D1 -:103D6000029201D015001C00049901431FD00220CB -:103D700008F01DFE002801D035403C40032008F02B -:103D800016FE002803D00298039905400C4001203C -:103D900008F00DFE002805D0009802990540039810 -:103DA0000D4004400498002801D035403C40A5480F -:103DB000C562046307B0F0BD70B50600FFF232F9CA -:103DC000A14C250C002E07D0A04900200862FFF767 -:103DD000A5FFE068284316E0FAF746FB002810D05C -:103DE00003210020FEF2F0FA9048803001680122A1 -:103DF000D2069143016001680E224908490011432F -:103E00000160E068A843E06070BD8648C068704704 -:103E1000844A0B0008219432480110B5FEF2FBFFE2 -:103E2000002800D0012010BD7E4A08211432002055 -:103E300010B5FEF2D2FF002800D0012010BD10B551 -:103E40000CF0BCF80CF0B4F8FFF7EEFF7548002159 -:103E5000C0680006000EFFF7DBFF10BD10B5FFF7CE -:103E6000EEFF00200CF082F810BD10B5D024002128 -:103E700022000800FEF24CFF641CFF2CF7D910BD95 -:103E800038B522206B46187032205870FF20987089 -:103E900064480D00416081681400002904D10121AB -:103EA0008160FBF7BDFD02E00120F8F7AFF92800C3 -:103EB000FFF258F8002872D0FFF7BCFE64485B4957 -:103EC000406A0200203213790B6252794A62614AD9 -:103ED000037893624388D362806A0204120C002044 -:103EE00083005B181A63401C0728F9DD0120FEF2ED -:103EF00087FEFEF20BF8FFF7B8FF6846FEF222F8E5 -:103F000047493439886A05221206904388624D4831 -:103F1000C03001688908890001604A491E20886212 -:103F20002000F1F730FCFFF29FF83F493F220F20BD -:103F3000FEF2F7FC3A4948488C310860FFF2EEFC8B -:103F4000FFF2B0FFFFF78AFFFEF29CF8FFF2F2F9F2 -:103F5000424801680B220904090C520489180160C7 -:103F60003F4908688A0C90430860EDF7DFFA2C4956 -:103F7000743908680122D206104308602B49403189 -:103F800008690A0D104308613048C0380CF056F833 -:103F90002649C031086B032210430863012038BD55 -:103FA0002949042010B508600620FBF71FFD2D48A5 -:103FB0000068C06BF1F7E7FB10BD10B50C00A03036 -:103FC0001100437B027B20000C30FEF277FD10BD18 -:103FD00070B506004965C86D0C000D000188821D92 -:103FE0001434300013F005FC0200E96D2000FEF2ED -:103FF0007FFD28882084606880780009052833D1F7 -:10400000E069012149060843E0610321280021708D -:1040100002210C30FEF243FD2BE00000B40100044D -:1040200034A90080501D01C0FF03000080A2008061 -:10403000EBEFEBFFE8EEEAFFFAFEFAFFF8ECEAFF3F -:10404000FFFFFEFF40A4008000A80080C0A0008009 -:10405000E458000400A600800100030000AE0080C8 -:1040600000210080A81E01C0220029003000FFF7B7 -:10407000A4FFE16901221203A8789143E16104F3EE -:104080006FFEE563E06270BD0100CA00F8490020E0 -:1040900051180968F64B1B1DD2181268D206D20EB1 -:1040A00001E0091D401C0B1DDB06DB0E9342F8D11D -:1040B0007047F8B505000E00170001240EF0C0F996 -:1040C000A0370090B97DEA4AC800121D8318121F5C -:1040D000E84F82180C2E19D110681B68061DF606D1 -:1040E000DB06F60EDB0E9E4201D10024D5539F065F +:103CF000220029003000FFF7A0FFE1690122120332 +:103D0000A8789143E16105F32BF8E563E06270BDAB +:103D10000100CA00F849002051180968F64B1B1D24 +:103D2000D2181268D206D20E01E0091D401C0B1DEC +:103D3000DB06DB0E9342F8D17047F8B505000E00A4 +:103D4000170001240EF058FA80370090397AEA4AB9 +:103D5000C800121D8318121FE84F82180C2E19D1AB +:103D600010681B68061DF606DB06F60EDB0E9E428B +:103D700001D1002413E03B680326B6023343C60694 +:103D8000F60E49010E4333431D60001D8006800E70 +:103D9000106004E0DA48ECF7CBFC13F09EEF0098DB +:103DA0000EF02EFA2000F8BDF8B5050000896F6905 +:103DB0004419E06D00281ED0002F07D10EF01CFA28 +:103DC000CF48401CECF7B4FC13F086EF2600143605 +:103DD00021003800FFF740FF280013F051FC603449 +:103DE000217A3A003000FFF7A8FF002804D128000C +:103DF00013F06CFC0020F8BD0120F8BDF8B50500FB +:103E0000012700896E694419280013F039FC6820E5 +:103E1000015D200032001430FFF78FFF002803D12E +:103E2000280013F053FC00273800F8BDF8B5050052 +:103E300000896E694419002E02D10EF0DDF9FEE70B +:103E4000E06D2700143700281CD021003000FFF758 +:103E500003FF786880780009092802D101216820D1 +:103E60000155280013F00CFC2100300013F099FCE0 +:103E7000002806D1280013F029FC0120EDF738FCBA +:103E8000EFE70120F8BD70B506004965C86D0C006C +:103E90000D00143400283CD0002160602181298865 +:103EA0002184208D7F21C9008843A9784906890D86 +:103EB00008432085E261E9886184A888002806D04B +:103EC0006088000403D42100280013F09FFD60687F +:103ED00080780107890F01290BD1010928000C30D6 +:103EE0000A2901D1002102E0082902D10321FEF2B2 +:103EF000D6FD220029003000FFF79FFE2200290096 +:103F0000300013F0D3FC298AA181698AE181012064 +:103F1000E56370BDF8B504000F00008966690519F6 +:103F2000002E07D10EF068F97548801CECF700FCF4 +:103F300013F0D2EEE86D002824D00EF05DF9009069 +:103F4000200013F09DFB3A0029003000FFF79BFF93 +:103F50000EE0200013F0BAFB00980EF051F901209A +:103F6000EDF7C6FB0EF048F90090200013F088FB37 +:103F70002900300013F015FC0028EAD000980EF05C +:103F80003FF90120F8BD1CB50200A3320C00511E00 +:103F900001924B1E8A1E009121009C30FEF2D1FD41 +:103FA0001CBD10B50400A0348030E378A278C0694D +:103FB000FFF2DAF810BD0A00803010B5C1691000B8 +:103FC000FEF254FC10BD4F4A10B5126904231A408A +:103FD0004D4B1A624D4AFEF257FE10BD4948016929 +:103FE0008908890001610169474A126A1143016128 +:103FF0007047002801D108207047102070474149C0 +:10400000203108757047424A80008018026809070D +:10401000090C0F231B039A430A43026070473C4B71 +:10402000D96B0207080100091043D863704710B527 +:1040300004000BF079FC01002000FEF2EEFB2000F2 +:104040000BF075FCFF2801D0FFF7E9FF10BDA03091 +:1040500010B582780100C078824208D20A78487888 +:10406000824204D213F00CEF022801D1052010BDCA +:10407000002010BD10B501F003F810BD254810B5A3 +:10408000016B0A2211430163FBF783FE10BD08B5E3 +:10409000694601F02FFA002804D16B461870587059 +:1040A000987003E06B461878002801D1012002E0E7 +:1040B000012802D1002006F051FC6B46187808BD9B +:1040C000154909220800383010B5FFF23FF910BD3C +:1040D00010B5FFF766FFFFF7AAFF104800798006CA +:1040E00001D5002000E00120FEF270FD48B762C05B :1040F00001000000C43A01000004000075DB6DAB54 -:1041000013E03B680326B6023343C606F60E4901A8 -:104110000E4333431D60001D8006800E106004E0D6 -:10412000DA48ECF70FFB13F0A8ED00980EF096F9C3 -:104130002000F8BDF8B5050000896F694419E06DED -:1041400000281ED0002F07D10EF084F9CF48401C64 -:10415000ECF7F8FA13F090ED260014362100380041 -:10416000FFF740FF280013F061FA6034217A3A002B -:104170003000FFF7A8FF002804D1280013F07AFAD6 -:104180000020F8BD0120F8BDF8B505000127008921 -:104190006E694419280013F049FA6820015D200077 -:1041A00032001430FFF78FFF002803D1280013F0EE -:1041B00061FA00273800F8BDF8B5050000896E697E -:1041C0004419002E02D10EF045F9FEE7E06D2700FC -:1041D000143700281CD021003000FFF703FF786857 -:1041E00080780009092802D10121682001552800A2 -:1041F00013F01CFA2100300013F0A7FA002806D1B2 -:10420000280013F037FA0120EDF712FAEFE701204A -:10421000F8BD70B506004965C86D0C000D0014347A -:1042200000283CD000216060218129882184208DD4 -:104230007F21C9008843A9784906890D0843208554 -:10424000E261E9886184A888002806D060880004BB -:1042500003D42100280013F0A9FB606880780107CF -:10426000890F01290BD1010928000C300A2901D13D -:10427000002102E0082902D10321FEF21AFC2200EB -:1042800029003000FFF7A3FE22002900300013F0C0 -:10429000DDFA298AA181698AE1810120E56370BD87 -:1042A000F8B504000F00008966690519002E07D1D2 -:1042B0000EF0D0F87548801CECF744FA13F0DCECF3 -:1042C000E86D002824D00EF0C5F80090200013F00F -:1042D000ADF93A0029003000FFF79BFF0EE0200007 -:1042E00013F0C8F900980EF0B9F80120EDF7A0F925 -:1042F0000EF0B0F80090200013F098F9290030007B -:1043000013F023FA0028EAD000980EF0A7F8012055 -:10431000F8BD1CB50200CF320C00511E01924B1E9D -:104320008A1E00912100C830FEF215FC1CBDC03071 -:1043300010B5C37B827B8068FEF220FF10BD0A00AF -:10434000C03010B581681000FEF29AFA10BD504AD4 -:1043500010B5126904231A404E4B1A614E4AFEF200 -:104360009DFC10BD4A480169890889000161016905 -:10437000484A1269114301617047002801D10820A1 -:104380007047102070474249203108757047434AF2 -:104390008000801802680907090C0F231B039A4349 -:1043A0000A43026070473D4BD96B020708010009C0 -:1043B0001043D863704710B504000BF05FFC010098 -:1043C0002000FEF234FA20000BF05BFCFF2801D045 -:1043D000FFF7E9FF10BDC03010B5827B0100C07B44 -:1043E000824208D20A7B487B824204D213F014ED49 -:1043F000022801D1052010BD002010BD10B500F02D -:10440000F9FF10BD264910B5086B0A2290430863D6 -:10441000FBF7BFFD10BD224810B5016B0A22114306 -:104420000163FBF7B7FD10BD08B5694601F030FA2E -:10443000002804D16B4618705870987003E06B46E2 -:104440001878002804D1002006F028FA012002E0A4 -:10445000012802D1002006F00FFC6B46187808BD39 -:104460000EB56B4618705970009801A901F0BFF99C -:10447000002805D001A806F031FA012006F00EFA56 -:104480000EBD000030A9008000A0008007000100E0 -:1044900040A60080501D01C0C5F3000000A10080AF -:1044A00000230080FC4909220800383010B5FEF2D4 -:1044B00057FF10BD10B5FFF73AFFFFF77CFFF74835 -:1044C0000079800601D5002000E00120FEF288FB83 -:1044D00010BD030009200F3B00B508F3FAEF100CE4 -:1044E0000E1215181B1B090C12151B1B1B1B1B097D -:1044F0002022052010E0E02201E0FF225D6CC3A233 +:1041000010BD030009200F3B00B513E030A900806B +:1041100000A000800700010040A60080002101C02F +:10412000F1F0000000A1008000230080E4050004FD +:104130003A5C000409F3CCE9100C0E1215181B1B95 +:10414000090C12151B1B1B1B1B092022052010E04C +:10415000E02201E0FF22E13207200AE01F225201A3 +:1041600007E03F22520104E07F22520101E0FF22DA +:1041700052010A40510905D00420401C4908FCD1D5 +:104180000006000E00BDF8B505000024F14E210028 +:104190002800FFF71AFF010030552000FEF257FA01 +:1041A000641C2406240E0C2CF1D9EA4F0E24803F07 +:1041B00080353E009036E9692000FFF7A2FF21011B +:1041C0008000C9198019FF398038491E641CC06EEF +:1041D0002406240E4862152C0862ECD91724E969DC +:1041E0002000FFF78EFF2201DA4980008039801914 +:1041F00051188038C06E042702003A435307DB0F82 +:10420000B8439B00184303235B03FF399A433F03E2 +:104210008139D2198A615204920F52039843641C67 +:1042200010432406240E1E2CC861D8D9CA48002188 +:10423000C0680006000EFFF735FCF8BD10B5FFF7AB +:1042400000FFC6480079800601D5002000E001206B +:10425000FEF2C6FC10BD00207047C1490868042268 +:10426000904308607047BE494039486904221043B2 +:1042700048617047BB49886A012252041043886232 +:104280007047B94880690004000C7047FFB583B0DF +:10429000140006000D00102A02D3012007B0F0BD63 +:1042A000082000900DF0B2FF0190AD480068029028 +:1042B000FDF2ECFEAA4FAD4B00204037002E01D19D +:1042C000002100E0295C0201121999541109090129 +:1042D000C91804C9FA6104C93A6204C97A62096852 +:1042E000B962009A01001143012252021143F9629E +:1042F000F96A090CFCD1401C0628DFD3984B012039 +:10430000A0408033002E02D1196881430BE0002CBD +:1043100004D1974CAA882968A162E2620699012912 +:1043200002D11968014319608D490298086001980B +:104330000DF070FF0020B1E789484021403810B5EA +:104340004162416901225206114341610120FDF29F +:1043500091FE84484038416A0422114341628049F9 +:1043600008688A0C1043086010BD7D4B0020403B5C +:1043700000B5586258690121490688435861FFF722 +:104380006CFF586BFF210843586300BDF0B5012551 +:104390002C008C40724E72498540059F8036403912 +:1043A000002A0ED03268224332604A6B2A434A63A5 +:1043B0006D49403188606C480362076144200860A1 +:1043C000F0BD3068A0433060486BA8434863F0BD3F +:1043D000634940310A6B06231A400B6B93430B630E +:1043E0005F4B8006800E403B1862086B10430863E9 +:1043F00070475B484038006A8006800E704770B591 +:10440000FDF216FF04000D00FFF73BFF8202D317F9 +:104410002900200008F31EEC19002B00A21A8B4182 +:104420001900FFF72EFF84022000E4170B00210083 +:1044300080185941FDF289FF49494031086B042237 +:104440001043086346494039486B8A0D104348635E +:1044500070BD43494031086B042290430863C80D86 +:104460003F494039486370473D490028086803D0F8 +:10447000400840000E2202E0800880000C22104319 +:104480000860704736490028086803D00522904329 +:104490000A2202E0C008C0000822104308607047EA +:1044A00030B500232C49324C2D4D0A69C03C002800 +:1044B00010D0002A07D1E06A8861206BC8612868A3 +:1044C000486101200861E3622363286829490843A1 +:1044D000286030BD002AFCD08869E062C86920638A +:1044E000486928600B614B618B61CB6130BD1C4812 +:1044F00000682021084070471F490922B803482C52 :1045000001000000C03E0100000400002601BEC7FB -:10451000E13207200AE01F22520107E03F22520148 -:1045200004E07F22520101E0FF2252010A405109BA -:1045300005D00420401C4908FCD10006000E00BD37 -:10454000F8B505000024DB4E21002800FFF701FF2D -:10455000010030552000FEF284F8641C2406240E6D -:104560000C2CF1D9D34F0E24803FC0353E0090363D -:10457000A9682000FFF7B7FF21018000C919801941 -:10458000FF398038491E641CC06E2406240E486220 -:10459000152C0862ECD91724A9682000FFF7A3FFA7 -:1045A0002201C44980008039801951188038C06EBA -:1045B000042702003A435307DB0FB8439B0018431C -:1045C00003235B03FF399A433F038139D2198A6180 -:1045D0005204920F52039843641C10432406240E85 -:1045E0001E2CC861D8D9B4480021C0680006000E4E -:1045F000FFF722FCF8BD10B5FFF7E7FEAC480079E5 -:10460000800601D5002000E00120FEF2F3FA10BD83 -:1046100000207047A9490868042290430860704749 -:10462000A649403948690422104348617047A449AB -:10463000886A01225204104388627047A148806949 -:104640000004000C7047FFB583B0140006000D0095 -:10465000102A02D3012007B0F0BD082000900DF011 -:1046600003FF0190954800680290FDF219FD964BFA -:104670000020002E01D1002200E02A5C010109196E -:104680005A5409090901CA188C4980CA4031CF61BE -:1046900080CA0F6280CA4F6212688A62009A8F0DC8 -:1046A00002433A43CA62401C0628E2D3834B0120EE -:1046B000A0408033002E02D1196881430BE0002C0A -:1046C00004D1824CAA882968A162E2620699012974 -:1046D00002D119680143196078490298086001986D -:1046E0000DF0C6FE0020B6E774484021403810B5F2 -:1046F0004162416901225206114341610120FDF2EC -:10470000C3FC6F484038416A0422114341626B493F -:1047100008688A0C1043086010BD684B0020403BBD -:1047200000B5586258690121490688435861FFF76E -:1047300071FF586BFF210843586300BDF0B5012598 -:104740002C008C405D4E5D498540059F8036403988 -:10475000002A0ED03268224332604A6B2A434A63F1 -:104760005849403188605748036207614420086017 -:10477000F0BD3068A0433060486BA8434863F0BD8B -:104780004E4940310A6B06231A400B6B93430B636F -:104790004A4B8006800E403B1862086B104308634A -:1047A000704746484038006A8006800E704770B5F2 -:1047B000FDF248FD04000D00FFF740FF8202D31711 -:1047C0002900200008F350EA19002B00A21A8B419F -:1047D0001900FFF733FF84022000E4170B002100CB -:1047E00080185941FDF2BBFD34494031086B042269 -:1047F0001043086331494039486B8A0D10434863C0 -:1048000070BD2E494031086B042290430863C80DE7 -:104810002A4940394863704728490028086803D06E -:10482000400840000E2202E0800880000C22104365 -:104830000860704721490028086803D0052290438A -:104840000A2202E0C008C000082210430860704736 -:104850001F49092210B5CA610A624A608A60CA60AB -:1048600000230A614B618A6108601A4802007032B5 -:104870008A6208324862CA6217491160174951605A -:104880000BF008FF124810BD1549886070470D4AAB -:104890008000803282180B484030006B4843094941 -:1048A0006031097D4018401F10607047B40100045A -:1048B000365C0004641E01C0501D01C000A30080CE -:1048C00040A8008000A60080646102C000A50080AE -:1048D000E45800042C59000405B700C0D7B600C046 -:1048E00000A00080032810B505D12C20FFF20EFE99 -:1048F0008021014304E02C20FFF208FE4106490E0E -:104900002C20FFF220FE10BD70B50D0004AEBFD00C +:1045100010B5CA610A624A608A60CA6000230A61F3 +:104520004B618A6108601A48020070328A62083260 +:104530004862CA6217491160174951600BF028FFA1 +:10454000124810BD1549886070470C4A80008032BF +:1045500082180A484030006B484308496031097DA1 +:104560004018401F10607047242201C0002101C084 +:104570003A5C000400A3008040A8008000A60080F0 +:10458000645F02C000A50080EB220280F0580004A6 +:104590003859000405B900C0D7B800C000A0008099 +:1045A000032810B505D12C20FFF2B0FF8021014374 +:1045B00004E02C20FFF2AAFF4106490E2C20FFF256 +:1045C000C2FF10BD70B50D00110004002A00F0F705 +:1045D000D3FA01002000FEF753FE002C09D1012D73 +:1045E00007D1264940180F2803D87B21FB20FFF272 +:1045F000AAFF70BDF8B504000D001600002801D018 +:10460000012200E0002200216808012800D0491E94 +:104610001B4B900018584B1C01D1002705E0184B8C +:10462000D2000833D21889005758FFF295FF38009E +:10463000FFF292FF2800FFF7B3FF320029002000AD +:10464000FFF7C0FFFBF7CDF9052803D0FBF7C9F949 +:10465000012808D10B480421FFF275FF0948042105 +:10466000401CFFF270FFF8BD002810B505D10648C8 +:10467000002900D10548FFF26FFF10BD67F6FFFF6C +:1046800048F600C0FE030000DC2301C0E02301C0A7 +:10469000012070476D490869FF22920290435D2214 +:1046A000D202104308616949C031086A0E2200092C +:1046B000000110430862704764490869FF229202B2 +:1046C000904308616149C031086A000A000208622B +:1046D0007047F8B50025A8005D4900244618680019 +:1046E000491F47186000305A395DFFF22CFF641CE7 +:1046F000022CF7DB6D1C012DEDDBF8BD70B504005D +:104700000D00FFF7E6FF012C0AD129002000FEF77B +:10471000B7FDFFF7BDFF4E49C0003031441801E03E +:104720004B4C30344A48A178001D0088FFF20BFF43 +:104730004748E17808300088FFF205FF44482179B6 +:104740000C300088FFF2FFFE41486179103000888C +:10475000FFF2F9FE3E48A17914300088FFF2F3FE23 +:104760003B48E17918300088FFF2EDFE394D002416 +:104770002E001036002C1FD0012C2AD0022C45D040 +:10478000032C5ED1E86801063348090EFFF2DBFE18 +:10479000F06801063048090E0830FFF2D4FEE868E0 +:1047A00001062D48090EC01EFFF2CDFEF06801067D +:1047B0002948090E401D26E0286801062648090EF2 +:1047C000C01CFFF2C0FE306801062348090E0B3002 +:1047D00019E0686801062048090E801CFFF2B3FE4C +:1047E000706801061C48090E0A30FFF2ACFE6868CA +:1047F00001061948090E401EFFF2A5FE7068010669 +:104800001548090EC01DFFF29EFE1AE0A8680106B9 +:104810001148090E401CFFF296FEB06801060E48D2 +:10482000090E0930FFF28FFEA86801060D20090E5F +:10483000C001FFF288FEB0680106090ED120C00059 +:10484000E1E7641C042C95DB70BD000000A700802C +:1048500066F600C0D04201C0820600007FB5002984 +:1048600045D02948274A03781370437853700A7853 +:104870000C000270497841702449A0780978884278 +:1048800035D1234E234D207923000C334007400FB0 +:1048900006D0012817D002282CD003282AD026E0E1 +:1048A0002089A84226D1307801228006C00F0292CA +:1048B0000392194A019018000092184A184B2100DF +:1048C000FFF204FC11E02089A84213D130780122C4 +:1048D0008006C00F02920392124A019018000092C3 +:1048E000114A124B2100FFF26DFC002802D001207A +:1048F00004B070BDE088A84202D0E1780C19C2D1A2 +:104900000020F5E76CF200C03DF200C04E19B6ED94 :1049100001000000BC4201000004000024F866D140 -:10492000110004002A00F0F737F801002000FEF71C -:1049300069FE002C09D1012D07D1264940180F2806 -:1049400003D87B21FB20FFF208FE70BDF8B5040000 -:104950000D001600002801D0012200E000220021F5 -:104960006808012800D0491E1B4B900018584B1CAA -:1049700001D1002705E0184BD2000833D218890076 -:104980005758FFF2F3FD3800FFF2F0FD2800FFF763 -:10499000B3FF320029002000FFF7C0FFFBF795F9B5 -:1049A000052803D0FBF791F9012808D10B48042111 -:1049B000FFF2D3FD09480421401CFFF2CEFDF8BDF3 -:1049C000002810B505D10648002900D10548FFF29E -:1049D000CDFD10BD67F6FFFF00F400C0FE03000030 -:1049E000FC1F01C0002001C0012070476D4908690B -:1049F000FF22920290435D22D2021043086169496E -:104A0000C031086A0E220009000110430862704795 -:104A100064490869FF229202904308616149C031EC -:104A2000086A000A000208627047F8B50025A8006D -:104A30005D49002446186800C91E47186000305AB6 -:104A4000395DFFF28AFD641C022CF7DB6D1C012D21 -:104A5000EDDBF8BD70B504000D00FFF7E6FF012C9B -:104A60000AD129002000FEF7CDFDFFF7BDFF4E491A -:104A7000C0002E31441801E04B4C2E344A48A17836 -:104A8000001D0088FFF269FD4748E1780830008882 -:104A9000FFF263FD444821790C300088FFF25DFD90 -:104AA0004148617910300088FFF257FD3E48A179F6 -:104AB00014300088FFF251FD3B48E179183000883E -:104AC000FFF24BFD394D00242E001036002C1FD074 -:104AD000012C2AD0022C45D0032C5ED1E8680106B7 -:104AE0003348090EFFF239FDF06801063048090E1F -:104AF0000830FFF232FDE86801060D20090EC00102 -:104B0000FFF22BFDF0680106090ED120C00026E05F -:104B1000286801062648090EC01CFFF21EFD3068F9 -:104B200001062348090E0B3019E068680106204889 -:104B3000090E801CFFF211FD706801061C48090E69 -:104B40000A30FFF20AFD686801061948090E401E86 -:104B5000FFF203FD706801061548090EC01DFFF243 -:104B6000FCFC1AE0A86801061148090E401CFFF27F -:104B7000F4FCB06801060E48090E0930FFF2EDFCA6 -:104B8000A86801060A48090E801EFFF2E6FCB0681C -:104B900001060748090E801DE1E7641C042C95DB23 -:104BA00070BD000000A700801CF400C0F44301C0E9 -:104BB000830600007FB5002945D02948274A03789D -:104BC0001370437853700A780C0002704978417072 -:104BD0002449A0780978884235D1234E234D207985 -:104BE00023000C334007400F06D0012817D00228BD -:104BF0002CD003282AD026E02089A84226D130785C -:104C000001228006C00F02920392194A01901800F7 -:104C10000092184A184B2100FFF262FA11E0208935 -:104C2000A84213D1307801228006C00F029203926D -:104C3000124A019018000092114A124B2100FFF213 -:104C4000CBFA002802D0012004B070BDE088A84251 -:104C500002D0E1780C19C2D10020F5E7FCEF00C0CA -:104C6000CDEF00C0B7F300C0365C0004FFFF0000CA -:104C700040FA00C054F800C050F800C0042001C041 -:104C80001C1F01C0241F01C0A54902680968002A31 -:104C900003D0012A01D0022A06D10B789B069B0E75 -:104CA000920113430B7004E00A789206920E803250 -:104CB0000A70C0680028087C02D00222104301E07C -:104CC000FD2210400874704795480168087A0979F8 -:104CD0000902084370479249020A09684A600006BF -:104CE000000E8860012070478D49012309688031DA -:104CF000082804D2097C8340194008007047102816 -:104D000005D24207087B520F93401840704700209D -:104D10007047F0B5824D44692B681800D09F36C1AA +:104920001BF600C03A5C0004FFFF000070FC00C0F2 +:1049300084FA00C080FA00C0E42301C0DC2201C078 +:10494000042301C0A54902680968002A03D0012A8E +:1049500001D0022A06D10B789B069B0E92011343CD +:104960000B7004E00A789206920E80320A70C068DA +:104970000028087C02D00222104301E0FD221040F2 +:104980000874704795480168087A09790902084354 +:1049900070479249020A09684A600006000E886062 +:1049A000012070478D49012309688031082804D20D +:1049B000097C8340194008007047102805D242073F +:1049C000087B520F93401840704700207047F0B5A5 +:1049D000824D44692B681800FF304130002C047A66 +:1049E00002D02026344301E0DF2634400472047AEA +:1049F000090724092401090F0C430472017A802459 +:104A0000214301726321491EFDD2017BC909FCD0FB +:104A10008033986B10702868A030007F0F23000748 +:104A2000010C10681B039843084310602968A031EB +:104A3000097F1C1109090902A04308431060286876 +:104A4000C0300068907029680D000800C0304168CF +:104A50001171017A09070E0C516899433143516075 +:104A6000067AA1433609360231435160C16891711B +:104A700001691172017D09070E0C91689943314358 +:104A80009160067DA1433609360231439160816908 +:104A90009172C16911732900E0310E783607370C25 +:104AA000D6689E433E43D6600F78A6433F093F0237 +:104AB0003E43D660466A9673866A16740E7B360746 +:104AC000370C16699E433E4316610F7BA6433F0990 +:104AD0003F023E431661066B9674466B16750E7E5A +:104AE0003607370C56699E433E435661097EA643FE +:104AF000090909020E435661C06B2900FF3141319B +:104B00009075087A4006400E08720120F0BD70B51D +:104B10001600446800224023E270A3702180050043 +:104B2000A28006223100A01D08F3CAEA2000062256 +:104B300031000C3008F3C4EA2000062231001230A4 +:104B400008F3BEEA207E010909012176208B0107C6 +:104B5000090F218301202870214829002831E861AC +:104B6000080000F002F8002070BD70B50C000500D0 +:104B700001000322200008F3A4EA2078FD21084068 +:104B800020706178A0784906490E40066170400E99 +:104B9000BF210840A07028781249C00705D060786E +:104BA000227800021043884312E068782A780002D5 +:104BB00010438005400E03286078227804D9000253 +:104BC00010438843283003E0000210438843083034 +:104BD0002070000A6070012070BD000018F800C04D +:104BE00000110060F80300000100FF3181314968C5 +:104BF0004118FF31FF31891C0A7F0100FF3141312B +:104C00000A754A75FF227132125C8218FF32FF3238 +:104C1000921C127F0800C0308A74007FC874012083 +:104C2000704710B50400FF3059300021E0300171A9 +:104C3000200003F089FB2000FFF7D6FF10BD70B500 +:104C40000400FF345934250006008035E86BB14973 +:104C50000A308842E86305D2200060300CF020FE64 +:104C600002280DD3300003F06EFB307A002801D10A +:104C700004F045FB0020E034E8632071012070BDA2 +:104C8000002070BD70B50600050011204001FF3600 +:104C90002818047F5936300040300CF013FE287A73 +:104CA000002802D1280004F0C6FA2800FFF7C7FF49 +:104CB00000281DD1002C05D0022C03D004F0B8FA36 +:104CC00000280DD0287A002803D1280004F03FFCEA +:104CD0000400002C04D19048807D400606D401E0F9 +:104CE000012C03D1280003F0AFFC0400E03634713E +:104CF00070BDFF30593000220260C03001680029C9 +:104D000001D00A60026070470300027AFF33593312 +:104D1000002A09D0032A03D1407A0028B12945325C :104D200001000000B8460100000400007722B5BD74 -:104D3000FF304130002C047A02D02026344301E0B9 -:104D4000DF2634400472047A090724092401090F7C -:104D50000C430472017A8024214301726321491EAD -:104D6000FDD2017BC909FCD08033986B1070286894 -:104D7000A030007F0F230007010C10681B0398432D -:104D8000084310602968A031097F1C110909090234 -:104D9000A043084310602868C030006890702968FC -:104DA0000D000800C03041681171017A09070E0C2E -:104DB0005168994331435160067AA143360936025E -:104DC00031435160C168917101691172017D090718 -:104DD0000E0C9168994331439160067DA1433609D9 -:104DE00036023143916081699172C1691173290062 -:104DF000E0310E783607370CD6689E433E43D660C6 -:104E00000F78A6433F093F023E43D660466A967339 -:104E1000866A16740E7B3607370C16699E433E432E -:104E200016610F7BA6433F093F023E431661066BA6 -:104E30009674466B16750E7E3607370C56699E4380 -:104E40003E435661097EA643090909020E43566195 -:104E5000C06B2900FF3141319075087A4006400E41 -:104E600008720120F0BD70B516004468002240238E -:104E7000E270A37021800500A28006223100A01DEF -:104E800008F328E92000062231000C3008F322E95B -:104E9000200006223100123008F31CE9207E0109AF -:104EA00009012176208B0107090F21830120287039 -:104EB000214829002831E861080000F002F80020AC -:104EC00070BD70B50C00050001000322200008F33E -:104ED00002E92078FD21084020706178A078490619 -:104EE000490E40066170400EBF210840A07028782E -:104EF0001249C00705D06078227800021043884329 -:104F000012E068782A78000210438005400E0328DA -:104F10006078227804D9000210438843283003E0E7 -:104F200000021043884308302070000A607001209E -:104F300070BD0000CCF500C000110060F803000057 -:104F400070477047064A0021122310B5545C844212 -:104F500000D15354491C0906090E0329F6D310BD8C -:104F600046F000C00100FF31813110B50C00C96A64 -:104F7000092341189B01C9180A790100FF316131E9 -:104F80000A774A77227E8218D2181279C0188A7658 -:104F90000079C876012010BD10B50400FF308130C3 -:104FA0000021E0300171200003F005FB2000FFF735 -:104FB000D9FF10BD70B50400FF3481342500060010 -:104FC0008035E86BB0490A308842E86305D220009A -:104FD00060300CF0B8FD02280DD3300003F0EAFA7F -:104FE000307A002801D104F0C4FA0020E034E863EC -:104FF0002071012070BD002070BD70B50600050055 -:1050000013204001FF3628180479813630004030E3 -:105010000CF0ABFD287A002802D1280004F045FAF4 -:105020002800FFF7C7FF00281DD1002C05D0022C57 -:1050300003D004F037FA00280DD0287A002803D1D5 -:10504000280004F0BEFB0400002C04D18F48807DB2 -:10505000400606D401E0012C03D1280003F02DFC0A -:105060000400E036347170BDFF30813000220260F0 -:10507000C0300168002901D00A6002607047030057 -:10508000027AFF338133002A09D0032A03D1407A00 -:10509000002809D003E0062A01D0022A04D1012009 -:1050A0001A68884002431A6070470300027AFF338F -:1050B0008133002A09D0032A03D1407A002809D07D -:1050C00003E0062A01D0022A04D1012218688A408E -:1050D000904318600C2048436D49401800210A0095 -:1050E0000B000EC07047F1B588B0002508982E005F -:1050F000FF3081300390001D029003982F00403054 -:10510000049501900DF0C4F90024059003980168FE -:105110000120A040014218D00C2161435C480918CD -:105120002006000E07910690EDF7E7FBC70833371E +:104D300009D003E0062A01D0022A04D101201A6812 +:104D4000884002431A6070470300027AFF335933E8 +:104D5000002A09D0032A03D1407A002809D003E0B1 +:104D6000062A01D0022A04D1012218688A40904301 +:104D700018600C2048436E49401800210A000B00BF +:104D80000EC07047F1B588B0002508982E00FF309E +:104D900059300390001D029003982F004030049575 +:104DA00001900DF051FA002405900398016801204C +:104DB000A040014218D00C2161435D48091820062B +:104DC000000E07910690EDF79CFE0799861906984C +:104DD000091DEDF7B1FE0799C71906980831EDF7DF +:104DE0009DFE451901200490641C042CDDD3049819 +:104DF00000281DD00898A91B00F023FD01984069E8 +:104E00004119019841610198806981190198102F19 +:104E1000816100D910270198C76102984068811903 +:104E20000298002D416003D00298002180308163F8 +:104E300005980DF00DFA09B0F0BD0922002192018C +:104E400080180176704709220121920180180176AD +:104E50007047092110B5040089014018007E01281F +:104E600008D02000FFF78EFF2000FFF715FF20007D +:104E7000FFF7C4FE10BD10B504F063FA03F06FFE37 +:104E800002F08DFE03F089FA10BD38B50500092047 +:104E900080012818040005F397FF01220092254A9B +:104EA0002B000121200005F377FF38BD0200092304 +:104EB0009B01C01810B5007EFF325932012802D084 +:104EC000101D03F04EFC10BDFEB50D0038210C5C2A +:104ED0001600FE2C05D0210003F0B0FF07063F0EA0 +:104EE0000CE0FF2156310C5CFF3021005D3003F0F7 +:104EF000CAFF002801D0012700E0002720006A46F1 +:104F000001A903F082FF002808D06B4618782870AA +:104F100018794000401CB900084301E000202C70C3 +:104F20003070FEBD87E60000102700007A5C0004A8 +:104F3000B04401C0DB470100FF4908707047FE48DC +:104F400000787047FD480078002803D0FC48807C3A +:104F50000009704701207047F8480078002804D005 +:104F6000F748807C0007000F704701207047F44825 +:104F700000787047F14800B50078002100280CD077 +:104F8000EF4A10780D2808D1FFF7E6FF032804D177 +:104F9000FFF7D8FF032800D1D17A080000BDE74809 +:104FA0000078002802D0E6490E2008567047E348F2 +:104FB0000078002802D0E248007C7047102070473B +:104FC0000200080000B5110087B000F391FA01A9B2 +:104FD00000F3D9F8002803D06B46D87A07B000BD9B +:104FE0001420FBE70200080000B5110087B000F3B1 +:104FF0007FFA01A900F3C7F80028EFD06B46987A32 +:10500000ECE7CF480178407C8006800F7047CB48A2 +:105010000078704700B5FFF79FFF0100FFF792FF90 +:105020000022814206D14B1E194203D1411E084283 +:1050300000D10122100000BD10B5FFF78DFFC1495E +:105040000024496A421E603102400123002ACC72CA +:1050500004D006284B7300D1CB7210BD02284C73CC +:10506000FAD00428F9D10220C87210BD10B5FFF79C +:1050700069FFB4490024496A421E6031024001239D +:10508000002A8C7204D006280B7300D18B7210BDDD +:1050900002280C73FAD00428F9D10220887210BDBE +:1050A00000B5FFF7C9FFFFF7E1FF00BD38B50C0001 +:1050B000A349C97B002901D0217007E06946FFF2AE +:1050C000F0FF002803D06B4618782070012038BD0F +:1050D00038B50400002000909848007800281AD0C5 +:1050E000FAF778FD002816D1954908780D2812D1D5 +:1050F000487CC0070FD120006946FFF7D7FF002882 +:1051000003D06B461878002801D1B02000906B4680 +:105110001878FAF772FD38BD00280FD08749097852 +:1051200000290BD086490A780D2A07D10A8C8B9961 :1051300001000000B44A010000040000834DC009D2 -:10514000079986190698091DEDF7FCFB0799C71901 -:1051500006980831EDF7E8FB451901200490641C1E -:10516000042CDDD3049800281DD00898A91B00F05A -:1051700036FD0198406941190198416101988069A3 -:1051800081190198102F816100D910270198C761FA -:105190000298406881190298002D416003D002985E -:1051A00000218030816305980DF080F909B0F0BDD1 -:1051B00005220021D20180180170704705220121CB -:1051C000D201801801707047052110B50400C90193 -:1051D00040180078012808D02000FFF78EFF20003B -:1051E000FFF715FF2000FFF7C7FE10BD10B504F054 -:1051F000E2F903F0EDFD02F01AFE03F005FA10BD2E -:1052000038B505004D20C0002818040005F3E6FD60 -:1052100001220092244A2B000121200005F3C6FD43 -:1052200038BD02000523DB01C01810B50078FF323D -:105230008132012802D0101D03F0CCFB10BDFEB559 -:105240000D0038210C5C1600FE2C05D0210003F067 -:105250002FFF07063F0E0CE0FF217E310C5CFF3074 -:105260002100853003F049FF002801D0012700E02C -:10527000002720006A4601A903F001FF002808D09A -:105280006B461878287018794000401CB900084314 -:1052900001E000202C703070FEBD87E61027000072 -:1052A000765C0004D44501C03D4B0100FF49087005 -:1052B0007047FE4800787047FD480078002803D00A -:1052C000FC48807C0009704701207047F84800784E -:1052D000002804D0F748807C0007000F70470120A9 -:1052E0007047F44800787047F14800B50078002115 -:1052F00000280CD0EF4A10780D2808D1FFF7E6FF00 -:10530000032804D1FFF7D8FF032800D1D17A080081 -:1053100000BDE7480078002802D0E6490E20085674 -:105320007047E3480078002802D0E248007C7047CC -:10533000102070470200080000B5110087B000F38C -:10534000E1F801A9FFF229FF002803D06B46D87AC3 -:1053500007B000BD1420FBE70200080000B51100F3 -:1053600087B000F3CFF801A9FFF217FF0028EFD0B4 -:105370006B46987AECE7CF480178407C8006800F36 -:105380007047CB480078704700B5FFF79FFF0100DA -:10539000FFF792FF0022814206D14B1E194203D132 -:1053A000411E084200D10122100000BD10B5FFF7D8 -:1053B0008DFFC1490024496A421E60310240012329 -:1053C000002ACC7204D006284B7300D1CB7210BDDA -:1053D00002284C73FAD00428F9D10220C87210BDFB -:1053E00010B5FFF769FFB4490024496A421E6031D5 -:1053F00002400123002A8C7204D006280B7300D1CE -:105400008B7210BD02280C73FAD00428F9D1022047 -:10541000887210BD00B5FFF7C9FFFFF7E1FF00BDBF -:1054200038B50C00A349C97B002901D0217007E0E1 -:105430006946FFF240FE002803D06B4618782070C2 -:10544000012038BD38B5040000200090984800784D -:1054500000281AD0FAF798FC002816D19549087848 -:105460000D2812D1487CC0070FD120006946FFF7F4 -:10547000D7FF002803D06B461878002801D1B02050 -:1054800000906B461878FAF787FC38BD00280FD0DB -:105490008749097800290BD086490A780D2A07D157 -:1054A0004A7B02700A7D4270497D817001207047FD -:1054B0000020704770B5050015D07D4800780028A1 -:1054C00011D07C4C20780D280DD10321280007F342 -:1054D000D2EE607B0007000F01D0012803D1280025 -:1054E000FFF7D4FF70BD002070BD70B50C00160032 -:1054F000002935D06E490978002931D06D4D2978C1 -:105500000D292DD100282BD1290009221631200088 -:1055100007F3EAEDFFF7E8FE002E1FD000281DD0AC -:10552000E1784140E170617841406170217A414009 -:105530002172297D490711D5A178414030A8B6AD27 +:105140004A7B02700A7D4270497D81700120704760 +:105150000020704770B5050015D07D480078002804 +:1051600011D07C4C20780D280DD10321280008F3A4 +:1051700082E8607B0007000F01D0012803D12800DE +:10518000FFF7D4FF70BD002070BD70B50C00160095 +:10519000002935D06E490978002931D06D4D297824 +:1051A0000D292DD100282BD12900092216312000EC +:1051B00007F39AEFFFF7E8FE002E1FD000281DD05E +:1051C000E1784140E170617841406170217A41406D +:1051D0002172297D490711D5A1784140A17021781C +:1051E00041402170217941402171617941406171D3 +:1051F000A1794140A171E1794140E171012070BD87 +:10520000002070BDF8B504000D0016001F000AF064 +:105210005DFE3B003200290020000BF091F80028D1 +:1052200001D102F0A7FD0020F8BD10B50AF039FF4A +:1052300010BDFFB583B00100FF250400029542793F +:1052400000262F000831684607F34EEF04982178B6 +:1052500002786078000208434049884217D2E0781B +:10526000A37800021843884211D9B42A01D2C83267 +:105270002A4000206B4607E0195CB42901D2C831EE +:105280001954401C0006000E61798142F4D86379FC +:1052900000201FE06946095C91420CD104990A7014 +:1052A000059A6946095C1170069A11700C9908708C +:1052B0000D99087020E0914203D2B14201D90E004D +:1052C0000290914203D9A94201D20D000700401C6F +:1052D0000006000E8342DDD8FF2F10D00298FF2871 +:1052E0000DD00498027005980670069805700C9908 +:1052F000029808700D980770012007B0F0BD0020DB +:10530000FBE7F7B592B010AB1600597A187A00F3A4 +:10531000F9F80AA91090FFF240FF00287ED010ABE8 +:10532000187B08ABD97B884202D8997B884201D28E +:1053300010AB197305480078002805D010AB187B16 +:105340000A2801D90A20187310AB09E01CF800C024 +:10535000FCFD00C0286201C0F05800048813000062 +:105360005D7B2F00022D00D1012710AB1A7B109816 +:105370001400390009ABFFF2A7FF0028CED010AB14 +:10538000987B022D11900AD111984008012806D16E +:10539000597A187A119AEFF70DFC10AB587205AADA +:1053A00006A901920091313108AA0AA807ABFFF7BC +:1053B00040FF00286AD008AB1A7B00200AA96BE0E6 +:1053C0000AA909188B7CA34263D8897BA14260D3C8 +:1053D00003AA0092049002006B461B7E10983900CD +:1053E000FFF2DDFF002851D06B46187E1C7DA042E5 +:1053F0002BD002AA00921A7C109839002300FFF2E9 +:10540000CEFF002842D010AB5A7A08216B4600929A +:105410000C20595618561C7F08AB00E036E01A786D +:10542000230000F328F86B46187310AB5A7A6B46CA +:10543000009209210D20595618561C7F08AB1A7886 +:10544000230000F318F86B46587308AB59796B4684 +:10545000587B08AB09185971997908189871D8794F +:105460006B46197B08AB41184906C009490EC001BB +:105470000143022DD97127D1119800F360F8010082 +:10548000109802AAFFF2C1FE002808D1002015B032 +:10549000F0BD401C0006000E824291D8F6E708AB32 +:1054A00059796B46187A08AB091859719979081817 +:1054B0009871D8796B46597A08AB41184906490E5C +:1054C000C009C0010143D97108AB5879307098798F +:1054D0007070D8794006400EB0700120D7E713B540 +:1054E00082B06B460C00597A187A00F30BF801A9C8 +:1054F000FFF2F1FD002805D06B461879207058792D +:105500006070012004B010BD13B582B06B460C0072 +:10551000597A187AFFF2F6FF01A9FFF2EDFD002893 +:10552000F0D06B4618792070587960700120E9E757 +:1055300013B582B06B460C00597A187A71949C4F5F :1055400001000000B04E010000040000D097136578 -:10555000A170217841402170217941402171617908 -:1055600041406171A1794140A171E1794140E1710E -:10557000012070BD002070BDF8B504000D001600BC -:105580001F000AF02FFE3B003200290020000BF024 -:1055900063F8002801D102F027FD0020F8BD10B506 -:1055A0000AF00BFF10BDFFB583B00100FF2504001A -:1055B0000295427900262F000831684607F39EEDD8 -:1055C00004982178027860780002084340498842B4 -:1055D00017D2E078A37800021843884211D9B42A80 -:1055E00001D2C8322A4000206B4607E0195CB4297A -:1055F00001D2C8311954401C0006000E6179814265 -:10560000F4D8637900201FE06946095C91420CD10F -:1056100004990A70059A6946095C1170069A11701E -:105620000C9908700D99087020E0914203D2B142A4 -:1056300001D90E000290914203D9A94201D20D0076 -:105640000700401C0006000E8342DDD8FF2F10D05B -:105650000298FF280DD004980270059806700698ED -:1056600005700C99029808700D980770012007B01A -:10567000F0BD0020FBE7F7B592B010AB1600597AE9 -:10568000187AFFF249FF0AA91090FFF290FD002856 -:105690007ED010AB187B08ABD97B884202D8997BAF -:1056A000884201D210AB197305480078002805D054 -:1056B00010AB187B0A2801D90A20187310AB09E037 -:1056C000D4F500C0CCFB00C0D86401C0E45800048D -:1056D000881300005D7B2F00022D00D1012710AB45 -:1056E0001A7B10981400390009ABFFF2F7FD00286F -:1056F000CED010AB987B022D11900AD111984008A2 -:10570000012806D1597A187A119AEFF763F910AB8C -:10571000587205AA06A901920091313108AA0AA877 -:1057200007ABFFF740FF00286AD008AB1A7B0020C8 -:105730000AA96BE00AA909188B7CA34263D8897B6C -:10574000A14260D303AA0092049002006B461B7E24 -:1057500010983900FFF22DFE002851D06B46187EBC -:105760001C7DA0422BD002AA00921A7C109839000E -:105770002300FFF21EFE002842D010AB5A7A082107 -:105780006B4600920C20595618561C7F08AB00E05F -:1057900036E01A782300FFF278FE6B46187310ABE0 -:1057A0005A7A6B46009209210D20595618561C7FD3 -:1057B00008AB1A782300FFF268FE6B46587308ABFB -:1057C00059796B46587B08AB0918597199790818B3 -:1057D0009871D8796B46197B08AB41184906C00906 -:1057E000490EC0010143022DD97127D11198FFF252 -:1057F000B0FE0100109802AAFFF211FD002808D1A6 -:10580000002015B0F0BD401C0006000E824291D869 -:10581000F6E708AB59796B46187A08AB0918597145 -:10582000997908189871D8796B46597A08AB41185C -:105830004906490EC009C0010143D97108AB587926 -:10584000307098797070D8794006400EB0700120A1 -:10585000D7E713B582B06B460C00597A187AFFF27D -:105860005BFE6946FFF282FC002805D0082220007A -:10587000694607F344EC012004B010BD13B582B0B3 -:105880006B460C00597A187AFFF246FE01A9FFF226 -:105890002CFC0028F0D06B46187920705879607085 -:1058A0000120E9E713B582B06B460C00597A187AEB -:1058B000FFF232FE01A9FFF229FC0028DCD06B4682 -:1058C00018792070587960700120D5E713B582B03F -:1058D0006B460C00597A187AFFF21EFE01A9FFF2FE -:1058E00026FC0028C8D06B46187920705879607063 -:1058F0000120C1E738B50C006946FFF2D8FB00284B -:105900000DD06B461878C007C00F2070187880073C -:10591000C00F607018784007C00FA070012038BD1C -:1059200033B581B06B461D790C0059792800FFF220 -:10593000F3FDFF2802D1002D00D100206946FFF2BF -:1059400006FC002819D06B46032002217AEC02C520 +:10555000FFF2E2FF01A9FFF2EAFD0028DCD06B4672 +:1055600018792070587960700120D5E738B50C00A3 +:105570006946FFF29CFD00280DD06B461878C007E5 +:10558000C00F207018788007C00F6070187840072F +:10559000C00FA070012038BD33B581B06B461D79B6 +:1055A0000C0059792800FFF2B7FFFF2802D1002D27 +:1055B00000D100206946FFF2CAFD002819D06B46D1 +:1055C0000320022118565956884201D15978197082 +:1055D0006B46207058786070D878A070D878E070EA +:1055E00098782071187860719878E0719878A07137 +:1055F00001203EBDF3B589B00C000998002837D0D2 +:10560000207D0E2834D214264643B14D2021A859BE +:10561000401CA85101A807F30EEE200001A903F0D9 +:10562000A2FA677D607E009020680121806880007A +:1056300000281FDB0098401C02062069120E00287B +:1056400000D000210998F6F79CFA206901A90028EA +:1056500024D10E2F05D21420784340194268521CE1 +:105660004260009800280BD170198168491C816044 +:105670000BB0F0BD2069002800D000210022E1E736 +:1056800000200206120E142353438A5C5B199C68A7 +:10569000401CA2180E289A60F3D3E9E7E07D0028A9 +:1056A00004D070190269521C026103E07019C268CB +:1056B000521CC26000200206120E142353438A5C5F +:1056C0005B199C68401CA2180E289A60F3D3CFE7A0 +:1056D00010B5FF2419347E49220007F37AED7C4887 +:1056E000210007F3A8ED10BD70B50D00002805D00E +:1056F0000521C90140180468002C06D1002D03D0F3 +:105700004C21280007F3C0ED70BD724AD168724881 +:10571000036859186F4B0160403B2162596B466822 +:10572000711841606162196B836859188160A162C8 +:105730001168C2685118C160002DA163E4D0A06C4B +:10574000290007F32EEE6069291D07F32AEE2900D0 +:10575000A069083107F324EE2900E0690C3107F352 +:1057600020EE2900206A103107F31AEE2900606A42 +:10577000143107F316EE2900A06A183107F310EE72 +:105780002900E06A1C3107F30CEE2900206B203160 +:1057900007F306EE2900606B243107F302EE2900BF +:1057A000A06B283107F3FCED2900E06B2C3107F3E7 +:1057B000F8ED2900A06E343107F3F2ED2900E06E18 +:1057C000383107F3EEED2900206F3C3107F3E8EDA7 +:1057D0002900606F403107F3E4ED04F0B5FA2900C9 +:1057E000443107F3DEED04F0ACFA2900483107F349 +:1057F000D8ED70BDF0B4002835D00522D201821852 +:105800001268002A2FD04B7ED46AE418D4620C6947 +:10581000002C23D10D68EC6DE678F60707D0A6784A +:105820003607B60F022E02D1A67CF60702D1A47964 +:10583000E40702D0946C641C9464D46B641CD4633D +:10584000AC68A4000DD4002B0BD09469641C012B10 +:10585000946106D9D3695B1CD36102E053695B1C78 +:105860005361F0BCC6E6F0BC7047002808D00522A2 +:10587000D20180180068002802D082695118816125 +:105880007047002810B51AD00523DB01C31818682B +:10589000002806D04469641C44611868C36B5B1C13 +:1058A000C3630E290BD214204843094B1958491CD5 +:1058B000002A195003D0C0180169491C016110BDAC +:1058C000FF210348193110B507F3B4EC002010BDD7 +:1058D000005B000440A8008020F800C010B50FC88D +:1058E000FE4C0FC40020FE49087012F00AEB0AF0CB +:1058F000AEFF10BDFFB581B0040000251F00039965 +:105900006A460095EEF7EAFE060002980CF02EF9C2 +:10591000002807D002990098E222EBF7FCF801205A +:1059200005B0F0BD002E18D1002F07D06069029994 +:105930000EF0AAFF002801D0A5800EE060690028C3 +:1059400006D0026B002A03D003992000845DD69E06 :1059500001000000AC520100000400006F5236D676 -:1059600018565956884201D1597819706B462070E3 -:1059700058786070D878A070D878E07098782071E6 -:10598000187860719878E0719878A07101203EBD18 -:10599000F3B589B00C000998002837D0207D0E2877 -:1059A00034D214264643B14D2021A859401CA85199 -:1059B00001A807F34AEC200001A903F00DFA677D66 -:1059C000607E0090206801218068800000281FDB35 -:1059D0000098401C02062069120E002800D0002109 -:1059E0000998F6F71CFA206901A9002824D10E2F86 -:1059F00005D21420784340194268521C4260009836 -:105A000000280BD170198168491C81600BB0F0BD72 -:105A10002069002800D000210022E1E700200206D2 -:105A2000120E142353438A5C5B199C68401CA21815 -:105A30000E289A60F3D3E9E7E07D002804D07019BE -:105A40000269521C026103E07019C268521CC260F4 -:105A500000200206120E142353438A5C5B199C68D3 -:105A6000401CA2180E289A60F3D3CFE710B5FF248C -:105A700019347E49220007F3B6EB7C48210007F376 -:105A8000E4EB10BD70B50D00002805D00521C9015B -:105A90004018446A002C06D1002D03D04C21280068 -:105AA00007F3FCEB70BD724AD1687248036859185D -:105AB0006F4B0160403B2162596B46687118416031 -:105AC0006162196B836859188160A1621168C268AC -:105AD0005118C160002DA163E4D0A06C290007F328 -:105AE0006AEC6069291D07F366EC2900A06908319A -:105AF00007F360EC2900E0690C3107F35CEC290046 -:105B0000206A103107F356EC2900606A143107F35C -:105B100052EC2900A06A183107F34CEC2900E06A26 -:105B20001C3107F348EC2900206B203107F342ECCD -:105B30002900606B243107F33EEC2900A06B28316B -:105B400007F338EC2900E06B2C3107F334EC290023 -:105B5000A06E343107F32EEC2900E06E383107F3E4 -:105B60002AEC2900206F3C3107F324EC2900606FF8 -:105B7000403107F320EC04F021FA2900443107F307 -:105B80001AEC04F018FA2900483107F314EC70BD40 -:105B9000F0B4002835D00522D2018218526A002ABA -:105BA0002FD04B7ED46AE418D4620C69002C23D128 -:105BB0000D68EC6DE678F60707D0A6783607B60FC5 -:105BC000022E02D1A67CF60702D1A479E40702D006 -:105BD000946C641C9464D46B641CD463AC68A4009F -:105BE0000DD4002B0BD09469641C012B946106D951 -:105BF000D3695B1CD36102E053695B1C5361F0BC49 -:105C0000C6E6F0BC7047002808D00522D2018018F3 -:105C1000406A002802D082695118816170470028CB -:105C200010B51AD00523DB01C318586A002806D026 -:105C30004469641C4461586AC36B5B1CC3630E29CE -:105C40000BD214204843094B1958491C002A1950FB -:105C500003D0C0180169491C016110BDFF21034830 -:105C6000193110B507F3F0EA002010BDFC5A00040A -:105C700040A80080D8F500C010B50FC8FD4C0FC477 -:105C80000020FD49087012F008E90AF06CFF10BD11 -:105C9000FFB581B0040000251F0003996A460095F6 -:105CA000EEF72DFC060002980CF08EF8002807D0C5 -:105CB00002990098E222EAF738FF012005B0F0BD12 -:105CC000002E18D1002F07D0606902990EF020FE37 -:105CD000002801D0A5800EE06069002806D0026B84 -:105CE000002A03D003992000904703E00399200085 -:105CF00012F0D6E806003000E0E7F0B58FB00027DC -:105D00003E000697DD48EAF759FD0022D948D24304 -:105D100000920068DA490068082208AB0DF0A0F98B -:105D2000D648801CEAF74AFD089800287ED08003F8 -:105D30000AD507F0CFFFD049022248689043486057 -:105D400002D1D048EBF764FE0898400710D5C94C43 -:105D500005E0079812F0A8E8079807F3ABE3C741FE +:10596000904703E00399200012F0D8EA06003000C7 +:10597000E0E7F0B58FB000273E000697DE48EAF773 +:105980001DFF0022DA48D24300920068DB4900681C +:10599000082208AB0DF00AFBD748801CEAF70EFF7F +:1059A000089800287ED080030AD507F0F7FFD14978 +:1059B000022248689043486002D1D148ECF792F83F +:1059C0000898400710D5CA4C05E0079812F0AAEADB +:1059D000079808F3FBF8606804220068002307A911 +:1059E0000DF0ECFA0F28F0D10898400601D5EEF73B +:1059F000E7FE0898000601D5EEF742FF0898C006BA +:105A000003D5EEF7B6FEFCF276FD0898000710D538 +:105A100007E00698002804D0C168C90401D5F6F74C +:105A2000E0F8B3480022F03806A9F1F251FB0A2849 +:105A3000EFD10898800401D4089819E08020340040 +:105A4000310030811C3430185C3107F3B4EC0500B0 +:105A5000F8F73CFB2200290030000123FFF754FF38 +:105A6000300008F3B3F80898002601210843089095 +:105A7000400401D4089807E0300008F3A7F808981C +:105A80000026012108430890C00713D0002E07D13B +:105A90004B219C480022490108F3C2F804000AD1B6 +:105AA000934800E098E100680722006801210DF0AA +:105AB00089FA0127C3E020001C300E9040300D9081 +:105AC00024300C90002004900E98059080202081B6 +:105AD0000D990C980D0007F36EEC0598EFF700FF99 +:105AE00000287ED0280007F356EC05000420FEF2C3 +:105AF00059FC0004000C0421FCF262FE002DF0D0E1 +:105B00006878297800020843EBD07F498842D9D0D1 +:105B100060382870000A6870A8780007800F7ED16E +:105B200002900CF0AFFB290012310390881FF8F7A8 +:105B30008CFA0690002860612ED0417A022921D18A +:105B40000FF0C7FD0C300190A878000905D002289D +:105B500003D00B2801D00D280AD10198017DE878E7 +:105B6000C006C00F814203D001000698F1F768FD1E +:105B700001984030007D012801D10020A0800698C6 +:105B8000002809D001220092069A2900FF324132F2 +:105B9000200002AB0CF0AFFF03980CF077FBA0885D +:105BA00000281CD00FF0ABF8002818D0012000907E +:105BB00028006946F2F7BFFF6B460190187800286D +:105BC00004D002200FF0AEFDF2F761F90198002831 +:105BD00005D14E4908680122D20290430860200096 +:105BE00000E029E00599FCF788FC002804903AD1F0 +:105BF0002800F8F76BFAA088002814D0069800282F +:105C000009D0007A062806D1A8780107890F02D1A9 +:105C100000090D2807D129002000012300E002E03F +:105C2000059AFFF771FE002E00D14BE7049800287B +:105C300002D0A088002802D1200007F3C7FF0898EF +:105C4000800775D54B212F480022490107F3E8FF53 +:105C500005000DD1264807220068022100680DF0DA +:105C6000B1F9012764E0A0880028DCD02600DAE73B +:105C700028001C300B9040300A90243009900B987B +:105C80000590802028810A9909980C0007F392EB6F +:105C90000598EFF701FE002847D00520FEF282FBB1 +:105CA0000004000C0521FCF28BFD200007F372EBD1 +:105CB00004003AD0607821780002084335D02000F3 +:105CC0000C300FF05FFD069068616078217800026B +:105CD000084360380004000C010A2070002861703D +:105CE000CDD0059A210028000023FFF70DFE0FE01C +:105CF000184701C040F800C000020300FFFF030086 +:105D00000710000010050004FFFF000090F400C021 +:105D10000020069005990322280012F008E9059951 +:105D20000222280012F002E9A9E7280007F34EFF3B +:105D30000898800612D57E4D002406E00598846000 +:105D40004169002901D000698847E8680422006899 +:105D5000002305A90DF032F90F28EFD14B0F7F5822 :105D600001000000A8560100000400003C88E5BACC -:105D700037FF606804220068002307A90DF082F94C -:105D80000F28F0D10898400601D5EEF72AFC0898B4 -:105D9000000601D5EEF784FC0898C00603D5EEF79F -:105DA000F9FBFCF2B2FB0898000710D507E0069853 -:105DB000002804D0C168C90401D5F6F764F8B248D8 -:105DC0000022F03806A9F1F28DF90A28EFD10898DF -:105DD000800401D4089819E080203400310030811B -:105DE0001C3430185C3107F3F0EA0500F8F72EFB9D -:105DF0002200290030000123FFF754FF300007F391 -:105E0000EFFE08980026012108430890400401D4C1 -:105E1000089807E0300007F3E3FE08980026012108 -:105E200008430890C00713D0002E07D17D219B485E -:105E30000022090107F3FEFE04000AD1924800E0A7 -:105E400089E100680722006801210DF01FF9012790 -:105E5000B4E020001C300E9040300D9024300C90A7 -:105E6000002004900E980590802020810D990C98B8 -:105E70000D0007F3AAEA0598EFF760FC00287ED032 -:105E8000280007F392EA05000420FEF295FA0004C8 -:105E9000000C0421FCF29EFC002DF0D068782978DB -:105EA00000020843EBD07E498842D9D06038287080 -:105EB000000A6870A8780007800F73D102900CF078 -:105EC0000FFB290012310390881FF8F787FA06901C -:105ED000002860612ED0417A022921D10FF00BFCFD -:105EE0000C300190A878000905D0022803D00B28B7 -:105EF00001D00D280AD10198017DE878C006C00FB5 -:105F0000814203D001000698F1F7DBFC0198403094 -:105F1000007D012801D10020A0800698002809D02A -:105F200001220092069A2900FF326932200002AB5A -:105F300008F358F903980CF0D7FAA08800281CD071 -:105F40000EF01BFF002818D00120009028006946A1 -:105F5000F2F74CFF6B4601901878002804D002201D -:105F60000FF0F2FBF2F7F4F80198002805D14D4A42 -:105F700010680121C90288431060200000E01AE087 -:105F80000599FCF794FB002804902BD12800F8F722 -:105F90005DFAA088002805D0059A29002000012379 -:105FA000FFF780FE002E00D15AE70498002802D0A7 -:105FB000A088002802D1200007F312FE089880076D -:105FC00075D57D2135480022090107F333FE050010 -:105FD0000DD12D4807220068022100680DF056F807 -:105FE000012764E0A0880028DCD02600DAE728003A -:105FF0001C300B9040300A90243009900B9805908B -:10600000802028810A9909980C0007F3DEE9059899 -:10601000EFF770FB002847D00520FEF2CDF9000411 -:10602000000C0521FCF2D6FB200007F3BEE90400BA -:106030003AD0607821780002084335D020000C3037 -:106040000FF0ABFB0690686160782178000208438E -:1060500060380004000C010A207000286170CDD067 -:10606000059A210028000023FFF71CFE002006905F -:1060700005990322280011F026EF05990222280035 -:1060800011F020EFBAE700003C4801C0F8F500C06D -:1060900000020300FFFF030007100000D00000040F -:1060A000FFFF00002CF200C0280007F399FD0898BC -:1060B000800612D57E4D002406E005988460416973 -:1060C000002901D000698847E8680422006800239D -:1060D00005A90CF0D7FF0F28EFD10898800501D54E -:1060E000FDF71BF80898000501D5FDF7EEF80898B4 -:1060F000400530D527E00698002824D0017A0129F0 -:1061000002D1F7F7AAFE1EE0417A02291BD1F0F76F -:10611000F7FD002805D0069811F0D8EE069811F08A -:10612000DAEEF6F769FA01280DD9069802228030D6 -:10613000C06B002111F0C6EE069803228030C06BC0 -:10614000002111F0C0EE5A480022783806A9F0F27A -:10615000C9FF0A28CFD1002F00D1DDE50027EBF7DA -:10616000C3FAD9E510B5040019215248B8DF8700F9 +:105D70000898800501D5FDF7FAF80898000501D5C7 +:105D8000FDF72BF90898400530D527E00698002844 +:105D900024D0017A012902D1F7F7FDFE1EE0417AF5 +:105DA00002291BD1F0F76FFE002805D0069812F0EB +:105DB000CCE8069812F0CCE8F6F7CAFA01280DD91B +:105DC0000698022280300069002112F0BAE8069895 +:105DD000032280300069002112F0B2E85948002205 +:105DE000783806A9F1F27EF90A28CFD1002F00D128 +:105DF000CEE50027EBF7E2FCCAE510B50400192157 +:105E000051480022490107F315FF002802D0AC21B8 +:105E10004461018110BD7CB5052200214B48C0685A +:105E20000DF0DAF8474C02E0019807F3D9FE6068FC +:105E300004220068002301A90DF0CAF80F28F3D14D +:105E4000002501E000988560E068042200680023D6 +:105E500069460DF0BDF80F28F4D10021FF20F0F7BE +:105E600079FB0021FF20F0F77EFBF0F76DFB0020AF +:105E70007CBD10B5334C020060680421006800232B +:105E8000EBF7CFFC002807D1206807220068042127 +:105E90000DF0A2F8002010BD012010BD08B5009043 +:105EA00028480022F0386946F1F2EAF9002808D1C2 +:105EB000244807220068082100680DF08DF80020B2 +:105EC00008BD012008BD08B500901E4800227838A2 +:105ED0006946F1F2D5F9002809D11A480121006874 +:105EE0000722006889020DF077F8002008BD012024 +:105EF00008BD10B5134C01218160E16802000B68F8 +:105F0000042118000023EBF78CFC002805D1206841 +:105F10000722006820210DF05FF810BD094810B578 +:105F2000006801210068072249030DF055F810BDF3 +:105F3000044810B5006801210068072289030DF0AC +:105F40004BF810BD184701C09404000440F800C08D +:105F5000FEB5FF21F931FF4807F380E9FE49FF480C +:105F600007F37CE94521FE48C90007F378E9FD48BD +:105F7000342107F374E9FB4E0024483E37002437F0 +:105F80000C256543A819F5F2B0FFE819F5F2ADFF4D +:105F9000641C032CF4DBEF4E0024250054206043E6 +:105FA00081193550EF484D6048384D74F5F2CEFFF9 +:105FB000641C062CF2DBEB4800240127E74E3C383A +:105FC0000190D4206043811935504D604F74019881 +:105FD000F5F2BCFF641C052CF3DBE2480024022729 +:105FE000DF4E30380090FF20153060438119355066 +:105FF0004D604F740098F5F2A9FF641C022CF2DB8F +:10600000D94805800020FEBD70B506000D000024B3 +:10601000402909D8D3484838F5F26EFF040003D070 +:10602000D048210024380AE0C02D0BD8CD483C3898 +:10603000F5F262FF040005D0CA4821001838F5F2D5 +:1060400085FF0DE0FF20401C854209D8C548303847 +:10605000F5F252FF040003D0C24821000C38EEE7ED +:10606000C049B0000C50200070BD0C2310B5BD4CD1 +:106070004343243CE05800221B199B6804E0C48978 +:106080008C4204D90068521C9342F8D8002010BDFD +:1060900070B504000025002846D0607C032843D258 +:1060A000E18940290AD2002808D140210220FFF7C7 +:1060B000DCFF05000BD14021012005E0C02906D2FC +:1060C000012804D1C0210220FFF7CFFF0500217C69 +:1060D000A44E00208900002D705012D0A868A06046 +:1060E000A889A081E889E081287C2074290020000B +:1060F000EA891431143007F380E8207C80003450A2 +:106100002C00607C0C239749584324394018210007 +:10611000F5F25AFF617C0C23924A5943483A8A1897 +:1061200001001000F5F212FF70BDF0B50020020072 +:106130008D4D8C4F2880243F0C205043C1198E6810 +:10614000002E0AD03958002005E08B892C88234383 +:106150002B800968401C8642F7D8521C032AEBDBCF +:10616000F0BD70B5050048790C000979D85CD5EF11 :1061700001000000A45A010000040000C8E7900ECE -:106180000022490107F360FD002802D0AC214461E0 -:10619000018110BD7CB5052200214C48C0680CF07F -:1061A0007FFF484C02E0019807F324FD6068042259 -:1061B0000068002301A90CF06FFF0F28F3D1002520 -:1061C00001E000988560E0680422006800236946C9 -:1061D0000CF062FF0F28F4D10021FF20F0F7F0FA55 -:1061E0000021FF20F0F7F5FAF0F7E4FA00207CBD7B -:1061F00010B5344C02006068042100680023EBF7FE -:10620000B0FA002807D120680722006804210CF0AA -:1062100047FF002010BD012010BD08B5009029489F -:106220000022F0386946F1F235F8002808D12548F7 -:1062300007220068082100680CF032FF002008BD2A -:10624000012008BD08B500901E4800227838694634 -:10625000F1F220F8002809D11A480121006807222C -:10626000006889020CF01CFF002008BD012008BD59 -:1062700010B5144C01218160E16802000B68042113 -:1062800018000023EBF76DFA002805D120680722DB -:10629000006820210CF004FF10BD0A4810B500680A -:1062A00001210068072249030CF0FAFE10BD0548E1 -:1062B00010B5006801210068072289030CF0F0FE88 -:1062C00010BD00003C4801C054000004F8F500C0B7 -:1062D000FEB5FF21F931FF4806F3CAEFFE49FF483A -:1062E00006F3C6EF4521FE48C90006F3C2EFFD489C -:1062F000342106F3BEEFFB4E0024483E370024371E -:106300000C256543A819F5F2FAFDE819F5F2F7FD39 -:10631000641C032CF4DBEF4E002425005420604362 -:1063200081193550EF484D6048384D74F5F218FE2C -:10633000641C062CF2DBEB4800240127E74E3C38B6 -:106340000190D4206043811935504D604F740198FD -:10635000F5F206FE641C052CF3DBE248002402275C -:10636000DF4E30380090FF201530604381193550E2 -:106370004D604F740098F5F2F3FD641C022CF2DBC3 -:10638000D94805800020FEBD70B506000D00002430 -:10639000402909D8D3484838F5F2B8FD040003D0A5 -:1063A000D048210024380AE0C02D0BD8CD483C3815 -:1063B000F5F2ACFD040005D0CA4821001838F5F20A -:1063C000CFFD0DE0FF20401C854209D8C54830387C -:1063D000F5F29CFD040003D0C24821000C38EEE722 -:1063E000C049B0000C50200070BD0C2310B5BD4C4E -:1063F0004343243CE05800221B199B6804E0C489F5 -:106400008C4204D90068521C9342F8D8002010BD79 -:1064100070B504000025002846D0607C032843D2D4 -:10642000E18940290AD2002808D140210220FFF743 -:10643000DCFF05000BD14021012005E0C02906D278 -:10644000012804D1C0210220FFF7CFFF0500217CE5 -:10645000A44E00208900002D705012D0A868A060C2 -:10646000A889A081E889E081287C20742900200087 -:10647000EA891431143006F3CAEE207C80003450CF -:106480002C00607C0C239749584324394018210084 -:10649000F5F2A4FD617C0C23924A5943483A8A18CC -:1064A00001001000F5F25CFD70BDF0B500200200A7 -:1064B0008D4D8C4F2880243F0C205043C1198E688D -:1064C000002E0AD03958002005E08B892C88234300 -:1064D0002B800968401C8642F7D8521C032AEBDB4C -:1064E000F0BD70B5050048790C0009790002084339 -:1064F000402801D8002104E0C02801D8012100E093 -:1065000002212868427C8A420ED0FFF781FF607921 -:1065100022790102607811432278000210430006BC -:10652000000EFFF731FF286070BDF7B590B007008F -:106530000C0079D1A1E060782278010211430D2985 -:10654000F8D26279207912020243FF20401C824275 -:10655000F0D88800634908580E90002804D161796A -:1065600022790802104353D0F97A387A00F059FBA7 -:1065700005000E9800284CD0627923792DA928DBDC +:1061800000020843402801D8002104E0C02801D8BB +:10619000012100E002212868427C8A420ED0FFF7EC +:1061A00081FF607922790102607811432278000230 +:1061B00010430006000EFFF731FF286070BDF7B5F1 +:1061C00090B007000C0079D1A1E06078227801023C +:1061D00011430D29F8D26279207912020243FF207F +:1061E000401C8242F0D88800634908580E9000286D +:1061F00004D1617922790802104353D0F97A387AB0 +:1062000000F059FB05000E9800284CD062792379E4 +:106210001102194347D18168A9438160C2892521B0 +:106220001430FAF7E9F8002803D00E9900208860AE +:1062300003E00E988068002834D10BF063FC411C09 +:106240000BD062782378110200061943000E8142B8 +:1062500003D10020C0430BF04BFC3800F6F731FBB4 +:1062600029214901401817228256511C09D0637810 +:106270002578190229430906090E8A4201D1FF2116 +:10628000C17518228256511C09D0637825781902ED +:1062900029430906090E8A4201D1FF2101760E9891 +:1062A000FFF700FFF9E0002822D08168A94206D15B +:1062B00021000EA8FFF75FFF0E9826E0F9E0E378D3 +:1062C000A17882891B020B439A4220D162792379FB +:1062D000C18912021A43914219D1A11D14300BF049 +:1062E00009FD002813D10E98816829438160D4E00C +:1062F00061792079627809022378014310021843FA +:106300000006000EFFF78AFE0E90002802D1012041 +:1063100013B0F0BD8560E278A37811021943818142 +:10632000627823781102194301746279237911028A +:106330001943C1816279217912020A43A11D1430E7 +:1063400006F3FAEE0E982521C2891430FAF754F8B4 +:1063500000281FD001200FF0B9F9094D022006F0E6 +:106360006AF92E0412E00000DC5F02C02404000081 +:10637000D46102C0F86502C0686802C0542201C03E +:106380000001FF003543022106F064F90028F9D12D +:106390000E988560387A022831D10E983021C28952 +:1063A0001430FAF729F8050029D038000FF07EF9EB +:1063B0000022052005A901AB07C306AA0092280008 +:1063C0000DAA0BA90CAB03F3A1FC0B20800139181B +:1063D00048696B46803002791B7D52085200DB0908 +:1063E0001A4302714869FD210A406B46197D8030CD +:1063F0004906C917491CC907890F0A4302710E9E35 +:10640000FB49B089884248D13800F6F75AFA0500AE +:1064100030001430F74904220F900BF06BFC002879 +:106420000ED10E993800CA89143111F0A0ED6178AF +:10643000227808022921104349016918C8752CE007 +:10644000ED490F9804220BF055FC002819D10E9845 +:10645000C089001F0104132080012A183000090C94 +:10646000183011F088EDA868012149020843A8609E +:1064700061782278080229211043490169180876B9 +:106480000BE03000DD49042216300BF033FC00280D +:1064900003D10E98007C0BF02BFB61792279080266 +:1064A00012991043091A891F09040914A41D04191B +:1064B00012911298062800D387E6FFF740FE0020CD +:1064C00026E7F7B584B00027002910D0101D002A58 +:1064D00004D0D37894781A02224302D100260D20EA +:1064E0000DE042780378100218430D2802D30020F3 +:1064F00007B0F0BD0606401C360E0006000E0390E5 +:1065000004980C1D0191C17A007A00F0D4F9029030 +:106510004AE0300A2670BA496070B0000D58002D6C +:1065200030D0A868029908423BD00498F6F7C9F920 +:10653000AA89A270120AE270A989AD4A914213D1C8 +:1065400029225201821817201056B0420CD1002087 +:106550000090049821006A4611F010ED6B461988EE +:106560002171090A617112E0A170090AE170E989DB +:106570002171090A61712900EA891431A31EA5A9B4 :1065800001000000A05E0100000400009B3D43628A -:106590001102194347D18168A9438160C28925212D -:1065A0001430FAF729F8002803D00E9900208860EB -:1065B00003E00E988068002834D10BF0D1FB411C19 -:1065C0000BD062782378110200061943000E814235 -:1065D00003D10020C0430BF0B9FB3800F6F789FA6D -:1065E00029214901401817228256511C09D063788D -:1065F0002578190229430906090E8A4201D1FF2193 -:10660000C17518228256511C09D063782578190269 -:1066100029430906090E8A4201D1FF2101760E980D -:10662000FFF700FFF9E0002822D08168A94206D1D7 -:1066300021000EA8FFF75FFF0E9826E0F9E0E3784F -:10664000A17882891B020B439A4220D16279237977 -:10665000C18912021A43914219D1A11D14300BF0C5 -:1066600077FC002813D10E98816829438160D4E01B -:106670006179207962780902237801431002184376 -:106680000006000EFFF78AFE0E90002802D10120BE -:1066900013B0F0BD8560E278A378110219438181BF -:1066A0006278237811021943017462792379110207 -:1066B0001943C1816279217912020A43A11D143064 -:1066C00006F344ED0E982521C2891430F9F794FFA2 -:1066D00000281FD001200FF00BF8094D022006F012 -:1066E000CAF92E0412E00000DC6102C0240400009C -:1066F000D46302C0F86702C0686A02C0941E01C079 -:106700000001FF003543022106F0C4F90028F9D149 -:106710000E988560387A022831D10E983021C289CE -:106720001430F9F769FF050029D038000EF0D0FFCA -:106730000022052005A901AB07C306AA0092280084 -:106740000DAA0BA90CAB03F3EBFA0B20800139184F -:10675000886B6B464030027E1B7D52085200DB097D -:106760001A430276886BFD210A406B46197D403042 -:106770004906C917491CC907890F0A4302760E9EAC -:10678000FB49B089884248D13800F6F7B2F90500D4 -:1067900030001430F74904220F900BF0D9FB002889 -:1067A0000ED10E993800CA89143111F0ACEB617822 -:1067B000227808022921104349016918C8752CE084 -:1067C000ED490F9804220BF0C3FB002819D10E9855 -:1067D000C089001F0104132080012A183000090C11 -:1067E000183011F094EBA868012149020843A86011 -:1067F0006178227808022921104349016918087636 -:106800000BE03000DD49042216300BF0A1FB00281C -:1068100003D10E98007C0BF099FA61792279080275 -:1068200012991043091A891F09040914A41D041997 -:1068300012911298062800D387E6FFF740FE002049 -:1068400026E7F7B584B00027002910D0101D002AD4 -:1068500004D0D37894781A02224302D100260D2066 -:106860000DE042780378100218430D2802D300206F -:1068700007B0F0BD0606401C360E0006000E039061 -:1068800004980C1D0191C17A007A00F0D4F90290AD -:106890004AE0300A2670BA496070B0000D58002DE9 -:1068A00030D0A868029908423BD00498F6F721F945 -:1068B000AA89A270120AE270A989AD4A914213D145 -:1068C00029225201821817201056B0420CD1002004 -:1068D0000090049821006A4611F01CEB6B46198861 -:1068E0002171090A617112E0A170090AE170E98958 -:1068F0002171090A61712900EA891431A01D06F38A -:1069000026EC04E00020A070E070207160716179D5 -:10691000227908021043BF1DC1190F043F0CA41DAA -:106920000419761C3606360E03988642B1D30198B8 -:10693000FF216A310170090A41700198390A877094 -:106940003F1DC1703804000C92E7002901D10020DE -:10695000704703220A7100224A7140238B71002381 -:10696000CB7106230B720023C0224B728A72052260 -:10697000CB720A73FF22521C4B738A73120ACA73BA -:1069800002220A74FF22AB324B740A7033234B7815 +:10659000A01D06F3DCED04E00020A070E070207187 +:1065A00060716179227908021043BF1DC1190F047F +:1065B0003F0CA41D0419761C3606360E039886423D +:1065C000B1D30198FF216A310170090A4170019825 +:1065D000390A87703F1DC1703804000C92E700290A +:1065E00001D10020704703220A7100224A71402322 +:1065F0008B710023CB7106230B720023C0224B72D8 +:106600008A720522CB720A73FF22521C4B738A7363 +:10661000120ACA7302220A74FF22AB324B740A7048 +:10662000120A0E204A7088700020C870122070472D +:10663000FFB581B0C17A007A0A9F00F046F90600E2 +:1066400000257449A8000C58002C16D0A068B04250 +:1066500013D1A089B84210D12000049A03991630B2 +:106660000BF052FB002808D12100E2890298143176 +:1066700006F36CEDE08905B0F0BD6D1C2D062D0E06 +:106680000D2DDED30020F6E770B501258D40C0004A +:106690008540604E0024A0003058002805D0816855 +:1066A000A943816001D1FFF707FD641C2406240E75 +:1066B0000D2CF0D3FFF74DFD70BD10B5FFF75CFC5E +:1066C00010BDFFB581B0150001D10120D3E7C17A1B +:1066D000007A00F0FAF80600A878012701093800CE +:1066E00088404D490988084228D0049800240006B3 +:1066F000000E00904748A1004258002A1BD0906825 +:10670000304218D090893F49884214D0A9783B0084 +:1067100009098B4018420ED00298D389002805D071 +:1067200000991432280000F31CF804E00099143298 +:10673000280000F37DF8641C0D2CDBD300209AE7C1 +:10674000F7B582B00400803001000069002502899D +:106750002E00801801908869AC300090207A0128C2 +:1067600003D0022801D003282BD1FF214931095D34 +:10677000002926D00125022817D120000EF0A0FF05 +:1067800006000BF09DFD132149017718F97A0222CA +:106790001143F9720BF098FD02E00120EBF70CF8C1 +:1067A000F87AC007F9D1002D0BD0019A0021200002 +:1067B0000C23FFF786FF009A002120000C23FFF72F +:1067C00080FF049A03992000FFF703FD0700002DC6 +:1067D00015D0019A012120000C23FFF772FF009AC7 +:1067E000012120000C23FFF76CFF207A022806D13C +:1067F000132040013018C17AFD221140C1723800C7 +:1068000039E70000FFFF000060163200201532005B +:10681000187C0200686802C0542201C0FFB581B034 +:10682000002015001F000A9C0090268802980A3E4E +:1068300000283CD10A20002E208038D10198002267 +:106840003900FFF748FE218809182180391801987E +:10685000FFF7C5FE21884018208000200BE76878EC +:10686000297800020843FF386A3818D102980128B5 +:106870000CD1E978A87809060A1402430198291D69 +:10688000FFF75EFF00990843009008E001982A0096 +:106890003900FFF720FE21883F1808182080E9788A +:1068A000AA7808021043361A361F2D1D4519002EEE +:1068B000D5DC0298002806D101983900FFF78FFE39 +:1068C0002188081820800098D5E601228A40C1005E +:1068D0001000884070470000F8B50600FF4C606A61 +:1068E000F5F7F9FF330005001726FD49FD48FE4F77 +:1068F0000222760106F346EE0B0776919EA1A5A82B +:10690000B24347564600606A00280ED0017A032938 +:106910000BD180190178032907D1397800291BD1BF +:106920004270012000F05DFA16E0F5F725FD002821 +:1069300012D10EF025FF00280ED1387802280BD096 +:10694000002000F04EFA606A002805D0017A032981 +:1069500002D1002180194170606A04F07DFC00289A +:1069600010D0606A00280DD0017A03290AD180195D +:106970000078022806D1A86808210843A8600020F2 +:1069800000F02FFAF8BD606A0028FBD0AFA69EFA8F :10699000010000009C62010000040000B3ACC6DFEF -:1069A000120A0E204A7088700020C87012207047AA -:1069B000FFB581B0C17A007A0A9F00F046F906005F -:1069C00000257449A8000C58002C16D0A068B042CD -:1069D00013D1A089B84210D12000049A039916302F -:1069E0000BF0C0FA002808D12100E2890298143186 -:1069F00006F3B6EBE08905B0F0BD6D1C2D062D0E3B -:106A00000D2DDED30020F6E770B501258D40C000C6 -:106A10008540604E0024A0003058002805D08168D1 -:106A2000A943816001D1FFF707FD641C2406240EF1 -:106A30000D2CF0D3FFF74DFD70BD10B5FFF75CFCDA -:106A400010BDFFB581B0150001D10120D3E7C17A97 -:106A5000007A00F0FAF80600A8780127010938004A -:106A600088404D490988084228D00498002400062F -:106A7000000E00904748A1004258002A1BD09068A1 -:106A8000304218D090893F49884214D0A9783B0001 -:106A900009098B4018420ED00298D389002805D0EE -:106AA000009914322800FFF266FE04E000991432C7 -:106AB0002800FFF2C7FE641C0D2CDBD300209AE7F0 -:106AC000F7B582B004008030C06B002501892E002C -:106AD000401801902000C0304068AC300090207A0F -:106AE000012803D0022801D003282BD1FF217131C6 -:106AF000095D002926D00125022817D120000EF0BB -:106B0000F1FD06000BF00AFD132149017718F97A0F -:106B100002221143F9720BF005FD02E00120EAF7B1 -:106B2000EBFDF87AC007F9D1002D0BD0019A0021B6 -:106B300020000C23FFF785FF009A002120000C2382 -:106B4000FFF77FFF049A03992000FFF702FD07007B -:106B5000002D15D0019A012120000C23FFF771FFB1 -:106B6000009A012120000C23FFF76BFF207A0228F6 -:106B700006D1132040013018C17AFD221140C172A4 -:106B8000380038E7FFFF00006016320020153200A1 -:106B9000787B0200686A02C0941E01C0FFB581B014 -:106BA000002015001F000A9C0090268802980A3ECB -:106BB00000283CD10A20002E208038D101980022E4 -:106BC0003900FFF748FE21880918218039180198FB -:106BD000FFF7C5FE21884018208000200BE7687869 -:106BE000297800020843FF386A3818D10298012832 -:106BF0000CD1E978A87809060A1402430198291DE6 -:106C0000FFF75EFF00990843009008E001982A0012 -:106C10003900FFF720FE21883F1808182080E97806 -:106C2000AA7808021043361A361F2D1D4519002E6A -:106C3000D5DC0298002806D101983900FFF78FFEB5 -:106C40002188081820800098D5E601228A40C100DA -:106C50001000884070470000F8B50500FF4C606ADE -:106C6000F5F751FF06002B000327FD49FD48FE4DB7 -:106C70003F0206F392EC090647626F72767983430E -:106C80004600606A00280FD0017A03290CD1C01990 -:106C9000017A032908D1297800291CD102214172E7 -:106CA000012000F030FA16E0F5F7C4FC002812D1FC -:106CB0000EF078FD00280ED1287802280BD0002095 -:106CC00000F021FA606A002805D0017A032902D178 -:106CD0000021C0194172606A04F08DFC002810D0B8 -:106CE000606A00280DD0017A03290AD1C019007A00 -:106CF000022806D1B06808210843B060002000F0E7 -:106D000002FAF8BD606A002809D0017A032906D189 -:106D1000417A002903D0C019007A0328F1D1F5F790 -:106D200089FC012803D10EF03DFD002803D0F5F7C2 -:106D300081FC0028E5D1287809E028780028E0D1F6 -:106D4000606A002818D0017A032915D1407A0028FA -:106D5000D7D111E001600320D1E7C44901600420CC -:106D6000CDE701600520CAE701602878042803D038 -:106D7000032801D00528C4D10120C0E70220BEE7C6 -:106D8000BB4810B50088C00710D0BA48007800286A -:106D90000CD007280AD0F4F724FDF4F7B73360725B +:1069A000017A0329F8D1801901780329F4D13978C3 +:1069B0000029F1D1427059E0606A0028ECD0007AD9 +:1069C0000328E9D1F5F7E2FC00280ED10EF0FBFE1A +:1069D00000280AD13878022807D0002000F00BFAEE +:1069E000616A002089194870F8BD606A04F03EFCB5 +:1069F0000028F9D0606AC4E7606A002809D0017AEB +:106A0000032906D1417A002903D080190078032890 +:106A1000EAD1F5F7BBFC012803D10EF0BBFE00283C +:106A200003D0F5F7B3FC0028DED1387809E03878D8 +:106A30000028D9D1606A002818D0017A032915D11D +:106A4000407A0028D0D111E001600320A2E7AC49D0 +:106A5000016004209EE7016005209BE70160387813 +:106A6000042803D0032801D00528BDD1012091E7D7 +:106A700002208FE7A34810B50088C00710D0A248B5 +:106A8000007800280CD007280AD0F4F766FDF4F748 +:106A9000C5F8002800D002200EF06CFEF4F796FD39 +:106AA000002010BDF8B500240600944D924F6C6094 +:106AB0003868017800297ED0297AC27889180906B9 +:106AC0001322090E520180182972807F814207D358 +:106AD0002C72E86891060843E860A88A401EA882E4 +:106AE000E8688649C008C0002031E860897900293B +:106AF00034D001210843E860002130000AF0C5FECF +:106B0000132358430021801912300AF0E2FB396840 +:106B10000522D20189180979002200F3D1FC00284E +:106B200003D0E86804210843E860012130000AF03E +:106B3000ACFE132358430121801912300AF0C9FB1F +:106B400039680522D20189184979012200F3B8FC7D +:106B5000002803D0E86802210843E8603B68986891 +:106B6000002803D0E968884300D129612E69614972 +:106B7000634A5F48002E0DD0406A037A032B02D18E +:106B8000437A012B16D00C7001214906147011F0C4 +:106B90000EEA0FE00526F6019B195B88002B09D051 +:106BA000AB8A002B06D10C701470406A574A6521DD +:106BB000EFF7A9F800E008E02B7806F3EEEC060604 +:106BC00004070404040600F022F8F8BD38680078D1 +:106BD000002806D0F5F748FA00F019F8F4F753FB4F +:106BE000F8BD4948007800280BD0F4F778FBF4F79B +:106BF00015F8002800D002200EF0BCFDF4F7E6FCEA +:106C0000F8BD0820FFF772FEF4F769FBF8BDFEB58A +:106C10000025394E3949376848683A78002A04D047 +:106C20000A78002A01D0002802D00020C043FEBD0F +:106C30002F4C05212834C90160180290006A5721A1 +:106C40000090C900200006F328EBB9782170FF22DC +:106C50000621601C0BF08EE8F8780E260E2800D274 +:106C600006002648007802280BD01320400138186F +:106C7000817F2248007A081AB04200DC06003606FE +:106C8000360E23480E2201682248491D201806F3BB +:106C900068EA174F786A017A032911D106F0F0FDEE +:106CA000002803D014480121006808E0124813218D +:106CB0000068124A49014118897F127A891AC17005 +:106CC0000E48F200921B007A0B4EC3003168181A6E +:106CD0004018872189004118E01D06F342EA316817 +:106CE00021220E0012010C3120006A3014E0000055 +:106CF000A44E01C0144801C07CF800C0244D01C05E +:106D00009C4A01C05C3A01C004F400C071630100F8 +:106D100034F800C07A02000006F322EA1320400192 +:106D20003018C17F69200155FF48FE49C160029AB1 +:106D3000EA3801905062B0680521C901800702D588 +:106D400002980122C2607018018802980181786A55 +:106D5000017A032918D1417A012915D1F5F7C5FD2A +:106D60000600786A04F082FA0821002808D0EF486B +:106D70007D250068ED0040684543B068084301E0A8 +:106D8000B0688843B06009E0E948407A002804D040 +:106D900070687D25ED00454300E0E64D2E8C69705E :106DA000010000009866010000040000E07615B3C1 -:106DB00089F8002800D002200EF0EEFCF4F754FD14 -:106DC000002010BDF8B500240600AC4DAA4F6C6041 -:106DD0003868017800297ED0297AC2788918090696 -:106DE0001322090E520180182972807F814207D335 -:106DF0002C72E86891060843E860A88A401EA882C1 -:106E0000E8689E49C008C0002031E86089790029FF -:106E100034D001210843E860002130000AF088FEE8 -:106E2000132358430021801912300AF0D2FB39682D -:106E30000522D20189180979002200F34BFB0028B2 -:106E400003D0E86804210843E860012130000AF01B -:106E50006FFE132358430121801912300AF0B9FB49 -:106E600039680522D20189184979012200F332FBE1 -:106E7000002803D0E86802210843E8603B6898686E -:106E8000002803D0E968884300D129612E69794937 -:106E90007B4A7748002E0DD0406A037A032B02D13B -:106EA000437A012B16D00C7001214906147011F0A1 -:106EB0004AE80FE00526F6019B195B88002B09D0F4 -:106EC000AB8A002B06D10C701470406A6F4A6521A2 -:106ED000EEF743FE00E008E02B7806F368EB0606C9 -:106EE00004070404040600F022F8F8BD38680078AE -:106EF000002806D0F5F722FA00F019F8F4F717FB8E -:106F0000F8BD6148007800280BD0F4F73CFBF3F79C -:106F1000D9FF002800D002200EF03EFCF4F7A4FCBC -:106F2000F8BD0820FFF7A2FEF4F72DFBF8BDFEB573 -:106F30000025514E5149376848683A78002A04D0F4 -:106F40000A78002A01D0002802D00020C043FEBDEC -:106F5000474C05212834C90160180290006A2B2192 -:106F600000900901200006F3A2E9B9782170FF2200 -:106F70000621601C0BF02CE8F8780E260E2800D2B3 -:106F800006003E48007802280BD013204001381834 -:106F9000817F3A48007A081AB04200DC06003606C3 -:106FA000360E3B480E2201683A48491D201806F368 -:106FB000E2E82F4F786A017A032911D106F04DFEDD -:106FC000002803D02C480121006808E02A4813213A -:106FD00000682A4A49014118897F127A891AC170CA -:106FE0002648F200921B007A234EC3003168181A1B -:106FF0004018872189004118E01D06F3BCE831687C -:1070000021220E00200012010C316A3006F3B2E892 -:10701000132040013018C17F6920015514481E49D2 -:107020008038C160029AEA3801905062B068052148 -:10703000C901800702D502980122C2607018018838 -:1070400002980181786A017A03292FD1417A0129B6 -:107050002CD1F5F762FD0600786A04F0D6FA082113 -:1070600000281FD004487D250068ED00406815E029 -:10707000C84F01C0384901C034F600C0484E01C0B5 -:10708000C04B01C0C43B01C0ACF100C07D66010033 -:10709000ECF500C07A020000AD6601004543B0681F -:1070A000084301E0B0688843B06009E0FD48407AD9 -:1070B000002804D070687D25ED00454300E0FA4DBE -:1070C0000098002804DA00984042A84200D22D1807 -:1070D000786A2A00210010F03AEFF2490122486054 -:1070E00000284A7203D10198FFF76CFE2DE70020BB -:1070F000FEBDEC4970B51E31002006F38EE9E94C67 -:107100000025203420000A38A57110F024EF0C204F -:10711000E071E4480561C56070BD70B50400E14DE3 -:1071200028782C7003D16868EDF761F970BD0428E8 -:1071300003D0042C01D00028F8D12869002801D1FF -:10714000FFF7D7FF68680026002803D02E70EDF700 -:107150004EF92C70D5480662FFF7E9FE70BD10B5F8 -:1071600004000120EAF7D2FA200005F0DEFC012835 -:1071700001D1FFF7DCFE10BDF0B50D0000211700B6 -:1071800089B00128029101D1C94C00E0C94C5121BC -:10719000C900200006F38AE80521C901661801200C -:1071A000002130807180BF49B07148729910408CC5 +:106DB0000098002804DA00984042A84200D22D181A +:106DC000786A2A00210011F000E9DE4901224860BA +:106DD00000284A7203D10198FFF76EFE2FE70020CA +:106DE000FEBDD84970B51E31002006F316EBD54C18 +:106DF0000025203420000A38A57111F0EAE80C20A3 +:106E0000E071D0480561C56070BD70B50400CD4D1E +:106E100028782C7003D16868EDF7E2FB70BD042878 +:106E200003D0042C01D00028F8D12869002801D112 +:106E3000FFF7D7FF68680026002803D02E70EDF713 +:106E4000CFFB2C70C1480662FFF7EBFE70BD10B59A +:106E500004000120EAF7C4FC200005F052FC0128E0 +:106E600001D1FFF7DEFE10BDF0B50D0000211700C7 +:106E700089B00128029101D1B54C00E0B54C5121F7 +:106E8000C900200006F312EA0521C9016618012095 +:106E9000002130807180AB49B07148722878002899 +:106EA0007BD020706878A070A878E070A81D06F3E9 +:106EB000A4EA606028000E3006F39EEAA060280075 +:106EC00014300590E81904909C488030069005988D +:106ED00007E10599FF2348780A78000210439B1DBB +:106EE000C21A98427ED015DC002825D0FF38801EBB +:106EF00032D0012877D0032876D1002002006946DD +:106F000005C1091F059804F332FA05006B4618798C +:106F10003071E1E00D2A0FD0192A66D0AB2AEBD1EF +:106F2000FF200599B130022303AA04F359F90500A3 +:106F30006B4698897080CFE01321102249016118B7 +:106F40000092C97F4B0159180A1983490C32631802 +:106F5000059900F370FA9DE0C8788978000208432B +:106F6000622878D88720800021180598002204F331 +:106F70005AF905006FD0281F0004000C06D0072125 +:106F800006F348EE13214901611888771321002088 +:106F9000490161180891897F0DE0B5E0C200121A1D +:106FA0001219FF32FF32921C527F002A02D00120B8 +:106FB000029005E0401C8142F0DC02980028D9D004 +:106FC0000698406A017A032944D1F5F798FC816854 +:106FD00049053FD50921C9014018817A0027427A25 +:106FE000090203E045E051E06FE055E01143027A09 +:106FF000C37910021843081A0004000C0190012004 +:1070000030800898817F019806F304EE042823D984 +:107010001CE00100019806F3FEEDF900C91B0919F7 +:10702000212212010791001F8918C873000A0874F1 +:107030000898817F019806F3EEED0799112252011D +:10704000001F89184870000A7F1C88700898807F8C +:10705000B842DEDC40E04BE000273800694600978C +:1070600010F002EF08983C4987770098623908557C +:1070700032E000200200694605C1091F059804F3AB +:1070800076F905006B461879707125E00598310096 +:1070900004F300F905001FE0FF2005991F300223CB +:1070A00003AA04F39DF805006B469889002800D0D8 +:1070B00001200028B0710FD10698406AC068C00452 +:1070C0000AD520490020487206E0C8788978000275 +:1070D0000843001D05042D0C002D09D0059840190A +:1070E00005900499884200D2F3E60298002808D15E +:1070F0005121C900200006F3DAE80020C04309B09E +:10710000F0BD1048718881820020F8E7F8B51400BE +:107110000600080009491D008031FF284E621FD17A +:107120002A0021000020FFF79FFE06002A00210010 +:107130000120FFF799FE11E0A1630100244E01C078 +:107140007CF800C0244D01C0A08601004C5101C054 +:107150009C4A01C0144801C07F020000304303E094 +:107160002A002100FFF780FE05000CD1284C0026E4 +:10717000277826706068EDF733FA26482770066294 +:107180002672FFF74EFD2800F8BD70B50500204CB3 +:107190000E002069290006F340E921000022163183 +:1071A000281D10F01AEF051D0020002E07CF4D2DD1 :1071B00001000000946A0100000400001419600737 -:1071C000287800287AD020706878A070A878E070BD -:1071D000A81D06F31CE9606028000E3006F316E9CE -:1071E000A060280014300590E8190490B748069074 -:1071F000059807E10599FF2348780A7800021043B3 -:107200009B1DC21A98427ED015DC002825D0FF387D -:10721000801E32D0012877D0032876D100200200CA -:10722000694605C1091F059804F3ABF805006B46D4 -:1072300018793071E1E00D2A0FD0192A66D0AB2AF7 -:10724000EBD1FF200599B130022303AA03F3D2FF4B -:1072500005006B4698897080CFE013211022490108 -:1072600061180092C97F4B0159180A1998490C32CC -:107270006318059900F3E9F89DE0C8788978000261 -:107280000843622878D887208000211805980022BA -:1072900003F3D3FF05006FD0281F0004000C06D0B5 -:1072A000072106F3C2EC13214901611888771321E5 -:1072B0000020490161180891897F0DE0B5E0C20006 -:1072C000121A1219FF32FF32921C527F002A02D08A -:1072D0000120029005E0401C8142F0DC0298002869 -:1072E000D9D00698406A017A032944D1F5F71FFCEA -:1072F000816849053FD50921C9014018817A0027D5 -:10730000427A090203E045E051E06FE055E01143A5 -:10731000027AC37910021843081A0004000C019085 -:10732000012030800898817F019806F37EEC0428C4 -:1073300023D91CE00100019806F376ECF900C91B83 -:107340000919212212010791001F8918C873000A28 -:1073500008740898817F019806F366EC079911225A -:107360005201001F89184870000A7F1C8870089815 -:10737000807FB842DEDC40E04BE000273800694601 -:10738000009710F042ED08985149877700986239CC -:10739000085532E000200200694605C1091F059822 -:1073A00003F3EFFF05006B461879707125E005982F -:1073B000310003F379FF05001FE0FF2005991F301E -:1073C000022303AA03F316FF05006B4698890028E1 -:1073D00000D001200028B0710FD10698406AC06823 -:1073E000C0040AD534490020487206E0C87889787C -:1073F00000020843001D05042D0C002D09D005983E -:10740000401905900499884200D2F3E602980028BA -:1074100008D15121C900200005F352EF0020C043DC -:1074200009B0F0BD2448718881820020F8E7F8B5E2 -:1074300014000600080025491D00FF284E620CD1EB -:107440002A0021000020FFF7A1FE06002A002100EB -:107450000120FFF79BFE304303E02A002100FFF7E5 -:1074600095FE05000CD1144C002627782670606824 -:10747000ECF7C7FF1248277006622672FFF761FD1E -:107480002800F8BD70B505000B4C0E0020692900DE -:1074900005F3CCEF210000221631281D10F068ED15 -:1074A000051D0020002E206104D06068002801D155 -:1074B000FFF729FE280070BD484E01C0A0860100DC -:1074C000705201C0C04B01C0384901C0C84F01C053 -:1074D0007F02000010B5154913485124E4000860EC -:1074E000210005F3EEEE1248210005F3EAEEFF213C -:1074F0001048A93105F3E4EE002010BD10B5FFF7E8 -:1075000002FE0C484068ECF77CFF10BD074800689D -:107510000078704705490968002900D00870704755 -:107520000548406A70470000384901C034F600C081 -:10753000C04B01C0484E01C0C84F01C0F0B58DB06E -:107540000700002005900E0038000EF0DFF8040060 -:1075500038000EF002F98F20800020180990DC30EE -:107560000890380005F097FA002801D0052002E0C5 -:107570003800FCF7A8FF049038008030082E0C90EB -:1075800005D10C98806B06900C98C06B06E0052E18 -:107590007ED13800C030016806914068002877D05D -:1075A0000699002974D00100AC3107919039082E5A -:1075B000039101D1AC210181F8493A00F994211AD3 +:1071C000206104D06068002801D1FFF714FE280078 +:1071D00070BD10B5164915485124E400086021001F +:1071E00006F36EE81348210006F36AE8FF210D4814 +:1071F000A93106F366E8002010BD10B5FFF7FBFDCE +:1072000008484068EDF7F6F910BD094800680078B5 +:10721000704707490968002900D008707047064880 +:10722000406A7047244D01C04C5101C0144801C050 +:107230007CF800C09C4A01C0A44E01C0F3B50020F8 +:107240008BB00E0004900B980EF058FA04000B98C7 +:107250000EF07BFA8F20800027183800DC30079072 +:107260000B9805F002FA002801D0052002E00B98E7 +:10727000FCF76FFF03900B988030082E03D1C16894 +:107280000591006904E0052E7ED141690591806970 +:10729000002879D00599002976D00100AC310691FB +:1072A0009039082E029101D1AC2101810B990B225A +:1072B000920189180A914A69F5492C32095D0192B7 +:1072C0000B9A8907C90F7E3200913300110000F339 +:1072D0001FF90A99496940318A89069920310A7251 +:1072E000120A4A723A7F8A727A7FCA720A99012216 +:1072F00049690B7B3900203109910979022900D1B4 +:10730000002221000E31089100F326F90500082E15 +:107310000CD1E820C5510A98079B40694030827B18 +:107320002020015D280000F32AF905000B98FAF7E8 +:10733000D5FD002804D00B982900FAF7EEFD451979 +:10734000132149016018007801280CD1491C6018EC +:10735000C078C106CB0F0107CA0F4007C10F280034 +:10736000FFF2A2F84519606C012805D139003031CF +:10737000280000F36CFA4519089801222900FFF251 +:10738000B6F84519606C00E093E0012805D12100B2 +:107390006431280000F361FA45192120005DC0091D +:1073A00004D02900200008F0A2FA4519606C0128D9 +:1073B00017D10998807C800713D509980079022895 +:1073C00007D0E11DFF31FC311022280005F3DCEE6F +:1073D0001035AF480A2211302118280005F3D4EEE9 +:1073E0000A35606A012805D121002831280000F300 +:1073F0003AFA4519082E04D1A64805607001049098 +:1074000001E0A54805600B98F6F7DFF9002802D1E6 +:107410000598FFF2E0FE05980499C161029903986E +:10742000887005980121C069090388430599C861DE +:10743000039801F317FD05990C23C8620698069975 +:10744000281A20380870000A4870069A0B98012103 +:10745000FFF755F90B98007A032823D10B98407A4F +:1074600000281FD0022810D0052E04D106990B98B1 +:1074700004F085FB05E0082E14D106990B9804F062 +:107480007AFB0B98407A02280CD10B98F5F741FA59 +:10749000082E07D105F06DF9002803D006990B9846 +:1074A00004F0ACFCC037BB6A069A0598310000F3C3 +:1074B00085F80DB0F0BD10B50C000EF01FF9744941 +:1074C00044314018C078C106CB0F0107CA0F4007EE +:1074D000C10F200000F387F810BD70B505000EF055 +:1074E0000DF92C008034E1682800FFF7E4FF6169A2 +:1074F0002800FFF7E0FF70BD10B504000EF0FEF8A5 +:107500002000FFF7EAFF10BDF8B50C001500476832 +:107510000AF0F4FE060078783A78000210430C383E +:10752000020439002C31120C3D2003F30EFE00281A +:1075300028D02179CA4392070DD08907890F0129E4 +:1075400009D0002D07D0E17808221143E170C178FD +:107550001143C17006E0E278F7210A40E270C27878 +:107560000A40C270C178FB221140E2785207D20F64 +:1075700092001143C170E278890889009207920F46 +:107580001143C17030000AF0BDFEF8BD70B50E00A9 +:107590000EF0B4F80400643401252100300000F33B +:1075A0003AF82A0021003000FFF7AEFF70BD70B539 +:1075B00005000EF0A3F82C008034E16836E84E5B3D :1075C00001000000906E01000004000047C3B36B8F -:1075D000095D7E328907C90F019224320091330080 -:1075E0001100FFF29FFFA021CA5B079920310A72A8 -:1075F000120A4A72099A137F8B72527FCA720B2148 -:1076000089017918896B01220B7B099920310B9133 -:107610000979022900D1002221000E310A91FFF2DE -:10762000A5FF0500082E0BD10998C03085620C9883 -:10763000089BC27F2020015D2800FFF2AAFF050001 -:107640003800FAF72BFD002804D029003800FAF79B -:1076500044FD4519132149016018007801280CD117 -:10766000491C6018C078C106CB0F0107CA0F40073C -:10767000C10F2800FEF222FF4519606C012805D1D8 -:1076800009992800303100F3ECF845190A980122D5 -:107690002900FEF236FF4519606C012807D1210050 -:1076A000643100E08DE0280000F3E1F84519212065 -:1076B000005DC00904D02900200008F0C2FA451975 -:1076C000606C012817D10B98807C800713D50B982C -:1076D0000079022807D0E11DFF31FC31102228007B -:1076E00005F35CED1035B2480A221130211828004C -:1076F00005F354ED0A35606A012805D121002831CF -:10770000280000F3BAF84519082E04D1A9480560ED -:107710007001059001E0A84805603800F6F7C8F947 -:10772000002802D10698FFF260FD06980599C16114 -:1077300003990498887006980121C0690903884359 -:107740000699C861049801F397FB06990C23C86257 -:1077500007980799281A20380870000A4870079A75 -:1077600001213800FFF78BF9387A032821D1787A84 -:1077700000281ED002280FD0052E04D1079938000A -:1077800004F01BFC05E0082E13D10799380004F023 -:1077900010FC787A02280CD13800F5F7D2F9082EBF -:1077A00007D105F003FA002803D00799380004F048 -:1077B00043FD0998079AC030836A06983100FFF2AA -:1077C00007FF0DB0F0BD10B50C000DF0A9FF784912 -:1077D00044314018C078C106CB0F0107CA0F4007DB -:1077E000C10F2000FFF209FF10BD10B504000DF01D -:1077F00097FF20008030816B2000FFF7E4FF20001E -:10780000C03001682000FFF7DEFF10BD10B5040096 -:107810000DF086FF2000FFF7E8FF10BDF8B50C0063 -:10782000150047680AF098FE060078783A7800025A -:1078300010430C38020439002C31120C3D2003F3A4 -:107840008EFC002828D02179CA4392070DD08907E1 -:10785000890F012909D0002D07D0E17808221143B2 -:10786000E170C1781143C17006E0E278F7210A4067 -:10787000E270C2780A40C270C178FB221140E278FF -:107880005207D20F92001143C170E2788908890033 -:107890009207920F1143C17030000AF061FEF8BDEB -:1078A00070B50E000DF03CFF04006434012521008A -:1078B0003000FFF2BAFE2A0021003000FFF7AEFFD1 -:1078C00070BD10B504000DF02BFF20008030816BDF -:1078D0002000FFF7E5FF2000C03001682000FFF71F -:1078E000DFFF10BD10B504000DF01AFF2000FFF7F8 -:1078F000E8FF10BD07B56B46496818884885516890 -:1079000048850EBD10B504000DF00AFF2100FF30C0 -:10791000C031FF300A688034801CA16B806DFFF796 -:10792000E9FF10BD10B504000DF0FAFE2000FFF7CE -:10793000E9FF10BD70B50400080015000200496899 -:1079400023000820FFF2FFFB696823002A000520BE -:10795000FFF2F9FB70BD10B50DF0E2FE8F2189003A -:1079600040180100DC314A78C030806A921C05F36F -:1079700016EC10BD10B504000DF0D2FE2000FFF78C -:10798000EAFF10BD10B504000DF0CAFE2100C031A1 -:107990000A688034A16B2830FFF7CCFF10BD10B50A -:1079A00004000DF0BDFE2000FFF7ECFF10BD00004D -:1079B0001D020000B4BB0200B8BB0200E04A010097 -:1079C00000201C2343439B189B688B4232D090B00D +:1075D0002800FFF7E5FF61692800FFF7E1FF70BDB4 +:1075E00010B504000EF094F82000FFF7EAFF10BD7C +:1075F00007B56B46496818884885516848850EBDAF +:1076000010B504000EF084F8FF308034FF30801C89 +:107610006269E168806DFFF7EBFF10BD10B50400F3 +:107620000EF076F82000FFF7EBFF10BD70B50400F8 +:10763000080015000200496823000820FFF283FDBE +:10764000696823002A000520FFF27DFD70BD10B59A +:107650000EF05EF88F21890040180100DC314A7875 +:10766000C030806A921C05F39AED10BD10B504007D +:107670000EF04EF82000FFF7EAFF10BD10B5040031 +:107680000EF046F880346269E1682830FFF7CEFFDB +:1076900010BD10B504000EF03BF82000FFF7EEFF20 +:1076A00010BD00001D020000B4BB0200B8BB020008 +:1076B000FA4A010000201C2343439B189B688B421D +:1076C00002D0401C0328F6D3704710B50C00FFF71A +:1076D000EFFF03280CD01C235843F0490A5C012A11 +:1076E00006D1401880682100ECF705FE002010BD8F +:1076F000012010BDF8B51C245443E84EE84FA519ED +:107700000B00009205F366EF0C4B074B0A194B2058 +:107710004B344B4B344B0120687040E06A69002ABF +:1077200002D0E868002190473868002802D000980D +:1077300000F0BEF90120305531E002203055A86834 +:107740000621ECF7CAFE2AE03868002810D0305D28 +:1077500000280DD0E868F5F7E6F805F014F80028E1 +:1077600006D1E86800225F21EEF7FAFA00203860BF +:107770000027AF603755287E00280AD0E868F5F763 +:10778000D2F805F000F8002803D1009800F090F935 +:107790002F762A69002A02D0E8680021904703204A +:1077A000F8BDF8B5150000265469002A23D02889B1 +:1077B00041198878000904281FD008281BD00D28FB +:1077C00019D10020070000902000F5F7ACF8002840 +:1077D00001D00700BD375920C00022183B00280007 +:1077E000694604F30EFF002805D0009A0699280088 +:1077F00009F002FA01263000F8BD002CFBD0207AF7 +:107800000328F8D1607A0128F5D1069A200005F006 +:10781000A3FEEFE7FFB58FB00020199DFFF748FFEB +:1078200006000027032807D1002D02D00F98012160 +:10783000A8471B98076070E03821684605F34AEDB9 +:107840001C207043954944181C21200005F342ED8B +:10785000944800900F98F5F766F804F094FF00281C +:1078600001D1019701E0904801900F9802960C9089 +:1078700010ABE0601878A0701199E1701299616006 +:107880002776119908AB19728107890F5972010780 +:10789000890F8006800F9972D872187B40084000CB +:1078A0001873F6F7EDF9002809D108ABDE7A9A7A59 +:1078B000597A187A330010F0A8EB002804D008ABEE +:1078C000187B4008400003E008AB187B0121084307 +:1078D00008AB187312987D23DB0058437349089056 +:1078E000401807901898FB21584308AB0690187B66 +:1078F000084020210843187325611A986061684682 +:10790000ECF74DFCA0601B990860A068002807D127 +:10791000002D02D00F980121A847002013B0F0BD20 +:107920000120FBE770B5040000680026002801D1A3 +:10793000012070BDFFF7BCFE0500032814D02068AD +:10794000ECF762FE04280ED120680621ECF7C5FD95 +:10795000534920680968884205D11C2169434F4A70 +:10796000012089180876012600202060300070BDB3 +:10797000F7B586B000250C0008982F000560487800 +:10798000097800020843454E45496DD0012818D0BA +:1079900004287FD10868002864D0FFF789FE07001B +:1079A0003F48FFF7BFFF0500032F03D01C2078439B +:1079B000305CA0701C2078438019017E089801601B +:1079C00068E037480068002822D0FFF7E0DE8342F5 :1079D000010000008C72010000040000F80696D837 -:1079E00002D0401C0328F6D37047F8B51C25554338 -:1079F000D84E0127AC190B00009205F3F6ED0C47A9 -:107A000007470918471D47304747304767703DE033 -:107A10006269002A02D0E06800219047CE480068E1 -:107A2000002802D0009800F083F977552EE0A06876 -:107A30000621ECF763FC29E0C748006800280ED057 -:107A4000705D01280BD1E068F5F785F805F0B8F80E -:107A5000002804D1E06800225F21EEF7ABF8002790 -:107A6000A7607755207E00280AD0E068F5F773F804 -:107A700005F0A6F8002803D1009800F059F9277600 -:107A80002269002A02D0E068002190470320F8BD57 -:107A9000F8B5150000265469002A23D02889411919 -:107AA0008878000904281FD008281BD00D2819D178 -:107AB0000020070000902000F5F74DF8002801D0C5 -:107AC0000700BD37BB20800022183B002800694614 -:107AD00004F3A1FD002805D0009A0699280009F0BA -:107AE00017FA01263000F8BD002CFBD0207A0328BD -:107AF000F8D1607A0128F5D1069A200005F013FF2D -:107B0000EFE7FFB58FB00020199DFFF761FF06007A -:107B10000027032807D1002D02D00F980121A84784 -:107B20001B9807606EE03821684605F3DEEB1C20E9 -:107B30007043884944181C21200005F3D6EB874880 -:107B400000900F98F5F707F805F03AF8002801D1F2 -:107B5000019701E0824801900F9802960C9010ABBB -:107B6000E0601878A0701199E17012996160277631 -:107B7000119908AB19728107890F59720107890F92 -:107B80008006800F9972D872187B400840001873E5 -:107B9000F6F7DFF9002809D108ABDE7A9A7A597A2C -:107BA000187A330010F0FCE9002804D008AB187BE9 -:107BB0004008400003E008AB187B0121084308ABF4 -:107BC000187312987D23DB005843664908904018CB -:107BD00007901898FB21584308AB0690187B084083 -:107BE000187325611A9860616846ECF7F0F9A06097 -:107BF0001B990860A068002807D1002D02D00F98BB -:107C00000121A847002013B0F0BD0120FBE770B5AB -:107C1000040000680026002801D1300070BDFFF785 -:107C2000D7FE050003280ED02068ECF7FEFB0428E1 -:107C300003D120680621ECF761FB1C216943454A0A -:107C4000012689180E7600202060E6E7F7B50020AF -:107C500086B00C001060487809783F4F160000028B -:107C6000084349D0012819D0042843D13868002896 -:107C700040D0FFF7ADFE07003748FFF7C8FF05000B -:107C8000032F04D01C2179433248405CA0701C2192 -:107C9000794330480818007E306046E0A01D05F3A7 -:107CA000CAEB00281AD0030020790021009101912D -:107CB0000590294A02910392627905990698FFF787 -:107CC00020FF05003868002806D0FFF781FE1C2140 -:107CD00041432048405CA0700120DDE7F5F7BBFE82 -:107CE000002805D0207905906179002210F08CE8F9 -:107CF00001251AE0002518E038680025002814D076 -:107D0000FFF766FE032810D01C254543114E0021C5 -:107D1000A819E17081782171C17861714068A11D55 -:107D200005F398EB705DA070E2E7280009B0F0BDA4 -:107D30001C235843074910B54018C06810F038E8B4 -:107D40000189094A09180A70120A4A7010F034E8C9 -:107D500010BD0000A05201C038F600C097720100AB -:107D60003D730100102700000D81000000290ED195 -:107D70000B2A0CD2401E0006000E0E2807D2190056 -:107D80000B235843F94BC018815401207047002041 -:107D90007047FEB50022060002923EE0F0780F1F09 -:107DA000B178000235000843B84238DC69782A7897 -:107DB00009021143FF398A3928D1042826DDE879E0 -:107DC000009069792A79080200991043EFF708F9C1 -:107DD0000190E978AA7808021043001F53A51C2DD2 +:1079E00071FE03281ED01C23584361798719F8784B +:1079F000884217D1B81C0122211D0AF0B7F90028CE +:107A000010D1A01D05F316ED7D21C9004143294881 +:107A10000068FFF764FE002846D1A01D05F30AEDBB +:107A2000786029E0A01D05F306ED00281AD00300B8 +:107A3000207900210091019105901E4A0291039244 +:107A4000627905990698FFF7EFFE0500194800686E +:107A5000002805D0FFF736FE1C235843305CA07089 +:107A60000121B5E7F5F788FE002805D020790590BB +:107A70006179002210F002EA012515E0086800286B +:107A800012D0FFF71FFE03280ED01C254543E770D8 +:107A9000A81981782171C17861714068A11D05F331 +:107AA000DAEC705DA070E7E7280009B0F0BD0000D7 +:107AB000845101C080F800C0B56F010063700100FF +:107AC000102700001C235843074910B54018C06810 +:107AD00010F0A8E90189054A09180A70120A4A70CB +:107AE00010F0A4E910BD0000845101C00D81000018 +:107AF00000290ED10B2A0CD2401E0006000E0E28C3 +:107B000007D219000B235843FF4BC01881540120A2 +:107B1000704700207047FEB50022060002923EE04A +:107B2000F0780F1FB178000235000843B84238DC06 +:107B300069782A7809021143FF398A3928D1042843 +:107B400026DDE879009069792A79080200991043C6 +:107B5000EFF709F90190E978AA7808021043001FAD +:107B600040080024844611E061004819017A0A297E +:107B70000BD2491C0A06437A01990098120EFFF7AE +:107B8000B7FF002801D001200290641C6445EBDBA4 +:107B9000E878A97800020843391A361D86190429A5 +:107BA000BED20298FEBDFFB581B00A9C002C02D166 +:107BB000002005B0F0BD0421D34F0500009128E05E +:107BC0000B266E43FF20BA5D8A302070000A607079 +:107BD0000B99201D0023EFF7EBF800210398F6190D +:107BE00009E04A00121933181072401C00065B7835 +:107BF000000E491C5372049A9042F2D34800009937 +:107C000040180004000C020AA070E270241D041940 +:107C10006D1C02988542D3DB2000CAE7FEB5050043 +:107C200000200C00002D08800ED0002C0CD0002A63 +:107C30000AD100270A2338000E213A000197009547 +:107C4000FFF7B1FF002801D10020FEBD401B2080BE +:107C50000120FEBD30B40D001400029A190001206D +:107C6000012D03D10988200030BC54E7002D02D13A +:107C7000200030BCD2E730BC704770B50024A34E62 +:107C80000C206043801905F3D6EB0500FDF7C5F91C +:107C9000002806D00A2D01DD0A2502E0002D00DAB9 +:107CA00000252900200007F0EAFE641C2406240EAB +:107CB0000B2CE5D307F0E2FF70BDFFB5012085B0C6 +:107CC000019091482F38012B0BD0027805998A42F8 +:107CD00007D1427807998A4203D1827806998A426D +:107CE00003D00E9A0121116002E00E9900220A6071 +:107CF0000699817005990170079900244170FBF77E +:107D00006BFB012804D1012C00D36DD9FF2C6BD063 +:107D10000798012801D1082C6BD20698002807D1BA +:107D2000082C05D1079A05990698ECF7A7FF05904E +:107D3000069905982200EEF7DCFB060006990598E7 +:107D4000EEF7D3FB0500864200DA2E000C206F49C7 +:107D50006043843104904018039005F36CEB0700F6 +:107D6000A84201DA2F0002E0B74200DD3700674881 +:107D700004990818029005F35EEBB84206D0029908 +:107D8000380005F368EB0E98012101600398001D8F +:107D900005F350EB0700A84201DA2F0002E0B742DA +:107DA00000DD37000298001D05F344EBB84207D010 +:107DB00002993800091D05F34EEB0E990120086069 +:107DC000029805F338EB05000298001D05F332EB2D +:107DD0002D1A0398083005F32EEB854213E25C0F51 :107DE000010000008876010000040000ABDC45B40F -:107DF00040080024844611E061004819017A0A29EC -:107E00000BD2491C0A06437A01990098120EFFF71B -:107E1000B7FF002801D001200290641C6445EBDB11 -:107E2000E878A97800020843391A361D8619042912 -:107E3000BED20298FEBDFFB581B00A9C002C02D1D3 -:107E4000002005B0F0BD0421CD4F0500009128E0D1 -:107E50000B266E43FF20BA5D8A302070000A6070E6 -:107E60000B99201D0023EFF7EAF800210398F6197B -:107E700009E04A00121933181072401C00065B78A2 -:107E8000000E491C5372049A9042F2D348000099A4 -:107E900040180004000C020AA070E270241D0419AE -:107EA0006D1C02988542D3DB2000CAE7FEB50500B1 -:107EB00000200C00002D08800ED0002C0CD0002AD1 -:107EC0000AD100270A2338000E213A0001970095B5 -:107ED000FFF7B1FF002801D10020FEBD401B20802C -:107EE0000120FEBD30B40D001400029A19000120DB -:107EF000012D03D10988200030BC54E7002D02D1A8 -:107F0000200030BCD2E730BC704770B500249D4ED5 -:107F10000C206043801905F398EA0500FDF737FA55 -:107F2000002806D00A2D01DD0A2502E0002D00DA26 -:107F300000252900200007F04CFF641C2406240EB5 -:107F40000B2CE5D308F038F870BDFFB5012085B0E3 -:107F500001908B482F38012B0BD00178059A914264 -:107F600007D1427807998A4203D1827806998A42DA -:107F700003D00E9A0121116002E00E9900220A60DE -:107F8000069981700599017007990027417006983C -:107F9000002807D1082F05D1079A05990698ECF714 -:107FA0007DFD0590069905983A00EEF7D8FB05008F -:107FB00006990598EEF7CFFB0400854200DA25000C -:107FC0000C2070497843843104904018039005F3E5 -:107FD0003CEA0600A04201DA260002E0AE4200DDE3 -:107FE0002E00684804990818029005F32EEAB04262 -:107FF00006D00299300005F338EA0E98012101609D -:108000000398001D05F320EA0600A04201DA2600CD -:1080100002E0AE4200DD2E000298001D05F314EAD6 -:10802000B04207D002993000091D05F31EEA0E99EF -:1080300001200860029805F308EA04000298001D78 -:1080400005F302EA241A0398083005F3FEE9844296 -:1080500000DA20000299083105F306EA7F1C3F068A -:108060003F0E0B2F93D3019809B0F0BDFEB50F0062 -:10807000FBF771FB0406240EFBF770FB0500FBF712 -:1080800070FB06000AF07CFA02AA009201903B0005 -:10809000320029002000FFF758FF04000298002852 -:1080A00001D0FFF732FF01980AF06EFA2000FEBD02 -:1080B000F8B5070000203449324E040084360870B9 -:1080C0000C20604385192900122005F3CEE9291DF3 -:1080D000122005F3CAE929000831002005F3C4E99C -:1080E000641C2406240E0B2CEAD300213800FFF771 -:1080F000BDFFF8BD70B500242500280007F05FFE25 -:10810000844200DB20006D1C2D0604002D0E0B2D7B -:10811000F3D3200070BDF3B581B00700FBF71BFB64 -:10812000184E002484360C20604385190298291DBE -:1081300005F39AE9290005F398E9290008310020A0 -:1081400005F392E9641C2406240E0B2CEBD30021CA -:108150003800FFF78BFFFEBD012187E7F3B583B041 -:10816000FBF7F9FA0498002808D00498C17A827ABB -:1081700008021043C0080B28019007D9002060E6D0 -:108180006BF600C0F45201C0E5FB00C00498001D6E -:1081900005F35AE9964A00210128117053D10020B5 -:1081A0004CE00298C10004980C180C34667840E04A -:1081B000A0790128207803D1310000F3E2FD02E02C -:1081C000310000F3ECFD0500FF282FD0280007F058 -:1081D000EBFD0C21414387480F180520205639003C -:1081E00005F342E904202056391D05F33F127812A9 +:107DF00000DA28000299083105F336EB641C2406EA +:107E0000240E0B2C85D3019809B0F0BDFEB50F00F0 +:107E1000FBF7E9FA0406240EFBF7E8FA0500FBF786 +:107E2000E8FA06000AF088FA02AA009201903B00E4 +:107E3000320029002000FFF74AFF040002980028C2 +:107E400001D0FFF724FF01980AF07AFA2000FEBD66 +:107E5000F8B5070000203349314E0400843608701D +:107E60000C20604385192900122005F3FEEA291D24 +:107E7000122005F3FAEA29000831002005F3F4EA9C +:107E8000641C2406240E0B2CEAD300213800FFF7D3 +:107E9000BDFFF8BD70B500242500280007F0EFFDF8 +:107EA000844200DB20006D1C2D0604002D0E0B2DDE +:107EB000F3D3200070BDF3B581B00700FBF793FA50 +:107EC000174E002484360C20604385190298291D22 +:107ED00005F3CAEA290005F3C8EA290008310020A1 +:107EE00005F3C2EA641C2406240E0B2CEBD30021FC +:107EF0003800FFF78BFFFEBD012187E7F3B583B0A4 +:107F0000FBF771FA049800280FD00498C17A827A9E +:107F100008021043C0080B28019005E0B3F800C028 +:107F2000D85101C015FE00C001D900204BE60498CD +:107F3000001D05F38AEA974A00210128117053D1E8 +:107F400000204CE00298C10004980C180C346678AC +:107F500040E0A0790128207803D1310000F311FF1F +:107F600002E0310000F31BFF0500FF282FD028009E +:107F700007F07AFD0C21414387480F180520205651 +:107F8000390005F372EA04202056391D05F36CEA26 +:107F9000390003202056083105F366EA280007F06F +:107FA00066FDFF2813D00C2141437B480D180520A6 +:107FB0002056290005F358EA04202056291D05F310 +:107FC00054EA290003202056083105F34EEA761CB6 +:107FD0003606360EA078B042BBD20298401C0199FA +:107FE00002908842AED316E06B4E00240C20604312 +:107FF00085192900122005F338EA291D122005F3FE +:1080000034EA29000831002005F32EEA641C240616 +:10801000240E0B2CEAD303980021FFF7F7FED2E5DC +:10802000F1B501200099091D05F31EEA5948009C8D +:1080300000780C340026002801D0002500E001253E +:10804000564AA900505C8A18207051786170937864 +:10805000A370D378A371D278012A02D100F391FEE4 +:1080600001E000F39CFE07F0FFFC0C2141434A486D +:1080700084380F18380005F3E8E96071381D05F3FE +:10808000E4E920713800083005F3DEE9761C360695 +:10809000E0700834360E6D1C0B2DD1D30099FF20F3 +:1080A00055300872000A48720099F000020A88727E +:1080B000001DCA72F8BD0B2A10B500D30222374941 +:1080C000401EC631895C0006491C0C063349240E4B +:1080D000D131895C000E491C0906090E0E2800D317 +:1080E00006200A2C00D904240A2900D900210B22D9 +:1080F00042432A482C301218105D002903D0515CED +:10810000884200DB080010BD70B505000E001400A9 +:1081100000292FD1012C06D305D80E2D01D10C201A +:1081200070BD102070BD042C0BD8012D2FD0022D56 +:1081300005D00B2D2BD00E2DF1D0022CF1D10F201C +:1081400070BD082C0FD2012D08D00B2D02D1052CAB +:108150001DD103E00E2DE2D0052C01D10D2070BD04 +:10816000062CECD113E0082C01D10B2070BD092C9A +:10817000F4D1D4E7220031002800FFF79CFF0E283D +:1081800005DA220031002800FFF795FF70BD0E20B0 +:1081900070BD000015FE00C05C5201C087F800C031 +:1081A000F0B50E2801D2002432E00123162800D2B7 +:1081B00000230100FC4A0E394900515AFB4A9678C7 +:1081C0009489D789158A5289B04210D9F74E9B00FD +:1081D0002036F6588E4207D3F44C2834E3588B42AD +:1081E00001D23C0000E02C00A24211DDD145D0D0EC :1081F00001000000847A0100000400005FB3300039 -:108200003EE9390003202056083105F338E92800FB -:1082100007F0D7FDFF2813D00C2141437A480D18F1 -:1082200005202056290005F32AE904202056291D9F -:1082300005F324E9290003202056083105F31EE93F -:10824000761C3606360EA078B042BBD20298401C8F -:10825000019902908842AED316E06B4E00240C20A8 -:10826000604385192900122005F308E9291D122011 -:1082700005F304E929000831002005F300E9641C36 -:108280002406240E0B2CEAD303980021FFF7F8FEF6 -:10829000E1E5F1B501200099091D05F3F0E8594821 -:1082A000009C00780C340026002801D0002500E056 -:1082B0000125564AA900505C8A18207051786170D7 -:1082C0009378A370D378A371D278012A02D100F3F6 -:1082D00062FD01E000F36DFD07F070FD0C214143EC -:1082E000494884380F18380005F3B8E86071381D24 -:1082F00005F3B4E820713800083005F3B0E8761CC7 -:108300003606E0700834360E6D1C0B2DD1D3009963 -:10831000FF2055300872000A48720099F000020AE6 -:108320008872001DCA72F8BD0B2A10B500D3022254 -:108330003649401EC631895C0006491C0C0633498B -:10834000240ED131895C000E491C0906090E0E2845 -:1083500000D306200A2C00D903240A2900D90021C1 -:108360000B22424329482C301218105D002903D0FB -:10837000515C884200DB080010BD70B505000E009E -:10838000140000292FD1012C06D305D80E2D01D1C0 -:108390000C2070BD102070BD042C0BD8012D2FD0E7 -:1083A000022D05D00B2D2BD00E2DF1D0022CF1D1AA -:1083B0000F2070BD082C0FD2012D08D00B2D02D13B -:1083C000052C1DD103E00E2DE2D0052C01D10D208E -:1083D00070BD062CECD113E0082C01D10B2070BD30 -:1083E000092CF4D1D4E7220031002800FFF79CFFCC -:1083F0000E2805DA220031002800FFF795FF70BD36 -:108400000E2070BDE5FB00C0785301C03FF600C0F0 -:10841000F0B50E2801D2002432E00123162800D244 -:1084200000230100FB4A0E394900515AFA4A967856 -:108430009489D789158A5289B04210D9F64E9B008B -:108440002036F6588E4207D3F34C2834E3588B423B -:1084500001D23C0000E02C00A24211DD0FE0EE4E04 -:108460009B003836F6588E4201D92C0005E0EA4DC3 -:108470003035EB588B4200D93C00A24200DA1400A0 -:10848000E54988702000F0BDF8B505000E00E24F08 -:10849000786900281BD02800EAF79CFF002816D036 -:1084A000E868C00413D5687A032801D001280ED1EA -:1084B0007878B0420BD03000FFF7AAFF798904002A -:1084C000884204D028000FF084ED7E707C81F8BDD6 -:1084D000FEB504000500FF34853400202062207DB5 -:1084E000E0612800F3F7CCFC002809D02800F3F75E -:1084F0004DFCC94A01040420105E0914814201DDCB -:10850000E06917E00620105E814201DC206A11E07C -:10851000266AE069C14B801940080827D75F07E049 -:108520002218C03212789A56D2198A4202DD401EB1 -:108530008642F5D36062A06200212D200155B4204F -:108540000155200000F3CDFF009000992200280083 -:1085500000F058FE28000026FF30B14F7230019025 -:1085600018207043395C002910D0C1190198091DE9 -:10857000062209F033FD002808D13000EAF768FA36 -:108580003106A74A090E2800F8F26AF8761C042E74 -:10859000E6D3200000F3CBFE0321200000F314FFFC -:1085A00000992800FFF770FF0120FEBDF8B5050017 -:1085B000FF3507008535281F46693800FF308530B4 -:1085C0000024C030002E6CD07100C90B02D00F21E6 -:1085D00049028E4393490E4201D040218E431E2111 -:1085E0000090017000208D4B0122824019563242CA -:1085F00012D02A19C03212789A568A42832422B0A5 +:108200000FE0EF4E9B003836F6588E4201D92C0015 +:1082100005E0EB4D3035EB588B4200D93C00A242D3 +:1082200000DA1400E64988702000F0BDF8B50500BA +:108230000E00E34F786900281BD02800EBF7CEF939 +:10824000002816D0E868C00413D5687A032801D046 +:1082500001280ED17878B0420BD03000FFF7AAFF8A +:1082600079890400884204D028000FF0F0EE7E7077 +:108270007C81F8BDFEB504000500FF345D340020AC +:108280002062207DE0612800F3F7B6FC002809D0C9 +:108290002800F3F738FCCA4A01040420105E0914D0 +:1082A000814201DDE06917E00620105E814201DCB9 +:1082B000206A11E0266AE069C24B8019400808274D +:1082C000D75F07E02218C03212789A56D2198A4234 +:1082D00002DD401E8642F5D36062A06200212D209F +:1082E0000155B4200155200001F3FBF800900099DE +:1082F0002200280000F056FE28000026FF30B24F72 +:108300004A30019018207043395C002910D0C119FF +:108310000198091D062209F03DFD002808D1300012 +:10832000EAF79AFC3106A84A090E2800F8F298F9F3 +:10833000761C042EE6D3200000F3F9FF0321200071 +:1083400001F342F800992800FFF770FF0120FEBDFD +:10835000F8B505000700FF304130C66A3800FF302D +:10836000FF355D3000245D35C030002E6CD07100CB +:10837000C90B02D00F2149028E4394490E4201D00D +:1083800040218E431E210090017000208D4B012260 +:1083900082401956324212D02A19C03212789A56A7 +:1083A0008A4203DA641C2406240E05E0002C03D064 +:1083B000641E2406240EEFE72919C03108701E2818 +:1083C00003D200F057FD1E28E0D900980078172846 +:1083D00014D1700428D5601C202825D20406240E50 +:1083E000200005E02918BF22525CC031401E0A70EF +:1083F0000028F7DC00980E21017001E00E2813D14F +:10840000B00611D5601C20280ED20406240E2000D0 +:1084100005E02918BF22525CC031401E0A700028B6 +:10842000F7DC0098052101702C75387A022809D0F4 +:1084300063480078002805D0C03580372978F8696E +:10844000FAF2F4FC0120F8BD0021ECE710B50400BD +:10845000FFF77EFF2000FFF70DFF012010BDF5E7BD +:1084600070B504000600FF345D3400207D21C90092 +:108470006060A160B421206008550321200000F352 +:10848000A3FF25008035E86B002804D150480C215B +:1084900000F332FEE8633000FFF7D8FF70BDF8B597 +:1084A0004C48F0F24DFEC1254008ED0045434A4ED0 +:1084B00000247D27FF0020000E300006000E06F38A +:1084C00093F8FF23F53358432F235B0158433900BA +:1084D00005F3D2EBC008A84200D928006100326839 +:1084E0008008641C112C5052E5D3F8BDF8B5040087 +:1084F000FF345D3405000E002000A16200F381FF0F +:10850000A019C03001782200280000F04BFD28009F +:108510000024FF302C4F4A30009018206043395C13 +:10852000002910D0C1190098091D062209F032FC5B +:10853000002808D12000EAF78FFB2106224A090E05 +:108540002800F8F28DF8641C042CE6D33000F8BD46 +:1085500070B50400FF345D340500E169606A88424B +:1085600003D2210000F347FF17E02100C0310A00C9 +:10857000415C207D805C88420AD1200020300600CA +:10858000407B012804D0280000F0DAFC002801D14B +:10859000FF2070BD01207073606A01002800FFF7A2 +:1085A000A5FF70BD10B50400FF305D3000F341FF42 +:1085B00001002000FFF79AFF10BD0000B015320047 +:1085C000540600047C7B02001C800200084000006E +:1085D000400B02C064040004B4BC02000100FF317F +:1085E0008131096882E770B50400FF345D342500ED +:1085F000A0352E7D02212975FFF7AAFF4DBC9D8F66 :1086000001000000807E0100000400000C69E36CA2 -:1086100003DA641C2406240E05E0002C03D0641E3B -:108620002406240EEFE72919C03108701E2803D252 -:1086300000F05AFD1E28E0D900980078172814D1C0 -:10864000700428D5601C202825D20406240E2000A2 -:1086500005E02918BF22525CC031401E0A70002874 -:10866000F7DC00980E21017001E00E2813D1B0064E -:1086700011D5601C20280ED20406240E200005E02F -:108680002918BF22525CC031401E0A700028F7DC56 -:108690000098052101702C75387A022809D06348AA -:1086A0000078002805D0C035C0372978B868FAF2BC -:1086B000C7FB0120F8BD0021ECE710B50400FFF76F -:1086C0007FFF2000FFF70EFF012010BDF5E770B51A -:1086D00004000600FF34853400207D21C90060605D -:1086E000A160B421206008550321200000F376FE2C -:1086F00025008035E86B002804D150480D2100F397 -:1087000005FDE8633000FFF7D8FF70BDF8B54C48B1 -:10871000F0F220FDC1254008ED004543494E0024FC -:108720007D27FF0020000E300006000E05F366FFD7 -:10873000FF23F53358432F235B015843390005F3DA -:10874000A6EAC008A84200D9280061003268800863 -:10875000641C112C5052E5D3F8BDF8B50400FF3469 -:10876000853405000E002000A16200F354FEA0191C -:10877000C03001782200280000F04EFD28000024BF -:10878000FF302C4F7230009018206043395C002974 -:1087900010D0C1190098091D062209F029FC0028F3 -:1087A00008D12000EAF75EF92106224A090E2800C6 -:1087B000F7F260FF641C042CE6D33000F8BD70B5FE -:1087C0000400FF3485340500E169606A884203D201 -:1087D000210000F31AFE17E02100C0310A00415CBD -:1087E000207D805C88420AD1200020300600407B3A -:1087F000012804D0280000F0DDFC002801D1FF2072 -:1088000070BD01207073606A01002800FFF7A5FFAA -:1088100070BD10B50400FF30853000F314FE010078 -:108820002000FFF79AFF10BDB015320024020004AB -:10883000DC7A0200C880020008400000000E02C07E -:108840002C000004B4BC02000100FF318131896AB0 -:1088500083E770B50400FF3485342500A0352E7DF4 -:1088600002212975FFF7ABFFFF2808D12E75A068FC -:108870000A2801D1642001E07D20C000A060002012 -:108880006060206070BD0100FF3185310122A031A0 -:108890000A75BEE710B50400FF3085300329C2D841 -:1088A000002902D17D22D20004E0022901D10A224E -:1088B00000E06422826000F3DEFD2000FFF7C4FFC9 -:1088C000B1E7F0B50400FF3485340700A16A200049 -:1088D000C030085C85B00090200020300390407BC1 -:1088E0000025002806D00099380000F063FC00281D -:1088F00000D101253800FF3081300068002806D003 -:1089000000980FF01FF9002801D0012300E0002398 -:1089100020003C3001AA02A909F052FA022801D134 -:10892000002D54D0200000F30CFD200002A900F31C -:1089300029FD3E006B461879FF3685362843A03660 -:10894000002804D0357D022D07D1002505E0307DBB -:108950002200002100F39CFD050020005C3009F09E -:1089600089F9FF280DD0009988420AD0010003221E -:10897000200000F325FD22002900032000F388FDDC -:108980000500002D07D0012D03D0022D01D0032DAD -:108990001DD1290004E00398007B032806D30021A1 -:1089A0003800FFF777FF012005B0F0BD307D0128CA -:1089B0000BD1200000F354FD002802D03800FFF74F -:1089C00048FF307D0228EAD101E00228E7D00020EC -:1089D000EAE7FEB504000500FF348534FF48807DDA -:1089E000400609D52800FFF768FE0020606020607F -:1089F0007D20C000A0606BE0206827000A302E00B8 -:108A0000A037FF362060387D8536C03669A6BAEDBE +:10861000FF2808D12E75A0680A2801D1642001E046 +:108620007D20C000A06000206060206070BD01223D +:10863000212109010A54BFE710B50400FF305D3065 +:108640000329C3D8002902D17D22D20004E00229E7 +:1086500001D10A2200E06422826000F30CFF2000B6 +:10866000FFF7C6FFB2E7F0B50400FF345D34070042 +:10867000A16A2000C030085C85B000902000203046 +:108680000390407B0025002806D00099380000F0B8 +:1086900061FC002800D101253800FF30413080699D +:1086A000002806D000980FF087FA002801D0012397 +:1086B00000E0002320003C3001AA02A909F037FAAB +:1086C000022801D1002D53D0200000F33AFE2000F3 +:1086D00002A900F357FE6B4618793E00FF36284387 +:1086E000FD36002804D0357D022D07D1002505E098 +:1086F000307D2200002100F3CBFE050020005C301D +:1087000009F06FF9FF280DD0009988420AD00100C6 +:108710000322200000F354FE22002900032000F36E +:10872000B7FE0500002D07D0012D03D0022D01D08A +:10873000032D1DD1290004E00398007B032806D3F4 +:1087400000213800FFF778FF012005B0F0BD307D33 +:1087500001280BD1200000F383FE002802D038004E +:10876000FFF74BFF307D0228EAD101E00228E7D075 +:108770000020EAE7FEB504000500FF345D34FF4841 +:10878000807D400609D52800FFF76AFE0020606062 +:1087900020607D20C000A0606BE0206827000A30C8 +:1087A0002E00A037FF362060387D5D36C0360028A9 +:1087B00049D1A06A805D260020360090707B002899 +:1087C00006D00099280000F0C5FB002800D1707386 +:1087D0002800FF3041308069002806D000980FF053 +:1087E000EBF9002801D0012300E0002320003C30F9 +:1087F00001AA02A909F09BF90600022831D0200045 +:1088000000F39FFD002E14D1200002A900F3BAFD51 +:10881000216A606A884203D92800FFF708FF20E038 +:10882000200000F31DFE00281BD02800FFF7E5FE06 +:1088300017E0200000F314FE002812D0200002A947 +:1088400000F3A0FDF1E72800FFF70DFF012808D194 +:108850000321200000F3C2FD606A815D2800FFF75C +:10886000EFFC387D002806D1A1687D20C000814240 +:1088700001D10020FEBD0120FEBD10B50400C0489E +:10888000406A6030407B002803D1BC48807D4006B0 +:1088900009D420003C3000F341FD6168401860605D +:1088A00000208034A06391E60120704770B5040079 +:1088B000001D04F3DEED0500083400F06CFC00F050 +:1088C000B2FC022D04D0032D18D1FF25533523E02F +:1088D000E078A178000208438608002507E0A80098 +:1088E0000019001D310000F042FC6D1C761EE0787E +:1088F000A178000208438008A842F0DC70BDE1784E +:10890000A27809021143201D890800F030FC2100E3 +:10891000280000F324FE0400002CF0D170BD70B5D7 +:1089200005000C0008D0201D04F3A2ED0006000E87 +:1089300000F024FB012801D1012070BD201D04F3AB +:1089400098ED00280DD001280ED0022801D0032870 +:1089500002D12000FFF7AAFF280000F0F6FB00205C +:1089600070BD00F018FCF7E700F30EFAF4E710B55D +:10897000040000F05DFA2000FCF760FB26E670B50D +:1089800006000800002A01D0012070BD7D4DAC69B1 +:1089900000F3C5FDA861300000F092FA002801D074 +:1089A000AC6170BD3000FFF7E2FF002070BDF7B58D +:1089B000002702983D003C000CF0D2FE0600029811 +:1089C000407A02282AD1019800F3A9FDFF21C905A8 +:1089D000884301D1012721E0411E084206D0FE2034 +:1089E000B0771BE0641C2406240E00E00122110075 +:1089F000A1400142F6D020000E3807280BD802987B +:108A0000EEF7A5F8002806D06720805D8A79CD545E :108A1000010000007C820100000400005A40802C0C -:108A2000002849D1A06A805D260020360090707B26 -:108A3000002806D00099280000F0C6FB002800D1CD -:108A400070732800FF3081300068002806D000983D -:108A50000FF082F8002801D0012300E0002320005D -:108A60003C3001AA02A909F0B5F90600022831D06C -:108A7000200000F370FC002E14D1200002A900F3A6 -:108A80008BFC216A606A884203D92800FFF705FF42 -:108A900020E0200000F3EEFC00281BD02800FFF7A8 -:108AA000E2FE17E0200000F3E5FC002812D02000D1 -:108AB00002A900F371FCF1E72800FFF70CFF012881 -:108AC00008D10321200000F393FC606A815D280037 -:108AD000FFF7EEFC387D002806D1A1687D20C0009C -:108AE000814201D10020FEBD0120FEBD10B5040071 -:108AF000C048406A6030407B002803D1BC48807D7C -:108B0000400609D420003C3000F312FC6168401894 -:108B1000606000208034A0638FE60120704770B54C -:108B20000400001D04F3AEEC0500083400F06DFCF9 -:108B300000F0B3FC022D04D0032D18D1FF255335CE -:108B400023E0E078A178000208438608002507E0CA -:108B5000A8000019001D310000F043FC6D1C761EBA -:108B6000E078A178000208438008A842F0DC70BDDC -:108B7000E178A27809021143201D890800F031FC38 -:108B80002100280000F3F5FC0400002CF0D170BD9A -:108B900070B505000C0008D0201D04F374EC00062D -:108BA000000E00F025FB012801D1012070BD201D21 -:108BB00004F368EC00280DD001280ED0022801D063 -:108BC000032802D12000FFF7AAFF280000F0F7FBDE -:108BD000002070BD00F019FCF7E700F3DFF8F4E7C0 -:108BE00010B5040000F05EFA2000FCF7E2FB24E67A -:108BF00070B506000800002A01D0012070BD7E4D2E -:108C0000AC6900F396FCA861300000F093FA0028EC -:108C100001D0AC6170BD3000FFF7E2FF002070BDF5 -:108C2000F7B5002702983D003C000CF0ABFD0600B4 -:108C30000298407A02282AD1019800F37AFCFF2199 -:108C4000C905884301D1012721E0411E084206D011 -:108C5000FE20B0771BE0641C2406240E00E00122F5 -:108C60001100A1400142F6D020000E3807280BD891 -:108C70000298EEF7B3F8002806D06720805D400721 -:108C800002D509342406240E002F00D1B477029CAB -:108C9000607A022803D1B17F382001550AE0E068EC -:108CA000C00406D5009A01992000FFF7A1FF050036 -:108CB00000E00125E27AA17A2000F3F70AFF040020 -:108CC000002D00D02F00002CE2D13800FEBD70B581 -:108CD0000D001400002811D0012070BD607A022818 -:108CE00006D0E068C00403D529002000FFF750FF3C -:108CF000E27AA17A2000F3F7ECFE0400002CEDD11B -:108D0000002070BDF8B50F004179027908020B21EF -:108D100089017918896B1043FF3121313C00FE2510 -:108D20008880E068C00407D538200555200000F091 -:108D3000B9F92000FCF73DFBE27AA17A2000F3F7B5 -:108D4000C8FE0400EDD12D4E0025FF3772371820E4 -:108D50006843315C00290AD08119091D06223800B8 -:108D600009F050F9002802D12800E9F785FE6D1CB2 -:108D70002D042D0C042DEAD30020F8BD417A0229E0 -:108D80000FD12030017EFE2909D0080017380728AE -:108D900002D809390906090E012088407047184891 -:108DA0007047154880697047030070B50C001000CB -:108DB000FFF7E4FF0500002B01D0012070BD042166 -:108DC000200004F3E4EA2807000F2071000A607114 -:108DD000E804000EA071000AE071A8022100000E54 -:108DE000083104F360EB6802C00F21000C3109E088 -:108DF000765C0004E458000424020004C8800200E9 -:108E0000EFDFFF7F04F34EEBFF2054302070000AA9 -:108E100060701420A0700020E07070BD2F89165C77 +:108A2000400702D509342406240E002F00D1B47764 +:108A3000029C607A022803D1B17F382001550AE0F8 +:108A4000E068C00406D5009A01992000FFF7A1FF55 +:108A5000050000E00125E27AA17A2000F3F72BFF60 +:108A60000400002D00D02F00002CE2D13800FEBD04 +:108A700070B50D001400002811D0012070BD607A7F +:108A8000022806D0E068C00403D529002000FFF7C3 +:108A900050FFE27AA17A2000F3F70DFF0400002CCA +:108AA000EDD1002070BDF8B50F00417902790802C0 +:108AB0000B218901791849691043FF3141313C008C +:108AC000FE258881E068C00407D5382005552000C0 +:108AD00000F0B8F92000FCF7BBFAE27AA17A200096 +:108AE000F3F7E9FE0400EDD12C4E0025FF374A379D +:108AF00018206843315C00290AD08119091D06221B +:108B0000380009F05BF9002802D12800EAF7B8F82C +:108B10006D1C2D042D0C042DEAD30020F8BD417AE4 +:108B200002290FD12030017EFE2909D00800173814 +:108B3000072802D809390906090E01208840704724 +:108B400017487047144880697047030070B50C00DF +:108B50001000FFF7E4FF0500002B01D0012070BDDD +:108B60000421200004F312EC2807000F2071000AF2 +:108B70006071E804000EA071000AE071A8022100F3 +:108B8000000E083104F38EEC6802C00F210009E0EA +:108B90007A5C0004F0580004540600041C800200B3 +:108BA000EFDFFF7F0C3104F37EECFF2054302070A8 +:108BB000000A60701420A0700020E07070BDF8B54D +:108BC0000F00002801D00120F8BD1000FFF7A7FF1B +:108BD000002425000090042C1CD00D2C1AD001205C +:108BE0000099A040084215D03A49A000096808221F +:108BF000095824206843C61930000C3000F376FA77 +:108C0000FF2053303072000A70722020B0720020B2 +:108C10006D1CF072641C2406240E162CDBD9391D41 +:108C2000032004F340ECFF2052303870000A7870C3 +:108C300024206843001DB870000AF8700020F8BDB9 +:108C4000FF22BA320270120A42700222827000229F +:108C5000C2700B22920189184969FF31413189891B +:108C60000171090A4171002070470B0001001F22A9 +:108C70002131180010B504F3C4EAB1E416481749CD +:108C8000002281610270C161704710B5FFF7F6FFE5 +:108C900011490120488200F088FAA1E40E48002121 +:108CA00001820F490F4B09880F4A994202D35100A4 +:108CB000C28107E00D4B994202D3C281828102E05A +:108CC0000B49C18181810021C94341811F218170EC +:108CD00041707047ECBB020054060004EFDFFF7FD9 +:108CE00026F400C0581B0000880E0000B80B0000DE +:108CF0004407000010B50C00F2F794FE2000FFF7C7 +:108D0000DDFD10BD70B505000C00080000F355FA3C +:108D1000A07D06F0D2FE06002068C06D8079C007F5 +:108D200003D121002800FCF757F9300070BD020084 +:108D3000FF3230B54132D36AFF240020E4051A0027 +:108D4000A2430CD0541E224209D100220A700120F5 +:108D50001E2205002C0094401C4201D00A7030BD38 +:108D6000521E1206120EF5D130BD10B504000FF0E0 +:108D700046E9022801D0002000E0052020700120F3 +:108D800010BDF3B581B005000B2002990127002426 +:108D90008001081800900126A6403000284200D02B +:108DA0002700200005F334FC410800984069FF309B +:108DB00041308089814200D2B543641C2406240ED0 +:108DC0001E2CE8D9002D04D101250298BD40203089 +:108DD00007762800FEBD010000200C2902D888007B +:108DE000634908587047F8B50600FF304130856A7E +:108DF000707A604F022809D130000CF0BBFC3000C3 +:108E0000EAF7DDFB002818D13D4016E05A482C0057 +:108E1000006804403000EAF7D2FB00280980852171 :108E2000010000007886010000040000099A534008 -:108E3000F8B50F00002801D00120F8BD1000FFF7A1 -:108E4000A7FF002425000090042C1CD00D2C1AD064 -:108E500001200099A040084215D03B49A0000968B4 -:108E60000822095824206843C61930000C3000F34A -:108E700047F9FF2053303072000A70722020B07220 -:108E800000206D1CF072641C2406240E162CDBD905 -:108E9000391D032004F310EBFF2052303870000A14 -:108EA000787024206843001DB870000AF870002014 -:108EB000F8BDFF22BA320270120A4270022282709A -:108EC0000022C2700B2292018918896BFF31213177 -:108ED00089880171090A4171002070470B00010067 -:108EE0001F222131180010B504F394E9AFE41748AC -:108EF0001749002281610270C161704710B5FFF708 -:108F0000F6FF12490120488200F089FA9FE40F48D9 -:108F1000002101820F49104B0988104A994202D35F -:108F20005100C28107E00E4B994202D3C281828177 -:108F300002E00C49C18181810021C94341811F2187 -:108F40008170417070470000ECBB020024020004F5 -:108F5000EFDFFF7FCEF100C0581B0000880E00003D -:108F6000B80B00004407000010B50C00F2F7A8FE93 -:108F70002000FFF7DCFD10BD70B505000C000800F7 -:108F800000F325F9A07D06F042FF06002068C06DC1 -:108F90008079C00703D121002800FCF7D8F9300000 -:108FA00070BD0200FF3230B581325369FF240020CA -:108FB000E4051A00A2430CD0541E224209D100221B -:108FC0000A7001201E2205002C0094401C4201D092 -:108FD0000A7030BD521E1206120EF5D130BD10B50A -:108FE00004000EF0D8EF022801D0002000E0052098 -:108FF0002070012010BDF3B581B005000B2002994F -:10900000012700248001081800900126A6403000A6 -:10901000284200D02700200005F304FB41080098F7 -:10902000806BFF3021308088814200D2B543641CC0 -:109030002406240E1E2CE8D9002D04D10125029807 -:10904000BD40203007762800FEBD010000200C291D -:1090500002D88800634908587047F8B50600FF3009 -:1090600081300569707A604F022809D130000CF018 -:1090700093FB3000EAF7A9F9002818D13D4016E02B -:109080005A482C00006804403000EAF79EF9002896 -:1090900000D13C40564804F300EA002801D055486E -:1090A000044055480078FFF7D0FF2040050031000C -:1090B0002800FFF7A0FFF8BD70B50500FF350400DC -:1090C00001268535FFF7C9FF0100607A022801D12A -:1090D000296113E0494801602000383000292961E6 -:1090E00003D1FFF77CFF002070BD01002000FFF7D7 -:1090F00058FF002802D1FE2020342076300070BDB9 -:109100000200FF3281321161D6E70161416170478F -:1091100034492039085C70470200FF32813210B5B3 -:1091200014000923D26A9B01002901D1801808E0AC -:109130005118227E8A4200DA1100002900DA00214B -:109140004018C018007910BD10B5FFF786FF002841 -:1091500001D1012010BD002010BD020010B5407AE1 -:10916000022813D02648008800280FD01D48383028 -:10917000405CFE280DD10B0004F368EA0E080808D5 -:109180000808080C0C0C08080808080C1000FBF76D -:10919000E0F910BD002010BD002A10B502D0FBF789 -:1091A000D8F910BDFFF7D9FF10BD01230E2810B567 -:1091B00011D3152803D800240E380C7009E00124BF -:1091C000162802D120200C7003E01E2803D817387F -:1091D0000C70107000E00023180010BD10B5EAF705 -:1091E000CAF810BD1C7B0200FFFF3F803C02000458 -:1091F000545C00041F20008024020004400200048C -:1092000036020004042803D2AC49087000207047DD -:1092100001207047AA490E28096801D2A94A105CAA -:109220008000085870472D22125C002AEEF5218537 +:108E300000D13C40564804F330EB002801D055489F +:108E4000044055480078FFF7D0FF2040050031006E +:108E50002800FFF7A0FFF8BD70B50500FF3504003E +:108E600001265D35FFF7C9FF0100607A022801D1B4 +:108E7000296113E049480160200038300029296148 +:108E800003D1FFF77CFF002070BD01002000FFF739 +:108E900058FF002802D1FE2020342076300070BD1B +:108EA0000200FF3241329162D6E7016141617047B1 +:108EB00034492039085C70470200FF328132526821 +:108EC000002901D180180AE05118FF227132125C8A +:108ED0008A4200DA1100002900DA00214018FF3030 +:108EE000FF30801C007F704710B5FFF786FF002819 +:108EF00001D1012010BD002010BD020010B5407A44 +:108F0000022813D02648008800280FD01D4838308A +:108F1000405CFE280DD10B0004F398EB0E08080806 +:108F20000808080C0C0C08080808080C1000FBF7CF +:108F300056F910BD002010BD002A10B502D0FBF775 +:108F40004EF910BDFFF7D9FF10BD01230E2810B553 +:108F500011D3152803D800240E380C7009E0012421 +:108F6000162802D120200C7003E01E2803D81738E1 +:108F70000C70107000E00023180010BD10B5EAF767 +:108F8000FEFA10BDBC7B0200FFFF3F806C060004B0 +:108F9000585C00041F200080540600047006000482 +:108FA00066060004042803D2AC490870002070470C +:108FB00001207047AA490E28096801D2A94A105C0D +:108FC0008000085870472D22125C002A06D0027DCE +:108FD000C030105C884201D10120704700207047EA +:108FE000F7B582B00700160009F0CEF90190BC2059 +:108FF00080590399856844683800FF305D30FFF779 +:10900000E2FF00900398FFF7D5FF010000680027FA +:109010000201120F0F2A17D0009A002A09D002224B +:1090200010430F22120690430122120680180127D6 +:1090300020600820C01B0206B8003369120E001918 +:10904000FFF257FE38180EE020600099002902D088 +:109050000221084320600120810009190A00803A9A +:10906000D26F401C0A600828F6DB039800278100B5 +:109070007D48415808680201120F0F2A25D0009A36 +:10908000002A09D0022210430F2212069043012227 +:1090900012068018012728600320C01B0206B800B2 +:1090A0003369120E4019FFF224FEC03631783818A9 +:1090B0008A006D4980008958421909681160295851 +:1090C0000F2212061143295007E02860009800285B +:1090D00003D02068022108432060644948690122C6 +:1090E00010434861019809F053F905B0F0BD70B51F +:1090F00005005A4E14007078824201D1002915D023 +:109100005948210014387470FFF2A7FE327858488D +:109110002100FFF27EFE2800FF305D30040000F3E6 +:10912000FEF9010022002800FFF75AFF70BD70B55C +:1091300005004A4E1400B078824201D1002917D0B0 +:1091400049492200BC3908004430B470FFF298FE4F +:10915000327847482100FFF2AAFE2800FF305D3038 +:10916000040000F3DCF9010022002800FFF738FFBB +:1091700070BD10B50400EAF7D7F902000121200004 +:10918000FFF7D5FF3B48012100798006C20F200080 +:10919000FFF7ADFF10BD364A334B10B5FFF2B0FEFE +:1091A00010BD427A002A00D1FEE7FF30FF30801C5C +:1091B0008069002901D040687047806870472A495B +:1091C000294A0020032330B514391C1AA400850055 +:1091D0006418401C03285451F7D911612249052015 +:1091E0000C2338391C1AA40085006418401C0C2874 +:1091F0005451F7D91C4B51630E201621783B0C1AA1 +:10920000A4008500E418401C15285451F7D9164BCA +:1092100017201F21BC3B0C1AA4008500E418401C39 +:109220001E285451F7D910480F24983843BF905442 :1092300001000000748A010000040000FDF526F41E -:1092400006D0027DC030105C884201D101207047F9 -:1092500000207047F7B582B00700160009F0C2F988 -:109260000190BC2080590399856844683800FF301C -:109270008530FFF7E2FF00900398FFF7D5FF01006C -:10928000006800270201120F0F2A17D0009A002A47 -:1092900009D0022210430F22120690430122120627 -:1092A0008018012720600820C01B0206B80033691F -:1092B000120E0019FFF227FD38180EE02060009909 -:1092C000002902D0022108432060012081000919F1 -:1092D0000A00803AD26F401C0A600828F6DB039827 -:1092E000002781007D48415808680201120F0F2AAB -:1092F00025D0009A002A09D0022210430F2212061C -:109300009043012212068018012728600320C01B09 -:109310000206B8003369120E4019FFF2F4FCC036A1 -:10932000317838188A006D498000895842190968D7 -:10933000116029580F2212061143295007E02860B6 -:109340000098002803D02068022108432060644967 -:109350004869012210434861019809F047F905B0B6 -:10936000F0BD70B505005A4E14007078824201D1EC -:10937000002915D05948210014387470FFF277FD88 -:10938000327858482100FFF24EFD2800FF3085302A -:10939000040000F3CEF8010022002800FFF75AFF76 -:1093A00070BD70B505004A4E1400B078824201D1FC -:1093B000002917D049492200BC3908004430B47054 -:1093C000FFF268FD327847482100FFF27AFD28005D -:1093D000FF308530040000F3ACF8010022002800C3 -:1093E000FFF738FF70BD10B50400E9F7A3FF0200D6 -:1093F00001212000FFF7D5FF3B48012100798006BD -:10940000C20F2000FFF7ADFF10BD364A334B10B539 -:10941000FFF280FD10BD427A002A00D1FEE709224A -:10942000920180180068002901D040687047806868 -:1094300070472A49294A0020032330B514391C1AE1 -:10944000A40085006418401C03285451F7D9116109 -:10945000224905200C2338391C1AA4008500641801 -:10946000401C0C285451F7D91C4B51630E20162177 -:10947000783B0C1AA4008500E418401C15285451B0 -:10948000F7D9164B17201F21BC3B0C1AA4008500EE -:10949000E418401C1E285451F7D910480F2498385E -:1094A00090650020240601256D0681005158401C5E -:1094B0000B680006A3435B19000E1E280B60F4D94D -:1094C00030BD0A49074810B503F34AEF10BD00004C -:1094D00064020004ECBB0200627B0200801C01C03D -:1094E00080A100809C0E02C0365C00045C04000079 -:1094F00010B5FA4C606A6030817A0020F5F7C7FE3B -:10950000606A6030817A0120F5F7C1FEF4490220DB -:10951000487010BD10B50024FBF778FFEF4907280D -:1095200007D1486A6030C07A00281BD001281AD1C0 -:109530001EE0032805D1486A6030C07A002812D1A5 -:1095400010E0052805D1486A6030C07A00280AD1A9 -:109550000EE0062807D1486A6030C07A012807D09B -:10956000022800D10124486A6030C472847210BDA0 -:109570000224F8E7DA49243108008A880838828012 -:109580008A7982710A680260C979C171B0E710B541 -:10959000FFF7C0FFFFF7ACFF10BDD14A243291792D -:1095A000100013000068083B642902D1002822D172 -:1095B00008E0642806D31868642803D39879491D05 -:1095C000814217D3C64B0421515E1C330420185E20 -:1095D000002901DC002802DDC01C81420ADCC048F1 -:1095E000D1791C30C079002901D1002803D0491D50 -:1095F000814200D2BEE7CAE7B94880787047F1B52A -:109600000A252C00B548406A6030407B002859D0BC -:109610000BF02DFC7D27B24EFF0000280BD0B14887 -:109620000468B069844204D9201A390004F34CEB71 -:109630000500B4612C00F2F7A5FC00283EE45C8133 +:1092400090650020240601256D0681005158401CC0 +:109250000B680006A3435B19000E1E280B60F4D9AF +:1092600030BD0A49074810B504F37AE810BD000084 +:1092700094060004ECBB0200027C0200302001C016 +:1092800080A10080D00B02C03A5C00045C040000A6 +:1092900010B5FA4C606A6030817A0020F5F77FFEE5 +:1092A000606A6030817A0120F5F779FEF449022086 +:1092B000487010BD10B50024FBF7F8FEEF490728F1 +:1092C00007D1486A6030C07A00281BD001281AD123 +:1092D0001EE0032805D1486A6030C07A002812D108 +:1092E00010E0052805D1486A6030C07A00280AD10C +:1092F0000EE0062807D1486A6030C07A012807D0FE +:10930000022800D10124486A6030C472847210BD02 +:109310000224F8E7DA49243108008A880838828074 +:109320008A7982710A680260C979C171B0E710B5A3 +:10933000FFF7C0FFFFF7ACFF10BDD14A243291798F +:10934000100013000068083B642902D1002822D1D4 +:1093500008E0642806D31868642803D39879491D67 +:10936000814217D3C64B0421515E1C330420185E82 +:10937000002901DC002802DDC01C81420ADCC04853 +:10938000D1791C30C079002901D1002803D0491DB2 +:10939000814200D2BEE7CAE7B94880787047F1B58C +:1093A0000A252C00B548406A6030407B002859D01F +:1093B0000BF029FD7D27B24EFF0000280BD0B148ED +:1093C0000468B069844204D9201A390004F37CECA3 +:1093D0000500B4612C00F2F78DFC002811D0F2F7E3 +:1093E00089FC009A0A214032D27F152A00D8510800 +:1093F0008A08824200D864004908814212D8640079 +:1094000010E00098F2F720FC00280BD00098F2F74B +:10941000A2FB0A2800DC6400052800DC6400282880 +:1094200000DB64103078002809D197493069884200 +:1094300002D2001930610FE00120B0700CE0022868 +:1094400003D0042801D0062804D17168B94201D89C +:1094500049197160002805D18C49B068884201D84B +:109460004019B060F8BD8649894808610020854AE6 +:109470004860886012688A610A0024326423908000 +:1094800093711060D071083A908093711060D07120 +:1094900088700870704710B5FFF7E5FFFBF706FE10 +:1094A0000400FBF703FE401E044214D0FBF7F4FD5A +:1094B0000400FBF7F1FD401E04420CD06F48406AE7 +:1094C0006030417B002906D0007B002803D0FBF7E9 +:1094D00077FEFBF75BFEFFF7DBFE10BD68494878BF +:1094E000002803D0401E48700020704701207047BC +:1094F00070B55F24624D245C2435EA790A23152C6B +:1095000000D863089A4204D35D4B1C33DB799A423E +:1095100018D85B4A9378002B04D052687D23DB0077 +:109520009A4211D300290DD12968642902D3A9795F +:10953000142907D20021F2F7F3F9002804D0A888F3 +:10954000002801D0002070BD012070BDFFB581B0A2 +:109550004A484B4C406A6030407B002874D00198E8 +:10956000F2F772FB2700012624370025002810D0CF +:109570000198F2F7F0FA00040014B880A1780029ED +:1095800003D00A2806DDA57004E00A2802DCA670D4 +:1095900000E0BD800298B87103983860F2F7AAFB2A +:1095A000F871237804F35CE807050C0E2B2D434576 +:1095B000500038492069884246D32561267043E02F +:1095C00002202FE004990198FFF792FF00283BD179 +:1095D000656000F0FEF8002801D1257004E0A56068 +:1095E000FFF768FE032020702548B9791C3081718F +:1095F000B988818039680160F979C17124E004205B +:1096000010E004990198FFF773FF00281CD16560F2 +:109610000198FFF792FEFBF749FD072804D1FFF7F9 +:1096200049FE052020700FE02570A5700CE0062093 +:10963000F8E704990198FFF75BFF00280FEB85EF2F :1096400001000000708E010000040000AE2FF598AC -:1096500011D0F2F7A1FC009A0A214032D27F152ADC -:1096600000D851088A08824200D864004908814223 -:1096700012D8640010E00098F2F734FC00280BD0F8 -:109680000098F2F7B5FB0A2800DC6400052800DC2E -:109690006400282800DB64103078002809D197493D -:1096A0003069884202D2001930610FE00120B070A9 -:1096B0000CE0022803D0042801D0062804D17168E8 -:1096C000B94201D849197160002805D18C49B068A8 -:1096D000884201D84019B060F8BD864989480861C0 -:1096E0000020854A4860886012688A610A00243236 -:1096F0006423908093711060D071083A90809371C8 -:109700001060D07188700870704710B5FFF7E5FFE2 -:10971000FBF786FE0400FBF783FE401E044214D0D4 -:10972000FBF774FE0400FBF771FE401E04420CD0F0 -:109730006F48406A6030417B002906D0007B0028DA -:1097400003D0FBF7F7FEFBF7DBFEFFF7DBFE10BDF8 -:1097500068494878002803D0401E487000207047B0 -:109760000120704770B55F24624D245C2435EA798E -:109770000A23152C00D863089A4204D35D4B1C338E -:10978000DB799A4218D85B4A9378002B04D0526850 -:109790007D23DB009A4211D300290DD12968642969 -:1097A00002D3A979142907D20021F2F707FA002879 -:1097B00004D0A888002801D0002070BD012070BD11 -:1097C000FFB581B04A484B4C406A6030407B00286E -:1097D00074D00198F2F786FB270001262437002574 -:1097E000002810D00198F2F703FB00040014B880A1 -:1097F000A178002903D00A2806DDA57004E00A2814 -:1098000002DCA67000E0BD800298B8710398386051 -:10981000F2F7C2FBF871237803F32CEF07050C0E67 -:109820002B2D4345500038492069884246D3256195 -:10983000267043E002202FE004990198FFF792FF81 -:1098400000283BD1656000F0FFF8002801D12570A9 -:1098500004E0A560FFF768FE032020702548B97971 -:109860001C308171B988818039680160F979C171D2 -:1098700024E0042010E004990198FFF773FF00280A -:109880001CD165600198FFF792FEFBF7C9FD072820 -:1098900004D1FFF749FE052020700FE02570A57068 -:1098A0000CE00620F8E704990198FFF75BFF002819 -:1098B00004D165600198FFF77AFEEFE7207805B0E4 -:1098C000F0BD70B50500F2F77DFA2C00C034A0831E -:1098D0002800F2F76FFAE083FFF714FE2000C4308F -:1098E000FFF231FE052811D92800FEF790FF10E0A5 -:1098F000E4580004182001C000A60080E02E0000FB -:10990000204E0000B80B0000701700002800FEF782 -:10991000C3FF2800F2F7AEFA00221100280013005E -:10992000FFF74EFF5A49087070BDFEB505000700ED -:10993000574E2C00FF34B078FF3785348537A0347C -:10994000002805D1207D00281FD1E868C0044BD530 -:109950000022110028001300FFF732FF01283070A9 -:109960000AD10020009038006946FFF225FD06204C -:1099700020752800FFF7A5FFB078002831D0307897 -:10998000032824D005282CD121E0062829D138002D -:109990003C300700002301AA694608F039FA022882 -:1099A00004D170687D21C90088421AD3380008F0BC -:1099B00098F90099020009066B461B79090E2800E8 -:1099C000FFF7FEFE0328307001D0052803D12800E0 -:1099D000FFF777FF05E0002803D100212800FEF7FC -:1099E00081FF207D002801D10020FEBD0220FEBDA8 -:1099F00070B50028264C10D0FBF712FD0500FBF7D0 -:109A00000FFD401E05420BD0FBF700FD0500FBF7E4 -:109A1000FDFC401E054203D00120E060012070BD26 -:109A2000002070BD10B51A4CE06800280BD06069AA -:109A3000002808D1FFF751FE16480121406A603026 -:109A400001734173616110BD1149134A04693A19E8 +:1096500004D165600198FFF77AFEEFE7207805B046 +:10966000F0BD70B50500F2F76AFA2C00A034208234 +:109670002800F2F75CFA6082FFF714FE2000BC308D +:10968000FFF261FF052811D92800FEF793FF10E0D3 +:10969000F0580004F82301C000A60080E02E00006E +:1096A000204E0000B80B0000701700002800FEF7E5 +:1096B000C7FF2800F2F79AFA0022110028001300D1 +:1096C000FFF74EFF5A49087070BDFEB50500070050 +:1096D000574E2C00B078FF37FF345D37FD3400283B +:1096E00005D1207D00281FD1E868C0044BD5002299 +:1096F000110028001300FFF733FF012830700AD152 +:109700000020009038006946FFF256FE06202075C2 +:109710002800FFF7A6FFB078002831D03078032862 +:1097200024D005282CD121E0062829D138003C304E +:109730000700002301AA694608F021FA022804D193 +:1097400070687D21C90088421AD3380008F080F97A +:109750000099020009066B461B79090E2800FFF7E5 +:10976000FFFE0328307001D0052803D12800FFF741 +:1097700078FF05E0002803D100212800FEF784FFD0 +:10978000207D002801D10020FEBD0220FEBD70B565 +:109790000028274C10D0FBF793FC0500FBF790FC4A +:1097A000401E05420BD0FBF781FC0500FBF77EFC59 +:1097B000401E054203D00120E060012070BD002062 +:1097C00070BD10B51A4CE06800280BD06069002805 +:1097D00008D1FFF752FE17480121406A603001733B +:1097E0004173616110BD1249134A886890421AD2D0 +:1097F0000A001C320420105E002814D08978002949 +:1098000011D1110008310423CB5E181A431C0ADB66 +:109810000868642809D38B7991791420142900D31E +:109820000800834201D301207047002070470000E8 +:10983000F82301C0F0580004204E0000F8B5F8F2FB +:10984000C9FDFF4DE960A860E81DF930016B040017 +:10985000491C40340163207C0090002805D0286812 +:1098600000262E60F2F2E1FD2674A07CF54E002861 +:1098700023D0F2F2F9F9326E736E871A9941B26D04 +:10988000A868F36DE968851A994100230E00E81A6B +:10989000994103DA68429241911B00E028000100DF +:1098A0003A000C2001F072F93800E64A0027330034 +:1098B000281ABB41D3669066A7740098F8BDE048AB +:1098C00010B50168002916D0DE4C00210160E06A65 +:1098D0000521401CE062606B401C606304F3FEE9FC +:1098E000002902D1A06B401CA06300200BF0B0FF48 +:1098F000616BF1F73FFC10BDF0B585B0F1F7F2FCFC +:10990000052842D1F2F2B0F9CE4CE164A064F8F23D +:1099100061FDCB4F6164206438680026002802D0C6 +:109920003E60F2F282FDC848C8490088C54C8842B2 +:109930002BD0606B052104F3D2E90D00F8F24AFD4B +:1099400003910290BA68FB68801A99410CD3BA68F7 +:109950000298FB680399801ABD4A99413300121A94 +:109960008B4101D3042D01D1206A04E0B6487D2348 +:109970000088DB005843E902081800220092020028 +:10998000B448AF4B0021F2F2EDFC05B0F0BD10B5CC +:109990000024002808D001280AD0022816D0032865 +:1099A00016D100F074FA13E0FFF748FF04000FE04F +:1099B000F1F798FC05280BD1A24801214030017431 +:1099C000F2F252F99F4AD164906401E0FFF794FFEC +:1099D000200010BD9B49C27820318A718078C871FF +:1099E000704798480021416370479649203188802C +:1099F0008102944801627047FFB585B01C000026C3 +:109A000017000D00082202A8019603F318EC687AEB +:109A1000297A00020843FFF7E8FF35003300894E3A +:109A2000F16EB06E5940084304D00598F2F77FFA02 +:109A3000B566F5668348203004904089B84211D05D +:109A40000498478120370499F804000CE0765D59AA :109A5000010000006C9201000004000011EAD02B0C -:109A6000886890421AD20A001C320420105E002836 -:109A700014D08978002911D1110008310423CB5E5C -:109A8000181A431C0ADB0868642809D38B7991797A -:109A90001420142900D30800834201D30120704709 -:109AA00000207047182001C0E4580004204E000038 -:109AB000F8B5F8F299FCFF4DE960A860E81DF930AF -:109AC000016B0400491C40340163207C0090002895 -:109AD00005D0286800262E60F2F2B1FC2674A07C26 -:109AE000F54E002823D0F2F2C9F8326E736E871A51 -:109AF0009941B26DA868F36DE968851A9941002310 -:109B00000E00E81A994103DA68429241911B00E085 -:109B1000280001003A000C2001F0BEF93800E64AA6 -:109B200000273300281ABB41D3669066A7740098BB -:109B3000F8BDE04810B50168002916D0DE4C0021C0 -:109B40000160E06A0521401CE062606B401C6063BC -:109B500004F3CEE8002902D1A06B401CA0630020D2 -:109B60000BF088FE616BF1F759FC10BDF0B585B0C4 -:109B7000F1F70CFD052842D1F2F280F8CE4CE164F9 -:109B8000A064F8F231FCCB4F616420643868002691 -:109B9000002802D03E60F2F252FCC848C849008852 -:109BA000C54C88422BD0606B052104F3A2E80D0060 -:109BB000F8F21AFC03910290BA68FB68801A994186 -:109BC0000CD3BA680298FB680399801ABD4A994180 -:109BD0003300121A8B4101D3042D01D1206A04E015 -:109BE000B6487D230088DB005843E90208180022AC -:109BF00000920200B448AF4B0021F2F2BDFB05B069 -:109C0000F0BD10B50024002808D001280AD0022891 -:109C100016D0032816D100F074FA13E0FFF748FFBE -:109C200004000FE0F1F7B2FC05280BD1A248012196 -:109C300040300174F2F222F89F4AD164906401E04E -:109C4000FFF794FF200010BD9B49C27820318A7134 -:109C50008078C871704798480021416370479649E1 -:109C6000203188808102944801627047FFB585B039 -:109C70001C00002617000D00082202A8019603F31D -:109C8000E8EA687A297A00020843FFF7E8FF35001E -:109C90003300894EF16EB06E5940084304D00598E8 -:109CA000F2F7AEFAB566F566834820300490408935 -:109CB000B84211D00498478120370499F804000C69 -:109CC00008810E99002901D1C03003E0062104F378 -:109CD00010E8143004990881002C05D00498E1782C -:109CE00081710498A178C171734C0399226A02981A -:109CF000002303F38CE8207C41006E4808180282A0 -:109D0000207C401C0006000E8028207401D9002011 -:109D10002074207C400663D1664B1033032100225F -:109D2000100055005E5B02E040001D523800884282 -:109D300004DB471A7D005D5BB542F5DC4000521C38 -:109D4000802A1E52ECDB481003D049100029E6DCC3 -:109D500003E0012901D00121E1E7564B188A608216 -:109D60000020A082E0824100CD182A8A618A8A42BE -:109D700000D30A006282298AA28A914200D8110087 -:109D8000401C0006000E8028A182ECD34948803098 -:109D9000018A2183E28962832088A083638A9B0AE7 -:109DA0009B026382E38B002B0DD1049B1B89C0189F -:109DB000FF30F5300004000CFF23F5339842E083B8 -:109DC00000D30300E3830D2001F066F8A18B019A14 -:109DD0000E2001F061F8E28B618A0F2001F05CF83F -:109DE000A26BE16B092001F057F8F8F2FDFA0500CB -:109DF000206A029A039B0E004008002180185941F6 -:109E0000401BB14107D22C484030417C491C417471 -:109E1000012009B0F0BDFFF71EFF0020F9E726483A -:109E2000006A7047F8B504000026234D21482A6ACD -:109E3000C168009180683300070002F3E8EF0099E1 -:109E4000B81A994161602060286A2268636831000D -:109E50008018594161602060F8F2C6FA787B8671FB +:109A600008810E99002901D1C03003E0062104F3DA +:109A700040E9143004990881002C05D00498E1785D +:109A800081710498A178C171734C0399226A02987C +:109A9000002303F3BCE9207C41006E4808180282D1 +:109AA000207C401C0006000E8028207401D9002074 +:109AB0002074207C400663D1664B103303210022C2 +:109AC000100055005E5B02E040001D5238008842E5 +:109AD00004DB471A7D005D5BB542F5DC4000521C9B +:109AE000802A1E52ECDB481003D049100029E6DC26 +:109AF00003E0012901D00121E1E7564B188A608279 +:109B00000020A082E0824100CD182A8A618A8A4220 +:109B100000D30A006282298AA28A914200D81100E9 +:109B2000401C0006000E8028A182ECD349488030FA +:109B3000018A2183E28962832088A083638A9B0A49 +:109B40009B026382E38B002B0DD1049B1B89C01801 +:109B5000FF30F5300004000CFF23F5339842E0831A +:109B600000D30300E3830D2001F01AF8A18B019AC2 +:109B70000E2001F015F8E28B618A0F2001F010F839 +:109B8000A26BE16B092001F00BF8F8F22DFC050047 +:109B9000206A029A039B0E00400800218018594158 +:109BA000401BB14107D22C484030417C491C4174D4 +:109BB000012009B0F0BDFFF71EFF0020F9E726489D +:109BC000006A7047F8B504000026234D21482A6A30 +:109BD000C168009180683300070003F318E9009919 +:109BE000B81A994161602060286A22686368310070 +:109BF0008018594161602060F8F2F6FB22686368C2 +:109C0000121A8B41F0D3F8BDFEB50500124E124F6B +:109C10002036F8F2E9FB00900E480C000B00C168FA +:109C2000009A8068121A8B410BD30A4A386AD368AB +:109C3000926880018018009A00215941801AA14140 +:109C400006D2F8F2D1FB034AD16090600120F07196 +:109C500000240BE0D8870200D888020000F400C07E +:109C6000FFFF000090051000DF900100A3483A6A52 +:109C7000C168029180682300019003F3C8E801984D +:109C80000299821A9941788A0B0021008018594163 +:109C900069602860F179B079814201D90021F171C0 +:109CA000F479002C04D1002801D0040000E0012444 +:109CB000386A2A6860436B680021801859416960DE +:109CC0002860B479002C00D10124F8F28DFB2A68B9 +:109CD0006B68121A8B41EBD3FEBDF3B585B005005E +:109CE00000200190F8F280FB02008548854C008A34 +:109CF0000B00322802D2216A484300E0800280181B +:109D00000021594102908048039100687F498842B0 +:109D100003D106980068400816E0052806DC2A688A +:109D200002986B680399121A8B4116D32800FFF72B +:109D300049FF608A2A686B68002180185941696070 +:109D400028600699206A0860002634000090B4421A +:109D500005DD6F480178491C017007B0F0BD6B68E4 +:109D60002A6802980399841A1F009941002C0492D2 +:109D700000DA644200988442EFD90698049A006899 +:109D80000021801879416960286001982600002828 +:109D9000DDD0E2E7F8B504000F005A48594E2030F4 +:109DA0008079316A484300902000FFF72DFF564824 +:109DB00000250068811E032909D80099401E4843E8 +:109DC00022686368290080185941616020604C480E +:109DD000008A002803D020006946FFF77EFF706BE1 +:109DE00000280CD0F16B491CF163052103F380EFCF +:109DF000226863688802101AAB41636020604048A3 +:109E000080380068FF305A30388007E000982268B8 +:109E1000636829008018594161602060F8F2E4FA13 +:109E200022686368161A8B411900301EA941EDDBC8 +:109E3000F8BD70B506003349314A2031158A8C7956 +:109E40000020002D0AD0322D02D22806000E05E097 +:109E50008988280003F34CEF0006000EB8046C1E3E :109E60000100000068960100000400004230034732 -:109E700022686368121A8B41F0D3F8BDFEB5050065 -:109E8000124E124F2036F8F2B9FA00900E480C002C -:109E90000B00C168009A8068121A8B410BD30A4AE2 -:109EA000386AD368926880018018009A002159416D -:109EB000801AA14106D2F8F2A1FA034AD16090605B -:109EC0000120F07100240BE08088020080890200EC -:109ED000A8F100C0FFFF0000900510003F930100B3 -:109EE000A3483A6AC168029180682300019002F396 -:109EF00098EF01980299821A9941788A0B00210003 -:109F00008018594169602860F179B079814201D99E -:109F10000021F171F479002C04D1002801D0040053 -:109F200000E00124386A2A6860436B6800218018C9 -:109F3000594169602860B479002C00D10124F8F2FD -:109F40005DFA2A686B68121A8B41EBD3FEBDF3B53C -:109F500085B0050000200190F8F250FA0200854813 -:109F6000854C008A0B00322802D2216A484300E067 -:109F700080028018002159410290804803910068B6 -:109F80007F49884203D106980068400816E00528FA -:109F900006DC2A6802986B680399121A8B4116D363 -:109FA0002800FFF749FF608A2A686B680021801843 -:109FB0005941696028600699206A086000263400CB -:109FC0000090B44205DD6F480178491C017007B06C -:109FD000F0BD6B682A6802980399841A1F009941A2 -:109FE000002C049200DA644200988442EFD906986B -:109FF000049A0068002180187941696028600198FE -:10A0000026000028DDD0E2E7F8B504000F005A482A -:10A01000594E20308079316A484300902000FFF784 -:10A020002DFF564800250068811E032909D8009994 -:10A03000401E4843226863682900801859416160C6 -:10A0400020604C48008A002803D020006946FFF7B2 -:10A050007EFF706B00280CD0F16B491CF163052169 -:10A0600003F350EE226863688802101AAB41636004 -:10A070002060404880380068FF305A30388007E060 -:10A080000098226863682900801859416160206047 -:10A09000F8F2B4F922686368161A8B411900301E71 -:10A0A000A941EDDBF8BD70B506003349314A2031D6 -:10A0B000158A8C790020002D0AD0322D02D2280674 -:10A0C000000E05E08988280003F31CEE0006000E50 -:10A0D0002A4909688A1E032A03D84C432406240E01 -:10A0E00006E0274A914202D0521C914200D104005E -:10A0F000002D02D0A04200D204003078A04201D34B -:10A10000001B00E00120307070BD1B48C06A704722 -:10A110001948006B704770B508F082FA0600FF21FD -:10A120001348713103F33AE913480125403085742F -:10A13000F8F264F9104CE165A065F1F2A9FD6166E1 -:10A1400020666421200020308A02818021000A627A -:10A1500085710748E26DA16DC2608160300008F032 -:10A1600063FAA26DE16D0B2000F0A0FE70BD00004F -:10A1700080880200403901C08089020094F100C04B -:10A18000FDFF00009C7C02007CB5140005000E0061 -:10A1900000230DF068EF6B46062231006846DC8034 -:10A1A00003F360E8082228006946ECF766FD7CBDF1 -:10A1B0007CB51C00050000230DF054EF00210A00BF -:10A1C000684606C06B46072228006946DC80ECF72B -:10A1D00054FD7CBD10B504000321323003F308E9BF -:10A1E00020001C21353003F304E92034A07D012137 -:10A1F0000843A07510BD70B50400FFF7EBFF200009 -:10A20000FF30FF220421953007F05AEF2000FF2194 -:10A2100054304131050003F3C2E8FF3441340121D9 -:10A2200000206161A0612074280000F365FD70BD0D -:10A230000B21890170B54418616B002926D1007A81 -:10A24000002803D0032801D004281FD108F0E8F922 -:10A25000050090480021FF2299324A438258002A83 -:10A260000AD1FF239933594301220E189BD4B90D0B +:109E70002A4909688A1E032A03D84C432406240E63 +:109E800006E0274A914202D0521C914200D10400C0 +:109E9000002D02D0A04200D204003078A04201D3AD +:109EA000001B00E00120307070BD1B48C06A704785 +:109EB0001948006B704770B508F08EFA0600FF2154 +:109EC0001348713103F36AEA134801254030857461 +:109ED000F8F294FA104CE165A065F1F2D9FE6166E2 +:109EE00020666421200020308A02818021000A62DD +:109EF00085710748E26DA16DC2608160300008F095 +:109F00006FFAA26DE16D0B2000F054FE70BD0000F1 +:109F1000D8870200283901C0D8880200ECF300C0BD +:109F2000FDFF0000FC7C02007CB5140005000E0063 +:109F300000230EF0D6E86B46062231006846DC802E +:109F400003F390E9082228006946ECF759FD7CBD2F +:109F50007CB51C00050000230EF0C2E800210A00B9 +:109F6000684606C06B46072228006946DC80ECF78D +:109F700047FD7CBD0A000B218901411810B5096914 +:109F80002631FFF7D1FF10BDF8B50D000400170012 +:109F90001E00402103F32CEA002F01D0022000E034 +:109FA0000120F18CA17204210843010A2300183317 +:109FB0002073102D617308D10220E072280AA57564 +:109FC0002A003100E075180017E0202D18D101207B +:109FD000E072280AA575E07510223100180003F31D +:109FE00042E93100200008221831283003F33AE911 +:109FF0003100200008221031303003F334E9F8BD7D +:10A000000D2D01D0052DFAD100212A0AE172A57388 +:10A01000002FE27305D0A172082108432073000AC3 +:10A0200060732A00310020001030E6E710B590B0D0 +:10A030000400139B129900226846FFF7A5FF200039 +:10A040006946F6F711FF10B010BDFEB50C3A0D00D1 +:10A0500014060600240E1021102C00D82100300018 +:10A060000A00FF30290019300831070003F3FAE82D +:10A07000FF3601970094761C2B787069AA1C092181 +:10A08000FFF7D4FFFEBD10B5040008004979C906EA +:10A0900010D5010060318A784B78110219430922EA +:10A0A000633000F341FB002804D04278811D20007A +:10A0B000FFF7CBFF012010BD0B218901401810B51F +:10A0C0000069543000F3BAFE10BD0B2292018018D3 +:10A0D00010B50069353000F3B1F910BD30B504009A +:10A0E00091B0150001A8FFF74FFF200001A9F6F776 +:10A0F000BBFE0520C0012018002D0AD0002C06D080 +:10A100000068002803D08030C188491CC18011B08C +:10A1100030BD002CFBD000680028F8D08030418989 +:10A12000491C4181F3E770B505000B2080012C1814 +:10A13000206928220100FF312931D83003F3FCE8DF +:10A1400001212800FFF7C1FF23690100D833012254 +:10A150002800FFF7C3FF70BDF8B50D00040016001E +:10A160001F00402103F344E9002F01D0052000E047 +:10A1700006202073000A607320001830002E07D0DC +:10A180000221E1721021A17500211022E17512E077 +:10A190000121E1722021A1750021E1751022290021 +:10A1A00003F360E810352034207A0822290003F3F5 +:10A1B0005AE8207C0822290003F354E8F8BDF0B5E2 +:10A1C00085B00E000B9915000A9F0C9A0400002917 +:10A1D00002D1002004A904900B20800120180197CF +:10A1E00000930392029100692B000100FF31953129 +:10A1F00035303200FFF284FE05B0F0BDF0B5060048 +:10A200000B208001341820690F0041791500801D52 +:10A2100091B007F0DBFC002810D001002B003A00C1 +:10A2200001A8FFF799FF300001A9F6F71DFE3000E5 +:10A23000FFF742FF20690121C030C16011B0F0BDBD +:10A2400070B505000B2080012C1820692030417D5D +:10A25000C90712D0817DC9060FD5007E00220007F4 +:10A26000C10F2800FFF7CAFF206901224D7ED9CF18 :10A2700001000000649A010000040000B65F76F35C -:10A2800042503000FFF7C1FF666302E0491C01291C -:10A29000EBDB280008F0D2F9606B002800D1FEE764 -:10A2A00070BD0B2189014018416B002902D00022AA -:10A2B0000A60426370470A000B218901411810B5FA -:10A2C000496B2631FFF76AFF10BDF8B50D00040099 -:10A2D00016001F00402103F396E8002E01D0022053 -:10A2E00000E00120F98CA17204210843010A230037 -:10A2F00018332073102D617306D10220E072280AF2 -:10A30000A5752A00E07507E0202D0AD10120E07232 -:10A31000280AA5752022E0753900180002F3ACEF79 -:10A32000F8BD0D2D01D0052DFAD100212A0AE172C8 -:10A33000A573002EE27305D0A17208210843207393 -:10A34000000A60732A00390020001030E6E710B5DB -:10A3500090B00400139B129900226846FFF7B5FFE6 -:10A3600020006946F6F767FE10B010BDFEB50C3A46 -:10A370000D0014060600240E1021102C00D8210018 -:10A3800030000A00FF30290019300831070002F3BD -:10A3900074EFFF3601970094761C2B787069AA1C25 -:10A3A0000921FFF7D4FFFEBD10B50400080049796C -:10A3B000C90610D5010060318A784B781102194323 -:10A3C0000922633000F3BAF9002804D04278811DD5 -:10A3D0002000FFF7CBFF012010BD0B229201801857 -:10A3E00010B5406B353000F333F810BD30B50400C4 -:10A3F00091B0150001A8FFF768FF200001A9F6F74A -:10A400001AFE0520C0012018002D0AD0002C06D00D -:10A41000406A002803D08030C188491CC18011B037 -:10A4200030BD002CFBD0406A0028F8D08030418934 -:10A43000491C4181F3E770B505000B2080012C1801 -:10A44000606B28220100FF312931D83002F37EEF02 -:10A4500001212800FFF7C1FF636B0100D8330122FF -:10A460002800FFF7C3FF70BDF0B585B00E000B9953 -:10A4700015000A9F0C9A0400002902D1002004A9AB -:10A4800004900B2080012018019700930392029101 -:10A49000406B2B000100FF31953135303200FFF267 -:10A4A00039FD05B0F0BD0000FC5301C0F7B588B020 -:10A4B000050017000BF08AFA09990B26B6018C19D2 -:10A4C000002801D0A8190FE0A06BFF30213080795F -:10A4D000012813D9E97A0620F2F748F90CE081192E -:10A4E000C96B002904D08019C06BE0630BB0F0BDCC -:10A4F000EA7A0621F3F7F2FA0028F0D1099801214F -:10A5000003F088FF1C2101A802F352EF01A802F317 -:10A510007FFA38786B46002501AE1873A8008019C1 -:10A52000807A4006800F04F3C6F80100099804F011 -:10A53000A2F96D1C2D062D0E042DEFD3E26B0998A8 -:10A54000521C01A904F03EF8002806D0CE49E06B69 -:10A550001A22401801A902F390EE01220998110075 -:10A5600004F070FAC2E7FFB587B004000E001D00CA -:10A57000082921D308F05EF801902900A279203142 -:10A580008A77E279CA77083E3004413126001922E1 -:10A59000069152011739000C0836AC1805910A399A -:10A5A00004916FE0F178001FB27800040F02000CF4 -:10A5B00017438742039001D9002097E771783278DA -:10A5C000080210432E2846D004DC012836D02D285E -:10A5D00052D108E0302845D0FF384B384CD11A21F1 -:10A5E000B1700021F1702D202070F178B27808024E -:10A5F00010436070A4483A007F38311D281802F3D8 -:10A600003CEEE86880218843A1781C228907C90FA5 -:10A61000C901084360210843E8600698210002F35D -:10A620002CEE032000022818C17AFB221140A278E8 -:10A630009207D20F92001143C1721DE00E200E2F1F -:10A6400000D2380002060498120E02760598311DD9 -:10A6500002F312EE10E02E2020770120607730798F -:10A66000A07709E0E86804221043E860317EC90958 -:10A6700002D051030843E8600398F61976B5D26D0D +:10A280002030007E0007C10F2800FFF7C1FF70BD1E +:10A29000F7B588B0050017000BF096FB09990B265F +:10A2A000B6018C19002801D0A8190FE06069FF30B1 +:10A2B0004130807B012813D9E97A0620F2F702F9B0 +:10A2C0000CE081198969002904D080198069A06196 +:10A2D0000BB0F0BDEA7A0621F3F791FA0028F0D12D +:10A2E0000998012103F0FAFE1C2101A803F360E89C +:10A2F00001A802F38DFB38786B46002501AE187378 +:10A30000A8008019807A4006800F04F3D4F9010078 +:10A31000099804F014F96D1C2D062D0E042DEFD3B1 +:10A32000A2690998521C01A903F0B0FF002806D0C9 +:10A33000D149A0691A22401801A902F39EEF012217 +:10A340000998110004F0E2F9C2E7FFB589B01C00DA +:10A3500005000E00082928D308F048F82900083124 +:10A36000029004912100AA7920318A77EA79CA778C +:10A370004131083E089130040321172309022200CD +:10A380005B014A326618000CE51821004031079243 +:10A39000069172E00499001FCA788B7800041702B6 +:10A3A000000C1F438742059002D900200DB0F0BD7C +:10A3B00048780A78000210432E2845D004DC012892 +:10A3C00035D02D2851D108E0302844D0FF384B3803 +:10A3D0004BD11A2088700020C8702D202876C878AC +:10A3E0008A78000210436876A3483A00A738091D0E +:10A3F000201802F342EFE06880218843A97E1C22E6 +:10A400008907C90FC901084360210843E0605F2044 +:10A41000C0002118089802F330EFE878FB210840CB +:10A42000A97E8907C90F89000843E8701DE00E2046 +:10A430000E2F00D2380002060698120E02760798F8 +:10A44000091D02F31AEF10E02E20307501207075FF +:10A450000879B07509E0E06804221043E060097EE5 +:10A46000C90902D051030843E06005980499C01B54 +:10A470000004000CC919091D049104288AD2287E01 +:10A480002D280FD1307D00280CD12E2030750121D0 +:10A49000002071756B460390187B08430E2108431A +:10A4A0000390B0750698017E00291ED0E068002256 +:10A4B000800600D5089A0092002207981300FCF24B +:10A4C000E3FA010020000DF01AEE069903000A7E5F +:10A4D000079920000DF016EE2000FAF7F5FD200098 +:10A4E000FAF7A5FD2000FAF77AFD307D00280BD0A1 +:10A4F00001212000F3F7AAFB5F4821008B382218C6 +:10A500000B98FFF7C5FE03E000212000F3F79EFB48 +:10A51000B08BF083029807F06DFF012046E75021D1 +:10A5200010B502F346EF10BDF7B50C00070000258B +:10A530000126022A06D3921E1004000C0290387ADB +:10A54000002804D0300AA670E0700120FEBD201D56 +:10A550000BF0CCF96178227809021143042200291A +:10A5600039D0012912D0022940D1002803D1110A83 +:10A57000A2700125E170030002993A00201DFFF747 +:10A58000E4FE002830D1300AA6702BE00B218901AF +:10A590007E187169FF314131897B022903D1022084 +:10A5A000A070000A1EE0002801D00320F8E739005F +:10A5B000201DF2F70AFF002801D10520F0E771699C +:10A5C000FF3141318A7B521C8A73C1680122120318 +:10A5D0001143C16008E0002802D0F3F71BF803E044 +:10A5E000100AA2700125E0702800FEBD0620D7E702 +:10A5F000FEB50322120200270899149D1598C90779 +:10A60000AC18002903D16783A08BE083FEBD00282E +:10A6100001D00120E083608B401C0004000C042862 +:10A620006083F3D3E97A0020F1F74CFF0600FF3591 +:10A630004A3564225223694601A8E783EBF7AFFB52 +:10A640000028E3D0009B03201033187000205870BE +:10A65000192018720020587206222900981C02F353 +:10A660000CEE00990A2088720020C872019930000F +:10A67000EBF760FBFEBD0000A1030000E345BFFE59 :10A6800001000000609E010000040000E585A59F18 -:10A69000C01B0004000C361D04288DD220782D2804 -:10A6A0000FD1207F00280CD12E20207701210020FF -:10A6B00061776B460290187A08430E210843029096 -:10A6C000A0770498017E00291ED0E8680022800649 -:10A6D00000D5069A0092002205981300FCF2DEF9DC -:10A6E000010028000DF0D6EC049903000A7E0599BC -:10A6F00028000DF0D4EC2800FAF7A1FE2800FAF7A4 -:10A7000051FE2800FAF726FE207F00280BD00121F9 -:10A710002800F3F707FC6148290063382A180998D4 -:10A72000FFF7CEFE03E000212800F3F7FBFB0D202E -:10A73000800128188188C180019807F089FF0120D5 -:10A74000DEE6502110B502F33EEE10BDF7B50C0069 -:10A75000070000250126022A06D3921E1004000CD1 -:10A760000290387A002804D0300AA670E0700120E8 -:10A77000FEBD201D0BF0C5F8617822780902114357 -:10A780000422002939D0012912D0022940D1002801 -:10A7900003D1110AA2700125E170030002993A0069 -:10A7A000201DFFF7EAFE002830D1300AA6702BE00A -:10A7B0000B2189017E18B16BFF3121318979022982 -:10A7C00003D10220A070000A1EE0002801D003205F -:10A7D000F8E73900201DF2F76FFF002801D10520AE -:10A7E000F0E7B16BFF3121318A79521C8A71C1685F -:10A7F000012212031143C16008E0002802D0F3F7E0 -:10A8000082F803E0100AA2700125E0702800FEBD66 -:10A810000620D7E7FEB50D22920100270899149D66 -:10A820001598C907AC18002903D16780A088E0807B -:10A83000FEBD002801D00120E0806088401C00049B -:10A84000000C04286080F3D3E97A0020F1F798FF28 -:10A850000600FF35723564225223694601A8E7805D -:10A86000EBF7C7F90028E3D0009B032010331870E2 -:10A8700000205870192018720020587206222900F2 -:10A88000981C02F304ED00990A2088720020C87217 -:10A8900001993000EBF778F9FEBD0000A10300003C -:10A8A00010B5F5F77DFC494C02E06070F5F778FCD7 -:10A8B000617822788B1A8342F7DC89188142F4D3BD -:10A8C000607010BDF8B5FFF7EBFF404E3F4D07003D -:10A8D00000241836A0003258002A02D0A968380097 -:10A8E0009047641C2406240E022CF3D3F7F29AFD41 -:10A8F000696128610020A860F8BDE3E738B5F7F288 -:10A9000091FD324C61612061314800F3C9FA606801 -:10A910000A2103F30CEA0204120C00922D4A2C487F -:10A920000121002300F314FB38BD284800214170A9 -:10A9300001218160704770B5002825D0234B02218A -:10A9400000241833A2009A58824207D0002A02D16C -:10A95000022900D12100641C022CF3DB022C0DD152 -:10A96000022911D00C00194D89005850A8780028F0 -:10A9700001D1FFF7C3FFA878401CA870022C03DAAE -:10A98000FFF7D3FFFFF79EFF70BD70B5002815D00D -:10A990000E4CA378002B11D00021220018328D001C -:10A9A000555985420BD1002089005B1E5050180676 -:10A9B000000EA07002D1064800F3E2FA70BD491CF7 -:10A9C0000906090E0229EAD370BD000020F700C075 -:10A9D000945501C0CBA00100F8B50500EA78807855 -:10A9E000891A801A002806DB00220C00814208DD4B -:10A9F000221A040005E000240A00814201DA141A38 -:10AA00000200AE7929793000504302F3A2ED66438B -:10AA100007006979300002F39CEDE979C019081844 -:10AA200001D5002002E03F2800DD3F200006000E97 -:10AA3000F8BD70B500242D4D287029782000F8F756 -:10AA40004FFF641C012CF8DB70BD38B50029274C82 -:10AA500001D0FF212170A168002909D101002348FC -:10AA60000C30FFF7B9FF2178FF2902D1FFF7E1FF92 -:10AA700038BD6A46F8F71EFC21788142F8D0FFF70E -:10AA8000D8FF6B4618880028F2D0F8F7B5B88D4487 +:10A6900010B5F5F78EFC494C02E06070F5F789FCC7 +:10A6A000617822788B1A8342F7DC89188142F4D3CF +:10A6B000607010BDF8B5FFF7EBFF404E3F4D07004F +:10A6C00000241836A0003258002A02D0A9683800A9 +:10A6D0009047641C2406240E022CF3D3F7F2A2FE4A +:10A6E000696128610020A860F8BDE3E738B5F7F29A +:10A6F00099FE324C61612061314800F3D1FB606802 +:10A700000A2103F314EB0204120C00922D4A2C4888 +:10A710000121002300F31CFC38BD284800214170B2 +:10A7200001218160704770B5002825D0234B02219C +:10A7300000241833A2009A58824207D0002A02D17E +:10A74000022900D12100641C022CF3DB022C0DD164 +:10A75000022911D00C00194D89005850A878002802 +:10A7600001D1FFF7C3FFA878401CA870022C03DAC0 +:10A77000FFF7D3FFFFF79EFF70BD70B5002815D01F +:10A780000E4CA378002B11D00021220018328D002E +:10A79000555985420BD1002089005B1E5050180688 +:10A7A000000EA07002D1064800F3EAFB70BD491C00 +:10A7B0000906090E0229EAD370BD000068F900C03D +:10A7C000E05201C0BB9E010070B542888A4202DDA2 +:10A7D0000021415E26E0C2898A4209DA0C2408235E +:10A7E000045FC35E4589E01A891A4843511B16E08D +:10A7F000002293001B185C888C4202DCDB888B42B1 +:10A8000002DA521C032AF4DB940022180423D35EDC +:10A81000D588045F5288181B891A4843A91A02F385 +:10A8200098EE21180804001470BDFFB581B0002017 +:10A83000009002990198F8F717FF07000299019814 +:10A84000F8F705FF4006411602987C181421414391 +:10A85000DF4814230918019858430D18E01BAC7108 +:10A86000E8710B980128687B02D10821084301E0B8 +:10A87000F721084068730C21200002F36AEE0600FD +:10A8800002990198F8F7F4FE00070017287303995E +:10A89000201844180498844201DD049C03E00A98BF +:10A8A000844200DA0A9C0C21200002F352EE0100DF +:10A8B000864220D0B14204DD0C207043201A0B38B0 +:10A8C00002E00C207043201AC14A0C3A925D121823 +:10A8D000921C042A0FD80722D24390420BDB072890 +:10A8E00009DCB14202DA0C21714302E00C21714310 +:10A8F0000B31060001E021000026C81B3F28A97388 +:10A9000001DD3F2004E03F21C943884200DA08000E +:10A910000206E87302990198120EF8F7D0FC360788 +:10A92000360F029901983200F8F79EFC2E740B98AE +:10A9300000280BD001990298F8F748FC001BC11CB5 +:10A94000072902D301210091AC74E874009805B086 +:10A95000F0BDF0B58DB09F484278521C427082889D +:10A96000002A02D00278002A01D000297CD099491F +:10A970008878401C887007F043FD04900020059003 +:10A98000F8F795FD0400F8F798FD0500F8F792FD3B +:10A9900022002900F8F7CDF801250690F8F78AFD86 +:10A9A000012804D1012D00DB7EDDFF2D7CD0F8F7DE +:10A9B00084FD012801D1082D77DA01200699A840ED +:10A9C0000840142169430C908148002608180B9018 +:10A9D0002806000E0A90142777430B99CC19607053 +:10A9E0000C98002800D001200790079A0A9930009F +:10A9F000F8F78BFE0028607B01D102210FE0FD21DA +:10AA0000084060730A993000F8F70AFE0A9A31008C +:10AA10000990F8F79BFE0028607B03D001210843D2 +:10AA2000607389E040084000607309986080607C32 +:10AA3000401C60740B98C6550A9805F0F7F807009B +:10AA4000F8F738FD3F0601900A983F0E05F0A0F890 +:10AA500002900A9805F08EF80390FAF74CFB002854 +:10AA600003D05C48483002E07AE05A480830039945 +:10AA7000032901D139010BE00199002900D00121FE +:10AA8000029A89184900C919891C8906161DE0B85F :10AA9000010000005CA2010000040000CD1420228F -:10AAA000B5FC38BD10B5164C0028616807D00029E8 -:10AAB00004D11448FFF749FF0120606010BD002950 -:10AAC000FCD01048FFF76BFF0020606004002021DD -:10AAD0002000F8F70FFF641C012CF8DB10BD0848BC -:10AAE00040687047002810B505D0010004480822CE -:10AAF0000C3002F3D6EB10BD0149886070470000AE -:10AB000040F700C01BA2010070B542888A4202DDF6 -:10AB10000021415E26E0C2898A4209DA0C2408231A -:10AB2000045FC35E4589E01A891A4843511B16E049 -:10AB3000002293001B185C888C4202DCDB888B426D -:10AB400002DA521C032AF4DB940022180423D35E99 -:10AB5000D588045F5288181B891A4843A91A02F342 -:10AB600002ED21180804001470BDFFB581B000206B -:10AB7000009002990198F8F742FF070002990198A6 -:10AB8000F8F730FF4006411602987C181421414323 -:10AB9000D24814230918019858430D18E01BAC71D2 -:10ABA000E8710B980128687B02D10821084301E075 -:10ABB000F721084068730C21200002F3D4EC060052 -:10ABC00002990198F8F71FFF0007001728730399EF -:10ABD000201844180498844201DD049C03E00A987C -:10ABE000844200DA0A9C0C21200002F3BCEC010034 -:10ABF000864220D0B14204DD0C207043201A0B386D -:10AC000002E00C207043201AB44A0C3A925D1218EC -:10AC1000921C042A0FD80722D24390420BDB07284C -:10AC200009DCB14202DA0C21714302E00C217143CC -:10AC30000B31060001E021000026C81B3F28A97344 -:10AC400001DD3F2004E03F21C943884200DA0800CB -:10AC50000206E87302990198120EF8F7B2FC360763 -:10AC6000360F029901983200F8F780FC2E740B9889 -:10AC700000280BD001990298F8F72AFC001BC11C90 -:10AC8000072902D301210091AC74E874009805B043 -:10AC9000F0BDF0B58DB0002691484278521C42704C -:10ACA0008288002A02D00278002A01D0002973D0BD -:10ACB0008B498878401C887007F0D0FC04900020F5 -:10ACC0000590F8F7B6FD0400F8F7B9FD0500F8F7B0 -:10ACD000B3FD22002900F8F704F806900120069938 -:10ACE000B0400840142171430C907C48002508189E -:10ACF0000B903006000E0A9014276F430B99CC1965 -:10AD000060700C98002800D001200790079A0A99DB -:10AD10002800F8F7C5FE0028607B01D102210FE072 -:10AD2000FD21084060730A992800F8F743FE0A9A4B -:10AD300029000990F8F7D5FE0028607B03D0012197 -:10AD40000843607386E040084000607309986080A3 -:10AD5000607C401C60740B98C5550A9805F010F98A -:10AD60000700F8F769FD3F0601900A983F0E05F0CD -:10AD7000B9F802900A9805F0A7F80390FAF775FB66 -:10AD8000002802D05648483001E055480830039961 -:10AD9000032902D139010CE070E00199002900D0AB -:10ADA0000121029A89184900C919891C8906090ECE -:10ADB000890008180999FFF7A7FE07002800F8F78F -:10ADC000B9FD60813818000400140890A0800A982A -:10ADD00005F063F80701FAF7B0FB002807D0FAF78F -:10ADE0005CFB0D2803D1FAF770FBC000C719F817F8 -:10ADF000000FC0190011208108980321381A00287B -:10AE000000DC891F0818C117490F0818344940038E -:10AE1000C988001400291DD0079A00210192020060 -:10AE200000910A9928007F23FFF79FFE0100059AF1 -:10AE3000B14011430904090C0591617BFB221140CB -:10AE4000C207520F1143020661730A99120E2800BD -:10AE5000F8F70AFE6D1C2D062D0E012D01D20A9861 -:10AE60004AE7761C0B2E00DA38E70598002802D056 -:10AE70000598F8F7CBFA049807F0F4FB0DB0F0BD95 -:10AE800070B50025164C0028A18807D0002904D1F0 -:10AE90001448FFF75AFD0120A08070BDFACEDCC235 +:10AAA000090E890008180999FFF798FE0700300081 +:10AAB000F8F780FD60813818000401E04DE050E0B7 +:10AAC00000140890A0800A9805F047F80701FAF7EB +:10AAD00084FB002807D0FAF730FB0D2803D1FAF7E2 +:10AAE00044FBC000C719F817000FC01900112081DE +:10AAF00008980321381A002800DC891F0818C1179C +:10AB0000490F081838494003C988001400291DD08E +:10AB1000079A00210192020000910A9930007F23D8 +:10AB2000FFF78DFE0100059AA94011430904090CA5 +:10AB30000591617BFB221140C207520F11430206AF +:10AB400061730A99120E3000F8F7CDFD761C3606B7 +:10AB5000360E012E01D20A9847E76D1C0B2D00DA44 +:10AB600026E70598002802D00598F8F7D7FA049848 +:10AB700007F054FC0DB0F0BD70B500251A4E00284A +:10AB8000B1880FD000290CD1002420212000F8F733 +:10AB9000F1FC641C012CF8DB1448FFF7CEFD01200A +:10ABA000B08070BD0029FCD01048FFF7F0FD0020F8 +:10ABB000B0800024002221002800F8F78AFB002240 +:10ABC00021002800F8F75AFB641C2406240E102CE0 +:10ABD000F0D32800F8F772FD6D1C2D062D0E012D07 +:10ABE000E7D370BD045301C088F900C023A1010060 +:10ABF000704700207047000038B572A109680091C5 +:10AC000000240422694607F029F9002800D107240E +:10AC1000200038BD7CB5002405006BA000680190C1 +:10AC20006AA00068009004222800694607F016F91F +:10AC3000002801D1092407E00422280001A907F017 +:10AC40000DF9002800D1082420007CBD38B560A192 +:10AC50000968009100240422694607F0FFF80028E3 +:10AC600000D10424200038BD5AA108B5096800911C +:10AC70000422694607F0F2F8002801D1012008BD3E +:10AC8000002008BD70B504000D001600542110000E +:10AC900002F3A2EB25E06078801CA84223DC207838 +:10ACA000442801D1F46417E03100200000F318FAC1 +:10ACB000002811D12078DD280ED1A01CFFF7C6FF97 +:10ACC000002800D0B4642078DD2805D1A01CFFF74F +:10ACD00093FF002800D034656078A41C2D1AAD1EA7 +:10ACE0000419002DD7D1280070BDF8B5040001204B +:10ACF0000E00009015004421100002F36EEB2BE0D3 +:10AD000067782078B91C8E4202DA0020009026E095 +:10AD1000332825D036281BD02900200000F352FA12 +:10AD2000002815D1686B002802D0286B00280FD1AD +:10AD3000A01CFFF76FFF082814D0092808D1286B42 +:10AD4000002805D13D20207118206071201D286346 +:10AD5000F61BB61EE419A41C002ED1D10098F8BD34 +:10AD6000EC60F5E7686B0028F2D12D2020711C20E3 +:10AD70006071201D6863EBE77CB5060000200D00C4 +:10AD8000040000290190009000D17CBD2800FEF74E +:10AD900053FEFF364136318A280001AA6B4600F384 +:10ADA00074FA00280BD00198002800D00A480099B6 +:10ADB000002902D0084CE41F00E0002404432000D6 +:10ADC0007CBD0000506F9A0900904C3300904C34C9 +:10ADD0000050F204506F9A1209800000704710B5BD +:10ADE00004004A494A48002202F3E2FF002802D048 +:10ADF0001C214461018110BD018990300818704701 +:10AE0000FFB583B016000F000398406901900398C6 +:10AE100001890D182C0070347021280002F3DCEA3F +:10AE2000EC65069820802800603030210290417245 +:10AE30001E21A01C02F3FAEAA078F3210840083092 +:10AE40000007000F31010843A07001980B22920106 +:10AE500086183978307A814213D17878717A8842AD +:10AE60000FD1B878B17A88420BD1F878F17A88425C +:10AE700007D13879317B884203D17879717B884258 +:10AE80000CD0E07801210843E070019906227E3160 +:10AE9000A01D02F306EA0622390007E007721C191A :10AEA0000100000058A60100000400009ECEF34EF1 -:10AEB0000029FCD01048FFF77CFD0020A080002472 -:10AEC000002221002800F8F786FB0022210028003C -:10AED000F8F756FB641C2406240E102CF0D328002F -:10AEE000F8F7B7FD6D1C2D062D0E012DE7D370BDB3 -:10AEF000B85501C054F700C04FA4010070470020AE -:10AF00007047000038B56BA1096800910024042245 -:10AF1000694607F0D1F8002800D10724200038BD89 -:10AF20007CB50024050064A00068019063A000685F -:10AF3000009004222800694607F0BEF8002801D1DD -:10AF4000092407E00422280001A907F0B5F8002829 -:10AF500000D1082420007CBD38B559A109680091B2 -:10AF600000240422694607F0A7F8002800D1042431 -:10AF7000200038BD70B504000D00160054211000EB -:10AF800002F334EA25E06078801CA84223DC2078B4 -:10AF9000442801D1F46417E03100200000F3AAF83E -:10AFA000002811D12078DD280ED1A01CFFF7D4FF96 -:10AFB000002800D0B4642078DD2805D1A01CFFF75C -:10AFC000A1FF002800D034656078A41C2D1AAD1EA6 -:10AFD0000419002DD7D1280070BDF8B50400012058 -:10AFE0000E00009015004421100002F300EA2BE04F -:10AFF00067782078B91C8E4202DA0020009026E0A3 -:10B00000332825D036281BD02900200000F3E4F88F -:10B01000002815D1686B002802D0286B00280FD1BA -:10B02000A01CFFF77DFF082814D0092808D1286B41 -:10B03000002805D13D20207118206071201D286353 -:10B04000F61BB61EE419A41C002ED1D10098F8BD41 -:10B05000EC60F5E7686B0028F2D12D2020711C20F0 -:10B060006071201D6863EBE77CB5060000200D00D1 -:10B07000040000290190009000D17CBD2800FEF75B -:10B0800015FEFF366136318B280001AA6B4600F3AE -:10B0900006F900280BD00198002800D00948009933 -:10B0A000002902D0074CE41F00E0002404432000E4 -:10B0B0007CBD0000506F9A0900904C3300904C34D6 -:10B0C0000050F20409800000704710B504004849A0 -:10B0D0004848002202F376FE002802D01C21446179 -:10B0E000018110BD0189903008187047FFB581B00B -:10B0F0000F000198018946690D182C0070347021E9 -:10B10000280002F374E9EC65049820802800603080 -:10B110003021009041721E21A01C02F392E9A07818 -:10B12000F3210840083001070398090F000101438B -:10B1300017204001A17030183978027B914213D159 -:10B140007978427B91420FD1B978827B91420BD1C1 -:10B15000F978C27B914207D13979027C914203D1BF -:10B160007979407C81420CD0E0780121084331009C -:10B17000E0700622A231A01D02F39CE806223900ED -:10B1800007E006223900A01D02F394E806223100F0 -:10B19000A2312000123002F38EE8BB20800031186B -:10B1A000200006220C3002F386E80098002101728C -:10B1B0003000F9F71EFAA870A968012212031143A2 -:10B1C000A960E8681F231B029843A036E860337B20 -:10B1D0001B0213431843E8600198F9F76FF905B0B3 -:10B1E000F0BD002810B501D002F3C2FD10BD000073 -:10B1F000FC060000F8000004F7B50C00170000255D -:10B200002E006078217800020843FF389D380FD067 -:10B21000A049401800D10125E178A2780802104326 -:10B22000241D0419BC4201D2002DEAD03000FEBD1D -:10B2300000982100F5F71DFF761C3604360CEBE76D -:10B24000CA788B7812021A43042A0FD10A79062A87 -:10B250000CD2520012188B79E0325374CA79002A4A -:10B2600004D00B795B001818E0308274C8788978B4 -:10B2700000020843001D0004000C704710B50C00CC -:10B28000C978A3780902194301D1042010BD21799E -:10B29000814B491E0906090EE0300174607958544B -:10B2A00060799047E078A178000208433191274304 +:10AEB00006223900A01D02F3FEE9019906227E3127 +:10AEC0002000123002F3F6E901985921C900411817 +:10AED000200006220C3002F3EEE9029800210172F4 +:10AEE0000198F9F7CCF9A870A9680122120311435F +:10AEF000A960E8681F231B029843E8607369403328 +:10AF00001B7D1B0213431843E8600398F9F71AF9F5 +:10AF100007B0F0BD002810B501D002F329FF10BD25 +:10AF2000FC06000038050004F7B50C0017000025EA +:10AF30002E006078217800020843FF389D380FD03A +:10AF40005F49401800D10125E178A278080210433A +:10AF5000241D0419BC4201D2002DEAD03000FEBDF0 +:10AF600000982100F5F7A8FF761C3604360CEBE7B5 +:10AF7000FFB5002081B004000D000090019816007C +:10AF8000ECF7F4FE070052E06878297800020843E5 +:10AF9000FF386B3825D0012836D007280ED0082876 +:10AFA00038D1FF20474A290073300E2300F3B8F947 +:10AFB000040004990198EFF73CFE32E0414AFF207B +:10AFC0000E3229007230022300F3AAF93D49040031 +:10AFD000891E098A0A200A2900D308003A490880F4 +:10AFE0001FE03A493A4A0968A8688918884208D394 +:10AFF0003A1D2900FF206B300C2300F391F9040067 +:10B000000FE0012000900CE03A0010322900FF20F0 +:10B010006C30F1E7E978AA7808021043001D0404B7 +:10B02000240C002C05D0301B0604360C2D19002EE4 +:10B03000AAD1009805B0F0BD70B50C00ECF796FEF3 +:10B040000500FF2072302070000A607002201D4948 +:10B05000A0700020891EE070087C2071487C60711F +:10B06000FF20A41D73302070000A60700E20A070B5 +:10B070000020E0700E22891C201D02F31CE9FF2035 +:10B0800012346B302070000A0C2660700020A6700D +:10B09000E0703200291D201D02F30CE9FF2010345E +:10B0A0006C302070000A6070300AA6702900E070D1 +:10B0B0000C221031201D02F3FEE8382070BD000084 +:10B0C0009D01FFFF5E3A01C006F400C0A83801C030 +:10B0D0002F0800001CB50022130069460CC106228F +:10B0E000694606F0C5FE002801D101201CBD0020E4 +:10B0F0001CBD1CB506A106C9019200910622694635 +:10B1000006F0B6FE002801D101201CBD00201CBDA8 +:10B11000FFFFFFFFFFFF00007249734808B502F30D +:10B1200066E97248F0F2A9FF73227049D2000092DA +:10B130000C220C396C4B881A00F093F8002008BDE3 +:10B140006A4910B50C3908000C3800F0A2F8040068 +:10B1500066480C38006842680168F1F76FF93921D8 +:10B1600020000901083002F36CE9200010BD5F499E +:10B1700002005E480C3910B500F09FF810BD5B4925 +:10B1800002000800183810B500F097F810BD10B58F +:10B19000F3F758F8002801D1012010BD002010BDA0 +:10B1A00070B507F041F9514C060008E02568280009 +:10B1B000FFF7EDFF002805D02800FFF7E0FFA068AB +:10B1C0000028F3D1300007F033F970BD0F21484853 +:10B1D000C90108B502F30AE94549FF2281320C3959 +:10B1E00008000092424B05220C3800F03AF800208B +:10B1F00008BD3F4910B504000C3908000C3800F0B8 +:10B2000048F8002800D0846010BD394902000C398C +:10B2100008000C3810B500F050F810BD354936481C +:10B2200008B502F3E4E83449ED2292000C39080035 +:10B230000092314B03220C3800F013F8002008BDB7 +:10B240002D4910B50C3908000C3800F022F810BD5B +:10B25000294902000C3908000C3810B500F02DF80F +:10B2600010BDFFB581B00C0016001D000A9F0198AB +:10B27000F0F203FF2000F0F200FF002405E0019847 +:10B280002900F0F22BFFED19641CB442F7DB05B086 +:10B29000F0BD70B504000D0007F0C6F806002000F0 +:10B2A000F0F2F2FE040003D021002800CDD602F611 :10B2B0000100000054AA0100000400006AA186FAFF -:10B2C000001D0004000C10BDF8B5FF2209320A7001 -:10B2D000120A4A7006228A700022CA70734E091D33 -:10B2E00004252C00531C1B061B0E0B70B25C491C62 -:10B2F000A41C0A702404491C240C1A00032BF1D34B -:10B3000000230700E0370022FF250A350D702D0AC3 -:10B310004D7004258D700025CD700A713D7C083478 -:10B320006D1C4D7155002D18E0356E7C8E71AD7C15 -:10B33000521C24041206CD710831240C120E062A68 -:10B34000E2D35B1C1B061B0E032BDCD3080000F3AF -:10B3500081F800190004000CF8BDFFB5002081B091 -:10B3600004000D00009001981600ECF73DFE070068 -:10B3700052E06878297800020843FF386B3825D0FE -:10B38000012836D007280ED0082838D1FF20484A97 -:10B39000290073300E23FFF2CDFF040004990198B9 -:10B3A000EFF79BFD32E0424AFF200E322900723057 -:10B3B0000223FFF2BFFF3E490400891E098A0A20CA -:10B3C0000A2900D308003B4908801FE03A493B4A5C -:10B3D0000968A8688918884208D33A1D2900FF2007 -:10B3E0006B300C23FFF2A6FF04000FE00120009059 -:10B3F0000CE03A0010322900FF206C30F1E7E978C8 -:10B40000AA7808021043001D0404240C002C05D067 -:10B41000301B0604360C2D19002EAAD1009805B059 -:10B42000F0BD70B50C00ECF7DFFD0500FF207230B9 -:10B430002070000A607002201D49A0700020891E43 -:10B44000E070087C2071487C6071FF20A41D73307F -:10B450002070000A60700E20A0700020E0700E22A4 -:10B46000891C201D01F330EFFF2012346B30207057 -:10B47000000A0C2660700020A670E0703200291DC2 -:10B48000201D01F322EFFF2010346C302070000AE1 -:10B490006070300AA6702900E0700C221031201D67 -:10B4A00001F312EF382070BD9D01FFFF46F000C090 -:10B4B000C63B01C0AEF100C0C03801C02F0800007B -:10B4C0001CB50022130069460CC10622694606F02D -:10B4D000FDFD002801D101201CBD00201CBD1CB5B4 -:10B4E00006A106C9019200910622694606F0EEFD0A -:10B4F000002801D101201CBD00201CBDFFFFFFFF63 -:10B50000FFFF00006349644808B501F37AEF634820 -:10B51000F0F2BDFD61493F2212010C390800009292 -:10B520005D4B0D220C3800F074F8002008BD5B491B -:10B5300010B50C3908000C3800F083F804005748A7 -:10B540000C38006842680168F1F7D6F87D212000C8 -:10B55000C900083001F37EEF200010BD4F49020002 -:10B560004E480C3910B500F080F810BD4B49020070 -:10B570000800183810B500F078F810BD10B5F3F7D2 -:10B580002AF8002801D1012010BD002010BD70B59F -:10B5900007F078F8414C060008E025682800FFF71E -:10B5A000EDFF002805D02800FFF7E0FFA068002885 -:10B5B000F3D1300007F06AF870BDB9213848C900EE -:10B5C00008B501F31EEF3649FF2229320C39080075 -:10B5D0000092334B05220C3800F01BF8002008BD08 -:10B5E0002F4910B504000C3908000C3800F029F878 -:10B5F000002800D0846010BD294902000C390800E1 -:10B600000C3810B500F031F810BD25480C38006832 -:10B610007047FFB581B00C0016001D000A9F01980D -:10B62000F0F235FD2000F0F232FD002405E0019833 -:10B630002900F0F25DFDED19641CB442F7DB05B0A2 -:10B64000F0BD70B504000D0007F01CF806002000E6 -:10B65000F0F224FD040003D021002800F0F248FDA0 -:10B66000300007F013F8200070BDF8B51500060093 -:10B670000F0007F007F80400002D07D0290038005C -:10B68000F0F274FD01003000F0F232FD200006F00F -:10B69000FDFFF8BD30330000A00A0004B05C0004D8 -:10B6A000E83D000470B50500F1F7E1FA040001215E -:10B6B0001020F2F77EFB002103200002C61DF5AC2E +:10B2C000F0F216FF300007F0BDF8200070BDF8B5B1 +:10B2D000150006000F0007F0B1F80400002D07D09C +:10B2E00029003800F0F242FF01003000F0F200FFC8 +:10B2F000200007F0A7F8F8BD202B0000181100046B +:10B30000B45C0004503C00041C0B00003C2401C051 +:10B3100070B50500F1F79DFB040001211020F2F744 +:10B32000DFFB172000214001281869720170F948DD +:10B33000217761770160F8480160080070BDF8B5B9 +:10B3400004000B208001201846692000F1F781FBE2 +:10B35000070001211020F2F7C3FBAF21C90038001C +:10B3600002F34EE8132292015021B81802F348E884 +:10B37000300020212C3002F344E800252B20855595 +:10B38000200006217E3002F366E8172040012018D5 +:10B39000657205703D7720007D77F1F785FC002010 +:10B3A000F8BD70B504000D0006227E3001F38CEF6D +:10B3B0005920C000290020180622050001F384EF5F +:10B3C0000B2080012018827B290002200123F9F73D +:10B3D00075F870BD70B5050002D103200AF03EFA81 +:10B3E00000200AF03BFA002802D0C068C00421D433 +:10B3F00002200AF033FAEBF718FC01281AD00420D7 +:10B400000AF02CFA002815D103200AF027FA17E0D9 +:10B41000AC4211D0607A032805D1002C0CD0E06832 +:10B42000C00409D506E0022806D12000EBF7FDFB99 +:10B43000012801D1012070BD03212000F1F714F88B +:10B440000400E5D170BD10B588B0F1F702FB04002F +:10B450002021684601F3D4EFA068C00516D4072266 +:10B46000AEA1684601F39AEF01A8C01C01F317F9D9 +:10B47000132080012018016BCA78172A04DC02A867 +:10B48000091D401C01F320EF08B010BD1120800100 +:10B490002018017CC07B0A020243A248921F211897 +:10B4A0006846EFE78C2101701221417018218170EC +:10B4B0002421C170302101714821417160218171C5 +:10B4C0006C21C171704770B50C000E216018050029 +:10B4D00001F3C0EF2800FFF7E5FF93480E22006854 +:10B4E0002900401D01F3F0EE0D2060772000FF30B1 +:10B4F0008E49E1300183491E4183E120C000206074 +:10B50000FE20A0770C20E07770BDF1B582B00298E4 +:10B510000AF0BBF9040002980AF090F907000298BB +:10B52000F1F797FA3E00FF360500CF3601F0C1F97A +:10B53000002806D0290030000622BD31243001F356 +:10B54000C4EE02983900FFF7BEFF13225201012119 +:10B55000B81801702021300001F37CEF74480068B6 +:10B5600001F3D0FF020072480168300001F3ACEE35 +:10B5700030002030072101900170280001F099F976 +:10B58000002802D0CA20405D6072019802990278BA +:10B590000B20800108180090406931002C3001F325 +:10B5A00094EE01980178009840692030C172FF2024 +:10B5B000F030C15D00984069403081732521490118 +:10B5C0006918607A0877607A6037B871FEBDFEB599 +:10B5D0000500002600960AF058F928000AF02EF916 +:10B5E0002800F1F736FA1321890104004118514A65 +:10B5F000006801278243002A34D10868002836D029 +:10B600004868002833D08868002830D0C8680028EF +:10B610002DD0086900282AD04869002827D0C86999 +:10B62000002824D0086A002821D0486A00281ED0AB +:10B63000886A00281BD0C86A002818D0086B002828 +:10B6400015D0486B002812D0886B00280FD0C86B2B +:10B6500000280CD0086C002809D015208001201883 +:10B66000076306E0200001F024F9002801D0012042 +:10B67000FEBD26776677A068C021252208435201C7 +:10B68000FF21A21811750421084330218843A060CE +:10B690000920C001201886632920012140012018BB +:10B6A0000A028172052109026118CA6205220A6331 +:10B6B00086822800FFF78EFE082700285968B9A463 :10B6C0000100000050AE010000040000397B5596D7 -:10B6D00028186972017221776177FF480160FF487D -:10B6E0000160080070BD70B50400F1F7CAFA0600E9 -:10B6F00001211020F2F767FBAF21C900300001F3F0 -:10B700008AEE132292015021B01801F384EE20003A -:10B7100020217E3001F3A8EE00259E200555200053 -:10B720000621A23001F3A0EE03200002201865726A -:10B730000572357720007577F1F7C7FB002070BDE3 -:10B7400070B504000D000622A23001F3C8EDBB2045 -:10B750008000290020180622050001F3C0ED172003 -:10B7600040012018827C290002200123F9F783F888 -:10B7700070BD70B5050002D103200AF081F80020E9 -:10B780000AF07EF8002802D0C068C00421D402204C -:10B790000AF076F8EBF790FB01281AD004200AF0A3 -:10B7A0006FF8002815D103200AF06AF817E0AC42C0 -:10B7B00011D0607A032805D1002C0CD0E068C004B9 -:10B7C00009D506E0022806D12000EBF775FB012819 -:10B7D00001D1012070BD03212000F0F7A3FF040078 -:10B7E000E5D170BDF3B5040085B00AF039F8050065 -:10B7F00020000AF05CF801908F20800028180E21AC -:10B80000039068180490F0F23EFC070001986B4624 -:10B81000197E0172220061323E060092360E00222D -:10B82000049831001300FBF261F90290582006558C -:10B83000200004993A004A3001F350ED029B04992C -:10B84000320020000CF052EC01982A00030048322C -:10B85000290008331600643128000CF04CEC9B20C2 -:10B8600080001C223100281801F3A2ED2000C03016 -:10B870004268012191734068AC21018105212000BB -:10B88000FBF706FF039800212030C17307B0F0BD1D -:10B8900010B588B0F1F7F5F904002021684601F3EE -:10B8A000BAEDA068C00516D407228DA1684601F341 -:10B8B00080ED01A8C01C00F3FCFE132080012018BD -:10B8C000016BCA78172A04DC02A8091D401C01F389 -:10B8D00006ED08B010BD112080012018017CC07B4E -:10B8E0000A0202438048921F21186846EFE770B5AC -:10B8F0000C000E216018050001F3B6ED8C20A0733A -:10B900001220E07318202074242060743020A0746A -:10B910004820E074602020756C20607573480E220A -:10B9200000682900401D01F3DAEC0D20607720004B -:10B93000FF306F49E1300183491E4183E120C0009F -:10B940002060FE20A0770C20E07770BDF1B582B0BA -:10B95000029809F0ACFF0600029809F081FF070089 -:10B960000298F1F78EF93D00FF350400CF3501F064 -:10B97000BDF9002806D0210028000622BD31243060 -:10B9800001F3ACEC02983900FFF7B1FF132252012A -:10B990000121B8180170A068C00510D4202128002A -:10B9A00001F362ED5348006801F3B6FD020051480F -:10B9B0000168280001F392EC072120204155200066 -:10B9C00001F094F9002802D0CA20005D70722800AE -:10B9D000203001900278029829007E3001F37EEC3D -:10B9E00001980178029880308177FF21F031C95D9C -:10B9F000C177252149016118707A0877707A60371C -:10BA0000B871FEBDFEB505000027009709F04FFF95 -:10BA1000280009F025FF2800F1F733F90400364922 -:10BA2000226813208001201891430126002934D177 -:10BA30000168002936D04168002933D08168002987 -:10BA400030D0C16800292DD0016900292AD0416970 -:10BA5000002927D0C169002924D0016A002921D0FA -:10BA6000416A00291ED0816A00291BD0C16A0029C1 -:10BA700018D0016B002915D0416B002912D0816BC1 -:10BA800000290FD0C16B00290CD0006C002809D010 -:10BA9000152080012018066306E0200001F026F939 -:10BAA000002801D00120FEBD27776777A068C0215C -:10BAB000252208435201FF21A218117504210843D1 -:10BAC00030218843A0600920C00120189EB2D11601 +:10B6D00002D0A0683843A0602000A030C17B0422C3 +:10B6E0001143C173687A022801D0032801D16E7218 +:10B6F000C3E0012068721720400100212818017062 +:10B70000200001F0E0F8002823D02800FFF76CFEAD +:10B7100000281BD16846EAF7C9FFCA20015D0098DE +:10B7200000220CF042EC14E0742201C0782201C027 +:10B730004449524543542D005704000034F800C0DA +:10B740002B0900004CFA00C0FCAB0300A068384392 +:10B75000A060200001F0B7F80B2189016E180028C5 +:10B760000CD07169CA20005D08732000BD300190C3 +:10B77000F2F7EAFB01992800FFF71DFE706920210E +:10B780002C3001F348EE706900212030C1727069DD +:10B790002C300722FF4901F30CEE7069072120309D +:10B7A000C172112080012018017CC27B0802104365 +:10B7B000801F09280DDBF848F6490722201806F0FB +:10B7C0006BFB002805D1A168FF20401C0143A1604C +:10B7D00003E0A06804210843A0602800FFF704FEEE +:10B7E000002803D12800F1F77DF902E0A068384372 +:10B7F000A0602800FFF793FE2800FFF7F5FDE74E55 +:10B80000002812D13068E649084330603068E549C5 +:10B8100008403060E4480168202211430160E34A97 +:10B82000506A04218843506202E0A0683843A06057 +:10B8300003210020F6F2F4FE04210120F6F2F0FECE +:10B840002800FFF7D1FD002807D1F8F721FA30686A +:10B85000012149030843306002E0A0683843A0603A +:10B86000F6F254FDF6F294FFF8F7C4F9F6F22AFD69 +:10B87000E9F72DFE2800FFF7F0FD0020FEBDF8B52A +:10B880000C000025F1F7EFF8D821095A0200C91E73 +:10B890000B041B0CDD3213E04678002108E047184A +:10B8A000BF78A74201D1012504E0491C0904090C15 +:10B8B000B142F4D3981B801E03041B0C921CB218D7 +:10B8C0001000002BE8D1002D01D00120F8BD002090 +:10B8D000F8BDF0B5060089B009F0E1FF05003000C1 +:10B8E00009F0B6FF02903000F1F7BDF80400287AA5 +:10B8F000810889002972707A00287ED0A06808210A +:10B900000843A06003210020F1F705FE00280AD1BA +:10B9100002210800F1F7FFFD002804D1042009F0FE +:10B92000A7FF00281DD00B21890147187869017BEA +:10B930003000FFF7A4FF0028DFD0200000F0C3FF95 +:10B9400000280ED07869017B25204001201801775E +:10B950002000C030827C01007869007B824200D0E8 +:10B9600088742100C031887C002804D0252252012F +:10B97000A218107704E0252040018A7A2018027767 +:10B98000252040012218107F88740B218901771827 +:10B99000687279690873107F0E2804D9287A8008A4 +:10B9A0008000401C2872200000F08DFF002804D089 +:10B9B000697AA86800220CF0F8EA172102204901F0 +:10B9C00071187072087071200021C00030180A00D0 +:10B9D0000B000EC001600800FBF746F81120800143 +:10B9E00020180890017CC27B08021043801F0006CB +:10B9F000000E092810D3072200E04CE06648654994 +:10BA0000201806F049FA002806D1A068FF21491C39 +:10BA100008430421884302E0A06804210843A06091 +:10BA20002000A030017C01221143FB22114001744F +:10BA3000A068400725D5216C00290CD156485549EE +:10BA40000722201801F34AEC5348C01D201800F3C8 +:10BA500030FE092010E04020425C4F48201801F3DE +:10BA60003EEC0298216CFF30203120223A3001F365 +:10BA700036EC206C403000780899801DC873000AAD +:10BA80000874A06804218843A06002980390FF30E6 +:10BA9000CF30019002D1012009B0F0BD0898027C9E +:10BAA000C17B10020843801F0006000E009020009A +:10BAB00000F009FF002842D03748062252302118F2 +:10BAC00003980791FF30F330069101F32CF0BD622B :10BAD000010000004CB201000004000086BE702589 -:10BAE0002921876301204901611811E0B41E01C0BA -:10BAF000B81E01C04449524543542D00570400006C -:10BB0000ECF500C02B09000018F800C0FCAB0300E6 -:10BB100002028872052000022018C2620522026318 -:10BB200028008F82FFF72FFE0826002802D0A06889 -:10BB30003043A0602000A030C17B04221143C173B8 -:10BB4000687A022801D0032801D16F72B3E0012086 -:10BB500068720320000228180772200001F0D0F854 -:10BB6000002811D02800FFF70EFE002809D16846F2 -:10BB7000EAF7D2FECA20015D009800220CF0E4E949 -:10BB800002E0A0683043A060200001F0B9F800286E -:10BB90000FD00B2189016918896BCA20005D0873D9 -:10BBA0002000BD300290F2F738FB02992800FFF721 -:10BBB000D1FD28007E302021019001F360EC2800A7 -:10BBC0003900803081770700F9490198072201F395 -:10BBD00090EB1120072180012018B977017CC27BEE -:10BBE00008021043801F09280BDBF248F0490722A6 -:10BBF000201806F07FFA002803D1FF21A068491C15 -:10BC000001E0A06804210843A0602800FFF7BBFD05 -:10BC1000002803D12800F1F77DF802E0A068304346 -:10BC2000A0602800FFF79CFEF6F25CFB009928005C -:10BC3000FFF7E2FD2800FFF7A6FDDF4F002812D135 -:10BC40003868DE49084338603868DD4908403860A4 -:10BC5000DC490A68202002430A60DB4A506A04215A -:10BC60008843506202E0A0683043A06003210020B6 -:10BC7000F6F2E0FC04210120F6F2DCFC2800FFF7DC -:10BC800082FD002807D1F8F7CDF938680121490372 -:10BC90000843386002E0A0683043A060F6F240FB41 -:10BCA000F6F280FDF8F770F9F6F216FBE9F73AFBC9 -:10BCB0002800FFF7F7FD0020FEBDF8B50C000025B9 -:10BCC000F0F7E9FFD821095A0200C91E0B041B0C2A -:10BCD000DD3213E04678002108E04718BF78A7421C -:10BCE00001D1012504E0491C0904090CB142F4D337 -:10BCF000981B801E03041B0C921CB2181000002B12 -:10BD0000E8D1002D01D00120F8BD0020F8BDF0B52C -:10BD1000060089B009F0D5FD0500300009F0AAFD44 -:10BD200007003000F0F7B7FF0400287A8108890087 -:10BD30002972707A00287ED03000FFF724FD002899 -:10BD40002BD0A06808210843A06003210020F1F750 -:10BD500059FD0028EFD00B21890140180890806B15 -:10BD6000017B3000FFF7A9FF0028E4D0200000F09D -:10BD7000C7FF002821D00898806B017B2520400157 -:10BD8000201801772000C030827C01000898806B69 -:10BD9000007B824211D088740FE02000C030010087 -:10BDA000807C002804D0252149016118087704E02F -:10BDB00025204001897A201801772520400121188B -:10BDC000087FD22210550B229201B2186872079296 -:10BDD000926B1073087F0E2804D9287A800880009F -:10BDE000401C2872200000F08BFF002804D0697AE4 -:10BDF000A86800220CF0A8E80321022009027118AB -:10BE000070720872F7200021800030180A000B00C1 -:10BE10000EC001600800FAF7E7FF1120800120182A -:10BE20000690017CC27B08021043801F0006000EB2 -:10BE3000092810D300E04CE05E485D490722201835 -:10BE400006F058F9002806D1A068FF21491C0843D4 -:10BE50000421884302E0A06804210843A060200078 -:10BE6000A030017C01221143FB2211400174A06823 -:10BE7000400725D5E16B00290CD14E484C490722DB -:10BE8000201801F336EA4B48C01D201800F31BFCB4 -:10BE9000092010E04020425C4648201801F328EABF -:10BEA000E16B3800FF30203120223A3001F320EAE4 -:10BEB000E06B403000780699801DC873000A087452 -:10BEC000A06804218843A0603800FF30CF30019083 -:10BED00002D1012009B0F0BD0698017C21A861378C +:10BAE00008EC2000BD3006990622059006F0DEF92C +:10BAF000002806D00598F2F722FA07993000FFF7E0 +:10BB000064FC0198202101F3BAEC2848009A21181E +:10BB1000019801F3EEEB019C009A203422707869C1 +:10BB200001992C3001F3E4EB786921782030C1725F +:10BB3000F8F76AF87969687A08737869297A41733D +:10BB400002987D210901FF304130C161016200206E +:10BB5000ACE75920C000311803980622FF30F330BB +:10BB6000049001F3C6EB0499C8E7F8B5040009F0A6 +:10BB700079FE07002000F0F780FF0500607A0028BA +:10BB800001D10120F8BD0E48416A042211434162EF +:10BB9000280000F0A2FE002823D06846EAF790FDB6 +:10BBA000252040012E180DE0B0AE01005704000022 +:10BBB00000A30080465E00004E7EFFFF00A70080CD +:10BBC00000A80080317F009800220CF0F8E90B20DB +:10BBD000800120184269317F117340696B461978E2 +:10BBE00041731721490102206118087003200021C8 +:10BBF00060727120C00020180A000B000E004EC0B9 +:10BC00000800FAF73BFF280000F067FEFF4E00280F +:10BC100006D03800FF300622A919F33001F368EB93 +:10BC2000A9192800BD3006220E00050006F03EF9D5 +:10BC3000002806D02800F2F782F931002000FFF733 +:10BC4000C4FB0421200001F0E2FFF1480460200061 +:10BC5000F0F752FFF7F7D8FF0020F8BDFEB50E0051 +:10BC60001700F0F70AFF132189014018009071783E +:10BC7000327809023000114320300D18DD20287081 +:10BC8000681C0190E3490422A81C01F332EBAD1DAE +:10BC900000240120A040B84210D8384209D00099B1 +:10BCA000A0000958002904D0280000F3D4F9451950 +:10BCB0002D1D641C2406240E142CEAD3019801992E +:10BCC000281A401E0006000E0870717832780902AA +:10BCD00011430818801C3070000A7070FEBDCE4AF7 +:10BCE000BCE7CE4ABAE7CE4AB8E7FFB581B0844692 +:10BCF00000249E46029800283FD0704600283CD081 +:10BD0000604600781178884237D10A988178437864 +:10BD100008020A991843C91C4318981C0025009072 +:10BD200018E00021604640190FE05718BE78877868 +:10BD3000BE4207D15018009980780855641C24042D +:10BD4000240C04E0491C0904090C7145EDDB6D1C51 +:10BD50002D042D0C02988542E3DB002C0DD01078C9 +:10BD600018705C700A98A41C8178427808020A99BD +:10BD7000104300194870000A887005B0F0BDFFB587 +:10BD800083B0150000273C00002802971DD0F0F773 +:10BD900074FE060000F0A1FD002818D0049800F3FE +:10BDA00043F9019001210698B940814202D90C98CB +:10BDB00081426DD80C9A06981043084263D00698C9 +:10BDC000084006D00C9A0A4203D00020C04307B0B6 +:10BDD000F0BD01235B02CA1A99426FD01DDC102905 +:10BDE0006ED00CDC012955D002295AD004295CD030 +:10BDF00008293BD100285FD03400BA3436E020292E +:10BE000065D040296AD0802971D0FF39491E2DD1D3 +:10BE1000002873D07D48253899E01F214902531A24 +:10BE20008A427FD013DCFF3AFF3A921E39D00121BB +:10BE30008902511A6DD00122D202891A16D05200FD +:10BE4000891A13D100286BD07048AF387FE00121E8 +:10BE50008903591A6ED00122D203891A73D0520075 +:10BE6000891A78D05000081A00D1AC6CA07861789B +:10BE70000002084307D00198FB22210000F32FF9AC +:10BE80000299401802907F1C3F063F0E132F89D362 +:10BE900002989CE7002802D05C48801D57E0AC68FF +:10BEA000E4E700206070A070EDE7002802D03400C5 +:10BEB000AC34DBE72C68D9E7AC6BD7E720E0FFE7D1 +:10BEC000002802D03400D334D0E76C68CEE70028D5 +:10BED00002D04E4808383AE02C6CC7E7B5FB423236 :10BEE0000100000048B6010000040000D564A34929 -:10BEF000C27B08021043801F0006000E0090200045 -:10BF000000F008FF002842D02F48062252302118A6 -:10BF10003800FF30F3300591049101F3F4E920007B -:10BF2000BD3004990622039006F0EEF8002806D0F2 -:10BF30000398F2F76DF905993000FFF715FC0198A9 -:10BF4000202101F3A6EA2048009A2118019801F364 -:10BF5000DAE9019C009A20343000227001997E3089 -:10BF600001F3D0E920788036B077F8F717F8079911 -:10BF7000687A896BFF3708730798297A806B417359 -:10BF80007D2000014137F86138620020ACE7BB201A -:10BF9000800031183800FF30F3300622029001F3A0 -:10BFA000B2E90299C8E7F8B5040009F06DFC070092 -:10BFB0002000F0F77AFE0500607A002810D10120F9 -:10BFC000F8BD000060B201005704000000A300802B -:10BFD000465E00004E7EFFFF00A7008000A80080A4 -:10BFE000FF48416A042211434162280000F092FE9A -:10BFF000002814D06846EAF799FC252040012E1845 -:10C00000317F009800220BF0AAEF0B20800120184E -:10C01000826B317F1173806B6B46197841730321FA -:10C020000902022061180872032000216072F720C3 -:10C03000800020180A000B000E004EC00800FAF71E -:10C04000DDFE280000F066FEE64E002806D038002F -:10C05000FF300622A919F33001F354E9A919280089 -:10C06000BD3006220E00050006F04EF8002806D06E -:10C070002800F2F7CDF831002000FFF775FB04210E -:10C08000200001F06AFFD84804602000F0F74CFE61 -:10C09000F7F784FF002093E7FEB50E001700F0F7D6 -:10C0A00004FE13218901401800907178327809024A -:10C0B0003000114320300D18DD202870681C0190DD -:10C0C000CA490422A81C01F31EE9AD1D0024012069 -:10C0D000A040B84210D8384209D00099A0000958B1 -:10C0E000002904D02800FFF2C0FF45192D1D641C53 -:10C0F0002406240E142CEAD301980199281A401E14 -:10C100000006000E08707178327809021143081891 -:10C11000801C3070000A7070FEBDB54ABCE7B54A9D -:10C12000BAE7B54AB8E7FFB581B0844600249E4619 -:10C13000029800283FD0704600283CD06046007826 -:10C140001178884237D10A988178437808020A9991 -:10C150001843C91C4318981C0025009018E00021C2 -:10C16000604640190FE05718BE788778BE4207D165 -:10C170005018009980780855641C2404240C04E0AD -:10C18000491C0904090C7145EDDB6D1C2D042D0CB7 -:10C1900002988542E3DB002C0DD0107818705C709B -:10C1A0000A98A41C8178427808020A991043001961 -:10C1B0004870000A887005B0F0BDFFB583B0150067 -:10C1C00000273C00002802971DD0F0F76EFD060006 -:10C1D00000F0A0FD002818D00498FFF22FFF019076 -:10C1E00001210698B940814202D90C9881426DD84C -:10C1F0000C9A06981043084263D00698084006D06F -:10C200000C9A0A4203D00020C04307B0F0BD0123BE -:10C210005B02CA1A99426FD01DDC10296ED00CDC6B -:10C22000012955D002295AD004295CD008293BD1D4 -:10C2300000285FD03400BA3436E0202965D0402988 -:10C240006AD0802971D0FF39491E2DD1002873D0C2 -:10C250006448253899E01F214902531A8A427FD049 -:10C2600013DCFF3AFF3A921E39D001218902511A9C -:10C270006DD00122D202891A16D05200891A13D128 -:10C2800000286BD05748AF387FE001218903591A45 -:10C290006ED00122D203891A73D05200891A78D045 -:10C2A0005000081A00D1AC6CA078617800020843F5 -:10C2B00007D00198FB222100FFF21BFF02994018D2 -:10C2C00002907F1C3F063F0E132F89D302989CE7F4 -:10C2D000002802D04348801D57E0AC68E4E7002006 -:10C2E0006070A070EDE7002802D03400ACFE27900B +:10BEF000002802D03400C334C2E7EC68C0E700E099 +:10BF000006E0002802D0464832382AE0AC6AB7E79B +:10BF10006C6BB5E7002804D04148C01E21E00BE05F +:10BF200001E06C6CACE7002802D03400D734A7E7FE +:10BF30006C69A5E72C6AA3E7002803D03400FF341E +:10BF400030349DE7EC699BE7002804D034485B3827 +:10BF500007E002E009E06C6A92E7002803D030486D +:10BF60001E3834188CE7EC6B8AE7002802D03400C6 +:10BF7000CB3485E72C6983E7F8B50C000600F0F7B1 +:10BF800086FD00220C23210030000092FFF701FF04 +:10BF900005046078217800022D0C084340192070B8 +:10BFA000000A607005F08DFE002812D060782278BB +:10BFB000010211432000203009180022300005F052 +:10BFC0002EFF617822780902114340182070000A80 +:10BFD00060702800F8BDF7B582B0002406000D009F +:10BFE0002700F0F754FD717A022907D1B022125CC4 +:10BFF000920700D5CC010122920314430E4A23007C +:10C000001343012922D101008031096BA030019135 +:10C0100000220274040029000092049A30000DE00E +:10C02000A90400006CFA00C0201532008310000043 +:10C03000F51F0800BBF90D0004200000FFF7A9FE62 +:10C040006B461A790104090C227407E0049A29004E +:10C0500030000097FFF79DFE0104090C68782A78EC +:10C060000002104340182870000A687008008EE62D +:10C0700070B504000E001500FFF2D2FFA01D2A00CB +:10C08000310001F340E91A3CE07E4019E076A81D3A +:10C0900070BD01005120012900D173207047FFB508 +:10C0A00083B00C0000211F000C9E059A02911160C4 +:10C0B0000028216070D00500FF490422A81C05F06B +:10C0C000FFFE0028687805D1811C001FAD1D00917E +:10C0D0000290A2E0801C391A0F043F142D18002F83 +:10C0E0007EDDA4E001952B78216801F328EB131580 +:10C0F0003F0B480F51193643563A1D222C27314C1D +:10C100005B60650035602068042202E0756020688D +:10C110001022104320604FE0B56020680122F8E74C +:10C12000F56020684022F4E7012275612068D202A0 +:10C13000EFE70122B56120681203EAE70122F56109 +:10C1400020689203E5E70122356220685203E0E7A8 +:10C15000012275622068D203DBE7B5622068802285 +:10C16000D7E70122F56220689202D2E735632068A2 +:10C170000222CEE7FF2275632068521CC9E7B5632F +:10C1800020680822C5E70122F56320681204C0E791 +:10C19000356420682022BCE729E00122756420680C +:10C1A0005202B6E70122356120685204B1E701224C +:10C1B000B56420689204ACE7019882784378100255 +:10C1C0001843C01C6B461A890004000C90421FD90A +:10C1D00005980268206848400243059802A900E0DB +:10C1E00028E00260019800F362F8050001D1002008 +:10C1F000F7E501986B46281A381A070418893F1486 +:10C20000002802D0002F00D06CE70020009009E049 +:10C210006B4619892D18081A02906B461889002858 +:10C22000F2D10098381A07043F14002F02DD002DC8 +:10C2300000D041E73000D4E5FEB50500002016002F +:10C240001F0000290290019002D02C00283406E043 +:10C25000994A012128000423FFF2F0FF0400002C7A +:10C2600001D10020FEBD687829780006001408433B +:10C27000611B401A2030030408981D144C2101F35F +:10C28000DEE8089A00922B00200001AA02A9FFF71D +:10C2900006FF002E01D002993160002FE2D00199F3 +:10C2A0003960FEBDF0B5ABB00D00309F14001E002C +:10C2B000F0F7EDFB022020700020290060700622BC +:10C2C0000C31A01D01F31EE86078217800020843BC +:10C2D000801D2070000A6070300AA670E070380A75 +:10C2E00027716071607821780002084389A82E8642 :10C2F0000100000044BA010000040000210BD6FD3B -:10C30000AC34DBE72C68D9E7AC6BD7E720E0FFE77C -:10C31000002802D03400D334D0E76C68CEE7002880 -:10C3200002D0354808383AE02C6CC7E7002802D024 -:10C330003400C334C2E7EC68C0E700E006E0002840 -:10C3400002D02D4832382AE0AC6AB7E76C6BB5E70B -:10C35000002804D02848C01E21E00BE001E06C6CEE -:10C36000ACE7002802D03400D734A7E76C69A5E712 -:10C370002C6AA3E7002803D03400FF3430349DE753 -:10C38000EC699BE7002804D01B485B3807E002E01B -:10C3900009E06C6A92E7002803D017481E38341869 -:10C3A0008CE7EC6B8AE7002802D03400CB3485E7B9 -:10C3B0002C6983E7F8B50C000600F0F780FC00223A -:10C3C0000C23210030000092FFF701FF0504607884 -:10C3D000217800022D0C084340192070000A60707B -:10C3E00005F09DFD002821D06078227801021143DC -:10C3F00020000DE000A80080A904000038F800C06B -:10C400002015320083100000F51F0800BBF90D0055 -:10C41000203009180022300005F02FFE61782278C4 -:10C420000902114340182070000A60702800D1E50D -:10C43000F7B582B0002406000D002700F0F73FFC9E -:10C44000717A022907D1B022125C920700D5CC0183 -:10C450000122920314432300FF4A1343012913D1FD -:10C4600001008031096BA0300191002202740400A8 -:10C470000092049A29003000FFF7A9FE6B461A7952 -:10C480000104090C227407E0049A29003000009787 -:10C49000FFF79DFE0104090C68782A78000210431A -:10C4A00040182870000A687008008EE670B5040015 -:10C4B0000E001500FFF2BEFDA01D2A00310000F3A2 -:10C4C0002CEF1A3CE07E4019E076A81D70BD0100FB -:10C4D0005120012900D173207047FFB583B00C00B3 -:10C4E00000211F000C9E059A029111600028216016 -:10C4F00070D00500D9490422A81C05F00FFE0028C1 -:10C50000687805D1811C001FAD1D00910290A2E04A -:10C51000801C391A0F043F142D18002F7EDDA4E073 -:10C5200001952B78216801F314E913153F0B480F8F -:10C5300051193643563A1D222C27314C5B60650059 -:10C5400035602068042202E07560206810221043E4 -:10C5500020604FE0B56020680122F8E7F5602068B0 -:10C560004022F4E7012275612068D202EFE7012240 -:10C57000B56120681203EAE70122F56120689203A1 -:10C58000E5E70122356220685203E0E70122756287 -:10C590002068D203DBE7B56220688022D7E701225A -:10C5A000F56220689202D2E7356320680222CEE766 -:10C5B000FF2275632068521CC9E7B5632068082212 -:10C5C000C5E70122F56320681204C0E735642068DE -:10C5D0002022BCE729E00122756420685202B6E7F8 -:10C5E0000122356120685204B1E70122B564206858 -:10C5F0009204ACE701988278437810021843C01C7B -:10C600006B461A890004000C90421FD905980268F5 -:10C61000206848400243059802A900E028E0026033 -:10C620000198FFF24EFE050001D10020F7E50198C8 -:10C630006B46281A381A070418893F14002802D0BC -:10C64000002F00D06CE70020009009E06B461989AC -:10C650002D18081A02906B4618890028F2D100980C -:10C66000381A07043F14002F02DD002D00D041E7E7 -:10C670003000D4E5FEB50500002016001F0000299B -:10C680000290019002D02C00283406E0734A012168 -:10C6900028000423FFF2DCFD0400002C01D100205F -:10C6A000FEBD68782978000600140843611B401A13 -:10C6B0002030030408981D144C2100F3CAEE089A98 -:10C6C00000922B00200001AA02A9FFF706FF002E0E -:10C6D00001D002993160002FE2D001993960FEBD8E -:10C6E000F0B5ABB00D00309F14001E00F0F7E7FA74 -:10C6F00002202070002029006070062204B82A471A +:10C30000001D0004000C010A2070617021000C3136 +:10C31000289169782A780902114303D0A97809097C +:10C32000082902D100202BB0F0BD69782A780906CF +:10C3300009141143E127BF00082E279146D82799F9 +:10C340003A0008390E0428353614029200905F49ED +:10C35000289804222B00019600F3A4F807006078C7 +:10C36000217800020843C0190004000C010A207063 +:10C370006170E12200902898920002925449C019FD +:10C380002B000422019600F38DF839180B04617814 +:10C3900022780902114308180104090C080A2170C7 +:10C3A0006070009128981B0CC0184A4904222B0089 +:10C3B000019605F0F8FC617822780902114308180B +:10C3C0000004000C010A20706170ACE73F4A0121B3 +:10C3D00028000423FFF23CFF06003D4A012128000B +:10C3E0000423FFF235FF2A903A4A01212800042352 +:10C3F000FFF22EFF29902798711B401A203001046C +:10C40000607823780002E122184392000914029216 +:10C41000019100902D4928983300042200F342F83E +:10C420006178227809020700114308182070000A79 +:10C43000002E60707ED0A878000905287AD10020EF +:10C4400014AA0092020001000890280008ABFFF730 +:10C45000FDFE06000898800406D53300306A2033BC +:10C46000092205A9FFF2B3FF0898400705D53068F7 +:10C470003300052203A9FFF2AAFF30680079C00744 +:10C4800001D0112000E006206B4618713198D87257 +:10C4900005205871002098713298FFF704FE6B4612 +:10C4A00098725820D871187204205872289808225F +:10C4B000C01901A9FFF7E6FD61782278090211434E +:10C4C00009182170090A3818617005E060163200F9 +:10C4D00020153200187C020007043F0C002E3DD0CE +:10C4E000306800283AD00079C00737D00F2008AB59 +:10C4F0001871306A002804D0C11C0622D81D00F330 +:10C500000CEF28002030427B060029000BA82E31BA +:10C51000401C00F302EF707B08AB801D010A5871CC +:10C5200099716178227809021143E12292009142C7 +:10C5300014D800E012E0C01C02062898120EC019A0 +:10C5400009A9FFF79FFD61782278090211430918B4 +:10C550002170090A381807043F0C61702A98237863 +:10C56000411B2798E122401A203001046078920094 +:10C570000002184309146B4607C304222898CF49C8 +:10C580002A9BC019FFF28EFF39180B0461782278BC +:10C590000902114308180004000C010A20706170A0 +:10C5A00029991B0C002917D0299900904A1B27991B +:10C5B0002898891A20310A0412140192C018C0491F +:10C5C000299B042205F0EFFB6178227809021143D0 +:10C5D00008182070000A6070607821780002084313 +:10C5E000A1E610B5F0F75DFAC17CC907C90F491C77 +:10C5F000C17410BDAF21B348090110B500F328EF95 +:10C60000B14909200860002010BDF3B50020AFB08B +:10C6100007002E901A9019902F98F0F742FA1BAA53 +:10C6200006000092309800211AAA19ABFFF70EFEFF +:10C63000040005D02068002802D0206A002802D11A +:10C64000002031B0F0BD1999A04D890405D5230013 +:10C6500020332A0003A9FFF2BAFE1998400705D536 +:10C66000206823002A0001A9FFF2B1FE3500FF3542 +:10C6700033350FE0216A0622C91C681C05F02AFC2C +:10C68000002801D12800DCE728786D1C45197F1CA3 +:10C690003F063F0E707FB842ECD805F0F7FE1890C9 +:10C6A0005921280000F3FEEE20680622C078687346 +:10C6B0002E9F216A7F1CC91C681C00F32EEE309946 +:10C6C000BF1D06220C31E81D00F326EE216ABF1DB6 +:10C6D00088784B7802021A432800921F09310E30E5 +:10C6E00000F31AEE206ABF1F8178427808021043D7 +:10C6F000C1193000FF300E2221302970556696B4E2 :10C700000100000040BE01000004000072D105914C -:10C710000C31A01D00F30AEE607821780002084376 -:10C72000801D2070000A6070300AA670E070380A20 -:10C73000277160716078217800020843001D0004B1 -:10C74000000C010A2070617021000C312891697879 -:10C750002A780902114303D0A9780909082902D1CE -:10C7600000202BB0F0BD69782A780906091411431E -:10C77000E127BF00082E279146D827993A000839AB -:10C780000E04283536140292009039492898042264 -:10C790002B000196FFF290FE0700607821780002DE -:10C7A0000843C0190004000C010A20706170E122E6 -:10C7B00000902898920002922E49C0192B00042262 -:10C7C0000196FFF279FE39180B046178227809028C -:10C7D000114308180104090C080A217060700091C7 -:10C7E00028981B0CC018244904222B00019605F040 -:10C7F00008FC617822780902114308180004000C33 -:10C80000010A20706170ACE7194A01212800042355 -:10C81000FFF228FD0600174A012128000423FFF239 -:10C8200021FD2A90144A012128000423FFF21AFD59 -:10C8300029902798711B401A2030010460782378D2 -:10C840000002E12218439200091402920191009023 -:10C850000749289833000422FFF22EFE61782278DF -:10C860000902070011430818207007E004200000A7 -:10C870006016320020153200787B0200000A002E7C -:10C8800060707DD0A8780009052879D1002014AA0D -:10C890000092020001000890280008ABFFF7F4FEA8 -:10C8A00006000898800406D53300306A2033092238 -:10C8B00005A9FFF296FD0898400705D530683300BA -:10C8C000052203A9FFF28DFD30680079C00701D071 -:10C8D000112000E006206B4618713198D8720520AF -:10C8E0005871002098713298FFF7FBFD6B469872E3 -:10C8F0005820D87118720420587228980822C0193C -:10C9000001A9FFF7DDFD61782278090211430918BA -:10C9100038182170090A07043F0C002E61703DD0C1 -:10C92000306800283AD00079C00737D00F2008AB14 -:10C930001871306A002804D0C11C0622D81D00F3EB -:10C94000F6EC28002030427B060029000BA82E318F -:10C95000401C00F3ECEC707B08AB801D010A5871A1 -:10C9600099716178227809021143E1229200914283 -:10C9700014D8C01C02062898120EC01909A900E09C -:10C980000CE0FFF79DFD6178227809021143091838 -:10C990002170090A381807043F0C61702A9823781F -:10C9A000411B2798E122401A203001046078920050 -:10C9B0000002184309146B4607C304222898CE4985 -:10C9C0002A9BC019FFF278FD39180B046178227890 -:10C9D0000902114308180004000C010A207061705C -:10C9E00029991B0C002917D0299900904A1B2799D7 -:10C9F0002898891A20310A0412140192C018BF49DC -:10CA0000299B042205F0FDFA61782278090211437E -:10CA100008182070000A60706078217800020843CE -:10CA20009FE610B5F0F755F9C17CC907C90F491C3D -:10CA3000C17410BDAF21B248090110B500F312ED69 -:10CA4000B04909200860002010BDF3B50020AFB048 -:10CA500007002E901A9019902F98F0F73AF91BAA18 -:10CA600006000092309800211AAA19ABFFF70CFEBD -:10CA7000040005D02068002802D0206A002802D1D6 -:10CA8000002031B0F0BD19999F4D890405D52300D0 -:10CA900020332A0003A9FFF2A4FC1998400705D50A -:10CAA000206823002A0001A9FFF29BFC3500FF3516 -:10CAB00033350FE0216A0622C91C681C05F038FBDB -:10CAC000002801D12800DCE728786D1C45197F1C5F -:10CAD0003F063F0E707FB842ECD805F005FE189077 -:10CAE0005921280000F3E8EC20680622C07868731A -:10CAF0002E9F216A7F1CC91C681C00F318EC30991A -:10CB0000BF1D06220C31E81D00F310EC4D59862F95 +:10C71000C273028A491C51180182707F401C7077D5 +:10C72000307F401C3077189805F0BEFE2F98052109 +:10C73000FAF756FEB0E7F3B585B000250F000029E3 +:10C7400043D00598F0F7B7F90600FF302130049088 +:10C75000018A3878401C814237D30006000E34002D +:10C76000FF34333403900CE00622791C601C05F082 +:10C77000BBFB002808D02078641C04196D1C2D0612 +:10C780002D0E707FA842EFD805F08AFE0290707FD0 +:10C79000401EA84226DD2178601C0F181EE0387864 +:10C7A000401C0006000EBC42019004D0019A3900E2 +:10C7B000200000F3BCED601C09F0F2F8002807D05F +:10C7C00009F095F8416E002901D1002024E5446666 +:10C7D000019824183F186D1C2D062D0E707F401EE9 +:10C7E000A842DCDC0498018A0398081A049908829C +:10C7F000707F401E7077307F401E3077029805F0C2 +:10C8000053FE05980521FAF7EBFD012004E5002809 +:10C8100009D0017A032906D1407A0121022800D0EB +:10C820000021080070470020704710B50400032065 +:10C8300009F046F805E0417AA14204D00321EFF760 +:10C8400045FE0028F7D110BD10B50C000321EFF70D +:10C850003DFE002802D0417AA142F7D110BDF8B5C3 +:10C860000500007A032827D128008030C0681D4ABF +:10C870004468042360782178060227000E4320379D +:10C8800001212000FFF2EEFC002815D04178C21BE8 +:10C89000891C52186378B21A26781B0233435B1A3C +:10C8A00023701B0A002A637002D0411800F33EED8A +:10C8B00021002800FFF774FBF8BD1721490140183B +:10C8C0004078022801D10120704700207047000005 +:10C8D00020153200187C0200905401C044BC0200B4 +:10C8E000FFFFFFFF6016320070B50500F0F7E3F8B8 +:10C8F00004000120FAF75FFDA16810208143172092 +:10C900004001A1600321281801700221417000201C +:10C91000FAF7D2F870BD002803D01521890140181C +:10C92000006B7047FFB5100085B0FF220D000F9F10 +:10C930000E9E1C0091320E2B01D1E12292000300C9 +:10C9400003A904A8E9F785FA00281BD0109A0292DF +:10C95000039A009605982300103229000197FFF7EB +:10C96000B5FC0399020A88720028CA7204D004999F +:10C970000598E9F739FA02E0049801F335FA002046 +:10C9800009B0F0BD0120FBE7FEB5160000220192C0 +:10C990000093029233004922FFF7C4FFFEBD70B539 +:10C9A0008AB00D0009A8E9F7A9FE2800F0F783F87E +:10C9B0000400687A01283CD1172149010220691836 +:10C9C0000870E07F0121002804D0401E0006000E00 +:10C9D000E07719D1A07C6B4640084000A07420206D +:10C9E000988051200001211806220E0004A800F3AF +:10C9F00008ED02222800002301A9FFF7C5FF062148 +:10CA0000300000F330ED02E0A07C0843A074200069 +:10CA1000FFF781FF002805D0CA20015D0998002298 +:10CA20000BF0EAEA2800FFF75FFFA06810218843B7 +:10CA3000A0600AB070BD17235B01C01804220B0070 +:10CA400000B500F390EE0F0E090C0F1215181A1C0A +:10CA50002126282A2C2E0E000321027022E00270CB +:10CA6000427000BD052102701CE00621027019E031 +:10CA70000721027016E0082114E0092112E0417834 +:10CA80000129EED00A210DE041780129E9D00B21DE +:10CA900008E00C2106E00D2104E00E2102E00F2148 +:10CAA00000E01021417000BD70B50D00080088B095 +:10CAB000F0F701F80400C07F002804D0401E0006F3 +:10CAC000000EE07718D120206B461880512000011D +:10CAD000211806220E0003A800F392EC0822280079 +:10CAE00000236946FFF750FF0621300000F3BAEC3F +:10CAF000A07CF721084002E0A07C08210843A07434 +:10CB0000A06810218843A0602800FFF7BDAD494C04 :10CB1000010000003CC20100000400007028DD8715 -:10CB2000216ABF1D88784B7802021A432800921FA1 -:10CB300009310E3000F304EC206ABF1F817842787F -:10CB400008021043C1193000FF300E222130297035 -:10CB5000C273028A491C51180182707F401C707791 -:10CB6000307F401C3077189805F0CCFD2F980521B8 -:10CB7000FAF7C0FDB0E7F3B585B000250F00002936 -:10CB800043D00598F0F7AFF80600FF30213004904D -:10CB9000018A3878401C814237D30006000E3400E9 -:10CBA000FF34333403900CE00622791C601C05F03E -:10CBB000C9FA002808D02078641C04196D1C2D06C1 -:10CBC0002D0E707FA842EFD805F098FD0290707F7F -:10CBD000401EA84226DD2178601C0F181EE0387820 -:10CBE000401C0006000EBC42019004D0019A39009E -:10CBF000200000F3A6EB601C08F0DDFE002807D043 -:10CC000008F087FE416E002901D1002022E544662C -:10CC1000019824183F186D1C2D062D0E707F401EA4 -:10CC2000A842DCDC0498018A0398081A0499088257 -:10CC3000707F401E7077307F401E3077029805F07D -:10CC400061FD05980521FAF755FD012002E5002850 -:10CC500009D0017A032906D1407A0121022800D0A7 -:10CC60000021080070470020704710B50400032021 -:10CC700008F038FE05E0417AA14204D00321EFF725 -:10CC800083FD0028F7D110BD10B50C000321EFF78C -:10CC90007BFD002802D0417AA142F7D110BDF8B542 -:10CCA0000500007A032825D128008030806B1C4ABB -:10CCB0004468042360782178060227000E43203759 -:10CCC00001212000FFF2D8FA4178C21B891C5218BA -:10CCD0006378B21A26781B0233435B1A23701B0A4F -:10CCE000002A637002D0411800F32AEB21002800CB -:10CCF000FFF774FBF8BD032109024018407A0228AF -:10CD000001D101207047002070470000201532003B -:10CD1000787B0200405701C044BC0200FFFFFFFFC8 -:10CD20006016320070B50500EFF7DDFF040001204A -:10CD3000FAF7CCFCA16810208143A160032108020E -:10CD400028180172022141720020FAF775F870BDAF -:10CD5000002803D0152189014018006B7047FFB5EA -:10CD6000100085B0FF220D000F9F0E9E1C00913217 -:10CD70000E2B01D1E1229200030003A904A8E8F7D9 -:10CD800092FF00281BD0109A0292039A00960598F1 -:10CD90002300103229000197FFF7B6FC0399020A1D -:10CDA00088720028CA7204D004990598E8F746FFF3 -:10CDB00002E0049801F322F8002009B0F0BD012040 -:10CDC000FBE7FEB5160000220192009302923300A9 -:10CDD0004922FFF7C4FFFEBD70B58AB00D0009A857 -:10CDE000E9F7C2FD2800EFF77EFF0400687A01280A -:10CDF0003CD103210902022069180872E07F012159 -:10CE0000002804D0401E0006000EE07719D1A07C57 -:10CE10006B4640084000A0742020988051200001FB -:10CE2000211806220E0004A800F3F4EA02222800CA -:10CE3000002301A9FFF7C5FF0621300000F31CEB1A -:10CE400002E0A07C0843A0742000FFF781FF0028C7 -:10CE500005D0CA20015D099800220BF09EE8280049 -:10CE6000FFF760FFA06810218843A0600AB070BD82 -:10CE700003231B02C01804220B0000B500F37CEC56 -:10CE80000F0E090C0F1215181A1C2126282A2C2EF9 -:10CE90000E000321027222E00272427200BD0521DF -:10CEA00002721CE00621027219E00721027216E0EC -:10CEB000082114E0092112E0417A0129EED00A216B -:10CEC0000DE0417A0129E9D00B2108E00C2106E0B0 -:10CED0000D2104E00E2102E00F2100E0102141723B -:10CEE00000BD70B50D00080088B0EFF7FCFE04002F -:10CEF000C07F002804D0401E0006000EE07718D145 -:10CF000020206B46188051200001211806220E00B7 -:10CF100003A800F380EA082228000023C636401543 +:10CB2000EDFE08B070BD10B50C000800EFF7CDFFAA +:10CB30002000FFF7E3FE10BD10B50400EFF7C5FFBE +:10CB40000020FAF742FC1721490102206118087001 +:10CB50000020F9F7BBFF10BDF0B58BB001A80A911A +:10CB6000E9F7D6FD0A98EFF7B0FF817C0400EF20CB +:10CB70000140A1745121202009016B4661181881E0 +:10CB800006220D0005A800F346EC0A98172232236E +:10CB900002A9FFF703FF0621280000F36EEC0A98B4 +:10CBA000FFF7CAFF252149016018017DFF2903D045 +:10CBB000019800220BF02AEAFA4E0027B068401CC8 +:10CBC000B0600920C0012518A86B002805D0E9F73E +:10CBD00031FFAF63F068401CF060A06B002802D00A +:10CBE000EFF2A5FCA763002200922300EE4AEF4873 +:10CBF0000A993833EFF238FC0BB0F0BD080010B5DD +:10CC0000EFF763FF816820229143816010BD10B56A +:10CC1000EFF75BFF016C0400E54800290BD1072208 +:10CC20002018E4A100F38CEBE148C01D2018FFF2AE +:10CC300072FD092007E04022525C201800F380EBCF +:10CC4000206C403000781121801D89016118C87363 +:10CC5000000A0874A06804218843A06010BD10B5C4 +:10CC6000EFF733FF8068C006C00F10BD002806D064 +:10CC7000427A012A03D117225201801801707047AD +:10CC8000017A032901D10121F0E7704790420BD3CB +:10CC9000904207D80F2803D10F2A01D101207047F5 +:10CCA000002901D00320704702207047F3B500200F +:10CCB00083B002900398EFF708FF1321890146180B +:10CCC000F56A2927BD4A04007F01002D15D0E0191F +:10CCD000807A002811D028796B46187168795871CC +:10CCE000052000022018006B01020004000E014321 +:10CCF0000291187A2871587A687104990398FEF79E +:10CD0000D5FFF06A002808D0E019807A002804D006 +:10CD10006B46187928715879687105B0F0BD70B507 +:10CD20000C00EFF7D2FED821095A0300C91E0D04EA +:10CD30002D0CDD3313E04278002108E04618B67868 +:10CD4000A64201D1007870BD491C0904090C8A4231 +:10CD5000F4D8A81A801E05042D0C9B1CD3181800AB +:10CD6000002DE8D1512070BDFFB583B0160017002B +:10CD700002900804000C01900698002825D0002994 +:10CD800023D01FE00198029C05042D140FE00C9A9B +:10CD900000927B7861783E003A002000FEF7CDFFDC +:10CDA0006078A41C291A891E0D042D140419002D65 +:10CDB000EDDC70780699BF1C091A891E0904091454 +:10CDC000C719069106980028DCDC07B0F0BDF7B55E +:10CDD00082B0EFF77AFE0500039800289DD00398F3 +:10CDE000416925204001002902D10421281829E0A9 +:10CDF00028180190807C00288FD128000499D73012 +:10CE0000FFF274F9049A2C00C0340092208BC01EEB +:10CE1000030403981B1440698178427809060914B9 +:10CE20001143C91E09042A000914801DDD32FFF7D1 +:10CE30009BFF04988178427808021043052803D8A4 +:10CE400001980721817468E70021C01E8C468E4638 +:10CE5000049905042D0C8B1D1FE04A78002014E076 +:10CE6000039E3669002E06D00F18BF78F679B742B8 +:10CE700001D10126B6460E18B678A77CBE4201D174 +:10CE80000126B446401C0004000C8242E8D8A81ACF +:10CE9000801E05042D0C9B1CD3181900002DDCD11D +:10CEA0007046012803D103980069C07908E0604604 +:10CEB000012803D10198A17C01772EE70498007A1C +:10CEC00001990877A07428E7F8B50D00FF210091BB +:10CED000EFF7FBFD69782A78090609141143083930 +:10CEE00004000B042800364928301B140422FFF2EA +:10CEF0003BFC0521090261180A6B25256D01012AF9 +:10CF000005D0052A03D0042A01D0022006E02921F9 +:10CF100049016118898A002903D10120CAC04258F9 :10CF20000100000038C601000004000023F20EEBEF -:10CF30006946FFF750FF0621300000F3A8EAA07C05 -:10CF4000F721084002E0A07C08210843A074A068F3 -:10CF500010218843A0602800FFF7EEFE08B070BDE6 -:10CF6000F0B50E00080089B0EFF7C7FE817C040021 -:10CF7000EF200140A1745121202009016B46611866 -:10CF8000988006220D0004A800F34EEA1722300014 -:10CF9000322301A9FFF71FFF0621280000F376EADC -:10CFA000FF4F0921B868C901401C6518B860A86B1B -:10CFB000002806D0E9F785FE0020A863F868401C29 -:10CFC000F860A06810218843A0603000FFF7B4FE2D -:10CFD000FDE6080010B5EFF790FE8168202291432E -:10CFE000816010BD10B5EFF788FEC16B0400ED48FD -:10CFF00000290BD107222018EBA100F3ACE9E94886 -:10D00000C01D2018FFF291FB092007E04022525C6E -:10D01000201800F3A0E9E06B403000781121801D5A -:10D0200089016118C873000A0874A0680421884344 -:10D03000A06010BD10B5EFF760FE8068C006C00F9D -:10D0400010BD002806D0427A012A03D10322120221 -:10D05000801801727047017A032901D10121F0E79C -:10D06000704790420BD3904207D80F2803D10F2A64 -:10D0700001D101207047002901D003207047022010 -:10D080007047F3B5002083B002900398EFF735FEA8 -:10D09000132189014618F56A2927C54A04007F0132 -:10D0A000002D15D0E019807A002811D028796B4620 -:10D0B000187168795871052000022018006B010270 -:10D0C0000004000E01430291187A2871587A6871A1 -:10D0D00004990398FFF708F8F06A002808D0E019CF -:10D0E000807A002804D06B461879287158796871C5 -:10D0F00005B0F0BD70B50C00EFF7FFFDD821095A5F -:10D100000300C91E0D042D0CDD3313E0427800210D -:10D1100008E04618B678A64201D1007870BD491CD7 -:10D120000904090C8A42F4D8A81A801E05042D0CA3 -:10D130009B1CD3181800002DE8D1512070BDFFB5FD -:10D1400083B01600170002900804000C01900698A6 -:10D15000002825D0002923D01FE00198029C050457 -:10D160002D140FE00C9A00927B7861783E003A0013 -:10D170002000FFF700F86078A41C291A891E0D040E -:10D180002D140419002DEDDC70780699BF1C091AC6 -:10D19000891E09040914C719069106980028DCDCC9 -:10D1A00007B0F0BDF7B582B0EFF7A7FD0500039813 -:10D1B00000289DD00398416925204001002902D113 -:10D1C0000421281829E028180190807C00288FD19C -:10D1D00028000499D730FEF293FF049A2C00C03443 -:10D1E0000092208BC01E030403981B1440698178B1 -:10D1F0004278090609141143C91E09042A000914BA -:10D20000801DDD32FFF79BFF049881784278080289 -:10D210001043052803D801980721817468E700218D -:10D22000C01E8C468E46049905042D0C8B1D1FE0F4 -:10D230004A78002014E0039E3669002E06D00F18AD -:10D24000BF78F679B74201D10126B6460E18B678F6 -:10D25000A77CBE4201D10126B446401C0004000C4C -:10D260008242E8D8A81A801E05042D0C9B1CD318F6 -:10D270001900002DDCD17046012803D10398006904 -:10D28000C07908E06046012803D10198A17C0177AC -:10D290002EE70498007A01990877A07428E7F8B57A -:10D2A0000D00FF210091EFF728FD69782A78090623 -:10D2B00009141143083904000B0428003D492830A3 -:10D2C0001B140422FFF25AFA0521090261180A6BA5 -:10D2D00025256D01012A05D0052A03D0042A01D095 -:10D2E000022006E0292149016118898A002903D119 -:10D2F000012061198874F8BD0028F1D041782E4FC3 -:10D30000801D1EE0437806781B0233431E021B0A71 -:10D310001E433304BB4205D101796B461970407935 -:10D32000587010E0C678837836021E43067E107C63 +:10CF300061198874F8BD0028F1D04178264F801D12 +:10CF40001EE0437806781B0233431E021B0A1E4371 +:10CF50003304BB4205D101796B4619704079587092 +:10CF600010E0C678837836021E433302360A334314 +:10CF7000C91A091F1B0409041B0C09141818001DE9 +:10CF80000029DED1009800990002090A0843000434 +:10CF9000000C0528009002D1012AC0D1F8BD0098EC +:10CFA000012802D1052ABAD1F8BD00980428FBD186 +:10CFB000042AB4D1F8BD000058FA00C0A0860100D0 +:10CFC00043C20100570400004449524543542D0018 +:10CFD000010800002015320000001210FFB5E7B074 +:10CFE000002427004F944E9467981F941E941D941C +:10CFF000EFF775FD29225201042186180500B1754D +:10D00000707FFD21084070776898002808D052AAE8 +:10D010000092689801211FAA1EABFFF735F90400A2 +:10D020006A98022807D11F98C107FF487ED0A168DF +:10D03000C97800297AD11E98C00605D56068231DDD +:10D0400004221CA9FFF2E1F91E98800306D52300F3 +:10D050002069103308221AA9FFF2D7F91E9800059B +:10D0600006D5230060691433582204A9FFF2CDF9D4 +:10D070001E98C00706D02300A0680833042203A925 +:10D08000FFF2C3F92521490100206F18B87401206F +:10D090003882002008F028FC2190022008F024FCAF +:10D0A00020902198002822D02198C068C0041ED565 +:10D0B00002A901A80AF0C8EF2800D73038A9FFF26A +:10D0C0001FF8029801066798090EFFF732FE38AB89 +:10D0D0009871029818720120D871987859780002D6 +:10D0E0000843C01C5870000A987001201D906A986F +:10D0F000002800D152AC2098E9F7DDFD012802D0CC +:10D100001D98002822D0679808F005FC290002909D +:10D11000CB31112050AAFFF204F80298417A6798A7 +:10D12000FFF707FE50AB9871029800E0E8E1407A03 +:10D13000D8719878597800020843801C5870000A0A +:10D14000987050A82061012040044E90582122A8D8 +:10D1500000F39CE969986A9920300029669017D1FC +:10D160006798FFF75CFA2800C030817DEA7C4908A7 +:10D17000D2074900D20F114381751D98002806D0AF +:10D1800038A860614E980121C90208434E9073E1AE +:10D1900068996798FFF7A2FE6A98012817D1002CBA +:10D1A0002FD0206C002810D0606900280DD0206896 +:10D1B00000280AD0E068002807D0606C002804D05E +:10D1C000206A002801D0206916E004206FE06A98E8 +:10D1D000022816D1002C14D0206C0028F5D06069EC +:10D1E0000028F2D0A0680028EFD020680028ECD0FA +:10D1F000606C0028E9D0206A0028E6D0606800282A +:10D20000E3D0B87C002867D12800D73022A9FEF2ED +:10D2100077FF1D9822AA0028009215D038AB987885 +:10D220005978000600140843C01E030460691B14EB +:10D2300081784278090609141143C91E09040914AA +:10D24000801D39AA921C10E0D820405BC01E030448 +:10D2500060691B1481784278090609141143C91EBC +:10D2600009042A000914801DDD32FFF787FD20AB79 +:10D27000987A597A00020843052801D8072016E059 +:10D28000B87C002828D1002C13D06068002810D06A +:10D29000D621495DC0784A08C107C90F4008FFF789 +:10D2A000FFFC0006000E0128B07505D10920B874F6 +:10D2B00012E00420B07588E7042886D003280BD13B +:10D2C000616A002908D088784B78020257481A43CF +:10D2D000D21C281800F33EE8707FFD210840216829 +:10D2E000062209798907C90F4900084370774F481A +:10D2F000216AF9302818C91C659000F32CE8B07D2C +:10D30000032828D1072053210901B0770620691886 +:10D31000C873002008744548616CF330C91C0622AC +:10D32000281800F318E86A98022814D1FC7B667369 :10D330000100000034CA010000040000D79D7B5F9B -:10D340003302360A3343C91A091F1B0409041B0C94 -:10D3500009141818001D0029DED100980099000258 -:10D36000090A08430004000C0528009002D1012A94 -:10D37000C0D1F8BD0098012802D1052ABAD1F8BD64 -:10D3800000980428FBD1042AB4D1F8BDFFB5E7B05A -:10D39000002427004F944E9467981F941E941D9468 -:10D3A000EFF7B5FC29220500042152018618B1755A -:10D3B000707F0DE024F800C0570400004449524536 -:10D3C00043542D0001080000201532000000121007 -:10D3D000FD21084070776898002808D052AA009272 -:10D3E000689801211FAA1EABFFF76CF904006A9828 -:10D3F000022807D11F98C107FF487ED0A168C978CD -:10D4000000297AD11E98C00605D56068231D042224 -:10D410001CA9FFF204F81E98800306D5230020699A -:10D42000103308221AA9FEF2FAFF1E98000506D54D -:10D43000230060691433582204A9FEF2F0FF1E98FD -:10D44000C00706D02300A0680833042203A9FEF217 -:10D45000E6FF2521490100206F18B87401203882A9 -:10D46000002008F053FA2190022008F04FFA209093 -:10D470002198002822D02198C068C0041ED502A996 -:10D4800001A80AF0B2ED2800D73038A9FEF242FE1A -:10D49000029801066798090EFFF736FE38AB9871BF -:10D4A000029818720120D8719878597800020843C0 -:10D4B000C01C5870000A987001201D906A980028BE -:10D4C00000D152AC2098E9F73DFD012802D01D980B -:10D4D000002822D0679808F030FA29000290CB315A -:10D4E000112050AAFEF227FE0298417A6798FFF7B2 -:10D4F0000BFE50AB9871029800E0E8E1407AD871D9 -:10D500009878597800020843801C5870000A987077 -:10D5100050A82061012040044E90582122A8FFF21B -:10D52000C0EF69986A9920300029669017D16798F2 -:10D53000FFF795FA2800C030817DEA7C4908D207C0 -:10D540004900D20F114381751D98002806D038A8D4 -:10D5500060614E980121C90208434E9073E16899B9 -:10D560006798FFF7A6FE6A98012817D1002C2FD0E4 -:10D57000206C002810D0606900280DD02068002899 -:10D580000AD0E068002807D0606C002804D0206A28 -:10D59000002801D0206916E004206FE06A98022874 -:10D5A00016D1002C14D0206C0028F5D0606900281A -:10D5B000F2D0A0680028EFD020680028ECD0606C82 -:10D5C0000028E9D0206A0028E6D060680028E3D06F -:10D5D000B87C002867D12800D73022A9FEF29AFD36 -:10D5E0001D9822AA0028009215D038AB9878597857 -:10D5F000000600140843C01E030460691B148178F0 -:10D600004278090609141143C91E09040914801D32 -:10D6100039AA921C10E0D820405BC01E0304606948 -:10D620001B1481784278090609141143C91E0904A4 -:10D630002A000914801DDD32FFF78BFD20AB987A9C -:10D64000597A00020843052801D8072016E0B87C63 -:10D65000002828D1002C13D06068002810D0D621D3 -:10D66000495DC0784A08C107C90F4008FFF703FDAC -:10D670000006000E0128B07505D10920B87412E02B -:10D680000420B07588E7042886D003280BD1616A8E -:10D69000002908D088784B78020258481A43D21CD7 -:10D6A0002818FFF262EE707FFD21084021680622F3 -:10D6B00009798907C90F4900084370774F48216AE3 -:10D6C000F9302818C91C6590FFF24EEEB07D032892 -:10D6D00028D1072053210901B07706206918C873A3 -:10D6E000002008744548616CF330C91C06222818D4 -:10D6F000FFF23AEE6A98022814D1606A8178437882 -:10D700000A0201003D481A43FF30921F09312818D0 -:10D71000FFF22AEE606A0021827843781002659A4F -:10D7200018438154002C0FD0616800290CD06A98EE -:10D73000012809D12800C030827DC978E3343267DE +:10D34000606A817843780A0201003D481A43FF3041 +:10D35000921F0931281800F308E8606A00218278DA +:10D3600043781002659A18438154002C0FD06168ED +:10D3700000290CD06A98012809D12800C030827D8C +:10D38000C9785208012352008B431A43827568986A +:10D3900066992030C079C871B87C002812D11D98D8 +:10D3A00000280FD020ABD87B002803D0187CD221D6 +:10D3B0003877485522A860614E980121C902084378 +:10D3C0004E9007E0B07D022804D16798210022AA80 +:10D3D000FFF711FDB87C002802D00120B07524E0D1 +:10D3E000B07D022821D12900CB31112050AAFEF2B4 +:10D3F000A2FE397F6798FFF7A6FC50AB9871387F83 +:10D40000D8719878597800020843801C5870000A37 +:10D41000987050A8206122A860614E984121C902ED +:10D4200008434E906798FFF706FC6A990120C003F5 +:10D43000022912D1B17D032906D103E0FFFFFFFFCE +:10D440004E04000022A961614121C9024E91B17DC3 +:10D45000022900D00020052125E06A98012812D178 +:10D46000FF484F90B07D02280BD04E98800301D426 +:10D47000FC484F904E98000517D401214F98C902DF +:10D4800011E0F94810E06A9800280ED1F7484F9053 +:10D490004E98000501D4F6484F904E98800304D46E +:10D4A0004F980121490408434F904E9A00924F9B98 +:10D4B000699967982200FEF79EFC01046998090C9F +:10D4C0004278037810021843401869990870000ADE +:10D4D00048706A98022803D069996798FFF7FAFBA9 +:10D4E00004F021FC002814D06998417802780802E1 +:10D4F0006699104341186798012204F0C2FC6999AB +:10D500004A780B7811021943401869990870000A8B +:10D51000487000206BB0F0BDFFB589B00600D5A003 +:10D5200003C80690129F0020039030000791EFF788 +:10D53000E0FAFF21029091313000E9F7E4F90500AB +:10D5400003D10020C0430DB0F0BD707A02280DD188 +:10D550000B9808F043FA040008D0200008F0BEF948 +:10D56000200008F0E2F96030007803906E612889AD +:10D57000441904D1C1490868401C0860E1E705204E +:10D58000C0013018032F089006D102990622BD3140 +:10D5900004A8FFF2EAEE04E00898C16C806C0591E3 +:10D5A0000490707A012811D13B0000F3FAE80906D3 +:10D5B000090606090609060923000B99062216E04A +:10D5C0000898C16C806C0791069013E07E360228A3 +:10D5D00009D10398032808D002990622BD3104A876 +:10D5E000FFF2C2EE01E0032804D10622310006A8B2 +:10D5F000FFF2BAEE06AA00920B9A28000D2304A9A6 +:10D60000E9F7D6F9AC2028810C98092811D1260019 +:10D610000420203630700920707099490422B01C13 +:10D62000FFF2A2EEB771607821780002084308305B +:10D6300012E00C987F2812D12600203630709049D5 +:10D640000322701CFFF290EE092030717771607830 +:10D65000217800020843C01D2070000A60700A98FB +:10D66000056000206FE7FEB5070001A8E9F764F840 +:10D670003800EFF73EFA0400172040013D18042659 +:10D6800038002E700AF0BAED252149016018017D9D +:10D69000FF2903D0019800220AF0CCECA0681021E9 +:10D6A0000843A060022028700020F9F723FA002226 +:10D6B00051202E700001009222183800092302A97F +:10D6C000FFF72AFF0025ED43002813D102980189B6 +:10D6D0000E180021320038000B00FFF789FC2920CA +:10D6E00040012018407A2036F0710298E9F7B6F927 +:10D6F000002801D02800FEBDA06A002803D0EEF269 +:10D700002AFF0020A0620022230000925D4A5E48AA +:10D7100028333900EEF2BCFE01213800FFF7A9F9E9 +:10D720000020FEBDF0B505000020A5B006900590D4 +:10D73000AF2080000E00002D04907ED097315B85D5 :10D740000100000030CE0100000400008447A8332F -:10D750005208012352008B431A43827568986699D8 -:10D760002030C079C871B87C002812D11D980028DB -:10D770000FD020ABD87B002803D0187CD22138777B -:10D78000485522A860614E980121C90208434E9075 -:10D7900007E0B07D022804D16798210022AAFFF794 -:10D7A00015FDB87C002802D00120B07524E0B07DC2 -:10D7B000022821D12900CB31112050AAFEF2C5FC4C -:10D7C000397F6798FFF7AAFC50AB9871387FD87102 -:10D7D0009878597800020843801C5870000A9870A5 -:10D7E00050A8206122A860614E984121C9020843D7 -:10D7F0004E906798FFF70AFC6A990120C00302293E -:10D8000012D1B17D032906D122A903E0FFFFFFFF5A -:10D810004E04000061614121C9024E91B17D02298F -:10D8200000D00020052125E06A98012812D1FF4888 -:10D830004F90B07D02280BD04E98800301D4FC4855 -:10D840004F904E98000517D401214F98C90211E05E -:10D85000F84810E06A9800280ED1F7484F904E988B -:10D86000000501D4F5484F904E98800304D44F989A -:10D870000121490408434F904E9A00924F9B6999A9 -:10D8800067982200FEF7D5FC01046998090C4278DC -:10D89000037810021843401869990870000A48700C -:10D8A0006A98022803D069996798FFF7FEFB04F095 -:10D8B00068FB002814D069984178027808026699BC -:10D8C000104341186798012204F009FC69994A78CD -:10D8D0000B7811021943401869990870000A4870C2 -:10D8E00000206BB0F0BDFFB589B00600D4A003C81E -:10D8F0000690129F0020039030000791EFF711FA75 -:10D90000FF21029091313000E9F743F9050003D17E -:10D910000020C0430DB0F0BD707A02280DD10B98E5 -:10D9200008F067F8040008D0200007F0E9FF2000A5 -:10D9300008F00DF86030007803906E612889441972 -:10D9400004D1C1490868401C0860E1E70520C00116 -:10D950003018032F089006D102990622BD3104A881 -:10D96000FFF20CED04E00898016FC06E0591049081 -:10D97000707A012811D13B00FFF21CEF090609065D -:10D9800006090609060923000B99062216E00898E5 -:10D99000016FC06E0791069013E0A236022809D1EC -:10D9A0000398032808D002990622BD3104A8FFF28B -:10D9B000E6EC01E0032804D10622310006A8FFF2BC -:10D9C000DEEC06AA00920B9A28000D2304A9E9F7C1 -:10D9D00035F9AC2028810C98092811D126000420A3 -:10D9E000203630700920707098490422B01CFFF274 -:10D9F000C6ECB7716078217800020843083012E065 -:10DA00000C987F2812D12600203630708F490322CF -:10DA1000701CFFF2B4EC09203071777160782178C6 -:10DA200000020843C01D2070000A60700A9805605B -:10DA300000206FE7FEB5070001A8E8F7B3FF380044 -:10DA4000EFF76FF90400032000023D1804263800A8 -:10DA50002E720AF0A4EB252149016018017DFF29EF -:10DA600003D0019800220AF0B6EAA068102108430A -:10DA7000A060022028720020F9F7FCF90022512052 -:10DA80002E720001009222183800092302A9FFF724 -:10DA90002AFF0025ED43002813D1029801890E18B2 -:10DAA0000021320038000B00FFF77AFC29204001EA -:10DAB0002018407A2036F0710298E9F716F900280C -:10DAC00001D02800FEBDA06A002803D0EEF24DFD73 -:10DAD0000020A0620022230000925D4A5D482833A6 -:10DAE0003900EEF2DFFC01213800FFF7DFF90020FA -:10DAF000FEBDF0B505000020A5B006900590AF2052 -:10DB000080000E00002D04907ED02800EFF709F968 -:10DB100004000320000228182490007A022873D100 -:10DB2000707831780202370020370A43012138002B -:10DB3000F2F77AFE0C907078317802020A433221B3 -:10DB40003800F2F771FE0B900C9800280F182BED9F +:10D750002800EFF7D8F9040017204001281824907A +:10D760000078022873D170783178020237002037B0 +:10D770000A4301213800F2F761FF0C90707831788C +:10D7800002020A4332213800F2F758FF0B900C983E +:10D79000002806D00C984178801CF8F2FAFD002889 +:10D7A00009D10B98002852D00B984178801CF8F2D0 +:10D7B000F0FD00284BD00EAA00920021300006AAEE +:10D7C00005ABFEF775FD31002190687A0C31012818 +:10D7D00023914ED12198002839D0E8F7ADFFCA2116 +:10D7E000095D884233D10598000707D52198219B10 +:10D7F000806B3833092207A9FEF21BFE2198806B4B +:10D80000002807D02100C01C0622BD3104F094FB83 +:10D8100000281CD1300022490622123004F08CFB73 +:10D82000002814D11E490622B01D04F085FB0028F3 +:10D8300007D021000622BD31B01D04F07DFB002879 +:10D8400005D1002008F064F80390022000E093E086 +:10D8500008F05EF80399002903D00399C968C90448 +:10D8600003D4E9F73CFA002824D007220D49B81C5C +:10D870001AE041E0352200003522020035A2000006 +:10D8800074230000742B0000FFFFFFFFFFFF000068 +:10D8900058FA00C060163200000E2707CFC0010002 +:10D8A00050FA00C0D0C6010004F046FB00280BD09F +:10D8B000787807E0787800285ED0CF490722B81C36 +:10D8C00004F03AFB002857D1A07CC0070FD05120AC +:10D8D000000121182398062204F02EFB002806D10F +:10D8E000A07C40084000A0742800FFF7C6FE2498E2 +:10D8F0000078042840D030E0022801D003282CD141 +:10D90000280007F0F5FF02902000FFF72CF8002810 +:10D910000AD0687A022807D1E8F70EFF25214901CD +:10D920006118097F884227D17878002812D0B2493F +:10D930000722B81C04F000FB00280BD002980299C3 +:10D94000FF30E130827BFF31CF31B81C04F0F4FAB4 +:10D95000002811D14B200001049004992800E8F719 +:10D96000DCFFA64900280D9003D00D9802891718F6 +:10D9700004D10868401C086025B0F0BD0D982A004D +:10D98000456159207E32C00029180092239A0D98D3 +:10D990000523E9F717F80D98AC2101810D989849F6 +:10D9A000C180280080308069AC300A9041780078CE +:10D9B0000A0202430A9801003800203020312290E8 +:10D9C000FFF2DCEC0A9842780178100208433870C4 +:10D9D000000A78702198002811D18AA0006802906E +:10D9E00005E0437802000C213800F9F239F80121F2 +:10D9F0003800042302AAFEF25DFC0028F1D124982D +:10DA00000078022801D003280AD1687A012807D1BA +:10DA10002298FD21807A40084000084022998872AF +:10DA2000219800281FD02000FEF79DFF002804D079 +:10DA3000219A39002800FEF70AFB04F07EF900283D +:10DA400011D07878397800020843229900224118D1 +:10DA5000280004F020FA79783A7809021143401836 +:10DA60003870000A78700D9928000AF00AEB0D98BA +:10DA7000E8F7FEFF002800D07EE7A0684006FBD54F +:10DA8000687A0128F8D1002200920192029249227C +:10DA9000310028000E23FEF76DFF6DE710B5EFF79C +:10DAA00032F880680007C00F10BD10B50024E443B1 +:10DAB000002805D1032007F02BFF002805D102E044 +:10DAC000017A032901D0200010BDEFF71CF8FEF702 +:10DAD0004AFF002010BDF8B50D000700EFF713F85E +:10DAE000A87800260009F6430D281AD11720400116 +:10DAF00038180078042814D0032812D02C002034C1 +:10DB00002078042803D07F280DD17F2203E060789D +:10DB1000092808D1092229003800FFF7C6FF401C58 +:10DB200001D13000F8BD0020F8BD70B50E00050031 +:10DB3000203630780C0004280AD0092808D07F2825 +:10DB400004D17F2221002800FFF7AFFF66EFD34CFE :10DB5000010000002CD20100000400003B828D80F7 -:10DB600006D00C984178801CF8F21DFC002809D1E1 -:10DB70000B98002852D00B984178801CF8F213FCC7 -:10DB800000284BD00EAA00920021300006AA05AB57 -:10DB9000FEF7ACFD31002190687A0C310128239109 -:10DBA00068D12198002839D0E8F7FCFECA21095D28 -:10DBB000884233D10598000707D52198219B806BB7 -:10DBC0003833092207A9FEF23EFC2198806B002819 -:10DBD00007D02100C01C0622BD3104F0DBFA00286A -:10DBE0001CD1300021490622123004F0D3FA00285B -:10DBF00014D11E490622B01D04F0CCFA002807D02B -:10DC000021000622BD31B01D04F0C4FA002805D160 -:10DC1000002007F08FFE0390022000E089E007F06B -:10DC200089FE0399002903D00399C968C90403D464 -:10DC3000E9F79CF9002824D007220D49B81C1AE006 -:10DC4000352200003522020035A2000074230000B6 -:10DC5000742B0000FFFFFFFFFFFF000024F800C04F -:10DC600060163200000E2707F5C401001CF800C042 -:10DC7000B0CA010027E004F08DFA00280BD07878B4 -:10DC800007E07878002854D0AE490722B81C04F089 -:10DC900081FA00284DD1A07CC0070FD0512000018F -:10DCA00021182398062204F075FA002806D1A07CDA -:10DCB00040084000A0742800FFF7C6FE2498007AB0 -:10DCC000042836D026E0022824D1280007F022FEBE -:10DCD0000290E8F767FE252149016118097F884213 -:10DCE00027D17878002812D096490722B81C04F072 -:10DCF00051FA00280BD002980299FF30E130827B64 -:10DD0000FF31CF31B81C04F045FA002811D14B2067 -:10DD10000001049004992800E8F745FF8A4900288B -:10DD20000D9003D00D980289171804D10868401C83 -:10DD3000086025B0F0BD0D982A004561BB20A232D5 -:10DD4000800029180092239A0D980523E8F780FF98 -:10DD50000D98AC2101810D997C48C8802800C03005 -:10DD60004068AC300A90417800780A0202430A9871 -:10DD700001003800203020312290FFF20AEB0A988F -:10DD800041780278080210433870000A78702198B0 -:10DD9000002811D16EA00068029005E043780200CF -:10DDA0000C213800F8F266FE01213800042302AA93 -:10DDB000FEF28AFA0028F1D12498007A022801D0D4 -:10DDC00003280AD1687A012807D12298FD21807A98 -:10DDD00040084000084022998872219800281FD0EE -:10DDE0002000FEF7DDFF002804D0219A390028002A -:10DDF000FEF75AFB04F0CFF8002811D07878397874 -:10DE000000020843229900224118280004F071F909 -:10DE100079783A780902114340183870000A78700E -:10DE20000D9928000AF0FCE80D98E8F768FF002833 -:10DE300000D07EE7A0684006FBD5687A0128F8D1BB -:10DE400000220092019202924922310028000E2302 -:10DE5000FEF7ADFF6DE710B50400EEF76CFF002094 -:10DE6000F9F75CFC03210902022061180872002006 -:10DE7000F9F70AF810BD10B5EEF75DFF80680007EE -:10DE8000C00F10BD10B50024E443002805D10320C5 -:10DE900007F050FD002805D102E0017A032901D0E6 -:10DEA000200010BDEEF747FFFEF77AFF002010BDFF -:10DEB00010B58A7800241209E4430D2A17D10322F1 -:10DEC00012028218127A042A11D0032A0FD00A00F3 -:10DED00020321378042B03D07F2B0AD17F2202E05B -:10DEE0005278092A05D1FFF7CDFF401C01D120004F -:10DEF00010BD002010BD70B50E0005002036307832 -:10DF00000C0004280AD0092808D07F2804D17F22D9 -:10DF100021002800FFF7B6FF012070BD0922210073 -:10DF20002800FFF7AFFF70780A2805D00B2803D030 -:10DF30000C2801D00D28EFD121002800FFF7B8FFF1 -:10DF4000EAE77047B0CA010024F800C0EEEE000016 -:10DF5000506F9A09F8B50320002637003FE71DBA35 +:10DB6000012070BD092221002800FFF7A8FF70786E +:10DB70000A2805D00B2803D00C2801D00D28EFD19E +:10DB800021002800FFF7B1FFEAE77047FEB5040067 +:10DB90000D00089F1E0000281AD0207A032817D1F4 +:10DBA000607A002814D02000EEF7B7FFFEF7E5FEFC +:10DBB00000280DD02800FEF2C5FD002808D0002066 +:10DBC0006B46C1C34922290020000E23FEF7DCFE6C +:10DBD000FEBD10B5040016D0207A032813D1200012 +:10DBE000EEF79BFF1721490161180978012908D038 +:10DBF000032906D0617A032903D0FEF7BEFE002870 +:10DC000001D1012010BD002010BD0000D0C60100D0 +:10DC100058FA00C0EEEE0000506F9A09F8B50320E4 +:10DC20000026370007F07EFE09E02800EEF775FFBA +:10DC3000817F890706D103212800EEF779FC0500D2 +:10DC4000F3D1F8BD002DFCD0817F8A0702D580304A +:10DC5000C76803E0C90701D08030C76900241820D5 +:10DC60006043FF490A5C002A12D040180090001D52 +:10DC700007F0C8FE0B218901401840698068A8425E +:10DC800006D10098C1780120884030430604360C44 +:10DC9000641C042CE3D3002ED3D0002F03D030001B +:10DCA000E4F70CF9F8BD3000E4F7EFF8F8BDF3B590 +:10DCB00081B00F000198EEF730FF060080300400BD +:10DCC0008068EEF25CFC0025A560E5602561656179 +:10DCD000A069EEF254FCA561E56125626562A5626A +:10DCE000FFF79CFFB7770198407A032804D13000F2 +:10DCF0001F216630FFF212ECFEBD10B50C000800CB +:10DD000000F005F801212000E9F778FD10BDF1B51C +:10DD100084B00B2104988901401846690498EEF7F5 +:10DD2000FCFE040005008034A069EEF228FC00200F +:10DD3000A061A87FC00744D0E0690190F4F2F4FB31 +:10DD400003910290326A736A801AB2699941F36949 +:10DD500080186A277A5D59415206D70B4036B2893E +:10DD6000002396023200FFF2F2E83800C8388242FF +:10DD700004D20020BE1AC83EE06102E00120B61ABB +:10DD8000E061029A039B0021B01859416162206250 +:10DD9000E169019881420BD0B24902220868104320 +:10DDA0000860B148012100680722490405F04AFAD9 +:10DDB00000222B000092AD48049998333200EEF215 +:10DDC0007BFB05B0F0BD10B50C00080000F005F8B5 +:10DDD00001212000E9F712FD10BDF1B58EB00B2036 +:10DDE0000E998001081840690C9000200A90069056 +:10DDF0000E98EEF792FE040007008034A068EEF261 +:10DE0000BEFB0020A060B87F800771D5E068059058 +:10DE1000F4F28AFB02900C980391436A026A02981A +:10DE20003D006635861A0C9899418269C369B61817 +:10DE3000594138007430FFF2EEEB00223100160039 +:10DE40000B920122D207814209D3081A904202D2D2 +:10DE5000012104910DE00021464204910AE0401A9C +:10DE6000904203D200210600049103E001214042C8 +:10DE700004910B9028000A30FFF2CCEB0990A81D0A +:10DE8000FFF2C8EB0890687907900498002807D043 +:10DE900009990B98FFF2CCEF069009980A91461A5F +:10DEA0000499012000291DD00799FF2911D0069A55 +:10DEB00007998A420DD30026E660B87FFD2108400D +:10DEC000B877022068700D21681DAE70FFF226EB56 +:10DED0001BE0089A0A99914204D2E06008990A98D6 +:10DEE0000E1A12E0C82E04D8E060089886190CE0DB +:10DEF0002DE0E168002905D00C992031097A00292C +:10DF000000D0A0620020C83EE060029A039B00217E +:10DF1000B01859416161002E206108D000223B00F9 +:10DF2000009253480E9988333200EEF2C5FAE16848 +:10DF3000059881420BD04B490222086810430860C3 +:10DF40004948012100680722490405F07BF90FB018 +:10DF5000F0BDF0B59FB0070000201690950DA8F415 :10DF60000100000028D601000004000068585EECA3 -:10DF700007F0EAFC09E02800EEF7E7FE817F890759 -:10DF800006D103212800EEF731FC0500F3D1F8BDDE -:10DF9000002DFCD0817F8A0702D58030876803E09E -:10DFA000C90701D08030C769002418206043F949AF -:10DFB0000A5C002A12D040180090001D07F02DFDC9 -:10DFC0000B2189014018806B8068A84206D1009817 -:10DFD000C1780120884030430604360C641C042CB0 -:10DFE000E3D3002ED3D0002F03D03000E3F77BFE25 -:10DFF000F8BD3000E3F75FFEF8BDF3B581B00F0068 -:10E000000198EEF7A2FE0600803004004068EEF2B0 -:10E01000C0FA00256560A56025616561A069EEF222 -:10E02000B8FAA561E56125626562A562FFF79CFF0C -:10E03000B7770198407A032804D130001F2162305D -:10E04000FFF276EAFEBD10B50C00080000F005F8FE -:10E0500001212000E9F713FD10BDF1B584B004984B -:10E06000EEF773FE040005008034A069EEF291FA29 -:10E070000020A061A87FC0074DD0E0690190F4F2B4 -:10E080005DFA0391029004980B2189014018876B77 -:10E0900002983A6A2E007B6A03996236801A994187 -:10E0A00018370CCF8018327959415206D70B049A91 -:10E0B0000023A032128896023200FEF252EF38009E -:10E0C000C838824204D20020BE1AC83EE06102E095 -:10E0D0000120B61AE061029A039B0021B018594151 -:10E0E00061622062E169019881420BD0AA48022254 -:10E0F000016811430160A948012100680722490411 -:10E1000005F004F900222B000092A54804999833E9 -:10E110003200EEF2DBF905B0F0BD10B50C000800DE -:10E1200000F005F801212000E9F7A9FC10BDF1B5C8 -:10E1300000208EB00A9006900E98EEF706FE0400BE -:10E14000070080346068EEF224FA00206060B87F37 -:10E15000800772D5A0680590F4F2F0F9039102905F -:10E160000E990B2080010818866B3D00300020308E -:10E170000C90326A0298736A03996235801A994149 -:10E1800018360CCE8618594128000E30FFF24CEAA2 -:10E190000022310016000B920122D207814209D3DE -:10E1A000081A904202D2012104910DE0002146425A -:10E1B00004910AE0401A904203D200210600049123 -:10E1C00003E00121404204910B9028000A30FFF245 -:10E1D0002CEA0990A81DFFF228EA089068790790B8 -:10E1E0000498002807D009990B98FFF22CEE0690AE -:10E1F00009980A91461A0499012000291ED007990E -:10E20000FF2911D0079A069991420DD30026A660E6 -:10E21000B87FFD210840B877022068700D21681D85 -:10E22000AE70FFF286E91AE0089A0A99914205D287 -:10E23000A0600A990898461A11E031E0C82E03D868 -:10E24000A060089886190AE0A168002904D00C99FA -:10E25000097A002900D0A0620020C83EA060029A7E -:10E26000039B0021B01859416161002E206108D044 -:10E2700000223B0000924B480E9984333200EEF2AC -:10E2800025F9A168059881420AD0434A0221106805 -:10E2900008431060414807220068090405F036F879 -:10E2A0000FB0F0BDF0B59FB007000020169015909C -:10E2B000387A0C0003286AD1787A032867D13800AD -:10E2C000EEF743FD060002AA050000926236002127 -:10E2D000200016AA15ABFEF713FA04001598C00427 -:10E2E00007D523000022A0691833D24317A9FEF2F4 -:10E2F000B4F804F035FA002C01903AD0A169002955 -:10E3000037D0B07872780002104303D0F078CA7822 -:10E31000904239D088784B7802021A43D21C3000E0 -:10E32000FFF240E80020A877A0690079C10903D076 -:10E33000400601D00120A877A069817842780802C0 -:10E34000104302280ED930000A30FFF26EE900288F -:10E3500008D0B01DFFF268E9002803D0A87F022191 -:10E360000843A8773800FFF7E2FE38008A27130E2B +:10DF70001590387A0C0003286AD1787A032867D183 +:10DF80003800EEF7D4FD060002AA050000926636BE +:10DF90000021200016AA15ABFEF79EF90400159883 +:10DFA000C00407D523000022A0691833D24317A963 +:10DFB000FEF253FA04F0B0FA002C01903AD0A169B5 +:10DFC000002937D0B07872780002104303D0F0787F +:10DFD000CA78904239D088784B7802021A43D21C12 +:10DFE0003000FFF2E0E90020A877A0690079C109BC +:10DFF00003D0400601D00120A877A069817842783B +:10E000000802104302280ED930000A30FFF20CEB50 +:10E01000002808D0B01DFFF208EB002803D0A87F2D +:10E0200002210843A8773800FFF7E1FE3800FFF728 +:10E0300078FE06E0A87F002807D000213800FFF70F +:10E0400040FE01213800E9F7E3FB019804F068FA8B +:10E050001FB0F0BD10B50400EEF769FD010080317E +:10E060008A6A002A16D1CA68002A13D1627A032A62 +:10E0700012D109E01C80020044F800C04CF800C036 +:10E08000C7D3010093D401008068800704D5C86914 +:10E09000002801D0002010BD012010BDF7B51500EB +:10E0A0000700EEF744FD0024827FE4432600910739 +:10E0B00003D5010080310E694C69D1070FD0797A00 +:10E0C00003290CD18168890709D58030026A436A27 +:10E0D00007002100B01A994101D33E6A7C6A0022F0 +:10E0E000D2432100300051405040084316D00198DF +:10E0F0000B496030007A072803D880004018006B75 +:10E1000000E0086B002180022300301A8B416B6114 +:10E11000286168880121C90308436880FEBD0000AA +:10E1200080A2008070B50500354C0E00EEF7FFFCB4 +:10E13000012E05D0A07A002803D02800F8F79FFF11 +:10E1400070BD607A0028FBD00120E3F761FC280055 +:10E1500000F001F870BDF0B50400002085B0049017 +:10E160002000EEF7E4FC0600172040012518244BA0 +:10E170000B20022180015C60201829704269F3277E +:10E18000517B890889005173426939405173406954 +:10E19000CF2211404173587A002801D001206870C5 +:10E1A00018481A001432002101AF07C7C0361A6997 +:10E1B0000092DB68B27A04992000F9F72FFC00285E +:10E1C00002D1287005B0F0BD0120FBE770B5002139 +:10E1D0000B48012541724068F7F74FFF04000DD04E +:10E1E00020892F21001901702000F7F782FF0128F4 +:10E1F00003D12000FFF234FE00E00025280070BDAE +:10E20000805F01C0DDD70100F8B5002405000F00D4 +:10E21000260004F081F900900B2080012D18A869D8 +:10E22000012F22D100282ED1FF4F3D200001604355 +:10E23000385C00280DD13D20000160433D21C0190C +:10E240000901A861FFF24AE9A969012006000870E6 +:10E2500002E0641C022CE8DB022C14D10120F349FB +:10E26000AF613870060008730DE000280AD00F2156 +:10E27000890141180B7B0022002B02D10270AA6198 +:10E2800000E00A730126009804F04AF93000F8BD56 +:10E290000B21890141188969002901D10121B3E7C6 +:10E2A00001200870704770B5050048780C0001091E +:10E2B000012630008840411E2800F4F2F4F860780E +:10E2C00031000007000F8140491E2800F4F2F5F8E4 +:10E2D000207801092800F6F7B4FA61882800F4F2E2 +:10E2E000F1F870BDFEB50C00002100910B218901F1 +:10E2F00040180190816914206043001D0E18307889 +:10E300004007800F00F36DFA3178090712D5B18903 +:10E31000002903D0317C00290CD001E001210091BB +:10E320000099777C002906D03D0031002000FFF7DE +:10E33000BAFF01E0070005000024A0008019406832 +:10E34000FF2D1DD0FF2F1BD04030C17DA9420DD025 +:10E35000009A002A01D0427D00E0827D914205D1E1 +:10E36000B34A69008918C575095D0176D8A3A33F32 :10E370000100000024DA0100000400009C372B5843 -:10E38000FFF775FE06E0A87F002807D000213800BF -:10E39000FFF73DFE01213800E9F77BFB019804F00F -:10E3A000EDF91FB0F0BD0000C8800200FCF500C010 -:10E3B00004F600C0FFD60100D3D7010010B5040059 -:10E3C000EEF7CDFC010080318A6A002A0BD18A6801 -:10E3D000002A08D1627A032A07D18068800704D511 -:10E3E000C869002801D0002010BD012010BDF7B57C -:10E3F00015000700EEF7B3FC0024827FE4432600FB -:10E40000910703D5010080310E694C69D1070FD007 -:10E41000797A03290CD18168890709D58030026A8D -:10E42000436A07002100B01A994101D33E6A7C6A11 -:10E430000022D2432100300051405040084316D002 -:10E4400001980B496030007A072803D880004018F3 -:10E45000006B00E0086B002180022300301A8B4122 -:10E460006B61286168880121C90308436880FEBD8B -:10E4700080A2008070B50500344C0E00EEF76FFCF2 -:10E48000012E05D0A07A002803D02800F8F789FFD4 -:10E4900070BD607A0028FBD0280000F001F870BD44 -:10E4A000F0B50400002085B004902000EEF757FC82 -:10E4B0000600032000022518244B0B2002218001B6 -:10E4C0005C6020182972826BF327517B89088900D0 -:10E4D0005173826B39405173806BCF22114041736D -:10E4E000587A002801D00120687219481A001432A5 -:10E4F000002101AF07C7C0361A690092DB68B27A03 -:10E5000004992000F9F701FC002802D1287205B017 -:10E51000F0BD0120FBE770B500210C4801254172D8 -:10E520004068F7F769FF04000DD020892F210019FA -:10E5300001702000F7F79CFF012803D12000FFF2B3 -:10E5400099FC00E00025280070BD0000306201C089 -:10E5500019DB0100F8B5002405000F00260004F0C7 -:10E5600009F900900B2080012D18E86B012F22D1B2 -:10E5700000282ED1FF4F3D2000016043385C002869 -:10E580000DD13D20000160433D21C0190901E86320 -:10E59000FEF2AEEFE96B01200600087002E0641C99 -:10E5A000022CE8DB022C14D10120F349EF63387010 -:10E5B000060008730DE000280AD00F2189014118D8 -:10E5C0000B7B0022002B02D10270EA6300E00A7389 -:10E5D0000126009804F0D2F83000F8BD0B21890123 -:10E5E0004118C96B002901D10121B3E7012008704E -:10E5F000704770B5050048780C000109012630000D -:10E600008840411E2800F3F258FF6078310000076F -:10E61000000F8140491E2800F3F259FF20780109BC -:10E620002800F6F7BAFA61882800F3F255FF70BDAA -:10E63000FEB50C00002100910B21890140180190CA -:10E64000C16B14206043001D0E1830784007800F06 -:10E6500000F3D1F83178090712D5B189002903D028 -:10E66000317C00290CD001E0012100910099777CD8 -:10E67000002906D03D0031002000FFF7BAFF01E07D -:10E68000070005000024A00080194068FF2D1DD060 -:10E69000FF2F1BD04030C17DA9420DD0009A002A27 -:10E6A00001D0427D00E0827D914205D1B34A6900EC -:10E6B0008918C575095D0176142201997A43C96BE1 -:10E6C000121DC07D8918FFF794FF03E0FF21403041 -:10E6D000C1750176641C2406240E022CD3D3019844 -:10E6E000C26B0720602141438918A031CB7A497A57 -:10E6F0008B4204D11D2149015118C876FEBD401E30 -:10E70000F0D5FEBDF7B50F0011003800FEF27AFA21 -:10E71000002849D000980B21002489014518A00049 -:10E72000C619B07A4006800F00F365F814235843E9 -:10E73000E96B001D081831000A31FEF28EFA641CE4 -:10E740002406240E042CEAD3002414226243EE6B28 -:10E75000101D305C000701D421000EE0FF210020D5 -:10E7600009E0142343431B1DF35C1B0700D4010085 -:10E77000401C0006000EA042F3D910009EC932BB17 +:10E38000142201997A438969121DC07D8918FFF70B +:10E3900094FF03E0FF214030C1750176641C240620 +:10E3A000240E022CD3D301988269072060214143B7 +:10E3B0008918A031CB7A497A8B4204D11D214901B9 +:10E3C0005118C876FEBD401EF0D5FEBDF7B50F0052 +:10E3D00011003800FEF216FC002849D000980B21ED +:10E3E000002489014518A000C619B07A4006800FA4 +:10E3F00000F301FA14235843A969001D08183100DD +:10E400000A31FEF22AFC641C2406240E042CEAD3F2 +:10E41000002414226243AE69101D305C000701D451 +:10E4200021000EE0FF21002009E0142343431B1DBF +:10E43000F35C1B0700D40100401C0006000EA04244 +:10E44000F3D9100015303154AB690D3818580C321F +:10E4500040308175A869805840308175009821004E +:10E46000FFF74AFF641C2406240E042CD1D301209C +:10E47000FEBDF3B50C0083B00B2103988901401851 +:10E4800087690020019038212000FFF25CE801201C +:10E4900000F3B1F9050050E014206843C619FF20CD +:10E4A00011302070000A60700A20A0700020E07017 +:10E4B000361D28002571FEF20AFB02900398C06801 +:10E4C000C00431D5039807F01FFB002827D030780F +:10E4D0000007C00F2072B089002800D001206072B0 +:10E4E000B089A071000AE0713078000704D5B089C6 +:10E4F000002801D1012060710720C0013818827BFB +:10E50000029B012108009840024200D0A1721D2206 +:10E510005201BA181278024208D0E17206E00020D7 +:10E5200000F369F9A84201D00120607101980E340E +:10E530000E306D1C2D062D0E0190032DACD90198C7 +:10E5400005B0F0BD70B506000D00FFF792FF0400A6 +:10E550000B208001301880693B4941182800FEF2E9 +:10E5600077FC001970BD1CB50400FF2291321723FF +:10E57000694601A8E7F7B3FC00280CD000992000F9 +:10E580001031FFF7DFFF00998872000AC872019905 +:10E590002000E7F76FFC1CBDF8B5150006000F0062 +:10E5A00007F0B2FA00281CD00B2080013418002D8F +:10E5B00018D0287AA26900075178000F884210D03D +:10E5C000521C29003000FFF701FF002809D01E4926 +:10E5D000A0691A2240182900FEF2EEEE3000FFF783 +:10E5E000C2FFF8BD002FFCD0387AA1690007497836 +:10E5F000000F8842F5D0300002F087FDF8BD38B535 +:10E6000000210091114905004C6A6A462100303111 +:10E61000FEF24DFB002823D02878012801D00228E3 +:10E620001ED16D780A4968000019008E884200D119 +:10E63000A06A0404240C210028000BE0B050000460 +:10E6400070540004107C0200A1030000F058000484 +:10E65000FFFF0000F5F731FB21002800E4F75FFB26 +:10E66000009838BD020008000B218901511810B52F +:10E670008969FE4A8A18FE49FEF23BFB10BDF0B5DF +:10E680000B229201871814204843BA69001D141800 +:10E6900000262674F74B667432004800A681C01825 +:10E6A000E681844626606046855C60236B43B869DA +:10E6B0005433C318900000194360403359754368C0 +:10E6C000521C4033D9754368120640335E83436859 +:10E6D000120E40339E83436840331D7643684033B7 +:10E6E000997540684030022A8677DCD3F0BD70B55A +:10E6F00015000C004A1C2900FFF768FE002806D010 +:10E70000DA481A221D3829002018FEF256EE70BD94 +:10E71000012010B500F36FF8D74B002204E0C100D0 +:10E720005A50C918401C0A710328F8DD10BD70B595 +:10E7300004000D00FEF20CFA207A0009000120729C +:10E740005E202075002060752F2020760020022D8D +:10E7500060760ED1E07A0007000F6030E072A07C96 +:10E7600000090001401CA074A07D00090001401CAC +:10E77000A07570BD10B5040088B001A8A7D57D6252 :10E780000100000020DE010000040000CFEDF8349D -:10E7900015303154EB6B0D3818580C324030817500 -:10E7A000E86B80584030817500982100FFF74AFFE0 -:10E7B000641C2406240E042CD1D30120FEBDF3B525 -:10E7C0000C0083B00B21039889014018C76B00200F -:10E7D000019038212000FEF2C0EE012000F315F870 -:10E7E000050050E014206843C619FF201130207046 -:10E7F000000A60700A20A0700020E070361D28001A -:10E800002571FEF26EF902900398C068C00431D5FC -:10E81000039807F085F9002827D030780007C00F4B -:10E820002072B089002800D001206072B089A071E8 -:10E83000000AE0713078000704D5B089002801D1C2 -:10E84000012060710720C0013818827B029B0121E2 -:10E8500008009840024200D0A1721D225201BA184D -:10E860001278024208D0E17206E00020FFF2CDFFEC -:10E87000A84201D00120607101980E340E306D1C49 -:10E880002D062D0E0190032DACD9019805B0F0BDD9 -:10E8900070B506000D00FFF792FF04000B20800109 -:10E8A0003018C06B3B4941182800FEF2DBFA001912 -:10E8B00070BD1CB50400FF2291321723694601A8E0 -:10E8C000E7F737FA00280CD0009920001031FFF745 -:10E8D000DFFF00998872000AC87201992000E7F7EB -:10E8E000F3F91CBDF8B5150006000F0007F018F984 -:10E8F00000281CD00B2080013418002D18D0287A55 -:10E90000E26B00075178000F884210D0521C29009A -:10E910003000FFF701FF002809D01E49E06B1A22E2 -:10E9200040182900FEF252ED3000FFF7C2FFF8BD9B -:10E93000002FFCD0387AE16B00074978000F88423D -:10E94000F5D0300002F06AFDF8BD38B50021009125 -:10E95000114905004C6A6A4621003031FEF2B1F9D6 -:10E96000002823D02878012801D002281ED16D78F4 -:10E970000A4968000019008E884200D1A06A040488 -:10E98000240C210028000BE0A4500004645400046F -:10E99000707B0200A1030000E4580004FFFF0000A8 -:10E9A000F5F755FB21002800E4F7BFF8009838BDC3 -:10E9B000020008000B218901511810B5C96BFE4AED -:10E9C0008A18FE49FEF29FF910BDF0B50B229201A4 -:10E9D000871814204843FA6B001D1418002626746B -:10E9E000F74B667432004800A681C018E681844661 -:10E9F00026606046855C60236B43F86B5433C31814 -:10EA0000900000194360403359754368521C4033ED -:10EA1000D9754368120640335E834368120E403353 -:10EA20009E83436840331D76436840339975406840 -:10EA30004030022A8677DCD3F0BD70B515000C009B -:10EA40004A1C2900FFF768FE002806D0DA481A227F -:10EA50001D3829002018FEF2BAEC70BD012010B557 -:10EA6000FFF2D3FED74B002204E0C1005A50C91870 -:10EA7000401C0A710328F8DD10BD70B504000D00BC -:10EA8000FEF270F8207A0009000120725E202075E5 -:10EA9000002060752F2020760020022D60760ED198 -:10EAA000E07A0007000F6030E072A07C00090001EE -:10EAB000401CA074A07D00090001401CA07570BD21 -:10EAC00010B5040088B001A8FFF7D7FF03A91022F2 -:10EAD000891C2000FEF27AEC08B010BDF0B585B0BC -:10EAE00002216846FFF7ECFFB74E00240127200003 -:10EAF000FFF28BFE0500F3F2F5FF3900A940B06983 -:10EB00000142FCD0A1006846091804A8FEF2AFF843 -:10EB1000280004A9FFF777FD2800F3F2EBFF641C3F -:10EB20002406240E042CE2D3B0E6FFB581B00F001A -:10EB30000B9E0A9D0C9C0921FEF20EED0921380066 -:10EB4000FEF20AED03980921FEF206ED04981A215F -:10EB5000FEF202ED287821010007000F2030287016 -:10EB600068789A4F0007000F08430D9900090001CB -:10EB70000907090F08436870002004006880290015 -:10EB80002000FFF740FD6100641C24062C08B0291A +:10E79000FFF7D7FF03A91022891C2000FEF216EE16 +:10E7A00008B010BDF0B585B002216846FFF7ECFF58 +:10E7B000B74E00240127200000F327F80500F4F2EB +:10E7C00091F93900A940B0690142FCD0A100684626 +:10E7D000091804A8FEF24BFA280004A9FFF777FDF8 +:10E7E0002800F4F287F9641C2406240E042CE2D3DA +:10E7F000B0E6FFB581B00F000B9E0A9D0C9C09216D +:10E80000FEF2AAEE09213800FEF2A6EE03980921D5 +:10E81000FEF2A2EE04981A21FEF29EEE2878210163 +:10E820000007000F2030287068789A4F0007000F0B +:10E8300008430D99000900010907090F0843687092 +:10E8400000200400688029002000FFF740FD6100DF +:10E85000641C24063868240E072C7052F3D979E61C +:10E86000F0B5040017008C480B2201269201406A83 +:10E87000F602A518002985B028D1E168B143E1600E +:10E88000AE69002E1AD000250A220421303001ABD7 +:10E89000357007C304AA7A4800921D3833187320D4 +:10E8A000C000321876482F3831187548383830187B +:10E8B000FFF79FFF29002000FFF7BAFC2000EFF7C9 +:10E8C000E0F800280DD0FFF76DFF0AE02000FFF709 +:10E8D000AFFC002805D0E168A8693143E16001215F +:10E8E0000170002F02D02000FFF747FE200000F04B +:10E8F000DEFCFFF717FF2DE6FFB581B000240E0008 +:10E90000086900280ED10198E4F762FF002809D1B8 +:10E91000049A01980021FFF7A3FF21002000EBF7E4 +:10E92000C6FC17E601980121FFF782FC01990B2034 +:10E93000800108188569524F3069413F002807D18E +:10E94000E819FEF2FBF85548FEF20CF95348306125 +:10E950000120FFF25AFF040006E001982100FFF7B2 +:10E9600098FE641C2406240E032CF6D90398002874 +:10E9700001D000F0BCFC4248E9192F3809220C00F4 +:10E980002818FEF224ED3E480922383821002818C4 +:10E99000FEF21CED7320C000092221002818FEF2AF +:10E9A00016ED0720C0012818817B0091016A0098AC +:10E9B000EBF77DFC326901982900FFF7A2FE049A6B +:10E9C00001980121FFF74CFFC4E50B218901401894 +:10E9D0008069002806D01B2149014018407F00288B +:10E9E00000D00120704738B56B4618780007000F3B +:10E9F0002030187058780007000F403000090001DF +:10EA00000A3058700020040058802006000E694625 +:10EA1000FFF75DFC641C072CF7D938BD00280AD02D +:10EA20000B21890140188069002804D01D2149016B +:10EA30004018C07E704700207047F8B51D000600E2 +:10EA4000080060230B21434389017418A1691F004A +:10EA5000AB37CA55A169B233CD54FFF2C5FEFFF200 +:10EA6000D4FE01003000FFF751FC0F22A069A9007D +:10EA70009201891841182800E4F7CCF9F8BD00008C +:10EA8000BE03000070580004107C020050580004BF +:10EA900040A2008048BC0200F05800044B6E02C047 +:10EAA0003D213B48490110B5FEF22CED394880214B +:10EAB000FEF228ED10BD002808D00129017A02D10C +:10EAC0008022114301E04906490E01727047FEB5EC +:10EAD00000251F0006006B460295587A0223184352 +:10EAE0006B465872202304001C43002902D1DF2109 +:10EAF000084004006B465C72019518795107C00804 +:10EB0000C000490F08431021084318713A06120E3D +:10EB10000092019A029930003123E3F74FFD00285B +:10EB200002D0300006F0C4F9FEBD002801D101205A +:10EB30007047012801D1002070470428FBD270479C +:10EB400010B504000800F3F2D7FC01002000F3F236 +:10EB5000CDFC10BD70B504000D000800F3F2BCFC44 +:10EB600001002000F3F2B3FC2800F3F2D7FC01000F +:10EB70002000F3F2B6FC0848A1000918AA001018FA +:10EB80000068086029002000FFF7DAFF0B16DECED0 :10EB9000010000001CE2010000040000E77C7D8908 -:10EBA0003868240E072C7052F3D979E6F0B50400CA -:10EBB00017008C480B2201269201406AF602A51824 -:10EBC000002985B028D1E168B143E160EE6B002EE9 -:10EBD0001AD000250A220421303001AB357007C35A -:10EBE00004AA7A4800921D3833187320C0003218E6 -:10EBF00076482F383118754838383018FFF79FFF9E -:10EC000029002000FFF7BAFC2000EFF7ADF800283C -:10EC10000DD0FFF76DFF0AE02000FFF7AFFC0028E2 -:10EC200005D0E168E86B3143E16001210170002FFC -:10EC300002D02000FFF747FE200000F0DEFCFFF7C7 -:10EC400017FF2DE6FFB581B000240E0008690028EB -:10EC50000ED10198E4F7C2FC002809D1049A01986A -:10EC60000021FFF7A3FF21002000EBF774FC17E65B -:10EC700001980121FFF782FC01990B2080010818FF -:10EC8000C56B524F3069413F002807D1E819FDF2AA -:10EC90005FFF5548FDF270FF534830610120FFF2DD -:10ECA000BEFD040006E001982100FFF798FE641CF9 -:10ECB0002406240E032CF6D90398002801D000F076 -:10ECC000BCFC4248E9192F3809220C002818FEF232 -:10ECD00088EB3E480922383821002818FEF280EBE4 -:10ECE0007320C000092221002818FEF27AEB0720C9 -:10ECF000C0012818817B0091016A0098EBF72BFC7A -:10ED0000326901982900FFF7A2FE049A01980121B7 -:10ED1000FFF74CFFC4E50B2189014018C06B0028A8 -:10ED200006D01B2149014018407F002800D0012057 -:10ED3000704738B56B4618780007000F2030187000 -:10ED400058780007000F4030000900010A30587061 -:10ED50000020040058802006000E6946FFF75DFC85 -:10ED6000641C072CF7D938BD00280AD00B21890173 -:10ED70004018C06B002804D01D2149014018C07EF6 -:10ED8000704700207047F8B51D000600080060239A -:10ED90000B21434389017418E16B1F00AB37CA553F -:10EDA000E16BB233CD54FFF229FDFFF238FD0100D3 -:10EDB0003000FFF751FC0F22E06BA9009201891887 -:10EDC00041182800E3F72CFFF8BD0000BE03000047 -:10EDD00064580004707B02004458000440A2008084 -:10EDE00048BC0200E4580004437002C03D213B4887 -:10EDF000490110B5FEF290EB39488021FEF28CEB10 -:10EE000010BD002808D00129017A02D180221143C7 -:10EE100001E04906490E01727047FEB500251F004A -:10EE200006006B460295587A022318436B465872C7 -:10EE3000202304001C43002902D1DF2108400400E4 -:10EE40006B465C72019518795107C008C000490FE4 -:10EE500008431021084318713A06120E0092019AD5 -:10EE6000029930003123E3F7AFFA002802D03000D6 -:10EE700006F05CF8FEBD002801D101207047012892 -:10EE800001D1002070470428FBD2704710B5040060 -:10EE90000800F3F23BFB01002000F3F231FB10BD50 -:10EEA00070B504000D000800F3F220FB0100200003 -:10EEB000F3F217FB2800F3F23BFB01002000F3F212 -:10EEC0001AFB0848A1000918AA0010180068086079 -:10EED00029002000FFF7DAFF70BD0000A4500004F5 -:10EEE0006458000480A60080FD4930B50020096CFC -:10EEF000002917D00B2292018918CC6B002C11D05D -:10EF0000002160224A4312198032D37A042B04D1A3 -:10EF1000937A557A1A022A431018491C0906090ED9 -:10EF20000829EED330BDEE4870B5006C00281CD027 -:10EF30000B2189014018C46B002C16D0002014212D -:10EF40004143401C09198A6800063032937952798E -:10EF50001B021343CA68000E3032957956792A0293 -:10EF600032439A1804280A82E9D370BDDC4A70B58E -:10EF70000020126C0300002A22D00B24A4011219D5 -:10EF8000D56B002D1CD000220D26B601940064190B -:10EF9000A4196469002C0BD02034E47DCC68D21114 +:10EBA00070BD0000B05000047058000480A60080C2 +:10EBB000FD4930B50020096C002917D00B229201C5 +:10EBC00089188C69002C11D0002160224A43121947 +:10EBD0008032D37A042B04D1937A557A1A022A43CD +:10EBE0001018491C0906090E0829EED330BDEE485D +:10EBF00070B5006C00281CD00B2189014018846975 +:10EC0000002C16D0002014214143401C09198A68A9 +:10EC100000063032937952791B021343CA68000E02 +:10EC20003032957956792A0232439A1804280A829A +:10EC3000E9D370BDDC4A70B50020126C0300002AD5 +:10EC400022D00B24A40112199569002D1CD000229A +:10EC50000D26B60194006419A4196469002C0BD028 +:10EC60002034E47D002C07D0401C0006000E012C4F +:10EC700002D15B1C1B061B0E521C1206120E082A28 +:10EC8000E8D3002900D00B7070BD1CB5030008004C +:10EC9000C549096C00291CD00B22920189188C6986 +:10ECA000002C16D0C1491A0000936318BF49543292 +:10ECB0000939019262181D2149016118FDF22CFEEB +:10ECC0000720C0012018817B0191016A0198EBF7B0 +:10ECD000F8FA1CBDB44910B5096C00291ED00B22EE +:10ECE000920189188969002918D0800041180D20E7 +:10ECF00080010C1860693721FEF238EC60691B2135 +:10ED00003930FEF234EC6169002020310876616907 +:10ED10004031087561692031C875606110BDF8B572 +:10ED20000B229201A0480027016C89188E693C00D3 +:10ED3000142060438519288A00280AD0287D0127DD +:10ED4000002806D00020287597482100006CFFF7A6 +:10ED5000E7FA641C00202406240E042C6882E7D302 +:10ED6000002F0AD079200022C00033180092904A68 +:10ED700090480021EDF2C8FBF8BD0F210020890169 +:10ED800071188860F8BDF3B589B08749086C002810 +:10ED90007CD00B22920180188469002CF8D00D00E1 +:10EDA000FFF706FF0590099800210078C006070FBD +:10EDB000099840788006400F0790286CFFF73AFFCB +:10EDC0000026082F009061D20720C0012018817B07 +:10EDD0000491006A03900A98012802D00A98022838 +:10EDE0005AD1099806A9FDF275FD0798FFF206FDB4 +:10EDF000FFF215FD14235843002500190890A900BF +:10EE00004018806854216B46095C1A7E11420FD06D +:10EE100000780D21C006060FB000001989014018C6 +:10EE200040690021FFF731FF3000FFF753FF012653 +:10EE30006D1C2D062D0E022D01D20898DFE7B800BB +:10EE400001190D2080010D186869002806D00021E5 +:10EE5000FFF71BFF3800FFF73DFF012607986023EF +:10EE6000584337220019543068610999FEF2B8EA14 +:10EE700068696B46197E4030017568690A99FFF729 +:10EE800004FF0A98022802D1052101E05DE0042177 +:10EE900068692030C1750DE0B80001190D208001AE +:10EEA00008184069002805D00A99FFF7EEFE3800DF +:10EEB000FFF710FFFFF77CFE0599884201D001257E +:10EEC00000E00025394801220938211804A803F080 +:10EED00065F80006000E02901D2040012118012255 +:10EEE00003A803F05BF80006000E002D01901BD074 +:10EEF000FFF77DFE2C4F0024386C2100FFF710FA3D +:10EF0000641C2406240E042CF6D3396C0B208001DB +:10EF1000081880690F21890140188068002803D1F2 +:10EF200000210800FFF7FBFE1F480021006CFFF7DF +:10EF300081FE0099884205D102982E43064301982C +:10EF4000064302D001200BB0F0BD0020FBE7F8B56E +:10EF50000400FF21144D2D31286CE7F710FD002827 +:10EF6000206012D0018959234618296CDB000A0061 +:10EF70007E32C9180092CB320D23E7F755FD1120E0 +:10EF8000203630702168AC200881F8BDFFB581B013 +:10EF900004001E006846FFF7DAFF0098E5ADD98748 :10EFA0000100000018E6010000040000B4A6AEE570 -:10EFB000002C07D0401C0006000E012C02D15B1C67 -:10EFC0001B061B0E521C1206120E082AE8D300293B -:10EFD00000D00B7070BD1CB503000800C549096C5A -:10EFE00000291CD00B2292018918CC6B002C16D062 -:10EFF000C1491A0000936318BF495432093901927C -:10F0000062181D2149016118FDF290FC0720C00122 -:10F010002018817B0191016A0198EBF7A6FA1CBDCB -:10F02000B44910B5096C00291ED00B229201891831 -:10F03000C96B002918D0800041180D2080010C18E0 -:10F0400060693721FEF29CEA60691B213930FEF2CB -:10F0500098EA6169002020310876616940310875BD -:10F0600061692031C875606110BDF8B50B2292014D -:10F07000A0480027016C8918CE6B3C001420604327 -:10F080008519288A00280AD0287D0127002806D063 -:10F090000020287597482100006CFFF7E7FA641CF0 -:10F0A00000202406240E042C6882E7D3002F0AD007 -:10F0B00079200022C00033180092904A9048002125 -:10F0C000EDF22CFAF8BD0F2100208901711888603B -:10F0D000F8BDF3B589B08749086C00287CD00B22B5 -:10F0E00092018018C46B002CF8D00D00FFF706FFCA -:10F0F0000590099800210078C006070F099840780C -:10F100008006400F0790286CFFF73AFF0026082F73 -:10F11000009061D20720C0012018817B0491006A11 -:10F1200003900A98012802D00A9802285AD1099817 -:10F1300006A9FDF2D9FB0798FFF26AFBFFF279FB03 -:10F1400014235843002500190890A900401880682E -:10F1500054216B46095C1A7E11420FD000780D21B4 -:10F16000C006060FB000001989014018406900214F -:10F17000FFF731FF3000FFF753FF01266D1C2D060E -:10F180002D0E022D01D20898DFE7B80001190D20DD -:10F1900080010D186869002806D00021FFF71BFFC9 -:10F1A0003800FFF73DFF01260798602358433722B8 -:10F1B0000019543068610999FEF21CE968696B46D0 -:10F1C000197E4030017568690A99FFF704FF0A98B3 -:10F1D000022802D1052101E05DE0042168692030A8 -:10F1E000C1750DE0B80001190D20800108184069B3 -:10F1F000002805D00A99FFF7EEFE3800FFF710FF50 -:10F20000FFF77CFE0599884201D0012500E000252A -:10F21000394801220938211804A802F0EDFF000640 -:10F22000000E02901D2040012118012203A802F0C7 -:10F23000E3FF0006000E002D01901BD0FFF77DFEBE -:10F240002C4F0024386C2100FFF710FA641C2406B0 -:10F25000240E042CF6D3396C0B2080010818C06BE7 -:10F260000F21890140188068002803D1002108007F -:10F27000FFF7FBFE1F480021006CFFF781FE00999D -:10F28000884205D102982E4306430198064302D0D6 -:10F2900001200BB0F0BD0020FBE7F8B50400FF2112 -:10F2A000144D2D31286CE7F7B0FC0028206012D0F7 -:10F2B0000189BB234618296C9B000A00A232C91899 -:10F2C0000092CF320D23E7F7F5FC11202036307085 -:10F2D0002168AC200881F8BDFFB581B004001E0094 -:10F2E0006846FFF7DAFF009800280BD1401E05B0F2 -:10F2F000F0BD0000486201C09703000040420F00CB -:10F30000D3E601000189FE4A0D1811790127491C35 -:10F310000906090E0029117100D11771F849029AE6 -:10F320000B792100FDF24BFB0400002E0ED0029859 -:10F33000039920180C303200FEF25CE868782978D6 -:10F340000002084380192870000A6870ED480078B0 -:10F35000800718D4607B8006400FFDF2D6FAE8499A -:10F360000B22096C92018918C96B0722D2018918F6 -:10F370008740897B607B394202D00421084301E049 -:10F38000FB21084060730098E7F7EBFCAFE770B52E -:10F39000050000242100280000F032FB002801D0E5 -:10F3A000012070BD641C2406240E032C67284EC166 +:10EFB00000280BD1401E05B0F0BD0000985F01C0D5 +:10EFC0009703000040420F009BE301000189FE4AC5 +:10EFD0000D1811790127491C0906090E0029117124 +:10EFE00000D11771F849029A0B792100FDF2E7FC74 +:10EFF0000400002E0ED00298039920180C30320025 +:10F00000FEF2F8E968782978000208438019287030 +:10F01000000A6870ED480078800718D4607B80068D +:10F02000400FFDF272FCE8490B22096C920189182D +:10F0300089690722D20189188740897B607B394220 +:10F0400002D00421084301E0FB21084060730098CE +:10F05000E7F74AFDAFE770B505000024210028005E +:10F0600000F02FFB002801D0012070BD641C240695 +:10F07000240E032CF2D9002070BDF1B5002582B01A +:10F08000D149086C002805D00B22920180188069B4 +:10F09000002801D10020FEBD0724019060206043BC +:10F0A00001994618543637002037F87D012818D1C9 +:10F0B000C6480078800707D4C3482106006C090EB3 +:10F0C00000F014FB00280CD032003B7E393237218F +:10F0D0003000FFF765FF0220F87502986D1C85422D +:10F0E00001DA641EDAD52806000EFEBD012010B537 +:10F0F000FFF7C3FF002801D1012010BD002010BD83 +:10F10000F3B581B006007D252D01B148002229000C +:10F11000FEF2F8FE04000120E2F7A2FC002CF4D07D +:10F12000A94F6921386C6061AC2025182081280026 +:10F13000FEF226EA029A31002800FDF25CFCA548A6 +:10F1400022008068042100680023E2F7D2FC002836 +:10F1500004D1386C802108F0D4EF02E02000FEF2E8 +:10F16000A7FE0120FEBDFFB583B002A816000D006A +:10F170001F00FF229132172301A9E6F7CEFE0028D7 +:10F1800039D0019903981031FFF791F9019CA072D1 +:10F19000000AE0724834002D04D006222900201D08 +:10F1A000FEF228E9002E05D02000062231000A30A8 +:10F1B000FEF220E9002F1AD0FF208D302070000AC7 +:10F1C0006070FF205030A070000AE070FF22200025 +:10F1D000443239001030FEF20EE90198C17A827A89 +:10F1E00009021143FF3154318172090AC172029937 +:10F1F0000398E6F75DFE07B0DEE6F8B504000025EB +:10F2000029000B30FFF7C9FD6F4E04202070306CD1 +:10F21000C168C9041DD506F095FC002819D0A7784F +:10F22000E51C6846FFF79DFE0098002801D1401EAE +:10F2300006E03A002900FDF2FFFB0098E7F754FCD6 +:10F24000050000D120700022306C11001300FFF780 +:10F250008AFF2800F8BDF8B50C0020004978170097 +:10F26000594E15000C300C37012903D0022910D15A +:10F27000002104E0E17800290BD131710121FFF771 +:10F280008CFD002805D0306C2300AA1D3900FFF743 +:10F290006AFF0120F8BD4C4910B5096C0B229201A0 +:10F2A0008918027889695207D20E51180D229201ED +:10F2B0008918496900290AD03722525C0123042A9F +:10F2C00000D000230A005432FDF2EEFB10BD0022F4 +:10F2D00011001300F8E70B21F0B58901401884698B +:10F2E000002C17D000200D25AD0103000126810060 +:10F2F000091949194969002909D00A002032D77D26 +:10F30000042F04D13031D6751A0A4B718A71401C12 +:10F310000828ECD350E62C4830B50B21006C89014D +:10F32000401882690D2300209B0105248100891863 +:10F33000C9184969002904D02031CD7D042D00D1A0 +:10F34000CC75401C0828F1D330BDF8B500261E4806 +:10F35000006C002801D13000F8BD0B218901401854 +:10F3600087690024A0000D21C01989014018406957 +:10F3700000280AD005002035E97D052905D10126A0 +:10F380003100FFF78CFC0420E875641C082CE9D3DD +:10F39000FFF737FCDFE738B500200B4C0090206CFE +:10F3A000002819D0C168C90416D506F0860376F383 :10F3B0000100000014EA01000004000040C9DB5114 -:10F3C000F2D9002070BDF1B5002582B0D149086C9A -:10F3D000002805D00B2292018018C06B002801D1B3 -:10F3E0000020FEBD0724019060206043019946186B -:10F3F000543637002037F87D012818D1C6480078E8 -:10F40000800707D4C3482106006C090E00F017FBE3 -:10F4100000280CD032003B7E393237213000FFF714 -:10F4200065FF0220F87502986D1C854201DA641EA2 -:10F43000DAD52806000EFEBD012010B5FFF7C3FF88 -:10F44000002801D1012010BD002010BDF3B581B00E -:10F4500006007D252D01B14800222900FEF25CFD49 -:10F4600004000120E2F79CFA002CF4D0A94F692196 -:10F47000386C6061AC20251820812800FEF28AE8F3 -:10F48000029A31002800FDF2C0FAA54822008068E7 -:10F49000042100680023E2F7CCFA002804D1386C7C -:10F4A000802108F0FEED02E02000FEF20BFD0120BD -:10F4B000FEBDFFB583B002A816000D001F00FF229D -:10F4C0009132172301A9E6F752FC002839D001999F -:10F4D00003981031FFF791F9019CA072000AE072C5 -:10F4E0004834002D04D006222900201DFDF28CEFA7 -:10F4F000002E05D02000062231000A30FDF284EFF4 -:10F50000002F1AD0FF208D302070000A6070FF207D -:10F510005030A070000AE070FF2220004432390011 -:10F520001030FDF272EF0198C17A827A090211431C -:10F53000FF3154318172090AC17202990398E6F7CA -:10F54000E1FB07B0DEE6F8B50400002529000B302A -:10F55000FFF7C9FD6F4E04202070306CC168C904EC -:10F560001DD506F0FBFA002819D0A778E51C6846DF -:10F57000FFF79DFE0098002801D1401E06E03A00EA -:10F580002900FDF263FA0098E7F7F5FB050000D1CA -:10F5900020700022306C11001300FFF78AFF280052 -:10F5A000F8BDF8B50C00200049781700594E150039 -:10F5B0000C300C37012903D0022910D1002104E0BE -:10F5C000E17800290BD131710121FFF78CFD002872 -:10F5D00005D0306C2300AA1D3900FFF76AFF012017 -:10F5E000F8BD4C4910B5096C0B22920189180278BC -:10F5F000C96B5207D20E51180D2292018918496920 -:10F6000000290AD03722525C0123042A00D00023AB -:10F610000A005432FDF252FA10BD0022110013000C -:10F62000F8E70B21F0B589014018C46B002C17D006 -:10F6300000200D25AD01030001268100091949199B -:10F640004969002909D00A002032D77D042F04D14E -:10F650003031D6751A0A4B718A71401C0828ECD3D8 -:10F6600050E62C4830B50B21006C89014018C26B64 -:10F670000D2300209B01052481008918C9184969C0 -:10F68000002904D02031CD7D042D00D1CC75401C43 -:10F690000828F1D330BDF8B500261E48006C0028BC -:10F6A00001D13000F8BD0B2189014018C76B00243F -:10F6B000A0000D21C01989014018406900280AD016 -:10F6C00005002035E97D052905D101263100FFF728 -:10F6D0008CFC0420E875641C082CE9D3FFF737FC88 -:10F6E000DFE738B500200B4C0090206C002819D0C3 -:10F6F000C168C90416D506F031FA002803D0206C81 -:10F700006946FFF747FC6B46187800280AD00120AD -:10F7100038BD0000486201C0E0FB00C0F8000004F2 -:10F720003C4801C00020F3E770B5891EC94D0600B2 -:10F7300000240B00FEF284E8053A04273A323A002E -:10F740002879401C28710020E2F72FFF2879002833 -:10F7500001D1012028716879002809D0BD483721DE -:10F7600040300379421DA81DFFF7C0FD6C711DE0FC -:10F770000120FFF728FE002818D106213000E4F709 -:10F78000E9FE2C6012E02868B04201D0042070BD70 -:10F79000002AF2D0002108009047EEE7FFF77BFF38 -:10F7A0000022286C11001300FFF783FE032070BDB8 -:10F7B000F8B500200F00079E002A2FD0DEA313CD3E +:10F3C000CBFB002803D0206C6946FFF747FC6B4657 +:10F3D000187800280AD0012038BD0000985F01C0CD +:10F3E00010FE00C038050004184701C00020F3E7F4 +:10F3F00070B5891EC74D060000240B00FEF220EAFE +:10F40000053A04273A323A002879401C2871002036 +:10F41000E3F7CFF92879002801D101202871687914 +:10F42000002809D0BB48372140300379421DA81D70 +:10F43000FFF7C0FD6C711DE00120FFF728FE0028DA +:10F4400018D106213000E5F77EF92C6012E028681B +:10F45000B04201D0042070BD002AF2D00021080083 +:10F460009047EEE7FFF77BFF0022286C11001300A6 +:10F47000FFF783FE032070BDF8B500200F00079E44 +:10F48000002A2FD011898C18A17809090D2929D1BA +:10F49000250020352978112924D16978012921D125 +:10F4A000E87800280CD128000C30FFF780FC0028F9 +:10F4B00017D09848A21D006C2B00911DFFF75DFE30 +:10F4C000002E0ED060782278010211432800B04748 +:10F4D000002806D08F4C06212068E5F734F900207B +:10F4E00020600120002F09D03968C96D89780A078A +:10F4F000920F03D109090D2900D10120F8BDF7B5FC +:10F5000092B005000C0083480B2189016E18056438 +:10F51000B1690191E17B0068C9060F0F002801D095 +:10F52000012002E0082F05D3032020700020C043F3 +:10F5300015B04BE5E868C10420000F300029109099 +:10F5400057DA280006F008FB002852D072480078ED +:10F55000800707D4207C8006410F280000F0D0F8F7 +:10F56000002846D0382102A8FDF2EAEF6B4802904D +:10F570006B4803906B480490601CFEF288E87D2382 +:10F58000DB00584308AB0A90187D06210843187524 +:10F590000E9570693722007B18747069407B800774 +:10F5A000800F58747069407B0007800F98747069F1 +:10F5B000584E407B8006800FD87435641099B01D7A +:10F5C000FDF222EF1498463802065748120E0271D7 +:10F5D00004D021004631401DFDF216EF012502A89E +:10F5E0007571E4F712FF0028306000D1451E280035 +:10F5F00016E010980121FFF7DAFB00280DD00198E2 +:10F60000BA0010180D2292018018406901212030A3 +:10F61000C17504202070002002E003202070001F2C +:10F62000411C85D10121217082E770B505000B20B6 +:10F63000800128184469002090B00190E868C00457 +:10F640003CD5280006F088FA002837D02800FFF7BC +:10F650000CFD002803D13048007880072ED5280003 +:10F6600001A9FFF7FBFA6B461E79002E28D038213E +:10F6700002A8FDF266EF27486021FDF262EF2748FD +:10F680000290274803902948049029480E9570431A +:10F690000A90207B08AB1874607B8007800F587439 +:10F6A000607B0007800F9874607B8006800FD874A1 +:10F6B00002A8E4F7AAFE17490D64086010B070BDF7 +:10F6C000FFF74DFE0028F9D000221100280013009A +:10F6D000FFF753FDF2E70B220300920110B59C18CF +:10F6E000A2690800002A09D0FFF2ADF8142358439C +:10F6F000A169001D085C0007C00F10BD002010BDEF +:10F7000010B504000800FFF28DF801002000FFF79B +:10F71000E2FF10BD985F01C010FE00C045EA010085 +:10F72000CDEA010069E70100D85F01C055E701009B +:10F7300090D00300F0B501201C490978012901D0BF +:10F740000020F0BD1A491B4E097802233374194A70 +:10F75000A024203214710124012901D1147104E084 +:10F76000022902D100211171F8E73374A12111712E +:10F7700000230121182703E0032901D10123337459 +:10F78000726ACC003D1B0C4CEC4012062406120E93 +:10F79000240EA24201D0002002E0491C0329EBDD27 +:10F7A000002BCED101213174716AF0BDB1B90200D4 +:10F7B000B0B902000008009058303338D35E2443BB :10F7C0000100000010EE0100000400001313083DCA -:10F7D00011898C18A17809090D2929D12500203516 -:10F7E0002978112924D16978012921D1E8780028C4 -:10F7F0000CD128000C30FFF780FC002817D09A4865 -:10F80000A21D006C2B00911DFFF75DFE002E0ED097 -:10F8100060782278010211432800B047002806D002 -:10F82000914C06212068E4F79FFE00202060012013 -:10F83000002F09D03968C96D89780A07920F03D162 -:10F8400009090D2900D10120F8BDF7B592B00500D6 -:10F850000C0085480B2189016E180564F16B01913C -:10F86000E17B0068C9060F0F002801D0012002E0EB -:10F87000082F05D3032020700020C04315B04BE5AE -:10F88000E868C10420000F300029109057DA2800E2 -:10F8900006F06EF9002852D074480078800707D42B -:10F8A000207C8006410F280000F0D3F8002846D0C5 -:10F8B000382102A8FDF24EEE6D4802906D4803908B -:10F8C0006D480490601CFDF2ECEE7D23DB00584394 -:10F8D00008AB0A90187D0621084318750E95B06B89 -:10F8E0003722007B1874B06B407B8007800F587400 -:10F8F000B06B407B0007800F9874B06B5A4E407B12 -:10F900008006800FD87435641099B01DFDF286ED25 -:10F910001498463802065948120E027104D021008C -:10F920004631401DFDF27AED012502A87571E4F71C -:10F9300084FC0028306000D1451E280016E0109895 -:10F940000121FFF7DAFB00280DD00198BA0010184A -:10F950000D2292018018406901212030C1750420D8 -:10F960002070002002E003202070001F411C85D180 -:10F970000121217082E730B50400002091B0019090 -:10F98000E068C00443D5200006F0F2F800283ED01D -:10F990002000FFF710FD002803D1344800788007CD -:10F9A00035D5200001A9FFF7FFFA6B461D79002D20 -:10F9B0002FD0382102A8FDF2CEED2B486021FDF2B8 -:10F9C000CAED2B4802902B4803902D4804902D48F7 -:10F9D0000E9468430A900B2080012018816B08ABBD -:10F9E000097B1974816B497B8907890F5974816B75 -:10F9F000497B0907890F9974806B407B8006800FD3 -:10FA0000D87402A8E4F719FC17490C64086011B017 -:10FA100030BDFFF74AFE0028F9D000221100200077 -:10FA20001300FFF750FDF2E70B220300920110B51F -:10FA30009C18E26B0800002A09D0FEF20EFF142386 -:10FA40005843E16B001D085C0007C00F10BD00208B -:10FA500010BD10B504000800FEF2EEFE010020000B -:10FA6000FFF7E2FF10BD0000486201C0E0FB00C0EC -:10FA70007DED010005EE0100A1EA0100886201C0F0 -:10FA80008DEA010090D00300F0B501201C490978EF -:10FA9000012901D00020F0BD1A491B4E097802232C -:10FAA0003374194AA024203214710124012901D190 -:10FAB000147104E0022902D100211171F8E73374B6 -:10FAC000A121117100230121182703E0032901D18D -:10FAD00001233374726ACC003D1B0C4CEC401206BF -:10FAE0002406120E240EA24201D0002002E0491C7E -:10FAF0000329EBDD002BCED101213174716AF0BDF9 -:10FB0000B1B90200B0B90200000800905830333893 -:10FB100070B500241C4D2878012803D0022801D09C -:10FB2000002070BD0020EBF248FE1849884200D149 -:10FB300001242878022824D1012C22D11548144907 -:10FB400081609F214162416A0D06416A2D0E406A23 -:10FB5000EBF2EAFDFF2D01D1002412E00E4E3570CC -:10FB6000EBF2F5FD31781F2901D10C2100E01C21B9 -:10FB7000084206D0EBF2E2FD0020EBF2F6FDEBF2DC -:10FB800013FE200070BD0000C4B9020058303338A5 -:10FB90008204000000080090C5B902006B496A4861 -:10FBA00008806B48091D0880091D08880722520338 -:10FBB0001040684A104308807047F8B5634D083D0F -:10FBC0002888702108432880634F00240006D568E8 +:10F7D00070B500241C4D2878012803D0022801D0E0 +:10F7E000002070BD0020EBF2E8FF1849884200D1EC +:10F7F00001242878022824D1012C22D1154814494B +:10F8000081609F214162416A0D06416A2D0E406A66 +:10F81000EBF28AFFFF2D01D1002412E00E4E35706D +:10F82000EBF295FF31781F2901D10C2100E01C215A +:10F83000084206D0EBF282FF0020EBF296FFEBF2DB +:10F84000B3FF200070BD0000C4B902005830333847 +:10F850008204000000080090C5B902006B496A48A4 +:10F8600008806B48091D0880091D0888072252037B +:10F870001040684A104308807047F8B5634D083D52 +:10F880002888702108432880634F002426003B20ED +:10F89000021B6249380002F08CEBC007C00F310038 +:10F8A000001871418100014328880F22D243104083 +:10F8B000084328802888052108432880641C3C2CA4 +:10F8C000E5DB28882F21C94308402880F8BD4F492F +:10F8D00010B508390888702210430880504B00206A +:10F8E00005240A881A400A800A8822430A80401C9C +:10F8F0003C28F6DB08882F22D2431040088010BD38 +:10F90000484A536898420AD05060404B0204920D16 +:10F91000103B1A803D4A8006800E1032108008018C +:10F920003A49401C091F088038490C3908880004EE +:10F93000FCD5704770B5002403000E00250008F0C8 +:10F94000BCEC31001800FFF7DBFF364800680028E8 +:10F9500013D12E4824380488E217001D0388DD17D0 +:10F96000001D0188001D00881E0C2D0435431B045A +:10F9700015431C430D43000405432000290070BDBE +:10F980000021D7E7F0B51500160C1FB41C001F0CA2 +:10F9900008F092EC0098FFF7F3FF22488560C460FE +:10F9A0001A4824380580001D0680001D0480001DB3 +:10F9B0000780FFF762FF00980121FFF7A1FFFFF723 +:10F9C00086FF05B0F0BD030000B508F076EC00211D +:10F9D0001800FFF795FF0D4814380088800701D5FF +:10F9E000012000BD002000BD10B5040008F064EC4B +:10F9F0002000FFF7E8FFFFF740FF02212000FFF79C +:10FA00007FFFFFF764FF10BD809800002C06009078 +:10FA10003F4900003F090000C61A6BACB1C61A0B83 +:10FA2000F0FF000070FA00C0F8B50C00110089A2C8 +:10FA3000126803002000009231D0112252019D185B +:10FA40002A7A002A2BD0182929D3FDF2AEED4421C1 +:10FA5000217000216170687AA0700127A61D032221 +:10FA6000300069462771FDF2DAECA87AF61C307096 +:10FA7000761C3770B61C032230006946FDF2CEECCE +:10FA8000E87AF61C3070761C032230006946FDF2DD +:10FA9000C6EC297BB01DF170011B891E6170001B33 +:10FAA0000006000EF8BD4522D2000621801810B5D0 +:10FAB000FDF250ED10BDF0B50A78442A44D100247F +:10FAC0004E788A1C2700250021002B00FDF2C2EE93 +:10FAD0000705071B101B202C330002212BE0117897 +:10FAE0004170012900D90124921CF6E7921C19E00B +:10FAF000D21C1178012903D0022901D0012400E091 +:10FB00008170521CE9E711780129EFD90124EDE752 +:10FB1000D21C1178012903D0022901D0012400E070 +:10FB2000C170521C042106E0D178012901D00229BC +:10FB300010D101710EE0002F0CD1731A1E0436147F +:10FB4000002C01D1002E01DC0120F0BD6D1C2D0622 +:10FB50002D0EBAE70020F0BD70B505004520C000AD +:10FB60002818FFF7A8FF0400012803D12800FFF799 +:10FB70009AFF04E011210120490169180872200050 +:10FB800070BD03002122D25C0020D20902D0FF22E6 +:10FB9000180049E770477FB50C000D1D2121095C55 +:10FBA000C90923D0FF2168312170090A6170102131 +:10FBB000A17000218030E1700068002804D110217C +:10FBC0002800FDF2F2EC0AE001003631DC5AE3F8DD :10FBD000010000000CF2010000040000ACD62D8EE4 -:10FBE00026003B20021B6249380002F010EBC007E0 -:10FBF000C00F3100001871418100014328880F2295 -:10FC0000D2431040084328802888052108432880D3 -:10FC1000641C3C2CE5DB28882F21C9430840288040 -:10FC2000F8BD4F4910B50839088870221043088084 -:10FC3000504B002005240A881A400A800A88224373 -:10FC40000A80401C3C28F6DB08882F22D243104053 -:10FC5000088010BD484A536898420AD05060404B13 -:10FC60000204920D103B1A803D4A8006800E10322D -:10FC7000108008013A49401C091F088038490C3996 -:10FC800008880004FCD5704770B5002403000E00FE -:10FC9000250008F0E2EA31001800FFF7DBFF3648E4 -:10FCA0000068002813D12E4824380488E217001D6C -:10FCB0000388DD17001D0188001D00881E0C2D041F -:10FCC00035431B0415431C430D430004054320002A -:10FCD000290070BD0021D7E7F0B51500160C1FB440 -:10FCE0001C001F0C08F0B8EA0098FFF7F3FF224849 -:10FCF0008560C4601A4824380580001D0680001DF8 -:10FD00000480001D0780FFF762FF00980121FFF7C4 -:10FD1000A1FFFFF786FF05B0F0BD030000B508F0B6 -:10FD20009CEA00211800FFF795FF0D481438008861 -:10FD3000800701D5012000BD002000BD10B50400E2 -:10FD400008F08AEA2000FFF7E8FFFFF740FF0221F2 -:10FD50002000FFF77FFFFFF764FF10BD80980000D1 -:10FD60002C0600903F4900003F090000C61A6BAC0A -:10FD7000B1C61A0BF0FF000040F800C0F8B50C0047 -:10FD8000110089A2126803002000009231D01122D4 -:10FD900052019D182A7A002A2BD0182929D3FDF266 -:10FDA0000EEC4421217000216170687AA070012757 -:10FDB000A61D0322300069462771FDF23AEBA87AAE -:10FDC000F61C3070761C3770B61C03223000694672 -:10FDD000FDF22EEBE87AF61C3070761C0322300020 -:10FDE0006946FDF226EB297BB01DF170011B891ECF -:10FDF0006170001B0006000EF8BD4522D2000621EE -:10FE0000801810B5FDF2B0EB10BDF0B50A78442AA9 -:10FE100044D100244E788A1C2700250021002B00A5 -:10FE2000FDF222ED0705071B101B202C33000221D9 -:10FE30002BE011784170012900D90124921CF6E7CA -:10FE4000921C19E0D21C1178012903D0022901D09B -:10FE5000012400E08170521CE9E711780129EFD9F3 -:10FE60000124EDE7D21C1178012903D0022901D029 -:10FE7000012400E0C170521C042106E0D178012960 -:10FE800001D0022910D101710EE0002F0CD1731A9C -:10FE90001E043614002C01D1002E01DC0120F0BD1F -:10FEA0006D1C2D062D0EBAE70020F0BD70B50500C3 -:10FEB0004520C0002818FFF7A8FF0400012803D13F -:10FEC0002800FFF79AFF04E0112101204901691879 -:10FED0000872200070BD03002122D25C0020D209EC -:10FEE00002D0FF22180049E770477FB50C000D1DB6 -:10FEF0002121095CC90923D0FF2168312170090A39 -:10FF000061701021A17000218030E170006800282C -:10FF100004D110212800FDF252EB0AE00100363135 -:10FF200010226846EFF264FE102228006946FDF2B6 -:10FF300080EAE078A17800020843001D04B070BD9B -:10FF40000020FBE77CB5140006002825002904D01A -:10FF50006846FFF75AFF012801D125801EE01120D5 -:10FF6000400130186B465978427A914201D93120CC -:10FF700013E06B46817A9A78914201D02B200CE0F5 -:10FF80006B46D978C27A914201D0302005E06B46A9 -:10FF90001979007B814203D02F20208000207CBD76 -:10FFA0000020208001207CBD00147200222801D393 -:10FFB00004207047082801D30029F9D10120704797 -:10FFC00070B505000E0014000320F3F75FFBB000CE -:10FFD000FF30801C290208180004000C3E5DC8E8B0 +:10FBE00010226846F0F204F8102228006946FDF25F +:10FBF00020ECE078A17800020843001D04B070BD3D +:10FC00000020FBE77CB5140006002825002904D05D +:10FC10006846FFF75AFF012801D125801EE0112018 +:10FC2000400130186B465978427A914201D931200F +:10FC300013E06B46817A9A78914201D02B200CE038 +:10FC40006B46D978C27A914201D0302005E06B46EC +:10FC50001979007B814203D02F20208000207CBDB9 +:10FC60000020208001207CBD00147200222801D3D6 +:10FC700004207047082801D30029F9D101207047DA +:10FC800070B505000E0014000320F3F787FBB000E9 +:10FC9000FF30801C290208180004000C2100F2F239 +:10FCA000B1F90120F3F77AFB70BD70B505000E00C5 +:10FCB00014000320F3F772FBB000FF30C01C2902D0 +:10FCC00008180004000C2100F2F29CF90120F3F75F +:10FCD00065FB70BDAB49085C70470A2801D9FF205D +:10FCE0007047A8491F31085C70470A23A54958434B +:10FCF0002C314018401C10B5FDF2DCEC10BD10B5E5 +:10FD00000C000A239F4958432C314118491C2000FC +:10FD1000FDF2E0EC200010BD0A239A4958432C3133 +:10FD2000085C70470A23974A59432C3289180818EF +:10FD3000C07970470838022801D801207047002098 +:10FD40007047FEB500200090F3F786FC8D48002533 +:10FD50002C3001E0012D01D8802700E0A0270A21E6 +:10FD6000884869432C30081801908479401CFDF2C2 +:10FD7000A2EC06010020F3F7E5FCC719F5F7F5FA48 +:10FD8000002807D0F5F7A1FA0D2803D1F5F7B5FA49 +:10FD9000C0008619BE4203DB002C01D0002404E021 +:10FDA000BE4202DA002C00D1012401988471AC40DB +:10FDB00000986D1C04430B2D0094CBD30024200627 +:10FDC0000099000EF3F7D9FC641C012CF7D3FEBD9B +:10FDD0000A236C4958432C3140188079704770B51C +:10FDE00004000D00EFF7C2FE0320F3F7D7FAA800D6 +:10FDF000FF30401C210208180004000CF2F2E6F863 +:10FE000004000120F3F7CAFAEFF7EBFE200070BD03 +:10FE1000FEB507000B2870D20A205A4978432C31CE +:10FE20004418F3F719FC6B461872F3F712FC6B4693 +:10FE30005872601CFDF23EEC6B46187138000838B1 +:10FE4000012502280AD8F3F70AFC41086B4601296C +:10FE5000987152D10840801C987101E06B469D71E9 +:10FE600020780021082801D0092803D102206B4600 +:10FE7000587105E007286B4601D15D7100E05971AA +:10FE80000025019902986A46F5F7DFFB002805D0A6 +:10FE9000F3F7E2FB3D206119C87107E0F3F7DCFBE3 +:10FEA0000028F7D0F3F7D8FB0128F3D0FF21601921 +:10FEB00001720021012F417205D2601CFDF2FAEBA4 +:10FEC00040001C3004E0601CFDF2F4EB40002C30DC +:10FED0006119C8716619F2793900280000F03CF800 +:10FEE000327A39002800FFF7CBFE727A39002800F9 +:10FEF000FFF7DBFE6D1C012DC3DBFEBD10B5EFF778 +:10FF000035FE00242000FFF783FF641C2406240E26 +:10FF10000B2CF7D31C480088002801D0FFF711FFF5 +:10FF2000EFF75FFE10BD174910B5FF24491EB0342E +:10FF3000012807D10870EFF7D8FD0F212000F2F259 +:10FF400089F810BD0028FCD10870EFF7C7FD0F211C +:10FF50002000F2F274F810BD70B505000E00140018 +:10FF60000320F3F71BFAB000FF30401C29020818E9 +:10FF70000004000C2100F2F245F80120F3F70EFA1C +:10FF800070BD000055FD00C010FA00C010B5002083 +:10FF900003F0B8F90028FAD103F0B4F90028F6D13B +:10FFA000411E1148006803F0A1F9F0F764F8002041 +:10FFB00010BD10B5F0F765F80B48006803F09DF927 +:10FFC00010BD0A4810B50268032109028A43026085 +:10FFD00002680A4302601420EFF774FDDD7B1041D4 :10FFE0000100000008F6010000040000FF0CFEE222 -:10FFF0002100F2F211F80120F3F752FB70BD70B549 +:10FFF00010BD142010B5EFF76FFD10BD6C2201C0CD :020000022000DC -:1000000005000E0014000320F3F74AFBB000FF3098 -:10001000C01C290208180004000C2100F1F2FCFFAA -:100020000120F3F73DFB70BDA549085C70470A2825 -:1000300001D9FF207047A2491F31085C70470A238D -:100040009F4958432C314018401C10B5FDF23CEB41 -:1000500010BD10B50C000A23994958432C314118A2 -:10006000491C2000FDF240EB200010BD0A239449FA -:1000700058432C31085C70470A23914A59432C326B -:1000800089180818C07970470838022801D801205B -:10009000704700207047FEB500200090F3F79EFCEB -:1000A000874800252C3001E0012D01D8802700E091 -:1000B000A0270A21824869432C30081801908479CE -:1000C000401CFDF202EB06010020F3F705FDC71905 -:1000D000F5F705FB002807D0F5F7B1FA0D2803D195 -:1000E000F5F7C5FAC0008619BE4203DB002C01D02B -:1000F000002404E0BE4202DA002C00D10124019861 -:100100008471AC4000986D1C04430B2D0094CBD33C -:10011000002420060099000EF3F7F9FC641C012C62 -:10012000F7D3FEBD0A23664958432C314018807925 -:10013000704770B504000D00EFF78CFE0320F3F755 -:10014000AFFAA800FF30401C210208180004000C80 -:10015000F1F246FF04000120F3F7A2FAEFF7B5FE33 -:10016000200070BDF1B584B004980B2862D20498C9 -:100170000A23534958432C314518F3F72FFC6B469B -:100180001873F3F728FC6B465873681CFDF29CEA61 -:100190006B46187204980124083802280AD8F3F72D -:1001A00020FC41086B460129987243D10840801C0D -:1001B000987201E06B469C7228780021082801D0D3 -:1001C000092803D102206B46587205E007286B46C8 -:1001D00001D15C7200E0597200243D270299039816 -:1001E00001AAF5F7ECFB002804D0F3F7F7FB281978 -:1001F000C77107E0F3F7F2FB0028F8D0F3F7EEFB46 -:100200000128F4D0FF2128190172002141722E1912 -:10021000F2790499200000F03DF8327A0499200028 -:10022000FFF7D8FE727A04992000FFF7E8FE641CFD -:10023000012CD3DB05B0F0BD10B5EFF70BFE0024A9 -:100240002000FFF78FFF641C2406240E0B2CF7D32D -:100250001C480088002801D0FFF71DFFEFF735FE8E -:1002600010BD174910B5FF24491EB034012807D12D -:100270000870EFF7AEFD0F212000F1F2F5FE10BD82 -:100280000028FCD10870EFF79DFD0F212000F1F24E -:10029000E0FE10BD70B505000E0014000320F3F75A -:1002A000FFF9B000FF30401C290208180004000CC0 -:1002B0002100F1F2B1FE0120F3F7F2F970BD000068 -:1002C00025FB00C0DCF700C010B5002003F07EF86D -:1002D0000028FAD103F07AF80028F6D1411E11481F -:1002E000006803F067F8EFF7A1FF002010BD10B51C -:1002F000EFF7A2FF0B48006803F063F810BD0A484F -:1003000010B50268032109028A43026002680A43A9 -:1003100002601420EFF74AFD10BD142010B5EFF76E -:1003200045FD10BDAC1E01C0802100802F49022276 -:100330000028486901D1904300E0104348617047AC -:100340002B49886B012210430E229043886370472B -:1003500070B5274DE86B4408264864008443F3F7E2 -:1003600034FFC0022043E8630320F4F7FAF970BDBC -:1003700010B5FFF7E5FFFFF7EBFF10BD70B50025E7 -:100380002C002000F4F22AFB01002000F2F22CFBEA -:100390002000F2F2CCFA01002000F2F22EFBF3F77B -:1003A00014FF0106090E00222000F2F20DFB2900C5 -:1003B0002000F2F22DFB2000FFF736FE01002000A6 -:1003C000F2F2F0FB2000FFF732FEFF2803D001001D -:1003D0002000F4F7B2F9641C2406240E0C2CD0D9AA -:1003E0000549486A0A0C9043486270BDFAD7D09319 +:10000000802100802F4902220028486901D19043B5 +:1000100000E01043486170472B49886B0122104370 +:100020000E2290438863704770B5274DE86B4408F3 +:10003000264864008443F3F708FFC0022043E863C6 +:100040000320F4F7D4F970BD10B5FFF7E5FFFFF713 +:10005000EBFF10BD70B500252C002000F4F2BEFCB3 +:1000600001002000F2F2C0FC2000F2F260FC01006E +:100070002000F2F2C2FCF3F7E8FE0106090E0022AE +:100080002000F2F2A1FC29002000F2F2C1FC2000C5 +:10009000FFF72AFE01002000F2F284FD2000FFF7A6 +:1000A00026FEFF2803D001002000F4F78CF9641C21 +:1000B0002406240E0C2CD0D90549486A0A0C90431A +:1000C000486270BDC0A2008000A10080069CC000F4 +:1000D00000A8008070B505000449F4F2C5FA0400D8 +:1000E00003492800F4F2C0FA001970BDD00E3200A6 +:1000F000F0FD00C070477047064A0021122310B57A +:10010000545C844200D15354491C0906090E03294A +:10011000F6D310BDAAF200C0F3B583B00600B1005B +:1001200004980078019004988478C5782A480818C3 +:10013000FF30401C0290FDF2C8EA102828D2264B5E +:1001400000213202D21811E00B01D65C019FBE42A1 +:100150000BD1D3189E78A64202D8DF78A74217D2D7 +:10016000AE4202D8DB78AB4212D2491C8842EBD8AF +:100170000801101804991022FDF264E90298FDF2BA +:10018000A4EA0299401CFDF2B0EA012005B0F0BDDE +:100190000020FBE7FF211048491D10B5FDF218EAC9 +:1001A00010BD10B5F5F22BF9F5F238F9F5F246F974 +:1001B000F5F255F9F5F264F9F5F271F9F5F27FF916 +:1001C000F5F2B1F9F5F2E9F9F5F25BFAF5F2C7FAF1 +:1001D000FFF7E0FF10BD0000F85F01C038B5002157 +:1001E000FF4A00911178FD25FB240C296B4616D19E +:1001F000527C19785206D20F294052001143F84A16 +:100200000091127B002803D12140D007C00F02E0EB +:100210002140D006C00F80000843009003E018780A +:1002200028402040009038BDEF49EE480860F04972 +:10023000EE480860F049EF480860704770B5FF2449 +:1002400005000E000D34C4B0210001A8FDF296E9AE +:1002500032002800230001A9F5F2A4FA6B46D888E1 +:10026000A04200D20400210001A8F5F28BFA002878 +:100270000FD00026340001AD06E0200141190C31F9 +:100280003000FFF749FF641C6B46987BA042F4DC0A +:10029000012044B070BDD24810B52030C07DD34994 +:1002A0000209891E0007000F4A700870F5F7B0F8C0 +:1002B000D24C606A6030817A0020EEF77EFF606A7F +:1002C0006030C17A0120EEF778FF002010BD7CB5C8 +:1002D0000C000600012565E0220030000823694675 +:1002E000F5F260FA0098401C5ED06B465888019980 +:1002F0000019814258D3002E03D0FF212D318842AE +:1003000052D86B461B782F2B2BD016DC1F2B28D0F6 +:100310000ADC0E2B1AD0102B1DD0122B3FD121003E +:100320003000F5F241FC1AE0252B0FD02A2B36D1F4 +:1003300021003000F5F283FC11E0313BFDF29EEA32 +:1003400009162F2F1B20252F2F2A2F0021003000C8 +:10035000F5F2AFFA03E021003000F5F296FB05005C +:100360001DE021003000F5F242FCF8E721003000EA +:10037000F5F2BCFCF3E721003000F5F2F5FDEEE705 +:1003800021003000F5F214FEE9E721003000F5F21B +:1003900033FEE4E721003000FFF750FFDFE7019C68 +:1003A000002D01D0601C97D10120002D00D000202D +:1003B0007CBD8B48402110B5FDF2E0E810BD70B562 +:1003C00015000A0086494023F5F2ECF984484021E3 +:1003D000F5F2D8F900280BD0814CE07A002802D041 +:1003E000A07C3320A07420780C2803D09870B00B28 :1003F0000100000004FA0100000400000B638B56AA -:10040000C0A2008000A10080069CC00000A800805F -:1004100070B505000449F4F231F9040003492800DD -:10042000F4F22CF9001970BDD00E3200C0FB00C0F0 -:10043000F3B583B00600B1000498007801900498E9 -:100440008478C5782A480818FF30401C0290FDF2D5 -:1004500046E9102828D2264B00213202D21811E09A -:100460000B01D65C019FBE420BD1D3189E78A642E9 -:1004700002D8DF78A74217D2AE4202D8DB78AB426F -:1004800012D2491C8842EBD8080110180499102296 -:10049000FCF2E2EF0298FDF222E90299401CFDF223 -:1004A0002EE9012005B0F0BD0020FBE7FF21104838 -:1004B000491D10B5FDF296E810BD10B5F4F2A9FF84 -:1004C000F4F2B6FFF4F2C4FFF4F2D3FFF4F2E2FF69 -:1004D000F4F2EFFFF4F2FDFFF5F22FF8F5F267F812 -:1004E000F5F2D9F8F5F245F9FFF7E0FF10BD00008D -:1004F000A86201C038B50021FF4A00911178FD259E -:10050000FB240C296B4616D1527C19785206D20F67 -:10051000294052001143F84A0091127B002803D170 -:100520002140D007C00F02E02140D006C00F80005C -:100530000843009003E0187828402040009038BD20 -:10054000EF49EE480860F049EE480860F049EF488E -:100550000860704770B5FF2405000E000D34C4B06C -:10056000210001A8FDF214E832002800230001A9AF -:10057000F5F222F96B46D888A04200D2040021008F -:1005800001A8F5F209F900280FD00026340001ADCA -:1005900006E0200141190C313000FFF749FF641CCF -:1005A0006B46987BA042F4DC012044B070BDD24879 -:1005B00010B52030C07DD3490209891E0007000F05 -:1005C0004A700870F5F7DEF8D24C606A6030817AC4 -:1005D0000020EEF774FF606A6030C17A0120EEF708 -:1005E0006EFF002010BD7CB50C000600012565E003 -:1005F0002200300008236946F5F2DEF80098401C1E -:100600005ED06B46588801990019814258D3002E5C -:1006100003D0FF212D31884252D86B461B782F2BF7 -:100620002BD016DC1F2B28D00ADC0E2B1AD0102B57 -:100630001DD0122B3FD121003000F5F2BFFA1AE095 -:10064000252B0FD02A2B36D121003000F5F201FBEB -:1006500011E0313BFDF21CE909162F2F1B20252F3D -:100660002F2A2F0021003000F5F22DF903E02100A0 -:100670003000F5F214FA05001DE021003000F5F21B -:10068000C0FAF8E721003000F5F23AFBF3E7210069 -:100690003000F5F273FCEEE721003000F5F292FC39 -:1006A000E9E721003000F5F2B1FCE4E72100300079 -:1006B000FFF750FFDFE7019C002D01D0601C97D1B0 -:1006C0000120002D00D000207CBD8B48402110B5BA -:1006D000FCF25EEF10BD70B515000A00864940239C -:1006E000F5F26AF884484021F5F256F800280BD05C -:1006F000814CE07A002802D0A07C3320A0742078BE -:100700000C2803D00D2801D0012070BDFFF74FFF4A -:100710006168296070BD70B506007A480D00801CC4 -:10072000417900790C0204437648001F4078002884 -:100730000CD074490622891C3000FCF28EEE6F4901 -:100740002200B01DFCF288EEA41D04E06B492200DB -:100750003000FCF282EE00202C6070BD70B5050008 -:100760000C00401C03D16C492004884203D02004B3 -:10077000000C284305D1FF24684DFF34002007F00A -:1007800084ED67488562C4626648006805608480BD -:1007900070BD70B586B0482001A9EEF749FE0198FA -:1007A00005A90004000C01904C20EEF741FE0198D1 -:1007B000FF262D36B04202D9012006B070BD4F4D44 -:1007C000002409E0059804A90019EEF731FE049809 -:1007D000EBF2F2FD2851241D01988442F2D30598D2 -:1007E00002A920E004A9EEF723FE04980199000C69 -:1007F00004900818B0421CD800240BE0EF12ACEAB9 +:100400000D2801D0012070BDFFF74FFF6168296002 +:1004100070BD70B506007A480D00801C41790079E6 +:100420000C0204437648001F407800280CD0744921 +:100430000622891C3000FDF210E86F492200B01D31 +:10044000FDF20AE8A41D04E06B4922003000FDF231 +:1004500004E800202C6070BD70B505000C00401C45 +:1004600003D16C492004884203D02004000C2843A7 +:1004700005D1FF24684DFF34002007F040EF6748A6 +:100480008562C462664800680560848070BD70B58E +:1004900086B0482001A9EEF753FE019805A9000493 +:1004A000000C01904C20EEF74BFE0198FF262D36F4 +:1004B000B04202D9012006B070BD4F4D002409E0C2 +:1004C000059804A90019EEF73BFE0498EBF274FFBF +:1004D0002851241D01988442F2D3059802A920E0F6 +:1004E00004A9EEF72DFE04980199000C0490081859 +:1004F000B0421CD800240BE0029803A90019EEF7C3 +:100500001FFE0398EBF258FF01990919241D68504A +:1005100004988442F0D304990198401801900298FD +:1005200002A9001DEEF70CFE0298411CD8D13449F7 +:100530000198891C0871000A48710120891F087000 +:10054000059888800020B6E710B5012486B0EEF744 +:10055000DCFD0C2002A9EEF7F3FD102001A9EEF757 +:10056000EFFD01990298FFF777FF4C2005A9EEF700 +:10057000E7FD0598411C18D004A9EEF7E1FD0498A9 +:100580000006000E0C2801D00D280ED1FFF77FFFCA +:1005900000280AD1059903AAFFF71BFF002804D100 +:1005A000002403992000FFF79CFEEEF7C5FD200014 +:1005B00006B010BD0EB501A96846EEF763FF0099BD +:1005C0000198FFF749FF0E4BFF210B489B1D80222E +:1005D0002D31EEF7F4FF00280BD109480121001F4F +:1005E000017080218180002002AAFFF7F2FE00281E +:1005F0001AD017E0286201C0FC6001C090BB020065 +:1006000000FE00C094BB0200F5F7010098BB020099 +:10061000F05800040000FFFF0050430200A50080D6 +:1006200030F800C001200EBD02990020FFF759FEEE +:1006300000200EBDF8B50500140000783D4E0127DE +:10064000002801D001280CD16878002809D1394848 +:1006500006222900801D7770FCF2FEEEA41FAD1D5E +:1006600006E00020707033480621801DFCF2BAEFCE +:10067000FF222D32944200D222002E48110A801D02 +:10068000027141712C482900FCF2E6EE002037701F +:100690000100B08028006A46FFF79BFE002801D0C9 +:1006A0000120F8BD00992800FFF71BFE0020F8BDCF +:1006B0007FB504000D0000280FD0002B05D12000CD +:1006C00002A9FFF7A6FE040021E000F023F8029A39 +:1006D00029002000FFF7AEFF0CE007F014EE012820 +:1006E00004D100F017F8FFF72FFF03E000F012F835 +:1006F000FFF760FF04000AD00E490020891D087032 +:1007000048708870C8700871487100F003F82000C4 +:1007100004B070BDFF2108482D3110B5FCF238EF50 +:10072000FFF749FDFFF74FFEEFF77EF80149002084 +:10073000087010BDFCFD00C0FC6001C0144A01003F +:100740001C3110B51160134A134B106002004C327B +:100750001A60FF22027000224280027101234622A9 +:10076000135260220A615A02CA600C4A028642860B +:100770008286C2860A4ACA8009220A7204224A7202 +:10078000074A521E4A8101F024FC012010BD0000DE +:1007900030F800C034F800C038F800C0FFFF000097 +:1007A0002B0900001FB5190014006B469A88C287F8 +:1007B000FF2251321452FF3006224A30FCF24CEE36 +:1007C0002000F5F247FC1FBDFFB581B000230600F5 +:1007D0004469AC203518308168782A7807021743BD +:1007E000039A2800F7F28FFAF84A00920022039841 +:1007F0000E211300F6F238FAF5494860582A348180 :100800000100000000FE01000004000058B9583A41 -:10081000029803A90019EEF715FE0398EBF2D6FD36 -:1008200001990919241D685004988442F0D3049951 -:10083000019840180190029802A9001DEEF702FEEF -:100840000298411CD8D134490198891C0871000ACA -:1008500048710120891F0870059888800020B6E73C -:1008600010B5012486B0EEF7D2FD0C2002A9EEF7F8 -:10087000E9FD102001A9EEF7E5FD01990298FFF7C7 -:1008800077FF4C2005A9EEF7DDFD0598411C18D037 -:1008900004A9EEF7D7FD04980006000E0C2801D03D -:1008A0000D280ED1FFF77FFF00280AD1059903AA72 -:1008B000FFF71BFF002804D1002403992000FFF755 -:1008C0009CFEEEF7BBFD200006B010BD0EB501A9E1 -:1008D0006846EEF74DFF00990198FFF749FF0E4B70 -:1008E000FF210B489B1D80222D31EEF7DEFF0028F3 -:1008F0000BD109480121001F017080218180002057 -:1009000002AAFFF7F2FE00281AD017E0D86401C04F -:10091000AC6301C090BB0200D0FB00C094BB0200DE -:10092000F9FA010098BB0200E45800040000FFFF40 -:100930000050430200A50080E8F500C001200EBD74 -:1009400002990020FFF759FE00200EBDF8B5050002 -:10095000140000783D4E0127002801D001280CD159 -:100960006878002809D1394806222900801D77704F -:10097000FCF27CEDA41FAD1D06E000207070334832 -:100980000621801DFCF238EEFF222D32944200D267 -:1009900022002E48110A801D027141712C48290045 -:1009A000FCF264ED002037700100B08028006A4638 -:1009B000FFF79BFE002801D00120F8BD0099280018 -:1009C000FFF71BFE0020F8BD7FB504000D000028D6 -:1009D0000FD0002B05D1200002A9FFF7A6FE0400CE -:1009E00021E000F023F8029A29002000FFF7AEFF73 -:1009F0000CE007F058EC012804D100F017F8FFF7DD -:100A00002FFF03E000F012F8FFF760FF04000AD0A8 -:100A10000E490020891D087048708870C8700871E0 -:100A2000487100F003F8200004B070BDFF210848B1 -:100A30002D3110B5FCF2B6EDFFF749FDFFF74FFE83 -:100A4000EFF766F801490020087010BDCCFB00C02C -:100A5000AC6301C0144A01001C3110B51160134A87 -:100A6000134B106002004C321A60FF220270002209 -:100A70004280027101234622135260220A615A0207 -:100A8000CA600C4A028642868286C2860A4ACA80A8 -:100A900009220A7204224A72074A521E4A8101F050 -:100AA000C6FB012010BD0000E8F500C0ECF500C059 -:100AB000F0F500C0FFFF00002B0900001FB5190072 -:100AC00014006B469A88C287FF2279321452FF3095 -:100AD00006227230FCF2CAEC2000F5F2C5FA1FBD06 -:100AE000FFB581B0002306004469AC203518308181 -:100AF00068782A7807021743039A2800F7F20DF95D -:100B0000F84A0092002203980E211300F6F2B6F87C -:100B1000F54948602000FEF744F900280DD00B206D -:100B200080012018C16B1B20F04A400108188A1868 -:100B3000837F417F2800F5F26DFFEA481C38017F72 -:100B4000002905D00200437F1E322800F5F262FF23 -:100B50000A98002809D00498002806D039060A9B74 -:100B6000049A090E2800F5F28CFF3B002A000121AF -:100B70002000F6F7ECF8002C18D0207A032815D1C5 -:100B8000607A01235B03032800D00023D8480022A9 -:100B90000343290020000092FBF7C3FB69782A7801 -:100BA0000902114340182870000A68703000E6F707 -:100BB00014F9401C07D10021012000F08AF900201F -:100BC000C04305B0F0BD0020FBE7FEB50C00FF21DF -:100BD0000700F531E6F755F8050005D100210120A1 -:100BE00000F077F9681EFEBD288922004619BB2057 -:100BF00080003918280000230094E6F797F8BA49D6 -:100C0000E0880880019022890199300092A57267DE +:100810002000FEF72AF900280DD00B2080012018B7 +:1008200081691B20F04A400108188A18837F417FA4 +:100830002800F6F2EFF8EA481C38017F002905D0BD +:100840000200437F1E322800F6F2E4F80A980028DE +:1008500009D00498002806D039060A9B049A090E8C +:100860002800F6F20EF93B002A0001212000F6F7DD +:10087000B8F8002C18D0207A032815D1607A01230B +:100880005B03032800D00023D8480022034329003B +:1008900020000092FBF731FB69782A7809021143A6 +:1008A00040182870000A68703000E6F759F9401CBB +:1008B00007D10021012000F08AF90020C04305B0D3 +:1008C000F0BD0020FBE7FEB50C00FF210700F5316D +:1008D000E6F79BF8050005D10021012000F077F92B +:1008E000681EFEBD2889220046195920C00039180B +:1008F000280000230094E6F7DDF8BA49E088088074 +:1009000001902289019930000023F7F28CF9A18F20 +:1009100000220192009122002100A36B2A320A31A9 +:100920002800FFF75BFFFEBDFFB583B00C00FF2181 +:1009300017000398F531E6F768F8050006D10021A5 +:10094000012000F044F9681E07B0F0BD2889592144 +:1009500046190398C9004118220028000223009478 +:10096000E6F7A8F89F49E08808800290228902995A +:100970003B003000F7F257F9A18F069A01920091DF +:1009800022002100A36B2A320A312800FFF726FF3C +:10099000DAE74006400E022805D0042803D00B28D1 +:1009A00001D0162801D10120704700207047F0B512 +:1009B00000219DB00591018945690E183700203747 +:1009C000002D02D106210120C6E02800E2F75AFEE0 +:1009D00004902800E2F783FE03902800E2F7A2FECD +:1009E0000290F8782C00BA7861340102114301D0EA +:1009F0000320B1E07178327809021143891F09049C +:100A0000B81D09140BAAFAF756FAE5F7F4FF744873 +:100A10001C38007F002822D071491C228818FCF263 +:100A200026ED029A0092039B049A21000BA8F7F28C +:100A30001BF9002813D0E868402108436321E860CF +:100A4000495D89070BD56649091D897E890706D549 +:100A50000499C978490702D580210843E86023003A +:100A600005AA06A90BA8F7F224F90A90F2F712FEDC +:100A7000012819D16B461C7D10E006A9085DFFF71F +:100A800088FF00280AD06B46187D021B0819411CFC +:100A9000FCF2ECEC6B46187D401E0590641EECD514 +:100AA0000A98000900010A900A99280007F020EC32 +:100AB00003004C484068034028000A93E2F760FEB8 +:100AC000020000212800F8F75EFCF8F71DFA0B2061 +:100AD00080012818406901000C310D3007F040EB0F +:100AE00007F032EBF1F217FE03000A9900223800FA +:100AF00007F016EC2800EBF7A2F92800EBF7CFF986 +:100B0000280040306B46197D017604001A7D0A30BA +:100B100006A91C90FCF2AAEC227E0A9B1C992800D4 +:100B200007F0EAEB2800F4F7C9FB2E4801680191B1 +:100B300078793B7902021A4333000C332800FFF71F +:100B40003BFE07F0F2EB280007F0F2EB3100280043 +:100B5000FDF789F80021080000F039F81DB0F0BD5C +:100B60007CB5018945690C18FF2120004931495D98 +:100B700020300600032906D141780078090201439C +:100B8000032000F024F8607821780002084302284E +:100B900002D20020C0437CBD707831780002084347 +:100BA0006B462100D8800C3106226846FCF25EECD0 +:100BB000092228006946E6F727F800207CBD09488D +:100BC000002110B50180FF20E5F771FE10BD00285F +:100BD00010B502D003280BD1022007F0AEEB10BDF8 +:100BE000D85E02C008FE00C07F03000004000100C0 +:100BF0000120F2E708001900002810B509D00428E8 +:100C000005D0052807D1072007F09AEB99F8CAC943 :100C100001000000FC01020000040000F21194C178 -:100C20000023F7F20AF8A18F00220192009122001E -:100C30002100A36B2A320A312800FFF75BFFFEBDBB -:100C4000FFB583B00C00FF2117000398F531E6F7DC -:100C500022F8050006D10021012000F044F9681EA9 -:100C600007B0F0BD2889BB214619039889004118B7 -:100C70002200280002230094E6F762F89F49E088EA -:100C800008800290228902993B003000F6F2D5FFDD -:100C9000A18F069A0192009122002100A36B2A32B3 -:100CA0000A312800FFF726FFDAE74006400E022847 -:100CB00005D0042803D00B2801D0162801D101202B -:100CC000704700207047F0B500219DB00591018963 -:100CD00045690E1837002037002D02D1062101206A -:100CE000C6E02800E2F7D4FB04902800E2F7FDFB01 -:100CF00003902800E2F71CFC0290F8782C00BA78E8 -:100D000061340102114301D00320B1E071783278DF -:100D100009021143891F0904B81D09140BAAFAF727 -:100D200042FAE5F7AEFF74481C38007F002822D055 -:100D300071491C228818FCF2A4EB029A0092039BD2 -:100D4000049A21000BA8F6F299FF002813D0E86856 -:100D5000402108436321E860495D89070BD5664956 -:100D6000091D897E890706D50499C978490702D5E6 -:100D700080210843E860230005AA06A90BA8F6F223 -:100D8000A2FF0A90F2F748FE012819D16B461C7D9C -:100D900010E006A9085DFFF788FF00280AD06B461F -:100DA000187D021B0819411CFCF26AEB6B46187D8A -:100DB000401E0590641EECD50A98000900010A90B7 -:100DC0000A99280007F060EA03004C484068034095 -:100DD00028000A93E2F7DAFB020000212800F8F766 -:100DE0000CFCF8F7CAF90B2080012818806B010071 -:100DF0000C310D3007F084E907F076E9F1F295FC4B -:100E000003000A990022380007F05AEA2800EBF79D -:100E100064F92800EBF791F9280040306B46197D02 -:100E2000017604001A7D0A3006A91C90FCF228EB1A -:100E3000227E0A9B1C99280007F02AEA2800F4F772 -:100E4000F8FB2E480168019178793B7902021A4338 -:100E500033000C332800FFF73BFE07F036EA28008A -:100E600007F036EA31002800FDF7E3F8002108001A -:100E700000F039F81DB0F0BD7CB5018945690C184A -:100E8000FF2120007131495D20300600032906D181 -:100E90004178007809020143032000F024F86078CB -:100EA000217800020843022802D20020C0437CBD02 -:100EB00070783178000208436B462100D8800C31ED -:100EC00006226846FCF2DCEA092228006946E5F7BA -:100ED000E2FF00207CBD0948002110B50180FF2001 -:100EE000E5F71BFE10BD002810B502D003280BD17A -:100EF000022007F0F2E910BDD86002C0D8FB00C0A4 -:100F00007F030000040001000120F2E7080019003F -:100F1000002810B509D0042805D0052807D10720DE -:100F200007F0DEE910BD0920FAE70520F8E7062002 -:100F3000F6E7FEB50C000700087AC9790126000221 -:100F4000084300D00600FF215D313800E5F7A3FE1D -:100F5000050007D1A079220001210023FFF7D6FF69 -:100F6000681EFEBD2889220040190190BB20800028 -:100F7000391828000B230094E5F7E2FEA079A0378A -:100F80007882701CB88200220092A1790198320008 -:100F90000023F6F2FEFD2800E5F729FF401C05D1ED -:100FA000A079220001210023FFF7B0FF0020FEBD41 -:100FB00038B5150000928A7B4C7B130223430A004C -:100FC000E5F751FF0400401C04D1002D02D003209E -:100FD00007F08AE9200038BDF8B5018945690C1889 -:100FE00020002030417900790B02034304D0220015 -:100FF0000C32052101200BE0FF215D312800E5F7CF -:101000004AFE060007D1220001210C32080000230D -:10101000FFF77CFF34E0308922008719D6F70C22D5 +:100C200010BD0920FAE70520F8E70620F6E7FEB533 +:100C30000C000700087AC97901260002084300D099 +:100C40000600FF215D313800E5F7E9FE050007D118 +:100C5000A079220001210023FFF7D6FF681EFEBD08 +:100C600028892200401901905920C0003918280015 +:100C70000B230094E5F728FFA0798037B880701C1B +:100C8000F88000220092A179019832000023F6F248 +:100C900080FF2800E5F76EFF401C05D1A0792200F7 +:100CA00001210023FFF7B0FF0020FEBD38B515007D +:100CB00000928A7B4C7B130223430A00E5F796FFE0 +:100CC0000400401C04D1002D02D0032007F046EBA5 +:100CD000200038BDF8B5018945690C182000203086 +:100CE000417900790B02034304D022000C32052124 +:100CF00001200BE0FF215D312800E5F790FE0600A2 +:100D000007D1220001210C3208000023FFF77CFFED +:100D100034E03089220087195920C0000C3229188C +:100D200030000B230092E5F7CFFE042186204153CB +:100D30002200283200920322012138000023F6F21B +:100D400028FFB879C107644802D02818426A01E038 +:100D50002818C26A002A01D0083203D13000FDF2FF +:100D6000EDF80BE078783B78010219433800EFF298 +:100D700065FF3000E5F7FEFE401C02D10020C043B5 +:100D8000F8BD0120F8BDF8B50300002442690089D0 +:100D9000E443C0180500203569782E7809023143F4 +:100DA000002A07D10B061B0E02000C32012118008D +:100DB00006233EE0002903D0012901D080292DD14E +:100DC000EE78AF7836023E438032D788BE4201D0FB +:100DD000012430E09288914220D101291BD1022EBA +:100DE0000BD0042E27D169792A790B02134309D03D +:100DF00002000C32052101201BE01800FFF76AFFFA +:100E0000040018E0020000210C3201200B00FFF763 +:100E1000FBFE00240FE000F039F8F1E76A792D7944 +:100E200013022B4309D00D0602002D0E0C320521B2 +:100E30002800FFF7E9FE2000F8BD0B061B0E02009C +:100E40000C32042118000D23F3E71CB50189446915 +:100E5000091848780A7800021043022802D20020BC +:100E6000C0431CBD080020304278037810021843AC +:100E70006B46D88006220C316846FCF202EB082251 +:100E800020006946E5F7CAFE00201CBD01002031A4 +:100E900010B5CA788C7813020200487823430C7886 +:100EA0000002204300060C32000E022B06D0042163 +:100EB0000E23FFF7A9FE0020C04310BD4B7909792E +:100EC0001B020B4302D100210B0000E00521FFF7BC +:100ED0009BFE002010BD000040020000F8B50D0090 +:100EE0000026018947690C18002A13D1A07800094F +:100EF0000D280DD15920C0000622A11D381801F07F +:100F00009DF8002806D0A01DFAF7D9F9002801D1D4 +:100F10000020F8BD210020310878092825D00BDCFD +:100F200003281BD0042820D008280FD12B00220032 +:100F30003800F1F7D8FA16E0112809D07F2805D13A +:100F40007F2221003800FCF732FE01263000F8BD78 +:100F50002B0022003800FEF7C4F904E02B00220029 +:100F60003800E3F712F90600F0E74B780126093B59 +:100F7000FCF2A2EC05050B0B0B0B0400E6E70922C3 +:100F800021003800FCF713FEE0E721003800FCF7F1 +:100F900024FEDBE770B504000D0097480E21FCF23B +:100FA00036EB0E220E2D00D22A009349002006E0D7 +:100FB000235C5B065B0E0B54401C0006000E904247 +:100FC000F6D370BDFFB59BB00600002019901890B5 +:100FD0003000EBF71AFE0700E5F736FC002804D1D5 +:100FE000E5F717FD199019A818907721C90030006E +:100FF000E5F715FD050076D028894419307A0328D5 +:101000000CD13800FBF731FD002807D0707A032897 +:1010100001D0022802D13800BD3002E0B43EC384C2 :1010200001000000F805020000040000A1CB47AD5C -:10103000BB2080000C32291830000B230092E5F70A -:1010400089FE0421B4204153220028320092032259 -:10105000012138000023F6F2A6FDB879C1076448E3 -:1010600002D02818C26801E028180269002A01D0BD -:10107000083203D13000FCF26BFF0BE078783B784C -:10108000010219433800EFF2E3FD3000E5F7B9FE45 -:10109000401C02D10020C043F8BD0120F8BDF8B5C6 -:1010A0000300002442690089E443C018050020358C -:1010B00069782E7809023143002A07D10B061B0EEE -:1010C00002000C320121180006233EE0002903D063 -:1010D000012901D080292DD1EE78AF7836023E4328 -:1010E000A032978ABE4201D0012430E0528A914258 -:1010F00020D101291BD1022E0BD0042E27D16979D2 -:101100002A790B02134309D002000C320521012079 -:101110001BE01800FFF76AFF040018E0020000213E -:101120000C3201200B00FFF7FBFE00240FE000F063 -:1011300039F8F1E76A792D7913022B4309D00D06AE -:1011400002002D0E0C3205212800FFF7E9FE2000D9 -:10115000F8BD0B061B0E02000C32042118000D23F3 -:10116000F3E71CB501894469091848780A78000238 -:101170001043022802D20020C0431CBD08002030CA -:1011800042780378100218436B46D88006220C314F -:101190006846FCF280E9082220006946E5F785FEF2 -:1011A00000201CBD0100203110B5CA788C781302D4 -:1011B0000200487823430C780002204300060C32DA -:1011C000000E022B06D004210E23FFF7A9FE0020FB -:1011D000C04310BD4B7909791B020B4302D100219A -:1011E0000B0000E00521FFF79BFE002010BD000072 -:1011F00080020000F8B50D000026018947690C182F -:10120000002A13D1A07800090D280DD1BB20800041 -:101210000622A11D381801F03FF8002806D0A01DB5 -:10122000FAF743FA002801D10020F8BD210020314F -:101230000878092825D00BDC03281BD0042820D0EF -:1012400008280FD12B0022003800F1F72CFA16E005 -:10125000112809D07F2805D17F2221003800FCF712 -:1012600093FE01263000F8BD2B0022003800FEF767 -:10127000DEF904E02B0022003800E2F79BFE0600B6 -:10128000F0E74B780126093BFCF220EB05050B0B40 -:101290000B0B0400E6E7092221003800FCF774FE7E -:1012A000E0E721003800FCF785FEDBE770B50400BD -:1012B0000D0093480E21FCF2B4E90E220E2D00D24F -:1012C0002A008F49002006E0235C5B065B0E0B546E -:1012D000401C0006000E9042F6D370BDFFB59BB0D7 -:1012E00006000020199018903000EBF7A6FD0700CB -:1012F000E5F7E0FB002804D1E5F7D1FC199019A827 -:1013000018907721C9003000E5F7CFFC050073D0B5 -:1013100028894419307A03280CD13800FBF7C2FD24 -:10132000002807D0707A032801D0022802D13800A3 -:10133000BD3002E0BB20800030181C9A002A00D18A -:10134000704A0100280004230092E5F703FD002005 -:1013500020706070E078EF210840E070684A189BC8 -:101360001D992000F6F2EDFC307A03286DD10002C1 -:101370003018007A012806D0032804D0707A032898 -:1013800001D0022861D1002017904C2104A8FCF262 -:101390001EE904A80390707A012803D121003000CF -:1013A000FAF785FF3800A0301A90408A002804D050 -:1013B0003800B130129008201790707A01235B0436 -:1013C000022800D00023FF2145310B43012814D10E -:1013D0008037386B1A99029000200874179A00928F -:1013E000039A21003000FAF7B0FF1A996B461A7A77 -:1013F0000004000C0A7409E06EE0179A0092039A48 -:1014000021003000FAF7A1FF0004000C6178227877 -:101410000902114308182070000A607000F03DFEB8 -:10142000002812D060782278010211432B35E36D39 +:101030005920C00030181C9A002A00D1744A0100BF +:10104000280004230092E5F749FD0020207060701D +:10105000E078EF210840E0706C4A189B1D99200051 +:10106000F6F26FFE307A032870D117204001301855 +:101070000078012806D0032804D0707A032801D014 +:10108000022863D1002017904C2104A8FCF29EEAAC +:1010900004A80390707A012801D0022803D121000E +:1010A0003000FAF7F0FE3800A0301A90408A00288D +:1010B00004D03800B130129008201790707A0123C4 +:1010C0005B04022800D00023FF2145310B43012897 +:1010D00014D18037386B02901A9800210174179A46 +:1010E0000092039A21003000FAF71BFF1A996B4611 +:1010F0001A7A0004000C0A7409E06EE0179A009254 +:10110000039A21003000FAF70CFF0004000C61780C +:1011100022780902114308182070000A607000F05C +:1011200098FE002812D06078227801021143200036 +:10113000203009180022300000F039FF6178227851 +:101140000902114340182070000A6070249800289A +:1011500008D01E98002805D0249B1E9A002120004C +:10116000F5F2A3FC26980122002804D0687B1043E6 +:1011700068732698A861288928812599852041557A +:1011800025982F001C37202808D11C98002800D053 +:10119000002204213000F8F70FF812E0307A03281B +:1011A00005D0E5F75BFB01280AD1052009E0200006 +:1011B000FBF254FB002805D0E5F750FB012801D0D5 +:1011C0000020B8702200012130000023F5F71DFC3B +:1011D0002800E5F7D9FC401C03D10020C0431FB014 +:1011E000F0BD0020FBE70EB50300202100220B20FC +:1011F00001918001181800920292426919001800AA +:101200002C327E310023FFF7E7FE0EBD686201C07D +:1012100060EB3100FFB58FB000201900CB000590C6 +:10122000119A0520C00110180E90446A1198591A9D +:1012300008180D90C07902900D98077A0F984178A0 +:1012400002780802104365D0201DFCF266EA0028EF +:101250000ED1119808A907F090E8211DFCF26CEA64 +:101260000500210008980C31FCF266EA002D51D0EF +:10127000002200920F98082203210023F5F2EAF9D8 +:1012800005000F98002612300C9046E00C207043A9 +:101290000019FB30FCF240EA0C99062200F0D8FE5F +:1012A000002839D10C20704300190400FB34FF30B2 +:1012B000FCF232EA01786B461977407858770E983D +:1012C000C068002808D0607A217A0006001408431C +:1012D000189988420ADA07E0242010AB185E1C2116 +:1012E0006B46595E884201DD012000E00020002DA0 +:1012F00002D0A978B94201D000280BD0201DFCF201 +:101300000CEA18AB1979017059794170189820725C +:10131000000A607213B0F0BD761C207CB042B5D8D4 +:101320000F98417802780802104309901E30060495 +:10133000360C002D04D1F61C3604360C059706E059 +:10134000A878B84203D00D98407A8007E2D5207C77 +:101350000B90617C88420AD220000830FCF2DCE964 +:10136000851920000C30FCF2D8E985421BD92000F9 +:101370000830FCF2D2E90500201DFCF2CEE90B9A00 +:101380002B00012106F0FCEF119808A906F0F4EFFC +:10139000211DFCF2D2E90500210008980C31FCF275 +:1013A000CCE9002DB6D0207C132141430C23091930 +:1013B0005843123104910119FB31201D0391FCF2B5 +:1013C000ACE906F0E2EF0500200008300A90FCF2DC +:1013D000A4E92D18FF2057302870000A687009987A +:1013E000801DA870000AE8700399281DFCF2A4E98A +:1013F0000399320A8E72CA720C990622FCF24AE8EC +:1014000004992800FCF298E90F9928000A30099AFB +:1014100020310690FCF23EE809990698401805999B +:1014200000290ED00321017001214170B10EE2D4D8 :1014300001000000F40902000004000055A4321964 -:101440002000203009180022300000F0DEFE617814 -:1014500022780902114340182070000A6070249815 -:10146000002808D01E98002805D0249B1E9A002131 -:101470002000F5F224FB26980122002804D0687B86 -:10148000104368732698A8612889288125998520AA -:10149000415525982F001C37202808D11C9800287A -:1014A00000D0002204213000F7F7C0FF12E0307AAC -:1014B000032805D0E5F708FB01280AD1052009E03B -:1014C0002000FBF2D5F9002805D0E5F7FDFA012848 -:1014D00001D00020B8702200012130000023F5F770 -:1014E00054FC2800E5F797FC401C03D10020C043C2 -:1014F0001FB0F0BD0020FBE70EB5002220210092B6 -:1015000002920191020001007E32A2310023FFF716 -:10151000EFFE0EBD186501C060EB3100FFB58FB066 -:1015200000201900CB000590119A0520C001101869 -:101530000E90446A1198591A08180D90C0790290BB -:101540000D98077A0F98417802780802104365D009 -:10155000201DFCF2ECE800280ED1119808A906F035 -:10156000DCEE211DFCF2F2E80500210008980C31A8 -:10157000FCF2ECE8002D51D0002200920F980822D6 -:1015800003210023F5F270F805000F9800261230B1 -:101590000C9046E00C2070430019FB30FCF2C6E8CA -:1015A0000C99062200F082FE002839D10C207043ED -:1015B00000190400FB34FF30FCF2B8E801786B46F8 -:1015C0001977407858770E98C068002808D0607A5C -:1015D000217A000600140843189988420ADA07E0C5 -:1015E000242010AB185E1C216B46595E884201DD39 -:1015F000012000E00020002D02D0A978B94201D0DE -:1016000000280BD0201DFCF292E818AB197901706C -:101610005979417018982072000A607213B0F0BDB9 -:10162000761C207CB042B5D80F9841780278080229 -:10163000104309901E300604360C002D04D1F61C10 -:101640003604360C059706E0A878B84203D00D980A -:10165000407A8007E2D5207C0B90617C88420AD2D8 -:1016600020000830FCF262E8851920000C30FCF202 -:101670005EE885421BD920000830FCF258E80500DE -:10168000201DFCF254E80B9A2B00012106F048EED5 -:10169000119808A906F040EE211DFCF258E805005B -:1016A000210008980C31FCF252E8002DB6D0207CC5 -:1016B000132141430C230919584312310491011994 -:1016C000FB31201D0391FCF232E806F02EEE0500FE -:1016D000200008300A90FCF22AE82D18FF2057302D -:1016E0002870000A68700998801DA870000AE870C8 -:1016F0000399281DFCF22AE80399320A8E72CA72F5 -:101700000C990622FBF2D0EE04992800FCF21EE8A8 -:101710000F9928000A30099A20310690FBF2C4EE96 -:10172000099906984018059900290ED003210170E7 -:101730000121417005998170E978AA780902114365 -:10174000C91CA970090AC01CE970FF215831017039 -:10175000090A4170102181700021C17003990500B0 -:10176000091D001DFBF2F2EF18AB197901705979D0 -:1017700041700021A971E9716B4629721A7A6A7267 -:10178000AF722800E97208220C301AA9FBF28CEE25 -:10179000039918980872000A487204986B46197ADF -:1017A0004173049887730F988078000900F060FBFC -:1017B00004998001497B8906890E0143049841738D -:1017C000207C401C20740A98FBF2B0EF0A99801923 -:1017D000FBF2BCEF22E7F7B584B004007ED0059998 -:1017E0001323594306980D190395123500280AD082 -:1017F00005980C2358430019FF30401C817940792B -:101800000E02064307E02800FBF290EF41780078D3 -:101810000E020643B61C200008300290FBF286EF51 -:1018200007002800FBF282EF050020001230FBF2D7 -:101830007EEF281A381A871B0598217C5CF0DB287C +:1014400005998170E978AA7809021143C91CA9702D +:10145000090AC01CE970FF2158310170090A417066 +:10146000102181700021C17003990500091D001D24 +:10147000FCF26CE918AB19790170597941700021BF +:10148000A971E9716B4629721A7A6A72AF722800E3 +:10149000E97208220C301AA9FCF206E803991898A0 +:1014A0000872000A487204986B46197A41730498CE +:1014B00087730F988078000900F091FB04998001F0 +:1014C000497B8906890E014304984173207C401CA6 +:1014D00020740A98FCF22AE90A998019FCF236E98C +:1014E00022E7F7B584B004007DD005991323594352 +:1014F00006980E190396123600280AD005980C2378 +:1015000058430019FF30401C817940790D02054392 +:1015100007E03000FCF20AE9417800780D0205434B +:10152000AD1C200008300290FCF200E907003000FA +:10153000FCF2FCE8060020001230FCF2F8E8301A59 +:10154000381A471B0598217C401C814244D00398DF +:101550002530FCF2ECE801003A00300000F0B6ED76 +:10156000059E35E01320704313220019010012304C +:1015700025310190FBF298EF0698002820D00C202E +:1015800070430C22071939003800FF31FB30083155 +:101590000090FBF28AEF0198FCF2C8E80199401B29 +:1015A000FCF2D4E80098FCF2C2E80099401BFCF27F +:1015B000CEE8FF373800FCF2BAE8401B390004E0FF +:1015C0000198FCF2B4E80199401BFCF2C0E8761CDB +:1015D000207C401EB042C5DC207C132358430019F8 +:1015E000401E132100E016E0FCF224E806980028D3 +:1015F00007D0207C0C2358430C210019EF30FCF25B +:101600001AE8207C401E20740298FCF290E80299AF +:10161000401BFCF29CE807B0F0BD002910B501D0DA +:10162000007B10BDFCF282E8007A10BDF7B582B0F5 +:10163000070000200190380004991230FFF7EDFFF9 +:10164000060001241BE0132060430499C0191230E6 +:10165000FFF7E3FF05000398002804D03106090EC8 +:101660002806000E03E02906090E3006000E049A33 +:10167000F6F2CAF8002801D02E000194641C387CD0 +:10168000A042E0DC019805B0F0BD0A000021CDE7E2 +:10169000FFB58FB00522D2011800119900278E18CE +:1016A000C100091A11980697746A08180E90C0793B +:1016B00002900E98007A01900F98427801781002FB +:1016C000084361D00022009200210F9805220B00F0 +:1016D000F4F2CAFF0028049056D004990F98081A13 +:1016E00020380390F068002801D0189800E019987D +:1016F0000022009207900F98082203210023F4F2A1 +:10170000B3FF05900F98002512300D903EE0132096 +:10171000684300190C901230FCF208E800280B9086 +:1017200006D00C980B9F2130FCF200E83F180937D7 +:101730000B980D99801C062200F094FC002824D1FF +:1017400004983900EAF237FE00281ED113206843BE +:10175000041905981234002804D00598817801985E +:1017600081420AD0F1682000FFF757FF0100F268BC +:101770000798F6F249F8002806D02000FBF2D6EFD1 +:101780001999017218982073CEE56D1C207CA8422F +:10179000BDD80F98417802780802104308900930AC +:1017A000070405983F0C002805D1FF1C01983F0451 +:1017B0003F0C069024E005980199807888421FD05C +:1017C0000E98407A8007DFD51AE00A980028DBD00F +:1017D000F1682000FFF759FF05062D0E132068431E +:1017E000F16800191230FFF718FFF2680799F6F256 +:1017F0000BF80028C8D1002229002000FFF771FE55 +:10180000207C0A90617C8842DFD220000830FBF205 +:101810008EEFC51920000C30FBF288EF8542D4D83A +:10182000201DFBF284EF0500200008300990FBF238 +:101830007EEF2E18B81E3070000A7070102DD4B6CE :1018400001000000F00D020000040000067EE175BA -:10185000401C814243D003982530FBF272EF010017 -:101860003A00280000F060ED059D34E01320684345 -:10187000132200190100123025310190FBF21EEEF7 -:101880000C2068430C22071939003800FF31FB3067 -:1018900008310090FBF212EE06980028019813D050 -:1018A000FBF24EEF0199801BFBF25AEF0098FBF21E -:1018B00048EF0099801BFBF254EFFF373800FBF232 -:1018C00040EF801B390003E0FBF23AEF0099801CE7 -:1018D000FBF246EF6D1C207C401EA842C6DC207C3B -:1018E0001323584313210019401EFBF2AEEE00E013 -:1018F00011E0207C0C2358430C210019EF30FBF23F -:10190000A4EE207C401E20740298FBF21AEF02998C -:10191000801BFBF226EF07B0F0BD002910B501D007 -:10192000007B10BDFBF20CEF007A10BDF7B582B062 -:10193000070000200190380004991230FFF7EDFFF6 -:10194000060001241BE0132060430499C0191230E3 -:10195000FFF7E3FF05000398002804D03106090EC5 -:101960002806000E03E02906090E3006000E049A30 -:10197000F5F254FF002801D02E000194641C387C3D -:10198000A042E0DC019805B0F0BD0A000021CDE7DF -:10199000FFB505211800C90100275618C3008FB0F4 -:1019A000181A0697746A80180E90C07902900E98E3 -:1019B000007A01900F98417802780802104361D0B4 -:1019C0000022009200210F9805220B00F4F256FE2F -:1019D0000028049056D00F990498401A203803909C -:1019E000F068002801D0189800E0199800220092B1 -:1019F00007900F98082203210023F4F23FFE059080 -:101A00000F98002512300D903EE013206843001916 -:101A10000C901230FBF294EE00280B9006D00C983C -:101A20000B9F2130FBF28CEE3F1809370B980D9974 -:101A3000801C062200F044FC002824D104983900C0 -:101A4000EAF2C3FC00281ED113206843041905984C -:101A50001234002804D005988178019881420AD078 -:101A6000F1682000FFF759FF0100F2680798F5F2CE -:101A7000D5FE002806D02000FBF262EE1999017213 -:101A800018982073D4E56D1C207CA842BDD80F980F -:101A9000417802780802104308900930070405983D -:101AA0003F0C002805D1FF1C01983F043F0C069015 -:101AB00024E005988178019881421FD00E98407AE1 -:101AC0008007DFD51AE00A980028DBD0F1682000F3 -:101AD000FFF75BFF05062D0E13206843F168001920 -:101AE0001230FFF71AFFF2680799F5F297FE002807 -:101AF000C8D1002229002000FFF777FE207C0A9041 -:101B0000617C8842DFD220000830FBF21AEEC51952 -:101B100020000C30FBF214EE8542D4D8201DFBF2DD -:101B200010EE0500200008300990FBF20AEE2E1896 -:101B3000B81E3070000A707035000D990935062204 -:101B4000B01CFBF2BCEC199830720F99089A203146 -:101B50002800FBF2B4EC089806992818002905D053 -:101B6000032101700121417006998170207C1321AD -:101B700041430C23091958430D0001191235FB315B -:101B8000B01CFBF2EEED29003000FBF2EAED08227A -:101B9000281D1AA9FBF292EC1898290028730398C3 -:101BA0000F31FBF2DEED6B46187A68730198A8736B -:101BB0000F988078000900F065F9697B80018A063A -:101BC000920E02436A73207C401C20740998FBF239 -:101BD000B8ED0999C019FBF2C4ED29E5FFB58DB048 -:101BE0000C00050040782978000208434ED00F9879 -:101BF00000284BD0F0F22EFD0600A8780F00000957 -:101C0000082801D005282BD1E07EFCF23BFD010025 -:101C100068782A7800021043001D0001FCF29EE95A -:101C2000290020310590082206A80B91FBF246EC12 -:101C300005A80DC8002180185941069020003030B9 -:101C40000791FBF27EED069A301A8018F221E9DF47 +:1018500035000D9909350622B01CFBF230EE1998BF +:1018600030720F99089A20312800FBF228EE089870 +:1018700006992818002905D0032101700121417023 +:1018800006998170207C1321414315220D1911996D +:1018900052018918097B1235012906D10C235843BE +:1018A0000119FB31B01CFBF25CEF29003000FBF2A8 +:1018B00058EF0822281D1AA9FBF200EE18982900FB +:1018C000287303980F31FBF24CEF6B46187A68735C +:1018D0000198A8730F988078000900F08AF9697B55 +:1018E00080018906890E01436973207C401C2074A5 +:1018F0000998FBF226EF0999C019FBF232EF1DE5BA +:10190000FFB58DB00C00050040782978000208432F +:101910004ED00F9800284BD0F0F29CFE0600A8781D +:101920000F000009082801D005282BD1E07EFCF229 +:10193000A9FE010068782A7800021043001D00010A +:10194000FCF20CEB290020310590082206A80B912F +:10195000FBF2B4ED05A80DC800218018594106908E +:10196000200030300791FBF2ECEE069A301A801816 +:10197000079B00215941079106900B98082206A960 +:10198000FBF29CED0F98152149014018007B0128BE +:1019900010D1039702960B220720A25620560192DF +:1019A000111A0091109B0F9A21002800FFF746FCA6 +:1019B00011B0F0BD0F990520C00108180A90406AC7 +:1019C0000990FBF2BEEE002809D1099806F0F4EC6C +:1019D0000A98406A001DFBF2B4EE0028E8D00A988D +:1019E000406A001DFBF2ACEE0028E1D00B2007217D +:1019F00020566156401A03F06CF80006000E08905D +:101A00000B202056E3F7EBF9020603970899120E14 +:101A100001920091109B0F9A210028000296FFF777 +:101A200041FEC5E7012909D002290AD0032903D1C3 +:101A3000800708D1012A06D000207047C007FBD0DC +:101A400001E08007F8D501207047FFB5002089B07C +:101A50000D000700010003900090052228000023DC +:101A6000F4F20CFE002802907ED012980C99C3006C +:101A7000181A40180890407AC107280012300790C1 +:101A80000E300029069062D1002006000190A8784F +:101A90000107890F5BD10009052858D10C98052151 +:101AA000C9014018406A00900C981521490140185E +:101AB000007B012800D101900698807AC00705D0EC +:101AC0002900079806220C31FBF2F8EC00243AE0DA +:101AD000132060430099401805901230FBF230EE5D +:101AE0000028049006D00598049F2130FBF228EED0 +:101AF0003F1809370598C07F8009012822D1019835 +:101B0000002809D00C20604300994018FB30FBF2FC +:101B100018EE03E0012609E00498801C07990622CC +:101B200000F0AAFA0028F5D0002E0BD00298390058 +:101B3000EAF24BFC002805D1019A00982100FFF73A +:101B4000DAFC04E0641C0098007CA042C0DC099828 +:101B5000FCF7D5F8AA1C0C99936A020009781800C2 +:101B6000FFF760FF002800E03BE03AD00C990798AF +:101B7000491CF5F2E4FD002833D00C99280003AA93 +:101B8000F5F238FD0898407AC10716D0C00614D582 +:101B9000069A0121527B002007E02B1820339B7B03 +:101BA000002B01D0002102E0401C8242F5DC00291C +:101BB00001D0012000E00398039008982900037ADF +:101BC000C0798207920F00920B9A0998FCF774F87B +:101BD0000398002805D0129B0C9A0B992800FFF758 +:101BE0008FFE0DB0F0BD0A00012110B5FFF728FDF2 +:101BF00010BD082801D101207047052801D102201D +:101C0000704700207047002180304171817170471A +:101C100070B51500062218704A431C00597029003F +:101C2000A01CFBF24CEC70BD70B5050010001A78DA +:101C30002A705A780A70597806224A431C00A11C5F +:101C4000FBF23CEC70BDF3B581B0002637B1D9D1C1 :101C500001000000EC11020000040000B9BBC4C682 -:101C6000079B00215941079106900B98082206A96D -:101C7000FBF22EEC0F98152149014018007B01283A -:101C800010D1039702960B220720A25620560192EC -:101C9000111A0091109B0F9A21002800FFF752FCA7 -:101CA00011B0F0BD0F980521C90140180A90406A93 -:101CB0000990FBF250ED002802D1099806F04CEB98 -:101CC0000A98406A001DFBF246ED0028E8D00B217F -:101CD000072061562056081A02F03FFF0006000E4A -:101CE00008900B202056E2F78AFF02060397089916 -:101CF000120E01920091109B0F9A2100280002966B -:101D0000FFF750FECCE7012909D002290AD00329A8 -:101D100003D1800708D1012A06D000207047C007F0 -:101D2000FBD001E08007F8D501207047FFB5002007 -:101D300089B00D0007000100049003900090052277 -:101D400028000023F4F2A4FC002802907ED0129810 -:101D50000C99C300181A40180890407AC10728004F -:101D6000123007900E300029069052D100200190C9 -:101D7000A8780107890F4CD10009052849D10C9892 -:101D80000521C9014018466A0C98152149014018DF -:101D9000007B012800D101900698807AC00705D009 -:101DA0002900079806220C31FBF292EB00242DE06B -:101DB00013206043801905901230FBF2CCEC002810 -:101DC00006D0070005982130FBF2C4EC3F18093714 -:101DD0000598C07F8009012817D10C206043801925 -:101DE000FB30FBF2B8EC0799062200F073FA0028EA -:101DF0000BD102983900EAF2F2FA002805D1019AD3 -:101E000021003000FFF7FBFC03E0641C307CA042A3 -:101E1000CEDC0C98039A0178A81C806AFFF773FF48 -:101E2000002831D00C990798491CF5F292FC002843 -:101E30002AD00C99280004AAF5F2E6FB0898407A0B -:101E4000C10718D0C00616D5012100E01CE0069A93 -:101E50000020527B07E02B1820339B7B002B01D006 -:101E6000002102E0401C8242F5DC002901D0012063 -:101E700000E0049804900498002805D0129B0C9A66 -:101E80000B992800FFF7B4FE0DB0F0BD0A00012148 -:101E900010B5FFF755FD10BD082801D1012070478E -:101EA000052801D1022070470020704700218030B2 -:101EB00041718171704770B51500062218704A4350 -:101EC0001C0059702900A01CFBF202EB70BD70B51C -:101ED000050010001A782A705A780A70597806227C -:101EE0004A431C00A11CFBF2F4EA70BDF3B581B0BB -:101EF000002603F0AFFD0500803007004079002880 -:101F00001BD000240CE00620604302994019873062 -:101F1000062200F0DFF9002801D1012603E0641C4D -:101F2000B879A042EFD87879012802D1012E06D1E4 -:101F300003E0022803D1002E01D10020FEBD0120C4 -:101F4000FEBD8078052801D302207047032801D305 -:101F5000012070470020704701004978007803296C -:101F600000D2FF20704701697D22D200914201D248 -:101F70000A310161704701004A69C96980688A4273 -:101F800001D9511A0818704710B503785B065B0E2B -:101F90000E2B0AD3C4694369A34206D91B1B0B60ED -:101FA0008069834201D9181A106010BDFEB50D007A -:101FB0000600007814004006400E029000200190B8 -:101FC000009000F063FC070030006A4601A9FFF7AB -:101FD000DBFFB068019940180190F0680099401843 -:101FE0000090380000F056FC0199002958D0009864 -:101FF00064235843FBF2BCEF28603220002C04D14C -:1020000002980022FF21F3F27DF9019988420BD852 -:102010001E20002C04D102980022FF21F3F25EF969 -:10202000296888423AD815E02020002C04D1029873 -:102030000022FF21F3F26DF9019988420CD84B2060 -:10204000002C04D102980022FF21F3F24DF92968F7 -:10205000884225D80020FEBD1021002C90D19FEE93 +:101C600003F0F0FE050080300700407900281BD00B +:101C700000240CE0062060430299401987300622B8 +:101C800000F004FA002801D1012603E0641CB879B1 +:101C9000A042EFD87879012802D1012E06D103E0C5 +:101CA000022803D1002E01D10020FEBD0120FEBD7F +:101CB0008078052801D302207047032801D3012032 +:101CC000704700207047010049780078032900D24E +:101CD000FF20704701697D22D200914201D20A3172 +:101CE0000161704701004A69C96980688A4201D967 +:101CF000511A0818704710B503785B065B0E0E2B5F +:101D00000AD3C4694369A34206D91B1B0B608069CF +:101D1000834201D9181A106010BDFEB50D000600EF +:101D2000007814004006400E0290002001900090C0 +:101D300000F088FC070030006A4601A9FFF7DBFFCE +:101D4000B068019940180190F0680099401800901F +:101D5000380000F07BFC0199002958D000986423DA +:101D60005843FCF206E928603220002C04D1029886 +:101D70000022FF21F3F2C6FA019988420BD81E20F7 +:101D8000002C04D102980022FF21F3F2A7FA29685F +:101D900088423AD815E02020002C04D10298002275 +:101DA000FF21F3F2B6FA019988420CD84B20002C9F +:101DB00004D102980022FF21F3F296FA29688842A2 +:101DC00025D80020FEBD1021002C05D1029800224C +:101DD000FF21F3F2A5FA0100019A6420914207D88D +:101DE000002CEBD102980022FF21F3F284FAE5E700 +:101DF00031697D22D200914209D3002CC7D10298CB +:101E00000022FF21F3F277FAC1E70120FEBD022094 +:101E1000FEBD70B5040015001A002030FFF748FF22 +:101E20000028287003D064200860002070BD2000C6 +:101E3000FFF773FF70BD000070B505000E000024B1 +:101E4000F7F217FF002802D00400203414E00B48FA +:101E50000078002810D0002231002800F7F260FF3F +:101E600031002800F7F205FF03002033034A1C006D +:101E700031002800F7F29AFF200070BDDC8B0200D1 +:101E800010B5F4F70CFA10BD6949488070476849ED +:101E90000220085E401C00D00120704764490220E7 +:101EA000085E7047202110B5095C7F2908D161497F +:101EB0000422213000F0EAF8002801D1012010BDF1 +:101EC000002010BD3CB50022002926D04178091F12 +:101ED0000C06240E801D30E0815C00291ED1811883 +:101EE000CD786B461D71097959719B8819021B0ABF +:101EF00019430191C943890710D14D490324098829 +:101F00006B468C439988A1430C02090A0C43019447 +:101F100019798018C170597901713CBD81184D78CB +:101F20006B461D70897859701B8819021B0A19436A +:101F300000915118C91C0A06120EA242CCD33CBD16 +:101F4000020010B5FFF7A3FF002806D01000FFF72E +:101F5000A9FF002801D0012010BD002010BDFFB551 +:101F6000DD2181B01C0017000170401C451C009051 +:101F700002992800FBF2ACEAE81901900B983E00A8 +:101F800026E0029925003A00A01C00F07FF8002806 +:101F900029D169780A98CA1B8019E1218018890023 +:101FA000884219DAE1190198891CFBF292EA6878F3 +:101FB000C11B8A191604019A360C89180191A41CB8 +:101FC000041968780B99081A801E000400140B90FD +:101FD000002801DD002CD4D100980670B61C300416 +:101FE000000C05B0F0BD6878E9E770B503000E009D +:101FF000150000248EB0FFF74AFF002814D00E4AC7 +:10200000180000920B4A042301A9F4F7D3FC040042 +:102010000AD0002D03D0210001A8FFF753FF2200B2 +:10202000300001A9FBF254EA20000EB070BD0000A0 +:1020300016FE00C0187C0200FFFF0000002810B54B +:1020400002D04C30F2F226FD10BD10B5040007D0CE +:1020500021001C31601DF2F22EFD2000F2BE54AEB4 :1020600001000000E815020000040000EA6117AA60 -:1020700005D102980022FF21F3F25CF90100019AD8 -:102080006420914207D8002CEBD102980022FF2156 -:10209000F3F23BF9E5E731697D22D200914209D3A1 -:1020A000002CC7D102980022FF21F3F22EF9C1E7DC -:1020B0000120FEBD0220FEBD70B5040015001A000F -:1020C0002030FFF748FF0028287003D06420086004 -:1020D000002070BD2000FFF773FF70BD10B5F4F74E -:1020E0009DFA10BD69494880704768490220085E22 -:1020F000401C00D00120704764490220085E7047F0 -:10210000202110B5095C7F2908D1614904222130C2 -:1021100000F0EAF8002801D1012010BD002010BD18 -:102120003CB50022002926D04178091F0C06240E58 -:10213000801D30E0815C00291ED18118CD786B466E -:102140001D71097959719B8819021B0A1943019164 -:10215000C943890710D14D49032409886B468C4334 -:102160009988A1430C02090A0C430194197980183B -:10217000C170597901713CBD81184D786B461D7055 -:10218000897859701B8819021B0A1943009151184C -:10219000C91C0A06120EA242CCD33CBD020010B5E7 -:1021A000FFF7A3FF002806D01000FFF7A9FF0028C3 -:1021B00001D0012010BD002010BDFFB5DD2181B090 -:1021C0001C0017000170401C451C0090029928005B -:1021D000FBF288E9E81901900B983E0026E002998D -:1021E00025003A00A01C00F07FF8002829D169786A -:1021F0000A98CA1B8019E12180188900884219DADF -:10220000E1190198891CFBF26EE96878C11B8A19F3 -:102210001604019A360C89180191A41C04196878D7 -:102220000B99081A801E000400140B90002801DD91 -:10223000002CD4D100980670B61C3004000C05B0F8 -:10224000F0BD6878E9E770B503000E0015000024C2 -:102250008EB0FFF74AFF002814D00E4A18000092F3 -:102260000B4A042301A9F4F765FD04000AD0002DF0 -:1022700003D0210001A8FFF753FF2200300001A97D -:10228000FBF230E920000EB070BD0000E6FB00C09C -:10229000787B0200FFFF0000002810B502D04C3010 -:1022A000F2F202FC10BD10B5040007D021001C3171 -:1022B000601DF2F20AFC2000FFF7EEFF012010BDC6 -:1022C000203052E20400005A203062E23002A0E1E5 -:1022D000110380E13112A0E11EFF2FE13103A0E1E3 -:1022E0000010A0E31EFF2FE110B4042A0ED3030058 -:1022F0000B439B070AD108C810C9A34202D1121F81 -:10230000042AF8D2A34201D0001F091F002A02D1DB -:10231000002010BC7047D30701D0521C05E00378A1 -:102320000C78401C491CA34207D103780C78401C50 -:10233000491CA34201D1921EF1D1181BE9E700000C -:10234000FF3002E2032483E1022882E1C8EC0BEAB9 -:10235000013050E00300522161EC0B9A030052E37C -:10236000020080E0021081E02500009A030010E3E3 -:10237000013071150120421201306015030010E395 -:10238000FAFFFF1A033011E26200000A042052E251 -:102390001B00003A03C031E7020053E30800003A93 -:1023A0000F00008A0C38A0E104C031E5042052E29D -:1023B0002C3883E1043020E5F9FFFF2A021081E286 -:1023C0000F0000EA0C3CA0E104C031E5042052E219 -:1023D0002C3483E1043020E5F9FFFF2A011081E26B -:1023E000070000EA0C34A0E104C031E5042052E209 -:1023F0002C3C83E1043020E5F9FFFF2A031081E241 -:102400000000A0E1822FB0E10130712501C07125EB -:10241000012051450130602501C060250120404563 -:102420001EFF2FE103000B43020070B49B0710D185 -:102430000F4CE50100E008C208C91E1B9E432E4256 -:10244000F9D01906090E1170521C00290DD01B0A73 -:10245000F7E70C78491C531C002C147005D00C783D -:10246000491C5A1C002C1C70F3D170BC7225D79FDC +:10207000FFF7EEFF012010BD203052E20400005AAD +:10208000203062E23002A0E1110380E13112A0E1D0 +:102090001EFF2FE13103A0E10010A0E31EFF2FE19E +:1020A00010B4042A0ED303000B439B070AD108C8BF +:1020B00010C9A34202D1121F042AF8D2A34201D0B0 +:1020C000001F091F002A02D1002010BC7047D3074F +:1020D00001D0521C05E003780C78401C491CA34237 +:1020E00007D103780C78401C491CA34201D1921EF1 +:1020F000F1D1181BE9E70000FF3002E2032483E17D +:10210000022882E15AED0BEA013050E0030052212F +:10211000F3EC0B9A030052E3020080E0021081E02E +:102120002500009A030010E30130711501204212CE +:1021300001306015030010E3FAFFFF1A033011E2CB +:102140006200000A042052E21B00003A03C031E79B +:10215000020053E30800003A0F00008A0C38A0E1A7 +:1021600004C031E5042052E22C3883E1043020E53C +:10217000F9FFFF2A021081E20F0000EA0C3CA0E107 +:1021800004C031E5042052E22C3483E1043020E520 +:10219000F9FFFF2A011081E2070000EA0C34A0E1F8 +:1021A00004C031E5042052E22C3C83E1043020E5F8 +:1021B000F9FFFF2A031081E20000A0E1822FB0E1C5 +:1021C0000130712501C07125012051450130602584 +:1021D00001C06025012040451EFF2FE103000B4395 +:1021E000020070B49B0710D10F4CE50100E008C25B +:1021F00008C91E1B9E432E42F9D01906090E117004 +:10220000521C00290DD01B0AF7E70C78491C531CFF +:10221000002C147005D00C78491C5A1C002C1C7022 +:10222000F3D170BC70470000010101010120A0E161 +:10223000920081E01EFF2FE10000A0E1440000EBCE +:1022400003002DE9A40000EB0300BDE86C0000FAD8 +:102250000F002DE9A30000EB0F00BDE81CC09FE5B7 +:102260000FC08CE001001CE30DE08F120FE0A00115 +:102270001CFF2FE101C08FE21CFF2FE100F05EF890 +:1022800045E9FDFF01402DE90000A0E18B0000FAC7 +:102290000140BDE8000000EA0000E0E3200000EAA1 +:1022A0001EFF2FE1013050E003005221C1EC0B9AD8 +:1022B000020080E0030010E3021081E001204212DE +:1022C0000130711501306015030010E3FAFFFF1AA9 +:1022D000102052E20500003A10402DE9185031E973 +:1022E000102052E2185020E9FBFFFF2A1040BDE801 +:1022F000823EB0E108103129081020290430314510 +:1023000004302045030012E31EFF2F01822FB0E1AD +:10231000B230712101205145B23060210120404589 +:102320001EFF2FE10C109FE51800A0E3563412EFBA +:102330001EFF2FE16CFFFFFF2600020010B5C04614 +:10234000C0460400C046C0462000FFF79CEF10BC0A +:1023500008BC18470E40A0E1660000EB04E0A0E1D5 +:1023600001402DE97B0000EB0040A0E10140BDE809 +:1023700013402DE90100A0E3121DA0E3081084E53D +:10238000000084E51340BDE80010A0E1040084E5EE +:102390000EF0A0E110402DE903002DE96D0000EBE7 +:1023A0000040A0E10300BDE8042094E50D30A0E169 +:1023B00000E082E003005EE1002081E50B00008A7E +:1023C0000E3093E0011A8EE26330A0E1071081E243 +:1023D0000730C3E30710C1E3030051E10310A081FC +:1023E000041084E51040BDE8020041E01EFF2FE12B +:1023F0000020A0E10000A0E30000A0E11040BDE843 +:102400001EFF2FE1F0B585B0C046C04605000C00A8 +:1024100006F064E8002001950294C046C04603908F +:1024200001A8DEF78AEB040001A80D00009303C8A1 +:102430001600C046C046C046C046FBF200F8002168 +:102440000800C046C046070000F08EE80490002156 +:1024500007600800C046C046411C04984160002146 +:102460000800C046C046010004988160035C7FB943 :1024700001000000E4190200000400001E0E621EAC -:1024800070470000010101010120A0E1920081E0FC -:102490001EFF2FE10000A0E1440000EB03002DE946 -:1024A000A40000EB0300BDE86C0000FA0F002DE96A -:1024B000A30000EB0F00BDE81CC09FE50FC08CE03F -:1024C00001001CE30DE08F120FE0A0011CFF2FE1C3 -:1024D00001C08FE21CFF2FE100F05EF8FDE6FDFF7A -:1024E00001402DE90000A0E18B0000FA0140BDE8A9 -:1024F000000000EA0000E0E3200000EA1EFF2FE1F8 -:10250000013050E0030052212FEC0B9A020080E0D2 -:10251000030010E3021081E0012042120130711526 -:1025200001306015030010E3FAFFFF1A102052E299 -:102530000500003A10402DE9185031E9102052E210 -:10254000185020E9FBFFFF2A1040BDE8823EB0E1B1 -:102550000810312908102029043031450430204565 -:10256000030012E31EFF2F01822FB0E1B230712170 -:1025700001205145B2306021012040451EFF2FE16E -:102580000C109FE51800A0E3563412EF1EFF2FE158 -:102590006CFFFFFF2600020010B5C046C0460400D5 -:1025A000C046C0462000FFF79CEF10BC08BC18478F -:1025B0000E40A0E1660000EB04E0A0E101402DE93F -:1025C0007B0000EB0040A0E10140BDE813402DE995 -:1025D0000100A0E3121DA0E3081084E5000084E5DB -:1025E0001340BDE80010A0E1040084E50EF0A0E176 -:1025F00010402DE903002DE96D0000EB0040A0E143 -:102600000300BDE8042094E50D30A0E100E082E085 -:1026100003005EE1002081E50B00008A0E3093E0AC -:10262000011A8EE26330A0E1071081E20730C3E3B4 -:102630000710C1E3030051E10310A081041084E5F9 -:102640001040BDE8020041E01EFF2FE10020A0E1A4 -:102650000000A0E30000A0E11040BDE81EFF2FE154 -:10266000F0B585B0C046C04605000C0005F0FEEE92 -:10267000002001950294C046C046039001A8DEF7F1 -:1026800066EA040001A80D00009303C81600C046C6 -:10269000C046C046C046FAF2DCFE00210800C04633 -:1026A000C046070000F08EE8049000210760080093 -:1026B000C046C046411C0498416000210800C04645 -:1026C000C04601000498816000210800C046C04651 -:1026D00001000498C16000210800C046C046010006 -:1026E00004980161C046C046C046C046C046C046C8 -:1026F000C046C046C046C046C046C046C046C046AA -:10270000C046C046C046C046009B05B02000049CA1 -:1027100029003200A646F0BC01B0704710B5C04693 -:10272000C0460020C046C046C046C046C046C0465F -:1027300010BC08BC184700000000E0E30210E0E312 -:102740001EFF2FE110402DE90000A0E11040BDE880 -:102750001EFF2FE10E50A0E1270000EB05E0A0E1F5 -:102760000050A0E10700C0E30D10A0E10A30A0E195 -:1027700000D0A0E160D08DE220402DE9150000FBE3 -:102780002040BDE80060A0E30070A0E30080A0E36B -:1027900000B0A0E30710C1E305C0A0E1C009ACE8A8 -:1027A000C009ACE8C009ACE8C009ACE801D0A0E1C0 -:1027B0001EFF2FE104009FE51EFF2FE11EFF2FE10A -:1027C0008C6501C004009FE51EFF2FE11EFF2FE175 -:1027D0009C6501C010B410BC70471FB500210A00F1 -:1027E0000B000C0068461EC0AB208002009005F074 -:1027F000CCED019068460FC804B010BD00009FE505 -:102800001EFF2FE17C6501C004009FE51EFF2FE144 -:102810001EFF2FE1806501C0254810B5046840689F -:10282000042B01D14C6102E0012B02D14C61FBF27F -:1028300039FC002010BD70B50C001D4E1500052B95 -:1028400001D0162B0DD120890019C1788278080299 -:10285000104304D1200000F069F8022070BD052B60 -:1028600001D0172B04D12A002100306805230DE088 -:10287000032B06D1200000F0D8FD2A00FDC5D0347E +:1024800000210800C046C04601000498C160002138 +:102490000800C046C046010004980161C046C0461D +:1024A000C046C046C046C046C046C046C046C046FC +:1024B000C046C046C046C046C046C046C046C046EC +:1024C000009B05B02000049C29003200A646F0BC09 +:1024D00001B0704710B5C046C0460020C046C04697 +:1024E000C046C046C046C04610BC08BC18470000E5 +:1024F0000000E0E30210E0E31EFF2FE110402DE9B1 +:102500000000A0E11040BDE81EFF2FE10E50A0E149 +:10251000270000EB05E0A0E10050A0E10700C0E3C8 +:102520000D10A0E10A30A0E100D0A0E160D08DE262 +:1025300020402DE9150000FB2040BDE80060A0E32D +:102540000070A0E30080A0E300B0A0E30710C1E3A7 +:1025500005C0A0E1C009ACE8C009ACE8C009ACE81E +:10256000C009ACE801D0A0E11EFF2FE104009FE507 +:102570001EFF2FE11EFF2FE1DC6201C004009FE57A +:102580001EFF2FE11EFF2FE1EC6201C010B410BC52 +:1025900070471FB500210A000B000C0068461EC0E2 +:1025A000AB208002009005F02AEF019068460FC82A +:1025B00004B010BD00009FE51EFF2FE1CC6201C0FA +:1025C00004009FE51EFF2FE11EFF2FE1D06201C036 +:1025D000254810B504684068042B01D14C6102E025 +:1025E000012B02D14C61FBF25DFD002010BD70B5E6 +:1025F0000C001D4E1500052B01D0162B0DD1208986 +:102600000019C17882780802104304D1200000F03C +:1026100069F8022070BD052B01D0172B04D12A00C8 +:102620002100306805230DE0032B06D1200000F0C7 +:10263000A2FE2A002100032304E0022B04D1B0688B +:102640002A002100FBF22EFD002070BD70B50400B1 +:1026500000F00CF80500012020732000FBF2AAFC1A +:10266000280000F007F870BDF0F100C010B5E2F2EC +:10267000DCEA10BD802810B502D1E2F2D6EA10BD26 +:10268000E2F2DCEA10BD10B50400E5F28FFD206037 +:1026900010BD124870B50468114EA10706D500217F +:1026A0000161B26D01209047022084432006000F93 +:1026B00003D0E02084431020044300250AE0E00713 +:1026C00006D0A8003258002A02D0210028009047E6 +:1026D00064086D1C002CF2D1002070BD0030008019 +:1026E000D0430004002810B507D00169002905D1A6 +:1026F0004189C0880322FCF257F810BDFBF25AFC56 +:1027000010BDF3B50400002085B0060004900390CE +:1027100002900190208901270519A8780007800FF1 +:10272000022800D00027A08800287ED002F0D3FC29 +:10273000002827D0E6F7DFFF002823D1E6F7C5FF02 +:1027400000281FD1002F3DD020890519EA78D00735 +:1027500001D1A81D01E028001230FF498B7D002B1C +:102760000DD0098A09290AD10078C00707D0900640 +:1027700002D5E8F77EFD07E00120049004E0E8F7C9 +:1027800061FD01E0002F1DD0A878010902D00009E9 +:10279000082817D1228920002A3010180288EF4B10 +:1027A00061699A420ED1C07803280BD1002909D063 +:1027B0000520C00108180068002803D08030018877 +:1027C000491C018002F04FFA002868D02800FBF273 +:1027D0002EFF00285BD1002F13D001222000694674 +:1027E00005F010EE00280CD0684605F010EE002829 +:1027F0004DD00720019000214F20E3F734FC0390D7 +:1028000007E00699200002AA01ABE3F7A8FE002822 +:102810003DD002F01DFA002848D0D14D01242C6192 +:10282000E8F7D4FC02F054FC00E02EE000280BD1C5 +:10283000E8F7C5FE002807D1CA480660CA480680E6 +:102840000320AC70E8F791FC6B469A880399FF204F +:10285000E3F783FDC54C2088002804D0C449042038 +:102860000856401C09D002240120DFF77BF9641EC2 +:1028700007D0287A0028F7D103E0E3F785678E2197 :1028800001000000E01D0200000400004DD4B17200 -:102890002100032304E0022B04D1B0682A002100A8 -:1028A000FBF20AFC002070BD70B5040000F00CF8CB -:1028B0000500012020732000FBF286FB280000F0B9 -:1028C00007F870BD80EF00C010B5E2F2B8E910BDA6 -:1028D000802810B502D1E2F2B2E910BDE2F2B8E907 -:1028E00010BD10B50400E5F26BFC206010BD12486D -:1028F00070B50468114EA10706D500210161B26DC3 -:1029000001209047022084432006000F03D0E020DE -:1029100084431020044300250AE0E00706D0A80005 -:102920003258002A02D021002800904764086D1C0C -:10293000002CF2D1002070BD00300080B0430004B4 -:10294000002810B507D00169002905D14189C08848 -:102950000322FBF233FF10BDFBF236FB10BDF3B5D3 -:102960000400002085B006000490039002900190BE -:10297000208901270519A8780007800F022800D0B8 -:102980000027A08800287ED002F0E3FB002827D093 -:10299000E7F705F8002823D1E6F7EBFF00281FD161 -:1029A000002F3DD020890519EA78D00701D1A81D54 -:1029B00001E028001230FF498B7D002B0DD0098AE1 -:1029C00009290AD10078C00707D0900602D5E8F798 -:1029D000A4FD07E00120049004E0E8F787FD01E092 -:1029E000002F1DD0A878010902D00009082817D1AE -:1029F000228920002A3010180288EF4B61699A4220 -:102A00000ED1C07803280BD1002909D00520C001C0 -:102A10000818406A002803D080300188491C0180D2 -:102A200002F065F9002868D02800FBF20AFE0028B1 -:102A30005BD1002F13D0012220006946E3F7F1FD9E -:102A400000280CD06846E3F761FE00284DD007202F -:102A5000019000214F20E3F730FA039007E0069938 -:102A6000200002AA01ABE3F79CFC00283DD002F055 -:102A700033F9002848D0D14D01242C61E8F7FAFC45 -:102A800002F064FB00E02EE000280BD1E8F7EBFE3B -:102A9000002807D1CA480660CA4806800320AC70E7 -:102AA000E8F7B7FC6B469A880399FF20E3F77FFBB2 -:102AB000C54C2088002804D0C44904200856401C76 -:102AC00009D002240120DEF7EDFF641E07D0287A2A -:102AD0000028F7D103E0E3F745FB26802E721D2086 -:102AE000E8F797FCEE6007B0F0BD20206B4620733E -:102AF000187A002808D1A68006E0002F04D0022210 -:102B000020006946E3F78DFD04980028EBD01B20D8 -:102B1000E8F77FFCE7E77CB50C00150049792379DD -:102B20000906091419430B19818842692433602965 -:102B300014D9603920328180517EC906CA0F0092B3 -:102B40002A0001A9EEF241FBA071000AE071019890 -:102B5000001B2071000A607101207CBD00207CBD3B -:102B60001A00D8E78288602A10D9603A82804879B2 -:102B70000A7900060014104324300871000A4871D5 -:102B8000E62088710020C87101207047002070473E -:102B90001FB501AA0400009202AA03ABE9F7E3F90A -:102BA0000198020402981214010409142000E9F7A4 -:102BB00041FB20000399C030C18201990183029931 -:102BC0004183200005F0EEEB1FBDFFB581B0002072 -:102BD0001C0001260A9D0B9F286038608A7CD20762 -:102BE000002A07D0E1072E6002D0A1071EE03E6058 -:102BF00005B0F0BD0800123002F0C3FF00281DD060 -:102C0000417A02291AD1C168C90417D50199C27A3B -:102C1000C97A91420DD103990A290FD3610702D4D1 -:102C2000E107E4D10AE0E107E2D061070029DEDA3A -:102C3000DEE7210702D503990A29D9D22E60D7E70A -:102C4000F3B595B005000A200A90002009900120F4 -:102C5000089000200790069005901698002802D151 -:102C6000002017B0F0BD28896E69411920220CA8F8 -:102C7000FAF24CEC169F0CA820370B90387DC0065A -:102C8000800F012807D916981830FAF2E54F39B0AD +:1028900049FD26802E721D20E8F771FCEE6007B01E +:1028A000F0BD20206B462073187A002808D1A6803E +:1028B00006E0002F04D002222000694605F0ACEDAE +:1028C00004980028EBD01B20E8F759FCE7E77CB51B +:1028D0000C001500497923790906091419430B19CD +:1028E000818842692433602914D96039203281807B +:1028F000517EC906CA0F00922A0001A9EEF265FCBA +:10290000A071000AE0710198001B2071000A60713B +:1029100001207CBD00207CBDFFB583B00C001E00F3 +:102920000700012088710021E17199780A07920F50 +:10293000022A03D10909090700D50220E073B07803 +:102940000107890F012947D100090C2801D00D2862 +:1029500040D11620019061792079090609140143BC +:1029600020002430091801982022151AF0788207D7 +:1029700002D5C00700D0AD1DE07B022800D1AD1C00 +:10298000481B2A00B11C0290FAF2C0EDE07B02283D +:102990000BD102980599401920310A7E20388277A0 +:1029A000497EC177B888801CB880B9880198081A18 +:1029B00040380004000CB880F1788A0703D5C907B5 +:1029C00001D0801DB8800298001B2071000A607140 +:1029D000012064E71020BDE70820BBE71A0076E776 +:1029E0008288602A10D9603A828048790A79000684 +:1029F0000014104324300871000A4871E6208871E1 +:102A00000020C87101207047002070471FB501AA3F +:102A10000400009202AA03ABE9F761F901980204ED +:102A200002981214010409142000E9F7BDFA2000ED +:102A30000399A0304181019981810299C1812000CF +:102A400005F0F2EC1FBDFFB581B000201C0001268F +:102A50000A9D0B9F286038608A7CD207002A07D025 +:102A6000E1072E6002D0A1071EE03E6005B0F0BD78 +:102A70000800123003F084F800281DD0417A0229A2 +:102A80001AD1C168C90417D50199C27AC97A91428D +:102A90000DD103990A290FD3610702D4E107E4D1CC +:102AA0000AE0E107E2D061070029DEDADEE721076C +:102AB00002D503990A29D9D22E60D7E7F3B595B08C +:102AC00005000A200A9000200990012008900020AB +:102AD0000790069005901698002802D1002017B0A4 +:102AE000F0BD28896E69411920220CA8FAF20EED7A +:102AF000169F0CA820370B90387DC006800F012848 +:102B000007D916981830FAF244EE000701D50124CF +:102B100000E0002408AB997C00200A07920F022AEB +:102B200003D10909090700D50120204319D0FFF777 +:102B3000A7FD0290387E144A41070B98490F0C30CC +:102B4000FBF24CFC0A280A9008D2002C06D00A9806 +:102B50000D4900014018C168491CC1600298FFF787 +:102B600093FD202128896C1829810FE0083901C0C4 +:102B7000888E0000543901C088F400C018F400C0E9 +:102B800008F400C0A4F200C07C800200203820714C +:102B9000000A10AB6071188900092072000A607287 +:102BA000B07A2070F07A6070307A0628A07C09D163 +:102BB00001210843A074032000023018016A491C57 +:102BC000016202E040084000A074A888002802D1F9 +:102BD000287B20283DD108ABD87C800601D5012078 +:102BE000059008AB987C0107890F022931D1397E05 +:102BF000C90620D5000900071DD5F848007800282F +:102C000019D0E7F7A2FB002815D0F5480068002886 +:102C100011D0F448006800280DD0E7F728FC002800 +:102C200009D0E3F79FF8012805D0EF480068002895 +:102C300001D10120069002F060FA002809D00B981B +:102C4000FBF2FFFC002804D1022002F069FFE5F747 +:102C50001CFB16993000FFF7D9FE3100A0310E2081 +:102C60001491085E01F05DFF207314990A20085E3C +:102C700001F04AFF002E607310D0307A00280DD189 +:102C800008AB987DC00709D1EFF20CFDAEEFED3235 :102C900001000000DC21020000040000654534CF83 -:102CA00082ED000701D5012400E0002408AB997CE7 -:102CB00000200A07920F022A03D10909090700D54B -:102CC0000120204319D0FFF709FE0290387E454AC3 -:102CD00041070B98490F0C30FBF28AFB0A280A9037 -:102CE00008D2002C06D00A9801013E480818C16895 -:102CF000491CC1600298FFF7F5FD288920216C1856 -:102D0000203829812071000A10AB607118890009F0 -:102D10002072000A6072B07A2070F07A6070307AA7 -:102D20000628A07C09D101210843A0740D20800150 -:102D300030188168491C816002E040084000A0749E -:102D4000A888002802D1287B202857D108ABD87C3E -:102D5000800601D50120059008AB987C0107890FFA -:102D600002294BD1397EC90620D5000900071DD59F -:102D70001D480078002819D0E7F73BFC002815D043 -:102D80001A480068002811D01948006800280DD0A2 -:102D9000E7F7C1FC002809D0E2F70DFF012805D0B4 -:102DA00014480068002801D10120069002F0E3F9E0 -:102DB000002823D00B98FBF24EFC00281ED10220E5 -:102DC00002F0C0FE18E00000203901C0888E00002B -:102DD0006C3901C024F200C0C0F100C0B0F100C0E5 -:102DE00034F000C028810200EDF000C0FCF000C00B -:102DF000F8F000C048F100C0E5F7A8FB16993000D4 -:102E0000FFF7D0FE3100C0311A201491085E01F0A6 -:102E1000CCFE207314991620085E01F0B9FE08ABB1 -:102E20006073987C0009000703D5387E4007400F87 -:102E300000E0FF20A072A07A0490A888002804D0A7 -:102E40000B98FBF208FC002839D00027A770E77028 -:102E5000A888002802D1287B20282CD10498E7F7E5 -:102E600006FC00280AD00598002805D00022110091 -:102E70003000DFF7F7F901E0FF48077008AB987CF6 -:102E8000059902093000E7F70DFD0698012812D1D7 -:102E9000FA48008800280BD0F94800220068462133 -:102EA000E9F223F8002803D0F6490120087002E077 -:102EB0001620E8F7B8FA2800FFF74CFDDAE6387E6E -:102EC000C00905D0169A21002800FFF755FE05E03D -:102ED0000B9B169A21002800FFF74CFE00287ED09D -:102EE000A888A070000A22000B32E0701698D11C4E -:102EF000FBF2BFFB707A022810D1300002F0D2FD45 -:102F000008A900911121490109AA079040180192CE -:102F100003780A9A30000CA9FFF761FE099800288F -:102F200046D0D94800220188D848032302F0BBF9D3 -:102F3000002802903CD00299A88888800299AC2091 -:102F40000881029808210173029F1221AC373800D2 -:102F5000FAF2ACEB1420387100207871E079A17995 -:102F600000020843B871000AF8710798406A012806 -:102F700004D1F068000501D5A07A38736079217911 -:102F800000060014084301193800AA881430FAF228 -:102F9000C8EA029930694861F07A7870B07A38707E -:102FA000A888B870000AF8700298042100F046FA68 -:102FB000287B202836D0FFF791FCB64F0390B44809 -:102FC0003C680022290000681623A04704000398EB -:102FD000FFF788FC022C17D0012C15D000E021E06F -:102FE00002F0C9F8002802D00520E8F71CFAFFF724 -:102FF00075FC0390A6483C6800222900006817234E -:10300000A0470398FFF76EFC0498E7F730FB002811 -:1030100011D00598012809D1002211003000DFF7F6 -:1030200021F908E00020A070E07044E7059800282E -:1030300001D19149087008AB987C059902093000CC -:10304000E7F730FC0698012812D18C480088002848 -:103050000BD08B48002200684621E8F246FF00288A -:1030600003D088490120087002E01620E8F7DBF958 -:10307000012000E6F0B5002097B004000490019014 -:10308000AEE1002110AB03911A7BD206920F012A08 -:1030900002D90C990907C90F02910189A8C1173CEF +:102CA0000B229201B2185269FF32521C5164106417 +:102CB00008AB987C0009000703D5387E4007400F19 +:102CC00000E0FF20A072A07A0490A888002804D019 +:102CD0000B98FBF2C0FC002839D00027A770E770E2 +:102CE000A888002802D1287B20282CD10498E7F757 +:102CF00074FB00280AD00598002805D00022110096 +:102D00003000DFF7B3FB01E0BD48077008AB987CEB +:102D1000059902093000E7F77BFC0698012812D1DB +:102D2000B848008800280BD0B74800220068462128 +:102D3000E9F2DBF8002803D0B4490120087002E072 +:102D40001620E8F726FA2800FFF7E0FCD0E6387EE8 +:102D5000C00905D0169A21002800FFF74BFE05E0B8 +:102D60000B9B169A21002800FFF742FE00287ED018 +:102D7000A888A070000A22000B32E0701698D11CBF +:102D8000FBF277FC707A022810D1300002F082FE4C +:102D900008A900911121490109AA07904018019240 +:102DA00003780A9A30000CA9FFF757FE099800280B +:102DB00046D09748002201889648032302F03FFA44 +:102DC000002802903CD00299A88888800299AC2003 +:102DD0000881029808210173029F1221AC37380044 +:102DE000FAF264EC1420387100207871E079A1794E +:102DF00000020843B871000AF8710798406A012878 +:102E000004D1F068000501D5A07A38736079217982 +:102E100000060014084301193800AA881430FAF299 +:102E200080EB029831694161F07A7870B07A38703D +:102E3000A888B870000AF8700298042100F0A4FA7B +:102E4000287B202836D0FFF725FC744F039072486A +:102E50003C680022290000681623A047040003985C +:102E6000FFF71CFC022C17D0012C15D000E021E04C +:102E700002F04DF9002802D00520E8F78AF9FFF7A3 +:102E800009FC039064483C6800222900006817236D +:102E9000A0470398FFF702FC0498E7F79EFA002882 +:102EA00012D00598012809D1002211003000DFF767 +:102EB000DDFA09E00020A070E07044E705980028E2 +:102EC00002D14F480021017008AB987C0599020996 +:102ED0003000E7F79DFB0698012812D14948008889 +:102EE00000280BD04848002200684621E8F2FDFF88 +:102EF000002803D045490120087002E01620E8F7B9 +:102F000048F90120F5E5F0B500260C8B1788250956 +:102F10000C7E2407240FAF420FD1C9780907C90FCF +:102F2000214303D01988491CA14202D105998C4242 +:102F300001D38680F0BD1C80F0BD002CF9D1158036 +:102F4000F9E7F0B5002597B02C000195EAE10020E3 +:102F500010AB0390197AC906890F012902D90B9881 +:102F60000007C00F0290EAF7D4FD002808D0EAF766 +:102F7000ACFF01000498416105A9DEF7C5FAD1E173 +:102F800004980189081805A901F033FD1598002857 +:102F900005D1049800218180FFF7B8FBC2E11598A4 +:102FA0000C3002F0F7FD040005D115990120123113 +:102FB00002F013FE04001599200001F077FE0028AE +:102FC00001D00024E5E7002CE3D004994C61607A3D +:102FD000022825D1200002F084FD0C300190E06829 +:102FE000159AC0040499C00FFBF2B8FA30E0000053 +:102FF00045F300C054F300C050F300C0A0F300C07C +:1030000044F300C05C3A01C0F0F100C040F300C0DE +:1030100026F400C064040004F4F100C030F200C0E3 +:10302000207A012801D006280CD12300159A7E337E +:103030000120FBF29DFA207A012809D1200002F03C +:1030400080FD05E02300159A7E330120FBF2B3FAE0 +:10305000049801890E18F178C90701D1B71D01E064 +:10306000370012370521C901611816910968002936 +:1030700002D00A6B521C0A633978C90706D0169928 +:103080000968002902D04A6B521C4A630299002940 +:1030900066D1818800297ED0B1780A07E652F1B95D :1030A00001000000D825020000040000369FE7A3BD -:1030B000081806A901F0E1FC1698002805D105982A -:1030C00000218180FFF750FC94E116980C3002F04B -:1030D0006CFD040005D116990120123102F088FD23 -:1030E00004001699200001F025FE002801D00024DC -:1030F000E5E7002CE3D005994C61607A02280CD1F9 -:10310000200002F000FD0C300190E068169AC00427 -:103110000599C00FFBF22CFA17E0207A012801D0A4 -:1031200006280CD12300169AA2330120FBF22AFABA -:10313000207A012809D1200002F015FD05E02300C6 -:10314000169AA2330120FBF240FA059801890D1866 -:10315000E978C90701D1AE1D01E02E001236052124 -:10316000C9016718796A002902D00A6B521C0A63E8 -:103170003178C90705D0796A002902D04A6B521C00 -:103180004A630299002965D1818800297DD0A978F8 -:103190000A07920F022A31D109090C292ED00429DD -:1031A0002CD0082904D110AB197C4907490F00E045 -:1031B00000212200FF326132937B8B4203D0002337 -:1031C000DB435381917323001022FF336D33009250 -:1031D00016999A1EFBF20EFA0598808800280DD1E8 -:1031E000200006A9FFF7E8FC0598FFF7BDFB786A09 -:1031F000002802D0016A491C0162FBE0E068C003BC -:103200001ED5E878C10712D1800710D5BB208000F9 -:103210002118280006221230FFF78EF8002806D168 -:10322000059988803078C207D20F012104E03078F8 -:10323000C0070FD1002211002000E0F711F909E0CA -:103240003078C0070AD0BB208000221805982900DA -:10325000EDF2BEFF05988088002897D0607A02289A -:1032600039D1200006A901F046FF16990198C978C6 -:10327000007DC906C90F884202D02000E4F729FD6D -:10328000200001F008FE200010E03BE0ECF000C060 -:10329000C43B01C080EF00C0E8F000C0CEF100C028 -:1032A0002C00000484EF00C0C0EF00C005F092E8DD -:1032B000012803D11699200005F090E801984030CC -:1032C000007D032803D005990020888071E00598CF -:1032D000808800286DD02000E0F78EFF1698FBF262 -:1032E000A2F900281ED0059881884039818016995E -:1032F000097E090707D11699C978490703D4169999 -:103300000988818055E04C4A009201894B4A4C4B18 -:103310000918FAF299FF00286CD005900189081865 -:10332000169046E016988079C00701D0F86800E052 -:103330003869002801D1049801E008300490002881 -:103340004DD00498C1790807000F022801D0032846 -:103350000FD1FF226D32125B16990120002A00D096 -:103360000020FBF26FF9049A059806A900F035F9E0 -:1033700017E0012801D008072BD1002000F09EF8AB -:103380000028FAD1049A06A905A8DEF77DF80028DE -:1033900004D1059800282DD00021818003980028B1 -:1033A00007D00498C0790007000F022809D003282D -:1033B00007D0059806A9FFF7E6FA059806A9FFF7D2 -:1033C00053FCDEF731FD002814D00120DEF732FD7A -:1033D00019E01C48DDF704FC04F09CEEE9E7786A8C -:1033E0008168491C81601698BF21C07808401699F1 -:1033F000C87068E70121002006AA01F060FB0028E0 -:10340000059000D047E610498020C0430861FBF2D8 -:1034100038FA002802D00420DEF70CFD0B4900200A -:10342000C860002C086106D00B2080012018806B3A -:103430000321E3F72DFA28E4FC1C01C0041D01C0A0 -:10344000305E02C00200010000A500806C3901C09E -:1034500002220B0010B50100027304481C22006810 -:10346000FAF23EFE10BD40690069704784EF00C06B -:103470000348006880300068C007C00F7047000034 -:1034800094EF00C038B51400049A00922200EDF7C2 -:1034900017F938BD10B5EDF7DBF810BD10B5EDF735 -:1034A000EAF810BD10B5EDF749F91128E70E6C2DBB +:1030B000920F022A32D109090C292FD004292DD0D0 +:1030C000082904D110AB197B4907490F00E0002102 +:1030D0002200FF32413293798B4203D00023DB433D +:1030E0005380917123001022FF33453300921599CC +:1030F0009A1EFFF712FF0498808800280ED1200046 +:1031000005A9FFF797FC0498FFF70AFB16980068DB +:10311000002802D0016A491C01620DE1E068C00389 +:103120001ED5F078C10712D1800710D55920C000F4 +:103130002118300006221230FEF7DAFF002806D1EF +:10314000049988803878C207D20F012104E03878CA +:10315000C0070FD1002211002000E0F785FA09E036 +:103160003878C0070AD05920C000221804983100CE +:10317000EEF22EF804988088002896D0607A022813 +:1031800029D1200005A901F082FF15990198C9787D +:10319000007DC906C90F884202D02000E4F762FC16 +:1031A000200001F03EFE200000E0A2E005F054E91E +:1031B000012803D11599200005F052E9019840300B +:1031C000007D032803D004990020888091E00498B2 +:1031D00080880028FAD02000E1F7F8F81598FBF273 +:1031E00022FA00281ED004988188403981801599E0 +:1031F000097E090707D11599C978490703D415999C +:103200000988818075E05D4A009201895C4A5D4BC6 +:103210000918FBF219F800287BD0049001890818DE +:10322000159066E015988079C007574823D022187A +:10323000506A002825D0617A032920D115990830D9 +:1032400005002431C9784030007C8909884204D1C6 +:103250004E498868401C886013E0906A0028F7D0C7 +:1032600008305022125C8A42F2D148490500486871 +:10327000401C486005E02018C06A002801D0050005 +:103280000835002D4CD0E9790807000F022801D03D +:1032900003280FD1FF224532125B15990120002A25 +:1032A00000D00020FBF2CEF904982A0005A900F016 +:1032B0003AF917E0012801D008072BD1002000F0CF +:1032C000A3F80028FAD12A0005A904A8DEF7DCF843 +:1032D000002804D1049800282ED000218180039872 +:1032E000002806D0E8790007000F022809D003283B +:1032F00007D0049805A9FFF722FA049805A9FFF75B +:10330000F1FBDEF7FBFD002816D00120DEF7FCFD07 +:103310001BE011E01E48DDF763FC04F036EFE8E740 +:10332000169800688168491C81601598BF21C07893 +:1033300008401599C87046E70121002005AA01F050 +:1033400084FB0028049000D00BE612498020C04383 +:103350000861FBF296FA002802D00420DEF7D4FDC3 +:103360000D490020C860002C086106D00B208001A8 +:10337000201840690321E3F70BFACDE5AC2001C02A +:10338000B42001C0305C02C0400200002C040004E4 +:103390000200010000A50080543901C002220B0088 +:1033A00010B50100027304481C220068FAF298FE6E +:1033B00010BD406900697047F4F100C0034800681F +:1033C00080300068C007C00F7047000004F200C0E2 +:1033D00038B51400049A00922200EDF77BF838BD4E +:1033E00010B5EDF73FF810BD10B5EDF74EF810BD74 +:1033F00010B5EDF7ADF8112800D1122010BD10B5B1 +:10340000EDF7AEF810BD0000FA498000085870478B +:1034100070B58400F74D2859002803D1ECF7ADFEB4 +:103420000120285170BD10B5016800242200372901 +:1034300000D04A1C41688A4201D1002208E02422BF +:103440004A43230012180C32372900D04B1C43602A +:10345000100010BD30B500240A682300102A01D0E6 +:103460000F2A04D02300102A00D0531C5B1C4D6887 +:10347000AB4201D1002030BD2300102A00D0531CE4 +:103480009A000B6051188860012030BD016800234C +:103490001A00102900D04A1C41688A4201D100223A +:1034A00006E08A0012189268102900D093E058A60E :1034B00001000000D429020000040000C2F09217AD -:1034C00000D1122010BD10B5EDF74AF910BD000073 -:1034D000FA4980000858704770B58400F74D2859A4 -:1034E000002803D1ECF724FF0120285170BD10B54E -:1034F000016800242200372900D04A1C41688A4212 -:1035000001D1002208E024224A43230012180C3281 -:10351000372900D04B1C4360100010BD30B500248B -:103520000A682300102A01D00F2A04D02300102A91 -:1035300000D0531C5B1C4D68AB4201D1002030BD54 -:103540002300102A00D0531C9A000B605118886089 -:10355000012030BD016800231A00102900D04A1C48 -:1035600041688A4201D1002206E08A00121892685E -:10357000102900D04B1C43601000704770B5050047 -:10358000FFF7C0F90400CD480021006800281ED1D3 -:10359000CA48CB4B143805611A68102A00D0511C58 -:1035A0005868814204D08000C0188068002805D186 -:1035B000C3484C3000F0D1F9002804D0C148DDF7F1 -:1035C00019FB04F0B2ED2800EEF7DFFC0BE0BC497C -:1035D0002800FFF7A3FF002805D1BA48401CDDF7FB -:1035E00009FB04F0A2ED2000FFF790F970BDF7B5DC -:1035F0000E001700FFF786F90500B04800240068A8 -:10360000002823D1AE484C3000F0A7F900280CD197 -:10361000AB490868102800D0441C486884420AD08E -:10362000800040188068002805D0A648801CDDF77F -:10363000E1FA04F07AED3A0031006846EEF768FDF1 -:10364000002812D1009800F097F90EE09C4B0098EA -:103650003A0031004C3300F01DF9002805D199489B -:10366000C01CDDF7C7FA04F060ED2800FFF74EF943 -:10367000FEBD10B5CC79030000202409022C02D134 -:103680004031087C10BD002AFCD0597A0229F9D1BA -:10369000180002F01BFA1B2149014018408B00065C -:1036A000000E10BDF0B5032400238449864A143966 -:1036B0000E68824D2402012E85B057D1002855D1C5 -:1036C0001068A04310600B602B6008690F0001892F -:1036D00046690C18B968002E4A88019203D100216E -:1036E000FFF700F9CAE06B465A79520718D4310047 -:1036F0006A4601F011FC0028F4D16B4618790007E6 -:10370000800F022808D139692200300000F0A5F9A5 -:103710000028E7D13869E2E73869DEF760FCADE000 -:10372000088820314018E16EC01C8708C879BF00A6 -:103730000007000F022810D1B879C207D20F30005D -:10374000FFF797FF3988103939800090E36E2268BF -:1037500000213800EEF7CAFB95E003287ED10B006C -:10376000226800213800EEF706FB8CE04E68012E3F -:10377000B8D10028B6D110681668A6431660534A1F -:103780004B602B60146808320292CA696669521C49 -:10379000CA61020702D50A6A521C0A62002E18D0BA -:1037A00002074B484B4F18D58A69521C8A61FAF2BE -:1037B0000EE880780007800F02280AD1F119486AC4 -:1037C000002806D04268521C4260486A0169491CC0 -:1037D0000161200000F0D0F850E00390F9F2F6EF1C -:1037E0008079C1073C48C06809D18179890706D52D -:1037F000717A022903D0817AFD2211408172C07949 -:103800000007000F022805D10398F9F2E0EF0188C4 -:10381000103906E0032805D10398F9F2D8EF0188A2 -:1038200022390180A0884038A0800398F9F2CEEFB9 -:1038300080780007800F02281DD1284A0092208935 -:10384000274A0119274B2000FAF208FD002815D05D -:103850000400F019406A002804D000E016E0416E30 -:10386000491C416602992000FFF797F80299200051 -:10387000FFF704FA02E02000F2F717FF10491048A2 -:103880004C3100F083F82868002801D1ECF756FD90 -:1038900005B0F0BDF8B51C000F001D680026310012 -:1038A000372D01D0362D04D03100372D00D0691CC2 -:1038B000491C6368994217D10020F8BDE30F09CD78 +:1034C0004B1C43601000704770B50500FFF7F6F81D +:1034D0000400CD480021006800281ED1CA48CB4B0B +:1034E000143805611A68102A00D0511C58688142AE +:1034F00004D08000C0188068002805D1C3484C3033 +:1035000000F0D1F9002804D0C148DDF773FB04F0C6 +:1035100046EE2800EEF763FC0BE0BC492800FFF7FD +:10352000A3FF002805D1BA48401CDDF763FB04F077 +:1035300036EE2000FFF7C6F870BDF7B50E00170095 +:10354000FFF7BCF80500B04800240068002823D12C +:10355000AE484C3000F0A7F900280CD1AB49086800 +:10356000102800D0441C486884420AD080004018CB +:103570008068002805D0A648801CDDF73BFB04F0DE +:103580000EEE3A0031006846EEF7ECFC002812D14E +:10359000009800F097F90EE09C4B00983A0031003B +:1035A0004C3300F01DF9002805D19948C01CDDF707 +:1035B00021FB04F0F4ED2800FFF784F8FEBD10B500 +:1035C000CC79030000202409022C02D14031087C70 +:1035D00010BD002AFCD0597A0229F9D1180002F056 +:1035E0006DFA1B2149014018408B0006000E10BDEA +:1035F000F0B5032400238449864A14390E68824DAD +:103600002402012E85B057D1002855D11068A0435F +:1036100010600B602B6008690F00018946690C1867 +:10362000B968002E4A88019203D10021FFF736F8CD +:10363000CAE06B465A79520718D431006A4601F045 +:1036400037FC0028F4D16B4618790007800F022858 +:1036500008D139692200300000F0A5F90028E7D12F +:103660003869E2E73869DEF7B0FDADE0088820315F +:103670004018E16EC01C8708C879BF000007000F22 +:10368000022810D1B879C207D20F3000FFF797FF98 +:103690003988103939800090E36E226800213800A3 +:1036A000EEF74EFB95E003287ED10B002268002147 +:1036B0003800EEF78AFA8CE04E68012EB8D1002867 +:1036C000B6D110681668A6431660534A4B602B604B +:1036D000146808320292CA696669521CCA610207FC +:1036E00002D50A6A521C0A62002E18D002074B4803 +:1036F0004B4F18D58A69521C8A61FAF268E88078C3 +:103700000007800F02280AD1F1190868002806D0A6 +:103710004268521C426008680169491C016120002E +:1037200000F0D0F850E00390FAF250E88079C10739 +:103730003C48C06809D18179890706D5717A022988 +:1037400003D0817AFD2211408172C0790007000FF9 +:10375000022805D10398FAF23AE80188103906E008 +:10376000032805D10398FAF232E801882239018052 +:10377000A0884038A0800398FAF228E880780007F3 +:10378000800F02281DD1284A00922089274A01195A +:10379000274B2000FAF262FD002815D00400F01932 +:1037A0000068002804D000E016E0416E491C416624 +:1037B00002992000FEF7CDFF02992000FFF79CF947 +:1037C00002E02000F2F7BCFD104910484C3100F037 +:1037D00083F82868002801D1ECF7DFFC05B0F0BDC4 +:1037E000F8B51C000F001D6800263100372D01D0F0 +:1037F000362D04D03100372D00D0691C491C636878 +:10380000994217D10020F8BD500400049806000426 +:103810002500010000A000905044000498440004DA +:10382000800200003C040004AC2001C0B42001C0B0 +:10383000305C02C0372D00D06E1C242171432660FD +:103840000919C860206824235843391D00190261F2 +:1038500020681822584300191430F9F276EE2068D7 +:1038600024235843011938002030037E02000B77CF +:10387000407E4877206824235843127D0019203069 +:10388000C178D206C723920F1940D2001143C170EC +:1038900038004030F9F29AEF21682423594309197E +:1038A000C8620120AFE702680021372A00D0511C0E +:1038B0004268914201D100207047242150FCF04021 :1038C00001000000D02D020000040000912A417B7D -:1038D00018000004680200042500010000A0009008 -:1038E0003044000478440004800200000400000416 -:1038F000FC1C01C0041D01C0305E02C0372D00D089 -:103900006E1C2421714326600919C8602068242395 -:103910005843391D001902612068182258430019C4 -:103920001430F9F21CEE20682423584301193800A2 -:103930002030037E02000B77407E487720682423E6 -:103940005843127D00192030C178D206C723920F48 -:103950001940D2001143C17038004030F9F240EFF5 -:103960002168242359430919C8620120AFE702687E -:103970000021372A00D0511C4268914201D1002019 -:1039800070472421514308180C30704710B5016965 -:10399000002902D1FEF7FCFF10BDF2F79AFE10BD20 -:1039A000F3B581B0254835E00298FFF7AAFD040081 -:1039B00035D06768002F2AD0029825008168083525 -:1039C0000E000836009118222900301DF9F2C6EDCC -:1039D0003100287A20310876687A4876087DE72217 -:1039E0001040EA7B18239206920E1A401043087585 -:1039F000E818F9F2F6EE31004031F9F202EF0099E1 -:103A00003A0008312000EEF78DFB002807D120682E -:103A1000FFF7BCFF094800680028C5D0FEBD074875 -:103A200000680028FAD10198FFF79EFD0028F5D024 -:103A3000024914390861EEF7B2FAFEBD180000041D -:103A400010B50C008968CA0010D5012212079143F5 -:103A5000A160217801224907490FEAF7D4FB01014F -:103A6000E06D028B1207120F0A43028310BD10B5DE -:103A70000C001100FFF7E4FF200004F070F910BD06 -:103A8000F8B50400008966690519E86E002815D0AC -:103A9000C1790907090F022907D1827AD20704D018 -:103AA000E86D01881039018004E0032906D1807A8D -:103AB000C00703D02000FFF76BFDF8BD31002000E8 -:103AC0006A4601F033FA0128F7D02A0021003000BD -:103AD000FFF7CDFF0028F0D12000EBF709F8002117 -:103AE0002000FEF709FFF8BDFFB587B001241600DE -:103AF000171F119D04E0FE48DDF786F804F01EEB69 -:103B0000042FF8D22800361F603031060690090EC7 -:103B100060204843F74B8646C718FF20401C88406A -:103B20008446109E10203B00089A88405C331C3E5F -:103B3000012A05936DD10391EF49634649696246B5 -:103B40000B4234D10842049059D1EA4B7046185CBC -:103B5000002820D12878002241070798490FEAF76A -:103B600052FB6B46998800010907090F0143019137 -:103B7000187900090001187101990A98F0F2E3F927 -:103B80000698017A0A98F0F242FCDB4804994269EF -:103B90001143416133E00A430499D748114341611D -:103BA00057E00A9878700598FEF7C3FE0EE0D24BF6 -:103BB00007000F420CD0109A03990798DEF768FAB5 -:103BC000012803D130000021FEF796FE00246CE0AE -:103BD000914308435861039860264643C54F08E067 -:103BE0000298A9788170B95D1C38491CB955FFF756 -:103BF00047FF039802A9DEF732FA0028F0D0002C24 -:103C000053D0039860235843BA490A5C521C0A54A3 -:103C10004BE0089A022A48D10391B74963464969A3 -:103C200062460B421DD10500084235D0B14B7046AB -:103C3000185C002809D10698017A0A98F0F2FDFB79 -:103C4000AD494869A843486126E0AB480A43AA4306 -:103C50004261109A03990798DEF71AFA0028B1D149 -:103C60009FE7A54B07000F42A5D0914381435961BF -:103C70000398602646439F4F08E00298A978817018 -:103C8000B95D1C38491CB955FFF7FAFE039802A923 -:103C9000DEF7E5F90028F0D0002C06D00398602369 -:103CA0005843944A115C491C115420000BB0F0BDDC -:103CB000FFB581B00C0005002030007E7F27002674 -:103CC000FF00FE2806D0218D4006B94375ED074A56 +:1038D000514308180C30704710B50169002902D116 +:1038E000FEF732FF10BDF2F73FFD10BDF3B581B01A +:1038F000254835E00298FFF7AAFD040035D0676837 +:10390000002F2AD002982500816808350E0008365D +:10391000009118222900301DF9F220EE3100287A9A +:1039200020310876687A4876087DE7221040EA7BE5 +:1039300018239206920E1A4010430875E818F9F2FF +:1039400050EF31004031F9F25CEF00993A00083154 +:103950002000EEF711FB002807D12068FFF7BCFF1D +:10396000094800680028C5D0FEBD07480068002847 +:10397000FAD10198FFF79EFD0028F5D002491439CD +:103980000861EEF736FAFEBD5004000410B50C00D5 +:103990008968CA0010D5012212079143A1602178DD +:1039A00001224907490FEAF7CCFA0101E06D028BC9 +:1039B0001207120F0A43028310BD10B50C0011004C +:1039C000FFF7E4FF200004F004FA10BDF8B504008E +:1039D000008966690519E86E002815D0C1790907C4 +:1039E000090F022907D1827AD20704D0E86D018835 +:1039F0001039018004E0032906D1807AC00703D082 +:103A00002000FFF76BFDF8BD310020006A4601F091 +:103A100059FA0128F7D02A0021003000FFF7CDFF26 +:103A20000028F0D12000EAF7C9FE00212000FEF7AF +:103A30003FFEF8BDFFB587B001241600171F119D8A +:103A400004E0FB48DDF7E0F804F0B2EB042FF8D215 +:103A50002800361F603031060690090E602048436A +:103A6000F44B8646C718FF20401C88408446109EB1 +:103A700010203B00089A88405C331C3E012A0593C5 +:103A80006DD10391EC496346C96962460B4234D15A +:103A90000842049059D1E74B7046185C002820D1A9 +:103AA0002878002241070798490FEAF74AFA6B463F +:103AB000998800010907090F01430191187900094C +:103AC0000001187101990A98F0F23DFA0698017AFE +:103AD0000A98F0F29CFCD8480499C2691143C1616C +:103AE00033E00A430499D4481143C16157E00A986E +:103AF00078700598FEF7F9FD0EE0CF4B07000F42F6 +:103B00000CD0109A03990798DEF7B8FB012803D16F +:103B100030000021FEF7CCFD00246CE09143084307 +:103B2000D861039860264643C24F08E00298A978FE +:103B30008170B95D1C38491CB955FFF747FF0398E0 +:103B400002A9DEF782FB0028F0D0002C53D00398A6 +:103B500060235843B7490A5C521C0A544BE0089A48 +:103B6000022A48D10391B4496346C96962460B42AF +:103B70001DD10500084235D0AE4B7046185C0028B8 +:103B800009D10698017A0A98F0F257FCAA49C86947 +:103B9000A843C86126E0A8480A43AA43C261109A14 +:103BA00003990798DEF76AFB0028B1D19FE7A24B83 +:103BB00007000F42A5D091438143D9610398602645 +:103BC00046439C4F08E00298A9788170B95D1C3883 +:103BD000491CB955FFF7FAFE039802A9DEF735FB39 +:103BE0000028F0D0002C06D0039860235843914A57 +:103BF000115C491C115420000BB0F0BDFFB581B021 +:103C00000C0005002030007E7F270026FF00FE28E4 +:103C100006D0218D4006B943800D014321850CE07B +:103C2000287A01280BD12800E8F7AEFF407D002854 +:103C300005D1208DB8430830208501260EE02800EC +:103C4000FF305D30F5F20FFE218D4006800DB94347 +:103C50000143218504980078C00727D0E06901213D +:103C600009030843E06104990978C9071ED0FF21C0 +:103C7000491C084320218843E061687A02280AD160 +:103C80000398002803D00398EEF272FF08E02800A2 +:103C900004F03CF804E0002E08D12800F0F743FCC3 +:103CA000218D4006800DB94301432185208D81057A +:103CB000490E032906D861490978890602D5B84317 +:103CC0002830208505B0F0BD70B50E004F233D9F14 :103CD00001000000CC310200000400002EEF64C897 -:103CE000800D014321850CE0287A01280BD12800A2 -:103CF000E9F762F8407D002805D1208DB8430830EF -:103D0000208501260EE02800FF308530F5F2B5FD54 -:103D1000218D4006800DB943014321850498007828 -:103D2000C00727D0E069012109030843E061049935 -:103D30000978C9071ED0FF21491C08432021884368 -:103D4000E061687A02280AD10398002803D003981A -:103D5000EEF218FF08E0280003F0ACFF04E0002EAC -:103D600008D12800F0F7A3FD218D4006800DB9434E -:103D700001432185208D8105490E032906D8644918 -:103D80000978890602D5B8432830208505B0F0BDF2 -:103D900070B50E005F4D002428782900497800286E -:103DA0001AD101F0DEFE0400007A012805D13000AE -:103DB00001F019FF002836D00CE0002833D1687BD1 -:103DC000C00630D5300001F00EFF00282BD0C168AE -:103DD000C90428D5040026E0012801D0022822D1F8 -:103DE00001F0BFFE04001ED0607A02281BD130789B -:103DF000C0070BD0200001F07DFE002813D0092160 -:103E000089014018C06900280DD10BE0300001F095 -:103E1000EAFE040001F095FE002C04D0603000782A -:103E2000032800D00024200070BDF8B505002F0045 -:103E300000895419401900901C202E187C37002945 -:103E400028811ED060782178000208431E2801D9FD -:103E50001E3800E000202070000A607070213000E1 -:103E6000F9F222EC0098407CF8726869007A032825 -:103E700003D0E2F78DFE012801D1052000E00020EB -:103E8000B070E078FB210840E070607E217E000287 -:103E900008430007000F2076000A6076207E072185 -:103EA0000009000120763078084330700920F4655D -:103EB00038722800EEF7A8FD002802D12800DEF7AE -:103EC000A2F8F8BD70B51448FAF243F904002CD0FA -:103ED000208905196978287801F043FE00281DD053 -:103EE000606168792A792189000210430818020468 -:103EF000120C01212000FFF798FF0120DDF7B8FF29 -:103F00000FE00000500001007C4400042C7C020003 -:103F1000365C0004FC4500044C4600042000FAF224 -:103F200085F8FF490868401C086070BDFEB5FD4873 -:103F300041690905090F6CD0FB4F0024FF20F94AA5 -:103F4000401CA040516903000B425FD060256543CF -:103F50007B5D002B5AD181431020A0400842516163 -:103F600036D0F249F24804F0FCE8F24A0020EE199B -:103F700018214143535C002B20D08918897873782D -:103F800099421BD1182358438118081D029101F052 -:103F90002AFE029900224978EAF73FF96B46198810 -:103FA00000010907090F0143009118780009000179 -:103FB000187070780099EFF2D0FF02E0401C0428DE -:103FC000D6D3201D01067078090EF0F22AFA0AE015 -:103FD000D949D74804F0C4E8201D0106E819407803 -:103FE000090EF0F234FAD24E0AE0D449300004F05F -:103FF000B8E801981C38FFF74DFD785D401C7855F6 -:10400000200001A9DEF735F80028EED0641C042C4E -:1040100094D3FEBDF0B50020D1B020901D90DEF706 -:1040200069F8C7485090C1208002DCF7F7FD0022F4 -:10403000D243BC4C0092C349E06808224BABFFF767 -:104040003FFAC148DCF7EAFD4B980028EBD0400668 -:1040500007D50020E8F750FBBC4948684A061043E2 -:1040600048604B98C0060AD5E8F766FBB8480722B7 -:1040700000681021FFF730FA2920E7F7FCF94B9888 -:10408000810602D5B34A00211170400501D5DEF743 -:10409000C5FE4B98400701D5FFF714F84B988007F1 -:1040A0000DD504E01F98AC220021FFF7BEFE206969 -:1040B000042200231FA9FFF70BFA0F28F2D14B9817 -:1040C000092108427ED0A4480168954800688142D1 -:1040D00001D0FFF7F7FE01F0D0FD00286CD9C55ED6 +:103CE0005C4D002428782900497800281AD101F079 +:103CF00030FF0400007A012805D1300001F072FF86 +:103D0000002836D00CE0002833D1687BC00630D5BF +:103D1000300001F067FF00282BD0C168C90428D506 +:103D2000040026E0012801D0022822D101F011FF71 +:103D300004001ED0607A02281BD13078C0070BD057 +:103D4000200001F0CFFE002813D00921890140187E +:103D5000C06900280DD10BE0300001F043FF0400E2 +:103D600001F0E7FE002C04D060300078032800D07A +:103D70000024200070BDF7B582B005002F00008937 +:103D80005419401901901C202E18288103987C3763 +:103D9000002832D060782178000208431E2801D91B +:103DA0001E3800E000202070000A60707021300092 +:103DB000F9F27AEC0198407CF8726869007A03287D +:103DC00003D0E2F7B9FD012801D1052000E0002071 +:103DD000B070A0780007800F02280ED101F0E2FE3B +:103DE00000280AD1652179721B49C868CA0D1043A1 +:103DF000C86016480178491C0170E078FB21084032 +:103E0000E070207E0009000120760398002808D188 +:103E1000607E217E000208430007000F2076000A22 +:103E2000607630780721084330700920F4653872D5 +:103E30002800EEF719FD002802D12800DEF7D9F995 +:103E40004AE70000500001009C440004D003000435 +:103E50003A5C00041C46000400A8008070B5FF48CE +:103E6000FAF277F904001FD02089051969782878BB +:103E700001F06FFE002810D0606168792A792189ED +:103E80000002104308180204120C01212000FFF761 +:103E900072FF0120DEF756F802E02000FAF2C6F8C1 +:103EA000EF490868401C086070BDFEB5ED48C16967 +:103EB0000905090F6CD0EC4F0024FF20E94A401C93 +:103EC000A040D16903000B425FD0602565437B5D54 +:103ED000002B5AD181431020A0400842D16136D036 +:103EE000E249E34804F076E9E24A0020EE1918219D +:103EF0004143535C002B20D089188978737899420C +:103F00001BD1182358438118081D029101F06AFE45 +:103F1000029900224978EAF71EF86B4619880001D9 +:103F20000907090F01430091187800090001187072 +:103F300070780099F0F211F802E0401C0428D6D302 +:103F4000201D01067078090EF0F26BFA0AE0CA49EA +:103F5000C74804F040E9201D0106E8194078090E21 +:103F6000F0F275FAC24E0AE0C449300004F032E9BA +:103F700001981C38FFF734FD785D401C785520000F +:103F800001A9DEF76CF90028EED0641C042C94D350 +:103F9000FEBDF0B50020D1B020901D90DEF7A0F955 +:103FA000B7485090C1208002DCF738FE0022D2438F +:103FB000AC4C0092B349606908224BABFFF726FA7C +:103FC000B148DCF72BFE4B980028EBD0400607D514 +:103FD0000020E8F731FAAD4948684A0610434860C6 +:103FE0004B98C0060AD5E8F747FAA94807220068A7 +:103FF0001021FFF717FA2920E7F7F3F84B9881060D +:1040000002D5A44A00211170400501D5DFF70AF856 +:104010004B98400701D5FEF7BCFF4B9880070DD5A4 +:1040200004E01F98AC220021FFF7A5FEA06904223E +:1040300000231FA9FFF7F2F90F28F2D14B980921AD +:1040400008427ED09448016885480068814201D0CA +:10405000FFF704FF01F010FE0028A3D0206A00281B +:10406000A0D1DEF770F800289CD1FFF71EFF209842 +:104070000025002850D000201790169014908648F4 +:10408000016877480068814201D0FFF7E7FE209879 +:104090001222018909187A484C910838F9F268EA25 +:1040A00077494C9808398A8810181A9048887D22D8 +:1040B0009201904200D3FEE771480838007B08283F +:1040C00003D36F490020083908736D481A990838DE +:1040D0001CAADEF7C5FF0128159013D1692D6E09C2 :1040E00001000000C8350200000400007D35B7A4BF -:1040F000A3D0A0690028A0D1DDF739FF00289CD10A -:10410000FFF71EFF20980025002850D000201790B0 -:10411000169014909548016886480068814201D045 -:10412000FFF7DAFE209812220189091889484C917C -:104130000838F9F228EA87494C9808398A88101813 -:104140001A9048887D229201904200D3FEE7814870 -:104150000838007B082803D37E49002008390873FB -:104160007C481A9908381CAADEF780FE01281590B1 -:1041700013D118AB187CDEF773FE169080300569FA -:10418000280001F0C1FC169C169826001436010088 -:1041900070310120A1611E90F6E01A992098FFF776 -:1041A00001FE050004D120980021FEF7B9FB0EE3C3 -:1041B000280001F0A9FC0700687A1A990124032855 -:1041C00002D12900A2310024062218A8F9F2DAE966 -:1041D00060480838007B00E019E35B4B1CAA18A973 -:1041E000FAF268F9002813901DD061480068002891 -:1041F00019D0604800680079002814D1554918ABDF -:10420000187C2A0008392300DEF761FE04007021C3 -:104210001690F9F254EA169826001436010070310F -:104220000120A16141E0012022AC17907021200003 -:10423000F9F244EA43A82890464826001436083884 -:10424000407BC00721D0DEF70DF8E5F7E4FB00283E -:1042500014D049480078002810D12800FAF756FEFB -:10426000012100913B49002201920839497B02005B -:104270000907CB0F01212800DEF77DF8E5F7B5FB34 -:10428000002890D0E6F72FFB8DE7287A012804D08C -:10429000697A022901D0062804D11A99280001F070 -:1042A0000FFD02E0280001F017FD1E90FA7F31009B -:1042B000280018ABFFF710FD304901200979C90625 -:1042C00009D4697A022905D113214901791809799C -:1042D000090700D400201B90287A002816D1280056 -:1042E00020304F90807E000710D4308D8005400E26 -:1042F000FAF22CFA07001220FAF228FA874205D8BF -:104300004F98807E8007C20F012104E03A20405D73 -:104310001B998007C20F3000FAF238F91398002871 -:104320003CD0308D8005400E03F0D8FD00282DD004 -:10433000044925E0C4EF00C02C7C02007C4400044A -:1043400011111111BBBBBBBBC8800200222222226B -:104350003333333304460004FF1F0000040403001A -:1043600040A5008004F600C0ADF100C0B8EF00C069 -:10437000787C0200ECF500C0EBF000C0365C000475 -:10438000C943C84303F0F6EE01270DE0FE49FF489C -:1043900003F0F0EE02270120179005E0FC49FB48EE -:1043A00003F0E8EE0027F6E7FA490120087004F070 -:1043B00042E8159A00921E9A4C983300290000F0AA -:1043C000A7FA209A1C211181209900061C314D91D9 -:1043D0000021A18071802099000E4D61EE493E942C -:1043E0004A8840AB121A1A804C9A8988101808180B -:1043F0003F900020D870687A032801D001280CD1A2 -:10440000280001F069FC002807D0E348017B280060 -:1044100001F06EFCE049087315E0287A012804D108 -:10442000280001F059FC002805D1687A022802D042 -:10443000287A062809D11A99280001F041FC0028A1 -:1044400003D0D548007B40ABD870002F07D03E98F2 -:1044500001218068090708433E9988600FE01E9893 -:1044600000280CD040ABD97801222800E9F7DFFE04 -:1044700040AB198900010907090F014319811598FB -:10448000169A00280DD0C44814A9C0886B460006AF -:10449000000E07C321AA1D9B20993EA802F02AFF07 -:1044A00010E014A8049202901E99BB480391C088A2 -:1044B0001D9B0106090E0091209921AA3EA8019793 -:1044C00002F060FC718C0028E18000D16BE621993C -:1044D000002910D0A1680122D2061143002DA1604D -:1044E00009D00521C9016918496A0029BF93C3731E +:1040F00018AB187CDEF7B8FF1690803005692800F1 +:1041000001F0FAFC169C1698260014360100703156 +:104110000120A1611E90F7E01A992098FFF7E8FDB1 +:10412000050004D120980021FEF7D6FA15E32800F7 +:1041300001F0E2FC0700687A1A990124032802D1F1 +:1041400029007E310024062218A8F9F21CEA514801 +:104150000838007B00E020E34B4B1CAA18A9FAF2B8 +:10416000A9F9002813901DD051480068002819D0E3 +:10417000504800680079002814D1464918AB187CD3 +:104180002A0008392300DEF7A6FF040070211690EC +:10419000F9F294EA169826001436010070310120D5 +:1041A000A16141E0012022AC179070212000F9F2BA +:1041B00086EA43A828903748260014360838407B02 +:1041C000C00721D0DEF765F9E5F7DBFA002814D047 +:1041D00039480078002810D12800FAF7FBFC0121AB +:1041E00000912C49002201920839497B02000907FD +:1041F000CB0F01212800DEF7C2F9E5F7ACFA002861 +:1042000090D0E6F726FA8DE7287A012804D0697A5B +:10421000022901D0062804D11A99280001F04FFD87 +:1042200002E0280001F056FD1E90FA7F31002800C0 +:1042300018ABFFF7F7FC214901200979C90609D419 +:10424000697A022905D113214901791809790907E9 +:1042500000D400201B90287A00283FD1280020306D +:104260004F90807E000739D4308D8005400E27E0C6 +:104270006C46000434F200C0D00300049C440004E7 +:1042800011111111BBBBBBBB1C80020022222222D8 +:104290003333333324460004FF3F0000040403009B +:1042A00040A500804CF800C005F400C028F200C012 +:1042B000D87C020034F800C043F300C03A5C00042C +:1042C000FAF244FA07001220FAF240FA874205D8BF +:1042D0004F98807E8007C20F012104E03A20405DA4 +:1042E0001B998007C20F3000FAF250F9139800288A +:1042F00015D0308D8005400E03F02AFE002805D031 +:10430000FF49C84303F070EF01270FE0FC48FD4967 +:10431000C04303F06AEF02270120179006E0F84837 +:10432000F949C04303F060EF0027F5E7F7490120A2 +:10433000087004F0C2E8159A00921E9A4C98330057 +:10434000290000F0ABFA209A1C2111812099000667 +:104350001C314D910021A18071802099000E4D618A +:10436000EB493E944A8840AB121A1A804C9A8988CD +:10437000101808183F900020D870687A032801D0E0 +:1043800001280CD1280001F0A5FC002807D0E04846 +:10439000017B280001F0AAFCDD49087315E0287AAA +:1043A000012804D1280001F095FC002805D1687A85 +:1043B000022802D0287A062809D11A99280001F08B +:1043C0007EFC002803D0D248007B40ABD870002F81 +:1043D00007D03E9801218068090708433E9988600C +:1043E0000FE01E9800280CD040ABD978012228009D +:1043F000E9F7BBFD40AB198900010907090F01432B +:1044000019811598169A00280DD0C14814A9C088A2 +:104410006B460006000E07C321AA1D9B20993EA8EB +:1044200002F06CFF10E014A8049202901E99B848A4 +:104430000391C0881D9B0106090E0091209921AAB5 +:104440003EA8019702F09CFC718C0028E18000D10D +:1044500068E62199002910D0A1680122D2061143F3 +:10446000002DA16009D00521C9016918096800293A +:1044700003D060310A8B521C0A83E0655098F9F230 +:10448000C4E9000950990001F9F2CEE9318D1022FA +:104490008905490E114308435099F9F2C6E9E060D5 +:1044A0009B48407B000706D5DDF7F3FFA06801219C +:1044B000C907084302E0A06840004008A060687A8D +:1044C000032801D0012808D19148817B027B4B0051 +:1044D0002100280001F038FC32E01E98002803D0AB +:1044E0008B48007BFAF25CFAFAF26BFA8155D3DE64 :1044F00001000000C439020000040000895AC21003 -:1045000003D060310A8B521C0A83E0655098F9F29F -:1045100086E9000950990001F9F290E9318D1022E5 -:104520008905490E114308435099F9F288E9E06082 -:104530009E48407B000706D5DDF79EFEA06801215E -:10454000C907084302E0A06840004008A060687AFC -:10455000032801D0012808D19448817B027B4B00BD -:104560002100280001F0FCFB32E01E98002803D057 -:104570008E48007BFAF21EFAFAF22DFA1290159884 -:1045800000280CD1002F07D0210018AB884A187CD6 -:104590006831F9F2C8FF02E0129968200155854898 -:1045A000416A129840003030085A8349884203D04B -:1045B0007E48807B002802D1A08800280AD07B4852 -:1045C0001299807B43006820025D200001F0AAFB65 -:1045D000002885D0287A002802D0687A03281CD1C8 -:1045E00003F092FC002818D07048C088DF2802D160 -:1045F0003721692001557148A0801698002805D000 -:1046000018AB187CDEF704FCDEF71CFC012F04D08D -:10461000E0680E21F9F2BBFFE060A088002803D01B -:104620003100200003F042FC4C98F0634D98306458 -:10463000F08960821598012820D15C48C088E6285E -:10464000207802D18021084301E04006400E18ABDB -:1046500020705749187CF9F230FF6820005D602314 -:10466000001F5843564A115C491C1154208830845D -:104670004D9870222100F8F2FAEFA6E02198002868 -:104680001BD0012F19D02800F0F725F94006810D25 -:10469000308D7F22D200904308433085297A032948 -:1046A00002D1904328303085F069A0218843012150 -:1046B00009030843F06101201790B0892082149803 -:1046C000002800D0E066308D8005400EA070E06DBF -:1046D00080780009082810D15098F9F2A0E83349F1 -:1046E0000122C988E62900D000220092020040ABD6 -:1046F000DB7821003000F9F22BFF012F0FD1314977 -:10470000274803F042ED18AB2949187CF9F2D5FE91 -:10471000A06879070843A0600A20307009E02949A1 -:104720001F48C94303F030ED320021002800EFF7A5 -:10473000CEFE32002100280003F008FB194918487A -:10474000C94303F022ED1648A16803F01EED2000D6 -:1047500060304E90017A124803F016ED20883084C4 -:104760004D9870222100F8F282EF002F0CD04D9965 -:1047700000914E980194027A18AB1B7C39002800F6 -:10478000FFF7D0F900282CD0179800281DD11698D3 -:1047900084421AD116980121803015E0555555559F -:1047A000BBBBBBBB6666666628000004FC45000414 -:1047B000C8800200E4580004FFFF0000FF7F0000F3 -:1047C0007C440004777777770176287A062805D12C -:1047D0000D20800128188168491C81602098FFF70E -:1047E0006DF94B980821084202D0DEF726FE0BE057 -:1047F0006348F9F2C2FC002804D16248F9F2BDFC1A -:10480000002801D0042101730028209000D087E403 -:10481000002D06D00B2080012818806B0321E2F7C1 -:1048200069F84B98C0042BD568461A9023E00620FF -:10483000EFF2FCFF0004000C0621EEF205FA1A9CD0 -:1048400020000C3001F0E3F90500210000F0A4FA8B -:10485000012810D0002D0ED0A0780007800F01286D -:1048600009D16A6B0AA9002A02D02800904702E009 -:10487000280003F0EEED0AA8E1F7BDF90028D6D133 -:10488000414900200870FFF7E2FBF8B504000D0075 -:104890001600001F032840D83C4A201F01215269FE -:1048A0008140114239D060234343394FF95C0029DC -:1048B00004D0491E0906090EF95407D1FF21491CED -:1048C0008140114202D00120DDF7E6FA002D24D00C -:1048D0002869002821D02F4A002018214143535C29 -:1048E000002B1BD08918C978A14217D11821414348 -:1048F00089180C0029680A34C96DE31C5CB0E7E430 +:104500001290159800280CD1002F07D0210018AB6D +:10451000854A187C6831FAF206F802E012996820A0 +:1045200001558248416A129840003030085A80494B +:10453000884203D07B48807B002802D1A0880028D5 +:104540000AD078481299807B43006820025D2000E1 +:1045500001F0E6FB002885D0287A002802D0687A8E +:1045600003281CD103F00AFD002818D06D48C0882C +:10457000DF2802D13721692001556E48A0801698A6 +:10458000002805D018AB187CDEF746FDDEF75EFD8F +:10459000012F04D0E0680E21F9F2F9FFE060A08855 +:1045A000002803D03100200003F0BAFC4C98F063DF +:1045B0004D983064F08960821598012820D15948BF +:1045C000C088E628207802D18021084301E0400617 +:1045D000400E18AB20705449187CF9F26EFF682029 +:1045E000005D6023001F5843534A115C491C11545D +:1045F000208830844D9870222100F9F238E8ABE031 +:10460000219800281BD0012F19D02800EFF7A9FF0F +:104610004006810D308D7F22D200904308433085C3 +:10462000297A032902D1904328303085F069A021EE +:104630008843012109030843F06101201790B089E4 +:1046400020821498002800D0E066308D8005400E4E +:10465000A070E06D80780009082810D15098F9F218 +:10466000DEE830490122C988E62900D00022009204 +:10467000020040ABDB7821003000F9F269FF012F26 +:1046800010D124482D49C04303F0B8ED18AB26499A +:10469000187CF9F212FFA06879070843A0600A208D +:1046A00030700AE025491B48C943C04303F0A6ED1A +:1046B000320021002800EFF74AFD320021002800D7 +:1046C00003F07EFB15491348C943C04303F096ED40 +:1046D0001048A168C04303F092ED200060304E9076 +:1046E000017A0C48C04303F08AED208830844D984D +:1046F00070222100F8F2BAEF002F23D04D990091DB +:104700004E980194027A18AB1B7C39002800FFF701 +:10471000AFF915E044444444555555556666666600 +:10472000600400041C4600041C800200F0580004D1 +:10473000FFFF0000FF7F00009C440004777777773D +:10474000002814D01798002806D11698844203D167 +:104750001698012180300176287A062804D1C001FC +:104760002818016A491C01622098FFF74DF94B98FF +:104770000821084202D0DEF764FF0BE06348F9F23B +:10478000FCFC002804D16248F9F2F7FC002801D0B3 +:10479000042101730028209000D080E4002D06D071 +:1047A0000B208001281840690321E2F723F84B9879 +:1047B000C0042BD568461A9023E00620F0F236F8A4 +:1047C0000004000C0621EEF23FFA1A9C20000C3087 +:1047D00001F01CFA0500210000F0A4FA012810D015 +:1047E000002D0ED0A0780007800F012809D16A6B38 +:1047F0000AA9002A02D02800904702E0280003F00E +:104800006AEE0AA8E1F7D8FA0028D6D1414900207B +:104810000870FFF7DBFBF8B504000D001600001F61 +:10482000032840D83C4A201F0121D269814011420F +:1048300039D060234343394FF95C002904D0491E25 +:104840000906090EF95407D1FF21491C8140114284 +:1048500002D00120DDF78AFB002D24D02869002832 +:1048600021D02F4A002018214143535C002B1BD03C +:104870008918C978A14217D11821414389180C0021 +:1048800029680A34C96DE31C098B5A1E0909491CA1 +:104890002180002119701178002904D10106090E28 +:1048A0003000DFF772FDF8BD401C0428DBDBF8BDEB +:1048B000F8B5040008001B4D0699AF8800263C1986 +:1048C0005F68012916D1EB88020021007E32E62BB9 +:1048D00009D0037A012B06D0407A022801D1891D24 +:1048E00002E0062B00D11100380012300622F8F247 +:1048F00054EE05E000920B4923003A00FF731F7845 :1049000001000000C03D020000040000DA80117CBC -:10491000098B5A1E0909491C218000211970117840 -:10492000002904D10106090E3000DFF743FCF8BD71 -:10493000401C0428DBDBF8BDF8B5040008001B4D63 -:104940000699AF8800263C195F68012916D1EB88CB -:1049500002002100A232E62B09D0037A012B06D0F7 -:10496000407A022801D1891D02E0062B00D11100F6 -:10497000380012300622F8F21AEE05E000920B49D8 -:1049800023003A0000F014F8E888E62800D00C264E -:104990003000F8BD2446000410460004280000043E -:1049A0002C7C02007C440004C8800200FC4500040A -:1049B000FFB583B0040016000F00911C0C98002274 -:1049C0000291130069460CC10122F979BB790902F1 -:1049D0001943E92900D00022797BC907C90FECF2FD -:1049E000A3FB0500F879B97900020843EA2803D14E -:1049F000797B082211437973BB2189006218237ADD -:104A0000012721003F03A231012B18D0062B1CD116 -:104A10000B0006993000ECF258FB0D2080012018A5 -:104A20000088002800D100273D4302980622058017 -:104A300030001A306946F8F2BAED07B0F0BD0B004D -:104A400006993000ECF241FB23E0637A022B15D18A -:104A5000069B0A0006999B1D3000ECF236FB0120F4 -:104A600040020543B079C007DFD10221200003F0E6 -:104A70009AEB0128D9D140030543D6E7E62801D1B6 -:104A80000B0000E0069B3000ECF21FFBFF20401CF7 -:104A90000543044800680079C3E7024800680079CC -:104AA00070470000ECF500C0FFB581B005000020A4 -:104AB0001E4C2860206A0E001700002817D0FDF752 -:104AC00053FF216A002910D00A79032A0DD1096AFF -:104AD00000290AD02960216A09683160216A496A7F -:104AE0003960216A0A6B04990A60FDF741FF05B03D -:104AF000F0BDF0B587B006000F00002504AA05A997 -:104B000006A803ABFFF7D0FF069C002C0AD0049A3E -:104B1000019233000022009705981100A047002859 -:104B200000D00125280007B0F0BD0000803801C08A -:104B3000402101817047F8B50024160025000028A7 -:104B4000009424D13000694600F0DCF804000CD059 -:104B50006B461A88642A04D3E1880320F9F2EDFE3B -:104B600002E00320EFF2ABFE60816B46188800285C -:104B700005D0402020811888001FA08007E0002C6D -:104B800005D031002000A580FEF7AAF800242000FF -:104B9000F8BD70B50C000026012B2DD01C4D042B48 -:104BA00004D00F2B31D11B48210013E000F029FB6A -:104BB000002804D0022001F00BF8E3F70DFD208956 -:104BC0000019C179827908021043E52805D01148FF -:104BD00021001438F9F233FB08E00E482100283098 -:104BE000F9F22DFB0C480168491C01602868072276 -:104BF0000121FEF78FFC08E0064821001430F9F28D -:104C00001EFB6069022103F01EEB300070BD000046 -:104C1000387C020024460004B8EF00C0002801DD03 -:104C2000002004E06521C943884200DA08004042C0 -:104C3000000600167047662801DD662002E00028A5 -:104C400000DA00200006001670470000F8B50400E6 -:104C500032D025002035287DE77EC006860F200053 -:104C60001430F8F2E6ED0002000A002E0DD0012EFD -:104C70000FD0022E01D0032E0FD10106CA0F41061C -:104C8000490E1000EFF24EFF08E03800EFF22BFF64 -:104C900004E03800EFF210FF00E0FF20E076287D0E -:104CA000C006810F0B202056DFF7C0FFE0720720FF -:104CB0002056DFF7D8FFE071F8BD2B4810B5C16969 -:104CC00044690A05120DD308006ADB00E3180405E5 -:104CD000240DA24205D1012212031140104081424D -:104CE0000ED1586821490068000C884208D020493C -:104CF0000868401C08600020E7F71CFD002010BD7C -:104D0000012010BDF8B50D0007001A489FE83A31A0 +:1049100000F014F8E888E62800D00C263000F8BD36 +:10492000444600043046000460040004D003000440 +:104930009C4400041C8002001C460004FFB583B0A8 +:10494000040016000F00911C0C9800220291130025 +:1049500069460CC10122F979BB7909021943E92999 +:1049600000D00022797BC907C90FECF2DDFB0500FE +:10497000F879B97900020843EA2803D1797B082243 +:10498000114379735921C9006218237A0127210044 +:104990003F037E31012B18D0062B1CD10B0006994A +:1049A0003000ECF292FB032000022018008B00285C +:1049B00000D100273D4302980622058030001A30BE +:1049C0006946F8F2F4ED07B0F0BD0B00069930002F +:1049D000ECF27BFB23E0637A022B15D1069B0A00E5 +:1049E00006999B1D3000ECF270FB0120400205434C +:1049F000B079C007DFD10221200003F00EEC0128BE +:104A0000D9D140030543D6E7E62801D10B0000E0E9 +:104A1000069B3000ECF259FBFF20401C0543044884 +:104A200000680079C3E70248006800797047000019 +:104A300034F800C0FFB581B0050000201E4C28608E +:104A4000206A0E001700002817D0FDF769FE216AC2 +:104A5000002910D00A79032A0DD1096A00290AD049 +:104A60002960216A09683160216A496A3960216ACE +:104A70000A6B04990A60FDF757FE05B0F0BDF0B56A +:104A800087B006000F00002504AA05A906A803ABFD +:104A9000FFF7D0FF069C002C0AD0049A0192330045 +:104AA0000022009705981100A047002800D001259A +:104AB000280007B0F0BD0000683801C04021018126 +:104AC0007047F8B50024160025000028009424D172 +:104AD0003000694600F0DCF804000CD06B461A8800 +:104AE000642A04D3E1880320F9F227FF02E00320BF +:104AF000EFF2E5FE60816B461888002805D0402063 +:104B000020811888001FA08007E0002C05D031000C +:104B10002000A580FEF722F800242000F8BD70B523 +:104B20000C000026012B2DD01C4D042B04D00F2B84 +:104B300031D11B48210013E000F02FFB002804D0E6 +:104B4000022001F03DF8E3F7F0FB20890019C1795C +:104B5000827908021043E52805D011482100143855 +:104B6000F9F26DFB08E00E4821002830F9F267FBEE +:104B70000C480168491C0160286807220121FEF7E2 +:104B80006FFC08E0064821001430F9F258FB606918 +:104B9000022103F092EB300070BD0000E40300043A +:104BA0004446000428F200C0002801DD002004E093 +:104BB0006521C943884200DA080040420006001619 +:104BC0007047662801DD662002E0002800DA002038 +:104BD0000006001670470000F8B5040032D025002A +:104BE0002035287DE77EC006860F20001430F8F2BD +:104BF00020EE0002000A002E0DD0012E0FD0022E52 +:104C000001D0032E0FD10106CA0F4106490E100034 +:104C1000EFF288FF08E03800EFF265FF04E03800AB +:104C2000EFF24AFF00E0FF20E076287DC006810F0A +:104C30000B202056E0F7F4F8E07207202056E0F74A +:104C40000CF9E071F8BD2B4810B5C16944690A053B +:104C5000120DD308006ADB00E3180405240DA242FC +:104C600005D1012212031140104081420ED1586833 +:104C700021490068000C884208D020490868401C7F +:104C800008600020E7F7F6FB002010BD012010BDF2 +:104C9000F8B50D0007001A4800260E80006B154974 +:104CA000000C1431C860FFF7CEFF002820D003208D +:104CB0006946F9F27CFD04001AD040222100380038 +:104CC000F8F274EC38002660FFF786FF6B4619880F +:104CD000E1802661022120002173390040304031FB +:104CE0000600F8F2B6ED3088001D28802000F8BDDF +:104CF0000020F8BD1C470004EFBE0000D02001C01A +:104D0000C0A300800A49002009680029936E045B53 :104D100001000000BC41020000040000D879C96A0B -:104D200000260E80006B1549000C1431C860FFF797 -:104D3000CEFF002820D003206946F9F242FD04008E -:104D40001AD0402221003800F8F23AEC38002660F0 -:104D5000FFF786FF6B461988E1802661022120005B -:104D600021733900403040310600F8F27CED308884 -:104D7000001D28802000F8BD0020F8BDFC4600047E -:104D8000EFBE0000201D01C0C0A300800A49002022 -:104D90000968002904D009490978002900D00120B8 -:104DA0007047054900200968002904D00349497863 -:104DB000002900D00120704730F000C06C3901C0DC -:104DC000FEB50500002007000190012000900C00B6 -:104DD000280000F0B7FEA079C0077DD1002D09D0D2 -:104DE000E868C00478D42800E2F7C1F900285FD051 -:104DF00002205EE0A0780107890F2CD10009042869 -:104E000029D1022000F0AEFE0600BB2080000DE09C -:104E1000BB20800031180622A01DFDF7D3FA002820 -:104E20005AD002213000E7F7EFFD0600002EEFD147 -:104E3000032000F097FE0CE0BB2080003118062212 -:104E4000A01DFDF7BFFA002846D003213000E7F788 -:104E5000DBFD0600F0D12000E2F765F900280190A3 -:104E600015D00198E9F76FFB050003D1032000F08E -:104E700079FE0500287A002801D0062807D1A078FD -:104E80000007800F022802D1E078800715D5002D99 -:104E900013D0287A022804D12800E2F77FF90028ED -:104EA0000BD0287A032805D1687A002805D001E0C4 -:104EB00001200090207BC00702D001272FE00BE0EB -:104EC000A0780107890F09D100090D2806D1E078E3 -:104ED000C10703D1800701D40020FEBD287A21003C -:104EE000E2F7ECF80099884219D901270726032830 -:104EF00000D00626687A0C34022805D13200210041 -:104F0000280003F016EA0AE0019803F0BAEA002844 -:104F100005D1320021002800002303F052EA3800B6 -:104F2000FEBD70B5040000F00DFE0500200000F08D -:104F300030FEC66801004C30007D0C3101280AD9D2 -:104F40000A7D0720C001012A02D12818006A08E062 -:104F50002818C06905E0012804D19F20005D4000A9 -:104F6000401C0860A020015B0848F9F27AE8B042D2 -:104F70000BD32000E2F7CFFC002806D0FF207930C9 -:104F8000015B0022200003F030E970BD88130000AF -:104F9000F7B584B00D00FDF7F1FC0290049801898B -:104FA0000E183000F46D143006990390002008604C -:104FB000287A03286BD1687A022801D003287DD192 -:104FC0002800F9F7FFFA002861D1A0790127C0076E -:104FD0000CD1687A022809D1A0780107890F0DD178 -:104FE00000090C2806D12800E2F7C5FCA0780007CC -:104FF000800F03D1A0780009052820D004987F49AC -:10500000006988420FD004992800E2F7EBFE0028DF -:10501000019014D004980021FDF7A0FC01980490A1 -:1050200001890E18F46D0498E2F7CBFF002806D131 -:10503000049900222800E3F793F800284CD0069941 -:10504000012000900860687A022809D1A078000742 -:10505000800F05D1320021002800EDF712F90090F1 -:105060006036307A2A000021FFF723FC00980028E0 -:1050700003D004980021FDF771FC00F0CCF8002863 -:105080002AD0022000F0AEFDE3F7B0FA24E0687AFF -:10509000022813D12800E2F7FDFB0100A079C00728 -:1050A00020D0280000F04EFDCB2189004018006878 -:1050B000002803D0E078C00925E0FFE7287A002720 -:1050C000032809D16820805D001F042804D3039AB7 -:1050D00031002800F9F78FFA0298FDF753FC3800E9 -:1050E00007B0F0BDA0780207920F02D10009052891 -:1050F000E4D0087D0128E1D12800FF300622A11D5F -:105100007230FDF75FF90028D8D15EE710B5E2F7FD -:10511000C1FB00216030017341738173416C6E9457 +:104D200004D009490978002900D0012070470549BD +:104D300000200968002904D003494978002900D0DF +:104D400001207047A0F200C0543901C0FEB5050033 +:104D5000002007000190012000900C00280000F0C6 +:104D6000E9FEA079C0077DD1002D09D0E868C00414 +:104D700078D42800E2F7BEF800285FD002205EE079 +:104D8000A0780107890F2CD10009042829D102201D +:104D900000F0E0FE06005920C0000DE05920C000E0 +:104DA00031180622A01DFDF7E9F900285AD002218A +:104DB0003000E7F7D5FC0600002EEFD1032000F00D +:104DC000C9FE0CE05920C00031180622A01DFDF7D5 +:104DD000D5F9002846D003213000E7F7C1FC0600D2 +:104DE000F0D12000E2F762F80028019015D0019878 +:104DF000E9F74AFA050003D1032000F0ABFE0500F5 +:104E0000287A002801D0062807D1A0780007800F53 +:104E1000022802D1E078800715D5002D13D0287A1A +:104E2000022804D12800E2F77CF800280BD0287A69 +:104E3000032805D1687A002805D001E00120009000 +:104E4000207BC00702D001272FE00BE0A0780107EC +:104E5000890F09D100090D2806D1E078C10703D1D7 +:104E6000800701D40020FEBD287A2100E1F7E9FF88 +:104E70000099884219D901270726032800D0062661 +:104E8000687A0C34022805D132002100280003F092 +:104E90008EEA0AE0019803F036EB002805D13200D3 +:104EA00021002800002303F0CAEA3800FEBD70B5D7 +:104EB000050000F03FFE0400280000F062FE010043 +:104EC000C6684C30027D0B2080010C312818012A65 +:104ED0000AD90B7D0722D201012B02D1A218126A36 +:104EE00009E0A218D26906E0012A05D142694032E0 +:104EF000927B5200521C0A60406940308189094807 +:104F0000F9F2AEE8B0420BD32800E2F7CAFB002862 +:104F100006D0FF205130415B0022280003F09EE9BB +:104F200070BD000088130000F7B584B00D00FDF7D8 +:104F300001FC0290049801890E183000F46D1430C1 +:104F40000699039000200860287A03286BD1687ABC +:104F5000022801D003287DD12800F9F789F900281B +:104F600061D1A0790127C0070CD1687A022809D144 +:104F7000A0780107890F0DD100090C2806D128005F +:104F8000E2F7C3FBA0780007800F03D1A0780009E7 +:104F9000052820D004987F49006988420FD00499E1 +:104FA0002800E2F7E8FD0028019014D004980021C1 +:104FB000FDF7B0FB0198049001890E18F46D049878 +:104FC000E2F7CCFE002806D1049900222800E2F77F +:104FD00093FF00284CD00699012000900860687A61 +:104FE000022809D1A0780007800F05D132002100E6 +:104FF0002800EDF770F800906036307A2A00002122 +:10500000FFF71DFC0098002803D004980021FDF74D +:1050100081FB00F0CCF800282AD0022000F0DAFD55 +:10502000E3F78DF924E0687A022813D12800E2F72B +:10503000F7FA0100A079C00720D0280000F07AFD1F +:10504000CB21890040180068002803D0E078C0090F +:1050500025E0FFE7287A0027032809D16820805D32 +:10506000001F042804D3039A31002800F9F724F91B +:105070000298FDF763FB380007B0F0BDA078020787 +:10508000920F02D100090528E4D0087D0128E1D162 +:105090002800FF300622A11D4A30FDF76FF80028D6 +:1050A000D8D15EE710B5E2F7BBFA0021603001739A +:1050B0004173817310BDF8B50D0006001700FDF7B0 +:1050C00039FB0400002E24D03000E2F7A9FA692150 +:1050D000495D312916D032291BD16030017B01296D +:1050E00017D1417B002904D0491E0906090E4173DE +:1050F0000FD1012F0AD128784107490F3000E2F77C +:105100008FFD06E03000FFF7CDFF02E000210173C4 +:1051100081732000FDF712FBF8BDF3B5A35A3C0ED6 :1051200001000000B8450200000400008BA31A062D -:1051300010BDF8B50D0006001700FDF729FC0400AE -:10514000002E24D03000E2F7AFFB6921495D312900 -:1051500016D032291BD16030017B012917D1417B48 -:10516000002904D0491E0906090E41730FD1012FF1 -:105170000AD128784107490F3000E2F78EFE06E099 -:105180003000FFF7CDFF02E00021017381732000A2 -:10519000FDF702FCF8BDF3B581B00D000198E2F710 -:1051A00083FB04003820405D4607760F3000F9F29B -:1051B0001FFC01000198002829D001980B229201C0 -:1051C0008018806A002822D0200060300700007B11 -:1051D00001281CD0206FE2F7AFFF002817D0207DF8 -:1051E000012814D128004030F8F236EBC178C90606 -:1051F0000DD580780107890F022908D10009000721 -:1052000005D50120387301983100E2F746FEFEBD56 -:105210002C0000041A4800687047194800680028EC -:1052200001D1012070470020704710B5E6F77AF8E9 -:10523000002805D0FFF7F1FF002801D0012010BDA4 -:10524000002010BD10B5E6F777F8002805D0FFF76D -:10525000E4FF002801D0012010BD002010BD10B5D2 -:105260000400FFF79DFD002805D1052C05D102F0B3 -:10527000EAEF002801D0002010BDE6F7D9FA10BDF2 -:1052800088F100C0154810B50068002816D11448F0 -:10529000002200684621E6F282FE00280ED1114964 -:1052A0000A78002A02D00870162005E00E490A7814 -:1052B000002A03D008701B20E6F70FF910BD10B5C7 -:1052C0000A4CA088002807D0FFF76AFD002803D009 -:1052D000E0F7ACFF0020A08010BD000048F100C046 -:1052E00080EF00C0E8F000C0E9F000C0ACF100C001 -:1052F0003649374A800009581258914201D201209C -:105300007047334A121F1268002A06D0304A103202 -:105310001058884201D9022070470020704770B5AC -:105320002C4A0169914201D0002070BD2749C07B01 -:1053300010310C5CFDF72CFBA100244B244C5A5877 -:105340006458A24204D9224D2D1F2C68641C2C6085 -:10535000521E5A50FDF720FBE6E7FFB581B000244E -:1053600006001F001B48864206D0039A02993000AF -:10537000F8F2B8FE05B0F0BDFDF70AFB009038006A -:10538000FFF7B6FF05001CD0039A02993000F8F22F -:10539000A9FE040015D00D49E07B10310F54B80070 -:1053A00010390A58521C0A50607B0121084360736F -:1053B0000948022DA06104D10549091F0868401E53 -:1053C00008600098FDF7E8FA2000D3E76450000475 -:1053D000840100042C000004A7470200F0B591B03E -:1053E0000027EAF7BDFFFF4D2C69FE4E40363068BE -:1053F000002814DA1420EAF7A1FDFB48C06B00284E -:105400000BD0FA498868401C88604020DCF762FDB8 -:10541000706840004008706001E0F5483060F54970 -:1054200020000840F4490978F04E0843716A0843A7 -:105430007062FFF7F2FE002817D0706A002814D1BE -:10544000EE48002200681B21E6F2A9FD716A0843BC -:105450007062706A002808D1E848002200680821BC -:10546000E6F29DFD716A08437062EDF22BFBE001EC -:1054700001D5E348286120060CD5E2490868401CA4 -:105480000860E6F7D5F9002802D00420DCF722FDF9 -:10549000E5F742FAA00301D5DB482861002C05DAC4 -:1054A00001200003DCF716FDD1482861200502D554 -:1054B000D64801272861D648610110907ED500208A -:1054C0000390029007AA08A90CA806ABE0F73EFBE0 -:1054D000002804900DD00220074300068443C043F7 -:1054E000286108980C3000F0B0FB0028029000D131 -:1054F0000490E5F721FF002806D0C6490020C861C6 -:10550000C449202040310860049800287ED00298C9 -:1055100002F084EE00287AD00298007A012826D181 -:105520000899002949D002981231E8F7A3FDA03864 +:1051300081B00D000198E2F77DFA04003820405D4F +:105140004607760F3000F9F253FC01000198002861 +:1051500029D001980B22920180184068002822D0A3 +:10516000200060300700007B01281CD0206FE2F790 +:10517000AFFE002817D0207D012814D12800403030 +:10518000F8F26AEBC178C9060DD580780107890F5E +:10519000022908D10009000705D5012038730198BC +:1051A0003100E2F747FDFEBD640400041A480068C0 +:1051B000704719480068002801D10120704700207D +:1051C000704710B5E5F764FF002805D0FFF7F1FF41 +:1051D000002801D0012010BD002010BD10B5E5F75A +:1051E00061FF002805D0FFF7E4FF002801D001206F +:1051F00010BD002010BD10B50400FFF797FD00287A +:1052000005D1052C05D103F058E8002801D0002075 +:1052100010BDE6F7C3F910BDE0F300C0154810B5A6 +:105220000068002816D11448002200684621E6F2E2 +:10523000B6FE00280ED111490A78002A02D0087063 +:10524000162005E00E490A78002A03D008701B20BA +:10525000E5F7F9FF10BD10B50A4CA088002807D06B +:10526000FFF764FD002803D0E1F7C0F80020A0801C +:1052700010BD0000A0F300C0F0F100C040F300C07A +:1052800041F300C004F400C03649374A8000095891 +:105290001258914201D201207047334A121F1268FE +:1052A000002A06D0304A10321058884201D9022014 +:1052B00070470020704770B52C4A0169914201D0B7 +:1052C000002070BD2749C07B10310C5CFDF73CFA13 +:1052D000A100244B244C5A586458A24204D9224DB0 +:1052E0002D1F2C68641C2C60521E5A50FDF730FA9A +:1052F000E6E7FFB581B0002406001F001B48864288 +:1053000006D0039A02993000F8F2ECFE05B0F0BD29 +:10531000FDF71AFA00903800FFF7B6FF05001CD021 +:10532000039A02993000F8F2DDFE040015D00D4911 +:10533000E07B10310F54B80010390A58521C0A5043 +:10534000607B0121084360730948022DA06104D1EC +:105350000549091F0868401E08600098FDF7F8F924 +:105360002000D3E770500004B0050004640400047A +:105370003F470200F0B591B00027EAF71AFFFF4D52 +:105380002C69FE4E4036306800280CDAFC49C868AB +:10539000401CC8604020DCF707FE706840004008F1 +:1053A0007060F8483060F84920000840F7490978F3 +:1053B000F34E0843316B08433063FFF7FAFE0028D1 +:1053C00017D0306B002814D1F148002200681B214F +:1053D000E6F2E5FD316B08433063306B002808D1FD +:1053E000EB48002200680821E6F2D9FD316B084342 +:1053F0003063EDF267FBE00101D5E6482861200645 +:105400000CD5E5480168491C0160E6F7C7F800289B +:1054100002D00420DCF7C8FDE5F734F9A00301D57C +:10542000DE482861002C0EDA7069401C7061EFF7CD +:10543000FCFA002801D0042001E001200003DCF781 +:10544000B3FDD048286120050DD53069401C30617E +:10545000EFF7EBFA002803D00420DCF7A5FD00E00D +:105460000127CF482861CF48610110907ED5EFF722 +:10547000DCFA002808D00420DCF796FDCA48286131 +:10548000C04384436001F1D500200390029007AA35 +:1054900008A90CA806ABE0F735FC002804900DD055 +:1054A0000220074300068443C043286108980C305B +:1054B00000F0CAFB0028029000D10490E5F7F2FD4D +:1054C000002806D0B9490020C861B84820214030E2 +:1054D0000160049800287ED0029802F0DAEE0028DD +:1054E0007AD00298007A012825D1089900294AD05B +:1054F00002981231E8F784FB002844D0109900206C +:10550000F8F2BAE9AA48806B706B00283BD1A94831 +:105510000068401C37D001210298890202F0E0EEB9 +:105520000120706302980B2189014018D5C1BFFE8C :1055300001000000B4490200000400007FCC6FB2FB -:10554000D2FC002843D010990020F8F2A0E9AB4823 -:10555000C038806BB06A002839D1B4480068401C5C -:1055600035D001210298890202F08AEE0120B06252 -:1055700002990B2080010818806B0421E1F7E2F901 -:1055800025E00020F4F709FD0390E5F7D5FE00289B -:105590001BD00298E2F7B6FE0190EDF2F1F8019A05 -:1055A000FF32521C0F92D161906107990F9A4B689C -:1055B000086853626B4610621A8B0C310C3A052056 -:1055C000F5F2F3FF0F9A8078906202F072EF00E03C -:1055D000C7E0E5F762F80006000E05900C98C17E62 -:1055E0000B91C17A0A91C1790991FFF74DFB0C9992 -:1055F0000298F3F7A3FE0C980B99C1760A99C17231 -:105600000999C171E5F79DFE002875D0FFF70FFEDF -:10561000002871D0039800286ED00598002801E07A -:105620009DE08CE068D1E5F787FE002864D1FFF7A4 -:10563000C1FB002803D1E5F78EFE00285CD0F0699D -:10564000012807D07A480088002852D0794800887D -:1056500000284ED06B461A8B07990C3A0C31052066 -:10566000F5F2A3FF01000298F5F798FE0190724849 -:105670000068002806D0F8F2FAE8022108430199F0 -:10568000084234D16248002200681B21E6F291FCF6 -:1056900000282CD1029802F004EE002827D1674898 -:1056A000F8F2E4E80199084221D162480088002814 -:1056B0001DD063490198084219D16B461A8B07998E -:1056C000029802F0FAEE002811D002208743F4F786 -:1056D0008EFC0520EFF2D2F80004000C0521EDF25B -:1056E000DBFA0298012102F0CCED02E004E0012097 -:1056F0003062002070620CE0F069012807D04C484D -:105700000088002805D04B480088002801D00120DF -:1057100030620298DDF7F1FE002814D005980028C9 -:1057200011D0FFF784FD00280AD0E4F7A6F900287D -:1057300006D1E4F78CF9002802D10120306202E0A2 -:105740000820DCF7D1FB306A012808D10020F06185 -:1057500038490880022087430320E5F7C8FE39480E -:105760002861200170D500200B902868800705D59E -:1057700000210120E7F7B2F90C900BE02868C00780 -:105780007ED03078E8F718FF0C90E1F71BFD002879 -:10579000F6D00C98002873D00C988030806B0028CD -:1057A00073D0406820300B900C98F0F7A3FFECF218 -:1057B000E7FF0C9A0B239B01D218926B5162106287 -:1057C0000B98002861D00B98807AC0075DD00C98A8 -:1057D000407A022859D10C98E1F7F4FC012854D101 -:1057E0000C9800F0C3F98F2189000A9040180990A5 -:1057F00020300079002828E000A50080C0A80080A3 -:1058000008F200C0FFFFFF7F80880000280000042E -:1058100080EF00C0FFFFFFFEF8F000C0FFFFFDFFBC -:10582000FFF7FFFF925C000400A6008004F200C0B6 -:10583000C43B01C0C0F100C030F000C040F000C067 -:105840000B800000FFFFFFFB8AE01ED0099A0C9836 -:1058500025320E9209992D31F3F268FB0A98406CBB -:10586000002812D009990E9A0C982E3102F028EED9 -:105870000A98132149014018807B800705D501E073 -:1058800032E002E00C9802F020EE0B98807A80075C -:105890002AD5AA48806B0D900C9802F036ED0028AE -:1058A00022D0A7480068401C1ED01098F7F2DEEF07 -:1058B0000D9940181099F7F2EAEF0C99A031098878 -:1058C0004843A04988420FD3B06A00280CD01099F1 -:1058D0000020F7F2DCEF01210C98490202F0D0EC35 -:1058E0000020B06202F0F4EDFFF7A9FC002835D0EB -:1058F000022000F08BF90A90E2F704FD09900A9863 -:1059000000F034F908900A98E2F7FEFC07900720AF -:10591000E5F7EDFD8C480169026A079800880228C6 -:105920001CD1002901D0012A18D10998C030007E6D -:10593000002813D107984068C00707D082D6F3D853 +:1055400040690421E1F77EF927E00020F4F7F5FB3C +:105550000390E5F7A7FD00281DD00298E2F79EFD15 +:105560000190EDF20DF9019AFF32521C0F92D161B8 +:10557000906107990F9A4B6808685362106200E0C7 +:10558000D3E06B461A8B0C310C3A0520F6F20DF87D +:105590000F9A8078906202F0CEEFE4F734FF0006B5 +:1055A000000E05900C98C17E0B91C17A0A91C179C9 +:1055B0000991FFF72FFB0C990298F3F78FFD0C98D8 +:1055C0000B99C1760A99C1720999C171E5F76FFD0E +:1055D000002875D0FFF7F7FD002871D00398002848 +:1055E0006ED0059800286BD101E09CE08BE0E5F7D8 +:1055F00059FD002864D1FFF7A3FB002803D1E5F78C +:1056000060FD00285CD0B06A012807D06F48008890 +:10561000002852D06E48008800284ED06B461A8B66 +:1056200007990C3A0C310520F5F2BFFF01000298F2 +:10563000F5F746FD019067480068002806D0F8F2AB +:1056400016E9022108430199084234D15548002245 +:1056500000681B21E6F2ADFC00282CD1029802F074 +:105660005AEE002827D15C48F8F200E90199084277 +:1056700021D15748008800281DD058490198084278 +:1056800019D16B461A8B0799029802F058EF00283F +:1056900011D002208743F4F77AFB0520EFF2EEF8F1 +:1056A0000004000C0521EDF2F7FA0298012102F046 +:1056B00022EE02E004E00120F062002030630CE002 +:1056C000B06A012807D041480088002805D040482A +:1056D0000088002801D00120F0620298DEF711F85E +:1056E000002814D00598002811D0FFF76CFD002881 +:1056F0000AD0E4F778F8002806D1E4F75EF800282D +:1057000002D10120F06202E00820DCF757FCF06AC9 +:10571000012808D10020B0622D490880022087436B +:105720000320E5F79AFD2548286120017ED5002059 +:105730000B902868800705D500210120E7F77AF84B +:105740000C900BE02868C00771D03078E8F7D5FDE1 +:105750000C90E1F7FAFB0028F6D00C980028F3D063 +:105760000C988030C068002872D0406820300B90C0 +:105770000C98F0F70AFEEDF203F80C9A0B239B014C +:10578000D2185269516210620B98002860D027E04D +:1057900000A5008060F400C0FFFFFF7F808800004C +:1057A00060040004F0F100C0FFFFFFFE50F300C0F2 +:1057B000FFFFFDFFFFF7FFFF965C0004FFFFFFFB0D +:1057C00000A6008000A800805CF400C05C3A01C024 +:1057D00018F400C0A0F200C0240400040B800000F4 +:1057E0000B98807AC00733D00C98407A02282FD1CA +:1057F0000C98E1F7AAFB01282AD10C9800F0AEF929 +:105800008F2189000A9040180990203000790028E3 +:105810001ED0099A0C9825320E9209992D31F3F277 +:1058200085FB0A98406C002812D001E07FE042E03E +:1058300009990E9A0C982E3102F084EE0A981321E1 +:1058400049014018807B800702D50C9802F07EEE5B +:105850000B98807A80072ED5B448806B0D900C98F9 +:1058600002F090ED002826D0B1480068401C22D0FC +:105870001098F7F2FCEF0D9940181099F8F206E82D +:105880000C990B2292018918496940318989484352 +:10589000A84988420FD3706B00280CD010990020C3 +:1058A000F7F2F4EF01210C98490202F024ED0020F8 +:1058B000706302F050EEFFF78EFC002835D0022016 +:1058C00000F09CF90A90E2F7E9FB09900A9800F0D1 +:1058D00045F908900A98E2F7E3FB07900720E5F7FF +:1058E000BCFC95480169026A0798008802281CD10F +:1058F000002901D0012A18D10998C030007E002863 +:1059000013D107984068C00707D00898092189017A +:105910004018C069002808D104E0FF20DDF750F8E6 +:10592000002802D01320E5F798FC84482861A001E4 +:1059300001D583482861002F05D082480AB5CF3FA2 :1059400001000000B04D0200000400002C16BCDE77 -:105950000898092189014018C069002808D104E08D -:10596000FF20DCF733FF002802D01320E5F7C9FD44 -:105970007B482861A00101D57A482861002F05D015 -:105980007948072200683900FDF7ECFDE00074D586 -:105990002868C0076FD07548806A0006000E307016 -:1059A000E8F714FE07004CD0FFF753FC002810D096 -:1059B0003800E2F7B3FC6D49496B3278012393401C -:1059C000194201D0002100E0012181700620E5F795 -:1059D00098FD3800A030C17B491C0906090EC1732F -:1059E000827B91427ED10021C1730B2189017918FC -:1059F000896BC97B0029F5D15C49496B827D012304 -:105A00009340FF22521C1343584A19435163797A39 -:105A1000022916D15149807D403188604F48016983 -:105A2000006A012901D001280BD1387A022804D05C -:105A30003800F8F7E5FD002803D001213800E2F72F -:105A4000BCF8387A032816D13800E7F7AAFA0C9088 -:105A5000806880050FD50C98F7F7D8FA002803D096 -:105A600008213800F7F779FA0C980121806849027B -:105A700088430C9988603E482861E00201D53D4882 -:105A80002861E00702D00120C0432861A0070DD59E -:105A90007068401C70601020DCF730FA0220C043B0 -:105AA00028610120C0038443C0432861200405D538 -:105AB0003148072200680121FDF754FD600705D534 -:105AC000F068401CF0600420C0432861200705D521 -:105AD0003069401C30610820C0432861E00607D5CA -:105AE000706900E018E0401C70611020C04328611C -:105AF000A00605D5B069401CB0612020C0432861D4 -:105B0000F069002801D1EAF746FC1C4988684A0D73 -:105B10001043886011B0F0BD144A506B31780123F6 -:105B20008B409843D10D084350638AE770B5040059 -:105B30000D004020E9F743F9002807D10F49012063 -:105B40008002C86029002000FFF75CFC012070BDC6 -:105B500000A8008004F200C0581B000000A60080CE -:105B6000FFFFFFF7FFFFFFFD04F600C0C0A20080AB -:105B7000FFFFFFEFFFFFEFFF887C02000030008097 -:105B800001000020002906D003230A7A1B02C9184D -:105B9000022A01D188687047032AFCD1086970473E -:105BA00070B50500FCF708FF68494C6809E0072D4F -:105BB00002D0217AA94203D1FCF702FF200070BD78 -:105BC0006468002CF3D1FCF7FBFE002070BD0021BF -:105BD00000280AD0027A022A02D16121C90003E01A -:105BE000032A02D13121090141180800704770B51C -:105BF00005000E00FCF7E0FE54494C680AE0A17A6B -:105C0000A94206D1E17AB14203D1FCF7D9FE2000C6 -:105C100070BD6468002CF2D1FCF7D2FE002070BD8C -:105C20004A49022801D1C86870478868704710B592 -:105C30000400ECF238FE032109026118886110BDEE -:105C400070B5FCF7B9FE0500404844680AE0200042 -:105C5000E8F75EF9002804D02800FCF7B1FE200028 -:105C600070BD6468002CF2D12800FCF7A9FE00206A -:105C700070BD70B50600F5F7BDFD002801D000200D -:105C800070BDFCF799FE0500304844680EE0200026 -:105C9000FF30062231007230FCF7B2FB002804D13D -:105CA0002800FCF78DFE200070BD6468002CEED14A -:105CB0002800FCF785FEE2E7F8B505000F000800B4 -:105CC000F5F798FD002801D00020F8BDFCF774FE20 -:105CD00006001E48446810E0207AA8420CD120003B -:105CE00006223900A230FCF78BFB002804D13000DB -:105CF000FCF766FE2000F8BD6468002CECD1300093 -:105D0000FCF75EFEE0E770B5FCF756FE05000F48B5 -:105D1000446800E06468002C09D0200002F0E6EB43 -:105D20000128F7D12800FCF74BFE012070BD2800A8 -:105D3000FCF746FE002070BD0978C90701D000209D -:105D40007047C0680005C00F7047000060FE215416 +:10595000072200683900FDF7ABFDE00078D5286824 +:10596000C00773D07D48806A0006000E3070E8F7EB +:10597000CEFC070050D0FFF738FC002810D03800CC +:10598000E2F798FB7549496B32780123934019423D +:1059900001D0002100E0012181700620E5F767FCBD +:1059A0000B2080013A1851694031C87D401C000627 +:1059B000000EC875516940318B7D98427ED1002020 +:1059C000C8755069C07B0028F8D16448416B380025 +:1059D0008030027A01239340FF22521C13435F4A16 +:1059E00019435163797A022916D15849007A403116 +:1059F000886056480169006A012901D001280BD14D +:105A0000387A022804D03800F8F750FC002803D078 +:105A100001213800E1F79AFF387A032816D13800BF +:105A2000E7F7B1F90C90806880050FD50C98F7F76F +:105A3000DAF8002803D008213800F7F778F80C9836 +:105A400001218068490288430C9988604448286194 +:105A5000E00201D543482861E00702D00120C0439D +:105A60002861A0070DD57068401C70601020DCF71D +:105A7000AFFA0220C04328610120C0038443C04321 +:105A80002861200405D53848072200680121FDF768 +:105A90000FFD600705D5B069401CB0610420C0430C +:105AA0002861200705D5F069401CF0610820C0433B +:105AB0002861E00607D5306A401C00E023E0306230 +:105AC0001020C0432861A00605D5706A401C706292 +:105AD0002020C0432861600609D5B068401CB06032 +:105AE00001204003DCF774FA4020C0432861B06A0B +:105AF000002801D1EAF779FB1C488168420D114367 +:105B0000816011B0F0BD154A506B317801238B4094 +:105B10009843D10D084350637EE770B504000D0033 +:105B20004020E8F7B6FF002807D110490120800285 +:105B3000C86029002000FFF731FC012070BD000083 +:105B400000A800805CF400C0581B000000A6008084 +:105B5000FFFFFFF7FFFFFFFD4CF800C0C0A2008071 +:105B6000FFFFFFEFFFFFEFFFE87C02000030008047 +:105B700001000020002906D00B230A7A9B01C918D6 +:105B8000022A01D1086A7047032AFCD1886A70474B +:105B900070B50500FCF7ECFD6B494C6809E0072D7A +:105BA00002D0217AA94203D1FCF7E6FD200070BDA6 +:105BB0006468002CF3D1FCF7DFFD002070BD0021EC +:105BC00000280AD0027A022A02D11721490103E0F3 +:105BD000032A02D15D21C90041180800704770B541 +:105BE00005000E00FCF7C4FD57494C680AE0A17A95 +:105BF000A94206D1E17AB14203D1FCF7BDFD2000F4 +:105C000070BD6468002CF2D1FCF7B6FD002070BDB9 +:105C10004D49022801D1C86870478868704710B59F +:105C20000400ECF240FE0B2189016118086310BDED +:105C300070B5FCF79DFD0500434844680AE020006C +:105C4000E7F7FDFF002804D02800FCF795FD2000B1 +:105C500070BD6468002CF2D12800FCF78DFD002097 +:105C600070BD10B5FFF7E4FF002800D0012010BD83 +:105C700070B50600F5F7D2FB002801D0002070BDFA +:105C8000FCF776FD0500304844680EE02000FF3048 +:105C9000062231004A30FCF78FFA002804D1280090 +:105CA000FCF76AFD200070BD6468002CEED128006E +:105CB000FCF762FDE2E7F8B505000F000800F5F714 +:105CC000ADFB002801D00020F8BDFCF751FD060017 +:105CD0001D48446810E0207AA8420CD1200006221A +:105CE00039007E30FCF768FA002804D13000FCF758 +:105CF00043FD2000F8BD6468002CECD13000FCF7B7 +:105D00003BFDE0E770B5FCF733FD05000E48446845 +:105D100000E06468002C09D0200002F02AEC012881 +:105D2000F7D12800FCF728FD012070BD2800FCF702 +:105D300023FD002070BD0978C90701D000207047FD +:105D4000C0680005C00F7047D0050004968422602B :105D500001000000AC5102000004000093D3996DD3 -:105D6000A4010004002805D00B2189014018C06B54 -:105D7000002801D1002070470078704703000A0016 -:105D800000B5FFF7EFFF002807D00B20800118189F -:105D9000C16B60205043AC30085C00BDF8B5040016 -:105DA0000F00954910004E6A1D00EEF765FA0421B8 -:105DB000615E002907D179008919098E8D4204D2CC -:105DC000491BA18003E0002901DA0020F8BDA18869 -:105DD000081AA0800120F8BDFFB5012081B00C0099 -:105DE0001F00009001980026FFF7BCFF25006035DA -:105DF000002803D00198007A012802D100202872DF -:105E00002CE0FF2A27D001990B20602380015A4300 -:105E100008181100C06BA931AB32415C865C764832 -:105E20004A00406A3032805A744A904201D0002FB2 -:105E300002D1A088002811D03B0032002000FFF7DB -:105E4000ADFF00280AD1A17801980122F0F767F987 -:105E5000002005B0F0BD00200090FAE72E720098F7 -:105E6000F7E7F3B589B00C0000260D682021E86D36 -:105E7000089014356846F7F268EC20006946F3F79D -:105E80002BFA00246F4617E00998FFF76BFF08997B -:105E900003000A88E96920000904090CECF28AFA77 -:105EA0008619E869210002040998120CEEF7A2F99C -:105EB0008619385D401E3855385D0028E4D1641CD1 -:105EC0002406240E1F2CF7D330000BB0F0BDF8B51C -:105ED0000400602309680878CD6D0E004007400F6C -:105EE0000B21890158436118C96BB230085C0F233C -:105EF00082009B01D21814368918DCF7A9FFFF3401 -:105F0000F16907008534A06AC0340904005D2A885D -:105F1000090C0123ECF24EFA7843F8BDF3B581B0D9 -:105F20000E000D68EC6DECF23FFC0198FFF71AFFD4 -:105F300000283ED001980B2189014018C16B3068C0 -:105F400060230078228B4007400F58431209401805 -:105F5000A030477A0282A07800092AD0082801D010 -:105F60000C2826D11420784344182079000720D526 -:105F7000A868800004D501983100FFF7A8FF03E06E -:105F800001983100FFF76DFF218AC002000C002943 -:105F90000FD0227D002A0CD1628A10180004000C58 -:105FA0008842608205D90120207501983900F8F7F0 -:105FB0006BFCFEBD03000A0000B5FFF7D3FE00280E -:105FC00007D00B2080011818C16B60205043AE3001 -:105FD000085A00BD03000A0000B5FFF7C3FE002801 -:105FE00009D00B208001181860235A43C16BAE32D0 -:105FF000885A431C8B5200BDE4580004FFFF000088 -:10600000FA4A10B5135C8200002B08D1CB0706D0EA -:10601000F64B3C339B58012B01D199430BD0002800 -:1060200002D1F24B0120D861F0480C30805820306A -:106030000174E8F785FF10BDEC4A0904090C0C3225 -:1060400070B500280ED1E94C6378002B0AD0106897 -:1060500000250171090A417103212800FFF7D0FFD3 -:10606000657007E08300D2581171090A517102214D -:10607000FFF7C6FF002070BDF3B581B00C0000250E -:10608000019800287ED1DA4F0026032C01D0832C02 -:1060900008D1D7486838F8F2ACF83860D548DAF754 -:1060A0000DFE15E0052C0AD1D048406C0506D048FD -:1060B0002D0E7C38F8F29DF8A900785008E0022CEB -:1060C00001D0822C04D1CA485438F8F292F83860D2 -:1060D000E043800701D0A00701D5386801E0A8009F -:1060E0003858C24F0189401841780278090211439B -:1060F0000C373B686A0008329B181970090A5970FE -:10610000BA493E000978283600291ED13968403145 -:106110000D72437801781B020B43396889181A0AFB -:106120000B704A7001223168AA4011433160F91F97 -:106130000A78012A09D9002D07D04B1F596C491C38 -:106140008A42596401D101215964396800254031DE -:10615000F7F2B0EBA5480078002805D104EA1D68E5 +:105D6000002805D00B21890140188069002801D145 +:105D7000002070470078704703000A0000B5FFF765 +:105D8000EFFF002807D00B208001181881696020E0 +:105D90005043AC30085C00BDF8B504000F009549D5 +:105DA00010004E6A1D00EEF7A7F80421615E00297D +:105DB00007D179008919098E8D4204D2491BA1802F +:105DC00003E0002901DA0020F8BDA188081AA080AC +:105DD0000120F8BDFFB5012081B00C001F0000902C +:105DE00001980026FFF7BCFF25006035002803D08E +:105DF0000198007A012802D1002028722CE0FF2AA5 +:105E000027D001990B20602380015A430818110004 +:105E10008069A931AB32415C865C76484A00406AB1 +:105E20003032805A744A904201D0002F02D1A088AB +:105E3000002811D03B0032002000FFF7ADFF002802 +:105E40000AD1A17801980122EFF7A5FF002005B043 +:105E5000F0BD00200090FAE72E720098F7E7F3B546 +:105E600089B00C0000260D682021E86D08901435DB +:105E70006846F7F26AEC20006946F3F7FEF8002462 +:105E80006F4617E00998FFF76BFF089903000A882F +:105E9000E96920000904090CECF28CFA8619E8691A +:105EA000210002040998120CEDF7E4FF8619385D11 +:105EB000401E3855385D0028E4D1641C2406240EA9 +:105EC0001F2CF7D330000BB0F0BDF8B504006023F1 +:105ED00009680878CD6D0E004007400F0B2189013D +:105EE000584361188969B230085C0F2382009B0116 +:105EF000D21814368918DDF7AFF8FF34F1690700BE +:105F00005D34A06AC0340904005D2A88090C0123AD +:105F1000ECF250FA7843F8BDF3B581B00E000D688D +:105F2000EC6DECF241FC0198FFF71AFF00283ED01F +:105F300001980B218901401881693068602300783D +:105F4000228B4007400F584312094018A030477A6F +:105F50000282A07800092AD0082801D00C2826D176 +:105F60001420784344182079000720D5A8688000C1 +:105F700004D501983100FFF7A8FF03E00198310034 +:105F8000FFF76DFF218AC002000C00290FD0227D8F +:105F9000002A0CD1628A10180004000C884260822A +:105FA00005D90120207501983900F8F7D1FAFEBD16 +:105FB00003000A0000B5FFF7D3FE002807D00B202E +:105FC00080011818816960205043AE30085A00BD26 +:105FD00003000A0000B5FFF7C3FE002809D00B201C +:105FE0008001181860235A438169AE32885A431CD5 +:105FF0008B5200BDF0580004FFFF0000FA4A10B5B4 +:10600000135C8200002B08D1CB0706D0F64B3C3343 +:106010009B58012B01D199430BD0002802D1F24BA0 +:106020000120D861F0480C30805820300174E8F726 +:106030000FFE10BDEC4A0904090C0C3270B50028A3 +:106040000ED1E94C6378002B0AD01068002501714D +:10605000090A417103212800FFF7D0FF657007E0AE +:106060008300D2581171090A51710221FFF7C6FF4E +:10607000002070BDF3B581B00C0000250198002808 +:106080007ED1DA4F0026032C01D0832C08D1D748CB +:106090006838F8F2AEF83860D548DAF70FFE15E048 +:1060A000052C0AD1D048406C0506D0482D0E7C380E +:1060B000F8F29FF8A900785008E0022C01D0822C59 +:1060C00004D1CA485438F8F294F83860E0438007A5 +:1060D00001D0A00701D5386801E0A8003858C24FA8 +:1060E0000189401841780278090211430C373B6856 +:1060F0006A0008329B181970090A5970BA493E00A3 +:106100000978283600291ED1396840310D7243784C +:1061100001781B020B43396889181A0A0B704A7000 +:1061200001223168AA4011433160F91F0A78012A1F +:1061300009D9002D07D04B1F596C491C8A4259645C +:1061400001D101215964396800254031F7F2B2EBE1 +:10615000A5480078002805D138684179C65E8DE5EC :1061600001000000A855020000040000C0094A0117 -:106170003868417902790802104315D1A34F832C66 -:1061800009D0822C07D00520FFF791F800280CD108 -:106190003068C00708D000E006E001980121FFF751 -:1061A00055FF306838403060FEBD31682800FFF789 -:1061B0004DFF3560FEBDF8B504000D0074D0E068F9 -:1061C000002871D18F4E022B74D020271C22E81991 -:1061D000A918032B0CD0052BF3D12F81C378877816 -:1061E0001B023B432BD12800FCF736FC0120F8BDF5 -:1061F0002A81C278837810021843001D0870000AB3 -:106200004870012088700020C870FCF7E9FB070087 -:10621000E06814237B495843683940182900F8F294 -:106220004AF87B48DAF754FDE0688101715800298B -:1062300003D03800FCF7D8FBD8E7032137E02A81E8 -:10624000C278837812021A4343790779180600143A -:1062500038431018001D0870000A4870002088702C -:10626000C870FCF7BDFB0700E0681423654958437C -:106270007C3940182900F8F21EF86149E068496C41 -:10628000800180198900405800280BD10520FFF7B4 -:106290000EF8002806D0E068594A81003032515883 -:1062A000002903D038004DE04EE003E00521FFF760 -:1062B000EDFEF7E72889471908300004000C288113 -:1062C000F97ABA7A09021143401903228270002236 -:1062D000C270083101700422090A00224170FCF7E3 -:1062E0007FFB0090787B397B000208434549543995 -:1062F0000A28E06806D11423584340182900F7F211 -:10630000FCFF05E01423584340182900F7F2D3FF9F -:10631000E06880013058002813D1787B397B000277 -:106320000843E5F708FB00280BD0E5F7F2FB00284F -:1063300007D1E0680021E8F7B8FFE0680221FFF725 -:10634000A5FE0098FCF750FB0020F8BD042008B51E -:1063500000903048142100686A46E5F248FE08BD06 -:1063600010B5FFF704F82C4810BDF8B5002426003E -:10637000234D244F343528682A002100543F283A01 -:1063800000284BD011684B7909791B020B4345D18A -:106390000520FEF78CFF002823D12868C00708D00D -:1063A00001213000FFF752FE184928680840286094 -:1063B00007E014486838F7F24FFF002803D0832124 -:1063C0000BE0012477E03800F7F246FF002872D096 -:1063D000E5F79FFB00286ED182213000FFF756FEC3 -:1063E000EFE729680020FFF731FEB10003E0421E0D -:1063F0001040641C685068580028F8D15BE0000029 -:10640000A07C0200B096020020200400FEFF0000E5 -:106410001010040080EF00C085570200F84DC0073F -:1064200024D110684179027908021043C0071DD1B8 -:10643000F4480068002803D0E86A401CE86215E0D0 -:10644000F0486838F7F208FF002801D0032109E07E -:106450003800F7F201FF002808D0E5F75AFB0028C2 -:1064600004D102213000FFF711FE01241421E54A76 -:10647000E44B7143B0017C3AC5188818B70000900E -:1064800004E005213000FFF701FE641C0098F7F2DC -:10649000E3FE00280FD0DA48406C8000285800281E -:1064A00009D10520FEF703FF002804D0D44830307E -:1064B000C0590028E5D02000F8BDF1B582B002989F -:1064C00000285FD1CE4800230C300068C179827962 -:1064D0000802CB49104350310A1D08601360CA4AB4 -:1064E00090424FD0511E88424CD0C5480299806CD2 -:1064F00089010504C3482D0C40380E180298840009 -:106500003CE0BF4A01205032A8401159019001439C -:106510001151BE4800220188BD481300FEF745FF17 -:106520000028F0512ED0AC2101812800B44D0C354B -:10653000295940314872F05901894018295944318C -:10654000F7F2C2E9280048300159019B01221943A2 -:106550000151295901988871000AC871F159082020 -:106560000873A749886C0B1D401C886419EC9A724B +:1061700002790802104315D1A34F832C09D0822C39 +:1061800007D00520FFF75FF800280CD13068C00762 +:1061900008D000E006E001980121FFF755FF3068C4 +:1061A00038403060FEBD31682800FFF74DFF356094 +:1061B000FEBDF8B504000D0074D0E068002871D170 +:1061C0008F4E022B74D020271C22E819A918032B0C +:1061D0000CD0052BF3D12F81C37887781B023B436A +:1061E0002BD12800FCF714FB0120F8BD2A81C278CE +:1061F000837810021843001D0870000A48700120BF +:1062000088700020C870FCF7C7FA0700E068142304 +:106210007B495843683940182900F8F24CF87B480C +:10622000DAF756FDE06881017158002903D0380083 +:10623000FCF7B6FAD8E7032137E02A81C2788378E1 +:1062400012021A43437907791806001438431018CC +:10625000001D0870000A487000208870C870FCF7A4 +:106260009BFA0700E0681423654958437C394018BD +:106270002900F8F220F86149E068496C8001801932 +:106280008900405800280BD10520FEF7DCFF0028CC +:1062900006D0E068594A810030325158002903D0B5 +:1062A00038004DE04EE003E00521FFF7EDFEF7E793 +:1062B0002889471908300004000C2881F97ABA7A35 +:1062C000090211434019032282700022C270083172 +:1062D00001700422090A00224170FCF75DFA009067 +:1062E000787B397B00020843454954390A28E06825 +:1062F00006D11423584340182900F7F2FEFF05E0A9 +:106300001423584340182900F7F2D5FFE0688001B4 +:106310003058002813D1787B397B00020843E5F719 +:10632000C0F900280BD0E5F7AAFA002807D1E068E9 +:106330000021E8F742FEE0680221FFF7A5FE009881 +:10634000FCF72EFA0020F8BD042008B50090304874 +:10635000142100686A46E5F24AFE08BD10B5FEF752 +:10636000D2FF2C4810BDF8B500242600234D244F41 +:10637000343528682A002100543F283A00284BD0A1 +:1063800011684B7909791B020B4345D10520FEF7B3 +:106390005AFF002823D12868C00708D00121300007 +:1063A000FFF752FE184928680840286007E01448A3 +:1063B0006838F7F251FF002803D083210BE0012455 +:1063C00077E03800F7F248FF002872D0E5F757FA77 +:1063D00000286ED182213000FFF756FEEFE72968D2 +:1063E0000020FFF731FEB10003E0421E1040641CA4 +:1063F000685068580028F8D15BE00000007D02007A +:106400005095020020200400FEFF00001010040040 +:10641000F0F100C081570200F84DC00724D1106888 +:106420004179027908021043C0071DD1F448006881 +:10643000002803D0E86A401CE86215E0F04868389C +:10644000F7F20AFF002801D0032109E03800F7F233 +:1064500003FF002808D0E5F712FA002804D1022132 +:106460003000FFF711FE01241421E54AE44B71438B +:10647000B0017C3AC5188818B700009004E00521E7 +:106480003000FFF701FE641C0098F7F2E5FE0028DB +:106490000FD0DA48406C80002858002809D1052028 +:1064A000FEF7D1FE002804D0D4483030C05900286F +:1064B000E5D02000F8BDF1B582B0029800285FD188 +:1064C000CE4800230C300068C17982790802CB499C +:1064D000104350310A1D08601360CA4A90424FD0E1 +:1064E000511E88424CD0C5480299806C8901050430 +:1064F000C3482D0C40380E18029884003CE0BF4A77 +:1065000001205032A8401159019001431151BE4859 +:1065100000220188BD481300FEF713FF0028F05148 +:106520002ED0AC2101812800B44D0C3529594031C1 +:106530004872F0590189401829594431F7F2C4E9E9 +:10654000280048300159019B012219430151295962 +:1065500001988871000AC871F15908200873A74989 +:10656000886C0B1D401C8864029D5B5D3591081B87 :1065700001000000A45902000004000034663FB589 -:10658000029D5B5D834200D18A64886C05042D0CFA -:10659000AF00F0590028BED0FEBDF8B504001700CA -:1065A0009C4D00261D2973D012DC9A4808395C30B6 -:1065B00002880B00F7F25CEA15F6F55A5A5AF4F421 -:1065C0005A5A5A5AF3A6F25AF1F0EF5AEEED5A001F -:1065D00049297ED013DC42297CD009DC1E297AD0DF -:1065E000202979D0412941D18B4F0125403FD9E164 -:1065F000452972D0462971D04829F4D1EEE16629A7 -:106600006DD00EDC4A296BD04C296AD06229EAD1C0 -:10661000E0680028E7D1FCF7EDF97F4F00907C3F60 -:1066200027E068290FD06929DDD1E0680028DAD198 -:10663000FCF7E0F90400FFF7A2FE05002000FCF7DC -:10664000DDF92800F8BDE0680028CCD13803000F40 -:1066500008280BD239040A0E6B693906090E1B5C37 -:10666000002A01D0934319436A691154F6E1FCF7FB -:10667000FDF9E06814235843C019F7F2CEFD002855 -:10668000F5D133E0696C491E696402D0696C05E09C -:10669000CAE06049491D095C491E696401273B0045 -:1066A0008B401A420FD05C4A800180188900405804 -:1066B000002808D0FCF7DAF9E06857498001401853 -:1066C000696C89004650E068524A800034321158A3 -:1066D00008E0ACE14CE1B7E044E1F6E06FE168E1ED -:1066E000AAE1AEE16B6C9F40B9431150E068494BA1 -:1066F000810034335A581104490CC3D10098FCF777 -:106700007DF9ABE1FCF776F900904249E068095C5D -:10671000002948D13F4A81000C325258D3799279EE -:106720001F0217433B4A583251580F401100543949 -:10673000095C01290AD900F035FB002806D038048D -:10674000400C03D00098FCF759F945E1E06800F0EF -:1067500029FB002802D1E068E8F78FFC3804400CE0 -:10676000CCD1E068FFF7B3FEE0682A4A81005432DA -:10677000505803045B0CE5D06B78002BBED1002889 -:10678000BCD01300183B5850E06880001650E068F9 -:1067900018E024E0D1E094E087E05AE016E0A8E0B9 -:1067A000ABE09CE0D2E01C4E8101403E71580029D4 -:1067B000A4D1FFF78CFEE06881018919C2D0697805 -:1067C00001439BD10121FFF72FFC97E7E06881008F -:1067D00010480C304058022180780840F8BDFCF782 -:1067E00009F9F979BB790A020A491A4362318A71B7 -:1067F000120ACA717A783B7812021A430A70120A96 -:106800004A70FA78BB7812021A438A70120ACA7068 -:1068100075E70000A07C0200B0960200FFFF0000B8 -:10682000CEF100C02C000004FF4948780A7800022D -:1068300010433870000A7870C878897800020843DD -:10684000B870000AF87009E1E0680121E8F737FD47 -:1068500004E1F64B0F2A01D99A4276D1F978BA7839 -:10686000090211430400018078793A79000210434B -:106870006080F879BA79000210439942A080E2D092 -:106880000806000EEEF710FE61882088E4F261FE33 -:10689000E74BD96A2088012282401143D962000661 -:1068A000000E0121E4F20EFED8E0110ABA70F97070 -:1068B00041883971090A79718088B871000AF871C4 -:1068C000CCE0E0680028BED110E0E068D64A0121A3 -:1068D0008000563A1058203001746E70BEE0E068B7 -:1068E0000028B0D1D34909780129ACD1E8F7A1FC3F -:1068F000B4E0E068E8F720FDB0E0E06800280AD1E5 -:10690000E878002807D0C849CB4852390968087090 -:10691000000A4870EE70E068C34A8100563A525847 -:10692000D37994791A02C04B22430A3B59580A4240 -:1069300089D00121FFF778FB90E0E068002887D13B -:10694000BE480221E2F2A8FDF8BD45E0E06800285B -:10695000AAD1BB480421E2F29FFD00283CD1B848EF -:10696000022135E0E068B04980002A390F5075E017 -:10697000E16801208A00AC490A3988501A7E111B4F +:10658000834200D18A64886C05042D0CAF00F05959 +:106590000028BED0FEBDF8B5040017009C4D0026B3 +:1065A0001D2973D012DC9A4808395C3002880B0030 +:1065B000F7F25EEA15F6F55A5A5AF4F45A5A5A5A4C +:1065C000F3A6F25AF1F0EF5AEEED5A0049297ED0C7 +:1065D00013DC42297CD009DC1E297AD0202979D00D +:1065E000412941D18B4F0125403FD9E1452972D046 +:1065F000462971D04829F4D1EEE166296DD00EDC30 +:106600004A296BD04C296AD06229EAD1E068002877 +:10661000E7D1FCF7CBF87F4F00907C3F27E068295B +:106620000FD06929DDD1E0680028DAD1FCF7BEF887 +:106630000400FFF7A2FE05002000FCF7BBF82800CD +:10664000F8BDE0680028CCD13803000F08280BD231 +:1066500039040A0E6B693906090E1B5C002A01D049 +:10666000934319436A691154F6E1FCF7DBF8E068DB +:1066700014235843C019F7F2D0FD0028F5D133E0B8 +:10668000696C491E696402D0696C05E0CAE0604922 +:10669000491D095C491E696401273B008B401A4271 +:1066A0000FD05C4A8001801889004058002808D02B +:1066B000FCF7B8F8E068574980014018696C890018 +:1066C0004650E068524A80003432115808E0ACE18C +:1066D0004CE1B7E044E1F6E06FE168E1AAE1AEE148 +:1066E0006B6C9F40B9431150E068494B81003433D3 +:1066F0005A581104490CC3D10098FCF75BF8ABE180 +:10670000FCF754F800904249E068095C002948D140 +:106710003F4A81000C325258D37992791F021743B5 +:106720003B4A583251580F4011005439095C012935 +:106730000AD900F035FB002806D03804400C03D0FD +:106740000098FCF737F845E1E06800F029FB0028E5 +:1067500002D1E068E8F719FB3804400CCCD1E068BE +:10676000FFF7B3FEE0682A4A810054325058030410 +:106770005B0CE5D06B78002BBED10028BCD0130099 +:10678000183B5850E06880001650E06818E024E09C +:10679000D1E094E087E05AE016E0A8E0ABE09CE0AE +:1067A000D2E01C4E8101403E71580029A4D1FFF770 +:1067B0008CFEE06881018919C2D0697801439BD1C0 +:1067C0000121FFF72FFC97E7E068810010480C30AB +:1067D0004058022180780840F8BDFBF7E7FFF979BF +:1067E000BB790A020A491A4362318A71120ACA71D4 +:1067F0007A783B7812021A430A70120A4A70FA78C1 +:10680000BB7812021A438A70120ACA7075E7000038 +:10681000007D020050950200FFFF000026F400C03A +:1068200064040004FF4948780A7800021043387075 +:10683000000A7870C878897800020843B870000AA6 +:10684000F87009E1E0680121E8F7C1FB04E1F64BCB +:106850000F2A01D99A4276D1F978BA780902114300 +:106860000400018078793A79000210436080F87959 +:10687000BA79000210439942A080E2D00806000EC7 +:10688000F9F734FD61882088E4F263FEE74BD96AAA +:106890002088012282401143D9620006000E0121A6 +:1068A000E4F210FED8E0110ABA70F970418839712B +:1068B000090A79718088B871000AF871CCE0E06843 +:1068C0000028BED110E0E068D64A01218000563A87 +:1068D0001058203001746E70BEE0E0680028B0D11E +:1068E000D34909780129ACD1E8F72BFBB4E0E06883 +:1068F000E8F7AAFBB0E0E06800280AD1E8780028B1 +:1069000007D0C849CB48523909680870000A487056 +:10691000EE70E068C34A8100563A5258D3799479B0 +:106920001A02C04B22430A3B59580A4289D001211E +:10693000FFF778FB90E0E068002887D1BE4802218D +:10694000E2F2AAFDF8BD45E0E0680028AAD1BB4804 +:106950000421E2F2A1FD00283CD1B848022135E033 +:10696000E068B04980002A390F5075E0E1680120E5 +:106970008A00AC490A3988502864A864269D597C4D :1069800001000000A05D02000004000067BCECD91B -:106990002864A8642000E8F768FB69E08001C0195A -:1069A000AE008059002806D0F7F2AEFBE168002067 -:1069B0008901C91988516D1CA049E0685E39095CDC -:1069C000A942EBDC54E0E068002851D1E8F753FC21 -:1069D000C4E7E06800280BD1E8F74DFC0028BDD1E2 -:1069E0009B480221E2F262FD0028B7D00120B5E702 -:1069F000002F01D0012000E00020E1688F4E8900C7 -:106A0000323E7050FCF700F80700E06881007158D2 -:106A1000002914D19049820151186A6C920089585A -:106A200000290CD1142141438B487C380818F7F217 -:106A300027FC002803D0E0680521FFF73BFB380066 -:106A400067E6E068002813D1EE6111E0E0680028F5 -:106A50000ED1E86982E7E068002809D17F48017A11 -:106A6000407AC007C00D0843B2D10120400275E74B -:106A7000002073E7F8B585000600704F563F78593F -:106A8000C1798279080239004C31495910430840D4 -:106A9000C00720D17048B10140384458002C1AD0AA -:106AA00020892018C37882781B0213430022012B0F -:106AB00012D0795940314A7279594431F6F218EFBF -:106AC0007859801D4178027809021143012211434F -:106AD0000170090A417041E7071D10202073607B97 -:106AE0000123184360735E48A061B02020815A489A -:106AF000626140384250380001F024ED002803D094 -:106B00003800083001F022ED302053497043403105 -:106B100040184A4900222A394D5921000123A8472B -:106B20001CE7091DCA798B7911021943814201D1F1 -:106B30000120704700207047F0B5002489B03F481D -:106B4000A6005638815910222031097E0691C9438A -:106B5000114382592032117680592030007A002C5E -:106B600005906AD1002004900698800753D5002034 -:106B700000F02DF901253FE0304830496238C06C03 -:106B80000006000E5639895901234A790979120203 -:106B90000A43190081400A422DD1284A2E3A9259BF -:106BA0000A4228D12C4AA10180008F180890385839 -:106BB000002820D001894018C1788278080210434B -:106BC000012802D18004DAF797F8FEF7B4FB012020 -:106BD000049008983858FBF753FF08990020785024 -:106BE00016496239C86C4A1D401CC864125D824255 -:106BF00001D10120C8646D1C10485D38005DA842B9 -:106C0000BADC0498002802D00420DBF79FF9FFF7D4 -:106C1000C0FBFEF773FB0698C00705987BD04007C2 -:106C20007AD4064856388059044DC17982790802D1 -:106C30000A3DA9591043084014E0B6E0027D020065 -:106C4000FFFF00000023008000F000C0DCFE000019 -:106C5000AC0000042C000004B0960200200000806C -:106C6000DFE6000003900190FEF765FBA959039849 -:106C700081427ED00020FFF7FDFE012064E06E48D7 -:106C80000125006C29000006000E039A8140114284 -:106C900061D16A4AA30180009F18079038580028E4 -:106CA00059D0039A1143039101894518FEF7F0FF6B -:106CB000002805D12900E520FFF733FF00282CD05C -:106CC0000799022079580873079801213D58687B7D -:106CD000084368735A48A86128890021001D0004F0 -:106CE000000C28816961079A4019B950407B000760 -:106CF00004D5514801214170E5F75BF930204F4937 -:106D00006043803140184C49002238318F592900A6 -:106D10000423B8470AE040E041E0079838580028CB -:106D200004D0F7F2F1F90799002078504249086C35 -:106D30000A1D401C0864125D824201D101200864D2 -:106D40000298401C0006000E02903B480299001D6C -:106D5000005D884293D83848001D005D012803D0AB -:106D600001980004400C1ED12000FFF7BAFB324905 -:106D700000E011E0543188590204520C13D02E4A1D -:106D80005278002A0FD10A00183A9051775ECFBE90 +:106990002000E8F7F2F969E08001C019AE008059E3 +:1069A000002806D0F7F2B0FBE16800208901C91980 +:1069B00088516D1CA049E0685E39095CA942EBDC96 +:1069C00054E0E068002851D1E8F7DDFAC4E7E06858 +:1069D00000280BD1E8F7D7FA0028BDD19B48022147 +:1069E000E2F264FD0028B7D00120B5E7002F01D006 +:1069F000012000E00020E1688F4E8900323E705097 +:106A0000FBF7DEFE0700E06881007158002914D111 +:106A10009049820151186A6C9200895800290CD162 +:106A2000142141438B487C380818F7F229FC0028D0 +:106A300003D0E0680521FFF73BFB380067E6E0681C +:106A4000002813D1EE6111E0E06800280ED1E8695A +:106A500082E7E068002809D17F48017A407AC007C0 +:106A6000C00D0843B2D10120400275E7002073E752 +:106A7000F8B585000600704F563F7859C179827984 +:106A8000080239004C31495910430840C00720D151 +:106A90007048B10140384458002C1AD02089201881 +:106AA000C37882781B0213430022012B12D079593C +:106AB00040314A7279594431F6F21AEF7859801D03 +:106AC0004178027809021143012211430170090A39 +:106AD000417041E7071D10202073607B012318439C +:106AE00060735E48A061B02020815A4862614038DE +:106AF0004250380001F068ED002803D0380008301B +:106B000001F066ED302053497043403140184A4946 +:106B100000222A394D5921000123A8471CE7091DED +:106B2000CA798B7911021943814201D10120704742 +:106B300000207047F0B5002489B03F48A6005638C1 +:106B4000815910222031097E0691C943114382598F +:106B50002032117680592030007A002C05906AD1BD +:106B6000002004900698800753D5002000F02DF9EE +:106B700001253FE0304830496238C06C0006000E05 +:106B80005639895901234A79097912020A431900B1 +:106B900081400A422DD1284A2E3A92590A4228D1E0 +:106BA0002C4AA10180008F1808903858002820D066 +:106BB00001894018C178827808021043012802D167 +:106BC0008004DAF799F8FEF782FB01200490089818 +:106BD0003858FBF731FE0899002078501649623981 +:106BE000C86C4A1D401CC864125D824201D101205C +:106BF000C8646D1C10485D38005DA842BADC04987A +:106C0000002802D00420DBF70BFAFFF7C0FBFEF7E9 +:106C100041FB0698C00705987BD040077AD4064808 +:106C200056388059044DC179827908020A3DA95924 +:106C30001043084014E0B6E0627D0200FFFF000050 +:106C40000023008070F200C0DCFE0000EC040004B1 +:106C5000640400045095020020000080EFE300006F +:106C600003900190FEF733FBA959039881427ED02F +:106C70000020FFF7FDFE012064E06E480125006C56 +:106C800029000006000E039A8140114261D16A4A30 +:106C9000A30180009F1807903858002859D0039A04 +:106CA0001143039101894518FEF7EAFF002805D139 +:106CB0002900E520FFF733FF00282CD00799022098 +:106CC00079580873079801213D58687B0843687319 +:106CD0005A48A86128890021001D0004000C288161 +:106CE0006961079A4019B950407B000704D55148A3 +:106CF00001214170E5F719F830204F496043803198 +:106D000040184C49002238318F5929000423B847D4 +:106D10000AE040E041E007983858002804D0F7F234 +:106D2000F3F90799002078504249086C0A1D401C6D +:106D30000864125D824201D1012008640298401C5F +:106D40000006000E02903B480299001D005D88423B +:106D500093D83848001D005D012803D00198000435 +:106D6000400C1ED12000FFF7BAFB324900E011E0D1 +:106D7000543188590204520C13D02E4A5278002AFA +:106D80000FD10A00183A905100208851FFBB013DF5 :106D9000010000009C610200000400004F2D6964A6 -:106DA0000020885101212000FFF752F905E040073B -:106DB00003D526488169491C8161E5F7F9F8641C0F -:106DC000012C00DAC5E6012009B0F0BD1F498000A2 -:106DD0000C310858C179827908021043C007C00FEE -:106DE00070471A4A810070B50C32525853791479A1 -:106DF0001A022243D20728D1144A34325158C90703 -:106E000023D1134E84014036305900281DD001890A -:106E10004518E878A97800020843012802D18004C7 -:106E2000D9F774FFE878A97800020843032801D154 -:106E3000FEF78BFA3159202008813059E5F785F8A3 -:106E40003059FBF727FE0020305170BDA07C0200B6 -:106E5000709602009957020010B5E8F2DDFD10BDF2 -:106E6000FFB5E1B00500002640685C9006205B9607 -:106E70005A90FDA0389605C80D960C96369235901E -:106E8000088940180A9048690B90FEF7ABFE0990FC -:106E90002C686A981434E62800D15A960020109085 -:106EA0000F900E9060688079C107F1480B9904D06B -:106EB0000818C06800280FD003E0081800690028EF -:106EC00006D06C990830086060688079C00703D1EB -:106ED0000B98C068C0070CD06C980068002808D1D7 -:106EE0000B98C068400770D40B982030407E000794 -:106EF000F9D4280008305AAA35A96B46609007C318 -:106F00000DAA5C996A9808ABE9F2EEFF020063985B -:106F1000002102606C980068002803D0837ADB07A8 -:106F200000D0012163689B79DE0703D10B9EF668D0 -:106F3000B60730D5649E032E2DD00B9E2036767E6C -:106F40003607F60F109626D10B9EF66877070ED5FA -:106F5000C6793607360F012E01D1012700E0002740 -:106F60000F970127022E00D000270E9713E0F60698 -:106F700004D5002902D001260C960CE00B9E367A2F -:106F8000012E08D1002906D0C6793607360F022E09 -:106F900001D101260E960B9F012620377F7E3F07E9 -:106FA00007D4002904D0002802D0807A800700D4BA -:106FB00000266498032812D0002A07D10B98C068D5 -:106FC00080070CD4D8073ED009E03CE0002E06D064 -:106FD0000020010010900E900F906C9801600C98AA -:106FE000002808D063980068002804D00020010021 -:106FF0000C906C98016037AA38A9019200910C9B03 -:107000000E9A0F991098E9F243FF0C98002806D0C9 -:1070100030AB587F801C5877187F801C18770E99EA -:107020000F9808430C990843109908430ED06068E4 -:107030004022C1781143C1706C980068002802D0CA -:10704000807AC00702D1002065B0F0BD6A98E628BA -:1070500002D06B98002801D001200DE00B985A9ABD -:10706000A03040895B9000922E8930AB1A7F6D99D9 -:1070700033005BA8E9F288FFA872E069C00502D579 -:107080000120A8722DE0A87A012827D9606804227F -:10709000C1781143C17077480079C0060AD40B98B3 -:1070A000407A02281AD10998132149014018007921 -:1070B000000713D5208D8005400E03280ED96D4999 -:1070C0004031897D490609D4DDF76EFE4006218DE9 -:1070D000800D7F22D200914301432185A87A0128A7 -:1070E00030D108AB197D5C9830AB40185A99401AE2 -:1070F000597F401A203881080A98890070308142EF -:107100005D9101D35D9800E05D905E9011A850AB59 -:10711000E860998D08AB187D5CAA04AE07C637A954 -:10712000609A5A9801AE07C65DAA0092A87A4AAA48 -:1071300011A93AABE9F24FFF0C9800280FD00020BC -:107140003AAA09E00A98703080088000DCE78100E4 -:1071500053589B1E401C5350A97A8142F7D8A97AF4 -:10716000E868491EE9F29BFF5A9A002A05D0E868B0 -:1071700035A98068801AF6F274EA67684A986060F8 -:107180006A98E6280FD06B9801280CD03A98BA1D5F -:1071900001040B98090C00F01AFE0028ABBD6783B0 +:106DA00001212000FFF752F905E0400703D52648EE +:106DB0008169491C8161E4F7B7FF641C012C00DA8A +:106DC000C5E6012009B0F0BD1F4980000C3108580C +:106DD000C179827908021043C007C00F70471A4A70 +:106DE000810070B50C325258537914791A0222433B +:106DF000D20728D1144A34325158C90723D1134E2F +:106E000084014036305900281DD001894518E878A2 +:106E1000A97800020843012802D18004D9F776FF3F +:106E2000E878A97800020843032801D1FEF759FA4F +:106E30003159202008813059E4F743FF3059FBF7DE +:106E400005FD0020305170BD007D0200109502004C +:106E50009557020010B5E8F2DFFD10BDFFB5E1B0B7 +:106E60000500002640685C9006205B9638965A9094 +:106E7000FFA005C80D960C963692359008894018EB +:106E8000099048690B2189010B90401840690A90CC +:106E90000B98FEF79FFE08902C686A981434E62839 +:106EA00000D15A96002010900F900E906068807963 +:106EB000C107F1480B9904D00818406A00280FD088 +:106EC00003E00818C06A002806D06C9908300860F2 +:106ED00060688079C00703D10B98C068C0070CD0E8 +:106EE0006C980068002808D10B98C068400770D4DF +:106EF0000B982030407E0007F9D4280008305AAAA9 +:106F000035A96B46609007C30DAA5C996A9807ABD8 +:106F1000E9F2EAFF02006398002102606C980068C1 +:106F2000002803D0837ADB0700D0012163689E79B3 +:106F3000F30703D10B9BDB689B0730D5649B032BC6 +:106F40002DD00B9B20335B7E1B07DB0F109326D1CC +:106F50000B9BDB685F070ED5C3791F073F0F012F1F +:106F600001D1012300E000230F930123022F00D061 +:106F700000230E9313E0DB0604D5002902D0012381 +:106F80000C930CE00B9B1B7A012B08D1002906D037 +:106F9000C3791B071B0F022B01D10123E9E70B9FCC +:106FA000012320377F7E3F0707D4002904D0002823 +:106FB00002D0807A800700D400236498032811D07F +:106FC000002A07D10B98C06880070BD4F0073DD08A +:106FD00008E03BE0002B05D000206C9910900E904B +:106FE0000F9008600C98002808D06398006800286B +:106FF00004D0002001000C906C98016037AA38A9D9 +:10700000019200910C9B0E9A0F991098E9F240FFA3 +:107010000C98002806D030AB587F801C5877187F1A +:10702000801C18770E990F9808430C990843109903 +:1070300008430ED060684022C1781143C1706C983B +:107040000068002802D0807AC00702D1002065B015 +:10705000F0BD6A98E62802D06B98002801D0012084 +:107060000DE00A985A9A4030408A5B9000922E892F +:1070700030AB1A7F6D9933005BA8E9F285FFA872E7 +:10708000E069C00502D50120A8722DE0A87A012888 +:1070900027D960680422C1781143C170774800790C +:1070A000C0060AD40B98407A02281AD108981321F6 +:1070B000490140180079000713D5208D8005400E46 +:1070C00003280ED96D494031897D490609D4DDF781 +:1070D00065FF4006218D800D7F22D2009143014340 +:1070E0002185A87A012812D108AB197D5C9830ABB4 +:1070F00040185A99401A597F401A20380999800837 +:107100008000703188425D9006D25D9104E009985C +:107110007030800880005D905D985E9011A850AB43 +:10712000E860998D08AB187D5CAA04AE07C637A944 +:10713000609A5A9801AE07C65DAA0092A87A4AAA38 +:1071400011A93AABE9F247FF0C9800280AD00020B9 +:107150003AAA04E0810053589B1E401C5350A97A60 +:107160008142F7D8A97AE868491EE9F298FF5A9A4D +:10717000002A05D0E86835A98068801AF6F270EA1E +:1071800067684A9860606A98E6280FD06B98012873 +:107190000CD03A98BA1D01040B98090CAADAD0A7B2 :1071A0000100000098650200000400001CF7BA0806 -:1071B00003D0E069E9F272FFE061E0690121890230 -:1071C00088430026E061F9E00F99002907D0401EAE -:1071D000B04204D1B0003AA90A5808320A50B000AF -:1071E0003AA95F9008580204120C3A80A87A401E0F -:1071F000B0424ED1F878FB210840F870E069810771 -:1072000001D01E2100E01821091D51180904090CA4 -:1072100061846D9A002A01D0891C6184410508D5DA -:107220000204208D120C8005410E0B98EDF714F826 -:10723000B880E06981060FD56D9A00925F993AAAED -:107240005158BB880A040104208D120C8005090CDA -:10725000400EEDF711F81AE0010617D56D9A00926D -:107260005F993AAA5158BB880A040104208D120C78 -:107270008005090C400EEBF20AF908E0AAAA030007 -:107280000000000080020000365C00040020E08165 -:107290004AE0E069410510D56D9A00925F993AAADB -:1072A000891849680204208D0B048005410E0B9853 -:1072B0001B0C120CECF7D6FFB880002E34D1E0691D -:1072C000810616D50204208D120C8005410E0B9804 -:1072D000ECF7C2FF03006D9A3A9800920204E0694D -:1072E000120C0104208D090C8005400EECF7C4FF40 -:1072F00019E0010616D50204208D120C8005410EFE -:107300000B98ECF7A9FF03006D9A3A9800920204DB -:10731000E069120C0104208D090C8005400EEBF28F -:10732000B6F800E00020A081288A4AA900090001DF -:10733000304338835F98202208583900F6F29AE9E2 -:1073400038AB1878012809D16C983AA902685F987F -:107350004AAB09581858E9F26BFD2EE002282CD1EF -:107360005F984AA9095839913AA9085830AB197F52 -:10737000401A39990004000C0880A97A491EB142CC -:1073800002D139990838088039988079C2076C98F9 -:10739000D20F01680B98FCF702FA03006C98E97AA7 -:1073A00002683998FFF762FDA87A401EB04204D106 -:1073B00039983999008808300880761CA87AB0423C -:1073C00000D901E76E9800280AD06E9830AB597F3B -:1073D00080304176997F81760E99C1610C99016266 -:1073E0005E983BE6FFB58DB0040040680C90062027 -:1073F0000B905A48189D05C88035099000200A92C4 -:107400000890E8690790286A069008894018059056 -:107410004F690120A072266816981436E62801D11B -:1074200000200B900520C00138180069002802D008 -:10743000179908300860200008300BAA09A96B468C -:1074400007C308AA0C99169804ABE9F257FD0F99E7 -:1074500002000860179800210068002803D0837A92 -:10746000DB0700D001213923DB5D8C4601211B079E -:1074700008D46346002B04D0002802D0807A80070D -:1074800000D40021109803280CD0002A05D1F868F8 -:10749000800707D4002011B0F0BD002902D0179951 -:1074A000002008600698002807D00F980068002880 -:1074B00003D01799002006900860069907980843A2 -:1074C00004D070684022C1781143C17008AB1978AC -:1074D0000C980B9A6B7E4118881AC01A20388708BE -:1074E0000598BF007030874200D20700E068203264 -:1074F0004160687EE168C01980188860E168208971 -:107500000860A17AE068491EE9F2D3FD0B9A002ACF -:1075100006D0697E38002030081809A9F6F2AAE8DA -:1075200071687760687E22890B9B8018AA7ED218CA -:107530008018069A002A00D0801E08801E30F2694A -:107540000004000C920702D0801D0004000C70841F -:1075500020223800F6F28EE838009CE764660200CC -:10756000F0B5A5B000270F970E976120C002D9F79C -:10757000D7FB0022D243009208220121FF4823AB0F -:10758000C068FCF71FF8FE48D9F7CAFB239800280B -:10759000EBD0C007E9D0F3E21098129E4469FBF7E4 -:1075A00047FA0500002E06D0109800F0FD84C8139D +:1071B00000F04DFE002803D0E069E9F26FFFE061C6 +:1071C000E0690121890288430026E061FAE00F9915 +:1071D000002907D0401EB04204D1B0003AA90A5895 +:1071E00008320A50B0003AA95F9008580204120C05 +:1071F0003A80A87A401EB0424FD1F878FB2108406F +:10720000F870E069810701D01E2100E01821091DF6 +:1072100051180904090C61846D9A002A01D0891C57 +:107220006184410508D50204208D120C8005410EB1 +:107230000B98ECF751FEB880E06981060FD56D9A86 +:1072400000925F993AAA5158BB880A040104208D24 +:10725000120C8005090C400EECF74EFE1BE00106F7 +:1072600018D56D9A00925F993AAA5158BB880A04C2 +:107270000104208D120C8005090C400EEBF207F979 +:1072800009E00000AAAA030000000000400200007C +:107290003A5C00040020E0814AE0E069410510D535 +:1072A0006D9A00925F993AAA891849680204208D64 +:1072B0000B048005410E0B981B0C120CECF712FE10 +:1072C000B880002E34D1E069810616D50204208DE5 +:1072D000120C8005410E0B98ECF7FEFD03006D9A31 +:1072E0003A9800920204E069120C0104208D090C06 +:1072F0008005400EECF700FE19E0010616D50204E9 +:10730000208D120C8005410E0B98ECF7E5FD030073 +:107310006D9A3A9800920204E069120C0104208DE3 +:10732000090C8005400EEBF2B2F800E00020A081CD +:10733000288A4AA900090001304338835F98202237 +:1073400008583900F6F296E938AB1878012809D1C7 +:107350006C983AA902685F984AAB09581858E9F244 +:1073600067FD2EE002282CD15F984AA9095839916F +:107370003AA9085830AB197F401A39990004000C1B +:107380000880A97A491EB14202D13999083808808B +:1073900039988079C2076C98D20F01680B98FCF776 +:1073A000A4F903006C98E97A02683998FFF75CFD4C +:1073B000A87A401EB04204D1399839990088083023 +:1073C0000880761CA87AB04200D900E76E980028A1 +:1073D0000AD06E9830AB597F80304176997F8176A4 +:1073E0000E99C1610C9901625E983AE6FFB58DB0C5 +:1073F000040040680C9006200B905A48189D05C860 +:107400008035099000200A920890E8690790286A60 +:1074100006900889401805904F690120A0722668DF +:1074200016981436E62801D100200B90092080011F +:107430003818C06A002802D0179908300860200068 +:1074400008300BAA09A96B4607C308AA0C9916981D +:1074500004ABE9F253FD0F99020008601798002170 +:107460000068002803D0837ADB0700D0012139238C +:10747000DB5D8C4601211B0708D46346002B04D03A +:10748000002802D0807A800700D4002110980328B9 +:107490000CD0002A05D1F868800707D4002011B06D +:1074A000F0BD002902D01799002008600698002836 +:1074B00007D00F980068002803D017990020069085 +:1074C000086006990798084304D070684022C17884 +:1074D0001143C17008AB19780C980B9A6B7E411858 +:1074E000881AC01A203887080598BF007030874274 +:1074F00000D20700E06820324160687EE168C01970 +:1075000080188860E16820890860A17AE068491ED7 +:10751000E9F2CFFD0B9A002A06D0697E38002030B0 +:10752000081809A9F6F2A6E871687760687E2289D2 +:107530000B9B8018AA7ED2188018069A002A00D0C9 +:10754000801E08801E30F2690004000C920702D0F1 +:10755000801D0004000C708420223800F6F28AE8B6 +:1075600038009CE76C660200F0B5A7B000271097C2 +:107570000F976120C002D9F7D3FB0022D2430092BB +:1075800008220121FF4824ABC068FBF7C1FFFE4879 +:10759000D9F7C6FB24980028EBD0C007E9D01EE33A +:1075A000119844690B208001201826901FF93BB0E8 :1075B000010000009469020000040000E898CFBCBC -:1075C00051FB002801D0012000E00020119028008C -:1075D000FBF73CFA012018AB22905878169900026C -:1075E00008431099F56D4881119800287ED0002C31 -:1075F00021D112986030407A212816D1A87801074D -:10760000890F0ED1000904280BD112A8ECF71AF843 -:1076100004001098F6F296FD16992000ECF714F885 -:10762000B8E21098F6F28EFDB4E2DB48D9F782FB9F -:1076300000F01AEEA9E001200C902000E5F7F7FC1D -:10764000310014310D911699002923D1217A032993 -:107650007ED1816802238A079943EB78D20FDB063B -:10766000DB0F5B001943012A81607CD189077AD442 -:10767000617A032977D1817FC90774D00B218901F1 -:107680006118896B2031097A00296CD00121803082 -:10769000816268E0310060312491497A382909D14A -:1076A000AA7813079B0F022B04D112090C2A5AD077 -:1076B000042A58D0227A032A26D1807F800723D03B -:1076C00010AB987D002801D006281DD1312901D0AA -:1076D000322935D12000FEF7C0FA00216C30017349 -:1076E0004173817324984172307800E09FE0EF226B -:1076F000104030700D982030017811400170A8784A -:1077000000090C282FD01BE0607A02282BD1B0682A -:10771000800028D410AB987D042824D1A8780007D5 -:10772000800F02281FD12000FEF797FA0C30007D51 -:10773000012818D10D98417801700D9900204870EA -:107740000D99002048800D9908610D99486100E06D -:107750001EE0E87808210843E87010990122200013 -:10776000E0F762FD0C90207A03280BD10B208001FA -:107770002018806B2030007A002803D101212000DE -:10778000E0F7EFFA0C9800287ED01698002807D171 -:10779000A8780007800F022802D12000DCF7D6FD70 -:1077A000002C28D0207A012806D1F06D8079C007FE -:1077B00002D12000FEF781FAA879C0071BD1607AB8 -:1077C000022818D1129901222000FDF70CFDA8789B -:1077D0000007800F022805D11698002802D120004A -:1077E000FDF703FC200000F0A0EE002803D02900E4 -:1077F000200000F0CEEEFDF772FD002817D01298A1 -:107800006030407A142812D0152810D035280ED0B8 -:10781000169800280BD1A8780107890F02D100091A -:10782000052804D00220FEF741FAE0F743FFB068D4 -:1078300000011BD5169800280CD1002C16D005206D -:10784000C0012018406A002810D06030818B491C8C -:1078500081830BE0002C09D00520C0012018406A6C -:10786000002803D06030C18B491CC183B068800000 -:10787000119840D500283DD0129822006030007A3F -:1078800012A9FDF77AF800E0A8E0207A002802D0DB -:10789000607A032803D1200012A9FEF77BFBFDF7D5 -:1078A00016FD00281ED0E878C006C00F401E2043F9 -:1078B0000AD1207A012807D0E2F74FFF002803D130 -:1078C000E2F764FF00280DD034490868401C0860C6 -:1078D000207A062801D0E3F7C7FEB068002801DA55 -:1078E000E3F783F810980021FBF79CF8200012A919 -:1078F000EEF70AFC48E100286FD012A8DDF7E2F8A5 -:1079000002286BD0002C00D0207AB068002801DA61 -:10791000E3F76BF8A87801078A0F022A7ED12000CE -:1079200012A900F03AEE129822006030007A12A9F3 -:10793000FDF723F8200012A9F1F758FD18498872C5 -:10794000000AC872200012A9EEF7DEFB200012A97F -:1079500000F026EE607A032801D0012803D1200030 -:1079600012A9FEF717FBFDF7B2FC002821D0E8783A -:10797000C0060AD5207A012807D0E2F7EEFE0028DB -:1079800003D1E2F703FF002813D00449086809E097 -:107990007C7C02000808030001000100FCF000C02C -:1079A000865C0004401C0860207A062801D0E3F7BA -:1079B0005BFEFDF794FC00281FD01298CE76CCF722 +:1075C00040690E90139EFBF719F90500002E06D0B6 +:1075D000119800F07DFB002801D0012000E0002080 +:1075E00012902800FBF70EF9012018AB2390587970 +:1075F0001799000208431199F56D488112980028E7 +:107600007ED0002C4AD0300060302590407A65282A +:1076100018D1A8780007800F022813D1E049087814 +:1076200000280AD0401E0006000E08700AD1DD496D +:10763000C868CA0D9043C86004E0DA48C168C20D4A +:107640009143C16001200C902000E5F7E2FB31007E +:1076500014310D911799002942D1217A032977D14C +:10766000816802238A079943EB78D20FDB06DB0F90 +:107670005B001943012A81600FD189070DD4617A1B +:107680000329F9D1817FC90707D00E992031097AE2 +:107690000029F9D001218030816287E013986030A1 +:1076A000407A212816D1A8780107890F0ED1000948 +:1076B00004280BD113A8EBF7EFFE04001198F6F2A3 +:1076C00041FD17992000EBF7E9FE92E21198F6F2DE +:1076D00039FD8EE2B448D9F72DFB00F000EE74E0DE +:1076E0002599497A382909D1AA7813079B0F022BCB +:1076F00004D112090C2A59D0042A57D0227A00E06A +:10770000C3E0032A25D1807F800722D010AB987E6A +:10771000002801D006281CD1312901D0322934D1CA +:107720002000FEF792FA00216C30017341738173DF +:107730002598EF2241723078104030700D9820303B +:10774000017811400170A87800090C282ED01CE0A7 +:107750003EE0607A022829D1B068800026D410ABC0 +:10776000987E042822D1A8780007800F02281DD116 +:107770002000FEF76AFA0C30007D012816D10D9822 +:10778000417801700D98002141700D9900204880CA +:107790000D99012208610D994861E8780821084394 +:1077A000E87011992000E0F70BFC0C90207A032878 +:1077B00008D10E982030007A002803D10121200042 +:1077C000E0F798F90C98002872D01798002807D194 +:1077D000A8780007800F022802D12000DCF7A0FE65 +:1077E000002C36D0207A012806D1F06D8079C007B0 +:1077F00002D12000FEF759FA179800280AD1207A02 +:10780000002807D1EBF20CF8269A5269FF32521C7D +:1078100051641064A879C0071BD1607A022818D17E +:10782000139901222000FDF7AAFCA8780007800F19 +:10783000022805D11798002802D12000FDF79BFBF4 +:10784000200000F0B4EE002803D02900200000F052 +:10785000E2EEFDF710FD002817D013986030407A53 +:10786000142812D0152810D035280ED017980028CB +:107870000BD1A8780107890F02D10009052804D08F +:107880000220FEF70BFAE0F7BEFDB06800011CD540 +:10789000179800280DD1002C17D00520C001201802 +:1078A0000068002811D06030818B491C81830CE076 +:1078B000C3E0002C09D00520C00120180068002872 +:1078C00003D06030C18B491CC183B068800012981E +:1078D0003ED500283BD0139822006030007A13A9CF +:1078E000FDF711F8207A002802D0607A032803D12E +:1078F000200013A9FEF74CFBFDF7B5FC00281ED0B5 +:10790000E878C006C00F401E20430AD1207A012823 +:1079100007D0E2F7D8FD002803D1E2F7EDFD0028FB +:107920000DD022480168491C0160207A062801D048 +:10793000E3F750FDB068002801DAE2F70CFF119878 +:107940000021FAF74BFF200013A9EEF719FA4AE1DC +:10795000002871D013A8DDF7AEF902286DD0002CF5 +:1079600000D0207AB068002801DAE2F7F4FEA878A7 +:1079700001078A0F022A7ED1200013A900F04EEEE3 +:10798000139822006030007A13A9FCF7BCFF200096 +:1079900013A9F1F7FBFB0BE0DC7C020008080300F5 +:1079A000D003000400A800800100010054F300C0CF +:1079B0009D498872000AC872200013A9B0FED5D96B :1079C00001000000906D020000040000BB421CD0CA -:1079D0006030407A14281AD12000E0F7EFFC1699A5 -:1079E0000088002910D1022803D113270FE0D1E02D -:1079F000DAE02000E0F7E0FC0700EAF21BFF803746 -:107A0000F964B8641E2702E0022800D01F27A87876 -:107A10000009042801D00C2821D16036707A15287D -:107A200026D00CDC102823D0112818D0132800E011 -:107A30004CE014D1169800282AD121270FE03528D0 -:107A400028D041280BD101220D92302216A9684678 -:107A50000C94F5F28EEE12A80FC8F3F7E3F8129823 -:107A60006030407A302820D11098F3F7AEFD95E0D1 -:107A700016980028E87805D1C00601D50E27EEE754 -:107A80000D27ECE7C00601D51127E8E71027E6E748 -:107A90002227E4E716980028E1D0FF207930015B27 -:107AA0000122200000F00EECD9E7A9780909042989 -:107AB00003D00C2901D05A2803D11098F6F24CFBC0 -:107AC0006CE00E991098FAF7B7FF67E0890F34D190 -:107AD00012986030C27A002A06D0169874210306E4 -:107AE0001B0E2000DEF768FB607A022817D1129A7D -:107AF00029002000EAF733FC2290A87800090D281D -:107B000007D116980121002800D000211098DCF739 -:107B10008AFA0020239022980028CED13EE0A8784F -:107B20000309F5F2D8EF0E0909090909090909093C -:107B3000090909090809E4E7EBE7012A2ED1000940 -:107B4000082821D00A2829D1FAF786FF05001098C5 -:107B5000F6F202FB1698002810D00F980A280DD2D2 -:107B6000DAF77BFE00280BD10F980121401C00069C -:107B7000000E0F902000E2F747FF01E000200F9079 -:107B80002800FAF76DFF09E02900200012AAEAF7A1 -:107B900089FB92E711490868401C0860002F03D058 -:107BA0003800E3F7FEFC002712A800F08EF9002849 -:107BB000109000D004E50B49094808610A480169A2 -:107BC0004069814200D1E4E4044807224168491C2D -:107BD0004160C0680121FBF715FDDAE47C7C0200FE -:107BE000FF7FFFFF00A5008000A00080C17B00692F -:107BF000394A904201D1002012E0384A904201D126 -:107C000010200DE0364A904201D1172008E0354A95 -:107C1000904201D11F2003E0334A904202D122203A -:107C2000FF2901D12620002140180006000E7047D0 -:107C3000F8B50500FFF7DAFF2C49C00044182068AA -:107C40002B4E002803D0B088401CB080F8BD684699 -:107C50002560FAF70EFF009860603078401C3070A5 -:107C600068690028F2D00B2189014018806B203010 -:107C7000017A491C0172F8BD10B50400FFF7B6FF88 -:107C80001A49C000401802681949A24204D0C888A5 -:107C9000401CC880002010BD002213000CC00878D2 -:107CA000401E08706069002814D00B21890141181A -:107CB000896B20310A7A002A0CD0521E1206120E4D -:107CC0000A7207D1017A032904D1E5F7BAF9002134 -:107CD00080308162012010BD2C0000046800000487 -:107CE00048010004F800000434010004BC590004F9 -:107CF0008C7C0200F0B594465A681D6814062E0666 -:107D0000240E360EB44203D22700F837B74205D905 -:107D1000B44205D932000832944201D80020F0BDA7 -:107D2000059A090212683143114308602D1DE805C8 -:107D3000C00D61460904084318600120F0BD18B564 -:107D40001400039A00922200FFF7D4FF18BDF8B583 -:107D50000C000700FAF780FE06006820055D143469 -:107D6000002F14D0787A022811D06068807801073B -:107D7000890F02D10009042809D0FCF706FF010091 -:107D80002000EBF2DDFA96490A68801808609549F0 -:107D9000A8000B589549944A085801280DD1608CC9 -:107DA0000421091A8907890F0818001D0092020092 -:107DB00029002000FFF7C3FF0DE000200092020021 -:107DC00029002000FFF7BBFF002804D10C0659C092 +:1079D000EEF7E0F9200013A900F02EEE607A0328FC +:1079E00001D0012803D1200013A9FEF7DBFAFDF72F +:1079F00044FC002816D0E878C0060AD5207A012871 +:107A000007D0E2F76AFD002803D1E2F77FFD0028E6 +:107A100008D08B490868401C0860207A062801D0ED +:107A2000E3F7E2FCFDF731FC00281FD0139860302B +:107A3000407A14281AD12000E0F78CFB17990088AF +:107A4000002910D1022803D113270FE0D1E0DAE09A +:107A50002000E0F77DFB0700EAF2ECFE8037F964D6 +:107A6000B8641E2702E0022800D01F27A87800096A +:107A7000042801D00C2821D16036707A152826D030 +:107A80000CDC102823D0112800E04EE016D013287B +:107A900014D1179800282AD121270FE0352828D0A3 +:107AA00041280BD101220D92302217A968460C946F +:107AB000F5F25EEE13A80FC8F2F7ACFF1398603032 +:107AC000407A302820D11198F3F718FC95E01798E8 +:107AD0000028E87805D1C00601D50E27EEE70D276E +:107AE000ECE7C00601D51127E8E71027E6E72227D3 +:107AF000E4E717980028E1D0FF205130015B012214 +:107B0000200000F01AECD9E7A9780909042903D06C +:107B10000C2901D05A2803D11198F6F21DFB6CE014 +:107B20000F991198FAF764FE67E0890F34D1139822 +:107B30006030C27A002A06D01798742103061B0E03 +:107B40002000DEF719FC607A022817D1139A290069 +:107B50002000EAF72EFB2390A87800090D2807D112 +:107B600017980121002800D000211198DCF750FB64 +:107B70000020249023980028CED13EE0A878030965 +:107B8000F5F2A8EF0E090909090909090909090906 +:107B900009090809E4E7EBE7012A2ED100090828C2 +:107BA00021D00A2829D1FAF733FE05001198F6F200 +:107BB000D3FA1798002810D010980A280DD2DAF7B7 +:107BC00050FF00280BD110980121401C0006000E28 +:107BD00010902000E2F7CEFD01E000201090280078 +:107BE000FAF71AFE09E02900200013AAEAF784FA3E +:107BF00092E714490868401C0860002F03D0380041 +:107C0000E3F785FB002713A800F099F900281190ED +:107C100000D0D9E40D490C4808610D48016940695C +:107C2000814200D1B9E4074807224168491C4160FC +:107C3000C0680121FBF78CFCAFE400008A5C000403 +:107C400054F300C0DC7C0200FF7FFFFF00A5008032 +:107C500000A00080C17B00693A4A904201D1002017 +:107C600012E0394A904201D110200DE0374A90428B +:107C700001D1172008E0364A904201D11F2003E0CD +:107C8000344A904202D12220FF2901D1252000212F +:107C900040180006000E7047F8B50500FFF7DAFF40 +:107CA0002D49C000441820682C4E002803D0B0880D +:107CB000401CB080F8BD68462560FAF7B6FD009814 +:107CC00060603078401C307068690028F2D00B2169 +:107CD0008901401840690028ECD02030017A491C05 +:107CE0000172F8BD10B50400FFF7B4FF1A49C000D7 +:107CF000401802681949A24204D0C888401CC880B4 +:107D0000002010BD002213000CC00878401E08702F +:107D100060690B21890141184969002810D0203180 +:107D20000A7A002A0CD0521E1206120E0A7207D1CD +:107D3000017A032904D1E5F776F8002180308162C9 +:107D4000012010BD64040004A80400048805000498 +:107D50003805000474050004C8590004EC7C0200D6 +:107D6000F0B594465A681D6814062E06240E360E89 +:107D7000B44203D22700F837B74205D9B44205D937 +:107D800032000832944201D80020F0BD059A090261 +:107D900012683143114308602D1DE805C00D61468E +:107DA0000904084318600120F0BD18B51400039AB7 +:107DB00000922200FFF7D4FF18BDF8B50C000700B1 +:107DC000FAF726FD06006820055D1434668FB3CEF1 :107DD000010000008C710200000400000487396378 -:107DE0003000FAF747FE0020F8BD3000FAF742FEF7 -:107DF0000120F8BDC03010B5027B0100407B8242FB -:107E000001D3100010BD887BC97B8842FAD200F0F4 -:107E100010EB002801D1032010BD092010BD70B562 -:107E2000040010780D001100C00719D1207A012834 -:107E300002D0607A022803D12000FDF7D7FF02E0CC -:107E40002000FDF7DFFF0006000E01D01E2000E03D -:107E50001C20A03421892818884201D9012070BD36 -:107E6000002070BDF8B514000600D0698F78C004FA -:107E700007D488688000C10F3000F1F710FDE06280 -:107E8000F8BD39003000F1F7F7FB05062D0E002094 -:107E9000002D02D13000DBF791FC03005948390076 -:107EA00000798006C20F00922A002000EBF21FFC2E -:107EB000F8BD70B50400008905192000FFF7C2FE67 -:107EC00060692900FFF74DFF002806D12000FFF769 -:107ED000DDFE0120D9F7B8FEEFE7012070BDFEB549 -:107EE000012104000020216106002060FAF7BEFD98 -:107EF00001904248016802694769D005FA05C00D42 -:107F0000D20D904259D03806000E08430D210902C7 -:107F100008430568002D4BD040212000F5F264ECA9 -:107F2000286C2060C16D060089781C3E0907890F06 -:107F300071690091E96961606A88D207D20F226194 -:107F40006A881207520FA2738068800030D42878A4 -:107F5000207368786073C80415D5288D8005420E9B -:107F6000280020300290007A4107C007C90FC00FD7 -:107F7000EAF20FFC207560750298807A0007000F06 -:107F8000A075002000E0E86AA0606888C0070FD1F3 -:107F90002061009800280BD02068C06D8078000711 -:107FA000800F022804D16B692A69009800F010EB59 -:107FB0003F1D1249F805C00D48610198FAF75AFDB6 -:107FC0003000FEBD38B504000D00EAF23DFC04228D -:107FD0002066A25E0092020028000B00EAF242FF37 -:107FE000A088002804D068880121C903084368805C -:107FF00038BD000000F100C0EC01000400A00080CA -:10800000C8810200365C00040121814003480068F9 -:10801000014201D001207047002070471CF700C0CA -:108020000748807C002808D1054800234038C16EED -:10803000806E59405840084300D00120704700002E -:10804000C08902000B2189014018406B002803D031 -:108050002030407DC007C00F70470000913082E0A3 -:108060000300A0E10210A0E11EFF2FE100A00047E5 -:10807000D4119FE5A8219FE5DB00A0E300F021E1FA -:10808000021081E00310C1E3041041E201D0A0E13D -:1080900000A0A0E300B0A0E388219FE5D200A0E308 -:1080A00000F021E1021081E00310C1E3041041E27D -:1080B00001D0A0E1D300A0E300F021E15C319FE515 -:1080C000001083E554119FE5000091E5040080E273 -:1080D00058219FE5000082E570219FE570019FE532 -:1080E0002C0082E50700A0E3300082E50900A0E350 -:1080F000000082E50B10A0E3101082E50130A0E340 -:10810000243082E5283082E548219FE51030A0E345 -:10811000083082E51EFF2FE15C0000EA0EF0B0E1BE -:108120005A0000EA590000EAFEFFFFEA0E730BEA6C -:10813000FAF7AFFC49480047F346D8F724FE0000A1 -:1081400018019FE50010E0E3001080E5001090E5C5 -:1081500000619FE50235A0E3083186E500019FE557 -:10816000100F01EEFCF09FE5900F07EE1EFF2FE1D0 -:10817000E0009FE50010E0E30C1080E5D4009FE5EF -:10818000E4109FE5081080E5E0009FE5001090E511 -:10819000081081E3001080E5001090E5081011E25E -:1081A000FCFFFF0A900F07EE1EFF2FE1100F11EEEC -:1081B0001EFF2FE1100F01EE1EFF2FE1010050E224 -:1081C000FDFFFF1A1EFF2FE1A4109FE5A520A0E3ED -:1081D0000000A0E3040081E4012052E288C1F549D7 +:107DE000002F14D0787A022811D0606880780107BB +:107DF000890F02D10009042809D0FCF796FE010082 +:107E00002000EBF2A7FA98490A68801808609749A1 +:107E1000A8000B589749964A085801280DD1608C44 +:107E20000421091A8907890F0818001D0092020011 +:107E300029002000FFF7C3FF0DE0002000920200A0 +:107E400029002000FFF7BBFF002804D13000FAF71B +:107E5000EDFC0020F8BD3000FAF7E8FC0120F8BD89 +:107E6000A03010B5027801004078824201D31000A2 +:107E700010BD8878C9788842FAD200F018EB002843 +:107E800001D1032010BD092010BD70B50400107889 +:107E90000D001100C0071DD1207A012802D0607AA0 +:107EA000022803D12000FDF7A0FF02E02000FDF72B +:107EB000A7FF0006000E01D01E2000E01C2029189C +:107EC0000B208001201840694030008A814201D98E +:107ED000012070BD002070BDF8B514000600D06907 +:107EE0008F78C00407D488688000C10F3000F1F794 +:107EF000A6FBE062F8BD39003000F1F78DFA050607 +:107F00002D0E0020002D02D13000DBF75BFD0300B9 +:107F10005948390000798006C20F00922A002000DB +:107F2000EBF2E5FBF8BD70B50400008905192000EF +:107F3000FFF7BCFE60692900FFF749FF002806D162 +:107F40002000FFF7D9FE0120D9F7E8FEEFE7012076 +:107F500070BDFEB5012104000020216106002060F3 +:107F6000FAF760FC01904248016802694769D00550 +:107F7000FA05C00DD20D904259D03806000E0843C4 +:107F80000D21090208430568002D4BD04021200037 +:107F9000F5F22AEC286C2060C16D060089781C3E41 +:107FA0000907890F71690091E96961606A88D207E0 +:107FB000D20F22616A881207520FA2738068800074 +:107FC00030D42878207368786073C80415D5288D5C +:107FD0008005420E280020300290007A4107C00739 +:107FE000C90FC00FEAF2D5FB207560750298807A40 +:107FF0000007000FA075002000E0E86AA060688814 +:10800000C0070FD12061009800280BD02068C06DF8 +:1080100080780007800F022804D16B692A690098D4 +:1080200000F018EB3F1D1249F805C00D486101989A +:10803000FAF7FCFB3000FEBD38B504000D00EAF293 +:1080400003FC04222066A25E0092020028000B00BE +:10805000EAF208FFA088002804D068880121C9033B +:108060000843688038BD000058F300C01C060004B7 +:1080700000A000801C8102003A5C000401218140C4 +:1080800003480068014201D001207047002070477A +:1080900064F900C00748807C002808D10548002307 +:1080A0004038C16E806E59405840084300D00120CE +:1080B00070470000188902000B21890140180069EF +:1080C000002803D02030407DC007C00F704700005B +:1080D000913082E00300A0E10210A0E11EFF2FE139 +:1080E00000A00047D4119FE5A8219FE5DB00A0E395 +:1080F00000F021E1021081E00310C1E3041041E22D +:1081000001D0A0E100A0A0E300B0A0E388219FE59A +:10811000D200A0E300F021E1021081E00310C1E3EE +:10812000041041E201D0A0E1D300A0E300F021E17E +:108130005C319FE5001083E554119FE5000091E557 +:10814000040080E258219FE5000082E570219FE550 +:1081500070019FE52C0082E50700A0E3300082E576 +:108160000900A0E3000082E50B10A0E3101082E5F7 +:108170000130A0E3243082E5283082E548219FE5E4 +:108180001030A0E3083082E51EFF2FE15C0000EA1A +:108190000EF0B0E15A0000EA590000EAFEFFFFEAE3 +:1081A000F1720BEAFAF751FB49480047F346D8F75A +:1081B000EAFD000018019FE50010E0E3001080E5F3 +:1081C000001090E500619FE50235A0E3083186E5E7 +:1081D00000019FE5100F01EEFCF09FE54E7FCB7E86 :1081E000010000008875020000040000575DEA0FDE -:1081F000FCFFFF1A90009FE590109FE5001080E5BE -:108200008C009FE58C109FE5001080E588009FE5BD -:1082100088109FE5001080E51EFF2FE100000FE1B0 -:108220001F0000E2120050E30100A0030000A013B1 -:108230001EFF2FE1AC5D00041000000000040000F0 -:10824000E00300009C5D000401C05EE50C0053E10A -:108250000330DE370C30DE2783C08EE01CFF2FE1B9 -:10826000E0A90200003400803F1F000000300080C1 -:1082700000403000002100807C1700004400000016 -:1082800002004000C42000806C5D0004F45D000426 -:1082900019740200F85D0004AD010000FC5D0004EB -:1082A000DD74020004F01FE5011100C004F01FE5B9 -:1082B0007B5B00C004F01FE5E13000C004F01FE567 -:1082C000B92D00C004F01FE5E16600C004F01FE511 -:1082D000B96700C004F01FE5FB6900C004F01FE5AA -:1082E000256A00C004F01FE5AD2300C004F01FE5BF -:1082F0007D1800C004F01FE5CF3500C004F01FE575 -:108300002F3100C004F01FE53F7800C004F01FE5E6 -:10831000097800C004F01FE5697100C004F01FE592 -:108320009B6F00C004F01FE5597000C004F01FE50A -:108330003F7000C004F01FE53DDB00C004F01FE506 -:10834000711700C004F01FE5657000C004F01FE560 -:10835000E16500C004F01FE5A52600C004F01FE59C -:10836000E33000C004F01FE5215C00C004F01FE50D -:108370005F5C00C004F01FE5F9BF00C004F01FE51A -:10838000C91200C004F01FE52F9500C004F01FE5DE -:10839000055C00C004F01FE57F1500C004F01FE578 -:1083A000C71600C004F01FE5071800C004F01FE561 -:1083B000DBBD00C004F01FE5E37D00C004F01FE555 -:1083C000997500C004F01FE5571800C004F01FE5C0 -:1083D0009F1100C004F01FE5916E00C004F01FE57E -:1083E0007F3200C004F01FE5678500C004F01FE580 -:1083F000EDBA00C004F01FE54F8800C004F01FE58F -:10840000675B00C004F01FE5733200C004F01FE595 -:10841000EFC800C004F01FE52FAE00C004F01FE558 -:1084200051B200C004F01FE58D2600C004F01FE526 -:10843000C9B200C004F01FE543B100C004F01FE55D -:10844000D15C00C004F01FE5A77000C004F01FE578 -:10845000797800C004F01FE58D6400C004F01FE5CA -:108460002D6600C004F01FE5516400C004F01FE554 -:108470009B2E00C004F01FE5B31800C004F01FE5F8 -:108480006BC000C004F01FE511C300C004F01FE57D -:108490009DC100C004F01FE5995B00C004F01FE51A -:1084A000CD9D00C004F01FE5419B00C004F01FE516 -:1084B0006D9B00C004F01FE5797000C004F01FE55B -:1084C000411800C004F01FE5BD6900C004F01FE5BD -:1084D000C57000C004F01FE5E97000C004F01FE59E -:1084E000551A00C004F01FE5B7A000C004F01FE556 -:1084F000FDB102C004F01FE5AFB600C004F01FE5F7 -:10850000B5B600C004F01FE5CF7200C004F01FE54F -:10851000D37700C004F01FE5911700C004F01FE5F9 -:10852000CD9400C004F01FE5939400C004F01FE553 -:10853000CD5D00C004F01FE5F39E00C004F01FE510 -:10854000599A00C004F01FE5EB9E00C004F01FE53F -:10855000819E00C004F01FE5BBB900C004F01FE518 -:10856000BDD700C004F01FE5E9DA00C004F01FE544 -:10857000792E00C004F01FE5D7D900C004F01FE534 -:10858000136300C004F01FE5299600C004F01FE546 -:10859000AD1600C004F01FE5597300C004F01FE5DC -:1085A0008D2300C004F01FE55D2600C004F01FE528 -:1085B0005F7200C004F01FE5DB7700C004F01FE528 -:1085C000E55B00C004F01FE53B3200C004F01FE58E -:1085D00015DB00C004F01FE519D900C004F01FE549 -:1085E0008FDA00C004F01FE5E1D900C0A24CA03230 -:1085F00001000000847902009C03000072D41C9FDB -:10860000FFB581B007240E001F000C570025F1F7BD -:10861000EDFA00280DD0019D2100F8352800E3F780 -:1086200025FD287C002801D0EC6801E06124E443AA -:1086300001253C600A990B20305608603968411AC0 -:1086400003980160280005B0F0BD000010402DE93E -:10865000E4E8FFEB0010A0E3001080E51040BDE867 -:108660001EFF2FE1FFFFFFFFFFFF000034030000AC -:1086700067060000CD0C0000001000009A190000F1 -:108680009A19000000200000002000003433000090 -:1086900000400000004000005655000067660000E2 -:1086A000C771000000800000008000007800820098 -:1086B000C000C800F000040180019001B801080268 -:1086C0007601A00FA00FAC0D100EAC0DAC0DB80BC9 -:1086D000B80BB80BB80BB80B0D2808050D19080519 -:1086E0000D0D080F28140F0F1E140F0F0F14142850 -:1086F0001914142819141414190000002449643A98 -:108700002077383830312D42302C205246383738D7 -:10871000582C20465036382C2031342E36382E3303 -:10872000362E70313720240052433A202C207968AD -:108730006F752C20323031342F30312F32312C20D4 -:1087400031313A33363A333800000000000000007F -:1087500001000000000000000306070A0D0B0C0ECC -:108760001013171B1C1E0B0C0D13171B1C1D0B0BC2 -:108770000E1013171B1C1D00010205060916070F1A -:108780000910110C121203170A18191A151B0E08DA -:108790000B13141C1D1E1E00EFDFFF7FEEDFFF7F9B -:1087A000ECDFFF7FC89FBF7F001C3F7FE8DFFF7FBC -:1087B000C09FBF7F809FBF7F001F3F7F001E3F7F06 -:1087C000001C3E7F00183C7E00103C7E00000078BC -:1087D000FEFEFEFEFEFEFEFE00FEFEFEFEFE0E0E97 -:1087E0000E0E0E0E0E0F10111213141501020003BF -:1087F00004050607506F9A0A776C616E007364690E -:108800006F004F5341004449524543542D0000002E -:108810001C7D02001C7D0200C42C000084000000AE -:108820006802000468020004545A0000840000003A -:10883000000000C0000000C0001100008400000023 -:10884000442001C0442001C02450010084000000E5 -:10885000000000000000000075020000040000009D -:10886000750200000600000075020000070000000D -:1088700055AA30000C000000090300000F000000A2 -:108880000903000010000000EF02000011000000CA -:10889000FB030000160000000000000000000000C4 -:1088A00000000000000000000000000000000000C8 -:1088B00000000000000000000000000000000000B8 -:1088C00000000000000000000000000000000000A8 -:1088D0000000000000000000000000000000000098 -:1088E0000000000000000000000000000000000088 -:1088F0000000000001000000000000000000000077 -:108900000000000000000000000000000000000067 -:108910000000000000000000000000000000000156 -:1089200000000000817B02000001008060010080E7 -:108930006201008000000000000000000000000054 -:108940000000000001000000000000000000000026 -:108950000000000000000000000000000000000017 +:1081F000900F07EE1EFF2FE1E0009FE50010E0E387 +:108200000C1080E5D4009FE5E4109FE5081080E5A0 +:10821000E0009FE5001090E5081081E3001080E584 +:10822000001090E5081011E2FCFFFF0A900F07EE26 +:108230001EFF2FE1100F11EE1EFF2FE1100F01EEB8 +:108240001EFF2FE1010050E2FDFFFF1A1EFF2FE18C +:10825000A4109FE5A520A0E30000A0E3040081E4B2 +:10826000012052E2FCFFFF1A90009FE590109FE56D +:10827000001080E58C009FE58C109FE5001080E5E4 +:1082800088009FE588109FE5001080E51EFF2FE124 +:1082900000000FE11F0000E2120050E30100A00304 +:1082A0000000A0131EFF2FE1AC5D000410000000D1 +:1082B00000040000E00300009C5D000401C05EE5D6 +:1082C0000C0053E10330DE370C30DE2783C08EE034 +:1082D0001CFF2FE174AA0200003400803F1F000041 +:1082E0000030008000403000002100807C1700003A +:1082F0004400000002004000C42000806C5D0004C7 +:10830000F45D00048D740200F85D0004AD0100000E +:10831000FC5D00045175020004F01FE5011100C06E +:1083200004F01FE5655C00C004F01FE5253100C0C6 +:1083300004F01FE5952D00C004F01FE5AD6700C0F7 +:1083400004F01FE5856800C004F01FE5CF6A00C097 +:1083500004F01FE5F96A00C004F01FE56F2300C0B8 +:1083600004F01FE5751800C004F01FE5133600C0C7 +:1083700004F01FE5733100C004F01FE5497900C027 +:1083800004F01FE5017900C004F01FE53D7200C054 +:1083900004F01FE56F7000C004F01FE52D7100C0F0 +:1083A00004F01FE5137100C004F01FE585DD00C077 +:1083B00004F01FE56F1700C004F01FE5397100C01D +:1083C00004F01FE5AD6600C004F01FE5772600C08D +:1083D00004F01FE5273100C004F01FE50B5D00C06D +:1083E00004F01FE5495D00C004F01FE509C200C0AC +:1083F00004F01FE5C91200C004F01FE56F9600C02D +:1084000004F01FE57900000404F01FE5EF5C00C0F4 +:1084100004F01FE57F1500C004F01FE5C71600C07B +:1084200004F01FE5051800C004F01FE5EDBF00C013 +:1084300004F01FE5E57E00C004F01FE5717600C082 +:1084400004F01FE54F1800C004F01FE59F1100C0A5 +:1084500004F01FE5656F00C004F01FE5C33200C0E3 +:1084600004F01FE5638600C004F01FE501BD00C0F5 +:1084700004F01FE54F8900C004F01FE5515C00C007 +:1084800004F01FE5B73200C004F01FE5FFCA00C0CA +:1084900004F01FE52FB000C004F01FE551B400C088 +:1084A00004F01FE55F2600C004F01FE5C9B400C05A +:1084B00004F01FE543B300C004F01FE56B5D00C08E +:1084C00004F01FE57B7100C004F01FE5717900C066 +:1084D00004F01FE5596500C004F01FE5F96600C00F +:1084E00004F01FE51D6500C004F01FE5772E00C0F5 +:1084F00004F01FE5AB1800C004F01FE57BC200C00C +:1085000004F01FE521C500C004F01FE5ADC300C0A5 +:1085100004F01FE5835C00C004F01FE5ABA000C0C1 +:1085200004F01FE5ED9D00C004F01FE5199E00C09A +:1085300004F01FE54D7100C004F01FE5391800C0BC +:1085400004F01FE5916A00C004F01FE5997100C0B6 +:1085500004F01FE5BD7100C004F01FE5A1A300C039 +:1085600004F01FE501B202C004F01FE5AFB800C07F +:1085700004F01FE5B5B800C004F01FE5A37300C008 +:1085800004F01FE5CB7800C004F01FE58F1700C092 +:1085900004F01FE50D9600C004F01FE5D39500C060 +:1085A00004F01FE5995E00C004F01FE5E9A100C0DA +:1085B00004F01FE5DF9C00C004F01FE5E1A100C04E +:1085C00004F01FE577A100C004F01FE5CDBB00C09B +:1085D00004F01FE58B00000404F01FE575010004A2 +:1085E00004F01FE515DA00C004F01FE5B56BA4C365 +:1085F0000100000084790200FC030000492ECA3B00 +:1086000031DD00C004F01FE5552E00C004F01FE569 +:1086100027DC00C004F01FE5DF6300C004F01FE5A5 +:108620007F9700C004F01FE5AD1600C004F01FE501 +:108630002D7400C004F01FE54F2300C004F01FE5B7 +:108640002F2600C004F01FE5337300C004F01FE5BF +:10865000D37800C004F01FE5CF5C00C004F01FE534 +:108660007F3200C004F01FE55DDD00C004F01FE5AF +:1086700071DB00C004F01FE5D9DC00C004F01FE589 +:1086800031DC00C0FFB581B007240E001F000C577D +:108690000025F1F77BF900280DD0019D2100D03590 +:1086A0002800E3F79FFB287C002801D0EC6801E05C +:1086B0006124E44301253C600A990B203056086090 +:1086C0003968411A03980160280005B0F0BD000028 +:1086D00010402DE931E8FFEB0010A0E3001080E529 +:1086E0001040BDE81EFF2FE1FFFFFFFFFFFF00006E +:1086F0003403000067060000CD0C000000100000ED +:108700009A1900009A1900000020000000200000C3 +:1087100034330000004000000040000056550000C7 +:1087200067660000C7710000008000000080000044 +:1087300078008200C000C800F000040180019001B0 +:10874000B80108027601A00FA00FAC0D100EAC0D01 +:10875000AC0DB80BB80BB80BB80BB80B0D2808054F +:108760000D1908050D0D080F28140F0F1E140F0FFB +:108770000F141428191414281914141419000000C3 +:1087800000000000000000000000000000000000E9 +:108790000000000000000000000000002449643ACE +:1087A0002077383830312D42302C205246385858F6 +:1087B000582C20465036382C2031342E36382E3363 +:1087C000362E7032303120240052433A202C20794A +:1087D000686F752C20323031342F31312F32312CEB +:1087E0002032303A32383A353300000000000000C1 +:1087F00001000000000000000306070A0D0B0C0E2C +:108800001013171B1C1E0B0C0D13171B1C1D0B0B21 +:108810000E1013171B1C1D00010205060916070F79 +:108820000910110C121203170A18191A151B0E0839 +:108830000B13141C1D1E1E00EFDFFF7FEEDFFF7FFA +:10884000ECDFFF7FC89FBF7F001C3F7FE8DFFF7F1B +:10885000C09FBF7F809FBF7F001F3F7F001E3F7F65 +:10886000001C3E7F00183C7E00103C7E000000781B +:10887000FEFEFEFEFEFEFEFE00FEFEFEFEFE0E0EF6 +:108880000E0E0E0E0E0F101112131415010200031E +:1088900004050607506F9A0A776C616E007364696D +:1088A0006F004F5341004449524543542D0000008E +:1088B0007C7D02007C7D0200F82C0000840000001A +:1088C0009806000498060004285600008400000062 +:1088D000000000C0000000C0001100008400000083 +:1088E000242401C0242401C04C4A0100840000005B +:1088F00000000000000000007502000004000000FD +:10890000750200000600000075020000070000006C +:1089100055AA30000C000000090300000F00000001 +:108920000903000010000000EF0200001100000029 +:10893000FB03000016000000000000000000000023 +:108940000000000000000000000000000000000027 +:108950000000000001000000000000000000000016 :108960000000000000000000000000000000000007 -:1089700000000000000000000000000000000000F7 -:1089800000000000000000000000000000000000E7 -:108990000000000000000000D1F44FFA01000000C8 -:1089A000000000046C0200009A563B20000000000A +:1089700000000000000000000000000000000001F6 +:1089800000000000217C02000001008060010080E6 +:1089900062010080000000000000000000000000F4 +:1089A00000000000010000000000000000000000C6 :1089B00000000000000000000000000000000000B7 :1089C00000000000000000000000000000000000A7 -:1089D0000000000000000000010000000000000096 -:1089E00000000000604B0004F007100001000000D0 -:1089F0000000000000000000984B0004EC07040099 -:108A0000010000000000000000000000D04B000446 -:108A10003C03040002000000000000000000000011 -:108A2000084C0004E0010300404C0004D40304009F -:108A3000010000000000000000000000784C00046D -:108A4000EC07010001000000000000000000000031 -:108A5000B04C0004EC07010003000000000000001F -:108A600000000000E84C0004DC010500204D00047B -:108A700024070100584D00041C0000000100000004 -:108A80000000000000000000904D0004EC07010011 -:108A9000010000000000000000000000C84D0004BC -:108AA00010020100010000000000000000000000B2 -:108AB000004E0004EC07030001000000000000006D -:108AC00000000000384E00043C000A0001000000D5 -:108AD0000000000000000000704E00041C040300B1 -:108AE000010000000000000000000000A84E00048B -:108AF0001C04040001000000000000000000000051 -:108B0000E04E0004FC00080001000000000000002E -:108B100000000000184F0004C8030400000000001B -:108B20000000000000000000000000000000000045 -:108B3000040000000000000000000000040000002D -:108B40000C00000008000000080000000C000000FD -:108B50000000000000000000000000000000000015 -:108B600044A000804CA0008054A000805CA0008045 -:108B700064A000806CA0008074A000807CA00080B5 -:108B800034A000803CA000801CA0008024A00080B5 -:108B90002CA0008014A0008040A0008048A000808D -:108BA00050A0008058A0008060A0008068A00080D5 -:108BB00070A0008078A0008030A0008038A00080E5 -:108BC00018A0008020A0008028A0008010A00080B5 -:108BD000001F1F00280019000A00FFFF4407440778 -:108BE0000000000000000000000000000000000085 -:108BF00028230000282300009411000028230000EF -:108C000070170000B80B0000B80B0000B80B000094 -:108C100000010000135B1F3701000000001100C0BD -:108C200000040000A2EFCB2510B500240CF020EDCD -:108C30002E49C878EE28FCD1207888702B48641C17 -:108C4000001DC21D23780370641C401C9042F9D3A0 -:108C500003204004844203D10124A406AA200CE08E -:108C60002348844203D10324A407BB2005E0214804 -:108C7000844201D1CC2000E0FF20C870D9E71B4816 -:108C8000C078EE2800D1CFE7704770B50CF0F4EC57 -:108C9000194D6C6804E06068002800D080472468A3 -:108CA000002CF8D1FFF7EBFF2878401C0006000EDF -:108CB00028700CF0E6EC0CF0E8ECEAE70F4810B591 -:108CC0000CF0E6EC10BD10B504000CF0D2EC0A4B31 -:108CD00059680A0000E00968002902D0A142FAD1CF -:108CE00001E022605C600CF0D8EC10BD60010080F7 -:108CF00000400104003003C09CEF00C0AC3001C054 -:108D000010B5040073D0632120000CF0CAEC0820D9 -:108D1000207000206070FF20401DA070000AE070ED -:108D20000221002021716071FF20801D2072000A45 -:108D300060720020A172E072FF20C01DA073000AC3 -:108D4000E073002021746074FF2008302075000A51 -:108D50006075080AA175E0753C202076FF20173069 -:108D6000A076000AE076080A21776077FF222000CB -:108D7000183220300270120A42700A0A8170C270E2 -:108D8000FF2227328271120AC2710A0A01724272EC -:108D9000FF2228320273120A42730A0A8173C273D5 -:108DA000FF22293210308270120AC2700A0A017141 -:108DB0004271FF222A320272120A42720A0A817238 -:108DC000C272FF2225328273120AC273103010223F -:108DD0000270002203004270FF204A305034A0701D -:108DE000000AE070080A217132216071997510BD86 -:108DF0001521490140188089002800D001207047C2 -:108E0000FFB581B01D000F00C878897806020E43B7 -:108E100001990520C00109188C6A002C04D1FF4873 -:108E200088620400FFF76CFF607821780002084335 -:108E3000012D03D1F878B978000205E0022D05D1A3 -:108E4000F978BA7809021143084306E0032D07D1E7 -:108E5000F978BA780902114388432070000A6070DB -:108E600003983F1D001F029707043F0CD0E0042F1A -:108E700074D30299C8788A78000210434A780B7834 -:108E800011021943001DFF2300042533000CCA1AE8 -:108E9000994275D025DCE24BCA1A99425FD011DCA9 -:108EA000FF39491F45D001294DD0022969D1012D33 -:108EB00003D0022D3CD171073AD522006032210047 -:108EC00012318AE00F2A5DD0102AEFD1012D03D094 -:108ED000022DEFD1B106EFD522005B322100243103 -:108EE0007BE0042A64D00EDC022A56D0032ADDD1AE -:108EF000012D03D0022DDDD131067FD522005E3257 -:108F00002100303169E0052A5DD0252A75D1012D77 -:108F100003D0022D72D1310570D5210002980022B4 -:108F200056310CF0C2EB56210A5D019960310A708E -:108F300064E0012D03D0022D60D1F1075ED0220044 -:108F40005832A11D49E0012D03D0022D56D1B107A1 -:108F500054D522005A3221000C313EE05BE0012D55 -:108F600003D0022D4AD1310748D5210002980022B2 -:108F700018310CF09AEB0199227E4031CA773DE01E -:108F80002FE03AE0012D03D0022D37D1F10635D57F -:108F90002200593221001E311FE0012D03D0022D85 -:108FA0002CD171062AD522005C3221002A3114E02E -:108FB000012D03D0022D21D1F1051FD522005D32F4 -:108FC0002100363109E0012D03D0022D16D1B10563 -:108FD00014D522005F3221003C3102980CF064EB82 -:108FE0000CE0012D03D0022D08D1710506D521001A -:108FF000029842310CF05CEB00E03800874203D36A -:10900000391A0F043F0C00E000270299081802905B -:10901000002F00D02BE705B0F0BD0A000521C901E3 -:10902000401810B5A9A362C101000000FC1400C0E3 -:10903000000400005FA6A9FD816A901C002904D0ED -:1090400058220CF044EB562010BD002010BD70B526 -:109050000500059E049C0020002905D051780029B8 -:1090600000D10121197070BD19780029FBD0491E6B -:109070000906090E1970F6D15078002801D0187031 -:109080000FE0B00041190520C0010818806A0028CF -:1090900007D04178027809021143A1430170090AFF -:1090A0004170012070BD10B50C001100002C03D1DF -:1090B0001A04120C0CF00EEB10BDF1B582B0029840 -:1090C0000CF00CEB070402983F140CF00CEB0504B9 -:1090D0002D1400260299B00041180520C00108187F -:1090E000846A002C79D060782178000208438007D8 -:1090F00017D5217B0120B94200DD0020022100911B -:1091000023002200010002985A330C320196FFF727 -:109110009EFF002805D002983B001A223100FFF77D -:10912000C2FF6078217800020843800618D5242108 -:10913000095D0120B94200DA0020202100912300BE -:109140002200010002985B3324320196FFF77FFF73 -:10915000002805D002983B001D223100FFF7A3FF35 -:109160006078217800020843C00717D0A179012058 -:109170004942A94200DD00200121009123000100A5 -:1091800002985833A21D0196FFF761FF002805D011 -:1091900002982B0019223100FFF785FF60782178B3 -:1091A00000020843C00618D5A17F01204942A94208 -:1091B00000DA002010210091230022000100029813 -:1091C00059331E320196FFF742FF002805D002985E -:1091D0002B001C223100FFF766FF761C3606360E88 -:1091E000012E00D276E7FEBD114800221038C1687A -:1091F000002903D14178491C417000E04270C260EF -:109200007047F8B506000520C0013018846A002CAC -:109210003AD06078217800020843400534D5300008 -:109220000CF05CEA4034E178A2780902114303E0D3 -:1092300068F000C0070100005E4F0025884224DC72 -:109240007888401C0104090C798060792279000239 -:109250001043884218D87978884202D93889012881 -:1092600012D17D800CF00EEA7D700CF020EA152002 -:10927000400130183D818189012292021143818190 -:109280005104300001F0CBFCF8BD7D803D81F8BD7C -:1092900010B504000CF0F6E91521490161188C891C -:1092A00000228A810CF002EA200010BD0521020094 -:1092B000C9015118896A0020002906D04A780B7824 -:1092C00011021943090700D5012070470521C90182 -:1092D0004018806A002803D00021603041708170FE -:1092E000704770B5002033490400087048808880BA -:1092F000C88008810D00C860103548706320604345 -:109300004019FFF707FD641C012CF7D370BD002046 -:1093100010B50CF0ECE90521C9014018806A00285D -:109320000ED041780278090211430122D202914302 -:109330000170090A41701F4801784908490001700D -:1093400010BD0521C901411810B5896A002914D042 -:109350004A780B781102194309050ED51549097889 -:10936000C9070AD01521490141188A890123DB0266 -:109370001A438A81190401F052FC10BD15214901DC -:10938000411810B58A898A810121C90601F047FC7C -:1093900010BD0521C9014218916A002902D1054971 -:1093A000103191620B7E5F2240311354897D603011 -:1093B0000170704758F000C0F7B582B006000CF09D -:1093C0009AE98F218900070044180CF05CE922001B -:1093D000DC32050000922020C35D049A039930001E -:1093E0000CF08CE928000CF062E905B0F0BDFEB588 -:1093F00004000CF048E90700A020015BFB480CF0DA -:1094000082E90500022620000CF080E90C30010002 -:1094100040310A7D002A3DD00268002A3AD0521E0F -:10942000026019D1087D012808D9CE822100FF31C0 -:109430000222723162A464BB01000000F81800C06F -:10944000000400007F450177200009F022FC2BE09A -:10945000012806D1CA8A2100FF317231200009F0AB -:1094600046FA0121200009F0E4FC1DE0097D0329F2 -:109470001AD1AA4218D2007D00280ED16B46029064 -:10948000597A0200314359720190009002992000EC -:1094900035230CF04AE9002806D0FF207930015B23 -:1094A00001222000FFF792FFE27AA17A20000CF05F -:1094B00040E90400B1D138000CF002E9FEBD70B5FE -:1094C00098B0018946690D1830000CF01EE98F2113 -:1094D000890044182420005D01281BD169782A786E -:1094E0000902114328002C300C3903AA0CF024E99E -:1094F000A020815B200001222D306B4607C30B208A -:1095000080013018806B2300027B2533300003A9D3 -:109510000CF016E918B070BD08B5009169460CF062 -:1095200014E908BD10B50CF014E910BDF3B583B013 -:10953000050003260CF0B0E8029028000CF0E4E8E7 -:10954000FF220021713251551922520180180172F7 -:10955000AC480088002803D00CF0FEE801F037FC8E -:1095600028000CF0FEE82C00012720000CF0D8E8C1 -:109570004C300775E27AA17A20000CF0DAE804009A -:10958000F3D1049A00922A009F49A23228000323B3 -:109590000CF0EAE8401C00D1012602980CF090E89B -:1095A00030002CE770B50C0016001D00002801D01B -:1095B0000CF0DEE8182120000CF086E83D20207039 -:1095C000162060706878A070E07808210843FB21BD -:1095D000E0700840B1788907C90F89000843E0703E -:1095E0002978800880008906890F0843E07070BDE3 -:1095F000FEB504000CF094E8009020000CF084E824 -:109600000500207A022804D120000621A2300CF0A7 -:109610005CE80CF042E806000121200000E0012196 -:1096200009F007FCE27AA17A20000CF082E8002819 -:10963000F5D130000CF044E82600A03602E001200D -:109640000CF09AE8B07D0CF09CE80028F7D01320CD -:1096500040012E1802E001200CF08EE8F07A00287C -:10966000F9D10D208001281800690CF08EE82F0038 -:10967000203778780522D2010107A618002901DBDE -:1096800080061BD5E81DFF30FA30029040690028A3 -:1096900004D00CF07EE80299002048617878010738 -:1096A00001D480060AD52800803001900068002887 -:1096B00004D00CF06EE80199002002E0002029009F -:1096C00080310860F0607878C00908D030690028DF -:1096D00005D02920000120180CF05EE801E00020F0 -:1096E0003061E06804218843E06020002030417E42 -:1096F000F722114041760CF054E80CF056E80021B6 -:1097000002200CF056E80CF058E80CF05AE8009BE8 -:109710002A0029000833483264312800FFF742FF4D -:1097200020000CF052E8002802D00BF0B6EFFEE764 -:10973000207A022807D120000CF04AE8002802D045 -:109740000BF0AAEFFEE7B92080000122FF212018CC -:109750000CF042E80CF044E8002806D00CF044E895 -:10976000012102200CF024E80DE0002103200CF080 -:1097700040E800200CF040E8012103200CF040E814 -:1097800022491F2008620CF040E8FEBD10B509F028 -:1097900055FF10BDFEB505000BF0B6EF0400280024 -:1097A0000BF0BEEF07000E21601801900CF030E8BE -:1097B000060001980E210CF030E80100387A0B27E2 -:1097C00083071348BF01EF19BF6B22188F203F7B1F -:1097D00080009B0F2018002F4FD00027012B01D0B5 -:1097E000022B03D1002948D1022318E02B7A032B46 -:1097F00010D16B7A002B17D100293ED014E0000065 -:1098000088130000C43B01C060EB3100C0A00080A1 -:109810001D020000002930D0002E03D00123242196 -:109820000B5401E024210F54616C012927D1210040 -:1098300020310D00009749780B0702D5890607D51E -:1098400001E08B060267E8C501000000F41C00C0BF -:1098500000040000F8130F2502D5EC21095903E09C -:10986000090702D5EA21095D009169788B070ED4BA -:109870000B0701D4890603D56B461978090706D56D -:10988000616A002903D020300079002801D100202E -:10989000FEBD606A012803D1D07840084000D07036 -:1098A0000120FEBD70B50C001600457822680178D5 -:1098B0001170090A5170226841789170090AD170BB -:1098C000236842781B1D811C2D1D18000BF012EF20 -:1098D00020684019206070783178000208434019F0 -:1098E0003070000A707070BDF8B50F000BF016EF05 -:1098F000050038000BF00EEF05260400F601AD1947 -:109900001AE0207A022804D020000BF094EF0028FF -:109910000DD020000BF092EF002808D020000BF0B3 -:10992000FEEE80198068A968884200D9A8603900D5 -:1099300020000BF088EF0400002CE2D1F8BD10B538 -:1099400004000221FFF7D0FF03212000FFF7CCFF26 -:1099500010BD70B50BF07AEF002801D1012400E0B2 -:10996000002402200BF0D6EE0AE028000BF066EF90 -:10997000012801D1002408E0297A28000BF062EFC9 -:109980000500012C01D1002DEFD102200BF062EF78 -:10999000012C07D1002805D0FF306130007C002861 -:1099A00000D00024200070BDF0B5040087B00BF09B -:1099B000C2EE070020000BF0B2EE01906430009080 -:1099C00001989B21890046183D0008352000FFF7CB -:1099D000C0FF012811D1207A03280CD1607A022817 -:1099E00009D120000BF03AEF252252018218797A32 -:1099F000C0301177817407B0F0BD03A904A805F049 -:109A0000E3F80B21890161180691896B03980873AB -:109A1000787201980E210E300BF008EF6B46197C1E -:109A20008F072978BF0F8A07920F974209D18909BA -:109A3000012927D13900014303D0012F22D1002869 -:109A400020D020000BF076EE017ABB078908890050 -:109A50009B0F194389060268890E01720020D07796 -:109A6000FE200E219077501805900BF038EE012F54 -:109A700001D0022F03D105980AF05DF802E00598A5 -:109A80000BF0F0EE207A03280CD1607A022809D17D -:109A900020000BF0E4EE2522520182180399C03019 -:109AA00011778174B07880072BD56B46187C8006BF -:109AB000800F14D10098C078810704D180080099E4 -:109AC0008000401CC8700C2002A90BF0D0EE069953 -:109AD0000300896B009A097B04A80BF0CCEE287870 -:109AE000CF2108406B46197C8906890F090108437C -:109AF0002870187C8006800F03D1B078FD210840C3 -:109B0000B0700698816B2878487306998006896B37 -:109B1000800E48736FE7F0B5002689B00500049603 -:109B20000BF0FCED040028000BF004EE0290687AC4 -:109B300002287ED18F20800027182800FFF734FFED -:109B4000042101200BF09AEE00280FD12800FFF726 -:109B50002BFE01280AD12800297AA2300229089078 -:109B600011D128000BF08EEE002802D0002009B0A1 -:109B7000F0BD287A022806D12100FF31089806227C -:109B8000F3310BF0B8EDFF480088002803D00BF04C -:109B9000EEED01F026F90BF012EE002102200BF0A1 -:109BA00012EE0BF014EEF848416A042211434162B0 -:109BB00028000BF06CEE2120005D39000007FF311A -:109BC000C00F09310BF066EE0BF0F4ED0B208001B5 -:109BD0002E18B06B0022407B0190B06B017B019886 -:109BE00004F08DFF04F0DDFFB06B0122017B280043 -:109BF0000BF054EE0E21601807900BF054EE2A0083 -:109C0000613201060092090E0022079813000691A6 -:109C10000BF04CEE0300069A0799280005F016F8A1 -:109C20009B21029B890062180833210064312000C7 -:109C300000E01AE10593FFF7BFFC1321490160180A -:109C4000807B800730D587208000005D00283ED0D3 -:109C50000298007A204B06A301000000F02000C00B -:109C600000040000F6A6A24C80072CD11D2149015A -:109C700060180379580707D420006030C179FB22AF -:109C8000890889001140C1719807800F0FD0290001 -:109C9000A031012821D0022809D108888102C048BA -:109CA0000BF04EED0522D201401CA11888600BF08C -:109CB000ACED002802D02800FFF74BFE8720800083 -:109CC000005D00280DD01D21490160180179FB229B -:109CD000114089088900491C0BE008888102B148BD -:109CE000DEE71D214901601801790422114389082A -:109CF0008900017129002031087EFE2812D002005F -:109D00000E3A072A05D86722125D520701D509309D -:109D100006E0162806D96722125D520702D40938D8 -:109D20000876A0770BF0D0EDB16B0020C873280047 -:109D30000BF0CEED002800D0FEE7280080300600B2 -:109D4000C06BAC210181082128000BF0C6ED280072 -:109D5000C0304068AC210181052128000BF0BCED2A -:109D600028000BF0BEED28000BF0BEED28000BF034 -:109D7000C0ED089902200BF050ED2800B17F7E3035 -:109D80000BF0BAED01200BF04CED0022FF213A312F -:109D90002800130008F015F90022FF217C3128006B -:109DA000130008F00EF9606A002806D028000BF0B6 -:109DB000A8ED002801D10BF0A8ED0BF0AAED0021D1 -:109DC00002200BF032ED0BF024ED012102200BF00C -:109DD00004ED0BF02EEDFF2291322E2303A904A8EF -:109DE0000BF09AED002849D0039801001831019139 -:109DF000616C012906D1020038000A32303001A915 -:109E0000FFF75AFD1120039A4001201800780A320A -:109E100001A90BF086ED606A012806D1039A2000A3 -:109E20000A32283001A9FFF747FD0198FF212B31A5 -:109E30000170090A4170022200218270C1700599E7 -:109E4000001D0BF062EC0398C17A837A0A02019933 -:109E50001A43CB788C781B022343D218121D8272CE -:109E6000120AC272C8788A7800021043091D40188D -:109E70000190049A089928000BF056ED0126300055 -:109E80007FE60B0010B5018909180C0020342278F8 -:109E90004069032A0ED0042A11D0082A2DD07F2A27 -:109EA00007D1002805D0027A032A02D17F220BF0C5 -:109EB00040ED10BD0A0021000BF03EED10BD6278B0 -:109EC0000B2A0BD006DC002A0BD0092A0ED00A2A56 -:109ED000F4D103E00C2A01D00D2AEFD10BF030EDC4 -:109EE00010BD0A0021000BF030ED10BD0028FCD0A1 -:109EF000027A032AF9D10922D9E70A0021000BF0DE -:109F000028ED10BD10B50B78002B0AD05B1E1B0688 -:109F10001B0E0B7005D1D178DF231940D1700BF0E7 -:109F20001CED10BDF3B581B00E0001980BF000ECF4 -:109F3000050001980BF008EC8F2080002F18872077 -:109F40008000405D002812D03C002034A07C8007B7 -:109F50000DD50BF0B6EB012E009009D1F86C00285E -:109F600002D1207B002826D000980BF0BEEBFEBD6E -:109F7000002E20D101980BF0DCEB8F2189004718CF -:109F8000FF30FF30801C0189C089414306484843A7 -:109F90000199A031098809E0C43B01C000A80080F4 -:109FA000002F6859404B4C0040420F0089020BF0D3 -:109FB000C8EB401CF86400980BF096EB6035E8792C -:109FC0004007C00FB042D2D0A07C8007CFD5019807 -:109FD000C17A807A0BF0C4EC04000BF0B6EBE9799F -:109FE000FB221140F207520F1143012EE97107D1F4 -:109FF000007A890889008006800F0143E97102E038 -:10A0000088088000E87101980BF0AEEC0EE0E06883 -:10A01000C00405D520000BF0ACEC20000BF0ACEC3C -:10A02000E27AA17A20000BF098EB0400002CEED12C -:10A03000FEBDFFB597B000252E0017982F00007ABF -:10A040002C00022801D003280CD117980BF070EBDC -:10A050008F218900050046182420875D17980BF092 -:10A0600074EB04004B1F5EB701000000EC2400C03D -:10A0700000040000DC280BD5199918980C39090444 -:10A080000C30090C02AA0BF076EB209A0A99D278D0 -:10A0900010989306DB0F002902D1022F08D102E0AD -:10A0A0008978C90704D1002802D00079C00614D5E8 -:10A0B000202002432098C2709006C00F984202D020 -:10A0C00017980BF054EC1A98FF4B810222985843D2 -:10A0D0000BF040EB2199401C0870203630790228A3 -:10A0E00060D087208000405D01285BD113204001B3 -:10A0F0002818807B800755D5002001906035864662 -:10A10000A879217A050089060600890F012903D163 -:10A11000C21EC41D011D02E0C21FC41C011F002776 -:10A12000002A8C4600DB1700079A002A13D0079AF2 -:10A130009378BB420FDBA3420DDC0F9A002A09D0B3 -:10A140000F9A9278920701D51E0007E00F9AD278F5 -:10A15000520603D51D000F9A002A11D0109AD37809 -:10A160009A070DD00322D2439343012B00D104223E -:10A17000109B9B789A18BA4202DBA24200DC1100C5 -:10A18000B04201D1A84201D0012086468C4501D0C1 -:10A190000120019001997046084303D017980021CF -:10A1A000FFF7CAFE1BB0F0BD3EB5018945690C182A -:10A1B00028000BF0C8EA01008F2080000818496CC5 -:10A1C000002910D0010001222E3125306B4607C333 -:10A1D000A020435B6078217802020A4321002031ED -:10A1E0002800FFF730FF3EBD70B506000BF0AAEA6D -:10A1F0008F21890044180BF06EEAE16C05000029FC -:10A2000006D0491EE16403D101213000FFF794FE1E -:10A2100028000BF074EA70BD10B50BF094EA8F21A2 -:10A22000890040182030C17B49084900C17310BD26 -:10A2300070B505001C200C00088130343C21200042 -:10A240000BF0A8EB8035A86B002808D000692061CE -:10A25000A86B40696061A86BC0780002608070BD27 -:10A26000F7B50125088944180098007A02280ED015 -:10A2700003280AD10098407A012801D0022804D18D -:10A28000009821000BF08AEB00252800FEBD009805 -:10A290000BF058EA8F218900461807002F20805DB7 -:10A2A0000028F2D1009821000BF07CEB0128ECD1C2 -:10A2B0003300210000982F3300220C310BF076EB95 -:10A2C0000500E2D1FF37A078FF37BF1C020901204B -:10A2D000B96990400142D8D00098E52221000BF0E6 -:10A2E0006AEBD2E710B500240BF038EA007A800957 -:10A2F000012800D10124200010BDF8B507000BF0A3 -:10A3000022EA040000260BF05AEB0D2801D90D209B -:10A3100001E00BF054EB05062D163800FFF7E2FFC5 -:10A32000002813D000212D1F8420025D0CE0C800FE -:10A33000401A0019FF306130407B052803D3A84242 -:10A3400001DC012602E0491C8A42F0D83000F8BD49 -:10A35000F8B5002506000BF0F6E9040030000BF01C -:10A36000FEE907003000FFF7BDFF002803D0FF2003 -:10A370006D30005D00E0387A4A21095D8007800F6A -:10A3800089070DD500280BD1FF34FF34A41C207F92 -:10A39000002804D13000FFF7B0FF002800D00125CD -:10A3A0002800F8BDF1B582B002980BF0CCE90500A9 -:10A3B00002980BF0D4E9040028004830019002987C -:10A3C0000BF000EB84214F5D404E0020012F10D98F -:10A3D00001220CE00A210A235143434389199B19A6 -:10A3E00009891B89994201D21006000E521C97421E -:10A3F000F0D80A2358430B23811949786172029AD5 -:10A400009B01D718BA6B60351173217A325C8908C9 -:10A4100092078900920F11432172305CF3220007EA -:10A42000800F114080000143CF2001402172E87964 -:10A4300080088000E8710198807880071FD50BF0B4 -:10A44000BEEA0D2801D90D2001E00BF0B8EA0106A3 -:10A45000207A0916800706D1B86B007B052802D345 -:10A46000091F884204DDE87980088000401CE871FB -:10A47000B86B21006063CA3F01000000E82800C0FB -:10A4800000040000FCCBA35F027B0298083104F0BB -:10A490003FFBB96B207A4873B96B8006800E487316 -:10A4A000FEBDF0B5040085B00BF056E90290200027 -:10A4B0000BF05EE90B21890161180491896B0C2274 -:10A4C0008A560025111D0191111F009104492E008B -:10A4D0002C008031897BAE46AC4603E040420F0041 -:10A4E000143B01C003912FE00A216143FB4BD71EAF -:10A4F000CB185978B94210DBD71DB9420DDC914217 -:10A5000002D0DF79BF0705D1019FB94203D0DF79BF -:10A510007F0700D501251F89BE19D71FB94211DB5E -:10A52000D71CB9420EDC914202D0DF79BF0705D1BA -:10A53000009FB94204D0D979490701D501218E463F -:10A5400019898C440399641CA142CDDC017A8A06E6 -:10A55000920F11D1CF22754506D1114001226645D7 -:10A5600000D30322120105E0002D02D11140103169 -:10A5700001E0302211430172029A017AFF32FF3268 -:10A58000921C137F89061D22890F5201002B12D0C5 -:10A59000012902D1002D0ED004E003290BD1714610 -:10A5A000002908D00299FB2389180A7992089200A1 -:10A5B000921C1A4006E00299042389180A7992082D -:10A5C00092001A430A710499007A896B48730499BE -:10A5D0008006896B800E487305B0F0BD10B504008D -:10A5E000FFF78AFE002802D02000FFF7E5FE2000DA -:10A5F000FFF7B8FE002802D02000FFF752FF10BD81 -:10A60000F3B583B00E0003980BF0A6E8FA20805D46 -:10A6100064235843FF210BF0A8E8317C0A235943F7 -:10A62000AE4C40188034217BAC4F5943C919088186 -:10A630000398FFF797FE002869D0002564E01320F7 -:10A640006843801912300BF0CCE9010015310291FA -:10A6500041780278080210430C380206120E029963 -:10A66000032001920BF0C0E9002807D0217B0A23C8 -:10A6700059438078C9194978884244D1019A02998E -:10A680002D200BF0B2E9002802D0C178490609D587 -:10A69000217B0A2359430123C919CA791A43002887 -:10A6A000CA710AD08078800707D5207B0A235843D7 -:10A6B0000222C019C1791143C171019A02993D204A -:10A6C0000BF092E900281ED0C1788A071BD08907B9 -:10A6D000890F0129817801D1091D00E0091FA27BA2 -:10A6E00000200EE00A234343DB195B788B4207D13D -:10A6F0000A2358430422C019C1791143C17102E0F1 -:10A70000401C8242EED86D1C307CA84297D8207B3A -:10A71000401C0006000E2073A17B8842039802D2E1 -:10A7200000F091FA58E7FFF759FF0398FFF711FA85 -:10A73000012801D0012100E00021627B0398FEF78F -:10A7400013FF49E770B5654E340080342CE0A57BDB -:10A75000002206E00A2353439B195B78834202D010 -:10A76000521C9542F6D8954207D90A235A439219AA -:10A7700093785B085B00937015E00A226A430A2312 -:10A7800092195070A57B6E226B4300259B195A715C -:10A790009D71A57B0A236B439B19DA7000221A7105 -:10A7A000A27B521CA273401C8842D0D970BDF3B565 -:10A7B00085B005980AF0D0EF070005980AF0D8EFA9 -:10A7C0008F2189000490781803900020029043485C -:10A7D00090210AF0A2EF0598FFF78EFD3F4E8036DC -:10A7E000002825D000243D00803510E0E000001B4B -:10A7F000C119B07B0A235843384AFF3180186D31A4 -:10A8000007220AF096EFB07B401C641CB0732879D5 -:10A81000A042EBD82879012803D10598FFF7CCFD99 -:10A8200006E005990B22002092018918896B0873B4 -:10A830000598FFF797FD002849D001250BF0C8E8DF -:10A840000406241605980194FFF756FD00281BD036 -:10A8500000208421C95D8C4613E0C100091ACA1981 -:10A86000FF216E31525611000B39A14200DB21004D -:10A870000C0624160B32AA4200DC2A0015062D16FF -:10A88000401C8445A1B0DDA301000000E42C00C001 -:10A89000000400007B9DAD0DE9D814E0049B0499F1 -:10A8A0001B7A092008560B219B060A009B0F012BDF -:10A8B00000D00722032B00D0072182181506401A6A -:10A8C0002D160406241601998D4200DC2900012072 -:10A8D000012C00DB200009060006090E000EFFF720 -:10A8E0003BFFB07B012805D8029807B0F0BD0000FF -:10A8F000143B01C00698707303980221E030017385 -:10A90000059800F0AAF901200290EEE7F8B50024BE -:10A910000600C068C00428D530000AF034EF0700F4 -:10A920000C3730000AF022EF05006037B88A0028A3 -:10A9300000D101240AF0E2EE112149016A180090C9 -:10A9400091880120012900D30800012CB88209D187 -:10A95000D088C00706D0FF207930815B012230000B -:10A96000FEF766FD00980AF0DEEEF8BDF8B50600C9 -:10A970000F000AF0FCEE050030000AF004EF0400BE -:10A980000C3430000AF08AFE00280BD06034A08A14 -:10A99000002807D0112040012818C088384201D073 -:10A9A0000120F8BD0020F8BDF8B506000AF0EAEE77 -:10A9B000040030000AF0DAEE0500F0680C34C00440 -:10A9C00025D50AF09CEE0700A06F00281CD060344B -:10A9D000A08A002818D0401E0004000CA08213D1C9 -:10A9E000112040012818C088C0070DD030000BF09E -:10A9F0000AE8FF257935A95B002801D0002200E094 -:10AA000001223000FEF714FD38000AF08CEEF8BD8C -:10AA100010B50AF0B8EE04000C340AF070EE002114 -:10AA2000A1676034A1820AF07EEE10BD89780A0722 -:10AA3000920F022A04D10B09042B07D00C2B05D04E -:10AA4000012A02D109090A2900D05FE7704770B5D1 -:10AA500004000AF098EE20000AF088EE1121490166 -:10AA600040188088002814D00AF048EE0500200025 -:10AA70000AF014FE002802D02000FFF795FF2800FE -:10AA80000AF050EEE27AA17A20000AF084EE040087 -:10AA9000EAD170BD70B504000AF068EE0500200030 -:10AAA0000AF0B4EF0D21890168180179002902D05C -:10AAB00000690AF09CEE20000AF064EE6030007835 -:10AAC000032802D120000AF0A6EFE27AA17A200042 -:10AAD0000AF060EE0400EED1032000022818007C8A -:10AAE000002805D00520C0012818C0680AF07EEEB5 -:10AAF0000AF0A8EE04000AF092EF84421BD15D48F0 -:10AB00000088002801D00AF05AEE0AF080EE0AF020 -:10AB100086EE0AF088EF00200AF0A0EE0121032063 -:10AB20000AF0A0EE54491F200862002103200AF019 -:10AB300072EE0AF09CEE70BDF8B504000AF016EE55 -:10AB400005000AF080EE06000AF068EF864221D187 -:10AB50000AF05CEE002102200AF05CEE0AF05EEEE4 -:10AB60000AF064EF01200AF07AEE0AF0F0EE00211C -:10AB700002200AF078EE0AF06AEE012102200AF0C3 -:10AB80004AEE0AF074EE3B480088002802D020000C -:10AB90000AF050EF20000AF052EF2000FEF72CFFE1 -:10ABA0000B2080012018816B0022497B0091806B73 -:10ABB000017B009803F0CBFF04F01BF80D2080010F -:10ABC00028180079002809D03520002200012B1810 -:10ABD00000922A4A2A4821000AF034EFA320294E85 -:10ABE00080002F1820000AF0CEED0500B420005B95 -:10ABF000032807D10022009223483B0032002100A5 -:10AC00000AF020EF60352878032802D120000AF0EE -:10AC10001EEFE27AA17A20000AF0BCED0400E1D137 -:10AC2000F8BD70B505000E000024FEF7BAFE00283E -:10AC300005D031002800FFF7C4FD04000BD1280027 -:10AC4000FEF791FF012801D0012100E00021320030 -:10AC50002800FEF793FC200070BD0C4910B5097B5D -:10AC60000A230A4A5943803A8918094A07F018F812 -:10AC700010BD0000C43B01C0C0A00080008793034A -:10AC80005110010020A1070027B100C0943B01C072 -:10AC9000DDA000C04538154701000000E03000C0CD -:10ACA00000040000BD0CF24B7047F8B5002206000E -:10ACB0000F00FE4811000AF0D8EE040016D02089DB -:10ACC0000821051928000AF03CED290030000AF09F -:10ACD000D0EE291D38000AF0CCEEF5482200806A3B -:10ACE000042100230AF0C8EE002803D020000AF057 -:10ACF000C8EE0120F8BDEE4810B5C06A0AF0C4EEF7 -:10AD000010BDEB484178002902D000214170F2E7E4 -:10AD10007047B12820D010DC6F281DD006DC2B280E -:10AD20001AD02C2818D0402818D115E0A92813D003 -:10AD3000AA2811D0AF2811D10EE0CF280CD006DC04 -:10AD4000B22809D0B52807D0CE2807D104E0D028F2 -:10AD500002D0FF38213801D1012070470020704710 -:10AD600010B540690AF094EE002010BDF8B5070058 -:10AD70000D0000D1CF4DCE4E307800283ED0F46883 -:10AD800020202081203420790321490440180AF032 -:10AD9000C8ECC9480AF0C4EC60782278000210437D -:10ADA000210040040831400CFFF7B3FF002801D018 -:10ADB000FFF7A7FF0AF070EE002811D06078217825 -:10ADC00000020843BD49401805D0012803D00228DD -:10ADD00001D01B2804D102200AF062EE0AF064EED2 -:10ADE000F1680122487BB64B104348738D611C68A3 -:10ADF000002238690323A04700203070F8BD0020EE -:10AE000070474278017812020A43A949012A04D105 -:10AE1000C278837810021843488148897047A9484E -:10AE200010B500680AF044EEA74800680AF040EE4A -:10AE3000A64800680AF03CEE10BD10B50AF03CEEE2 -:10AE40000AF03EEE10BD10B501240AF0C2ECA04895 -:10AE50000178012905D10021017002200AF034EEA9 -:10AE60000024200010BDFEB50600012000900AF06D -:10AE700030EE002800D002200AF012EE040002207A -:10AE80000AF01AED050004D1022108000AF028EDAD -:10AE900005000AF022EE8F4F00280ED03888C00639 -:10AEA00002D4E068C00408D5707931790002084303 -:10AEB000052811D9884988420ED20AF012EE0028DE -:10AEC00002D0E068C00407D50AF002EE002846D0A0 -:10AED00038888005800F42D00AF01AEC0190707912 -:10AEE00031790002084301D07C490860F079B179DA -:10AEF0000002084301D07A490880F078B178000256 -:10AF0000084301D077490880714E3078002823D15A -:10AF10000AF0E2ED00280CD0E068C00409D53888BA -:10AF2000C00606D5002D11D0FF356135287C0728D5 -:10AF30000CD10AF0CEED00280ED038888005800FA5 -:10AF40000AD0FF346134207C072805D101203070FD -:10AF50000AF0BAED0020009001980AF0EEEB00989C -:10AF6000FEBDF8B504000120009048780E00097875 -:10AF700000020843BB2189000025671800280FD074 -:10AF800001280BD1207A002837D0012835D02100A4 -:10AF9000FF316131022809D0032816D0012548E08D -:10AFA00006223900B01C0AF0D8EB42E0087C0028E9 -:10AFB000F4D120000AF0E4EBFF300622B11CF3309C -:10AFC0000AF0CAEB002000901AE0607A022801D053 -:10AFD000012812D1087C0028E0D120000AF0D0EB33 -:10AFE000FF300622B11CF3300AF0B6EB2000062237 -:10AFF000B11CA2300AF0B0EB02E0E068C004CDD48E -:10B000000622B11C38000AF0A8EB08F031F900283C -:10B0100005D1354806220068B11C0AF09EEB1720C6 -:10B0200040012018827C009B390002200AF05CED70 -:10B0300005002800F8BDF0B505000E00407829781D -:10B040000002D0240843012885B065D1281D0027BF -:10B0500004901CE00499042203A80AF07EEB0498F3 -:10B060006B46001D0178197241785972801C029953 -:10B0700004902200601C09040404090C0398240CA9 -:10B0800002910AF036EDE01FF93806D07F1CE8780F -:10B09000A97800020843B842DCDCE978AA78308855 -:10B0A0000F0217437D509C4C01000000DC3400C0AF -:10B0B00000040000C8F209F3B8422DD929E00000CD -:10B0C0000C010004CCF100C0993100C00808040054 -:10B0D000327FFFFFC0EF00C0347C020000F600C0EA -:10B0E000847C0200F8F500C0C43B01C0FDFF0000F5 -:10B0F00094F100C0A8F100C0F2F000C0E8F500C073 -:10B100002200601C04040021240C08000AF0FAEC60 -:10B110007F1C3088B842F3DCE878A9780002084345 -:10B12000302800D93020308005B0F0BD0028FBD198 -:10B130003088A870000AE8702D1D00270DE021005E -:10B1400068460AF0E4EC0622280069460AF00EEB95 -:10B15000641C2404AD1D240C7F1C3088B842EEDC36 -:10B16000E2E7002801D1012002E0032800D90020F5 -:10B17000F649085C70470121062814D00200FF3A06 -:10B18000083A10D0E6280ED06B280CD02B280AD015 -:10B190002C2808D0502806D0E72804D0242802D034 -:10B1A000B12800D0002108007047E84810B51838D1 -:10B1B000C06A00210AF0AEEC002801D1012010BDC8 -:10B1C000002010BDE1483F21F0B5090118389DB0BD -:10B1D0000181DF4908005C301690DE481490DE489B -:10B1E000503115910100803160301391129001F0BF -:10B1F000D8FFDA480AF092EC01890D1868782978AE -:10B20000000208434004400C0A90E878A978000244 -:10B21000084308380E90CD482C00183800780834C0 -:10B22000002808D128790521090440180AF082EA8B -:10B23000CB480AF080EA68782978000208432100A8 -:10B24000FFF771FD002810D0FFF7AFFF002806D1EF -:10B25000BE4801211838416300201DB0F0BDBB4835 -:10B2600000211838416301214170BE480AF062EAAA -:10B2700001200D90099000200890B8480AF052EC87 -:10B28000119001890D1810954069079010980AF0E7 -:10B290004EEC002826D000200AF04CEC002821D1EA -:10B2A0000AF020EC002800D002200AF004EC06008E -:10B2B000007A062806D168790107090F00200AF0F4 -:10B2C0003EEC0600002E2CD10A98F72811D12378E5 -:10B2D0000021079A00910292019168790207120FEA -:10B2E000010919E068790107090F00090AF06AEB02 -:10B2F000DDE76F793E09012E01D1022304E0022E21 -:10B3000001D1032300E00023079A002102923A07AB -:10B31000120F009101913100180000230AF012EC85 -:10B3200006001198894F4661183F02E001200AF09B -:10B330006AEA7D218C48002209010AF0A0EB00286E -:10B34000F860F3D08148814A1838C0682021018113 -:10B350004118183A116346610F91E878A978020202 -:10B360000A4310990F980AF0F2EB78480127183831 -:10B370000770406900280CD10A98AA2809D00AF061 -:10B38000EAEB7248794918384761C86804221043CB -:10B39000C86000200B906E480078C00720D10A9842 -:10B3A000FFF7E9FE00281BD00A980121C9030843D2 -:10B3B0002870000A68700220A8710020E871E878FF -:10B3C000A97802020A4310990F980AF0C0EB11986D -:10B3D0000AF060EB00213000FFF7D2FC01F0ECFE38 -:10B3E0000AF0BCEB62480AF0A6E90A9B8A2B74D0EB -:10B3F00074DC4D2B73D07FDC1E2B72D02DDC142B14 -:10B4000001D101F062FE19DC102B6BD011DC032B93 -:10B4100069D0062B68D00B2B01D001F0B9FE542067 -:10B42000A8700020E870210030000AF09CEB01F0C9 -:10B430008AFE112BFBD0122BEFD1E5E3163B072B35 -:10B44000EBD25B007B449B885B009F443F04A10ED2 -:10B45000A10E4A055E058805A3062C2B72D029DCB7 -:10B46000262B06D00DDC1F2B6DD0202B6CD0242B6F -:10B47000D3D10E9821000204120C300002F0BBFB65 -:10B48000BAE2282B61D02B2BC7D10B2080013018BA -:10B49000806B03210AF06AEB169900200AF0F2EAA9 -:10B4A0003448806B3449002008602900300004F0E3 -:10B4B00079F81FE36AF3C55801000000D83800C0CE -:10B4C00000040000E811A179372B01D101F093F9B4 -:10B4D00015DC2E2B01D101F08BF9362BA7D10520DD -:10B4E000C001301802690021083201F08AF9F4E342 -:10B4F000D2E0F3E30AE0F2E3DAE335E365E2402B7E -:10B500007ED0452B93D10AF040EB9AE76F2B01D107 -:10B5100001F04AFA75DC672B74D074DC5D2B01D125 -:10B5200001F02DFA34DC4E2B01D101F095FA502BAD -:10B530008DD05B2B8AD1607821780002084301D13D -:10B5400001F017FA012801D001F0B0FD0E9AA11CFC -:10B5500030000AF01EEB18E2EFE3EFE3EFE3ACE3B9 -:10B56000E4F100C0365C0004AC3901C0C03801C051 -:10B5700038460004010004000202040098000004A0 -:10B5800000A700800404040000A8008030F200C07E -:10B590005E2B01D101F08FF9662B9FD16078217865 -:10B5A0000002084301287AD1E078A17807020F430E -:10B5B00011D0F748C168B9420DD0C760F5483900CD -:10B5C0000AF0FAE8F24908613900F24864310AF0F9 -:10B5D000F4E8EF494861607921790002084301D01D -:10B5E000EB498863207A002802D0E949401E48715F -:10B5F000607A00280AD0E64A401E1179814203E0B1 -:10B60000F6E325E0F5E313E000D01071E079A179CD -:10B610000002084301D0DE490860E07AA17A000206 -:10B62000084301D0DA49C8800AF0B6EA01F09CF973 -:10B63000683B072B00D3FAE65B007B449B885B00EA -:10B640009F447505B00DB00DC209CF09E405A809E6 -:10B650007F2B7BD010DC703B092BECD25B007B4452 -:10B660009B885B009F44A50991099E0D9E0D0409CE -:10B67000E6099E0D9E0D180A813B082BDBD25B006C -:10B680007B449B885B009F449809880A680D8D0D58 -:10B690008D0D380D8D0D9F0ADA2B01D1D1E6F1E326 -:10B6A00072DCB12B71D04DDCA42B6FD03ADC942B23 -:10B6B00001D101F0A6FA25DC8D2B01D101F0B4F9FE -:10B6C0008F2B6FD0932BB6D160782178000208437E -:10B6D000012801D001F088FA00206B465883E078F9 -:10B6E000A17800020843988260792179000208431A -:10B6F0001C2105AAD882A84800680AF052EA00284E -:10B70000CCD021E7972B01D101F08DFA9A2B92D161 -:10B71000210030000AF048EA0028BFD1380AAF7192 -:10B72000E8718EE6A93B082B85D25B007B449B88A1 -:10B730005B009F44E00A850A370D370D370DCA01BB -:10B740000A02D201CE2B02D101F05AFCF9E338DC17 -:10B75000B52B76D009DCB22B74D0B32BB3D1290032 -:10B76000300007F071FA01F09FFCC72B6BD0CD2B96 -:10B77000A9D10E98082802D20020A071E071707A39 -:10B78000022804D001F010FC5EE0C0E1F0E33000DC -:10B790000AF00AE86178227809021143012902D0EF -:10B7A00001F0F1FBFEE301004031A2788A70E278FB -:10B7B000FF30FF30CA702179801C81746179C174B7 -:10B7C0003FE6D12B7ED00BDCCF2B01D101F021FC49 -:10B7D000D02B9CD10E9920000AF0EAE901F04AFC36 -:10B7E000D62B01D101F0DFFAD92B90D160782178E6 -:10B7F00000020843012801D001F099FBA01C07F0CA -:10B8000016FEE078A178000208436449884201D11D -:10B8100001F0A3FB0AF0D0E93000FF3085300AF0D8 -:10B82000D0E9010030000AF0D0E90AF0D2E95C4921 -:10B8300030000AF0D2E95B4800782071000A60719C -:10B84000E6E75CE175E12AE2FF21891C581A8B4288 -:10B8500001D101F019FC74DCEC2B3ED042DCE92B69 -:10B8600001D101F002FC34DCDF2B01D101F0DBFB64 -:10B87000E42B67D0E52BACD1607821780002084337 -:10B8800001287ED002289BD113980088002897D1E8 -:10B890000AF07AE9617822780802104301288FD1F2 -:10B8A000A01C06900AF0C4E8401C6BD0149900203C -:10B8B00088823D480699062209F062EF3B480088DD -:10B8C000002800E04D916C3901000000D43C00C01C -:10B8D000000400006F47AF2BFEE373D00E982100E9 -:10B8E00008310838F9E3EA2B01D0EB2B87D1290086 -:10B8F000300008F048FD40E7F42B00D1ABE52CDC2C -:10B90000ED2B7ED0F22BC0D10F9BAA1C0092607849 -:10B910002278010211430A33A21C30000AF06AE9BE -:10B92000002800D01AE66078217800020843E5D1AB -:10B930000A9901220F98D20311430170090A41703C -:10B94000E978AA78090211438170090AC1700021BF -:10B950008171C171F3E336E0F2E3F72B01D101F01D -:10B9600096FBFB2B91D160782178000208430128D7 -:10B9700001D001F0A7FB0E9806AB001F0690E078FF -:10B98000A17802020A4300926078227801021143F2 -:10B99000221D300001E0FAE3FAE30AF030E9002862 -:10B9A000ACD1DBE5C03801C040420F0080EF00C0E1 -:10B9B000FFFF0000C8800200A47C020034F000C039 -:10B9C000B0F100C0F0E315286FD047DC0B2801D19F -:10B9D00001F0C0F82ADC022868D0062886D1F94890 -:10B9E0000760307A032809D1707A002806D0032036 -:10B9F00000023018017A042900D007720A9A002147 -:10BA000000E000E31000FF38083800D101210E9853 -:10BA1000220003041B0C300006F014F9002871D03A -:10BA200000200D90FFF78BF901F0BBFB0C286AD0CA -:10BA3000132897D16078217800020843012836D175 -:10BA40006079217902020A43A11D00200AF0DAE898 -:10BA500000280B9000D190E601208EE6232801D12A -:10BA600001F073FB0DDC182801D101F0E1FA212867 -:10BA7000B4D10E9821000204120C30000AF0C6E87E -:10BA80007BE6272801D101F06FFBFE28A6D1082014 -:10BA9000A8700020E87020000AF0BCE8E978AA78D5 -:10BAA00009021143401801F020FB7EE35FE0617959 -:10BAB00022790B0213430006000E221DA11D0AF07D -:10BAC000AEE80004000C0B9000D0012000280B9081 -:10BAD00000D0C0E46079217900020843FEE3210030 -:10BAE00000200AF0A0E820000AF0A0E8F7E3687A56 -:10BAF000297A00020843012806D12900300006F007 -:10BB0000CEFA3AE6AEE0EBE32900300006F09DFD08 -:10BB100033E62900300006F04FFF24E000200D90AE -:10BB200082E72900300007F04BF8002814D00128E4 -:10BB30007DD0022801D101F0C0FA052800D00DE522 -:10BB4000FFF7FDF808E02900300006F091FF00281B -:10BB500002D00228F3D1EEE700200D90EBE7290098 -:10BB6000300006F07BFF00280B90D7D073E4210053 -:10BB700030000AF060E80B900C2094E70AF05EE8D1 -:10BB8000010020000622083009F004EE0AF05AE80D -:10BB9000002802D0380A277408E00AF058E807287D -:10BBA00001D1032000E002202074000A60744020CC -:10BBB000A0710020E0710AF04EE8A073000AE07363 -:10BBC0000AF04CE82100123109F070EF00200C90CF -:10BBD0000AF048E8FFF7D9FA07000AF038E8FFF75B -:10BBE000D4FA069007F062FB0C9A01000092069AC4 -:10BBF0003B0020000AF03AE8200026301C9009F0B3 -:10BC000022EF000A1C99000209F050EF07000AF029 -:10BC10001EE81C99384309F04AEF07000AF022E8B1 -:10BC2000000181213843490488431C9901E00DE358 -:10BC30001CE009F03CEF1598417A027A08021043A3 -:10BC4000A070000AE07002202070002060705E4842 -:10BC500020340078E072000A20730D206073002009 -:10BC6000A0735CE457490020086077E4307A032829 -:10BC700002D1707A0328F8D1F068C0040AD40021F8 -:10BC8000300005F096FA230022000021300009F070 -:10BC9000F2EF03E00121300005F08BFA0E9821004D -:10BCA0000204120C300005F0A9F9002800D0B7E614 -:10BCB00054E40820A8700020E8702100300002F051 -:10BCC000EAFBEBE641492000FFF7D3F927E4300017 -:10BCD0000422210067AD904C01000000D04000C05C -:10BCE00000040000F57AFBAB393009F05EED30005E -:10BCF00009F0CEEF09F0B8ED09F006EF09F008EF12 -:10BD000017E41CE29DE121E36078227800020E999D -:10BD1000104301286AD1E078A1780002084309287D -:10BD20002DD0112820D0242810D0252837D1002E3E -:10BD300035D00B2080013018806B00282FD0FF30C9 -:10BD400021300422A11D09F030ED28E0002E26D07C -:10BD50000B2080013018806B002820D0FF3011307C -:10BD6000EFE774E1D8E3FEE31E49A0790968886132 -:10BD7000A079002813D0300009F08EEF0FE0F068B2 -:10BD8000FF21491C8843A179C907C90D0843F06008 -:10BD900009F086EF01000122300009F0DAED3000F1 -:10BDA000E178A27809021143052920D0062925D07F -:10BDB000072927D0082928D10949091FC98800293E -:10BDC00003D0E188084A91421FD20100A279A03134 -:10BDD0008A72E279CA7218E050F200C0A47C0200B4 -:10BDE000D0F100C0ECF500C0EE02000016E001004A -:10BDF000A279A0310A72E2794A7206E0A279AC21F6 -:10BE00000A5402E0A279AD210A54C27A817A09F07B -:10BE1000F4EC0028C4D155E42EE17EE10028FAD1EB -:10BE2000891EA41C2700069175E0787839780002F5 -:10BE3000084308282BD00ADC03281FD0052820D06F -:10BE400006282BD0072836D1AD20805D28E00928B0 -:10BE50002DD0112826D0242809D025282BD10B201D -:10BE600080013018816BFF312131042245E00B2025 -:10BE700080013018816BFF311131F6E79F20805D22 -:10BE80000EE03000A030017A2171407A04E03000E9 -:10BE9000A030817A2171C07A607131E0AC20805D80 -:10BEA00020712DE0F94800688069F9E70BE1F0683E -:10BEB000C005C00FF4E701000B39042906D90021A1 -:10BEC0000200C943123A0D2A00D8511D0591491CA0 -:10BED00016D0300009F0E8EE002811D00021300023 -:10BEE00009F05EEE0520C00105993018406A89000E -:10BEF0004118F878BB7802021A43201D09F054EC6F -:10BF0000F878B9780002084306993F1D091A091FFD -:10BF1000C7193C0006910698002886DC15E4607875 -:10BF2000217800020843012806D161880122D20746 -:10BF300060688918086008E460880121C907401812 -:10BF40000068606050E46788380B082814D109F055 -:10BF5000B0EE6178227838050902000D11430129FD -:10BF600004D1217909F0A8EE03E03DE209F0A8EE42 -:10BF7000207109F0AAEE37E46078217800020843C6 -:10BF8000012804D12179380009F0A2EE2CE4380010 -:10BF900009F0A2EE207127E435E209F0A2EE6088F4 -:10BFA00006900005000F069823D0000B022800D948 -:10BFB0000020401C07063F0E012F02D9380009F06F -:10BFC00094EE069861788005800D00E042E12278C9 -:10BFD00009021143012903D1217909F08AEE02E017 -:10BFE00009F08AEE2071012F14D9012009F07CEEAE -:10BFF00010E006996278237809061202000B090EF8 -:10C000001A43012A03D1227909F07AEE02E009F0FD -:10C010007CEE207109F07CEE7AE409F07EEE607827 -:10C02000217800020843012804D12179608809F0B1 -:10C0300044EE03E0608809F044EE207109F070EEF0 -:10C0400066E421003000FEF7B4FFFFF76CFB0B2025 -:10C0500080013018806B042109F0A6ED16990020AC -:10C0600009F02EED8A48806B8A490020086029007B -:10C07000300003F08AFB5BE5300004F080F8002814 -:10C0800084D009F0CEEB8448002404808348046007 -:10C09000FEF701FF8248017949084900017130002B -:10C0A00003F0D2FC1699002009F00AED7948DF224E -:10C0B000046030002030817E11408176F0680421D8 -:10C0C0008843F06034E5774FF868A070000AE070AC -:10C0D000B86B2071000A60717879401C2072387941 -:10C0E000401C6072DC0CBE2201000000CC4400C089 -:10C0F00000040000DFF452323868A071000A01E049 -:10C100006AE1ACE3E071F8881B907D22F96AB86AB5 -:10C11000D20009F014EE7B6B3A6B09F014EE1B9A17 -:10C12000002309F010EEA072000AE072E5E46078E6 -:10C13000217800020843012808D1E078A1780002A4 -:10C140000843129948811299002008811298408969 -:10C15000CEE3594A20007232931F0092083A911E92 -:10C1600009F0F4EDC9E4F3E34DE2607821780002D0 -:10C170000843012823D1E078A17800020843FF2872 -:10C1800003D04E4A0021117002E04C4807700A208B -:10C1900013994880139839004088002800D0002166 -:10C1A000139A1288002A00D00027B94205D028200F -:10C1B00009F0BCECA1E446E36DE3139974E33F4856 -:10C1C0000078002801D0FF20C2E713980088BFE75D -:10C1D00042E31498808A2070000A6070149900204D -:10C1E00088828AE46078217800020843012826D1F9 -:10C1F000E078A1780002084304D031490878384338 -:10C20000087004E02E4801784908490001702C4C60 -:10C210002078C00702D009F0C6EC6EE409F09AED70 -:10C22000002808D009F09AED002804D109F09AED11 -:10C2300009F09CED61E420783843207093E42048B5 -:10C2400000884007400F83E709F094EA0700607810 -:10C250002178030260790B43217902020A43E178D5 -:10C26000A078090201435FE0E078A178000208436A -:10C27000042801D1022004E4012823D16078217828 -:10C28000000208430128F5D16079217900020843B2 -:10C29000A11D09F070ED0128D0D009F06CEA47E04B -:10C2A000ECF500C000A8008030F200C0C0F100C072 -:10C2B000B4F100C040A60080C03801C0EBF000C05F -:10C2C000365C0004022836D16078217800020843E9 -:10C2D0001ED1A01D06A909F052ED0B900698207101 -:10C2E000000A607168782978000208430121C903B7 -:10C2F00008432870000A6B466870988DA871000A80 -:10C30000E87102E002E05CE39BE306980E3048E44B -:10C3100009F030EA070060782178030260790B4366 -:10C32000217902020A43FF49A01D09F02CED3800D3 -:10C3300009F034EA2EE40528FCD160782178000267 -:10C340000843012804D1200009F020EDFFF73BFB52 -:10C3500000288FD1200009F01AED0028D6D198E4EA -:10C360006078217800020843012806D1E078A1789E -:10C3700000020843012109F00EEDF068C0041CD54D -:10C3800005A802F0AFFC15986B46C27A817A1006B8 -:10C3900000140843A070000AE070187D8107587DE2 -:10C3A000890F09F0FCEC6B466071187D0122810752 -:10C3B000587D890F09F0F6EC0BE00020A070010019 -:10C3C000E070012009F0F2EC60710021012009F019 -:10C3D000F2EC20710E209AE7607821780002084381 -:10C3E000012806D12100300009F0E8EC002800D136 -:10C3F0000B97200009F0E6EC103088E7300005AA22 -:10C4000006A909F0E4EC0A20A87000206B46E87049 -:10C41000187E2070187D607037E4208801282DD1A7 -:10C420003000FF3061301A908788C088A41C0690C5 -:10C43000607821780002084303D009F0CCEC1A9907 -:10C440008880E078A1780002084303D009F0C2ECAC -:10C450001A99C8802620A8700020E8701A98808851 -:10C46000B84202D0300009F0BAEC1A980699C08898 -:10C470008842D1D0300009F0B6EC06E43200FF3239 -:10C480006132938839009940A170090AE170D1881E -:10C4900026208F40390A27716171A8700020E8704A -:10C4A0000B2080013018816BA41D20001831082258 -:10C4B000103009F084E93700C037F88AA070000A0C -:10C4C000E070388B2070000A6070300009F08EEC4C -:10C4D00000040014010A20716230617103D1B88B2D -:10C4E0002071000A6071388AA072000AE072788AAE -:10C4F0002072000AADD8D9A801000000C84800C0C9 -:10C5000000040000FF17FAB86072300009F06CE90F -:10C510002073000A6073300009F076EC0004001408 -:10C52000010AA071E171010AA0736230E173AED11A -:10C53000F88BA071010AE171A073000AE0737EE438 -:10C540001020A8700020E8703000C0301021199031 -:10C55000415E080009F05CECA070000AE0701998D8 -:10C560001421415E080009F058EC2070000A607048 -:10C57000300009F04AEC09F04CECA071000AE071BF -:10C58000300009F02EE909F048EC207100E00AE0E3 -:10C59000000A6071707A032801D00128CFD1F068B9 -:10C5A000C004CCD454E665482278436A60786A3384 -:10C5B0000102114320000BAA09F032EC00280CD034 -:10C5C000E078A178000208435B498842B7D0401E5A -:10C5D0008740380AA770E07031E460782178000263 -:10C5E0000843032800D04FE6E078A1780002084312 -:10C5F0005149884207D1012009F016EC0028D1D01A -:10C6000009F016EC1BE40006000E09F016EC0028F9 -:10C61000C8D0002009F008EC11E46078217800020D -:10C6200008437ED005284FD0FE287BD0FF2886D136 -:10C63000E078A27801024248114300884140069107 -:10C64000E278A37812021A430A400692E178A278AF -:10C65000090211438A05920F08D08205920F05D076 -:10C66000032212021140104081429BD1E878A97840 -:10C67000000208430C380204120C211D300006ABE6 -:10C6800009F0DEEB01288DD02D4FE178A2783888B3 -:10C690000902114308436B463880188B8005800FD0 -:10C6A00008D0300009F0D0EBE178A27809021143FC -:10C6B000090A01806B46188BC00717D009F0C8EB38 -:10C6C000002810D002200FE01E4808901E48407835 -:10C6D000002897D013980088002893D109F07CEAAD -:10C6E00000221E21A3E20720184908706B46188B10 -:10C6F00031210901084285D0687829780002084371 -:10C700000121C90308432870000A6870988DA87138 -:10C71000000AE871E878A978BF1C02020A43109960 -:10C7200001E083E048E00F9809F042EA022009F0B6 -:10C7300000E9002812D10BE0FFFF0000E4580004DC -:10C74000C43B01C0D7B100006C3901C0ACF100C0DE -:10C750000221080009F000E9002806D0FF2171310C -:10C76000095C072901D109F078EB78783978000263 -:10C7700008436B46D881F878B978000208431882DC -:10C7800078793979000208435882F879B97900023A -:10C7900008439882787A397A00020843D8820020C8 -:10C7A0000990119809F0A8E909F04EE80F990BAA31 -:10C7B00003A8FEF794FB37E0E078A178FB4F040272 -:10C7C00038880C430440E00705D009F04AEB38886C -:10C7D0004008400038803120000104428BD0687846 -:10C7E0002978000208430121C90308432870000A80 -:10C7F0006B466870988DA871000AE871E878A9788E -:10C8000002020A4310990F9809F0D2E92100300082 -:10C8100009F02AEB040000200990119809F06CE956 -:10C82000002CDBD0FEF74BFB0D9009E4DF48211D07 -:10C830000088A070000AE070300009F01AEB51E1A6 -:10C8400021000020E3E30520C0013018C26808324F -:10C850000121200009F010EB06E409F012EB00289A -:10C8600001D0FFF73FF8D2480780FAE70E98A11DE4 -:10C87000801F02041214300009F006EB09F008EBE7 -:10C88000CC4C04202056411CCFD0811CCDD001219E -:10C8900009F002EBC84AD06A21798F403843D06250 -:10C8A0002079012109F0FCEA4AE40020C149C04393 -:10C8B00009F01AE909F0F8EABD49002008803FE4D0 -:10C8C0006078217800020843012819D1E078A17826 -:10C8D0000002084300D1D7E4012801D002286FD11B -:10C8E000B649087009F0E4EA09F0E6EAB448002223 -:10C8F0000068092109F07CE9B248002101721FE4B7 -:10C90000AE48007807A086C501000000C44C00C0F6 -:10C91000000400007841F4EA63E30520C001371801 -:10C920006078217800020843012826D1E878A978A8 -:10C930000002084310994218A11C300009F0CAEA0D -:10C9400008F0B0EF38690100083106D0807CC007DC -:10C9500003D009F0F8E809F0FAE8994800880028BF -:10C9600084D009F000E90028A8D0F068C007A5D05D -:10C97000300009F0B0E8CDE21AE000281CD10E9892 -:10C980000F9D801E01042B000A33090CA21C3000ED -:10C9900009F0A4EA0A990122D20311432970090A75 -:10C9A0000A306970A870000AE8700020A871E87168 -:10C9B000119809F0ACE823E2042896D10E98A21C45 -:10C9C000801E0104090C300009F08CEAA871000AED -:10C9D000FEF7D8FE82E3A11C300009F088EAFFF7D9 -:10C9E00085F8200009F086EA1DE00830A5E3210063 -:10C9F000300009F084EA16E00E9A2100300009F0B8 -:10CA000082EA012801D1FFF7B1F8D8E30E9920009E -:10CA100009F07CEAD3E3200009F07CEA03E021007E -:10CA2000300009F07CEA0028DFD171E32078220091 -:10CA30000128C2D10E9B51789B1E921C300009F038 -:10CA400072EA401C96E40F9D21782800083009F016 -:10CA50006EEA0830A870000AE8700A980121C9033C -:10CA600008432870000A68709FE7002006902100A4 -:10CA7000300006AA09F05EEA0028D6D01220A8707D -:10CA80000020E87006980028BDD198E3200009F046 -:10CA900056EAFF20213050E3617820780B020343EF -:10CAA00004D121003000FCF74EFB25E00E98210058 -:10CAB0000204120C3000FCF739FA80E36078217828 -:10CAC0000002084301280ED1E878A9780002084343 -:10CAD000083802040B2080013018806B120C2100F2 -:10CAE00009F030EA6BE30028A3D10B208001301855 -:10CAF000806B210009F02AEA0C301EE3002006902A -:10CB000005900390210001AA05A806AB09F022EACE -:10CB10000598002889D131480068314908401890AB -:10CB200001D109F01CEAE078A178000208436B46C5 -:10CB300004901879302141432A4809180498C0000C -:10CB400008184268002A03D003A901A8904700E012 -:10CB500003971898002801D109F004EA03980028E7 -:10CB6000D8D1002118206B460B911856002808D008 -:10CB7000EA78AB7812021A431018A870000AE8701D -:10CB800006910498042898D160782178000208431F -:10CB9000E878A97803D1000208430838CDE2000202 -:10CBA000084322E7607821780002084301281BD15E -:10CBB000A01C08F070EF0100300009F0D8E9FEE297 -:10CBC000C43B01C0B0F100C034F000C000230080BD -:10CBD00000F000C080EF00C06C3901C0002100806F -:10CBE00000080008BC1E01C00B2080013018806BBB -:10CBF000A11CC030806A08F082EFFFF7FFFB60786D -:10CC0000217800020843012809D10E98022801D199 -:10CC1000002100E02100300009F0ACE976E20028B4 -:10CC20009ED12100300009F0AAE986E260782178DF -:10CC3000000222000843012802D11721FEF78DFDD2 -:10CC40001821F848006808F0DEEFB8E2F5481D2129 -:10CC5000006805AA08F0D6EF6B46988AA070000A13 -:10CC6000E070D88A2FE2607821780002084301281A -:10CC700006D1200000F0A2FE002800D1BDE49EE213 -:10CC8000A91C200000F05BFE99E22078642804DAF9 -:10CC90000006000E611C08F0EEEF601C08F0EEEFDD -:10CCA0000A304AE209F0E6E8032008F0ACED04009F -:10CCB00003273F0214E0607A00280CD0E019007AC4 -:10CCC000002808D0200009F05EE9012008F0D6ED28 -:10CCD000200009F05CE90321200008F02CEE04009C -:10CCE000002CE8D1002009F056E909F058E90120AC -:10CCF00008F0C4ED68782978000208430121C903CF -:10CD000008432870000A6B466870988DA871000A65 -:10CD1000E871E878F12E006901000000C05000C001 -:10CD200000040000BED0ABACA97802020A431099FF -:10CD30000F9808F052EF119808F0F2EE0021300041 -:10CD4000FEF764F800200D900990BC4809F034E922 -:10CD50000028FAD1FEF7B3F809F026E8B849002018 -:10CD60004861B848C16804229143C16031E2287922 -:10CD70000590687900220107090F0409AE48069161 -:10CD800000680B2108F048EF119808F0CAEEAC4D8E -:10CD9000E86808F0C6EE06F005FC002800D00B9706 -:10CDA000A94900200880A9497D270880A8493F019A -:10CDB000086002E0012008F06CEDA0480022390074 -:10CDC00008F0A2EE0028E860F4D0E8682021018194 -:10CDD0004661203028630A990122D2031143017071 -:10CDE000090A41700E996B4608318170090AC170B9 -:10CDF000998D8171090AC1710599017141792201E9 -:10CE00000907090F1143069A090909011207120FB0 -:10CE10001143417100213000FDF7F8FF07E2E87887 -:10CE2000A97800020843E178A2780C3809020004CE -:10CE30001143000C05910690607821780002271DAF -:10CE40000843012872D10C20A8700020E87049E046 -:10CE50007878397800020843FF3852381BD002280E -:10CE60000AD0682825D13100380009F0AAE86B46BD -:10CE7000998D40180B901CE005983200390009F09C -:10CE8000A4E86B46998D320040180B900598390044 -:10CE900009F09EE80DE005983200390009F09CE8A1 -:10CEA0006B46998D320040180B900598390009F0B7 -:10CEB00098E8F878B978000208430699091A091F1A -:10CEC0000904090C0691E978AA78090211430818A7 -:10CED000001DA870000AE870F878B97800020843CD -:10CEE0003F1DC71906980428B2D86B46988D0028B4 -:10CEF0001AD130000024FF30564F7230179018209E -:10CF00006043395C00290AD0C1191798091D06220F -:10CF100009F06AE8002802D1200009F06AE8641CE0 -:10CF20002404240C042CEAD353E1FFE70C20A8705E -:10CF30000020E87033E07878397800020843FF3841 -:10CF400052380ED0022806D068280FD131003800A0 -:10CF500009F052E80AE005983200390009F038E893 -:10CF600004E005983200390009F03AE8F878B97819 -:10CF7000000208430699091A091F0904090C0691C1 -:10CF8000E978AA78090211430818001DA870000A60 -:10CF9000E870F878B978000208433F1DC719069871 -:10CFA0000428C8D815E1002813D125482A4940880B -:10CFB000884201D3294809E02949884201D32948F8 -:10CFC00004E07D21C900884203D32748A070000AED -:10CFD000E070E078A178000208430690164800222D -:10CFE00000684C2108F018EE07043F0C0698390041 -:10CFF00008F01EEC7843A070000AFFF700FB010068 -:10D0000040318A78FF30A270C978FF30801CE1700F -:10D01000817C2171C07C60710020A071E07129E0E9 -:10D02000607821780002084301281FD121003000D8 -:10D0300008F0E6EFCDE0B7E080EF00C09800000414 -:10D04000CCF100C000A70080C43B01C0C0F100C00B -:10D05000B4F100C0C8800200581B0000101D000081 -:10D06000B80B0000880E00004407000021003000CB -:10D0700008F0CAEF10206AE00E99200008F0C8EF0F -:10D08000012800D1C9E4182061E00E99200008F0C1 -:10D09000C4EF9EE02100300008F0C2EFB7E56078F1 -:10D0A000217800020843012810D1E078A17800021D -:10D0B0000843FF49086008F0BCED3000FF308530C0 -:10D0C00008F0BAED0100300008F0BAEDF848006849 -:10D0D000A070000AE070F74800882071000A6071B3 -:10D0E00077E00E9A2100300008F09EEF0128C9D0A9 -:10D0F00018E0002221783000130008F0EEED0EE079 -:10D10000607821780002084305D12000FDF7C9FEB0 -:10D11000A070000AE0700C20A8700020E8700020C9 -:10D120000B9056E0E65CA70001000000BC5400C074 -:10D130000004000075CEF4560B9754E00028FBD194 -:10D14000E178A3780A021A4301000092221D300000 -:10D1500006AB08F090ED002800D10B976B46188BBA -:10D16000DEE4A870000AE8703DE021004C34300095 -:10D1700008F048ED2100300008F064EF002800D1ED -:10D180000B979020EDE72000FDF793FE00282AD1B1 -:10D190006078217800020843012809D12000083076 -:10D1A00008F08CEC0700201D08F088EC07601AE0FE -:10D1B000201D08F084EC00682100083108F0B2EC72 -:10D1C00011E0E078A278000601146078114322781B -:10D1D0000002104308F03AEF012800D162E502E0B6 -:10D1E000207808F038EF0D98002816D06878297854 -:10D1F000000208430121C90308432870000A6B4656 -:10D200006870988DA871000AE871E878A978020220 -:10D210000A4310990F9808F0EAEC0998002802D008 -:10D22000119808F088EC0D9800280AD00899FCE5C0 -:10D23000320021000BA808F012EF6B46998D0843CD -:10D240002EE5A24E3078002806D1A14808F0B6ECB1 -:10D25000002801D0FEF71DF801201DB0F0BD9D494A -:10D2600010B50A78002A05D002220A709A4A0A21CB -:10D2700008F0F8EE082008F0FAEE9848984900689F -:10D28000086010BDF0B585B00027039708F0F2EEF6 -:10D2900008F0F4EE0120029008F090ED8B4B914ADB -:10D2A0005F61D06804218843D06090E28E4808F026 -:10D2B00092EA019801890D18280008F000EC060098 -:10D2C000281D08F0FCEB01231B03C21A98427ED0F4 -:10D2D00032DC08287CD013DC01287AD0022879D1EE -:10D2E0000298FDF7BFFF002809D12069401C20618A -:10D2F000012008F0D8EA02213000FDF730FD60E29D -:10D30000802868D0C11FFF39FA39E8D1774C2068EE -:10D31000002870D0417A032901D001296BD12179ED -:10D32000032969D0082901D0092972D16F4BE288FD -:10D33000083308F0A8EE99E06D4D511BAA4269D060 -:10D3400025DCD21A67D06B495118C8D16448634AAA -:10D35000016811606849016008F05CEC674840783A -:10D36000002805D06648002200681E2108F05EEC07 -:10D37000FDF721FD08F08AEE072008F078EE08F0AE -:10D380008AEE0028BBD13000FFF769FF3DE07F2225 -:10D390005206891840D052008918A0D13000FBF7FE -:10D3A000D1FD0028ABD008F07AEE0028A7D03000DD -:10D3B000FCF70EF804000100300008F074EE2005C0 -:10D3C00001D5FCF744F8002C99DA3F4A04E009E063 -:10D3D00094E1D6E1F1E181E142213000022308F03D -:10D3E00066EEEEE13E4844490068884205D13000CF -:10D3F000FFF735FF06E03CE031E0374A0A21300014 -:10D4000008F030EE012008F056EE300008F09AEBFC -:10D41000D7E128E06DE174E108F0D4E939494E6EB6 -:10D420000D6E0F664F6608F0E2E9002411E0390046 -:10D43000E807C00F7940084302D0200008F09EEBB7 -:10D44000F007641C6D08240605437608240E2A2C78 -:10D45000C7D23100280079400843E8D1B1E1E28821 -:10D4600008F0D8E902E000220321F9E727602771DC -:10D470000DE0307A01280AD10B2080013018806B32 -:10D48000032108F0C4EB1121300008F018EE300041 -:10D4900008F018EE95E1E06801890D1803980189FC -:10D4A00046690C18287920716079B17A0007000F5D -:10D4B000090108436071F17A000900010907090FA9 -:10D4C000084321E0380200042E020004CCF100C021 -:10D4D00038460004ACF100C0E5B2000098F100C08D -:10D4E00094F100C000A70080010103004C4801C076 -:10D4F00000F0FF010020C0FFFFFF00006C3901C0F9 -:10D5000080EF00C0C03801C06071607822780102ED -:10D510001143FA4A881A914253D031DCF84A881AEA -:10D5200091420FD01FDCF74A881A914254D005DC93 -:10D53000F54808187E0CF19801000000B85800C0AA -:10D5400000040000552D5CDC67D00C2864D1A7E0F6 -:10D550000128FCD00728F9D108F012EB08F014EBF1 -:10D56000E078A17802020A432100280008F048EB85 -:10D570002100280008F0B4EDB5E0352836D004DCF1 -:10D58000142833D03428E1D130E036282ED0422878 -:10D59000DCD12BE021287ED00CDC06282DD004DC49 -:10D5A000022823D00328D1D120E014281ED01F2820 -:10D5B000CCD11BE03A2819D04F2817D058282CD0AE -:10D5C0005E28C3D1D2485E302870000A6870380ADD -:10D5D000AF71E87187E008F088ED002806D00021DF -:10D5E000FF2008F00AEC300008F082EDE078A17826 -:10D5F00002020A432100280073E0C548801D2870FC -:10D60000000A6870E079A17900020843A871000A55 -:10D61000DFE73000FDF70EFC67E0200009300490E2 -:10D6200008222100280008F0ECEA0820A870002059 -:10D63000E8706078217800020843B5495831884283 -:10D6400009D10C20A8700020E870280004210830BF -:10D6500008F0DAE811E02C000498083408F038EA01 -:10D6600001000122200004F0C9F8E978AA78090233 -:10D6700011434018A870000AE870307A03280CD1D2 -:10D68000707A002809D0032000023018017A04299A -:10D6900003D0022100E01AE00172A148076022E0F5 -:10D6A00008222100280008F0ACEA0820A870002019 -:10D6B000E8702800083003F085FDE978AA780902AF -:10D6C00011434018A870000A9649E870A1E72800A5 -:10D6D0000822210008F094EA2800210008300C22DA -:10D6E000083108F08EEA002193E7039808F02CEA4D -:10D6F0008D4C0422606A002303A908F0FEEC0F2879 -:10D7000000D0D2E6CDE61821300008F0E2EC62E06D -:10D7100008F0F6EC5FE0854D2878002821D0072836 -:10D720001FD008F05AE800902878032812D12078FA -:10D73000002804D17E4808F04CEA002802D00220DC -:10D7400028700AE0042028707A4A0B21300008F083 -:10D7500094EC02E0012800D12F70009808F050E806 -:10D7600039E075480088002835D02078002808D195 -:10D770006F4808F02EEA002803D108F0C6EC002814 -:10D7800003D0012008F0C4EC25E06C4A0B213000E6 -:10D7900008F072EC1FE06A480168002907D1664969 -:10D7A0000988002917D067490988002913D0076024 -:10D7B0006448078008F078EC00280CD1012008F0BC -:10D7C000ACEC08F0AEEC032008F0AEEC03E0010096 -:10D7D000300008F0AEEC019808F0B6E95A4808F0BD -:10D7E00004E8514C0422A06A531F01A908F084ECFC -:10D7F0000F28F6D064E5401E0006000E032800D96D -:10D80000002049491C31085C704710B5427A022A51 -:10D8100002D108F092EC10BD002901D00D2100E0EA -:10D820000E2108F056EC10BD70B50500474C0E00F7 -:10D8300047492068884218D13F483C4A01881078FF -:10D8400001430ED0002803D0072801D00220107019 -:10D85000404A0A21280008F010EC3F480068206088 -:10D8600003E01021280008F034EC31002800FDF717 -:10D8700080FA70BD4178027809021143CA1FFA3A52 -:10D8800006D108304178027808021043012800D000 -:10D89000002070472449086B0978002906D0417898 -:10D8A0000278080210434004400C70470020704783 -:10D8B00010B504001C48036BFFF7ECFFE42809D106 -:10D8C0005878197800020843052803D00021200069 -:10D8D000FDF7B0FA10BD144810B50078002804D147 -:10D8E000134808F076E9002800D0012010BD10B5DB -:10D8F000FFF7F1FF002809D10D4808F06AE9002878 -:10D9000004D1164808F06CEB002800D0012010BDAF -:10D91000AF8000002C80000024800000FA7FFFFF11 -:10D9200050F200C0E19400C0CCF100C0ACF100C0E6 -:10D93000384600042FAF0000C43B01C01DAF0000FB -:10D9400024F200C0628547E501000000B45C00C01D -:10D9500000040000D27B528EC0F100C00001030021 -:10D9600094F100C0FFFF0000E5B2000098F100C094 -:10D97000980000043A483B4900784969C007C00F45 -:10D980004042084201D1012070470020704770B525 -:10D990000C0035494A695300344AD35A83701B0A34 -:10D9A000C370437905791B022B431DD10823837172 -:10D9B0000023C3714B685B00D35A03721B0A437286 -:10D9C0008B685B00D35A83721B0AC372CB685B00FF -:10D9D000D35A03731B0A437309694900515A81736F -:10D9E000090AC17318212180417902790902114382 -:10D9F00001290AD1202181710021C1711B49083000 -:10DA0000202207F018EF3020208070BD70B5002173 -:10DA1000164C154B427A067A15024A00A25A354333 -:10DA2000954200D15960C57A867A2D0235439542D8 -:10DA300000D19960457B067B2D023543954200D18C -:10DA4000D960C57B867B2D023543954200D1196193 -:10DA5000491C1029DED307F04EEF012070BD0000F5 -:10DA6000365C0004CCF100C0E4580004301D01C055 -:10DA700010B59B4C20819B480079800703D5062177 -:10DA8000200008F014E89649606908F064EB00286B -:10DA9000206901D0082100E0062108F060EB6089D0 -:10DAA00001F013F910BD38B58D4C2269824206D0C1 -:10DAB000002A02D00320FFF7DBFF042038BD002539 -:10DAC0000B0008F050EB0C3A3A3A0B3A3A353A353B -:10DAD000073A323A0320FFF7CBFF2EE06069C168B6 -:10DAE000C9040CD5E168002909D17D4908F032EB61 -:10DAF000002804D02069062108F030EB1DE07948A9 -:10DB00000079C00708D013220092754AE388606943 -:10DB1000110008F02CEB10E013220092704AE38809 -:10DB20006069110007F0CAEE07E06D49022001E0CC -:10DB30006B49002000F0CEF82561032038BD00209D -:10DB4000002910B515D00A68D36D9B781C07A40F67 -:10DB50000FD11B090C2B01D00A2B0AD16032527A4B -:10DB6000132A06D10869002800D00320FFF780FFA0 -:10DB7000012010BDFFB58FB01C0005000F00584EEE -:10DB80003069002804D0002C3ED0390002203AE051 -:10DB90003821684607F08AEF5348009053480190B7 -:10DBA0002800A2300C957561002F0E9006D05049C8 -:10DBB0000622380008F036EA002802D10E99062223 -:10DBC00013E04B490622891D380008F02CEA002892 -:10DBD00009D107220021280007F060EE002C13D0A5 -:10DBE0000E9900200FE0062239003D4807F022EE92 -:10DBF0003F493B48062208F016EA002806D1002CCF -:10DC000002D037490120A04713B0F0BD0B2080019E -:10DC10002818816B08AB097B1972816B0125497B40 -:10DC20008907890F5972816B497B0907890F99729E -:10DC3000806B407B8006800FD8721198242801D118 -:10DC4000758101E00020708108F058EA002809D1B0 -:10DC500008ABDF7A9A7A597A187A3B0001F05EF8BD -:10DC6000002804D008AB187B4008400002E008AB55 -:10DC7000187B284308AB18731E4807901898069025 -:10DC8000187B0421084318731198F0806846F460EB -:10DC900008F070EA00283061B6D11149022000F086 -:10DCA00019F8B1E71CB56B4698710622684607F073 -:10DCB000C2ED0B486946406900F0E7FB1CBD00223D -:10DCC00008B50092CA798B7912021A430A4BFFF702 -:10DCD00051FF08BD024AD268002A00D010477047A1 -:10DCE000C46102C0E0FB00C0035E00C09B5E00C0D8 -:10DCF000F0EE00C0204E0000016000C0F3B504004B -:10DD000089B0218940690E190121049100210A9AE4 -:10DD10000791089106960592B27813091B1F08F027 -:10DD200022EA0A17126A6A246A0C6A062C6A002818 -:10DD300061D0200008F022EA5DE000285BD02000DE -:10DD400008F020EA57E0002855D0062105AA10E087 -:10DD5000002850D06380B4A001000000B06000C073 -:10DD600000040000DCCEFFE7017A03294DD1816970 -:10DD7000426948318A4248D0252105AA03E000289B -:10DD800043D0032105AA143008F00AEA3DE000213F -:10DD90000D000028039132D1032007F066ED070043 -:10DDA00002D0787A002801D1002710E0380007F06F -:10DDB00000EE002801D00500BD35BB2080003A18D8 -:10DDC0002B00200003A908F0F0E90028ECD06761DF -:10DDD000387A032811D1787A01280ED101220092D5 -:10DDE00000203A00FF32029069323100200002AB7D -:10DDF00008F0DEE9A088002807D0002F05D0039A9C -:10DE00000A99200008F0D8E9049004980BB0F0BDFE -:10DE1000FF487047F8B50500FF21FE480022913108 -:10DE200007F09AEE040001D10020F8BDFA4928015C -:10DE30004718F81C08F0C4E906006061782025182E -:10DE400020812821280007F0F4EC0420287000200D -:10DE50006870A878F3210840001D0007000F80308B -:10DE6000BB218900A87006227118A81D07F0ECECF0 -:10DE70003100FF312800062272310C3007F0E4EC4B -:10DE8000280020300090017804221143017041786D -:10DE90007A780907090F120111434170C17882781D -:10DEA000090211437A890907090F12011143817090 -:10DEB000090AC1700021200008F086E9207B202893 -:10DEC00003D1200008F084E9AEE7D4490C220868A9 -:10DED000401C0860012000037881607B0121084319 -:10DEE0006073CF48A0612220A080342027182081B1 -:10DEF000A91D380007F0A8EC002139737973E722D7 -:10DF0000142120000E2308F068E9009949780909D6 -:10DF100081720099CA788B7811021943090901723C -:10DF2000090A4172317A0629817C02D1012211430A -:10DF300001E049084900817407F026EE002802D06C -:10DF4000052008F006E907F05CECB74B0500B54882 -:10DF500021001C68002200680523A047280007F064 -:10DF600064EC0120F8BDF8B5012507F04AEC0090FB -:10DF7000AA48016802291FD2AC4EA74F346800207E -:10DF8000092C00D0601C04000001395C002909D074 -:10DF9000C019408901210903884203D02000FFF7FE -:10DFA00039FF0500012D06D19C480068022802D2E5 -:10DFB00030688442E3D13460009807F036ECF8BD55 -:10DFC00096490868401E0860CDE770B50500080056 -:10DFD000403007F092ED81780909082916D12030E8 -:10DFE000040040788C4A01092800FF30723008F0A4 -:10DFF000F8E80A280AD0E178A27809021143864A93 -:10E000000001090980184181FFF7ADFF70BD70B5AF -:10E0100005000C0007F0B8ED002804D0022007F03E -:10E02000B8ED07F0BAED2000403007F066ED8178DA -:10E0300009090A2903D10100280008F0D6E82100C7 -:10E040002800FFF7C2FF70BDF3B50400012681B0C0 -:10E05000476900890519380007F09AEC002831D08B -:10E06000A878030908F088E80E082E082E292E2E1D -:10E070002E1D2E101419242E380008F0BAE829009D -:10E08000380006F04BFC1DE0200007F02BF819E0EB -:10E090000299200005F0D0F814E0200004F0FEFF03 -:10E0A00010E02000FBF7BFFA2000FCF713F909E0AD -:10E0B00002992000FBF785FF04E0029A2100380056 -:10E0C000FCF764F93000FEBD70B50400FF3072301B -:10E0D0000D00060008F090E800280ED00622290066 -:10E0E000300007F0B2EB200008F08AE82000FF3093 -:10E0F000E821813007F0E4EC04E02100280008F07A -:10E1000084E80400200070BDF7B5050016004769DB -:10E11000100007F0AAEB11E0206B00280AD0022EB5 -:10E1200001D0032E06D1A74204D06C61226B019965 -:10E13000280090473100200007F02EEC0400EBD1BE -:10E140006F61FEBDF3B583B0060001270089851914 -:10E15000A8780107890F36D10009042868D008285B -:10E160006ED00B2881D6679201000000AC6400C01D -:10E1700000040000F640567E66D1290012310220CC -:10E18000029108F050E8040004D0200007F00AECE7 -:10E19000002809D10299032008F044E8040003D0C4 -:10E1A000607A022800D00024200007F0FCEB002851 -:10E1B00079D028000C30019008F00CE8002801D03C -:10E1C000002206E00199200008F030E8012805D17E -:10E1D00006220199200004F048FC64E0200007F0CA -:10E1E00052EB0090607A08F026E80500200008F065 -:10E1F00026E8009920310978814229D9082D27D2B3 -:10E2000001992000FFF76AFF05004CD0019A290010 -:10E21000200005F057FC286B002844D075612A6B5C -:10E22000300012E0096300C04000000428810200B1 -:10E23000F4F500C0596100C084EF00C0C0EF00C019 -:10E240000C7D02001FE005E028E0049990472AE0D9 -:10E250000722BEE729001231012007F0E4EF002871 -:10E2600021D029000C31FFF739FF04001BD0206BAF -:10E27000002804D07461226B04993000904720007C -:10E2800007F0E0EF0FE0049903223000FFF746FFAC -:10E29000049902223000FFF741FF04E004993000A6 -:10E2A000FFF740FD0700380005B0F0BD7FB5050061 -:10E2B0000C0002D1481E04B070BD002000900190F7 -:10E2C00002902800039407F0DEEA0300687A02282F -:10E2D00005D18F208000216818186A4608E0297A45 -:10E2E000032901D1032805D12800216814306A468A -:10E2F00007F060EF0020DEE7F0B5002885B001D11F -:10E300000120D1E7018945690C1800202700093751 -:10E310000090019003902800029707F0B4EA0600ED -:10E32000280007F0BCEA217821291CD011DC1D2926 -:10E3300019D009DC0B2903D00D2901D00E292FD1CA -:10E34000280014306A4612E01F290CD0202927D15A -:10E3500009E00B00223B07F01AEF0A060D162323F3 -:10E360001F23232306238F20800030186A4607F0DE -:10E3700022EF19E0207CE17B02020A4339002800E9 -:10E3800004F089FD10E06030007801280CD10021F4 -:10E39000280004F00CFE07E0280007F058EF03E027 -:10E3A00021002800FFF782FF00207DE770B50500FF -:10E3B0004B26F60002E0012007F09CEAD548002237 -:10E3C000310007F0D4EB0400F5D0AC20656120816A -:10E3D0002018692107F036EA200070BD70B50500ED -:10E3E0000520C001281800690024002801D004007D -:10E3F00008342E002036002902D1B07FC00611D487 -:10E4000001221100280007F026EFB07FC00609D4D2 -:10E41000E86803210843002CE86003D0A07AFD21BE -:10E420000840A07207F07AEA2800FCF788FD70BD6A -:10E4300038B50400FF21002071310855E168012240 -:10E4400012039143E1600B2189016518A96B0873E0 -:10E45000207A012806D1002211001000130000923A -:10E4600001F0B8F807F0FAEEA86B052107F0F6EB1B -:10E470003920005D000704D401221100200007F0BC -:10E48000EAEE38BD10B50400A348220080680421DC -:10E490000068002307F072EB002805D16069802135 -:10E4A000FCF785FC002010BD200007F06CEB01207C -:10E4B00010BD70B505000E00FFF778FF040024D0F2 -:10E4C00020890722031995481870000A5870002007 -:10E4D0009871D8710F2098700020D8701800310002 -:10E4E000083007F0BCE92800A23007F090EE0028C1 -:10E4F00005D13100280007F042EE002802D02800A4 -:10E50000FFF796FF2000FFF7BDFF70BD70B5040058 -:10E5100083480D001600190003D0062207F09EE97B -:10E5200002E0062107F0D6EA7D480838C68004607C -:10E5300005712000FFF77CFF122007F014EE70BD7C -:10E5400010B50400AD208000201800F01BFC7548B9 -:10E5500021000622A231201807F080E910BDFEB587 -:10E5600005000E001121300007F06CE96D48340001 -:10E5700029181034365194A701000000A86800C083 -:10E5800000040000D6A3FEF40622B01D07F070E9D7 -:10E59000E868C0047ED529000622A231300007F0C9 -:10E5A00068E928002030817F3173C07F70730027B5 -:10E5B00028008030277001006770807FA070000AFB -:10E5C000E0708A7F29007E31201D07F052E9E07853 -:10E5D000A17800020843241D0419FF202B3020706D -:10E5E000000A60700220A0700020E07001A9684657 -:10E5F00000F0A8FB6B461878207101986071E078F4 -:10E60000A17800020843241D041901202070002075 -:10E6100060700E20A07000202900E0700E224A31A8 -:10E62000201D07F026E9E078A17800020843241DA8 -:10E6300004190B2080012818C26B0721C901521848 -:10E640009279002A13D02270641C2770C26B641C5C -:10E650005118C9792170641C2770C06B7121C900E1 -:10E66000641C41180722200007F002E9E41D334929 -:10E67000087E002810D02070641C2770487E641C1F -:10E680002070641C2770641C1A221831200007F0C7 -:10E69000F0E800E000E01A34A01BFEBDF0B5050074 -:10E6A00087B00F0014001E0001A800F075FB0622C1 -:10E6B000390003A807F0DCE86B46200A5C76987600 -:10E6C00004A80722801C01A907F0D2E83200280024 -:10E6D00003A907F0D2ED07B0F0BDFFB581B0060089 -:10E6E00015001F00FFF76CFE040009D0029A2B00F2 -:10E6F00031002000009707F0C4ED2000FFF7CCFEAA -:10E7000005B0F0BDF8B5150006000F00FFF758FE84 -:10E71000040008D02B003A003100200007F0B4EDCF -:10E720002000FFF7B9FEF8BD540000043C4801C0CA -:10E7300024800000544801C0AE020000DC6002C02A -:10E7400010B50968491C03D14168183107F0A0EDE4 -:10E75000002010BD0200080010B50968491C05D151 -:10E7600051681000183107F094ED002010BDF8B585 -:10E7700004000E004B68856930689F68D9680022E4 -:10E780000D284AD017DC0A2861D00CDC801C68D028 -:10E7900001282DD004286BD1002D69D0596828009C -:10E7A00007F07AED64E00B2847D00C2860D12800F0 -:10E7B00001F043F94EE017284FD006DC152857D05A -:10E7C000162855D10120207448E0182850D025285B -:10E7D0004ED1002D4CD0287A032849D1687A0128DF -:10E7E00046D11A685968280007F082E90020F8BD70 -:10E7F0002800627400F05EFD0021012007F0A0E80F -:10E8000007F04EED002804D007F04AED007A032807 -:10E81000ECD0002007F05CECE8E73900280001F0BC -:10E82000D3FB0104090C280001F09FF9DEE76168C1 -:10E830002431200007F02CEDD8E73900280001F042 -:10E8400010FB0104090C280001F088F9CEE728002C -:10E8500001F013F90028EAD0C8E7227461683C315E -:10E86000E7E70121080007F06CE82068A060BDE739 -:10E870003000F8BD70B504004D6808000368E96811 -:10E88000A669092B67D009DC9B1C07F08AEC0B7882 -:10E89000227B7B7B4A7B7B5041567B00172B69D0C8 -:10E8A00005DC152B6ED0162B6CD1012063E0182BE4 -:10E8B00068D0252B66D1002E64D0317A032961D12E -:10E8C000717A01295ED12A686968300007F010E981 -:10E8D00057E00320800207F0E8EC300007F0E8EC96 -:10E8E000300007F04AE9012007F0E6EC012007F0CC -:10E8F000F0EB617C002944D03300628AA23337E018 -:10E90000FFF70EFE61681831200007F0C2EC38E016 -:10E910000C31C879897902020A43032130000023AF -:10E92000EEE72A686968300000F0D6FB29E02A6823 -:10E930006968300000F054FB23E00C310D0030001A -:10E9400007F026EC00281CD0E879A97902020A43D6 -:10E950002B0008210CE00C310D00300007F018EC02 -:10E9600000280ED0E879A97902020A432B00092178 -:10E970003000C5E70020207461683C31C4E720689E -:10E98000A06000205DD2996401000000A46C00C06A -:10E990000004000051F5F0A670BDF8B504000800B1 -:10E9A0000B684D68A66900270E2B1DD008DC9B1C48 -:10E9B00007F000EC0A5A0F59595941595947305933 -:10E9C000152B4FD0162B42D0172B47D0182B4AD1DE -:10E9D00048E0022007F086EB012007F078EC07F012 -:10E9E0007AEC07F07CEC3DE0012007F07CEC6168FC -:10E9F0002000183107F056EC300006F0B8EF300078 -:10EA000006F0B8EF7648076076480760300001F0FE -:10EA100078F827E00121080006F0C4EF002101206A -:10EA200006F098EF0022032130001300FFF782FD6B -:10EA3000616818310EE02A686968300000F056FB02 -:10EA400010E02A686968300000F0D4FA0AE001207A -:10EA5000207404E0200007F026EC03E027746168CE -:10EA60003C31F7E70020F8BD2068A060FAE770B5F8 -:10EA7000040048680A68C568A069092A2CD00FDC20 -:10EA8000921C33D0012A15D0092A22D00A2A2FD16C -:10EA900029000C3107F086EB002827D0082022E05F -:10EAA000152A10D0162A23D0172A21D0182A1FD1B0 -:10EAB000A1680AE007F04EE8002007F008EC00200B -:10EAC00007F014EC12E061684831200007F0EAEB2F -:10EAD0000CE00320607409E029000C3107F062EBC0 -:10EAE000002803D009206074688A6082002070BD0D -:10EAF000080070BD70B50400080049680368CD685F -:10EB0000A269142B17D018DC072B2CD004DC9B1C1B -:10EB100035D0012B10D10EE0082B27D0092B0BD1BB -:10EB200029000C31100007F03EEB002803D009202B -:10EB30006074688A6082002070BD153B002107F078 -:10EB40003AEB0604040405070E04F5E7A16802E0A9 -:10EB5000617461683031200007F0A4EBEBE7617469 -:10EB600061681831F7E703206074E4E729000C318D -:10EB7000100007F018EB0028DDD00820D8E7206847 -:10EB8000A060D8E7184910B54160184A164800211E -:10EB900007F0B0EB1449164A08000C30040007F0E7 -:10EBA000AAEB1148134A2100183007F0A4EB0E48D5 -:10EBB000114A2100303007F09EEB0B480F4A21002C -:10EBC000243007F098EB08480D4A21003C3007F04C -:10EBD00092EB05480B4A2100483007F08CEB10BD42 -:10EBE000B41E01C0B81E01C05C4801C0616A00C00B -:10EBF000756A00C08F6A00C0956B00C0A76C00C02A -:10EC00007B6D00C0016E00C0F8B504000D00170058 -:10EC10001E00002825D04920005DC00700D001203B -:10EC200007F06CEB200007F06EEB07F070EB0622AC -:10EC30002100280006F026EE2021A01D06F0FAEEA5 -:10EC400005000200A11D380007F064EB2900A01D9B -:10EC5000357006F010EF200007F060EB012007F0A0 -:10EC600046EBF8BDF8B50D00160006F060EF0400A5 -:10EC70000C20694606F0C2EE030022003100280095 -:10EC800006F0C0EEF8BD0020FF49C860704777B5B8 -:10EC900083B00D001400FC4EF068814228D101229F -:10ECA000F11C03A807F0E6E9002821D107F03AEBB0 -:10ECB000002809D0002C2DD1002007F038EBF348B4 -:10ECC000012107F038EB25E0012C23D1280002AA0E -:10ECD00003A901AB07F032EB6B461A79197A2800C9 -:10ECE00007F030EB07F032EB012007F020EB11E0EA -:10ECF00023000122280003A907F02CEB6B46187BA8 -:10ED0000F070F560B168002904D13070B56007F08B -:10ED10000AEBB070002006B070BDDB4938B50200C8 -:10ED2000CC780094C96800980906090EFFF7AFFF78 -:10ED300038BD10B5D44CE0782070E068A06007F0D2 -:10ED40000EEB607007F0EEEAA07010BD10B507F092 -:10ED500006EBCD49487010BDCB4A002801D013788E -:10ED60000370002901D090680860704730B5040036 -:10ED7000C54D0020AD68A5420ED1C34C2478A5072F -:10ED8000AD0F8D4208D12107890F914204D1A10610 -:10ED9000890F99423A91C4B501000000A07000C0EB -:10EDA000000400009764AFE000D1012030BDBB48F3 -:10EDB000C01C0078800701D10120704702207047F5 -:10EDC000B6490A78027089684170704770B50500CD -:10EDD0000C0007F0D2EA002801D1B24805E0280073 -:10EDE00007F0CEEA002801D1AF480440200070BDF2 -:10EDF000F8B504000E0017001D001100300007F0E8 -:10EE0000C4EA3900300007F0C4EA0100200007F02E -:10EE1000C4EA200007F0C4EA200007F0C6EA07F0C1 -:10EE2000C8EA2900200007F0C8EAF8BD70B5040060 -:10EE30000D00080006F0B0EF002803D02800A23033 -:10EE400007F06AEA002C06D0002007F062EA974833 -:10EE50000068804702E0012007F05AEA012007F02D -:10EE600050EA0120000607F0ACEA07F0AEEA70BDF8 -:10EE7000FEB500210400894D687807F0AAEA207ADF -:10EE8000032804D1200007F0A8EA002807D1286849 -:10EE90000090A968AA780906090EFFF702FF207AF8 -:10EEA0000027012803D1E068C00400D50127210014 -:10EEB0003800FFF7BBFF2200613200922600403687 -:10EEC0002000317E00224A301300019006F0C0ED90 -:10EED000002F03D101002000FFF778FF0300327EEE -:10EEE00001992000FFF784FF07F07AEA00206860AC -:10EEF000FEBD70B505006E4C0E0020790021800625 -:10EF0000C20F280007F070EA2079C00604D531004E -:10EF1000280007F06EEA70BD280007F046EA07F007 -:10EF20006CEA70BD70B5624C2079C006C50F201D1B -:10EF300007F066EA2079C006C00FA84201D007F0AA -:10EF400064EA00F04DFE70BD70B50400584E0D002F -:10EF5000301D07F05EEA207A012803D12900301D18 -:10EF600007F05AEA70BD0021012010B506F07CEED2 -:10EF700004000DD007F054EA01002000FFF7E4FF81 -:10EF8000FFF7D0FFFF207D30015D2000FFF7B1FFCC -:10EF900010BDF8B51500070008004978027809028D -:10EFA0001143002634000C392A002C3006F0A0EC66 -:10EFB000E869002801D04478861C6A6B0092A86931 -:10EFC00023004178801C320006F042ED0100380039 -:10EFD000FFF7FCFEF8BD7CB51500304A0E00127834 -:10EFE000334C1900920705D0201D07F01EEA00F0EF -:10EFF000F7FD7CBD2F4A00910100019233002A00E9 -:10F00000201D07F016EA7CBDF0B50C000700123198 -:10F0100095B007F0D2E8002820D0210038006A46D9 -:10F02000FFF7B7FF050007F0FCE906000100380014 -:10F03000FFF78AFF2000089A330029002A30FFF7E3 -:10F04000CAFFFFF76FFFFF207D30C15D3800FFF77B -:10F0500050FF049A0399380007F0EEE915B0F0BDAF -:10F0600001207047F7B582B00C00160007F0E8E900 -:10F070000F000500210008222031684606F00CEC44 -:10F08000F07E07F0E2E90100607822780002104388 -:10F09000001D000106F01CEC00210DE010F600C080 -:10F0A000FF070000FF3F0080FFFF3F80C4BB02005E -:10F0B000365C0004404B4C00009A019B801859417B -:10F0C000009030003030019106F03EED009A281A91 -:10F0D0008018019B002159410191009002990B2059 -:10F0E00080010818816B019B009ACB618A61806B5B -:10F0F000210047620562029807F0AAE905B0F0BD59 -:10F10000F7B59EB004000E00007A0D0012360328F9 -:10F1100001D0002805D13100200007F04EE800287A -:10F120007BD02900200008AAFFF733FF079007F0E3 -:10F1300078E9070001002000FFF706FF2800109A79 -:10F1400007993B002A30FFF746FFFFF7EBFE32003E -:10F15000200008A907F080E90998002803D0099841 -:10F16000C1789F20015528002030417A027A07009B -:10F1700008021043A0210853F848099B0078820731 -:10F18000920F00926878297802020A433900200021 -:10F1900007F066E9069007F054E906000591082299 -:10F1A000390002A857E15ACD010000009C7400C04C -:10F1B00000040000E29A545806F078EB2098C07ED4 -:10F1C00007F04CE969782A7809021143091D0A0100 -:10F1D0000100100006F086EB029A039B80180027BE -:10F1E00039000290209859413030039106F0B6EC76 -:10F1F000029A301A8018039B3900594102900B2063 -:10F20000800127180391B86B029A8261C161BA6BC1 -:10F21000059916625162207A012809D1079A009255 -:10F22000209A2900200008AB00F0D3FF3BE026E045 -:10F230002900200007F016E9069A0999200007F036 -:10F240001EE90C9A0B99200007F000E90D980021A7 -:10F25000002805D0BA6B8078127B904200D0012143 -:10F26000C34D00290DD06868401C0328686006D390 -:10F2700007220021200006F04EEB0020686021B03C -:10F28000F0BD002068600798BA490F28087905D9B1 -:10F29000F7221040C008C000801C03E00822104381 -:10F2A000C008C0000871FF207D30015D2000FFF71D -:10F2B0002AFEE4E770B5040014300500FFF776FC81 -:10F2C000A1692800183107F0DEE8002070BD10B5F4 -:10F2D000A84C21798906CA0F002107F090E820790F -:10F2E000800601D5012000E0002007F0D0E810BD25 -:10F2F000F0B50400002085B007F0CCE803208002C0 -:10F3000006F0F0EF20003E3007F0C8E82000217A38 -:10F31000A0302600002780360329049011D108026E -:10F320002018007A03280CD120000621A23006F014 -:10F33000B2EA2021B01E06F0AEEAB777F77704985C -:10F34000078006F090EA0190207A03280FD1607AB6 -:10F3500003280CD1F7208000251801E007F0A2E86F -:10F3600068680028FAD10021200007F0A0E8019881 -:10F3700006F08CEA200007F09EE8200007F09EE8E7 -:10F380002000FF300621723006F084EA2000FF30B2 -:10F3900061300390078306F036EB002800D120008F -:10F3A000FF306130008B07F08EE80021012006F06D -:10F3B00006EB207A07F08AE80121080006F006EB48 -:10F3C0000021012006F0DAEA4D20C000201807F0E5 -:10F3D00082E8200006F0D2EB200006F044EF207A0D -:10F3E000002801D107F07AE8200007F07CE8624DA0 -:10F3F0000E21686A401D06F032EB029007F076E8B5 -:10F4000000220092686A0299401D130006F02AEB60 -:10F41000696A0300029A491D2000FFF7F3FC2000EF -:10F4200006F07CEB00221100200007F064E80121C7 -:10F43000200007F064E80B2080012018806B40302A -:10F4400047830520C0012518A86906F084EAAF614A -:10F450006869002802D006F082EA6F61E06841071F -:10F4600001D4C0060BD52869002802D006F076EA40 -:10F470002F61E868002802D006F070EAEF60207A79 -:10F4800003280BD12869002802D006F068EA2F6112 -:10F49000E868002802D006F062EAEF60E068102118 -:10F4A000F777049A8843642111803449314D8843A9 -:10F4B000E06003986121C7732000C943C030818395 -:10F4C000C1835221281D06F0E6E92879202108434E -:10F4D00028712000FFF7FBFEB92080000122FF21E8 -:10F4E000201806F060EA200007F00CE810E620493A -:10F4F00000204860704710B5417A022903D1C068E6 -:10F50000C0040DD40AE0416980694830814207D1C6 -:10F5100006F048EC16498968884201D0002010BDE9 -:10F52000012010BD10B5417A022905D106F0D2E9BB -:10F530008F218900401800E0143001684068020003 -:10F540003032914205D00C3A914202D03C30814297 -:10F5500001D1012010BD002010BD10B5417A022953 -:10F560000ED106F0B8E98F218900401809E00000AB -:10F5700010F600C0365C0004E458000404000200E9 -:10F580001430016840681830814201D1012010BD5B -:10F59000002010BD2249002010B5486000F08DFE0B -:10F5A00010BD0100012010B506F0B0EF10BDF0B5A0 -:10F5B000040087B0C81F765101000000987800C091 -:10F5C00000040000C279FCD2684606F0AEEF206865 -:10F5D0001A22694606F074E9206800251A300126CF -:10F5E0002060A90068460C18A07A4006800F06F03B -:10F5F000A0EF0700E07A0107090F30008840411EA4 -:10F60000380006F09AEFE07A310000098140491E87 -:10F61000380006F096EFA07A0107090F380006F0CF -:10F6200094EFA189380006F094EF6D1C042DD8DB0F -:10F6300007B0F0BD10F600C030B5FC4C039D2FC4E0 -:10F6400030BD70B5160004000D000A00F849F748F7 -:10F6500006F082EF00281CD0687829780002084361 -:10F660002D2806D1F1481C2201682000613006F0E7 -:10F6700028E9E06840210843032109026118E0609D -:10F6800089682031C97D890702D580210843E0605F -:10F6900070BDE7483200290006F062EF70BDF8B592 -:10F6A00004000E00E248150006F05EEF0022110093 -:10F6B000100013000092FFF7BFFF2000FEF7A8FE26 -:10F6C000040008D0337901222900200006F050EF11 -:10F6D0002000FEF709FFF8BDD64810B544690820A0 -:10F6E000044001D106F048EF06F02AED002C02D1CB -:10F6F000082006F046EF10BDF3B58BB006000020E1 -:10F700000990079006900590049006F086E900287D -:10F7100001D1FFF7E1FFFF207130805D002806D1A5 -:10F720000C982021083006F0A4E9002801D101201E -:10F7300009900320002200023018009281680B001B -:10F740000A000800253318323530FFF775FF099895 -:10F7500000287ED1B64806F018EFB548FF21001FFB -:10F760000160300006F014EF00280A9071D00A986A -:10F7700005AB01890D18A020825BAF48009202689A -:10F7800028000C99521D093006F006EF6B46988A46 -:10F790000D210838059029700C990822681C06F084 -:10F7A00090E80C984D303DE0001F0004089C000CD0 -:10F7B0000590E178A2780F021743874237D8607826 -:10F7C0002178000208437F280FD005DC212822D0B1 -:10F7D00030281AD106941EE0DD280BD0FF385038AF -:10F7E00013D17F202070002060709148210006F026 -:10F7F000D8EE10E0201D06F0D8EE032801D10794C2 -:10F8000003E08B48210006F0CCEE2A004E322100A6 -:10F810003000FFF716FF6B46988AC01B05900898CA -:10F82000C019001D6B460890988A0428BCD28348F2 -:10F830006B463218401E311804A807C330007C4BB9 -:10F84000069A079906F0B4EE00281CD0F06804214F -:10F8500000E01FE088436B46197CC907490F084345 -:10F86000F060734808A906F0A8EE290050314872EC -:10F87000000A88720898491D06F0AEE90A9806F059 -:10F88000A0EE012803D10A9806F0AEE902E009983B -:10F89000002804D06A4A0C993000FFF700FF0DB031 -:10F8A000F0BDF3B58BB006000020099007900590DD -:10F8B0000490039006F0B0E8002801D1FFF70CFF98 -:10F8C0003000FF3061300A90007C002801D0012018 -:10F8D00009900320002200023018009281680B007A -:10F8E0000A000800253318323530FFF7A5FE0998C5 -:10F8F00000287ED14E4806F048EE300006F048EE73 -:10F900000028089075D0089807AA01890D182800CA -:10F910000C99093006F058EE6B46988B444908382C -:10F920000790FF20091F08600B2129700C98653093 -:10F930003AE0001F0004069C000C0790E178A278D2 -:10F940000F021743874234D86078217800020843B9 -:10F950007F2817D005DC21281FD0302817D1049428 -:10F960001BE0DD2807D0FF38503810D17F202070F1 -:10F970000020607006E0201D06F016EE032801D17D -:10F9800005940AE02A48210006F00AEE05E02A0064 -:10F99000623221003000FFF754FE6B46988BC01B8B -:10F9A00007900698C019001D6B460690988B042896 -:10F9B000BFD222486B463218401E311803A807C335 -:10F9C00030001B4B22C80CB101000000947C00C029 -:10F9D00000040000452FF280049A059906F0F2ED2C -:10F9E00000281CD0F068042188436B46197BC907A6 -:10F9F000490F0843F060134806A906F0E8ED290016 -:10FA00006031487300E014E0000A887306980931F9 -:10FA100006F0ECE8089806F0DEED012803D108981E -:10FA200006F0ECE805E00A9902200874099800281D -:10FA300005D0084A0C99521C3000FFF73AFE38E70F -:10FA4000B04801C024F600C0C0A20080ECF500C0A0 -:10FA50001F0300002B80000010B5040006F0C2ED6B -:10FA6000E068400706D5200006F0C0ED002801D16F -:10FA7000012100E000212000FEF7ECFCE0680121FC -:10FA800009030843E060FF20062171300155494811 -:10FA90000088002802D0200006F094E810BD70B560 -:10FAA000050045480C0006F06AED207B002804D1D3 -:10FAB0002800FFF7D1FF002601E00026F6432800CA -:10FAC000FEF7B0FC050008D0237A227B3B492800D2 -:10FAD00006F058ED2800FEF711FD300070BD70B53E -:10FAE0000500002634480C00F64306F048ED207B64 -:10FAF000002804D12800FFF7AFFF002602E028000D -:10FB0000FEF7D2FC2800FEF78DFC050009D02B493A -:10FB1000237A227B491C280006F034ED2800FEF7EA -:10FB2000EDFC300070BD2448001F0068704770B5C0 -:10FB300014000500012205F0A2EF1F48001F002C51 -:10FB400004D00B2189016918496A00E0FF21016096 -:10FB500070BD10B50400FEF7A7FC2000FEF762FCA4 -:10FB6000040006D00021200006F044ED2000FEF73E -:10FB7000C5FC10BD70B500250600ED4306F012ED82 -:10FB800004000DD020890E2100190170200006F01C -:10FB900022ED012803D1200006F030E800E0002526 -:10FBA0006D1C05D13000FFF799FB3000FFF7D1FF46 -:10FBB00070BD0000C43B01C024F600C02B800000D3 -:10FBC00008B500910A22694605F0B8EE08BD08B5EF -:10FBD00000910C22694605F0B2EE08BD70B5040034 -:10FBE0000D00012096B005F086EE060005F0C6EF88 -:10FBF000607822780102114320000C392C3001AAD0 -:10FC000005F094EE0B2189017018826BFD493C329E -:10FC10002B0001A806F0F2EC16B070BD012010B563 -:10FC200006F0F0EC002817D0F648001F00794006D7 -:10FC300012D4F448223005F0A6EF002801DD01249B -:10FC400000E00024F04821000068FFF7C7FFEF48FC -:10FC500021000068FFF7C2FF10BDFFB58DB0002086 -:10FC60000E0001000690169F179D03A8FFF79CF851 -:10FC70000D9806F0CCEC059038001C3008903889BF -:10FC8000C419E3480068017900910D98BB218900EF -:10FC900041180197109B0F9A300006F0BCEC011B35 -:10FCA0000904090C109A0791DA49082A0A9001D12F -:10FCB000086000E04860310006F0B0EC310004223A -:10FCC00024310A90099005F006EE0A986B46001D53 -:10FCD0000A9030002030417D1974807D5874880668 -:10FCE00001D5012100E000210D9806F01CEC0D98D3 -:10FCF00006F098EC012806D10A990D9806F096ECCA -:10FD00000A9940180A906B46187B800730D1BD488D -:10FD1000001F007940062BD40A98029000200700AB -:10FD200001900090B748223005F02CEF002802D057 -:10FD30000120019000900D982030807E800605D42F -:10FD4000B0480A3005F01EEF002801D001200090D5 -:10FD5000AC482A3005F016EF002800D00127009AA1 -:10FD6000019902983B0006F066EC0A9940180A9047 -:10FD70000A9A0D982D2106F062EC0A9940180A9013 -:10FD80000C900D983100C0684C3140070F1D0028C1 -:10FD90000B9114DA0B9805F0F6EE79783B780A02AD -:10FDA000010007981A43029201910090109A0C9951 -:10FDB0002300302006F046EC0A9940180A903000E3 -:10FDC0000A990122373006F042EC0A9942180D9840 -:10FDD0003D210A922916463901000000908000C09A -:10FDE00000040000F2C2486506F032EC0A9942189D -:10FDF0000D9848210A9206F02CEC0A9942180D98A9 -:10FE00004A210A9206F024EC0A9940180A900D98AB -:10FE100006F0DAEA002805D00AA8FFF7E6FB0D98FD -:10FE200006F022EC0B9805F0B8EE79783B780A02E0 -:10FE3000010007981A436E4607C62300109A0A99D4 -:10FE4000DD2006F00AEC0A9940180A90280006F016 -:10FE500010EC0698E861089805998170E86901211D -:10FE600009038843E861059806F006EC6C60E862D7 -:10FE70000A982200001B20380604360C300A26702F -:10FE800060700D9801210C2306F0FAEB6078217860 -:10FE9000000208430A99801B401809990A90091B1F -:10FEA00008392973011B08396973617822780902BE -:10FEB00011431C31E9811099082902D15B4908607E -:10FEC00004E05B490860280006F0DEEBFF22062113 -:10FED000A01D06F0DEEB11B0F0BD70B504000E0001 -:10FEE000022107209CB005F0C4ED002804D12000B9 -:10FEF00005F0C2ED002802D003201CB070BD03A99C -:10FF000002A8FEF75BFF30004030817E002903D05D -:10FF1000417E0491807E03E0029804903C20805D45 -:10FF20006B4605060B2080012018816B2D0E0D738A -:10FF3000806B197C4173200006F0AEEB0121092093 -:10FF400005F062ED0021092005F036ED032006F0F2 -:10FF5000A8EB049800222900FEF7CBFEFEF71BFF5A -:10FF60003100200000F0CCF9310005A806F09CEB30 -:10FF700008AB987D597D00020843A02110AB0853BF -:10FF8000987AC00704D0002229002000FFF7D9FD8D -:10FF9000200005F08EED002800D0FEE72000803024 -:10FFA000C16BAC250D81C16B1C4B4A191A60826B69 -:10FFB000204808230260019200913200200005A928 -:10FFC000FFF755FE2000C0304168154B0D81416898 -:10FFD0004A191A60026818480523026001920091CC -:10FFE0003200200005A9FFF742FE08AB987D597D3D -:10FFF0000002084306F05CEB0221092005F004ED45 +:1089D0000000000000000000000000000000000097 +:1089E0000000000000000000000000000000000087 +:1089F0000000000000000000566C76D50100000069 +:108A000000000004000400002060D299CA49002040 +:108A10008880091F08607047F8B50C0000F096E9DF +:108A20000090200000F096E9C34900F098E96079D1 +:108A300021790002C04F08430228B88004D9009869 +:108A400000F090E90020F8BDA41DBC4E002511E007 +:108A50006820684321783154617880194170801C06 +:108A6000A11C00F0ECF8E078A17800020843241D76 +:108A700004196D1CB888A842EADC009800F072E97D +:108A80000120F8BD10B50400AB4800F064E92040B7 +:108A900000D0012010BDF7B582B00600A64881883D +:108AA00000296BD0A54F002464E000F050E9682154 +:108AB00061430500785C049A824303D0280000F0EB +:108AC00052E956E09D4AC919D0321070487850706A +:108AD000891C901C00F0B3F8280000F044E9300035 +:108AE00000F0B6F8002844D0944D0024D0356878C2 +:108AF00001270009012803D1300000F04AF825E0E1 +:108B0000022823D1318970698919009100F02EE97A +:108B1000040001D13C0017E0200000F02CE9010026 +:108B2000874B300001AA00F02AE9002803D1200079 +:108B300000F028E9EEE700996B469B88002212318D +:108B4000200000F024E90024002C02D16878C0073E +:108B500004D00398002C076008D102E0039800219C +:108B600001606878800701D40020B080012005B042 +:108B7000F0BD641C70488088A04296DC0020F6E7B7 +:108B800001000020002903D00968002900D001203D +:108B90007047FEB5FF210022F53101904669694812 +:108BA00000F0F8E8040023D0AC2025182081122121 +:108BB000280000F0F4E81420287100202F0014375A +:108BC0006871009700980E2100F0E8E80223002069 +:108BD000AB71E8715920C0003218390001980E318C +:108BE000029200F063F8070003D1200000F0DAE8F9 +:108BF000FEBD009802990622801D00F0D8E83900D9 +:108C000000980622123100F0D2E80099C120C0007D +:108C10000873000A4873019804218088A080082006 +:108C2000207330696061F07A6870B07A28702A2009 +:108C3000A8700020E870200000F0BCE8FEBD10B570 +:108C40004A780B7812021A43921C00F0B0E810BD6B +:108C500010B501890400243009188AB00E390E229B +:108C600006A800F0A4E8344800F074E801002000F1 +:108C700004AA00F0A4E8002816D000F0A4E82F4CC5 +:108C800004A9D034A01C00F0A2E8002805D0A01C44 +:108C900001A900F0A0E8029C00E0002405980E2243 +:108CA00006A900F084E820000AB010BD70B50C00E1 +:108CB000160000290DD000280BD00189C122091807 +:108CC0002148D200006820300918C8888D1D9042C4 +:108CD00001D0002070BD012B05D11022200000F032 +:108CE00066E8083404E008220831200000F05EE85D +:108CF00001204002A071000AE0712000AD1C062294 +:108D00003100083000F052E8290020000422183118 +:108D10000E3000F04CE82900200006220831123005 +:108D200000F044E82900200004220E31183000F041 +:108D30003EE8200070BD000024040004DC0F0004A5 +:108D40004C0600003805000498BA020004F01FE544 +:108D5000D11B020004F01FE5E0CC310004F01FE558 +:108D600000CD310004F01FE5D91B020004F01FE51F +:108D70009BA5010004F01FE5B5A5010004F01FE567 +:108D80006B45310004F01FE5BDA6010004F01FE5AE +:108D9000BDA5010004F01FE56DD5310004F01FE50D +:108DA000E8CB310004F01FE519D5310004F01FE5D0 +:108DB0005CCA310004F01FE5C528020004F01FE57D +:108DC0009B46310004F01FE54D43310004F01FE5E0 +:108DD0005543310004F01FE58141310000000000DF +:108DE0000000000000000000000000000000000083 +:108DF0000000000000000000000000000000000073 +:108E00000000000000000000D6BA9411010000002C +:108E1000FC030004A002000032C74D6E00000000F9 +:108E20000000000000000000000000000000000042 +:108E30000000000000000000000000000000000032 +:108E40000000000000000000000000000000000022 +:108E50000000000000000000000000000000000012 +:108E60000000000000000000000000000000000002 +:108E700000000000000000000000000000000000F2 +:108E800000000000010000000000000000000000E1 +:108E9000804B0004F00710000200000000000000FA +:108EA00000000000B84B0004EC070300F04B000486 +:108EB0007C0901000100000000000000000000002B +:108EC000284C00043C0304000200000000000000E5 +:108ED00000000000604C0004E0010300984C000416 +:108EE000D4030400010000000000000000000000A6 +:108EF000D04C0004EC07010001000000000000005D +:108F000000000000084D0004EC0701000300000011 +:108F10000000000000000000404D0004DC010500DE +:108F2000784D000424070100B04D00041C0000002F +:108F3000010000000000000000000000E84D0004F7 +:108F40007C0901000100000000000000000000009A +:108F5000204E00041002010001000000000000008B +:108F600000000000584E0004EC0703000100000060 +:108F70000000000000000000904E00043C000A00C9 +:108F8000010000000000000000000000C84E0004C6 +:108F90001C040300010000000000000000000000AD +:108FA000004F00041C04030001000000000000004A +:108FB00000000000384F0004FC0008000000000022 +:108FC00000000000000000000000000000000000A1 +:108FD0000400000000000000000000000400000089 +:108FE0000C00000008000000080000000C00000059 +:108FF0000000000000000000000000000000000071 +:109000000000000044A000804CA0008054A000801C +:109010005CA0008064A000806CA0008074A0008030 +:109020007CA0008034A000803CA000801CA00080B8 +:1090300024A000802CA0008014A0008040A000800C +:1090400048A0008050A0008058A0008060A0008050 +:1090500068A0008070A0008078A0008030A0008010 +:1090600038A0008018A0008020A0008028A00080E8 +:1090700010A00080001F1F00280019000A00FFFF39 +:10908000440744070000000000000000000000004A +:109090000000000028230000282300009411000095 +:1090A0002823000070170000B80B0000B80B000068 +:1090B000B80B0000000100007CA4771C0100000038 +:1090C000001100C000040000A2EFCB2510B5002461 +:1090D0000CF044EE2E49C878EE28FCD12078887038 +:1090E0002B48641C001DC21D23780370641C401CA7 +:1090F0009042F9D303204004844203D10124A40602 +:10910000AA200CE02348844203D10324A407BB20F7 +:1091100005E02148844201D1CC2000E0FF20C87046 +:10912000D9E71B48C078EE2800D1CFE7704770B56B +:109130000CF018EE194D6C6804E06068002800D04F +:1091400080472468002CF8D1FFF7EBFF2878401CFB +:109150000006000E28700CF00AEE0CF00CEEEAE7A8 +:109160000F4810B50CF00AEE10BD10B504000CF05D +:10917000F6ED0A4B59680A0000E00968002902D0A0 +:10918000A142FAD101E022605C600CF0FCED10BD60 +:109190006001008000400104003003C00CF200C0F8 +:1091A000903001C010B5040073D0632120000CF092 +:1091B000EEED0820207000206070FF20401DA070A0 +:1091C000000AE0700221002021716071FF20801DE3 +:1091D0002072000A60720020A172E072FF20C01DA0 +:1091E000A073000AE073002021746074FF2008302F +:1091F0002075000A6075080AA175E0753C2020768C +:10920000FF201730A076000AE076080A2177607701 +:10921000FF222000183220300270120A42700A0A1F +:109220008170C270FF2227328271120AC2710A0A4B +:1092300001724272FF2228320273120A42730A0A32 +:109240008173C273FF22293210308270120AC270F9 +:109250000A0A01714271FF222A320272120A427214 +:109260000A0A8172C272FF2225328273120AC27305 +:10927000103010220270002203004270FF204A309A +:109280005034A070000AE070080A21713221607128 +:10929000997510BD0521C90140180089002800D02A +:1092A00001207047FFB581B01D000F00C878897894 +:1092B00006020E4301990520C00109184C68002CD4 +:1092C00004D1FF4848600400FFF76CFF6078217804 +:1092D00000020843012D03D1F878B978000205E0B7 +:1092E000022D05D1F978BA7809021143084306E046 +:1092F000032D07D1F978BA78090211438843207009 +:10930000000A607003983F1D001F029707043F0C7E +:10931000D0E0042F74D30299C8788A7800021043F1 +:109320004A780B7811021943001DFF2300042533EE +:10933000000CCA1A994275D025DCE24BCA1A994230 +:109340005FD011DCFF39491F45D001294DD00229DA +:1093500069D1012D03D0022D3CD171073AD52200ED +:109360006032210012318AE00F2A5DD0102AEFD13D +:10937000012D03D0022DEFD1B106EFD522005B32D3 +:10938000210024317BE0042A64D00EDC022A56D06E +:10939000032ADDD1012D03D0022DDDD131067FD589 +:1093A00022005E322100303169E0052A5DD0252A95 +:1093B00075D1012D03D0022D72D1310570D5210058 +:1093C0000298002256310CF0E6EC56210A5D019914 +:1093D00060310A7064E0012D03D0022D60D1F107E5 +:1093E0005ED022005832A11D49E0012D03D0022D8C +:1093F00056D1B10754D522005A3221000C313EE03B +:109400005BE0012D03D0022D4AD1310748D5210060 +:109410000298002218310CF0BEEC0199227E4031F6 +:10942000CA773DE02FE03AE0012D03D0022D37D17D +:10943000F10635D52200593221001E311FE0012DE1 +:1094400003D0022D2CD171062AD522005C322100D6 +:109450002A3114E0012D03D0022D21D1F1051FD5B1 +:1094600022005D322100363109E0012D03D0022DAA +:1094700016D1B10514D522005F3221003C3102988B +:109480000CF088EC0CE0012D03D0022D08D1710501 +:1094900006D52100029842310CF080EC00E0380043 +:1094A000874203D3391A0F043F0C00E000270299CA +:1094B00008180290002F00D02BE705B0F0BD0A007D +:1094C0000521C901401810B5D5E4BD7201000000A6 +:1094D000FC1400C0000400005FA6A9FD4168901CB8 +:1094E000002904D058220CF068EC562010BD002052 +:1094F00010BD70B50500059E049C0020002905D014 +:109500005178002900D10121197070BD1978002906 +:10951000FBD0491E0906090E1970F6D150780028B3 +:1095200001D018700FE0B00041190520C0010818E3 +:109530004068002807D04178027809021143A1430E +:109540000170090A4170012070BD10B50C001100B6 +:10955000002C03D11A04120C0CF032EC10BDF1B542 +:1095600082B002980CF030EC070402983F140CF023 +:1095700030EC05042D1400260299B0004118052096 +:10958000C00108184468002C79D060782178000266 +:109590000843800717D5217B0120B94200DD002058 +:1095A0000221009123002200010002985A330C325C +:1095B0000196FFF79EFF002805D002983B001A2273 +:1095C0003100FFF7C2FF607821780002084380066F +:1095D00018D52421095D0120B94200DA002020219C +:1095E000009123002200010002985B33243201968F +:1095F000FFF77FFF002805D002983B001D223100B5 +:10960000FFF7A3FF6078217800020843C00717D056 +:10961000A17901204942A94200DD002001210091E9 +:109620002300010002985833A21D0196FFF761FF45 +:10963000002805D002982B0019223100FFF785FF82 +:109640006078217800020843C00618D5A17F012068 +:109650004942A94200DA0020102100912300220093 +:109660000100029859331E320196FFF742FF00288D +:1096700005D002982B001C223100FFF766FF761CF4 +:109680003606360E012E00D276E7FEBD11480022C6 +:109690001038C168002903D14178491C417000E0AD +:1096A0004270C2607047F8B507000520C0013D1840 +:1096B0006C68002C39D0607821780002084340059E +:1096C00033D538000CF080EB01004034E078A3780B +:1096D000020203E0C0F200C0070100005C4E1A4322 +:1096E0000020914222DC7188491C0904090C718018 +:1096F0006279237912021A438A4216D871788A4213 +:1097000002D93189012910D1040070800CF030EBAE +:1097100074700CF042EB34812889012189020843DE +:1097200028814904380001F0EEFCF8BD70803081DA +:10973000F8BD10B504000CF01CEB0521C90161183F +:109740000C8900220A810CF028EB200010BD0521B5 +:109750000200C901511849680020002906D04A7842 +:109760000B7811021943090700D501207047052124 +:10977000C90140184068002803D0002160304170C2 +:109780008170704770B5002031490400087048802E +:109790008880C88008810D00C8601035487063203B +:1097A00060434019FFF708FD641C012CF7D370BD1E +:1097B000002010B50CF010EB0521C90140184068DD +:1097C00000280ED041780278090211430122D2020A +:1097D00091430170090A41701D4801784908490008 +:1097E000017010BD0521C901421810B5516800294A +:1097F00011D04B780C781902214309050BD5144977 +:109800000978C90707D011890123DB0219431181A7 +:10981000190401F078FC10BD0521C901411810B5EB +:109820000A890A810121C90601F06DFC10BD0521DC +:10983000C90142185168002902D10549103151600F +:109840000B7E5F2240311354897D60300170704778 +:10985000B0F200C0F7B582B006000CF0C2EA8F216A +:109860008900070044180CF084EA2200DC3205006D +:1098700000922020C35D049A039930000CF0B4EAF2 +:1098800028000CF08AEA05B0F0BDFEB504000CF02B +:1098900070EA07000B208001201840694030818960 +:1098A000FA480CF0A6EA0500022620000CF0A4EA13 +:1098B0000C30010040310A7D002A3DD00268002AA8 +:1098C0003AD0521E026019D1087D012808D9CE82F3 +:1098D0002100FF3102224A31293C751F010000009E +:1098E000F81800C0000400007F450177200009F04F +:1098F00022FD2BE0012806D1CA8A2100FF314A311E +:10990000200009F046FB0121200009F0E4FD1DE0E4 +:10991000097D03291AD1AA4218D2007D00280ED150 +:109920006B460290597A02003143597201900090BF +:109930000299200035230CF06EEA002806D0FF20A3 +:109940005130015B01222000FFF78EFFE27AA17AFD +:1099500020000CF064EA0400B1D138000CF026EAD3 +:10996000FEBD70B598B0018946690D1830000CF045 +:1099700042EA8F21890044182420005D01281BD170 +:1099800069782A780902114328002C300C3903AA7F +:109990000CF048EA0B208001301843694C20C15A72 +:1099A000200001222D306D4607C530001A7B2300B0 +:1099B000253303A90CF03AEA18B070BD08B5009140 +:1099C00069460CF038EA08BD10B50CF038EA10BD55 +:1099D000F3B583B0050003260CF0D4E9029028000B +:1099E0000CF008EAFF220021493251551922520198 +:1099F00080180172AB480088002803D00CF022EADE +:109A000001F059FC28000CF022EA2C00012720006C +:109A10000CF0FCE94C300775E27AA17A20000CF0DA +:109A2000FEE90400F3D1049A00922A009E497E3296 +:109A3000280003230CF00EEA401C00D101260298F6 +:109A40000CF0B4E9300028E770B50C0016001D00DA +:109A5000002801D00CF002EA182120000CF0AAE93D +:109A60003D202070162060706878A070E078082192 +:109A70000843FB21E0700840B1788907C90F8900CD +:109A80000843E0702978800880008906890F084320 +:109A9000E07070BDF0B5040085B00CF0B8E900903E +:109AA00020000CF0A8E90500207A022804D120004B +:109AB00006217E300CF07EE90CF064E906000121FD +:109AC000200000E0012109F006FDE27AA17A2000E1 +:109AD0000CF0A4E90028F5D130000CF068E926006C +:109AE000803602E001200CF0BEE9307A0CF0BEE9CD +:109AF0000028F7D0132040012E1802E001200CF0BE +:109B0000B2E9F07A0028F9D10D2080012818006907 +:109B10000CF0B0E92800203003904078092292012F +:109B200001070027A618002901DB80061AD5E81DC9 +:109B3000FF30FA3002904069002803D00CF09EE913 +:109B40000298476103984078010701D4800609D53F +:109B50002800803001900068002803D00CF08EE9C6 +:109B6000019801E028008030076077620398407810 +:109B7000010701D4800604D5F06A002801D00CF05A +:109B80007EE9F762E06804218843E060200020302D +:109B9000417EF722114041760CF074E90CF076E931 +:109BA000002102200CF076E90CF078E90CF07AE95B +:109BB000009B2A0029000833483264312800FFF74F +:109BC00043FF20000CF072E9002802D00CF0DAE824 +:109BD000FEE7207A022807D120000CF06CE900286B +:109BE00002D00CF0D0E8FEE70B2080010122FF211B +:109BF00020180CF064E90CF066E9002806D00CF09F +:109C000066E9012102200CF046E90DE00021032065 +:109C10000CF060E900200CF062E9012103200CF057 +:109C200062E922491F2008620CF060E935E610B5B0 +:109C30000AF060F810BDFEB505000CF0DCE8040089 +:109C400028000CF0E4E807000E21601801900CF0E9 +:109C500052E9060001980E210CF050E90100387A13 +:109C60000B2783071248BF01EF197F6922188F2045 +:109C70003F7B80009B0F2018002F4ED00027012B28 +:109C800001D0022B03D1002947D1022317E02B7A00 +:109C9000032B0FD16B7A002B16D100293DD013E096 +:109CA000881300005C3A01C060EB3100C0A0008066 +:109CB0001D020000002930D0002E03D001232421F2 +:109CC0000B5401E024210F54616C012927D121009C +:109CD00020310D00009749780B0702D5890607D57A +:109CE00001E08B0602D5EC219A44C91D0100000059 +:109CF000F41C00C000040000F8130F25095903E00C +:109D0000090702D5EA21095D009169788B070ED415 +:109D10000B0701D4890603D56B461978090706D5C8 +:109D2000616A002903D020300079002801D1002089 +:109D3000FEBD606A012803D1D07840084000D07091 +:109D40000120FEBD70B50C00160045782268017830 +:109D50001170090A5170226841789170090AD17016 +:109D6000236842781B1D811C2D1D18000CF038E85B +:109D7000206840192060707831780002084340194B +:109D80003070000A707070BDF8B50F000CF03CE840 +:109D9000050038000CF034E805260400F601AD1982 +:109DA0001AE0207A022804D020000CF0B6E800283F +:109DB0000DD020000CF0B4E8002808D020000CF0F2 +:109DC00024E880198068A968884200D9A860390011 +:109DD00020000CF0AAE80400002CE2D1F8BD10B578 +:109DE00004000221FFF7D0FF03212000FFF7CCFF82 +:109DF00010BD70B50CF09CE8002801D1012400E0F2 +:109E0000002402200BF0FCEF0AE028000CF088E8A8 +:109E1000012801D1002408E0297A28000CF084E808 +:109E20000500012C01D1002DEFD102200CF084E8B7 +:109E3000012C07D1002805D0FF304130007A0028DE +:109E400000D00024200070BDF0B5050087B00BF0F5 +:109E5000E8EF039028000BF0D8EF029064300190F7 +:109E600002989B21890046180398040008342800B2 +:109E7000FFF7BFFF012812D1287A03280DD1687A95 +:109E800002280AD128000CF05CE82522039952012F +:109E90008218497AC0301177817407B0F0BD05A9E6 +:109EA00006A805F04DF90B2189016F18796905980D +:109EB00008730399487202980E210E300CF028E8BE +:109EC0006B46197E227889079307890F9B0F994269 +:109ED00009D19209012A09D10A00024303D00129BC +:109EE00004D1002802D0280001F0CFF8287A0328F6 +:109EF0000CD1687A022809D128000CF022E825222A +:109F0000520182180599C03011778174B0788007AA +:109F10002AD56B46187E8006800F13D10198C07831 +:109F2000810704D1800801998000401CC8700C2072 +:109F300004A90CF00AE803007869019A017B06A8DD +:109F40000CF006E82078CF2108406B46197E890680 +:109F5000890F090108432070187E8006800F03D105 +:109F6000B078FD210840B07079692078487379692C +:109F70008006800E487390E7F0B5002689B0050092 +:109F800003960BF042EF040028000BF04AEF01901B +:109F9000687A02287ED18F20800027182800FFF7DA +:109FA00053FF042101200BF0D8EF00280FD1280027 +:109FB000FFF74BFE01280AD12800297A7E300229BA +:109FC000089011D128000BF0CCEF002802D000201F +:109FD00009B0F0BD287A022806D12100FF31089887 +:109FE0000622F3310BF0FCEEFF480088002803D076 +:109FF0000BF032EF01F069F90BF052EF0021022073 +:10A000000BF052EF0BF054EFF84A506A042108436A +:10A01000506228000BF0A8EF2120005D39000007F6 +:10A02000FF31C00F09310BF0A4EF0BF036EF0B201E +:10A0300080012E1870690022407B00907069017BBE +:10A04000009805F018F805F068F870690122017BA6 +:10A0500028000BF092EF0E21601807900BF090EFA4 +:10A060002A00613201060092090E002207981300AF +:10A0700006910BF08AEF0300069A0799280005F075 +:10A08000A1F89B21019B89006218083321006431EB +:10A09000200000E01CE10593FFF7E0FC13214901DB +:10A0A0006018807B800730D587208000005D002805 +:10A0B00040D00198007A80072CD11D2149016018F9 +:10A0C0000379580707D420006030C179FB22890842 +:10A0D00089001140C1719807800F0FD0012823D04B +:10A0E00002280BD17069403080898102C0480BF092 +:10A0F00094EE0522D201401C6B1CDF990100000088 +:10A10000F02000C000040000F6A6A24CA118886050 +:10A110000BF0ECEE002802D02800FFF76AFE872043 +:10A120008000005D00280FD01D21490160180179D1 +:10A13000FB22114089088900491C0DE070694030FC +:10A1400080898102B048DCE71D214901601801794E +:10A150000422114389088900017129002031087EF9 +:10A16000FE2812D002000E3A072A05D86722125D97 +:10A17000520701D5093006E0162806D96722125D7C +:10A18000520702D409380876A0770BF00CEF7169FA +:10A190000020C87328000BF00AEF002800D0FEE76B +:10A1A0002800803004900069AC210181082128003A +:10A1B0000BF000EF0498AC21806901810521280093 +:10A1C0000BF0F8EE28000BF0FAEE28000BF0FAEE98 +:10A1D00028000BF0FCEE089902200BF090EE70695D +:10A1E0002B21095C2C300BF0F6EE01200BF08AEEEF +:10A1F0000022FF213A312800130008F054FA00220F +:10A20000FF217C312800130008F04DFA606A002815 +:10A2100006D028000BF0E2EE002801D10BF0E2EEB0 +:10A220000BF0E4EE002102200BF070EE0BF062EE7A +:10A23000012102200BF042EE0BF06CEEFF22913276 +:10A240002E2302A903A80BF0D6EE002849D00298CD +:10A25000010018310091616C012906D1020038001B +:10A260000A3230306946FFF777FD1120029A40012B +:10A27000201800780A3269460BF0C0EE606A0128A7 +:10A2800006D1029A20000A3228306946FFF764FDA1 +:10A290000098FF212B310170090A41700222002130 +:10A2A0008270C1700599001D0BF0A4ED0298C17A6F +:10A2B000827A0B0200991343CA788C7812022243E7 +:10A2C0009A18121D8272120AC272C8788A78000225 +:10A2D0001043091D40180090039A089928000BF0BC +:10A2E00092EE012630007DE60B0010B501890918B9 +:10A2F0000C00203422784069032A0ED0042A11D0A1 +:10A30000082A2DD07F2A07D1002805D0027A032AF7 +:10A3100002D17F220BF07AEE10BD0A0021000BF073 +:10A320007AEE10BD62780B2A0BD006DC002A0BD027 +:10A33000092A0ED00A2AF4D103E00C2A01D00D2AF2 +:10A34000EFD10BF06CEE10BD0A0021000BF06AEEAD +:10A3500010BD0028FCD0027A032AF9D10922D9E7DE +:10A360000A0021000BF062EE10BD10B50B78002B37 +:10A370000AD05B1E1B061B0E0B7005D1D178DF23A4 +:10A380001940D1700BF056EE10BDF3B581B00E0040 +:10A3900001980BF044ED050001980BF04CED8F2077 +:10A3A00080002F1887208000405D002812D03C00DC +:10A3B0002034A07C80070DD50BF0F8EC012E009026 +:10A3C00009D1F86C002802D1207B00282AD00098FF +:10A3D0000BF000EDFEBD002E24D101980BF01EED18 +:10A3E0008F2189004718FF30FF30801C0189C08908 +:10A3F0000B22414305484843920109E05C3A01C001 +:10A4000000A80080002F6859404B4C0040420F00CC +:10A410000199891849694031898989020BF006ED53 +:10A42000401CF86400980BF0D6EC6035E8794007E2 +:10A43000C00FB042CED0A07C8007CBD50198C17AA6 +:10A44000807A0BF0FCED04000BF0F4ECE979FB22D0 +:10A450001140F207520F1143012EE97107D1007A22 +:10A46000890889008006800F0143E97102E08808AD +:10A470008000E87101980BF0E6ED0EE0E068C004A2 +:10A4800005D520000BF0E2ED20000BF0E4EDE27AC0 +:10A49000A17A20000BF0D6EC0400002CEED1FEBD1A +:10A4A000FFB597B000252E0017982F00007A2C00DA +:10A4B000022801D003280CD117980BF0B0EC8F21A3 +:10A4C0008900050046182420875D17980BF0B2EC30 +:10A4D0000400199918980C3909040C30090C02AAC7 +:10A4E0000BF0B4EC209A0A99D27810989306DB0FFF +:10A4F000002902D1022F08D102E08978C90704D1CE +:10A50000002802D00079C006C6F8FAED010000006C +:10A51000EC2400C000040000DC280BD514D520205A +:10A5200002432098C2709006C00F984202D017983C +:10A530000BF08AED1A988102FF4B229858430BF0DA +:10A5400080EC2199401C087020363079022860D0B8 +:10A5500087208000405D01285BD11320400128182E +:10A56000807B800755D50020019060358646A8790C +:10A57000217A050089060600890F012903D1C21E30 +:10A58000C41D011D02E0C21FC41C011F0027002AB8 +:10A590008C4600DB1700079A002A13D0079A93789D +:10A5A000BB420FDBA3420DDC0F9A002A09D00F9AA1 +:10A5B0009278920701D51E0007E00F9AD2785206D2 +:10A5C00003D51D000F9A002A11D0109AD3789A074C +:10A5D0000DD00322D2439343012B00D10422109BC0 +:10A5E0009B789A18BA4202DBA24200DC1100B0420A +:10A5F00001D1A84201D0012086468C4501D001201E +:10A60000019001997046084303D017980021FFF785 +:10A61000C6FE1BB0F0BD3EB5018945690C18280087 +:10A620000BF006EC01008F2080000818496C00290F +:10A6300014D0010001222E3125306B4607C30B20B8 +:10A6400080012818406921784030838960780202AF +:10A650000A43210020312800FFF72CFF3EBD70B5D2 +:10A6600006000BF0E6EB8F21890044180BF0A8EBF5 +:10A67000E16C0500002906D0491EE16403D10121E7 +:10A680003000FFF78CFE28000BF0AEEB70BD10B56C +:10A690000BF0CEEB8F21890040182030C17B490898 +:10A6A0004900C17310BD70B505001C200C00088165 +:10A6B00030343C2120000BF0DCEC8035E8680028C9 +:10A6C00008D000692061E86840696061E868C07886 +:10A6D0000002608070BDF7B5012508894418009814 +:10A6E000007A02280ED003280AD10098407A012867 +:10A6F00001D0022804D1009821000BF0BEEC002507 +:10A700002800FEBD00980BF094EB8F2189004618BD +:10A7100007002F20805D0028F2D1009821000BF067 +:10A72000B0EC0128ECD13300210000982F33002237 +:10A730000C310BF0AAEC0500E2D1FF37A078FF370F +:10A74000BF1C02090120B96990400142D8D000988D +:10A75000E52221000BF09CECD2E710B500240BF0B1 +:10A7600074EB007A8009012800D10124200010BD7B +:10A77000F8B507000BF05CEB040000260BF08CEC46 +:10A780000D2801D90D2001E00BF086EC05062D16F1 +:10A790003800FFF7E2FF002813D000212D1F84208E +:10A7A000025D0CE0C800401A0019FF306130407BA8 +:10A7B000052803D3A84201DC012602E0491C8A4295 +:10A7C000F0D83000F8BDF8B5002506000BF030EBEE +:10A7D000040030000BF038EB07003000FFF7BDFF3E +:10A7E000002803D0FF206D30005D00E0387A4A2158 +:10A7F000095D8007800F89070DD500280BD1FF3434 +:10A80000FF34A41C207F002804D13000FFF7B0FFE4 +:10A81000002800D001252800F8BDF1B582B00298CB +:10A820000BF006EB050002980BF00EEB040028007D +:10A830004830019002980BF034EC84214F5D3F4E7C +:10A840000020012F10D901220CE00A210A235143D4 +:10A85000434389199B1909891B89994201D2100622 +:10A86000000E521C9742F0D80A2358430B2381193B +:10A8700049786172029A9B01D7187A696035117321 +:10A88000217A325C890892078900920F1143217264 +:10A89000305CF3220007800F114080000143CF207D +:10A8A00001402172E87980088000E8710198807881 +:10A8B00080071FD50BF0F0EB0D2801D90D2001E02A +:10A8C0000BF0EAEB0106207A0916800706D17869B9 +:10A8D000007B052802D3091F884204DDE87980083F +:10A8E0008000401CE87178692100027B02980831E1 +:10A8F00004F0C0FB7969207A487379698006800E7C +:10A900004873FEBDF0B5040085B00BF092EA0290EA +:10A9100020000BF09AEA0B218D18140001000000B2 +:10A92000E82800C000040000FCCBA35F8901611887 +:10A93000049149690C228A560025111D0191111FAD +:10A940002E002C00AE46AC46009103E040420F00C2 +:10A95000AC3901C0FF49897B039130E00A21FD4BEE +:10A960006143803BCB185978D71EB94210DBD71D05 +:10A97000B9420DDC914202D0DF79BF0705D1019FBA +:10A98000B94203D0DF797F0700D501251F89BE19A1 +:10A99000D71FB94211DBD71CB9420EDC914202D05D +:10A9A000DF79BF0705D1009FB94204D0D9794907A3 +:10A9B00001D501218E4619898C440399641CA1425A +:10A9C000CCDC017A8A06920F11D1CF22754506D1CF +:10A9D00011400122664500D30322120105E0002D3B +:10A9E00002D11140103101E0302211430172029A6C +:10A9F000017AFF32FF32921C137F89061D22890FD4 +:10AA00005201002B12D0012902D1002D0ED004E0FA +:10AA100003290BD17146002908D00299FB2389181C +:10AA20000A7992089200921C1A4006E002990423C7 +:10AA300089180A79920892001A430A710499007AD7 +:10AA400049694873049980064969800E487305B0C6 +:10AA5000F0BD10B50400FFF78AFE002802D02000E8 +:10AA6000FFF7E5FE2000FFF7B8FE002802D0200027 +:10AA7000FFF752FF10BDF3B583B00E0003980BF043 +:10AA8000E2E9FA20805D64235843FF210BF0E2E9FC +:10AA9000317C0A235943AF4C4018217B270059438E +:10AAA000803FC91908810398FFF797FE002869D0F5 +:10AAB000002564E013206843801912300BF0FEEA91 +:10AAC00001001531029141780278080210430C38D8 +:10AAD0000206120E0299032001920BF0F4EA0028FC +:10AAE00007D0217B0A2359438078C91949788842C5 +:10AAF00044D1019A02992D200BF0E4EA002802D0FB +:10AB0000C178490609D5217B0A2359430123C91974 +:10AB1000CA791A430028CA710AD08078800707D5FD +:10AB2000207B0A2358430222C019C1791143C17105 +:10AB3000019A02993D200BF0C6EA00281ED0C17888 +:10AB40008A071BD08907890F0129817801D1091D46 +:10AB500000E0091FA27B00200EE00A234343DB191B +:10AB60005B788B4207D10A2358430422C019C1796C +:10AB70001143C17102E0401C8242EED86D1C307C52 +:10AB8000A84297D8300007F053F9207B401C0006FC +:10AB9000000E2073A17B8842039802D200F0C7FA0E +:10ABA00055E7FFF756FF0398FFF704FA012801D095 +:10ABB000012100E00021627B0398FEF727FF46E7B2 +:10ABC00070B5644E803E340080342CE0A57B0022BA +:10ABD00006E00A2353439B195B78834202D0521C40 +:10ABE0009542F6D8954207D90A235A439219937889 +:10ABF0005B085B00937015E00A226A430A239219EE +:10AC00005070A57B6E226B4300259B195A719D7174 +:10AC1000A57B0A236B439B19DA7000221A71A27B71 +:10AC2000521CA273401C8842D0D970BDF3B585B0C8 +:10AC300005980BF008E9070005980BF010E98F2143 +:10AC400089000490781803900020029041489021D8 +:10AC500080380BF0D8E80598FFF789FD3D4E0028B5 +:10AC600026D000243D00803511E0E000001BC11912 +:10AC7000B07B0A23374A5843803AFF3180186D3140 +:10AC800007220BF0CCE8B07B401C641CB073287921 +:10AC9000A042EAD82879012803D10598FFF7C7FD1B +:10ACA00006E005990B220020920189184969087372 +:10ACB0000598FFF792FD002849D001250BF0F6E931 +:10ACC0000406241605980194FFF751FD00281BD0B7 +:10ACD00000208421C95D8C4613E0C100091ACA19FD +:10ACE000FF216E31525611000B39A14200DB2100C9 +:10ACF0000C0624160B32AA4200DC2A0015062D167B +:10AD0000401C8445E9D814E0049B04991B7A09206F +:10AD100008560B219B060A009B0F012B00D007222F +:10AD2000032B00D007218218EC39A8F001000000A5 +:10AD3000E42C00C0000400007B9DAD0D1506401AF8 +:10AD40002D160406241601998D4200DC29000120ED +:10AD5000012C00DB200009060006090E000EFFF79B +:10AD600039FFB07B012801E02C3A01C002D80298DB +:10AD700007B0F0BD0698707303980221E0300173AC +:10AD8000059800F0DEF901200290F1E7F8B5002403 +:10AD90000600C068C00428D530000BF06AE8070040 +:10ADA0000C3730000BF058E805006037B88A0028EF +:10ADB00000D101240BF018E8112149016A18009014 +:10ADC00091880120012900D30800012CB88209D103 +:10ADD000D088C00706D0FF205130815B01223000AF +:10ADE000FEF774FD00980BF014E8F8BDF8B5060006 +:10ADF0000F000BF032E8050030000BF03AE80400D9 +:10AE00000C3430000AF0C0FF00280BD06034A08A58 +:10AE1000002807D0112040012818C088384201D0EE +:10AE20000120F8BD0020F8BDF8B506000BF020E8C1 +:10AE3000040030000BF010E80500F0680C34C0048A +:10AE400025D50AF0D2EF0700A06F00281CD060348F +:10AE5000A08A002818D0401E0004000CA08213D144 +:10AE6000112040012818C088C0070DD030000BF019 +:10AE700038E9FF255135A95B002801D0002200E008 +:10AE800001223000FEF722FD38000AF0C2EFF8BDC3 +:10AE900010B50AF0EEEF04000C340AF0A6EF002122 +:10AEA000A1676034A1820AF0B4EF10BD89780A0767 +:10AEB000920F022A04D10B09042B07D00C2B05D0CA +:10AEC000012A02D109090A2900D05FE7704770B54D +:10AED00004000AF0CEEF20000AF0BEEF1121490174 +:10AEE00040188088002814D00AF07EEF050020006A +:10AEF0000AF04AFF002802D02000FFF795FF280043 +:10AF00000AF086EFE27AA17A20000AF0BAEF040094 +:10AF1000EAD170BD70B504000AF09EEF0500200074 +:10AF20000BF0E2E80D21890168180179002902D0AF +:10AF300000690AF0D2EF20000AF09AEF6030007842 +:10AF4000032802D120000BF0D4E8E27AA17A200095 +:10AF50000AF096EF0400EED1032000022818007CCE +:10AF6000002805D00520C0012818C0680AF0B4EFF9 +:10AF70000AF0DAEF04000BF0C0E884421BD17748F6 +:10AF80000088002801D00AF090EF0AF0B2EF0AF032 +:10AF9000B8EF0BF0B6E800200AF0D2EF0121032051 +:10AFA0000AF0D2EF6E491F200862002103200AF048 +:10AFB000A4EF0AF0CEEF70BDF8B504000AF04CEF34 +:10AFC00005000AF0B2EF06000BF096E8864221D1A8 +:10AFD0000AF08EEF002102200AF08EEF0AF090EFC7 +:10AFE0000BF092E801200AF0ACEF0BF01EE8002114 +:10AFF00002200AF0AAEF0AF09CEF012102200AF0D9 +:10B000007CEF0AF0A6EF55480088002802D0200007 +:10B010000BF07EE820000BF080E82000FEF73CFFFC +:10B020000B208001201841690022497B0091406972 +:10B03000017B009804F047F804F097F80D20800198 +:10B0400028180079002809D03520002200012B188B +:10B050000092444A444821000BF062E8A320434E8A +:10B0600080002F1820000AF004EF05008620005B06 +:10B07000032807D1002200923D483B003200210006 +:10B080000BF04EE860352878032802D120000BF041 +:10B090004CE8E27AA17A20000AF0F2EE0400E1D155 +:10B0A000F8BD70B505000E000024FEF7CAFE0028AA +:10B0B00005D031002800FFF7C3FD04000BD12800A4 +:10B0C000FEF782FF012801D0012100E000213200BB +:10B0D0002800FEF7A5FC200070BD70B504000D002F +:10B0E0000AF0C6EE017AAB07890889009B0F194365 +:10B0F00089060268890E01720020D077FE200E2199 +:10B100009077501806000AF088EE012D01D0022D2C +:10B110000DD1207A032806D1607A022803D13000AD +:10B120000BF006E870BD300009F087F870BD207A9A +:10B13000032802D1607A022889FFF7460100000047 +:10B14000E03000C000040000BD0CF24BF1D0300034 +:10B150000AF0FCEF70BD0C4910B5097B0A230A4ABE +:10B160005943803A8918094A07F06BF910BD00006D +:10B170005C3A01C0C0A0008000879303A50E0100C7 +:10B1800020A1070027B300C02C3A01C0C7A300C00C +:10B190007047F8B5002206000F00FE4811000AF0C3 +:10B1A000DAEF040016D020890821051928000AF0DA +:10B1B0003EEE290030000AF0D2EF291D38000AF0D7 +:10B1C000CEEFF5482200806A042100230AF0CAEF7E +:10B1D000002803D020000AF0CAEF0120F8BDEE4895 +:10B1E00010B5C06A0AF0C6EF10BDEB4841780029DF +:10B1F00002D000214170F2E77047B12820D010DC66 +:10B200006F281DD006DC2B281AD02C2818D04028F7 +:10B2100018D115E0A92813D0AA2811D0AF2811D130 +:10B220000EE0CF280CD006DCB22809D0B52807D014 +:10B23000CE2807D104E0D02802D0FF38213801D130 +:10B24000012070470020704710B540690AF096EF62 +:10B25000002010BDF8B507000D0000D1CF4DCE4E37 +:10B26000307800283ED0F4682020208120342079D6 +:10B270000321490440180AF0CAEDC9480AF0C6ED96 +:10B280006078227800021043210040040831400C0D +:10B29000FFF7B3FF002801D0FFF7A7FF0AF072EF16 +:10B2A000002811D06078217800020843BD49401879 +:10B2B00005D0012803D0022801D01B2804D1022088 +:10B2C0000AF064EF0AF066EFF1680122487BB64BA2 +:10B2D000104348738D611C68002238690323A0471E +:10B2E00000203070F8BD00207047427801781202CB +:10B2F0000A43A949012A04D1C2788378100218436D +:10B30000488148897047A94810B500680AF046EF9F +:10B31000A74800680AF042EFA64800680AF03EEF2E +:10B3200010BD10B50AF03EEF0AF040EF10BD10B5A9 +:10B3300001240AF0C4EDA0480178012905D10021BB +:10B34000017002200AF036EF0024200010BDFEB587 +:10B350000600012000900AF032EF002800D0022001 +:10B360000AF014EF040002200AF018EE050004D1E0 +:10B37000022108000AF022EE05000AF024EF8F4FA8 +:10B3800000280ED03888C00602D4E068C00408D572 +:10B390007079317900020843052811D9884988421B +:10B3A0000ED20AF014EF002802D0E068C00407D5DE +:10B3B0000AF004EF002846D038888005800F42D07C +:10B3C0000AF01CED0190707931790002084301D038 +:10B3D0007C490860F079B1790002084301D07A49CC +:10B3E0000880F078B1780002084301D077490880DE +:10B3F000714E3078002823D10AF0E4EE00280CD0FA +:10B40000E068C00409D53888C00606D5002D11D0E3 +:10B41000FF354135287A07280CD10AF0D0EE0028F4 +:10B420000ED038888005800F0AD0FF344134207A4E +:10B43000072805D1012030700AF0BCEE00200090F2 +:10B4400001980AF0F0EC0098FEBDF8B50400012068 +:10B45000009048780E000978000208435921C9007D +:10B460000025671800280FD001280BD1207A00286A +:10B4700037D0012835D02100FF314131022809D0D1 +:10B48000032816D0012548E006223900B01C0AF036 +:10B49000DAEC42E0087A0028F4D120000AF0E6EC69 +:10B4A000FF300622B11CF3300AF0CCEC00200090F3 +:10B4B0001AE0607A022801D0012812D1087A002807 +:10B4C000E0D120000AF0D2ECFF300622B11CF330AC +:10B4D0000AF0B8EC20000622B11C7E300AF0B2EC73 +:10B4E00002E0E068C004CDD40622B11C38000AF0A6 +:10B4F000AAEC08F00FFA002805D1354806220068AA +:10B50000B11C0AF0A0EC0B2080012018827B009B6C +:10B51000390002200AF05EEE05002800F8BDF0B503 +:10B5200005000E00407829780002D0240843012845 +:10B5300085B065D1281D002704901CE004990422E1 +:10B5400003A80AF080EC0498515A92D70100000039 +:10B55000DC3400C000040000C8F209F36B46001D93 +:10B560000178197241785972801C02990490220066 +:10B57000601C09040404090C0398240C02910AF0CD +:10B5800038EEE01FF93806D07F1CE878A978000271 +:10B590000843B842DCDCE978AA7830880F02174308 +:10B5A000B8422DD929E000004C05000424F400C065 +:10B5B000DD3100C008080400327FFFFF30F200C018 +:10B5C000E003000448F800C0E47C020040F800C03A +:10B5D0005C3A01C0FDFF0000ECF300C000F400C0C5 +:10B5E0004AF300C030F800C02200601C04040021AF +:10B5F000240C08000AF0FCED7F1C3088B842F3DC14 +:10B60000E878A97800020843302800D9302030803B +:10B6100005B0F0BD0028FBD13088A870000AE870A2 +:10B620002D1D00270DE0210068460AF0E6ED0622F8 +:10B63000280069460AF010EC641C2404AD1D240C9B +:10B640007F1C3088B842EEDCE2E7002801D10120FF +:10B6500002E0032800D90020FA49085C7047012164 +:10B66000062814D00200FF3A083A10D0E6280ED07F +:10B670006B280CD02B280AD02C2808D0502806D0B4 +:10B68000E72804D0242802D0B12800D000210800E7 +:10B690007047EC4810B51838C06A00210AF0B0EDC8 +:10B6A000002801D1012010BD002010BDE548732104 +:10B6B000F0B5C90018389DB00181E34908005C303D +:10B6C000503115911690E148E149149008008030FE +:10B6D00060311291139002F009F8DE480AF094EDFF +:10B6E00001890D1868782978000208434004400C4D +:10B6F0000A90E878A9780002084308380E90D148EB +:10B700002C00183800780834002808D12979052041 +:10B71000000408180AF084EBCF480AF082EB68783E +:10B720002978000208432100FFF771FD002810D09E +:10B73000FFF7AFFF002806D1C24801211838416346 +:10B7400000201DB0F0BDBF48002118384163012121 +:10B750004170C2480AF064EB01200D90099000206E +:10B760000890BC480AF054ED119001890D1810950D +:10B770004069079010980AF050ED002826D000206C +:10B780000AF04EED002821D10AF022ED002800D069 +:10B7900002200AF006ED0600007A062806D1687934 +:10B7A0000107090F00200AF040ED0600002E2CD101 +:10B7B0000A98F72811D123780021079A0091029264 +:10B7C000019168790207120F010919E068790107F0 +:10B7D000090F00090AF064ECDDE76F793E09012EDC +:10B7E00001D1022304E0022E01D1032300E0002353 +:10B7F000079A002102923A07120F0091019131003D +:10B80000180000230AF014ED060011988D4F4661D0 +:10B810000B20800130184069183F069002E001209B +:10B820000AF066EB7D218E48002209010AF09CECAB +:10B830000028F860F3D08348824A1838C068202175 +:10B8400001814118183A116346610F91E878A9788F +:10B8500002020A4310990F980AF0EEEC794801278A +:10B8600018380770406900280CD10A98AA2809D016 +:10B870000AF0E6EC73487B4918384761C86804222F +:10B880001043C86000200B906F480078C00720D19B +:10B890000A98FFF7E4FE00281BD00A980121C9038B +:10B8A00008432870000A68700220A8710020E8711F +:10B8B000E878A97802020A4310990F980AF0BCECC4 +:10B8C00011980AF05EEC00213000FFF7CDFC01F08A +:10B8D00018FF0AF0BAEC64480AF0A2EA0A9B8D2B22 +:10B8E00001D101F04DFA72DC4D2B71D075DC1E2BAD +:10B8F00070D02DDC142B01D101F008FE19DC102BC7 +:10B9000069D011DC032B67D0062B72D00B2B01D032 +:10B9100001F0E2FE5420A8700020E8702100300001 +:10B920000AF096EC01F0B3FE112BFBD0122BEFD1F5 +:10B9300047E3163B072BEBD25B007B449B885B0005 +:10B940009F448003CA0ECA0E75048904B504FB0522 +:10B950002C2B74D026DC262B37FBF488010000004A +:10B96000D83800C000040000E811A17906D00DDC31 +:10B970001F2B6FD0202B6ED0242BD3D10E982100FB +:10B980000204120C300002F0F8FBFEE1282B7BD001 +:10B990002B2BC7D1069803210AF068EC16990020DA +:10B9A0000AF0F0EB3648806B364900200860290029 +:10B9B000300004F0CFF862E2372B78D00ADC2E2B6F +:10B9C00076D0362BAED1092080013018C26A0832F9 +:10B9D0000021EFE3402B6CD0452BA3D10AF04AECB9 +:10B9E000AAE7ABE0E7E302E0EFE320E37CE2702BC1 +:10B9F00001D101F08CF956DC682B6FD045DC5E2B51 +:10BA000002D101F0FBF8A1E10CDC502B9AD05B2BAA +:10BA100001D101F051F95D2B84D120000AF02EEC08 +:10BA200001F063F9662B77D0672B8AD16078217893 +:10BA300000020843012808D1E078A17800020843F9 +:10BA4000129948811299002008811298408901F0CA +:10BA5000A8FCF3E3F3E3F3E33CF400C03A5C000436 +:10BA6000943901C0A83801C0584600040100040000 +:10BA700002020400D804000400A7008004040400AB +:10BA800000A8008094F400C0D6E26B3B052B00D3E5 +:10BA900048E75B007B449B885B009F4441094E095B +:10BAA0009E0529093309812B04D101F034F9F4E30F +:10BAB000F4E3F4E331DC752B01D101F071F916DC0C +:10BAC000712B01D101F00DF9742BE1D1607821784F +:10BAD00000020843012802D001F08DF8F0E3E0787D +:10BAE000A1780002084301D001F071F851E2782BEF +:10BAF00001D101F068F97F2BCAD1300004AA05A951 +:10BB00000AF0C0EB0A20A87000206B46E870187D90 +:10BB10002070187C60700FE7F4E3823B092BB7D2EA +:10BB20005B007B449B885B009F44F109BB0DE00DEB +:10BB3000E00D8A0DE00D080AE00DCB04DF2B01D1EA +:10BB400001F086FC7ADCB22B79D066DCA92B01D11E +:10BB500001F099FA51DC972B01D101F02CFA15DC98 +:10BB60008F2B6DD0932B01D101F0F7F9942B8FD14E +:10BB70006078217800020843012801D001F016FA0C +:10BB8000200002F088F90028C5D1AFE79A2B01D137 +:10BB900001F0F6F8A42B98D1208801287ED130003E +:10BBA000FF3021301A90878BC08BA41C05906078E1 +:10BBB00021780002084303D00AF068EB1A998883C1 +:10BBC000E078A1780002084303D00AF060EB1A99EC +:10BBD000C8832620A8700020E8701A98808BB8428D +:10BBE00002D030000AF056EB1A980599C08B8842B3 +:10BBF00091D030000AF052EB9EE6AA3B082B8ED281 +:10BC00005B007B449B885B009F44E209700D700DD4 +:10BC1000700D1F015A0127013C01CF2B01D101F00A +:10BC200008FC1DDCC72B7ED00BDCB32B7CD0B52BE6 +:10BC30009DD12900300007F007FA45E136E033E1F5 +:10BC4000FEE3CD2B01D101F0B0FBCE2B8FD10E99AD +:10BC500020000AF028EB012801D001F0E8FB0EE1FA +:10BC6000D62B01D101F067FA19DCD02B01D101F0FC +:10BC7000E5FBD12B8FD160782178000208430128A1 +:10BC800006D1210030000AF012EB002800D10B97FA +:10BC900020000AF010EB103001F03EFCFEE3D92B3F +:10BCA00001D101F014FBDA2BA6D03BE6FF21C91C21 +:10BCB000581A8B4201D101F041FC3BDCED2B7ED0C8 +:10BCC00010DCE43B092BF0D25B007B449B885B00DB +:10BCD0009F44F9051F070C0D0C0D0C0DDC0BE60B3A +:10BCE000E60BE60BF72B01D101F0E0FB06DCF22BB3 +:10BCF00001D101F0D0F8F42BD6D013E6FB2B01D103 +:10BD000001F0DDFBFF3B9B1ECFD160782178000264 +:10BD1000084305D12000FFF7FCFAA070000AE0708C +:10BD20000C20A87001E079E1D2E00020E87000204A +:10BD300001F0BAFB14287ED046DC0A2801D101F0BC +:10BD4000D0F828DC012877D00528AED1F948076063 +:10BD5000307A032809D1707A002806D017204001D4 +:10BD600030180178042900D0BA2E015001000000DB +:10BD7000D43C00C0000400006F47AF2B07700A9846 +:10BD800000210200FF3A083A00D101210E9822005A +:10BD900003041B0C300006F01CFB002872D00020AE +:10BDA0000D90FFF740FA01F0A0FC0B286BD0122891 +:10BDB00085D16078217800020843012834D1607968 +:10BDC000217902020A43A11D00200AF082EA0B90A9 +:10BDD00000E0BFE20028B5D00120B3E7222801D15E +:10BDE00001F056FC0DDC172801D101F036FB2028AC +:10BDF0008DD10E9821000204120C30000AF06CEA7A +:10BE0000A0E7262801D101F053FCFD2886D10820A7 +:10BE1000A8700020E87020000AF062EAE978AA78A9 +:10BE200009021143401841E7617922790B0213435B +:10BE30000006000E221DA11D0AF056EA0004000CA7 +:10BE40000B9000D001200B9001E081E34FE000282F +:10BE500000D07BE56079217900020843F3E32100FB +:10BE600000200AF046EA20000AF046EAECE3687A8D +:10BE7000297A00020843012806D12900300006F083 +:10BE800080FC5FE7ADE0FEE32900300006F02FFF05 +:10BE900058E700200D9086E72900300007F0E2F90E +:10BEA000002814D001287ED0022800D149E70528B7 +:10BEB00001D001F08CFBFFF7B6F908E02900300053 +:10BEC00007F028F9002802D00228EFD0F1E700207F +:10BED0000D9036E72900300007F012F900280B908A +:10BEE000D7D033E52900300007F00AFA2AE721000D +:10BEF00030000AF006EA0B900C20D7E60AF004EABC +:10BF0000010020000622083009F0BAEF0AF000EA2A +:10BF1000002802D0380A277408E00AF0FEE9072852 +:10BF200001D1032000E002202074000A6074402048 +:10BF3000A0710020E0710AF0F4E9A073000AE07338 +:10BF40000AF0F2E9210012310AF026E900200C90F3 +:10BF50000AF0EEE9FFF78DFB07000AF0DEE9FFF7D4 +:10BF600088FB059007F0F4FC0C9A01000092059AFA +:10BF70003B0020000AF0E0E9200026301C900AF087 +:10BF8000D0E8000A1C9900020AF006E907000AF04E +:10BF9000C4E91C9938430AF000E907000AF0C8E92F +:10BFA0000001384300E038E38121490488431C99AB +:10BFB0000AF0F2E81598417A027A08021043A0705C +:10BFC000000AE07002202070002060705F4820347A +:10BFD0000078E072000A20730D2060730020A073C7 +:10BFE000B4E459490020086063E7307A032802D19D +:10BFF000707A0328F8D1F068C0040AD40021300018 +:10C0000005F0C9FB23002200002130000AF098E966 +:10C0100003E00121300005F0BEFB0E982100020470 +:10C02000120C300005F0DCFA002800D0B7E640E73B +:10C030000820A8700020E8702100300002F0E3FC26 +:10C04000ECE643492000FFF788FA7FE43000042241 +:10C050002100393009F014EF30000AF076E909F0D8 +:10C060006CEF0AF0BEE80AF0C0E86FE4607822786E +:10C0700000020E99104301285FD1E078A1780002F8 +:10C080000843092837D017DC05284AD0062843D0B2 +:10C0900007284DD00828A3D12D48001FC0880028AC +:10C0A00003D0E0882B4988429AD20698A179403083 +:10C0B0008174E17901F0A1F9112811D0242809D067 +:10C0C00025288DD106980422FF30A11D493009F0A2 +:10C0D000D8EE3BE406980422A11DFF303930F6E784 +:10C0E0001D49A07909688861A0790028ADD0300089 +:10C0F0000AF02EE92AE4F068FF21491C8843A1795F +:10C10000C907C90D0843F0600AF026E901000122C1 +:10C11000300009F082EF19E40698A17940300175EA +:10C1200014E40698A17940300174E17941740DE47A +:10C130000698A1794030417508E4002885D1891E10 +:10C14000A41C270005917FE0B4F400C0047D020028 +:10C1500028F400C0EE02000034F800C07878397886 +:10C1600000020843082828D00BDC03281BD0052830 +:10C170001DD006282AD0072886DEAC330100000037 +:10C18000D04000C000040000F57AFBAB36D1069821 +:10C190004030407D27E009282CD0112825D02428C4 +:10C1A00006D025282AD106990422FF31493147E0DB +:10C1B00006990422FF31393142E006984030807BF5 +:10C1C00011E006984030017C2171407C04E0069823 +:10C1D0004030817C2171C07C607134E0FEE3D7E0A7 +:10C1E00006984030007D20712DE0F9480068806994 +:10C1F000F9E77FE2F068C005C00FF4E701000B39F2 +:10C20000042906D900210200C943123A0D2A00D898 +:10C21000511D0491491C16D030000AF0ACE80028EA +:10C2200011D0002130000AF032E80520C001049945 +:10C230003018006889004118F878BB7802021A4368 +:10C24000201D09F028EEF878B97800020843059916 +:10C250003F1D091A091FC7193C00059105980028C0 +:10C2600086DC6CE499E0D6E206E36078217800028F +:10C270000843012806D161880122D2076068891825 +:10C2800001F0ADF960880121C907401800686060BD +:10C2900055E46788380B082816D10AF070E86178F1 +:10C2A000227838050902000D1143012903D12179B3 +:10C2B0000AF068E802E00AF06AE820710AF06AE829 +:10C2C0003DE4FEE3FEE37AE0607821780002084373 +:10C2D000012804D1217938000AF060E82FE4380001 +:10C2E0000AF060E820712AE409E10AF060E8608859 +:10C2F00005900005000F059822D0000B022800D9F8 +:10C300000020401C07063F0E012F02D938000AF01A +:10C3100052E805986178227880050902800D114362 +:10C32000012904D121790AF04AE803E06EE00AF01D +:10C330004AE82071012F14D901200AF03CE810E0EE +:10C3400005996278237809061202000B090E1A4338 +:10C35000012A03D122790AF03AE802E00AF03AE829 +:10C3600020710AF03CE85BE40AF03CE86078217850 +:10C3700000020843012804D1217960880AF002E80C +:10C3800003E060880AF002E820710AF030E847E430 +:10C3900021003000FFF781F8FAE30698042109F044 +:10C3A0007AEF1699002009F002EF8A48806B8A49DB +:10C3B000002008602900300003F0B6FC73E530006F +:10C3C00004F0ADF9002889D009F0A0ED83480024DD +:10C3D000048083480460FEF7D2FF8248017949084F +:10C3E00049000171300003F002FE1699002009F0A7 +:10C3F000DEEE7948DF22046030002030817E11407B +:10C400008176F06804218843F0604CE560782178FB +:10C410000002084301283FD1E078A17807020F43CA +:10C4200011D07148C168B9420DD0C7606F4839005A +:10C4300009F04CED6C49086139006C48643109F031 +:10C4400046ED69494861607921790002084301D0CD +:10C4500065498863207A002802D06349401E4871EC +:10C46000607A002807D000E0DBE05F4A401E1179C7 +:10C47000814200D01071E079A1790002084301D017 +:10C4800059490860E07AA17A0002084301D0564970 +:10C49000C88009F0B0EFF4E3534FF868A070000AC9 +:10C4A000E070B86B2071000A60717879401C2072CE +:10C4B0003879401C60723868A071000AE071F88811 +:10C4C0007D2200E052E11B90F96AB86AD20009F0BF +:10C4D00096EF7B6B3A6B09F096EF1B9A002309F0FD +:10C4E00092EFA072000AE072BDE43F4A200072326F +:10C4F000931F0092083A911E09F088EFB3E4607828 +:10C50000217800020843012823D1E078A1780002B5 +:10C510000843FF2805D0364A00211170139948803E +:10C5200004E033480A2107701398418013983900BA +:10C530004088002800D00021139A1288002A00D0D9 +:10C540000027B94203D0282009F05CEE8BE4139950 +:10C550004FE327480078002801D0FF2061E31398BB +:10C560000088FBE71498808A2070000A6070149994 +:10C570000020888277E4607821780002084301284F +:10C580003AD1E078A17800027CEF949E010000008F +:10C59000CC4400C000040000DFF45232084304D051 +:10C5A000194908783843087004E0174801784908A9 +:10C5B00049000170144C2078C00702D009F068EEE1 +:10C5C0005BE409F032EF002808D009F032EF0028D0 +:10C5D00004D109F032EF09F034EF4EE4207838430B +:10C5E00020707AE434F800C000A8008094F400C001 +:10C5F00018F400C00CF400C040A60080A83801C0A8 +:10C6000040420F0043F300C03A5C0004FF4800883A +:10C610004007400FACE709F024EC07006078217870 +:10C62000030260790B43217902020A43E178A07882 +:10C63000090201434DE0E078A17800020843042894 +:10C6400001D1022031E4012813D160782178000261 +:10C6500008430128F5D16079217900020843A11D22 +:10C6600009F0F2EE0128BCD009F0FAEB35E022E047 +:10C6700053E3022834D160782178000208431CD1AA +:10C68000A01D05A909F0E4EE0B9005982071000AA1 +:10C69000607168782978000208430121C9030843C2 +:10C6A0002870000A6B466870988DA87100E074E3EA +:10C6B000000AE87105980E3033E409F0D2EB070068 +:10C6C00060782178030260790B43217902020A43E2 +:10C6D000CF49A01D09F0C0EE380009F0D6EB14E4F4 +:10C6E0000528FCD16078217800020843012803D195 +:10C6F000200009F0B6EE09E30028A2D1200009F0DD +:10C70000B0EE0028D7D183E4607821780002084396 +:10C71000012806D1E078A17800020843012109F040 +:10C72000A4EEF068C0041CD504A802F097FD15988B +:10C730006B46C27A817A100600140843A070000A82 +:10C74000E070187C8107587C890F09F092EE6B46E7 +:10C750006071187C01228107587C890F09F08CEEEA +:10C760000BE00020A0700100E070012009F088EECD +:10C7700060710021012009F088EE20710E209BE7F6 +:10C780003200FF322132938B39009940A170090A9F +:10C79000E170D18B26208F40390A27716171A87012 +:10C7A0000020E8700699A41D2000082218311030DE +:10C7B00009F07AEB3700A0377889A070000AE070A2 +:10C7C000B8892070000A6070300009F062EE000441 +:10C7D0000014010A20716230617103D1388A20711E +:10C7E000000A6071B888A072000AE072F8882072AE +:10C7F000000A6072300009F064EB2073000A607375 +:10C80000300009F04AEE00040014010AA071E17141 +:10C81000010AA0736230E17372D1788AA071010AB3 +:10C82000E171A073000AE07323E41020A8700020D7 +:10C83000E8703000A03004211990415E080009F032 +:10C8400030EEA070000AE07019980821415E0800DF +:10C8500009F02AEE2070000A6070300009F01CEE2A +:10C8600009F01EEEA071000AE071300009F024EB1F +:10C8700009F01AEE2071000A6071707A032801D065 +:10C880000128D1D1F068C004CED4AAE6614822784C +:10C89000436A60786A330102114320000BAA09F051 +:10C8A00008EE00280CD0E078A1780002084358492F +:10C8B0008842B9D0401E8740380AA770E0701CE457 +:10C8C0006078217800020843032800D0B9E6E078B8 +:10C8D000A178000208434E49884207D1012009F09F +:10C8E000ECED0028D1D009F0ECED06E40006000ED6 +:10C8F00009F0EAED0028C8D0002009F0DEED0DE4D3 +:10C900001AE3607821780002084372D005284FD0DE +:10C91000FE286FD0FF2887D1E078A27801023E4838 +:10C920001143008841400591E278A37812021A432E +:10C930000A400592E178A278090211438A05920F14 +:10C9400008D08205920F05D0032212021140104038 +:10C9500081429AD1E878A978000208430C38020491 +:10C96000120C211D300005AB09F0B2ED01288CD06E +:10C97000294FE178A27838880902114308436B46B1 +:10C980003880988A8005800F08D0300009F0A4ED27 +:10C99000E178A27809021143D082CBCB01000000DC +:10C9A000C84800C000040000FF17FAB8090A018057 +:10C9B0006B46988AC00717D009F09CED002810D06C +:10C9C00002200FE01A4808901A484078002896D0B4 +:10C9D00013980088002892D109F074EC00221E21DF +:10C9E000DEE20720144908706B46988A312109015C +:10C9F000084284D06878297800020843BF1C0121CE +:10CA0000C90302E0A9E095E057E008432870000A56 +:10CA10006870988DA871000AE871E878A9780DE02F +:10CA20003A5C0004FFFF0000F05800045C3A01C0CB +:10CA30004FAF0000543901C004F400C002020A43A1 +:10CA400010990F9809F02AEC022009F0E4EA002876 +:10CA500005D10221080009F0EEEA002806D0FF21E6 +:10CA60004931095C072901D109F048ED7878397816 +:10CA7000000208436B465881F878B97800020843F1 +:10CA800098817879397900020843D881F879B979A1 +:10CA9000000208431882787A397A000208435882E3 +:10CAA00000200990119809F09EEB09F044EA0F99D3 +:10CAB0000BAA02A8FEF787FC3AE0E078A178FE4FC7 +:10CAC000040238880C430440E00705D009F01AED51 +:10CAD000388840084000388031200001044288D066 +:10CAE000687829780002084301E030E02CE0012159 +:10CAF000C90308432870000A6B466870988DA871B6 +:10CB0000000AE871E878A97802020A4310990F98A0 +:10CB100009F0C4EB2100300009F0F8EC040000201B +:10CB20000990119809F05EEB002CD8D0FEF73BFC81 +:10CB30000D902CE4E048211D0088A070000AE070F0 +:10CB4000300009F0E8EC5CE121000020FDE3092061 +:10CB500080013018426A08320121200009F0DEEC21 +:10CB600015E46078217800020843012825D00228C6 +:10CB7000DFD1139800880028DBD109F0A4EB61789D +:10CB80002278080210430128D3D1A01C059009F097 +:10CB9000E6EA401C38D0149900208882C7480599DD +:10CBA000062209F08CE9C648008800280CD00E98AF +:10CBB0002100083108380AE010E209F0B4EC00283E +:10CBC000DDD1BF480780DAE70E98A11D801F02045F +:10CBD0001214300009F0AAEC09F0ACECB74C0420B8 +:10CBE0002056411CA5D0811CA3D0B64AD16A8740EB +:10CBF0003943D1622079012109F0A0EC04202056AC +:10CC0000002109F0A0EC83E40020AC49C04309F006 +:10CC1000E2EA09F09CECAA490020088078E40128A7 +:10CC200001D002286FD1A849087009F094EC09F0EE +:10CC300096ECA64800220068092109F094ECA4496A +:10CC40000020087264E4A0480078D2E30920800143 +:10CC500037186078217800020843012826D1E87847 +:10CC6000A9780002084310994218A11C300009F06D +:10CC70007EEC09F080E9F86A0100083106D0807C7A +:10CC8000C00703D009F0CAEA09F0CCEA8A48008854 +:10CC90000028B8D009F0D2EA0028B4D0F068C00764 +:10CCA000B1D0300009F07AEA32E429E000281CD142 +:10CCB0000E980F9D801E01042B000A33090CA21C44 +:10CCC000300009F058EC0A990122D203114329706F +:10CCD000090A0A306970A870000AE8700020A8717B +:10CCE000E871119809F07EEA48E2042800D0B2E425 +:10CCF0000E98A21C801E0104090C300009F03EECC5 +:10CD0000A871000A6CE0F1E3607821780002084322 +:10CD100007D0012886D10E9AA11C300009F032EC10 +:10CD2000F4E3A11C300009F032ECFFF795F808306D +:10CD3000A4E32100300009F02EEC0028F7D15AE4DA +:10CD40000E9A2100300009F02AEC012801D1FFF7EA +:10CD5000BEF80FE40E99200009F024EC0AE420004C +:10CD600009F024ECE9E72100300009F024ECE4E7C5 +:10CD7000207822000128BAD10E9B51789B1E921C6C +:10CD8000300009F01CEC401CD8E30F9D21782800EE +:10CD9000083009F018EC0830A870000AE8700A980A +:10CDA0000121C903084328707F70ADB50100000060 +:10CDB000C44C00C0000400007841F4EA000A687026 +:10CDC00096E7002005902100300005AA09F008EC44 +:10CDD0000028BED01220A8700020E8700598002816 +:10CDE000BFD10EE42100300009F0FEEB0028BAD1DB +:10CDF000380AAF71E87104E4200009F0FAEBFF2073 +:10CE00002130BBE36078217803020B4305D1210078 +:10CE10003000FCF7EAFB0C30B0E30E98210002046E +:10CE2000120C3000FCF7D4FA6DE400200590049059 +:10CE3000029021006A4604A805AB09F0DEEB0498D5 +:10CE4000002886D12848006828490840189001D158 +:10CE500009F0D6EBE078A178000208436B46039016 +:10CE6000187830214143224809180398C000081857 +:10CE70004268002A03D002A96846904700E0029762 +:10CE80001898002801D109F0C0EB02980028D8D1E9 +:10CE9000002114206B460B911856002808D0EA7820 +:10CEA000AB7812021A431018A870000AE8700591B6 +:10CEB0000398042895D16078217800020843E87827 +:10CEC000A97817D100020843083857E35C3A01C03B +:10CED000A4F200C008F400C00023008070F200C07B +:10CEE000F0F100C0543901C00021008000080008A2 +:10CEF0007C2201C00002084323E70F9BAA1C00927A +:10CF000060782278010211430A33A21C300009F034 +:10CF100080EB002895D16078217800020843C9D1C0 +:10CF20000A9901220F98D20311430170090A417036 +:10CF3000E978AA78090211438170090AC1700021B9 +:10CF40008171C171D7E66078217800020843012819 +:10CF500007D1A01C09F00CE90100300009F05CEBDE +:10CF6000D1E30698A11CFF30401C406909F03CE960 +:10CF700018E46078217800020843012809D10E984E +:10CF8000022801D1002100E02100300009F048EB27 +:10CF9000BCE20028BED12100300009F046EBEDE2F2 +:10CFA00060782178000222000843012801D117216E +:10CFB0001AE01821F848006809F0DEEAA3E3607877 +:10CFC000217800020843012815D100206B46D88241 +:10CFD000E078A17800020843188260792179000284 +:10CFE00008431C2104AA5882EB48006809F0C4EAEF +:10CFF0000028B5D013E3E8481D21006804AA09F011 +:10D00000BCEA6B46188AA070000AE070588A45E3B3 +:10D01000A91C200000F032FF75E32078642804DAB0 +:10D020000006000E611C09F08CE9601C09F08CE917 +:10D030000A30A3E209F070EA032008F05AEF040076 +:10D0400017277F0114E0607A00280CD0E0190078DF +:10D05000002808D0200009F0ECEA012008F084EF55 +:10D06000200009F0EAEA0321200008F0D6EF0400CE +:10D07000002CE8D1002009F0E4EA09F0E6EA0120FA +:10D0800008F072EF68782978000208430121C9038B +:10D0900008432870000A6B466870988DA871000AD2 +:10D0A000E871E878A97802020A4310990F9809F00C +:10D0B00000E9119809F0A0E800213000FEF710F90E +:10D0C00000200D900990B54809F0C2EA0028FAD175 +:10D0D000FEF75FF909F0C8E9B14900204861B1489D +:10D0E000C16804229143C1600DE3287904906879F6 +:10D0F00000220107090F0409A748059100680B21C8 +:10D1000009F03AEA119809F078E8A54DE86809F0C5 +:10D1100074E806F098FD002800D00B97A249002083 +:10D120000880A2497D270880A1493F01086002E0EC +:10D13000012008F01AEF99480022390009F050E860 +:10D140000028E860F4D0E8682021018146612030A1 +:10D1500028630A990122D20311430170090A417020 +:10D160000E996B4608318170090AC170998D8171E1 +:10D17000090AC17104990171417922010907090F56 +:10D180001143059A090909011207120F1143417150 +:10D1900000213000FEF7A4F8E4E2E878A978000264 +:10D1A0000843E178A2780C38090200041143000C0E +:10D1B0000491059060782178160752B101000000B3 +:10D1C000C05000C000040000BED0ABAC0002271D60 +:10D1D0000843012876D10C20A8700020E8704DE0AB +:10D1E0007878397800020843FF3852381BD002287B +:10D1F0000AD0682825D13100380009F038EA6B469A +:10D20000998D40180B901CE004983200390009F009 +:10D2100032EA6B46998D320040180B900498390021 +:10D2200009F02CEA0DE004983200390009F02AEAEE +:10D230006B46998D320040180B900498390009F024 +:10D2400026EAE878A97800020843F978BA78090252 +:10D2500011434018001DA870000AE870F878B978EA +:10D260000002059A0843011D91420AD805993F1D05 +:10D27000091A091F0904090CC71905910598042802 +:10D28000AED86B46988D00281AD130000024FF30AC +:10D290004D4F4A30179018206043395C00290AD05E +:10D2A000C1191798091D062209F0F4E9002802D1D6 +:10D2B000200009F0F4E9641C2404240C042CEAD3B3 +:10D2C0002BE2FFE70C20A8700020E87037E07878A8 +:10D2D000397800020843FF3852380ED0022806D0B1 +:10D2E00068280FD13100380009F0DCE90AE0049821 +:10D2F0003200390009F0C2E904E004983200390034 +:10D3000009F0C4E9E878AA780102F8781143BA78FC +:10D31000000210430818001DA870000AE870F87891 +:10D32000B9780002059A0843011D9142C8D80599B1 +:10D330003F1D091A091F0904090CC7190591059811 +:10D340000428C4D8E9E16078217800020843012864 +:10D3500022D1A01C06F0F9FBE078A1780002084376 +:10D360001A49884247D009F0A2E93000FF305D3009 +:10D3700000E0BCE109F09EE90100300009F09EE9FF +:10D3800009F0A0E91049300009F0A0E91048007840 +:10D390002071000A60712EE000282CD105480D494B +:10D3A000408888421AD30C4822E00000F0F100C007 +:10D3B000D804000424F400C000A700805C3A01C037 +:10D3C00018F400C00CF400C01C800200FFFF000035 +:10D3D000047D0200581B0000101D0000FF49884218 +:10D3E00001D3FF4804E07D21C900884203D3FD48F2 +:10D3F000A070000AE070E078A17800020843059070 +:10D40000F948002200684C2109F0C0E807043F0CED +:10D410000598390008F082ED7843A070000AFFF704 +:10D420006BFA0E98082802D20020A071E071707A81 +:10D43000022827D1300008F06AED617822780902CD +:10D44000114301290DD101004031A2788A70E278A0 +:10D45000FF30FF30CA702179801C81746179C174FA +:10D460005BE1010040318A78FF30A270C978FF305B +:10D47000801CE170817C2171C07C60710020A071F2 +:10D48000E0710EE06078217800020843012804D1A1 +:10D490002100300009F01EE93FE10698210009F063 +:10D4A0001EE9102074E0182072E00E99200009F0A7 +:10D4B0001AE932E10E99200009F018E927E021006D +:10D4C000300009F018E95DE5607821780002084332 +:10D4D000012810D1E078A17800020843C349086010 +:10D4E00009F0E4E83000FF305D3009F0E4E80100C5 +:10D4F000300009F0E4E8BD480068A070000AE07060 +:10D50000BB48D4E00E9A2100300009F0F8E8012869 +:10D5100001D130E48DE08CE02900300007F0BFFA43 +:10D520000B90FAE0002221783000130008F03AEF67 +:10D53000FEF739FC16E060782178000208430128E4 +:10D5400013D10E9805AB001F0590E078A178020278 +:10D550000A4300926078227801021143221D3000B4 +:10D5600009F0D0E8002897D163E0002861D1E17884 +:10D57000A3780A021A4301000092221D300005AB75 +:10D5800009F0C0E8002800D10B976B46988A4CE45C +:10D59000A870000AE870C0E021004C34300008F0A8 +:10D5A0009EEE2100300009F0B2E8002800D10B9770 +:10D5B0009020EDE7A01D05906078217800020843D7 +:10D5C000012853D1E078A1780D2033E30100000059 +:10D5D000BC5400C00004000075CEF456000208439D +:10D5E000012832D1059841780278080210430100E1 +:10D5F000FF392B3927D109F098E883480068824920 +:10D600000827B84308600A2008F0C2EC6079217945 +:10D61000000208437D4901220880059800790490A2 +:10D6200005984179049801F0B2FD01F002FE300046 +:10D6300009F07EE8012009F080E87348006872492B +:10D640003843086073E00B9771E009F07AE800282E +:10D6500012D06D4C20680827B84320600A2008F0DB +:10D6600098EC6A490020088009F062E8002009F07F +:10D6700064E8206838432060300009F066E856E02E +:10D680000028E0D10599FF202B300870000A48706F +:10D690000599022088700020C87003A904A801F031 +:10D6A000DBFD05986B46197C01710599039848715B +:10D6B00009F046E8002800D00120A070000AE070C0 +:10D6C000524800882071000A607130E02000FDF7A8 +:10D6D00064FE00282BD160782178000208430128DD +:10D6E00009D12000083008F058ED0700201D08F08F +:10D6F00054ED07601BE0201D08F04EED006821008E +:10D70000083108F086ED12E0E178A07809060914E6 +:10D710000143607822780002104309F01AE80128DA +:10D7200001D1FEF7B6FF02E0207809F016E80D9867 +:10D73000002816D068782978000208430121C9031F +:10D7400008432870000A6B466870988DA871000A1B +:10D75000E871E878A97802020A4310990F9808F056 +:10D76000BCED0998002802D0119808F05AED0D98E8 +:10D7700000280BD0089920E5320021000BA808F002 +:10D78000F0EF6B46998D0843FEF743FA204E307850 +:10D79000002806D11F4808F088ED002801D0FDF7C9 +:10D7A000ECFF01201DB0F0BD1B4910B50A78002A1E +:10D7B00005D002220A70194A0A2108F0D6EF082083 +:10D7C00008F0D6EF164817490068086010BDF0B59C +:10D7D00087B00027059708F0D0EF08F0D2EF0120BE +:10D7E000049008F056EE0A4B0F4A5F61D0681DE0C6 +:10D7F000B80B0000880E000044070000F0F100C0E4 +:10D80000680600045E06000400A300802C040004E7 +:10D8100024F400C05846000404F400C05DB00000C9 +:10D82000F0F300C0ECF300C000A70080042188439F +:10D83000D06093E2F94808F044EB039801890D1891 +:10D84000280008F0AAEC0B21060089014018406965 +:10D850000290281D08F0A0EC01231B03C21A984275 +:10D860007ED032DC08287CD013DC01287AD0022854 +:10D8700079D10498FDF76AFF002809D12069401C7E +:10D880002061012008F084EB02213000FDF7DBFC71 +:10D890005EE2802868D0C11FFF39FA39E8D1E04C38 +:10D8A0002068002870D0417A032901D001296BD16A +:10D8B0002179032969D0082901D0092972D1D84BCF +:10D8C000E288083308F060EF99E0D64D511BAA4278 +:10D8D00069D025DCD21A67D0D3495118C8D1D348B2 +:10D8E000D34A01681160D349016008F00AEDD248BB +:10D8F0004078002805D0D148002200681E2108F099 +:10D9000050EEFDF7CCFC08F044EF072008F030EFB4 +:10D9100008F042EF0028BBD13000FFF745FF3DE0A3 +:10D920007F225206891840D052008918A0D13000B9 +:10D93000FBF75AFD0028ABD008F032EF0028A7D043 +:10D940003000FBF796FF04000100300008F02CEFD8 +:10D95000200501D5FBF7CCFF002C99DAB84A04E08A +:10D9600009E092E1D4E1EFE17FE1422130000223BE +:10D9700008F01EEFECE1AD48AE490068884205D1E1 +:10D980003000FFF711FF06E03CE031E0AD4A0A212C +:10D99000300008F0EAEE012008F00EEF300008F049 +:10D9A00048ECD5E128E06BE172E108F082EAA64993 +:10D9B0004E6E0D6E0F664F6608F08EEA002411E081 +:10D9C0003900E807C00F7940084302D0200008F072 +:10D9D0004CECF007641C6D08FF7D55C3010000008E +:10D9E000B85800C000040000552D5CDC2406054337 +:10D9F0007608240E2A2CC7D231002800794008432B +:10DA0000E8D1AFE1E28808F086EA02E000220321D3 +:10DA1000F9E7276027710AE0307A012807D10298D8 +:10DA2000032108F074EC1121300008F0D4EE30002E +:10DA300008F094EE96E1E06801890D1805980189D7 +:10DA400046690C18287920716079B17A0007000FB7 +:10DA5000090108436071F17A000909070001090F03 +:10DA60000843607160782278010211437C4A881A69 +:10DA7000914253D031DC7B4A881A91420FD01FDC8F +:10DA8000794A881A914254D005DC7848081867D042 +:10DA90000C2864D1A7E00128FCD00728F9D108F0B0 +:10DAA000E6EB08F0E8EBE078A17802020A432100F7 +:10DAB000280008F01CEC2100280008F090EEB5E0EA +:10DAC000352836D004DC142833D03428E1D130E0B6 +:10DAD00036282ED04228DCD12BE021287ED00CDC49 +:10DAE00006282DD004DC022823D00328D1D120E041 +:10DAF00014281ED01F28CCD11BE03A2819D04F285B +:10DB000017D058282CD05E28C3D155485E302870D5 +:10DB1000000A6870380AAF71E87187E008F062EEB9 +:10DB2000002806D00021FF2008F0D0EC300008F0DB +:10DB30005EEEE078A17802020A432100280073E03B +:10DB40004748801D2870000A6870E079A1790002BA +:10DB50000843A871000ADFE73000FDF7DFFB8BE028 +:10DB600020000930069008222100280008F0BEEBB2 +:10DB70000820A8700020E87060782178000208432F +:10DB800037495831884209D10C20A8700020E8702C +:10DB900028000421083008F0AEE911E02C000698B6 +:10DBA000083408F004EB01000122200004F0CEF953 +:10DBB000E978AA78090211434018A870000AE870B1 +:10DBC000307A03280CD1707A002809D01720400140 +:10DBD00030180178042903D0022100E01AE0017016 +:10DBE0002348076022E008222100280008F07EEB8D +:10DBF0000820A8700020E8702800083003F0D4FD49 +:10DC0000E978AA78090211434018A870000A194956 +:10DC1000E870A1E728000822210008F068EB28003E +:10DC2000210008300C22083108F060EB002193E756 +:10DC300001010300284701C000F0FF010020C0FFE0 +:10DC4000ECF300C0F0F300C0FFFF0000543901C046 +:10DC5000F0F100C05E0600045DB00000A83801C00D +:10DC6000AF8000002C80000024800000FA7FFFFFBE +:10DC7000B4F400C0219600C0059808F0DCEAC24C5C +:10DC80000422606A002305A908F0B4ED0F2800D033 +:10DC9000D1E6CCE61821300008F09CED62E008F0F7 +:10DCA000AEED5FE0B94D2878002821D007281FD0BD +:10DCB00008F008E901902878032812D1207800287C +:10DCC00004D1B34808F0FAEA002802D002202870F4 +:10DCD0000AE004202870AF4A0B21300008F04EED16 +:10DCE00002E0012800D12F70019808F000E939E026 +:10DCF000A9480088002835D02078002808D1A448F9 +:10DD000008F0DCEA002803D108F07CED002803D0FD +:10DD1000012008F07CED25E0A04A0B21300008F03E +:10DD20002EED1FE09E480168002907D19A49098815 +:10DD3000002917D09B490988002913D0076099480A +:10DD4000078008F034ED00280CD1012008F062EDC6 +:10DD500008F064ED032008F066ED03E001003000F8 +:10DD600008F064ED039808F066EA8F4808F0B2E81E +:10DD7000854C0422A06A531F03A908F03CED0F282C +:10DD8000F6D061E5401E0006000E032800D90020F1 +:10DD90007D491C31085C704710B5427A022A02D1D5 +:10DDA00008F048ED10BD002901D00D2100E00E2142 +:10DDB00008F010ED10BD70B505007C4C0E007C49DC +:10DDC0002068884218D17448704A0188107801434D +:10DDD0000ED0002803D0072801D002201070754A09 +:10DDE0000A21280008F0CAECB8C91FAC01000000E5 +:10DDF000B45C00C000040000D27B528E73480068FF +:10DE0000206003E01021280008F0EEEC310028002B +:10DE1000FDF72DFA70BD4178027809021143CA1F3F +:10DE2000FA3A06D1083041780278080210430128F6 +:10DE300000D0002070475949086B0978002906D0A6 +:10DE400041780278080210434004400C70470020DB +:10DE5000704710B504005148036BFFF7ECFFE4284E +:10DE600009D15878197800020843052803D0002109 +:10DE70002000FDF75DFA10BD484810B50078002875 +:10DE800004D1484808F024EA002800D0012010BD41 +:10DE900010B5FFF7F1FF002809D1424808F018EA51 +:10DEA000002804D14A4808F0FCEB002800D00120EB +:10DEB00010BD4848394900784969C007C00F404241 +:10DEC000084201D1012070470020704770B50C0056 +:10DED00041494A695300414AD35A83701B0AC370AF +:10DEE000437905791B022B431DD10823837100233D +:10DEF000C3714B685B00D35A03721B0A43728B6871 +:10DF00005B00D35A83721B0AC372CB685B00D35A7F +:10DF100003731B0A437309694900515A8173090A43 +:10DF2000C173182121804179027909021143012925 +:10DF30000AD1202181710021C17128490830202295 +:10DF400007F0EEEF3020208070BD70B50021234C2B +:10DF5000214B427A067A15024A00A25A354395426D +:10DF600000D15960C57A867A2D023543954200D199 +:10DF70009960457B067B2D023543954200D1D960DF +:10DF8000C57B867B2D023543954200D11961491C22 +:10DF90001029DED308F020E8012070BD24F400C071 +:10DFA00004F400C0584600049BAC00005C3A01C079 +:10DFB00089AC000088F400C018F400C00001030020 +:10DFC000ECF300C0FFFF00005DB00000F0F300C004 +:10DFD000D80400043A5C0004F0580004E02001C0BA +:10DFE00010B59B4C20819B480079800703D5062102 +:10DFF000200008F0CAE89649606908F02AEC002879 +:10E00000206901D0082100E0062108F026EC608993 +:10E0100001F017F910BD38B58D4C2269824206D047 +:10E02000002A02D00320FFF7DBFF042038BD0025C3 +:10E030000B0008F016EC0C3A3A3A0B3A3A353A35FE +:10E04000073A323A0320FFF7CBFF2EE06069C16840 +:10E05000C9040CD5E168002909D17D4908F0F8EB25 +:10E06000002804D02069062108F0F6EB1DE079486D +:10E070000079C00708D013220092754AE3886069CE +:10E08000110008F0F2EB10E013220092704AE388CE +:10E090006069110007F088EF07E06D49022001E098 +:10E0A0006B49002000F0CEF82561032038BD002028 +:10E0B000002910B515D00A68D36D9B781C07A40FF2 +:10E0C0000FD11B090C2B01D00A2B0AD16032527AD6 +:10E0D000132A06D10869002800D00320FFF780FF2B +:10E0E000012010BDFFB58FB01C0005000F00584E79 +:10E0F0003069002804D0002C3ED0390002203AE0DC +:10E100003821684608F040E8534800905348019091 +:10E1100028007E300C957561002F0E9006D0504976 +:10E120000622380008F0D4EA002802D10E9906220F +:10E1300013E04B490622891D380008F0CAEA00287E +:10E1400009D107220021280007F01EEF002C13D070 +:10E150000E9900200FE0062239003D4807F0E0EE5E +:10E160003F493B48062208F0B4EA002806D1002CBB +:10E1700002D037490120A04713B0F0BD0B20800129 +:10E180002818416908AB097B197241690125497B4F +:10E190008907890F59724169497B0907890F99726B +:10E1A0004069407B8006800FD8721198242801D1E5 +:10E1B000758101E00020708108F01EEB002809D174 +:10E1C00008ABDF7A9A7A597A187A3B0001F062F844 +:10E1D000002804D008AB187B4008400002E008ABE0 +:10E1E000187B284308AB18731E48079018980690B0 +:10E1F000187B24210843187328897D07010000003B +:10E20000B06000C000040000DCCEFFE71198F08091 +:10E210006846F46008F036EB00283061B6D1114949 +:10E22000022000F019F8B1E71CB56B469871062280 +:10E23000684607F080EE0B486946406900F0E7FB4E +:10E240001CBD002208B50092CA798B7912021A43CC +:10E250000A4BFFF751FF08BD024AD268002A00D0DE +:10E2600010477047C45F02C010FE00C0CF5E00C000 +:10E27000675F00C060F100C0204E0000CD6000C0AC +:10E28000F3B5040089B0218940690E190121049178 +:10E2900000210A9A0791089106960592B27813090F +:10E2A0001B1F08F0E8EA0A17126A6A246A0C6A0659 +:10E2B0002C6A002861D0200008F0E8EA5DE0002820 +:10E2C0005BD0200008F0E6EA57E0002855D0062190 +:10E2D00005AA10E0002850D0017A03294DD18169A8 +:10E2E000426948318A4248D0252105AA03E0002826 +:10E2F00043D0032105AA143008F0D0EA3DE0002104 +:10E300000D000028039132D1032007F024EE07000E +:10E3100002D0787A002801D1002710E0380007F0F9 +:10E32000BAEE002801D00500BD355920C0003A18CA +:10E330002B00200003A908F0B6EA0028ECD06761A2 +:10E34000387A032811D1787A01280ED1012200925F +:10E3500000203A00FF32029041323100200002AB2F +:10E3600008F0A4EAA088002807D0002F05D0039A5F +:10E370000A99200008F09EEA049004980BB0F0BDC2 +:10E38000FF487047F8B50500FF21FE480022913193 +:10E3900007F058EF040001D10020F8BDFA49280128 +:10E3A0004718F81C08F08AEA0600606178202518F2 +:10E3B00020812821280007F0B2ED042028700020D9 +:10E3C0006870A878F3210840001D0007000F803016 +:10E3D0005921C900A87006227118A81D07F0AAEDDE +:10E3E0003100FF31280006224A310C3007F0A2ED3F +:10E3F00028002030009001780422114301704178F8 +:10E400007A780907090F120111434170C1788278A7 +:10E41000090211437A890907090F1201114381701A +:10E42000090AC1700021200008F04CEA207B202856 +:10E4300003D1200008F04AEAAEE7D4490C2208686C +:10E44000401C0860012000037881607B01210843A3 +:10E450006073CF48A0612220A0803420271820813B +:10E46000A91D380007F066ED002139737973E722A2 +:10E47000142120000E2308F02EEA0099497809099A +:10E4800081720099CA788B781102194309090172C7 +:10E49000090A4172317A0629817C02D10122114395 +:10E4A00001E049084900817407F0E4EE002802D039 +:10E4B000052008F0CCE907F01AEDB74B0500B54888 +:10E4C00021001C68002200680523A047280007F0EF +:10E4D00022ED0120F8BDF8B5012507F008ED009008 +:10E4E000AA48016802291FD2AC4EA74F3468002009 +:10E4F000092C00D0601C04000001395C002909D0FF +:10E50000C019408901210903884203D02000FFF788 +:10E5100039FF0500012D06D19C480068022802D26F +:10E5200030688442E3D13460009807F0F4ECF8BD21 +:10E5300096490868401E0860CDE770B505000800E0 +:10E54000403007F048EE81780909082916D12030BB +:10E55000040040788C4A01092800FF304A3008F056 +:10E56000BEE90A280AD0E178A27809021143864A56 +:10E570000001090980184181FFF7ADFF70BD70B53A +:10E5800005000C0007F076EE002804D0022007F00A +:10E5900076EE07F078EE2000403007F01CEE817830 +:10E5A00009090A2903D10100280008F09CE921008B +:10E5B0002800FFF7C2FF70BDF3B50400012681B04B +:10E5C000476900890519380007F054ED002831D05B +:10E5D000A878030908F04EE90E082E082E292E2EE1 +:10E5E0002E1D2E101419242E380008F080E9290061 +:10E5F000380006F0EBFC1DE0200007F0D0F819E031 +:10E600000299200005F069F9812A6BCD0100000014 +:10E61000AC6400C000040000F640567E14E0200008 +:10E6200005F099F810E02000FBF759FA2000FCF7FC +:10E6300092F809E002992000FBF700FF04E0029A3B +:10E6400021003800FCF7E7F83000FEBD70B504008B +:10E65000FF304A300D00060008F056E900280ED0C1 +:10E6600006222900300007F070EC200008F050E985 +:10E670002000FF30E821593007F09AED04E0210036 +:10E68000280008F04AE90400200070BDF7B5050035 +:10E6900016004769100007F068EC11E0206B0028B5 +:10E6A0000AD0022E01D0032E06D1A74204D06C61FD +:10E6B000226B0199280090473100200007F0E8EC18 +:10E6C0000400EBD16F61FEBDF3B583B006000127F6 +:10E6D00000898519A8780107890F36D10009042817 +:10E6E00068D008286ED00B2866D12900123102208C +:10E6F000029108F016E9040004D0200007F0C4ECF1 +:10E70000002809D10299032008F00AE9040003D087 +:10E71000607A022800D00024200007F0B6EC002820 +:10E7200079D028000C30019008F0D2E8002801D000 +:10E73000002206E00199200008F0F6E8012805D142 +:10E7400006220199200004F0E2FC64E0200007F0BA +:10E7500010EC0090607A08F0ECE80500200008F06A +:10E76000ECE8009920310978814229D9082D27D277 +:10E7700001992000FFF76AFF05004CD0019A29009B +:10E78000200005F0FAFC286B002844D075612A6B44 +:10E79000300012E0D56300C0780400047C800200E1 +:10E7A0003CF800C0256200C0F4F100C030F200C0A7 +:10E7B0006C7D02001FE005E028E0049990472AE004 +:10E7C0000722BEE729001231012008F0AAE800283C +:10E7D00021D029000C31FFF739FF04001BD0206B3A +:10E7E000002804D07461226B049930009047200007 +:10E7F00008F0A6E80FE0049903223000FFF746FF77 +:10E80000049902223000FFF741FF04E00499300030 +:10E81000FFF740FD0700380005B0F0BD7FB50500EB +:10E820000C0002D1481E04B070BD00200090019081 +:10E8300002902800039407F09CEB0300687A0228FA +:10E8400005D18F208000216818186A4608E0297ACF +:10E85000032901D1032805D12800216814306A4614 +:10E8600008F026E80020DEE7F0B5002885B001D1E9 +:10E870000120D1E7018945690C18002027000937DC +:10E880000090019003902800029707F072EB0600B9 +:10E89000280007F07AEB217821291CD011DC1D29F2 +:10E8A00019D009DC0B2903D00D2901D00E292FD155 +:10E8B000280014306A4612E01F290CD0202927D1E5 +:10E8C00009E00B00223B07F0E0EF0A060D162323B8 +:10E8D0001F23232306238F20800030186A4607F069 +:10E8E000E8EF19E0207CE17B02020A4339002800AE +:10E8F00004F023FE10E06030007801280CD10021E4 +:10E90000280004F0A6FE07E0280008F01EE803E057 +:10E9100021002800FFF782FF00207DE770B5050089 +:10E920004B26F60002E0012007F05AEBD748002200 +:10E93000310007F092EC0400F5D0AC206561208135 +:10E940002018692107F0F4EA200070BD70B50500B9 +:10E95000092080012818C06A0024002801D0040082 +:10E9600008342E002036002902D1B07FC00611D411 +:10E9700001221100280007F0ECEFB07FC00609D497 +:10E98000E86803210843002CE86003D0A07AFD2149 +:10E990000840A07207F034EB2800FCF744FD70BD7E +:10E9A00038B50400FF21002049310855E1680122F3 +:10E9B00012039143E1600B218901651869690873AD +:10E9C000207A012806D100221100100013000092C5 +:10E9D00001F0CEF807F0C0EF6869052107F0B4EC4C +:10E9E0003920005D000704D401221100200007F047 +:10E9F000B0EF38BD10B50400A5482200806804219E +:10EA00000068002307F030EC002805D16069802100 +:10EA1000FCF741FC002010BD809C54EA010000007E +:10EA2000A86800C000040000D6A3FEF4200007F090 +:10EA30002AEC012010BD70B505000E00FFF778FF2D +:10EA4000040024D020890722031997481870000A6F +:10EA5000587000209871D8710F2098700020D870DD +:10EA600018003100083007F07AEA28007E3007F0FD +:10EA700056EF002805D13100280007F008EF0028E4 +:10EA800002D02800FFF796FF2000FFF7BDFF70BD02 +:10EA900070B5040085480D001600190003D0062249 +:10EAA00007F05CEA02E0062107F08CEB7F480838AB +:10EAB000C680046005712000FFF77CFF122007F07C +:10EAC000DAEE70BD10B5040029200001201800F016 +:10EAD0001FFC7748210006227E31201807F03EEA0D +:10EAE00010BDFEB505000F001121380007F02AEA1D +:10EAF0006F483C00291810340622B81D07F02EEA92 +:10EB0000E868C0047ED5290006227E31380007F06F +:10EB100026EA28002030817F3973C07F7873002077 +:10EB2000207060700B2080012E1870692B2120301E +:10EB3000C07AA070000AE07070690A5C01002C3194 +:10EB4000201D07F00CEAE078A17800020843241D9C +:10EB50000419FF202B302070000A60700220A07082 +:10EB60000020E07001A9684600F0A8FB6B46187809 +:10EB7000207101986071E078A17800020843241D9B +:10EB8000041901202070002060700E20A070002069 +:10EB90002900E0700E224A31201D07F0E0E9E078FC +:10EBA000A17800020843241D0419B0690721C90196 +:10EBB00040188079002814D02070641C0020207038 +:10EBC000B269641C5118C9792170641C2070B06945 +:10EBD0007121C900641C41180722200007F0BEE91A +:10EBE000E41D3448017E002912D02170641C0021EC +:10EBF0002170407E641C2070641C2170641C2D49AF +:10EC00001A2200E004E01831200007F0A8E91A34C5 +:10EC1000E01BFEBDF0B5050087B00F0014001E001C +:10EC200001A800F075FB0622390003A807F096E959 +:10EC30006B46200A5C76987604A80722801C01A9FE +:10EC400007F08CE93200280003A907F094EE07B022 +:10EC5000F0BDFFB581B0060015001F00FFF768FE8C +:10EC6000040009D0029A2B0031002000009707F021 +:10EC700086EE2000FFF7C8FE05B0F0BDF8B5150020 +:10EC800006000F00FFF754FE040008D02B003A00E6 +:10EC90003100200007F076EE2000FFF7B5FEF8BD4A +:10ECA00094040004184701C024800000304701C0CC +:10ECB0008A020000DC5E02C010B50968491C03D15D +:10ECC0004168183107F062EE002010BD0200080014 +:10ECD00010B50968491C05D151681000183107F0BA +:10ECE00056EE002010BDF8B504000E004B68856993 +:10ECF00030689F68D96800220D284AD017DC0A289E +:10ED000061D00CDC801C68D001282DD004286BD188 +:10ED1000002D69D05968280007F03CEE64E00B280C +:10ED200047D00C2860D1280001F05AF94EE017288E +:10ED30004FD006DC152857D0162855D10120207455 +:10ED400048E0182850D025284ED1002D4CD0287AE4 +:10ED5000032849D1687A012846D11A6859682800E1 +:10ED600007F034EA0020F8BD2800627400F060FD6E +:10ED70000021012007F056E907F010EE002804D02A +:10ED800007F00CEE007A0328ECD0002007F022ED0B +:10ED9000E8E73900280001F0E7FB0104090C28002E +:10EDA00001F0B5F9DEE761682431200007F0EEEDEF +:10EDB000D8E73900280001F026FB0104090C2800DF +:10EDC00001F09EF9CEE7280001F02AF90028EAD0E8 +:10EDD000C8E7227461683C31E7E70121080007F0C9 +:10EDE00022E92068A060BDE73000F8BD70B50400DE +:10EDF0004D6808000368E968A669092B67D009DC3B +:10EE00009B1C07F04CED0B78227B7B7B4A7B7B5075 +:10EE100041567B00172B69D005DC152B6ED0162BC5 +:10EE20006CD1012063E0182B316BD8720100000017 +:10EE3000A46C00C00004000051F5F0A668D0252B9A +:10EE400066D1002E64D0317A032961D1717A01290B +:10EE50005ED12A686968300007F0C2E957E00320F4 +:10EE6000800207F0AAED300007F0AAED300007F0AD +:10EE7000FCE9012007F0A8ED012007F0B6EC617C69 +:10EE8000002944D03300628A7E3337E0FFF70AFE60 +:10EE900061681831200007F084ED38E00C31C87942 +:10EEA000897902020A43032130000023EEE72A6831 +:10EEB0006968300000F0D6FB29E02A6869683000F4 +:10EEC00000F054FB23E00C310D00300007F0E8ECBB +:10EED00000281CD0E879A97902020A432B000821F6 +:10EEE0000CE00C310D00300007F0DAEC00280ED0F9 +:10EEF000E879A97902020A432B0009213000C5E70D +:10EF00000020207461683C31C4E72068A0600020C4 +:10EF100070BDF8B5040008000B684D68A6690027AD +:10EF20000E2B1DD008DC9B1C07F0C2EC0A5A0F59AF +:10EF30005959415959473059152B4FD0162B42D0AA +:10EF4000172B47D0182B4AD148E0022007F04CEC91 +:10EF5000012007F03AED07F03CED07F03EED3DE013 +:10EF6000012007F03EED61682000183107F018ED30 +:10EF7000300007F06EE8300007F06EE87648076072 +:10EF800076480760300001F08FF827E00121080083 +:10EF900007F07AE80021012007F04EE80022032163 +:10EFA00030001300FFF77EFD616818310EE02A681B +:10EFB0006968300000F056FB10E02A68696830008C +:10EFC00000F0D4FA0AE00120207404E0200007F0E9 +:10EFD000E8EC03E0277461683C31F7E70020F8BDF6 +:10EFE0002068A060FAE770B5040048680A68C56840 +:10EFF000A069092A2CD00FDC921C33D0012A15D02D +:10F00000092A22D00A2A2FD129000C3107F048EC16 +:10F01000002827D0082022E0152A10D0162A23D055 +:10F02000172A21D0182A1FD1A1680AE007F000E9A9 +:10F03000002007F0CAEC002007F0D6EC12E061686F +:10F040004831200007F0ACEC0CE00320607409E0CC +:10F0500029000C3107F024EC002803D0092060744B +:10F06000688A6082002070BD080070BD70B5040021 +:10F07000080049680368CD68A269142B17D018DC12 +:10F08000072B2CD004DC9B1C35D0012B10D10EE0BB +:10F09000082B27D0092B0BD129000C31100007F0C9 +:10F0A00000EC002803D009206074688A6082002088 +:10F0B00070BD153B002107F0FCEB060404040507B6 +:10F0C0000E04F5E7A16802E0617461683031200048 +:10F0D00007F066ECEBE7617461681831F7E703202D +:10F0E0006074E4E729000C31100007F0DAEB002827 +:10F0F000DDD00820D8E72068A060D8E7184910B50F +:10F100004160184A1648002107F072EC1449164A6B +:10F1100008000C30040007F06CEC1148134A210081 +:10F12000183007F066EC0E48114A2100303007F025 +:10F1300060EC0B480F4A2100243007F05AEC0848D5 +:10F140000D4A21003C3007F054EC05480B4A2100E1 +:10F15000483007F04EEC10BD742201C0782201C087 +:10F16000384701C0356B00C0496B00C0636B00C0FD +:10F17000696C00C07B6D00C04F6E00C0D56E00C0D2 +:10F18000F8B504000D0017001E00002825D0492006 +:10F19000005DC00700D0012007F02EEC200007F032 +:10F1A00030EC07F032EC06222100280006F0E0EEF9 +:10F1B0002021A01D06F0ACEF05000200A11D3800C3 +:10F1C00007F026EC2900A01D357006F0C2EF2000E4 +:10F1D00007F022EC012007F008ECF8BDF8B50D00AF +:10F1E000160007F012E804000C20694606F074EFE0 +:10F1F000030022003100280006F072EFF8BD002065 +:10F20000FF49C860704777B583B00D001400FC4E0D +:10F21000F068814228D10122F11C03A807F080EA9E +:10F22000002821D107F0FCEB002809D0002C2DD1BB +:10F23000002007F0FAEBF348026E1A5701000000B5 +:10F24000A07000C0000400009764AFE0012107F047 +:10F25000FAEB25E0012C23D1280002AA03A901AB77 +:10F2600007F0F4EB6B461A79197A280007F0F2EBF5 +:10F2700007F0F4EB012007F0E2EB11E0230001229C +:10F28000280003A907F0EEEB6B46187BF070F560E1 +:10F29000B168002904D13070B56007F0CCEBB070D4 +:10F2A000002006B070BDDB4938B50200CC78009470 +:10F2B000C96800980906090EFFF7AFFF38BD10B501 +:10F2C000D44CE0782070E068A06007F0D0EB60706C +:10F2D00007F0B0EBA07010BD10B507F0C8EBCD493A +:10F2E000487010BDCB4A002801D013780370002964 +:10F2F00001D090680860704730B50400C54D00200B +:10F30000AD68A5420ED1C34C2478A507AD0F8D4240 +:10F3100008D12107890F914204D1A106890F994292 +:10F3200000D1012030BDBB48C01C0078800701D14E +:10F330000120704702207047B6490A780270896838 +:10F340004170704770B505000C0007F094EB002881 +:10F3500001D1B24805E0280007F090EB002801D168 +:10F36000AF480440200070BDF8B504000E0017003F +:10F370001D001100300007F086EB3900300007F067 +:10F3800086EB0100200007F086EB200007F086EBFB +:10F39000200007F088EB07F08AEB2900200007F037 +:10F3A0008AEBF8BD70B504000D00080007F05AE8BC +:10F3B000002803D028007E3007F02CEB002C06D06C +:10F3C000002007F024EB97480068804702E0012006 +:10F3D00007F01CEB012007F012EB0120000607F0FC +:10F3E0006EEB07F070EB70BDFEB500210400894D97 +:10F3F000687807F06CEB207A032804D1200007F02E +:10F400006AEB002807D128680090A968AA78090645 +:10F41000090EFFF702FF207A0027012803D1E068D8 +:10F42000C00400D5012721003800FFF7BBFF2200F0 +:10F4300061320092260040362000317E00224A30A0 +:10F440001300019006F072EE002F03D1010020009E +:10F45000FFF778FF0300327E01992000FFF784FF59 +:10F4600007F03CEB00206860FEBD70B505006E4CF7 +:10F470000E00207900218006C20F280007F032EB31 +:10F480002079C00604D53100280007F030EB70BDAC +:10F49000280007F008EB07F02EEB70BD70B5624C4A +:10F4A0002079C006C50F201D07F028EB2079C00683 +:10F4B000C00FA84201D007F026EB00F063FE70BD3C +:10F4C00070B50400584E0D00301D07F020EB207A77 +:10F4D000012803D12900301D07F01CEB70BD00216D +:10F4E000012010B506F036EF04000DD007F016EB42 +:10F4F00001002000FFF7E4FFFFF7D0FFFF205530A9 +:10F50000015D2000FFF7B1FF10BDF8B51500070041 +:10F5100008004978027809021143002634000C39AA +:10F520002A002C3006F05AEDE869002801D0447812 +:10F53000861C6A6B0092A86923004178801C320007 +:10F5400006F0F4ED01003800FFF7FCFEF8BD7CB5D5 +:10F550001500304A0E001278334C1900920705D07E +:10F56000201D07F0E0EA00F00DFE7CBD2F4A00915F +:10F570000100019233002A00201D07F0D8EA7CBD6B +:10F58000F0B50C000700123195B007F094E900289F +:10F5900020D0210038006A46FFF7B7FF050007F0CA +:10F5A000BEEA060001003800FFF78AFF2000089A33 +:10F5B000330029002A30FFF7CAFFFFF76FFFFF2053 +:10F5C0005530C15D3800FFF750FF049A03993800A9 +:10F5D00007F0B0EA15B0F0BD01207047F7B582B072 +:10F5E0000C00160007F0AAEA0F000500210008220F +:10F5F0002031684606F0C6ECF07E07F0A4EA010070 +:10F600006078227800021043001D000106F0D6EC5D +:10F6100000210DE058F800C0FF070000FF3F008008 +:10F62000FFFF3F80C4BB02003A5C0004404B4C002B +:10F63000009A019B801859410090300030300191B0 +:10F6400006F0F0ED009A281A3102737401000000F0 +:10F650009C7400C000040000E29A54588018019B7A +:10F66000002159410191009002990B208001081856 +:10F670004169019B009ACB618A6140692100476220 +:10F680000562029807F06CEA05B0F0BDF7B59EB0D0 +:10F690000C000600007A0D001234032801D0002867 +:10F6A00005D12100300007F010E900287DD02900A5 +:10F6B000300008AAFFF733FF079007F03AEA070087 +:10F6C00001003000FFF706FF2800109A07993B0061 +:10F6D0002A30FFF746FFFFF7EBFE2200300008A9B3 +:10F6E00007F042EA0B20099980013418002904D060 +:10F6F0000998C178606940308173280020301D90DE +:10F70000417A027A08026169104340318881F948E0 +:10F71000099B00788207920F0092697828780A0284 +:10F7200002431D99300007F024EA069007F010EA22 +:10F73000070005911D99082202A806F02EEC2098DA +:10F74000C07E07F00AEA69782A7809021143091D88 +:10F750000A010100100006F03CEC029A039B80189D +:10F7600000210290209859413030039106F064ED59 +:10F77000029A381A039B8018002159410391029084 +:10F780006069039A0299C261816162690599176291 +:10F790005162307A012809D1079A0092209A2900F3 +:10F7A000300008AB00F0E5FF3BE026E02900300028 +:10F7B00007F0D6E9069A0999300007F0DEE90C9ABD +:10F7C0000B99300007F0C0E90D980021002805D002 +:10F7D00062698078127B904200D00121C54C0029DB +:10F7E0000DD06068401C0328606006D3072200210A +:10F7F000300006F006EC0020606021B0F0BD002073 +:10F8000060600798BC490F28087905D9F722104095 +:10F81000C008C000801C03E008221043C008C000DC +:10F820000871FF205530815D3000FFF728FEE4E7C6 +:10F8300070B5040014300500FFF774FCA1692800BE +:10F84000183107F09EE9002070BD10B5AA4C21794F +:10F850008906CA0F002107F050E92079800601D5FA +:10F86000012000E0002007F090E910BDF0B5040091 +:10F87000002085B007F08CE90320800207F0B0E893 +:10F8800020003E3007F088E90B21207A890100270B +:10F890006618032818D11720400120180078032883 +:10F8A00012D1200006217E3006F06AEB706920211B +:10F8B0002C3006F0A6EC70692030C77270694030B9 +:10F8C000877370694030878106F042EB0190207A9F +:10F8D00003280FD1607A03280CD17120C0002518AD +:10F8E00001E007F05EE968680028FAD100212000F5 +:10F8F00007F05AE9019806F040EB200007F058E9BC +:10F90000200007F05AE92000FF3006214A3006F0B7 +:10F9100038EB2000FF30413000210390018206F0D7 +:10F92000E4EB002800D12000FF304130008A07F0CE +:10F9300048E90021012006F0B4EB207A07F044E901 +:10F940000121080006F0B4EB0021012006F088EB4D +:10F95000092080012018050007F03AE9200006F090 +:10F960007CEC200006F0FCEF207A002801D107F0A3 +:10F9700034E9200007F034E9604F0E21786A401D19 +:10F9800006F0DAEB029007F030E900220092786A84 +:10F990000299401D130006F0D4EB796A0300029A25 +:10F9A000491D2000FFF7EAFC200006F026EC0022AB +:10F9B0001100200007F01CE90121200007F01CE9DC +:10F9C000706900278030C780686B06F03AEB6F6380 +:10F9D000286B002802D006F038EB2F63E06841075F +:10F9E00001D4C0060BD5E86A002802D006F02CEB43 +:10F9F000EF62686A002802D006F026EB6F62207A78 +:10FA000003280BD1E86A002802D006F01EEBEF6253 +:10FA1000686A002802D006F018EB6F62E0681021D7 +:10FA20008843E0607069002140308173706964220E +:10FA300040308281324AE0682F4F9043E060039863 +:10FA4000C17161212000C943A0300182418252214D +:10FA5000381D06F096EA3879908E780E0100000085 +:10FA6000987800C000040000C279FCD2202108432D +:10FA700038712000FFF7F3FE0122FF21300006F06D +:10FA80000EEB607A032806D1A86A002803D006F09E +:10FA9000E6EA0020A862200007F0BCE8FEE51A496B +:10FAA00000204860704710B5417A022903D1C06830 +:10FAB000C0040DD40AE0416980694830814207D111 +:10FAC00006F0E0EC10498968884201D0002010BDA2 +:10FAD000012010BD10B5417A022905D106F07AEA5D +:10FAE0008F218900401800E014300168406802004E +:10FAF0003032914205D00C3A914202D03C308142E2 +:10FB00000AD1012010BD000058F800C03A5C000482 +:10FB1000F0580004040002000020F3E710B5417A19 +:10FB2000022905D106F056EA8F218900401800E02D +:10FB30001430016840681830814201D10120E1E7AA +:10FB40000020DFE72249002010B5486000F08FFE5A +:10FB5000D8E70100012010B507F060E8D2E7F0B562 +:10FB6000040087B0684607F05EE820681A226946FC +:10FB700006F01CEA206800251A3001262060A90042 +:10FB800068460C18A07A4006800F07F050E807007E +:10FB9000E07A0107090F30008840411E380007F065 +:10FBA0004AE8E07A310000098140491E380007F038 +:10FBB00046E8A07A0107090F380007F044E8A18958 +:10FBC000380007F044E86D1C042DD8DB07B0F0BD09 +:10FBD00058F800C030B5FD4C039D2FC430BD70B542 +:10FBE000160004000D000A00F949F84807F032E851 +:10FBF00000281CD068782978000208432D2806D1F7 +:10FC0000F2481C2201682000613006F0D0E9E0686B +:10FC1000402108430B2189016118E060096A203105 +:10FC2000C97D890702D580210843E06070BDE8489E +:10FC30003200290007F012E870BDF8B504000E008C +:10FC4000E348150007F00EE8002211001000130031 +:10FC50000092FFF7BFFF2000FEF792FE040008D0DD +:10FC6000337901222900200007F000E82000FEF788 +:10FC7000F3FEF8BDD74810B544690820044001D10F +:10FC800006F0F8EF06F0DEED002C02D1082006F0B9 +:10FC9000F6EF10BDF3B58BB0060000200990079079 +:10FCA00006900590049006F02AEA002801D1FFF79B +:10FCB000E1FFFF204930805D002806D10C9820210B +:10FCC000083006F044EA002801D1012009900B20F9 +:10FCD0000022800134180092216A0B000A000800FB +:10FCE000253318323530FFF775FF099800287ED18B +:10FCF000B74806F0C8EFB649FF20091F086030007A +:10FD000006F0C4EF00280A9071D00A9805AB01896B +:10FD10000D1860690C9940308289AF4800920268E2 +:10FD20002800521D093006F0B6EF6B46988A0D2167 +:10FD30000838059029700C990822681C06F036E9ED +:10FD40000C984D303DE0001F0004089C000C05900D +:10FD5000E178A2780F021743874237D8607821787C +:10FD6000000208437F280FD005DC212822D030284C +:10FD70001AD106941EE0DD280BD0FF38503813D17D +:10FD80007F202070002060709148210006F086EFEF +:10FD900010E0201D06F086EF032801D1079403E050 +:10FDA0008B48210006F07AEF2A004E322100300005 +:10FDB000FFF715FF6B46988AC01B05900898C0197D +:10FDC000001D6B460890988A0428BCD283486B4675 +:10FDD0003218401E311804A807C330007C4B069A25 +:10FDE000079906F064EF00281CD0042100E020E011 +:10FDF000F0686B468843197CC907490F0843F060D7 +:10FE0000734808A906F056EF290050314872000ADD +:10FE100088720898491D06F056EA0A9806F04EEFD7 +:10FE2000012803D10A9806F056EA02E00998002852 +:10FE300004D06B4A0C993000FFF7FFFE0DB0F0BD07 +:10FE4000F3B58BB006000020099007900590049050 +:10FE5000039006F054E9002801D1FFF70BFF3000B2 +:10FE6000FF3041300A90007AD2A75A1401000000F6 +:10FE7000947C00C000040000452FF280002801D0CF +:10FE8000012009900B200022800130180092016AA5 +:10FE90000B000A000800253318323530FFF7A4FEA6 +:10FEA000099800287ED14F4806F0F6EE300006F0A3 +:10FEB000F8EE0028089075D0089807AA01890D1857 +:10FEC00028000C99093006F008EF6B46988B4549DD +:10FED00008380790FF20091F08600B2129700C9833 +:10FEE00065303AE0001F0004069C000C0790E178A2 +:10FEF000A2780F021743874234D860782178000235 +:10FF000008437F2817D005DC21281FD0302817D1BF +:10FF100004941BE0DD2807D0FF38503810D17F2033 +:10FF200020700020607006E0201D06F0C6EE032859 +:10FF300001D105940AE02B48210006F0BAEE05E055 +:10FF40002A00623221003000FFF753FE6B46988B87 +:10FF5000C01B07900698C019001D6B460690988B31 +:10FF60000428BFD222486B463218401E311803A81D +:10FF700007C330001B4B049A059906F0A2EE002837 +:10FF80001CD0F068042188436B46197BC907490FD0 +:10FF90000843F060134806A906F096EE2900603188 +:10FFA000487300E014E0000A88730698093106F0EF +:10FFB00094E9089806F08CEE012803D1089806F021 +:10FFC00094E905E00A99022008720998002805D0F2 +:10FFD000084A0C99521C3000FFF739FE38E7000040 +:10FFE0008C4701C06CF800C0C0A2008034F800C08B +:10FFF000F70200002B80000010B5040006F0F8EBBB :020000023000CC -:100000000E4908682022104308600121092005F0EC -:10001000D4EC002071E700003A5C0004B81E01C077 -:10002000B41E01C0ECF500C02CF600C0B4BB020049 -:10003000B8BB02009C1E01C0A01E01C000A700802A -:10004000F0B504000E000221072089B005F010ED84 -:10005000002804D1200005F010ED002802D0032074 -:1000600009B0F0BD04A903A8FEF7A8FE3000403097 -:10007000817935002035002904D041796B46197605 -:10008000807903E06B46187B1876A87B6B46587620 -:100090002878022805D1A878697800020843012849 -:1000A00001D20120DCE70B2080012018826B6B4617 -:1000B000597E1173806B197E4173032006F0F0EABC -:1000C000A8786A7801021143A02001536B465A7E3A -:1000D000200006A9FEF7F8FD6B46597E069800221F -:1000E000FEF707FEFEF757FE23009E332200191D80 -:1000F0007E323000089106F0E0EA300037300E2101 -:10010000079005F0CAEC5821059008552000059A83 -:1001100007994A3005F0E8EB0320000220188268B6 -:1001200007983532009200220599130005F0B8ECCB -:1001300007000300059A07992000FEF781FE2000C2 -:1001400005F00AED012020723100200006F0B8EA27 -:10015000A87DC00705D06B46597E01222000FFF71D -:10016000F0FC380006F0B0EA8A4AC0071179BF23D4 -:10017000400E194001432000117105F09AEC00284F -:1001800000D0FEE720008030C16BAC270F81C16B2F -:10019000814BCA191A60826B804808230260019261 -:1001A0000091089A31002000FFF761FD2000C03067 -:1001B00041687B4B0F814168CA191A60026879480F -:1001C0000523026001920091089A31002000FFF798 -:1001D0004EFDA87869780002084306F06AEA20001C -:1001E000697D203069A70D3A010000008C8400C0B1 -:1001F00000040000D84CE1FC8177A97DC177200084 -:1002000006F054EA0221082005F008EC6B49086862 -:100210002022104308600121082005F0D8EB0020BF -:1002200028E7F8B504001E00069F06F05CEA05000A -:100230002000FF3081300069002839D1E0680121B9 -:1002400009030843E060716B002904D020001C22E0 -:10025000613005F054EB2A68582035320092015D78 -:10026000002220004A30130005F024EC0100394040 -:10027000200006F03CEA200006F060E8200005F0CF -:10028000C2EC3069002801D0012100E000212000EB -:1002900006F030EAE0680121084302221043E060E2 -:1002A0002200FF32697572322021200006F026EA12 -:1002B000200006F018E80F2F0AD83B4908220879D9 -:1002C0001043C008C00008713D481E3105F0A2EC83 -:1002D000F8BD4169806902002432914202D03C306D -:1002E000814201D101207047002070470221072080 -:1002F00010B505F094EB31480168202211430160EC -:100300000121072005F062EB10BD2E490020086096 -:1003100048607047FEB5020004000E0001004A313B -:1003200058323000019106F0EEE905F004ED0320AB -:100330000002201882682000353200924030017E91 -:10034000070000220198130005F0B4EB050003003C -:100350003A7E01992000FEF77DFD280006F0BEE9F7 -:10036000114AC0071179BF23400E194001432000F4 -:10037000117105F0FCEB3100200040314A7A203049 -:100380008277897A2300C1779E3322007E32191D3D -:100390003000FEF775FC0C49002008700120207227 -:1003A00006F0B4E9FEBD0000365C0004B81E01C0D2 -:1003B0009C1E01C0B41E01C0A01E01C000A7008089 -:1003C000404B4C002CF600C0F8F500C03EB50021B3 -:1003D00004000A000B0068460EC00622FB4968466E -:1003E00005F08CEAF94D0022CB3DAA70687B012113 -:1003F00000280CD0012807D0042803D180206B46A8 -:10040000987106E0002C02D06B46997101E06B46B2 -:100410009A716B4629739879A873EC4800220B38BF -:10042000C16BD243FF3161310A81C06B694606F06E -:1004300072E93EBDF0B591B0E44C0B3CE06B06F0C8 -:100440006EE90500402101A805F094EBDF49062282 -:1004500001A805F054EA200020300100427C03A8E6 -:100460000F39801C05F04AEA20002030C17C6B4621 -:100470009972007DD872D6480021008826009881A4 -:10048000A37AC03E01AA0AE07018A030007F571876 -:1004900020374006400E491C0906090EB8728B42EF -:1004A000F2D800270420B7703073E06B2822525D29 -:1004B000C16801263603D207B143D20C1143C16093 -:1004C000C2480FA9173806F096E810AB1880E06B09 -:1004D000C168C90404D4BD494B390968002905D055 -:1004E0002A00002301A906F01EE902E001A906F096 -:1004F0001EE900285FD1E06BC1683143C160E06B49 -:10050000002858D00521C9014018406A002852D05F -:1005100060300783E06B00284DD04018406A002807 -:1005200049D060304783E06B002844D04018406ACF -:10053000002840D060308783E06B00283BD0401813 -:10054000406A002837D06030C783E06B002832D083 -:100550004018406A00282ED080300780E06B0028C9 -:1005600029D04018406A002825D080304780E06BB1 -:10057000002820D04018406A00281CD08030878096 -:10058000E06B002817D04018406A002813D0803054 -:10059000C780E06B00280ED04018406A00280AD0BF -:1005A00080300781E06B002805D04018406A0028A1 -:1005B00001D08030478111B0F0BD38B5040006F09D -:1005C000AEE8E1680500880340D4012040040143FF -:1005D0007E48E160AB380079002809D00B2080010B -:1005E0002018806B4030007EC00701D0012100E060 -:1005F00000212000AEC397E701000000888800C0FA -:1006000000040000F8AF497606F09EE800212000C3 -:1006100000F02AFF40212000FDF77EF9200006F0BF -:1006200098E86F484B38806800280ED06C48CB386B -:10063000C169002909D07D22D2004A4300920322D9 -:10064000290020000023FDF703FB674800880028ED -:1006500006D005F01EEB002802D0200005F0D0EAFD -:1006600038BDF8B5062206005D4831000B38C56B71 -:100670002800FF30723005F04CE9280006223100D6 -:10068000A23005F046E928007E302021070005F061 -:1006900034E934002034A279B11D380005F038E97E -:1006A000A1799E2041550B2189016818826BE3795D -:1006B0004032117E5B0749084900DB0F1943117670 -:1006C000FD221140E279806B1207D20F52004030B8 -:1006D00011430176E079400701D5012100E00021B6 -:1006E000280006F032E83E490020CB39487131003D -:1006F00005F096E9012005F048EEA179B01D05F05E -:1007000000EA32003100280006F026E8F8BDF0B516 -:1007100005000B26324CB6010B3CE06B87B081190B -:10072000896B029106F004E82700C03F0190B86889 -:1007300006F016E80720387320002900603805000D -:100740000177387905F0D8EE05F0B6EE0591049002 -:10075000287F0027002801D002287ED1204803A945 -:10076000173805F052EF010003981D4A891F09044C -:10077000801D090CA33A05F0F8E8287F0028ECD189 -:10078000E06B019905F0F0EF05F04AEFE16B144DD5 -:100790008919896B1535687E0873E06B8019816B48 -:1007A00028000690807E4873E06BE98AA0300180C3 -:1007B000E06B8019816B28006038436902694B62E5 -:1007C0000A62E16BC2698919896B80692E00CA616E -:1007D000603E88613068002808D0376312E000006E -:1007E0006B6B02C0961E01C0C43B01C0F94805995D -:1007F000C36A826A0498801A9941F74A3B0005F05F -:100800004CEB3063E06B0121C26809030A43C2600C -:10081000E06B0422FF3061300274E06BC2688A43EF -:10082000C2600421072005F038E900280AD1E94810 -:100830000599436A026A04988018EA8A594192022B -:1008400005F096EFE06B0122C16812031143C1600D -:10085000029F0020FF377F1C00E060E0411E3880CF -:100860000298E030C18305F028EEF960B860E06BD3 -:1008700005F082EF05F084EFF961B861032005F01F -:1008800024EFE06B05F080EF287DC00704D0697E7F -:10089000E06B002205F010E905F07AEFE06BFAF763 -:1008A000A8FBE06B06992030CA7C8277097DC1776E -:1008B000E16B00208031C877C84904220870E06BE2 -:1008C000C1689143C34A603A1379DB075B0F194350 -:1008D0001023C16099435379E06BDB07DB0E1943AA -:1008E000C160F068002815D1E06BCB040BD5CB06B6 -:1008F0000BD4490709D4010020318B7FDB0602D5D8 -:10090000497E090701D50121F1601179527911431E -:10091000FDF7BEFDAF4880388068072139E0019DB2 -:1009200006262035287A0028E06B11D0019905F0C1 -:1009300080EC002808D0E06B019905F016EFE06B21 -:1009400000F048FD082609E00198FFF78AFE05E05F -:1009500000F040FDE06BFF3061300774E06B012276 -:10096000C168120391432A7AD207D20C1143C160A5 -:1009700098499B485222803104F0CAEFE06BFEF7A1 -:10098000D8FCE06B002100F06FFD92483100803808 -:10099000806805F052EC05F01CE8E06BC1684A077E -:1009A00002D402221143C16007B0F0BDF7B582B096 -:1009B0000326884C4034E06B05F0BAEE25000700B2 -:1009C000C03DA8680299884207D0002802D00C20B8 -:1009D000FFF79DFE042005B0F0BD039B05F030EC51 -:1009E0000A86068629746A82827F2086E878401CFF -:1009F000E870E06BC068C0040BD505F0CEEE0028AF -:100A000007D005F0AD4D4EC801000000848C00C039 -:100A1000000400007FF94724DEEA002870D105F0C9 -:100A2000CAEE00286CD1E06B05F0C8EE002867D054 -:100A3000022665E0287B072862D003283DD8687825 -:100A4000401C68703CE0E06B012100F017FD05F0F0 -:100A5000BAEE654980390871002005F058ED624D05 -:100A60002037803D2800397ACB308035002901902D -:100A700009D0E06B019905F0E6EB012100286860E0 -:100A800000D00021A9605849A27AE06B00233C31D4 -:100A9000FEF7F4F90198FFF7EEFDE06BC068C004C3 -:100AA000C00F3872504880384178491C41706968DD -:100AB000002902D1407B032802D1FFF7CFFC1FE0C1 -:100AC0000020FFF797FC1BE06878002818D0032867 -:100AD00016D2401C687005F066EBF1E7287B07280A -:100AE0000ED0032801D9042000E00A20FFF719FEE8 -:100AF00006E0E06BFDF700FD0020A86000F092FC2E -:100B0000300072E7FFB581B000240E000398002882 -:100B10003FD00398062201890D183348290012316D -:100B20004B3005F0F8EA002832D1A8782E4F0009A2 -:100B300040370A2810D00BDC01285DD003285BD099 -:100B4000082826D1F86B0A9A2900FEF7D1FA1FE08F -:100B50000B280AD00C281CD1234C803CA06805F03F -:100B60000AEE6078002868D112E01F4C803CA06833 -:100B700005F000EE207B022803D0012808D105F003 -:100B800012EBF86B0A9905F022EE039805F022EEBD -:100B90000124002E27D03068C56D1C380090A8783D -:100BA0000107890F1FD1000961D002285FD00B28EF -:100BB0007CD10D4F0124803FB87B01280BD0B86851 -:100BC00005F0D8EDB869002805D07D21C900414362 -:100BD000B86805F004EE30690028387B37D1012869 -:100BE00064D10220387361E0206B02C040420F00E4 -:100BF000F8F500C03A5C0004FF4CA06805F0BAEDBF -:100C0000207B052803D00428C2D105F0CCEAF86B7C -:100C10000A9905F0DCEDF848B430040005F0E2ED87 -:100C20006878297802020A4329002031200005F063 -:100C3000DEED039805F0DEEDAAE70328A8D2401CFC -:100C4000607005F0B0EA0020FFF7D4FBA0E70128B0 -:100C50002CD1B878401C0006000E0228B87025D8A8 -:100C6000E878F7210840E8701BE002241EE03069B4 -:100C70000124002806D1E048017B042916D1052172 -:100C8000017313E0DC49087B04280FD18878401CED -:100C90000006000E0228887008D8E978F720014085 -:100CA000E970009805F0AAED0028DED020009CE64F -:100CB000F3B5A9B000260400CF4D0496C0350A96BE -:100CC000E86B05F040ED0D90EF6B00210A001EA8C7 -:100CD0000E9706C01C21C94804F018EE281F0E21EB -:100CE000279004F05CEF20000D302090607A217A8C -:100CF0000002084301D0C2490880BF4800262030C6 -:100D00002690067160300B22066292014662B81886 -:100D1000816B4031087E400840000876E96B8918F5 -:100D2000896BFD22403110400876E86B0122C168D2 -:100D3000D2039143C160269805214671AE484173A4 -:100D4000B430259005F052ECAB4806222100CB30A0 -:100D500004F0E8EDA848E0302490A179C174E1796D -:100D600001752498A17A8175E17AC175217B249857 -:100D7000A14C01762498210086762A98D1310D382D -:100D8000E034239154E1209E001F2190F078B17847 -:100D9000020221980A4382427ED80F9270783178FD -:100DA00000020843DD2878D012DC2D2876D008DC3C -:100DB000002832D001283AD0032801D1307960765A -:100DC0002EE1302873D0482801D07F28F8D123E1C4 -:100DD000FF234B33C11A98427ED00CDCFF38801EB3 -:100DE0007BD0092814D012282DD01E28E8D18249A2 -:100DF0003079487314E1032970D005296FD0142984 -:100E0000DED1269901204871F078B17802020A43B8 -:100E10002598311D9344B51601000000809000C054 -:100E200000040000B968186205F0EAEC02E1202035 -:100E3000202A00D810000206120E62742398311D79 -:100E400008E00E200E2A00D210000206120EAA722E -:100E50002798311D04F070EDECE031000C310822D0 -:100E60006846229104F068ED0199009800277940C6 -:100E700078400843AED00822311D02A804F05CED92 -:100E80000399029879400843A4D060480822311D94 -:100E9000903004F052ED5D4822990822983004F019 -:100EA0004CED5A4E80367369326903E0CDE05EE066 -:100EB000A1E006E0B069F169801A9941716230627F -:100EC000B8E01700F2700022052004A901AB07C3A7 -:100ED00005AA0092B01C0CAA0AA90BAB05F09CEC69 -:100EE000380AB770F0702699012003E07BE032E009 -:100EF0009AE01BE108712598310005F08EEB0E9900 -:100F00000B2080010818816B6B4640310A7E1B7CE8 -:100F100052085200DB091A430A76D107A27CFB2350 -:100F2000490F1A400A43A274806BFD224030017EB3 -:100F30006B4611401A7C5206D217521CD207920FF0 -:100F4000114301768807A17CC00FF722C000114031 -:100F50000143A1746EE0209800221EA905F060EC08 -:100F600018AB587E60762498197E817662E0301D39 -:100F700005F05AEC01282DD10E990B2080010F1895 -:100F8000F86B002805D10E98012105F052EC0028DD -:100F900020D0F86BDD2189004018092104F008EE0B -:100FA0007078317800020843FA6B1B21490152180E -:100FB0001075F078B27800021043FA6B511848753A -:100FC000F078B17802020A431349F86B4018311DDA -:100FD00004F0B2EC301D05F024EB03282AD1269949 -:100FE0000120087122E01A20B0700020F0702D203E -:100FF00030700020707006492D201C390877F07879 -:10100000B278000210434877F07807E0A06A02C087 -:10101000D86002C0961E01C076030000B1780202BB -:101020000A43FB48311D15E7482080E02598310030 -:1010300005F0F2EA0F9921980F9A401A2099891821 -:10104000091D2091042800D3A7E6207DC10601D404 -:10105000C00719D021206B46187302205873A07E58 -:101060008107607E890F04F060EF6B469873A07E65 -:101070008107607E890F04F05CEF6B46D87325987A -:10108000042203A905F0BCEB0E980B21890140183E -:10109000C06B002807D0DD21DE4A89004118801886 -:1010A000092204F04AEC382110A804F082EDE86B24 -:1010B000D9491091D949DA4E00271C901191376017 -:1010C000C068C00418D40D98627C2399801D05F077 -:1010D0002CE8002812D105F004EA3200D36A926AA3 -:1010E000801A99417D223B00D20004F0EAEE3100E3 -:1010F0008039096A814201D301203060E86B05F034 -:101100009CEBE86BFDF78AFA607E18AB1872A07E44 -:101110008107890F0007800F59729872DF72E86BA0 -:10112000C068C004BF4806D5006905E07F20307064 -:10113000000A70707AE740697D23DB0058431890FD -:1011400005F05EE800280BD1A07E18AB8006840F66 -:101150009A7A597A187A2300FDF762FE002804D0A3 -:1011600018AB187B4008400003E018AB187B012146 -:10117000084318AB1873B7607760AB4918984018EC -:101180001790187B10210843187310A8169705F0C4 -:1011900074E8A4490028886000D001202BB0F0BD7D -:1011A000F7B506009F4D2878002801D00020FEBD2D -:1011B0009B4C00204034E66301216871984F2970F0 -:1011C000F86068702873E870200098495222403017 -:1011D00004F0B2EB02990198FFF774FD002810D1DA -:1011E0002100924800265222403104F0A6EBE06B29 -:1011F000FEF7B3F820000C3805F0F2E90020287063 -:1012000019E03868002810D08549E06B4B310F0099 -:1012100005F022E8002808D1012068713000FF3075 -:1012200006223900B6F9C74B010000007C9400C0CB -:10123000000400000B7612AB723004F088EBE06B18 -:101240000321FF306130012601743000FEBD794A70 -:1012500010B5203AD1830323603A0528137302D1D5 -:10126000FFF710F910BD07280BD10D2909D1517BCB -:10127000052906D1917B002903D10120FFF7CEF883 -:1012800010BDFFF762FA10BD6B4B062210B51A7342 -:101290001A006032D183FFF758FA10BD70B5040010 -:1012A00064482038007F00281AD1606905F0D2EA2E -:1012B000604DE868002802D06069FFF7A6F90020B9 -:1012C000E8606069002100F0EDF85A484030C06BDA -:1012D000FF306130007C002802D1122004F0BAEF08 -:1012E000606904F0D0EC002070BD5648008870475B -:1012F0005049F8B520390400087F0E005436002804 -:1013000001D002280AD13000694605F09CE90500A9 -:1013100002000099200004F01AEB1EE04A482071F8 -:10132000020A62710B7F0625DB1EC21E04F0A6EFC7 -:10133000080D0D0A1A051008100A0220C04301E02A -:101340000120C0432080C88B04E00120228001E0FE -:1013500002202280A070000AE070300005F04AE907 -:101360002800F8BD0420C043ECE770B50400002954 -:1013700034D0200005F0FAE9210005000622A23150 -:1013800004F0E4EA210020227E31A81D04F0DEEA08 -:101390009E20015D280020308171C279FB210A4026 -:1013A0000B21890161188B6B40331B7EDB075B0FC0 -:1013B0001A43C271896BF7234031097E1A408907AD -:1013C000C90FC9000A43C271E168C904C90F01729B -:1013D000E068012149048843E06070BD200000F00E -:1013E00017F870BD10B5040010D0134840790028DC -:1013F0000CD010484030C06B05F0B8E9062221003F -:1014000004F09CEE002801D1012010BD002010BD89 -:10141000002810B504D005F0AAE9292104F08AEAD1 -:1014200010BD0000DA6002C07D0300002D8C00C0FA -:10143000718D00C0206B02C0A06A02C0102700009E -:101440003A5C0004961E01C0FFFF00001A4870B508 -:1014500000250400C0340570E06BFDF71FF800287C -:101460000AD00189154A09180A70120A4A702A0A14 -:101470008D71CA71FDF77EF80F486030007F00283B -:101480000FD10D480C4980304268E06B28310023B1 -:1014900005F0E4E9E06B3F21095C4907C90F05F05D -:1014A0007EE870BD002810B5BAD005480A00006873 -:1014B000482104F05CECB3E7A06A02C0128000008F -:1014C00080EF00C0F8B5FF4D286904F0F4EA286900 -:1014D0000526017AF601032910D1417A01290DD19F -:1014E000032109024118097A032907D104F0CEEF3C -:1014F000002803D068688019406906E069688A1985 -:10150000107C537C984204D35069062104F0B2EE5B -:10151000F8BD00222A726A72EA72C300AA72181A0F -:101520002A73C01D6A730C18AA7320780090A078E3 -:101530006178C2070098D20F05F094E9070005F022 -:1015400096E905F098E9002FD4D0A07961790002DE -:1015500008437D21C900414368688019406905F04E -:101560008EE90328C6D1A078C00702D00120A87256 -:10157000F8BD00F038F80006000EA872F8D1687ABD -:101580000028B7D0F8BD70B500F0C9FCCD4D697A20 -:10159000002923D0287A884220D2401C2872A87AB9 -:1015A00000280ED108E000F01EF80006000EA87218 -:1015B00007D1687AA04204D06C7A287A201A0328CE -:1015C000F1DB00F0BCFC002808D069680520C001F0 -:1015D0000818017C491C0174FFF774FF00F0A8FC97 -:1015E00070BDB9487047F0B5002085B0B54D039087 -:1015F0006A6869218E5C0521AB7BC9015118B34231 -:1016000007D26C7B0F89BC4203D15B1CAB730023F8 -:101610006B735323DB00D71809E063011B196A338E -:10162000D35C002B14D0FE2B12D0641CAC73AC7BAB -:10163000B442F2D39DE1E40C01000000789800C0B0 -:10164000000400002B95BA21A34A6B7B0C89127B06 -:10165000A34222D1887A00283AD0002A38D101202A -:10166000287335E0AC7B896963011B196B33D4188F -:10167000002903D0380003A904F0EEEF984A1321A3 -:101680006B4607C322002869039B19E0687B401C56 -:101690006873687A401C687217E08B7A002B17D049 -:1016A000002A15D18969002903D0380003A904F064 -:1016B000D4EF8B4A13216B4607C300222869039B92 -:1016C000002105F0EAE80028E0D0002005B0F0BDD8 -:1016D0000120FBE7FEB5150000245069002A46D022 -:1016E0002989BB2649198A7800231209B600022AE3 -:1016F0001FD0052A12D0082A10D00D2A36D18219FF -:10170000280002A9029304F0DCED00282FD0029AF1 -:101710000899280004F0DCED012428E06E4A5368A3 -:101720000522D2019A18127C0092089A05F0B8E8B6 -:10173000F2E700270320029304F022E9040002D11B -:10174000607A002812D0200004F0BEE9002800D002 -:101750006F463B00A219280002A904F0B2ED002850 -:1017600004D0029A0899280004F0B2ED0024200069 -:10177000FEBD7CB50520C001574E150014180B00A6 -:1017800004F086ED0C500707131E504150500E50C8 -:101790004150A06A75602900306105F086E841E09B -:1017A00000F0C7FB00F0ECFB07E000F0C2FBA06A12 -:1017B0007560306100F0DCFB1CE000F0C3FB31E041 -:1017C00000F0B7FB0120F07205F05AE80500694609 -:1017D00001A805F06EE828020099401B04F0DCE83F -:1017E000616AE031887600F0B4FB002805D0207CE7 -:1017F000401C2074FFF770FEDFE7707A3072102013 -:1018000004F002EDD9E7002060615320C0002818E1 -:1018100004F0FAEE646A2000F63004F0FAE9010000 -:101820002000884703207CBD7CB50C000028009078 -:1018300017D12C4D002C03D00120286000207CBD46 -:10184000FF229132582301A9684604F092E900284A -:1018500003D10220286001207CBD03200022130058 -:1018600028601D4900980D69456105892818019077 -:10187000C57A867A2D023543ED1885722D0AC57218 -:101880001030047082711A0A03714271086900995C -:1018900005F012E87CBDF1B50F4D2869FCF708FE94 -:1018A000060034D03089152184196868490141182F -:1018B000097B01291CD10521C9014018456A28006E -:1018C000083004F0A6E90700281D04F0A2E93B0057 -:1018D0002A7C002108E00000F46B02C0CB9700C016 -:1018E000279800C0981E01C0FFF79EFFFF4800E048 -:1018F000FF482070000A210060700098093104F050 -:10190000BCE90020A071E0713000FCF73DFEF8BD9D -:1019100010B5040004F07CE900280ED004F0B4E90E -:101920002100002004F0A8E9211D002004F0A4E912 -:1019300021000C31002004F0A0E910BDF7B582B001 -:1019400004000E000325002962D0301D04F060E978 -:1019500000285DD030000830070004F05AE9002864 -:1019600056D0317C002953D02070000A6070307C42 -:10197000A070380004F04CE90500301D04F048E97F -:1019800001002A00E01C03F0ECEF380004F040E90D -:10199000C11CFF20671814303870000A7870A078D6 -:1019A000091DC000020AB8704018FA7000250190A5 -:1019B0000AE01320684308228119E800C019163193 -:1019C000001D03F0CEEF6D1CA078A842F1DC019859 -:1019D0002718FF202B303870000A7870A07840005C -:1019E000010AB870F9700199091D451800210BE032 -:1019F00013224A43480092191300C019D27F1F33A3 -:101A000002715A78491C4271A0788842F0DC03E0E8 -:101A1000002020706070A0700498002802D0300070 -:101A2000FFF776FF280051E6FFB587B01C001600CF -:101A30000F002B210901180004F0CEE800210A0054 -:101A400002A806C04288699701000000749C00C08B -:101A500000040000ACC3B4730800AB490860532015 -:101A6000C0002018050004F0EAED0521C90101209D -:101A7000611808810798012806D1361F3604360CF4 -:101A80003F1D0320207008E007223900200003F0EA -:101A900072EFF61F3604360CFF1D15214901079819 -:101AA0006118087373E0F878B97802020A43101DD0 -:101AB0000004000C0690787839780002FF23084370 -:101AC000DB1CC11A984246D019DC7F2850D006DCB6 -:101AD00000281BD0012836D02D2852D148E0DD281F -:101AE00046D0FF38801E4CD10590E11D380005AA74 -:101AF00004F0B4EE002004A9FDF7A6F941E0212985 -:101B00001BD011DC082938D010293AD110226921C4 -:101B10000092095D4B0159180A1923006A32693392 -:101B2000390004F0D8EE2CE048291BD04D2928D1EB -:101B30007F213970090A79701AE00622391D601C6C -:101B400003F018EF1DE071483900221801200E2320 -:101B500004F0C4EE15E05120C0002118380004F054 -:101B6000C2EE0EE01A21B9700021F9702D21E0E7D4 -:101B70003900280004F06EED03E0391D280004F060 -:101B80005EEE0698301A06040698360C3F18002EB2 -:101B900089D10622601C02A904F0E4EA002804D1DD -:101BA000FF220621601C04F0BAED01200BB0F0BD4D -:101BB000F7B500200D000521C9016C18607405E01F -:101BC000401C0006000E0E28607406D2607CC10026 -:101BD000091A4919097A0029F2D1607C00281FD01E -:101BE0006920465D2A006A320020012707E0410192 -:101BF0000918515C002901D0FE2904D1401CB042D3 -:101C0000F5DB002E00D1A77240480E21281804F001 -:101C10002AEC0098A0620299280000F0DAF96061CD -:101C2000FEBD70B5060003F0B6EE0500002415E019 -:101C3000687A02280DD1280003F040EF002808D070 -:101C4000280003F0ACEEFF30E130008AA04200D360 -:101C500004003100280003F036EF0500002DE7D125 -:101C6000200070BDF8B57D210500090128480E004F -:101C7000002204F008E82F0004000C37002808D1E7 -:101C8000002224481100032304F030EE040014D095 -:101C9000214E10202073202020812900200003F0F5 -:101CA000F6EF2089291D001903F0F0EF300039000C -:101CB000903803F0ECEF2000F8BD291D002003F060 -:101CC000E6EF3900002003F0E2EF0020F8BD0189C3 -:101CD000081817307047F3B57D21090107000C483B -:101CE0000E00002281B003F0CEEF040017D10022D5 -:101CF00008481100032304F0FAED04003ED00DE083 -:101D00000781000006800000981E01C07A020000D2 -:101D1000F80000042C00000444070000D64E022006 -:101D2000207320202518208120003030082103F066 -:101D300016EE0120287200206872582028730020B7 -:101D400068730720A8720020E8720520C0013F18C0 -:101D5000796A0020083103F09AEF796A002008744C -:101D6000786AE421123003F0FAED2000FFF7AFFFAC -:101D7000401B0299301A2438086002E002980021C2 -:101D800001602000FEBDF7B582B00C00FF21BB480A -:101D900016008C3103F02AEF0520C001B74D201842 -:101DA0004562152040012018007B01280FD120003A -:101DB00001A9FFF790FF291D03F068EF0700290034 -:101DC00001980C3103F062EF38002AD007E0AB48ED -:101DD00003F028EF002802D1A848FFF743FFA749E6 -:101DE0000C206874F631300003F050EF0220FFF74A -:101DF00018FF05000320FFF714FFA84201D22800B6 -:101E000002E00320FFF70DFF96214000962800D83E -:101E100001008A0202982100FFF7CAFE002800D0C4 -:101E200001205DE470B50500080011001A00944C13 -:101E30000523DB01E3185B690026002B2BD123006F -:101E4000FFF7FCFD002826D08E48406A6030417BB9 -:101E500000291AD033C0BD0A0100000070A000C0E4 -:101E600000040000A276191A007B002817D0287AF7 -:101E7000002801D0012812D1E868C0040FD4002046 -:101E8000C100091A09190A7A002A08D0497A890674 -:101E900002D504F03AED02E0401C0E28F0DB7F4A48 -:101EA00021002800FFF779FF0600300070BD017A9D -:101EB00003290ED1416980694830814209D17549B1 -:101EC00014390A7A487A824200D208720120887254 -:101ED000C872704701006F4810B514380069F8F7F0 -:101EE000BBFC10BDF7B584B000200F006CA10968E1 -:101EF00003916CA106C90191664C6C490292651868 -:101F0000891D66187169002925D12B21090120003E -:101F100003F076EE022030810320207038788007AD -:101F200005D10422280003A903F02EED2D1D08225F -:101F3000280001A903F028ED07223900E01D03F075 -:101F400024EDFF220621601C04F0F2EB069A0498AF -:101F50002100FFF722FF07B0F0BD4E4800211438E2 -:101F600010B50068C94303F0E4EE10BD494810B550 -:101F70001438006803F0A0EE10BD46490020143963 -:101F80008A7A002A07D04A7A0B7A9A4203D1C97A10 -:101F9000002900D001207047FF202D3010B504F03B -:101FA00010EA04F0B6EC10BD70B50125394C0526D9 -:101FB000143C607A2072A5726068F601801940694D -:101FC000002802D004F0A8ECE572FFF7D6FF002845 -:101FD00008D060688019017C491C0174FFF7DCFFA0 -:101FE000FFF78EFA70BDF0B505000F00294891B0DB -:101FF00014380469382102A803F002EE0520C0015C -:102000002E18B06A0E902A4802902A48089703902A -:102010002948049508AB0990187D082108431875D4 -:102020001520400128180B90207A002822D1E06862 -:10203000C0041FD501A96846FCF710FF0127002442 -:102040000EE0E000001B4019017A019A914211D183 -:10205000C01D0122694604F090E800280AD1641CE2 -:10206000707CA042EDDC002F04D008AB187D400846 -:10207000400003E008AB187D0121084308AB187548 -:1020800002A804F022E911B0F0BD000044070000EE -:10209000B86E02C0086C02C0E4580004C79A00C0C1 -:1020A00002040B160C1218243048606C7A020000EF -:1020B000A39900C0059900C0A0860100F8B58C4620 -:1020C000864600200400010076E0604645780678E8 -:1020D0001F682D0235437E007F1CB6181F603580B7 -:1020E000457806782D0235432E00FF3E333E17D04B -:1020F000092E28D00F2E0DD05F2E51D1C6788778AB -:1021000036023E434CD11F687E00B6187F1C1F600C -:10211000358045E0C57886782D023543099EF7E77E -:10212000C678877836023E43EDD0069D01262D689D -:10213000A640B543069E35600679A6403543069E07 -:10214000641C35602CE0C678877836023E4302D0A6 -:102150000679042E14D31F687E007F1CB6181F60FA -:102160003580457806781F682D0235437E00B61805 -:102170007F1C1F603580457806782D023543C2E705 -:10218000079D03272E684D00AF400095079DBE4375 -:102190002E60009D0779AF40079D3743491C2F6093 -:1021A000C678857836022E437546AD1B2D1FAE4688 -:1021B00065462D1D7519AC467546042D85D2F8BDB2 -:1021C000F7B582B00126002900D00026049D012E1B -:1021D00002D0080004F094E8040030D0FF209830CA -:1021E0006B4698800820D880E068C0041AD520008B -:1021F00003F0EAEB07000C370422280001A903F0E2 -:10220000C4EBB86F6B46009018782D1D2870587875 -:1022100021006870AD1CFF3106227231280003F0E6 -:10222000B4EBAD1DE27AA17A200003F0D6EB0400F6 -:1022300001D0012ED8D00498281A0004000C05B053 -:10224000F0BDF8B50C0016001F0003F0B2EB210042 -:10225000FF393A3904D104000100E722920003E07B -:10226000041D0100F987AE97010000006CA400C0B6 -:102270000004000088F8B0831D2252018D18002E42 -:1022800000D02760FF30E130008A7D21C00103F0DB -:10229000A2EB226864235A4301008018401E03F019 -:1022A0009AEB2860F8BDF0B5A3B0070000200C0041 -:1022B0001790FF4920220EA804F03CEB10200D904F -:1022C000380003F08CEB0890380003F07CEB8F2192 -:1022D00005008900079040180C90E078A278010270 -:1022E0002800FF30CF3022900A340B900AA81894AF -:1022F00009903800203021901143BB200A3980001A -:10230000381820909BE2189E0020091F19911A90FE -:10231000F078B178000208431999341D88421F9063 -:1023200073D80799192040010818007A00288646BA -:1023300015D0002084460EAB08E07178327809028F -:10234000114342009A5A914209D0401C0D9988428B -:10235000F3DB6046002802D10120179065E2707817 -:10236000327801021143FF224232881A914271D021 -:1023700039DCD04A881A91426DD02BDCCE4A881ABB -:10238000914269D019DC3D2967D0FF39891E72D18D -:102390001F98072103F01EEB0100280080301E90DB -:1023A0000171F178B0780A0202432800FF30210061 -:1023B0006D3003F0F4EA002090E003287ED004287A -:1023C000E5D12078002103F0D6ED2178380004F023 -:1023D000B6EA20E2012872D0022871D0032870D01A -:1023E0000728D4D1EFE13A28FCD01BDC1D2869D0A6 -:1023F0000CDC052867D01C28C9D10B982178203027 -:1024000081732178C173380028E01BE228287DD031 -:102410002F28BCD14320C00004222100281803F03B -:10242000BEEAF8E15228C9D0552870D056286FD09E -:102430005728ACD1872120788900002848550C986E -:1024400067D0FF306130017AFB2211408908890092 -:10245000491CB6E195E174E06CE131E101002278BC -:10246000A0310A7322784A73C27A817A03F0BEEAF5 -:102470000028F3D1CFE1BEE11698F322C300181A69 -:1024800040191D90FF3061301C90017B1140017399 -:10249000817B0322114381731E9801797D20000105 -:1024A00003F098EA6E2800D96E201C99C873000AC0 -:1024B00008741E9801797D20000105E0B3E014E066 -:1024C00060E027E079E067E003F084EA1D99FF31DE -:1024D00071314870000A88701698401C16901E983A -:1024E000169900798842C7DC95E10B982A301A903A -:1024F000380001002278A0310A7262784A72C27AEA -:10250000817A03F074EA0028F3D184E15AE08CE088 -:10251000E7E04FE12078002802D004F014EA00E060 -:10252000FE2021990876A877380003E021990A7ED9 -:1025300038210A54C27A817A03F058EA0028F5D18A -:1025400069E12078002811D1212000012818817B21 -:10255000427B09021143FF22C13291436278520744 -:10256000D20D11434173090A817354E1E81DFF3014 -:10257000FA30417FC722114062785207920E114310 -:10258000417748E1E81DFF30FA30417FFB221140DE -:102590002278D207520FF2E70B982C301A903800AD -:1025A00001002278A0318A726278CA72C27A817A76 -:1025B00003F01CEA0028F3D12DE12100280004F0EB -:1025C000C6E9D9E0F178B07809060A14024321007F -:1025D000380004F0C0E9002872D1387A032894D179 -:1025E000E078A17800020843344988428DD1002068 -:1025F00004F0B4E90521380003F0B8EA08213800F6 -:1026000003F0B4EA38008030806B8021C2780A433E -:10261000C2703800C0300068C2780A43C27001201E -:1026200004F09CE9F7E00220A9E0112040012818FD -:102630001B9040880006000E069003F08CE9059080 -:102640002088002804D0012806D002280ED10AE0F4 -:102650001B980021418009E016480622F030210035 -:10266000281803F09CE91B9901204880069801284E -:1026700035D11B98D57839EF0100000068A800C05B -:1026800000040000A81B18094088002831D11B98BD -:10269000C088C0072DD00497049803F0AAE90C3035 -:1026A000816F01291DD10499C968C90419D5002178 -:1026B00060308182049803F0DCEA002811D004988D -:1026C000FF3008E0FCEE00C0320100002B010000EA -:1026D000FFFF000097E06130018B04980022F6F7BD -:1026E000DDFF0498C27A817A03F08AE90028049019 -:1026F000D2D1059825E0A01C03F016EE0028069024 -:102700009AD0069803F074E9002895D00C30059013 -:1027100003F02AE9049021780598002981670FD1F8 -:10272000059860308182069803F0A2EA002807D05D -:1027300006980022FF306130018B0698F6F7AEFF55 -:10274000049803F026E970E020980622210003F0A7 -:1027500030E90B9806222100243003F02AE900F02A -:10276000B3FE002805D1FB4806220068210003F0D3 -:1027700020E9387A0123022800D1002317204001E4 -:102780003818827C2099022003F0DAEA00284CD025 -:1027900039E0179049E02900E83106916078217806 -:1027A000000208430699C88004F0E6E8069908810B -:1027B000F078B17800020843022836D90699A27849 -:1027C0008A72E078C87230E0FF306130017A04220A -:1027D000114389088900017227E00422210005A81D -:1027E00003F0E6E803F0C0E8069070783278010262 -:1027F0001143059B01223800FFF737FD380004F034 -:10280000C0E806989DE70120C3E717A9049109993C -:102810001AAA70466B460597039407C32900089BC4 -:10282000229A0833300004F0B0E81A98002806D045 -:10283000F178B3780A021A43210003F0BAE8F0787D -:10284000B178000208431999189A091A121D8018C4 -:102850001890042900D360E5280004F09AE810AB32 -:10286000988B23B0F0BDF3B50020CBB05422499033 -:10287000B94934A804F068E80020309014212BA84E -:1028800003F0D2E900210A0029A806C001201E9009 -:1028900018A806C016A806C04B9803F0AAE8159021 -:1028A0004B9803F09AE8042113918F2104008900CA -:1028B000401827902A20339002203290E420319053 -:1028C000002018AB1A90187A202108438106C90FFE -:1028D000F722C9001040084318724C984C9DC178EB -:1028E00080780B0203430A3B0A35002B10D00020EE -:1028F00033901E9013AA18A931A801AE07C632AAB8 -:1029000018000092290034AA33ABFFF7EBFB499083 -:102910004C990A20887000200600C87048E17700B2 -:1029200034A838182B90022028AB12A918712C91CA -:10293000587100212BAB82002BAB995029AA11545E -:10294000401C0528F7D30020129034A8C75BFF2154 -:102950007131781A8F427ED03CDC8049781A8F42E0 -:102960007AD015DC3D2F78D03800FF3830387FD052 -:10297000122846D110AB9889EE211290095B19827A -:10298000F221095B598214A92D9128AB98716DE051 -:10299000092878D0142834D11E982A00012802D1A1 -:1029A00000209070D0704B98290003F0F6EF2D189E -:1029B00012904B98290003F0F4EF10AB19892D18F1 -:1029C0000818001F1290002028AB2C902B905871F3 -:1029D00018714BE028287AD00FDC23287AD02628DB -:1029E0005ED027280DD1062216A918A803F0D8EB2F -:1029F00000285CD12A0000215BE0382869D03A2801 -:102A0000D7D027981AAA30301FA90EAB07C323AA24 -:102A10001BA91CA80BAB07C31DAA499828A9C378FA -:102A200080781B02184308AB07C331AA279832A944 -:102A3000E030007B05AB07C321002798FF31007F02 -:102A400003958006C20F0492159A12A80832CF315E -:102A50002300029003E047E05CE054E008E00192CC -:102A60000091380029AA2BA903F09EEF002777E0F8 -:102A70000120129003F09CEF1D901DA810AB2D902B -:102A8000188982E7132CFA490100000064AC00C0E9 -:102A9000000400002F4D165BFFE7182220000CA950 -:102AA00003F094EF28AB0028987101D00CA92D9168 -:102AB0001290E5E7062028AB129098712C48CD3093 -:102AC00029E02A0018A94B98FFF798FB0006000E92 -:102AD000D6D0002128AB2C912B911871001F597171 -:102AE000E6E712E000E02FE0022028AB1290987198 -:102AF0004B9803F00CE81C901CA833E0042028AB92 -:102B0000129098714320C00005E0012028AB12907C -:102B1000987187208000201824E0162028AB12909E -:102B20009871200066301DE0042012902020005D86 -:102B30001C901CA82D90022028AB082198711B9195 -:102B40001BA92E91D8719BE74B9802F0F0EF010082 -:102B50004B98007A032893D1202028AB12909871CB -:102B6000C86B20302D908BE7E8F500C01CEF00C04B -:102B700055010000B8002BA94A900858002809D038 -:102B8000010029AAD25D280002F01CEF4A9900201A -:102B90002BAA505029A9C85D002802D04519002051 -:102BA000C8557F1C052FE5D34C9810ABC1788278AF -:102BB000080219891043091D40184C998870000AB1 -:102BC000761CC8703398864200D2B2E630984DB079 -:102BD000F0BD10B514005204520CE40B03D10B00ED -:102BE0002C2103F02CEB10BDF8B5040008000830D0 -:102BF0000D000026009003F0A2EB002807D0817A98 -:102C0000A27A914203D1C17AE27A914201D00120A5 -:102C1000F8BD03F040ED070020D038892321C41906 -:102C20002000217000990622093002F0CCEEE878ED -:102C3000A978000208430E2801D1022003E0E87BB6 -:102C4000A97B00020843E073000A2074380003F0F7 -:102C50003AED012803D1380003F048E8012630009E -:102C6000F8BD70B50D00012603F014ED04000BD083 -:102C7000208900190570200003F024ED06000128CA -:102C800002D1200003F032E8300070BD10B50124FD -:102C90002121FFF7E6FF002800D10024200010BD0D -:102CA00070B50500012402F0A2EE19214901401877 -:102CB000007A002801D1022070BD1F212800FFF7F3 -:102CC000D0FF002800D10024200070BDF8B5050019 -:102CD00000263400771E202904D0222904D02B2975 -:102CE00004D037E08D4C01E08C4CE41E280002F04B -:102CF00066EF002801D103F06EEE03F020E8002813 -:102D00000AD0280003F08AEC002805D084490988FD -:102D1000002901D002F0CEEF280003F0B0EA002C29 -:102D200019D02800FBF7F6FB050014D02889210AEA -:102D300040190470417000218171C17108218170B6 -:102D40000021C1702800FBF751FC012803D12800A5 -:102D500002F0CCEF3E003000F8BDF7B504000D00E6 -:102D6000002702F044EE002D02D0297B00291AD161 -:102D7000FF21072271310A551922520101218018C1 -:102D80000026017203F0A6EC6548008800280DD0EB -:102D900002F098EE012802D1200003F058E920004B -:102DA00002F088EF02E00027FF4301260298012885 -:102DB0001CD12000FBF7AEFB040017D02089574937 -:102DC0000019491E0170090A4170310A8671C171EA -:102DD000082181700021C170297B01722000FBF75E -:102DE00005FC012802D1200002F080EF3800FEBD72 -:102DF000FEB5060000200190300002F0F8ED8F21B2 -:102E000089004418474905004718300002F0FAEDE0 -:102E10000090FF207130805D002801D00220FEBDAF -:102E2000307A032804D1707A022801D00420FEBD34 -:102E300000221100300000F0F9FE20356878C0074C -:102E4000207F02D0EF21084001E0102108432077C5 -:102E5000B878F8703000F6F7E4FE01280BD13000A6 -:102E6000F7F7CAFB002804D10098007A80090128EE -:102E700001D1052001901D213000FFF7F2FE01284D -:102E800001D00198FEBD03200190FEBDFEB50500F6 -:102E900001200E00F70FD2810100000060B000C0D9 -:102EA00000040000E9DC491D002D01903DD0002008 -:102EB000019030727072F078B17800020843801C83 -:102EC000B0703700000A083734000A34F070280068 -:102ED00002F0A2ED0C300090E868C0041ED57878AE -:102EE000397800020843401C3870000A2A00FF327B -:102EF00078707232211D200003F07AED0098007D79 -:102F0000A072280003F080E8E072F078B178000247 -:102F100008430C30B070000A0C34F070EA7AA97AD9 -:102F2000280002F082ED0500D1D10198FEBD00001D -:102F3000B2800000C43B01C01D02000070B5040057 -:102F40000D0002F05EED200002F066ED0121603020 -:102F500001702100FF31042272312000FFF743FE8F -:102F6000002D03D124212000FFF785FE70BD10B590 -:102F70000C00080002F044ED0522D2010021801867 -:102F8000C1602000FFF7DAFF10BDF7B582B017006F -:102F90000298002602F040ED050002980399FF30E8 -:102FA0000C350622723003F010E900280DD12800FC -:102FB0004030017D0126012902D1002005B0F0BD7D -:102FC000C48A032C05D0022C03D0380003F014ED82 -:102FD000040000220092029A039902983B00A23258 -:102FE00002F03EED070003980078C0070FD1002FD4 -:102FF00003D00120C003044307E0012E05D10121C5 -:1030000054204155029803F0FCEC4035EC82380026 -:10301000D4E7F7B582B005000024FF301700E44381 -:103020007230039926000622019003F0CEE80028B2 -:103030000BD1280002F0F0EC0321603041800199AF -:103040003A002800FFF7A1FF06002800FBF76CFA02 -:1030500005001ED028894419FF482070000A002E60 -:10306000607001D1002000E00120A071000AE07131 -:103070001020A0700020E070200003990622083084 -:1030800002F0AAEC380AA773E0732800FBF7B8FA3D -:1030900000E02600300091E7F8B505000F0002F0CF -:1030A000BCECFE6D0400ED49ED48B61DF7F73CFFA2 -:1030B0003078C0070DD06037787A332801D12024CA -:1030C0001EE0342801D122241AE036281ED12B24F8 -:1030D00016E06034628831002800FFF784FD280084 -:1030E000FF3006223100723003F06EE800280DD167 -:1030F000207801280AD1242402E0012002F0B8EC53 -:1031000021002800FFF7B7FD0128F6D00020F8BD08 -:1031100010B5040002F080EC60300078012803D183 -:1031200024212000FFF7A7FD10BDF3B583B00600F2 -:1031300002F072EC050002F02CEC0190C949C8487D -:10314000F7F7F2FE300001F0F6FA300002F058EC2A -:103150000321090244180290207C3700A037002880 -:103160000BD0B88A032808D102980521C90140185C -:10317000C06802F086EC002020740120B882300084 -:1031800002F0CAEC002825D0300002F0DAEC696EBB -:103190000400002905D0300003F036EC00206866FA -:1031A00004E0207F012801D3401E20770298217F70 -:1031B0002030007881420DD22000A0300100007C38 -:1031C000420707D5FB2210400874A068012149027C -:1031D0000843A060280080210C3002F03AED002066 -:1031E00060214855300003F0D4E8049800280DD140 -:1031F0000320000234182068002807D039889A4834 -:1032000002F006ECE860002020600BE03000FF30A8 -:103210000621723002F0D4EBF068400502D4300091 -:1032200003F0F6EB019802F0C8EBC7E670B50400B6 -:10323000008965690019203041780278080210433E -:1032400003F0DAEB636929000200FF3172311800E4 -:10325000FFF7C9FC00212800FFF767FF002070BDC1 -:10326000FFB581B0FF2116005D310A9D280003F0F3 -:10327000D4EB040001D1401EA0E620892A000719E2 -:10328000BB20A232800029180092CF3220000B23ED -:1032900003F0C6EB049A0092029A019933003800B9 -:1032A00003F0C2EB67B92750010000005CB400C016 -:1032B000000400009C22B2A5200003F004EB87E686 -:1032C000F8B5050016002035EA78AF781202002420 -:1032D0003A438A4201D00E241FE0032A04D1C07869 -:1032E000400601D4012418E0180003F0ACEB0028DC -:1032F00004D068782978000208430ED068782978CD -:10330000FF2E05D10002084307D0012805D003E0B5 -:1033100000020843B04200D00D242000F8BD02890D -:10332000416910180A00C0321368A0314A8A898A9C -:10333000C6E7F8B50E00018947690D18380002F09C -:1033400076EB380002F066EB04000120A03705217F -:10335000C901B8826018C06802F09CEB0322120217 -:103360000021A018002E01740AD129202900000193 -:1033700080222831201802F032EF002800D00F26DA -:103380003000F8BDF8B50D00060002F050EB30003B -:1033900002F040EB0321090241180A7C002A02D006 -:1033A0000020C043F8BD0323B4229353A32292000C -:1033B0008418121D8018286001200874206802F00B -:1033C0006AEB002200922E4A2E482300310002F0C0 -:1033D0008EEC286803F03AEB0020F8BDF3B585B019 -:1033E0000024059803940294018945690E18280069 -:1033F00002F01CEB6030049000780527FF010328E1 -:1034000008D1280003F026EB002803D0E819006952 -:1034100000286FD1280001F098F9F07840061AD5FD -:10342000EF19F868002865D00100083162D0807C6F -:10343000C0075FD00698403002F030EC01880023CE -:1034400060310180FA680699083205A803F006EB9E -:10345000002800D10F242036707831780702F078E8 -:103460000F43B17806020E43002C0DE0B58000003A -:1034700022222222CCCCCCCC11111111B80B00008D -:1034800020A1070027B100C003D10598FFF747FF2F -:103490000400B420405B032809D105982100FFF700 -:1034A00048FF04000127032600280DD103E0002C6B -:1034B0000AD1002F03D104990220087004E02800EB -:1034C00003A9FFF75FFF02900298401C0AD0761C08 -:1034D0003104039B090C220038000095FFF7CAFE57 -:1034E000401C01D1002102E0002C03D00121280062 -:1034F000FFF72EFD07B0F0BD10B503F0B4EA03F0FE -:10350000B6EA10BDD64880687047D54988607047D4 -:1035100008B503F0B0EA0020694603F0B0EA03F012 -:10352000B2EAD0490098884201D0002008BD0120AD -:1035300008BD0300CA49002000B502F0F0EE0705FF -:1035400007090B0D060F0600C74800BD086800BD3F -:10355000C64800BDC64800BDC64800BD486800BD9D -:10356000704710B500F05BF903F090EA012003F01A -:1035700092EABB49C860002010BD00221100100073 -:10358000130010B502F016ED03F088EAB448C068E5 -:10359000C26BC16AB848006803F084EAB7480168A2 -:1035A000002903D1012101601FF0BDF903F07EEA7B -:1035B00003F080EA03F082EA02F088ED02F08AED7F -:1035C000B049AF484861AF484030426880231A4351 -:1035D0004260426843061A4342600A6900220A6157 -:1035E00082600168026002F0DEE9040003F06AEA2A -:1035F00003F06CEA03F06EEA200002F0E8E902F062 -:10360000AAEB042003F06AEA03F06CEA002010BD84 -:1036100010B5002486B003F06AEA03F06CEAFBF709 -:10362000E6FB002206212000FBF7E5FBFBF735FC5B -:1036300003F064EA03F066EA93480190934802902D -:10364000934803909348049001A803F060EA03F0C4 -:1036500062EA03F064EAF5F7D4FF03F064EA0020BD -:1036600002F02CEE03F062EA03F064EA03F066EA8B -:1036700003F068EA01F096FF03F068EA03F06AEAF3 -:10368000040000227648009240690822012105AB1F -:1036900003F064EA200006B010BDFEB500240188E6 -:1036A0007D4A914277D001221203914202D17B4997 -:1036B00008240CE0C8C5950A0100000058B800C0F5 -:1036C00000040000BCC11A2F01225203914202D112 -:1036D0007849042405E00122D202914202D17649C0 -:1036E000102401800188754AAC31118001880839A5 -:1036F000018005E0280002F074E9012002F0CCE925 -:1037000002F05AE905006E4802F05AED06006C48D6 -:10371000082103F032EA07006948102103F02CEA7F -:1037200038188642E6D1674E00223068412102F007 -:1037300078EB6549624803F024EA6048270601886F -:1037400062483F0E8180877161486049026800923B -:10375000604A5B48604B03F018EA102C05D001204A -:10376000032C00D960080406240E22000421002046 -:1037700003F00EEA3A000021012003F00AEA3A00C1 -:103780000021022003F004EA22000421032003F0B8 -:1037900000EA03F002EA280002F022E90420019086 -:1037A0003068422101AA02F03CEBFEBDF8B50025CD -:1037B0004A4F3E684A48064003F0F2E900903868F4 -:1037C0000121090788433860386846490843386052 -:1037D00003F0EAE903F0ECE900242D49A0001031E0 -:1037E00008588047002800D00125641C0A2CF4D317 -:1037F00003F0E2E903F0E4E93B48006803F0E4E9A0 -:103800003A48006803F0E0E93948006803F0DCE971 -:1038100038683349C943084030433860009803F0A2 -:10382000D8E903F0DAE92800F8BD324800090001C0 -:1038300070473148612110B502F0D6E82E4C0C20BB -:103840005034A0720020E0722B480122017811430D -:1038500001700179202211430171012002F0C0EEB4 -:10386000264800882072000A6072FF212000103074 -:10387000017010BD9C1E01C058303338000000C0DC -:10388000007101C0007901C0001802C0E4580004B2 -:10389000E0F700C0BFA8129E00A5008004F600C09B -:1038A00008F600C0F0F100C00CF600C0FFFF0000F9 -:1038B000880E0000101D000044070000CEF100C07B -:1038C0002C00000480EF00C05710000038000004F6 -:1038D00084F200C0504F0004008002C00028008025 -:1038E0000030003000300020347C020000F600C0C0 -:1038F000847C020068CF01C0365C00048020008018 -:1039000010B504000A2102F070E87F202070082022 -:103910006070A07801210843A07010BD4A21017099 -:103920000E214170142100228170C2700A2202719E -:1039300000224271FF222D328271120AC271C82206 -:103940000272002242720A0A8172C2720522027356 -:10395000002242738173090AC1737047F0B50500F4 -:1039600087B002F062E80400280002F06AE807006D -:10397000002C7ED0002F7CD02600FF361020E136B0 -:10398000B073300020221238FDA103F02AE9642030 -:1039900030820120F073FF483083401E708307207F -:1039A00030777077FC4E2000FF3031680622F3300C -:1039B00002F026E8BB2080003168281806220600A5 -:1039C00002F0EAEF287A0123022800D10023172011 -:1039D00040012818827C3100022002F0DAE9E01D63 -:1039E000FF30FA300690417F11234A085200062129 -:1039F0000A435B010121E3181970C177C7210A400E -:103A00004277212000012018817B427B090211436B -:103A1000FF22C13291434173090A81732000803033 -:103A20000B21059001716221EC3002F026E900269D -:103A3000F320CF212EE0F000801B00190490FF300E -:103A40006130711C03904173017BC3228908890096 -:103A500011400173817B0322114381730598017921 -:103A60007D20000101F0E8EF6E2800D96E20039957 -:103A700000E0E8E0C873000A0874059801797D2029 -:103A8000000101F0DAEF0499FF3171314870000A4A -:103A9000761C887005980079B042CCD820000E3092 -:103AA00002F066E80021FE202177A077E1772A7AEC -:103AB000082020221055A018029081700121417029 -:103AC000E120C000B7BAFF420100000054BC00C0B2 -:103AD000000400003B97147D2060297A032901D05F -:103AE000FF2091306060200003F088E84B20C00088 -:103AF000201803F088E8092080012018017EDF22C9 -:103B00001140069A527FD207D217521CD207920E4A -:103B100011430176E97A287AF5F79EFEE66F002ECA -:103B200011D008365421300002F0B0E80320B07103 -:103B3000F079042100090001F07148208155B07A24 -:103B400040084000B072200003F060E8029840781E -:103B5000C00906D005980068002802D0059801F039 -:103B6000B6EF012666640698FB2206771D20400109 -:103B700020180179114089088900491C0171200031 -:103B80004830019003F046E8E01DFF30FC30FFF7BD -:103B9000CFFE87482018FFF7BDFE20002830666260 -:103BA0000021009003F03AE8FF20693006510098A8 -:103BB000310003F038E820008021E83002F066E8A8 -:103BC00020000222E030C2810682418AB143914343 -:103BD0004182FF20002665300655100002F0BEE845 -:103BE000A84205D1280003F022E8290003F022E8CA -:103BF00006207872387AC321800880000840800649 -:103C0000800E387239681120400109184E803A68D8 -:103C10001421121891803A6803211018C180069867 -:103C20003B0086612100019A083364312000F5F7DA -:103C300053FEA17F38204155E868FF21491C884385 -:103C40004034E86066800698012146820B2080019E -:103C50002818806BFF302130818007B0F0BD70B52F -:103C6000050001F0ECEE04002800FFF781FE2000C3 -:103C700001F0D9FC200002F0E2EF70BDFEB50C00AF -:103C800005001100002C64D02000FF3006227230A5 -:103C900001F0C0EE2800C03021008268C0318A6087 -:103CA000027B0A73827B8A73427B4A73C27BCA732C -:103CB000FF227132535D1355220020321300527ED1 -:103CC000F72632403926765D3607F60FF600324386 -:103CD0000526F60194465A76AA190192D368A219CC -:103CE000D360E368964604229343EA682E005207A5 -:103CF000D20F920013431022E3609343EA688036A8 -:103D0000D206D20F120113432200E360F76B803218 -:103D1000D76347684F60B66B966300680860FF2002 -:103D2000401C8343E868C005C00F0002034362469D -:103D30001007E36003D50198016970460161200016 -:103D400001F088EE0600280001F084EE0089308141 -:103D500011E02C00280001F07EEE417A06000B20D5 -:103D600080012018826B1173826B317A5173806BE2 -:103D70008906890E4173200001F060EE0500E068BD -:103D8000C02188430E22E0600C36A91820004A307A -:103D900010E000004D617276656C6C204D696372B5 -:103DA0006F204150000000002B090000E8F500C022 -:103DB0002E02000001F02EEE2700287FA037788227 -:103DC0000120B882200020300090417E1020014365 -:103DD00000980622417638002749C0300181418190 -:103DE000002181810F218173002101832900FF318E -:103DF000F331BE3801F00EEE2900FF312000202201 -:103E0000CF317E3002F0F6EE2800FF30E1302100A5 -:103E1000827B80318A77028A3A80C27BCA77018BA3 -:103E20003981418B7981017F3973407F7873E068F4 -:103E30000121090388430721C901E0606818C069AE -:103E40003060002154208155B1676036B1820098FE -:103E5000A97F0176FEBD8C2101701221417098214D -:103E600081702421C170B02101714821417160210C -:103E700081716C21C1717047FFFF000070B5002493 -:103E8000022001F078EE032001F074EE032001F02F -:103E9000D2ED002826D0002001F060EF05000221BD -:103EA000032001F07CEE002805D10321080001F079 -:103EB00076EE002800D00124287A002802D1002CB8 -:103EC00012D00BE003280FD1002001F0B4ED002840 -:103ED00006D0FF30B51335C10100000050C000C04E -:103EE00000040000A1AA40FD6130007C042801D13B -:103EF000012070BD002C01D0002070BDFF4800687B -:103F000070BDF8B50D00160001F042EE2D1D361FF4 -:103F100004003604360C89E0A8786978000208436A -:103F2000C01C2B7807043F0C00209B1E02F014EAF3 -:103F300010150939581A4E5D537A2F720E7A49625C -:103F4000687A3A0029002000BA3003E03A00EC48D1 -:103F5000290053E001F068ED5EE03A0029002000FE -:103F6000AC30F7E720003A002900C33001F05CEDE7 -:103F700020003A002900CB3001F056ED20680121E5 -:103F80004904084304212060C820015544E0200072 -:103F90003A002900D73001F048ED0421DC2001551A -:103FA0003AE020003A002900D33001F03EED200035 -:103FB000C030827DE978D207D20F49000A4382756A -:103FC0002AE0CF483A002900543017E0CC483A00A4 -:103FD00029007D3012E0CA483A002900AC300DE0DB -:103FE000C7483A002900A73008E0C5483A00290030 -:103FF0008A3003E0C2483A00290091302018A9E72E -:1040000020003A002900CB3001F00EED0421D02031 -:10401000015501E0012805D02A780120216890404F -:1040200001432160ED19F01B0604360C002E00D070 -:1040300072E7F8BDF7B588B00D0001F0AAED0600F3 -:10404000AD1DB0490422280001F0EEEC2D1D042422 -:10405000002701203168B840014259D0BB1E02F050 -:104060007CE91012093F991B6B99999931991F9915 -:10407000587A8F9931000922BA31280001F0D4EC26 -:104080000935093484E031000522AC31280001F003 -:10409000CCEC6D1D641D7BE008223100C33172E061 -:1040A0003F20000130180790017BC07A0A020243CA -:1040B0009348D21C3118280001F0B6EC0798017B18 -:1040C000C27A5AE03000C0300690028B3100D21C18 -:1040D000D731280001F0A8EC06983AE0ED1C12E078 -:1040E0003000C0300590807D310040080190059877 -:1040F000D331828A2800D21C01F096EC0198ED1C85 -:1041000028700598808AE41C451900190404240CC1 -:1041100040E01120800130180490017CC07B0A022D -:1041200002437748D21C54303118280001F07CEC4F -:104130000498017CC27B20E02320400130180390CA -:10414000028B6F48D21C7D303118280001F06CECD6 -:104150000398008BC2E72520400130180290017AB5 -:10416000C0790A0202436648D21CAC3031182800DC -:1041700001F05AEC0298017AC27908021043ADE7C7 -:1041800008223100CB31280001F04EEC083508340C -:104190002404240C7F1C3F063F0E132F00D258E747 -:1041A0000A9804800BB0F0BDF8B504000F001500AC -:1041B00000265021100001F074ED66E0417802788D -:1041C000090211430A02090A0A434F4B1204120C56 -:1041D000D11A9A4231D019DC4C4BD11A9A4238D0BC -:1041E0000ADC4B49511830D0062928D007292ED097 -:1041F0000F293BD12C6339E00F292CD011292ED067 -:1042000012292AD0282931D1AC602FE00C2918D0EE -:1042100009DC012917D0062925D0072921D0092931 -:1042200024D16C6022E00E291FD00F2903D0192958 -:104230001CD1EC611AE02C6018E0EC6016E02C61F7 -:1042400014E06C6112E02C6210E06C620EE0AC6273 -:104250000CE0EC620AE06C6308E0AC6306E0EC633F -:1042600004E02C6402E0AC6400E0EC64C178827885 -:10427000080210430102000A01430804000C31182F -:10428000091D0E04360C2418241D2000BE4295D3AF -:10429000F8BDFFB587B00C000521090229204001B7 -:1042A0006118201805912100069025202700A031D3 -:1042B000160000254001C037201803900A98049189 -:1042C00062E100967078317803020B43FF21883158 -:1042D000581A8B4279D00ADCFF3B7D3B02F03CE868 -:1042E0000B818E9A05ECBF0B010000004CC400C08E -:1042F000000400008B24E964A8AFB5C1323232CC8F -:1043000032001B286CD03ADC09286AD025DC0BE08F -:1043100034F800C0FA030000601632003B100000C1 -:1043200012100000FEEFFFFF07286FD0082813D1FE -:10433000F079B179FA4A00020843904267D1717A64 -:10434000307A090201439142F8D10699002088721F -:104350000598C2620598026315E1192871D01A28E0 -:10436000FAD1049A0320907622000620B032D0724F -:10437000002010730622311D2000BD3066E01C288D -:1043800078D01D2814D01E282CD02028E4D123203A -:104390004001201807220190C275E2480622311D13 -:1043A000201801F04CEB019806210183802020E0C9 -:1043B000DC48F278B3788038120220181A43427031 -:1043C000120A82700D220270F278B37812021A4338 -:1043D000311DC01C01F032EB0120400309E07CE0FC -:1043E0000EE1CAE00399307908710398717941713F -:1043F00020200543C7E07079317900020843A0818D -:10440000F079B17900020843E081BCE07FE094E0FC -:10441000A068327941087079490000021043C00752 -:10442000C00F0143A160AEE020000622311DB43070 -:1044300001F004EB0499032048740498062141829A -:10444000A1E0B0E020000822311D143001F0F6EAAE -:1044500099E07079317900020843208293E00420CA -:10446000F874B87D3179C007C00F49000843B875AA -:104470001020BEE7D1E00499022008730498317936 -:10448000C1730498717901740420B2E70620F870B2 -:10449000307AB872F079787220000322311DC6306C -:1044A00001F0CCEA04203872F078B17800020843B9 -:1044B000B880079801F0D6EA079801F0E0EAB97AE7 -:1044C000417207980B2292018018806B0173079844 -:1044D000052101F09CEB40208BE71120F872307A27 -:1044E000B874F079787420000322311DCE3001F0C9 -:1044F000A6EA04203874F078B17800020843B88145 -:104500000798052101F082EB0120400471E70920A2 -:10451000C001082120180171717932790902114313 -:10452000C171090A0172F179B2790902114341722C -:10453000090A8172FF20401C5BE771793279080219 -:10454000069910438872F179B279080205991043EF -:104550000828C86206D0802806D0FF38401E07D140 -:10456000052002E0012000E00420059908630AE02C -:10457000717A327A08021043F7E7707931790002D4 -:104580000843069988820098361DC178827808020F -:104590000A9910438619081A001F0A90002800D0B3 -:1045A00099E6280008E65F4829212C38201801F0F8 -:1045B0003AEA112080010F2120188173F178B27836 -:1045C00009021143C173090A0174564806222938A9 -:1045D000311D201801F032EA5248202123382018DA -:1045E000029001F020EAF078B17802020A4331002B -:1045F0000298921F0A3101F022EA0120C003F8E676 -:10460000039A09209071474806222F30311D201847 -:1046100001F014EA01204002EBE603990020C87380 -:10462000039930798874039901200882E1E6F8B58E -:10463000002406000F0001F0B6EA0500F878B9780A -:104640000002084379783A780902114308380004D7 -:1046500009063A00000C090E0832EA2905D0EB29B8 -:104660001ED0EC2968D00120F8BD517813780902DA -:104670001943801E03041B0C01290AD1921C290036 -:104680003000FFF710FE002856D00121A86849022B -:1046900042E0002950D10A20B8700020F8704BE0A9 -:1046A000507811780002084301283FD1D0789178E2 -:1046B000000208430106090E012905D1300002F06D -:1046C000D6EA06E0012437E0002905D1300002F0E7 -:1046D000D2EA0128F6D02FE00C2908D1300002F0F0 -:1046E000CEEA0128EED010490020086024E002291B -:1046F00003D130003322BB230100000048C800C0B2 -:1047000000040000ABC741EE02F0C6EAEBE7032964 -:1047100003D1300002F0C4EAE5E7072916D00829E2 -:1047200014D0092912D1A868012189020843A86080 -:104730000CE00000FFFF00007A04000034F800C025 -:10474000002803D1707A9070000AD0702000F8BD64 -:1047500070B5040001F090E9092189014618202173 -:10476000095CF2698A4201D3002070BDC522920023 -:104770002021801802F098EA2500FF35000600216C -:104780006135000EFF2829830FD0401C2883E06884 -:10479000012109030843E060F069401C0128F06131 -:1047A00003D14421200001F0ACED288B70BDFEB593 -:1047B000040001F02AE90190E068C00403D40198E4 -:1047C00001F036E9FEBD200001F062E9050020009D -:1047D000F6F7A4FA0520C001261800278820776183 -:1047E0004751E0680121C9038843E060B06901F0E6 -:1047F00084E901212000B76102F05AEAE068012152 -:10480000090327008843FF376137E060398B0029AF -:104810000CD000222000F4F791FF2868C5213A8BC4 -:1048200089004018521E202102F046EA00203883F9 -:104830002868092189014018C1691327491EC161EF -:10484000280002216030017040787F0100280AD1E1 -:104850002868C0194178491E0906090E417002D125 -:10486000200002F02EEA200020300290807F800697 -:104870000AD42868C0198178491E0906090E81707A -:1048800002D1200002F020EA0298C07F40070AD43B -:104890002868C019C178491E0906090EC17002D1E5 -:1048A000200002F016EA286820304078010701D481 -:1048B000800606D53069002803D001F022E90020E7 -:1048C0003061286820304078C0090DD03069002858 -:1048D0000AD029200001201801F016E9E068102113 -:1048E0008843E0600020F060E0680221400840005A -:1048F0008843E0604D20C000201801F0BEEE20008B -:1049000001F00EEA280024303C2101F0DEE929689C -:10491000092080010818C069002803D14321200024 -:1049200001F0EEECE068800605D42868C0194179F2 -:10493000491E41714BE020006030C178890704D4E2 -:104940002968C919CA79521ECA71C178C90604D426 -:104950002968C9198A79521E8A71007940060BD5D7 -:104960002868C019017A491E0906090E017203D18F -:1049700001212000F5F77AFC26000025FF3672366B -:10498000310028006A46FF4B02F0A6E9012808D151 -:104990002900300002F0A4E900222900300002F0D2 -:1049A000A4E9F94A3100280002F0A2E9012809D15E -:1049B0002A003100200002F0A0E901222900300085 -:1049C00002F092E96D1C2D062D0E082DD8D3200083 -:1049D00001F066E9E06820218843E06020001C21A6 -:1049E000613001F02AE8200001F036EEE7E670B50C -:1049F00004004569008906192800FFF7D8FE290040 -:104A0000FF31052272312800FEF729F93200012119 -:104A10002800062301F0E8EE200001F086EF70BDCB -:104A2000FFB581B004001E000A9F01F032E80500C6 -:104A3000200001F022E824353C21280001F044E95F -:104A4000039A029933002800009702F05AE90120E6 -:104A50002035287605B0F0BDFFB589B02D200025A2 -:104A60000F00139EED433080099801F012E8089082 -:104A7000099801F002E804000998C030006802F0CB -:104A800014E8002802D1002F4AD108E0002F03D1FA -:104A90000C990B98084302D100200DB0F0BD0921FC -:104AA00089016018007EC00623D52120005D010722 -:104AB00001D481061FD52700E037B87A230007907C -:104AC0008033D86E0022089E069005920C990B98B0 -:104AD00004910390F9892200213202920191986E8B -:104AE00024360090069B079A0998310002F00CE9E1 -:104AF00007E0002514E0810706D50B980028F8D0C0 -:104B00000C9800284C64DD4B0100000044CC00C030 -:104B1000000400002C914FBCF5D00BE0C00909D077 -:104B200012993200200002F0FEE8002802D0002096 -:104B30003080E8E72800BAE7F3B504000020B5B0FC -:104B400005000990200000F0AEEF0690200000F074 -:104B50009EEF06008F20800037180698FF210C304A -:104B600007909131200001F09EEF2100FF3172315A -:104B700000283491279008D1349905222000FEF7AF -:104B800078F80020C04337B0F0BD27982200008994 -:104B90002799A232009240182890BB20800021184B -:104BA000349A2798012301F082EF289800212030C1 -:104BB00033908170C1702799AC200881369928986C -:104BC00025AA26AB02F0B2E807980B2140308901F4 -:104BD0003290007D6118032831914AD1200001F004 -:104BE00076EF002845D00520C001201830900069DC -:104BF00000283ED033991E2088700020C8703826C7 -:104C00006B4605271E7203205F7298727D2002ADED -:104C1000E91CC00001F0B2E828983B00AA1C310052 -:104C200002F088E8289A01212000062301F0E6ED31 -:104C3000279801F084EE30988069002817D153201E -:104C40000022C00023180092554A5648210001F066 -:104C50008AE831980021806B4030428B200002F0BE -:104C60006EE83198806B4030418B491C41830020B5 -:104C700089E72699259810AA00F020EF9E2126901A -:104C80000A5D00922300020028987E3310A902F0EA -:104C90005AE8002830D1369A23980EA96B4607C3EC -:104CA0002000129B1C9A2299FFF7E0FE401C02D1C3 -:104CB0006B46188F24E0FF201130C059002873D1B3 -:104CC0000FAA09A901920091320028980E3210A96A -:104CD0000AAB02F03CE800280ED1079B706C1C3335 -:104CE000002812D03A00303200923699289810AA43 -:104CF00002F030E8002808D02798FFF782FE42E74C -:104D000033998870000AC870F6E708AB1B7F002B48 -:104D100004D0289832210CAA02F00CE8706C01280B -:104D200009D11D98002806D03200289866323D210E -:104D3000162302F000E8300020302F902E904078AB -:104D4000C00907D02398239A43782898921C4421BD -:104D500001F0F0EF706C01281AD11D98002817D0CF -:104D600038002030017902290AD0807C800707D5DD -:104D7000F21DFF322898FE324A210E2301F0DAEFAD -:104D800023200001321828987F21082301F0D2EF58 -:104D9000706A012813D108E028810200C88002004F -:104DA00040420F004B1C010045E01398002806D03C -:104DB000320028982A32DD21182301F0BCEF2000B0 -:104DC000FF3061302D90008B002807D12000FFF7C5 -:104DD000C9FC2D980125008B00282CD03398C17870 -:104DE0008278080210433AD1200000F0DCEE00285F -:104DF00035D0200000F0EAEE0390249800280398B4 -:104E0000007F0AD02F990978884214D23699200061 -:104E100001F0A4EF079988650FE0401C0399000694 -:104E2000000E08772F990978884206D9012802D305 -:104E30000399401E08770C2062E703982F99007FA2 -:104E4000097888420BD303980422A030017C1143D7 -:104E500001740398D1018068084303998860289AF7 -:104E600001212000062301F0CAECE068022140087D -:104E700040008843E0602E994978CA0708D1890725 -:104E800009D5F16F0A00083205D0897CC90702D024 -:104E900003210843E060706A012829D11398002893 -:104EA00005D1706C012823D11D98002820D0012144 -:104EB000200001F0D4EC139800281DD00798139916 -:104EC0006030097AC1731399097A01741399097AC8 -:104ED0004174FF2069308059012805D11398007A68 -:104EE000000701D0012000E000203199886203E032 -:104EF0000021200001F0B2EC2D980321008B8903E2 -:104F0000084333990871000A4871329803210175EA -:104F1000079800219EC3811B0100000040D000C003 -:104F200000040000EA0010FA0175200001F0B8ED5D -:104F3000339900208870C8702000716C613001299D -:104F40002C907ED11D99401E00292B900ED1012D51 -:104F500004D0002D43D1E068800614D538002030FD -:104F6000417A491C41721D9800280AD0002D21D198 -:104F7000E068800607D438002030417A491E41722B -:104F800001E0002D13D12B98C078C0060FD4E06843 -:104F900080060CD51D98002804D010A801F0ECEE76 -:104FA000002804D038002030817A491E81721D9873 -:104FB000002814D010A801F0E0EE00280FD1012D38 -:104FC00008D0002D0BD12B98C078C00602D4E06821 -:104FD000800604D438002030817A491C81722B98D5 -:104FE000C078800711D4E06880060ED5002D0CD162 -:104FF0001D98002804D010A801F0C2EE002804D0AB -:1050000038002030C17A491EC1721D98002839D05D -:1050100010A801F0B6EE00280FD1012D08D0002D08 -:105020000BD1E068800603D52B98C078800704D5A3 -:1050300038002030C17A491CC1721D98002821D047 -:1050400000E059E01D98C07840061BD5012D08D01E -:10505000002D3BD1E068800638D52B9800794006BA -:1050600034D438002030017B491C01730698132189 -:10507000006849014018007A012803D1002120006E -:10508000F5F708F9002D1ED1E06880061BD52B9896 -:105090000079400617D51D9800282DD01D98C0789E -:1050A000400613D438002030017B491E0173069856 -:1050B0001321006849014018007A002803D101211A -:1050C0002000F5F7E7F81D98002815D03900303199 -:1050D00010A801F05AEE10A801F052EEC007010E20 -:1050E000E06880229043084360210843E0601D99F6 -:1050F0002C981C2200F0C0ECE0680022800600D54D -:105100002C9A009208AB1979002213000AA800F02B -:1051100090ED089008AB19795820015520000E2217 -:105120004A300AA900F0A8EC0899200001F034EAFE -:10513000200000F0DAED200001F0BEE9200000F0D0 -:1051400020EE380020302A900179200020300229FA -:10515000299002D1329841757EE010A801F018EE36 -:10516000002812D0002D0ED13298407D00280AD19F -:105170002A982A994079401E0006000E487102D1F3 -:10518000200001F0B2ED012114E0012D05D0002D29 -:105190000FD13298407D00280BD02A982A99407967 -:1051A000401C0006000E0128487102D1200001F0C9 -:1051B0009CED002132984175369801F0EEED002803 -:1051C0000ED0002D20D12998807F80061CD42A98EB -:1051D0002A998079401E0006000E887114D110E0D3 -:1051E000012D05D0002D0FD12998807F80060BD589 -:1051F0002A982A998079401C0006000E012888719F -:1052000002D1200001F074ED369801F0CAED0028BB -:105210000ED0002D20D12998C07F40071CD42A9899 -:105220002A99C079401E0006000EC87114D110E002 -:10523000012D05D0002D0FD12998C07F40070BD537 -:105240002A982A99C079401C0006000E0128C871CE -:1052500002D1200001F050ED200001F0A6ED020087 -:105260000121200001F0A4ED200000F02EED369980 -:10527000299820310A7882774978C1773398397F25 -:105280000170797FFF27417091373A002D2304A9DF -:1052900005A800F0FAEC00282CD0049D05981835DC -:1052A000281A3F1A2900300001F086ED0004000C96 -:1052B000391A0B042F1836981E14417800780A0208 -:1052C000024336993300380001F07AED311A0B04AD -:1052D0003E1828991B140622300001F072ED049943 -:1052E0008019401B8872000AC872059A3499200000 -:1052F00000F0D2EC279801F02CEB0006000E00D055 -:105300004BE40321229A09026118002A00D00122ED -:105310000A6042E410B544692000FFF75CFA2100FE -:10532000FF310222579B4A5C010000003CD400C0C0 -:1053300000040000211E4F0072312000FDF77FFEA7 -:1053400010BD000010B50968491C0CD0202908D1F7 -:10535000806900F0BCEB00681D2149014018012163 -:105360000172002010BD4168183101F0A0E8F8E793 -:10537000F8B504000D0048680127C0680090A669D0 -:10538000300000F098EB002C5AD0002D58D0002EA1 -:1053900056D02B68212B43D010DC172B06D008DC0D -:1053A0009B1C4BD0012B13D0182B4BD161683C3187 -:1053B00032E01D2B19D01E2B44D124E0223B00F0FB -:1053C000FEEF0C3541414141413F3F3F413F2141CB -:1053D00001F074E8002804D001F070E8007A032896 -:1053E0002ED0002000F082EF2AE001009B239B00DA -:1053F0001C224831C01801F016EB1E213000F5F7D1 -:10540000B4FD1DE0002700993A003000FDF709FDCA -:10541000002815D161683031200001F048E80FE024 -:10542000222200213000F4F74DFA09E03000F4F7B1 -:1054300083FB22213000FDF7ADFC01E02068A06075 -:105440000020F8BD2800F8BDF8B504000D008669FD -:10545000002848D0002DFCD028680B27BF01212848 -:1054600042D00EDC17285DD006DC801C7BD00128E2 -:1054700012D0182872D155E01F2835D020287BD1B2 -:1054800053E00300223B00F09AEF0B5077777777D9 -:10549000774A752F50757700012000F028EF227DA4 -:1054A000002A05D0002001002075300000F022EB1A -:1054B000A06900F00CEB00681D256D014019007A11 -:1054C00000280BD0A06900F002EB00684119002011 -:1054D000087202001F21200000F084EFF019806B99 -:1054E000042100F0D4EC45E01F2802D13321202410 -:1054F0000AE02A2806D136212B240120F219926BCA -:10550000907301E0342122243000F4F7E5F90328F8 -:1055100030D0010022003000F4F7D4F92AE0300046 -:10552000F5F75CFC61683C3113E03000F4F736FAC3 -:105530002868202802D16768183703E02B280ED18D -:1055400067683C3728680106090E3000FDF722FC29 -:105550003900200000F0AAEF0CE004E00CE030007D -:10556000F4F7EAFAE7E7F019806B052100F08EEC1A -:105570002068A0600020F8BD2800F8BD70B50400C8 -:105580000800002C3ED000283CD00268A569212AE2 -:105590002FD00CDC182A2ED004DC921C30D0012A2B -:1055A00031D12FE01F2A24D0202A2CD121E0292A12 -:1055B00019D004DC222A1CD0282A24D122E02A2A4D -:1055C00020D02C2A1FD161682000183100F06EEF26 -:1055D0002D212800F5F7C9FC0B210020890169184D -:1055E000896B88730EE02800F5F74AFC616830315A -:1055F00002E0227506E0A168200000F058EF01E00B -:105600002068A060002070BD10B50A681F2A0FD066 -:1056100008DC921C0DD0012A0BD0172A0BD0182AB7 -:105620000ED106E0202A03D0212A01D0222A07D158 -:105630000275002010BD4168483100F038EFF8E7EE -:10564000080010BD164A1748002110B500F056EFAB -:105650001449154A0800183000F050EF1149134A58 -:105660000800303000F04AEF0E49114A0800483077 -:1056700000F044EF0B490F4A08003C3000F03EEFC9 -:1056800010BD09218901074A411810B50A601100AF -:105690008F2292001831801800F0E4EF10BDF0E77F -:1056A00049D400C0286501C075D400C04DD500C0E4 -:1056B00081D600C00DD700C0F1B56120C04384B0D1 -:1056C0000027039002900498B90009180520C00132 -:1056D00009188C6A002C7ED0617822780E020F2186 -:1056E000164389010E40F6D0064208D00398623076 -:1056F00005D1049801F072EB000400140390FF2020 -:105700004130064208D00298623005D1049800F07A -:10571000D6EC0004001402900025300614D5302188 -:105720000A5D039901208A4200DD0020802100915A -:1057300023002200D7771D3B0100000038D800C0AD -:105740000004000001FDE78A010004985E33303256 -:105750000197F3F766FE002800D08025B00517D525 -:105760003C21095D039A0120914200DA00200121C9 -:105770004902009123002200010004985F333C326B -:105780000197F3F74EFE002802D0012040020543A6 -:10579000700616D52A21095D029A012049429142DC -:1057A00000DD002040210091230022000100049828 -:1057B0005C332A320197F3F734FE002801D04020F1 -:1057C0000543F00518D53621095D029A01204942AA -:1057D000914200DA0020FF26761C23005D33220070 -:1057E000363201000197009600E015E00498F3F7C7 -:1057F00018FE002800D03543002D0DD0002F0BD10E -:10580000049815214901401881892943818101218A -:105810000498C906F5F7EDFB7F1C3F063F0E012FEC -:1058200000D25AE705B0F0BDF3B50024050026000C -:1058300081B0A00005214019C9014018806A0028E4 -:105840004BD04178027809021143490745D50299A6 -:10585000096900290CD101006031330A4E708B7048 -:10586000C07C0A000121002800D00100117034E042 -:10587000010060318A784B7812021A43521C1204DC -:10588000120C130A4A708B700B78002B25D0877C82 -:10589000BA4222D35B1E1A06120E0A701DD1320ABA -:1058A0004E708A70C27C002A01D00A7008E04178EC -:1058B000027809021143042291430170090A4170E0 -:1058C000002C0AD115204001281881890422114397 -:1058D000818151062800F5F78CFB641C2406240EF8 -:1058E000012CA6D3FEBD4349C868401CC860704760 -:1058F000F0B51D001FB40020C04384B0009001909B -:1059000004980521C9014018846A002C42D06078AF -:105910002178000208434005002700283ADA00F009 -:1059200094EE069A0E002B00121A8B41029005D2BB -:10593000069A02983100801AA94107E0069A009859 -:105940000199801A029AA94180187141060020002D -:105950000D004A3000F0FCE92B00321ABB411BD38A -:10596000244EF088401C05042D0C20004E30F5809C -:1059700000F0EEE9A8420DD8F780049815214901FE -:1059800040188189012292021143818104985104B7 -:10599000F5F72FFB09B0F0BD1648C780FAE70522DE -:1059A000D201801810B5846A002C1FD0607822784C -:1059B00000021043400519D5487D01F01EEA40342D -:1059C000E179A2790B0213430A49002298420ED8CA -:1059D0008888401C0004000C8880637A247A1B02AB -:1059E0002343834202D8012008818A8010BD0A81A6 -:1059F000FBE7000058F000C070B5050000F070E84B -:105A00000400280000F060E811220100520189180A -:105A100049880C340020012903D1A16F012900D14C -:105A2000012070BD10B589780A07930F022B04D1AD -:105A30000B09042B08D00C2B06D0920F02D10909B8 -:105A4000052901D0F5F710F910BD00000148408983 -:105A500070470000CCF100C004F01FE5191E0200E1 -:105A600004F01FE5BDE0000004F01FE5090100009F -:105A700004F01FE5BBE0000004F01FE50D743000EA -:105A800004F01FE5211E020004F01FE5E8CB310001 -:105A900004F01FE557AC310004F01FE589AD31007B -:105AA00004F01FE55CCA310004F01FE561540000FA -:105AB00004F01FE5FDB5000004F01FE5F1B500009E -:105AC00004F01FE50150020004F01FE5E14F020061 -:105AD00004F01FE54384310004F01FE5FCD43100DD -:105AE00004F01FE52F50020004F01FE5451A0000E6 -:105AF00004F01FE52FC3000004F01FE51DA70100FF -:105B000004F01FE5C583310004F01FE57364000055 -:105B100004F01FE50563010004F01FE5DFAF00009E -:105B200004F01FE5156D000004F01FE5436400005C -:105B300004F01FE5BB66000004F01FE5F50F000050 -:105B400004F01FE52458F51D0100000034DC00C0FE -:105B50000004000086ABE9D82D1C000004F01FE50E -:105B60004BBC300004F01FE591FF000004F01FE57E -:105B7000A100010004F01FE56DD2000004F01FE554 -:105B8000511A310004F01FE5A1D5000004F01FE513 -:105B9000E7DA000004F01FE541BF000004F01FE554 -:105BA000F1C0000004F01FE5FBBF000004F01FE59A -:105BB0001361000004F01FE531BF000004F01FE591 -:105BC000F1DA000004F01FE56DD4000004F01FE5D9 -:105BD0009137010004F01FE547D5000004F01FE5F0 -:105BE000451A310004F01FE5735A310004F01FE537 -:105BF000AD5A310004F01FE56BC3010004F01FE54E -:105C00003966000004F01FE5A5BE000004F01FE5A2 -:105C1000A150020004F01FE587C3010004F01FE556 -:105C200003C4000004F01FE505B7310004F01FE5D0 -:105C30000519010004F01FE5CF64310004F01FE5F1 -:105C400071CF000004F01FE583BF000004F01FE5E2 -:105C5000C500010004F01FE58584310004F01FE554 -:105C60003761000004F01FE507B8300004F01FE5BD -:105C70006D62310004F01FE537BF000004F01FE53E -:105C8000D1C0000004F01FE5116E010004F01FE513 -:105C90003567000004F01FE5CD67000004F01FE544 -:105CA0007368000004F01FE5A156310004F01FE501 -:105CB000E5D3000004F01FE56DE1010004F01FE5ED -:105CC000C51E310004F01FE5C353000004F01FE5BA -:105CD000D784310004F01FE54555000004F01FE5AE -:105CE00051D5010004F01FE57D35000004F01FE5EB -:105CF0007DD5010004F01FE54534000004F01FE5E8 -:105D00006F1C010004F01FE59766000004F01FE51A -:105D10004F50020004F01FE5A571010004F01FE5DB -:105D20000189010004F01FE50F4C010004F01FE59C -:105D300094CB310004F01FE5D3D1010004F01FE53E -:105D40004769000004F01FE51F6A000004F01FE52A -:105D50007704000004F01FE52B19010004F01FE593 -:105D60006D2A000004F01FE5E0CC310004F01FE5CF -:105D70001FAA310004F01FE5B36D000004F01FE519 -:105D8000A3C5000004F01FE5314B010004F01FE53E -:105D90004BBF000004F01FE5CB40010004F01FE5FD -:105DA0009940010004F01FE5F3AF000004F01FE587 -:105DB000E3C5000004F01FE585BB300004F01FE5DB -:105DC000254B010004F01FE56DD5310004F01FE5FF -:105DD00000CD310004F01FE58710000004F01FE53E -:105DE00019D5310004F01FE5DB29020004F01FE59E -:105DF00003B1000004F01FE5B346020004F01FE504 -:105E00008150020004F01FE5897A000004F01FE5CC -:105E1000DD0F000004F01FE579D1000004F01FE55C -:105E20005D1A310004F01FE53BA9000004F01FE5F6 -:105E3000ADA7000004F01FE5B7A7000004F01FE5C0 -:105E4000C1A7000004F01FE5F73F010004F01FE5C3 -:105E5000D728310004F01FE5FD28310004F01FE5CC -:105E6000CD29020004F01FE591D6310004F01FE5B2 -:105E70003FD6310004F01FE599B0310004F01FE572 -:105E8000D1D6000004F01FE551BF000004F01FE56B -:105E900023C8000004F01FE531EB000004F01FE50B -:105EA000914A000004F01FE5CBB0000004F01FE5AC -:105EB000D153010004F01FE5B95D000004F01FE5B7 -:105EC0001756000004F01FE54D1B010004F01FE50C -:105ED000EDA7000004F01FE527B4300004F01FE533 -:105EE000F55A000004F01FE56B30000004F01FE5D8 -:105EF0005787010004F01FE5678D310004F01FE5AE -:105F00000D7D010004F01FE57D7F010004F01FE519 -:105F10007100310004F01FE59964010004F01FE5F1 -:105F20007D77010004F01FE55BF0000004F01FE541 -:105F30001D9F010004F01FE5A7A6010004F01FE566 -:105F4000EDED000004F01FE503FD000004F01FE587 -:105F500099CC3100931463C90100000030E000C007 -:105F600000040000881E44B104F01FE5DB6A000055 -:105F700004F01FE549D4000004F01FE5FD4C0100CA -:105F800004F01FE5414C010004F01FE5974C0100AF -:105F900004F01FE5ADFE000004F01FE52D4C0100EC -:105FA00004F01FE58BB6310004F01FE5A7CA00001E -:105FB00004F01FE5CBD3000004F01FE5F1790100E8 -:105FC00004F01FE56762000004F01FE571D30000D4 -:105FD00004F01FE5B5F8000004F01FE509F6000025 -:105FE00004F01FE525F6000004F01FE5C1F80000ED -:105FF00004F01FE5F73E310004F01FE5BD3E31001F -:1060000004F01FE56DF4000004F01FE5B92C010059 -:1060100004F01FE53116310004F01FE5F9153100D9 -:1060200004F01FE58F2D010004F01FE59B2D0100FA -:1060300004F01FE5E3F4000004F01FE55DF8000044 -:1060400004F01FE5A1F8000004F01FE58CCE31003C -:1060500004F01FE518C6310004F01FE545B5310016 -:1060600004F01FE503D3000004F01FE5E16D01001B -:1060700004F01FE5391D000004F01FE5BB4D0000D2 -:1060800004F01FE55145010004F01FE5FF4E01003B -:1060900004F01FE5D94E010004F01FE5D7F8000019 -:1060A00004F01FE5E560000004F01FE5EF5F00006D -:1060B00004F01FE5F75F000004F01FE5CD4C010080 -:1060C00004F01FE5A94C010004F01FE5F57901007B -:1060D00004F01FE5177B010004F01FE5B34B01003E -:1060E00004F01FE54DB4000004F01FE55BB60000AE -:1060F00004F01FE577B6000004F01FE5E5B50000E9 -:1061000004F01FE5D5B5000004F01FE5CD40020006 -:1061100004F01FE5E740020004F01FE5A7B53100D9 -:1061200004F01FE51192010004F01FE54592010003 -:1061300004F01FE5C7EA000004F01FE5EFAA010024 -:1061400004F01FE57D77000004F01FE529B0000092 -:1061500004F01FE581C4000004F01FE57DB10000DC -:1061600004F01FE577AE000004F01FE5B7AB0100B7 -:1061700004F01FE515B4310004F01FE5EF8E0000B8 -:1061800004F01FE57958000004F01FE5F555000004 -:1061900004F01FE577A9300004F01FE5E9A83000FE -:1061A00004F01FE50756000004F01FE5CD3501009F -:1061B00004F01FE5EF35010004F01FE5A1A901007F -:1061C00004F01FE5090D010004F01FE5690F01004F -:1061D00004F01FE5A31A010004F01FE537EC0100ED -:1061E00004F01FE521DF010004F01FE58BEE010044 -:1061F00004F01FE59BEB010004F01FE5DBDF01006D -:1062000004F01FE541E0010004F01FE5036D01000B -:1062100004F01FE5596D010004F01FE5F974010059 -:1062200004F01FE5B953010004F01FE5535E0000C0 -:1062300004F01FE5AF5E000004F01FE517C4300056 -:1062400004F01FE545F8000004F01FE551F80000D8 -:1062500004F01FE54B65000004F01FE55924000021 -:1062600004F01FE56F26000004F01FE5BBDB010012 -:1062700004F01FE523D5010004F01FE5E96D0100DE -:1062800004F01FE5D16D010004F01FE59F89300087 -:1062900004F01FE56185010004F01FE57D84010025 -:1062A00004F01FE50586010004F01FE52B850100C1 -:1062B00004F01FE57986010004F01FE56118020073 -:1062C00004F01FE5D522000004F01FE5FB86010065 -:1062D00004F01FE51732000004F01FE591320000C2 -:1062E00004F01FE5ED2E000004F01FE50D30000066 -:1062F00004F01FE51D31000004F01FE54D310000E2 -:1063000004F01FE54BDB000004F01FE549430000EB -:1063100004F01FE5214C010004F01FE54DB43100ED -:1063200004F01FE54354000004F01FE5556501002B -:1063300004F01FE51B47000004F01FE59928010049 -:1063400004F01FE50755000004F01FE525BC000020 -:1063500004F01FE517AE000004F01FE5B9AC000023 -:1063600004F01FE5DB97F8C9010000002CE400C031 -:1063700000040000A290ED28FDB5310004F01FE5F7 -:10638000CF54000004F01FE55D13000004F01FE58A -:106390005D54000004F01FE551B1000004F01FE55A -:1063A0009D74310004F01FE5FFD7000004F01FE5E5 -:1063B0004979010004F01FE5BD29020004F01FE542 -:1063C00095A0010004F01FE59D46020004F01FE5C2 -:1063D000A9B1000004F01FE5A1AD000004F01FE525 -:1063E00049AA000004F01FE563A9000004F01FE5BE -:1063F00043B1310004F01FE5DB10010004F01FE59C -:106400005BD3000004F01FE5A93B000004F01FE58A -:1064100094CE310004F01FE55B64000004F01FE53A -:106420007B38000004F01FE52B07020004F01FE595 -:106430005504020004F01FE5EDB6300004F01FE53E -:10644000C3BE310004F01FE51DDB310004F01FE581 -:10645000BD07020004F01FE5D350020004F01FE561 -:10646000AF1E020004F01FE5911E020004F01FE5BC -:106470004D04000004F01FE52DD9310004F01FE5A4 -:106480000D77000004F01FE55F6D000004F01FE5CC -:1064900055AC010004F01FE5F149010004F01FE5CF -:1064A00019CF000004F01FE51951020004F01FE5A8 -:1064B0007914020004F01FE5D1D8000004F01FE5B4 -:1064C00097D8000004F01FE58F50020004F01FE58C -:1064D0009110010004F01FE54700010004F01FE5E2 -:1064E0003D3D000004F01FE58D05020004F01FE5AE -:1064F0000D0E310004F01FE5CF10310004F01FE550 -:106500002BB7300004F01FE5C3D5010004F01FE5F0 -:10651000F56D010004F01FE5631E310004F01FE576 -:10652000754B010004F01FE55159310004F01FE5DF -:10653000D13F010004F01FE5DF3F010004F01FE53B -:1065400067D7000004F01FE51758310004F01FE57D -:1065500013B7300004F01FE51769000004F01FE5D1 -:106560006156310004F01FE5755F000004F01FE57F -:1065700028CC310004F01FE5A557310004F01FE5D9 -:106580008561000004F01FE58B61000004F01FE549 -:106590001D28010004F01FE57161000004F01FE5F3 -:1065A0007129010004F01FE50B29010004F01FE52B -:1065B0009161000004F01FE50961000004F01FE58F -:1065C000592C000004F01FE5612C000004F01FE5C9 -:1065D0007508020004F01FE5B561310004F01FE505 -:1065E000D73C010004F01FE5F13E010004F01FE577 -:1065F000A171020004F01FE57B3D010004F01FE5DE -:106600004989010004F01FE53B1E310004F01FE53D -:106610004D1F310004F01FE5F760000004F01FE596 -:106620003DC7010004F01FE55128310004F01FE5CB -:10663000978B010004F01FE5793E010004F01FE58F -:10664000A73F010004F01FE58766310004F01FE555 -:10665000F722000004F01FE50368310004F01FE595 -:10666000E366310004F01FE5071D310004F01FE56B -:106670002169310004F01FE56969310004F01FE56C -:1066800075DF010004F01FE5F51B310004F01FE584 -:1066900025DC310004F01FE55DD9010004F01FE5A1 -:1066A0005B31000004F01FE57994010004F01FE560 -:1066B000D7A5000004F01FE50BB7300004F01FE57C -:1066C000D925310004F01FE5FF1B000004F01FE591 -:1066D0009F61310004F01FE5EB6C000004F01FE542 -:1066E000B3D6010004F01FE5FF16000004F01FE51B -:1066F0005533000004F01FE55956310004F01FE542 -:1067000001D5000004F01FE551A7310004F01FE59A -:10671000FB8E010004F01FE5B7B6000004F01FE592 -:106720003787010004F01FE529E2010004F01FE5AE -:106730001D5F000004F01FE5F1CF000004F01FE52D -:10674000FFD5000004F01FE5F5C1310004F01FE59E -:106750009BDE310004F01FE55F1B310004F01FE5F4 -:10676000731B310004F01FE53F42010004F01FE5F8 -:106770007D1B3100E6889EB90100000028E800C0BA -:1067800000040000827345A204F01FE5A9763100E1 -:1067900004F01FE55977310004F01FE53D74310026 -:1067A00004F01FE5C574310004F01FE5B11A310093 -:1067B00004F01FE5BD1A310004F01FE553743100E9 -:1067C00004F01FE59D5A010004F01FE5F17531004A -:1067D00004F01FE5BF73310004F01FE57FA831000E -:1067E00004F01FE56975310004F01FE52B743100DA -:1067F00004F01FE5155B010004F01FE5577631003A -:1068000004F01FE5DFB0000004F01FE5F1730200A3 -:1068100004F01FE58B76310004F01FE55B66310064 -:1068200004F01FE52DD3000004F01FE59B3D01009F -:1068300004F01FE5F362310004F01FE55D633100F1 -:1068400004F01FE55D19010004F01FE59B1901002C -:1068500004F01FE57D5D310004F01FE5732C00009E -:1068600004F01FE5575F310004F01FE5C35D310000 -:1068700004F01FE581DC010004F01FE5AB6A310084 -:1068800004F01FE53987310004F01FE53F63010084 -:1068900004F01FE53942010004F01FE5B8180200BA -:1068A00004F01FE5B15F000004F01FE50F94010044 -:1068B00004F01FE5E163310004F01FE56B94010073 -:1068C00004F01FE5BF63310004F01FE5835F0000A3 -:1068D00004F01FE5FB69310004F01FE5A5C20000CC -:1068E00004F01FE5E1D6000004F01FE5F5D6000036 -:1068F00004F01FE59154000004F01FE583633100AC -:1069000004F01FE55F62000004F01FE50F050200C0 -:1069100004F01FE50BC6000004F01FE51D02020095 -:1069200004F01FE5BB01020004F01FE5E7200100B1 -:1069300004F01FE5B7EF010004F01FE56FD8000079 -:1069400004F01FE5733A000004F01FE5D3320000A5 -:1069500004F01FE5311C310004F01FE55D25000047 -:1069600004F01FE54959310004F01FE50DBA00009D -:1069700004F01FE5D960000004F01FE5A346020003 -:1069800004F01FE5C38E000004F01FE56BDD00007E -:1069900004F01FE54B3F020004F01FE58FB5000037 -:1069A00004F01FE56706020004F01FE52F3A00001F -:1069B00004F01FE53774310004F01FE57D733100EA -:1069C00004F01FE5A302020004F01FE5CB63000002 -:1069D00004F01FE53196310004F01FE50FAB3100E4 -:1069E00004F01FE525A8310004F01FE5F9DB0100E4 -:1069F00004F01FE539B6000004F01FE543DF010095 -:106A000004F01FE5C1E2010004F01FE5433D000072 -:106A100004F01FE57128310004F01FE595213100D5 -:106A200004F01FE5C339000004F01FE5A5080200CB -:106A300004F01FE5B912020004F01FE55FC7010072 -:106A400004F01FE5A721310004F01FE559530000B1 -:106A500004F01FE51F6D310004F01FE5C9AA3100E5 -:106A600004F01FE57DAB310004F01FE5E3470200B1 -:106A700004F01FE5C38D010004F01FE5BD5F0000B9 -:106A800004F01FE5093A000004F01FE530CB3100A7 -:106A900004F01FE5AF79010004F01FE5712031001B -:106AA00004F01FE5D9F4010004F01FE5BD63010007 -:106AB00004F01FE5F71D310004F01FE58FB9300029 -:106AC00004F01FE5E767000004F01FE5417831009E -:106AD00004F01FE51B01010004F01FE553610100F4 -:106AE00004F01FE55B62010004F01FE5B97C310092 -:106AF00004F01FE58D79010004F01FE5A9F3010002 -:106B000004F01FE5AFE3010004F01FE5EF80310062 -:106B100004F01FE51778310004F01FE5BF430200C1 -:106B200004F01FE593C2010004F01FE5D7D0000078 -:106B300004F01FE57362000004F01FE51D63000010 -:106B400004F01FE56F71310004F01FE52F5A31008A -:106B500004F01FE53F6F310004F01FE5192101002B -:106B600004F01FE59305000004F01FE53B18010049 -:106B700004F01FE5CB48010004F01FE5FFE9000029 -:106B800004F01FE5CC83EE790100000024EC00C086 -:106B90000004000005254BF035EA000004F01FE575 -:106BA0002DEA000004F01FE58DF7000004F01FE55A -:106BB0000142010004F01FE5F7F7000004F01FE5B3 -:106BC0005938010004F01FE59140000004F01FE572 -:106BD0009330010004F01FE5C948010004F01FE5EF -:106BE000C9BB000004F01FE599BB000004F01FE5DD -:106BF000B5BB000004F01FE56B28310004F01FE571 -:106C00007728310004F01FE54D53000004F01FE524 -:106C10007319010004F01FE52B8F010004F01FE53C -:106C200069E4010004F01FE5C555010004F01FE50B -:106C30006D58000004F01FE58F25000004F01FE5EB -:106C4000614B010004F01FE571A8010004F01FE58D -:106C5000E95A000004F01FE52B13000004F01FE5C3 -:106C60003763010004F01FE5796D000004F01FE5B3 -:106C700021DC000004F01FE5AD29020004F01FE54F -:106C8000BD88300004F01FE58F89300004F01FE557 -:106C90000189300004F01FE565BA000004F01FE52B -:106CA00083BA000004F01FE5312C010004F01FE559 -:106CB000EB00000004F01FE5B9BC300004F01FE554 -:106CC000C500000004F01FE50BBD300004F01FE517 -:106CD000E90F000004F01FE5632C010004F01FE53C -:106CE000A928010004F01FE5C9B7300004F01FE532 -:106CF0003914020004F01FE537B7310004F01FE536 -:106D000027F4010004F01FE541B7310004F01FE54E -:106D10000BE1010004F01FE57FE4010004F01FE532 -:106D20007977000004F01FE57386000004F01FE58A -:106D30002B6B000004F01FE585B1010004F01FE596 -:106D400067AE010004F01FE539AE010004F01FE555 -:106D50007BB4010004F01FE5FFB6010004F01FE55D -:106D60001581310004F01FE5136E000004F01FE5EB -:106D70004981310004F01FE5DD66000004F01FE5E5 -:106D80005767000004F01FE50F68000004F01FE5DE -:106D9000BDFF300004F01FE51520000004F01FE5E2 -:106DA000030B310004F01FE51B00310004F01FE568 -:106DB000511F000004F01FE51982310004F01FE5A7 -:106DC0003982310004F01FE571F5010004F01FE580 -:106DD000B970310004F01FE50560310004F01FE5D3 -:106DE000F11B010004F01FE5AF6F310004F01FE557 -:106DF000D96F310004F01FE5736F310004F01FE517 -:106E00007BC1010004F01FE50371310004F01FE5B0 -:106E10001371310004F01FE55B70310004F01FE5D1 -:106E20008970310004F01FE53B70310004F01FE56C -:106E30004B70310004F01FE5692B000004F01FE5E2 -:106E4000D78B010004F01FE517F5010004F01FE5E2 -:106E5000D75A310004F01FE525B6000004F01FE505 -:106E6000DB173100000000000000FFFFFFFFFFFF05 -:106E70002F015D0133016201350132013401460108 -:106E8000960197016401DD006901700139017B0100 -:106E9000000001002B012C012D012F0130013101D7 -:106EA0003201320134013601330146013501390125 -:106EB0007B013B013B013B013B011F0138014001CC -:106EC0005E0155015D012A0101016201410191014B -:106ED0009101920164012D00DD00AA01930170016E -:106EE00098013D00010800000000000000000000C3 -:106EF0000000000000000000000000000000000092 -:106F0000322E332E312E3000003C00800000000075 -:106F10000000000000000000000000000000000071 -:106F20000000000000000000000000000000000061 -:106F30007C7B02000000000000000000FF0000FF5A -:106F4000000000FDFDFF8800C003C103BE03BF03B6 -:106F5000C403C503000000000000000000000000A2 -:106F600000000000FDFDFF92FDFDFF92FDFDFF9280 -:106F70000000000001000000000000000000000010 -:106F80000000000000000000000000000000000001 -:106F90000000000043A76E400100000020F000C088 -:106FA00000040000C3B414B600000000000000009C -:106FB000000000000000000000000000FFFFFFFFD5 -:106FC000FF0A0000000000000000000000000112A5 -:106FD0001202030000030504040100000000000089 -:106FE00000000000000000000000000000000000A1 -:106FF0000800040102000000050102000000060173 -:1070000002000000070102003C001601020000001F -:107010001701020000002601020000002701020003 -:1070200000002801020000002901020000002401E4 -:107030001000000000000000000000000000000040 -:1070400000004901020032000000000000000000C2 -:107050000000000000000000FF000000FF00000032 -:107060000000000000000000000000000000000020 -:10707000000000000000000000001E0000000000F2 -:107080000000000000000000000000000000000000 -:1070900000000000000000000000000000000000F0 -:1070A00000000000000000000000000000000000E0 -:1070B00000000000000000000000000000000000D0 -:1070C00000000000000000000000000000000000C0 -:1070D00000000000000000000000000000000000B0 -:1070E00000000000000000000000000000000000A0 -:1070F0000000000000000000000000000000000090 -:10710000000000000000000000000000000000007F -:10711000010000000100000000000000010000006C -:10712000010000000100000000000000000000005D -:107130000A00000000000000000000000000000045 -:10714000000000000000000000000000000000003F -:1071500000000000000044070000000000000000E4 -:107160000000000000000000000000000300010219 -:10717000000100020000000000000000000000000C -:107180000000000000000000000000003C000000C3 -:1071900000000000000000000000000000000000EF -:1071A00000000000000000000000000000000000DF -:1071B00000000000000000000000000000000000CF -:1071C00075020000050000008D4F02000A0000005B -:1071D00000000000000000000000000000000000AF -:1071E000FFFFFF00FFFFFF00FFFFFF00FFFFFF00AB -:1071F000FFFFFF000C000000000000000B0000007B -:10720000000000000A00000000000000291000003B -:10721000183D01C00201010002020100010201004B -:10722000010302000103010000FF1F000000000035 -:10723000FFFFFFFFFFFFFFFF00000000D1EF000096 -:107240000100000000000000FF000000000000003E -:1072500000000000008000000000000000000000AE -:10726000000000000000000000000000060003090C -:107270000406040507000801060208070F007F0046 -:1072800001000000000000000400000000000000F9 -:10729000FFFFFF0F00000000FFFFFFFF00000000E6 -:1072A000FFFFFFFF00000000FFFFFFFF00000000E6 -:1072B000867B0200000000000000000000010203C5 -:1072C000050608097E000000FF020104000000001E -:1072D00000000000000000000000000000000000AE -:1072E0000000000000000C00DC05000000000300AE -:1072F000F401000000000C00DC05000000000A00A2 -:10730000DC05000000000800DC05000001000700AB -:1073100059060000010004005906000001000200A7 -:1073200059060000000000000000000000000000FE -:10733000000000000000000000000000000100004C -:1073400006000000000000000000000050F800C02F -:1073500040FA00C032003200320032003200320007 -:10736000320032003200320032003200320032008D -:1073700038FA00C03CFA00C00000000048FA00C023 -:1073800044FA00C000000000241F01C0042001C016 -:10739000F81F01C000000000082001C0000000002C -:1073A00000000000F910BAE7010000001CF400C062 -:1073B00000040000B64AEF0E90039103C403F103EA -:1073C000C503F203BE03DF03BF03E003C003E5030D -:1073D000C103E603000000000400070048000000AD -:1073E00006006C09B4090000000000000000000065 -:1073F000EC010000A0010000C0010000040000003A -:107400000A0000000A00000002012D01550156018A -:1074100057015801A201A701AB01AC01AF01B001B6 -:10742000B101B201B401C80108002C002D002E00EA -:107430003100320033003600370038004F005A0068 -:107440008000DD00350179017B01040254038802CC -:107450008B028C02B603B803B903CB03CE03CF0370 -:10746000D0030804510494049504440047005000DC -:10747000510079017A017B01D9020000040000006B -:107480000700000048000000020000002D0000007E -:107490005500000056000000570000005800000092 -:1074A000A2000000A7000000AB000000AC0000003C -:1074B000AF000000B0000000B1000000B400000008 -:1074C000C8000000080000002C0000002D00000093 -:1074D0002E000000310000003200000033000000E8 -:1074E0003600000037000000380000004F000000A8 -:1074F0005A00000080000000DD000000350100009F -:10750000790100007B010000040200005403000028 -:10751000880200008B0200008C020000B60300000D -:10752000B8030000B9030000CB030000CE03000045 -:10753000CF030000D0030000080400005104000045 -:10754000940400009504000044000000470000007F -:107550005000000051000000790100007A01000095 -:107560007B010000D9020000B03000900100000053 -:10757000000000000000000000000000000000000B -:1075800000000000000000000000000000000000FB -:1075900000000000000000000000000000000000EB -:1075A00000000000000000000000000000000000DB -:1075B000000000000000000000000000FF000000CC -:1075C00000000000000000000000000000000000BB -:1075D000384901C000000000FF0100070707000351 -:1075E0000003000700030007040500070607000862 -:1075F0000002000803040008050700080002010853 -:107600000304010805070101120E0E0E0D0D0D0AEF -:107610000A0A02120F0F0F0F0E0D0A0A0A031210A8 -:10762000100F0F0E0D0A0A0A041210100F0F0E0D84 -:107630000B0B0B051210100F0F0E0D0C0C0B06127E -:1076400010100F0F0E0D0D0C0B071210100F0F0E58 -:107650000D0D0C0B081210100F0F0E0D0C0C0B095A -:107660001210100F0F0E0D0A0A0A0A1210100F0F37 -:107670000E0D0D0C0B0B120E0E0E0E0E0D0D0C0B37 -:107680000C1010100F0F0E0D0D0C0B0D1010100F15 -:107690000F0E0D0D0C0B0E0C0C0C0C0C0C0C0C0C22 -:1076A0000B0300030201060504090807FFFFFFFFA3 -:1076B000FFFFFFFFFFFFFF0000003F7F0200000011 -:1076C000F4010000000000000000000000000000C5 -:1076D000000000000000000000000000FF000000AB -:1076E000000000000000000000000000000000009A -:1076F000000000000000010038000000D7009700E3 -:1077000001015D014301BC02E9FF00007C000901A9 -:107710009800E001C30021035D000000E200B0001A -:10772000FD002F0114019001EAFF00006200AC008F -:10773000A4008D01E700200338000000D700970067 -:1077400001015D014301BC02E9FF00007C00090169 -:107750009800E001C300210359000000A500560075 -:10776000D0008700E200AC00D5FF000025004D00EE -:107770005D009A009C006101010000000000000013 -:1077800000000000000000000000000007B700C07B -:107790001FB700C0B5B700C0B95A0100A96D0100FC -:1077A00065C1010015150000C3FF0000A7A8000077 -:1077B000A95501001AA3FE310100000018F800C00D -:1077C0000004000096A947848A7B0200FFFFFFFFA8 -:1077D000FFFF0000000000000000000000000000AB +:10000000E068400706D5200006F06AEE002801D11E +:10001000012100E000212000FEF7D4FC200006F0C2 +:1000200064EEE068012109030843E060FF20062137 +:100030004930015548480088002802D0200006F0C9 +:1000400030E910BD70B5050044480C0006F014EE10 +:10005000207B002804D12800FFF7CEFF002601E016 +:100060000026F6432800FEF795FC050008D0237A09 +:10007000227B3B49280006F004EE2800FEF7F6FC40 +:10008000300070BD70B50500002634480C00F64302 +:1000900006F0F2ED207B002804D12800FFF7ACFF2A +:1000A000002602E02800FEF7B7FC2800FEF772FCED +:1000B000050009D02A49237A227B491C280006F032 +:1000C000E0ED2800FEF7D2FC300070BD2348001F91 +:1000D0000068704770B514000500012206F03CE886 +:1000E0001E48001F002C04D00B21890169180968E3 +:1000F00000E0FF21016070BD10B50400FEF78CFC2C +:100100002000FEF747FC040006D00021200006F086 +:10011000F0ED2000FEF7AAFC10BD70B5002506002A +:10012000ED4306F0BEED04000DD020890E2100192C +:100130000170200006F0CCED012803D1200006F06C +:10014000D4E800E000256D1C05D13000FFF784FBEA +:100150003000FFF7D1FF70BD5C3A01C06CF800C001 +:100160002B80000008B500910A22694605F05CEF7B +:1001700008BD08B500910C22694605F056EF08BD90 +:1001800070B504000D00012096B005F02AEF0600BE +:1001900006F062E8607822780102114320000C39F1 +:1001A0002C3001AA05F038EF0B2189017018426943 +:1001B000FC4968322B0001A806F09EED16B070BD18 +:1001C000012010B506F09CED002817D0F548001F5F +:1001D0000079400612D4F348223006F042E80028A5 +:1001E00001DD012400E00024EF4821000068FFF752 +:1001F000C7FFEE4821000068FFF7C2FF10BDFFB542 +:100200008DB000200E0001000690169F179D03A8D8 +:10021000FFF786F80D9806F078ED059038001C3051 +:1002200008903889C419E2480068017900910D9856 +:100230005921C90041180197109B0F9A300006F010 +:1002400068ED011B0904090C109A0791D949082A85 +:100250000A9001D1086000E04860310006F05CEDD2 +:100260003100042224310A90099005F0AAEE0A9880 +:100270006B46001D0A9030008B1B22D40100000049 +:10028000908000C000040000F2C248652030417D2B +:100290001974807D5874880601D5012100E0002181 +:1002A0000D9806F0C8EC0D9806F044ED012806D133 +:1002B0000A990D9806F042ED0A9940180A906B468B +:1002C000187B800730D1BC48001F007940062BD432 +:1002D0000A9802900020070001900090B648223052 +:1002E00005F0C8EF002802D00120019000900D9881 +:1002F0002030807E800605D4AF480A3005F0BAEF82 +:10030000002801D001200090AB482A3005F0B2EF60 +:10031000002800D00127009A019902983B0006F0BE +:1003200012ED0A9940180A900A9A0D982D2106F0AC +:100330000EED0A9940180A900C900D983100C06893 +:100340004C3140070F1D00280B9114DA0B9805F073 +:1003500092EF79783B780A02010007981A430292DB +:1003600001910090109A0C992300302006F0F2ECD5 +:100370000A9940180A9030000A990122373006F095 +:10038000EEEC0A9942180D983D210A9206F0DEEC37 +:100390000A9942180D9848210A9206F0D8EC0A9959 +:1003A00042180D984A210A9206F0D0EC0A9940189A +:1003B0000A900D9806F086EB002805D00AA8FFF7F2 +:1003C000E2FB0D9806F0CEEC0B9805F054EF79782F +:1003D0003B780A02010007981A436E4607C62300BD +:1003E000109A0A99DD2006F0B6EC0A9940180A9096 +:1003F000280006F0BCEC0698E86108980599817021 +:10040000E869012109038843E861059806F0B2EC28 +:100410006C60E8620A982200001B20380604360C43 +:10042000300A267060700D9801210C2306F0A6ECAE +:1004300060782178000208430A99801B40180999C6 +:100440000A90091B08392973011B083969736178FF +:100450002278090211431C31E9811099082902D13F +:100460005A49086004E05A490860280006F08AECFE +:10047000FF220621A01D06F08AEC11B0F0BDF0B5F8 +:1004800006000F00022107209DB005F060EE002855 +:1004900004D1300005F05EEE002802D003201DB02C +:1004A000F0BD04A903A8FEF745FF38004030817E67 +:1004B000002903D0417E0591807E03E003980590DA +:1004C0003C20C05D6B4605060B2080013418606936 +:1004D0002D0E05736069197D4173300006F05AECEA +:1004E0000121092005F002EE0021092005F0D6EDDA +:1004F000032006F054EC059800222900FEF7B5FE13 +:10050000FEF705FF3900300000F0CAF9390006A8EF +:1005100006F048EC08AB987E5A7E010260691143F0 +:10052000403010AB8181987BC00704D000222900A5 +:100530003000FFF7D9FD300005F028EE002800D08C +:10054000FEE7340080342069AC25058121691B4A0F +:10055000481910601F48E2680260019200913A0059 +:100560003000082306A9FFF754FEA069144A05814C +:10057000A169052348191060174862690260019259 +:1005800000913A00300006A9FFF743FE08AB987EC1 +:10059000597E0002084306F00AEC0221092005F00A +:1005A000A6ED0E48016820221143016001210920B7 +:1005B00005F074ED002072E73E5C0004782201C073 +:1005C000742201C034F800C074F800C0B4BB02004B +:1005D000B8BB02005C2201C0602201C000A70080FD +:1005E000F0B505000F000221072089B005F0AEED3F +:1005F000002804D1280005F0AEED002802D0032029 +:1006000009B0F0BD04A903A8FEF794FE38004030FD +:1006100081793C002034002904D041796B46197659 +:10062000807903E06B46187B1876A07B6B46587682 +:100630002078022805D1A0786178000208430128BB +:1006400001D20120DCE70B2080012E1870696B4677 +:10065000597E01737069197E4173032006F09EEB89 +:10066000A0786278010270691143403081816B4645 +:100670005A7E280006A9FEF7E3FD6B46597E0698D0 +:100680000022FEF7F2FDFEF72AA4FB920100000013 +:100690008C8400C000040000D84CE1FC42FE72696A +:1006A000290013007E312B332C323800089106F0DC +:1006B0008CEB380037300E21079005F066ED58219D +:1006C000059048552800059A07994A3005F08CECAA +:1006D000326A07983532009200220599130005F01E +:1006E00058ED06000300059A07992800FEF76EFEF4 +:1006F000280005F0AAED012028723900280006F034 +:1007000068EBA07DC00705D06B46597E012228000A +:10071000FFF7F4FC300006F060EB8C4AC00711795B +:10072000BF23400E194001432800117105F038ED38 +:10073000002800D0FEE72E0080363169AC20088109 +:100740003069834A0100AC3111608249F2680A6065 +:1007500001920090089A390028000823FFF763FDF2 +:10076000B169AC200881B0697B4A0100AC311160ED +:100770007A4972690A6001920090089A390028004B +:100780000523FFF750FDA07861780002084306F0CA +:1007900018EB2800617D20308177A17DC17728008A +:1007A00006F002EB0221082005F0AAEC6C4908686B +:1007B0002022104308600121082005F07AEC002077 +:1007C00028E7F8B504001E00069F06F00AEB0500B6 +:1007D0002000FF304130806A002839D1E0680121D3 +:1007E00009030843E060716B002904D020001C223B +:1007F000613005F0FAEB2A68582035320092015D2D +:10080000002220004A30130005F0C2EC01003940FC +:10081000200006F0EAEA200006F00EE9200005F0CC +:1008200060ED3069002801D0012100E000212000A6 +:1008300006F0DEEAE0680121084302221043E0608E +:100840002200FF3269754A322021200006F0D4EAE6 +:10085000200006F0C6E80F2F0AD83C490822087984 +:100860001043C008C00008713E481E3105F048ED35 +:10087000F8BD4169806902002432914202D03C30C7 +:10088000814201D1012070470020704702210720DA +:1008900010B505F036EC32480168202211430160A2 +:1008A0000121072005F004EC10BD2F49002008604D +:1008B00048607047F3B50100020083B004004A317C +:1008C00004985832029106F09CEA05F072EF0B2072 +:1008D00080012618326A2000353200924030017EB5 +:1008E000070000220298130005F052EC05000300F7 +:1008F0003A7E02992000FEF769FD280006F06CEAB6 +:10090000124AC0071179BF23400E1940014320004D +:10091000117105F09AEC0499200040314A7A203098 +:100920008277897AC1777069210003002B3304989C +:100930005A1C7E31FEF760FC0C4900200870012033 +:10094000207206F062EA05B0F0BD00003A5C0004D7 +:10095000782201C05C2201C0742201C0602201C063 +:1009600000A70080404B4C0074F800C040F800C065 +:100970003EB5002104000A000B0068460EC00622A6 +:10098000FB49684605F030EBF94D0022CB3DAA70DB +:10099000687B012100280CD0012807D0042803D14E +:1009A00080206B46987106E0002C02D06B4699714E +:1009B00001E06B469A716B4629739879A873EC48ED +:1009C00000220B38C16BD243FF3141310A80C06B2A +:1009D000694606F01EEA3EBDF0B591B0E44C0B3C12 +:1009E000E06B06F01AEA0500402101A805F030ECA2 +:1009F000DF49062201A805F0F8EA200020300100B6 +:100A0000427C03A80F39801C05F0EEEA200020305C +:100A1000C17C6B469972007DD872D648002100884F +:100A200026009881A37AC03E01AA0AE07018A0307F +:100A3000007F571820374006400E491C0906090E52 +:100A4000B8728B42F2D800270420B7703073E06B85 +:100A50002822525DC16801263603D207B143D20C69 +:100A60001143C160C2480FA9173806F042E910AB24 +:100A70001880E06BC168C90404D4BD494B390968CA +:100A8000002905D02A00002301A906F0CAE902E0E6 +:100A900001A906F0CAE90028E6E832490100000091 +:100AA000888800C000040000F8AF49765FD1E06B91 +:100AB000C1683143C160E06B002858D00521C901ED +:100AC00040180068002852D060300783E06B00288F +:100AD0004DD040180068002849D060304783E06B53 +:100AE000002844D040180068002840D06030878338 +:100AF000E06B00283BD040180068002837D06030F9 +:100B0000C783E06B002832D04018006800282ED040 +:100B100080300780E06B002829D04018006800284A +:100B200025D080304780E06B002820D04018006836 +:100B300000281CD080308780E06B002817D0401838 +:100B40000068002813D08030C780E06B00280ED0EA +:100B50004018006800280AD080300781E06B002828 +:100B600005D040180068002801D08030478111B0BE +:100B7000F0BD38B5040006F05AE9E16805008803C5 +:100B800040D40120400401437E48E160AB38007945 +:100B9000002809D00B20800120184069803000799E +:100BA000C00701D0012100E00021200006F04AE941 +:100BB0000021200000F055FF40212000FDF773F9CF +:100BC000200006F044E96F484B38806800280ED0BA +:100BD0006C48CB38C169002909D07D22D2004A4334 +:100BE00000920322290020000023FDF7E9FA67485C +:100BF0000088002806D005F0C2EB002802D02000B3 +:100C000005F06CEB38BDF8B5062207005D483900E9 +:100C10000B38C66B3000FF304A3005F0F0E9300089 +:100C2000062239007E3005F0EAE90B2189017518AA +:100C3000686920212C3005F016EB68693C002034EF +:100C4000A2792C30B91D05F0DAE96969A079203163 +:100C5000C8726969E279803108795207400840001A +:100C6000D20F10430871FD221040E2796969120722 +:100C7000D20F5200803110430871E079400701D54E +:100C8000012100E00021300006F0DCE83D490020B1 +:100C9000CB394871E079C006C10F6869FF30613017 +:100CA00041763900002005F02EEA012005F0EAEE39 +:100CB000A179B81D05F092EA3A003900300006F03B +:100CC000CAE8F8BDF0B505000B212E4C89010B3C9C +:100CD000E06B87B041184F6906F0A8E82600C03ED7 +:100CE0000090B06806F0BAE80720307320002900B1 +:100CF000603805000177307905F07CEF05F05AEF98 +:100D000003910290287F002801D002287ED11D483F +:100D100001A9173805F0F6EF01000198194A891F5B +:100D20000904801D090CA33A05F094E9287F0028E6 +:100D3000ECD1E06B0B21890141184E69009906F056 +:100D400092E805F074ED0F4D31001535687E307373 +:100D500028000590807E7073E88A40310491888174 +:100D6000280060384369026973623262C26980692F +:100D7000F261B0612E00603E3068002808D000208B +:100D800011E000006B6902C0562201C05C3A01C04C +:100D9000F9480399C36A826A0298801A9941F74A0E +:100DA000002305F0E4EB3063E06B0121C268090326 +:100DB0000A43C260E06B0422FF3041300272E06BF4 +:100DC000C2688A43C2600421072005F0D4E90028E4 +:100DD0000AD1E9480399436A026A02988018EA8AAC +:100DE0005941920206F042E8E06B0122C168120309 +:100DF0001143C1603800FF30002121308181491E3C +:100E0000418105F0D8EEFF377F1C00E058E07963A0 +:100E10003863E06B06F02EE806F030E87964386459 +:100E2000032005F0D0EFE06B06F02CE8287DC0072A +:100E300004D0697EE06B002205F0ACE906F026E8FC +:100E4000E06BFAF74AFBE06B05992030CA7C8277A9 +:100E5000097DC177049900208873C949042208706C +:100E6000E06BC1689143C44A603A1379DB075B0FBA +:100E700019431023C16099435379E06BDB07DB0E04 +:100E80001943C160F068002815D1E06BCB040BD585 +:100E9000CB060BD4490709D4010020318B7FDB0638 +:100EA00002D5497E090701D5F3F28C8001000000CC +:100EB000848C00C0000400007FF947240121F16008 +:100EC000117952791143FDF7A5FDB048803880684B +:100ED00007213AE0009D06262035287A0028E06B9D +:100EE00011D0009905F02CED002808D0E06B009996 +:100EF00005F0C2EFE06B00F089FD08260AE00098DB +:100F0000FFF78BFE06E000F081FDE06B0021FF3073 +:100F100041300172E06B0122C168120391432A7AC9 +:100F2000D207D20C1143C16098499B4852228031AC +:100F300005F06EE8E06BFEF7C4FCE06B002100F00A +:100F40009AFD924831008038806805F0FEEC05F08B +:100F5000BCE8E06BC1684A0702D402221143C160B9 +:100F600007B0F0BDF7B582B00326884C4034E06B83 +:100F700005F066EF25000700C03DA8680299884289 +:100F800007D0002802D00C20FFF7A6FE042005B0F1 +:100F9000F0BD039B05F0DCEC0A86068629746A82A4 +:100FA000827F2086E878401CE870E06BC068C0044F +:100FB0000BD505F07AEF002807D005F05EEB00288E +:100FC00070D105F076EF00286CD1E06B05F074EF7E +:100FD000002867D0022665E0287B072862D0032816 +:100FE0003DD86878401C68703CE0E06B012100F05F +:100FF00042FD05F066EF654980390871002005F073 +:1010000004EE624D2037803D2800397ACB308035A0 +:101010000029019009D0E06B019905F092EC0121C3 +:101020000028686000D00021A9605849A27AE06BCE +:1010300000233C31FEF7DEF90198FFF7EEFDE06B8F +:10104000C068C004C00F3872504880384178491CCD +:1010500041706968002902D1407B032802D1FFF763 +:10106000CFFC1FE00020FFF797FC1BE0687800280A +:1010700018D0032816D2401C687005F016ECF1E772 +:10108000287B07280ED0032801D9042000E00A207D +:10109000FFF722FE06E0E06BFDF7E6FC0020A8600B +:1010A00000F0BDFC300072E7FFB581B000240E00F7 +:1010B000039800283FD00398062201890D18334871 +:1010C000290012314B3005F07CEB002832D1A87892 +:1010D0002E4F000940370A2810D00BDC01285DD0C4 +:1010E00003285BD0082826D1F86B0A9A2900FEF75E +:1010F000BBFA1FE00B280AD00C281CD1234C803CE3 +:10110000A06805F0B6EE6078002868D112E01F4CA8 +:10111000803CA06805F0ACEE207B022803D00128BB +:1011200008D105F0C2EBF86B0A9905F0CEEE0398F2 +:1011300005F0CEEE0124002E27D03068C56D1C3896 +:101140000090A8780107890F1FD1000961D00228FB +:101150005FD00B287CD10D4F0124803FB87B012844 +:101160000BD0B86805F084EEB869002805D07D2161 +:10117000C9004143B86805F0B0EE30690028387BFB +:1011800037D1012864D10220387361E0206902C0A0 +:1011900040420F0040F800C03E5C0004FF4CA068D5 +:1011A00005F066EE207B052803D00428C2D105F0A7 +:1011B0007CEBF86B0A9905F088EEF848B43004002F +:1011C00005F08EEE6878297802020A432900203162 +:1011D000200005F08AEE039805F08AEEAAE70328BE +:1011E000A8D2401C607005F060EB0020FFF7D4FB34 +:1011F000A0E701282CD1B878401C0006000E022878 +:10120000B87025D8E878F7210840E8701BE0022480 +:101210001EE030690124002806D1E048017B042942 +:1012200016D10521017313E0DC49087B04280FD196 +:101230008878401C0006000E0228887008D8E978DB +:10124000F7200140E970009805F056EE0028DED046 +:1012500020009CE6F3B5A9B000260400CF4D04960B +:10126000C0350A96E86B05F0ECED0D90EF6B0021B0 +:101270000A001EA80E9706C01C21C94804F0BCEE47 +:10128000281F0E21279004F0F8EF20000D30209049 +:10129000607A217A0002084301D0C2490880BF4821 +:1012A000002620302690067160300B2206629201E3 +:1012B0004662B8184069FF3076B081140100000022 +:1012C000809000C000040000B96818626130467662 +:1012D000E86B801840698030017949084900017144 +:1012E000E86B80184069FD22803011400171E86B85 +:1012F0000122C168D2039143C1602698AC4946716E +:10130000052048730800B430259005F0F8ECA84893 +:1013100006222100CB3004F086EEA548E030249070 +:10132000A179C174E17901752498A17A8175E17A76 +:10133000C175217B24989E4C0176249821008676E5 +:101340002A98D1310D38E03423916DE1209E001FA1 +:101350002190F078B178020221980A4382427ED827 +:101360000F927078317800020843DD2878D012DCC3 +:101370002D2876D008DC002832D001283AD0032866 +:1013800001D13079607647E1302873D0482801D008 +:101390007F28F8D13CE1FF234B33C11A98427ED01D +:1013A0000CDCFF38801E7BD0092814D012282DD0E9 +:1013B0001E28E8D17E49307948732DE1032970D089 +:1013C00005296FD01429DED1269901204871F078C3 +:1013D000B17802020A432598311D05F090ED1BE11A +:1013E0002020202A00D810000206120E62742398D2 +:1013F000311D08E00E200E2A00D210000206120E47 +:10140000AA722798311D04F00EEE05E131000C316F +:1014100008226846229104F006EE01990098002700 +:10142000794078400843AED00822311D02A804F06C +:10143000FAED0399029879400843A4D05C48082249 +:10144000311D903004F0EEED594822990822983071 +:1014500004F0E8ED564E80367369326903E0E6E049 +:101460005EE0C3E006E0B069F169801A99417162FB +:101470003062D1E01700F2700022052004A901AB10 +:1014800007C305AA0092B01C0CAA0AA90BAB05F071 +:1014900042ED380AB770F0702699012003E09DE014 +:1014A00032E0B3E034E108712598310005F032EC08 +:1014B0000E980B218901401841696B4680310A79E9 +:1014C0001B7C52085200DB091A430A71D107A27C27 +:1014D000FB23490F1A400A43A2744169FD2280315F +:1014E00008796B4610401A7C5206D217521CD2075C +:1014F000920F10430871A17C8007C00FF722C00033 +:1015000011400143A17487E0209800221EA905F034 +:1015100006ED18AB587E60762498197E81767BE0C4 +:10152000301D05F000ED01282DD10E980B21890109 +:101530004718B869002805D10E98012105F0F6EC8E +:10154000002820D0B869DD2189004018092104F065 +:101550009EEE7078317800020843BA691B21490178 +:1015600052181075F078B27800021043BA69511819 +:101570004875F078B17802020A431049B8694018FA +:10158000311D04F050ED301D05F0C8EB032806D1E5 +:101590002699012008712598310005F0BCEB301D1B +:1015A00005F0C8EC012837D126990B22087107E015 +:1015B000A06802C0D85E02C0562201C076030000B7 +:1015C000E96B920189184969EF22FF316131487650 +:1015D000A17C102011400143A17419E01A20B070C1 +:1015E0000020F0702D20307000207070FF492D20F9 +:1015F0000877F078B278000210434877F078B17835 +:101600000202FA480A43311D1E30FCE6482080E001 +:101610002598310005F07EEB0F9921980F9A401A1A +:1016200020998918091D2091042800D38EE6207D79 +:10163000C10601D4C00719D021206B4618730220BF +:101640005873A07E8107607E890F04F0D8EF6B4647 +:101650009873A07E8107607E890F04F0D4EF6B46FB +:10166000D8732598042203A905F048EC0E980B21A5 +:10167000890140188069002807D0DD21DC4A8900F3 +:1016800041188018092204F0CEEC382110A804F08B +:10169000FEEDE86BD7491091D749D84E00271C9032 +:1016A00011913760C068C00418D40D98627C2399EA +:1016B000801D05F090E8002812D105F090EA320074 +:1016C000D36A926A801A99412CBFA5850100000057 +:1016D0007C9400C0000400000B7612AB7D223B001E +:1016E000D20004F062EF31008039096A814201D3EF +:1016F00001203060E86B05F02CECE86BFDF750FA48 +:10170000607E18AB1872A07E8107890F0007800FDA +:1017100059729872DF72E86BC068C004BD4806D584 +:10172000006905E07F203070000A70707AE7406938 +:101730007D23DB005843189005F0EAE800280BD120 +:10174000A07E18AB8006840F9A7A597A187A230003 +:10175000FDF72CFE002804D018AB187B4008400091 +:1017600003E018AB187B0121084318AB1873B7606E +:101770007760A949189840181790187B10210843E2 +:10178000187310A8169705F000E9A2490028886090 +:1017900000D001202BB0F0BDF7B506009D4D287894 +:1017A000002801D00020FEBD994C00204034E663A3 +:1017B00001216871964F2970F86068702873E8708D +:1017C000200096495222403004F036EC02990198EC +:1017D000FFF754FD002810D1210090480026522226 +:1017E000403104F02AECE06BFEF77FF820000C3863 +:1017F00005F07EEA0020287019E03868002810D033 +:101800008349E06B4B310F0005F0AEE8002808D1AA +:10181000012068713000FF30062239004A3004F0A0 +:101820000CECE06B0321FF304130012601723000E7 +:10183000FEBD774A10B5203AD1830323603A0528CC +:10184000137302D1FFF7F0F810BD07280BD10D2953 +:1018500009D1517B052906D1917B002903D10120B3 +:10186000FFF7AEF810BDFFF74BFA10BD694B06222B +:1018700010B51A731A006032D183FFF741FA10BD18 +:1018800070B5040062482038007F00281AD16069D2 +:1018900005F062EB5E4DE868002802D06069FFF752 +:1018A00086F90020E8606069002100F0F8F85848E7 +:1018B0004030C06BFF304130007A002802D1122046 +:1018C00005F046E8606904F054ED002070BD54480E +:1018D000008870474E49F8B520390400087F0E0093 +:1018E0005436002801D002280AD13000694605F09C +:1018F00028EA050002000099200004F09EEB1EE09B +:1019000048482071020A62710B7F0625DB1EC21E49 +:1019100005F032E8080D0D0A1A051008100A022019 +:10192000C04301E00120C0432080C88B04E00120B7 +:10193000228001E002202280A070000AE0703000C6 +:1019400005F0D6E92800F8BD0420C043ECE770B5E7 +:10195000040000293FD0200005F086EA210006009F +:1019600006227E3104F068EB0B208001251869699E +:1019700020222C31B01D04F060EB6869FB2220307E +:10198000C17A300020308171C17911406A6980329A +:101990001279D207520F1143F722C17111406A69BF +:1019A000803212799207D20FD2001143EF22C17117 +:1019B00011406A69FF326132527ED207D20E114362 +:1019C000C171E168C904C90F0172E06801214904CD +:1019D0008843E06070BD200000F02CF870BD10B5A9 +:1019E000040025D00B484079002821D00848403019 +:1019F000C06B05F03AEA0622210004F0F6EE13E08F +:101A0000BC5E02C07D0300002D8D00C0718E00C041 +:101A1000206902C0A06802C0102700003E5C0004DC +:101A2000562201C0FFFF0000002801D1012010BD97 +:101A3000002010BD002810B504D005F016EA2921B9 +:101A400004F0EEEA10BD1B4870B500250400C03458 +:101A50000570E06BFCF7DAFF00280AD00189164A0E +:101A600009180A70120A4A702A0A8D71CA71FDF7A4 +:101A700039F810486030007F00280FD10D480D491B +:101A800080304268E06B2831002305F06AEAE06BA1 +:101A90003F21095C4907C90F05F0FEE870BD002829 +:101AA00010B505D005480A000068482104F018EE7A +:101AB00010BD0000A06802C012800000F0F100C05C +:101AC000FEB5FF4D286904F068EB28690527017A07 +:101AD000FF01032912D1417A6F9928A90100000062 +:101AE000789800C0000400002B95BA21012901D08C +:101AF00002290DD11721490141180978032907D17D +:101B000005F04CE8002803D06868C019406906E079 +:101B10006868C319197C5A7C914204D3586906211C +:101B200004F030EFFEBD152252018218D48901263F +:101B3000002C04D0148A012C01D35E63EEE7138AD3 +:101B40005B1C138200222A726A72EA72CB00AA72AC +:101B5000591A2A73C91D6A734418AA732078009011 +:101B6000A0786178C2070098D20F05F008EA0190CA +:101B700005F008EA05F00AEA01980028C4D0A07927 +:101B80006179000208437D21C90041436868C0199A +:101B9000406905F000EA0328B6D1A078C00701D05B +:101BA000AE72FEBD00F038F80006000EA872F8D143 +:101BB000687A0028A8D0FEBD70B500F081FDC54D43 +:101BC000697A002923D0287A884220D2401C2872C2 +:101BD000A87A00280ED108E000F01EF80006000EDA +:101BE000A87207D1687AA04204D06C7A287A201AA9 +:101BF0000328F1DB00F074FD002808D06968052097 +:101C0000C0010818017C491C0174FFF763FF00F054 +:101C100060FD70BDB0487047F0B5002085B0AD4D97 +:101C200003906A6869218E5C0521AB7BC90151185C +:101C3000B34207D26C7B0F89BC4203D15B1CAB73F0 +:101C400000236B735323DB00D71809E063011B19D2 +:101C50006A33D35C002B14D0FE2B12D0641CAC73FF +:101C6000AC7BB442F2D39B4A6B7B0C89127BA342C0 +:101C700022D1887A00283AD0002A38D1012028734E +:101C800035E0AC7B896963011B196B33D4180029DB +:101C900003D0380003A905F05EE8904A13216B4693 +:101CA00007C322002869039B19E0687B401C687306 +:101CB000687A401C687217E08B7A002B17D0002AD4 +:101CC00015D18969002903D0380003A905F042E83D +:101CD000824A13216B4607C300222869039B002117 +:101CE00005F05CE90028E0D0002005B0F0BD01203F +:101CF000FBE7FEB5150000245669002A52D028895A +:101D0000002241198878000902282BD005281DD00F +:101D100008281BD00D2844D100273000029204F07F +:101D200046EA002801D00700BD375920C00032180C +:101D30003B00280002A904F042EE002832D0029AAB +:101D40000899280004F042EE01242BE06148436822 +:101D50000520C0011818027C0092089A300005F096 +:101D600022E9F1E700260320029204F080E9040052 +:101D700002D1607A002814D0200004F018EA00286C +:101D800000D06E465920C00022183300280002A956 +:101D900004F014EE002804D0029A0899280004F0F8 +:101DA00016EE00242000FEBD7CB50520C001494E82 +:101DB000140015180B0004F0EAED0C590707131E68 +:101DC000594159590E594159A86A7460210030612E +:101DD00005F0ECE84AE000F073FC00F098FC07E046 +:101DE00000F06EFCA86A7460306100F088FC1CE0B2 +:101DF00000F06FFC3AE000F063FC0120F07205F0A7 +:101E0000C2E80400694601A805F0D4E82002009960 +:101E1000001B04F038E9696AE031887600F060FC64 +:101E2000002805D0287C401C2874FFF753FEDFE70C +:101E3000707A3072102004F06AEDD9E700206861F2 +:101E4000152040012018C089002802D0686B0028A6 +:101E500004D15320C000201804F054EF6C6A200015 +:101E6000F63004F044EA01002000884703207CBDDE +:101E7000F0B505000C00174891B00769382102A899 +:101E800004F018EA0520C0012E18B06A0E9014481C +:101E900002901448089403901348049508AB0990E5 +:101EA000187D082108431875152040012C180B9443 +:101EB000387A002842D1F868C0043FD501A96846A5 +:101EC000FDF774FAE089012700281CD0307CC3009C +:101ED000181A0BE0F46902C0459900C0A19900C02E +:101EE000359B00C07F9A00C004E99B3201000000CE +:101EF000749C00C000040000ACC3B473A086010051 +:101F00004019017A019A914222D1C01D01226946ED +:101F100004F07EEC00281BD115E000240EE0E00068 +:101F2000001B4019017A019A914211D1C01D012272 +:101F3000694604F06EEC00280AD1641C707CA04253 +:101F4000EDDC002F04D008AB187D4008400003E012 +:101F500008AB187D0121084308AB187502A804F0EE +:101F600028ED11B0F0BD7CB50C000028009017D111 +:101F7000FF4D002C03D00120286000207CBDFF22F3 +:101F80009132582301A9684604F06AE9002803D178 +:101F90000220286001207CBD03200022130028605D +:101FA000F44900980D694561058928180190C57AA2 +:101FB000867A2D023543ED1885722D0AC5721030D0 +:101FC000047082711A0A037142710869009905F060 +:101FD00000E87CBDF1B515246401E64D686802197E +:101FE000D189002917D00526F60181194B6B002BEA +:101FF00011D0002313824B63B11F40180E2104F04F +:10200000B0ED68680119C9898902FFF73BFF69686B +:1020100089194861F8BD2869FCF70CFD0700F9D063 +:102020003889C61968680119097B012912D105216F +:10203000C9014018446A2000083004F062E9050034 +:10204000201D04F05EE9227C2B000021FFF78BFFAE +:10205000C94800E0C9483070000A3100707000982B +:10206000093104F08AE90020B071F0713800FCF702 +:102070004DFDF8BD10B5040004F042E900280ED073 +:1020800004F082E92100002004F076E9211D0020FF +:1020900004F072E921000C31002004F06EE910BD5B +:1020A000F7B582B004000E000325002962D0301D70 +:1020B00004F026E900285DD030000830070004F065 +:1020C00020E9002856D0317C002953D02070000A26 +:1020D0006070307CA070380004F012E90500301DFB +:1020E00004F00EE901002A00E01C03F0BAEF38000A +:1020F00004F006E9C11CFF20671814303870000A8C +:102100007870A078091DC000020AB8704018FA70F3 +:10211000002501900AE01320684308228119E80095 +:10212000C0191631001D03F09CEF6D1CA078A84269 +:10213000F1DC01982718FF202B303870000A7870E6 +:10214000A0784000010AB870F9700199091D45187E +:1021500000210BE013224A43480092191300C019D2 +:10216000D27F1F3302715A78491C4271A07888428D +:10217000F0DC03E0002020706070A070049800285C +:1021800002D03000FFF776FF2800B8E5FFB589B030 +:102190001C0016000F005721C900180004F094E835 +:1021A00000210A0002A806C00800714908605320F7 +:1021B000C0002018050004F0C0ED0520C001201863 +:1021C0000121089001810998012807D1361F3004A8 +:1021D000000C3F1D07900320207009E00722390002 +:1021E000200003F03EEFF61F3004000CFF1D0790A7 +:1021F000152040012618099900203173F0813082A2 +:102200000899486382E0F878B97802020A43101D01 +:102210000004000C0690787839780002FF23084308 +:10222000DB1CC11A98424ED019DC7F2858D006DC3E +:10223000002832D001283ED02D285FD150E0DD2883 +:102240004ED0FF38801E59D10590E11D380005AAF7 +:1022500004F082EE002004A9FDF7B2F84EE0482910 +:1022600038D00BDC082945D0102916D0212945D1BA +:102270000622391D601C03F0F4EE3FE04D2934D0F6 +:10228000C3293BD13979B1737879F073F0893C492E +:10229000884233D16420F08130E01022692100921D +:1022A000095D4B0159180A1923006A326933390054 +:1022B00004F092EE22E033483900221801200E2368 +:1022C00004F08EEE1AE05120C0002118380004F00E +:1022D0008CEE13E01A21B9700021F9702D2105E070 +:1022E0003900280004F034ED08E07F213970090A34 +:1022F0007970F5E7391D28002B5E1BF20100000004 +:1023000070A000C000040000A276191A04F01EEEAE +:1023100006990798401A0004000C079006983F1889 +:102320000798002800D078E70622601C02A904F074 +:102330007AEA002804D1FF220621601C04F076ED21 +:1023400001200DB0F0BDF7B500200D000521C90139 +:102350006C18607405E0401C0006000E0E286074C6 +:1023600006D2607CC100091A4919097A0029F2D104 +:10237000607C00282BD06920465D2A006A3200204C +:10238000012713E0582201C0F46902C00781000050 +:1023900006800000FFFF00007A02000041010918DA +:1023A000515C002901D0FE2904D1401CB042F5DB6C +:1023B000002E00D1A772EF480E21281804F0DAEBA6 +:1023C0000098A06202992800FFF766FD6061FEBDDB +:1023D00070B5060003F05EEE0500002415E0687A93 +:1023E00002280DD1280003F0E6EE002808D02800CE +:1023F00003F054EEFF30E130008AA04200D3040025 +:102400003100280003F0DAEE0500002DE7D12000AE +:1024100070BDF8B57D2105000901D7480E000022E6 +:1024200003F0B0EF2F0004000C37002808D1002281 +:10243000D2481100032304F0E6ED040014D0D04E7E +:1024400010202073202020812900200003F09EEF1F +:102450002089291D001903F09AEF300039009038C7 +:1024600003F094EF2000F8BD291D002003F08EEF4B +:102470003900002003F08AEF0020F8BD0189081818 +:1024800017307047F3B57D2109010700BA480E00E7 +:10249000002281B003F076EF040008D10022B74893 +:1024A0001100032304F0AEED04002FD0B44E02203F +:1024B000207320202518208120003030082103F0CF +:1024C000CEED012028720020687258202873002069 +:1024D00068730720A8720020E8720520C0013F1829 +:1024E000796A0020083103F052EF796A00200874FD +:1024F000786AE421123003F0B2ED2000FFF7BEFF4E +:10250000401B0299301A2438086002E0029800212A +:1025100001602000FEBDF7B582B00C00FF21994894 +:102520008C3103F0DCEE0520C001964E2018466287 +:10253000152040012518287B01280ED1200001A973 +:10254000FFF7A0FF311D03F022EF070031000198D3 +:102550000C3103F01CEF38000AE08A4803F0DAEE91 +:10256000002807D18748FFF754FF301D03F0D2EE53 +:10257000002827D083490C2070740498F63103F0AA +:1025800006EF0220FFF724FF06000320FFF720FFDD +:10259000B04201D2300002E00320FFF719FF96217C +:1025A0004000962800D80100E889002802D088421F +:1025B00000D301008A0202982100FFF7C4FE002820 +:1025C00000D00120EBE570B50500080011001A00ED +:1025D0006D4C0523DB01E3185B690026002B2BD132 +:1025E0002300FFF7DDFD002826D06848406A6030F0 +:1025F000417B00291AD0007B002817D0287A0028B8 +:1026000001D0012812D1E868C0040FD40020C10015 +:10261000091A09190A7A002A08D0497A890602D5C6 +:1026200004F0F4EC02E0401C0E28F0DB584A2100D4 +:102630002800FFF770FF0600300070BD017A032903 +:102640000ED1416980694830814209D14E4914391F +:102650000A7A487A824200D2087201208872C872CF +:1026600070470100484810B514380069F8F72FFB8F +:1026700010BDF7B584B000200F0046A10968039192 +:1026800045A106C90191404C3A4902926518891D3D +:1026900066187169002925D15721C900200003F06F +:1026A0001EEE02203081032020703878800705D18B +:1026B0000422280003A903F0DEEC2D1D08222800C7 +:1026C00001A903F0D8EC07223900E01D03F0D2EC99 +:1026D000FF220621601C04F0AAEB069A0498210050 +:1026E000FFF719FF07B0F0BD27480021143810B5D7 +:1026F0000068C94303F092EE10BD234810B51438AA +:10270000006803F050EE10BD0E86889E01000000A8 +:102710006CA400C00004000088F8B0831F490020AA +:1027200014398A7A002A07D04A7A0B7A9A4203D15E +:10273000C97A002900D001207047FF202D3010B544 +:1027400004F0C6E904F070EC10BD70B50125134C1F +:102750000526143C607A2072A5726068F601801923 +:102760004069002802D004F064ECE572FFF7D6FF60 +:10277000002808D060688019017C491C0174FFF7AB +:10278000DCFFFFF7C5F970BD7A02000038050004D0 +:102790006404000444070000C06C02C0086A02C060 +:1027A000F05800044D9D00C002040B160C121824B2 +:1027B0003048606CF8B58C46864600200400010065 +:1027C00076E06046457806781F682D0235437E0026 +:1027D0007F1CB6181F603580457806782D0235437A +:1027E0002E00FF3E333E17D0092E28D00F2E0DD0DD +:1027F0005F2E51D1C678877836023E434CD11F6890 +:102800007E00B6187F1C1F60358045E0C57886784D +:102810002D023543099EF7E7C678877836023E4396 +:10282000EDD0069D01262D68A640B543069E356075 +:102830000679A6403543069E641C35602CE0C678B8 +:10284000877836023E4302D00679042E14D31F68DF +:102850007E007F1CB6181F603580457806781F689B +:102860002D0235437E00B6187F1C1F6035804578E9 +:1028700006782D023543C2E7079D03272E684D00D9 +:10288000AF400095079DBE432E60009D0779AF4085 +:10289000079D3743491C2F60C678857836022E4342 +:1028A0007546AD1B2D1FAE4665462D1D7519AC46F0 +:1028B0007546042D85D2F8BDF7B582B001260029F2 +:1028C00000D00026049D012E02D0080004F0A0E8EC +:1028D000040030D0FF2098306B4698800820D880C4 +:1028E000E068C0041AD5200003F0EEEB07000C37B7 +:1028F0000422280001A903F0C8EBB86F6B460090D2 +:1029000018782D1D2870587821006870AD1CFF3193 +:1029100006224A31280003F0B8EBAD1DE27AA17A15 +:10292000200003F0DAEB040001D0012ED8D0049887 +:10293000281A0004000C05B0F0BDF8B50C00160014 +:102940001F0003F0B6EB2100FF393A3904D104002F +:102950000100E722920003E0041D01001D22520144 +:102960008D18002E00D02760FF30E130008A7D21D5 +:10297000C00103F0A6EB226864235A4301008018CB +:10298000401E03F09EEB2860F8BDF3B50020A1B017 +:102990000C001690FA4920220EA804F04EEB1020ED +:1029A0000D90219803F090EB0890219803F080EBB4 +:1029B0008F2105008900079040180C90E078A278DC +:1029C00001022800FF30CF300A34179420900B907A +:1029D0000AA8114309902198219A5923DB0020303D +:1029E000D2181F901E92219A0B200A3980011018CC +:1029F0001D9076E2179E0020091F18911990F0781B +:102A0000B178000208431899341D884286467BD865 +:102A10000799192040010818007A0028844614D02C +:102A2000002738000EAB08E07178327809021143B4 +:102A300042009A5A914208D0401C0D998842F3DB1B +:102A4000002F02D10120169041E270783278010205 +:102A50001143FF224232881A91427AD039DCC94AA6 +:102A6000881A914276D02BDCC74A881A914272D0DC +:102A700019DC3D2970D0FF39891E6ED107217046BF +:102A800003F01EEB0100280080301C900171F078EB +:102A9000B178020228000A43FF3021006D3003F0B4 +:102AA000F4EA00278AE003287ED00428E5D12078C4 +:102AB000002103F0CAED2178219804F0C2EAFCE17C +:102AC000012872D0022871D0032870D00728D4D1F1 +:102AD000CAE13A28FCD024DC1D2869D015DC052881 +:102AE00067D01C28C9D10B982178203081732178B8 +:102AF000C1731D9821784069403001751D98217877 +:102B0000406940304175D8E1EEE1282872D02F2885 +:102B1000B3D14320C0000422A266DD810100000081 +:102B200068A800C000040000A81B1809210028188C +:102B300003F0B4EACBE15228C0D0552870D0562813 +:102B40006FD05728A3D187212078890000284855C5 +:102B50000C9867D0FF306130017AFB221140890860 +:102B60008900491C88E16BE15DE043E19CE19DE166 +:102B7000F800C01B40191B90FF3061301A90017B98 +:102B8000F32211400173817B0322114381731C984E +:102B900001797D20000103F09EEA6E2800D96E20A5 +:102BA0001A99C873000A08741C9801797D200001E5 +:102BB00003F090EA1B99FF31713105E0A2E00CE0CF +:102BC00052E015E065E059E04870000A7F1C88700B +:102BD0001C980079B842CBDC79E10B982A30199027 +:102BE0001D982178406940300174617841746EE12C +:102BF0002078002802D004F032EA00E0FE201F997D +:102C00000876A877219804E04AE01F990A7E3821C7 +:102C10000A54C27A817A03F06AEA0028F5D156E1B3 +:102C200072E0BFE021E12078002811D121200001CD +:102C30002818817B427B09021143FF22C132914354 +:102C400062785207D20D11434173090A81733EE144 +:102C5000E81DFF30FA30417FC722114062785207E9 +:102C6000920E1143417732E1E81DFF30FA30417F87 +:102C7000FB2211402278D207520FF2E70B982C303A +:102C800019901D9821784069403081746178C17431 +:102C90001DE12100280004F0E6E900289CD003E1B2 +:102CA000F178B07809060A1402432198210004F053 +:102CB000DEE90028F3D12198007A03288CD1E0784E +:102CC000A178000208433649884285D1002004F0EB +:102CD000D2E92198052103F0C2EA2198082103F0E6 +:102CE000BEEA219980228031C868C3781343C3703B +:102CF0004869C1781143C170012004F0BCE9E6E0E5 +:102D00001690E4E00220FBE7112040012F1878889C +:102D10000006000E069003F09EE90590208800282A +:102D20000CD0012802D0022809D106E01A48062258 +:102D3000F0302100281803F0B2E9012078800698CD +:102D4000012853D17888002850D1F888C0074DD089 +:102D5000219F380003F0C2E90C30816F012911D1A5 +:102D6000F968C9040ED5002160308182380003F073 +:102D7000EEEA002806D0FF205130C15B0022380067 +:102D8000F6F7DAFEFA7AB97A380003F0B0E907000C +:102D9000DFD12BE06CF100C0320100002B010000FC +:102DA000FFFF0000A01C03F03EEE00280690A6D016 +:102DB000069803F094E90028A1D007000C3703F02F +:102DC0004AE905902178B96700290FD100206037C2 +:102DD000B882069803F0BAEA002807D006980022C5 +:102DE000FF304130018A0698F6F7A6FE059803F0F9 +:102DF00046E96CE01E980622210003F050E90B988A +:102E000006222100243003F04AE900F0AFFE00283A +:102E100005D1F94806220068210003F040E9219815 +:102E20000127007A3B00022800D100231D981E993B +:102E3000827B022003F0FAEA002848D0169746E089 +:102E4000607821782F000002E8370843F88004F00A +:102E500016E93881F078B17800020843022836D9A3 +:102E6000A178B972E078F87231E0FF306130017A10 +:102E70000422114389088900017228E004222100FC +:102E800006A803F00CE903F0E6E807007078327852 +:102E900001021143069B21980122FFF758FD21985A +:102EA00004F0F0E83800A2E7012029E7219A16A9EA +:102EB00004910999059219AA60466B46039407C3C9 +:102EC0002900089B209A0833300004F0E0E81998A4 +:102ED000002806D0F178B3780A021A43210003F0E3 +:102EE000DEE8F078B178000208431899179A091AB9 +:102EF000121D80181790042900D385E5280004F0DE +:102F0000CAE810AB188B23B0F0BDF3B50020CBB0EE +:102F100054224990B94934A804F098E80020309030 +:102F200014212BA803F0EEE9B62B97140100000042 +:102F300064AC00C0000400002F4D165B00210A00A5 +:102F400029A806C001201E9018A806C016A806C011 +:102F50004B9803F0CEE815904B9803F0BEE804219F +:102F600013918F2104008900401827902A20339064 +:102F700002203290E4203190002018AB1A90187A89 +:102F8000202108438106C90FF722C90010400843D9 +:102F900018724C984C9DC17880780B0203430A3B11 +:102FA0000A35002B10D0002033901E9013AA18A9C8 +:102FB00031A801AE07C632AA18000092290034AA2F +:102FC00033ABFFF70BFC49904C990A208870002026 +:102FD0000600C87048E1770034A838182B9002200A +:102FE00028AB12A918712C91587100212BAB8200CB +:102FF0002BAB995029AA1154401C0528F7D3002067 +:10300000129034A8C75BFF217131781A8F427ED0AD +:103010003CDC8049781A8F427AD015DC3D2F78D07D +:103020003800FF3830387FD0122846D110AB98894D +:10303000EE211290095B1982F221095B598214A9D1 +:103040002D9128AB98716DE0092878D0142834D1DF +:103050001E982A00012802D100209070D0704B9851 +:10306000290004F026E82D1812904B98290004F04E +:1030700024E810AB19892D180818001F12900020A1 +:1030800028AB2C902B90587118714BE028287AD0DF +:103090000FDC23287AD026285ED027280DD10622DF +:1030A00016A918A803F0DCEB00285CD12A00002147 +:1030B0005BE0382869D03A28D7D027981AAA303050 +:1030C0001FA90EAB07C323AA1BA91CA80BAB07C3E0 +:1030D0001DAA499828A9C37880781B02184308AB19 +:1030E00007C331AA279832A9E030007B05AB07C39C +:1030F00021002798FF31007F03958006C20F0492BC +:10310000159A12A80832CF312300029003E047E05D +:103110005CE054E008E001920091380029AA2BA954 +:1031200003F0CEEF002777E00120129003F0CCEF00 +:103130001D901DA810AB2D90188982E7FFE718227B +:1031400020000CA903F0C4EF28AB0028987101D02F +:103150000CA92D911290E5E7062028AB12909871EA +:103160002C48CD3029E02A0018A94B98FFF7B8FB6E +:103170000006000ED6D0002128AB2C912B9118719F +:10318000001F5971E6E712E000E02FE0022028ABB3 +:10319000129098714B9803F02CE81C901CA833E017 +:1031A000042028AB129098714320C00005E0012054 +:1031B00028AB1290987187208000201824E01620F8 +:1031C00028AB12909871200066301DE00420129008 +:1031D0002020005D1C901CA82D90022028AB082107 +:1031E00098711B911BA92E91D8719BE74B9803F006 +:1031F00010E801004B98007A032893D1202028ABD7 +:1032000012909871086C20302D908BE730F800C038 +:103210008CF100C055010000B8002BA94A90085855 +:10322000002809D0010029AAD25D280002F040EF51 +:103230004A9900202BAA505029A9C85D002802D025 +:1032400045190020C8557F1C052FE5D34C9810ABBD +:10325000C1788278080219891043091D40184C99D9 +:103260008870000A761CC8703398864200D2B2E695 +:1032700030984DB0F0BD10B514005204520CE40B60 +:1032800003D10B002C2103F05CEB10BDF8B504005A +:10329000080008300D000026009003F0CEEB002857 +:1032A00007D0817AA27A914203D1C17AE27A91421F +:1032B00001D00120F8BD03F06CED070020D0388963 +:1032C0002321C4192000217000990622093002F040 +:1032D000F0EEE878A978000208430E2801D1022018 +:1032E00003E0E87BA97B00020843E073000A207436 +:1032F000380003F066ED012803D1380003F06CE8D4 +:1033000001263000F8BD70B50D00012603F040ED38 +:1033100004000BD0208900190570200003F050ED47 +:103320000600012802D1200003F056E8300070BDED +:1033300010B501242121FFF72AA7C96B0100000065 +:1033400060B000C000040000E9DC491DE6FF002871 +:1033500000D10024200010BD70B50500012402F04A +:10336000C6EE192149014018007A002801D1022037 +:1033700070BD1F212800FFF7D0FF002800D10024D6 +:10338000200070BDF8B5050000263400771E202906 +:1033900004D0222904D02B2904D037E08D4C01E041 +:1033A0008C4CE41E280002F082EF002801D103F0CB +:1033B0009EEE03F044E800280AD0280003F0B6ECA3 +:1033C000002805D084490988002901D002F0EAEFDD +:1033D000280003F0A0EA002C19D02800FBF75CFBC2 +:1033E000050014D02889210A401904704170002179 +:1033F0008171C171082181700021C1702800FBF723 +:10340000B7FB012803D1280002F0F0EF3E003000A6 +:10341000F8BDF7B504000D00002702F068EE002D9E +:1034200002D0297B00291AD1FF21072249310A55F0 +:1034300019225201012180180026017203F05AEA74 +:103440006548008800280DD002F0B8EE012802D1AE +:10345000200003F058E9200002F0A4EF02E000276A +:10346000FF430126029801281CD12000FBF714FB22 +:10347000040017D0208957490019491E0170090A14 +:103480004170310A8671C171082181700021C170BB +:10349000297B01722000FBF76BFB012802D1200081 +:1034A00002F0A4EF3800FEBDFEB50600002001903A +:1034B000300002F01CEE8F218900441847490500B6 +:1034C0004718300002F01EEE0090FF204930805D6A +:1034D000002801D00220FEBD307A032804D1707A82 +:1034E000022801D00420FEBD00221100300000F0AF +:1034F00002FF20356878C007207F02D0EF21084006 +:1035000001E0102108432077B878F8703000F6F712 +:10351000E2FD01280BD13000F7F7B3FA002804D1FF +:103520000098007A8009012801D1052001901D2111 +:103530003000FFF7F2FE012801D00198FEBD032004 +:103540000190FEBDFEB5050001200E00002D01908A +:103550003DD00020019030727072F078B178000296 +:103560000843801CB0703700000A083734000A3462 +:10357000F070280002F0C6ED0C300090E868C0043E +:103580001ED57878397800020843401C3870000A4C +:103590002A00FF3278704A32211D200003F0AAED84 +:1035A0000098007DA072280003F080E8E072F078B7 +:1035B000B178000208430C30B070000A0C34F0708F +:1035C000EA7AA97A280002F0A6ED0500D1D1019887 +:1035D000FEBD0000B28000005C3A01C01D02000088 +:1035E00070B504000D0002F082ED200002F08AEDBB +:1035F0000121603001702100FF3104224A31200096 +:10360000FFF743FE002D03D124212000FFF785FEA4 +:1036100070BD10B50C00080002F068ED0522D20163 +:1036200000218018C1602000FFF7DAFF10BDF7B558 +:1036300082B017000298002602F064ED050002989F +:103640000399FF300C3506224A3003F014E90028B4 +:103650000DD128004030017D0126012902D1002032 +:1036600005B0F0BDC48A032C05D0022C03D038006D +:1036700003F044ED040000220092029A039902989C +:103680003B007E3202F062ED070003980078C0072D +:103690000FD1002F03D00120C003044307E0012E07 +:1036A00005D1012154204155029803F02CED4035FD +:1036B000EC823800D4E7F7B582B005000024FF3073 +:1036C0001700E4434A30039926000622019003F0D4 +:1036D000D2E800280BD1280002F014ED032160305D +:1036E000418001993A002800FFF7A1FF0600280059 +:1036F000FBF7D2F905001ED028894419FF48207035 +:10370000000A002E607001D1002000E00120A071AD +:10371000000AE0711020A0700020E07020000399E2 +:103720000622083002F0CEEC380AA773E0732800B6 +:10373000FBF71EFA00E02600300091E7F8B505001F +:103740000F0002F0E0ECFE6D565AD7EF01000000CA +:103750005CB400C0000400009C22B2A50400ED4946 +:10376000ED48B61DF7F75EFE3078C0070DD0603724 +:10377000787A332801D120241EE0342801D1222474 +:103780001AE036281ED12B2416E0603462883100FE +:103790002800FFF784FD2800FF30062231004A3060 +:1037A00003F072E800280DD1207801280AD12424E2 +:1037B00002E0012002F0DCEC21002800FFF7B7FD59 +:1037C0000128F6D00020F8BD10B5040002F0A4ECEA +:1037D00060300078012803D124212000FFF7A7FDE5 +:1037E00010BDF3B583B0060002F096EC050002F0C0 +:1037F00050EC0190C949C848F7F714FE300001F0B9 +:10380000FEFA300002F07CEC0321070009024018A8 +:103810000290007C3400803400280BD0E08803281C +:1038200008D10520C0013818C06802F0AAEC02993E +:10383000002008740120E080300002F0EAEC00284B +:1038400024D0300002F0F8EC696E0400002905D0A5 +:10385000300003F066EC0020686604E0207F012859 +:1038600001D3401E20772037207F397888420DD23F +:103870002000A0300100007C420707D5FB22104049 +:103880000874A068012149020843A0602800802133 +:103890000C3002F056ED002760204755300003F051 +:1038A00000E9049800280ED10B2080013418E0694B +:1038B000002808D0606940308189994802F028ECDE +:1038C000E860E7610BE03000FF3006214A3002F08B +:1038D000F8EBF068400502D4300003F026EC0198C4 +:1038E00002F0EAEBC6E670B50400008965690019CC +:1038F0002030417802780802104303F00AEC636933 +:1039000029000200FF314A311800FFF7C8FC0021EE +:103910002800FFF766FF002070BDFFB581B0FF21D2 +:1039200016005D310A9D280003F002EC040001D16D +:10393000401E9FE620892A00071959207E32C000C8 +:1039400029180092CB3220000B2303F0F6EB049AE7 +:103950000092029A01993300380003F0F2EB200044 +:1039600003F02EEB86E6F8B5050016002035EA7860 +:10397000AF78120200243A438A4201D00E241FE09D +:10398000032A04D1C078400601D4012418E01800AD +:1039900003F0DAEB002804D06878297800020843A5 +:1039A0000ED068782978FF2E05D10002084307D091 +:1039B000012805D003E000020843B04200D00D24E6 +:1039C0002000F8BD02894169101880318A884B694E +:1039D000C988C8E7F8B50E00018947690D18380095 +:1039E00002F09AEB380002F08CEB040001208037E3 +:1039F0000521C901F8806018C06802F0C2EB0322FB +:103A000012020021A018002E01740AD129202900D9 +:103A1000000180222831201802F036EF002800D063 +:103A20000F263000F8BDF8B50D00060002F074EB6B +:103A3000300002F066EB0321090241180A7C002ADB +:103A400002D00020C043F8BD032386229353A32253 +:103A500092008418121D80182860012008742068C4 +:103A600002F08EEB002200922E4A2F4823003100F4 +:103A700002F0AAEC286803F06CEB0020F8BDF3B567 +:103A800085B00024059803940294018945690E18B5 +:103A9000280002F042EB6030049000780927BF0153 +:103AA000032808D1280003F058EB002803D0E819B8 +:103AB000C06A00286FD1280001F0A1F9F078400613 +:103AC0001AD5EF19786A002865D00100083162D054 +:103AD000807CC0075FD00698403002F04EEC018831 +:103AE0000023603101807A6A0699083205A803F044 +:103AF00038EB002800D10F24203670783178070287 +:103B0000F0780F43B17806020E43002C12D10DE07D +:103B1000B580000022222222CCCCCCCC1111111174 +:103B2000B80B000020A1070027B300C00598FFF7DD +:103B300049FF04008620405B032809D10598210035 +:103B4000FFF748FF04000127032600280DD103E0FA +:103B5000002C0AD1002F03D1A41ADA4B0100000077 +:103B600058B800C000040000BCC11A2F04990220FC +:103B7000087004E0280003A9FFF75FFF0290029895 +:103B8000401C0AD0761C3104039B090C220038002B +:103B90000095FFF7CCFE401C01D1002102E0002C73 +:103BA00003D001212800FFF72FFD07B0F0BD000072 +:103BB00010B503F0E4EA03F0E6EA10BDDB488068E4 +:103BC0007047DA498860704708B503F0E0EA0020E2 +:103BD000694603F0E0EA03F0E2EAD549009888423A +:103BE00001D0002008BD012008BD0300CF490020FE +:103BF00000B502F01CEF070507090B0D060F0600C4 +:103C0000CC4800BD086800BDCB4800BDCB4800BD16 +:103C1000CB4800BD486800BD704710B500F064F99E +:103C200003F0C0EA012003F0C2EAC049C8600020E6 +:103C300010BD002211001000130010B502F02EED8F +:103C400003F0B8EAB948C068C26BC16ABD480068F1 +:103C500003F0B4EABC480168002903D101210160E6 +:103C60001FF0BFF803F0AEEA03F0B0EA03F0B2EAE7 +:103C700002F088ED02F08AEDB549B4484861B448D5 +:103C80004030426880231A434260426843061A4328 +:103C900042600A6900220A6182600168026002F0E3 +:103CA00002EA040003F09AEA03F09CEA03F09EEAB9 +:103CB000200002F00CEA02F0CEEB042003F09AEAB6 +:103CC00003F09CEA002010BD10B5002486B003F07C +:103CD0009AEA03F09CEAFBF750FB00220621200041 +:103CE000FBF74FFBFBF79FFB03F094EA03F096EA28 +:103CF00098480190984802909848039098480490FA +:103D000001A803F090EA03F092EA03F094EAF5F7D1 +:103D1000D3FE03F094EA002002F058EE03F092EA9A +:103D200003F094EA03F096EA03F098EA01F0C2FF88 +:103D300003F098EA03F09AEA040000227B4800921C +:103D400040690822012105AB03F094EA200006B087 +:103D500010BDF0B5042185B0029101910188814A1E +:103D6000002491427BD001221203914206D17E4968 +:103D7000082401800221029101910DE001225203E9 +:103D8000914202D17949042405E00122D2029142F4 +:103D900002D17749102401800188764AAC31118024 +:103DA00001880839018005E0280002F090E901202F +:103DB00002F0E8E902F076E905006F4802F056EDFE +:103DC00006006D48082103F05AEA07006A481021EE +:103DD00003F054EA38188642E6D1684E0022306873 +:103DE000412102F0D8EC6649634803F04CEA61488F +:103DF0002706018863483F0E8180877162486149C8 +:103E000002680092614A5C48614B03F040EA102C62 +:103E100005D00120032C00D960080406240E029965 +:103E20002200002003F036EA3A000021012003F0CE +:103E300032EA3A000021022003F02CEA0199220024 +:103E4000032003F028EA03F02AEA280002F03EE902 +:103E5000042003903068422103AA02F09CEC05B0D4 +:103E6000F0BDF8B500254B4F3E684B48064003F0C7 +:103E70001AEA0090386801210907884338603868D9 +:103E800046490843386003F012EA03F014EA0024BC +:103E90002D49A000103108588047002800D0012586 +:103EA000641C0A2CF4D303F00AEA03F00CEA3C4841 +:103EB000006803F00CEA3B48006803F008EA3A485F +:103EC000006803F004EA38683349C94308403043C6 +:103ED0003860009803F0FEE903F000EA2800F8BD1E +:103EE00032480009000170473148612110B502F0E5 +:103EF000F2E82F4C0C205034A0720020E0722C48C5 +:103F000001220178114301700179202211430171CE +:103F1000012002F0E4EE274800882072000A607257 +:103F2000FF2120001030017010BD00005C2201C094 +:103F300058303338000000C0006E01C0007601C068 +:103F4000001602C0F058000414FA00C0BFA8129E68 +:103F500000A500804CF800C050F800C048F400C034 +:103F600054F800C0FFFF000044A9FBAB01000000B3 +:103F700054BC00C0000400003B97147D880E000074 +:103F8000101D00004407000026F400C06404000473 +:103F9000F0F100C02B11000070040004E8F400C030 +:103FA000704F0004008002C0002800800030003004 +:103FB00000300020E003000448F800C0E47C020068 +:103FC00008D101C03A5C00048020008010B50400D4 +:103FD0000A2102F08AE87F20207008206070A07813 +:103FE00001210843A07010BD4A2101700E214170CB +:103FF000142100228170C2700A22027100224271D3 +:10400000FF222D328271120AC271C822027200226E +:1040100042720A0A8172C27205220273002242733E +:104020008173090AC1737047F0B5050089B002F0C9 +:104030007CE80400280002F084E80700002C7ED011 +:10404000002F7CD02600FF361020E136B073300000 +:1040500020221238FDA103F050E9642030820120B3 +:10406000F073FF483083401E7083072030777077ED +:10407000FC4E2000FF3031680622F33002F040E8A9 +:104080005920C000316828180622060003F010E805 +:10409000287A0123022800D100230B208001281850 +:1040A0000890827B3100022002F0F2E9E01DFF302F +:1040B000FA300790417F11234A08520006210A4333 +:1040C0005B010121E3181970C177C7210A404277CB +:1040D000212000012018817B427B09021143FF222D +:1040E000C13291434173090A8173200080300B2152 +:1040F000069001716221EC3002F036E90026F320CF +:10410000CF212EE0F000801B00190590FF306130B8 +:10411000711C04904173017BC322890889001140FE +:104120000173817B032211438173069801797D20FD +:10413000000102F002E86E2800D96E2000E0E7E0FE +:104140000499C873000A0874069801797D2000015B +:1041500001F0F2EF0599FF3171314870000A761CC9 +:10416000887006980079B042CCD820000E3002F05A +:104170004CE90021FE202177A077E1772A7A0820F8 +:1041800020221055A0180390817001214170E12078 +:10419000C0002060297A032901D0FF20913060609F +:1041A000200003F0AEE84B20C000201803F0ACE87C +:1041B000092080012018017EDF221140079A527FDA +:1041C000D207D217521CD207920E11430176E97A18 +:1041D000287AF5F793FDE66F002E11D008365421AA +:1041E000300002F0C2E80320B071F0790421000928 +:1041F0000001F07148208155B07A40084000B0724B +:10420000200003F086E803984078C00906D006989D +:104210000068002802D0069803F07EE80126666454 +:104220000798FB2206771D204001201801791140D4 +:1042300089088900491C017120004830029003F070 +:1042400070E8E01DFF30FC30FFF7CEFE86482018F6 +:10425000FFF7BCFE2000283066620021019003F0C9 +:1042600064E8FF20693006510198310003F060E8EE +:1042700020008021E83002F078E820000222E030BF +:10428000C2810682418AB14391434182FF200026C8 +:1042900065300655100002F0D8E8A84205D1280084 +:1042A00003F04AE8290003F04CE806207872387AD7 +:1042B000C3218008800008408006800E387239686B +:1042C0001120400109184E803A681421121891807B +:1042D0003A6803211018C18007983B0086612100CD +:1042E000029A083364312000F5F748FDA17F382099 +:1042F0004155E868FF21491C88434034E8606680E6 +:1043000007980121468208984069FF304130818139 +:1043100009B0F0BD70B5050001F006EF04002800FB +:10432000FFF782FE200001F0FCFC200003F00CE807 +:1043300070BDF8B50C0005001100002C60D0200005 +:10434000FF3006224A3001F0DCEE280080302100E8 +:10435000C2698031CA612B00A03322001E78A032CE +:1043600016709E7896705E785670DB78D370FF2258 +:104370004932535D13552200507BDEAD0100000031 +:1043800050C000C000040000A1AA40FD203213006C +:10439000527EF72632403926765D04273607F60F1F +:1043A000F60032435A7609239B01EE18B446766A2A +:1043B000E3185E62E668BE43EF687F07FF0FBF0049 +:1043C0003E431027E660BE43EF68FF06FF0F3F0144 +:1043D0003E43E66007690F6187698F61C768CF60F8 +:1043E00040694861FF20401C8643E868C005C00F53 +:1043F000000206431007E66002D56046C06AD86234 +:10440000200001F0A8EE0600280001F0A4EE0089CB +:10441000308111E02C00280001F09CEE417A06006A +:104420000B2080012018426911734269317A51735F +:1044300040698906890E4173200001F080EE050075 +:10444000E068C0218843E0600E2220000C36A918E5 +:104450004A3001F060EE2000297F803081800FE03B +:104460004D617276656C6C204D6963726F204150AE +:10447000000000002B09000030F800C02E020000F0 +:104480000121C18060380090417E102211434176A5 +:10449000FF302B4921300180418000210F22818093 +:1044A000827101822900FF310622F331C23801F006 +:1044B00032EEE06840051ED50B20800120184769C8 +:1044C0002900FF3138002022CF312C3002F01EEFBE +:1044D0002800FF30E130827B2B21CA55018A40370A +:1044E000B981C17BB973018B3982418B7982017F9C +:1044F0003975407F7875E068012109038843E060E1 +:104500000720C0012818C069306000205421885558 +:10451000B0676036B0820098A97F0176F8BD8C2123 +:10452000017012214170982181702421C170B02145 +:10453000017148214171602181716C21C171704705 +:10454000FFFF000070B50024022001F090EE032070 +:1045500001F08CEE032001F0EEED002826D00020C3 +:1045600001F07CEF05000221032001F090EE00280D +:1045700005D10321080001F08AEE002800D00124B3 +:10458000287A002802D1002C12D00BE003280FD18A +:10459000002001F0D0ED002806D0FF304130007A35 +:1045A000042801D1012070BD002C01D0002070BD75 +:1045B000FF48006870BDF8B50D00160001F05AEE16 +:1045C0002D1D361F04003604360C89E0A878697862 +:1045D00000020843C01C2B7807043F0C00209B1EE0 +:1045E00002F038EA10150939581A4E5D537A2F72C5 +:1045F0000E7A4962687A3A0029002000BA3003E056 +:104600003A00EC48290053E001F084ED5EE03A0006 +:1046100029002000AC30F7E720003A002900C33021 +:1046200001F078ED20003A002900CB3001F072ED66 +:10463000206801214904084304212060C820015555 +:1046400044E020003A002900D73001F064ED042155 +:10465000DC2001553AE020003A002900D33001F077 +:104660005AED2000C030827DE978D207D20F490090 +:104670000A4382752AE0CF483A002900543017E0F7 +:10468000CC483A0029007D3012E0CA483A0029009F +:10469000AC300DE0C7483A002900A73008E0C54813 +:1046A0003A0029008A3003E0C2483A0029009130DC +:1046B0002018A9E720003A002900CB3001F02AEDAC +:1046C0000421D020015501E0012805D02A780120DD +:1046D0002168904001432160ED19F01B0604360C5F +:1046E000002E00D072E7F8BDF7B588B00D0001F0DC +:1046F000C2ED0600AD1DB0490422280001F00AED0C +:104700002D1D0424002701203168B840014259D0F2 +:10471000BB1E02F0A0E91012093F991B6B999999F1 +:1047200031991F99587A8F9931000922BA3128009E +:1047300001F0F0EC0935093484E031000522AC3198 +:10474000280001F0E8EC6D1D641D7BE008223100BB +:10475000C33172E03F20000130180790017BC07A1E +:104760000A0202439348D21C3118280001F0D2EC0F +:104770000798017BC27A5AE03000C0300690028B65 +:104780003100D21CD73128000017ADBC0100000059 +:104790004CC400C0000400008B24E96401F0C4ECA8 +:1047A00006983AE0ED1C12E03000C0300590807DA4 +:1047B0003100400801900598D331828A2800D21C2C +:1047C00001F0B2EC0198ED1C28700598808AE41C79 +:1047D000451900190404240C40E011208001301810 +:1047E0000490017CC07B0A0202437748D21C5430FB +:1047F0003118280001F098EC0498017CC27B20E07D +:104800002320400130180390028B6F48D21C7D306A +:104810003118280001F088EC0398008BC2E72520AE +:10482000400130180290017AC0790A0202436648BA +:10483000D21CAC303118280001F076EC0298017AD5 +:10484000C27908021043ADE708223100CB312800BD +:1048500001F06AEC083508342404240C7F1C3F0660 +:104860003F0E132F00D258E70A9804800BB0F0BD1A +:10487000F8B504000F00150000265021100001F0CB +:1048800088ED66E041780278090211430A02090ABC +:104890000A434F4B1204120CD11A9A4231D019DC40 +:1048A0004C4BD11A9A4238D00ADC4B49511830D0BF +:1048B000062928D007292ED00F293BD12C6339E0B7 +:1048C0000F292CD011292ED012292AD0282931D1F4 +:1048D000AC602FE00C2918D009DC012917D006297B +:1048E00025D0072921D0092924D16C6022E00E2986 +:1048F0001FD00F2903D019291CD1EC611AE02C60BC +:1049000018E0EC6016E02C6114E06C6112E02C629F +:1049100010E06C620EE0AC620CE0EC620AE06C63EA +:1049200008E0AC6306E0EC6304E02C6402E0AC64F5 +:1049300000E0EC64C1788278080210430102000AAA +:1049400001430804000C3118091D0E04360C24180C +:10495000241D2000BE4295D3F8BDFFB587B00C00E2 +:104960000521090229204001611820180591210024 +:10497000069025202700A031160000254001C037F1 +:10498000201803900A98049162E1009670783178BB +:1049900003020B43FF218831581A8B4279D00ADC7D +:1049A000FF3B7D3B02F060E80B818E9AA8AFB5C15A +:1049B000323232CC32001B286CD03ADC09286AD063 +:1049C00025DC0BE068FA00C0FA0300006016320034 +:1049D0003B10000012100000FEEFFFFF07286FD011 +:1049E000082813D1F079B179FA4A000208439042BD +:1049F00067D1717A307A090201439142F8D1069960 +:104A0000002088720598C2620598026315E1192892 +:104A100071D01A28FAD1049A032090762200062039 +:104A2000B032D072002010730622311D2000BD303C +:104A300066E01C2878D01D2814D01E282CD02028F1 +:104A4000E4D123204001201807220190C275E248DA +:104A50000622311D201801F068EB01980621018320 +:104A6000802020E0DC48F278B378803812022018E9 +:104A70001A434270120A82700D220270F278B378E3 +:104A800012021A43311DC01C01F04EEB01204003FD +:104A900009E07CE00EE1CAE00399307908710398DF +:104AA0007179417120200543C7E0707931790002A6 +:104AB0000843A081F079B17900020843E081BCE0AD +:104AC0007FE094E0A06832794108707949000002E3 +:104AD0001043C007C00F0143A160AEE020000622D2 +:104AE000311DB43001F020EB049903204874049880 +:104AF00006214182A1E0B0E020000822311D1430DF +:104B000001F012EB99E070793179000208432082BC +:104B100093E00420F874B87D3179C007C00F4900D4 +:104B20000843B8751020BEE7D1E00499022008734D +:104B300004983179C1730498717901740420B2E743 +:104B40000620F870307AB872F0797872200003226B +:104B5000311DC63001F0E8EA04203872F078B178EF +:104B600000020843B880079801F0F2EA079801F0C4 +:104B7000FCEAB97A417207980B22920180184069C9 +:104B800001730798052101F0B0EB40208BE711205D +:104B9000F872307AB874F079FCD3B14501000000A6 +:104BA00048C800C000040000ABC741EE7874200084 +:104BB0000322311DCE3001F0C2EA04203874F078AF +:104BC000B17800020843B8810798052101F096EBFF +:104BD0000120400471E70920C0010821201801715B +:104BE0007179327909021143C171090A0172F179AF +:104BF000B279090211434172090A8172FF20401CF7 +:104C00005BE7717932790802069910438872F1796D +:104C1000B2790802059910430828C86206D0802896 +:104C200006D0FF38401E07D1052002E0012000E039 +:104C30000420059908630AE0717A327A0802104369 +:104C4000F7E7707931790002084306998882009865 +:104C5000361DC178827808020A9910438619081A0D +:104C6000001F0A90002800D099E6280008E65F4857 +:104C700029212C38201801F056EA112080010F213B +:104C800020188173F178B27809021143C173090ABF +:104C90000174564806222938311D201801F04EEAC9 +:104CA0005248202123382018029001F03CEAF07885 +:104CB000B17802020A4331000298921F0A3101F0D2 +:104CC0003EEA0120C003F8E6039A092090714748A4 +:104CD00006222F30311D201801F030EA0120400259 +:104CE000EBE603990020C87303993079887403991F +:104CF00001200882E1E6F8B5002406000F0001F06B +:104D0000CEEA0500F878B9780002084379783A7855 +:104D1000090211430838000409063A00000C090E84 +:104D20000832EA2905D0EB291ED0EC2968D00120F1 +:104D3000F8BD5178137809021943801E03041B0C37 +:104D400001290AD1921C29003000FFF710FE00282B +:104D500056D00121A868490242E0002950D10A201A +:104D6000B8700020F8704BE05078117800020843CA +:104D700001283FD1D0789178000208430106090E3E +:104D8000012905D1300002F002EB06E0012437E0F2 +:104D9000002905D1300002F0FEEA0128F6D02FE00C +:104DA0000C2908D1300002F0FAEA0128EED01049AF +:104DB0000020086024E0022903D1300002F0F2EA6A +:104DC000EBE7032903D1300002F0F0EAE5E7072919 +:104DD00016D0082914D0092912D1A8680121890206 +:104DE0000843A8600CE00000FFFF00007A04000008 +:104DF00068FA00C0002803D1707A9070000AD07061 +:104E00002000F8BD70B5040001F0ACE9092189016A +:104E100046182021095CF2698A4201D3002070BD46 +:104E2000C52292002021801802F0C4EA2500FF3537 +:104E3000000600214135000EFF2829820FD0401CBA +:104E40002882E068012109030843E060F069401C02 +:104E50000128F06103D14421200001F0D4ED288A1B +:104E600070BDFEB5040001F046E90190E068C004A1 +:104E700003D4019801F052E9FEBD200001F07EE963 +:104E800005002000F6F78AF909208001261800277E +:104E9000882037634751E0680121C9038843E060F7 +:104EA000706B01F0A0E901212000776302F086EA2F +:104EB000E0680121090327008843FF374137E0609C +:104EC000398A00290CD000222000F4F785FE2868DA +:104ED000C5213A8A89004018521E202102F072EA48 +:104EE000002038822968092080010818C169132729 +:104EF000491EC161280002216030017040787F01A5 +:104F000000280AD12868C0194178491E0906090EEF +:104F1000417002D1200002F05AEA200020300290B5 +:104F2000807F80060AD42868C0198178491E090646 +:104F3000090E817002D1200002F04CEA0298C07F75 +:104F400040070AD42868C019C178491E0906090E0D +:104F5000C17002D1200002F042EA28682030407877 +:104F6000010701D4800606D5F06A002803D001F0BD +:104F70003EE90020F062286820304078C0090DD05A +:104F8000F06A00280AD09B208000201802F0E2E995 +:104F9000E06810218843E06000207062E068022130 +:104FA000400840008843E06083A3346D01000000A6 +:104FB00044CC00C0000400002C914FBC300001F034 +:104FC000E4EE200001F024EA280024303C2101F026 +:104FD000F4E92968092080010818C069002803D174 +:104FE0004321200001F018EDE068800605D4286810 +:104FF000C0194179491E41714BE020006030C178F1 +:10500000890704D42968C919CA79521ECA71C1789E +:10501000C90604D42968C9198A79521E8A7100798F +:1050200040060BD52868C019017A491E0906090EE9 +:10503000017203D101212000F5F755FB2600002560 +:10504000FF364A36310028006A46FF4B02F0D4E9A9 +:10505000012808D12900300002F0D2E900222900FD +:10506000300002F0D2E9F94A3100280002F0D0E91C +:10507000012809D12A003100200002F0CEE90122E6 +:105080002900300002F0C0E96D1C2D062D0E082D00 +:10509000D8D3200001F07CE9E06820218843E0605B +:1050A00020001C21613001F048E8200001F05CEE96 +:1050B000E9E670B504004569008906192800FFF784 +:1050C000DAFE2900FF3105224A312800FEF723F9D4 +:1050D000320001212800062301F00EEF200001F02C +:1050E000ACEF70BDFFB581B004001E000A9F01F057 +:1050F00050E80500200001F040E824353C2128005C +:1051000001F05AE9039A029933002800009702F04F +:1051100088E901202035287605B0F0BDFFB589B0BB +:105120002D2000250F00139EED433080099801F0DB +:1051300030E80890099801F020E8040009988030D0 +:10514000406902F03EE8002802D1002F4AD108E071 +:10515000002F03D10C990B98084302D100200DB009 +:10516000F0BD092189016018007EC00623D52120E9 +:10517000005D010701D481061FD52700E037B87A0A +:10518000230007908033D86E0022089E0690059277 +:105190000C990B9804910390F98922002132029214 +:1051A0000191986E24360090069B079A0998310069 +:1051B00002F03AE907E0002514E0810706D50B98D4 +:1051C0000028F8D00C980028F5D00BE0C00909D0D1 +:1051D00012993200200002F02CE9002802D00020B1 +:1051E0003080E8E72800BAE7F3B504000020B5B046 +:1051F00006000990200000F0CCEF0690200000F09F +:10520000BCEF05008F2080002F180698FF210C307E +:1052100007909131200001F0C8EF2100FF314A31A1 +:1052200000283491279008D1349905222000FEF7F8 +:1052300072F80020C04337B0F0BD279822000089E3 +:1052400027997E320092401828905920C0002118DA +:10525000349A2798012301F0ACEF289800212030E0 +:1052600033908170C1702799AC20088136992898B5 +:1052700025AA26AB02F0E0E8079840303290017D85 +:105280000B2080012018032931904AD1200001F021 +:10529000A0EF002845D00920800120183090C06A76 +:1052A00000283ED033991E2088700020C870382610 +:1052B0006B4605271E7203205F7298727D2002AD37 +:1052C000E91CC00001F0D0E828983B00AA1C31007E +:1052D00002F0B6E8289A01212000062301F00CEE26 +:1052E000279801F0AAEE3098406B002817D19D2036 +:1052F0000022800023180092554A5648210001F0F0 +:10530000A0E83198002140698030C288200002F076 +:105310009CE8319840698030C188491CC1800020D8 +:1053200089E72699259810AA00F03EEF0FAA09A94F +:10533000019200912A00269028980E3210A90AABFB +:1053400002F086E8002839D108AB1B7F002B04D07F +:10535000289832210CAA02F074E8319810A9436908 +:105360002B20C25C0092269A28982C3302F074E815 +:10537000002823D1369A23980EA96B4607C3200034 +:10538000129B1C9A2299FFF7C9FE401C02D16B4662 +:10539000188F17E0FF201130C05900287ED1079BDD +:1053A000686C1C3300281FD03A00303200923699C6 +:1053B000289810AA02F054E82B578FE6010000004D +:1053C00040D000C000040000EA0010FA002808D015 +:1053D0002798FFF778FE38E733998870000AC8707D +:1053E000F6E7686C012809D11D98002806D02A002C +:1053F000289866323D21162302F02CE82800203040 +:105400002F902E904078C00907D02398239A437894 +:105410002898921C442102F01EE8686C01281AD1D9 +:105420001D98002817D038002030017902290AD0B1 +:10543000807C800707D5EA1DFF322898FE324A217A +:105440000E2302F008E8232000012A1828987F2163 +:10545000082302F000E8686A012807E07C80020067 +:105460001C80020040420F009F1A010009D11398CE +:10547000002806D02A0028982A32DD21182301F0BE +:10548000EAEF2000FF3041302D90008A002807D13C +:105490002000FFF7CBFC2D980126008A00282FD092 +:1054A0003398C1788278080210433DD1200000E093 +:1054B00026E000F0F4EE002836D0200000F002EFE5 +:1054C00003902498002803980BD0017F2F98007830 +:1054D000814215D23699200001F0D0EF07998865F6 +:1054E00010E0007F0399401C0006000E08772F99FA +:1054F0000978884206D9012802D30399401E08770B +:105500000C2069E703982F99007F097888420BD314 +:1055100003980422A030017C114301740398D10147 +:105520008068084303998860289A01212000062397 +:1055300001F0ECECE0680221400840008843E060A4 +:105540002E994978CA0708D1890709D5E96F0A0059 +:10555000083205D0897CC90702D003210843E060E6 +:10556000686A012829D11398002805D1686C0128A0 +:1055700023D11D98002820D00121200001F0F6EC55 +:10558000139800281DD0079813996030097AC173C9 +:105590001399097A01741399097A4174FF206930CB +:1055A0004059012805D11398007A000701D0012045 +:1055B00000E000203199486003E00021200001F064 +:1055C000D6EC2D980321008A89030843339908718A +:1055D000000A487132980321017507990020087567 +:1055E000200001F0E0ED339900208870C8702000A1 +:1055F000696C613001292C907ED11D99401E0029D3 +:105600002B900ED1012E04D0002E43D1E0688006ED +:1056100014D538002030417A491C41721D98002869 +:105620000AD0002E21D1E068800607D4380020304F +:10563000417A491E417201E0002E13D12B98C078A7 +:10564000C0060FD4E06880060CD51D98002804D051 +:1056500010A801F018EF002804D038002030817A1B +:10566000491E81721D98002814D010A801F00AEF7D +:1056700000280FD1012E08D0002E0BD12B98C07816 +:10568000C00602D4E068800604D438002030817A55 +:10569000491C81722B98C078800711D4E06880067D +:1056A0000ED5002E0CD11D98002804D010A801F0B2 +:1056B000EEEE002804D038002030C17A491EC172B5 +:1056C0001D98002839D010A801F0E0EE00280FD175 +:1056D000012E08D0002E0BD1E068800603D52B9850 +:1056E000C078800704D538002030C17A491CC172C7 +:1056F0001D98002821D000E059E01D98C078400690 +:105700001BD5012E08D0002E3BD1E068800638D58D +:105710002B980079400634D438002030017B491C96 +:10572000017306981321006849014018007A012886 +:1057300003D100212000F4F7E0FF002E1ED1E06825 +:1057400080061BD52B980079400617D51D98002898 +:105750002DD01D98C078400613D438002030017B2E +:10576000491E017306981321006849014018007A08 +:10577000002803D101212000F4F7BFFF1D98002865 +:1057800015D03900303110A801F084EE10A801F0D6 +:105790007EEEC007010EE06880229043084360213E +:1057A0000843E0601D992C981C2200F0DCECE068B6 +:1057B0000022800600D52C9A009208AB19790022AD +:1057C00013000AA800F0A2ED029182360100000049 +:1057D0003CD400C000040000211E4F00089008AB1C +:1057E00019795820015520000E224A300AA900F0EC +:1057F000C4EC0899200001F058EA200000F0ECED1C +:10580000200001F0E2E9200000F032EE3800203004 +:105810002A900179200020300229299002D1329863 +:1058200041757EE010A801F044EE002812D0002E51 +:105830000ED13298407D00280AD12A982A994079C1 +:10584000401E0006000E487102D1200001F0DCED80 +:10585000012014E0012E05D0002E0FD13298407D9A +:1058600000280BD02A982A994079401C0006000E87 +:105870000128487102D1200001F0C6ED00203299C4 +:105880004875369801F018EE00280ED0002E20D171 +:105890002998807F80061CD42A982A998079401EF6 +:1058A0000006000E887114D110E0012E05D0002EE4 +:1058B0000FD12998807F80060BD52A982A99807964 +:1058C000401C0006000E0128887102D1200001F062 +:1058D000A0ED369801F0F4ED00280ED0002E20D176 +:1058E0002998C07F40071CD42A982A99C079401E65 +:1058F0000006000EC87114D110E0012E05D0002E54 +:105900000FD12998C07F40070BD52A982A99C079D2 +:10591000401C0006000E0128C87102D1200001F0D1 +:105920007CED200001F0D0ED02000121200001F00B +:10593000D0ED200000F040ED3699299820310A780A +:1059400082774978C1773398397F0170797FFF2753 +:10595000417091373A002D2304A905A800F00CED01 +:1059600000282CD0049E05981836301A3F1A3100B2 +:10597000280001F0B2ED0004000C391A0B043718AE +:1059800036981D14417800780A02024336992B009C +:10599000380001F0A6ED291A0B043D1828991B14B4 +:1059A0000622280001F09CED04994019801B8872A2 +:1059B000000AC872059A3499200000F0E6EC279896 +:1059C00001F04EEB0006000E00D048E422990029B9 +:1059D00003D031990122CA6141E4319A0021D16199 +:1059E0003DE410B544692000FFF759FA2100FF316A +:1059F00002224A312000FDF774FE10BD10B509687F +:105A0000491C0CD0202908D1806900F0D6EB006831 +:105A10001D214901401801210172002010BD41687B +:105A2000183101F0C2E8F8E7F8B504000D00486845 +:105A30000127C0680090A669300000F0B2EB002C8E +:105A40005AD0002D58D0002E56D02B68212B43D091 +:105A500010DC172B06D008DC9B1C4BD0012B13D07D +:105A6000182B4BD161683C3132E01D2B19D01E2B15 +:105A700044D124E0223B01F020E80C354141414172 +:105A8000413F3F3F413F214101F096E8002804D0CB +:105A900001F092E8007A03282ED0002000F0A8EF51 +:105AA0002AE001009B239B001C224831C01801F012 +:105AB0003CEB1E213000F5F798FC1DE00027009913 +:105AC0003A003000FDF7FFFC002815D16168303145 +:105AD000200001F06AE80FE0222200213000F4F7F4 +:105AE00043F909E03000F4F778FA22213000FDF79D +:105AF000A3FC01E02068A0600020F8BD2800F8BDEC +:105B0000F8B504000E00856900286AD0002EFCD08C +:105B100030680B27BF01212864D00EDC172806D07F +:105B200006DC801C79D0012812D0182876D179E0C3 +:105B30001F2857D02028F9D177E00300223B00F03E +:105B4000BCEF0B7499999999996E97517497990034 +:105B5000287A03281ED1280000F0BEEB060028009A +:105B600001F0B2E8002810D0F06B00280DD02520FD +:105B700040013018007DFF2802D0684601F0B4ECE7 +:105B800000221100280000F004EC17210220490136 +:105B900069180870012000F02CEF227D002A05D042 +:105BA000002001002075280000F01AEBA06900F029 +:105BB00004EB00681D2676018019007A00280BD0BE +:105BC000A06900F0FAEA006881190020087202005A +:105BD0001F21200000F084EF679650DB01000000D9 +:105BE00038D800C00004000001FDE78AE8194069C8 +:105BF000042100F0CCEC45E01F2802D13321202401 +:105C00000AE02A2806D136212B240120EA195269FC +:105C1000907301E0342122242800F4F7B9F8032816 +:105C200030D0010022002800F4F7A8F82AE022E092 +:105C30002AE02800F5F71CFB61683C3113E02800DE +:105C4000F4F708F93068202802D16768183703E0B4 +:105C50002B280CD167683C3730680106090E2800F4 +:105C6000FDF7F4FB3900200000F0A8EF0AE028005F +:105C7000F4F7BDF9E9E7E8194069052100F086EC81 +:105C80002068A0600020F8BD3000F8BD70B50400A9 +:105C90000800002C3ED000283CD00268A569212ACB +:105CA0002FD00CDC182A2ED004DC921C30D0012A14 +:105CB00031D12FE01F2A24D0202A2CD121E0292AFB +:105CC00019D004DC222A1CD0282A24D122E02A2A36 +:105CD00020D02C2A1FD161682000183100F06EEF0F +:105CE0002D212800F5F78BFB0B2100208901691875 +:105CF000496988730EE02800F5F70CFB61683031C4 +:105D000002E0227506E0A168200000F058EF01E0F3 +:105D10002068A060002070BD10B50A681F2A0FD04F +:105D200008DC921C0DD0012A0BD0172A0BD0182AA0 +:105D30000ED106E0202A03D0212A01D0222A07D141 +:105D40000275002010BD4168483100F038EFF8E7D7 +:105D5000080010BD164A1748002110B500F056EF94 +:105D60001449154A0800183000F050EF1149134A41 +:105D70000800303000F04AEF0E49114A0800483060 +:105D800000F044EF0B490F4A08003C3000F03EEFB2 +:105D900010BD09218901074A411810B50A60110098 +:105DA0008F2292001831801800F0E4EF10BDF0E768 +:105DB0005DD600C0786201C089D600C061D700C03E +:105DC000D9D800C065D900C0F1B56120C04384B006 +:105DD0000027039002900498B90009180520C0011B +:105DE00009184C68002C7ED0617822780E020F21B1 +:105DF000164389010E40F6D0064208D0039862305F +:105E000005D1049801F07EEB000400140390FF20FC +:105E10004130064208D00298623005D1049800F063 +:105E2000AAEC0004001402900025300614D530219D +:105E3000095D039A0120914200DD0020802100913C +:105E400023002200010004985E3330320197F3F7FB +:105E50003AFD002800D08025B00517D53C21095D0A +:105E6000039A0120914200DA0020012149020091A9 +:105E700023002200010004985F333C320197F3F7BE +:105E800022FD002802D0012040020543700616D5ED +:105E90002A21095D029A01204942914200DD002039 +:105EA0004021009123002200010004985C332A3233 +:105EB0000197F3F708FD002801D040200543F005C5 +:105EC00018D53621095D01204A4202998A4200DA3A +:105ED0000020FF26761C23005D33220036320100AD +:105EE0000197009600E015E00498F3F7ECFC002819 +:105EF00000D03543002D0DD0002F0BD10498052183 +:105F0000C901401801892943018101210498C9066A +:105F1000F5F7E3FA7F1C3F063F0E012F00D25AE748 +:105F200005B0F0BDF3B5002405000526F60181B0EB +:105F3000A000401980194068002848D041780278B4 +:105F400009021143490742D50299096900290CD178 +:105F50000100603100224A708A70C07C0B00012170 +:105F6000002800D00100197031E0010060318A780A +:105F70004B7812021A43521C1204120C130A4A7074 +:105F80008B700B78002B22D0877CBA421FD35B1E0C +:105F90001A06120E0A701AD14A708A70C27C002A40 +:105FA00001D00A7008E04178027809021143042206 +:105FB00091430170090A4170002C08D1A819018988 +:105FC00004221143018151062800F5F786FA641C6A +:105FD0002406240E012CABD3FEBD4149C868401CE9 +:105FE000C8607047F0B51D007759EFE80100000068 +:105FF00034DC00C00004000086ABE9D81FB40020E8 +:10600000C04384B00090019004980521C90146184E +:106010007468002C3ED06078217800020843400567 +:1060200038D500F09AEE069A0F002B00121A8B4119 +:10603000029005D2069A02983900801AA94107E019 +:10604000069A00980199801A029AA941801879410C +:10605000070020000D004A3000F0F2E900212B007B +:106060003A1A8B4118D3234FF888401C05042D0C95 +:1060700020004E30FD8000F0E4E9A8420AD800205C +:10608000F88030890121890208433081049849044D +:10609000F5F72DFA09B0F0BD16490020C880F9E7E0 +:1060A0000522D201801810B54468002C1FD06078FA +:1060B000227800021043400519D5487D01F030EAEE +:1060C0004034E179A2790B0213430A490022984235 +:1060D0000ED88888401C0004000C8880637A247ADB +:1060E0001B022343834202D8012008818A8010BD0D +:1060F0000A81FBE7B0F200C070B5050000F070E85F +:106100000400280000F060E8112201005201891803 +:1061100049880C340020012903D1A16F012900D145 +:10612000012070BD10B589780A07930F022B04D1A6 +:106130000B09042B08D00C2B06D0920F02D10909B1 +:10614000052901D0F4F7DAFF10BD000001484089AD +:106150007047000024F400C004F01FE5D11B0200CA +:1061600004F01FE591DD000004F01FE509010000C7 +:1061700004F01FE58FDD000004F01FE50D74300012 +:1061800004F01FE5D91B020004F01FE5E8CB310045 +:1061900004F01FE557AC310004F01FE589AD310074 +:1061A00004F01FE55CCA310004F01FE52156000031 +:1061B00004F01FE577B3000004F01FE56BB30000A7 +:1061C00004F01FE5F14F020004F01FE5D14F02007B +:1061D00004F01FE54384310004F01FE5FCD43100D6 +:1061E00004F01FE51F50020004F01FE54D1C0000E5 +:1061F00004F01FE513C1000004F01FE541A40100F5 +:1062000004F01FE5C583310004F01FE5F9610000CB +:1062100004F01FE5995F010004F01FE54BAD00009D +:1062200004F01FE5A16A000004F01FE5C961000049 +:1062300004F01FE54164000004F01FE5C9100000F0 +:1062400004F01FE5351E000004F01FE54BBC3000D4 +:1062500004F01FE5A5FD000004F01FE58FCF00004E +:1062600004F01FE5511A310004F01FE5CFD2000001 +:1062700004F01FE579D7000004F01FE599BC000089 +:1062800004F01FE5CFBE000004F01FE55BBD000079 +:1062900004F01FE5BB5E000004F01FE589BC0000B0 +:1062A00004F01FE583D7000004F01FE57DD1000056 +:1062B00004F01FE51134010004F01FE575D2000061 +:1062C00004F01FE5451A310004F01FE5735A310050 +:1062D00004F01FE5AD5A310004F01FE53FBF010097 +:1062E00004F01FE5BF63000004F01FE5FDBB0000E4 +:1062F00004F01FE59150020004F01FE55BBF0100B0 +:1063000004F01FE5E7C1000004F01FE55917010084 +:1063100004F01FE5CF64310004F01FE597CC0000C6 +:1063200004F01FE5DBBC000004F01FE5D9FE00000F +:1063300004F01FE58584310004F01FE5DF5E0000F6 +:1063400004F01FE507B8300004F01FE56D6231006E +:1063500004F01FE58FBC000004F01FE5B3BE000091 +:1063600004F01FE5116B010004F01FE5BB640000A1 +:1063700004F01FE55365000004F01FE5F965000017 +:1063800004F01FE5A156310004F01FE513D1000011 +:1063900004F01FE535DE010004F01FE5C51E3100E5 +:1063A00004F01FE58355000004F01FE5D784310099 +:1063B00004F01FE50557000004F01FE58BD1010034 +:1063C00004F01FE56737000004F01FE5B7D10100B6 +:1063D00004F01FE52F36000004F01FE5C31A01008A +:1063E00004F01FE51D64000004F01FE53F500200AB +:1063F00004F01FE5A16E01002EEF228301000000D2 +:1064000030E000C000040000881E44B104F01FE525 +:10641000A186010004F01FE5AD48010004F01FE56E +:1064200094CB310004F01FE519CE010004F01FE504 +:10643000CB66000004F01FE5A967000004F01FE52B +:106440007704000004F01FE57F17010004F01FE54A +:10645000752C000004F01FE5E0CC310004F01FE5CE +:106460001FAA310004F01FE53F6B000004F01FE598 +:1064700087C3000004F01FE5CF47010004F01FE5CB +:10648000A3BC000004F01FE52F3D010004F01FE550 +:10649000FD3C010004F01FE55FAD000004F01FE5C6 +:1064A000C7C3000004F01FE585BB300004F01FE502 +:1064B000C347010004F01FE539AC010004F01FE5FB +:1064C00005B7310004F01FE56DD5310004F01FE57C +:1064D00000CD310004F01FE55B11000004F01FE562 +:1064E00019D5310004F01FE52729020004F01FE54B +:1064F0007BAE000004F01FE54B46020004F01FE5F0 +:106500007150020004F01FE5DB77000004F01FE586 +:10651000B110000004F01FE59BCE000004F01FE561 +:106520005D1A310004F01FE5A7A6000004F01FE586 +:1065300019A5000004F01FE523A5000004F01FE5E5 +:106540002DA5000004F01FE5513C010004F01FE5FB +:10655000D728310004F01FE5FD28310004F01FE5C5 +:106560001929020004F01FE591D6310004F01FE55F +:106570003FD6310004F01FE599B0310004F01FE56B +:106580000DD4000004F01FE5A9BC000004F01FE5D5 +:106590000BC6000004F01FE541E8000004F01FE511 +:1065A0004F4C000004F01FE543AE000004F01FE56F +:1065B0004950010004F01FE5B95C000004F01FE53C +:1065C000D757000004F01FE5FFE8010004F01FE5C5 +:1065D0005148010004F01FE5C5B1000004F01FE5BB +:1065E000D3B3000004F01FE5EFB3000004F01FE593 +:1065F000F530000004F01FE59577010004F01FE579 +:10660000B978010004F01FE581ED000004F01FE5FA +:106610000D9D010004F01FE5AFA3010004F01FE58C +:1066200015EB000004F01FE517FB000004F01FE568 +:1066300099CC310004F01FE56768000004F01FE505 +:1066400077D1000004F01FE59D49010004F01FE52B +:10665000E148010004F01FE53749010004F01FE59F +:10666000C1FC000004F01FE5CD48010004F01FE567 +:106670008BB6310004F01FE565C8000004F01FE58B +:10668000F9D0000004F01FE59177010004F01FE548 +:10669000EF5F000004F01FE59FD0000004F01FE54D +:1066A000BBF6000004F01FE535F3000004F01FE521 +:1066B00051F3000004F01FE5C7F6000004F01FE5E9 +:1066C000F73E310004F01FE5BD3E310004F01FE548 +:1066D00099F1000004F01FE5C929010004F01FE54D +:1066E0003116310004F01FE5F915310004F01FE503 +:1066F000792B010004F01FE56F2B010004F01FE56A +:106700000FF2000004F01FE519F5000004F01FE58A +:10671000C3F4000004F01FE559A5000004F01FE5D4 +:106720008CCE310004F01FE518C6310004F01FE5DF +:1067300045B5310004F01FE525D0000004F01FE549 +:10674000DF6A010004F01FE5411F000004F01FE5AF +:10675000794F000004F01FE50D42010004F01FE531 +:106760009F4B010004F01FE5794B010004F01FE589 +:10677000DDF6000004F01FE58D5E000004F01FE56B +:10678000975D000004F01FE59F5D000004F01FE529 +:106790006D49010004F01FE54949010004F01FE5BF +:1067A0005FB3000004F01FE54FB3000004F01FE5E5 +:1067B0005940020004F01FE57340020004F01FE599 +:1067C000A7B5310004F01FE5AF8F010004F01FE50D +:1067D000E38F010004F01FE5D7E7000004F01FE598 +:1067E00019A7010004F01FE51575000004F01FE56E +:1067F00095AD000004F01FE565C2000004F01FE540 +:10680000F5AE000004F01FE537747D6F0100000055 +:106810002CE400C000040000A290ED28E3AB0000CF +:1068200004F01FE5E1A7010004F01FE515B43100F5 +:1068300004F01FE55B8C000004F01FE5495A0000DE +:1068400004F01FE5B557000004F01FE5E9A830008B +:1068500004F01FE577A9300004F01FE5C7570000DA +:1068600004F01FE54D32010004F01FE56F32010016 +:1068700004F01FE527B4300004F01FE5D1A60100A5 +:1068800004F01FE54F0B010004F01FE5BB0D0100F4 +:1068900004F01FE5A119010004F01FE5F71801003D +:1068A00004F01FE5E9DB010004F01FE553EB0100F4 +:1068B00004F01FE563E8010004F01FE5A3DC01001C +:1068C00004F01FE509DD010004F01FE5F569010092 +:1068D00004F01FE5736A010004F01FE53172010046 +:1068E00004F01FE50D00000404F01FE53150010025 +:1068F00004F01FE517C4300004F01FE5A3F6000004 +:1069000004F01FE5AFF6000004F01FE52D61010063 +:1069100004F01FE5D162000004F01FE565260000C9 +:1069200004F01FE57F28000004F01FE585D8010072 +:1069300004F01FE555C2010004F01FE5E76A0100FD +:1069400004F01FE5CF6A010004F01FE59F893000C5 +:1069500004F01FE50383010004F01FE51F8201001E +:1069600004F01FE5A783010004F01FE5CD820100BC +:1069700004F01FE51B84010004F01FE51916020056 +:1069800004F01FE5DD24000004F01FE59D840100F4 +:1069900004F01FE5F984010004F01FE5678D310064 +:1069A00004F01FE5B17A010004F01FE5237D01002A +:1069B00004F01FE57100310004F01FE51F340000F2 +:1069C00004F01FE58934000004F01FE515320000D3 +:1069D00004F01FE57332000004F01FE525330000CA +:1069E00004F01FE55533000004F01FE501750100B8 +:1069F00004F01FE5DDD7000004F01FE557AE0000EE +:106A000004F01FE5FFD3000004F01FE5653E010020 +:106A100004F01FE54FD0000004F01FE5C9AE0000F0 +:106A200004F01FE53D45000004F01FE5C1480100EA +:106A300004F01FE54DB4310004F01FE503560000DB +:106A400004F01FE5E961010004F01FE507490000BB +:106A500004F01FE5EB26010004F01FE5C756000017 +:106A600004F01FE565B9000004F01FE583AB0000EA +:106A700004F01FE525AA000004F01FE5FDB5310074 +:106A800004F01FE58F56000004F01FE531140000EC +:106A900004F01FE51D56000004F01FE59D74310051 +:106AA00004F01FE541D5000004F01FE5E976010080 +:106AB00004F01FE50929020004F01FE5859E01008E +:106AC00004F01FE53546020004F01FE521AF000089 +:106AD00004F01FE50DAB000004F01FE5B5A70000B2 +:106AE00004F01FE5CFA6000004F01FE543B131001C +:106AF00004F01FE52F0F010004F01FE589D000000E +:106B000004F01FE59B3D000004F01FE594CE31002A +:106B100004F01FE5E161000004F01FE55F3A0000AA +:106B200004F01FE52704020004F01FE551010200F4 +:106B300004F01FE5EDB6300004F01FE5C3BE3100E0 +:106B400004F01FE54324020004F01FE5B90402002D +:106B500004F01FE5D150020004F01FE5671C02009D +:106B600004F01FE5491C020004F01FE54D0400007D +:106B700004F01FE52DD9310004F01FE5A5740000D5 +:106B800004F01FE5EB6A000004F01FE57DA801009A +:106B900004F01FE58F46010004F01FE53FCC000024 +:106BA00004F01FE51751020004F01FE5E711020091 +:106BB00004F01FE513D6000004F01FE5D9D500004E +:106BC00004F01FE57F50020004F01FE5E50E010010 +:106BD00004F01FE55BFE000004F01FE52F3F0000FE +:106BE00004F01FE58902020004F01FE50D0E3100DC +:106BF00004F01FE5CF10310004F01FE52BB7300083 +:106C000004F01FE50BD2010004F01FE5F36A010058 +:106C100004F01FE5631E3100DAC2C39A01000000D0 +:106C200028E800C000040000827345A204F01FE5BC +:106C30001348010004F01FE55159310004F01FE52D +:106C40002B3C010004F01FE5393C010004F01FE576 +:106C5000A3D4000004F01FE51758310004F01FE52D +:106C600013B7300004F01FE59B66000004F01FE539 +:106C70006156310004F01FE5155D000004F01FE5CA +:106C800028CC310004F01FE5A557310004F01FE5C2 +:106C90002D5F000004F01FE5335F000004F01FE5E6 +:106CA0006F26010004F01FE5195F000004F01FE5E6 +:106CB000C327010004F01FE55D27010004F01FE574 +:106CC000395F000004F01FE5B15E000004F01FE52D +:106CD000612E000004F01FE5692E000004F01FE59E +:106CE0007105020004F01FE5B561310004F01FE5F5 +:106CF0005F39010004F01FE54B3B010004F01FE584 +:106D00000D72020004F01FE5073A010004F01FE5D0 +:106D1000E986010004F01FE53B1E310004F01FE589 +:106D20004D1F310004F01FE59F5E000004F01FE5D9 +:106D30007BC3010004F01FE55128310004F01FE57A +:106D40003789010004F01FE5A93A010004F01FE5AE +:106D5000013C010004F01FE58766310004F01FE5E7 +:106D6000FF24000004F01FE50368310004F01FE574 +:106D7000E366310004F01FE5071D310004F01FE554 +:106D80002169310004F01FE56969310004F01FE555 +:106D90003DDC010004F01FE5F51B310004F01FE5A8 +:106DA00025DC310004F01FE51FD6010004F01FE5CB +:106DB0006333000004F01FE51992010004F01FE5A1 +:106DC00043A3000004F01FE50BB7300004F01FE5FB +:106DD000D925310004F01FE5071E000004F01FE56F +:106DE0009F61310004F01FE5776A000004F01FE5A1 +:106DF0007BD3010004F01FE52D19000004F01FE50E +:106E00003B35000004F01FE55956310004F01FE542 +:106E10002FD2000004F01FE551A7310004F01FE558 +:106E20009B8C010004F01FE52FB4000004F01FE567 +:106E3000D984010004F01FE5F1DE010004F01FE534 +:106E4000BD5C000004F01FE505CD000004F01FE567 +:106E50002DD3000004F01FE5F5C1310004F01FE55B +:106E60009BDE310004F01FE55F1B310004F01FE5DD +:106E7000731B310004F01FE5FB3E010004F01FE529 +:106E80007D1B310004F01FE5A976310004F01FE5F9 +:106E90005977310004F01FE53D74310004F01FE51F +:106EA000C574310004F01FE5B11A310004F01FE58C +:106EB000BD1A310004F01FE55374310004F01FE5E2 +:106EC0003357010004F01FE5F175310004F01FE5B0 +:106ED000BF73310004F01FE57FA8310004F01FE507 +:106EE0006975310004F01FE52B74310004F01FE5D3 +:106EF000AB57010004F01FE55776310004F01FE5A1 +:106F00006574020004F01FE5399A010004F01FE5E2 +:106F10008B76310004F01FE55B66310004F01FE55D +:106F20005BD0000004F01FE5273A010004F01FE5E4 +:106F3000F362310004F01FE55D63310004F01FE5EA +:106F4000B117010004F01FE5EF17010004F01FE581 +:106F50007D5D310004F01FE57B2E000004F01FE58D +:106F6000575F310004F01FE5C35D310004F01FE5F9 +:106F700049D9010004F01FE5AB6A310004F01FE5B8 +:106F80003987310004F01FE5D35F010004F01FE5ED +:106F9000F53E010004F01FE57016020004F01FE545 +:106FA000595D000004F01FE5AF91010004F01FE5FA +:106FB000E163310004F01FE50B92010004F01FE5CE +:106FC000BF63310004F01FE5235D000004F01FE5FE +:106FD000FB69310004F01FE589C0000004F01FE5E3 +:106FE0001DD4000004F01FE531D4000004F01FE5BB +:106FF0005156000004F01FE58363310004F01FE5E3 +:10700000E75F000004F01FE50B02020004F01FE53B +:10701000F3C3000004F01FE519FF010004F01FE5B1 +:10702000B7FE010004F01FE54929E8400100000017 +:1070300024EC00C00004000005254BF0471F0100B0 +:1070400004F01FE57FEC010004F01FE5B1D500005E +:1070500004F01FE5673C000004F01FE5B9340000B0 +:1070600004F01FE5311C310004F01FE56D2700001E +:1070700004F01FE54959310004F01FE54FB7000047 +:1070800004F01FE5815E000004F01FE53B460200AE +:1070900004F01FE52F8C000004F01FE5EDD900007F +:1070A00004F01FE5D73E020004F01FE50BB300001B +:1070B00004F01FE56303020004F01FE5233C000019 +:1070C00004F01FE53774310004F01FE57D733100D3 +:1070D00004F01FE59FFF010004F01FE5516100006F +:1070E00004F01FE53196310004F01FE50FAB3100CD +:1070F00004F01FE525A8310004F01FE5C1D8010008 +:1071000004F01FE525A4010004F01FE5B3B300005F +:1071100004F01FE50BDC010004F01FE589DF01002E +:1071200004F01FE5353F000004F01FE57128310031 +:1071300004F01FE59521310004F01FE5B73B000086 +:1071400004F01FE5A105020004F01FE5EB0F0200AB +:1071500004F01FE59DC3010004F01FE5A7213100E5 +:1071600004F01FE51955000004F01FE51F6D310004 +:1071700004F01FE5C9AA310004F01FE57DAB310022 +:1071800004F01FE57B47020004F01FE5638B01005C +:1071900004F01FE5655D000004F01FE5FD3B000005 +:1071A00004F01FE530CB310004F01FE54F770100FC +:1071B00004F01FE57120310004F01FE599F1010092 +:1071C00004F01FE55160010004F01FE5F71D3100D8 +:1071D00004F01FE58FB9300004F01FE56D65000075 +:1071E00004F01FE54178310004F01FE52FFF000097 +:1071F00004F01FE5E75D010004F01FE5EF5E01000C +:1072000004F01FE5B97C310004F01FE52D77010083 +:1072100004F01FE569F0010004F01FE577E00100CC +:1072200004F01FE5EF80310004F01FE5177831000E +:1072300004F01FE54B43020004F01FE567BE0100A8 +:1072400004F01FE5F9CD000004F01FE5FB5F00002E +:1072500004F01FE5A560000004F01FE56F71310028 +:1072600004F01FE52F5A310004F01FE53F6F310095 +:1072700004F01FE5791F010004F01FE593050000ED +:1072800004F01FE58F16010004F01FE50FF7010061 +:1072900004F01FE50FE7000004F01FE545E70000DC +:1072A00004F01FE53DE7000004F01FE521F60000B3 +:1072B00004F01FE5BD3E010004F01FE54BF60000A1 +:1072C00004F01FE5D934010004F01FE585420000F9 +:1072D00004F01FE5132D010004F01FE50DF7010078 +:1072E00004F01FE509B9000004F01FE5D9B800005B +:1072F00004F01FE5F5B8000004F01FE56B2831002D +:1073000004F01FE57728310004F01FE50D5500005B +:1073100004F01FE5C717010004F01FE5CB8C010046 +:1073200004F01FE531E1010004F01FE53D520100CA +:1073300004F01FE53D5A000004F01FE59F27000000 +:1073400004F01FE5FF47010004F01FE599A50100C7 +:1073500004F01FE50100000404F01FE5FF13000026 +:1073600004F01FE5CB5F010004F01FE5056B000092 +:1073700004F01FE5B3D8000004F01FE5F92802006F +:1073800004F01FE5BD88300004F01FE58F89300050 +:1073900004F01FE50189300004F01FE5A5B70000E7 +:1073A00004F01FE5C3B7000004F01FE54129010008 +:1073B00004F01FE5EB00000004F01FE5B9BC30004D +:1073C00004F01FE5C500000004F01FE50BBD300010 +:1073D00004F01FE5BD10000004F01FE57329010053 +:1073E00004F01FE5FB26010004F01FE5C9B73000DB +:1073F00004F01FE5A711020004F01FE537B73100C4 +:1074000004F01FE5E7F0010004F01FE5B5FE000001 +:1074100004F01FE541B7310004F01FE5D3DD0100A2 +:1074200004F01FE547E1010004F01FE511750000BD +:1074300004F01FE5D183000097CA8CA5010000006D +:1074400020F000C000040000C3B414B604F01FE52F +:10745000B768000004F01FE563AD010004F01FE50C +:10746000D3AA010004F01FE5A5AA010004F01FE55E +:1074700053B0010004F01FE5D7B2010004F01FE58E +:107480001581310004F01FE5A76B000004F01FE533 +:107490004981310004F01FE56364000004F01FE53A +:1074A000DD64000004F01FE59565000004F01FE5B1 +:1074B000BDFF300004F01FE51D22000004F01FE5B1 +:1074C000030B310004F01FE51B00310004F01FE541 +:1074D0005921000004F01FE51982310004F01FE576 +:1074E0003982310004F01FE531F2010004F01FE59C +:1074F000B970310004F01FE50560310004F01FE5AC +:10750000451A010004F01FE5D96F310004F01FE5B2 +:10751000AF6F310004F01FE5736F310004F01FE519 +:107520004FBD010004F01FE50371310004F01FE5B9 +:107530001371310004F01FE55B70310004F01FE5AA +:107540008970310004F01FE53B70310004F01FE545 +:107550004B70310004F01FE5712D000004F01FE5B1 +:107560007789010004F01FE5D7F1010004F01FE561 +:10757000D75A310004F01FE52D5E000004F01FE52E +:107580009FB3000004F01FE5DB173100000000008E +:107590000000FFFFFFFFFFFF2F015D0133016201CC +:1075A0003501320134014601960197016401DD0085 +:1075B0006901700139017B01000001002B012C01E0 +:1075C0002D012F0130013101320132013401360128 +:1075D00033014601350139017B013B013B013B0190 +:1075E0003B011F01380140015E0155015D012A0187 +:1075F00001016201410191019101920164012D009B +:10760000DD00AA019301700198013D00010800000E +:10761000000000000000000000000000000000006A +:107620000000000000000000322E332E312E30000A +:10763000003C00800000000000000000000000008E +:10764000000000000000000000000000000000003A +:1076500000000000000000001C7C02000000000090 +:1076600000000000FF0000FF000000FDFDFF88009B +:10767000C003C103BE03BF03C403C5030000000071 +:10768000000000000000000000000000FDFDFF926F +:10769000FDFDFF92FDFDFF920000000001000000D3 +:1076A00000000000000000000000000000000000DA +:1076B00000000000000000000000000000000000CA +:1076C00000000000000000000000000000000000BA +:1076D000FFFFFFFFFF0A121212000000000000006F +:1076E000000000000000000000000000080004018D +:1076F0000200000005010200000006010200000077 +:10770000070102003C001601020000001701020000 +:1077100000002601020000002701020000002801ED +:1077200002000000290102000000240110000000F6 +:1077300000000000000000000000000000004901FF +:107740000200320000000000000000000000000005 +:1077500000000000FF000000FF000000000000002B +:107760000000000000000000000000000000000019 +:107770000000000000001E000000000000000000EB +:1077800000000000000000000000000000000000F9 +:1077900000000000000000000000000000000000E9 +:1077A00000000000000000000000000000000000D9 +:1077B00000000000000000000000000000000000C9 +:1077C00000000000000000000000000000000000B9 +:1077D00000000000000000000000000000000000A9 :1077E0000000000000000000000000000000000099 :1077F0000000000000000000000000000000000089 -:10780000FFFFFF0004003F001D0027002F002A009B -:107810003E002400420001004D0017004E0082008F -:107820004F002C00500048005100120052003F0051 -:1078300065001C006600270069001F007000200022 -:1078400072002000D4000100D5000100D6002A00FB -:10785000D8001200D9000400DA000A00DB00A10001 -:10786000DD002C00E0003100F1001E00030180006B -:1078700015016E0016017F001D01660021016400E4 -:1078800025016600290160002F0100003001F90088 -:10789000310100003201F900470190004801E30086 -:1078A00049014C004D0118005001300056013C00C8 -:1078B0005701D9005B014B005C0162005D012500AE -:1078C0005E011900650150008A010300990105005D -:1078D000A1017000A2012300A4014400A6010E0032 -:1078E000A7013A00A9011300AA010600AC014C004F -:1078F000AF010000B4010000B5016A00C0017700CB -:10790000C2016900C3010300C6019100D0016800F3 -:10791000D1016800E5016900E6016900D4010700B2 -:10792000D501C300D601C300DC01460011001300DD -:1079300000010000B8014900B901C900BA01030003 -:10794000BB0100001100230080010500810105003A -:107950008201050083010500840105008501050001 -:1079600086010500870105008801050089010500E1 -:107970008A0105008B0105008C0105008D010500C1 -:107980008E0105008F0105009001050091010500A1 -:107990009201050093010500940105009501050081 -:1079A0009601050097010500980105009901050061 -:1079B0009A0105009B0105009C0105009D01050041 -:1079C0009E0105009F01050011000300FFFFFF005D -:1079D000A001B300C0014E00FFFFFF00A001D300D3 -:1079E000C0014E00FFFFFF00FFFFFF00FFFFFF0091 -:1079F000FFFFFF00FFFFFF00FFFFFF00A001CE0021 -:107A0000A101CE00A201CE00A301CE00A401CE00B0 -:107A1000A501CE00A601CE00A701CE00A801CE0090 -:107A2000A901CE00C0014700C1014700C2014700C3 -:107A3000C3014700C4014700C5014700C601470014 -:107A4000C7014700C8014700C9014700FFFFFF0009 -:107A5000800100008101000082010000830100001C -:107A600084010000850100008601000087010000FC -:107A700088010000890100008A0100008B010000DC -:107A80008C0100008D0100008E0100008F010000BC -:107A9000900100009101000092010000930100009C -:107AA000940100009501000096010000970100007C -:107AB00098010000990100009A0100009B0100005C -:107AC0009C0100009D0100009E0100009F0100003C -:107AD000FFFFFF00FF01010101FF04040404030391 -:107AE0000202FF07070706060505050A0A0A0A0932 -:107AF00009080808FFFFFFFFFFFFFFFFFFFFFFFF71 -:107B0000FF070C00000000003D0000030C00000017 -:107B100000003D0000070C00000000003D000007D1 -:107B20000C00000000003D0000070C0000000000F9 -:107B30003D0000080C00000000003D0000080C00A3 -:107B4000000000003D0000080C00000000003D00A7 -:107B50000000000000000000000000000000000025 -:107B60000000000000000000000000000000000015 -:107B7000FFFF0000FFFFFFFFFFFFFFFF000000000F -:107B800000000000000000000000000000000000F5 -:107B90000000000000000000FFFF000000000000E7 -:107BA00000000000000000000000000000000000D5 -:107BB0008C1A02001E0214030000000000320000B4 -:107BC00000000000E5D5AD9C0100000014FC00C0E1 -:107BD0000004000011FF49D6003200000000000040 -:107BE000000213F175813F1213EDE582600302007C -:107BF00038E4787FF6D8FDC203C2040200381200D0 -:107C00003D80FE753400C208E4F535F536C209C280 -:107C10000A75370E75380C75390A753A08753B06C2 -:107C2000753C04753D02753E01752CFF752DFF7581 -:107C300030C97531FF752E59752FFF752A1F752BA9 -:107C400000753280C206C207C200C201C202752698 -:107C50000190F0B2E0FC4420F0758E00758600754E -:107C6000880075890090F0B2E0FC4440F0E5B05423 -:107C700030700790F0B1E4F080F3E5F1FC24D740D8 -:107C8000F9EC240983C0E0EC242C83C0E0221AA97B -:107C9000CC62AA7575EAB775B6EA0997ADD3F0104C -:107CA00084A7DBEFCED2D2D2D2D2D2D2D284D20922 -:107CB0007DF5DDC9F630500101010202050313050F -:107CC00006071308030A0A0A0B0B0B0B0B0F1313FF -:107CD0001313131313130D130C08040209050B0BD4 -:107CE00075DE0075E40075DB0075E30075E6007570 -:107CF000DC0075DA0075DD0090F005E0FC5304202F -:107D0000BC2002800575D900800375D9033008288E -:107D100090F07BE0FC530401BC010890F0B2E0FC61 -:107D200054DFF090F0B2E0FC4440F0E5B054307025 -:107D30000790F0B1E4F080F3D20890F04BE0FC53F0 -:107D40000420BC200575F2FF800375F2FB75F40377 -:107D5000D2AF90F007E0FC5304C0BC4002800D900D -:107D6000F055E0FC75F10390F055ECF075F10175FC -:107D7000D907D2A790FF9C12166DC2A790F005E01C -:107D8000FC530420BC2002800690FD6612166D751F -:107D9000F102C20490F005E0FC530408BC0805752C -:107DA000D917800375D90790F005E0FC530480BC17 -:107DB000800343D92030CE0575DAB7800375DAB376 -:107DC00075DD0390F003E0FC30E00343DD1090F03C -:107DD00003E0FC30E40343DD2090FF9C12166D7538 -:107DE000E70190F007E0FC5304C0BC400675F124A5 -:107DF0000200B490F007E0FC5304C0BC801275F19F -:107E00000490F0547407F090F056740FF00200B430 -:107E100075F10390FFFF12166D90F0547407F09007 -:107E2000F056740FF00200B4C203C202752601E5D9 -:107E3000C820E43690F040E0FC530404BC042B90CE -:107E4000FC18121A79D2A075230175240F7525002C -:107E50007510B77511F090F05512178D92B7C2A03A -:107E6000C28EC28FC200C201C20243E70275F10492 -:107E700090F007E0FC5304C0BC400330041B90F0BA -:107E80005BE0FC530480BC8010D2C275DC0775DE59 -:107E90000F75E40ED2C375E301C203C20275260159 -:107EA00075F12490F007E0FC5304C0BC40032004AB -:107EB0000C90F0547407F090F056740FF053DDFB03 -:107EC00043DD0453DDFB43DD04753F00758213126F -:107ED0001633753F2175828A12163390F007E0FC45 -:107EE0005304C0BC400E20040B753F08758200127D -:107EF00016338015753F0075820012163390F0EB33 -:107F0000E0F5ED90F0EAE0F5EE758200121659E525 -:107F1000824402F53F75820012163390FFF3121669 -:107F20006D90F007E0FC5304C0BC400920040675C6 -:107F3000F11F0200B475F1060200B4E5C8543070B8 -:107F40001490F0D2E0FC530480BC800490F040E038 -:107F500075E2018005E5D130E0FB75F10D90F0414F -:107F6000E0FC530440BC4002800302042F90F00365 -:107F7000E0FC20E40302042F75DE0875DC02D2C1A8 -:107F800075247F75250075270675262075230275D3 -:107F900016417517F190F1CA12191F75C0017527A6 -:107FA000067526207523017516417517F190F1C8E5 -:107FB00012191F75E40C75C02075247F7525007596 -:107FC00027067526207523027516417517F190F165 -:107FD000CB12191F6B64F4DF01000000100001C018 -:107FE00000040000BD3AFE4B75C0107527067526CB -:107FF000207523017516417517F190F1C912191FEB -:1080000075C00075DE0075E404C28EC28FC20243E3 -:10801000E74090F041E0FC530480BC800280030202 -:1080200004E690F007E0FC53041090F008E0FD74C3 -:10803000805D4C700B90F007E0FC530402BC00F52F -:1080400090F003E0FC30E07843DC7E43E60675E424 -:108050000475E80275247F752500752706752620AE -:108060007523087516417517F190F19212191F7555 -:10807000E8017527067526207523047516417517C6 -:10808000F190F18E12191F75E80875247F7525008F -:108090007527067526207523087516417517F1900A -:1080A000F19312191F75E8047527067526207523AC -:1080B000047516417517F190F18F12191F75E800BC -:1080C00043E72075E40075DC0075E60075F123E5F3 -:1080D000C854307051C20290F04BE0FC530410BC05 -:1080E000102F90FD66121A79758201121659AC8212 -:1080F0008CF9530401E4A20233FD4C60EB3002051D -:1081000075F124800375F105C28EC28FC202020090 -:10811000B490FF5A12166D7582011216598582F9B4 -:1081200075F1050200B430FAFDC2C375DE0075E4D6 -:108130000075E30075DC00C2C2E5C820E40675F1F5 -:108140000C0200B430FB030200B475F10C80F5752D -:10815000260190F040E0FC530402BC023190FACAC0 -:10816000121A7990F056740FF0D2A2752308752474 -:108170001F7525007510B77511F090F05612178D08 -:1081800092B7C2A2C28EC28FC200C201C20275F1F2 -:108190000890F040E0FC530410BC103190FACA1271 -:1081A0001A7990F0547407F0D2A475232075240F27 -:1081B0007525007510B77511F090F05412178D9257 -:1081C000B7C2A4C28EC28FC200C201C20275F1261C -:1081D00090F041E0FC530402BC027190FD65121A5C -:1081E0007990F0A6740AF0D2A175240F7525007558 -:1081F00026017523027510B77511F090F0A61217BD -:108200008D92B7C2A1C28EC28FC200C201C20290BB -:10821000F06AE0FCC4540FFC90F0A6E0FDEC30E303 -:1082200018740FC39C04FE53060FC3ED9E50047DCB -:10823000008014EDC39EFD800E74075CFE2DFF8F41 -:108240000524F050027D0F90F0A6EDF075F1099035 -:10825000F041E0FD530510BD100280030207B0207D -:10826000097CD2A5D2B2D2B0753F11758202121626 -:1082700033758226121659E582541FF5EE753F01BB -:1082800075820212163390F0727403F090FFF912A7 -:10829000166D12162585823585833690F072E0FDC5 -:1082A000BD0700503290F072E0FD90F07274012D25 -:1082B000F0121625AD82AF83C3E5359DE5369F509C -:1082C000088D358F36D20A801090F072E0FA149043 -:1082D000F072F0C20A8002C20AD2090200B4300A67 -:1082E0005690F072E0FABA0700503E90F072E0FA51 -:1082F00090F07274012AF0121625AD82AF83C3E5A7 -:10830000359DE5369F500A8D358F3675F10902008F -:10831000B490F072E0FA1490F072F075F10AC2B005 -:10832000C2B2C209C2A50200B475F10AC2B0C2B29B -:10833000C209C2A50200B490F072E0FA603E90F06B -:1083400072E0FA1490F072F0121625AD82AF83C37A -:10835000E5359DE5369F500A8D358F3675F109025A -:1083600000B490F072E0FA90F07274012AF075F1A6 -:108370000AC2B0C2B2C209C2A50200B475F10AC2F3 -:10838000B0C2B2C209C2A50200B475F10A0200B4BB -:10839000C203C20275260190F041E0FA530208BA06 -:1083A000082B90FD65121A79D2B375238075240FBE -:1083B0007525007510B77511F090F07112178D9238 -:1083C000B7C2B3C28EC28FC200C201C20243E70469 -:1083D000C2C375DE0075E40075E30075DC00C2C23F -:1083E00075F10CC24DB60A91010000000C0401C0E9 -:1083F0000004000097B457D203C20275260190F022 -:1084000041E0FA530220BA204C30CE4990FD65126B -:108410001A79D2A675240F75250090F008E0FA535A -:108420000280BA80137523047510B87511F090F0AE -:108430006D12178D92B780117523027510B87511E2 -:10844000F090F06D12178D92B7C2A6C28EC28FC285 -:1084500000C201C202E5C820E40343E708741055D6 -:10846000C8FABA100343E71075F12290F041E0FA20 -:10847000530204BA040280030209C375DC2075DECE -:108480000D75E40FD2C3ADD2AFD3D2B2D2B0C2CF4A -:10849000D2C6752707752640E5276047C005C00787 -:1084A000121625858235858336D007D005C3E5357C -:1084B0009DE5369F500E90F19CE0FA90F19CE526E8 -:1084C0002AF08015C3ED9535EF9536500C90F19C50 -:1084D000E0FA90F19CC39526F0E526C313F5261526 -:1084E0002780B5C005C007121625858235858336DD -:1084F000D007D005C3E5359DE5369F500C90F19C23 -:10850000E0FA90F19CE5262AF0C005C00712162576 -:108510008582D48583D5D007D005D2CF752707753E -:108520002640E5276047C005C0071216258582351D -:10853000858336D007D005C3E5359DE5369F500EBF -:1085400090F19CE0FA90F19CE5262AF08015C3EDAD -:108550009535EF9536500C90F19CE0FA90F19CC364 -:108560009526F0E526C313F526152780B5C005C06E -:1085700007121625858235858336D007D005C3E5D9 -:10858000359DE5369F500C90F19CE0FA90F19CE50A -:10859000262AF01216258582D68583D7C2C6C2CF79 -:1085A000C2B0C2B2C2C375DC0075DE0075E400C2A1 -:1085B000CF75E20275F125C283C281C28275F10DC9 -:1085C00090F178E0FA30E00675DC0175E60175E4BB -:1085D0000490F041E0FA530280BA80028003020A5C -:1085E0009190F007E0FA53021090F008E0FB7480DD -:1085F0005B4A700B90F007E0FA530202BA00F59064 -:10860000F003E0FA30E07843DC7E43E60675E404EC -:1086100075E82075247F7525007527067526207559 -:1086200023087516417517F190F19412191F75E81A -:10863000107527067526207523047516417517F1E8 -:1086400090F19012191F75E88075247F75250075CB -:1086500027067526207523087516417517F190F1C8 -:108660009512191F75E84075270675262075230495 -:108670007516417517F190F19112191F75E80043B5 -:10868000E78090F007E0FA5302C0BAC00575F10E1A -:10869000800375F11675E7000200B475E72075F8E0 -:1086A0000075E70075E60075DE0075DC3075E40CDA -:1086B00075E30390F047E0FA530210BA10F575F134 -:1086C0000F75E60075DE0075DC3075E40C75E303AC -:1086D00090F047E0FA530210BA00F575F11075DC1E -:1086E0006F75E60675DE0F75E40E75DB0175E30345 -:1086F00090F047E0FA530208BA08F575F11175DCFD -:108700006F75E60675DE0F75E40E75DB0175E30324 -:1087100090F047E0FA530208BA00F575F12775DCCE -:108720000075E60675DE0F75E40E75DB0075E30077 -:1087300090F047E0FA530201BA01F575F12875DCB3 -:108740000075E60675DE0F75E40E75DB0075E30057 -:1087500090F047E0FA530201BA00F590F005E0FA14 -:10876000530240BA400675F1120200B475F11602C8 -:1087700000B475E60675DC6F75DE0F75E40E75DB0B -:108780000175E30390F047E0FA530208BA08F57563 -:10879000F1130200B475E60675DC6F75DE0F75E443 -:1087A0000E75DB0175E30390F047E0FA530208BA57 -:1087B00000F590F047E0FA530204BA040675F1148C -:1087C0000200B475F1160200B475DB0175E40A907D -:1087D000F047E0FA530204BA00F575F11575DB01B4 -:1087E00075DC7F75E40E90F047E0FA530202BA00A0 -:1087F000F575F1162BF8FA8401000000080801C095 -:1088000000040000B757FF580200B4C20375DE0031 -:1088100090F178E0FA30E00643DC0143E60190F0A5 -:1088200041E0FA530280BA80028003020CCA90F041 -:1088300007E0FA53021090F008E0FB74805B4A7086 -:108840000B90F007E0FA530202BA00F590F003E053 -:10885000FA30E07843DC7E43E60675E40475E8020E -:1088600075247F75250075270675262075230875E4 -:1088700016417517F190F19212191F75E8017527CD -:10888000067526207523047516417517F190F18E33 -:1088900012191F75E80875247F7525007527067560 -:1088A00026207523087516417517F190F19312195A -:1088B0001F75E80475270675262075230475164173 -:1088C0007517F190F18F12191F75E80043E720909A -:1088D000F041E0FA530280BA80028003020D7B90DF -:1088E000F007E0FA53021090F008E0FB74805B4A56 -:1088F000700B90F007E0FA530202BA00F590F00313 -:10890000E0FA30E07843DC7E43E60675E40475E87F -:108910002075247F75250075270675262075230888 -:108920007516417517F190F19412191F75E81075BD -:1089300027067526207523047516417517F190F1E9 -:108940009012191F75E88075247F7525007527061C -:108950007526207523087516417517F190F195124B -:10896000191F75E8407527067526207523047516AE -:10897000417517F190F19112191F75E80043E780D6 -:1089800075F1160200B490F005E0FA30E403020F2E -:10899000BFC20390F042E0FA530202BA0257D2A2D9 -:1089A000D2A2D2B2C2B290F0B7E0FA74185AFC90D8 -:1089B000F056E0FE90FFFFC004C00612166DD00610 -:1089C000D004BC180ABE1F04D2B780220E801FBC80 -:1089D000100AEE7004D2B780151E8012C2A2C2A285 -:1089E000C2A2C2A290FFFFC00612166DD00690F080 -:1089F00056EEF0C2A275DC0175E40490F043E0FA93 -:108A0000530280BA80028003020EA590F103E0FABF -:108A100030E20575DC35800375DC3190F003E0FA57 -:108A2000530201BA017B75E80C90FFF612166DD265 -:108A3000B2C2B290FFFF12166D90F141E0FA7404D9 -:108A40005AFC90F18FE0FEBC040ABE7F04D2B780CE -:108A50000E0E800BEC7008EE7004D2B780011E90F1 -:108A6000F18FEEF075E808D2B2C2B290FFFF121695 -:108A70006D90F141E0FA74085AFC90F193E0FEBC6D -:108A8000080ABE7F04D2B7800E0E800BEC7008EE91 -:108A90007004D2B780011E90F193EEF075E800806B -:108AA0000690FFD712166D75DC0190F043E0FA5383 -:108AB0000240BA40028003020F5775DE0890F103AE -:108AC000E0FA30E30575E40E800375E40C90F003E2 -:108AD000E0FA530210BA107B75C03090FFF6121600 -:108AE0006DD2B2C2B290FFFF12166D90F141E0FA62 -:108AF00074015AFC90F1C9E0FEBC010ABE7F04D2A9 -:108B0000B7800E0E800BEC7008EE7004D2B78001B7 -:108B10001E90F1C9EEF075C020D2B2C2B290FFFF34 -:108B200012166D90F141E0FA74025AFC90F1CBE01C -:108B3000FEBC020ABE7F04D2B7800E0E800BEC7022 -:108B400008EE7004D2B780011E90F1CBEEF075C034 -:108B500000800690FFD812166D75DC0075E4009059 -:108B6000F0DBE0FA20E75AD2A38530828531831208 -:108B7000166DD2B2C2B290FFFF12166D74075590F7 -:108B8000FEBE0613E5ED600415ED8033E5EE602FC3 -:108B900015EE75ED078028BE051774E125ED40043C -:108BA00005ED801B74E125EE401505EE75ED108096 -:108BB0000EC2A3C2A3C2A3C2A390FFFF12166DC22E -:108BC000A353E406C283C281209602C28275F116C5 -:108BD00075E204C20290F04BE0FA530210BA106240 -:108BE000E5C85430701D90FCE1121A7975820112AB -:108BF0001659AA828AF9530204E4A20233FB4A708E -:108C00001580E990211A199501000000040C01C09B -:108C1000000400003001F10AFCD4121A79740855DE -:108C2000D1FAE4A20233FB4A60F330021EC28EC2C4 -:108C30008FC20275F80075E70075D10075E2007506 -:108C4000DC0075E60075F1040200B4C28EC28FC26A -:108C50000275E208800690FFDF12166DE5C85430F9 -:108C600070397582011216598582F9753F11758226 -:108C7000021216337582271216598582ED758226E7 -:108C8000121659E582541FF5EE7582281216598581 -:108C900082FF753F21758202121633C203C204752A -:108CA000F80075E70075D10075E20090F101E0FA77 -:108CB00053027890F102E0FB530380BB80027A807C -:108CC00090F102E0FB530310BB10027A0490F10212 -:108CD000E0FB530308BB08027A02BA000302135DEB -:108CE00074045AFBBB041875DB0175DC7F75E6065E -:108CF00075E50075DE0F75E40E75E30302131F744E -:108D0000025AFBBB021575DB0175DC7F75E6077542 -:108D1000DE0F75E40E75E30302131F74F85AFBBBF4 -:108D2000000302131F74F85AFBBB0802803DBB10FE -:108D300002805CBB1802807BBB20030211C1BB28F0 -:108D4000030211E5BB3003021209BB380302122DE6 -:108D5000BB4003021251BB4803021295BB500302F1 -:108D600012B8BB80030212FE02131F75D90775DA11 -:108D70000075DD0075DB0075DC0075E60075DE0052 -:108D800075E40075E50075E30875C00002131F75F2 -:108D9000D90775DA0075DD0075DB0475DC0075E652 -:108DA0000075DE0075E40875E50075E30075C00028 -:108DB00002131F75D90775DA0075DD0075DB0875BC -:108DC000DC0075E60075DE0075E40C75E50075E302 -:108DD0000075C00002131F75D90775DA0075DD0034 -:108DE00075DB1075DC0075E60075DE0875E40C7542 -:108DF000E50075E30075C00002131F75D90775DA29 -:108E00000075DD0075DB8075DC2075E60075DE0021 -:108E100075E40075E50075E30075C00002131F7569 -:108E2000D90775DA0075DD0075DB4075DC3075E655 -:108E30000075DE0075E40475E50075E30075C0009B -:108E400002131F75D90775DAB775DD3775DB007545 -:108E5000DC6675E60275DE0F75E40A75E50075E3FC -:108E60008075C00002131F75DAB775DD2775DB004A -:108E700075E60075DE0F90F116E0FB530340BB4032 -:108E80001890F19EE0FB30E10875DC2075E40F805E -:108E90000E75DC0075E40E800675DC0075E40E7559 -:108EA000E50075E32075C08802131F75D90775DAD0 -:108EB000B775DD3775DB0075DC7F75E60775DE009D -:108EC00075E40475E50075E34075C000806775DAE8 -:108ED000B775DD2775DB0075DC2075E60075DE0FE4 -:108EE00090F116E0FB530340BB401890F19EE0FB6D -:108EF00030E10875DC2075E40F800E75DC0075E448 -:108F00000E800675DC0075E40E75E50075E31075DE -:108F1000C088802175D90775DAB775DD3775DB0034 -:108F200075DC6775E60275DE0F75E40F75E507758C -:108F3000E30375C08890FD4412166D90F101E0FBCB -:108F400074785BFA90F102E0FB530380BB80027AF5 -:108F50008090F102E0FB530310BB10027A0490F101 -:108F600002E0FB530308BB080280030210C47A022C -:108F70000210C490F005E0FA530208BA080343D97E -:108F80001090F005E0FA530280BA800343D92030F4 -:108F9000CE0575DAB7800375DAB375DD0790F00397 -:108FA000E0FA30E00343DD1090F003E0FA30E40330 -:108FB00043DD2075C00075E50075DE0075DB0075CA -:108FC000E30075DC7F75E60790F103E0FA30E30516 -:108FD00075E406800375E404D2A875F11720030335 -:108FE000758701C2A80200B4C20390F04CE0FA20D9 -:108FF000E00690FF5612166D75F104D2040200B41B -:109000000200B490000122C0D075D008C2AFC28E59 -:10901000C28FD202D2A95E7201000000001001C00E -:1090200000040000F690AE4CD2AFD0D032C0E0C009 -:1090300082C083C0D075D008C20BC2AFC28EC28FAF -:10904000D202D20375DE0075E40075E30075E60018 -:1090500075DC0075DB0030870B75F100538048D25A -:109060000B0215F3A280728340030214C475F12031 -:1090700090F056740FF090F0547407F090F0A674CE -:109080000AF090F06D7408F090F0717408F090F1AF -:10909000C8743FF090F1C9743FF090F1CA743FF08A -:1090A00090F1CB743FF090F18E743FF090F18F749B -:1090B0003FF090F190743FF090F191743FF090F197 -:1090C00092743FF090F193743FF090F194743FF0FC -:1090D00090F195743FF0C2CF90F19C747FF0D2CFA5 -:1090E00090F19C747FF0C2CF5380C00215F3A2822E -:1090F0007281400302155690F0B2E0FA4410F07508 -:10910000F12090F056740FF090F0547407F090F046 -:10911000A6740AF090F06D7408F090F0717408F085 -:1091200090F1C8743FF090F1C9743FF090F1CA74A7 -:109130003FF090F1CB743FF090F18E740FF090F10E -:109140008F743FF090F190743FF090F191743FF084 -:1091500090F192740FF090F193743FF090F1947449 -:109160003FF090F195743FF0C2CF90F19C747FF086 -:10917000D2CF90F19C747FF0C2CF5380C00215F320 -:1091800030C80975F10F53C8020215F330C90975CB -:10919000F11153C8010215F330860975F11353809C -:1091A000BF0215F330844090F0B2E0FA4410F0753D -:1091B000F12190F18E740FF090F18F743FF090F1E7 -:1091C00090743FF090F191743FF090F192740FF031 -:1091D00090F193743FF090F194743FF090F1957496 -:1091E0003FF05380CF803675F12190F18E740FF0EF -:1091F00090F18F743FF090F190743FF090F1917482 -:109200003FF090F192740FF090F193743FF090F171 -:1092100094743FF090F195743FF05380CF90F00735 -:10922000E0FA530A1090F008E0FB74805B420AE415 -:10923000A20B33FB4A700B90F007E0FA530A02BA14 -:1092400000F5C2A8D2AFD0D0D083D082D0E032D245 -:10925000B13095FD85F68285F783C2B122AA827569 -:10926000FE028AFA853FFB90FFFF12166D75FE0322 -:1092700090FFFF12166D75FE0290FFFF12166D75BE -:10928000FE0022AA8275FE028AFC90FFFF12166D74 -:1092900085FD8275FE0022AA82AB834389018A8AFA -:1092A0008B8CD28C308DFDC28CC28D22852E828516 -:1092B0002F8312166DD2B2C2B2C2B290FFFF121645 -:1092C0006D309111AA327B00E5E9C39AF5E9E5EA30 -:1092D0009BF5EA8018309010AA327B00EA25E9F568 -:1092E000E9EB35EAF5EA8005740124FF2285EBED10 -:1092F00085ECEEE532C313F532E424FF22AAE9E55A -:10930000EAC4CAC4540F6ACA540FCA6ACAFB852E7B -:1093100082852F83C002C00312166DD003D002D203 -:10932000B2C2B2C2B290FFFFC002C00312166DD02B -:1093300003D00230901BEAB52A0BEBB52B07D2976E -:10934000740124FF22AC267D00EC2AFAED3BFB8061 -:109350001AEAB52B0BEBB52C07D297740124FF2228 -:10936000AC267D00EAC39CFAEB9DFB200503753318 -:1093700000E5332533FCE4A29033FD2CF533533361 -:10938000038AE9EBC454F0C5E9C4C5E965E9C5E958 -:1093900054F0C5E965E9F5EA85EBED85ECEEE533DA -:1093A000B4020474018001E424FF920CA20C720246 -:1093B000E433F58224FF22AA82AB837C007512007D -:1093C000E0FD90FFF6C002C003C004C00512166D98 -:1093D000D005D004D003D002AE10AF11300103028B -:1093E0001843D2B2C2B290FFFFC002C003C004C093 -:1093F00005C006C00712166DD007D006D005D004F0 -:10940000D003D0028E828F83E0F8E5235200E8B5C6 -:10941000230474018001E424FF920D300D0FEDB59B -:1094200024057401533737E901000000FC1301C023 -:1094300000040000ACEBA14524FF22E5262DFD80B1 -:109440000EEDB52505740124FF22EDC39526FDEC34 -:109450002CF8E4A20D3328540FFCB40100E433F8D7 -:109460008A828B83EDF0E4B8F50104F8E4BC0A01CC -:1094700004D3487001C3920EA20E72029201021729 -:10948000B2E424FF22AA82AB837C00751500E0FDC4 -:1094900090FFD8C002C003C004C00512166DD005ED -:1094A000D004D003D002AE13AF1430010302191B55 -:1094B00090FFF6C002C003C004C005C006C007127A -:1094C000166DD007D006D005D004D003D002D2B29A -:1094D000C2B290FFFFC002C003C004C005C006C0F6 -:1094E0000712166DD007D006D005D004D003D002E5 -:1094F0008E828F83E0F8E5235200E8B523047401DF -:109500008001E424FF920F300F0FEDB524057401A4 -:1095100024FF22E5262DFD800EEDB52505740124DE -:10952000FF22EDC39526FDEC2CF8E4A20F3328545E -:109530000FFCB40100E433F88A828B83EDF0E4B8C9 -:10954000F50104F8E4BC0A0104D3487001C3921089 -:10955000A2107202920102186CE424FF22AA82ABCC -:109560008390FFF6C002C00312166DD003D002AC88 -:1095700016AD17E5276052D2B2C2B290FFFFC0020B -:10958000C003C004C00512166DD005D004D003D0AE -:10959000028C828D83E0FEE5235206EEB523118A0C -:1095A000828B83E0FEE5262EFE8A828B83F0800F7D -:1095B0008A828B83E0FEC39526FE8A828B83F0E548 -:1095C00026C313F526152780AAD2B2C2B290FFFF98 -:1095D000C002C003C004C00512166DD005D004D06F -:1095E00003D0028C828D83E0FCE5235204ECB5238A -:1095F0000D8A828B83E004FC8A828B83ECF022AAA2 -:1096000082AB8390FFD8C002C00312166DD003D086 -:1096100002AC18AD19E527606890FFF6C002C003E0 -:10962000C004C00512166DD005D004D003D002D2FC -:10963000B2C2B290FFFFC002C003C004C005121640 -:109640006DD005D004D003D0028C828D83E0FEE57E -:10965000235206EEB523118A828B83E0FEE5262E87 -:10966000FE8A828B83F0800F8A828B83E0FEC39513 -:1096700026FE8A828B83F0E526C313F52615278004 -:1096800094D2B2C2B290FFFFC002C003C004C005B2 -:1096900012166DD005D004D003D0028C828D83E0E9 -:1096A000FCE5235204ECB5230D8A828B83E004FC95 -:1096B0008A828B83ECF022AA82AB834389108A8B47 -:1096C0008B8DD2AFD2ABD28E220061590000000048 -:1096D000000000000000000000000000000000008A -:1096E000000000000000000000000000000000007A -:1096F000000000000000000000000000000000006A -:109700000000000000000000000000000000000059 -:109710000000000000000000000000000000000049 -:109720000000000000000000000000000000000039 -:109730000000000000000000000000000000000029 -:109740000000000000000000000000000000000019 -:109750000000000000000000000000000000000009 -:1097600000000000000000000000000000000000F9 -:1097700000000000000000000000000000000000E9 -:1097800000000000000000000000000000000000D9 -:1097900000000000000000000000000000000000C9 -:1097A00000000000000000000000000000000000B9 -:1097B00000000000000000000000000000000000A9 -:1097C0000000000000000000000000000000000099 -:1097D0000000000000000000000000000000000089 -:1097E0000000000000000000000000000000000079 -:1097F0000000000000000000000000000000000069 -:109800000000000000000000000000000000000058 -:109810000000000000000000000000000000000048 -:109820000000000000000000000000000000000038 -:10983000000000002ED06D9101000000F81701C05B -:1098400000040000FF317229000000000000000049 -:109850000000000000000000000000000000000008 -:1098600000000000000000000000000000000000F8 -:1098700000000000000000000000000000000000E8 -:1098800000000000000000000000000000000000D8 -:1098900000000000000000000000000000000000C8 -:1098A00000000000000000000000000000000000B8 -:1098B00000000000000000000000000000000000A8 -:1098C0000000000000000000000000000000000098 -:1098D0000000000000000000000000000000000088 -:1098E0000000000000000000000000000000000078 -:1098F0000000000000000000000000000000000068 -:109900000000000000000000000000000000000057 -:109910000000000000000000000000000000000047 -:109920000000000000000000000000000000000037 -:109930000000000000000000000000000000000027 -:109940000000000000000000000000000000000017 -:109950000000000000000000000000000000000007 -:1099600000000000000000000000000000000000F7 -:1099700000000000000000000000000000000000E7 -:1099800000000000000000000000000000000000D7 -:1099900000000000000000000000000000000000C7 -:1099A00000000000000000000000000000000000B7 -:1099B00000000000000000000000000000000000A7 -:1099C0000000000000000000000000000000000097 -:1099D0000000000000000000000000000000000087 -:1099E0000000000000000000000000000000000077 -:1099F0000000000000000000000000000000000067 -:109A00000000000000000000000000000000000056 -:109A10000000000000000000000000000000000046 -:109A20000000000000000000000000000000000036 -:109A30000000000000000000000000000000000026 -:109A40000000000000000000000000000000000016 -:109A50000000000000000000000000000000000006 -:109A600000000000000000000000000000000000F6 -:109A700000000000000000000000000000000000E6 -:109A800000000000000000000000000000000000D6 -:109A900000000000000000000000000000000000C6 -:109AA00000000000000000000000000000000000B6 -:109AB00000000000000000000000000000000000A6 -:109AC0000000000000000000000000000000000096 -:109AD0000000000000000000000000000000000086 -:109AE0000000000000000000000000000000000076 -:109AF0000000000000000000000000000000000066 -:109B00000000000000000000000000000000000055 -:109B10000000000000000000000000000000000045 -:109B20000000000000000000000000000000000035 -:109B30000000000000000000000000000000000025 -:109B40000000000000000000000000000000000015 -:109B50000000000000000000000000000000000005 -:109B600000000000000000000000000000000000F5 -:109B700000000000000000000000000000000000E5 -:109B800000000000000000000000000000000000D5 -:109B900000000000000000000000000000000000C5 -:109BA00000000000000000000000000000000000B5 -:109BB00000000000000000000000000000000000A5 -:109BC0000000000000000000000000000000000095 -:109BD0000000000000000000000000000000000085 -:109BE0000000000000000000000000000000000075 -:109BF0000000000000000000000000000000000065 -:109C00000000000000000000000000000000000054 -:109C1000000000003F4808013D480802354808029E -:109C20002D480802254809021D48090215480A0264 -:109C30000D480A0205480A0205490A0205490A0FA9 -:109C400005490A0FF6B53C3701000000F41B01C0BE -:109C5000000400000B5E079D05490A0F05490A0F25 -:109C600005490A0F05490A0F05490A0F3B08050176 -:109C700039080502310805022908050221080602F3 -:109C8000190806021108070209080702010807025D -:109C90000108070F0108070F0108070F0108070F48 -:109CA0000108070F0108070F0108070F60080202EB -:109CB0005808020250080302480803024008040240 -:109CC0003808040230080402280804022808040F97 -:109CD0001808010210080102080801020008010228 -:109CE0000008010F781C01C0741C01C0701C01C069 -:109CF0006C1C01C06C1C01C0641C01C0601C01C054 -:109D00005C1C01C0581C01C0541C01C0501C01C087 -:109D10004C1C01C0481C01C0481C01C0281C01C0CB -:109D2000241C01C0201C01C01C1C01C0181C01C047 -:109D3000141C01C0101C01C00C1C01C0E81B01C098 -:109D4000E41B01C0E01B01C0DC1B01C0D81B01C02B -:109D5000D41B01C0D01B01C0CC1B01C0C81B01C05B -:109D600001000000204E0000000000000000000084 -:109D700000000000000000000000000000000000E3 -:109D800000000000000000000000000000000000D3 -:109D90000020000004000800100014002000200033 -:109DA000280028004000500050006A006A006A0045 -:109DB0006A006A00FFFF00000000000000000000D1 -:109DC0000100000000000000B1137500B91175001A -:109DD0007B09A5008808A500D8097700DC08770072 -:109DE000BD04A7004404A70090067700E8057700AB -:109DF0002903A700D802A700EC0469006E046900DB -:109E00005E0299002202990048036900F402690089 -:109E1000940199006C0199007602590037025900AB -:109E20002F0189001101890030025900F801590001 -:109E30000D018900F2008900F8015900C50159009F -:109E4000F2008900DA008900280804552808045522 -:109E50003C4804773C48047738080477380804778E -:109E60004C4803994C48039938080477380804771C -:109E70004C4803994C4803994808039948080399AA -:109E80004C4803994C48039948080399480803999A -:109E90004C4803994C48039948080399480803998A -:109EA0004C4803994C48039948080399480803997A -:109EB0004C4803994C48039948080399480803996A -:109EC0004C4803994C480399000102030305050718 -:109ED0000709090909090000280804553008046623 -:109EE000380804774008048848080399500803AAF2 -:109EF000580802BB600802CC00000A000000000005 -:109F0000F81602C0B81702C00100000000000000EF +:107800000000000000000000000000000100000077 +:107810000100000000000000010000000100000065 +:107820000100000000000000000000000A0000004D +:107830000000000000000000000000000000000048 +:10784000000000000000000032246E65010000000E +:107850001CF400C000040000B64AEF0E0000000057 +:1078600000000000000044070000000000000000CD +:107870000000000000000000000000000300010202 +:1078800000010002000000000000000000000000F5 +:107890000000000000000000000000003C000000AC +:1078A00000000000000000000000000000000000D8 +:1078B00000000000000000000000000000000000C8 +:1078C00000000000000000000000000000000000B8 +:1078D0000000000000000000000000007502000031 +:1078E000050000007B4F02000A00000000000000BD +:1078F000000000000000000000000000FFFFFF008B +:10790000FFFFFF00FFFFFF00FFFFFF00FFFFFF0083 +:107910000C000000000000000B0000000000000050 +:107920000A00000000000000FD100000B03B01C094 +:107930000201010002020100010201000103020034 +:107940000103010000FFFFFF1F0000000000000016 +:10795000FFFFFFFFFFFFFFFF00000000F7EC00004C +:107960000100000000000000FF0000000000000017 +:107970000000000000800000000000000000000087 +:1079800000000000000000000000000006000309E5 +:107990000406040507000801060208070F007F001F +:1079A00001000000000000000400000000000000D2 +:1079B000FFFFFF0F00000000FFFFFFFF00000000BF +:1079C000FFFFFFFF00000000FFFFFFFF00000000BF +:1079D000267C0200000000000000000000010203FD +:1079E000050608097E000000FF02010400000000F7 +:1079F0000000000000000000000000000000000087 +:107A000000000C00DC05000000000300F401000091 +:107A100000000C00DC05000000000A00DC0500008E +:107A200000000800DC050000010007005906000006 +:107A30000100040059060000010002005906000080 +:107A40000000000000000000000000000000000036 +:107A5000000000000000000000010000060000001F +:107A6000000000000000000080FA00C070FC00C0B0 +:107A700068FC00C06CFC00C00000000078FC00C086 +:107A800074FC00C000000000042301C0E42301C016 +:107A9000D82301C000000000E82301C0000000005E +:107AA00000000000000090039103C403F103C5032C +:107AB000F203BE03DF03BF03E003C003E503C1031A +:107AC000E60300000000000004000700480000007A +:107AD00006006C09B409000000000000000000006E +:107AE000EC010000A0010000C00100000400000043 +:107AF0000A0000000A00000002012D015501560194 +:107B000057015801A201A701AB01AC01AF01B001BF +:107B1000B101B201B401C80108002C002D002E00F3 +:107B20003100320033003600370038004F005A0071 +:107B30008000DD00350179017B01040254038802D5 +:107B40008B028C02B603B803B903CB03CE03CF0379 +:107B5000D0030804510494049504440047005000E5 +:107B6000510079017A017B01D90200000400000074 +:107B70000700000048000000020000002D00000087 +:107B8000550000005600000057000000580000009B +:107B9000A2000000A7000000AB000000AC00000045 +:107BA000AF000000B0000000B1000000B400000011 +:107BB000C8000000080000002C0000002D0000009C +:107BC0002E000000310000003200000033000000F1 +:107BD0003600000037000000380000004F000000B1 +:107BE0005A00000080000000DD00000035010000A8 +:107BF000790100007B010000040200005403000032 +:107C0000880200008B0200008C020000B603000016 +:107C1000B8030000B9030000CB030000CE0300004E +:107C2000CF030000D003000008040000510400004E +:107C30009404000095040000440000004700000088 +:107C40005000000051000000790100007A0100009E +:107C50007B010000D902000042222B6501000000D8 +:107C600018F800C00004000096A94784B0300090C6 +:107C70000000000000000000000000000000000004 +:107C800000000000000000000000000000000000F4 +:107C900000000000000000000000000000000000E4 +:107CA00000000000000000000000000000000000D4 +:107CB000000000000000000000000000FF000000C5 +:107CC00000000000000000000000000000000000B4 +:107CD000144801C000000000FF010007070700036F +:107CE000000300070003000704050007060700085B +:107CF000000200080304000805070008000201084C +:107D00000304010805070101120E0E0E0D0D0D0AE8 +:107D10000A0A02120F0F0F0F0E0D0A0A0A031210A1 +:107D2000100F0F0E0D0A0A0A041210100F0F0E0D7D +:107D30000B0B0B051210100F0F0E0D0C0C0B061277 +:107D400010100F0F0E0D0D0C0B071210100F0F0E51 +:107D50000D0D0C0B081210100F0F0E0D0C0C0B0953 +:107D60001210100F0F0E0D0A0A0A0A1210100F0F30 +:107D70000E0D0D0C0B0B120E0E0E0E0E0D0D0C0B30 +:107D80000C1010100F0F0E0D0D0C0B0D1010100F0E +:107D90000F0E0D0D0C0B0E0C0C0C0C0C0C0C0C0C1B +:107DA0000B0300030201060504090807FFFFFFFF9C +:107DB000FFFFFFFFFFFFFF0000003F7F020000000A +:107DC000F4010000000000000000000000000000BE +:107DD00000000000000000000000000000000000A3 +:107DE000000001004B000000B4003A00F8008800D9 +:107DF00049014C01F5FF0000300029004E004B0006 +:107E00006D0078004C000000AE003100F8007A00F0 +:107E100042011901E7FF0000400038007A007600B7 +:107E2000D8007A0138000000D700970001015D01F9 +:107E30004301BC02E9FF00007C0009019800E00159 +:107E4000C300210359000000A5005600D0008700A0 +:107E5000E200AC00D5FF000025004D005D009A0057 +:107E60009C00610101000000000000000000000013 +:107E7000000000000000000007B900C01FB900C0EA +:107E8000B5B900C04F570100A76A010039BD010014 +:107E900001170000D7FD000013A6000021520100C9 +:107EA0002A7C0200FFFFFFFFFFFF00000000000030 +:107EB00000000000000000000000000000000000C2 +:107EC00000000000000000000000000000000000B2 +:107ED00000000000FFFFFF0004003F001D0027001E +:107EE0002F002A003E002400420001004D00170030 +:107EF0004E0082004F002C0050004800510012003C +:107F000052003F0065001C006600270069001F004A +:107F10007000200072002000D4000100D500010094 +:107F2000D6002A00D8001200D9000400DA000A00A6 +:107F3000DB00A100DD002C00E0003100F1001E009C +:107F40000301800015016E0016017F001D0166000F +:107F50002101640025016600290160002F01000055 +:107F60003001F900310100003201F90047019000B1 +:107F70004801E30049014C004D0118005001300058 +:107F800056013C005701D9005B014B005C016200C7 +:107F90005D0125005E011900650150008A010300A2 +:107FA00099010500A1017000A2012300A401440071 +:107FB000A6010E00A7013A00A9011300AA010600BC +:107FC000AC014C00AF010000B4010000B5016A0033 +:107FD000C0017700C2016900C3010300C60191001E +:107FE000D0016800D1016800E5016900E60169007F +:107FF000D4010700D501C300D601C300DC0146004F +:108000001100130000010000B8014900B901C900C6 +:10801000BA010300BB01000011002300800105002C +:10802000810105008201050083010500840105002E +:10803000850105008601050087010500880105000E +:10804000890105008A0105008B0105008C010500EE +:108050008D0105008E0105008F01050090010500CE +:108060009101050092010500BE366538010000004F +:1080700014FC00C00004000011FF49D69301050064 +:108080009401050095010500960105009701050082 +:1080900098010500990105009A0105009B01050062 +:1080A0009C0105009D0105009E0105009F01050042 +:1080B00011000300FFFFFF00A001B300C0014E004C +:1080C000FFFFFF00A001D300C0014E00FFFFFF0033 +:1080D000FFFFFF00FFFFFF00FFFFFF00FFFFFF00AC +:1080E000FFFFFF00A001CE00A101CE00A201CE0043 +:1080F000A301CE00A401CE00A501CE00A601CE00B2 +:10810000A701CE00A801CE00A901CE00C001470002 +:10811000C1014700C2014700C3014700C401470035 +:10812000C5014700C6014700C7014700C801470015 +:10813000C9014700FFFFFF0080010000810100002E +:10814000820100008301000084010000850100001D +:1081500086010000870100008801000089010000FD +:108160008A0100008B0100008C0100008D010000DD +:108170008E0100008F0100009001000091010000BD +:10818000920100009301000094010000950100009D +:10819000960100009701000098010000990100007D +:1081A0009A0100009B0100009C0100009D0100005D +:1081B0009E0100009F010000FFFFFF00FF01010181 +:1081C00001FF0404040403030202FF070707060675 +:1081D0000505050A0A0A0A0909080808FFFFFFFF42 +:1081E000FFFFFFFFFFFFFFFFFF070C000000000085 +:1081F0003D0000030C00000000003D0000070C00E3 +:10820000000000003D0000070C00000000003D00E1 +:1082100000070C00000000003D0000080C000000FA +:1082200000003D0000080C00000000003D000008B8 +:108230000C00000000003D000000000000000000F5 +:10824000000000000000000000000000000000002E +:108250000000000000000000FFFF0000FFFFFFFF24 +:10826000FFFFFFFF00000000000000000000000012 +:1082700000000000000000000000000000000000FE +:10828000FFFF0000000000008C1A02001E02140311 +:10829000000000000032000000000000003200007A +:1082A00000000000000213F175813F1213EDE5821A +:1082B0006003020038E4787FF6D8FDC203C20402EE +:1082C000003812003D80FE753400C208E4F535F533 +:1082D00036C209C20A75370E75380C75390A753AF7 +:1082E00008753B06753C04753D02753E01752CFF13 +:1082F000752DFF7530C97531FF752E59752FFF75B6 +:108300002A1F752B00753280C206C207C200C20147 +:10831000C20275260190F0B2E0FC4420F0758E0098 +:1083200075860075880075890090F0B2E0FC4440C5 +:10833000F0E5B05430700790F0B1E4F080F3E5F16F +:10834000FC24D740F9EC240983C0E0EC242C83C042 +:10835000E0221AA9CC62AA7575EAB775B6EA099740 +:10836000ADD3F01084A7DBEFCED2D2D2D2D2D2D20C +:10837000D284D2097DF5DDC9F63050010101020237 +:108380000503130506071308030A0A0A0B0B0B0B58 +:108390000B0F13131313131313130D130C080402F1 +:1083A00009050B0B75DE0075E40075DB0075E30055 +:1083B00075E60075DC0075DA0075DD0090F005E00B +:1083C000FC530420BC2002800575D900800375D9B8 +:1083D0000330082890F07BE0FC530401BC010890B6 +:1083E000F0B2E0FC54DFF090F0B2E0FC4440F0E585 +:1083F000B05430700790F0B1E4F080F3D20890F000 +:108400004BE0FC530420BC200575F2FF800375F29D +:10841000FB75F403D2AF90F007E0FC5304C0BC40FE +:1084200002800D90F055E0FC75F10390F055ECF0F2 +:1084300075F10175D907D2A790FF9C12166DC2A7DE +:1084400090F005E0FC530420BC2002800690FD66FD +:1084500012166D75F102C20490F005E0FC53040899 +:10846000BC080575D917800375D90790F005E0FCA5 +:10847000530480BC800343D952018597010000005A +:10848000100001C000040000BD3AFE4B2030CE05B4 +:1084900075DAB7800375DAB375DD0390F003E0FC9D +:1084A00030E00343DD1090F003E0FC30E40343DDF3 +:1084B0002090FF9C12166D75E70190F007E0FC53C9 +:1084C00004C0BC400675F1240200B490F007E0FC43 +:1084D0005304C0BC801275F10490F0547407F090FE +:1084E000F056740FF00200B475F10390FFFF1216FE +:1084F0006D90F0547407F090F056740FF00200B4D1 +:10850000C203C202752601E5C820E43690F040E0BF +:10851000FC530404BC042B90FC18121A79D2A075E9 +:10852000230175240F7525007510B77511F090F0B3 +:108530005512178D92B7C2A0C28EC28FC200C2015F +:10854000C20243E70275F10490F007E0FC5304C057 +:10855000BC400330041B90F05BE0FC530480BC8003 +:1085600010D2C275DC0775DE0F75E40ED2C375E359 +:1085700001C203C20275260175F12490F007E0FCE8 +:108580005304C0BC400320040C90F0547407F090D6 +:10859000F056740FF053DDFB43DD0453DDFB43DD88 +:1085A00004753F00758213121633753F2175828A58 +:1085B00012163390F007E0FC5304C0BC400E2004B8 +:1085C0000B753F087582001216338015753F0075D4 +:1085D000820012163390F0EBE0F5ED90F0EAE0F552 +:1085E000EE758200121659E5824402F53F7582004D +:1085F00012163390FFF312166D90F007E0FC53044F +:10860000C0BC400920040675F11F0200B475F106D4 +:108610000200B4E5C85430701490F0D2E0FC53046A +:1086200080BC800490F040E075E2018005E5D13027 +:10863000E0FB75F10D90F041E0FC530440BC4002BA +:10864000800302042F90F003E0FC20E40302042FD7 +:1086500075DE0875DC02D2C175247F75250075278B +:10866000067526207523027516417517F190F1CA1B +:1086700012191F75C001752706752620752301750F +:1086800016417517F190F1C812191F75E40C75C0E9 +:108690002075247F75250075270675262075230211 +:1086A0007516417517F190F1CB12191F75C0107531 +:1086B00027067526207523017516417517F190F16F +:1086C000C912191F75C00075DE0075E404C28EC2A0 +:1086D0008FC20243E74090F041E0FC530480BC802D +:1086E0000280030204E690F007E0FC53041090F0CF +:1086F00008E0FD74805D4C700B90F007E0FC5304C3 +:1087000002BC00F590F003E0FC30E07843DC7E43EF +:10871000E60675E40475E80275247F752500752763 +:10872000067526207523087516417517F190F1928C +:1087300012191F75E8017527067526207523047523 +:1087400016417517F190F18E12191F75E8087524FE +:108750007F75250075270675262075230875164137 +:108760007517F190F19312191F75E80475270675B6 +:1087700026207523047516417517F190F18F121993 +:108780001F75E80043E72075E40075DC0075E6001E +:1087900075F123E5C854307051C20290F04BE0FCF3 +:1087A000530410BC102F90FD66121A7975820112C5 +:1087B0001659AC828CF9530401E4A20233FD4C60DB +:1087C000EB30020575F124800375F105C28EC28F6E +:1087D000C2020200B490FF5A12166D758201121681 +:1087E000598582F975F1050200B430FAFDC2C375EE +:1087F000DE0075E40075E30075DC00C2C2E5C82048 +:10880000E40675F10C0200B430FB030200B475F10C +:108810000C80F575260190F040E0FC530402BC0288 +:108820003190FACA121A7990F056740FF0D2A275EC +:10883000230875241F7525007510B77511F090F089 +:108840005612178D92B7C2A2C28EC28FC200C20149 +:10885000C20275F10890F040E0FC530410BC1031E6 +:1088600090FACA121A7990F0547407F0D2A47523C2 +:108870002075240F7525007510B77511F090F05410 +:1088800012178D92B7C2A4C264C64EB40100000094 +:108890000C0401C00004000097B457D28EC28FC2EE +:1088A00000C201C20275F12690F041E0FC530402BF +:1088B000BC027190FD65121A7990F0A6740AF0D28C +:1088C000A175240F7525007526017523027510B753 +:1088D0007511F090F0A612178D92B7C2A1C28EC288 +:1088E0008FC200C201C20290F06AE0FCC4540FFCC7 +:1088F00090F0A6E0FDEC30E318740FC39C04FE5327 +:10890000060FC3ED9E50047D008014EDC39EFD80D4 +:108910000E74075CFE2DFF8F0524F050027D0F9032 +:10892000F0A6EDF075F10990F041E0FD530510BDA2 +:10893000100280030207B020097CD2A5D2B2D2B0C7 +:10894000753F11758202121633758226121659E58B +:1089500082541FF5EE753F0175820212163390F0B6 +:10896000727403F090FFF912166D12162585823588 +:1089700085833690F072E0FDBD0700503290F072B2 +:10898000E0FD90F07274012DF0121625AD82AF83D8 +:10899000C3E5359DE5369F50088D358F36D20A8068 +:1089A0001090F072E0FA1490F072F0C20A8002C2E5 +:1089B0000AD2090200B4300A5690F072E0FABA07FF +:1089C00000503E90F072E0FA90F07274012AF012BA +:1089D0001625AD82AF83C3E5359DE5369F500A8DE0 +:1089E000358F3675F1090200B490F072E0FA1490F8 +:1089F000F072F075F10AC2B0C2B2C209C2A502009B +:108A0000B475F10AC2B0C2B2C209C2A50200B490E4 +:108A1000F072E0FA603E90F072E0FA1490F072F0BA +:108A2000121625AD82AF83C3E5359DE5369F500A0A +:108A30008D358F3675F1090200B490F072E0FA902E +:108A4000F07274012AF075F10AC2B0C2B2C209C252 +:108A5000A50200B475F10AC2B0C2B2C209C2A50231 +:108A600000B475F10A0200B4C203C2027526019077 +:108A7000F041E0FA530208BA082B90FD65121A790A +:108A8000D2B375238075240F7525007510B7751145 +:108A9000F090F07112178D92B7C2B3C28EC28FC21E +:108AA00000C201C20243E704C2C375DE0075E400E0 +:108AB00075E30075DC00C2C275F10CC203C2027519 +:108AC000260190F041E0FA530220BA204C30CE4902 +:108AD00090FD65121A79D2A675240F75250090F0C5 +:108AE00008E0FA530280BA80137523047510B87534 +:108AF00011F090F06D12178D92B7801175230275E9 +:108B000010B87511F090F06D12178D92B7C2A6C211 +:108B10008EC28FC200C201C202E5C820E40343E74F +:108B200008741055C8FABA100343E71075F1229083 +:108B3000F041E0FA530204BA040280030209C3754B +:108B4000DC2075DE0D75E40FD2C3ADD2AFD3D2B247 +:108B5000D2B0C2CFD2C6752707752640E527604739 +:108B6000C005C007121625858235858336D007D00B +:108B700005C3E5359DE5369F500E90F19CE0FA90D7 +:108B8000F19CE5262AF08015C3ED9535EF9536501A +:108B90000C90F19CE0FA90F19CC39526F0E526C379 +:108BA00013F526152780B5C005C007121625858246 +:108BB00035858336D007D005C3E5359DE5369F5012 +:108BC0000C90F19CE0FA90F19CE5262AF0C005C0DB +:108BD000071216258582D48583D5D007D005D2CF3C +:108BE000752707752640E5276047C005C0071216A0 +:108BF00025858235858336D007D005C3E5359DE5CB +:108C0000369F500E90F19CE0FA90F19CE5262AF0F8 +:108C10008015C3ED9535EF9536500C90F19CE0FA38 +:108C200090F19CC39526F0E526C313F52615278001 +:108C3000B5C005C007121625858235858336D00755 +:108C4000D005C3E5359DE5369F500C90F19CE0FAC8 +:108C500090F19CE5262AF01216258582D68583D7C9 +:108C6000C2C6C2CFC2B0C2B2C2C375DC0075DE00DC +:108C700075E400C2CF75E20275F125C283C281C2DC +:108C80008275F10D90F178E0FA30E00675DC01753F +:108C9000E60175E40490F04193B8D78B0100000021 +:108CA000080801C000040000B757FF58E0FA53025B +:108CB00080BA80028003020A9190F007E0FA530222 +:108CC0001090F008E0FB74805B4A700B90F007E0B6 +:108CD000FA530202BA00F590F003E0FA30E078436C +:108CE000DC7E43E60675E40475E82075247F75256F +:108CF000007527067526207523087516417517F12E +:108D000090F19412191F75E81075270675262075C5 +:108D100023047516417517F190F19012191F75E82B +:108D20008075247F75250075270675262075230814 +:108D30007516417517F190F19512191F75E8407578 +:108D400027067526207523047516417517F190F1D5 +:108D50009112191F75E80043E78090F007E0FA537D +:108D600002C0BAC00575F10E800375F11675E700F3 +:108D70000200B475E72075F80075E70075E6007528 +:108D8000DE0075DC3075E40C75E30390F047E0FA23 +:108D9000530210BA10F575F10F75E60075DE007517 +:108DA000DC3075E40C75E30390F047E0FA530210F1 +:108DB000BA00F575F11075DC6F75E60675DE0F7596 +:108DC000E40E75DB0175E30390F047E0FA53020807 +:108DD000BA08F575F11175DC6F75E60675DE0F756D +:108DE000E40E75DB0175E30390F047E0FA530208E7 +:108DF000BA00F575F12775DC0075E60675DE0F75AE +:108E0000E40E75DB0075E30090F047E0FA530201D1 +:108E1000BA01F575F12875DC0075E60675DE0F758B +:108E2000E40E75DB0075E30090F047E0FA530201B1 +:108E3000BA00F590F005E0FA530240BA400675F129 +:108E4000120200B475F1160200B475E60675DC6F07 +:108E500075DE0F75E40E75DB0175E30390F047E0F6 +:108E6000FA530208BA08F575F1130200B475E60664 +:108E700075DC6F75DE0F75E40E75DB0175E303902D +:108E8000F047E0FA530208BA00F590F047E0FA53D1 +:108E90000204BA040675F1140200B475F11602005A +:108EA000B475DB0175E40A90F047E0FA530204BAA6 +:108EB00000F575F11575DB0175DC7F75E40E90F03A +:108EC00047E0FA530202BA00F575F1160200B4C287 +:108ED0000375DE0090F178E0FA30E00643DC0143F0 +:108EE000E60190F041E0FA530280BA80028003026A +:108EF0000CCA90F007E0FA53021090F008E0FB74FF +:108F0000805B4A700B90F007E0FA530202BA00F55A +:108F100090F003E0FA30E07843DC7E43E60675E447 +:108F20000475E80275247F752500752706752620CF +:108F30007523087516417517F190F19212191F7576 +:108F4000E8017527067526207523047516417517E7 +:108F5000F190F18E12191F75E80875247F752500B0 +:108F60007527067526207523087516417517F1902B +:108F7000F19312191F75E8047527067526207523CD +:108F8000047516417517F190F18F12191F75E800DD +:108F900043E72090F041E0FA530280BA8002800358 +:108FA000020D7B90F007E0FA53021090F008E0FB0E +:108FB00074805B4A700B90F007E0FA530202BA002B +:108FC000F590F003E0FA30E07843DC7E43E6067586 +:108FD000E40475E82075247F75250075270675263D +:108FE000207523087516417517F190F19412191F19 +:108FF00075E81075270675262075230475164175CA +:1090000017F190F19012191F75E88075247F75256E +:10901000007527067526207523087516417517F10A +:1090200090F19512191F75E8407527067526207571 +:1090300023047516417517F190F19112191F75E807 +:109040000043E78075F1160200B490F005E0FA30B5 +:10905000E403020FBFC20390F042E0FA530202BAE7 +:109060000257D2A2D2A2D2B2C2B290F0B7E0FA7442 +:10907000185AFC90F056E0FE90FFFFC004C00612A4 +:10908000166DD006D004BC180ABE1F04D2B78022C9 +:109090000E801FBC100AEE7004D2B780151E80121D +:1090A000C2A2C2A2C2A2C2A2F7C59B2C01000000AC +:1090B000040C01C0000400003001F10A90FFFFC061 +:1090C0000612166DD00690F056EEF0C2A275DC01C5 +:1090D00075E40490F043E0FA530280BA8002800302 +:1090E000020EA590F103E0FA30E20575DC3580034D +:1090F00075DC3190F003E0FA530201BA017B75E8A8 +:109100000C90FFF612166DD2B2C2B290FFFF12168B +:109110006D90F141E0FA74045AFC90F18FE0FEBCCE +:10912000040ABE7F04D2B7800E0E800BEC7008EEEE +:109130007004D2B780011E90F18FEEF075E808D26E +:10914000B2C2B290FFFF12166D90F141E0FA7408BE +:109150005AFC90F193E0FEBC080ABE7F04D2B780AF +:109160000E0E800BEC7008EE7004D2B780011E90DA +:10917000F193EEF075E800800690FFD712166D753A +:10918000DC0190F043E0FA530240BA40028003024F +:109190000F5775DE0890F103E0FA30E30575E40E31 +:1091A000800375E40C90F003E0FA530210BA107BD0 +:1091B00075C03090FFF612166DD2B2C2B290FFFFAA +:1091C00012166D90F141E0FA74015AFC90F1C9E079 +:1091D000FEBC010ABE7F04D2B7800E0E800BEC707D +:1091E00008EE7004D2B780011E90F1C9EEF075C090 +:1091F00020D2B2C2B290FFFF12166D90F141E0FA98 +:1092000074025AFC90F1CBE0FEBC020ABE7F04D28D +:10921000B7800E0E800BEC7008EE7004D2B78001A0 +:109220001E90F1CBEEF075C000800690FFD81216AC +:109230006D75DC0075E40090F0DBE0FA20E75AD2AF +:10924000A385308285318312166DD2B2C2B290FFEF +:10925000FF12166D74075590FEBE0613E5ED60040F +:1092600015ED8033E5EE602F15EE75ED078028BE15 +:10927000051774E125ED400405ED801B74E125EE32 +:10928000401505EE75ED10800EC2A3C2A3C2A3C2A5 +:10929000A390FFFF12166DC2A353E406C283C281DE +:1092A000209602C28275F11675E204C20290F04B5C +:1092B000E0FA530210BA1062E5C85430701D90FCF9 +:1092C000E1121A79758201121659AA828AF953029B +:1092D00004E4A20233FB4A701580E990FCD4121A10 +:1092E00079740855D1FAE4A20233FB4A60F33002E4 +:1092F0001EC28EC28FC20275F80075E70075D100DC +:1093000075E20075DC0075E60075F1040200B4C278 +:109310008EC28FC20275E208800690FFDF12166DC2 +:10932000E5C8543070397582011216598582F97575 +:109330003F117582021216337582271216598582E3 +:10934000ED758226121659E582541FF5EE758228B6 +:109350001216598582FF753F21758202121633C29B +:1093600003C20475F80075E70075D10075E200903E +:10937000F101E0FA53027890F102E0FB530380BB65 +:1093800080027A8090F102E0FB530310BB10027A56 +:109390000490F102E0FB530308BB08027A02BA0012 +:1093A0000302135D74045AFBBB041875DB0175DC02 +:1093B0007F75E60675E50075DE0F75E40E75E3034F +:1093C00002131F74025AFBBB021575DB0175DC7FAB +:1093D00075E60775DE0F75E40E75E30302131F745F +:1093E000F85AFBBB000302131F74F85AFBBB0802B8 +:1093F000803DBB1002805CBB1802807BBB20030257 +:1094000011C1BB28030211E5BB3003021209BB38AE +:109410000302122DBB4003021251BB4803021295F6 +:10942000BB50030212B8BB80030212FE02131F7569 +:10943000D90775DA0075DD0075DB0075DC0075E6AF +:109440000075DE0075E40075E50075E30875C00081 +:1094500002131F75D90775DA0075DD0075DB047519 +:10946000DC0075E60075DE0075E40875E50075E35F +:109470000075C00002131F75D90775DA0075DD008D +:1094800075DB0875DC0075E60075DE0075E40C75AB +:10949000E50075E30075C00002131F75D90775DA82 +:1094A0000075DD0075DB1075DC0075E60075DE0803 +:1094B00075E40C75E50075E31ACCB62D01000000CB +:1094C000001001C000040000F690AE4C0075C00012 +:1094D00002131F75D90775DA0075DD0075DB80751D +:1094E000DC2075E60075DE0075E40075E50075E3C7 +:1094F0000075C00002131F75D90775DA0075DD000D +:1095000075DB4075DC3075E60075DE0075E40475CA +:10951000E50075E30075C00002131F75D90775DA01 +:10952000B775DD3775DB0075DC6675E60275DE0F35 +:1095300075E40A75E50075E38075C00002131F75B8 +:10954000DAB775DD2775DB0075E60075DE0F90F183 +:1095500016E0FB530340BB401890F19EE0FB30E166 +:109560000875DC2075E40F800E75DC0075E40E8054 +:109570000675DC0075E40E75E50075E32075C0889E +:1095800002131F75D90775DAB775DD3775DB0075FE +:10959000DC7F75E60775DE0075E40475E50075E3AC +:1095A0004075C000806775DAB775DD2775DB00751B +:1095B000DC2075E60075DE0F90F116E0FB530340EA +:1095C000BB401890F19EE0FB30E10875DC2075E4AB +:1095D0000F800E75DC0075E40E800675DC0075E406 +:1095E0000E75E50075E31075C088802175D9077583 +:1095F000DAB775DD3775DB0075DC6775E60275DE99 +:109600000F75E40F75E50775E30375C08890FD4499 +:1096100012166D90F101E0FB74785BFA90F102E0B4 +:10962000FB530380BB80027A8090F102E0FB53037E +:1096300010BB10027A0490F102E0FB530308BB0850 +:109640000280030210C47A020210C490F005E0FA0E +:10965000530208BA080343D91090F005E0FA530208 +:1096600080BA800343D92030CE0575DAB780037500 +:10967000DAB375DD0790F003E0FA30E00343DD1064 +:1096800090F003E0FA30E40343DD2075C00075E597 +:109690000075DE0075DB0075E30075DC7F75E6079D +:1096A00090F103E0FA30E30575E406800375E40405 +:1096B000D2A875F117200303758701C2A80200B470 +:1096C000C20390F04CE0FA20E00690FF5612166DAF +:1096D00075F104D2040200B40200B490000122C06B +:1096E000D075D008C2AFC28EC28FD202D2AFD0D056 +:1096F00032C0E0C082C083C0D075D008C20BC2AFF8 +:10970000C28EC28FD202D20375DE0075E40075E30B +:109710000075E60075DC0075DB0030870B75F10025 +:10972000538048D20B0215F3A280728340030214C7 +:10973000C475F12090F056740FF090F0547407F057 +:1097400090F0A6740AF090F06D7408F090F07174C7 +:1097500008F090F1C8743FF090F1C9743FF090F1B7 +:10976000CA743FF090F1CB743FF090F18E743FF0EB +:1097700090F18F743FF090F190743FF090F19174FC +:109780003FF090F192743FF090F193743FF090F1BC +:1097900094743FF090F195743FF0C2CF90F19C74B7 +:1097A0007FF0D2CF90F19C747FF0C2CF5380C00283 +:1097B00015F3A2827281400302155690F0B2E0FACE +:1097C0004410F075F12090F056740FF090F054743E +:1097D00007F090F0A6740AF090F06D7408F090F025 +:1097E000717408F090F1C8743FF090F1C9743FF0C3 +:1097F00090F1CA743FF090F1CB743FF090F18E7409 +:109800000FF090F18F743FF090F190743FF090F171 +:1098100091743FF090F192740FF090F193743FF0D7 +:1098200090F194743FF090F195743FF0C2CF90F1B5 +:109830009C747FF0D2CF90F19C747FF0C2CF5380A4 +:10984000C00215F330C80975F10F53C8020215F3B1 +:1098500030C90975F11153C8010215F33086097535 +:10986000F1135380BF0215F330844090F0B2E0FA58 +:109870004410F075F12190F18E740FF090F18F7417 +:109880003FF090F190743FF090F191743FF090F1BF +:1098900092740FF090F193743FF090F194743FF054 +:1098A00090F195743FF05380CF803675F12190F19F +:1098B0008E740FF090F18F743FF090F190743FF040 +:1098C00090F191743FF090F19301B52601000000F2 +:1098D000FC1301C000040000ACEBA14592740FF032 +:1098E00090F193743FF090F194743FF090F195747F +:1098F0003FF05380CF90F007E0FA530A1090F00841 +:10990000E0FB74805B420AE4A20B33FB4A700B90CD +:10991000F007E0FA530A02BA00F5C2A8D2AFD0D0DD +:10992000D083D082D0E032D2B13095FD85F68285E9 +:10993000F783C2B122AA8275FE028AFA853FFB90A4 +:10994000FFFF12166D75FE0390FFFF12166D75FE78 +:109950000290FFFF12166D75FE0022AA8275FE02AC +:109960008AFC90FFFF12166D85FD8275FE0022AA0B +:1099700082AB834389018A8A8B8CD28C308DFDC265 +:109980008CC28D22852E82852F8312166DD2B2C293 +:10999000B2C2B290FFFF12166D309111AA327B0055 +:1099A000E5E9C39AF5E9E5EA9BF5EA8018309010FD +:1099B000AA327B00EA25E9F5E9EB35EAF5EA80050C +:1099C000740124FF2285EBED85ECEEE532C313F53F +:1099D00032E424FF22AAE9E5EAC4CAC4540F6ACAE1 +:1099E000540FCA6ACAFB852E82852F83C002C0032A +:1099F00012166DD003D002D2B2C2B2C2B290FFFF33 +:109A0000C002C00312166DD003D00230901BEAB51D +:109A10002A0BEBB52B07D297740124FF22AC267DCD +:109A200000EC2AFAED3BFB801AEAB52B0BEBB52CC8 +:109A300007D297740124FF22AC267D00EAC39CFA6A +:109A4000EB9DFB200503753300E5332533FCE4A2D1 +:109A50009033FD2CF5335333038AE9EBC454F0C53E +:109A6000E9C4C5E965E9C5E954F0C5E965E9F5EA80 +:109A700085EBED85ECEEE533B4020474018001E47E +:109A800024FF920CA20C7202E433F58224FF22AA76 +:109A900082AB837C00751200E0FD90FFF6C002C02F +:109AA00003C004C00512166DD005D004D003D00247 +:109AB000AE10AF11300103021843D2B2C2B290FF10 +:109AC000FFC002C003C004C005C006C00712166D67 +:109AD000D007D006D005D004D003D0028E828F8369 +:109AE000E0F8E5235200E8B5230474018001E42482 +:109AF000FF920D300D0FEDB52405740124FF22E512 +:109B0000262DFD800EEDB52505740124FF22EDC341 +:109B10009526FDEC2CF8E4A20D3328540FFCB4017B +:109B200000E433F88A828B83EDF0E4B8F50104F8A1 +:109B3000E4BC0A0104D3487001C3920EA20E720263 +:109B400092010217B2E424FF22AA82AB837C007543 +:109B50001500E0FD90FFD8C002C003C004C005128C +:109B6000166DD005D004D003D002AE13AF1430016F +:109B70000302191B90FFF6C002C003C004C005C059 +:109B800006C00712166DD007D006D005D004D0034A +:109B9000D002D2B2C2B290FFFFC002C003C004C064 +:109BA00005C006C00712166DD007D006D005D00438 +:109BB000D003D0028E828F83E0F8E5235200E8B50F +:109BC000230474018001E424FF920F300F0FEDB5E0 +:109BD0002405740124FF22E5262DFD800EEDB52518 +:109BE00005740124FF22EDC39526FDEC2CF8E4A2B8 +:109BF0000F3328540FFCB40100E433F88A828B83BE +:109C0000EDF0E4B8F50104F8E4BC0A0104D34870AF +:109C100001C39210A2107202920102186CE424FF98 +:109C200022AA82AB8390FFF6C002C00312166DD049 +:109C300003D002AC16AD17E5276052D2B2C2B29083 +:109C4000FFFFC002C003C004C00512166DD005D0CE +:109C500004D003D0028C828D83E0FEE5235206EE11 +:109C6000B523118A828B83E0FEE5262EFE8A828B45 +:109C700083F0800F8A828B83E0FEC39526FE8A8262 +:109C80008B83F0E526C313F526152780AAD2B2C22E +:109C9000B290FFFFC002C003C004C00512166DD011 +:109CA00005D004D003D0028C828D83E0FCE52352E2 +:109CB00004ECB5230D8A828B83E004FC8A828B83BB +:109CC000ECF022AA82AB8390FFD8C002C003121628 +:109CD0006DD003D002AC18ADC2E6CB9801000000F5 +:109CE000F81701C000040000FF31722919E5276050 +:109CF0006890FFF6C002C003C004C00512166DD004 +:109D000005D004D003D002D2B2C2B290FFFFC0028D +:109D1000C003C004C00512166DD005D004D003D016 +:109D2000028C828D83E0FEE5235206EEB523118A74 +:109D3000828B83E0FEE5262EFE8A828B83F0800FE5 +:109D40008A828B83E0FEC39526FE8A828B83F0E5B0 +:109D500026C313F52615278094D2B2C2B290FFFF16 +:109D6000C002C003C004C00512166DD005D004D0D7 +:109D700003D0028C828D83E0FCE5235204ECB523F2 +:109D80000D8A828B83E004FC8A828B83ECF022AA0A +:109D900082AB834389108A8B8B8DD2AFD2ABD28EAC +:109DA00022006159000000000000000000000000D7 +:109DB00000000000000000000000000000000000A3 +:109DC0000000000000000000000000000000000093 +:109DD0000000000000000000000000000000000083 +:109DE0000000000000000000000000000000000073 +:109DF0000000000000000000000000000000000063 +:109E00000000000000000000000000000000000052 +:109E10000000000000000000000000000000000042 +:109E20000000000000000000000000000000000032 +:109E30000000000000000000000000000000000022 +:109E40000000000000000000000000000000000012 +:109E50000000000000000000000000000000000002 +:109E600000000000000000000000000000000000F2 +:109E700000000000000000000000000000000000E2 +:109E800000000000000000000000000000000000D2 +:109E900000000000000000000000000000000000C2 +:109EA00000000000000000000000000000000000B2 +:109EB00000000000000000000000000000000000A2 +:109EC0000000000000000000000000000000000092 +:109ED0000000000000000000000000000000000082 +:109EE0000000000000000000000000000000000072 +:109EF0000000000000000000000000000000000062 +:109F00000000000000000000000000000000000051 :109F10000000000000000000000000000000000041 -:109F2000000000000000000000000000BBC730007F -:109F3000000000004BC63000000000003FC73000AA -:109F400000000000A9F930000000000063FB3000B1 -:109F5000010000000000000001000000BBC730004D -:109F600001000000FFC5300001000000BFC6300046 -:109F700001000000A5F93000010000006FFA300078 -:109F80005700FE00FFFFFF00080000000E00000069 -:109F900047006D004A006A006900E6006B00D900C6 -:109FA0006C00D80058012C0059012C0065012400D8 -:109FB000D6012D006E0218008D026300AE0229004A -:109FC000CF026000D5020400E0020C00FE02A600F1 -:109FD000FF02A6002603C300430366007F03390087 -:109FE0008503000092030A0093030A00FB0381002B -:109FF000FE038400FF0384000104C0002004C000AD -:10A0000021043E002304030024043F002504000033 -:10A0100026043F00270420002804B8002904170064 -:10A020002A0439002B0401002C0420002F045800BE -:10A03000300413003104FF003204FF0047044F00D6 -:10A040004A0424004B040F004E04710052041A000D -:10A0500059040400218FE2C301000000F01F01C079 -:10A0600058000000800B431185043C00FFFFFF00F7 -:10A07000FFFFFF00FFFFFF00FFFFFF00FFFFFF00EC -:10A08000FFFFFF00FFFFFF00FFFFFF00FFFFFF00DC -:10A0900000000000000000000000000001000000BF +:109F20000000000000000000000000000000000031 +:109F30000000000000000000000000000000000021 +:109F40000000000000000000000000000000000011 +:109F50000000000000000000000000000000000001 +:109F600000000000000000000000000000000000F1 +:109F700000000000000000000000000000000000E1 +:109F800000000000000000000000000000000000D1 +:109F900000000000000000000000000000000000C1 +:109FA00000000000000000000000000000000000B1 +:109FB00000000000000000000000000000000000A1 +:109FC0000000000000000000000000000000000091 +:109FD0000000000000000000000000000000000081 +:109FE0000000000000000000000000000000000071 +:109FF0000000000000000000000000000000000061 +:10A000000000000000000000000000000000000050 +:10A010000000000000000000000000000000000040 +:10A020000000000000000000000000000000000030 +:10A030000000000000000000000000000000000020 +:10A040000000000000000000000000000000000010 +:10A050000000000000000000000000000000000000 +:10A0600000000000000000000000000000000000F0 +:10A0700000000000000000000000000000000000E0 +:10A0800000000000000000000000000000000000D0 +:10A0900000000000000000000000000000000000C0 :10A0A00000000000000000000000000000000000B0 -:10A0B0000000000000000000000000001DCD60FA5C -:10A0C00001000000008002C000040000104AA06DE2 -:10A0D000002109A010B503F096E9094C606003F077 -:10A0E00096E903F098E92068002803D000220D21AA -:10A0F00003F094E9002010BD776C616E0000000051 -:10A1000080EF00C01F480121490341611E490161E0 -:10A110001E49416105210161704710B500F044F905 -:10A120001B48802103F07EE91A48DC2103F07AE91C -:10A1300018481421DC3003F076E916485021F0303D -:10A1400003F070E9002010BDF0B50024124E134F4B -:10A1500008E0C519686803F06AE969680120884069 -:10A16000B060641CE00039580029F2D10C49172076 -:10A1700003F05CE9FFF7C6FF0120C005B0600020D6 -:10A18000F0BD000080290080070000FF10200000C3 -:10A19000B04300041C7D020000300080DC7B020024 -:10A1A000330100000449034808600549034808607A -:10A1B000704700003D070000F0BA020040000004B4 -:10A1C000F4BA020030480068816801221204114389 -:10A1D00081608168FF2220321143012252039143A2 -:10A1E000816041681211114341604168D2001143FE -:10A1F000416070470904014323480068816170474A -:10A2000021490968CA68120C12040243CA607047E7 -:10A210001D4909684A69120C120402434A617047D9 -:10A220000904014318480068C1637047164909686A -:10A230004A68120A120202434A60704712480068D4 -:10A240008030416806229143416070470E4A12688F -:10A250008032536A09011B0F1B0709090B43536224 -:10A26000116A4003C90CC904400B01431162106814 -:10A270001F21090488430121090540181060106856 -:10A28000490008431060704794EF00C010B500F01B -:10A29000C3FD002000F056FD00F0E9FC002000F0B6 -:10A2A000B0FC00F0AFFC00F0B5FC00F028FD00F0C1 -:10A2B00083FD00F026FD00F023FD002010BD10B549 -:10A2C00000F08FFE00F0A6FE03F0B4E803F0B6E85D -:10A2D00003F0B8E800F0A0F8002801D0012010BD7C -:10A2E000D8F7C0FF002010BD10B500F0D7FB244800 -:10A2F0002249016023494160234981602348416B21 -:10A3000008229143416322480168224A11400160BA -:10A31000002010BD0020704730B59408002203E0F3 -:10A320009300CD58521CC550A242F9D330BD9308BA -:10A33000002210B502E09400521C01519A42FAD357 -:10A3400010BD0B22AD20D2010021800210B5FFF715 -:10A35000EEFF072210491148D201FFF7DDFF03226B -:10A360000F4910481202FFF7D7FF00F03FFE00F040 -:10A3700035FC00F0CCFC002010BD00000F002000D8 -:10A380008029008080808080800A808040A80080B2 -:10A3900000280080FFCFFFCFF077330080B90200A4 -:10A3A000707B330000BD02003EB500200122029008 -:10A3B000342102A803F04AE800281BD114490120E7 -:10A3C0000870029800F008FE124CFF252D35A522DA -:10A3D0002900200003F03EE80C22042101920091A4 -:10A3E000029822000A212B0003F038E8002801D04F -:10A3F00001203EBD00203EBD002810B500D1FEE783 -:10A400000068002800D1FEE703F02CE810BD000032 -:10A41000247C02005C7E020000B50D49002087B05C -:10A420004860020001001E2003AB07C30200094878 -:10A43000FF21CD316B4607C3A838074A002307A187 -:10A4400003F014E80006000E00D0012007B000BDA4 -:10A450009CEF00C0543101C0631100C049646C65B9 -:10A4600000000000124911480860134911480860B3 -:10A4700013491248086014491248086014491348E7 -:10A4800008601549134808601549144808601548C4 -:10A4900015494068086016491448086015490420A9 -:10A4A000086016491448086070470000E33000C097 -:10A4B000A4BA0200CF540000A8BA02000DDD31009A -:10A4C000ACBA020031EB000088BA0200D4CF9BA1E5 -:10A4D00001000000FC8302C0000400004A31AF64A8 -:10A4E000E13F02008CBA0200A510000090BA020001 -:10A4F000D910000094BA0200FC1C01C09CBA0200F2 -:10A5000040000004A0BA020098BA0200911E0200A6 -:10A51000ECBD020004493220086005490348086088 -:10A520000549044808607047D0BA0200FD100000D9 -:10A53000CCBA020009110000C8BA02001A4810B5CE -:10A54000806802F0A2EF10BDFEB500251748057027 -:10A55000154C1748206100F037F800281FD1144827 -:10A560002838E06020000C30FFF750FF114E1248F1 -:10A57000C122310002F078EF0D481049D038A060B8 -:10A5800000220FA06B4607C320000B4932000830A1 -:10A590000B2302F07EEF002801D00120FEBD012038 -:10A5A000A56160600020FEBD2C7C02002800000434 -:10A5B0008C8002006C070000209702000135020029 -:10A5C0004D4143205478000008B50C220092094800 -:10A5D0000422062303A102F060EF002800D001202E -:10A5E00008BD000054784D676D7438303231314DFC -:10A5F000736751003C7C02000A4904200A4A086043 -:10A600000A211160094908600A49094808600B4994 -:10A61000094808600B490A4808600C490A48086064 -:10A6200070470000D4BA0200DCBA0200D8BA0200B7 -:10A630006DD20000E0BA02004F2C0000E4BA020024 -:10A64000391E0000E8BA02007D160000ECBA0200D4 -:10A6500007490E200870084906480860084907485D -:10A6600008600949074808600949084808607047B8 -:10A6700000BB0200545E02C004BB0200731E000057 -:10A6800008BB0200152000000CBB02005B2000008C -:10A6900010BB020007210848C90110B502F0CCEE3A -:10A6A000054806492038086304480C22012130304F -:10A6B00002F0F6EE10BD0000403501C0803801C048 -:10A6C00070B50024114D12481421AC6002F0B4EEB4 -:10A6D0000F4814213C3802F0B0EE0D481421283800 -:10A6E00002F0AAEE0A481421143802F0A6EE084837 -:10A6F00069681430046144618461C4618160054902 -:10A7000001620549416202F0D0EE70BDB8EF00C0B1 -:10A710004C46000443400200594000000249012019 -:10A72000086002490860704760BB02005CBB020021 -:10A73000034964200880034907200880704700000F -:10A7400074BB020076BB0200054904480860064954 -:10A75000044808600649054808607047DD66000047 -:10A76000E0BB020057660000A0BB02009766000035 -:10A77000E8BB02000EB502F09CEE0F48002102F08B -:10A780009CEE7D200001002200900B480192029275 -:10A790000A4A743000230AA102F092EE64200022DB -:10A7A0000090054801920292094AE830002309A16D -:10A7B00002F086EE0EBD000080480004B5AC00003B -:10A7C000536C656570436F6E6669726D546D72008F -:10A7D000AFA9000041505F4E756C6C506B74446FB4 -:10A7E0006E65546D720000000EB53C4800F01DF817 -:10A7F0003A493A48343102F068EE39480022009074 -:10A80000364801920292374AF830002336A102F00E -:10A8100058EE00226420019202920090364A3B4892 -:10A82000002336A102F04CEE0EBD70B50400384A8C -:10A830000021001D02F04CEE2000364A211D34306C -:10A8400002F046EE20004030334A211D050002F0A0 -:10A8500040EE20001030314A211D060002F038EE93 -:10A8600020002F4A31001C3002F032EE20002D4A29 -:10A870003100283002F02CEE20002B4A29004C3009 -:10A8800002F026EE2000294A2900583002F020EE7E -:10A890002000274A2900643002F01AEE2000254AE1 -:10A8A0003100943002F014EE2000234A3100A03031 -:10A8B00002F00EEE2000214A2900703002F008EE6E -:10A8C00020001F4A29007C3002F002EE20001D4AC1 -:10A8D0002900883002F0FCED70BD00005E7E827FB2 -:10A8E00001000000F88702C00004000019EB7C089A -:10A8F000E8490004B80B0000B5AC0000536C656576 -:10A9000070436F6E6669726D546D7200AFA900007E -:10A910004E756C6C506B74446F6E65546D720000B4 -:10A920000C4B0004678A00001F8F00009D90000000 -:10A930005D8B0000FF8C0000ED8B00008791000014 -:10A940009F92000065960000239F0000699E000012 -:10A9500027A000007DA2000059A500000949084871 -:10A9600010B5886107480C220121183002F0A2EDD1 -:10A97000FFF744FFFFF708FF02F0B8ED10BD00003D -:10A98000A43B01C088F100C03EB500F0F9FB0028EF -:10A9900032D12E4C2C4860620C22200000920422FE -:10A9A000243006232AA102F082ED27480C223C30F5 -:10A9B000A06220000092042228300A2328A102F07D -:10A9C00076ED2A4D2A48B122290002F058ED1E48A2 -:10A9D0002849C8382062002227A06B4607C3200000 -:10A9E00023492A0020300C2302F05CED002803D11B -:10A9F000FFF7B4FF00203EBD01203EBD10B5134C53 -:10AA0000206A02F04CED10480C222038E062200051 -:10AA100001212C3002F04EED10BD1A491848086093 -:10AA20001A49194808601B49194808601B491A4807 -:10AA300008601C491A4808601C491B4808601D49E9 -:10AA40001B48086070470000A03C01C0CCF100C06A -:10AA5000434250726F63534D454D73675100000080 -:10AA6000434250726F634D7367510000A4060000AB -:10AA7000DC6501C0095600C043422050726F63007C -:10AA8000FFE9000020BC020035EA000024BC0200FF -:10AA90002DEA000028BC02005D5400002CBC02001E -:10AAA000657000C030BC0200299A010038BC020069 -:10AAB000879A01003CBC02004B480221017304212B -:10AAC000417370474848F8B50024001F0460FFF741 -:10AAD0008DFB02F010ED45490D5C02F010ED2900F0 -:10AAE00002F010ED424E2300320002F010ED401C47 -:10AAF000614105042D0C02F0FEEC3E4940000F5A66 -:10AB000002F008ED390002F0FEEC2300320002F002 -:10AB1000FEEC401C61410004000C2900FFF77EFBA5 -:10AB200002F0E8EC34490D5C02F0E8EC290002F098 -:10AB3000EAEC2300320002F0EAEC401C614105041B -:10AB40002D0C02F0D8EC2D490F5C02F0D8EC390046 -:10AB500002F0D8EC2300320002F0D8EC401C614136 -:10AB60000004000C2900FFF76FFB0820FFF75CFBD7 -:10AB700002F0C4EC310002F0D2EC401C0004000CE6 -:10AB8000FFF75AFB02F0BAEC052102F0BCEC1C4ABC -:10AB9000230002F0BCEC1922801861410006000E6F -:10ABA000FFF758FB601E02F0BEEC032002F0BEEC83 -:10ABB0000C2002F0BCECFFF755FB02F0BCEC02F0FD -:10ABC000BEEC040002F0BEEC2100FFF753FB302086 -:10ABD00002F0ACEC0320000202F0A8ECFFF76CFFDF -:10ABE00002F0B4ECF8BD000058F200C05C7A02003C -:10ABF00040420F00467A0200727A0200677A020031 -:10AC0000C0C62D000149012008707047A0B902009C -:10AC10000121092000070160002141607047484878 -:10AC2000016B8022114301637047704710B5FFF735 -:10AC3000EFFFFFF7F4FF02F08EEC10BDFF2330B5FD -:10AC4000C133202502F056EC2C01052803D002F078 -:10AC500052EC012800D123002900180002F07EECFC -:10AC6000384842680321C9048A43426082688A43A3 -:10AC70008260354801684022114301600168214328 -:10AC8000016001680522114301603049002008601D -:10AC900002F068EC30BD70B52D4CA0682D4900095C -:10ACA00000010843A060E06807220009000110438A -:10ACB000E06020690009000108432061A069C91F04 -:10ACC0000843A061092002F052EC206822490840A4 -:10ACD000206020682505A8432060206803214906DC -:10ACE0000843206020681D4908402060EE1D3E8E0C -:10ACF00001000000F48B02C000040000ED8409BCD8 -:10AD0000606880098001606002F036ECC10603D5FE -:10AD10002068610508430BE0410605D56068012104 -:10AD200049040843606004E0C00702D0206828435B -:10AD30002060B02002F028EC70BD7047704710B55D -:10AD400000F03EF90B49C86010BD0C490A48086084 -:10AD500070470000400C0090002900800023008014 -:10AD6000002400800021008007800000FFF7DF57EB -:10AD7000FFDFBFFFC0F200C0C5F3000018BA020039 -:10AD8000704770B502F004EC052002F006EC4006B6 -:10AD900003D402F006EC002070BD08211D2002F053 -:10ADA00004EC0A2002F004EC0B2002F0F6EB0007A2 -:10ADB000F7D50C2002F0F0EB05000B2002F0ECEBD5 -:10ADC0004007440D2C43E1081C2002F0F6EB1D2047 -:10ADD00002F0E2EB6107C006090EC00E01431D2020 -:10ADE00002F0EAEB08211D2002F0EAEB02F0D8EBBA -:10ADF000012070BD10B501F0DCFB02F0CAEB31217F -:10AE0000332002F0DAEB1421242002F0D6EB662185 -:10AE1000412002F0D2EB02F0C4EB02F0D6EB64204A -:10AE200002F0C6EB02F0D4EB02F0D6EB882105204D -:10AE300002F0C2EB0121082002F0BEEB58210A20EB -:10AE400002F0BAEB4221092002F0B6EB02F0C8EBA7 -:10AE500010BD0000F8B50020C043644D2860686054 -:10AE6000644963484860644A8805C90B0368401810 -:10AE70009042FBD300200B229203036840189042BB -:10AE8000FBD301208006006802F0AEEB002002F048 -:10AE9000B0EBC72002F080EB012630430100C72051 -:10AEA00002F0AAEBC72002F078EB402738430400F9 -:10AEB0000100C72002F0A0EB200002242043010083 -:10AEC000C72002F09AEBC82002F066EBC007FAD068 -:10AED000C72002F062EBA04304000100C72002F08B -:10AEE0008CEB2000B84304000100C72002F084EB83 -:10AEF0002000202738430100C72002F07EEBC72046 -:10AF000002F04AEB042420430100C72002F074EB56 -:10AF1000C82002F042EB8007FAD5C72002F03CEBD4 -:10AF2000A043B84304000100C72002F066EB6108AB -:10AF30004900C72002F060EB002002F05AEB12201B -:10AF400002F02AEB802420430106090E122002F0B1 -:10AF500034EB122002F020EB002002F04AEB12202A -:10AF600002F01AEBA0430106090E122002F024EBB6 -:10AF7000122002F012EB02F044EB20490868304343 -:10AF800008601F4800781F48007A1F49087D1E4A44 -:10AF90002043203A5063087D4006FCD5087DA0433D -:10AFA0005063A869012109030843A86102F0E4EA9B -:10AFB000400603D515491B20400148600020F8BD1C -:10AFC00010B5FFF7DEFE0948C169114A090E0906EE -:10AFD0008918C161C169012252061143C161002073 -:10AFE00002F012EB0120C00310BD00000021008020 -:10AFF0000200030000230080002002C0002D00801A -:10B0000000200090E02A009020240090802F0080F3 -:10B010009A991900342110B502F0FAEA10BD10B562 -:10B0200002F0FAEA10BD00001649154808601749F9 -:10B030001548086016491E20086016490020C043C4 -:10B04000086016491448086016491548086070479A -:10B0500070B520210C4802F004EA2D2108480901AE -:10B0600002F0FEE9084A064C002018214143956889 -:10B070000919401C4D611E289160F6D370BD000077 -:10B08000C08402003CBA02009087020028BA020085 -:10B0900040BA02002CBA02001027000030BA0200A9 -:10B0A00025FF000034BA02002A4A70B5140050345B -:10B0B00000231000946010305360D0600120010123 -:10B0C00089180D00103D8D6048602035401C042813 -:10B0D000CD60F4D3042050641E483030906430308A -:10B0E000D064A360E26001002039C36081601A4926 -:10B0F0001030086018480C22012102F0D3C29BD105 -:10B1000001000000F08F02C000040000BE5EDAD033 -:10B11000E6E9002070BDF8B50F00144D06000021CF -:10B120002868C94302F086EA0F495031CC6808000C -:10B13000103084420FD0E068C86081600020A060B9 -:10B14000E060286802F07AEA60683A00310002F0B4 -:10B150007AEA2000F8BD286802F070EA0020F8BD05 -:10B1600010B502F074EA10BD204101C030F300C0F8 -:10B170000749064808600849064808600849074822 -:10B180000860084980200860704700003DFF00000B -:10B190005CBA02004FFF000060BA0200F800000431 -:10B1A00054BA020058BA020070B5194802F052EAC7 -:10B1B00017480C3002F04EEA164E002425005C20A1 -:10B1C000604381194D603550114802F048EA641C13 -:10B1D0001A2CF4DB002070BD10490F4810B5086030 -:10B1E00010490F48086011490F480860114910487C -:10B1F0000860124910480860124911480860134954 -:10B200001148086013491248086001F0D9FE10BDCA -:10B210001C960200C48C0200CDFF000068BA020038 -:10B22000CFFF000080BA0200D1FF000070BA020018 -:10B23000DFFF00006CBA0200F5FF000074BA0200E4 -:10B240000B00010078BA02001F0001007CBA020066 -:10B250003300010084BA020010B5FFF779F910BD80 -:10B260003EB5144C1248E06020000C30FFF7ECF8BB -:10B270004B252D011048D122290002F014E90C4879 -:10B280000E49A838A06000220DA06B4607C320001D -:10B2900009492A0008300B2302F018E9002800D0E1 -:10B2A00001203EBD034810B5806802F00CE910BDD6 -:10B2B000588802007C7C02008C9E020049690200D2 -:10B2C0004D4143205478204E6F7469667900000028 -:10B2D0003EB50C2219481849C16020310161203166 -:10B2E000416101210C3002F0FAE814480C220021DF -:10B2F000103002F0F4E811480C220021143002F062 -:10B30000EEE80D48FF212131603002F0B4E80A4830 -:10B310000021183802220160426001228160C2606F -:10B3200001822421418206496C462CC92CC4009913 -:10B33000416102F098E93EBD4C4201C040F300C0BB -:10B34000D07A0200014901200860704714BB020056 -:10B35000084907480860084912200860074920206A -:10B3600008600849064808600849074808607047AF -:10B37000F81202C034BB020038BB02003CBB020022 -:10B380008134010040BB0200A534010044BB02002F -:10B3900004490348086005490348086070470000F5 -:10B3A0000D36010018BB0200C13F01001CBB0200AA -:10B3B00070B504000D00160002F058E9A8433043B0 -:10B3C0000100200002F056E970BD0821080010B508 -:10B3D00002F050E981208021800002F050E9022132 -:10B3E000DD2002F04CE90221DD2002F04CE9802151 -:10B3F0005A2002F048E9FF217F2002F03CE9FF4893 -:10B40000002102F038E9F3200021800002F032E947 -:10B4100004212E2002F032E9022002F0D4E80421B7 -:10B420002E2002F030E940212D2002F024E91021E5 -:10B430002E2002F020E910BDF3B593B000252E00B8 -:10B4400013980D9504022000FF3056300004000CC4 -:10B4500007950695129002F01AE905902000FF303A -:10B4600057300004000C119002F010E90490200005 -:10B47000FF3059300004000C109002F008E90390EE -:10B480002000FF30B2300004000C0F9002F0FEE804 -:10B49000FF34D53402902004000C0E9002F0F6E840 -:10B4A000019093202021C00002F0E4E8D3486421F9 -:10B4B000163002F0E0E8A1214F2002F0DCE81298FB -:10B4C000FF2102F0E8E81198382102F0E4E8109832 -:10B4D000082102F0E0E80F98012102F0DCE80E9864 -:10B4E000012102F0DCE80E98042102F0DCE8FF20E4 -:10B4F00000217C3002F0BEE8FF20E0217A3002F02B -:10B50000BAE8BE4F04213F1D380002F09768111EB3 -:10B5100001000000EC9302C000040000019BFF63E7 -:10B52000B8E80A2002F058E800247F20002C099097 -:10B5300002D17F224A2101E07F22A221139802F04A -:10B54000C0E8B348002102F0A0E8B1481A21401C2D -:10B5500002F09AE87727FF001821380002F094E8FB -:10B56000022002F03AE8FF2080210C3002F094E83B -:10B57000012C03DB0421781C02F08EE8A1214F206E -:10B5800002F082E81298FF2102F08EE81198302133 -:10B5900002F08AE81098002102F086E80F98012155 -:10B5A00002F082E8FF2080210C3002F076E8984813 -:10B5B0001A21401C02F068E895480421183002F076 -:10B5C00064E877203821C00002F05EE8002C05D145 -:10B5D0008F480421001D02F05CE804E08C4804213F -:10B5E000001D02F05AE88A4F40213F1D380002F04A -:10B5F00050E88021380002F050E8282001F0ECEFFC -:10B600008021B81E02F040E8022001F0E6EF7F1E24 -:10B6100002E00A2001F0E0EF380002F032E8000614 -:10B62000F7D5139800280ED17920C00002F028E841 -:10B6300005007748143002F024E8060074481530FD -:10B6400002F01EE80D900D9836070006000E0D90D2 -:10B650000D99360F300240180B906D48AD06AD0EB7 -:10B660000021801C0C9502F010E869488021001D23 -:10B6700002F00EE8FF2080210C3002F00AE8644856 -:10B680008021801C02F000E80A2001F0A6EF62E0B1 -:10B690000A2001F0A2EF380001F0F2EF000605D415 -:10B6A0005B48001D01F0ECEFC006F1D55848E230D0 -:10B6B00001F0E6EF0890139800280ED17920C00021 -:10B6C00001F0DEEF05005248143001F0DAEF060019 -:10B6D0004F48153001F0D4EF0D900D983607000655 -:10B6E000000E0D900D99360F300240180C99AD06E2 -:10B6F000AD0E691A88400B99401A0A9009987F2864 -:10B7000003D10A980690099807900A9801F0D1FA97 -:10B710000700069801F0CDFA874203D80A980690F0 -:10B7200009980790089809900898002C03D1020600 -:10B73000120E4A2102E00206120EA221139801F015 -:10B74000C0EF334F08213F1D380001F0A6EF08215C -:10B75000380001F09EEF7727FF00380001F090EFEE -:10B76000000698D5079802061498120E002C025570 -:10B7700001D14A2100E0A221139801F0A2EF244850 -:10B780000021801C01F080EFFF2080210C3001F0AF -:10B7900080EF641C022C00DAC7E60599129801F0CC -:10B7A00084EF0499119801F080EF0399109801F04B -:10B7B0007CEF02990F9801F078EF01990E9801F053 -:10B7C00074EF15B0F0BDF8B523221121002001F06F -:10B7D00078EF0025282068430E4900244718AE0062 -:10B7E0000BE00D48805900190004000C01F058EFDF -:10B7F000A100641C2406240E785007480C308059A0 -:10B80000A042EEDC6D1C2D062D0E032DE2D3F8BDFB -:10B81000B5030000144401C054F400C0F8B523225D -:10B820001121002001F04CEF00250024282068435E -:10B83000FF494718AE000DE0A00038580106FD484A -:10B84000090E805900190004000C01F02EEF641C51 -:10B850002406240EF7480C308059A042ECDC6D1C05 -:10B860002D062D0E032DE0D303221121002001F01F -:10B8700028EFCCE710B504022000FF30513000045F -:10B88000000C382101F010EF2000FF30563000048A -:10B89000000CFF2101F008EF2000FF3057300004BA -:10B8A000000C3A2101F000EF2000FF305830000476 -:10B8B000000CD92101F0F8EE2000FF3059300004CF -:10B8C000000C162101F0F0EE2000FF30B030000433 -:10B8D000000C1F2101F0E8EE2000FF30B130000421 -:10B8E000000C232101F0E0EE2000FF30B330000413 -:10B8F000000C102101F0D8EE2000FF30C63000040B -:10B90000000CC92101F0D0EE2000FF30AC30000463 -:10B91000000CF62101F0C8EE2000FF30F6621F286F -:10B9200001000000E89702C00004000052412C0F03 -:10B93000E3300004000C002101F0C0EE2000FF30D5 -:10B94000E4300004000C002101F0B8EE2000FF30CC -:10B95000A2300004000C032101F0B0EE2000FF3003 -:10B96000A3300004000C122101F0A8EE2000FF30EB -:10B97000A7300004000C0E2101F0A0EE2000FF30E3 -:10B98000A8300004000C3A2101F098EE2000FF30AE -:10B99000A9300004000C642101F090EE2000FF307B -:10B9A00048300004000C402101F088EE2000FF30F8 -:10B9B000A5300004000C442101F080EEFF34241D6A -:10B9C0002004000C802101F07AEE10BDFEB5382174 -:10B9D00004022000FF3051300004000C01F06EEE34 -:10B9E0002000FF3056300004000CFF2101F066EE0D -:10B9F0002000FF3057300004000C382101F05EEECB -:10BA00002000FF3058300004000CD92101F056EE20 -:10BA10002000FF3059300004000C162101F04EEEDA -:10BA20002000FF30B0300004000C1F2101F046EE72 -:10BA30002000FF30B1300004000C222101F03EEE66 -:10BA40002000FF30B3300004000C102101F036EE6E -:10BA50002000FF30C6300004000CC921029001F024 -:10BA60002EEE2000FF30AC300004000CF62101F077 -:10BA700026EE2000FF30E3300004000C002101F02E -:10BA80001EEE2000FF30E4300004000C002101F025 -:10BA900016EE2000FF30A23005042D0C03212800F3 -:10BAA00001F00CEE2000FF30A3300604360C12210A -:10BAB000300001F004EE2000FF30A73007043F0CF7 -:10BAC0000E21380001F0FAED2000FF30A83000040C -:10BAD000000C3A21019001F0F2ED2000FF304830D7 -:10BAE0000004000C402101F0EAED2000FF30A530F9 -:10BAF0000004000C4421009001F0E0EDE01DFC305A -:10BB00000004000C102101F0DAEDFFF766FE2000C2 -:10BB1000FF30ED300004000CFF2101F0D0ED2000DB -:10BB2000FF30EE300004000CFF2101F0C8ED2000D2 -:10BB3000FF30EF300004000CFF2101F0C0ED2000C9 -:10BB4000FF30F0300004000CFF2101F0B8ED2000C0 -:10BB5000FF30A1300004000CD32101F0B0EDD3215F -:10BB6000280001F0ACEDD321300001F0A8ED200059 -:10BB7000FF30A4300004000CD32101F0A0ED0098A8 -:10BB8000D32101F09CED2000FF30A6300004000C12 -:10BB9000D32101F094EDD321380001F090ED01980C -:10BBA000D32101F08CED2000FF30A9300004000CFF -:10BBB000D32101F084ED2000FF30AA300004000CF6 -:10BBC000D32101F07CED2000FF30C1300004000CD7 -:10BBD0004E2101F074ED2000FF30C2300004000C53 -:10BBE0004E2101F06CED2000FF30C3300004000C4A -:10BBF0004E2101F064ED2000FF30C4300004000C41 -:10BC00004E2101F05CED2000FF30C5300004000C37 -:10BC10004E2101F054ED02984E2101F050ED20002C -:10BC2000FF30C7300004000C4E2101F048ED200029 -:10BC3000FF30C8300004000C4E2101F040ED200020 -:10BC4000FF3003E0144401C054F400C0C9300004C4 -:10BC5000000C4E2101F032EDFF34CA342004000CF8 -:10BC60004E2101F02CED03221121002001F032EDD4 -:10BC7000FEBD10B504022000FF3051300004000C5E -:10BC8000382101F01CED2000FF3056300004000C7C -:10BC9000FF2101F014ED2000FF3057300004000CAC -:10BCA0003A2101F00CED2000FF3058300004000C68 -:10BCB000D92101F004ED2000FF3059300004000CC0 -:10BCC000162101F0FCEC2000FF30B0300004000C25 -:10BCD0001F2101F0F4EC2000FF30B1300004000C13 -:10BCE000232101F0ECEC2000FF30B3300004000C05 -:10BCF000102101F0E4EC2000FF30C6300004000CFD -:10BD0000C92101F0DCEC2000FF30AC300004000C55 -:10BD1000F62101F0D4EC2000FF30E3300004000CE9 -:10BD2000002101F0CCEC2000FF30E43086AE32CFB1 -:10BD300001000000E49B02C000040000A62E59BBD5 -:10BD40000004000C002101F0C4EC2000FF30A23000 -:10BD50000004000C032101F0BCEC2000FF30A330F4 -:10BD60000004000C122101F0B4EC2000FF30A730D9 -:10BD70000004000C0E2101F0ACEC2000FF30A830D4 -:10BD80000004000C3A2101F0A4EC2000FF30A9309F -:10BD90000004000C642101F09CEC2000FF304830CE -:10BDA0000004000C402101F094EC2000FF30A5308D -:10BDB0000004000C442101F08CECFF34241D20040D -:10BDC000000C802101F084EC10BDF0B504022000CD -:10BDD000FF3051300004000C382185B001F078ECC0 -:10BDE0002000FF3056300004000CFF2101F070EC01 -:10BDF0002000FF3057300004000C382101F068ECBF -:10BE00002000FF3058300004000CD92101F060EC14 -:10BE10002000FF3059300004000C162101F058ECCE -:10BE20002000FF30B0300004000C1F2101F050EC66 -:10BE30002000FF30B1300004000C222101F048EC5A -:10BE40002000FF30B3300004000C102101F040EC62 -:10BE50002000FF30C6300004000CC921039001F01F -:10BE600038EC2000FF30AC300004000CF62101F06B -:10BE700030EC2000FF30E3300004000C002101F022 -:10BE800028EC2000FF30E4300004000C002101F019 -:10BE900020EC2000FF30A23005042D0C03212800E7 -:10BEA00001F016EC2000FF30A3300004000C12213A -:10BEB000029001F00EEC2000FF30A7300004000CCF -:10BEC0000E21019001F004EC2000FF30A8300604A0 -:10BED000360C3A21300001F0FCEB2000FF30A93095 -:10BEE00007043F0C6421380001F0F2EB2000FF3022 -:10BEF00048300004000C402101F0EAEB2000FF3044 -:10BF0000A5300004000C4421009001F0E2EBE01D9C -:10BF1000FC300004000C102101F0DAEBFFF767FCA5 -:10BF20002000FF30ED300004000CFF2101F0D0EBC9 -:10BF30002000FF30EE300004000CFF2101F0C8EBC0 -:10BF40002000FF30EF300004000CFF2101F0C0EBB7 -:10BF50002000FF30F0300004000CFF2101F0B8EBAE -:10BF60002000FF30A1300004000CD32101F0B0EB21 -:10BF7000D321280001F0ACEB0298D32101F0A8EB0B -:10BF80002000FF30A4300004000CD32101F0A0EB0E -:10BF90000098D32101F09CEB2000FF30A630000474 -:10BFA000000CD32101F094EB0198D32101F090EB28 -:10BFB000D321300001F08CEBD321380001F088EB65 -:10BFC0002000FF30AA300004000CD32101F080EBE8 -:10BFD0002000FF30C1300004000C4E2101F078EB4E -:10BFE0002000FF30C2300004000C4E2101F070EB45 -:10BFF0002000FF30C3300004000C4E2101F068EB3C -:10C000002000FF30C4300004000C4E2101F060EB32 -:10C010002000FF30C5300004000C4E2101F058EB29 -:10C0200003984E2101F054EB2000FF30C73000048C -:10C03000000C4E2101F04CEB2000FF30C830000412 -:10C04000000C4E2101F044EB2000FF30C930000409 -:10C05000000C4E2101F03CEBFF34CA342004000CEC -:10C060004E2101F036EB03221121002001F03CEBC0 -:10C0700005B0F0BDFFB5080000241600250081B012 -:10C08000FFF70CFCA1214F2001F012EBFF20002153 -:10C090007C3001F00EEBFF20E0217A3001F008EB5C -:10C0A00040212D2001F004EBFF48002101F000EBBE -:10C0B000FD482A21401C01F0FCEAFB488021DC38C5 -:10C0C00001F0FEEA7727FF001021380001F0F8EABE -:10C0D000F648022101F0F4EA8021781E01F0E8EA36 -:10C0E00002E0022001F08CEA380001F0DEEA0006EE -:10C0F000F7D5ED480D3001F0D8EA0700EA480E30D8 -:10C1000001F0D2EAE1193170049928180870E64864 -:10C11000002101F0CEEAE4480021401C01F0C8EA09 -:10C12000E1480021801C01F0C4EAA1E7FFB5080046 -:10C1300000241600250081B0FFF752FC8E42A8C8EB -:10C1400001000000E09F02C000040000F5F48AD75F -:10C15000A1214F2001F0B6EAFF2000217C3001F040 -:10C16000B2EAFF20E0217A3001F0ACEA40212D2034 -:10C1700001F0A8EAD148002101F0A4EACF482A2121 -:10C18000401C01F0A0EACD488021DC3801F0A2EA91 -:10C190007727FF001021380001F09CEAC8480221EF -:10C1A00001F098EA8021781E01F08CEA02E002207A -:10C1B00001F030EA380001F082EA0006F7D5BF4806 -:10C1C0000D3001F07CEA0700BC480E3001F076EA41 -:10C1D000E1193170049928180870B848002101F05D -:10C1E00072EAB6480021401C01F06CEAB348002115 -:10C1F000801C01F068EAFFF72FFB43E7FFB581B031 -:10C20000002416000F002500FFF707F93800FFF79C -:10C21000E6FDA1214F2001F056EAFF2000217C30ED -:10C2200001F050EAFF20E0217A3001F04CEA402191 -:10C230002D2001F048EAA148082101F044EA9F4876 -:10C240000A21401C01F03EEA9C488021DC3801F0C4 -:10C2500042EA7727FF001021380001F03CEA9848B5 -:10C26000022101F038EA8021781E01F02CEA02E078 -:10C27000022001F0D0E9380001F020EA0006F7D5ED -:10C280008E48401D01F01AEA07008C48801D01F01D -:10C2900016EAE119317004992818087087480021BE -:10C2A00001F010EA85480021401C01F00CEA8348A7 -:10C2B0000021801C01F006EAFFF7CEFAE2E6FFB5A6 -:10C2C000080000241600250081B0FFF7E6FCA1213C -:10C2D0004F2001F0F8E9FF2000217C3001F0F2E965 -:10C2E000FF20E0217A3001F0EEE940212D2001F01D -:10C2F000EAE97248082101F0E6E970480A21401C89 -:10C3000001F0E0E96D488021DC3801F0E4E97727AD -:10C31000FF001021380001F0DEE96948022101F038 -:10C32000DAE98021781E01F0CEE902E0022001F076 -:10C3300072E9380001F0C2E90006F7D55F48401DF8 -:10C3400001F0BCE907005D48801D01F0B8E9E11982 -:10C3500031700499281808705848002101F0B2E99A -:10C3600056480021401C01F0AEE954480021801CD1 -:10C3700001F0A8E986E6FFB58BB00C00FFF74DF899 -:10C3800024022000FF3056300004000CFF2101F091 -:10C39000AAE92000FF3057300004000C0A9001F099 -:10C3A0009EE9C7210840382101430A9801F09AE923 -:10C3B0002000FF3059300004000CFF34583409903D -:10C3C000062600252004000C08900020AC0004A9DB -:10C3D000085169460851089801F080E9E3210840B6 -:10C3E000B100014309060898090E01F07CE9002D0F -:10C3F0004CD0012D05D0022D46D0032D46D122214F -:10C4000000E01221099801F06EE90A98022701F074 -:10C4100066E9F8210840384301000A9801F062E912 -:10C420000898012701F05AE9FC210840384301002F -:10C43000089801F058E940212D2001F044E91F48F7 -:10C44000012101F040E91D488F21401C01F03AE92B -:10C450001A480221001D01F036E918488021DC3815 -:10C4600001F038E97727FF001021380001F032E9A8 -:10C470001348022101F02EE9022001F0CCE88021CE -:10C48000781E01F020E906E01C21BBE70A21B9E78C -:10C49000022001F0C0E8380001F010E90006F7D5ED -:10C4A000EF20800001F00AE907000448083001F09D -:10C4B00006E93B0604AA11591B1603E0B503000068 -:10C4C0007E060000CB18694613510F59000600166E -:10C4D000381808510D9803700E9B085918701059A0 -:10C4E0000206120EFF480251095907000906090EFB -:10C4F0001037002D395120D0012D2BD0022D48D0DE -:10C50000032D63D1C0680106F748090E01F0DAE88F -:10C51000F8680106F448090E083001F0D4E8F14843 -:10C52000C0680106F048090EC01E01F0CCE8F868AA -:10C530000106ED48090E401D28E000680106EA48A2 -:10C54000090EC01C01F0BEE8386801062A604B9B4A -:10C5500001000000DCA302C000040000DD650F6ADA -:10C56000E648090E0B301BE0E34840680106E3484B -:10C57000090E801C01F0B0E878680106DF48090E5A -:10C580000A3001F0AAE8DC4840680106DB48090EE1 -:10C59000401E01F0A2E878680106D848090EC01DC7 -:10C5A00001F09AE81CE0D44880680106D348090EDF -:10C5B000401C01F092E8B8680106D048090E093025 -:10C5C00001F08AE8CC48806801060D20090EC00100 -:10C5D00001F082E8B8680106090ED120C000DFE74B -:10C5E000C748002101F078E8C5480021401C01F04F -:10C5F00074E8C3480021801C01F06EE804A80059CB -:10C6000001060F20090E800101F066E86846005916 -:10C610000106BB48090E0C3001F05EE8761E6D1C69 -:10C62000042D00DADBE60FB0F0BDF8B501F010E83C -:10C6300004210B2000F0F4EF4021032000F0F0EF84 -:10C640000321022000F0ECEF01F006E8AD49086894 -:10C650000122104308600025AB49A800CA1C8618B7 -:10C660006800002447180090A5200121800001F0F7 -:10C6700034E800980019401C0106FF20090E4130E3 -:10C6800001F02AE8A14801F024E8010038556000D3 -:10C69000305A01F022E8641C022CE5DBFF20002167 -:10C6A000413001F01AE8A5200021800001F014E8D3 -:10C6B0006D1C012DD0DB00F0CCEF04210B2000F02D -:10C6C000BCEF4021032000F0B8EF0321022000F06E -:10C6D000B4EF00F0C2EFF8BD8D4A137FDB07FCD149 -:10C6E0008B4A203210819180704770B500248007FA -:10C6F000050E0721200001F010E88006800E2A00B8 -:10C7000002430721200001F004E8641C2406240EE3 -:10C71000012CEED370BD70B504000D0002E00A20BC -:10C7200000F082EF2900200000F0FAEF0128F6D196 -:10C73000002070BD70B505000100B220FFF7EBFFCF -:10C74000040007D12900B22000F0EEEF2900B2204A -:10C7500000F0E6EF200070BDF8B505000020009065 -:10C7600000F07EEF68780602287806436948AD1C21 -:10C7700001684122120311430160012309200007CF -:10C78000038000228280624881889C0221406B24C1 -:10C79000E4000919818003805D4F20373A8214003C -:10C7A000B021200000F0B8EF1F2108430200B021A3 -:10C7B000200000F0AEEF641C2406240E012CEFD301 -:10C7C0000021402000F0B0EF0021412000F0ACEF4C -:10C7D0000220FFF78AFF0021B32000F0A6EF10210E -:10C7E000B12000F0A6EF4A48017FC907FCD14849B3 -:10C7F0008888012292031043888003203882310404 -:10C80000090C5000FFF768FF00240CE0281940785D -:10C810000102285D01430120C00320180004000C20 -:10C82000FFF75AFFA41CB442F0DB2819407801023C -:10C83000285D01430120C003FFF74EFF3448017F0C -:10C84000C907FCD181880122920391438180002095 -:10C85000388202E0022000F0E8EE2021B22000F051 -:10C8600060EF0128F6D10221192000F05AEF0028CC -:10C8700000D0FEE71F21402000F056EFF8214120B4 -:10C8800000F052EF00F0F8EE0098F8BD70B500240B -:10C890001D4E194D233698356000315A002000F0A6 -:10C8A0003CEFE100641C032C6850F5DB164E0024BD -:10C8B00053366000305A00F01CEFE1004919641C47 -:10C8C000102C8861F5DB104E002473366000305A5E -:10C8D00000F0FEEEA10049198031641C292C88610A -:10C8E000F4DB00F0CAEE00F090EE3A2000F090EE9B -:10C8F0000949C86312E00000F44301C08206000049 -:10C90000B5030000002D008019F400C09202000061 -:10C9100000080090002100808C4501C000F07CEEF2 -:10C9200000F09EEEF948016AF9480160F949496A48 -:10C93000416070BD70B50024F74EF84DE0002858F6 -:10C9400002066000315A120E002000F0E2EE641C74 -:10C95000032CF3DBF04E00243036E000F2FDEF66EE -:10C9600001000000D8A702C0000400008EBFDC0652 -:10C970004019806901066000305A090E00F0C6EEC9 -:10C98000641C102CF3DBE94E00245036A000401943 -:10C990008030806901066000305A090E00F0A6EE72 -:10C9A000641C292CF2DB00F072EE00F038EEDD485A -:10C9B0004038C06B0106090E3A2000F044EE00F04A -:10C9C00036EE00F058EED748D54A01681162D649D4 -:10C9D000406848620421402000F0B8EE70BDD248A3 -:10C9E00010B5416AC20C91434162416A120411437D -:10C9F0004162D048016A03221203114301625120AF -:10CA00000021C00000F072EECB48002100F06EEE75 -:10CA1000A320C021800000F06AEE0B200121C0019C -:10CA200000F064EEFF200221C01C00F070EE102226 -:10CA30000221002000F08EEE02221100002000F002 -:10CA40008AEE10BD10B5FFF72BFFFFF7C8FF3B22A2 -:10CA50000621002000F066EE10BD0021062010B572 -:10CA600000F06CEEB148B0492438006A4862FFF724 -:10CA70006BFF10BDF3B50C000821200085B000F05D -:10CA80000EEE0598FFF7DEFFAC4F380000F02AEEFF -:10CA9000A64D38263043243D01002870380000F0B0 -:10CAA00026EE380000F01EEE3043010028703800FA -:10CAB00000F01CEEDD2000F016EE0221084301001C -:10CAC0002870DD2000F012EE97499D484862012150 -:10CAD000C420FFF72AFEFEF7B4FC102247210020F5 -:10CAE00000F038EE0598007800280FD1012000F002 -:10CAF0002FF90A2000F0A2ED002000F029F90A2009 -:10CB000000F09CED21000020FEF7D2FC102247210E -:10CB1000002000F024EE0221C420FFF706FEFEF7FD -:10CB200090FC08224721002000F014EE0598E31C39 -:10CB3000A21C0021FFF718FB7C4DA1781C3D288822 -:10CB400000F0D4ED2E1DE178308800F0D0ED082201 -:10CB50004721002000F002EE8021B220FFF7E5FD22 -:10CB600001224721002000F0F6ED4022052100209F -:10CB700000F0F0ED01224721002000F0F0ED02214D -:10CB8000B220FFF7D2FD08224721002000F0E2ED9D -:10CB90000598631D221D0021FFF744FB301D2179FC -:10CBA000008800F0A4ED2F000C376179388800F080 -:10CBB0009EED04224721002000F0CCED0822472101 -:10CBC000002000F0CCED0598002104AA03ABFFF78C -:10CBD0006FFA6B462888197C00F088ED6B46308828 -:10CBE000197B00F084ED0598002102AA01ABFFF744 -:10CBF0007AFB301D6B460088197A00F078ED6B46A1 -:10CC00003888197900F072ED02224721002000F0E7 -:10CC1000A2ED04224721002000F0A0ED0598E31DBD -:10CC2000A21D0021FFF7BBFB381DA179008800F091 -:10CC30005EED28001430E179008800F058ED022202 -:10CC40004721002000F08AED40220521002000F05D -:10CC500086ED0120FFF778FDFFF7FFFE002007B00B -:10CC6000F0BD10B5314C0121A41D6088020620786A -:10CC7000120E00F078ED00F0FEEC00F078EDFC21F3 -:10CC8000412000F05CED2F4800F074ED62882078C0 -:10CC9000012100F074ED00F0FAEC207800F072ED64 -:10CCA00000F0E8EC0221072000F04CED608801065E -:10CCB0002078090E00F06AED00F06CED10210220E2 -:10CCC00000F040ED0320FFF71AFD8021122000F054 -:10CCD00026ED1021022000F022ED4020FFF734FD68 -:10CCE0000221080000F01AED17480168012212071E -:10CCF000914301600168154A114301602100083128 -:10CD00002000FFF7B7FE0120FFF7F9FC00F046ED29 -:10CD100000F0BCEC10BD002800DA40427047000073 -:10CD200000200090CC4501C000A900803CF400C068 -:10CD30008C4401C0402000808B02000051040000A0 -:10CD40003100310054F800C000280080003000207D -:10CD5000002810B504D008212A2000F0D0EC10BD26 -:10CD600008212A2000F0C6EC10BD0000DD6C5253F3 -:10CD700001000000D4AB02C0000400007AD0A9B2C8 -:10CD80003EB50C221323274C25486061264D0092A6 -:10CD9000E868042225A100F0E4EB21480C223C388D -:10CDA0002061009268680422062323A100F0D8EBDA -:10CDB00028001822F03803000092012200213C33A1 -:10CDC00000F0FAEC280018227838030000920122C3 -:10CDD00000213C3300F0F0EC11486438E060286832 -:10CDE000FDF778FB184D1948A122290000F0A0EBAF -:10CDF00017481849A060002217A06B4607C32000FF -:10CE000012492A0008300C2300F0A6EB002800D0BD -:10CE100001203EBD034810B5806800F09AEB10BDBC -:10CE2000104701C0F8F500C03C4801C054696D6569 -:10CE30007243624D736751004D61634D676D74536A -:10CE40004D454D7367510000A40600003CA302004D -:10CE5000044601C0475601004D4143204D676D74A3 -:10CE60000000000009490120800210B5088008492F -:10CE700008800949074808600949084808600A49C4 -:10CE80000848086000F022F810BD0000A8BB0200AE -:10CE9000AABB0200458F3000ACBB0200A78F300058 -:10CEA000B0BB0200877800C09CBB02000449034865 -:10CEB000086005490348086070470000F1730200EC -:10CEC000D4BB02004D9C0100D8BB020002490148BE -:10CED00008607047818500C0C4BB0200FF210D4877 -:10CEE000491C10B500F00CEB0A48FF214B310161E1 -:10CEF0007D21C90041616E2181617D210901C161EE -:10CF00000549016200F05CEC024A8032D162906215 -:10CF100010BD0000A06A02C0307500000648142150 -:10CF200010B500F0EEEA04490448086002480C22FB -:10CF3000012100F01AEB10BDF46B02C0184901C0CA -:10CF400010B500F042EC10BD0549044808600649E0 -:10CF50000448086006490548086070475F72010090 -:10CF6000A4BC0200A5710100A4BB0200357201003F -:10CF7000E4BB02000448542110B500F0C2EA0349A2 -:10CF80000020086010BD0000A05201C038F600C0AB -:10CF900004490348086005490348086070470000D9 -:10CFA00034153200B0BC0200145C0004B4BC0200B2 -:10CFB000F0B5202000211E4A10601000C030876BA1 -:10CFC000006884461B4B4A01D518FF330020A1336B -:10CFD000D61882003C68AB181C60B318401C0006D1 -:10CFE00062461268000E08281A60F2D3491C09062E -:10CFF000090E0D29E6D30F4C0F4D104E00200700EF -:10D000000C22424341010B19B7509219401C491997 -:10D010000006000E53600D289160F1D3F0BD044866 -:10D020000749C0300860084906480860704700009A -:10D03000C01B01C0C00A02C0600C02C0000E02C0CA -:10D04000ECBB020041F60100F0BB020004490348BA -:10D050000860054903480860704700008D9B010087 -:10D06000A0BF02009B9A0100A4BF02000249014830 -:10D07000086070471DA7010014BC02007047000043 -:10D0800010B5904C8E48606120001430FDF722FAF4 -:10D09000E0F766FCFDF762FBFFF76CFFFFF73EFF72 -:10D0A000FFF71CFFFFF74CFF87480021FEF779F8D8 -:10D0B00086490028486004D0012240681100FEF72C -:10D0C00095F87F480C22203820617E4801211030DD -:10D0D00000F04AEAFDF76AF87D4800F07AEBFFF7C6 -:10D0E00067FFFEF73BF979497A4808314860080044 -:10D0F000D6F72BF900F070EB002010BD10B5FDF74E -:10D1000087FA00280BD1FEF7F1F8002807D1FFF7C6 -:10D1100037FE002803D1FDF791FC002800D0012044 -:10D1200010BD10B5FFF776FEFDF7C2FCFDF76AFAF9 -:10D13000FEF7FEF8002010BDF8B500256648FFF7A1 -:10D140001FFB664C674922680092654A6648624B3D -:10D1500000F046EB22680092644A65496548664BD8 -:10D1600000F03EEB22680092644A65496548664BD0 -:10D1700000F036EB22680092644A6549CC156C25B4 -:10D1800001000000D0AF02C000040000290A7ADECE -:10D190006548664B00F02EEB22680092644A6549B0 -:10D1A0006548664B00F026EB22680092644A6549A8 -:10D1B0006548664B00F01EEB22680092644A6549A0 -:10D1C0006548664B00F016EB22680092644A654998 -:10D1D0006548664B00F00EEB22680092644A654990 -:10D1E0006548664B00F006EB22680092644A654988 -:10D1F0006548664B00F0FEEA22680092644A654981 -:10D200006548664B00F0F6EA002804D0644800F058 -:10D21000F6EAD6F755F800F0F6EA002805D060489F -:10D22000401C00F0ECEAD6F74BF8FDF7B7FA5D4E7C -:10D230000024A00030588047002800D00125641C3D -:10D24000052CF6D32800F8BD57493F4810B50860B3 -:10D2500000F048F900F0D2F8FEF74EF8FDF77AF941 -:10D26000FDF738FAFDF7D4FF00F01AF9FFF710FFC9 -:10D2700000F0C2F8FEF700F8FFF7FEFD00F0E2F85C -:10D28000FDF7C4FAFEF7B4F800F090F8FDF74EFA97 -:10D29000FDF727FCFFF7CDFE00F0FAF8FEF7C8F81F -:10D2A000FFF780FE00F0DCF8FFF758FE00F0E0F832 -:10D2B000FDF7B8FAFCF7EEFFFFF7E2FEFEF792F893 -:10D2C000FDF79AFA00F0A2EA00F0BAF8FFF7F8FDCD -:10D2D000002010BD185701C09C1E01C0BBA7310023 -:10D2E000E0F700C0707C02009DB600C000FC00C0EA -:10D2F00084F200C0904F00044C0000044000000481 -:10D30000E44F000404010004F800000480CB01C0D5 -:10D3100078010004DC000004D000000488C301C0D0 -:10D32000A04F00046000000454000004008101C00C -:10D33000B04F00047400000468000004008E01C0B7 -:10D340007C010004F0000004E4000004806C01C0D3 -:10D350007001000490000004840000040CA301C0CC -:10D3600074010004A400000498000004FCAA01C099 -:10D37000CC4F0004B8000004AC00000400B301C0AE -:10D38000345000045401000448010004C00202C0EB -:10D39000F04F0004180100040C01000450E301C028 -:10D3A0002300010088B602C064BA020002490148A5 -:10D3B00008607047FFFF000048BC02000A480021D7 -:10D3C000C94300B54160002101600848016801229D -:10D3D000920511430160074905480880091F08802C -:10D3E00000F018EA00BD000040F800C000210080F5 -:10D3F000FFFF0000500600907047000008490748F2 -:10D4000008600949074808600949084808600A494E -:10D410000848086009491E2008607047E1F80100CB -:10D4200020BB020007F9010024BB020017F901002C -:10D4300028BB020033F901002CBB020030BB020004 -:10D440007047000004490348086004497D2000013A -:10D450000860704740000004C8BB0200CCBB02005B -:10D46000024901480860704761CB00C0DCBB020084 -:10D4700004490348086005490348086070470000F4 -:10D4800043140200A8BC02005B140200ACBC020002 -:10D4900002490148086070473812320078BB020028 -:10D4A00007490A20086008490648086008490748F3 -:10D4B000086009490748086009490848086070473A -:10D4C000F8BB0200F0890200FCBB0200848C020061 -:10D4D00008BC020015F8000000BC02006DD200007C -:10D4E00004BC02000249014808607047551602005A -:10D4F00010BC020004F01FE58FB3300004F01FE5FC -:10D50000C500000004F01FE5C100000004F01FE5A5 -:10D5100027B4300004F01FE594CB310004F01FE580 -:10D52000B901000004F01FE50188300004F01FE598 -:10D53000F9EC000004F01FE51DF9000004F01FE500 -:10D540009DFA000004F01FE5B818020004F01FE582 -:10D5500085FC000004F01FE58BFB000004F01FE5D4 -:10D560007D70300004F01FE5E90F000004F01FE5B6 -:10D57000B10F000004F01FE56110000004F01FE58A -:10D580008F10000004F01FE5F9B2300012656357F8 -:10D5900001000000CCB302C0D40200006E087891F4 -:10D5A00004F01FE51387000004F01FE573860000F8 -:10D5B00004F01FE57177300004F01FE50BB7300071 -:10D5C00004F01FE513B7300004F01FE5A7A8000022 -:10D5D00004F01FE567F6000004F01FE53BE10000E2 -:10D5E00004F01FE5EC19020004F01FE518C6310035 -:10D5F00004F01FE5D1F8000004F01FE5FCD4310071 -:10D6000004F01FE5F70D000004F01FE5D5E0000071 -:10D6100004F01FE52B0E000004F01FE529E10000D7 -:10D6200004F01FE571E1000004F01FE5EBE20000EB -:10D6300004F01FE5F9F3000004F01FE5E7F6000031 -:10D6400004F01FE587F6000004F01FE535F7000041 -:10D6500004F01FE50DF7000004F01FE55DF8000081 -:10D6600004F01FE525F6000004F01FE5A1F8000016 -:10D6700004F01FE53BF6000004F01FE5C5F30000D1 -:10D6800004F01FE509F6000004F01FE551F6000064 -:10D6900004F01FE595F9000004F01FE579F900009A -:10D6A00004F01FE5B5F8000004F01FE5C1F8000024 -:10D6B00004F01FE56DF4000004F01FE589FA000096 -:10D6C00004F01FE5EDF5000004F01FE5E3F40000B1 -:10D6D00004F01FE5B1F9000004F01FE5E8CB3100CC -:10D6E00004F01FE57BE8000004F01FE5CD290200EF -:10D6F00004F01FE5DB29020004F01FE5E70100004C -:10D7000004F01FE52302000004F01FE523B83000F9 -:10D7100004F01FE585B8300004F01FE52546010040 -:10D7200004F01FE5BD3E310004F01FE5F73E310077 -:10D7300004F01FE54F3F310004F01FE5353F310095 -:10D7400004F01FE5F915310004F01FE53116310032 -:10D7500004F01FE58116310004F01FE56B1631005F -:10D7600004F01FE58F2D010004F01FE59B2D010043 -:10D7700004F01FE50D2F010004F01FE5392F010013 -:10D7800004F01FE5852F010004F01FE5692F01005B -:10D7900004F01FE5512F010004F01FE5A52D010045 -:10D7A00004F01FE5E942010004F01FE533300100F9 -:10D7B00004F01FE54B16310004F01FE501340100B1 -:10D7C00004F01FE55BF9000004F01FE55934010087 -:10D7D00004F01FE58943010004F01FE5AD4301009B -:10D7E00004F01FE54D66300004F01FE5F51B310025 -:10D7F00004F01FE5A96D010004F01FE5CD00310024 -:10D8000004F01FE565C1010004F01FE50189300047 -:10D8100004F01FE50901000004F01FE58DC70000BA -:10D8200004F01FE59D4E000004F01FE5DDF101004E -:10D83000738202C04B8002C089B002C09D8F02C0BB -:10D84000BD8102C0EF8102C0798002C0458202C062 -:10D850008DAF02C0198202C00000000007B700C0EF -:10D860001FB700C0D5AE02C051AF02C077AF02C033 -:10D87000C3AF59FF040000000000000000000000DA -:04D880001FDB8C1806 +:10A0B00000000000000000000000000000000000A0 +:10A0C0000000000000000000000000000000000090 +:10A0D0000000000000000000000000000000000080 +:10A0E0000000000000000000C630F9670100000019 +:10A0F000F41B01C0000400000B5E079D000000007F +:10A10000000000000000000000000000000000004F +:10A11000000000000000000000000000000000003F +:10A12000000000000000000000000000000000002F +:10A13000000000000000000000000000000000001F +:10A14000000000000000000000000000000000000F +:10A1500000000000000000000000000000000000FF +:10A1600000000000000000000000000000000000EF +:10A1700000000000000000000000000000000000DF +:10A1800000000000000000000000000000000000CF +:10A1900000000000000000000000000000000000BF +:10A1A00000000000000000000000000000000000AF +:10A1B000000000000000000000000000000000009F +:10A1C000000000000000000000000000000000008F +:10A1D000000000000000000000000000000000007F +:10A1E000000000000000000000000000000000006F +:10A1F000000000000000000000000000000000005F +:10A20000000000000000000000000000000000004E +:10A21000000000000000000000000000000000003E +:10A22000000000000000000000000000000000002E +:10A23000000000000000000000000000000000001E +:10A24000000000000000000000000000000000000E +:10A2500000000000000000000000000000000000FE +:10A2600000000000000000000000000000000000EE +:10A2700000000000000000000000000000000000DE +:10A2800000000000000000000000000000000000CE +:10A2900000000000000000000000000000000000BE +:10A2A00000000000000000000000000000000000AE +:10A2B000000000000000000000000000000000009E +:10A2C000000000000000000000000000000000008E +:10A2D000000000000000000000000000000000007E +:10A2E000000000000000000000000000000000006E +:10A2F000000000000000000000000000000000005E +:10A30000000000000000000000000000000000004D +:10A31000000000000000000000000000000000003D +:10A32000000000000000000000000000000000002D +:10A33000000000000000000000000000000000001D +:10A34000000000000000000000000000000000000D +:10A3500000000000000000000000000000000000FD +:10A3600000000000000000000000000000000000ED +:10A3700000000000000000000000000000000000DD +:10A3800000000000000000000000000000000000CD +:10A3900000000000000000000000000000000000BD +:10A3A00000000000000000000000000000000000AD +:10A3B000000000000000000000000000000000009D +:10A3C000000000000000000000000000000000008D +:10A3D000000000000000000000000000000000007D +:10A3E000000000000000000000000000000000006D +:10A3F000000000000000000000000000000000005D +:10A40000000000000000000000000000000000004C +:10A41000000000000000000000000000000000003C +:10A42000000000000000000000000000000000002C +:10A43000000000000000000000000000000000001C +:10A44000000000000000000000000000000000000C +:10A4500000000000000000000000000000000000FC +:10A4600000000000000000000000000000000000EC +:10A470000000000000000000000000003F4808014C +:10A480003D480802354808022D48080225480902BF +:10A490001D48090215480A020D480A0205480A0229 +:10A4A00005490A0205490A0F05490A0F05490A0F1D +:10A4B00005490A0F05490A0F05490A0F05490A0F00 +:10A4C0003B08050139080502310805022908050283 +:10A4D00021080602190806021108070209080702E6 +:10A4E000010807020108070F0108070F0108070FFD +:10A4F0000108070F0108070FFA8C39C50100000099 +:10A50000F01F01C0000400005884D4F10108070FB7 +:10A510000108070F600802025808020250080302EF +:10A520004808030240080402380804023008040204 +:10A53000280804022808040F180801021008010264 +:10A5400008080102000801020008010F282001C0CC +:10A55000242001C0202001C01C2001C01C2001C0FB +:10A56000142001C0102001C00C2001C0082001C02F +:10A57000042001C0002001C0FC1F01C0F81F01C061 +:10A58000F81F01C0D81F01C0D41F01C0D01F01C0D7 +:10A59000CC1F01C0C81F01C0C41F01C0C01F01C023 +:10A5A000BC1F01C0981F01C0941F01C0901F01C0B3 +:10A5B0008C1F01C0881F01C0841F01C0801F01C003 +:10A5C0007C1F01C0781F01C001000000204E000068 +:10A5D000000000000000000000000000000000007B +:10A5E000000000000000000000000000000000006B +:10A5F000000000000000000000200000040008002F +:10A600001000140020002000280028004000500006 +:10A6100050006A006A006A006A006A00FFFF0000DA +:10A620000000000000000000010000000000000029 +:10A63000000000000000000000000000000000001A +:10A64000B1137500B91175007B09A5008808A50034 +:10A65000D8097700DC087700BD04A7004404A700F0 +:10A6600090067700E80577002903A700D802A70025 +:10A67000EC0469006E0469005E02990022029900F0 +:10A6800048036900F4026900940199006C01990083 +:10A6900076025900370259002F0189001101890003 +:10A6A00030025900F80159000D018900F2008900BB +:10A6B000F8015900C5015900F2008900DA0089004B +:10A6C00028080455280804553C4804773C4804777A +:10A6D00038080477380804774C4803994C480399A4 +:10A6E00038080477380804774C4803994C48039994 +:10A6F00048080399480803994C4803994C48039922 +:10A7000048080399480803994C4803994C48039911 +:10A7100048080399480803994C4803994C48039901 +:10A7200048080399480803994C4803994C480399F1 +:10A7300048080399480803994C4803994C480399E1 +:10A7400000010203030505070709090909090000BB +:10A75000280804553008046638080477400804883F +:10A7600048080399500803AA580802BB600802CCA5 +:10A7700000000A00000000002C1402C0EC1402C00B +:10A7800001000000000000000000000000000000C8 +:10A7900000000000000000000000000000000000B9 +:10A7A00000000000BBC73000000000004BC63000B6 +:10A7B000000000003FC7300000000000A9F9300091 +:10A7C0000000000063FB30000100000000000000FA +:10A7D00001000000BBC7300001000000FFC53000D1 +:10A7E00001000000BFC6300001000000A5F93000E4 +:10A7F000010000006FFA30005700FE0068011000F1 +:10A800007E0607005000260075010E0076010E003E +:10A8100077010E0078011500CA021700FFFFFF0044 +:10A82000080000000E00000047006D004A006A00AA +:10A830006900E6006B00D9006C00D80058012C00BC +:10A8400059012C0065012400D6012D006E0218006C +:10A850008D026300AE022900CF026000D502040021 +:10A86000E0020C00FE02A600FF02A6002603C300C1 +:10A87000430366007F0339008503000092030A004A +:10A8800093030A00FB038100FE038400FF0384009E +:10A890000104C0002004C00021043E002304030082 +:10A8A00024043F002504000026043F002704200064 +:10A8B0002804B800290417002A0439002B040100D9 +:10A8C0002C0420002F045800300413003104FF0032 +:10A8D0003204FF0047044F004A0424004B040F00D9 +:10A8E0004E04710052041A005904040085043C000F +:10A8F000FFFFFF00FFFFFF00FFFFFF00FFFFFF0064 +:10A90000FFFFFF00FFFFFF00CEC42983010000000E +:10A91000EC2301C03C000000B0E50E2CFFFFFF005F +:10A92000FFFFFF00FFFFFF0000000000000000002D +:10A930000000000001000000000000000000000016 +:10A940000000000000000000000000000000000007 +:10A9500000000000FE9872AA01000000008002C002 +:10A9600000040000104AA06D002109A010B503F0FA +:10A9700098E9094C606003F098E903F09AE92068CF +:10A98000002803D000220D2103F096E9002010BD1D +:10A99000776C616E00000000F0F100C01F480121DB +:10A9A000490341611E4901611E494161052101615F +:10A9B000704710B500F044F91B48802103F080E98E +:10A9C0001A48DC2103F07CE918481421DC3003F03C +:10A9D00078E916485021F03003F072E9002010BDEC +:10A9E000F0B50024124E134F08E0C519686803F053 +:10A9F0006CE9696801208840B060641CE000395847 +:10AA00000029F2D10C49172003F05EE9FFF7C6FFD9 +:10AA10000120C005B0600020F0BD0000802900804A +:10AA2000070000FF10200000D04300047C7D0200DE +:10AA3000003000807C7C02003301000004490348A0 +:10AA40000860054903480860704700003D070000A2 +:10AA5000F0BA020078040004F4BA0200304800683A +:10AA6000816801221204114381608168FF22203233 +:10AA70001143012252039143816041681211114335 +:10AA800041604168D20011434160704709040143AD +:10AA9000234800688161704721490968CA68120C1F +:10AAA00012040243CA6070471D4909684A69120CC2 +:10AAB000120402434A6170470904014318480068C0 +:10AAC000C1637047164909684A68120A12020243B4 +:10AAD0004A607047124800688030416806229143FE +:10AAE000416070470E4A12688032536A09011B0F99 +:10AAF0001B0709090B435362116A4003C90CC904BF +:10AB0000400B0143116210681F2109048843012191 +:10AB1000090540181060106849000843106070472C +:10AB200004F200C010B503F0D4E800F0ADFD002041 +:10AB300000F040FD00F0D4FC002000F0A0FC00F08C +:10AB40009FFC00F0A5FC00F013FD00F06DFD00F08F +:10AB500011FD00F00EFD002010BD10B500F079FED3 +:10AB600000F090FE03F0B8E803F0BAE800F0A0F8B7 +:10AB7000002801D0012010BDD8F7C0FF002010BD73 +:10AB800010B500F0C9FB2448224901602349416007 +:10AB9000234981602348416B082291434163224845 +:10ABA0000168224A11400160002010BD002070475A +:10ABB00030B59408002203E09300CD58521CC550D4 +:10ABC000A242F9D330BD9308002210B502E09400F0 +:10ABD000521C01519A42FAD310BD0B22AD20D20172 +:10ABE0000021800210B5FFF7EEFF0722104911483F +:10ABF000D201FFF7DDFF03220F4910481202FFF7D1 +:10AC0000D7FF00F02BFE00F027FC00F0B9FC00207D +:10AC100010BD00000F00200080290080808080800F +:10AC2000800A808040A8008000280080FFCFFFCFEE +:10AC3000F077330080B90200707B330000BD020062 +:10AC40003EB5002001220290342102A803F04CE816 +:10AC500000281BD1144901200870029800F0F4FD6F +:10AC6000124CFF252D35A5222900200003F040E8D5 +:10AC70000C22042101920091029822000A212B004B +:10AC800003F03AE8002801D001203EBD00203EBD7F +:10AC9000002810B500D1FEE70068002800D1FEE7CB +:10ACA00003F02EE810BD0000C47C0200BC7E020050 +:10ACB00000B50D49002087B04860020001001E2049 +:10ACC00003AB07C302000948FF21CD316B4607C320 +:10ACD000A838074A002307A103F016E80006000E73 +:10ACE00000D0012007B000BD0CF200C0383101C017 +:10ACF000631100C049646C650000000012491148EE +:10AD00000860134911480860134912480860144943 +:10AD10001248086014491348086015491348086030 +:10AD200015491448086015481549406808601649D7 +:10AD30001448086015490420086016491448086042 +:10AD400070470000273100C0A4BA02008F560000EF +:10AD5000A8BA02000DDD3100ACBA020041E80000E3 +:10AD600088BA02003FDB4A9501000000FC8302C064 +:10AD7000000400004A31AF646D3F02008CBA02004B +:10AD80007911000090BA0200AD11000094BA0200DF +:10AD9000AC2001C09CBA020078040004A0BA0200F2 +:10ADA00098BA0200491C0200ECBD0200044932209E +:10ADB0000860054903480860054904480860704771 +:10ADC000D0BA0200D1110000CCBA0200DD1100009F +:10ADD000C8BA02001A4810B5006902F0A4EF10BD0D +:10ADE000FEB5002517480570154C1748A06100F006 +:10ADF00037F800281FD1144828386061200014302B +:10AE0000FFF750FF114E1248C122310002F07AEFD5 +:10AE10000D481049D038206100220FA06B4607C3AF +:10AE200020000B49320010300B2302F080EF002885 +:10AE300001D00120FEBD0120256260600020FEBD22 +:10AE4000D003000460040004A00F00046C0700009D +:10AE5000C09502007F3402004D4143205478000029 +:10AE600008B50C22009209480422062303A102F02F +:10AE700062EF002800D0012008BD000054784D6723 +:10AE80006D7438303231314D73675100E80300047E +:10AE90000A4904200A4A08600A2111600949086029 +:10AEA0000A49094808600B49094808600B490A48E3 +:10AEB00008600C490A48086070470000D4BA0200D4 +:10AEC000DCBA0200D8BA02008FCF0000E0BA02005C +:10AED000572E0000E4BA020041200000E8BA020048 +:10AEE000AB180000ECBA020007490E2008700849B0 +:10AEF000064808600849074808600949074808608B +:10AF0000094908480860704700BB0200545C02C051 +:10AF100004BB02007B20000008BB02001D220000D1 +:10AF20000CBB02006322000010BB0200072108488E +:10AF3000C90110B502F0CEEE054806492038086375 +:10AF400004480C220121303002F0F8EE10BD000060 +:10AF5000283501C0683801C070B50024114D124871 +:10AF60001421AC6002F0B6EE0F4814213C3802F018 +:10AF7000B2EE0D481421283802F0ACEE0A48142134 +:10AF8000143802F0A8EE084869681430046144617E +:10AF90008461C4618160054901620549416202F032 +:10AFA000D2EE70BD28F200C06C460004CF3F020014 +:10AFB0004D420000024901200860024908607047C4 +:10AFC00060BB02005CBB02000349642008800349A7 +:10AFD000072008807047000074BB020076BB0200A7 +:10AFE00005490448086006490448086006490548C0 +:10AFF0000860704763640000E0BB0200DD6300008E +:10B00000A0BB02001D640000E8BB02000EB502F008 +:10B010009EEE0F48002102F09EEE7D2000010022EE +:10B0200000900B48019202920A4A743000230AA150 +:10B0300002F094EE642000220090054801920292F2 +:10B04000094AE830002309A102F088EE0EBD000095 +:10B05000A048000421AA0000536C656570436F6E20 +:10B060006669726D546D72001BA7000041505F4EFF +:10B07000756C6C506B74446F6E65546D720000009B +:10B080000EB53C4800F01DF83A493A48343102F018 +:10B090006AEE394800220090364801920292374AFF +:10B0A000F830002336A102F05AEE0022642001920B +:10B0B00002920090364A3B48002336A102F04EEE41 +:10B0C0000EBD70B50400384A0021001D02F04EEE9E +:10B0D0002000364A211D343002F048EE2000403076 +:10B0E000334A211D050002F042EE20001030314AA3 +:10B0F000211D060002F03AEE20002F4A31001C30DC +:10B1000002F034EE20002D4A3100283002F02EEEFD +:10B1100020002B4A29004C3002F028EE2000294A5A +:10B120002900583002F022EE2000274A290064301E +:10B1300002F01CEE2000254A3100943002F016EE99 +:10B140002000234A3100A03002F010EE2000214AF6 +:10B150002900703002F00AEE20001F4A29007C30DE +:10B1600002F004EE20001D4A2900883002F0FEEDB6 +:10B1700070BD00008EA405AC01000000F88702C07D +:10B180000004000019EB7C08084A0004B80B00001A +:10B1900021AA0000536C656570436F6E6669726D1D +:10B1A000546D72001BA700004E756C6C506B74449C +:10B1B0006F6E65546D7200002C4B0004C787000051 +:10B1C0008B8C0000098E0000BD8800005F8A0000A3 +:10B1D0004D890000F38E00000B900000D193000019 +:10B1E0008F9C0000D59B0000939D0000E99F00000C +:10B1F000C5A200000949084810B5886107480C221B +:10B200000121183002F0A4EDFFF744FFFFF708FF1B +:10B2100002F0BAED10BD00003C3A01C0E0F300C0FE +:10B220003EB500F0E5FB002832D12B4C2948606286 +:10B230000C222000009204222430062327A102F0D1 +:10B2400084ED24480C223C30A062200000920422AD +:10B2500028300A2325A102F078ED274D2748B12296 +:10B26000290002F05AED1B482549C8382062002207 +:10B2700024A06B4607C3200020492A0020300C235D +:10B2800002F05EED002803D1FFF7B4FF00203EBDC1 +:10B2900001203EBD10B5104C206A02F04EED0D4865 +:10B2A0000C222038E062200001212C3002F050ED09 +:10B2B00010BD174915480860174916480860184915 +:10B2C0001648086018491748086019491748086067 +:10B2D00070470000383B01C024F400C04342507264 +:10B2E0006F63534D454D73675100000043425072E8 +:10B2F0006F634D7367510000A40600002C6301C00A +:10B30000AF5600C043422050726F63000FE7000049 +:10B3100020BC020045E7000024BC02003DE700001D +:10B3200028BC02001D5600002CBC0200397100C070 +:10B3300030BC02004B480221017304214173704765 +:10B340004848F8B50024001F0460FFF79BFB02F09B +:10B3500020ED45490D5C02F020ED290002F020EDC2 +:10B36000424E2300320002F020ED401C61410504F2 +:10B370002D0C02F00EED3E4940000F5A02F018ED80 +:10B38000390002F00EED2300320002F00EED401CF9 +:10B3900061410004000C2900FFF78CFB02F0F8EC7F +:10B3A00034490D5C02F0F8EC290002F0FAEC2300BD +:10B3B000320002F0FAEC401C614105042D0C02F051 +:10B3C000E8EC2D490F5C02F0E8EC390002F0E8EC03 +:10B3D0002300320002F0E8EC401C61410004000C44 +:10B3E0002900FFF77DFB0820FFF76AFB02F0D4EC91 +:10B3F000310002F0E2EC401C0004000CFFF768FB97 +:10B4000002F0CAEC052102F0CCEC1C4A230002F049 +:10B41000CCEC1922801861410006000EFFF766FB94 +:10B42000601E02F0CEEC032002F0CEEC0C2002F005 +:10B43000CCECFFF763FB02F0CCEC02F0CEEC0400A6 +:10B4400002F0CEEC2100FFF761FB302002F0BCECF3 +:10B450000320000202F0B8ECFFF76CFF02F0C4EC2E +:10B46000F8BD0000BCF400C0E07A020040420F00CA +:10B47000CA7A0200F67A0200EB7A0200C0C62D00FA +:10B480000149012008707047A0B90200012109207C +:10B49000000701600021416070474548016B802230 +:10B4A000114301637047704710B5FFF7EFFFFFF7D7 +:10B4B000F4FF02F09EEC10BD10B502F06AEC01241E +:10B4C0006402052801D002F064ECC020082102F0DB +:10B4D00094EC384842680321C9048A434260826878 +:10B4E0008A43826034480168402211430160016848 +:10B4F0002143016001680522114301602F490020AA +:10B50000086002F07EEC10BD70B52D4CA0682D498E +:10B51000000900010843A060E0680722000900015B +:10B520001043E06020690009000108432061A06920 +:10B53000C91F0843A061092002F066EC2068224977 +:10B540000840206020682505A8432060206803216A +:10B5500049060843206020681C4908402060606854 +:10B5600080098001606002F04CECC10603D52068C0 +:10B57000610508430BE0410605D5606801214904D7 +:10B5800008436060AE86DF8C01000000F48B02C0CF +:10B5900000040000ED8409BC04E0C00702D020686C +:10B5A00028432060B02002F03EEC70BD7047704729 +:10B5B00010B500F03DF90B49C86010BD0B490A48B1 +:10B5C00008607047400C0090002900800023008034 +:10B5D000002400800021008007800000FFF7DF5773 +:10B5E000FFDFBFFF28F500C0F1F0000018BA02002D +:10B5F000704770B502F01AEC052002F01CEC400612 +:10B6000003D402F01CEC002070BD08211D2002F0C4 +:10B610001AEC0A2002F01AEC0B2002F00CEC0007E6 +:10B62000F7D50C2002F006EC05000B2002F002EC2E +:10B630004007440D2C43E1081C2002F00CEC1D20B7 +:10B6400002F0F8EB6107C006090EC00E01431D2091 +:10B6500002F000EC08211D2002F000EC02F0EEEBFD +:10B66000012070BD10B501F0DEFB02F0E0EB3121EE +:10B67000332002F0F0EB1421242002F0ECEB6621E1 +:10B68000412002F0E8EB02F0DAEB02F0ECEB642090 +:10B6900002F0DCEB02F0EAEB02F0ECEB8821052093 +:10B6A00002F0D8EB0121082002F0D4EB58210A2047 +:10B6B00002F0D0EB4221092002F0CCEB02F0DEEBED +:10B6C00010BD0000F8B50020C043644D28606860DC +:10B6D000644963484860644A8805C90B0368401898 +:10B6E0009042FBD300200B22920303684018904243 +:10B6F000FBD301208006006802F0C4EB002002F0BA +:10B70000C6EBC72002F096EB012630430100C720AC +:10B7100002F0C0EBC72002F08EEB40273843040054 +:10B720000100C72002F0B6EB2000022420430100F4 +:10B73000C72002F0B0EBC82002F07CEBC007FAD0C3 +:10B74000C72002F078EBA04304000100C72002F0FC +:10B75000A2EB2000B84304000100C72002F09AEBDE +:10B760002000202738430100C72002F094EBC720B7 +:10B7700002F060EB042420430100C72002F08AEBB2 +:10B78000C82002F058EB8007FAD5C72002F052EB30 +:10B79000A043B84304000100C72002F07CEB61081D +:10B7A0004900C72002F076EB002002F070EB122077 +:10B7B00002F040EB802420430106090E122002F023 +:10B7C0004AEB122002F036EB002002F060EB122070 +:10B7D00002F030EBA0430106090E122002F03AEB12 +:10B7E000122002F028EB02F05AEB2049086830439F +:10B7F00008601F4800781F48007A1F49087D1E4ACC +:10B800002043203A5063087D4006FCD5087DA043C4 +:10B810005063A869012109030843A86102F0FAEA0C +:10B82000400603D515491B20400148600020F8BDA3 +:10B8300010B5FFF7DEFE0948C169114A090E090675 +:10B840008918C161C169012252061143C1610020FA +:10B8500002F028EB0120C00310BD00000021008091 +:10B860000200030000230080002002C0002D0080A1 +:10B8700000200090E02A009020240090802F00807B +:10B880009A991900342110B502F010EB10BD10B5D3 +:10B8900002F010EB10BD000016491548086017496A +:10B8A0001548086016491E20086016490020C0434C +:10B8B0000860164914480860164915480860704722 +:10B8C00070B520210C4802F01AEA2D210848090120 +:10B8D00002F014EA084A064C0020182141439568FA +:10B8E0000919401C4D611E289160F6D370BD0000FF +:10B8F000188402003CBA0200E886020028BA02005E +:10B9000040BA02002CBA02001027000030BA020030 +:10B9100039FD000034BA02002A4A70B514005034D0 +:10B9200000231000946010305360D06001200101AA +:10B9300089180D00103D8D6048602035401C04289A +:10B94000CD60F4D3042050641E4830309064303011 +:10B95000D064A360E26001002039C36081601A49AD +:10B960001030086018480C22012102F0FCE9002088 +:10B9700070BDF8B50F00144D060000212868C943BA +:10B9800002F09CEA0F495031CC6808001030844224 +:10B990000FD0E0682BF5447C01000000F08F02C05E +:10B9A00000040000BE5EDAD0C86081600020A060A4 +:10B9B000E060286802F090EA60683A00310002F026 +:10B9C00090EA2000F8BD286802F086EA0020F8BD61 +:10B9D00010B502F08AEA10BDE03F01C098F500C042 +:10B9E00007490648086008490648086008490748AA +:10B9F00008600849802008607047000051FD000081 +:10BA00005CBA020063FD000060BA02003805000461 +:10BA100054BA020058BA020070B5194802F068EA38 +:10BA200017480C3002F064EA164E002425005C2012 +:10BA3000604381194D603550114802F05EEA641C84 +:10BA4000182CF4DB002070BD10490F4810B50860B9 +:10BA500010490F48086011490F4808601149104803 +:10BA600008601249104808601249114808601349DB +:10BA70001148086013491248086001F0EFFE10BD3C +:10BA8000BC9402001C8C0200E1FD000068BA0200B8 +:10BA9000E3FD000080BA0200E5FD000070BA02007C +:10BAA000F3FD00006CBA020009FE000074BA020047 +:10BAB0001FFE000078BA020033FE00007CBA0200CC +:10BAC00047FE000084BA020010B5FFF78DF910BDE3 +:10BAD0003EB5144C1248E06020000C30FFF700F92E +:10BAE000114D1248D122290002F02AE90C481049D0 +:10BAF000A838A06000220FA06B4607C320000B49A6 +:10BB00002A0008300B2302F030E9002800D0012081 +:10BB10003EBD044810B5806802F022E910BD000067 +:10BB2000B0870200DC7C0200A40600002C9D02000D +:10BB3000516902004D4143205478204E6F7469666C +:10BB4000790000003EB50C22194818498160203167 +:10BB5000C160203101610121083002F00EE9144872 +:10BB60000C2200210C3002F008E911480C220021BF +:10BB7000103002F002E90D48FF212131603002F05F +:10BB8000C8E80A48002118380222016042600122F8 +:10BB90008160C26001822421418206496C462CC921 +:10BBA0002CC40099416102F0ACE93EBD0C4101C0DA +:10BBB000A8F500C0707B02000149012008607047B1 +:10BBC00014BB0200084907480860084912200860B1 +:10BBD00007492020086008490648086008490748C6 +:10BBE000086070472C1002C034BB020038BB020052 +:10BBF0003CBB02000131010040BB020025310100C5 +:10BC000044BB020004490348086005490348086032 +:10BC1000704700008D32010018BB02001B3C010080 +:10BC20001CBB020070B504000D00160002F06CE9A8 +:10BC3000A84330430100200002F06AE970BD0821EA +:10BC4000080010B502F064E981208021800002F034 +:10BC500064E90221DD2002F060E90221DD2002F02A +:10BC600060E980215A2002F05CE9FF217F2002F088 +:10BC700050E9FF48002102F04CE9F3200021800048 +:10BC800002F046E904212E2002F046E9022002F0EB +:10BC9000E8E804212E2002F044E940212D2002F0A2 +:10BCA00038E910212E2002F034E910BDF3B593B02D +:10BCB00000252E0013980D9504022000FF30563009 +:10BCC0000004000C07950695129002F02EE90590ED +:10BCD0002000FF3057300004000C119002F024E9DE +:10BCE00004902000FF3059300004000C109002F046 +:10BCF0001CE903902000FF30B2300004000C0F90CC +:10BD000002F012E9FF34D53402902004000C0E90AA +:10BD100002F00AE9019093202021C00002F0F8E827 +:10BD2000D3486421163002F0F4E8A1214F2002F03C +:10BD3000F0E81298FF2102F0FCE81198382102F097 +:10BD4000F8E81098082102F0F4E80F98012102F0B9 +:10BD5000F0E80E98012102F0F0E80E98042102F0BC +:10BD6000F0E8FF2000217C3002F0D2E8FF20E02143 +:10BD70007A3002F0CEE8BE4F04213F1D380002F0B9 +:10BD8000CCE80A2002F06CE800247F20002C099007 +:10BD900002D17F224A2101E07F22A221139802F0E2 +:10BDA000D4E8B3481C1F34C401000000EC9302C067 +:10BDB00000040000019BFF63002102F0B4E8B148D9 +:10BDC0001A21401C02F0AEE87727FF001821380046 +:10BDD00002F0A8E8022002F04EE8FF2080210C309B +:10BDE00002F0A8E8012C03DB0421781C02F0A2E891 +:10BDF000A1214F2002F096E81298FF2102F0A2E85C +:10BE00001198302102F09EE81098002102F09AE883 +:10BE10000F98012102F096E8FF2080210C3002F0FB +:10BE20008AE898481A21401C02F07CE895480421D1 +:10BE3000183002F078E877203821C00002F072E86C +:10BE4000002C05D18F480421001D02F070E804E0A9 +:10BE50008C480421001D02F06EE88A4F40213F1DEE +:10BE6000380002F064E88021380002F064E82820FD +:10BE700002F000E88021B81E02F054E8022001F030 +:10BE8000FAEF7F1E02E00A2001F0F4EF380002F022 +:10BE900046E80006F7D5139800280ED17920C00097 +:10BEA00002F03CE805007748143002F038E806005C +:10BEB0007448153002F032E80D900D9836070006F0 +:10BEC000000E0D900D99360F300240180B906D4802 +:10BED000AD06AD0E0021801C0C9502F024E86948E7 +:10BEE0008021001D02F022E8FF2080210C3002F0AA +:10BEF0001EE864488021801C02F014E80A2001F04A +:10BF0000BAEF62E00A2001F0B6EF380002F006E86E +:10BF1000000605D45B48001D02F000E8C006F1D51C +:10BF20005848E23001F0FAEF0890139800280ED13B +:10BF30007920C00001F0F2EF05005248143001F002 +:10BF4000EEEF06004F48153001F0E8EF0D900D9828 +:10BF500036070006000E0D900D99360F300240187E +:10BF60000C99AD06AD0E691A88400B99401A0A90DB +:10BF700009987F2803D10A980690099807900A9893 +:10BF800001F0FEFA0700069801F0FAFA874203D89A +:10BF90000A98069009980790089809900898002C2C +:10BFA00003D10206120E4A2102E00206120EA2215D +:10BFB000139801F0D4EF334F08213F1D380001F0F2 +:10BFC000BAEF0821380001F0B2EF7727FF00380000 +:10BFD00001F0A4EF000698D5079802061498120EF7 +:10BFE000002C025501D14A2100E0A221139801F052 +:10BFF000B6EF24480021801C01F094EFFF2080213F +:10C000000C3001F094EF641C022C00DAC7E60599AD +:10C01000129801F098EF0499119801F094EF0399A8 +:10C02000109801F090EF02990F9801F08CEF0199B0 +:10C030000E9801F088EF15B0F0BDF8B5232211215C +:10C04000002001F08CEF0025282068430E490024D1 +:10C050004718AE000BE00D48805900190004000C91 +:10C0600001F06CEFA100641C2406240E78500748F0 +:10C070000C308059A042EEDC6D1C2D062D0E032DD8 +:10C08000E2D3F8BDB5030000F04201C0A0F600C045 +:10C09000F8B523221121002001F060EF00250024D3 +:10C0A00028206843FF494718AE000DE0A00038582B +:10C0B0000106FD48090E805900190004000C01F02A +:10C0C00042EF641C2406240EF7480C308059A0422D +:10C0D000ECDC6D1C2D062D0E032DE0D30322112167 +:10C0E000002001F03CEFCCE710B504022000FF3047 +:10C0F00051300004000C382101F024EF2000FF3003 +:10C1000056300004000CFF2101F01CEF2000FF302E +:10C1100057300004000C3A2101F014EF2000FF30EA +:10C1200058300004000CD92101F00CEF2000FF3042 +:10C1300059300004000C162101F004EF2000FF30FC +:10C14000B0300004000C1F2101F0FCEE2000FF3095 +:10C15000B1300004000C232101F0F4EE2000FF3088 +:10C16000B3300004000C102101F0ECEE2000FF3091 +:10C17000C6300004000CC92101F0E4EE2000FF30BD +:10C18000AC300004000CF62101F0DCEE2000FF30A2 +:10C19000E3300004000C002101F0D4EE2000FF3059 +:10C1A000E4300004000C002101F0CCEE2000FF3050 +:10C1B000A230000452EF4E1801000000E89702C0C0 +:10C1C0000004000052412C0F000C032101F0C4EECA +:10C1D0002000FF30A3300004000C122101F0BCEE5F +:10C1E0002000FF30A7300004000C0E2101F0B4EE57 +:10C1F0002000FF30A8300004000C3A2101F0ACEE22 +:10C200002000FF30A9300004000C642101F0A4EEEE +:10C210002000FF3048300004000C402101F09CEE6B +:10C220002000FF30A5300004000C442101F094EE02 +:10C23000FF34241D2004000C802101F08EEE10BD7F +:10C24000FEB5382104022000FF3051300004000CFC +:10C2500001F082EE2000FF3056300004000CFF2178 +:10C2600001F07AEE2000FF3057300004000C382136 +:10C2700001F072EE2000FF3058300004000CD9218C +:10C2800001F06AEE2000FF3059300004000C162146 +:10C2900001F062EE2000FF30B0300004000C1F21DE +:10C2A00001F05AEE2000FF30B1300004000C2221D2 +:10C2B00001F052EE2000FF30B3300004000C1021DA +:10C2C00001F04AEE2000FF30C6300004000CC92106 +:10C2D000029001F042EE2000FF30AC300004000C70 +:10C2E000F62101F03AEE2000FF30E3300004000CAC +:10C2F000002101F032EE2000FF30E4300004000C99 +:10C30000002101F02AEE2000FF30A23005042D0CA0 +:10C310000321280001F020EE2000FF30A3300604A6 +:10C32000360C1221300001F018EE2000FF30A7304B +:10C3300007043F0C0E21380001F00EEE2000FF3004 +:10C34000A8300004000C3A21019001F006EE200014 +:10C35000FF3048300004000C402101F0FEED2000C9 +:10C36000FF30A5300004000C4421009001F0F4EDF2 +:10C37000E01DFC300004000C102101F0EEEDFFF791 +:10C3800066FE2000FF30ED300004000CFF2101F0BC +:10C39000E4ED2000FF30EE300004000CFF2101F03E +:10C3A000DCED2000FF30EF300004000CFF2101F035 +:10C3B000D4ED2000FF30F0300004000CFF2101F02C +:10C3C000CCED2000FF30A1300004000CD32101F09F +:10C3D000C4EDD321280001F0C0EDD321300001F0DD +:10C3E000BCED2000FF30A4300004000CD32101F08C +:10C3F000B4ED0098D32101F0B0ED2000FF30A6305D +:10C400000004000CD32101F0A8EDD321380001F085 +:10C41000A4ED0198D32101F0A0ED2000FF30A93058 +:10C420000004000CD32101F098ED2000FF30AA3069 +:10C430000004000CD32101F090ED2000FF30C1304A +:10C440000004000C4E2101F088ED2000FF30C230C6 +:10C450000004000C4E2101F080ED2000FF30C330BD +:10C460000004000C4E2101F078ED2000FF30C430B4 +:10C470000004000C4E2101F070ED2000FF30C530AB +:10C480000004000C4E2101F068ED02984E2101F0ED +:10C4900064ED2000FF30C7300004000C4E2101F095 +:10C4A0005CED2000FF30C8300004000C4E2101F08C +:10C4B00054ED2000FF3003E0F04201C0A0F600C0C0 +:10C4C000C9300004000C4E2101F046EDFF34CA349F +:10C4D0002004000C4E2101F040ED03221121002028 +:10C4E00001F046EDFEBD10B504022000FF305130D2 +:10C4F0000004000C382101F030ED2000FF305630F0 +:10C500000004000CFF2101F028ED2000FF3057301F +:10C510000004000C3A2101F020ED2000FF305830DB +:10C520000004000CD92101F018ED2000FF30593033 +:10C530000004000C162101F010ED2000FF30B03097 +:10C540000004000C1F2101F008ED2000FF30B13085 +:10C550000004000C232101F000ED2000FF30B33077 +:10C560000004000C102101F0F8EC2000FF30C63070 +:10C570000004000CC92101F0F0EC2000FF30AC30C9 +:10C580000004000CF62101F0E8EC2000FF30E3305D +:10C590000004000C002101F0E0EC2000FF30E4304A +:10C5A0000004000C002101F0D8EC2000FF30A23084 +:10C5B0000004000C032101F0D0EC2000FF30A33078 +:10C5C0000004000CD2CFF01001000000E49B02C078 +:10C5D00000040000A62E59BB122101F0C8EC200077 +:10C5E000FF30A7300004000C0E2101F0C0EC200049 +:10C5F000FF30A8300004000C3A2101F0B8EC200014 +:10C60000FF30A9300004000C642101F0B0EC2000E0 +:10C61000FF3048300004000C402101F0A8EC20005D +:10C62000FF30A5300004000C442101F0A0ECFF34E1 +:10C63000241D2004000C802101F098EC10BDF0B501 +:10C6400004022000FF3051300004000C382185B076 +:10C6500001F08CEC2000FF3056300004000CFF216C +:10C6600001F084EC2000FF3057300004000C38212A +:10C6700001F07CEC2000FF3058300004000CD92180 +:10C6800001F074EC2000FF3059300004000C16213A +:10C6900001F06CEC2000FF30B0300004000C1F21D2 +:10C6A00001F064EC2000FF30B1300004000C2221C6 +:10C6B00001F05CEC2000FF30B3300004000C1021CE +:10C6C00001F054EC2000FF30C6300004000CC921FA +:10C6D000039001F04CEC2000FF30AC300004000C63 +:10C6E000F62101F044EC2000FF30E3300004000CA0 +:10C6F000002101F03CEC2000FF30E4300004000C8D +:10C70000002101F034EC2000FF30A23005042D0C94 +:10C710000321280001F02AEC2000FF30A3300004A0 +:10C72000000C1221029001F022EC2000FF30A73013 +:10C730000004000C0E21019001F018EC2000FF30E5 +:10C74000A8300604360C3A21300001F010EC20002D +:10C75000FF30A93007043F0C6421380001F006ECDB +:10C760002000FF3048300004000C402101F0FEEBB7 +:10C770002000FF30A5300004000C4421009001F09F +:10C78000F6EBE01DFC300004000C102101F0EEEB94 +:10C79000FFF767FC2000FF30ED300004000CFF21A4 +:10C7A00001F0E4EB2000FF30EE300004000CFF212C +:10C7B00001F0DCEB2000FF30EF300004000CFF2123 +:10C7C00001F0D4EB2000FF30F0300004000CFF211A +:10C7D00001F0CCEB2000FF30A1300004000CD3218D +:10C7E00001F0C4EBD321280001F0C0EB0298D32163 +:10C7F00001F0BCEB2000FF30A4300004000CD3217A +:10C8000001F0B4EB0098D32101F0B0EB2000FF3031 +:10C81000A6300004000CD32101F0A8EB0198D3212D +:10C8200001F0A4EBD321300001F0A0EBD3213800BC +:10C8300001F09CEB2000FF30AA300004000CD32153 +:10C8400001F094EB2000FF30C1300004000C4E21B9 +:10C8500001F08CEB2000FF30C2300004000C4E21B0 +:10C8600001F084EB2000FF30C3300004000C4E21A7 +:10C8700001F07CEB2000FF30C4300004000C4E219E +:10C8800001F074EB2000FF30C5300004000C4E2195 +:10C8900001F06CEB03984E2101F068EB2000FF30B3 +:10C8A000C7300004000C4E2101F060EB2000FF3087 +:10C8B000C8300004000C4E2101F058EB2000FF307E +:10C8C000C9300004000C4E2101F050EBFF34CA3493 +:10C8D0002004000C4E2101F04AEB0322112100201C +:10C8E00001F050EB05B0F0BDFFB5080000241600C4 +:10C8F000250081B0FFF70CFCA1214F2001F026EBB1 +:10C90000FF2000217C3001F022EBFF20E0217A3073 +:10C9100001F01CEB40212D2001F018EBFF48002115 +:10C9200001F014EBFD482A21401C01F010EBFB48FC +:10C930008021DC3801F012EB7727FF00102138004E +:10C9400001F00CEBF648022101F008EB8021781E83 +:10C9500001F0FCEA02E0022001F0A0EA380001F058 +:10C96000F2EA0006F7D5ED480D3001F0ECEA0700D9 +:10C97000EA480E3001F0E6EAE1193170049928180E +:10C980000870E648002101F0E2EAE4480021401C7A +:10C9900001F0DCEAE1480021801C01F0D8EAA1E7BF +:10C9A000FFB5080000241600250081B0FFF752FCF7 +:10C9B000A1214F2001F0CAEAFF2000217C3001F0C4 +:10C9C000C6EAFF20E0217A3001F0C0EA40212D20A4 +:10C9D00001F0BCEA396C4BFC01000000E09F02C092 +:10C9E00000040000F5F48AD7D148002101F0B8EA2C +:10C9F000CF482A21401C01F0B4EACD488021DC3820 +:10CA000001F0B6EA7727FF001021380001F0B0EA04 +:10CA1000C848022101F0ACEA8021781E01F0A0EAAA +:10CA200002E0022001F044EA380001F096EA000634 +:10CA3000F7D5BF480D3001F090EA0700BC480E3032 +:10CA400001F08AEAE1193170049928180870B84891 +:10CA5000002101F086EAB6480021401C01F080EA7E +:10CA6000B3480021801C01F07CEAFFF72FFB43E76D +:10CA7000FFB581B0002416000F002500FFF707F96D +:10CA80003800FFF7E6FDA1214F2001F06AEAFF2000 +:10CA900000217C3001F064EAFF20E0217A3001F0CF +:10CAA00060EA40212D2001F05CEAA148082101F054 +:10CAB00058EA9F480A21401C01F052EA9C48802114 +:10CAC000DC3801F056EA7727FF001021380001F02A +:10CAD00050EA9848022101F04CEA8021781E01F0CA +:10CAE00040EA02E0022001F0E4E9380001F034EA13 +:10CAF0000006F7D58E48401D01F02EEA07008C484D +:10CB0000801D01F02AEAE119317004992818087093 +:10CB10008748002101F024EA85480021401C01F0EB +:10CB200020EA83480021801C01F01AEAFFF7CEFAC0 +:10CB3000E2E6FFB5080000241600250081B0FFF7EB +:10CB4000E6FCA1214F2001F00CEAFF2000217C30FF +:10CB500001F006EAFF20E0217A3001F002EA4021EC +:10CB60002D2001F0FEE97248082101F0FAE9704831 +:10CB70000A21401C01F0F4E96D488021DC3801F005 +:10CB8000F8E97727FF001021380001F0F2E9694841 +:10CB9000022101F0EEE98021781E01F0E2E902E0D5 +:10CBA000022001F086E9380001F0D6E90006F7D549 +:10CBB0005F48401D01F0D0E907005D48801D01F08D +:10CBC000CCE9E119317004992818087058480021FF +:10CBD00001F0C6E956480021401C01F0C2E9544862 +:10CBE0000021801C01F0BCE986E6FFB58BB00C008B +:10CBF000FFF74DF824022000FF3056300004000CEF +:10CC0000FF2101F0BEE92000FF3057300004000C86 +:10CC10000A9001F0B2E9C7210840382101430A987F +:10CC200001F0AEE92000FF3059300004000CFF3461 +:10CC300058340990062600252004000C0890002096 +:10CC4000AC0004A9085169460851089801F094E91C +:10CC5000E3210840B100014309060898090E01F0DC +:10CC600090E9002D4CD0012D05D0022D46D0032D8A +:10CC700046D1222100E01221099801F082E90A98A8 +:10CC8000022701F07AE9F8210840384301000A98A8 +:10CC900001F076E90898012701F06EE9FC210840CF +:10CCA00038430100089801F06CE940212D2001F083 +:10CCB00058E91F48012101F054E91D488F21401C0B +:10CCC00001F04EE91A480221001D01F04AE9184816 +:10CCD0008021DC3801F04CE97727FF001021380073 +:10CCE00001F046E91348022101F042E9022001F077 +:10CCF000E0E88021781E01F034E906E01C21BBE762 +:10CD00000A21B9E7022001F0D4E8380001F024E953 +:10CD10000006F7D5EF20800001F01EE90700044867 +:10CD2000083001F01AE93B0604AA11591B1603E06A +:10CD3000B50300007E060000CB18694613510F5959 +:10CD400000060016381808510D9803700E9B0859FC +:10CD5000187010590206120EFF48025109590700B7 +:10CD60000906090E1037002D395120D0012D2BD086 +:10CD7000022D48D0032D63D1C0680106F748090E83 +:10CD800001F0EEE8F8680106F448090E083001F0F9 +:10CD9000E8E8F148C0680106F048090EC01E01F03D +:10CDA000E0E8F8680106ED48090E401D28E000683B +:10CDB0000106EA48090EC01C01F0D2E838680106F5 +:10CDC000E648090E0B301BE0E34840680106E348E3 +:10CDD000090E801C01F0C4E878680106DF48090EDE +:10CDE0000A3001F00E9E90CB01000000DCA302C0CF +:10CDF00000040000DD650F6ABEE8DC4840680106FB +:10CE0000DB48090E401E01F0B6E878680106D848F4 +:10CE1000090EC01D01F0AEE81CE0D4488068010690 +:10CE2000D348090E401C01F0A6E8B8680106D048B6 +:10CE3000090E093001F09EE8CC48806801060D20FB +:10CE4000090EC00101F096E8B8680106090ED1206C +:10CE5000C000DFE7C748002101F08CE8C548002189 +:10CE6000401C01F088E8C3480021801C01F082E8E2 +:10CE700004A8005901060F20090E800101F07AE88C +:10CE8000684600590106BB48090E0C3001F072E8F3 +:10CE9000761E6D1C042D00DADBE60FB0F0BDFEB58A +:10CEA00001F024E804210B2001F008E840210320D0 +:10CEB00001F004E80321022001F000E801F01AE883 +:10CEC000AD4908680122104308600221DD2001F00D +:10CED0005AE8012000F0F6EF0025A8486E00811EF8 +:10CEE0003718A8004A1D801800240190701800907F +:10CEF000A5200121800001F03EE83019401C010608 +:10CF0000FF20090E413001F036E89D4801F02EE87F +:10CF100001001F39C329385500D200200099620052 +:10CF2000085501998A5A0100100001F024E8641C98 +:10CF3000022CDDDBFF200021413001F01CE8A520A0 +:10CF40000021800001F016E86D1C012DC5DB0221D7 +:10CF5000DD2001F014E800F0CAEF04210B2000F0FE +:10CF6000BAEF4021032000F0B6EF0321022000F0C9 +:10CF7000B2EF00F0C0EFFEBD824A137FDB07FCD1A9 +:10CF8000804A203210819180704770B5002480075C +:10CF9000050E0721200001F00EE88006800E2A0011 +:10CFA00002430721200001F002E8641C2406240E3D +:10CFB000012CEED370BD70B504000D0002E00A2014 +:10CFC00000F080EF2900200000F0F8EF0128F6D1F2 +:10CFD000002070BD70B505000100B220FFF7EBFF27 +:10CFE000040007D12900B22000F0ECEF2900B220A4 +:10CFF00000F0E4EF200070BDF8B5050000200090BF +:10D0000000F07CEF68780602287806435E48AD1C85 +:10D010000168412212031143016001230920000726 +:10D02000038000228280574881889C0221406B2423 +:10D03000E400091981800380524F20373A8214009E +:10D04000B021200000F0B6EF1F2108430200B021FC +:10D05000200000F0ACEF641C2406240E012CEFD35A +:10D060000021402000F0AEEF0021412000F0AAEFA7 +:10D070000220FFF78AFF0021B32000F0A4EF102167 +:10D08000B12000F0A4EF3F48017FC907FCD13D4922 +:10D09000888801229203104388800320388231045B +:10D0A000090C5000FFF768FF00240CE028194078B5 +:10D0B0000102285D01430120C00320180004000C78 +:10D0C000FFF75AFFA41CB442F0DB28194078010294 +:10D0D000285D01430120C003FFF74EFF2948017F6F +:10D0E000C907FCD1818801229203914381800020ED +:10D0F000388202E0022000F0E6EE2021B22000F0AB +:10D100005EEF0128F6D10221192000F058EF002827 +:10D1100000D0FEE71F21402000F054EFF82141200D +:10D1200000F050EF00F0F6EE0098F8BD70B5002466 +:10D13000124E0E4D253698356000315A002000F011 +:10D140003AEFE100641C032C6850F5DB0B4E002421 +:10D1500055366000305A00F01AEFE1004919641C9E +:10D16000102C8861F5DB054E00240FE0D04201C091 +:10D1700082060000B5030000002D008063F600C0A9 +:10D1800092020000000800900021008075366000C7 +:10D19000305A00F0ECEEA10049198031641C292CB2 +:10D1A0008861F4DB00F0B6EE00F07CEE3A2000F08F +:10D1B0007EEEFB49C86300F07EEE00F0A0EEF94879 +:10D1C000016AF74840300160F749496A416070BD23 +:10D1D00070B50024F54EF64DE000285802066000B8 +:10D1E000315A120E002000F0E2EE641C032CF3DB37 +:10D1F000EE4E00245915807201000000D8A702C02D +:10D20000000400008EBFDC063036E0004019806963 +:10D2100001066000305A090E00F0C6EE641C102CA6 +:10D22000F3DBE74E00245036A000401980308069BF +:10D2300001066000305A090E00F0A6EE641C292C8D +:10D24000F2DB00F072EE00F038EEDA48C06B010657 +:10D25000090E3A2000F044EE00F036EE00F058EEF1 +:10D26000D448D54A403001681162D44940684862C8 +:10D270000421402000F0B8EE70BDD04810B5416ADE +:10D28000C20C91434162416A120411434162CE488B +:10D29000016A032212031143016251200021C000E0 +:10D2A00000F072EEC948002100F06EEEA320C0210C +:10D2B000800000F06AEE0B200121C00100F064EE56 +:10D2C000FF200221C01C00F070EE1022022100207D +:10D2D00000F08EEE02221100002000F08AEE10BD58 +:10D2E00010B5FFF72DFFFFF7C8FF3B2206210020F6 +:10D2F00000F066EE10BD0021062010B500F06CEEC7 +:10D30000AF48AE492838406A4862FFF76BFF10BD4E +:10D31000F3B50C000821200085B000F00EEE059852 +:10D32000FFF7DEFFAA4F380000F02AEEA44D3826A2 +:10D330003043283D01002870380000F026EE380008 +:10D3400000F01EEE304301002870380000F01CEEA3 +:10D35000DD2000F016EE0221084301002870DD20D8 +:10D3600000F012EE95499B4848620121C420FFF766 +:10D370002CFEFEF7A0FC10224721002000F038EE22 +:10D380000598007800280FD1012000F02FF90A201D +:10D3900000F0A2ED002000F029F90A2000F09CED39 +:10D3A00021000020FEF7BEFC10224721002000F0E3 +:10D3B00024EE0221C420FFF708FEFEF77CFC0822C1 +:10D3C0004721002000F014EE0598E31CA21C002168 +:10D3D000FFF704FB7A4DA1781E3D288800F0D4EDBC +:10D3E0002E1DE178308800F0D0ED08224721002082 +:10D3F00000F002EE8021B220FFF7E7FD0122472175 +:10D40000002000F0F6ED40220521002000F0F0EDB4 +:10D4100001224721002000F0F0ED0221B220FFF7A9 +:10D42000D4FD08224721002000F0E2ED0598631D9D +:10D43000221D0021FFF730FB301D2179008800F00C +:10D44000A4ED2F000C376179388800F09EED04229E +:10D450004721002000F0CCED08224721002000F0F9 +:10D46000CCED0598002104AA03ABFFF75BFA6B46ED +:10D470002888197C00F088ED6B463088197B00F015 +:10D4800084ED0598002102AA01ABFFF766FB301D71 +:10D490006B460088197A00F078ED6B463888197968 +:10D4A00000F072ED02224721002000F0A2ED0422DC +:10D4B0004721002000F0A0ED0598E31DA21D0021EA +:10D4C000FFF7A7FB381DA179008800F05EED28006A +:10D4D0001430E179008800F058ED02224721002045 +:10D4E00000F08AED40220521002000F086ED0120A9 +:10D4F000FFF77AFDFFF7FFFE002007B0F0BD10B583 +:10D500002F4C0121A41D608802062078120E00F025 +:10D5100078ED00F0FEEC00F078EDFC21412000F009 +:10D520005CED2D4800F074ED62882078012100F058 +:10D5300074ED00F0FAEC207800F072ED00F0E8EC09 +:10D540000221072000F04CED608801062078090ECA +:10D5500000F06AED00F06CED1021022000F040EDCB +:10D560000320FFF71CFD8021122000F026ED102182 +:10D57000022000F022ED4020FFF736FD02210800D6 +:10D5800000F01AED1548016801221207914301606D +:10D590000168134A11430160210008312000FFF7A0 +:10D5A000B7FE0120FFF7FBFC00F046ED00F0BCECFD +:10D5B00010BD0000684401C00020009000A9008058 +:10D5C00088F600C0684301C0402000808B02000044 +:10D5D000510400003100310084FA00C000280080AE +:10D5E00000300020002800DA40427047002810B5C3 +:10D5F00004D008212A2000F0D0ECD9E708212A2005 +:10D6000000F0C6EC1F02845301000000D4AB02C03E +:10D61000000400007AD0A9B2D4E700003EB50C2285 +:10D620001223274C25486061264D0092E8680422A9 +:10D6300025A100F0E4EB21480C223C382061009247 +:10D6400068680422062323A100F0D8EB28001822E2 +:10D65000F03803000092012200213C3300F0FAEC84 +:10D6600028001822783803000092012200213C3360 +:10D6700000F0F0EC11486438E0602868FDF776FBB4 +:10D68000184D1948A122290000F0A0EB17481849AD +:10D69000A060002217A06B4607C3200012492A0091 +:10D6A00008300C2300F0A6EB002800D001203EBD7E +:10D6B000034810B5806800F09AEB10BDEC4501C03E +:10D6C00040F800C0184701C054696D657243624D4F +:10D6D000736751004D61634D676D74534D454D73D4 +:10D6E00067510000A4060000D0A30200E04401C07E +:10D6F000BF5201004D4143204D676D740000000092 +:10D7000009490120800210B50880084908800949AC +:10D71000074808600949084808600A49084808603D +:10D7200000F022F810BD0000A8BB0200AABB020056 +:10D73000458F3000ACBB0200A78F3000B0BB0200A9 +:10D740007F7900C09CBB020004490348086005497A +:10D75000034808607047000065740200D4BB0200F3 +:10D76000B7990100D8BB0200024901480860704720 +:10D770007D8600C0C4BB0200FF210D48491C10B5C6 +:10D7800000F00CEB0A48FF214B3101617D21C900FB +:10D7900041616E2181617D210901C16105490162FB +:10D7A00000F05CEC024A8032D162906210BD000051 +:10D7B000A06802C0307500000648142110B500F0C2 +:10D7C000EEEA04490448086002480C22012100F0F6 +:10D7D0001AEB10BDF46902C0F44701C010B500F0A7 +:10D7E00042EC10BD05490448086006490448086039 +:10D7F0000649054808607047536F0100A4BC020049 +:10D80000A16E0100A4BB02002D6F0100E4BB020069 +:10D810000448542110B500F0C2EA03490020086012 +:10D8200010BD0000845101C080F800C004490348C5 +:10D83000086005490348086070470000341532004D +:10D84000B0BC0200185C0004B4BC0200F0B520209B +:10D8500000211E4A10601000C030876B00688446AB +:10D860001B4B4A01D518FF3300208133D6188200A4 +:10D870003C68AB181C60B318401C00066246126876 +:10D88000000E08281A60F2D3491C0906090E0C295B +:10D89000E6D30F4C0F4D104E002007000C224243E0 +:10D8A00041010B19B7509219401C49190006000E8E +:10D8B00053600C289160F1D3F0BD04480749C03093 +:10D8C000086008490648086070470000701F01C0E2 +:10D8D000400802C0C00902C0400B02C0ECBB0200FD +:10D8E00001F30100F0BB0200044903480860054948 +:10D8F00003480860704700007F980100A0BF020045 +:10D900006D970100A4BF02000249014808607047FA +:10D9100041A4010014BC02007047000010B5904CF7 +:10D920008E48606120001430FDF720FAE0F764FDB6 +:10D93000FDF760FBFFF76CFFFFF73EFFFFF71CFFF3 +:10D94000FFF74CFF87480021FEF763F8864900285F +:10D95000486004D0012240681100FEF77FF87F483C +:10D960000C22203820617E480121103000F04AEA64 +:10D97000FDF768F87D4800F07AEBFFF767FFFEF7E8 +:10D9800027F979497A48083148600800D6F729F91B +:10D9900000F070EB002010BD10B5FDF785FA0028EF +:10D9A0000BD1FEF7DBF8002807D1FFF737FE002880 +:10D9B00003D1FDF78FFC002800D0012010BD10B569 +:10D9C000FFF776FEFDF7C0FCFDF768FAFEF7E7F813 +:10D9D000002010BDF8B500256648FFF721FB664C16 +:10D9E000674922680092654A6648624B00F046EB40 +:10D9F00022680092644A65496548664B00F03EEB38 +:10DA000022680092644A65496548664B00F036EB2F +:10DA10002268009243B9269201000000D0AF02C0F4 +:10DA200000040000290A7ADE644A65496548664BAD +:10DA300000F02EEB22680092644A65496548664B07 +:10DA400000F026EB22680092644A65496548664BFF +:10DA500000F01EEB22680092644A65496548664BF7 +:10DA600000F016EB22680092644A65496548664BEF +:10DA700000F00EEB22680092644A65496548664BE7 +:10DA800000F006EB22680092644A65496548664BDF +:10DA900000F0FEEA22680092644A65496548664BD8 +:10DAA00000F0F6EA002804D0644800F0F6EAD6F761 +:10DAB00053F800F0F6EA002805D06048401C00F05A +:10DAC000ECEAD6F749F8FDF7B5FA5D4E0024A00060 +:10DAD00030588047002800D00125641C052CF6D35F +:10DAE0002800F8BD57493F4810B5086000F048F9D4 +:10DAF00000F0D2F8FEF738F8FDF778F9FDF736FABE +:10DB0000FDF7BEFF00F01AF9FFF710FF00F0C2F8B2 +:10DB1000FDF7EAFFFFF7FEFD00F0E2F8FDF7C2FABD +:10DB2000FEF7A0F800F090F8FDF74CFAFDF725FCA1 +:10DB3000FFF7CDFE00F0FAF8FEF7B4F8FFF780FE2D +:10DB400000F0DCF8FFF758FE00F0E0F8FDF7B6FA59 +:10DB5000FCF7ECFFFFF7E2FEFEF77EF8FDF798FA20 +:10DB600000F0A2EA00F0BAF8FFF7F8FD002010BDBF +:10DB7000645401C05C2201C0BBA7310014FA00C08C +:10DB8000D07C02009DB800C020FE00C0E8F400C0B8 +:10DB9000B04F00048404000478040004045000041E +:10DBA000440500043805000420CD01C0A40500048C +:10DBB0001C0500041005000488C301C0C04F000408 +:10DBC000A004000494040004008101C0D04F0004AC +:10DBD000B4040004A8040004008E01C0A8050004D9 +:10DBE0003005000424050004D06901C09C05000430 +:10DBF000D0040004C40400040CA301C0A005000468 +:10DC0000E4040004D8040004FCAA01C0EC4F0004A2 +:10DC1000F8040004EC04000400B301C050500004F8 +:10DC20009405000488050004400002C01050000460 +:10DC3000580500044C050004F0E401C02300010075 +:10DC40008CB602C064BA02000249014808607047FD +:10DC5000FFFF000048BC02000A480021C94300B58C +:10DC600041600021016008480168012292051143CA +:10DC70000160074905480880091F088000F018EA7C +:10DC800000BD000070FA00C000210080FFFF00000E +:10DC9000500600907047000008490748086009498D +:10DCA000074808600949084808600A4908480860A8 +:10DCB00009491E2008607047B9F5010020BB020029 +:10DCC000DFF5010024BB0200EFF5010028BB0200D4 +:10DCD0000BF601002CBB020030BB020070470000B5 +:10DCE00004490348086004497D200001086070472A +:10DCF00078040004C8BB0200CCBB02000249014802 +:10DD0000086070476DCD00C0DCBB020004490348C9 +:10DD1000086005490348086070470000B11102001F +:10DD2000A8BC0200C9110200ACBC020002490148B3 +:10DD3000086070473812320078BB020007490A2099 +:10DD4000086008490648086008490748086009490A +:10DD5000074808600949084808607047F8BB020096 +:10DD600048890200FCBB0200DC8B020008BC0200F8 +:10DD70006DF6000000BC02008FCF000004BC020062 +:10DD800002490148086070470D14020010BC0200EF +:10DD900004F01FE58FB3300004F01FE5C50000005C +:10DDA00004F01FE5C100000004F01FE527B43000B7 +:10DDB00004F01FE594CB310004F01FE5B901000029 +:10DDC00004F01FE521EA000004F01FE5018830009F +:10DDD00004F01FE531F7000004F01FE5B1F8000082 +:10DDE00004F01FE57016020004F01FE599FA000028 +:10DDF00004F01FE59FF9000004F01FE57D7030007E +:10DE000004F01FE5BD10000004F01FE585100000C0 +:10DE100004F01FE53511000004F01FE56311000058 +:10DE200004F01FE5BDEE546A01000000CCB302C04F +:10DE3000D8020000EB17AC9EF9B2300004F01FE5E9 +:10DE40007184000004F01FE5D183000004F01FE599 +:10DE50007177300004F01FE50BB7300004F01FE5C8 +:10DE600013B7300004F01FE513A6000004F01FE50F +:10DE700093F3000004F01FE50FDE000004F01FE53F +:10DE8000A417020004F01FE518C6310004F01FE5D6 +:10DE9000D7F6000004F01FE5FCD4310004F01FE5C4 +:10DEA000CB0E000004F01FE5A9DD000004F01FE523 +:10DEB000FF0E000004F01FE5FDDD000004F01FE58B +:10DEC00045DE000004F01FE5BFDF000004F01FE5A1 +:10DED00025F1000004F01FE513F4000004F01FE535 +:10DEE000B3F3000004F01FE5C9F5000004F01FE5DE +:10DEF00083F5000004F01FE519F5000004F01FE5AC +:10DF000051F3000004F01FE5C3F4000004F01FE526 +:10DF100067F3000004F01FE5F1F0000004F01FE5D6 +:10DF200035F3000004F01FE57DF3000004F01FE569 +:10DF3000A7F7000004F01FE58BF7000004F01FE5D1 +:10DF4000BBF6000004F01FE5C7F6000004F01FE573 +:10DF500099F1000004F01FE59DF8000004F01FE5B2 +:10DF600019F3000004F01FE50FF2000004F01FE5B4 +:10DF7000C3F7000004F01FE5E8CB310004F01FE513 +:10DF80008BE5000004F01FE51929020004F01FE5ED +:10DF90002729020004F01FE5E701000004F01FE557 +:10DFA0002302000004F01FE523B8300004F01FE551 +:10DFB00085B8300004F01FE5E142010004F01FE5E0 +:10DFC000BD3E310004F01FE5F73E310004F01FE5CF +:10DFD0004F3F310004F01FE5353F310004F01FE5ED +:10DFE000F915310004F01FE53116310004F01FE58A +:10DFF0008116310004F01FE56B16310004F01FE5B7 +:10E00000792B010004F01FE56F2B010004F01FE5E0 +:10E01000852B010004F01FE5B12B010004F01FE582 +:10E02000152C010004F01FE5F92B010004F01FE599 +:10E03000C92B010004F01FE5E12B010004F01FE5EE +:10E04000A53F010004F01FE5C32C010004F01FE50B +:10E050004B16310004F01FE58130010004F01FE58C +:10E060006DF7000004F01FE5D930010004F01FE552 +:10E070004540010004F01FE56940010004F01FE580 +:10E080004D66300004F01FE5F51B310004F01FE57C +:10E09000A76A010004F01FE5CD00310004F01FE580 +:10E0A00039BD010004F01FE50189300004F01FE5CF +:10E0B0000901000004F01FE591C5000004F01FE510 +:10E0C0005550000004F01FE59DEE0100738202C070 +:10E0D0004B8002C08DB002C0758F02C0BD8102C0EE +:10E0E000F38102C0798002C0458202C091AF02C0B4 +:10E0F000198202C00000000007B900C01FB900C0AB +:10E10000D9AE02C055AF02C07BAF02C0E71E706C33 +:10E110000400000000000000000000001FDB8C185D :00000001FF diff --git a/firmware/mrvl/sd8887_bt_a2.bin.ihex b/firmware/mrvl/sd8887_bt_a2.bin.ihex new file mode 100644 index 00000000..30ae6b13 --- /dev/null +++ b/firmware/mrvl/sd8887_bt_a2.bin.ihex @@ -0,0 +1,16066 @@ +:1000000001000000000000A0000200000AB6BD1BB5 +:100010001CF09FE51CF09FE51CF09FE51CF09FE5A0 +:100020001CF09FE51CF09FE51CF09FE51CF09FE590 +:10003000071D0FEA080802005007020060070200CF +:10004000B8070200C8070200D8070200E80702004C +:10005000F4070200000000EAB38000EA28008FE203 +:10006000000C90E800A08AE000B08BE001704AE24A +:100070000B005AE1AC80000A0F00BAE814E04FE22E +:10008000010013E303F0471013FF2FE1C80B020038 +:10009000080C02000030A0E30040A0E30050A0E301 +:1000A0000060A0E3102052E27800A128FCFFFF8A44 +:1000B000822EB0E13000A128003081451EFF2FE1E3 +:1000C00004309FE503308FE013FF2FE1210502008C +:1000D0001D48802110B549F3DAEB1C48582149F33B +:1000E000D6EB1B4800210A0006C0202117485830D3 +:1000F00049F3CCEB002010BDF0B50024144F0837B5 +:10010000012609E0C519686801F0E4FB6968300060 +:10011000884010498860641CE00039580029F1D1FA +:100120000B4F0024283709E0C519686801F0D2FB9D +:1001300069683000884008498860641CE0003958CC +:100140000029F1D10020F0BD840C0200F00F000462 +:10015000400E0004009000A8009100A85E48042210 +:100160000621027041700271417102724172704742 +:10017000F8B505F08EFA002803D002F097FC0028AD +:1001800079D1554800241838046000F02CFB05F0A4 +:100190004DFA52490D5C01F049FD290049F3BEECCE +:1001A0004F4E2300320049F338E9401C61410504F9 +:1001B0002D0C05F03BFA4B4940000F5A05F00FFBA0 +:1001C000390049F3ACEC2300320049F326E9401C26 +:1001D00061410004000C290000F014FB05F026FA30 +:1001E00041490D5C01F022FD290049F398EC230000 +:1001F000320049F312E9401C614105042D0C05F061 +:1002000015FA3A490F5C01F011FD3900E6DB88C0B0 +:1002100001000000FC0100A000020000CE6362307B +:1002200049F386EC2300320049F300E9401C6141A8 +:100230000004000C290000F006FB082000F0F2FA90 +:1002400001F0FEFC310049F38EEC401C0004000C70 +:1002500000F0F1FA01F0F4FC052149F36AEC294AB7 +:10026000230049F3E4E81922801861410006000EDA +:1002700000F0EFFA601E04F069F8FF24641C20000F +:1002800004F05EF8200004F067F804F077F804F05A +:1002900089F8402002F0B2FB00F0ECFA00F0E1FA3D +:1002A00019490120086004F0A9F804F0C1F804F02D +:1002B000C8F804F0FBF80C2001F0B7FCC02001F0F6 +:1002C000B4FC04F00BF904F01BF904F022F904F07B +:1002D00032F9302001F0A9FC0320000201F0A5FC56 +:1002E000FFF746FF00F090F9F8BD0000C05600B0DF +:1002F0002C00000440420F001600000442000004DD +:1003000037000004C0C62D00F85600B010402DE99B +:10031000C58100EB78409FE5000094E5000050E3C4 +:100320000300000A6A0100FA000094E5000050E3AF +:10033000BF81001B080200FA0000A0E3AD1500FB1E +:10034000950100FA0000A0E35B0100FB5B0100FAED +:10035000000094E5000050E34C01001BAF0100FBDE +:10036000DF0100FB000094E5000050E30100000AFB +:10037000AB0100FB0C1600FAA90100FA00000FE126 +:10038000BF0000E200F021E1051500FA0000A0E343 +:100390001080BDE84C6300B010B500F0A3FC05F37D +:1003A0009FF905F00DFB00F077FC002801D001203B +:1003B00010BD05F005FF002010BD10B5FFF7E2FEEF +:1003C00020F040F90400012003F04EFF200020F04F +:1003D0003DF905F068F9002805D002F071FB00280E +:1003E00001D002F058FB002010BD10B502F0DCFC7B +:1003F00010BD9308002210B502E09400521C015178 +:100400009A42FAD310BD064A0648002110B5FFF7FC +:10041000F0FF00F015FB00F09BF900205F5F50AB90 +:1004200001000000F80300A0000200003A8BDC8D00 +:1004300010BD000060530000B0910004F8B505F055 +:1004400019F905008748016802221143016001681B +:1004500008231943016083494031CB681343CB60C3 +:10046000436813434360CA6840263243CA60CB687E +:1004700080221343CB60016831430160016811435E +:100480000160416831434160416811434160764CED +:1004900020681E2188432060744FF96A2020814320 +:1004A000F96204F032FF022005F081F8000604D55D +:1004B0004021272005F0B8F803E00321092005F0CA +:1004C000BEF8A80703D4B86801210843B86068489B +:1004D000C16B0122D2059143C163C16B0322D204D7 +:1004E0001143C1630721082005F0A9F80321072063 +:1004F00005F0A5F804F038FF2068E021884320606B +:1005000060691521884360616069B043606160691A +:1005100001218906884360616069052109078843D4 +:100520006061E06953490840E061E06940084000CB +:10053000E061E0691027B843E06103F0D1FF4E4A63 +:1005400010682021084310604C4A10680421884339 +:1005500010604B480D21006889014018016852065F +:1005600011430160A069B043A0616068454908403B +:1005700060606168444801406160A168434A11407D +:10058000A160A1680140A160E168414A1140E160B9 +:10059000E1687A039143E160E1680140E160374A34 +:1005A0001820C043C03A1168014039431160394AEC +:1005B000A906116803D501400820014301E001406C +:1005C00039431160344801690904090C016141692A +:1005D0000904090C416181690904090C8161E06920 +:1005E000012189038843E061E06989008843E06173 +:1005F000E06909118843E061E069052109060843C3 +:10060000E06103F0E3FFF8BD10B500F008F82348FF +:100610000068002801D0FFF711FF10BD7047124895 +:10062000016803221202914301604169A55B588071 +:1006300001000000F40500A000020000237302FD89 +:1006400042019143416141694200914341618169A5 +:10065000C200914381610F480068016F012211437C +:100660000167016F022291430167C0300168D20621 +:1006700011430160704700000023008000280080C3 +:100680000029008000910090FBFBFFFF0027008005 +:10069000403D0080145700B0DFFFD5FD7FFF7FFF96 +:1006A000D5FDD5FDD5FDD7FDC03C008000220080E2 +:1006B0004C6300B0084810B50168084B0A001031BF +:1006C00008001960111D5960242149F3FEE804490E +:1006D000022002F0E5FB10BD30C500B0085700B0A5 +:1006E000E9370000F8B5002425001C48A7001426AF +:1006F0006643C5511A481421301849F3E6E81848F2 +:1007000014211430301849F3E0E81548142128303A +:10071000301849F3DAE8114830222838C159104816 +:1007200062433C301018C4608160456185610D49A9 +:10073000C56101610C4901620C498562416206F3A1 +:10074000EBF8641C012CD0DB0949082001F0E0F82B +:100750000849FF20401C8860F8BD0000C46300B059 +:1007600048FC00B0493A0000653C00008F3E0000A4 +:1007700073400000009000A80F490E4810B50860B3 +:100780000F490E48086010490E48086010490F488C +:10079000086011490F4808601048802149F394E827 +:1007A0000E488021803049F390E80D48802149F3BC +:1007B0008CE810BDC90B02003CE5000401420000BA +:1007C00040E500044542000044E50004405489002F +:1007D00034E50004A086010038E50004D8CB00B061 +:1007E000D8CC00B010B5084C00206062DF200002B9 +:1007F000E0620648A06201210548490249F364E825 +:1008000001206062002010BDC09B00A800ADDEEF9B +:1008100058CD00B026484068C168264A1143C160DF +:10082000704700B5FFF7F6FF214840684168012294 +:100830005202114341604168D2001143B14E0E494A +:1008400001000000F00700A000020000D79BBC40A0 +:10085000416000BD090401431A4840688161704746 +:1008600018494968CA681204120C00040243CA609D +:100870007047144949684A69120C120402434A61DC +:100880007047090401430F484068C16370470D4930 +:1008900049684A68120A120202434A6070470948CE +:1008A0004068FF30413041681D22914341607047EC +:1008B00004484068FF304130416802229143416062 +:1008C00070470000105700B08F0300008FC08FE208 +:1008D0001CFF2FE101210920000701600021416078 +:1008E00070476848012101600021416070476648F7 +:1008F000016B80221143016370477047634800B564 +:100900000068002801D0FFF7F2FFFFF7EAFF00BD03 +:1009100010B55F4C20F0B0E8A04221D05D490840FE +:10092000040004F006FD262004F055FE010920070E +:100930000901000F08430106090E262004F03DFEC0 +:1009400004F026FD200A4107534A490F042911707B +:1009500001DD04211170000702D5107840421070AB +:1009600010BDFF20C130202100B504F0E6FE00BD1F +:1009700010B54A4C207900280BD10120207104F0D9 +:10098000F2FE062004F027FEC006C00F607104F0DE +:10099000DCFE607910BD70B50600FFF7E9FF404D41 +:1009A0002C0D002811D004F0DEFE8021262004F05A +:1009B0004FFE04F0CAFEA8682043A8603948816849 +:1009C000220211438160002003E0A868A043A860D0 +:1009D000300005F021F870BD10B507F009FA04F0F9 +:1009E0007EFC02F05BFE7D24E4010021200004F087 +:1009F0007EFC0021200004F07DFC0021200004F09A +:100A00007CFC0021200004F07BFC274C022120000C +:100A100004F070FC0221200004F072FC234C60689A +:100A2000234908406060E068172149020843E060FC +:100A300004F034FE2168C2061E4801D5014300E0DF +:100A4000814362686260216021680143B3EE001D4A +:100A500001000000EC0900A0000200001082BE1D91 +:100A600021600F480068002802D0B520FFF79DFFE5 +:100A700010BD7047704710B504F0DBFE0C4C002829 +:100A800002D005F026F801E005F032F8E06010BD74 +:100A90000F490E4808607047003000A8400C0090D5 +:100AA0004C6300B0FFFF00003F0F0000105700B084 +:100AB000D85700B08028008040230080409C000070 +:100AC00000210080FF7FFF7F00000020A35700006F +:100AD0005C5900B0F8B5324800680002000F0828E1 +:100AE00028D1304C6069E5042843606160694000AA +:100AF0004008606120680826304320602068EF12BB +:100B0000B84320604821452004F061FD04214820BD +:100B100004F05DFD20683043206020683843206089 +:100B2000322004F078FE6069284360616069210525 +:100B300008436061F8BD1C4810B5006800282DD03E +:100B400004F01BFEFFF7C6FF2021192004F08AFDE8 +:100B50000221162004F086FD2F21332004F037FDFA +:100B60000321572004F033FD9221242004F02FFDAF +:100B70006221252004F02BFD262004F036FD80089C +:100B80008000022108430106090E262004F01FFD03 +:100B90006621412004F01BFD04F0E1FD10BD0000C2 +:100BA00000200080002800804C6300B070B5444CE9 +:100BB000444D2068444E002808D0E817306070602B +:100BC00004F060FF286A4000400828623D48C038B1 +:100BD000816A090C09048162816A8B2292001143A7 +:100BE00081623A4900208860900639490122120446 +:100BF000036880188842FBD3002001688018904267 +:100C0000FBD30120800600682068002855D004F03E +:100C1000B4FD0F21622004F0DAFC1021332004F02F +:100C20002CFD04F09CFD706B0121C9020843706328 +:100C30003068632188433060F06826490840F060DE +:100C400004F081FB07210D2004F017FD07211B2074 +:100C500004F013FD04211B2004F004FD0EC226C184 +:100C600001000000E80B00A000020000E46A00A000 +:100C70004021252004F000FD4021172004F0FCFC59 +:100C8000022004F0BCFC400603D540210B2004F0F8 +:100C9000F3FC04F091FB04F015FD800604D4F06829 +:100CA000012189038843F0601048C168104A11404F +:100CB000C160C1680F4A1143C1602068002806D096 +:100CC000012040046862801CA8620B48E862002092 +:100CD00070BD00004C6300B0C09000900021008007 +:100CE00000230080000001B0C0FFFF7F802800804B +:100CF000F0F0FFFF0A0A00000202020000B50D49F1 +:100D0000002087B00860020001001E2003AB07C36B +:100D100002000948FF21491C6B4607C3A838074A4F +:100D2000002307A103F3EEFB0006000E00D0012014 +:100D300007B000BD9C0E0004EC16000467610000C3 +:100D400049646C650000000010B5FFF7E9FC06F08F +:100D500038FD07F0C1F907F0F5F910BD11483C2145 +:100D600010B548F3D0ED0F4800210160416081606B +:100D70008161016201630C4A4163C2620B4C816371 +:100D80000B48EE22210048F31AED0948094B0422D2 +:100D900021003EF3FEF810BD10B500F00DFB002061 +:100DA00010BD00005CD600049B870000DC0500003D +:100DB00068100004E3EE3300F8B5C54C20680C253C +:100DC000A8432060C348C168820C1143C160C16858 +:100DD000072252021143C160C16801221206114369 +:100DE000C160C16889098901C160C168C20D9143B0 +:100DF000C160C168C20C9143C160C1685603B14370 +:100E0000C160C1680722D2069143C160C168F21077 +:100E10001143C1600168B04A114301607D20002187 +:100E2000400204F078FA7D27FF010021380004F029 +:100E300078FA0021380004F071FA0021380004F03B +:100E400073FAA649086A1022104308622068A84372 +:100E50002060606851068843606004F0A1FEA068CD +:100E6000B1000843A0602069A90588439307D7DB38 +:100E700001000000E40D00A000020000FD92DED0A1 +:100E800020612069304320619A4D686800206860C5 +:100E9000686819210906084368609648803001682F +:100EA0004026B143016001680F22120291430160A4 +:100EB0000168032252021143016001680F221203EC +:100EC00091430160016803225203114301600168EC +:100ED000090909010160016806273943016020689A +:100EE00030432060206830218843206004F0E4FB18 +:100EF0000528206802D910210843FFE720602868F0 +:100F00000121084328602868B84328607648C168F2 +:100F1000020D1143C160816A31438162012004F0F6 +:100F2000DAFE012005F02CFAF8BD10B505F06CFAD8 +:100F30007149088071487249000C000408607249C8 +:100F400070480860724971480860734971480860C8 +:100F5000734972480860744972480860744973485C +:100F60000860754973480860754974480860764997 +:100F70007448086076497548086077497548086084 +:100F80007749764808607849764808607849774814 +:100F900008607949774808607949784808607A4953 +:100FA000784808607A49794808607B497948086040 +:100FB0007B497A4808607C497A4808607C497B48CC +:100FC00008607C487C4908607D497C4808607E490F +:100FD0007C4808607E497D4808607F497D480860FC +:100FE0007F497E48086080497E48086080497F4884 +:100FF000086081497F48086010BD0121080010B5D4 +:1010000002F00AFD04F058FB7C494000085A7C4974 +:10101000086000F0FBF90221012002F0FDFCFFF75F +:10102000D5FE0321012002F0F7FC1FF048ED04215A +:10103000012002F0F1FCFF22724919321C2005F355 +:1010400089FD0521012002F0E7FC0621012002F0C4 +:10105000E3FCFFF76AFF0721012002F0DDFC6A498B +:10106000E120400208601FF02EED0821012002F06F +:10107000D3FC6549042207201FF028ED038F27C504 +:1010800001000000E00F00A000020000097A606D7E +:101090000921012002F0CAFC614800210A0006C0B3 +:1010A0005F4A60496048614B05F3CDFE0A2101208B +:1010B00002F0BCFC00F0C2F90B21012002F0B6FCEA +:1010C00000F072F90C21012002F0B0FC00F0B0F841 +:1010D0000D21012002F0AAFC0E21012002F0A6FC45 +:1010E000002010BD10B500F0B9F900F0F3F900F0E0 +:1010F0005FF9002010BD0000002F0080002100805B +:1011000000081C200028008080260080C8E8000419 +:10111000386D00B0BCEA00041D6200006CE50004FC +:10112000358E00005CE500046B8E000060E5000475 +:10113000858E000068E500047D8E000064E50004F3 +:10114000C11200B098E600040B0F00B09CE600044A +:10115000631100B0A0E60004A91100B0A4E60004E9 +:10116000C51100B0A8E6000409D9000080EC000415 +:101170001BD9000084EC00042DD9000088EC000489 +:10118000BF1200B0ACE60004FD1700B0B0E60004EA +:101190005B1800B0BCE60004911800B0C0E6000483 +:1011A000951800B0C4E6000443D400008CE60004A7 +:1011B00013D5000090E60004D7620000F4F60004A6 +:1011C00039730000BCE50004BB570000B4E600041E +:1011D000BD570000B8E60004C3730000B4E5000486 +:1011E0007D730000B8E50004B36D0000B0E50004B5 +:1011F000696D0000ACE50004BB62000084E60004F9 +:10120000C962000088E600040B63000094E6000455 +:10121000000000047CE50004A833000494E5000409 +:101220005C5800B0B81B0000F0170004445600B032 +:101230000449034810B54860080005F020F810BDC7 +:10124000AF640000805800B011491048086012498E +:101250001048086012491148086013491148086095 +:101260001349124808601449124808601449134889 +:101270000860154913480860154914480860164964 +:101280001448086016491548086070476E250270BA +:1012900001000000DC1100A0000200007761C7DD42 +:1012A0000B6A0000A0F500040D6A000090F5000430 +:1012B000436A000094F50004496A000098F50004B0 +:1012C000716A00009CF500047B6A0000B0F5000420 +:1012D000936A0000B4F50004C16A0000A4F500049C +:1012E000D96A0000A8F50004A56A0000B8F500045A +:1012F000B36A0000ACF5000410B50124A402204834 +:10130000EE22210086B048F378EA11F0CDF90CF016 +:10131000B3FC012200210C2003AB07C302001848D4 +:1013200002920090174A0019002317A1019403F3B9 +:1013300007F900281DD1194815A101F393FE18489B +:101340001A4A4168174881601749016100214161CB +:101350008261174AC161026241621649816205F3E6 +:1013600017FB002805D11449112000F00DFB0028BF +:1013700002D0012006B010BD00F066FA0020F9E7A7 +:10138000683C0004D57900004E66635461736B00BD +:101390004E6663466C6167730000000010410004F4 +:1013A000045900B010E800B0D1790000CD790000F8 +:1013B000B9790000AF790000957900000649002056 +:1013C00008807047064905480860074905480860D5 +:1013D0000749064808607047C0EA00B0397F00003E +:1013E00004FD00040F7F000000FD00040D7F0000DD +:1013F000FCFC0004084804A1016008A141600C49FC +:101400000A480860704700006D6465765F61697521 +:101410007265636F7264000018ED00046D64657698 +:101420005F616975706C61790000000001890000DE +:101430009CF8000470B500240B4D04E0401940688E +:1014400000F0A2FA641CE00029580029F6D170BD12 +:1014500006488168FF22521C114381608168102276 +:1014600011438160704700008C5900B0009000A8C3 +:1014700010490F4810B5086010490F48086011491D +:101480000F480860114910480860FFF7E7FE1FF099 +:1014900036EB00F0EBF90F490D480860742BAEB144 +:1014A00001000000D81300A00002000083897960C9 +:1014B0000F490E48086006F3F3FD0F490D48086018 +:1014C00010BD0000A163000024F60004A963000021 +:1014D0001CF60004B163000020F60004672400B08D +:1014E00024F50004991500B054F90004A71700B0C2 +:1014F00058F900042D270100C0FC00045E495D4836 +:1015000010B508605E495D4808605F495D48086045 +:101510005F495E48086060495E48086060495F480E +:10152000086061495F480860614960480860624935 +:1015300060480860624961480860634861494162E7 +:10154000634A416461491160634A62491160644AB7 +:1015500062491160644A63491160654A63491160D8 +:10156000C11D644AF9314A61644A634911606549A1 +:10157000634A0A60644A4A60654A64491160664A7F +:1015800064491160664A65491160674A654911609E +:101590006649674A11600100664A80310A61026546 +:1015A000654A4A614265654ACA61C265C266644A63 +:1015B0000267644A0A62644A4A62654A6349116082 +:1015C000654A64491160664A64491160664A654922 +:1015D0001160674A65491160674A66491160684A47 +:1015E00066491160684A67491160694A6749116034 +:1015F0006849016668496A4A4166684911606949F3 +:10160000016201646949684808606A49684808607D +:101610006A49694808606B49694808606B496A48CB +:1016200008606C496A4808606B496C4802F096FE95 +:101630006C496B4808606D496B4808606D496C489F +:1016400008606E496C4808606E496D4808606F49D3 +:101650006D4808606F496E48086070496E480860C0 +:1016600070496F48086071496F4808607149704857 +:10167000086010BD7792000034FD0004638F000005 +:1016800050F40004398F0000C0FB000445920000B4 +:1016900018F900046F92000014F9000443A500003B +:1016A000C8F300047D97000040FC00045BD4B9FD42 +:1016B00001000000D41500A0000200009A71A710DC +:1016C0006D9F0000BCFC0004839E00003CFD0004F4 +:1016D000FFA0000054F70004FFA1000040EB00044D +:1016E00087A3000018F600042BA40000C4FB00042C +:1016F0005DA40000E4F600049DA40000D8FC0004F2 +:101700003F99000048FC0004BBA40000D7A40000DF +:1017100034F7000433A60000D8E8000459A60000FE +:101720007FA6000030F5000499A6000004F800042C +:10173000CDA6000058F8000453A700002CFD0004BB +:10174000B9A70000DCFC00044BA80000FFAE0000BD +:1017500089A90000E3BB00002FBC0000A1BD000070 +:1017600093AF00008CF70004ABAF000080F70004DB +:1017700025AA00002CF7000459AF00004CF8000423 +:10178000A9BB00003CF80004E1AF0000ECF4000449 +:10179000A9B000000CF80004B7B0000040F8000445 +:1017A000C3B0000014F80004DDB0000021B1000057 +:1017B000D3B3000060F80004B9B2000099B500008E +:1017C000A4F7000475B5000094F70004C5B5000047 +:1017D00098F70004F1B50000C0F7000415B600004A +:1017E0005CFC00043FBB000038F700040798017A56 +:1017F000C05132002DBE00002CF80004C5BE000010 +:1018000098FB000479BF0000C0F6000493BF0000FD +:1018100030F40004B9BF0000B0F600043BBD000086 +:1018200050F7000469BD000020F800041BC0000050 +:1018300024F8000457C0000044F800046DC0000004 +:10184000D4F90004C1C0000090F40004054810B5AC +:101850000078102804D1044904484C2207F0B0FB5A +:1018600010BD0000A50E0004B20E0004E20F00043B +:101870000548064910B50078097800F029F80448B1 +:101880000068804710BD0000004000AA004000AA88 +:1018900074F00004074906480860084906480860D3 +:1018A0000849074808600949074808607047000070 +:1018B0001F8E0000CCF3000485270100BDDE6A6B9B +:1018C00001000000D01700A0000200006E9919ADC1 +:1018D000D4F7000493270100D8F70004A1270100E2 +:1018E000D0F70004064808B502680092054A064988 +:1018F000130008000C386C3303F3E0FF08BD000050 +:10190000980E0004801E01B0FC6200B00449054A34 +:10191000497812780120914200D0002070470000E1 +:10192000000002A9000002A910B51FF02CE801F385 +:10193000BDFD002010BD10B50C0001F0DFF884499A +:101940000860C10702D02100052015E0810702D5FB +:101950002100062010E0410702D5210007200BE0FE +:10196000010702D52100082006E0C00602D52100AB +:10197000092001E0210000201FF07AE8012010BDBD +:10198000F1B5002073490E68734F340005000AE07A +:10199000E10706D0A9007A58002A02D00099300049 +:1019A000904764086D1C002CF2D1012803D00099E7 +:1019B00000201FF05EE8F8BD654910B5486001F0F1 +:1019C00024F910BD202800D3FEE7634A8000135895 +:1019D000002B00D0FEE71150002070475F480068E0 +:1019E000002800D00120704702688368C168100099 +:1019F000184770B55A4D6C6AE00703D0FFF254EEF9 +:101A0000A81768625748A10706D52021C160421770 +:101A10006A6282680A438260610703D5A96A042268 +:101A20009143A96221070AD5A96A08229143A962B4 +:101A30008021C160D2436A6282680A4382600120C9 +:101A400070BDF8B5484D2C6BE00702D0A81728638D +:101A50000440200606D58020C043286380208443AC +:101A600001F043F8200709D50820C0432863082067 +:101A7000844301F038FE082000F0B3FC600604D572 +:101A80004020C043286340208443A00606D5202080 +:101A9000C04328632020844300F06CFE600707D514 +:101AA000042000F057FF0420C0432863042084432F +:101AB000200407D50126F603300001F016F8F043A4 +:101AC0002863B4436003400F06D007205F0F533EE6 +:101AD00001000000CC1900A000020000A9801BF04A +:101AE000000421000140C943296384430B262000E0 +:101AF00036053040070005D0380000F09DFBF84364 +:101B00002863B443E000400F09D00727BF06260032 +:101B10003E40300000F0F9FAF0432863BC43002C4B +:101B200006DA0120C00700F01AFB154828630440BC +:101B30001448044205D0200000F076F9200001F09E +:101B400062FA0D4881680122D20411438160F8BD18 +:101B5000094B0122D20410B5DA60FFF77CFF0120A7 +:101B600010BD0000380E0004009100A8840C020093 +:101B7000A8FD0004009400A8009000A88022008026 +:101B8000FFFFFF7F0010000110B503F004FE0028E6 +:101B900001D0AC48807D10BDF8B50027AA4D3C00AF +:101BA000E968A8683E0079407840084303D004F310 +:101BB000DFFF06000C00FFF7E7FF04F08DFA1EF0D0 +:101BC000BCEE04F08AFAE968A8687940084309D0B5 +:101BD00004F3CEFFAA68801BEB68A141801859412D +:101BE000E960A860F8BD10B502F00CFC002826D012 +:101BF00002F007FC95490120C0048860001100F044 +:101C000075FF93480088002801D102F04BFC02F0D8 +:101C1000B4FC02F08EFC02F055FC01F024FEFFF74C +:101C2000B3FF1EF08AEE01F029FE02F043FC02F041 +:101C3000ADFC02F087FC02F046FC02F0E1FB10BDB7 +:101C4000FEB50024250026001EF074FD019000F072 +:101C5000D4FE002802D1FFF79FFF44E000F091FC82 +:101C600000F008FE00F0F7FE77480068810702D513 +:101C7000C10700D00124010702D5410700D5012585 +:101C8000810602D5C00600D5012604F091FC009023 +:101C900001F09EF9070002D1012001F0ADF9012009 +:101CA000C007807804210840400702D400F04DFCB2 +:101CB00005E0002CCFD0002DCDD0002ECBD0009849 +:101CC0000028C8D0002FC6D0604CA568E017E0609F +:101CD00001263603300000F012FFFFF7D1F24E1458 +:101CE00001000000C81B00A0000200005D68A54DB7 +:101CF00084FF300000F004FFA56001981EF028FD6D +:101D0000FEBD10B500F081FC00F00DFE00F0DEFE1F +:101D1000FFF7A0FF10BD10B51EF016FD0400FEF782 +:101D2000EBFC01F02FFD20001EF012FD10BD10B5E0 +:101D300004001EF009FD494A1168214311601EF09C +:101D400007FD10BD10B503F0FDFC47494000085ADF +:101D5000464B47495843096A0B071B0F47F374EF7B +:101D6000080507060609090B0B06400810BD800888 +:101D700010BDC00810BD000910BD10B504001EF054 +:101D8000E3FC364A1168A14311601EF0E1FC10BD6E +:101D9000324A010012680020914300D101207047AF +:101DA000F8B52E4C04F3EEFE22696369851A994159 +:101DB0000E00E1680091A0686422070047F336EF47 +:101DC00033002A0047F3B4EB0099060000253800E1 +:101DD00069406840084309D10120E560A06004F330 +:101DE000D1FE6A1E80185141616120613000F8BD4A +:101DF0001A4800218160C16001614161704710B5DE +:101E000002F01CFB10BD70B5040002F017FB041BB0 +:101E100003F071FD050017490026200047F30AEF83 +:101E200033002A0047F384EB70BDC00005D50B4892 +:101E30002C304068002800D0004770470300012084 +:101E400010B5FFF7A5FF002804D0D80102D5002067 +:101E500000F0DBFA10BD0000A0020080A85600B020 +:101E6000009000A85A5800B000000004A0860100AD +:101E70000028008040420F00022910B505D0032938 +:101E800003D0042901D0052903D1C14BFF21491CEE +:101E90009960042A05D0052A03D0062A01D0072A12 +:101EA00007D1002805D100210A2208000B0004F008 +:101EB000D8FB10BD7047052803D2B6498000085CE6 +:101EC0007047FF20704710B50C000020FFF7F3FFAC +:101ED000A04201D100F080FA0120FFF7ECFFA04200 +:101EE00001D100F051FC0220FFF7E5FF63D0A769A4 +:101EF00001000000C41D00A00002000044907B3DD2 +:101F0000A04201D100F03AFD10BD10B50C00002038 +:101F1000FFF7DBFFA04201D100F07CFA0120FFF7C0 +:101F2000D4FFA04201D100F03EFC0220FFF7CDFF1C +:101F3000A04201D100F027FD10BD042910B507D043 +:101F400004DC022904D0032906D101E0052903D1CC +:101F500000F01BFA002800D0012010BD022910B5A6 +:101F600005D0032903D0042901D0052901D100F0AF +:101F7000B5F910BD022910B505D0032903D00429F5 +:101F800001D0052901D100F068F910BDFF280BD060 +:101F9000854A00218B00D35C834202D10806000EE3 +:101FA0007047491C0529F5D3FF207047FF280CD046 +:101FB0007D4A00218B009B185B78834202D1880008 +:101FC000105C7047491C0529F4D3FF207047052891 +:101FD00004D275498000401840787047FF20704750 +:101FE000FF280CD0704A00218B00D35C834203D1C0 +:101FF0008800801840787047491C0529F4D3FF20D9 +:102000007047FF280CD0684A00218B00D35C8342C4 +:1020100003D18800801880787047491C0529F4D3C3 +:10202000FF207047F7B582B007000E000C2901D2DF +:10203000092F02D3002005B0F0BD00255A49A800A1 +:102040000A5CBA421ED14418A278B2421AD02806BD +:10205000000E3900019001F016FC002812D0A67085 +:10206000E07804994007400FC9000843E0700198E8 +:102070003200390001F009FC002808D0E078022184 +:102080000843E0706D1C052DD8D30120D3E74648E6 +:10209000AA00FF2110188170E0784007400FE0701F +:1020A000C8E7F0B5060008003F4F00220421930066 +:1020B000FC5CB44209D1DD19EC7823000B43002805 +:1020C00002D02300FB242340EB70521C052AEED3E0 +:1020D000F0BD354A00218B00D35C834206D18800D5 +:1020E0008018C0784007C017401C7047491C05295C +:1020F000F1D3002070470020704770B56103954D03 +:1021000001000000C01F00A000020000B078C580E0 +:1021100005000C00100002F0AFF9200000F00DFDEA +:102120002800FFF74DFF022805D0032803D004281C +:1021300001D0052803D1200000F09CF870BD2000DC +:10214000FFF787FE70BD10B50400C00005D5012261 +:10215000120311040C20FFF7DAFF200105D501223C +:10216000D20211040B20FFF7D2FF600105D5012236 +:10217000920211040A20FFF7CAFF10BD0120C0031C +:1021800010B502F073F90120C00700F0CDFC0C4837 +:10219000016A80221143016210BD0120C00310B505 +:1021A00002F06AF90120C00700F0C7FC0449086A80 +:1021B00080229043086210BD009000A8C05600B075 +:1021C00000280080F3B581B00F000198FFF7E8FE0A +:1021D00004000198FFF70EFF06000198FFF71BFFB0 +:1021E0000500002C03D0012C01D0022C19D1331F83 +:1021F0000126760547F33CED040309090E1510206E +:1022000002F03AF90120000509E0202002F034F93B +:10221000300004E0802002F02FF90120C00500F01A +:102220009AFC002F1DD10198FFF75DFF002818D000 +:102230002B1F47F31EED06161616160A04160198F4 +:10224000FFF763FF01000D2009E00198FFF75DFF34 +:10225000694AA1008918C978CA080100100000F075 +:10226000D2FFFF2201991000FFF741FEFEBD0800DA +:102270000021A7E710B50400C00203D50121022008 +:10228000FFF7A0FFA00207D501210320FFF79AFF67 +:1022900001210420FFF796FF200203D5012105202C +:1022A000FFF790FF01200007844205D040108442D0 +:1022B00002D0401084421AD1FF208206A11808D013 +:1022C000891804D0C206891804D10C2002E00B2022 +:1022D00000E00A20FFF774FE022805D0032803D08F +:1022E000042801D0052802D10121FFF76BFF10BDA2 +:1022F000F8B504000D0017000800FFF78CFE06007B +:10230000002C03D0012C01D0022C22D102AE3A279E +:1023100001000000BC2100A000020000B8A7345D4D +:102320003B1F01277F0547F3AEEC04030C0C141E82 +:10233000102002F0A5F8102002F0B4F801200005EA +:102340000FE0202002F09CF8202002F0ABF83800CB +:1023500007E0802002F094F8802002F0A3F801202A +:10236000C00500F0EBFB331F47F38CEC061D1D1D71 +:102370001D0E041D2800FFF7D2FE002801D1012107 +:1023800000E000210D200CE02800FFF7C8FE002827 +:1023900001D1012100E000211C4AA0008018C07872 +:1023A000C00800F03AFFFF2229001000FFF7C1FD2E +:1023B000F8BD70B504000020002C03D0012C01D022 +:1023C000022C20D1124D00222868462104F3C7FBBD +:1023D000002817D128680022082104F3C0FB002838 +:1023E00010D1022C06D0012C04D01EF0DCEB00280A +:1023F0000AD007E005F078FB002803D105F0B0FC17 +:10240000002801D1002070BD012070BDC05600B071 +:10241000800E0004022010B5FFF7CDFC02F016F884 +:10242000002804D0012000F0B0F900F0C0F900212C +:10243000082208000B0004F032F910BD022010B58C +:10244000FFF793FC10BD70B50020FFF752FD0400AC +:102450000020FFF7D0FD05000120FFF7ACFC854907 +:10246000086A10221043086283499003886002F0D2 +:1024700039F8082000F06BFB2A0021000020FFF74C +:1024800019FD70BD70B51EF07DF905007B48006830 +:10249000C00710D00020FFF7D6FF7D20C00003F05A +:1024A00032FA002037F35FF8040002E0002037F32F +:1024B0005AF8A042FAD028001EF068F970BD00203A +:1024C00010B5FFF716FD04000020FFF794FD020091 +:1024D00021000020FFF762FD10BD10B51EF052F97B +:1024E000040066480068800701D5FFF7E8FF200078 +:1024F0001EF04CF910BD002010B5FFF7FAFC0400E7 +:102500000020FFF778FD020021000020FFF729FDE1 +:10251000002800D0012010BD38B501F020A7DC8EC6 +:1025200001000000B82300A0000200004C4F8AE028 +:1025300097FF002826D1401E00905548554C006852 +:10254000C00711D06068401C18D0A068FFF783FC5A +:10255000514947F3B2EB00906168884201D30020F3 +:1025600000E0081A009009E0684603F0DEFF00284A +:102570000CD000986060FFF76AFCA060217800989A +:10258000884203D3FFF7C1FF002801D1002038BDE6 +:10259000012038BD3E4810B50068C00705D0FFF7E0 +:1025A000C5FF002801D0012010BD002010BD002073 +:1025B00010B5FFF7A8FC04000020FFF726FD02007D +:1025C00021000020FFF7E8FC10BD10B5FFF79DFFCC +:1025D000002804D0002004F010F9002801D10020C8 +:1025E00010BD012010BD2A4810B5006880070DD429 +:1025F0002A480078022809D1FFF7CCFF002805D02F +:10260000FFF7E3FF002801D0FFF7D1FF10BD70B541 +:102610000020FFF778FC04000020FFF7F6FC2049BB +:102620000500096817204883082000F091FA01F09E +:102630005BFF01F04DFF154901208004C8602A00AE +:1026400021000020FFF75EFC0F48016A1022914331 +:1026500001620120FFF793FB70BD0D4810B50068C3 +:10266000C0070FD1FFF762FF00280BD01EF094F8CF +:102670000400FFF75BFF002801D0FFF7C8FF200030 +:102680001EF08EF810BD000000280080009000A809 +:10269000A85600B0EC5600B0E20400007C5800B030 +:1026A00084EA0004F8B51EF077F8BE4D07002868EC +:1026B00000282ED103F0E3F84021182003F054F84D +:1026C00003F0CFF8B84E30690221084340084000BB +:1026D000306101F0DBFE040001F0D8FEA042FBD027 +:1026E0003069032108433061B04A906801214906EE +:1026F00088439060AD4A803AD0688843D06003F048 +:10270000BEF80821332003F03AF803F0AAF80120BC +:10271000286038001EF044F8F8BDF8B51EF03CF80B +:10272000A04D00902868012835D103F02A94E62CAA +:1027300001000000B42500A00002000055B754902D +:10274000A8F80821332003F019F803F094F89C4905 +:102750008039C868012676063043C860984FB8684B +:10276000B043B86095490869022210434008400010 +:10277000086101F095FE040001F092FEA042FBD03A +:102780000A2003F0D4F8B8683043B8608B49086970 +:1027900080088000086103F07CF84021182002F0D6 +:1027A000F8FF03F068F80020286000981EF002F897 +:1027B000F8BD10B504000120FFF7AFFB002C05D1D8 +:1027C00080490968CA0705D0490603D5062801D003 +:1027D000FFF7F2FC10BD012010B5FFF79EFB0628A5 +:1027E00003D001F047FE0028FBD110BD082010B532 +:1027F000FFF7F5FA10BD082010B5FFF7CAFA10BDB3 +:1028000038B5002000900120FFF787FB040001206D +:10281000FFF705FC05000420FFF7E1FAFFF787FF4B +:1028200001F0BAFE202000F0A6F901F089FE68460A +:1028300005F05EF90121644A4906002800D000989D +:1028400091602A0021000120FFF748FB38BD10B538 +:102850001DF0ACFF04005B480068400702D5002073 +:10286000FFF7CEFF20001DF0A5FF10BD012010B521 +:10287000FFF753FB04000120FFF7D1FB020021000A +:102880000120FFF782FB002800D0012010BD08B511 +:10289000684605F029F9002803D0FFF7E7FF002874 +:1028A00001D1002008BD012008BD464810B50068D0 +:1028B000400705D5FFF7EBFF002801D0012010BD30 +:1028C000002010BD70B50120FFF727FB0400012098 +:1028D000FFF7A5FB05000020FFF71FFBA04204D077 +:1028E0002A0021000120FFF761FB70BD354810B5BB +:1028F0000068000709D4FFF7D8FF002805D0FFF7CC +:10290000B5FF002801D0FFF7DDFF10BD10B501F0C5 +:1029100017FE03F01AF810BD10B501F011FE03F018 +:1029200014F810BD38B5002000900120FFF7F5FA2B +:1029300004000120FFF773FB05002020CA32335A40 +:1029400001000000B02700A000020000A15FEA2DF6 +:1029500000F012F901F021FE204901204006C86074 +:10296000684605F0CFF8002808D101F005FE05F013 +:10297000D0F800280AD0FFF7A9FE07E00098002849 +:1029800002D1FFF7CDFF01E0FFF7D0FF2A002100C1 +:102990000120FFF7CBFA0420FFF705FA38BD0E48F7 +:1029A00010B5006840070FD4FFF77BFF00280BD05D +:1029B0001DF006FF0400FFF774FF002801D0FFF7A9 +:1029C000BBFF20001DF000FF10BD0000F85600B056 +:1029D0000028008080210080A85600B0009000A848 +:1029E000202010B5FFF705FA10BD202010B5FFF725 +:1029F000DAF910BD70B501F053FE01F06DFE01284B +:102A0000FBD10220FFF793FA04000220FFF711FB2D +:102A100005001020FFF7EDF95549012040048860BA +:102A200001F02CFE042000F0B0F801F015FE2A00A1 +:102A300021000220FFF75CFA4E480068800601D4AE +:102A400001F041FE70BD10B51DF0BAFE040049480A +:102A50000068C00602D50020FFF7CCFF20001DF063 +:102A6000B3FE10BD022010B5FFF761FA040002208A +:102A7000FFF7DFFA020021000220FFF790FA00289A +:102A800000D0012010BD10B505F088F9002803D052 +:102A9000FFF7E8FF002801D1002010BD012010BD84 +:102AA000344810B50068C00605D5FFF7ECFF0028D4 +:102AB00001D0012010BD002010BD70B50220FFF72D +:102AC00036FA04000220FFF7B4FA05000020FFF7F1 +:102AD0002EFAA04204D02A0021000220FFF770FA4B +:102AE00070BD244810B50068800609D4FFF7D8FFF0 +:102AF000002805D0FFF7B6FF002801D0FFF7DDFF63 +:102B000010BD70B50220FFF712FA04000220FFF793 +:102B100090FA0500042000F02FF801F0A6FD01F066 +:102B20009BFD134901204004C8602A0021000220B7 +:102B3000FFF7FCF91020FFF736F901F0A8FD01F0CE +:102B4000B8FD70BD0B4810B50068C006A6509F3890 +:102B500001000000AC2900A0000200006646E870F9 +:102B60000FD4FFF79AFF00280BD01DF033FE0400AE +:102B7000FFF793FF002801D0FFF7CDFF20001DF0E5 +:102B80002DFE10BD009000A8A85600B036494A6A34 +:102B900002434A62CA6A0243CA620120704732494C +:102BA0004A6A82434A62CA6A8243CA620120704703 +:102BB0002D4940310868086070472B49C0430863BD +:102BC00001207047284B80339969DA69090112099D +:102BD00009091201002804D00520400701430A20FA +:102BE00003E005200007014305200243D961DA61B3 +:102BF00070471E48016B022291430163016B402222 +:102C000091430163016B04229143016370471748AC +:102C1000006B810701D500207047400601D50220D6 +:102C200070470120704710B502F005FE002804D05F +:102C30000F498869CA0B9043886110BD10B502F036 +:102C4000FAFD002803D00A488069C007C00F10BDF4 +:102C500010B502F0F0FD002804D00548806901217C +:102C60000904084010BD000080220080002100807F +:102C7000C02A008070B5002402F0DDFD002808D0D5 +:102C8000FFF7E6FF002803D1FFF7D8FF002800D0A8 +:102C900001241DF09FFD0500002C07D102201EF02D +:102CA0006DF8002802D0144901200860002101209D +:102CB00001F080FB28001DF091FD002070BDF8B5EB +:102CC00001200E4900F034FF0B4E0024361D012771 +:102CD000FF0308E02104090C3943012000F028FF1C +:102CE00070598047641CA50070590028F2D103F088 +:102CF0003BFF04F094FEF8BD4C6300B07F8B0000F6 +:102D0000FF4841680068814201D1012070470020DE +:102D10007047FB4810B541680068012292070B001C +:102D2000040093439443A34205D1114010408142D3 +:102D300001D0012010BD002010BDF24900204861E3 +:102D4000F14A5060EE4A1060C8607047EC48416834 +:102D500001600168EB4841610021C1603999851922 +:102D600001000000A82B00A00002000092AE56CD8A +:102D70007047F8B504000D0016001DF035FD070082 +:102D80000021032001F020FB002C0ED0002D0CD0E0 +:102D900032002900200046F3BAED032001F036FB93 +:102DA00038001DF025FD0020F8BD38001DF020FD85 +:102DB000FEE7D94810B58068342146F344EE10BDD3 +:102DC000F8B50C000700002600281CD0D24D28784A +:102DD000012818D1012C02D11DF006FD06000021AA +:102DE000032001F0F1FAFFF733FF00280DD0FFF7C1 +:102DF000AEFF00202870032001F008FB012C02D157 +:102E000030001DF0F5FC0120F8BD1DF0EDFC8446FE +:102E1000FFF789FF002804D060461DF0E9FC002080 +:102E200013E0E868401CE860BA4800680C21000420 +:102E3000000C4143BA480818002105000A000B00A5 +:102E40000EC060461DF0D4FC2800002800D1FEE72B +:102E5000FA78082A01D8121D00E00C22390046F346 +:102E600056EDAC4800F045F9AE49886B012210439D +:102E70008863032001F0CAFA012C02D130001DF052 +:102E8000B7FC0020F8BD1CB50024E443A64801228D +:102E9000032101AB009400F3D9F901980028F5D083 +:102EA0000128F3D100F062F9F0E710B51DF09CFCA9 +:102EB00004000021032001F087FA9848001D00F06B +:102EC00018F99849C86BCA0D1043C863032001F074 +:102ED0009DFA20001DF08CFC10BD002810B508D014 +:102EE0000078012805D1FFF73BFFFFF7DEFF002048 +:102EF00010BD012010BD10B50178042901D00120BA +:102F000010BD85494A68521C4A600969002901D0F0 +:102F1000884701E0FFF7C9FF002010BD0EB504216E +:102F20006B461970012159700221D970017819710D +:102F30004078587178484168491C4160FFF7B5FFF7 +:102F400001216846FFF73CFF00200EBDF0B587B0B9 +:102F50001DF04AFC07007548FFF722FE7449012066 +:102F6000C0048860C412200001F0BCFA42176666F3 +:102F700001000000A42D00A0000200008B5688BDB7 +:102F8000200001F0C5FA6D486F49283001606F4993 +:102F900001616F494160654C0026266101220A20CB +:102FA0000592020003906B48012189026B4604964A +:102FB00007C300236148684AA83868A101F34CFBA5 +:102FC000002802D0012007B0F0BD5C4865A100F3E5 +:102FD000D5F800210320267001F000FAA068644DA6 +:102FE0000068A84207D1FFF73DFE00280AD0FFF78E +:102FF00043FE002806D0FFF7E6FEA0680560FFF755 +:10300000B0FE0DE0FFF7B6FE4948466001206B4672 +:103010001874DE742070002104A8FFF7DBFE267010 +:10302000032001F0FDF938001DF0ECFB0020CAE799 +:1030300000290CD005280AD2042802D13B4801619E +:1030400003E03E4A800028321150002070470120E2 +:10305000704770B5FFF706FE344C002802D0002000 +:10306000207014E01DF0CAFB2F4D060008E0E16857 +:10307000002910D02D48491E1430E16000F043F8BB +:10308000606969688842F2D130001DF0BBFB3A49A3 +:103090003848086370BDFEE72348016840688142F4 +:1030A00001D0012000E0002021494A6809688A42D5 +:1030B00001D0012100E00021084301214840704770 +:1030C00001001E48002210B500F35AF910BD70B57A +:1030D000040016480178012901D001210170E001A6 +:1030E0000CD5254925480863CD0D280001F00AFAC2 +:1030F000280001F001FA0120FFF7E2FFE00401D50A +:10310000FFF7A7FF70BD026801231104090C9B079C +:10311000491C1A4011430A009A43082A01D3594016 +:103120001940016070470000001300C028C500B0BE +:10313000801300C0081300C0802A00805C0101B029 +:1031400000100001009000A8552D00002F2D000058 +:10315000132D0000B4FC00B0BF2C00004963635481 +:1031600061736B0049636351466C616773000000D3 +:10317000CDAB0000FFEFFFFF80220080B963EF0FAF +:1031800001000000A02F00A0000200007FBE36005A +:10319000FFFFFFFEF8B51DF03BFB144C144E154D20 +:1031A00007001BE0FFF768FD002803D0124900204C +:1031B000087017E070680C230004000C5843401995 +:1031C0000CD00178052905D28A00A258002A01D026 +:1031D000002902D12168884700E090477068316873 +:1031E0008842DFD138001DF017FBF8BD840101B023 +:1031F000801300C0881300C028C500B0F8B50400D3 +:103200000D007648764A0168126801209047002830 +:1032100048D001202700734E0100103F0200A1405A +:10322000BA40704B4036002D2ED00325082C07D213 +:103230001E68620095409040AE4306431E6009E060 +:10324000102C0AD25E68083C620095409040AE4364 +:1032500006435E60986888431AE0182C07D2F36929 +:1032600079008D408840AB430343F36109E0202C93 +:1032700007D2336A183C61008D408840AB4303435A +:103280003362706A904307E0102C03D298680843B9 +:10329000986002E0706A1043706253490120096827 +:1032A00088470120F8BD70B504004C484C4A0D0019 +:1032B000016812680120904700281AD00122102CC2 +:1032C00008DA4849C868A2409043002D00D0104356 +:1032D000C8600AE0434B4033986A103CA2409043D8 +:1032E0000100002D00D0114399623F490120096877 +:1032F000884770BD10B504003848394A0168126823 +:103300000120904700281AD00122102C06D23548FF +:103310008168A24011438160006907E03148403074 +:10332000416A103CA24011434162C06AE0402E490C +:10333000C4070968E40F01208847200010BDFF2062 +:1033400010BDF8B52548264A01681268012090474B +:10335000002840D0254801210903C1602148016AA5 +:1033600020484030C06B0F043F0C0006000A0743A2 +:1033700000241F4801261EE04068E2008158002911 +:1033800018D010184068320082403A4272A01243AE +:10339000010000009C3100A00002000001A591B0D6 +:1033A00012D005008847102D06D21349086A320052 +:1033B000AA409043086207E00F494031C86B103DB6 +:1033C0003200AA409043C863641C0E4801788C42C6 +:1033D000DCD30B4881680122120311438160074945 +:1033E0000120096888470020F8BD0120F8BD0000D1 +:1033F00038E5000440E500040002009044E50004C4 +:10340000009000A8FC5600B0F8B50025FF4F387DAD +:10341000012802D97D2000023860787DC00709D0DC +:1034200002F08EFE3968884204D2787D4008400060 +:1034300001257875787D400731D502F09DFE7968C9 +:103440000400FB26814220D8F868A0421DD8052040 +:1034500002F02BF8A04218D8052002F029F8A0426B +:1034600013D8012002F021F8A0420ED8012002F06A +:103470001FF8A04209D8022002F017F8A04204D891 +:10348000022002F015F8A04201D9787D04E0787D91 +:10349000C10701D0810702D430400125787528008A +:1034A000F8BD70B51DF0BEF90500FFF7ADFF0028AF +:1034B000FBD1D64C607DC00706D002F015FE002877 +:1034C00002D1012002F073FC607D800706D502F076 +:1034D0000EFE002802D1012002F0EBFC607D4007C7 +:1034E00009D502F0E2FD002802D1012002F090FD92 +:1034F000607D400706D402F0D8FD002802D00020ED +:1035000002F086FD607D800706D402F0F0FD002801 +:1035100002D0002002F0CDFC607DC00706D102F091 +:10352000E3FD002802D0002002F041FC6068002189 +:1035300001F0AFFFA068002101F0B1FF607DC0077E +:1035400009D120687D210902884201D1012000E0D3 +:10355000002002F015FEE068002101F09DFF2069C7 +:10356000002101F09FFFAA490020087028001DF0EB +:103570005DF9002070BDF0B506000D0087B0A349CD +:103580000027182201A846F34AEAA04C607D0007F4 +:1035900002D4012007B0F0BD002E02DA4553726953 +:1035A00001000000983300A000020000F54D2F0D2F +:1035B0007600760801273300042646F3BEEB085256 +:1035C00005142044512C385202F0C4FDA84204D204 +:1035D000607D40084000607503E0617D012001438B +:1035E000617525603DE002F0D1FDA842607D02D208 +:1035F000FB21084000E030436075656031E002F077 +:10360000C5FDA842607D02D2FB21084000E03043A6 +:103610006075A56025E002F0B9FDA842607D02D288 +:10362000FB21084000E030436075E56019E002F0DE +:10363000ADFDA842607D02D2FB21084000E030438E +:10364000607525610DE0280002F09CFD0028607D7A +:1036500002D1FD21084001E002210843607500E02D +:1036600025756F49182201A81CF038FF002802D0E8 +:103670006C4901200870002F01D0FFF71CFF0020CB +:1036800092E7FEB500207D24E40127000125019486 +:10369000009011F394FD8821694306000291405C7B +:1036A00002282FD12804000C1CF3F1FC0099491CBE +:1036B0000906090E00910279012A02D181790129B6 +:1036C00004D0029989194B7D092B08D102997D20DC +:1036D0008919C9788001002910D140100EE0052A0F +:1036E00005D18079052802D17D20000201E07D20EE +:1036F000C001C978002901D17D208001844209D808 +:10370000040007E0012805D17D20C0018442F7D9DB +:103710002000F5E76D1C082DBBD30098012805D9C2 +:103720007D200002844200D9200004003E48C06988 +:1037300000280BD07D200002844200D92000040024 +:103740007D20C001874200D93800070037488079C2 +:1037500002280BD17D200002844200D92000040001 +:103760007D20C001874200D938000700019901205F +:10377000FFF70BFF39000320FFF707FF21000220AE +:10378000FFF703FF0020FEBD10B5254C607D00074C +:1037900034D502F0BCFC002802D1012002F013FC59 +:1037A00002F0B2FC002802D1012002F0795424C2B8 +:1037B00001000000943500A000020000ECB5F17D8E +:1037C000CDFB02F0B1FC002802D1012002F084FC04 +:1037D0001C4801680420FFF7E2FEFFF75CFF7D2133 +:1037E000490160680C008A00904201D91400110060 +:1037F0000720FFF7D4FE21000620FFF7D0FE0E4879 +:103800000078002804D001200021C007FFF7C7FE80 +:1038100010BD084870B5407D000724D57D24E40123 +:10382000062001F056FE050002F053FC002811D0DE +:103830000AE00000C0CB00B0045700B008D7000475 +:10384000D0D1000494E5000402F0AAFCA04200D309 +:1038500020000400A54206D20021200001F02DFE28 +:1038600007490120087070BD06480822417D1143B8 +:10387000417570470348F722417D114041757047FB +:10388000045700B0C0CB00B0002010B5FEF795FB88 +:1038900004000020FEF713FC0200002021000300BA +:1038A00000F08CF80120FEF788FB04000120FEF7F1 +:1038B00006FC020021000120002300F07FF8022016 +:1038C000FEF77BFB04000220FEF7F9FB020021005B +:1038D0000220002300F072F810BDF8B5012633492C +:1038E000334F082A15D0092A43D1002B41D108684B +:1038F0008C0C2043086001210D20FFF79DFC002166 +:103900000D20FFF7EEFC7869A0437861B869A04309 +:1039100022E0002B2DD1820026481418E078C00840 +:10392000192801D3002624E00B6801252A008240D3 +:1039300013430B602900FFF77FFCE0780121C008EA +:10394000FFF7CFFCE178C808102807D279698540D5 +:10395000A9437961B869A843B8610AE014484030C6 +:10396000026B4906090F8D40AA430263416BA943CC +:1039700041633000F8BD0123AFE70023ADE70E48F7 +:1039800010B50068002804D000221100032002F0C6 +:1039900037F810BD084810B50068002804D0002290 +:1039A0000121032002F02CF810BD0000402300800C +:1039B00000020090C05600B044C500B041D64C682B +:1039C00001000000903700A000020000185D4FC009 +:1039D0000A2A10B511D00B2A0FD00C2A0DD1002BBA +:1039E0000BD100210F20FFF731FC0448426981010F +:1039F0008A43426182698A43826110BD000200905D +:103A00003EB50C2204006C4841686846FFF7EDF9AA +:103A1000A00702D5019805F049FAA00603D56B4628 +:103A2000187A05F054FA3EBD10B54078FFF7E8FF6C +:103A3000FFF777FA002010BD3EB5040002E0012038 +:103A400001F0CFFFFFF7A2F90028F8D002206B4663 +:103A5000187000205C709870D87001216846FFF7DC +:103A6000EBF93EBD544808B541680122891C6846FF +:103A7000FFF7BBF96B46187808BD10B50400FFF7D7 +:103A8000F1FF002802D12000FFF7D6FF10BD10B5CE +:103A90000C000100484824220068FFF7A6F9002C1A +:103AA00002D02000FFF7E9FF10BD434910B50968B7 +:103AB0002422FFF79AF910BD01B53F4801220068A2 +:103AC00069460830FFF791F908BD01B53A4801226F +:103AD000006869460930FFF788F90820FFF7CDFF35 +:103AE00008BD11B581B0344C0122216868460A3105 +:103AF000FFF77BF96B4618781979884208D020685F +:103B000001220A3001A9FFF770F90820FFF7B5FF7D +:103B10001CBD01B528480122006869460B30FFF73B +:103B200064F908BD01B524480122006869460C30DB +:103B3000FFF75BF908BD01B51F480122006869461F +:103B40000D30FFF752F908BD13B504221A4C69462F +:103B500020681030FFF749F920680422143001A9C9 +:103B6000FFF743F91CBD01B51348012200686946FF +:103B70001D30FFF73AF908BD01B50F480122006872 +:103B800069461E30FFF731F908BD01B50A48012228 +:103B9000006869462030FFF728F91020FFF76DFF15 +:103BA00008BD054808B5416801226846FFF71DF9C0 +:103BB0006B46187808BD0000085700B0FB4A10B5E6 +:103BC0001068437804781802F94B20434367547F08 +:103BD000010000008C3900A000020000DF444D9D70 +:103BE000984203D010680170090A417010BDF44971 +:103BF0008000091F08580221593002780A430270D8 +:103C0000F14A507C084350747047ED48F8B52430B1 +:103C10000188EE4A91421DD0020012880124418899 +:103C20009440EB4F012904D1FD68A5432C432600A5 +:103C300003E0FE68A64334432500E649808809680E +:103C400046F38EE88905800A0843FD6001D01CF028 +:103C50003EEFFE60F8BDDA4A8000121F1058403077 +:103C60008183D2E770B50500DB4C09D10022DB4827 +:103C7000110046F3C7F80028206001D020210181FF +:103C8000A8002158002908D00A898918CC4A121F97 +:103C90001258116720580821017370BD70B50400D7 +:103CA000C068C74D012180002D1F2858002641669D +:103CB000E068800028584666E068800028580B239A +:103CC000D83002689B021A430260E06880002858DE +:103CD0000823D83002681A430260E0688000285840 +:103CE0004B05D83002689A430260E068800028588B +:103CF000D83002680A430260E068FFF7B3FFE1686A +:103D00000720890069580866E068FFF770FFE068DF +:103D1000002802D1296817200866E068800028582A +:103D2000AA498666E068002804D1AB4A08321180AF +:103D300051809180A84A0B0A0E3211705370917015 +:103D4000090AD17081000E3A5158002901D00D2185 +:103D500000E00C21FFF77FFFE0689F498000091F0A +:103D60000E50E0680521820095488258D170E168C4 +:103D7000890041588E70E168890041580E71E168F0 +:103D8000890040584671002070BDF8B50400142227 +:103D9000914F62439248A5003F1F0026032911D18D +:103DA000002C0AD146F390F82021386001810100EF +:103DB0002431002002F061FE14E0101846F384F86C +:103DC00078510FE0052904D1002C08D0844814381C +:103DD000F3E7022901D0082904D1002C4AFC81AF65 +:103DE00001000000883B00A0000200002BACF32083 +:103DF0002ED146F373F838607859002827D0002C6C +:103E000025D13868734C0189411848780B78020233 +:103E10001A43241F2068C030828248780A7803023F +:103E20001343201D0268D5780122AA40521E9A1819 +:103E300003680068DB781A418270CA782068803095 +:103E4000C28122683000D1660221FFF70EFFF8BD63 +:103E500068481430BBE7012270B5D2079378634CF1 +:103E600080000C3C22588A422FD0002921500DD0CE +:103E700000200122850065598D4204D0461C1500A2 +:103E8000B5401D4221D1401C0128F3D351480C38C4 +:103E900002788A4219D00170514A3630002909D07F +:103EA000C17883780802184390420ED001F0ADFD2E +:103EB000012008E04178037808021843904204D0BA +:103EC00001F0A3FD0020FEF7D7FE70BDFFB581B065 +:103ED0000400029800287BD0E068002878D1029D79 +:103EE0000498E88020202881121D2035100A2A70AD +:103EF000687000200126A8701CF0C6FC0090E068E5 +:103F00000021FFF7A8FFE068384F8000083F3858CD +:103F100000280ED00498032805D1291D002002F0A6 +:103F2000D0FD002805D100210B2208000B0002F073 +:103F300038FC0498022874D0032821D005285BD0CF +:103F4000082817D10320E870E0681421414329486C +:103F50000818029945F3EBFFE068244A8100121F1C +:103F60005258002A06D17958002903D10221FFF7BF +:103F700016FF002600981CF08BFC300005B0F0BD49 +:103F8000FE20E870291D002002F09BFD0028E0685B +:103F90000BD01423584317494018029945F3E9FF01 +:103FA000E16800208900785006E01421414311485F +:103FB0000818029945F3BBFFE0680C4A8100121F04 +:103FC0005258002AD6D179580029D3D10321CEE7FF +:103FD0002FE026E0A46300B0DCFE0000800000803B +:103FE000FFFF00000002009040C500B078D53F8E72 +:103FF00001000000843D00A00002000032542D505A +:10400000C06300B0C45800B05CFC00B00220E8708F +:10401000E06814214143FE480818029945F391FFD6 +:10402000E068FC4A81005258002AADD17958002935 +:10403000AAD10521A5E70420E870E06814235843BD +:10404000F34940188FE70020A2E710B504001CF0E8 +:1040500025FCF04AA1001C3AEF4B545863665258B5 +:1040600017231366EB4B00220C3B5A501CF01AFC32 +:1040700010BDFEB584000600E64800251C38015935 +:104080000D660259012151660059E24F45663F1DF8 +:104090003859002802D045F39FFE3D51DC491422D7 +:1040A0007243DC4F0B0014333859D31801930B00C3 +:1040B000143BD31856180028009307D045F38CFE04 +:1040C00004E0300045F314FF3851F7E7300045F3C2 +:1040D00078FF0028F5D105E0009845F309FF385135 +:1040E00045F37AFE009845F36CFF0028F4D105E013 +:1040F000019845F3FDFE385145F36EFE019845F3F6 +:1041000060FF0028F4D13D51FEBDF8B50400150054 +:10411000C0481C380600083E15294DD010DCBD4FA4 +:10412000091F00223F1D0B0045F338EE11DEDFDFD3 +:10413000DFCA98DFA3DFAEAEDFDFDFDFAA2ADF0052 +:10414000B44812301C293ED009DC17295ED0192949 +:104150007ED01A292FD11CF0A1FB756129E01D2901 +:1041600040D01E294DD0202973D04629F2D1E068D5 +:104170000028EFD1A7480068002800D00120F8BD32 +:104180001CF08CFB0500E0688100795800290FD1F4 +:10419000FFF77CFDE06881007958002903D12800F1 +:1041A0001CF080FBEAE7002802D10121FFF767FD40 +:1041B00028001CF077FB98E0E16889004058022154 +:1041C00080680840F8BD69782A78090211430170B7 +:1041D000090A4170E978AA78090211438170090A35 +:1041E000C17082E041780278090211432970090AFE +:1041F0006970C178827808021043A870A6E9BB3FB5 +:1042000001000000803F00A000020000C6BC93ED4A +:10421000000AE87073E0E0680121FFF730FE6EE00D +:10422000814E834A0C3630880F2801D99042AFD195 +:10423000E068002863D1A8883080E98871802B89E4 +:104240009042B3805BD0FFF77EF87A4B1A683088D3 +:10425000012181400A431A600006000E0121FFF788 +:104260001DF84CE000E043E0E068002847D107E09B +:10427000E068002843D16C490C39096800293ED018 +:10428000FFF7EDFE3BE0E168002938D10068172117 +:10429000016634E0E068FFF7F6FE30E0E1680029EF +:1042A0000FD1717800290CD0634900685E4BC03093 +:1042B0008182E0688000183B18580170090A41703B +:1042C0007270E06881007958002918D00121FFF749 +:1042D000E0FC14E0E068002811D1524814388168ED +:1042E0001430806809184F48143080680818F8BDE9 +:1042F000E0684D49800008310D5000E03561002034 +:10430000F8BDF8B50025A80047491C390A58102304 +:10431000566EF2431A430B585A6608584030007ED6 +:10432000002D7ED10024F1073FD040073DD43E4907 +:104330000022091D08680389C418637827781B02C6 +:104340003B433E4FBB4204D901212800FFF7A1FCAB +:104350002AE00223037334480021001D0768072266 +:1043600008000B0002F031FA0020FFF799FC2E48FC +:10437000001D0068002803D001212800FFF789FCF8 +:104380003889001D3881E078FE2801D10120E070D5 +:10439000E078F8802348244928307861E3780831B0 +:1043A0000C6800223900A0470124B00754D51E4FE5 +:1043B00000213868002816D001894118091D002005 +:1043C00002F089FB002802D00120391F086016483E +:1043D000243801693868002901D0884701E045F395 +:1043E00005FD00203860230400211B0C0622080074 +:1043F00002F0EBF90B4C200045F3EDFD002809D14C +:10440000200045F3E8FD002804D120008FD6DBD73B +:10441000010000007C4100A00002000023EBCEEA76 +:1044200045F3E3FD002821D00449091F096800294C +:1044300016D00B220EE02DE05CFC00B0BC6300B097 +:10444000EFFEFFFFFFFF000040230080DCFE0000C6 +:1044500005040000002108000B0002F0C0F905E08F +:10446000C0880106090E2800FFF7B7FC0C49086850 +:10447000006EC0060ED5F0060CD50A0001201032E1 +:1044800010600968072008660021092208000B0057 +:1044900002F0A5F96D1C012D00DA3EE70120F8BD00 +:1044A000A06300B070B505000C0009D102E0012046 +:1044B00001F0C9FA28001CF0D9FC0028F7D011E05F +:1044C000641E28001CF0D2FC00280BD1012001F052 +:1044D000BAFA002CF4D11249A8000A58521C0A500A +:1044E000002070BD012070BD0E4B30B501215A680F +:1044F00081400A408000002A05D1094980310A58CC +:10450000521C0A50FEE7064C803C2258012A02D178 +:104510005D688D435D60521E2250012030BD000059 +:1045200058CC00B0C02A008030B500240D4B2200CA +:10453000D5005D59002D0ED1D40018510A4B9200C0 +:10454000D318D96000030321000B890740180749DD +:104550005118086030BD521C042AE9DB012CF9D047 +:10456000FEE7000058CD00B0C09B00A8009800A84E +:10457000FF484068016F1022114301677047FC48F3 +:104580004068016F10229143016770470020704717 +:1045900070477047F6484068816B090C01D00020D5 +:1045A0007047816B490504D5816B0904090FFBD164 +:1045B00000E0806B01207047ED484068406B704719 +:1045C000EB4949684A6E82434A667047E849496840 +:1045D0004A6E02434A667047E5494968CA6E02431B +:1045E000CA667047E24949688A6E02438A66704724 +:1045F000DF484068806B8007C00F7047DC48406828 +:10460000C030416837229143416041680122114323 +:1046100041607047D6484068C03041684526FFC7B2 +:1046200001000000784300A000020000D70370578B +:104630000822914341607047D2484068C0304168C9 +:104640000822114341607047CE484068C03001687D +:104650000122114301607047CA484068C0300168B8 +:10466000490849000160704770477047C548406875 +:104670004168012292041143416081681211914303 +:104680008160FF30401C4168490849004160704723 +:10469000BC484068C11DF9314A6801231A434A6089 +:1046A00041689A049143416081681211114381600D +:1046B0007047B4484068FF30401C41680222914373 +:1046C00041607047AF484068FF30401C416802229B +:1046D000114341607047AB484068FF30401C01689F +:1046E0000122114301607047A6484068FF30401C1A +:1046F00001684908490001607047A2484068FF30DE +:10470000401C016808221143016070479D484068C1 +:10471000FF30401C016808229143016070479948AE +:104720004068C03001680122D20711430160704720 +:1047300094484068C03001684900490801607047EA +:1047400090484068FF30401C01680122D2071143A5 +:10475000016070478B48406880680003C00F704755 +:104760008848406881680122D20411438160704703 +:1047700084484068FF304130416A890889004162BD +:10478000704780484068FF304130416A04229143BD +:10479000416270477B484068FF304130416A0422E3 +:1047A00011434162704777484068FF304130016AE9 +:1047B000012211430162704772484068FF30413066 +:1047C000016A49084900016270476E484068FF303D +:1047D0004130016A0122D2071143016270476948E2 +:1047E0004068FF304130016A490049080162704762 +:1047F00064484068FF304130806A0005C00F704750 +:1048000060484168092080010818C16901229203AB +:104810001143C161C16952001143C161C1695200B4 +:104820001143C1617047574841680920321235EC85 +:1048300001000000744500A000020000CEFBAE277E +:1048400080010818C169012292031143C161C16945 +:1048500052001143C161C16952009143C161704767 +:104860004D484068816810221143816070474A4872 +:104870004168092080010818C169012252041143CE +:10488000C161C169D2001143C1617047424905222B +:104890004968D2018918CA69382340079A43800EB3 +:1048A0000243CA61C86901221043C86170473A4A8D +:1048B0000023D3561F21C0181F2800DA0100080664 +:1048C000000E70470D2804D8334900228A56002A6A +:1048D00000DBECE77047F0B593B0304C206803097B +:1048E00060681B010109A06809010209E068120162 +:1048F00000090001C01C12902069491C050960696B +:104900002D0100090001401D1190A069921C0009B1 +:104910000001801D1090E0692D1D0609206A3601F6 +:104920000009000108300F90606AF61D00090001BF +:1049300009300E90A06A000900010A300D90E06A6B +:10494000000900010B300C90206B000900010C30B5 +:104950000B90606B0709A06B3F01000900010D304F +:104960000A90E06B0D37000900010D308646F020FB +:104970008143103109911299854340350895119D65 +:104980008243814320323031854350350795109D55 +:1049900083438543944603E0105700B058CF00B0DE +:1049A000503506950F9D0C9A8543503505950E9D03 +:1049B00082438543503504950D9D503285435035D3 +:1049C00003950B9D02928543503501950A9D7246D1 +:1049D000854382438643874350351F20000200955C +:1049E000132583432D025B192360099B8143834375 +:1049F0005B196360634683435B194919A360E160F7 +:104A0000089D50320B218543490296466A1822615F +:104A1000079D503685436A186261069D864385432B +:104A20006918A1610321C9027218E261059D50371E +:104A300085436A182262049D8743854340C3810EE3 +:104A400001000000704700A0000200003A13109A15 +:104A50006A186262039D85436A18A262029A8243C1 +:104A60005218E262019D85436A1822637A186263D4 +:104A7000009D85436A18A26372468243511800253F +:104A80000700E163AE00A059C004C00EFFF719FF94 +:104A9000A159C006C00CB9436D1C01432D062D0E53 +:104AA000102DA151EED313B0F0BDF0B588B0FF4981 +:104AB0000A6A1206130F4A6A1206120F12011343F2 +:104AC0008A6A1206120F12021343CA6A1206120FE2 +:104AD000120313430A6B1206120F120413434A6B9C +:104AE0001206120F120513438A6BC96B1206120FBE +:104AF00009061206090F134309070B43EC494A68DC +:104B0000D11DFF31FA310C690B610C6B0B63092469 +:104B1000A4011219D468D360E44BDC682406260F84 +:104B200004969C6835012406240F03942C431D69C8 +:104B30002D062E0F350237032C43059700962600CD +:104B4000A6465C693E432406240F019424042643B0 +:104B50000694019C27059C693E432406240F2506E4 +:104B6000DC692E432406240F240726430296079669 +:104B70005B68BC461B061F0F039B1E013B003343B3 +:104B8000049E059F36023343009E3B4336041E437A +:104B900067463E432E432643072803D0062801D00C +:104BA0000A2809D1906802989060C8680798C86080 +:104BB000C86ACE6208B0F0BD0528FBD19068019E9E +:104BC000704636033043069E3043664630432843E2 +:104BD00020439060CA68C860C86A0698034360466C +:104BE00003432B432343CB62E4E7F0B5AF480168AE +:104BF000426809071207090F120E11438268036BFE +:104C00001207120D1143C2681207120C11430269F8 +:104C10001207120B114342691207120A11438269EB +:104C2000120712091143C2699446120711439646AE +:104C3000026A1407426A240F1207120E1443826A92 +:104C40001207120D1443C26A1207120C3985E6A826 +:104C5000010000006C4900A000020000FD0A12C71C +:104C600014431A07120F15042C43456B26002D0719 +:104C70002D0A2E43856BC06B2D072D092E4300078F +:104C8000064390484568E81DFF30FA3047684160A8 +:104C90008768866016053443120614431A071443C6 +:104CA00009229201AA181368116053685460624681 +:104CB0001207120F13011343140223431403234357 +:104CC000140423431405234312061343724613436B +:104CD000426A4162816A8362F0BDF0B57849086832 +:104CE0004A69C004C50E4868D204C004C00E400121 +:104CF00005438868D20EC004C00E80020543C86810 +:104D00005206C004C00EC00305430869CB69C00445 +:104D1000C00E0405254315438A69DB04D204DB0E6B +:104D2000D20E5B011A430B6AAC46DB04DB0E9B021E +:104D30001A434B6A4D6BDB04DB0EDB031A438B6AB1 +:104D4000ED04DB04DB0E1B051A43CB6AED0EDB041E +:104D5000DB0E5B061A430B6B6D01DB04DB0E2B4392 +:104D60008D6BC96BED04ED0EAD022B43C904C90E6A +:104D7000470106003E4387023E43C7033E432643A6 +:104D80004006064348010C000443880204434D4892 +:104D9000CD0340682B430100FF302C43FF30801CC3 +:104DA00045696546456187698261C769C361436B2F +:104DB00033004663866B8363C66BC36308000921B7 +:104DC0008901401801690561416942618169846115 +:104DD000F0BD10B50400FFF712FF2000FFF76FFED3 +:104DE000FFF77BFF10BD37494968FF31FF31891C50 +:104DF0000A6A000712091201000F02430A62086AD8 +:104E00000F2212039043086270472E494968FF3110 +:104E1000FF31891C0A6AF02300079A43000E0243FF +:104E20000A62086A1A0390430862704730B50400AA +:104E3000244D04280CD21120FFF758FD696809227F +:104E400092018918C9698904C90E884200D20424D4 +:104E50006868FF30FF30801C016A0F22D2EF8DF1AD +:104E600001000000684B00A00002000009E2AC7ADB +:104E7000120291432207120D1143016230BD164AFE +:104E800010B553680522D2019A1813691F246406CD +:104E9000C006A34380080343136110696311C90668 +:104EA0009843C9090843106110BD0B4A10B55368F7 +:104EB0000522D2019A1813691F24E403C006A343F4 +:104EC000000B0343136110696311C9069843490C31 +:104ED000084303E058CF00B0105700B0106110BD78 +:104EE000F94A10B552680523DB01D21813691F2453 +:104EF0006401C006A343800D034313611069C90612 +:104F000040094001C90E0843106110BDEE4A10B5BA +:104F100052680523DB01D21853691F246401C006BF +:104F2000A343800D034353615069C9064009400102 +:104F3000C90E0843506110BD0C2010B5FFF7D5FC19 +:104F400004001120FFF7D1FC2100FFF7DFFF122042 +:104F5000FFF7CBFC04001320FFF7C7FC2100FFF78D +:104F60008EFF1420FFF7C1FC04001620FFF7BDFCE4 +:104F70002100FFF79AFF1720FFF7B7FC0400192064 +:104F8000FFF7B3FC2100FFF7ABFF10BDCE490522B0 +:104F90004968D20189180A699205D20E824206D365 +:104FA0000A69D206D20E824201D8082070470A69E7 +:104FB0001203D20E824206D30A695204D20E8242F2 +:104FC00001D8042070470A699200D20E824206D3AB +:104FD0000A69D201D20E824201D8022070474A6982 +:104FE0009205D20E824206D34969C906C90E814292 +:104FF00001D80120704700207047B34949688031CB +:10500000CA6AFF23E13300079A43C00D0243CA6214 +:105010007047AD4900B549688031CA6AC306520974 +:105020005201DB0E1A43CA62FFF7B0FF0006000E02 +:10503000FFF7E3FF00BDA4494968C0314A69FF2377 +:10504000E13300079A43C00D02434A6170479E490D +:1050500000B54968C0314A69C30652095201DB0EE6 +:105060001A434A61FFF792FF0006000E500EB87512 +:1050700001000000644D00A000020000101A720A36 +:10508000FFF7E3FF00BD95494968FF3141314A6BA5 +:10509000FF23E13300079A43C00D02434A63704780 +:1050A0008E4900B54968FF3141314A6BC306520948 +:1050B0005201DB0E1A434A63FFF772FF0006000E2F +:1050C000FFF7E1FF00BD85494968FF31491C4A6986 +:1050D000FF23E13300079A43C00D02434A61704742 +:1050E0007E4900B54968FF31491C4A69C306520927 +:1050F0005201DB0E1A434A61FFF752FF0006000E11 +:10510000FFF7E1FF00BD75494968FF31FF31891C98 +:105110000A6A0F235B0600079A43C00802430A622B +:1051200070476E4900B54968FF31FF31891C0A6A32 +:105130001F231B059A43C306DB091A430A62FFF7C4 +:105140002FFF0006000EFFF7DEFF00BD70B5050063 +:105150000D20FFF7DFFB61494E68092189017118B5 +:10516000CA699204D20E904201D2012200E00022CC +:105170005A480024401C035DAB4204D0641C240642 +:10518000240E022CF7D3086A18255543534A000C05 +:1051900000040832535B18430862486A000C00049C +:1051A000AA18538818434862886A9388000C000440 +:1051B00018438862C86AD388000C00041843C86288 +:1051C000086B1389000C000418430863486B53896B +:1051D000000C000418434863886B9389000C00049A +:1051E00018438863C86BD389000C00041843C86354 +:1051F0000520C00130180368168A1B0C1B043343BA +:1052000003604368568A1B0C1B0433434360836866 +:10521000968A1B0C1B0433438360C368D28A1B0C21 +:105220001B041343C36030232C4A634338329A185B +:10523000535B0C6A1B042404240C23430B62521995 +:1052400053884C6A1B042404240C23434B62938828 +:105250008C6A1B042404240C23438B62D388CC6AFD +:105260001B042404240C2343CB6213890C6B1B0402 +:105270002404240C23430B6353894C6B3E7B26731D +:1052800001000000604F00A000020000E4F2CCB773 +:105290001B042404240C23434B6393898C6B1B0451 +:1052A0002404240C23438B63D389CC6B1B04240478 +:1052B000240C2343CB63118A036809041B041B0CD1 +:1052C00019430160518A436809041B041B0C1943EC +:1052D0004160918A836809041B041B0C1943816097 +:1052E000D18AC26809041204120C1143C16070BD56 +:1052F000105700B055494A68092189015118CA69F7 +:105300001F235B02C0069A43800C0243CA61C8692E +:10531000012292049043C86170474C494968C031EA +:105320004A690F239B0300079A43800B02434A619B +:105330007047464900B54968C0314A691F235B027E +:105340009A43C3069B0C1A434A61FFF733FE0006DB +:10535000000EFFF7E2FF00BD3C494A6809218901C0 +:105360005118CA69FF23E13300079A43C00D024375 +:10537000CA617047354900B54A6809218901511849 +:10538000CA69C30652095201DB0E1A43CA61FFF70C +:1053900011FE0006000EFFF7DFFF00BD10B5040090 +:1053A0000D20FFF7C1FAFFF7A5FF1620FFF7B1FAAE +:1053B000FFF7C1FEE00614D50120C007C07CC1077D +:1053C0000FD00007400F02282AD0032809D1162049 +:1053D000FFF7AAFAFFF78EFF1620FFF79AFAFFF7FA +:1053E000AAFE1620FFF795FAFFF7C4FF1620FFF775 +:1053F00090FAFFF79EFF1820FFF78BFAFFF71DFECC +:105400001620FFF786FAFFF736FE1620FFF781FA1F +:10541000FFF750FE1620FFF77CFAFFF76BFE10BD7A +:105420001120FFF781FAFFF765FFDAE70848816886 +:1054300001221207914381608168C2059143816016 +:10544000816852109143816070470000105700B08E +:10545000802A008070B506000C0015001BF078FA59 +:10546000604A31018918002D03D0002C06D1091D96 +:1054700004E0002C01D0083100E00C310C681BF076 +:105480006BFA200070BDFFB585B01400DDF5DD8A34 +:10549000010000005C5100A0000200009AE96B07C7 +:1054A0000D001E001BF05EFA0190534829010818F8 +:1054B000010008310F1D002E049105D0002C01D0F1 +:1054C000010006E0011D04E0002C01D0049900E079 +:1054D0003900494B09681A0060329646121D039242 +:1054E000121D9446121D002E029204D0002C72460A +:1054F00005D1039A03E0002C624600D1029A059B75 +:1055000012681500002E03D0002C06D1001D04E007 +:10551000002C01D0049800E0380003600598904208 +:1055200002D9059D012727E0914244D10598814287 +:1055300041D9314B012700252800002E08D0002C2E +:1055400002D00101C9180CE00101C918091D08E0C9 +:10555000002C03D00101C918083102E00101C9186B +:105560000C310968A94200D90D00401C0628E4DB73 +:10557000954220D0002F1ED0002E04D0002C704663 +:1055800005D1039803E0002C604600D10298002F5B +:10559000056010D0002C09D0002E03D0280000F0A8 +:1055A00078FA08E0280002F0F8FD04E0002E02D0AE +:1055B000280002F0D9FD01981BF0D8F9280009B0A5 +:1055C000F0BD0E4810B50068002801D0FFF738FF85 +:1055D00010BD0122130060E7012200235DE70022D5 +:1055E00001235AE70022130057E7012211003BE78D +:1055F0000022012138E7000098CF00B04C6300B0D2 +:1056000010B502F0BDFE10BDF949FF22C832888BEB +:105610001042FCD17047F8B5F64C6069002802D002 +:105620001BF0A0F9FEE71BF09DF96061002101204D +:10563000FEF788FF002810D0EF4EB48801208002CA +:105640000440B088EC4D3527A0433F012035B842D7 +:1056500004D1287D012108432875F8BD022000F0FF +:105660001CFB0028F9D03C43B480297D0120014374 +:105670002975F8BDDF4810B5446900214161FF215B +:105680000170DD482030017D490849000175012085 +:10569000FEF77AFF20001BF069F910BD81CB30F4D2 +:1056A00001000000585300A0000200006E01D5BAAE +:1056B00070B5D54C6069002802D01BF05DF9FEE79B +:1056C0001BF05AF9606100210120FEF745FF002818 +:1056D0000DD0CE4DAC88012080020440A888A043A4 +:1056E00005D0012000F0E3FA002800D0AC8070BDA6 +:1056F000C54810B5446900214161FF2101700120B6 +:10570000FEF74CFF20001BF03BF910BD70B5BE4EFC +:105710007069002802D01BF02FF9FEE71BF02CF96E +:10572000706100210120FEF717FF002814D0B74D4B +:10573000AC88012080020440A888A04382280BD0B6 +:105740002888F080002000F0B2FA002804D0A88851 +:10575000308182200443AC8070BDAB4810B5AB49AA +:10576000028944698A80C2880A8000214161FF2140 +:1057700001700120FEF712FF20001BF001F910BD9F +:1057800070B5A14D6869002802D01BF0F5F8FEE75E +:105790001BF0F2F8686100210120FEF7DDFE002811 +:1057A0001BD09A4EB488012080020440B088A043E8 +:1057B000022812D0FDF7FDFA002803D0012803D1FA +:1057C0003F2002E01A2000E07F203188E98030800D +:1057D000B088288102200443B48070BD8A4810B587 +:1057E0008A49028944698A80C2880A80002141610D +:1057F000FF2101700120FEF7D1FE20001BF0C0F850 +:1058000010BD70B5804C6069002802D01BF0B4F860 +:10581000FEE71BF0B1F87B4D6061AC88012080028F +:105820000440A8887A4EA043B04206D0042000F07D +:105830003EFA002801D03443AC8070BD724910B5E7 +:10584000486900224A61FF220A701BF099F810BDD6 +:1058500070B56D4C6069002802D01BF08DF8FEE732 +:105860001BF08AF8606100210120FEF775FE002818 +:1058700010D0644DAC88012080020440A888654E99 +:10588000A043B04206D0042000F011FA002801D055 +:105890003443AC8070BD5C4810B54469002141615F +:1058A000FF2101700120FEF779FE2000F716E0705D +:1058B00001000000545500A00002000077F90BCA57 +:1058C0001BF068F810BD70B505000E0002F06CFD0D +:1058D000534C2034258102F067FDA68002F064FD60 +:1058E00070BD70B5050002F05FFD4D4C2034258180 +:1058F00002F05AFD207970BD30B505000C00FFF7AD +:1059000097FE454B20331D81FFF792FE9C80FFF7E9 +:105910008FFE30BD30B505000C00FFF789FE3E4B11 +:1059200020331D81FFF784FE9C80FFF781FE30BD90 +:1059300010B50400FFF77CFE374B20331C81FFF7C6 +:1059400077FE988810BD10B50400FFF771FE324B4A +:1059500020331C81FFF76CFE187910BD70B5040070 +:105960000D00FFF7BEFF284301002000FFF7ABFF4B +:1059700070BD70B504000D00FFF7B3FFA843010030 +:105980002000FFF7A0FF70BD24484178002909D10D +:1059900026490968012209024270090F02002032DB +:1059A000515C8170807870471C4910B5C878002818 +:1059B00015D108611D4840680A008007800F103229 +:1059C00010230124002807D0012803D0022803D087 +:1059D000032803D1136001E030201060CC70086907 +:1059E00010BD1248803000880006000E704700B5D8 +:1059F000FFF7F7FF022805D10C4840688007800FA9 +:105A0000012800D0002000BD094B5968382291437D +:105A10001040084358607047003800A8D85700B0BD +:105A20000008009050530000501300000020008038 +:105A300000290080A84B59680F2292019143104021 +:105A400008435860E7E710B50C00FFF7F3FF2000AC +:105A5000FFF7DAFF10BDA14810B54469002141618C +:105A6000FF2101700120FEF7A3FD20001AF092FF34 +:105A700010BD70B5994C6069002802D01AF086FFFD +:105A8000FEE71AF083FF606100210120FEF76EFD42 +:105A9000002811D0924DAC88012080020440A888D3 +:105AA000B526A0433601B04206D0022000F009F925 +:105AB000002801D03443AC8070BD10B50C2D875246 +:105AC00001000000505700A0000200008311B577CC +:105AD00002F043FB10BD8848C16889008908C16095 +:105AE000C168032292071143C160810C7F48803056 +:105AF000416182490161824941610521016194E767 +:105B0000804800B50068002801D0FFF7E4FF7E4917 +:105B10001620C86048607D488168C20511438160D5 +:105B200000BD7B4910B5096844F3B0E98905800AD6 +:105B3000084301D01BF060E810BD76E775E77548B3 +:105B40000068000701D501206FE700206DE7684875 +:105B5000C0686AE7F7B586B004000D001AF020FFB0 +:105B6000009000210120FEF70BFD002854D00321F6 +:105B700062000800904004902000083840000E00A9 +:105B80008640039020001038059242000B0093409D +:105B900002922200183A520091408E4601210F00D5 +:105BA000874001935C480B00A34094465A4A40301A +:105BB000002D39D0082C04D21568049EB543156019 +:105BC00012E0102C03D25568B54355600CE0182C38 +:105BD00004D2C569019EB543C56105E0202C03D2FE +:105BE000056A7646B5430562089D002D15D0102C38 +:105BF00003D294681C43946002E0426A3A434262D2 +:105C0000826802231A4382603F4A80325068DB0573 +:105C1000184350603E48416055E03B4A803210686E +:105C20000821884310604EE0082C09D21668059DB3 +:105C3000AC46049DAE436546A9400E43166021E084 +:105C4000102C0AD25568AC46039DAE466546B54356 +:105C50007646B1400D43556014E0182C09D2C66950 +:105C6000029DAC46019DAE436546A9400E43C66108 +:105C700008E0202C06D2056A7646B5436646B14058 +:105C80000D4305620899002917D0102C03D29168A2 +:105C90009943916002E0416AB943416281680222FE +:105CA00091438160184A8032506801210906884377 +:105CB000506017490020486005E0134980310868AA +:105CC0000822104308600120FEF77CFC0A2950A836 +:105CD000010000004C5900A0000200004408B72A4F +:105CE00000981AF06BFE09B0F0BD10210A2803D20B +:105CF000044940003031095A0348018001209EE6E2 +:105D000000290080D85700B000080090002A0080C9 +:105D1000170000FF102000004C6300B0C02200807C +:105D2000009100A840C500B0002000800002009053 +:105D30000449034808600449001F00780870704750 +:105D4000185800B0005700B0FC5600B070B5050000 +:105D50002924FFF7A2FE2000FFF7D7FD290020002D +:105D6000FFF7C5FDFFF78BFE70BD704710B504004F +:105D7000FFF793FE002C0AD0FFF72AFE000706D497 +:105D80002C211920FFF7B3FDFFF779FE10BDEE219E +:105D90001920FFF7ACFD60211A20FFF7A8FD6C2148 +:105DA0002820EFE710B5FFF703FE052806D00628E8 +:105DB00006D00A2806D17D21090205E0324903E018 +:105DC000324901E00121C903314A93681B041B0CCD +:105DD0000904194391609168022319439160916805 +:105DE000042421439160072802D190689843906071 +:105DF00010BD012010B5FFF7B9FF26480168C20B9E +:105E0000114301600168490849000160000C10BDA0 +:105E100070B5FAF747FF1F49CA0B0028086805D07C +:105E20001043086008680122104304E01043086032 +:105E300008684008400008600020FFF797FF144CF6 +:105E4000403CA06B21050843A063A06BC910084328 +:105E5000A063A56BFFF7ACFD052805D0062805D08B +:105E60000A2805D10C4804E00C4802E00C4800E088 +:105E70000C48290E09060143A1630B490868022258 +:105E800010430860080C70BD143B0000AB7A0000A2 +:105E900040210080002800808509040020DF0300E5 +:105EA000705E040068310400002C008070B5FFF7BC +:105EB0007FFDFC4BC1005A58FB4814010DD4C46847 +:105EC000FA4D2C40C4604468A400C46802D5012582 +:105ED0002C4301E064086400C4604468F3811E9FA1 +:105EE00001000000485B00A000020000B0E009973C +:105EF0003D25AD062C40AA43144344608268CB186C +:105F00005B68920E92069B019B091A43826043686C +:105F10000122920613434360836813438360E6487B +:105F2000E84A84304358D36008184068906070BDD8 +:105F300010B5FFF747FDE44AD16AE44B80001940F1 +:105F4000DD4B58331858E14BDB4318400143D16215 +:105F500010BDFEB50400002001901AF035FDDC4EA6 +:105F60000090B068844237D0F069002804D0002C3B +:105F700002D1012001902FE0D64F3D6A102005404C +:105F800007D1386A1021084338627D20C000FFF72E +:105F9000DCFDFFF795FFC948012241685207002C3C +:105FA00007D011434160C16801221143C160B26052 +:105FB0000CE091434160C16849084900C1604168F3 +:105FC00001229206914341600020B060002D03D170 +:105FD000386A10218843386200981AF0F9FC019859 +:105FE000FEBDFEB50500002001901AF0EDFCB84F93 +:105FF0000090F868854229D0F869002804D0002D67 +:1060000002D10120019021E0B34C266A0120000654 +:10601000064008D1206A01210906084320627D203C +:10602000C000FFF792FD216A0820002D03D0014334 +:106030002162012002E0814321620020002EF860ED +:1060400004D1216A012000068143216200981AF0E0 +:10605000BFFC0198FEBDF8B5002506001AF0B4FC9F +:106060009B4C00902069864231D0E16996489B4F55 +:10607000002903D0002E03D1012528E0002E19D0DD +:10608000416A012631434162FFF79CFC944940007C +:10609000085A642358430009F8627D21C90043F37C +:1060A00024EF3100002800D001003963A661666149 +:1060B00026610CE0416A4908490041627D20800167 +:1060C000F862082038630020A061606120610098B8 +:1060D0001AF07EFC2800F8BDF8B5040000251AF07F +:1060E00073FC7B4E07007069844223D03324F80E82 +:1060F00001000000445D00A000020000A918D7E7DD +:10610000F069002801D0002C07D0B3697348022140 +:106110004022002B03D1002C1BD0012514E0002CC1 +:1061200017D00400806A0843A062A06A1043A062EE +:10613000FFF752FC062805D9A06A3C2188431C21A0 +:106140000843A0620120706138001AF04BFC28005F +:10615000F8BD836A93438362826A04239A4382620E +:10616000826A8A4382620020EDE7F8B504000025C8 +:106170001AF034FC5B4E0700B06984421FD0F0690E +:10618000002801D0002C04D07069002803D0002C16 +:1061900001D1012513E0FFF7D5FE5048816AC20CFA +:1061A000002C04D0114381620120B06107E09143CB +:1061B00081620021B161C16A04229143C162380049 +:1061C0001AF010FC2800F8BDF8B5040000261AF0FB +:1061D00005FC444F0090F86984423DD0B8683F4DBB +:1061E00000280BD0F868002808D03869002805D0AE +:1061F0007869002802D0B869002803D1002C13D098 +:10620000012629E0002C0FD0A8690F2109040322E0 +:10621000884352048018A861286A8843801828623D +:10622000FEF732FA01200CE0FEF735FAA869000902 +:106230000001801CA861286A00090001C01C2862B6 +:106240000020F8610620FFF70CFA01F0A4FF0620F9 +:10625000FFF70AFA01F0DDFF00981AF0C3FB3000E7 +:10626000F8BD2048C069704770B5040000251AF0D9 +:10627000B5FB0600FEF7F0FA002801D0002C0AD189 +:10628000FEF7EAFA204306D01648C06901E0FEF79F +:106290003BFA0028FBD030001AF0A4FB280070BDA8 +:1062A0001048806870470F48006970470D48406982 +:1062B00070470C488069704710B50024FEF7CCFA8F +:1062C000002800D00124200010BD00005000000470 +:1062D000002F00800300FCFF80260080002100804A +:1062E000F9FF0000385800B000280080403D0080D1 +:1062F000009400A80000000470B51D4CB2F7BFDE8A +:1063000001000000405F00A0000200005DF0695A3B +:106310002068002811D1FFF769FB0500FFF766FB35 +:1063200019494000085A194AE90051586423584352 +:10633000C90F491C43F3ECED206070BD11490120E9 +:106340004860704710B501F087FFC7E770B50400DB +:1063500000251AF04DFB0B49896800290DD10C4925 +:106360000C220B68002C06D093430B600A680423B0 +:106370001A430A6001E093430B601AF03DFB2800CA +:1063800070BD0000385800B0000000045000000448 +:10639000002F008070477047F8B58A4801780129BE +:1063A0007ED0012101701AF023FB00908648422123 +:1063B00043F34CEC0121844AC90700200B781354A5 +:1063C000491C401C0A28F9DB804900200B7814186E +:1063D000491C401C0B28A372F8DB7C4890380178DC +:1063E0005175017991754179D175017A1176417AAA +:1063F0005176017B9176407B7449D07680390020BC +:106400000B781418491C401C0A282377F8DB6F49C5 +:1064100050390A7E6C48203082710A7FC271497FF0 +:1064200001726A4930390A7842724A7882728A78EF +:10643000C2720A7902734A7942738A7982730A7A3C +:10644000C2734A7A02748A7A42740A7B82744A7BE3 +:10645000C2748A7B0275CA7B42750A7C82754A7C4B +:10646000C2758A7C0276C97C4176584930310A78F7 +:1064700082764A78C2760A7902774A794277544A14 +:10648000137C8377927CC2770A7F20300270497F29 +:1064900041704E4E042010368446B078EE2800E05D +:1064A0003EE0FAD16046F070FF20B07000222FE08D +:1064B000B078EE28FCD10C245443464B1959F170A6 +:1064C000080A3071080C7071080EB071FF20B070AE +:1064D000002903D1B078FE28FCD11BE03B4FE51822 +:1064E00069681A37B078EE28FCD1384813300B7839 +:1064F0000370491C401CB842F9D9364B68681B59D7 +:10650000C01888420DD8287AB070521CD162D1FED2 +:10651000010000003C6100A000020000552F988798 +:106520001206120E6245CDD300981AF06FFA2A486F +:1065300000210170F8BDFF20B070DDE72848103061 +:106540008078EE2800D131E7704770B5FBF741FD48 +:106550002648002200680D2100F341FC0120FDF7D0 +:10656000E6FB234D2C6804E06068002800D08047DB +:106570002468002CF8D1FFF7E1FFFBF720FDF1E7DD +:106580001C4810B5FEF234FB10BD10B5134C203C76 +:106590006360E260A16020601AF0E8EB20611AF00D +:1065A000F6EB60611AF002ECA0611AF010ECE06109 +:1065B000FEE710B504001AF025FA0D4B19680A0021 +:1065C00000E00968002902D0A142FAD101E022606E +:1065D0001C601AF01BFA10BD585800B028D000B04B +:1065E00090020080800000802C010004800E0004D6 +:1065F0009C0E00044416000400487047071D0FEA73 +:10660000704770B57D240500010024022000FFF7CB +:1066100030F829002000FFF72FF829002000FFF7AD +:106620002EF829002000FFF72DF870BD10B50400EA +:1066300001000020FFF71DF821000020FFF71CF8E3 +:1066400021000020FFF71BF821000020FFF71AF8B7 +:1066500010BD0120D5E70120E8E7414A002010B530 +:1066600004000C21414389180B7A002B03D04968A0 +:10667000A14200D90C00401C0228F2DB05212000B9 +:10668000FEF7F7FF05212000FEF7F6FF05212000A9 +:10669000FEF7F5FF05212000FEF7F4FF10BD0C23E7 +:1066A00058432F4A012180180172D6E70C23584322 +:1066B0002B4A002180180172CFE72A4909784172DC +:1066C000294909784181704770B50124002800D01C +:1066D000264C274DA868A043A8600220FFF753FA74 +:1066E000A8682043A8602348FFF74DFA70BDF8B5AD +:1066F0000125AD05204C214E214F012815D16068A0 +:106700006900884360606068284360603068018C7D +:10671000E20D1143018400F3C9FC3868F998F15681 +:1067200001000000386300A000020000A1C7263A63 +:10673000C18A220C1143C18200F3CEFCF8BD00F3E4 +:10674000BFFC3868C18A4904490CC18200F3C4FC0B +:106750003068018CFF22521C914301846068A84379 +:106760006060F8BD10B5FFF751FF7321000E0902FC +:10677000401810BD645800B0A1E50004A0E5000475 +:106780000100000480210080DC050000402300801F +:1067900064EA000434EA000410B537F313FC10BDBA +:1067A00010B537F3D2FB10BD704710B504000020C0 +:1067B000C043206046488079042805D003281AD1B8 +:1067C000002024F3B3F9206042480068401C0BD03D +:1067D000012024F3ABF92168884203D2012024F37D +:1067E000A5F900E0080020603B488178002904D02A +:1067F0000079002801D1002010BD012010BD704794 +:1068000010B50A78012A0BD0022A09D0032A1BD11D +:10681000012819D131480078012813D0022202E062 +:10682000012804D10122002108000B0008E0032800 +:106830000AD188784B780002034300210122080026 +:1068400000F077F8012010BD002010BD38B50024FD +:106850000878F12807D0F22805D103200090012004 +:106860006946FFF7CDFF200038BD70B5050038F34D +:1068700016FA002803D104F0B5F9002801D001244C +:1068800000E00024002D02D038F3FBF900E00020E6 +:10689000204370BD10B506F0E1F910BD102010B511 +:1068A00004F0A5F910BD10B50C4C6078002803D099 +:1068B00001F360FE002060700120FBF7D1FB00288F +:1068C00001D102F0C7FB02F06EFAFDF74DF810BDE2 +:1068D000D0D10004E0E900046CE600047C5800B06C +:1068E000F8B50D00060000200090180017001C00ED +:1068F0000D3000F301FB0028009018D0002D04D0CB +:10690000FC4901600572466004E0FA49491E0160D5 +:10691000FF2101724472220039000A3043F30EE96C +:10692000F5480168684600F3F6FA0020D35B0E458F +:1069300001000000346500A000020000B83FF84AE2 +:10694000F8BD0120F8BD38B50D0011001A061C0075 +:10695000120E012D6B4604D119705A7000216A463F +:1069600004E01A70220A6B465A706A460223FFF747 +:10697000C1FF38BDF8B5002406000F001AF056F824 +:106980000500E34831010818037B43F3D0EA050E04 +:106990000E0E04050E000124002101734170080051 +:1069A000FBF7FBFB0021FBF7E4FC28001AF042F8A0 +:1069B000002C07D0002F05D0202201213000022317 +:1069C000FFF7C1FFF8BDF1B50020FBF7E6FB0500BE +:1069D0000098D04E0101CE480C182079FF2828D10C +:1069E0006079002819D0FF2817D0A068FBF77DFB3D +:1069F0006179FE2901D1C84902E07D23DB005943BA +:106A000088420AD20D1A012D07D9FBF76AFB07004D +:106A10003800FBF76AFBA842FAD9306800220B2144 +:106A200000F3F1F900980121FFF7A4FF0020607046 +:106A3000F8BD2800FBF7C7FC01002079FCF741FDF9 +:106A40006079FF281DD000280BD0FBF74AFB060019 +:106A50003000FBF74AFB61797D23DB005943884214 +:106A6000F6D92800FBF7AFFC002801D1012100E096 +:106A700000212079FCF725FD00980121FFF77AFF1E +:106A8000F8BD306800220B2100F3BDF9F8BD70B5E8 +:106A900006009F4900014418085C257B002817D098 +:106AA000E088002808D0A068FBF71FFBE1887D2361 +:106AB000DB00594381420BD8002D03D0032D07D1B1 +:106AC000012070BD0021042230000B00FFF73BFFC6 +:106AD000002070BD10B50400FBF753FE8C48210167 +:106AE0000818017B002909D0032906D14078002825 +:106AF00003D100212000FFF73DFF10BDC078002822 +:106B0000FBD00021042220000B00FFF71CFF10BD6A +:106B1000F7B500200C0082B0FBF73FFB02997C4ADE +:106B20000700230009017B4D002601208C1843F348 +:106B3000FEE90C0A070C0E13373A3E546C59647385 +:106B400001000000306700A0000200004CD746F7AB +:106B5000640A790A50540498E08005B0F0BD565498 +:106B6000FBE7A1780029F8D0E070F6E70700207372 +:106B7000E078002817D002985A2201210023FFF75D +:106B8000ECFE6770E67028681D216A4600F345F93F +:106B90006B46D8880128E0D00020FBF708FB0121D4 +:106BA000FBF7F1FBD9E70121029820220B00FFF748 +:106BB000D4FED2E702202073CFE7029800F0CDF890 +:106BC000CBE7207B022801D1042020730020FBF7B3 +:106BD000EEFA0021FBF7D7FB607800282AD10021CC +:106BE0000298FFF7D1FEFBF786FAA060B5E7607860 +:106BF000002802D02079FF28AFD12868002219216F +:106C000000F30BF902980121FFF7BEFEA5E7286803 +:106C10000022092100F301F92079FF280AD0380069 +:106C2000FBF7DBFB002801D1012100E000212079E6 +:106C3000FCF751FC0121D3E7607800288DD0029841 +:106C4000FFF7CBFE89E70B788A78FF2B01D15A2A10 +:106C500004D0202A06D1C978012903D105220021B8 +:106C60000B007AE670470878FF2804D188785A2804 +:106C700001D101207047002070478878202804D176 +:106C8000C878022801D101207047002070472549AB +:106C9000000140184078002800D001207047F8B566 +:106CA00015000600022945D12878FF2818D11E4872 +:106CB000006800283ED01E49096888423AD1006821 +:106CC000002807D0012807D0022807D0032831D197 +:106CD00007240AE0042408E0052406E0062404E072 +:106CE0000D2801D1092400E008240020FBF75FFAF9 +:106CF0002A7807002100FBF707FB00281AD0094873 +:106D0000320101211018817029780171697841716F +:106D100000213800FBF737FB0120F8BDEC13000021 +:106D2000E0A634006CD000B0880E000440420F0092 +:106D3000800E00040020F0E702001301234A10B582 +:106D40009A1893780120002B06D0127927D20DB41F +:106D5000010000002C6900A0000200008BCE44AAB4 +:106D6000FF2A03D01000FCF7C0FB002010BD70B557 +:106D700005000020FBF725FA0600194829010C1828 +:106D8000207B022823D1032020737D20C000FEF742 +:106D900022FF6078002819D02079FF280BD030001E +:106DA000FBF725FB002801D1012100E0002120791B +:106DB000FCF79BFB02E0FBF7A8F9A060002D05D1D2 +:106DC0000848002200681E2100F331F870BD002140 +:106DD0002800FFF7E3FDFBF798F9A06070BD000005 +:106DE0006CD000B0880E000438B58D21564D490195 +:106DF000280042F388EF5549554842F384EF554C3B +:106E00005649226808000092534A514B0C38FEF252 +:106E1000EFFE524922681C3908000092504B514A3B +:106E20003430FEF2E5FE22684C4900924D4A143996 +:106E300008002B0020323830FEF2DAFE38BD7047F1 +:106E400010B5FAF765FF002801D0002201E000220A +:106E5000D24342480021243043F3C4F8002806D12D +:106E60003E4924390868401C0860002010BD2821D4 +:106E70000181283010BD3C49096808473748002285 +:106E80001100183010B543F3ADF8002806D133498E +:106E900024394868401C4860002010BD2821018129 +:106EA000283010BD283810B543F372F810BD2F23D9 +:106EB0001B0158432D494018817B491C81732021B7 +:106EC0000181203070472F231B0158432749401868 +:106ED000817B491E817370472F231B01584323492F +:106EE0004018203070472F231B0158432049401879 +:106EF000203070472F231B0158431D494018817BC8 +:106F0000491C817320210181203070472F231B01F0 +:106F1000584317494018817B491E817370472F23BE +:106F20001B0158431249401870470C4900201C3976 +:106F30000968002902D088680006000E70470D48D5 +:106F4000000900017047000088B300B0F05700004E +:106F5000386D00B0980E00041CE200B08AF7994426 +:106F600001000000286B00A0000200007F26FA1735 +:106F7000AC5800B0289200B034E300B078FB0004B5 +:106F80007CD000B04CD900B008DC00B070B5012551 +:106F90003A4C2D07E560FCF74AFD394800210068AE +:106FA00043F384F8A0682843A060012070BD10B5A9 +:106FB00000F03DF805F07DFB00F013F83148016862 +:106FC00013221143016030491C20FAF79FFE2B4821 +:106FD0008168012212071143816005F0A3FE0020A1 +:106FE00010BD00B52948142187B042F36CEE274844 +:106FF0001421143042F366EE01220021042003AB79 +:1070000007C302002248FF2191316B4607C3A8380D +:10701000204A002320A1FDF255FC0004000C04D1FD +:107020001A4820A12830FCF2DFF907B000BD38B5BE +:10703000204D1F48204C2860226800921F4A291DBD +:107040000800130018304033FEF2DCFD2268009285 +:107050001B4A29000C31080013001C304033FEF29B +:10706000D1FD226829000092084A143108002B68DB +:10707000203A2030FEF2C6FD38BD0000009000A886 +:10708000805A00B000F003A9456B0000301E01B02B +:10709000400201B023C80000426C654D6278546123 +:1070A000736B0000426C654D6278466C61677300DB +:1070B000D86300B048C500B0980E0004D00301B0FA +:1070C000100B01B0F8B5F9480569681C3DD01020D7 +:1070D000FFF23AFF0028009037D0F549002402C0A3 +:1070E000FF220A2142F34AED24E0E80720D0601E87 +:1070F0000D281DD8A0000019083800D50020010077 +:107100001A314F2903DD4F210E2C00D03520009A73 +:10711000091A121D41188C4608E04607C108760F6F +:107120000127535CB740BB43401C53548445F4D8FB +:107130006D08641C002DD8D10098001D06F092FD4A +:10714000DC4801686846FFF20EFFF8BDD749012010 +:1071500010B50870FFF7B6FF01F3B9FB012006F088 +:107160005FFD10BDF8B505000600D04FD21BCA9BCD +:1071700001000000246D00A00002000066DE24670C +:107180000C0038781C3E00280AD0D0480079C0078F +:107190000BD00020FFF799FD002806D0032C04D067 +:1071A0003000F48019F07EEEF8BD0020FFF7BAFC45 +:1071B00019F07CEE6A7AF868921C2300310042F3E1 +:1071C00073FFF8BD10B501F304FDBD490400C868A4 +:1071D0004968884203D100221421FFF23CFE0221BB +:1071E0002000FFF7C9FF10BDF1B50098C17A857A7C +:1071F000047A4068090206060D43360E6846FFF21F +:10720000B0FE2A0021003000FFF7AAFCF8BDF1B55E +:1072100000270098AB4A01688588C6880C329142E5 +:1072200003D1052106F0A9FCF8BD806824210400E3 +:10723000283C2181001F290A05704170310A86709F +:10724000C170A2480079C0072CD00020FFF73DFD97 +:10725000002827D000988068C278817812021143F4 +:107260004279037912024778134302783F023A4386 +:10727000964F921E3F881206120E8F420DD1934FE9 +:107280007988994209D17B793900934205D1801DD3 +:10729000891D19F045FA002803D06846FFF261FE07 +:1072A00029E001270020FFF73DFC00982A0B2D055F +:1072B00081682D0D2800012306F06BFA6846FFF265 +:1072C00050FE7F480078002805D10520E08020008E +:1072D00019F0E8EDF8BD7E480168002903D02000D0 +:1072E00088470028F6D119F0E2ED012F09D177483F +:1072F0000079800705D5774920000968283088473C +:10730000F8BD75480078002809D074490888401EE7 +:1073100008807349E80040184188491C418068484A +:10732000321DC0682100052342F3BEFEF8BD1CB526 +:10733000C188022935D02423421C052918D00829E8 +:1073400013D103819A5CC15C120211430905090D36 +:10735000644A8B005918535C002B06D0891801220F +:107360008A56002A01DD521E4A7042F325FE1CBDDA +:10737000048903819A5CC15C120211438A31AC1802 +:1073800001000000206F00A00002000092369ADA8F +:107390000905090D80393F29F1D958490481097837 +:1073A0002830012901D0504900E055490968884733 +:1073B00001F32EFC1CBD01001C310191097A3E290C +:1073C000DDD005290BD10420FFF2D2FD4249009007 +:1073D000783901604B4801686846FFF2D8FD01A882 +:1073E000FFF2C9FD1CBD10B580884749884202D113 +:1073F000FBF79FFB10BD4449491C884202D1FBF7B3 +:107400008AFC10BDFBF7C4F910BDF8B504000F00ED +:10741000057840780026000205432805000D8038D5 +:10742000402817D31420FFF2A3FDFF21FF31009065 +:1074300001608580E278A17812021143C1800021A9 +:10744000C181241D477384602E4801686846FFF29D +:107450009EFD04E03900200000F0C9FB060030006A +:10746000F8BDF8B50D001B4E3178002901D16869CF +:10747000F06028894419E888082806D01DDC012816 +:1074800050D0022842D0032874D10C20FFF270FDA6 +:10749000002800906ED0FBF77BF90F49009818394F +:1074A000016062782178120211438180856015485D +:1074B00001686846FFF26BFD64E0092832D00A28B3 +:1074C00024D0112856D1FBF763F901212000FFF7E2 +:1074D0009CFF57E07C0E000401140000E4A6340079 +:1074E000B05900B078E6000494F500049BE5000470 +:1074F000A8E50004489D0004109E000498E50004DF +:107500009CF50004E0A6340080FE0000FBF740F983 +:1075100000212000FFF779FF002833D0280042F334 +:1075200055FD2FE0002901D1FFF724FE7168F068B6 +:10753000884227D1A0780930FFF21AFDFF49009058 +:10754000016062782178120211438180A1788171F3 +:10755000A278E11CC01D42F32EEB0098FFF743FF19 +:10756000009806F038FC002804D1F5480168684608 +:10757000FFF20DFD280042F329FDF06800221421DE +:10758000FFF273FC0020F8BDFEB500225833308CAA +:10759000010000001C7100A000020000EC2D3D6AFB +:1075A0000500FF21EC48D243193142F343FD0700A7 +:1075B0005BD0A8880005000D00900020FFF7C6FAF8 +:1075C0000320F88024203C183881A8882070A888DF +:1075D0001C23000A6070E888A070009881000918D8 +:1075E000DE480E187078DE49401C707000985843D1 +:1075F00040184079FFF7BBFC0189DA4A081801906E +:10760000A968401A80180290EA88824201D8E01CDA +:107610000AE0029AE01C42F3D8EAE8880299421A8A +:10762000029801992018C01C42F3CEEACE48007897 +:10763000022803D17078401E707010E0009819F095 +:107640004EEC002812D07078401E7070009801F344 +:10765000A2F92070009801F39EF9000A6070EA8890 +:10766000390000200323FFF706FFFEBDBF48016875 +:10767000002903D0380088470028F6D1009819F077 +:1076800032EC002806D07078401E7070380042F34B +:10769000A7FCFEBDA278B648D21CC06839000823FA +:1076A00042F316FDFEBD71B581B0019AB04E9088CF +:1076B00094680B2839D2A94983001B1859188B7874 +:1076C000002B32D0FF23F73300921360009A2389F6 +:1076D000D3800A79521C0A71A3490978012905D07F +:1076E000A44801686846FFF25CFC1BE021891C236A +:1076F0000D1958439A4940189F49407909688847AD +:10770000009AA978D180AA78E91C42F35EEA009831 +:1077100001F328FE200042F363FCF06800221421EC +:10772000FFF2ADFB002001907CBD200042F358FC2D +:10773000F06800221421FFF2A2FB01980028F3D088 +:1077400001A8FFF222FC7CBDF1B500998A884E7B2E +:107750001005000D05000B2822D2920B00D000204E +:10776000864AC3009C182279002A19D0E5808A88AD +:107770008968120B002306F020F8002E02D16079F0 +:10778000401C607178480078012805D0794801686C +:107790006846FFF206FCF8BD009801F3C397CABC27 +:1077A00001000000187300A00002000018C583D774 +:1077B000C6FCF8BD88687749096888476846FFF2C3 +:1077C000EEFB002EF5D101212800FFF719FDF8BDD1 +:1077D00031B50098664D80880005000D840024189E +:1077E000295D002912D06849096801F32DFA65481E +:1077F000017800290AD0611901228A56032A05DA84 +:107800004078002802D10098FFF7D2FE6846FFF2C8 +:10781000C6FB38BD01B55948007802281CD0009835 +:1078200081888A0B01D0002101E00905090DCA00F9 +:10783000574951180A79002A0BD08279002A08D1B9 +:107840004A79521E4A71808801210005000DFFF718 +:10785000D7FC6846FFF2A3FB08BD31B500984C4A3F +:1078600081880905490C525C4449002A097817D0DF +:10787000022912D048490978002903D047490988CC +:10788000002902D0FFF7E1FC38BD454A454C11788C +:107890008B00491CE050117038BD01F37EFC38BDEF +:1078A0008068012901D0404900E03A4909688847C9 +:1078B0006846FFF274FB01F3BFF938BD01B50098CB +:1078C0008068002807D042F395FB2E480022C0684C +:1078D0001421FFF2DEFA0098808819F00AEB0028E4 +:1078E00003D06846FFF25BFB08BD009801F324FA61 +:1078F00008BD10B5234CE068002817D100212BA04B +:10790000FFF27BFA6060A2681A21FFF2C2FA294AEC +:1079100060682021FFF2BDFA274A60680421FFF267 +:10792000B8FA60682549E0602348086010BDF0B5EA +:10793000002185B022A0FFF260FA124DA860FFF787 +:10794000D8FF214F0421388801F337F901F346F9B4 +:10795000114E0024FFF25CFB024B039002681233CD +:10796000D11A33E092130000E4A63400A05800B00E +:10797000109E0004B4B40004D202000098E5000494 +:107980007CE600047C0E0004FCA93400ACF5000485 +:10799000489D00049CF500049BE50004A8E5000454 +:1079A0009CE50004E09D000494F50004FE6E3D1685 +:1079B00001000000147500A000020000013D5DA759 +:1079C00062745F7364696F00F36F0000D36E000030 +:1079D000B0EC000462745F6863690000A4E5000411 +:1079E0009A426FD024DCAC49531A8A427CD017DC0F +:1079F000AA4BD11A9A4267D009DCFF3AF63A70D006 +:107A0000032A6FD0092A54D1FFF7B2FE35E00129CD +:107A1000F1D0062967D009294BD101F338F92CE0C0 +:107A2000133B42F3D4EA084D73787F8446469C4664 +:107A300048294AD023DC342965D015DC01296FD0D0 +:107A400002296ED0032934D10820FFF2AFFA9249FF +:107A500002903631016092490978017191480168BC +:107A600002A8FFF2B2FA24E0452971D0462970D06D +:107A700047291ED10321FFF7A7FB039474E7692967 +:107A800068D009DC4F2976D05C2975D0682910D1DF +:107A9000022106F09AF8F0E76A2919D0722908D174 +:107AA000EB6869688B4204D1020017211800FFF2CD +:107AB000FAF903980028E1D003A8FFF27AFA53E715 +:107AC0000221D8E74EE00FE063E0FFF7B5FBD4E713 +:107AD00082694169001D019200910FC819F01AEAEC +:107AE000E7E750E052E057E030780028E1D06E48F8 +:107AF00000880028DDD068497D2000224F31C00079 +:107B000030F3E8FBD5E701F3B6F9D2E706F0AFF8BA +:107B100001F3B3FA55E08179808801F331FAC8E7BF +:107B20002BE018E08179808801F3FFF9C1E78088B4 +:107B3000010080393F2902D806F08BF8B9E701F33C +:107B400061FA039900228888891D19F0E8E9B0E7F5 +:107B500016E024E038E0007901F3B2F8A9E70079F3 +:107B60003070A6E7514A018911808088042138804D +:107B700001F32DF89DE716E01BE001F336F998E7D5 +:107B8000FFF7A5FD79E7FFF7A3FE76E7FFF72AFEEB +:107B900073E7FFF749FE70E7FFF769FE6DE74449B9 +:107BA0000079087085E705F002FE03A8FFF201FAEC +:107BB0007FE740682969884292D0286125EBA87048 +:107BC00001000000107700A000020000F5D5E31AC4 +:107BD000287800288ED0FFF7B1FA74E706F02DF868 +:107BE00055E7010000200B2906D2374AC900891841 +:107BF0000979002900D001207047344810B5416947 +:107C00003348344A81600021016141618161C16171 +:107C100002624162FFF2BAF806F0F6F810BD010008 +:107C2000002000290AD1294AD168002906D01378FA +:107C3000002B03D05268914200D101207047F3B568 +:107C40000124060081B08578C07800020543200237 +:107C5000854200D80024002C25D11C48C16840680A +:107C6000814203D10298002800D10124002C15D0B4 +:107C700000221948110042F3FBF9002803D121200A +:107C800000F394FF0FE00221C180242147180181F5 +:107C90002A1D3100380041F3B6EF00E037000299A9 +:107CA000380005F083FF2000FEBD000089130000AE +:107CB000FF01000098E50004E4A63400AAE50004F2 +:107CC000A8E500049FE50004489D00047C0E000424 +:107CD00064E300B0F36F000070C500B070B501241C +:107CE000394D6406EC6039480021406842F31AFAC5 +:107CF000AC603748807EC00704D13649888862135B +:107D000090438880012070BD012B10B50BD1324803 +:107D100042F339FA314800688047002803D13049DE +:107D2000012009688847002010BD2E4808B5026868 +:107D30000092264A2C4B10321100083908001030EE +:107D4000FDF29CFF08BD2448142110B541F3F6EF65 +:107D500006F0B6F8254800214068C1721B48026849 +:107D600023488260234A0261234A81614261234A97 +:107D7000C16102624162224909688162002121A039 +:107D8000FFF24FF822491A4A08601A21FFF295F8CB +:107D9000204B174801211B680D228902303098477B +:107DA0001348FEF2F3FF002801D0012010BD1A494C +:107DB0001920F9F7E7FF0028F8D103490120400610 +:107DC0008860002010BD0000009000A8F1EAB37E9A +:107DD000010000000C7900A00002000032CCE14755 +:107DE000E05800B090DA0004C02800A878DC000455 +:107DF0005CEF000468F00004980E000488C900B02D +:107E000070DC0004E0E300B0451034004910340099 +:107E1000497800002CF000046863695F6D75785F35 +:107E2000666D00003CED000464F000041D78000065 +:107E30000021016001207047002101600848006BAB +:107E40008001C00F7047064840300079C00701D15B +:107E5000012070470020704702484068C07A704790 +:107E600070DA000470DC000470B501248A4D6404EB +:107E7000EC608A480021406942F35EF9AC60012061 +:107E800070BD10B50AF040F9002010BD08001100C7 +:107E9000012B10B502D1824A12689047002010BD14 +:107EA0000020704700207047FEB5002001000190BF +:107EB0007CA0FEF2C0FF794C606109F09BFA0021C2 +:107EC00079A0FEF2B8FFA06162691A21FEF2FFFFFD +:107ED0002600784F1C3600F03DF9774C774D01E0D5 +:107EE00020688047386880470028F9D12868804793 +:107EF0000028F5D1421E009271480122072101ABF2 +:107F0000FBF22AFB00240CE0E00085196A680A42B3 +:107F100006D0325820009047696801988843019044 +:107F2000641C01990029EFD1D5E71C3010B5417AC6 +:107F3000092901D0082917D162490024447209682F +:107F4000884761480068804754488168491E8160BD +:107F50000178002905D00470806900221421FEF206 +:107F6000B6FF55480068804710BD70B505004B4E00 +:107F70000C00B06900280ED029682200022342F3C9 +:107F8000CFF8002803D0F068844200D9F4604D494E +:107F900028000968884770BD01004948002210B5D3 +:107FA000FBF26AFB10BD1CB500200200019000909E +:107FB0004348072101ABFBF2CFFA002804D1019816 +:107FC000400700D001201CBD00201CBD38B50500B5 +:107FD0000C00FCF27BFD0022D24300923D08E14FF1 +:107FE00001000000087B00A000020000C6245FFA28 +:107FF0003848230001222900FBF2B8FA38BDF8B551 +:1080000001250600364CAD0218F07EFD284F0021F8 +:108010003A69AA1A04E02378EE2B03D1641C491CA8 +:108020008A42F8D8691A002E396101D0691A316084 +:1080300018F06EFD3869F8BD10B5040027480068D7 +:1080400080471B4821494278944202D10868804702 +:1080500010BD447008688047002CF9D0012C04D171 +:108060007D24E401FBF75EFD03E07D242402FBF7A1 +:108070005FFD03212000FDF77EFB03212000FDF7BB +:1080800080FB03212000FDF779FB03212000FDF791 +:108090007BFB10BD10B509F0DFF9012010BD08B55C +:1080A0006846FFF7ACFF012008BD0000009000A863 +:1080B000045900B07CF000046E6663006863695F79 +:1080C0006D75785F6E666300C4F20004D0F2000440 +:1080D000C8F2000410410004BCF10004CCF200041A +:1080E000683C0004254810B50068C00604D5FFF7B9 +:1080F00064FF002836D007E0FFF75FFF002803D1B8 +:108100001F48C07C002801D0002010BD06F0E5F912 +:108110000028FAD006F09FF90028F5D106F096F96C +:108120000028F1D118F01CEF0028EDD107F032FB48 +:108130000028EAD006F02FF90028E6D00AF018FA55 +:108140000028E2D00F4800780028DDD106F023F99E +:10815000012803D109F0F0FB002803D006F01BF939 +:108160000228D1D1012010BD10B5FFF7BBFF0028B8 +:1081700001D008F0CDFF10BD70470000A85600B038 +:1081800070EF00B0295B00B0F8B5150006000A4C8E +:10819000302021781A004843084B069FC018491C1C +:1081A0003060217000922B003A00611CF9F26CFDE6 +:1081B0000006000EF8BD0000940E000440E800B078 +:1081C00070B50500824A834E1178C807000F3358F6 +:1081D000AB4201D1801907E0491CC807040F117098 +:1081E0003059A84202D1A019406870BDD2BC34CD2C +:1081F00001000000047D00A000020000DFDC818A95 +:108200006421280041F31AEF78490200002043005E +:10821000CB5A934202D2401C0928F8D3A1193551F8 +:10822000486070BD70B505006E4A6F4E51781036CB +:10823000C807000F3358AB4201D1801907E0491C31 +:10824000C807040F51703059A84202D1A0194068E4 +:1082500070BD6421280041F3F2EE64490200002061 +:1082600032314300CB5A934202D2401C0C28F8D33F +:10827000A1193551486070BD5E485D4A416811439F +:1082800041605D4AC1681143C16070475B4870B589 +:10829000006800281ED0FDF73FFC0500FDF74CFCF0 +:1082A0000400FCF7E2FBFCF7FAFBFCF72CFC2800CF +:1082B000FCF793FE2800FFF7DFFFFCF737FF2000F5 +:1082C000FDF752F92800FDF731F80520FCF7F6FB21 +:1082D000FCF7B8FB70BD70B5040018F01FFC05007A +:1082E0002000FFF777FF41496A310C5C2000FCF762 +:1082F0007EFE3E4960001231085A642444437D21C9 +:10830000A002C90041F39AEE401E052141F396EE0A +:108310003B49401C0860280018F004FC200070BD98 +:1083200070B5040018F0FAFB05002000FFF752FFBB +:108330002E496A310C5C2000FCF76BFE2B49600073 +:108340001231085A64244443280018F0EBFB200043 +:1083500070BD70B5040018F0E1FB05002000FFF7C8 +:1083600061FF22497A310C5C2000FCF763FE1F4953 +:1083700060004A31085A64244443280018F0D2FBB4 +:10838000200070BD70B5174CA068002829D1606826 +:10839000002816D1FDF7C0FB05280DD0062808D00F +:1083A00012498B3107280BD00A2809D10800203048 +:1083B00004E00E489B3001E00C48BB30606000E0F8 +:1083C000616060680949407A08390D5CFDF7A4FBDB +:1083D0000C494000085A64235843290041F32EEE0B +:1083E000A06070BD505900B0A0EA00B0380200048F +:1083F0001032547600270080224365773907C1C9BF +:1084000001000000007F00A0000200002B343F3775 +:108410004C6300B040C500B0000000047047002865 +:1084200011D08807800F0ED001280CD0022801D06F +:10843000032808D13B488168090104D581680122DD +:1084400092061143816070471123374A1B020029AD +:1084500010D0012917D0022915D0032912D1510DAE +:10846000002890681FD033231B02984390609068C7 +:10847000084306E00028906802D0FF21491CF7E776 +:108480009843906070470028906809D098439060A6 +:108490009068012149020843906090680901E7E76C +:1084A00011214902FFE78843EBE7F0B50D00C10752 +:1084B00001D10C2801D91220F0BD002440088446C7 +:1084C0002BE029786D1C2A786D1CFF2A03D100202F +:1084D000FFF7BAFF1EE00023180009E04700BE19AD +:1084E000B7788F4201D10123F270401C0006000EC4 +:1084F0000E4E37888742F1D8002B0BD1300003880D +:108500005B001B189970018849000918CA7001881E +:10851000491C0180641C2406240EA445D1D80020E7 +:10852000F0BD0000002F008040230080C0EA00B0B2 +:10853000FF2212020240010612021143FF2212041E +:108540000240120A1143000E084370470349FF22FC +:10855000C432888B1042FCD17047000000080090A4 +:10856000F8B5002425000F4E0F4F1049A0003550DC +:10857000095830206043C019C46081600C49016112 +:108580000C4941610C4981610C49C1610C4901628E +:108590000C4941620C498162FEF220FC641C022CF1 +:1085A000E3DBF8BDF0EC00044CD8000400ED00045F +:1085B0005FFB330093FB3300D5FB3300F3FB330049 +:1085C0000BFC330075FC330055FC33000C480021D4 +:1085D00010B501600B4802680B488260C1600B490E +:1085E00001610B4941610B4981610B49C1610B4933 +:1085F00001620B4941620B498162FEF2EFFB10BD43 +:10860000E4EC0004E8EC00041CD80004ABAD3351EA +:1086100001000000FC8000A000020000ACE4E44483 +:10862000F5F933001BFA330035FA330043FA33000F +:1086300061FA330099FA33007FFA33000278FA497D +:10864000401C0A700278401C4A7002784078000290 +:1086500002430A81704710B5F34C00202100627874 +:108660004B690989012A07D0022A0BD0032A08D1B5 +:108670008B4206D3606103E05A06520E8A4200D252 +:10868000012010BDE94BA2695A43E94BD218A261FF +:108690001A408A42F4D810BD10B537F319FF10BD47 +:1086A00010B537F33CFF10BD10B537F35CFF10BDBC +:1086B00070B5E04D2878002833D10021DEA0FEF20D +:1086C000E2FBE04C00212061DFA0FEF2DCFB6061F8 +:1086D0000021E0A0FEF2D7FBE0600020A06120694D +:1086E00000222021FEF21BFC206901222B21FEF238 +:1086F00016FC606900222021FEF211FC6069012253 +:108700002B21FEF20CFCD64AE0682021FEF207FC89 +:10871000D448442141F36EEB0120D4492870D2485B +:108720000860002070BDF0B585B0D1480078002801 +:1087300078D137F333FF0024E443CE4822000021F0 +:1087400041F3C8FCCC4F22003860CA48002141F3F5 +:10875000C1FCCA49BB4E086038686A4601890818DE +:10876000000C009030692521FEF2D9FBC3486A460F +:10877000006801890818000C009070692521FEF23C +:10878000CEFBBF481A210180A9490024091D84801D +:108790000181C480012144814180B94A3069262188 +:1087A000FEF2BDFBB74D3A20E880B54A706926213C +:1087B000FEF2B5FBB4483A21C1803968F0230A893A +:1087C0002A815F006B810122AF812A80AB4A6C80D5 +:1087D000126815890581438187810480448010894E +:1087E00082180889411801A838F301F86B461879F6 +:1087F000F7210840A54901AA0978C909C900084319 +:108800001871F0682521FEF28AFBA14B00221B683B +:108810000221100098479F480068018850E816A47C +:1088200001000000F88200A000020000580C5AF974 +:108830000322D20291430180002005B0F0BD70B543 +:108840009A4D954C2868002812D1421E98485C2108 +:1088500041F34AFC03212860C1802030C1702868A0 +:10886000242101810021618029210028A1800ED0CE +:108870002868A188018185490122096804230860CC +:108880007548006941F37EFC6088401C60800020D0 +:1088900070BDF8B5012204236F487C49006909685E +:1088A000FEF23BFB7C484188002948D07F4D2421C3 +:1088B0002C68624B21814188C088EF274143891C85 +:1088C000A1806D4924340A7922704979E01C090796 +:1088D000090F617029688988A1700121E1702179EF +:1088E0000A0912010832DF210A409978CE07B60E34 +:1088F00032439606F60F3A40360132438E0752064F +:10890000F60F520EF6013243D609BF27B6013A40A0 +:108910003243491C42708807800F9870601D37F3FE +:1089200039FE286800268088A41C065529686148FD +:108930008A880068D21C032341F324FC2E600020A7 +:10894000F8BDF8B500263D49009608695B4F401C0C +:108950000861594835000068002821D1380041F3EA +:1089600025FC554C2060396800290AD05449096813 +:108970008847380041F31AFC206030480021012567 +:108980000171206800284AD0444A002151800189A1 +:1089900001260B189B78C91C8380918001813EE0E1 +:1089A0003E4980884A88C9885118891C814235D936 +:1089B000424841F3FBFB0400386800280BD04049D3 +:1089C0002000096888473D4841F3F0FB04001B483C +:1089D000002101250171002C21D0208901260019D8 +:1089E00082782E48A2808088208101193248006850 +:1089F00087880389BA181204DB19120C1B188280AD +:108A0000FF203130824200D9FEE7A288180041F3EE +:108A100036E92B4920000968884700E001262648EE +:108A20001E4A0068D28881880024891AFFBA9E39BC +:108A300001000000F48400A00002000041F48489D9 +:108A4000891E0F043F0C002E7DD001890E187EE098 +:108A5000605900B00D661900FF7F000098EC00041B +:108A60006D6465765F736263456E630008D70004CA +:108A70006D6465765F736263446563006D646576FB +:108A80005F62745F70636D0001270100C4D600044B +:108A9000758100007CE60004B4EC0004C45800B00A +:108AA000A0EC0004A4EC0004B8D60004FCD7000439 +:108AB0000CD80004E7E90004A4F800046CEA000400 +:108AC000ACEC0004A05800B0840E0004A8EC000434 +:108AD00098D60004B0EC00043019FFF7F5FD00282B +:108AE00034D03019407837F387FEC24A1179002913 +:108AF00006D1401C8007800FD0700120107116E055 +:108B0000D178814203D1491C8807800F0EE0491CAF +:108B10008907890F814206D1401C8007800F0027FA +:108B20000125D07020E0401C8007800FD070A41C6D +:108B300030190600FFF7CCFD002805D0300037F3D0 +:108B400017FDAD4F0BE018E0012505E0641CAB48B4 +:108B500040880019B842BFD9A748874204D1FFF71F +:108B60008EFD002800D0A64FA449488800194880EF +:108B700089880818A349096808819F48A24C874240 +:108B80000ED1002D0CD19B480121C180C168491C28 +:108B9000C1609C482168006808600120009023E0C3 +:108BA0009748874201D0002D02D00120009003E0B9 +:108BB00096490868401C08608E480021C18094488E +:108BC0004A1E41F39BFA934E306001890D183921FA +:108BD00081800A009049280041F35AE8280037F3C1 +:108BE000C7FC2168306808608C4E216870690122DA +:108BF000052341F3D1FA7F4DE888002809D1884840 +:108C0000406B002805D18748FDF2D2FC8449203111 +:108C1000C88182482168406901220523FEF287F954 +:108C20000098002813D07549764E4888CA88801865 +:108C300048808A881218306802814988ACB973ADBF +:108C400001000000F08600A000020000B51C3A34CC +:108C50008288914205D179490968884700203060AF +:108C600018E06D480268002A14D0694E9388708815 +:108C7000F1884018801C98420CD910898118B0885E +:108C8000108177888018DB1B938000237380928883 +:108C900041F308E86A48664F6A494289F8680968FA +:108CA0000823FEF24EF9FFF7DEFD206801890E1859 +:108CB0006869401C68612878002813D0E88801287A +:108CC00005D15D4832003100FDF27FFE0AE05648D2 +:108CD0000068002801D041F3F1F957483200310013 +:108CE000FDF20DFE4A4821684289F868082341F3E5 +:108CF0005DFAFFF7E2FD0020F8BD10B5040000208A +:108D0000E20702D00800FFF7F1FC4F49097801297A +:108D100014D1210701D5FFF724FD610601D500F02C +:108D20002BF8210601D500F043F8A10501D5FFF786 +:108D30001CFE6107890F01D000F001F810BD70B56D +:108D40000025414E3078012812D14048384C05703A +:108D50002069FEF2E6F86069FEF2E3F8E068FEF2F0 +:108D6000E0F825616561E560E561357037F334FC55 +:108D700037480560002070BD70B50024334E224D89 +:108D80003078002808D12A480022C0682821FEF245 +:108D9000E4F8AC70EC702C71012030702048046055 +:108DA0002C4804602448FDF201FC00206C6170BD79 +:108DB00070B5264D287801280FD11D4C0022E0689F +:108DC0002921FEF2CAF8206900222A21FEF2C5F804 +:108DD000606900222A21FEF2C0F800242C701E4D8A +:108DE0002868002802D041F369F92C60134C0A4D21 +:108DF0002868002801D021688847184841F3EAF91B +:108E000000282860F4D170BD605900B0FFFF000059 +:108E10000CD80004FF070000A8EC0004A4EC000438 +:108E2000BCEC0004C45800B0A00E000490A43400B0 +:108E300008D70004F843000438410004B0EC0004F3 +:108E4000FCD70004A0EC000498EC000426D0585392 +:108E500001000000EC8800A00002000072053869E3 +:108E6000B4EC00047CE60004B8EC0004ACEC0004B4 +:108E700098D6000410B536F300FE00210800FFF775 +:108E800015FB002010BD000070B5012500201AF36D +:108E900003FD040003201DF35BFB002804D1052023 +:108EA0001DF356FB00283BD0012138224A43A05C29 +:108EB000800705D51019C079002801D1002504E0EC +:108EC000491C0904090C0829EFD32800FAF7A3FF6D +:108ED000FF4E30680088C50AFEF7C7F80400FAF7AD +:108EE00085FFE907FB48FC4D09D00078844210D982 +:108EF0000020FAF784FF30680188A94308E0407831 +:108F0000844206D80120FAF77AFF306801882943A5 +:108F10000180082C04D2F149A0000A58521C0A50C2 +:108F200070BDF0B5002595B0ED4F2E000CA8029550 +:108F3000FAF755FF24220CA903A840F328EF0021DB +:108F40006B46D97308ABE748E74AD97200781278C4 +:108F5000024302D001226B46DA73002802D00120BE +:108F600008ABD872E1486B4699730079002801D0AC +:108F70000120987300206B46187358739874D87446 +:108F8000D876987608AB012418711C206043D84924 +:108F9000085C032801D005285ED1082C25D32000C9 +:108FA00008380104090C01910EF378FA01991E2387 +:108FB0005943091848797F2801D26B469874487A3A +:108FC0002C2805D03D2803D00D2801D00C2801D134 +:108FD000062004E06B46D87C002802D102206B46B4 +:108FE000D87401206B46587336E026F3D7FF64210E +:108FF00061436D1C09183420405C2D062D0E03289A +:1090000001D0012807D1761C403188883606360EFB +:10901000B84200D20700200004F035FD002803D03C +:109020006B46987E401C987601206B461873200092 +:1090300017F39CFC002804D120002BF3B3FD00287B +:1090400002D001206B46D876200002F079FA002881 +:1090500002D0012008AB1871641C240481F7DC5392 +:1090600001000000E88A00A00002000086ED86D41E +:10907000240C0B2C93D300206B461874002D5874CD +:1090800006D0B54204D10120102F187400D25874B4 +:1090900008AB01205D71FDF7B0FC08ABD871FDF79E +:1090A000C5FC08AB040018729748984B00787D21E6 +:1090B0005843C90041F308E80006000E08AB987158 +:1090C0006B46197B08AB1A7C914227D16B46597BC2 +:1090D00008AB5A7C914221D16B46D97B08ABDA7C34 +:1090E00091421BD1197910AB1A7A914216D1997A13 +:1090F000884213D16B46187C08AB197D88420DD18C +:109100006B46587C08AB597D884207D1D87910ABA3 +:10911000D97A884202D1187B844201D0042002907F +:1091200024220CA903A817F091FB002803D0029970 +:1091300003A8FAF750FE15B0F0BDF1B501242700E1 +:10914000694E2100F07841F3C7FB002814D0442079 +:1091500060436F4900254018C16B0098401A0028F1 +:1091600001DB05042D0C7079210041F3B5FB0028CB +:1091700008D0708985420DD838007179A0408143AC +:10918000717107E03089854204D338007179A040BD +:1091900008437071641C2404240C082CD1D3F8BD3E +:1091A000514910B5C968401A802802DD0020FAF73D +:1091B00054FE10BD10B530F366FD0400FFF7BDFF8F +:1091C0002000FFF7EDFF10BD10B5FDF758FF464931 +:1091D0008A78904202D94879002800D00120FAF715 +:1091E0004EFE10BD10B5FFF759FEFFF7E3FFFFF786 +:1091F000EBFF10BD38B504000820FDF245FF002844 +:10920000009007D00521890212C0424801686846D3 +:10921000FDF249FF38BD38B50028334C01D101209B +:1092200002E0012801D10020A0710820FDF22CFFEE +:109230000028009008D038490160A17901713748B1 +:1092400001686846FDF22FFF38BD2748002901D08C +:10925000022100E003218170704770B50400150001 +:10926000FAF743FE002810D01C206843A3D68D02D5 +:1092700001000000E48C00A0000200009F1558A42B +:10928000254940180079002800D001202949C969E2 +:10929000002900D00121012C01D1FFF7E0FF70BDB2 +:1092A00070B506000D000120FAF7E1FD0020FAF785 +:1092B000E7FD124C0120A840E178002E3ED001438A +:1092C00048226A43E1701C495118897E002903D164 +:1092D00021790843207102E0217981432171E078EE +:1092E000002800D00120FAF7ECFD2079002800D0FA +:1092F0000120FAF7EFFD70BD64EA00047C5900B06C +:1093000000080000D0EA00B0FFFF0000D7EA000428 +:10931000D8EA00046CD20004B4B40004CC5900B004 +:10932000E204000058D30004E0A634001414000046 +:10933000E4A6340008D7000470CA00048143E17039 +:10934000CAE70B001100012830B408D00D4A0120F3 +:10935000D47888408443D470547984435471002B6A +:1093600008D0012B04D0022B04D1012030BC97E798 +:109370000020FBE730BC704710B530F38EFC01498C +:10938000C86010BD7C5900B070B501250E4CAD040D +:10939000E5600E480078002802D003F0BDFF07E02A +:1093A0000120FDF7FEFAFAF7ECFB002021F31BFD8C +:1093B000A0682843A060012070BD03488168012295 +:1093C0009204114381607047009000A8C55A00B014 +:1093D00010B50400F8F750FD1C342104090C0028D6 +:1093E00001D0002201E00022D2430F4840F3AEFE3C +:1093F000002805D10D490868401C0860002010BDF8 +:109400000189081810BD10B5040000681C3840F32D +:1094100073FE0020206010BD11681C394881704720 +:109420001C38408970470000A05800B0C85900B0EF +:10943000002310B508E09C000C5B844203D11C485B +:109440009A00885210BD5B1C9342F4D310BD30B516 +:10945000002409E0A500555B854204D1A0008018D6 +:109460008170012030BD641C9C42F3D3002030BDCC +:10947000F7B59446040000260D4F12E00D7C491705 +:1094800001000000E08E00A0000200006BFDE61964 +:1094900029194988B94204D101996246FFF7D2FFE0 +:1094A00007E00906019A090E6346FFF7DAFF002874 +:1094B00000D06753761C0349B500605B491C8842A5 +:1094C000E6D1FEBDFE0F00000100897E01200029CB +:1094D00000D00020704701218140FF48014201D0A7 +:1094E0000120704700207047F8B5FC4C658BFB48A5 +:1094F00020308688E78B0020FDF7CCF9F84800681B +:1095000080471FF31DFC6583F44820308680E78385 +:10951000F8BDFEB505000CF31EF82C680600E01D32 +:1095200001AA02A921F3B2FD6B461989242919D198 +:10953000A088882358438019C078EA4E0028207AF2 +:1095400003D1C007C00F20D104E0C006800F1BD09C +:1095500001281AD1FAF7DDFC002815D1307801284E +:1095600012D812E0E04881420FD10820FDF2A0FDA0 +:10957000DE4900900160A1888180617A8171DC48B8 +:1095800001686846FDF2A3FDFEBD28000AF343FF13 +:10959000FEBD70B504000820206020001430882132 +:1095A000050040F344EC20009C306C21060040F3A1 +:1095B0003EEC002128003EF3D9FAA06001212800EA +:1095C0003EF3D4FAE060022128003EF3CFFA206196 +:1095D000002130003EF3FCFC6060C64800213EF3F1 +:1095E000C5FA0600C34801213EF3C0FA0500022077 +:1095F000A168C0433EF382FA206830602168296088 +:1096000071680020C0430860716800234860716879 +:10961000886072680021D16072681161726851615E +:1096200072680121916171683200C8616868B2494D +:1096300001606868B14941606868B14981606868E3 +:10964000B049C1606868B04901616868AF4941616B +:109650006868AF4981616868AE49C161A068290046 +:109660003EF3CAFCA34800213EF380FA0500A1485E +:1096700001213EF37BFA01002068086028606A68D7 +:10968000A54810606A68A54850606A68EF475C5C4E +:1096900001000000DC9000A00002000015E641A9D6 +:1096A000A44890606A68A448D0606A68A3481061C2 +:1096B0006A68A34850616A68A24890616A68A248D3 +:1096C000D0614A68A14810604A68A14850604A6861 +:1096D000A04890604A68A048D0604A689F481061DE +:1096E0004A689F4850614A689E4890614A689E480F +:1096F000D0616368002228003EF30EFD2000FEF2D8 +:109700000BFD70BD38B50500984C2000FFF74BFFEE +:109710004C20FDF2D7FC964900900160E1682022C0 +:109720004968083040F35AEB2069202241680098CC +:10973000283040F354EB2800FDF2A5FD01006846F7 +:10974000FDF2CFFC38BDF7B5402084B00F00465C79 +:109750000498FEF25BFC6C4802213EF311FA019082 +:10976000844800213EF33EFC029004980299406830 +:109770003EF31FFE644800213EF302FAB108039154 +:109780000160040040683200390040F3BEEA5E48E0 +:1097900001213EF3F5F903990160050039004068A5 +:1097A0003200203140F3B0EA029B00222900200061 +:1097B0003EF3B2FC0498029A806802993EF36BFE75 +:1097C000019A019902983EF3E9FC01983200416840 +:1097D000069840F39AEA07B0F0BD38B50400282097 +:1097E000FDF270FC821D00906048A11DFFF7ABFFE9 +:1097F0005F480099801C08602000FDF244FD0100D4 +:109800006846FDF26EFC38BD70B505000024FDF71A +:1098100010F859492868401807D0022803D12800B9 +:10982000FFF7DBFF0124200070BD2800FFF76AFF6F +:10983000F8E710B5FCF7FFFF10BD10B50400FFF20C +:10984000C2FB200004F0BDF810BD80794B49002810 +:1098500001D0FF2801D1002000E0012048727047AC +:10986000F8B526F3C3FB0700012464256543785D42 +:10987000002821D01C206043414946183079002837 +:109880001AD040492000096888470090B0783E49C6 +:109890000C235843096840188088009998B73EDC2B +:1098A00001000000D89200A000020000E10EFF14A9 +:1098B00040F332EC411C0098394A414312680904D4 +:1098C000090C20009047E91960310880641C2404C9 +:1098D000240C072CD3D9334900200870F8BD482147 +:1098E0004143314A10B58C1833F3CAF8002874D0BC +:1098F000200030F30FF9042140200155002055E0ED +:1099000018CF0000000A00A9C8F70004D0EA00043C +:109910007F200000C60C000004AA3400549C000400 +:109920004B60D2273E3CCE3BF6B053CCB0061D6513 +:10993000BC86987655BDEBB3E7933AAAD835C65A9C +:1099400096C298D84539A1F4A033EB2D817D0377D9 +:10995000F240A463E5E6BCF847422CE1F2D1176B74 +:10996000F551BF376840B6CBCE5E316B5733CE2B47 +:10997000169E0F7C4AEBE78E9B7F1AFEE242E34F76 +:1099800090EB00B0A60F0000DC9C00045BF0FFFF32 +:10999000C0BD0004B4B400044CF7000498EA00040D +:1099A0002CFC000427E9000470CA000430F315F809 +:1099B000C01C8001800930F374F9FB4B01221B6845 +:1099C00001002000984702002100022030F30FF927 +:1099D000F64A0221002021F375F910BD70B504008C +:1099E00030F398F800202FF3F8FF30F35AF9010014 +:1099F0000522200030F31DF9ED48F04D0378ED48C5 +:109A00002D680278EC4801782000A8473120005DDD +:109A1000A08570BD48214143F8B5E948E94F0D18CC +:109A2000012448206043E6494618B54218D0442036 +:109A3000805D052801D0092812D1F878210040F373 +:109A400073FF00280CD0E048005D012808D13100E8 +:109A5000280034F395FCB08D082CA88508D304E0C9 +:109A6000641C2404240C082CDBD32800FFF7B6FF69 +:109A7000288A26F3EEFA2876288A26F3F0FA687602 +:109A8000F8BD10B5040026F3BBFA64216143081841 +:109A9000407810BDF8B5050048235843C84AC94C62 +:109AA0008618C94801274155E078AF40C8BC4DB57C +:109AB00001000000D49400A000020000F8F6216428 +:109AC000B8430B00E07040F322EB060419040428AD +:109AD00028182800FFF7DFFF01280ED1B07E0028EC +:109AE0000BD1BE4803214155A078290040F326FF41 +:109AF000002802D1E0783843E070F8BD4420805D52 +:109B0000052803D0092801D00628F6D1B07E002808 +:109B1000F3D12800FFF788FFECE73843B049E07045 +:109B200000208871F8BDF7B54821050010004143B9 +:109B3000A84A012789180E008E463F214901511875 +:109B40004A7A8B789446A54A2036145C3A008240C3 +:109B5000002D1CD013438B701C233D004343A14FA9 +:109B6000DB199F78A04B1B681B88BD402B4202D19C +:109B7000634613434B729949012C1AD0019A022A69 +:109B800001D1052200E004220A5400210BE0934396 +:109B90008B7063469343914A042C4B7201D0052C81 +:109BA00007D100211154724691858D4A317551714A +:109BB00091718A49095CFFF777FF8C4800688047FC +:109BC000FEBDF8B5060000202FF311FF844F0500FD +:109BD00039690024884203D0854805631AF366FB7F +:109BE000082E3D610CD0102E06D01AF35FFB040640 +:109BF0001AF35CFB000404431AF358FB000204430D +:109C00001AF354FB2043F8BDF3B5040083B0794D3B +:109C1000687901283FD1784B00201A68C100565A54 +:109C20003607360F0A2E04D1565A36093601761CED +:109C30005652401C0004000C0E28EED3AE890120C1 +:109C40004002864201D9060002E0402E00D24026A2 +:109C500000202FF3CCFE07001020FFF7B2FF3100E9 +:109C600040F364EA781886016448B609EE64006837 +:109C7000008FC107624800D001210174017C01728C +:109C8000AA89E989019200912B7C5E4D01222D6801 +:109C900031000C20A8475C480078002813D0082029 +:109CA000FDF224FAFF215C310290016021780171FC +:109CB00061784171A17881710499C1716CF75E95E9 +:109CC00001000000D09600A0000200000C1E9FD9E9 +:109CD0005348016802A8FDF222FA05B0F0BD012147 +:109CE000444A8140107A884310727047F8B51025B5 +:109CF000404C4C4EA078002831D03C484B49427A29 +:109D00004948097800780843002A0DD0002803D17B +:109D100047480078012803D930206070257016E08C +:109D20003C206070042011E02027002801D06770DB +:109D300001E02D206070FAF714F9002805D0FAF739 +:109D400071F8002801D1277001E00C202070A07963 +:109D5000002803D13068C18E2943C186F8BD306820 +:109D6000C18EA943C18600206071A071F8BD012198 +:109D700081402048027A114301727047F1B582B0E8 +:109D800000240298858826F34FF906000298294B93 +:109D900001680027CA1A994279D05CDC264BCA1A9E +:109DA000994275D050DC254A891879D04E290DD1B9 +:109DB000234A244B5188994208D08079012805D143 +:109DC0005078002868D10800FFF7D1FFACE0000010 +:109DD00058F80004D7E733001CEB000404EB000440 +:109DE0000CEB0004A0F7000470CA000450D2000479 +:109DF00024EB0004CC5900B0B4B400041CEA000405 +:109E0000BCF7000400E800046CD2000428EA000457 +:109E100084EA0004ACD20004A4F70004C0E8000403 +:109E2000F4E7000464EA0004D7EA0004D8EA000476 +:109E3000D0EA0004BB0C00004F0C000009F4FFFF47 +:109E400048E90004FFFF0000072A23D0412A6BD114 +:109E5000FFF719FD68E01C2A68D009DC0F2A57D0EB +:109E6000142A61D107214156001DFFF7D7FE4AE0B1 +:109E7000232A41D0572A57D18288017A8079FFF767 +:109E80005CFE02988188C07930F3ADFC3BE052E083 +:109E900041E005E0808897E70800FFF720FF43E0F6 +:109EA0006420684380192030007D01280AD11C20DD +:109EB0006843FC4940180079002803D1FA49087822 +:109EC000401C0870F94901228878AA4036E5839D34 +:109ED00001000000CC9800A000020000CB079D8488 +:109EE00090438870FFF70CFF2800FFF702FF08205F +:109EF000FDF210F90028019020D0F2490160858020 +:109F0000F148016801A8FDF214F917E026F3CBF837 +:109F100002986423808858433754012402A8FDF234 +:109F2000FCF80BE0FFF7C4FCF7E7017D002905D042 +:109F3000E6494A8BE6498A4200D107752000FEBDFA +:109F400081798088FFF7C4FDE7E78088FFF7E5FCAB +:109F5000E3E7FFB50020A3B000210A000F9005A899 +:109F60001C0006C026F36AF8019024981C23007890 +:109F70001D90A1881C91E188A2891B92627A5943A5 +:109F800052081A92A27A1992E27B52081692CA4A91 +:109F9000891809791890259815910290FF220821B7 +:109FA00003A83FF3D2EE16F378FA002801D101207E +:109FB00001E016F372FA040016F372FA6100081A4F +:109FC000C10F0818C003000C0D900120109018ABB1 +:109FD000197DC04B259A1B6805A8984701242500C8 +:109FE00002E0641C2404240C642060430199085C92 +:109FF000002801D10B2CF4D30B2C79D10020109028 +:10A00000C5E1B549200009688847002871D01C982F +:10A010008442FBD01C206043A74940180079159961 +:10A02000884266D164206043019940182290C07C28 +:10A03000012810D11A9925983FF3B8EF22980E0005 +:10A0400040691A993FF3B2EF8E42EAD16B46987D90 +:10A05000401C987596E122981A998069884201DB24 +:10A060001A9801E00006000E1B9917900120102994 +:10A070000BD01B99202908D01B99CA1FF93A04D08C +:10A080001B99CA1FFF3AFA3A00D103201699229A67 +:10A0900041180E06928B360E0121102A07D0202A75 +:10A0A00005D0D31FF93B02D0FF3B5B1E00D103213B +:10A0B000229A2032927852181206120E43181392E6 +:10A0C0000DE0139A8A4205D9139A521E1206120EF7 +:10A0D000139204E086424CD9761E3606940F50F94E +:10A0E00001000000C89A00A0000200003FEF2339E1 +:10A0F000360E179A934246D8139A179FB218BA424F +:10A10000E9D840E045E143E0139833E025982190F9 +:10A11000801920901799401E3FF352EF22980F00AC +:10A1200041691298401E1F90081817993FF348EF95 +:10A130008F421CD16B46987D0025401C9875219953 +:10A140000298884204D122981F994069401801E082 +:10A150002098401E0121490688421A99259003DB68 +:10A160007F2252068018FFE73FF32AEF1D911F98C8 +:10A170000006000E012D129002D112980128C5D2BE +:10A18000761E3606360E012D02D1012EBCD203E01A +:10A19000002D7ED0012D7DD16420604301994618A9 +:10A1A0003420805D002875D00428FCD0504A0D99D9 +:10A1B0001268200090470C901C20604343494718C8 +:10A1C0003879002803D14B4800780028E3D1403685 +:10A1D000B0881A99884201D31A9801E00006000E4F +:10A1E0001790012014901B9810280BD01B98202842 +:10A1F00008D01B98C11FF93904D01B98C11FFF3923 +:10A20000FA3901D1032014903B492000096888479E +:10A2100011901598002804D13879002801D0022027 +:10A220000C90364901200978002900D070890C99DA +:10A230000818401E0004000C0B900020089001201C +:10A240000A907DE00020099025990A9801260818B7 +:10A250001E9069E01E981799401E3FF3B2EE1198C8 +:10A260000F0080191799401E3FF3AAEE8F4253D179 +:10A2700008986B46401C0004000C0890187D0025CF +:10A28000401C18751E480168002908D02000884726 +:10A2900001E081E058E0002801D0012000E000202A +:10A2A0006B46997D401898750A9914980C9A401A33 +:10A2B0000B990006000E891B1018814222DB1998A9 +:10A2C000F82823D10C98864231D91FE0B4B4000499 +:10A2D00070EC0004CC5900B015140000E4A6340062 +:10A2E000A0AD0004FFFF000034FC00043668E282E9 +:10A2F00001000000C49C00A0000200002617FD49D8 +:10A3000068FC000464FC0004D1EA000448F700047F +:10A3100020E9000490E600040C990998884210D3C3 +:10A320006B46587D0125401C58750AE00998401C71 +:10A330000004000C761C3604360C09900B988642FB +:10A3400092D90A98401C0006000E0A90089800282E +:10A3500004D10A981499884200D87DE70B2C03D0C9 +:10A36000002D01D1FF484578012D1FD1641C240424 +:10A37000240C642060430199085C002801D10B2C57 +:10A38000F4D30B2C0FD1F7484078002808D0F64AB8 +:10A390000021126805A89047002801D0012000E0A4 +:10A3A0000020109005E0012D00D13EE60B2C27D1B6 +:10A3B0001098002824D11598002821D11B9901203C +:10A3C00010290BD01B99202908D01B99CA1FF93AD4 +:10A3D00004D01B99CA1FFF3AFA3A00D103202599ED +:10A3E00018AB0E911A7DE14B1A991D680EABA84768 +:10A3F000002800D00120012810900F9000D10124E6 +:10A40000DB4A03A9126805A89047109801281DD1BE +:10A41000259818AB401C2590197D1A9A491C0906ED +:10A42000090E91421D9101D100211D9118AB197D9A +:10A43000189A914201D1002110911A9A0299891813 +:10A44000814203DD1098012800D1D4E50F9800283F +:10A45000C448407815D0002802D10B2C27D006E044 +:10A46000C14A0021126805A8904700281FD0C14B9F +:10A4700001201B6825AA1DA99847012817D10B2484 +:10A4800015E0002813D0B84D00212A6805A8904790 +:10A4900000280CD02A6807A903A89047002806D0F6 +:10A4A0006B46187F002802D1D87B1D90E7E72398E0 +:10A4B00018AB04802498197D017027B0F0BDF7B562 +:10A4C00084B005000BF38DF8AB49040068000F5A07 +:10A4D00088266E438821A05D794303910290605CD9 +:10A4E000022805D0A5488189A943818107B0F0BD24 +:10A4F0000220A055069A05992800FDF2EA71BBB921 +:10A5000001000000C09E00A000020000D2FF43F442 +:10A51000D9F80298A05503980019007D0028EFD1C2 +:10A52000380001A91BF3F7FE0028E9D0984801780C +:10A530000029E5D0974909688A686B4619798B002C +:10A540001B18DB69D21A9201192392095B019A4206 +:10A55000D6D98089E840C007C00FFDF289F8CFE75F +:10A56000F8B5820006008C480D00101801228256B2 +:10A570000021AA4201DB002404E002228256AA4202 +:10A580001BDC0124C278A24200D001210029C47042 +:10A5900013D0300006F335FF00280ED00820FCF25F +:10A5A000D7FDFF2182310090016086808471C571E2 +:10A5B0007A4801686846FCF2DAFDF8BDF3B5002080 +:10A5C00083B001902FF345FA00900BF314F80125A6 +:10A5D0001C246C437248015D00296FD020188778D5 +:10A5E00070490C2078430968085A6F4900040968CB +:10A5F0000016884706006A48005D032807D1280036 +:10A6000002A91BF388FE002801D0012000E00020F1 +:10A6100000280CD06B46187A62490C23584309680D +:10A62000085A6149000409680016884706005F4817 +:10A63000C419A07D012803D0032801D0042857D1D4 +:10A640000AF3D9FF88216943081816303B2120F30B +:10A6500055FB0200012050490190A800085C002829 +:10A6600046D15249B8004018816C4B1C0BD0009B5E +:10A67000591A4E4B890140339B888909994202D36C +:10A680000021C943816404998E421ADAA17D03290D +:10A6900017D00221A175009B002A83640FD03920B6 +:10A6A0000257424818232030C356921B9A4200DCBE +:10A6B00001213F4A28001268904717E02CE0012151 +:10A6C00011E003998E4211DDA17D04290ED0816C29 +:10A6D000491C0BD10221A1750099002A816401D087 +:10A6E0000021E6E7002128000AF3FDFC3920065589 +:10A6F000304B31001B68A27D38009847280006F3D4 +:10A7000080FE002808D02449A800085C1E23F71DFD +:10A7100001000000BCA000A000020000DA20B22965 +:10A72000002803D031002800FFF724FF6D1C2D0402 +:10A730002D0C082D00D255E70198002803D0FCF21B +:10A7400075FF022803D1FCF271FF012807D11F48D1 +:10A750000068804700221E4913002DF35FFE05B0FC +:10A76000F0BD70B50C211B481B4C81720B2141714F +:10A770000A2141740921C171002565712D20A5713F +:10A78000607020202070E560A57027E020E90004BB +:10A7900038FC00049CF3000430FC0004ACF300041B +:10A7A000E8B500045099000478EA0004FCB5000400 +:10A7B000F4E70004B4B4000498EA0004D8F50004F7 +:10A7C000B4C7000430F400043CFD0004E0F60004CB +:10A7D000470C00002CEB0004CC5900B031F3E8FF2B +:10A7E000FF4840213FF37CEBFE4820213FF378EB0C +:10A7F000FD480068018CC908C9000184018C02224F +:10A8000011430184C18E10229143C186F448602116 +:10A81000403065813FF364EBF4491920887225725A +:10A8200070BD70B50D001400012A07D9401B001936 +:10A83000401E21003FF3B6EC4443601970BDF8B5EB +:10A840000C00070015001E0025F320FC642179434D +:10A85000081840308188218041892980C089308052 +:10A86000F8BDF3B583B00398DD4F0468258A002C4A +:10A8700065D0200030F333FDE16940180499081ACF +:10A880005DD4002620002FF38BF9ED00785D0028C1 +:10A890003BD0ED196868E16901AA471A208A02A92C +:10A8A0006B46FFF7CCFF002F12DC6F686B461A89EE +:10A8B00004983900FFF7B5FF68600C22012062821E +:10A8C000A0850020E08204983900FFF7AAFF0FE07E +:10A8D0000C2F09DA68686B46E061188960829888F5 +:10A8E000A0851888E08204E0049920002FF35DFA27 +:10A8F000E06120002FF354F90020E0764420025D4F +:10A90000E16920002FF3DBF908E0B94B049A1B68DA +:10A91000039821009847E069E9194860CB9EC0F58B +:10A9200001000000B8A200A0000200002EC80C9494 +:10A93000A07E002804D020002030867B0121817376 +:10A9400020002FF3A1FBA07E002801D02034A673A5 +:10A950000FE7E07E0128FBD1E800385C0128F7D042 +:10A960000020E07605E7FFB583B048230F00039889 +:10A97000A54958430C9E40180D9D02902FF31AF9DB +:10A980000398C4009B480C2E14D9012101553800AE +:10A990009E4F06D006982FF3D4F996496118486067 +:10A9A00002E00598002809D10C26012500200E9010 +:10A9B000B86905E00021002F015504D10298C06953 +:10A9C0002FF3BCF906900E9A914C009224682B004C +:10A9D000069903983200A047A6E510B514001A00A6 +:10A9E000002C05D18B4B1C5C042C01D0052C03D111 +:10A9F000894B1B68984710BD33F39AFB10BDF7B520 +:10AA000084B004000F0025F34BFB050000202FF35A +:10AA100034F8482161437C4A804B89181C226243E8 +:10AA2000D2186423634312795B193425ED5C002D41 +:10AA300012D0012D1DD0022D29D0042D06D19D88C4 +:10AA40005A78010020002B00FFF7C7FF069A390053 +:10AA5000200024F3C3FC67E549680029F6D0002AEA +:10AA6000F4D19D885A78010020002B00FFF7B5FF34 +:10AA70005AE518004030C289418980886D4607C573 +:10AA800039009B6B069A2000FFF76DFF4CE5594E8D +:10AA90000020E5007055986B2FF353F9A919486011 +:10AAA000D4E711B583B003995D4A08680024801883 +:10AAB0000DD1887901280AD1083168461BF3F1FDD0 +:10AAC00058480C220068694610301BF345FC2000F2 +:10AAD00004B010BD10B501680022FF397E3900298D +:10AAE0000AD0514BC91812D18188504B8900595C4A +:10AAF00001290CD182720AE08179002907D081886E +:10AB00001C235943454BC9188B7849495A542DF396 +:10AB1000ECF810BD474910B509680A8880239A43AC +:10AB2000454B1B78DB09DB011A430A80599DEFE88E +:10AB300001000000B4A400A0000200003730D2E4FD +:10AB40002DF3B3FD10BD334A70B52032404C527A1C +:10AB50002578002A01D00122227031F387FC25706C +:10AB600070BDFFB581B04823002501982B4F584395 +:10AB7000C419A17E0298814219D12E20005D0028BF +:10AB800015D10398012801D1012601E00026F643E2 +:10AB9000019822F376FD2F49884208D04823584374 +:10ABA000C419206A80192062E0698019E06140348C +:10ABB0002079042802D104250220207101A80FC8A1 +:10ABC00031F325FF042D01D104202071DBE570B5A0 +:10ABD0001D0406000C002D0C0AF32BFD0100022EB3 +:10ABE00040D1132D3ED1A088882242435118097DBF +:10ABF000002937D118490978012933D9E17913227D +:10AC0000C907C90F212329E0F0EA00B038D30004B6 +:10AC100064EA000430D2000460F8000470CA000442 +:10AC2000B0D10004ACF7000424EB00048CF700045E +:10AC3000B4B40004F4F3FFFF88EA00040EF5FFFF4C +:10AC4000FCB50004CAC7000470EA0004E7E9000488 +:10AC5000D1EA0004FFFF0000D0EA000420F30CFB5F +:10AC6000012070BD002070BDF8B504000D00FE4845 +:10AC70004079012810D1FD4B00201A68C100565AB6 +:10AC80003607360F0A2E04D1565A36093601761C7D +:10AC90005652401C0E28F0D30820FCF277FAF449F3 +:10ACA000009001602178017161784171A178817112 +:10ACB000C571F04801686846FCF277FAF8BDEE48C5 +:10ACC0001CB56946006810301BF37BFDEB4801683A +:10ACD0000D200856EA490968884701006846FFF7D1 +:10ACE000C3FF1CBDE4481CB5694600681C301BF35B +:10ACF00068FDE24801680D200856E1490968884767 +:10AD000001006846FFF7B0FF1CBD10B50198DD4992 +:10AD10004008884202D11BF3F2FA10BD1020FEF762 +:10AD2000A0FF10BD10B52FF3A3FBD7484188912990 +:10AD300001D99121418010BD70B502007B2FD07BDD +:10AD400001000000B0A600A000020000C3D86C59AA +:10AD5000548A0800012C08D9D5692100401B00192C +:10AD6000401E3FF36AE94443281970BDF7B584B02B +:10AD700004001700066B456B008A19F3F4FB384397 +:10AD800000D001200690069A0599200030F3DEF8E5 +:10AD90004020005D032827D1200020300390C77F8A +:10ADA0000297608A0190474305983900401BC019FB +:10ADB0003FF342E97843471967630698002811D0AA +:10ADC0000398857F01980095454305982900801BCD +:10ADD00040193FF332E9684380192063009A0299D1 +:10ADE000914200D838000BE605992000FFF7AEFF2E +:10ADF00006E6F8B506002EF333FD0A21714305007F +:10AE00000C18603C207C012821D1607D00281ED0D8 +:10AE10003000FDF2CEFE07000100300016F080E9A0 +:10AE2000002810D0390030002EF349FD0A20784365 +:10AE30000021401960382174017461754175380032 +:10AE4000FDF297FE06E0300016F06EE902E03000F9 +:10AE5000FDF2C7FE0020F8BD38B50C001100049AC1 +:10AE600000920A0021002DF31FFD8D48610100684A +:10AE7000091888888B4A1278002A04D0562256284E +:10AE800000D9020010008880488138BD86480088BB +:10AE90004007C00F7047844930B50400098800207E +:10AEA0001422114001D0012030BD804D0A224A43B6 +:10AEB0005219137A022B02D15288A242F3D3491CB1 +:10AEC0000904090C0229F1D330BD0C2358437849F9 +:10AED00040180089704700B5008AFFF7F6FF9042DE +:10AEE00001D9012000BD002000BDFFB583B00C00DA +:10AEF0000D002035C8690290287D0190C87E00268B +:10AF00003700002828D1218A6A4A505410002F386F +:10AF10008179002920D0218A80783FF369FD0028BB +:10AF20001AD0644A01202F3A51894003A37E8143FD +:10AF30000120002B00D000204003014348040121E0 +:10AF4000400CC903401850815079297DFE0D5BFAF1 +:10AF500001000000ACA800A00002000004C16E04C3 +:10AF6000814200D30800012637005071069B059AE4 +:10AF70000398210030F3AFFD0090208A52490A5C0B +:10AF8000521C0A54208A19F3ECFA002804D0A08934 +:10AF900080088000401CA0810298002E00D1E0694A +:10AFA000002FE06105D001982875002801D0401ECF +:10AFB0002875454E218A2F3EB0783FF323FD0028A7 +:10AFC0003AD07079002801D0401E7071208A3F4924 +:10AFD000095C052905D1707900282DD00320E07681 +:10AFE0002AE0B179012927D1A37E01221100002B8B +:10AFF00000D00921344B1B5C8B420DD91C235843D4 +:10B0000033490A2340188078324958430968085A5E +:10B01000800701D5A2850FE0059906222000FFF7E1 +:10B0200064FF002808D0287D401C2875A08D401C96 +:10B03000A0857079401C70710098EBE4FEB50D009E +:10B040001600847E099A0899002C09D1078A1F4CA2 +:10B05000E45D042C01D0052C02D103200870FEBD54 +:10B06000019200913200290031F354F9FEBD10B570 +:10B07000040025F333F864216143425C002A04D0C4 +:10B0800008182030007D012800D0002010BD0000ED +:10B090006CD2000428EA0004CF0C000000AA34009F +:10B0A00088EA00048CEA0004D8F50004AF81190096 +:10B0B00030D2000474EA0004CEE800047AEC000404 +:10B0C00048D6000430EB00B0FB5900B024EB00047C +:10B0D000B4B4000490EA0004F0B587B00021FB4846 +:10B0E000FB4D8170012001AC482141434200121800 +:10B0F000491920314E7CA65412190B7C401C0004C7 +:10B100005370897C000C07289170EDD92FF3C1FA98 +:10B110000126370048217143ED480D18300024F313 +:10B12000E5FF002825D02FF368FA002821D0E94850 +:10B130003100C0783FF366FC002837D0E648805DD8 +:10B14000042801D0052831D124F32CFF002805D193 +:10B15000DE4938008A78B04010438870189D3E5808 +:10B1600001000000A8AA00A000020000F029D0B948 +:10B1700070008019215C20350019697441782974A8 +:10B180008078A8741CE0300024F3CCFF002804D1A0 +:10B190003000FFF776FF002812D01C207043D449FE +:10B1A0004018007900280BD14420405D042805D0C8 +:10B1B000288AD049C000085C012801D12F766F761B +:10B1C000761C3604360C072EAED9FEF7F3FD2BE4C1 +:10B1D000F1B500250126C2494D71C14F3100B87843 +:10B1E0003FF31AFC00283AD048207043BD49441868 +:10B1F00020002EF307FD3800807901282FD0BA48AF +:10B200003100407A3FF308FC218AB84A515C052995 +:10B2100017D02737002800D1083F1AF34FF828210C +:10B2200071434018407821002031385C0A000875CD +:10B23000A17E00290BD00A210A2800D9010011752E +:10B2400005E03C21002800D12D2134200155342077 +:10B25000015DA3484279891841714078A085761C28 +:10B260003604360C072EB8D99D4FB879012806D080 +:10B2700078793900401E0006000E787109D13878BF +:10B28000801C06060098360E8019F8600220B871FE +:10B2900002E00026012088710124B87821003FF3E4 +:10B2A000BBFB00281CD0482161438E4808180021B0 +:10B2B000C176BA79012A08D1002D00D10500884A4B +:10B2C00018321219203AD17703E0012134221154A7 +:10B2D0008185A84204D00099052289192EF321FD09 +:10B2E000641C2404240C072CD7D9002D04D0009909 +:10B2F000052228002EF315FDF8BDF0B518231C26F5 +:10B300007D4A002552785A43764BD2180B23DB0135 +:10B31000D218146A028A764B5643F3189E789C46DC +:10B320000C237343754E36689B199B886E4E203EE6 +:10B330007688B34204D9836BCB1AB34200D9012576 +:10B34000002C0BD0E38E934204D1C2698A1AB24218 +:10B3500000DB0125628A012A00D1002562461279AC +:10B36000002A0BD09122002C03D0638A8604171187 +:10B3700001000000A4AC00A000020000E9D10EC949 +:10B38000032B00D82822FFF7C4FD002800D0012598 +:10B390002800F0BDF7B582B004000020019019F339 +:10B3A00097FF218A2823594340185A494078097841 +:10B3B000884208D3039919222000FFF7AAFD00282C +:10B3C00001D0012000E0002000904A48218A8078C6 +:10B3D0003FF32CFB002804D103992000FFF797FFCF +:10B3E0000190464D218AA8783FF320FB0700218A6F +:10B3F000E8783FF31BFB250006004035002809D004 +:10B40000208A3F49085C012810D0032802D12879FE +:10B4100009280BD03748218A80783FF307FB0128A1 +:10B4200004D0002F04D02879092801D1012000E0A0 +:10B43000002001990027002923D0002E04D0218A62 +:10B440002F4A515C01291CD020002EF3E5FBE77642 +:10B45000A07E00280FD13048417800290BD1807898 +:10B46000002808D1208A19F39CF8002803D1618AAA +:10B47000039808180390352029790155039906226D +:10B480006AE0E17E019A009B0A4303431A4352D0CB +:10B49000A28DE069039B82189A1A68D420002EF3CB +:10B4A000BBFB002E49D01348218A80783FF3BEFAB7 +:10B4B000012803D10398FFF795FE06E0174BE776C6 +:10B4C0001B68049A0399200098472879052832D1EF +:10B4D000208A0B49085C03282DD10C481823407999 +:10B4E000054958430E4E40180B21C9014018056A02 +:10B4F0001FE00000CC5900B070CA000450D2000414 +:10B5000024EB0004B4B40004F0EA00B02CEB000417 +:10B5100098EA0004A2E5000478D5000418F70004B6 +:10B5200078F70004A54203D0326829002000904734 +:10B530002D68002DF6D105B0F0BDF848016800294E +:10B540000ED0208A884700280AD0E7760399200089 +:10B550002EF367FC049A010020002EF3ECFBEAE7CF +:10B56000EF4B049A1B68039920009847E3E70029F2 +:10B57000E1D0A17E002918D1002E16D06E51DD3DFC +:10B5800001000000A0AE00A0000200001D39B07450 +:10B59000218AE94A515C012911D1060020002EF3CD +:10B5A00045FBE7762879052802D1E169049ADDE7B1 +:10B5B000049A039920002EF3C8FBE661C5E7DF4D2E +:10B5C000A8790128C1D1218AA8783FF339FA012846 +:10B5D000BBD120002EF32AFB6879002803D1039801 +:10B5E000FFF70AFEB1E7E776E1690522BEE7F3B5AA +:10B5F00081B006000768027A02993800FFF7D4FE8E +:10B60000012448216143CE480D184420405D317A21 +:10B61000884213D1AF4211D0298AC748405C042820 +:10B620000CD005280AD0C748C0783FF309FA002893 +:10B6300004D0327A0299280030F33AFD641C2404C5 +:10B64000240C082CDDD3FEBD70B50025BE4C256052 +:10B650002EF302FCB9494879002803D148894004F7 +:10B66000400C4881B7481723A038C06949898288AF +:10B67000DB029A4319400A438280B44820600120CB +:10B6800070BD70B50400AC48055D200032F373FC5A +:10B6900029002000FEF78AFA70BD70B50400AC4D99 +:10B6A00000202860200032F37FFDAA482860A248CD +:10B6B000015D2000FEF77AFA012070BD0121814072 +:10B6C0009E488078014201D00120704700207047D9 +:10B6D00070B50D00A049060040000C5A290030004A +:10B6E00019F348F8002E0ED09C49680604D50C20AA +:10B6F00060430A5C521C0A54280604D50C2060439F +:10B700000A5C521C0A5470BDF8B52EF370FB8B49CD +:10B7100005004A6990423ED0904F01244D612000BF +:10B7200018F378F90078002830D01C2060438C4949 +:10B730008C4A401880781268010189188A4AC00032 +:10B7400012688018C088002801D1012000E0002084 +:10B75000C0000818C688200018F32DFF00280CD060 +:10B760000C216143C8194278795C8A4205D141882D +:10B77000B14202D14168691A07E00C206043395C8C +:10B78000C01941704560002146800181CF98E38651 +:10B79000010000009CB000A000020000632217C45A +:10B7A000641C2404240C072CC3D9F8BD10B5744CB8 +:10B7B0000023237030F38EFA90E4654910B5C87108 +:10B7C00031F340FD8AE410B52EF31EFD6248604956 +:10B7D00080388079C979084301D1FFF79FFF7DE464 +:10B7E00070B51C00CB7E002B18D18B7E002B15D0A2 +:10B7F000644B5D7818236B43564D5B190B25ED01A7 +:10B800005B191B6A0125CA61002BCD7604D05B8AC7 +:10B81000032B01D8072300E015238B85230030F389 +:10B820002BFA70BD70B50D000468E07E002816D0BC +:10B8300029002000FFF77FFD002804D0A18DE069DA +:10B840004018281A0BD420002EF3FAF90020E076D5 +:10B85000608A41193520025D20002EF380FA70BD08 +:10B86000494949780840704703003B4800B5407A91 +:10B87000FFF7F6FF002806D0998A0720072900D293 +:10B880000800988200BD41480088FAE73048007AF5 +:10B89000002800D001207047F7B504001600807E14 +:10B8A0000025002821D13A48007801281DD94020E0 +:10B8B000005D002819D1208A18F387FE002815D1D1 +:10B8C000314F208A01227978824011420ED1314ACB +:10B8D0000199126890473979884207D3618A01E05B +:10B8E00005042D0C4819B042FAD365E0608A410086 +:10B8F000B14261D82849294A0978127811435AD1AE +:10B90000207E617E00264018E18A4008002901D18E +:10B91000A18D00E0A18A401E081803041B0CFFF74C +:10B92000B5FF002802D05B1C1B041B0C608A9842E8 +:10B9300000D203000648007AFFF792FF00282FD0BC +:10B940000A2634E090E600040CF8000424EB00041E +:10B95000CC5900B070CA000450D200044CF8000466 +:10B9600059AF000080F70004ABAF0000E8B5000459 +:10B9700030EB00B0B4B4000450EA000440EA000424 +:10B98000D9EA00042CEB000478D5000472EC000422 +:10B99000D0EA00041CF70004D8EA00040646682F29 +:10B9A0000100000098B200A00002000097CAA97927 +:10B9B000D7EA0004FC488078FFF75CFF002800D03D +:10B9C0000826608A9919814200D905002800FEBD29 +:10B9D000FFB583B00C0005001F008889F34980087B +:10B9E000C97A80000843A08120002EF3E4FFA28DD5 +:10B9F000082100913B0021002800ED4D01922D68A7 +:10BA0000059AA8470290E07E00286BD1208AE16960 +:10BA10008200E8488150208A18F3E1FDE64A0126B9 +:10BA200000280AD01178208A0B00C340DB0704D11C +:10BA3000330083400B43137005E0218A30008840B7 +:10BA40001178814311702000FFF718FF22680599D3 +:10BA500020002FF3C3F9D94818234079D849584317 +:10BA600040180B21C9014018026A059920002FF3E4 +:10BA7000B5F9A18A3000012900D90800D149A08276 +:10BA80000978012907D9618A062904D8A18D88423D +:10BA900000D30800A082250040352879042804D16D +:10BAA00024F3B2FA002800D0A6826878012809D1D0 +:10BAB000E08A002804D0A08AA18D884200D9AE7007 +:10BAC00000206870A878012805D1207E617E40188A +:10BAD0004008B84202D32878002802D00320E0763C +:10BAE00000E0E676029807B0F0BDF7B582B00D0031 +:10BAF000272204992800FFF7D9FE0499B24B411878 +:10BB00001B68002228009847E86101262800403081 +:10BB1000019048207043AA494418270040373879DB +:10BB2000042801D0022864D1A54262D00199097984 +:10BB300081425ED1A54A2100126828009047002862 +:10BB400057D0298A228A9B4B8E46944689009200C0 +:10BB500059589A580120891A002900DC0020A97E32 +:10BB600000231A00002903D0A98F012900D1012246 +:10BB7000A37E0021002B03D0A38F012B00D1012134 +:10BB8000002907D08C4B61461B78CB40D90701D0E8 +:10BB900000280BD0002A01D1002807D1864A71461F +:10BBA0001278CA40D1070AD1002808D0949383B5EF +:10BBB0000100000094B400A0000200008E3277095A +:10BBC000E969864B491C1B68002228009847E861F8 +:10BBD0001EE020002EF348F80020E076A18FA1851A +:10BBE00080497E4B0988A182B87001207870E16994 +:10BBF0001B68491C002220009847E06101003A7947 +:10BC000020002EF3C0F8761C3604360C082E8AD39A +:10BC10000020E876A98F734AA9851288AA82019A22 +:10BC2000012490700198447064486A8A20384088E2 +:10BC30009200904200D31000AA7E0004000C002A5B +:10BC400009D1298A8A0060498958049A511A814287 +:10BC50001DD800241BE02A8A1C235A43624BD218A9 +:10BC600092780C235A43614B1B68D2189288824207 +:10BC700001D9012400E00024012908D1FF22049900 +:10BC800091322800FFF76DF9002800D0012404222A +:10BC9000002C00D10222E96928002EF374F872E426 +:10BCA000F8B515001E00482343434A4C069A1C1958 +:10BCB000009233002A0032F3C5F92089802108431D +:10BCC0002081F8BDFEB50D001F0048234343414CC1 +:10BCD0001600099A08991C19019200913B00320044 +:10BCE000290032F325FA2089802108432081FEBDF6 +:10BCF000FEB50D001F0048234343364C1600099A39 +:10BD000008991C19019200913B003200290032F37E +:10BD10009BFC2089802108432081FEBDF8B51500D9 +:10BD20001E00482343432B4C069A1C1900923300F3 +:10BD30002A0032F3BBFC2089802108432081F8BD12 +:10BD4000FFB500209FB000210A000C900B900A90D4 +:10BD5000099007A806C024F3FDF9049020981C233D +:10BD6000006810902298204980881C902298FF2219 +:10BD7000408945082298807912901C9858434018B1 +:10BD800000791390082105A83EF36AE800210A0013 +:10BD90000B000C0015A81EC0012064214143049A29 +:10BDA00089180A7B012A2ED14A7B012A2BD11C9AA1 +:10BDB00090421DD12299098A22E00000178801A330 +:10BDC0000100000090B600A0000200007ADAC9B4B9 +:10BDD00050D20004C0BD0004F8F7000438D30004BA +:10BDE000C6EA00042CEB000470CA0004D0EA000488 +:10BDF00058F800045CF8000472EC0004B4B40004C9 +:10BE000098EA00043422525C002A06D0042A04D0A6 +:10BE10004031C989420015AB9952401C0006000E02 +:10BE20000828C4D3FF48007D01282DD1FD4E1C23D6 +:10BE3000F08AFD4958434018317E00794C08717EE4 +:10BE4000490800280B9104D12DF37BFE11900A9034 +:10BE500003E00AAA11A92DF3A1FEB07E21F3B2FDE1 +:10BE6000012802D10B990A9804E00A980121490699 +:10BE700048400B993EF330E9601AA14201DD0B996D +:10BE8000401811990818099010980F900D900120F2 +:10BE90001B902806000E1E900F9AE44B501B0F902B +:10BEA0000E9210921B681E9907A89847002401263D +:10BEB0000E991098884205D00F9B421AC31A9A42D5 +:10BEC00000DA0F91641C2404240C0B2C0E900FD16B +:10BED000D7488078002808D0D64A0021126807A8E1 +:10BEE0009047002801D0012000E000201B9013E1C2 +:10BEF000012C11D1CB4B187D01280DD19A8B0999BA +:10BF00000B986F4607C70EA9CB4FD88A3F68139A84 +:10BF10002B00B84701282BD0C84920000968884762 +:10BF200000283DD0139800280AD01C206043BE4949 +:10BF3000401800791399884202D11298F8282FD11D +:10BF4000BF4920000968884764216143049A6F460D +:10BF50008B18010098699A8B0006000E07C72B000A +:10BF6000B54F139A3F6820000EA9B847012817D192 +:10BF7000AF486B468678187F401C1877B148016837 +:10BF8000002908D101E0012000E000206B46997FE4 +:10BF900040189877BBE01C9888470028F5D0F2E756 +:10BFA00022988088A042F5D0642060430499471805 +:10BFB0003420C05D0028EDD00428EBD01C98642309 +:10BFC0005843049940189D491D900968381DC9A21D +:10BFD000010000008CB800A000020000BDC3CBE946 +:10BFE000008C88470028139805D0002805D01298A7 +:10BFF000F828D9D11DE000281BD11C2060438F49AF +:10C0000040180079002814D11D981D99007B497BA8 +:10C010007A7B4018229940088989401E4018397B54 +:10C02000000489184A084A21C95B000C521E5118A5 +:10C0300017E01D981D99007B497B7A7B4018397B5E +:10C0400040088918139A4908002A02D0801C00046D +:10C05000000C1C226243794BD2181279002A02D0BC +:10C06000891C0904090C1C9A15AB52009A5A101825 +:10C070000004000C1A906000185A4018000475491A +:10C08000000C19900968200088474037BA88AA42F6 +:10C0900021D3219A1099891A00E049198142FCDBC9 +:10C0A00000E0491B8142FCDC1A9A8A18531E834225 +:10C0B00003DB6449101A8E782AE0199A491982180C +:10C0C000521E8A422DDB091A5E4A1A989678081881 +:10C0D0001EE0801A02E0109B2199591A8142F8DB78 +:10C0E00000E010188142FCDC1A9BCB185F1E8742CF +:10C0F00003DB5449181A8E780AE0801A199A8218BC +:10C10000521E8A420DDB4F4A081A1A999678401837 +:10C110000E996B46081A800180090E90187F401C0A +:10C120001877012E00D1CDE60B2C3BD113980028B7 +:10C1300038D16B46987F002834D11C992298490049 +:10C1400015AA515A8089642341181C98049A5843AF +:10C150006B468018027B407B101840081A8E401EE8 +:10C160003E4B081800041E68000C29000EABB047B7 +:10C17000002817D001216B461B91197F491C1977A4 +:10C180009A7F0121022800D0002150186B46987731 +:10C190000E991098884205D00F9B421AC01A82420D +:10C1A00000DA0F912E4A05A9126807A890471B983C +:10C1B000012811D10D98401B06D40F99884200DA4E +:10C1C00074E600201B900AE00D9A0F999142F7DD6A +:10C1D000012189064018F0E71B980028FDEF44F57F +:10C1E0000100000088BA00A000020000492B75542D +:10C1F00017D10B2C18D00023012015AE4100725A24 +:10C20000002A02D0521E01237252401C0006000E6A +:10C210000828F3D3002B04D001201B900D980F9019 +:10C220004EE61B980128D5D00B48807800282AD0EC +:10C230000A4D00212A6807A8904700282CD02A68B8 +:10C2400014A905A89047002826D015E0A0BD000439 +:10C25000B4B4000434FC000420E9000438FC0004F9 +:10C2600058FC000468FC000448F7000490E6000451 +:10C270009CF3000430FC000410AB187C00280BD1A8 +:10C280000698109007E0FC4B02201B6810AA0CA92E +:10C290009847012800D10B241F98048020981099FA +:10C2A000016023B0F0BD70B50400080016002DF346 +:10C2B000C0FD050030002DF3BCFDF04E2D1A01220B +:10C2C000482050438019416800291BD02E21095C69 +:10C2D000002917D0817EA14214D1016A691A09068A +:10C2E00009160FD00562C3695B18C36144231B5C48 +:10C2F000022B01D0042B05D1036B5B180363436B46 +:10C3000059184163521C1206120E0B2AD8D370BD65 +:10C3100010B530F36EFEDA490B68198800290BD18D +:10C32000CA00D21894886404640C9480491C0906DD +:10C33000090E0E29F4D310BDD249497DC900C91890 +:10C340008A885204520C8A8010BDF8B50C00C97E50 +:10C3500000291CD1250040352979072917D1CA4E5B +:10C36000B178002913D0F168891A10D40127BF02CF +:10C37000B9420CDA20002DF395FCF1682A79C91C2A +:10C3800020002DF31EFD0120E0760020F8BD2100E5 +:10C390002FF3EEFAF8BDF8B58446BC4DB94CCF7E0C +:10C3A0002E782034002F06D1607A002801D0082092 +:10C3B00000E010208885B64F3878012804D1A07895 +:10C3C000002801D00120287060462FF3A7F93978A2 +:10C3D000012903D1A178002900D02E70F8BD70B5D5 +:10C3E0000400A94D1000002617350029B12B358611 +:10C3F0000100000084BC00A00002000050D3AB2468 +:10C4000009D0FDF74EF9002801D1012607E0218A65 +:10C410000020485503E0208A415D491C4155200019 +:10C42000FDF738F99D49002804D0207E627EC97846 +:10C43000801811E0208A1C2358439B4A0C23801843 +:10C4400080789A4A5843126880188088142807D246 +:10C45000207E627E097980184843C005000E00E006 +:10C460002D20218A495D814200D90126300070BD0E +:10C47000F8B506008E4800250068408F874C0006FE +:10C48000070F318AA0783EF321FB00280CD0308AB8 +:10C490008849085C052807D17F483A006038C17D8B +:10C4A0003000FFF7A6FF05000021002D00D16179C3 +:10C4B00028006171F8BD70B50500774C4823603CD9 +:10C4C000A08A73495843461829003000FFF7D0FF6F +:10C4D000002803D00020E0750120B085280031F34A +:10C4E00073F970BD10B530F373FC6B486038807918 +:10C4F000022812D1694A907800280ED06548006859 +:10C50000838817215489C9028B430C4023438380BD +:10C510005079002801D0401E507110BDF8B50E00B2 +:10C520000468E17E00293ED0A78DE56931002FF334 +:10C53000B5F95C480078012803D05F4800780128ED +:10C5400031D1E819301A2ED420002DF3B5FB5B4809 +:10C550001823407A4E49584340180B21C90140180E +:10C56000056A5448298A405C012806D14A4820308F +:10C57000C0783EF3ABFA00280ED1002D0CD0287EF7 +:10C58000697E4018A97E4008002901D1361803E0D1 +:10C59000430018188619761C4420A785025D3100D7 +:10C5A00020002DF318FCF8BD70B53A4D2A681488A8 +:10C5B000C27E032A0BD1827E002A08D1404A12781B +:10C5C000002A04D162040123520CDB03D41831F396 +:10C5D00031F82868048070BDF8B504001C238088F9 +:10C5E000314958434018457900202DF33CF9282162 +:10C5F0006943405C01281FD1E088A668C886C05600 +:10C600000100000080BE00A000020000A43B1599BC +:10C61000314930188778096868014018C18A008B51 +:10C62000081A2E4940183DF380ED2D200001401AD4 +:10C630000004000CB84209D22948C069002805D07E +:10C64000284A3100126828009047F8BD20002CF3DA +:10C65000E9FEF8BD31B582B0029800240168FF39C7 +:10C66000F73949D0204A89184CD18588280017F31A +:10C6700021FA0078C00745D01C492800096888477E +:10C6800000283FD00820FAF203FE1949019001600A +:10C6900085801848016801A8FAF209FE32E000001E +:10C6A000ACF3000470CA000428EA000430D200048D +:10C6B000CC5900B0D5EA0004D7EA0004B4B40004B1 +:10C6C00098EA000484EA000424EB0004D8EA000499 +:10C6D0002CEB0004C5EA00046CEA0004D20200005E +:10C6E00008D7000408F7000464F5FFFF14F60004FF +:10C6F000BB0C000000AA3400FFF778FF012402A859 +:10C70000FAF2C9FD20003EBD70B505000C0003D152 +:10C710008F4829002BF327FF2100280028F318FC5D +:10C7200070BD3EB504000D0009F305F88821614392 +:10C730006B460818017D87A023C30022864B110099 +:10C7400020001EF343FF3EBD38B504001020FAF26E +:10C750009FFDFF21433100900160011D200024F363 +:10C7600076F919F34EFE7D493DF3B2ED0A00E10082 +:10C770007B480919490108180400FF30401C426138 +:10C7800000992000CA60653004220C313DF3A2EB11 +:10C7900000992000553004220C313DF39CEB714888 +:10C7A00001686846FAF283FD38BD10B530F385FAAA +:10C7B0006D480078012812D16C4800680188090989 +:10C7C0000901491C01806A4B9978002907D08188AA +:10C7D00017225B89D2029143134019438180654936 +:10C7E0003220087210BD634910B58979022902D13F +:10C7F00060492039886130F3C2FE10BDF8B50600EB +:10C800000F0008F398FF050039003000A3A607FBCE +:10C81000010000007CC000A000020000416C489EA6 +:10C8200005F394FC040001281AD13068572817D169 +:10C83000564A3900126830009047012810D13888D4 +:10C84000882358434019C08D002800D10B200EF3D7 +:10C8500068FC002804D04E4930000968884700244D +:10C860002000F8BDF1B584B00326049805680AF3EA +:10C870002DFF070008F369FFE979020001204B084A +:10C880002B2B00D100200190C807C00F0290A88870 +:10C890008823039058438418E08D002802D008387C +:10C8A0000604360C5D20C05D012805D01E207043B3 +:10C8B000C019C078012850D1217D029881424CD006 +:10C8C000A87D002804D027480399AC382BF355FEE7 +:10C8D00001982B22002801D0224A453AA1780D2048 +:10C8E00001290DD10199002901D1297A00E0697A45 +:10C8F0001E237343DB199B798B4208D00A2006E084 +:10C90000217D00290BD16178012900D12320030664 +:10C91000029903981B161EF33BFD05B0F0BD0121E3 +:10C92000742001550498006820670499002008606D +:10C9300060780128F1D11E2171433720C919897807 +:10C94000012904D101993620002900D03920114B4A +:10C950000399002212F306FBDFE704980EF386F832 +:10C96000DBE70000C40C0000696200007F1F0000CC +:10C9700040420F00E0BD0004F4E70004CBEA0004ED +:10C9800028EA0004CC5900B0D0D10004A0F900047A +:10C99000CCF90004317F3100012B10B50BD0042BF2 +:10C9A00007D127483DF361FD002220212548F6F2FA +:10C9B000CBFF002010BD24483DF357FD002201218C +:10C9C000F4E74B2910B504D11E4800224021F6F2AD +:10C9D000BBFF002010BD70B51C4D6C68A00706D5CC +:10C9E000184800220421F6F2AFFF02206860E00739 +:10C9F00006D0144800220221F6F2A6FF012068604A +:10CA0000286B0121090608432863002070BD10B57A +:10CA10000F4C10482168816000210161D97427659D +:10CA20000100000078C200A000020000B584F623D7 +:10CA300041618161C1610D4901620D4941620D4948 +:10CA40008162FAF21FFB00210BA0FAF266FB606024 +:10CA500010BD0000441E01B0581E01B0301E01B0D0 +:10CA600000F003A97C5A00B098EC00B0F5C10000BA +:10CA70001FC2000033C20000626C656D6278000066 +:10CA800013B50C00FF490098CA7E032A02D0897EA4 +:10CA9000012904D11C3800903DF33CFC1CBDFA4A2E +:10CAA0000168914210D1407913280DD1F54A3F23F6 +:10CAB000203A108F1B0201008004800E401E800669 +:10CAC0009943800C01431187F6F706F82100684668 +:10CAD000FAF201FC1CBD10B504000022EB480A214B +:10CAE000D2433DF341FC002816D0018900220818EA +:10CAF00082710E21C2710423017243720123837279 +:10CB0000230AC4720373E04B4273036041710271E4 +:10CB10000A22C280FFF7B4FF10BDDD4800220821C1 +:10CB200010B5F6F21BFF10BDDA487047142170B53E +:10CB30004143D44D1423203D4919096958430A89BA +:10CB40001F23521814682A00801800691B030289E9 +:10CB5000298F1218D0880F260005000D98435379AD +:10CB6000FF3CDB06DB0B18431F235B049843137960 +:10CB70007606DB069B0A184307239B059843CB07E1 +:10CB8000DB091843C0000123C0085B07C018653CDF +:10CB9000B0430832002C05D0BF4BE31805D1012368 +:10CBA0009B0601E001235B06C0188B089B008907E8 +:10CBB000A86000D15B1CB9492B870A62086100F0AC +:10CBC000A1FA70BDAF49002230B41000F025203921 +:10CBD0000C8F142343435B189B69002B05D0401C2A +:10CBE000000400140228F4DB04E0022802DAAC435B +:10CBF0000C870EE00820C441400620181824E041AC +:10CC000004060B00240F072C088702D9A843012231 +:10CC100018870120801A0C8F00040014A204920EC1 +:10CC200022E0142343435B189B69002B0CFFFD4C4F +:10CC30000100000074C400A000020000AC7C285376 +:10CC400019D0002809D1102A15D20E22D441012270 +:10CC50009206A2181223DA410A870A8F0C239A43FC +:10CC600083071B0F1A430A878B4905220004CA76E3 +:10CC700030BC000C64E7401E000400140028DADA1F +:10CC800030BC7047030570B50120834C1B0D0006B6 +:10CC90008343203C208F0907C507ED092B43DB00A8 +:10CCA0000325DB086D075B190F256D06AB43C9082B +:10CCB0000B43810889008007A36000D1491C7C4890 +:10CCC00021870262036100F027FA70BDF8B5724C4B +:10CCD000A07E2500203D002810D0E07E03280CD047 +:10CCE0000320E0760220A076288F72490022884334 +:10CCF000288703211000FFF7C5FFF8BD28686E4F95 +:10CD00000126002819D140216548002200913DF3F9 +:10CD100035FB00280FD0417B314341738761018986 +:10CD20000A18101D28600620E0760098121D0121C7 +:10CD3000FFF7A8FF01200028DFD1686800281AD17A +:10CD400000225E4811003DF319FB002811D0142188 +:10CD5000C180417B314341732421876101812430AB +:10CD600006216860E17602000221C801FFF78AFF10 +:10CD700001200028C1D1E07E0428BED1A868002887 +:10CD8000BBD1FFF729FFF8BDF8B50024484FBD69B6 +:10CD900041482038C5607E6A0100098F01239B034A +:10CDA0008C466A0F9943022A13D0032A07D16246A0 +:10CDB0001A43EB001B0F082B00D00A0002877D618D +:10CDC00000F0AAF93448C07E042801D1FFF77EFFA5 +:10CDD000F8BDEA00130F3DF38AEA0504040A0A04C9 +:10CDE00010000268B24208D10022026004E04268EA +:10CDF000B24202D100224260012401877D6100F02D +:10CE00008BF9002CDED0300000F0A1F90028D9D039 +:10CE1000A902C90EFFF73EFED4E7410F70B5032902 +:10CE200019D11D49C400CA7E230F012A14D004253C +:10CE3000022A1DD0032A0ED10A00927E259595DE86 +:10CE40000100000070C600A000020000589496EE99 +:10CE50000024032B1AD0042B07D1032A05D18C768A +:10CE6000CD7600F04FF9FFF73BFF70BD052BFCD1ED +:10CE70000220C876F8F7C2FF16494000085A00227F +:10CE8000062112E0200FF0D1CD76ECE7074B203BD6 +:10CE90009D688542E9D1022AE7D1032088769C600B +:10CEA00000F099F900220421100015E0E8EC00B030 +:10CEB0000C14000064C500B0581E01B063C300002C +:10CEC00059EDFFFF00F003A9F03F000071C300001F +:10CED0007CC500B000000004FFF7DEFE70BD70B539 +:10CEE000060014204843D34A8518103524E0D14960 +:10CEF0002031CB7E3DF304EA08050808050D08083B +:10CF000014053DF31BFA17E0010028003DF3CBFAAE +:10CF100012E0010028003DF3C6FAFFF7E1FE0BE046 +:10CF20000189091808314A79097914020C433DF343 +:10CF300005FA2000FFF7E3FD30003DF38BFA0028EF +:10CF4000D5D170BDBB4810B52030C07E042801D1BA +:10CF5000FFF7C6FE012010BDB64A10B52032D37EC1 +:10CF6000002B07D0937E002B06D101239376FFF789 +:10CF7000E9FF01E000F0C6F8012010BDAD4810B592 +:10CF80002030C07E002803D0072801D0FFF706FF1D +:10CF9000012010BD70B50120A64CA74D2034E37EC2 +:10CFA000A44E3DF3AEE9071E0505051E09121E003D +:10CFB000E869FFF73CFF14E0E969B2688A4204D1EE +:10CFC000308F0007800F00F0BAF8E969002808D018 +:10CFD000B068884205D10420E0760020B060FFF7F9 +:10CFE0007FFE012070BD9548012110B5FFF777FF46 +:10CFF000012010BD9248002110B5FFF770FF0120FD +:10D0000010BDFEB50020471E8E4E01908E480122B5 +:10D010007F2101AB0097F6F225FC00240EE0E10031 +:10D02000725889194D68284204D0002A02D0002184 +:10D03000080090470198A843641C019001980028BB +:10D04000EDD1E3E77B4870B52030C07E46F5BE12D7 +:10D05000010000006CC800A0000200009F8D94B386 +:10D0600001242200042800D10022774D0021200055 +:10D07000002A06D114224A4352199269002A00D18B +:10D080000020491C09060200090E0229EFD3002ADC +:10D0900016D1714E083E317800290AD07068F5F734 +:10D0A00018FA7D21C900884201D2012000E0002049 +:10D0B0003070002802D1288F400403D5002C01D005 +:10D0C000012100E000212000002900D0002070BDD7 +:10D0D00070B500255C4C2034E576F4F791FF5B4891 +:10D0E0000123E376016B03221202914301635C4941 +:10D0F0008A680824A2438A60426B1A4342638A68A2 +:10D1000022438A60574981635048403041689A04FD +:10D1100011434160856070BD534810B5046800221A +:10D120005248D24310213DF33DF9002807D0018930 +:10D130000818FF21633101602100FFF7BFFC10BD1B +:10D1400010B5F5F7C2F94449083948600120087064 +:10D1500010BD142358433C4910B54018103000242A +:10D16000002806D03DF380F9002802D03DF3F0F806 +:10D170000124200010BD344910B5CA683C4CD100D0 +:10D180000B0F010008393DF3C6E805090414220914 +:10D190002E00001FFF216431016010BD0179001FC6 +:10D1A000046041711102890F01711105090DC180DF +:10D1B00010BD437802781B021A438378C0780002BE +:10D1C00003432B48401C08608A80CB8009E0037829 +:10D1D00010020C60800F4B7108711005000D001DCE +:10D1E000C880080010BD002010BD70B50025164C89 +:10D1F0002068002803D020383DF3AAF82560606835 +:10D20000002803D024383DF3A3F8656000242006ED +:10D21000000EFFF79EFF0028F9D1641C2404240CA3 +:10D22000022CF4D301E03DF393F809483DF31CF9D7 +:10D230000028F8D101E03DF38BF806483DF314F9DE +:10D240000028F8D170BD0000C8EC00B000F003A9C0 +:10D25000301E01B0441E01B08C5A00B07D526ED613 +:10D260000100000068CA00A0000200006B652A0EE1 +:10D27000581E01B0802100801E1E0000E4A634006C +:10D2800064C500B00C140000F8B50500FF4C607ACE +:10D290001BF357FA06001420FAF236F8FC49009006 +:10D2A0000160FC49098981808572217A8173068237 +:10D2B00061894182F84801686846FAF234F8F8BD9D +:10D2C000F8B5C021F54C2068020060325181EF4E64 +:10D2D0000123317BDB020029818B01D0994300E0DF +:10D2E00019438183EE4933780968DD0900D1CB8188 +:10D2F000B378DD0900D14B82EA497379FF27E54D08 +:10D3000009787F1C002B0FD1838B3B438383B0793B +:10D31000F379401800025918084310816020A87161 +:10D32000216800208884F8BD828BBA438283C18340 +:10D33000D649DD480A22006815313CF308EE50203A +:10D34000EDE7DA49D34810B50968083086B0884758 +:10D35000D04C1C2120894143D5480818817861713F +:10D360004178E170007920710001C121C9010843B1 +:10D37000D0490968088001202BF336F901A819F378 +:10D38000D7FA01A903A819F354FA2079CA490C2342 +:10D39000584309680C2240184C3003A919F3A4F82B +:10D3A000C64A207913680021400119521368C31836 +:10D3B00059801268801881810A21818006B010BDD1 +:10D3C00070B5F9F758FBB54C2068418CCD2211405F +:10D3D0004184FAF27DF8BA480068818C090B090390 +:10D3E0008184FAF281F820680021FF30E130418128 +:10D3F000FFF7A7FFFFF764FF00F0ADF9A34800793E +:10D40000FFF742FFA34D01246C7000F082F900F099 +:10D4100025F92C7070BD1CB59E4AD268019200900F +:10D420000021FF201923A7A2FCF2A5F91CBD70B5AD +:10D430002CF3D4FBA4480022006842710123C3707E +:10D44000A24C10002568C1006B52256849194A801A +:10D45000401C0E28F6DB2CF3C9FB70BD70B58D4C5B +:10D460006078002500281FD06570FFF7C567855ECE +:10D470000100000064CC00A000020000729DF47E58 +:10D48000E0FFFAF22FF8934E3068418FFF2291327D +:10D4900091434187FAF226F86079316840000A5AD0 +:10D4A000C0239A430A52FAF229F8FAF227F800F058 +:10D4B0008DF9FF20FFF7F2FEF9F7E9FA257070BD4C +:10D4C000F3B50C0081B0784F7878002804D020792B +:10D4D000FF2801D0FFF7CCFF21797148FF290171A6 +:10D4E00009D17878002804D0FFF7C2FF0120FFF7A8 +:10D4F0009CFF0020FEBD2178017061784170A17809 +:10D500008170E178C1702179017161794171A179EE +:10D510008171E179C171217A01720091657A457258 +:10D52000E17AA67A09020E434681217B01730199B3 +:10D5300012290CD3A27B617B12021143E27B237C74 +:10D5400012041B061A4311430161617C02E00021B1 +:10D550000161042101755248019915301C2905D338 +:10D5600021000A2212313CF3FCEC03E0FF220A21E5 +:10D570003CF3EEEC002E07D05A496800085A864268 +:10D5800002D800980E2801D91220FEBDE806C00F6F +:10D59000B870FFF71FFFACE7F8B5534D2868C48F8C +:10D5A000008C002801D01DF3EFFC3F4FE00629D589 +:10D5B0002868468FF0050BD5F868401CF86038489D +:10D5C0000069002804D0F968884201D80220387028 +:10D5D00030060DD5387802280AD1FFF732FF3D48D2 +:10D5E0000068418FFF2281329143418703203870C8 +:10D5F000F00607D53878032804D1FFF739FF00205B +:10D60000FFF713FFA00611D529684020405A800576 +:10D610000CD078794200895A002907D00A06920F67 +:10D6200004D0324A0906126809169047600601D5EF +:10D630002868C08CE00508D52968002042005218EF +:10D64000528E401C0328F9DB088F200607D5296875 +:10D65000002042005218128D401C0528F9DBA0055D +:10D6600001D52868C08B600501D52868408CF8BDBD +:10D67000F8B52CF3BDFA194800210068FDAC77DF3E +:10D680000100000060CE00A00002000086754AC3C1 +:10D690004171084B197AC1700849FF278A79002027 +:10D6A00015022E000A79133611353F1D114C4979A8 +:10D6B000920327E004ED00B0940C0000C45A00B0BF +:10D6C000FCA9340084EA00048CEA00041FE9000489 +:10D6D000A8EA0004E8FB0004B4B4000480EA0004F3 +:10D6E00088EA000478EA000434EA00046262770001 +:10D6F00020EA000428EA000480A9340038EA000483 +:10D70000ECF400040A431204120C0FE0002802D1CA +:10D7100021680E8002E02368C1005D522368C100C9 +:10D72000CB185A802368C9188F80401C4049097A59 +:10D730008142EBDC2CF36EFAF8BD10B53D4C0120B4 +:10D74000617988403C4909686031C883F9F2D4FEA8 +:10D750000020E060F9F2D0FE6079384C400021688A +:10D760000A5AC0231A430A52F9F2D2FE2068418FA6 +:10D77000FF22913211434187F9F2CAFE10BD3048B1 +:10D7800010B5026813882B4C0121607981400B434E +:10D790001380A2782B4B002A1A68148801D18C437D +:10D7A00000E00C43148019680A8823490968FF3196 +:10D7B00081310A821E4A142151560C220C2900DAAA +:10D7C0000A001321C9438A4200DD110049002931B2 +:10D7D0000906090E442900D3432113F072ED10BD50 +:10D7E00010B5144C1848E17818F379FD61791748A1 +:10D7F00018F375FD208901061548090E18F36FFD11 +:10D80000218900201C235943124A50540C480068B7 +:10D8100002886379012199408A430280094800689F +:10D8200002888A43028002888A43028010BD000079 +:10D8300004ED00B0C45A00B084EA000434EA0004E5 +:10D8400030EA00041CEA000488E8000484E80004CC +:10D8500080E80004B4B40004020010B593781120ED +:10D860003CF376ED081B05080E0B1114171B100076 +:10D870001C4A10E010001C4A0DE010001B4A0AE090 +:10D8800010001B4A07E010001A4A04E08EF268EA12 +:10D89000010000005CD000A000020000F86EED73F3 +:10D8A00010001A4A01E01000194A1268904710BD92 +:10D8B00070B5060010781400E02886B004D120006E +:10D8C000FFF7D4FF050000E011250021481EFCF2FF +:10D8D00087F82279E178A07803AB07C33300627838 +:10D8E00021780191FF21029221310E2009A2009599 +:10D8F000FBF25FFF06B070BD0CF9000410F90004E4 +:10D90000FCF8000408F9000400F90004F8F8000429 +:10D9100004F9000452686262626262620000000000 +:10D92000F8B50D0000210091382116004143FA4A54 +:10D930008C180021FAF717FB00282AD0607DC11C43 +:10D940008A07411C8000001983698907920F890F9B +:10D95000002B0AD1876A002F07D19200121997690C +:10D96000002F02D1926A002A01D001220092002DDC +:10D9700008D0002E06D02A68D2182A603268806A41 +:10D980001018306000228800001982618262A2753E +:10D9900061750098F8BDF8B538235843DE4B8E7A90 +:10D9A000C418C87A4B7A00020643087A1B0218434F +:10D9B0008446E07C257C042801D3002D75D10879AC +:10D9C0005700022805D0032831D006287BD100203B +:10D9D00055E000210220617400900825604611285E +:10D9E00006D0132804D019286FD101250095A17401 +:10D9F000207C002804D1382120003CF362EB0FE0AA +:10DA000000208100625A002A05D10919498800299D +:10DA100001D1207504E0401C0006000E0428F0D35C +:10DA2000207D81000819C653257400984AE0207DA6 +:10DA3000800003190120002A00D000204000185A5D +:10DA4000B04240D10222012D05D12274012262741C +:10DA50000022A27404E0082D02D10920207462740F +:10DA6000087B002805D1487B002802D1E07C401CBF +:10DA7000E074217D60468A001119C85323E08100BB +:10DA80000B19D95BB14211D10121002A00D000212C +:10DA90004900595A614509D1820011190AB2683802 +:10DAA0000100000058D200A0000200000C8653CEF6 +:10DAB00000220A804A80E17C491EE17405E016E0FC +:10DAC000401C0006000E0428E3D3002805D1082DD1 +:10DAD00005D0092D03D020746074002D08D0207C5F +:10DAE000002805D1F6F72AFB0020F6F71EFBF8BD4B +:10DAF000607C0128FBD1F6F721FBF8BDF8B50024C6 +:10DB000006008A4F250000212800FAF736FA00287F +:10DB10001AD0002E03D1641C2406240E14E0012E1A +:10DB200008D138206843C019007C0128F3D00228AE +:10DB3000F1D009E0022E07D138206843C019007CDB +:10DB40000828E8D00928E6D06D1C2D042D0C082DDE +:10DB5000D9D32000F8BD0020D0E71CB500207449BF +:10DB6000019000900400087020006A4601A9FFF7A8 +:10DB7000E1FE002801D000F003F9641C2404240C09 +:10DB8000082CF1D300990198F6F7EAFA1CBDFFB50D +:10DB900083B0050008285CD238236B4363489207A2 +:10DBA0001C18677CA07C029048780E780002CB7825 +:10DBB000064388781B021843920F012A49D0069A1F +:10DBC000012803D0280000F0E9F802E02800FFF760 +:10DBD000ECFE607C2A003100FBF7A7FC06980028C9 +:10DBE000607D05D080000019816A8919816204E096 +:10DBF0008000001981698919816100F0C1F8607C99 +:10DC0000B84208D1002824D0012822D16B46A17C3B +:10DC10001A7A91421DD0012801D1012600E0002688 +:10DC20000127022800D000270C20F9F295FB41497A +:10DC30000190016085808671A17C0172C7713E48A8 +:10DC4000016801A8F9F297FBA17C607C2A00FBF730 +:10DC5000D6FC07B0F0BD70B5040008281CD2002225 +:10DC600011002000FFF766FEFFF775FF00280CD1BA +:10DC70002F4D2878002808D0304800212AF313FDC2 +:10DC8000002001002870F6F76BFA3820604327491E +:10DC9000401838213CF31EEA70BDF0B5002638214B +:10DCA000414387B0214A05968A1816215F071EE86E +:10DCB0000100000054D400A000020000157E8DBEBB +:10DCC00004960296019600925156350037000029BD +:10DCD00001D00E0051E00021FAF759F900284CD08C +:10DCE0000024009AA00082189069012319000028DE +:10DCF00000D00021C9190F06916A3F0E0029069134 +:10DD000000D000230199049A59180906090E8018B9 +:10DD10000191059B002159410490029A06980591B2 +:10DD2000801800214D41641C2406240E042C02900E +:10DD3000D7D3022F0ED3019802280BD300261AE066 +:10DD400024ED00B0D45A00B0120D000000AA340037 +:10DD5000F3130000029A049805992B00121A8B41C4 +:10DD600001D2012607E0029A04980599801AA94178 +:10DD700001D20026F64300988675300073E7010053 +:10DD8000382359432C4A01208918497C022900D0A4 +:10DD900000207047294810B50178002907D10121DA +:10DDA00001707D2026490022C0002AF373FC10BDBB +:10DDB000F7B53823009858431F4BC518C8788B789F +:10DDC00000020343287C012807D0022805D0082838 +:10DDD00001D0092803D1022402E0012400E000243C +:10DDE0000120002A00D000204600A85B984206D1FE +:10DDF000012C6C7402D10120F6F7AAF9FEBD0120B6 +:10DE000081004919895B99420FD1012C6C74F5D1BD +:10DE10000220002A00D10120A874FBF715FCA97C80 +:10DE2000009A2000FBF7F5FBFEBD401C0006000E2B +:10DE30000428E5D3FEBD000024ED00B0D45A00B0A4 +:10DE4000F31300002E4810B5006800224B21F9F2B0 +:10DE50000AFA10BDFFB581B006000D003C292CD890 +:10DE60002F0009373806000E31F33CF9040024D0A6 +:10DE700020892449001901600021017122492A00EA +:10DE8000096841711F49C780083078390160868070 +:10DE900085710399C01D3CF38CE819480022006885 +:10DEA000210001233CF308FB0498002803D1002142 +:10DEB0000120FEF210FE05B0F0BDB30554CC308851 +:10DEC0000100000050D600A000020000E1963303DC +:10DED00012219B0DB20A0420FBF230FDF5E7FFB5DD +:10DEE00081B0050016001F0031F306F90400ECD0E4 +:10DEF0002089FF2100196531016007714671C580D5 +:10DF000002992A0008303CF35EE8200031F3FAF869 +:10DF1000DBE70000805A00B00A140000E4A63400D9 +:10DF2000F8B5002406008038864B87490004000CB1 +:10DF30001A5C0D88854F52190A801C5411E0A0000C +:10DF40003D58A8880005000DB04207D11C3D2000B7 +:10DF5000FBF221F928003CF341FA02E0641C24069C +:10DF6000240E7B4800788442E9D3F8BD10B5C1780F +:10DF7000827809020A4324381C214318018175491B +:10DF8000C16103211971744909685971111D4184D6 +:10DF900001007248042300683CF398FA10BD70B584 +:10DFA00004000D000020F8F7CFFF052D19D1E188FE +:10DFB000A088091D0A046A4900050978000D120CA1 +:10DFC000002912D0010080393F290ED85E4B1988F4 +:10DFD000491E19805B49081880380178491C017076 +:10DFE00003E0E088001F0204120C5E482100006874 +:10DFF0001C392B003CF36AFA70BD594930B40978DA +:10E00000002903D050490988002903D056490968DE +:10E0100030BC08474E4A4D4C11788B00491CE050EB +:10E02000117030BC704770B5474C2588FFF778FFFA +:10E030004E4A20881388411BC918401A118020803D +:10E0400070BD10B580242000641C2404240CFFF74C +:10E0500067FFBF2CF7D910BD1CB5454A11780029C0 +:10E0600012D09178D2786B461A7058700A0A99705B +:10E07000DA700A0C1A71090E59713E4C0300062120 +:10E0800020006A46FFF7F0FE1CBD0006001610B522 +:10E0900013F042E90020FFF7DFFF10BD0200354812 +:10E0A0000A21801C012310B5FFF7DEFE10BD10B55C +:10E0B0002F4C6070A170E27001206360207010BD71 +:10E0C00000B589B000906B462B4819719C550934F6 +:10E0D000010000004CD800A000020000268F315E35 +:10E0E000006800230206120E24206946FFF701FF94 +:10E0F00009B000BDF0B50400241D6179257909023D +:10E100000D432349234B0E782168002002229942B7 +:10E1100021D130207043204B0021C6180F00480049 +:10E120004018A31830181B79521C12048370120C6B +:10E1300001238B402B4205D005230370114BDB7864 +:10E14000437002E0077047708770491C0906090E8A +:10E150001029E4D30120F0BDA09D0004A8E500042F +:10E16000E09D00049CE500040B140000E0A63400D0 +:10E17000805A00B09BE50004880E0004B0E500045E +:10E18000AAE50004D85A00B087FC0000E4A63400D9 +:10E19000DD5800B053210000E4EE00B00100002281 +:10E1A0000C48D243083110B53CF34CF910BD10B502 +:10E1B000040000681C383CF31BF90020206010BDEF +:10E1C0000100054810B50068002201233CF388F9DE +:10E1D00010BD000064C500B0805A00B010B52A4CD4 +:10E1E0002848208004F096FF60602648401C20816B +:10E1F00005F015F82100C86010BD31B50098002861 +:10E2000019D0214D00240098E1006A5A83889A426F +:10E210000ED149194B68002B0AD081790022C01D0C +:10E220009847002804D06846F9F2B7F8012038BDB5 +:10E23000641C022CE7D3002038BDFFB581B00C0070 +:10E2400007000498114D461830000F30F9F2A2F87B +:10E250000028009014D005600772467203992200CE +:10E260000A303BF3BAEE0098049A00190A990A3072 +:10E270003BF3B2EE064801686846F9F29AF80120CD +:10E2800005B0F0BD80FE000044EF00B09C1300001C +:10E29000E0A6340030492F48086031482F494160DA +:10E2A00031493048086032493048086032493148C5 +:10E2B00008603349314808603349324808603449BE +:10E2C00032480860344933480860354933480860AB +:10E2D0003548344901603549364A4160B90A3C58ED +:10E2E0000100000048DA00A000020000D2678FE3BE +:10E2F00034491160364A354911603649C1603649A2 +:10E3000001613649374A416135491160374A36491A +:10E310001160384A36491160384A37491160394A24 +:10E3200037491160394A384911603A4A3849116011 +:10E33000394981603A49394808603A483A490860A1 +:10E340003B493A4808603C493A4808603C493B48E8 +:10E3500008603D493B4808603D493C4808603E49EB +:10E360003C480860704700006C5B00B078ED00042A +:10E37000F8F100B070DC0004B132010000EF0004DD +:10E38000A932010004EF0004F929010008EF00049C +:10E39000872A01000CEF0004F12B010010EF0004AC +:10E3A000032C010034EF0004A92C010030EF00041D +:10E3B000472C010014EF000403370100E05A00B0BD +:10E3C0002B3701001B380100F4EF0004593701001E +:10E3D000BCEF0004413501007D3501001B3A01000E +:10E3E000BB350100DCEF0004F9300100A0EF0004B0 +:10E3F000812D0100C45B00B0EF2D0100D05B00B0A7 +:10E40000C85B00B068ED0004252E010074EF000425 +:10E410009D30010070EF0004BB2F0100DC5B00B0F9 +:10E420006CED0004E05B00B070ED0004F529010024 +:10E4300020F00004613A010058F000047F3A010026 +:10E440005CF00004CB3B010060F00004792D01007A +:10E450002CF00004C529010050F00004374936486B +:10E4600008603849364808603849374808603949F3 +:10E47000374808603949384808603A4938480860E0 +:10E480003A49394808603B49394808603B493A48AD +:10E4900008603C493A4808603C493B4808603D49AF +:10E4A0003B4808603D493C4808603E493C4808609C +:10E4B0003E493D4808603F493D4808603F493E4865 +:10E4C000086040493E48086040493F48086041496B +:10E4D0003F48086041494048086042494048086058 +:10E4E0004249414808604349414808604D6126154A +:10E4F0000100000044DC00A000020000CB9F51930B +:10E5000043494248086044494248086044494348F6 +:10E510000860454943480860454944480860464901 +:10E5200044480860464945480860474945480860EE +:10E5300047494648086048494648086048494748AE +:10E5400008604949474808607047000094F600B0E9 +:10E5500008F20004845C00B00CF20004940600048D +:10E5600010F20004B006000414F200045766010023 +:10E570009CF10004273E0100B0F10004933E01002D +:10E58000B4F1000483B001001CF200045DB101008D +:10E5900020F2000461B0010018F2000467AF01002E +:10E5A00054F1000457AE010050F20004B1A801007C +:10E5B0006CF20004A5B201002CF200048DB301003E +:10E5C00094F20004C1B3010098F2000451B30100B9 +:10E5D0009CF20004C9AC010064F200041151010076 +:10E5E000F0F2000457510100F4F20004E758010072 +:10E5F00014F30004135901001CF30004215B010013 +:10E600002CF30004835B0100F8F200041B5C0100A2 +:10E6100024F300043D9601004CF30004E79601004A +:10E6200068F300043D9701006CF300045B97010060 +:10E6300074F300046F97010060F30004AB4300B073 +:10E6400084F0000421A3010088F0000471A20100FD +:10E650008CF0000461BD010078F30004C3B5010033 +:10E660007CF30004E1A5010080F3000410B50FF075 +:10E6700080F9012000F0F5F810BD7F4A10B55188EF +:10E680000B00034209D081437C485180014202D1F2 +:10E690004808400050800BF078FE10BD0120ECE7E8 +:10E6A000022010B500F0DDF810BD0220E5E70420DF +:10E6B00010B500F0D6F810BD0420DEE701204002BE +:10E6C000DBE7082010B500F0CCF810BD0820D4E737 +:10E6D000102010B500F0C5F810BD1020CDE72020A7 +:10E6E00010B500F0BEF810BD402010B500F0B9F82C +:10E6F00010BD6020C1E7802010B500F0021AFE15A1 +:10E700000100000040DE00A0000200003F77EF2E75 +:10E71000B2F810BD8020BAE70120800210B500F0E9 +:10E72000AAF810BD01208002B1E7FFB581B0160044 +:10E73000994200D919000D0054480021554F0C0092 +:10E74000818013E0305D00280DD0019821000BF08E +:10E75000F3F881007A5C824205D14C4AC91990884D +:10E76000498808439080641C2406240EAC42E9D3F7 +:10E770000BF015FE05B0F0BD4449087070474348E2 +:10E7800000787047414A00B55288002103003BF3EE +:10E7900030EE0A06080A0D0F060D1113211402218E +:10E7A0000BE0042109E00121490206E0082104E010 +:10E7B000102102E0202100E040211000084000D09C +:10E7C0000120114000D00121002803D0002901D0F0 +:10E7D000012000BD002000BD2C4841880020CA0750 +:10E7E00005D02B4A114202D0002900D001207047E9 +:10E7F00070B50025FFF7F0FF002812D0002401219A +:10E8000020000BF020F9092805D0FFF7BBFF0028F6 +:10E8100001D0012504E0641C2406240E0A2CEED34A +:10E82000280070BD19480B214088C901084000D05C +:10E830000120704715484088C005C00F7047134835 +:10E8400040884005C00F70471349012010B58871FA +:10E850001248007806280DD10C484188090609D5D0 +:10E860000078012806D10E49096888470D498020A3 +:10E870000968884710BD054A10B5518803008B43CD +:10E8800003D0014351800BF08AFD10BDF85A00B04F +:10E890007E02000004030004415C00B0325C00B062 +:10E8A000D4F20004D8F20004FF480021FF220170D6 +:10E8B00042708170C1700171417141730121817396 +:10E8C0007047FA4810B5006800248047F6498878F8 +:10E8D000002808D0072809D14879042806D10EF06D +:10E8E0008CF9002802D001240EF020FAF0480068CC +:10E8F0008047200010BDED4870B5006880470220B9 +:10E900000CF0CDFAEB48EA4D00780628267ACAD6F4 +:10E91000010000003CE000A00002000037A81EF348 +:10E9200006D1EA480078002802D02868804770BDE8 +:10E930000BF0E0FAE14C002805D10EF041FA002876 +:10E9400001D1042000E003206071286880476079CD +:10E950000428ECD10BF0C4FA002802D0DC4800688F +:10E96000804706F009FB002801D006F0CBF9D94911 +:10E970006078096888470EF0C1F90720A07007F099 +:10E98000E9FF70BD10B50BF0ABFA002802D0D048FB +:10E990000068804706F0F0FA002801D006F0B2F9CE +:10E9A000CC49C64C096860788847042060710EF035 +:10E9B000A5F90720A07010BD70B5C04DA87800283B +:10E9C00028D000242C706878FF2808D0C249096834 +:10E9D0008847002803D0BF496878096888470BF04A +:10E9E0007FFABE4E002805D00BF072FAB168012004 +:10E9F000887401E0B068847406F0BEFA002801D083 +:10EA000006F080F9A878092805D100200EF046F913 +:10EA1000AC706C7170BD0120F8E770B5002806D0AD +:10EA2000002901D0AE4C04E0AD4CA41E01E0AC4C7A +:10EA3000A41C022501200EF08CF9002809D0A94B56 +:10EA40002A001B6801002000984701200EF0EDF914 +:10EA50000120002806D1FFF7AFFF022101200CF0B2 +:10EA600051F970BDA14B954805211C68C90140783A +:10EA70009D4A0023A04770BD70B500288F4C42D13D +:10EA8000A0789A4D012810D10EF0CAF80221002872 +:10EA9000A17006D060782C682021934A0023A047FB +:10EAA00070BDFFF789FF022125E002280ED1032067 +:10EAB000A07001206071607805212C68C9018A4A24 +:10EAC0000023A04701200EF0C2F870BD032803D038 +:10EAD000042801D0072812D12078401C0006000E1F +:10EAE000032820700BD8E078012800D000200121F5 +:10EAF000FFF793FF70BD01200CF004F970BDFFF724 +:10EB00005BFF0321F7E70128F8D16F4801786F48D0 +:10EB1000062902D101780029F0D1007AA721A23C70 +:10EB20000100000038E200A000020000C340A04E37 +:10EB3000FF2804D06D49096888470028E8D1A078EB +:10EB40000528E5D102200CF0BEF9042060710720F1 +:10EB5000A0700EF0DDF80BF0CDF9002802D061486E +:10EB60000068804706F012FA002801D006F0D4F8B9 +:10EB700007F0FAFE70BD10B50EF0DEF85448002123 +:10EB80000170012141715E4B05211C68C90140786B +:10EB90005A4A0023A04710BD70B505004C4C607860 +:10EBA000FF2804D157490020096888476070280071 +:10EBB0000DF0F8FF002801D00EF001F870BD10B57F +:10EBC000434CA078082810D10920A0700EF032F82C +:10EBD00000280CD04A4B60781C6820214A4A002348 +:10EBE000A04701200EF03DF810BD092801D1FFF724 +:10EBF000EDFEA1680120884710BD70B50600344CB9 +:10EC00000D00A078002803D00120A847002070BD87 +:10EC10003848001D805DFFF7BFFF002802D10EF0CD +:10EC200047F8F1E70820A07000202070A560344B61 +:10EC3000267360781C682021334A0023A0470120F6 +:10EC400070BD10B5224C0022227062732271E170F7 +:10EC50000121A173A1702749091D085CFFF79CFFE2 +:10EC6000002804D101200EF023F8002010BD244B11 +:10EC700060781C682021214A0023A047012010BD94 +:10EC8000F8B50125124EB078072803D000210120E5 +:10EC90000CF042F80520B070307900283BD001F02C +:10ECA00090FD040037D0E088022834D9A188891E5D +:10ECB000A1801649801EE08009682000884707006F +:10ECC0000CF0E9FD002826D02100380020E00000EB +:10ECD00060EF00B0CCF20004D0F20004325C00B06F +:10ECE000415C00B064F3000438F300043CF300041A +:10ECF00024F300B02E030004D0F1000495E10000DD +:10ED000030F3000434F30004C7E20000C4F100044F +:10ED100006F018F809E00BF0BEF8002804D0002037 +:10ED200030700220707100E000252800C211EBE96C +:10ED30000100000034E400A000020000DAB87E3ECA +:10ED4000F8BDF1B582B001260298C588002D01D129 +:10ED50000020FEBDA5490298096888470400A44820 +:10ED60000178032906D9FFF73BFE032101200BF0B0 +:10ED7000DDFFEDE783789F499F4FDB1E3BF356EBAA +:10ED800007054A61F8A8F8E5F8009948096840784D +:10ED90008847032D01D0042D2FD1600903282CD1E1 +:10EDA000E7200440612C28D1904C029821688847C4 +:10EDB000924D297A884205D1216802988847697A5C +:10EDC000884205D08A48002101710120387402E090 +:10EDD000874901200871864CE078012807D100217D +:10EDE000FFF72FFE002020700420A0700DE0002807 +:10EDF0000BD1FFF74FFF060007E07D48C0780128E0 +:10EE000000D000200121FFF71CFE79480178491C41 +:10EE1000017084E00968070040788847012D01D01F +:10EE2000022D06D16009032803D1E7200440602C9D +:10EE300072D038780121401C38700800FFF701FEBD +:10EE400075E00968050040788847A87B002806D04F +:10EE50000020A873387C002801D10CF049FD60091E +:10EE6000022805D10298210006F007F8060026E0E6 +:10EE7000E00924D062480190077C06F091F8002850 +:10EE800001D005F053FF06205E4AA8701268029870 +:10EE900021009047002801D100260EE0002F0CD061 +:10EEA00001980078002808D057480068804700285B +:10EEB00003D156490220096888470520A870554BA0 +:10EEC0007D211C6889026878514A0123A04726E009 +:10EED0004748096840788847032D2AD160090328EC +:10EEE00027D1E7200440612C23D1404C02982168AF +:10EEF0008847424D297A884205D12168029888477F +:10EF0000697A884205D03A4800210171012038749D +:10EF100002E0374901200871FFF7BCFE0600002E11 +:10EF200005D1FFF75DFD022101200BF0FFFE30004F +:10EF3000FEBD2F4CE078012800D000206FD18D9FBE +:10EF40000100000030E600A0000200002E50C08347 +:10EF50000121FFF780FD2078401C2070F1E709684F +:10EF6000070040788847032D01D0042D0BD160099C +:10EF7000032808D1E7200440612C04D100240A2092 +:10EF8000B87001E006E00124FFF734FDB968200005 +:10EF90008847D6E70026CEE770B50500194CA07863 +:10EFA00005282CD11849607809688847002D03D0BE +:10EFB0001E480068804717E06079032814D10420B8 +:10EFC00060710720A0700DF0B7FE0AF0A7FF0028BF +:10EFD00002D017480068804705F0ECFF002801D0F8 +:10EFE00005F0AEFE07F0D4FCA078052807D10E4B43 +:10EFF00060787D211C6889020A4A0123A04770BD00 +:10F00000C4F1000460EF00B038F3000470E00004C5 +:10F0100090ED0004CCDF000454F3000448F3000436 +:10F0200044F2000495E1000030F3000470F30004A2 +:10F0300064F3000470B50D004178040000782A00E4 +:10F040000BF022FD002803D0FF492078485501200D +:10F0500070BDFD4A10B5115C052908D0FB4C890034 +:10F06000091949680023DB434B600521115410BD89 +:10F070000522F548110010B53AF3ECEFF2490020F3 +:10F080008860C8748873487410BDF8B50400150012 +:10F090000220F9F7EDF9EC48005D052815D0810054 +:10F0A000EA48081840684168A1420ED14078E84E0D +:10F0B000E84F01280AD1E849280009688847002854 +:10F0C00004D03A68012120009047F8BD316828003B +:10F0D0008847F6E710B50DF0BCFB002809D00022E8 +:10F0E000C2706122012102700A2242708170D649E9 +:10F0F000886010BD70B5D44CA068002809D0817814 +:10F100000025012902D80DF0A0FB01E00DF0ABFBBA +:10F11000A56070BD00280BD0022809D0052807D0B3 +:10F12000CA4A8100891849684978022900D101201A +:10F130007047FFB581B006000D0000283BD0052EBA +:10F1400039D03000FFF7E6FF04000528CC53517397 +:10F15000010000002CE800A000020000E949C2DE26 +:10F1600033D0039930000BF080FC00282DD0BB4E2B +:10F17000B268002A29D09078401DF62806D3FFF700 +:10F18000C3FFFFF7B1FFB268002A1ED0D31C111DC8 +:10F19000D678002005E04F78891C7918401C0006BD +:10F1A000000E8642F7D8761C0120002D1E7000D07C +:10F1B0000020087003204870891C0C700398487068 +:10F1C000049888709078401D907005B0F0BDFFB530 +:10F1D00081B00D00070016000028F6D0052FF4D0EE +:10F1E0003800FFF7A1FF04000528EED031003800F9 +:10F1F0000BF03BFC0028E8D006200DF036FB002881 +:10F20000E3D00122C11C002DC27000D000224A7040 +:10F2100003228A70C91C0C704E70049A8A70612196 +:10F2200001700A214170062181700DF026FBCCE7A8 +:10F23000FEB5052500280CD0894901280CD00228EC +:10F2400007D0052805D0820051184968497A00295D +:10F2500000D105002800FEBD814800248068C668F2 +:10F26000307A0028F6D0012801D1346817E0804BAD +:10F2700000211F68BA206A4601ABB847307A009A6D +:10F2800000210AE08B00F3581778DB681B78BB423B +:10F2900002D18800345802E0491C8842F2D8002C80 +:10F2A000D8D060780228D5D16D480321027808E0D3 +:10F2B0008B001B185B68A34202D10D062D0EC9E717 +:10F2C000491C8A42F4D8C5E7052810B508D00028A3 +:10F2D00006D0634B8200D2185268527A002A01D0BD +:10F2E000002010BD0BF092FA10BD5C48052210B54D +:10F2F0000021C27301740273417312F06CE810BDF7 +:10F30000F7B50E00FFF794FF0500052801D109208D +:10F31000FEBD0124F00709D0029A0021280012F056 +:10F320005EE80400FFF7C2FA002C40D04B4FB00754 +:10F330001DD5387B052801D0A84202D1F87C0028D1 +:10F3400001D0002433E03D7302980BF0D2FE797BAC +:10F3500008437873029A0121280012F01DC932482F +:10F360000100000028EA00A0000200001DA17C634B +:10F3700040E8B97B0400014301D0012000E00020F7 +:10F38000B873002C1DD070071BD5F87B052801D061 +:10F39000A842E0D1F87C0028DDD1FD7302980BF083 +:10F3A000B2FE397C08433874029A0221280012F018 +:10F3B00020E8797C0400014301D0012000E0002016 +:10F3C00078740020002CADD10320FEBDF7B50E00EF +:10F3D000FFF738FF0500052801D10920FEBD0124F3 +:10F3E000F00709D0029A0021280012F006E8040074 +:10F3F000FFF766FA002C4DD01D4FB0071DD5387BA6 +:10F40000052801D0A84202D1F87C002801D00024B0 +:10F4100040E03D7302980BF088FE797B08437873D7 +:10F42000029A0121280011F0E8EFB97B04000143A2 +:10F4300001D0012000E00020B873002C2AD0700712 +:10F4400028D5F87B052801D0A842E0D1F87C002817 +:10F45000DDD1FD7302980BF068FE397C08433874E7 +:10F46000029A0221280011F0C8EF797C04000BE019 +:10F4700070EF00B024F300B0BCF100047CF3000492 +:10F4800068F20004ECF10004014301D0012000E027 +:10F49000002078740020002CA0D10320FEBDFFB511 +:10F4A00081B00E001D00FFF7CDFE0700052801D139 +:10F4B000092094E60124F0070AD0039A2B000021CA +:10F4C000380011F09EEF0400FFF7FAF9002C13D07A +:10F4D000B00706D5039A2B000121380011F090EFF8 +:10F4E0000400002C08D0700706D5039A2B000221D7 +:10F4F000380011F086EF04000020002CD9D1032041 +:10F500006DE6FFB581B01E00FF494978002921D082 +:10F5100000281FD005281DD0FFF710FE0500052884 +:10F5200018D0F01C07063F0E38000DF0A8F90400B3 +:10F5300010D0E57002992171667103993200A01D07 +:10F540003AF3A4ED61202070092060702000A770BC +:10F550000DF09DF943E6FFB585B004000E000027CD +:10F5600002970F70089811F050EF05002D609DF084 +:10F570000100000024EC00A0000200000459A213C6 +:10F5800075D00798002808D001283BD002286ED1FA +:10F59000E87C002835D0002099E028780028F9D0B0 +:10F5A0000020019029E001982818417805291DD0F4 +:10F5B00000212170032161704078FFF7C9FDA07020 +:10F5C00008980BF08AFDE0700198207102987F1C6A +:10F5D000401C0006000E0290307861783F0640180B +:10F5E000801C307060783F0EA41C04190198401CE8 +:10F5F0000006000E042801906DD2297802988142FD +:10F60000D1D868E06879002865D00020019029E011 +:10F6100001982818817905291DD001212170032125 +:10F6200061708079FFF794FDA07008980BF055FD8C +:10F63000E0700198207102987F1C401C0006000EAB +:10F640000290307861783F064018801C30706078F6 +:10F650003F0EA41C04190198401C0006000E092846 +:10F66000019038D2687902998842D1D833E035E0E8 +:10F670000198122358434019049020300390407998 +:10F68000052820D00220207003980079801C60702B +:10F6900003984079FFF75CFDA07008980BF01DFD02 +:10F6A000E0700398049902791431201D3AF3F8ECC4 +:10F6B000307861787F1C4018801C307060783F067D +:10F6C0003F0EA41C04190198401C0006000E019076 +:10F6D000E97C8142CCD8380009B0F0BD0020FBE7BE +:10F6E000FEB5050000208E4900900968F620884785 +:10F6F0002B00002269460190FFF737FF01266127A2 +:10F70000002802901BD06B461878801C0006000E63 +:10F710000DF0BFF80400C01C0670029941706B46E2 +:10F720001A780199801C3AF3BCEC022127706B46D1 +:10F73000617019782000891CA1700DF0B2F8019851 +:10F740002B0001226946FFF710FF002802901BD012 +:10F750006B461878801C0006000E0DF09AF8040025 +:10F76000C01C0670029941706B461A780199801C82 +:10F770003AF396EC022127706B466170DCF37E133E +:10F780000100000020EE00A000020000F0B11CAE5D +:10F7900019782000891CA1700DF08DF801982B00BC +:10F7A00002226946FFF7EBFE05001AD06B46187877 +:10F7B000801C0006000E0DF076F80400C01C0670D8 +:10F7C00045706B461A780199801C3AF374EC02215B +:10F7D00027706B46617019782000891CA1700DF0AC +:10F7E0006AF85549019809688847FEBD002010B5A0 +:10F7F000FFF780FF0120FFF77DFF0220FFF77AFF70 +:10F8000002200DF050F80022C270612102710170D7 +:10F810000221417081700DF04EF810BD022010B52C +:10F820000DF041F80022C2706121027101700521C2 +:10F830004170022181700DF03EF810BD022010B51C +:10F840000DF031F80122027103226121C2700170B2 +:10F8500006214170022181700DF02DF810BDF3B525 +:10F8600081B001250F0028000DF01DF84F21017017 +:10F870000021417001210400C61C012F817000D2BB +:10F88000002501980078FFF7F1FC2C498000401812 +:10F8900040684078032800D0002511F0CEED002804 +:10F8A0000DD1002D0BD0022011F0CAED002806D09A +:10F8B0000020307020000CF0FEFF0020FEBD032071 +:10F8C000F7E7F8B5070002293FD3891E0D063878FF +:10F8D0002D0EFFF7CBFC022837D1BC1C002651E0CF +:10F8E0002078002833D001282FD1A01C0B2D2CD339 +:10F8F0000B3D01782D062D0E022926D141780429D1 +:10F9000023D18278417912061143C2780379120417 +:10F910001B021A431143801D0278032A15D1427835 +:10F92000012A12D36B1C9A420FD80904090C07E074 +:10F9300084E00004D8F10004DCF1000424F300B0FA +:10F94000801C04F0EDFE002818D10320F8BD062D20 +:10F95000FBD360780428F8D1A178607909060843C0 +:10F96000E1782279090412021143AD1F08432D06E4 +:10F9700000042D0E000C04F0F1FEE4E76078A41CF6 +:10F980000419761C7878B042AAD80020479C62BF40 +:10F99000010000001CF000A0000200008EAABB1EA7 +:10F9A000F8BD10B5FFF797FF04000BD101200CF054 +:10F9B00084FF4F2202700222427001228270C470C2 +:10F9C0000CF083FF200010BDF3B581B00CF073FF85 +:10F9D0000500C41C02980126032703285AD3029865 +:10F9E000401E0006000E029001980078FFF748FCC8 +:10F9F00002284FD101984078002823D0012849D10E +:10FA000001980299C01C082944D30178022941D1E8 +:10FA1000417804293ED18178427909060A43C178A8 +:10FA200000790904000201430A43009204F0ABFE8E +:10FA3000009AF12182422DD2009A801AF12814D91D +:10FA40000E0014E004F09FFE0299022922D3002246 +:10FA500004216270A170010EE170010C2171010A94 +:10FA60006171A0710726227015E00604360C012092 +:10FA70006070B01CA070E770267100993200090414 +:10FA8000090C601D04F066FE0020761D3604360C5D +:10FA9000207000E0277024784F2028706F702800B5 +:10FAA000AE700CF012FF2000FEBDF7B5901C1500E3 +:10FAB0000606360E30000CF000FF009A0400002706 +:10FAC000C01C3900002A00D1032101704570019942 +:10FAD0002A00801C3AF3F8EA6F202070677020003B +:10FAE000A6700CF0F2FEFEBD70B50400FC4D0026C1 +:10FAF000297B012800D0E97B052914D011F0AEEC58 +:10FB000011F0B0EC200011F0B2EC00280BD0A87C72 +:10FB1000002800D001240120012C00D10020002168 +:10FB200011F0A8EC0600300070BDF8B500240327E2 +:10FB3000EB4D2600287D00280BD0012821D002287B +:10FB40002BD0032845D1012011F098EC0420287512 +:10FB50003DE0687C002807D00220FFF7C5FF0028A1 +:10FB60000CD0012028750AE0A87B002806D00120CF +:10FB7000FFF7BAFF002801D02F7500E001246E7452 +:10FB80001EE0012011F07AEC0121080011F072EC66 +:10FB9000002817D002202875F8BD01209AF7CB82E3 +:10FBA0000100000018F200A0000200007A4205A344 +:10FBB00011F06EECA87B002808D00120FFF79EFF13 +:10FBC000002801D02F7504E0012402E004202875EC +:10FBD000EE74AE73002C06D0042028756F756E7419 +:10FBE000AE73EE7402E0287D0428DFD100210120ED +:10FBF0000AF061FCF8BD10B5BE4CA07B002807D10F +:10FC0000607C002804D1002101200AF054FC10BDC2 +:10FC1000B94800688047E07CB849002804D00868EB +:10FC2000804703206075EEE7627C0120002A00D047 +:10FC3000A074E0740868804700202075FFF77FFFFC +:10FC400010BD7CE7AB490120C97C002900D0002011 +:10FC50007047F3B583B005000026049C641C02289D +:10FC600015D100202070A64901206070097BA17089 +:10FC7000E41C207002206070A2480226017AA17064 +:10FC8000407AE070241D0021282001AA02E0002112 +:10FC9000272001AA9C4B1F686B46B84702202070A2 +:10FCA0000820607002000199A01C3AF318EA6078FD +:10FCB000761CA41C36060419360E022D01AA02D1A8 +:10FCC00000212D2001E000212B208F4B1F686B4667 +:10FCD000B84703206B462070187860701A78019935 +:10FCE000A01C3AF3FCE96078A41C0419761C3006C9 +:10FCF000000E022D02902AD104202070834E26226D +:10FD000062703168A01C3AF3EAE96078029FA41C93 +:10FD1000041905214C222170627031687F1C263144 +:10FD2000A01C3AF3DCE96178A01C0C180621132210 +:10FD30002170627031687F1CA431A01C3AF3CEE9B7 +:10FD40006178A01C0C187F1C3806000E029007205A +:10FD5000207000200600A71C6070062070436C49CC +:10FD600041188878A84207D160780622C0193AF372 +:10FD7000B6E96078801D6070761C3606360E042E5B +:10FD8000EBD314E006217143614809184878002834 +:10FD90000AD08878A84207D160780622C0193AF3C1 +:10FDA0009EE96078801D6070761C36060A052D8DF0 +:10FDB0000100000014F400A00002000063BADBD3CD +:10FDC000360E2C2EE8D36078049AC1190298401C94 +:10FDD00010700498081A0004000C05B0F0BDF7B5C7 +:10FDE00082B00024170001297ED3027802290192F3 +:10FDF00000D3441C491E0806000E039001987AE0C7 +:10FE000062780399901C88426FD80398801A801EEC +:10FE10000006000E039023783AF358EB0862050BB6 +:10FE2000161C20272C623C48A1780172E1784172AF +:10FE300056E013002820022F00D027203A4DA21CA4 +:10FE40002D680021A8474BE013002D20022FF5D08C +:10FE50002B20F3E73248A11C006803E03048A11CC6 +:10FE6000006826303AF344E93AE02D48A11C0068C6 +:10FE7000A430F7E7A61C38000BF08FFF29490025B6 +:10FE80000620684340188278BA4205D172784270E1 +:10FE90006078B61D801F60706D1C2D062D0E042D20 +:10FEA000EED318E0062169431E480818417800295E +:10FEB0000ED13178891CA9420AD1B178B94207D153 +:10FEC000062231003AF314E96078B61D801F607095 +:10FED0006D1C2D062D0E2C2D02D260780028E1D14C +:10FEE0006078A41C041901E007E025E00198401E99 +:10FEF0000006000E0190002882D10C4A012F17D174 +:10FF00000021252016E0000070EF00B0CCF20004C4 +:10FF1000D0F2000460EF00B090ED0004ECF10004BA +:10FF200008F20004ECED0004F0F10004F8F1000424 +:10FF300000212620126890474FE70000FF4810B5C7 +:10FF4000016B490849000163FC48403001694908D8 +:10FF500049000161F94880300168490849000160A1 +:10FF6000F7480068804755204006026902218A430D +:10FF70000261C160F3480068804710BDEF4A01216B +:10FF80008032030000B53AF3A2EA09060B0A111504 +:10FF9000061106110A00E94A106B0843106300BD00 +:10FFA000E648403002690A43026100BD1068084318 +:10FFB000106000BD90690843906100BDB14BC26CF8 +:10FFC0000100000010F600A0000200009752656ECC +:10FFD000DF4B002A10B505D1002903D05A681C0652 +:10FFE00022435A60002902D00121490701E0012182 +:10FFF000C9070843586010BDF8B5D54B9A6B20244B +:020000021000EC +:10000000A243C5070124002D01D0224301E052087C +:1000100052009A63CE4B40331A6A0225AA438607E0 +:1000200001D5224301E0520852001A62C84B8033C6 +:100030001A6AAA43FF256D1CAA43050701D522436E +:1000400001E0520852001A629A68450701D522431E +:1000500001E0520852009A605526BE4DBE4F76060A +:10006000002807D128688047306940084000306187 +:10007000F4600EE000070ED0002904D00022012118 +:100080000A20FFF7A5FF28688047F4603069204305 +:10009000306138688047F8BDAD48416802061143B9 +:1000A00041607047704755225206516B2023994397 +:1000B000400101431820814351637047F8B50600A1 +:1000C0000020FFF7F0FFA548C06A01214905084359 +:1000D00049008843A149C862552252061168102080 +:1000E000014311609D4A9E49D1639E4AFF21083118 +:1000F00011609B49891F9162954CE36801210B4374 +:10010000E360002E02D1536A03435362904D803561 +:100110002C6B914F84438F48002E06D100680C430E +:1001200080472C6338688047F8BD06000068804728 +:10013000286B20210843286338680C4380473068C7 +:1001400080472C6338688047FFF7A6FFF8BD70B57D +:1001500006000C00FFF7FCFE7D4D8035002C04D01E +:1001600000210800FFF748FF09E07A48006880474F +:10017000286B202108432863774800688047286B54 +:10018000400840002863002C08D0774800780328F6 +:1001900004D1042002F07AFC01F041FB6C48C168F4 +:1001A00049084900C160002E05D05521490608685C +:1001B00002221043086070BD10B511F082E90028DA +:1001C00002D0012108000CE011F05EE9D006A4681D +:1001D000010000000CF800A000020000504B673343 +:1001E000032806D101210800FFF7BBFF11F076E9D3 +:1001F00010BD01210020FFF7B4FF10BD55204006BF +:100200000168022211430160704770B50C0000259F +:1002100003003AF370E9090A1D2521250A0A06069A +:100220002500002C1CD1564C1AE0002C18D1554842 +:10023000407803280AD005DC002807D001280FD118 +:10024000514C0DE0082801D00A2809D14F4C07E095 +:10025000002C05D14E4C03E0002C01D1092464058B +:100260004C488078002801D14B4824184B488442E0 +:1002700000D90400002A03D00125280001F073FBF7 +:1002800060004008E9070843364988604449012076 +:10029000087070BD3348434941614349C161FF2142 +:1002A0000A310161816170472F4810B500688047AD +:1002B0005520400601680122920291430160816845 +:1002C0000322114381600169FF22521C91430161A5 +:1002D0000021816125480068804710BD264870B51F +:1002E000403041680126314341604168B14341607B +:1002F00055246406206830432060C046C046C0468E +:10030000C046C046C0462068102108432060FFF761 +:10031000CBFF206808210843206000210800FFF778 +:1003200075FE134D40352869310208432861FFF7F7 +:10033000B1FF002020613F20E0610D488030C1689E +:10034000F82291431831C160184846711848006876 +:100350008047E96840208143E960296901432961B8 +:10036000034927E0400000AACCF20004D0F20004C8 +:10037000400100AA03060000000800AA295B00B0A3 +:10038000FF0F000080ED000410350600D4090000C6 +:10039000D008000483ED0004AC080000FFFFFF0F4D +:1003A000005B00B0001000AA001200AA001F00AA03 +:1003B000BCF000044039086A072212069043AA04E0 +:1003C00080180862D0132860FF48016B3F22520654 +:1003D0009143EA048918016370BD70B56BF429ED8F +:1003E0000100000008FA00A000020000A4A3D98EBA +:1003F0000500FA4CE06805D1F9480078032801D1DE +:1004000001F021FA5520400601680822914301605D +:10041000416B202291434163F348F249D2000160CD +:10042000F24B2B214905D963F1498162EB484030F9 +:1004300081681F231B02994305235B02C918816051 +:10044000A06B80218843A063002D05D1A0691043D3 +:10045000A06120691043206170BD0021080010B523 +:10046000FFF7DEFDFFF788FDFFF71EFF5520400672 +:100470000168082211430160D949002048700870C2 +:1004800010BD10B50400002155204006C06942008F +:10049000D20D8002400F02D0521C1204120C002A0E +:1004A00006D0D44822600168D34839F340EE0121D8 +:1004B000002902D10020206010BDCF4810BDF7B543 +:1004C0000D00C64FB869FF21491C0843B86138695F +:1004D00008433861C94800992A0039F328EE022000 +:1004E00055267606F060C6480068804730690224C9 +:1004F00020433061C34800688047C3480678FEF750 +:10050000CAF9002804D1029900223000FFF787FEC3 +:100510003300B24EFF21090228020122803639F34E +:10052000F4EF09063463404A064006406300AB4BD3 +:100530001E6BB54F00237F78002F04D101231B06CB +:100540001E43102302E001273F06BE438E430643AD +:10055000F0208643AD481643264386439F480663F2 +:100560000099097850290ED020210B4313439B4A50 +:1005700080218B43403291681F242402A14305242B +:1005800064020919916083632EE0944A4032136932 +:100590008B43034323431361106A400840001062F9 +:1005A00022E03368E027BB43A0338B43034313436C +:1005B0002343336018E0B7698F430743274317434A +:1005C000402087439248007801280CD0B069400849 +:1005D0004000B061FFF774FDF06A002200010009DD +:1005E0000121FFF709FDB761002000E0EFC9A61166 +:1005F0000100000004FC00A000020000BD5B07FE3B +:10060000401CA842FCD3FEBD7948C0684006800F5C +:10061000072800D908207047FFB5022055241D0087 +:10062000640681B0E0607B4800688047206902264C +:10063000304320617848006880476D4FB869F10108 +:100640000843B861386908433861FEF72EF90400A1 +:100650006D4800210838012D02D0022D02D100E0A2 +:1006600001210170002C03D06F480078042826D1A6 +:10067000002D1FD000210800FFF7DCFC022D19D14E +:10068000B86869070843B860002001F080F92020AD +:1006900055214906C8605F480068804755204006DC +:1006A0000069202188435521490608615A4800689D +:1006B000804704E0039902980022FFF7BAFD0198F1 +:1006C0004B49029B0002403139F328EF09063FB441 +:1006D0005F70065F065FB4003B6B504842780120B4 +:1006E0000006002A01D1034300E08343FF200002FB +:1006F0008343019821220006000C03434848E03060 +:100700008343334301201F2603433602002C09D1C3 +:10071000FFF77AFF002805D18868A122B04301269F +:10072000360303E08868B0430526760280198860A6 +:100730003A484078002801D110200243BA633B6355 +:10074000086940084000086118E0294940310969FA +:100750000122FF2311431B02994301433143012C22 +:1007600005D1234B4033186A1043304318622048A8 +:1007700040300161386B4008400038631C488030CD +:10078000016849084900016054E0A02202430120A9 +:100790000243174832438030026008694008400035 +:1007A0000861386B40084000386343E0104F8037E1 +:1007B000B969019B4022002B01D1114300E0914314 +:1007C000FF2212029143014303200143B8690E0046 +:1007D00040084000B861FFF77DFCF86A0022000184 +:1007E00000090121FFF712FC012C22D1386A1DE01B +:1007F000400000AA295B00B01083000050F9A076E9 +:100800000100000000FE00A00002000049B3B9434F +:10081000000800AA400100AAFD050000085B00B026 +:1008200088EF00B0001000AACCF20004D0F200045F +:1008300080ED00040C008000325C00B088F200B053 +:10084000032108433862BE61002D0DD002980428B0 +:100850000AD0002C03D0FB480078042804D10022E1 +:1008600001210A20FFF7DCFB05B0F0BD7FB50028B1 +:10087000F54D2CD001AA02A903A86B4604F00BFD8C +:100880006B46187A002803D0FF21FD31880002E072 +:100890000121490288006B461A7B0400002A02D11C +:1008A00089008000A4004A00852312185B01D21839 +:1008B0006B461B79022B04D1602359430818001999 +:1008C00082182C68042100200123A0477FBD00224C +:1008D000042110002C680223F7E755204006C06968 +:1008E000DA494000C00D8880C88008007047D749A9 +:1008F00000201031C88008007047D5488169FF2268 +:10090000521C11438161704755204006C0690006A2 +:10091000C00F704770B50126360303207500000331 +:1009200055246406E060CB48006880472069304366 +:1009300028432061C8480068804770BDC54810B58D +:100940000068804755204006016903221203914345 +:1009500001611100C160C0480068804710BD70B5DA +:100960000500BC4800688047B64C2034A0780128B8 +:1009700002D0022806D101E0FFF7B6FB00210800F3 +:10098000FFF70DFCFFF7C6FF0320A070B34900225C +:100990002800FFF758FC202055214906C860086947 +:1009A000202210430861FFF7AFFFA94A00280ED0AC +:1009B0000B69012003430B61072D14D0082D04D1CE +:1009C000A34B80339968014399600420A07090681C +:1009D00001214907084390609A490020C8719E4848 +:1009E0000068804770BD916B01439163EDE79848C3 +:1009F00000B5016B490849000163016B01221143F5 +:100A000001631B2000220121C001FFF7DA4A04958F +:100A100001000000FCFF00A0000200008D66666877 +:100A200009FB00BD00B5FFF705FB00BD002211006A +:100A300000B5FFF7FFFA00BD8A4810B580680401D1 +:100A4000240905F028F8002801D08A48807A002877 +:100A50000AD001280ED0022818D0032810D1012076 +:100A60000004854900190AE001208349C0040019E7 +:100A7000383104E0012080498004001918314418FD +:100A8000002211002000FFF7D5FA10BD01207A499D +:100A9000400400190831F2E710B5724A040008005A +:100AA000116B4908490011636E4A403211694908C7 +:100AB000490011616B4A8032116849084900116090 +:100AC0009169490849009161FFF794FAFFF716FB15 +:100AD000002201212000FFF7ADFA10BD70B50D0016 +:100AE00060490400C031886A644AC008C000C01C64 +:100AF0001040FF22D20080180322120490430A0201 +:100B0000801888620020FFF70BFB002D04D001F055 +:100B100036F88007400D0419102055256D06E86051 +:100B20005148006880472869102108432861012244 +:100B300011002000FFF77EFA02F096F8514BE10910 +:100B40001C681F314E4A0023A0474F4901200870FE +:100B500046480068804770BD002810B505D141485F +:100B60008169FF22521C114381613F480068804720 +:100B70005524640620691021884320613B480068A1 +:100B80008047E0694009C00704D0E069202108439C +:100B9000E061012010BDF7B584B0002407001B20E0 +:100BA000019006982500260004280394029403D09F +:100BB0000599380000F0D8FD2A490322069BFC2045 +:100BC0001203803139F3BEEC090680CFDCFA06DC73 +:100BD00006DC4700002F61D0012F63D0022F66D0C2 +:100BE000032F02D1294C2A4D2A4E1E4A4032D36887 +:100BF0001B0F1B072343D3601A4BDD631660556838 +:100C0000AD0AAD02FF3531355560059A002A53D043 +:100C1000012A54D0022A54D0032A00D10C0E48DBFA +:100C200001000000F80101A000020000BF0D01D783 +:100C3000164C5A6B120F120722435A634A6B8243B7 +:100C4000FF20000282430120C0031018032210433A +:100C50004863886B154A1040032212068018800BE7 +:100C6000BF228003D20080188863D4E088F200B0ED +:100C70005CF10004085B00B0400000AACCF2000464 +:100C8000D0F20004FC3F000067DF00045C040000B9 +:100C90000780FFFF6B22010030F300042C5B00B0E3 +:100CA000441A00000A121A02131B2428FFFF00C076 +:100CB000F84CF94DF94EA2E7F64CF94DF94E1B3CB4 +:100CC0009DE7F44CF84DF94E2B3C98E78324E40063 +:100CD000AFE7F74CADE7F64C103CAAE7002F33D056 +:100CE000012F36D0022F39D0032F03D1F14BF24D13 +:100CF000F24E03934B6B8343FF20C83300028343C0 +:100D00009818032210434863886BED4A104005226F +:100D100052058018800B8003A0308863E94903984E +:100D200008624D628E62086BE74A000F0007801868 +:100D300008630598002816D0012816D0022818D07C +:100D4000032818D0029812E0E04BE14DE14E0393E6 +:100D5000D0E7E14BE14DE24E0393CBE7E14BE24DAF +:100D6000E24E0393C6E7E24800E0E24802904861A1 +:100D700051E0E148FAE7E148F8E74B6B8343FF2095 +:100D8000C8330002834398180222104340084000F1 +:100D9000486340E01F230193A7231B014B60672397 +:100DA0009B01CB600B614B6B8343FF20C833000278 +:100DB00083439818032210434863886BC04A10404D +:100DC000052252058018800B8003A0304CE7FFE716 +:100DD000086A20221023042F01D1904306E0052F3A +:100DE00001D1904307E0062F02D11043984303E05E +:100DF000072F01D1104318430862C869020F8320EE +:100E0000120740011018C861C86A020F212012079A +:100E1000C0011018C862AB498031C869B84A104097 +:100E2000019A12041043C86107B0F0BD0215D964DD +:100E300001000000F40301A0000200009F69625459 +:100E4000B54B10B501241C7058709970DA7010BD44 +:100E5000B14A1378002B04D10822027000200A70D6 +:100E60007047537803709078087001207047F3B58D +:100E700003009948C030C16B012500222D050327CE +:100E800014006E107F0539F372EB0906150A151D63 +:100E9000061506150A00019A002A0BD103E0002A64 +:100EA00006D0002C02D1A943314305E0002A05D128 +:100EB000002C0AD02943B143B94306E0002C04D0EA +:100EC000002A02D0A943B1433943C163FCBDF7B541 +:100ED00082B00026029837003400350009280196B8 +:100EE00002D00398092802D10020029003900399B0 +:100EF000029800F04DFC7848049B403039F336EB03 +:100F000009064B36CAD206CA06CA36006D4A6D4B70 +:100F100002986C49103A183B002828D001282BD0A1 +:100F200002282DD0032802D17C4C7D4D1E006A483A +:100F3000C7683F0F3F073743C760674F403FFC63B9 +:100F400005604468A40AA402FF3431344460039865 +:100F5000002819D001281AD002281AD0032800D15D +:100F60001E00786B000F0007304378639AE4554EFB +:100F70004E4C4F4D1736DAE76A4C6B4D0E00D6E7F4 +:100F80006A4C6B4D1600D2E74E4E5B3EE9E70E0011 +:100F9000E7E71600E5E70023029E180019001A0093 +:100FA000002E59D0012E5BD0022E61D0032E06D127 +:100FB0000223604F604D614C180019001A00604E0A +:100FC0003E40BF01BF0DFB181B041E43E30A64052E +:100FD000640DDB02241A23435A4C5B4F1C401B0355 +:100FE000DB0D5B1ADB021C4323006400640DA41AB2 +:100FF0003B4024052343EC0A6D056D0DE4022818DF +:101000000443504820402403E40D6118C9020843FA +:1010100004004000400D304980183C400005044366 +:101020000E624B628C628869FF22120490430B228D +:10103000D20480188861086B444A000F2290B1AD39 +:1010400001000000F00501A000020000521D611A1D +:10105000000780180863039800281BD001281BD0C4 +:1010600002281DD003281DD0019817E03D4F3E4CAB +:101070003E4D02E03E4F3F4C3F4D102318001900FB +:101080001A00A6E70423180019003C4F3C4C3D4DC4 +:101090001A009EE7204800E02048019048610BE4D8 +:1010A0001F48FAE71F48F8E73521C90141601521BB +:1010B000C901C160016163E766E00000771A0000C2 +:1010C00066A6E60299D917D92E4E6E024F6F908808 +:1010D000162636022737484874040000000703002C +:1010E000090890000C20C000FFFF00C0800000AA8B +:1010F0008C150000003F11004F78F00459C890058E +:10110000001F0900273870022D68D002000F05006B +:1011100013183001173870010005085080020428A8 +:1011200040010214A000010AFFFF00F0025B00B0C2 +:101130000A151E02141D281831517102507090605A +:10114000192939022838483000076000C000020C15 +:101150009880C009FFFF00FCFF07F0FFFFFF0F8032 +:10116000F7090000003F0003F884874F90850C5971 +:10117000001F800178828327D082062D000FC000D7 +:10118000388181137081031711210902C1627F2107 +:101190004901C161F4E600221100100010B5FFF70B +:1011A00018FDF9488169FF22521C1143816110BD6D +:1011B000F8B50500F44C276BA069FF21491C0843D2 +:1011C000A061206908432061FDF7A1FB002804D13C +:1011D0000022EE491000FFF75EF8ED485526057035 +:1011E000E0200743EB48022587430C2007430120FA +:1011F000C00587432F43400087437606F560E648E5 +:1012000000688047306928433061E44800688047BF +:101210002763DD49252040318A681F231B029A433A +:1012200005235B02D2188A60A063F8BDF8B5D64CDE +:10123000276BA269FF21491C0A43A26122690A4364 +:101240002261D34902250870E0208743021C2F1336 +:1012500001000000EC0701A000020000DFA1A55280 +:10126000D448803787430C2007432F430803874324 +:1012700055267606F560CD480068804730692843DA +:101280003061CB48006880472763A06B2121084369 +:10129000A063F8BDFEB50C001500C0490A6B0192B1 +:1012A0008A6B00928B69FF22521C13438B610B697E +:1012B00013430B610100BB48220038F37EEF661E2A +:1012C000002D00D126000022B5491000FEF7EDFFE9 +:1012D000022055277F06F860B448006880473869C7 +:1012E000022108433861B248006880470198E02134 +:1012F000884369010843FF210902884331020843FA +:101300001021002D01D0084300E08843AA4A08219B +:101310000843904302221043A04A10630098072319 +:101320000843491B1B0249079843490D0843D9004C +:1013300088430721091BC902084321210843974D0F +:10134000802188434035A9681F231B029943052348 +:101350005B02C918A96090633869D10308433861FA +:10136000F960002002E0401C0006000EA042FAD303 +:10137000FEBD55225206D26953041B0F5205520F6F +:1013800003700A700078104300D001207047F3B555 +:1013900081B0824C266BA76BA069FF21491C0843D2 +:1013A000A061206908432061022055256D06E86090 +:1013B0007E480068804728690221084328617C48EC +:1013C00000688047E0208643029840010643FF20E2 +:1013D00000028643019800020643102086437648A7 +:1013E0000A30064321200743A7632663FEBD002180 +:1013F0000122080010B5FFF7F6FB68493F20000105 +:101400004031C86165488269FF21491C0A438261F5 +:1014100002690A43026110BD00210222080010B5D2 +:10142000FFF7E1FB5D488269FF21491C0A438261A5 +:1014300002690A43026110BD0322010010B5FFF7E3 +:10144000D2FB56488269FF21491C0A438261026926 +:101450000A43026110BD554810B5006872224CC0A5 +:1014600001000000E80901A00002000061ECDDFAC3 +:1014700080475521490608692022400840009043D2 +:1014800008615048006880474949803188680422D3 +:101490009043886010BD10B51400002909D00028C1 +:1014A00003D00422072108000CE0042205210800D3 +:1014B00008E0002803D004220621080002E00422EC +:1014C00011001000FFF799FB3948FC218030426B76 +:1014D000022C02D18A43C83200E08A434263344876 +:1014E0008269FF21491C0A43826102690A43026141 +:1014F00010BD002810B501D1002200E00322010038 +:10150000FFF77BFB2A488269FF21491C0A4382615D +:1015100002690A43026110BD10B50400010000F029 +:1015200055F9002C01D1002200E003222100200007 +:10153000FFF763FB10BD1E48C0684007800F0728F7 +:1015400000D908207047F3B581B00F001C4800682F +:101550008047552464062069022540084000A843BE +:1015600030218843E901084320610126FF203430FF +:10157000E0601448006880470D48C168B143C1600D +:1015800020686902084320600020002F00D004205A +:10159000019A7821022A02D18843183000E088435A +:1015A0000B49A843096830430E70A060FEBD0000DF +:1015B000400000AAD4040000001000AA10FF0000A0 +:1015C000CCF20004D0F2000410FF80000400800080 +:1015D000340300040222002810B500D10122824CFD +:1015E000824862700029417011D181480921027836 +:1015F0000800FFF78AFC60780121FFF7A4FF7D490E +:101600002020096888477C4901200968884710BD67 +:1016100010B5764CA41C2078002819D0002020702A +:101620006178E078FFF741FCE278A1786078FFF715 +:101630006CFCE07800280BD17048C168C268090FC3 +:1016400009071201052312091B02D2181143C160B8 +:1016500010BD67484078032805D169480078022802 +:1016600001D1002070470120704764487BE7BCA18E +:1016700001000000E40B01A0000200004188BE79D7 +:1016800010B54038C06964490005000D4118552067 +:101690004006C0694000C00D022802D9801E000427 +:1016A000000C0922092800D802005C4C2000E280CE +:1016B0000C38A28038F394ED20000C38206010BD67 +:1016C00056487047012055214906486070474C48EC +:1016D000407870474A4900204870704755204006BE +:1016E000C069010C490701D1002070474003400F39 +:1016F0000128FAD0022801D0032801D10320704725 +:101700000428FCD009207047414910B540394A02ED +:1017100004234C040028886B07D010438863886B2F +:1017200018438863086B204306E090438863886B06 +:1017300098438863086BA043086310BD344B10B511 +:101740008033D96A4904490E0180DA6A5206520E82 +:101750004280DC6AE40BE40701D049420180D96A87 +:10176000C909C90701D051424180D96A4900490CD1 +:10177000818010BD2A4A10B5936A3824A343C00063 +:1017800003439362906AC008C0000843906210BD92 +:101790001F488030C16AC2051143C1621C494039EB +:1017A0008A6B01231A438A63816AC908C900891DAB +:1017B0008162704716484038816B4908490081634F +:1017C00013488030C16A49004908C162816AC9086A +:1017D000C900C91C8162704710B500F085FC10BDBE +:1017E0000B4B10B5403BDA686024A2434001024332 +:1017F0000620824348000243DA6010BD415C00B01D +:10180000005B00B080ED0004D8F20004D4F20004C4 +:10181000800000AA67DF0004001000AA94F000B066 +:10182000000C00AA54490020087048707047F8B5B1 +:1018300001252D0455246406E56050480068804762 +:101840002069284320614E48006880474D4CA06BBA +:10185000E069A9110843E0616168474F3F267F1E98 +:10186000387876064206B143114329433212914338 +:1018700040040143FF20FD308143803118B96EA43C +:1018800001000000E00D01A0000200008CFCBD374B +:1018900048004008606020698021484020610A209B +:1018A00001F06CF9206A2A12104353001843206299 +:1018B000A06801210843A0600020C046401C00062B +:1018C000000E2028F9D36068A168C909C90708D0AB +:1018D0000121C9070843B0433E783F21B14349067F +:1018E0000843A8436060206A904398432062E069FF +:1018F0000121C9020843E06121694020814321613F +:10190000E1680143E160214902200870F8BD70B52B +:10191000214EC03E306B0821884330631E4C403C52 +:10192000606AFF252D0228436062194800688047DD +:10193000306B202188433063606AA8436062154899 +:10194000006880470020C046401C0006000E50285A +:10195000F9D3606A0521A8434902401860620E4C21 +:10196000E069032149030843E061E06880214840C1 +:10197000E0600CF03EF9E16840208143E1602169BC +:101980000143216101490020087070BD295B00B04E +:10199000CCF20004D0F20004800100AA10B5F0F7E8 +:1019A000F5FC0006000E10BD224810B50178002994 +:1019B0000AD00178491E01700178002904D14068DD +:1019C000802802D1F0F23AEB10BDF0F242EB10BDEC +:1019D000002010B5F1F796FCF3F706FB0128FBD1C8 +:1019E0001449002008700872487201F0E8F808F005 +:1019F0005DFC03F0C9FB03F0B9FE34F3D9FC08F039 +:101A0000F1FA05F071FE08F052FA04F0FDFE0AF05A +:101A1000B1F9FFF711FF03F049FCF1F7FAFC10BD33 +:101A2000054810B50068804708F07DFC01F03BF9DF +:101A300010BD000004E0000478F00004FF480079C5 +:101A40007047FE4908717047F3B508000E0081B079 +:101A5000FFF7C8F8FA490400486A10229043486228 +:101A600000210800FEF796FBF649C86A01225205DC +:101A70009043C86201F03EF9F34909688847F34989 +:101A80000120096888472000F14DF24C1036615260 +:101A900001000000DC0F01A0000200005E302B5EA0 +:101AA0000027002834D0002E30D0EB4A803A9068CE +:101AB000400840009060ED49886B40084000886312 +:101AC00001980123072805D0082806D1106818437B +:101AD000106002E0086B184308630220A070002227 +:101AE00001214002FEF7EEFFA07900280CD0A07B78 +:101AF000012212038240DE48DE4B01781E68E07945 +:101B00000023B047A771E77102201DE040201BE0D1 +:101B1000002E18D0D4482038007804280DD1296828 +:101B20004020884700210800A770FEF792FBA079AB +:101B3000002801D0A771E771FEBD296804208847FD +:101B40000420A070FEBD102029688847FEBDCA4948 +:101B50000978002900D181E7552149060A69102337 +:101B60009A43520852000A610122CA601100F2E74A +:101B700070B50020B649B84C0870606A012636047A +:101B800030436062606A750028436062042000F0A0 +:101B9000FFFF606A28436062042000F0F9FF606A7A +:101BA00028436062042000F0F3FF606AB043606283 +:101BB000B24800688047AE480078FFF7C8FFB048D9 +:101BC0000068804770BDA94810B5816B490849007D +:101BD000816301F0B6F8FEF7EAFE10BDA9489C4902 +:101BE00040788979884201D10120704700207047F0 +:101BF000552010B50024400604610CF02FF9FEF7C3 +:101C0000E5FB0FF0E8EC0BF0ADF8914901204870CE +:101C1000881C0470012010BD8D48C01D704710B590 +:101C20000FF08DF810BD8A4810B54179002908D110 +:101C30000121417155204006806A8003800B0FF01E +:101C400067F810BD10B500F0C1FE10BD8748816B6C +:101C500049084900816385484030016A49084900C4 +:101C600001627D4880388168490849008160016AC5 +:101C700049084900016255204006016949084900A8 +:101C800001610121C1607047F8B50500FCF771FEE4 +:101C9000002804D074482038007804284873D0867F +:101CA00001000000D81101A000020000060FA43AB4 +:101CB00048D10020012455277F06FC603969202681 +:101CC000A143B14339612B0038F396EC090816752E +:101CD0003F26083F063D750000F093FE6848816B83 +:101CE00049084900B1438163016B49084900016318 +:101CF000016B2143016360E061484030016A0222C8 +:101D0000490849009143016201694908490001619C +:101D100001692143016154E054488038016A49084F +:101D20004900016281694908490081618169214353 +:101D300081615A4CE078002843D00020FEF7FAFD7C +:101D40000020E070F8BD00F05CFE534B987800284E +:101D500027D044498879401C0006000E88715A78C3 +:101D6000824210D9464A9068130200010009C01847 +:101D70005306184390600C713869304338613869F4 +:101D800020433861F8BD394980398868042290437E +:101D900040084000886038694008400038610020F1 +:101DA000987032488038816849084900816001682C +:101DB0002143016001E00028E4D1082D03D0072D64 +:101DC00001D0FEF793FE03F0C0FE002802D003F01E +:101DD0008AFDF8BD27490120096888472649402027 +:101DE00009688847F8BDF8B5552507006D06E8690C +:101DF0000126C009C1071B48204C801C002901781E +:101E00001ED0002907D10670072F01D0082F03D15B +:101E1000380000F007FEF8BD09200BF0D5FD0028C2 +:101E200008D0A078002801D1022068600420A070AA +:101E30001B4806700F4901200968884704206BE0A1 +:101E40000029E8D000250570072F01D0082F49D1BF +:101E500000200090FEF7D6FDA07804283AD005288F +:101E6000D9D11FE02C5B00B0000800AA400100AAF5 +:101E700038F30004D4F20004D8F20004A8F200B051 +:101E8000400000AA80ED00045CF10004325C00B068 +:101E9000CCF20004D0F2000483ED000482F200B022 +:101EA000295B00B0FF490878042806D10AC8057FDD +:101EB00001000000D41301A000020000266BC7B986 +:101EC000C879002814D1FD480078032810D1FC49B6 +:101ED000A670CD7021784B200001012900D105208A +:101EE0000099FEF75FFEF8BD3800FFF7E1FEF8BD90 +:101EF0003800FEF7A2FDF8BD09200BF06FFD0028A9 +:101F00000FD0A07804280CD1EC490878012806D01D +:101F1000022804D0032803D1FFF717FD00E04E701C +:101F2000A570E8490120096888470820E649096842 +:101F30008847F8BDE249891C08707047E048801C5A +:101F400000787047E14A10B5916984071023002C8E +:101F500001DA194300E09943C3070820002B01D0A0 +:101F6000014300E08143916110BDFEB50020009067 +:101F7000FFF7DCFB0700FEF71EFD0500010038003F +:101F800001AA0BF0BCFB6B461879042877D059796D +:101F9000FF29FBD0CE49401800780607C648360F07 +:101FA0002030072E02900FD0C4490878012806D0AF +:101FB000022804D0032804D1FFF7C7FC01E0012068 +:101FC0004870029800218170C24C3300042038F31D +:101FD0001EEB0A0639181B88272F5C802F946B464E +:101FE000587901282ED001E060707DE0002020703B +:101FF0000320607003F03BFD00210120FEF792F802 +:102000005EE000202070EFE755235B061A6901218E +:102010000A431A6121706070042003F028FD89E0F2 +:1020200000210800FEF77EF8032020700220DBE785 +:10203000092E03D16B4658790328D7D06B465879BF +:10204000012803D1002020700120CDE7022005F0F7 +:10205000A9FB00210800FEF765F8002F10D105202C +:1020600020709A484038C168052209010909120206 +:102070008918C268120F12070A43C2605AE03CE096 +:10208000032F57D10620207054E00BF0AFFD00283D +:1020900033D08E49086B082528430863042005F0D7 +:1020A00081FB02990520887000210800FEF73AF8AC +:1020B000002F03D0032F3DD125703BE0D0FB1D6FD7 +:1020C00001000000D01501A000020000EB1FC4F7C2 +:1020D0000720207082484038C1680A010521120992 +:1020E00009025118CFE72070052060702868007839 +:1020F000FFF732FF02E00098002825D07B4B617883 +:1021000020781C6800221300A047052801D1002078 +:10211000FEBD774800688047032F07D0A8880228B3 +:1021200004D9801EA880E888801EE8800022012152 +:10213000280008F037FF002804D167490220096809 +:10214000884701E0FEF751FC0120FEBD6148C068F0 +:102150007047F1B5012082B00190FCF728FC040023 +:1021600055267606F0695B49C860810240004D0F34 +:10217000C70D002C03D05548007804280AD100F080 +:1021800043FC5C480078012804D15549086B0822BB +:10219000104308635520400601690122520591430E +:1021A00001614A49029B042005222031012638F3AF +:1021B00038EA09061B792175062119197900484961 +:1021C00080390A6B824332430A63002C03D1086BC7 +:1021D000C008C00703D1886B8008C00762D0002008 +:1021E00001905FE08A705DE03D4940390869304305 +:1021F000086157E0404B997800294AD0354A9179D7 +:10220000491C0906090E91711A0052788A421FD999 +:10221000334B9A68324302439A6088030121C90311 +:10222000401800221100FEF76BFC2D4980398868A8 +:102230000A020001000980184A061043254A167157 +:10224000886055204006016920221143016129E080 +:10225000234A803A91681306194391601D4A002170 +:1022600055235B0611711A6920218A431A61D960CE +:102270001B498A68824350084000886018694008FA +:10228000400018611C4A00209070086830430860C4 +:1022900008E0134801683143016003E01048816998 +:1022A000314381613800284333D00A48C068000CAC +:1022B000400749D10A488038816BC908C90730D125 +:1022C000806BC00BC0072CD1002D17E0674EE2D108 +:1022D00001000000CC1701A00002000066A300BFAF +:1022E00088F200B0295B00B02C5B00B0D4F200048F +:1022F000D8F20004C00000AA001F00AA80ED00046C +:102300008CF0000488F00004325C00B083ED00041F +:1023100011D0002F07D1042D03D0002C03D0072D9E +:1023200009D0012C07D1F8490822C8681043C860B9 +:10233000000C400712D1F548806BC00BC0070DD0D0 +:10234000002F0BD0F8004019092138F384E9002947 +:1023500004D0ED480822C1681143C16001980028EB +:1023600004D1E9480222C1689143C16003F00BFC2B +:102370000700E748C06F4178002907D0002141706D +:10238000FEF73DFB0021022008F053F9DE48C0684B +:10239000010745D0002C2FD0029B38F34CE90906E9 +:1023A000112D1822061806182D00D8490A6B52085C +:1023B00052000A638A6B202332439A438A631BE0EC +:1023C000D24940310A69520852000A610FE0CF49F0 +:1023D00080310A68520852000A608A6832438A6073 +:1023E0000AE0CA4980318A69520852008A610A6A41 +:1023F000022332439A430A62002F02D003F091FA7B +:10240000FEBDC44C400701D5082002E0FEF7F7FAF4 +:102410000120216888470120BF4909688847FEBD1F +:10242000FEF7DDFA0600019800280ED0B1880229D7 +:102430000BD90298032808D0062806D0082804D013 +:10244000891EB180F088801EF080002D05D0B088F4 +:10245000401CB080F088401CF080F088022826D113 +:1024600030680178502925D14078002822D1012CEC +:1024700020D105F087F9002802D00298052807D05E +:10248000A6484078002812D1A548407801280ED1EE +:102490009E48016B49084900016300210800FDF7CF +:1024A00055FEA04A0021126801209047FEBDF08829 +:1024B0000028FBD0002F0DD0300003F076FA9748AB +:1024C0004078022803D19848007A8007EED4FEF7BE +:1024D00096FAFEBD05F04BF9002836D13E75B97865 +:1024E00001000000C81901A000020000D8EE781712 +:1024F0000025012C14D18E484078002810D18D4839 +:102500000078002814D001280AD0032813D004280A +:1025100006D130680078FFF733FD03F088F8050036 +:102520000AF047FB002809D030000AF056FBD8E734 +:1025300004F023FFF3E705F078F8F0E7002DD0D1A1 +:10254000012C05D100220121300008F03FFD04E0FC +:1025500000220121300008F0F3F80028C1D1022048 +:1025600064E7F3B583B001260D003000072902D0DF +:10257000082D00D0002000210290080008F063F828 +:10258000674988680A061043886064480021017121 +:10259000552040060769022087433743FCF71BFAA2 +:1025A000040002D0029800282CD065480121007850 +:1025B000C907002816D0202055225206D0600743B4 +:1025C000029800280ED10398002805D0544881684D +:1025D000C2051143816003E0514A9068084390604E +:1025E0004E4806715748807800280BD04C48564911 +:1025F00041604B4980318868042210438860474815 +:1026000000218171012C29D105F0BBF8002804D0EC +:1026100006F068FD4748057801E0FFF749F8FFF745 +:102620009CF800281AD000210800FDF799FDFFF75B +:1026300097F84048092102780800FEF7B6FC4348A5 +:1026400001214078FEF7CFFF3749202009688847ED +:10265000364901200968884705B0F0BD552040067D +:1026600007612B0037F3F0EF095706570E4C570E52 +:10267000141B5700002C4ED129494031086A3043C1 +:10268000086248E02648803081683143816042E03A +:102690002349886B202240084000904388632048EB +:1026A000803081684908490081601D4C60682106BE +:1026B0000843606026480321817000210800FDF76F +:1026C000FAFDA068E1050843A06014480671FEF712 +:1026D000ADF912480024801C0470FEF7A1F900280F +:1026E00004D0280001A9019400F0F6F9D2DF0521F9 +:1026F00001000000C41B01A000020000F88A1B9426 +:102700000120FDF71EFF1849C86B0F2212069043E7 +:10271000C8630AE0002C08D1064A8032106A1349C7 +:10272000C978002901D1304310620A4806709DE73C +:102730002C5B00B0400000AA90E00004D8F2000436 +:10274000D4F2000424F300B080ED00043C5B00B040 +:1027500004E00004005B00B083ED00040080008012 +:10276000415C00B0A8F200B0400100AA82F200B0C3 +:10277000FEB555256D06E868E8608106C90F009131 +:102780002969E24E08400290E14F000AC00762D07A +:10279000E048407FAC2825D1DF48007800281CD0D5 +:1027A000FDF736FEFEF7BBFFFDF728FEFFF705FC41 +:1027B000002812D0316801208847396810208847E6 +:1027C000E8688004C00F0DD0029801214903084336 +:1027D0000290E8680843E86004E004F0C8FB0121C7 +:1027E000FEF70BFF00F06FFC002834D0A86A000E43 +:1027F000C00730D102988109C9072CD1800BC007CE +:1028000029D1E8688109C90725D1800BC00722D1E9 +:10281000286A8403A40B00F05AFC011F8C4214D3D5 +:10282000001D844211D8A86A696A8003800B611870 +:102830008903BA4A890B884202D9431A93420AD8BB +:10284000884202D2081A904205D3029840210843D8 +:102850000290B348E86002982024400DC007002889 +:1028600012D0B048806BC1080140C8070CD028695D +:1028700040084000A04328612120E86031684020E2 +:102880008847396802208847A74800780190029855 +:10289000C00709D00198FFF77AFC02980021A043F5 +:1028A00002909D48801E017102984008C00703D025 +:1028B00001990098FFF75FFE0298000CC0072ED028 +:1028C0009A4A0024032010702869012109048843D2 +:1028D00028615078002805D0FFF75FF89349002061 +:1028E000487000E001249248007800280DD1002CA7 +:1028F0000BD0904881680122114381602521246812 +:1029000001000000C01D01A00002000035FE18DA21 +:1029100080688E494006800E0870100004E00EF0BA +:1029200054EE002805D0102031688847396802200D +:10293000884702988108C90702D1800CC00701D0DE +:102940000AF0E8FB0298C108C90702D1C00CC00711 +:1029500001D00AF01EFC02980009C00702D00198BD +:10296000FFF73BF902984009C00706D00198FFF72E +:10297000D1F96E490020891E08710298800BC007AA +:1029800003D000210800FDF755FC02988109C90712 +:1029900002D1800BC0070BD06448801E007800284D +:1029A00004D02969102081432961E86000F05FFAB2 +:1029B0000298400AC00705D031681020884739685E +:1029C000012088472869C00407D50298000BC0077A +:1029D00003D0019802A900F093F82869800406D575 +:1029E0000298400BC00702D00198FFF738FA02980E +:1029F000800AC00705D03168102088473968082050 +:102A00008847FEBD70B50500514800240068804726 +:102A10004648007800280ED055204006C069C009FD +:102A2000C00707D141490120891EC8702800FFF75F +:102A300016FA00E00124474800688047200070BD76 +:102A40005520400600683949020E491D000C0A70E5 +:102A50004870002088707047374988680A0610431C +:102A6000886032490020891E08715520400602699D +:102A700020218A430261C160704710B5FDF7FEFF57 +:102A800035480078032808D133480121203081706F +:102A90007D2000210001FEF7B7F810BD10B52E4CC7 +:102AA00003002034A07803281BD1FFF7D5FF0420B2 +:102AB0005521A070204849060122072B12D0082B6F +:102AC0000FD10B6913430B611B4B80339968114382 +:102AD0009960816B91438163012100224802FEF7D6 +:102AE00037F810BD0B6913430B61816B1143816390 +:102AF000816B802211438163002201210800EEE7EF +:102B000070B504000D00FFF7AAF9072CB75216980C +:102B100001000000BC1F01A00002000059D22AF1F0 +:102B200006D0082C04D02868012149038843286076 +:102B300070BD0000D4F20004D8F20004E01F00AA27 +:102B40002E5B00B0FFFF010040400000400000AAE3 +:102B500080ED0004295B00B0325C00B0800100AA67 +:102B6000285B00B0CCF20004D0F2000488F200B080 +:102B7000F0B50027F94E3A003400E03423799C4642 +:102B800016E013019B195D79002D0ED01D79002DE3 +:102B90000BD11501AD192D69052D01D205251D613A +:102BA0001B69036001270A701BE0521C1204120CFF +:102BB0009445E6D815E013019B195D79002D0DD0E1 +:102BC0001D79002D0AD11D69052D01D205251D6134 +:102BD0001B690568AB4201D203600A70521C1204E3 +:102BE000120C23799342E6D83800F0BD30B50020AE +:102BF000DA4CE42162780B5D0CE0824209D00101DD +:102C000009194D79002D04D00979002901D100203E +:102C100030BD401C8342F0D8012030BD0201CF48B6 +:102C20000021101801718160C1600161417170471C +:102C300038B50500CA4800688047002802D1C94855 +:102C400000688047C84BC54C29001D6800222078C9 +:102C50001300A847012080076946F5F7FFFCC34829 +:102C6000006880472078FFF7D9FFC1480068804797 +:102C700038BDBA4870B5E030002201002039027139 +:102C8000B64C8A62FF2121706170A170027311003D +:102C90000801001902718260C26002614271491C20 +:102CA0000E29F5D30AF093F8B24D00202968884721 +:102CB0002070296801208847607070BD70B50500DC +:102CC000AA4800688047A548E0300479611C01717A +:102CD000E038012D01D1012102E0002D03D10021B6 +:102CE000220110188171A24800688047200070BD41 +:102CF0001CB50400FF2000909C480068804720001D +:102D0000FFF78CFF694601A8FFF732FF002805D1C5 +:102D10000AF05DF891480021E03001738C0F6E538A +:102D200001000000B82101A000020000C9C957BA83 +:102D30009448006880471CBD8D49000140184079C7 +:102D4000704770B504008E480D00006880478849C0 +:102D5000200140184179002903D0C0680124A8420D +:102D600000D00024874800688047200070BD80485C +:102D7000F8B500240700E0371CE07D492001451824 +:102D80002879002813D06879002810D07C48006882 +:102D90008047AE68ED682000FFF74AFF002E03D0A1 +:102DA000F5F732FD2800B047764800688047641C7C +:102DB0002406240E3879A042DFD8F8BD10B56C4C3B +:102DC000A078FF2804D17049002009688847A070C6 +:102DD000A07810BD6648407870476C4908200968A3 +:102DE00008476A4910B509684020884768490120AA +:102DF0000968884710BDF8B56148006880475520CC +:102E00004006016A0122520611430162046A00F081 +:102E100090F9201A564E83039B0B002105275C1D59 +:102E20003500E03511E00A0190194279002A09D0F5 +:102E30000279002A06D10269A24201D8076101E0A5 +:102E4000D21A0261491C0904090C28798842EAD87F +:102E5000474DC035A86AA04201D8AF6201E0C01A50 +:102E6000A8624C490020C046401C0004000C884267 +:102E7000F9D3FDF795FA0020C046401C0004000C71 +:102E8000FA28F9D3AA6A0121002009F08EFF3D48F3 +:102E900000688047F8BDF8B5FF20009000F049F9C0 +:102EA000334DC035296B411A8903890B052911D28D +:102EB00055214906096A2863091A8903890B0529DE +:102EC00002D2421D012101E000221100012009F07F +:102ED0006CFFF8BD264F00243E00E03628E02001BC +:102EE000C0190169002920D04279002A1DD0AA6AA0 +:102EF000891A016119D1817900290BD08368C068D2 +:102F000084462006000EFFF793FE002B0DD060468E +:102F100098470AE0012101713878A04201D1880761 +:102F200000E001201C4909688847641C693D964DF2 +:102F300001000000B42301A000020000E9AD343913 +:102F40002404240C3079A042D3D80E486946E830D6 +:102F5000FFF722FE00280FD000F0F5F828636B463B +:102F600078781A7801242100904200D00021A86AC4 +:102F700009F0FAFE3473F8BD09F03DFF002030730C +:102F8000F8BD0000A4F000B0C4F20004C8F20004D0 +:102F900030F30004CCF20004D0F2000434F3000457 +:102FA000D4F20004D8F20004DC050000E4F20004CE +:102FB000FFB583B015000F0066481E00006880470B +:102FC0006549039809688847002803D06349039836 +:102FD00009688847039A6248120101211418002FDA +:102FE00017D1A279002A04D0002D01D03000A847C3 +:102FF00084E0617121710834E0C402780398594972 +:10300000824202D10120800700E001200968884740 +:1030100074E0FF220121009261710020207127617C +:10302000E660A56000F08FF801904D48E030029016 +:10303000007B4B4EC03600282FD055214906086A28 +:10304000019A801A8503B06AAD0BA84206D2464A9F +:10305000C968114201D0002555E00500052D52D95F +:10306000AF4250D2421B34D03D4B002010E0010152 +:10307000C9184C79002C08D00C79002C05D1039C80 +:10308000A04202D00C69A41A0C61401C0006000E7C +:10309000029909798142EAD81BE0002500F04BF83B +:1030A000002816D055214906086A019A801A800323 +:1030B000800B05280DD240220800C260016911432F +:1030C000016100F038F800281DD140205521490643 +:1030D000C8600198306322486946E830FFF75CFD1C +:1030E0001F486B4640781A780121904200D0002199 +:1030F000B06A09F039FE0298012101731B4800688B +:10310000804707B0F0BDB06AAF4200D801E0791B3C +:1031100040182061EFE71248E030007B704710490B +:103120000F484A78C03012015118006B096908181D +:103130008003800B704755204006806A59F99E0233 +:1031400001000000B02501A00002000024D937775B +:10315000000EC00700D00120704755204006806A4D +:103160008003800B70470000CCF200043CF30004A5 +:1031700038F30004A4F000B0E4F200044040000082 +:10318000D0F200041F491E48086020491E4808600C +:1031900020491F48086021491F48086021492048EC +:1031A00008602249204808602249214808602349D4 +:1031B00021480860234922480860244922480860C1 +:1031C00024492348086025492348086025492448A4 +:1031D0000860264924480860264925480860274990 +:1031E000254808602749264808602849264808607D +:1031F0002849274808602949274808607047000087 +:10320000A9D3010080F00004D7FA000058F10004AF +:103210001DFC00005CF100045107010060F1000496 +:10322000DFFE000064F100044D0B01003C5B00B0C8 +:10323000210801006CF10004DFFF000070F10004C0 +:10324000CDD40100A0F20004ED0E0100C4F2000490 +:10325000F90E0100D0F20004C57A0000E4F2000487 +:10326000977A0000E8F20004577A0000ECF20004BC +:103270007DD40100D8F10004BDD40100DCF10004CC +:103280002524010030F300048D21010038F30004EF +:10329000C12101003CF300045921010034F3000472 +:1032A00010B51C00980705D5FF2107480022491CCE +:1032B000F0F248FDE00705D0012103480022490251 +:1032C000F0F240FD002010BDD4D70004FEB51C2153 +:1032D000040085888679694310480818019087782A +:1032E00002F331FC0090200024F396FC882169430E +:1032F0000098081816300A2117F3A8FF02003100C1 +:1033000038000EF0DAE9062E06D10548417D019815 +:10331000827803480A301154FEBD0000B4B40004A2 +:10332000B4C700040B0011001A0010B50EF050E9EC +:1033300010BD0B0011001A0010B50EF0C2E910BD4F +:1033400010B50EF0C2E910BD7CB5140012CEEE0F20 +:1033500001000000AC2701A000020000A965F33FB6 +:1033600000263500002B12D0022B0CD0032B13D1DA +:1033700001226B461A7180225A71FE220E2003250B +:1033800001AE9A710AE0FF20491C641E06E008782D +:10339000A41E891C002801D102207CBD2A19FF2A05 +:1033A00001D903207CBD230600911B0E32002900A9 +:1033B000FBF7D3F8002801D104207CBD00207CBDA0 +:1033C000F7B582B06B4606000F20187004205870C5 +:1033D000002098700120D870802018711E4DFE20AA +:1033E000587168680D27002813D01C4803990022E3 +:1033F00037F3B8F904000CD02089039A0019310082 +:1034000036F37AEF039A68682100012337F3F8F95D +:1034100001E06B469F701248062200236946FFF7C1 +:103420009DFF012005B0F0BD1A2901D10A48426074 +:1034300000207047084810B50168094881600021E4 +:10344000016141618161C1610649016206494162D0 +:10345000F4F216F8054810BD585B00B0F85800B0FB +:1034600098F100B0A9270100752801000D2801007E +:103470007CB514000D0000263100002B07D0022B74 +:103480000AD1C021FF200191012101AE06E0287878 +:10349000A41EAD1C002801D102207CBD0A19FF2A00 +:1034A00001D903207CBD23061B0E32000095FBF7DB +:1034B00054F8002801D104207CBD00207CBD7CB5DF +:1034C0006B4606000F20187004205870002501205C +:1034D0009D70D87081201871224CFE205871A06810 +:1034E000002805D00A003100012337F389F902E0F2 +:1034F0000D206B4698701C48062200236946FFF792 +:10350000B7FF2078002812D07D2636020321300034 +:10351000F2F797FC03213000F2F799FC0321300009 +:10352000F2F792FC03213000F2F794FC25700120A1 +:103530007CBD1A2901D10B488260002070470948E0 +:1035400010B54168084881600021016141618161D5 +:10355000C1610649016206494162F3F2C4F49AD09E +:1035600001000000A82901A00002000017288B9785 +:1035700091FF054810BD0000605B00B0C8F100B0CD +:10358000BD2801007F2901000B290100094810B561 +:10359000807C00280AD00849088B064AC0084032BF +:1035A000127BC0005207520F1043088331F3B7FC5F +:1035B00010BD0000D0DB0004C02B00A80020704725 +:1035C00038B530F37FF8CC4B188B0209CB48120189 +:1035D000C17A0C07240F2243F0240909A2430901F0 +:1035E0000A431A83C44A6032118B007BC908C900A0 +:1035F0004007400F01431183C149C24A487F400838 +:1036000040004877BD48603043681A804368042210 +:103610009A72436832225A8043689A804368FF2234 +:103620002D32DA804068C8220281087B0122C0085E +:10363000C00008730021080000F0D5FA01220092B2 +:10364000002211001000130000F09AFB38BDF8B5FD +:1036500030F3C1F8AC4800890121AB4A8902084324 +:103660001081A548E03880888A001043A24AE03AD9 +:103670009080A5486030808B1F22D2011043A24A5F +:10368000603290839C48E030808A0C2210439A4A32 +:10369000E03290829C480089F02290439A4A103090 +:1036A00010819A4880883026984AB0432030908014 +:1036B000974B188A0722120390431882944A203AA3 +:1036C00090884C100843204390808B4A203A108AFF +:1036D0001F246401A0430B24A401001940094001E8 +:1036E00016300843108284484038848B20252C43B0 +:1036F0008D10AC438483844F803F3C88B443203496 +:103700003C808489240A2402AE3484817A4C268B3E +:10371000CF003E432683868B0E438683178A0F266F +:10372000F602B7430326F602BE191682228A0A0160 +:103730002282714EC036B28A4C10A243B282744CBF +:10374000E03C228B0A4322836B4A6032968B01272E +:103750003E439683868A360936010D3686826B484B +:10376000203806881C27BE4318360680F8C969230E +:1037700001000000A42B01A000020000374CE81457 +:1037800087880C26B7433F1D878060488030868934 +:10379000760876008681108BC026B04340301083B7 +:1037A000A08B28430843A08398887F210006000E41 +:1037B00009024018000A0002D8309880108B1921A5 +:1037C0000006000E890240181083F8BD10B5F2F70C +:1037D00013FD55494000085A544B584310BD70B56D +:1037E00001254E4C2D034034002812D0F1F70EFC79 +:1037F000F1F715FCF2F775FD3320F2F7AAFC08216A +:1038000001433320F2F797FCF2F75DFDA0882843CF +:1038100005E0F1F7F2FBF1F70BFCA088A843A080CC +:1038200070BD70B50120424E316888473948414C1F +:103830002038807EC00714D13F4800688047316837 +:103840000500002088473D4968181E2801D82560DA +:1038500070BD0120C00320602E480188491C0180F2 +:1038600070BD374800688047206070BD38B530F3C0 +:1038700030F80122334B00921C6811000020030035 +:10388000A04738BD10B530F3BAF804002E480068E0 +:1038900080471E486030018BC908C900091D01839B +:1038A000818A0122920211438182200010BD70B5ED +:1038B00001201F4D296888471F48006880472968F4 +:1038C0000400002088471D4960181F2804D31148B0 +:1038D0000188491C018070BD16490868821CA242FB +:1038E00002D9801EA042F6D30C60C8681749096847 +:1038F00088470748164940380968C08988470749FA +:103900004031888808221043888070BD602B00A851 +:1039100010DC0004B0DA0004A8FDFFFF802800A836 +:10392000C02D00A8602A00A800000004A0860100A5 +:1039300034EF000470DA0004FCEF00040F80FFFF96 +:1039400010EF000484EF00041CF00004F4EF000406 +:1039500048F0000410B530F335FD10BDF0B504009B +:1039600085B0CA491422684636F344EDA07A694608 +:103970004000085A7D25C64E2D01401BC5DB52056F +:1039800001000000A02D01A000020000FA38EB5A4F +:1039900031680004001488470700C3483168C089B3 +:1039A000401B000400148847C719A07ABF490302CE +:1039B000181A4000081AE17AAA235943401A3168BC +:1039C000000400148847BA49C0190968884721884B +:1039D000C900081A401B0004001405B0F0BD010026 +:1039E00010B50089B34A90420FD3B14C2168884783 +:1039F00009210902081A2168000400148847AE4909 +:103A0000400040180004001410BD4879AB49400143 +:103A1000401810BDF8B50C0006000120002E0873F8 +:103A20005AD0A74D2888802108432880A549300016 +:103A300009688847298BF022914302011143090943 +:103A4000090101432983A0493000096888479C493E +:103A50002031098A1C22914380000143984820307C +:103A600001829A49300009688847954F6037B98BC1 +:103A700049084900B983398BC908C9000143398312 +:103A8000B88A012189020843B88228888021084326 +:103A90002880288B890188432883A88A49110843F4 +:103AA000A882874820308189854A0420014320323A +:103AB000918111008989814310008181844D3000FA +:103AC00029688847B88AC00B06D129680120884731 +:103AD000B88AC00B00D12073794DA88B784F400570 +:103AE000400D2037208038884005400D608079489F +:103AF00000888105090F8004000FA172E0721C206C +:103B0000385E3E2136F340ED012EE08101D8002ED3 +:103B10000DD16B488030018921710189090A6171D9 +:103B20000188E1808088002E20813DD005E00020C2 +:103B300020716071E08020812073288B5A4902092E +:103B4000C87A120103071B0F1A43F02300099A4396 +:103B5000000102432A83288B012252031043288349 +:103B6000288880229043288055486030038B097B49 +:103B7000DB08DB004907490F0B430383818B0123DB +:103B8000194381833B8A1C218B434749CE7CBAC5AC +:103B9000010000009C2F01A00002000028F47D33EA +:103BA00060314968897A0907890E0B433B82818A13 +:103BB000D30019438182288890432880F8BDF0B54E +:103BC00085B000216B461980082199720F213B4E68 +:103BD000C504D972F78945484549F08109682D1413 +:103BE00068468847404204042414A542F78102DA5B +:103BF00036486E30FBE67D263601A81B2E4D0004AC +:103C00002968001488470700A01B296800040014D5 +:103C100088472C49381A096888478019000400141D +:103C2000E5E670B505000800324916000968002471 +:103C30008847314BD91DFF31FA31002E11D00020B9 +:103C40000500C200D2181600FF368136FF32401C34 +:103C5000A1320006000E35630A289582F1D30D606B +:103C60001CE0002D02D14968088017E00A6812079D +:103C7000120F0A2A11D2D200D218FF3281321563F4 +:103C80000A681207520ED218FF32A13290820868D9 +:103C90000007000F401C086000E00124200070BDF8 +:103CA00004490C3900E0891C0A788242FBD3487829 +:103CB000704700003004000400F0000410DC000431 +:103CC000F014000004F00004760200003AFDFFFF4B +:103CD00067F3FFFF602B00A868EF000470EF00049B +:103CE0006CEF000444F00004402A00A818FCFFFF19 +:103CF000C45B00B0E85A00B070DA000470B501236C +:103D00005F49604A604CC60706255B03002E1DD044 +:103D10000E8A760876000E820E8A7607B60F168017 +:103D20008E8A56800E8B96800A8AAA438D886D07EC +:103D3000AD0F6D002A430A828A8A0A898A820A8B19 +:103D40008A890A83A1881943A18012E0A6889E432C +:103D5000A6800C8A012634430C820C8AAC43158859 +:103D60006D002C430C828C8A54888C820C8B928838 +:103D70000A83454D81074207C90FD20FA0352C8B0E +:103D800001263603B4430E0334439C4353031C43C0 +:103D90002C833E4C238BFF256D1CAB43FB98ABC59E +:103DA00001000000983101A00002000070CBF25722 +:103DB000C9010B4380218B43D1010B432383394934 +:103DC00040070A7BD208D200400F02430A7370BD3D +:103DD000FFB581B00D0006000A99334F334C18002F +:103DE000002909D0002060720120C0033880FF2024 +:103DF000B870F870387110E0617A0A2910D22C4935 +:103E000009688847617A06224A43B852D0198670F9 +:103E1000C570039A491C02716172002005B0F0BDA3 +:103E20000120FBE7234970B5204809680C38884712 +:103E30001E4A0021527A1C4C521E07E006234B43B7 +:103E4000E35E834204DB491C0906090E8A42F5DC65 +:103E5000134A60321089050A062048432D020019D2 +:103E600081780D4315819189C3780906090E1B02DB +:103E700019430079090A09020143918170BD0E4975 +:103E80000A4810B509680C3888470C490968884702 +:103E900010BD0000802C00A8D45B00B0C02800A892 +:103EA000802D00A8B0DA000406F200B010DC000497 +:103EB0007CEF000444ED000448ED0004A8EF00048A +:103EC00010B52DF3A7FF10BDF8B500220324984DBF +:103ED000984E2A7001786970AA700178964F392936 +:103EE0005BD025DC11297CD014DC01294DD00429BC +:103EF00078D1F068010EA971010C6971010A29716C +:103F0000E870F16A401AB16836F326EC002940D116 +:103F100001203FE0122979D03029E9D12A71EA70D5 +:103F2000AA716A7113202A72E871AA726A72CAE0D1 +:103F30005A293FD0792946D0972954D09829D7D1EA +:103F40007F497E480968060088477E490400096861 +:103F500030008847060079481438808A010A2971A0 +:103F6000E8703968200088470012A871396820007D +:103F700088476871396830008847001228723968AC +:103F8000300088470924E87160E04078FFF78CFC36 +:103F90005CE000200824E87158E0407830F326FE09 +:103FA000F1680A0EAA710A0C6A710A0A1C4ED61828 +:103FB00001000000943301A00002000050AF91D432 +:103FC0002A710724E97046E08178427809020A43A1 +:103FD000C17810002FF31BFB3DE0827900924279FB +:103FE0000179120211430B04C278817840781B14C6 +:103FF000FFF7F8FE2FE014E071E0817843780902C2 +:104000000B43C178027909041206114382790B43EC +:10401000417912021143C2791800FFF716FE1AE027 +:1040200025E0027AC1791202114382790B044179A9 +:104030001202114306790A04C178360231434678E8 +:10404000807809040002064330041B14121409147A +:10405000001400F05EFB002802D0FF212970A87038 +:104060003E4B03221B68374821009847F8BD384C67 +:104070006C3461680220085E396888470012287134 +:1040800061680220085E39688847E870616804202A +:10409000085E396888470012A87161680420085ECC +:1040A00039688847687161680620085E3968884702 +:1040B0000012287261680620085E39688847E87136 +:1040C00061680820085E396888470012A872616834 +:1040D0000820085E3968884768720B24C0E72DF312 +:1040E000EDFEF8BD1E4810B536F3DAFB040027D00C +:1040F0001C490120096888472089124A00210019BB +:1041000011700378537091700178A02912D09C2906 +:1041100010D001290ED00C49096BC9010AD4FF2027 +:104120001070152090700D4B03221B68054811007C +:10413000984702E00C4909688847200036F324FBC1 +:1041400010BD00006CD9000470DA000478EF0004A0 +:1041500004DC0004D05B00B0C45B00B040ED0004A0 +:1041600078DC000438EF000400EF0004F3B5062407 +:104170000D000B27012081B00090FF4806680199CF +:104180003000604336F3F2EAA84201D9401B00E058 +:10419000281AFA49884202D200200090FEBD641C11 +:1041A000BC42ECD90098FEBDF34910B50A68F44949 +:1041B000F44B5118994201D2022405E0AA3BD5C222 +:1041C00001000000903501A0000200009DDB929AE2 +:1041D000F2498A4201D9042400E00124F04951182F +:1041E000F04A914207D2F04A01001268200090473D +:1041F000002800D10324200010BDFFB591B00500B8 +:104200000E001498E9490068079028680690888B8A +:104210000024C02738438883E54906980968884701 +:104220006B4601001880D948006836F3AAEAE149D4 +:104230000290096868468847DF49684609688847E8 +:10424000DE4B13991B6830006A469847D74E2036DC +:10425000308B6B461988B843491E89010843308367 +:10426000D74F03982100C01B0598A14101DA401ED9 +:10427000FFE732882100120A120210433080D04A30 +:104280000398801A0398A14107DA40085200801869 +:10429000210061410F910E9009E0CA4A2300121AD1 +:1042A0000398A34101DA4008FFE70F940E900E989F +:1042B0000F99020F09011143C34A0001230035F38E +:1042C000C4EEBA4A2032938B1B091B01034393832C +:1042D0000B04020C134307040E980F99020B0905F7 +:1042E0001E001143B84A0005230035F3AEEEC01B93 +:1042F000B141AE4940310A880880B14A0398210093 +:10430000801AA14105DBAF4A03982300121AA3418A +:1043100000DA0124A54AA0002032918A042399439F +:1043200008439082A949684609688847A8496846B1 +:10433000096888471498079901600698286015B0A5 +:10434000F0BD70B5040048080E000125001936F3D1 +:1043500018EA7043844201D9201A00E0001B9D49ED +:10436000884200D20025280070BD70B505009A482B +:1043700000688047994E01003268280090473268F3 +:10438000040097492800904701000020002C02D02B +:10439000002900D0012070BDF3B5040085B00027CE +:1043A0009148904E4068007B002800D08F4E904886 +:1043B00000880621884308210843029020003B0022 +:1043C0003200390035F340EE050002982C6D0FE7FE +:1043D000010000008C3701A000020000106756D2D7 +:1043E0008105890DA81E80020143864801802A00AC +:1043F0003900300036F3B0E9201A0B00390099413A +:104400000390814A3900300036F3A6E90090039802 +:1044100001918000390080197B4A794136F39CE98B +:10442000019B009A35F31AEE01067648090E808842 +:104430003F2212019043754A525C12011043714AA7 +:104440009080704A203A908B70239843303090834C +:10445000A80045186A08A10BA004801879413B0008 +:104460002A0035F3FCED069A03C207B0F0BDF1B5A2 +:1044700088B07D230898DB005843494D079006908B +:10448000A86B634C800303D5A07E4007C00F03E0F8 +:1044900060490898096888476B4601901879012897 +:1044A000069801D15C4901E05B49494246185B48E6 +:1044B000B100069636F36EE90490A96B00278903D4 +:1044C00000291DDB564946430968B000884700288B +:1044D00001D006980FE06B461879012804D10197A6 +:1044E00050490698401805E0012001904D48069972 +:1044F0004042081806908100484836F34CE9049081 +:1045000006200590A07EC00706D0474B08991C687E +:1045100001AA06A804ABA04729486030018B6B466E +:104520001A79890889001143018304990698484340 +:104530003E498000286109688847304C3C4E6068DD +:1045400002A907733268286990473A4A3A490092AB +:104550000968039B029A07988847002806D061687B +:10456000012008733268286902A9904703990298CC +:10457000E961324AA8611268039902989047304A6B +:1045800003991268029890472E4A0399126802987C +:1045900090472D492869096888470949403955E0FD +:1045A00070DA000490D003007F57EDFE3F5489007D +:1045B00040933402804573FE405DC600EC5A00B063 +:1045C000C02A00A8F05A00B0D4EF0004D8EF0004CD +:1045D000C8EF0004A0252600E0707200AA26E9605A +:1045E00001000000883901A000020000AE2A2E7AE6 +:1045F00080969800CCEF0004D0EF0004801A0600EB +:1046000010EF0004E05A00B00024F40020EDCD03C8 +:1046100070DC0004707BC203002900A840420F0038 +:1046200034ED000490DA0004E0EF000434FBFDFFF9 +:10463000801F635CE45A00B098090400DCEF0004BA +:10464000E4EF0004BCEF0004A0860100F45A00B0BF +:10465000C0EF0004C4EF0004F8EF0004ECEF000426 +:104660000888032212039043049A921E12031043F7 +:104670000880144A0599126806989047002009B0EE +:10468000F0BDF8B50500100001221900D203002387 +:10469000801859410904060C069F0E431824300067 +:1046A0006043142136F380E8854201D9281A00E0DE +:1046B000401BB84201D80120F8BD641C222CEED961 +:1046C0000020F8BDE8EF00049D4810B536F36FF9FF +:1046D000002806D0018908180078572801D1012048 +:1046E00010BD002010BDF8B50126964D964F2C0048 +:1046F000FF34B6066134002814D0286BB043286319 +:10470000924800688047924900200968884791498B +:10471000122009688847012020733888B1140843A3 +:104720003880F8BD3888FF21491C88433880884983 +:104730000120096888478849208A0968884701203C +:10474000A074286B3043286300202073F8BDF8B5AF +:1047500014000F001D00824207DBAC4205DB8542DE +:1047600003DBBC4201DBBD4201DA1420F8BD7B490A +:10477000096888477A4E7168488078493800096826 +:104780008847716888807549200009688847716882 +:10479000C88072492800096888477168088100202C +:1047A000F8BDF1B5002584B06E4A02201268694652 +:1047B00090476D496846096888476C490400096854 +:1047C00068468847664E010070680222825EA242F7 +:1047D0002ADC0422825E8A4226DC0621415E644F86 +:1047E000A14208DA0E206B46185E1830249B9957B8 +:1047F00001000000843B01A0000200008E4E4DF934 +:10480000302802D8D888B84217D35B4A14201268DF +:1048100069469047594968460968884704007068A6 +:104820000821415EA14209DA0E206B46185E18305D +:10483000302803D8D888B84200D2012504980480D3 +:10484000280005B0F0BDF7B586B000240F00424E39 +:104850002500F0680490300040300194007B012175 +:104860004007400F009008434749096888473000D7 +:104870002030807EC00702D1444800688047444908 +:10488000012009688847F16AB06A401AB16835F3B7 +:1048900096EF401C0004000C0390069805903D49DB +:1048A000096888473C490220096888473B4901203C +:1048B0000968884702A8FFF77EFF06000FD0002F87 +:1048C0000CD03749082009686B46185E8847354A7E +:1048D000010412680598090C904700E001252F4952 +:1048E0000020096888473048641C00682404240CB0 +:1048F0008047002800D001250398844208D0002D6D +:1049000006D12A4A08991268059890470590C6E78B +:104910001F49002009688847002F06D1002E04D0C7 +:104920001C4905980968884707E01A4904980968EE +:104930008847002F01D13C2001900849C031888967 +:104940001B4A1043888110490098096888470198DC +:1049500009B0F0BD78DC000470DA0004602B00A818 +:104960004CF000043CEF000440EF000448F0000469 +:104970007CEF000470DC000474EF0004D05B00B036 +:10498000C45B00B0204E0000A0EF000414EF000450 +:104990005CF000044CEF000444F0000428EF000435 +:1049A00078EF000454F0000458F000042CEF0004E9 +:1049B000FF7F0000F8B58C46344B01685C69344ECB +:1049C000002C0CD0456867231B02F02D0DD88068A1 +:1049D000F0280AD84F78B02F03D0D62F23D130003B +:1049E000F8BD002D01D1002801D11800F8BD8B7849 +:1049F000C9781B020B4361680004000C8A470EB99A +:104A000001000000803D01A000020000433A4EB7C3 +:104A1000994202D86B200002F8BD1D188D4202D9C0 +:104A2000C81A0004000C1080A1680200C918604672 +:104A300035F3D0EC09200003F8BD6D200002F8BD6D +:104A400010B5194C03008818A04201D9002010BDF0 +:104A500016484018801C190035F3BCEC012010BD2D +:104A600010B5114C8B18A34201D9002010BD0F4B7B +:104A70005918891C35F3AEEC012010BD0A49884253 +:104A800001D9002070470949020A0A7048700120C4 +:104A900070470649087849780002084370470000CB +:104AA000F05B00B086690000FE03000088C500B01E +:104AB00026490860704725490968002902D0244A20 +:104AC000107008477047012101707047214900208C +:104AD000096808471F490020096808471D49002048 +:104AE000096808471B4901200968084770471949A8 +:104AF00000200968084710B50C00092001000C428D +:104B000004D0FCF73AF80020F6210C40610602D5EB +:104B10000220BF210C40E10600D5012005F093FEE4 +:104B200010BD10B5040005F0FBF9002805D10848B8 +:104B300000194078002804D101200749897B81426F +:104B400001D3012010BD002010BD00002C5C00B07E +:104B50005CDD0004B0F100045CDE0004F8B5002563 +:104B60000922F8494D718A71CA71F7490A700A22FF +:104B700001284A701AD10BF05FFC002804D10220F2 +:104B8000F9F7DAFF0920F8BDFAF72CF8002806D06B +:104B90000120F9F7D1FF0020FBF77DFD04E0F9F7D4 +:104BA000FBFF0028EBD03AE00620F8BDF9F7F4FF50 +:104BB0000600FAF717F80400F9F7FAFF002828D0E2 +:104BC0000020F9F7B9FFE14E0024BF202300009533 +:104BD00035F3EEED0906080A0C0E060C1010110054 +:104BE000432008E04C2006E0532004E0562002E079 +:104BF0005E2000E06D203768002101236A46B84737 +:104C0000641C2406240E082CDFD305F027616DCB2D +:104C1000010000007C3F01A000020000561629AFF1 +:104C200050F90020F8BD002E07D005F04AF9002CFD +:104C30000ED10120F9F78AFFC0E70BF007FC00282E +:104C4000A7D00BF001FC40780028A2D0002CA0D007 +:104C50000020FBF72AFDECE770B504000D000A20E8 +:104C6000230035F3B0ED09060A1416181A1A1A1A99 +:104C70001B00280002F066FA10E0BA492800096813 +:104C80008847002801D0042008E0092006E007201A +:104C900004E0022002E0052000E00620AF498D700C +:104CA0000C70487070BDF8B505220926AA4CAB4DB2 +:104CB000A6716179230028781B78002909D0032B7D +:104CC0007ED0042BFCD0062B01D0FBF7E7FB0020A5 +:104CD00011E0A5490127097835F374ED070611366F +:104CE000A0B5B7055F00F2E7002901D0677057E073 +:104CF000FBF7D4FBD0E0FFF73BFF60704DE09A4E2E +:104D0000708960810AF063FAA07130780028EFD0D2 +:104D100060890028ECD0904E0020B61E30703078AC +:104D2000002105F07AF839008140E0716089014284 +:104D300002D0E079287023E03078401C0006000E95 +:104D40000A283070EBD328E0A0716089874D0028D5 +:104D500050D005F0EFF8002800D10120A97B814256 +:104D600048D27D4DAD1E12E0002105F056F8390005 +:104D70008140E0716089014209D07849E07908708A +:104D80000221617061898740B943618108E0287818 +:104D9000401C287028780A28E6D3607803280AD0B7 +:104DA000A179E079814212D0617801290FD00729D9 +:104DB0000DD009280BD0E179A07905F0C9F800E001 +:104DC00041E0002800D10A20E179FBF7A5FF207817 +:104DD000A07061780528217007D1654841780729BE +:104DE00003D08178C0780BF08BFD2078092855D14D +:104DF0000020F8BDA87B002889D0012808D15D4893 +:104E00000025257100688047E0712900257235E092 +:104E100027710120E67107F06DFC37E0E1341C30AA +:104E200001000000784101A0000200005285AD0D94 +:104E30000029A0710FD000F015F92079002804D0C6 +:104E40000020E07005F031FD02E0002007F05CFC7E +:104E500004206070AEE76270ACE7A071FBE7E07819 +:104E600000280CD0A078032801D1E67102E0E07997 +:104E7000092804D10020E070032005F0F8FC207917 +:104E800000280FD0E079092807D02978A171217A6C +:104E9000FFF7ECFE0320607097E70A202E70687021 +:104EA0000720D6E7FBF704FB2878A07101202CE748 +:104EB0003649800008588047F8BD002010B5FFF73C +:104EC00061FE2A490928087001D1002010BD2F4930 +:104ED00080000858804710BD24480178092903D074 +:104EE000002101710121417170472049087170470B +:104EF00070B505000E00092825D02549280009684D +:104F00008847B0421FD9194CE07800281BD160793E +:104F1000002818D120780121072808D1E1702171DB +:104F200031002800FFF7A2FE0320E57106E0042807 +:104F300009D1E1702171E57105202672607005F0DC +:104F4000FAFB012070BD002070BD084810B5017843 +:104F5000042901D0002010BD012101710921C17176 +:104F60000521417005F0E7FB012010BD325C00B067 +:104F700080ED0004F0F10004A4F100045CDD000405 +:104F80005CDE000490E00004D0F000046004000443 +:104F9000CCF0000410B50AF04DF9E6E7414810B531 +:104FA00000780AF055F90028DFD00068DDE73D48B9 +:104FB00010B540780AF06AF90028D6D00068D4E726 +:104FC000384810B540780AF061F90028CDD0406823 +:104FD000CBE7344810B540780AF058F90028C4D01F +:104FE0008068C2E710B50AF027F9BEE710B5F9F7F7 +:104FF00015FE002802D00AF025F9B6E7F9F713FEEE +:10500000002802D00AF021F9AFE70AF018F9ACE75E +:1050100025487047254810B541780729A5D0C179A2 +:10502000807904F09FFF0400FDF768FF84384CABE3 +:1050300001000000744301A00002000072E1CE8E66 +:10504000214B21001C681F4A0023A04797E710B599 +:105050000400FDF75DFF1D4909688847002804D05A +:10506000FDF756FF1A49096888470120207086E736 +:1050700018490120096808470F4810B50278807860 +:10508000130035F3B4EB0906080C0F1113131313B7 +:105090000B00114900E01149096888476FE700F0EB +:1050A000ECF96CE70E49F7E70E49F5E7010010004F +:1050B0000D4A1268904762E780ED00048404000402 +:1050C000325C00B06322010030F300043CF30004C2 +:1050D00038F30004B0F1000434F1000438F10004A6 +:1050E0003CF1000440F1000444F10004A04910B573 +:1050F0009E4C0968607888470020FCF71DFC002062 +:10510000207010BD10B5FFF7F1FF05F0DDF80028A5 +:1051100001D105F0AAF810BDF3B50C00002581B04F +:105120009448924F06783878002832D0012858D019 +:1051300002280FD1A0880221801CA080E088801C5A +:105140000004000C032EE08000D0012140181D282F +:105150001ED859258849787809688847002803D0DF +:10516000834978780968884784480078002809D0FE +:10517000012007F0E2FF002800903AD18048407BF0 +:10518000052805D3F9F70CFE0221012005F0AEFF3A +:10519000FEBD7878FF2804D17A4900200968884745 +:1051A0007870002E13D0032ED4D1A088801CA0804C +:1051B000E088801C0004000CE080801C1D28E7D8DB +:1051C0000020FCF7B9FB592502203870C2E7E088BF +:1051D000401C1D28DCD8012058253870FCF7ACFB9A +:1051E000B8E7002C03D0E088401C1D28D0D840250B +:1051F000B0E72900644D00982A689047002C11D030 +:10520000032E05D1E0882A6801060098090E904710 +:105210002A680199009890475C4BE2881B680099C6 +:1052200020009847012007F0F4FF5A4B40211C68EA +:10523000574A78780023A047FEBDF3B50DC19916F3 +:1052400001000000704501A000020000BF95CDC024 +:105250000400012081B04B49494F009009687878DB +:105260008847002C0ED03878002803D101F051FF78 +:105270000120FEBDE088002845D04C4800688047EA +:10528000002801D10020FEBD3978454B012923D1EA +:10529000E288012A04D01D2A05D11C26012511E02F +:1052A000002604250EE00A2A01D2511E04E0132A2A +:1052B00001D2911E00E0D11E0906090ECD086E181C +:1052C0004D076D0F1B680100200098473006000E47 +:1052D0002900FCF792F916E0E18800290FD00A04B2 +:1052E000120C1B6815000100200098472648304B1F +:1052F000017828001D6800221300A84703E0006819 +:105300000078FCF7D3F802982A4D0007000F012817 +:1053100010D1E088002801D0012400E00024FFF72C +:10532000EFFEFCF7C2FA002801D1012000E00020C6 +:1053300021000BE002280CD1E088002801D00124D4 +:1053400000E00024FFF7DCFE210001202A689047DE +:105350000EE0029800070BD13878022808D1FFF739 +:10536000CFFE04F0BBFF002802D104F088FF0090BC +:105370000098FEBD02480078002800D00120704748 +:105380003E5C00B038F3000480ED00043CF3000400 +:10539000CCDF000460EF00B034F30004C8F1000477 +:1053A000C0F100043944010030F3000464F100044A +:1053B0005CF100043C5B00B070B50024434D4448F0 +:1053C0002C7014216C8135F3F4E8414EE81D761FF2 +:1053D000F93074768473C47304744021A43035F3B7 +:1053E000E8E8002034712918401C0006000E082847 +:1053F0004C70F8D370BD030010B5CA88080034495A +:10540000491F4B764B71891D0BF07EFB10BD304957 +:10541000491F497E01702E4870472D494539C9788A +:1054200001702B488038704770B52B23284C02221E +:10543000E53CA57B6B43254D5B195A73A67B2B235B +:10544000734300225B191A73A27B2B2373110EED99 +:10545000010000006C4701A0000200003229098809 +:105460005A43521920329175A27B5A4353190A00AC +:105470000E330100180034F3E0EFA07B401CA07352 +:1054800070BD10B5184A0C00126801000220904748 +:105490002B214143124808183621095C0E30217037 +:1054A00010BD38B5002100916946FFF7EAFF0F4CA7 +:1054B0000200246800216B461B785220A04738BDAB +:1054C00010B5094A0C0012680100042090470C2115 +:1054D0002B2358432170024940180E3010BD0000A4 +:1054E0005CDD000441DF000430F10004F0F1000451 +:1054F000FF480021C170704730B585B000246B466D +:1055000005001C7200F016FA6B46197A0843142144 +:105510000843012D187202D120210843187201207E +:105520006B465872F34B01941D6800215B2001AA61 +:105530006B46A84701986B4600789872EC48203873 +:10554000807E002802D10421DC720FE0C408D872EA +:10555000400702D0641C2406240EE5492200491F9E +:1055600003A834F36AEF241D2106090EE34BE24A37 +:105570001B6802A8984705B030BDFFB583B0002472 +:10558000050002A80E0002940094019000F0D2F9E8 +:105590000127002803D000F0CDF9012801D12C709B +:1055A00000E02F7000F0C6F9002803D000F0C2F927 +:1055B000022801D1347000E03770CE4C00212568FC +:1055C000019A5D206B46A8470298059900780870FB +:1055D00024680021019A5F206B46A0470298069933 +:1055E0000078087007B0F0BD10B50400FDF7A4FC0A +:1055F000C34909688847002804D0FDF79DFCC149CC +:1056000009688847BA4800212038817608211B3074 +:1056100034F3D8EF0120207010BD10B504000078DD +:10562000FD21400840000840207000F083F92178F7 +:1056300008432070400601D5012010BD002010BD98 +:10564000F1B584B00025AA4C01AA203C02A903A808 +:105650006B46A576FFF791FF6B461E78ADA8876471 +:1056600001000000684901A0000200008C64712064 +:105670001A79197A187B3300FCF74DF8A74EA84F1A +:105680007079002803D139680420884705E0A549CE +:10569000042009688847002805D0A349012009682B +:1056A000884705B0F0BD3968042088479548757172 +:1056B000257640386576FF214580017004980121E8 +:1056C00001700020FFF722FFEBE78E4810B520386D +:1056D000407E8C4980004039411808780F2811D04D +:1056E000401C0006000E01230AE01A004C8882408C +:1056F000A24302D10870012010BD401C0006000E1C +:105700000F28F2D9002010BDF8B505000420854906 +:1057100009688847844E002837D17A4C203C207E87 +:105720000F2806D0401C207601202870FBF71AFABB +:10573000F8BD0027FFF7C9FF002809D0607E0E28BA +:105740000BD1607E401E6076FFF7BFFF002804D1BA +:10575000607E0028F5D1002F17D0607E0026401C07 +:105760000006000E810060766648403809184E80B9 +:10577000627EFF219200815400F0F3F8012026762A +:1057800028700020FFF7C2FEF8BD3168012088476D +:10579000F8BD10B50468416822788068012A08D1F4 +:1057A0000C2803D108006149096888472000FFF7E9 +:1057B000ABFF10BD402930B413D00922114210D0E4 +:1057C000504A0124203A517E13008900203BC91819 +:1057D000891C157E22000B88AA4013430B804F4979 +:1057E0004C7130BC90E71FB501AA02A903A86B4613 +:1057F000FFF7CDFE6B461C781A79197A187B2300C7 +:10580000FBF789FF48490120096888471FBDF0B5AB +:10581000002085B0049046484078052871D1FBF7F8 +:10582000D8F904000068417801296AD1007840075E +:1058300067D500200290012004902068324F007844 +:10584000C006E08816D5042804D200210820FAF703 +:1058500077FD56E03D680021B72002AA01ABA847BA +:1058600020688078002803D002990978CCBEB3BBA9 +:1058700001000000644B01A000020000AC0012A374 +:105880008842ECD1032502E00328E8D302252068F2 +:10589000017889063FD5405D204BC6084007400F80 +:1058A00003901F680021B62002AA01ABB8470398F5 +:1058B0000028D4D1002E0AD0082ED0D120686D1C2B +:1058C0004119029808220BF08BFB0028C7D11E4813 +:1058D00000688047040000201C4D00902A680100E9 +:1058E000200090470D4B00211E68B9206A4601AB8D +:1058F000B04700982A68017820009047144B08228E +:105900001B68029821009847124BE0881C6800220F +:1059100004211300A0471FE082F200B0ECF1000464 +:105920008229030058F100043CF3000438F300041A +:105930005CDD0004CCF00004B4F10004B0F100041C +:1059400010F1000480ED000464F10004C8F10004CB +:10595000D0F100045CF100040498ACE61CB5002012 +:105960001B4B01901C6801005C2001AA6B46A047FC +:10597000019800781CBD1748082110B534F336EEA5 +:10598000144900201B390B00203B88761BE0441C87 +:10599000A2420CD982009C5CD218127924011443D3 +:1059A0004208D2182032D4768A7E083207E04408B2 +:1059B0008200E4189A5C2034E2768A7E121D801CF4 +:1059C0000006000E8A764A7E8242E0D810BD0000B2 +:1059D000ECF100047DF200B0FF490020087008726D +:1059E000704770B50400FC4D2878022801D00328C8 +:1059F00001D100F0ACFDA878002807D10120022CCD +:105A000000D00020F54A012112689047F449002097 +:105A10000968884770BDF04810B58178002918D012 +:105A20000078012804D0022807D0032804D108E018 +:105A3000EB4903200968884710BD04F075FF002872 +:105A400003D100F0C7FD0428F6D10120FFF7C9FFFC +:105A500010BD0220FAE7E04948727047DE498872BB +:105A60007047F8B500250120DB4C2F002070A5728F +:105A7000082065726071A0710420E071BDBDC5C3CE +:105A800001000000604D01A000020000617411EDF2 +:105A90002E002572F9F7A3F80120A670E070D64811 +:105AA00026710078002801D1032002E0012803D1EB +:105AB000042008F0ABFC07003B0034F3CAEE050BF2 +:105AC00004070E070C00FFF7B0FF03E03800FFF7F4 +:105AD00092FF00E001252800F8BDC64902200968B0 +:105AE0008847F7E7F8B501200027C04C3E0020703A +:105AF000A7720220677260710820A0710420E07113 +:105B00003D002772F9F76BF80120A070BA48E570E4 +:105B100025710078002801D1032002E0012803D17B +:105B2000042008F006FF0600002E05D0042E04D144 +:105B30003000FFF760FF00E001273800F8BD10B526 +:105B4000FBF76BF8AD4CE06F4078002807D00021E0 +:105B5000022004F07CFEE16F0020487010BDA34CD1 +:105B60002078022812D104F0E9FE00280ED0A07897 +:105B7000002805D001221100002004F0E5FE10BD30 +:105B800001221100002005F025FB10BDA07800289F +:105B900003D19B480068804710BD2078012802D1BE +:105BA00008F0CCFF01E000F079FB0028F4D00128D8 +:105BB00006D0022801D00428EED1FFF71CFF10BD4B +:105BC000FFF733FF10BDF1B5884E3078022812D1AF +:105BD00004F0B4FE00280ED0B078002805D000985C +:105BE0000022012104F0B0FEF8BD0098002201213E +:105BF00005F0F0FAF8BD0098C088012802D2FFF73E +:105C00009EFFF8BD7F490098096888470500B07875 +:105C1000784F0028307816D0009901280FD128003D +:105C200008F068FF0400032834D100F075F904007F +:105C300003282FD139680220884700242AE0280051 +:105C400000F0B7FA25E001281FD1002070700099FC +:105C5000280008F045FD040003281BD100F080FB5C +:105C60000400032816D13968022088477078002480 +:105C700000280FD004F062FE002806D0009901220F +:105C80002800002304F064FE04E00099B421FD1A0A +:105C9000010000005C4F01A000020000B3B887843F +:105CA000280000F015FC0400002CB4D0012C07D013 +:105CB000022C01D0042CAED12000FFF7A6FEF8BDC7 +:105CC000FFF7BDFEF8BD10B5FFF7DFFEFBF74CFE9A +:105CD0000400FFF782FFA188E18010BDF3B581B019 +:105CE00006000025464F387802283ED104F030FEE9 +:105CF00000283CD04948006880470400B878002854 +:105D000007D0F088012830D343493000096888471C +:105D10000500E80602D52D072D0F00E0FD79002CC7 +:105D200023D0A088E188411AF08881421DDB3C4BDA +:105D300007043F0C1B683A00210030009847029886 +:105D4000002809D131480122364B12030178AA40BC +:105D50001C6838000023A047307A012803D132495B +:105D60003000096888470120FEBD0020FEBDB878DC +:105D70000299002803D0300000F0ACF9FEBD3000DD +:105D800000F028FBFEBD10B51D4C2078022801D084 +:105D9000032801D100F0EFFB0020207010BD10B5EA +:105DA00008F0E1FE032805D100F0C0F816490220F2 +:105DB0000968884710BD12480078002800D00120EB +:105DC000704701000A780020012A00D30120022A2E +:105DD00001D302231843032A01D3042210434A7833 +:105DE000012A01D310231843022A01D32023184388 +:105DF000032A01D3402210438978012918D115E0E4 +:105E000067DF00043C5B00B0F4F2000480ED0004A6 +:105E100090E0000414F30004C4F1000464F10004F1 +:105E2000C0F100045CF10004BCF1000480210843CF +:105E30007047364836498278002A01D0807900E0E0 +:105E40004079082804D2085C801E0006000E7047C6 +:105E5000FE2070472D482E498278002A01D04079D3 +:105E600000E08079082804D2085C801E0006000E3D +:105E70007047FE207047254810B5264A8178437A3E +:105E8000807A1278002904D001001800FBF713F87B +:105E900010BD1900FBF750F910BD70B5FB64078801 +:105EA00001000000585101A000020000EB8708E04B +:105EB00004001B4D2878A04218D0A978002916D0DC +:105EC000002C07D0012C29D0022C03D0032C25D183 +:105ED000022823D0154980200968884714490120E9 +:105EE00009688847002C19D10320287070BD022C46 +:105EF0000DD110480068804700280FD10A480E4B8A +:105F000041781E68002200781300B04706E002289E +:105F100004D10A4A01211268080090472C7070BD14 +:105F200067DF00049C04000480ED0004D8F2000444 +:105F3000D4F2000484F000048CF000043C5B00B058 +:105F4000F8B500240127FA4DFA482C706C702E0029 +:105F5000EC7120362C723775C078A870287E002826 +:105F600006D1F54A0A21126828000C3090472F7696 +:105F7000EC612C846C846C622C85EC702C71AC719F +:105F80007475B47503206F71F8BDF3B5040081B06A +:105F9000C08801286AD3E64E217A30000C300129EE +:105FA00000905CD0706AFF277F1C002817D1E34A5D +:105FB00005211268380090470028706256D00025ED +:105FC000DF4A8580358512680100009890470028D7 +:105FD00005D1DC49706A09688847756246E0308DF2 +:105FE000E288391A914225DA0D04716AD64B0968A4 +:105FF0002D0C1B6809182A0020009847308DCF4AC5 +:1060000040193085706A818849198180C188491991 +:10601000C18012680521380090470028706225D0A1 +:106020000025C74A85803585126801000098904791 +:106030000028CED0706AE5880068318DC24B4118C7 +:106040001B682A0020009847308D40193085706AFF +:10605000818849198180C1884919C18008E0B84AFE +:106060000098126821009047002801D10020FEBD51 +:10607000AF4C029820340028F0701FD1607DC1061B +:106080001CD501070120090F0003884005210904E0 +:1060900034F3E8EB0025AD4A2B0034F362E8401DF1 +:1060A00069412B000A2234F35CE805003B2A5D5667 +:1060B00001000000545301A000020000CBE36B6319 +:1060C000FCF776FFA84B29001D68A64A0023A847C5 +:1060D0007079002810D0A5480068804700280BD0B0 +:1060E000A07AFF2808D0A24909688847002803D071 +:1060F000A049A07A096888470120FEBD914AD2785C +:10610000002A08D1C288012A01D2002070478D4A96 +:1061100000232032537542E78B4870B5007803287E +:1061200001D1042070BDFCF743FF914909688847FD +:10613000002804D0FCF73CFF8E4909688847814855 +:106140000024203084758C48006880477D4D287974 +:10615000002806D001221100002004F013FC2C714D +:1061600008E08649012009688847854902200968B6 +:106170008847AC71002070BD724A70B52032927DA4 +:106180000024002A2ED1C08800282BD1C80629D48B +:106190006C4BE622587805001540F2220240022D91 +:1061A00001D1022A05D1B22A03D0F6221040F228EA +:1061B00018D11878C907C90F814209D10121484077 +:1061C00018707048006880476848006880470CE095 +:1061D000187A022806D26C49401C187209680220FD +:1061E000884702E0FFF798FF0400200070BDF8B573 +:1061F00004000F0053480025417900296AD101218C +:1062000041710021C1718279E62326001E40002AD7 +:1062100013D0A22E81710DD1E0060BD4F88800288E +:1062200008D1564901200968884755492220096844 +:1062300088474FE0FFF770FF2EE04078F6210840D6 +:10624000C22801D1042545E0FFF707FEF9888842FE +:10625000F0D93D4DE87800280FD02007EAD5012974 +:10626000E8D34A4938000968884729798006800EB2 +:106270008842DFD1E878002801D12007DAD4022E45 +:1062800004D12100380000F0B6FB05E0A22E05D1B4 +:1062900021003800FFF770FF05001BE0C6202040FA +:1062A000C228C7D1274E00252036B07D0028C1D195 +:1062B000F6200440F22CBDD1F8880128285EFA5F50 +:1062C00001000000505501A0000200000697682D53 +:1062D000BAD133493800096888473075401E3B28D9 +:1062E000B2D23048006880472800F8BD1A4B70B51C +:1062F0000024587900282CD1012058711800203032 +:10630000807D002822D15A78F62002401800C179F9 +:10631000481C0006000EC22A08D1022904D2D871F6 +:1063200021480068804714E0042412E01F4A1D79C8 +:106330001268002D04D0022908D2D871012003E090 +:10634000022903D2D8710020904702E0FFF7EEFE49 +:106350000400200070BD000074DF000467DF00044B +:10636000A4F20004B8F10004A8F20004BCF1000497 +:10637000D4F10004C0E8CE006322010030F3000431 +:106380001CF300043CF3000438F3000418F3000489 +:10639000D4F20004D8F2000400F3000428F300044F +:1063A000C4F10004FCF200042CF3000408F3000420 +:1063B000F8B50127FF4D00262F706E702C00EE718E +:1063C000FD4820342E722775C078A870287E0028DA +:1063D00006D1FA4A0A2112682000143890472F7615 +:1063E000EE612E846E846E622E85EE70F4482E71FE +:1063F000AE7100688047A07AFF2804D1F1490120DE +:1064000009688847A0726675A67503206E71F8BD8D +:1064100010B5FFF7CEFD10BD10B58288C3880068A7 +:10642000D21A12180024062B08D31078000905D1BF +:106430005078A42802D19078042802D000200C6063 +:1064400010BD1079002802D0521D0A6010BD0C60EA +:1064500010BDF8B50C000700D64EDB48CA073178EE +:106460000068D20F8A4206D07278C6231340022BEE +:1064700003D1D20601D58047F8BD0125D348694034 +:106480007571317000688047F88800283BD0E006BD +:10649000C00F3071CE4800688047CE49002814D024 +:1064A000002000904C7838006946FFF7B5FF009A4D +:1064B0000300002A01D0002B01D1052C05D1C648CC +:1064C000C64C417824680078A047307906B204B7FA +:1064D000010000004C5701A0000200008B2BAC65AE +:1064E0002900002800D000210022380004F0A4FE7A +:1064F0000028CBD03079002804D0BE49012009689B +:106500008847F8BDB048BD4BBB4A20301C68807A34 +:10651000F16A12680023A047F8BDB9480068B4E7E3 +:10652000F3B581B005000026A74CB64920340968B0 +:10653000A07A8847002803D0B349A07A0968884721 +:10654000FFF79FFC0299A54CC988884202D82068B1 +:10655000804736E09C4F280710D50129F7D3AB4977 +:1065600002980968884781069848890E0279914205 +:10657000EDD1C078002806D0012003E093480079CF +:106580000028E4D1B8702800C6210840022804D1B0 +:1065900002982900FFF767FF13E0E4212940A029B2 +:1065A00005D19B4A029812682900904709E0C22849 +:1065B000CDD1984A0298126829009047002800D04F +:1065C00002263000FEBD70B57F4C8E4D2034A07A7F +:1065D0008D4EFF2806D029688847002802D03168F0 +:1065E000A07A8847FCF7F8FC29688847002803D080 +:1065F000FCF7F2FC31688847874800688047724C96 +:106600000025207900280FD070488078002805D018 +:1066100001221100002004F0C9F904E00122110058 +:10662000002004F009FE257165709DE610B5664CEA +:106630006079002808D06F49002009688847002841 +:1066400002D00120A07110BD002010BD5E4810B521 +:106650004078F6210840C22801D1002010BD6F48C3 +:1066600000688047002801D0012010BD042010BD23 +:10667000554801212030817570475349002010B5DD +:1066800048715A480078002801D1012404E001280B +:1066900001D1022400E00024F9F744FE012120008A +:1066A000F9F794FE10BDF0B5002085B0464F039079 +:1066B0003800F9690C300029049006D15849049833 +:1066C000096888470028F8612DD05648006880473F +:1066D000401E0404B878240C002802D0E7E2827639 +:1066E00001000000485901A0000200003566D4CD29 +:1066F000641E2404240CF8690026C588A54208D22B +:106700004E490498096888470028039001D00398EF +:10671000C688F878002811D0A819A04213D23048B2 +:106720008078002804D1464800688047002804D1BA +:10673000444A0121126800209047C3E0A819A042F2 +:1067400001D8002000E0012001903F480068804708 +:1067500000280290F1D03878022239001043070057 +:106760000198002803D038001022104307001B486E +:10677000364A807800280DD0082007431268029816 +:10678000390090471648314A0179126802989047BB +:10679000022004E0126802983900904701202C4B37 +:1067A000002E009067D00D482A0005841B68C06940 +:1067B0000299984709480949C069098CC28852184A +:1067C000C280009808180004000C0090A819A0428C +:1067D00040D90249601B48843EE0000074DF000499 +:1067E00067DF0004A4F20004F8F2000434F30004AC +:1067F00014F3000400F3000484F0000424F300B058 +:1068000080ED00048CF0000408F3000410F3000491 +:1068100030F300040CF300043CF3000438F30004EC +:10682000C4F1000420F3000424F3000418F300046E +:106830002CF30004ACF20004F0F20004B0F2000407 +:1068400080F300047CF3000464F10004C8F1000448 +:10685000C0F1000496484684964B954C1B68628CA8 +:106860000299039898470398618CC088401803994F +:10687000C880618C10E08E48A54201D9048400E0F4 +:1068800005848B4C1B68228CE06902999847E0696B +:10689000218CC2885218C2800098012208188649AB +:1068A0000004C979000C12038A40854B83491C6897 +:1068B00009780023A0477E480021477041710120DC +:1068C00005B0F0BD0020FBE7F8B5C2257D480068A3 +:1068D0008047040027D0A088E188401A022822DBE4 +:1068E000734E794FB07800280BD0CA252C0BF4D208 +:1068F00001000000445B01A0000200001502B74E39 +:106900003A6829002000904770483A6801792000D1 +:106910009047022004E03A682900200090470120B7 +:106920006C4B6B4901221C68520409780023A04774 +:106930000020757070710120F8BD0020F8BDF8B519 +:106940006248C1790120000388400521090433F31E +:10695000BCEF0027624A3C003B0033F334EC401D9F +:10696000614123000A2233F32EEC564A14002034EE +:106970000028D06203D13B214843217526E0012342 +:10698000584D3C2112E0CA1AD60FB21852108A1A7A +:106990001206120E060056432275AE4201D21300B3 +:1069A00004E0AE4205D91100521E22755A1C8A42DB +:1069B000E9D3217D434A41435128116301D838006E +:1069C00000E051385129D06202D838001063F8BD78 +:1069D00051391163F8BDF8B505000120394E7071C9 +:1069E000F62001400F00F2291ED1E88801281BD1B2 +:1069F0007078F7210840F22816D13B492800096831 +:106A0000884734002034217D88420DD13748006802 +:106A10008047002815D1374BA07A354A1C68316B66 +:106A200012680023A0470CE0C22F07D1E888002895 +:106A300004D13148006880470120F8BD2F48006824 +:106A400080470020F8BDF8B5002406001D4D0F005A +:106A50002878C907C90F814210D1F18800290DD0CB +:106A6000012148402870264800688047F806C00F7A +:106A70002871244D10D0A87D002803D0FFF774FBA7 +:106A800004001CE000221100300003F0A3FF1E49A7 +:106A900001200968884712E0FCF7B2FA1B4909682F +:106AA0008847002804D0FCF7ABFA194909688847E1 +:106AB00000200200A8750121300003F08BFF2000A8 +:106AC000F8BD000074DF0004C0F1000467DF0004BB +:106AD00080ED00045CF1000464F10004C8F10004DE +:106AE000C0E8CE00F3040000C4F100041CF300046D +:106AF00010F3000430F300042CF300046A97189F8D +:106B000001000000405D01A000020000D876B40042 +:106B100014F3000400F3000494DF000408F30004FD +:106B20003CF3000438F300047047F8B50025002852 +:106B300001D0012400E00024FBF772FBFF4EA042CD +:106B400003D13078844200D00125FD4840790128E6 +:106B500003D0022801D0032811D1F849491C087834 +:106B6000002801D004280AD1087AF74B7D211F683C +:106B70004902F44A0123B8473078012801D0002D9A +:106B800003D02000347004F042FAF8BDF8B50400D8 +:106B9000EA4D6D1C2878A0424ED0EB4E030033F333 +:106BA000A8EE0504212121044A00012C43D1E74F1E +:106BB000002802D03968E8798847287A0121FCF753 +:106BC000ECF9002802D03968287A8847E049287A09 +:106BD0000968884700282ED14021287ADD4A366886 +:106BE000012327E0230033F384EE0528262626041C +:106BF0002600042028700AF084EEA9780020FAF715 +:106C000046FECF48437933F374EE05040A0A0A04BA +:106C10000A003768C021E879CA4A0023B847CC493E +:106C2000287A09688847002805D136684021287AE3 +:106C3000C84A0023B0472C70F8BD0AF062EEA9786C +:106C40000020FAF724FEEAE7F8B50700BB4C641C05 +:106C50002078042801D000282CD1BD4DB84E012F3A +:106C600002D1F8F705F90BE0B078002808D0707968 +:106C7000012820D002281ED003281CD0042819D1B6 +:106C80002968207A8847002809D0B049207A096805 +:106C90008847B078002802D10320FFF746FF00F0B4 +:106CA000C3FAAD48006880473800FCF7C2F90520F8 +:106CB000FFF76CFFF8BD2968207A88470028F9D1D2 +:106CC000A14B207A7D211C6849029E4A0123A047DE +:106CD000F8BD10B50AF0E8ED0AF0EAED00200AF080 +:106CE000ECED10BDF8B50700944D6D1C287AFF2817 +:106CF00004D19A490020096888472872FCF796F960 +:106D0000E8718E4800262E700670F7F73E70DC950D +:106D1000010000003C5F01A000020000B45A862B75 +:106D2000E5FF0400A879002804D03800AE71FFF711 +:106D3000DAFF68716879002818D08E4800688047AB +:106D4000F9F7CCFF002805D00120FFF729FF01202B +:106D5000FBF76CFAA9782878FAF7A3FDF9F7C4FFD6 +:106D6000854800688047002C04D004E0002C02D144 +:106D700003F035FEF8BD03F066F9784B41011C685D +:106D8000E879754A0023A04700210120F9F79CFB10 +:106D9000F8BDF1B57748006880476D4E714C761CA0 +:106DA0002168F07988476E4D002806D02968F0796F +:106DB000884700210800F9F787FB307AFF2806D0C2 +:106DC00021688847002802D02968307A8847FFF771 +:106DD00042F8694F0126002802D0FFF724F818E096 +:106DE00000F02DFE002802D001F0C6FE11E061483F +:106DF0000068804761490878022807D0032806D137 +:106E0000FAF71FFF0020F9F760FB00E04E703868CA +:106E100080475B48807AFF2801D021688847FCF7CB +:106E200003F921688847002803D0FCF7FDF829689A +:106E3000884700F003FA4D4800688047386880476B +:106E400050484078052802D0022004F0B6F9009896 +:106E50000670F8BD10B53E4C641C207AFF2815D092 +:106E60004448006880473F49207A096888470028DD +:106E700009D02078042806D13949207A0968884742 +:106E80000220FFF7EBFE3C480068804710BD304809 +:106E900070B5401C0078012806D0022804D00328D1 +:106EA00039D1002004F089F936484078052802D10C +:106EB000F9F702FC05E03448092102780800FAF7E6 +:106EC000D2F900210800F9F7A9FAF9F753FAFEF709 +:106ED000C2FF002802D0FEF7A6FF05E000F0AFFDDC +:106EE000002801D001F048FE254C1E4DA07A1C4E12 +:106EF000FF2806D029688847002802D03168A07A88 +:106F00008847FCF791F829688847002803D0FCF7E8 +:106F10008BF83168884770BDF8B50C00E1CF43E8C5 +:106F200001000000386101A0000200002441FB6064 +:106F300088061B4F09D519480078022802D0012085 +:106F400004F045F97878FFF735FE0F480068804770 +:106F5000600729D53878002801D0042824D10120E1 +:106F600020E00000405C00B060EF00B0795E0100FE +:106F700030F3000438F300043CF300045B5D0100CF +:106F8000DCF2000434F30004CCF20004D0F200047C +:106F9000295B00B094DF000424F300B080ED00040E +:106FA000415C00B0FFF706FEAD4800688047AD4E7B +:106FB000600716D5092006F097FE002811D0B0789A +:106FC00004280ED1A848017801290AD14178002966 +:106FD00005D10120F9F783FAFAF7D7FD01E0002186 +:106FE0004170E00632D5A148437833F396EC0A1E8F +:106FF0001E1E06061E0A1E1E1E489D48006880476B +:1070000013E0F9F75EFE0500FAF716FD032807D036 +:10701000A888022804D9801EA880E888801EE880FD +:10702000280002F0DEF8F9F75CFE9248006880471D +:107030003878002801D0042802D10120FFF7BAFDDA +:107040000320FFF7B7FD864800688047E0074AD075 +:10705000FAF770FD854D6878062824D181482038DC +:10706000007804281FD100F0FFFC002817D02878F2 +:10707000F9F769FEB9780020FAF71DFC13E07D48A6 +:107080000068804700F0E4F87B4800688047744857 +:10709000006880477949012009688847F8BD71492F +:1070A00001202039C87100F0DFFC002815D0F7F767 +:1070B00027FE00280ED07249F87909688847002811 +:1070C00008D1B07B0A21704B81401D68F8796D4A68 +:1070D0000023A84701F05AFD05E000F0BAFC0028A3 +:1070E00001D001F022FC20071BD5FBF7ADF80028EA +:1070F00017D1FFF7D6FEF7F703FE002805D0604949 +:10710000F87909688847002801D0002500E00425A7 +:107110005848006880472800FFF74CFD5048006839 +:107120008047E00912D0594840780528E47D482A74 +:1071300001000000346301A000020000042598E370 +:107140000ED151480068804700F08CF84F48006825 +:1071500080474848006880474D49012009688847B2 +:10716000600620D501F01CFD4549092008700A2061 +:1071700048700020F9F7BDF90020F9F74AFBFFF746 +:107180009AFE414800688047F9F7BCFD002805D009 +:107190000120FFF719FD0120FBF75CF8F9F7B8FDB6 +:1071A000344800688047A00782D53078012800D095 +:1071B0007EE702F07AF8F8BD394810B54078022829 +:1071C0000BD131480068804704F013F92948006862 +:1071D0008047022003F067FC10BDF9F78CFD10BD5D +:1071E00070B50024284D286880472E48007805286F +:1071F0000DD1FBF72DFF274E316888470124FEF79C +:107200003EFE2948807AFF2801D031688847194E10 +:10721000306880472868002C0AD08047002000F0A2 +:1072200011F8306880471A4901200968884770BD05 +:107230008047012000F006F83068804770BD19488B +:1072400000787047552149060A69D204D20F82425C +:1072500006D109698904C90F814201D10120704713 +:107260000020704710B5F9F73BFAF9F765FDF9F71B +:1072700006FB10BDD0F20004A8F200B0295B00B0FC +:1072800080ED000488F00004CCF20004DCF200047D +:10729000B0F100043CF30004795E010030F3000417 +:1072A00024F300B0415C00B094DF000470B5050029 +:1072B000ED4A0A241268EB4802219047012801D1C7 +:1072C000002415E0022813D1E849280009688847FE +:1072D000E74909688847002807D0012803D0022819 +:1072E00005D0032804D1032402E0012400E0062491 +:1072F000200070BD10B5DF4A002104009172080023 +:1073000011741318401C0006000E0528D972F8D31A +:10731000FAF717F9D84B20001C680222D149012343 +:10732000A04710BD70B5020000680D0003785468D6 +:10733000916833F3FCEA0B1414141A1AE2B735BF40 +:1073400001000000306501A000020000C9519BADA2 +:107350001A1414140D071300CC4B0A0021001C68EA +:10736000002311E0FF220270C94A200012689047F2 +:1073700070BDC84B0A001B682100984770BD2B00E8 +:107380000A002100C44C2468A04770BD0021D3E747 +:10739000F0B504004806C14EFF25002885B010DA7C +:1073A000BF482378016833F3CCEA0C0A0A0A0A0AB8 +:1073B0000A0A0A0A07070A3E0120257031E0200068 +:1073C00030E0080749D5B74901204870237833F3E6 +:1073D000B8EA0B070707373737070707373A2A0096 +:1073E00000200390029002A903A8FAF798F90190EF +:1073F00004A8F9F762FA0700019800280FD06B463D +:10740000187A07280BD8187B052808D8002F06D033 +:107410000499814203D902F04BFE002805D10020D7 +:1074200025703168884705B0F0BD39006B461A7A7F +:1074300020009D4C009224681B7B049AA047F2E731 +:10744000F9F763FCEBE704A8F9F737FA8F4B010073 +:1074500020001C68049A0023F0E7C807DFD1E2E7A8 +:107460009248006800478D490120096808478B4908 +:107470000120096808477CB5002204008C4B00926B +:107480001D681100130001A8A8470021894B217035 +:107490000A001B68010001A898477CBD70B5020076 +:1074A000854D0C00287804211170AE78834B052897 +:1074B00001D0072809D1002C03D01B68002231001D +:1074C0009847200002F067F870BD002C04D01B68BC +:1074D0000022310010009847694930000968884748 +:1074E0006849096888476D49002808D0012803D0F9 +:1074F000022804D00328E7D16878082803D1096856 +:107500002000884770BD200007F019FD70BDFEB552 +:107510000500FAF720F86848694A86780478126806 +:10752000310020009047002804D101212800FFF7F6 +:10753000B5FFFEBD052C01D0072C06D1614B3100F3 +:107540001B6820006A46984704E05F4AFAC11C02A3 +:10755000010000002C6701A00002000044ED5FE57F +:10756000300012686946904701006B461A784B4814 +:1075700033F302E849496B4618788872584901A8E4 +:107580000968884757490320287009686B461879AD +:1075900088474F4E544D002407E0336801222100F4 +:1075A00000209847641C2406240E29680020884780 +:1075B000A042F2D84D4F00240CE0396820008847E3 +:1075C000002804D133680122210005209847641C5B +:1075D0002406240E296805208847A042EDD8FEBD68 +:1075E0007CB504000078424B424D00280ED00128A3 +:1075F0000CD002280AD0032820D11B68274A00217A +:107600006846984700200200207021E0032A01D03C +:10761000002110E02149897A042902D100280ED1E5 +:1076200008E0072902D1012809D103E00A2906D17F +:10763000022804D101212000FFF73AFF7CBD401C45 +:107640000106090E21701B68144A684698472A4AA9 +:107650002B680721684698477CBD07C80023BFE711 +:1076600038B50400080709D56846F9F730F9010074 +:10767000009A20000123FFF7B3FF38BD002120004E +:10768000FFF716FF38BD0020704770476BDE00041F +:10769000A0F00004E4F000049CF0000456DF0004B5 +:1076A00084F1000478F100048CF1000488F10004F6 +:1076B000B0F1000498F100045CDD000490F10004D6 +:1076C00080F10004A4F000046CF1000480ED0004DB +:1076D000C4F00004C8F0000428F10004DCF0000449 +:1076E00090F0000460F10004CCF0000424F10004E8 +:1076F000B0F0000458F10004D40400007CB5062466 +:107700006B461C7000245C709870000AD870C848E2 +:107710000125012901D0022901D1057000E0047082 +:107720006B4619715A71521C85704270C14B03220D +:107730001B6892030621684698477CBDF0B500257A +:1077400087B00395029502F0BDFC040007D1BA484A +:107750000079002802D00120039000E0D5AAE4A916 +:1077600001000000286901A000020000FAA0274DD6 +:107770000124B74800270690B64B38001B6805AABD +:1077800004A9984706001BD06B461A7D197CB24BA2 +:1077900030001B689847002812D006986D1C807B2B +:1077A0002D062D0E4019A04202D3012003900CE0BB +:1077B0007078012804D1B078FE2801D10120029010 +:1077C0007F1C3F063F0E042FD6D30698807BA04235 +:1077D0000BD29E480079002804D1012D02D10298D5 +:1077E000002802D10398002829D09B4F0025994BEF +:1077F00028001B6805AA04A99847060011D06B460B +:107800001A7D197C3B6830009847002809D0934ABC +:107810006B461268197C300090470698807BA04226 +:1078200004D26D1C2D062D0E042DE0D38C4800686B +:1078300080478C4901200968884707B0F0BD884817 +:10784000006880477F48012181700021C170047960 +:107850002000F9F7DBFF029800280FD1824B0021AE +:107860001D68592001AA6B46A847019A51781078E3 +:10787000090208439178D278230003E07B48230073 +:107880000F220021FFF744FFF8F74AFE00220121F2 +:107890000A20F9F7D9FAD0E710B5F9F7C6FF714910 +:1078A00068480968C078884710BD402910B502D1E2 +:1078B000FFF7F2FF10BDF9F7B8FF6A490020096829 +:1078C000884710BD70B54568846802F005FC6049C2 +:1078D0005C4E897B88420BD92878012808D15F4A01 +:1078E00021061268090E28009047F078401CF070BD +:1078F000FAF736FB002805D0F9F797FF5949F078D9 +:107900000968884770BD4F4810B50079F9F77EFFC8 +:10791000544901200968884710BD10B5F9F785FF63 +:10792000504901200968884710BD1CB500214E4B05 +:1079300055201C6801AA6B46A047019800780128D1 +:1079400002D0022800D008201CBDF0B5002585B06B +:1079500047484078022838D1F9F7DBF90400C0889D +:10796000052832D12068007800282ED16A1DFFA496 +:1079700001000000246B01A000020000DAC444CE24 +:107980003E4E00213768A32003AA01ABB8473768F1 +:107990000021A52004AA01ABB84736680021A72022 +:1079A00002AA01ABB04720684178FF2902D1827852 +:1079B000FF2A0BD06B461A79022A10D3049A137847 +:1079C00099420CD181785278914208D1029A009262 +:1079D000049AC1780079931C00F004F8012528006E +:1079E00005B0F0BDFFB581B00E001D0026480A9F0E +:1079F000006880470400006812210170206801219E +:107A000041700221E1800822210028001F4D2B68CF +:107A100098472B680822210038009847012E08D18A +:107A20002B68022203982100984720680178891C5E +:107A30000170FAF7C0FA0199084000070121800B94 +:107A4000C9034018F9F70EFA114BE0881C680022B0 +:107A500003211300A047C3E783ED000458F100049D +:107A60005CDD00045CDE0004FCF00004A8F100040E +:107A700004F1000400F10004B0F10004ECF1000492 +:107A8000FFFF000080ED000464F10004D0F1000469 +:107A90005CF10004F94A002110001170203051708F +:107AA000017091708170C173FF23017443702030A5 +:107AB000C174D1717047F14900200978002904D0C0 +:107AC000EF494978062900D10120704700B5FFF73A +:107AD000F2FF002806D0E94820300078022801D1C2 +:107AE000012000BD002000BDF8B5E44CE54DE64E98 +:107AF000E64F403404E02968200088473168884711 +:107B00003968200088470028F5D00020E0732082E3 +:107B1000A073F8BDFEB50700D84800260400203445 +:107B20000770E670267166712672A671E67101F023 +:107B300092FFE072A0726072FE20D54B20731D6828 +:107B40000021B12001AA6B46A847019825000078C2 +:107B5000A07301206674A0742035C848AE746E739B +:107B600046718671287B002806D1CA4A0A2112680C +:107B70002800904701202873C44928004C31B724BD +:107B800001000000206D01A00002000017B0478036 +:107B900009688847002801D1FFF7B0FF0120EE7384 +:107BA0002E82012FA87301D0032F10D1B849BD4BED +:107BB00048702670CE700E71E8741D680021672031 +:107BC00001AA6B46A847019800786073FEBDB749CB +:107BD000042F1BD12070AE484670EE744665607865 +:107BE000FF2803D10968002088476070AD4B002151 +:107BF0001D68B42001AA6B46A8470198007801F0DF +:107C000021FF6073A34806214170FEBD0220207051 +:107C10009F484670EE746078FF2803D10968002001 +:107C2000884760709F4B00211D68B42001AA6B46F5 +:107C3000A8470198007801F005FF96496073062077 +:107C40004870FEBD70B5050099480E000068804779 +:107C5000904C98492078072801D008280AD18C48F0 +:107C600020308278022A05D001228271C57108680D +:107C7000804770BD086880478F4B21781C683200B0 +:107C800028000023A04770BDFEB5002803D0D422F1 +:107C90000825009202E0D52209250092002901D092 +:107CA000022705E00227002801D00A2500E00B2565 +:107CB000774E2036F078002800D003277F480068F0 +:107CC00080477F1C3F063F0E04000028019732D0FA +:107CD000A088E188411A781C814202902BDBF9F7D9 +:107CE0001EFE002807D1764AF02112682000904736 +:107CF000029807063F0E724A0199126820009047C9 +:107D00006F4A00991268200090476D4A2900126856 +:107D100020009047F078002804D0694A3179126831 +:107D200020009047B07B0121090381403800FFF714 +:107D300089FF0120FEBD0020FEBD10B5FBF7BAF99A +:107D4000604909688847002804D0FBF7B3F95E4909 +:107D5000096888474E48002181714030807C0028A6 +:107D600003D1082002F05FFE04E001221100002090 +:107D700002F08AFEFFF7C2FE10BDF0B5002089B008 +:107D80000790484B069002901C680100B2DE0FE895 +:107D9000010000001C6F01A000020000C57CD1E9B9 +:107DA000642006AA07ABA047494800688047050041 +:107DB0006B46187F11300606360E002D08966FD0E0 +:107DC000A888E988411A701C0400814268DBF9F731 +:107DD000B0FD404F002805D13A68F02128009047B7 +:107DE0002606360E3B4C08992268280090472268E8 +:107DF000D42128009047226800212800904703A83A +:107E000001F06EFE364B0A221B68290003A8984732 +:107E1000244F2268203739792800904722680021B2 +:107E2000280090472268002128009047224B00211B +:107E30001C68672002AA01ABA0470298007801F0F5 +:107E40003FFE04006B46187F002801D00220044347 +:107E50007879002801D001200443174B00211F68C6 +:107E60006E2002AA01ABB84702980078012801D120 +:107E700080200443174A21001268280090476B466F +:107E80001A7F002A04D0164B06981B6829009847D1 +:107E900005480178072901D0082923D1002223E0D1 +:107EA0002AE0000088F200B080ED0004ACF200048B +:107EB000BCF10004BCF20004ECF10004A4F20004E4 +:107EC00034F30004CCF20004D0F200045CF10004AE +:107ED00064F10004C8F100043CF3000438F300042A +:107EE000D0F1000401221206FF4B30001C68002371 +:107EF000A047012009B0F0BD0020FBE7F8B500293C +:107F0000069F01D0082400E00A24002804D100299B +:107F100001D0092400E00B24F44EF988F578002DF7 +:107F200001D0491C00E0891C022911D1002802D08F +:107F3000D42A0DD101E0D52A0AD19C4208D1002DC6 +:107F400008D0EB493800096888473179884201D068 +:107F50000020F8BD0120F8BD70B50500E34CE54EEA +:107F6000E078002803D032682179280090476079B2 +:107F7000002803D03268217A2800904770BD70B580 +:107F80000500DC4C0029226804D0D4212800904749 +:107F9000062103E0D521280090470721E7E607687E +:107FA00001000000187101A0000200009D435E8DD9 +:107FB00022682800904770BDF3B583B001F026FE1B +:107FC000C51CD248006880470400681C05062D0EB9 +:107FD000002C02953BD0A088E188411A681C06005D +:107FE000814234DBF9F7AFFCC74F002805D13A686E +:107FF000F0212000904735062D0E3A6802992000A6 +:10800000904703992000FFF7C4FF0498002801D08F +:10801000402000E05020BA4E01906B46707C1979E8 +:108020000843019001A801F0E0FD3A686B46197918 +:10803000200090472000FFF799FFB07B0121090342 +:1080400081402800FFF712FE012005B0F0BD00209E +:10805000FBE7F1B586B0AA48AD49203009680600B3 +:108060008847348A05000020E71C707301F0CEFDBC +:10807000C0190704A2480590007B3F0CB84213D2F8 +:108080000700C01E04040598240CC078002802D004 +:10809000641E2404240C05984079002802D0641E34 +:1080A0002404240C012070739848006880477F1CCA +:1080B0003F043F0C04903806000E0390F9F743FC90 +:1080C000002802D17F1C3F043F0C0498002865D093 +:1080D00004988188C088081AB8425FDBF9F733FC3E +:1080E000002804D1884A04981268F0219047864AF3 +:1080F000039912680498904706990498FFF749FF7E +:108100000598407C029002A801F06FFD707B00286A +:1081100004D06B46187A1021084302907A4A6B46C5 +:108120001268197A049890470498FFF71FFFE888AF +:10813000784BA04208D31B68220004992800984776 +:10814000E8880019E8801DE00190201A0004714BB6 +:10815000000C00901B68019A049928009847E98850 +:1081600001986D4A0818E880126801213000904794 +:10817000684B009A1B68049905009847E9880098A5 +:108180000918E980F47305980121807B0903814077 +:108190003800FFF76BFD012007B0F0BD0020FBE7C2 +:1081A000F1B582B001F032FD051D5848A7B52EB2D9 +:1081B00001000000147301A000020000BD273D0E65 +:1081C000006880470400681C05062D0E002C0195F0 +:1081D0003ED0A088E1886E1C401AB04238DB54487B +:1081E0004E4F0078052801D0072805D13A68F021C4 +:1081F0002000904735062D0E3A68019920009047DF +:1082000002992000FFF7CFFE90200090684601F011 +:10821000F6FC3A686B461978200090472000FFF77B +:10822000AFFE3C4E3A68B17C20009047B17B0E22F5 +:10823000531A0122B07C9A40904202DB0121890648 +:1082400001E0884001032800FFF71AFD0120FEBD70 +:108250000020FEBDF8B505000E002E4C4107E07869 +:108260002D4F0BD5002819D0F088002816D039687A +:10827000300088472179884210D101E000280DD1D3 +:1082800028070DD56079002808D0F088002805D08F +:10829000396830008847217A884201D00020F8BD33 +:1082A0000120F8BD70B51D00049C01F0CCFC002835 +:1082B0000BD02809082808D121002800FFF7CAFFA1 +:1082C000002802D0E088002801D0002070BD0120E5 +:1082D00070BD70B50500049E1C0001F0B4FC0028C0 +:1082E0002FD0200909282CD131002000FFF7B2FF40 +:1082F000002826D0F088012823D10749054C002DFD +:1083000018D0096830008847A17C88421BD018E04B +:108310005CF10004A8F200B0C4F10004C8F100044C +:1083200064F10004B0F20004C0F10004B4F20004EF +:1083300080ED0004096830008847A074401E3B2887 +:1083400001D3002070BD012070BD10B5FF4A138A13 +:108350001100D81C2039CC780004000C002C02D06D +:10836000401C0004000C4C79002C02D0401C00047E +:10837000000C002B01D1002010BD097B814207D9E0 +:10838000907B002804D1F24A012112689047F2E75D +:10839000012010BDF8B5EF49EC4809680400884792 +:1083A00000281ED1EC49200009688847C388E27B79 +:1083B000EA49EB4E0027934214D3238A2B95700F82 +:1083C00001000000107501A00002000070533E4043 +:1083D0009B1A2382C3889A1AC280E773C088002838 +:1083E00009D109682000884731688847DD4A0121A2 +:1083F000126800209047F8BDDD49C7800968D51A8A +:108400002000884731688847D84920000968884794 +:10841000C188491B0904090CC1800AD1D449200034 +:108420000968884731688847CE4A012112680020D0 +:108430009047208AE17B401A2082E773F8BD70B52F +:108440000C001100059E049D1A0001F006FC002896 +:1084500010D02809002C02D004280BD101E00528F7 +:1084600008D131002800FFF7FFFE002802D0F08875 +:10847000002801D0002070BD012070BD70B506003D +:10848000B748B74D807C403D002801D000240EE065 +:108490000124FAF737FEB84909688847002804D054 +:1084A000FAF730FEB549096888470020A871287896 +:1084B00000222100300002F00FFB70BD70B51C00DF +:1084C000049D01F0CAFB002816D0A548210902D05E +:1084D0002109012910D18174A148A1072038407CCD +:1084E000890F814208D129002000FFF7BDFE002836 +:1084F00002D0E888002801D1002070BD012070BDA5 +:10850000F8B5062426009E4800688047050066D01E +:10851000A888E988401A072861DB00200090F9F755 +:1085200026FA984F002804D13A68F0212800904795 +:1085300007263A682100280090473A68D42128008D +:1085400090473A68042128009047854C3A68203CBF +:1085500021792800904701F0B3FB032806D1E17B85 +:10856000C90702D0217CC90700D10220002805D00C +:10857000012805D0022805D01B2104E0002102E0DB +:10858000092100E012210091E0723A686B461978E7 +:1085900028009047207B617B884201D9217302E04B +:1085A000814200D96073607B40280BD0802805D0C1 +:1085B000C02805D0FE2805D1032104E0012102E0F6 +:1085C000022100E000213A68280090470CA1A0B7E2 +:1085D000010000000C7701A000020000FDEFFA0886 +:1085E000A07B0121090381403000FFF75DFB0120E2 +:1085F000F8BD0020F8BD70B505005E4C407B203C06 +:10860000E073A87B2074E97B0E200E2900D80800B7 +:10861000A073287C01F048FA217B814200D92073A5 +:10862000287CC00700D16071524DE17B607A403DEB +:10863000814202D8217C81420BD9FFF76BFF0028D1 +:1086400003D004206870012070BD01F05AFA0020A8 +:1086500070BD01F0DBFA0520F4E7402931D811297B +:108660002FD30278401CD52A2BD10278401C012A36 +:1086700027D1404A0A30203A03781279401C9342AD +:108680001FD13C4A403A1278032A01D1801C07E0EE +:108690000278401C002A14D10278401C002A10D114 +:1086A0000278401C12091201002A0AD100784C22DB +:1086B000104206D1800702D5112904D801E0112902 +:1086C00001D00020704701207047F1B5002086B02E +:1086D000284D05900490FF20403D0390A879002884 +:1086E00006D12E4C069821688847D528059001D0E0 +:1086F00000240EE02168069888470728049007D1D7 +:108700000698C0880028F3D021680698884703900F +:108710000124184E6878403E3700831E40372036CB +:1087200032F368E9140B0B6865A2A2D1A28787F522 +:10873000F5A2A2F4F365F2F1F165194F194AB9787F +:108740001268387890470698174EC088801C00063B +:10875000000E402802904AD86B46187D3070187C75 +:10876000124B707006981B68C288B11C9847200095 +:108770000F4C1FE0C8F200B07CF30004BCF2000410 +:10878000B0F20004ACF20004BCF100043CF30004BD +:1087900038F3000464F10004C8F10004C4F10004DB +:1087A00080ED000430F1000400DF0004D4F1000487 +:1087B0001CF100040ED002993000FFF74EFF002894 +:1087C00008D02268B8780299904702993000FFF7E4 +:1087D00012FFFFE42268B878002190477A9BA066D8 +:1087E00001000000087901A00002000043A282A05D +:1087F0006878022803D1FFF7FCFA002802D101F0C3 +:108800008AF908E103208EE0002CF8D06B46187D31 +:10881000197CD528F3D10529F1D10698C088012803 +:10882000EDD1FF4906980968884731798842E6D139 +:10883000F07A717A884203D07072B072F9F79CF8BE +:1088400001F0EEF973E0002C14D0069A6B4600920A +:108850001C7B1A7C197D00202300FFF741FD0028B6 +:1088600008D0062002F01BF9052068700120F8747A +:108870000120B9E4072002F012F9CCE00E2801D063 +:108880000F2800D1A878002C7DD0069A6B46009264 +:108890001C7B1A7C197D00202300FFF723FE002893 +:1088A00047D001F00EFAB87C002809D1FFF790FDFF +:1088B0000120F874052068700698FFF7F3FDD7E7EC +:1088C0000698FFF7EFFD0920012168700800FFF707 +:1088D0009BFBCDE701F0E4F986E4002C53D0069A27 +:1088E0006B4600921C7B1A7C197D0020230001F04E +:1088F000F0F900281DD001F0E4F9FFF769FDFFF75A +:1089000042FD002811D00120FFF7CBFB00283AD010 +:10891000787B002806D1062005E051E068E046E0BB +:108920003EE013E008206870A2E70120F8740520FB +:10893000F9E7069A6B4600921C7B1A7C197D002091 +:108940002300FFF7E4FC0028C4D11CE0002C1AD05F +:10895000069A6B4600921C7B1A7C197D002023002E +:10896000FFF7BEFC00280ED0A878687006280DD04E +:10897000072804D0082809D009280DD003E00120D9 +:10898000FFF736FC05E0FFF714FA44E00120FFF79B +:1089900088FB0028F7D06BE7012001F06DF9F8E7BC +:1089A0001120012168700800FFF7AAF91CE4002CCF +:1089B0002FD0069A6B4600921C7C1A7D01211FE085 +:1089C000002C12D0069A6B46D288187D197C012A99 +:1089D0000BD1D52809D1032907D1914906980968F7 +:1089E00088473179884200D12AE701F07DEC3F0FBA +:1089F00001000000047B01A00002000063C6E12327 +:108A00008DF812E0002C0ED0069A6B4600921C7C6A +:108A10001A7D002100202300FFF7ACFA002802D0C5 +:108A200001F0FCF82EE701F06EF80020E5E670B5E5 +:108A3000814C824E20782500203D022819D1F7F77D +:108A400025FDA07A00280BD02878042803D130789F +:108A5000F8F7FBF970BD01210420F7F76BFD70BD3D +:108A600077490120096888477649012009688847C5 +:108A700070BDF8F7B8F928780228E8D1A07A002864 +:108A800002D10121080001E001210420F7F752FD85 +:108A9000F7F7FCFC70BD6C4810B5006880470121F9 +:108AA0000020FFF737F9002811D0634820380178FB +:108AB0002030022907D10A21644A0170126801217D +:108AC0000800904703E0042901D1092101706048A2 +:108AD0000068804710BD10B5574C207805280AD192 +:108AE0000020FFF78FFB002805D006202070002112 +:108AF00020002030C17410BDF8B505264E4C5548F5 +:108B0000203C2500807840352034002802D1012007 +:108B100026701CE0A07B504980000958A07C41438E +:108B200039204001814201D9010001E0002906D02D +:108B30004B4B60781F68494A0023B847E7E700209D +:108B4000FFF760FB002803D0062020700020E874A7 +:108B5000F8BD3948417C002901D1032100E0491EBC +:108B600041747047F8B5002801D1FFF7F2FF324D8C +:108B7000314C2035A87C0027042600281CD1394917 +:108B8000280009688847002813D00020FFF793FACF +:108B900000280AD0EF7401F09EF833496078096824 +:108BA0008847687B002801D12670F8BD0720207017 +:108BB000F8BDFFF7A1FFF8BD002001F067F800281D +:108BC000F9D001F088F8EF74EEE7F1B582B001F06A +:108BD0004FF8C51C2548006880470400681C05063E +:108BE0002D0E002C019551D0A088E188411A681CF7 +:108BF000060081424ADBF8F7D8FE1D4FFE2CE2AAA0 +:108C000001000000007D01A000020000AEB2E26D94 +:108C1000002805D13A68F0212000904735062D0E36 +:108C20003A6801992000904702992000FFF7EDF97A +:108C300080200090684601F014F83A686B46197875 +:108C40002000904720001FE0C4F10004A8F200B00B +:108C500080ED0004D8F20004D4F20004CCF2000449 +:108C60003C5B00B0D0F2000484E00004A4040004E3 +:108C7000DB7B010030F30004B0F2000438F30004A1 +:108C800064F10004C8F10004FFF7ACF9FF480121CA +:108C9000807B090381402800FFF724F80120FEBDF6 +:108CA0000020FEBD70B50026F84DF84C203D287818 +:108CB000012821D002281DD003281DD004281CD152 +:108CC000F7F792FC00210800F7F7E9FCF04800688C +:108CD0008047F0490878022807D0032807D1F9F720 +:108CE00046F80020F7F787FC01E001204870EA48C9 +:108CF00000688047267000E06E70FEF74FFF2E7010 +:108D0000A67070BDE14838B5203801782030407A2F +:108D100002290FD1002807D0012807D0022807D048 +:108D2000032818D104200EE001200CE002200AE004 +:108D3000032008E000280FD001280FD002280FD010 +:108D4000032808D10820D54B00901C680021712011 +:108D500001236A46A04738BD0520F4E70620F2E764 +:108D60000720F0E7FEB50020010001AACC4B0290DD +:108D700001901C68B32002ABA0476B46187A1230F2 +:108D80000706C8483F0E00970068804706007ED05F +:108D9000B088F188411A781C040081427EDBF8F724 +:108DA0000EFEC14D002805D12A68F0213000904701 +:108DB00027063F0EBC4C009922683000904722687D +:108DC000D521300090472268012130009047AF4DF7 +:108DD000A87A2A00203A002802D0107804280DD161 +:108DE0000024F9F742F9A94920390919641C2031F6 +:108DF0002406240E0A2CC874F3D30DE00120E87475 +:108E0000FE202875022011180B7A401CFE66079F71 +:108E100001000000FC7E01A000020000F4C9ED6426 +:108E200020310006000E0A28CB74F6D3A44B9C48D0 +:108E30001B680A22310013309847A04C2979226818 +:108E400030009047226800213000904722680021BE +:108E5000300090472268A97B30009047687B00F083 +:108E60007FFE6B46197A002901D0022108436979F7 +:108E7000002901D0012108432268010030009047F9 +:108E80006B461A7A002A04D08D4B01981B6831007A +:108E90009847A87B0122120382408A480178380053 +:108EA00000E005E0884B1C680023A0470120FEBDC0 +:108EB0000020FEBDF0B51500012285B0029200220F +:108EC0000192EA88921C3F2A48D80F2A46D3D42818 +:108ED00044D1002942D172490E220E39280007F0F0 +:108EE00035FF280001F00AF8002837D0774C280019 +:108EF000216888476A4E0028307101D0012100E0C6 +:108F000000210E28F17029D8216828008847644F75 +:108F1000F073203F3978022901D100281ED1216841 +:108F20002800884730743978022901D1002815D1EA +:108F300021682800884704004C2108420ED12000F7 +:108F400000F0DAFD317B814200D93073A007E88858 +:108F500002D5002805D101E0002802D0002005B08C +:108F6000F0BDE888524F0606360E3300039605D151 +:108F70003D680021732003AAA8470EE00020544E4C +:108F800000903668010073206A46B0476B461A7B32 +:108F9000504B00991B6828009847200601D502AA6B +:108FA00000E001AA3C6800217D200123A0470120A8 +:108FB000D5E7F1B586B00026444FFF20059604960C +:108FC0000390396806988847D428059040D13968BD +:108FD000069888470628049007D10698C08800287C +:108FE00036D039680698884703902D4C23782500A1 +:108FF0009B1E203531F326ED08052F3C2EFCFDFA93 +:10900000F92E6B46197C187D069AFFF753FF00284E +:109010001ED0FFF7B1FE00281CD00320EC63367F82 +:1090200001000000F88001A000020000DD8A87A393 +:109030002070EE74FFF77AFE234B02961C68002125 +:10904000772002AA01ABA0470298007800280BD134 +:109050002148264B41781C68002200781300A04765 +:109060002348C9E0FFF701FD2BE46B46197C187D0E +:10907000069A00F001FF002804D000F0C9FE002885 +:10908000F2D0DDE0069A6B4600921F7B1A7C197DB8 +:1090900001203B00FFF74EFA00283CD0FFF7C0F953 +:1090A000A87C002829D1FFF745FD00220698012160 +:1090B00020E00000A8F200B0CCF20004295B00B070 +:1090C000D0F20004F0F10004ECF1000464F10004BB +:1090D000C8F10004D0F1000480ED00045CF100044C +:1090E000C4F10004E4F10004D4F100048CF00004A5 +:1090F00088F0000401F02CFD16E40022069811000F +:1091000001F026FD002000F0DFFD0028F4D000F083 +:1091100000FEEE7494E06B46187D1F7C1B7B84463A +:10912000FFF735FD069A00923A0001206146FFF7ED +:1091300001FA070000F0EDFD002F01D00020BBE098 +:109140006B46187D1F7C197B069A019202000091E4 +:109150003B0000210120FFF7AEF9002810D0FFF7F7 +:1091600016FD0020FEF7C5FF0028C5D0EE7400F004 +:10917000D0FD6078FF49096888475EE020703DE4D3 +:10918000069A6B4600921C7B1A7C197D01202300F5 +:10919000FFF7CEF8002802D000F030FE2EE4069A49 +:1091A0006B4600921C7C1A7D012108002300FEF70B +:1091B000FFFE002802D0FFF78CFC1FE4069A6B46E6 +:1091C00000921C7C1A7D002101202300FEF7F0FE96 +:1091D000002800D146E7E8480068804700210800E1 +:1091E000FEF7B6FD002806D0FFF770FDE34A012127 +:1091F000126800209047E2480068804734E46CE041 +:109200005DE000E023E0069A6B4600921F7B1A7C2B +:10921000197D01203B0000F084FD0028EED0FFF70F +:10922000FFF8FFF7D8F800280ED0002008E5DF5936 +:1092300001000000F48201A000020000FDEEE42025 +:10924000FEF761FF0028E3D0EE7400F06CFD687B50 +:10925000002801D104209BE7072099E7FFF774FC61 +:109260000CE4069A6B4600921F7B1A7C197D012044 +:109270003B00FFF77EF800280ED0FFF7B6F8002875 +:10928000ECD00020FEF73FFF0028C1D000F04BFDDE +:1092900004202070EE74F1E6069A6B4600921C7B67 +:1092A0001A7C197D01202300FFF74CF8002800D01C +:1092B0007CE7069A6B4600921C7B1A7C197D012084 +:1092C0002300FFF741F900288ED00120FFF772FC40 +:1092D000D4E6069A6B4600921C7C1A7D0121080098 +:1092E0002300FEF76FFE002800D06EE7C6E6069A60 +:1092F0006B46D288187D197C0B2ACCD1D428CAD1D0 +:109300000229C8D1A44E00253968069888477119EA +:109310002031C97C8842BED16D1C2D062D0E0A2D30 +:10932000F2D3396806988847207100F02BFD002899 +:10933000B1D003202CE7F8B50500974E3078340003 +:10934000203404280AD12078012801D1756541E034 +:10935000022803D100F0F7FB6072A072A07C012804 +:1093600001D00120A074A07A0024002818D1E88838 +:10937000012704281AD33902884217D887492800C0 +:1093800009688847F02811D184492800096888476E +:1093900003280BD3E988491C814207D13C0005E032 +:1093A000E8880121022801D3FE2801D9200000E02D +:1093B0000800317801290FD0022903D003290BD0EE +:1093C000042908D1002803D02800FFF706FE01E099 +:1093D000FFF755FB0120F8BD002803D02800FFF758 +:1093E000B0F9F8BD00F010FCF8BD6B480221203048 +:1093F00001702038406D002800D09CE77047F3B51D +:1094000083B00025644E307834004034012801D008 +:10941000032813D1624B02951F680021682002AA1D +:1094200001ABB84702980078012807D0A07B00283C +:1094300004D00398C088002807D0757170EA668848 +:1094400001000000F08401A000020000309AE76EE5 +:10945000594A0399126820009047002801D1002042 +:109460009BE50398218AC088081820820498002868 +:1094700001D0A57301E00120A073E07C00282DD06D +:10948000FEF7BDFF002829D03078022801D004283B +:1094900001D1002000E00120FEF73FFE00283078D7 +:1094A00035D0022801D0042810D1E57400F045FC25 +:1094B0003E4D3A492035096868788847607B002826 +:1094C00001D1042000E00720287007E0E574607BEC +:1094D000002801D1062000E00820707030780128B3 +:1094E00001D0032811D1A07B00280ED07079C006CE +:1094F0000BD5F9F757FE7179314B0A07120F092185 +:1095000091401C682D4A0023A047012045E5022810 +:10951000FBD00428F9D0FEF788FCF6E770B5234CA1 +:109520002034617AE27AA07A914201D1884233D024 +:109530001E4962720978002805D1022901D105254A +:109540001DE007251BE002290BD106250021042080 +:10955000F7F722F8002235201100C001F7F700FDCF +:1095600000E00825A07A012803D0022801D00220BB +:10957000A072607A012802D0022800D0A07211489F +:109580000570A17A2800F7F7FCFE617AA07A2A001C +:10959000F7F727FFFFF7DEFB70BD000038F300048C +:1095A000CCF200043C5B00B0D0F2000488F200B0C2 +:1095B000C4F10004ECF10004A8F2000463220100ED +:1095C00030F3000480ED00040021012010B5FEF707 +:1095D000D3FB002812D0FF48FE4C8078203C0228A4 +:1095E00002D02078032809D0FB48FC4B81781B6807 +:1095F0000078002298471320607010BD00F0B5FA83 +:1096000010BD0121080010B5FEF7B6FB00280BD0F5 +:10961000F148F24B81781B68007801229847ED49A8 +:1096200011202039487010BD00F09FFA10BDF8B528 +:10963000EB48006880470E2504002F0000282FD03B +:10964000A088E188401A0F282ADBF8F73E20C9CE0F +:1096500001000000EC8601A000020000BD262326C8 +:10966000E0F9E54E002804D13268F021200090474F +:109670000F2732682900200090473268D42120004B +:1096800090473268022120009047DC4BD6481B6887 +:109690000A22210013309847D34D326829792000DF +:1096A0009047A87B0121090381403800FEF74CFB5D +:1096B0000120F8BD0020F8BD10B5FFF7C2FF00285B +:1096C00004D0C94914202039487010BD00F062FA56 +:1096D00010BD10B5FEF7D3FBC349022020394870F6 +:1096E00010BDC74901200968084710B5BF4C0028C4 +:1096F00018D00120FEF79AFABB49062060700220BC +:1097000020394870BF480079002804D0BE480022A4 +:109710000121F7F72FFCFEF7B2FB002801D100F082 +:1097200040FA10BDFFF7F0FAB549082060700968EB +:109730000020884710BDFEB506000020AB4901900F +:10974000009008788D78052831D006282FD007287A +:1097500001D008281FD1A4482038007803281BD046 +:10976000AA4B00211C68622001AA6B46A047019801 +:109770000078012805D0022805D0032806D1022050 +:1097800002E0002000E00120F8F729F90320FEF7AD +:109790004DFAFFF791FFFEBD9D4A28001268694609 +:1097A00090476B4601901978FEF775FFFEBD994A08 +:1097B0000024126829009047002800D00124964F09 +:1097C000280039688847002807D1F7F76EFF002C7A +:1097D0000AD03000FDF745FFFEBD396828008847F4 +:1097E0008E480079F8F7A8F80120FFF77EFFFEBD4C +:1097F0007E4910B50978052901D1FDF7CEFF10BDCE +:1098000010B5794C203C2278002A02D1FDF7C8FF20 +:1098100010BD6078042810D004DC022807D003288B +:10982000F6D10AE014280BD01528F1D10FE0FEF78D +:1098300026FB002801D0032007E000F0B2F910BD9C +:10984000FFF7FFFE002802D01520607010BD00F069 +:10985000A1F910BD644A1021203A51709C2575F180 +:1098600001000000E88801A000020000036B5B8E8D +:1098700001210170704710B5604C203C63789B1F3C +:1098800031F312E90A11111111060D1B29222910B9 +:109890000120FFF7E0F9002801D00B200BE00720A2 +:1098A00001F04DF910BD0120FFF7D5F9002812D0C5 +:1098B0006078A0700C20607010BD0120FFF7CBF91C +:1098C000002808D00D20F6E7012000F084FB0028D6 +:1098D00001D00F20EFE7FEF7BCFA10BD10B5474CE2 +:1098E000203C63789B1F31F3E0E80A060606061762 +:1098F0001E22270F2716012000F06DFB00281BD029 +:109900006078A0700E2005E0012000F064FB0028C4 +:1099100012D00F20607010BD0120FFF79CF90028C5 +:1099200001D00B20F6E7072001F009F910BD012056 +:10993000FFF791F90028F9D1FEF78BFA10BDF3B5C6 +:109940000C00002581B02D4E203EB0793100097801 +:10995000002808D0032903D1A00700D5F570FEBD6B +:10996000FEF777FAFEBD60060127002819DA3148B4 +:109970000129C06F0FD14178002908D0457002201D +:1099800000F03AFF234900200968884709E0019860 +:10999000FFF771FF05E04078002801D0377100E043 +:1099A000F770A0071FD53078012802D1FFF796FF86 +:1099B00019E0307900280FD01E48C06F4178002987 +:1099C00003D04570022000F017FF12493571F57081 +:1099D00009680020884706E0F078012803D1F57077 +:1099E0000198FFF748FF600737D53078032834D156 +:1099F00002488178022930D031791DE0A8F200B008 +:109A000080ED0004C4F0000464F10004C8F1000417 +:109A1000D0F10004B0F10004325C00B0901A0000F4 +:109A2000ECF1000420F10004C8F0000424F100046B +:109A300083ED000490E00004002908D03571062170 +:109A4000F5708170F84900200968884705E0877043 +:109A50007D2000210001F7F7F3FAB920044281D0FC +:109A6000FFF73CFFFEBDF1490120887110DEF75D74 +:109A700001000000E48A01A000020000230F380D5D +:109A8000704770B50400FEF7CFF8ED4D10206870F8 +:109A90002878032810D1EB480078F9F7D9F9280085 +:109AA00020308378012031F30AE806080408040412 +:109AB00004070021217028718CE520708AE5E148B7 +:109AC000E14B10B581781B68007801229847DC488B +:109AD0000078012802D1FFF7B2FD10BDD848203030 +:109AE0008078022802D1FFF78DFD10BD00F05BF8F1 +:109AF00010BD70B54120D24D0C0008400126002851 +:109B00000AD02878032805D1CE480078F9F7A0F9C3 +:109B1000EE7001E000F047F81220044206D0E87829 +:109B2000012803D10020E87000F03DF8600707D558 +:109B3000C3480021203086707D200001F7F78AFAA3 +:109B400048E5704710B50400FFF7F2F801202070D7 +:109B500010BD70B50024BA4DF8F7CDFA2919641C70 +:109B60002406240E0A2C0872F6D3B548083031E5D5 +:109B70003021084007D0102807D0202807D03028EF +:109B800007D1FE2070474020704780207047C020DA +:109B9000704700207047AA4810B50078002801D00F +:109BA000F7F753FF10BD10B5FEF73EF8A4490020AB +:109BB00048700870A1490968884710BDA049102065 +:109BC00048709E490020096808479D491020487048 +:109BD0009A4900200968084740280BD0802805D002 +:109BE000C02805D0FE2805D13020704710207047CE +:109BF000202070470020704738B50500904820307D +:109C0000407A002803D08E480078032809D1002428 +:109C1000F8F771FA2855641C2406240E0A2CF7D391 +:109C200038BD8A4A87481268807869469047002480 +:109C300004E0015D2955641C2406240E6B46197846 +:109C40008C42F6D3F8F757FA2855641C2406240EE4 +:109C5000F8F751FA285538BD10B5794C637830F3D0 +:109C60002EEF160C0C0E16160C191919191C1C19AE +:109C7000191919202A0C2A27270C00200BE8172570 +:109C800001000000E08C01A000020000EE7B3B43DD +:109C900010BDFEF712F9002803D0032060700120E8 +:109CA00010BDFFF79CFFF2E7FEF7E7F8EFE70720AC +:109CB00000F059FFEBE71120012160700800FEF76A +:109CC00083F810BDFFF784FFE1E7FFF776FFDEE7DB +:109CD00070B500245F4D6C70FDF7B0FF5C492C70CF +:109CE0000968012088477FE45B485C4B10B58178A8 +:109CF0001B68007800229847554901200968884769 +:109D000010BD544920314A79002A03D00278082333 +:109D10001A430270C978002903D001780422114344 +:109D2000017070474B4900202031CA78002A00D0CA +:109D300001204979002902D0401C0006000E70471E +:109D4000012110B5FEF7C4F910BD002804D0D429B4 +:109D500006D1062A06D003E0D52901D1072A01D071 +:109D60000020704701207047012010B5FEF7A4FACB +:109D7000002806D0374841788170072141700120C2 +:109D800010BDFEF77AF8002010BD32482030417C2B +:109D9000491C8907890F417470477CB51400069AE5 +:109DA00001920A00009323000121FEF7C0FB7CBD55 +:109DB0001CB500200190274801AA017829480129F3 +:109DC000046808D10021602007E0012802D00228A1 +:109DD00000D003201CBD002161206B46A0470198E4 +:109DE00000780028F1D11CBDF8B51F4800688047F5 +:109DF000042504002E0000283AD0A088E188401AEB +:109E0000062835DBF7F72BFE184F002804D13A68F7 +:109E1000F0212000904705253A6831002000904746 +:109E20003A68D521200090473A68032120009047E6 +:109E3000084E3A682036317920009047B07B0121E6 +:109E4000090381402800FDF79DFF0120F8BD0000B7 +:109E5000B0F1000488F200B080ED0004C4F000040A +:109E60002CF10004ECF1000464F10004C8F10004DA +:109E70000020EBE7002010B5FEF701FF002802D01C +:109E800061480021C17410BDF8B50425D2D3490141 +:109E900001000000DC8E01A0000200003CB7AD2AEA +:109EA0002E005F4800688047040029D0A088E18820 +:109EB000401A052824DBF7F7DCFD5A4F002804D1AF +:109EC0003A68F0212000904705253A6831002000CB +:109ED00090473A68D521200090473A680521200034 +:109EE00090474E4E3A68203E317920009047B07B33 +:109EF0000121090381402800FDF74EFF0120AFE753 +:109F00000020ADE7F8B51600D288032A39D1D4284D +:109F100037D1042935D1444D3000296888473F4C5A +:109F2000203C217988422CD129683000884741079C +:109F3000490F00220123022700290DD001290DD04D +:109F400002291ED1E7723821084009D0082809D01B +:109F5000102816D1A77206E0E272F4E7E372F2E786 +:109F6000A27200E0A3722968300088478007800F42 +:109F700009D0012809D0022809D0032809D1FE20E0 +:109F800008E000206CE7402004E0802002E0C020D0 +:109F900000E0002060732073012061E7F8B506003F +:109FA000C0880A2826D31D481F4D2038807A0028F3 +:109FB00004D01A4F403F3878042809D1002429687A +:109FC00030008847641C2406240E0A2CF7D31EE0B8 +:109FD00029683000884701280CD12968300088475B +:109FE000FE2807D100242968300088473919897A6A +:109FF000884201D0002033E7641C2406240E062C7E +:10A00000F1D329683000884729683000884701204B +:10A0100026E7002110B5FEF765F810BDC8F200B0C4 +:10A0200064F10004C8F10004C4F10004405C00289D +:10A0300004D0012802D0702801D1022070470228E4 +:10A0400001D103207047712801D1042070470328F3 +:10A0500001D107207047052801D108207047092049 +:10A060007047F0B58BB0092002900020884D019018 +:10A070002E6804000100892009AA06ABB0472E68AB +:10A0800000218B2008AA05ABB0472D6800212120B4 +:10A0900007AA04ABA8476B46187E197DD864C1CCCB +:10A0A00001000000D89001A0000200006488224E48 +:10A0B000884200D9080003907B4840E00798077861 +:10A0C000002F0DD10198002809D108997648895DA3 +:10A0D00000291ED0406830F320ED002919D1012459 +:10A0E0000198002813D108996F488D5D002D10D07C +:10A0F000012F0ED12907090F0A91406830F30CEDAA +:10A100000F000A99280930F308ED8F4201D101248C +:10A1100001E0002C0FD009983100FFF791FF029069 +:10A12000F4F7B4FE002804D05F490878401C08709A +:10A130000AE0092002905C490878401C08705A48DF +:10A14000067803988642B9D302980BB0F0BDF0B5FB +:10A1500087B00400534E09200D000090376800219D +:10A16000892006AA03ABB847376800218B2005AACF +:10A1700002ABB84736680021212004AA01ABB047E2 +:10A180006B46187B197A884200D90800844202D3B2 +:10A19000092007B0F0BD002D01D0012000E0002013 +:10A1A0000499414A097800290AD10599095D0029D5 +:10A1B0001FD05268101830F3B0EC002919D113E009 +:10A1C000012916D105990D5D002D12D051682E0779 +:10A1D000360F0818310030F3A0EC0F0028093100C9 +:10A1E00030F39AEC8F4204D106982100FFF728FF44 +:10A1F00000900098CDE72C484168491C416000213F +:10A20000017070477FB50021892003AA254C01AB5E +:10A210002568A847246800218B2002AA6B46A04726 +:10A220006B461C781979029A03982300F4F701FE13 +:10A230001D490020486008707FBD1C481CB501788E +:10A24000002904D0C078002801D032201CBD154B55 +:10A2500000211C688D2001AA6B46A0470198017857 +:10A260004078000208431CBD1CB500200D4B019036 +:10A2700000901C6801008E2001AA6B46A04701983F +:10A2800000781CBD4A1F042A00D80521421F042A59 +:10A2900000D8052018235943054A8918800008581A +:10A2A00070470000ECF100044C5C00B0BE76942CCA +:10A2B00001000000D49201A00002000044EC41CD56 +:10A2C000D06200B0E4040004FEB50021BC2002AA64 +:10A2D0008A4D01AB2C68A0470298894C0078002673 +:10A2E00020700028A6701CD02F680021BD206A466F +:10A2F00001ABB8476660009A0020115CC30099402A +:10A300006368401C19430006000E04286160F4D302 +:10A310002D680021BE2002AA01ABA8470298007850 +:10A320006070FEBD7FB5072101240020F7F7CAFC4D +:10A330000020C046401C2028FBD36846F7F7A6FC47 +:10A3400000210420F7F7BEFC0020C046401C202856 +:10A35000FBD302A8F7F79AFC6B4658895988684ED8 +:10A36000411A08004843F178490089198881198900 +:10A370001A88891A0A004A43F178801849000004B3 +:10A38000891900148881B168451A7078002803D0B3 +:10A390002804001406F01AFD002D00DA6D427068E2 +:10A3A000A84200DD0024B078052801D2401CB0701E +:10A3B0000020B060B17807E043009B190C255D5F79 +:10A3C000B2685219401CB2608142F5D8B06830F3CF +:10A3D000DAEAB060F0780521401C0006000E30F388 +:10A3E000A6EBF170200004B070BD454800218170DB +:10A3F000C17081600170417064214160704701212A +:10A4000010B501703F48806B552040060169C904B2 +:10A41000CA0F00218A4202D100698004C00F03F0F4 +:10A4200065FE002803D138490968884710BDF7F751 +:10A43000A6FC10BD704770B5050034480068804721 +:10A44000552040060169102291430161304800689F +:10A450008047F6F737F92F480078002804D0F8F73E +:10A46000E7FE2D49096888472C4C012620780128F1 +:10A470000CD002280AD0032806D1F7F7E6FC207892 +:10A48000032801D1F7F7E1FC2E7070BD0020287081 +:10A49000667070BD10B51C4C022917D107F026EB71 +:10A4A000002803D00120F6F71FF908E007F002EBBF +:10A4B000032806D10120F6F717F907F08797BC1596 +:10A4C00001000000D09401A000020000899842839E +:10A4D00034EB012019E001210803F6F7EDFD10BD72 +:10A4E00040290FD1F7F706FC0A480078002803D06E +:10A4F000FFF722FF002800D0012021688847F7F7E6 +:10A500000BFC10BD1029FCD100202168884710BD2C +:10A51000ECF10004E0F200B0800100AAB0F1000408 +:10A52000CCF20004D0F200042C5B00B038F300043D +:10A53000295B00B09B480021017041708170C1709F +:10A540000171FF2241718271C271431C0200203AE5 +:10A55000017453631187518701774177704710B5B4 +:10A5600000F001F810BD70B5012002F080FF04007A +:10A5700014D08D4EF921326820009047894D326801 +:10A58000297920009047012002F0DDFF884B8021CF +:10A590001C68E879854A0023A047012070BD70B58A +:10A5A000804C207C00281FD1824800688047002012 +:10A5B0006072A0722072A0797F4DFF2803D12968B4 +:10A5C00001208847A071E079FF2803D12968002085 +:10A5D0008847E07179490420096888470120207480 +:10A5E000FFF7C1FF002800D0012070BD714810B5F1 +:10A5F0000068804772480068804710BD69490120A3 +:10A600000A78002A03D1097C002900D10020704774 +:10A610006C4810B5006880476B49624809688079CA +:10A620008847002801D0012400E000246748006822 +:10A630008047200010BD664909680847F8B5040046 +:10A64000584D687900282ED1624928720968A87986 +:10A650008847574E23003668FF21A0785E4A613153 +:10A66000B047687A00280AD0607810300006000EE3 +:10A6700002F043FF002802D00120207031E0606822 +:10A68000C788607810300006000E02F0F0FE060069 +:10A690000BD15248407B052805D3F4F71BFD02215E +:10A6A000012000F0BDFE0020F8BD60783E4A400762 +:10A6B000810EA87880314007400F126801433000B6 +:10A6C0009047474B3A001B6860683100A214A0779E +:10A6D00001000000CC9601A000020000042486CBFB +:10A6E00098476068C78001202070607810300006AD +:10A6F000000E02F032FF0120F8BDF8B50600364822 +:10A70000006880472C4C364F207A002802D13868E8 +:10A7100080471BE000202072012002F0B2FE0500FD +:10A7200003D1386880470020F8BD2F49A079096817 +:10A73000884738688047A178204AC02006431268BD +:10A74000314328009047012002F007FF0120F8BDA7 +:10A75000012010B502F095FE002807D0174AE62127 +:10A7600012689047012002F0F8FE012010BD002180 +:10A7700010B501701C4980780968884702F0D8FE3E +:10A7800010BD0D4910B509780124002906D11848DB +:10A790008078072805D1F4F77CFD02E0C1881D29E7 +:10A7A00001D9002010BD144909688847002800D14C +:10A7B0000024200010BD0000CCDF0004C8F100041C +:10A7C0005F95010030F3000464F3000434F30004E7 +:10A7D00040F300046CF20004CCF200043CF30004EB +:10A7E000D0F200044CF3000438F300043796010063 +:10A7F00060EF00B0C0F1000444F3000410B5F8F7B6 +:10A800002BFDDB4909688847DA490120087110BD32 +:10A81000D84A002110B51160117108009162C3007F +:10A82000401C9B180006000E04289960F7D301F025 +:10A8300025F800F007FA002005F048FCF4F7D6FBF5 +:10A8400007F088E9F7F77CFC002812D004F096FCAA +:10A8500005F0B2F9F8F756FBF7F786FCC64B020095 +:10A860001C68002131200323A047C448FAF7E2FA0C +:10A87000012010BD042804D2C300BE481818C260CD +:10A880008160704700221100F4E7F0B587B005A998 +:10A89000BB4A06A8126890476B46187E400613D53F +:10A8A000187DC00701D0F7F70BFC6B46187D8007B9 +:10A8B00005D5F7F730FCB3490020096888476B4697 +:10A8C000187EBF21084006906B46187EA94D0006F1 +:10A8D0000026002823DAAC4800688047DAC564E027 +:10A8E00001000000C89801A000020000BA69FE63E0 +:10A8F000AF6AAB48AE6200688047002410E00120D8 +:10A90000A040384209D0E00040198168002904D0F5 +:10A91000C06888472000FFF7BFFF641C2406240E90 +:10A92000002F01D0042CEAD36B46187E4006400E5F +:10A9300006906B46187E800749D5FDF7A2F90028DE +:10A9400023D0984C2078082801D0072801D1F8F7A7 +:10A95000C5FA2868002835D02879002832D1F6F7C2 +:10A96000C8FA2178062909D0082907D08188022948 +:10A9700004D9891E8180C188891EC180FEF749FDE6 +:10A9800000281FD1F6F7C5FA1CE001A8F6F799F8E0 +:10A99000002802D0019A002A07D1834901200968C2 +:10A9A00088478249012009680BE02968002909D0FD +:10A9B0002B79002B06D10B68029304920390C9688F +:10A9C00002A888476B46187EFD21084006906B461A +:10A9D000187EC0070ED02968002906D028790028E3 +:10A9E00003D14A690868197D90476B46187E400874 +:10A9F000400006906B46187E00070DD52968002997 +:10AA000005D02879002802D10868096988476B4673 +:10AA1000187EF721084006906B46187E400706D541 +:10AA200000F066FF6B46187EFB21084006906B46DF +:10AA3000187EC00610D5187D012817D0022815D021 +:10AA4000042816D0082801D1F5F743FC6B4605967B +:10AA5000187EEF21084006902879002821D054481C +:10AA6000807AFF2808D04749096816E007F080E897 +:10AA7000ECE700F044FAE9E72E712868002802D1DB +:10AA8000FAF7D3FB01E0FAF7D0FA0028286005D0E6 +:10AA9000484800688047296803C988472879002802 +:10AAA000EAD107B0F0BD38B5374C2068002821D076 +:10AAB000207900281ED1F8F7D9FB05003748006837 +:10AAC00080473049280009688847002803D03A4960 +:10AAD00028000968884732480068804720688168F4 +:10AAE000684688476B461878002803D07EF9E293C1 +:10AAF00001000000C49A01A0000200009A0D9DE030 +:10AB00002A4900200968884738BD10B5F4F7EDF9E7 +:10AB1000294900280C780BD1F4F714FA002814D036 +:10AB2000092C0DD02000F4F7E3F900280CD107E040 +:10AB300001280AD1F4F72CFA002806D0092C03D1F9 +:10AB4000FAF78CFBFFF7B9FF10BDFAF787FBFFF7A9 +:10AB5000B4FF12490120087110BD70B504001448FB +:10AB60000D0000688047042C12D20C49E000401808 +:10AB70008268002A0CD0C268002A00D1C560012278 +:10AB8000886AA240104388620D498020096888477E +:10AB900008480068804770BD3CF30004F8F200B03C +:10ABA000F0F10004E9970100E0F20004B0F10004C4 +:10ABB000CCF20004D0F2000480ED0004D8F20004CE +:10ABC000D4F2000494DF0004DCF2000438F3000443 +:10ABD000244810B5407801F0EFFF10BD022810B5F1 +:10ABE00006D0002801D1022000E0012002F061F827 +:10ABF00010BD030010B52FF3B2EF0906080E0A0DC1 +:10AC0000151515080D0002210DE0B0210BE0A12063 +:10AC100004F0DEFE10BD02F056FA002802D002F069 +:10AC200055FA10BDB221002004F0E3FE10BD10B5AE +:10AC300001F0ADFE10BD704710B502F047F810BD31 +:10AC400010B502F048F810BD0748C07B012800D0BD +:10AC50000020704710B502F08CF810BD10B502F05E +:10AC600047F810BD80ED000490E00004F0B503202B +:10AC70000023F849052708700B764F7082005218A0 +:10AC8000401C05285360F9D3F248F34A28300400E9 +:10AC90001434CC604A6088601372138201258B766D +:10ACA000AE1E0570457046600372010003820C39C8 +:10ACB0004572C16000200B728200401C02288B503C +:10ACC000FAD3257067706660E348237223820838E0 +:10ACD0006372E060F0BDDF498200511810B5496829 +:10ACE000C96800290BD0002809D0012807D0022804 +:10ACF00006D0052803D00800D8490968C4C8426CAA +:10AD000001000000C09C01A00002000057799EAE27 +:10AD1000884710BDD4483C30C46820680028F8D06B +:10AD2000017A012907D0022901D1F6F706F900209E +:10AD30002060207110BDCF4909688847F7E7CE48E9 +:10AD400070B500688047C84E307E002803D00628C2 +:10AD500001D007203076C948006880470220FFF7FD +:10AD6000C4FF032420E0A000851968680178002949 +:10AD70000DD1407802281DD0032808D106F0CCEE72 +:10AD8000022801D1F4F78EF8012006F0CAEE200661 +:10AD9000000EFFF7AAFFB6496868096888470020D7 +:10ADA00068600520641C70703078A042DBDCFFF71F +:10ADB00067FF70BDF4F7B6F9E9E7F3B581B0012597 +:10ADC000AE1EAF4A00271168022812D003280FD107 +:10ADD000142088470321477241700570A249C7605B +:10ADE00046600A789200521850600878401C08703B +:10ADF000FEBD14208847A249040009681C2088472A +:10AE0000E060029909780170E168FF204870002035 +:10AE10008200E168121D401C06288F50F8D327726B +:10AE200027820220657260708F4825706660017805 +:10AE3000890009184C600178491C01700100283113 +:10AE4000C868027A92008450C868027A521C027262 +:10AE50004F72FEBD844910B548768A4910200968B2 +:10AE60008847894904200968884710BD7E4938B55C +:10AE700008000B7E407E002206242FF37AEE052D7B +:10AE8000040917252D0002200876804900200AE0D9 +:10AE9000032200280A7604D1009002206946FFF7B9 +:10AEA0008CFF7A490120F4F754FA38BD002805D107 +:10AEB000012000900C76022069460AE00420087602 +:10AEC000724806F06EEE38BD00280C7606D10021DF +:10AED0000320FFF772FF01E0002AF4D000210320D5 +:10AEE000FFF745FE38BD10B55F4C207E002803D02B +:10AEF000072801D0062805D1FFF721FF0120207681 +:10AF0000FFF7B4FF10BD5C4810B50068025E64C373 +:10AF100001000000BC9E01A0000200003B55AC8572 +:10AF200080475648017E062901D007210176FFF7A8 +:10AF3000A7FF57480068804710BDA1E7FEB5002570 +:10AF400006000F00002819D04C480178B14215D9ED +:10AF5000B10008184468207802280FD063782FF3D6 +:10AF600012EE0659042C5B597959E068007A0028E2 +:10AF700050D03000F4F7F4FC052801D10020FEBDCC +:10AF80003900FFF7DBFF0500002F0FD13B48417868 +:10AF9000B14201D10521417042480078062809D10B +:10AFA000414901208871FFF79CFD03E0002D01D08D +:10AFB000002000E0012020702CE0002F0CD0E06881 +:10AFC00001210078F4F7F3F9002823D00020207045 +:10AFD000E168022048701CE034488078002801D0E5 +:10AFE000F4F7AAF8012000222070227210002282B9 +:10AFF0008100E368091D401C06285A50F8D3E16817 +:10B00000FF2048706068411C03D00006000EF4F772 +:10B01000C2FB01252800FEBD002F15D00025244BC2 +:10B02000019500951E682900952001AA6B46B0473E +:10B0300001980078002802D1F3F738FF02E00420DD +:10B0400006F078ED2570E4E7F3F736FF012006F00F +:10B0500072EDDEE709483C30002F01D0002100E00E +:10B0600001210170D5E70300052070B5012B21D027 +:10B07000022B20D1014D03212C782DE024F300B0C8 +:10B080005C5C00B0DCF10004BCF10004CCF2000414 +:10B09000D0F20004D8F10004D4F20004D8F2000485 +:10B0A000059E0100325C00B0415C00B060EF00B072 +:10B0B000ECF10004002070BD8A0052195268167825 +:10B0C000002E08D15678022E05D1D26852789A42C5 +:10B0D00001D10806000E491C8C42EDDC70BDF8B5AC +:10B0E00005000F008078FFF7BEFFFF4906008000D3 +:10B0F00040184468002C25D0687900F080FB217A44 +:10B10000002F02D00143217212E00A0002420FD048 +:10B110008143217200F0F8FA218A814352A34F4CF7 +:10B1200001000000B8A001A000020000AB4ED1CE8B +:10B130002182687900F0E2FA0200002130000B0061 +:10B14000F4F7E7FBF3F754FFF3F740FF002803D1D0 +:10B15000002F01D0F3F7ADFEF8BD70B50400807884 +:10B16000FFF78BFF052815D0E449800040184068A0 +:10B1700000280FD0C668607900F04BFB05006078AE +:10B18000022804D000212000FFF7B3FF0024022D85 +:10B1900001D1746070BD042D01D1B46070BD082D63 +:10B1A00001D1346170BD802DFCD1F46070BD10B54B +:10B1B00004000800052C0DD0002C0BD000F0D3FAB1 +:10B1C000002807D0CD49A200511849680A8A130007 +:10B1D000034201D0002010BD024301200A8210BDAD +:10B1E000012910B514D1C64B00215C5C84420FD0FC +:10B1F000491C0529F9D3C1498000401840680178ED +:10B20000002905D14168491C02D14260012010BDCE +:10B21000002010BD70B506000C0000280AD0B74809 +:10B22000B1000D186868407802280BD0032801D0BF +:10B23000042803D1012C02D1FFF71CFD70BDFFF7DC +:10B240001DFD70BD300006F0C4EC002804D13000B4 +:10B2500006F0C2EC0028F4D069680020CA6801003A +:10B260008B009B185B68002B03D088008018406817 +:10B270000CE0491C0629F3D30AE08B009B185B689D +:10B2800046795D79B54200D21800491C0629F4D3ED +:10B290000028D6D09B498978072904D1012C07D1F1 +:10B2A000F4F729F870BD012C02D100F079FE70BDD1 +:10B2B00000F083FE70BD70B5060001000020FFF7AE +:10B2C000A9FF8E4D03240BE0A000401940680078D0 +:10B2D000002804D12006000E3100FFF79BFF641CFC +:10B2E0002878A042F0DC70BDFFB583B00400FF20D9 +:10B2F0000E0002901F00200000F0C6FA050004288E +:10B3000044D0300000F0D4FA06003FD0072C01D022 +:10B31000082C01D1002430E002AA0092059A3B00DB +:10B320003100280006F05CEC04003100C80F4AED43 +:10B3300001000000B4A201A0000200008B2AB24D5F +:10B34000280006F05CEC05282DD0052C06D07049AD +:10B35000A200511849680978002901D0040016E0BC +:10B3600008206B46185600280AD0012805D002286C +:10B3700016D10021059A3B0006E00121019601E06B +:10B3800002210195012301AA2000F4F75CFC60482A +:10B39000A100091849680978002904D1447003E024 +:10B3A000052007B0F0BD05242000FAE7F8B55B4D95 +:10B3B000287800F073FA0600042851D0687800F06D +:10B3C00081FA07004CD0FFF72BFC02223900300035 +:10B3D00006F018EC002801D003F0CCF84C48806847 +:10B3E000007800283CD10120F4F7CEFA04000528AB +:10B3F00036D022003900300006F004EC00282FD0AF +:10B400002B78002B03D16878012807D104E0032BA7 +:10B4100004D16878022801D1012500E00025002D23 +:10B420001BD12FF3C4EB070507090B1D050B1D00EE +:10B43000002004E0012002E0022000E00320344A62 +:10B44000A100891849680006C968800D001D0858C8 +:10B4500000F090FD324800688047280000F098FD19 +:10B46000F8BD70B5040005F0E5F9052802D120000B +:10B47000FFF7DCFB264D6878022801D1FFF753FC6B +:10B4800000F0F0FD002809D0022C03D0012C01D1DE +:10B4900000F0BCFD00F071FD00F086FD1F480921A1 +:10B4A00001700A2141700520687070BDF8B5050073 +:10B4B0001CA000681C4C1D4E0029009007D1246878 +:10B4C0002F2003236A46A04730688047F8BD124802 +:10B4D0008078002801D0F3F743FE246800212F2054 +:10B4E00002236A46A04730688047094CA80000192B +:10B4F0004068807C0028E9D100212800FFF732FD58 +:10B50000A07E0028E2D0280005F044F8F8BD000035 +:10B5100024F300B070EF00B060EF00B080ED0004E5 +:10B5200054F1000400010200F0F1000448F10004AD +:10B53000F8B504000E006F48407805283548BE7302 +:10B5400001000000B0A401A000020000465EB103AB +:10B5500001D10020E4E700280FD0022861D16A4819 +:10B560003C30C568002A28680DD0002802D0674901 +:10B5700009688847F5F709FDEBE731002000FFF780 +:10B580009BFB040057E00127002823D1002E2871DF +:10B5900001D02C603FE05E4A00211268FF20401D70 +:10B5A00090472860E1888088081A002806DD2F71FE +:10B5B000A188091AA180E188081AE080A188206882 +:10B5C000544BE28840181B682968801A9847F5F7A1 +:10B5D000DCFC24E02979002916D18188C088081A6A +:10B5E000E188081A002806DD2F71A188091AA180B8 +:10B5F000E188081AE080A1882068464BE28840185C +:10B600001B682968801A9847F5F7BFFC002E06D002 +:10B610002868C18881804049022009688847012440 +:10B6200009E03100200000F05CFB040003D102219E +:10B630000120FFF745FF200072E710B5324C647817 +:10B64000002C02D1FFF73CFB10BD344C2478002CB9 +:10B6500002D000F02EFA10BD002010BD002810B559 +:10B6600002D0F4F773FC10BDF4F780FC10BD10B5E8 +:10B67000FFF717FD00221100012306F0D2EA10BDEA +:10B68000214840787047204870B53C30C5683C3848 +:10B690004078022837D12868002834D0C088002894 +:10B6A00031D01F490878002801D001282BD14878D3 +:10B6B000032801D0042826D1154A00211268FF2052 +:10B6C000401D904704002879002801D1002C1AD091 +:10B6D0002868A31D828801688A18C188501A2268C8 +:10B6E00003F01CF8206800280DD0E08802280AD357 +:10B6F000A08000212000FBF71BF8002803D103499C +:10B7000020000968884770BD24F300B0BCF1000434 +:10B71000B8F10004D0F10004D4F2000410E00004F9 +:10B7200080ED0004212807D0222807D0232807D045 +:10B73000242805D18220704781207047F42070476B +:10B7400080207047102818D009DC00285053701C46 +:10B7500001000000ACA601A000020000CBE2754B86 +:10B760001DD002280DD004280ED0082817D1C00102 +:10B77000704720280ED040280ED080280FD1C0015D +:10B780007047FF20401C7047012040027047012095 +:10B79000C00270471020704701204003704700200E +:10B7A0007047772832D012DC032829D007DC002824 +:10B7B00022D0012822D0022839D104207047052840 +:10B7C00020D0062820D0742831D14020704783280B +:10B7D00024D008DC80281BD081281CD0822826D1C8 +:10B7E00001208002704785281BD086281CD0F428B1 +:10B7F0001DD101208003704701207047022070474F +:10B800000820704710207047202070478020704724 +:10B81000FF20401C70470120400270470120C002F9 +:10B82000704701200003704701204003704700204B +:10B830007047002805D0012805D0022805D1042032 +:10B840007047012070470220704700207047212870 +:10B8500007D0222807D0232807D0242807D1082082 +:10B8600070470420704780207047022070470020F6 +:10B870007047002807D0012807D0022807D00328E6 +:10B8800007D14020704702207047042070470820ED +:10B89000704700207047030000B52FF39CE90811A2 +:10B8A000050507090B0D0F11022000BD082000BD82 +:10B8B000062000BD0A2000BD802000BD402000BD44 +:10B8C000002000BD030000B52FF384E9090A060635 +:10B8D0000C080A0C0A0C0E00012000BD032000BD5C +:10B8E000002000BD022000BD042000BD030000B503 +:10B8F0002FF370E9070507090B0B0D0F110001204D +:10B9000000BD022000BD032000BD042000BD0720B3 +:10B9100000BD052000BD002000BD0000FF480A2139 +:10B9200010B5FF4C22689047FC4822680A211C3061 +:10B930009047FA4822680A210C309047F74A0020C5 +:10B94000483A110020315072087748778877C877D5 +:10B950002031087048708870107020316C94535CEE +:10B9600001000000A8A801A00002000075AF0DE3CF +:10B9700010660874487410BDED48083881780029B5 +:10B9800005D101218170EC490420096808477047FE +:10B99000F8B5E74F483F3800396E54300029009021 +:10B9A00004D1E6490098096888473866E04D083DAB +:10B9B000A8782C00203C00287FD0FEF783FE0028CA +:10B9C00005D0F3F7EBFB02210120FFF78DFD0020EE +:10B9D000A870E07728706870D94CD84D386E08E0B0 +:10B9E000017A012901D12168884729680098884790 +:10B9F00038660028F4D1CE4829681C3006008847F4 +:10BA0000386608E0017A012901D121688847296850 +:10BA10003000884738660028F4D1CA4902200968F6 +:10BA20008847C94CA068807C002809D000210120EB +:10BA3000FFF7B6FAA07E002802D0012004F0C8FD6E +:10BA4000F8BDC24D2968884729680600386E8847C6 +:10BA5000A074022020740120E0747006400E60740F +:10BA6000386EB863C0880025207511E0B84A009888 +:10BA7000126829009047B549386609688847396EC9 +:10BA80000600207DC98840186D1C2D062D0E2075DE +:10BA90003006EBD5AF49A648096818388847002812 +:10BAA00005D1A549042009688847F8BD05E0A349E8 +:10BAB000009809688847386600E0386E0028C0D1D1 +:10BAC000F3E79B4A483A10700028117200D1506089 +:10BAD00070479749483948607047FFB587B00024E0 +:10BAE0002500934E0394483E029401943078002838 +:10BAF0007ED0079800F0B7FA002804D0089907987C +:10BB0000F9F708FDFFE094480078002800D00124F0 +:10BB100070688078022803D185481C271C3003E018 +:10BB2000012865D18248F627059081484838007A77 +:10BB3000002801D1802002E00128F2D15020069097 +:10BB4000089800286BD0641C2404240C0998002851 +:10BB500008D00898C0880019B84203D2641C012597 +:10BB60002404240C0898C688A019B842E3403E4536 +:10BB700001000000A4AA01A00002000055CB6E60E5 +:10BB800002D9381B0604360CA019794A401C00045F +:10BB90001268000C0621904700280490B2D0754826 +:10BBA000002D4068017802D080200143FFE7724AEF +:10BBB0000498126890476D480178002906D000214A +:10BBC0006D4A0170126806990498904702980028FF +:10BBD00006D10120684A029012680799049890479C +:10BBE0000198002806D0644A002001901268039949 +:10BBF00004989047614B04991B6808983200984755 +:10BC00005F4800E058E0006880475E4A0499126887 +:10BC100005989047002801D1049868E05A480068C8 +:10BC20008047002D00D100240898C088002897D1B3 +:10BC30002AE04F4AA41C200412680125000C0621AA +:10BC400090470028049037D04A484B4C40682268FF +:10BC500001788020014304989047444801780029E6 +:10BC600005D0002101702268069904989047444845 +:10BC700000688047434A0499126805989047002855 +:10BC8000CAD04148006880470998002839D00A98EE +:10BC9000002801D0012400E00024002D05D0364A00 +:10BCA00004981268210090472BE0314A062112685F +:10BCB00002209047050002D100200BB0F0BD2D48B6 +:10BCC0002D4E40683268017880200143280090475B +:10BCD0003268210028009047294800688047294A97 +:10BCE0000598126829009047002807D128001949B3 +:10BCF00009688847244800688047DDE722480068D3 +:10BD000080471C482149406809688078884709981D +:10BD1000002802D01549012008700120CDE770B538 +:10BD2000050014480E0000781400002839D0002DBA +:10BD300031D0E88800282ED00949280009688847B2 +:10BD4000230025E058E00004A4F20004D4F200042B +:10BD5000ACF20004BCF100047CF2000424F300B057 +:10BD6000C4F10004B4F200045CF20004705C00B0A2 +:10BD7000B8F1000410E00004C8F1000499C219DA17 +:10BD800001000000A0AC01A00002000098BF6D2ED1 +:10BD9000C0F10004CCF20004A8F20004D0F20004C8 +:10BDA00044F200043200290003E0002123003200A5 +:10BDB0000800FFF7A6FE70BDF0B584460D00794F70 +:10BDC0001C0078680026002885B077D003786906C3 +:10BDD000490E994272D181786145FBD12906C91774 +:10BDE000491C029141780229F4D141793B001B782A +:10BDF000232905D0212903D0222901D0242946D185 +:10BE0000502A44D10126002B09D0FAF7AAF90028BC +:10BE100006D002992000FAF737F90028DAD188E035 +:10BE2000F3F7BDF801280DD15F484078012809D10A +:10BE3000E088012806D1A0882168401E085CF5F73B +:10BE40003DFD76E0594800688047070071D0B8880A +:10BE5000F988411AE08881426BDB52494968497987 +:10BE6000242906D1524A401C01061268090E3800E6 +:10BE70009047E2884F4B04921B6839002000984796 +:10BE8000280656D5484800220178049846E0132930 +:10BE900001D0112954D1102A52D10126002B0BD0E8 +:10BEA000FAF75FF900280AD002992000FAF7ECF8B7 +:10BEB000002845D13B484068032137E040E0E08856 +:10BEC000012830D3394800688047070036483A498E +:10BED00000780090096820008847C10606D5000751 +:10BEE0000121000F09038140019102E0012040057A +:10BEF0000190002FDED0B888F988411AE08881428D +:10BF0000D8DB02042B4B120C03921B683900200073 +:10BF1000984728060DD5019A00990398274B1D686C +:10BF20000023A84705E01F4802214068244A126800 +:10BF30009047207A012803D12249200009688847C8 +:10BF4000300005B0F0BD204970B5040009680078E4 +:10BF500088471B4D002805D11C496079096888472E +:10BF6000002805D11A49200009688847002100E00F +:10BF700003212A682000904770BD10B5806804F046 +:10BF8000D6FF10BDF8B507000E00124DAF029BB4EE +:10BF9000010000009CAE01A0000200004A73FB47B4 +:10BFA000002405E0296838008847641C2406240E14 +:10BFB000B442F7D397E5000010E0000480ED0004E0 +:10BFC00064F10004C8F10004C0F10004C4F10004ED +:10BFD0005CF1000448F20004BCF1000480F20004AB +:10BFE0009CF2000494F200043CF2000456490860FC +:10BFF000704710B5F9F7D0FB002801D0F9F792FA95 +:10C0000051490020086010BD002810B503D14E48EA +:10C010000068FFF77CFD01210800FFF770FD10BDEF +:10C020000121002010B5FFF76AFD10BD002810B5F2 +:10C0300008D0464A512112689047002802D044494E +:10C040000968884710BD10B504000DD001210020FB +:10C05000FFF755FD3D4A5421126820009047002803 +:10C0600002D03B490968884710BD384A364810B5A8 +:10C070001268006853219047002802D034490968AB +:10C08000884710BD304810B50068002808D02F4AF6 +:10C09000522112689047002802D02D49096888472C +:10C0A00010BD2C4900204978052900D170472A4A43 +:10C0B0001178002902D00329F8D104E05178082929 +:10C0C00001D00129F2D101207047022910B501D118 +:10C0D000012100E00021FFF752F810BD1A48006866 +:10C0E000002800D001207047FEB502241B4E062117 +:10C0F00061431B480D18687802281FD1A8780228D0 +:10C100001CD1E87821280BD0232805D0242815D16C +:10C1100000211A2001AA06E00021080001AA02E07D +:10C1200000210D2001AA37686B46B8472800FFF7A9 +:10C130005AF8019801782800FFF7C7FF641C24060D +:10C14000240E2C2CD3D3FEBD745C00B030F200045E +:10C1500040F2000424F300B080ED0004ECF1000490 +:10C16000ECED0004884A00218B00D3581B788342F1 +:10C1700002D1880010587047491C0906090E0A2987 +:10C18000F2D300207047FEB50D0006007F49002065 +:10C1900002900968707988477D4904000557E605D3 +:10C1A0000100000098B001A000020000124C7423AE +:10C1B0000968307888477C4F00281FD0B078012864 +:10C1C0000ED1217A0020490807E06268C300D25CE2 +:10C1D000AA4222D0401C0006000E8142F5D819E088 +:10C1E000217A480807E06268C300D25CAA4214D0F2 +:10C1F000401C0006000E8142F5D80BE0217A07E0D2 +:10C200006268C300D25CAA4207D0401C0006000E40 +:10C210008142F5D8029900292AD06168634BC00099 +:10C22000001D08581C68002101AA6B46A04703287E +:10C2300001D18A2102E0022806D183213A68300028 +:10C240009047040013D00EE03A68802130009047F8 +:10C2500004000CD06B461A78002A04D0544B019984 +:10C260001B68200098475349200009688847FEBD95 +:10C270008521E3E7FFB583B006000F0000204849A1 +:10C28000029001900968707988474649050009685D +:10C290003078884700281FD0B07801280ED1287A3E +:10C2A0000024400807E06968E200895CB94223D0B5 +:10C2B000641C2406240EA042F5D81AE0287A44080B +:10C2C00007E06968E200895CB94215D0641C240665 +:10C2D000240EA042F5D80CE0287A002407E0696813 +:10C2E000E200895CB94207D0641C2406240EA042F7 +:10C2F000F5D8029800284FD000200090069800281A +:10C3000003D00598FFF74DFE0090E00069682A4CC5 +:10C31000001D08582468069B009A0021A0470328A6 +:10C3200005D106990598FFF741FE8A2123E00228EE +:10C3300005D106990598FFF739FE83211BE028787F +:10C34000352804D1012F11D1012001900EE02328BE +:10C3500005D0212803D0222801D0242806D1012F7E +:10C3600004D1009801783000FFF7B9FE06990598CE +:10C37000FFF71CFE80210C4A30001268904700280D +:10C3800008D00C49096888470198002802D0B07885 +:10C3900004F0C7FD07B0F0BD8521ECE76C06000492 +:10C3A00018F2000480F2000430F200048D126AECEE +:10C3B0000100000094B201A000020000322817A082 +:10C3C000F4F1000470F2000440F20004E8F100040B +:10C3D00010B504000848094A417A12683420904791 +:10C3E000012C04D18078022801D1F2F7B2FE10BDF1 +:10C3F000044903480861704710E000048CF200040F +:10C40000A5B20100D8ED0004FEB500282DD001280A +:10C4100010D0022830D10020544B019000901C68AD +:10C4200001002F2001AA6B46A0476B461A7801999C +:10C4300000201FE04E4D4F4E00240127285D810053 +:10C44000891949684968491C08D06B46187103204E +:10C4500001A95F7100F098F8052806D1641C052C2D +:10C46000ECD309E00B5C022B01D10120FEBD401C86 +:10C470000006000E9042F5D30020FEBD70B5050009 +:10C480003D4E0024062060438019417802290CD1DA +:10C490000179002909D14179A94206D18078FFF7B5 +:10C4A000B3FF002801D0012070BD641C2406240EB7 +:10C4B0002C2CE7D3002070BD022110B541704179CA +:10C4C00022290BD006DC11290AD0132908D02129F2 +:10C4D00007D103E0232901D0242902D1FEF797FEDA +:10C4E00010BD264A00211268904710BD012110B5E9 +:10C4F0004170417922290BD006DC11290CD0132977 +:10C500000AD0212908D103E0232901D0242903D10D +:10C51000FEF77DFEF2F7C6FD10BDF8B5050000245C +:10C52000174F154E0620604380198178A94204D127 +:10C530004178022901D139688847641C2406240EF9 +:10C54000042CEFD30F4F0DE0062060438019417893 +:10C55000002904D08178A94201D139688847641C38 +:10C560002406240E2C2CEFD3F8BD0000ECF10004BF +:10C5700070EF00B024F300B0ECED000424F20004EE +:10C5800098F2000478F20004F8B505000E00DB4FC5 +:10C5900001240C206043C0194179002910D0817812 +:10C5A000A9420DD1032D08D1002E06D0C01C0222B5 +:10C5B000310004F01DFF002802D1200609FFFCEA2B +:10C5C0000100000090B401A000020000FF5C14EE26 +:10C5D000000EF8BD641C052CE5DB0520F8BDCC4839 +:10C5E0003C2110B52EF3EAE910BDC949487101207C +:10C5F000487002208870F6200870C648886070472E +:10C60000F8B504000E00C24F0525DB280CD1787C5C +:10C61000002860D1012078747873F620BC733873D9 +:10C62000002078610120F8BD02200C214143C91986 +:10C630004A79002A13D08A78A24213D1012C4AD019 +:10C64000C12C48D0022C01D0032C0BD1CA783378EE +:10C650009A4207D10979727891423CD002E0052DC7 +:10C6600000D10500401C0006000E0528DDD3052D75 +:10C6700031D2012C0DD0022C1ED0032C0BD0C12C9A +:10C680001AD100210320FFF789FF052823D1A248F2 +:10C690000EE0A2480CE00021C120FFF77FFF052833 +:10C6A00019D129003000F3F7D5F8002813D09C48A1 +:10C6B0000C216943C91988600C2169430122C819FA +:10C6C0004271427084703278C27072780271F620C2 +:10C6D00078542800F8BD0520F8BD052810B506D20D +:10C6E0000C2141438A4A8C186179002901D101202B +:10C6F00010BDA178032901D1F3F7BBF800206071C8 +:10C7000010BDF8B506000F00052823D20C20704399 +:10C710007F494518687900281CD0062000F09CFC51 +:10C72000040017D060212170062161700321A170DF +:10C730000121E1707B482671677100688047687845 +:10C74000C0196870784800688047200000F09BFCA2 +:10C750000020F8BD0320F8BDF7B50C230D0016002E +:10C76000C8786B49584344186079002801D10620E5 +:10C77000FEBDF0882178884201D90A20FEBD694FAC +:10C780003868804761786848002902D1006880478E +:10C79000EDE76548006880470098002805D0F088DC +:10C7A0002178884201D00520FEBD38688047607836 +:10C7B000401E60705C4800688047A368002B03D06F +:10C7C000E8780099320098470020FEBD750B38B01C +:10C7D000010000008CB601A00002000072E0D0A6AB +:10C7E000FFB5002083B00C240F0002900190CE888A +:10C7F0000399701C4C434B490004000C62180090D4 +:10C800005279002A05D14E4938000968884707B097 +:10C81000F0BD002FFBD0039A002A43D1494AD37BB5 +:10C82000012B3FD10293927B032A3BD101220600C8 +:10C83000019237E000F029FC0500E8D003991020B0 +:10C84000084328703748005DA8700198012813D16B +:10C850000098E870380004F09CFB32490A5D010042 +:10C86000521E281D2EF318E800202E490190F8884A +:10C87000095D401A401C0CE0380004F08AFB29498D +:10C880000A5D0100E81C2EF308E82649F888095DD6 +:10C89000401AF880280000F000FC2248005D301AA1 +:10C8A0000604360C02981F4A3118105D8142C1D827 +:10C8B000F888C01C0004000C00F0D8FB0400A6D0CF +:10C8C0000298012807D10598002801D0002000E037 +:10C8D0000220A119C87000212170069A0120002AA7 +:10C8E00000D0002000010143039801432170029809 +:10C8F0003018A0700198012808D10098E070380025 +:10C9000004F047FB0100721E201D05E0380004F012 +:10C9100040FB01003200E01C2DF3BEEF200000F0D0 +:10C92000BCFB74E758F600B007F80100A9FD010050 +:10C930001D4E00B06BE70000CCF20004D0F2000402 +:10C94000BCF1000490E00004FFB583B00C000500CA +:10C9500000271E00029703F0CFFF01000598012871 +:10C960001BD0022829D0032823D13079802868D011 +:10C9700061DC002805D0022803D0032801D0052857 +:10C9800017D170782100FF4A1268904702902078F2 +:10C99000801E20700298801C36E0307900280AD171 +:10C9A000887B012807D12B0022000021412005F0BF +:10C9B00096E907B0F0BD2770FBE73079002816D064 +:10C9C00001281ED080282AD08128F2D1F5F7D4F989 +:10C9D0000600C08801282CD3401EF080080E635545 +:10C9E0000100000088B801A000020000CCADA80E34 +:10C9F00028703168F288491C681C2DF358EFF088C4 +:10CA000015E02000F8F747FF02902078401E2070C4 +:10CA10000298401C02E02000F8F743FF02902078C3 +:10CA2000287022780299681C2DF340EF2078401C72 +:10CA300032E0F5F7ABF9C1880229C6D30068407827 +:10CA40002870012028E02F70BFE7822803D08328B8 +:10CA500001D08528B7D1D14B00211E68732002AACE +:10CA600001ABB0476B461879CD490E3028700120D4 +:10CA70002070681C0E222DF31AEF20786B460E30C2 +:10CA80000006000E20701A79029940192DF30EEF5E +:10CA90006B46207819794018207094E7030000B5A0 +:10CAA0002EF3F2E8040903050709012000BD022066 +:10CAB00000BD032000BD002000BDF8B503F026FF37 +:10CAC000050000F0EAFA070059D0687BFE1CFF2839 +:10CAD00003D01A235843441900E02C0001201134DC +:10CAE0002874E078012103F021FF0090E078A8731A +:10CAF0000098E873A078307000987070E078B0709B +:10CB00002079F070F6203071012070716079B07179 +:10CB10006279A11DF01D2DF3CAEEB179F01D0D183B +:10CB200020792870207901280BD0022813D00528FD +:10CB300011D0062824D0E078042802D000206870A4 +:10CB400007E09849487AFFF7A9FF6870887AFFF7ED +:10CB5000A5FFA87005E094480079FFF79FFFA87033 +:10CB60006870009A2300E91C281DFFF7F7FEB079D2 +:10CB7000E97840180106090E380004F04BF9F8BDB9 +:10CB80002020DCE7030000B52EF37EE80A06080A41 +:10CB90000C0C0E1012081014012000BD022000BD64 +:10CBA000032000BD042000BD062000BD052000BDFF +:10CBB000812000BD002000BDF1B584B003F0A6FEC9 +:10CBC00000270190380002977849096888470128B2 +:10CBD000039054D300264FE01A2078430199744AF9 +:10CBE00044181134A77012680298310096ACF260B4 +:10CBF0000100000084BA01A000020000ECC9CB8D46 +:10CC0000904720706670029B2EF348E809060C3AA4 +:10CC10002227062206223A00029A3100200000F064 +:10CC2000ABF92DE0684AA51D126829003000904735 +:10CC30002978491E0A06120E411C681C2A702DF321 +:10CC400040EE2878401C60710420E070012016E05E +:10CC50003100200000F062F912E0A51D30006946A5 +:10CC6000F8F772FE0178297041786970811C0822FA +:10CC7000A81C2DF326EE0A2060710620E0702071BA +:10CC80007F1C3F06761C3F0E3606360E0398864202 +:10CC9000ACD30298401C0006000E0828029001D870 +:10CCA00002989BE70498002803D1FFF710FF05B016 +:10CCB000F0BD019C11341BE000F0F9F90600F6D03C +:10CCC000A178F170E1783171217971716179B17177 +:10CCD0006279F51CA11DF01D2DF3F2ED1A342078B8 +:10CCE0000122FF2800D00022E978300004F04EF83D +:10CCF0002078FF28E0D1DAE7F0B506008BB003F02A +:10CD00000FFE050000F0D3F900280A906FD00A9CAE +:10CD100002202874E41C3000FFF73EFF0221A873B4 +:10CD200003F00EFE0700E873284803782DF3B6EFF2 +:10CD3000091206080A0C120A0E10120081260AE0D7 +:10CD4000F42608E0822606E0862604E0832602E038 +:10CD5000852600E08026002020706770A87BA070E8 +:10CD6000F620E670207101206071A21DE11D3000E7 +:10CD700000F047F9A179E01D0D1802A901A82E7055 +:10CD8000F4F7FEFB002805D1F3F7FEFF0190F4F75E +:10CD90004CFF02906B46187AFFF78AFE6B4668706C +:10CDA0001879FFF785FE6B46A87011E020F10004AA +:10CDB000ECF100049AF200B067DF000483ED000498 +:10CDC000CCF0000430F10004ECF0000480ED00042D +:10CDD0001E743A00E91C281D03ABFFF7C9FDA079BA +:10CDE000E978401801060A98090E04F01DF80BB006 +:10CDF000F0BD0100012810B500D104E050B9C02DEC +:10CE00000100000080BC01A00002000021BDC8C3D9 +:10CE1000022901D1032000E0002003F0E7FF10BD4C +:10CE2000012010B504F048F810BD914810B5007805 +:10CE3000062803D10221032003F0D8FF002004F0CC +:10CE40003BF810BD08001100894A10B5147C002C75 +:10CE50001AD0D47B012C06D0022C17D0032C23D05F +:10CE6000042C2ED110E0834A1278052A0CD0C288F7 +:10CE70000124521C002BC28000D000240A000100B3 +:10CE8000200000F0C3F91CE0002010BDC288521C35 +:10CE9000002BC28004D1002802D003F009FD10E06D +:10CEA000B12003F0DFFC0CE0C288521C002BC280D2 +:10CEB00004D1002802D004F035F802E0B12004F0DB +:10CEC00015F8012010BD70B505000E0014000028F3 +:10CED00007D06949280009688847230032002900E3 +:10CEE00003E00021230032000800FFF7ABFF70BD14 +:10CEF00070B5060061480C0080680125406805286F +:10CF000001D0411C05D10021C120FFF76FFB05288E +:10CF10000CD00006000E23002A003100FFF77EFC33 +:10CF20005749300009688847012070BD002070BD56 +:10CF300070B50E00534A841D12680500C11D3000F3 +:10CF40009047010050480079FFF7BCFD20706078E1 +:10CF5000002807D0401E0206120E491CA01C627059 +:10CF60002DF3B8EC6078801C687148480078082878 +:10CF700002D10520E87007E045493000096888477C +:10CF8000FFF714FEE8700220287170BDF7B582B07B +:10CF90000500841D40493F4E096803988847019069 +:10CFA0003078207070783D4A607012680398A11C38 +:10CFB00090470100A278E01C2DF38CECA178E01CD6 +:10CFC0000E18324800270078072808D1052037704E +:10CFD000E87003202871A078001D687171E604983C +:10CFE000052801D106200AE00398FAF721FB002862 +:10CFF00005D13770A078001D6871012008E001217B +:10D00000317001997170A178491D6971ED98E61F21 +:10D01000010000007CBE01A0000200003491AFDBE3 +:10D02000FFF7CEFDE8702F7155E67CB580380D0016 +:10D0300000211400030001912DF344EE07050507BC +:10D0400005060705060021707CBD154840780228BA +:10D0500009D1184B00211E68A52001AA6B46B047D4 +:10D060000198801C00E014480190082028700120DD +:10D0700020700199681C08222DF336EC20780830C6 +:10D0800020707CBD90E00004325C00B0C4F100046C +:10D0900024F300B0BCF100040CF1000483ED0004A3 +:10D0A00080ED0004ACF100046BDE0004E4F0000449 +:10D0B000DCF00004ECF1000490F200B0084A10B576 +:10D0C000126803219047002800D0006810BD054970 +:10D0D000103809680847F920F0E7C01CEEE70000A7 +:10D0E000B8F10004BCF10004704701008A781038E0 +:10D0F000D21C82808978034BC91CC1801B6881883F +:10D1000000221847E8F20004914A01211268002029 +:10D110001047F3B581B002988E4FC4887868002814 +:10D1200003D18D4800688047786000228B49100049 +:10D13000FDF768FC8A488B4D007C8B4E022829D174 +:10D14000F1F787FF01280BD17078012808D1012C55 +:10D1500006D1029803F045FF0078F4F709FC56E089 +:10D160007D4800688047002851D08188C288891A8C +:10D17000A1424CDB7D4B22001B68010002989847BE +:10D180000198002843D120002C6800223178130038 +:10D19000A0473CE0002C3FD07968367800293BD08E +:10D1A0008888CA88801AA04236DB704B02981B68B8 +:10D1B000220098470198002829D1042E1FD17868B1 +:10D1C0000068F8F782FC002819D078680068407879 +:10D1D00021280BD0222809D0242807D0272805D0C1 +:10D1E000282803D0292801D02A2808D16048012105 +:10D1F000C170200031005F4A2C68012304E0200048 +:10D200002C68002231000223A047002078605A4990 +:10D21000029809688847FEBD0020FDF79FB4F4D747 +:10D220000100000078C001A00002000030022B794C +:10D23000FBFBF6E713000200002010B5FFF702FB2E +:10D2400010BD49480078704770B50024464D032250 +:10D25000A8682C700379C11C002B00D000220A7032 +:10D26000697803F02CFE6C7070BD70B53E4DAC68F3 +:10D270006978E41C6118891C03F0F3F96978401897 +:10D2800068706078401C6070FFF7DEFF70BD10B5FD +:10D29000FFF735FF10BDF8B50700042901D00520C0 +:10D2A000F8BD0120FFF723FF040001D10320F8BDE2 +:10D2B0002D4D012041212870217008216170E61C4C +:10D2C000A070FFF712FF0021A8606970017138009B +:10D2D00003F09BF930702E4922000020FDF79CFBE3 +:10D2E0000020F8BDF8B50500441C0026012908D32C +:10D2F000491E0A062978120E681C02F073FA0028EB +:10D3000001D00520F8BD2878401DFFF7E1FE002878 +:10D3100001D10320F8BD0022C11C0271421D9446B8 +:10D320002378042B05D34A786746D719521C4A70D4 +:10D330003B706278A41C1419761C2A783606360EC7 +:10D340009642EDD3412202700B2242704A78921C21 +:10D3500082704A78002A00D009220A70FFF7CFFEB7 +:10D360000020F8BD7CF30004785C00B064F1000498 +:10D3700065BF010090E000045CF1000480ED000452 +:10D38000C0F1000482F200B082290300BCF1000465 +:10D39000D7C00100F3B5002455256D062B4881B098 +:10D3A000E8602B4801272B4E0068FF06002908D0B3 +:10D3B00080472869791308432861306880473C001A +:10D3C00006E080472869402108432861306880478B +:10D3D000012080060443AA6AA00C80040199511818 +:10D3E0008903890B08432862FEBD10B5012424057A +:10D3F00055235B06DC601C6A2401E40FE406002967 +:10D4000002D1196A8A03920BA10C890411430028E6 +:10D4100002D00120800601E00120000601431962CC +:10D4200010BD70B50125AD0355240848E934B3D8C3 +:10D430000100000074C201A000020000106648FA5A +:10D440006406E060074800688047206940218843FF +:10D4500020612069A843206103480068804770BDAF +:10D4600040401000CCF20004D0F20004FF4800213C +:10D470004171012101717047FC494A79002A06D1A6 +:10D48000012801D0022802D1087101207047002034 +:10D49000704770B500210120F3F70AFAF34CF44904 +:10D4A00020790A6A012801D1602301E0FF2381333A +:10D4B0001A430A62ED4900252C31A1602570ED4E1A +:10D4C00065700001A5708019E570016AFF22F932CC +:10D4D00091432031022291430162EBF7BFFC207996 +:10D4E00000018019006A400DC00701D1657170BD4F +:10D4F0000120607170BDDD48DE49007900014018EF +:10D50000006A8002C00F7047D84800790101D948ED +:10D510000818016A490DC90701D100207047D64992 +:10D520008162D5494031C162416A03221207114329 +:10D53000416201207047F8B50400D0480068804778 +:10D54000082304251E04DF035522CD485206D0606F +:10D55000C649002C09D010690C79012C02D118435E +:10D56000284301E030433843106108790201C14883 +:10D570001018036A022213430362C2484A7100680A +:10D580008047F8BD70B5050000210120F3F790F940 +:10D59000BA4800688047552149060869B34C22798A +:10D5A000012A03D108229043042203E00122D2047D +:10D5B0009043521090430861B24800688047207938 +:10D5C0000101AC480918086A02229043002D01D0DD +:10D5D00040084000086200210800F3F769F90020C4 +:10D5E000607170BDA14910B5487902280DD1087944 +:10D5F0000201A0481018026A02239A430262032023 +:10D60000487100210800F3F753F910BD974B587982 +:10D61000032808D11879010196480818026A0221E6 +:10D620000A4302625971704790489249007900019B +:10D630004018006A8007C00F7047F8B54FC6C1F99F +:10D640000100000070C401A000020000DD124BB414 +:10D6500004008B4F787902281CD18D4800688047E0 +:10D66000B9780120002600290BD13D002C35BD6082 +:10D67000F978002902D07978A1420BD03C70B870BB +:10D680000CE0F97800290BD17D4D3C35BD6039782F +:10D69000A14201D10020F8BD7C70F870EE8000E05E +:10D6A00000257D48006880477C48002D03D1417BE0 +:10D6B000491C417300E046732800F8BD704810B55E +:10D6C0000079714900014018406A00F026F90028ED +:10D6D00001D1012010BD002010BD69498A78032ABC +:10D6E00002D10A78824205D0CA78032A04D1497847 +:10D6F000814201D10120704700207047644810B575 +:10D70000006880475E4800218278032A02D0817039 +:10D71000017004E0C278032A01D0C17041705E48F4 +:10D720000068804710BDF8B5554D6979022938D198 +:10D730002979554A090189184C6A55492A78096896 +:10D7400002260327824210D16409640128002C308C +:10D75000C08804438847200000F0DFF8002802D08A +:10D760002020AF7012E0AE7013E01F20000284434F +:10D7700043483C30C088000204438847200000F042 +:10D78000CCF8002804D001204003EF70044300E0EF +:10D79000EE70287901013C48081844623E48006850 +:10D7A0008047F8BDF8B5364D374E2879000180190D +:10D7B000446A3B4FE10DC943890712D0E101890F4B +:10D7C000022911D1610DC9070BD1E0022900C00E59 +:10D7D0000C318880C8800800F1F71DFF287900010E +:10D7E0008019416A39434162A00E2E4FC043800721 +:10D7F00006D1287900018019416A39434162F8BD98 +:10D800002001800F0228FAD1600DC007F1D11C4918 +:10D81000E002C00E1C318880C8800800F1F7FBFED2 +:10D82000E7E7F8B500200400154D73E02979164AA2 +:10D83000090189184A6A130612049B0F960F002BE0 +:10D8400036D0032B38D1486A0122120739854B01A3 +:10D85000010000006CC601A00002000050AE8FFC69 +:10D8600010434862A87803282FD10020A870E878D8 +:10D87000022805D10320E870486AD2131043486299 +:10D8800028780127012800D100273800F1F7EEFFA2 +:10D89000002F13E0846200B0400800AA000100AA33 +:10D8A000001400AACCF200040C000C00D0F200041A +:10D8B00060EF00B0000040000000000205D1002031 +:10D8C000287002E0A978032900D00120002E24D07E +:10D8D000032E26D128791B4900014018416A0122F4 +:10D8E000120711434162E978032919D10027EF702B +:10D8F000A978022905D10321A970416A2022114388 +:10D90000416268780126012800D100263000F1F735 +:10D91000ADFF002E04D16F7002E0E978032900D03A +:10D920000120641C002801D1611C89D1F8BD0100CF +:10D9300000208A09920703D1890B890700D10120B1 +:10D9400070470000000100AAFD4810B50179F122DE +:10D950004908490011400171FA4A00210423535437 +:10D96000491C0A29FBD300210B005418491C042927 +:10D97000A372FAD361212DF37CE810BD002901D1F7 +:10D98000062100E00721EE4A83181970117901235E +:10D9900083401943117170470922002900D189225F +:10D9A000E74943181A700A79012383401A430A7120 +:10D9B000704710B5E24C01002379002001228A4013 +:10D9C000134227D00A1913781B071B0F062B09D007 +:10D9D00013781B071B0F092B04D012781207120FA4 +:10D9E000072A17D11323D64A5943153289188A7C3E +:10D9F000D20700D002208A7C920701D5082210436A +:10DA00008A7C520701D510221043897C090701D571 +:10DA10002021084310BDF0B504000E00C8480025C1 +:10DA2000012103790A00AA4013426CD02A18127807 +:10DA30001207120F13002DF36EE90B1407071FD303 +:10DA4000222555603F63CF00002C34D0012CFCD040 +:10DA5000032CFAD0052CF8D0042C01D1583F71D9F1 +:10DA60000100000068C801A000020000EEE3F754C6 +:10DA7000022EF4D0BAE0042CF0D1082EF8D12C06F6 +:10DA8000240E00212000FFF791FF3EE0062CE6D097 +:10DA9000ACE0022CE3D0A9E0042C01D0032C0ED181 +:10DAA0002806000E0500FFF78EFF30420DD1032C33 +:10DAB00003D100212800FFF779FF2800F0BD002CDA +:10DAC000CDD0012CCBD0052CE3D193E0002C72D02B +:10DAD000012C70D0032C6ED0052C6CD0042C18D1E6 +:10DAE000022E68D0082E14D12806000E0400FFF77D +:10DAF0006AFF00077ED408E0092C77D12806000EC3 +:10DB00000400FFF760FF304274D12000F0BD082C04 +:10DB100070D06BE0072C6DD068E0002D28DD027915 +:10DB20006B1E0F009F403A4222D08A4A203AAA1820 +:10DB3000D37F1B0704D0D37F1B071B0F092B08D1F2 +:10DB40001322844B6A439B1CD218D27B12074DD1FF +:10DB50000EE0D27F1207120F032A09D113227D4B48 +:10DB60006A439B1CD21812789206920E042A3DD862 +:10DB700023002DF3DAE80A060A14181C2127342B97 +:10DB80002F342A06120E422302E02A06120E012327 +:10DB900017183B70037991400B4303711FE02A066D +:10DBA000120E0523F4E72A06120EC023F0E728061A +:10DBB000000E002111E01DE02806000E0021FFF7F5 +:10DBC000F5FE0CE02A06120E4323E1E72A06120EA8 +:10DBD0004823DDE72806000E0121FFF7D9FE5E4944 +:10DBE0002806000E085549198E72F0BD6D1C042DD3 +:10DBF00000DA20E70420F0BDFFB58C461C000600CB +:10DC000013235449584315314518300081B0FFF7AC +:10DC1000DAFE00070DD52078504A800943001B1812 +:10DC20001B1D002003E0215C1718401C397298422C +:10DC3000F9DB0A9A0092039A23003000614600F053 +:10DC400008FBA87C01210843A87405B0F0BD70B59D +:10DC50000E0013213F4A4143153200248D18FFF76F +:10DC6000B2FE80070FD528783C49800949FF423829 +:10DC70000100000064CA01A000020000CE8794D712 +:10DC800043001818001D04E02A1992780B19641C2F +:10DC90001A728442F8DB040003E0305D29198870B1 +:10DCA000641C082CF9DB70BDF7B582B014000E00BF +:10DCB0000298FFF7C4FE0500042823D02A4A601DFD +:10DCC000029B1532C71C2DF33AE80A061E6E422746 +:10DCD0004262B08FA1B0A16960690F7813216943D6 +:10DCE00000788918627926680A70A2794A7088706B +:10DCF000CF700020325C0B181A71401C0006000E19 +:10DD00000428F7D391E0E279009203002279216898 +:10DD1000280000F0A8FA88E0022E08D1E2790092EB +:10DD20000300227921682800FFF770FF7DE0082EAC +:10DD30007BD11320684321688418002902D0280071 +:10DD4000FFF78FFFA07C02210843A0746DE00299C9 +:10DD5000E27900920329227921680BD1030028007F +:10DD600000F081FA0AE00000001F00AACEFA00B01D +:10DD700088F200B003002800FFF748FF227C0092E1 +:10DD8000627CE3683900280000F02AFA4DE0227B2B +:10DD9000A16801922300009161680D3322002800E0 +:10DDA00000F0CAF941E013206843266861688218D0 +:10DDB000002E07D00020335C1354401C0006000ED8 +:10DDC0000828F8D3002908D000200B5C141823720F +:10DDD000401C0006000E0828F7D3002F25D0387805 +:10DDE00010747878507420E0616820680E781321F0 +:10DDF00069430078A468891808704E700020225C7E +:10DE00000B189A70401C0828F9DB0EE013206843B9 +:10DE10008018F10603D5817C042211438174B10678 +:10DE200003D5817C082211438174280017E7FEB5D1 +:10DE30001400FFA212680292FEA212680192FEA2D2 +:10DE4000126800920425FF2225706270FB4A0028A8 +:10DE50000DD001286AD0032875D0042805D1107A86 +:10DE6000042802D00500082060702570FEBDC88817 +:10DE70000026122806D30B681F78F02F16ECEF1D32 +:10DE80000100000060CC01A00002000003F397999C +:10DE900002D19B78D42B01D0002E2AD0002601A8D5 +:10DEA0008757EB49C85D04281FD0FFF7A0FDC006C7 +:10DEB0000AD55520400680684006000F022803D18D +:10DEC000E348C55D09200FE0E148C05DFFF78FFD25 +:10DED00080070AD55520400680684006000F0228BA +:10DEE00003D0DB48C55D04206070761C032ED6D3BA +:10DEF000C5E70023042803D308680078E02801D090 +:10DF000018000CD00020032602AB1956515C0429DE +:10DF100001D00D006670401C0228F6D3AFE7012641 +:10DF20006F463956515C042901D00D006670401CC3 +:10DF30000328F6D310780428A1D0050063709EE76B +:10DF40009079042802D0050006206070D07904285A +:10DF500095D00500072091E7FFE7C88810282ED349 +:10DF600008680078D4282AD1002601A88757B84924 +:10DF7000C85D04281FD0FFF73AFD80060AD555205A +:10DF8000400680684006000F022803D1B048C55DF6 +:10DF900009200FE0AE48C05DFFF729FD00070AD554 +:10DFA0005520400680684006000F022803D0A8488C +:10DFB000C55D04206070761C032ED6D35FE7907891 +:10DFC000042895D00500022058E710B50400080089 +:10DFD0000321001F2CF3F8ED217880018906890EBA +:10DFE0000843207010BD132358439A4B30B5C31813 +:10DFF000987C002A03D110210843987430BDEF2487 +:10E0000020409874002005E00C5C1D18AC70401C8A +:10E010000006000E9042F7D330BD132358438D4BBA +:10E0200030B5C31818784406640E002A02D1402087 +:10E0300004430AE0BF20044000200A5C1D186A70F7 +:10E04000401C0006000E0428F7D31878C009C00150 +:10E050002043187030BD7F482023153803710279A2 +:10E060001A4302718171704710B50C0000F060F81E +:10E07000042807D0774915394018417CC909C901DE +:10E080002143417410BD10B500F052F8AEE8C3A4AE +:10E09000010000005CCE01A000020000D13F01F0B1 +:10E0A000042806D070491539401801782022114300 +:10E0B000017010BD6C491539487170477CB500215D +:10E0C00005006A4B28201C6801AA6B46A047664CD5 +:10E0D00001990020153C0A5C03195A72401C000685 +:10E0E000000E0828F7D36248006880470190017845 +:10E0F000E17140782072002D03D12079402108433E +:10E1000005E0012D04D120794006400E80302071B9 +:10E110007CBD5848C168584A090F09078918C16071 +:10E12000514909201539887170474F49092015391F +:10E13000887170474B490200895C0120042900D195 +:10E14000002070474749020000200B189B7A934239 +:10E1500005D0401C0006000E0428F6D304207047AA +:10E16000F0B59C461724069B172B00D21C001323E6 +:10E1700043433D4D5B191C70002908D000254E5DBE +:10E180005F197E706D1C2D062D0E042DF7D31178AE +:10E190005971521C11789971521C1178D9715178AA +:10E1A00019726146097859726146491C0A789A7257 +:10E1B00049780A0912010907090F0A43DA72002295 +:10E1C0001A730121597380219973002C1BD0042CE0 +:10E1D0000AD92449244D0918153DCA722979401CD1 +:10E1E0000122824091432971002005991A18095C87 +:10E1F000D173641E401C24060006240E000E17284E +:10E2000001D2002CF1D1F0BDFFB581B08C461E00CB +:10E210000F250A990F2900D20D0013214143124AFC +:10E2200001278C180021002D0AD00E4A0E4B12181F +:10E23000153BD1721A79401C390081408A431A710A +:10E24000E5738820A0736046F8F73BF820740398C4 +:10E2500060746773002017E00305000004050900DF +:10E2600001030500CEFA00B0151F00AAECF100046E +:10E270004CF10004800000AA94040000315C2218D4 +:10E28000D174401C0006000EA842F7D3FBE470B521 +:10E290001D0013235843094B049CC318A39A19CD9E +:10E2A0000100000058D001A00002000089008E94F7 +:10E2B0002878187068785870002005E00D5C1E18EA +:10E2C000B570401C0006000E9042F7D31C7370BD61 +:10E2D000151F00AAFEB501AA05000E00344C00214E +:10E2E000276822206B46B8470198007800280BD099 +:10E2F0002A002568002123206B46A84724683200A5 +:10E30000002124206B46A04701980078FEBD1CB573 +:10E31000002401A9684601940094FFF7DBFF25491A +:10E32000002817D001200870019802788A70009A9E +:10E3300012784A70CC700078012102F0B3FE009888 +:10E340000021007802F0AEFE01980021007802F072 +:10E35000B6FE1CBD0C701CBD70B50124154D28788F +:10E36000002818D0687802F0B2FE0126002802D0FA +:10E370000024EE700FE00020E870A878012102F080 +:10E380009EFE687802F0A3FE002804D0A878002141 +:10E3900002F095FEECE7200070BD064810B501784C +:10E3A000002903D08078002102F089FE10BD000012 +:10E3B000ECF10004D06200B07CB500242100864D51 +:10E3C000019400942E68912001AA6B46B0470198F1 +:10E3D0000078012800D0002000052E6804430021A9 +:10E3E000922001AA6B46B0470120C00484430198E3 +:10E3F0000078012800D00020C0042E6804430021CA +:10E40000932001AA6B46B0470198017800290CD0EF +:10E4100001290AD0022908D0032906D0042904D0F2 +:10E42000052902D0062900D00021072000048443DA +:10E4300008042E6804430021942001AA6B46B047CB +:10E4400001980078022801D1022100E00321182060 +:10E450008443C8002D6804430021962001AA6B461E +:10E46000A8477F2040018443019800784001204361 +:10E470007CBD0021012010B5F2F760FA574C2068EE +:10E48000400DC00710D05649086A0322120390437A +:10E490000862FFF791FF062290430122514952057D +:10E4A000104308606061012010BDF8B50E2680DFC2 +:10E4B0000100000054D201A000020000A964ED1781 +:10E4C000012504264A4C022701280BD1FFF7DBFF68 +:10E4D000002801D10020F8BD606947492843304336 +:10E4E000B84326E045490228096824D1884701211C +:10E4F000490255204006C16002690A430261404852 +:10E5000000688047FFF7BFFF00280DD13B48006837 +:10E510008047552252061169012040028143116152 +:10E52000374800688047D5E7606933492843B043DE +:10E53000384348603DE003280FD160692E4A2843E4 +:10E54000B043B84350606061884755225206106955 +:10E55000012149028843106119E000281BD160693C +:10E56000B043B84340084000606120684008400064 +:10E57000206000210800F2F7EBF92048006880478E +:10E5800055225206116901204002814311611C4845 +:10E59000006880470EE0042807D160694008400009 +:10E5A0006061012003F02AEC01E0052802D16069D6 +:10E5B000284360610120F8BD0D490423002802D1E1 +:10E5C0004869184304E00222012803D1486905E0A4 +:10E5D000486170470228FCD1486918431043F7E7A7 +:10E5E000034840690004000F70470000ECF100048C +:10E5F000400100AA400800AAD46200B0CCF2000496 +:10E60000D0F20004024901204004886070470000F5 +:10E61000009000A8F8B500272C4D2D4EEB68002B7C +:10E6200030D12B7C2B4A002B04D101212974007896 +:10E63000107005E0012B05D102212974007850707B +:10E64000012441E0234CA41E022B11D1007820802C +:10E65000032129749070204A01241268C01C2100F3 +:10E6600090470028E8602FD003220100194812E0EB +:10E670002088884203D9401A20800C0024E004003E +:10E680002F7421E09A88DC88141B8C4200D90C007E +:10E690002204120C190033689847E968002913D046 +:10E6A0008888CA8890420FD10C4A0848126890475F +:10E6B000002803D10A49E868096888472AA30DD0D1 +:10E6C0000100000050D401A0000200006410EE59C7 +:10E6D0000949EF602F740968012088472000F8BDC0 +:10E6E000F0DF0004D0F10004DE6200B0B8F10004F5 +:10E6F000A8F20004BCF10004E4F2000410B5040028 +:10E70000E4F72CFA21001C3109040F48090C0022FF +:10E710002CF38EFB00280ED10B480C388168491C65 +:10E72000816001688C4200D9046041688C4200D24B +:10E730004460002010BD0189081810BD1C3810B5B8 +:10E740002CF34CFB10BD0000F06200B010B50400CB +:10E7500001F0B5FA012803D1024920000968884771 +:10E76000012010BDBCF100047748002110B5016004 +:10E77000764A774B080003E084001459401C61611D +:10E780001C78A042F8D37348C16041600160816089 +:10E7900010BDFFB581B067273F02042960D302781E +:10E7A000D20603D00D20C00205B0F0BD694D002493 +:10E7B00004290BD005290CD0421D062913D101795B +:10E7C000696001294CD1EA60AC6020E06C60EC60CB +:10E7D000FAE76C60EC600179A960002917D1FF218C +:10E7E000491CA96013E006794B1F9E426E6001D15F +:10E7F000AC600BE08B1F9E4232D141182039C97F9B +:10E80000A960002902D1FF21491CA960EA604E4994 +:10E8100042780968A42A61D18278042A35D1C07867 +:10E82000002858D16868002853D0102818D84748C5 +:10E83000002625E0454AB00010586968027C9142E4 +:10E840001DD1E96802F07EFE002818D13F48B100D2 +:10E850003D4E405830604461028CA968914201D21B +:10E860003800A1E7002A05D0C169002902D0039829 +:10E870002CF3A8E830680499008C088023E0761C0B +:10E88000334800788642D5D323E0002A23D1C078CC +:10E890000C2820D100291CD0E8686D6802784078E7 +:10E8A000130203434A7C002011E0022D0ED18E6931 +:10E8B0008700F65936889E4208D18A698000105830 +:10E8C000486104980480092000036DE7C06A70DF86 +:10E8D000010000004CD601A000020000E9AC2A11A2 +:10E8E000401C8242EBD8214868E76B20000265E7B4 +:10E8F000002902D11D48FC3860E74B6A002B02D189 +:10E900006D2000025AE71848049A0399984755E782 +:10E9100070B5150002001C000A430026002A02D12F +:10E920006F2000020CE0104A2300D660566096600B +:10E9300010602A00FFF737FF09210903884200D041 +:10E9400026802188020A4B19491C21801A702188CF +:10E950004A19491C2180107070BD0000146300B07A +:10E96000346300B0340E0004DCFA00B0826A0000A8 +:10E97000F8B500250328E44EE44C13D103F056EA21 +:10E980000700F3F76CFA0121002801D0617000E064 +:10E990006570787C02090007000FF2713072F57023 +:10E9A00021700BE003F046EA6570C17B0909F17143 +:10E9B000007C000930720320F57020700020F8BD43 +:10E9C000F8B50D001D2844D1E888082841D3D04C63 +:10E9D0002800216888472168280088472168280086 +:10E9E00088472168280088472168280088472168CF +:10E9F000280088472168060028008847216807000A +:10EA000028008847F90824D10407240F0E2C20D8A9 +:10EA1000BD4F3007000FB871B006800FF7F7DAFA74 +:10EA2000B009F7F7D4FAF878002800D03C71B87A2A +:10EA3000002802D1787A00280BD000210800F1F7D5 +:10EA400045FFF7F7C0FCF3F7E9F901210220F1F7E0 +:10EA50003DFFAF4C02E0216828008847E888002885 +:10EA6000F9D10320F8BDF8B50C00070050280AD1F1 +:10EA7000E088012807D1A6492000096888470028B6 +:10EA800001D1022646E0A1499F4D00200870287957 +:10EA9000D02103260843B8423AD1E088012834D374 +:10EAA0009B4F200039688847C0062BD5E088012895 +:10EAB00028D139682000884707003040F7F78AFAE4 +:10EAC0003807800FF7F783FAF7F77DFC9148006865 +:10EAD0008047002819D08188C288891A3125793762 +:10EAE0000100000048D801A00002000057E152B91F +:10EAF000012914DB2979D02211438C4A12689047EE +:10EB0000E87901221203824089488A4B01781D6806 +:10EB100001200023A84702E08748006880470020C2 +:10EB2000E08001E0012068703000F8BDF0B50025FC +:10EB300085B08248049503954078814F05260028CA +:10EB400015D13C680021AD2003AA04ABA0473C6866 +:10EB50000021B02002AA01ABA04702986B460178C1 +:10EB600019700078587001209870684617E0029577 +:10EB700001953C680021062003AA04ABA0473C682D +:10EB800000210A2001AA02ABA047012806D1019862 +:10EB9000002803D06B46187A032804D00198F7F7B1 +:10EBA000C2FB040000E00024039800280AD0654856 +:10EBB000006880476B46197C491D884202D30E06C7 +:10EBC000360E00E00495554FB879082800D100248E +:10EBD00055480068804705003CD0A888E988401A5D +:10EBE000B04237DB514A31001268280090477979EA +:10EBF0004E4A702012680143280090474B4A21007A +:10EC0000126828009047F879484A0007010E387AC0 +:10EC10001268014328009047F878002801D00221AB +:10EC200000E00021414A2800126890476B461A7C98 +:10EC3000002A04D0444B03981B6829009847F879B0 +:10EC40000122120382403A483A4B01781C68300096 +:10EC50000023A04705B0F0BD314A10B5127803007B +:10EC60000020012A07D0022A09D0032A02D1180065 +:10EC7000FFF7B0FE10BD180000F005F810BD180039 +:10EC8000FFF7FBFE10BDFEB50C0007000026244870 +:10EC90000196009640780125002800D102252148E0 +:10ECA000502F016808D1E088012835D1200088471D +:10ECB000002831D102252FE0E02F21D1E088012862 +:10ECC0002AD12000884702090007000F0E2823D808 +:10ECD0001249CB78002B00D008718A711B4B00962B +:10ECE0001C68002197206A4601ABA047CC56035808 +:10ECF0000100000044DA01A0000200007785313AEB +:10ED000000980078002801D1FFF71AFF0948022176 +:10ED100001700AE00B4908204870F7F7F0FA012269 +:10ED2000210038000023FCF796FD00252800FEBDD9 +:10ED300067DF0004186300B0C4F1000464F100044C +:10ED4000C8F1000480ED00045CF1000414F3000439 +:10ED500024F300B0ECF10004F0F20004D0F1000460 +:10ED6000F4F10004FEB5002105004B20F84B01AA88 +:10ED70001C686B46A047F74A2800126802A9904712 +:10ED80000600F54800688047040040D0A088E1886C +:10ED90006B46411A18780930814238DBEF4D1D214E +:10EDA0002A6820009047EE4F04223B682100701C27 +:10EDB00098472A68002120009047EA4E2A68B07AD6 +:10EDC0008007810E707A8007000E0143B0790143FD +:10EDD000200090472A680121200090472A68317955 +:10EDE000200090476B461A783B68019821009847AD +:10EDF000F079012212038240DB486B4601781878D3 +:10EE0000DA4B09301C680023A0470120FEBD00201A +:10EE1000FEBDFEB56A460400002006000190009089 +:10EE2000D1480178CA480029056801D1402001E095 +:10EE300000214E2001ABA84700982107007800D59B +:10EE40000024610703D5032801D303250CE0A107A3 +:10EE500003D5022801D3022506E0E10703D00128EB +:10EE600001D3012500E00025610603D5032801D365 +:10EE700003270CE0A10603D5022801D3022706E0F0 +:10EE8000E10603D5012801D3012700E00027200671 +:10EE90000DD5BD4200D33D002800F7F7AFF828009C +:10EEA000F7F7A9F8002D00D001263000FEBD28009C +:10EEB000F7F7A4F83800F7F79EF83D43F2E7FEB500 +:10EEC00000250328AA4EA849757089780191A9499F +:10EED000A94C09680BD100208847226801990020BD +:10EEE000904700F00FF900283CD0012038E00428BA +:10EEF00039D101208847226801990120766464068F +:10EF00000100000040DC01A000020000BAF13274F0 +:10EF10009047954A01981268694690470400407AE4 +:10EF2000FFF781FFA07A944F00097871A07A00075B +:10EF300001D50420FEBDE07AC00701D1F870387118 +:10EF4000200002F08CFA0E2803D8200002F087FA85 +:10EF5000F8716B4618780D2806D1207B010909014C +:10EF6000EF2901D8000938720198FFF705FF002842 +:10EF700002D00320307000E004252800FEBDF3B568 +:10EF8000002083B00C0005000600070002900190ED +:10EF9000F7F715FAE188491C88421DD3039881428E +:10EFA0001AD103982100F6F71EFDE08801280ED340 +:10EFB0007749200009688847C106CD0F8106CE0F2A +:10EFC0004106CF0F010702906B48090F4171E1889C +:10EFD000A819C019884202D9012005B0F0BD002D42 +:10EFE00008D06B492000096888470290FFF71BFF93 +:10EFF00064494870674D002E17D0654920000968A4 +:10F00000884701090901EF29029002D85A490209EB +:10F01000CA710007000F0E2801D8574908722E68E0 +:10F0200000213F20012302AAB047002F03D05849F6 +:10F03000200009688847E088574E030636681B0E93 +:10F0400000213D2001AAB047012806D1534BE28898 +:10F050001B6801992000984707E0002002900100FA +:10F060002C683C20012302AAA0474348017A0029CA +:10F0700001D00F2903D100224948110004E02320C8 +:10F08000C001884000221100F2F722F9F7F74DF98C +:10F090000020A2E710B53B4C030022780020012A93 +:10F0A00007D0022A09D0032A02D1180000F07CF808 +:10F0B00010BD1800FFF763FF10BDC888002805D1F8 +:10F0C0002D48D02100790843984201D0012010BD7D +:10F0D000F7F797F900202070032010BD294904207C +:10F0E0000978012903D0022901D0032900D1012088 +:10F0F000704710B5234C6078002809D000F098F8CC +:10F10000002801D1042010BD02202070C6163F1136 +:10F11000010000003CDE01A000020000D6DD005F1F +:10F12000002010BD00202070032010BD144870B5D1 +:10F130000068804704001CD0A088E188401A02289B +:10F1400017DB104DE0212A68200090470F482A68FD +:10F15000817900790907090E0143200090470C4886 +:10F160000C4B01781C680220134A0023A0470120A1 +:10F1700070BD002070BD0000ECF10004ECF0000454 +:10F1800064F10004C8F10004D0F1000467DF00045A +:10F1900080ED00045CF100041A6300B0CCF00004C0 +:10F1A000C8F00004C4F10004F0F10004E4F100042C +:10F1B000D4F100047C1A0000603B0500F3B581B077 +:10F1C0006B460E001879364D01070024002902D144 +:10F1D000EC702C7104E029790007000F814202D104 +:10F1E000F0883D2801D90120FEBD2E482E498778A0 +:10F1F0000968012088472D4A39001268012090478C +:10F200002B4A0121126801A89047F088002803D0FA +:10F210002849300009688847297A002901D00F2938 +:10F2200003D100222448110004E02320C0018840BB +:10F2300000221100F2F756F8F7F7EDF81F480470B6 +:10F240000320FEBD1E4870B500688047040024D02E +:10F25000A088E188401A03281FDB114E194D31792F +:10F26000D0202A680143200090472A6811212000FD +:10F270009047B07A2A688107707A890F8007000F5B +:10F280000143200090470748104B01781C68032079 +:10F290000D4A0023A047012070BD002070BD000072 +:10F2A00067DF000480ED0004CCF00004C8F0000427 +:10F2B000F0F00004F4F000047C1A00001A6300B0BF +:10F2C00064F10004C8F10004603B05005CF1000437 +:10F2D000574A002110B5117056490978002902D10A +:10F2E000F8F777FB10BD02F0A2F810BD7047514847 +:10F2F000514B10B581781B68007801229847F6F7CA +:10F300006EFE10BD10B50400F4F70EF94B49096804 +:10F310008847002804D0F4F707F94949B0D9FD809F +:10F320000100000038E001A00002000046C67D1484 +:10F33000096888470120207010BD10B50400F4F75B +:10F34000FDF8434909688847002804D0F4F7F6F827 +:10F350004049096888470120207010BD10B504009D +:10F36000F6F7EBFF0120207010BD374910B5097882 +:10F37000002902D1F8F7D3FB10BD02F076F810BDDA +:10F38000304A10B51278002A09D12F4A1278002A83 +:10F3900002D1F8F7C7FB10BD02F069F810BDC8092B +:10F3A000FCD0F4F7CBF82A4909688847002804D034 +:10F3B000F4F7C4F82749096888472748274900789F +:10F3C000022801D0002000E001200968884710BD14 +:10F3D00010B5F7F7FFFB10BD880710B506D58806F6 +:10F3E00001D5042000E00520FBF761FD10BDC80930 +:10F3F00010B505D0F6F7A1FF184901200968884724 +:10F4000010BD154810B50078022802D1F7F7C0FBEF +:10F4100010BD002010BD002810B505D009490120FD +:10F420000870F6F743FE10BD07480178002901D1A6 +:10F43000082100E009214170084900200968884737 +:10F4400010BD00001C6300B080ED0004C4F0000497 +:10F450003CF3000438F3000467DF0004B0F100045B +:10F4600070B50024054D00212A6820009047641CD7 +:10F470002406240EBF2CF6D370BD0000F8F1000462 +:10F480001CB50021E84B20201C6801AA6B46A04750 +:10F490000198E64C0078002808D02079012801D195 +:10F4A000022000E00120207120791CBDF8F795FCB6 +:10F4B000F9E730B50400DE49007885B0087023789C +:10F4C00018002BF3AAEC090612191E2A3C3C3C3CFE +:10F4D0004900F2F7ACFAD74904A809688847D64929 +:10F4E0006B460968187C884736E0F2F7C2FB0021BA +:10F4F000080001F045FE2FE0F2F7D0FB02F0D0EC5F +:10F500002AE0FFF7BDFF0500F2F7D8FBCB482B0040 +:10F5100003220021F8F754FB1EE001AA02A903A868 +:10F520006B46F6F72CFB6B461D781A79FA0CC74729 +:10F530000100000034E201A00002000066A21E9754 +:10F54000197A187B2B00F2F7E8FB0120F6F7E0FAB6 +:10F550000CE0072801D1002001E0FFF79BFFF2F744 +:10F560000AFC0320F8F72EFDFAF77FFAB949207854 +:10F57000887005B030BDFEB504000678FAF715FFB7 +:10F58000B44D092820703AD0AC4B00211F688F2061 +:10F5900001AA6B46B847330009200B212BF346EC38 +:10F5A00009101D2C25292C2C060B2C002988090656 +:10F5B00003E0207023E02988C9050029F9DB1BE05E +:10F5C0002988C90718D001990978C907F1D121788C +:10F5D0000229EED00429ECD00EE0019909788907C0 +:10F5E0000AD529888907E4D106E0019A12785207E2 +:10F5F00002D52A880A42DCD12178092907D1964907 +:10F60000288848819549012009688847FEBDA87867 +:10F61000FAF7D2FF002800D10A202178F1F7B0FED6 +:10F620002000FFF750FFFEBD70B50400894800219F +:10F6300001800925C17085708748C21D4181F9325A +:10F6400091730821401C2BF3CAEA85480068804763 +:10F6500020002570FFF78FFF70BDF8B5056847687B +:10F66000846878482B787B4E00782BF3E0EB090612 +:10F67000102131454F4F536C4F00022C46D1794831 +:10F680003978C17379780174308801213CE0A41E77 +:10F690002406240E2100380001F034FE002835D065 +:10F6A000714A2100126838009047308802212BE00F +:10F6B000A41E2406240E2100380002F000EC0028CD +:10F6C00024D021003800F6F7C5F9308804211BE06A +:10F6D000F07804280BD2654B22001B68390098474C +:10F6E000F0780821401CF070308808433080F2F731 +:10F6F00099FE00280DD009E00C2C07D15C49380098 +:10F700000968884730881021084330802800FFF7B7 +:10F7100032FFF8BDF3F754FD241F2406BF1C240E4E +:10F7200021003800F9F7B5F90028F2D051492878BE +:10F7300009688847504B22001B6839007A2D7B47A7 +:10F740000100000030E401A000020000ABD61DD98A +:10F75000002098473088802116E0F3F73BFD24060F +:10F76000240E21003800F9F79EF90028DBD0464925 +:10F77000287809688847454B22001B68390000201B +:10F7800098473088FF21491C08433080F8BD70B588 +:10F7900004000920014230D0F1F737FD2378334AC5 +:10F7A000314901202BF34CEB0906111519233B3B82 +:10F7B0003E3E3B00364B50702F4A1D78D5735B7828 +:10F7C00013740A8802430A8029E090700888022294 +:10F7D00010E0D070088804220CE01071088808221C +:10F7E00010430880F2F728FE00281BD017E0507164 +:10F7F000088810221043088011E0480607D52078B9 +:10F80000072801D008280AD188070BD507E0880708 +:10F8100005D4480703D51649002009688847200009 +:10F82000FFF7B3FE70BD704710B5040019480068BB +:10F830008047F2F735FEF1F73BF8F2F735FE164850 +:10F84000006880470120207010BD0748807870470D +:10F85000ECF1000483ED000480ED000494F000045A +:10F8600060F10004FFFF00001E6300B05CDD0004D7 +:10F87000B0F1000400F100045CDE0004E8F00004D4 +:10F88000F8F0000410F1000414F1000418F1000471 +:10F89000380A0004CCF20004D0F200042A48704771 +:10F8A0002948183070472848303070472648A83813 +:10F8B0007047254890387047030000B52BF3C0EA25 +:10F8C0000906090C0F121515151518001E48C03829 +:10F8D00000BD1D48BC3800BD1B48B83800BD1A48E3 +:10F8E000B43800BD1848B03800BD1748AC3800BD6A +:10F8F000002000BD030000B52BF3A2EA0A06090CA4 +:10F900001518120F1B1E21240F48783800BD0E4811 +:10F910006C3800BD0C48603800BD0B480C3800BD89 +:10F920000948183800BD0848543800BD06483C381E +:10F9300000BD0548243800BD0348483800BD0248D2 +:10F94000303800BD002000BDFC0A000497A6ECDFA3 +:10F95000010000002CE601A000020000266AD991F7 +:10F9600030B500252B0044789B1CE3181B061B0EAA +:10F97000934208D86D1C801C2D0620182D0E8D4238 +:10F98000F1D3934201D0032030BD002030BDF3B548 +:10F9900083B0002703980078401C884202D00520DD +:10F9A00005B0F0BDFF20FDF751FC0028019001D10A +:10F9B0000320F5E7019C0020E41C20706070F82013 +:10F9C000A51C0026009034E00398290080190290BD +:10F9D00040786A4600F0F0FC092811D1217800290E +:10F9E0001AD109212170002100916278002A0ED0DD +:10F9F0006170029AA51C5278A2700027E17006E09F +:10FA00000A2804D12178002910D120700091217892 +:10FA1000002901D0092809D16078BF1C401C607002 +:10FA20006878AD1CC1190F063F0E4519761C3606C5 +:10FA3000360E03980078B042C6D80199402008706D +:10FA40000198032141700198BF1C87700198FDF750 +:10FA500014FC0020A4E7F8B50D00110005270326CB +:10FA600003002BF3F8E906042125292D314B2C78CE +:10FA700001292BD1012C29D80120002C00D00020F5 +:10FA800000F0C8FC0320FDF7F0FB002825D0402241 +:10FA900002700025457086701022C5700271447195 +:10FAA000FDF7EBFB2800F8BD280000F0C2F8F8BD18 +:10FAB000280000F075F8F8BD2800FFF768FFF8BDD2 +:10FAC000280000F039F8F8BD012901D03800F8BD50 +:10FAD0000120FDF7CAFB040001D13000F8BD402031 +:10FAE000207001206770A0702878E61CFCF7EFFEFC +:10FAF00030702000FDF7C1FB0020F8BD0520F8BDE7 +:10FB000010B54378002B09D0012B0BD0022B0DD060 +:10FB10000F2B0FD1807801F003FD10BD8078FFF727 +:10FB20009AFF10BD807801F038F910BD807800F0A0 +:10FB3000DAFE10BD052010BD0A0010B5417801297C +:10FB400001D9012010BD002902D1022A06D003E00C +:10FB5000C178091D914201D0052010BD36073CC572 +:10FB60000100000028E801A0000200009827A13948 +:10FB70000278011D1000FCF747FE04000420FDF789 +:10FB80007EFB002801D1032010BD40220270042218 +:10FB900042708270C11C0122052C01D10A7005E05F +:10FBA00000230B70F6234B708A70CC70FDF76FFB4F +:10FBB000002010BDFEB5070000207C1C012900902C +:10FBC00008D3491E0A063978120E2000FFF7D2FE2C +:10FBD000002801D00520FEBD3878401DFDF740FB10 +:10FBE000060001D10320FEBD0020F51C3071701D00 +:10FBF000019061782078A21C00F0C3FB002806D099 +:10FC00006878019A21788218401C687011706078B9 +:10FC1000A41C04190098401C0006000E00903978BE +:10FC20008842E6D340203070022070706878801CD3 +:10FC3000B0706878002800D0092028703000FDF7E7 +:10FC400026FB0020FEBD38B523A000680C00009004 +:10FC5000F2F724FC00786B46002C187001D00520C8 +:10FC600038BD1520FDF70BFB050001D1032038BD81 +:10FC700040202870012215206A70A87000200321FE +:10FC8000E8700E2329716B71A9710423E871EC1CD3 +:10FC90002B72A071E2710220207261720521A172A3 +:10FCA000FF21E17200212173F62161732021A173EC +:10FCB0000021E173200088210A3021740422C01D34 +:10FCC00069462AF3E4EE2800FDF7E1FAFBF787FA2C +:10FCD000F2F7EBFB002038BD000020C210B5040095 +:10FCE0000120FDF7CCFA002808D06022027007221C +:10FCF000427001228270C470FDF7C9FA10BD70B560 +:10FD000005000F480C00C07B012808D1022C05D14A +:10FD10000022110010000123FCF75CFE70BD0220E0 +:10FD2000FDF7ADFA0028F9D0602202700822427077 +:10FD300002228270C4700571FDF7A9FA70BD00003F +:10FD400090E0000470B5040000780D00002804D194 +:10FD5000E0780521FFF7D3FF70BD0120FDF78FFA92 +:10FD60000028F9D04021017062781143201E6AFEFC +:10FD70000100000024EA01A000020000B843C2BA5A +:10FD80000170A178417001218170C570FDF789FA79 +:10FD900070BD5748002101607047FEB56B460025D5 +:10FDA00007000095046820784009187103D00128E5 +:10FDB00007D00120FEBD21786B460907090FD971D4 +:10FDC00008E021786B460907090F597161788906A7 +:10FDD000890E99712178C90600D50125A6780128D8 +:10FDE00003D1002D01D0F62E17D1414949680029D1 +:10FDF00021D03F4A137898420FD1012811D16B4688 +:10FE000058795378984208D16B4698799278904205 +:10FE100003D1C8888019FF2803D901A800F058F839 +:10FE2000C7E7344B32001B68E01C98473249380062 +:10FE30000968884715E0012D11D101280FD1B88834 +:10FE4000FF21C91C88420AD22C4A00211268FF20D7 +:10FE500090472749486001000322C280E1E7244817 +:10FE60004760234E0198306030780024012811D17A +:10FE7000002D25D17068C188C91E0A060168120EBE +:10FE8000C91C3000FFF750FE1B49009009687068DC +:10FE900088470AE0002815D172681549D088C01E2D +:10FEA000D0802800FCF766FD00907460009801285F +:10FEB00006D00098002803D0009901A8FFF74CFF56 +:10FEC0000098FEBD0C497068096888477460F7E7C0 +:10FED00070B50500064C6068002804D00649096822 +:10FEE00088470020606005212800FFF735FF70BDBE +:10FEF000286300B0D0F10004BCF10004B8F10004A4 +:10FF000008B502200090012200215C206B4602F01F +:10FF100002E801200200009000215F206B4601F002 +:10FF2000FAEF08BDF8490128C96F09D110780028F7 +:10FF300001D1002002E018780128FAD1087004E00D +:10FF40000878012800D0002018700020704770B594 +:10FF5000050014000120012D08D1D52900D0022070 +:10FF6000020021781800F0F712FC0AE0D52900D031 +:10FF700002201900F0F74FFB011DF929D5123B02B1 +:10FF80000100000020EC01A0000200007537C1F460 +:10FF900000D9F5202070002070BDE149012809D169 +:10FFA0001078002801D1002002E018780128FAD149 +:10FFB000887004E08878012800D0002018700020A4 +:10FFC0007047D7490128896807D11078002801D1E6 +:10FFD000012000E01878087001E00878187000200F +:10FFE0007047CF49012807D11078002801D101209E +:10FFF00000E01878487001E04878187000207047D9 +:020000022000DC +:10000000C749012805D11078002800D01878087059 +:1000100001E00878187000207047C149012809D113 +:100020001078002801D1002002E018780128FAD1C8 +:10003000087104E00879012800D000201870002021 +:100040007047B749012809D11078002801D1002054 +:1000500002E018780128FAD1C87004E0C8780128B5 +:1000600000D00020187000207047FFB581B0012437 +:1000700006001800029B150021000022522B70D0B0 +:100080002BDC2AF306EF529092B2B2B2B2B2B29423 +:10009000B2B2B2B2B2B2B29694989EB2B2B2B2A1B9 +:1000A000A3B2B2B2B2B2B2A6A8ABB2B2B2B2B2AD61 +:1000B000B4B6B2B2B2B2B2BBBDBFC5B2B2B2B2C7D1 +:1000C000C9CBCDCFB2B2B2D4D4D4D4D4D4D4D4D476 +:1000D000D4D4D4D4D4D4D4D6D8B2B12B6FD02BDCD2 +:1000E000802B6DD00BDC533B2AF3D2EE10A9ABADC5 +:1000F0007F7FB4B6B8BA7F7F7F7FBCBEC47FA32B9F +:1001000070D00FDCA02B6ED006DC812B6CD0822B44 +:100110006BD1844F0F21D1E0A12B67D0A22BF7D157 +:100120005C21DEE0A42B6FD0A52B6ED0A62B6DD06A +:10013000B02BEDD1B521D4E0D42B68D01CDCC22B80 +:100140005AD00FDCB42B6FD005DCB22B6DD0B32BA3 +:10015000DED1B921C5E0C02B68D0C12BD8D1724FF8 +:10016000ACE06AE0D02B70D0D12B6FD0D22B6ED008 +:10017000D32BCDD19221B4E0E22B69D009DCD52B71 +:1001800067D0D62BFCD0E02B70D0E12B104EE1AC29 +:10019000010000001CEE01A000020000A7FB579D1B +:1001A000C0D12321A7E0E32B6BD0E42B6AD0E52B51 +:1001B00069D0FC2BB6D1624F8AE08D219BE08E2165 +:1001C00099E0604F84E0472195E0FF215E4F0122D6 +:1001D0007EE06BE05AE05D4F302179E055218AE006 +:1001E0005B4F032174E04B2185E05A4F03216FE000 +:1001F000594F6DE0594F6BE050E04BE048E0DCE0D8 +:100200004AE0642177E0564F342161E0554F5FE0CA +:10021000992170E09A216EE09B216CE040E041E082 +:1002200042E051E09D2166E09E2164E09F2162E072 +:10023000A02160E0A1215EE0A2215CE03AE037E08D +:100240003AE0A52157E0A62155E0A72153E0A321DC +:1002500051E0A8214FE0A9214DE0AA214BE02DE07B +:100260002EE02FE040E031E0AB2144E0AD2142E060 +:10027000AF2140E0B0213EE0B1213CE0B3213AE0C3 +:1002800030E033E034E035E0B42134E0364F1FE0B5 +:10029000364F1DE059212EE05B212CE05D212AE044 +:1002A0005F2128E0202126E0212124E0B62122E060 +:1002B000B72120E02E4F0BE02E4F09E0BA211AE0C3 +:1002C000952118E0902116E0962114E02A4FFF2492 +:1002D000002E53D1FF2C62D00A99A1425FD20A208E +:1002E00005B0F0BD222106E0242104E0BC2102E09B +:1002F000BD2100E0BE21012E10D12A78002A05D1AF +:100300000806000E002101F01EEEE9E70C06240E9F +:1003100003000021200001F012EEE1E70C06240E9C +:1003200003002A000021200001F0F0EDD8E70000D2 +:1003300090E0000484E00004614D00B0D3EC0100C3 +:10034000C9EB0100654D00B0CD4B00B0D14B00B002 +:10035000FF4B00B03B4C00B07B4C00B0A54C00B054 +:10036000D54C00B0ABEC010091EC010073EC010046 +:1003700053EC01002BEC0100F3EB0100012E0ED138 +:10038000FF2C04D02B78002B01D0A34215D1002ADA +:1003900013D12A78012A02D102788A43DC8203A58C +:1003A0000100000018F001A000020000FFC4D8F90D +:1003B0000DD103002A0002993000B847002806D169 +:1003C000002E02D1FF2C00D02C70002092E70920D3 +:1003D00090E707B51300002282B0010000920120CF +:1003E00003AAFFF756FE05B000BD1748002110B55F +:1003F0000122017042708170C170017113498160E6 +:1004000000240A7020060022000E1100FFF7E1FF11 +:10041000641CFD2CF6DBFFF791FD10BD38B515000F +:100420000870127800920C008B1C4A1C01000020FE +:10043000FFF72FFE002801D0002161702978627833 +:10044000891A891E297038BD84E00004306300B029 +:1004500010B50400FCF742FF200000F05DFBFFF741 +:10046000B6FCFCF7E8F9002C03D1FFF7BEFFEFF76D +:100470006EFCEFF739FB10BD10B5040000F0A4F9D5 +:10048000FAF701FE2000FFF7E3FFF2F71BF810BDBB +:1004900010B50C00F349072203004A702AF30CED53 +:1004A000060D1010080404100020FCF7CAF907E03C +:1004B000042C05D00520087102E00220E8F714FDA5 +:1004C00023002AF3FAEC07051716161A1A17160056 +:1004D0000120E8F709FDEEF756FEEEF75BFEEEF7BA +:1004E00063FEEEF768FEEEF757FEEEF770FEEEF7EE +:1004F00075FE10BD00F0F7FA10BD0120FCF7A1F960 +:1005000010BDF1B5002486B0D74E019432682500A5 +:10051000210089209047326800218B209047326863 +:10052000002198209047002759E006997800461846 +:100530007078802801D20121019177284CD021DCEC +:10054000032830D00EDC002835D0012837D002280F +:1005500042D1EEF724FE022004A90855B07802A982 +:1005600008550BE0052822D0062835D1EEF71EFEEF +:10057000712004A90855B17802A80155641C24060D +:10058000240E29E0832823D007DC80281BD0812873 +:100590001BD0822820D1082018E085281AD0862870 +:1005A0001AD1402012E0EEF708FE0320ECCD33868E +:1005B0000100000014F201A000020000DFA0BB7ADD +:1005C000D4E7EEF709FE0520DDE7EEF7E1FD0020B8 +:1005D000CCE7EEF7E4FD0120C8E7022000E00420AC +:1005E000054303E01020FBE72020F9E77F1C3F06CE +:1005F0003F0E06980078B842A1D80198A04E002876 +:1006000011D0376823000021892004AAB8472300AD +:10061000346800218B2002AAA047FAF735F8F9F7D1 +:10062000DBFFEEF79BFD974C002160686A46057280 +:100630000095366898200223B047EEF773FEEEF778 +:100640005FFE002810D121780BE082001219526859 +:10065000127A002A02D0EEF7C6FD0DE0401C00061B +:10066000000E8142F1D807E006980078002801D0FA +:10067000002D01D0FAF701FC002007B0F0BD70B5E5 +:10068000040000F065FA21780200092004292DD227 +:100690001A234B439B185D7CFF2D27D05B7D802B5D +:1006A00024D2517321781A2359438D18697D022968 +:1006B00030D00ADC744B00291AD001290AD1A17864 +:1006C0000120012923D1092122E0062929D07429FA +:1006D00000D10220684BA178197121781A2359435F +:1006E0008918897CF4F77EFF00281CD1012070BD99 +:1006F000287D0821052804D1A578012D08D00621E0 +:1007000006E0A5780020012D02D0032100E004219D +:100710005970DFE7287D052801D10620DAE703209C +:10072000D8E70420D6E7002070BD10B5FAF77DFBAE +:1007300010BDF8B5504C0078217C002834D0534AC5 +:10074000534E544F544D1268012832D0022830D0F5 +:10075000032841D19047207C022805D1326800212E +:1007600008009047386880470020F4F738FFF4F716 +:100770002DFF4A48007804282AD1F5F750FE0028BA +:1007800003D1F7F740FC002822D0F1F7D5FD00286F +:100790001ED0E16F01204870414900220220FAF783 +:1007A00035FA2868804717E0012915D1EEF7EEFCED +:1007B00012E0012904D1F4F742FF00206FC3C53EC7 +:1007C0000100000010F401A00002000012D4B834AF +:1007D00020740BE090473268002101209047386870 +:1007E0008047E8E728688047FAF729FB0020F8BD32 +:1007F00010B5EEF7D5FCEEF705FD2F4A00200521D8 +:100800001154401C0528FBD30220E8F781FB00208F +:1008100010BD70B5040029480068804762782378CD +:100820001202A578E6781343C48802681B4912199E +:100830000978A41DC4800620107000205070180A8A +:100840009370D0701571002E567101D0062070BDC6 +:100850001B4A0120907050701A4B03221C689203AF +:1008600006200123A047002070BD10B50400080039 +:10087000E188491E0170E2882168521E491C401C13 +:100880002AF340E9E0880006000E10BD90E0000465 +:10089000F8F10004F0F1000424F300B080ED00044E +:1008A000CCF200043C5B00B0DCF20004D0F20004A7 +:1008B000325C00B07FF3010070EF00B064F100041F +:1008C00083ED00045CF10004F8B5002407006D49D5 +:1008D0008000401845682600687A002847D1FCF758 +:1008E00008FD002801D10320F8BDC77029780171E7 +:1008F0006B78C21C01272AF3F4EA060904092006D2 +:100900002209D77001E081211AE001249470D21CE1 +:10091000A1186A780023052A14D1A0250F704D7004 +:100920000625CA1C8D70C02111700421537093706C +:10093000D17013710826577111E0822100E08321E4 +:10094000D170E2E7022A09D1A1260F704E70CA1CAD +:100950008F70E96803260978117000E00B7062213E +:100960000170A119091D43708170FCF7CCFC0020B7 +:10097000F8BDF8B50E001100002805D0012825D1DA +:10098000022905D00520F8BD300000F021F8F8BD9F +:100990000120FCF7B0FC04000327002801D1380037 +:1009A000F8BD4220207001206070A070717830780E +:1009B000E51CEFF7CFF90026002801D02E7000E0EB +:1009C0002F702000FCF79FFC3000F8BDD519FC9972 +:1009D000010000000CF601A0000200009F687C7C72 +:1009E0000620F8BD70B505000024012901D00520BE +:1009F00070BD2878284E002811D0317800200BE0F7 +:100A0000820092195268527A002A02D1641C24068C +:100A1000240E401C0006000E8142F1D801E0FAF7D6 +:100A200034FC0220FCF771FC002801D1032070BDCA +:100A30004222047102700022022342708370C2704D +:100A4000FCF76BFC2878B07614480068804728785B +:100A500000280DD0002C0BD0307E062803D10020BA +:100A600000F00BF804E00E4900220320FAF7E2F848 +:100A70000C4800688047002070BD70B50024064D0A +:100A800005E02000FFF72AFF641C2406240E2878C6 +:100A9000A042F6D870BD000024F300B0CCF20004F0 +:100AA000A7F60100D0F200040100002010B5FFF706 +:100AB0006CF910BD70B505000C00F5F7C4FC0028FA +:100AC00013D01048007C022804D129002000F5F73B +:100AD000C9FF03E029002000F5F744FE002803D1F8 +:100AE000094920000968884770BDB0210020FFF740 +:100AF0004CF9F5E70B0001000122002010B5FBF7CF +:100B0000AFFF10BD90E00004BCF1000410B5F84C3C +:100B1000A068002804D0FCF7F2FB0020A06020733E +:100B200010BD10B5F24905240020FF220C711A23D4 +:100B30004343401C5B180006000E04285A74F6D389 +:100B40004A7300220A740720CC734870C86F427041 +:100B5000027010BD70B50500E54CE648E067FFF790 +:100B6000E0FF00202070200001216030002D417640 +:100B700001D1FFF7CBFF70BDDD487047DC4800783E +:100B80007047DB4910B50A78824204D00870010032 +:100B90001000FFF79BFC10BDD54B70B51A79052AE4 +:100BA00001D0100070BDD24C1D7BA468002210E063 +:100BB00053009B18E65C864208D15B1CE35C0B4249 +:100BC00004D050008018801C205C70BD521C12069E +:100BD000120E9542ECD8012070BDF8B5469B08C6B0 +:100BE0000100000008F801A000020000212504D443 +:100BF0001000C44A8E4613790121052B01D019003B +:100C00001AE0967B177CBF4B127B9D6800249446AC +:100C100010E062001219AB5CB34208D1521CAA5C0E +:100C20003A4204D061000919891C695C04E0641C23 +:100C30002406240EA445ECD8012908D002290BD0A3 +:100C400003290ED10100704600F082FAF8BD0100C0 +:100C50007046FCF780FBF8BD01007046FFF734FFDB +:100C6000F8BDAA4909688847F8BD70B50400007846 +:100C700043001818401C884201D0052070BDA14DCA +:100C8000A868002801D0FCF744FB2078287320785E +:100C900043001818FCF734FB0028A8600AD0297B11 +:100CA0004A005218611C29F342EF0120FCF737FB80 +:100CB000002801D1032070BD4122027000220123CF +:100CC00042708370C270FCF732FB002070BDF8B533 +:100CD00005001400012901D00520F8BD2878894FAE +:100CE0000026002807D0012807D0022805D00328B5 +:100CF0000AD1012007E0267006E03878042801D1E7 +:100D0000032000E0062020702878F8700120FCF70E +:100D100006FB002801D10320F8BD41220270062203 +:100D2000012342708370C670FCF701FB2800FFF7B7 +:100D30001EFD3878042808D0B978F87800F082F9D8 +:100D40002078FFF728FF072020700020F8BD10B59D +:100D500004780120FCF7E3FA41230122037042707A +:100D60008270C470FCF7E3FA10BDF8B505000020EE +:100D7000022900900FD30023A81C6E781A0005E00A +:100D800044789B1C801CE3182018521C9642F7D80C +:100D90009B1C8B4201D00520F8BD5A4C6034607E0C +:100DA000002801D0EEF7FBFF29780120002900D0B0 +:100DB00000206076AC1C00262BE02078002810D0A4 +:100DC000012817D002281ED1607807281DD3801E65 +:100DD0000306E178A0781B0E221DEFF7B0F8009013 +:100DE00013E06078032810D12279E178B8B3782B2A +:100DF0000100000004FA01A0000200000141675751 +:100E0000A078EEF7E1FFF4E76078032807D12279B4 +:100E1000E178A078EFF734F8EBE70920E9E76078AC +:100E2000A41C0419761C6878B042D0D86B46187898 +:100E3000002802D12878002805D06846FFF791FFE6 +:100E4000287800280BD137496B4618780A00487576 +:100E5000354915320120F9F701FFEFF7FEFB0020BD +:100E6000F8BDF7B51100072282B0009206240326D0 +:100E700005220025002875D00228FCD00F28FAD0C2 +:100E8000254F3B7801932AF34AE807053232603553 +:100E90003532BB00032824D1039800784000401C61 +:100EA000884218D11F48C07C002804D10120FCF7DB +:100EB00040FA040001D132000DE0412020700121F0 +:100EC0006670A1700398E71CFFF74DFB3870200097 +:100ED000FCF737FA2A00140002D10120FFF765FE63 +:100EE0008EE00128FCD10398FFF749FF64E0062853 +:100EF000F6D12CE0062809D103986A46FFF7F1FEE7 +:100F000004007DD16B461878787029E00B280DD14C +:100F10000398FCF709FB4FE090E00004316300B058 +:100F2000BCF1000470EF00B067F90100019A042AD7 +:100F300066D1082864D1387C012861D1B87B0328A8 +:100F40005ED10398FCF7C9FA36E006280BD1039866 +:100F50006A4605700398FFF7C4FE040050D17D7007 +:100F6000BD704DE01AE004284AD103291FD10120A9 +:100F7000FCF7DFF9040001D1320018E041202070B5 +:100F8000042001216070A1700398E61CFFF79FFB0D +:100F900030702000FCF7D5F92A0008E0002808D0BE +:100FA000022702280AD00F282AD1012915D01400BF +:100FB00026E00398FFF763FE040021E00120FCF720 +:100FC000B8F94122C5700270012147702C00817070 +:100FD000FCF7B7F9EFF750F912E00220FCF7A9F996 +:100FE000002801D134000BE0412202700F22427030 +:100FF000054A8770C57012782C00027193105C2A24 +:101000000100000000FC01A000020000CC356419C2 +:10101000FCF7A1F9200005B0F0BD000090E000044D +:1010200070B504000D001600FFF7C6FD012803D0BF +:10103000FFF7C2FD022818D1FA2D16D861202070C2 +:1010400003206070681DA070E11C0020002E00D1FC +:101050000220491908712000FCF77DF9002E01D00B +:10106000032000E00220FFF7AAFD70BD70B5040068 +:101070000E0000250220FCF766F9002815D0612239 +:1010800002700622427002228270C4700671FCF760 +:1010900062F9002C06D0012C08D0022C06D0032CBB +:1010A00000D101252800FFF78AFD70BDFFF784FD00 +:1010B000042801D10325F5E70625F3E770B50500FF +:1010C0000E00FFF779FD032807D0FFF775FD012813 +:1010D00003D0FFF771FD06281CD122496879887377 +:1010E0002879C873AA79EC1C0120802A00D3022039 +:1010F000087461202870052068700B362800AE70D7 +:10110000FCF729F9E078802801D2042000E00520CE +:10111000FFF755FD70BD70B504000D00FFF74CFDE5 +:10112000042808D16120207008206070AD1C2000C8 +:10113000A570FCF710F970BD10B504000A480078DE +:1011400000280DD00120FCF7FEF8002808D061230C +:1011500003700723012243708270C470FCF7FBF810 +:1011600010BD000090E0000484E0000401000020B5 +:1011700010B5FEF728FE10BD70B506000D00F6F79D +:1011800074FF0C4C002805D031002800F8F799FBBB +:10119000002806D1216828008847B0210020FEF7EA +:1011A00012FE70BD0B0001000122002010B5FBF7FC +:1011B00075FC10BDBCF1000470B5040015000220E0 +:1011C000E7F7CEFE0749280009688847002803D1C1 +:1011D0000549280009688847044A0121126820004F +:1011E000904770BD68F20004BCF100047CF3000479 +:1011F00070B505000420FCF7A6F804000CD06F20A1 +:101200002070012060700420A070E11C31517BA08F +:1012100001000000FCFD01A00002000008E0BB325C +:10122000280029F3BCED2000FCF79FF870BD10B535 +:1012300004000120FCF791F86F21C47001700421B3 +:10124000417001218170FCF790F810BD10B50B00C2 +:101250008188C4880068091B0918180029F384ECE8 +:1012600010BD8188C2880068891A0818704700007C +:101270000C4B10B51A680124844022431A600029DF +:1012800000D00121E3F7D4F810BD074A10B5127859 +:10129000002A01D0E3F721F910BD10B5E3F744F9B6 +:1012A00010BD0000402300802D5B00B0F3B583B07B +:1012B00000240F00C24801940170C24B21001D6838 +:1012C000472001AA02ABA847BF4800688047050035 +:1012D0003AD0A888E988401A032835DBBB490020AA +:1012E000BB4E88703268052128009047019832680B +:1012F0000178280090470398002823D008E0B54BD8 +:1013000000221B68210001209847641C2406240E3B +:10131000B149012009688847A042F0D83900082067 +:101320000143326828009047A54900208870AB4BE4 +:101330000F221C685202012103200023A047012034 +:1013400005B0F0BD3900ECE70020F9E7F8B504007E +:101350000120A34909688847002802D12078102875 +:1013600001D10120F8BD964D01262A783100914027 +:10137000964F814202D1B8780028F2D096490120D8 +:1013800009688847002807D0287886402078864258 +:1013900002D1B8780028E4D10020F8BD88490120A6 +:1013A00010B5487089488078002804D0481CFFF7A1 +:1013B000CDFF002802D000F0FFF810BDF0F7EFFCE1 +:1013C00001210020FFF772FF10BD38B50400FFF7C0 +:1013D000BDFF002802D000F0EFF838BD784A0125A3 +:1013E00011782B0020788B40834207D1491C0906D5 +:1013F000090E00202570FFF759FF38BD401C2070F2 +:10140000401E0001401D009000209070754B0F227F +:101410001B68520201216846984738BD93BAAF0F46 +:1014200001000000F8FF01A000020000FC08058F89 +:101430000C2901D00D2905D10178502902D1807ADB +:10144000000701D50020704701207047FEB5012537 +:101450004468634B002C02D08268022A01D89D7038 +:1014600050E05C4E921EB078002844D11106090E5F +:101470002000FFF7DDFF00283AD0604A0C211268F7 +:1014800020009047701CFFF76BFF584F00280DD0CD +:10149000396801208847544B401E01061B68090E1D +:1014A00000220120984700F091F8FEBDE07A50211B +:1014B0006B46197061785970A1789970E178D9708C +:1014C000217901220009120319714B4B8240B5703A +:1014D0001B68052168469847396801208847424BB8 +:1014E000401E01061B68090E012210009847FEBD30 +:1014F000B0780028B3D01006000E0128AFD12078B4 +:101500000028ACD13348401CFFF769FFFEBD70B521 +:101510000C000020490600D50120314E210701258D +:10152000002903DAEFF7FDFE0120B570E10701D0D5 +:10153000B57001E0002804D02648401CFFF74FFF9B +:1015400070BD2F4900200968884770BD70B5040040 +:101550000122002800D00022234B2A4D1B68A978C5 +:10156000012098472849A87809688847002803D0AF +:101570002000FDF7F0FF70BD214920000968884771 +:1015800070BD10B5F0F715FC1E48204A817812682E +:1015900001209047002803D10120FFF7D7FF10BD9D +:1015A00000210120FFF78CFE10BD0120CEE70920AD +:1015B000014210B503D0EFF7B4FE012000E0002097 +:1015C000FFF7C4FF10BDC07A000970470C49012025 +:1015D000096808473B6300B0ECF1000464F10004C3 +:1015E0005CDD0004C8F10004C4F00004CCF0000489 +:1015F0005CF10004B4F1000458F10004E8F00004C8 +:10160000B0F1000480ED0004A4F10004C8F000046F +:1016100010B5F0F7ACFA024901200968884710BDFF +:10162000B0F10004030008001100002B61CD7655D5 +:1016300001000000F40102A0000200002CBFA5FE82 +:1016400010B507D0022B08D0032B0DD1EEF720FFE9 +:10165000002010BDEEF771FE10BD044A1278002A7A +:1016600002D1EEF702FF10BD062010BD90E000048D +:10167000203052E20400005A203062E23002A0E141 +:10168000110380E13112A0E11EFF2FE13103A0E13F +:101690000010A0E31EFF2FE1194930B417220A60A1 +:1016A00036224A60174A184C0021030C8D001B1883 +:1016B0005351164B491C584300193729F5DB30BCF0 +:1016C00070470120E8E770B40D4C0E4D606821684A +:1016D00083008E00EA58AE59491E401E9219EA5006 +:1016E00036230029216002DA2360606003E00028CD +:1016F000606000DA6360500070BC40087047000012 +:10170000446300B00CFB00B0E119D666CD0D0100BA +:1017100010B4042A0ED303000B439B070AD108C858 +:1017200010C9A34202D1121F042AF8D2A34201D049 +:10173000001F091F002A02D1002010BC7047D307E8 +:1017400001D0521C05E003780C78401C491CA342D0 +:1017500007D103780C78401C491CA34201D1921E8A +:10176000F1D1181BE9E700000000A0E1230000EB25 +:1017700003002DE9830000EB0300BDE84B0000FAF5 +:101780000F002DE9820000EB0F00BDE81CC09FE5B3 +:101790000FC08CE001001CE30DE08F120FE0A001F0 +:1017A0001CFF2FE101C08FE21CFF2FE100F01CF8AD +:1017B000DD14FEFF01402DE90000A0E16A0000FAFF +:1017C0000140BDE8000000EA0000E0E30000A0E105 +:1017D0000C109FE51800A0E3563412EF1EFF2FE116 +:1017E000C40100002600020010B5C046C046040037 +:1017F000C046C0462000FFF7DEEF10BC08BC18470B +:101800000E40A0E1670000EB04E0A0E101402DE9FB +:101810007C0000EB0040A0E10140BDE813402DE951 +:101820000100A0E3121DA0E3081084E5000084E598 +:101830001340BDE80010A0E1040084E588EB9A584D +:1018400001000000F00302A000020000D8571B4373 +:101850000EF0A0E110402DE903002DE96E0000EB31 +:101860000040A0E10300BDE8042094E50D30A0E1B4 +:1018700000E082E003005EE1002081E50B00008AC9 +:101880000E3093E0011A8EE26330A0E1071081E28E +:101890000730C3E30710C1E3030051E10310A08147 +:1018A000041084E51040BDE8020041E01EFF2FE176 +:1018B0000020A0E10000A0E30000A0E11040BDE88E +:1018C0001EFF2FE1F0B585B0C046C04605000C00F4 +:1018D00000F0C4EB002001950294C046C04603907E +:1018E00001A8DFF716EE040001A80D00009303C85D +:1018F0001600C046C046C046C046FFF7ECFE0021B9 +:101900000800C046C046070000F090E8049000219F +:1019100007600800C046C046411C04984160002191 +:101920000800C046C04601000498816000210800FC +:10193000C046C04601000498C16000210800C046AE +:10194000C046010004980161C046C046C046C0467A +:10195000C046C046C046C046C046C046C046C04657 +:10196000C046C046C046C046C046C046009B05B003 +:101970002000049C29003200A646F0BC01B070474C +:1019800010B5C046C0460020C046C046C046C0464E +:10199000C046C04610BC08BC184700000000E0E389 +:1019A0000210E0E31EFF2FE110402DE90000A0E14E +:1019B0001040BDE81EFF2FE11EFF2FE10E50A0E1F9 +:1019C000270000EB05E0A0E10050A0E10700C0E324 +:1019D0000D10A0E10A30A0E100D0A0E160D08DE2BE +:1019E00020402DE9150000FB2040BDE80060A0E389 +:1019F0000070A0E30080A0E300B0A0E30710C1E303 +:101A000005C0A0E1C009ACE8C009ACE8C009ACE879 +:101A1000C009ACE801D0A0E11EFF2FE104009FE562 +:101A20001EFF2FE11EFF2FE1F8FB00B004009FE531 +:101A30001EFF2FE11EFF2FE108FC00B010B410BC08 +:101A400070471FB500210A000B000C00FCBE532399 +:101A500001000000EC0502A0000200006C7762F8B3 +:101A600068461EC0352080020090E6F788FA019093 +:101A700068460FC804B010BD00009FE51EFF2FE1AF +:101A8000E8FB00B004009FE51EFF2FE11EFF2FE1E1 +:101A9000ECFB00B010B5E0F2B4EF10BD802810B53B +:101AA00002D1E0F2AEEF10BDE0F2B4EF10BD0F488E +:101AB00070B504680E4EA10706D500210161F26CD5 +:101AC000012090470220844300250AE0E00706D069 +:101AD000A8003258002A02D021002800904764084C +:101AE0006D1C002CF2D1002070BD0000009000A8F9 +:101AF000840C0200913082E00300A0E10210A0E11A +:101B00001EFF2FE100A0004750129FE5001091E555 +:101B1000D100A0E300F021E101D0A0E174129FE523 +:101B200034229FE5DB00A0E300F021E1021081E018 +:101B30000310C1E3041041E201D0A0E100A0A0E342 +:101B400000B0A0E318229FE5D200A0E300F021E15D +:101B5000021081E00310C1E3041041E201D0A0E1D2 +:101B6000D300A0E300F021E1E8319FE5001083E518 +:101B7000E0119FE5000091E5040080E2E8219FE587 +:101B8000000082E510229FE510029FE52C0082E50F +:101B90000700A0E3300082E50900A0E3000082E531 +:101BA0000B10A0E3101082E50130A0E3243082E5A1 +:101BB000283082E5E8219FE51030A0E3083082E577 +:101BC0001EFF2FE10100A0E30E10A0E1840000EB56 +:101BD000FEFFFFEAFF402DE900004FE101002DE983 +:101BE000C0119FE5002091E51F2002E2B8319FE57A +:101BF000823193E70FE0A0E113FF2FE1A8019FE5F9 +:101C00000810A0E3920102E00410A0E3012082E0AA +:101C1000021090E724209DE5012082E024208DE53C +:101C20000100BDE800F069E1FF80FDE80200A0E3EB +:101C30000E10A0E16A0000EBFEFFFFEA0300A0E344 +:101C40000E10A0E1660000EBFEFFFFEA0400A0E337 +:101C50000E10A0E1620000EBFEFFFFEA908A005B3D +:101C600001000000E80702A000020000989FDC4588 +:101C70004A830BEAFFF725FF52480047FF402DE952 +:101C80000E00A0E11F84FFFAFF40BDE804F05EE211 +:101C900030019FE50010E0E3001080E5001090E5C2 +:101CA00024019FE5100F01EE20F19FE5900F07EE54 +:101CB0001EFF2FE1FC009FE50010E0E30C1080E523 +:101CC000F0009FE508119FE5081080E504019FE5FD +:101CD000001090E5081081E3001080E5001090E509 +:101CE000081011E2FCFFFF0A900F07EE1EFF2FE124 +:101CF000100F11EE1EFF2FE1100F01EE1EFF2FE15E +:101D0000010050E2FDFFFF1A1EFF2FE1C8109FE502 +:101D1000A520A0E30000A0E3040081E4012052E23A +:101D2000FCFFFF1AB4009FE5B4109FE5001080E5AA +:101D3000B0009FE5B0109FE5001080E5AC009FE586 +:101D4000AC109FE5001080E51EFF2FE100000FE1C1 +:101D50001F0000E2120050E30100A0030000A013E6 +:101D60001EFF2FE1100F6FE11EFF2FE1ACFD0004FD +:101D700010000000780E000400040000E0030000E2 +:101D80009CFD000401C05EE50C0053E10330DE372A +:101D90000C30DE2783C08EE01CFF2FE13F96A0E3CE +:101DA00019FF2FE10396A0E319FF2FE1040D0200B4 +:101DB000009400A83F1F0000009000A8B0380080E9 +:101DC00058CD00B000143000002100807C170000C6 +:101DD0004400000002004000C42000806CFD0004AC +:101DE000F4FD000491060200F8FD0004B91800009B +:101DF000FCFD0004ED07020000204FE100300FE180 +:101E0000D170A0E307F021E10796FFFBFEFFFFEA98 +:101E10000E002DE900200FE1D33083E303F021E130 +:101E20000D00A0E102F021E10E00BDE81EFF2FE150 +:101E30000E002DE900200FE1D33083E303F021E110 +:101E40000E00A0E102F021E10E00BDE81EFF2FE12F +:101E50000E002DE900200FE1D23083E303F021E1F1 +:101E60000D00A0E102F021E10E00BDE83B0A1DCC0F +:101E700001000000E40902A000020000F25E79D334 +:101E80001EFF2FE10E002DE900200FE1D23083E389 +:101E900003F021E10E00A0E102F021E10E00BDE817 +:101EA0001EFF2FE104F01FE5710600B004F01FE5EE +:101EB000ED0400B004F01FE52D0500B004F01FE5AF +:101EC000B50100B004F01FE5972600B004F01FE54F +:101ED000252700B004F01FE5850000B004F01FE5E1 +:101EE000991800B004F01FE5F72A00B004F01FE5D0 +:101EF000452B00B004F01FE5230E00B004F01FE5F1 +:101F00003D0E00B004F01FE58D2B00B004F01FE57E +:101F1000312A00B004F01FE5B12E00B004F01FE537 +:101F2000190C00B004F01FE5A70B00B004F01FE58A +:101F3000872300B004F01FE5A12400B004F01FE5E2 +:101F4000AD4000B004F01FE5C94000B004F01FE54B +:101F50000B4100B004F01FE54D4100B004F01FE557 +:101F6000834000B004F01FE5BD2E00B004F01FE573 +:101F70003B2D00B004F01FE5A14000B004F01FE5C8 +:101F8000353400B004F01FE5633B00B004F01FE5FA +:101F9000594500B004F01FE5C54400B004F01FE54A +:101FA000994400B004F01FE5052D00B004F01FE5D2 +:101FB0000D4700B004F01FE5832200B004F01FE5D8 +:101FC000E72700B004F01FE5292900B004F01FE561 +:101FD000673800B004F01FE5292D00B004F01FE5BC +:101FE000F52C00B004F01FE5E72D00B004F01FE56C +:101FF000892E00B004F01FE5C94100B004F01FE5D0 +:10200000773F00B004F01FE5B74300B004F01FE5D0 +:10201000AB3E00B004F01FE5193F00B004F01FE52F +:10202000FD3400B004F01FE5714B00B004F01FE573 +:10203000194700B004F01FE5154000B004F01FE59B +:102040001B4000B004F01FE5014F00B004F01FE595 +:10205000574F00B004F01FE5A74B00B004F01FE598 +:10206000C14B00B00A49020001204B689040034375 +:102070004B604968014201D0012000E0595417EA41 +:1020800001000000E00B02A0A8000000B0E27D8685 +:102090000020002804D09100034A53585B1C535081 +:1020A00070470000C02A0080D8CB00B010402DE956 +:1020B00082FEFFEB0010A0E3001080E51040BDE8B9 +:1020C0001EFF2FE162745F7364696F0062745F6862 +:1020D000636900626C656D6278006863695F6D7545 +:1020E000785F666D006863695F6D75785F6E6663C3 +:1020F00000000000840C0200840C0200800000003C +:1021000084000000F00F0004F00F00048034000091 +:102110008400000088C900B088C900B024630000B2 +:1021200084000000401B00C0401B00C0E005000010 +:1021300084000000B8D9244501000000000000A47C +:10214000000200002A423E9878008200C000C800C9 +:10215000F000040180019001B80108027601A00F8F +:10216000A00FAC0D100EAC0DAC0DB80BB80BB80B2E +:10217000B80BB80B1844140C14310C0C1818140FAD +:1021800028140F0F2D0C0F0F0F0F142819141428DB +:102190001914141414000000565555053EC3AE041E +:1021A000B0133B05C451A1045555D504063A6D043E +:1021B000CCCCCC048CDB6804AAAAAA049E61570488 +:1021C000D8899D04E2A850045555D50C049D3604C9 +:1021D000CCCCCC0CC66D3404000000000000000024 +:1021E000D8899D0C725428049509DB0CD61238044A +:1021F00006005555060076620400AB6A0400666668 +:10220000040055550400C54E040055350400333311 +:1022100004008C2E040062270400C236FD791100F0 +:10222000DD791100D7211000B721100044EC0A001D +:1022300024EC0A006B7C0A004B7C0A0006BD0800F7 +:10224000E6BC0800F3100800D31008002A76050049 +:10225000097605003D3E05001D3E050039C4040019 +:1022600019C404008208040062080400849B05006D +:10227000749B05000040020000000000F000000018 +:102280000000010000000004F10000000040010017 +:10229000000000B0F200000000000000FFFFFFFFA0 +:1022A000FE0000000000FF010000FF0134007E007E +:1022B00035007E0036007E0037007E0003000500FA +:1022C0000100040001001D000200800103006F00F6 +:1022D000070000002D0025012E002501060040000A +:1022E00002008F012F00000130000001340038018E +:1022F0003500380136003401370034010400100085 +:1023000033000100320001002C00330139000100CC +:102310000000FF0134007E0035007E0036007E00A4 +:1023200037007E00030005000100040001003D00AD +:102330000200800003006F00070006002400150063 +:1023400025000700AE74E3BE01000000FC0100A4FC +:1023500000020000EE97E1B326005C012700520066 +:102360002D00250106000000020085002F0000015D +:102370003000000034003001040019013300010076 +:10238000320001002C000701390001002010080470 +:1023900002010101140028005000A000C800400103 +:1023A000900180022003140028005000A000C80003 +:1023B000400190018002200320032003200320031A +:1023C00020032003200328005000A000C800400183 +:1023D0009001800220032B040005400625072800F9 +:1023E0005000A000C800400190018002200320039B +:1023F0002B040005000540062507250725070001D9 +:102400000203040506070808080808080808000170 +:10241000020304050607090A0C0D0E0F0F0F0F002B +:10242000010203040405050505050505050505006C +:10243000010203040405050505050505050505005C +:10244000010203040405050505050505050505014B +:102450000203040405050505050505050505050038 +:102460000000020001000400020000020300080056 +:10247000040010000500020006000800070020000C +:1024800008004000090000006201720172000102B0 +:10249000FC1F00AAFC005402FE00360720000200C8 +:1024A000000095320200B88204003C0012001410B3 +:1024B0001400648022001E322A00010036008805C4 +:1024C0003800548042005600440003000E001225DC +:1024D0001000380012001C441400200018000F02E5 +:1024E0001C00C52120003800280004062A004001F5 +:1024F0002C003E003C0005003E0004324C008B9056 +:102500004E004C8950001E825200C58154000E803E +:1025100056000680580008066600883184002C802A +:102520008800F3018A00FB018E0004020000180CF1 +:102530000200FA10100030003A002E023C00900316 +:102540003E008C034000EE0342005E024400400760 +:102550004600220CFEC9F5BC01000000F80300A4EF +:10256000000200001A7F5F0E480004114A005E025C +:102570004C0040074E00220C500004115200210C68 +:10258000540003115600220C580004115A00820D09 +:102590005C006412030007010F021F03FF04000028 +:1025A000581856165C145A1261105F0E890CFF0AF7 +:1025B000D009000F2000F000F00406000104000024 +:1025C000FF00000003E100000F00000042040004CF +:1025D000DD4201002D430100E5420100F742010008 +:1025E000094301001B430100354301005943010029 +:1025F00000000000000000005D4301008343010073 +:102600003D3E0100A54301004D3E01001018202869 +:10261000304060800000000000000000000000006A +:1026200000000000000000000000000000000000AA +:102630004002000020070000C0100000202400001D +:10264000C04A000020980000C0320100206802004B +:1026500020680200240E0100240E0100240E010057 +:10266000240E0100240E0100240E0100240E01009E +:10267000240E0100240E0100240E0100240E01008E +:10268000240E01007C1A000048C900000000000070 +:102690007C1A0000240E0100240E01009038040072 +:1026A0006C2A03009038040090380400903804002D +:1026B000903804007C1A000048C90000240E010074 +:1026C0007C1A000000000000240E01009038040075 +:1026D0006C2A0300903804009038040090380400FD +:1026E000903804000100000000000000020000001B +:1026F00002000000030000000300000004000000CE +:1027000004000000090000000A00000005000000AD +:10271000060000000700000008000000080000009C +:102720000900000006000000070000000100000092 +:102730001A000000020000001B000000030000005F +:102740001C000000010000000D000000020000005D +:102750000F00000003000000100000000400000053 +:102760001100000079D824AA01000000F40500A49B +:10277000000200000387817E0500000013000000B6 +:102780000600000014000000010000001500000019 +:102790000200000017000000030000001900000004 +:1027A0002300000074050004090000000000000080 +:1027B0000000000024000000BC050004030000002D +:1027C000000000000000000021000000D40500040B +:1027D00006000000000000000000000022000000D1 +:1027E00004060004030000000000000000000000D8 +:1027F0009CED0004B0ED0004D8ED0004C4ED00042D +:1028000044060004580600041C06000430060004B8 +:10281000200E00040C0E00040183010002C24D6171 +:102820007276656C6C0001040511132122232401CA +:1028300001000000BF0000000200000000000000D6 +:10284000000000000501000004000000010000007D +:1028500000000000C40600040501000001000000A3 +:10286000000000000000000005010000030000005F +:102870000100000000000000E8060004050100005F +:102880000004070A01000400FC060004FC06000422 +:1028900001040000DE020001000000000000000052 +:1028A0000501000001000000010000000000000020 +:1028B00020070004050100000400000000000000E3 +:1028C00000000000050100000400000000000000FE +:1028D00000000000050100000100000000000000F1 +:1028E00000000000050100000500000001000000DC +:1028F0000000000064070004050100000100000062 +:10290000010001000000000078070004050200003B +:10291000A0000000010001008C070004000000007E +:1029200002040000FFFF02FE0000000000000000A3 +:10293000F502000100000000A007000405010000EE +:102940000100000000000000000000000501000080 +:10295000FFFFFFFFFFFFFFFF080000000000000077 +:10296000CC07000405010000020000000000000088 +:10297000000000008D1A0DA201000000F00700A465 +:1029800000020000F76F3FC30501000006020506C4 +:1029900001000300F5070004F40700040101000032 +:1029A0000100000000000000000000000501000020 +:1029B00004010700010002001908000418080004BF +:1029C000040100000F000000010001002C080004B9 +:1029D0000000000002040000A40300010000000049 +:1029E00000000000050100003D00000001000100A2 +:1029F000500800040000000002040000B4030001BD +:102A000000000000000000000501000001000000BF +:102A100000000000000000000501000008000000A8 +:102A2000010000000000000084080004050100000F +:102A30002F000000010001009808000400000000C1 +:102A400002040000F4030001000000000000000088 +:102A5000050100003000000001000000000000003F +:102A6000BC08000405010000110000000200000085 +:102A700000000000D0080004050100000000000074 +:102A8000000000000800000000000000E40800044E +:102A9000050100000000000001000000000000002F +:102AA000FC08000405010000000001020300000012 +:102AB00001000400110900041009000401010000D4 +:102AC00000000000010000000000000028090004D0 +:102AD0000501000001000000010001003C090004A4 +:102AE00000000000020100000000010001000200DF +:102AF0005109000450090004010100000000010018 +:102B000001000200650900046409000401010000DD +:102B100000000100010002007909000478090004A6 +:102B20000101000000000100010002008D09000405 +:102B30008C090004010100000100010203040505E5 +:102B40000708090A0B0C0D0E0F0000000100100011 +:102B5000A1090004A0090004010100000200010213 +:102B6000030405050708090A0B0C0D0E0F000000F1 +:102B700001001000C5090004C4090004010100009F +:102B80000000010081DD93CA01000000EC0900A4EF +:102B90000002000030763D9E01000200E9090004B9 +:102BA000E8090004010100006400000004000400C2 +:102BB00000000000FC090004050100000000010005 +:102BC00001000200110A0004100A000401010000C3 +:102BD0000A00000001000100240A000400000000B7 +:102BE00002040000FFFF0000440B00045C0B000423 +:102BF000740B00048C0B0004A40B00040C0D0004E7 +:102C0000226300B09D5000B0EB5000B03D3E01008B +:102C1000095100B02B5100B0226300B0854F00B0C5 +:102C2000E54F00B03D3E0100035000B0255000B01C +:102C3000940C0004EC0B00046C0D0004040C000464 +:102C40004C0C00041C0C0004640C0004EC0B00048D +:102C50007C0C0004C40C0004DC0C0004F40C000424 +:102C6000040C0004EC0B00041C0C0004C40C000455 +:102C7000DC0C0004F40C0004340C0004EC0B000425 +:102C80006C0D0004AC0C0004EC0B00046C0D000493 +:102C9000BC0B0004D40B00046C0D0004240D0004D4 +:102CA0003C0D0004540D0004226300B01394010095 +:102CB0004B9401003D3E010049940100A99401009C +:102CC000226300B01DE3010009E501004FE30100AC +:102CD00007E501006FE40100226300B0155F010009 +:102CE000AF5F0100AD630100D563010035610100F4 +:102CF000226300B0E9640100373E01006D65010008 +:102D0000453E010071650100226300B079FF0100BA +:102D1000373E010015000200453E0100D7000200C9 +:102D2000226300B0E94E00B0373E01003D3E010095 +:102D3000453E01004D3E0100226300B009690100DB +:102D4000373E01007D6A0100516A0100636A01009B +:102D5000226300B04D490100F54801008B4A010093 +:102D6000453E0100AD4A0100226300B0DF4A010088 +:102D7000373E01003D3E0100453E01004D3E010051 +:102D8000226300B05D3E0100373E01003D3E010080 +:102D90005F3E0100C3D1C3FB01000000E80B00A4AB +:102DA00000020000C49E8323673E0100226300B03E +:102DB0005D3E0100373E01003D3E01005F3E0100E7 +:102DC000673E0100226300B0EF660100373E01005C +:102DD00027680100453E01002D680100226300B014 +:102DE00041660100373E010047660100453E010093 +:102DF0004F660100226300B04B010200373E010024 +:102E000073010200453E010077010200226300B019 +:102E100057680100373E01003D3E01005F3E010062 +:102E2000673E0100226300B0BF6A0100373E010027 +:102E30003D3E0100453E01004D3E0100226300B0D1 +:102E4000D36A0100373E01003D3E0100453E0100CE +:102E50004D3E0100226300B0D9010200373E01005F +:102E60003D3E0100453E01004D3E0100226300B0A1 +:102E7000F14E00B0373E01003D3E0100453E0100ED +:102E80004D3E0100226300B0EDDF010021E00100B2 +:102E900073E00100453E010089E00100226300B0BB +:102EA00009E0010043E001003D3E0100D9E00100DE +:102EB000E1E00100226300B00BE0010065E00100E9 +:102EC0003D3E0100453E0100F7E00100226300B0F5 +:102ED0006F870100373E01003D3E0100453E010085 +:102EE0004D3E0100226300B0C3870100E18801006C +:102EF0007D880100453E01008D880100226300B0FD +:102F00005D3E0100E78A01003D3E0100DF8A0100CD +:102F1000B7890100226300B0238B0100A98B010057 +:102F20003D3E0100A78B0100578B0100226300B0DA +:102F3000553E0100373E01003D3E0100453E010087 +:102F40004D3E0100020000003A00000004000000B5 +:102F50003B000000050000003D00000003000000F1 +:102F60003E000000060000003F00000001000000DD +:102F700040000000110000004100000012000000AD +:102F800042000000130000004300000003000000A6 +:102F900045000000040000004600000002000000A0 +:102FA00047000000BE21A2E001000000E40D00A4E3 +:102FB00000020000DD665D530100000049000000D2 +:102FC000050000004B000000060000004C0000005F +:102FD000070000004D000000080000004E00000047 +:102FE00013000000840D000409000000554B00B0E0 +:102FF000B54A00B011000000CC0D0004080000002C +:10300000594B00B0B54A00B00100000000000000BC +:10301000000000000000000000000000F3180000A5 +:1030200004000000533100000C0000003D1A0000B5 +:10303000130000000000000000000000371800002E +:103040001F00000000000000000000006C440004AD +:103050000000000000000000000000000000000070 +:10306000FFFFFFFF1C0C020000000000A17C00001D +:10307000000000000000000000000404040404003C +:1030800002030404010003001500170017001800D4 +:103090003200190010001B008000210017003100D1 +:1030A00080003B0067003D00000048000100620016 +:1030B000DF006300C000670036006800640069003C +:1030C000B4006F005F0073009100B500B400B6005B +:1030D000B400B9005400BA004C00BF001000C40096 +:1030E0006900C8000000D0001600D800C100E4004C +:1030F0002A00280153002901E8002A014800340170 +:103100001C0035011F004001400043010000440144 +:1031100083004C01000045014C005901C4005A01D4 +:1031200024005B0143005C01A2005D01D2005E014E +:10313000C2008C01BF008B010000BF018800C001EC +:103140005300C901C100CB01FF00DA011500DB010A +:103150008300E3010A0010020400FF0F00000000DA +:10316000000000000000000000000000000000005F +:10317000000000000000000000000000000000004F +:10318000000000000000000000000000000000003F +:10319000000000000000000000000000000000002F +:1031A000000000000000000000000000000000001F +:1031B000000000008BC46C8601000000E00F00A43A +:1031C00014000000A1DEDB46000048000000C8003B +:1031D0000200FF0F000000006ADF1473010000000E +:1031E00010E500A400020000802DA91273E88009F8 +:1031F000CAE6997657A636D99BBCC4EA1227BCCB3F +:10320000B4BC6F1F60BAA1C43CA1808D0000000057 +:10321000A086010000000000000000000000000087 +:10322000000000000000000000000000000000009E +:10323000000000000000000000000000000000008E +:10324000000000000000000000000000000208FF75 +:10325000200300000000010000000000000000004A +:10326000F401FA00960064004B0032001E001400C6 +:1032700000000000000000000000000078060700C9 +:10328000FD03FD030000000000000000000000003E +:10329000000000000000000000000000000000002E +:1032A000000000000000000000000000000000001E +:1032B00000000000000000020100000000060600FF +:1032C00000000000000004000000000000000000FA +:1032D00000000000000000000000000000000000EE +:1032E00000004006600000830000000000000000B5 +:1032F00000000000000000000000000000000000CE +:1033000000000000000000000000000000000000BD +:1033100000000000000000000000000000000000AD +:10332000000000000000000000000000000000009D +:10333000000000000000000000000000000000008D +:10334000000000000000000000000000000000007D +:10335000000000000000000000000000000000006D +:10336000000000000000000000000000000000005D +:10337000000000000000000000000000000000004D +:10338000000000000000000000000000000000003D +:10339000000000000000000000000000000000002D +:1033A000000000000000000000000000000000001D +:1033B000000000000000000000000000000000000D +:1033C00000000000000000000000000000000000FD +:1033D00000000000000000000000000000000000ED +:1033E00000000000000000002D2D84CD0100000031 +:1033F0000CE700A4000200000D916D5A01000000CE +:1034000000000000000000000000040000FF1400A5 +:10341000E0FF0400000000000000000000000000C9 +:10342000000000000000000000000000000000009C +:10343000010101020203040346064748494A4B4C76 +:103440004D4C4E4F1011121314151615171810115C +:1034500012131C151E1D1F2021191A1B1C1D1E1DB9 +:103460001F20101112222315242526272811122986 +:103470002A1516152B2C000000000000000000008B +:10348000281112292A1500000000FE50FE51FE529C +:10349000FE000000FEFE30FE001516151700FE2986 +:1034A000FE29FE53FE002B00FEFE32FE32330000EA +:1034B000002C4F3C07040F06FF0800000F42AE1718 +:1034C0000078000000001EFF000000000000000067 +:1034D000000000000000000000000000032C32008B +:1034E00000000000000000000000000000000000DC +:1034F00000000000000000000000000000000000CC +:1035000000000000050000000001000000000000B5 +:1035100001000000000000000000000000000000AA +:10352000000000000000000000000000000000009B +:10353000000000000000000000000003112D170033 +:10354000000100000000000000000000000000007A +:103550000000FFFF0000FFFFA00F000000000000C0 +:103560000000000000000000000000000800000053 +:10357000000000000000000000000000000000004B +:10358000000000000000000000000000000000003B +:10359000000000000000000000000000000000002B +:1035A00000000000000000001800000005100100ED +:1035B000000000000000000000000000C8CA000079 +:1035C00008000000F96432007FD33200A5D3320036 +:1035D0004D743200935B32000000000000000000D8 +:1035E000FD023200CF7532004B7B32007979320018 +:1035F0000000000000000000FCB32D4401000000AA +:1036000008E900A400020000B3DC15F2000000008D +:10361000EF6232000000000000000000FA00FA0033 +:103620000A00110001010100000000000400000078 +:10363000000000000000000000000000000000008A +:10364000000000000000000000000000000000007A +:10365000000000000300000001000000FFFFFF0366 +:10366000000000000000000000000000074F3300D1 +:10367000954F330021513300D5513300335233007D +:103680000D533300EB5333006D5433006956330050 +:10369000074F330031573300615733008F573300E2 +:1036A000BD57330053583300BB583300A359330080 +:1036B000FD593300455C3300F95C33006B5D33002A +:1036C000975E3300535F3300A96133001B62330000 +:1036D000AB6233005B64330005663300CEBA000092 +:1036E00001000000000000000000000603000100CF +:1036F0000078000000000000000000000000000052 +:1037000000000000000000000000000000000000B9 +:10371000000001000101FFFFFFFF000000000000AA +:103720000000000000000000000000000000000099 +:103730000000000000000000000000000000000089 +:103740000000000000000000000000000000000079 +:103750000000000000000000000000000000000069 +:103760000000000000000000000000000000000059 +:103770000000000000000000000000000000000049 +:103780000000000000000000000000000000000039 +:103790000000000000000000000000000000000029 +:1037A0000000000000000000000000000000000019 +:1037B0000000000000000000000000000000000009 +:1037C00000000000000001020200001008081000C4 +:1037D00009000000000000000000000000000000E0 +:1037E00008000000000000000000000016010200B8 +:1037F00000000000000000000000000000000000C9 +:10380000000000000000000098422E40010000006F +:1038100004EB00A40002000093B8767107070707C5 +:103820000707000004070A0A0D0D0D0D0003060925 +:103830000C0C0C0C00000000000000000000000058 +:103840000000000000040506020C03090D0F0A1019 +:103850000E080701110B0000C7A43300F7A43300C2 +:103860000000000000000000F9A4330003A63300AC +:1038700000000000000000001BA73300ADAC3300C7 +:103880000000000000000000EDAC330021AD33006B +:1038900000000000000000001BA73300ADAC3300A7 +:1038A000000000000000000023B4330093BB33008D +:1038B00059C0330061BC330075B53300EDBB330034 +:1038C0000000000061BC330009B2330041B3330093 +:1038D0000000000003B23300F9A4330003A6330054 +:1038E000000000000000000023B4330093BB33004D +:1038F0000000000061BC3300B5AF330021B13300DC +:1039000000000000FDB1330009B2330041B33300C1 +:103910000000000003B2330093BC33000BBD330042 +:10392000000000000000000035AE33002BAF330074 +:1039300000000000000000005BAD3300B1AD3300BB +:10394000000000000000000043BF330039BF330017 +:10395000000000000000000055AD330059AD3300F9 +:1039600000000000000000006DBD3300E1BD330029 +:10397000000000000000000002010001030102023B +:103980000001030301020001000028000000000004 +:103990000000000000000000000000000000000027 +:1039A0000000000000000000000000000000000017 +:1039B0000000000000000000000000000000000007 +:1039C00000000000000000000000000000000000F7 +:1039D0000000000000000000600E00A901020408C1 +:1039E0000000000000000000081000A90000000016 +:1039F00000000000000000000000000000000000C7 +:103A0000C0BC340000000000000000000000000006 +:103A10000000000000000000AE875B7101000000A4 +:103A200000ED00A4000200005ECC753FCCBC340069 +:103A3000D8BC3400000000000000000000000000BE +:103A400000000000E4BC3400EBBC340000000000C7 +:103A50000000000000000000F2BC3400FDBC340097 +:103A6000000105070F00000000000000953734003A +:103A70000000000000000000000000000000000046 +:103A80000000000098B0340010B0340020B03400C2 +:103A900044B03400000000000000000000000000FE +:103AA000000000000000000000026700090A00009A +:103AB000000000020078000000000000000000008C +:103AC00000000000FFFF00003500000038BC34009B +:103AD00008000000F367340000000000050000004B +:103AE00078BC340007000000000000000000000067 +:103AF00004000000000000000000000000000000C2 +:103B0000196A340034000000B0BC34000200000028 +:103B10000000000000000000000101340034010139 +:103B20000135003500010234003401010235003551 +:103B3000FF00FFFFFFFF000000000000000000008A +:103B40000000000000000000000000000000000075 +:103B50000000000000000000000000000000000065 +:103B60000000000000000000000000000000000055 +:103B70000000000000000000000000000000000045 +:103B80000000000000000000000000000000000035 +:103B90000000000000000000000000000000000025 +:103BA0000000000000000000000000000000000015 +:103BB0000000000000000000000000000000000005 +:103BC00000000000000000000000000000000000F5 +:103BD00000000000000000000000000000000000E5 +:103BE00000000000000000000000000000000000D5 +:103BF00000000000000000000000000000000000C5 +:103C000000000000000000000000000000000000B4 +:103C100000000000000000000000000000000000A4 +:103C20000801000010E10004339DDBEE01000000FC +:103C300000EF00A400020000C062A51D000000000B +:103C40000000000000000000000000000000000074 +:103C5000892C3400312C3400232C34009330340070 +:103C60009F303400612C3400D52C3400232E3400D6 +:103C700000000000CD30340095323400D9323400D9 +:103C8000413334009533340047343400FF3434007A +:103C9000513534008F353400CD363400FF363400D2 +:103CA0003D373400B1393400C3393400000000001E +:103CB00000000000DB393400E3393400673A340097 +:103CC000A93A3400ED193400FD1834007719340096 +:103CD000711A3400551834006B183400A11A3400DE +:103CE000FD1A3400EB1B34003938340053383400EB +:103CF00081383400FD383400851D34001F1E340027 +:103D00006F1E3400091F34001B23340025243400A7 +:103D1000CD243400F32434002F25340057273400F9 +:103D2000F926340071273400A9283400CD28340046 +:103D3000FF283400D51E3400072A3400D344340051 +:103D4000194534004D45340065453400F93A3400D6 +:103D5000273B3400833B34008B3C3400693D340006 +:103D60009D3D3400B1373400000000002140340094 +:103D7000A9403400F54034006942340097423400D1 +:103D8000B3423400EF4234003B43340000000000F3 +:103D9000993F340000000000000000000000000017 +:103DA0000B423400B5413400C3413400D9413400E2 +:103DB0005D643400736434009564340000000000D6 +:103DC000000000000000000000000000694D340009 +:103DD0006F4D3400754D34007F4D34008F4D3400ED +:103DE000BB4D3400F94D34005B4E3400874E340037 +:103DF00070BB3400A9623400EF623400C145340066 +:103E0000DF453400F54534000946340039463400B6 +:103E10004B46340097463400BD463400F546340026 +:103E2000B1473400E34734002948340047483400A0 +:103E30005D4834007748340022CB619201000000D5 +:103E4000FCF000A40002000036CE9BCDA94834004F +:103E5000314A3400C74834004F493400F94934002E +:103E60004F4A3400874A3400B74A3400DD4A3400F0 +:103E7000F74A3400174B3400334B34004D4B3400B9 +:103E80006B4B3400A14B3400194C3400A94C340066 +:103E9000DF4C3400034D3400D1673400CB6734006D +:103EA0001D6734000000000000000000000000005A +:103EB0000000000000000000000000000000000002 +:103EC00000000000E9573400F5573400E94E340093 +:103ED0001B4F3400AB4F340011503400C35034003A +:103EE00085513400A55034003F52340000000000DA +:103EF0007D5234009D533400B5533400D9533400FF +:103F000000000000000000005D633400876334009F +:103F10009D633400CD633400DF633400ED6334000F +:103F20000D6434002964340000000000000000002B +:103F3000115434005D54340093543400055534005A +:103F40000B5634007156340053553400DB563400A0 +:103F50006D57340089573400000000000000000055 +:103F60000000000000000000000000000000000051 +:103F700000000000ED6A34007D6A3400000000009B +:103F80008D6B3400056C34005D6C34007D6C340046 +:103F9000BD6C340075713400416D3400596D3400CE +:103FA00000000000D96D3400EF6D3400816E3400E4 +:103FB0000D6F340000000000BD70340000000000F0 +:103FC0005571340015723400157334004173340098 +:103FD00097733400A3733400CB733400FF73340041 +:103FE00039743400000000000000000000000000F0 +:103FF00000000000E16434000365340041653400D2 +:1040000085653400B7653400056634000966340000 +:104010001F6634000000000045663400516634001D +:10402000696634008D663400AF663400C9663400BA +:10403000E7663400000000000000000000000000FF +:1040400000000000695834000B21D7B501000000C2 +:10405000F8F200A400020000C226257013593400B3 +:10406000895934000D5A3400A55A3400BF5A34001F +:10407000355B3400A35B340000000000A95B340012 +:1040800000000000DD5B3400575C3400BB5C340092 +:104090000000000000000000000000000000000020 +:1040A00000000000655D3400A15D3400F75D340060 +:1040B000000000001F5E3400ED5E3400016134003A +:1040C0000961340031613400B16134000000000046 +:1040D0000000000013623400000000000000000037 +:1040E000000000000000000001EA3300BDE93300D9 +:1040F000CFEA3300A5EC330069EA33004DED33001D +:1041000003EB330037ED330013ED330097E9330051 +:10411000F7EB330085EA330017EC33009DEA3300F8 +:10412000076E3000056E30002791300001543100D9 +:1041300000000000000000000000000099BE3100F7 +:104140005FBD31002FFD3100D9F7310051BE310084 +:104150006FF4310093F43100F3BD31002DD2310002 +:10416000A1FD3100F1FD310000000000C3F4310079 +:10417000F7F5310059F9310067FD3100EFD1310019 +:104180008DBC3100E54E3100A33531005539310089 +:104190002F363100D14A3100F54A3100C53831009F +:1041A0001B363100134E31007F6D3100E535310093 +:1041B000214B3100673E31007738310000000000AC +:1041C000C551310061FF3100C9003200B5FF300038 +:1041D0002500310001003100A7003100D30031007B +:1041E000BB003100BDA731006F933100DDA8310065 +:1041F000F3A83100C9A23100C5983100DFA7310012 +:104200003BA031006F0432005D0F3200F108320034 +:10421000E3153200AB0C320073153200B12F3200BF +:10422000FD213200D3203200C53F320083383200F6 +:1042300085443200094C32004D3C3200373F320099 +:10424000914332007739320027393200134E320061 +:10425000854032008B3C3200F59ADC7C0100000086 +:10426000F4F400A400020000DBDEFB00D7623200A1 +:10427000CB963200FB6432000D8532008F9E3200F7 +:104280004B5C3200399732004D9C3200DF843200A3 +:104290001B5A3200EB983200A59B32007572320037 +:1042A0000B983200F1853200735C3200779B32004C +:1042B0008D853200C75D32000B5B3200817A32009F +:1042C000CD89320051973200515D3200EBA73200A8 +:1042D0001DAB320059C33200CBC5320011C63200CB +:1042E00013C2320073BB3200FFC332001DC532005F +:1042F0004FC9320089C532006DC23200C9C13200D7 +:10430000B3C53200E3C2320000000000000000002C +:10431000000000000000000000000000000000009D +:10432000000000000000000000000000000000008D +:10433000000000000000000000000000000000007D +:10434000000000000000000000000000000000006D +:10435000000000000000000000000000000000005D +:10436000000000000000000000000000000000004D +:10437000C5A73200D7F83200DFF83200EFF832007C +:10438000E7F832008DD23200D7E23200F9F832007D +:1043900065ED320000000000000000000000000099 +:1043A000ED3833009D0233002B393300213D3300BB +:1043B000993C3300A14033009D413300D544330084 +:1043C0001545330047433300BF42330001443300F7 +:1043D000793F33002B40330055453300BB3C33005D +:1043E00035283300B93A3300A13B3300E13C3300B8 +:1043F00011373300D537330015043300054A330035 +:10440000254A3300154A3300D94933001148330097 +:104410009F4D33002F4E33009D4933004B493300ED +:10442000A348330073493300E7483300374D330066 +:1044300099693300B1473300C14733004767330000 +:10444000354A3300DB4A33002B4C33002F4B33000B +:1044500087563300AD4C3300637130007376330000 +:10446000177333003F903300F64DB83D0100000054 +:10447000F0F600A4000200002F3645BD278433006B +:1044800000000000018A3300E38F3300FF8F330008 +:104490001B903300158B3300F5903300B18A330045 +:1044A0008F9133008FB83300159D3300D99C3300B2 +:1044B0009B9C33005F9C3300DF9F330000000000B3 +:1044C00083C333000DC4330087C2330000000000F3 +:1044D000699A330099C4330073C433004DD033005C +:1044E0004DC1330029BF33003DE4330027E23300E0 +:1044F00009E1330025E533005BE2330000000000F2 +:104500000000000087BF3300DDB233000000000070 +:10451000D5C2330069C3330087D8330035D83300A0 +:1045200019D933001DDF330091E1330083A133003B +:1045300005DA330079D6330049D73300BDD73300CD +:10454000E1D5330000000000659F330081DF3300B8 +:10455000000000006D9233007B4B33000000000030 +:1045600000000000000000000000000037013100E2 +:1045700059013100156E3000116E30000D6E3000A3 +:10458000096E300021A33300C56332009F9B3300C6 +:10459000E59D3300FD9B3300D1B53300459D3300CD +:1045A000059B33008DCA3300F5D3330055C6330065 +:1045B0002BC53300ABD53300B9CE33008FD43300D5 +:1045C00099C53300000000008BC8330041CB330095 +:1045D000EFCD330001CA33000000000067973300BD +:1045E00011F43300ADA8330091A9330061AA330060 +:1045F000590B3400490A3400B50A3400870C3400E2 +:10460000E10934003B0C34007B0C3400130C340003 +:10461000730B3400B30B3400E70B3400270C340069 +:10462000950B3400CDEF330007F5330089EF3300ED +:10463000EBF43300FFF433001FF3330037F533009E +:10464000E9F5330011F6330017F93300BDF63300F6 +:104650004BF8330029F93300FBF7330045F93300F9 +:1046600059F6330025F633009DF83300D1F83300B6 +:1046700059F933007FF93300B2C7885001000000B8 +:10468000ECF800A400020000E82F47E0AFF8330088 +:1046900009F933006FF7330095FE33006DFD3300E9 +:1046A00051FE3300BFFE330071FD33003DEE330099 +:1046B000A5EE33000000000000000000C31034002D +:1046C00067103400AF103400A51134004D103400D1 +:1046D000351134009B113400CF113400BF11340068 +:1046E000D9103400FF10340019113400ED103400DB +:1046F00000000000000000000000000013FF300078 +:10470000A5FC300015FC3000FFFB3000E1FC300060 +:1047100093FD3000B9FB3000E12F3100312631002C +:1047200075253100B32E3100672F3100392F31004C +:104730004F2F3100FB0831005B093100DF0B3100E6 +:104740007D193100F70C310065323100390C310030 +:104750004B24310053163100B71131006520310070 +:104760004B1F31008B223100D9023100F905310095 +:1047700041533100A9193100D5783100157231004B +:104780004579310041763100497731008F70310031 +:10479000757D3100C18F3100698E31000F7D310090 +:1047A00049723100D97A310025743100399F3100C6 +:1047B000079C31008D9C3100359B3100EF97310013 +:1047C000A39E31009192310095753100D5AB310037 +:1047D00019AE310065AE310049AF310089B031000A +:1047E000AFB0310031BF31001FBB310039B13100F2 +:1047F000BDBB3100E5BF310053C0310055C03100B1 +:10480000A9C131004BD43100C3C23100CDC3310046 +:104810000DCF310059C431003BC5310079C531009D +:10482000C3C73100DDC7310067C83100B5C83100EA +:1048300017D53100D1EA3100B1EB3100F1EB310095 +:10484000E1EC31002BED31007FED31001BEE31004A +:1048500071EE31008BFB310037FC310045F1310046 +:1048600077F1310093F13100E7F2310027F33100A5 +:104870005DF331008DF3310075C931009FCB3100FC +:104880008BCD310069CE31002057ED520100000080 +:10489000E8FA00A4000200001CC7F95D57CF310000 +:1048A0007FCF3100CFCF310045D031005FD0310014 +:1048B000CFD0310061D1310075D23100E3D4310065 +:1048C0002FD53100A3D531003DD8310065D8310056 +:1048D000DFD831006FD9310087D9310001DB3100D9 +:1048E0000FDB310069DB3100E7DB310017DD310020 +:1048F000D1DE3100E5E031000DE13100EFE13100C2 +:10490000E9E231008FE3310091E33100A905320083 +:1049100013053200690C3200610A32000000000009 +:1049200000000000C3393200D93B3200613532004B +:10493000973532009B483200534B32006F473200AC +:10494000E14A3200AF333200753632000000000019 +:10495000453432009745320005473200713D320040 +:10496000F13C3200153E32001F8A32002B8B3200A0 +:104970008D613200918732000000000071703200BA +:10498000DD7732004F7B32001F7D3200B37E320074 +:10499000017732007D79320073823200635E32002B +:1049A000395F320003603200B3B4320099B3320091 +:1049B00075B2320037B4320063B632005FBA3200EB +:1049C0002DBA32002FAF32002FB032006BB132005F +:1049D000E9AF3200FDB032007BB0320019CA3200BC +:1049E0000BF832003DD432002BD4320061D43200B7 +:1049F000B5F832000000000049CA32007FD432000E +:104A00002FD2320021D232000FE8330069EC32009D +:104A100061EE32008FF832000FD4320089DE3200AE +:104A2000F5133300290B33007D0D3300D31533000C +:104A30004313330043143300791033000D11330056 +:104A4000C90F3300451533006D1233004711330091 +:104A50007B1633009B16330007173300B510330065 +:104A60005719330077113300E3113300FF6B330024 +:104A7000D16D330079703300A17C3300AB79330002 +:104A8000337B3300897F33005B8933001F80330021 +:104A9000098233007D853300EE082D61010000009E +:104AA000E4FC00A4880000005982DB340000000010 +:104AB00000000000A7583000AB5830004904340013 +:104AC000D5043400000000000000000000000000D9 +:104AD000835F3000595F3000C15F3000AF5F30004E +:104AE000835E3000755E3000915E3000B18530002D +:104AF000D38430004385300000000000038A30007A +:104B0000E9883000757030000000000000000000EF +:104B10000000000000000000000000000000000095 +:104B20000000000000000000000000000000000085 +:104B3000B3778DD101000000000002A9000200003F +:104B40003402C76000F0000045030000E1030000EC +:104B5000BF03000000000000000000000000000093 +:104B60000000000000000000000000000000000045 +:104B7000410B0200E303000000000000410B0200B3 +:104B8000CF030000C1030000C1030000C103000007 +:104B9000C1030000C1030000C1030000C103000005 +:104BA000C1030000C1030000C1030000C1030000F5 +:104BB000C1030000C1030000C1030000C1030000E5 +:104BC000C1030000C1030000C1030000C1030000D5 +:104BD000C1030000C1030000C1030000C1030000C5 +:104BE000C1030000C1030000C1030000C1030000B5 +:104BF000C1030000C1030000C1030000C1030000A5 +:104C0000C1030000C1030000C1030000C103000094 +:104C1000C1030000C1030000C1030000C103000084 +:104C2000C1030000C1030000C1030000C103000074 +:104C3000C1030000C1030000C1030000C103000064 +:104C4000C1030000C1030000C1030000C103000054 +:104C5000C1030000C1030000C1030000C103000044 +:104C6000C1030000C1030000C1030000C103000034 +:104C7000C1030000C1030000C1030000C103000024 +:104C8000C1030000C1030000C1030000C103000014 +:104C9000C1030000C1030000C1030000C103000004 +:104CA000C1030000C103000000F002B808F0B2BC6C +:104CB0000AA090E8000C82448344AAF10107DA4577 +:104CC00008F0A884AFF2090EBAE80F0013F0010F44 +:104CD00018BFFB1A43F00103184700003C01000015 +:104CE000AC0100000A444FF0000C10F8013B13F037 +:104CF000070408BF10F8014B1D1108BF10F8015B35 +:104D0000641E05D010F8016B641E01F8016BF9D127 +:104D100013F0080F1EBF10F8014BAD1C0C1B09D17E +:104D20006D1E58BF01F801CBFAD505E014F8016BF0 +:104D300001F8016B6D1EF9D59142D6D37047000082 +:104D4000B370353501000000FC0102A9000200002B +:104D5000F0D7184B103A24BF78C878C1FAD8520758 +:104D600024BF30C830C144BF04680C6070470000E5 +:104D70004FF000034FF000044FF000054FF0000625 +:104D8000103A28BF78C1FBD8520728BF30C148BFAE +:104D90000B60704708F058BD10B508F05BFD4FF090 +:104DA0000001016010BDF317F417F117FA17FB1794 +:104DB000FC17FD17FF17F517F617F817F917F71770 +:104DC000FE170B0701160C00000108080000050182 +:104DD000E34300009B430000F3440000B3450000A0 +:104DE0003D460000E5450000F3440000E7460000B2 +:104DF000194700000B01040F0C080203060E000502 +:104E0000070D0A09FFC1FBE84C90728BE7B351898B +:104E100063AB232302841872AA612F3B51A8E537A4 +:104E200049FBC9CA0C18532CFD0000009C8F0000E0 +:104E300000C30000F0000000FC0100008C900000A6 +:104E400000C5000028010000FC010000B491000032 +:104E500000C80000A4000000FC01000058920000FF +:104E600000F00000B0120000FC0100009C8F000068 +:104E70009C8F00009C140000180200005892000053 +:104E800000EC0000000400001802000008A500006B +:104E900000080100A4270000180200004FF00000E5 +:104EA0004FF000014FF000024FF000034FF00004FC +:104EB0004FF000054FF000064FF000074FF00008DC +:104EC0004FF000094FF0000A4FF0000B4FF0000CBC +:104ED0004FF0000EDFF874F01D481E4901F1040187 +:104EE00001604FF0E0201C49C0F8081D1B481A491A +:104EF000096801604FF0E0201949C0F8181D1949F0 +:104F0000C0F81C1D1849C0F8201D704717481849E3 +:104F1000164A184B7047FEE700B520F0FDFA00F086 +:104F200061FF20F0D7BA00B520F0F6FA20F0F4FBCC +:104F300020F0D0BA30BF7047FEE7FEE70E480F49B9 +:104F400001600F480F49016020F0ECB865010000D6 +:104F50008BA301BF01000000F80302A900020000BA +:104F6000043FA6F600C3000038A4000000000000C3 +:104F7000C4C3000000000000000000FF0000FF406C +:104F800000EC000000F0000000EC0000F0C30000A6 +:104F900081030000F4C300000BF0000008B50020FE +:104FA00026F08EFFFF4800688047684607F0CAF980 +:104FB000FE48FD4901601F214160002181600176AA +:104FC0004176418301200EF0D7FF01200EF058FFFB +:104FD00001200FF005F8F6480068804726F028FC0D +:104FE000F54BF4481B684FF0FF32402100689847AA +:104FF00042F2391140F8141F802181800221817111 +:10500000BDF800100181014607230022102000F0A6 +:1050100059FE08BD2DE9F0470079E9490024E74E23 +:10502000A2464FF0010801EB001504F180001FFAC1 +:1050300080F9484624F0E3FC48B1308808FA04F7C8 +:1050400007433780484622F075FB285506E0308834 +:1050500008FA04F18843308005F804A0641CA4B267 +:10506000102CE2D3BDE8F08710B5D34BD1481B68B4 +:105070004FF0FF3240210068984742F2531100F18F +:1050800014044161CD48202201882171090A61710F +:10509000CB49A01D27F0FDFB214607230022BDE8D8 +:1050A0001040242000F00EBE2DE9F04FDFF80893E9 +:1050B000DFF810B383B04FF001080026BB4D4FF06E +:1050C000FF3202A9286820F09BF80028F6D1029848 +:1050D0000028F3D0016841F6F113CA1A994223D08F +:1050E00014DC012900F02C81A1F59851923900F0CF +:1050F000AF800A2940F02481014640790123801DB8 +:10510000DBF800C00022E0470296D7E7A2F5E06294 +:10511000C63A40D0012A40F013810079A849002402 +:1051200001EB0015A54F5AE0002026F0C9FE9D486E +:105130000068804701A807F005F99B4828601F20F8 +:10514000AE6068602E766E766E8301200EF014FFDE +:1051500001200EF095FE01200EF042FF94480068F9 +:1051600037006BFA01000000F40502A900020000FC +:105170001DC77886804726F065FB9348D9F8003034 +:105180004FF0FF3240210068984742F2391140F851 +:10519000141F8021818002218171BDF804100181DA +:1051A000072300220146102059E000798949884FE1 +:1051B000002401EB001504F180001FFA80FA50462C +:1051C00024F027FC48B1398808FA04F008433880F5 +:1051D000504622F0B9FA285505E0398808FA04F05B +:1051E000814339802E55641CA4B2102CE3D300F007 +:1051F000ADB804F180001FFA80FA504624F009FC93 +:1052000048B1398808FA04F008433880504622F043 +:105210009BFA285505E0398808FA04F08143398063 +:105220002E55641CA4B2102CE3D36748D9F8003083 +:105230004FF0FF3240210068984742F2531141611C +:1052400039880176090A417600F114042022614967 +:105250001A3027F028FB072300222146242000F0E3 +:105260003BFD73E0297E0024491C297681888A0A47 +:10527000052A31D00ADC012A1CD0032A63D1C1F3EC +:1052800009012D2923D121F00AFB1EE0082A2AD08A +:105290003F2A58D1C1F30901A1F180021F2A2FD85A +:1052A0007F3989B2112928BF00214C4A52F82110B8 +:1052B00088470AE0C1F30901062902D121F0C1FAA9 +:1052C00003E01D293FD121F008FB029621E033299C +:1052D00039D121F015FB1CE0C1F30901052932D1B8 +:1052E00021F01AFBF1E7C1F30902C1F309010A2910 +:1052F00008BF01243A4A52F821108847029608E074 +:10530000222902D121F025FB03E071290ED121F0E1 +:105310002CFBB8B190F805C001460CF1060C6046B4 +:105320000123DBF800C00022E0470FE07429D7D04A +:10533000752902D121F056FFC7E7E92903D121F0F1 +:105340006AFFC2E714B9287E401E2876029800281A +:105350003FF4BEAE029827F0E0F9B9E630B58DB063 +:105360000446122568460FF27C0EBEE80E10A0E837 +:105370005358CAC501000000F00702A9000200004E +:10538000E92FC63B0E10BEE80E10A0E80E109EE8F6 +:105390000E5080E80E506946204620F01BFE78B182 +:1053A0000D21E01D20F063FE50B1B4F80700B4F801 +:1053B000091020F057FE18B1E01D23F00AFE054643 +:1053C0001A4A294612682046904731E03CC5000041 +:1053D000F4E8000080C9000040C500007CC800005F +:1053E0001CC60000388D0000AC9F00000CC50000FA +:1053F000F88D00003C8D00000C0204000040020407 +:105400000000400100010100034D060100030206F7 +:1054100000800C020600800C020000F401020A0069 +:10542000800C020000FFFF020000FFFF94C5000097 +:1054300020460DB030BD70B588B00546122601A8D3 +:105440000FF2503EBEE81E10A0E81E109EE80600B7 +:1054500006C001A9284620F0BDFD90B1EB7AB5F851 +:105460000710B5F80920022B18BF032B03D1A02980 +:1054700028BFA02A05D3914203D8E81D23F023FDBD +:105480000646CB4A012112682846904706702846F6 +:1054900008B070BDC748C07D704770B5054612247E +:1054A000C5A120F097FD28B10822E91DC44827F0C6 +:1054B00004FA0024BE4A012112682846904704706D +:1054C000284670BD30B585B00446122568460FF2F7 +:1054D000F42E9EE80E5080E80E506946204620F0DB +:1054E00079FD40B12089618920F0BCFD18B1E01D33 +:1054F00023F037FD0546AE4A012112682046904749 +:105500000570204605B030BDAA48007E704710B532 +:105510000446C07906F0C6FDA54A0121126820465E +:10552000904700210170204610BD2DE9F04106464C +:1055300001250F460024680221F055FD00281CBFFC +:105540000A250C2404F11200A34BC2B21B68314699 +:1055500028469847050018BF002F04D004F1120117 +:10556000306827F088F92846BDE8F08170B5054617 +:105570009A4812240078A0B900F0DAF988B198A10D +:105580009C49A2F601000000EC0902A900020000FB +:105590002E36C466284620F027FD68B105F10E02BC +:1055A000E87905F11E03911F04F06AFF00280CBF83 +:1055B0000724002400E00C24824A012112682846B6 +:1055C00090470470284670BD70B50546884812247F +:1055D000007880B900F0B6F968B189A1284620F0BA +:1055E00003FD48B1E87905F1080104F0A4FF0028A3 +:1055F00018BF002400E00C24724A012112682846DA +:1056000090470470284670BD70B50546784812244E +:10561000007840B900F096F928B104F019FF00288D +:1056200018BF002400E00C24664A012112682846B5 +:1056300090470470284670BD70B50546002404F0FC +:10564000A9FF604A06461268022128469047047066 +:105650004670284670BD30B583B00546002101A8CC +:105660000A4606C066A1284620F0BEFC00280CBFF2 +:105670001224002434B9E87901AA05F1080104F0E4 +:105680008CFF04464F4A072112682846904700F8CD +:10569000014B062201A927F01AF9284603B030BDB4 +:1056A00030B583B00546002101A80A4606C054A1C2 +:1056B000284620F099FC00280CBF1224002434B99D +:1056C000E87901AA05F1080104F099FF04463D4A72 +:1056D000072112682846904700F8014B062201A9CD +:1056E00027F0F5F8284603B030BD70B50546122402 +:1056F00000F028F9002808BF0C2408D042A1284651 +:1057000020F072FC18B1E87905F079F804462D4ACA +:1057100001211268284690470470284670BD70B574 +:10572000054612243AA120F05FFC20B1681CC08815 +:1057300005F06CF80446234A012112682846904778 +:105740000470284670BD10B5044633A120F04CFC0F +:1057500000281CBFE01D00F05AFA204626F0F1FF99 +:10576000002010BD2DE9F04107461225B0F8076072 +:105770002AA120F039FC002818BF00250821114A71 +:1057800038461268904705704670310A81700446A9 +:10579000A6C1C50001000000E80B02A9000200003C +:1057A000DADE7ADB0121304606F0FAFD01460522F9 +:1057B000E01C27F096F83846BDE8F081080220008A +:1057C000004002200000400100040100030100012C +:1057D0004D0601000701000390C5000080C90000CC +:1057E000020100FF4D07000084C90000050100010F +:1057F0000204000040020400004001000301000315 +:1058000014C50000918F0000040100014D064D10E9 +:105810004D100000020100014D06000001010001D1 +:105820000000000001020100FFFF0000014D0A001E +:1058300001020000FF0E000010B584B034A135480D +:105840001FF00EFB344C4FF0FF33009303AB0122EB +:10585000032130481FF038FB039810F0010F02D0ED +:1058600003F034FBEFE710F0020FECD0002202A9A6 +:1058700004F170001FF0ECFC0028E4D102980168EC +:10588000A1F5D051F13902BF406880B221F058FD36 +:10589000D9E710B586B0032001248DF800008DF8FB +:1058A00004408DF8050002208DF808008DF80900ED +:1058B00004218DF801408DF80A008DF802408DF822 +:1058C00006408DF80B108DF810108DF803408DF800 +:1058D000070003900DF1010C1049CCF81000088866 +:1058E00020F0FF0008806946002021F033FD8DF88C +:1058F00008408DF809408DF807408DF80A40694648 +:10590000012021F027FD21F0CDFD06B010BD0000E3 +:10591000000000007CEA0000F4E800003ACA000041 +:10592000C7480078002808BF704710B504F048FF4A +:1059300022F011FAC34919220988DFF80CC301FBD0 +:1059400002F1DCF800C000EBC1100123BDE81040FB +:10595000002241F29671604710B5012024F005F84D +:1059600050B1002024F001F830B1032023F0FDFFF6 +:1059700000281CBF012010BD002010BD08B5B34A8F +:105980000021126841F29670904700904FF0FF326C +:105990006946AF481FF03AFD08BD2DE9F05F0646A5 +:1059A0004C3830B901000000E40D02A900020000EB +:1059B000C326A4AB00F1080541F29C3030603E20C4 +:1059C00030710220B0714FF0000B86F807B071798A +:1059D0005C46002943D94FF0010A2F19787800F06E +:1059E0003F08B87800F0010100F00209285DC0F31B +:1059F000801242EA410100F00F007970072812D2AC +:105A0000DFE800F004070A110C110F0005F804B0DC +:105A100009E005F804A006E0032000E00420285572 +:105A200001E002202855F91CB81C062226F063FF6D +:105A3000A8F106003872285D012806D1B9F1000FDF +:105A40001EBF87F808A00B20B07104EB0800001DF2 +:105A5000C4B2F079401CF0717079A042BDD8A41C8A +:105A6000E0B27071804B31461B68BDE8F05F801D6D +:105A7000032218472DE9F04F7C4FDFF8F491DFF84F +:105A8000E0A17C4D7C4E83B041F646784FF0FF326A +:105A900002A907F138001FF0E5FB0028F6D1029CAF +:105AA000002CF3D0206840452CD1207B0E2814D246 +:105AB000DAF80020218939F8100090475FEA000BDE +:105AC0001DD0217B6D48425C04F10D010BF10800F3 +:105AD00026F011FFCDF808B011E0002300932089D3 +:105AE000012301AA072123F040FD28B1019A217B5F +:105AF0001170002123F057FD3088401C3080296848 +:105B00002046884702980168A1F5B8517039B1F56F +:105B1000807F16D2808824F03FF800281CBF0268DE +:105B2000002A0ED002980368A3F5B8538F3B042BCC +:105B300002D823F021FB6AE00146104605F099FEE9 +:105B400065E002980168A1F5B852943A05D123F0B6 +:105B50005DFB029826F009FE98E7A1F5B852963A47 +:105B600018D13C480078002851D004F033FE22F0D0 +:105B7000FCF83949DFF8E4C00A88192102FB01F278 +:105B800000EBC2100123DCF800C0002241F2967144 +:105B9000E0473CE0A1F5C052703AB2F5807F02D2F6 +:105BA00006F0B4FA72E7A1F50452983A062A05D233 +:105BB000352BDF9701000000E00F02A90002000072 +:105BC00037CE1A1606F0E9F9029826F0D8FD67E7F5 +:105BD000A1F5F852473A11D10446022021F02BFAE0 +:105BE00020B94FF4806021F026FA18B12046FFF763 +:105BF000E8FE55E729682046884751E7A1F5C852D5 +:105C0000703A802A03D3A1F5F852493A02D106F03E +:105C100031FE45E723F0E7FC002802BF7088401CF6 +:105C20007080029826F0ABFD3AE738B5194A0C4669 +:105C30000146126841F27D709047009000281EBF17 +:105C40000472684623F054F938BD10B524F04BF9BE +:105C500024F082F9042023F097FE00281CBFBDE841 +:105C6000104024F001B910BD918F0000928F000008 +:105C700044C5000034C500002CE9000004C5000044 +:105C8000F4E800004E02000054C50000448E0000FD +:105C90006A02000038C50000704710B5FFF75CFCD1 +:105CA0000446032023F070FE14B1012C02D108B188 +:105CB000012010BD002010BD2DE9F0471C4E1D4FE6 +:105CC000DFF874A04FF0E0244FF000084FF0070910 +:105CD000306880473868804720B3FFF73DFC0546B1 +:105CE000032023F051FE15B1012D1BD1D0B125F0B9 +:105CF00036FDB8B922F0E5FB102813D321F011FDD1 +:105D000090B921F0C4FEC4F810806069A061D4F895 +:105D1000040D40F00070C4F8040DFFF751F9C4F809 +:105D2000109001E0FFF74CF9DAF800008047CFE768 +:105D30003CC500001CC5000040C500004DF804ED46 +:105D40009E4683B001230193944603466046DFF8E4 +:105D500060C00091DCF800C000227146E04703B04B +:105D60005DF804FB70B582B00020124E01904FF038 +:105D7000FF33009301AB012240F2FF110E481FF0E8 +:105D8000B7F8019800240028F1D006EBC40045685C +:105D9000019856F8341028421EBF00290020884779 +:105DA000019804F10104A8430190EED1DFE700005F +:105DB00014C60000488E0000D8E000002DE9F8432A +:105DC000EE2F5C6B01000000DC1102A90002000054 +:105DD00049D5BDA625F0D7FF26F043F8DFF84C8063 +:105DE000134C144D144F4FF461764FF0FF32694657 +:105DF00040461FF04BFA0028F7D100980028F4D055 +:105E000034EA000104D1296800F00F008847ECE76C +:105E10000168B1F5627F28BF06600168A1F5617174 +:105E200057F82110002918BF8847DEE7D4E90000A1 +:105E3000C0BAC0ACCCC50000908E0000F8B50F4CC5 +:105E40000F4F41F64B754FF4FA564FF0FF3269464B +:105E500020681FF01BFA0028F7D100980028F4D022 +:105E60000168A94228BF06600168A1F5FA5157F8F8 +:105E70002110002918BF8847E7E700005CC8000030 +:105E8000A08E000010B522F000FAA0F110015529F3 +:105E900006D25A49103851F82010002918BF8847F7 +:105EA000002010BD70B50446002002462060554B0E +:105EB00053480D461B68402100689847002804BFDE +:105EC000012070BDC560818808442060002070BD3D +:105ED00070B504464B4B4A480D461B684FF0FF32E5 +:105EE000402100689847C5608188084420600020F0 +:105EF00070BD70B50446434B43480D4600221B68F5 +:105F0000114600689847002804BF012070BDC56095 +:105F1000818808442060002070BD70B50446394B6C +:105F20003A480D4600221B68114600689847002831 +:105F300004BF012070BDC560818808442060002036 +:105F400070BD70B50025044605602E4B2C481B68BB +:105F50002A46402100689847002808BF012104D044 +:105F6000C5608288294610442060084670BD10B57F +:105F70000446244B22481B684FF0FF324021006842 +:105F800098470021C160828810442060084610BDF7 +:105F900010B504461B4B1C4800221B6811460068C4 +:105FA0009847002808BF012104D00021C1608288E1 +:105FB00010442060084610BD10B50446114B13482C +:105FC00000221B68114600689847002808BF01217D +:105FD0004CAF451201000000D81302A900020000D6 +:105FE000BD3D031B04D00021C160828810442060A5 +:105FF000084610BD0B494978401A704710B500B9E2 +:10600000FEE726F0CDFB08490968BDE810400847C7 +:1060100024E300007CC800001CC6000080C800000B +:1060200084C8000060C8000020C6000010B54FF40E +:106030000A514CF6801026F033FC044902480860EF +:1060400004490348086010BDD70C00006CC500006F +:10605000010900001CC500000B490978002908BF90 +:1060600070474FF000510028D1F8540D0CBF20F4B8 +:10607000704040F48050C1F8540DD1F8540D40F4F4 +:106080000070C1F8540D7047CC8E000070B582B01E +:10609000FF4D6B68187F401CC4B2032C0AD2DA7E15 +:1060A0004FF0010C0CFA04F10A4203D1641CE4B273 +:1060B000032CF7D3022C07D90220187504F07DF8C1 +:1060C00000F01BFB02B070BD694601A821F060FC26 +:1060D000BDF80000698840F2E246084400F2E14061 +:1060E000B0FBF6F001990144A868491C8268C068B9 +:1060F000A1EB4201404201EB4000002805DD04F025 +:106100005CF800F0FAFA02B070BD6868047790F8A5 +:10611000251090F8240021F0CCFEDE4925340968D2 +:10612000E0B28847DC48008821F09CFC6868007E6B +:1061300001281EBF0428D948006801D1E8680C3046 +:1061400021F084FC6868007E01280AD0BDF80010A8 +:10615000019A01F50571B1FBF6F11144296103289B +:1061600003D04421022021F007FECD49A86822F087 +:106170008FFA2021012021F04EFC02B070BD10B535 +:106180000A680846062A18BF10BDFFF77FFF0020E7 +:1061900010BD2DE9F0470A688146DFF808834B6897 +:1061A00082B00846082A36D00D26BF4FA8F1180540 +:1061B000092A54D00A2A1CBF02B0BDE8F08713F4A4 +:1061C000003F00F0B881D8F80000DFF8D0A200F05E +:1061D0000F00B64C032840F0428120680622DAF80E +:1061E000EFAA3CB301000000D41502A90002000090 +:1061F000A4C5DD6B0010801D26F0F6FA002840F0E3 +:106200003881686890F8271090F8260021F05BFE2E +:10621000AC48006821F024FC012021F030FCAA49A0 +:10622000484622F03FFA00F08CB921F043FCA8F870 +:1062300000009E48D8F800100068C1F3C013C0F3F6 +:1062400080129A4209D100F00F02012A0BD1C0F34B +:10625000C010C1F38011884205D003F089FFFFF719 +:106260001FFF00F06EB90021022021F08FFD00F029 +:1062700068B9286AFF2101700021817021F01DFC9E +:1062800069680446087E914A4FF0010900283CD015 +:10629000012804D002287ED0042840F05281D8F88A +:1062A000000000F00F03052BD7D12388B1F81EC0E2 +:1062B000634501BF6388B1F820C06345A38804BF6C +:1062C000498C8B4200F03D8111780029C5D0C0F384 +:1062D0008010214604F0DFFB0028BED001212046BB +:1062E00004F01AFB296AFF280870B6D03A6800FB50 +:1062F00006F002EB80002288028162884281A28837 +:10630000828181F8029000F01CB9D8F8001001F0E9 +:106310000F00032818BF05289FD11078002845D00A +:10632000C1F38010214604F0B6FB00283ED00121C5 +:10633000204604F0F1FA296AFF2808708DD0D8F8B9 +:10634000001001F00F01032904D16A68527F12F096 +:10635000010F05D1052910D16968497F01290CD9A0 +:106360003A6800FB06F002EB8001891C12F820005D +:1063700022F0C1FB00283FF470AF296A3A68087820 +:1063800000FB06F002EB80002288028162884281D5 +:10639000A288828100E023E0D8F8000000F00F001E +:1063A000052808BF81F8029000F0CBB8D8F80000AB +:1063B00000F00F01032904D16A68527F12F0010F27 +:1063C00005D1052944D16968497F012940D9C0F325 +:1063D0008010214622F08FFB00283FF43EAFB0E052 +:1063E000D8F8000000F00F0103297FF436AF1178D0 +:1063F000F07C73FB01000000D01702A9000200002E +:10640000502D63D600292ED0C0F38010214604F011 +:106410004CFB40B30121204604F088FA296AFF288A +:1064200008703FF424AF6968497F11F0010F0CD068 +:106430003A6800FB06F002EB8001891C12F820008C +:1064400022F063FB00283FF412AF286A3968007815 +:1064500000FB06F001EB8000218801816188418109 +:10646000A188818177E06868407F10F0010F72D0C9 +:10647000D8F800002146C0F3801022F046FB002827 +:106480003FF4F5AE67E0D8F8000000F00F000528F3 +:106490005FD120680622DAF80010801D26F0AEF9E0 +:1064A000002856D1694601A821F086FABDF80000FF +:1064B000B0F5E57F16E00000D08E00008CC500002E +:1064C000E48E000094C80000A8A00000E88E000040 +:1064D000948F00009CC8000098C80000C0A0000075 +:1064E000918F000024BFA0F5E570009005D200F563 +:1064F000467000900198401E0190286A8178012919 +:1065000017D10078396800FB06F001EB8001891C87 +:106510000622206826F021FA286A3968007800FBF4 +:1065200006F011F82010D8F8000061F38610C8F8C2 +:106530000000B8F80020BDF800102368019823F08F +:106540006BF969680220087503F04BFE00F0E9F86A +:1065500001E0FFF7AFFD002002B0BDE8F087B3F522 +:10656000001F08BF03F00EFEF3E710B5044608460F +:1065700002684968062A18BF10BDFB484068007EC3 +:10658000032800D011B1FFF795FD0EE0012021F0A6 +:10659000A0FAF649204622F08FF88221012021F04E +:1065A000FFFBF348008821F071FA002010BD2DE9AF +:1065B000F0470A6806460846B2F1FF3F67D0012A55 +:1065C0000DD0022A00F0AA800B2A18BFBDE8F08780 +:1065D0000021022021F0E4FBFFF76CFD57E0416849 +:1065E000002954D01022301D26F0B7F9DFF8789337 +:1065F0007068E049C9F80860C9F82010C9F80400BB +:106600006C4414EB01000000CC1902A90002000048 +:106610009734618B007E0227012818BF04280BD114 +:10662000DA4800688047C9F80C0028B9D9F8040096 +:10663000077502F0CBF934E0D9F80410087D002882 +:1066400004BFFF200877087F4FF00108401CC4B248 +:10665000032C08D2CB7E08FA04F0034203D1641C59 +:10666000E4B2032CF7D3022C18D800F07AF8D9F84A +:10667000082040F2E243108A9268B0FBF3F103FB7A +:10668000110A01EB4205D9F80410087D78B1D9F858 +:10669000100099F80020281A904205DD0F7500F0CF +:1066A0004AF80020BDE8F087087E012801D0C9F82B +:1066B0001050052003F0DEFDD9F8040004774FF4F4 +:1066C000867021F04EFBB248008821F0E9F9D9F834 +:1066D0000400007E01281EBF0428AE48006802D1D5 +:1066E000D9F80C000C3021F0CFF9AB48006821F04C +:1066F000E0F9D9F80400A949007F09682530C0B243 +:106700008847D9F80400007E03281EBF44210220D8 +:1067100021F050FBD9F80400A14980F814803046DC +:1067200021F0D4FF52462946012021F05DF9B8E757 +:1067300003F061FDB3E710B5904C9A49A06821F0D1 +:10674000C5FF6068007E012818BF042805D196495E +:10675000E068096888470020E060BDE8104002F06A +:1067600035B92DE9F84F8A4C4FF0FF0B0020CDF8DA +:1067700000B020802020A4F1140989F800008B4883 +:10678000DFF82CA20378206840F6AB3E63F30D20BF +:106790002060D9F804109AF800C00A7E9C440D27A6 +:1067A000DFF810820EEB4C1C002A02BF20F00F0015 +:1067B0002060A9F802C051D0012A03D0022A3CD09F +:1067C000042A41D120F00F0040F69742401CA9F85E +:1067D00002200C2220F47C5089F8002000F5406053 +:1067E0002060487E012818BF002806D0887E6B46AE +:1067F00001221E3104F00CF950B9D9F80410D9F86F +:106800000C00CA8B42820A8C8282498CC18225E0AC +:10681000FEDD2C0A01000000C81B02A900020000D6 +:1068200063DCDF369DF80000D8F8001000FB07F0AD +:1068300001EB8000D9F80C1002894A8242898A82D1 +:106840008089C882206840F08000206010E020F03D +:106850000F00801D2060A9F802C009E020F00F00A1 +:10686000801C20604FF4557000EB4310A9F8020023 +:10687000D9F804104C4D487E544E012840D00028D1 +:106880002FD0D9F82030002203F801BF887E1E31B6 +:1068900004F0C8F800B32068062240F040002060F1 +:1068A000D9F82000D8F80010407800FB07F001EB81 +:1068B00080010E31286826F064F8D9F82000D8F855 +:1068C00000104078062200FB07F001EB80010E313A +:1068D000306826F056F825E0D9F80400407E0228FA +:1068E0000ED120F079FD01460622286826F049F8ED +:1068F00020F072FD01460622306826F042F811E0D1 +:10690000206840F04000206020F068FD014606222B +:10691000286826F036F820F061FD0146062230682E +:1069200026F02FF8D9F80400017E012918BF0429A8 +:1069300061D1407E01280AD120F050FDD9F80C1019 +:1069400002888A814288CA81808808824AE0A0B190 +:10695000D9F820104978FF290DD0D8F8000001FBA4 +:1069600007F100EB8100D9F80C10C2898A81028AF4 +:10697000CA81408A35E002282AD120F02DFDD9F8BD +:106980000C1002888A814288CA818088088229E0A6 +:10699000D08E0000B4A00000EC8E00003C8E000001 +:1069A0004CC50000E48E000094C800009CC80000A4 +:1069B0008CC50000A8A000009CA0000054C50000E9 +:1069C00027C8000028C80000948F000098C8000065 +:1069D00020F004FDD9F80C1002888A814288CA810F +:1069E00080880882D9F80400807E00281EBF2068B5 +:1069F00040F0800020602088064908809AF8002036 +:106A0000086862F30D2020F00F00001D0860BDE84B +:106A1000F88F0000EC8E000010B503F0C7FBFF4CB0 +:106A20008CF449C401000000C41D02A9000200004A +:106A30007A240146E068017FC07E21F07AFA28219D +:106A4000002021F01AF821692289091D062003F08F +:106A500021FD30B9E1680220087500F00CFCF54812 +:106A600010BD6069417959B1F34A41F64771126826 +:106A70009047F24800688047606170B10021417121 +:106A800060690B3021F029F8E068007E012804BF1E +:106A9000822121F0A3F9EA4810BD00F0ECFBE548A3 +:106AA00010BD10B5E24C607810F0010F08BF012056 +:106AB00012D0A088B0F5807F0DD24FF6FF7101EAA9 +:106AC0004000A08021F0A9F9A188B0FBF1F201FB00 +:106AD0001200401CE0800020607010BD2DE9F041E4 +:106AE0000A680546D74C4B6882B00846082A7DD014 +:106AF000092A79D00A2A1CBF02B0BDE8F08113F43C +:106B0000003F72D021F0F3F9C94EB070706921785E +:106B1000437900F10802995490F805C06378511C3C +:106B20000CF801304379491C13F801C00CF0FC0C3F +:106B300003F801C0C44B1B78002B1EBF736A93F887 +:106B400000C0BCF1FF0F27D0C04F4FF00D0ED7F89B +:106B500000800CFB0EFC18F82CC0BCF1000F07D114 +:106B600090F805C01CF8028008F0BF080CF80280FD +:106B7000427912F801C04CF0010C02F801C01978FA +:106B80003A6801FB0EF102EB810142790B301044AF +:106B9000891C062225F0FFFE7069B378417901EB6C +:106BA000000C2168C1F3052101F10B020CF8023041 +:106BB0004279091D11444171707810F0020F08BF2D +:106BC00002200ED0B08801280AD94008B08021F0F8 +:106BD00024F9B188B0FBF1F201FB1200401CF080F7 +:106BE0000020707030E001E011E037E020F08AFF13 +:106BF0002080206800F00F00042821D0FFF751FF0B +:106C0000FFF714FF0146284621F074FD18E020F03C +:106C10007CFF04468E48062201686846891D25F0DF +:106C2000BAFEBDF800102088814201BFBDF8020005 +:106C3000566D73C201000000C01F02A900020000CF +:106C40008ECCBFFB61888842BDF8040004BFA188D8 +:106C50008842DDD1002002B0BDE8F081FFF7F0FEF0 +:106C60000146284621F050FD002002B0BDE8F08129 +:106C7000B3F5001F08BF03F0ADFAFFF71CFFEDE707 +:106C800010B50446084602684968062A18BF10BDB8 +:106C9000B1B96C48406941790B30084420F027FFB6 +:106CA0004FF4867021F07BF8012020F03AFF6E4906 +:106CB000204621F029FD0021012021F099F807E06C +:106CC000FFF7F9FEFFF7BCFE0146204621F01CFD50 +:106CD000002010BD2DE9F35F0B68644F4A68084639 +:106CE000082B12D0DFF874810D255D4E4FF0FF0A9E +:106CF000A7F11804092B1CD00A2B1CBF02B0BDE859 +:106D0000F09FB2F5802F6ED10BE020F005FF3880A8 +:106D1000386800F00F00022840F27D81062800F05C +:106D20007A81FFF78DFE0146009821F0EDFC00F01E +:106D300072B920F0F4FE8146606A80F800A098F8ED +:106D40000000002838D038684946C0F3801003F0AE +:106D5000D4FE002830D00121484603F00FFE616ABE +:106D6000FF280870DDD0E168897E012906D003295B +:106D700010D1396801F00F0101290BD0326800FBF6 +:106D800005F002EB8001891C12F8200021F0E5FEDD +:106D90000028C6D0606A3168007800FB05F001EB7E +:106DA0008000B9F800100181B9F802104181B9F8EA +:106DB0000410818100F02FB9E068807E012808D09E +:106DC000032840F02881386800F00F00012800F007 +:106DD000228138684946C0F3801021F0BEFE0028A9 +:106DE0009FD000F018B9B2F5002F08D0B2F5801F7F +:106DF00097D0B2F5001F09D103F0ECF991E7E168F3 +:106E00000220087500F041FA00F005B912F4003FC5 +:106E100087D0386800F00F01012902BF20F47C50B0 +:106E200000F5C060386021F06CF8A07060693B78B4 +:106E3000037279784172817A01F0FC01817298F8CD +:106E4000F9206C6301000000BC2102A900020000CF +:106E500086134E26002015E0F48E0000CCA0000022 +:106E60005CC500004CC50000D8A00000148F0000D5 +:106E7000918F0000948F00009CC80000F0A00000DB +:106E80000C8F0000FAB1D4F824C09CF800E0BEF1E9 +:106E9000FF0F25D032680EFB05FE12F82EE0BEF182 +:106EA000000F04BF03F0BF03037241F001018172C0 +:106EB0009CF800100B3001FB05F102EB8101891CED +:106EC000062225F07CFD606A0078FF2808D0316832 +:106ED00000FB05F011F8209001EB8000801C04E01D +:106EE0003868C0F3801920F024FEE368197E012978 +:106EF00040F0DE803A6812F00F0106D001297DD003 +:106F0000022900F0CB80062979D1E188491E1FFAB9 +:106F100081FEA4F806E0D4F814C0C2F3052194F869 +:106F2000028001EB0C0BBEF1000F8BF80B801CBF35 +:106F3000091D8CF805107FF4FEAEDFF89883C2F3CC +:106F40008012D8F80010DFF890B321F0800141EAF8 +:106F5000C211C8F80010597E022937D3636A01466E +:106F600003F801AF0022484603F07AFD98B1D8F843 +:106F70000000062240F04000C8F80000606A316856 +:106F8000407800FB05F001EB80010E31DBF80000DA +:106F900025F015FD1AE0E068407E022808D120F0B7 +:106FA00039FA01460622DBF8000025F008FD0DE065 +:106FB000D8F8000040F04000C8F8000020F02CFA9B +:106FC00001460622DBF8000025F0F9FCB8F80000C5 +:106FD00020F08EFD012020F08EFD20F0AAFD01465C +:106FE000DBF800000622801D25F0E9FCBB49009873 +:106FF00021F094FB20F025FFA18801E019E014E0C6 +:10700000B0FBF1F201FB1200401CE08038686169BE +:10701000C0F30520001D48714421022020F0F2FE3B +:10702000E068817F407F20F098FF002002B0BDE83B +:10703000F09F12F0800F02D020F0EEF901E020F076 +:10704000E9F9014660690622113025F009FC28B3F0 +:10705000074A284B01000000B82302A900020000E3 +:1070600072FBF09BE068807E10F0030F1CBF00F005 +:10707000030001283FF469AE38686169C0F3C010AD +:10708000113103F04EFD00283FF45FAE6069817A54 +:1070900041F002018172396821F47C5101F54061AF +:1070A0003960427AC1F3052122F03F020A4342725D +:1070B00038686169C0F305204318A278DA72001DB0 +:1070C000487142E6386810F0800F02D020F0AEF927 +:1070D00001E020F0A9F93A6802F00F02012AE7D195 +:1070E000014660690622113025F0C4FB0028DFD07C +:1070F000E068807E00F0030102291CBF032131EA11 +:1071000000017FF422AE38686169C0F3C01011310C +:1071100003F007FD00283FF418AE6069817A41F062 +:1071200002018172396821F47C5101F540613960B6 +:10713000427AC1F3052122F03F020A4342720B1842 +:10714000A278DA72091D4171FFE52DE9F0410A6864 +:1071500004460846B2F1FF3F16D0012A17D0022A92 +:1071600000F0A4800B2A18BFBDE8F08160492068B8 +:1071700088421ABF5F498842FFF7B1FCFFF774FCF1 +:107180000146204621F0D4FA0020BDE8F081416894 +:107190000029F9D01022201D25F01BFC564D6068F7 +:1071A00056492C616962E860007D012648B9EE808D +:1071B000AE802878401CC0B22870272884BF2520C4 +:1071C00028704F4800688047686138B9E968022034 +:1071D000087501F02DFC0020BDE8F0810021DFF8EA +:1071E00008814171A8F80010D8F800003F4F20F046 +:1071F0000F00C01CC8F80000E968497E01290BD1C6 +:1072000040F04000C8F8000020F010F901460622C6 +:10721000386825F0DEFB07E031B920F005F90146BA +:107220000622386825F0D5FBD8F8000020F47C5001 +:1072300000F54060C8F800000620E96803F04CF84B +:10724000304928780968884768690B3020F063FC6A +:10725000386820F04BFCE868007E002814BF41F23B +:107260009E6D9D5301000000B42502A9000200009C +:107270006B032EEB1A5040F623002881E0684FF094 +:10728000FF3202EB4000218A40F2712200FB02F043 +:10729000C1EB400020F0A1FDE868204906752046BA +:1072A00021F050FAA068228A4100002020F0D8FB8B +:1072B000E868007E012804BF822120F0B7FD6DE759 +:1072C00000F001F86AE710B502F0D1FF0F4C144945 +:1072D000206921F037FA606960B1417929B1114A1A +:1072E00041F647711268904702E00F4909688847E4 +:1072F00000206061BDE8104001F0A4BB108F0000C9 +:107300009CC80000E4A00000F0A00000F48E000083 +:10731000418E00004CC500008CC50000D8A00000C4 +:10732000CCA000005CC5000054C5000010B502F000 +:107330006FFF2821002020F0C8FB40F63762FF4C89 +:107340000720A168091D03F0CDF890B961680220FB +:10735000087502F08CFFFA49A06821F0F3F9F949A9 +:107360002069096888470020206101F06BFBF44820 +:1073700010BD8221012020F059FDF34810BD10B549 +:107380000446084602684968062A18BF10BD00294D +:1073900043D1EA4C6068017E00292AD0E268117866 +:1073A000FF290ED1E949062209681C30891D25F004 +:1073B0001AFB04F1140000686168C0F3801048767D +:1073C00017E0E34B4FF00D0C1B6801FB0CF103EBD6 +:1073D0008101B1F802E0A0F81CE0B1F804E0A0F8E7 +:1073E0001EE0C9880184117801FB0CF113F821100B +:1073F000417661680220087522F03EFA02F037FFFC +:10740000CF49A06821F09EF9CE49206909688847D4 +:107410000020206101F016FB05E0FFF787FF014621 +:10742000204621F08FF9002010BD2DE9F34F0B68A5 +:10743000C84E4A6883B00846082B15D0DFF818B349 +:10744000DFF80C93371DC14D4FF00D08A6F1140A5B +:10745000092B1AD00A2B1CBF05B0BDE8F08FB2F57E +:10746000802F40F0F78008E020F074FB3080306817 +:10747000D08AD80F01000000B02702A90002000046 +:107480009FEB905600F00F000228C0F09C81FFF7A0 +:1074900057FF0146039821F05FF900F094B920F0FE +:1074A00066FB0446DAF80C10FF200870DAF80410C6 +:1074B000087E002845D132683B68C2F38010C3F3D0 +:1074C000C01C6045E3D102F00F0CBCF1010F05D1E7 +:1074D000C2F3C012C3F380139A42D8D18A8B238897 +:1074E0009A4201BFCA8B63889A420A8C04BFA38860 +:1074F0009A4200F06881497E0229C8D39BF80010A7 +:107500000029C4D0214603F020FB0028BFD0012170 +:10751000204603F05BFADAF80C10FF280870B6D0AA +:10752000D9F8001000FB08F001EB800021880181F0 +:1075300061884181A1888181286806222146801DB9 +:1075400075E0487E022845D39BF80000002841D012 +:1075500030682146C0F3801003F0F7FA002839D0D4 +:107560000121204603F032FADAF80C10FF280870E7 +:107570008DD0D9F8001000FB08F001EB8002921CBE +:1075800011F82000114621F010FB00283FF47FAFD6 +:10759000DAF80C00D9F800100078062200FB08F099 +:1075A00001EB80002188018161884181A18881816E +:1075B00028682146801D25F020FADAF80C00D9F859 +:1075C0000010007800FB08F011F820C001EB8001EA +:1075D000891C0CE030682146C0F3801021F0E5FAE8 +:1075E00000283FF454AF30682146C0F3801CDAF81D +:1075F0000400807E0228C0F0E680DAF80C30FF201C +:1076000003F8010F0022604603F048FA98B1386889 +:10761000062240F040003860DAF80C00D9F800107B +:10762000407800FB08F001EB80010E31286825F05E +:10763000E4F900F0C8B8DAF80400807E022807D127 +:107640001FF006FF01460622286825F0D6F9BAE0A9 +:10765000386840F0400038601FF0FCFE014606220A +:10766000286825F0CAF9AEE0B2F5002F09D0B2F5CE +:10767000801F3FF40CAFB2F5001F18D102F0D2FD0D +:10768000C353D70F01000000AC2902A9000200007B +:1076900058F2920B05E7DAF804100220087502F0A0 +:1076A000FAFD3149DAF8080021F060F82F49DAF8DC +:1076B0001000096888470020CAF8100001F0D6F9C8 +:1076C0008BE012F4003F3FF4ECAE306800F00F00A6 +:1076D000012831D1DAF8101006221231286825F07D +:1076E000E7F848B3DAF80400807E0228FFF4D9AE48 +:1076F0009BF8000000283FF4D4AE3068DAF8101090 +:10770000C0F3C010123103F02AFA00281EBFDAF8C5 +:107710000C004078FF283FF4C4AED9F8001000FBFD +:1077200008F001EB8000DAF810102430123103F079 +:1077300011F900283FF4B5AEDAF80400007E012804 +:1077400002BFDAF80C000078FF2821D1DAF8101017 +:10775000286806220C31801D25F059F9386820F080 +:1077600080000FE01C8F0000FCA0000054C500004A +:1077700008A100009CC80000948F0000308F00001A +:10778000918F00003168C1F3801140EAC110386068 +:10779000388820F0D5F901A902A820F067F9BDF8D2 +:1077A000040040F2E24100F5FB60B0FBF1F0029909 +:1077B00008440290400802F026F8296808750298EB +:1077C000400802F020F82968000A4875012020F0DE +:1077D000BAF97949039820F0C9FF002005B0BDE847 +:1077E000F08F2DE9F0410A6804460846B2F1FF3FE8 +:1077F00000F0DE800025714E012A0ED0022A00F032 +:10780000CA800B2A18BFBDE8F081FFF7A3FD01462F +:10781000204620F0ABFF00F0CBB84168002900F013 +:10782000C7801022201D25F0F2F860686449B4601A +:10783000F1607060007D38B93078401CC0B23070A3 +:10784000272884BF252030705E480068804730615B +:1078500038B971680220087501F008F90020BDE808 +:10786000F081594F3D803868584D20F00F02521D6D +:107870003A607168887E01280AD142F04000386081 +:107880001FF0F2FD01460622286825F0C0F83AE014 +:10789000BC483A2E01000000A82B02A900020000FB +:1078A000AC1A2CB6002825D0087E002835D1F36804 +:1078B000FF2003F8010F487E002200F001001C3178 +:1078C00003F000F990B138680D2140F040003860B5 +:1078D000F0680622407800FB01F04249096801EB9C +:1078E00080010E31286825F09CF816E07068807ED3 +:1078F000022807D11FF0C0FD01460622286825F0A6 +:1079000090F80AE0386840F0400038601FF0B6FD9B +:1079100001460622286825F084F8386820F47C5057 +:1079200000F50850386071680A7E92B94A7E002AD4 +:107930001CBF012A40F080000AD1286806221C31B1 +:10794000801D25F06EF87068417E386861F3C710BD +:1079500038600021072002F0E7FC234930780968ED +:10796000884730690C3020F0FEF8286820F0E6F8EF +:10797000E0684FF0FF3101EB400040F2E24100FBD4 +:1079800001F020F048FA7168012008751749204677 +:1079900020F0F6FEA068228A4100002020F07EF848 +:1079A0008221012020F060FA0CE002F07EFC1049F8 +:1079B000B06820F0E5FE0F493069096888473561F5 +:1079C00001F05EF80020BDE8F081000014A1000085 +:1079D0001C8F00003F8E00004CC50000348F00005B +:1079E0009CC80000948F00008CC5000008A1000016 +:1079F000FCA0000054C500002DE9F041002402F075 +:107A000054FCFC4D0220E9680875FB49286920F008 +:107A1000B7FEA878A0B1B5F9041091FBF0F004B25C +:107A2000E868297890F93C20C1F1FF0302FB03F2DA +:107A300004FB012109B2FF2291FBF2F180F83C1016 +:107A4000EE4E68690027A8B1418981B184801FF09A +:107A5000C1FF00F03F016869C28822F03F020A437B +:107A6000C280E74A41F645711268904701E03168EB +:107A700088476F61A86910B131688847AF610020FD +:107A80001FF080FFE86890F8261011F0200F0AD14F +:107A90000289002102201FF0B1FDE868012102895E +:107AA000A1EFB04801000000A42D02A900020000CF +:107AB000B5E2F2C602201FF0ABFDBDE8F04100F0D8 +:107AC000E9BF70B5D04E04463046C068F269816A9D +:107AD000002A67D041F00301816291880C328D5CED +:107AE0000D2D00D9FEE7032D18BF042D07D100216D +:107AF000416380F83010816380F8311030E0052D4B +:107B000011D190F8241021F0100141F0200180F8EB +:107B10002410806918301FF01EFFF068806928303B +:107B20001FF027FF1CE0062D0FD190F8241041F024 +:107B3000300180F82410806918301FF00CFFF068C5 +:107B4000806928301FF015FF0AE00B2D08D190F84E +:107B5000241021F020010A4661F3041280F8242049 +:107B6000AD48425DF068521C816A62F30C2181626B +:107B7000F06981880C3008441FF0EAFFF068008942 +:107B800024F042FD2043F068816A0CBF21F010010F +:107B900041F010018162F06890F8251021F0180181 +:107BA00010315FE0002C3DD0A288002A1EBF21F0DA +:107BB0000301491C816209D1228921F00301C2F32A +:107BC0000132012A14BF891C491C81626189A28883 +:107BD000891A1B2908DD816A21F4F85101F5D85171 +:107BE00041F0100181620FE0826A61F30C2282622F +:107BF000008924F00EFD0028F068816A0CBF21F096 +:107C0000100141F010018162F06890F8251021F018 +:107C10001801083180F82510A0880C3420441FF08A +:107C200097FF21E021F00301491C8162008924F0C3 +:107C3000CBFC58B9F0680121008924F05FFA0028D4 +:107C400002BFF068806A20F0100103D0F068806AFB +:107C500040F01001F06821F4F851816290F825108D +:107C600021F0180180F82510F068816A21F00802DF +:107C700090F82410C1F3801342EAC30222F00402F8 +:107C8000C90942EA81018162008D1FF06DFFF06831 +:107C900090F8251041F0400180F8251090F826104A +:107CA00021F0040180F8261070BD10B520F0FDF819 +:107CB000C8857FB301000000A02F02A900020000C8 +:107CC000410A4C7B5549C9680A6A801A91F82520F7 +:107CD00012F0010F8A690BD0938A92884FF0180C2A +:107CE000521C02FB0CF203FB02F383420ADA03E0AC +:107CF000D288B0EB421F05DB08890821FEF735F872 +:107D0000012010BD002010BD10B5444C6078002843 +:107D10001EBF0020607010BDE06890F8241011F0C4 +:107D2000100F0CBF40F2E36240F2637211F0200FBB +:107D30000CBF40F2B46340F234731A44C36A21F0BA +:107D40000201C3F3001341EA430180F824102169C2 +:107D5000283292B2091D012002F0F6FB002808BF6C +:107D600010BDE068816AC06A0143C1F3001010BD14 +:107D7000F8B52A4C6946E06820301FF095FEE068AF +:107D800090F8271011F0040F08D02269016A5161A0 +:107D900090F8271021F0040180F8271020F001F955 +:107DA000A18840B2084400B2A080A178491CC9B2A1 +:107DB000A170A269002A6DD090FBF1F06169888002 +:107DC0001FF01CFE00F03F0160690323C288164EBD +:107DD00022F03F020A43C280E2684FF00005D16AF8 +:107DE0008B4334D14389C3B1C1F304220C30191839 +:107DF000A0690C3024F029FEE168C86AC0F30422AF +:107E0000A0694281626993888380D388C28863F3C2 +:107E10000502C2800989018113E009E0388F000062 +:107E200020A1000054C500005CC500006A020000EB +:107E300011890181D16AC1F304214181A169616184 +:107E4000A061326841F64671A069904719E001F0DF +:107E50000302022A17D1C1F3042241890C300144E4 +:107E6000A0690C3024F0F1FDE068A169C06AC0F39C +:107E700004204881326841F6457160699047A069E5 +:107E80006061A56106E0326841F645719047A069DE +:107E9000A5616061606941890C3008441FF077FE7C +:107EA000F8BD70B5FF4C0020E168054691F825202B +:107EB00012F0400F17D112F0200F0AD191F82400D0 +:107EC000BCF5DA29010000009C3102A90002000083 +:107ED0003F11EBCBCA6AC0F38010C2F3800290421C +:107EE00018BF70BD21E091F82430D1F82CC0C3F345 +:107EF0008013CCF3800C634517D0C2F3C102002A73 +:107F000008BFE5611AD0012A02BFE5610889002196 +:107F100008D0022A12D1088924F06AFBE061E068E7 +:107F20000121008924F0FEF808E0088924F060FBB4 +:107F3000E061E0680121008924F0F4F8E16891F83B +:107F4000252022F0200281F8252050B14189002906 +:107F50001CBF82888A4204D3D84985800968884733 +:107F60000020BDE87040C0E52DE9F143DFF848830B +:107F70000025D8F80C002E4690F8241021F00801B6 +:107F800080F82410009C14F4F85F06D090F82720A5 +:107F900022F03002203280F82720C4F3C002B2EB76 +:107FA000D11F40F0F480C64B03221B68A2434FF060 +:107FB000010952D19847C8F8180000287ED0D8F897 +:107FC0000C0090F8241021F0800289EAD11142EAD5 +:107FD000C11180F8241090F8261041F0800180F83B +:107FE0002610D8F8140041890C30085C801E0C283B +:107FF00044D2DFE800F028B6060D10B6B6B6B621BA +:10800000B618D8F80C0090F8261041F0020110E0E4 +:1080100088F80190A5E0D8F80C0090F8241041F001 +:10802000300180F82410D8F80C0090F8261021F0C8 +:10803000020180F8261094E0D8F80C0090F8241083 +:1080400021F0300118E0D8F80C0090F8271021F04A +:108050000301891C80F8271083E090F8262012F095 +:10806000020F0CD014F4F85F18BF012521F0800234 +:1080700089EAD11142EAC11180F8241071E0009A16 +:1080800004F0030EC2F3042C8B4ABEF1020F5269B6 +:10809000B2F80AE029D1BEF1000F17D09847C8F80E +:1080A0001800002842D0D8F80C1091F8242022F0B3 +:1080B000800389EAD21243EAC21200E036E081F876 +:1080C0002420098941F4005101814AE021F0800314 +:1080D000924F318D01000000983302A90002000088 +:1080E000CBF9557689EAD11143EAC11180F8241001 +:1080F000008940F400501081A2F80AC03BE0BEF1B4 +:10810000000F2AD0F4441FFA8CF7B2F806E007F10A +:108110001B0CBCEB9E1F16D99847C8F8180078B105 +:10812000D8F80C0090F8241021F0800289EAD111CF +:1081300042EAC11180F82410D8F8140047811AE0EF +:108140000126022517E021F0800389EAD11143EAD4 +:10815000C11180F8241057810DE021F0800389EAD5 +:10816000D11143EAC11180F82410008940F48050F5 +:108170001081A2F80AC0D8F80C0090F8241011F071 +:10818000200F0CD05EB914F4F85F08D0816B491C45 +:10819000816302BF90F83110491C80F83110002D26 +:1081A00062D1D8F80C00C4F3800C90F8251021F0AF +:1081B000400280F82520BDF80010818590F8241039 +:1081C000C1F3801363454FD081F0400180F8241043 +:1081D00090F8263011F0010F43F0080380F82630A4 +:1081E0001EBF90F8271041F0040180F8271090F886 +:1081F000271001F00303012B04BF21F0030180F8D5 +:108200002710C2F3C101012905D002292CD1008910 +:1082100024F0F8F903E00089002123F08DFFD8F85D +:108220000C208188926AC2F30422114489B28180B1 +:108230004289914204D300218180254909688847F9 +:10824000D8F80C0090F8251011F0800F1CBF816A3F +:1082500011F4F85F08D0416B491C416302BF90F8EC +:108260003010491C80F830102846BDE8F883F8B576 +:10827000044608460968154E07290FD00A2918BF79 +:10828000F8BD04274568B5F5802F1EBFB5F5002F52 +:10829000B5F5801FB5F5001F67D159E0F06890F87B +:1082A000241011F0010F36D090F8250010F0040FC3 +:1082B00031D104F11C01081F1FF0FCFBA08B40F220 +:1082C0006A21884210D2A069401E05E0388F000064 +:1082D00058C500004CC50000A061A08B00F2E24030 +:1082E0008676FE5001000000943502A900020000CD +:1082F000D2018B0680B2A0838842EED3A08B401AB5 +:1083000080B2A083A16911F0010F1CBF00F2E2400E +:10831000A083A28BF068008901F0CFFAF06890F892 +:10832000251041F0040180F82510F06890F8251020 +:1083300011F0010F0BD021F0010180F82510008908 +:1083400021F054FBF0680021008900F04FFC00216F +:1083500002201FF0BBFDFF48C17880781FF061FE4E +:108360000020F8BDFFF7C9FC07EA8001F06890F82B +:10837000242022F004020A4380F8242072E01FF037 +:1083800039FCADF80000F06815F4003F6ED090F8AD +:10839000241011F0200F1CBF009A12F4F85F0CD0CB +:1083A00015F4803F04BFC2F3C002B2EBD11F04D169 +:1083B00000893D21FDF7F7FC54E0009810F0030F11 +:1083C000D0D0FFF7E5FD012808BFF068F0D0022803 +:1083D00048D0F06890F8240010F0010F03D1FFF7A7 +:1083E000B1FC00283CD0FFF77AFDF06890F824102B +:1083F00011F0100F1EBF90F83010406B1FF0E7FA1D +:10840000F06890F82400C0F300101FF0EDFA01208E +:108410001FF0D5FBF068816A11F4F85F90F8251021 +:1084200021F080011EBF90F82420C2F3001241EA1F +:10843000C21180F82510C849204620F0D3F9442104 +:1084400002201FF043FD00201FF0D9FBF06890F8D8 +:10845000261041F0100180F82610FFF7A7FC03E07A +:10846000FFF7A4FCFFF7FAFA0020F8BD90F824000B +:1084700010F0080F7FF476AF10F0010F04D1FFF772 +:1084800061FC00283FF46EAFF06890F8241041F0D2 +:10849000080180F8241011F0100F1EBF90F8301062 +:1084A000406B1FF094FAF06890F82400C0F30010BD +:1084B0001FF09AFA01201FF082FBF06890F8241058 +:1084C00011F0010F1CBF90F8261011F0040F0CD012 +:1084D0000089012123F03AFE0546F068008924F066 +:1084E0009BF8F0612846FFF714FB9B49204620F0DB +:1084F000751D900901000000903702A900020000DC +:1085000026E935BB79F9442102201FF0E9FC00205F +:108510001FF07FFBF06890F8261041F0100180F802 +:108520002610ABE770B50A680546914C0846052A47 +:1085300037D0062A18BF70BD4068002847D1E068D0 +:1085400090F8240010F0010F03D0FFF705FC00287D +:108550003DD0E06890F8241011F0200F1EBF90F875 +:108560003110806B1FF03DFAE06890F82400C0F3F2 +:1085700040101FF043FA01201FF04BFB7D492846B5 +:1085800020F03AF900201FF024FB822101201FF087 +:10859000A7FCE06890F8261021F0100180F8261062 +:1085A00024E04FF486701FF072FC002101201FF0C0 +:1085B00097FCE068008924F039F86B4A002807BF6F +:1085C000D1789078517810781FF027FD0EE0FFF7F2 +:1085D0009EFB042101EA8001E06890F8242022F04B +:1085E00004020A4380F82420FFF742FA002070BDFD +:1085F0002DE9F84F04460868B0F1FF3F5CD0042530 +:10860000DFF86C814FF0030A012827D0022800F020 +:108610005B820B281CBF0846BDE8F88F4968D8F874 +:108620000C0090F8262012F0100F04D0826A3AEA6B +:10863000020A00F0418211F4101F00F02D8202891D +:10864000012108461FF016F8D8F80C0090F8261003 +:1086500041F0200180F8261000F02EBA496859B385 +:108660001022201D24F019FA6068C8F81040C8F8DC +:108670000C00FFF74CFB05EA8002D8F80C004FF025 +:10868000020590F8241021F00401114380F8241011 +:1086900011F0040F05D0057500F02EFA0020BDE89A +:1086A000F88F354800688047C8F8140038B9D8F802 +:1086B0000C00057500F020FA0020BDE8F88F0C30A2 +:1086C0001FF08DFAD8F80C100120087591F82400DD +:1086D00020F00A0081F8240091F8250040F02000E5 +:1086E00081F8250091F8270020F0040081F8270088 +:1086F00091F8260020F0600081F826000020C8F8DC +:10870000332BB5D3010000008C3902A90002000010 +:10871000E1F037E61800A8F8040088F8020001200C +:1087200001F048FED8F80C0090F8241011F0300F3A +:1087300009D0806918301FF04AF9D8F80C00806918 +:1087400028301FF052F9208A40F2E242B0FBF2F1E9 +:10875000A36802FB110B01EB430300930C49D8F80B +:108760000C000968407F884700201EF075FF054611 +:1087700001201EF071FF0646E8890BE0588F0000CB +:1087800038A10000388F00002CA100004CC500006B +:108790008CC50000DFF86493C0F3812089F80000E5 +:1087A000F089C0F3812089F80100D8F80C0090F816 +:1087B000251011F0010F90F8271001F0030207D0E7 +:1087C000002A65D121F00301891C80F8271063E09D +:1087D000002A59D190F8241011F0010F1BD1008903 +:1087E00023F02EFF80B181880C30085C00281CBF6C +:1087F0000128022808D1D8F80C0090F8271021F0A1 +:108800000301891C80F82710D8F80C0090F8270085 +:1088100010F0030F40D1D8F80C0090F8241011F09C +:10882000010F14D1076A1FF07CFBC21BD8F80C00A3 +:1088300081698B8AC98802EB0312B2EB411F22BF08 +:1088400090F8271021F00301891CBED224E0D8F84B +:10885000100047691FF065FBD8F80C10C01B8A692F +:10886000938A03EB830CB0EB8C0F3EBF00EB03103D +:10887000D288B0EB421F0FD391F8270020F00300FD +:10888000801C81F8270007E001F00302022A03D1CF +:1088900021F00301491C98E7D8F80C0090F8240057 +:1088A00010F0010FE8897ED1C0F3013089F8020091 +:1088B000F089C0F3013089F80300FFF724FB4FF47F +:1088C00086701FF0EEFA5A46012000991FF02CF92D +:1088D000442102201FF00EFBD8F80C0090F8241061 +:1088E00011F0100F07D090F83010406B1FF083F894 +:1088F00001201FF087F8D8F80C0090F82400C0F38E +:1089000000101FF085F8D8F80C00826A90F8251046 +:1089100059B3E53201000000883B02A900020000C3 +:108920001518895B12F4F85F21F080011EBF90F8E2 +:108930002430C3F3001341EAC31180F8251090F8E6 +:10894000271011F0030F06D111F0080F18BF11F016 +:10895000300F14D005E011F0080F18BF11F0300FE0 +:1089600006D0C1F30112521E62F3051180F82710E0 +:10897000012108461FF065FB0121084610E03AEA94 +:10898000020A19BF99F8031099F8020099F801102A +:1089900099F800001FF055FB99F8031099F80200B0 +:1089A0001FF05DFB01201FF028F900201FF045F9A2 +:1089B000D8F80C0090F8261000E008E041F0100113 +:1089C00080F82610534920461FF02AFF88E6524AB5 +:1089D00002EB9031097889F80410F189800B02EBE1 +:1089E0009132127889F8052089F80200880B89F8FD +:1089F0000300608A4FF4867101EB80001FF05BFA80 +:108A00005A46002000991FF099F8822101201FF09A +:108A10007BFAD8F80C0090F8241011F0200F07D042 +:108A200090F83110806B1EF0F0FF00201EF0F4FF74 +:108A3000D8F80C0090F82400C0F340101EF0F2FFAC +:108A4000D8F80C0090F8251021F0040180F82510CA +:108A500090F8270010F0030F08D0012108461FF0FE +:108A6000FEFA012108461FF0ECFA16E099F805100D +:108A700099F804001FF0F3FAD8F80C00008923F0ED +:108A8000E9FD002807BF99F8051099F8040099F846 +:108A9000011099F800001FF0D4FA01201FF0CDF862 +:108AA00000201FF0AAF8D8F80C0090F8261021F04A +:108AB000100180F82610194920461FF0B1FE0FE67C +:108AC00011F4900F0CD00289002101201EF0E6FD68 +:108AD000D8F80C0090F8261041F0200180F82610FC +:108AE000D8F80C0090F8261041F0400180F82610CC +:108AF000FFF721F905EA8001D8F80C0090F824204E +:108B000022F004020A4380F82420FEF7C5FFE7E5BF +:108B1000588F000038A100003E8F00002CA10000FB +:108B200024AEF2FC01000000843D02A90002000016 +:108B30000CE0572B70B5FF4D95F87407012814BF52 +:108B400000240124FC4800688047D5F8600700280D +:108B500008BFFA48C5F864070CBF0220012085F859 +:108B600074070026C5F86067D5F8780730B1417DF5 +:108B7000002918BF017D017501214175F048006889 +:108B8000804705F5EF620121D5F864071FF020FE4C +:108B9000002C08BF70BDC5F8786720F034F9E948AB +:108BA0000068BDE87040004710B50868022808BF9B +:108BB000FFF7C0FF002010BD0A680846012A08BF61 +:108BC00000207047A0F18001012924BF00207047D8 +:108BD00000F03F00D74901EBD00191F8501700F0A9 +:108BE0000700C14001F001007047A0F1800CBCF10A +:108BF000010F28BF7047DFF850C300F03F001CF89A +:108C000002201CF803301A44520040F2712302FB88 +:108C100003F2C84B03EB800CCCF848270122002953 +:108C200003EBD00191F8503700F0070002FA00F290 +:108C30000CBF9343134381F8503770474DF804ED50 +:108C400003460A46FFF7BEFF002808BF5DF804FB95 +:108C500040F2712002FB00F24FF6FF7000EA420082 +:108C6000B44A03F03F0102EB4101A1F84E075DF861 +:108C700004FB10B50246FFF7A5FF002829D0DFF856 +:108C8000B4C202F03F020CEB821101F5E6710B69F0 +:108C9000086AA3EB5000031F54BF031F0023498938 +:108CA00093FBF1F1491C8BB20028B8BF00200CEBFC +:108CB0008201D1F8481701FB00F1A448B1FBF0F0A4 +:108CC0000CEB4201B1F84E1700EB4310084480B2A0 +:108CD00010BDA2F58070052813D29D491046096881 +:108CE0008847017F02290CD101698069C268007A36 +:108CF000A1EB520100FB01F04FF6FF7101EA0010F9 +:108D000010BD002010BD4DF804ED02460B46FFF7E4 +:108D100059FF884900281FBF02F03F0001EB4000C7 +:108D2000A0F84C375DF804FBA2F58070052828BF39 +:108D30006D299F8501000000803F02A9000200000C +:108D4000F808E9965DF804FB02F0070001EB40101B +:108D50004FF6FF7101EA8301A0F8C6165DF804FB27 +:108D6000794B4DF804ED02460B2804BF986D008A3C +:108D700019D01046FFF730FF00281FBF02F03F0058 +:108D800003EB4000B0F84C075DF804FBA2F58070DF +:108D9000052824BF00205DF804FB02F0070003EB68 +:108DA0004010B0F8C60680085DF804FB012818BF23 +:108DB0000020704770B56548002500682C46804744 +:108DC000614991F87407002818BF022805D10020D6 +:108DD000D1F864570124C1F864075E4800688047F1 +:108DE000002C08BF70BD00222846BDE8704002215B +:108DF0001FF0F8BC2DE9F05F1FF0B1F8801C4708A8 +:108E00000026741EDFF840A1A04640F2712B06EB4D +:108E100086000AEB8009D9F80050002D00F00B8184 +:108E20002A891046FFF7D8FE38B302F03F020AEB5A +:108E3000821101F5E6710B6A0869A0EB5300031F6C +:108E400054BF031F0023498993FBF1F1491C89B2E8 +:108E50000028B8BF00200AEB8203D3F8483703FB91 +:108E600000F33F48B3FBF0F000EB41100AEB420186 +:108E7000B1F84E17084482B218E0A2F580700528B8 +:108E800013D23849104609688847017F02290CD15E +:108E900001698069C268007AA1EB520100FB01F010 +:108EA0004FF6FF7101EA001200E000222B890B2B24 +:108EB00004BFDAF85800008A17D01846FFF78CFE76 +:108EC00000281EBF03F03F000AEB4000B0F84C172B +:108ED0000CD1A3F58070052828BF002106D203F02D +:108EE00007000AEB4010B0F8C60681082869DAB11D +:108EF000ABEB010101EB520191FBFBF30BFB1311F7 +:108F0000C01AABEB01013B1A89B2002B0CDD03FB4D +:108F10000B22A2F27122ABEB0101511A09B2002916 +:108F2000B8BF00218AB20021B5F80CC00B1C18BFD5 +:108F3000012363449BB2B7EB000C6DD49C426BD30E +:108F4000F09AEBD9010000007C4102A90002000068 +:108F50001D5FB491BEBB2868B8B10FE0D4CA000051 +:108F60003CC5000020C8000040C500007CC50000D2 +:108F70005E8F000020A1070078C500000069C01BBB +:108F800080B2A04288BF204604E06B89286918445B +:108F9000C01B401E012303EB830C5AF82CC0BCF10C +:108FA000000F08D0DCF810C0ACEB070C1FFA8CFCEB +:108FB000844598BF60465B1CDBB2092BEBD30228CB +:108FC00098BF02200CE0FFE740F2E240B2FBF0F075 +:108FD000EB89D5F810C06344DB1B1844A04200D8CD +:108FE000044699F8100018B19AF87507B04231D0CC +:108FF000CAF87C77CAF86857CAF880474FF6FF70FE +:10900000AAF8862700EA8100AAF88407F848CAF877 +:10901000785700688047D9F80800CAF86007002030 +:109020008AF87407F3480068804713E0C01B0028E3 +:1090300008DD844288BF0446804506D9012E18BF4A +:10904000804602E09C4238BFA046761CF6B2092E4C +:10905000FFF4E7AE8AF87567092E11D10020CAF82F +:109060006007CAF8680744465546CAF8780718F1F9 +:1090700001080CBF0320022085F8740708BF0024F4 +:109080004FF0FF3000EB4701DB4A01201FF0ABFE41 +:109090003819CAF86C07BDE8F09F70B5D74E054681 +:1090A000002404EB840006EB8001086858B10269D3 +:1090B000AA1A002A04DC427D2AB1027D022A02D1CA +:1090C000CA6829469047641CE4B2092CE9D370BDF4 +:1090D000CA49D1F87027821AB2F5C85F84BFC1F8B7 +:1090E000700722F0E3BC704770B51EF042FF01210B +:1090F000C24E01EB5005002404EB840006EB800116 +:10910000086858B10269AA1A002A04DC427D2AB113 +:10911000027D022A02D1CA6829469047641CE4B243 +:10912000092CE9D3FFF770FE96F8741703290AD0CB +:109130006FF0010101EB4001B1480268BDE87040E9 +:1091400000201FF050BE1FF072FE00220221D6F850 +:109150005ACEBCFF01000000784302A900020000C3 +:10916000E9B70A2C64071FF051FB032086F8740747 +:1091700070BD0346A848006800281EBF0A4619466D +:109180001FF044BB70472DE9F041A14F04460D4646 +:109190000026E18920690844281A48BFBDE8F0810B +:1091A00020461FF0E3FA6675294620461FF0CCFAE8 +:1091B000024607F1140120461FF0B6FA7869211A19 +:1091C00018BF012104460129E3D0BDE8F0812DE953 +:1091D000F0410E460446417D0069301A09B9002865 +:1091E00004DC801E02D5207D022869D120461FF0B4 +:1091F000BDFA0020607583480068804731462046EC +:109200001FF0A2FA05462089FFF7FAFC00282ED0AD +:10921000A0698788002F2AD060897F1C07FB00F790 +:10922000206AA6EB5000B8421BDA208920F002FF2A +:10923000B8B994F8260010F0080F12D010F0800F83 +:109240000FD194F8240010F0020F0AD1208923F0E6 +:1092500049FA30B9208923F04AFA10B96089381ADE +:10926000054494F8260020F0880184F8261020692F +:10927000A84206D194F8261011F0400F1CBF618956 +:109280000D44281A81B26089B1FBF0F0E18B0144F2 +:10929000E183A169227F897D00FB01202521B0FBAC +:1092A000F1F201FB12012177208920F09EFE607708 +:1092B0002A46574920461FF037FA5348006880472E +:1092C0005348D0F87017711AB1F5C85F82BFC0F863 +:1092D0007067BDE8F04122F0F3BBBDE8F0812DE9F5 +:1092E000F04704460569C0890E462844081A09D586 +:1092F000207F012808BFBDE8F087207D022818BF25 +:10930000BDE8F08720461FF031FA00216175207F0B +:109310003F4F01280BD1314620461FF015FA024677 +:1093200007F178012046BDE8F0471FF0FDB9701B3A +:1093300000282CDDDFF8E4E04FF0010C4FF6FF7859 +:109340004FF47A7940F6C41AA069817A491C01F079 +:109350000F0383721EF80310027A408801FB02F1AA +:10936000D555238601000000744502A900020000C3 +:10937000F04FD45C08EAC11261890CFA03F301FBD7 +:1093800009F1184208BF52425018E18B01EB8000EE +:10939000B0FBFAF10D440AFB1101701BE1830028B8 +:1093A000DCDC2A4607F128012046BDE8F0471FF023 +:1093B000C5B970B504460D460069E1890844281A0C +:1093C00048BF70BD20461FF0DBF9002060752946BC +:1093D00020461FF0C3F902462046BDE870401549FB +:1093E0001FF0ACB970B504460D460069E189084428 +:1093F000281A48BF70BD20461FF0C2F900206075D2 +:10940000294620461FF0AAF902462046BDE87040D2 +:1094100009491FF093B900003CC5000040C5000099 +:10942000F13F0000D4CA00007CC5000038D2000023 +:109430009C02000010CB000038CB00002DE9F04763 +:109440000446DFF83894407DD9F858500E4600287D +:1094500008BFBDE8F087A8682061E1890844301A98 +:1094600002D5207D022830D120461FF089F9002046 +:109470006075207E012808BF002714D01EF095FDDE +:10948000FF4900FB01F0298A01EB104087B21EF072 +:109490008CFD228D618D521A521C90FBF2F302FB5F +:1094A00013000844608140F6C410B7FBF0F800FBDD +:1094B00018702882314620461FF050F900EB080250 +:1094C00009F1500120461FF039F9D9F87007301A18 +:1094D000B0F5C85F82BFC9F87067BDE8F04722F0F9 +:1094E000F9BABDE8F08770B504460D460069E18918 +:1094F0000844281A03D5207D022818BF70BD2046D5 +:109500001FF03EF9002060756089DE49421920464F +:10951000BDE870401FF012B970B504460D460069F1 +:10952000E1890844281A48BF70BD20461FF028F979 +:1095300000206075294620461FF010F9024620469B +:10954000BDE87040D0491FF0F9B82DE9F0470D464D +:10955000CE498146096816469846089F8847040008 +:1095600008BFBDE8F08720461FF00AF920461FF02B +:10957000A9FD602501000000704702A9000200005B +:1095800004A76AE1DBF8A4F80890B08A4FF6FF71EF +:1095900001EA400060810120A0817089E0811FFA0A +:1095A00089F0A661FFF740FB002894F824000CBF67 +:1095B00020F0010040F0010084F8240069002162DD +:1095C000F07D00282DD10021E183A069817D2177E4 +:1095D00094F8250040F0010184F8251094F8260045 +:1095E00020F0080040F0040184F8261094F82500CB +:1095F00020F0400184F8251094F8240020F0C001E8 +:1096000084F8241094F8260020F0400184F82610F5 +:1096100094F8270020F0030040F0080184F8271098 +:1096200008E0A4F81E80277794F8250040F0010197 +:1096300084F825100220207525611EF0B8FC410831 +:10964000681A0028C8BF29462046FFF7D4FD95496F +:1096500020460968BDE8F04708472DE9FF5F9049BB +:109660008146096892469B46DDF844800F9F0E9E16 +:10967000109D8847040004BF04B0BDE8F09F204659 +:109680001FF088F820461FF059F8A4F80890A4F8B5 +:109690000AA00120A081A4F80EB0267684F81A80D2 +:1096A00067762888A0836888E083A88820847E481D +:1096B000FF21017041707D492046019A1FF048F852 +:1096C00078492046096804B0BDE8F05F08472DE9F5 +:1096D000F05F894672498346096815469A46DDF867 +:1096E00030800B9F0A9E8847040008BFBDE8F09FAA +:1096F00020461FF04FF820461FF020F8A4F808B0CD +:1097000001206581A081AE4238BF3546E58184F8ED +:1097100018A06776664884F81A80FF2101704170AE +:109720004A46644920461FF013F85E4920460968FE +:10973000BDE8F05F08472DE9FF5F0EAD584995E899 +:10974000A00309689346DDF84CA0129E0098884754 +:10975000040004BF04B0BDE8F09F20461FF01AF8D3 +:1097600020461EF0EBFF00982081A4F828B0039853 +:1097700060850220A4F80AB00022A081012D05D145 +:109780004A9FB662010000006C4902A90002000075 +:10979000C3BE68BC40F2FC71E1810621618119E021 +:1097A000002116F0070014D0431E01F101011840FA +:1097B000C9B2F9D169B1491E4FF6FF7000EA011034 +:1097C000E081032D14BF02210121891C0844E0819E +:1097D00000E0E2812576677684F81A80B9F80010F7 +:1097E000E183B9F802102184B9F804106184E676A7 +:1097F000364884F81DA0FF21417001708270344901 +:109800002046019A1EF0AEFF2B492046096804B09D +:10981000BDE8F05F08472DE9F0470E46254981462F +:10982000096817469846089D8847040008BFBDE8A8 +:10983000F08720461EF0B8FF20461EF089FFA4F8EE +:109840000890002060810120A0814FF6FF70E08128 +:109850002676677684F81A80E5761EF0B2FB420819 +:10986000134920461EF07EFF134920460968BDE8D3 +:10987000F04708472DE9F0410F460E498046096838 +:1098800015461E468847040008BFBDE8F081204603 +:109890001EF08AFF20461EF05BFFA4F80880012E10 +:1098A0001ED117E0D4CA00008038010060CB000050 +:1098B00074CB000078C5000088C500003F8E000012 +:1098C00010CB0000418E000038CB00003C8E000021 +:1098D00024CB0000B0026081E0810221A1810EE072 +:1098E000697A012202FA01F06081287A0421800855 +:1098F000B1EB001F94BF00010420E081A281267714 +:1099000025B1A5611EF05DFBA169C860012E14BFE1 +:109910000220062000EB80003A493A4601EB800124 +:1099200020461EF01FFF384920460968BDE8F04177 +:109930000847364B58604FF6FF7000EA41005880E8 +:1099400050001873704730B4DFF8B8C09CF85C174B +:10995000DCF854374A08BCF85217C41A0D19941C85 +:109960002C44B4FBF1F401FB0431CCF85817891AEC +:10997000081A801E30BCC0F34E00704724480068AF +:109980007047A0F58073DFF87CC0052B07D200F08C +:10999000F16FE3EF01000000684B02A90002000034 +:1099A0003756D60107000CEB401000F5D560C28396 +:1099B0000AE000F03F030CEB831092080CEB43032A +:1099C00000F5E670A3F84C27026949088A429CBF5B +:1099D00001617047531A42895B1CB3FBF2F303FB2E +:1099E00002110161704770B50C460F4915460968B0 +:1099F000884790F8241064F3041165F3451180F84A +:109A000024102C4318BF70BD0021416380F8301032 +:109A1000816380F8311070BDD4CA000088C5000091 +:109A200024D200002CD2000078C500000A68084645 +:109A300012F1020F1ABFB2F1FF3F012A0020704756 +:109A400010B50A680846082A05D00A2A08D00B2A49 +:109A500018BF10BD1EE01EF03BF99E4908801DE0B6 +:109A600041689D48B1F5003F006802BF818B491CE9 +:109A700081830FD0B1F5002F02BF418C491C418476 +:109A800008D0B1F5001F1EBF018C491C018401D113 +:109A900000F07CFCA02100201EF0D5F8002010BDB5 +:109AA00070B50A6805460846062A03D00B2A18BF77 +:109AB00070BD04E088480068C18B491CC1831EF05A +:109AC0008AFA801C20F001042A8A214601201EF017 +:109AD00085F86008FFF72EFB002070BD2DE9F041EE +:109AE00004460868B0F1FF3F00F0D28000267A4FAC +:109AF0007A4D01281DD002281CBF0846BDE8F08120 +:109B000000F073FC396802200875754920461EF084 +:109B1000D7FE28781EF003F800201EF0FEFA7149E7 +:109B2000A86809688847AE60FFF74AF80020BDE8DA +:109B3000F0814968002900F0AB801022201D23F03D +:109B400010F8606838606C60017D002940F0A080EA +:109B500001210175644800688047A86020B9FFF7BB +:109B60002FF80020BDE8F0813A68517E002908BF37 +:109B700025200CD00C2938BF491E07D308BF26204A +:109B800005D0272928BF084601D2891EC8B296836E +:109B9000D68316845684696840F2E2430A8AB2FB8F +:109BA000B78DA2DC01000000644D02A90002000094 +:109BB0002EAE0871F3FC03FB1C220A82504909688F +:109BC0008847504E30461DF0C4FF30461EF0CAF99B +:109BD00002201DF0C1FF4C481DF0B5FF01201DF013 +:109BE000A8FF28703868017E012941D13E4EC27E0F +:109BF0003368817E62F3030361F30D233360082A27 +:109C00002ED2DFE802F0040B112D171D2228A868C0 +:109C10000A463E490C3022F0AEFF21E0A8680F2230 +:109C20000C3022F022FF1BE0A86855220C3022F0F5 +:109C30001CFF15E0A868FF220C3022F016FF0FE091 +:109C4000A8680C3022F04EFF0AE0A868F0220C3021 +:109C500022F00BFF04E0A868AA220C3022F005FFD6 +:109C600030881EF021F8A8680C301EF011F803E0CF +:109C7000A8680C301EF021F80021022000F0FEFB45 +:109C80003868007E88B101280CD11EF0AEF9C01CE6 +:109C900020F00101228A01201DF0AAFF1C49204664 +:109CA0001EF018FE0020BDE8F08101201EF03FFAF2 +:109CB00025201EF00EF849F640401EF056F91EF021 +:109CC00094F9C01C20F00101228A00201DF090FFB1 +:109CD000104920461EF0FEFDE4E705488068002894 +:109CE00018BF0C3070470000748F00001CC80000C3 +:109CF000688F000068A1000054C500004CC500003A +:109D00008CC500002941767155555500AC02000004 +:109D100074A1000080A10000002310B51A461A218A +:109D200018461EF0B3FADD4C60781EF016F9207864 +:109D30001DF0FFFE00F063FB606802210175806981 +:109D400058B11EF052F961688A69D268801AB0F57C +:109D50007A4FC4BF088921F0BBF8E06880B141792F +:109D600049B16168CE4A0989A0F81011126841F61C +:109D70004971904702E0CB49096888470020E060BC +:109D8000C949A0681EF0A6FDBDE81040FEF722BF3D +:109D900010B50A680846062A18BF10BDFFF7BCFFB9 +:109DA000002010BD2DE9F041BC4D07460C46E86887 +:109DB00008689B9801000000604F02A900020000A3 +:109DC000DA46B6CCC221C171BD2101720D21164601 +:109DD00041721EF0CFFAC01CC1B2E8683B0E41715F +:109DE000C21D8B544379C7F3074200F108015A544E +:109DF000417940F2E24C891CCBB24FF4E57101EBA2 +:109E0000C311B1FBFCF20CFB1211A41A4371B14255 +:109E100088BF641EA6EB010188BF01F2E2418AB24D +:109E200014F0010F1EBF641E02F2E24292B29108CA +:109E3000C0F80841A0F80C115B1C43716868017FF1 +:109E4000022902BF00892146FFF7B9FD68688069D1 +:109E5000002818BFC460BDE8F081F0B50846096865 +:109E600083B00A291CBF03B0F0BD4068B0F5001FE5 +:109E700004D100F09FFA002003B0F0BD01A902A8B0 +:109E80001DF0B2FE1EF07BFA894D064610F0010F60 +:109E900068685AD0017F02290FD18069E968001DE6 +:109EA00004220B3122F0C2FD002859D1BDF8042054 +:109EB00030460299FFF780FF52E0814800688047F2 +:109EC00004000CD0A96840F2C722091D042000F04C +:109ED000DBFB794F002820460AD139688847BDF856 +:109EE000042030460299FFF767FFFFF71FFF3EE0AF +:109EF0000A301DF0ECFEFF20207100206071B120BF +:109F0000A0716868806950B1E968001D04220B31B6 +:109F100022F08CFD18B13968E86888470FE0BDF879 +:109F2000042030460299FFF747FF6868614A0189BB +:109F3000E868A0F81011126841F64971904728218D +:109F400000201DF094FEEC6011E0007F022807D095 +:109F5000A96840F2C722091D042000F095FB10B942 +:109F6000FFF7E4FE03E0282100201DF080FE002022 +:109F700003B0F0BD2DE9F04104460868B0F1FF3FA1 +:109F80001BD0012808D002281EBF0B280846BDE8B8 +:109F9000F081FFF7CBFE10E0496871B11022201D5F +:109FA00022F0F3FD424D6068AC6068604448006890 +:109FB0008047E86020B9FEF717FE0020BDE8F08179 +:109FC000EA2BE069010000005C5102A900020000D8 +:109FD000A45D117C0021417101201DF0BEFD28709F +:109FE000696801200875042000F05CFA218A40F2BB +:109FF000E242B1FBF2F0A36802FB101700EB43064C +:10A000006868007F042826D10122DF231A21104628 +:10A010001EF050F930481DF0B0FDE868C01D1DF07D +:10A020004BFE68688169E8680A79C2714A790272F0 +:10A030008A794272C9798172552216210B3022F039 +:10A0400028FD3A46314601201DF0E6FD2349204611 +:10A050001EF054FCBBE7012243F6F7531B211046C8 +:10A060001EF028F91E481DF091FF05201DF089FF04 +:10A070006870E868FF210171B12181710A301DF01B +:10A0800030FE6868007F01281EBF608A4FF4487167 +:10A0900001EB80000AD1E0684FF0FF3101EB400096 +:10A0A00040F2712100FB01F0C7EB40001DF071FF91 +:10A0B0003A46314600201DF0AFFD0A4920461EF009 +:10A0C0001DFC84E7788F00005CC5000054C50000CB +:10A0D0008CA100004CC50000C2BD0D01A4A1000070 +:10A0E0000043BDB098A1000070B5844C206890F882 +:10A0F0002010252929D24FF0010E6C2500F1220CE9 +:10A1000090F820108669CA0801F00703B65C0EFAC1 +:10A1100003F216420FD0616840F26B22091D032042 +:10A1200000F0BCFA88B176492068096890F82000F0 +:10A130008847012070BD01F80C5090F82010491C90 +:10A14000C9B280F820102529DAD3216891F82000BF +:10A15000252810D102200875C88B30B18A8B223196 +:10A16000B2FBF0F0C0B21FF0B6FF2068002180F80B +:10A170002010C1838183002070BD10B50A68044699 +:10A1800008460A2A18BF10BD1EF006F95B49096887 +:10A1900091F821C091F8203001F1220200FB0CF06F +:10A1A00013F802E0CCF1FF0C0EFB0C0080B24FF074 +:10A1B000FF0CB0FBFCF0C0B298548B8B91F82020C0 +:10A1C00018448883C88B521C401CC88381F8202007 +:10A1D0007563F90C01000000585302A90002000049 +:10A1E00050B5AFC1FFF78AFF58B94B4920461EF062 +:10A1F0008FFB00F022F900201EF0DBF8FEF708FDCF +:10A2000003E0282100201DF046FD002010BD2DE9AF +:10A21000F04104460868B0F1FF3F55D0012816D040 +:10A22000022808D00B281CBF0846BDE8F081FFF7C4 +:10A2300065FF002862D1384920461EF069FB00F016 +:10A24000FCF800201EF0B5F8FEF7E2FC3CE049689F +:10A25000002939D01022201D22F0ABFC2C4D616862 +:10A260006C602960087D012628B9002081F8200053 +:10A27000C883888303E091F8200025281DD24FF081 +:10A280006C0E01F1220C91F820208F69D308104642 +:10A2900002F00702FB5C06FA02F2134203D01D49EA +:10A2A0000968884709E000F80CE091F82000401C9C +:10A2B000C2B281F82020252AE5D3286890F8201022 +:10A2C000252904D1022101750020BDE8F08100217B +:10A2D000032000F0F1F801201EF06BF828201DF09B +:10A2E00062FE28680D49067520461EF011FBA06825 +:10A2F000228A410000201DF099FCE5E7074920462D +:10A300001EF006FB282100201DF0C5FCDCE7000044 +:10A31000888F00008CC50000B0A10000BCA1000027 +:10A3200010B500210620FEF774FF002010BD10B507 +:10A3300000210520FEF76DFF002010BD10B50121A2 +:10A340000620FEF766FF002010BD10B51DF0E5FCED +:10A3500001460A20FEF75DFF002010BD10B5002168 +:10A360000820FEF756FF002010BD10B5002109207F +:10A37000FEF74FFF002010BD10B54FF480110A20EA +:10A38000FEF747FF002010BD10B54FF480210A20D2 +:10A39000FEF73FFF002010BD10B54FF400110A205A +:10A3A000FEF737FF002010BD10B500210720FEF793 +:10A3B00030FF002010BD10B51DF0A1FE04461DF0B9 +:10A3C000A1FE14F4003F07BF04F4FA010B204FF480 +:10A3D00000210A20FEF71DFF002010BD10B500214E +:10A3E0005C75930801000000545502A900020000AA +:10A3F000494D71B101201DF0F4FD002108461DF00A +:10A4000005FE002101201DF001FE002102201DF0AB +:10A41000FDFD1DF0D4FB28241DF0CCFB20B1200055 +:10A42000A4F10104A4B2F7D11DF073FE1DF074FE77 +:10A43000002C08BF1DF0C9FB45F2073100201EF0BB +:10A440003EF8BDE81040BD4901201EF038B870B597 +:10A450000020FBF74BFF45F2073100201EF00FF8FC +:10A46000B64D012029461EF00AF8002101201DF0FA +:10A47000B8FD002108461DF0C9FD002101201DF096 +:10A48000C5FD002102201DF0C1FD1DF098FB282410 +:10A490001DF090FB20B12000A4F10104A4B2F7D17B +:10A4A0001DF037FE1DF038FE002C08BF1DF08DFB9F +:10A4B00045F2073100201EF002F8294601201DF068 +:10A4C000FEFFBDE8704000201DF02EBE2DE9F047D4 +:10A4D000012682460D46B146B04637461DF019FEAC +:10A4E0001DF01AFE45F2073100201DF0E8FF934CE5 +:10A4F000012021461DF0E3FF41F2073100201DF04D +:10A50000ABFF214601201DF0A7FFBAF1010F1AD1C0 +:10A510000E20AC691DF094FF0C201DF0A4FFE06834 +:10A520001DF03FFBE0681DF045FD01201DF03CFBE8 +:10A5300020691DF030FB1B201DF0F3FBBDE8F04748 +:10A540000120FBF7D3BEBAF1040F07D1287F1DF01D +:10A55000A2F981468046074606462CE0BAF1050F6F +:10A5600029D301201DF004F9044600201DF000F954 +:10A57000BAF1050F2CD0BAF1060F7ED0BAF1070F51 +:10A5800009D1C089C0F3012800F00306E089C0F3B7 +:10A59000012900F003076A4C20461DF002FB20460B +:10A5A0001DF008FD00201DF0FFFA66481DF0F3FACB +:10A5B00025201DF0B6FB394630461DF0C4FD494646 +:10A5C00040461DF0CEFDBDE8F0470120FBF78EBEF2 +:10A5D000297E01294ED0417B0022002904BFC27090 +:10A5E00000260CD0C3785B1CDBB2B3FBF1FC01FB93 +:10A5F00051BCCB3C01000000505702A900020000F2 +:10A60000BDA5CF0C1C31C17049008368CB4003F05D +:10A610000306617B002904BFE27000270CD0E378B9 +:10A620005B1CDBB2B3FBF1FC01FB1C31E1704900A8 +:10A63000A368CB4003F00307017B002904BF8270AD +:10A640004FF000080CD083785B1CDBB2B3FBF1FC4D +:10A6500001FB1C31817049004368CB4003F00308C3 +:10A66000217B002904BFA2704FF000090CD0A27812 +:10A67000521CD2B2B2FBF1F301FB1321A1704900CD +:10A680006268CA4002F0030985F8246000E00CE02B +:10A6900085F82570C089C0F3011085F82600E0898F +:10A6A000C0F3011085F827007FE7C189C1F30128B5 +:10A6B000C1F38106E18985F81B80C1F3012985F882 +:10A6C0001C90C089C1F38107C0F381106877E089CD +:10A6D000C0F38110A87768E770B582B004460D46D4 +:10A6E0001646694601A81DF0A7FABDF8000040F221 +:10A6F000E242811901F2E14189B2B1FBF2F2019922 +:10A7000053186A685B1CA3EB420CAB68C3F1000EE4 +:10A710000CEB4E0CBCF1000FC2BF002002B070BDAC +:10A72000042C1CBF062C072C0FD11A444FF0FF330A +:10A7300003EB4202511A40F2712201FB02F1C0EB1D +:10A740004100A0F243201DF042FC012002B070BD88 +:10A7500000078007D6BE898E5555550010B5FF48B5 +:10A7600034220178406801FB02F122F014FA012042 +:10A7700010BD0021F948342241704FF461714180CD +:10A780000178406801FB02F122F005BA2DE9F041A1 +:10A79000F24D002495F800E016461F46BEF1000F6A +:10A7A0002FD96A684FF00D0C04FB0CF302EB830306 +:10A7B0005B7813BB04FB0CF4012302EB840253709F +:10A7C0006A6802F824006868062200EB8400801C96 +:10A7D00022F003FA6868102200EB8400143031463E +:10A7E00022F0FBF96868102200EB8400243039461F +:10A7F00022F0F3F90120BDE8F081641CE4B2744555 +:10A80000C8730BA6010000004C5902A90002000009 +:10A810007ABCCD51D2D30020BDE8F0818C461146E0 +:10A820000D2200FB02F010B5D14A526802EB800302 +:10A8300093F801E0BEF1000F0BD012F82000604544 +:10A8400007D1981C062222F023F9002804BF01201A +:10A8500010BD002010BD2DE9F041C54D06462878F9 +:10A8600000248846002822D90D2704FB07F06968D8 +:10A87000024601EB80004378A3B111F82210B142E7 +:10A8800010D1801C0622414622F002F950B96868B6 +:10A8900004FB07F400EB8400342122F086F9012048 +:10A8A000BDE8F081641C2878E4B28442DDD3002046 +:10A8B000BDE8F081AE48007870472DE9F047AC4D17 +:10A8C00006462878002488469146002824D90D277A +:10A8D00004FB07F06968024601EB80004378B3B1DE +:10A8E00011F82210B14212D1801C0622414622F0FA +:10A8F000CFF860B9686804FB07F400EB8401083105 +:10A900000622484622F073F90020BDE8F087641C57 +:10A910002878E4B28442DBD31220BDE8F0872DE929 +:10A92000F047934D06462878002488469146002833 +:10A9300024D90D2704FB07F06968024601EB80006B +:10A940004378B3B111F82210B14212D1801C062213 +:10A95000414622F09DF860B9686804FB07F400EBFB +:10A9600084010E310622484622F041F90020BDE85C +:10A97000F087641C2878E4B28442DBD31220BDE85F +:10A98000F08730B50D460021044689B010460DF120 +:10A99000140E0A460B468C468EE80E100DF1040E7E +:10A9A0008EE80E1001788DF8141041788DF815108E +:10A9B00080788DF8160005AA294601A81CF0CEFF64 +:10A9C0009DF8040020709DF8050060709DF8060059 +:10A9D000A07009B030BDF0B5064691B00C4600201D +:10A9E0000FAD014685E80300002117460E900D903B +:10A9F00009A80A460B468C4680E80E1010223946FC +:10AA000022F046F8002804BF11B0F0BDACB100241C +:10AA100006D91CD101000000485B02A90002000019 +:10AA20008E5473EC1DF02FFB25F81400641CE4B267 +:10AA3000032CF7D3BDF840000622C0F30D00ADF89B +:10AA400040000FA9304622F0DCF811B0F0BD0EAD89 +:10AA50001DF019FB2855641CE4B2032CF8D39DF8B3 +:10AA60003A00002100F03F0040F040008DF83A002D +:10AA70000DF1140E0A460B460C468EE81E000DF131 +:10AA8000040E8EE81E009DF838108DF814109DF805 +:10AA900039108DF815108DF8160005AA394601A851 +:10AAA0001CF066FF9DF804008DF834009DF8051039 +:10AAB0008DF835109DF806108DF8361030709DF821 +:10AAC000350070709DF83600B0709DF83800F07059 +:10AAD0009DF8390030719DF83A00707111B0F0BDE9 +:10AAE0002DE9F041274D00242878002898BFBDE8C3 +:10AAF000F0810D2604FB06F06968074601EB800132 +:10AB0000487878B101F1140201F108000021FFF743 +:10AB10006CFF6868002100EB870000F124020E3012 +:10AB2000FFF763FF641C2878E4B28442E2D3BDE8F7 +:10AB3000F08110B513494870FBF7B0F8002010BD44 +:10AB40001049488000207047F0B50C468BB00021BA +:10AB50000A910991617901F0C001402937D194F837 +:10AB600003E08DF828E0257900218DF829506679D9 +:10AB70008DF82A6005AF0A460B468C4687E80E1012 +:10AB800001AF01E0908F000087E80E108DF814E00F +:10AB90008DF8155001468DF8166005AA01A81CF025 +:10ABA000E7FE9DF804008DF824009DF805008DF85F +:10ABB00025009DF806008DF826000322214609A8ED +:10ABC00021F070FF002802BF01200BB0F0BD002073 +:10ABD0000BB0F0BD2DE9F04F8BB0050089465DD07C +:10ABE000DFF88881002498F80000002856D94FF03B +:10ABF0000D0BD8F8041004FB0BF001EB800A9AF857 +:10AC00000100002844D0B9F1000F0CBF0AF1240A5A +:10AC10000AF1140A00200A900990687900F0C00037 +:10AC2000F1BC6F4001000000445D02A90002000079 +:10AC300097ACAD9C402835D1E8788DF8280095F880 +:10AC400004E000218DF829E06E798DF82A6005AFC7 +:10AC50000A460B468C4687E80E1001AF87E80E10B7 +:10AC60008DF814008DF815E08DF8166005AA514690 +:10AC700001A81CF087FE9DF804008DF824009DF8C3 +:10AC800005008DF825009DF806008DF826000322AA +:10AC9000294609A821F010FF002802BF20460BB06A +:10ACA000BDE8F08F641C98F80000E4B28442AAD397 +:10ACB000FF200BB0BDE8F08F2DE9F0478A464FF03A +:10ACC000000184B0074691461D0068460A460B46BF +:10ACD0000C461EC01CBFFF2028700024284E307870 +:10ACE00000282ED94FF00D0804FB08F071680246C9 +:10ACF00001EB80004378FBB111F82210B9421BD15F +:10AD0000801C0622514621F0D7FEA8B9716804FBC9 +:10AD100008F0B9F1000F01EB80010CBF24311431B0 +:10AD20001022684621F0C8FE58B1002D18BF2C70C3 +:10AD3000012004B0BDE8F087641C3078E4B284429E +:10AD4000D2D3002004B0BDE8F0874179C020884309 +:10AD500014BF002001207047407910F0C00F14BFCD +:10AD6000002001207047012807D14879C021814384 +:10AD70001EBF10F0C00F0120704700207047000078 +:10AD8000908F000008B50A680346084612F1020FCA +:10AD90001DD0B2F1FF3F0BD0A2F5B852773A0BD0DD +:10ADA000012A18BF08BDFF4918461DF0E3FD0CE05D +:10ADB00006201EF02AFF08E04068C37A0093837AD9 +:10ADC000427A017A0D20FEF78AFD002008BDF6497F +:10ADD0000D200968884706201EF03FFFF5E710B5F3 +:10ADE00003460A685C68084612F1020F1ED0B2F1F1 +:10ADF000FF3F09D0A2F5B8527C3A18BF10BDE9490F +:10AE000018461DF0B7FD1AE01DF03FF9A18BDFF8E1 +:10AE10009CC300EB8100DCF800C0A288012341F252 +:10AE20007C71E04784F83F00002010BDE04A94F8B0 +:10AE30002018C89001000000405F02A90002000035 +:10AE4000634413213F00126801219047002084F8D9 +:10AE50003F00002010BD30B5844608460A6841F224 +:10AE60007C71DCF80440531A83B08A4233D02BDC67 +:10AE700012F1020F43D0B2F1FF3F1CBF03B030BD4F +:10AE800001230093A08802AA02211EF008FD28B128 +:10AE9000029AE17F117000211EF01FFDE0890A2156 +:10AEA00000FB01F021F0F8F905461DF0F8F8DFF895 +:10AEB00010C32844DCF800C0A288012341F27C7151 +:10AEC000E04784F83F0017E0012B11D00C2B1CBF8A +:10AED00003B030BD02E004BF2221E1770068A0F595 +:10AEE000B851883904BFE07F132801D11620E077DC +:10AEF000B14960461DF048FD002003B030BDB14AA5 +:10AF000094F83F001268012190470020D9E710B55E +:10AF100004460A68406812F1020F04BF002010BD09 +:10AF2000B2F1FF3F1CBF084610BDC17F0222C277AD +:10AF3000012907D190F8391011F0100F1CBF002122 +:10AF40001FF0AAFAA04920461DF01EFD002010BDEA +:10AF500038B503460A685C68084612F1020F26D02D +:10AF60009A4DB2F1FF3F0BD0A2F5B8527E3A18BF0E +:10AF700038BD2889A081964918461DF005FD16E0C8 +:10AF8000A089288105201EF08FFE00281CBF00200C +:10AF9000A081D5F8C40004F10802C3B20093D5F82B +:10AFA000C000D5F8BC1083B2A088FEF750FB00208B +:10AFB00038BD2DE9F84F446806460D46286841F231 +:10AFC00089734968C21A0027A046984200F0DD80C4 +:10AFD00010DC10F1020F00F03B81B0F1FF3F1BD0FD +:10AFE000A0F5B8507B3800F00F81022840F06A814C +:10AFF00000F0D0B8682A00F0BF806C2A00F00B8106 +:10B000006E2A00F01281762A40F05C816E4930464B +:10B010001DF0BAFC00F006B90E201EF057FF0446E2 +:10B02000B0F84C00DFF8AC91A0F57F41FF3903D1B7 +:10B030001EF07BFEA4F84C00B4F84C001EF046FF56 +:10B04000ED9609CE010000003C6102A9000200005B +:10B050006B9BE2FC04F1180EBEE80E1C054608309E +:10B06000A0E80E1C9EE80E1C80E80E1C85F83970C6 +:10B070000022A8881146FEF724FDA8881EF0CBFF09 +:10B08000DFF85CA1A06CCAF8C070CAF8C470CAF836 +:10B09000BC0040461FF082F91EF0E5FE0146404626 +:10B0A0001FF079F9314628461FF075F994F84E00E3 +:10B0B00000280CBF052004201EF0BBFDEF7795F89B +:10B0C00039004FF0000B40F0100085F8390085F88A +:10B0D0003F7059466846FAF7EAFB5FEA00084BD032 +:10B0E00000980770A9884170A988090A817094F8AE +:10B0F0004E10D1F1010138BF0021C170617B017197 +:10B10000062204F10E01401D21F099FD4FF400705C +:10B110001CF02BF970B10098062249460B3021F043 +:10B120008EFD0098062209F10601113021F087FDFD +:10B130004FF00C0B0098A18D5844C172A18D090AE3 +:10B140000173A18B4173A18B090A8173E18BC173D8 +:10B15000E18B090A017494F84E1000291CBF2349A1 +:10B16000097804D1A98801F03F011AF8011041744F +:10B170001F494046096888478D201FF0E0F91D49A6 +:10B1800030461DF00BFC0020BDE8F88F087AE07710 +:10B19000194930461DF002FC0020BDE8F88F02BFBF +:10B1A0002220E07784F83F702868A0F5B8517D39F7 +:10B1B0002DD1104B3268E17F68689A4214BF007A43 +:10B1C0003E20E077012922D118E00000E0A1000034 +:10B1D00080C5000044C5000048C50000F4A200007E +:10B1E0006CD8000064A20000C8A10000A5DE000029 +:10B1F00028C5000058A200007CA2000094F8390085 +:10B2000010F0100F1EBFE17F20461FF04FF9FA49E2 +:10B2100030461DF0C3FB0020BDE8F88F087AE077C8 +:10B22000F64930461DF0BAFB06E0087A84F838008B +:10B23000092120461FF0C0F80020BDE8F88F052244 +:10B24000083104F13A0021F0FAFC94F8390010F0CA +:10B250004F3F720301000000386302A900020000A2 +:10B260009F735C41010FF1D140F0010084F8390077 +:10B2700020461FF0C6F8E9E7B8F8044098F81F50D8 +:10B2800004201EF025FD00281CBF706801F0BEF8E8 +:10B290002046E0490968884700231A461946204697 +:10B2A000FDF761FD70681FF083F820461EF078FD01 +:10B2B00030461EF00DFE04201EF00AFD00280CBFD3 +:10B2C000052004201EF0E7FCD34B2A461B68002112 +:10B2D00020469847D1492046096888470023B8F896 +:10B2E00004001A4601211EF0C3FBAFE728461EF0FA +:10B2F0006DFB0028AAD12846BDE8F88F2DE9F04360 +:10B3000007460A687C6885B0084612F1020F66D0CD +:10B31000B2F1FF3F2CD0A2F5B852793A1CBF05B06C +:10B32000BDE8F083FEF7ACFBBD49A06409680E20C0 +:10B330008847017E39B1417E6173818BE181C18B88 +:10B340002182008C6082B84EB64D7078DFF8DC92B6 +:10B350004FF00D08FF2820D0D9F8001000FB08F0AE +:10B3600001EB80010E310622284621F072FC18E024 +:10B370001CF0A9FE4FEA500C207B237D04F10E0245 +:10B38000617B8DE80F006389228961460E20FEF7FC +:10B39000F0F9002005B0BDE8F0830621284621F031 +:10B3A00036FC607B002818BF012804D10621A81DA7 +:10B3B00021F02DFC0BE03078D9F8001000FB08F0EC +:10B3C00001EB800108310622A81D21F042FC9849BA +:10B3D00038461DF0EDFA002005B0BDE8F0838D4938 +:10B3E0000E2009688847F6E7F0B506460A687568D2 +:10B3F00087B0084612F1020F11BFB2F1FF3F0020E3 +:10B4000007B0F0BDA2F5B8528D3A1CBF07B0F0BD31 +:10B41000446805F1240E04F10800B0E88E10AEE88F +:10B420008E108EC88EE88E006069A864012085F8B1 +:10B430004E004FF6FF70A5F84C00208A1EF076FFF4 +:10B440000746218A3A466069FEF7F5FAE07C002853 +:10B4500038D1A0680190207B8DF80800607B8DF8C2 +:10B46000D5B94E3501000000346502A90002000084 +:10B47000868B82310900A07B8DF80A008DF80B7055 +:10B48000208A8DF80E00208A0121000A8DF80F0015 +:10B49000A88B8DF81000A88B000A8DF81100E88B9E +:10B4A0008DF81200E88B000A8DF813004FF6FF703C +:10B4B00001F038F90146052205A821F0D4FB1EF061 +:10B4C00064FDA17C01F01F0141EA40118DF81910C3 +:10B4D000162101A81CF013FBE07C002814BF504982 +:10B4E000594930461DF06EFA002007B0F0BDF8B59E +:10B4F0000A680646084612F1020F5AD0B2F1FF3F21 +:10B5000052D0A2F5B852763A18BFF8BD706800F074 +:10B5100093FF0E201EF0F8FC04460025012168462A +:10B52000FAF7D9F9070036D000980221017094F893 +:10B530004E10D1F1010138BF0021C170617B017152 +:10B54000062204F10E01401D21F08DFB4FF4007026 +:10B550001BF01FFF50B1009806210B3021F061FB5A +:10B5600000980621113021F05CFB0C250098A18D7C +:10B570002844C172A18D090A0173A18B4173A18B6B +:10B58000090A8173E18BC173E18B090A01742F49A8 +:10B590003846096888478D201EF0E5FF204930466F +:10B5A0001DF010FA0020F8BD03201EF056FB00200D +:10B5B000F8BD03201EF079FB254A0E21126841F6E2 +:10B5C0007300904700904FF0FF32694621481AF00F +:10B5D000DFF8E7E710B5024654680A6886B0084607 +:10B5E00012F1020F38D0B2F1FF3F1CBF06B010BD00 +:10B5F0001CF073FD4FEA500CA37D627DA07B04F12B +:10B600000F0103910290CDE90423637B227B019318 +:10B6100000922389628961460B20FEF722F91FE020 +:10B62000E0A1000070A2000080C5000024C5000059 +:10B6300050C5000078C50000C8A100003F8E000082 +:10B64000948F00004CA2000040A2000028C500001A +:10B6500034C500002CE90000FF490B200968884729 +:10B66000002006B010BD2DE9F04F8046084609685D +:10B67000DB31FC5F01000000306702A9000200001E +:10B6800072633C8CD8F8044087B04FF0000911F188 +:10B69000020F00F00281B1F1FF3F2ED0A1F5B851A9 +:10B6A0007A394FF0010758D010291CBF07B0BDE808 +:10B6B000F08F1222EE4B06A91B6801209847050067 +:10B6C00013D01221069821F0B6FA06983C21017099 +:10B6D000C770A17B0171062204F10F01401D21F00A +:10B6E000CCFAE449284609688847E34940461DF0FA +:10B6F00073F9002007B0BDE8F08F02201EF0B7FA02 +:10B700001CF0F5FC6FF0010101EA500CA07BA37D59 +:10B71000627D04F10F0102AD0FC5637B227B0193B3 +:10B7200000920CF1020C2389628961460B20FEF71E +:10B73000A2F8207B012840F0C1801CF0D8FCDFF883 +:10B740003CC300F58050DCF800C0A288012341F220 +:10B750008A71E047E07500F0B1B845680E201EF030 +:10B76000DDFBC749044609680B208847DFF814A3AE +:10B77000C54E84F84E901EF000FBA4F84C00A97B47 +:10B780006173B07800281EBFA87B801C607370783E +:10B79000DFF8F8B24FF00D09FF280BD0DBF80010EE +:10B7A00000FB09F001EB80010E310622504621F02A +:10B7B00064FA03E00621504621F03DFA607B002840 +:10B7C00018BF012805D106210AF1060021F033FA3D +:10B7D0000CE03078DBF8001000FB09F001EB800191 +:10B7E000083106220AF1060021F047FA062205F187 +:10B7F0000F0104F10E0021F040FAA88CA083E88C20 +:10B80000E0832784688C4FF6FF7101EA4000608472 +:10B81000A8696062E86920F07F40A062688CA0851A +:10B8200095F82D0084F82E00E97FA8680844298C3B +:10B8300007EB41010844A0641EF0B1FBB4F84CC012 +:10B84000024695F82E3001216046FDF7A0FAE87F08 +:10B85000401CC1B2B4F84C00FDF7C2FAA989B4F893 +:10B860004C00FDF722FBB4F84C0005F1280100F074 +:10B870008CFFB4F84C001EF0ECFBB4F84C10844A7A +:10B88000EC0FF1FE010000002C6902A9000200008B +:10B89000B57A3ED195F82E0001F03F01505482490F +:10B8A00040461DF0A3F8002007B0BDE8F08F7449B2 +:10B8B0000B200968884702201EF00BFA207B012824 +:10B8C00006D17A4AE07D12680121904784F81790EA +:10B8D000002007B0BDE8F08F38B50A680446084676 +:10B8E000B2F1FF3F16D0A2F5B8528B3A18BF38BD5F +:10B8F0004068417A002924D1007A012801D904281E +:10B900001AD102201EF007FAB0B1694920461DF095 +:10B910006DF81AE0674A0B21126841F671009047F2 +:10B92000009061684FF0FF32097B017269466248FE +:10B9300019F042FF002038BD604920461DF056F83E +:10B9400003E0524920461DF051F8002038BD08B5EB +:10B950000A680346084612F1020F1ED0B2F1FF3FFB +:10B9600016D0A2F5B852723A18BF08BD0021009156 +:10B970004068007A002802BF444918461DF036F896 +:10B980000122504B69461B684DA09847002008BD16 +:10B9900001201EF076F9002008BD01201EF099F963 +:10B9A000F4E710B503460A685C6884B0084612F1F3 +:10B9B000020F28D0B2F1FF3F10D0A2F5B852743A6E +:10B9C0001CBF04B010BD4068007A18BB2F49184650 +:10B9D0001DF00CF88F201EF0DAFD1BE000201EF099 +:10B9E00050F91CF08EFB012101EB5000E37BA27BA0 +:10B9F000A1890091029301920146237A62890C2069 +:10BA0000FDF70FFF06E01E490C200968884700205B +:10BA10001EF05FF9002004B010BD70B582B04A6816 +:10BA20000546019208680C4641F27373C11A0C2650 +:10BA300098427CD056DC10F1020F18BFB0F1FF3FE6 +:10BA40004DD0A0F5B850713866D0012840F0D880AC +:10BA500000200090107A01283AD10B201EF068FADD +:10BA6000007B012801D9042806D102201EF053F9D9 +:10BA7000002808BF00962BD01349284626E0000076 +:10BA800080C5000014C5000028C50000E0A100002A +:10BA900000D8BE0001000000286B02A900020000CF +:10BAA0004192806C44C5000078C50000C8A1000028 +:10BAB0003C8E0000948F00006CD800004CA2000067 +:10BAC00048C5000010A2000034C500002CE90000A9 +:10BAD0001CA200000A20000020C5000004A20000F3 +:10BAE0001CF08EFF01226946AFF21800654B1B68FF +:10BAF0009847002002B070BD01292BD002293FD009 +:10BB0000042978D106201EF010F90028F1D06068D1 +:10BB1000C37A0093837A427A017A0D20FDF725FFDC +:10BB2000594928461CF06CFFE3E70AE00B201EF0A1 +:10BB300009FA019908313CC908303CC0002002B024 +:10BB400070BD0C201EF0FEF90199CA688968C260B8 +:10BB50008160CEE7107A0028CBD00C201EF0F2F9DD +:10BB600004468F26494928461CF04AFFA08961896E +:10BB7000401CB1FBF0F0012898BF8E26304637E01C +:10BB800003201EF0D2F8B8B3019C686804F10801E4 +:10BB900091E84C1000F1080E8EE84C100C220E318A +:10BBA000183021F07EF83A4A0E21126841F67200F0 +:10BBB00090470190B4E84E50A0E84E5094E80E0033 +:10BBC0000EC0019941F672000860183C4FF0FF3238 +:10BBD00001A9304819F0FAFD2F4928461CF010FF42 +:10BBE00060892189401CB1FBF0F0012881D88C20AC +:10BBF0001EF0D7FC7DE70DE0FFE701216846F9F76D +:10BC000088FE00283FF475AF00990E70234909683B +:10BC100088476EE7204602B070BD002070474DF89F +:10BC200004ED83B002910B681D4AA3F5B85CBCF12A +:10BC3000830C06D1B2F818C0ACF57F4EBEF1FF0EF2 +:10BC400006D1A3F5B85CBCF17F0C07D1D27D2AB137 +:10BC500001A81DF0E3FE03B05DF804FB0A46194697 +:10BC60001CF09CFE03B05DF804FB10B51EF089F9D2 +:10BC700000680C4988421BBF0B4988420120002004 +:10BC800010BD000020C5000088A20000ECA100004B +:10BC900034C500002CE9000034A2000028C50000D3 +:10BCA00099D0D4EC01000000246D02A9000200002C +:10BCB000586A5E1C6CD8000070A200007CA20000D4 +:10BCC00070B5044642F236101EF05CFC0546014693 +:10BCD00020461EF0B5FC012229461420FF4B1B68AC +:10BCE000BDE87040184770B5044642F235101EF0AA +:10BCF00049FC0546014620461EF0A2FCF74B2946AA +:10BD00001B68BDE8704001221420184770B5044636 +:10BD100042F237101EF036FC0546014620461EF062 +:10BD20008FFCEE4B29461B68BDE8704001221420B1 +:10BD3000184730B5EA4D83B0698801A81EF050FF5E +:10BD400001AA05F1200101A81EF0B6FE6978E34CB6 +:10BD500003291CBF2846042925D101A81EF068FC30 +:10BD600080B1002142F237101EF00CFC054601465E +:10BD700001A81EF065FC012223682946142098477B +:10BD800003B030BD002142F236101EF0FBFB054629 +:10BD9000014601A81EF054FC012223682946142004 +:10BDA000984703B030BD10301EF042FC0028E9D0A7 +:10BDB000002142F235101EF0E5FB0546014601A8C0 +:10BDC0001EF03EFC0122236829461420984703B048 +:10BDD00030BDC34901200870C86980B248800E2870 +:10BDE00014BF0320042048700021BE480A460B46B9 +:10BDF0000EC0103006C0103806C0012000F0A2B9F5 +:10BE0000F8B50646B848B64DB84C0268012919D0B5 +:10BE1000022918BFF8BD698841F28E7090470090E2 +:10BE2000696A4FF0FF3249008160698C81812989FC +:10BE3000C181698901828674694604F1380019F06C +:10BE4000CFFCF8BD0E2141F28D7090470090696AD9 +:10BE500049004161698C0182C6741BF036FE00996D +:10BE60008860A348C86005208874821F694604F171 +:10BE7000380019F0B5FCF8BD9E4B0022595C0A232E +:10BE800000FB03F001FB00F18809B0FBF3F103FBB9 +:10BE90001100052828BF0122881880B2704770B5AC +:10BEA0008F4B0120B3F8AC204FF6FF7484460CFA98 +:10BEB0005860BC3901000000206F02A90002000098 +:10BEC000AC82E0A100F10A4207D000EB400103EB95 +:10BED0008101498DA14238BF0C46401C80B20B281D +:10BEE000EFD34FF6FF76B44217D080201DF0B6FF97 +:10BEF0000546B04211D028461EF02EF9A04288BF58 +:10BF0000204602D828461EF027F904466D1CA8B228 +:10BF10001DF0A4FF0546B042EDD1204670BD2DE9CD +:10BF2000F34F002487B00546804627460294FFF76A +:10BF3000C0FF82460A200AFB00F006900920B5FBEC +:10BF4000F0F00A21059005FB01F00490012000901B +:10BF5000AAF57F40FF384FF0000010D06A49029ADE +:10BF6000069B895C0A2201FB03F18909B1FBF2F30C +:10BF700002FB1311052928BF0120184480B201904B +:10BF8000092D46D9DDF814B03FE00BEBCB00A946F4 +:10BF90000026039032E05C49049B895D0A2201FB84 +:10BFA00003F18909B1FBF2F302FB1311002005290B +:10BFB00028BF01201844019980B20844B0FBF5F174 +:10BFC00005FB11044C4517D00398A04214D8A14694 +:10BFD00029462046089A1EF069FE009060B9A845DF +:10BFE00008BFA046AAF57F40FF3804D02946204666 +:10BFF0001EF0DEFE00B90127761CB6B20FB9402E46 +:10C00000C9D3ABF1010B1FFA8BFB17B9BBF1000FC2 +:10C01000BBD101264FF6FF7915E0A81B84B2294653 +:10C020002046089A1EF042FE009050B9A84508BF6D +:10C03000A046CA4504D0294620461EF0B9FE00B9E4 +:10C040000127761CB6B20FB9AE42E6D3009838434A +:10C050000FD1CA4511D00298401C80B202904028EE +:10C060000BD229490298085C00FB0AF0C0F38F103C +:10C0700018B1009838433FF469AF002F08BF00247F +:10C0800000D014B9A84518BF4446204609B0BDE801 +:10C09000F08F2DE9F047174F00247E8C204625466F +:10C0A000002E08BFBDE8F08705201DF052FE0028D5 +:10C0B00044D0B7F8AC00002840D10920B6FBF0FE10 +:10C0C0005272C976010000001C7102A90002000032 +:10C0D000D29947110A22DFF8449006FB02F82CE0BF +:10C0E00000210EEBCE0719F80130002003FB08F306 +:10C0F0009B09B3FBF2FC02FB1C33052B28BF01207C +:10C1000060440DE000C5000028DF00002CDF0000C7 +:10C1100034C50000F4E8000055555500D8DF000094 +:10C1200084B2A74298BF012503D9491C89B240298E +:10C13000D9D3AEF1010E1FFA8EFEBEF1000F02D070 +:10C14000002DCDD00CE0002D04BF701E84B207E09E +:10C15000798830461EF097FC7988FFF7EAFE04469E +:10C1600021463046BDE8F0471EF082BC10B5D94CE0 +:10C1700060B11EF0B8FAD8490978084420841EF04E +:10C18000E5FA6084FFF78FFF606212E01EF034FC76 +:10C1900078B961780020FFF747FE0020207004F195 +:10C1A00018001EF059FA002808BFFFF726FE0020ED +:10C1B00010BDFFF7D2FD012010BD10B5C54C217890 +:10C1C000002908BF10BD807C00281EBF0020BDE8EC +:10C1D0001040CBE7C14800210A4606C006C061787E +:10C1E0000020FFF721FE0020207004F118001EF04F +:10C1F00033FA002804BFBDE81040FEE510BD10B5BD +:10C20000B44C2178002908BF10BD817C00291EBFD5 +:10C210000020BDE81040A9E7C189218201894908B1 +:10C220006182C188027C0089490840081EF002FC36 +:10C23000606161780020FFF7F7FD0020207004F1B5 +:10C2400018001EF009FA002804BFBDE81040D4E52C +:10C2500010BD10B59F4C2178002908BF10BD817C0E +:10C2600000291EBF0020BDE810407FE7C189218260 +:10C27000018949086182C188027C00894908400817 +:10C280001EF0D8FB606161780020FFF7CDFD002033 +:10C29000207004F118001EF0DFF9002804BFBDE88B +:10C2A0001040AAE510BD10B580888A4900EB400215 +:10C2B00001EB820E00220EF1280E134614468EE882 +:10C2C0001C00B1F8AC30012282409343A1F8AC309D +:10C2D000AB4F5AC101000000187302A90002000010 +:10C2E0002671F9AC83490968BDE8104008472DE97B +:10C2F000F04185884FF6FF77BD4210D1007BA02822 +:10C3000002BF0120BDE8F0411BF039BBA12802BFEC +:10C310000020BDE8F0411BF032BBBDE8F081417B5D +:10C32000002918BFBDE8F081C1886F4E05EB4502BA +:10C33000490806EB82042186018949086185418903 +:10C340002185017B84F83210C188027B008949086D +:10C3500040081EF079FBE062B6F8AC100120A8405E +:10C360000143A6F8AC10608DDFF88CC107EA4002EB +:10C37000E06A238D41002846DCF800C0BDE8F041AA +:10C38000604710B50168584CA1F504519939052949 +:10C3900028BF10BDDFE801F003061D202300BDE823 +:10C3A0001040A4E78088002200EB400104EB8101EB +:10C3B00028311346944681E80C10B4F8AC200121D2 +:10C3C00081408A434B49A4F8AC200968BDE810407D +:10C3D0000847BDE8104046E7BDE8104019E721785E +:10C3E000002908BF10BD807C00281EBF0020BDE8CA +:10C3F0001040C5E63E4800210A4606C006C06178E6 +:10C400000020FFF71BFD0020207004F118001EF033 +:10C410002DF9002804BFBDE81040F8E410BD10B5A8 +:10C4200004463148017800294FF0010112D1017012 +:10C4300041704FF6FF7141800C2204F11601001D7E +:10C4400020F057FC2D4800210A4606C00120FFF7C6 +:10C4500097FE02E03A20FFF7F1FC2046BDE81040CD +:10C4600020F081BB10B504461F480178A9B901210D +:10C47000017002214170A188418004F1080090E818 +:10C480000C101F4981E80C1001F11C0000210A4624 +:10C4900006C00120FFF774FE03E002213A20FFF7F7 +:10C4A000CDFC2046BDE8104020F05DBB81881548DA +:10C4B000012202804280416010F8180C002808BF59 +:10C4C000A5E47047818801220E48028042804160C5 +:10C4D00010F8180C002808BF99E470470228034997 +:10C4E000998A176801000000147502A90002000073 +:10C4F0003F8927DC88BF02200870704728DF0000D2 +:10C50000988F000038DF000080C5000084C500005F +:10C5100048DF00002CDF000040DF00002DE9F14F74 +:10C5200082B0029800250168DFF8F882A1F5C051B9 +:10C530007139BD4E0E24BD4F072980F03881DFE8E8 +:10C5400001F01A04FE282D81C90004461DF0DEFC0E +:10C5500028B10298FFF76DFF03B0BDE8F08F0D2002 +:10C56000E0744FF0FF3202A906F1380019F060F9CB +:10C5700003B0BDE8F08F41F28B71016045724FF05E +:10C58000FF3202A906F1380019F052F903B0BDE8F4 +:10C59000F08FFFF771FF03B0BDE8F08F00F10801E5 +:10C5A000C7F8A00597F8300580F001001DF040FDA8 +:10C5B00097F8300580F0010087F8300587F82F558F +:10C5C000802087F82E0597F82E051DF052FCE8B163 +:10C5D000D8F8002097F82E154FF4BC5090470190E2 +:10C5E00000B397F82F25D7F8A01597F82E0504EB80 +:10C5F0008202885297F82F054FF0FF32401C87F8CF +:10C600002F0501A906F1380019F012F997F82E0547 +:10C61000401CC0B287F82E0597F82F15042938BFA3 +:10C620009028D0D397F82F0500281CBF03B0BDE891 +:10C63000F08FD7F8A00520F0A0FAC7F8A05503B0F6 +:10C64000BDE8F08F019097F82F1500291CBF491EF7 +:10C6500087F82F154FF0000880881DF05DFD81469A +:10C6600097F82E0590282BD297F82E051DF001FC87 +:10C6700050B997F82E05401CC0B287F82E059028B7 +:10C68000F2D3B8F1010F1BD102994FF4BC500860EE +:10C69000019997F82E05888097F82F0504EB8902F9 +:10C6A000401C87F82F05D7F8A01597F82E0588525B +:10C6B0004FF0FF3201A906F1380019F0B9F802E095 +:10C6C000029820F05AFA97F82F050028B1D003B04D +:10C6D000BDE8F08F1DF01AFD002862D197F83005F3 +:10C6E0004FF02B0980F0010101FB097400FB097177 +:10C6F000DDAB54FF01000000107702A9000200002A +:10C70000CB61996104F2395401F239510522204676 +:10C71000029D20F002FB00224FF0010BD10802F035 +:10C7200007007B180BFA00F093F89935C0B203426A +:10C7300002BF635C834363541BD0D5F80CC0B5F9CA +:10C74000083097F8A8E51CF802C0A3EB0E0AE245F2 +:10C7500000E036E0BCBF635C034309DB97F8A9A5A2 +:10C76000A3EB0A03A3EB0E03634502DD635C834383 +:10C770006354521CD2B2252AD0D397F83005052233 +:10C7800000FB097101F23951204620F017FA90B1EF +:10C79000D8F80020002141F675009047019005224D +:10C7A0002146083020F0B9FA4FF0FF3201A906F116 +:10C7B000380019F047F8029820F0E9F903B0BDE815 +:10C7C000F08F20F0E4F903B0BDE8F08F1D490A783E +:10C7D000027049784170704770B50D46184EA0F54B +:10C7E0007F41FF390CD196F8304504201DF0D4FA72 +:10C7F00088B996F8300506F299511DF023FC0AE03D +:10C8000000F03F0006EBD00191F8311500F0070071 +:10C81000C14001F00104002D08BF84F001042B2069 +:10C8200000FB046000F2395070BD074A107880F0B8 +:10C83000010010701DF006BC34C50000F4E80000D3 +:10C8400078D90000A0DE0000A8DE000070B50D461B +:10C850000446FE491CF0EFF825830020A076A06076 +:10C8600070BD10B50A6812F1020F0DD0B2F1FF3F92 +:10C870001CBF084610BDB0F818C0021D4169022354 +:10C880006046FDF7DDF803E0F149008B0968884751 +:10C89000002010BD10B5EE49096888478B201DF0B7 +:10C8A000BCFEEC490020087010BD70B50D46044672 +:10C8B000E849012008708A201DF0AFFE1BF067FCDC +:10C8C00041082A462046BDE870400123FDF7B8B86C +:10C8D00070B50C4609680025DF4E11F1020F6DD0CE +:10C8E0004FF0010EB1F1FF3F42D0A1F5F8514939A7 +:10C8F0003CD161684369D1F808214FF47A7C520831 +:10C90000237A1C8E010000000C7902A900020000AD +:10C910000C789B3C4261C97BD31A01F00F018173F3 +:10C92000427B0EFA01FE0CFA02FC1FFA8EF240F274 +:10C93000712E03FB0EF3DFF838E34FF6FF751EF898 +:10C94000011090F80CE001FB0EF105EAC11EB3EBFB +:10C950000C014CBF4B420B46A3EB0E03B3F57A7FA1 +:10C9600008DA8388134383800029C188B4BF9143C8 +:10C970001143C1808188A94204BFBE491CF086F8DA +:10C98000204670BD437B72460EFA03F189B211F066 +:10C99000070F18BF05730AD111F0180F18BF0273E3 +:10C9A00005D111F0600F0CBF102108210173058B18 +:10C9B000041D86F88E208A201DF039FE1BF0F1FB45 +:10C9C0004108012322462846FDF744F8002070BDA7 +:10C9D000A449008B096888478B201DF028FE86F843 +:10C9E0008E50F3E770B50C460968A04D11F1020FA7 +:10C9F00030D0B1F1FF3F1CD0A1F5F851493916D123 +:10CA00006168CA7B12094273CB7B03F00F03837307 +:10CA1000D1F808114FEA5101416108D08188A1F590 +:10CA20007F42FF3A14BF944992491CF02FF82046E8 +:10CA300070BD068B041D012085F88E008A201DF034 +:10CA4000F6FD1BF0AEFB4108012322463046FDF700 +:10CA500001F809E08349008B096888478B201DF0A5 +:10CA6000E6FD002085F88E00002070BD10B50A6834 +:10CA70000346084612F1020F18D0B2F1FF3F07D06B +:10CA8000A2F5C852723A09D0022A18BF10BD08E0B8 +:10CA90007A4918461BF0FAFF002010BD4068007A62 +:10CAA00060B96F4918461BF0F1FF07E0188B1EF0C4 +:10CAB00072FA734A01211268B2209047002010BD1B +:10CAC0000846704770B50A680446684E084612F179 +:10CAD000020F37D0B2F1FF3F07D0A2F5C852713A2A +:10CAE00028D0042A18BF70BD27E01BF05AFBB6F807 +:10CAF0009610192201FB02F1DFF888C100EBC1108A +:10CB0000DCF800C001234FF4827241F67511E04752 +:10CB1000A0690AFD01000000087B02A900020000D4 +:10CB2000F8902581A076012086F88E008A201DF0DD +:10CB300088FD1BF040FB4108012300224FF4827066 +:10CB4000FCF792FF002070BD4068007AD0B94949D7 +:10CB500020461BF0A5FF15E047494FF48270096895 +:10CB600088478B201DF06DFD00254C4A86F88E50BD +:10CB70001268A07E01219047464AA57601211268DD +:10CB8000B2209047002070BD70B53D4D04460A6844 +:10CB9000084641F6711695F88D1095F88C30B5F869 +:10CBA00094C0A2EB060EB24231D024DC12F1020F87 +:10CBB00042D0B2F1FF3F18BF70BD00293AD0002B20 +:10CBC00038D1B5F89200B0EB0C0048BF002085B218 +:10CBD0001BF0F1FA1921DFF8C0C005FB01F5DCF804 +:10CBE00000C000EBC51001234FF4827241F67611AC +:10CBF000E047A0761EE0BEF1010F13D0BEF1050F95 +:10CC000018BF70BDB1B1ABB9A5F896C005E04068DA +:10CC10004189A5F89610007A60B1214920461BF0A1 +:10CC20003FFF07E04068007A00281EBF1D492046EC +:10CC30001BF036FF002070BD184AA07E126801214B +:10CC400090470020A07670BD08B50868A0F5F850A0 +:10CC500049381CBF002008BD486841F64871009063 +:10CC600001604FF0FF3269460F4818F0FFFD0020C9 +:10CC700008BD0000A0A2000080C50000A6E00000E2 +:10CC800018E000009C020000E8A20000DCA2000006 +:10CC9000D0A200002CC5000044C5000048C500001B +:10CCA000ACA20000C4A200009CE9000010B501681D +:10CCB0000446A1F5F850493814BFA088B4F8100113 +:10CCC00000F00700094AC0EBC00002EB80002246DA +:10CCD0001BF0B4FE2068A0F5C850703880283EBF15 +:10CCE0002046BDE810401FF066BF10BD18E00000F0 +:10CCF00010B50346D1F800C05A680846BCF1FF3FA2 +:10CD000018BF10BD92F8390040F0080082F83900D1 +:10CD1000FF4918461BF0C4FE002010BD2DE9F0416C +:10CD200085A613BC01000000047D02A900020000DA +:10CD3000E168FBF105460B686C680626FA4F82B085 +:10CD40000846B3F1FF3F18D0A3F5B853843B75D024 +:10CD5000012B00F0A680042B1CBF02B0BDE8F081BF +:10CD600094F8390010F0020F00F0AB80E677EF493D +:10CD700028461BF09FFE00F0A0B8A08801211BF000 +:10CD8000B8FD00251BF029FA79196D1CEDB281F868 +:10CD90003C00082DF6D300251BF01FFA79196D1CF5 +:10CDA000EDB281F84800042DF6D300230093A0884B +:10CDB0000C2301AA04211CF008FE5FEA000817D02A +:10CDC00008223D4607F13C0101981FF0C4FF01987D +:10CDD00095F84810017295F84910417295F84A107B +:10CDE000817295F84B10C172214640461CF00BFE33 +:10CDF00010201AF046FB002821D0CD4B0C221B68D6 +:10CE000001A905209847060026D00198A188017045 +:10CE1000A1880822090A41703D4607F11A01801CC9 +:10CE20001FF099FF019895F82210817295F8231050 +:10CE3000C172C0493046096888470DE016E00123F9 +:10CE40000093A08801AA0D211CF0BFFD20B101991B +:10CE50000E7021461CF0D7FD94F8390020F0080030 +:10CE600084F83900002002B0BDE8F08107F13402F7 +:10CE700007F1240104F120001AF024FE786C2063ED +:10CE8000B86C002360630093A0881A4605211CF04B +:10CE90009CFD21461CF0B7FDA74928461BF00AFE61 +:10CEA0000BE001230093A08801AA0D211CF08DFD49 +:10CEB00001990E7021461CF0A6FD002002B0BDE8CD +:10CEC000F081984928461BF0F5FDF6E710B50246BB +:10CED00008460968A1F5B851FA3918BF10BD406875 +:10CEE000964903890B8043894B8083898B80C38952 +:10CEF000CB80038A0B81438A4B83838A8B83C38ACB +:10CF0000CB83038B0B84438B4B85808B88858C492B +:10CF100010461BF0CFFD002010BD38B503460A684F +:10CF20005C680846B2F1FF3F10D0A2F5B852F93A5A +:10CF30005510169A01000000007F02A900020000AF +:10CF40001580454C18BF38BD94F83900824920F04F +:10CF5000040084F8390018461BF0B6FD002038BDE7 +:10CF600094F83900002340F0020084F8390000935F +:10CF7000A0881A460B211CF032FD21461CF04DFD05 +:10CF8000ECE738B50A6805466C68A2F5B852084661 +:10CF9000FD3A18BF38BD05201CF026FF48B100231C +:10CFA0000093A0881A4606211CF019FD21461CF0AA +:10CFB00034FD94F83900694940F0040084F83900E0 +:10CFC00028461BF081FD002038BD38B50A680546AB +:10CFD0006C68A2F5B8520846FC3A0FD0022A18BF76 +:10CFE00038BD4068007AE07794F8390010F0020FFD +:10CFF00014D0534928461BF067FD13E0002300932B +:10D00000A0881A4606211CF0EAFC21461CF005FD0A +:10D010004E4928461BF058FD002038BD4649284699 +:10D020001BF052FD002038BDF0B506464468086884 +:10D03000424F83B00D46B0F1FF3F12D0A0F5B8507B +:10D04000FB3844D0032861D16868007AE07794F80F +:10D05000390010F0020F55D0394930461BF034FD2D +:10D0600054E0A08801211BF04EFC00230093A0880F +:10D07000162302AA03211CF0B2FC060024D00822C9 +:10D080003D4607F11A0102981FF06FFE029895F8CD +:10D090002210017295F823104172082205F1340123 +:10D0A0000A301FF062FE029895F84410817495F8DA +:10D0B0004510C17495F84610017595F847104175F3 +:10D0C000214630461CF0A9FC002003B0F0BD686882 +:10D0D0003D46C26881683A64F9630069B86407F143 +:10D0E000340207F1240104F120001AF0F5FC686C09 +:10D0F0002063A86C60631A4930461BF0E5FC0020F1 +:10D1000003B0F0BD0C4930461BF0DEFC284603B0EE +:10D11000F0BD38B505460A686C680846B2F1FF3FB5 +:10D1200032D0A2F5B852F93A18BF38BD94F8390098 +:10D1300020F0040016E00000F4A200006CD800000B +:10D140000635328601000000FC8002A900020000C2 +:10D1500092509E3F70A2000014C5000028C5000038 +:10D160009CA3000086D80000C0A30000B4A3000068 +:10D17000CCA3000090A30000002384F839000093A2 +:10D18000A0881A460B211CF034FC21461CF04FFCF1 +:10D19000FF4928461BF0A2FC002038BD94F8390056 +:10D1A000002340F0020084F839000093A0881A465A +:10D1B0000A211CF01EFC21461CF039FCECE770B57E +:10D1C000024654680A68F34D084612F1020F1DD05A +:10D1D000B2F1FF3F08D0A2F5B8527D3A08BF70BD4A +:10D1E000822A18BF70BD35E0A0882883A08801215D +:10D1F0001FF093FB94F8390040F0080084F83900E0 +:10D200000020E07720461DF034F923E020461DF091 +:10D2100042F9A08800211FF080FBA08800211BF0AC +:10D220007CFB94F8390010F0080F1EBFE17F204608 +:10D230001DF0B7F994F83900002120F00A0084F8B5 +:10D2400039004FF6FF702883012341F283720846AC +:10D250001CF0A4FC002070BD70B505460A686C681F +:10D26000084612F1020F1BD0B2F1FF3F10D0A2F519 +:10D27000B852F73A18BF70BD0522416804F13A0070 +:10D2800008311FF07CFDC44928461BF027FC0DE047 +:10D2900020461DF0EEF820461DF049F9002070BD33 +:10D2A00020461DF0F8F820461DF059F9002070BD09 +:10D2B00038B503460A685C68084612F1020F19D0B7 +:10D2C000B2F1FF3F0ED0A2F5B852F63A18BF38BD02 +:10D2D0004068B149007A84F8380018461BF0FEFB1C +:10D2E000002038BD20461DF0C4F8082120461DF05E +:10D2F00003F9F5E720461DF0CEF8A84B0B221B687A +:10D300006946042098470500EAD0E07F222814BF30 +:10D310000021222100980170A1884170A188090A8A +:10D3200081700821C01C1FF008FD009994F8380096 +:10D33000C8709B49284609688847D1E710B503465D +:10D340000A685C6884B0084612F1020F32D0B2F16C +:10D35000AF69B79801000000F88202A9000200003E +:10D3600066B82082FF3F0AD0A2F5B852863A1CBFA9 +:10D3700004B010BD8D4918461BF0BAFB30E0DFF851 +:10D3800038C2A088DCF800C001AB02AA03A9E047BC +:10D390008A49BDF808200968A08B89B2891A039AC6 +:10D3A000400000FB01200390DFF814C2001F400082 +:10D3B000DCF800C0A288012341F28671E04784F8BE +:10D3C0003F00002004B010BDA0881CF0CEFE7D4AB6 +:10D3D00094F83F00126801219047002084F83F0034 +:10D3E000002004B010BD70B505460A686C6882B0B4 +:10D3F0000846B2F1FF3F11D0A2F5B852883A1CBFDF +:10D4000002B070BDA0881CF0F7FE6C4908606E4940 +:10D4100028461BF06DFB002002B070BD0123009375 +:10D42000A088072301AA01211CF0EDFA06001DD0F7 +:10D43000A0880021FFF70CFA0146052201981FF091 +:10D44000A8FCA0881BF03EFAA189491CC1EBC101D0 +:10D45000084485B20198290A45718171002130463E +:10D460001CF0EFFAA08829461CF0AEFE002002B0A6 +:10D4700070BD38B5024654680A68084612F1020FBA +:10D4800018BF38BD04201CF0C3FC60B14F4AA1880E +:10D49000126841F67600904700904FF0FF326946DF +:10D4A0004B4818F00BFA002038BD70B506460A68E4 +:10D4B000746884B0084612F1020F72D03A4DB2F18E +:10D4C000FF3F4CD0A2F5B852873A1CBF04B070BDE4 +:10D4D00005201CF09DFC88B1A08BE988884201BF23 +:10D4E000A08929898842E08904BF6989884205D1D9 +:10D4F00094F8390020F0100084F83900E888A083FF +:10D500002889A0816889E081A988286900EB410009 +:10D51000C5F8BC0005201CF07BFC28B1A978D5F823 +:10D52000BC000844C5F8BC00A889C5F8C0006878EC +:10D53000C5F8C4000120E07705201CF069FC38B173 +:10D54000A878A98A0844801CC1B2A088FBF7D4FC43 +:10D55000204930461BF0CCFA002004B070BDDFF843 +:10D5600019E9322A01000000F48402A90002000037 +:10D570007F40FEF258C0A088DCF800C002AB03AACE +:10D5800001A9E047A889BDF80C10401AA18B80B210 +:10D590004A00019902FB001101912961A17F9DF8C8 +:10D5A000082000FB01202521B0FBF1F201FB120055 +:10D5B0006870A0881AE03BE084A300006CD80000EB +:10D5C000F4A2000014C5000028C5000074C50000C6 +:10D5D00028D9000044C5000048C5000048A3000049 +:10D5E00034C500002CE9000058A20000FBF7A9FC9C +:10D5F00040F27121B0FBF1F0A88205201CF012FC72 +:10D60000002818BFA878A98ADFF800C40844019947 +:10D61000081A001F01904000DCF800C0A288012316 +:10D6200041F28771E04784F83F00002004B070BDEC +:10D63000F74A94F83F00126801219047002084F8CF +:10D640003F0093E74DF804ED03460A68D3F804C0A1 +:10D6500083B00846B2F1FF3F0ED0A2F5B852883A27 +:10D660001CBF03B05DF804FBEA4918461BF04AFAF8 +:10D67000002003B05DF804FB01230093BCF8040014 +:10D680000B2302AA00211CF0C8F9020020D0E249B5 +:10D6900002988B7803708B8843708B881B0A837089 +:10D6A000CB88C370CB881B0A03710B8943710B892C +:10D6B0001B0A83714B89C3714B891B0A03728B89C7 +:10D6C00043728989090A8172002110461CF0C3F94E +:10D6D000002003B05DF804FBF0B507460A687D68DA +:10D6E00083B00846B2F1FF3F70D0A2F5B8528E3A2F +:10D6F0001CBF03B0F0BD4468A17C00295FD1A089A4 +:10D70000401E80B21CF0BCFE0646A88B401E80B2B4 +:10D710001CF0B6FE864205D9A089401E80B21CF0DE +:10D72000AFFE04E0A88B401E80B21CF0A9FEBA4EEA +:10D73000B070A1894A1E9042A8BF481EC0B2B07006 +:10D74000022898BF0220B070DFF8D0C2A888DCF8A9 +:10D7500000C001AB6A4602A9E047A889BDF80010E5 +:10D76000401CC0EBC00080B20144B181A98B029A79 +:10D77000CF438D5E01000000F08602A90002000088 +:10D780008BA8404F490001FB00200290A168411A7C +:10D79000A08901EB4001491E4000B1FBF0F001906F +:10D7A000A189A26801FB00F002EB4000029A801AF6 +:10D7B00000EBD070401048BF0844B080A089F080D2 +:10D7C000E0893081208A70819A4938461BF0A4F99B +:10D7D00006E028461CF028FF974938461BF09CF9C4 +:10D7E000002003B0F0BD70B5446808680D4641F2F2 +:10D7F0007B73C11A012298421FD00EDC8B4910F1B5 +:10D80000020F25D0B0F1FF3F20D194F8390040F04D +:10D81000100084F83900CA7522E0022908BFE277B7 +:10D8200014D0762912D104201CF006FB00281EBF5C +:10D83000132120461CF0F8FE08E004201CF0FCFA3E +:10D8400000281EBF162120461CF0EEFE284670BDA3 +:10D850000020C875012341F27F7201461CF0BCF91B +:10D86000002070BD2DE9F04306460F464468386835 +:10D8700041F282734968C21A83B0984200F0F38083 +:10D8800021DC41F27F73A0EB030298427DD00DDCD6 +:10D8900010F1020F13D0B0F1FF3F40F0548100238C +:10D8A000A0881A4619461CF097F908E0012A6DD0A5 +:10D8B000022A40F04881614930461BF02DF90020D2 +:10D8C00003B0BDE8F083DFF864814FF02809722AC5 +:10D8D0007ED02ADC012A00F0D880712A40F0338102 +:10D8E000087A88F80200B1F80900A8F80400B1F835 +:10D8F0000B00A8F80600B1F80D00A8F80800B1F870 +:10D900000F00A8F80A00B1F81100A8F80C00A088D0 +:10D910001AF0ECFFB8F80C10081A00B200287DDDF0 +:10D92000414930461BF0F8F8C9E7762A00F0E98053 +:10D93000782A40F0088198F8160010F0010F00F0E6 +:10D94000F0800889A8F81A004889A8F81C0088897E +:10D95000A8F81E00C889A8F82000088AA8F82200A4 +:10D96000488AA8F83400888AA8F83600C88AA8F837 +:10D970003800088BA8F83A00488BA8F84400888B38 +:10D980002CE7A1DA01000000EC8802A900020000E7 +:10D990004CB14212A8F846002E49304601E003E09F +:10D9A00027E01BF0C3F894E72B4A0D461268A188C4 +:10D9B00041F674009047029005F108018CC90830C7 +:10D9C0008CC02889208168896081288A2082688AA1 +:10D9D00060824FF0FF3202A9204817F08DFF2049E6 +:10D9E000304600E00DE01BF0A1F8002003B0BDE8D8 +:10D9F000F0831C4930461BF099F8002003B0BDE8C5 +:10DA0000F0830D46A0880831FEF769FFB5F80D00D8 +:10DA1000C8F8BC00A0881AF073FFD8F8BC10081A28 +:10DA200000B2002822DD104930461BF07FF850E795 +:10DA30001CE0000044C5000048C5000024A300000D +:10DA40006CD8000074C5000018A30000F4A2000008 +:10DA500054A30000C0A3000034C500002CE900005E +:10DA60000CA300003CA3000048A3000084F81F9012 +:10DA70003C4930461BF05AF82BE794F8390010F077 +:10DA8000010F08D140F0010084F8390036493046D2 +:10DA90001BF04CF81DE720461CF089FD19E7042017 +:10DAA0001CF0D4F900283FF414AF796847460A897E +:10DAB000A8F81A204A89A8F81C208A89A8F81E20EC +:10DAC000CA89A8F820200A8AA8F822201022123138 +:10DAD00008F124001FF07BF900251AF0BAFB791930 +:10DAE0006D1CEDB281F83400082DF6D300251AF034 +:10DAF000B0FB79196D1CEDB281F84400042DF6D30A +:10DB000094F8390010F0040F0CBF1849184930463A +:10DB10001BF00CF8DDE605201CF098F900281CBF6E +:10DB200094F8390010F0040F3FF4D3AE1149304699 +:10DB30001AF0FCFFCDE600230093A088012302AA7F +:10DB40000D211BF07EFF00283FF4C3AE029A1A217C +:10DB5000117000211BF093FFBBE6384603B0BDE80F +:10DB6000F0830000E0A1000060A3000084A3000097 +:10DB700078A30000A8A30000AFF3008000F031F804 +:10DB800003B400F0CEF803BC00F067F80FB400F067 +:10DB900059F4587901000000E88A02A90002000047 +:10DBA000B859FCAFCDF80FBC06F088FA00F018B8F1 +:10DBB00001B5AFF3008000F0B3F8BDE8014000F01C +:10DBC00002B86FF0000000F001B8000002480349FD +:10DBD000ABBE70477501000018000000260002006F +:10DBE00010B5AFF300800446AFF300802046BDE8D7 +:10DBF0001040FFF7DDBF744600F0A7F8A64601B558 +:10DC000000F0C8F80446BDE8014013B54FF001002C +:10DC10004FF49061A1602060BDE813400146606050 +:10DC2000704710B503B400F0B5F8044603BC626851 +:10DC30006B4602EB000E9E450A6012D813EB0E03F2 +:10DC40000EF580514FEA330301F1070123F007037A +:10DC500021F00701994288BF1946A1EB02006160DB +:10DC600010BD02464FF00000AFF3008010BD2DE95B +:10DC7000FE43AFF3008004460D46F7F73FFB00205C +:10DC8000CDE90045AFF3008002906846F7F734FB1A +:10DC900004460D4617461E46DDE90001AFF300803D +:10DCA000AFF30080AFF3008000210846AFF300809F +:10DCB000804600F075F881460021C0F800800846D3 +:10DCC000AFF30080411CC9F8041000210846AFF3EF +:10DCD00000800021C9F808000846AFF30080002149 +:10DCE000C9F80C000846AFF30080C9F81000AFF384 +:10DCF0000080AFF30080AFF30080AFF30080AFF39C +:10DD00000080AFF30080AFF30080AFF30080AFF38B +:10DD10000080204629463A46334603B0BDE8F083EA +:10DD200010B5AFF300800020AFF30080AFF30080A8 +:10DD3000AFF3008010BD6FF000006FF0020170477C +:10DD400010B5AFF3008010BD7047754600F030F895 +:10DD5000AE46054620F0070069465346854618B092 +:10DD600020B5F7F785FBBDE820404FF000064FF0E7 +:10DD700000074FF000084FF0000B21F00701AC4600 +:10DD8000ACE8C009ACE8C009ACE8C009ACE8C0091F +:10DD90008D4670470148704770470000E8A30000B7 +:10DDA00059328D0C01000000E48C02A90002000031 +:10DDB000A1A122DF0148704770470000F8A30000CE +:10DDC0007047000000487047D8A300000148704722 +:10DDD00070470000DCA300003C9E00005800800B50 +:10DDE00000080100CC9E00006C9E00002001401243 +:10DDF000841301004C9F00009C9E000024014009F8 +:10DE0000C82501008C9F000000000000F1150200F1 +:10DE1000070900002F1602005D160200F11502002E +:10DE20008F160200A3080000131702003D1702001E +:10DE30006717020091170200310900001B18020049 +:10DE4000DD070000A1180200BB180200E51802005F +:10DE50000F190200E9190200191A0200631A0200E0 +:10DE6000BD0B0000CD1A0200F31A0200351B0200A0 +:10DE7000651B0200A11B0200E51B0200151C02002D +:10DE8000451C02006B1C0200951C0200F1150200EB +:10DE9000F1150200F1150200F1150200F115020062 +:10DEA000F1150200F1150200D9090000210A000055 +:10DEB000610A0000910A0000AF0A0000F90A0000A0 +:10DEC000430B0000770B0000F1150200A91E0200B1 +:10DED000E71E0200351F0200771F0200A91F020083 +:10DEE000FB1F02002B200200512002006D210200C6 +:10DEF0009F0B0000732202008D230200B523020055 +:10DF0000E52302002B2402007B0900000000000032 +:10DF10000000000000000000476B020080000000CD +:10DF20003B6B0200000100001D6A0200400000007F +:10DF3000A36A020008000000796A020004000000E1 +:10DF40001B6B0200010000002B6B02002000000090 +:10DF5000616A02000200000000000000FF010000F2 +:10DF6000577002007D700200C17002000F72020043 +:10DF70002F770200337702003F77020057770200C5 +:10DF80005B77020067770200757702007577020001 +:10DF90008577020085770200937702000000000079 +:10DFA0000000000000000000000000000000000071 +:10DFB0004AAE4A2F01000000E08E02A900020000D4 +:10DFC00055499C62000000000000000000000000B5 +:10DFD000000000000000000024000000010001001B +:10DFE0000000000000000000000000000000000031 +:10DFF0000000000000000000000000000000000021 +:10E0000024000000000000000000000000000000EC +:10E0100000000000000000000000000040000000C0 +:10E0200000000201030100000000000000000000E9 +:10E0300000000000000000000000000000000000E0 +:10E040000000FA7D4B3226190F0A00000000000084 +:10E0500000000000000000000000000000000000C0 +:10E0600000000000000000000000000000000000B0 +:10E0700000000000000000000000000000000000A0 +:10E080000000000000000000000000000000000090 +:10E090000000000000000000000000000000000080 +:10E0A0000000000000000000000000000000000070 +:10E0B0000000000000000000000000000000000060 +:10E0C0000000000000000000000000000000000050 +:10E0D00000000000436F70797269676874202863DC +:10E0E0002920313939362D3230313020457870725F +:10E0F000657373204C6F67696320496E632E202A15 +:10E10000205468726561645820436F727465782D7D +:10E110004D332F525644532056657273696F6E20EB +:10E1200047352E332E352E3220534E3A203232349C +:10E1300037312D3130382D31333031202A00000075 +:10E14000F0F0F0F00000000000000000000000000F +:10E1500000000000000000000000000000000000BF +:10E1600000000000000000000000000000000000AF +:10E17000E76B0200336C02000D6C0200AB6B020017 +:10E180008D2402005F240200852502005126020032 +:10E19000C724020013250200B52402005125020005 +:10E1A00037260200D5420200F14202004F7B0200F6 +:10E1B000677B020087720200F5720200ED790200AF +:10E1C000E107539901000000DC9002A90002000061 +:10E1D0002B523BD2BD790200A97A02000D790200D0 +:10E1E000537A020081750200D5750200593502008C +:10E1F0001B2A0200492802002B380200E5360200E3 +:10E200004F2702009D370200E53702005537020014 +:10E21000952C02008D150200AD1502007B2B02002B +:10E220000D6D0200ED6C02002B6F02001D6E0200EE +:10E23000556E020029700200556D0200256D020026 +:10E24000A16D0200416D02008F6F02000F6F02008E +:10E25000E36F0200D9760200F3740200F175020048 +:10E26000357502009F74020061760200397B02005E +:10E27000437B0200A3630200556902007767020036 +:10E28000DF6502002566020095660200A3640200B5 +:10E29000C36402002D640200BD6902009968020097 +:10E2A0005361020089610200E7600200000203017D +:10E2B0000203010103010101010101010000FF7FCF +:10E2C00000F0000000020103000000000000000058 +:10E2D000000000000000000000000000000000003E +:10E2E0000000000000000000FFFFFF1F0000000012 +:10E2F00000007F1703498117044B82170C0883170E +:10E3000008048017008000000000000000000000EA +:10E3100000000000000000000000000000000000FD +:10E3200000000000000000000000000000000000ED +:10E3300000000000000000000000000000000000DD +:10E3400000000000000000000000000000000000CD +:10E3500010B5F1F7EFF9002010BD70B586B0F2F7F7 +:10E3600007FA00F07DFAAFF30080002000F066F9B4 +:10E37000002000F0F3F9002000F074F975480068FF +:10E3800080474421744818F02DFE002173480A4646 +:10E390000B460C460D460E468C468E46A0E87E5037 +:10E3A0001EC0DFF8BCC14FF000539913DCF800C069 +:10E3B0004FF440420020E04780230093694B012244 +:10E3C00069A16B4811F0C6FA8023664C684D009332 +:10E3D000DE0CE27A01000000D89202A900020000DF +:10E3E000DFBA856F04F18003012267A105F13800CF +:10E3F00011F0BAFA8023009304F58073012264A11E +:10E4000005F1700011F0B0FA8023009304F5C07399 +:10E41000012261A105F1A80011F0A6FA8023009362 +:10E4200004F5007301225EA105F1E00011F09CFAF1 +:10E430005E495D4808605E4E00F1100131605D4D3F +:10E4400000F120015C4C2960216888472168306810 +:10E450008847216828688847042000F007FA0020D0 +:10E4600000F0BAF9012305930022544C1E210492B6 +:10E470001B0204F53262029103910193009206237C +:10E480004F4A50A1524811F059FC01230593002234 +:10E49000052104925B0222460291039101930092AE +:10E4A00000234C4A4CA14F4811F048FC01230421A1 +:10E4B000059300220492CB0104F5007202910391AE +:10E4C000019300920123484A48A14B4811F036FCC1 +:10E4D0000123059300220293039304925B0204F547 +:10E4E0008062019300920223444A45A1474811F0FB +:10E4F00025FC01230421059300220492CB0104F59D +:10E50000C06202910391019300920323404A41A10A +:10E51000434811F013FC01230593002202210492C9 +:10E520004FF4C87304F500620291039101930092C5 +:10E5300004233C4A3CA1404811F000FC0123059310 +:10E540000022032104924FF4C87304F5196202916A +:10E550000391019300920523384A39A13B4811F0F9 +:10E56000EDFB06B070BD0000F0C50000FCE000004F +:10E5700050E2000068C50000BC9B00004843495FB2 +:10E5800051000000F4E800004C4D5F510000000015 +:10E590004C4C5F51000000005452414E5F5100004E +:10E5A000544D5356525F5100088D00007CC8000046 +:10E5B00080C8000084C8000024C600009C8F0000B2 +:10E5C000D510000049444C452054687265616400D0 +:10E5D00050E800003D05000048434920546872653A +:10E5E000F3284C0201000000D49402A900020000AC +:10E5F000C6425B1F6164000078E40000A50E0000C5 +:10E600004C4D205468726561640000001CE50000F8 +:10E610007D0C00004C4C2054687265616400000061 +:10E62000C0E50000451200005452414E205468726B +:10E630006561640064E60000D9110000544D535632 +:10E6400052205468726561640000000008E7000011 +:10E65000811100004D424F5820546872656164007A +:10E66000ACE700000849074A0A601F224A600022FE +:10E670008A600A764A764A83002804BF0120C8755A +:10E6800070470000F4E8000080C9000010B550B9E0 +:10E690004FF49C71334818F0B9FC34493248086093 +:10E6A00033490420087013F02CFA044600F0CCFA29 +:10E6B000B4F5A07F88BF64084FF47A71204614F047 +:10E6C00092F9F6F730F914F045FE00F0F7FB14F07C +:10E6D000DFFDF6F7B0FA274800F078FC214800F09B +:10E6E0007AFC244800F022FB1E4C04F14C0000F0A0 +:10E6F00043FB204800F056FB04F1600000F075FB7E +:10E700001C4800F083FB04F1380000F09CFB194822 +:10E7100000F068FC04F1880000F07BFC154800F074 +:10E72000A1FB201D00F0BBFB124800F07FFC04F1B0 +:10E73000240000F098FC0F4800F0A4FC04F17400E1 +:10E7400000F0AEFC0C480068804700F0B3FC0C4AB7 +:10E750000A49126848209047BDE81040482014F04C +:10E76000DBB800009CC90000CC9F0000948F000023 +:10E77000908F000044A100006CC500003927020002 +:10E78000E8C500002DE9F04107464FF486711648B0 +:10E7900018F03CFC144E0120B0754FF6FF7030832A +:10E7A0000020F07506F14C0014F0A2FA06F15400B6 +:10E7B00014F09EFA002404EB440006EB80000546AA +:10E7C0005C3014F095FA05F15C0006F1540114F088 +:10E7D000C7FA641CE4B2082CEDD3384600F07EFD85 +:10E7E000BDE8F04100F014BE6CD8000070B5204CBC +:10E7F000077FCAEF01000000D09602A900020000C6 +:10E8000032AAE5A2A8B104F1480141F6447018F01B +:10E81000D5F904F1080141F6417018F0CFF91A4D0D +:10E820002868804728B118F048F9286880470028F0 +:10E83000F9D10020014684E80300FF22402104F1C1 +:10E84000080018F0B0FBFF22402104F1480018F046 +:10E85000AAFBFF2084F8880084F88900002084F84F +:10E860008B0084F88A004FF48071A4F88C1084F82F +:10E870008F00012084F88E0018F0B1F90449034894 +:10E88000086070BD94E200004CC500009CE90000E7 +:10E890005CC800001549103048707047154914488D +:10E8A0000860164914480860164915480860174959 +:10E8B0001548086017491648086018491648086046 +:10E8C0001849174808601949174808601949184835 +:10E8D00008601A49184808601A49194808601B4915 +:10E8E000194808601B491A480860704760C8000052 +:10E8F000AD12000064C80000D912000068C8000012 +:10E90000FB1200006CC800002313000070C8000058 +:10E91000F113000074C80000E913000078C800007B +:10E920000008010088C80000841301008CC80000A2 +:10E93000C825010090C800000C2F010094C80000F9 +:10E94000342F010098C800005C2F01009CC8000013 +:10E95000802F0100A0C8000070B4DB4ADFF86CC350 +:10E96000DB4C4FF0005141F2520541F2320640F2C9 +:10E970000113B0F5827F3FD1D648C1F80009D648CF +:10E98000C1F80409D548C1F80809D548C1F81009EB +:10E99000D448C1F81409C1F81829C1F83059C1F890 +:10E9A0003469D148C1F86809D048C1F86C09D04829 +:10E9B000C1F87009CF48C1F87809CF48C1F880097B +:10E9C000CE48C1F88809CE48C1F89009CD4AC1F8AF +:10E9D0009829CD4AC1F8A829CC4AC1F8B029C1F874 +:10E9E000B809CB48C1F8C009C1F8043BC1F808CD4B +:10E9F000C1F8284D70BC7047C648C1F80009C64828 +:10EA00001E6E619001000000CC9802A90002000077 +:10EA1000F5B3E7FFC1F80809C548C1F81409C1F802 +:10EA20001829C1F83059C1F83469C248C1F89809A9 +:10EA3000C1F8043BC1F808CDC1F8284D70BC70473F +:10EA4000BD48017821F07F0126310170704710B573 +:10EA500004463B21042013F0F1FD4FF00050B0F8C4 +:10EA6000101B01F47C410A31A0F8101B90F8111B17 +:10EA700021F07001303180F8111B90F8111B21F04A +:10EA8000800180F8111B00210123B4F5827F04BFAF +:10EA9000AA4AC0F81C2BC0F82C1BB0F8302B02F48B +:10EAA0007C4202F10802A0F8302B90F8312B22F0C2 +:10EAB000700202F1100280F8312B90F8312B22F015 +:10EAC000800280F8312B4FF02E0280F8352BB0F801 +:10EAD000402B02F47C42A0F8402B90F8412B22F00E +:10EAE000700280F8412B90F8412B42F0800280F8B0 +:10EAF000412B04BF924AC0F84C2BB0F8502B02F4C3 +:10EB00007C4202F10902A0F8502B90F8512B22F020 +:10EB1000700280F8512B90F8512B22F0800280F87F +:10EB2000512B80F8543B04BF864AC0F85C2BB0F8E8 +:10EB3000602B02F47C420E32A0F8602B90F8612B1F +:10EB400022F07002103280F8612B90F8612B22F0D5 +:10EB5000800280F8612B80F8651BC0F87C1BB0F840 +:10EB6000801B01F47C410831A0F8801B90F8811BC8 +:10EB700021F07001103180F8811B90F8811B21F089 +:10EB8000800180F8811B2F2180F8851BB0F8901B35 +:10EB900001F47C4101F20321A0F8901B90F8911B35 +:10EBA00021F0700180F8911B90F8911B21F08001F9 +:10EBB00080F8911B80F8943BB0F8A01B01F47C41D5 +:10EBC00001F2F311A0F8A01B90F8A11B21F0700135 +:10EBD000303180F8A11B90F8A11B21F0800180F852 +:10EBE000A11BB0F8B01B01F47C4101F50171A0F844 +:10EBF000B01B90F8B11B21F07001103180F8B11BEF +:10EC000090F8B11B21F0800180F8B11BB0F8C01B57 +:10EC1000D26A5B8901000000C89A02A900020000C4 +:10EC2000015B594201F47C411031A0F8C01B90F8FF +:10EC3000C11B21F0700180F8C11B90F8C11B41F08D +:10EC4000800180F8C11B4549C0F8CC1BB0F8D01B2F +:10EC500001F47C410931A0F8D01B90F8D11B21F0C0 +:10EC6000700180F8D11B90F8D11B21F0800180F851 +:10EC7000D11B80F8D43B10BD39485B21016079215C +:10EC80008160704770B505464FF00054B0F5A07F25 +:10EC900094F8040520F00F0094BF801D401D84F8F7 +:10ECA00004053048B5F5827F14BF002101210170B1 +:10ECB00094F80C0A20F07F00263084F80C0A94F8AF +:10ECC000410220F0010084F841022846FFF758FE77 +:10ECD0002846FFF7C6FE5B20C4F85C087920C4F81C +:10ECE00064080A20C4F8800F0C20C4F8440870BDE2 +:10ECF000121052005210130032001300011078005D +:10ED000004102B0005102500111024001510100010 +:10ED10002210400142102C01421006012210040171 +:10ED20004210A40022101C004210AE00221011015B +:10ED30002210FC004210B8004210A6000110900002 +:10ED400005103500151020002210F9000C0A0020D3 +:10ED50004110680044101A004410250024100700D8 +:10ED60005C080020CC8E000010B50146134A144800 +:10ED700014F056F81249134A01F10C0014F050F83F +:10ED80000F49114A01F1180014F04AF80C490F4AD2 +:10ED900001F1240014F044F80D4CE06820B10D4955 +:10EDA000096888470020E0600B49062008700B497D +:10EDB000087010BD024914F01EB800007B19000055 +:10EDC0009CA0000037190000871500007315000093 +:10EDD000D08E000054C5000027C8000028C80000DD +:10EDE00010B50146114A124814F01AF81049114A98 +:10EDF00001F10C0014F014F80D490F4A01F118004C +:10EE000014F00EF80A490D4A01F1240014F008F834 +:10EE10000B4C6069002808BF10BD0A490968884783 +:10EE200059C9C82201000000C49C02A900020000C8 +:10EE300018A387320020606110BD024913F0E5BFBE +:10EE40009F240000CCA0000051200000FD1F000006 +:10EE50006D1E0000F48E000054C5000010B5014680 +:10EE60000E4A0F4813F0E6FF0D490E4A01F10C005F +:10EE700013F0E0FF0A490C4A01F1180013F0DAFF21 +:10EE80000A4C2069002808BF10BD09490968884755 +:10EE90000020206110BD024913F0B7BFFB2A00001B +:10EEA000FCA000006B270000BF2600001C8F0000A4 +:10EEB00054C5000010B501460E4A0F4813F0BAFFC2 +:10EEC0000D490E4A01F1180013F0B4FF0A490C4A2B +:10EED00001F10C0013F0AEFF0A4C6069002808BF76 +:10EEE00010BD0949096888470020606110BD0249CA +:10EEF00013F08BBF7D38000020A10000B137000067 +:10EF000023350000388F000054C500002DE9F04182 +:10EF10004FF4F161394818F0A1F8394A0021394815 +:10EF200013F088FF3749384A01F10C0013F082FFD3 +:10EF30003649374813F069FF0024DFF8D8802F4F97 +:10EF4000264604EB840007EB8005284613F0F8FE04 +:10EF5000204612F0B3FDA86058F82400641CE86055 +:10EF6000E4B22E74092CECD3012087F8240087F832 +:10EF7000B0000024C4EBC40007EB8000B43013F0F1 +:10EF8000DFFE641CE4B20A2CF4D3002407EB8410E7 +:10EF900000F5E67013F0D4FE641CE4B2102CF5D337 +:10EFA00000243D4605EB441000F5D56013F0C8FE83 +:10EFB000641CE4B2052CF5D305F2CC5013F0C0FE6E +:10EFC00005F5BE6013F0BCFE05F21C6013F0B8FE40 +:10EFD00005F23C6013F0B4FE0F480670C5F8606798 +:10EFE0000B48C5F86867C5F86407092085F87507F8 +:10EFF000032085F87407BDE8F0810000D4CA000042 +:10F00000F93D000044A10000093E000050A10000AD +:10F0100020C800007802000024D200000146034A04 +:10F02000034813F007BF024913F0EFBEF14B000095 +:10F0300055C3A6AF01000000C09E02A90002000057 +:10F04000EC4B398F5CA1000010B50C4B00221A600C +:10F0500001460B4A0B4813F0F7FE0A490A4A01F130 +:10F060000C0013F0F1FE0749BDE81040074A01F11A +:10F07000180013F0E9BE034913F0D1BE1CC800000C +:10F08000A14C000068A10000654C0000054C000088 +:10F0900010B501460E4A0F4813F0D6FE0D490E4A30 +:10F0A00001F10C0013F0D0FE0A490C4A01F11800DE +:10F0B00013F0CAFE0A4CE068002808BF10BD0949D9 +:10F0C000096888470020E06010BD024913F0A7BE20 +:10F0D000115100008CA10000F74F0000414F0000CB +:10F0E000788F000054C5000010B50146074A084853 +:10F0F00013F0AAFE0649BDE81040064A01F10C00D3 +:10F1000013F0A2BE024913F08ABE00008353000030 +:10F11000B0A100000353000010B5204C1E49226826 +:10F120000020904722681E490920904722681D4907 +:10F130003720904722681B49382090472268194998 +:10F1400029209047226818490C20904722681749C7 +:10F1500001209047226816490220904722681549ED +:10F160002820904722681449392090472268124984 +:10F170003A209047226810492A20904722680F4978 +:10F180003B20904722680E490E2090472268BDE838 +:10F1900010400C490820104795540000E8C50000B5 +:10F1A000A3540000B1540000D1540000DF5400000B +:10F1B000BF540000ED540000FD5400000D55000048 +:10F1C0001D5500002B55000010B5334A002133486F +:10F1D00013F03AFE3149324A01F10C0013F034FECB +:10F1E0002E49304A01F1180013F02EFE2B492E4A09 +:10F1F00001F1240013F028FE2D492C4A01F10C00E6 +:10F2000013F022FE2A492B4A01F1180013F01CFECC +:10F210002749294A01F1240013F016FE1F49274A05 +:10F2200001F1540013F010FE2649254A01F10C00AB +:10F2300013F00AFE2349244A01F1180013F004FEDA +:10F24000422F3A1101000000BCA002A900020000F8 +:10F25000E494C8521649224A01F1780013F0FEFDE9 +:10F260002149204A01F10C0013F0F8FD1E491F4A04 +:10F2700001F1180013F0F2FD1B491D4A01F12400B1 +:10F2800013F0ECFD18491B4A01F1300013F0E6FDC4 +:10F290000749194A01F1B40013F0E0FDBDE8104040 +:10F2A000164800F05BB9164913F0C3BD9F6C00000F +:10F2B000D4A10000B36A00003B6A0000E7690000C7 +:10F2C00071690000F8A10000276700009566000042 +:10F2D000AF650000BD64000028A20000D1630000FB +:10F2E000AF6000004D6000004CA200000B60000009 +:10F2F000535F0000EF5E0000955E000064A2000016 +:10F30000E0A1000070B5B021104817F0BBFE104D11 +:10F3100001214FF6FF760120012912D321F00102CD +:10F320004FEA510E4FEA821C01FB01F40CFB00F383 +:10F3300093FBF4F30EEB5002801C80B2AB54884276 +:10F34000F4D906EA41014029E5D970BD28DF000063 +:10F35000D8DF000030B549A14A6883B00968494D3B +:10F360000292019100280CBF012495F82D454FF41D +:10F37000B661444817F086FE85F82D4501A90020A6 +:10F3800015F05EF8052201A905F28F5017F0C3FEB3 +:10F39000052201A905F2945017F03FFE052201A9AC +:10F3A00005F2995017F0B7FE052085F8A80585F8F5 +:10F3B000A905402085F8AA054FF4C850A5F8AC056A +:10F3C000FFF70CFF002405EBC40000F59060FFF789 +:10F3D0006AFF641CE4B2142CF5D30B21294815F004 +:10F3E00042FA14F0ACFF0146264815F040FA0C2111 +:10F3F00005F1180015F037FA14F0A1FF014605F1E8 +:10F40000180015F034FA0D2105F1280015F02BFA3B +:10F4100014F095FF014605F1280015F028FA0E2199 +:10F4200005F1300015F01FFA14F089FF014605F1CF +:10F43000300015F01CFA002405EB8410803004F134 +:10F44000800115F010FA641CE4B2102CF4D34FF4D0 +:10F450006586797801000000B8A202A900020000C8 +:10F46000107C76EF00606881288100212973697320 +:10F4700007206875A97585F820101020A884688475 +:10F4800085F8261085F82710FFF746FF03B030BD3A +:10F49000FFFFFFFF1F00000078D900002DE9F041B9 +:10F4A000274A0021274813F0E3FC2649264A01F1A8 +:10F4B0000C0013F0DDFC2349244A01F1180013F07D +:10F4C000D7FC2049224A01F1240013F0D1FC1D4948 +:10F4D000204A01F1300013F0CBFC20491E4A01F113 +:10F4E0000C0013F0C5FC1D491D4A01F1180013F072 +:10F4F000BFFC1A491B4A01F1240013F0B9FC002794 +:10F50000DFF864803C4688F88C7088F88D7088F845 +:10F510008E70A8F89270A8F89470C4EBC40008EB41 +:10F52000800504F580761149284613F08CFC2E8363 +:10F53000641CAF76E4B2AF60052CEED3BDE8F08179 +:10F540002D7C000094A200006D7B0000BD7A0000BD +:10F55000B97A0000657A0000DD790000C4A20000DD +:10F56000DD7800006F78000018E00000A0A2000025 +:10F5700010B504460146364A364813F079FC364A3F +:10F580002146364813F074FC3449354A01F10C0029 +:10F5900013F06EFC3149334A01F1180013F068FC96 +:10F5A0002E49314A01F1240013F062FC2F4A214612 +:10F5B0002F4813F05DFC2E492E4A01F10C0013F088 +:10F5C00057FC2B492C4A01F1180013F051FC2B4A2F +:10F5D00021462B4813F04CFC2A4A21462A4813F0B6 +:10F5E00047FC2A4A21462A4813F042FC2849294A66 +:10F5F00001F10C0013F03CFC2549274A01F11800E9 +:10F6000013F036FC2249254A01F1240013F030FCA6 +:10F610001F49234A01F1300013F02AFC1C49214AFA +:10F6200001F13C0013F024FC19491F4A01F1480084 +:10F6300013F01EFC16491D4A01F1540013F018FC8A +:10F640001349BDE810401A4A01F1600013F010BCE4 +:10F65000D1870000F4A200005387000000A300003F +:10F6600004086E9A01000000B4A402A9580000002A +:10F67000D5D8D46D59860000C58500003F840000B0 +:10F680000784000030A300007B830000E5820000B7 +:10F690005982000054A300000182000060A3000012 +:10F6A000678100006CA30000CF800000E57F0000B0 +:10F6B000877F00003F7F0000EB7E00009D7E000002 +:10F6C000017D0000D57C0000A63A7A1301000000FD +:10F6D000004000AA000200004DCD8CEE02000B029B +:10F6E000111512008C80FE758187120067E582601B +:10F6F000030200067900E94400601B7A009021941F +:10F70000780075A000E493F2A308B8000205A0D920 +:10F71000F4DAF275A0FFE478FFF6D8FD7800E8444B +:10F7200000600A790075A000E4F309D8FC7800E8CD +:10F730004400600C7900900000E4F0A3D8FCD9FAF2 +:10F740000200067488558E4410F58E901FFCE06010 +:10F7500007901FFCE4F0800C901FFD74D5F0900022 +:10F760000D7480F07582002275A800758900C2882A +:10F7700043881043B80190004CE0FA530201BA01EB +:10F780000575870380FE900001E05402FAC313243C +:10F79000FF9200500F900000E0FA74EF5A4410FA04 +:10F7A000900000F0900001E0FA30E2F81203CE750C +:10F7B000D008120E0E75D00075510078877600754E +:10F7C0003900900078E4F0900073E0FA5302FE9064 +:10F7D0000073EAF09000A0E4F09000C8F090007090 +:10F7E000E0FA5302FE900070EAF0900090E0FA53C5 +:10F7F00002FE900090EAF09000C0E0FA5302FE9002 +:10F8000000C0EAF09000D8E0FA5302FE9000D8EA77 +:10F81000F09000E0E0FA5302FC9000E0EAF0900083 +:10F82000E1E0FA5302FE9000E1EAF0758200120274 +:10F830006A758200120282758200120304901F040E +:10F84000E0FA7B00540F60F5C204C2051206CCC278 +:10F8500003900054E4F0A3F0A3F0A3F0900050E074 +:10F86000FA74F05A4409900050F090005CE4F0A360 +:10F870007402F0A3E4F0A3F09000587409F0A374AC +:10F8800001F0A3E4F0A3F09000157430F090001C98 +:10F89000E05480235401FA603F853982120DA6742A +:10F8A00003B53B1B90001EE0FA5302078AF005F0F7 +:10F8B0007401800225E0D5F0FB5539F53A800375D7 +:10F8C0003A00120F2A9000147403F0900018E0FA26 +:10F8D000430203900018EAF0D52EC9B001000000E1 +:10F8E000FC4100AA00020000891853C5900019E0ED +:10F8F000FA430230900019EAF075A8817401B53A14 +:10F900003D7401B53B157402B53C10D20610AF0230 +:10F91000C20612049CA20692AF80E1300420AA8A9B +:10F92000C204754C04EA70010A753E088A3F8A8257 +:10F93000122170AA828A40122170AA828A41300064 +:10F94000BB300E11901FFD74ACF090000D7480F070 +:10F9500043870180FE43870180A2AA8290004CE089 +:10F96000FB53039990004CEBF0E0420290004CEA0C +:10F97000F022AA82BA0002800122901F06E0FA5308 +:10F98000027FEA23235403FB60148A037C00EBF418 +:10F99000FBECF4FC74952BFB74043CFC800B7D00A9 +:10F9A0007494C39AFB74049DFCEC3395E0FAFD5308 +:10F9B000050F90008CEBF0A3ECF0A3EAF0A3EDF0C0 +:10F9C00090007C7466F0A374A6F0A374E6F0A374B0 +:10F9D00002F09000807499F0A374D9F0A37417F02A +:10F9E000A374D9F09000747419F0A37404F0A3E424 +:10F9F000F0A3F022AA829000A0E0FBA3E0FCA3E029 +:10FA0000A3E0FE5304807D005306FC9000A0EBF0C1 +:10FA1000A3ECF0A3EDF0A3EEF0BA00028001229077 +:10FA20001F06E0FA53027FEA23235403FB60148A83 +:10FA3000037C00EBF4FBECF4FC74012BFB740A3C3C +:10FA4000FC8009E4FDC39AFB740A9DFCEC3395E04D +:10FA5000FAFD53050F9000B0EBF0A3ECF0A3EAF031 +:10FA6000A3EDF09000A0E0FAA3E0FBA3E0FCA3E08C +:10FA7000FD43033F4304104305039000A0EAF0A3B5 +:10FA8000EBF0A3ECF0A3EDF09000A474E8F0A37405 +:10FA900004F0A37487F0A3744EF09000A874A0F053 +:10FAA000A37405F0A3740DF0A3745AF0900094E4CD +:10FAB000F0A37405F0A37408F0A37450F0222000A2 +:10FAC00007901F05E0FA80317A7F43A280900800FA +:10FAD000E0FBA3E0FCA3E0A3E05303D77D007E009E +:10FAE000900800EBF0A3ECF033360B460100000069 +:10FAF000F84300AA000200007DF0ED78A3EDF0A32A +:10FB0000EEF08B108C118D128E1353A27F43A280C6 +:10FB1000900828E0A3E0FCA3E0A3E07B005304FCF2 +:10FB20007D007E00E4FFF8F9EA2AFAEF33FFE833BC +:10FB3000F8E933F9EA2AFAEF33FFE833E9335302FD +:10FB4000FC530703E4F8F9EA4203EF4204E84205F4 +:10FB5000E94206430301430404900828EBF0A3ECB8 +:10FB6000F0A3EDF0A3EEF08B108C118D128E1353D9 +:10FB7000A27F43A280900800E0FAA3E0FBA3E0FC90 +:10FB8000A3E0FD430380900800EAF0A3EBF0A3ECB0 +:10FB9000F0A3EDF08A108B118C128D1353A27F22EB +:10FBA00075A00075A10275A40075A21FE5A430E040 +:10FBB000FB75A4007493B5A30280117495B5A302DC +:10FBC000800A7497B5A30280030206A6E5A3C313B7 +:10FBD0005403FAB552028004753C0022EA1475F011 +:10FBE00003A4FBEA75F003A4FAACF074012AFDE467 +:10FBF0003CFE854C2B752C00C3E52B9DE52C6480C9 +:10FC00008EF063F08095F05004753C00220ABA0033 +:10FC1000010CEAB52B08ECB52C04D20F8002C20F00 +:10FC2000300F0FEB243EF886028A48901000EAF06D +:10FC3000800C1B7548889010007488F07A887C01CD +:10FC40007403B50400401AEC2448F8EC2B243EF968 +:10FC50008705A6058C82758310EDF0ED62020C809D +:10FC6000DF901004EAF0E5A430E0FB75A400740F07 +:10FC700055A3F52974F055A3C4540FFC1C1CECC407 +:10FC80000354F8FDE5292DF52AAE2A7F007428C318 +:10FC90009EFEE49FFFC423CEC423541F6ECE541F88 +:10FCA000CE6ECE30E40244E0FF8E3D7428C3952A28 +:10FCB0005407F5538529F005F07401800225E0D53D +:10FCC000F0FB14F528E52A7009901004EAF0753C61 +:10FCD0000122BC051F7A00300F08901000E54FF09C +:10FCE000800D7460554F4404FF901000F00552756C +:10FCF0003D018065AF3D7E0089E98E1D0100000059 +:10FD0000F44500AA0002000064083308AD537B00EC +:10FD1000ED2FFFEB3EFE1FBFFF011E8F8274102EE2 +:10FD2000F583EAF0EC2448F88603E528F4FD520355 +:10FD3000901000EBF0E06202901000E0FB8529F0EB +:10FD400005F0EB8002C313D5F0FB901000F0EC043B +:10FD5000FB7D01BB040050158D060D8E827583104E +:10FD6000EB2448F8E6FEF0EE62020B80E67B008CA6 +:10FD7000051CED602AE5A430E0FB75A400E5A36254 +:10FD800002BB04005012EB2448F8E6FDB5A3028044 +:10FD900004753C00220B80D7EA60D4753C0022E554 +:10FDA000296033E5A430E0FB75A400E52855A36283 +:10FDB00002E52855A36202EA601C753C00227478B3 +:10FDC000B5A307121E31753C0122E5A37004753CF2 +:10FDD0000122753C00227428B52A05753C03800376 +:10FDE000753C01227511007B157C1F74FC25115098 +:10FDF0000122901F04E0FD8511F005F07E017F00D7 +:10FE00008006EE2EFEEF33FFD5F0F77A00ED5206B6 +:10FE1000EA5207EE4F700AE511245BF87600020CF7 +:10FE2000C9E5112400F582E4341FF583E0FA53029A +:10FE30000F7D007409B502005003020CC4EA2A2A9F +:10FE400090072C7302074A02074A020B1E02082081 +:10FE5000020CC4020B900209C6020C76020C2B02A3 +:10FE600009C6E55154036003020CC9E5112400F5ED +:10FE700082E4341FF583E0FD530520E403CDC40381 +:10FE800054076DCD5407CD6DCDFE4D6003435180B9 +:10FE9000BA0114AD517E00ED546F7003EE600302A1 +:10FEA0000CC94351028003435104433901E5112435 +:10FEB0005BF876018B128C138B828C83E0FF8F4D65 +:10FEC0008B828C83A3E0FF8F4E740C2BF582E43C75 +:10FED000F583E0F54FE55130E2048B248C25741254 +:10FEE0002512F582E43513F583E0FF30E406754C06 +:10FEF00000020CC9AF4D5307C0E4A2E7CF33CF33A4 +:10FF0000A2E7CF33CF33CF54615C650B0100000013 +:10FF1000F04700AA0002000090E08DB503EF75F0F5 +:10FF200003A42404F54C7D00EDB54C004003020C05 +:10FF3000C9ED243EF874022512FEE43513FFED2EC0 +:10FF4000F582E43FF583E0FEF60D80DC433902E5FF +:10FF500011245BF876028B148C158B828C83E0FF66 +:10FF60007D0020E62F74012BFDE43CFE8D828E8304 +:10FF7000E0FF8F548D828E83A3E0FF8F558D828E9C +:10FF800083A3A3E0FF8F568D828E83A3A3A3E0FDFE +:10FF90008D578002D205C003C00485148285158365 +:10FFA000A3A3A3A3A3E0F55874092514FDE4351514 +:10FFB000FE8D828E83A3A3E07862C4540FF685146D +:10FFC00082851583E0FD530580E4A2E7CD33CD3370 +:10FFD000CD54014D24FF9210740D2514F582E435A3 +:10FFE00015F583E0FD74805DFFE4A2E7CF33CF33E6 +:10FFF000CF54014F24FF9211530540E4A2E7CD33C3 +:020000023000CC +:10000000CD33A2E7CD33CD33CD5403FE4D24FF9243 +:10001000129014A07450F0D004D00375100074FC3A +:100020002510405520051BAE107F000EBE00010FAD +:10003000EE24A0F582EF3414F583E5102454F8E69D +:10004000FEF0C003C004AE107F0074052EFEE43F36 +:10005000FFEE24A0FEEF3414FF74052514FDE435F3 +:1000600015FBE5102DF582E43BF583E08E828F834E +:10007000F00510D004D00380A575100074FD251084 +:100080004037C003C004AE107F0074092EFEE43F69 +:10009000FFEE24A0FEEF3414FF74092514FDE435AF +:1000A00015FBE5102DF582E43BF583E08E828F830E +:1000B000F00510D004D00380C39014ABE0FD5305CD +:1000C000FE9014ABEDF085142685152790009CE476 +:1000D000F0A37407F0A3E4F0A3F090009BE0FD749C +:1000E000C05D4404FD90009BF090009A7458F002AB +:1000F0000CC98B168C17E4BA090104FA701174123A +:100100002BF582E43CF583E0FF20E003020AA8E53A +:100110005154036003020CC995AB21B801000000E3 +:10012000EC4900AA0002000057F98FE8E51124000D +:10013000F582E4341FF583E0FF530720E403CFC4C6 +:100140000354076FCF5407CF6FCFFD4F6003435168 +:1001500080433901E511245BF8860574014DF643AF +:100160005108851682851783E0FD8D4D85168285A1 +:100170001783A3E0FD8D4E740C2516F582E4351728 +:10018000F583E0F54F74122516F582E43517F583F3 +:10019000E0FD30E405754C008042AD4D5305C0E4F0 +:1001A000A2E7CD33CD33A2E7CD33CD33CD5403FE1B +:1001B000ED75F003A42404F54C7D00EDB54C005022 +:1001C0001BED243EF874022516FEE43517FFED2ED4 +:1001D000F582E43FF583E0FEF60D80DFEA60094337 +:1001E000510485162485172574122516F582E435E9 +:1001F00017F583E0FA20E103020CC943390CE5113D +:10020000245BF88602740C4AF67886E64402F6E52A +:10021000112400F582E4341FF583E0FA530220E450 +:1002200003CAC40354076ACA5407CA6ACAFD4A60AB +:10023000067886E64480F67A00BA06004003020C8F +:10024000C9EA2475F874022516FDE43517FE740218 +:100250002A2DF582E43EF583E0FDF60A80DBAA5103 +:100260007D00EA54EF7003ED6003020CC9435101B5 +:10027000433901E511245BF876018B188C198B82C8 +:100280008C83E0FE8E4D8B828C83A3E0FE8E4E8BA2 +:10029000828C83A3A3E0FE7860A6068B828C83A366 +:1002A000A3A3E0FE7861A606753B007E00BE0400B5 +:1002B0004003020CC9EE243EF874042518FFE4350F +:1002C00019FAEE2FF582E43AF583E0FAF60E80DDB6 +:1002D00043390CE511245BF8760C8B1A8C1B7410D7 +:1002E0002BFEE43CFF8E828F83E0FA7863A6028EB9 +:1002F000828F83A3E0FA7864A6027A00BA080050DD +:1003000014EA2465F8EA251AF582E4351BF583E042 +:10031000FDF60A80E77A00BA0800501BEA246DF85F +:100320007408251AFDE4351B7D07491501000000FE +:10033000E84B00AA00020000A3113155FEEA2DF59A +:1003400082E43EF583E0FDF60A80E07886E644012B +:10035000F6E5112400F582E4341FF583E0FA530238 +:1003600020E403CAC40354076ACA5407CA6ACAFD10 +:100370004A7003020CC97886E64480F6020CC98BE9 +:100380001C8C1D7E00BE0800501BEE247BF87402FE +:10039000251CFFE4351DFAEE2FF582E43AF583E0E3 +:1003A000FAF60E80E0851C82851D83E0FA7883A62C +:1003B00002851C82851D83A3E0FA7884A602433956 +:1003C00010E511245BF8761080538B028C057412B3 +:1003D0002BF582E43CF583E0FE30E21C433901E575 +:1003E00011245BF87601435110900078E0FE74FE12 +:1003F0005E4401FE900078F074122AF582E43DF527 +:1004000083E0FA30E31743390CE511245BF8760CEE +:100410007886E64404F6800575870380FE0511742E +:10042000132BFBE43CFC0206D3740E2524F582E476 +:100430003525F583E0FA530AF0E4C4CAC4540F6AC0 +:10044000CA540FCA6ACA8A50740E2524F582E4354C +:1004500025F583E0FA530A0F430A70901001EAF081 +:1004600074102524F582E43525F583E0901002F020 +:1004700074112524F582E43525F583E0901003F00E +:10048000901004E4F074112524F582E43525F583F9 +:10049000E0FA530AF0E4C4CAC4540F6ACA540FCA3B +:1004A0006ACA785FA60A740F2524F582E43525F51B +:1004B00083E0FA530A0F7B00EA60387B00EBB50A51 +:1004C0000050288B0C7D0074052CFCE43D2410FDAD +:1004D00074132524FEE43525FFEB2EF582E43FF569 +:1004E00083E0FE8C828D83F00B80D274052A9010FD +:1004F00000F0229010007405F022AA82C207C20800 +:10050000EA30E504D208801AEA30E002D207EA3085 +:10051000E404D208D2077B00EA54EE7003EB6002D9 +:10052000D20830071220080F90017EE0FA748F5A2B +:10053000440890017EF02220EE54A1D30100000077 +:10054000E44D00AA00020000BAE9EF2507123008C6 +:100550000F90017EE0FA74975A441090017EF022C9 +:1005600030081230070F90017EE0FA74E75A4460B9 +:10057000FA90017EF022900008E05478C423541FC2 +:10058000F53BC20D753C0278877600C20E227401DD +:10059000B53A02801C7402B53A0280237404B53A5D +:1005A00002802A7408B53A0280237410B53A398063 +:1005B0002A900070E0FA530AFE900070EAF0229050 +:1005C0000090E0FA530AFE900090EAF0229000C0FA +:1005D000E0FA530AFE9000C0EAF0229000D8E0FA58 +:1005E000530AFE9000D8EAF022900078E0FA530215 +:1005F000DE900078EAF09000A0E0FA5302FC900050 +:10060000A0EAF09000C8E0FA5302FE9000C8EAF0B9 +:100610009000E0E0FA5302FC9000E0EAF075D008A8 +:10062000120E2675D00022120E0E75820075D000B3 +:1006300012026A75D008E55130E01A900078E0FAAD +:10064000530AEF900078EAF0900073E0FA530AFE44 +:10065000900073EAF0E53A7012853982F5D0120DF8 +:10066000A675D000120F2A75D008227401B53A0E73 +:1006700075820075D00012028275D0088011740254 +:10068000B53A0C75820075D00012030475D00802CB +:100690000FA8900059E0FA74FE5A4401FA900059EC +:1006A000F0E53930E013758200120282900078E0A4 +:1006B000FA430201900078EAF0E53930E1157582DD +:1006C000001203049000A0E0FA74FE5A4401FA906C +:1006D00000A0F0E53920E205E53930E30F9000C8CD +:1006E000E0FA74FE5A4401FA9000C8F0E53930E4AB +:1006F0000F9000E0E0FA74FE5A4401FA9000E0F036 +:10070000900044740AF0A3E4F0A3F0A37420F02254 +:10071000900059E0FA74FE5A4401FA900059F074BE +:1007200001B53A02801C7402B53A0280267404B501 +:100730003A0280307408B53A0280297410B53A4400 +:100740008033900078E0FA74F61FB2640100000074 +:10075000E04F00AA000200004E015198FE5A4401E9 +:10076000FA900078F080319000A0E0FA74FE5A44CC +:1007700001FA9000A0F080209000C8E0FA74FE5AC0 +:100780004401FA9000C8F0800F9000E0E0FA74FE97 +:100790005A4401FA9000E0F0900044740AF0A3E497 +:1007A000F0A3F0A37420F022AA82D20D900051E0B1 +:1007B000FB74FE5B4401FB900051F07403B50A002A +:1007C00050030210DCEA2A2A9010507302105C02D7 +:1007D000109102109F0210ADAA3D900071EAF0A2A4 +:1007E0000AB3E43325E025E0FA530A04A20BB3E48C +:1007F00033C40354F8FB74085B420AE553C4235422 +:10080000E0FB74E05B4A4403900070F022AA3D9044 +:100810000091EAF09000907403F0229000C0E0FA9A +:10082000430A039000C0EAF022901200E0FA530A53 +:1008300002BA02047A1080027A00901200E0FB53A0 +:100840000B01BB0103430A08AB3D9000D9EBF04319 +:100850000A039000D8EAF022C20D22E582FA602352 +:100860009000147420F0900018E0FA74DF5A4420CD +:10087000900018F090004BE0FA747F5A448090008A +:100880004BF022900018E0FA530ADF900018EAF0CB +:1008900022C023C0E0C0F0C082C083C002C003C039 +:1008A00004C005C006C007C000C001C0D075D00894 +:1008B000900014E0FA8A2D900015E0FA8A2E90003C +:1008C00016E0FA8A2F900014E52DF0900015E52E21 +:1008D000F0900016E52FF0900018E0552DF52D90C2 +:1008E0000019E0552EF52E90001AE0552FF52F74C3 +:1008F00001552DFA700302125790001CE0FA740B98 +:100900005AF53890001EE0FA530A0790001CE0A345 +:10091000E0A3E0FDA3E0FE530DC0530E7F8D0BEE70 +:10092000A2E7CB33CB33A2E7CB33CB33CB5403FC9F +:100930007D007E008B358C36E53A6004E53B701116 +:100940008AF005F07401800225E0D5F0FB5539F5F9 +:100950003A74085538C423544128598F01000000C7 +:10096000DC5100AA00020000301AF6281FFA6025A8 +:100970007406B53B03753B077407B53B02800C74E6 +:1009800005B53B0280057410B53A05120FA88057D3 +:10099000120EBF80527401B53A02801C7402B53A3F +:1009A00002801A7404B53A0280187408B53A0280BD +:1009B000227410B53A31802C12153A802A1218F799 +:1009C000802575822275D00012026A75D008121C2B +:1009D00001801475824475D00012026A75D0081225 +:1009E0001C018003121E7A7402552DC313FA700382 +:1009F0000213F0900059E0FA74FE5A4401FA900094 +:100A000059F07401B53A0280227402B53A02806F3F +:100A10007404B53A030213437408B53A030213434E +:100A20007410B53A030213960213EE900078E0FAC0 +:100A300074FE5A4401FA900078F0200D030213EE80 +:100A40001214B72003030213EE9000A0E0FA530A39 +:100A5000FE9000A0EAF09000C8E0FA530AFE900071 +:100A6000C8EAF09000E0E0FA530AFE9000E0EAF0F5 +:100A7000853A8275D000120DA675D0080213EE904B +:100A800000A0E0FA74FE5A4401FA9000A0F0200D94 +:100A9000030213EE1218552003030213EE900078A0 +:100AA000E0FA530AFE900078EAF09000C8E0FA53AA +:100AB0000AFE9000C8EAF09000E0E0FA530AFE90C7 +:100AC00000E0EAF0853A8275D000120DA675D008D4 +:100AD0000213EE9000C8E0FA74FE5A4401FA900046 +:100AE000C8F0200D030213EE121B53200303021360 +:100AF000EE900078E0FA530AFE900078EAF0900059 +:100B0000A0E0FA530AFE9000A0EAF09000E0E0FABC +:100B1000530AFE9000E0EAF0853A8275D000120D8B +:100B2000A675D00880589000E1E0FA530AFE9000C4 +:100B3000E1EAF09000E0E0FA74FE5A4401FA900015 +:100B4000E0F0300D39122146300333900078E0FA9E +:100B5000530AFE900078EAF09000A0E0FA530AFEF3 +:100B60009000A0EAF09000C8922CE921010000005A +:100B7000D85300AA00020000C4F24895E0FA530AD4 +:100B8000FE9000C8EAF0853A8275D000120DA67575 +:100B9000D008C2037420552DC4035407FA600675AB +:100BA00082001210DFAA2E74045A0303543FFB6024 +:100BB0002A900161E0FB200107EB54A0600280193C +:100BC000300107EB54506002800F900001E0FB748D +:100BD000FB5B4404FB900001F0D202530A10EAC40C +:100BE000540FFA6038900008E0FA530A8790000822 +:100BF000EAF085398275D000120DA675D008753AD5 +:100C00000075D000120F2A75D0089000147403F0FC +:100C1000900018E0FA430A03900018EAF074205597 +:100C20002EC4035407FA601675D000120E8175D0D9 +:100C300008900018E0FA530AFC900018EAF0D0D0AF +:100C4000D001D000D007D006D005D004D003D00208 +:100C5000D083D082D0F0D0E0D023327403B53B00F3 +:100C60004053E53B253B253B9014C8730214D40246 +:100C700014EF0215090214D4E55130E00F9000780A +:100C8000E0FA74EF5A4410FA900078F0753B01D204 +:100C9000038022E55130E005753C0280187403B5ED +:100CA0003C06300F03753B02753C0280083000059E +:100CB000D20E75A800C20D22901000E54DF09010E4 +:100CC00001E54EF0755300C20BD20A753D027582E4 +:100CD0000012102C755201E54C7002D204229012C1 +:100CE00000E0FABA2616E53B7012200D0FAB517CDE +:100CF00000EB54EF7003EC6003021514BA521BE5CD +:100D00003B60057403B53B12200D0FAB517C00EB2B +:100D100054EF7003EC60030215147401B53B0280BC +:100D2000030215EF7401B53C4874015538FB703E61 +:100D3000E55130E02F74025538C313FB70237478EB +:100D4000B5A303021E5C7426B5A301227452B5A399 +:100D50000122753B029000707401F0D20E75A8005C +:100D600022020EBFC20BD20A75820002102C020EA4 +:100D7000BF7403B53C15E53887078DA90100000055 +:100D8000D45500AA00020000DD0A96E55403600273 +:100D9000800AD20BD20A75820002102C020EBFE527 +:100DA0003C600122020EBF7402B53B0280030217B1 +:100DB00006C209E538540360030216FDBA50030267 +:100DC00016ABBA93030216CFBA95030216CFBA97A1 +:100DD000030216CFBAE0028008BAF002804F021672 +:100DE000D4E55130E242C3E5359404E53694004041 +:100DF00037900070E0FB74FE5B4401900070F012CD +:100E00000CD5901000E0F53DD20A755300758200B4 +:100E100012102C901201E0C4540FFBB55000400397 +:100E20000216FF8B500216FFD2090216FFE5513061 +:100E3000E32D901202E0FBBBD425901203E0701F5B +:100E4000C3E5359412E53694004014900070E0FB41 +:100E500074FE5B4401900070F0D20E75A80022D29F +:100E60000980547404B53506E4B536028002801357 +:100E7000900008E0FB74875B4418900008F0120EA5 +:100E8000BF8034D2098030120EBF802BC37402950C +:100E900035E495364004D209801D3000149000706E +:100EA000E0FB74FE5B4401900070F0D20E75A80068 +:100EB00022D2098002D20920090122020EBF740643 +:100EC000B53B0474018001E4FB700302178074F0E9 +:100ED0005AFCBCD063C3E5359404E5369400405811 +:100EE000E538540360028021901000EAF0753D015E +:100EF000D20A755300C3E5359405E53694005003D6 +:100F0000753B0775820002102C753B07900059E075 +:100F1000FC74FE5C4401900059F0900078E0FC7491 +:100F2000FE5C4401900078F0900044740AF0A3E461 +:100F3000F0A3F0A37420F0227407B53B028003EB0A +:100F40006015E5385403600280079000707401F06A +:100F500022753B07020FA8E55130E44ABAF04790EA +:100F60001202E0FABAD43F901203E07039C3E535BB +:100F70009412E5369400402EE53B60057403B53BC2 +:100F800025200D22900070E0496534B60100000074 +:100F9000D05700AA0002000029E22858FA74FE5A2D +:100FA0004401900070F0900008E0FA74875A4410F1 +:100FB000900008F0D20E75A80022020EBF900054D7 +:100FC00074A0F09000557414F0753D0C75820112F8 +:100FD000102C30054BE58AFA70010A8A549014A14E +:100FE000EAF08A8275D00012217075D008AA828A30 +:100FF000559014A2EAF08A8275D00012217075D043 +:1010000008AA828A569014A3EAF08A8275D0001248 +:10101000217075D008AA828A579014A4EAF0C205FC +:10102000227401B53B02800E7402B53B0280197434 +:1010300004B53B438012900054E4F09000557410C6 +:10104000F0753B04D203802F901200E0FABA1D1312 +:101050003000249000A07401F0753B02D20E75A8F8 +:10106000008014BA5011900008E0FA74875A4418AE +:10107000900008F0120EBFC20D22AA82BA0103022C +:1010800017F1EA14558A04F5597401B5590302178A +:10109000F1301103020EBF900059E0FA74FE5A4479 +:1010A00001900059F09000A0E0FA74FE5A440190BB +:1010B00000A0F0900044740AF0A3E4F0A3F0A3743D +:1010C00020F022753CFF74025538C313FA60030206 +:1010D0000FA8901200E0FABA050280030219BA7450 +:1010E00005B53506E4B5360280030219BA9012013F +:1010F000E0FB901202E0FC74075CF5F005F074016F +:10110000800225E0D5F0FBFD7410B50D0050027D86 +:1011100010ECA2E5920C400D9014A9E0FE530E884D +:101120009014A9EEF0EC20E3087403B53B03021B16 +:1011300050EB70047C01802DEBB558047C018025B8 +:10114000EB540F6002801CEBC4540FFBBB09005032 +:101150000EE558C4540FFEEBB50E047C0180067CEE +:101160000080027C00EC6008753B018D820218AEA5 +:10117000301003021B50900008E0FB530B879000D7 +:1011800008EBF0021B507401B53B317403B5350612 +:10119000E4B536028002802480774D1601000000FD +:1011A000CC5900AA00020000EEFB2A0574F05AC4D4 +:1011B000540FFBFD601A8A0B7E00530B0FBB05100A +:1011C000BE000D0DEDB559028003021B500217F150 +:1011D0007404B53B028003021B44BA1D0280030263 +:1011E0001AEAC3E535940BE53694005003021AEA77 +:1011F00030120F30000C9000907401F0D20E75A8E0 +:1012000000227C019000907401F07B00BB04005030 +:10121000258B0D7E000DBD00010E8D8274122EF502 +:1012200083E0FDEB2454F8860EEDB50E0280047CBD +:101230000080030B80D6901208E0FB530B0FEC707C +:1012400003021B50BB0F004003021B50200C0C90EC +:101250001206E0FB54F06003021B50901207E0FB03 +:10126000530BF9BB01028003021B50901000E4F005 +:10127000C3740B9535E495365047852682852783C0 +:10128000E0FB530B3F7D00EBF53204F53D7531007B +:10129000E531B53200502DAE317F000EBE00010F9A +:1012A00074102FFF740F2526FBE43527FDE5312B45 +:1012B000F582E43DF583E0FB8E828F83F00531807B +:1012C000CF753D0175820102102CBA50637407B5C9 +:1012D0003506E4B5360280028056E53B6052740361 +:1012E000B53B02804B7C017A00BA040050258A0B82 +:1012F0007D000BBB00010D8B8274122DF583E0FB8A +:10130000EA2454F8860DEBB50D0280047C008003BE +:101310000A80D6EC601A901000E4F0753D017582E9 +:101320000102102C7407B53B079000907401F02265 +:10133000020FA8E4B53B02800C7401B53B02800D9E +:101340007403B53B08753B01753CFFD203C20D2207 +:10135000901203E0FA901201E0FB8B33901202E04E +:10136000FB8B34200003021BFDBA0102800C74FFCA +:10137000B5330774FFB53402803874FFB53302808B +:10138000077863E6FAB5332674FFB5340280077830 +:1013900064E6FAB534187887E6700A788679877437 +:1013A0000156F780287887B692DD6C99010000001D +:1013B000C85B00AA000200001A1394B802237582C9 +:1013C0000022758200227887E670167886E630E182 +:1013D0000678877602800A7886E630E00478877699 +:1013E000017887E6600B78878682121D88758201F6 +:1013F000227582002274025538C313FA6003020F6B +:10140000A8E4B53B0280107401B53B03021CA8742C +:1014100003B53B02800122901200E070357405B5DF +:101420003506E4B536028002802830001A7886E658 +:1014300030E7149000C0E0FA74FE5A44019000C0F6 +:10144000F0D20E75A80022121B70E5826001220204 +:101450000FA87886E630E241C3E5359410E536946E +:10146000004036901200E0FABAD42E901201E070DB +:1014700028200D253000229000C0E0FA74FE5A4466 +:10148000019000C0F0900008E0FA74875A44109070 +:101490000008F0D20E75A80022020FA82000012239 +:1014A000901200E070187405B53506E4B536028078 +:1014B00002800B121B70E582600122020FA8788760 +:1014C000B6022DC3E5359410E5369400405C9012C9 +:1014D00000E0FABAD454901201E0704E9000C0E0DF +:1014E000FA74FE5A44019000C0F0D20E75A8002292 +:1014F000901200E0FABA0200402D901200E0FA7457 +:101500000CB50A004021901200E0FA74016A6017DD +:101510009000C0E0FA74FE5A44019000C0F0753BA0 +:1015200002D20E75A80022020FA8227A029012049D +:10153000E0540FFB600FE58A520B7C02EB60040C59 +:101540001B80F98C0AE4FCCC5403A2E0CC13CC132E +:10155000A2E0CC13CC13CCFDEA030354C0FBEA0396 +:1015600003543F4CFC7A00530D0F430D8090004410 +:10157000EAF0A3EBF0A3ECF0A3EDF022AA82901026 +:10158000007412F09010017401F0BA02379010024A +:101590007401F090100374FEF07A047B00BB060027 +:1015A00050108A82758310EB2475F8E6FCF00A0B64 +:1015B00080EB7B00BB0800507C0A5FEB0100000061 +:1015C000C45D00AA0002000003EB4AC8638A82756A +:1015D0008310E4F00A0B80F07A027B00BB08005015 +:1015E000108A82758310EB2465F8E6FCF00A0B8004 +:1015F000EB7B00BB080050108A82758310EB246DD2 +:10160000F8E6FCF00A0B80EB901203E0FBBB012034 +:101610008A827583107863E6FBF00A8A82758310EC +:101620007864E6F0901000E0FA0A0A901000EAF000 +:10163000121D3775820202102C786086029010000D +:10164000EAF078618602901001EAF0901002E53E1F +:10165000F0901003E53FF0901004E540F090100585 +:10166000E541F022755300D20BD20A753D06900079 +:1016700073E0FA74FE5A4401900073F07582000220 +:10168000102C7401B53B0B7885E660067885160250 +:1016900020F5C3E5359404E53694005003020FA805 +:1016A000E53830E103020FA87403B53B0280030262 +:1016B0001F14901200E0FA30E55F901200E0FA206B +:1016C000E2577A00BA08005026EA247BF8860B8A93 +:1016D0000C7D0074022CFCE43DFD8C8274122DF50F +:1016E00083E0FCEBB50C028003020FA80A80D590C2 +:1016F0001201E0FABA260E901000E4F0753D017573 +:10170000820302102C9000D8E0FA74FE5A44019033 +:1017100000D8F0D20E75A80022020FA8901201E0A6 +:10172000FABA0102800302208C901200E0FA20E253 +:101730000302208C901200E0FA30E428C3E53594CF +:1017400006E53694005003020FA8901202E06010E4 +:10175000901202E0FA7883E6B50A028003020FA82D +:101760007A038010C3E5359405E5369400500302F2 +:101770000FA87A028A82758312E0C423541FFB8A61 +:1017800082758312E0FC530C07901200E0FD30E5F7 +:1017900006788576008045EB247BF8860D8CF00575 +:1017A000F0ED8002C313D5F0FBFD7885A60D74041F +:1017B000B50C005021BB0700501CEB04247BF886BD +:1017C0000E7408C39CF5F005102A9EEB0100000082 +:1017D000C05F00AADC010000F0945518F0EE800212 +:1017E00025E0D5F0FBFE4D7885F67885E6540FF6BA +:1017F000EC6052EB247BF8860C8A0D7E000DBD0058 +:10180000010E7F00EB2DFDEF3EFE8D8274122EF552 +:1018100083E0620C8A82758312E0FB530B078BF026 +:1018200005F07B017D008006EB2BFBED33FDD5F051 +:10183000F71BBBFF011D7E00EC520BEE520DEB4D72 +:101840006003020FA88A0B7C128A82758312E0C49F +:1018500023541FFD8B828C83F08A0B7C128B828C2D +:1018600083E060418A0B7C128A82758312E0FD1D41 +:101870008B828C83EDF08A82758312E0FB247BF8E7 +:10188000860C8A0D7E000DBD00010E7F00EB2DFD44 +:10189000EF3EFE8D8274122EF583E0FBECB50B0259 +:1018A00080B7020FA80220F5901201E0FABA0247B1 +:1018B000901200E0FA20E23F901200E0FA30E537A3 +:1018C0007A00BA08005049EA247BF8860B8A0C7D1E +:1018D0000074022CFCE43DFD8C8274122DF583E033 +:1018E000FCEBB50C028003020FA8753B03C00A1283 +:1018F0000FA8D00A0A80CB7402B53B149000D8E040 +:10190000FA74FE5A4401FA9000D8F0D20E75A8007D +:10191000227885E67038901000E4F0901001788409 +:10192000E6F07A00BA0800501C8A0B7C0074022B87 +:10193000FBE43CFC8B8274102CF583EA247BF8E6F4 +:10194000FBF00A80DF753D0A75820302102C753B9F +:10195000019000E1E0FA74FE5A44019000E1F002C7 +:101960000FA87403B53B004020E53B253B253B9089 +:1019700021577302216502216502216D753B0080AC +:1019800008753B02753CFFD203C20D22E582FAC303 +:1019900013FBEA035480FCEAC42354E06204EAC463 +:1019A00054F06204EAC40354F86C54804BF582226C +:1019B0000000000070BCE5C901000000000000B09C +:1019C000000200008964B31710B505F0D0E81B4C85 +:1019D0006060A168002904D0491CA16005F0CAE834 +:1019E00010BD0021012005F0CAE8A068401CA060DD +:1019F0000020C04320610020E06011480168820B94 +:101A00001143016010490F480880091F088001F048 +:101A100065FF10BD10B5094CA068012802D9401E11 +:101A2000A06010BD01F070FF0020A060012005F053 +:101A3000AAE8606805F09EE810BD0000201B00C009 +:101A400000210080FFFF0000500600901649154855 +:101A50000860174915480860174916480860184972 +:101A6000164808601849174808601949174808605F +:101A70001949184808601A49184808601A4919484D +:101A800008601B49194808601B491A4808601C492E +:101A90001A4808601C491B4808601D491B4808601B +:101AA00070470000D92200B0D4F500045F2300B0D5 +:101AB000CCF500046F2300B0D0F500047F2300B004 +:101AC000D8F50004B52300B0E8F50004CF2300B03A +:101AD000ECF50004E32300B0F0F50004072400B0A7 +:101AE000E4F50004832500B0DCF50004352400B0E3 +:101AF000E0F50004172400B0C8F50004252400B068 +:101B0000C4F50004F72100B048FD0004432400B0F0 +:101B100044FD0004F7B5012082B00D000190088853 +:101B2000460805F034E8710002980F0005F032E82D +:101B3000012409E0029A6000295A8018801E0004DE +:101B4000000C05F028E8641CB442F3DD78194188E4 +:101B5000029805F020E805F022E805F024E8492085 +:101B600005F024E804990842F9D0000601D50020C8 +:101B7000019005F020E8019805B0F0BD2B4970B543 +:101B800048680E0C3043486005F00CE8092005F069 +:101B90000EE80C210143092005F010E8152005F09E +:101BA00006E8BF210140152005F008E84A2004F0AE +:101BB000FEEF0621050001434A2005F000E800245D +:101BC000472004F0A89C238801000000FC0100B01D +:101BD000000200004DB16C3CF4EF641C0A2CF9DBF0 +:101BE0002900F92001404A2004F0F2EF492004F0D6 +:101BF000E8EF10210143492004F0EAEF002004F04F +:101C0000E0EF10490870012004F0DAEF0E49087087 +:101C100004F0DAEF0D4920223000FFF785FF00289D +:101C200007D01F200A494022C002FFF77DFF00288D +:101C300000D1FEE704F0D0EF012002F0B1FC70BD4E +:101C400040230080A40E0004A50E0004386D00B0EF +:101C5000D86300B070B52C20A54D2C1D290001F0D3 +:101C6000E1FC2868411C0FD000280DD0210001F0B4 +:101C7000D9FC206804F0B4EF2060A8889D49884210 +:101C800002D1A879012800D0002070BDFEB5FFF771 +:101C9000E1FF974D002160350028297000D1FEBD7D +:101CA000934E37683F1D00245420604301A9C0199A +:101CB00001F0B8FC0198F179000E81421BD154204B +:101CC0006043C0198A4FB06001200C37002428708F +:101CD000B068A5004019694601F0A4FC009804F022 +:101CE00080EF0090E8190422694604F07EEF641C3E +:101CF000152CEDD3FEBD641C062CD5D3FEBDFEB560 +:101D000001F075FC7C4F0C20391D01F08BFC390073 +:101D10000831102001F086FC39000C31302001F030 +:101D200081FCFFF7B3FF4C2002A901F07BFC029875 +:101D3000411C17D00604360C300002A901F072FCD9 +:101D400002980006000E0C2801D00D2851D1482021 +:101D500002A901F067FC02980504AF202D0CC00019 +:101D6000854203D901F05AFC0120FEBD00240BE09E +:101D7000301902A901F056FC029804F032EF39192B +:101D8000241D2404240C4861AC42F1D33000694680 +:101D900023E002A901F046FC0298AF21000C02905A +:101DA0002818C90088421ED800240DE0009801A917 +:101DB000001901F037FC019804F012EF2919C91934 +:101DC000241D2404240C486102988442EED3029816 +:101DD0006946281887F207D001000000F80300B018 +:101DE00000020000B959D281050400982D0C001D95 +:101DF00001F022FC0098411CD5D142493E820120CD +:101E000010397D82487301F013FC0020FEBD10B52F +:101E10003E4C211D081D00F057F923001233AF215D +:101E20008022C900981C00F0A5F9002805D1802067 +:101E30003449208201201039487310BD08B501F0E3 +:101E4000E0FB0020694601F0F7FB01F0F1FB3049AF +:101E50000098884201D0002008BD012008BD294813 +:101E60001038407B002800D00120704725481038EA +:101E7000807B70472549002048820882214910391B +:101E80004873704770B5FFF7F5FFFFF7D7FF1D4C9C +:101E90000125103C012803D1FFF73BFF257303E028 +:101EA000FFF7B5FF02202073184A90680004000C69 +:101EB000906051684B1C03D1164988420CD103E055 +:101EC000002909D1002807D113485060FF20FF30B6 +:101ED00090600020A07370BDA57370BD70B50B4DF0 +:101EE0000B4C2868A0420BD059210901280004F0AE +:101EF0008AEE0448642104F086EEFFF7C3FF2C60ED +:101F000070BD0000901A00C088880000001500C055 +:101F100058303338FFFF000000504302F948408931 +:101F20007047F8497F2088807047F8B50400F54D68 +:101F3000F54F13E0A001060001F086FD00280AD04D +:101F4000300001F07FFD2A89D300DB1903C3601C38 +:101F5000521CE8802A81641C2404240CA888844232 +:101F6000E8D3F8BDF8B501240025E64FB888009005 +:101F700072E0E549E000411808784E78420660D5E5 +:101F800003003F3B04F042EE0A6B1E1E06130A0DCF +:101F90001C181C1F641C2404240C5DE08878386124 +:101FA000F8E78878C978090201437981F2E7D748D0 +:101FB000202204F024EE03E088787870C878B870A6 +:101FC000301947E0891C49281CD07F281AD048883E +:101FD000000B01D0088815E008780200AF3A072A04 +:101FE00001D9BF28AAF5C4C501000000F40500B05E +:101FF00000020000A0A10CF10ED10A7AD303034322 +:1020000010091B0400011B0C00021843B22803D165 +:10201000497A0907090D0843C14A002120320BE023 +:1020200006234B43D35A834203D16D1E2D062D0E3A +:1020300004E0491C0906090EA942F1D306235943BD +:102040005052881844804671301904046D1C240CC9 +:102050002D062D0E0AE0022801D189783970012160 +:10206000002800D0310008190404240C0098844290 +:1020700089D3F8BDAA49002010B50870A648416967 +:1020800000290FD101214161002001F0E7FC002867 +:1020900001D101F0F7FCFFF74EFF0020FFF74FFFE3 +:1020A000FFF76AFF10BD9E4A002020320DE07F2915 +:1020B00008D106235843994980184088C000411828 +:1020C00003C97047401C202804DA06214143515CB3 +:1020D0000029ECD10020C0430100704770B5060014 +:1020E0000D00FFF7E0FF0C0004F08EED0004000C83 +:1020F0003060200004F088ED2860012070BD7CB5C0 +:1021000004000020864A2032002C2BD025E00D2927 +:1021100020D106235843814980184088C0004018C8 +:102120008288110B01D1811C0FE011067A4B120B32 +:1021300092001833D218090E801C403AD56B6A46BB +:1021400001ABA8476B461A790099200004F060EDB6 +:1021500001207CBD401C202804DA06214143515C4B +:102160000029D4D100207CBD002310B51A00837053 +:1021700004E0845CE3181B061B0E521C8A42F8D351 +:102180000121C91A817010BDFFB5C3B06846FFF7C1 +:10219000B6FF00282FD06B465C88449884422AD82A +:1021A00000256E4605E0705904F02EED4399485124 +:1021B0002D1DA542F7D34598201804F026ED43992C +:1021C000486043982100FFF7CFFF55480027203093 +:1021D00065E0090660D55249449B2031401840888B +:1021E000C1004E48081881880A0B0E05360DA1194A +:1021F00099424192460AE01801000000F00700B041 +:10220000000200005449B24C02D9012047B0F0BD91 +:10221000002A02D1801C42900FE0444B92001833F8 +:102220003106D218090E801C403AD56B40AA41AB4A +:10223000A847409840AB42901E79006880218843AF +:1022400004F0ECEC43990425085109E04299A808F0 +:102250008000085804F0E2EC439A61192D1D50509B +:10226000B542F3D333497D1C203102E0000607D488 +:102270006D1C202D04D206206843085C0028F5D18F +:102280000020C043202D07D006226A43895C002924 +:1022900002D04598A119081804F0C0EC0100439839 +:1022A000001941603100FFF769FFA4197F1C202F3E +:1022B00006D206201F4A78432032115C002992D1B1 +:1022C000469804800020A1E7FFB5FF210024050007 +:1022D000491C194881B004F0AAEC174A2868082163 +:1022E0001060042032E02B5CE340A41C9B07240612 +:1022F0009B0F240E082C03D1401C00240006000E66 +:10230000032B1BD12B5C002C04D1401C0006000EBB +:10231000535418E0401CE3400006000E08275354B5 +:102320002E5C3F1BBE401E430CE00000001B00C0A3 +:10233000401C00C0402000C0401B00C0FF26022BF4 +:1023400000D01E005654491C0906090E029B9842F3 +:10235000C9D30498017003980260049800785080F3 +:1023600005B0F0BD082008B504F068ECFF49009006 +:102370000160002181808171012004F064ECFC483F +:102380000188002004F062ECFA480168684604F015 +:1023900062EC08BD38B50D00F54C402823D148202B +:1023A00004F04CECF1490090891C0160002181800F +:1023B000202246210A542900801D04F034EC0098A4 +:1023C0002022A918263004F02EEC0021012004F070 +:1023D0003AEC2188002004F03AECE64801686846AF +:1023E00004F038EC38BD2188122004F030EC38BD00 +:1023F00010B504000021481E86B004F024EC202211 +:1024000021002831D8E1CD6E01000000EC0900B0B8 +:10241000000200009350B011029204920391220036 +:102420000021083200913921019249013E20082300 +:10243000D6A204F01EECD74804F01EEC06B010BD86 +:102440003EB500210400481E04F006EC2022A11D28 +:1024500000206B4607C3392149013E200923CEA243 +:1024600004F006ECCD4804F008EC3EBDFFB581B0A9 +:1024700088784F780002039A07434C790A9E12200D +:102480001070C748426800924268030C1A434260C9 +:102490000878002809D001281BD0022854D006282B +:1024A0006AD104F0EEEB002574E0F02C64D804F05F +:1024B000ACEB002508E078190004000C04F0A8EB50 +:1024C00070556D1C2D062D0EA542F4D304F0A4EB1F +:1024D0004DE0F02C50D804F098EB472004F098EB36 +:1024E0000821472004F09CEB472004F092EB0621E2 +:1024F000472004F096EB04F090EB04F07AEB002513 +:102500000BE078190004000C04F0BEEB7055711953 +:10251000000AAD1C2D062D0E4870A542F1D304F023 +:1025200070EB04F072EB472004F072EBF9210140EC +:10253000472004F076EB472004F06AEBF7210140D6 +:10254000472004F06EEBC1E7F02C15D804F0A0EBA7 +:10255000002508E078190004000C04F09EEB70558B +:102560006D1C2D062D0EA542F4D304F09AEB0498B1 +:10257000047003990020087089490098486005B0EC +:10258000F0BD78190004000C04F086EB70556D1C4A +:102590002D062D0EA542F4D304F086EBE7E70420C8 +:1025A00008B504F056EB0028009006D07D49016084 +:1025B0007D480168684604F058EB08BD7B4900205F +:1025C00010B5086001003F220420612304F070EB85 +:1025D00010BDF1B582B004F070EB070000240A21B1 +:1025E0006143C8194279002A28D022000832150414 +:1025F000002242717A5480782D0C002818D104F002 +:1026000060EB06001C206843694940184079282186 +:1026100041430191CCE3B8D001000000E80B00B0C9 +:102620000002000067B80EAC715C01290AD166494E +:10263000096888470198654B801901791B68002259 +:10264000280098470298854202D0280004F046EB03 +:10265000641C032CCDDBFEBD70B504000D00002012 +:1026600004F038EB1C22624356492823521854794F +:102670001C226A43634351181B184A795C8C282337 +:102680005A4301211018408C844200D000210800D8 +:1026900070BD7CB50400082004F0E4EA46490090CF +:1026A0005139016000258480494E85713168684642 +:1026B00004F0E4EA082004F0D6EA3F4901905039DA +:1026C000016084808571316801A804F0D8EA7CBD7E +:1026D000F3B581B0060004F0FAEA0400002004F02B +:1026E000FAEA05000A2070430419603C607C052862 +:1026F00002D104F0F8EA1EE0A07C00281BD11C20C7 +:102700007043304940183349477909683800884791 +:10271000029800280FD12C493800096888472820E2 +:1027200078432A4B401901791B68012230009847F1 +:102730003000FFF7AEFF01202074FEBD70B504002D +:102740000D00160004F0C2EA0A22624301211218A9 +:10275000603A51750A226A4310186038002E41759C +:1027600003D02900200004F0C2EA70BDF8B50C00C7 +:102770000700150004F0AAEA06001220062F2870B0 +:102780006ED11548007801286AD120780090A7788A +:10279000E07823E0A50F00000CE60004D0A634008A +:1027A00062626D6D000000003E08000062626D0014 +:1027B0003E09000040230080EF130000E4A634002F +:1027C00074E60004B4B40004D4FC0004E0FC00048B +:1027D000E0A63400D0FC0004CEE800040002074369 +:1027E000380004F088EA00283AD0009800282CD15C +:1027F000607800280AD10A20784380196038007C6C +:1028000000282DD1380004F06AEA28E0012827D1F9 +:102810006079267900020643300004F06CEA002853 +:102820001ED031009AD600C801000000E40D00B0AF +:10283000000200007E40D0DC3800FFF717FF0400E4 +:1028400001003800FFF74EFF21003000FFF74AFF7C +:10285000220031003800FFF77BFF002009E00A204A +:10286000784380196038007C012803D1380004F0D7 +:1028700050EA2870F8BD10B5040004F032EA0A21CD +:10288000614308186038407D002800D0012010BD49 +:1028900010B5040004F024EA0A21614308186038E6 +:1028A000C07C012800D0002010BDF8B50E000578CE +:1028B000170004F032EA0406240E002D01D104F0C2 +:1028C00030EA01203C703070F8BD38B50C000328A8 +:1028D00012D1082004F0D0E9F84900900160217875 +:1028E0000171A278617812021143C180F448016835 +:1028F000684604F0CEE938BD1220107038BD38B5F6 +:102900000C00022810D1082004F0B6E9EB49009031 +:10291000093901602178017161784171E8480168E5 +:10292000684604F0B6E938BD1220107038BD3EB5D7 +:102930000C000C2810D10422210002A804F090E918 +:102940000822211D684604F08CE902A804F0ECE995 +:10295000684604F0EEE93EBD122010703EBDFFB5A2 +:102960008446080083B0150061468A0A0E9F0C9EBB +:102970000D9C00213F2A02D0012031702CE06246DC +:102980009205920D592A7ED03EDC392A75D026DC7C +:10299000202A74D019DC062A47D0082A5DD00F2AD5 +:1029A000EAD104F0CAE9010A38707970010C000E0E +:1029B000B970F87004F0C4E9010A38717971010C3A +:1029C000000EB971F8710820AAE0232A7CD02A2AC7 +:1029D000D2D1290004F0B8E9207007B0F0BD552A23 +:1029E00073D009DC3D2A71D03E2AC5D11022E91CE2 +:1029F000802001F022FCF0E7562A68D0572ABBD18C +:102A0000280001F033F9E8E75A3A130004F030E9FE +:102A10001560740C0CA20C0C0C0C0C0CADB40C0C52 +:102A20006CB9BDC4C9CE0C00A6E72E78002E49D0E3 +:102A30003C2130009CDE718601000000E00F00B0F8 +:102A4000000200008AA86E6104F08CE9002943D1DD +:102A5000A1480670A14806702978A14804F082E9CF +:102A6000A0490006000E08709F490880BFE70A28A9 +:102A700032D100980322920490430122120710439E +:102A800000906846029100F0D3FEB0E705E017E041 +:102A9000FFE7280004F06AE9A9E701002A00002006 +:102AA00004F068E9002801D11220207022786978AA +:102AB00028786B4607C30021FF2059238BA250E0E2 +:102AC000012809D12878012806D82170297800200A +:102AD00004F054E900288AD0122087E732E024E08D +:102AE0001CE029E0002004F04EE900288DD00021F0 +:102AF000032208000B0004F04AE978E70197069AE0 +:102B000033002900009400F04DFC70E70197069A0D +:102B100033002900009400F0B9FC68E71022390066 +:102B2000802001F033FB102004E0724A7249380023 +:102B300004F030E930705AE73A0031002800FFF71E +:102B4000BEFE54E7290004F02AE9002801D1122032 +:102B5000207022782978019200910021FF20232300 +:102B600066A204F0A4E842E7297866480222002918 +:102B7000416801D1114300E09143416037E73300E0 +:102B8000220029000097FFF78FFC30E72200290080 +:102B900000F0C4FB2BE75C492878087027E7330076 +:102BA00022002900009700F02FFC20E722002900D6 +:102BB000FFF7C7FE1BE722002900FFF7AAFE16E772 +:102BC00022002900FFF78BFE11E7F8B5050017007A +:102BD0004E480E00002204F0E6E8040013D02089DD +:102BE00032000019390004F046E849483200006814 +:102BF0002100012304F0DAE80021012004F04AE872 +:102C00002900002001E029000D2004F048E8F8BD6B +:102C1000FEB504000D00160008A807C86F4607C7D8 +:102C200032002900200004F0C6E8FEBD70B584051E +:102C3000A40D850A032D04D1032C02D104F0BEE8B3 +:102C400070BD0023F168327F01000000DC1100B08C +:102C500000020000F4B3C9D1032D0FD0082D14D009 +:102C60003F2D3BD1222C0ED0712C0CD0862C0AD0BB +:102C7000872C33D1107804F0B0E870BD0123332CD9 +:102C80002CD000232AE0012328E0274D01262D68BF +:102C9000F602FF3581351F2C1DD008DC012C11D028 +:102CA0001D2C01D01E2C19D1AC88344315E0252CE5 +:102CB00040D0262C12D11D4801681D480078FFF72E +:102CC0009BFB70BD14786406640E1470547864081D +:102CD0006400547002E0AC88B443AC8004F080E837 +:102CE00070BD0000FD0C0000F8A93400A0E5000450 +:102CF00005E60004D2020000A1E500041CE6000481 +:102D00005662626262000000445600B0F017000490 +:102D10005662626200000000402000807D0E0004C8 +:102D2000F85800B0E45800B084EA00042CE600042F +:102D3000EDE50004FFF748FB70BD70470021FFA0E0 +:102D400010B504F052E8FE49086010BD411E002293 +:102D500030B50A2910D8FB4C002145002D1823203E +:102D60004843491C0019401909068270090EC270B7 +:102D700002290271F3D330BD80383F28FBD8010609 +:102D8000090EF14D00204C00641830214143401CD5 +:102D900049190A5509190006000E4A7002288A705E +:102DA000F3D330BDF0B585B00027818802918179D9 +:102DB000C01D427804781202144303294ED10F211A +:102DC00009028C424AD2E14A61000391515C022916 +:102DD00044D0002942D08578082C3FD2002D3DD028 +:102DE000200004F006E80600200004F006E8072EA4 +:102DF00034D0092E32D00C2E30D008282ED30B28F8 +:102E00002CD2D24E4100715C012901D0022918D187 +:102E1000CF4A1218203A0129147604D101002A0061 +:102E2000122003F0EEEFCB480221055503983154F0 +:102E30002100012003F038EF0299002003F038EF61 +:102E40000BE00299002003F034EF102105200C2341 +:102E5000C1A201954E9F554901000000D81300B052 +:102E600000020000005B776C009403F034EF012750 +:102E7000380005B0F0BD002802DA4042C043401CD3 +:102E80000006000E7047F3B583B003F0C8EF029060 +:102E900003F0C8EF039901900120002900D0002021 +:102EA0002324B3494443AC4D4870285500F06CFED0 +:102EB0006719012478701C216143AE480818857891 +:102EC000882060430299085C022837D1601E0628DA +:102ED00021D8A948006802880121A9400A4201D1ED +:102EE000012000E00220610009197E18A349B0709A +:102EF000485DA34909688847FFF7BDFFF070A14905 +:102F00000C2068430968085A9F49000409680016A4 +:102F10008847307112E02000083802280ED80106D8 +:102F2000090E1E224A43019902205118497DC90702 +:102F300000D101206100091979188870641C2406E9 +:102F4000240E0B2CB7D304999048EA2900D0401ED8 +:102F5000039903F06CEF8CE78D4910B509780120D7 +:102F6000002900D00020EA21FFF78DFF0021012079 +:102F700003F0A4EE10BDF8B500210424764F854D72 +:102F800023224A43B85C2855641C2006D61972785F +:102F9000000E2A54401C0406240E01204200121880 +:102FA000B21893782B55641C2306D4781B0EEC546E +:102FB0005B1C1B0612791B0EEA545B1C401C1C0692 +:102FC0000006240E000E0B28E8D330234B43634A3F +:102FD00000209E1843001B18F25C2A55641C220630 +:102FE000F3185C78120EAC54521C12069B78120E29 +:102FF000AB54521C401C14060006240E000E102870 +:10300000E8D3491C0906090E0229B9D30021481E3C +:1030100003F054EE3F2200212000EA2303F07AEE71 +:10302000534900200870F8BDF1B582B00024029821 +:10303000594D02685849531B8231AA422CD008DCF2 +:10304000FF3A643A14D0554951187ED002297DD0F8 +:1030500020E07A2B13D0822B06D0832B1AD18088C4 +:10306000FFF77EFE5C8DFF9B01000000D41500B0D1 +:103070000002000019A3A91C01244AE00079FFF70F +:103080000CFFF9E703F0E0EE01280DD1FFF77DFF1B +:10309000F2E7010040790024052805D1C87A097BB0 +:1030A00009020843FFF766FE2000FEBD828883798F +:1030B0009505AD0D970AC61D042FF5D00ADC012F2A +:1030C00021D0022F29D0032FEED1032DECD103F014 +:1030D000C0EEE9E7052FE7D03F2FE5D16F2D40D0B7 +:1030E00020DC032D6DD0072DDED0192D6DD0612D84 +:1030F000DAD1300003F0B0EE002870D03F22122168 +:103100000420612385E0062DCED1FFF75FFE040089 +:10311000CAD002A803F0A4EEC6E70B2DC4D100F07C +:10312000FBF9A9E7772D60D0EA2D7BD0EB2D75D088 +:10313000EC2DB9D104240C2003F0C6ED1B490190FD +:1031400084310160317881807178C180B1780181EA +:103150001848016801A803F0C4ED00212DE06EE0DD +:1031600070E04CE0666D0000E45800B094E300B0FD +:10317000E4EE00B07AA4000421E6000442E6000474 +:1031800062686200DC5800B0B4B400041CEA0004B9 +:10319000B4C70004DCF5000498EA0004D8F5000484 +:1031A000B8210000825900B0649E00049213000010 +:1031B000BDF1FFFFE0A6340003E02B003A00200041 +:1031C00027E02B003A00002106E03100180003F050 +:1031D0004CEE2B003A00010004201AE0FFE7E5491D +:1031E000E3480860FFF717FA46E7B278717830785D +:1031F00003F03EEE3F2200210420772309E0310056 +:10320000180001AAFFF7E4FA6B4619793A00042086 +:103210002B0003F08AED2FE704E0FFE73078FFF79B +:103220003CFECEE7D4480178002904D10121017089 +:10323000FFF79CFE20E72B003A000C21CCE7FFF7BC +:103240001DF919E7FFF738F916E70100CB4B0A68BB +:103250000020D21801D18988890A704770B50024EE +:10326000C74E23256543745500F098FC641CA919CA +:103270002406240E2A01A3AB01000000D01700B0E1 +:1032800000020000ED4B17A1022C4870F3D301247B +:103290002000FFF779FD641C2406240E0B2CF7D3C5 +:1032A00080242000FFF770FD641C2406240E902C5F +:1032B000F7D370BD30B585B06B460220187003207F +:1032C000591C80046C4603F0E2ED0320611D0004EC +:1032D00003F0DCEDB04D10246B4602A9891C2800D8 +:1032E0005C7203F0D4ED6B4603A9C91C28009C73E3 +:1032F00003F0CCED684603F0CEED00F009FD0120AF +:1033000003F0CCEDFFF7B4FFA0490020087005B032 +:1033100030BD042A10D1022B14D1A0480622817995 +:1033200011439F4A81711278062A0BD3F822114368 +:1033300081710721C17105E03F2A03D1092B01D119 +:103340000120704700207047002070470020704720 +:10335000944900200856944A00215156814203D1D5 +:1033600089480068002800D001207047F8B5122075 +:103370000C00107048788978150009020843009005 +:103380008A4847684168020C114341602078002652 +:10339000002811D0012818D0022822D0062808D1F0 +:1033A00003F0B4EC6179009803F07CED03F0C2EC1B +:1033B0002E707E484760F8BD03F06CEC6179009890 +:1033C00003F074EC03F06EECF2E703F058ECA07934 +:1033D000617900020143009803F054EC03F056ECCD +:1033E000E6E703F09CEC6179009803F05CED03F0F4 +:1033F0009EECDDE770B588B00C9D0C001226042809 +:1034000020D100206B46D8836178207809020843D8 +:103410001883E178A07809020843588364481C2186 +:10342000006806AA03F042ED002800D02E702A782A +:10343000E178A07802AB07C36278217801925DA29F +:10344000009102E02E705DA200960021FF2069230A +:1034500003F054EC08B070BDF8B50C00002706006E +:103460001500401E00971528177034D81C2003F053 +:1034700036EC002800902CD051490160217801726F +:10348000C9074772974FF0DA01000000CC1900B06D +:10349000000200002A5215FC1CD0012E1AD9072E5A +:1034A00013D36179102910D8A278617812021143E0 +:1034B00081802279E17812021143C18062794272DF +:1034C000A11D0A3003F008EC04E0122028706846C1 +:1034D00003F0DAEC2878002804D13F4801686846F8 +:1034E00003F012ECF8BD072000E012202870F8BDB0 +:1034F000F0B506000C001F00002585B003F0E4ECD9 +:10350000002804D0012816D0022814D10C25032E3F +:1035100003D1A17860782A0002E01D220021280052 +:10352000029101900392227800920021FF205B23F8 +:103530002AA203F0EEEB002038700A980570B6E47A +:1035400070B5C41D8179858807291FD1A179022909 +:103550001CD2200003F0BCEC224988420BD0224A46 +:1035600001211154214AA179115401000022432064 +:1035700003F06EEC03E0A179200003F0AEEC002133 +:10358000012003F0BAEB2900002001E029001220FD +:1035900003F0B6EB70BD0000910B00B074E60004C0 +:1035A000DC5800B06EECFFFF94E300B05555AAAABA +:1035B000849E0004E1E50004DEE50004DDE500048E +:1035C00040230080880E00045662626262626200DC +:1035D000566262000E140000E0A634005662626279 +:1035E00062620000FFFF00004AE6000452E60004A9 +:1035F00031B56B461A78587899780024012A0ED094 +:10360000022A0AD1854A10708548017003F068ECDF +:1036100001F0C8F9040003F068EC200038BD814ACD +:1036200010708148017003F064EC01F0FFF90400B0 +:1036300003F062ECF1E7F8B500267C4F34003D1D45 +:10364000A00040190068FFF7D3FF002806D0A000B3 +:1036500039684019006888600120F8BD641C052C99 +:10366000EEDB002E05D13868012102228172027240 +:1036700041720020F8BD6D4800220068017A0129DE +:103680000CD0022929D1654B417A19706849C16073 +:10369000684901610EBAC79801000000C81B00B05C +:1036A00000020000DEBAAB4168494161684916E09A +:1036B000614B417A1970817A604B02291970654B10 +:1036C000C360654B0361654B436107D16449097869 +:1036D000BF2901D01F2901D1624900E06249C261BE +:1036E0004260816101214270017008007047002032 +:1036F00070475E497D20000110B508605D495C4857 +:1037000008605D494E4C086020680078002803D1AD +:10371000FFF79BFFFFF7B9FF2068C068804710BD27 +:10372000474800680069004710B50C004449096823 +:10373000496988472060012010BD414A10B51268D0 +:103740005378002B02D09269002A01D1002010BDCD +:103750009047012010BDF8B503001400384AFF2738 +:1037600000207F1C1268DE1B0500BB424AD00EDC25 +:10377000002B24D0012B2FD0022B3BD0032B4DD17B +:10378000117A01294AD101F01EFA206045E0012E8C +:103790003AD0022E3AD0032E3DD0042E3ED1967A56 +:1037A0005368022E40D1167A012E3DD136038E1B6E +:1037B00035D00F273F03F61B36D1304830E0117A61 +:1037C0001F4C012904D101F02BFA2068457024E038 +:1037D000022923D1557020E0117A194D01240129C5 +:1037E00004D101F0E7F92868447016E0022915D1E8 +:1037F000547012E0127A012A10D10806000E01F06E +:10380000F0F9C2E79068C0E7916001E0FFF71DFFA3 +:10381000FFF73BFF01E05068B7E70120F8BD18480B +:103820005160D0612360F8E7D5615560F8BD0000B4 +:10383000405B00B0415B00B0445B00B0545B00B043 +:10384000385900B02954000085540000593000B0A8 +:10385000ED2F00B0B553000003540000533100B009 +:10386000555B00B0AF3200B04F3200B0485B00B0E3 +:10387000102700004C5B00B0505B00B0A33100B0DB +:10388000F93100B08006420EC805C00F514B02430B +:10389000022010B518744F4834242030047102718E +:1038A00001221A7496B4865401000000C41D00B0B1 +:1038B00000020000C7427531017110BDF8B5040067 +:1038C0004A488168820D11438160494841689143AB +:1038D0004160484801680422114301600168464A7A +:1038E0001143016003F020EB2068FF250003800FE7 +:1038F0006D1C012858D1414F0026B000C1194988DC +:10390000385CFFF7C9FF761C1A2EF6D32068002119 +:10391000C20400D52900020501D586221143C20048 +:1039200001D5012211434005000F082600280DD0C3 +:10393000012800D131430420FFF7AEFFA36803F054 +:10394000E8E907080C0C0F121215180010200143AB +:10395000F1E7FF27813705210DE02F0004210AE060 +:10396000C027032107E08027022104E0602701210E +:1039700001E0402700210720FFF78EFF2068810328 +:10398000C90E172901D01F2902D13900314302E0A5 +:1039900039000C221143000DC00701D00120014362 +:1039A0000620FFF779FF0BE0144E00246836A000D4 +:1039B00081194988305CFFF76FFF641C1A2CF6D31D +:1039C00003F0B6EA03F0B8EA08498868284388603B +:1039D0000B48816801229206114381608168094A7F +:1039E00011438160F8BD0000000800904023008072 +:1039F000002C0080802D008000AE5A5F6001000422 +:103A0000002F0080AD257000634810B5006B63493E +:103A1000086003F096EA6349614808806248091D1E +:103A20000880091D08880722520310405F4A10438E +:103A3000088010BD59485849006808637047F8B5B8 +:103A4000584D083D2888702108432880584F00248D +:103A500026003B20021B5749380003F076EAC007D6 +:103A6000C00F3100001871418100014328880F22E6 +:103A7000D243104008432880288805210843288025 +:103A8000641C3C2CE5DB28882F21C9430840288092 +:103A9000F8BD444910B508390888702210430880E1 +:103AA000454B002005240A881A400A800A882243D0 +:103AB0000A80401CE2C3C97B01000000C01F00B0A7 +:103AC0000002000033AACB8C3C28F6DB08882F22AA +:103AD000D2431040088010BD354A136998420AD07D +:103AE0001061354B0204920D103B1A80324A800659 +:103AF000800E1032108008012F49401C091F0880D9 +:103B00002D490C3908880004FCD57047F8B500240D +:103B100006000F002500FDF7F7FF39003000FFF722 +:103B2000DBFF2348C068002813D1234824380488C9 +:103B3000E217001D0388DD17001D0188001D0088A5 +:103B40001E0C2D04354315431B040D4300041C4378 +:103B50000543FDF7FFFF20002900F8BD0021D5E750 +:103B600010B50400FDF7D0FF00212000FFF7B4FFDF +:103B7000114814380088800701D5012400E0002492 +:103B8000FDF7E8FF200010BD10B50400FDF7BCFFF5 +:103B90002000FFF7E5FFFFF75CFF02212000FFF7A1 +:103BA0009BFFFFF780FFFDF7D5FF10BD00210080D0 +:103BB000201B00C0809800002C0600903F490000A8 +:103BC0003F090000C61A6BACB1C61A0BF0FF00002B +:103BD00038B5FF4C2078002811D101220420694615 +:103BE00000F024FB6B4618780521C20700D10221A2 +:103BF000F84A800711700821C00F6171607038BDEC +:103C0000F44800787047F3B50122FF250700F24C15 +:103C10000220611C85B000F009FB0122032002A9EB +:103C200000F004FBEA48007800280AD1E84E01229F +:103C3000F11C052000F0FAFA0122B11C062000F068 +:103C4000F5FAE5486B464078197A400040180006BE +:103C50000016019029304421081A0006000E07249E +:103C6000260000900098210003F0CCE8A94201D280 +:103C700026000D00641C2406240E0D2CF2D9D44D10 +:103C80002878002803D0D4486979817001E0D248AF +:103C90008670D14881784320049103F0B4E8CC4881 +:103CA00027390C062416401F447001980499001B04 +:103CB000060003F058E90699401C0870C648817850 +:103CC000300003914558127001000000BC2100B083 +:103CD000000200003B753A5103F04EE9C2482971D9 +:103CE0000078052802D10698007805E01A2003998B +:103CF000001B03F042E9401C3870069839780078C0 +:103D0000091ABA488278514342788918017007B07D +:103D1000F0BDB7494A8901218140B6480A40006890 +:103D2000FF30C130002AC28901D00A4300E08A4333 +:103D3000C2817047AB4A002310B55370C17A012489 +:103D4000012904D0022902D003290FD05470147025 +:103D5000437A0221002B00D10521A34B1970817AEF +:103D60005171017891704178D17000E0137003F0C7 +:103D700008E910BD002010B503F006E9994949781B +:103D8000002907D098490978052903D18178FB22B9 +:103D9000114002E0817804221143817010BD0200BD +:103DA0000800110010B503F0F4E89148C17C914877 +:103DB00002290BD18E49403189883C2902D8FF2144 +:103DC000491C00E000210068018410BD0121490266 +:103DD000F9E710B5040000F050F901060916293979 +:103DE000CA0F5118CA05010012160023200003F063 +:103DF000D4E810BD70B500257A4C0820641FA5706A +:103E000003F0CEE87B4E306845847B498183818B0B +:103E10000122120311438183794978480968088097 +:103E2000784908694A0C10430861FFF7DBFE00F08F +:103E3000FDF83068818B0122D203114381839111F7 +:103E4000018403F0B2E86A484021C943417081709F +:103E50002C21C943C1700171211D481EFFF7DDFEF1 +:103E600069486A490088088069490A2008802079E1 +:103E7000FFF7AFFF0120207070BD5A48401F8178C6 +:103E8000002901D10121817070475648401F817877 +:103E9000012901D1002181707047404200060016BF +:103EA0007047544A10B51268FF32613213890124F9 +:103EB0008440234313810A235843564B1A688218BF +:103EC00051801B680022C0188280C180028110BD11 +:103ED00070B50500FA42A82F01000000B82300B019 +:103EE00000020000CF9D84EC434C641F207900F059 +:103EF000CEF801002800FFF7DEFF207970BD10B575 +:103F00000400080000F0C3F801002000FFF7D3FF11 +:103F100010BD10B500F0BBF83B49FF2209687F32A5 +:103F2000FF235052002281335A52FF31FF31891C46 +:103F300048818A8110BD3049491F002801D0CA78C4 +:103F40000270C878704733480068418AC0229143A4 +:103F5000418270472F480068418AC02291438031D6 +:103F600041827047244810B5401FC07800F0A1F886 +:103F700010BD2E4900200856411C0BD040002930AE +:103F800001062148090E0068FF30FF30801C418186 +:103F9000002181817047264810B500688068194A61 +:103FA0008000D16E8008411A890189090E2906D343 +:103FB000D06603F008E803F00AE803F00CE81D48B7 +:103FC0000068018810480068FF308130018210BD10 +:103FD000094910B5491F01240C57410600231B2233 +:103FE00009161B2900DB1100A14200DC2100293148 +:103FF0000906090E02001FE0A15900B071E5000496 +:1040000076E500045099000484EA00040F200000C3 +:10401000050500008CEA0004802000801AE90004F5 +:1040200018E900041CE9000490EA000473E50004A8 +:1040300078EA00041CEA0004002002F0B8EF10BD8A +:10404000204810B501680800FF306130C2880323A2 +:104050001B039A43C280C28801231B031A43C280F8 +:104060001622CA84184ACA87018840221143018057 +:1040700016480078012802D1002000F03BFB1449CB +:1040800048680A0C9043486000F0E8FE10BD1149F2 +:10409000401E897841430D48401D007908180B499E +:1040A0004978401829300006000E442800D34320E8 +:1040B000704700B5FFF7EBFF2938C10F0818C0059E +:1040C000001600BD84EA0004408000009C5900B046 +:1040D0004023008076E50004FFB583B00E00002188 +:1040E000019100F0340CD61201000000B42500B09C +:1040F00000020000D6655A9CC9F9050024D0F94891 +:10410000059A41191431300002F022EE059834006E +:1041100000278008029005E0206802F016EE01C436 +:1041200002987F1CB842F7D800217288080004E08A +:10413000735C18180006000E491C8A42F8D8012842 +:1041400002D1019006980560019807B0F0BD70B5E6 +:1041500015000022040003004270100004E0265CF9 +:10416000B2181206120E401C8842F8D30120801AA1 +:104170005870DD480078002811D0FFF7ECFA0022D3 +:1041800011000120FFF719FB21682800FFF707FB4A +:10419000002211001000FFF710FBFFF7F3FA70BDCB +:1041A00010B5D24C2278012A0DD0D14A0B0A517594 +:1041B000010E9175010CD175010A11765B1C5076C8 +:1041C00002201375207010BD817E0A07120F0909A5 +:1041D0008A4201D9F021817670477CB500F096F9CA +:1041E000C34EC44BB1697069019100901C2231002B +:1041F0003720FFF77BFFBF4C0125002820721FD01E +:10420000BD480570307D00280ED1707D00280BD18F +:10421000B07D002808D1F07D002805D1307E00282F +:1042200002D1707E002802D0B048057005E0B04889 +:1042300006221430694602F0DCEEAD48FFF7C4FFF9 +:10424000AC4BAE491B1D5C223820FFF74FFF012805 +:10425000607206D1AA48017BA348012902D000213F +:1042600001707CBD05707CBD020070B50C00A049DA +:1042700000201300062A2DD005DC02F072ED063D69 +:1042800021232527293D9A49FC2B897E2CD00BDC44 +:10429000072B21D0802B2FD19849102208312000E4 +:1042A00002F056ED102070BDFD2B1FD0FE2B23D148 +:1042B0008F4906221431200002F04AED062070BD1D +:1042C000487A16E0887A14E0C87A12E0087B10E099 +:1042D000887B0EE0C87B0CE0854904221031200069 +:1042E00002F036ED042070BD080901E00807000F58 +:1042F000401C207003621D8801000000B02700B040 +:1043000000020000228DE421012070BD824909785D +:104310008A42FAD3814B1B789A42F6D87C4D511AC7 +:1043200001222B8B8A401A42EFD0162048431622D6 +:1043300041191A31200002F016ED162070BDF7B5B4 +:1043400004000020802C0BD00126FE2C34D16D48B7 +:104350000622143002F006ED694806700620FEBD04 +:104360006B48082408301022060002F0FCEC634879 +:10437000007800281ED0FFF7F8F9634F00250022CF +:1043800011000120FFF723FA786831680019FFF760 +:1043900010FA002211001000FFF719FA241D361D33 +:1043A0006D1C042DEBD3FFF7F7F959487A685C21AF +:1043B000FFF7D7FE1020FEBD574B1A789442FAD370 +:1043C000564D2D78AC42F6D8180000781623201AE6 +:1043D00058434F4DA71A029A40191A30002A09D0A3 +:1043E000162202F0C0EC4C49288B0978611A8E40E5 +:1043F000304308E0162102F00AEE4749288B09787D +:10440000611A8E40B04328833C480078002835D09C +:10441000FFF7ABF9002211000120FFF7D8F93A4865 +:10442000298B40681830FFF7C4F9002211001000F2 +:10443000FFF7CDF916267E431A36E00700D0B61EE8 +:10444000314FAD190024002211000120FFF7BFF900 +:10445000786829688019FFF7ACF900221100100074 +:10446000FFF7B5F9361D2D1D641C062CEBD3FFF7A5 +:1044700093F927487A685C21FFF773FE0298FEBD26 +:10448000254910B509780024884207D323490978C3 +:10449000884203D800221100FFF751FF200010BD11 +:1044A000F1B50027FDF78FFD012822D1124D124EE4 +:1044B0001435348A1BE0308A201A8008800028587E +:1044C00002F04CEC01060098090E8142308A01D1BD +:1044D000271A0EE0201A800880004019406802F078 +:1044E0003EEC0400308A718A201A884201D2601C96 +:1044F000E1D13804000CF8BD001500C0A95900B086 +:1045000080E500047DD93BBE01000000AC2900B06D +:1045100000020000E594E67CC0990004389A00048B +:1045200081E50004DC990004801A00C0CCE8000496 +:10453000CDE8000470B51C20144C002560800420D8 +:10454000A072BA202573A073CE20E073E120400250 +:104550002061FDF749FD012805D10D4881684068BB +:10456000FFF732FE05E0094843220621143002F02D +:104570005CEDF020A07607485C210570064802F04B +:1045800000EC05495C20488070BD0000C099000423 +:10459000001500C081E50004DC990004F7B582B085 +:1045A0000500002760480468260053E0E188208960 +:1045B00002292FD1049A0019002A01900BD0037B05 +:1045C000C27A1B021A43037A0498834240D195426F +:1045D0003ED1012729E0027A032A06D01B2A0AD1FC +:1045E000827AC07A0002024302E0C27A007BF9E7D5 +:1045F00095422DD119E0122A0AD0202A28D10A305A +:104600000399062202F014ED002821D1E1880AE086 +:104610000B30F5E7001902784078000202431005DC +:10462000000DA84214D1002912D03F4B20001A6877 +:104630009442226801D11A6000E0326024680229A5 +:1046400003D101A802F070EC04E002F0F6EC01E006 +:1046500026002468002C01D0002FA7D0380005B018 +:10466000F0BD38B504000089011900910A7A052AC5 +:104670000CD0082A01D0142A0CD1C87A097B09026F +:1046800008430021FFF78AFF002803D0684602F0A4 +:104690004CEC38BD24490868002802D10C6038BDB4 +:1046A000080001680029FBD104600020206038BDAB +:1046B00070B51D4D286800281DD0281D0079C00741 +:1046C00019D01A4E2968C8880C68022805D12520FF +:1046D000425C3068921C022308E0088905234018D8 +:1046E0008278C078000202433068121D02F0E0EBCD +:1046F000002C2C60E6D170BD0FB40B4810B56B4692 +:10470000197B001D01715A7B002A09D0198901808B +:10471000598941801B5AA7D801000000A82B00B07E +:1047200000020000117C58C103A94271891C801D40 +:1047300002F02CEB10BC08BC04B01847AC5900B018 +:10474000880E0004F8B50025434846684268010C0D +:104750000E400A43426002F002EB0421022002F004 +:104760000AEB0721022002F006EB02F000EB02F058 +:1047700072EC3A490F5C042F00D1FEE702F0EEEA3A +:1047800000243749A0004018C15D364A6000105A25 +:1047900002F0F0EA641C2406240E142CF1D302F07B +:1047A000E6EA02F0DCEA3048304F00240AE02F4B02 +:1047B0005B1E984203D08918897802F0DCEA641CF9 +:1047C0004C2C04D2284AA100505AB842EFD102F032 +:1047D000CEEAFF20913002F042EC02F0C0EAFFF78F +:1047E0004BFA052809D1132002F0BCEA0107090F92 +:1047F00070200143132002F0BEEA4A2002F0B2EA20 +:10480000F72101404A2002F0B6EA022002F0AAEAAB +:104810000109090106200143022002F0ACEA144C10 +:1048200008E0641E2404240C01D1012509E0642061 +:1048300002F014EC592002F096EA8006800E0F2850 +:10484000EFD102F094EA002E04D1034948680A0C23 +:10485000904348602800F8BD40230080A60E000465 +:104860002C5A00B0045A00B0B20E0004FF0F000032 +:10487000881300007349002008704870486008726F +:104880004872704770B56F4C2078032808D1207AA1 +:10489000002806D000252800257202F0E4EB2570E0 +:1048A00070BD0120607270BD664810B500780328A5 +:1048B00002D1022002F0DAEB10BD70B50126614C86 +:1048C00000256178030002F06AEA06040C353D2CED +:1048D0004C4A002943D00121080002F0CCEB65705E +:1048E0003DE0002904D00121080002F0C4EB65700E +:1048F0002078032810D1544800688047607A002847 +:1049000005D00020657202F0AEEB257000E0267243 +:104910004E480068804722E0002002F0A4EB25709A +:104920001DE0207897F7E17F01000000A42D00B082 +:1049300000020000088486B1002807D1052002F09B +:104940009CEB0320207014E0002901D0002070BDF2 +:10495000667002F09EEB0CE00220207002F09CEBEF +:104960000C2803D1002002F08CEB02E0012002F0C1 +:1049700084EB012070BD0320F9E7F8B5364D687867 +:1049800000282BD0012819D00026022841D102F09E +:1049900084EB0024052822D0062820D00A2801D044 +:1049A0000B2800D1009628780126012824D1300058 +:1049B000002C00D000206968884722E0022068703F +:1049C000012002F06EEB022002F056EB002805D128 +:1049D0000120FFF77CFF696801208847F8BD214866 +:1049E0004069214B000E00901C680021902001239B +:1049F0006A46A0470124D6E701222000694602F05A +:104A000054EB29783000032900D10020FFF75FFF25 +:104A1000F8BD00206E7002F030EBF8BD10B50E4C02 +:104A2000010060602078002802D00120884710BD76 +:104A3000012020700220FFF74AFF0028F7D12070E4 +:104A40006168F2E704484078002800D001207047F0 +:104A5000014800787047000054EF00B0CCF2000429 +:104A6000D0F20004400100AAF0F10004F0B50120EA +:104A70001C490978012901D00020F0BD1A491B4EBC +:104A8000097802233374194AA024203214710124B6 +:104A9000012901D1147104E0022902D10021117110 +:104AA000F8E73374A121117100230121182703E0D5 +:104AB000032901D101233374726ACC003D1B0C4CD5 +:104AC000EC4012062406120E240EA24201D0002051 +:104AD00002E0491C0329EBDD002BCED1012131740A +:104AE000716AF0BD415B00B0405B00B0000800900F +:104AF0005830333870B500241C4D2878012803D075 +:104B0000022801D0002070BD002000F0ECF8184908 +:104B1000884200D101242878022824D1012C22D1F6 +:104B20001548144981609F214162416A0D06416A1E +:104B30002D0E406AB6735E8601000000A02F00B003 +:104B400000020000FC6C380C00F08EF8FF2D01D143 +:104B5000002412E00E4E357000F099F831781F29CC +:104B600001D10C2100E01C21084206D000F086F89B +:104B7000002000F09AF800F0B7F8200070BD0000A7 +:104B8000545B00B0583033388204000000080090B5 +:104B9000555B00B0F0B50222314C2274314B060651 +:104BA0001D782F4B360E2033012D07D0022D0BD14F +:104BB00047037F0FA0371F71000A03E0C0090E27CB +:104BC0003840A03018711E71080E1871080C187149 +:104BD000080A1871012626741971A0202274187110 +:104BE000217F0907FAD40020012D02D0022D01D126 +:104BF000187118712274A12018712674606AF0BDB2 +:104C00000100174B002070B502261E74154A144D82 +:104C100014780A06120E2035012C07D0022C0BD175 +:104C20004C03640FA0342C71090A03E0C9090E2457 +:104C30002140A03129712A711E74A12129710021FE +:104C4000012402E0032900D11C740202586A491CA5 +:104C50000006000E0904104309140429F2DB70BD9C +:104C600000080090405B00B07D20964AC00001E043 +:104C7000401E02D391684905FAD47047914921201A +:104C8000400108818F49062020310871ECE78D49E9 +:104C90008120C00000B508818A48052120300171BB +:104CA0000379FFF7E1FF180000BDF8B5002686493B +:104CB000844A4C68854911818249012220310A7158 +:104CC0000871FFF7D1FF7D27814DFF0006E02968BD +:104CD00038008847641E01D2FF20F8BDFFF7D7FFD8 +:104CE000C007F4D13000F8BD7649412000010881A9 +:104CF0007449042020310871B6E7734930B50023A8 +:104D00000D78724AE91C8901921E11436D4A118186 +:104D10006C4C03212034217101040A0E0106090E96 +:104D2000022D03D0032D03D1000C207122712171BB +:104D3000FFF79AFF002019022379401C00040B435F +:104D4000000C0428AADAEC14010000009C3100B029 +:104D50000002000082779FBCF7D3180030BD5F4986 +:104D600070B500045C4B2122CC6852011A8109788D +:104D70005B4D4A1E9201ED1E2A431A81564AD823E2 +:104D800020321371032901D1010C1171000A107135 +:104D900000201071FFF772FF7D26524DF60004E0EF +:104DA000296830008847641E03D3FFF77AFFC007E5 +:104DB000F6D170BD494970B50003474B2122CC683C +:104DC00052011A810978464D4A1E9201ED1E2A436E +:104DD0001A81414A202320321371032901D1010C89 +:104DE0001171000A107100201071FFF747FF7D2636 +:104DF0003C4DF60004E0296830008847641E03D368 +:104E0000FFF74FFFC007F6D170BD344A70B5157873 +:104E10009468334BEA1C9201DB1E1A432E4B1A8115 +:104E20002D4E02222036327102040306120E1B0E92 +:104E3000022D03D0032D03D1000C30713271337178 +:104E4000080E3071080C3071080A30713171FFF7AB +:104E500015FF244D04E029680A208847641E03D307 +:104E6000FFF71FFFC007F6D170BDF3B500240600A1 +:104E700081B01A488568FFF70BFF1848184A007878 +:104E80008101D21E1143144A11811349022220319B +:104E90000A71022804D0032806D13019000C0871C9 +:104EA0003019020A0A710871E0001822121A0298D9 +:104EB000D0400871FFF7E2FE0A4F05E039687D2017 +:104EC000C00088476D1E06D3FFF7EBFEC007F5D183 +:104ED000641C042CCFDBFEBD00080090445B00B0D6 +:104EE000040400005C5900B070B5374C216808001C +:104EF000FF308130828801231A4382808288182300 +:104F00001A438280828804239A4382802F48C8876C +:104F1000FF3161310888F022904308802C4A2D4BE4 +:104F2000002081008D18515C6D88C9180D80401CCF +:104F30000228F6D3264A284B0020983281008D188B +:104F4000515C6D88C9180D80401C1528F6D3234884 +:104F500000F014F87EBAEAAC01000000983300B00B +:104F600000020000769F210122482349036820683F +:104F7000FF30FF30801CC1821A4A002008328100B5 +:104F80008C18515C64885C52401C0C28F7D370BDAF +:104F9000144B0021383310B58A00D4189A5C648809 +:104FA0008452491C1829F7D30C4924200968C88465 +:104FB00012480068C18E090B0903C186C18E104AD0 +:104FC0001143C18680308189490A490281818189E2 +:104FD0000B4A783A1143818110BD000084EA000435 +:104FE0000E0A000038030004000800A9000900A907 +:104FF000000C00A964EA0004070700008CEA000422 +:105000007B020000F8B50026FD4D300005242E700F +:1050100041004919401C4C7003288E70F8D30020C1 +:1050200041004919401CCC7104280E72F8D3F44891 +:1050300020211030EE7301F0D6EEF14A0027FF4335 +:105040002032042017745074002041004919203187 +:10505000401C8C740428CE74F7D3E94814213C30EA +:10506000967601F0C0EEE649042040310F74487492 +:105070000020420052194032401C94740428D67417 +:10508000F7D38E76DE4800215C300A000B000EC09C +:10509000FF20DB4A0427603210720800577241007B +:1050A00049196031401C8C720428CE72F7D300215C +:1050B000D348967474300A000B000C001EC0FF2108 +:1050C000001F017147718671C671F8BDFFB58BB0C5 +:1050D0000024060015001F00002B01D002F006E896 +:1050E000C849B00040180A904068007A09908007CB +:1050F00068D5002D01D0C24C0F34310001A801F059 +:10510000FDF86B46587AC00618D1987A0007000F50 +:105110000C2813D1002F05D00121802230000B0074 +:1051200001F0E8EF0C9900223000012300F0CDFEE1 +:10513000002875D0002D73D0012137E0310001A87F +:1051400001F02CF96B46D87A40091CD001284ED0CA +:10515000022838D0032863D1002F0BD080220121F0 +:1051600030000423E4844A4701000000943500B075 +:10517000000200006F67FF7101F0C6EF802201217D +:105180003000052301F0C0EF0C9900223000042309 +:1051900000F0A5FE00287ED127E0002F05D0802258 +:1051A00001213000022301F0B0EF0C990022300001 +:1051B000022300F094FE00283CD0002D3AD00221BA +:1051C000207842009348121811722178490008187B +:1051D000C6712078401C20702CE0002F05D0802262 +:1051E00001213000052301F090EF0C9900223000DE +:1051F000052300F074FE00281CD0002D1AD00521D4 +:10520000DEE7002F05D0802201213000042301F0C9 +:105210007CEF0C9900223000042300F060FE00288F +:1052200003D0002D01D00421CAE70A9840684078D5 +:105230000228BAD009984107784827D5002D00D018 +:105240000400310004A801F023F9002F05D08122C9 +:1052500001213000042301F058EF0C9901223000A5 +:10526000042300F03CFE002810D0002D0ED0207842 +:1052700068494000401804222030C2742078400061 +:105280004018203086742078401C20700998000750 +:1052900052D5002D00E01EE001D0604C20343100DA +:1052A00006A801F0A0F908AB9878002823D0002FB9 +:1052B00005D0822201213000052301F026EF0C9950 +:1052C00002223000052300F00AFE002834D0002D11 +:1052D00032D0052222E0002D87D020780421420020 +:1052E0004C4812181172217849000818C6712078AC +:1052F000401C207079E7002F05D082220121300068 +:10530000032301F002EF0C9902223000032300F086 +:10531000E6FD002810D0002D0ED0032220783D4954 +:10532000400040184030C27420784000401840309F +:1053300086742078401C20700998400628D5002DDE +:1053400001D0364C3834310005A801F07EF9002F29 +:1053500005D0862201213000062301F0D6EE0C99FB +:1053600003223000072300F0BAFD002810D0002DE2 +:105370000ED0207842846CB801000000903700B055 +:10538000000200009B8F41CC2749400040180722B3 +:105390006030C272207840004018603086722078F9 +:1053A000401C20700998000607D5002F05D0F42274 +:1053B00001213000812301F0B2EE0998C00606D524 +:1053C000002D04D01A484C300178491C017009980E +:1053D000800606D5002D04D015484D300178491CB3 +:1053E0000170002F01D001F09EEE0FB0F0BD70B53E +:1053F0000D4C0E4B227852001219521C002807D176 +:105400005B681B7A002B24D05370107001221AE0C5 +:1054100000291FD0074B01290ED0022919D1DD7BAD +:10542000854216D11B7C0BE074F300B024F300B06E +:10543000AEF300B070EF00B01D7B854209D15B7BFD +:105440005370107001220023FFF754FE2078401C97 +:10545000207070BD8500EB185B681B7AF0E7F8B52B +:10546000FF4D687B002812D0687C04280FD00820EC +:105470006B4601246E46187001F058EE3055641CDE +:10548000042CF9D3687C0422694601F054EEF44DF3 +:105490002035A87B00280FD0687C04280CD000247D +:1054A0006E4601F044EE3055641C042CF9D3687C40 +:1054B0000422694601F042EEE94C4034A07900280C +:1054C0000BD0607A042808D001F03CEE210060394E +:1054D000C8650100607A01F03AEEF8BD70B50400CD +:1054E0000D00080000F0D6FC002805D1290020009E +:1054F00000F0ECFC002800D0012070BDF1B584B0B4 +:1055000000250498D649ED430028039110D020319E +:10551000012802916FD00E00203602286CD003289B +:105520006BD10F00403F002438007430009005E13B +:10553000CB48002610380700103F01908CE0700027 +:10554000C419E41D6B1C01F066EC07055836584F72 +:10555000596C58002178019800F0E4FE6078012829 +:1055600005D121780198002500F01CFF65E0217825 +:10557000019800F027FFF87D9F221040F8756178B0 +:1055800004290FD196EE2551010000008C3900B09E +:10559000000200005C96439121780498FFF7A8FF71 +:1055A000002834D0F87D20210843F875217801982F +:1055B000032500F031FF4AE0052901D104251BE055 +:1055C0000229B7D10125104033E060780228E8D0E5 +:1055D00004280DD121780498FFF78AFF0028E0D035 +:1055E0002178019800F018FF0325F87D20211FE0A5 +:1055F00005282CD1F87D0425402119E06078042885 +:105600001CD0052823D1052510E037E067E0ACE089 +:105610006078042819D121780498FFF769FF0028E1 +:10562000BFD021780198052500F0F6FEF87D6021B5 +:105630000843F8750BE06078042806D121780498B7 +:10564000FFF756FF0028ACD001E00528A9D020784C +:1056500089498000401840684078022805D1607868 +:10566000012802D0039801210173761CF87BB04217 +:1056700002D9042E00D26CE703982EE0002625E024 +:105680007C48710020380C183234681C0BD0072875 +:105690006BD16078042816D121780498FFF728FF91 +:1056A000002862D011E0734821781C3000F004FF1C +:1056B0006078042807D121780498FFF719FF0028A3 +:1056C00053D0062501E006284FD0761C0398807E33 +:1056D000B04201D9042ED3D30298057440E00024CF +:1056E00023E0644960002039471852376D1C3CD1D3 +:1056F000604839783C3000F08AFF7878052805D179 +:105700005C49002020390425C86500E0022538786E +:1057100059498000401840684078022804D17878C0 +:10572000032801D10120F071641C0298807EA04200 +:1057300001D9042CD5D3357212E06000C0196A304B +:105740006D1C12D10178009800F093FF0825641CAD +:10575000B07CA04201D9042CEFD3464860300571DB +:105760006D1C02D0012005B0F0BD0020FBE7F0B5B4 +:10577000050085B001F0F8EC404EB06800780028D4 +:1057800005D1002D03D100210800FFF73AFE3A4869 +:1057900003240BE07144ECAC01000000883B00B036 +:1057A00000020000A87EFD2CA100081840680078C7 +:1057B000002804D12006000E2900FFF72CFE641CEF +:1057C00032480178A142EFD8B0682F4E0078203ED1 +:1057D000002806D0002D0AD100210800FFF71BFE8B +:1057E00001E0002D03D13078022805D902E030789D +:1057F000012801D90020C0E72348234E2038C07B70 +:105800000024002837D00020FFF78CFE002832D07B +:10581000002D04D109210022080001F0B4EC01F0B0 +:10582000B6EC194C1027103C2079F757002808D106 +:10583000002F06D0012060770421601D01F0AAEC42 +:1058400001E00020607722000221380001F0A6EC80 +:10585000070004280BD0607F002801D004202071AD +:10586000207F002802D0022001F09CEC77740124F4 +:10587000042F00D10024044FB07E2037002833D0FD +:105880000120FFF74FFE05E094F300B024F300B0D1 +:1058900084E00004002827D0002D04D10921012232 +:1058A000080001F070EC01F082EC10203856E44959 +:1058B0000191497C002904D10121B973019A002189 +:1058C0005160019A042101F06AEC042803D0019A86 +:1058D0000421517478740121042800D1002121434E +:1058E00001D0012400E00024D548B97E24300029ED +:1058F00003902BD00220FFF715FE002826D0002DA4 +:1059000004D109210322080001F03CEC0399CC4AA0 +:105910000820085620320821019201F040EC0428AA +:10592000009009D00198C07A002802D0082001F028 +:105930003AEC03980099417200990120042900D1A2 +:105940000020204301D0012400E000240398817C42 +:10595000BB4844300029029020D00320FFF7E2FD2D +:1059600000281BD0002D04D109210422080001F0D9 +:105970000AEC0299B24A042008563832402101F05C +:105980000EEC042801D0029948710121042800D1AD +:105990000021214301D0012400E0002402988079F5 +:1059A00000280CD087DB458C01000000843D00B04E +:1059B00000020000B186235C09210022080001F0EA +:1059C000ECEB00221021092001F0F2EB042800D0BA +:1059D00001240298C07900280CD009210322080074 +:1059E00001F0DAEB00222021092001F0E2EB04288B +:1059F00000D00124012D01D0022D4AD195483C3818 +:105A000045787F2001F0E0EB707B002804D0002275 +:105A1000707C110001F0ACEBB87B002804D00022B0 +:105A2000787C110001F0A8EB8B48A90008184068A9 +:105A30004178022912D003292DD10020874B0190F3 +:105A400000901C680100962001AA6B46A0470198AF +:105A50000178002001F0BCEB01241CE0002C1AD0DE +:105A6000C56868680178022001F0B6EBA868017883 +:105A7000042001F0B2EB28690178082001F0ACEBBA +:105A8000E8680178802001F0A8EB287801F0A8EB05 +:105A900001E0FFF702FD200079E600280BD0012885 +:105AA0000FD0022812D0032816D16A482E30086081 +:105AB0000A38807C7047674835380860C01FC07B53 +:105AC000704764480A380860123803E061481630AD +:105AD00008601238807E704700200860704738B533 +:105AE000040000200B00002900902DD02000694602 +:105AF000FFF7D3FF0500002106E0009842789A42A4 +:105B000019D0801C491C0090A942F6D3002C1BD14F +:105B1000022B19D14F483538009013E00098417896 +:105B200004290BD10278032A08D30021022000F0B7 +:105B3000B4F9002802D00098007838BD0098801C85 +:105B4000641C0090AC42E9D3052038BD38B50B0089 +:105B500000211400002B009125D0052C23D069468C +:105B6000FFF79BFF00211CE0002C01D0022C07D185 +:105B7000009A55789D4210D11278002A0DD10AE082 +:105B8000009A1578A54208D152789A4203D0042A87 +:105B900003D1022B01D1012038BD009A921C491C6F +:105BA00000928142E0D3002038BD18B50022294977 +:105BB00003001000564809D701000000803F00B0E4 +:105BC00000020000456E9DE13C390092C97B03E074 +:105BD00014789C4239D0401C8142F9D80020694693 +:105BE000FFF765FF002106E0009A14789C422CD054 +:105BF000921C491C00928142F6D301206946FFF7AE +:105C000056FF002106E0009A14789C421DD0921C99 +:105C1000491C00928142F6D302206946FFF747FFF4 +:105C2000002106E0009A14789C420ED0921C491C78 +:105C300000928142F6D303206946FFF738FF002126 +:105C400008E0009A14789C4201D1012018BD921CF2 +:105C5000491C00928142F4D3002018BD02482C3820 +:105C60007047014870470000B0F300B024F300B063 +:105C7000ECF10004F8B50400002005212218401CB6 +:105C800004285170FAD30026300026702218401CD8 +:105C900009289171FAD3002066712218401C03284C +:105CA0001174FAD30025E673122068430521001908 +:105CB0000700203779711430102101F020EA6D1CA3 +:105CC0000A2D3E71F0D3E674F8BD010000200029D2 +:105CD00005D0012905D0022900D1FA487047FA48B9 +:105CE0007047F848C8387047F6480521B03001764B +:105CF00041767047F44810B5FFF7BCFFF148C8384B +:105D0000FFF7B8FFEF48FFF7B5FFFFF7EDFF10BD56 +:105D100003000800052B00B507D0FFF7D6FF0028C9 +:105D200003D081184A78052A01D0002000BD4B70AD +:105D30000178491C0170012000BD0200080000B577 +:105D4000FFF7C3FF002801D1052000BD801840786F +:105D500000BD03000800052B00B507D0FFF7B5FF15 +:105D6000002803D081188A79052A01D0002000BDBF +:105D70008B714179491C4171012000BD020008006E +:105D800000B5FFF7A2FF002801D1052000BD801853 +:105D9000807900BDFFB581B01E0007000800052F07 +:105DA0001CD00399002919D0721F0C2A16D2FFF7B4 +:105DB0008CFF040012D0E07C0A280FD2002511E0ED +:105DC00012206843391AF649010000007C4100B0F6 +:105DD00000020000A039C0E624210019095CB1428C +:105DE00009D103991430320001F09AE9002802D158 +:105DF000002005B0F0BD6D1CE07CA842EAD8E07C34 +:105E000012235843320000190300203047710671F5 +:105E100018000399143001F028E8E07C401CE0747D +:105E20000120E6E7AD4A1178002907D00021531878 +:105E30005B78834223D0491C0429F8D35179002987 +:105E400007D0002153189B79834218D0491C092997 +:105E5000F8D3D17B002907D0002153181B7C834243 +:105E60000DD0491C0329F8D3D17C00290CD0002186 +:105E700012234B439B1820335B79834201D10120CD +:105E80007047491C0A29F3D30020704710B50C0055 +:105E90001300FFF75CFF002C0DD105280DD09842B0 +:105EA0000BD0002B0BD18E49C9680978002906D187 +:105EB000022804D101E0984201D1012010BD002048 +:105EC00010BD10B50C001300FFF762FF002C0DD1C0 +:105ED00005280DD098420BD0002B0BD18049C96802 +:105EE0000978002906D1022804D101E0984201D1A5 +:105EF000012010BD002010BD70B50021774E784AFA +:105F0000F57CD46810E012224A439219203252796B +:105F1000824206D0022A06D12278002A03D1002824 +:105F200001D1012070BD491C8D42ECD8002070BD0C +:105F300000280AD001280CD168486A4A80180278E3 +:105F4000052A06D10170012070474B226348D20018 +:105F5000F4E70020704770B504000E0010001D002B +:105F6000002944D1002806D0012804D0022820D0DE +:105F700003282ED02BE022003100FFF787FF0028F6 +:105F800010D0220031002800FFF79BFF02E0012023 +:105F900000E00020002804D1042D02D12000FFF7EA +:105FA000ABFF70BD31002800FFF7F2FEA042F0D138 +:105FB000EDE722003100FFF769FF00281DD1310015 +:105FC0002800FFF7E5FEA04201D1012070BD0020AE +:105FD00070BD220074ACA94E01000000784300B0EF +:105FE0000002000054D17E5B3100FFF759FF00280A +:105FF000F7D0220031002800FFF76DFF0028F0D015 +:10600000EDE722003100FFF74BFF0028EAD1220024 +:1060100031002800FFF75FFF70BD3548C07C0028C5 +:1060200000D001207047FFB5002081B005261F0079 +:10603000FFF75FFE0500039800282BD0052F29D31A +:10604000102F27D8002422E0122060433A00401984 +:106050000100203100910979B94200D20A00039968 +:10606000143001F068E8002810D1009802994279B4 +:106070000198FFF789FD002808D00A9802210170D5 +:1060800012206043401920304079BCE6641CE87C53 +:10609000A042D9D8029B00F0FAEE09181515150692 +:1060A000151515151800AE7A052E10D10F48019957 +:1060B000B030002901D1067E07E0019901290BD1FA +:1060C000467E02E0029828188679052E04D00A99A7 +:1060D00001200870300096E6019804280ED20A9834 +:1060E000002101700198281840788CE68CF500B0EA +:1060F000FCF300B024F300B0590200000A98FF211D +:10610000017005207FE600001CB50020084B0190BF +:1061100000901C6801007E2001AA6B46A0470198F0 +:106120000078022801D101201CBD00201CBD000008 +:10613000ECF10004F8B50400874F38688047552615 +:1061400076063069012189028843306183480068FE +:106150008047834D002C09D0E878002806D181497A +:10616000086A012292041043086226E0A8787D495B +:10617000000140394018046A2878002801D06408DA +:106180006400687800280FD0386880472879002894 +:1061900002D031690143316170480068804772481C +:1061A00084436878002802D12878002805D0A87890 +:1061B00001016C4840380818046201F034E80021FD +:1061C000080001F034E8F8BDF3B50400002529000B +:1061D000012081B001F02AE8614E0020F470012C0A +:1061E00030702CD191683CF301000000744500B080 +:1061F000000200004D29A02BB0785F4A0101403A0F +:106200008918096A8907C917491C717015D00128B6 +:1062100021D0022835D147045448006880475521D1 +:10622000490608693A06120E1040307102D008691A +:10623000B84308614E4800688047B07801014E4875 +:1062400040380A18106A3178002906D04C4B1843A0 +:1062500019E07070F1E70427DEE7430DDB0712D188 +:10626000707800280DD041480068804730790028B8 +:1062700004D0552252061169014311613C4800685F +:1062800080470020FEBD7378002B04D03B494000BE +:106290004008084301E0002900D01062364E012C6E +:1062A00006D13848016A03229203114301620BE0D0 +:1062B0000127FF051520C0043062012000F06EF8B0 +:1062C0003762012000F06AF830492F48486102998E +:1062D00000291CD02D49C861FF2009300861012028 +:1062E000800255277F06F860204800688047306AA2 +:1062F0000121000A00026230890208433062F86816 +:10630000800AC007FBD01A4800688047F868FF275A +:106310001E497F1CFF20093008611448006880472F +:10632000B90055204006C16002690A430261104865 +:1063300000688047306A000A00026230002C05D1F4 +:10634000316A490CC90707D0384303E0012C03D157 +:1063500061020843012501E0002D01D0306202E016 +:106360000020FFF7F1FE2800FEBD0000CCF2000483 +:10637000D0F200047C6200B0400100AA02000020BC +:106380000100C003400800AA001F00AA400000AAA4 +:1063900006488168102211438160704703494A6BA7 +:1063A000401C4B6B9B1A8342FBD37047003C008020 +:1063B0007CB504000020DF4E2077356800291CD111 +:1063C000231D22009D20A8473568002199206A4698 +:1063D00001ABA847009800210078607135689A20C9 +:1063E0006A4601ABA84700980078A071217900297E +:1063F0001CD0601D4CFEF5D101000000704700B0BC +:1064000000020000B9C11E9600F000EF18E0002164 +:1064100001206A4601ABA84700982200007820714D +:1064200035680021022001ABA8473568002104200F +:106430006A4601ABA8470098017861714078A07165 +:1064400001207CBD7CB50400002909D1BE4BB520DC +:106450001D686A4601ABA84700986061401CA061B6 +:1064600001207CBD7CB5040000200090B6480126C8 +:10647000056800296A4605D19B2001ABA847009812 +:10648000007807E00021032001ABA84700982021F5 +:1064900000780840E071E0799F21084000D0E07169 +:1064A00030007CBDFEB501AA04000120A64B2500EA +:1064B000103500901E682F1F00291CD1B02002ABA0 +:1064C000B04701982B0001782172007860729E4DD0 +:1064D0000120A0722D683A000021AD20A8479A4BF8 +:1064E00000211D68AB2001AA02ABA84701980078E3 +:1064F000000160741AE000210A2002ABB0472000BE +:1065000001990322083000F0CEEC8F4B00211E6869 +:10651000072001AA02ABB04701982B0000788A4DF2 +:1065200060742D683A0000210620A847617C0809A4 +:10653000032800D203200907090F000101436174F9 +:106540000098FEBDF0B5040023000120113387B090 +:106550005D1F0390281F7C4F0029069059D1002011 +:1065600002903E68221D01009F20B04760680178BC +:10657000002909D14178002906D18178002903D169 +:10658000C078002800D160743E680021B02004AAC1 +:1065900005ABB04704986B460178197100785871C3 +:1065A0000120987101A800F05AEE60733E68002146 +:1065B0009E2004AA05ABB04704980021007802AAE7 +:1065C0000007000F8030A0733E68AB2005ABB047DA +:1065D0003E680021A22004AA05ABB04702980499A6 +:1065E0000078097800010907090F0843E0732B00C0 +:1065F0003D680021069AAF20A8473D680021A020F1 +:1066000004AA05ABC21B8680010000006C4900B0E3 +:10661000000200007ED81CCBA84704990422200069 +:1066200000F04AEC2FE0002002903E68221D01009D +:106630000F20B0473E680021102004AA05ABB047E8 +:1066400004980021007820703E68112004AA05AB50 +:10665000B04704990322601C00F02EEC049800213E +:10666000C078E0733E68142002AA05ABB0470298D8 +:1066700000F0FEED60738120A0732B003D680021C7 +:10668000069A1320A84700202074E17B08090328FC +:1066900000D203200907090F00010143E173207BA9 +:1066A000172801D917202073039807B0F0BDFEB555 +:1066B000040000260029C67228D1284DA6202F6884 +:1066C00001AA02ABB847019800784008C00702D081 +:1066D0000120A0721BE0A6722E680021A32001AA4F +:1066E00002ABB0472E680021A5206A4602ABB04736 +:1066F000009802AB017821724178801C6172221DE2 +:1067000020602C680021A720A04700E0A67201208D +:10671000FEBDF8B5040000291DD1104D22002E68E1 +:10672000B7206B46B047002600962F68221D310027 +:10673000B9206B46B847220000962F680832002126 +:10674000B6206B46B847220000962C680C32002118 +:10675000B8206B46A0470120F8BD0000ECF1000412 +:10676000102810B502D100F088ED10BD1128FCD121 +:1067700000F086ED10BDF8B505000800224F1C00A2 +:106780002900224D224E3B68222918D023291AD1F4 +:10679000012A03D020009847822124E01D4909687E +:1067A0008847112C03D0132C03D1002202E00122D0 +:1067B00000E009220100100000F066ED1AE0132C41 +:1067C00005D0112C03D02000984787210BE0002A28 +:1067D000E0D111480068002802D04079A04207D0DB +:1067E0002000984783212A68904731688847F8BD80 +:1067F00000F04EED0028FAD1396820008847F1E713 +:106800001323B8E71123B6E788F2000430F200043E +:1068100040F20004EE02F75601000000684B00B0A1 +:10682000000200008A30A2763CF20004246300B02B +:10683000F8B515000022A44E009236681C002B000B +:106840006A46B04701280CD1002005E00099095C98 +:106850002154401C0006000E29788142F6D8002001 +:10686000F8BD0920F8BD10B51C0013002200974C9C +:106870002468A047012801D1002010BD092010BDC7 +:10688000934A10B512689047002010BD0020704751 +:1068900000207047F8B514001D008B4E00220092B6 +:1068A00036686A46B047002005E00099095C21542B +:1068B000401C0006000E29788142F6D8F8BDF8B5D4 +:1068C000050016001C00834A002159206B46FFF783 +:1068D000E1FF012D0DD13078002800D020787D49CE +:1068E0006B4688700A001B780021592000F0E5F8FB +:1068F00001E0A07820700020F8BDF8B51C00012848 +:1069000013D11078002801D1724C20706F4D0127EF +:106910002E683B00220000214020B04722002C6856 +:106920003B0000214E20A04705E01300220000217B +:106930004020FFF7AFFF0020F8BD10B566490024E6 +:1069400001280CD11078002801D1624B1C701A78F4 +:106950008879012A01D10006000E887100E01C70C0 +:10696000002010BD11001A00012810B50BD10878C5 +:10697000002801D1574A1070544C0123246800218B +:10698000BB20A04704E00B000021BB20FFF782FFE3 +:10699000002010BD70B51C000125012820D1107801 +:1069A000002802D14B4C3020207020788006800FC8 +:1069B000207007D0012807D002280FD0032805D166 +:1069C000FE2002E0402000E08020207022003F4CAA +:1069D0002B00246800216720A0471FE0C020F4E7B7 +:1069E0001300220000216720FFF754FF2078402881 +:1069F00007D0802807D0C02807D0FE2807D1032061 +:106A000004E0002002E0257001E0022020702078E0 +:106A1000CF2101408007800E01432170002070BD0E +:106A2000002070478DE03EF701000000644D00B08B +:106A30000002000093C87C06FEB50C00070016009B +:106A40001D0000218F2001AA6B46FFF72DFF3800A3 +:106A5000012701282AD1082C0ED13078002806D031 +:106A60002878002803D06B461879384315E06B4628 +:106A700018794008400010E0112C0FD13078002820 +:106A800007D02878002804D06B46187902210843E3 +:106A900003E06B461879FD2108400190104C3B0043 +:106AA000246800218F2001AAA0470EE0082C04D101 +:106AB0006B461879C007C00F05E0112C04D16B4656 +:106AC00018798007C00F287037700020FEBD30B4E1 +:106AD000034C2468A44630BC60470000F4F1000475 +:106AE000E8F10004F8F10004ECFA00B067DF0004FC +:106AF00010B50400D088C01ED080106800F0E0EB14 +:106B0000024A012112682000904710BD7CF3000466 +:106B1000FEB50400264D10D00126012C1AD0022CFF +:106B200018D0032C08D12869B04328610120FFF751 +:106B30005DFC286930432861FEBD2868400840009C +:106B4000286028694008400028610021080000F002 +:106B5000A0EBFEBD0021012000F09AEB1448016873 +:106B6000314301600025134B019500951F682900F2 +:106B70007F2001AA6B46B8470198007800280BD106 +:106B80000C4B04251F680021802001AA6B46B847E2 +:106B900001980078C0000543074835438543022C1F +:106BA00000D000267000054301480561FEBD0000CD +:106BB000400100AAECF10004020C00002049012071 +:106BC0000968084710B500F080EB1D4901200968ED +:106BD000884710BD1CB500201A4901900090C8706C +:106BE000194B01001C6850206A4601ABA0471748AA +:106BF00000688047002816D08188C2886B46891AB1 +:106C00001A7991420FDB124B01001B6800989847DC +:106C10006B4618790F4B01221C68D2030221002316 +:106C2000A04701201CBD00201CBDC91F222902D283 +:106C30004078072884971D2201000000604F00B0B3 +:106C4000000200006720C2BB01D000207047012075 +:106C500070470000B0F100045CDD0004ECF10004BA +:106C600064F10004D0F100045CF1000410B500F000 +:106C70003AEB3D4C00216170002821700BD000F0F0 +:106C800036EBA07000F036EB394B4101A0781C6860 +:106C9000364A0023A04700F032EB364800688047B0 +:106CA00000F030EB00280AD0012000F030EB01208A +:106CB00000F030EB012000F032EB032000E0052073 +:106CC000FDF7AFFE2C480068804710BD10B52B497A +:106CD0000400254809688078884700F024EB0120EB +:106CE000FDF79FFE0120207010BD1F48012110B547 +:106CF00041700078002808D121490120096888479F +:106D00000520FDF78EFE00F00EEB10BD70B50C00F7 +:106D1000154D48070FD5FB200440287800280AD1DC +:106D2000012028700320FDF77CFE012000F0F2EA2C +:106D3000012000F0F4EA200715D50520FDF771FECB +:106D40006878002805D00E4901200968884700F0BE +:106D5000EAEA2878002806D00020287000F0DAEA55 +:106D6000002000F0DCEA70BD386300B0632201004F +:106D700030F30004CCF20004D0F2000438F3000435 +:106D8000B0F1000410B500F0AEEA394C00212170DA +:106D9000002861700BD000F0AAEAA07000F0AAEA07 +:106DA000354B4101A0781C68324A0023A0470120DE +:106DB000FFF7B8FE00F0A2EA00F0A4EA002807D02E +:106DC0002E490420096888472D4901200968884711 +:106DD00010BD10B52B490400254809688078884704 +:106DE00000F0A0EA0020FFF79DFE0120207010BDFA +:106DF0001F48012110B501704078002808D12249B0 +:106E00000120096888470020FFF78CFE00F08AEA1D +:106E100010BD70B50C00164D48070BD5FB20044083 +:106E20006878002806D10120687000F074EA01201B +:106E300000F074EA200719D52878002809D01249F3 +:106E400001200968CE0246A0010000005C5100B09C +:106E500000020000193B650B88470020FFF76CFE1D +:106E600000F06AEA02E00320FFF766FE6878002877 +:106E700006D00020687000F058EA002000F058EAC0 +:106E800070BD00003E6300B06322010030F30004D7 +:106E9000D8F20004D4F2000438F30004B0F1000486 +:106EA00004F01FE52106020004F01FE52906020098 +:106EB00004F01FE50142000004F01FE54542000018 +:106EC00004F01FE5AB54000004F01FE58D550000F1 +:106ED00004F01FE5E554000004F01FE5F95400003C +:106EE00004F01FE5DB55000004F01FE53F550000EE +:106EF00004F01FE5A955000004F01FE5611700002C +:106F000004F01FE52180000004F01FE544973400E1 +:106F100004F01FE57C98340004F01FE5209B34004A +:106F200004F01FE5016B300004F01FE59D91300077 +:106F300004F01FE57B91300004F01FE51F6B30006B +:106F400004F01FE56F8F300004F01FE5F99030006A +:106F500004F01FE5D352000004F01FE5C555000002 +:106F600004F01FE50757000004F01FE57755000007 +:106F700004F01FE5EB56000004F01FE5315300005C +:106F800004F01FE5BD90300004F01FE5C19133000F +:106F900004F01FE5EB90330004F01FE5D3843000CC +:106FA00004F01FE5D504340004F01FE5C791330059 +:106FB00004F01FE597EA300004F01FE54385300038 +:106FC00004F01FE5791C000004F01FE5C91C000057 +:106FD00004F01FE57798320004F01FE5A398320013 +:106FE00004F01FE51562000004F01FE5556A30004B +:106FF00004F01FE59B7F000004F01FE5409B340078 +:1070000004F01FE51981000004F01FE57F6800000F +:1070100004F01FE51969000004F01FE55F77000028 +:1070200004F01FE53B65000004F01FE5036D300030 +:1070300004F01FE50964000004F01FE5B19B340073 +:1070400004F01FE54D9C340004F01FE56DD00000F6 +:1070500004F01FE510133C2501000000585300B058 +:1070600000020000EDD3DBB6D9D5000004F01FE527 +:107070000BD8000004F01FE5E9D5000004F01FE57F +:107080006369300004F01FE5B30D310004F01FE523 +:10709000F334310004F01FE5D1A2340004F01FE501 +:1070A000A74F310004F01FE5296F310004F01FE500 +:1070B00041D8000004F01FE561D8000004F01FE58E +:1070C00055CC000004F01FE56776300004F01FE5A2 +:1070D000076B300004F01FE5A5CC000004F01FE5AD +:1070E000D557000004F01FE57899340004F01FE53F +:1070F000C782300004F01FE5D9D7000004F01FE577 +:107100005B55000004F01FE5FB69300004F01FE54B +:107110005564000004F01FE50FB7300004F01FE5D0 +:10712000059E340004F01FE52954000004F01FE51B +:107130008554000004F01FE5B553000004F01FE57E +:107140000354000004F01FE55953000004F01FE54C +:10715000BD52000004F01FE59953000004F01FE544 +:107160003F2A000004F01FE52402020004F01FE59E +:107170009899340004F01FE58771300004F01FE592 +:10718000EB21320004F01FE58372300004F01FE5AC +:107190002FD8000004F01FE5E17D330004F01FE567 +:1071A000516F300004F01FE5CF6F300004F01FE591 +:1071B000F171300004F01FE57572320004F01FE534 +:1071C0001898340004F01FE5D098340004F01FE54F +:1071D0003497340004F01FE5C502020004F01FE5F7 +:1071E000D36E000004F01FE51D56000004F01FE5FB +:1071F000A357000004F01FE553D2010004F01FE57F +:107200004DD3010004F01FE58FF7000004F01FE5E7 +:10721000930D010004F01FE575D3010004F01FE594 +:10722000FDF6000004F01FE527F1000004F01FE563 +:10723000B5E7000004F01FE513E8000004F01FE5C7 +:10724000D5E7000004F01FE55B11010004F01FE525 +:10725000B7CD010004F01FE5EBCD010004F01FE500 +:10726000B78B0100987E99E501000000545500B0ED +:1072700000020000F42B05C604F01FE547CA010018 +:1072800004F01FE555C7010004F01FE58304010069 +:1072900004F01FE5CFCE010004F01FE59BCD0100F7 +:1072A00004F01FE58DCA010004F01FE557CE010070 +:1072B00004F01FE5E7CE010004F01FE571CE0100E8 +:1072C00004F01FE527CE010004F01FE539CE0100D0 +:1072D00004F01FE579CE010004F01FE5C1F80000BD +:1072E00004F01FE5E5F6000004F01FE57F50010003 +:1072F00004F01FE5B1DD000004F01FE5E1DD000052 +:1073000004F01FE53942010004F01FE50BE1010024 +:1073100004F01FE547BF010004F01FE5A5090100C7 +:1073200004F01FE509DF000004F01FE5452201001D +:1073300004F01FE56392010004F01FE505FF000063 +:1073400004F01FE5F9FE000004F01FE549140100F8 +:1073500004F01FE53FA2010004F01FE5BDA50100F8 +:1073600004F01FE52DFF00006863740097740000AF +:10737000A80104006C636F00C3583100C805080100 +:107380006C646100E54E3200300204026C736300ED +:10739000A1FC3200800202036C647200C19E3200C4 +:1073A000F00107046C747300717E33006001030503 +:1073B00062646800F57F300000080C0668636300B3 +:1073C00067CA300048040B070000000000000000FE +:1073D00000000000000000000000000000000000AD +:1073E00000000000FFFFFF00FFFFFF00FFFFFF00A6 +:1073F000FFFFFF00FFFFFF000C0000000000000087 +:107400000B000000000000000A0000000000000067 +:107410001500000000000000000000000000000057 +:10742000000000000000000000000000000000005C +:107430000000000000050A06003C0080060008006D +:10744000090006000300050008000300030009000E +:10745000050003000300050006000300030005000B +:10746000050003000300060005000300BB08770CBD +:10747000F40EBB08BB2DE47701000000505700B0AC +:107480000002000000C3BB7B00057D07770C0005F0 +:10749000C103F40E7D07C103C1037D07FA09C103CF +:1074A00000057D077D070005C103FA097D07C103BB +:1074B000900CEE118315900C3107C60AEE113107BE +:1074C00067058315C60A67056705C60A5A0E67056C +:1074D0003107C60AC60A310767055A0EC60A67058C +:1074E000E60C69121616E60C6307100B69126307A7 +:1074F0008C051616100B8C058C05100BBC0E8C051C +:107500006307100B100B63078C05BC0E100B8C056A +:10751000FF000000000000000000000000800000EC +:10752000000000000000000000000000000000005B +:107530000600030904060405070A080106020807F5 +:107540000F007F00010000000000000004000000A8 +:1075500000000000FFFFFF0F00000000FFFFFFFF23 +:1075600000000000FFFFFFFF00000000FFFFFFFF23 +:10757000000000000000000000000000000000000B +:1075800000000000000000000000000000000000FB +:1075900000000000000000000000000000000000EB +:1075A000007D0000000000000100000080380100A4 +:1075B00000000000030100000000000000000000C7 +:1075C0000000000000000000000000002804080087 +:1075D000000000006404040003000000000000003C +:1075E00000000000000000004C003200000000001D +:1075F0009C0008000000000058010C000100000081 +:107600000000000000000000010000000000000079 +:107610000000000000000000320C0200000000002A +:10762000000000001801020000000000000000003F +:107630000100000000000000000000000000000049 +:107640003D0C0200000000000000000000000000EF +:107650000000000000000000AD7B00000100000001 +:10766000B77B00000200000000000000FFFFFFFFEA +:1076700080EA00B0020101000202010001020100E3 +:1076800001030200F6D1F0E4010000004C5900B003 +:1076900000020000C7DAB926010301000000000063 +:1076A00000000000000000000000000001000000D9 +:1076B00000000100140000000000000000000000B5 +:1076C00000000000010000000504020000000000AE +:1076D0002000140000000000ED8D000012000000EA +:1076E000000000000000000000D9000000000000C1 +:1076F0000000000000000000000000000200111067 +:1077000000018200000000000000000000000000F6 +:107710000000000000000000202D0001010000001A +:107720000000000000000000000000000000000059 +:10773000000000000000000204070A0D10131602EA +:10774000070D13191F282E00000000000000000084 +:107750000200080015001F00C500C600C700CC00CD +:107760002E01370138013B013C013D013E013F0143 +:107770005F016701E901EA01F7C707870000000020 +:107780008090808040454545010101012618181868 +:1077900004090E0416161414BEBFB8BB9E6E6B66A9 +:1077A0009E6E6B662820202022212121709D9DB88D +:1077B00000000000111100112444444438343434D2 +:1077C0009E6E6B669E6E6B66230C020000000000CE +:1077D000000000000000000079C700004000000029 +:1077E00065C7000008000000B5C7000004000000E5 +:1077F00007C800000100000015C8000020000000BC +:107800009DC7000002000000000000007F00000093 +:107810000000000000000000000000000000000068 +:107820000000000000000000000000000000000058 +:107830000000000000000000000000000000000048 +:107840000000000002000000000000000100000035 +:1078500000000000001200AA00000000020000006A +:1078600000000000001000AA00020000020000005A +:1078700000000000280000000000000000000000E0 +:1078800000000000000000000000000000000000F8 +:1078900000000000DDE128C801000000485B00B0E6 +:1078A000000200003332079B0000000000000000CF +:1078B00000000000000000002A0C02000000000090 +:1078C00001000000350C020000000000B934010086 +:1078D0000100000009313400020000004F3F340075 +:1078E000040000004F413400080000000D32010088 +:1078F000100000006732010020000000D32C0100BE +:10790000000400005541340000010000233734001A +:1079100000020000C73134000000004000000000F9 +:10792000FF00000000000000812D0100EF2D01008C +:10793000000000000000000000000000C8A90300D3 +:1079400000404B4C07000000B0C19A5C03000000EF +:10795000D276000085010100000000000000000058 +:107960000702000000000000245C00B000000000DE +:1079700000000000393D010001000000000400008B +:1079800088C500B054040004185C00B0000000007A +:10799000000009090900000009090000000000FFBB +:1079A0000000000101010000FFFF000000000000D6 +:1079B00000000000000000000000000000000000C7 +:1079C000FFFFFFFF000100000000000000000000BA +:1079D00001000000000000000000000000000000A6 +:1079E0000000000000000000B8B0340001000000FA +:1079F000CCB0340002000000DCB034000C00000009 +:107A0000ECB034000D000000FCB034000F000000AA +:107A100010B134001000000020B134001F0000003D +:107A200034B134002000000048B1340000000000F0 +:107A30004CBB34002100000060B134002400000081 +:107A400070B134002500000080B134002600000031 +:107A500094B1340027000000A8B1340028000000D1 +:107A6000B8B134002C000000C8B134002D00000073 +:107A7000DCB1340031000000F0B13400320000000D +:107A800000B234006F00000018B234007200000031 +:107A90002CB234007300000040B2340074000000C7 +:107AA00050B23400B3980F5201000000445D00B0A2 +:107AB000000200002ACAD9EB7C00000064B2340046 +:107AC0007D00000074B23400A400000088B23400CD +:107AD000010000002CBB3400020000003CBB34005D +:107AE000A500000098B23400AD000000A8B2340038 +:107AF000B5000000BCB23400B70000006809000403 +:107B0000B80000007C090004B900000090090004DE +:107B1000BA000000B4090004BB000000D80900044A +:107B2000BC000000D0B23400BE000000E0B234005F +:107B3000C0000000F8B23400C800000008B33400F0 +:107B4000D00000001CB33400D100000030B334007A +:107B5000D200000040B33400DC00000050B3340019 +:107B6000DD00000060B33400E700000074B33400AF +:107B7000E800000084B3340003000000CCBA3400F5 +:107B8000ED000000BCBA340006000000DCBA34008E +:107B90000D000000ECBA34000E000000FCBA340006 +:107BA0000F0000000CBB3400170000001CBB3400A9 +:107BB000F00000009CB33400F4000000ACB33400CB +:107BC000FC000000C4B33400FD000000D4B3340056 +:107BD00007010000E4B3340009010000F8B33400E9 +:107BE0000A01000008B434001901000018B4340080 +:107BF0001A01000028B434001B0100003CB434001A +:107C00001C0100004CB434001E01000060B43400BC +:107C10001F01000070B434002001000084B434005F +:107C20002101000094B4340025010000A4B4340004 +:107C300028010000B4B4340029010000C8B43400A5 +:107C40002A010000D8B4340067010000280A0004AB +:107C500068010000FCB43400720100000CB534006F +:107C6000730100001CB534007701000030B534000A +:107C70007801000044B534007901000058B53400A3 +:107C80007D0100006CB534007E0100007CB534003D +:107C9000A60100008CB53400A70100009CB534009B +:107CA000AF010000B0B53400B0010000C0B5340031 +:107CB000B10100000A77976F01000000405F00B03B +:107CC00000020000DE226756D4B53400B201000085 +:107CD000E4B53400BC010000F8B53400C001000078 +:107CE00010B63400C801000024B63400C9010000F9 +:107CF0003CB63400CA01000050B63400CB0100008D +:107D000060B63400CC01000074B63400CD01000030 +:107D10008CB63400CE010000A4B63400CF010000C0 +:107D2000BCB63400D0010000D0B63400D101000050 +:107D3000E0B6340000020000F4B634000102000096 +:107D400004B734002F0200001CB7340030020000DA +:107D500030B734003102000044B734003202000072 +:107D600058B73400340200006CB73400350200000C +:107D70007CB734003B0200008CB734003C020000AA +:107D8000A0B734003D020000B4B734003E0200004A +:107D9000C8B734003F020000E4B7340040020000DE +:107DA000F8B734004102000008B834007002000047 +:107DB0001CB83400710200002CB834009F0200008F +:107DC00044B83400A002000058B83400A1020000FA +:107DD0006CB83400A202000080B83400A402000095 +:107DE00094B83400A5020000A4B83400AB0200002F +:107DF000B8B83400AC020000CCB83400AD020000CA +:107E0000E0B83400AE020000F4B83400AF02000065 +:107E100008B93400B002000018B93400B102000003 +:107E20002CB93400B202000040B93400B3020000A3 +:107E300054B93400B402000068B93400B50200003F +:107E40007CB93400B602000090B93400B7020000DB +:107E5000A0B93400B8020000B8B93400C202000072 +:107E6000C8B93400C3020000D8B93400CD02000004 +:107E7000ECB93400CE02000000BA3400D002000099 +:107E800014BA3400D10200002CBA3400D20200002F +:107E90003CBA3400D30200004CBA3400D4020000D3 +:107EA0005CBA3400D502000070BA3400D60200007B +:107EB00084BA3400D702000098BA3400D802000017 +:107EC000ACBA34009F8D37E4010000003C6100B083 +:107ED00000020000D6FD968B1800000060BB340045 +:107EE000D9020000B4060004DB020000C80600044A +:107EF000DC020000D8060004DD020000EC060004ED +:107F0000DE02000000070004DF020000100700048A +:107F1000E902000024070004EA020000340700041C +:107F2000EE02000044070004F202000054070004BF +:107F3000F302000068070004F40200007C0700045C +:107F4000F502000090070004F6020000AC070004F0 +:107F500096030000BC07000497030000D407000448 +:107F60009F030000E4070004A1030000F8070004D9 +:107F7000A203000008080004A30300001C0800047A +:107F8000A403000030080004A5030000400800041A +:107F9000B403000054080004B503000064080004A2 +:107FA000F203000074080004F303000088080004D2 +:107FB000F40300009C080004F5030000AC08000472 +:107FC00024040000C008000425040000D4080004B4 +:107FD00027040000EC0800042F040000000900043E +:107FE0003004000018090004310400002C090004CA +:107FF0003204000040090004330400005409000466 +:1080000034040000EC09000435040000000A0004F8 +:1080100039040000140A00040000020000000000FF +:108020000000000000000000B06200B0401400AA90 +:10803000000000000200000000000000601400AA20 +:10804000000000000200000000000000001400AA70 +:108050001E0000000200000000000000201400AA22 +:108060001E000000020000000000000001000000EF +:108070000000000000000000000000000000000000 +:1080800000000000FFFFFFFF0000000003000000F1 +:108090000000000000000000000000005400140078 +:1080A00000000000AC0003000000000030010400EC +:1080B00000000000000000000000000000000000C0 +:1080C00000000000000000000000000000000000B0 +:1080D000F05B00B00783E66B01000000386300B07E +:1080E00000020000221528360000000000000000F9 +:1080F0000000000000000000000000000000000080 +:1081000099070000E3030000C12A0000C10000003D +:1081100035100000110D0000E8020000750300009A +:10812000E9000000C7030000690600005F0F0000BF +:10813000676B00008778000035120000D50C000046 +:10814000970300000000000000010000140C020072 +:108150000002008088020080000000000000000093 +:10816000000000000000000000000000000000000F +:1081700000000000000000000000000000000000FF +:1081800000000000000000000004B22FFB0F000000 +:108190000000932FFB0F801F3F7E7C2FFB0F001FE3 +:1081A0003E7C6F1FFBE88F1EBD7B65CFF8C6AF5EC0 +:1081B000FD7B5D9FF7B0AF5EFD7B59CFF6A0AF5E54 +:1081C000BD7B553FF696AF5EBD7B52CFF58CAF5E63 +:1081D0003D7B508FF5868F1E3D7B4D3FF5808F1E7A +:1081E0003D7B4C0FF57C8F1E3D7B4CFFF478AF5EE2 +:1081F0003D7B4ACFF475AF5E3D7B4ACFF472AF5EF4 +:108200003D7B49AFF470AF5E3D7B49AFF46DAF5E2F +:108210003D7B49AFF46C8F1E3D7B499FF46C8F1EF4 +:10822000FD7A499FF46C8F1EFD7A499FF46A8F1E78 +:10823000FD7A499FF46A8F1EFD7A499FF4698F1E6B +:10824000BD7A499FF4698F1EBD7A499FF4698F1EDC +:10825000BD7A499FF4698F1E3D7A499FF4698F1E4C +:108260003D7A499FF4678F1E3D7A4A9FF4678F1EBF +:108270003D7A4C9FF4678F1E3D7A4C9FF4678F1EAA +:108280003D7A4DAFF4668F1E3D7A4FCFF4668F1E58 +:108290003D7A50CFF4678F1EFD7950DFF4678F1E53 +:1082A000FD7953FFF4677FFEFC79530FF5677FFE7E +:1082B000BC79550FF5697FFEBC79562FF5697FFEB5 +:1082C0003C79563FF5696FDE3C79585FF5696FDEA2 +:1082D0003C79596FF56A6FDE3C79596FF56A6FDE4C +:1082E0003C795A8F1AA7308A01000000346500B02B +:1082F000000200003BEDF646F56A4F9E3C795A9F1E +:10830000F56A4F9EFC785C9FF56C4F9EFC785C9FF5 +:10831000F56C4F9EFC785CAFF56C4F9EBC785CCFE3 +:10832000F56A4F9EBC785CCFF56A4F9EBC785DCFF6 +:10833000F56A4F9E3C785DCFF5694F9E3C785FCFE4 +:10834000F5694F9E3C785FDFF5694F9E3C7860DFB2 +:10835000F5694F9E3C7860DFF5674F9E3C7860FF83 +:10836000F5664F9E3C7860FFF5664F9E3C78620F45 +:10837000F6664F9E3C78630FF6654F9E3C78630F20 +:10838000F6654F9EFC77632FF6634F9EFC77652F53 +:10839000F6634F9EFC77663FF6634F9EFC77663F21 +:1083A000F6634F9EFC77675FF6634F9EFC77676FBF +:1083B000F6634F9EFC77696FF6624F9EBC77696FDC +:1083C000F6624F9EBC776A7FF6624F9EBC776C9FC9 +:1083D000F6624F9EBC776C9FF6634F9EBC776DAF85 +:1083E000F6634F9EBC776FAFF6634F9EBC7770CF3E +:1083F000F6634F9EBC7770CFF6634F9EBC7773DFFA +:10840000F6634F9EBC7773FFF6654F9EBC77750F82 +:10841000F7664F9EBC77762FF7664F9EBC77793F05 +:10842000F7664F9EBC77795FF7674F9EBC777C6F8E +:10843000F7694F9EBC777D8FF7694F9EFC77809FD1 +:10844000F76A4F9EFC7782CFF76C4F9EFC7783CF05 +:10845000F76D6FDEFC7786FFF76F6FDEFC77870FB7 +:10846000F8706FDEFC77893FF8726FDEFC778C5F07 +:10847000F8736FDE3C788D7FF8766FDE3C78909FE6 +:10848000F8767FFE3C7892CFF8797FFE3C7893DFD8 +:10849000F87A7FFE3C78960FF97C7FFE3C78992F26 +:1084A000F9808F1E3D789A3FF9828F1E3D789C6F30 +:1084B000F9838F1EBD78A09FF9868F1EBD78A3AF6C +:1084C000F9898F1EBD78A5DFF98C8F1EFD78A70F67 +:1084D000FA90AF5EFD78AA3FFA93AF5E3D79AD6F3B +:1084E000FA96BF7E3D79B09FFA99BF7E3D79B3CFB2 +:1084F000FA9CCF9EE27CBFEB01000000306700B029 +:1085000000020000CF0548FB3D79B7FFFAA0CF9EDF +:10851000BD79B92FFBA3CF9EBD79BD6FFBA6CF9EC2 +:10852000FD79C08FFBA9CF9E3D7AC2CFFBACEFDEB9 +:108530003D7AC5FFFBB0EFDE3D7AC81FFCB2FFFEFF +:10854000BD7ACA5FFCB60F1FBE7ACD8FFCB80F1F75 +:10855000FE7AD0AFFCBA0F1F3E7BD2EFFCBE2F5F7E +:108560003E7BD60FFDC13F7FBE7BD83FFDC64F9FF0 +:10857000FE7BDD8FFDC94F9F3E7CE0CFFDCF6FDFDF +:108580003E7CE30FFED37FFFFE7CE83FFED89F3F9B +:108590003F7DEA8FFEDFAF5FBF7DEFDFFEE3CF9F62 +:1085A0003F7EF20FFFE8DFBFFF7EF87FFFF0EFDFD7 +:1085B0007F7F6F3F0000000000000000000000000F +:1085C00000000000000000000000000000000000AB +:1085D000000000000000000000000000000000009B +:1085E000000000000000000000000000000000008B +:1085F000000000000000000000000000000000007B +:10860000000000000000000000000000000000006A +:10861000000000000000000000000000000000005A +:10862000000000000000000000000000000000004A +:10863000000000000000000000000000000000003A +:10864000000000000000000000000000000000002A +:10865000000000000000000000000000000000001A +:10866000000000000000000000000000000000000A +:1086700000000000000000000000000000000000FA +:1086800000000000000000000000000000000000EA +:1086900000000000000000000000000000000000DA +:1086A00000000000000000000000000000000000CA +:1086B00000000000000000000000000000000000BA +:1086C00000000000000000000000000000000000AA +:1086D000000000000000000000000000000000009A +:1086E000000000000000000000000000000000008A +:1086F000000000000000000000000000000000007A +:108700000000000068B44DF7010000002C6900B0C3 +:1087100000020000081C4AA6000000000000000043 +:108720000000000000000000000000000000000049 +:108730000000000000000000000000000000000039 +:108740000000000000000000000000000000000029 +:108750000000000000000000000000000000000019 +:108760000000000000000000000000000000000009 +:1087700000000000000000000000000000000000F9 +:1087800000000000000000000000000000000000E9 +:1087900000000000000000000000000000000000D9 +:1087A00000000000000000000000000000000000C9 +:1087B00000000000000000000000000000000000B9 +:1087C00000000000000000000000000000000000A9 +:1087D0000000000000000000000000000000000099 +:1087E0000000000000000000000000000000000089 +:1087F0000000000000000000000000000000000079 +:108800000000000000000000000000000000000068 +:108810000000000000000000000000000000000058 +:108820000000000000000000000000000000000048 +:108830000000000000000000000000000000000038 +:108840000000000000000000000000000000000028 +:108850000000000000000000000000000000000018 +:108860000000000000000000000000000000000008 +:1088700000000000000000000000000000000000F8 +:1088800000000000000000000000000000000000E8 +:1088900000000000000000000000000000000000D8 +:1088A00000000000000000000000000000000000C8 +:1088B00000000000000000000000000000000000B8 +:1088C00000000000000000000000000000000000A8 +:1088D0000000000000000000000000000000000098 +:1088E0000000000000000000000000000000000088 +:1088F0000000000000000000000000000000000078 +:108900000000000000000000000000000000000067 +:10891000000000000000000001000000286B00B013 +:1089200000020000FCF4F41B000000000000000046 +:108930000000000000000000000000000000000037 +:108940000000000000000000000000000000000027 +:108950000000000000000000000000000000000017 +:108960000000000000000000000000000000000007 +:1089700000000000000000000000000000000000F7 +:1089800000000000000000000000000000000000E7 +:1089900000000000000000000000000000000000D7 +:1089A00000000000000000000000000000000000C7 +:1089B00000000000000000000000000000000000B7 +:1089C00000000000000000000000000000000000A7 +:1089D0000000000000000000000000000000000097 +:1089E0000000000000000000000000000000000087 +:1089F0000000000000000000000000000000000077 +:108A00000000000000000000000000000000000066 +:108A10000000000000000000000000000000000056 +:108A20000000000000000000000000000000000046 +:108A30000000000000000000000000000000000036 +:108A40000000000000000000000000000000000026 +:108A50000000000000000000000000000000000016 +:108A60000000000000000000000000000000000006 +:108A700000000000000000000000000000000000F6 +:108A800000000000000000000000000000000000E6 +:108A900000000000000000000000000000000000D6 +:108AA00000000000000000000000000000000000C6 +:108AB00000000000000000000000000000000000B6 +:108AC00000000000000000000000000000000000A6 +:108AD0000000000000000000000000000000000096 +:108AE0000000000000000000000000000000000086 +:108AF0000000000000000000000000000000000076 +:108B00000000000000000000000000000000000065 +:108B10000000000000000000000000000000000055 +:108B2000000000000000000001000000246D00B003 +:108B300000020000E50C2A6B0000000000000000AD +:108B4000000000000000000000000000445502008A +:108B50001E0247320000000000320000000000004A +:108B600000320000000000000002472075817D12E5 +:108B7000471CE5826003020045E478FFF6D8FD75E6 +:108B80003C00C200C201C202C203C204C205C20646 +:108B900002004512004A80FEC207C208C209C20A8A +:108BA000C20BC217C20CC20DC20EC20FC210C21835 +:108BB000C219C21AC21BC211C212C21CC213C214F1 +:108BC000C215C216C21D753D00754300754400757F +:108BD0004500754600757B00756F007570007571F6 +:108BE000007572007573007547007548007549007F +:108BF000754A00754B00E4F54CF54DF55AF55B757B +:108C000064FF7565FF75660075670075681E756998 +:108C100011756A11756B9A756C11756D1F756E0003 +:108C20007815E4F608F678177628781876417819DA +:108C30007600781A7600757400781B76009055449B +:108C4000741FF090554574DFF090554674DFF09036 +:108C5000554774DFF0905548E4F0905549F0905531 +:108C60004AF090554B7488F090554CE4F090554D77 +:108C7000F090554EF090554F740CF0905550E4F034 +:108C8000905551F0905552F0905553F090555474C2 +:108C90001FF0905555741FF0905556741FF0905565 +:108CA00057741FF09055587488F090555974A8F077 +:108CB00090555A74A8F090555B74A8F090555C7468 +:108CC0003CF090555D743CF090555E743CF09055CE +:108CD0005F743CF0905560E4F0905561F0905562FF +:108CE000F0905563F09055647499F0905565E4F0F8 +:108CF000905566F0905567F09055687492F09055D5 +:108D000069743FF090556A743FF090556B743FF072 +:108D100090556C7492F090556D743FF090556E7450 +:108D20003FF090556F743FF09055707444F090553B +:108D3000717444F02C74FFBD01000000206F00B07E +:108D40000002000011E494D69055727444F09055DE +:108D5000737444F090557474D9F090557574E0F0C4 +:108D600090557674DFF09055777454F09055787480 +:108D7000E4F090557974A6F090557A7443F09055CC +:108D80007B74FAF090557C7448F090557D74DFF058 +:108D900090557E7406F090557F7407F0905580745E +:108DA00006F09055817406F09055827405F0905548 +:108DB0008374C0F09055847480F09055857438F0B9 +:108DC0009055867469F09055877405F090558874B5 +:108DD000C4F09055897409F090558A740FF090553D +:108DE0008B7414F090586574BAF0A3744EF09058D8 +:108DF00067748BF0A37455F090586974E2F0A37413 +:108E000064F0905E8074C3F0905E81E4F0905E82C6 +:108E100074C0F0905E83E4F0905E84F0905E85F024 +:108E2000905E867480F0905E877420F0905E88E497 +:108E3000F0905E89F0905E8A7480F0905E8B742072 +:108E4000F0905E8CE4F0905E8DF0905E8E7480F019 +:108E5000905E8F7420F0905E90E4F0905E91F090C0 +:108E60005E927480F0905E937420F0905E94741F14 +:108E7000F0905E95741FF0905E96741FF0905E9770 +:108E8000741FF0905E987407F0905E997404F090EF +:108E90005E9A7406F0905E9B7403F0905E9CE4F022 +:108EA000905E9DF0905FE2F0A3F0905FE4E4F0A3A9 +:108EB000F0C200758E007586007588007589009077 +:108EC0008054E0FA4401F0C2FEC2FEC2FED2FEC2ED +:108ED000FEE5C1FA24E040F9EA240983C0E0EA246F +:108EE0002383C0E022C31354C8F11068095F6A6489 +:108EF000E7EE20F532CF9CB2BE5D19658E19115098 +:108F000019C2FF70AD030411191A1C1C1D1D212F5D +:108F1000303133333435434244454746464744298C +:108F2000472A17161F75FB0075FC0075FD0075FAC2 +:108F30000075F90075A00075B00075C00075B70028 +:108F400075D2019064D0CCCF010000001C7100B03C +:108F5000000200006FFF3366FFFF12477B90804DD9 +:108F6000E4F0300A06D2FEC2FEC20AA291B3E43394 +:108F7000FAA290B3E433FF5A600675C10002036F92 +:108F800075C10175F97002036F7530009057C37495 +:108F90009FF0A3741BF074B0253040367401253067 +:108FA000FA25E0FF24C3FCE43457FDE5302530FE0C +:108FB00024C3F582E43457F583E0FEA3E0FB74326A +:108FC0002EFEE43BFB8C828D83EEF0A3EBF08A3027 +:108FD00080C475300074FA25304012E5302454F80E +:108FE0007600E530244EF8767F053080E8908002E8 +:108FF000E0FA74F05AF530B4100474018001E4FA18 +:10900000E530B4400474018001E44A6015754E0AED +:10901000754F1675502275512E75523A755346028A +:109020000596E530B4700474018001E4FAE530B4CB +:10903000B00474018001E44A6015754E03754F1049 +:1090400075501D75512A755237755344020596E5C2 +:1090500030B4900474018001E4FAE530B4D00474B3 +:10906000018001E44A601B754E11755403754F244D +:1090700075550475503875560175514B7557020278 +:109080000596E530B4200E754E12754F2675503A90 +:1090900075514E8077E530B4600B754E16754F2EC6 +:1090A0007550468067E530B4F00474018001E4FA3D +:1090B000E530B4E00474018001E44A600B754E10A1 +:1090C000754F2A7550448044E530B4C00B754E1D71 +:1090D000754F427555048034E530700E754E11752C +:1090E0005403754F387555018022E530B4800875FA +:1090F0004E26754F4E8015E530B4A008754E12759A +:109100004F3E8008E530B43003754E2A7817762834 +:10911000781876419083AF74A0F0E530B49009756B +:10912000670075680F0206CBE530B4100474018047 +:1091300001E4FAE530B4400474018001E44A6009B6 +:109140007567C07568120206CBE530B4700474010F +:109150008001E4FA8E2F8A6101000000187300B0CC +:10916000000200009B178DDBE530B4B00474018071 +:1091700001E44AF575E530B4F00474018001E4457A +:109180007560177567507568149083AF74A0F07898 +:10919000177655781876550206CBE530B4C01775AA +:1091A000673875681D9083AF74E0F07817760F7894 +:1091B0001876340206CBE530B40100E433FAE5302A +:1091C000B4D00474018001E44A60167567007568C4 +:1091D0001E9083AF74E0F07817760C7818763380A1 +:1091E00074E530B4200474018001E4FAE530B48001 +:1091F0000474018001E44A601675674075681F9029 +:1092000083AF74E0F078177628781876418046E5C9 +:1092100030B4A0087567607568228039E530B460A5 +:1092200008756780756825802CE530B430047401BA +:109230008001E4FAE530B4E00474018001E44A609E +:10924000147567A07568289083AF74E0F07817767E +:10925000157818763190805EE0FA530280BA800269 +:10926000800302115175310074FC25315003021145 +:1092700051753000908002E0FA74F05AF527E5311C +:10928000B40102800AE531B403028003020939E522 +:1092900027B4C045753A0975392075386678157652 +:1092A000AC087637C207756B12756C1275698675D6 +:1092B0006A11905E8074BEF0905E8274BBF0905E26 +:1092C000997403F0905E9874ECF0905E9B7402F0D9 +:1092D000905E9A74F1F0020A5EE527B40100E4336F +:1092E000FAE527B4900474018001E44202E527B452 +:1092F000D00474018001E44A6021753A087539E3AD +:1093000075388E781576E4087638C207756B9A75CD +:109310006C11756911756A11020A5EE527B42004A3 +:1093200074018001E4FAE527B4800474018001E44B +:109330004A6045753A0175391175381178157611FD +:10934000087611D207756BE5756C10756962756AE0 +:1093500010905E8074CBF0905E8274C8F0905E993D +:109360007404F090952C9CA001000000147500B0CE +:109370000002000082EF53AB5E987432F0905E9B67 +:109380007403F0905E9A7426F0020A5EE527B4A09A +:1093900045753A007539F875383E78157684087643 +:1093A0000FD207756B5C756C0F7569E5756A0E9069 +:1093B0005E8074DFF0905E8274DCF0905E997404DD +:1093C000F0905E98749DF0905E9B7403F0905E9AAE +:1093D0007476F0020A5EE527B4100474018001E49B +:1093E000FAE527B4400474018001E44AF575E527E5 +:1093F000B4600474018001E445756045753A0075F8 +:1094000039E375388E781576E4087638D207756BAF +:1094100014756C0E7569A7756A0D905E8074F4F012 +:10942000905E8274F0F0905E997405F0905E98748E +:1094300009F0905E9B7403F0905E9A74C7F0020A84 +:109440005EE527B4300474018001E4FAE527B470C6 +:109450000474018001E44AF575E527B4B004740191 +:109460008001E44575F575E527B4E00474018001D9 +:10947000E44575F575E527B4F00474018001E44511 +:10948000757003020A5E753A007539D275380D7829 +:109490001576D2087620D207756BFF756C0C75694E +:1094A0009A756A0C905E807408F0905E827404F085 +:1094B000905E817401F0905E837401F0905E997407 +:1094C00005F0905E987474F0905E9B7404F0905E6A +:1094D0009A7418F0020A5EE527B4C015753A06754D +:1094E00039D875384C781576C10876A9C207020AB2 +:1094F0005EE527B40100E433FAE527B49004740173 +:109500008001E44202E527B4D00474018001E44AFA +:109510006015753A067539AA7538AA781576AB08BC +:1095200076AAC207020A5EE527B42004740180010E +:10953000E4FAE527B4800474018001E44A601575FB +:109540003A007539CC7538CC781576CD0876CCD202 +:1095500007020A5EE527B4A015753A007539BA7599 +:10956000382E781576A308768BD207020A5EE52797 +:10957000B4100474FC637F2301000000107700B076 +:10958000000200007607ED16018001E4FAE527B439 +:10959000400474018001E44AF575E527B460047461 +:1095A000018001E445756014753A007539AA753873 +:1095B000AA781576AB0876AAD2078054E527B4308E +:1095C0000474018001E4FAE527B470047401800199 +:1095D000E44AF575E527B4B00474018001E44575EB +:1095E000F575E527B4E00474018001E44575F5756F +:1095F000E527B4F00474018001E445756012753A02 +:109600000075399D7538897815769E0876D8D20709 +:1096100074AF2530500302114CE531B402028005CD +:10962000E531B4031DAA307B0074602AFA74093B4B +:10963000FBCA25E0CA33FB74012AF532E43BF5335B +:109640008017AA307B0074622AFA74093BFB8A32C5 +:10965000C53225E0C53233F53378158634088635B2 +:10966000124C2F85823E85833F85F040F541AA3913 +:109670008A037A00AD387E00ED4AF534EE4BF535BD +:10968000124C2F85825C85835D85F05EF55F7A00E4 +:109690007B00AD40AE418D778E78757900757A008C +:1096A000AF5CAC5DE4FAFBEF2577F560EC3578F55F +:1096B00061EA3579F562EB357AF563853E77853F6A +:1096C00078757900757A00AE60AF617A008F038E8D +:1096D00002E4FFFE4577F53EEF4578F53FEA457930 +:1096E000F540EB457AF5417A007B00AC62AD638CC6 +:1096F000778D78757900757A007E007F00AA5EAB61 +:109700005F8A068B07E4FAFBEE2577F560EF357884 +:10971000F561EA3579F562EB357AF563853A3475AA +:109720003500124C2F85825C85835D85F05EF55F88 +:10973000E55C2560F55CE55D3561F55DE55E35620E +:10974000F55EE55F3563F55F30075A74E0555CFA06 +:10975000AB5D741F555EFC7D00EBC403CAC40354AB +:10976000076ACA5407CA6ACAFBECC40354F84BFB25 +:10977000EDC403CCC40354076CCC5407CC6CCCFDB3 +:109780008A5A8B5B58BE1B31010000000C7900B077 +:1097900000020000B11EEF4B7410555CFA7B007C98 +:1097A000007D00BA103EBB003BBC0038BD00350553 +:1097B0005AE4B55A2F055B802B7A00AB5DAC5E7D19 +:1097C000008B5A8C5B7480555CFA7B007C007D00BA +:1097D000BA8011BB000EBC000BBD0008055AE4B5F1 +:1097E0005A02055B855A32855B339080C6E0FA5396 +:1097F000020FBA0602800ABA0702800DBA08198061 +:10980000107534AB7535AA801475342575354980CB +:109810000CE4F534F5358005E4F534F535124C2FBC +:1098200085826085836185F062F563AD5AAC5B7AB1 +:10983000007B008D02ECCA25E0CA33FBE4FCFD2569 +:1098400060F560EC3561F561EA3562F562EB356330 +:10985000F563E4FAFB74F05562FC74015563FD8C0A +:1098600002C4CAC4540F6ACA540FCA6ACAFB7C0035 +:109870007D008A428542327533009080C6E0FB53FA +:10988000030F8B34753500124C2F85826085836100 +:1098900085F062F563AB60AC61E4FDFEE55AC39B05 +:1098A000F532E55B9CF533200703020DF4AB5AE576 +:1098B0005BC42354E0CBC423CB6BCB54E0CB6BFC19 +:1098C000E4FDFEE55CC39BF560E55D9CF561E55E4E +:1098D0009DF562E55F9EF563856179E562C454F0AC +:1098E000C579C4C5796579C57954F0C5796579F5C7 +:1098F0007AE560C454F0F578E560C4540F4579F515 +:1099000079E4F577FAFF74F05540FBAC418B02EC3B +:10991000C4CAC4540F6ACA540FCA6ACAFFE4FBFC23 +:10992000EA4577F55CEF4578F55DEB4579F55EEC5A +:10993000457AF55FE4FAFB74085540FCE4FDBA0093 +:109940000ABB0007BC0804BD00010424FF9206E521 +:1099500031B4010474018001E4700AE531B40302FA +:109960008003020EC753400F754100E53E253EFAC5 +:10997000E53F33FBE54033FCE54133FDEA253EF5A9 +:109980003EEB353FF53FEC3540F540ED3541F541D7 +:10999000E4FAFB74983348F401000000087B00B03F +:1099A0000002000045F651F6F05540FCAD418C3EFA +:1099B000EDC4C53EC4540F653EC53E540FC53E655B +:1099C0003EC53EF53F754000754100020EC7AB5ADB +:1099D000E4FAFCFDE55CC39AF560E55D9BF561E5A5 +:1099E0005E9CF562E55F9DF563E56025E0F578E551 +:1099F0006133F579E56233F57AE4F577FEFF74803B +:109A00005540FAAB418A06EBA2E7CE33CE33CE54B3 +:109A100001FFE4FAFBEE4577F55CEF4578F55DEA8A +:109A20004579F55EEB457AF55FE4FAFB7440554005 +:109A3000FCE4FDBA000ABB0007BC4004BD00010401 +:109A400024FF9206E531B4010474018001E470053D +:109A5000E531B4034C53407F754100E53E253EFAA5 +:109A6000E53F33FBE54033FCE54133FDEA253EF5B8 +:109A70003EEB353FF53FEC3540F540ED3541F541E6 +:109A8000E4FAFB74805540FCAD418C3EEDA2E7C585 +:109A90003E33C53E33C53E5401F53F754000754128 +:109AA000003006177401255CF560E4355DF561E46E +:109AB000355EF562E4355FF563800C855C60855D3D +:109AC00061855E62855F63E560700FE561700BE53F +:109AD000627007E5637003020FBE7401255CF560D8 +:109AE000E4355DF561E4355EF562E4355FF563E527 +:109AF00031B40102800AE531B403028003020FA9E8 +:109B0000E56025E0FAE56133FBE56233FCE56333AC +:109B1000FDEA2560F560EB3561F561EC3562F562D3 +:109B2000ED3563F563E53E2560F560E53F3561F5AC +:109B300061E5403562F562E5413563F563740255D0 +:109B400060FA7B007C00E4FDBA020ABB0007BC009F +:109B500004BD00010424FF9206E563C313F563E529 +:109B60006213F562E56113F561E56013F560E56385 +:109B7000C313F563E56213F562E56113F561E56012 +:109B800013F5603006120560E4B5600C0561B5613F +:109B9000070562B562020563AA607B007C007D0058 +:109BA000905E7AEA262CBBDA01000000047D00B04A +:109BB000000200005C0E8F86F07A00AB617C007DB5 +:109BC000008B02905E79EAF0E4FBFC74075562FDBD +:109BD0007E008D03740F5532FC7D00C454F0FC42AE +:109BE00003905E78EBF0908380E542F0905E78E041 +:109BF000FB908381F0908382EAF0905E7AE0FA90A5 +:109C00008383F0E531704AE5302424F582E4345D45 +:109C1000F583E542F0E5302475FAE4345DFB905EAF +:109C200078E0FC8A828B83F0E53024C6FAE4345D68 +:109C3000FB905E79E0FC8A828B83F0E5302417FA92 +:109C4000E4345EFB905E7AE0FC8A828B83F0021142 +:109C500047E531B4014AE530249CF582E4345AF5F5 +:109C600083E542F0E53024EDFAE4345AFB905E7867 +:109C7000E0FC8A828B83F0E530243EFAE4345BFB1F +:109C8000905E79E0FC8A828B83F0E530248FFAE4E1 +:109C9000345BFB905E7AE0FC8A828B83F002114792 +:109CA000E531B40249E53024E0F582E4345BF58324 +:109CB000E542F0E5302431FAE4345CFB905E78E074 +:109CC000FC8A828B83F0E5302482FAE4345CFB90DA +:109CD0005E79E0FC8A828B83F0E53024D3FAE434A9 +:109CE0005CFB905E7AE0FC8A828B83F08047E530F3 +:109CF000249EF582E4345EF583E542F0E53024EFFE +:109D0000FAE4345EFB905E78E0FC8A828B83F0E5B7 +:109D1000302440FAE4345FFB905E79E0FC8A828B69 +:109D200083F0E5302491FAE4345FFB905E7AE0FC46 +:109D30008A828B83F00530020A5E05310206DE75E9 +:109D4000C10275370075D300758000D2AFD2A875F7 +:109D5000FB0075FC0075FD0075FA0075F970C2F91D +:109D600075A00075B00075C00075B70075F800905B +:109D7000805AE4F090805BF0D2C6D2FDC2FD9080A4 +:109D800065743FF075C27F908079E4F090807C74B8 +:109D900010F090807E7410F075D40075D5209080FE +:109DA000877420F090808E741FF090808F741FF065 +:109DB00090809274DB4D686601000000007F00B067 +:109DC00000020000A8E6313B27F0908095741FF058 +:109DD0009080977407F090809A741FF09083977426 +:109DE0000FF0908398740FF0908399740FF0908324 +:109DF0009A740FF090839B740FF09083A77484F093 +:109E00009083A87470F07A00AB689083ABEBF0AAF3 +:109E1000677B009083AAEAF0905565E0FA9083880A +:109E2000F0905569E0FA908389F090556DE0FA90D2 +:109E3000838AF0905571E0FA90838BF09083AC7434 +:109E400030F090806E7496F075E5D0905E81E0FA07 +:109E500090839E74204AF0905E80E0FA90839DF09B +:109E60009083A0E4F090839FF075FF2075FE80C280 +:109E700001C20075D100C207C206C208C209C213DE +:109E8000754400752900752A00C2027536007530C8 +:109E900000753100754301C210C205754C00756430 +:109EA000FF7565FF908013E054F0FAC4540FFA90E8 +:109EB0005FE6F0C216908098E0FA530201E4BA011E +:109EC000010424FF9217908098E0FA530202E4BA4A +:109ED00002010424FF921A908098E0FA530204E4ED +:109EE000BA04010424FF9219908098E0FA53020802 +:109EF000E4BA08010424FF9218908098E0FA530213 +:109F000010E4BA10010424FF921B9083B0E4F09097 +:109F100083B1F09083B2F09083B3F0908090E0FA38 +:109F2000530280E4BA80010424FF920B90805CE02D +:109F3000FA530201E4BA01010424FF920D90805DFE +:109F4000E0FA530280E4BA80010424FF920E90806C +:109F500073E0FA530280E4BA80010424FF920F9068 +:109F6000805EE0FA530210E4BA10010424FF920C60 +:109F700090805CE0FA530202E4BA02010424FF92EA +:109F80000390805EE0FA530240E4BA40010424FFEB +:109F90009204908063E0FA530280E4BA80010424C2 +:109FA000FF9211908063E0FA530240E4BA4001044A +:109FB00024FF921C908077E0FA530210E4BA10015B +:109FC0000424FF92A325D42B01000000FC8000B0E4 +:109FD000000200002F36EA48149080D0E0FA5302C5 +:109FE00010E4BA10010424FF921D908067E0543FF2 +:109FF000FA25E025E0FA905E77F0908067E0FA536A +:10A0000002C0BA0002800FBA40028017BA800280F4 +:10A010001FBAC0348027905E77E00404FA905E6F28 +:10A02000F08025905E77E02404FA905E6FF080184F +:10A03000905E77E02406FA905E6FF0800B905E777A +:10A04000E02408FA905E6FF0905E77E0FA90806806 +:10A05000E054F0FB0303543FFBEAC39BFB905E76A6 +:10A06000F0905E6FE0FB908068E054F0FC030354D6 +:10A070003FFCEBC39CFC905E6EF0908068E0540F58 +:10A08000FC25E025E0FCEAC39CFC905E75F0908026 +:10A0900068E0540FFC25E025E0FCEBC39CFC905EDF +:10A0A0006DF0908069E054F0FC0303543FFCEAC378 +:10A0B0009CFC905E74F0908069E054F0FC030354C3 +:10A0C0003FFCEBC39CFC905E6CF0908069E0540F09 +:10A0D000FC25E025E0FCEAC39CFC905E73F09080D8 +:10A0E00069E0540FFC25E025E0FCEBC39CFC905E8E +:10A0F0006BF09080B5E054F0FC0303543FFCEAC3DE +:10A100009CFC905E72F09080B5E054F0FC03035428 +:10A110003FFCEBC39CFC905E6AF09080B5E0540F6E +:10A12000FC25E025E0FCEAC39CFC905E71F0908089 +:10A13000B5E0540FFC25E025E0FCEBC39CFC905EF1 +:10A1400069F09080B6E054F0FC0303543FFCEAC38E +:10A150009CFA905E70F09080B6E054F0FA030354DD +:10A160003FFAEBC39AFB905E68F09080D0E0540C0D +:10A17000FA0303543FFA905E9CF09080D0E0FA908E +:10A180005E9D74035AF09081BF781AE0F69080C407 +:10A19000E054F0FAC4540FFA781A7919EA26F790C5 +:10A1A00081C0781BE0F69080C4E0FA740F5A781BE7 +:10A1B00026F574908073E0FA530270BA0002800FA3 +:10A1C000BA10028016BA2002801DBA30328024787C +:10A1D00015761A08A345F8E101000000F88200B0E6 +:10A1E00000020000DBDE54F5763C756600802E78B8 +:10A1F00015765808763B756606802278157696089F +:10A20000763A75660C8016781576D40876397566B8 +:10A2100012800A781576D4087639756612908077A0 +:10A22000E0FA530230BA0002800FBA1002800FBA6F +:10A230002002800FBA3014800F753BA1800D753B52 +:10A24000AA8008753BB28003753BBB908077E054D1 +:10A2500003FA24FC4025EA2A2A9016337302163F9B +:10A2600002164402164902164E753A6E800D753A72 +:10A27000668008753A5D8003753A5590805CE0FA17 +:10A28000530204BA0405E5F730E7FB75F9F090FED8 +:10A29000D412477B53F7CF75C11E90805EE0FA530E +:10A2A0000201BA0102800302170A90801CE4F075D3 +:10A2B000F9F075E60075E5D1D2C590FC181247900B +:10A2C000C2C5A2CE720050FAAAF27B00743055F6D5 +:10A2D000FCE4FDC454F0CCC4CC6CCC54F0CC6CFD8C +:10A2E000EC4AF532ED4BF533C3743E95327402956A +:10A2F00033500D90801C74C0F0753CC0D2B78025DF +:10A30000C3E53294C0E5339401500D90801C743F36 +:10A31000F0753C3FD2B7800DAA3274FFC39AFA9011 +:10A32000801CF08A3CC28EC28F20000890805BE0C7 +:10A33000FA4401F020110302179475E5D875E60080 +:10A3400090FFFF12477BD2C590FFFF12477BC2C52B +:10A350001252DEE533C313C53213C532C313C532FF +:10A3600013C532F53390806FE0FA7B00C3E5329A73 +:10A37000E5339BE433F56E9081AEE532F0E56E2473 +:10A38000FF92159080CD7408F0E56E60069080CD48 +:10A39000742AF0781986027B00C3EA9532EB953374 +:10A3A0005005754C018017781B86027B00C3EA9527 +:10A3B00032EB95335005754C008003754CFE75F9F2 +:10A3C0007030000675C10E02036F90805CE0FA5396 +:10A3D0000280BA801DD2F89083AC7436F0908079F8 +:10A3E000E4F075C2C960ACE301000000F48400B081 +:10A3F00000020000C2268A857F75C103781790830A +:10A40000AEE6F002036FC2F87815E624E1FA08E63A +:10A4100034F1FBAC667D007815EAC39CF6EB9D0831 +:10A42000F69083AC7430F09080797402F075C200BD +:10A4300075C10378189083AEE6F002036F90805EDA +:10A44000E0FA530202BA020280030219BFAA67E5CA +:10A4500068C313CA13CAFB7C008B059083ABEDF075 +:10A460007B009083AAEAF09083AC7416F020072654 +:10A47000D2F975F97E75FAF275FB8075FC0075FDF1 +:10A48000009080797402F075C2007564FF7565FFF5 +:10A49000D207C208D21390FFFF12477BD2A290F0DE +:10A4A00060124790124A11C28EC28F20082B90581A +:10A4B00065E0FAA3E0FBC3E52E9AE52F9B50799067 +:10A4C0005865E0FAA3E0FBEAC3952EF532EB952F31 +:10A4D000F533D20875C2FF805F905867E0FAA3E0B9 +:10A4E000FBC3EA952EEB952F5049905867E0FAA3ED +:10A4F000E0FBE52EC39AF534E52F9BF535C3E53433 +:10A500009532E5359533500DE532C39534FAE53390 +:10A510009535FB800BE534C39532FAE5359533FB71 +:10A52000C3EA9564EB9565500A8A648B65908079DF +:10A53000E0F54DC20875C200C2A2908079E0FCE44B +:10A54000BC080104FCA208B3E433FD52049058692E +:10A55000E0FDA3E0FEC3ED952EEE952FE433FD4C18 +:10A560006002D20630000675C10E02036F30067815 +:10A570007C00AD689083ABEDF0AC677D009083AA62 +:10A58000ECF09083AC7430F0E564B4FF07E565B49B +:10A59000FF02804C90805BE0FC4402F0C207C206E0 +:10A5A000C208908079E54DF075C27F75C105E56EF2 +:10A5B0002468F582E4345EF583E0F539E56E2470B5 +:10A5C000F582E4345EF583E0F538E56E2478F582B3 +:10A5D000E4345EF583E4F078189083AEE6F080030F +:10A5E00075C10EC21302036F20080C908079E0FC45 +:10A5F0009080797459C12EA801000000F08600B047 +:10A600000002000036CE3438012CF075C10502037B +:10A610006F75C27F75C10402036F90805DE0FC53CB +:10A620000440BC40028003021AE2908065743FF04F +:10A630009080877420F0752D0675272020F8033050 +:10A64000132C7406256EFC2468F582E4345EF583D1 +:10A65000E0F539EC2470F582E4345EF583E0F538FA +:10A66000EC2478F582E4345EF583E4F08029E56E2D +:10A670002468F582E4345EF583E0F539E56E2470F4 +:10A68000F582E4345EF583E0F538E56E2478F582F2 +:10A69000E4345EF583E4F0300305752850800375DB +:10A6A0002870D2F943F90890FFFD12477B43F90463 +:10A6B00090FFEC12477B43F90290FFEC12477B308E +:10A6C000F80575FAF5800375FAF275FB8075FC00E4 +:10A6D00075FD0075E5D075E60190FFFF12477BD24E +:10A6E000FCC2FC90FF0612477B90F448124790D2C0 +:10A6F000A490FFFE12477B9080651247A290FFFF57 +:10A7000012477BC2A4C28EC28F30000675C10E02F2 +:10A71000036F30F80D90805BE0FC4440F075C1049D +:10A72000800B90805AE0FC4440F075C11DC207C206 +:10A730000602036F30F80675C10402036F75C11D70 +:10A7400002036F90805DE0FC530420BC2002800374 +:10A75000021C0A30140302036F200755D2F975F961 +:10A760007E30F80575FAF5800375FAF275FB807591 +:10A77000FC0075FD00754607754540D20730F808A6 +:10A78000755A44755B278017908070E0FC8C057CBF +:10A7900000908071E0FE7F004CF55AEF4DF55B9024 +:10A7A000FFFF12477BD2FCC2FC90FFFF12477B8069 +:10A7B0001830060D75C23F754606754520C20680E5 +:10A7C000081546E545C313F545D2A290F06012473F +:10A7D00090124A11E546701B90558CE52EF0A3E5CA +:10A7E0002FF085C23D85C2D1908065E0FC90572155 +:10A7F000F08034E55A2438FCE55B34FFFDC3EC956A +:10A800002EED952F1509B1E801000000EC8800B08D +:10A8100000020000F1D736654008E54525C2F5C2C3 +:10A82000801974C8255AFCE4355BFDC3EC952EED08 +:10A83000952F5007E5C2C39545F5C2C2A2C28EC28C +:10A840008F30000675C10E02036FE546701CE5C22D +:10A85000B4FE08D20675C10402036F75C107740106 +:10A86000253DF5C275440102036F75C10502036FF2 +:10A8700075C10902036F90805DE0FC530440BC4049 +:10A880003E90F060124790908065743FF0752D0601 +:10A89000752720D2A490FFFE12477B908065124757 +:10A8A000A2C2A4C28EC28F30000675C10E02036F11 +:10A8B00030130675C11D02036F75C10402036F30AA +:10A8C000130675C11D02036F75C10402036F9080EA +:10A8D0005DE0FC530420BC2002800302036F3014AF +:10A8E0000302036FD2A290FFFF12477B90F0601229 +:10A8F0004790124A11E5442544248CFCE43455FD6C +:10A900008C828D83E52EF0A3E52FF0C2A2C28EC209 +:10A910008F30000675C10E02036F8C828D83E0FCC0 +:10A92000A3E0FD7815C3E69C08E69D502230F80DA3 +:10A9300090805BE0FC4420F075C11F800B90805A32 +:10A94000E0FC4420F075C108C207C20602036FE5AF +:10A95000C2B4FF0675C10E02036FE544B45006751C +:10A96000C10E02036F05C2054475C10702036F9053 +:10A97000805DE0FC530440BC403CD2A490FFFE123A +:10A98000477B90D8F0124790908065124A71E4336B +:10A99000F577D320B705E5777001C392B7E5442476 +:10A9A00021FCE43457FD908065E0FE8C828D83F0BD +:10A9B000C2A4C28EC28F30000675C10E02036F752D +:10A9C000C10602036F90805DE0FC530420BC2002AE +:10A9D0008003021F9B75300075310074AE25314035 +:10A9E0007390558CE0FCA3E0FDE5312531FE24C3D6 +:10A9F000F582E43457F583E0FEA3E0FFC3EC9EED5F +:10AA00009F405130F8267450C39531FC24BCF58228 +:10AA1000E43458F5029FE67901000000E88A00B0AE +:10AA200000020000053F88D883E53DF0EC246BFC74 +:10AA3000E43458FD905721E0FE8C828D83F0802411 +:10AA40007450C39531FC24D0F582E43456F583E587 +:10AA50003DF0EC2472FCE43457FD905721E0FE8C6D +:10AA6000828D83F00531808775300174AF253150B8 +:10AA700003021F80E5302530FC248CF582E4345538 +:10AA8000F583E0FAA3E0FBE5312531FE24C3F5822E +:10AA9000E43457F583E0FEA3E0FFC3EE9AEF9B405A +:10AAA00003021F7BE5301425E0FC248CF582E4349E +:10AAB00055F583E0FCA3E0FDEEC39CFCEF9DFDEAB1 +:10AAC000C39EFEEB9FFFC3EC9EED9F4003021EE979 +:10AAD00030F8327450C39531FC24BCF582E434580C +:10AAE000F583E53014FD253DFEF0EC246BFCE434E9 +:10AAF00058FEED2421F582E43457F583E0FD8C8285 +:10AB00008E83F080307450C39531FC24D0F582E4FC +:10AB10003456F583E53014FD253DFEF0EC2472FC3F +:10AB2000E43457FEED2421F582E43457F583E0FD4B +:10AB30008C828E83F07450C3953125E0242EFCE482 +:10AB40003456FDE5301425E0FE248CF582E43455BE +:10AB5000F583E0FEA3E0FF8C828D83EEF0A3EFF09F +:10AB6000021F7630F8317450C39531FC24BCF58255 +:10AB7000E43458F583E530253DFDF0EC246BFCE42E +:10AB80003458FDE5302421F582E43457F583E0FEA6 +:10AB90008C828D83F0802F7450C39531FC24D0F5C6 +:10ABA00082E43456F583E530253DFDF0EC2472FC5B +:10ABB000E43457FDE5302421F582E43457F583E091 +:10ABC000FE8C828D83F07450C3953125E0242EFCD9 +:10ABD000E43456FDE5302530FE248CF582E434550E +:10ABE000F583E0FEA3E0FF8C828D83EEF0A3EFF00F +:10ABF0000531021DF10530021DF174AE25314015FD +:10AC000030F80A90805BE0FC4480F0800890805A25 +:10AC1000E0FC4480F074AE2531400675C1090203A2 +:10AC20006F75C10EEB2BC43201000000E48C00B044 +:10AC3000000200001CC756A802036F90805DE0FC74 +:10AC4000530420BC20028003022158753000753166 +:10AC50000074AE2531406190558CE0FCA3E0FDE529 +:10AC6000312531FE24C3F582E43457F583E0FEA399 +:10AC7000E0FF74AE2EFE740E3FFFE53175F002A4C6 +:10AC8000D39EF4B3FEEF95F0FFC3EC9EED9F4028FA +:10AC90007450C39531FC24BCF582E43458F583E547 +:10ACA0003DF0EC246BFCE43458FD905721E0FE8C21 +:10ACB000828D83F00531809975300174AF25315054 +:10ACC0000302214AE5312531FC24C3F582E43457DF +:10ACD000F583E0FCA3E0FD74AE2CFC740E3DFDE5B5 +:10ACE0003175F002A4D39CF4B3FAED95F0FBE53096 +:10ACF0002530FE248CF582E43455F583E0FEA3E094 +:10AD0000FFC3EA9EEB9F4003022145E5301425E096 +:10AD1000FC248CF582E43455F583E0FCA3E0FDEAE5 +:10AD2000C39CF577EB9DF578EEC39AFCEF9BFDC3D2 +:10AD3000E5779CE5789D50567450C39531FA24BC54 +:10AD4000F582E43458F583E53014FB253DFDF0EA47 +:10AD5000246BFDE43458FEEB2421F582E43457F5EE +:10AD600083E0FC8D828E83F0EA2AFC242EFAE43400 +:10AD700056FEEB2BFC248CF582E43455F583E0FC85 +:10AD8000A3E0FD8A828E83ECF0A3EDF08040745046 +:10AD9000C39531FA24BCF582E43458F583E53025B7 +:10ADA0003DFDF0EA246BFBE43458FDE5302421F549 +:10ADB00082E43457F583E0FC8B828D83F0EA2AFC31 +:10ADC000242EF582E43456F583EEF0A3EFF005313E +:10ADD00002202D053002202D74AE253140089080D0 +:10ADE0005BE0FC4480F074AE2531400675C1090279 +:10ADF000036F75C10E02036F90805DE0FC53041079 +:10AE0000BC1002800302293830F81190586BE0FC26 +:10AE1000908065F09058D0E0F5C2800F905772E0B6 +:10AE2000FC908065F09056E4E0F5C2D2A090808757 +:10AE3000743FF090E466093D01000000E08E00B030 +:10AE400000020000E82FE8155E81E0FC90839E740C +:10AE5000284CF090F06012479090FFFF12477B1251 +:10AE60004A11852E34852F35C28EC28F908087740B +:10AE700020F0905E81E0FC90839E74204CF090F076 +:10AE80006012479090FFFF12477B124A11AA2EAB27 +:10AE90002FC28EC28F908087E4F0905E81E0FC909C +:10AEA000839E74204CF090F060C002C00312479063 +:10AEB000D003D00290FFFFC002C00312477BD00333 +:10AEC000D002C002C003124A11D003D002C28EC207 +:10AED0008FC2A030000302254B30F808856B328505 +:10AEE0006C338006856932856A33E534252EF56436 +:10AEF000E535352FF565E52EC39534F534E52F9509 +:10AF000035F5358A04EBCC25E0CC33FDECC39564F4 +:10AF1000F564ED9565F565AA34AB35C002C0031242 +:10AF20004C2F85823E85833F85F040F541D003D08C +:10AF300002C374FF953E74FF953F74FF9540E495FE +:10AF40004192B77C00AD3FAE407F008D2E8E2F7CAE +:10AF5000007480552FFDBC0008BD8005756D1F80F5 +:10AF6000107C00747C552FFD0303543FFC7D008C46 +:10AF70006DAE64AC657D007F008C418E40753F00F6 +:10AF8000753E008A138B14853E82853F838540F091 +:10AF9000E541124C8F858264858365852E32852F2D +:10AFA00033905E81E0FC8C057C00905E80E0FE7F4B +:10AFB000004CF534EF4DF535124C2F85823E8583DC +:10AFC0003F85F040F5417C0074F0553FFDAE407484 +:10AFD000075541FF8D04EEC4CCC4540F6CCC540F04 +:10AFE000CC6CCCFDEFC454F04DFDEFC4540FFE7F8C +:10AFF000008C028D03E564C39AFAE5659BFBC423CC +:10B00000CAC423541F6ACA541FCA6ACAFB74802A5E +:10B01000F56474203BF56530F81C7C00AD658D044B +:10B02000905E8FECF0AC647D00905E8EECF0905EF4 +:10B0300095E56DF0801A7C00AD658D04905E87EC1F +:10B04000F0AC647D225A7AEA01000000DC9000B086 +:10B050000002000096344FA500905E86ECF0905EF2 +:10B0600094E56DF0C3E49AFAE49BFB30F8167C009B +:10B070008B058D04905E8DECF08A047D00905E8CD3 +:10B08000ECF080147C008B058D04905E85ECF08ADA +:10B09000047D00905E84ECF075300074D82530504B +:10B0A0000302254B75347C7535A274EC253040596C +:10B0B000AC307D007414C39CF532E49DF533124C22 +:10B0C0002F85823E85833F85F040F5417C0074FCEE +:10B0D000553FFDAE40AF418D04EEC313CC13CCC33E +:10B0E00013CC13CCFDEF030354C04DFDEF03035409 +:10B0F0003FFEE4FFFEFFC39CFCE49DFD74019EFE49 +:10B10000E49FFF8C328D338048AC307D00EC24EC22 +:10B11000F532ED34FFF533124C2F85823E85833FA7 +:10B1200085F040F5417C0074FC553FFDAE40AF41D9 +:10B130008D04EEC313CC13CCC313CC13CCFDEF039F +:10B140000354C04DFDEF0303543FFE7F008C328D4E +:10B150003374802533F533852E34852F35124C2FEB +:10B1600085823E85833F85F040F541E4FCFDFE7419 +:10B17000805541FFE4BC000ABD0007BE0004BF804B +:10B18000010424FF92B77C007480553FFDAE4074EB +:10B190007F5541FF8D04EEA2E7CC33CC33CC540174 +:10B1A000FDEF2F4DFDEF235401FE7F008C348D35D4 +:10B1B000853413853514900000E4F5F07410124CBA +:10B1C0008F85823285833330F817E5302530FC24B3 +:10B1D0000DF582E43459F583E532F0A3E533F080D0 +:10B1E00015E5302530FC248CF582E43455F583E5F3 +:10B1F00032F0A3E533F08532D48533D50530022310 +:10B20000E530F8089058F8E0F5C2800690570CE059 +:10B21000F5C2D2A0908087743FF0905E83E0FC90EE +:10B22000839E74284CF090F06012479090FFFF12BC +:10B23000477B124A11852E34852F35C28EC28F90DE +:10B2400080877420F0905E83E0FC90839E74204C95 +:10B25000F090F0600D23AF9401000000D89200B090 +:10B260000002000062DCF11812479090FFFF1247C5 +:10B270007B124A11AA2EAB2FC28EC28F908087E418 +:10B28000F0905E83E0FC90839E74204CF090F06020 +:10B29000C002C003124790D003D00290FFFFC0024B +:10B2A000C00312477BD003D002C002C003124A1170 +:10B2B000D003D002C28EC28FC2A030000302290880 +:10B2C00030F808856B32856C338006856932856A73 +:10B2D00033E534252EF564E535352FF565E52EC3C8 +:10B2E0009534F534E52F9535F5358A04EBCC25E01A +:10B2F000CC33FDECC39564F564ED9565F565AA3432 +:10B30000AB35C002C003124C2F85823E85833F853A +:10B31000F040F541D003D002C374FF953E74FF9511 +:10B320003F74FF9540E4954192B77C00AD3FAE403D +:10B330007F008D2E8E2F7C007480552FFDBC000861 +:10B34000BD8005756D1F80107C00747C552FFD033A +:10B3500003543FFC7D008C6DAE64AC657D007F00C6 +:10B360008C418E40753F00753E008A138B14853EDC +:10B3700082853F838540F0E541124C8F858264854C +:10B380008365852E32852F33905E83E0FC8C057CAF +:10B3900000905E82E0FE7F004CF534EF4DF53512F3 +:10B3A0004C2F85823E85833F85F040F5417C0074BB +:10B3B000F0553FFDAE4074075541FF8D04EEC4CCFF +:10B3C000C4540F6CCC540FCC6CCCFDEFC454F04D76 +:10B3D000FDEFC4540FFE7F008C028D03E564C39A19 +:10B3E000FAE5659BFBC423CAC423541F6ACA541FD1 +:10B3F000CA6ACAFB74802AF56474203BF56530F88C +:10B400001C7C00AD658D04905E93ECF0AC647D0017 +:10B41000905E92ECF0905E97E56DF0801A7C00AD46 +:10B42000658D04905E8BECF0AC647D00905E8AECE0 +:10B43000F0905E96E56DF0C3E49AFAE49BFB30F879 +:10B44000167C008B058D04905E91ECF08A047D00E3 +:10B45000905E90ECF080127C008B058D04905E89EC +:10B46000ECF07B009DAB78B801000000D49400B0F4 +:10B47000000200007B242F68905E88EAF075302877 +:10B4800074AF253050030229087534D875359F7480 +:10B49000C425304059AA307B00743CC39AF532E48D +:10B4A0009BF533124C2F85823E85833F85F040F516 +:10B4B000417A0074FC553FFBAC40AD418B02ECC3BC +:10B4C00013CA13CAC313CA13CAFBED030354C04BF8 +:10B4D000FBED0303543FFCE4FDFCFDC39AFAE49B3F +:10B4E000FB74019CFCE49DFD8A328B338048AA30BA +:10B4F0007B00EA24C4F532EB34FFF533124C2F8580 +:10B50000823E85833F85F040F5417A0074FC553FCB +:10B51000FBAC40AD418B02ECC313CA13CAC313CAC0 +:10B5200013CAFBED030354C04BFBED0303543FFC74 +:10B530007D008A328B3374802533F533852E348534 +:10B540002F35124C2F85823E85833F85F040F54193 +:10B55000E4FAFBFC74805541FDE4BA000ABB000725 +:10B56000BC0004BD80010424FF92B77A00748055AA +:10B570003FFBAC40747F5541FD8B02ECA2E7CA3320 +:10B58000CA33CA5401FBED2D4BFBED235401FC7D66 +:10B59000008A348B35853413853514900000E4F52A +:10B5A000F07410124C8F85823285833330F817E5A2 +:10B5B000302530FA240DF582E43459F583E532F074 +:10B5C000A3E533F08015E5302530FA248CF582E4CC +:10B5D0003455F583E532F0A3E533F08532D4853375 +:10B5E000D505300227A230000675C10E02036F3068 +:10B5F000F80D90805BE0FA4410F0753000800B90FD +:10B60000805AE0FA4410F07530019080877420F081 +:10B6100075C11A02036F9080877420F075C11A30CB +:10B62000F80675300002036F75300102036F200CBD +:10B6300003022AAF30F8159058D0E0F5C290587F39 +:10B64000E0F5317407C3956EF54B80189056E4E031 +:10B65000F5C2905786E0F531E530B401077401C3B7 +:10B66000956EF54B908065743FF09080877420F064 +:10B67000752D06751623BFC101000000D09600B0DD +:10B68000000200008FCC91D52720D2A490FFFF129A +:10B69000477B3003057528508003752870E54B24DF +:10B6A00068F582E4345EF583E0F539E54B2470F506 +:10B6B00082E4345EF583E0F53890FC1812479090F0 +:10B6C00080651247A2C28EC28F908065E0FAC39552 +:10B6D00031FA30F80E9058F8E0F5C29058A7E0F52E +:10B6E00031800C90570CE0F5C29057AEE0F53190E8 +:10B6F0008065743FF09080877420F0752D06752763 +:10B700002090FFFFC00212477BD00290FC18C002BD +:10B71000124790D002908065C0021247A2D002C2A8 +:10B720008EC28FEAFB3395E0FC908065E0FD8D02D0 +:10B730007E00AF317D00EAC39FFFEE9DFDEF2BFB46 +:10B74000ED3CFCA2E713CB13CBFC8B02C2A4300070 +:10B750000675C10E02036F30F81775C11CC206C210 +:10B7600008E54B2478F582E4345EF583EAF00203C1 +:10B770006FE530B4051375C10AE54B2478F582E412 +:10B78000345EF583EAF002036F75C11AE54B247845 +:10B79000F582E4345EF583EAF0053085304B020330 +:10B7A0006F30F80A75C11CC206C20802036F75C16A +:10B7B0000A02036F90805EE0FA530204BA0402802A +:10B7C00003022F1D300603022BE620080575310009 +:10B7D0008002053174022531FA24BCF582E4345824 +:10B7E000F583E0F5C2EA246BF582E43458F583E092 +:10B7F000FA908065F0E531249CF582E4345AF583B3 +:10B80000E0FA908380F0E53124EDF582E4345AF5D6 +:10B8100083E0FA908381F0E531243EF582E4345BE5 +:10B82000F583E0FA908382F0E531248FF582E434E9 +:10B830005BF583E0FA908383F0A208B3E433FAA2C5 +:10B8400009B3E433FB5A603990806E7496F0D2C22B +:10B85000C2F943F90890FFFD12477B43F90490FFBA +:10B86000EC12477B43F90290FFEC12477B75FAFD1F +:10B8700075FB8075FC0075FD0075E60275E5D080EE +:10B880004290805E1864DD0801000000CC9800B092 +:10B890000002000048D59388E0FA530208BA082F46 +:10B8A000200818E531244DF582E4345AF583E0FA96 +:10B8B00074F05A90806E4406F0801AE53114244DDD +:10B8C000F582E4345AF583E0FA90806EF0800690B9 +:10B8D000806E7496F0D2C290FFEC12477BD2FCC20D +:10B8E000FC90FF0612477BD2A6022C6490805EE09B +:10B8F000FA530208BA0865A208B3E433FAA209B3FE +:10B90000E433FB5A6018E531244DF582E4345AF5EE +:10B9100083E0FA74F05A90806E4406F08044200868 +:10B9200013E531244DF582E4345AF583E0FA908032 +:10B930006EF0802EE53114244DF582E4345AF583FF +:10B94000E0FA53020FE531244DF582E4345AF583D1 +:10B95000E0FB74F05B90806E4AF0800690806E741D +:10B9600096F090FFEC12477BD2A720082120060E0C +:10B9700090807CE4F090807E7410F0022D0090594D +:10B98000AFE0FA90807CF090807EE4F08078200632 +:10B9900033E5311424AFFAE43459FB8A828B83E017 +:10B9A000700A90807CE4F0753001805AE5311424EF +:10B9B000AFF582E43459F583E0FA1490807CF07599 +:10B9C00030008042E53124AFF582E43459F583E05C +:10B9D000FA90807CF0E5311424FEFAE43459FB8AB5 +:10B9E000828B83E0700A90807EE4F07530018016CF +:10B9F000E5311424FEF582E43459F583E0FA14901D +:10BA0000807EF0753000E4F55AF55BC207A207723C +:10BA1000005003022DD490FFFD12477BD2C590FC4D +:10BA200018124790C2C51252DE85322E85332FC2BE +:10BA30008EC28FC3E55A952EE55B952F5031852E2A +:10BA40005A852F5B200615E53124AFFAE43459FB03 +:10BA500090807CE0FC8A828B83F08013E53124FEA9 +:10BA6000FAE43459FB90807EE0FC8A828B83F020DC +:10BA7000083720061A90807CE0FABA1F04D20780AB +:10BA80005090807CE0FA90807C74012AF080429093 +:10BA9000807EE0FA4032844701000000C89A00B07E +:10BAA00000020000BC3D2D35BA1F04D2078036903D +:10BAB000807EE0FA90807E74012AF08028E530B420 +:10BAC0000204D207801F20060E90807CE0FA90804E +:10BAD0007C74012AF0800C90807EE0FA90807E7465 +:10BAE000012AF0053090FFFC12477B022D07908061 +:10BAF0005EE0FA530208BA08028003022E682006AC +:10BB00002AE53124AFF582E43459F583E0FA9080D8 +:10BB10007CF090806EE0FA740F5A90806E4480F052 +:10BB20007539B47538AD7528528028E53124FEF595 +:10BB300082E43459F583E0FA90807EF090806EE0E4 +:10BB4000FA74F05A90806E4408F07539BA7538B3BB +:10BB5000752851752D0375270490FFFF12477B90C0 +:10BB6000FC1812479090806E1247A2C28EC28FE5D9 +:10BB700031244DFAE4345AFB90806EE0FC8A828BCB +:10BB800083F030000675C10E02036FE531B44E0438 +:10BB900074018001E4F57CE57C1382065057C2C233 +:10BBA000C2A790805BE0FA4404F0C2F875C103902C +:10BBB00080797402F07815E624E1FA08E634F1FBA6 +:10BBC000AC667D007815EAC39CF6EB9D08F6908084 +:10BBD0005EE0FA530202BA020ED21375C2009083DD +:10BBE000AC7416F002036FC21375C27F9083AC74FD +:10BBF00030F002036F20061EA208B3E433FAA20954 +:10BC0000B3E433FB5A6004D2098026200802C2093B +:10BC1000D206C2A6801BA208B3E433FAA209B3E499 +:10BC200033FB5A6004D2098008D208C206C2A7C2F8 +:10BC3000C275C11C02036FC2F875C103908079748C +:10BC400002F07815E624E1FA08E634F1FBAC667DF3 +:10BC5000007815EAC39CF6EB9D08F690805EE0FA4A +:10BC6000530202BA020C75C2009083AC7416F00243 +:10BC7000036F75C27F9083AC7430F002036F9080C5 +:10BC80005DE0FA530208BA080280030230E1C20103 +:10BC90009056D0E0F5C2905772E0FA908065F0902F +:10BCA0005BE0E0FA1B6FCC6101000000C49C00B0B7 +:10BCB00000020000A5C5F345908380F0905C31E060 +:10BCC000FA908381F0905C82E0FA908382F0905C3D +:10BCD000D3E0FA908383F0D2C2C2F975F97E75FA87 +:10BCE000F8A293820B500575FBC8800375FBD075D5 +:10BCF000FCD39080BD744BF090FFFA12477B75FC2B +:10BD0000DF90FFFA12477B9080BD740BF075FDE069 +:10BD100090808E741FF090808F741FF0908092E05E +:10BD2000FA74F05A9080924407F090FF9C12477B7F +:10BD3000D2FCC2FC90FF0612477B75E5D075E60287 +:10BD400090805CE0FA20E50375D30290FFFF124774 +:10BD50007B90F448124790D2C1908092E0FA74CF61 +:10BD60005A9080924420F0752D0575271075397F03 +:10BD700075387F75281090808F1247A2908092E0CE +:10BD8000FA74CF5A9080924410F0752D05752710E3 +:10BD900090808E1247A2908092E0FA54CFF0752DD9 +:10BDA000037527047528019080921247A275D3006D +:10BDB000C2C1C28EC28F30010675C10202036F304C +:10BDC000000B75FA00C2C275C10E02036FA2938206 +:10BDD0000B501C90808EE0F57190808FE0F5729092 +:10BDE0008092E0F57374DF55E74420F5E7801A9000 +:10BDF000808EE0F57B90808FE0F56F908092E0F58B +:10BE00007090805AE0FA4408F075C10B02036F7518 +:10BE1000C10B02036F90805DE0FA530204BA040282 +:10BE200080030231E8C2F975F97E75FAF875FBD026 +:10BE300075FC929080BD744BF090FFFA12477B75B1 +:10BE4000FC9A90FFFA12477B9080BD740BF075FD51 +:10BE500020908092E0FA74CF5A9080924420F09023 +:10BE60008095741FF09080977407F0D2C074FB55D2 +:10BE7000B74404F5B790805CE0FA20E50375D3027F +:10BE800090F448124790752D0575271075397F7508 +:10BE9000387F7528009080951247A2752D0375276D +:10BEA000047528019080971247A275D300C2C0C2C2 +:10BEB0008EC28F300A961AFE01000000C09E00B0AC +:10BEC00000020000512D4DF8010675C10202036FFA +:10BED00030000B75FA00C2C275C10E02036FA29347 +:10BEE000820B5016908095E0F549908097E0F54AD6 +:10BEF00074BF55E74440F5E78014908095E0F5471E +:10BF0000908097E0F54890805AE0FA4404F09080E1 +:10BF10005CE0FA530210BA100B75FA00C2C275C188 +:10BF20000E02036F75C10C02036F75C10C02036F23 +:10BF300090805DE0FA530202BA0202800302331AD3 +:10BF400075FA0075F970C2C275FB0075FC0390802C +:10BF5000BD744BF090FFFA12477B75FC0F90FFFA0F +:10BF600012477B9080BD740BF075FDC190809A7470 +:10BF70000AF0D2B074F055B7440FF5B79080A3E043 +:10BF8000FA530270E4FBC454F0CAC4CA6ACA54F03B +:10BF9000CA6AFB9080A5E0FC7D004AF532ED4BF5C6 +:10BFA0003390FFC912477B90F448124790D2B1906A +:10BFB000FFFC12477BA2CD720050FA85F534740F56 +:10BFC00055F6F535C2B1124C2F85823E85833F85EB +:10BFD000F040F5417A0074F8553FFBAC40AD418B21 +:10BFE00002ECC423CAC423541F6ACA541FCA6ACAB3 +:10BFF000FBEDC42354E04BFBEDC423541FFC7D0038 +:10C000008A348B3590FFFF12477B53B7FD90809A9F +:10C01000743FF0752D0675272090809A124CF074AD +:10C02000FC55B74401F5B790809A124D74E433F58E +:10C030007CD320B705E57C7001C392B7C2B053B77B +:10C04000F2C28EC28F30000675C10E02036F90805F +:10C050005AE0FA4402F075C10D02036F75C10D027A +:10C06000036F90805DE0FA530201BA01028003027F +:10C0700033EF90F44812479075F97075FA0075FB2C +:10C080000075FC009080BD744BF090FFFA12477B66 +:10C0900075FC0C90FFFA12477B9080BD740BF07515 +:10C0A000FD1ED2B2753010908397124EBFE433F567 +:10C0B0007CD320B705E57C7001C392B77530219021 +:10C0C0008398124E329DBFA701000000BCA000B0B3 +:10C0D0000002000059F2BC25BFE433F57CD320B741 +:10C0E00005E57C7001C392B7753040908399124E7C +:10C0F000BFE433F57CD320B705E57C7001C392B76C +:10C1000075308190839A124EBFE433F57CD320B70B +:10C1100005E57C7001C392B7D2B375304090839B24 +:10C12000124EBFE433F57CD320B705E57C7001C324 +:10C1300092B7C2B3C2B2C28EC28F20000890805A9A +:10C14000E0FA4401F075C10E02036F75FB0075FC47 +:10C150000075FD0075FA0075F970C2F975B7001029 +:10C160000002800A908054E0FA4420F08008908019 +:10C1700054E0FA4408F09081447403F090813E74D6 +:10C1800004F075C10F02036F30012590805CE0FA66 +:10C19000530210BA101475800075D300D2C690FFF8 +:10C1A000F612477B75C10A02036F75C10202036F65 +:10C1B000E537700C30110975F9F075E5D875E600B2 +:10C1C00075FB0075FC0075FD0075FA0075D2015312 +:10C1D000F9F0C2F975C00075B700C2FBD2FDC2FD0F +:10C1E000C2B3E537703E30113B90FFFF12477BD260 +:10C1F000C590FFFF12477BC2C51252DEE533C31361 +:10C20000C53213C532C313C53213C532F53390801E +:10C210006FE0FA7B00C3E5329AE5339B9210908180 +:10C22000AEE532F075F900C2FF75E518201C030277 +:10C23000355AE590B404028077E5327004E5336046 +:10C240006FE54CB40114781A86027B00C3E5329A7C +:10C25000E5339B5045754C008040E54C70277819BC +:10C260008602FBC3EA9532EB95335005754C01808D +:10C2700029781B86027B00C3E5329AE5339B501A6E +:10C28000754CFE8015E54CB4FE10AA747B00C3EA21 +:10C290009532EB95335003754C0090804DE0FA5386 +:10C2A00002CF7403554CFBC454F0FB90804D4AF010 +:10C2B00075D30174075590F526E5376004D2FEC2A8 +:10C2C000FEE526B4010474018001E4FAE526B40415 +:10C2D00004740180E0428CDE01000000B8A200B0CE +:10C2E00000020000AD1A029801E44A6002D2FEC2C8 +:10C2F000FE000074075590F526700AF5D3D20A7532 +:10C30000C10002036FE526B4040474018001E4FA5D +:10C31000B40100E433FAE526B4010474018001E4B9 +:10C32000FBB40100E433FB5A600975D30075C110FA +:10C3300002036F75C10F02036F75E5D07537007882 +:10C34000189083AEE6F03010089080CD742AF0800B +:10C35000069080CD7408F0E526B40202800302370F +:10C36000F4748055F6FAE4BA80010424FF9212E5D1 +:10C370004C25C9F56D301214905FE6E0FA256DF595 +:10C380006DC37437956DE433F57C8009C3743195C2 +:10C390006DE433F57C3012069080CD742AF09083E2 +:10C3A000A67408F053F7CF740225DAF53090806D4B +:10C3B000E0FA530240BA401390806DE0FA53022035 +:10C3C000E4BA20010424FF92F88015301204E57CC1 +:10C3D0007005757C008003757C01E57C24FF92F874 +:10C3E00020F80302373978179083AEE6F09083ACDB +:10C3F0007436F0E53024BCF582E43458F583E0F57A +:10C4000027E530246BF582E43458F583E0F52DE51B +:10C41000302530FA240DF582E43459F583E0F5D463 +:10C42000A3E0F5D5908079E4F0E5DA24AFF582E475 +:10C430003459F583E0FA90807CF0E5DA24FEF58249 +:10C44000E43459F583E0FA90807EF0E5DA244DF586 +:10C4500082E4345AF583E0FA90806EF0E5DA249CA9 +:10C46000F582E4345AF583E0FA908380F0E5DA242B +:10C47000EDF582E4345AF583E0FA908381F0E5DA51 +:10C48000243EF582E4345BF583E0FA908382F0E5A4 +:10C49000DA248FF582E4345BF583E0FA908383F04D +:10C4A0000237BA9083AC7430F0E53024D0F582E4E2 +:10C4B0003456F583E0F527E5302472F582E43457ED +:10C4C000F583E0F52DE5302530FA248CF582E4344F +:10C4D00055F583E0F5D4A3E0F5D5908079E54DF0EE +:10C4E000E5DA2424D8438A6E01000000B4A400B029 +:10C4F00000020000B4E2DCE8F582E4345DF583E09C +:10C50000FA908380F0E5DA2475F582E4345DF583F2 +:10C51000E0FA908381F0E5DA24C6F582E4345DF533 +:10C5200083E0FA908382F0E5DA2417F582E4345E42 +:10C53000F583E0FA908383F0300C2530F80BE4A209 +:10C5400010332406F5420239FE30120BE4A21033F8 +:10C550002404F5420239FEE4A21033F5420239FE0A +:10C5600030F8097406256EF5420239FE856E4202E6 +:10C5700039FEE526B40302800302399B740225DAF2 +:10C58000F5309080D4E0FA530201E4BA01010424AA +:10C59000FF92F820F8030238F074CF55F74420F5E5 +:10C5A000F730100890803D741CF0800690803D7438 +:10C5B00010F078179083AEE6F09083AC7436F0E517 +:10C5C0003024BCF582E43458F583E0F527E53024C7 +:10C5D0006BF582E43458F583E0F52DE5302530FA2B +:10C5E000240DF582E43459F583E0F5D4A3E0F5D5C4 +:10C5F000908079E4F0E5DA24AFF582E43459F583EC +:10C60000E0FA90807CF0E5DA24FEF582E43459F516 +:10C6100083E0FA90807EF0E5DA244DF582E4345A26 +:10C62000F583E0FA90806EF0E5DA249EF582E4343A +:10C630005EF583E0FA908380F0E5DA24EFF582E49A +:10C64000345EF583E0FA908381F0E5DA2440F582E8 +:10C65000E4345FF583E0FA908382F0E5DA2491F523 +:10C6600082E4345FF583E0FA908383F0807BC2F844 +:10C6700074CF55F74430F5F790803DE4F09083ACEB +:10C680007430F0E53024D0F582E43456F583E0F5DB +:10C6900027E5302472F582E43457F583E0F52D90D8 +:10C6A0008079E54DF0E5DA24E0F582E4345BF5834A +:10C6B000E0FA908380F0E5DA2431F582E4345CF529 +:10C6C00083E0FA908381F0E5DA2482F582E4345C39 +:10C6D000F583E0FA908382F0E5DA24D3F582E4343E +:10C6E0005CF583E0FA908383F030F80BE4A210331A +:10C6F0002406F542C1D52D4A01000000B0A600B0C5 +:10C7000000020000400A62550239FE300C1A740320 +:10C7100055DFFABA010AE4A210332402F542807010 +:10C72000E4A21033F5428068856E428063E526B44A +:10C730000502802C740225DAF53074CF55F74430A9 +:10C74000F5F7E53024D0F582E43456F583E0F5279B +:10C75000E5302472F582E43457F583E0F52D80222C +:10C760009080B0E0FA24D0F582E43456F583E0F509 +:10C77000279080B0E0FA2472F582E43457F583E024 +:10C78000F52D300C08E4A21033F5428003856E428B +:10C79000E5422468F582E4345EF583E0F539E5424C +:10C7A0002470F582E4345EF583E0F538E5422478C0 +:10C7B000F582E4345EF583E0F54274075590FABAE9 +:10C7C000010C75D30075C10F75370102036FA216F6 +:10C7D00020F801B3B3E433FAE4A21D33FB5A601F1F +:10C7E00030F816E529C313F52974405529FABA40E3 +:10C7F0000E74802529F5298006E5292529F529A229 +:10C8000010301501B3506030102774FC5529FABA66 +:10C810008002805330F80D905E9CE0FAE529C39ABF +:10C82000F5298043905E9DE0FAE529C39AF52980B9 +:10C830003674805529FAE4BA800104FA747C5529CB +:10C84000FBE4BB7C0104FBB40100E433FB4A60174A +:10C8500030F80B905E9CE0FA2529F5298009905E5E +:10C860009DE0FA2529F529A2F89216A2109215E565 +:10C87000292527F53074805529FABA800EC3E5279B +:10C8800095305013753000D2B7800CC3E530952732 +:10C8900050057530FFD2B7E526B405028005853016 +:10C8A000C2800C9083A7E530F09083A8E530F0308B +:10C8B0000C06E542252DF52DE52A252DF531748050 +:10C8C000552AFABA800EC3E52D9531501375310003 +:10C8D000D2B7800CC3E531952D50057531FFD2B725 +:10C8E00074805531FABA8008908065747FF08013A7 +:10C8F000908065E531F0E531700474018001E42435 +:10C90000FF9205D23160E45601000000ACA800B0EF +:10C910000002000087136008C7E5DA24D6506B9048 +:10C920005E82E0FA90839DF0905E83E0FA90839EB1 +:10C9300074204AF030F82A905E97E0FA90839CF0D9 +:10C94000905E90E0FA90839FF0905E91E0FA908381 +:10C95000A0F0905E92E0F5FE905E93E0F5FF023C61 +:10C960004C905E96E0FA90839CF0905E88E0FA909E +:10C97000839FF0905E89E0FA9083A0F0905E8AE059 +:10C98000F5FE905E8BE0F5FF8068905E80E0FA90A7 +:10C99000839DF0905E81E0FA90839E74204AF0308F +:10C9A000F829905E95E0FA90839CF0905E8CE0FA16 +:10C9B00090839FF0905E8DE0FA9083A0F0905E8E61 +:10C9C000E0F5FE905E8FE0F5FF8027905E94E0FA40 +:10C9D00090839CF0905E84E0FA90839FF0905E8557 +:10C9E000E0FA9083A0F0905E86E0F5FE905E87E02E +:10C9F000F5FFD2FC74075590FABA0202801BBA0305 +:10CA000003023DFABA050302417EBA06030240CA98 +:10CA1000BA070302412402424075F97075FB0075A4 +:10CA2000F97890FFFD12477B75F97C90FFEC124777 +:10CA30007B75F97E90FFEC12477B75FAF090FFFF53 +:10CA400012477B201203023D35E56D24C850057561 +:10CA500030038019E56D24D05005753002800EE555 +:10CA60006D24EE50057530018003753000E56D25AD +:10CA70006DFA24BAF582E43454F583E0FAA3E0FBBE +:10CA80008AD68BD78A047D009081ABECF07A009037 +:10CA900081ACEBF0E5302454F582E43455F583E0C5 +:10CAA000FA908384F0E5302458F582E43455F58318 +:10CAB000E0FA908385F0E530245CF582E43455F5A6 +:10CAC00083E0FA908386F0E5302460F582E4345503 +:10CAD000F583E0FA908387F0023DC4E56D24CE50E3 +:10CAE000057530038019E56D24D650057530028038 +:10CAF0000EE56D24F450057530018003753000E5B6 +:10CB00006D256DFA2430F582E43454F583E0FAA300 +:10CB1000E0FB8AD606CF258B01000000A8AA00B052 +:10CB20000002000073FBDEB58BD78A047D00908184 +:10CB3000ABECF07A009081ACEBF0E5302444F58268 +:10CB4000E43455F583E0FA908384F0E5302448F529 +:10CB500082E43455F583E0FA908385F0E530244C87 +:10CB6000F582E43455F583E0FA908386F0E53024CD +:10CB700050F582E43455F583E0FA908387F0908194 +:10CB80004F7410F030F814905E9AE0FA9083A1F0A0 +:10CB9000905E9BE0FA9083A2F08012905E98E0FA9B +:10CBA0009083A1F0905E99E0FA9083A2F0D2FCC24B +:10CBB000FC02424275F97075FB8075F97890FFFDB3 +:10CBC00012477B75F97C90FFEC12477B75F97E90DC +:10CBD000FFEC12477B75FAF09083877404F0309372 +:10CBE000079080FFE4F080069080FF7436F07403B5 +:10CBF00055DFFABA012B9080FFE4F0905564E0FA1B +:10CC0000908388F0905568E0FA908389F090556C95 +:10CC1000E0FA90838AF0905570E0FA90838BF08070 +:10CC200052740355DFFABA0226905566E0FA9083F3 +:10CC300088F090556AE0FA908389F090556EE0FA9A +:10CC400090838AF0905572E0FA90838BF080249064 +:10CC50005565E0FA908388F0905569E0FA908389F1 +:10CC6000F090556DE0FA90838AF0905571E0FA905B +:10CC7000838BF02017030240BD905FE2E0FAA3E04F +:10CC8000FB8A047D009083B0ECF09083B1EBF090D0 +:10CC90005FE4E0FAA3E0FB8A047D009083B2ECF04D +:10CCA0009083B3EBF0741055DFFABA1002800302E0 +:10CCB00040B5E5DAB54E08855427D2FB024032E58F +:10CCC000DAB54F0280028008855527D2FB02403238 +:10CCD000E5DAB5500280028008855627D2FB024073 +:10CCE00032E5DAB5510280028008855727D2FB026F +:10CCF0004032E5DAB5520474018001E4FAE5DAB5B0 +:10CD0000530474018001E44A6008752700D2FB02D5 +:10CD10004032E5DAB44E16A2938218E433201905A6 +:10CD20007003024050A9DB7801000000A4AC00B001 +:10CD3000000200006A0300C532752700D2FB0240E2 +:10CD400032E5DAB41E0E201A03024032752700D2F3 +:10CD5000FB024032E5DAB40A0474018001E4FAE52A +:10CD6000DAB40F0474018001E44AF57CE5DAB41406 +:10CD70000474018001E4457CF57CE5DAB41904749F +:10CD8000018001E4457CF57CE5DAB423047401807C +:10CD900001E4457CF57CE5DAB4280474018001E403 +:10CDA000457CF57CE5DAB42D0474018001E4457C12 +:10CDB000F57CE5DAB4320474018001E4457CF57C4D +:10CDC000E5DAB4370474018001E4457CF57CE5DAEA +:10CDD000B43C0474018001E4457CF57CE5DAB4419F +:10CDE0000474018001E4457CF57CE5DAB446047402 +:10CDF000018001E4457C6008301B05752700D2FBEB +:10CE0000E5272474F582E43455F583E0FA90838CA9 +:10CE1000F0E5272479F582E43455F583E0FA908330 +:10CE20008DF0E527247EF582E43455F583E0FA9011 +:10CE30005583E0FB90838E4AF0905584E0FA90830E +:10CE40008FF0905585E0FA908390F0905586E0FA47 +:10CE5000908391F0905587E0FA908392F0905588F6 +:10CE6000E0FA908393F0905589E0FA908394F090E3 +:10CE7000558AE0FA908395F090558BE0FA9083966E +:10CE8000F0800E90FFFC12477B800690FFFC12475B +:10CE90007BD2FCC2FC02424275F970D2B375FB80B2 +:10CEA00075F97890FFFD12477B75F97C90FFEC12C5 +:10CEB000477B75F97E90FFEC12477B75FAF090FF87 +:10CEC000FE12477B905567E0FA908388F090556B8F +:10CED000E0FA908389F090556FE0FA90838AF090A1 +:10CEE0005573E0FA90838BF0D2FCC2FC75430002CC +:10CEF000424275F970D2B375FB8075F97890FFFDE9 +:10CF000012477B75F97C90FFEC12477B75F97E9098 +:10CF1000FFEC12477B75FAF090FFFE12477B9055AD +:10CF200067E0FA908388F090556BE0FA908389F07F +:10CF300090556FE039EF8F5101000000A0AE00B0B6 +:10CF4000000200009EEBBE78FA90838AF090557341 +:10CF5000E0FA90838BF0D2FCC2FC7543000242429F +:10CF60009080B1E0FA24D0F582E43456F583E0F500 +:10CF7000272529F53074805529FABA800EC3E52794 +:10CF800095305013753000D2B7800CC3E53095272B +:10CF900050057530FFD2B79056F7E0F5C275F970BD +:10CFA000D2B39080B0E0FA7450C39A25E0FA24C35B +:10CFB000F582E43457F583E0F55AA3E0F55BD2F946 +:10CFC00075FB8075F97890FFFD12477B75F97C90B1 +:10CFD000FFEC12477B75F97E90FFEC12477B300F18 +:10CFE0000575FAF0800375FA9890FFFE12477B9062 +:10CFF0005567E0FA908388F090556BE0FA9083894A +:10D00000F090556FE0FA90838AF0905573E0FA90B3 +:10D01000838BF0D2FCC2FC75430090FFBA12477BB1 +:10D020008002C2C790FFD812477B74075590FABAA6 +:10D03000010C75D30075C10F75370102036F30C73E +:10D040004D20040E75C112200D0302036FD2A302FE +:10D05000036F74FE2543400E75C112200D030203B9 +:10D060006FD2A302036F90FFD812477B74075590CD +:10D07000FABA010C75D30075C10F75370102036F41 +:10D0800075C111200E0302036FD2A102036F75C197 +:10D090000F02036F75E5D075E601300D141250468E +:10D0A000E433F57CD320B705E57C7001C392B780EB +:10D0B0000690FFBF12477BE537600302036FC2A3F0 +:10D0C00020045EB20274075590FABA02028014BAC4 +:10D0D0000302801DBA05028025BA06028025BA0720 +:10D0E00036802A75C111200E03024396D2A1024355 +:10D0F0009675C111200E03024396D2A1807A75C1A4 +:10D1000019807575C111300E6FD2A1806B75C11178 +:10D11000300E65D2A1806175C10FC2C7753701801D +:10D1200057054374075590FABA02028014BA0302F5 +:10D13000801BBA0502801DBA06028020BA07318022 +:10D140002575C11376C6C71A010000009CB000B057 +:10D1500000020000E0F019C8C2C775FB03D2C3800B +:10D160002B75C114C2C7802475C119754302801C78 +:10D1700075C111300E16D2A1801275C111300E0C7E +:10D18000D2A1800875C10FC2C775370175F9FE02BB +:10D19000036F75E5D875E63190FFFF12477B300EBF +:10D1A00014124F93E433F57CD320B705E57C70016E +:10D1B000C392B7800690FFD812477BC2A1C2C77541 +:10D1C0004300E537600302036F74075590FABA0213 +:10D1D00002800FBA03028014BA06028014BA071B39 +:10D1E000801475C11375FB03D2C3801575C11480FB +:10D1F0001075C117800B75C117800675C10F753783 +:10D200000175F9FE02036F300F4F9080877420F094 +:10D21000D2A290FFFF12477B124A11744B255AFA93 +:10D22000E4355BFBC3EA952EEB952F500BE529B453 +:10D23000800280201529801CE55A24B5FAE55B346C +:10D24000FFFBC3E52E9AE52F9B5009E529B47F0229 +:10D2500080020529C2A275FA98C2C774075590FAD0 +:10D26000BA054675C1169083A8E530F0300B1D3025 +:10D27000930E908095E549F0908097E54AF0800CF8 +:10D28000908095E547F0908097E548F030930575DC +:10D29000FBC8800375FBF075FD2475FC8A74F95595 +:10D2A000B74406F5B7C2C6800575C10FC2C675F989 +:10D2B000FE02036F30011E74075590FABA0206751C +:10D2C000C10202036F75D300758000C201D2AF7531 +:10D2D000C10F02036F30F80575FAFD800375FAFB84 +:10D2E00075FB4775FC30C2C390FFE812477B43C013 +:10D2F0001890FFFD12477BC2C3D2FF90805CE0FA1A +:10D3000020E50575D303800375D3017537017407D4 +:10D310005590FABA0208A201B392FE753700C2FE18 +:10D3200074075590FABA020675C11302036FC2AFB3 +:10D3300075D30075FB0075FC0075FD0075FA00756E +:10D34000F970D2FDC2FD758000C201D2AF75C10F68 +:10D3500002036F30D54F96DE0100000098B200B096 +:10D36000000200001418A775010675C10202036FC0 +:10D37000300B2930931490808EE571F090808FE50A +:10D3800072F0908092E573F0801290808EE57BF0D1 +:10D3900090808FE56FF0908092E570F030930B7580 +:10D3A000FBC89083887490F0800375FBF030F80818 +:10D3B00075FAFD75D200800375FAF875FDFF75FCEE +:10D3C000C39080BD744BF090FFFA12477B75FCCF81 +:10D3D00090FFFA12477B9080BD740BF0D2FF9080D3 +:10D3E0005CE0FA20E50575D303800375D30175373A +:10D3F0000174075590FABA0305D2FE753700C2FED4 +:10D4000074075590FABA030675C11402036FC2AFD0 +:10D4100075D30075FB0075FC0075FD0075FA00758D +:10D42000D20175F970D2FDC2FD758000C201D2AF84 +:10D4300090803DE4F0908234E0FA8A037A00908292 +:10D4400033E0FC7D00905FE2EC4AF0ED4BA3F090FE +:10D450008236E0FA8A037A00908235E0FC7D009003 +:10D460005FE4EC4AF0ED4BA3F075C10F02036F745B +:10D47000075590FABA0502D2FEC2FE30010675C108 +:10D480000202036F74075590FABA050675C11602B9 +:10D49000036F75C10F02036F30010675C1020203ED +:10D4A0006F300B1D30930E908095E549F09080977A +:10D4B000E54AF0800C908095E547F0908097E5482C +:10D4C000F030930575FBC8800375FBF075FAF875AD +:10D4D000FD2475FC829080BD744BF090FFFA1247DA +:10D4E0007B75FC8A90FFFA12477B9080BD740BF02D +:10D4F00074F955B74406F5B790805CE0FA20E5056D +:10D5000075D303800375D301D2FEC2FE7407559014 +:10D51000FABA060675C11702036F75D30075C10FFD +:10D5200002036F02036F90000122C0D075D008C2C1 +:10D53000AFC28EC28FD200D2AFD0D032C0E0C08294 +:10D54000C083C0D075D008C2AFC28EC28FD20130A6 +:10D55000812A90804DE0FA530AF090804DE0FB74F0 +:10D56000012B540F845D64700100000094B400B07E +:10D57000000200000DE0790590804D4AF090805C3B +:10D58000E0FA20E60B908054E0FA4440F03095FD3C +:10D59000D0D0D083D082D0E032AA82AB834389013D +:10D5A0008A8A8B8CD28C308DFDC28CC28D22AA824D +:10D5B000AB834389108A8B8B8DD2AFD2ABD28E22B4 +:10D5C000AA82AB837C00C21FC220E527252725E065 +:10D5D000FD1D74035528FEE4BE00010424FF9222C1 +:10D5E000E4BE02010424FF922374105528FEE4BE19 +:10D5F00010010424FF922174205528FEE4BE00018E +:10D600000424FF922474405528FEE4BE4001042403 +:10D61000FF922520221D30230E8A828B83E054F056 +:10D62000FEC4540FFE80128A828B83E0FF740F5F6A +:10D63000FE80068A828B83E0FE302003024A10308F +:10D64000246290FFFFC002C003C004C005C00612E0 +:10D65000477BD006D005D004D003D002D2C590FFBE +:10D66000FFC002C003C004C005C00612477BD0063D +:10D67000D005D004D003D002C2C5C002C003C0048C +:10D68000C005C0061252DED006D005D004D003D0AB +:10D6900002AF32E533C313CF13CFC313CF13CF7809 +:10D6A0000002495475E51875E62190FFFFC002C0DD +:10D6B00003C004C005C00612477BD006D005D004C5 +:10D6C000D003D002D2C590FFFFC002C003C004C087 +:10D6D00005C00612477BD006D005D004D003D00287 +:10D6E000C2C5A2CE720050FA74FC55F2F80303547E +:10D6F0003FF8743055F6F925E025E0F948F5367520 +:10D70000E61190FFFFC002C003C004C005C00612AE +:10D71000477BD006D005D004D003D002D2C590FFFD +:10D72000FFC002C003C004C005C00612477BD0067C +:10D73000D005D004D003D002C2C5C002C003C004CB +:10D74000C005C0061252DED006D005D004D003D0EA +:10D7500002A832E533C313C813C8C313C813C8796A +:10D76000008807C3EF953650047F008005EFC3950E +:10D7700036FF30001DE753E50100000090B600B011 +:10D7800000020000F908C7B80122C3EF953850091C +:10D79000C21EE538C39FF88010C3E5399F5009D2F7 +:10D7A0001EEFC39539F8800122E52D702BD2203071 +:10D7B000250C201E52EEB50502804C0E8049C3ECAC +:10D7C000985044301F093021030E803B1E803830B2 +:10D7D00021031E80320E802F301E10302107EEC331 +:10D7E0009527FE8014E5272EFE800E302106E527C2 +:10D7F0002EFE8005EEC39527FE8804A21E921FE52B +:10D8000027C313F527152D20222F3023198A828B49 +:10D8100083E0FF53070FEEC454F0F842078A828B6F +:10D8200083EFF002481B8A828B83E0FF74F05F4E27 +:10D83000FF8A828B83F002481B8A828B83EEF00280 +:10D84000481B22200016D2B490FFFB12477BA2CFC8 +:10D85000720050FA85F32E85F42FC2B422200042C4 +:10D86000D2B590FFFB12477BA2CC720050FAAAF10E +:10D87000E4FBCA25E0CA33CA25E0CA33FB74185555 +:10D88000E7FCE4FDC423CCC423541F6CCC541FCC50 +:10D890006CCC30E40244E0FDEC4AF52BED4BF52C6A +:10D8A000C2B522AA82AB837C00C2267D003026034B +:10D8B000024C2B30035690FFFFC002C003C004C0CF +:10D8C0000512477BD005D004D003D002D2C590FF0B +:10D8D000FFC002C003C004C00512477BD005D004BE +:10D8E000D003D002C2C5C002C003C004C00512529A +:10D8F000DED005D004D003D002AE32E533C313CE60 +:10D9000013CEC313CE13CE7F00024B9C75E5187562 +:10D91000E62190FFFFC002C003C004C00512477B90 +:10D92000D005D004D003D002D2C590FFFFC002C002 +:10D9300003C004C00512477BD005D004D003D00239 +:10D94000C2C5C002C003C004C0051252DED005D05B +:10D9500004D003D002AF32E533C313CF13CFC313C8 +:10D96000CF13CF78008F3675E61190FFFFC002C04D +:10D9700003C004C00512477BD005D004D003D002F9 +:10D98000D2C590FFE7E28776010000008CB800B0B6 +:10D99000000200003E11C5E5FFC002C003C004C084 +:10D9A0000512477BD005D004D003D002C2C5C00207 +:10D9B000C003C004C0051252DED005D004D003D08D +:10D9C00002AF32E533C313CF13CFC313CF13CF78D6 +:10D9D000008F06C3EE953650047E008005EEC39599 +:10D9E00036FE300004E424FF22C3EE9538501A8A34 +:10D9F000828B83E0FFBF7F05740124FF220F8A82A0 +:10DA00008B83EFF0EC2CFC802CC3E5399E50228AEE +:10DA1000828B83E07005740124FF228A828B83E06D +:10DA2000FE1E8A828B83EEF0EC2CFE74012EFC80AD +:10DA300004E424FF22BD0332BC05028009BC0602B7 +:10DA40008004C2278002D227202709BC0902800453 +:10DA5000C2278002D227202709BC0A028004C227DD +:10DA60008002D227A227922680010D530407024A82 +:10DA70007BE424FF22AA327B008AE9AA347B008A55 +:10DA8000ED7A00AB338BEA7A00AB358BEEC2FEC287 +:10DA9000FEC2FEC2FEC2FEAAE97B00ACEA8C05E42F +:10DAA000FC4202ED4203ACEB7D00AEEC8E07E4FEDF +:10DAB0004204EF42057E008D078C067D00E4FCF8F1 +:10DAC000F9EA4204EB4205E84206E942078C828DFE +:10DAD000838EF0EF22AA82AB83ACF0FD8A067F0032 +:10DAE000780079008EE97E008B07780079008FEA54 +:10DAF0007E007F008C00790088EB7A007B007C0040 +:10DB00008DECAA137B008AED7A00AB148BEEC2FE7B +:10DB1000C2FEC2FEC2FEC2FEC2FEC2FEC2FEAAE932 +:10DB20007B00ACEA8C05E4FC4202ED4203E5EDE546 +:10DB3000EE8A828B8322AA82AB83E52D7003024D8D +:10DB40007390FFD3C002C00312477BD003D002D230 +:10DB5000B190FFFCC002C00312477BD003D002A2E9 +:10DB6000CD720050FAC2B130000122ACF5740F55ED +:10DB7000F6FDC3E5349CE5359D50118A828B83E028 +:10DB8000FCE5272CFC8A828B83F08022ACF5740F95 +:10DB900055F6FDC36BFF10BC0100000088BA00B051 +:10DBA00000020000CAF97B58EC9534ED9535501110 +:10DBB0008A828B83E0FCC39527FC8A828B83F0806A +:10DBC0000122152DE527C313F527024CF422AA8262 +:10DBD000AB837C00C2288A828B83E0FD7510003005 +:10DBE0002803024EBB90FFD3C002C003C004C0058F +:10DBF00012477BD005D004D003D002D2B190FFFCF5 +:10DC0000C002C003C004C00512477BD005D004D0B9 +:10DC100003D002A2CD720050FAC2B1300004E42455 +:10DC2000FF22AFF5740F55F6F8C3E5349FE535983C +:10DC30005012BD7F05740124FF220DEC2CFF7401EE +:10DC40002FFC800CED7005740124FF221DEC2CFCD0 +:10DC5000E510B40332BC05028009BC06028004C290 +:10DC6000298002D229202909BC09028004C2298006 +:10DC700002D229202909BC0A028004C2298002D2CA +:10DC800029A22992288002051020281585F53274D2 +:10DC90000F55F6F5338A828B83EDF0530407024D5E +:10DCA0008574015CFFBF0136AFF5740F55F6F8EFD0 +:10DCB000C39534FFE89535F8E534C39532F9E53579 +:10DCC0009533FEC3E99FEE9850098A828B83EDF06D +:10DCD000024D85ED14FE8A828B83F0024D85AEF5F0 +:10DCE000740F55F6FFE534C39EFEE5359FFFE53220 +:10DCF000C39534F8E5339535F9C3E89EE99F50099B +:10DD00008A828B83EDF0024D8574012DFE8A828B11 +:10DD100083F0024D85E424FF22858211858312C29F +:10DD20002B7C007D0F74F05530FEE4BE100104FF23 +:10DD3000E4BE200104F8E4BE400104FE7900A22BF9 +:10DD400072005003024F8F90FFFFC004C005C00651 +:10DD5000C007C000C00112477BD001D000D007D05F +:10DD600006D005D004EF6006A2C8922A8016E860AB +:10DD700006A2C9922A800DEE6006A2CA922A8004E9 +:10DD8000A2CB922A202A12BD1F05740124FF220D66 +:10DD9000EC2CFA74012AFC800CED7005740124FF50 +:10DDA000221DEC2C3F48ACE40100000084BC00B014 +:10DDB00000020000D301A528FCB90332BC05028093 +:10DDC00009BC06028004C22C8002D22C202C09BC83 +:10DDD00009028004C22C8002D22C202C09BC0A0229 +:10DDE0008004C22C8002D22CA22C922B80010953D9 +:10DDF0000407851182851283EDF0024EE4E424FFCE +:10DE000022D2C590FFFF12477BC2C5A2CE7200404E +:10DE10001274075590FABA01F275C10F753701E413 +:10DE200024FF22AAF27B00743055F6FCE4FDC454B2 +:10DE3000F0CCC4CC6CCC54F0CC6CFDEC4AF532ED9B +:10DE40004BF533E53CFA3395E0FBEA2532F532EB4E +:10DE50003533F5337A00740C5533FBBA000BBB0431 +:10DE6000087532FF753303800AE53330E305E4F5C6 +:10DE700032F533AA32E533C313CA13CAC313CA1324 +:10DE8000CA7B00300004E424FF22C3EA953A500E16 +:10DE9000E529B47F05740124FF2205298012C3E51A +:10DEA0003B9A500CE529B48005740124FF22152902 +:10DEB000E424FF222003030250CED2C590FFFF12BC +:10DEC000477BC2C520CE1274075590FABA01F5758A +:10DED000C10F753701E424FF22AAF27B007430558C +:10DEE000F6FCE4FDC454F0CCC4CC6CCC54F0CC6C47 +:10DEF000FDEC4AF532ED4BF533E53CFA3395E0FBAA +:10DF0000EA2532F532EB3533F5337A00740C5533AC +:10DF1000FBBA000BBB04087532FF753303800AE5BA +:10DF20003330E305E4F532F533AA32E533C313CADF +:10DF300013CAC313CA13CA7B0002529975E518307D +:10DF4000040302517030020575E611800375E62165 +:10DF5000C2C5C2C5D2C590FFFF12477BC2C530CE35 +:10DF6000FDABF27C00743055F6FDE4FEC454F0CDF8 +:10DF7000C4CD6DCD54F0CD6DFEED4BF532EE4CF5CC +:10DF800033E53CFB3395E0FCEB2532F532EC3533E1 +:10DF9000F5337B00740C5533FCBB000BBC040875D7 +:10DFA00032FF753303800AE53330E305E4F532F5DB +:10DFB00033AB32E5CC32E8900100000080BE00B007 +:10DFC0000002000027E91B9533C313CB13CBC31307 +:10DFD000CB13CB7C008B02300213C3EA953650057D +:10DFE0007A00025299EAC39536FA0252998A3602A9 +:10DFF000529975E621C2C5C2C5D2C590FFFF12472E +:10E000007BC2C520CE1274075590FBBB01F575C1CC +:10E010000F753701E424FF22ABF27C00743055F613 +:10E02000FDE4FEC454F0CDC4CD6DCD54F0CD6DFEF5 +:10E03000ED4BF532EE4CF533E53CFB3395E0FCEB74 +:10E040002532F532EC3533F5337B00740C5533FC57 +:10E05000BB000BBC04087532FF753303800AE5333F +:10E0600030E305E4F532F533AB32E533C313CB13BC +:10E07000CBC313CB13CB7C008B3675E611C2C5C264 +:10E08000C5C2C5C2C5C2C5C2C5C2C5D2C590FFFF03 +:10E0900012477BC2C520CE1274075590FBBB01F519 +:10E0A00075C10F753701E424FF22ABF27C00743098 +:10E0B00055F6FDE4FEC454F0CDC4CD6DCD54F0CD85 +:10E0C0006DFEED4BF532EE4CF533E53CFB3395E060 +:10E0D000FCEB2532F532EC3533F5337B00740C550F +:10E0E00033FCBB000BBC04087532FF753303800A98 +:10E0F000E53330E305E4F532F533AB32E533C313F2 +:10E10000CB13CBC313CB13CB7C008B02C3EA953666 +:10E1100050047A008005EAC39536FAA2037202928F +:10E120002DA22D72045035C3EA9538500EE52AB45D +:10E130007F05740124FF22052A8021C3E5399A5006 +:10E140001BE52AB4800474018001E424FF922DA20F +:10E150002D72055005740124FF22152AE424FF22A4 +:10E16000A2CE720050FAAAF27B00743055F6FCE49D +:10E17000FDC454F0CCC4CC6CCC54F0CC6CFDEC4A57 +:10E18000F532ED4BF533E53CFA3395E0FBEA253209 +:10E19000F532EB3533F5337A00740C5533FBBA00A6 +:10E1A0000ABB04077532FF75330322E53330E305FC +:10E1B000E4F532F53322000000000000000000000A +:10E1C000000000000C5C9C42010000007CC000B01C +:10E1D00000020000C2BE46920000000000000000E5 +:10E1E000000000000000000000000000000000002F +:10E1F000000000000000000000000000000000001F +:10E20000000000000000000000000000000000000E +:10E2100000000000000000000000000000000000FE +:10E2200000000000000000000000000000000000EE +:10E2300000000000000000000000000000000000DE +:10E2400000000000000000000000000000000000CE +:10E2500000000000000000000000000000000000BE +:10E2600000000000000000000000000000000000AE +:10E27000000000000000000000000000000000009E +:10E28000000000000000000000000000000000008E +:10E29000000000000000000000000000000000007E +:10E2A000000000000000000000000000000000006E +:10E2B000000000000000000000000000000000005E +:10E2C000000000000000180C1A0C1C0C1E0C200C86 +:10E2D000230C260C290C2C0C2F0C320C360C1A0C8F +:10E2E0001C0C1E0C200C230C250C280C2B0C2E0CAB +:10E2F000320C350C390C3D0C410C460C4C0C510CBD +:10E30000570C5D0C630C690C700C780C800C880C3D +:10E31000900C990CA30CAE0CBA0CC60CD40CE30CEC +:10E32000F50C080D1F0D3A0D5D0DF91C0B1D1F1D81 +:10E33000FC2C0D2D1F2D322D492D602D4F3D653D9F +:10E340007F3D9A3D944DB04DCE4DCD5DEC5DE57D6C +:10E35000240C260C280C2B0C2D0C231C261C281CF2 +:10E360002A1C2D1C301C331C361C391C3C1C3F1C29 +:10E37000431C471C2C1C2E1C311C341C361C391C05 +:10E380003C1C3F1C421C461C4A1C4E1C521C571C69 +:10E390005C1C611C671C6D1C731C7A1C811C881C16 +:10E3A000901C981CA11CAB1CB41CC01CCC1CD71C02 +:10E3B000E51CD12CDC2CEA2CF62C052D152D252D59 +:10E3C000203D323D433D573D6B3D6B4D804D974D5C +:10E3D000AF4DCA4D941987B30100000078C200B058 +:10E3E000000200003656F82FE54DE85DE47D082F69 +:10E3F000000000000000000000000000000000001D +:10E40000000000000000000000000000000000000C +:10E4100000000000000000000000000000000000FC +:10E4200000000000000000000000000000000000EC +:10E4300000000000000000000000000000000000DC +:10E4400000000000000000000000000000000000CC +:10E4500000000000000000000000000000000000BC +:10E4600000000000000000000000000000000000AC +:10E47000000000000000000000000000000000009C +:10E48000000000000000000000000000000000008C +:10E49000000000000000000000000000000000007C +:10E4A000000000000000000000000000000000006C +:10E4B000000000000000000000000000000000005C +:10E4C000000000000000000000000000000000004C +:10E4D000000000000000000000000000000000003C +:10E4E000000000000000000000000000000000002C +:10E4F000000000000000000000000000000000001C +:10E50000000000000000000000000000000000000B +:10E5100000000000000000000000000000000000FB +:10E5200000000000000000000000000000000000EB +:10E5300000000000000000000000000000000000DB +:10E5400000000000000000000000000000000000CB +:10E5500000000000000000000000000000000000BB +:10E5600000000000000000000000000000000000AB +:10E57000000000000000000000000000000000009B +:10E58000000000000000000000000000000000008B +:10E59000000000000000000000000000000000007B +:10E5A000000000000000000000000000000000006B +:10E5B000000000000000000000000000000000005B +:10E5C000000000000000000000000000000000004B +:10E5D000000000000000000000000000000000003B +:10E5E0000000000043D0DDC70100000074C400B08B +:10E5F000000200002FAE265F0000000000000000B7 +:10E60000000000000000000000000000000000000A +:10E6100000000000000000000000000000000000FA +:10E6200000000000000000000000000000000000EA +:10E6300000000000000000000000000000000000DA +:10E6400000000000000000000000000000000000CA +:10E6500000000000000000000000000000000000BA +:10E6600000000000000000000000000000000000AA +:10E67000000000000000000000000000000000009A +:10E68000000000000000000000000000000000008A +:10E69000000000000000000000000000000000007A +:10E6A000000000000000000000000000000000006A +:10E6B00000000000001400C0000000000000000086 +:10E6C000000000000020000000000000000000002A +:10E6D000000000006C001000000000002801100085 +:10E6E00000000000280108000100000000000000F8 +:10E6F0000000000001000000000000000000000019 +:10E700000100000000000000000000000000000008 +:10E7100000000000000000000000000000000000F9 +:10E7200000000000000000000000000000000000E9 +:10E7300000000000000000000000000000000000D9 +:10E7400000000000000000000000000000000000C9 +:10E7500000000000000000000000000000000000B9 +:10E7600000000000000000000000000000000000A9 +:10E770000000000000000000000000000000000099 +:10E780000000000000000000000000000000000089 +:10E790000000000000000000000000000000000079 +:10E7A0000000000000000000000000000000000069 +:10E7B0000000000000000000000000000000000059 +:10E7C0000000000000000000000000000000000049 +:10E7D0000000000000000000000000000000000039 +:10E7E0000000000000000000000000000000000029 +:10E7F000000000005CB44A760100000070C600B062 +:10E8000000020000DB4698E200000000000000006B +:10E8100000000000000000000000000000000000F8 +:10E8200000000000000000000000000000000000E8 +:10E8300000000000000000000000000000000000D8 +:10E8400000000000000000000000000000000000C8 +:10E8500000000000000000000000000000000000B8 +:10E8600000000000000000000000000000000000A8 +:10E870000000000000000000000000000000000098 +:10E880000000000000000000000000000000000088 +:10E890000000000000000000000000000000000078 +:10E8A0000000000000000000000000000000000068 +:10E8B0000000000000000000000000000000000058 +:10E8C0000000000000000000000000000000000048 +:10E8D0000000000000000000000000000000000038 +:10E8E0000000000000000000000000000000000028 +:10E8F0000000000000000000000000000000000018 +:10E900000000000000000000000000000000000007 +:10E9100000000000000000000000000000000000F7 +:10E9200000000000000000000000000000000000E7 +:10E9300000000000000000000000000000000000D7 +:10E9400000000000000000000000000000000000C7 +:10E9500000000000000000000000000000000000B7 +:10E9600000000000000000000000000000000000A7 +:10E970000000000000000000000000000000000097 +:10E980000000000000000000000000000000000087 +:10E990000000000000000000000000000000000077 +:10E9A0000000000000000000000000000000000067 +:10E9B0000000000000000000000000000000000057 +:10E9C0000000000000000000000000000000000047 +:10E9D0000000000000000000000000000000000037 +:10E9E0000000000000000000000000000000000027 +:10E9F0000000000000000000000000000000000017 +:10EA00000000000000000000010000006CC800B021 +:10EA100020010000F4DF29C7000000000000000012 +:10EA200000000000000000000000000000000000E6 +:10EA300000000000000000000000000000000000D6 +:10EA400000000000000000000000000000000000C6 +:10EA500000000000000000000000000000000000B6 +:10EA600000000000000000000000000000000000A6 +:10EA70000000000000000000000000000000000096 +:10EA80000000000000000000000000000000000086 +:10EA90000000000000000000000000000000000076 +:10EAA0000000000000000000000000000000000066 +:10EAB0000000000000000000000000000000000056 +:10EAC0000000000000000000000000000000000046 +:10EAD0000000000000000000000000000000000036 +:10EAE0000000000000000000000000000000000026 +:10EAF0000000000000000000000000000000000016 +:10EB00000000000000000000000000000000000005 +:10EB100000000000000000000000000000000000F5 +:10EB200000000000000000000000000000000000E5 +:10EB3000000000000000000001000000001300C001 +:10EB40000C000000BE3C7D1400000000000000002E +:10EB50000000000001000000801300C00C00000055 +:10EB6000C73C282700000000000000000000000053 +:10EB700001000000001B00C044000000E5FC0EADD9 +:10EB800000FFFF007F0000000000FFFFFFFFFFFF0E +:10EB9000FFFFFFFF00000000B10800B00000000010 +:10EBA0000000000000000000000000000000000065 +:10EBB0000000000000000000000000000000000055 +:10EBC000C8F170E606000000000000000000000030 +:04EBD00010364A149D +:00000001FF diff --git a/firmware/mrvl/sd8887_wlan_a2.bin.ihex b/firmware/mrvl/sd8887_wlan_a2.bin.ihex new file mode 100644 index 00000000..5402c2f2 --- /dev/null +++ b/firmware/mrvl/sd8887_wlan_a2.bin.ihex @@ -0,0 +1,24894 @@ +:100000000100000000000000000400000094511AEC +:100010001CF09FE51CF09FE51CF09FE51CF09FE5A0 +:100020001CF09FE51CF09FE51CF09FE51CF09FE590 +:1000300007440FEA3C280400D8270400E8270400FE +:10004000EC270400FC2704000C2804001C280400F2 +:1000500028280400000000EAD7EA00EA28008FE21E +:10006000000C90E800A08AE000B08BE001704AE24A +:100070000B005AE1D0EA000A0F00BAE814E04FE2A0 +:10008000010013E303F0471013FF2FE1543604007F +:10009000A43604000030A0E30040A0E30050A0E339 +:1000A0000060A0E3102052E27800A128FCFFFF8A44 +:1000B000822EB0E13000A128003081451EFF2FE1E3 +:1000C00004309FE503308FE013FF2FE119AF0300E9 +:1000D000002070470200144810B50068682109F339 +:1000E0006AF910BD10B5104C206800280CD101F041 +:1000F0005BFB20600D4A2021A06009F35CF90C4AEB +:100100006068202109F357F910BD10B5064C20682E +:10011000002808D00022132109F34DF9206809F3C3 +:100120002EF90020206010BD00000004E9B003009B +:1001300025B1030010B542F0C8EB05F33FF90020EC +:1001400010BD10B5EF480C00FFF7C4FFEE49486B37 +:1001500002229043486321000A2042F028EC01204B +:1001600010BD70B50D0003F0BBFD0400E548401C58 +:10017000FFF7B0FFE549E0074C6002D029000520F9 +:1001800015E0A00702D52900062010E0600702D57F +:10019000290007200BE0200702D52900082006E0EF +:1001A000E00602D52900092001E02900002042F0E4 +:1001B000FEEB012070BDF1B50020D5490E68D54F8A +:1001C000340005000AE0E10706D0A9007A58002AA9 +:1001D00002D000993000904764086D1C002CF2D1C9 +:1001E000012807D0C7481938FFF774FF009900208D +:1001F00042F0DCEBF8BDC54910B5886005F00BFA9C +:1002000010BD202800D3FEE7C24A80001358002BFF +:1002100000D0FEE7115000207047BE4A0021800048 +:1002200011500800704702688368C16810001847C1 +:1002300070B5052804D2B84D84002B59002B01D08D +:10024000012070BD2C23B44E4343DC3E9B192B513F +:1002500035000401F03528516019C2608160002129 +:100260004160AE4919615861002070BDFEB50E00B5 +:100270001700052815D2A8490201143155186968DC +:10028000A54B840000290DD101220197009602920E +:1002900018594369026906F373FC002801D1012053 +:1002A0006860FEBD18591D0006F3A6FC28593A00E7 +:1002B000310006F353FC285906F340FCFEBD934978 +:1002C00070B50878401C0006000E08700121490432 +:1002D0004018FFF7FFFE8C4D6C6AE00705D003F372 +:1002E0006CE909F3BBF8A81768628D4EA00709D521 +:1002F0002020F0600221C9436962B1680143B16006 +:1003000009F3A4F8600705D5A86A04218843A86208 +:1003100009F3C5FB20070AD5A86A08218843A8620B +:100320008020F060C9436962B1680143B160012077 +:1003300070BD70B501247A4D8440EC6000203CF023 +:1003400078FAA8682043A860012070BD0121744A92 +:10035000814010B5D1600D3800D5FEE7022800DBE2 +:10036000FEE7704C00238000041923606D4C40347C +:1003700000190362906808439060012010BD70B5B9 +:100380000125674E8540F56003F082FC04004005BE +:1003900032D509F0DEF8402802D103201BF04AFFD5 +:1003A00002F08DFC002815D002F041FB002809D096 +:1003B00029201BF03FFF012120008902084003F0A3 +:1003C00072FC19E002F0B8FB002815D032201BF0B7 +:1003D00031FF11E00AF0BEF900280DD010F018FF2F +:1003E000002809D019F0C7FF002805D019F059FDE1 +:1003F000002801D110F050FF600708D504F0F8FB89 +:1004000020000421084003F04EFC04F0E18E128C21 +:1004100001000000FC030000000400005AEF5E131E +:1004200036FC200003F04EFCB0682843B060012089 +:1004300070BDF8B5414DEC68E00702D0A817E86040 +:100440000440200606D58020C043E8608020844315 +:1004500003F047FC200407D50126F603300003F023 +:1004600040FCF043E860B4436003400F06D007202F +:10047000000421000140C943E96084430B262000A9 +:1004800036053040070005D0380002F019FAF8436D +:10049000E860B443E000400F09D00727BF062600FC +:1004A0003E40300002F09EF9F043E860BC43E006B5 +:1004B0000FD51020C043E8601020844303F040FDB6 +:1004C000002806D010F012F8002802D0102002F008 +:1004D00087F8002C06DA0120C00702F09EF91848C0 +:1004E000E860044081200003044205D0200002F0AF +:1004F00035F8200005F01CFD0E4988680122120520 +:1005000010438860F8BD0B4B0122120510B5DA606C +:10051000FFF78FFF012010BD5A000100003400805A +:1005200014000004003100803CC400045C2C000472 +:10053000170200000030008040E800808022008028 +:10054000FFFFFF7F30B5040020202081656920185F +:10055000AD7905706469E47944700171090A4171EB +:10056000110A8271C171190A8370C17030BDFFB563 +:1005700081B0002206000D000398417800780F0238 +:1005800007432037380034300104FD48090C1BF3C1 +:1005900031F8040037D038001430A0802020666184 +:1005A00020812018142100901AF362EB3B04049A76 +:1005B0001B0C14212000FFF7C5FF002D12D0288945 +:1005C0002E0028811C360B20072130567156401A08 +:1005D0003DF06BFE00990873072030563DF058FE41 +:1005E0000099487334202081039920183A001AF3A7 +:1005F0007AEA002120003AF050FE207B202805D125 +:1006000020003AF027FE002005B0F0BD2020208118 +:100610003EF0FBFD002802D005201BF015FE3AF04D +:10062000DDFDD94B0500D74821001C680022006879 +:100630000523A04728003AF0D5FD0120E4E7FFB5E7 +:100640000120904004060E0083B003991120240E6F +:1006500040010F18F879150020422FD1FF22913266 +:10066000462301A902A811F030FB002826D0F87912 +:1006700017212043F871019C103420001AF3F8EA86 +:100680000698002801D1052000E00D206072257237 +:100690002000627A0C990A301AF324EA310006220B +:1006A0000C31A01C1AF31EEA607A01990A30887294 +:1006B000000AC8720299039811F0D2FA07B0F0BD8F +:1006C000F3B5FF30401C0500006A81B0002803D05C +:1006D00009F38DFA00202862686A401C01D10120CC +:1006E000FEBDA84F00241FE0A8481AF3ECFF060047 +:1006F00002D03868002801D10020FEBD02980028F1 +:100700000ED13EF082FD002802D005201BF09CFD9A +:100710009D4B31001E68002238680523B04702E077 +:1007200030003AF097FD641C686AA042DCD80020D3 +:100730006862D4E795490020086048608860C86016 +:1007400008612C3948627047F8B504000E00904DDE +:100750003AF044FD070021002800FFF7B1FF8B4C61 +:100760000C3C012E06D1FF21213128001AF356EA54 +:100770000020A0720020C043208138003AF032FDF2 +:10078000FFF7D8FFF8BD81482C38406A002801D017 +:10079000401C01D10020704701207047F3B583B0A1 +:1007A00000210500049EFF30B61D2130009101910B +:1007B000029049E06A7801202C1D0021012A0FD007 +:1007C000022A12D0032A13D13388724A93420FD1DE +:1007D000738893420CD1B388934209D1012107E079 +:1007E0003178C907C917491C02E03178C907C90F18 +:1007F000002900D10020002717E060880499627862 +:100800000818211D3AF015F901002078802803D13D +:100810000120002907D005E0812803D1F922237C9B +:1008200001000000F80700000004000009358D7F7A +:10083000002901D0012000E0002008347F1C01289D +:1008400004D12878B842E2DC0120009001982435D8 +:10085000401C01900098002804D102980199807AE8 +:100860008842B1DC0098D9E60800FF310022491C1B +:100870000A6211002EE770B501253BF066FD0028E5 +:100880000CD0474C2C3C606A401C07D045480121E5 +:10089000FFF720FF05000020C0436062280070BD04 +:1008A00010B53BF052FD002805D13D482C38416A77 +:1008B000491C00D1416210BDF8B505000C000027AD +:1008C0003AF096FC0090E168A06800232E005940A1 +:1008D000584008433BD0A088A779344BC119403910 +:1008E0002A1A8C460100D21840315B009A4205D981 +:1008F0009A1CA84201D2AE1A00E0AE18664524DD6B +:100900008E4222DAB0420FDD801B0604360CE1680D +:10091000A068320019F3BAEEE160B919A1710121A2 +:100920000843A580A06018E0301A0204120C974218 +:1009300000D2A2710021012019F3A8EEA268E36899 +:1009400010431943E160A06007E011F0BCFA0020F9 +:10095000A5800121A071A160E06000983AF04CFCF4 +:10096000F8BDFFB59FB00600080037680021179159 +:1009700021997C6900291ED060301E901AF3FEE98F +:10098000229905004118C0782031400610D4B8885B +:1009900023B0F0BD881900040400000434030004EF +:1009A000E8C50004BCC40004FFFF0000FF0700000E +:1009B0002888882801D80020EAE719AA189100920F +:1009C000219918981AAA17AB0DF3F4F828000DF323 +:1009D00018F9002853D0FD48002104AA01AB07C331 +:1009E00018ABFB4A00921D7910AB1A7F38002B0020 +:1009F0001AA90CF332F905002DD11120400120185D +:100A0000C179090624D5002C0CD00D21890161186B +:100A1000896B002906D018AB1A79920068328B587E +:100A20005B1C8B50C1794906490EC1711E981AF39F +:100A3000A6E918AB1D7921992A01521B52180E32D2 +:100A40000092010010AB1B7F2A002000FFF701FE7F +:100A500000203060AFE7356028891E9940191AF3ED +:100A60009EE90088A88011204001201818AB1B794E +:100A700001263200C1799A409143C1711DE010AB4B +:100A8000197F009101952A8818991898843A091DB0 +:100A90001AAB10F368F806001CD0112018AB1A79B5 +:100AA000400120180123C17993409943C1712888DE +:100AB00008382880B8880838B880002C08D00D2065 +:100AC00080012018806B002802D0416E491C4166CD +:100AD00030005DE7002C14D00D2080012018816BC0 +:100AE00000290ED018AB1A79920068328B585B1C23 +:100AF0008B50816B0A69521C0A61806BC168491C6A +:100B0000C1601E981AF33AE9010018AB1879219ACE +:100B100003011B1A9A180E320092020010AB1B7FC1 +:100B20002000FFF796FDD3E700280CD00D218901A6 +:100B30004118886B002806D00269521C0261886B3C +:100B4000C16C491CC1647047F0B5012A069D059C23 +:100B500013D0022A15D0042A2DD14A780E78120219 +:100B600092194E790F793602F619CF7812043602AF +:100B7000120CF6198978360212E00A788E78120281 +:100B800002E04A780E7812029219CE798F793602F5 +:100B9000F6194F79120436020979120CF619360249 +:100BA000711826688E4202D11F88974203D2771CA3 +:100BB00003D08E4201D90120EBE6002801D01A8033 +:100BC00021602A80079801600020E2E6FFB583B02B +:100BD00004001E000C9F0E9D3FF0E6F9002820D077 +:100BE000607902281DD0082E1BD3082F01D30120C5 +:100BF0006EE538001BF3BCF9030080001D250019C9 +:100C00006D01119A109940196D4607C558003B2196 +:100C10000019090143180D9A05990498FFF794FFEC +:100C200056E50FA807C86C462B0007C4D9B635F2A5 +:100C300001000000F40B000000040000FD5AF8CB96 +:100C4000F3E7F7B592B014000F00129800680D900A +:100C500000200A900D9845690800603011901AF341 +:100C600098E8060020300990280020F005FD2100BA +:100C70002C311091091D403700280F9122D0109877 +:100C800007AA08A903AB07C36B46E0790F9A0107CF +:100C9000387E090F4007400F07C30021B078099A3A +:100CA00003092800FFF79CFF00280BD0002D08D077 +:100CB0000D2080012818806B0028F8D0016D491C98 +:100CC00001658AE030888828FBD922004C328838B8 +:100CD0000304111F081F0692021F0591049003923E +:100CE0000C3938381C3A029101900092387E1B0C66 +:100CF00047077F0F1A00099930003B000FF355FE9C +:100D0000070030000CF387FF00283ED00AA90091AD +:100D100000200BAA01920A900D9B099A310038001D +:100D20000CF359FE002858D02F4A00922F4A2C4B22 +:100D30000D9831001AF374FD002802D11299086051 +:100D40004BE01299060008600189081811991AF3FE +:100D500030E80E900A98002852D00BAA0092099908 +:100D60000E98230032000CF365FE070048D1002DD9 +:100D700008D00D2080012818806B002802D001685F +:100D8000491C01600E98807922E0002F30D038078E +:100D9000800F0FD0002D20D00D2080012918886BE6 +:100DA00000281AD0C26C521CC264886B0169491CAD +:100DB000016112E0B80710D5002D08D00D20800188 +:100DC0002818806B002802D00168491C0160B079A6 +:100DD000C107C90F280041F054EE002015B0E2E52C +:100DE00060FC02C0ECB701C0E0B701C0E8B701C0C9 +:100DF0003088143830800D980D9980881438888098 +:100E0000079C6B461A8C10990F9823000CF32DFE4B +:100E1000002F0AD1002D08D00D2080012818806BEA +:100E2000002802D0416E491C41660120D6E7F7B583 +:100E300082B014000025029807680398019760307B +:100E400019F3A6EF0600C0787F69400605D4203765 +:100E5000B87D400731D401252FE0002C01D10020BE +:100E60000BE5A07AC00721D0E0790007000F012828 +:100E700005D10399220001A8FFF7E3FE05E00399DD +:100E80002200002301A8FFF776FD029905000198D2 +:100E90000860B079C00710D1002D0ED0A07980076E +:100EA0000BD5210038003BF08EFA06E00D208001C2 +:100EB0003818806B8168491C81602800DDE40000DF +:100EC00070B50500008944193EF0B3F900280AD036 +:100ED000607B217B000208430B2804D00A2802D043 +:100EE00005201BF0C5F9FD4BFB481C6800222900BA +:100EF00000680223A04770BDF94801000839486026 +:100F0000F84801214170002101707047F449002028 +:100F100008394860F34948700870704710B5F14CC3 +:100F20006078002807D001202070A06D002802D032 +:100F30000EF308F9606510BD70B53AF063F905006D +:100F4000E9481AF3D4FB040028003AF05FF90225BF +:100F50000DE020002573FFF7B3FF3AF053F90600C8 +:100F6000E1481AF3C4FB040030003AF04FF9002CBA +:100F7000EFD170BD70B53AF045F9DA4C05006078F4 +:100F8000002809D0D64904200856411C04D0811CF1 +:100F900002D0012107F314FCD4480078012802D1C3 +:100FA00014201BF049F90020207204200AF008FBED +:100FB000CF48002200680C2108F31BFAFFF7BCFFA2 +:100FC00028003AF023F970BD10B5FFF7D3FFC549EB +:100FD0000020087048704865C649086010BDC148C7 +:100FE000017A032901D0032101727047FF2800D044 +:100FF00008407047C04910B5096839F0F4ED7D220A +:10100000D20019F39CEF8905800A084301D041F012 +:1010100074EC10BDF8B50024160005000F00220086 +:10102000002901D03889C2193BF08EF9002879D007 +:10103000AC49087A032876D00228FCD0BDFC7C9D00 +:1010400001000000F00F000000040000AE802BA79C +:10105000680726D5002F24D0507B117B04020C4357 +:101060000B2C08D010DC032C0BD0082C09D0092C39 +:1010700007D00A2C13D1A648A6490088097808434E +:101080000BD0FF25052615E0102CFAD0122CF8D035 +:101090004F2C04D1FF2507260CE0042085430426AD +:1010A00008E0062E06D193480838406819F37AEE16 +:1010B000C0056CD48F480838406819F374EE0100FD +:1010C0002800FFF79DFF002861D08B484030818BBE +:1010D000002900D18683904D002C1CD02888002840 +:1010E0000FD0844904200856401C0AD10800083853 +:1010F00040684079FFF788FFFFF770FF00202880E5 +:101100005CE03AF089F804007C4839001AF351FB9E +:1011100020003AF085F8774F0426083F7868865714 +:101120003BF01CF9002813D0734C606D00280FD0E1 +:10113000A06D00280CD004E03AE02AE0774803F0E4 +:101140007DFE0EF309F8616D401AA16D8842F5D35A +:10115000694802210172701C05D0B01C03D0002127 +:10116000300007F337FB78684079FF2829D0FFF774 +:101170004BFF2888002824D03BF0F0F8002804D04A +:10118000FFF72CFF002028801BE0288819E00020B2 +:10119000F8BD680715D5002F13D03AF03DF80400CC +:1011A000564839001AF305FB20003AF039F808E0F8 +:1011B000680706D5002F04D0FFF7C8FE3800FFF7F8 +:1011C00089FE0120F8BD4C48602110B519F344EDAB +:1011D00010BDF8B500200C00474F1500B882B86567 +:1011E0001DE06078217800020843FF38163819D0D6 +:1011F000A1280AD12000062D07DB417902790802D7 +:101200007D231043DB005843B865E178A2780802DB +:101210001043291A091F0D042D14241D0419042D2F +:10122000DFDCF8BDE178A27809021143CE08200086 +:10123000F2009142E9D1121D11040914A942E4DC23 +:101240000821082E00D23100CA00011D2A4814309E +:1012500019F366EC06E0F000C019002114300A0012 +:1012600006C0761C082EF6DBCFE7FFB58BB00A2050 +:1012700000261D000A9605900B98370040690790DC +:101280003EF090FD06900B980B9900894418203190 +:101290004118E078C00701D1A01D01E02000123004 +:1012A000A27894461207930F012B04D160460009DF +:1012B00008286CD03AE0920F02D14026092034E091 +:1012C0000388174A934209D14388934206D1838801 +:1012D000934203D101263700300026E00078C00792 +:1012E00020D00826032702201FE00000040000048D +:1012F00034030004A0000004D42C000400380004CF +:10130000680500040000000414070004A0B701C031 +:101310005C3C00048C060004900600048813000066 +:10132000FFFF00000226370003202880A078000776 +:10133000800F022873D10D9A002010700B98891D20 +:101340000A9140690290002823D0614808900A98C9 +:10135000022208A939F08BFB00281AD102983BF031 +:1013600031F8002803D002988068400704D402981E +:1013700007F000F8002803D00D98012101708EE0DD +:101380005448406819F30EEDC005F8D406202880B3 +:1013900088E007984079022841D10C98002827D08E +:1013A0000C9840300500007D8006400F012809D9C7 +:1013B000032805D80C98183019F3F4EC000701D570 +:1013C000012200E00022A17800200B079B0F022BD6 +:1013D00003D10909090700D50120024308D0287E5E +:1013E0003D4A41072000490F0C301AF301FB0590DC +:1013F00004A903AA009101920698112149014018FD +:101400000378059A079821003AF0AFF8039800286E +:1014100002D00D9901200870049800283FD02D4873 +:10142000406819F3C0EC304239D0A0780007800F33 +:10143000022837D1294EB08A002833D0C120C000FD +:101440000025099026E0B84202D025499CB498377F +:1014500001000000EC1300000004000011450E1410 +:1014600088421ED1E08A2349884207D021000A9889 +:101470001631022239F005FB002812D1A069401C68 +:101480001AD00A98022209A939F0FBFA002808D1DB +:101490000A9821001A301831042239F0F2FA002893 +:1014A0000AD06D1C082D04DAE8008419A08A0028EF +:1014B000D3D100200FB0F0BD0120FBE70A4800782F +:1014C000C00700D00120704700B53AF05CFF00284B +:1014D00005D0FFF7F3FF002801D0012000BD002058 +:1014E00000BD0000888E00009800000474CB00044A +:1014F000D42C0004FFFF0000F3B591B00C0011984C +:10150000002837D0207D0E2834D214264643BB4D08 +:101510004021A859401CA85101A819F3A8EB2000AC +:1015200001A91CF0C1FB677D607E0090206801214D +:101530008068800000281FDB0098401C020620699C +:10154000120E002800D0002111981DF038FD2069EE +:1015500001A9002824D10E2F05D214207843401968 +:101560004268521C4260009800280BD170198168B3 +:10157000491C816013B0F0BD2069002800D0002113 +:101580000022E1E700200206120E142353438A5C76 +:101590005B199C68401CA2180E289A60F3D3E9E7F7 +:1015A000E07D002804D070190269521C026103E03A +:1015B0007019C268521CC26000200206120E142369 +:1015C00053438A5C5B199C68401CA2180E289A60E1 +:1015D000F3D3CFE710B5FF2419348849220019F35B +:1015E00014EB8648210019F342EB10BD70B50D00D5 +:1015F000002805D00D2189014018846B002C06D1EC +:10160000002D03D04C21280019F35AEB70BD7C4A01 +:10161000D1687C4843685918794B4160403B21624E +:10162000596B8668711881606162196BC3685918BB +:10163000C160A1621168026951180161002DA163A6 +:10164000E4D0A06C290019F3C8EB6069291D19F3D7 +:10165000C4EB2900A069083119F3BEEB2900E06949 +:101660000C3119F3BAEB2900206A103119F3B4EBED +:101670002900606A143119F3B0EB2900A06A18310F +:1016800019F3AAEB2900E06A1C3119F3A6EB290033 +:10169000206B203119F3A0EB2900606B243119F382 +:1016A0009CEB2900A06B283119F396EB2900E06B25 +:1016B0002C3119F392EB2900A06E343119F38CEB25 +:1016C0002900E06E383119F388EB2900206F3C3196 +:1016D00019F382EB2900606F403119F37EEB1DF0A6 +:1016E00096F92900443119F378EB1DF08DF92900A2 +:1016F000483119F372EB70BDF0B400283BD00D22D5 +:1017000092018218926B002A35D03E4C23685B1CF4 +:1017100023609B062FD14C7ED36A1B19D3620B69C1 +:10172000002B23D10D682B6FDE78F60707D09E784B +:101730003607B60F022E02D19E7CF60702D19B79A6 +:10174000DB0702D0936C5B1C9364D36B5B1CD3638D +:10175000AB689B000DD4002C0BD093695B1C012C53 +:10176000936106D9D3695B1CD36102E053695B1CAA +:101770005361F0BCC0E6F0BC7047002808D00D22D1 +:1017800092018018806B002802D082695118816113 +:101790007047002810B51AD00D239B01C318986B11 +:1017A000002806D04469641C4461986BC36B5B1CC1 +:1017B000C3630E290BD214204843104B1958491CFF +:1017C000002A195003D0C0180169491C016110BDDD +:1017D000002809D00D2189014018806B002803D012 +:1017E00080300188491C01807047FF21034819316E +:1017F00010B519F33CEA002010BD0000FCC5000440 +:1018000040A80080A8000004C0207047010002A08A +:1018100010B507F3B6FD10BD7364696F00000000DA +:10182000F7B5150006000024002A1FD1002E14D0A1 +:101830007079022811D002E0012003F07BFF200024 +:10184000641C022807D20022F848110019F3FAFE9E +:101850000500F1D00AE0002D08D10022FF7958647C +:1018600001000000E817000000040000429FDD783E +:10187000F448110003233DF0AEFD050000D1FEBD8C +:101880006E61FFF7CBFF0004000C28810827441984 +:10189000122120002F7319F31EEA300022F04FFFAF +:1018A000207314202071002060717079022803D108 +:1018B000DF20A071002001E0380AA771E071B07943 +:1018C0002070F07960700198143404602800FEBD27 +:1018D00010B504000321363019F3FCE920001C2167 +:1018E000393019F3F8E92034A07E01210843A076AD +:1018F00010BD70B50400FFF7EBFF2000FF30FF22A2 +:101900000421993039F0F2E82000FF2158304131AC +:10191000050019F3B6E9FF34413401210020A1612B +:10192000E0612075280016F353FE70BD0F21890178 +:1019300070B54418E168002926D10079002803D049 +:10194000032801D004281FD139F07AFC0500BE48D5 +:101950000021FF229D324A438258002A0AD1FF23E8 +:101960009D33594301220E1842503000FFF7C1FF4A +:10197000E66002E0491C0229EBDB280039F064FC38 +:10198000E068002800D1FEE770BD0F2189014018F2 +:10199000C168002902D000220A60C260704710B5F9 +:1019A0000289123112189170090AD1700F213AF090 +:1019B00003FD10BD0A000F218901411810B5C96847 +:1019C0002A311DF017FD10BDF0B58FB00600149D33 +:1019D000159C1700092916D1382101A819F350E9DF +:1019E00004206B4698809948D88002A806223900C6 +:1019F000801C1D8119F3A8E804A82A002100801C7E +:101A000019F3A2E805E023000022290001A816F33B +:101A100009FA300001A904F0FBFD0FB0F0BDFEB5DE +:101A20000C3A0D0014060600240E1021102C00D8CC +:101A3000210030000A00FF3029001930083107006A +:101A400019F382E8FF3601970094761C2B787069B1 +:101A5000AA1C0921FFF7B8FFFEBD10B5040008005D +:101A60004979C90610D5010060318A784B78110296 +:101A700019430922633016F3C3FA002804D04278D0 +:101A8000811D2000FFF7CBFF012010BD0F21890130 +:101A9000401810B5C068583016F33CFE10BD7CB538 +:101AA0000C001500069900910F21079A8901401832 +:101AB0000192C0682A003930210015F3D0FF7CBDA7 +:101AC000FFB585B000220E001D0001894469081889 +:101AD0000390200004A9FFF7ADFE070002D101200A +:101AE00009B0F0BD0F20800100962618F268039916 +:101AF0001300049830332A3216F346FB0498817C95 +:101B0000012910D0002200920192F2680100130016 +:101B100030332A3271312000FFF7C1FF0499603160 +:101B2000C873000A0874079904982B00012216F361 +:101B300013FA01003800FFF732FF0020D0E70F2230 +:101B40009201801810B5C068393016F3E3F810BD63 +:101B500030B504000D2080012018002A8FB009D074 +:101B6000002C10D0806B00280DD08030C5886D1CF3 +:101B7000C58008E0002C06D0806B002803D08030A0 +:101B800045896D1C458101A816F34CF9200001A977 +:101B900004F03EFD0FB030BD70B505000F20800190 +:101BA0002C18E06828220100FF312D31DC3019F3B8 +:101BB00036E801212800FFF7C2FFE3680100DC33AB +:101BC00001222800FFF7C4FF70BD10B54469200052 +:101BD000FFF7E2FF0F2080012018C1680122C03109 +:101BE0004A61C068C0308069002803D0817AFD2234 +:101BF00011408172002010BD70B500214569280098 +:101C0000FFF79DFF0F2189016C18E3680100FF3386 +:101C10005B1D00222800FFF79BFFE0680121C03018 +:101C2000C160E068C0300269002A03D10161280068 +:101C300020F0B9F80021280021F0CBFF002070BD72 +:101C4000481A000474190004A03E040004040000B3 +:101C5000F7B584B005000E004769008900224019DD +:101C60000290380003A9FFF7E5FD0400C649B1DC86 +:101C700001000000E41B000000040000B6F0A8CC46 +:101C800002D1012007B0F0BD0F20002280013818DA +:101C90000092C26802991300039830332A3216F377 +:101CA0007DFA3100039801224031002316F35EF9DA +:101CB0000700706F00280BD0607B01210843607320 +:101CC0000698002801D0FF4800E0FF48A06109E025 +:101CD0000698002803D0280000F0FAFA02E0280055 +:101CE000FFF77DFF39002000FFF763FE0020C9E702 +:101CF000FEB500220E00018945690F18280001A9D0 +:101D0000FFF7A2FD040001D10120FEBD0F2000223B +:101D1000800128180092C2680198130030332A32DB +:101D2000390016F33BFA31000198012240310023BB +:101D300016F31CF9617B012211436173E349A16130 +:101D400001002000FFF735FE0020FEBDF7B58AB088 +:101D50000F2189010A980526406906904518EC680C +:101D600000200890012058340027079002E001204D +:101D700003F0F4FC761E03D3E86840680128F6D12E +:101D80000A98210016F390FB0028099019D00898B2 +:101D9000002830D1E8683E3015F322FE00282AD012 +:101DA000E8683E3015F331FE0028E86804D0417A37 +:101DB0000A301DF04FFB02E02A3015F3C8FA060086 +:101DC00002D100200DB0F0BDE8683E3016F382FA73 +:101DD000020021002000D431503002AB07C32200A2 +:101DE0004032B439019200910B9A0C9923003000D3 +:101DF00016F3F2FA0127079800280BD022002100E1 +:101E00000A98403220310023FFF764FE002801D0F9 +:101E1000002716E0012F14D1069800280AD0069852 +:101E20000D2189014018806B002803D06030418B60 +:101E3000491C418309992000093115F3D0FF002086 +:101E4000A0673800BEE7F8B5060045690F2080019D +:101E50002818C76830005837390016F33EFB0400D5 +:101E600001D10020F8BD20790122022800D00022F3 +:101E700039003000FFF7F6FE002801D02000F8BD41 +:101E8000002D09D00D2080012818806B002803D078 +:101E90006030418B491C418321000931380015F322 +:101EA0009EFFDEE7F8B5070044690F208001201887 +:101EB000C66838005836310016F353FB050005D0CC +:101EC00031003800FFF714FF002801D00020F8BDD2 +:101ED000002C09D00D2080012018806B002803D031 +:101EE0006030418B491C418329000931300015F3D2 +:101EF00076FF2800F8BDF8B505000E000089170030 +:101F0000401981790024090716D54079C00709D006 +:101F10002800FFF798FFF8BD642002F0ADFF641CB5 +:101F20002406240E3A0031002800FFF70FFF002896 +:101F3000F1D1072CF0D3F8BD2800FFF7B3FFF8BDAF +:101F4000FEB50C000600086F1700401C06D1E06EBD +:101F5000401C03D1200016F345FBFEBD39F07AF991 +:101F6000050002E0002139F063F9594819F3E7FB55 +:101F70000028F7D1280039F071F90022300001A9BA +:101F8000FFF762FC0500E8D00F20800136180094AE +:101F9000F2680198130030332A32390016F350F9F1 +:101FA000F0683E3016F396F90200F0682030417F69 +:101FB000807E0907CB0F8006C10F019816F360FAE7 +:101FC000E06E401C0128E06602D1206F401C2067B3 +:101FD0002100019801224031002315F3C7FF0100C1 +:101FE0002800FFF7E6FCFEBDF3B581B006000F2028 +:101FF00080013518E8680400FF3059300700006898 +:102000005834002820D0FC20005D00901DF0B2FB69 +:10201000029A21003000FFF793FF0098002814D0A7 +:10202000012811D1E8682B4A2030017E0823491C81 +:1020300001760098210016F349FB274A2749200022 +:1020400008237E6116F32EFBFEBD224A0098210074 +:10205000082316F33BFBE8682030C17D491CC1759D +:10206000FEBD70B50E0011000F2292018418E568C4 +:10207000FF22583515325051E0680622C05177F3DF +:1020800001000000E01F000000040000E52A7BA022 +:10209000303018F36EEDE06806222A30310018F374 +:1020A00068ED144A14492800082316F3E9FADAE522 +:1020B000FFB581B0050016000A9F3AF0ABF9002881 +:1020C00028D02800FFF7F6FC0F2080012C18E068CC +:1020D00002990A30320011E035220000431B000053 +:1020E000711B000000D0000455853100409C0000A9 +:1020F0008185310080969800A985310018F338ED6C +:10210000E0683A00467204992800FFF7B4FFE168DE +:102110000120486005B0F0BD0F2189014018C0685A +:10212000FF304130C0690006000E70470F21890161 +:10213000401808B5C068408F009008BD020010B577 +:102140003AF068F900280BD00F2080011018C16800 +:1021500020314A7E520852004A76C068FFF7CCFB15 +:1021600010BD0F2189014018C06801222030417E36 +:10217000114341767047F0B585B00E000B991500FC +:102180000A9F0C9A0400002902D1002004A904909F +:102190000F20800120180197009303920291C068DC +:1021A0002B000100FF3199313930320015F328FB43 +:1021B000B0E7F0B506000F2080013418E0680F008A +:1021C000417A15000A308FB01DF04EF9002810D06A +:1021D00001002B003A0001A815F364FD300001A9AD +:1021E00004F02AFA3000FFF765FCE0680121C030F6 +:1021F000016126E470B505000F2080012C18E0680D +:102200002030417EC90712D0817EC9060FD5007FDC +:1022100000220007C10F2800FFF7CBFFE068012272 +:102220002030007F0007C10F2800FFF7C2FF1AE52A +:102230000FB50F2189014018C1686B46FF319A889C +:1022400081310A83C1681A7AFF3181318A76C06888 +:10225000197BFF308130C1760FBD30B50F24A4014A +:102260000019C468FF348134257E0D70647E4C7083 +:10227000C168FF318131897E1170C068FF308130C3 +:10228000C07E187030BD30B50F24A4010019C46899 +:102290002034A57E0D70E47E4C70C1682031097F2A +:1022A0001170C0682030407F187030BD0F21890147 +:1022B00010B54418E06800280BD0FF304130006AA8 +:1022C000002806D007F3D9FCE0680021FF30413038 +:1022D000016210BDEAE70F2189014018C068FF3094 +:1022E0007130704710B50400FFF783FC2000FFF742 +:1022F00097FC002010BD70B5002503891C18667876 +:102300004369002E17D0032E20D1002B09D00D24B5 +:10231000A4011C19A46B002C03D0803465886D1CAB +:1023200065805B79022B02D106F0EEF801E0FFF741 +:10233000ECFD01250AE05879032801D0012805D1D8 +:102340002079012802D1080012F04AFF280070BD50 +:1023500010B51DF0ABF8002010BD000010B502F064 +:10236000A0FF002805D0A748807DC00701D040F01D +:10237000BEEB10BD10B5FFF7F1FF23F063FD40F099 +:10238000C4EA23F060FD10BD10B501F087FD002800 +:1023900012D001F082FD9C490120000588604011A7 +:1023A00001F0DCFC22F00DFBFFF7D8FF40F0ACEAB7 +:1023B00022F023FB01F070FD10BDFEB5002438F0C3 +:1023C00053FF060000F096F990480168080602D510 +:1023D000480600D5012403F0D6FD050002D10120F6 +:1023E00003F0E5FD0120C007807802210840800746 +:1023F00017D4002C1BD100228548009200680822C7 +:10240000012101AB3AF037F80122009200221100BD +:10241000100013000DF0A2FE012819D100F06AF996 +:1024200005E07C480068002812D1002C10D0002D57 +:102430000ED0754CA568E017E060E70C380001F09D +:1024400096FCFFF7A1FF380001F088FCA56001E0D1 +:10245000FFF790FF300038F00BFFFEBDADE710B581 +:1024600038F002FF040040F046EB22F09BFA200017 +:1024700038F0FEFE10BD70B5040038F0F5FE050022 +:102480006248016821430160600601D4C07821FFE1 +:1024900001000000DC23000000040000CDBBFE1D95 +:1024A000200618D5480616D5080612D501F078FD85 +:1024B0005A48FF21491CC16040685C490868612294 +:1024C0005205904308605A49486928229043486160 +:1024D00001E001F065FD280038F0D4FE70BD10B5B4 +:1024E0000DF0F0FB002801D1524810BD524810BD3C +:1024F00010B502F093FE51494000085A504B4C4928 +:102500005843096A0B071B0F18F358ED0805070617 +:102510000609090B0B06400810BD800810BDC00855 +:1025200010BD000910BD10B5FFF7E2FF4549884214 +:1025300001D1454810BD4549884201D1444810BDEC +:10254000444A4549904219D0444A904201D14448F6 +:1025500010BD444A904202D14148D23810BD424A8F +:10256000904201D1414810BD414A904201D14148B9 +:1025700010BD414A904201D1404810BD080010BD35 +:1025800070B5040038F07AFE050025480168A143C3 +:102590000160600601D420061BD5480601D5080657 +:1025A00017D4224801686122520511430160016875 +:1025B0004205114301601949C00D886001F008FD12 +:1025C0001B48416928221143416102F00DFF0CF0C4 +:1025D00087FC280038F056FE70BD114A01001268D1 +:1025E0000020914300D101207047C00005D50C4860 +:1025F00020304068002800D000477047030040208A +:1026000010B5FFF7EAFF002804D0180302D5102008 +:1026100000F036F810BD0000A001008000300080FE +:10262000C8000004C0BE01C0CC0600040021008028 +:10263000002800803F3D00007F841E000030040021 +:10264000A0860100001BB70054150000405DC600C5 +:10265000B013000000F82401540D000000366E0194 +:10266000AA0A000080BA8C0100F04902AA06000004 +:1026700000751903EB040000007C9200AA1A000008 +:1026800010B52A4904000020086029490860C020CC +:10269000FFF776FF01F0ABFCE00602D51DF0F8F87D +:1026A00010BD1DF096F810BD0020E9E702210320BF +:1026B00010B51EF012FB00280FD1032108001EF0F8 +:1026C0000CFB002803D040F024EA002805D1FEF7D7 +:1026D000AAF8002801D1012010BD002010BD10B5BE +:1026E00001F07EFC01280CD1FFF7E0FF002808D0A4 +:1026F0000DF053FC0F480088012802D001F088FC3F +:1027000010BD01F07CFC10BD084910B5096800201F +:10271000002900D0402006490968002901D0802105 +:102720000843FFF7B2FEFFF7DAFF10BD60070004B1 +:1027300064070004DA070004052804D26649830010 +:102740001818085C7047FF2070470A00032010B576 +:10275000FFF7F2FF904201D1FFF7A6FF10BDFF285F +:102760000CD05D4A00218B005B18D35C834202D100 +:102770000806000E7047491C0529F4D3FF20704756 +:10278000FF280ED0544A00218B005B189B185B7801 +:10279000834203D188004018105C7047491C05290A +:1027A000F2D3FF207047052805D24B498300181843 +:1027B000401840787047FF207047FF280ED0464AE7 +:1027C00000218B005B18D35C834204D18800401841 +:1027D000801840787047491C0529F2D3FF207047C4 +:1027E000FF280ED03C4A00218B005B18D35C83424B +:1027F00004D188004018801880787047491C05294A +:10280000F2D3FF207047344A00218B005B18D35C61 +:10281000834207D1880040188018C0784007C0174D +:10282000401C7047491C0529EFD30020704710B5A4 +:102830000024FFF794FFFF2806D0274983001818CB +:10284000401800798007C40F200010BD70B5050046 +:102850000C00100001F074FB200001F092FA280037 +:10286000FFF78EFF022805D0032803D0042801D0EB +:10287000052803D1200000F073F870BD2000FFF799 +:10288000B4FE70BD10B50400C00005D501221203CE +:1028900011040C20FFF7DAFF200105D5CFC1BAA73C +:1028A00001000000D8270000000400009E612D7187 +:1028B0000122D20211040B20FFF7D2FF600105D5DF +:1028C0000122920211040A20FFF7CAFF10BD012065 +:1028D000C00310B501F03EFB0120C00701F05BFA18 +:1028E0000349086A80229043086210BDCC000004AE +:1028F00000280080F3B581B00F000198FFF739FF81 +:1029000005000198FFF763FF06000198FFF772FFCB +:102910000400032D07D1042E05D1102001F01AFB6D +:10292000B00401F046FA002F1ED10198FFF775FFA1 +:10293000002819D0231F18F34CEB06171717170A96 +:1029400004170198FFF77DFF01000D200AE00198B0 +:10295000FFF777FF264AA90049198918C978CA08DC +:102960000100100005F372FFFF2201991000FFF72C +:10297000F6FEFEBD10B50400C00203D50121022001 +:10298000FFF7B8FFA00207D501210320FFF7B2FF30 +:1029900001210420FFF7AEFF200203D5012105200D +:1029A000FFF7A8FF01200007844205D040108442B1 +:1029B00002D0401084421AD1FF208206A11808D00C +:1029C000891804D0C206891804D10C2002E00B201B +:1029D00000E00A20FFF7DEFE022805D0032803D01E +:1029E000042801D0052802D10121FFF783FF10BD83 +:1029F000CC0000043EB5040002E0012002F05AFAC7 +:102A000003F00CF90028F8D002206B461870002063 +:102A10005C709870D8700121684603F064F93EBD7F +:102A200001B5B848012240686946083003F034F91E +:102A30002020FFF7DFFF08BDB24808B5016801227A +:102A40002031684603F028F96B46187808BD10B5A8 +:102A50000400AC4898B0016824220FA803F01CF9C8 +:102A600060070ED524220FA905A818F300E9A6498E +:102A70001422684618F3FAE8A34810380FC808F083 +:102A800014F8200704D510AB9979587907F095FD13 +:102A9000E00609D5FFF7D0FF002805D09B48406A23 +:102AA000C030C07FFFF7BCFF9748242210380FA921 +:102AB00018F3DCE818B010BD10B54078FFF7C7FF79 +:102AC00003F086F9002010BD8E4800B5016889B07A +:102AD0002422684603F0E0F86B46197801200029AB +:102AE00002D01979002904D06B465978002900D109 +:102AF000002009B000BD834808B501680122491CC7 +:102B0000684603F0C9F86B46187808BD7D4808B5DB +:102B100001680122C91C684603F0BEF86B461878AC +:102B200008BD784808B5016801220F31684603F0F6 +:102B3000B3F86B46187808BD724808B501680122E1 +:102B40001F31684603F0A8F86B46187808BD6D4839 +:102B500008B5016801220B31684603F09DF86B4609 +:102B6000187808BD674808B5016801220C3168462D +:102B700003F092F86B46187808BD1CB50122614C31 +:102B800001A821680E3103F087F82168012219316C +:102B9000684603F081F86B4619780020002903D0BD +:102BA0001A798A4200D101201CBD564808B5016837 +:102BB00001220A31684603F06FF86B46197801204C +:102BC000002900D0002008BD002008B500904D4825 +:102BD000012201686846083103F05EF86B461978F7 +:102BE0000120072900D3002008BD464808B5016828 +:102BF00001220D31684603F04FF86B46187808BD86 +:102C0000404808B5016801221831684603F044F8CD +:102C10006B46187808BD3B4808B5016801221A3197 +:102C2000684603F039F86B46187808BDF8B505001A +:102C30000E00344C012221686846891D03F02CF8EF +:102C40006B461878324B0122584328602168684649 +:102C5000C91D03F021F86B4618782D4B584330609E +:102C6000F8BD284808B5016804221031684603F011 +:102C700013F8009808BD234808B5016804221431F0 +:102C8000684603F009F8009808BD1E4808B50168B9 +:102C900001221D31684602F0FFFF6B46187808BD1F +:102CA000184808B5016801221E316846B147DE5751 +:102CB00001000000D42B0000000400006A0E58C57B +:102CC00002F0F4FF6B46187808BD01B512480122E6 +:102CD0004068694602F0EAFF08BD01B50E480122CE +:102CE00040686946801C02F0E1FF08BD01B50A4852 +:102CF000042240686946001D02F0D8FF0220FFF759 +:102D000083FE08BD10B5040022F0D0FC002802D1DB +:102D10002000FFF7EBFF10BD20370400E84104005E +:102D200014C70004710200007CB504000D001600F9 +:102D300002203DF0CDF800280FD0FF21CB316B46AB +:102D40001980042159801C715D7100219E71D97117 +:102D5000082376216A460FF0A3F87CBD70B50025E4 +:102D6000FFF793FF012801D2012400E00024FFF7C0 +:102D700082FF012801D2012000E00020002C0AD0AF +:102D8000002808D0FFF7EDFE002804D1FFF7C8FEA9 +:102D9000002800D10125280070BDF948406870471F +:102DA000603010B518F344E880780107890F0229D4 +:102DB00008D10009042805D00C2803D0F149086A7D +:102DC000401C086210BDEF49886AC96A704710B597 +:102DD00007F07EFD002809D038F064FAE84A117C3B +:102DE000002901D0491E117438F060FA10BDE44882 +:102DF00070B5683803F36EFFE1483C3803F36AFFAF +:102E0000DF481838007C062813D002203DF060F817 +:102E100007E020001AF0F0FFE279A17920001DF010 +:102E20002AF80400F5D13DF053F8002801D01AF03B +:102E3000E3FF012002F017F800200CF053FCD24809 +:102E4000C168012292051143C160C168520011435B +:102E5000C160CE4908690226B0430861C84C00250C +:102E6000A561CB482574606107F04BFD6561667410 +:102E700070BDF8B504000E000CF327F90090300681 +:102E80000D00000E0DF059FC6168012789780023C0 +:102E90000A07920FFF03022A0ED10E09042E0BD14E +:102EA0008602B748009AC038006A0021C08880189E +:102EB0006941801B99410EE0012A11D109090E29AF +:102EC0000ED1009A80021E00101A2B00B34164221A +:102ED0001900801871416161206160883843608009 +:102EE000F8BDFEB50C00C969C90408D52100203120 +:102EF0004A7A097A55066D0E8E07B60F1BE000223E +:102F0000130069460CC11100E56A0BE0CB005B19A8 +:102F10001E685B6801931B031B0F9A18491C0E293E +:102F2000009602D263789342F0D2009949044D0E84 +:102F300000998E07B60F89068F0FE1690A04120CFB +:102F400029000DF093FB012E029003D10E352D06C2 +:102F50002D0E0EE0022E0CD168060A23400F5843B6 +:102F600029075F43090F4018390040181F30050634 +:102F70002D0E606801230288E0690104090C280015 +:102F80000BF38CFE029940188249096B0818608780 +:102F9000FEBDF8B502203CF09BFF0500FF217E48F6 +:102FA00000222D3118F38AFB06007ED00221C020BA +:102FB000317334183081A078F322800880001040EB +:102FC00008300007000F4030A070E0784008400053 +:102FD00008431040CF210840BF210840E070F12095 +:102FE0008000291806220D00A01D17F3E0ED200037 +:102FF000062229000C3017F344EE20000622290097 +:10300000123017F3D4ED002020801C2035183081B9 +:103010008421280017F366EE2F00162060372C67F6 +:103020007877574818380090007C00284AD05448D8 +:103030007838C088A080FFF794FD002808D1FFF7FA +:103040006FFD002804D1A0887D2149014018A0808F +:103050004B4878388089A87002203CF039FF7061B5 +:103060004E480079800607D4A878002804D0A868C4 +:10307000012189070843A860082015252D0238770B +:10308000FFF74EFD0124002804D0012000F018FEB7 +:103090003C484460290030000DF090FF0098007C0F +:1030A000002806D13949086900E011E002221043E6 +:1030B0000861334801001C3184614868E15BC1A3A9 +:1030C00001000000D02F00000004000039D48BA9BB +:1030D000401C48600120F8BD2E48C038016A0988AC +:1030E000A180C1E72B491C318868401C8860002002 +:1030F000F8BD294970B500248A69824221D1254D45 +:10310000183D287C06281CD0002088612148806951 +:10311000002803D1FFF747FF04000AE025480169B2 +:103120004069814205D0244807220068012139F016 +:10313000D6F9287C002804D0002C03D12C2019F0CB +:10314000F1F870BD0128FCD102202874FFF76CFD56 +:1031500000281A4806D03C30040003F3C5FD0022C5 +:103160000C2105E01030040003F3BEFD0022052110 +:10317000200003F36BFD200003F358FD70BD10B574 +:10318000054CE169814204D12F2019F0CBF80020D1 +:10319000E06110BDC0420400283704000090009098 +:1031A000C0A20080FFFFFF7F40A60080B819000486 +:1031B000C4E8000400A000800C0800044842040099 +:1031C000F8B500240600F9480221846141740BF32C +:1031D00086FFF74DE962A862FFF7ACFC6968084317 +:1031E00003D0002000F076FD6C60002E04D0EF4983 +:1031F0001C310868401C0860EC4C183C207C0228FC +:1032000008D1012001F039FEFFF70EFD032600284A +:1032100001D02674F8BDE86906F357FDE34DE44B91 +:103220000822783D0092EA88E24800211C3302F02F +:10323000B5FC2674FFF79CFD002807D00BF34FFF69 +:103240002A00383251631063E888A880D74868386C +:1032500003F34AFDF8BDD5491C314869401C48615B +:103260000120ADE7D14910B51C314869401C4861C7 +:10327000322019F057F88CE7F8B5CC4C183C207C7C +:1032800006282ED0C9488069002818D10BF327FFE3 +:1032900005000E002000210060382839C78880888A +:1032A0000A6B4B6B0021801859410023C01959410A +:1032B000401BB14100280DDD00F017FD0AE0BE48BB +:1032C00001694069814205D0BC480722006801219C +:1032D00039F005F9207C002803D0032801D105200E +:1032E0002074F8BDF8B50BF3FAFE07000C0037F0B8 +:1032F000E3FFAE4DAE490090287C496A08432BD1CC +:1033000028001838007C002600280AD0062808D09B +:103310002800783831002A00403A536B8088126BBD +:103320000CE007F08FFA002801D168690BE09F4A92 +:10333000C03A106AD3698088926931008018594177 +:10334000C01BA1416861002806DD0EF01DF80028B1 +:1033500002D0287C401C2874009837F0B1FFF8BDDB +:10336000F8B50BF3BCFE914A403A516310639048A4 +:10337000806906F3AAFC8D4C0226183C207C2500AF +:10338000603D00281FD0FFF7F6FB002819D0FFF79B +:103390009BFC8B4F002801D0667407E0FFF789FC87 +:1033A000002801D0032000E001206074EF80FFF7C7 +:1033B00046FC7D21C90041437D200001081AA880F8 +:1033C00001E0002060747A4B08220092AA887D48B0 +:1033D0000021183302F0E2FB01202074744C7A4F74 +:1033E000E06801280DD137F067FF0021E1607969BD +:1033F000302291437961754A516AB143516237F085 +:103400005FFF6A49A88848613869B0433861FFF7AF +:1034100069FFF8BDF8B50BF362FE644A403A5163A8 +:1034200010636348806906F350FC604C0026183C2A +:10343000207C2500603D002833D0FFF79CFB644FC3 +:1034400000287DD0FFF740FC00282BD002206074BC +:10345000FFF7DFFB002816D0FFF7BBFB002812D1D7 +:10346000E8887D21090140180004000CB842E8807A +:1034700001D9EF8004E07D21C901884200D2E980B2 +:10348000E88854492DE0E8887D21C8380004000C04 +:10349000C9018842E88000D2E980E9884D482DE0E2 +:1034A000A880C5E0FFF705FC002829D00320607440 +:1034B000FFF7AFFB002816D0FFF78BFB002812D1D7 +:1034C000E8887D21490140180004000CA136A6A817 +:1034D00001000000CC330000000400008611AE1A89 +:1034E000B842E88001D9EF8003E04049884200D229 +:1034F000E980E8883E49081ADCE7E8883B49C83893 +:103500000004000C8842E88000D2E980E98838484D +:10351000401ACFE701206074FFF785FB00281AD01E +:10352000FFF761FB002816D1E8883249FF30F530FB +:103530000004000C8842E88000D9E980A8887D2139 +:10354000FF38F5380004000C49018842A88079D280 +:10355000A98077E012E0E8887D2164380004000C3F +:1035600049018842E88000D2E980A8882249643075 +:103570000004000C8842A880EAD863E0FFF7E4FA70 +:10358000002804D01D486674E880AF805AE00D48DA +:10359000016A002901D0066205E019490020820075 +:1035A0008A58002A01D0012703E0401C0828F6D3DE +:1035B0003700FFF7E7FB002F009023D00E4823E0F1 +:1035C000C0420400283704007F30000000A00080C3 +:1035D0000C080004FF7F0000F32F0000C0A2008051 +:1035E000C0A80080204E000030750000E02E0000D2 +:1035F000606D0000D8590000504600004E70000079 +:10360000F4FF02C07D204001A880FFF70CFB0028DA +:1036100003D0FFF7E8FA00280AD0FFF7F3FA0028F2 +:1036200001D0002F04D00098002F03D0002803D130 +:10363000F94805E0002801D1F84801E07D2040016B +:10364000E880667408220092AA88F548F54B0021AC +:1036500002F0AEFA01202074F24CF34F183CE068FF +:1036600001280DD137F032FEE660796930229143AE +:103670007961EE4A516A02239943516237F02AFE7A +:10368000EB49A88848613969022081433961FFF715 +:1036900033FEF8BD10B5FFF7D1FA002802D0FFF7CE +:1036A00069FE80E5012001F080FBE1491C31002822 +:1036B00005D0C868401CC860FFF7B6FE73E508690E +:1036C000401C0861DA480421183801746BE5FEB526 +:1036D000050002203CF010FC0090D548406800280E +:1036E0004AD037F0F3FDD24C0126183C0190207CE3 +:1036F000B602002D37D000283BD12000603800688A +:10370000002836D007F0A8F8002832D1FFF7FAF9E0 +:10371000002803D1FFF718FA00282AD0FFF74BFA48 +:10372000002803D0FFF710FA002822D03FF01CEA4F +:10373000207C06280AD0BF480178002906D1012143 +:10374000502201700098130006F03AF8FFF776FA5D +:10375000002805D0300000F02DFB300000F01DFBEC +:10376000FFF798FF05E0002803D00025062804D1C4 +:103770002574019837F0AEFDFEBDAA4F183FF869D9 +:1037800006F3ADFAB86906F3AAFAFFF744FB300076 +:1037900000F010FB300000F008FB207C0628E7D08A +:1037A000A44801780029E3D0282205700098290058 +:1037B000130006F005F8DBE71CB50020019000902F +:1037C000694601A8FFF750FA99480199C038026884 +:1037D0008A4203D18288009B9A4226D00160009AD7 +:1037E00082809349C3889C399A180A80019B9A1A4F +:1037F0004389D21A4A80C388D218643A8A80C28820 +:103800004389D21ACA800289009B0831D2180A80E3 +:10381000019B9A1A4389D21A4A800389D218643AC2 +:103820008A8002894089101AC8801CBD804870B502 +:10383000406800282ED037F049FD040007F00CF84E +:10384000002824D00020FFF742FF3FF08EE9FFF769 +:10385000B3FF7948C168012252051143C160734921 +:103860008039886AFF229204104388624D0D280037 +:1038700000F0A0FA280000F090FA6D481838007C9B +:10388000062804D0082200210120FFF761FA200059 +:1038900037F020FD70BD664870B5406800283AD00A +:1038A00037F014FD5F4C0600183CA06906F317FAC8 +:1038B0000025A561A06806F312FA5B48A56041697E +:1038C0003022914341615949486A0222904348623B +:1038D00056488038816AFF22920491436CA01BC92C +:1038E00001000000C837000000040000D5CB7D7641 +:1038F0008162440D200000F067FA200000F05FFABA +:103900005048C0384561FFF790FA4E481838007C9F +:10391000062804D0002211001000FFF723FA30001F +:1039200037F0E2FC0120FFF7DCFE70BD4249183998 +:103930008A6882420DD1002088600120C8603F481B +:1039400041693022114341613D49486A02221043D6 +:1039500048627047F8B507003A484068002858D0D8 +:10396000384878380068002853D037F0B9FC354C17 +:103970000126183C0090354D207C7605002F1CD088 +:10398000002808D106202074FFF7DDF800283DD07C +:10399000FFF78BFF3AE0062838D0274F183FF86929 +:1039A00006F3A7F9B86906F3A4F906202074E868BD +:1039B000B043E860FFF739FA28E0062826D1FFF780 +:1039C000C2F800280FD1FFF7A7F8002803D1FFF7AE +:1039D000C5F8002807D0FFF7F8F800280FD0FFF748 +:1039E000BDF800280BD1207C06280FD100202074C0 +:1039F00006F03CFF002809D0FFF722FF06E0E86848 +:103A00003043E8603FF0BAE8FFF74EFE009837F029 +:103A10006BFCF8BD084910B518394A69824203D1D8 +:103A20000020486100F06AF939E40000D85900002C +:103A300010270000F32F000040370400C0A20080D0 +:103A4000C0A80080C04204007837040000900090B5 +:103A500038B5C94C2169814216D100202061C74880 +:103A6000007C032801D004280ED1012000F046F983 +:103A7000606906F33EF9C04B082200926288C04894 +:103A80000021143302F09EF838BDF8B5BD48446BF0 +:103A900000250BF338FBB84E0019694171633063A0 +:103AA00006F0E4FE002811D0B448A8384069002888 +:103AB0000CD0B06806F31DF90822009219223300D9 +:103AC000B14852010021083302F07CF8AB48007C79 +:103AD000002825D0062823D0012822D10BF313FB80 +:103AE0000C00A64928390A6B4B6B2100821A9941B8 +:103AF0000B00A249A54C603988882900801A994199 +:103B000000040014A0420BDAB06906F3F2F89A4BF5 +:103B1000082200929E4822000021183302F052F839 +:103B2000F8BD306906F3E5F8082200923088924B20 +:103B3000221A002197481033F0E7F8B526380125FE +:103B40008E4A8D4E117CAD020224030017F368EA01 +:103B500014A30D0D390B0E7E1113361729300D0DE0 +:103B6000A8A8AAAAAA0DFFF76BFEF8BDFFF79DFE55 +:103B7000F8BD012000E00020FFF7B3FDF8BD864846 +:103B8000062904D0C168012252051143C160C168F1 +:103B90002143C160280000F017F9280000F007F960 +:103BA000F8BD280000F010F9280000F008F9F8BD71 +:103BB0007248243803F3ACF8FFF772FBFFF774FD8B +:103BC000F8BD6E4FA83F388A002807D138002C3046 +:103BD0003862F8893882FFF7F9FD04E067498439D3 +:103BE000401E3962388201207861280000F0DFF839 +:103BF0000BF389FAF961B861B06906F37AF8082223 +:103C00000092386A5C4B428861480021183301F009 +:103C1000D9FFF068614D01280DD137F061FB00211B +:103C2000F16069693022914369615D4A516AA1433B +:103C3000516237F059FB386A818850481830416129 +:103C40002869A0432861FFF761FBF8BD4B4B18338F +:103C5000587C002813D0401EFF24F53458745C6152 +:103C6000FFF754FBB06906F344F8434B0822009277 +:103C7000474822000021183301F0A4FFF8BD0129B4 +:103C8000FCD13E49147434318869401C886101209C +:103C9000FFF7AAFAF8BD0429FCD1FFF7CFFBF8BD66 +:103CA000012000E00020FFF755FEF8BD10B505F03B +:103CB00033FF324C1834A068002812D0E068002886 +:103CC0000FD006F029FE01280BD129F045FA022871 +:103CD00007D0012060602D2018F038FB2A2018F052 +:103CE00035FBE8E42B2010B5FFF727FF5FCB208CD6 +:103CF00001000000C43B00000004000021A408C231 +:103D00002E20FFF724FF2249002018314860DCE410 +:103D10000322264912050028086901D0104300E05B +:103D2000904308617047F8B502203CF0F9F80700AD +:103D30000E216A460FF009FC050024D000981E4EA3 +:103D4000046F00202071607120706070FF220621D6 +:103D5000A01D36F026EFF120800039182000062241 +:103D60000C3016F34CEF02203CF0DAF86861009852 +:103D7000082160300177310028000DF047F9002854 +:103D800001D00120F8BD0020F8BD00002837040054 +:103D9000A8420400ED38000000A6008005380000AD +:103DA00034080000F32F0000293900000090009033 +:103DB000C0A20080C0A80080021100000948006A6B +:103DC000704708494A6902434A61CA690243CA61A5 +:103DD0007047044A51698143516170470149C043AA +:103DE00008627047802200804B490A6802430A60DB +:103DF0008A6802438A600120704747490A68824303 +:103E00000A608A6882438A600120704742494031D3 +:103E10000868086070474049C043C8600120704787 +:103E20003D4B80339969DA690901120909091201C8 +:103E3000002804D00520400701430A2003E00520A4 +:103E40000007014305200243D961DA617047334816 +:103E5000016B022291430163016B40229143016394 +:103E6000016B04229143016370472C48016B0622C9 +:103E700091430163016BC0221143016370472748DE +:103E8000016B802291430163016B46221143016360 +:103E9000016B3822914318221143016370471F4878 +:103EA000006B810701D500207047400601D5022034 +:103EB00070470120704710B501F039FA002804D08E +:103EC0001749886901221043886110BD10B501F0BF +:103ED0002EFA002804D012488169490849008161FE +:103EE00010BD10B501F023FA002804D00C488069F9 +:103EF00001210904084010BD10B501F018FA00288E +:103F000003D007488069C007C00F10BD0348C168CF +:103F1000C2051143C16070478022008000210080EB +:103F2000C02A008070477047FF484068816B090CC9 +:103F300001D000207047816B090504D5816B09040D +:103F4000090FFBD100E0806B01207047F6494968FA +:103F50008A69120C120402438A617047F248406871 +:103F6000816BC907FCD041680122D20391434160B3 +:103F70007047ED4949680A6B086348680122D2031B +:103F8000104348607047E8484068406A7047E64917 +:103F9000496880314A6A0001120F12070009024382 +:103FA0004A627047E0484068C06A7047DE49496825 +:103FB000CA698243CA617047DB494968CA690243DA +:103FC000CA617047D84949680A6D02430A6570475B +:103FD000D54949680A6A02430A627047D24949686A +:103FE0000A6A82430A627047CF484068C03001685D +:103FF0004908490001607047CB484068803081889B +:104000004908490081807047C748406880308188EE +:10401000012211438180704770B5C34D68688030BC +:1040200001680122114301600168C04C490205D5B5 +:104030000168A14301600A203EF0D6EC6868803038 +:1040400001682143016070BDB74840688030016855 +:104050004908490001607047B348406880300068F3 +:10406000C007C00F7047B048406880300168AF4A51 +:10407000914301607047AC4840688030016801227C +:104080001206114301607047A748406880300168FC +:1040900001221206914301607047A34840688030B6 +:1040A000C068704770B5050016003EF076ED9E4C76 +:1040B000606801008030026905614269436182697C +:1040C000F0228261C269C6618A68102002438A6058 +:1040D0008A6820239A438A606068416B426B8A42F7 +:1040E000FCD0FFF7DAFF0028F6D160688168194339 +:1040F00081604168012252031143416036D1E15E83 +:1041000001000000C03F000000040000727EDBAE32 +:1041100070BD8A48406880300069704787484068B1 +:10412000816820221143816070478448406881681B +:104130002022914381607047804949688031CA8854 +:1041400001238340C8881A43CA8070477B4840686F +:1041500081680122D204114381607047704777481B +:10416000406880300168FF22521C11430160704793 +:1041700072484168092080010818C1690122920330 +:104180001143C161C16952001143C161C16952004B +:104190001143C161704769484168092080010818CE +:1041A000C169012292031143C161C16952001143E7 +:1041B000C161C16952009143C16170475F48406865 +:1041C000816810221143816070475C484168092072 +:1041D00080010818C169012252041143C161C169FB +:1041E000D2001143C1617047544905224968D20188 +:1041F0008918CA69382340079A43800E0243CA616E +:10420000C86901221043C86170474C4A0023D35645 +:104210001F21C0181F2800DA01000806000E704791 +:104220000D2804D8454900228A56002A00DBECE715 +:104230007047F0B593B0434C2068030960681B01D8 +:104240000109A06809010209E068120100090001E2 +:10425000C01C12902069491C050960692D010009E4 +:104260000001401D1190A069921C00090001801DF1 +:104270001090E0692D1D0609206A36010009000131 +:1042800008300F90606AF61D0009000109300E9099 +:10429000A06A000900010A300D90E06A00090001DF +:1042A0000B300C90206B000900010C300B90606B00 +:1042B0000709A06B3F01000900010D300A90E06B77 +:1042C0000D37000900010D308646F0208143103182 +:1042D00009911299854340350895119D8243854384 +:1042E00050350795109D20328543503506950F9D1A +:1042F00094468543503505950E9D0C9A854350355F +:1043000004950D9D82438543503503950B9D503296 +:104310008543503501950A9D029281438643874328 +:10432000854372468243303150365037503583438F +:1043300050321F2000028343964605E0000100042E +:1043400000004000342D0004009513252D025B1958 +:104350002360099B814383435B1963606346834306 +:104360005B194919A360E160089D0B21854349024F +:104370006A182261079D864385436A186261069D1B +:10438000874385436918A1610321C9027218E2615C +:10439000059D85436A182262049D85436A186262FE +:1043A000039D85436A18A262029A82435218E26210 +:1043B000019D85436A1822637A186263009D8543D4 +:1043C0006A18A26372468243511800250700E16310 +:1043D000AE00A059C004C00EFFF717FFA159C006D8 +:1043E000C00CB9436D1C01432D062D0E102DA1519B +:1043F000EED313B0F0BDF0B588B0FF490A6A1206DB +:10440000130F4A6A1206120F120113438A6A120628 +:10441000120F12021343CA6A1206120F1203134339 +:104420000A6B1206120F120413434A6B1206120F84 +:10443000120513438A6BC96B1206120F0906120686 +:10444000090F134309070B43EC494A68D11DFF319B +:10445000FA310C690B610C6B0B630924A40112196E +:10446000D468D360E44BDC682406260F04969C686D +:1044700035012406240F03942C431D692D062E0FAD +:10448000350237032C43059700962600A6465C6943 +:104490003E432406240F0194240426430694019CE1 +:1044A00027059C693E432406240F2506DC692E431C +:1044B0002406240F24072643029607965B68BC4611 +:1044C0001B061F0F039B1E013B003343049E059FE9 +:1044D00036023343009E3B4336041E4367463E4349 +:1044E0002E432643072803D0062801D00A2809D1E5 +:1044F000906802989060C8680798C860C86ACE62E1 +:1045000008B0F0BD0528FBD19068019E8D7DC34D9C +:1045100001000000BC43000000040000708703B8E5 +:10452000704636033043069E304366463043284388 +:1045300020439060CA68C860C86A06980343604612 +:1045400003432B432343CB62E4E7F0B5AF48016854 +:10455000426809071207090F120E11438268036BA4 +:104560001207120D1143C2681207120C114302699F +:104570001207120B114342691207120A1143826992 +:10458000120712091143C269944612071143964655 +:10459000026A1407426A240F1207120E1443826A39 +:1045A0001207120D1443C26A1207120C14431A07A1 +:1045B000120F15042C43456B26002D072D0A2E43A0 +:1045C000856BC06B2D072D092E43000706439048CD +:1045D0004568E81DFF30FA304768416087688660AB +:1045E00016053443120614431A0714430922920194 +:1045F000AA18136811605368546062461207120FBC +:1046000013011343140223431403234314042343C9 +:10461000140523431206134372461343426A416250 +:10462000816A8362F0BDF0B5784908684A69C004C0 +:10463000C50E4868D204C004C00E40010543886816 +:10464000D20EC004C00E80020543C8685206C004E2 +:10465000C00EC00305430869CB69C004C00E040541 +:10466000254315438A69DB04D204DB0ED20E5B01BD +:104670001A430B6AAC46DB04DB0E9B021A434B6AFF +:104680004D6BDB04DB0EDB031A438B6AED04DB04AA +:10469000DB0E1B051A43CB6AED0EDB04DB0E5B065B +:1046A0001A430B6B6D01DB04DB0E2B438D6BC96B67 +:1046B000ED04ED0EAD022B43C904C90E47010600FF +:1046C0003E4387023E43C7033E432643400606431C +:1046D00048010C000443880204434D48CD03406860 +:1046E0002B430100FF302C43FF30801C4569654699 +:1046F000456187698261C769C361436B3300466363 +:10470000866B8363C66BC363080009218901401867 +:10471000016905614169426181698461F0BD10B53B +:104720000400FFF712FF2000FFF76FFEFFF77BFF8B +:1047300010BD37494968FF31FF31891C0A680007FD +:1047400012091201000F02430A60704730B50400DD +:104750002F4D04280CD21120FFF76CFD6968092247 +:1047600092018918C9698904C90E884200D20424BB +:104770006868FF30FF30801C01680F2212029143ED +:104780002207120D1143016030BD214A10B5536854 +:104790000522D2019A1813691F246406C006A34398 +:1047A00080080343136110696311C9069843C9095E +:1047B0000843106110BD164A10B553680522D20196 +:1047C0009A1813691F24E403C006A343000B034394 +:1047D000136110696311C9069843490C08431061BD +:1047E00010BD0B4A10B552680523DB01D2181369BE +:1047F0001F246401C006A343800D034313611069A5 +:10480000C90640094001C90E084303E0342D0004E5 +:1048100000010004106110BDF84A10B5526805236C +:10482000DB01D21853691F246401C006A343800D25 +:10483000034353615069C90640094001C90E08434A +:10484000506110BD0C2010B5FFF7E9FC04001120E9 +:10485000FFF7E5FC2100FFF7DFFF1220FFF7DFFC89 +:1048600004001320FFF7DBFC2100FFF78EFF14206C +:10487000FFF7D5FC04001620FFF7D1FC2100FFF75D +:104880009AFF1720FFF7CBFC04001920FFF7C7FCA5 +:104890002100FFF7A6FF10BDD84905224968D201C3 +:1048A00089180A699205D20E824206D30A69D20695 +:1048B000D20E824201D8082070470A691203D20E34 +:1048C000824206D30A695204D20E824201D80420E1 +:1048D00070470A699200D20E824206D30A69D20159 +:1048E000D20E824201D8022070474A699205D20E48 +:1048F000824206D34969C906C90E814201D8012006 +:10490000704700207047BD4949688031CA6AFF235B +:10491000E13300079A43C00D0243CA6215B9EE4164 +:1049200001000000B847000000040000235DD0D45F +:104930007047B74900B549688031CA6AC306520951 +:104940005201DB0E1A43CA62FFF7B0FF0006000EE9 +:10495000FFF7E3FF00BDAE494968C0314A69FF2354 +:10496000E13300079A43C00D02434A617047A849EA +:1049700000B54968C0314A69C30652095201DB0ECD +:104980001A434A61FFF792FF0006000EFFF7E3FFAC +:1049900000BD9F494968FF3141314A6BFF23E13334 +:1049A00000079A43C00D02434A637047984900B517 +:1049B0004968FF3141314A6BC30652095201DB0E8F +:1049C0001A434A63FFF772FF0006000EFFF7E1FF8C +:1049D00000BD8F494968FF31491C4A69FF23E13313 +:1049E00000079A43C00D02434A617047884900B5E9 +:1049F0004968FF31491C4A69C30652095201DB0E5E +:104A00001A434A61FFF752FF0006000EFFF7E1FF6D +:104A100000BD7F494968FF31FF31891C0A6A0F23B5 +:104A20005B0600079A43C00802430A627047784950 +:104A300000B54968FF31FF31891C0A6A1F231B0535 +:104A40009A43C306DB091A430A62FFF72FFF0006E9 +:104A5000000EFFF7DEFF00BD70B505000D20FFF76B +:104A6000F3FB6B494E68092189017118CA699204E8 +:104A7000D20E904201D2012200E0002264480024BC +:104A8000401C035DAB4204D0641C2406240E022C9F +:104A9000F7D3086A182555435D4A000C0004083214 +:104AA000535B18430862486A000C0004AA18538834 +:104AB00018434862886A9388000C0004184388628F +:104AC000C86AD388000C00041843C862086B1389B5 +:104AD000000C000418430863486B5389000C000461 +:104AE00018434863886B9389000C0004184388635B +:104AF000C86BD389000C00041843C8630520C001AB +:104B000030180368168A1B0C1B0433430360436888 +:104B1000568A1B0C1B04334343608368968A1B0C24 +:104B20001B0433438360C368D28A1B0C1B041343EA +:104B3000C3603023364A634338329A18535B0C6A99 +:104B40001B042404240C23430B62521953884C6A1F +:104B50001B042404240C23434B6293888C6A1B049B +:104B60002404240C23438B62D388CC6A1B042404C2 +:104B7000240C2343CB6213890C6B1B042404240CE8 +:104B800023430B6353894C6B1B042404240C2343E1 +:104B90004B6393898C6B1B042404240C23438B6389 +:104BA000D389CC6B1B042404240C2343CB63118ACC +:104BB000036809041B041B0C19430160518A4368F4 +:104BC00009041B041B0C19434160918A8368090482 +:104BD0001B041B0C19438160D18AC26809041204AA +:104BE000120C1143C16070BD09494A68092189014D +:104BF0005118CA691F235B02C0069A43800C024306 +:104C0000CA61C869012292049043C86170470000DC +:104C1000000100044E494968C0314A690F239B03D3 +:104C200000079A43800B02434A61EFE7484900B509 +:104C30004968C0314A691F235B029A43C3069B0C33 +:104C40001A434A61FFF732FE0006000EFFF7E2FF4B +:104C500000BD3F494A68092189015118CA69FF23EB +:104C6000E13300079A43C00D0243CA61CEE73849D9 +:104C700000B54A68092189015118CA69C306520959 +:104C80005201DB0E1A43CA61FFF710FE0006000E48 +:104C9000FFF7DFFF00BD10B504000D20FFF7D4FAC9 +:104CA000FFF7A2FF1620FFF7C4FAFFF7C0FEE006E9 +:104CB00014D50120C007C07CC1070FD00007400FEA +:104CC00002282AD0032809D11620FFF7BDFAFFF7E2 +:104CD0008BFF1620FFF7ADFAFFF7A9FE1620FFF7AE +:104CE000A8FAFFF7C4FF1620FFF7A3FAFFF79EFF0D +:104CF0001820FFF79EFAFFF71CFE1620FFF799FA1F +:104D0000FFF735FE1620FFF794FAFFF74FFE162047 +:104D1000FFF78FFAFFF76AFE10BD1120FFF794FA34 +:104D2000FFF762FFDAE70B48806900073493D196FA +:104D300001000000B44B000000040000D732A56061 +:104D4000000F6DE7084881680122120791438160D6 +:104D50008168C205914381608168521091438160EE +:104D60005EE7000000010004802A008070B504F0B6 +:104D7000BDF8764D0226002818D000F0E0F8002893 +:104D800014D004F307FC724C226A636A801A9941BA +:104D9000E162A062E868B043E860A068002802D041 +:104DA0000020A062E06205F0E8FF70BD05F021FD83 +:104DB000002803D105F0EDFC0028F6D000F0BFF884 +:104DC0000028F2D0E868B043E86070BD10B5604CD0 +:104DD000A16981420ED1FFF7C9FF60694004400C10 +:104DE000FFF71FF860694004400CFFF71FF8002030 +:104DF000A061606110BD042010B5FFF712F8042017 +:104E0000FFF714F8524CA069002804D004F3A3FF64 +:104E10000020A061606110BD4C48C06802210840BC +:104E2000704738B5052840D2494D484C296980342F +:104E300000290BD004F3AEFB6962286202E0052072 +:104E400000F092F8E06A4000F9D530E0012181409D +:104E5000E8680143E960FFF7DFFF002801D1012086 +:104E600038BDE06A400022D400F069F800281CD167 +:104E70000420FEF7DBFF0420FEF7CBFF2C68FDF7D4 +:104E8000DCFF002800D06C68686904210843686171 +:104E90002F4B082200922F4822000021183300F0E7 +:104EA000C3FE04F377FB69622862002038BD2748FF +:104EB000C16802229143C160D1E7052810B501D332 +:104EC000002010BD012181402148C2681143C1600A +:104ED000FFF7A2FF002814D000F031F800280BD013 +:104EE000FFF789FFFDF7A9FF002805D01A48007CCD +:104EF000042801D105F041FF1449C86802229043FB +:104F0000C860012010BD052810B516D2104C012331 +:104F1000E16883400A009943E1600ED1002A0CD079 +:104F200000F00DF8002801D0FFF765FF0749C868B9 +:104F300002221043C860012010BD002010BD0448AB +:104F40008069002800D00120704700000090009088 +:104F5000C8010004414C0000A8420400F849086B55 +:104F60008022904308637047F64910B5096835F010 +:104F7000DAEE8905800A084301D03DF05EED10BDF0 +:104F8000F148016A0F22114301620220ECE7EE486A +:104F9000016A0909090101620120E5E7EB4970B5E1 +:104FA0000868082290430860E94A506840084000B9 +:104FB000506010690B2108431061E64908009369AD +:104FC000DB0601D4401EFAD29069800601D4491E46 +:104FD000FAD236F0B7F9E0490A680124A406A243E0 +:104FE0000A60DD4A80321368DC4D2B401360136881 +:104FF000ED432B4313600A6822430A6036F0A6F99A +:105000000120FFF7B1FFFFF7BBFF20F0B1FB70BD40 +:10501000D349FF22C432888B1042FCD17047F8B5C7 +:10502000D04C6069002806D036F08CF9CE48FBF7EA +:105030000FF900F0AFFC36F085F960610021012026 +:1050400020F0FCFA002810D0C54EB4880120800260 +:105050000440B088C24D3527A0433F012035B842F7 +:1050600004D1287D012108432875F8BD022000F0F5 +:1050700042FB0028F9D03C43B480297D0120014344 +:105080002975F8BDB74810B5446900214161FF2179 +:105090000170B3482030017D4908490001750120A5 +:1050A00020F0EEFA200036F051F910BD70B5FEF296 +:1050B00034EBAC4D04002878022813D1A869401CB9 +:1050C000A861200605D4A8482030FBF7C1F800F0FD +:1050D00061FC802C02D1FEF220EB70BD2000FEF2BC +:1050E00026EB70BD6869002805D09F481630FBF795 +:1050F000AFF800F04FFC0021012020F09FFA0028BB +:10510000EFD002206C6128700120A86197480068E8 +:105110000028E6D1924DAC88012080020440A88886 +:105120006B26A043F600B042DBD0022000F0E3FA89 +:105130000028D6D03443AC8070BD8A4925763FF62E +:1051400001000000B04F00000004000084E8760C6D +:1051500010B58869401E88610FD14C694861FF20F5 +:105160000870012020F096FA802C02D1FEF2DEEACF +:1051700010BD2000FEF2E4EA10BD0028FCDAFEF2C9 +:10518000D6EA7E481730FBF76DF800F00DFC10BD35 +:1051900070B5794E7069002807D036F0DDF8774891 +:1051A000001FFBF75FF800F0FFFB36F0D5F87061E9 +:1051B0000021012020F04CFA002814D06D4DAC885D +:1051C000012080020440A888A04382280BD02888B0 +:1051D000F080002000F099FA002804D0A8883081DF +:1051E00082200443AC8070BD634810B561490289D8 +:1051F00044698A80C2880A8000214161FF210170D0 +:10520000012020F047FA200036F0AAF810BD70B552 +:10521000594D6869002807D036F09EF85748C01EDF +:10522000FBF720F800F0C0FB36F096F8686100212B +:10523000012020F00DFA00281BD04E4EB48801202A +:1052400080020440B088A043022812D0FEF759FE25 +:10525000002803D0012803D13F2002E01A2000E0FB +:105260007F203188E9803080B08828810220044383 +:10527000B48070BD404810B53E49028944698A80B7 +:10528000C2880A8000214161FF210170012020F0C5 +:1052900001FA200036F064F810BD30B505000C00AE +:1052A000FFF7C0FE334B20331D81FFF7BBFE9C8010 +:1052B000FFF7B8FE30BD10B50400FFF7B3FE2D4B6D +:1052C00020331C81FFF7AEFE187910BD30B5040005 +:1052D0000D00FFF7F0FF284301002000FFF7DDFF7E +:1052E00030BD30B504000D00FFF7E5FFA843010015 +:1052F0002000FFF7D2FF30BD1F484178002909D1B7 +:1053000020490968012209024270090F0200243273 +:10531000515C817080787047174910B5C8780028B3 +:1053200015D10861174840680A008007800F1032C5 +:1053300010230124002807D0012803D0022803D01D +:10534000032803D1136001E030201060CC7008699D +:1053500010BD0000400C0090A0B701C080A10080EB +:1053600000A3008040A60080881300000021008078 +:10537000FF7FFFEF00080090F801000437000100F4 +:10538000E407000400200080E54800880006000EC5 +:10539000704700B5FFF7F8FF022806D1E0488038D3 +:1053A00040688007800F012800D0002000BDDD4B41 +:1053B0005968382291431040084358607047D94BD0 +:1053C00059680F229201914310400843586070477A +:1053D00010B50C00FFF7F3FF2000FFF7E8FFB7E779 +:1053E000D14810B5446900214161FF2101700120BD +:1053F00020F050F9200035F0B3FFA9E770B5CA4C92 +:105400006069002806D035F0A7FFC848FAF72AFFE0 +:1054100000F0CAFA35F0A0FF60610021012020F001 +:1054200017F9002811D0C24DAC8801208002044039 +:10543000A888B526A0433601B04206D0022000F06D +:1054400064F9002801D03443AC8070BDB4480068D2 +:10545000B8498874010CB74820380186B6494969B3 +:105460008163704710B504000BF000F9002802D1E9 +:10547000200020F0FBFC6BE770B50500AD480C0088 +:1054800020384169A14212D044610021200020F05F +:105490003BF90021200020F043F9002D07D1002125 +:1054A000200020F037F90021200020F03FF970BDE6 +:1054B000A0482038016A0020DEE79E482038C169F4 +:1054C0000020D9E79B48203881690020D4E799481B +:1054D0002038416881610020CEE7964820388168F5 +:1054E00081610020C8E793482038C16881610020AD +:1054F000C2E790482038016981610020BCE78848F4 +:105500008E4A8030016811430160704784498B4A9C +:10551000803108689043086070478948C1688900F5 +:105520008908C160C168032292071143C160810CE0 +:105530007C48803041618349016183494161052193 +:1055400001617047814800B50068002800B827B4A1 +:1055500001000000AC530000000400003B2D53BFCD +:1055600001D0FFF7E4FF7F480D21C1632D21416386 +:1055700000BD714980398868CA0C9043886047E74C +:105580006D4880388168C20C1143816032E76948F8 +:1055900080380068000701D501207047002070475F +:1055A0006648C068704700207047F7B586B00400B1 +:1055B0000D0035F0DBFE00900021012020F052F8B4 +:1055C00000286FD0032160000A008240059020006F +:1055D000083840000E0086400390200010380492E6 +:1055E000020047000800B84002902000183843002D +:1055F00008009840012186460800A0409C460B0008 +:10560000019059489340584A4030002D37D0082C1B +:1056100004D21568049EB543156012E0102C03D225 +:105620005568B54355600CE0182C04D2C569029E3C +:10563000B543C56105E0202C03D2056A7646B54323 +:105640000562089D002D14D0102C04D29368019C93 +:105650002343936002E0426A1A43426282680A432B +:105660008260404BC03358680122120610435860D4 +:1056700044E03C48C03001680422914346E0082CD5 +:1056800007D21568059E049FB140BD430D431560C8 +:105690001BE0102C07D25568039FB543B9400D435A +:1056A000556012E033E0182C06D2C569029EB9405D +:1056B000B5430D43C56108E0202C06D2056A664655 +:1056C000B1407746BD430D4305620899002918D0C3 +:1056D000102C04D29168019B9943916002E0416AC9 +:1056E0009943416281684908490081601D48C03082 +:1056F0004168012212069143416000211B4841602C +:1057000005E01848C03001680422114301600120FF +:105710001FF0CAFF009835F02DFE09B0F0BD102132 +:105720000A2803D2054940003431095A054801804E +:10573000012070478020008000290080F8010004CB +:10574000370001000008009034C7000400A8008062 +:1057500000044010002A0080170000FF1020000005 +:10576000E49101C08022008000020090A0B701C037 +:1057700070B50024FFF717FE002808D0FEF7F8FBED +:10578000002803D1FEF7E9FB002800D0012435F002 +:10579000EDFD0500002C07D102203DF02DFC002876 +:1057A00002D01B4901200860002101201FF05AFF90 +:1057B000280035F0DFFD002070BDF8B50020154948 +:1057C0001FF0D6F9124E0024361D0F273F0308E0C4 +:1057D0002104090C394300201FF0CAF97059804791 +:1057E000641CA50070590028F2D10B480C490268CE +:1057F00000920A4A0B480C4B02F35CFB19F0F6FED0 +:105800000A480168002901D000208847F8BD00003F +:10581000E49101C05F5F00006807000460DA0004E3 +:105820008019000474190004803C04C0380200048C +:10583000FEB50D001600089F0A9A0999002800D1AC +:10584000FEE70468002C00D1FEE7029201913200CD +:1058500029002000009720F08FFBFEBD10B501F35A +:105860001DF90006000E10BD10B501F3A9F80006E1 +:10587000000E10BD002810B501D001F3DDF810BDF9 +:1058800038B514006A4601F337F8009820700020FC +:1058900038BD10B5040000F389FF2060002010BD62 +:1058A00010B501F359F810BD7CB50D001600079A2C +:1058B0000699002800D1FEE70468002C00D1FEE71D +:1058C0000192009132002900200020F04EFC0028B7 +:1058D00000D165637CBD10B5416B20F05DFC10BD4F +:1058E0007CB50C001500069A002800D1FEE7006880 +:1058F000002800D1FEE70021019200912A0021003A +:1059000020F068FB7CBD10B520F084FB10BD0028A2 +:1059100010B500D1FEE70068002800D1FEE720F0B6 +:10592000F0FB10BD002810B500D1FEE7006800288C +:1059300000D1FEE720F0FFFB10BD10B520F005FC04 +:1059400010BD10B520F009FC10BD10B504003DF0ED +:10595000AEE8002801D0002010BDFDF2D8889EA539 +:1059600001000000A85700000004000068F780D381 +:10597000F2EE606000F324FF2200002100F382FFBA +:105980000028F3D06068802802D1FDF2E4EE01E047 +:10599000FDF2EAEE012010BD38B504003DF090E8BC +:1059A000002801D0002038BD00F30AFF21686A46B4 +:1059B00000F368FF002808D16068802802D1FDF25A +:1059C000CAEEEFE7FDF2D0EEECE7012038BD0000B3 +:1059D000F8B59749486B022290434863954801788F +:1059E00001297ED00121017035F0CAFC0090924857 +:1059F000422115F3E6E901218F4AC90700200B78FF +:105A00001354491C401C0A28F9DB8C4900200B78F0 +:105A10001418491C401C0B28A372F8DB87489038E7 +:105A200001785175017991754179D175017A1176B5 +:105A3000417A5176017B9176407B8049D0768039DE +:105A400000200B781418491C401C0A282377F8DB27 +:105A50007A4950390A7E7848203082710A7FC271B3 +:105A6000497F0172754930390A7842724A788272E8 +:105A70008A78C2720A7902734A7942738A79827388 +:105A80000A7AC2734A7A02748A7A42740A7B8274EE +:105A90004A7BC2748A7B0275CA7B42750A7C827516 +:105AA0004A7CC2758A7C0276C97C41766349303172 +:105AB0000A7882764A78C2760A7902774A794277FA +:105AC0005F4A137C8377927CC2770A7F2030027012 +:105AD000497F4170594E082010368446B078EE2830 +:105AE00000E041E0FAD16046F070FF20B070002283 +:105AF0002FE0B078EE28FCD10C245443514B1959B7 +:105B0000F170080A3071080C7071080EB071FF2036 +:105B1000B070002903D1B078FE28FCD11BE0474FBC +:105B2000E51869681A37B078EE28FCD1434813307D +:105B30000B780370491C401CB842F9D9414B686886 +:105B40001B59C018884210D8287AB070521C12060F +:105B5000120E6245CDD3009835F016FC34483A4910 +:105B60004163344800210170F8BDFF20B070DAE7CE +:105B7000324810B510308078EE2804D13348FAF757 +:105B800085FBFFF725FF10BDF8B5FCF7F4FC304DA1 +:105B9000284E274F2C6804E06068002800D080471A +:105BA0002468002CF8D1FFF7E3FF7078401C000652 +:105BB000000E7070FAF76AFB786BFF21491C0843EE +:105BC0007863FCF7D7FCE5E7224810B500F302FF45 +:105BD00010BD10B5184C203C6360E260A1602060ED +:105BE0003CF0CCEF20613CF0DAEF60613CF0E6EF96 +:105BF000A0613CF0F4EFE0610D48416B022291435B +:105C00004163FFF7E5FE10BD10B5040035F0B8FBA9 +:105C10000F4B19680A0000E00968002902D0A14270 +:105C2000FAD101E022601C6035F0AEFB10BD00002F +:105C300000340080440200046C2F000490010080B6 +:105C40008000008050300400F2010100700001006B +:105C5000FC17000478B900042A48816A0422114321 +:105C600081627047FFB581B000241D00FDF272ED26 +:105C7000009003F387FF244E0027B06800281DD052 +:105C800004004069B0603068401C306001D10120E0 +:105C9000306001982060029860603068206103984D +:105CA0006761A0600A98207303F358FF01007068D1 +:105CB00003F39EFF2100301D03F3BEFF7068002830 +:105CC00006D03169002903D1806803F367FFF060D3 +:105CD000002C07D02069002804D0002D00D02860B7 +:105CE000012403E0002D00D02F60002400988028BC +:105CF00002D1FDF230ED02E00098FDF236ED200019 +:105D000005B0F0BD0034008038710400FF484168E0 +:105D10000068814201D10120704700207047FB4894 +:105D200010B541680068012292070B0004009343FC +:105D30009443A34205D111401040814201D001207B +:105D400010BD002010BDF24900204861F14A5060AA +:105D5000EE4A1060C8607047EC4841680160016815 +:105D6000EB4841610021C1607047002106F833FE15 +:105D700001000000A45B0000000400009C98F5678F +:105D8000032010B51FF082FCE6480178002901D1FC +:105D90008068016003201FF09BFC10BDF8B5040073 +:105DA0000D00160035F0F6FA0700002103201FF061 +:105DB0006DFC002C0ED0002D0CD0320029002000EC +:105DC00014F36CEF03201FF083FC380035F0E6FA83 +:105DD0000020F8BD380035F0E1FAFEE7D14810B5F3 +:105DE0008068342114F3F6EF10BDF8B50C000700FD +:105DF000002600281CD0CB4D2878012818D1012C72 +:105E000002D135F0C7FA0600002103201FF03EFC46 +:105E1000FEF7B7F800280DD0FFF79FFF002028708D +:105E200003201FF055FC012C02D1300035F0B6FAEA +:105E30000120F8BD35F0AEFA8446FFF77AFF00285E +:105E400004D0604635F0AAFA002013E0E868401C50 +:105E5000E860B34800680C210004000C4143B348DB +:105E60000818002105000A000B000EC0604635F03E +:105E700095FA2800002800D1FEE7FA78082A01D810 +:105E8000121D00E00C22390014F308EFA44800F0C2 +:105E900071F9A749C86B01221043C86303201FF0A2 +:105EA00017FC012C02D1300035F078FA0020F8BD43 +:105EB0001CB50024E4439F480122032101AB009458 +:105EC000FFF2CEF901980028F5D00128F3D100F0B7 +:105ED00061F9F0E710B535F05DFA04000021032008 +:105EE0001FF0D4FB9048001D00F044F99049886BE6 +:105EF000CA0D1043886303201FF0EAFB200035F031 +:105F00004DFA10BD002810B50AD00078012807D13D +:105F1000FFF72CFFFFF7DEFF17F099F8002010BD08 +:105F2000012010BD10B50178042901D0012010BD59 +:105F30007C494A68521C4A600969002901D0884797 +:105F400001E0FFF7C7FF002010BD0EB504216B462E +:105F50001970012159700221D970017819714078A6 +:105F6000587170484168491C4160FFF7B3FF012137 +:105F70006846FFF73AFF00200EBDF0B587B035F058 +:105F800009FA070081200003FDF77EFF6A4901201E +:105F9000000588600820FEF759F80820FEF762F82F +:105FA000644866492830016065490161654941607E +:105FB0005C4C0026266101220A2005920200039013 +:105FC0006148012189026B46049607C300235948A2 +:105FD0005E4AA8385EA100F33FFB002802D00120F2 +:105FE00007B0F0BD53485CA1FFF2C8F800210320C0 +:105FF00026701FF04BFBA0685A4D0068A84207D1DD +:10600000FDF7BFFF00280AD0FDF7C6FF002806D025 +:10601000FFF7E4FEA0680560FFF79FFE0DE0FFF7C5 +:10602000A5FE4148466001206B461874DE7420705E +:10603000002104A8FFF7D9FE267003201FF048FBBB +:10604000380035F0ABF90020CAE700290CD005284C +:106050000AD2042802D13348016103E0354A8000A6 +:1060600028321150002070470120704770B5FDF7AD +:1060700088FF2C4C002802D00020207014E035F05E +:1060800089F9274D060008E0E168002910D025486D +:10609000491E1430E16000F06DF86069696888425B +:1060A000F2D1300035F07AF930492F48C86070BD20 +:1060B000FEE71B4801684068814201D0012000E0F2 +:1060C000002019494A6809688A4201D0012100E08C +:1060D0000021084301214840704701001548002273 +:1060E00010B5FFF24DF910BD10B504000D48017850 +:1060F000012901D00121017020030BD51B491C4847 +:10610000C8600820FDF7A8FF0820FDF79FFF0120C9 +:10611000FFF7E3FFE00401D5FFF7A8FF10BD000083 +:10612000801300C0C8B701C0001300C0881300C0AE +:10613000802A008024FC02C0003000806F5D0000D7 +:10614000495D0000295D00007CF702C0D55C0000BD +:106150004963635461736B0049636351466C6167C3 +:1061600073000000CDAB0000FFEFFFFF8022008036 +:10617000FFFFF7FF026801231104090CEE0DCBD2DB +:1061800001000000A05F000000040000CF42260BC9 +:106190009B07491C1A4011430A009A43082A01D35D +:1061A0005940194001607047F8B535F0FDF8144CBE +:1061B000144E154D07001BE0FDF7EDFE002803D03F +:1061C00012490020087017E070680C230004000CCE +:1061D000584340190CD00178052905D28A00A258ED +:1061E000002A01D0002902D12168884700E09047A9 +:1061F000706831688842DFD1380035F0D9F8F8BDD1 +:106200004CFC02C0001300C0081300C0C8B701C096 +:1062100070B535F0C9F80500FF4803F3C1FB040071 +:1062200009D020005421083014F3DEEDFA48210093 +:106230000C3003F3DFFB280035F0BAF8200070BD06 +:1062400070B5040035F0B0F80500002C0DD020002A +:106250005421083014F3C8EDEF4821000C3003F34B +:1062600007FC0100EC4803F3C5FB280035F0A0F85B +:1062700070BD10B501F082FB002010BD7047704763 +:10628000002803D02030407D0007C00F7047002851 +:1062900007D02030427DF723C9071A40090F0A436F +:1062A00042757047002807D02030827DFB23C90744 +:1062B0001A40490F0A4382757047002806D0826849 +:1062C000C90752085200C90F0A438260704700286C +:1062D00006D082680223C9079A43890F0A43826065 +:1062E0007047002806D082681023C9079A43C90E58 +:1062F0000A4382607047F8B500250E0017002C0095 +:10630000002824D00D2189014218516A002901D0AA +:106310000D000835D169002901D00C000834330084 +:1063200022002900009704F36FFF002E06D0002DF5 +:1063300004D0280048210C3014F356ED002F06D06D +:10634000002C04D0200048210C3014F34EEDF8BD91 +:1063500070B50400006800280BD0806D002500286F +:1063600003D0FFF76DFF206885652068FFF768FFA1 +:10637000256070BDFFB589B01C00A8A605A88ECE0B +:10638000139D8EC000210A000B000E0001A84EC014 +:106390000F001298204302D101200DB0F0BDE87823 +:1063A000A9780002AE1D0843C00700D0129C002C43 +:1063B00010D0A07AC0070DD0206D002804D1FFF7BF +:1063C00027FF0028206505D0206D542208302100C9 +:1063D00014F3D8ECE878A9780002084380071ED5AA +:1063E0000A98002808D0914A09981268012190471C +:1063F0006B46187D401C18750B9905270622200056 +:1064000014F356EC8A4A0998126801219047894A88 +:10641000099812680121904702212D200155E87842 +:10642000A97800020843C00707D0122706212000E0 +:1064300014F3DAEC01212D20015569782A7809023C +:10644000E0791143000909070001090F0843E071D1 +:106450000320A07168792979000208433100208166 +:10646000223110220D0001A8E77234F0C8FB002889 +:106470000CD1200010222E3005A914F31AEC2000B4 +:1064800010223E3005A914F314EC0BE0200010227A +:1064900029002E3006F3BEFE2000102229003E30D7 +:1064A00006F3B8FE3078207320001022B11C1D3096 +:1064B00014F3FEEB31002000102212310D3014F3E2 +:1064C000F8EBA07A01210843A072002065E770B5BF +:1064D0001B210022490141188A820D21531E890186 +:1064E00041181D240B63110064010725ED014E00C6 +:1064F0003618361932828E0036187619491C04294E +:106500003362F4DB70BDFFB587B000200C001500CE +:10651000109E1F00002E039067D070783178000223 +:106520000843032841D1079801960095407901213D +:10653000022800D00021404A079823008218FFF764 +:1065400019FF002C039007D0E07901210007000F0C +:10655000E071E07A0843E072002D07D0E87902216B +:106560000007000FE871E87A0843E872002F07D0AF +:10657000F87940210007000FF871F87A0843F872A3 +:106580007078317803020B4307990F207D77F2F979 +:10659000010000009C63000000040000E7D3A3B6E4 +:1065A00080010818069020004030059028004030F7 +:1065B000049014F3A4ED050C2525BFD0DE00079848 +:1065C0003B002A002100009604F35CFEC3E7079914 +:1065D000112040010918B2790120CB799040834302 +:1065E000002DCB7104D00499049A497A0143517269 +:1065F000002C9BD00599497A014305984172B8E077 +:10660000F078B17800020843810707980D229201C3 +:106610008018002984462EDA002C31D0A07AC007D9 +:106620002BD0079800281AD0604611E0A8E301C0DB +:10663000365C365C365C365C365C365C365C365CCA +:1066400064F800045CF8000458F800042902000013 +:10665000806B002803D080308188491C8180002015 +:106660002086401EE0620798FFF73BFF0020606332 +:106670000120208701E0002C02D005990020087439 +:10668000002D02D0049800210174002F02D00020B8 +:1066900040373874F078B17800020843C0070FD053 +:1066A000002D0DD0A87AC0070AD00798002807D07F +:1066B0006046806B002803D080300189491C01812D +:1066C00007984079022829D1F078B1780002084370 +:1066D000800723D5002C21D0A07AC0071ED00798B0 +:1066E00039F032FC0700079839F055FC20377978EB +:1066F00089060BD5069909696031097CC90705D05F +:1067000080300069002801D0012100E000210798B5 +:1067100021F02BFAA07AFD210840A072F078B17820 +:1067200000020843C10724D0002D09D00006810FC4 +:1067300004980174F078B17800020843C00718D0BB +:10674000069800696030007CC00712D107980021CC +:106750001BF0E7FB0DE0002F0BD0F078B1780002C2 +:106760000843400505D5079840790328EED0012855 +:10677000ECD01AF0F1FC002C05D0A07AC00702D0B2 +:1067800007983CF072EA03980BB0F0BDF3B581B006 +:1067900000260198002866D001980D21890144182F +:1067A000606A002802D1FFF73DFD6062019839F070 +:1067B000CBFB01994979022925D105002030407889 +:1067C000C10903D1010701D4800641D52F008037CC +:1067D0003868002804D1FFF725FD0028386042D032 +:1067E0003868E061019821F0D6F9002806D0FFF75B +:1067F00019FD852189000028485134D0FF35FF3527 +:10680000AD1C68691FE003290ED1206A002803D15E +:10681000FFF708FD206207E0E169002907D0083191 +:106820000830542214F3B8EAE069002802D1FFF7D7 +:10683000F9FCE061019821F0AEF9002801D1A06ACD +:1068400002E0FFF7EFFCA062002801D00600083646 +:10685000606A002807D0E069002804D0019821F080 +:106860009AF9002802D00020C043FEBD616AE069A9 +:10687000029A083000920200019808313300FFF7B5 +:106880004CFEFEBD70B514001D0000290AD0012881 +:1068900009D0022801D0042804D10A0029002000D0 +:1068A00014F310EA70BD10222900200014F30AEA44 +:1068B0001035200008222900103014F304EA2900C2 +:1068C0000831082220001830EAE7F8B5040039F052 +:1068D00062FB200039F038FB210020314B7DF7228C +:1068E00013404B75A5680426B5432122A560125CB0 +:1068F00097070AD50D229201C56FA218D561C06F06 +:106900005062082003434B7505E0100701D4900640 +:1069100001D53543A56020003CF0A6E90020F8BD74 +:1069200030B4C279032312091201121DC27110255D +:1069300083710581C37A40242343C372CC8C5023D6 +:106940001C54837A0124234383728B8C03870B6A44 +:106950004363002314070386C362240F0B00020065 +:106960000C322900200030BC8CE7F7B58CB0060053 +:1069700039F011FB0090300039F0E6FA2121095C72 +:1069800004000A0701D4890667D5B16804221143BF +:106990000D22B1600D999201B5180129079CE450B0 +:1069A000010000009867000000040000B40970DADC +:1069B00010D1372109014718200080300B90006862 +:1069C000002803D1FFF738FC0B9908600B9800688A +:1069D000E86113E00E99012912D17721C900471807 +:1069E000300021F0E2F8002804D0FFF725FC8521D3 +:1069F00089000851852080000059A862050007E041 +:106A00006D6A28222900343101A814F3D0E901AFBE +:106A1000002D02D101200FB0F0BD0D9808350128DE +:106A200004D100202200E832287013E00E980128DB +:106A300005D1FF220121280034F020E90DE01120CA +:106A400040013018407A2870B06803210843B060D4 +:106A5000009A30320E98002804D039002800FFF741 +:106A600069FF04E00D983B00290004F3FDFE3000AF +:106A70003CF004E90020CEE710B5040002008034A9 +:106A8000206800280FD0C17B20320907090F012997 +:106A90000AD0022908D0032905D15078C00902D1B3 +:106AA0002000FFF769FC10BD51780A07FBD4890666 +:106AB000F9D4FFF7D9FB0020206010BDFFB50020FE +:106AC00091B00E0014001A9F1D00002B0B9004D0F3 +:106AD000E8790007000F2030E871002C04D0E0793D +:106AE0000007000F2030E071002F04D0F879000774 +:106AF000000F2030F8712100F37A0C311091290039 +:106B00000C310F912100300040310E300E9114F302 +:106B100000EB05047E7EFE7E7D000700002C75D014 +:106B2000002DFCD0B07A042870D2707B317B00023B +:106B300008434007A07A02D50121084301E040083C +:106B40004000A072E079F17A000909070001090FFD +:106B50000843E071787839780002084320810320E7 +:106B6000A0710E98B27A417A0120904001430E98AC +:106B70000D224172B07AB91C0301181A00190C30A9 +:106B80000A90801C14F3A8E878783978000208434A +:106B90000D28E07A04D108210843E072012003E0C7 +:106BA000F7210840E07200200A9948700A98B17AEB +:106BB0000170707B317B00020843000702D50E99FB +:106BC000B07A0872A07AC0071FD01198012180689E +:106BD000022208431043119A9060A87AC20702D09B +:106BE000EA79120711D10843A872E8793F22000917 +:106BF0000001E8710320A871787839780002084311 +:106C0000288110990F9814F3D2E806E2DBE10A908C +:106C100011980F21890140180D9030001830002D77 +:106C20000C906ED0707B317B00020843810768D5E1 +:106C30004007A87A02D50121084301E0400840003E +:106C4000A872E879F17A000909070001090F0843E1 +:106C5000E8710A98417A027A0802104328810320D9 +:106C6000A871B17A502041550121E972A87AC00774 +:106C700034D011980321806808431199886000205E +:106C80002886401EE8621198FFF735FC00206863F3 +:106C90000120288711984079022842D1119839F0B3 +:106CA0005DF90990119839F080F9099920314978F6 +:106CB00089060BD50D9909696031097CC90705D092 +:106CC00080300069002801D0012100E000211198E6 +:106CD00020F055FFA87AFD210840A8720D980069A0 +:106CE000FF302130C07F002801D001200B900A988E +:106CF0000C9B417A007A09020143F07A0F9AFFF760 +:106D0000CBFD002C6BD0707B317B000200E0C2E039 +:106D10000843C10763D04007A07A06D50121084384 +:106D200005E0A87A02210843D7E740084000A07296 +:106D3000E079F17A000909070001090F0843E071C1 +:106D40000A98417A027A0802104320810320A07138 +:106D50000E99B07A0874E07A02210843E072A07AB2 +:106D6000C0072AD0707B317B00020843800614D50F +:106D70000A9920000A7820300274497841740A99EF +:106D80000422891C0C3013F3A8EF208E002804D1B4 +:106D9000E06A002801D1401EE062707B317B000276 +:106DA0000843C00603D5002060630120A8BE6B2104 +:106DB00001000000946B0000000400004066056EB6 +:106DC00020871198032180680843119988600D98E5 +:106DD00000696030007CC00701D101200B900A9847 +:106DE0000C9B417A007A09020143F07A109AFFF76E +:106DF0005DFD002F7ED0707B317B00020843410592 +:106E000078D54007B87A02D50121084301E040084F +:106E10004000B872F879F17A000909070001090FFA +:106E20000843F8710A98417A027A080210433881BF +:106E30000320B871B17A5020C155F87A4021084337 +:106E4000F872B87AC00724D0707B317B0002084307 +:106E5000800614D50A9938000A78203002744978DF +:106E600041740A990422891C0C3013F340EF388EC8 +:106E7000002804D1F86A002801D1401EF862707B16 +:106E8000317B00020843C00603D50020786301204F +:106E900038870A983A00417A007A09020143F07A69 +:106EA0000C9B0C32FFF702FDBDE00021099005A804 +:106EB0000A91FF4F8ECF8EC000210A000B000F00F9 +:106EC00001A88EC0707B317B00020843810700D58A +:106ED0000A95C00700D00A940A9800287DD00A9825 +:106EE000807AC00712D00A98006D002807D1FFF7FA +:106EF000ADF900E094E00A990028086506D00A98E8 +:106F00000A99006D5422083013F35AEF11990124A5 +:106F100049792000022900D00020717B327B0902D0 +:106F2000114389071FD5002809D0119810218068C6 +:106F30006B46084311998860187D401C18750A98A3 +:106F40000521C172DB491198062241180A9813F3F2 +:106F5000CEEE1198119A8068022120430843906078 +:106F60000A9820304173707B317B00020843C007D0 +:106F70000BD00A991220C8720A98062113F352EF17 +:106F80000A982030447301200B900A98F17AC07956 +:106F9000090700090001090F08430A99C8710A99F5 +:106FA000032088710998417C027C08020A991043E9 +:106FB00008810999102201A833F03FFE00280DD165 +:106FC0000A9810222E3005A913F390EE0A98102289 +:106FD0003E3005A913F38AEE0CE035E00A980999D2 +:106FE00010222E3006F334F90A98099910223E3007 +:106FF00006F32EF90A98B17A017309990A981022BA +:1070000012311D3013F372EE09990A9810222231C1 +:107010000D3013F36CEE0A980A99807A2043887237 +:107020000B98002803D0119800211AF08EFF1AF057 +:10703000A7F8002D05D0A87AC00702D011983BF020 +:1070400028EE002015B0F0BD0120FBE7F7B582B0B7 +:10705000002702983E00019738F08AFF0299029BB0 +:107060000D22497992019C1802292AD1050020306D +:107070004078C10903D1010701D480064AD52F0009 +:1070800080373868002804D1FFF7E0F8002838601E +:107090000ED03F68E7610298083720F090FD002885 +:1070A0000AD0FFF7D3F8852189000028485103D181 +:1070B0000020C04305B0F0BDFF35FF35AD1C686949 +:1070C00023E003290ED1206A002803D1FFF7BEF880 +:1070D000206207E0E169002907D008310830542216 +:1070E00013F36EEEE069002804D1FFF7AFF8002833 +:1070F000E06101D0E7690837029820F060FD0028C0 +:1071000001D1A06A02E0FFF7A1F8A062002801D037 +:1071100008300190606A002804D1FFF797F8002832 +:10712000606201D0666A0836019A0092049902985A +:1071300033003A00FFF7CCFCBCE770B505000C004B +:107140000026081D30F0AFFF002815D1201D30F0BB +:107150009BFF002810D1F120800029180622201D55 +:1071600033F06BFD002807D0201D38F07FFF0500AD +:1071700001D1012070BD0126220031002800FFF757 +:1071800065FF70BDFFB589B004001F00129E002E80 +:1071900077D0002CFCD02000403008902338079096 +:1071A00010380690401E059010300490083003906F +:1071B0003801C01B0019029020003E3081B20E5BE6 +:1071C00001000000906F00000004000013BCD60214 +:1071D000FF29019004D1E07900090228E2D0E4E01F +:1071E0000229FCD1FF209D303070000A70700A2007 +:1071F000B0700020F0700B990622301D13F380ED63 +:10720000E0790007000FF072E07A410602D5012113 +:10721000890204E0800701D5012100E002213173D9 +:10722000090A7173E07903071B0F30001900103051 +:1072300013F382EF0504323232323100042F2AD2A6 +:10724000B7720899097AB94208D1717B327B090279 +:107250001143082211433173090A71730299497B62 +:10726000002901D1052100E00D21B173090AF17354 +:10727000F17BB37B0A0202991A430E3113F340EDFE +:10728000F078B2780102F07B1143B27B0002104328 +:107290000818801C31E02AE135003035032944D13B +:1072A000217BB1722021070081730020F873300028 +:1072B0000E3001991022009013F322ED10223000BD +:1072C000203003E02C64000029020000079913F32A +:1072D00018ED06991022280013F312ED0199009879 +:1072E000102205F3BFFFF078B17800020843F97B64 +:1072F000BA7B0902114340181230B070000AF070D6 +:10730000A07AC00708D0707B317B000208430421BB +:1073100008433073000A7073F078B17800020843B4 +:10732000001D0004000C0DB0F0BD08990A7CB2727B +:107330002289B275120AF275228E21001378B37376 +:107340005278F27304222C3113F3DAEC00213175F8 +:107350007175E07901073000090F1830012911D14A +:107360002021B1750021F1750599102213F3C8ECA5 +:10737000300004990822283013F3C2EC0822039944 +:10738000280005E02189B175090AF175228905995E +:1073900013F3B6ECF078B2780102F07D1143B27DC0 +:1073A0000002104308180A30A7E7E079351D0007EE +:1073B000000F3071000A7071FF20401C3070000A0D +:1073C00000227070B270F270E07A410602D501209E +:1073D000800204E0800701D5012000E00220A870AF +:1073E000000AE870E07901071ED1A81D042F7ED2A3 +:1073F00021892971090A69710899097AB94202D16A +:107400000121417000E042700770029922890E311B +:10741000801C13F376ECF178B07809020143891CE3 +:10742000B170090AF17041E00007000F012813D183 +:10743000202028710020687105991022A81D13F3DF +:1074400060EC280004990822163013F35AEC082245 +:10745000280003991E300AE0022801D0042809D12F +:10746000102028710020687105991022A81D13F3BF +:1074700048EC1BE0032853D120892871000A687169 +:10748000207BA8710120E871AF1D07991022B81C5C +:1074900013F336EC380006991022123013F330EC57 +:1074A000380001991022223005F3DCFEA07AC007D3 +:1074B00008D0E878A9780002084304210843A8709E +:1074C000000AE870F178B2780802697910432A79E5 +:1074D000090211434018801D020AB070001D050406 +:1074E000F270E0792D0C000718D0741900E017E055 +:1074F000FF2121312170090A61700621A17000214C +:10750000E1700B990622201D13F3FAEBE178A278C3 +:10751000080210432D1D401905042D0C280002E718 +:10752000002000E7FFB581B0002501980A9EC079D0 +:10753000000718D1042B16D3019F002440370120E7 +:10754000797AA04001420AD0230601A8009607C814 +:107550001B0EFFF721FE3618281805042D0C641C9D +:10756000042CECDB05E001A8009607C8FFF714FE29 +:1075700005002800A8E5FFB581B00024050016002D +:1075800080681F0040051DD5287901281AD00228DF +:1075900018D1280038F0F6FC002E13D1002811D0A5 +:1075A0008030006800280DD0F90745D00B9AF121F2 +:1075B000890000926A18029908300023FFF7ECFD59 +:1075C000040039E0F049B8076E180D21D41851FEB7 +:1075D000010000008C73000000040000AC79F3B1DE +:1075E00089016D1800280EDA686A00280BD00B9A02 +:1075F00000920A9B029908303200FFF79DFF0B9919 +:10760000091804000B91F80710D0E86900280DD084 +:107610000B9A00920A9B029908303200FFF78CFF08 +:107620000B99091820180404240C0B9178050DD52A +:10763000A86A00280AD00B9A00920A9B0299083087 +:107640003200FFF779FF20180404240C200045E5E0 +:10765000FFB587B0FF2100261F00089CD04B3500E6 +:107660003000062C059607D202000798019700917A +:10767000FFF78BFF06007BE0140071E0C848049020 +:10768000FF200390002002906078217800020843D8 +:10769000C11FF9390FD1039901970091E179A079C0 +:1076A0000B020343029A07980021FFF76EFF0500C3 +:1076B0003F18301844E00100FF399D3942D1079846 +:1076C0000690E078A17800020843062829D3201DFF +:1076D00030F0FDFC002814D1201D30F0E9FC00281A +:1076E0000FD10798F121890041180622201D33F09F +:1076F000B8FA002805D0201D38F0CCFC06900120F7 +:107700000290E178A278080210430A2809D3A07AEF +:107710000390627B237BA2481102194300D008002A +:1077200004900698002809D0039901970091049BC2 +:10773000029A06980221FFF728FF05007F197019A9 +:107740000604360CE078A17800020843059983000E +:10775000091D41180904090C18180419143405915D +:1077600008990598884203D219208001864285D362 +:1077700030000BB0F0BD70B5060004680834E07945 +:1077800003071B0F934201D0012070BD000712D1E7 +:10779000042910D2250040350122687A8A4090439E +:1077A00068720801401A00190C300F2113F378EBAE +:1077B000687A002804D13068FEF774FD002030603C +:1077C000002070BDFFB581B0040000201D000A9F9D +:1077D0000090A06800264005002827DA20790128BB +:1077E00024D0022801D0032820D1200038F0D4FB77 +:1077F0002179032902D16179022917D1002F15D1EE +:10780000002813D080300700006800280ED0E90758 +:1078100052D0C17B0A070399120F8A4202D0039902 +:10782000FF2949D1FEF73EFD3E6045E00D2102985B +:1078300089016718FF281BD15A48854218D1786AF8 +:10784000002802D0FEF72EFD7E62F869002808D0DD +:10785000FEF728FDFE61386A002802D0FEF722FDFF +:107860003E62B86A002827D0FEF71CFDBE6223E006 +:10787000786A002808D0A80706D5D9208000039A86 +:1078800002992018FFF777FFF869002808D0E80769 +:1078900006D0D7208000039A02992018FFF76BFFCB +:1078A000B86A002808D0680506D56D20C000039A84 +:1078B00002992018FFF75FFF00980FE4F7B586B034 +:1078C000002707983E00062864D314005EE0FF20DE +:1078D0000490039000200290607821780002084311 +:1078E000304DC11FF93901D1012643E00100FF39B4 +:1078F0009D393FD106980590E078A17800020843B1 +:1079000006282BD3201D30F0E2FB002814D1201DC7 +:1079100030F0CEFB00280FD10698F12189004118E4 +:107920000622201D33F09DF9002805D0201D38F0D7 +:10793000B1FB059001200290E178A2780802104383 +:107940000A280BD3A07A0490E07A0390617B207B15 +:107950000D0205431248054000D1124D059800283C +:1079600008D0029A0092039A049905982B00FFF719 +:1079700029FF0643E078A178000208433F1DC119A2 +:1079800083000F0418183F0C041914340798874219 +:107990009DD300E00126300009B0F0BD29020000AF +:1079A00003040000FFFF0000002810D00D21890112 +:1079B0004218916B00290AD00B695B1C0B61916B1B +:1079C000CB685B1CCB60916B0A6E521C0A6611215E +:1079D00049014018C17980221143C171F8219A21CF +:1079E000010000008877000000040000FFA320DDF4 +:1079F000704770470548142110B513F332EA044864 +:107A00000121017000218160C16010BD60FC02C0D5 +:107A1000E0B701C070B538F0F0FA040033F000FDB3 +:107A20000500206C02F305FA00212800216433F0E0 +:107A3000FBFC70BD70B50D00080038F0B7FA060009 +:107A4000280038F0DAFA04002C34A1793000227AC8 +:107A5000E830042905D86030407C824213D30F22DD +:107A600004E06030807C82420DD31022022901D0D4 +:107A700001290DD120002030017E012908D1217279 +:107A800002210176A1790022280000F02CFA70BDB5 +:107A9000FF48291828002AF087FE0A20A07170BD2F +:107AA00038B5040038F0A9FA020020320168937C4E +:107AB000E8315D1E032D01D8496F03E05B1F032BE6 +:107AC0001CD8896F137D002B05D07D23DB009942E4 +:107AD00000D30B001900127A012A04D1ED4A914219 +:107AE00000D30A001100002200927D22D2004A43F6 +:107AF0000300E94840332100FEF704F938BDF8B52A +:107B0000002844D0002942D0050060352A7CEB7B58 +:107B100012021A431206120E84187134DD271C203B +:107B200027706070DD480278A2704278E270807839 +:107B30002071092060715020405CA0710A8E228162 +:107B4000CA6A20000A3004C0060010220C3113F368 +:107B5000ECE8297CEA7B090211436278300089183D +:107B6000891C0A0AE9732A7410300822511A4C073A +:107B7000640F0CD00770611E401C13F39CE9287C35 +:107B8000E97B000208430019E873000A2874F8BD75 +:107B9000F7B582B01400060038F02FFA0500300067 +:107BA00038F004FA07002200300001A9F9F732FF8B +:107BB00004002AD0F0686061208907210019017350 +:107BC0000198722113F376E9F12080003218B04851 +:107BD0003118019810F374FA2C35687901231A00D2 +:107BE000062800D000222879000704D4E037387A2C +:107BF000000700D40023A8788006C10F019810F375 +:107C000025FD039801990160200005B0F0BDF3B592 +:107C100087B00A000025079805A9FFF7B9FF0028DB +:107C2000089002D1012009B0F0BD079838F0E5F9BD +:107C30000490079838F0BAF90700049804002C342F +:107C4000200000F0AAFD20690290E06803907320F4 +:107C5000C0003A180092A07839008006C00FC20315 +:107C6000E8310598803202AB069103F362F805987B +:107C7000069B010060310A7CC97B16020E43372146 +:107C800009017A18A11C03F305FA05980200603077 +:107C9000017CC77B0B023B43991B182902DD183975 +:107CA0000D042D0C049980310969002911D0079920 +:107CB0000D26B60189198E6A002E0AD0002D03D038 +:107CC0005B1BC3731B0A0374896A10000831FFF73A +:107CD00016FF21000598221D283103F308F90598A5 +:107CE000017D4B0738210A5D21005B0F183110F32D +:107CF00023FA01000898F9F742FF002093E7F3B553 +:107D000089B00A000700002005000390380007A989 +:107D1000FFF73EFF00280A9002D101200BB0F0BD12 +:107D2000380038F06AF90600380038F03FF906905C +:107D30000D20800138180890406A340014302C342B +:107D40000290200000F029FD20690490E068029A6A +:107D500005900092A07811218006C00FC003C901D0 +:107D600042180798211D04AB02F3E3FFC037B8683F +:107D700001894018A1780A0708D504220092484BCF +:107D80000822DD210BF3D2FF039009E0890607D515 +:107D9000002200920822302100230BF3C7FF0500C8 +:107DA000039A07982B00A11C03F334F9002838D05C +:107DB000A078800639D50798069A03006030017CC8 +:107DC000C07B0F020743069837210901411800259F +:107DD000E832180003F324F8079802006030017CB1 +:107DE000C37B09021943CB1B182B02DDDBF6252BC5 +:107DF00001000000847B0000000400000BCC5569EA +:107E0000183B1D042D0C80363369002B0BD0002D40 +:107E100003D0491BC173090A01740898816A1000D4 +:107E20000831FFF776FE21000798221D283103F361 +:107E300068F8002803D10A9813F3DEFC77E7079867 +:107E4000017D4B0738210A5D21005B0F183110F3CB +:107E50007DF901000A98F9F79CFE002068E77FB5DC +:107E600006000D0038F0D3F804002A00300003A902 +:107E7000FFF798FE050002D1012004B070BD0D206F +:107E800080013018466A2C341436200000F08FFC34 +:107E900020690190E0680290202130000FF3F6FB8A +:107EA000012209E029020000B80B0000CD77000094 +:107EB00047F731004EF731000398D202211D01AB84 +:107EC000009602F340FF039A203410006030017CDA +:107ED000C37B080218435F300104207E9073090CB5 +:107EE0000320D07308020B0A18431074000A507460 +:107EF0002800F9F74EFE0020BFE7F7B582B00C006E +:107F0000029838F084F80700029838F059F868466B +:107F1000FDF77FFD386C002802D00298FFF784FD42 +:107F2000E00702D1641E2406240E3D002035AC7407 +:107F300002991122287A52018E1801280AD180371D +:107F40003878002806D1718A029801220DF0E9FAEA +:107F5000002426E0012C04D104990298FFF77FFF4A +:107F60000EE0032C04D104990298FFF7D2FE07E03B +:107F7000052C01D0072C1FD104990298FFF751FE60 +:107F8000040002D1A87C401CA87402980FF0B4FC35 +:107F9000002804D0718A029800220DF0C2FA002C49 +:107FA00002D1287D401C28750298FFF783FD6846A2 +:107FB000FDF74CFD200032E60498002802D004981A +:107FC00013F31AFC6846FDF741FD012027E610B5C2 +:107FD00013E0200038F01BF8A1682C30C90407D545 +:107FE00080790A2804D1002207212000FFF785FFAD +:107FF000E279A179200018F006F80400E9D110BD5B +:10800000FF4910B50988C1840121818400210162E2 +:1080100010210FF33BFB10BD70B5050037F0D0FF0A +:108020004B210400C9004018F12189006A180100A1 +:10803000FF31FF304131193003F377F82120005D23 +:10804000800611D50F208001281800696030007C5F +:10805000C00709D07720C0002018FFF7D1FF012208 +:1080600000212800FEF7BDFC002201212800FEF7B8 +:10807000B8FC70BD70B5050037F0A2FF060033F004 +:10808000D9F904000F2080013118CA6A002A0ED0E5 +:10809000521ECA620BD1886AC8622800FFF7BCFF73 +:1080A000200033F0CBF92800FFF791FF70BD2000CE +:1080B00033F0C4F970BDF8B5050037F081FF070053 +:1080C0000400F120F8378000732137233E002A187E +:1080D000C9001B0141366118E01803F326F80D2191 +:1080E00089016418E069012809D1A820415D2800B0 +:1080F00033003A0088300FF389FA0020E061F8BDC0 +:10810000F0B50600A9B04569280037F080FF0B9054 +:10811000280037F055FF0A900B980CAA04000D2098 +:1081200080012818476A30892C3486190A982890CB +:108130003000633041781437891C2FF0F5FB289804 +:108140000122E0308446807A0990289807A903002C +:108150008033D86E08900E98049006920591604680 +:10816000C089189AA11C039202910190986E009008 +:10817000089B099A210028002AF0D8FF012804D181 +:108180001121280000F007FB24E00A9B6179FF33EE +:108190003A330120062900D00020020020003900D7 +:1081A000203128300492039122003100029095483A +:1081B0001832113100911400291801922A00180078 +:1081C000AC323B0002F303FF210030000FF392FFBB +:1081D000002802D1012029B0F0BD2800FFF724FCBF +:1081E0000B980021203001750A0003212800FFF7B9 +:1081F00084FEF0E7012805D0022803D02370491639 +:1082000001000000807F0000000400005816860571 +:10821000FF38401E01D10620704700207047FFB58F +:1082200083B0060000250D990C98029111780191F8 +:10823000077804993020012900D0DD20307004989F +:10824000002806D075490322684612F382EDB41C5B +:108250000AE073490322684612F37AED704904225A +:10826000B01C12F376EDB41D012020700020607068 +:10827000A41C03222000694612F36AED002F04D0EB +:10828000380001F395FC05042D0C2806000E03F3BD +:1082900005FBE0700698241D20700698000C6070A5 +:1082A000A41C002515E06B46187820705878607083 +:1082B0009878A070019801F37BFC07043F0C380606 +:1082C000000E03F3EBFAE0700198241DB8436D1C17 +:1082D000019006988542E6DB0E9820700E98000CFF +:1082E0006070A41C002514E06B4618782070587844 +:1082F00060709878A070029801F35AFC0104090C90 +:108300000800FFF781FFE0700298241D88436D1C70 +:1083100002900E988542E7DB049800282ED00F9833 +:10832000002827D00F98017821704078607010984D +:10833000A41C20701098000A6070A41C002509E09D +:1083400011991022200012F304ED1198103410300E +:108350006D1C119010988542F2DB0F980078C009CF +:108360000CD02E490322200012F3F2EC0620E0701C +:10837000241D03E0002020706070A41CA01B0004DA +:10838000000C811E717007B0F0BDF0B587B004001D +:108390008C4696460CAD0FA8E0CD07C8009503ADFE +:1083A0000297019607C5200072466146FFF737FF26 +:1083B0000004000CE7E7F0B50E000700002189B0CB +:1083C0001BF00BFDFF229132512307A908A809F0E9 +:1083D000B2FD002836D0380037F0FCFD07990022A6 +:1083E000103103000D00E8330392049205921A89BC +:1083F000D988009302920191B07808358006AC1CB0 +:10840000C10F321D20000123FFF7BFFF2078287025 +:10841000000A07E0460200042902000047F7310085 +:108420004EF7310068706078A870010AE97007990A +:10843000001D8872000AC872FD48089A3918380071 +:1084400009F053FE03E4F8B506004769380037F039 +:10845000E8FD050004000D2080013818406A2C3525 +:108460001430009030892900801918310FF34CFE28 +:10847000002801D10120F8BD0098012140300026DC +:10848000818000983200066431003800FEF7B3FAAC +:10849000002804D00121380000F087F9EAE738000D +:1084A000FFF7CCFA3420065520682030407880064B +:1084B0000DD50F208001381800696030007CC0079E +:1084C00005D080342069002801D0012100E000217E +:1084D00038001FF090FBA878800607D529003800E7 +:1084E000FFF769FF0A20A8710020F8BD00220521CE +:1084F0003800FFF70CFDF8BDF8B5018946690F1883 +:10850000300037F08EFD0400010005002C344431AA +:1085100038000FF3F9FD002805D11121300000F0DB +:1085200044F90120F8BD3000FFF788FA002020351B +:108530002875A079062803D121003000FFF73BFF02 +:108540000A20A0710020F8BD70B50E00C1790500A9 +:10855000807937F076FD06E0AC4206D1E279A17968 +:10856000200017F05AFD040018E0200037F059FDF4 +:10857000010020318A7CD207F0D0097A002905D089 +:108580000129EBD18021095C0029E7D02030817CD2 +:1085900032002000FFF7BBFC012070BD002CDBD1B6 +:1085A000002070BD10B5040037F014FD002811D074 +:1085B0006179E83002290DD1A16849070AD5502117 +:1085C000095C002906D04089C10703D1800701D486 +:1085D000012010BD002010BDF8B50E0032F034FFB0 +:1085E000002E009027D0300037F0F4FC040022D099 +:1085F0001B20400125182878002701281CD00228BC +:1086000016D1E820005D400709D53000BCE109F42F +:10861000010000007C830000000400000E3FE545DF +:10862000FFF7CAFF002804D00F2080012018816ABC +:10863000C1620D20800120182F7087623900300040 +:1086400000F0B1F8009832F00DFFF8BD2F70F9E797 +:10865000F1B582B0029837F0C7FC0D218901040002 +:108660004518686A00283CD032F0F8FE01901B20C3 +:108670004001261830780127002833D001282DD159 +:108680000220AF623070E86A01F3F1FBDB200022C8 +:108690008000231800926C4A6C480299FDF750FB49 +:1086A000019832F0DFFE0298272129F0F7FEE8203A +:1086B000005D40070CD50298FFF77EFF002807D029 +:1086C0000F21890100206118C8620298FFF7B8FCE9 +:1086D000A86A01040298090C00F065F8019832F0CC +:1086E000C1FEFEBDDB200022800023180092564A06 +:1086F00056480299FDF724FB3770EFE770B5050087 +:108700004669300037F097FC0400B068C00407D514 +:10871000288941194879400703D53000FFF798FFB1 +:1087200070BD200009312C3000F05DF80028F7D032 +:108730002034A07C022803D12800FFF7F5FC70BD8F +:10874000042803D12800FFF788FE70BD062801D059 +:108750000828FAD12800FFF7D9FE70BD3EB5FF22E8 +:108760000400062101A832F0D0EA00220092200085 +:108770000E2301AA01A90BF057F832F06FFE050095 +:10878000E179A07937F067FC07E020002AF025FBAB +:10879000E279A179200017F04AFC0400F5D1280005 +:1087A00032F060FE3EBD13B5040037F01DFC284BCF +:1087B00020001C684C21022301AAA0471CBD70B5F3 +:1087C00004000D00FFF744F91E482A00211820007C +:1087D0002AF008F870BDC168491CC16002D1016966 +:1087E000491C016170477CB504000D00042201A8FA +:1087F00012F3B8EA0422291D684612F3B4EA01987C +:10880000FF21090202000A40030612029D1803001C +:108810000A0213401B0AEB18000E1818236998422D +:1088200018D100980140030609025B1801001140AD +:10883000090A5918000E0818E16888420AD1012077 +:108840007CBD0000290200000087930349830000DB +:1088500088F800040020F3E7FD4900201422424379 +:1088600052189268002A01D000207047401C01284D +:10887000F4DB01207047F0B58C001025AC431501E6 +:108880002C43F44DF44E2C400125AD05651900270D +:108890008400A6193560F04D403564192360EC4C16 +:1088A0000501583C2C19402627736673E84EC9070A +:1088B000583E73516360E37BC90F5B085B000B4359 +:1088C000FD210B40D107890F0B43042119430228D6 +:1088D000E37302D31900FB200140E173A773A76083 +:1088E000F0BDDE4870B5012301688A09C1699201B3 +:1088F0001A43430499431943C1610260D849416155 +:10890000D8494162C162D8498160D849C160D04D1F +:108910000024283D1420604300224019402113F315 +:108920000BF8641C022CF5D3C94D002414206043BD +:1089300000224019402112F3FFFF641C012CF5D3E3 +:1089400070BD70B5FCF75DFEFFF7CBFFC84D00248E +:10895000E000001B0002002143190A002000FFF77D +:108960008AFF641C2406240E032CF1D370BDF8B5D5 +:1089700005000020009032F071FDB54E0700002484 +:10898000283E14206043801913F306F808E041697B +:10899000A94204D1380032F065FD0120F8BD00681D +:1089A0000028F4D1641C022CEBD3380032F05AFDBD +:1089B0000098F8BDF3B589B00998A74980000890E0 +:1089C0004018006A4022C101C90D571A09990406CE +:1089D000CB00A74A240E5B1A14201B0248439A18A6 +:1089E000250002940229079255D299492839401846 +:1089F000069012F3D1FF06004AE070690A99884296 +:108A000045D130898019006F0490002003970190B0 +:108A10002BE01C2161430798049A411825A1645951 +:108A20000100000078870000000400005DE53629A1 +:108A3000486890420BD1009636680099069838F045 +:108A4000CFFC0098002132F001FD7F1E1AE01C22AD +:108A50006A43079880181C2212F3F8E900210800E5 +:108A6000402D00D0681C05062D0E402C00D0611C46 +:108A700001980C06401C240E0006000E019003997C +:108A80008842D0D30399019888420BD1009636686A +:108A90000099069838F0A4FC0098002132F0D6FC2A +:108AA00000E03668002EB2D14EE00999891E0129F6 +:108AB0004AD26C4940182838059012F377FF060017 +:108AC00040E070690A9988423BD130898019603052 +:108AD00012F394EA04900020039701902AE01C21ED +:108AE00061430798049A4118486890420AD1009659 +:108AF00036680099059838F073FC009834F036FA1F +:108B00007F1E1AE01C226A43079880181C2212F369 +:108B10009EE900210800402D00D0681C05062D0E9E +:108B2000402C00D0611C01980C06401C240E00064D +:108B3000000E019003998842D1D301990398814294 +:108B400000D13668002EBCD11C2302993C00594349 +:108B50005C4307982200411812F378E9099800F065 +:108B600095F8424A01200899C007384340328918D5 +:108B7000086209983B49079A000158390A50079A38 +:108B8000401812190021426001734021C91B417332 +:108B90000BB0F0BDF1B582B0FCF73DFD002401271C +:108BA000BF073248A1000E183568280038433060EE +:108BB000306A4000FCD532F05BFC0190680704D4B9 +:108BC00020060299000EFFF7FFFEBD4335600198B5 +:108BD00032F052FC641C032CE3D3FEBDFFB583B01E +:108BE000FCF719FD00262148B1000F183868012153 +:108BF0008907019008433860386A4000FCD514208A +:108C0000184970432839401812F3D0FE04001E485A +:108C100006990818029017E0208905990519287807 +:108C20004007400F88420ED1286F0299801D06220E +:108C300032F049F8002806D104997C204155069865 +:108C4000290034F0A5F92468002CE5D10198012110 +:108C5000890788433860761C3606360E022EC2D34A +:108C600007B0F0BD805C0400FFFF00FE00A1009093 +:108C700000A0009058DA01C00700070F40A0008054 +:108C800050E80080C0E701C02902000081000348CD +:108C900008180168012211430160704700A100908B +:108CA000FF4900200872487260390867C866486743 +:108CB000FF31491C8860C860B0398864C864886521 +:108CC000C8658866C8660867486708644864886736 +:108CD000C8678031086048607047FEB5040032F014 +:108CE000C7FB00900120102C04D0202C02D0402C77 +:108CF00000D00020EA4960390A780E00303EA242D6 +:108D000010D1E84F8200921953697D6EAB4209D1B0 +:108D10009268BB6E9A4205D14200921952887B8AB2 +:108D20009A4264D04200921902925288D20702D02D +:108D30007D25ED0000E0012580008619B2686B46B4 +:108D40001004000C120C9880DA807769D449381A24 +:108D500068436039002A886010D1102C07D1D248AE +:108D6000D249784312F358ED6B46D8800EE0CE48D6 +:108D7000CF49784312F350ED6B46D880402C05D193 +:108D8000FAF739F87D23DB00584303E06B46D888B7 +:108D9000381A6843C2496039C86070690A00C4491A +:108DA00068431161C3495060091A1162C0494942C0 +:108DB000401850616006400F0BD002984088010AAD +:108DC00002D0000A684300E0BB485064BB4890648E +:108DD000D064FFF765FFBA4901200860B1481470FC +:108DE00071694166B168816602994988418200983B +:108DF00032F042FBFEBDAA48002101724172704769 +:108E0000F3B581B00D00A800A54CA64E603CB1782A +:108E10000719B8688D4209D172780199914205D13C +:108E2000F16E884202D1616B00291ED1764084F632 +:108E300001000000748B000000040000A98A439D1B +:108E40009C4A903A116A401AC10F08184110616398 +:108E5000506A814200DC01006163009100980321A7 +:108E600012F3F6E800222264E06300992163A06314 +:108E7000E270A270B868F066B57001987070FEBDBF +:108E800070B504268C4C944D00280ED0F9F759FF8C +:108E9000002803D0F9F7F3FF002805D0E088401C34 +:108EA000E080E868B043E86070BD2089401C208104 +:108EB000E8683043F7E78048C078012800D00020F8 +:108EC00070477D4810B5C07801282BD00020FCF7F2 +:108ED000BAF80120FFF7D4FF764C603C20784006BA +:108EE000400F1FD100F3F6FB734A803251641064C7 +:108EF00022005032D36B926B801A9941A16AE26AC8 +:108F0000401A521A824200DB10006268511A8142F4 +:108F100000DC0800216C081870492064884200DDDC +:108F20000100216410BD402010B5F9F75AFC00285B +:108F300007D06048008B000A02D0032013F083FDA5 +:108F400010BD67490020086066490880032013F0BF +:108F50007AFD032013F0CCFA10BD564910B56039E4 +:108F60000A6D82420DD1002008650878012801D0E1 +:108F7000022807D14F48012189020183222013F0E2 +:108F8000B7FA10BDFFF79DFF4B490120C87010BD17 +:108F9000484910B560394A6D824219D10020464ACD +:108FA00048650320D07008784006400F10D0414833 +:108FB00001218902040060340183A06A002804D1E1 +:108FC00002F067FDA062FCF709FB222013F090FA83 +:108FD00010BD70B5374E603E30784006400F24D14A +:108FE0003548C078022820D1324C08212000703842 +:108FF0000C2261568256914217DA32F043FA05008C +:1090000008F0A8FA00280DD0207A401C2072317890 +:10901000022901D0082905D100F35CFB254A103A4A +:1090200051631063280032F031FA70BD10B5F9F7C2 +:10903000A4FF002806D02C48007C00280AD006286F +:1090400008D005E01C48C078002803D0042801D0CF +:10905000012010BD002010BD70B50D00154C603C06 +:10906000A16D814207D10020A06520784006400F05 +:1090700002D0FFF758FF70BD13F0F0FC0028FAD0C3 +:109080000221280001F051FD0028F4D0FFF7CEFFA7 +:109090000028F0D02078074C6034042826D1FFF750 +:1090A00098FF606A0028E6D00021280011F0F4FA49 +:1090B00070BD0000285D0400783704001027000010 +:1090C00050C30000204E00006EBE0000983A000021 +:1090D000B80B000024B801C0009000906079FEFF3A +:1090E00014070004A0060004A84204000828DFD1E9 +:1090F00008F0ECF9002802D0FFF76BFF70BD606A42 +:109100000028FBD0280011F0E6FA70BDF94870B5D0 +:109110000024007812F34CFF0500092012F348FFE9 +:10912000430018188008854200D20124F1482038F5 +:10913000C07F012800D90124200070BDF8B50027A8 +:10914000EC4AED4CE03AD16D2600803E814275D16B +:10915000EA4BD86804218843D8601000C7655030B6 +:10916000C36C826CC16D806D851A306B9941401C57 +:109170003063E91725606160A268E368A81A994125 +:1091800003D261682068E160A06022692068636999 +:109190006168121A8B4103D26168206861612061A5 +:1091A0002268206A6368616A80185941616220629E +:1091B000326B3B0011F3C8EBCE4FE161E03FA061A1 +:1091C000786C7D22D2003C00811A0A23C034A94267 +:1091D00027DA797892008900C9198C468968891A3A +:1091E000A94210DA607F002802D0401E60774BE071 +:1091F00063777069002847D1B562706A401C70625D +:109200000120A06140E06377F169BD4A40186146E2 +:10921000786489688918884200DB08007864F06205 +:1092200032E0F1698C46411A8A1AAA422CD9637736 +:10923000227F002A03D0521E227722E06FDC8FA209 +:1092400001000000708F000000040000FA5090F14F +:109250003BE07A78AF4B9200D2199268D2189042D4 +:1092600005D1B1696246891A4018786400E07964D2 +:10927000796CFF20F530814200DD08007864FFF74B +:109280004FFF002805D0A448796C814200DD08001A +:109290007864306A2077786CF06201E0306A207779 +:1092A0007878002803D0022801D0032804D1E06A8E +:1092B000002801D098487864B86D002802D1706BFE +:1092C000401C7063252013F01DF9F8BD10B58E4CBD +:1092D000E03CE06D00F3E9FD0020E06510BD8A4947 +:1092E00070B5E0390A6E824220D100260E66C86D44 +:1092F00000281BD00C005034A26E206FE36E616F0B +:10930000851A994100F3F0F9A26CE36C801A994137 +:10931000002D08DCFF22F532801AB14103D308F09A +:1093200029FB002803D0272013F0ECF870BDFFF7CD +:10933000CDFF00210800FFF70BFF70BD10B5724C88 +:10934000E03C606D00F3B1FD0020606510BD6E492A +:1093500010B5E0394A6E824217D100204866486D48 +:10936000002812D008005030C36F826F803003C8CD +:10937000801A9941002805DC684869490068096835 +:10938000884203D9282013F0BDF810BDFFF7D6FF9F +:1093900000210800FFF706FE10BDF7B582B01400EB +:1093A000594EE03E706840187D218002C90012F3DA +:1093B00048EA0700002505F382FF317838001029BC +:1093C0000AD17178890089198969002904D00D00B2 +:1093D000002C03D140190AE0002C08D0716849190B +:1093E000A14204D37D21A002C90012F32AEA00227F +:1093F000454B009202004B480299883BFCF7BEFCAB +:1094000000F372F9414A803AD167906705B0F0BD28 +:1094100070B532F041F83C4D0600E03D286D002467 +:10942000002802D000F341FD2C65686D002802D0B1 +:1094300000F33BFD6C65E96D080002D000F335FDDB +:10944000EC65286E002802D000F32FFD2C66686EB4 +:10945000002802D000F329FD6C66300032F020F8BD +:1094600070BD70B532F018F805001DF029F9040040 +:1094700007D02D4800218A008258491CA41A0929C6 +:10948000F9DD280032F00CF803F076F8002815D04A +:10949000264801694069814210D1002C0ED100207C +:1094A00033F01CF9002809D133F018F9002805D150 +:1094B0001F480078002801D1012400E0002408F0B2 +:1094C000F3FB012C01D1012807D11A4800680028BC +:1094D00003D1194C2078002803D1192013F012F879 +:1094E00070BD012002F0B6F920781449401E2070AA +:1094F000FF20F53010F05AFA70BD0A6882421FD181 +:1095000000200860ADE70000A85D0400F837040003 +:109510000090009048F4FFFF10270000C8050004E9 +:10952000C40500048D8D0000F4FF02C000A000807F +:109530000418000418060004B70500041B9200007C +:1095400070477CB5040005F3BAFE05000E006846BE +:1095500015F046FA00980199421BB1410B00E11742 +:10956000121B8B4101DA01207CBD00207CBDF0B5CF +:1095700001250024F948FA4F017885B04806420FCA +:10958000F648002A40787ED0F44B1E00726CE0361C +:10959000012846D110292FD100F3A6F83A008032D5 +:1095A000D36A926A801A994103910290F9F721FCDB +:1095B000002808D0F9F7FDFB002804D1E749BA8953 +:1095C0008878904279D3E64803998030436B026BE8 +:1095D0000298801A994109D3E1488030C16A806AB3 +:1095E0006140084302D0F878012878D1DB4A9470B2 +:1095F000D0688FE0080096E0D84B402910D19C70CD +:10960000D8681900801A3039D862096A884200DCAB +:109610000800D449D862884200DA0100D962DC70BF +:10962000A8E0002872D1F9F7A1FB002804D0CB49AB +:10963000FA898878904240D300F356F8C84A8032BD +:10964000D36A926A801A9941039102902D0EED1906 +:10965000010000006C930000000400004595B54235 +:10966000F9F762FB002845D0C148C24A4168926BB5 +:10967000406C891A081ABE493039096A814200DBF8 +:1096800008000190B07812F3A7FC0700092012F33C +:10969000A3FC874205D8B74800E078E0018AB448C7 +:1096A000817015F017FEB34FF96B88420AD3019809 +:1096B000FFF751FF002805D0AD488470C4700199B0 +:1096C00056E004E0AA493A8A8878904203D2401CC6 +:1096D0008870CD7058E04A6C8868801AA44AC862C5 +:1096E000303A126A904200DC1000C8628C70CC7074 +:1096F0004AE012E09F4803998030C36B826B029866 +:10970000801A99410DD39B488030C16A806A6140BC +:10971000084306D0F878012803D0954881781EE0E8 +:109720000EE0934A94709068516C401A9049D06250 +:109730003039096A884200DC66E7D062D47023E0E1 +:10974000022819D1F9F706FB002803D1F9F7F7FA37 +:1097500000280FD086483A8A8178914203D2491C6A +:109760008170C57010E08470C470426C0169891A00 +:10977000C16209E07E48F6E77D49032804D18C7078 +:10978000CC704869801AC8620A20747010E0784E64 +:1097900001281BD1F9F737FB00280BD0F9F713FB91 +:1097A000002807D1B0787989884203D2401CF5702F +:1097B000B0703DE0B470F068B062B26B316B5300D2 +:1097C0009A188918401AF062F47031E0F9F7D8FA63 +:1097D000002802D0F57034642AE0F9F7A5FA0028D1 +:1097E00003D063483038006A00E0B068316C604FE5 +:1097F000431AB362303F7268BF6AD21B9A4200DCE0 +:109800001300B362B76B9C46326B7B00DB19D21836 +:1098100063469A1A564BF262303B1B6A9A4202DA4E +:10982000081AF57003E06246101A0818F4703064E4 +:109830004F48C078F4E510B510F0A5FC002801D021 +:10984000012010BD10F0B5FC002801D0022010BD91 +:109850004748C0308069002820D14548303800880A +:10986000042813D0102813D14148407801280DD185 +:10987000F9F7D4FA002809D001208002FAF77DFB1D +:1098800001204002FAF779FB402010BD102010BDE6 +:1098900010F049FF002801D0082010BD042010BDA1 +:1098A00033483021303810B511F320EBFF21304818 +:1098B000113111F31CEB2E481021303801802F4953 +:1098C00041612F4981600021418081802D4AC18002 +:1098D00082612D4AC2602D4A7D23C261DB002C4A81 +:1098E000036202612B4A42625A0082620200012432 +:1098F00020321473032454731E4AC385F030D17090 +:109900008161126A02770A2281774277C822426314 +:109910008163403041602049016010BD10B501F005 +:109920006EF8002805D0F9F7F4F9002801D10120DC +:1099300010BD002010BD19480021C16070471748B4 +:1099400000218160704710B5FF24CC340470240AD4 +:109950004470062484700024C47001714471110A9B +:109960008271C171190A037241720A2010BD000090 +:10997000C85C0400783704003C730000204E0000EF +:109980001027102750C30000307510275CC100005D +:109990004E70F22B94110000F0550000C85D0400D9 +:1099A0003EB504006846FFF7CEFF03007621200095 +:1099B0006A4608F079FB3EBD38B5FF4C6078012857 +:1099C00003D12078402822D00AE0FB49C031C96A7F +:1099D000002803D0022801D0032801D1002916D184 +:1099E000F648006EE064606E00F369FAF24B0822FC +:1099F0000092F348E26C64330021FCF7C9F9FFF2EE +:109A00007DFEED4A5032D1679067803203C238BD87 +:109A1000F8B5FFF273FEE84A5032536C126C861AA6 +:109A200099410D00F9F780F9002814D1E2494878EE +:109A3000012802D1087840280DD0E048006EC864A3 +:109A4000CC6A4000E317C11780196941001B994196 +:109A500001D20120F8BD0020F8BD38B53E4BA4B7B7 +:109A6000010000006897000000040000164F662EF9 +:109A7000D64C6078012803D12078402822D00AE013 +:109A8000D249C031C96A002803D0022801D0032876 +:109A900001D1002916D1CE48C06DA064206E00F31C +:109AA00018FACA4B08220092CB48A26C60330021FE +:109AB000FCF778F9FFF22CFEC44A50329066D1666A +:109AC0005167106738BDF8B5FFF222FEBF4ABF4CA0 +:109AD0005032D36C926C861A607899410D0001283F +:109AE00011D0F9F72BF900280DD1B948C06DA06449 +:109AF000646C4000E317C11780196941001B99414C +:109B000001D20120F8BD0020F8BD38B5AF4C606D22 +:109B100000F3DFF9B148C16804221143C160082293 +:109B200023000092AE48E26A54330021FCF73AF970 +:109B3000FFF2EEFD220050325164106438BD10B5C2 +:109B4000A24CC034E06B002810D0A148406F00F355 +:109B5000C0F9E06B00F3BDF9002120004030E16363 +:109B60004160A04901600420FBF78BFA08E7F8B5D3 +:109B7000002036F0BBFA0600FF219B4800222D3161 +:109B800011F3AAFE050056D002202873C0202C181D +:109B90002881A078F3218008800008400830000761 +:109BA000000F4030A070E07801210843F121084007 +:109BB000102108439F210840E070F12080003118F7 +:109BC00006220E00A01D11F300E92000062231003C +:109BD0000C3011F364E9200006223100123011F339 +:109BE000F4E8002020801C202E18288184213000D9 +:109BF00011F386E9370017206037346778777B48A0 +:109C0000A0800920B070002036F070FA68617848B2 +:109C10000079800607D4B078002804D0B06801210C +:109C200089070843B0600820152138770902280009 +:109C300007F0D2FA0120F8BD6549496F814200D191 +:109C400095E77047614938B5C031C96B814220D171 +:109C5000684C6068002815D00420FBF7A0F966481E +:109C600020605B48406F00F334F9082200922068BE +:109C70007D210901564B421A604800217433FCF7DC +:109C800091F804E00420FBF7FCF95648206000F04E +:109C900001F838BD38B5F9F788F8002829D0F9F768 +:109CA0004DF8002825D1F9F73EF8002821D1F9F721 +:109CB00082F900281DD100F01FFF012819D123F0DF +:109CC0003BFB022815D04B4C01206168002900D0D5 +:109CD0000020606047484038C06B00F3FAF8454BFD +:109CE00008220092464822681B1F0021FCF75AF800 +:109CF00038BDFFF724FF38BD10B53E4C403C206B0B +:109D0000002809D000F3E5F800202063A063C820F4 +:109D100060630320FBF7B5F932E6F3B5502087B056 +:109D20000390029000F0E8FE01282ED1FFF79CF985 +:109D3000002805D108983D2802D008983728F4D18A +:109D4000224F089B38005030069098303C00012686 +:109D5000C034282B05907BD018DC172B79D008DC79 +:109D6000022B05D00A2B75D00B2B74D0122BDCD113 +:109D70000CE3192B70D0262B6FD0272BD5D1FFF7F2 +:109D8000A2FE002801D0FFF772FE5BE30F4D353BCA +:109D9000603511F336EA0DECECEBBDBDBDBDBD0881 +:109DA000EAE9BDE8BD00FFF7A7FFFFF773FF08482A +:109DB000C0780428E9D0F8F7C1FF002826D1F9F7C8 +:109DC00037F8002820D1F8F7DAFF1BE0C85C040060 +:109DD000783704006F900000FF8F00000090009023 +:109DE000C58C0000F0550000B8190004B036000022 +:109DF000C4E80004C85D040050460000319900002A +:109E00003D990000002801D07E7029E0F8F796FF08 +:109E1000002803D0F8F770FF00280AD0F8F799FF60 +:109E2000002806D1F8F7A0FF002804D038781028C1 +:109E300001D1022013E0F8F7A2FF00280ED0F9F7B5 +:109E40003CF800280AD03878102807D1032006E013 +:109E50004EE2EBE2E1E20FE245E259E100207870E8 +:109E6000FFF766FD00287DD0FB480778D9B37EF068 +:109E700001000000649B000000040000E220139A2F +:109E8000FFF7EDFCFEF75BFFF948C0780028F748C4 +:109E9000007848D14006400F28D000F04AFEA06A62 +:109EA000002802D101F01DFEA062079803F018F807 +:109EB00000280BD00798112149014018EC49027D78 +:109EC0000A71407D4871079814F07BF8E84F3878A4 +:109ED00000280ED1F8F73CFF00280AD13E70029B03 +:109EE000039A07983100FFF76FFD02E0012000F0B0 +:109EF0000AFEDF4F0120FE7000F069FD012005F031 +:109F000009FDDA48417801292AD10078402827D173 +:109F10000020FE70FBF7BFF8FF20401C28832220A2 +:109F200012F00EFB98E2B8421AD04006400F0BD058 +:109F30007806400F14D100F0FCFDA06A00280FD174 +:109F400001F0CFFDA0620BE07806400F08D00120A1 +:109F500000F0D9FDA06A002802D0059801F027FE84 +:109F600000272F83FFF772FA00F026FDFBF70BF8AE +:109F70003800BE4FF86605E028E0CAE1B9E187E1A4 +:109F80004EE20DE2FEF7BEFE38784106490F02D1DF +:109F90007978FEF767FF31F09DFA0490FFF705FB33 +:109FA000002853D0B248C6700020FBF774F8387808 +:109FB000012804D0022802D04006400F05D0FF201F +:109FC000401C2883222012F0BBFA95E0A84DE878C7 +:109FD000002835D0042833D0FFF738FA00F0ECFC25 +:109FE000FAF7D1FF0026FE66079814F01DF82878CE +:109FF000002806D028222E70079831001300FFF7A2 +:10A00000E3FC0020FBF747F80020FEF761FFA06AA1 +:10A01000002802D0059801F0CAFDEE70A6610A2062 +:10A02000A6776077286A2077002000F0D0FC002017 +:10A0300005F070FC38784006400F01D0FEF79BFF1A +:10A040008C48C16804221143C16005E2FFF707FC98 +:10A05000402806D00020FAF7ACFF002801D1FE66A8 +:10A060000EE1834DE878012805D1FFF25BFB2A0061 +:10A070008032D1629062FFF255FB7C4A5032D1634C +:10A0800090630020FEF724FF0220E8707948C16841 +:10A0900004221143C160079813F093FF38784006FB +:10A0A000400F1FD0002002F045FAA06A002802D01D +:10A0B000059801F07CFD787800280AD0022808D0A5 +:10A0C000032806D0012817D13878102801D040285D +:10A0D00012D1FFF724FDFFF7AFFC00280CD0FFF7EB +:10A0E0007FFC09E008220092BA6A6348069B0021BF +:10A0F000FBF762FEFFF713FD387808280FD004281D +:10A100000DD04106490F7CD07978002907D002296B +:10A1100005D0032903D0012973D11028FCD10022D6 +:10A1200011009EE031F0D6F9002604903D00FE6655 +:10A13000FEF7A4FF002893D04D4FF878012805D1F1 +:10A14000FFF2F0FA3A008032D1629062FFF2EAFA4E +:10A15000464A5032D16390630020FEF7B9FE0220D8 +:10A16000F8704448C16804221143C160079813F095 +:10A1700028FF2878414F4006400F1DD0002002F0F4 +:10A18000D9F9A06A002802D0059801F010FD68787E +:10A19000002808D0022806D0032804D001284AD17C +:10A1A0002878102847D1FFF7BAFCFFF745FC0028B4 +:10A1B00041D0FFF715FC3EE0A86A3A68C1177B68FA +:10A1C0008018A862AA6B5941296B53009A18891804 +:10A1D000411AE9620822009202002748069B0021EA +:10A1E000FBF7EAFDFFF79BFC287804280AD1FEF76D +:10A1F00018FF606A00281ED00798002110F074FA3A +:10A2000019E031E0082801D0022819D107F086F9B9 +:10A21000002802D0FEF705FF0CE02878082801D1BD +:10A22000606A02E0022805D1286F002802D0079852 +:10A2300010F079FA2E672878082810D004280ED05C +:10A2400029784806400F0FD06878002807D00228E8 +:10A2500005D0032803D0012806D1102904D139687C +:10A2600000220798FFF7B7F8049896E0C85C04004E +:10A2700078370400009000908F8C0000A3C55EEF3B +:10A2800001000000609F000000040000B1FAC0F669 +:10A29000F0010004049831F02BF9002009B0F0BD62 +:10A2A0006662E3E0FFF7DCF8FAF777FE0020F86675 +:10A2B0003878012825D0022823D0042801D0082886 +:10A2C0000BD100F083FBFEF72EFEFF48C670002086 +:10A2D0006062288B000AE4D113E04006400FE0D012 +:10A2E000288B000A0DD0FBF7B5F9A06A002802D12F +:10A2F00001F001FCA062F448C1780229D1D1032108 +:10A300009DE02E83B2E038784006400FC9D0FEF7BA +:10A310000AFEED48C670A9E0FFF798FB0028C0D000 +:10A32000FFF768FBA2E031F0DFF839780500480656 +:10A33000400F3BD07878002807D0022805D00328AA +:10A3400003D0012832D1102930D1FFF2F5F9DE4CCB +:10A35000A26FE36F801A7A789941012A01D1246CA7 +:10A3600008E0022A01D1A46C04E0032A01D1E46CC4 +:10A3700000E0646C00260B003100201A994115D2D0 +:10A38000797800208900CA199169002900D0080055 +:10A39000796808189168441A08D0A04206D300F0E2 +:10A3A00015FB079822000021FFF71FF8280031F065 +:10A3B0009FF85BE00020FEF795FDA06A002802D020 +:10A3C000059801F0FEFBFFF74BF800F0FFFAFAF7F3 +:10A3D000E4FD0025FD66079813F030FE002005F02F +:10A3E000A3FAFFF7CAFAFFF7C4FA0020FAF75DFEF6 +:10A3F000B64AD06804210843D0600898352802D0B6 +:10A400000898362802D1B048C1700BE0AE48290048 +:10A41000C5700278002A05D0282201700798130021 +:10A42000FFF7DCFA0A20A5776077A748A561006AE4 +:10A4300020771BE0A448C178042917D10021C170FE +:10A4400014E00020FAF731FEA048C168042211434D +:10A45000C1605EE7FFF704F800F0B8FAFAF79DFD77 +:10A460000020F866FFF789FAFFF783FA012015E765 +:10A4700010B5FEF70DFE002806D09548007840067E +:10A48000400F01D001205BE4002059E410B5040026 +:10A49000FEF7FEFD002813D0FFF7EAFF002811D1D8 +:10A4A0008948C07802280DD1894809216030415679 +:10A4B000012901DB002C05D007F3BCFA002801D0EC +:10A4C00001203DE400203BE410B5FEF7E1FD00284B +:10A4D00006D07D490120C978022900D000202FE450 +:10A4E00001202DE410B5FEF7D3FD002810D07848E8 +:10A4F00000784006400F0BD002F06FF8002807D11B +:10A5000073486030008BC11FF93901D0012017E476 +:10A51000002015E46E48C06E70476D490120086741 +:10A5200070476B48406F7047694901204867704722 +:10A5300067490020486770476648806870476548EB +:10A540000121816070476348C068704761480121FC +:10A55000C16070475E481038407B704710B50400FA +:10A56000FEF796FD00288ED0002C8CD1FFF2E4F887 +:10A57000574A50325163106310001030417A491C21 +:10A58000417280E710B5FEF783FD002815D0504CCE +:10A590002078012801D0042806D14D486030017A86 +:10A5A000491E0172FEF747FD20784006400F04D097 +:10A5B000FFF2C2F8474A303A03C264E7FFB587B0FA +:10A5C0000D00FEF765FD00287DD0414F00263C00C0 +:10A5D0002100387838310691083960340128059116 +:10A5E00001D0042831D1FFF2A7F80B00F96B069ACD +:10A5F000050005980190039202917A6B344800920D +:10A600005030416B006B2A0000F05FFC607A401E06 +:10A61000607230F069FF2C4D0490E878032869D10E +:10A62000386D002802D0FFF268FC3E6538780128BA +:10A6300006D1012040022083222011F08BFF59E037 +:10A64000FEF771FC0120E87054E0022802D0204996 +:10A6500008286BD10A980028B6D001F083FF0028A3 +:10A6600031D107F049FB0128AED0FFF265F80700B1 +:10A6700017480B00C16B069A059801901448039285 +:10A680000291426B00925030416B006B94F54D0685 +:10A69000010000005CA3000000040000996B454B22 +:10A6A0003A0000F01CFC207A401E20720120002D90 +:10A6B00000D000200D4908700998002801D0002D15 +:10A6C0006FD00020099030F019FF044F0490F87803 +:10A6D00003281DD1034D286D0AE02AE078370400D5 +:10A6E00000900090C85C0400C85D0400B30500043D +:10A6F000002802D0FFF20BFC2E6528780228A2D099 +:10A70000FEF71BFC0120F870049830F0FBFE48E0D7 +:10A71000049830F0F7FE12F0DDF9002841D0BB4874 +:10A72000006800283DD106F00DFF002802D0FEF79A +:10A730008CFC36E0002D34D0079810F008F830E09B +:10A74000B34C4006400F2CD0486B0290C517FEF268 +:10A75000FDFF2700703F3A6B7B6B801A029A99418C +:10A760002B00121A8B410BD2A07F401C0006000E5A +:10A770000A28A07705D3A749086D401C0865A66183 +:10A78000A67704F3CEFD79653865FEF2DFFFA04AB7 +:10A79000F965B865109B403A1363796750323867A2 +:10A7A00003C209980BB0F0BD994970B5C03909785A +:10A7B00015004906490F1CD0603010F366EC807814 +:10A7C0000009042815D00C2813D0914C203460784F +:10A7D000002808D0280011F327FC0600A07811F308 +:10A7E00023FC864200D2A5706078FF2801D2401C6D +:10A7F000607070BD10B5FEF755FC002805D0844987 +:10A8000001206039098B012900D1002045E68048EC +:10A810007021C0380078084070477D486038008B50 +:10A82000000A0002704710B530F068FE30F06AFE92 +:10A8300033E6FEB5764DC03D6878012833D12878DF +:10A84000402806D1FEF282FF2A005032536C126C6F +:10A8500004E0FEF27BFF6F4AD36F926F871A68782D +:10A8600099418000401980680190C317686C0C0002 +:10A87000C117019AC0196141121A8B4113D268782D +:10A88000800040198068C117C01BA14161494A6D11 +:10A89000521C4A65FF22F532904203DA10008A6D9D +:10A8A000521C8A656864E86DFFF231FB584B082240 +:10A8B000009259486A6C643B0021FBF791FAFEF262 +:10A8C00045FF534A703A9064D164D165906507F0B2 +:10A8D00083F8FEBD10B54E4CC03C206EFFF217FB56 +:10A8E00000202066D9E510B5494CC03C606EFFF2EF +:10A8F0000EFB00206066D0E54549203108707047A6 +:10A900004349C87770474249C8627047434A506B11 +:10A91000010C3F480904F038C08D014351633F4AA0 +:10A92000C03A116B0904090C000408431063704716 +:10A9300010B5F8F758FA002805D0F8F71DFA0028E6 +:10A9400001D10120A9E50020A7E53148C06B00280E +:10A9500000D00120704738B501202D4CA16B002993 +:10A9600000D00020A063206BFFF2D1FA284B082210 +:10A9700000922B48626B30330021FBF731FA38BD6F +:10A9800010B5234C216B81420ED1A06B002804D05E +:10A990000320FAF722FB234803E00320FAF78FFB9A +:10A9A00021486063FFF7D7FF77E51948006B00285F +:10A9B00000D00120704710B5F8F71BFB00280DD11F +:10A9C00000F045F8002809D0F8F7CBF9002805D1A8 +:10A9D000F8F74CFA002801D101205EE500205CE583 +:10A9E00010B50B4CC03CA06D002803D0FFF28FFACD +:10A9F0000020A06551E50D49064A002803D00868EB +:10AA000010670B4800E0106F0860704718060004DC +:10AA1000885D040078370400718E0000C0900090BB +:10AA20003DA6000030750000204E0000C0A9008047 +:10AA300001000300FF4810B54068002805D0FEF76C +:10AA400031FB002801D1012010BD002010BDF948C4 +:10AA500010B50078012815D1F8F76CF9002803D15A +:10AA6000F8F78AF900280DD0F8F7BDF9002803D0CF +:10AA7000F8F782F9002805D022F07CFC022801D0EA +:10AA8000012010BD002010BD10B5F8F7B2FA002863 +:10AA900008D0F8F766F9002812D0E74858D255A731 +:10AAA0000100000058A7000000040000CAB196276A +:10AAB000007C06280ED00BE0FFF7D3FF002809D05A +:10AAC000F8F759F9002805D0FEF7F6FA002801D169 +:10AAD000012010BD002010BD10B5FFF7C2FF0028F7 +:10AAE00009D0F8F748F9002805D001F04FFD0028FB +:10AAF00001D0012010BD002010BD10B5FFF7B1FF3F +:10AB0000002803D014F0BDF8002807D012F01FF879 +:10AB1000002803D105F0C6FB002800D0012010BD9D +:10AB200010B5FEF7C9FA002802D0FFF7E1FC10BD0E +:10AB3000012010BD10B5FFF77AFE10BDC248406875 +:10AB40007047C14948607047BF4800787047BE49A8 +:10AB50000870704710B5FEF7AFFA002805D0FFF770 +:10AB600060FE002801D0002010BD012010BDB649B4 +:10AB7000002010B5486006F08CFD10BD10B5FEF742 +:10AB80009BFA002802D0FEF76AFA10BD002000F000 +:10AB90009FFA10BD10B506F0DFFC002809D100F0C7 +:10ABA00087FA002805D1FFF7C9FC002801D1012050 +:10ABB00010BD002010BDF3B50C0081B007D0022CF1 +:10ABC00005D0032C03D0042C01D0012C03D19E48C6 +:10ABD0000078012814D135F0C6FA002803D016F009 +:10ABE000D9FB00280CD00127994D9A4E23007F06EF +:10ABF00010F32EEB050484070E7C990000F090FB07 +:10AC000091E001983D21FFF7B0F8002875D005E0EC +:10AC1000032C03D101982621FFF7A7F8FFF73EFF89 +:10AC20000124A402002837D08748012141600198FF +:10AC300013F0E5F900F039FB012006F06EF80FF093 +:10AC40003EFD00280DD0E86B08210843E863200092 +:10AC5000F9F7D2F92000F9F7C2F9E86BF721884338 +:10AC600006E00FF092FD002803D0E86BFF210843B7 +:10AC7000E863B0683843B0600FF021FD002808D0C9 +:10AC80000FF0B3FA00284ED100F014FC00284AD18E +:10AC900030E0FFF773FF46E0FEF70EFA002818D108 +:10ACA00006F03BF8E86B000A0002E863B068B843BE +:10ACB000B0602000F9F79BF9FFF732FEFFF757FF6E +:10ACC00065480168583081422DD1232011F056FC8F +:10ACD00029E0012006F021F8E86B000A0002E86391 +:10ACE000B068B843B060FFF71BFED2E7FFF7ACFED9 +:10ACF000002818D0FFF73BFF15E015E000F02DFB12 +:10AD0000019813F0AFF901980221FFF72EF8FFF731 +:10AD10002EFF002006F001F8E86B000A0002E8634D +:10AD2000B068B843B0600120FEBD0FB40020F0B59C +:10AD30008BB035F003FA039001A8FAF7D8FEF8F7C4 +:10AD400062F910AB197E18AB0A911E7F10AB1F7809 +:10AD500019790991D97818AB089119790791197A5D +:10AD60000691D97910AB05915C7818AB5D79002814 +:10AD700042D022F009FB022870D0AC4205D0012D50 +:10AD800001D12A20ABE02B20A9E0002F02D00998A6 +:10AD900000281BD0089800280ED1002C0CD1079851 +:10ADA000002802D00698002804D00598002801D178 +:10ADB000002D01D02D2092E0002F02D0099800280C +:10ADC00004D00898002801D1002C0CD00798002846 +:10ADD00002D00698002806D00598002803D1002D3F +:10ADE00001D12E207BE00A98B0427AD0012E01D109 +:10ADF000302074E0312072E00398002871D01248AE +:10AE0000007801286DD122F0BFFA13495831022889 +:10AE100004914ED0104804990068884249D1002F0F +:10AE200002D0099800281DD0089800281AD1002CBB +:10AE300018D10798002802D00698002810D005984D +:10AE400000280DD1002D0AE048020004A8420400A9 +:10AE5000C0A200800090009018D400040AE00AD03C +:10AE600024203CE0AC4206D0012C3AD103980221C8 +:10AE7000FFF7A1FE35E0002F02D00998002804D08A +:10AE80000898002801D1002C0AD00798002802D089 +:10AE90000698002804D00598002801D1002DE5D09F +:10AEA0000A98002802D1002EE0D11AE0B4897E7001 +:10AEB0000100000054AB0000000400003EDEE393FC +:10AEC000002EDDD017E032480078012813D122F09F +:10AED00065FA02280FD02F480168049881420AD0F1 +:10AEE0000A98002802D1002E05D001E0002E02D1E0 +:10AEF000032011F04DFB01A8FAF720FE0BB0F0BCC7 +:10AF000008BC04B01847F8B506AC171A70CC8B41D2 +:10AF10001900002F01DC0020F8BDA74200D927004E +:10AF2000286803214000C01910F3E2E83900B84254 +:10AF3000286000DB0100B84200DC0700C81BB042FB +:10AF400000D930000999096849000818032110F355 +:10AF5000D0E8099908600120F8BD262010B511F04D +:10AF600017FB10BD10B51FF0EDFC094C002803D1F4 +:10AF700020F04AF8002801D0002000E001202070D5 +:10AF800000F097F900F0D6F9FEF7C6FC10BD0000FE +:10AF90004802000418D4000410B530F0C3FAFF4989 +:10AFA0000A69002A03D030F0C1FA012010BD012245 +:10AFB0000A6130F0BBFA002010BDF94B586B020C4F +:10AFC000F8481204C1680A435A63426809040A43F4 +:10AFD000F349C0390A630168643901620021816262 +:10AFE0001E2281614262C1617047EC4910B54A6915 +:10AFF000824215D1002008704861FFF7DEFFEA4861 +:10B000000068002801D0172008E00FF062FB00283C +:10B0100003D10FF0C4FB002802D0212011F0B8FAB0 +:10B0200010BD38B5DD4C6069FEF285FF08222300B3 +:10B030000092DE48A26900211433FAF7E5FE38BD1C +:10B0400070B530F06FFA0600D94801694069814255 +:10B0500001D0012400E00024D04D2878697808430D +:10B060001BD0300030F062FA6878002813D0002C32 +:10B070000CD0686A0722401C6862CE480121006833 +:10B0800031F063FB212011F083FA04E0A86A401C30 +:10B09000A8620120A870012070BD06F3E9FC002819 +:10B0A00008D1300030F042FAE86A401CE862FFF74D +:10B0B000B8FFF0E72878401C2870300030F036FAEE +:10B0C000002070BD10B530F02DFAB4490A784969F6 +:10B0D0000A4303D030F02AFA012010BD30F026FADE +:10B0E000002010BD10B5040006F040FA002822D060 +:10B0F000FFF7E8FF00281ED1FFF7B0FC002803D0BF +:10B100000FF04DFB002802D1002C14D008E0002CD9 +:10B1100006D1FFF795FF00280DD1FFF782FF08E069 +:10B120009E490020C870FFF737FF002803D1FFF7C2 +:10B1300044FF06F05FFA10BD98498A68824204D144 +:10B140000020886008610120CCE7704738B5934C37 +:10B15000A068FEF2F0FE0822230000929648E26802 +:10B1600000210833FAF750FE38BD10B58B4CA068AB +:10B17000FEF2E1FE0020A06010BD10B5874C6069B2 +:10B18000FEF2D9FE0020606110BDFEB50A21040068 +:10B1900001AA08F0F2FA814F05000026002843D0EA +:10B1A000112040012018408A032189030843019996 +:10B1B000096F8880200006F01FF9010001987F4A7E +:10B1C000817000927E4A1279920606D4002904D03A +:10B1D00081680122920711438160006F1022C178BB +:10B1E000784C1143C17002E00220F9F7ADFF06F080 +:10B1F00087FA002801D1641EF6D2FFF712FF012062 +:10B2000078700099280006F019F800280AD1280063 +:10B2100010F36AFB30F086F93E707E7030F086F9EC +:10B220000020FEBD0120FEBD30F07CF93E70F5E748 +:10B2300070B506000C001500002B38D00FF0AFFAE7 +:10B24000002834D001F0ACF9002830D106F072FDAE +:10B2500001282CD00120002C00D000205A49087071 +:10B26000FFF77CFC012808D1FFF787FF30F05AF97F +:10B270004A4A0021117030F059F911F03FFC0028C2 +:10B2800015D049480068002811D106F06FF9002850 +:10B2900003D00020FFF726FF08E0002C07D04B4822 +:10B2A0000078002803D130000FF065FA002528004F +:10B2B00070BD4748C16B474A1143C1635D7D2AE7B2 +:10B2C0000100000050AF0000000400006D0430FFDA +:10B2D00070477CB5F7F763FD3D4E444D344CE03686 +:10B2E00000280AD0694601A8F7F7F4FD00990198F3 +:10B2F000884204D8606B401C6063009601952E4D17 +:10B300000198E968814203D12969009A91421AD0D3 +:10B31000E8600099421A2A604B22D20029618918FC +:10B32000334A8218914200D811006960216A401A9C +:10B33000A8600FF03EFA002803D0A868FF38F5385F +:10B34000A860FFF744FE7CBD70B530F0F5F806004C +:10B35000FFF71DFF164C00257D202570C00065708D +:10B360002062FFF7B6FF06F0B8F8FFF708FF1148B4 +:10B370002561416B420611434163300030F0E0F833 +:10B3800070BD10B5FDF7ACFE002837D1FFF7F0FB1C +:10B39000012833D1FFF7FBFE30F0CEF805494A6BA8 +:10B3A0004B061A434A63024900220A70024921E00F +:10B3B00050020004C0900090B02F00041806000452 +:10B3C0007FAC000000A000800C080004CDAD0000A0 +:10B3D00002040000C4E8000470170000B305000474 +:10B3E000B4050004C0A2008000020080A60E000088 +:10B3F00048F4FFFF8A61CA6130F0A2F810BDF94A33 +:10B40000D368181A401A010410008068090C5368A8 +:10B41000F5490204086B120C000C00041043086389 +:10B420007047F0B5040085B0FFF7A2FB012853D1A7 +:10B4300001F0C0F800284FD10FF055F9002801D0D5 +:10B44000FFF7A5FE0FF04FF9002807D10FF0B1F973 +:10B4500000282CD04034207EC00628D5E14C206A3C +:10B460000490A56AFEF290F92368220007000E00FE +:10B470002832590810000093083801AB07C3330085 +:10B48000E169A0693A00FFF748FD606A002808D02A +:10B49000A26A216A8A18049949198A4201DA401E6F +:10B4A00004E0A16A206AFFF7AAFF1E20606230F064 +:10B4B00043F8CD490400C031486B4A061043486345 +:10B4C0000FF011F9002804D0C8490020087006F0D8 +:10B4D0009BF8200030F034F805B0F0BDC348007987 +:10B4E0007047F8B50400002034F03CFE0500F7F783 +:10B4F0009EFD00285CD1002D5AD0A868C00457D505 +:10B5000001F058F8002853D1FFF732FB01284FD142 +:10B5100021F04EFF02284BD0F7F741FC002847D01E +:10B5200030F00AF800902000B049B14CAE4EB14F57 +:10B5300011D001200871002005F003FCE06B000A27 +:10B540000002E063B068B843B060600DF8F763FDD7 +:10B55000FFF7FAF929E0002008710120FFF705FB49 +:10B56000280012F060FDFFF7B4FE012005F0E9FBB2 +:10B570000FF0B9F8002807D0E06B08210843E0631A +:10B58000E06BF721884306E00FF013F9002803D0A1 +:10B59000E06BFF210843E063B0683843B0600FF010 +:10B5A000A2F8002801D1FFF7FDFA00982FF0C8FF9C +:10B5B000F8BD70B505008B4C0026E169A0697140AB +:10B5C000704008430FD0A269E3693100A81A99417D +:10B5D00009D28649086B401C0863A269E369501BC5 +:10B5E000B341E361A06170BD70B504000D00FEF2CF +:10B5F000CBF87C4AD16190612900200034F0F8FE3C +:10B60000FFF7D7FF70BDF7B582B00D001600F7F752 +:10B610000EFD00280AD0FFF72BFA002811D0002DCC +:10B620007ED07C20405D07280BD80DE0286F807805 +:10B630000007800F06D1FFF763FA002802D0FFF75A +:10B640008FFDEDE0002DEBD030690028E8D0286FA9 +:10B6500080780007800F02280BD100F0ABFF002894 +:10B6600007D10FF0A6F8002803D0FFF701FA002851 +:10B670000CD1FFF745FA002804D0286F8078000726 +:10B68000800F03D0F7F7D3FC0028DAD05A480768B8 +:10B690005A480078000207432FF04EFF01905748A8 +:10B6A000346800781434810055484058010604D0AD +:10B6B0000006000E001F384301E0FC2038430068FC +:10B6C000A0427ED1F7F7B3FC002833D00760234DAA +:10B6D000010000004CB3000000040000D2C1154C72 +:10B6E0000020F07560880007000F012831D0316814 +:10B6F000606860318A7F801C521E1206120E8A77A3 +:10B7000075D04178090714D401780A07920F022AEC +:10B7100002D1090908290CD03F49096B0122090906 +:10B72000D20289180A0161680B8B1B071B0F134398 +:10B730000B8300E076E041780822114341700298C3 +:10B740002100F7F722FD04E030686030817F491E58 +:10B75000817730686030807F002848D0F07D0028F5 +:10B7600045D1FC2038430668380004210843FC22F8 +:10B7700039002FF04AEB3E602548284900788000C8 +:10B780000A58521C0A5026490A58121D0A50F7F747 +:10B7900058FC002804D160680822C1781143C170A8 +:10B7A00001202070F7F74DFC002804D0F7F763FC68 +:10B7B000F7F7E2FE16E01149C031486B4A06104324 +:10B7C0004863FFF7EEFC0E4800210170286F807877 +:10B7D0000007800F00E00AE001D1012000E0002016 +:10B7E000FFF794FC01982FF0B5FE01207EE601984A +:10B7F0002FF0B0FE1EE00000B02F0004009000907B +:10B8000050020004C0A200800000000200A00080DE +:10B8100018B801C01C0003C0C0A60080F4FF02C01D +:10B82000440003C027480078002803D00298310064 +:10B83000FFF7E4FE002059E610B5040037290CD0CC +:10B8400007DC21290DD0352901D0362908D1012066 +:10B8500004E0382901D0392902D10020FFF74BFE3E +:10B8600010BD00F0B1FE002826D10EF046FF0028E2 +:10B8700012D014494878002807D0C869022804D299 +:10B88000401CC861FFF7E1FB10BD0020C86101004A +:10B8900020000EF065FF10BD0EF095FF0028FAD0D5 +:10B8A00005F078FE002803D00020FFF72FFC10BD24 +:10B8B00020000EF074FF10BD0120F6E701490020C2 +:10B8C0004870704750020004002800D00120FC4955 +:10B8D00088607047FA48C0687047002800D001208F +:10B8E000F74908607047F648406870470020704785 +:10B8F00010B541690979012903D1002129F07FFFA1 +:10B9000010BD05F0BCFB10BD0100EE4810B5C069CC +:10B91000072230F02EFF002010BDF7B584B00024C0 +:10B920002500EA480194E84E426904994306194308 +:10B930000A434261E64BD96804229143D960E34946 +:10B9400080310A6907231B041A430A61DF4BC033A5 +:10B950001968082291431960DE4B1968022291434D +:10B96000196080690290FDF219FF0F0000902DE030 +:10B97000D6486D1C80690290D74800697F2149052F +:10B98000084003D001214905411A03D1864201D163 +:10B99000641C00E000240600FDF200FF009A002372 +:10B9A000801ACE4AB941121A8B410FD2CA48016996 +:10B9B000C448C94A8160FF213331803A1161C649C8 +:10B9C0008031C968C1600220019002E0069884427B +:10B9D000CED3FDF2E3FE009A801ABA4AB94151660D +:10B9E000106602990498884304D00198002801D178 +:10B9F00001200190B7480168022211430160B34958 +:10BA0000C0310868082210430860B04880300169DE +:10BA10000722120491430161AD49C8680422104312 +:10BA2000C86005980560019807B0F0BDF8B507003B +:10BA3000FDF2B4FE0C0000901CF074FFA14D002636 +:10BA4000002804D0A6490888B843088003E0A54927 +:10BA5000380002F38CFAFDF2A1FE009A801AA1418F +:10BA60000B000400686D3100001B994100D36C6D20 +:10BA70006C65F8BDF1B584B0924C206C401C20641C +:10BA80001CF050FF002806D09549049A08881043FE +:10BA9000088005B0F0BDFDF281FE02908D480D00DA +:10BAA0004038C66A9049C162884FB869854901909B +:10BAB0008E481E223431FFF730FF022803D1606820 +:10BAC000401C606004E0012802D1206D401C20650C +:10BAD00080484038C662B869E063FDF2F0B205BA4A +:10BAE0000100000048B7000000040000811BC620D0 +:10BAF0005FFE029AE76C861AA9410D007A1C0020AD +:10BB0000A06CE16C002348430021801969410EF3C9 +:10BB10008AEFA064E06C401CE064606C0021801B34 +:10BB2000A94100D3666C6664606BA16B884201D941 +:10BB3000606B00E0A06BA063049A01997048114308 +:10BB4000884301D0FFF77CFF226D616C11202BF040 +:10BB500037FFA8E76B480088002804D06A49012015 +:10BB60000978042900D0002070472020D6E6F8B5D7 +:10BB700000242600584D2869002801D12000F8BD76 +:10BB80002FF0EEFC0090E86A01210B00002800D0A5 +:10BB90000023002001218140EA6A0F00174202D1F0 +:10BBA0000C000A43EA62401C002C01D11F28F1DD81 +:10BBB000002B12D0FEF798FC002807D005F0BEFD40 +:10BBC000002800D001263000FEF7CFFE002E04D161 +:10BBD00003F313FDFF20FFF757FF00982FF0C4FC7D +:10BBE000CCE7F8B500243C4D2869002801D120009D +:10BBF000F8BD2FF0B5FC0090286B01273B00002812 +:10BC000000D000230020390081402A6B0E0016422C +:10BC100002D10C000A432A63401C002C01D11F28CA +:10BC2000F1DD002B05D003F3E8FC03200002FFF751 +:10BC30002BFF00982FF098FCD9E770B504002FF087 +:10BC40008FFC0500244800220169002901D12260EF +:10BC500070BD2368C16A9943C162226007D02B4836 +:10BC6000006881430FD1FF20FFF7EAFE0BE01CF0D4 +:10BC700063FE002807D1FF20FFF7E2FE03F3B5FCC7 +:10BC80000120FFF74BFE28002FF06EFC70BD70B551 +:10BC900004002FF065FC05000F480022016900290F +:10BCA00001D1226070BD2368016B9943016322605A +:10BCB0000CD11CF041FE002808D103200002FFF740 +:10BCC000BFFE03F392FC0220FFF728FE28002FF0AE +:10BCD0004BFC70BDF0B701C0880200044523010091 +:10BCE00040A200800090009000A7008080A8008003 +:10BCF000A086010046380400FFFF0000FF7FFF7FA1 +:10BD0000FF0300005C3C00048D0600045038040072 +:10BD1000F8B50400466900890519FEF705FF0028FB +:10BD200018D0F7F798F9002814D1286F8078000709 +:10BD3000800F0FD1200036F040FE200005F048FCB7 +:10BD4000002803D00120FFF7EBF9F8BD200036F002 +:10BD50005BFE0CE03100200000236A4633F0A8FAB5 +:10BD6000002802D12000FFF7CDFD0028EDD12000F2 +:10BD70000FF3D8FDF8BD38B5A34C606A30F00EFD66 +:10BD8000E0690522002130F0FEFCA0480522006891 +:10BD9000002130F0F8FC02E000980FF3C3FD206AA8 +:10BDA00004220023694630F0EAFC0F28F4D19848B9 +:10BDB00000250570974812210FF3F2E89648657048 +:10BDC0000560002038BD70B50E00A821414393489E +:10BDD00000250C18A088E188814201D1012070BDA6 +:10BDE00081006118896831602621401C0FF38CEDB9 +:10BDF000A1808034206A401E206230681C3844696B +:10BE00006179022905D1290013F04DFD20000BF0C6 +:10BE100070FD002070BDF8B504000D0040791600DB +:10BE2000022815D120000CF0D5FB012810D13000DC +:10BE300002211C3813F037FD0700012120000CF00F +:10BE40003CF8012F04D17049886D401C88650BE0D7 +:10BE5000A821694371480C18E5882621681C0FF356 +:10BE600054EDA088884201D10120F8BDA800201817 +:10BE70008660E1808034206A401C20620020F8BD8A +:10BE80006648A82110B50FF38CE85F49002088624E +:10BE900010BD001F10B50406240E042C13D2A820D8 +:10BEA00060435E494018A8210FF37AE8564A012002 +:10BEB000916AA04008431021A1400143FF20401C8B +:10BEC000A0408143916210BDF8B5041F042C24D218 +:10BED0002FF046FB06004C4DFF20401CA96AA040F5 +:10BEE00008420AD003E000981C3831F0489B895D75 +:10BEF0000100000044BB0000000400007574B3940E +:10BF000022F920006946FFF768FF0028F5D0FF21DD +:10BF10001231A86AA1408843A862A820604344491E +:10BF20004018A8210FF346E830002FF027FBF8BD9A +:10BF3000F8B5041F042C25D22FF01CFB0600374D4A +:10BF4000FF20401CA96AA04008420BD004E00098E2 +:10BF500000211C382FF0FCFA20006946FFF73DFF56 +:10BF60000028F4D0FF211231A86AA1408843A862BA +:10BF7000A82060432E494018A8210FF31CE8300088 +:10BF80002FF0FCFAF8BDF8B500242500284EFF2755 +:10BF90007F1CA8206043214935543800896AA0409D +:10BFA000084202D00120FFF7C3FC641C042CF0DB24 +:10BFB000F8BDF1B582B02FF0DDFA00901D491E48A2 +:10BFC00036F032EFFFF7DDFD01900298FCF764FEDA +:10BFD0001A4F002426000120250638602D0E0299F4 +:10BFE00028001DF0C8FA029928001DF025FC641CE9 +:10BFF000042C3E60EFDB01A8FFF729FE00982FF02C +:10C00000BDFAFEBD0E480088002805D00D48017815 +:10C01000032901D104210170704700008802000447 +:10C020000C0800040418000400CB0004F807000406 +:10C0300060C800041111FFFFBBBBBBBB4C37040041 +:10C040005C3C00048D060004FF4840787047FE49C0 +:10C0500048707047FC49002088607047FA4900200A +:10C06000C8607047F7B582B00600F74D1700E86862 +:10C0700000285FD10398FEF74FFA00285AD0FF211D +:10C08000F24800222D310FF381FC040052D0012030 +:10C090000221E86021736661617B0143EC486173B2 +:10C0A000A061C0202081112040013018428AE94857 +:10C0B0000092006832000379F12080003118AC3220 +:10C0C000200001F3D6FD01901C2025182081842139 +:10C0D00028000EF370EF2800390060300700417728 +:10C0E00001982867300005F0AFF9DB4EA870FEF725 +:10C0F000EAFC002800D1D94ED9480079800607D43F +:10C10000A878002804D0A868012189070843A860FE +:10C11000FDF704F8002802D0FEF762FA00E00320E1 +:10C1200038773100200005F0B1F8002805D1200053 +:10C130000FF302FC002005B0F0BD0398FEF754FA9F +:10C140000120F8E7FFB589B00700002005900C98A2 +:10C1500000281AD0BC488168002916D0C1490A6954 +:10C1600049698A420BD041680722491C4160BE4898 +:10C170000121006830F011FB212010F031FA0DB0E0 +:10C18000F0BD0120F9F77AFC01E0FF242D342100F5 +:10C19000380007F0FBFA0500F3D0288939794619F1 +:10C1A000F12080003C183800AC300629089002D1FC +:10C1B0000C2006900BE0380034F0B8F8002801D0CD +:10C1C0000C2000E004200690387906280DD1A748FD +:10C1D000089A3B180192069A02213000009401F35C +:10C1E00085FDF078400840000BE0089A0192089B1A +:10C1F000069A02213000009401F378FDF0780121C5 +:10C200000843F070F078EF2108400A992C00C90724 +:10C21000C90E0843F070FF20C01C3071000A707115 +:10C220000020307070701C202881022029002873A3 +:10C2300030311C340491842120000EF3BCEE210027 +:10C240006031139807917728487701D0782804D176 +:10C25000A068012149060843A06026670C980028C1 +:10C260000AD00120C007A060774801218160687B67 +:10C27000084368737E48A8610020208006980C2837 +:10C280001FD10B99380034F05DF841072078490F31 +:10C29000C008C000084341072070490F380034F03F +:10C2A0007CF90101206F028B1207120F0A430283EF +:10C2B000206F017E09090901017620789F2108403D +:10C2C00020700B9A21003800002334F06AF812988D +:10C2D000002827D1FEF712F9002818D00799082066 +:10C2E0000877002138002AF055FAA0700A99002931 +:10C2F00014D00FF3D5FE060009200FF36255AF10DE +:10C300000100000040BF00000004000026AE60F8FD +:10C31000D1FE864201D90920A070A078FEF732FB39 +:10C3200006E0079809210177380005F097F823E027 +:10C3300001200003059021E0002138002AF034FAA2 +:10C340000328A0701AD94B480079C00603D53420C1 +:10C35000C05DFE280CD0787902280FD10F20800113 +:10C360003818806A0521C90140180078000705D5F2 +:10C370000321380004F0DEFFA070D9E70798407F62 +:10C38000772803D0782801D0412804D10520A07057 +:10C3900001200003059037480079800607D4A07873 +:10C3A000002804D0A068012189070843A0600499EF +:10C3B0000598C86139002800002303AA32F08CFFD9 +:10C3C000012800D1E5E6FEF7F5FB002812D012980F +:10C3D00000280FD0280036F004FB0599280005F04E +:10C3E00026F9002802D0FEF705FCD2E6280036F038 +:10C3F0001FFB05E00599280004F052FF0028F4D146 +:10C40000280018F025FC28000FF3A0FAC1E6FFB5BC +:10C41000FF212D31060085B007F0C2F907007ED05C +:10C42000174831793418012902D07079022804D1D3 +:10C430002100300033F076FF02E0300033F080FF5F +:10C440006B460390187EF321084008301876039954 +:10C45000002919D00007000FC03018E000B801C053 +:10C46000B8190004A1BC0000C000000402040000D0 +:10C4700002140000C4E8000400A000800C080004BE +:10C480002902000099BC00000007000F40306B46F5 +:10C49000187638893200C519F1208000AC32311885 +:10C4A00001920091187E049002090007810F230079 +:10C4B000280001F325FCFF20C01C2871000A6871C8 +:10C4C00004986B46A870587EE870707902280DD1E8 +:10C4D000022130000AF0C3FDE9788A06D20F10432A +:10C4E000C007DF22800E11400143E9701C203C1878 +:10C4F00038813800256708997C3041770E9901779B +:10C500000398002835D06B46988B208070790328DB +:10C5100020D1300018F0B7FA0100300000E03EE012 +:10C5200033F01AFF41072078490FC008C0000843C4 +:10C5300041072070490F300034F039F80101206FB5 +:10C54000028B1207120F0A43028320789F210840B2 +:10C5500020700EE0A64A50880101401C5080687E81 +:10C560002A7E000210430007000F08432876000AC5 +:10C570006876002130002AF017F9A0700898382852 +:10C5800010D00898312812D031003800002302AAB8 +:10C5900032F0A2FE01280AD10298002811D0012011 +:10C5A00009B0F0BD934908690222104308610021D7 +:10C5B000380004F075FE012803D038000FF3C6F9E7 +:10C5C000EDE70020ECE702008B4810B5006804217D +:10C5D0000023F9F7A6FA002804D10220FFF7B2F9E8 +:10C5E000002010BD012010BD70B50400834D2868E7 +:10C5F0000079A04201D031F0C4FE2868047180485F +:10C60000446170BD10B532F0CEFF002801D1012089 +:10C6100010BD002010BD774970B501258031096B30 +:10C62000490719D5FF2804D1002405F0A1F901001C +:10C6300001E001000400734B1E1F0AE0E000C21875 +:10C64000126880190068824200D00025641C012D08 +:10C6500008D18C42F2D905E06B48816AC06A8142F8 +:10C6600000D00025280070BDFF2010B5FFF7D3FFD4 +:10C67000002801D005F076F810BD644870B5007848 +:10C6800000284BD16248002200680821FDF273F8AF +:10C69000002843D1FFF7E8FF00283FD05D48FBF2B8 +:10C6A00066FD04005B480821FBF2F0FC05005948D8 +:10C6B0001021FBF2EBFC281884422FD15648FBF2E4 +:10C6C00056FD040054480821FBF2E0FC05005248E6 +:10C6D0001021FBF2DBFC281884421FD14F48FBF2EB +:10C6E00046FD04004D480821FBF2D0FC05004B48F4 +:10C6F0001021FBF2CBFC281884420FD14848FBF2F2 +:10C7000036FD040046480821FBF2C0FC9DF08BC6B4 +:10C71000010000003CC30000000400002457B8EEF4 +:10C72000050044481021FBF2BBFC2818844201D0CC +:10C73000002070BD012070BD70B5012014F0A5FE71 +:10C7400000285ED12F4C364D364E08E02078401C34 +:10C7500020700120FFF700F90120F9F7A3F92878EC +:10C760000028F3D1306800220821FDF20EF80028DD +:10C77000ECD102E00120F9F795F9FFF77FFF0028DF +:10C78000F8D02948FBF2FDFC040027480821FBF201 +:10C7900087FC050024481021FBF282FC2818844203 +:10C7A000E8D12248FBF2EDFC040020480821FBF20E +:10C7B00077FC05001D481021FBF272FC281884420A +:10C7C000D8D11B48FBF2DDFC040019480821FBF21C +:10C7D00067FC050016481021FBF262FC2818844211 +:10C7E000C8D11448FBF2CDFC040012480821FBF22A +:10C7F00057FC05000F481021FBF252FC2818844218 +:10C80000B8D170BD00B801C0C0A20080A802000469 +:10C81000C000000440A6008034A9008000A0008071 +:10C82000041800040000000474190004B81900047E +:10C83000AC1A0004481A00040922920180188908E1 +:10C840000E2210B50AF31FFC800010BD70B5050064 +:10C850000C0016002EF0A2FE00212560A171E671E9 +:10C8600008340A0006C42EF09DFE012070BD10B5EC +:10C8700004000C235843FF49401800210A000B0014 +:10C880000EC0200003F35EF8200003F366F82000DA +:10C8900003F34DF810BDF7B586B014000600F64A54 +:10C8A0000020009204900798210004AA03AB00F333 +:10C8B000ECFF6B46187C001F03286AD82006000E88 +:10C8C00005900FF32BFD0FF33AFD05007079032857 +:10C8D00006D16B461B7B05992A00300018F0ECF856 +:10C8E0002EF05CFE0190E54847690124AC402740EA +:10C8F000FFF75BF92404240C02902000FFF7BEF838 +:10C900006B46187BB823DB4A58433032801800212D +:10C91000A0300173D7496B46D94A187C383900F3E7 +:10C9200069FF6B46197C187B04F3A1FD6B46187CEC +:10C93000FFF7E8FA6B46187C059A29003300FCF7EC +:10C94000E3F96B46197B280004F39FFC6B46187CC7 +:10C95000320029001CF0B1FE6B46187C29001CF047 +:10C960004DFF002F02D02000FFF7ACF802A8FFF720 +:10C9700082F901982EF016FE6B46197B079A30005B +:10C980001DF0E5FE6B46187BFFF771FF012009B033 +:10C99000F0BD0020FBE7F7B584B005001600B64AED +:10C9A000009200240598310003AA02AB039400F31F +:10C9B0006CFFB54FB349380036F04AEA6B46187B36 +:10C9C000001F032847D8F913380036F042EA300632 +:10C9D000000E0FF3A3FC0FF3B2FC2EF0DFFD0600F8 +:10C9E000FFF7E3F86B460190187AB823A149584342 +:10C9F00030314018A0306B460473A14A187B683967 +:10CA000000F3F8FE6B46197B187A04F330FD6B4691 +:10CA1000187BFFF7A1FA2800FCF752F96B46187A49 +:10CA200004F3CCFC6B46187B29001CF0B8FD6B4668 +:10CA3000187B29001CF014FF01A8FFF71CF9300037 +:10CA40002EF0B0FD6B46197A059A28001DF07FFE86 +:10CA5000012007B0F0BD0020FBE7F8B50D0006008F +:10CA600000242EF09BFD844A07002906090E60323F +:10CA700030000FF37FF90A280DD27F4A0021000110 +:10CA8000603211548018C1602900300004F338FE70 +:10CA900014F052FC012438002EF084FD2000F8BD73 +:10CAA000F0B50400002085B0019008780D00000763 +:10CAB000400F16D104F3C9FA0700042811D07048BA +:10CAC00000F3CBFE0600401C0BD03806000E3106EA +:10CAD000090E020004900F00280004F373FB0028E5 +:10CAE00002D1002005B0F0BD607902280FD12000EE +:10CAF00033F01AFB0521C9014018807A80070BD555 +:10CB00005F20005D800707D50120019004E0200030 +:10CB100029F053FD0028F7D101990498E584636456 +:10CB20000100000038C7000000040000778D6B8210 +:10CB30001CF08BFF2A000499143220001DF0FBFD2D +:10CB4000281D0EF3FCEA0006000E0FF3F1FB0FF3B5 +:10CB500000FC029052480068012807D1B420005B15 +:10CB600003214902884201D336F080E96079032825 +:10CB70000AD1281D0EF3E2EA0106049B090E3A00D1 +:10CB8000200017F0A3FF01E0022803D10299300032 +:10CB900018F04DF81F20400120180079002806D019 +:10CBA00002200FF3D6FB0100300018F036F83D48A4 +:10CBB0003D4A416A02984000A430085A904201D18F +:10CBC0008031C8690104090C380003F04AFF0120D4 +:10CBD00004F0F3F8300004F307FD2B4A0120B10004 +:10CBE000383A5050294A0092049A3B00290020000C +:10CBF00000F33AFD3800FFF774F92EF0D9FC060077 +:10CC0000FEF7DDFF0390281D0EF398EA0206029856 +:10CC1000120E23003900FCF781F8281D0EF38EEA6E +:10CC200002060299120E230038001CF099FD281DFF +:10CC30000EF384EA02061D4802992318120E3800EA +:10CC40001CF09BFE03A8FFF720F830002EF0B4FC88 +:10CC5000012051E7F3B581B006002EF0A9FC0B4F7F +:10CC60000024009018206043395C00290BD0C519BE +:10CC700068780FF35DFB0FF36CFBB04203D1E878EB +:10CC8000029903F0EEFE13E04CCC000414CB000438 +:10CC900040A200800C1800046666FFFFBBBBBBBB54 +:10CCA000D006000414C70004FFFF000029020000A2 +:10CCB000641C2406240E042CD4D300982EF07CFC93 +:10CCC000FEBDF8B500252D4F18206843395C0029BA +:10CCD00024D0C419201D33F0AFFA06001ED06178AD +:10CCE0000022300014F0ACFD6B46198800010907E2 +:10CCF000090F014300911878000900011870A0780D +:10CD0000009904F335FA6B46188829000009608100 +:10CD1000002020736073300000F05DFE6D1C2D0656 +:10CD20002D0E042DD0D3F8BD70B505000C0002F314 +:10CD30001EFE0C216943124B5A5812185A50226099 +:10CD400070BD70B505000C0002F306FE0C226A43AC +:10CD50000B4951188A6812188A60226070BD70B53C +:10CD600005000C0002F3EDFD0C226A430449511842 +:10CD70004A6812184A60226070BD000014CB00049B +:10CD80004CCC000470B50500002433F0D7F9060040 +:10CD9000280013F04CFB0F2189012B7969180EF341 +:10CDA000A8EA07050F050511110F1100697902297D +:10CDB00002D1340064340CE000290AD0046808E091 +:10CDC0008C6A06E02EF0F4FBFF48F3F777FBF8F7E8 +:10CDD00017FF200070BD70B50500002413F027FB7D +:10CDE0002979002908D0012908D003290CD16979B3 +:10CDF000032901D001290FD144680DE00F208001E3 +:10CE00002818846A183407E02EF0D2FBEE48401C44 +:10CE1000F3F754FBF8F7F4FE200070BD70B5050081 +:10CE2000002413F004FB2979002908D0012908D037 +:10CE300003290CD16979032901D001290FD1C468D4 +:10CE40000DE00F2080012818846A253407E02EF0B9 +:10CE5000AFFBDD48801CF3F731FBF8F7D1FE200073 +:10CE600070BD0179012905D10F2189014018806A1F +:10CE7000353070475D30704770B50400FFF782FFB2 +:10CE80000500200033F05AF96179022904D1052107 +:10CE9000C9014018807A0CE006F034FB0F218901AB +:10CEA00061180128086902D12030807F01E020301C +:10CEB000007FC006C10F08D0200029005D3001F3BB +:10CEC00007F9002801D0012070BD002070BD70B5A9 +:10CED00004000D0033F032F96179022904D10521F3 +:10CEE000C9014018807A12E02079062802D15F201B +:10CEF000005D0CE006F006FB0F2189016118012896 +:10CF0000086902D12030807F01E02030007F810657 +:10CF10004006C30FCA0F200029005D3001F3E6F878 +:10CF200070BD70B504004079022802D0904E907612 +:10CF30000100000034CB00000004000083E21E3634 +:10CF40002079062806D12000FFF726FFC078400789 +:10CF5000C00F70BD2000FFF71FFF050006F0DCFAD0 +:10CF60000F2189010200611809690020012A02D1FC +:10CF70002031897F01E02031097F8907E9D5E978EF +:10CF80008907E6D0012070BD816889040AD5703018 +:10CF9000817B427B0802104380059149400F80004D +:10CFA000085870470920000270470100603040783F +:10CFB0008A688007800F920409D570318A7B4B7B89 +:10CFC000110219438905490F884200D808007047AB +:10CFD00080684006C00F70470100896800204A063B +:10CFE00002D5090600D501207047F7B584B00024AA +:10CFF00006000F00FFF7D0FE05003000FFF7F5FE3A +:10D0000003903000FFF714FF02003000FFF733FFFA +:10D010000300B0684006C00F0AD0039800216E4696 +:10D0200007C61A00069938002B0001F380F80400A7 +:10D03000200007B0F0BD08B50168836A01290AD154 +:10D04000002202600100674A18000092664A674B9E +:10D050001C3101F3E3F808BDF8B50D00FF21040011 +:10D0600017002D3106F0BAFB0028286011D0018985 +:10D0700022004618AC32F121890000923A00611872 +:10D080000D2306F0FFFB0320203630702968C020F6 +:10D090000881F8BDF7B5FF2105002D31544882B055 +:10D0A0002E18280006F09AFB04001BD020892A00C5 +:10D0B000AC32F12127188900009220003200691853 +:10D0C0000D2306F0DFFB042020373870C0202081BC +:10D0D000049A0399200001F3FBFB200006F010FCEA +:10D0E00005B0F0BD0020C043FAE7FFB587B01C00D3 +:10D0F0000600002006903F484068002802D03D48C6 +:10D100000BF358FD3B4F08981837002830D1207991 +:10D11000E178000208432BD13079012804D07179DD +:10D12000022901D0062807D1607900228006010F6C +:10D13000300014F08FFB05E060798006010F3000AD +:10D1400017F0CEFD050060796B461875A07958750B +:10D15000244AF120800003922349099A3018029151 +:10D16000019000927A89059B2900300001F3C8F9EB +:10D1700030001FF05FFB05006079C3210840397A59 +:10D1800023008906090F890008436071069A0092FE +:10D19000099A0899280001F384F928001FF0C1FBBF +:10D1A0000BB0F0BD7CB504002EF00CFA124905005E +:10D1B00048686B46401C4860E0799870207AD870C7 +:10D1C000A07A617A000208439880E068631C01221B +:10D1D00069461FF0F3FC280010E000000300010086 +:10D1E000B03004002BCC000014CB000474CB00043E +:10D1F0002902000040FF02C010B801C02EF0E6F97D +:10D200007CBD7FB504002EF0DDF90500FE4A21004B +:10D2100001A801F347FB002807D0012200922069F2 +:10D22000621C022101ABFFF760FF28002EF0CEF94F +:10D230007FBDF8B50D0001244179022915D10F21D8 +:10D2400089014118096801290FD132F0A8FF0600B1 +:10D2500028000FF377F88521895D0091010000987F +:10D260000AF098FD002800D000242000F8BDFEB58B +:10D270000400401C32F0EAFFE44F05004AD0A868E1 +:10D280004006C00F46D0207A8006010F2800FFF725 +:10D29000D0FF00283ED0207A8006010F01916879E6 +:10D2A000032801D001280BD1280033F073F8217A2C +:10D2B0000600C32001403007800E0143217200E0C8 +:10D2C0000E00D3493200200001F3BCF9411C39D0D3 +:10D2D000621C280002A9FFF7BFFE0298002819D09F +:10D2E00000223100280014F0B5FA01000298220053 +:10D2F00001F380F9207AC321084001990907890EBA +:10D3000008432072C048E1790170029806F0F8FAEB +:10D31000401C01D1380013E0BE480E2221000DF35D +:10D32000D6EDBC48056118380BF3D4FBB94864222C +:10D330000092B94AB74B012118380BF392E8C36445 +:10D340000100000030CF000000040000D038CD5AAA +:10D350000AFC0120411C16D1617B227B090211438A +:10D36000E181E17AA27A090211432173090A61730A +:10D37000217AA172617AE172012100222172627226 +:10D380002170A6490A70FEBD7CB50400401C32F035 +:10D3900067FFA34E050012D0A8684006C00F0ED04C +:10D3A000621C280001A9FFF761FE0198002806D041 +:10D3B000210001F36BF9019806F0ACFA0600701C2D +:10D3C00002D10120207020E0607A217A0002084317 +:10D3D0001BD1974A0092974A00212B00200001F3AD +:10D3E000A0FAA07A934A8006010F601C0EF3E0FCBD +:10D3F0000A280AD2E17AA27A090211438A098E49DF +:10D40000000141182800FFF73FFA30007CBDFEB54F +:10D410000400401C32F024FF814E050003D0A868B0 +:10D420004006C00F01D13000FEBD6879032801D04D +:10D4300001280AD1207A0109280032F0B5FF217AAB +:10D440000907090F000101432172E0796B46187248 +:10D45000207A587202980190A07A617A07020F43ED +:10D46000621C28006946FFF701FE0098002801D1E0 +:10D47000300006E001993A0000F361FF009806F0E1 +:10D4800049FA411C02D101212170FEBD0028FCD1C6 +:10D4900065480B2221002C300DF322ED62482C3020 +:10D4A000C56018380BF320FB5F486422143003007A +:10D4B0000092624A012118330BF355FB0120FEBD97 +:10D4C00070B50B004A780D7811020F229201801876 +:10D4D0000069002429435C30012902D10422991CEF +:10D4E00002E001000422981C0DF3FAEC200070BD4C +:10D4F00010B5FFF7D9FD002800D1012010BDF7B508 +:10D5000082B005000E004F6B8C6BFFF74FFCA968D3 +:10D510004906C90F0BD02979012909D1484A2B00A6 +:10D5200000924848049AAC33310001F3F5F8E1E584 +:10D530006979032901D00129F9D1002CF7D0002FF6 +:10D54000F5D001794A07D30F22795207D20F9342BF +:10D5500004D0FB2319409200114301710179CA06DE +:10D56000D30F2279D206D20F934204D0EF23194071 +:10D57000120111430171C1780A07D30FE278120733 +:10D58000D20F934204D0F7231940D2001143C17047 +:10D59000017922798B0792079B0F920F934203D058 +:10D5A00089088900114301712800FFF779FC020006 +:10D5B0000021280029F08DFB9CE570B50400C87996 +:10D5C0008A7905020F2080011543201802698B78A3 +:10D5D0002032012D02D0022D36D109E01377CB780D +:10D5E000537700690A79403002704979417008E048 +:10D5F0009377CB78D37700690A7940308270497984 +:10D60000C170200010F040FB2000FFF749FC020031 +:10D610000021200029F05DFB70BD000010B801C0A2 +:10D62000FFFFFFFF14CB000458FF02C0F7CD00003E +:10D630002BCC000074CB000460CF000499CD000017 +:10D64000404B4C00C8E800041377CB78537702694D +:10D650000B79403213704B79537002698B7820320A +:10D66000C6E710B5CA798C7913020F22920182188D +:10D67000106923432030022B0AD1837F8B70C07F37 +:10D68000C8701069403082780A71C078487110BD46 +:10D69000037F8B70407FC8701069403002780A7138 +:10D6A0004078F3E7F8B505000E000024FE4B31008A +:10D6B00020006A4600F34BF8012808D12100300011 +:10D6C000FFF7E9F900222100300000F3F0FDF74AEE +:10D6D0003100200000F36AF8012809D1220031004E +:10D6E0002800FFF776F901222100300000F3DFFD6A +:10D6F000641C2406240E082CD8D3F8BD38B50400C9 +:10D70000FFF754FB0500A068C02188430022A060F9 +:10D71000E74811001300009201F33BF8207901283B +:10D720000AD100220F20800120180092806A110087 +:10D730003530130001F32DF8DE4A20000092DE4A56 +:10D7400029005D30002301F324F8DC4877C2443718 +:10D75000010000002CD30000000400006FFDE8E988 +:10D7600021182000FFF7A8FF00221100200029F057 +:10D77000BAFA38BD0022010010B5403182870A8014 +:10D78000C2874A8020390A7F20231A430A778A7F7A +:10D7900044301A4342231A438A7718210DF346EC8A +:10D7A00010BDF8B50E000189456909180C6F2800F5 +:10D7B0001AF005FB002807D0E078400604D5218840 +:10D7C000200020300F1801E027002037380001F337 +:10D7D0004AF8002813D0BB4AA31D483200921C000F +:10D7E0002A003900300001F301F80006000E05D0D0 +:10D7F00023003200390028001FF0F4F9F8BD38008A +:10D8000001F33BF80028F9D028790228F6D032003D +:10D81000390028001FF0FBF9F8BDFFB583B01400F4 +:10D82000039832F0A9FC4B21C90040180290002057 +:10D8300001906078217800020843052864D9401FD0 +:10D8400004060498240E401D00900398C1790079C5 +:10D8500012F0CDFA32F0B7FC092686570700007A9D +:10D86000083780063500800F0B2101280BD1F21EEE +:10D87000012A00DDF01E050608002D16F11D0B29FA +:10D880000FDAF01D0DE0032839D10120F21F012A23 +:10D8900000DDF01F050608002D16F11C0B2900DA2B +:10D8A000F01C060636162AE000982200492118F0DE +:10D8B000D5FD010028D04A78901C0006000E844651 +:10D8C0000020521E96460EE00B18DA78AA4207DBBB +:10D8D000B24205DC7B78934202D00120019004E043 +:10D8E000401C0006000E8645EED80098081A221A41 +:10D8F0006046101A0406240E604608180090002C9A +:10D9000002D001980028CFD002982030807C800778 +:10D910000BD5049800794007800F02D101980128A7 +:10D9200003D10398002108F0A5FE0498092100798D +:10D9300008420BD048206B46187001205870002018 +:10D940009870039803226946FFF7B8FB012007B0DF +:10D95000F0BDFEB50500160048780C0001270C3616 +:10D96000002818D001281CD002282FD1A868C00494 +:10D970002DD52879002808D1E078000905D155482F +:10D98000002182680B002EF024FB220031002800C9 +:10D9900000F355FD1BE022003100280000F0EAF8FA +:10D9A00015E02DF023FE01904848A178401E027832 +:10D9B000914207D10021017023003200280000911C +:10D9C000FFF7A7FB01982DF015FE00E000273800B7 +:10D9D000FEBDF8B5002401263D49394F36034518F0 +:10D9E00018206043C119385C0A000A3200280BD0A5 +:10D9F0001088B04208D0091D062228002DF021FA17 +:10DA0000002801D10120F8BD641C042CE8D30020BB +:10DA1000F8BDFEB504000D00407902280DD12000AC +:10DA20000AF01EFE002808D0112040012018418A6B +:10DA30000122200007F051FEFEBD18216943204855 +:10DA400002AA0D1868892F000D370190781E0090EA +:10DA50000821200005F0F5FE0600EDD00298042113 +:10DA6000006F0170002141702030042104000DF38B +:10DA700008EB20780421084320706078010768785B +:10DA8000090F000101436170E078A17800020843AA +:10DA900001990007000F09010843A070000AE07017 +:10DAA0000D49300003F02EFC0028C5D03878401C0A +:10DAB0003870009801210170FEBD000074CB000495 +:10DAC00014CB000424FF02C074FC02C011B801C0D2 +:10DAD00029020000C02C000402100000F8B5050067 +:10DAE0002DF084FD434E0700002418206043811967 +:10DAF0000A00305C0C32931E002814D010780028E5 +:10DB000011D118880122120390420CD03A48091D05 +:10DB1000062228182DF095F9002804D12106090EB7 +:10DB20002800FFF776FF641C042CDED338002DF0AC +:10DB300061FDF8BD10B504005F21095D0020C90733 +:10DB400017D06079022805D1200032F015FB403053 +:10DB500080780CE005F0F4FC0F218901DD6E8D4E1C +:10DB60000100000028D70000000400003C273B858E +:10DB700061180128086902D12030807F01E020303F +:10DB8000007FC007C00F10BD7CB504000E00806888 +:10DB900015004006C00F0FD02EF0D4FD002807D08E +:10DBA0000F208001201800694030007FC00703D19A +:10DBB00000F053FD00280ED03200200001A9FFF72D +:10DBC00069FA0198002805D0290000F3E1FB0198CB +:10DBD00005F0B4FE7CBD207900280ED1E8788006DF +:10DBE000000F0AD1E8796B461870287A58700848F7 +:10DBF000009A230000212EF0F6F9220029003000BF +:10DC000000F3E3FB7CBD000014CB000429020000FC +:10DC1000C02C000410B5FF4C606B002805D135F016 +:10DC200052E9002801D001206063606B10BD10B57F +:10DC300035F04CE9F7490020486310BD30B50020AD +:10DC4000F54D0D21040003008901691814E0E8680E +:10DC5000401CE8601000526B8A62002A00D1CB623F +:10DC60000279052A0BD12A69521C2A61836203605A +:10DC700003710020002C02D18A6A002AE7D130BD4E +:10DC800010B50A68E44B002A03D11868401C1860DC +:10DC900010BD8A6A824203D05868401C586010BD8B +:10DCA000DC480024026A002A0FD08A4210D09A6809 +:10DCB000521C9A6004220A71C26A002A01D0516380 +:10DCC00000E08162C1624C6310BD012201620A71F1 +:10DCD000006A07228462D148402100682EF0A3FD2B +:10DCE00010BD10B50A68002A10D0CA4A936B83424F +:10DCF0000CD1106A002809D0884207D10020906317 +:10DD0000C6480722006880212EF08DFD10BDF0B5B9 +:10DD1000050085B000F0AEFC002000F0B9FC040066 +:10DD20007ED0286BBB4F2063786A401C78622060ED +:10DD300000F0A8FC01F377FB029000200391019012 +:10DD400020682E0000212036002802D101207862B0 +:10DD500020600023270020372371787BEF210840C3 +:10DD60007873307A6071A079717A800889078000B1 +:10DD7000890F0843F321A0710840B17A8907090F80 +:10DD80000843CF21A0710840F17A8907890E084322 +:10DD9000A07169692869594008430DD02A69029821 +:10DDA0006B690399121A8B410AD3029A2869039B63 +:10DDB0006969801A994102E0A869002800D00190A1 +:10DDC00001A80DC8002180185941E160A060E869F0 +:10DDD0002061286A6061686AA0612868E0616868FB +:10DDE0002062A8686062787B317B40088907400028 +:10DDF000C90F0843FD2178730840317B4907C90FDB +:10DE000049000843FB2178730840317BC906C90FDC +:10DE100089000843F72178730840317B890600E0C8 +:10DE20001DE0C90FC900084378730220B873307B26 +:10DE3000000701D50620B873317B0120C90700D146 +:10DE400002203873BA7B230000927548019A283368 +:10DE50002100F8F747F8002806D1206001E000F023 +:10DE600011FC002005B0F0BD2068FBE7F8B50525E2 +:10DE70000E0000F00DFC04006648016AA14216D1B4 +:10DE8000A06A002803D0FCF2C4F80020A062002E93 +:10DE900066610CD0002223000092614828333200D2 +:10DEA0002100F8F71FF80325002800D104252800D9 +:10DEB000F8BD70B5052500F0EBFB04005548016A7C +:10DEC000A14207D1A06A002804D0FCF2A2F80020E9 +:10DED0000325A062280070BDF8B50F00052600F0EC +:10DEE000D7FB4C4C0500216A814215D1A06B00285C +:10DEF00003D0FCF28EF80020A063002F0CD0454B1D +:10DF000000220092474838333A002900F7F7EAFF29 +:10DF10000326002800D104263000F8BD70B5052581 +:10DF200000F0B6FB3B4C216A814207D1A06B002870 +:10DF300003D0FCF26EF80020A0630325280070BD1A +:10DF400038B50120FDF73AFD324C2C20236AC15C24 +:10DF50005A6A1868DB699847206A006B04F02DFB49 +:10DF600000F088FB2DF04CFB216A0500912CAA08DB +:10DF70000100000024DB000000040000C8484E310E +:10DF80000020086000F088FBFFF762FE2062280096 +:10DF90002DF044FB216A002909D02E20425C0B00A1 +:10DFA0000092264A23482833F7F7A6FF03E0FFF73D +:10DFB00048FE15F09FFE032038BDF8B50500204847 +:10DFC000194F006A002813D0386A046B200014F03F +:10DFD0009CFA182D06D1022804D01949203109795C +:10DFE000814204D12A000021200005F005FDF8BD82 +:10DFF000072032F0E5F84DE0386A006BB04204D0FB +:10E00000300020F026F9002840D12C00162D1FD119 +:10E01000300020F003F9002833D07079022830D185 +:10E02000386A2030407B0DE0703600043033000445 +:10E030007C05000439D800009BD80000A0860100B0 +:10E0400018420004400701D52A241AE0282418E0C9 +:10E05000192D03D01A2D01D0182D12D10F208001B7 +:10E0600030180069817B002901D02C2409E0C07B95 +:10E07000002801D0292404E0386A006BB04200D0A7 +:10E08000182422000021300005F0B6FC07213000E2 +:10E0900011F06AFE0600AFD1F8BDFEB505250F00F0 +:10E0A00000F000FB040073D0A06A0026002802D014 +:10E0B000FBF2B9FFA662FC4D286AA04273D100F0C2 +:10E0C000E3FA2DF0A7FA01902079022801D0012867 +:10E0D00010D12034607B10210843607300F0DCFA1B +:10E0E000F2480722006840212EF0A7FB01982DF08E +:10E0F00095FA53E001982DF091FA207903281ED16A +:10E10000267100F0C9FA286A2030072F077308D05B +:10E11000082F0BD11A20FFF750FF39200EF0B0FA6C +:10E1200042E01920FFF749FF3820F7E7286A006B23 +:10E130001FF0C8FA1820FFF740FF3720EEE7042849 +:10E140002ED100F0A9FAE369626A20680B21984792 +:10E15000286A006B04F03BFA00F096FA2DF05AFAA8 +:10E1600026600700267100F097FAFFF771FD28621C +:10E1700038002DF053FA296A00290BD02E20425C7A +:10E180000B000092CA4ACB482833F7F7B5FE05E0EA +:10E190000BE008E0FFF755FD15F0ACFD0320FEBDD8 +:10E1A00000F07AFA00E0266003252800FEBD70B575 +:10E1B000040004252DF02EFA0600BB48006AA04298 +:10E1C00019D0217920680325042906D10521217160 +:10E1D000E369626A0B2198470DE0A06AFBF223FF16 +:10E1E000012808D1E369626A20680B219847002161 +:10E1F000A1622160217130002DF010FA280070BD5D +:10E2000070B50500042400F03FFA280000F04AFA37 +:10E21000002802D0FFF7CBFF040000F03DFA2000F9 +:10E2200070BDF8B505000E0000F02EFAA24F0024D4 +:10E2300038206043C019816900290ED0002D03D019 +:10E240004521095C890705D4002E06D04521095CCB +:10E25000C90702D01830FFF7AAFF641C0F2CE7D3C0 +:10E2600000F01AFAF8BD01210020DAE710B51FF01E +:10E270001EF8002801D1012010BD002010BD38B5C6 +:10E280001FF0DEF81620FFF798FE1520FFF795FE29 +:10E29000854C206A4179002906D081790091417925 +:10E2A00000980022FFF7E2FF216A03200871206A2C +:10E2B00002002030417BCB0608D5EF22114041738C +:10E2C000206A06210068FFF7E8FE1FE09069002839 +:10E2D00008D001F3B2F8256AAA68EB68801A994160 +:10E2E000A9690860216ACB694A6A086803219847CE +:10E2F000216A4869002809D08A6A002A06D100925A +:10E300000B0002006B482833F7F7F6FD032038BDF9 +:10E31000F1B582B0694E644D306800282BD12C6A6B +:10E3200027002037787B0107CA0F00924007C30FF0 +:10E330006179206BA21D15F0ABFC1FF072F8E36948 +:10E34000397B626A20689847022829D00298002801 +:10E3500005D01620FFF731FE0120306005E01720C0 +:10E36000FFF72BFE36200EF08BF9296A0220087188 +:10E37000306800281BD0286A2030407BE8AF30FE90 +:10E380000100000020DF0000000400009B929D5D62 +:10E39000400711D5042013F0BEF800280CD111F06D +:10E3A00034FD040011F03EFD844205D04948006A66 +:10E3B000002801D10220FEBD0020306035200EF083 +:10E3C00069F90320FEBDF7B586B0040016000025EC +:10E3D00013002F0003AA04A905A830F091F8059BAB +:10E3E000002B14D06069002802D1306801256061DB +:10E3F000039A079901920091220000211E000498BF +:10E400000B00B0470700002D01D0002060613800EC +:10E4100009B0F0BD70B586B00600002503AA04A9B6 +:10E4200005A802AB30F06CF8059C002C09D0039ACB +:10E43000002101920A000091310004980023A047B6 +:10E440000500280006B070BD1C482030017F491C23 +:10E4500001771A49096A00290AD00A79032A07D1E3 +:10E46000427F521C4277CB694A6A086809211847E3 +:10E470007047124810B5006A00280BD02030017B8D +:10E48000032907D1012101730D48072200684021AB +:10E490002EF0DDF910BD70B50420084C236A002B66 +:10E4A00033D02C21C95C18680325012918D1FFF746 +:10E4B000C5FB00281FD0012019E0000070360004C1 +:10E4C0007C050004A086010039D800003033000428 +:10E4D0000003000418420004206A2030057313E092 +:10E4E000022913D1FFF7AAFB002804D00020FFF770 +:10E4F00019FF0328F0D00120F7F71AFB784807220C +:10E50000006840212EF0A3F9032070BD03290ED12D +:10E51000186B0F21890140180069022103F0D6FF12 +:10E52000206A042120300173FFF7B3FEECE70629CF +:10E5300001D1062006E0072907D100210120FFF7BD +:10E540007AFE0720FFF710FDDEE7082901D1082039 +:10E55000F8E75A6ADB699847D6E762490420096AF6 +:10E56000002907D00A79032A04D1CB694A6A0868CE +:10E57000052118477047052801D2002801D1002045 +:10E580007047594AC000801806C906C0012070476C +:10E59000F3B587B002250798427803781002184334 +:10E5A000012836D1079F891EBF1C30E0F8780E1F66 +:10E5B000B97800023C000843B0422ADC6078217838 +:10E5C00000020843FF3864381AD1201D0CF3F2ED25 +:10E5D000401E0090200008300CF3ECED7D23DB00A2 +:10E5E0005843019020000C300CF3E4ED7D23DB0058 +:10E5F00058430290009801A90006000EFFF7BBFFE8 +:10E60000E078A17800020843311A3F1DC719042998 +:10E61000CCD2FF2064306B4698810C20D881079FB4 +:10E62000BF1C01243048E1000E18601C7D210490BD +:10E630003068C9000DF3CCE97D2105907068C900F0 +:10E640000DF3C6E906901022380003A90CF370EC14 +:10E6500010371035641C052CE4DB2800D8E621486F +:10E66000006A002800D0012070471E48006A002878 +:10E6700000D0012070471B48006A002800D0006BC2 +:10E6800070471A480068002806D01649096A0968C8 +:10E69000814201D1012070470020704711480021BC +:10E6A00010B5006BC9432EF0D6F810BD0D4810B55B +:10E6B000006B2EF0D7F810BD30B504000C4D0020D3 +:10E6C000010038224A4352199369A34201D1100034 +:10E6D0001830491C002801D10F29F2D330BD0000A9 +:10E6E0007C0500047036000404030004680E000476 +:10E6F0003033000410B5002420290FD065290BD138 +:10E7000008480DF32FFA002805D1064814300DF300 +:10E7100029FA002800D00124200010BD02488260A0 +:10E72000FAE7000000D000042C030004FA48C06897 +:10E73000012800D00020704710B5040003280CD831 +:10E74000112017F0C2FECF210840210110390143EA +:10E750000906090E112017F0CEFE10BD70B5040099 +:10E760000D001600F6F714FE2000FFF7E5FF31005C +:10E77000280017F0C0FE0120FFF7DEFFF6F74FFE7E +:10E7800070BD70B504000D00F6F702FE832242C191 +:10E79000010000001CE3000000040000B30318E0C7 +:10E7A0002000FFF7D3FF280017F099FE0400012096 +:10E7B000FFF7CCFFF6F73DFE200070BD0002FF30F2 +:10E7C000313070B500041407000C240FCA070FD0B5 +:10E7D000491E4910081805042D0C29000220FFF7D6 +:10E7E000DAFF0007000F210101430A06120E0BE0B9 +:10E7F0004908081805042D0C29000220FFF7CBFF5B +:10E80000000900012200024329000220FFF7B0FFA7 +:10E8100070BD00024018FF3011300104090C0220C5 +:10E82000A6E70800110010B517F06FFE10BD080034 +:10E8300010B517F054FE10BD70B50C00150008009F +:10E8400017F04DFEA8430100200017F05EFE70BDDA +:10E85000F8B50120B5498860F6F7A4FD00252C0223 +:10E860002000FF309F300004000C072117F086FEC7 +:10E87000FF34A0342004000C042117F07FFE28068A +:10E88000000E070010222021FFF7D6FF00242606E5 +:10E89000360E002231003800FFF7BBFF00223100A6 +:10E8A0003800FFF78BFF641C142CF0DB6D1C012D6E +:10E8B000D5DBF6F7BEFD02F042FEF8BDF8B5002547 +:10E8C000F6F770FD30272E023000FF30B63004041A +:10E8D000240C200017F003FE38430100200017F03D +:10E8E00014FE3000FF30BA300004000CFF2117F096 +:10E8F0000CFE3000FF30BB300004000C002117F08C +:10E9000004FE300041300004000C042117F02BFEFF +:10E910000024FF22210028001AF0E9FB0022210038 +:10E9200028001AF0F9FB002221002800FFF771FFF0 +:10E93000002221002800FFF741FF641C2406240E5A +:10E94000142CE6D33000FF3017300004000C4021B7 +:10E9500017F009FE3000FF30A0300404240C8021A1 +:10E96000200017F000FEFF369F363004000C022115 +:10E9700017F0F9FD0421200017F0F5FD6D1C2D06A0 +:10E980002D0E012D9FD3F6F754FDF8BD67490020E9 +:10E9900010B58860FFF792FF02F0DAFD10BDF3B505 +:10E9A00081B000250E002C000127019817F097FD7B +:10E9B0003100814304D13800A040284305062D0EC4 +:10E9C000641C012CF1DB2800FEBD70B505000E00B3 +:10E9D00000243100280017F098FD641C012CF8DB9E +:10E9E00070BD70B50C001500080017F078FD2843C5 +:10E9F0000100200017F089FD70BD70B505000E0004 +:10EA000000242006000E32002900FFF7EAFF641CF4 +:10EA1000012CF6DB70BD70B505000E000024200649 +:10EA2000000E32002900FFF707FF641C012CF6DB03 +:10EA300070BD012804D13E48405C3E49400002E0E0 +:10EA4000491E48003C49085A704770B50028374BAA +:10EA50003A4C596018705A70237802D1DF252B4048 +:10EA600003E0012802D120252B43237001F01AF87E +:10EA7000012070BD2D48406870472C4800787047D1 +:10EA80002A484078704702000020002900B512D0C3 +:10EA900011000120FFF7CDFF29490122884209D941 +:10EAA000274902229631884204D926490322884206 +:10EAB00000D90422100000BD23487D2110B5006854 +:10EAC00049012CF0ACEA8905800A08431F4900E09F +:10EAD000401E0A68002A01DB0028F9DC002803D167 +:10EAE00012490869401C086110BD002010B517F0DC +:10EAF000F6FC0E4CA070012017F0F1FCE07010BD88 +:10EB000008B5F6F74FFCFFF7F0FF114817F01BFDB3 +:10EB1000F6F78FFC002069461CF0BEFA002819D1D8 +:10EB20006B461870587098701BE000003C0300049E +:10EB3000903D0400C4EE3100A8EE3100C4E80004AA +:10EB40003214000044160000A0B701C0002B008062 +:10EB50004C7901C06B461878012802D1FFF778FE86 +:10EB600003E000210800FFF711FFF6F71BFCF6F7A2 +:10EB700060FC1AF04BFA08BD10B5FFF7C1FF012089 +:10EB80001AF0F4FC012010BDFF48C0787047FE4821 +:10EB90008078704770470002FF3070B5E2D416DB12 +:10EBA0000100000018E7000000040000E0D9CB8C51 +:10EBB000BC3004040D00240CF6F7FEFB29002000F5 +:10EBC00017F0ADFCF6F73FFC70BD0002FF30BC3023 +:10EBD00010B50404240CF6F7EFFB200017F089FCB5 +:10EBE0000400F6F730FC200010BDEC4810B5426878 +:10EBF0000078EB4B002808D151001A000A3289181E +:10EC000020391888C98B081821E011000120FFF76E +:10EC10001AFFE44C0221595EA04211D9E14C0421B3 +:10EC2000595E9634A0420BD9DF4C0621595EA042B2 +:10EC300006D9DD4C00217D34A04201D80821595E5F +:10EC4000DA48805CD64A40002632105A4018000448 +:10EC5000001410BD0002FF3070B5E93005040A064B +:10EC60000C002D0C120E29000320FFF78BFD200451 +:10EC7000020E681C0104090C0320FFF783FD20022B +:10EC8000020EA81C0104090C0320FFF77BFDED1CFC +:10EC90002904220E090C0320FFF774FD70BDF1B5A5 +:10ECA00082B0F6F789FB0220FFF75AFD0025029992 +:10ECB0000024680040180190200246193000FF30FF +:10ECC00091300004000C17F014FC8707FF367136F2 +:10ECD0003004BF0F000C17F00CFC8000620001999B +:10ECE0003843641C012C8852E6DB6D1C132DDEDBDF +:10ECF0000120FFF735FDF6F7A6FBFEBD0002401828 +:10ED0000FF3051300104090C022010B5FFF74DFD12 +:10ED10004006400E10BD10B51AF0C0FA10BD00023A +:10ED2000FF3041300004000CCA0710B509D0491E5D +:10ED3000491008180104090C0220FFF736FD0009EC +:10ED400010BD490808180104090C0220FFF72DFD29 +:10ED50000007000F10BD0002FF30801D70B50504D4 +:10ED60002D0C0024FF2229000220FFF70BFD6D1C53 +:10ED7000641C2D0424062D0C240E022CF2D370BD2D +:10ED8000FF230A3370B5002A00D11B1FCA08D2180E +:10ED90000002801804044D07240C6D0F210002208E +:10EDA000FFF703FD0121A94001430A06120E2100CD +:10EDB0000220FFF7E7FC70BD10B54C07640FC908CF +:10EDC0000002002A02D0FF310A3101E0FF31891D23 +:10EDD00040180104090C0220FFF7E7FC01210A009A +:10EDE000A240024200D00021080010BD0100012015 +:10EDF000002900D00020704710B501246420F6F7E8 +:10EE000039FA6B487D21006849012CF012E9890527 +:10EE1000800A0843674900E0401E0A68002A01DBB7 +:10EE20000028F9DC5D49002805D148690122002449 +:10EE30001204801801E04869401C4861200010BDA0 +:10EE40000100012010B5FFF7FEFD564A0021AA3A45 +:10EE5000904217D9534A0121904213D9514A0221B5 +:10EE6000963290420ED9504A0321CD3A904209D9A8 +:10EE70004D4A0421904205D94B4A0521C83290429F +:10EE800000D9891F0804000C182344495843343121 +:10EE9000401817F062FB10BDF7B58EB00E98002831 +:10EEA00000D0012001900F98002501280BD00F9869 +:10EEB0004008012801D1012505E00F9802258008AE +:10EEC000012800D0ED1E0198344980001C310D90BE +:10EED0000858691C74D001990C23304A5943C43234 +:10EEE0008B18AA000B920C919C582C4BDC33CB183E +:10EEF0009B580393294BF433C9188958029117F092 +:10EF00002CFB200017F029FB0024F6F755FAE80047 +:10EF10000A90182060432849260240180A990700E1 +:10EF2000405801063000FF3031300004000C090E5B +:10EF3000099017F0F4FA0A99781840680106300031 +:10EF4000FF3030300004000C090E089017F0E7FA8B +:10EF5000022D3AD1FFF7FEFB002836D017482701D3 +:10EF6000C05901060998090E17F0D9FA13483F183D +:10EF7000786801063000FF3033300004090E000CC1 +:10EF800017F0CDFAB86801060898090E17F0C7FA0D +:10EF9000F868FF360106090E323612E03C03000421 +:10EFA000B036000432140000441600006D0D93F4D6 +:10EFB0000100000014EB00000004000014B6BE388D +:10EFC000903D0400A0B701C0002B0080440C000459 +:10EFD0005C540004B1E03004000C17F0AAFA641C81 +:10EFE0002406240E012C9ED3F6F737FA0320FFF7F0 +:10EFF000C1FB019801281DD1022D1BD1A74E002471 +:10F00000A00081198978305A17F093FA641C142CE7 +:10F01000F6DBFF20FF21ED3017F08BFAFF20FF21F8 +:10F02000EE3017F086FAFF20FF21EF3017F081FA5B +:10F03000FF213BE00EA807C818F087FF0600000676 +:10F04000000E6B46187007903004000E5870069042 +:10F050003002000E98700590300E0024D870012701 +:10F0600004903800A040304205D00399A000411818 +:10F070008978039A04E00299A00041188978029ADD +:10F08000105A17F056FA641C142CEADBFF2007997B +:10F09000ED3017F04EFAFF200699EE3017F049FADE +:10F0A000FF200599EF3017F044FA0499FF20F03063 +:10F0B00017F03FFA1BF0CBFC00283BD078490D98A5 +:10F0C000774A08580C99E8328A180B995658754AAD +:10F0D0000C998A180B99575817F049FA0320FFF733 +:10F0E00049FB019801280DD1022D0BD16E4D002452 +:10F0F000A00041198978285A17F01BFA641C142CB7 +:10F10000F6DB17E00EA807C818F01FFF0500002463 +:10F110000120A040284204D0A00081198978305AEB +:10F1200003E0A000C1198978385A17F002FA641C6C +:10F13000142CEDDB0120FFF71DFB11B0F0BDF7B57E +:10F1400084B00498002801D0012200E000220026AB +:10F15000012909D04808012801D1012604E002262E +:10F160008808012800D0F61E4D4990000831085843 +:10F17000711C01D1002406E00C215143494A183288 +:10F180008918B2008C5817F0F2F9200017F0EFF947 +:10F19000F6F71CF90024F00003901820604343495F +:10F1A000250247180398385801062800FF303130EF +:10F1B0000004000C090E029017F0BBF903983818F0 +:10F1C000406801062800FF3030300004000C090EB2 +:10F1D000019017F0AEF9022E26D1FFF7C5FA0028EC +:10F1E00022D033482701C05901060298090E17F0B2 +:10F1F000A0F92F483F18786801062800FF30333007 +:10F200000004090E000C17F094F9B8680106019883 +:10F21000090E17F08EF9F868FF350106323528041B +:10F22000090E000C17F085F9641C2406240E012C2D +:10F23000B3D3F6F712F90498012802D10698FFF724 +:10F2400009FE07B0F0BD002810B505D11948002906 +:10F2500000D1194817F08BF910BD10B5F6F7D2F9A7 +:10F2600016494000085A4004000C10BD70B5040057 +:10F270000D00FFF7F2FF030029002000FFF7EDFB70 +:10F280000022190017F099F970BD0D490868022293 +:10F29000904308600B49002008607047D88501C082 +:10F2A0006003000460040004F08C01C0440C0004FE +:10F2B0005C540004048001C0148001C000300400CC +:10F2C000002B0080E407000470B5FE4C6068012547 +:10F2D000ED0528436910884360600120F5F7D4FFED +:10F2E00060680321890508436060A843606070BDC1 +:10F2F00010B50400F4480068002801D100240CE097 +:10F300000021012016F02AFBF049A00040180068F7 +:10F310000406240E012016F043FB200010BD70B53A +:10F32000040018D00021012016F018FBE848E74B34 +:10F33000E849026806E0012A03D18000A578C018D8 +:10F340000560241D20888842F5D1A578FF2DF2D1D3 +:10F35000012016F025FB70BDDF48012210B5052104 +:10F3600042700170DD480168130619430160DC48F2 +:10F370000168114301602CF075F90400D948FFF7CA +:10F38000CEFFD948FFF7B4FFD349891FC8702000CA +:10F390002CF06CF9012010BD70B52CF063F905005C +:10F3A0000020FFF7A5FFCC4CA41F207128002CF0F3 +:10F3B0005DF9207970BD70B52CF054F9222BCDE9A0 +:10F3C0000100000010EF000000040000476C6D54C5 +:10F3D00005000120FFF796FFC44CA41F60712800B0 +:10F3E0002CF04EF9607970BD00207047BF49891F2D +:10F3F000487070474042022900D90221BB4A890067 +:10F400003E328918BE4A1268012A01D18A5601E0AB +:10F4100000228A5601231018B44A921FD3560222A2 +:10F420008A56C018824203DB03228A56824200DDDC +:10F430001000000600167047B14910B50A68AB49C4 +:10F440004042891C012A01D18A5601E000228A56D5 +:10F45000A64C0223CB56A41C0321615610188342EC +:10F4600001DA180002E0814200DD08009F4B03240E +:10F470009B1F1C57121B8A4200DC0A000006001664 +:10F480009A7010BD99490278891C0A7002794A70F5 +:10F4900082783C310A7082794A7042780A714279E6 +:10F4A0004A71C2780A72C079487270478F4B042142 +:10F4B0009B1CC9431A0019703C325970117051706D +:10F4C00011715171117251727047002801DD0020D5 +:10F4D00004E06421C943884200DA08004042000683 +:10F4E000001670470020704770B505007D480C007D +:10F4F000006800280AD00021012016F039FA784966 +:10F50000A80040180460012016F054FA70BDF7B549 +:10F5100088B00400002002902CF0AEF80390002583 +:10F520002004000C07900998002824D10024280604 +:10F53000000E069002AA01920094069B0A9A07996F +:10F54000099833F004ED00280FD0684829014A30AB +:10F550000E18A7006B46F05B597AFFF7C5FFF0194C +:10F560006B464088197AFFF7BFFF641C2406240EFF +:10F57000042CDFD344E00998012841D10024280657 +:10F58000000E059002AA00940192059B0A9A079921 +:10F59000099833F0DCEC00282DD0012C1AD1182169 +:10F5A0005248694300265A300F18A0198000049071 +:10F5B0006B46385A597AFFF797FF04986B4638180C +:10F5C0004088197AFFF790FF761C3606360E052E16 +:10F5D000EBD310E01821454869435A300E18A700B4 +:10F5E0006B46F05B597AFFF77FFFF0196B46408856 +:10F5F000197AFFF779FF641C2406240E022CC1D36C +:10F600006D1C012D8FDB03982CF03AF80BB0F0BD88 +:10F61000F7B584B005002CF02FF80700002428046B +:10F62000000C039002AA00922306069A03990598FB +:10F630001B0E33F090EC00280DD02C4EA500B61D0B +:10F640006B46597A705BFFF74FFFA8196B46197A22 +:10F650004088FFF749FF641C012CE3DB38002CF0E5 +:10F660000FF807B0F0BDF7B584B005002CF004F832 +:10F67000070000242804000C039002AA009223062D +:10F68000069A039905981B0E33F068EC00280DD0FC +:10F69000164EA5000A366B46597A705BFFF724FFB9 +:10F6A000A8196B46197A4088FFF71EFF641C012CCD +:10F6B000E3DB38002BF0E4FFD3E73EB56B460C00EC +:10F6C00019705870009801A91BF01AFD002819D074 +:10F6D00001A8FFF7D7FE3EBD0028008028F90004EE +:10F6E0000020009024F90004FFFF000096040004AD +:10F6F00080210080002D0080AC390400CB02000086 +:10F70000001800042000FFF7D1FEE4E7002800B550 +:10F7100011D1022A05D1092901D8481C00BD0820B1 +:10F7200000BD032A05D1052901D3C81E00BD022052 +:10F7300000BD481E00BD022A01D0032A45D174290C +:10F740003DD011DC8807800F3DD18B10093B0BF3B6 +:10F7500034EE142C2C2E2E3A3A30303A3A3A3A3AC9 +:10F760003A3A3A323234343A8C292AD00EDC8029A3 +:10F7700004D005DC782922D07C2924D17E2000BD4C +:10F78000842901D088291ED1862000BD992904D062 +:10F7900005DC902915D0952915D1972000BD9D290C +:10F7A00001D0A1290FD19F2000BD262000BD2E2011 +:10F7B00000BD3E2000BD662000BD6E2000BD76204D +:10F7C00000BD8E2000BD362000BD9008CC5E0378C1 +:10F7D000010000000CF3000000040000F8A948E755 +:10F7E00001283BD174291CD011DC8807800F33D14C +:10F7F0008B10093B0BF3EAED142A2A2A2A30303009 +:10F800003030303030303030302C2C2C2C308C29B3 +:10F8100020D00DDC802904D005DC782901D07C299A +:10F820001AD17A2000BD842914D0882914D111E07E +:10F83000992909D004DC90290CD095290CD103E03A +:10F840009D2901D0A12907D19B2000BD2A2000BD00 +:10F850006A2000BD8A2000BD3A2000BD080000BD1E +:10F8600010B50400FFF75CFF002C00D1401C00061F +:10F87000000E10BD417803780A021A4301D0012A14 +:10F8800006D1C17A837A0902194303D0012901D034 +:10F8900001207047FF490A70C2788378120612145B +:10F8A0001A434A704279037912021A434A80C27994 +:10F8B000837912021A438A80427A037A12021A4327 +:10F8C000CA80C27A837A12021A430A72427B037B8D +:10F8D000120612141A434A72C27B837B12021A4325 +:10F8E0004A81427C037C12021A438A81C27C837C57 +:10F8F00010021843C881012088770020704770B536 +:10F900000500E5480C00006800280ED00021012009 +:10F9100016F038F8E149A800401801680906090EF8 +:10F92000A1430160012016F04FF870BD70B50500CD +:10F93000D9480C00006800280ED00021012016F0E4 +:10F9400021F8D649A800401801680906090E21438C +:10F950000160012016F038F870BD38B50024CD4D97 +:10F960002A69824225D100202B0010330129286109 +:10F9700004D100220092AA69002106E0002907D1E3 +:10F98000002200926A6901242100C548F6F7F0FAC6 +:10F990002BF07CFE0500002C04D004217020FFF722 +:10F9A000C5FF03E004217020FFF7A9FF28002BF01A +:10F9B00071FE38BDF8B50400B64DA87F002820D0F0 +:10F9C0002BF064FE29690600080003D0FAF267FBF9 +:10F9D0000020286130002BF05DFEEF88002C00D065 +:10F9E000EF892FF05FFEF907C90F08430AD12BF00A +:10F9F0004DFE040004217020FFF781FF20002BF052 +:10FA000049FEF8BD2BF042FE0090287FFF2803D16D +:10FA10005F20FFF781FC2877687FFF2803D16020F3 +:10FA2000FFF77AFC687728782900002C00D0087A44 +:10FA300001268E570500002C01D009268E57888894 +:10FA4000002C00D088897D23DB00584388614888DA +:10FA5000002C00D048897D23DB0058430C0000288F +:10FA6000486101D1002506E0012D04D10421702058 +:10FA7000FFF75CFF03E004217020FFF740FF207FC9 +:10FA800080190106090E5F20FFF738FD607F80199D +:10FA90000106090E6020FFF731FD00982BF0FAFDFA +:10FAA0002FF000FEFF21491C0F403843A9D0002D44 +:10FAB000A7D0A0690028A4D0764B002200927848F5 +:10FAC000626910330121F6F753FAF8BD70B50400EE +:10FAD0002BF0DCFD0500002C04D004217020FFF782 +:10FAE00025FF03E004217020FFF709FF28002BF019 +:10FAF000D1FD70BDF0B506000C006A481500816AA2 +:10FB000085B0694A11408162416A684A1143416285 +:10FB10002BF0BCFD01901AF031FB029080210220F5 +:10FB2000FFF704FF0120F5F7C3FB80210220FFF758 +:10FB3000E6FE0120F5F7BCFB2100300033F01CEAA3 +:10FB40005B48FFF700FC2206120E290030000392EA +:10FB50001AF07AF9002E17D1022D05D0032D03D00B +:10FB60000E2C01D1534F06E01AF0F9FF012801D104 +:10FB7000514F00E0514F2BF089FD00903800FFF706 +:10FB8000E2FB00982BF086FD1AF0B0F94C48052CEA +:10FB900001D00D2C03D1012D01D19A2106E0092CB1 +:10FBA00001D00D2C04D1022D02D1BA21FFF7A6FC01 +:10FBB0006808012803D143488021FFF7A0FE012DEA +:10FBC00007D1424840490160416049008160C160FD +:10FBD00001E01AF07DF83000FFF7ECFE8C9DAE4A94 +:10FBE0000100000008F7000000040000AB739B8BCD +:10FBF00002981AF0E3FA2A0031002000FFF747FDCF +:10FC00002A0031002000FFF717FD2A0031002000F4 +:10FC1000FFF791FC2A0031002000FFF762FD0198F8 +:10FC20002BF042FD2448416A254AD24311404162EB +:10FC3000F5F7EAFB220029003000FFF79EFAF5F7FE +:10FC40002AFC300016F0EFF8F5F7DEFB300015F077 +:10FC500059FF0700010030001AF062F93900300046 +:10FC6000FFF70FFB0221072016F0BAFC33F092E9F0 +:10FC7000002F04D01021072016F0B2FC03E0102161 +:10FC8000072016F0A2FC03992A003000FFF7F2FDCE +:10FC900001003000FFF708FB220029003000FFF7C9 +:10FCA00023F9FFF7D1F81DE0B404000424F900049F +:10FCB0000020009087F4000000A80080FCFBFFFFFC +:10FCC000C0000080AC390400983E0400903E04005F +:10FCD000943E04005E0200000D04000001010101D9 +:10FCE00040B0008033F05AE9BE4D002F1FD0BE480F +:10FCF0000068002817DB072016F023FC8009012884 +:10FD000003D1A869401CA8610AE0022803D1E86970 +:10FD1000401CE86104E0032802D1286A401C2862E4 +:10FD20006869401C68610221072016F04EFCF5F757 +:10FD3000B2FBAE48026A032189028A430262016A69 +:10FD4000002E01D1020D01E0012292021143016255 +:10FD5000016A0122520211430162A54F002E01D116 +:10FD6000A44800E0A44838612878B04213D030009D +:10FD70002E7015F086FF300001F00FFC300001F00E +:10FD800022FC012803D12100300001F038FC2100C1 +:10FD9000300001F045FC3869082108433861012032 +:10FDA00005B0F0BD8F49FF2008707047F7B580019E +:10FDB0000C00050C8B4A002108325056002800DC4C +:10FDC00041420806000E1F261F2800D206002BF015 +:10FDD00067FC0700202C05D0402C05D0802C05D0D6 +:10FDE000002404E0102402E0202400E0302429064E +:10FDF000090ECD20FFF78CFB290ACE20FFF788FBE8 +:10FE0000D220FFF793FA41090298490131430028B3 +:10FE100002D14020014301E0BF200140D220FFF782 +:10FE200077FB210080200143CC20FFF771FB3800D5 +:10FE30002BF03AFCFEBDF3B58FB02BF031FC0090F7 +:10FE4000D220FFF773FA4021084203D06B480926FD +:10FE5000019003E0694809300B2601900F983100AA +:10FE60000BF368E900252C000395029528E0CC20CF +:10FE7000FFF75CFA000900014006400E204301062E +:10FE8000090ECC20FFF744FBD120FFF74FFA000406 +:10FE9000A70004A9C851D020FFF748FA04A9C959FE +:10FEA0000002084304A9C851CF20FFF73FFA04A974 +:10FEB000C959084304A9C85103994018641C039008 +:10FEC000B442D4DB00982BF0EFFB039800281AD043 +:10FED000002404AF14E0A00038580102081A039966 +:10FEE0000BF3B2ED0F990006000E085541190D06EF +:10FEF00001992D0E0957414302980818641C02907D +:10FF0000B442E8DB09E00F9AFF21701E0D00115486 +:10FF1000019908560302181A02900F980178FF20E1 +:10FF2000401B0A180F990A70019A0021515641434B +:10FF3000029808181099002902D010990012088020 +:10FF4000300011B0F0BD70B504002BF0A9FB050026 +:10FF50002B48002C03D08021FFF7DBFC02E080213E +:10FF6000FFF7EEFC28002BF09FFB70BDF7B582B0C9 +:10FF700004000E002BF094FB102C019001D90020FE +:10FF80000EE71F4DFF21113D60190700FFF7C1FC6F +:10FF90003106090E3800FFF7D3FC102C02D11120D6 +:10FFA000002403E0A0081230A1074C0F0321A14058 +:10FFB00009064019090E0500FFF7ABFCF005C00F5C +:10FFC000A0400106090E2800FFF7BAFC0498A040E3 +:10FFD0004006010E2800FFF7B3FC01982BF064FBEC +:10FFE0000120DDE690040004002B0080F57F773AC5 +:10FFF0000100000004FB0000000400005F1CEE3F55 +:020000021000EC +:1000000000280080C0A2008008A800000868000046 +:10001000C03004009305000070B5F84D6969F848D8 +:100020004165F84909688165F74800248461F4F75F +:10003000CBF91020F4F7A0F9E80CF4F79DF92C6047 +:1000400070BD10B5EE4C0200616B206B0BF3CEE976 +:100050007D22D2000BF3CAE9E36AA26A0AF38CEDAF +:1000600010BDF8B57D220700E54CD200616B206B16 +:100070000BF3BCE905000E00E16AA06A3A000BF33D +:10008000B6E933002A000AF378EDF8BD10B5DC4C70 +:100090000200616B206B0BF3AAE97D22D2040BF303 +:1000A000A6E9E36AA26A0AF368ED10BD10B5040080 +:1000B000F2F73AFC21002AF0EEEFD44A00230AF3CB +:1000C0005CED10BD70B50400CD4D01206872D048C4 +:1000D0000168420C11430160F5F7BCFACD494000BC +:1000E000085A64235843A8616043F4F722F970BDAD +:1000F00010B50124F4F712F9200010BDC0480079B2 +:10010000704770B5F4F71FF90600F4F72BF9BC4CF3 +:10011000002526636563A169E5624143BC48A1628D +:100120000168420C914301602079002804D101202C +:10013000FFF7ACFFF4F70BF9657270BD70B5B04C0A +:100140002069FFF77EFF61890BF388ECE061050011 +:10015000B148A1690BF382EC0100A84201D8E06923 +:1001600001E00800E1617D21C9000BF378EC206219 +:1001700070BD0A2010B5FFF7A5FFFFF7B9FF040017 +:1001800010D0FFF7BEFFFFF7D9FF9D48016A0800B6 +:100190000A2907D9FFF796FFF4F7C0F8FFF7B1FF78 +:1001A000FFF7CCFF200010BD70B50400944D012076 +:1001B000687297480168420C11430160F5F74AFAEA +:1001C00094494000085A64214143002CA96102D09F +:1001D0000800604305E0E86948437D21C9000BF34E +:1001E0003EECF4F7A6F870BD85490A6A824206D84B +:1001F0004A7A002A03D14979002900D1D4E770470F +:10020000F3B583B000277E490D006B6B2A6B390074 +:100210000BF3E0E902900C00E96AA86A049A0BF378 +:10022000E6E805000E0006220BF3E0E83B0005229D +:100230000AF3A2EC0191AA0FB10011430090A800AB +:100240003B0005220AF398EC029A2300121A8B4114 +:100250001AD3684607C8801AA14115D30722310076 +:1002600028000BF3C4E8029A80186141644C4A07E5 +:10027000C0081043636B226BC9080AF37EECE1628D +:10028000A06204986763206305B0F0BD70B55C4C54 +:100290006079002811D1F4F741F8F4F754F805001B +:1002A000F4F760F85A4A01001068530C9843106044 +:1002B000A06948432900FFF7A3FF2079002804D153 +:1002C0000120FFF7E3FEF4F742F80020607270BDF2 +:1002D00070B5FF244A4D5A342B68C31A1B1BFF3BD1 +:1002E000FF3B1B1F002B04DC4C49C86A401CC86242 +:1002F00003E0814201D8824201D2002070BD180083 +:10030000FFF7AFFE06002000FFF7D0FE04002868CC +:10031000FFF7A7FE8219230000213000F4F7A2F8AE +:100320002879002806D12868FFF79BFE0004000CFE +:10033000F3F7ECFF012070BDF8B505006846F5F74E +:100340004CFC374800990068814201D0F5F72AFC3F +:10035000344800990068814201D0F5F723FC324C03 +:10036000324E2078FF280AD10CF0FBF8002806D086 +:10037000002D04D0306822000D21F5F725FC0099EE +:100380003068814201D0F5F70DFC294800990068DA +:10039000814201D0F5F706FCF8BD214838B5006868 +:1003A000F5F706FC1F480068F5F702FC1F4D2868AA +:1003B000F5F7FEFB1E480068F5F7FAFB1A4C2178AA +:1003C000FF2905D028686A46F5F7FEFBFF2020705C +:1003D00038BD70B52BF06EF9104C05006068002830 +:1003E00005D12FF074FA01206060002001E0606BFD +:1003F000401C606328002BF061F970BD984D1628F1 +:100400000100000000FF0000000400000CC63D5386 +:1004100000A50080603700048022008040A6008094 +:1004200040420F000021008000300400002D310107 +:100430000C050004A00200040808000424E90004DC +:1004400078050004DC06000410B5FF4C6068002845 +:1004500003D02FF05AFA0020606010BD10B5FAF7F3 +:10046000AFFA04000CF04FFC204310BDF74810B564 +:100470000078C00705D0F4F7DBFFFEF763FBF5F764 +:100480001EF810BDF8B52BF01FF904000021012063 +:1004900015F096FAF3F7D3FEED49086BCA0C9043BA +:1004A0000863012015F0AEFA20002BF011F915F0C9 +:1004B000F3FCE54E0025B560E6488168AA221143A9 +:1004C0008160E248E44F0078E44CC00721D02BF073 +:1004D000FBF8009020690B21884320612069316975 +:1004E00008432061A561F3F779FFF3F7FEFFD948D0 +:1004F000C038C760D948C03001680222114301608A +:10050000D749086808221043086000982BF0E0F8EB +:1005100007E0A561F3F762FFF3F7E7FFCD48C038C6 +:10052000C760FFF216F9CF48CF49406D4861206996 +:100530001021884320610CF019F8002800D0022017 +:100540002FF0D8FE04000DD0200010F098FD0028F8 +:1005500001D0042100E005210F208001201800694E +:1005600002F004F82BF0B0F80400FFF76DFF200054 +:100570002BF0AEF8FFF71BFFF9F20FFEF8BDB748FE +:1005800010B501690B22914301610169AE4AD2683D +:100590001143016100218161F4F74AFFFEF7D2FAAD +:1005A000F4F78DFFAD48C0300168022211430160AD +:1005B000AB48016808221143016010BDFFB583B04C +:1005C00004000027A94D0BF0D1FF002800D0022025 +:1005D0002FF090FE060002D0B068C004C00FFFF7F5 +:1005E000B5FE2BF071F800220290A148009200683D +:1005F0000822012101AB2CF06EF9019800281BD1D3 +:100600009C48002200684A21F9F255F9002802D0DE +:100610000C98002810D09349974B086E496E3F22E2 +:10062000184052050023114059405840084303D157 +:10063000F5F7D9FE00280AD18A488F4C026E416E28 +:100640003F2322405B0519400266416620E0002CF2 +:100650002AD0FEF24CFF00900498226863680F00D5 +:10066000101A00218B41009A19003B00121A8B418D +:100670000AD2009A20686168801AB941069A0599E1 +:10068000FFF730FE002806D16F48C169491CC161DF +:10069000FFF7F8FE11E1734862682168803042611B +:1006A000016100F09EF907006D4A10680821884337 +:1006B00010606A4AC032106802218843106067489F +:1006C0000169614A0423194011610169994301617B +:1006D000016903221143016146E05B48816A491CBC +:1006E0006D1E81623DD10100486A401C48620BF0DA +:1006F00047FF002813D059488169816901690B229D +:1007000091430161564A1168082319431160016938 +:100710004D4A126911430161F9F23FFDCDE04F4DA1 +:10072000A8698006800F012803D147484169491C08 +:100730004161FFF724FF0FF057FA49490868082282 +:10074000904308604549C031086802229043086020 +:100750002869042188432861286903210843286106 +:10076000424D0120F4F7C2FD3C4880698006800FAD +:100770000328B2D101F051FA002804D13249086AA5 +:10078000401C086295E0002C08D000F02AF9069978 +:1007900007008842F2D805988742EFD33248416972 +:1007A000304A5165022141613448F3F707FDFEF2FA +:1007B000D8FF28488168090A090281602749086929 +:1007C00010221043086120480078022801D1022538 +:1007D00000E04025002C02D000F003F90700002FB4 +:1007E00001D001200543002E04D00F2080013018D5 +:1007F000006900E00020012101F0B8FEF5F71AF8C9 +:10080000E807C00F01D0F3F7E1FD1D4FA69907D609 +:1008100001000000FC020100000400000E903B7A81 +:10082000422005403AD068060AD51020F3F7B2FD01 +:100830001020F3F7C1FD0420F3F768FEF3F778FE0C +:10084000A8072BD53D003800F3F7A4FD2800F3F7E7 +:10085000B9FD0C20F3F75AFE1EE000000C05000461 +:10086000C4E800040021008040230080EFFFFFFF68 +:1008700040A6008000A300806037000400A500802F +:1008800088130000C0BE01C000000004180004006E +:100890001000100000100000F3F74AFE0320F3F7E9 +:1008A00035FE5D4E0125B560002C16D000F0A3F892 +:1008B0000699884202D8059988420ED2306A0121F1 +:1008C000090440183062FFF7E7FDFFF7D9FD0298F1 +:1008D0002AF008FF002007B0F0BD15F0F5FAFFF789 +:1008E000C7FD4E4900280D6000D001E04C4805606E +:1008F00002982AF0F7FE2AF0F1FE04000021012000 +:1009000015F068F8F3F7AFFC4649086B3843086305 +:10091000012015F081F820002AF0E4FEF6F2FEF83E +:100920004149884216D0414C606B02218843606384 +:100930003F48EFF759FEE2173E4800920068082250 +:10094000012101AB2BF0D1FF31200003EFF74CFE6A +:10095000394860630120BEE710B50BF01BFE00288C +:1009600003D02D488068002801D0FFF795FD10BD09 +:10097000F8B5334A314811680826B1431160314B4C +:1009800019680222914319602E4CC03C2169224D06 +:1009900004273940E9602169B943216121690B22AB +:1009A00011432161401E1BD1FFF7F3FD0FF026F923 +:1009B00020693840E8602069B84320612049086810 +:1009C000B04308601F4A1068022188431060A06984 +:1009D0008006800F012802D1A869401CA861174831 +:1009E000A1698906890F0329D8D1F8BD0120704774 +:1009F0001548407A704710B5F3F775FD0400F3F71A +:100A000040FD201A05D50449086B401C08630020EE +:100A100010BDFFF72AFB10BD0C05000460070004A1 +:100A2000640700040021008078B9000400340080CD +:100A300010100300C0BE01C0F201010088130000C5 +:100A400000A3008000A7008060370004F8B50024F0 +:100A5000FF484069FF4E8505AD0DB54203D0012426 +:100A60003000FBF7CFF8FC4B00211F00383788001F +:100A70001A58126838580260491C0929F7D9002C05 +:100A800003D03000A843FBF799F8F44B00201C1F5B +:100A9000C100CA18126809190A60401C0828F7D357 +:100AA0000020F8BD13000A00803010B5C16D806DC4 +:100AB000FFF292F810BD7CB514008030069A0093C6 +:100AC00001920A00C16D806D2300FFF29CF87CBD8D +:100AD00038B51400049A00922200FFF2ABF838BD3A +:100AE000DF4B10B5186259629862D9621863596376 +:100AF0009863D963DA4B4033186059609860D960C5 +:100B0000186159619861D9611A62FEF243FBD349B9 +:100B100000208C314860CE49C039486310BD70B5A3 +:100B20000500D0480C004188A1421CD04480280018 +:100B30002FF0AAFB10F08FFD002814D1C549002C1E +:100B400012D0022D01D11F2600E00F260D00002437 +:100B500031002000FEF28DFC29002000FEF293FC03 +:100B6000641C032CF4DD70BD0F203F22FFF7B8FF9B +:100B700070BD010000200E2908D2B5484030072979 +:100B800001D889000818006B0004000C70470E287B +:100B900006D2AF4A4032072803D88000801801638C +:100BA000704711637047F0B5002087B010F00DFD5D +:100BB000002804D1012010F008FD002801D00121F7 +:100BC00000E000210220059110F0FFFC04900320BA +:100BD00010F0FBFCA84900914C140599A24AA34BC4 +:100BE000A34EA44F250000290393029201D01500C3 +:100BF0001C00049901431FD0022032F0F2E90028C2 +:100C000001D035403C40032032F0EAE9002803D00F +:100C10000298039905400C40012032F086700E4D79 +:100C200001000000F8060100000400005D4AE8161B +:100C3000E2E9002805D000980299054003980D408C +:100C400004400498002801D035403C409048C562DB +:100C5000046307B0F0BD70B50600FFF2A5FB8D4C34 +:100C6000250C002E08D08349002040310862FFF790 +:100C7000A4FFE068284316E011F0C5FA002810D060 +:100C800003210020FEF225FD7648C03001680122D4 +:100C9000D2069143016001680E22490849001143C0 +:100CA0000160E068A843E06070BD6E4901235B0409 +:100CB000C0395A000028886904D0184388618869BF +:100CC000904303E0104388618869984388617047C6 +:100CD0006948006B7047684910B50400FC31FFF2A9 +:100CE0004FFF6D4A200011001031FFF296FF10BD3A +:100CF000614810B5A030FFF2B1FE674954390800D1 +:100D00000930FFF2D9FE10BD5B4810B57830FFF214 +:100D100058FE5949604834317438FFF27FFE10BDE7 +:100D20005E49082010B508705D490A2008705D49C9 +:100D3000012008705C49102008705C491E20087072 +:100D400018F0F8FF18F0F0FFFFF7DEFFFFF7D0FF15 +:100D50004948006B0006000EFFF7BDFF10BD10B53F +:100D6000FFF7DEFF002018F0B5FF10BDF8B5222018 +:100D70006B461870322058703F4CFF2098702161EC +:100D8000A0690E001500002804D10120A061F4F72D +:100D9000DBFA02E001200EF01BFF3000FFF2A4FAA4 +:100DA00000285ED0FFF75CFE41482E4A406A0100F1 +:100DB00080310B7E403213624B7E53623D4B06788E +:100DC0009E624088D862C8690104090C0020830033 +:100DD0009B181963401C0728F9DD0120FFF2C5F8B4 +:100DE000FEF205FA6846FEF21EFA21493439886A95 +:100DF00005221206904388622548C03001688908A0 +:100E00008900016022491E208862280001F0ADF8A7 +:100E1000FFF2ECFA14493F220F20FFF76BFE144952 +:100E200025488C31086000F39BF900F35BFCFFF769 +:100E300096FFFEF298FAFFF251FCFAF779F90021D9 +:100E4000012019F038F96069FFF72FFF1B4801688E +:100E50000B220904090C5204891801601848016822 +:100E600030E049E040A20080FF03000018180004B1 +:100E700034A9008080A0008018B801C0EBEFEBFF20 +:100E8000E8EEEAFFFAFEFAFFF8ECEAFFFFFFFEFFEA +:100E900040A4008000A8008078BA01C0E0F80004F7 +:100EA000E1F80004E2F80004E3F80004E4F80004C8 +:100EB00014C7000400A600800100030000AE0080FB +:100EC00000210080420C91430160F3F71BFBFF49B6 +:100ED00008680122D20610430860FD4908690A0D1E +:100EE00010430861FB4819F071F8F9488030016B34 +:100EF0000322114301630120F8BDF0B504210C0564 +:100F0000F54ECD058A00921913681F043F0C23008B +:100F1000002800D12B003B431360491C0729F1D95D +:100F2000F0BDEA490420C03910B508600620F4F786 +:100F3000F1F9EA480068C06B01F017F810BDF8B588 +:100F4000002406008500E648405900287DD0F2F7CD +:100F50004AF93106090E37020028009136D0E149DE +:100F600000980026FCF204FDDF4901281CD14A69E3 +:100F7000D84B0A3A13E0DA48A1002830405940180B +:100F800019680006000E3843014308683A21415EA3 +:100F90008E19B24202DC002C57D01EE0641CD048EF +:100FA0004059A042E7D818E0CD48CA4A28304059F5 +:100FB000126801240006000E3843024310683A22EA +:100FC000825E48690A3882423FDA06E0C4484159E5 +:100FD000C64AD468A14200D24459C1484159091BAC +:100FE0004151C348BF4946590098FCF2C1FC012851 +:100FF00020D100201AE0BA49B64B28314A591B6863 +:101000001106090E3943194309680423498C121D3E +:101010005B1A9B079B0F5918B14B091D28335A5176 +:10102000D205D20D09030A433260401C390FAAA928 +:1010300001000000F40A010000040000A9259DA29F +:10104000A042E2D309E00AE0AA49A20028314859A7 +:1010500080184851C005C00D30600120F8BD002047 +:10106000F8BD10B50C00A0301100C37D827D2000BA +:101070000C30FEF2C6FE10BD70B506008966086F22 +:101080000C000D000188821D143430002DF0E6FCA8 +:101090000200296F2000FEF2CEFE28882084F9F796 +:1010A00015FE60688078000905280CD1E0690121EF +:1010B00049060843E0610A212800217009210C300B +:1010C000FEF290FE04E0220029003000FFF7C9FF85 +:1010D000E16901221203A8789143E16105F3B9FDAA +:1010E0002565E06270BD0100CA007D4900207031B5 +:1010F000511809687A4B7433D2181268D206D20E8E +:1011000001E0091D401C0B1DDB06DB0E9342F8D1EC +:101110007047F7B582B001250E0017002AF0F2FAE9 +:101120000190C020C45D380011F067FA022811D088 +:101130007549097981420DD015235B0172495843E5 +:10114000203942182C32E00080180300FF33B933F5 +:10115000181F06E06249E00074314318624A091F13 +:1011600040180C2E1AD101681B680E1DF606DB060E +:10117000F60EDB0E9E4201D1002514E0029B1268A0 +:101180000326B6023243CE06F60E640126433243EE +:101190001360091D8906890E016004E05B48EFF7C2 +:1011A00037FAF4F7D7FD01982AF0B0FA280005B015 +:1011B000F0BDF8B5050000896F694419206F00285B +:1011C0001ED0002F07D12AF09DFA5048401CEFF79F +:1011D0001FFAF4F7BFFD2600143621003800FFF790 +:1011E0004BFF280031F0BBFC6034217F3A00300017 +:1011F000FFF78FFF002804D1280031F0D7FC002032 +:10120000F8BD0120F8BDF8B50500012700896E6919 +:101210004419280031F0A3FC7C20015D200032003D +:101220001430FFF776FF002803D1280031F0BEFC10 +:1012300000273800F8BDF8B5050000896E6944192B +:10124000002E00D1FEE7206F27001437002834D08D +:1012500021003000FFF710FF78688178090909291B +:1012600002D101227C210A553179022914D18078DA +:1012700000090D2810D1206F2030017803290BD1EF +:101280004178002908D1C0788006000F0BF3FAF8E6 +:101290000BF309F97C210855280031F060FC21008E +:1012A00030002DF0F7FA002806D1280031F07EFC3E +:1012B0000120F4F7ABFCEFE70120F8BDF8B50C0016 +:1012C00007008966086F0D00143400287ED0606026 +:1012D0006120C05D0A49C006400F4000483117E058 +:1012E000C0A80080C0A2008000A00080C0AE008026 +:1012F000B8BE01C0F4FF02C014CC0004C042040018 +:1013000018B801C05018000438420004070001005A +:10131000095A21812988218420002030417AAB7824 +:10132000C9095B06C9015B0E19434172E261E98894 +:101330006184A888002806D06088000403D42100B6 +:1013400028002DF0C0FC60682E0080780C36010764 +:10135000890F012910D100090A2807D1F9F798FC53 +:10136000002801D0022104E0002102E0082803D176 +:1013700003213000FEF236FD606880780107890F96 +:1013800002290CD100090C2801D0042807D1F9F753 +:101390007DF9002803D002213000FEF223FDF9F789 +:1013A0004DFC002815D009F0EAFA002803D1F1F726 +:1013B00024FF00280DD0220029003800FFF751FE3D +:1013C00021787E2041550021300000E025E0FEF22A +:1013D00009FDF9F733FC002807D009F06AFA002864 +:1013E00003D0210028002DF06EFC220029003800D7 +:1013F000FFF737FE2200290038002DF074FB298A00 +:10140000A181698AE181F1F7F8FE002803D021006B +:101410003800F1F796FF01202565F8BDF8B5040006 +:101420000F00008966690519002E06D12AF06AF9B5 +:10143000FF48EFF7EDF8F4F78DFC286FE325A522C0 +:1014400001000000F00E010000040000FAFF4ECE83 +:10145000002824D02AF060F90090200031F089FBA8 +:101460003A0029003000FFF733FF0EE0200031F092 +:10147000A7FB00982AF054F90120F4F7D1FB2AF0D9 +:101480004BF90090200031F074FB290030002DF062 +:101490000BFA0028EAD000982AF042F90120F8BDA2 +:1014A0007FB5040015000200E332511EE13001AEA9 +:1014B00007C62200E032200000922A00D830FEF257 +:1014C000ECFC7FBD38B50400E034E27800920A00FD +:1014D0008030C16DA378806DFFF225F838BD020021 +:1014E000803210B5D36D926D0800FEF26CFB10BD1A +:1014F000D54A10B5126904231A40D44B5A64D44A11 +:10150000FEF28AFD10BDD048016989088900016199 +:101510000169CE4A526C114301617047CA48806923 +:101520008006800F032801D10120704700207047FA +:10153000002801D10820704710207047C24920318F +:1015400008757047C34A8000821810B51368880672 +:10155000800E01020404214300060143BE480340FB +:101560000B43136010BDBB4A8000801802688906D7 +:10157000890E0B0409060B43B8490A401A4302605E +:101580007047B44B10B5403B19688006800E0202CC +:101590000404224300060243AF480140114319608E +:1015A00010BDAC4B403B19688006800E020400065B +:1015B0000243AA48014011431960704710B5052441 +:1015C000200017F02CFE01002000FEF2D1FA2000CE +:1015D00017F028FEFF2801D0FFF7D3FF200017F0F7 +:1015E00029FEFF2801D0FFF7DCFF10BDE03010B569 +:1015F00082780100C078824208D20A784878824214 +:1016000004D21BF0C5FF022801D1052010BD002027 +:1016100010BD10B519F05BFB10BD914810B5816885 +:10162000090A0902816014F038FC10BD8C4810B51D +:101630008168AA221143816014F030FC10BD08B506 +:10164000694619F097FD002804D16B461870587050 +:10165000987003E06B461878002804D1002031F020 +:10166000E2EC012002E0012802D1002026F051FA2C +:101670006B46187808BD0EB56B4618705970009807 +:1016800001A919F04EFD002805D001A831F0CEECDB +:10169000012031F0C8EC0EBD1CB56B4618705970B6 +:1016A000009801A919F052FD002803D001A831F0DB +:1016B000C2EC012031F0C2EC1CBD70B52AF02CF850 +:1016C000684C002125000B002835260050368A0082 +:1016D000A350491CAB500929B350F8DD2AF020F87B +:1016E00070BDF3B581B007002AF016F800902CF019 +:1016F000F9FE01003800FEF2E1FC5B490A6880183F +:101700000860524802994030FEF2E5FC02988400DD +:10171000564800590068534D29592E00503600296B +:1017200007D152493831095909682A002832315104 +:1017300011513159029A3B00FEF2F0FF002804D10A +:10174000009829F0EDFF0020FEBD3059001D3051FA +:101750002859401C2851009829F0E2FF0120FEBDC5 +:1017600010B529F0D9FF3F4A00218B00D358002B38 +:1017700003D029F0D5FF012010BD491C0929F4DD53 +:1017800029F0CEFF002010BD70B501890C18216F23 +:10179000250040691435002901D1002070BD2100C9 +:1017A000FFF774FC686880780009092801D10121DD +:1017B00001E06034217F2800FFF793FF70BD70B512 +:1017C00002891418226F250040691435002A01D1BE +:1017D000002070BD0A002100FFF77AFD6034217FF0 +:1017E0002800FFF77EFF70BDF8B5002529F094FFB3 +:1017F0000027009000263CE014481A495830845DC8 +:10180000A000085800281AD010486C30005D00284D +:1018100001D1092C13D12000FFF7A5FB0500F1F73A +:10182000F6FC002801D0002D09D0092C06D007496C +:101830006C31085D401E0855044804700125761C73 +:10184000092E15E00900010040A60080F2F75A9821 +:1018500001000000EC12010000040000453A6B7D1D +:1018600018B801C0DD4D000040B00080FFC0C0C00E +:10187000FFFFC0C040230080F4FF02C0CC0500047D +:101880001818000402DC002DC0D006E0002D04D1A1 +:10189000EA490A22881809F3CEEB7F1C022F01DAED +:1018A000002DB1D0009829F045FF2800F8BDF8B50B +:1018B00029F03CFFE24F00250090E0480A38465DE1 +:1018C000B4003859002818D03006DE49000EFCF26A +:1018D0006DF8012807D102E03000FFF74EFB3859C0 +:1018E0000028F9D109E000203851D549D6485031B7 +:1018F00009590059C905C90D01606D1C092DDCDDB0 +:10190000009829F017FFF8BDCF49CF480922383990 +:1019100010B5FEF228FF10BD10B5FFF7DDFDFFF793 +:1019200057FECA480079800601D5002000E001205A +:10193000FEF220FB10BD70B50600C54D002421004D +:101940003000FFF7D6FD010028552000FEF224F8F4 +:10195000641C2406240E0C2CF1D970BD10B5FFF7C1 +:1019600037FEBA480079800601D5002000E001204A +:10197000FEF200FB10BD00207047B6490868042243 +:10198000904308607047B3494039486904221043C6 +:1019900048617047B049886A012252041043886246 +:1019A0007047AE4880690004000C7047FFB583B0F3 +:1019B000140006000D00102A02D3012007B0F0BD6C +:1019C0000820009029F0B2FE0190A2480068029021 +:1019D000FDF2E1FC9A4B9F4F0020603B4037002E08 +:1019E00001D1002100E0295C02011219995411096A +:1019F0000901C91804C9FA6104C93A6204C97A62C2 +:101A00000968B962009A0100114301225202114390 +:101A1000F962F96A090CFCD1401C0628DFD38D4B12 +:101A20000120A0408033002E02D1196881430BE0D1 +:101A3000002C04D18A4CAA882968A162E262069926 +:101A4000012902D11968014319608249029808608E +:101A5000019829F06FFE0020B0E77E485021403801 +:101A600010B54162416901225206114341610120D2 +:101A7000FDF285FC78484038416A042211434162F6 +:101A8000744908688A0C1043086010BD714B00202F +:101A9000403B00B5586258690121490688435861A6 +:101AA000FFF76BFF586BFF210843586300BDF0B58B +:101AB00001252C008C40674E66498540059F803685 +:101AC0004039002A0ED03268224332604A6B2A43E2 +:101AD0004A6362494031886060480362076144207C +:101AE0000860F0BD3068A0433060486BA84348638D +:101AF000F0BD584940310A6B06231A400B6B9343E3 +:101B00000B63544B8006800E403B1862086B1043F9 +:101B1000086370474F484038006A8006800E70475F +:101B200070B5FDF216FD04000D00FFF73AFF8202CA +:101B3000D3172900200009F35CE819002B00A21A32 +:101B40008B411900FFF72DFF84022000E4170B00E2 +:101B5000210080185941FDF28DFD3E494031086B4E +:101B60000422104308633B494039486B8A0D1043F7 +:101B7000486370BD37494031086B042290430863C5 +:101B8000C80D344940394863704732490028086815 +:101B900003D0400840000E2202E0800880000C22A2 +:101BA0001043086070472B490028086803D00522BD +:101BB00090430A2202E0C008C000082210430860D7 +:101BC000704728497D22520110B5CA6192010A620C +:101BD0005410CA60244B8C604B600A6100228B61F8 +:101BE0004A61086021480200E4328A620832486291 +:101BF000CA621F4911601F49516019F029FB194839 +:101C000010BD1D49886070471548C03880690B4970 +:101C100062398A6B12188A63C86370470F4A800062 +:101C2000803282180D484030006B48430B496031C8 +:101C3000097D4018401F1060704700007AB801C04D +:101C4000F4FF02C014CC000450180004C4E80004DF +:101C500008BB01C000A3008040A80080A652D9693B +:101C600001000000E81601000004000016E0B811B1 +:101C700000A6008000A5008014C700048038010081 +:101C80005CC7000417E900C0E9E800C000A00080BC +:101C9000704710B50124042107200FF080FA0028B6 +:101CA00001D1012010BD0320FDF2EDFEFF49096BBB +:101CB0000205090C0B05120D1B0D9A4205D10122DC +:101CC000120310401140884200D10024200010BDB2 +:101CD000F64910B5F64A096B0020D269090C1305C4 +:101CE0000C051B0D240DA34205D101231B031A4033 +:101CF00019408A4200D1012010BD2421EC4A414301 +:101D00006C3A10B58C18FDF2BEFEE2690100D204F7 +:101D1000C9040120D20CC90C8A4200D1002010BD98 +:101D200070B50024E34D02E00120F3F78DFF04209D +:101D3000FFF7E3FF0028F7D102E00120F3F784FF6B +:101D40000520FFF7DAFF0028F7D102E00120F3F7C2 +:101D50007BFF0620FFF7D1FF0028F7D116E02DF01A +:101D600033FE002804D0286800226221F7F2DFFD4C +:101D7000286800226621F7F2DAFD002803D1F6F781 +:101D8000DDFE002808D10120F3F75EFF0320FFF7F6 +:101D9000B4FF0028E3D170BD641C2406240E052C7A +:101DA000F1D970BDC448802110B509F3EAE910BD2E +:101DB000F8B50D0007002420BD4950436C39441884 +:101DC00060223900280009F340E928002CF0E2FFE6 +:101DD0002800603009F37AEA3900603120220D00D2 +:101DE000009009F332E929882069A2690D00803D3D +:101DF0000026401E824205D1E068814202D90500DA +:101E0000803D0E1A0098390020302A008031009061 +:101E100009F31AE9002E06D0009861694019496853 +:101E2000320009F312E9F8BDFFB581B000240500C6 +:101E30000E00170005200AF31FFA41889F4A9142BD +:101E40001BD10100603128603160098860390904C4 +:101E5000090C0AD01D225201914206D88030386008 +:101E6000049820390124018007E00520FFF29CFE40 +:101E70000004000C0521FDF219FE200005B0F0BDA4 +:101E800038B5040029F05CFC0500884840308069C2 +:101E90008749000C54314861052069460AF303FA6A +:101EA00000280BD04188854A914207D1844941805E +:101EB00005222100FFF77CFF012400E00024280018 +:101EC00029F042FC200038BD38B505007748403085 +:101ED0000069774C000C14342063042069460AF32F +:101EE000E2F96B4619880905C90D0028A16212D0D4 +:101EF0006021095A734A8039914207D9280060301D +:101F000009F3E4E90021C943018003E00422290028 +:101F1000FFF74EFF012038BD38B50400634840305C +:101F2000006A6349000C54318863062069460AF34D +:101F3000BAF900280BD0010060310A88882A01D93B +:101F400088220A8006222100FFF732FF012038BDD7 +:101F5000F0B5574955480A00006B6C32040C080074 +:101F60001430C46051484030006A2705030C080053 +:101F700054308363CE69012031050500090D3F0D02 +:101F8000B94200D1002501273F0301003E403C40FB +:101F9000A64200D00021D269294315051E05040080 +:101FA0002D0D360DB54200D100240C433A403B4084 +:101FB0009A4200D000202043F0BDF8B50021002651 +:101FC0003B48414A6C381060404A3B481060404AE8 +:101FD000802010603F4AFF209D3010603E4A102054 +:101FE000106033480422143002613C4A42610222EC +:101FF0005302836102623A4D052206631202456272 +:10200000C2619A00C262354A364FCB005C196260E9 +:102010000124A4021219491C0129EF50F5D3304BB9 +:10202000C900CC186260304A5A5021490622543106 +:102030008A612E4ACA610A228A62FF22521C1D004E +:1020400060350A62CD624A6200228A63012212036D +:10205000264B4A630022D40066197360FF33244E76 +:102060005B1C521C092A2E51F5D31D4CDD359EF602 +:1020700001000000E41A010000040000E28FCDA579 +:10208000D200603415196B603300A35005224263FF +:102090002200A03282630A225B0D4A609E00C36365 +:1020A000503C0E618C6000220B604A612200F032CD +:1020B0000021CB001D196A600125AD02521923E0F1 +:1020C000C0A30080ECD000040000000430D2000463 +:1020D000EFBE0000BAAB0000BC08000010F900041D +:1020E00014F9000418F900041CF9000420F9000494 +:1020F000002A02C0000102C00040008000500080A1 +:10210000003302C000100080491C0929E750D0D3D9 +:10211000C9000B195A60675024490322CA66244A31 +:102120000A678022CA67FF229D324A67AA008A672F +:10213000204E002106601E4F82600D00C160042108 +:10214000380009F352E8E80081194F60FF371A4957 +:102150009D376D1C7F2D3150F1D30421380009F3D8 +:1021600044E8E80081194F601449154B00253150AF +:102170001D6013484030C4610A248461104AC10CB8 +:10218000403A51620F4F47610227076111620D4FBC +:1021900060374762046291625E6380201863116158 +:1021A000FDF229F808488560F8BD000080D00004E1 +:1021B000006003C000FD01C0C01900800000018064 +:1021C000C0A30080000102C0C0A40080F048142118 +:1021D00010B508F3E0EF10BD70B505000E0001D199 +:1021E000012070BD30898419607A217A0002084389 +:1021F00001280DD1607B217B00020843032807D111 +:10220000002D11D0280000F07EFD002813D001E041 +:10221000002D03D0E879A073A879E073607A217A61 +:102220000002084301280AD1002231000420EFF700 +:1022300099F9002803D1300009F36EFCD0E70020A3 +:1022400070BDF8B50D001032110404000026D1480D +:102250001F00090C320009F389FC0028206014D00B +:10226000022101732168202008812068012120308B +:1022700028600172002141722868390A077341738E +:102280002968002088720126C8723000F8BD1CB58C +:102290000C0003000222694601A8FFF7D2FF0028C4 +:1022A0000FD0009800210174002C417405D00199D1 +:1022B00001234A7B1A434A738C61022181720021F7 +:1022C000C17201981CBD10B5040008001100FFF791 +:1022D000DEFF002803D001002000FFF77DFF10BDC6 +:1022E0000022F0E77CB5140005000B0002226946CD +:1022F00001A8FFF7A6FF00280BD00098210A04745C +:102300004174022181720021C17201992800FFF7F6 +:1023100063FF7CBD7CB5040015000B0008226946F4 +:1023200001A8FFF78EFF002811D00098002101744A +:10233000417406222900123008F390EE009908201B +:1023400088720020C87201992000FFF745FF7CBD0C +:10235000FEB51C041E0005001700240C0B00220013 +:10236000694601A8FFF76DFF00280DD000983200E4 +:102370003900103008F372EE0098210A8472C1729D +:1023800001992800FFF728FFFEBD1CB50400C822F4 +:102390006A23694601A8FFF754FF00280BD0009874 +:1023A000103001F0DEFE00998872000AC8720199AF +:1023B0002000FFF711FF1CBD7CB514001E000500B6 +:1023C0000B000822694601A8FFF73BFF002811D047 +:1023D0000098210A0474417406223100123008F377 +:1023E0003EEE0099082088720020C87201992800EA +:1023F000FFF7F2FE7CBD70B5060010891500841849 +:1024000000222274200062740622123008F326EEA5 +:10241000E07AA17A000208430830A072000AE07254 +:1024200029003000FFF7D8FE70BDF0B5012089B05B +:10243000029029F08FF90027069057483C01005D73 +:1024400000287DD0554D00236019083003C858403E +:102450005940084374D0FF229132592304A905A89A +:10246000FFF7EFFE002806D14D490868401C0860C0 +:102470000020029068E049480059049CE928F532A0 +:1024800001000000E01E010000040000B1551EC95B +:102490000190002010343D00039050E043482E018D +:1024A000805D00284AD04248002330180890083048 +:1024B000079003C85840594008433FD03C48019A10 +:1024C000805992798179914238D10199C079C9793D +:1024D000884233D1FF209A302070000A6070334860 +:1024E00006223618F11C201D08F3C2ED7078A07288 +:1024F0000020E0720898082280882073000A607328 +:102500000020A273E07320000799103008F3B0EDAB +:10251000079800210A0006C0E07BA17B0002084367 +:102520000C300004000C010AA070E1700399241D16 +:10253000091D41180904090C041903916D1C0A2D89 +:10254000ACD3049903988872000AC872059901985F +:10255000FFF74CFE7F1C0A2F00D278E7069829F07F +:1025600007F9029809B0F0BDFEB51D0006000F0086 +:1025700014000B000322694601A8FFF76CFE002837 +:102580000ED0742F0CD10098E521017444740321FE +:10259000857481720021C17201993000FFF726FE17 +:1025A000FEBD000000380004FC19000474CB0004D8 +:1025B00060CF00044405000410B525F091FF010030 +:1025C00007E0FF221632135C525C934200D20100F6 +:1025D00000680028F5D1080010BD10B508001C00E7 +:1025E000002A06D0012A01D0062A07D001221100B4 +:1025F00001E001220021F3F7D6F910BD200900F314 +:102600006DF82007000F00F373F810BDF8B500282F +:10261000564E574F34D0FF30401C4175007AFFF7BB +:10262000CBFF0400FF30401C0500007A385C122804 +:102630000AD05048697D406803290FD1002804D092 +:102640004C48642106F3ABFBF8BD642200924A4A71 +:1026500048482300012106F34EFB04E0002802D085 +:10266000444806F379FB687D40000019FF30401CA8 +:10267000837A427A287A395C3068FFF7AEFFF8BD7A +:10268000397830680222032300F33CF8F8BD0421B6 +:10269000BCE7C31D0021F93310B519723449FF306E +:1026A0001C000C22C91C0A3008F3E2EC05206075FE +:1026B00010BD70B50D1D121F06001404240C1EE081 +:1026C000042C24D36878297800020843FF3809389D +:1026D00006D001280AD12900300025F0BBFC06E015 +:1026E000264A2900300025F0D5FC00E02000844275 +:1026F00003D3211A0C04240C00E000242D18002C14 +:10270000DED1FF201630815D3000FFF77FFF70BD06 +:10271000032210B58A700022CA70091D25F0D7FC6B +:1027200010BD70B504000525002802D10021080065 +:1027300018E0207901280BD1A068C00408D520003A +:102740000EF0A3F8002801D0042506E0032504E0DC +:1027500020000EF0E4FC0028F6D10F2080012018A4 +:1027600000692900FFF752FF70BD00002C0E000425 +:10277000560500044C390004DF2001001F21310000 +:1027800010B5040073D06321200008F338ED082051 +:10279000207000206070FF20401DA070000AE070D3 +:1027A0000221002021716071FF20801D2072000A2B +:1027B00060720020A172E072FF20C01DA073000AA9 +:1027C000E073002021746074FF2008302075000A37 +:1027D0006075080AA175E0753C202076FF2017304F +:1027E000A076000AE076080A21776077FF222000B1 +:1027F000183220300270120A42700A0A8170C270C8 +:10280000FF2227328271120AC2710A0A01724272D1 +:10281000FF2228320273120A42730A0A8173C273BA +:10282000FF22293210308270120AC2700A0A017126 +:102830004271FF222A320272120A42720A0A81721D +:10284000C272FF2225328273120AC2731030102224 +:102850000270002203004270FF204A305034A07002 +:10286000000AE070080A217132216071997510BD6B +:102870000721C90140180088002800D001207047B6 +:10288000FFB581B01D000F00C87889789B2E7DC9E7 +:1028900001000000DC2201000004000099C49B74C8 +:1028A00006020E4301980D2189014118CC6B002CC2 +:1028B00004D1FF48C8630400FFF76CFF60782178FB +:1028C00000020843012D03D1F878B978000205E031 +:1028D000022D05D1F978BA7809021143084306E0C0 +:1028E000032D07D1F978BA78090211438843207083 +:1028F000000A607003983F1D001F029707040198AB +:102900003F0C40300090CEE0042F73D30299C8787A +:102910008A78000210434A780B7811021943001D8F +:10292000FF2300042533000CCA1A994273D025DC1A +:10293000E04BCA1A99425ED011DCFF39491F44D0DE +:1029400001294CD0022967D1012D03D0022D3BD1A2 +:10295000710739D5220060322100123188E00F2A38 +:102960005BD0102AEFD1012D03D0022DEFD1B1069B +:10297000EFD522005B322100243179E0042A62D0B5 +:102980000EDC022A54D0032ADDD1012D03D0022D02 +:102990007FD131067DD522005E322100303167E0E3 +:1029A000052A5BD0252A73D1012D03D0022D70D1C9 +:1029B00031056ED5210002980022563106F359FCEC +:1029C000009A5621095D117763E0012D03D0022D95 +:1029D0005FD1F1075DD022005832A11D48E0012DE2 +:1029E00003D0022D55D1B10753D522005A32210010 +:1029F0000C313DE05AE0012D03D0022D49D13107C1 +:102A000047D5210002980022183106F332FC009AC3 +:102A1000217ED1763DE02FE03AE0012D03D0022D5A +:102A200037D1F10635D52200593221001E311FE081 +:102A3000012D03D0022D2CD171062AD522005C3243 +:102A400021002A3114E0012D03D0022D21D1F105FE +:102A50001FD522005D322100363109E0012D03D05F +:102A6000022D16D1B10514D522005F3221003C3170 +:102A7000029806F3FEFB0CE0012D03D0022D08D1D5 +:102A8000710506D521000298423106F38BFC00E067 +:102A90003800874203D3391A0F043F0C00E00027A7 +:102AA000029908180290002F00D02DE705B0F0BD64 +:102AB0000A000D218901401810B5C16B901C002936 +:102AC00004D0582208F3DEEA562010BD002010BDC5 +:102AD00070B50500059E049C0020002905D05178A2 +:102AE000002900D10121197070BD19780029FBD08F +:102AF000491E0906090E1970F6D15078002801D038 +:102B000018700FE0B00041190D2080010818C06B4B +:102B1000002807D04178027809021143A1430170CF +:102B2000090A4170012070BD10B50C001100002C85 +:102B300003D11A04120CFFF7E9FB10BDF1B582B006 +:102B400002980CF07AFB070402983F140CF06FFB1C +:102B500005042D1400260299B00041180D208001B3 +:102B60000818C46B002C79D06078217800020843E3 +:102B7000800717D5217B0120B94200DD002002210A +:102B8000009123002200010002985A330C32019672 +:102B9000FFF79EFF002805D002983B001A22310063 +:102BA000FFF7C2FF6078217800020843800618D53D +:102BB0002421095D0120B94200DA00202021009182 +:102BC00023002200010002985B3324320196FFF7B4 +:102BD0007FFF002805D002983B001D223100FFF73F +:102BE000A3FF6078217800020843C00717D0A179BD +:102BF00001204942A94200DD00200121009123006B +:102C0000010002985833A21D0196FFF761FF0028CA +:102C100005D002982B0019223100FFF785FF60785C +:102C2000217800020843C00618D5A17F012049423F +:102C3000A94200DA002010210091230022000100A7 +:102C4000029859331E320196FFF742FF002805D043 +:102C500002982B001C223100FFF766FF761C360617 +:102C6000360E012E00D276E7FEBD11480022103844 +:102C7000C168002903D14178491C417000E04270CD +:102C8000C2607047F8B506000D2080013018C46B93 +:102C9000002C3AD06078217800020843048E7CEA48 +:102CA00001000000D826010000040000CA1E4818D8 +:102CB000400534D530000CF0CAFA4034E178A278EF +:102CC000090203E098180004070100005E4F114359 +:102CD0000025884224DC7888401C0104090C798096 +:102CE0006079227900021043884218D879788842A6 +:102CF00002D93889012812D17D8028F049FD7D70E4 +:102D000028F04AFD0720C00130183D8101880122CA +:102D10009202114301805104300030F0D0E9F8BD37 +:102D20007D803D81F8BD10B5040028F031FD0721FC +:102D3000C90161180C8800220A8028F02DFD2000AE +:102D400010BD0D21020089015118C96B0020002916 +:102D500006D04A780B7811021943090700D50120E3 +:102D600070470D2189014018C06B002803D0002155 +:102D7000603041708170704770B5002032490400A6 +:102D8000087048808880C88008810D00C8601035B0 +:102D90004870632060434019FFF706FD641C012C56 +:102DA000F7D370BD002010B52DF0C8FA0D218901B0 +:102DB0004018C06B00280ED04178027809021143F8 +:102DC0000122D20291430170090A41701E48017824 +:102DD00049084900017010BD0D218901411810B545 +:102DE000C96B002914D04A780B78110219430905E0 +:102DF0000ED515490978C9070AD00721C90141181C +:102E00000A880123DB021A430A80190430F056E9CC +:102E100010BD0721C901411810B50A880A80012197 +:102E2000C90630F04CE910BD0D2189014218D16B63 +:102E3000002902D104491031D1630A7E403040316B +:102E4000C276897D017770478818000410B50FC8D5 +:102E5000F74C0FC40020F74908701BF0CCFA18F0AB +:102E6000F9FD10BDFFB581B0040000261F000399D5 +:102E70006A460096FBF75BFB050018D1002F07D0D0 +:102E8000606902992CF002FA002801D0A6800EE0B9 +:102E90006069002806D0C26A002A03D00399200086 +:102EA000904703E00399200019F0DAFA05002800A2 +:102EB00005B0F0BDF0B591B000273E000797DE48A1 +:102EC000EDF7ECFB0022DA48D24300920068DB49C0 +:102ED0000068082209AB29F062FDD949486BCA0D88 +:102EE00010434863D448801CEDF7D8FB09980028AC +:102EF0007AD000040AD510F05EFCCE49C8684008BC +:102F00004000C86002D1CF48F8F720FE099880033E +:102F10000AD530F0D8E8C7490222C8689043C86093 +:102F200002D1C848F8F712FE0998400710D5C04CE6 +:102F300005E0089819F06BFB089808F30BFE606831 +:102F400004220068002308A929F031FD0F28F0D1E0 +:102F50000998400601D5FBF752FB0998000601D5F8 +:102F6000FBF7AFFB0998C00603D5FBF721FBFCF28A +:102F700054FC0998C00401D514F029FD09980007F4 +:102F800010D507E00798002804D08168C90401D54E +:102F90000CF015FBA6480022F03807A9F3F22AFA34 +:102FA0000A28EFD10998800423D5002E1DD0A02037 +:102FB0003400310030811C3430187C3108F3BEE914 +:102FC0000500010030000FF0E5F822002900300074 +:102FD0000123FFF747FF300008F3BCFD09980026E6 +:102FE00001210843099004E0E8E192494868401C47 +:102FF0004860099840040ED5002E08D0300008F330 +:10300000A9FD0998002601210843099003E0894998 +:103010008868401C88600998C00711D0002E07D12D +:103020004B2189480022490108F3BEFD040008D164 +:103030007F48072200680121006829F0BCFC0127B5 +:10304000E2E020001C30109060300F9024300E9091 +:103050000020059010980690A02020810F990E98CE +:103060000D0008F36CE90698FEF756FF00287ED0A5 +:10307000280008F354E905000420FEF2BDFD000419 +:10308000000C0421FCF23AFD002DF0D0687829787C +:1030900000020843EBD06D498842D9D080382870AF +:1030A000000A6870A8780007800F7ED178B12F0FD2 +:1030B00001000000D42A0100000400003E713DAC74 +:1030C000039028F06FFB290012310490881F0FF045 +:1030D00014F807900028606146D04179022938D160 +:1030E0002DF04DF910300290A878000905D0022883 +:1030F00003D00B2801D00D2821D10298017EE87859 +:10310000C006C00F81421AD00100079805F079FA75 +:1031100007980179032912D10DF04FF900280ED03C +:1031200007994A79022A0AD1807FC00707D0080090 +:103130002FF0D6EF002802D007982FF0D6EF029894 +:103140004030007E012801D10020A080079800288F +:103150000AD0079801221121490100924218290042 +:10316000200003AB29F037F9049828F01FFBA08852 +:10317000002847D02CF02DFB00281AD0012001A9EF +:1031800000E048E00190280006F01AFD6B4602902E +:103190001879002804D002202DF01AF905F069FDF5 +:1031A0000298002805D12F4A10680121C9028843DE +:1031B0001060A088002825D00699200000E021E0BA +:1031C00014F047FE00280590A0884DD1002819D0A2 +:1031D000290020000EF0E8FFA088002812D00798F0 +:1031E000002809D00079062806D1A8780107890FA0 +:1031F00002D100090D2805D1069A290020000123DB +:10320000FFF73AFE002E00D12CE70598002802D0E7 +:10321000A088002802D1200008F3A6FC09988007A6 +:103220007FD54B210D480022490108F3C7FC05005A +:103230001ED10448072200680221006829F0C5FB5E +:1032400001276EE09C3B00046805000400020300B7 +:10325000FFFF03000034008007100000201A000464 +:10326000FFFF00001C0700040028CBD02600C9E7A0 +:1032700028001C300D9060300C9024300B900D987D +:103280000690A02028810C990B980A9108F360E819 +:1032900028F088FA04000698FEF724FE002803D1DF +:1032A000200028F083FA39E00520FEF2AFFC00048C +:1032B000000C0521FCF22CFC200028F077FA0A987B +:1032C00008F336E8040029D060782178000208432A +:1032D00024D020000C302DF0A9F8079068616078A8 +:1032E00021780002084380380004000C010A207095 +:1032F00000286170C3D0069A210028000023FFF740 +:10330000BBFD0020079006990322280019F094F8CD +:1033100006990222280019F08FF8B0E7280008F378 +:1033200023FC0998800612D57F4D002406E00698FC +:1033300084604169002901D000698847E868042257 +:103340000068002306A929F03CFB0F28EFD109985B +:10335000800501D515F06DFD0998000501D515F022 +:1033600077FE0998400533D52AE00798002827D032 +:103370000179012902D10EF0A3FB21E04179022954 +:103380001ED100F0E4FC002808D0079803F0E7FF06 +:10339000079802F099FA0798F5F724F80CF0F3FD76 +:1033A00001280DD907980222C0308068002119F049 +:1033B00043F807980322C0308068002119F03CF8D8 +:1033C00059480022783807A9F3F21EF80A28CCD110 +:1033D000002F00D17DE50027F2F77EFC79E510B5DE +:1033E0000400192151480022490108F3E7FB002895 +:1033F00002D0C0214461018110BD7CB505220021AD +:103400004B48406929F0E1FA474C02E0019808F383 +:10341000ABFB606804220068002301A929F0D1FAFF +:103420000F28F3D1002501E000988560E0680422B0 +:1034300000680023694629F0C4FA0F28F4D100215E +:10344000FF2000F097F90021FF2000F0A1F900F023 +:103450008BF900207CBD10B5334C0200606804215C +:1034600000680023F2F76BFC002807D120680722D0 +:103470000068042129F0A9FA002010BD012010BD28 +:1034800008B5009028480022F0386946F3F28AF81F +:10349000002808D12448072200680821006829F084 +:1034A00094FA002008BD012008BD08B500901E4810 +:1034B000002278386946F3F275F80028A08CCAF526 +:1034C00001000000D02E0100000400006DABEEC032 +:1034D00009D11A480121006807220068890229F0F1 +:1034E0007EFA002008BD012008BD10B5134C012153 +:1034F0008160E16802000B68042118000023F2F7E4 +:1035000028FC002805D1206807220068202129F026 +:1035100066FA10BD094810B500680121006807224D +:10352000490329F05CFA10BD044810B50068012178 +:1035300000680722890329F052FA10BD9C3B000461 +:10354000A41900046805000438B505000C0000212A +:1035500068461AF04DF86B46187880070ED10120A6 +:10356000FEF736F8012C01D1092400E01424FEF7FF +:1035700035F82000FCF296F9002403E00220FEF763 +:1035800027F8F1E72100280011F07BFC0100200062 +:10359000FEF78AFB641C2406240E082CF2D338BDE7 +:1035A000FC4A106BFC494863506B8863704770B5E8 +:1035B0000400F1200D00800021182000AC3000F341 +:1035C000C7FAFFF7EDFFFCF281F9A034217A280059 +:1035D00000F3BAFA280000F300FB70BDEF49486A17 +:1035E0000422904348627047ED4810B58069002876 +:1035F00003D000210800FCF283F810BDFEB50025C1 +:10360000E74EB0698402FBF2EAFF01910090FBF201 +:10361000FAFF6940084318D1002C16D028F0CCF8E6 +:1036200007000199009822002B0007F328EB401CAB +:103630006941220007F35CEFB060F160D8490220D5 +:1036400040310880380028F0BBF8FEBD002010B5DE +:1036500000F335FB002106200EF04CF9FCF261F975 +:10366000012106200EF019F9FCF264F9CA4840382D +:103670000168820C11430160FCF22AFE10BD10B5F6 +:1036800017F0F4FA10BDF8B505000E00C54C170090 +:103690002078A84202D16078B04206D031002800DC +:1036A00017F0D2FA206125706670BF48406AC06981 +:1036B00000280DD03A003100280021F0C0FF216918 +:1036C000884213DA3A003100280021F0B8FF0EE0FA +:1036D0003A003100280021F047FF2169884205DACD +:1036E0003A003100280021F03FFF00E00800616847 +:1036F000884200DB0800A168884200DB0800F8BDB2 +:1037000010B5FBF775FA0006000E10BD10B5FBF7FB +:1037100072FA10BD70B50400FBF770FAF322CF21E6 +:1037200030250C26030007F3E8EE08080515181BE2 +:10373000201B20052078104002E020781040001D5A +:1037400008402070FBF757FA0128207811D0800834 +:10375000800011E02078104004E02078104006E05E +:103760002078304308401030EBE72078304328437E +:10377000E7E780088000401C207070BD0021080031 +:1037800010B521F046FD10BD10B50C0085494A6802 +:10379000824206D0486015F0F7FC002C01D0FFF7FC +:1037A000EDFF10BD10B50C007E498A68824206D03C +:1037B000886015F0E9FC002C01D0FFF7DFFF10BD99 +:1037C000784880680006000E704710B51400026843 +:1037D0008A4201D1FF2909D101600EF03FFA7149F7 +:1037E0008968884202D02100FFF7DCFF10BDF8B5E0 +:1037F0000500080000210091A9681600FF24C905F2 +:1038000016D5694613F0B8FC012811D16B466748FC +:103810001978401840300479A868800508D51D2023 +:1038200040012818007EA04201DA241A00E000249A +:10383000EF208000320021002818FFF7C6FFF8BDF6 +:1038400070B5060008780C008007800F10700878AB +:103850001D000007800F03281BD104212970107858 +:103860000A003100FCF792F8864206D220788006E2 +:10387000800F03280CD1052009E0864208D9207862 +:103880008006800F012801D1062000E00720287063 +:1038900070BD2900200000F323FA70BD4148C068C4 +:1038A00070474049C8607047FFB583B000261700D5 +:1038B0001D000398340002AA01AB0096FFF7C0FF79 +:1038C000FBF796F9039988420BD1FBF78B8960BD12 +:1038D00001000000CC32010000040000D26ECB7366 +:1038E00094F96B46197A884205D1FBF791F96B463A +:1038F0001979884255D033480088002802D03248D0 +:10390000012101702FF008EC002803D001242000D1 +:103910002FF006EC6B461A79197A039815F0BBF96B +:10392000FBF289FD3800244F19D028486946FDF77D +:1039300039FE002813D17869401C78610098800610 +:1039400002D400200CF0B2F90098C00601D40CF0AB +:10395000CDF9FBF270FD00206946FDF723FEFD6006 +:103960006B461A79187A0399FBF737F9FFF710FFBE +:10397000FDF723FEFBF259FD002D06D16B461A79A7 +:10398000197A039815F0CBF901E015F069F9002CCC +:1039900002D000202FF0C4EB0B480178002900D0A2 +:1039A000067007B0F0BD000000A5008040A30080B5 +:1039B00000A8008000A600808805000414C7000449 +:1039C0004F5200047214000470140004204E0000D2 +:1039D00010B5FCF281FC10BD10B5FBF713F9000621 +:1039E000000E10BD70B50E040500360CF94800221B +:1039F000310008F3F7F8040006D1F748002231003F +:103A000008F3F0F804000AD0022020731C2065613E +:103A100020812018842107F324ECC020208120007D +:103A200070BDF7B5FF212D310700FFF7DBFF050063 +:103A30002AD01C202E18288102982C00C034066041 +:103A40002021200007F30CECA078F32180088000EF +:103A50000840001D01070198090F00010143F120F2 +:103A60008000A1703918200006220C3007F332EBD9 +:103A7000DA4806223918A01D07F32CEB03217C201D +:103A8000346781550520B0702800FEBDFFB583B0B6 +:103A90001400018945690E181C21471801818421F1 +:103AA000380007F3B4EBCE48069900680C9B027906 +:103AB0000192009104992200300000F32FF921882F +:103AC000C8480022814206D16188814203D1A18881 +:103AD000814200D101220699280022F0E2FFB8704D +:103AE000287903280ED106980521042809D0052835 +:103AF00002D00D2806D104E06879022801D00128FF +:103B000000D1B97038004CE710B50400F8F77DFE1D +:103B1000012805D1200008F33BF80020C04310BD68 +:103B2000002010BDFFB5FF2181B006005D310B9F65 +:103B3000FFF758FF040002D1401E05B032E720898C +:103B4000039A05190A23002F009200D10C23F120BB +:103B500080003118029A2000FFF798FF0220287099 +:103B600000206870049820352870000A6870218948 +:103B700021810A99992001552000FFF7C5FFDCE754 +:103B80007CB50C00150006990022019200912A00D4 +:103B90002100FFF7C7FF7CBD7CB50C00150006991E +:103BA0000122019200912A002100FFF7BBFF7CBD9A +:103BB000F0B5150007000E000A0085B000242900AA +:103BC000684600F3EEF8002813D12B001D3B07F3E5 +:103BD0009EEC11100A101010100E0E0E0E0E10108A +:103BE000101010100E0030786B4618730CE0002493 +:103BF000E443072D06D1002E04D00822310003A88B +:103C000007F368EA002C03D13800694618F0F7FC86 +:103C1000200092E7F0B5130087B006AA00921A00C0 +:103C2000002505AB0EF0FBFA0699059888422AD0CC +:103C3000FDF731F8FDF7F1FE6B4E3068B10C8843AB +:103C40003060059800281ED0002401AF012005999E +:103C5000A04008420BD0A00078556D1C042C06D162 +:103C60000120FBF2DCFB3068E10208433060641C99 +:103C70000D2CEBDD002D06DDFF20785501A8FBF2B1 +:103C800040FBFBF2F6FB8CE60A00012110B5FFF7C2 +:103C9000C1FF012010BD10B58A781407A30F022BB5 +:103CA00007D101282AD1C878C10727D1800725D498 +:103CB00022E0A40F15D1130907F328EC0E08080819 +:103CC000081E1E20201E1E081E1E0A20022010BDD7 +:103CD000012811D0032811D120310878F5EFB02A3E +:103CE00001000000C83601000004000081B4181F64 +:103CF00004280DD10AE0012B0AD11309083B07F370 +:103D000010EC08070707050505050507012010BD8C +:103D1000032010BD010070B50A008C78123225070F +:103D20000020AE0F931F022E0CD1CC78E50705D1F1 +:103D3000A00701D4100070BD180070BDA207FCD40C +:103D4000881D70BDAD0FF5D0012EFAD122090A2AC7 +:103D5000F6D00E2AF0D00F2AEED070BD10B50400B8 +:103D60002CF02BFB6179022904D16030007A022803 +:103D700007D203E0032904D0012902D020790128C9 +:103D800001D1012010BD002010BD002810B509D0C0 +:103D90002CF0ECFA002805D00D218901401800799B +:103DA000012800D0002010BD70B5040027F018FDD8 +:103DB0000500E179A0792CF010FB0FE0A068C004A9 +:103DC00007D52000F9F770F902000121200023F047 +:103DD00084F8E279A17920000CF0EBFA0400EDD12F +:103DE000280027F001FD70BDB8190004481A00042E +:103DF00029020000C0000004FFFF000000A30080B3 +:103E000010B504002CF0B2FA416C002909D003006F +:103E100051216433C9004218FF494118200000F3C2 +:103E200005F910BD10B50400FB48201800F34BF94C +:103E300005200021C001201801718171416210BD6F +:103E400070B505002CF092FA040028002CF0B5FAA9 +:103E50004B21C900007A61180C00820720342079B8 +:103E6000920F0028BFD0002ABDD1227A2531120737 +:103E7000D60FFFF2DAFF207A0007C00FB04201D060 +:103E80002AF0ABFB280020F04AFC207A0007C10F83 +:103E90002879FCF7C6FEA6E710B504002CF066FAF8 +:103EA0004B21C900401800222D210A542530FFF271 +:103EB000D3FF2000FFF7C4FF10BDF8B505002CF0BC +:103EC00055FA1321490141180C7F0526DF23F6011D +:103ED000EF22022C08D180190678002416400670C3 +:103EE000087D184008751AE0CB4C603C245CE40760 +:103EF00004D00F7D01241F400F7509E08B7F002B3C +:103F000001D0012400E000240B7D20273B430B75EA +:103F1000801901781140E207D20E11430170280088 +:103F200020F0FDFB280020F0F1FC2000FCF295F8C9 +:103F3000F8BD10B504002CF019FA1322520100212B +:103F4000801881772000FFF7B8FF10BD10B504007E +:103F500020002CF032FA6030007A012802D92000CB +:103F60002BF06DFAE279A17920000CF022FA04001E +:103F7000EED110BD10B504002CF0F8F91321490161 +:103F80004018017FFB23022901D100221BE00029F8 +:103F90000DD1012217E041750121002A00D0002136 +:103FA0002000FFF7E5FA200020F0B0FC10BDC17F33 +:103FB000002901D0012200E00022002A03D1417D26 +:103FC00004231943E7E7417D1940E4E710B50400F5 +:103FD0002CF0CCF91322520100218018C177200067 +:103FE000FFF7C8FF10BD8D4A831A90420ED005DC42 +:103FF0008B4A801A0AD007280ED107E08948181882 +:1040000008D07D22D200801A06D101E0002070473E +:1040100001207047022070470E29F9D8F6E70128E1 +:104020000AD002280AD0002903D00E2901D17B48EA +:1040300070477A48C01F70477B4870477D20400119 +:10404000704710B5040008001100FFF7E8FF20706A +:10405000000A6070012BE27001D10A2002E0022BFD +:1040600002D12820A07010BD032B01D15020F9E708 +:104070001420F7E710B504000DF037FE012801DD2C +:10408000012000E00020002C06D0012C07D0022CDB +:1040900001D1FBF25AFC10BDFDF7D1FD10BDFDF7BB +:1040A000DCFD10BD70B505000020030003265C0098 +:1040B0003200A2401204120C1400AC4302D01400CF +:1040C0008C4301D1104306E02C0014400A40944276 +:1040D00000D3140020435B1C1B061B0E082BE6D3E9 +:1040E00081E6F8B50500092080010F1823E29E1330 +:1040F00001000000C43A01000004000075DB6DAB54 +:10410000B878797806020E43E97928790BF073FFC5 +:10411000040028007030009013E0A068C1040AD5A4 +:10412000800408D50098017CC07B0902014330005F +:10413000FFF7C2FF0600E279A17920000CF043F9F5 +:104140000400002CE9D1F889B04203D02800FE8198 +:1041500020F098FBF8BDF8B5040011277F014379E2 +:1041600000223F25C619A034002912D0022B05D108 +:104170002CF006F9FF30E130C07D1FE00079002807 +:1041800003D0032837D1032B35D1207CC209607CB2 +:1041900008E0022B0AD12CF0F3F8FF30E130817DEA +:1041A000C07DCA0940000243002524E001790029AE +:1041B00003D003290CD1032B1DD1607C010900071A +:1041C000000F41404801718A0906090E421812E0A9 +:1041D000012910D006290ED1C17900200BF00BFF68 +:1041E000617CC0190A09408A0907090F4A40000684 +:1041F0005101000E0A18A906D005890E400C08438B +:10420000F8BDF1B5FF2188B0B83100900170090AFE +:10421000417027F0EFFA0A4A01905069012811D93C +:10422000106A00280ED001200DE000007D02000081 +:104230006E09000060090000CEF9FFFF881300003E +:1042400018420004002000990871000A48710220F9 +:1042500004900098801D08905069012871D9116A56 +:1042600000296ED002900020039003981521490187 +:1042700041439248002608180521C90107904018BB +:104280000690476B002F57D00298089C401E029062 +:10429000FF20B9302070000A60700398002520715B +:1042A00021000C312800257407F37AE807990B20C8 +:1042B0008001081805908078A07105982100407849 +:1042C000E07106980831406B60740698C06B07F384 +:1042D00068E805980078607100200799C200891885 +:1042E0000522D20189184969002910D0A21900239A +:1042F0009374CB7993748979761C09010B43360644 +:10430000360E7F1E937405D06D1C2D042D0C401CA1 +:104310000428E2D328000F30A070000AE07004984F +:10432000401913300004000C049008984019133011 +:1043300008900298002804D00398401C022803909B +:1043400093D3019827F05AFA009804998170090ACA +:10435000C170049809B0001D0004000CF0BDFEB54A +:1043600004002120405C0E0021000025AC312F000C +:104370000028019122D0A8210A5D90423CD1210061 +:1043800030008831223026F060FE002834D12079B8 +:10439000012502281FD130000C302CF06FF80028C6 +:1043A0000AD08168C90416D4A1798279914212D1C8 +:1043B000E179C07981420ED101270CE020790228F1 +:1043C00036D120002BF0DCFFFF30FF30801C407F17 +:1043D000800711D501253000123001990622009086 +:1043E00026F033FE002807D035480099062226F033 +:1043F0002CFE002800D000252079022816D1012D9E +:1044000007D101980622B11D26F01FFE002800D119 +:1044100001272BF006FA002808D0012F06D1012D24 +:1044200004D102202BF0FCFF04F04BFC2800FEBD61 +:104430000128FBD1CEE7FFB583B01C0006220700A0 +:10444000012001903800C030029006697761707BCE +:10445000400840007073029800690500C035C630FE +:1044600006F34CEE0598002805D028000599062291 +:104470000C3006F344EEE87897210840E87038796C +:10448000022804D102980169380002F086FB002C52 +:1044900003D020780121084320703000FFF748FB4B +:1044A000002801D1019005E0002C03D020784008BD +:1044B00040002070019807B0F0BD000018420004D1 +:1044C00020CC3100FB48007870473EB50021040045 +:1044D0000A000B0068460EC00622F6496846EB311A +:1044E00006F30CEEF34D0022AA70687B0121002830 +:1044F0000CD0012807D0042803D1802018E2767A56 +:1045000001000000C03E0100000400002601BEC7FB +:104510006B46987106E0002C02D06B46997101E061 +:104520006B469A7129736B469879A873E7481123F3 +:10453000C26900215B01C943D2181180C069694674 +:1045400017F0EDFA3EBDF0B591B0E04CE0690CF02B +:104550008BF80500402101A806F376EE2100062223 +:10456000153901A806F3D4ED210003A8627C0F39A8 +:10457000801C06F3CEED2000C17C6B469972007D55 +:10458000D872D348D04E008800219881EA20835DFC +:1045900001AA0AE07018C030007F57182037400683 +:1045A000400E491C0906090EB8728B42F2D800274A +:1045B0000420B7703073E0692822525D81680126BB +:1045C0003603D207B143D20C11438160BF480FA913 +:1045D0002C3801F3D4F910AB1880E0698168C90464 +:1045E00004D4B9498031C969002905D02A000023C3 +:1045F00001A917F06AF802E001A917F035F80028C0 +:104600005FD1E069816831438160E069002858D05A +:104610000D2189014018806B002852D0603007833B +:10462000E06900284DD04018806B002849D06030E8 +:104630004783E069002844D04018806B002840D0B0 +:1046400060308783E06900283BD04018806B0028E9 +:1046500037D06030C783E069002832D04018806BC3 +:1046600000282ED080300780E069002829D040182B +:10467000806B002825D080304780E069002820D05A +:104680004018806B00281CD080308780E0690028AB +:1046900017D04018806B002813D08030C780E069A5 +:1046A00000280ED04018806B00280AD08030078187 +:1046B000E069002805D04018806B002801D08030C8 +:1046C000478111B0F0BD7CB504000BF0CDFF0500B3 +:1046D0002000EEF7BBF8A168880341D40120400414 +:1046E00001437948A16020300079002809D00F20CB +:1046F0008001201800696030007CC00701D00121D2 +:1047000000E00021200013F056FC0021200001F001 +:10471000C8F8402120002EF026ED200024F0B9FF3B +:1047200069488030406A00280FD06748C169002975 +:104730000BD07D23DB00594300220192009103221C +:1047400029002000002317F0D0FB624800880028D1 +:1047500006D007F0B0FF002802D0200008F0AAFC25 +:104760007CBDF8B50622070058483900C5695A488B +:10477000281806F3CEEC280006223900AC3006F3E8 +:10478000C8EC280088302021060006F35EED3C00CE +:104790002034A279B91D300006F3BAECA179A82023 +:1047A00041550F2080012E183169E2796031087C73 +:1047B000520740084000D20F10430874FD221040F9 +:1047C000E27931691207D20F520060311043087448 +:1047D000E079400701D5012100E00021280013F015 +:1047E000EAFBE079C006C10F3069FF302130C177A4 +:1047F00035490020487139000CF0FAFF0120FFF71D +:104800004DFCA179B81DFFF2C7F93A003900280024 +:104810000DF0F6F9F8BDF0B50F2107002B4C89011A +:10482000E06987B04118096902910BF01DFF264E1F +:104830000190B068F9F776FC07202500803D3073C1 +:104840002F763079F8F710F8FAF2F1FE059104901E +:10485000287E0027002801D002287DD11B4803A90B +:104860002C3801F38CF80100174A0398891F0904BA +:104870002832801D090C069223F040FA287E002879 +:10488000EBD1E0690199F9F725F808F0A0FCE0699F +:10489000E18AA0304181E0690F229201801801690C +:1048A00009488030466B036B4E620B62E169074E2C +:1048B00089180969C26B806BCA618861E869403EEA +:1048C00000280BD0376115E05871040058720400BD +:1048D000AA3904005C3C000429020000FA4805994A +:1048E000C36C826C0498801A9941F84A3B0006F325 +:1048F000EEE93061E0690126826836033243826066 +:10490000E26911235B010420D21810722A0BD7FB35 +:1049100001000000BC4201000004000024F866D140 +:10492000E06904218268B243826007200CF0A5FC94 +:1049300000280AD1E9480599436C026C0498801854 +:10494000E28A59419202FAF29BFEE06981683143A2 +:104950008160029E0020FF36761CC0433783F082C0 +:10496000FAF26FFE71623062E06900E098E02EF0CA +:1049700008ECFFF26FFA7163306303200AF0BBF8B2 +:10498000E0690AF0F2FF207DC00704D0617EE06993 +:104990000022FEF75EFFFEF723FFE0692EF094EBA6 +:1049A000CE49E0698031CA7C20308276097DC176AB +:1049B000E069A030477207F088FE002801D0C9489E +:1049C0000770E06900210AF0DDFDE069C34E8168EF +:1049D00004229143603E3279D207520F11431022D4 +:1049E000816091437279E069D207D20E11438160F0 +:1049F000A86A002823D1E069CA040BD5CA060BD4E3 +:104A0000490709D4010020318A7ED20602D5497DAA +:104A1000090701D50121A96231797279114318F092 +:104A20004DF8307900280AD0E069F1218900AB4BBC +:104A300042186B330092627C991DEDF713FE2A6ACF +:104A4000E0690699002310F0C4F8E0693B21095C95 +:104A50004907C90FFEF7AAFDA048072180388068E2 +:104A6000F9F71FFCE06901210FF061FB9E4D286AF8 +:104A700000286AD06869012867D9E0690DF049FE0D +:104A800015235B0158430B21401989014018007A16 +:104A900000285AD00022E069110002F074FF54E0AF +:104AA0000626F5F7D7FA019D2035287A0028E06917 +:104AB00027D00FF072FBE0690FF093FB687A0DF0DE +:104AC0007CFE002800D1FEE7019A697AE0692A326B +:104AD0000FF0C3F9E06900210FF029FBE0690199AB +:104AE0000CF02AFE002808D0E0690199F8F7FCFED6 +:104AF000E06900F0D7FE08260AE00198FFF73BFEC8 +:104B000006E000F0CFFEE06911214901401807726C +:104B1000E06901228168120391432A7AD207D20CFC +:104B2000114381606D4971485222A03106F3FAEABF +:104B3000E06919F0A1FAE069002100F0BCFE6748C5 +:104B4000310080388068F9F7ACFB0CF035FD12F0CD +:104B500023FFE06981684A0702D402221143816081 +:104B600007B0F0BDF7B584B003255C4C8034E06934 +:104B70000BF084FDE71F0600F93FB86804998842EE +:104B800006D0002802D00C20FFF74FFE0420E7E7F4 +:104B9000059B06F3E4EC0AA006A0297F758D8D8A9B +:104BA00020A0F878401CF870E0698068C0040BD53C +:104BB0002AF043FE002807D005F0B3FC002809D1F5 +:104BC00005F099FC0028FAD1E0690BF028FE0028D6 +:104BD00000D002257FE0387B07287CD0032848D806 +:104BE0007878401C787047E0E069012100F063FEAE +:104BF000F6F771F8002801D0F6F73DF829F0F4FC3B +:104C00003649803908710020F7F738FE2036317AAE +:104C10003700324E803E3000EB3080360029039062 +:104C200009D0E06903990CF087FD0121002830626A +:104C300000D0002171620020009001902748274990 +:104C40006030827AE0695C3118F05EFD0398FFF70E +:104C500092FDE0698068C004C00F38721F48803838 +:104C60004178491C4170316A002902D1407B0328F8 +:104C700002D1FFF772FC2EE00020FFF73AFC2AE099 +:104C80007878002827D0032825D2401C78700BF0B4 +:104C900055F8F1E7387B07281DD0032801D90420F7 +:104CA00000E00A20FFF7C1FD15E0E06917F030FFD2 +:104CB0000026BE603E70E06917F0E8FE00280AD0CA +:104CC00001890B4A09180A70120A4A70320A8E7159 +:104CD000CA7117F052FF280042E70000D8710400A3 +:104CE00040420F006805000418420004C8E80004B0 +:104CF00012800000FFB581B000240E000398002848 +:104D000041D00398062201890D182900F948123173 +:104D100026F0AFF9002835D1A878F64F9C9A2E8C52 +:104D200001000000B8460100000400007722B5BD74 +:104D3000000915370A2810D00BDC012858D00328A9 +:104D400056D0082829D1F8690A9A290018F0D2FF0C +:104D500022E00B280DD00C281FD1EB4CEB3CA068B7 +:104D6000F9F7F4F928002EF01AEA6078002861D1EA +:104D700012E0E54CEB3CA068F9F7E8F9207B02284B +:104D800003D0012808D10AF0E3FFF8690A990AF074 +:104D900076FA039816F083FF0124002E7FD0306846 +:104DA000056F1C380090A8780107890F77D100099A +:104DB0005DD002285BD00B2871D1D34F0124EB3F8B +:104DC000B87B01280BD0B868F9F7C0F9B86900289A +:104DD00005D07D21C9004143B868F9F795F93069DC +:104DE0000028387B30D1012859D10220387356E091 +:104DF000C54CEB3CA068F9F7A9F9207B052803D046 +:104E00000428C9D10AF0A4FFF8690A990AF037FA10 +:104E1000BD481738040000F3CCFD687829780202F9 +:104E20000A4329002031200000F366FD039816F0A4 +:104E3000B7FCB1E70328AFD2401C60700AF088FFCE +:104E40000020FFF760FBA7E7012828D1B878401CB5 +:104E50000006000EB87020E0E878F7210840E870FE +:104E60000098FEF783FE002819D1022417E030696C +:104E70000124002807D1A448EB38017B04290ED176 +:104E8000052101730BE0A049EB39087B042806D10A +:104E90008878401C0006000E88700228DCD92000AB +:104EA00005B0F0BDF3B50020B1B00600964D0A90F4 +:104EB00015350D900E901490E8690BF0E9FB1790F2 +:104EC000E86900212F9018900A0028A806C01C212C +:104ED0008E4806F3F8E98E480E2106F3F4E928001F +:104EE00024380E212E9006F3C4E93198319C417A82 +:104EF000027A0D340802104301D086490880824EA0 +:104F00000027CB3E300060303771076447642F982C +:104F10001D21490140180776E8690F229201801887 +:104F20000069FF302130C777E86980180069603078 +:104F3000017C490849000174E86980180069FD2274 +:104F4000603011400174E86901228168D203914305 +:104F50008160310005202039777148730800D43012 +:104F60002D9000F334FD68483199062206F3E4E8F9 +:104F7000319930008A79E030C274C979017531996C +:104F80008A7A8275C97AC1753199097B01768776EB +:104F9000329831000D38D1312C91B5E1001F2A90A3 +:104FA000E078A17802022A980A4382427ED81992B8 +:104FB0006178237808021843C72878D036DC2D287A +:104FC00076D01CDC032874D00FDC002872D00128B6 +:104FD00014D10E200E2A00D2100002064A48120EEA +:104FE0000B3882722E98211D6CE02028F0D1E869E0 +:104FF0007721C9004118200023F075F87FE130289F +:1050000076D0482875D07F28FCD0BF28F6D14048FC +:10501000BF210170E278A378110219434170E27850 +:10502000A17812020A43211D801C4BE0FF2320338C +:10503000C11A984270D048DCDD286ED0FF38801E3F +:105040006CD009284FD01228D8D121000C3127006C +:10505000082268462B9106F370E801990098002316 +:10506000594058400843C9D00822391D02A806F308 +:1050700064E8039902980023594058400843BDD082 +:105080000822391D02A806F358E82B990822684621 +:1050900006F352E868460FC8801A1B4A99416B3ADA +:1050A0005164106408221848391D04E02FE110E112 +:1050B00000E134E01EE03B3806F33EE812482B994D +:1050C0000822333806F338E819E12B2973D02E294A +:1050D00072D0302971D03F2990D101207071E178D0 +:1050E000A0780A0202432D98211D00F305FC06E179 +:1050F00018E000E12020202A00D810000206120E3D +:105100006A742C98211DDDE74372040008FF02C079 +:1051100030520004AA3904005CE05FE04EE02079E0 +:105120006876ECE01700E27000220520E41A1DD436 +:1051300001000000B44A010000040000834DC009D2 +:105140000EA901AB07C30FAA0092A01C16AA14A9AE +:1051500015AB02F3DFFD390AA7700120E170307151 +:10516000E86927F045FC002803D12D98210000F3C1 +:10517000EEFB18990F2080010918086908AB603010 +:10518000027C1B7E52085200DB091A430274D007CE +:10519000AA7CFB23400F1A400243AA740869FD222F +:1051A0006030017C08AB11401A7E5206D217521CA7 +:1051B000D207920F114301748807A97CC00FF72210 +:1051C000C00011400143A974A3E075E09BE025E114 +:1051D0000022200028A904F30CF828AB5878687640 +:1051E000FF481978817694E0FE492079487390E071 +:1051F000201D03F389FE01282DD118980F21890164 +:1052000047187869002805D1189801210FF064F932 +:10521000002820D07869DD2189004018092106F393 +:1052200032E8617822780802104379691B22520122 +:1052300089180875E178A078090201437869801817 +:105240004175E178A0780A020243E749786940187D +:10525000211D05F37CEF201D03F383FE032815D1E8 +:1052600001203071E86927F0C3FB00280AD005222D +:1052700005A901920091A01C0CAA0AA90BAB02F38C +:1052800057FC03E02D98210000F361FB201D22F064 +:1052900045FD00283DD001203071E9690F229201BF +:1052A00089180969EF22FF312131C877A97C1020C4 +:1052B00011400143A97428E01A21A1700021E17076 +:1052C0002D21217000216170C8492D200877E278D6 +:1052D000A378100218434877E178A0780A020243C5 +:1052E000C248211D0DE0C249C7200877E278A378A3 +:1052F000100218434877E178A0780A020243BC48BC +:10530000211D1E30E8E6482189E02D98210000F398 +:105310001EFB19992A986418401A241D042800D3EA +:1053200046E6B448006A002811D017982030007A69 +:10533000002807D0E8690EF044FFE8690EF065FF29 +:1053400002200D90687E0DF04CFA00287ED0287D5A +:10535000C10601D4C00719D021206B461873022062 +:105360005873A87E8107687E890F15F0C5FC6B46CF +:105370009873A87E8107687E890F15F0ABFC6B4699 +:10538000D8732D98042203A900F3C0FAE86927F026 +:105390002FFB00287DD0307900287AD0E869EDF71E +:1053A000A9F900285CD1E8690F27BF01C019C468BA +:1053B00032993198FF344018643099342C2104908C +:1053C00005F38AEFE9690020C919C96810AB486084 +:1053D000187C800627D500220EA90FA80292019101 +:1053E0000090E8691499012716AA15ABEDF7B1F9F9 +:1053F0002078800600D4002710AB187EA1780842E0 +:1054000000D1002710AB187DE178084201D0002FB1 +:1054100029D108AB187A000722D508E07F21217036 +:10542000090A617071E708AB187A00071BD50022E2 +:105430000EA905A86B4607C30CAAE8690A990BAB2D +:10544000EDF787F9207800070AD500E008E008ABFF +:10545000187CA178084203D0187BE178084202D179 +:105460000D9833B0F0BD002200920192E869F1215D +:1054700089004318319A0499ECF713FE002808D0EC +:10548000012030710498049942782D98921C00F301 +:105490003DFA18980F21890140184069002808D06A +:1054A000514ADD2189004118D21D8018092205F3D7 +:1054B0004EEE38211AA805F3E6EEE8694E49484C4D +:1054C0001A914E490026803C26901B91E661806827 +:1054D000C00417D417986A7C2C99801D25F0DDFD37 +:1054E000002811D1FAF2C1F82200D36C926C801A14 +:1054F00099417D223300D20005F306EC3949096A4F +:10550000814201D30120E061E86909F018FFE869F0 +:1055100017F0B4FB687E20AB1874A87E8107890F52 +:105520000007800F59749874DE74E8698068C004BD +:105530002C4801D5006900E040697D2311EC048FFF +:1055400001000000B04E010000040000D097136578 +:10555000DB00584322900CF042FB00280BD1A87EC0 +:1055600020AB8006850F9A7C597C187C2B0018F0A4 +:1055700099F8002804D020AB187D4008400003E0D3 +:1055800020AB187D0121084320AB187566622662A6 +:105590002049229840182190187D10210843187541 +:1055A0001AA82096F8F7DFFC13498860012100282B +:1055B00000D10D9908005EE7F7B50E4CE0690BF0DD +:1055C0007BF80D4D06002878002801D00020FEBD94 +:1055D0000098E0610020074F012168712970803F29 +:1055E000B86268702873E870522238000A49A03007 +:1055F00014E00000587204005871040076030000A3 +:10560000ECFE02C0305200041842000401450100C3 +:105610009146010010270000C8E8000405F3A0ED42 +:1056200002990198FFF752FC01280AD002282ED1D6 +:10563000300020300700407A0DF0DDF800281CD142 +:105640001AE0F86900280FD0AF49E0690E000CF0AD +:1056500091F8002808D101206871AC4B009806220F +:105660003100C01805F37CEDE169112252010320DD +:105670008918012608721AE0FEE73200797A00984C +:105680002A320EF008FC009800210EF06EFD9E49B3 +:105690009F4800265222353105F362EDE06918F08B +:1056A00009FD9948173800F39BF900202870300055 +:1056B000FEBD954A10B56B3A51830323803A052805 +:1056C000137302D1FEF767FF10BD07280BD10D2918 +:1056D00009D1517B052906D1917B002903D10120F5 +:1056E000FEF725FF10BDFFF7BEF810BD864B062262 +:1056F000EB3B10B51A731A0080325183FFF7B3F8F1 +:1057000010BD70B50400804D6B3D287E00281AD175 +:1057100060690FF000F9A86A002802D06069FEF7FE +:10572000FAFF0020A8626069002100F0E2F87648E4 +:1057300011211530C06949014018007A002802D1B2 +:10574000122007F0BFF8606907F07BFD002070BDF4 +:105750007048008870476C49F8B56B390400087EC2 +:105760000E005436002801D002280AD130006946C4 +:1057700000F32DF9050002000099200005F3F0EC7C +:105780001EE065482071020A62710B7E0625DB1E51 +:10579000C21E05F302EF080D0D0A1A051008100AC3 +:1057A0000220C04301E00120C0432080488B04E078 +:1057B0000120228001E002202280A070000AE07017 +:1057C000300000F30DF92800F8BD0420C043ECE7D9 +:1057D000704770B50400002944D020000AF06CFF27 +:1057E000210005000622AC3105F3BAEC210020228D +:1057F0008831A81D05F3B4ECA820015D28002030F5 +:105800008171C279FB210A400F21890161180B695E +:1058100060331B7CDB075B0F1A43F723C2711A400E +:105820000B6960331B7C9B07DB0FDB001A43EF2304 +:10583000C2711A400B69FF332133DB7FDB07DB0EBC +:105840001A43C271A268D204D20F02720A69127B93 +:1058500042720969497B8172A06801214904884329 +:10586000A06070BD200000F03BF870BD10B50400D2 +:1058700011D02548EB38407900280CD0224815304B +:10588000C0690AF019FF0622210025F010FC00284B +:1058900001D1012010BD002010BD1B491531C9697F +:1058A000814206D11848EB384079002801D0012008 +:1058B000704700207047002810D013491531497EE9 +:1058C00000290BD00F2292018018026911730E4932 +:1058D00000691531897E41730020704701207047AF +:1058E000002810B504D00AF0E7FE2B2105F3FEECEA +:1058F00010BD002810B505D008480A0000684821EE +:10590000F4F2A1F810BD0000437204002902000067 +:10591000C8E80004AA390400FFFF000000000004EA +:10592000062110B5FF4805F3E2ECFE480021018096 +:1059300001214180062141710179C322114089066C +:10594000890E017110BDF7B582B0060019CC89FB34 +:1059500001000000AC520100000400006F5236D676 +:105960002AF04AFD4B21C9000700441825F07EFFAC +:105970002200DC32050000922020C35D049A0399C6 +:10598000300001F348F8280025F074FF05B0F0BDA1 +:10599000F0B5040085B025F069FF03902179AA20B5 +:1059A0000329015B02D17D20C00000E0E34806F33B +:1059B00032E9E34E0500022720002AF044FD1030B2 +:1059C000010040310A7E002A45D00268002A42D0F8 +:1059D000521E026015D1087E012806D94F8302228B +:1059E000A11920001DF006F935E0012804D14A8BE9 +:1059F000A11920001CF012FF012120001DF0C8F9A0 +:105A000029E0097E032926D1AA4224D2217903293B +:105A100007D14168491C0329416002D20168491934 +:105A20000160007E00280ED16B460290597A020078 +:105A30003943597201900090029920003523F6F7FE +:105A400058FE002807D0112040012018418A012269 +:105A50002000FFF782FFE279A17920000AF0EFFC35 +:105A60000400A9D1039825F005FF8FE770B5A0B019 +:105A7000018946690D1830002AF0BEFC4B21C9008F +:105A800044182420005D01281BD169782A78090276 +:105A9000114328002C300C3904AA22F061F9AA2005 +:105AA000815B200001222D306B4607C30F2080014F +:105AB000301800692300027B2533300004A900F36D +:105AC0006BFF20B070BD08B500916946FEF7C0F8C5 +:105AD00008BD10B519F044F910BDF3B583B0050049 +:105AE000032625F0C3FE029028002AF085FC04005E +:105AF00028000EF07AFB1121490100206918087274 +:105B00000D218901611808718E480088002803D092 +:105B100007F0F8FA2DF064EB280002F0C3F82C002F +:105B2000012720002AF08FFC50300776E279A17916 +:105B300020000AF084FC0400F3D1049A00922A00A9 +:105B40008149AC3228000323FEF76AF8401C00D1DB +:105B50000126029825F08EFE300017E73CB50300C1 +:105B60007AA003C86D4600900020019101006A5C94 +:105B7000941F9C4204DC921D9A4201D3685C3CBD98 +:105B8000491C0906090E0629F1D33CBDF8B50400ED +:105B90000F0015001E00072105F3B2EBC020207096 +:105BA0000520607030000026002805D12878800785 +:105BB00002D00120A07002E0A078002804D068780C +:105BC000FFF7CCFFE07000E0E6702671F879B97954 +:105BD000000208436071000AA071F8BDF8B50C001E +:105BE000070016001D00002802D03800FEF760F9FB +:105BF0001821200005F384EB3D20207016206070F2 +:105C00006878A070112040013818407E002803D128 +:105C1000E07808210843E070E078FB210840B17883 +:105C20008907C90F89000843E0702978800880003F +:105C30008906890F0843E070F8BDF0B5040085B00F +:105C40002AF001FC009020002AF0D6FB0500207904 +:105C5000022804D120000621AC3005F328EB25F002 +:105C600005FE06000121200000E001211DF090F852 +:105C7000E279A17920000AF0E2FB0028F5D130009A +:105C800025F0F8FD2600C03602E00120F0F772F89A +:105C90003078F6F732FE0028F7D00520C0012E1824 +:105CA00002E00120F0F766F8F0790028F9D10D2024 +:105CB00080012818C06AF4F2E2FA2800203003902C +:105CC00040780D22920101070027A618002901DB68 +:105CD00080061BD5E81DFF30FA300290406900288D +:105CE00004D0F0F70FFD02984761B762039840783F +:105CF000010701D4800609D5280080300190006892 +:105D0000002803D0F0F7FEFC019801E02800803065 +:105D10000760F76103984078010701D4800604D535 +:105D2000706A002801D0F0F7EDFC7762A0680421CA +:105D30008843A06020000DE0A40500048813000043 +:105D4000290200005C3C000420CC31002A3A6A7A27 +:105D50008A9B00002030417DF7221140BCEA1BBD28 +:105D600001000000A8560100000400003C88E5BACC +:105D700041750BF053FCF9F2B8FB002102200BF047 +:105D80001DFE0CF0C3F80AF074F9032120000CF09A +:105D9000DBFA009B2A00083329001E0048326431D8 +:105DA0002800FFF725FF112040012818837EFE48B8 +:105DB00032002918FC480E302818FFF7F1FE2000A9 +:105DC0000AF02BFA002802D025F05AFDFEE72079D0 +:105DD000022807D120000AF0A7F9002802D025F0F8 +:105DE0004FFDFEE7EF2080000122FF212018FDF784 +:105DF00050FD0AF036F9002806D00CF08CF801218D +:105E000002200BF0DBFD0DE0002103200BF02CFD48 +:105E10000020FAF7E8FF012103200BF0A2FDE3497F +:105E20001F20086217F0D2FBF9F259FB20000EF098 +:105E30000AFAB5E510B522F050FC10BDFEB505001C +:105E40002AF0E4FA040028002AF007FB07000E21DC +:105E500060180190FEF2C5F8060001980E21FEF2CE +:105E6000DDF80100387A0F278307CF48BF011E38BD +:105E7000EF193F6922184B203F7BC0009B0F201871 +:105E8000002F4CD00027012B01D0022B03D1002979 +:105E900045D102230DE02B79032B05D16B79002B23 +:105EA0000CD100293BD009E0002938D0002E03D0C6 +:105EB000012324210B5401E024210F54616C01299A +:105EC0002FD1210020310D00009749780B0702D512 +:105ED000890607D501E08B0602D5EC21095903E0BC +:105EE000090702D5EA21095D0091B1490968002935 +:105EF0000ED169788B0712D40B0701D4890607D518 +:105F00006B46197809070AD5EE21095B002906D0EE +:105F1000616A002903D020300079002801D10020D7 +:105F2000FEBD606A012803D1D07840084000D070DF +:105F30000120FEBD70B50C0016004578226801787E +:105F40001170090A5170226841789170090AD17064 +:105F5000236842781B1D811C2D1D180005F314E9D0 +:105F60002068401920607078317800020843401999 +:105F70003070000A707070BDF8B50F002AF046FA54 +:105F8000050038002AF052FA05260400F601AD1982 +:105F90001AE02079022804D020002DF030E90028F2 +:105FA0000DD02000FDF741FF002808D020002AF086 +:105FB0002DFA8019406A696A884200D968623900FE +:105FC00020000AF007F80400002CE2D1F8BD10B55B +:105FD00004000221FFF7D0FF03212000FFF7CCFFD0 +:105FE00010BDF8B505000E002AF037FA026804006B +:105FF000007AB10780088000890F08438106890E66 +:1060000021720021D177FE2191770E2150180700CF +:1060100005F380E9012E01D0022E0DD12879032845 +:1060200006D16879022803D138002DF0ECE8F8BDDC +:10603000380022F021FEF8BD28002AF0E7F95121AE +:10604000C90040188078F32180070028207A02DAFE +:106050000840083000E008402072A8680121490388 +:106060008843A8602879032802D168790228DBD008 +:10607000380003F3DDFEF8BD70B506004D4801257C +:10608000006A002803D12AF026FA002801D1012055 +:1060900070BD00202AF0CAF9002804D00BF0CBF81C +:1060A000002800D0002502202AF0C0F90AE02000D4 +:1060B000FDF7BBFE012801D100250AE0217920006F +:1060C00009F088FF0400012D03D1002C01D0B44257 +:1060D000EDD102202DF056E8012D0AD1002808D07C +:1060E000112149014118097A002902D0B04200D09B +:1060F0000025280070BDF0B587B007002AF0ADF983 +:10610000039038002AF082F9050064305121C9005B +:106110000290681801900398060008363800FFF7CF +:10612000ABFF0F2189017C18012856D1387903284B +:106130000DD1787902280AD138000AF0ACF943224F +:10614000039952018218497AC03011728176112068 +:1061500040012818417EF322002915D0807E0028B6 +:1061600030D0686C00282DD02169403596949CB8B9 +:1061700001000000A45A010000040000C8E7900ECE +:10618000487B1040AA789207D20FD2001043487380 +:1061900021690207920F1FD1CF2225E0686C0028E9 +:1061A0001CD00520C0012818807A800700282069AB +:1061B000417B0BDA114008310DE000003B0200008A +:1061C000C0A00080A00500041842000411404173E3 +:1061D0002069CF221140417307B0F0BD2169CF2360 +:1061E000487B18404873216910404873F4E705A9BB +:1061F00006A817F06BFA216905980873039948728D +:106200000E216818FDF214FF6B46197E327889075B +:106210009307890F9B0F994209D19209012A09D14D +:106220000A00024303D0012904D1002802D038001B +:10623000FFF7E1FE387903280CD17879022809D1DB +:1062400038000AF032F94322520182180599C03011 +:10625000117281760198807880072CD56B46187E64 +:106260008006800F13D10298C078810704D180087E +:1062700002998000401CC8700C2004A910F0EAFFAD +:1062800003002069029A017B06A8FEF204FC307824 +:10629000CF2108406B46197E8906890F0901084302 +:1062A0003070187E8006800F05D10198FD2180781E +:1062B0000840019988702169307848738006216907 +:1062C000800E92E7F0B591B00027050004972AF000 +:1062D000A7F8040028002AF0CAF806006879022806 +:1062E0007ED14B20C000201805902800FFF70DFF3D +:1062F000042101200AF0FDFF00281CD12800FFF72F +:10630000A7FD012817D10F27BF01E81910900069D8 +:106310000200017B0D3228000DF0DBFD00280AD1C0 +:1063200028002979AC3002290F9011D1280009F0FA +:10633000CBFE002802D0002011B0F0BD2879022841 +:1063400006D12100FF310F980622F33104F326EF26 +:10635000FF480088002803D006F0E8FE2CF054EF38 +:10636000F9F2CDF8002102200BF032FB0BF0D8FD42 +:10637000F849486A0422104348622800F0F711FDEA +:106380000F2292010020A718B862F8622800F2F7E5 +:106390002FFB00283CD02800F2F7BDF8F42000596C +:1063A00000281AD0FF21F131095B0200C901CB1787 +:1063B00000200D93C0437D230E910100DB0024F0EB +:1063C00060EF7D2205F302E90D9B0E9A04F3C4EC05 +:1063D000401C0023B8625941F8620022012100E00C +:1063E00024E22800F0F72DFD2120005D80060FD566 +:1063F000109800696030007CC00709D07721C9007F +:106400006018F2F72DF8012200212800F0F719FD9D +:106410002120005D05990007FF31C00F093100F30D +:106420002FFB0BF005F928000CF00AF817F039F9EA +:10643000109801220069017B2800FDF746FA0E2121 +:1064400060180C90F3F20DFD2A005D3207060092F1 +:106450003F0E00220C9839001300FEF2E3F901917F +:1064600000900C993A00280017F08AF95121330066 +:10647000C9000833621821001F00643120000B930B +:10648000FFF7C0FB1121490160180A900990837E33 +:10649000B148B1490E303A0061182018FFF78AFB65 +:1064A0000998817E2800A0300029089010D0200093 +:1064B0004030817A89073DD5807880073AD4200022 +:1064C0006030C179FB22890889001140C17131E037 +:1064D0000521C9016718B87A80072BD5872080006D +:1064E000005D00283AD0307A800728D11F21490169 +:1064F0006018007C410707D421006031CA79FB2372 +:10650000920892001A40CA718007800F0BD00128B0 +:106510001FD0022807D10898408981028F4805F3CF +:106520008EEB401C786209F0A6FD002802D02800FE +:10653000FFF757FD87208000005D00280ED01F2147 +:1065400049016018017CFB22114089088900491C1F +:106550000CE00898408981028148E0E71F21490149 +:106560006018017C042211438908890001740A988B +:106570000790407E002833D0200060306238685D8C +:1065800001000000A05E0100000400009B3D43628A +:106590000690C079800704D1092200219201A01839 +:1065A000C1720921002689016718F889C14389074A +:1065B00003D08008761C012EF8D325221201032176 +:1065C000A01804F392EEB87C8F21069A0840761E3C +:1065D0007107D279490E0843F97A5207D20F891808 +:1065E0008907890F800880000143C720B974387477 +:1065F0000120787428002030017DFE292DD01F292C +:1066000018D301E00A390175017D2929FAD209213F +:1066100089016118C97A002902D0017D143105E091 +:106620006721095D490702D5017D0A310175007DA9 +:10663000A07712E00A000E3A072A05D86722125DF9 +:10664000520701D5093106E0162906D96722125DE5 +:10665000520702D409390175A17709F019FD109884 +:10666000002100690F27C173BF01280009F0D9FD7F +:10667000002800D0FEE7002029F0ECFE0600287973 +:10668000032816D1002E14D0B068C00411D52800FC +:1066900029F0D0FE0300F0194069002809D00178E4 +:1066A000002906D034491A2241181800283004F372 +:1066B00080EDC026A81907008068082106812800FF +:1066C0001DF094FE38690521068128001DF08EFE1C +:1066D0002800FDF745FC2800FDF78FFC2800FDF79A +:1066E000D9FC17F01DF8022806D010980069017B2C +:1066F00001208840ECF708FE022128000BF038FE4C +:106700000F9902200BF0C4F80898017A280088300D +:10671000FDF292FA0120FAF77AFB0022FF213A31CA +:10672000280013001BF0B0FB0022FF217C31280061 +:1067300013001BF0A9FB606A002806D028000BF0AC +:1067400070F8002801D10EF0E7F9F9F237F90021CD +:1067500002200BF01AF90BF0F2FB012102200BF0E2 +:1067600041F90BE05C3C000400A800803B02000003 +:10677000002F6859404B4C00A1030000F8F2C3FE03 +:10678000FF2291322E2303A904A8FBF704FE002860 +:1067900051D0039818300290606C012806D1039AFA +:1067A00005980A32303002A9FFF7D8FB0798039A00 +:1067B00000780A3202A900F396F9606A012806D12E +:1067C000039A20000A32283002A9FFF7C7FB079876 +:1067D000407E002806D0039A02A90A32FF482018FA +:1067E000FFF7BCFB0298FF212B310170090A4170B1 +:1067F000022200218270C1700B99001D04F3D8ECB5 +:106800000399C87A8A7A030202981343C27884787B +:10681000120222439A18121D8A72120ACA72C17891 +:10682000827809021143001D08180290049A0F99FA +:106830002800FBF78AFE012128000DF0BEFC01278D +:10684000380083E5F8B506000F0029F01AFE0400B1 +:10685000103425F029F8B9780500C80907D180342B +:106860003000617120F0F7F8300014F008FA2800C9 +:1068700025F01EF8F8BD4A78022A00D1E2E77047F9 +:106880000B0010B5018909180C00203422784069EA +:10689000082A38D00EDC032A1DD0042A16D16278CB +:1068A0000B2A21D01CDC002A21D0092A24D00A2A54 +:1068B0000CD119E0152A0AD07F2A07D1002805D06B +:1068C0000279032A02D17F222CF0B4EC10BD210002 +:1068D000FFF7D1FF10BD0A002100F7F798F910BDAE +:1068E0000C2A01D00D2AFAD12CF0A8EC10BD0A0018 +:1068F0002100F7F7F0F810BD0028FCD00279032A38 +:10690000F9D10922E0E70A00210011F05AF910BD7F +:1069100010B50B78002B0AD05B1E1B061B0E0B70EC +:1069200005D1D178DF231940D170FDF7CDFA10BD24 +:10693000F3B583B00F00039829F07CFD05000398A0 +:1069400029F09FFD4B20C0002E1887208000405D5D +:10695000002819D034002034A07C800714D51120E1 +:10696000400128180290807E01280DD024F09CFF61 +:10697000012F01900AD1F06C002802D1207B002861 +:106980001CD0019824F094FF05B0F0BD4AC072C736 +:10699000010000009C62010000040000B3ACC6DFEF +:1069A000002F15D1039829F04FFD4B21C90046183F +:1069B000FF30FF30801C0189C08941438D48484326 +:1069C0000399A0314989890205F34CE9401CF06420 +:1069D000019824F077FF2E006036F0794007C00F51 +:1069E000B842DBD0A07C8007D8D50398C1798079E4 +:1069F00029F061FD040029F04EFDF179FB221140E0 +:106A0000FA07520F114309229201012FF17117D198 +:106A1000037A89089B0689009B0F1943F171007A5C +:106A2000800702D00120A918C87203981DF05DFFED +:106A30000298407E012817D103981DF087FF13E0CC +:106A400088088000F0710020EDE7A068C00405D53B +:106A5000200020F00AF8200014F01BF9E279A17957 +:106A6000200009F014FD0400002CEED196E7FFB5DC +:106A70009DB000252E001D982F0000792C000228C3 +:106A800001D003280CD11D9829F0DEFC4B21C90050 +:106A9000050046182420875D1D9829F0FCFC0400A1 +:106AA0001F991E980C3909040C30090C01AA21F019 +:106AB0007FF9269A0999D2780F989306DB0F00295F +:106AC00002D1022F08D102E08978C90704D1002839 +:106AD00002D00079C00614D5202002432698C27047 +:106AE0009006C00F984202D01D98FDF7F7F9209844 +:106AF000404B81022898584305F3B4E82799401C7D +:106B0000087020363079022860D087208000405DF0 +:106B100001285BD10520C0012818807A800755D54F +:106B20000020009060358646A879217A0500890604 +:106B30000600890F012903D1C21EC41D011D02E0F8 +:106B4000C21FC41C011F0027002A8C4600DB17004F +:106B5000069A002A13D0069A9378BB420FDBA34211 +:106B60000DDC0E9A002A09D00E9A9278920701D570 +:106B70001E0007E00E9AD278520603D51D000E9A29 +:106B8000002A11D00F9AD3789A070DD00322D2434E +:106B90009343012B00D104220F9B9B789A18BA4291 +:106BA00002DBA24200DC1100B04201D1A84201D0B8 +:106BB000012086468C4501D0012000900099704646 +:106BC000084303D01D980021FFF7BCFE21B0F0BDA3 +:106BD0003EB5018945690C18280029F035FC0100F3 +:106BE0004B20C0000818496C002915D0012203E091 +:106BF0003B02000040420F0001002E3125306B4661 +:106C000007C3AA20435B6078217802020A4321006F +:106C100020312800FFF72BFF3EBD70B5060029F09C +:106C200013FC4B21C900441824F048FEE16C050018 +:106C3000002906D0491EE16403D101213000FFF78D +:106C400081FE280024F03EFE70BD10B529F0FCFB4B +:106C50004B21C90040182030C17B49084900C1734D +:106C600010BD70B505001C200C0008813034502187 +:106C7000200004F344EBC0356868002808D00069A0 +:106C800020616868406960616868C078000260805F +:106C900070BDF7B582B001250F000889441802982D +:106CA000007902280ED003280AD1029840790128E1 +:106CB00001D0022804D1029821002CF0CEEA002550 +:106CC00028006BE6029829F0BFFB4B21C90046184B +:106CD00001902F20805D0028F2D102982100FDF75D +:106CE000A2FB0128ECD13300210002982F330022AF +:106CF0000C31FDF704FC0500E2D10198A178FF30CA +:106D0000FF30801C0A090121806991400842D7D0D8 +:106D1000029822003900E523E9F799FFD0E710B582 +:106D2000002429F0B8FB007A8009012800D1012451 +:106D3000200010BDF8B5070029F086FB04000026EE +:106D400010F0AFFA0D2801D90D2001E010F0A9FADA +:106D500005062D163800FFF7E2FF002813D00021AA +:106D60002D1F8420025D0CE0C800401A0019FF307E +:106D70006130407B052803D3A84201DC012602E0F4 +:106D8000491C8A42F0D83000F8BDF8B5002506004D +:106D900029F05AFB0400300029F07DFB0B4D1EF159 +:106DA000010000009866010000040000E07615B3C1 +:106DB00007003000FFF7BDFF002803D0FF206D3033 +:106DC000005D00E0387A4A21095D8007800F89075D +:106DD0000DD500280BD1FF34FF34A41C207F0028E0 +:106DE00004D13000FFF7B0FF002800D001252800B3 +:106DF000F8BDF1B582B0029829F030FB0500029889 +:106E000029F053FB04002800483001900298F6F75F +:106E100049F98420475DFA4E0021012F10D9012045 +:106E20000CE00A220A2342434B4392199B19128910 +:106E30001B899A4201D20106090E401C8742F0D8F4 +:106E40000A2048430F22811949786172029B9201FE +:106E50009F183A691173217A325C89089207890078 +:106E6000920F11432172305CF3220007800F114012 +:106E700080000143CF200140280060302172C17999 +:106E8000060089088900C1710198807880072DD596 +:106E900010F011FA0D2801D90D2001E010F00BFAC5 +:106EA0000106207A0916800706D13869007B05287B +:106EB00002D3091F884204DDF07980088000401C5D +:106EC000F071112040012818407E0028207A02D05D +:106ED0000C21084302E0F321084008302072386991 +:106EE0002100027B0298083116F01EFB3969207AD6 +:106EF000487339698006800E4873FEBDF0B5040002 +:106F000085B029F0ABFA0290200029F0CEFA0F21CB +:106F100089016118049109690C228A560025111D06 +:106F20000191111F0091B6492E002C008031897B00 +:106F3000AE46AC4603912FE00A216143B04BD71E09 +:106F4000CB185978B94210DBD71DB9420DDC9142FC +:106F500002D0DF79BF0705D1019FB94203D0DF79A5 +:106F60007F0700D501251F89BE19D71FB94211DB44 +:106F7000D71CB9420EDC914202D0DF79BF0705D1A0 +:106F8000009FB94204D0D979490701D501218E4625 +:106F900019898C440399641CA142CDDC017A8A06CC +:106FA000920F11D1CF22754506D1114001226645BD +:106FB00000D30322120105E0002D02D1114010314F +:106FC00001E0302211430172029A017AFF32FF324E +:106FD000921C137F89061F22890F5201002B12D0A9 +:106FE000012902D1002D0ED004E003290BD17146F6 +:106FF000002908D00299FB2389180A7C9208920084 +:10700000921C1A4006E00299042389180A7C92080F +:1070100092001A430A740499007A09694873049922 +:1070200080060969800E4873C2E410B50400FFF7BA +:1070300080FE002802D02000FFF7DBFE2000FFF7D3 +:10704000AEFE002802D02000FFF758FF10BDF3B5B8 +:1070500083B00E00039829F001FAFF204330805DD1 +:1070600064235843FF2104F308EE317B0A2359437C +:10707000634C40188034217B614F5943C919088102 +:107080000398FFF78CFE002869D0002564E01320E8 +:10709000684380190E3004F3E2E9010015310291D2 +:1070A00041780278080210430C380206120E029949 +:1070B0000320019202F36BF8002807D0217B0A23FA +:1070C00059438078C9194978884244D1019A029974 +:1070D0002D2002F35CF8002802D0C178490609D5BA +:1070E000217B0A2359430123C919CA791A4300286D +:1070F000CA710AD08078800707D5207B0A235843BD +:107100000222C019C1791143C171019A02993D202F +:1071100002F33DF800281ED0C1788A071BD08907EA +:10712000890F0129817801D1091D00E0091FA27B87 +:1071300000200EE00A234343DB195B788B4207D122 +:107140000A2358430422C019C1791143C17102E0D6 +:10715000401C8242EED86D1C307BA84297D8207B21 +:10716000401C0006000E2073A17B8842039802D2C7 +:1071700000F099FB1CE4FFF758FF0398FFF7C0F8F5 +:10718000012801D0012100E00021627B0398FEF775 +:10719000CCFC0DE470B51A4E340080342CE0A57B95 +:1071A000002206E00A2353439B195B78C30B51ADC1 +:1071B00001000000946A0100000400001419600737 +:1071C000834202D0521C9542F6D8954207D90A2331 +:1071D0005A43921993785B085B00937015E00A227A +:1071E0006A430A2392195070A57B6E226B430025D7 +:1071F0009B195A719D71A57B0A236B439B19DA7009 +:1072000000221A71A27B521CA273401C8842D0D962 +:1072100070BD0000AC3B0004F3B585B0059829F0C3 +:1072200027F90700059829F04AF94B21C900049075 +:107230007818039000200290FF48902104F39CE806 +:107240000598FFF780FDFC4E8036002825D00024ED +:107250003D00803510E0E000001BC119B07B0A231F +:107260005843F54AFF3180186D31072203F3BEEF12 +:10727000B07B401C641CB0732879A042EBD82879FD +:10728000012803D10598FFF7BEFD06E005990F22FE +:10729000002092018918096908730598FFF789FD94 +:1072A000002849D0012510F010F80406241605988E +:1072B0000194FFF748FD00281BD000208421C95D00 +:1072C0008C4613E0C100091ACA19FF216E315256CB +:1072D00011000B39A14200DB21000C0624160B32F1 +:1072E000AA4200DC2A0015062D16401C8445E9D868 +:1072F00014E0049B04991B7A092008560B219B0675 +:107300000A009B0F012B00D00722032B00D007217E +:1073100082181506401A2D160406241601998D426E +:1073200000DC29000120012C00DB200009060006FA +:10733000090E000EFFF738FFB07B012802D8029833 +:1073400007B0F0BD0698707303980221E030017316 +:10735000059800F0B2FA01200290F1E7F8B5002498 +:1073600006008068C00427D5300029F0A8F807007F +:107370001037300029F07CF805006037388B002882 +:1073800000D1012424F0AEFA11235B01EA18009029 +:1073900091880120012900D30800012C388308D1ED +:1073A000D088C00705D0F018418A01223000FEF7CE +:1073B00010FB009824F09AFAF8BDF8B506000F000B +:1073C00029F056F80500300029F079F8040010344F +:1073D000300028F005F900280BD06034208B0028FD +:1073E00007D0112040012818C088384201D0012060 +:1073F000F8BD0020F8BDF8B5050029F060F80400DC +:10740000280029F035F80700A8681034C00426D5F4 +:1074100024F068FA0600E06F00281DD06034208B4D +:10742000002819D0401E0004000C208314D1112024 +:1074300040013818C088C0070ED0280000F0B4FC06 +:10744000112149016918498A002801D0002200E071 +:1074500001222800FEF7BDFA300024F047FAF8BDFB +:1074600010B529F02CF80400103424F03BFA002168 +:10747000E1676034218324F039FA10BD89780A0766 +:10748000920F022A04D10B09042B07D00C2B05D034 +:10749000012A02D109090A2900D05FE7704770B5B7 +:1074A000040029F00CF8200028F0E2FF1121490126 +:1074B00040188088002814D024F014FA0500200019 +:1074C00028F08EF8002802D02000FFF794FF280053 +:1074D00024F00CFAE279A179200008F0ECFF040016 +:1074E000EAD195E670B5040028F0C2FF050020003F +:1074F00009F0F4F81B21490168180078002805D02C +:107500000D2080012818C06AF2F2F5FE200028F054 +:10751000D6FF06002000F0F7DFFC6036307A032843 +:1075200002D1200013F03BFBE279A179200008F0A2 +:10753000C2FF0400EAD1192040012818007B00286E +:1075400005D00520C0012818806AF2F2D4FE08F0A8 +:10755000BAFD040008F0C4FD84421BD137480088FE +:10756000002801D005F00AFEF7F2F1FF0AF000FD55 +:10757000FAF768FB0020F9F768FC012103200AF004 +:1075800022FA2F491F200862002103200AF048FA3E +:10759000F7F2D7FF3CE6F8B5040028F069FF0500D4 +:1075A00008F091FD060008F09BFD864221D1F7F21C +:1075B000CEFF002102200AF033FA0AF05FD477569A +:1075C00001000000906E01000004000047C3B36B8F +:1075D000D9FCFAF728FB0120F9F741FCF8F216FA7A +:1075E000002102200AF0F9F90AF0D1FC0121022061 +:1075F0000AF020FAF7F2AFFF15480088002802D001 +:10760000200005F0CFFD200009F092F82000FEF7E1 +:10761000AEFD20000AF046FF16F075F81B20400171 +:1076200028180078002809D0DB20002280002B18C1 +:107630000092094A09482100EEF7D0FD200028F009 +:1076400048FF0600BE20005B032809E0AC3B0004B5 +:107650005C3C0004C0A000800087930349830000C5 +:1076600009D15520C00000222B1800929E4A9F4845 +:107670002100EEF7B3FD2000F0F77EFC6036307A93 +:10768000032802D1200013F08EFAE279A1792000BC +:1076900008F01BFF0400D1D1F8BDFEB500252F0076 +:1076A0000195C17982792E002C00080210430290C6 +:1076B0006100C84082070021920F0800002A07D00D +:1076C000012A02D0022A05D11002FF22521C1043C7 +:1076D000FF2210430A2280056243800D03F35AEB18 +:1076E000641C240605430E43240E012C01D202988B +:1076F000DEE700240A2262433100280003F34AEB4C +:10770000019A641C114324060743240E032C0191A3 +:10771000F0D30199380003B0F0BD70B506000D003C +:1077200000242D290AD03000FEF7E2FC002805D005 +:1077300029003000FFF77AFD04000BD13000FEF77E +:10774000F3FD012801D0012100E000212A003000D2 +:10775000FEF7FFF9200065E5FFB5FF215D3106006A +:10776000170081B0FCF7D4F9040025D0208932003D +:107770000519F120AC32800031180092029A2000E5 +:107780000D23FCF719FA03202870002068701520DB +:107790002035287002206870B807800F8F210840BC +:1077A00004994907490E0843A8702000FCF742FAE3 +:1077B000002801D101204BE4002049E4F7B584B052 +:1077C00004000600170028F084FE0390300028F023 +:1077D00059FE050046A003C80291112149010190FC +:1077E0006818407E00281FD012E0A068C10409D5A7 +:1077F000410607D5800405D42000F5F7D6FC807932 +:10780000002811D1E279A179200008F05EFE040081 +:10781000002C01D0002FE8D0059A3B00300001A9D0 +:10782000FFF79AFF002801D1002093E5059809226F +:107830009201002809D128006030C179FB2319404A +:1078400089088900C17100200FE028006030C179EB +:1078500004231943C171039B89081B7A89009B0685 +:107860009B0F1943C1710598401EA918C872A8182A +:10787000817C8F2211407A07520E1143059A8908A4 +:1078800092078900920F1143817430001DF04BF86C +:1078900030001DF079F830001DF0A6F8340012E039 +:1078A000A068C10409D5410601D4800405D5200093 +:1078B0001FF0F9F8200013F00AFAF279B1792000EC +:1078C00008F003FE0400002CEAD1012042E50A4939 +:1078D00010B5097B0A23084A5943803A8918074A98 +:1078E00019F001FC10BD000020A1070025250300B0 +:1078F000FFFFFFFFFFFF00002C3C0004970903007F +:10790000C168002907D17521095CC943090704D161 +:10791000006E002801D00120704700207047FF4A08 +:10792000FE4B11544A00521892085B1C89081A54E5 +:107930005A1C1154704770B50C0000263100062007 +:1079400008F0DBFB60782178F44D00020843AD1E9F +:1079500001281BD10221072009F0FDFC002801D0DD +:10796000012070BD012008F035F9E178884205D288 +:10797000012008F02FF96870E07000E06970A078CD +:10798000287069780020FFF7CAFF03E06878E0708C +:107990002878A070300070BD0D220021920180185F +:1079A0008160C1600161416170470100DC4810B530 +:1079B000F2F206FB0100DA480C38F2F2C3FA10BD0D +:1079C0004169496815E0814212D108695304368E35 +:1079D000010000008C72010000040000F80696D837 +:1079E000002802D0CA68C26002E04A69C8685060D4 +:1079F000C868002802D00969016106E00869496980 +:107A0000886002E0C9680029E7D10020704710B5FE +:107A1000FF2495340470240A4470082484700024E0 +:107A2000C4708272C3720622001D03F3F4EB0C20B3 +:107A300010BD70B50C0015000121002B00D10E21E6 +:107A40000C235943552364310A04120C2100FAF720 +:107A5000D4FC002803D0206810302860012070BDBD +:107A6000010010B54A790020022A03D1080028F04D +:107A70003AFD103010BDF0B50400002087B00E00B4 +:107A8000002A05900490039002900BD0012A09D09F +:107A9000022A7ED12000019428F0FEFC37063F0E1A +:107AA0000090A0E000252000FFF7DAFFA24E306A28 +:107AB000002803D020000AF0A4FE05001520400194 +:107AC000684381190B2080010F18F879002807D12D +:107AD0002079032806D120002BF0EAEB002801D002 +:107AE000012500E000250F20800126183069C06ABA +:107AF000A8424ED00598002807D1012303AA04A963 +:107B000005A8FFF796FF0028F3D0059938790029DA +:107B1000EFD003062A06210003981B0E120EAC318B +:107B2000FFF775FF0499CA7A8B7A12021A4310186C +:107B30008872000AC87205992000FAF729FC00280B +:107B4000A7D13069C5628EE0A068C00445D5200089 +:107B5000FFF786FF05000F20800120180690007EA9 +:107B6000B0423AD0287E002E01D0012835D10598A8 +:107B7000002807D1002303AA04A905A8FFF759FF8D +:107B8000002872D06079022802D02079062805D119 +:107B900000E06AE0296EE868081807E0032804D1CD +:107BA000132080012018006900E0002006990306D8 +:107BB00062480F76211803981B0E3A00FFF727FF43 +:107BC00001000398401803900498C27A837A120245 +:107BD0001A4351188172090AC172E279A179200011 +:107BE00008F07DFC0400002CAED10598304310D184 +:107BF00001980F218901401800692030007C01287C +:107C000007D1002303AA04A905A8FFF712FF002843 +:107C10002BD00598002820D001990F2080010C1846 +:107C200020692030007CB04217D000980D218901D6 +:107C30004018C0684249030603981B0E3A00FFF73C +:107C4000E6FE0499CA7A8B7A12021A4310188872D7 +:107C5000000AC87220692030077405990198FAF764 +:107C600097FB002801D101200290029807B0F0BDD7 +:107C700070B50D00072028F01FFC0DE0200009F072 +:107C800020FB002804D0022229002000FFF7F3FE89 +:107C90000721200008F0E4F90400EFD170BD244969 +:107CA00070B5891E097801200224002915D0204DC5 +:107CB000ED1C2978002910D007F092FF0600200063 +:107CC00007F08EFF691E09783018884205D8002019 +:107CD0000100FFF7CDFF0020287070BD10B544698A +:107CE000002107F0B6FF2000FFF7D9FF10BD10B547 +:107CF00004001CD060690168491E0160A068FFF79C +:107D0000EDFFA068018909186031CA7F002A04D0FC +:107D1000406974210123FAF7F9FCA068002123F0DF +:107D2000E3FD2000FFF756FE2000FFF748FE10BDE0 +:107D3000367901C098C201C018420004290200002F +:107D400020CC310010B528F0A7FB4B21C900441806 +:107D5000C03401E0FFF7CBFFA06B0028FAD1E6E7C3 +:107D600010B5FFF77DFE00210166416681660621A0 +:107D7000703003F3ECEADAE710B50400FFF770FEA9 +:107D800000210176C160016141612000FFF7E8FF39 +:107D9000CDE770B5F948F2F2AEF8F8480C30F2F2DF +:107DA000AAF8F74E002425001820604381193550A9 +:107DB000F2484D60F2F2D0F8641C222CF4D301207A +:107DC00007F012FF01000020FFF7B3FD002070BD97 +:107DD00070B5060028F087FB0400307991D684C680 +:107DE000010000008876010000040000ABDC45B40F +:107DF0007D251034ED00032800D0E74D2000FFF76B +:107E000093FD002818D12220005DC00714D1012164 +:107E10003000FFF7F0FA00280ED1AA20815B28007D +:107E200003F352EF2168884206D23000F5F76BFF6A +:107E3000002801D1012070BD002070BD10B5FFF7F2 +:107E400019FE040001E0FFF75CFF606E0028FAD124 +:107E500077E7F3B581B00E00019828F04EFB0400DF +:107E6000019828F023FB0700103423F059FD05008A +:107E7000002E11D0617E0020002900D06076217E86 +:107E8000012909D120760D20800138188168491E0A +:107E9000816001E0FFF735FF20690028FAD10198E1 +:107EA000FFF7CCFF0198FFF79DFF002808D001984D +:107EB000112149014018418A01980022FDF7A7FDD0 +:107EC000280023F031FDFEBDF7B584B005000E009B +:107ED000486803902800FFF7CDFD03980024002890 +:107EE00076D003988068029001890F18380014300A +:107EF000019030683C6F401E3060029807F083FEAE +:107F0000012802D10298FFF7F3FE0198407800287B +:107F100003D1E078F7210840E0706879022802D0A8 +:107F2000297906291DD1A179C9070FD13168002906 +:107F30000FD10F2189016918097E002909D1022872 +:107F40000BD102212800FFF756FA00E0069800281E +:107F500003D0E0782021084302E0E078DF210840E8 +:107F6000E0702879032809D17C20C05D001F042817 +:107F700004D3019A390028002BF0A8E97C20C05DC9 +:107F80000C28A07812D10007800F029802D1F9F7CF +:107F90001EFA01E0F9F745FA0400687902282ED1AB +:107FA000306800282BD10022110025E00107890F3D +:107FB00003D10298F9F74DFA10E000090C2801D01E +:107FC000042806D10198C1690298F9F735FB05E04C +:107FD00021E002993A00280025F049FA0400687966 +:107FE00002280CD12800FFF7FDFE002807D0112041 +:107FF00040012818418A00222800FDF708FD002CC6 +:1080000003D10298002123F079FC0398FFF7ECFCE0 +:108010000398FFF7DEFC200032E670B505000C0087 +:1080200004E0002221002800FFF74EFF206800280E +:10803000F7D170BD42695368002B03D1506041698C +:1080400088607047002907D1186141694A68C26099 +:108050000022026148607047CA68002A01D010619E +:1080600001E04A699060CA68C2600161C8607047F7 +:10807000010049690020496800290BD003E008008D +:10808000C968002906D08A681389D218126FD2787D +:108090001207F4D4704702000020002A08D0012AF9 +:1080A00006D0022A01D0032A07D18A4205D303E071 +:1080B0008A4201D0012900D10120704770B50E001D +:1080C000406900254468002C10D003E02500E468D6 +:1080D000002C0BD0A0680189405C4007400F04F3DE +:1080E000DFFA3100FFF7D7FF0128EFD0280070BD7D +:1080F00003B50820C8406B461978084000D001201D +:108100000CBD70B5002423F00BFC05002048F1F2F3 +:1081100003FF002805D0040001001D480C30F1F2D7 +:1081200025FF280023F000FC200070BDF7B584B0C7 +:1081300005000F00FFF7E5FF040001D101209FE5D6 +:1081400023F0EEFB00260290E660A76026613889E6 +:10815000C719287903280AD16879032807D14D2047 +:1081600000012818606180680021019145E0386FA6 +:108170008079C00712D0280028F098F9D32189000F +:1081800040180021606180680126019135E00000FF +:108190008CC201C05CBF01C0881300002800FFF73B +:1081A00069FC0390112040012818408A019038781A +:1081B0004007400F04F374FA06000F2080012818CE +:1081C0000068012814D1039F31006037787D00904A +:1081D000FFF78EFF00280BD0310020006761FFF70A +:1081E0006DFF797D0126C943090706D06A3AB1C2FD +:1081F00001000000847A0100000400005FB3300039 +:10820000002604E0039801260C306061806806991E +:10821000002902D02000FFF735FF01002000FFF702 +:1082200013FF60690168491C012E016004D10199A6 +:1082300001222800FDF7F5FB029823F07FFB0020C8 +:1082400028E53EB50400FF4825186079022808D1CA +:108250002000FFF719FCC168006E401803061B0ED2 +:1082600006E01320800120180069F74D03061B0E5D +:108270000F2080012018027E29006846FFF7DBFBF3 +:108280000300552120006A46FAF752F93EBDF3B5C6 +:108290000120022681B0ED490978002915D0EB4C68 +:1082A0000125641D2178002913D107F0ADFC0700DA +:1082B000300007F0A9FCA11E09783818884205D3C0 +:1082C000002001212570FFF7E7FCFEBD2078002883 +:1082D000FBD002980028F8D001980F21890140189E +:1082E000017E0029F1D105760198FFF7AAFFFEBDB6 +:1082F000F3B5040083B007F090FC050060690290BC +:1083000020890027061901200190029827F016FC09 +:10831000012D15D00499002901D0002810D0019911 +:10832000200007F0AAFC01280AD1C9492069884227 +:1083300001D1032D04D0C5490869401C01270861FB +:10834000306F8079C007C1170298491CFFF79FFF63 +:10835000380005B0F0BDF8B50D000700088901230D +:108360004618487BC0072CD1BA4800220188B8487B +:1083700027F0ABFB040026D1B64800220188B448A0 +:10838000032327F0A2FB04001DD1B0484169491C1A +:1083900041617879022814D1306F8179C90710D1F1 +:1083A00080780107890F0CD100090C2809D1380009 +:1083B00028F0ADF8A037797A103001600221403002 +:1083C00001760020F8BD287B20736761A8881C27F0 +:1083D000A080E519842231002800278102F398EF5C +:1083E000C020AD66208120182867A861316F0A88F7 +:1083F000203202F324EF20002781F8BDF1B58CB0C4 +:10840000142104A802F3B6EF23F094FA029010F0BE +:108410007DFC002802D09048008801E08F48406928 +:1084200003908F48F3F71AFD0025281F04283BD33B +:108430008C4AA8000B90115809688B4B185800689B +:10844000CC05C005C00DE40D0027099028020A9054 +:1084500027E00A982106090E084384490968084361 +:108460000068804A0B99241D5158E405E40D0C6006 +:10847000416D0E006031497F1C3E16290DD0002F42 +:108480000BD071690C9A914207D130002AF0A6FCFA +:10849000310004A803F33DFD03E00127290011F09A +:1084A0001FFA09988442D4D16D1C2D062D0E092D7A +:1084B000BBD36B4803998843F3F7ACFC6C4D634C1A +:1084C00012E00C99012301AA27F0DCF800280BD157 +:1084D0000198002805D12800E8F7B2F9EDF752FD20 +:1084E00002E0E068401CE06004A803F398FC002868 +:1084F000E7D1029823F022FA0DB0F0BD70B5002844 +:1085000011D00400A568002D06D0280007F085FBD7 +:108510000121280007F0B1FBE468002CF2D1686962 +:108520000121FFF7B4FE70BD3EB513000A0604003A +:108530004549120E6846FFF77EFA030055212000D8 +:108540006A46F9F7F5FF3EBDF3B5002483B00E008F +:1085500003982700019400F083FA0090039827F015 +:10856000AFFFD32189004518002E36D0039800F0C4 +:1085700079FA040027F0F5F9002813D0022027F03B +:10858000EFFF039988420DD1208802280AD1009874 +:10859000C030007E002805D1F4F745FA002801D04C +:1085A000012000E0002000280ED06068C00709D03C +:1085B0000398007907F08BFD002800D00127606840 +:1085C000C00701D1012001900398C0300078F8F76E +:1085D000A2FE04000C2002902EE0002004F37BF8A1 +:1085E000F9E7686880680189401860300299002EB8 +:1085F000017713D02968012901D0012C4D8BFB6430 +:1086000001000000807E0100000400000C69E36CA2 +:1086100004D10199002901D0142141772868002252 +:10862000012801D8002F08D0012C06D9012204E02E +:1086300028680122012800D8002203982900FFF7AA +:1086400057FC012802D1002E00D0641E28680028A3 +:108650001CD0002ECFD017E02902000020CC310022 +:10866000347901C074190004B206000446380400CD +:1086700040A20080FF0300001818000450180004F6 +:1086800000A0008081000100002CB4D1002F0AD08E +:10869000002C08D0009814228030C06B010403988D +:1086A000090C00F093FD5EE6FEB504000E0023F019 +:1086B0004BF901902079032805D1002120002AF0F0 +:1086C0001EEE00286BD0607902285DD120000AF0F0 +:1086D000B6F80090200027F0FDFE0D218901451815 +:1086E000A868002810D100212000FFF737FFDF4FD6 +:1086F000B868012808D1E86800210206120E20009F +:10870000FFF71CFF0020B8602000F5F795FB0F274E +:10871000BF01002E02D0E019006984682000FFF735 +:10872000BDF90500A068C00424D5287E002821D109 +:10873000290060312000FFF784FC29000C31200063 +:10874000FFF77FFCC9480078002813D0E019017EAC +:1087500000290FD0009915235B015943C44A891899 +:108760000B2292018918C979002903D101762000D2 +:10877000FFF771FD002E12D0E279A179200007F0F9 +:10878000CCFE0400CAD10AE02179032907D10328CD +:1087900005D14D20000121182000FFF752FC01985F +:1087A00023F0D6F8FEBDF3B583B00E00039827F092 +:1087B000B8FE0400039827F08DFE07001034002552 +:1087C00023F0C2F802900D208001002E26760FD1F2 +:1087D00038188168002901D0491E81602220005D7F +:1087E000C00700D0012503980021FFF75DFF42E09C +:1087F000012E40D10021009101210191216B00291E +:1088000000D00125617E0126002900D16676381846 +:108810008168491C81600398007903280DD1039871 +:108820002AF070ED039827F093F9002805D120690C +:10883000FFF76EFE606EFFF76BFE8C480078002835 +:1088400012D0002200990198130007F0F5F90128D1 +:108850000AD103980F2189014018017E002903D114 +:1088600006760398FFF7F7FC81484069022802D298 +:108870000398FFF7CDFD029823F06AF8012D05D18A +:108880002034A17803980022EFF7C1FD6BE5F3B522 +:1088900083B00120002501900398009527F041FE48 +:1088A0000398FFF7FBF80700603723F04DF80290BC +:1088B00003980079032805D1039800212AF01EEDC2 +:1088C00000286ED0F87C4006810F11D0800F410047 +:1088D000B87C081A3968884200D308000406240EC0 +:1088E00063D078688068018940186030067F1BE09B +:1088F0003868F3E77868002813D080686D1C018918 +:108900002D064018322160304177007F2D0EB04295 +:1089100001D0002101910600039800223900FFF7E1 +:10892000E7FA641E2406240E012CE3D878688068D8 +:10893000018940180199012922D1010060310A7F83 +:10894000B2421DD1026F6D1C92782D062D0E1207BA +:10895000920F06D10121009100784007400F04904A +:1089600009E031224A7702780100143110231A43BA +:10897000027000880884039800223900FFF7B8FAD3 +:108980007D74F87C4006800F02D0B87C4019B87422 +:108990000098012805D13968049A039833000CF037 +:1089A000CFFA029822F0D4FFDDE404980006000E0E +:1089B00003F38AFE03F399FE0600ECE7002810B5E6 +:1089C00007D027F0AEFD002803D01030007E01282C +:1089D00000D0002010BDFEB5050027F0A2FD040068 +:1089E00022F0B2FF0600287903280AD100212800CE +:1089F0002AF084EC002804D1300022F0A9FF0120E5 +:108A0000FEBDE06900281BD0194840697E689924A2 +:108A1000010000007C820100000400005A40802C0C +:108A2000022810D2287902280DD120008030017D43 +:108A300000291FD101210175206ACB21806802899C +:108A4000801860304177210000221C312800FFF798 +:108A500059FA0FE000206B460290597A0222114326 +:108A6000597201220092020001900299280000230D +:108A7000F3F7B7FE300022F075FF0020FEBD0000C6 +:108A8000347901C018420004FF4870470079022879 +:108A900003D0032804D1FD487047FC481C387047B8 +:108AA00000207047FEB50400002002900D00032056 +:108AB0002AF0D6EB060002D127F026FD0600286832 +:108AC000270025002837C035102852D025DC21008A +:108AD000E8310D2849D006DC801C71D001286FD107 +:108AE000210010313DE0260080360E2826D00F28C8 +:108AF00066D1012068622068B84261D1A87F002851 +:108B00005ED120007430EEF241FC706A002801D181 +:108B1000012030622100403123E0112829D01228A1 +:108B200009D0332801D034284AD10100D848002286 +:108B3000F1F26EF944E00120287741E00800EEF2FE +:108B400025FC2068B8423BD10120D2492862002090 +:108B50000860F06A012833D1B06A012830D12100C1 +:108B600034312000F1F273F92AE00800EEF20EFC35 +:108B700026E02068B84201D101200290687F0228D7 +:108B80001ED2686A00281BD1A87F002818D1F3F7ED +:108B90005EFF002814D0002E12D0B068C0040FD59C +:108BA00030000CF05AF915220021019202000091C8 +:108BB000029930000023F3F7B9FC687F401C687706 +:108BC0000020FEBD70B5040008680E002E2843D0BA +:108BD0004CDC292840D040DC2500C035012864D079 +:108BE00036DC801C7BD001287BD1F3F7BCF9012057 +:108BF00004F064FA012004F064FAA6480026066036 +:108C00003000F3F7DBFE287F002803D0122003F0AA +:108C1000DBFE2E77002004F082F9206F2AF05CEB57 +:108C200000285CD09C484069022858D2206F07F089 +:108C3000A0FC0500206F00212AF072EBA968FF203C +:108C4000401C0143A960206F0121FFF737FD46E07A +:108C500012281AD0262844D13FE02A283DD02B28BC +:108C60003BD02C2839D02D283BD136E00300210001 +:108C700022002F3B1031803202F310ED0B2F2F2FEB +:108C80002F3333241D29292933000120A8770320FD +:108C90002AF0E6EA002803D127F036FC00281ED08F +:108CA000012149022AF0F0EA19E0206F2AF03CEB9A +:108CB00021001C3102E09163210064312000F1F2B7 +:108CC000C6F80CE0916321005831F7E709E0010094 +:108CD0006F480022F1F29CF801E0EBF76CFA0020FB +:108CE00070BD300070BD10B5086FFFF7CFFE0020DB +:108CF000C0310861132003F067FE10BDF1B582B0EA +:108D0000614C0298FFF7C2FE8569029807F031FCBA +:108D1000060002982AF0E0EA002805D0029807F041 +:108D200028FC807F002823D122F018FE2100C031CA +:108D3000019008690F00002803D0F1F218FB002011 +:108D4000386102982AF0C8EA002805D0B07F800771 +:108D500002D5052080022D180022230000924F48E2 +:108D6000D0332A002100EDF76BFA019822F0FAFDCA +:108D7000FEBDF0B50800C03087B00690086F0E0049 +:108D800080360C000590FFF781FE0500F0F20EFF23 +:108D90000490326C736C0F00121A8B4106D2326C45 +:108DA0000498736C3900801A994106E0306C716C3C +:108DB000049AC043C9438018794102902869029AF5 +:108DC0000E0000273300121ABB4112D22869029A02 +:108DD0003900801A0022B14100922300020030487D +:108DE000D4332100EDF72CFA06990120087607B05C +:108DF000F0BD0698476107760598007903280DD1E4 +:108E0000059807F0B6FB817F8907F0D580300069AF +:108E10000028ECD0132003F0D7FDE8E722E7BC0CD4 +:108E2000010000007886010000040000099A534008 +:108E300028880128E5D10598FFF76AFFE1E7FEB52C +:108E4000164EFFF72DFE370004008037386B0128DF +:108E500035D020883500C035012806D12869002882 +:108E600003D0F1F28EFA0021296122F081FD0190F8 +:108E7000F0F2A6FE796438646869002808D10022FF +:108E8000330000920B482269D4333100EDF7E2F948 +:108E900001202876019822F06FFD0DE0B0D2000489 +:108EA000FCD3000418D40004CC05000418420004CC +:108EB00043850100CF850100082003F08FFDFEBD32 +:108EC00070B504007430EEF26BFA2000E830EEF278 +:108ED00067FAC0342069F1F254FA0025256160690F +:108EE000F1F24FFA656170BDF3B589B00600006F0D +:108EF0000490FFF7D5FD039003202AF0BCE907009A +:108F000002D127F00BFB07000A98310000684031BE +:108F10000891183907910C3932003500E8323400D5 +:108F20000691831C58318035C034059202F3C0EBA2 +:108F30003C951FF2F260C4CF9699ABF1FEEFEEF2D2 +:108F4000F2F2F2F2F2D5F2F2F2F2F2F2F2F2F2ED23 +:108F5000F2F2F2F2F2F2F2F2F2ECF2F2ECECECEC0F +:108F6000ECECECECECECF2F2F3E5F8F8F8F20020C3 +:108F700004F0B1F8002004F0ABF80120FF4900270D +:108F80000860A777207F002803D0122003F026FD79 +:108F9000277701202862FA49FF20F13048630498BE +:108FA0002AF0A4E900281FD0049807F0ECFA040086 +:108FB000FF302130008BFF256D1C022805D10120D8 +:108FC000A07704982AF076E909E00F280CD1022056 +:108FD000A07704982AF0B6E904982AF0B8E9A068C6 +:108FE0002843A060039847600498FFF728FFE0E05B +:108FF000F7F7AAFAF7F7FAFD686A002801D101200D +:109000002862300000F0CBFE3000FFF759FF0498D3 +:109010002AF094E9002F1BD0B868C00418D5380096 +:109020000BF025FF152200210192020038000B00F1 +:109030000091F3F785FA002060620598EEF2B0F92E +:10904000059800226421EEF25DF90598EEF24AF9E6 +:10905000310010313000F0F204FFC3E001206862FB +:10906000A7E00398807800280AD003980088012898 +:10907000F3D1207E0028F0D10498FFF749FEB1E03B +:1090800000206076AEE00120002F60760DD0F12048 +:10909000049B800039180622181822F094F8002842 +:1090A00003D1B6480168491C016004982AF01EE902 +:1090B000002801D00799CDE703980088012878D1CE +:1090C000207E002875D10498FFF722FE71E0012070 +:1090D0002862300000F063FE6BE00120A0770320DF +:1090E0002AF0C8E8002803D127F018FA002879D020 +:1090F000012149022AF0D2E874E006983100643177 +:10910000A863A7E70CE006E06FE054E032E01FE060 +:109110000CE01FE06CE0069831005831A86399E735 +:10912000010098480022F0F27DFE5BE00120E86239 +:109130000800EEF235F9A86A012853D13168079882 +:1091400081424FD1206A01284CD13100343181E76E +:1091500000202863E86A002808D10A9800680828D7 +:1091600002D10800EEF21CF901202862012003F070 +:10917000E0FE1EE0002F1CD0B868C00419D504988A +:10918000FFF75DFE38000BF072FE15220021019200 +:10919000020038000B000091F3F7D2F90598EEF2C7 +:1091A000FFF8059800226421EEF2ACF80598EEF283 +:1091B00099F808994EE76069F1F2E3F800276761D2 +:1091C00027762069F1F2DDF82761E86A012807D1E6 +:1091D00031680898814203D107993000F0F241FECE +:1091E0000120286300200BB0F0BDEAF7EEFFF9E79D +:1091F0000A98F8E7F7B586B00698FFF751FC059096 +:10920000069827F07BF9FF210490069800242D3161 +:10921000FAF7BAFC05005DD02889842147191C2083 +:109220002C182881200002F3C4E80698349579D8D8 +:1092300001000000748A010000040000FDF526F41E +:10924000F8F70AFBA070E068A178400940010843E4 +:1092500010210843E06015200002039026002767D4 +:109260000899603671770698F122920080183829A3 +:1092700001D1030000E0494B00900190042202213B +:109280003800F4F23BFFF87802210843F8700798A1 +:109290003871000A78710898142828D10598008838 +:1092A00002280AD10C203077039A06982100F8F79B +:1092B00045F92800F8F7E7F810E00498406A01281B +:1092C00004D0069827F03AFA002802D0002003F3D1 +:1092D0002AFA307703992800F8F7E0F9040003D15F +:1092E0000021280022F03CFB200009B0F0BD0898C6 +:1092F000382801D10820ECE70720EAE7F0B51FB4D1 +:109300008CB00400002026000A90BC36032029F00F +:10931000BCEF002803D127F00BF900287ED081682C +:10932000FF34C904641C002978DAA0300B9040890E +:109330000F9980020290C517A2690E98E369801AFE +:10934000994108D3A2690E98E3690F99801A99414F +:109350000F00069008E00E9AA0690F9B801AE16941 +:10936000C0439941CF430690069A206A616A8018EB +:10937000794105910490029A06982B00390001F377 +:1093800064ED0B99497A0F0002F3D0ECA06A07E074 +:10939000CC05000400A6008018D40004D4300400DA +:1093A000441A002C00DC3C19029A059904982B0001 +:1093B00001F34AED1F000092029A2000E1172B00F2 +:1093C00002F370EA009A801AB9410C000890FF4835 +:1093D0000078002814D0870205208002874200D937 +:1093E0000700089A0021B81AA14107D2089A002163 +:1093F000D01B23008B411C00089001E0002408943E +:109400000B987D27427A02983F01290002F356E922 +:10941000089A05000021B81AA14100E022E01FD2FD +:10942000089AE81B00252300121AAB4118D2089AAB +:109430002300D01B040002003068AB41121AAB417C +:1094400010D234600E9A0F9BA018169A2900594129 +:1094500003C2DF49DF4A096830688918884201D8A9 +:1094600001200A900A9811B0F0BDF0B51FB482B087 +:109470000298D94E006F0190B069002784020599C7 +:1094800004983D003B00220001F3DEEC2900766BDE +:10949000A51A9941029CFA368034B54205D9E06B91 +:1094A0008019A84201D9A81BE063E06B049A059BD0 +:1094B00080180C9A3900594103C2019807F06DF8E1 +:1094C0000199029F0979C03703293AD1807F00288A +:1094D00037D0019829F048EF002832D1206B0128BD +:1094E0006ED0E06B8119A94268D8797E012965D1D7 +:1094F000B7490A68B749511888425FD3002023F062 +:1095000063FB00285AD123F05FFB002856D1B348F3 +:10951000002200684621F0F22CFB00284ED1F8F71B +:10952000DAFC00284AD00C9A0092059B049A029813 +:10953000FFF7E4FE002841D129F01AEF00283DD1C1 +:109540003EE0206B01283BD0E06B8119A94235D861 +:10955000797E012932D19E499E4A0968891888423C +:109560002CD30198007908F0E9FB002826D1387E39 +:10957000002823D13869002820D123F025FB0028BA +:109580001CD123F021FB002818D194480022006848 +:109590004621F0F2EEFA002810D1F8F79CFC0028E2 +:1095A0000CD00C9A0092059B049A0298FFF7A6FE35 +:1095B000002803D1F3F75FFA0028BDD100202AE488 +:1095C000012028E4F3B58FB00600006F099026F063 +:1095D0009FFF08900998FFF76DFA0790099806F029 +:1095E000DCFF0690032029F050EE070002D126F0A0 +:1095F0009FFF070010983100006834310D910C3145 +:109600000C9134310B91743135003400C035803405 +:1096100012280A917ED023DC801C7CD001287BD1CB +:10962000F6F2C3F804900020059102900390A06226 +:10963000A064E064286268626877A8770D48047CBB +:1096400001000000708E010000040000AE2FF598AC +:109650000120F3F7D1F909980079032818D1069869 +:10966000807F002814D0059B049A0899069829F059 +:109670008EEE0FE01E2877D01F28DAD10B98EDF27E +:10968000A3FE606A002801D1012020620C9989E0C4 +:109690000798C068E06326F096F9002875D002AA02 +:1096A0000092059B049A3000FFF7E9FE00286CD079 +:1096B000002F1FD0B868C0041CD54E480068002891 +:1096C00018D038000BF0E7FB1522002101920200B0 +:1096D0000091012138000023F2F746FF0A98EDF2CD +:1096E00073FE0A9800226421EDF220FE0A98EDF242 +:1096F0000DFE01E001202862606A012813D10020DC +:1097000060620121E062306F490329F0DCED0B98C3 +:10971000EDF25AFE7D210B9800220901EDF206FEC2 +:109720000B98EDF2F3FD02E047E03EE072E0206BC3 +:1097300000281AD107980088022816D00798406898 +:10974000C00712D02C49E06B88420ED809980079E6 +:1097500006F0EFFC002808D0E06B14220104306F03 +:10976000090CFFF75BFD02E020E00120A062E06A47 +:1097700001284DD1A06A01284AD1286A012847D181 +:109780000B98EDF221FE41E0FFE7099800790328EC +:1097900000D07BE70698807F0028FAD00998FFF771 +:1097A00062FB73E73000F0F270FB31E00120A06251 +:1097B000E06A01282CD1286A26E001270320AF7730 +:1097C00029F06CED002803D126F0BCFE002803D060 +:1097D0000121490229F076ED2F620A980EE000007F +:1097E000A5060004603700042F08000000A60080D2 +:1097F00000000004CC050004F07F0000EDF2E4FD61 +:10980000E06A012804D1A06A012801D10D99C9E7B5 +:10981000002032E6109830E6F3B587B00C000798C8 +:10982000066FFF480068FF305A300004000C0590B6 +:109830003000FFF749F9F5F2C2FF049000200290D2 +:10984000039020680D00801C7ED001287DD1079CEC +:1098500030798034032828D1300006F0A8FE01902A +:10986000807F002821D0EF4880698702300026F0F1 +:1098700059FE0100049A01982B0029F088EDE0635D +:109880000690049800233A00290001F3E8EA002139 +:10989000B81A9941E349496BFA31884205D9069AC9 +:1098A0005218824201D9401AE063307902282CD143 +:1098B000E16CA06C002779407840084325D0A26C69 +:1098C0000498E36C2900801A994108D3A26C04988B +:1098D000E36C801A290099410F00009007E0049A78 +:1098E000A06CE16C801AC043A941CF430090E06BAB +:1098F000009A00213B00121A8B4104D2E06B009ABF +:10990000801AB94100E00020E063F6F731FEF0F282 +:1099100083FD26F058F8002829D03079032826D175 +:10992000300029F00CED002821D002AA0092049A00 +:109930002B00300029F02EED00280DD001220092DE +:109940007D22E36BD20001E00FE01BE0059902A845 +:10995000F6F79CFF002808D1F0F287FD0020206375 +:10996000079907984031F0F290FA0020C7E4206B85 +:109970000028F1D102AA0092049A07982B00FFF761 +:109980007EFDD9E72000BAE4F8B504000F00066FA9 +:109990003000FFF799F80500032029F080EC00283B +:1099A00001D126F0CFFD3868801C32D0012805D0C7 +:1099B000152829D016282ED1012022E00020F3F707 +:1099C0001BF8200000F0FFF9F2F7EBFAC034207F1B +:1099D0000027002803D0122003F014F827779248BC +:1099E000002200686921F0F2CEF867626777288864 +:1099F000012805D1207E002802D13000FFF79CF914 +:109A00000520F2F7A7F904E0210028312000F0F248 +:109A10003CFA0020F8BD3800F8BD10B50A68046FA4 +:109A20002B2A19D014DC03008033022A1BD008DC57 +:109A3000921C26D0012A14D0032A26D11C30986308 +:109A40001BE0262A08D0292A06D02A2ACE894A9E37 +:109A5000010000006C9201000004000011EAD02B0C +:109A60001DD103E010002C38062818D81000EAF7A2 +:109A7000CAFB002010BD01200EE0010010319963E7 +:109A8000596A002901D10121196200F0A6F92000CC +:109A900029F072ECEDE7002003F03EFBE9E7080057 +:109AA00010BDF3B585B0070000200390032029F016 +:109AB00000EC050002D126F04FFD050006983A00A3 +:109AC0000068B4323E003C0003218036C0343728A1 +:109AD00004927DD008DC801C15D0012814D03528D4 +:109AE0005CD0362873D105E038285BD0392859D0AE +:109AF0003B28F7D1A07E012837D1E07E421C022806 +:109B0000E27623D9A176ABE03800FFF7F7F9002021 +:109B10004B4FA076E076386A002805D1F2F74DFA6F +:109B200070633520EAF76FFB002DECD0A868C00405 +:109B3000E9D524F021FE0028E5D1386A0028E2D1D9 +:109B40000120F2F763FF0120A07604E0002D24D06D +:109B5000A868C00421D528000BF0A7F91322002122 +:109B6000019202000091012113E002287ED1E07EE3 +:109B7000421C0228E276C5D8002D77D0A868C00420 +:109B800074D528000BF091F91322002101920200F4 +:109B9000009128000023F2F7F1FC67E0A07E012885 +:109BA000B0D063E0012003F0E2F900252800A5769B +:109BB000F2F72CFF2248006A002805D10498F2F73A +:109BC00062FA3820EAF71FFB257741E000E044E025 +:109BD000B16B3800103081421FD1A07E03281CD108 +:109BE0000020F2F713FF17490020086016490860AB +:109BF000E0760220002DA0760FD0A868C0040CD516 +:109C000028000BF052F91322012101920091020069 +:109C1000002128000B00F2F7B1FC0948006A002877 +:109C200005D10498F2F72FFA3720EAF7ECFA012071 +:109C30000CE000006037000400A600800000000473 +:109C400018420004C8050004CC05000403F08FF995 +:109C5000B16B3800F0F223F908E00698039005E0B4 +:109C6000844807220068402122F0B3FF0398BAE439 +:109C7000F8B506000020804A0090086835003400DE +:109C8000126A00278035C034372833D019DC801C95 +:109C90000FD0012838D13000FFF730F90020F2F75B +:109CA000B5FE7548006A002802D13620EAF7ABFA03 +:109CB000E776704807220068402122F08AFF00986A +:109CC000F8BD38280FD039281ED1002A01D1EAF773 +:109CD0009AFA0020A776F2F799FEF6F753FCF6F70A +:109CE000A3FF27770BE0002A02D13820EAF78BFA8E +:109CF000A776F6E7002A02D13720EAF784FAA96BA3 +:109D00003000F0F2CCF8DAE70091D8E7F0B50400C3 +:109D10000E0097B021F04AFE05002000FFF7EEF894 +:109D2000210074312C220BA8169101F32EEB210097 +:109D3000E8312C220F00684601F326EBFF21313178 +:109D4000200001F354EB2C223800694601F31CEB90 +:109D500016982C220BA901F318EB200000F050F804 +:109D6000210010310F002000F0F289F820000121BD +:109D700080300162414A416200211160DA2287632A +:109D800011553F49C1632800266721F013FE17B023 +:109D9000F0BD0121018041603949C1608160394ACB +:109DA0007D210901824201D1016101E0364A02614F +:109DB000816141617047334800B51C38FFF7E9FF06 +:109DC0003048FFF7E6FF00BD02009278002012093C +:109DD000042A01D100220A70704710B50400012046 +:109DE000F6F77EFB20008030016A012907D10021AF +:109DF000016201214162206F090329F06EEA10BD62 +:109E000070B50400214A0021001DF0F23CF820004A +:109E10001F4A211D1030F0F236F820001C301D4A78 +:109E2000211D0500F0F22FF820004C301A4A211DA8 +:109E30000600F0F228F82000184A29002830F0F235 +:109E400022F82000164A29003430F0F21CF82000D5 +:109E5000144A29004030F0F216F820000CE40BCA36 +:109E60000100000068960100000400004230034732 +:109E7000124A31005830F0F210F82000104A310038 +:109E80006430F0F20AF870BD7C050004184200044A +:109E9000CC05000468420000FCD30004400D030020 +:109EA0000183010021840100318701003B92010000 +:109EB000F98D010039900100A9910100AF920100D4 +:109EC0007D940100F848808B4007800F012800D066 +:109ED0000020704738B50400F4480D00C06BF0F264 +:109EE00078FAF24900223C310092220028000B004F +:109EF000ECF7D8F938BD10B5EC4CE06BF0F269FA2C +:109F00000020E06310BDE949002010B5020008619F +:109F1000E74849210068EFF24AFE10BD7CB5050014 +:109F20000E000800F2F77CFDDF488030C06B00288F +:109F300001D0002400E0012428000AF0C0FF102214 +:109F4000019202003100280000230094F2F720FB68 +:109F50007CBD70B50400D74DE888002807D02000EC +:109F600002F01FFCE88821007C31A88026E0200058 +:109F7000FF3081304668F6F70FFBF6F75FFECB49FE +:109F80000120C86100208866F0210853F5F22BFCFF +:109F9000E21DF932D1659065012002F0F2FF02F076 +:109FA00001FE032017F0D4F901210022090330003B +:109FB00002F0EAFBE88821005831A8802000EFF287 +:109FC00078FF70BD202010B502F030FD10BD10B537 +:109FD000F2F76FFD00282FD0002022F013FE00289A +:109FE0002AD122F00FFE002826D1F7F792FF002891 +:109FF00022D0F4F700FD00281ED129F0E4E9002862 +:10A000001AD1F1F71FF8002816D0A748C030007801 +:10A01000022811D0A648002200684621EFF2C7FDB1 +:10A02000002809D108F01FFB002805D11FF0CDFA48 +:10A03000002801D1012010BD002010BD9D4870B541 +:10A040002038994C408A8034002805D0964897499A +:10A05000806B4969884225D1206A002822D1944D1D +:10A06000002228681B21EFF2A2FD00281AD12868DF +:10A0700000224621EFF29BFD002813D1F4F7BBFC30 +:10A0800000280FD129F09EE900280BD122F0BAFD5B +:10A09000002807D122F0B6FD002803D11FF095FA61 +:10A0A000002800D00120002807D1A16B002904D18D +:10A0B000F2F7FFFC002801D1012070BD002070BD27 +:10A0C000F8B500252C00794E774FB0897A49403792 +:10A0D000884219D2F96DB86D6140084314D0F5F289 +:10A0E00082FBBA6DFB6D801A99417D27FF0023002A +:10A0F0003A0000F3C8EEB68923003A0000F3C2EE3E +:10A10000801BA14100D301252800F8BD30B587B0E0 +:10A1100003A904A804F0BEFF05000122022168463D +:10A12000F0F2E5F9040009D0AC4207D2042002F0B5 +:10A1300028FF009801990591049003E0052002F0A2 +:10A1400020FF2C006B4698892018F0F216FA0028A0 +:10A1500005D0042002F015FF012007B030BD5248A1 +:10A160006B468030806B0206120E009299897D2228 +:10A17000D200230004A8F6F79DFBEEE7FEB50D0024 +:10A180004A4E096831670100FF3181312B680C00AC +:10A190004F68203C342B49D012DC022B38D008DC2D +:10A1A0009B1C64D0012B13D0032B60D14248163086 +:10A1B00029E00120032B2ED0122B58D1207356E01A +:10A1C000353B01F39EEA070A0D101010543054007D +:10A1D00001003431EFF26DFE49E03748133012E0F0 +:10A1E000354814300FE03800FEF780FC01684A68FB +:10A1F00001004C318A4204D129680022EFF23AFE74 +:10A2000035E02D481530E6F761FBEBF701FF2EE056 +:10A2100029481730F7E76073022002F0B2FE706B36 +:10A22000401C706323E0B06A401CB062207A0228B0 +:10A2300001D001281BD1607A411C0228617210D222 +:10A2400038000AF03CFE1322002101920091217A8D +:10A25000012900D00021020038000023F2F798F90C +:10A2600005E0164807220068402122F0F88D0D8B8A +:10A2700001000000649A010000040000B65F76F35C +:10A28000BCFC0020FEBD70B50200FF32040081322C +:10A29000FF34536861340A6825000126203D012AF5 +:10A2A0001AD005DC921C1ED0012A21D101201BE00E +:10A2B000022A0FD03A2A1BD1A67317E0D8D4000483 +:10A2C000B005000400000004E0370004FFFF0000B8 +:10A2D0007C050004343001E05830A6736862180031 +:10A2E00029F05EE802E0002002F02AFF002070BDA5 +:10A2F000080070BD70B50400FF3081304568F6F786 +:10A3000055F9F6F7A5FC24F04BFA012811D10021EC +:10A310002800FFF70DFE2000FF3029300400EDF289 +:10A3200071F8002264212000EDF21EF82000EDF209 +:10A330000BF870BDF0B50500002085B00390280033 +:10A34000FF3081302E004068FF36413602900868A9 +:10A35000340020340A287ED00DDC801C43D0012834 +:10A3600033D00B2878D1716A28006430814240D103 +:10A37000583575623DE02F00343737283CD03828F7 +:10A3800001D0392875D12800FF302930EDF23AF894 +:10A39000F848006A002803D102983821F1F790FCB0 +:10A3A000706AB84205D0012102980022090302F028 +:10A3B000F5F97762002738002772F2F73BFBF6F7D2 +:10A3C000F5F8F6F745FC277349E000206072E9488C +:10A3D000006A002803D102983621F1F771FC029837 +:10A3E0003621EFF724FFE44807220068402122F0DD +:10A3F00004FC039805B0F0BDDE48006A002803D1D4 +:10A4000002983721F1F75CFC02983721EFF70FFF34 +:10A41000706AB84203D12800FFF76CFF1FE024F0F8 +:10A42000BFF9002811D1607201202072F2F702FBFF +:10A4300002980AF04EFD13220021019202000091C1 +:10A44000029801210023F2F7ADF8D920405D0028E1 +:10A4500005D0092001E009E00BE002F0F1FA01204B +:10A46000A072716A2800EFF22EFDC2E70120E072AF +:10A47000BFE70391BDE7F3B585B006000020039068 +:10A480003000FF3081304068029006983500016846 +:10A490003000FF307130FF350490B64841352C0054 +:10A4A000026A01272034332974D03FDC092972D095 +:10A4B00034DC891C51D001296ED1002121720600A3 +:10A4C0006172006A002806D1F1F78BFD28630298BB +:10A4D0003521F1F7F5FB02983521EFF7A8FE029838 +:10A4E0008068C00439D502984079032801D001283A +:10A4F00033D124F055F900282FD1306A00282CD10F +:10A500000120F2F797FA9D49C8698969084303D188 +:10A5100025F06CFA002820D0277227E00A2978D08D +:10A520002129C9D10298F1F7CBFB1CE034390B008B +:10A5300001F3F0E80809BABA854B4BBA05BA8F495E +:10A540004A6A521C4A62217A012919D1607A411C57 +:10A55000022861720AD90320207287480722006806 +:10A56000402122F04AFB039807B0F0BD02980AF0A0 +:10A57000B0FC13220021019202000091012114E09D +:10A580000229F0D1617A4A1C0229627205D903219D +:10A59000217276E00EE07DE086E002980AF099FCF8 +:10A5A0001322002101920200009102980023F1F78A +:10A5B000F9FFD8E7207A0128CDD00228D3D1002A8C +:10A5C00062D10498F1F773FD5EE0002A03D102988E +:10A5D0003721F1F775FB3000FF302930ECF212FF24 +:10A5E000012002F0D8FC02F0E7FA30003430686253 +:10A5F0000020F2F71FFA0698006838280AD0207A5F +:10A60000032807D102980CF0E5FB002802D1207343 +:10A6100032E047E000202072F5F7C8FFF6F718FB9C +:10A620005448006A002802D10498F1F740FD002048 +:10A630002073A772696A3000EFF245FC93E74F4B35 +:10A6400000219961002AD96103D102983721F1F7DD +:10A6500037FB02983721EFF7EAFD207A03280FD164 +:10A660000020F2F7E7F9F2F72EFA002803D107F0FD +:10A6700036FC012804DD002060720220055B84B0F6 +:10A6800001000000609E010000040000E585A59F18 +:10A6900020728CE73C48006A00289CD0012002F020 +:10A6A00084FC02F093FACEE7696A3000643081429C +:10A6B00089D158366E6260E7E7725EE706980390CC +:10A6C0005BE710B5324C083402F0E5F800280CD0F6 +:10A6D00030488088002808D02078000705D12C4811 +:10A6E0000079002801D1012010BD002010BD10B557 +:10A6F000274C29480834406826F052F8002802D038 +:10A700002078000703D122480079002805D021488D +:10A710008088002801D0012010BD002010BDF0B5B8 +:10A72000040008002100FF3125008131E03585B0AB +:10A73000039149682A00009101682E004832603672 +:10A740001029029230D03BDC02297ED026DC891C05 +:10A7500044D0E71DF93701294AD003293FD1009899 +:10A7600028F028EEFFF7C3FF002803D1FFF7A9FF69 +:10A7700000286BD0200002F056F8042016F0FCFDF3 +:10A7800021007C31B9E00000184200047C0500047F +:10A79000B0050004E037000498D500040D2974D0FA +:10A7A0000F291CD10120288200988068C0046CD534 +:10A7B000288A002869D100980021FFF7C3FB0DE02B +:10A7C0002200343235297ED00ADC1129ECD012293E +:10A7D0007AD0212903D10098F1F77CFA002013E602 +:10A7E000362972D03A29FAD1F948C1888180F5E733 +:10A7F0002000FF306130002601908672F1F7F9FBEE +:10A80000012002F0A1FC2E82BE650020FE65F2F759 +:10A810001BF9F0480660F048C0340680207E00280E +:10A8200002D02676F4F705F80198007B002804D0C2 +:10A83000122002F00FF901980673062016F09CFD15 +:10A8400000980121F0F723FC01E05AE01EE0E34804 +:10A850000178002906D028220670009831001300E4 +:10A86000EFF73CFBDE480088C00603D4EFF7FBFBA4 +:10A87000EFF7D6FCDB48002200686921EFF2ABF964 +:10A88000F4F7D1FAF5F744FAA8E744E0D6490120F5 +:10A89000C861022002F089FB032016F06DFD002044 +:10A8A0002882F4F2B4FFF965B865CF480078012832 +:10A8B00003D0F0F742FB002812D000980121FFF7E7 +:10A8C00041FB029802E02EE01FE028E0ECF2A4FD3C +:10A8D000029800226421ECF251FD0298ECF23EFD58 +:10A8E000C1480399007808700020F0630100B0634C +:10A8F0000098F0F7CCFB210058312000EFF2EDFA80 +:10A900006CE7009828F056ED68E7012100984902AD +:10A9100028F000ED62E70298ECF27EFDF1E72100FD +:10A9200028317262E9E721001C317262E5E7F8B56F +:10A930000400FF30813025004068FF35613500900C +:10A94000086826002F003436383F12283FD021DC1B +:10A95000801C69D0012824D004286AD1F5F730FE84 +:10A96000F6F780F923F026FF012803D09E48C0693E +:10A9700000284CD100980021FFF7E4FA3800ECF2EF +:10A980004BFD002264213800ECF2F8FC3800ECF2B8 +:10A99000E5FC3FE0262842D03A284AD10120A8739E +:10A9A00045E0002002F0D3FB002002F0CDFB287B25 +:10A9B000002804D0122002F04DF800202873002057 +:10A9C00002F0F3FAF4F72FFAF5F7A2F92FE0F5F712 +:10A9D000F7FDF6F747F90020F2F736F83800ECF209 +:10A9E0001BFD2000FC30ECF217FD7F49002088633E +:10A9F000FFF795FA009828F0DEEC01210098490253 +:10AA000028F088EC00981221EFF71BFC02E0009878 +:10AA100028F0D0EC31002000EFF25FFA07E0009858 +:10AA20000321F0F734FB02E0012002F090FB00204C +:10AA3000F8BD0800F8BDFEB5040008002100FF3194 +:10AA4000813102914968260058360091026835002C +:10AA5000E8350F2A37D01EDC0B2A34D016DC921CC6 +:10AA600031D0012A31D0052A2ED1604D2878FF2817 +:10AA700007D001005E4801AA0068EBF73FFAFF200B +:10AA80002870E820005D022872D16AE0E684B16691 +:10AA9000010000005CA2010000040000CD1420228F +:10AAA0000C2A1AD00E2A19D117E0352A75D004DCE9 +:10AAB000152A12D01A2A11D10FE0362A69D03B2A62 +:10AAC0000CD14E4AD16A491CD162E96B002905D0EC +:10AAD000A96B002902D0EFF7C3FF0020FEBD2700BD +:10AAE000FF37464900206137B872C8614861886104 +:10AAF000EFF7C3FA00983F21EFF7ADFB029800781B +:10AB0000002802D10120F1F7A9FFF5F763FD00212C +:10AB1000DA200153387B002804D0122001F0A4FF72 +:10AB200000203873787B002803D0022002F047FA17 +:10AB300021E0E86B00280AD0A86B002807D0009815 +:10AB40004121EFF788FB0098FFF796FAC5E7FFF77A +:10AB5000FBFA0028C1D1234808228038006E00216A +:10AB600010400A00494050400843B6D1012002F08D +:10AB700026FA02F035F831002000EFF2B8F9ACE720 +:10AB800000E00AE00428F6D11C49486F401C4867E1 +:10AB9000A3E7210028316E62EEE71849886F401C58 +:10ABA000886721001C316E62E6E710B5134C08344B +:10ABB00001F07BFE002829D02078000726D10F481D +:10ABC0000079002822D107488088002807D10E4844 +:10ABD000007801281AD1F1F74FFF002816D1012083 +:10ABE00010BD0000E037000414070004A0060004B4 +:10ABF000783704005C3C000400000004B005000449 +:10AC000024E900047805000498D500040020E7E753 +:10AC100070B505000E00F0F7B7F9FF4C002810D012 +:10AC20000120F0F704FAF0F777FC002808D128009B +:10AC3000F0F717FD012803D1F4F2F3FDE161A06103 +:10AC400070BD002231002800F1F750FCF2E71CB57E +:10AC50000400F1488038007900280BD120000AF068 +:10AC60004CF9122201210192020020000B000091F8 +:10AC7000F1F7ACFC1CBD70B5E74DE84C783D606861 +:10AC800025F098FD002802D02878000704D1E2487A +:10AC90008038007900280CD0E1488088002806D14F +:10ACA0002078012805D1F1F7E7FE002801D1012025 +:10ACB00070BD002070BD10B528F0A6EB00288FD025 +:10ACC00028F0A6EB8CE7F3B589B00800099D099C34 +:10ACD000FF358135696803910999036864310791EB +:10ACE00009990893FF31491C0691CB49099F803986 +:10ACF0004A690999099EFF31293105910999FF3463 +:10AD0000FF3161314134E037C0361A2B04917ED0D7 +:10AD100010DC9B1C00F312ED19FB39A1A1A1FAA1D3 +:10AD2000A1A1A1A1A1A1F9F8F7F6F5F4F4A1A1F36D +:10AD3000F2F1A100B84980390978242B68D008DCE9 +:10AD40001B3B00F3FCEC09EAE9E88A8A8AE7E6E5BE +:10AD50008A0009995831352B7DD00BDC262B7BD00E +:10AD6000282B7AD1E06B002803D003982821EFF735 +:10AD700072FABCE3362B71D03A2B6ED104990020C5 +:10AD800088730998FFF703F9B1E3049900208872EA +:10AD9000F1F739F90498407B002805D0022002F031 +:10ADA0000EF90499002048730498007B002805D010 +:10ADB000122001F059FE049900200873EFF746FEB7 +:10ADC000002804D0EFF763F8362001F04DFEEFF7CE +:10ADD00044FE002804D0EFF756F83B2001F044FE73 +:10ADE0000498807B002809D0049900208873099872 +:10ADF000FFF7CDF88A4880880028BAD10120F5F7FE +:10AE000097FB0020B08330627062788201E0ABE291 +:10AE100024E38349388220390A7E022A00D3087647 +:10AE20007D4A0020803A01219071D1707A490861F1 +:10AE300048618861C8617B49907088707A49086070 +:10AE40007A4908807A4908600120029079480022F6 +:10AE50000068462103E044E3CDE049E33DE3EEF240 +:10AE6000C4FE002802D1387A02280FD10020020047 +:10AE70003872704869210068EEF2B7FE002805D1EB +:10AE8000012103980022090301F09CFCFFF713FF46 +:10AE9000002801D0092002900398F7F791743699A1 +:10AEA0000100000058A60100000400009ECEF34EF1 +:10AEB00033FE002804D001210398C90628F03EEA99 +:10AEC00062480168012907D100210160604807221A +:10AED0000068022121F0AFFEF0F743F8002804D10A +:10AEE000524880380078012867D101272F700398D5 +:10AEF0000221F0F7E0F84D488038007801281BD097 +:10AF0000F0F7A8F80028287012D1E76314E020E2D7 +:10AF10004FE2EBE0CAE1C7E1ACE107E279E1EBE047 +:10AF2000D4E0C0E0C6E259E19DE246E14EE129E20B +:10AF3000012801D1F1F79CFDFFF7EAF800281AD0AB +:10AF4000F0F70FF8002816D02878012813D1F0F771 +:10AF500067F800280DD02762039809F0D8FF122265 +:10AF6000019201210200039800230091F1F738FBC0 +:10AF700001E0EFF76DFD2878002832D1E06B002862 +:10AF80002CD0A06B002829D0F0F74AF8002839D03F +:10AF9000F1F7B7FD002824D0276203980021FEF7BF +:10AFA000E5FF0598ECF24CFA059800226421ECF2DA +:10AFB000F9F90598ECF2E6F913E02878012806D0B3 +:10AFC000E06B002803D1EFF73DFF002803D0039882 +:10AFD0000221F0F770F800202870E0630020F1F7FC +:10AFE00047FD0025A5630298F0F7F0FE708B00285E +:10AFF00001D001F0F9FD307E002802D03576F3F75C +:10B000002CFC7EE2EFF724FDEBE703980321F0F739 +:10B0100052F8EFF71AFD0028F3D0EFF71DFDFFF708 +:10B0200077F800282ED0EFF79CFF13E030060004DD +:10B0300098D50004E0370004D42C00041407000461 +:10B04000A00600041C070004000000041807000408 +:10B050007C050004002815D02878012812D1EFF7CC +:10B06000DFFF00280ED001202062039809F04FFF77 +:10B070001222019201210200039800230091F1F7AE +:10B08000AFFA3EE228780028BBD1E06B0028B8D0A8 +:10B09000EFF7C6FF0028B4D0F1F733FD0028B0D099 +:10B0A0000120206227E101F097FDF0F7D6FB23F0A5 +:10B0B00095FB0128A5D1FA49886949690843A0D0C0 +:10B0C000F4F2B9FBF74AD16590651AE2387A0228A2 +:10B0D00097D10024C1023C720398220001F07CFB4E +:10B0E0000120F0F773FEF04804600AE201F07CFDF5 +:10B0F0000120F0F76BFE04E2EC4F387A0028C0D153 +:10B10000706B002801D000207063F06A002843D0E3 +:10B1100021F020FD002802D0F86800283CD02878D3 +:10B12000012823D123F05AFB012835D1FFF7ADFDCB +:10B1300000280FD0F6F790FC002802D0EFF79EFF12 +:10B140000CE0D748716A8069814207D10398FFF704 +:10B1500088FD03E003980021FFF764FDD04900203B +:10B16000C87003980B21EFF780F815E0E06B00281A +:10B1700003D0EFF755FF00280ED003980021FEF70B +:10B18000F5FE0598ECF25CF9059800226421ECF2DA +:10B1900009F90598ECF2F6F80520F0F717FEC0481B +:10B1A0004169316280697062F06A002802D001F062 +:10B1B0001BFDA6E101F03FFDA3E1002002000121FB +:10B1C00038720398090301F007FB9AE10598ECF245 +:10B1D00037F9B44801214030416318E0287801284C +:10B1E00007D1EFF737FF0028287002D10120E06374 +:10B1F00002E0E06B0028DCD0EFF71CFF0028D8D07D +:10B200000598ECF21DF90120A063EFF7F6FD079910 +:10B2100074E123F0E3FA012801D1A149C870A348E1 +:10B22000007A0028C5D10520F0F7D0FD9C4841697F +:10B2300031628069706201F002FD002805D1FEF7DD +:10B24000EEFE002871D0E06B0AE1EFF717FFEFF791 +:10B25000A5FE0028ADD0F6F7FFFB0028A9D0FFF728 +:10B26000AEFC0028A5D0FFF740FA0028A1D1EFF7E7 +:10B27000FEFE46E10598ECF2E3F8F4F2DCFA069AF9 +:10B28000D16590652878022893D101262E70039805 +:10B290000221EFF710FFEFF7DDFE0028287088D1BC +:10B2A000E663F1F7E5FB2CE1012139822F3FC43B36 +:10B2B0000100000054AA0100000400006AA186FAFF +:10B2C0002978022901D0012916D10068112805D05A +:10B2D000102803D0F1F71FFC002801D0012115E050 +:10B2E0000598ECF2B7F8059800226421ECF264F8B6 +:10B2F0000598ECF251F80EE100681128C3D00F2830 +:10B3000008D1F1F708FC0028EAD000210398FEF7E5 +:10B3100037FEE5E7102813D1788A401C0004000CA2 +:10B320007882398A00290BD1032809D2F1F7F3FB7F +:10B33000002805D003980021FEF722FEEBE091E003 +:10B3400023F056FA01289ED05D48C068002802D03C +:10B350000120F0F745FDB08B01210843B08305982B +:10B36000ECF278F8D7E05348816900290DD0002A23 +:10B370000BD08079012808D1FEF75BFE002804D0AD +:10B38000F6F758FF012800D04BE7EFF781FEC2E047 +:10B39000484901208871BEE0464D002A8DD0F6F75D +:10B3A00049FF002889D103980421EFF78EFE706AC7 +:10B3B000A96988429FD1708B01289CD8F06A002827 +:10B3C00099D101F013FC01F044FC002893D123F043 +:10B3D0000FFA012836D13748C078002800D1F0E6AE +:10B3E000EFF736FB0028FAD1FFF7F3FB002829D04E +:10B3F000304E00278036F169B069794078400843C3 +:10B4000020D0300010300FC8801A99411AD2F4F2BF +:10B410001CFA00902B4AB0690D00F1698018009A5F +:10B4200079412B00121A8B410AD2009AB069F16956 +:10B43000801A244AA9418018794101F0F6FB6AE09C +:10B44000F0F715FAFEF7F5FD002806D01C48017A42 +:10B45000002902D10069002807D007F036F900283A +:10B4600000D0FCE601F0CAFBF9E6E06B002852D1FF +:10B47000EFF79EFD002887D04DE008990398F0F77C +:10B4800047FC48E0012903D1287801280CD0FEE7C9 +:10B49000EFF771FD00283ED02878002802D1022065 +:10B4A00028701BE7012836D103980221EFF70DFE23 +:10B4B00031E00000B005000418D500041C070004AA +:10B4C000D42C0004983A0000FE4F2878012902D1BC +:10B4D000012820D0FEE701280FD1002420002C7085 +:10B4E000F1F7D0FAB869002804D0F4F2AEF9069A60 +:10B4F000D16590657462BC610DE000280BD1E063FA +:10B5000009E061620999283102E0616209991C3100 +:10B510000998EEF200FD00200BB0F0BDF3B58DB040 +:10B520000600002001903000FF3081300C90406810 +:10B5300002900E98E44F0368300058300B900C389E +:10B540000A90FF3015307A6B05000990643834009A +:10B55000203DC034122B08907DD019DCF01DF9304D +:10B560000790D848D949406906913100E0310591EA +:10B5700048319B1C049100F3F6E814FC438D8D8D3B +:10B58000FB8D8D8D8D8DFAF9404040F8F740F68D9A +:10B59000252B7ED00CDC1A2B2FD004DC152B2CD0C5 +:10B5A000162B77D129E0202B75D0212BF9D124E05F +:10B5B00030006430362B6FD00FDC272B6DD0352B4D +:10B5C000EFD1A18B4907890F012902D0002A00D1B0 +:10B5D0000B9831001C31686252E23A2B7ED03B2B33 +:10B5E000DFD1B849086B401C0863E86B002851D0D4 +:10B5F000A86B0028FBD0EFF747FA00200FB0F0BD92 +:10B600000999897A002959D00998C07A002829D047 +:10B6100009990020C87221F0A7FA00280CD0AC4884 +:10B62000002200684621EEF2F4FA002804D0A9486E +:10B63000EAF70AF8002202E20C980078002810D1FC +:10B6400002980021FEF79CFC0498EBF203FF002215 +:10B650000498642100E003E1EBF2AEFE0498EBF203 +:10B660009BFEF1E1A08B01210843A0830898EBF237 +:10B67000F1FE994D089800222900EBF29DFE0898F2 +:10B68000EBF28AFE099900208872A18B8907B4D455 +:10B6900004E074E15AE17CE1DEE176E17863A08BBD +:10B6A00002210843A08302980022090301F09EF8BA +:10B6B0000898EBF2CFFE0022290048E17C9FFCC0F5 +:10B6C0000100000050AE010000040000397B5596D7 +:10B6D00000212962059A1182059A5182A0637E4A4F +:10B6E000A183106901214903884204D1002000E0B0 +:10B6F000B8E11100086102983E21EEF7CAFD23F07F +:10B7000081F803900120F1F7C7F973488169C06996 +:10B71000014306D1606B002803D1EFF78BF90028B5 +:10B720001CD0039800282FD1606B002801D0002086 +:10B730006063A86B002801D0EFF719FB0298012184 +:10B74000FEF728FC0498EBF28FFE04980022642197 +:10B75000EBF23CFE0498EBF229FE19E0FEF7ECFC5C +:10B76000002811D0EFF711FC002803D00C980078C6 +:10B77000012809D001202862E0E783E02BE1C3E043 +:10B7800056E140E18AE16BE0A08B01210843A083F0 +:10B7900021F0F4F90028A86B07D1002839D10598C9 +:10B7A000007A022806D10B9974E1002831D10120DA +:10B7B00001902EE04B48002200684A21EEF233FA55 +:10B7C000002805D14448012100690903884220D19D +:10B7D000A08BC00706D10698408A00281DD1786B3F +:10B7E00000281AD100207863A08B02210843A0838F +:10B7F00002980022090301F003F80898EBF234FEE6 +:10B800003A4908980022EBF2E1FD0898EBF2CEFDF0 +:10B8100003E0A08B06210843A083A08B072800D05B +:10B82000F5E620F009F90400E86B002810D1019832 +:10B83000002804D0F1F779F9002809D104E0029832 +:10B84000FEF738FC002803D0200020F0F9F805E1CD +:10B850000A993000EEF269FB200020F0F1F8D6E6FC +:10B86000002078630898EBF2FFFD1B48C06EEEF2F3 +:10B87000ECFDCCE6A08B4007800F012870D1099920 +:10B880000873C4E6A08BC107CAD14007800F012806 +:10B890000DD0002A0BD1A86B002808D10298FEF722 +:10B8A00009FC002803D00498EBF2DEFDD6E00598F1 +:10B8B0000599408A401C0004000C48820599098AB9 +:10B8C000002915D1032813D2A86B002810D10298A3 +:10B8D0000121FEF75FFB9AE6B005000458D500048D +:10B8E000C03700040000000488130000B80B0000FB +:10B8F00001206063786B002806D1A86B002803D173 +:10B90000A08B4007800FCED10498EBF2ADFDF3F28F +:10B91000A6FF079AD1659065A08BC1079FD1012131 +:10B9200008430728A0830ED1A86B002877D002987F +:10B930002721EEF7AEFC6AE6200020F081F8002017 +:10B94000FF49C8618AE0786B002811D0FD48816BFF +:10B95000FB48406981422DD000220092FA4A11E052 +:10B96000BBE00898EBF232FD0898EBF21FFD4EE6C3 +:10B970000698408A002884D00699002200920989FE +:10B9800048430200EE4BF14800216C33EAF7C6FC55 +:10B990003DE620F051F80400EFF73AFA58E7E86B7B +:10B9A0000028C4D133E6002A04D10298FEF782FBB6 +:10B9B000002853D100207863A08B02210843A08384 +:10B9C00002980022090300F01BFF0898EBF24CFDDF +:10B9D000DF490022C5E7059801210182E86B0028B4 +:10B9E00003D1F1F7A2F8002803D002980121FEF755 +:10B9F000D1FA0498EBF238FD049800226421EBF2AE +:10BA0000E5FC0498B1E70898EBF22EFDA08B062127 +:10BA10000843A083616B002920D107288BD120F037 +:10BA20000BF804000298FEF745FB002884D10FE7CD +:10BA300021F0A4F8002800D108E6C64800220068DA +:10BA40004621EEF2F0F80028F6D0BF48E9F706FEEE +:10BA500005220021FF20E5F7F7FEF7E5052001F0BC +:10BA6000CCFAA0E60998012181739CE6E96B0029D4 +:10BA700005D0A96B002902D0EFF709F8C7E5A18B23 +:10BA80004907890F012902D0002A00D10B98310003 +:10BA9000283168623000EEF248FAB8E50599097A73 +:10BAA000022904D0072902D0E96B002915D0A18B07 +:10BAB0004907890F032910D1A14D0024EC61A96920 +:10BAC000084304D0F3F2CBFE079AD165F20E151BA2 +:10BAD000010000004CB201000004000086BE702589 +:10BAE00090656C61AC610498EBF2C8FC65E60E9859 +:10BAF00098E510B5FFF707F9040008D123F0B5FF6A +:10BB0000002804D0FEF722FB002800D001242000EA +:10BB100010BD10B58F4C0834FEF71BFE012805D16F +:10BB20002078C043000701D0012010BD002010BDC7 +:10BB300070B50500874C0834FFF7EBFF012807D1EB +:10BB40002800FEF292FE012181402078014201D0BE +:10BB5000002070BD012070BD03B56B467D4819788B +:10BB60000172197941720CBD7A4910B5CA6B8242D3 +:10BB700004D10020C863172000F09EFF10BD754956 +:10BB800010B5CA6B824205D100208863C8630320C8 +:10BB900000F092FF10BDF8B59402002506000F00DA +:10BBA0002B002200FFF2B4E93B00B01AAB411900B0 +:10BBB00000196941F8BD7CB504000D00684603F02A +:10BBC000E9F9009A019B121BAB4102D2019900983E +:10BBD0007CBD002001007CBD10B5F0F7A7FF002858 +:10BBE0001ED0624801694069814219D15E48002235 +:10BBF00000680821EEF221F8002811D10BF03AF884 +:10BC000000280DD121F044F8002809D121F040F896 +:10BC1000002805D156480078002801D1012010BD28 +:10BC2000002010BD4B4910B5CA6B824203D10020E1 +:10BC3000C86300F001F810BD70B5FFF7CDFF012813 +:10BC40003FD14C48ECF2F5FC04004A480821ECF2E4 +:10BC50007FFC050047481021ECF27AFC281884424A +:10BC60002FD14548ECF2E5FC040043480821ECF2F2 +:10BC70006FFC050040481021ECF26AFC2818844251 +:10BC80001FD13E48ECF2D5FC04003C480821ECF200 +:10BC90005FFC050039481021ECF25AFC2818844258 +:10BCA0000FD13748ECF2C5FC040035480821ECF20E +:10BCB0004FFC050032481021ECF24AFC281884425F +:10BCC00006D0244CA06E002802D1E079002803D1D0 +:10BCD000192000F0F1FE70BD0120F0F795F8E07931 +:10BCE0002849401EE071FF20F530FEF739F970BD9C +:10BCF00010B5FEF782FF002809D0F0F7E5FE002816 +:10BD000005D1F3F2B6FD134A80325161106110BDC6 +:10BD10001D4810B58088002801D0FEF73AF90D497A +:10BD20000120887110BDF7B582B00C000026094FC4 +:10BD300015008037F969B86971407040084364D0D4 +:10BD400010370FCF121A8B415FD2F0F7BDFE0028DB +:10BD50005BD11BE0B0050004D8D4000488130000B8 +:10BD6000BD970100B80B00000000000400A0008097 +:10BD70000418000474190004B8190004AC1A000473 +:10BD8000481A000491B30100E0370004FEF735FFC4 +:10BD900000283AD001F046F9002836D0FF48A03FED +:10BDA0008088002802D0B86E00282ED1F6F756FA07 +:10BDB00001282AD0002C04D002980021FEF750FF61 +:10BDC00013E01FF043FE0190F54800220068462171 +:10BDD000EDF233FF002802D00120B87002E01B20F2 +:10BDE00000F06AFE01981FF035FEFEF79CFC00286B +:10BDF0000BD10120002C00D00020042DF87006D0BB +:10BE00000C2D04D03E6200F00DFF05B0F0BD386A85 +:10BE1000401C3862F9E7F0B50400002085B00390BB +:10BE20002000FF30813026004068FF364136029006 +:10BE300008682200350000273432203537281CD00E +:10BE40000ADC801CC034002839D0012813D00B280C +:10BE50003ED10120607639E0382801D0392837D129 +:10BE6000726200202F72F0F721FEF4F7DBFBF4F78B +:10BE70002BFF2F731EE06F7222E0706A904203D195 +:10BE80002000FEF773FA15E022F0C6FC002811D15D +:10BE900001206F722872F0F709FE029809F055F838 +:10BEA0001322002101920200009102980121002337 +:10BEB000F0F7B4FB716A2000EEF241F806E0677615 +:10BEC000B84807220068402120F0D3FE03989CE781 +:10BED0000391FBE7FEB50400002001904C62DE12E6 +:10BEE0000100000048B6010000040000D564A34929 +:10BEF0002000FF30813040682600C036009008687E +:10BF00003500803534287BD008DC801C70D00128B7 +:10BF100017D00B284AD0352872D073E02200FF32A8 +:10BF20007132270034373728029242D0382810D097 +:10BF300039280ED03B2865D1A049486A401C486288 +:10BF40005EE09F48006A002854D1F0F790F828631B +:10BF500050E0F4F771FBF4F7C1FE2000FF30293008 +:10BF6000EBF296FA062001F05CF82000FF30613019 +:10BF70000021060001720800F0F7A2FD9048006A57 +:10BF8000002802D10298F0F7D8F8686AB84205D0C4 +:10BF9000012100980022090300F046FC00203073C4 +:10BFA000390020006F62EDF2D4FF23E001207076AB +:10BFB00026E0002030768248006A002802D10298EC +:10BFC000F0F7BBF8686AB84206D10120F0F778FDB7 +:10BFD0002000FEF7D5F905E0707E002802D0092088 +:10BFE00000F074FD696A2000EDF2B3FF08E0FFE79E +:10BFF00000207076704807220068402120F043FE40 +:10C000000198FEBD0191FBE7F0B50500080029008D +:10C01000FF318131496889B02A00059101687C327D +:10C020002E00FF362C000892012200274136803472 +:10C0300018297ED016DC0B2913D00CDC891C37D0D4 +:10C04000012926D0042975D0052974D15D4C2078AA +:10C05000FF2871D17BE00C29EED01629ECD01729EE +:10C0600069D125E12229FCD008DC192923D01A291D +:10C07000F7D01B29F5D021295DD119E12629F0D06F +:10C0800035297ED0362956D108982900A031706212 +:10C090005EE0FDF780FF4948416E491C41660A2178 +:10C0A000C171FEE0EDF7C1FC02E1FFF7CFFDFFE05B +:10C0B000F4F714FEFCE0EDF7A7FA002804D0059889 +:10C0C0001921EEF7FAF812E03A48002200681B2125 +:10C0D000EDF2BDFD002807D1364800220068462158 +:10C0E000EDF2B5FD002802D0F4F7A6FA2FE0206BA0 +:10C0F000012811D1E06A01280ED13048E16C80306E +:10C10000436A026AA06C801A994104D32B4880309C +:10C11000076247622763E7622848406C012803D121 +:10C12000F4F78AFA25484764F3F2ADFB234A8032DC +:10C1300003E0AEE0BFE0BCE0A2E003C2A26BE36BB1 +:10C14000801A994103D21D48806E002804D00899B6 +:10C150002800EDF2FEFEABE01848E16B80300CC821 +:10C16000A06B801A9941154908661FF079FC04906C +:10C17000206B01283BD0114A1349106E884236D3F8 +:10C1800000E093E00A4907918988C90281422ED3D1 +:10C19000FEF7E9FA012804D10848C16C80698142A0 +:10C1A00025D1FFF7C0FC002812D0044840790DE0EB +:10C1B000E0370004000000047C050004B005000422 +:10C1C0001842000424E900047C15000000280ED168 +:10C1D000FE48C07900280AD0B06B002807D1FC487F +:10C1E000002200684621EDF232FD00280ED00498AE +:10C1F0001FF03AFCF54C0F20A063206EF5490004B7 +:10C20000000CFDF7B7FEA761E76451E0F248008833 +:10C21000002809D0F1480221ECF2A4F9002803D04B +:10C2200004981FF021FC92E7ED48A26B806BE36B52 +:10C23000101A0290E548BB4103938761C76406204A +:10C2400000F0EFFEEEF24CF9B06B02060798120E0A +:10C25000009280887D228302E148D20000681E306F +:10C260000104090C02A8F4F775FB0028049804D116 +:10C270001FF0FAFBEEF25DF969E71FF0F5FB17E03E +:10C280000100D84806AA0068E9F774FEFF20207074 +:10C290005DE7CE48E262816B0F2909D18763FDF724 +:10C2A0007AFEB06B002800D1FFE6FBE6C0352A76A7 +:10C2B000002009B0F0BD2800FEF762F801210598C2 +:10C2C0000022090300F0B0FA2900343140E7F3B549 +:10C2D00087B00500FF308130406800900898290041 +:10C2E000FF31006841312E0088361A28C5542A587B +:10C2F0000100000044BA010000040000210BD6FD3B +:10C3000006917ED01FDCB6492C008969803416283E +:10C3100078D011DC801C76D0012835D0042873D168 +:10C320002800FEF737F8012100980022090300F0E9 +:10C3300085FA290034316CE1172866D018287ED0A0 +:10C340001928ECD19EE126287AD012DC1B2878D05F +:10C35000212877D02228E2D1EEF79EFE0028F1D0E6 +:10C36000FDF723FE9E488169C16406990120886318 +:10C370004EE1352867D03628D1D1069928007C3087 +:10C3800048622900A03144E1EFF779FE2800FF3030 +:10C39000984E6130817B00278036002906D0877354 +:10C3A0002800FDF730FEB0880028CBD00698002783 +:10C3B00087638B4847618761C761C76401008771E4 +:10C3C0008031C7700F614F618F61CF618770477097 +:10C3D0008766F3F262FA824A8032D1609060B28856 +:10C3E000FFF7EDFBA06305908248E1630491C06F05 +:10C3F0007D23DB007A4958438031CB688A68390055 +:10C4000004E00FE1B7E0AFE03EE1D5E08018059A27 +:10C410005941049B801A994108D3B088A26B8002CD +:10C42000E36BC11780185941E163A06371487D2710 +:10C43000C06FFF0047436A488030C36804E01BE1D7 +:10C440007EE003E1E9E01AE18268E16B0391A06B11 +:10C450000290801A9941C01B0023614F994167499E +:10C460003866884201900DD2B088029A8002039B00 +:10C47000C11780185941E163A063B0880199800217 +:10C480004018386656485E49006E0004000CFDF7FF +:10C490007BFD30687D23DB005843226D636D504F78 +:10C4A0000021801859418037BA68FB68801A994189 +:10C4B0000CD2F968B868616520650220F4F774F859 +:10C4C0004748016C491C016401214164B288E16B59 +:10C4D000A06BFFF784FB796238620026E36BA26BE6 +:10C4E000714070406364084322640FD001202063D0 +:10C4F000E06A01280AD13A6AA06C7B6AE16C801A72 +:10C50000994102D33E627E622663E6620122009870 +:10C51000110300F093F9E035287A022800D12E7239 +:10C520000098F6F72BFB002804D001210098C906DB +:10C5300026F036EF00980221EEF7EFFD002812D02A +:10C5400008980068262803D100980321EEF7E5FD3E +:10C55000FEF7FDF8002803D000980021FEF794FBB9 +:10C560000120EFF765FC8DE01D48C164FDF71DFD5E +:10C57000EFF7A5F986E01A4C00291AD06069002867 +:10C5800017D0EEF7B9FD002813D0A079012810D1FB +:10C59000FFF736FB01280CD1F5F774FE012808D00F +:10C5A0002079002805D1FDF700FDE06D401CE06515 +:10C5B0002CE0EEF795FD65E0FDF7F7FC084CA06E6A +:10C5C000401CA066EFF726F8002803D1EEF768FAC2 +:10C5D000002817D07D200A490001FDF7D5FC51E065 +:10C5E000B005000400000004EBB201005C3C000454 +:10C5F000FC1900046037000478050004881300006B +:10C60000D5B2010000981721EDF761FEA069E06442 +:10C6100031002800EDF2A7FC34E001000098EFF7AC +:10C620009FFB2FE0B24C207900282BD1EFF71CFDA7 +:10C63000012827D1A071FEF78AF8002822D0E078DF +:10C6400017E0EEF759FD0028E2D11BE0FEF77FF876 +:10C65000002817D0F5F716FE002813D1A44C606906 +:10C6600000280FD00120E07000980421EEF755FD5E +:10C67000A0790028E5D105E00120E06202E0012078 +:10C68000C035287600201EE608981CE6F8B50400A0 +:10C6900008002100FF318131496800910168891C3F +:10C6A00036D0012935D1D8202500005DFF35413530 +:10C6B000002808D00020E8F7BEFF200088302100C5 +:10C6C0009431686221E0EEF7EBFC2600884F70366B +:10C6D000002803D0A86BB96E08431BD100983E21F7 +:10C6E000EDF7F5FD834D0120B872286800221B216B +:10C6F000EDF2B7FA002806D1286800226BCE21CED1 +:10C700000100000040BE01000004000072D105914C +:10C710004621EDF2B0FA002806D021007C3120003D +:10C72000EDF22BFC0020F8BD3100F8E7FEB5050066 +:10C730000E0076481400418B491C418323F0B3F965 +:10C74000002812D0310028001BF0C1FC0921014053 +:10C7500002221040002C02D0002805D00021020047 +:10C760002800002300F0ADFAFEBD310028001BF0C8 +:10C77000AEFC8007F8D500206B460290597A012262 +:10C780001143597200920200019002992800072378 +:10C79000F0F7BDF8FEBD5E4810B5006820F092FAD3 +:10C7A0005A498C3908003438EDF2D7FB554800213E +:10C7B00041618161C1611E21818110BD5349C03138 +:10C7C00048607047534870B50C00C1788278090200 +:10C7D000114306D0052902D94F4A914201D34F4A4D +:10C7E000116041780278474E0902114300D0B181AF +:10C7F000417902790902114301D0494A1180C17976 +:10C8000083790A0247491A430A83417B027B090262 +:10C810001143454A01251180C17A827A08021043EA +:10C82000022800D000253078854210D000F083F82F +:10C8300000280BD023F037F9002807D0002C03D0B4 +:10C84000208810210843208026F0D8ED357070BD77 +:10C8500070B50C002B4D29698C4201D1002A02D001 +:10C86000210026F0A8ED2C6170BD70B50400FF30EA +:10C8700081304568052000F0E8FB224900208864EB +:10C8800088660864086548658865887121F0E2FF5C +:10C89000002803D101212800FDF7A4FBF3F207F8DB +:10C8A00080342064616461652065042014F0B4FD67 +:10C8B00000212800EEF73BFC01210022090328009B +:10C8C000FFF7C6FF70BD70B504000E4900208864F4 +:10C8D0008866086408654865886588712000FF30AF +:10C8E0008130456801212800FDF77CFBF2F2DFFF73 +:10C8F0008034206461646165206500212800EEF7C2 +:10C9000016FC70BDB005000400000004D8D400047B +:10C91000740600045E3C0004FDFF00006406000491 +:10C9200088060004E037000492060004032010B5D6 +:10C9300005F0D6F910BD012010B505F0D1F910BDF4 +:10C94000022010B505F0CCF910BDFD4810B50088E7 +:10C95000002807D0FDF71BFF002803D1FDF701FFDA +:10C96000002801D0002010BD012010BDF8B5012520 +:10C970006F07F44CF44E207900281CD0B06BB843FC +:10C98000B063F248E8F792FEF3F7DDFDF0490028C6 +:10C9900048610DD10025ED492571E160C821216173 +:10C9A00005216181C420657160610A20E08002E098 +:10C9B000207900280CD1E74988680A0D90438860E7 +:10C9C000E248E8F773FEB06B3843B063F3F7BBFDA2 +:10C9D0002800F8BD70B5FF21DF4DD948F531298019 +:10C9E00000260A210680841C01821E20207001205E +:10C9F0006670A070E67021716671F8F7C1FFA071D2 +:10CA0000000AE07104202072002060720320A072EE +:10CA10000020E07228882073000A6073CF480670F7 +:10CA200070BDF8B5F3F7E2FCCD4800240480CD4892 +:10CA3000C44D0470CC480480CC480460FF205A30B8 +:10CA4000A863E8F7F1FFCA494000085A28600121AD +:10CA50006C7229626C637D23AC62DB00EC62EB617B +:10CA6000296329713226E980C248EE602861C248F4 +:10CA7000688169712C66C1482A006C6680326861E1 +:10CA80001000B24F20389460C7814681848144826F +:10CA90000481FA260482C6820A260476868294805D +:10CAA000E9671360FFF777FE19F004FFFDF7F1F96E +:10CAB000FFF790FFFFF75AFF0020F8BD10B5040004 +:10CAC000FFF734FF002807D0022023F0F3FDFCF726 +:10CAD00071F8002221000AE0FFF732FF002803D09E +:10CAE0000022A748210002E0A64800222100EDF222 +:10CAF00025FA10BDF1B51EF0C7FF924E0700756E06 +:10CB0000346E009A00210120FEF20CEA7C4EBCDE5D +:10CB1000010000003CC20100000400007028DD8715 +:10CB2000294320437166306638001EF0BBFF0023A6 +:10CB3000290020005940584008430AD1FFF700FF60 +:10CB4000002800D0022023F0BFFD0121890626F035 +:10CB50003CECF8BD0F20D7E7F8B5824CA1698842BC +:10CB600023D10020A061EDF2C1F8A26AE36A0600B9 +:10CB70000D00121A8B4105D2A26AE36A2900B01A8D +:10CB8000994105E0A06AE16AC043C943801969413F +:10CB9000216A88420AD2081A0022724B00920200CF +:10CBA0007E4800211833E9F7EBFBF8BD1520FFF7AD +:10CBB000ABFFF8BDF8B505001EF070FF07000120BF +:10CBC00004F0E3FE002803D07548006D002845D12D +:10CBD000644CA06900283DD16F48016802005832BA +:10CBE000914204D06B4803684030834232D16D4893 +:10CBF000594C40687D260379F6006034032B0BD135 +:10CC00004379032B08D10F239B01C018C06A807F92 +:10CC1000800701D0142514E0914204D1207E02281F +:10CC200001D3E58A05E0002D02D0A589002D00D1B1 +:10CC300065891FF0D5FF002803D0A08A002800D006 +:10CC400005002089002800D006002800704300F06D +:10CC5000E1FA03E0EDF24AF8E162A06238001EF06A +:10CC600021FFF8BD10B53F4CA069EDF220FC00207B +:10CC7000A06110BD3848002160304176080099E776 +:10CC8000384810B5806900280AD11EF007FF04005B +:10CC900031486030C08900F0BDFA20001EF002FF6C +:10CCA00010BD70B504002F488069002808D11EF01F +:10CCB000F5FE0500200000F0ADFA28001EF0F2FE9F +:10CCC00070BD25486030407E74E7264880690028A2 +:10CCD00000D001207047FFB583B016000025FFF794 +:10CCE0002FFE0400FFF731FE2B49002806D00A680A +:10CCF00008005830824201D1012700E000270020BF +:10CD0000002C009004D1244809683430814257D067 +:10CD1000FDF747FD012803D0FDF72DFD012851D176 +:10CD2000002C4FD11EF0BAFE04000498002808D150 +:10CD3000F2F2C7FD184A8032D16490641820FFF7E0 +:10CD4000E3FEFEF70EFF012837D1174D002E2DD13F +:10CD5000002031E05C3C00046037000400210080CA +:10CD60008813000058060004802800809206000402 +:10CD7000B0050004A00600048C0600049006000420 +:10CD80009406000416300400204E000083060000C4 +:10CD90000A1A00006C59000418D4000475C201007E +:10CDA000401903C098D50004B5050004002203987B +:10CDB0001100EFF7EBFB0120287020001EF072FE3F +:10CDC00007B0F0BDFC4806990290FC48002901908C +:10CDD00013D0EEF70CF900280FD0002C0DD10298DB +:10CDE0000126C662019900200B2548761FF0F8FE47 +:10CDF00000284BD0F248C66048E03800204345D0B8 +:10CE00000120002C05D1EC492031097A052900D0F8 +:10CE10000020002F04D00299CE620199049A4A762C +:10CE20000499314301D10C2530E00B2500282DD089 +:10CE30000498002800D00920002E01D0022100E033 +:10CE40000021014300911FF0CBFE002819D0DD48DE +:10CE50000068FEF2EAEB022101430098E4F712FDBC +:10CE600000280ED1009826F028EB002809D10500F3 +:10CE7000002C009000D10C25002C07D10299C8622B +:10CE800004E0002C02D1CE490120C860002F04D05C +:10CE9000002C02D1019900980882002D90D0280022 +:10CEA000FFF732FE8CE7F8B50700C7480068007945 +:10CEB000012808D0C548C649006809680843C54923 +:10CEC0000968084339D1FDF76CFC002835D1FDF71E +:10CED00052FC002831D1FEF734FEFFF736FDB64C88 +:10CEE000002821D022F0E9FD00281DD01FF078FE97 +:10CEF000002803D1FFF733FD002815D0B64D286870 +:10CF0000B64E012806D0B648008800280CD03088DC +:10CF1000002809D0EEF76BF800280FD02687B386DB +:10CF20000100000038C601000004000023F20EEBEF +:10CF30000020286030800320FFF7F0FD608B002286 +:10CF4000401C6083110038000123FFF7CEFEF8BDBE +:10CF5000E8F75AFE608B0121401C6083380026F000 +:10CF60003EEAF8BD0A2010B5FFF7D8FD10BD70B538 +:10CF7000F1F7BFFD00280CD022F0A9FD00285DD0FC +:10CF8000FFF7EDFC002859D0FDF714F8002855D024 +:10CF900052E099489949C06888424DD022F097FDE7 +:10CFA000002843D00024FFF7D5FC012500280BD032 +:10CFB000022023F093FBFBF711FE01684030814211 +:10CFC00000D00025280070BDFFF7C9FC002820D044 +:10CFD0007E497E4AC03909682C002800683A91428F +:10CFE00000D0002000280DD1784A8032936B002BAE +:10CFF00002D1526B002A05D0744A20005C3A91425B +:10D0000000D00020714A443A914200D000240443E9 +:10D010000AE0FFF7A9FC002806D079482C00016837 +:10D020004030814200D00024200070BD6948007A61 +:10D03000032801D0022801D1002070BD012070BD5D +:10D040006D4910B50968002909D16A496D4A0988F6 +:10D050001278114303D00A2801D00B2801D10120F6 +:10D0600010BD022022F055FD10BD58482030007A36 +:10D070007047564920310A7A022A03D15E4A526823 +:10D08000002A00D00872704770B5FFF768FC0124D1 +:10D09000002813D0FDF78FFB4C4DC03D002803D175 +:10D0A000FDF773FB002804D0484920002A68443962 +:10D0B00019E0464920002A68683914E0FFF74AFC65 +:10D0C00000280CD0022023F009FBFBF787FD026843 +:10D0D00021004030824200D00021080070BD484944 +:10D0E00020000A6840318A42F8D0002070BD3748DD +:10D0F0008030806B70471FB5002023F0EFFA0028C6 +:10D1000009D08068C00406D5FFF729FC002802D0AA +:10D11000FDF774F810E00122022102A8EDF25FFA97 +:10D1200003000BD00420FFF7A4FF00220092364A30 +:10D13000002102A8F3F736FC040010E00120E6F716 +:10D14000D2F90220FFF795FF002211001000130012 +:10D150000092F3F727FC040001D1E6F7C4F92000A0 +:10D1600004B010BD24480169C1607047F8B50024BF +:10D1700007000E0023F062FA1E4DF00608D528883D +:10D18000102188432880FFF7E5FB002800D1012407 +:10D19000B005800F002600280DD03800FBF720FDD9 +:10D1A00029880322120291432980068022F097FCED +:10D1B000002800D00124288831210901084203D128 +:10D1C0000B480680114806602000F8BDD8D4000442 +:10D1D000C0370004D42C00049C000004C0000004EC +:10D1E000CC050004C8050004C405000414070004AD +:10D1F000A00600045C3C000458060004FFFF000089 +:10D200006C5900048C060004881300009406000486 +:10D210000E49086070470D49486070470B498860A7 +:10D2200070470A488068704738B50400ECF268FD22 +:10D23000064A064B1462D1629062002200920448B2 +:10D24000220000211833E9F7A5F838BD580600047C +:10D2500075C20100FC480088002802D0FB4901206B +:10D26000886000207047F8480188F848002901D0FC +:10D27000012181600178042901D10521017000207C +:10D280007047F2488068704770B50C00022026F0A5 +:10D2900092E8050004D10221080004F038F90500E5 +:10D2A000607911267601032802D02079012817D150 +:10D2B000A068C00444D5F1F71CFC002803D0F1F7A6 +:10D2C0001EFCA0423CD0002D03D0A819007A0728EC +:10D2D00036D02079012803D118F011FE00282FD074 +:10D2E0006079D94D02280BD1FFF734FB002827D0F5 +:10D2F00028888005800F23D0A019007A07281FD125 +:10D300002079032804D16179002919D0012917D087 +:10D31000A168C90407D56179032901D0012802D188 +:10D320002888C0060CD51EF0C3FBC94982A80AD5BF +:10D330000100000034CA010000040000D79D7B5F9B +:10D340000A78002A07D101220A701EF0BFFB0120D3 +:10D35000FFF7EEFB70BD1EF0B9FB70BD10B5C04C01 +:10D360002069002803D0EDF2B6F80020206110BD3E +:10D3700038B5040007F09CF9002822D1FFF7F9FA2C +:10D38000B64D002803D1FFF7F9FA002802D028880B +:10D39000C00607D4FFF7E8FA002812D028888005D5 +:10D3A000800F0ED0FFF7DAFF0022AD480092C08850 +:10D3B0007D22D200AA4B4243AB4821001033E8F74C +:10D3C000F3FF38BD10B504F040FD002800D0012067 +:10D3D00010BD38B50D00A24CE168884230D1002064 +:10D3E000E060FFF7EFFF0028207832D0022827D135 +:10D3F00026F07AE8002817D1F1F77FFB002813D137 +:10D400009A48002200684621ECF253FC00280BD118 +:10D410000BF044FD002807D1EFF7CDFB002803D027 +:10D4200026F052E800280CD00022009260887D226D +:10D43000D2008B4B42438E4829000C33E8F7B4FFEF +:10D4400038BD0320012120704903280025F0D0EFCA +:10D4500038BD0028FCD006280AD1FFF785FA00283D +:10D4600000D0022023F044F90121090325F0C0EF88 +:10D470000720207038BD10B5794CE068002803D033 +:10D48000EDF229F80020E06010BD70B51EF01AFB27 +:10D49000734C05002078002805D0072803D0FFF73B +:10D4A000EAFF0720207028001EF010FB70BDF8B5C1 +:10D4B00006001EF007FB6A4C05002178002919D0F0 +:10D4C000012917D0072915D0032913D0042911D019 +:10D4D00005290FD006290DD0FFF7CDFF00220092BD +:10D4E00060887D22D20042432300614831000C3322 +:10D4F000E8F75AFF28001EF0E9FAF8BD70B50500FC +:10D500001EF0E0FA564C06002078072808D1FFF7F5 +:10D5100059FF002804D0022020702800FFF7C7FF21 +:10D5200030001EF0D3FA70BD10B51EF0CBFA040027 +:10D53000FFF7A1FF4A490878052803D0042801D045 +:10D54000032801D1012000E00020087020001EF017 +:10D55000BDFA10BD10B5FFF70CFA002801D0454800 +:10D560000BE0FFF701FA002806D0022023F0C0F8F4 +:10D57000FBF73EFB743000E03F48E9F2BBFF0A20B6 +:10D58000FFF7D6FA10BDF8B504004569344E334FA5 +:10D590000020B0603888002803D022F09FFA0028CD +:10D5A00004D03078012801D005286BD12F48002203 +:10D5B00000684621ECF27DFB002837D1F4F72BFD03 +:10D5C000002833D03888FF27F537002822D0687923 +:10D5D000032802D02879012803D122F07FFA0028FD +:10D5E00006D06879022815D122F083FA002811D0DC +:10D5F0001020E7F7C3F81020E7F7D2F80420E7F788 +:10D6000079F9E7F789F93800E8F76EF80920FFF7AC +:10D610008FFA4FE03078052832D13800E8F764F807 +:10D620000620012189053070280041E03888002853 +:10D630000DD00020FFF78EFF1020E7F79FF8102095 +:10D64000E7F7AEF80420E7F755F9E7F765F9307822 +:10D65000052813D10220307027E013E05C3C000461 +:10D660008C0600046805000491C901000000000454 +:10D67000C7CA010014D50004DC590004012819D1DF +:10D680000020E8E7002810D007280ED0FFF79AFE08 +:10D6900000280AD0307802280CD1FFF793FE00282A +:10D6A00008D022F01BFA002804D001216069090388 +:10D6B00025F09EEE0020F8BD10B522F01AFA0028E1 +:10D6C00016D1374837490088002806D03648808868 +:10D6D000002802D0012048700AE00878002801D014 +:10D6E000072805D122F012FA002801D1FFF7DCFA51 +:10D6F000002010BD70B5018944690D182800FCF2A6 +:10D70000A4F900281DD022F0E9F900280AD0254804 +:10D710000078002801D0072804D1012189042000C5 +:10D7200025F066EEFFF725F9002803D1FFF71CF975 +:10D73000002806D022F0D5F9002802D0BBCFC16066 +:10D740000100000030CE0100000400008447A8332F +:10D750001C20FFF7F7F92800FCF29BF9002805D000 +:10D760001748002200681E21ECF2ADFA70BD114886 +:10D770000088002805D010484178012901D10221F4 +:10D78000417070470C484178022901D10321417052 +:10D790007047094810B5007806280AD1FFF7EEF85F +:10D7A000002800D0022022F0ADFF0121890525F0DC +:10D7B0002AEE10BD5C3C00048C060004E037000437 +:10D7C00000000004F0B50E2801D200243DE0012342 +:10D7D0001F2808D3292800D200230100FB4A1F3943 +:10D7E0008900515807E0162800D200230100F84AAA +:10D7F0000E394900515AF74A96789489D789158A83 +:10D800005289B04210D9F34E9B002036F6588E4212 +:10D8100007D3F04C2834E3588B4201D23C0000E09F +:10D820002C00A24211DD0FE0EA4E9B003836F6587C +:10D830008E4201D92C0005E0E64D3035EB588B4285 +:10D8400000D93C00A24200DA1400E24988702000AE +:10D85000F0BDF8B505000E00DE4FF86900281BD0BA +:10D860002800EFF73FFE002816D0A868C00413D5A3 +:10D870006879032801D001280ED17878B0420BD006 +:10D880003000FFF79FFF79890400884204D0280008 +:10D89000F5F763FC7E707C81F8BDF8B505000920C2 +:10D8A00080012C180020E0622020005DA06228008A +:10D8B00001F0FDFE002809D0280001F076FEC54ADF +:10D8C00001040420105E0914814201DDA06A17E002 +:10D8D0000620105E814201DCE06A11E0E66AA06A7F +:10D8E000BD4B801940080827D75F07E02218C032D7 +:10D8F000127B9A56D2198A4202DD401E8642F5D327 +:10D9000020636063002039210855C021085520009C +:10D91000F9F2C0FE009000992200280019F0A5FB42 +:10D92000AE4800262F1818207043AD490A5C002A23 +:10D9300010D04118091D062238001DF0F8FC0028FF +:10D9400008D1300020F0B4FF3106A54A090E2800A6 +:10D95000F0F210F9761C042EE5D32000F9F2BFFD99 +:10D9600003212000F9F208FE00992800FFF771FF5B +:10D970000120F8BDF1B588B0092008998001081888 +:10D980000500C030069008980027FF30FF30801C4B +:10D99000866DC16D300003913C00794078400843AA +:10D9A0007ED003984100F00F084339008700894872 +:10D9B00001918069BF08002803D18A4A38001040CD +:10D9C000070000210A00380049405040084353D066 +:10D9D0003C26002432001F3A00210120FDF2CAEA51 +:10D9E000019A384011406140084304D1761E360642 +:10D9F000360E1F2EEED200220199D243B8185141A3 +:10DA0000019A384011406140084303D10024CC20E2 +:10DA10004655BCE030000A211F38FDF244EE0E06E8 +:10DA20000106360E090E280002290AD169490F2481 +:10DA30005031082E01D20D2416E0092E14D20E24E6 +:10DA400012E001290AD163490C245F31082E01D26A +:10DA50000A2409E0092E07D20B2405E05D490924B8 +:10DA60006B31082E00D208242200CC30FDF2B8EC35 +:10DA7000641E2406240E8AE05B4A00273000390029 +:10DA8000104079407840084301D058480640584833 +:10DA900000210A00304049405040084304D000E0D3 +:10DAA00073E04020C043064006981E2105900027E1 +:10DAB000017349483A00C057049000210120FDF24B +:10DAC0005AEA039A00233040114059405840084315 +:10DAD00014D041492819C030007B049A085690425E +:10DAE00003DA641C2406240E05E0002C03D0641E17 +:10DAF0002406240EEEE72819C03007731E2F05D226 +:10DB0000380019F0F5F807001E28D2D90598007BD7 +:10DB100017281BD1012230009203002110400A0077 +:10DB200049405040084311D0601C20280ED2040602 +:10DB3000240E200004E02918C031CA7A401E0A735E +:10DB40000028F8DC05980E21017303E0B59E785794 +:10DB5000010000002CD20100000400003B828D80F7 +:10DB60000598007B0E281CD1300020220021104097 +:10DB70000A0049405040084313D0601C202810D2AE +:10DB80000406240E200004E02918C031CA7A401E81 +:10DB90000A730028F8DC05980521017301E0069856 +:10DBA0000773202044550898007902280BD00E48AE +:10DBB0000078002807D00898C0358030C16D2A7BD6 +:10DBC000806DF2F23BFC012009B0F0BD10B50400FD +:10DBD000FFF7DAFE2000FFF76AFE012010BD00000B +:10DBE000D0310400DCF63100001900044832040092 +:10DBF0002902000014CB0004FFFCF3CF00C0FF7F1C +:10DC0000FFE1FFFF08400000E0E770B504000920D5 +:10DC10008001201800227D214260C90002608160DD +:10DC20000100C0310D000A700321F9F2AFFCA868B1 +:10DC3000002804D1FC480D21F9F243FBA860200024 +:10DC4000FFF7C4FF70BDF8B5040001263603ECF7FA +:10DC500011FF002803D0002C01D0F4484669F44895 +:10DC6000EAF24AFDC1234008DB0058430024450086 +:10DC70007D27FF0020000E300006000EFEF2F0FDB2 +:10DC8000FF23F533584339007043FEF204E9C0081E +:10DC9000A84200D928008108E64862000368641C95 +:10DCA000112C9952E6D30024060020001F300006F4 +:10DCB000000EFEF2D5FDFF23F53358433900000373 +:10DCC000FEF2E8E8C008A84200D9280032686100E6 +:10DCD00080088918641C1E2C4884E6D3F8BDF8B56A +:10DCE00006000920800134180F0020006163F9F25A +:10DCF0006AFCE019C030017B2200300019F0BFF946 +:10DD0000CD480024351818206043CC490A5C002A0D +:10DD100010D04118091D062228001DF012FB002812 +:10DD200008D1200020F0CEFD2106C44A090E3000A3 +:10DD3000EFF22AFF641C042CE5D33800F8BD70B55F +:10DD4000060009208001341809229201A16A206B83 +:10DD5000B5182035884205D22100F9F22EFC0021A9 +:10DD6000697614E02100CC310A00415C2878805C9F +:10DD7000884207D1687E012804D0300019F05BF892 +:10DD8000002801D1FF2070BD01206876206B0100C2 +:10DD90003000FFF7A4FF70BDF8B50700092080012F +:10DDA0003C1826002036717E206B002903D000200D +:10DDB0007076256B15E02100F9F2F3FB05002018C1 +:10DDC000C030017B08001F381D280AD83078801E1B +:10DDD000A84206D8380019F02EF8002801D00120FA +:10DDE000707629003800FFF77AFFF8BD0921890114 +:10DDF0004118096B73E70921890170B544182100A6 +:10DE0000C0310E7802220D000A70FFF798FFFF283C +:10DE100008D12E70A0680A2801D1642001E07D207D +:10DE2000C000A06000206060206070BD09218901F1 +:10DE300041180122C0310A70AEE710B50400092074 +:10DE40008001201803290FD8002902D17D22D20099 +:10DE500004E0022901D10A2200E064228260F9F282 +:10DE6000E2FB2000FFF7C2FFB8E6F0B585B007007F +:10DE7000092080013C18616B2000CC30085C0090C8 +:10DE8000200020300390407E0025002806D0009915 +:10DE9000380018F0D0FF002800D10125F81DFF3010 +:10DEA000FA30806B002806D0009825F0B3F80028DF +:10DEB00001D0012300E000232000483001AA02A97C +:10DEC00019F075F8022801D1002D54D02000F9F284 +:10DED00010FB200002A9F9F22DFB09216B461879ED +:10DEE00089017E182843C036002804D03578022DD9 +:10DEF00007D1002505E0307822000021F9F2A0FBCF +:10DF000005002000683018F0ACFFFF280DD0009904 +:10DF100088420AD0010003222000F9F229FB2200E6 +:10DF200029000320F9F28CFB0500002D07D0012DFC +:10DF300003D0022D01D0032D1DD1290004E0039848 +:10DF4000007E032806D300213800FFF776FF01206A +:10DF500005B0F0BD307801280BD12000548D8A38EF +:10DF60000100000028D601000004000068585EECA3 +:10DF7000F9F258FB002802D03800FFF746FF30784E +:10DF80000228EAD101E00228E7D00020EAE7FEB546 +:10DF90000500092080012C183420405DFE2809D09E +:10DFA0002800FFF71DFE0020606020607D20C0007B +:10DFB000A06078E0206827000A300921C037890175 +:10DFC000206038786E18CC36002856D1606B805DA2 +:10DFD0000090200020300600407E002806D00099E6 +:10DFE000280018F032FF002800D17076E81DFF30BD +:10DFF000FA30806B002806D0009825F015F800282C +:10E0000001D0012300E000232000483001AA02A92A +:10E0100018F0D7FF060002283DD02000F9F273FA6D +:10E02000002E20D1200002A9F9F28EFAE16A206BBD +:10E0300088420FD92800FFF703FF2CE0E8E802C070 +:10E04000001900047419000424FA000429020000D5 +:10E0500014CB00042000F9F2E5FA00281BD02800B8 +:10E06000FFF7D3FE17E02000F9F2DCFA002812D007 +:10E07000200002A9F9F268FAF1E72800FFF7FFFE95 +:10E08000012808D103212000F9F28AFA206B815D72 +:10E090002800FFF7F2FB3878002806D1A1687D2020 +:10E0A000C000814201D10020FEBD0120FEBD10B59F +:10E0B00004000868026F1C38927840691207920FBA +:10E0C000F94A526AE0325278002A03D12030007DAA +:10E0D000FE2809D120004830F9F202FA61684018A0 +:10E0E00060600020C034606082E50120704770B538 +:10E0F0000400001DFDF2CAEA0500083419F0D2F848 +:10E1000019F03AF9022D04D0032D18D1FF2553350B +:10E1100023E0E078A178000208438608002507E0A4 +:10E12000A8000019001D310019F0A8F86D1C761E1A +:10E13000E078A178000208438008A842F0DC70BDB6 +:10E14000E178A27809021143201D890819F096F898 +:10E1500021002800F9F2F3FA0400002CF0D170BD80 +:10E1600070B505000C0008D0201DFDF290EA0006F5 +:10E17000000E18F07DFF012801D1012070BD201D87 +:10E18000FDF284EA00280DD001280ED0022801D02B +:10E19000032802D12000FFF7AAFF280019F04EF84B +:10E1A000002070BD19F07EF8F7E7F8F286FEF4E77C +:10E1B00010B5040018F07BFD20000CF08CFE17E574 +:10E1C000F8B507000800002A01D00120F8BDB74EBD +:10E1D000756C346CF9F286FA71643064380018F0AA +:10E1E000B8FD002802D075643464F8BD3800FFF72C +:10E1F000DFFF0020F8BDF7B582B0002704983E008D +:10E200003C0022F043FA050004984079022869D1C5 +:10E210000398F9F267FAA64A002310400090A54837 +:10E2200001400098019159405840084301D101270D +:10E2300058E00199009800235940584008430DD0F8 +:10E2400000985A1E80180199009B5141019A18406C +:10E250000023114059405840084305D0FE20A877BC +:10E2600040E0641C2406240E220000210120FCF260 +:10E2700096EE009B019A18400023114059405840E7 +:10E280000843EED020001F38092818D8112040017B +:10E290002818407E0028CAD00498F5F706FF002809 +:10E2A0001DD0092080012818C07A002801D014341C +:10E2B00013E06720405D400711D50A340DE02000CF +:10E2C0000E3807280BD80498F5F7EFFE002806D083 +:10E2D0006720405D400702D509342406240E002F34 +:10E2E00000D1AC77049C6079022803D1A97F342047 +:10E2F00001550AE0A068C00406D5029A03992000DF +:10E30000FFF75EFF060000E00126E279A179200018 +:10E3100002F0DFF90400002E00D03700002CE2D11B +:10E3200038001FE670B50D001400002811D0012040 +:10E3300070BD6079022806D0A068C00403D529000A +:10E340002000FFF70DFFE279A179200002F0C1F96A +:10E350000400002CEDD1002070BDF8B50F0041790C +:10E36000027908020F21890179180969B9C8564C48 +:10E370000100000024DA0100000400009C372B5843 +:10E380001043FF3121313C00FE258883A068C00482 +:10E3900007D534200555200018F093FC20000CF020 +:10E3A000A4FDE279A179200002F09DF90400EDD1ED +:10E3B0004748464E00253C1818216943705C0028E8 +:10E3C0000AD08919091D062220001CF0CEFF002862 +:10E3D00002D1280020F08AFA6D1C2D042D0C042D8A +:10E3E000EAD30020F8BD10B54179022920D12030B0 +:10E3F000027D0024FE2A18D010001738072803D801 +:10E40000093A1206120E09E010001F381D2805D81F +:10E4100002E00A3A1206120E292AFAD2002101203D +:10E42000FCF2C6ED2043214332E52A492A482FE574 +:10E430002349086C496C2BE5F8B50C000700100067 +:10E44000FFF7D1FF05000E00002F01D00120F8BD1D +:10E4500004212000FDF2A8E82807000F2071000A1F +:10E460006071E804000EA071000AE071A8022100AA +:10E47000000E0831FDF224E968022100C00F0C31C2 +:10E48000FDF21EE97100E80F0843810A020D1143F5 +:10E4900001438805800D2076000A6076FF20543005 +:10E4A0002070000A60702420A0700020E070F8BD89 +:10E4B000FEB50F00002811D00120FEBD14C70004D6 +:10E4C00000190004FFFF7F80FF0100E014CB00046F +:10E4D00029020000FFFFFF1FEFDFFFFF1000FFF723 +:10E4E00082FF0024250001910090042C25D00D2CE2 +:10E4F00023D0220000210120FCF25AED009B019A5A +:10E5000018400023114059405840084315D06C4929 +:10E51000A00009680822095824206843C619300061 +:10E520000C30F8F2C5FEFF2053303072000A7072D2 +:10E530002020B07200206D1CF072641C2406240E92 +:10E54000162CD2D9391D0320FDF2BAE8FF20523033 +:10E550003870000A787024206843001DB870000AE3 +:10E56000F8700020A9E7FF22BA320270120A427046 +:10E57000022282700022C2700F229201891809695A +:10E58000FF312131898B0171090A417100207047E7 +:10E590000B0001003D222131180010B5FCF23EEFC6 +:10E5A00076E44848484A49494264002301640370BC +:10E5B000C2648164704710B5FFF7F3FF4149012041 +:10E5C000488218F079FE63E43E4800210182404908 +:10E5D000404B0988404A994202D35100C28108E069 +:10E5E0003E4B994202D3C281828103E00721090296 +:10E5F000C18181810021C94341813D2181704170E8 +:10E60000704770B50600F0F7A7FC0500E4F7FDFFC2 +:10E61000032400280BD02B490878032801D0C870A8 +:10E620000C70300018F04DFB30000CF05EFCECF785 +:10E6300035FA002817D03000EEF772FF002812D00C +:10E640001E216808012800D0152111204001301832 +:10E65000017544750120FFF70AFB300018F031FB0B +:10E6600030000CF042FC70BD10B50400E4F7CDFFA3 +:10E67000002808D01348C1780170200018F021FB51 +:10E6800020000CF032FCECF709FA002816D020002C +:10E69000EEF746FF002811D0114801781120400103 +:10E6A000201801750F49097841750020FFF7DFFA3E +:10E6B000200018F006FB20000CF017FC1EE50000FF +:10E6C000A8F9000400190004FFFFFF1FEFDFFFFFA0 +:10E6D000B2060004581B0000880E0000B80B0000B2 +:10E6E0007C3704007D37040010B5F84C606AC030F8 +:10E6F000817F002007F0BCF9606AC030817F012073 +:10E7000007F0B6F9F2490220887010BD70B50024F8 +:10E710000CF002FCED4D072807D1686AC030C07FBD +:10E7200000281BD001281AD125E0032805D1686AEA +:10E73000C030C07F002812D110E0052805D1686ADA +:10E74000C030C07F00280AD115E0062807D1686ACA +:10E75000C030C07F01280ED0022800D10124DC483F +:10E760000078002802D02000E4F79CFD686AC030E1 +:10E77000C477847770BD0224F1E7D549AF5FD73EF7 +:10E780000100000020DE010000040000CFEDF8349D +:10E79000283108008A88083882808A7982710A685C +:10E7A0000260C979C171A9E710B5FFF7B9FFFFF79A +:10E7B000A5FF10BDCB4A28329179100013000068E4 +:10E7C000083B642902D1002822D108E0642806D33E +:10E7D0001868642803D39879491D814217D3C14B27 +:10E7E0000421515E20330420185E002901DC00283A +:10E7F00002DDC01C81420ADCBA48D1792030C079E0 +:10E80000002901D1002803D0491D814200D2BEE772 +:10E81000CAE7B448C0787047B249B34A888840080C +:10E82000486100208860C8601268CA610A00283206 +:10E830006423908093711060D071083A9080937136 +:10E840001060D071C87048707047F1B50A252C006F +:10E85000A348406AE0304078002809D0A14E3078C3 +:10E86000002806D0F0F77FFB012802D1FFF7D4FF84 +:10E87000F8BD21F068F97D27FF0000280BD09A48E9 +:10E880000468F069844204D9201A3900FDF220EBB3 +:10E890000500F4612C0001F05BF8002811D001F0B4 +:10E8A00057F8009A0A214032D27E152A00D8510822 +:10E8B0008A08824200D864004908814212D8640064 +:10E8C00010E0009800F01BFF00280BD0009800F02B +:10E8D00094FE0A2800DC6400052800DC6400282877 +:10E8E00000DB6410707800280AD1B088410070699C +:10E8F000814202D9001970610FE00120F0700CE034 +:10E90000022803D0042801D0062804D1B168B942F6 +:10E9100001D84919B1600028AAD17449F068884229 +:10E92000A6D84019F060F8BD10B5FFF775FF0CF0E0 +:10E93000FDFA04000CF0FAFA401E044214D00CF068 +:10E94000EBFA04000CF0E8FA401E04420CD06448D4 +:10E95000406AE0304178002906D00078002803D0D2 +:10E960000CF087FB0CF067FBFFF7C8FE10BD5D499C +:10E970008878002803D0401E88700020704701204E +:10E98000704770B55B24574D245C2835EA790A231B +:10E99000152C00D863089A4204D3524B2033DB79FC +:10E9A0009A4218D84F4AD378002B04D092687D231E +:10E9B000DB009A4211D300290DD12968642902D3C2 +:10E9C000A979142907D2002100F0DAFC002804D02C +:10E9D000A888002801D0002070BD012070BDFFB5BF +:10E9E00081B03F483F4C406AE0304078002874D006 +:10E9F000019800F084FE2700012628370025002812 +:10EA000010D0019800F0F9FD00040014B880E178FE +:10EA1000002903D00A2806DDE57004E00A2802DC9C +:10EA2000E67000E0BD800298B8710398386000F08D +:10EA30008FFFF8716378FCF218EF07050C0E2B2D91 +:10EA400043455000A1886069884246D3656166707D +:10EA500043E002202FE004990198FFF792FF00287D +:10EA60003BD1A56000F0FAF8002801D1657004E000 +:10EA7000E560FFF755FE032060701A48B979203031 +:10EA80008171B988818039680160F979C17124E0A8 +:10EA9000042010E004990198FFF773FF00281CD1AF +:10EAA000A5600198FFF786FE0CF040FA072804D114 +:10EAB000FFF736FE052060700FE06570E5700CE032 +:10EAC0000620F8E704990198FFF75BFF002804D1BE +:10EAD000A5600198FFF76EFEEFE7607805B0F0BD26 +:10EAE00014C70004CCBE01C000A60080204E000068 +:10EAF00070B5050000F06AFD2C00E034208228008B +:10EB000000F05CFD6082FFF7F9FD09208001281804 +:10EB1000F8F2E8FD052803D92800FFF72EF902E0F6 +:10EB20002800FFF781F9280000F0ACFD0022110059 +:10EB300028001300FFF753FF5A49487070BDFEB517 +:10EB4000092105000920574E80012F188901F0780E +:10EB50006C18C034002805D1207800281FD1A8687F +:10EB6000C0044BD50022110028001300FFF737FF27 +:10EB7000012870700AD10020009038006946F8F230 +:10EB8000E9FC062020702800FFF7B2FF255713127A +:10EB9000010000001CE2010000040000E77C7D8908 +:10EBA000F078002831D07078032824D005282CD1A3 +:10EBB00021E0062829D1380048300700002301AAA7 +:10EBC000694618F01CFA022804D1B0687D21C900FA +:10EBD00088421AD3380018F07BF900990200090620 +:10EBE0006B461B79090E2800FFF703FF032870709E +:10EBF00001D0052803D12800FFF784FF05E0002895 +:10EC000003D100212800FFF740F92078002801D126 +:10EC10000020FEBD0220FEBD70B50028264C10D09D +:10EC20000CF08EF905000CF08BF9401E05420BD05C +:10EC30000CF07CF905000CF079F9401E054203D078 +:10EC400001202061012070BD002070BD10B51A4C5C +:10EC5000206900280BD0A069002808D1FFF7E6FD45 +:10EC600016480121406AE03001704170A16110BD79 +:10EC70001149134AC86890421AD20A00203204206F +:10EC8000105E002814D0C978002911D11100083174 +:10EC90000423CB5E181A431C0ADB0868642809D3D6 +:10ECA0008B7991791420142900D30800834201D371 +:10ECB0000120704700207047CCBE01C014C700047B +:10ECC000204E0000F8B5F0F24CFEFF4DE960A86060 +:10ECD000E81DF930016B0400491C40340163207CBD +:10ECE0000090002805D0286800262E60EBF22FFC4B +:10ECF0002674A07CF54E002823D0EBF247F8326E44 +:10ED0000736E871A9941B26DA868F36DE968851A28 +:10ED1000994100230E00E81A994103DA68429241B2 +:10ED2000911B00E0280001003A000C2019F036F990 +:10ED30003800E64A00273300281ABB41D3669066A4 +:10ED4000A7740098F8BDE04810B50168002916D0F6 +:10ED5000DE4C00210160E06A0521401CE062606B2E +:10ED6000401C6063FDF2BEE8002902D1A06B401C8C +:10ED7000A063002021F0F8FC616BFEF7E4F810BD01 +:10ED8000F0B585B0FEF7B7F9052842D1EAF2FEFFEB +:10ED9000CE4CE164A064F0F2E4FDCB4F61642064EA +:10EDA00038680026002802D03E60EBF2D0FBC8484D +:10EDB000C8490088C54C88422BD0606B0521FDF204 +:10EDC00092E80D00F0F2CDFD03910290BA68FB6865 +:10EDD000801A99410CD3BA680298FB680399801A8B +:10EDE000BD4A99413300121A8B4101D3042D01D140 +:10EDF000206A04E0B6487D230088DB005843E9021E +:10EE00000818002200920200B448AF4B0021E7F737 +:10EE100007FB05B0F0BD10B50024002808D001287C +:10EE20000AD0022816D0032816D100F07BFA13E08E +:10EE3000FFF748FF04000FE0FEF75DF905280BD14E +:10EE4000A248012140300174EAF2A0FF9F4AD16438 +:10EE5000906401E0FFF794FF200010BD9B49C27849 +:10EE600020318A718078C8717047984800214163C9 +:10EE7000704796492031888081029448016270472A +:10EE8000FFB585B01C00002617000D00082202A85F +:10EE90000196FCF2D8EA687A297A00020843FFF763 +:10EEA000E8FF35003300894EF16EB06E59400843DB +:10EEB00004D0059800F0E9FEB566F5668348203079 +:10EEC00004904089B84211D00498478120370499B2 +:10EED000F804000C08810E99002901D1C03003E02C +:10EEE0000621FDF200E8143004990881002C05D0B9 +:10EEF0000498E17881710498A178C171734C0399E9 +:10EF0000226A02980023FCF27CE8207C41006E48D3 +:10EF100008180282207C401C0006000E8028207405 +:10EF200001D900202074207C400663D1664B103349 +:10EF300003210022100055005E5B02E040001D52DC +:10EF40003800884204DB471A7D005D5BB542F5DC82 +:10EF50004000521C802A1E52ECDB481003D049109E +:10EF60000029E6DC03E0012901D00121E1E7564B4D +:10EF7000188A60820020A082E0824100CD182A8A8F +:10EF8000618A8A4200D30A006282298AA28A914257 +:10EF900000D81100401C0006000E802822023E2FDF +:10EFA0000100000018E6010000040000B4A6AEE570 +:10EFB000A182ECD349488030018A2183E2896283AF +:10EFC0002088A083638A9B0A9B026382E38B002BC9 +:10EFD0000DD1049B1B89C018FF30F5300004000CD4 +:10EFE000FF23F5339842E08300D30300E3830D2031 +:10EFF00018F0DEFFA18B019A0E2018F0D9FFE28BEA +:10F00000618A0F2018F0D4FFA26BE16B092018F081 +:10F01000CFFFF0F2B0FC0500206A029A039B0E00BD +:10F020004008002180185941401BB14107D22C48AB +:10F030004030417C491C4174012009B0F0BDFFF70C +:10F040001EFF0020F9E72648006A70472448203058 +:10F0500080887047F8B504000026214D1F482A6AB1 +:10F06000C1680091806833000700FBF2D4EF00997B +:10F07000B81A994161602060286A2268636831008B +:10F080008018594161602060F0F275FC2268636865 +:10F09000121A8B41F0D3F8BDFEB50500104E104F8B +:10F0A0002036F0F268FC00900C480C000B00C168A0 +:10F0B000009A8068121A8B410BD3084A386AD368C9 +:10F0C000926880018018009A00215941801AA1415C +:10F0D00013D2F0F250FC014AD1600BE0703C000406 +:10F0E000703D000488060004FFFF0000900510003A +:10F0F000C3E3010090600120F071A5483A6AC1683D +:10F1000002918068002423000190FBF284EF0198B3 +:10F110000299821A9941788A0B002100801859417E +:10F1200069602860F179B079814201D90021F171DB +:10F13000F479002C04D1002801D0040000E001245F +:10F14000386A2A6860436B680021801859416960F9 +:10F150002860B479002C00D10124F0F20CFC2A685C +:10F160006B68121A8B41EBD3FEBDF3B585B0050079 +:10F1700000200190F0F2FFFB02008648864C008BD5 +:10F180000B00322802D2216A484300E08002801836 +:10F1900000215941029081480391006880498842CA +:10F1A00003D106980068400816E0052806DC2A68A6 +:10F1B00002986B680399121A8B4116D32800FFF747 +:10F1C00049FF608A2A686B6800218018594169608C +:10F1D00028600699206A0860002634000090B44236 +:10F1E00005DD70480178491C017007B0F0BD6B68FF +:10F1F0002A6802980399841A1F009941002C0492EE +:10F2000000DA644200988442EFD90698049A0068B4 +:10F210000021801879416960286001982600002843 +:10F22000DDD0E2E7F8B504000F005B485A4E20300D +:10F230008079316A484300902000FFF72DFF57483E +:10F2400000250068811E032909D80099401E484303 +:10F2500022686368290080185941616020604D4828 +:10F26000008B002803D020006946FFF77EFF706BFB +:10F2700000280CD0F16B491CF1630521FCF23CEE37 +:10F28000226863688802101AAB41636020604148BD +:10F2900080380068FF305A30388007E000982268D4 +:10F2A000636829008018594161602060F0F263FBB7 +:10F2B00022686368161A8B411900301EA941EDDBE4 +:10F2C000F8BD33480068704770B506003249314ACE +:10F2D0002031158B8C790020002D0AD0322D02D2DE +:10F2E0002806000E05E089882800FCF206EE0006DC +:10F2F000000E2A4909688A1E032A03D84C432406B3 +:10F30000240E06E0264A914202D0521C914200D1BE +:10F310000400002D02D0A04200D204003078A042A8 +:10F3200001D3001B00E00120307070BD1A48C06A94 +:10F3300070471948006B704770B51CF009FC060057 +:10F34000FF2113487131FCF224E9134801254030B4 +:10F350008574F0F210FB104CE165A065EAF220FD27 +:10F36000616620666421200020308A0281802100AD +:10F370000A6285710648E26DA16DC260816030004D +:10F380001CF0EAFBA26DE16D0B2018F011FE70BDC0 +:10F39000703C0004E0370004703D00046406000483 +:10F3A000FDFF0000A20600041423594307D1A591D4 +:10F3B0000100000014EA01000004000040C9DB5114 +:10F3C0000918FF31B131097C0120032900D2002046 +:10F3D000704770B50400007C032801D2401C2074E3 +:10F3E000FC4A00201056FC4D814200D169686268D9 +:10F3F0002260A2686260A16022686068131ADB1C48 +:10F40000062B0DD8431ADB1C062B09D88B1ADB1CE4 +:10F41000062B05D8101840180321FCF28AE90BE0EE +:10F42000884201DA030000E00B00934201DD100086 +:10F4300002E0884200DB0800E060686070BD030005 +:10F440000220032210B5411E14008C402104090C37 +:10F450008B4205D3401C0004000C0A28F3D90A2073 +:10F4600010BD30B50125446895400368AC4203DA0D +:10F470005918641C12C030BD1C0014411A1B5118CD +:10F48000016030BD0A0010B54168002909D0012390 +:10F4900093400068994202DAFCF24AE910BD10413B +:10F4A00010BD6120C04310BDF8B504001000069ADD +:10F4B000009202000F001D00200024F0B3F90600A6 +:10F4C00019D0F87E0698296807682000FF300322CB +:10F4D000ED30FFF7C6FF2000FF3003223900F53082 +:10F4E000FFF7BFFF87208000025B83208000390088 +:10F4F0002018FFF7B6FF3000F8BDF0B585B003AABD +:10F500000092040001AA02AB24F08CF9E51D01274A +:10F51000F93500216F600028697248D026000398F1 +:10F52000E036F0800298032201040914B1800198AA +:10F5300030812800EC30FFF794FF06212800715E2F +:10F540000322F430FFF78DFFA4480621025B8520DB +:10F550008000715E2018FFF784FF0398AA6EEB6E9F +:10F56000C11780185941E966A86601982A6F6B6F28 +:10F57000C1178018594169672867280060300771F2 +:10F58000018B491C01831DF08FFB002809D0944892 +:10F590000068FCF2AEE801000420E2F7D7F9002889 +:10F5A00005D02000F3F7BEFC2000F3F75FFD05B0A7 +:10F5B000F0BD70B504001ED00720085625000B26AC +:10F5C0008E57FF35C53501002800FFF702FF287C64 +:10F5D000002801D0E96801E06121C9432000FF3023 +:10F5E0000322FD30FFF73DFFE01DFF300322310015 +:10F5F000FE30FFF736FF70BD0321FF30ED3041E7ED +:10F600000321FF30F5303DE7872189008322095A25 +:10F610009200801836E771498522095A92008018B5 +:10F6200030E770B50500FFF7F6FF04002800FFF78C +:10F63000E3FF201A70BD70B50500FFF7E1FF04007D +:10F640002800FFF7D9FF201A70BD70B50500FFF73D +:10F65000DBFF04002800FFF7CFFF201A70BD10B5B4 +:10F660000400FF30C5301421FBF29CEF2000FF3076 +:10F670000021FD300A0006C00400080003C410BDCC +:10F6800001000022E031CA816122D2434A818A818D +:10F6900083218900401800210A0006C070476122BA +:10F6A0000100D243E03110B58A80CA8000220A816D +:10F6B00085218900411813000CC100F00DFB10BD1D +:10F6C00070B504001CF04EFA05002000FF30B13088 +:10F6D0001421FBF268EF200000F00AFB28001CF068 +:10F6E00045FA70BD70B505001CF03CFA0400280016 +:10F6F000FFF7E6FF2800FFF7D2FF2800FFF7C0FF63 +:10F7000020001CF033FA70BD10B50400FF30FF304C +:10F710000321801CC18381832000FFF7A0FF832089 +:10F720008000002120180A0006C0852080002018D3 +:10F7300006C0200000F0DCFA10BD0100FF31C1312D +:10F74000896B0120012900DA0020704770B50400A0 +:10F750002600FF36FD36FF3072683168813002675F +:10F76000C166311D8A68496882674167300003219C +:10F770000830FFF787FE2500E035E880852080000F +:10F78000002120180A0006C0200000F0A5FA03217D +:10F790003000FFF777FEA880E988081A288120004A +:10F7A000FFF75DFF70BDFEB5C51DF9352C000600E5 +:10F7B0002834F4F2F3FC0F0002903C216B179426DE +:10F7C0000100000010EE0100000400001313083DCA +:10F7D0002000FBF2F2EEAA690298EB693900801A68 +:10F7E000994109D2642012E092040004A4060004A6 +:10F7F0001E0200009C000004AA690298EB69801AAE +:10F80000390099417D220023D200FBF218EC2060E0 +:10F810000298EF613700FF376137A861788BE0808D +:10F82000388BA0803A8B002A0CD0E96EA86E00239A +:10F83000FBF2C6EB20813A8B696F286F0023FBF245 +:10F84000C0EB60813500FF3581352869E0602A69A9 +:10F85000002A0DD00027696828683B00FBF2B0EB56 +:10F8600020822A69E968A8683B00FBF2AAEB608263 +:10F87000686A6061A86AA061E86AE06130006A466F +:10F8800001A90BF019FB20006B461979203001709B +:10F89000197841703000FF3095300FC827002C37A1 +:10F8A0000FC7296AE869A16260623000FF30482111 +:10F8B0006930FBF282EEFEBD70B50400FF30401CE3 +:10F8C00000690D00002802D12000FFF776FF21001B +:10F8D000FF313C2229312800FBF23CEE3C2070BD78 +:10F8E00070B505000C00FFF768FF002C06D029005A +:10F8F000FF313C2229312000FBF22CEE70BDFF309D +:10F900008130826A5118816270470300FF3381336E +:10F9100010B55C6A641C5C629C6AA21800299A6239 +:10F9200003D1D86A401CD86210BD41790329FBD0AD +:10F93000FF300121401C41600021417210BD70B5B3 +:10F9400005002C000E00FF341000D117813422680E +:10F9500063688018594161602060A268E368F1170C +:10F96000B0185941E160A0602069FF35401C20615A +:10F9700001206D1C68600020687270BD0300CA1D04 +:10F980000800F93210B51168994204D100211160C4 +:10F99000F3F760FF10BDE0488168491C816010BD2D +:10F9A000DD4800787047F0B505000022FF3087B0D1 +:10F9B000613004920179002902D1418B491C4183B5 +:10F9C0000021EC1DF9340171206900281AD060690A +:10F9D000002817D0F4F2ECFB060060690690226A5A +:10F9E000636AB01A0F0099417D220023D200FBF216 +:10F9F00026EB069A0023121A8B4103D26762266215 +:10FA000020698047002002A90DF0D2FF0F216879FC +:10FA100089016E18032841D1A868C0043ED5306919 +:10FA2000FF30401C806B002838D0F4F7ABF9029906 +:10FA3000884233D120F0ACF8002803D01DF03EF905 +:10FA4000002805D13069FF302130807F002825D083 +:10FA50003069B24FFF30401C806B4743F4F2A8FB83 +:10FA60003269FF3231320CCA801A994100233A1AA6 +:10FA70008B4113D2280005F0FEFA002201210192E9 +:10FA800000910200002128000B00ECF75DFEF4F26B +:10FA90008FFB3269FF32521C51631063FFF7E7FAA4 +:10FAA00003906068002808D000206060A1684908C1 +:10FAB0004900A1609849487098E0A0682F00C107EC +:10FAC000803700290ED101210843A060F4F270FBB9 +:10FAD000F967B867A068022108438F49A060002039 +:10FAE00048707FE028000EF04BFE002872D0F4F73B +:10FAF00049F9029988426DD1F4F25AFBBA6FFB6F53 +:10FB0000801A99410399FCF20CEA0006000E824922 +:10FB100004900128487065D904A8FFF7E9FB6B46FB +:10FB2000187C2F004037022806D9F97E814203D97C +:10FB3000A06802218843A0606B461A7C00210A203D +:10FB400018F04AFA387F00280ED06B46197C88429C +:10FB50000AD8A068800707D47149012208781043A9 +:10FB600008702800F3F72CFB6B46F87E197C88425E +:10FB700038D8A068810705D50021400840006160A1 +:10FB8000A0602FE0EBF7A1FA00281AD0607A0628CF +:10FB900017D2FDF7AAFB002824D1280005F06BFA44 +:10FBA00007001EF0CFFE00212022009101000192EB +:10FBB0003A0028000023ECF7C7FD607A401C607211 +:10FBC00010E00020010060720722280064E1F84E76 +:10FBD000010000000CF2010000040000ACD62D8EE4 +:10FBE000F4F7C6F908E0FFE70398BA6FFB6F00214E +:10FBF00080185941F967B867A06801210843A060DF +:10FC00004A486B46197C01703069FF302130807F93 +:10FC1000002858D0F4F7C0F80299884253D1EFF287 +:10FC200055FF0600E979062000F0B1FB49E0B8680D +:10FC3000C00441D50F20800138180590806A442106 +:10FC4000095A002938D0826C002A30D1C26C002AAF +:10FC50002DD0374BB01A594388420FD9380005F0E0 +:10FC600014FA412201210192009102000021380082 +:10FC70000B00ECF773FD0598806AC6640598806AEE +:10FC8000C16CB14202D9711A491E00E0711AC28FCB +:10FC9000274B5A438A420FD20021403081802648A8 +:10FCA00019223B180321280017F0FFFB04E0002174 +:10FCB00081640598806AC664EA790621380001F0FB +:10FCC0005DFE0700B3D1002200921C48039A230076 +:10FCD0002900E6F7CDFB07B0F0BD10B504000079B0 +:10FCE00001280CD0E01DF9300068EAF258FC200031 +:10FCF0001821F830FBF26AEC2000FFF75EFE10BD21 +:10FD00000D4900B50B390A5AE623195E85239B007D +:10FD1000C018FFF7BAFB00BD0100FF310022ED3132 +:10FD200013000CC10800110006C07047A4060004AF +:10FD300040420F008818000429020000BDEF0100B6 +:10FD40007CB5140005000E0000230DF0FCF96B4695 +:10FD5000062231006846DC80FBF29CEB082228007A +:10FD60006946F4F705F97CBD7CB51C00050000234D +:10FD70000DF0E9F900210A00684606C06B4607222B +:10FD800028006946DC80F4F7F3F87CBD70B5050007 +:10FD90000E000024F7F249FF002802D004002034AE +:10FDA00014E017480078002810D000223100280005 +:10FDB000F7F292FF31002800F7F237FF03002033FB +:10FDC0000F4A1C0031002800F7F2CCFF200070BD64 +:10FDD000A5210C48890010B5FBF222EC084840210F +:10FDE000FBF21EEC08490020087010BDA521054853 +:10FDF000890010B5FBF214EC03490020087010BD17 +:10FE000074400004E03D0004B0F900044E4810B511 +:10FE1000E8F2C2FC4D49086000200A1D8300D35857 +:10FE20000C68401CE31A0006000E04280B60F5D392 +:10FE30000868002800DAFEE710BD914210B500D92D +:10FE40001100424B800014331A501A00103A11501E +:10FE50003D488068002801D0FFF7D8FF012010BD81 +:10FE60003B498000085870473849800014310858D1 +:10FE700070473749C07B1031085C7047F0B59C462D +:10FE80000600324B9646324AB600143397599B59B6 +:10FE90000024012025009F4212D28B00D1581A0065 +:10FEA0002A4B00201B1D9A58914200D901249959D0 +:10FEB0008F4205D3254901250968214300D101203E +:10FEC0007146002900D00C606146002900D00D6009 +:10FED000F0BDFEB5050000200E00019000901A490B +:10FEE0002869884201D00120FEBD1948E97B103005 +:10FEF000475CB74201D10020FEBD1BF047FE0290D7 +:10FF00003900300001AA6B46FFF7B8FF040016D194 +:10FF10000F4AB8001158002900D1FEE7491E1150C0 +:10FF200000990198411A09480368C91801600848F6 +:10FF3000E97B10304654B0001158491C115002980A +:10FF40001BF028FE2000FEBD74190004E01A000416 +:10FF500050DC000470B50024CE4D04E04019406828 +:10FF6000E0F731FE641CE00029580029F6D170BD8D +:10FF7000C94811214901816081680122120511439C +:10FF80008160704770B50024C24D04E0401940689C +:10FF9000E0F725FE641CE00029580029F6D170BD69 +:10FFA000FEB5BE4D6869302630436861BC48416A81 +:10FFB00002221143416209F056FA0190B948002427 +:10FFC0000470B748C038C168C20D9143C160B64FD4 +:10FFD0003878C00701D1F0F734FD02A8E28C1C98F4 +:10FFE0000100000008F6010000040000FF0CFEE222 +:10FFF000F3F784FDEFF780F8F3F744FE0090F3F792 +:020000022000DC +:1000000073FD009B002202A9F3F742FE04F0F1FE0B +:10001000F0F2F2FCF0F77CFF019809F047FA06F0E5 +:10002000E0FEEDF746F9ECF7C4FAA5480470A548E0 +:100030000470F1F786FDA4480460E9F774FAE9F763 +:10004000E7FF002806D0E9F77FFB002802D0012057 +:10005000EFF7C6FFE3F71FFB002803D09B4884613E +:10006000E3F733FB3878C00701D1F0F7E3FE6869A6 +:10007000B04368618F49486A022290434862FEBDDE +:1000800070B50400EFF2C1FBF0F29FF81420E5F721 +:1000900099FB002C01D1F2F773F81BF081FD0500EC +:1000A000F1F797F9F2F7AEF8F0F281F8002C01D1F0 +:1000B000EFF2A5FBF0F283F828001BF075FD70BD90 +:1000C000794810B53038C26A521CC26241681220A9 +:1000D00017F096FF1BF064FD0400FFF76BFF200094 +:1000E0001BF062FD07F01AFE10BD042010B5E9F206 +:1000F0000DFA012010BD70B50220FDF732F8F0F7BF +:100100002DFC0020E3F767FAFCF7A1FC0024012690 +:10011000002819D01FF053FD002815D01CF0E2FD77 +:10012000002803D1FCF79DFC00280DD01FF04FFDE7 +:10013000002809D11CF0D6FD5B493039002800D0D9 +:10014000CC61634804804E6209F0D9FF6148002207 +:1001500000681921E9F21BFE1CF0C4FD00280CD038 +:100160005D4D2E72E1F7FEFB5C480188002902D04C +:1001700004802C7201E0E1F700FC594859490068FD +:1001800088420BD1FCF75EFC002800D0022020F052 +:100190001DFB0121090323F09AE908E0FCF752FC5A +:1001A000002801D0042000E00320FCF72FFD00F020 +:1001B00070F870BDF8B5002020F008FB002802D0D0 +:1001C0000120FEF75AFEFCF747FC0024002805D06A +:1001D0001FF0F5FC002801D043488464F0F7BEFB13 +:1001E0000020E3F7F8F9002020F0F0FA002802D010 +:1001F0000220FEF742FEFCF72AFC2B4D3B4E303D21 +:10020000002833D01FF0DBFC00282FD01CF06AFD43 +:10021000002803D1FCF725FC002827D01FF0D7FCCD +:10022000002823D1686A2A4F002811D120F0CEFA85 +:10023000F2F73AFD00280BD1EAF7A7FF002807D113 +:100240002448002200681B21E9F2A1FD002802D009 +:10025000EC613C8015E030880124002800D03C800F +:100260001CF040FD002811D0EC610FE01FF0AFFC46 +:10027000002806D0686A002803D06C623088002805 +:1002800001D0032000E00420FCF7C0FC00F001F8DE +:10029000F8BD10B5F0F756FB15480722006801219C +:1002A0001CF091FD10BD0000280700040030008004 +:1002B000C0A20080C0A8008088020004C4E8000436 +:1002C000510200045202000460020004C042040013 +:1002D000A006000400000004D42C000490060004D2 +:1002E00064060004FFFF0000401903C05C3C0004EA +:1002F000C0BE01C070B504000E0000251BF050FC0C +:10030000F949496804E0A14201D10C680DE009688F +:100310000029F8D10DE0A168490505D5072E02D0C6 +:100320002179B14200D125002468002C01D0002D94 +:10033000F1D01BF039FC280070BDF8B5002507008E +:100340001BF02EFC0090380020F000FA0400092673 +:10035000B6010FE0200020F0E9F9002805D080194F +:10036000806B002801D0012506E039002000FFF74E +:10037000C1FF0400002CEDD100981BF015FC2800F3 +:10038000F8BDDA4880687047D8498868401C8860A2 +:100390007047D6498868401E88607047D348C06857 +:1003A000704770B505000E001BF0FAFBCE494C6893 +:1003B0000AE02179A94206D1E179B14203D11BF0CB +:1003C000F3FB200070BD2468002CF2D11BF0ECFB85 +:1003D000002070BD70B504000500C034A068002680 +:1003E00000282ED1206900282BD1C148DA329B93F6 +:1003F0000100000004FA0100000400000B638B56AA +:1004000000226421FBF2E2FD0028206107D01C21BC +:100410000181206901003031E16001218173287977 +:10042000032809D1E879012806D100210320FFF72C +:10043000C2FFC030806804E0B34800226421FBF2B0 +:10044000C5FD0028A06006D04561A068002802D044 +:100450002069002800D10126300070BD70B505006C +:100460002C00C03421690120002914D0A268002A80 +:1004700011D000268E732069FBF27EFD2661E660B6 +:100480002879032802D1E879012802D0A068FBF27C +:1004900073FD0020A66070BDFEB50500002002902F +:1004A0001BF088FB002D019004D0C020405D0400AB +:1004B000FF2800D1FEE72979914F012929D0A921F0 +:1004C0004A5D0F218901009213006918897A002280 +:1004D000F1F731FDB868A04216D012E0A000C019B3 +:1004E00085694561502262438848C03516182C70D2 +:1004F000696850223000FBF24CE8641C2406240E8C +:100500006E60B868A042E9D8B868002801D1F1F758 +:1005100001FD01213878A1408843A10038700020F6 +:10052000C919486101981BF049FB0298FEBD020001 +:1005300010B511790020012905D0022903D0032923 +:1005400001D0042902D1100002F09BF910BD10B5B2 +:1005500004000079012805D0022803D0032801D027 +:10056000042807D12000FFF797FF0020C034606007 +:10057000FF202070002010BD030010B501D1012024 +:1005800010BD180020F003F904009868400507D555 +:100590006068002804D0FBF2EFFC0020606020605F +:1005A000002010BD70B5040080680025400523D5EB +:1005B0002079032801D0042803D12000FFF74EFF43 +:1005C0000500F12080002118801D241822780120C8 +:1005D000FF2A0ED000200300F1F72CFC002808D1E0 +:1005E000474B267801225968B24091435960FF2158 +:1005F0002170012800D10125280070BD70B50500CB +:100600008068400517D5280020F0C1F80400406834 +:10061000002820D100223E481100FBF2D7FC002820 +:1006200001D1012070BD6060018908182060280098 +:1006300018F0B3FB0FE0E979A87920F0B8F80400CE +:10064000280020F0A4F80300200020F0A0F8416862 +:10065000596000681860002070BD70B505008068A2 +:100660000024400511D5280002F07AF90400287909 +:10067000032801D0042806D12800FFF7B5FE012881 +:1006800001D101240AE0002C08D12879022801D0E8 +:10069000032803D12800FFF7B1FF0400200070BD3C +:1006A00070B504004E213A30FAF2CEEF0025A820B2 +:1006B0000555200020218830FAF29CEF2000062109 +:1006C000AC30FAF298EFA068012109038843A060DA +:1006D0001120400120180572FE2134200155200010 +:1006E0000AF01FFB70BD01000020002905D00A7927 +:1006F000012A02D17D20C00008187047041B0004A5 +:1007000084DC0004981A0004841A00043CF602C039 +:10071000C01A000470B50400FFF7E5FF050067206C +:10072000C0002018F8F23EFD20000AF0A0FBFF48B0 +:1007300006212018FAF288EF0020687570BD3B2270 +:1007400010B5125CD2070ED0EF2292008418002957 +:100750000AD00079012806D10FF04FF901220100DB +:100760002000F3F730FA10BD0122FF21F8E710B5A1 +:1007700004000021FFF7E3FF2000FFF7CBFF20007C +:10078000FFF78EFF10BD70B504000D0016001BF0C2 +:1007900011FAE749496804E0A14201D10C680EE072 +:1007A00009680029F8D10CE0A179A94206D1E179C4 +:1007B000B14203D11BF002FA200070BD2468002C66 +:1007C000F2D11BF0FBF9002070BD002802D00179A6 +:1007D000032901D0002090E70F2189014018C06A49 +:1007E0008BE770B504001FF0D2FF20001FF0A8FFB8 +:1007F0000500A068400503D5092080013772BB05BC +:100800000100000000FE01000004000058B9583A41 +:1008100028180463CC48E062CC482063A87F2034C9 +:100820002075E86F002818D1E6F702F90028E8677C +:1008300000D1FEE70400083454212000FAF2E4EE6F +:100840000321A171E07901090901E1710421482026 +:100850000155A07A41084900A17270BDF8B50400A5 +:1008600011D0B84D2878032802D12869A0420AD0B7 +:10087000FCF7FCF8002808D028691121490140182C +:10088000007A072801D10120F8BD23790326022729 +:10089000FBF23AE8060418242B102110032022F062 +:1008A00016EE3CE0002E02D0B068C00402D4012055 +:1008B000EC6028702878012802D1E868FCF71EF85F +:1008C0000020F8BD1FF08FF9002802D022F036EE8C +:1008D00001E0FCF7C5FDEC602F70EBE72000F8F7B6 +:1008E00009FA2100F9F720FB11E06079022811D103 +:1008F0002000F8F7FFF92100F9F716FB1FF073F954 +:10090000002802D022F01AEE01E0FCF7A9FD2C61CC +:100910002E70CFE70328CDD100201FF02BFF06005B +:10092000FCF7A9F80028C2D0BCE770B5040002208B +:10093000607120001FF035FF060020001FF00AFF45 +:100940000500002E03D0307B002030737073A06848 +:10095000400511D50920800128180463A0684005CE +:100960000AD57B488068002806D1FCF784F8002867 +:1009700002D12000FFF772FF7348E06273482063E2 +:10098000A87F20342075E86F002818D1E6F750F8CA +:100990000028E86700D1FEE7040008345421200055 +:1009A000FAF232EE0321A171E07901090901E17146 +:1009B000042148200155A07A41084900A17270BD68 +:1009C00010B504001BF000F90F21890161180969B5 +:1009D0000122CA73617902290FD15D4BD968491C84 +:1009E000D9605C4BC03421789C6AA14205D15C6B14 +:1009F0008A409443D90D0C435C631BF0E9F810BDA9 +:100A000010B504001BF0E0F80F229201A218126941 +:100A10000021D1736179022903D14D49CA68521E60 +:100A2000CA601BF0D5F810BD0021002809D002795A +:100A3000002A02D1FF21890002E0032A01D14649A0 +:100A40004118080063E6002100280AD00279002A34 +:100A500002D17D21C90003E0032A02D19121C900FE +:100A60004118080053E6002800B50BD0017903298E +:100A700008D1FFF7B4FE00214722C9435201801874 +:100A8000C175017600BD70B505002AD0287903280C +:100A900027D12800FFF7D7FF040022D02800AD623D +:100AA0000DF0B3FC2800FFF7D9FE2C48E8622C4873 +:100AB00028630F20800128180169443121602949E9 +:100AC00061602949E16000698F2168302064403409 +:100AD000207980088000801C084020712800F2F7EF +:100AE000BFFB70BD70B50500FFF7ADFF040026D059 +:100AF000032068712800AD62FFF7B0FE1748E86276 +:100B0000174828630F2080012E1830698F21443048 +:100B10002060144860601448E060306968302064E8 +:100B20004034207980088000801C08402071280013 +:100B3000F2F796FB30690021FF302130817770BDDC +:100B400029020000041B00048BBD020051BD0200FD +:100B500084DC0004C0A200809C04000035BA0200BE +:100B60000FBD020011B801C074FC02C010B5040032 +:100B700004206071A068400502D52000FFF76EFEDA +:100B80000F208001F74920188162C16A01221143B8 +:100B900002229143C1622000F2F762FB1F21002074 +:100BA00049016118487710BD042141710021C162DB +:100BB0000163ED49A0300968CA8842824A8982826D +:100BC0000A7A8275497AC175A1E510B5040006F06C +:100BD000FBF9002804D12000E8F77FFA002800D0B4 +:100BE000012010BD10B5FFF7F0FF002801D1012052 +:100BF00010BD002010BDF8B50025DC4EB0680028FF +:100C00001ED01AF0E1FFB468070014E0B4464B3977 +:100C100001000000FC01020000040000F21194C178 +:100C20002000FFF7E9FF00280DD0B068844202D110 +:100C30000068B06001E020682860200024681C384B +:100C4000FBF2AEF901E025002468002CE8D1380061 +:100C50001AF0C8FFF8BDCB4A002138B50800117062 +:100C6000516011618300401C9B180006000E032890 +:100C70005961F7D3C44CC64922680092C34AC5489B +:100C8000C54BE7F24FFD002800D0FEE72268009236 +:100C9000C24AC349C348C44BE7F244FD002804D00C +:100CA000C248DFF721FFE5F7C1FA22680092C04A87 +:100CB000C049C148C14BE7F235FD002805D0BB480B +:100CC000401CDFF711FFE5F7B1FA17F0FBFD2268D2 +:100CD0000092BB4ABB49BC48BC4BE7F223FD00284D +:100CE00005D0B248801CDFF7FFFEE5F79FFAB9494F +:100CF000B74848600800E5F7B5FB002038BD70B57F +:100D00000500B5480024281817F0BAFD002800D1C6 +:100D10000124280000E0641CC2798179FFF747FDB7 +:100D20000028F8D1200014E7FFB583B00D0000279C +:100D3000059928001FF04FFD0028009000D10127E1 +:100D40000398052814D10098FFF7D9FF092815D278 +:100D5000002290481100FBF24DF9060011D100224B +:100D60009E48110003231FF004F8060009D105E096 +:100D7000002288481100FBF23DF9F6E7002007B099 +:100D8000F0BD30892721841949012000FAF246EC90 +:100D900003992171A5710599E1710E99E160A1682E +:100DA000012080028143F8070F22400D9201014388 +:100DB000A5181F22A16000215201A0186961042119 +:100DC000017161212000C943E03001824182072185 +:100DD000C9016018FF220290C263039805287ED0E3 +:100DE000002F7DD02869002809D1200017F086FD4A +:100DF0002861F1F788FE2869002800D1FEE72969FB +:100E00000D98087329690F20800208612869012163 +:100E10002030417228690027C76228690D2201002D +:100E200092017431A2189163ECF79CFF286906F0D7 +:100E30008BFB28690622FF30401C07602869FF30C1 +:100E4000401C47604D480168F12080002018FAF2EC +:100E5000B4EBFF20C0210855A8722000FFF711FC59 +:100E6000012877D00C98002805D05B480C99062201 +:100E70002018FAF238EB0298002707804B4911201E +:100E800040011B392018018041800F21878081712A +:100E90000772FE2134200155A168312000038143EF +:100EA0000D2080012018C761476187614762076292 +:100EB0008762C7620120C00381432000A1604E21E8 +:100EC0003A30FAF2D6EB2000AC3006210190FAF26B +:100ED000A6EB200020218830FAF2A0EB01E017E019 +:100EE00032E02000A0300772477247810698002840 +:100EF00004D0069901980622FAF2F4EAA068C0210B +:100F00008843A0602000FEF73BFC2000FDF7BEF9FF +:100F10001A48002701682000CA88A03042824A8906 +:100F200082820A7A8275497AC17564214181477249 +:100F3000112040012018C771039BFAF2F0EC070C56 +:100F40006C18516F6F146F000099F1200622800019 +:100F500009187BE747E02000A4620DF060FA20004A +:100F6000FFF7CAFD5AE02000FFF728FE56E02000F8 +:100F7000FFF7E5FC52E00000B0580004BC0000049C +:100F8000041B000484DC00046807000480DB000408 +:100F9000681A00045C1A000478780004DCDB0004A2 +:100FA000901A0004841A0004A0AF02C01A000100C5 +:100FB000E8DB0004A41A0004981A000400BC02C074 +:100FC00040DC0004CC1A0004C01A0004201B0004FA +:100FD000E701020028BB01C02902000074190004C7 +:100FE0000598022803D33000FAF2DAFFC6E6FF497B +:100FF00005984143FE480818E8622000FFF73DFDD0 +:101000002000FFF74AFD2000FFF7FFFBF948E062F0 +:10101000F948206302E02000FFF7B2FDA3934FC020 +:1010200001000000F805020000040000A1CB47AD5C +:101030002869002825D0A068400522D50D20800110 +:101040002018806B8C21FAF2F4EA2869FD226030C6 +:10105000478228696030017C490849000174286989 +:1010600011406030017428697821FF302130C77742 +:101070002869FF30401C816228691E21FF30401C16 +:1010800081631AF0B5FDE24A5168002906D000E0FC +:1010900011000A68002AFBD10C6000E054601AF0CD +:1010A000ABFD200075E670B5040000791600002540 +:1010B000032801D0217100E00D00002B05D0D54898 +:1010C000062219002018FAF218EA0720C0010021B0 +:1010D0002018018011204001CF4A20180280428050 +:1010E0000F22818082710172FE2134200155A06897 +:1010F000012109038843A06020004E213A30FAF212 +:10110000C2EA002E05D0200006223100AC30FAF2EF +:10111000F4E92000FEF73EFB2000FDF7C1F820793E +:10112000002827D0012829D0032830D1002D29D12B +:101130000F2080012018016909200A00C0014432F3 +:1011400020188260B54AC260B54A4261132080010E +:10115000683120188160017B8F2289088900891CF1 +:1011600011400173A848E062A84820632000F2F70C +:101170008BF80CE02000FFF7C9FC08E02000FFF727 +:1011800009FD04E0022D02D12000FFF748FBA06812 +:10119000400508D50D2080012018806B002802D062 +:1011A0008C21FAF246EA0020DDE43EB500230C0073 +:1011B000CA680021009102920191E279A179207917 +:1011C000FFF7BCFD05002100202288318830FAF2AB +:1011D000FEE92100A03128000A7AA03002724A7A82 +:1011E000427249894181617969711F214901601801 +:1011F000027A681802728B49E9628B4928002963D8 +:101200003EBD3EB500230C00CA6800210091029249 +:101210000191E279A1792079FFF790FD0500210085 +:10122000202288318830FAF2D2E96179697121008F +:10123000A03128000A7AA03002724A7A42724989A3 +:1012400041811F2149016018027968180271280044 +:101250003EBDFEB500230D000600CA6800210091C6 +:1012600002920191EA79A9790520FFF767FD040050 +:101270007ED06879607128792071200010300CF0E0 +:1012800071FA6069A46224302061290020004E2296 +:101290003A313A30FAF230E9290020000622AC3126 +:1012A000AC30FAF294E929002000202288318830FD +:1012B000FAF28CE92800A0302100027AA0310A72EB +:1012C000427A4A7242894A81428A4A82828A8A8260 +:1012D000827D8A75C07DC8754E480622310020186F +:1012E000FAF20AE9F1208000291806222018FAF201 +:1012F0006EE9FF264720761CC00031002018FAF264 +:1013000098E9E86AE062290020318F7D20002030D2 +:10131000827DFF06EF23FF0F1A403F013A4382759B +:10132000427DF7273A404F7D3F07FF0FFF003A43CA +:1013300042751A404B7DDB06DB0F1B011A434275D9 +:101340002A00C032976813002200C03297601B69E0 +:101350001361097D0175A06840218843A968490689 +:10136000C90F890108437101A0608843A96800E0A2 +:1013700063E08904C90F49030843B101A0608843B1 +:10138000A9684904C90F890308438021A0608843E4 +:10139000A9680906C90FC9010843A060A968B0433C +:1013A000C905C90F090208437100A0608843A968F4 +:1013B0008905C90F490208431D2149016A18A06027 +:1013C000127E61180A7604218843A9684907C90F6B +:1013D000890008430F218901A06060186918C26A5A +:1013E000C96A5208C9075200C90F0A43C262A868F5 +:1013F000400722D40D21890168184269611815E05F +:1014000038090000605C000435BA02000FBD02001C +:10141000041B000429020000FFFF000011B801C0F6 +:1014200074FC02C08BBD020051BD0200E2020DE35C +:1014300001000000F40902000004000055A4321964 +:101440004A6182698A61C269CA61406A4862200051 +:10145000FEBDF8B50400F84821182000ECF738FC70 +:101460000F20800126183069FF302130817F491E0E +:101470000906090E81770CD1E1790020FEF7C3FF40 +:101480001FF09CFA002804D100221100200003F074 +:1014900049FD0D2080012518686A0027002802D028 +:1014A000E5F7FCFA6F62EF61A06804218843A06051 +:1014B0000021200006F07DFF2000AF62FFF752F907 +:1014C0002000FFF715F9B06A16F0B3FAF8BDF3B5CE +:1014D00083B00D000F27BF01CE193069CA68017BA8 +:1014E00000206B4607C32B00EA79A979AC330620AC +:1014F000FFF72EFC040031D0200035300178102297 +:101500001143CA064908D20F490011430170CA4865 +:10151000039906222018F9F2FAEF3069E1190861FF +:101520000D2080012918CA692018C261A268012310 +:101530001B039A4302231A43A260CB69C361896AE1 +:101540008162112149010020611808720420824340 +:10155000A8684007C00F80000243A260200005B0C9 +:10156000F0BD10B50C00097902000020012910D04F +:10157000022909D003291FD1617902291CD1210038 +:101580001000FFF71CFE08E021001000FFF743FEEB +:1015900003E021001000FFF766FE00280CD00F22A8 +:1015A0009201A118096982180029116104D00D2245 +:1015B000743192018218916310BDF8B505000024C2 +:1015C0001AF020FB0700002D01D10020F8BD0D26E8 +:1015D0002B79B601FAF2B6E90711150805191911A8 +:1015E00019006879022808D128001FF0D1F8801965 +:1015F0000079012809D1012407E0A868C004FAD4C1 +:1016000003E028000FF032F8040038001AF0FEFA68 +:101610002000F8BDF8B50D00070016001AF0F2FA28 +:10162000009028001FF0C4F814E0BC420ED0072D33 +:1016300002D02079A84209D1042E02D06079B042AC +:1016400004D12000FFF7B9FF002805D129002000B0 +:10165000FEF782FE0400E8D100981AF0D7FA2000C5 +:10166000F8BD0A0001000020D4E7F8B5050002210A +:101670000320FFF7F6FF070002210800FFF7F1FF44 +:101680000600A84200D10026AF4200D100272879E9 +:1016900001242403002819D0022801D0032823D1D3 +:1016A000FBF702FA002803D1FBF703FA00281BD04E +:1016B0003000384324D002201FF0BAF8A84213D1DA +:1016C0003C002BD13400002C28D10DE0A868032168 +:1016D000A043A8600800FFF7C4FF040004D0002066 +:1016E0001FF0A6F8A04219D154480178032927D148 +:1016F000002E25D1002F23D1002101700800F8BD54 +:10170000A8680321A043A8600800FFF7AAFF04000F +:1017100004D10321FFF7A5FF0400D4E7AC420FD0AA +:101720002000FFF7B9F8454C2078012808D144483B +:101730000088C00604D521F020EFE068FBF7B8FE72 +:10174000FBF7B2F9002800D002201FF071F8F8BDB5 +:10175000F8B504000F22A168920101204905002676 +:10176000A518002903DA200001F051F921E02379BE +:10177000FAF2E8E8071F05090D151F111F002000E8 +:10178000FFF71DF817E02000FEF71EFF13E0607959 +:101790000228F8D00FE02000FFF75BFE0BE068693D +:1017A000067020006E6109F0E4FA2000E0F7CFFD3A +:1017B00001E000283ED02000FFF757FF1AF022FA80 +:1017C0000700002C04D11F48DFF7A2F9E4F742FD1F +:1017D000A068400504D52869002801D017F0B9F8A1 +:1017E0000D20800120182E618663144E7568A54275 +:1017F00002D12868706017E0002D0FD11148401CFD +:10180000DFF786F9E4F726FD08E0002805D10D484A +:10181000801CDFF77DF9E4F71DFD2D682868A042E4 +:10182000F3D1286800682860B06820603800B46090 +:101830001AF0ECF9F8BD0000290200004F91D7180A +:1018400001000000F00D020000040000067EE175BA +:10185000041B00045C3C00041D00010010B51AF0DC +:10186000DBF9FF49496808E03522525C120703D5CD +:101870001AF0D6F9012010BD09680029F4D11AF038 +:10188000CFF9002010BD10B51AF0C6F9F449496827 +:1018900007E08A68520703D51AF0C2F9012010BD8B +:1018A00009680029F5D11AF0BBF9002010BD10B568 +:1018B0001AF0B2F9EA49496807E08A68D20603D506 +:1018C0001AF0AEF9012010BD09680029F5D11AF00F +:1018D000A7F9002010BD10B51AF09EF9E0491122B9 +:1018E000496852010BE08B181B7A002B06D08B68DD +:1018F000DB0503D51AF094F9012010BD0968002911 +:10190000F1D11AF08DF9002010BDF8B505000026C0 +:101910001AF082F90090D248112744687F011AE03A +:10192000A068800516D5E019007A002812D0002D95 +:1019300006D0607902280BD0207901280AD107E06F +:101940002079002804D0200021F07CEE002801D06E +:10195000012602E02468002CE2D100981AF060F918 +:10196000300071E710B51AF057F9BD490D234968E9 +:101970009B0119E00A79012A15D18A68520712D40D +:10198000CA18D269002A0ED00832D4792407240F4D +:10199000022C08D1002A06D0927AD20703D01AF07E +:1019A0003FF9012010BD09680029E3D11AF038F988 +:1019B000002010BD10B5FFF751FF00280BD1FFF735 +:1019C00062FF002807D1FFF772FF002803D1FFF75D +:1019D000C9FF002801D0012400E00024A149A24849 +:1019E000ECF26AF8002C07D0002802D0E4F7E1F905 +:1019F00010BDE4F7D2F910BD002802D0E4F7D3F906 +:101A000010BDE4F7C4F910BD70B504000D00160058 +:101A10001AF002F99249496804E0A14201D10C6828 +:101A20000EE009680029F8D10CE02179A94206D11D +:101A3000E179B14203D11AF0F3F8200070BD2468B7 +:101A4000002CF2D11AF0ECF8002070BD70B5050042 +:101A500000241AF0E1F80300002D01D1002070BD30 +:101A60000F20297980012A18002914D0012912D0C9 +:101A7000022904D0032909D1687902280BD1280052 +:101A80001EF0B7FE007A800700D1012418001AF07A +:101A9000C7F8200070BD1069407BF4E770B51AF0FC +:101AA000BBF805006E4844680FE02000FFF78FFD8B +:101AB000002809D02000FFF7C9FF002804D0280023 +:101AC0001AF0AEF8200070BD2468002CEDD128007B +:101AD0001AF0A6F8002070BD10B51AF09DF8604904 +:101AE00011224968520108E08B181B7A002B03D0A1 +:101AF0001AF096F8002010BD09680029F4D11AF0F8 +:101B00008FF8012010BD10B504001AF085F8544973 +:101B10004968002907D102E00968002903D11AF0B9 +:101B20007FF8002010BD0A79A242F5D11AF078F8AA +:101B3000012010BD0622AC3010B519F098FC002829 +:101B400001D1012010BD002010BD203010B5817DD5 +:101B50004023CA074549002A0A6801D01A4300E019 +:101B60009A430A60C17D424B8A07D20F1A60CB07A5 +:101B700040490822002B08D08B6B13438B63C07D38 +:101B80008007C00FEFF725FB10BD886B904388637B +:101B900010BD70B51EF01CFF002825D102201EF0DC +:101BA00011FE040011256D010EE020001EF0FAFD6B +:101BB0006119097A002902D0406A002814D1022153 +:101BC0002000FEF7D3FB0400002CEED1022021F010 +:101BD000A6EC0FE020001EF0E5FD6119097A00294E +:101BE00004D0406A002801D0012070BD02212000ED +:101BF00021F02CED0400EDD170BD1F480068704746 +:101C0000F8B5012507000C001AF006F806003B00A5 +:101C1000F9F2A2EE0B1E1644073E3E3E1E1E1E1E8D +:101C20003E00032021F07AEC002803D11EF0CAFD0B +:101C3000002835D08168C90432D5104944182FE0F6 +:101C4000002C05D11EF013FE002801D0D2F3ECB613 +:101C500001000000EC11020000040000B9BBC4C682 +:101C60000400AC3404210720FFF70FFD002800D04A +:101C700000250FE0041B000474CB000414CB000407 +:101C800000A300802CB801C000B00080BC0000049C +:101C90002902000004210120FFF7F7FC002807D0EB +:101CA00000250CE0F848DEF747FFE4F7E7FA01E02B +:101CB000012D04D12000F2F261F9F1F7ABFE300002 +:101CC00019F0B8FF2800C9E570B50400012519F026 +:101CD000ADFF0600002C05D0012C03D0032C01D051 +:101CE000042C07D104210720FFF7CFFC002807D0E0 +:101CF000002507E0E448401CDEF71EFFE4F7BEFACB +:101D0000EDF2E1FD300019F095FF280070BDF8B547 +:101D100005000E00012419F089FF07002B00F9F2DD +:101D200026EE11120A19190A0A0A0A0A0A121212CE +:101D300012120A0A120002210720FFF7A6FC00284F +:101D40000AD000240BE0D048801CDEF7F5FEE4F753 +:101D500095FA01E0012C02D13000EDF262FF38006B +:101D600019F068FF200079E5F8B505000E000124A0 +:101D700019F05CFF07002B00F9F2F8ED07100510D1 +:101D8000091005051000022102E000240BE00321E8 +:101D90000720FFF77AFC0028F7D101E0012C02D1DF +:101DA0003000EDF261FF380019F044FF200055E5E6 +:101DB000F0B50500012085B00C00049019F036FF45 +:101DC0000027002D039025D0012D52D0022D10D0D8 +:101DD000032D4ED100201EF0FFFC002849D0806862 +:101DE000C00446D5F2F23EFA61602060EDF231FEA9 +:101DF0003DE0032021F09CEB002803D11EF0ECFC19 +:101E0000002836D08068C00433D5F2F22BFA616026 +:101E100020602EE09D488068002802D000200490B9 +:101E20002AE0E668A569A0680290EDF26AFE0191D9 +:101E3000009002983100794008430DD0029A390091 +:101E4000A818009A019B7141801A994104D36846F1 +:101E500007C8801AB1410CD202982A003B00310019 +:101E6000F9F246E9401C79412A00F9F27CEDE16083 +:101E7000A0602000EDF287FE039819F0DBFE0498C5 +:101E800005B0F0BD82490978884201D10120704730 +:101E90000020704710B504004720C000201814F03F +:101EA000CCFF200009F0ADF810BD01238268DB02F1 +:101EB000C9079A43090D0A438260704710B54379F8 +:101EC000032B07D1002A02D01EF0C3FE10BD1EF066 +:101ED000B0FE10BD490009180720C0010918088A82 +:101EE000012AF6D1421C1205120D0A8210BD10B54E +:101EF00004008068400503D42000FFF73DFC10BDBE +:101F0000002903D02000FEF76EFC10BD0121200047 +:101F1000FEF751FC2000FEF739FC10BD70B506003D +:101F200019F084FE05005A48406807E0017904680A +:101F3000012902D13100FFF7DAFF20000028F5D196 +:101F4000280019F077FE70BDFEB500210A00684632 +:101F500006C04F484468EDF209FE05000F26B601A1 +:101F600024E02079012820D14A48062220180700C1 +:101F7000694619F086FA002817D020000CF05AFCA8 +:101F8000002801D1A0198563A019816B2800F2F205 +:101F900050FE4149884208D33A0021212000F0F741 +:101FA00025FC00212000FFF7A2FF2468002CD8D1D7 +:101FB000FEBD10B519F03AFE35494968002905D033 +:101FC0001122520106E00968002903D119F032FEFE +:101FD000012010BD8B181B7A002BF4D019F02AFEBB +:101FE000002010BD70B50400002519F01FFE06008A +:101FF00020001EF0F1FB03000DE01879A04209D18A +:1020000018001EF000FC002804D0C069002801D090 +:10201000012502E01B68002BEFD1300019F00AFE09 +:10202000280070BD70B504001500002904D0200000 +:102030000622AC30F9F27EEA002D05D015480622C2 +:1020400029002018F9F276EA70BDF8B513A1002630 +:1020500009680228009115D100256F4647A2359ED8 +:1020600001000000E815020000040000EA6117AA60 +:10207000785D1EF0BBFB0AE06079022803D12000E6 +:10208000FEF76FFE861921792000FEF783F9040020 +:10209000F2D16D1C022DEBD3300076E4200001005C +:1020A00084DC0004041B000429020000808D5B0016 +:1020B0000203000010B504001EF088FB21790129FD +:1020C00002D1A16849070BD56179022906D1002800 +:1020D00006D0FF3061300079002801D0012010BD0A +:1020E000002010BD10B5FF2419F0AAFDFF490723F9 +:1020F0004968DB0105E0CA18D26BA24200DA14007D +:1021000009680029F7D119F09FFD200010BD0100DA +:1021100001200622030010B5EFF7D2FE002804D1FB +:10212000F34940234A681A434A6010BD0100062261 +:102130000020012310B5EFF7C3FE002804D1EC4ABC +:10214000402351689943516010BD70B519F078FD76 +:10215000E6494968002903D119F076FD002070BDD9 +:102160000022140001260D79072D06D23300AB4062 +:102170001D00154201D1641C1A4309680029F2D1DF +:1021800019F062FD200070BDF8B50025070016F0BB +:10219000A9FB002801D000209FE519F051FD0600A1 +:1021A000D24844680CE0A068400508D5200006220B +:1021B0003900AC3019F06FF9002800D125002468EF +:1021C000002C01D0002DEED0300019F03DFD28008C +:1021D00083E5C7498000401840697047F0B500208A +:1021E00085B0C34E05003061A80080194069002801 +:1021F0000BD0A0304089346904E02100F9F2F4EEFC +:1022000020000C00002CF8D130616D1C2D062D0E25 +:10221000032DE9D330690290B168F9F2E6EE0024AB +:102220000190B349A00040184569002D40D0280016 +:10223000A0300600039040890299F9F2D6EE30767C +:10224000002070762E00C0363178019A51437268B2 +:10225000890211617168802248617068C1781143F8 +:10226000C170A448006A002816D0280000F063FC62 +:1022700007000100280000F098FC022F0CD0152266 +:1022800052017A439B4BC000D21810187168052286 +:10229000D2010969801881610398427A0F20800178 +:1022A00000922818817A130030780122EFF789FE16 +:1022B000641C2406240E032CB3D30198EDF22AFDEE +:1022C0008B488068401EEFF79EFEE3E510B5EFF700 +:1022D000DBFE002010BDFEB5FFF780FFEFF7A4FE88 +:1022E000441CEFF7E8FD4443A502EFF79DFE040010 +:1022F000EFF7E1FD44430120A10280020F18281AE4 +:1023000000260190EDF2AFFB2A003300F8F2FAEE5E +:102310001C003100B81A99410292F3D2029A019836 +:102320002300121AB341EDD2EFF784FE0020FEBD68 +:1023300070B50D00002805D00D2189014018846B6F +:10234000002C01D1002070BDE06C2900F9F24EEAAA +:102350002068291DF9F24AEA2900206D0831F9F2B6 +:1023600046EA2900606D0C31F9F240EA2900606804 +:102370001031F9F23CEA2900A0681431F9F236EA8A +:102380002900E0681831F9F232EA2900206E1C3188 +:10239000F9F22CEA2900203120690E00F9F226EA30 +:1023A0002900606E2431F9F222EA20006030018BAE +:1023B0003172090A7172418BB172090AF172818B13 +:1023C0003173090A7173C08BB073000A8034F073E3 +:1023D000208830352870000A68706088A870000A6C +:1023E000E870A0882871000A6871E088A871000A66 +:1023F000E87120892872000A68726089A872000A50 +:10240000E872012070BDF8B5002619F019FC0090A3 +:102410003648456886E00F2080012C182069052188 +:10242000F0F760FBA86840057AD52879012812D01A +:1024300002280CD0032814D1280021F020E901281B +:1024400005D10098012419F0FFFB200045E4280085 +:1024500016F023FB1EE00022110028001300FEF7F7 +:102460004AFE254801682800CA88A030EF6A4B5F01 +:1024700001000000E4190200000400001E0E621EAC +:1024800042824A8982820A7A82754A7AC275F1202A +:102490008000281806220700F9F2CAE8A27A39005B +:1024A00002200123EFF716FD2069002843D00D20FC +:1024B00080012818806B8C21F9F2ECE82069EBF799 +:1024C0008DFC206905F07CF820690022FF30401C5B +:1024D00002602069FD23FF30401C426020696030AB +:1024E000428220696030017C4908490001742069FA +:1024F00019406030017420697821FF30401C08E0E9 +:10250000041B000484DC000418420004BC00000426 +:1025100010E0816220691E21FF30401C8163206928 +:1025200001212030417221690F2080020861206959 +:10253000C26200E001262D68002D00D075E70098EA +:1025400019F08CFB300022E40B0000B51EF06FF98F +:102550000C3001781A0709090901120F11430170A3 +:1025600000BD0B0000B51EF062F90C3001780907C0 +:10257000090F1A011143017000BD0B0000B51EF0D8 +:1025800056F9437300BD00B51EF051F9007B0007FA +:10259000000F00BD00B51EF04AF9007B000900BD28 +:1025A00000B51EF044F9407B00BDF3B581B0019841 +:1025B00016F0A2F9002801D00020FEBD19F04AFB58 +:1025C0000700F948F94E4468002511E001990622F8 +:1025D000A01918F06AFF002809D1200002990622EC +:1025E000AC3018F062FF002801D1250002E0246819 +:1025F000002CEBD1380019F031FB2800FEBDF7B5F7 +:1026000082B00500002007000190E7480E004468F2 +:1026100019F020FB0499CA07D20F12E02179012991 +:102620000ED1A179A9420BD1E179B14208D10F2194 +:1026300089016118CB6A5B085B0013430127CB62F9 +:102640002468002CEAD119F009FB002F01D1019870 +:102650002AE40120019027E4F3B581B00D0019F0C0 +:10266000F9FA0090D0480F26B6014468012714E01B +:10267000A068400510D5A0190069FF30401C016812 +:10268000A878020938009040014205D001992A003B +:102690002000E523DEF7A7FC2468002CE8D1009891 +:1026A00019F0DCFAFEBDFFB581B01C0015000A9ED2 +:1026B00019F0D0FA002121603160BB494A6828E056 +:1026C0009168490524D50F21890151180969FF3105 +:1026D000491C4F680B683B4337683B433360019BA1 +:1026E00093420FD1029B002B236805D04F683B43D8 +:1026F0002B4323600D600BE00F683B432B432360AB +:102700004D6005E00B6849680B4321680B4323606B +:102710001268002AD4D119F0A1FAE0E510B504003E +:10272000032919D006DC002908D0012914D0022978 +:1027300011D103E0082901D011290CD1002120007A +:10274000F1F739FFC20781090F2080012018807A34 +:10275000D20FEDF7E5FE10BD04210720FEF7A9FF1B +:102760000028F8D1EDF7C9FE10BD70B50025032192 +:102770002800FEF79EFF040003210800FEF799FFE2 +:10278000002C01D0002815D12100014313D0002CCA +:1027900000D10400002C0ED021792000FDF704FEAA +:1027A000040008D060790328F6D12000FEF72DFF41 +:1027B0000028F1D00125280070BD10B58268040002 +:1027C000D00415D52079002808D0012811D003287D +:1027D0000ED16079032801D0012809D1002904D144 +:1027E00020001AF00DFB002802D12000F2F791F929 +:1027F00010BD9003FCD4012040040243A26010BD30 +:10280000F1B584B0049804F0D9FD0498EAF70CFE01 +:10281000050004980F218901401803900069407B4E +:1028200002906148446859E00498844255D02000E1 +:10283000FEF7EBFE002850D02000EAF7F5FD0190EE +:10284000200004F0BBFD20001DF0CAFF06006079E7 +:10285000032804D12000EAF703FF002805D160799E +:1028600002283AD1706C002837D00F20039A8001DB +:10287000201800691269017B127B9142B930BF18A0 +:1028800001000000E01D0200000400004DD4B17200 +:102890002DD1417B6B461A7A88068446800F9306B9 +:1028A0009E0FB042864605D10F071007BF0F800F5D +:1028B00087421CD0980F13D06046800F10D0B645C9 +:1028C0000ED0E8786B4680088000E870187ACF2137 +:1028D00008400199C9788907890E0843029006E0EB +:1028E00008071207800F920F904200D902912468C6 +:1028F000002CA3D1039800220069017B02980BF001 +:1029000000F8049802A901F0EFFE0020F1E410B5F0 +:1029100019F0AAF92949496807E00A79062A03D17A +:1029200019F0A6F9012010BD09680029F5D119F0A8 +:102930009FF9002010BDFEB50400012619F094F99E +:102940002500C03501902878FF282BD11D4F00208D +:10295000397801231A0082400A4229D18340194361 +:10296000287039708100C9194C61502141431648C3 +:102970000E1850213000F8F298EE6E602079012890 +:1029800010D0B868012801D1EFF705FBA920025D3E +:102990000F20800100922018817A130028780122EC +:1029A000EFF723FB0026019819F062F93000FEBD15 +:1029B000401C0006000E0328CCD3F4E7041B0004DF +:1029C0002902000084DC00043CF602C010B50400BB +:1029D000FF30401C0068E7F250FE20001821F8305C +:1029E000F8F262EE6720C0002018F6F235FC10BD48 +:1029F00010B50400FF30401C0068E7F23EFE2000E6 +:102A00001821F830F8F250EE6720C0002018F6F2D6 +:102A100023FC10BD01000F22F8B592018A18009224 +:102A2000927A01200500FF2A1ED10A79022A00D1DC +:102A30000025F1220024012792008E18294A39002E +:102A40005268A140114210D12206120E2B00310013 +:102A50000120EFF749FA002807D10099214A8C722A +:102A60005168A7403943516004E5641C062CE5D346 +:102A700000E570B50500C179807900241DF0F1FEF4 +:102A8000EA79A979FDF7D9FE002800D10124287937 +:102A900000280CD001280ED0022816D003281FD100 +:102AA0006879032815D12800FFF790FF13E028006C +:102AB000FFF79EFF0FE02800FDF7B3FE002C02D0C9 +:102AC0002800FDF7C9FD00240AE02800FDF7AEFD4F +:102AD00001E00228F9D0002C02D02800FDF7BCFD4F +:102AE000200070BD84DC0004002901D1581C03D0F3 +:102AF000491C03D1002B01D10120704700207047F1 +:102B0000FF480221017100210200203A1162017286 +:102B1000704715235B015843F94B10B5203BC01893 +:102B2000F84B2C300524C318E4010019407D88427D +:102B300013D11878117883078A079B0F920F93425D +:102B40000BD180068906820F8B0F9A4203D0800F2B +:102B500001D0880F01D1012010BD002010BD70B53B +:102B60000100E74C05250F220020203CED019201D9 +:102B7000891809698A6815235B01434300211B19E1 +:102B8000CE009E1976197669964205D0491C042913 +:102B9000F6D3401C0228EED370BDF0B50024070028 +:102BA000D74D0B26203DB6018C46152040016043D1 +:102BB000401980194078002806D03900200062466C +:102BC000FFF7A7FF002802D1641C022CEDD32000E0 +:102BD000F0BD15235B015943C94A10B5203A891845 +:102BE000040005220F230020D2019B01E3181B697A +:102BF0009B68C4000C19A41864699C4202D0401C54 +:102C00000428F6D310BDBE4A10B5203A51690129F7 +:102C10001DD800210B24A40115235B014B439B18F5 +:102C20001B195B78002B02D1491C0229F4D302291D +:102C30000FD015235B01594389180A195278824233 +:102C400007D00520C0010818406B012801D90020D9 +:102C500010BD012010BD020015235B015A43A84B93 +:102C60000020203B10B50100D3180524E401CA0060 +:102C70009A1812195269002A04D0A032528982424D +:102C800000D31000491C0429F1D310BD56CF65AF05 +:102C900001000000DC21020000040000654534CF83 +:102CA0009C4A10B50100203A0524E401401C02288A +:102CB00000D3002015235B0143439B181B195B6B5A +:102CC000002B01D18842F1D110BD1523F0B55B0175 +:102CD0004343904A05240F250021203AE401AD0129 +:102CE0009A18CB00D3181B195B69002B05D05B1910 +:102CF0001B695B7B9B069B0F02D1491C0429F0D307 +:102D000015235B015843834B0B27203BBF01C018A1 +:102D1000CF26C019042904D18178F3223140114013 +:102D200015E0C900511809194A69817852191369C7 +:102D300031405B7B9B069B0F1B011943817012691D +:102D4000F323527B19401207920F920011438170B6 +:102D5000F0BD30B500216F4C203C152040014843A8 +:102D600003192C330020C200D2189568401C0E288D +:102D70005560F8D30020C200D218FF328132956B23 +:102D8000401C03285563F6D3491C0229E5D330BD06 +:102D9000624841690161416B0163604A0020403231 +:102DA000C10089184B680B60401C0728F8D9704790 +:102DB0005B4810B5E9F7F6F958495A4808605A488F +:102DC0000168890889000160FFF7E2FF0320000223 +:102DD000E9F7C4F90F20E9F7C1F910BD152040014A +:102DE00048434C4930B5203940184C492C300268D2 +:102DF0000A60C26E0A61026F4A61426C0A63826CA9 +:102E00004A63C26C8A63026DCA63444C0021403439 +:102E1000CB001A1855681B191D6092685A60491C2E +:102E20000729F5D9414C0021CB001A18FF32813215 +:102E3000556B1B191D63926B5A63491C0329F3D30D +:102E400030BD344AF8B5203A0026022804D01523B4 +:102E50005B01584386182C361520400148432F4B00 +:102E600084182C340020803381000919C2008D6F32 +:102E7000D2181562803189695162401C0828F3D349 +:102E80002649B8200059C0310862294A0020810033 +:102E90000B198033DB6B89180B60401C0E28F6D3AE +:102EA0002000C030416BD1632149826B80318A623E +:102EB000C06BC862E11D1E48F9310A68C0308260EB +:102EC0004A68C2608A6802611A4B002082001519A4 +:102ED000FF356D1CED68D2181562401C0828F5D32B +:102EE000144AC86A80325061124A086BC0321060BE +:102EF0000D484A6BC038C2628A6B0263C96BC163FA +:102F00002200FF3208484132116801605168816334 +:102F1000054B11E0384200049602000000A000803A +:102F2000FF030000000000C000A5008000A9008091 +:102F300000A1008040A2008090684033186100200A +:102F400081000D19FF354135ED68C9184D61401CF0 +:102F50000828F5D3FF48D16A0163116B4163FD4A2C +:102F60000020403281000B19FF3341335B6B89181D +:102F70000B60401C0828F5D32000FF30F54A813053 +:102F80004169C0321160F4498269CA60C2694A620B +:102F9000F149006A40318862F04B0020CA0C810080 +:102FA0000919FF3181314D6A1100012800D8002133 +:102FB0000702C919C9188D60401C0428EFD32000EE +:102FC000FF30E749C130C2680A6002698A6140691E +:102FD00008610025002E0ED0A90088190919FF30BC +:102FE000FF31C130C13182698B699A4203D1C06916 +:102FF000C96988420AD0A8000019FF30C130C269EF +:1030000081696808FF30401CEDF28CFEAD1C202D5C +:10301000E0D300250927BF01002E0CD0A80081199C +:103020000019C919C0198A6983699A4203D1C9690B +:10303000C069814209D0A8000019C019C26981691C +:103040006808FF304130EDF26DFEAD1C042DE3D376 +:10305000F8BDC44930B5884227D8C3490A69C26659 +:103060004A6902670A6B42644A6B82648A6BC26473 +:10307000C96BBD4C016500214034CB001A1915689D +:103080001B185D605268491C07299A60F5D9B74C36 +:103090000021CB001A19156B1B18FF33B6A4F9D702 +:1030A00001000000D825020000040000369FE7A3BD +:1030B00081335D63526B491C03299A63F3D330BD9E +:1030C000F8B50400AC4884427ED8AC4B0020803375 +:1030D000C100C9180D6A820012199567496A8032C9 +:1030E000401C08289161F3D3A448C030016AB8207D +:1030F000A44A0151002081008B181B6809198031F6 +:10310000401C0E28CB63F6D3D16B2000C030416346 +:103110009C4980318A6A8263C96AC1639948C03018 +:103120008268E11DF9310A60C2684A600069964B05 +:10313000886000208200D5182D6A1219FF32521CB7 +:10314000401C0828D560F5D38F4880304069C8629C +:103150008D48C030006808638C48C26A4A63026BBD +:103160008A63C06BC8638948C03001682200FF329F +:1031700041321160806B864B50601869906000206E +:103180008100CD186D690919FF314131401C0828B3 +:10319000CD60F5D37448016BD162406B1063724A05 +:1031A0000020403281008B181B680919FF31413122 +:1031B000401C08284B63F5D36B48C03001682000E1 +:1031C000FF308130416100E045E06849CA688261B2 +:1031D000496AC16165494031896A0162644B0020D6 +:1031E000012212031100012800D80021050249190B +:1031F000C9188D6881000919FF318131401C0428EC +:103200004D62EFD35B490A682000FF30C130C260D5 +:103210008A690261096900254161A80001190A0053 +:10322000FF326808DD32FF30111F401CEDF26CFDEB +:10323000AD1C202DF1D397260025B600371FA8001E +:1032400000198219C1196808FF304130EDF25CFDA8 +:10325000AD1C042DF3D3F8BDF0B58BB04D484069DB +:10326000022856D1444800274C380990806B0690BC +:1032700049480890826906983900801802904748AA +:10328000794104924068029A0D0044000B00390015 +:10329000A01859414B218902884202D319263603CE +:1032A00001E01926F602321B06983B003900009215 +:1032B000F8F27EEC029A2B00F7F24CEF0400079133 +:1032C000009A04983B003900F8F272EC029A2B0045 +:1032D000F7F240EF05220591079905009202A01A26 +:1032E000B94105D2009839001400851AB9410AE0A5 +:1032F000052205999202A81AB94104D20098390012 +:103300001500841AB9410998C4630898C561214819 +:1033100086600BB0F0BDF7B582B000240298FFF7CD +:1033200032FC022802D0002005B0F0BD0398FFF760 +:103330007EFC002871D0029802990F25AD0100791A +:1033400049190328019109D11DF078FA002805D008 +:1033500040190069016901980069016104990398A5 +:10336000FFF72FFC02281BE040A6008000A8008089 +:1033700040AA008000B00080E444000400A0008067 +:1033800000A9008000A1008040A2008040A400802D +:1033900040A5008018420004584700044807000474 +:1033A0003CD0152149014143FF480E182C36092015 +:1033B0008001E10089190918896A002902D0641C7A +:1033C000042CF6D3042C3AD00520C0013018817D9E +:1033D0008A06920F11D1CF221140049A12789206D8 +:1033E000920F12011143F32281751140049A127851 +:1033F0001207920F9200114381750199C268096901 +:103400000969914200D81100C1600199027D0969E2 +:103410002031497A5118017564E010E0E24F00252F +:103420000B208001152149016943C9190918497800 +:10343000002902D06D1C022DF4D3022D01D10120F0 +:1034400072E71520400168431521C6192C36490141 +:103450003000F8F23EE978690521401C7861C90125 +:103460000398771878750499B87D097880088907DA +:103470008000890F0843F321B8750840049900249F +:1034800009780907890F89000843CF21B8750840DA +:10349000049909788906890F09010843B8750198CC +:1034A00000690069F8600198006920307B9E26D190 +:1034B00001000000D429020000040000C2F09217AD +:1034C000407A3875BE48E5F2F3F940080838787656 +:1034D000BB48E5F2EDF940081038B8760120FCF75A +:1034E0004FFD4108091F0020F4F7EFFB002D01D12B +:1034F000B44800E0B4483060E1008A19092189012C +:103500000298511888620520C00130188168491C52 +:103510008160AA48AD4940698882FFF7A7FE0298FA +:10352000EFF7DBF909E7F1B582B00298FFF735FB59 +:103530000228019005D001990298FFF768FB042842 +:1035400001D10120FEBD019915235B0159439B4E1A +:103550008D1905212C35C9016C18A168491EA1607F +:1035600036D119002800F8F2BEE83400606918234B +:10357000401E60610198954F58431821C0191830BA +:10358000F8F2B0E86669012E20D800248B482500A7 +:10359000002E13D00B21890115225201624312180B +:1035A00052185278002A04D018206043C019C56A06 +:1035B00004E0641C2406240E022CEDD38348482129 +:1035C000F8F290E818206043C019C562BE8267E037 +:1035D000C0004D214019C900401800210A0006C052 +:1035E0000121C8004219092080011718B86A002873 +:1035F0001AD0FF320020FF32921C944612E0C20023 +:10360000092352199B01D3189B6A002B09D1FF3261 +:103610006646B36EFF32F66E921CD6669366002243 +:10362000BA62401C8842EAD3491C0429D9D300203D +:1036300006000F27E060BF012075F0004119092046 +:1036400080010A18906A00281BD0C0190069E1683F +:103650000069884200D80800E060916A207DC9199D +:1036600009692031497A401820755548E5F220F95A +:103670004008083860765248E5F21AF940081038D8 +:10368000A076761C042ED8D30120FCF779FC01002B +:103690000020F4F71AFB01980006000EFFF729FB43 +:1036A000FFF7E4FD0298EFF718F90020FEBDF3B52F +:1036B000040085B0E2F7A2FB0698152149014143B9 +:1036C0003E4808182C3003904148E8F77FFD02E09F +:1036D0000120E2F76BFD05F0D1FC0028F8D118F0CD +:1036E000E1FA050006992000FFF7BFFB06992000CC +:1036F000FFF788FB3148069920300171280018F047 +:10370000D5FA03980521C9014018817D0291417DB8 +:10371000029800220AF013F90AF0CBF92C4E00248B +:10372000F03E0125182060432A490A5C002A28D06F +:1037300040180490001D1DF0F9F8070021D0380052 +:10374000FFF72BFA069988421BD13879032813D149 +:103750003800FDF7B2F8817F8A0703D52900803051 +:10376000006904E0C90707D029008030406A0028BA +:1037700000D00021002904D00498C1782800884096 +:103780000643641C042CCDD33004000CE8F7FAFC8B +:1037900000240927BF010399E0004018C019866A78 +:1037A000002E36D0707903282ED1B068C0042BD5F6 +:1037B0003000F2F798FA002826D10DE018420004F4 +:1037C00074190004002003C0004003C088470004AF +:1037D000FF03000014CB0004E7F72AFD002813D1F3 +:1037E0006B460290597A08222943597200920200CE +:1037F0000190029930003823E9F797F9002803D1A6 +:10380000FF48C169491CC161182200213000F0F74E +:103810003BFC641C042CBED3E2F7FAFA07B0F0BDFF +:10382000F1B584B0002104980160E2F7E7FAF44EA4 +:1038300015212036307949014143F14808182C30D0 +:103840000390F048E8F7C2FC002401270399E00048 +:103850004018092189014018856A002D49D06879EE +:10386000032818D104980760E7F7E2FC002836D156 +:103870006B460290597A102239431143597208223B +:10388000009202000190029928003823E9F74DF9CF +:10389000002824D11FE02879022820D1307900287F +:1038A000D74804D1152189014018C06903E00521DA +:1038B000C9014018C06BD4494968490074BCB2CAF8 +:1038C00001000000D02D020000040000912A417B7D +:1038D0004018D349884200D908000104090C382255 +:1038E0002800F5F72BFE012803D1CA48C169491CFD +:1038F000C161162200212800F0F7D0FB152200211B +:103900002800F0F7CBFB641C042CA9D3C54DC14F94 +:1039100000240AE0C448641C844203D20120E1F779 +:10392000DDFF02E00120E2F74BFCBE482030018AB7 +:10393000808A8142EED1288AA98A8842EAD1F86930 +:103940000028E7D118F0B8F904000398FFF79FFBAF +:103950000398FFF7C9FB02203071200018F0B0F97E +:10396000E2F760FAF4E4AB4910B5896981420BD102 +:10397000AE480122016811430160AD480121006891 +:103980000722C90319F0ABFA10BDA248F0B5010037 +:1039900020308379CE688D689DB006930B690493BF +:1039A000007915235B01079058430522D201411885 +:1039B00010000818C16B0024119410914769ECF2B3 +:1039C0008EF818900F208001381819910069203066 +:1039D0000CC81898801A99417D2252032300121AAC +:1039E0008B4109D303201FF0EAEDFCF770FF00289C +:1039F0000ED0807F80070BD5189A19252D03199BAF +:103A0000A818844A2100594103C228001DB0F0BD06 +:103A100019273F031999189800233A00F7F2AEEBE3 +:103A200004003A001791F7F2E4EF0200069815231C +:103A30005B014343774818180523DB01C0188069F0 +:103A40000B00801800215941189A1490199B121AE2 +:103A50008B4115910BD2774A14981599002780183D +:103A6000FF43794115911799E41979411490002782 +:103A7000E0073900C00F79407840084300D00120AA +:103A80002C0005900120099503901498129010982D +:103A90000E900498159F119900280F9112D0059847 +:103AA0000028654801D0341805E0129A841BB0182C +:103AB00000214F4112901920C002854207D16408AD +:103AC000099404E0002E02D0AC19A81B09900398B9 +:103AD0000699002807981FD088425048406813D1A3 +:103AE0004000221A281A0A90119910980023F8F21F +:103AF00074E80A9A0023F7F242EB0F910E900F9BA5 +:103B00000E9A1298390021E0129A1B90A0180021F9 +:103B100079411B9A002328E088424048406818D128 +:103B2000099940000A1A281A0A901199109800233E +:103B3000F8F252E80A9A0023F7F220EB129A0F915A +:103B40000E90A0180F9B0E9A0021794180185941C0 +:103B50000DE01A900998129A0290A018029A00217A +:103B6000794180181A9A00235941801A99410C9082 +:103B700019200F00C002854205D10398002802D009 +:103B8000002003900FE0012003902B4A1498159910 +:103B9000801800235941159114900599012000299E +:103BA00000D000200590189A0C98199B121ABB415E +:103BB00006D2189A0C98199B3900801A994100E096 +:103BC000002008900F990E981FF014EF0122D243A5 +:103BD0001FF060EF0090089801911FF04AEF019BE1 +:103BE000009AF9F2D6E800D24FE70A480C9982C051 +:103BF00008980BE7FEB51823064D104920352879A3 +:103C0000584344181834E6F27FF90D4A0023F7F2BE +:103C1000B6EA17E018420004FF020000480700045B +:103C2000FF7F000000A00080102700007405000442 +:103C30007C0500040070FEFF00900100884700042E +:103C400040420F00070028790C235843FF494618CB +:103C5000280020388169002936D14069022833D3F1 +:103C6000FFF793FE0022009205000200F84BF9488E +:103C70000021E2F793FCE0680190002800D1256064 +:103C8000A068002807D0F44B5843591C4019F8F29B +:103C9000E8E9A06000E0A5600198401CE06001D167 +:103CA0000120E06061682800A94200D3080060603C +:103CB00021682800A94200D808002060B068B842F6 +:103CC00003D1706840197060FEBDB8428A6E90746E +:103CD00001000000CC310200000400002EEF64C897 +:103CE000FCD2401CB84201D1706800E00020A1C69F +:103CF000FEBDFEB5DB4D183DA869002833D0E6F2C5 +:103D0000EEFC00262C002034AE61E079D84F00286C +:103D10002AD1EBF2EEFE796138612079607101A859 +:103D2000FFF792FDEBF2E5FE2A686B68801A994175 +:103D30000521890242184B009A4215D2081A0199AE +:103D4000002904D101210903884200D90800C94A89 +:103D50000121E1715161002200920200C14BC24871 +:103D60000021E2F725FCFEBDC248E6714661647998 +:103D70002000FEF7BDFF01002000FFF7ACFCFFF7BD +:103D800043FFEBF2B6FE3A697B69841A6869994190 +:103D90000128E8D9B24E483E3569002D00D1746043 +:103DA000F068002807D0B14B5843591C0019F8F2AD +:103DB00062E9F06000E0F4606D1C356101D1012022 +:103DC0003061B1682000A14200D30800B060706883 +:103DD000A04200D804007460FEBDF0B500242500A8 +:103DE00026002200A446152040019E4B504300218E +:103DF000183BC718C80005233818DB01C0184069F4 +:103E000000280CD04379032B04D16D1CA0304089CD +:103E1000844604E0022B02D1641CA0304689491C70 +:103E20000429E7D3521C022ADDD3012C0AD1012D2B +:103E300008D18C4818384069022803D1664501D161 +:103E40000120F0BD0020F0BDF0B500252C00FFF7EB +:103E5000C4FF002813D0834A05210026C901183A5F +:103E6000152040017043801840184069002802D096 +:103E70004079022845D0761C022EF1D341E07849E2 +:103E80007D48784AB8398069896B183A92688842C7 +:103E900003D9401A0127002102E0081A0027012156 +:103EA0001923DB02984201D90E0001E03E000F0009 +:103EB00019210903091A814200D8080015235B0162 +:103EC00068497343183959180523DB01C918CB6BAE +:103ED000674949685B18834200D33E0005239B0273 +:103EE000CF18B84202D201250C1AE4181927FF0294 +:103EF000BA4206D1571AFF1A874202D2101A081A7C +:103F0000C41858480830867120380561C460F0BD77 +:103F1000F7B50E0000981700FCF7E3FC05005148C8 +:103F20001838016A002930D0406902282DD3009842 +:103F3000FEF747FE2C00FF3438340C2020700F2091 +:103F400060700020A070E078A11D401CE070207916 +:103F500000202071FF2060713000F7F28EEC21000C +:103F60000A313800F7F288EC00981FF09AEB022033 +:103F7000A877A868FF21491C0843A86000981FF093 +:103F800094EB00980121F4F751FDFEBD15235B0170 +:103F90003449584370B5183905264518F601A81953 +:103FA000406B002816D00B208001002128180172D8 +:103FB000C1710C000171E0002818801940690028C7 +:103FC00003D000221100F3F736FF641C2406240EF0 +:103FD000042CF0D370BDF0B500260500F64385B083 +:103FE000EBF287FD049015200C0040011D49684349 +:103FF000183940182C30002500900099E80041182D +:10400000092080010818816A002951D0A03149890E +:1040100000238A020192C76A04982100F7F2B8E8E7 +:104020001000049A19002300101A8B41C2191900BC +:10403000002359410F000B00049821000292FEF763 +:1040400085FD00280BD1049A02983900801AA141FD +:1040500005D2029A0198002180184F4102900DE08C +:10406000D047000430420004672E0200E70300003E +:104070004807000440A6008098440004029A04986F +:104080003B002100FEF762FD002809D00498029A47 +:10409000C043E143801879410023401C594104E0AA +:1040A000049A02983900801AA141864200D3060082 +:1040B0006D1C042DA1D330005EE4F8B50226FB4F41 +:1040C000F51E00241520400160430521C019C901D7 +:1040D0004018406B002806D02000FFF7881B2E0EEA +:1040E00001000000C8350200000400007D35B7A4BF +:1040F0007CFFA84201D205002600641C022CEBD3F1 +:104100003000F8BDF8B5EE4DA869002862D1EAF795 +:1041100008FE00285ED107201CF0B8FB1F246401B4 +:1041200009E04179012903D10119097A042951D003 +:104130000721FCF77FF90028F3D1012004F08BFF61 +:10414000E049DF4C08700120203488602079052682 +:10415000F601022807D015235B0158434019801946 +:10416000406B002823D1D84F02E00120E2F73CF851 +:10417000EDF7A4FE0028F8D0388AB98A8842F4D135 +:10418000E869002802D00120E2F72EF868690028CB +:104190000DD0FFF72CFE002802D0FFF798FF02E0B9 +:1041A0000220FEF7AFFD01000220FFF79EFADFF7C5 +:1041B00012FB002803D03720E0F7BFF903E03721D6 +:1041C0000020E7F703FF6869002804D1022020716E +:1041D000FEF720FEF8BDBD4F012833D1207915230D +:1041E0005B015843401980194569002D1AD0287980 +:1041F000032817D16879022814D138888005800FE8 +:1042000010D12800FCF777FB0600002128001FF0E2 +:104210004AEAB168FF20401C0143B1600121280037 +:10422000F4F70EFC2079FFF7BBFE38880028D1D0C8 +:10423000F8F7A8FC002800D002201CF067FBF9F773 +:10424000A5F9F8BD002415204001604340198119EB +:10425000486900280AD00279032A07D14279022A44 +:1042600004D1AA68C96B511AFFF75CFE641C022CCA +:10427000E9D33888002801D01FF0ECE9FFF7EEFD04 +:10428000FFF7CCFCF8BDF8B505008D4C8C4F203401 +:104290002679B869E6F22DFA8D490020B8614861A7 +:1042A000E071884CA068002804D0207804F0DEFE7D +:1042B0000020A060022D21D0152040016843052177 +:1042C000C019C901401847693800FCF714FB040005 +:1042D0003879032812D1787902280FD1A07F80077E +:1042E0000CD5002138001FF0DEE9A068FF21491C31 +:1042F0000843A06001213800F4F7A2FB022E04D08D +:10430000AE4208D06846FFF7A9FA022D04D0290072 +:104310003000FFF7EAF9F8BDFEF77CFDF8BD70B597 +:104320000500674E0024306A002816D02800FFF7E9 +:104330001AF8012811D02800FEF74DFC022806D0FB +:1043400015235B01584380192C30FEF7E1FE28004D +:10435000FEF741FCFFF797FF200070BDFFB581B06D +:104360000C001D00070056480A9E006A002819D05C +:10437000E5F7CFF9002802D00020E5F7AFF9DFF725 +:104380002AFA002803D03520E0F7D7F803E03521DA +:104390003800E7F71BFE002D05D0039A21003800F6 +:1043A000FFF7BDFF92E6002E06D0002C04D0039943 +:1043B0002000FEF72EFC00E00220FFF764FF85E6F8 +:1043C0003F48006A002800D09CE67047FEB5FFF722 +:1043D0000EFD00280FD007201CF058FA09E068797C +:1043E000032802D1A868C00406D407212800FCF7DE +:1043F00021F80500F3D1FEBD002DFCD02800FEF70A +:10440000EAFB060001002800FEF71FFC0190AA202D +:10441000405B8402EBF277FB009015204001284AB4 +:1044200070430F00052391688018DB01C218D26B1E +:10443000891A244A5268891A019AD2008018C2182F +:10444000906991610E1AF11702910F218901691883 +:104450000D6902992A6A6B6AB0185941696228622B +:10446000009A0299B618794100270D003B002200FE +:104470003000F6F298EE19002B00B01A8B411900AB +:1044800000197941EBF2D0FB114A403A16605560B1 +:104490000F4901200860FEBD70B5060000240F25FD +:1044A000AD014119CC61C2790179FDF711FB0028FA +:1044B000F7D1701901698C630069446370BD000015 +:1044C000184200044807000400A000805C3C00047F +:1044D00040A6008070B504000D0086B017F000FC07 +:1044E00006000F2080012418E0690028B1B40EB145 +:1044F00001000000C439020000040000895AC21003 +:1045000005D12069816B491C81630120E06121692B +:10451000486B002828D1F848006A00280FD104A968 +:1045200005A809F0E4FA2269002104981300343246 +:104530000191029100910106090E03920AE0487B65 +:1045400005902269ED4813003432002101AC07C404 +:104550000091197B98680A0005992B0010F098FDCE +:10456000FA20E1F7D9F904E07D21C900694310F090 +:10457000BBFC300017F0C2FB06B0A9E7F8B5060097 +:10458000DD48006A00283DD03000FEF72EFB009089 +:1045900000993000FEF763FB05000098022831D037 +:1045A000AA20805B002384020F2080013018076955 +:1045B0002200796A386AF6F200EE1600183703CF47 +:1045C00022000023F6F2F8ED964201D9B11A01E07B +:1045D000901B211A0098152252014243C648101818 +:1045E000EA0082180520C00112189069884201D99A +:1045F000401A00E0081A642804D99161FFF7F0FE20 +:10460000FFF736FCF8BD70B50400BB4E0D00306AF4 +:10461000002828D02000FEF7E8FA022806D015234B +:104620005B01584380192C30FEF77CFDB549B44836 +:1046300008606079032817D12000FFF79FFF0F2043 +:1046400080012018006A002803D0002D01D0AE4957 +:1046500006E0A068400706D5002D04D07D21C900E2 +:104660002000FFF741FF33E7FFF7BAFEFFF754FDE5 +:104670002EE7A14910B5096A002903D0FEF7B5FA63 +:10468000FFF70BFE10BD10B5040017F033FB0F2130 +:1046900089016418E169012905D10021E1612169DD +:1046A0008A6B521E8A6317F029FB2069816B0029EF +:1046B00002D1343010F079FD10BD70B506008E4D7A +:1046C000286A002820D07079032803D10021300007 +:1046D000FFF7D9FF3000FEF788FA04003000FEF73C +:1046E0004AFF012810D0022C0CD015204001604355 +:1046F00005214019C9014118496B002902D02C300D +:10470000FEF710FDFFF708FDE2E6FEB5EBF205FA55 +:10471000002501910090152040016843764900244E +:1047200040180290E10040180521C9014018406975 +:10473000002815D0AA21095A8F007F180F2189015E +:1047400040180069FF0220300CC8FE17009801993C +:10475000801A994133003A1A8B4101D20120FEBDE3 +:10476000641C042C01D20298DCE76D1C022DD2D30C +:104770000020FEBD10B50C00FEF737FA022812D05B +:104780001521490141435C4A237889185F4A9B07F8 +:1047900089180A789B0F920892001A430006000EAF +:1047A0000A70FEF7CEFA10BD70B50D68FEF71DFA5F +:1047B000022815D01823584355494418286F183437 +:1047C0008079C0070CD1A878F8F22AF8616900292D +:1047D00005D06323594308186421F7F260EC606147 +:1047E00076E6F8B515235B015843434901250024BB +:1047F00046180527FF01E0003018C019406900285D +:1048000004D000221100F3F72AFB0540641C042C9D +:10481000F1D32800F8BDF8B500244169002930D053 +:104820003C4A1268914204D10189081806784778F9 +:1048300001E08E79CF7917F05DFA0500390030007C +:104840001FF07EF8022819D01522520142432A494E +:1048500052180B21890151180A79002A0ED0521ED4 +:104860001406240E0C718A79944207D80022CA716A +:104870000B7A002B02D00A72FFF7B3FF280017F063 +:104880003DFA2000F8BD70B5002401890E1817F01C +:1048900031FA0500717830781FF052F802281AD0EA +:1048A000152149014143144A8B180B2189015918DC +:1048B0000B795B1C1C06240E0C715269012A0AD963 +:1048C0004B799C4207D30122CA710B7A002B02D18B +:1048D0000A72FFF786FF280017F010FA2000F7E5AC +:1048E0000549086A002804D04869012801D9012037 +:1048F000704700207047000018420004B3C9F474E8 +:1049000001000000C03D020000040000DA80117CBC +:104910007139020001000300C0A90080B80B00003B +:10492000C20200008847000400000004F0B50F2216 +:1049300092018718142048437A69001D1418002634 +:10494000267466743200A6814800E681FF4B26601B +:10495000C01884466046855C60236B437869543395 +:10496000C318900000194360403359754368521CC6 +:104970004033D9754368120640335E834368120E94 +:1049800040339E83436840331D76436840339975B6 +:1049900040684030022A8677DCD3F0BDF8B50024A9 +:1049A00005000F00260017F0AFF90F2189016D18DF +:1049B00000906869012F22D100282CD1E44F3D20BE +:1049C00000016043385C00280DD13D2000016043A8 +:1049D0003D21C01909016861F6F2B6EE696901204E +:1049E0000600087002E0641C022CE8DB022C12D1E5 +:1049F0000120D8496F613870060008730BE0002869 +:104A000008D041180B7B0022002B01D1027000E07E +:104A10000A736A610126009817F07AF93000F8BD30 +:104A200070B50F26B601050084196069002804D10D +:104A300001212800FFF7B2FF01E001210170606948 +:104A40008019007B00280DD10120F8F22EF8040017 +:104A500006E021002800FFF769FF641C2406240EED +:104A6000032CF6D970BD70B5050048780C0001091B +:104A7000012630008840411E2800EBF210F86078D3 +:104A800031000007000F8140491E2800EBF211F8A9 +:104A9000207801092800EDF7AFFB61882800EBF2D0 +:104AA0001BF870BDF0B50C00002185B00291417972 +:104AB0000191B421095A00910F21890140180390F6 +:104AC000416914206043001D0F1838784007800F9B +:104AD000F7F2EBFF3978090712D5B989002903D01D +:104AE000397C00290CD001E00121029102997E7CE1 +:104AF000002906D0350039002000FFF7B4FF01E09F +:104B0000060005000024A000C0194068002849D014 +:104B1000FF2D2FD0FF2E2DD04030C17DA9420DD0CA +:104B2000029A002A01D0427D00E0827D914205D1A7 +:104B3000864A69008918C575095D017601990129C0 +:104B400002D0019903290BD100990322520291420C +:104B500006D21423039A7343526900219B1DD1523C +:104B60001422039972434969121DC07D8918FFF709 +:104B70007AFF03E0FF214030C1750176641C2406F2 +:104B8000240E022CBFD303984269072060214143C1 +:104B90008918A031CB7A497A8B4205D11D21490170 +:104BA0005118C87605B0F0BD401EEFD5FAE7F7B54D +:104BB0000C0011002000F6F251F9002805D10098F0 +:104BC0000079062801D00020FEBD00981F21490170 +:104BD0004018007901280ED1A07AA17C00090907AC +:104BE0000001090F0843A072E07AE07C0107090F79 +:104BF0000009000110E0022811D1A07AA17C00096F +:104C000009070001090F0843A072E07AE07C010760 +:104C10000009090F401C00010143E17208E004286B +:104C200006D1607D217D000208432073000A607375 +:104C300000980F21002689014518B0000719B87A9D +:104C40004006800FF7F231FF142358436969001DB5 +:104C5000081839000A31F6F22CF9761C3606360EA1 +:104C6000042EEAD30024142262436E69101D305CC6 +:104C7000000701D421000EE0FF21002009E01423E9 +:104C800043431B1DF35C1B0700D40100401C0006BE +:104C9000000EA042F3D91000153031546B690D3865 +:104CA00018580C32403081756869805840308175E1 +:104CB00000982100FFF7F6FE641C2406240E042C45 +:104CC000D1D30120FEBDF3B50C0083B00F210398B2 +:104CD0008901401847690020019038212000F6F230 +:104CE0005EED0120F7F2E1FE050057E01420684375 +:104CF000C619FF2011302070000A60700A20A070D1 +:104D00000020E070361D28002571F6F219BB6FCC2B +:104D100001000000BC41020000040000D879C96A0B +:104D20000CF8029003988068C00438D503981BF0F3 +:104D3000D1FE00282ED030780007C00F2072B08935 +:104D4000002800D001206072B089A071000AE071D3 +:104D5000307800070BD5B089002808D1012005E084 +:104D600067320400A4DC000464E0000460710720E2 +:104D7000C0013818827B029B012108009840024242 +:104D800000D0A1721D225201BA181278024208D036 +:104D9000E17206E00020F7F292FEA84201D0012065 +:104DA000607101980E340E306D1C2D062D0E019091 +:104DB000032DA5D90198FFE670B506000D00FFF799 +:104DC0008CFF04000F20800130184069FD49411814 +:104DD0002800F6F273F9001970BD1CB50400FF221B +:104DE00091321723694601A8EDF70FFD00280CD07A +:104DF000009920001031FFF7DFFF00998872000A48 +:104E0000C87201992000EDF7CBFC1CBDF8B5150068 +:104E100006000F001BF05EFE00281CD00F20800152 +:104E20003418002D18D0287A626900075178000FD5 +:104E3000884210D0521C29003000FFF7C2FE002823 +:104E400009D0E04960691A2240182900F6F2EAEB1D +:104E50003000FFF7C2FFF8BD002FFCD0387A61693F +:104E600000074978000F8842F5D0300008F067F855 +:104E7000F8BD38B500210091D34905004C6A6A4657 +:104E80002100A431F6F249F8002818D0287801282A +:104E900001D0022813D16D78CC4968000019A030E8 +:104EA0008088884201D18034E0690404240C210008 +:104EB0002800ECF78CF921002800E8F781FA009827 +:104EC00038BD020008000F2189015118BD4A10B5F4 +:104ED00049691D328A18BE49F6F241F810BDF8B58D +:104EE00014000D004A1C06002100FFF76AFE00288E +:104EF0003CD0B4481A2221002818F6F294EB022084 +:104F00001EF08EEB30E028001BF0CEFC317907005C +:104F100006290DD0010020310A7C237A5206DB09D4 +:104F2000520EDB011A430A74D209FF2169310A507B +:104F3000210010220A313230F6F274EB0D2080018C +:104F400038180079012803D1A24928000968884748 +:104F5000052128000FF084FC082128000FF080FCB8 +:104F6000022128001EF0F4EB0500CCD1F8BD012091 +:104F700010B5F7F2A4FD984B002204E0C1005A508E +:104F8000C918401C0A710328F8DD10BDF8B50024CB +:104F900001272000F7F293FD390081400E0405003F +:104FA000360C3000E7F74EF98C48A1000918684626 +:104FB000F5F289FF28006946FFF75FFD3000E7F74B +:104FC0001DF9641C2406240E042CE2D3F8BDFFB5A1 +:104FD00081B00F000B9E0A9D0C9C0921F6F2E8EBB4 +:104FE00009213800F6F2E4EB03980921F6F2E0EB30 +:104FF00004981A21F6F2DCEB287821010007000F53 +:10500000203028706878764F0007000F08430D990C +:10501000000900010907090F084368700020040017 +:10502000688029002000FFF728FD6100641C240629 +:105030003868240E072C7052F3D9BDE5F0B5040092 +:10504000170061480F2201269201406AF602A51856 +:10505000002985B027D1A168B143A1606E69002EF7 +:1050600019D000250A220421A43001AB357007C3F2 +:1050700004AA5448009233187320C00032185148D3 +:10508000123831184F481B383018FFF7A0FF29009D +:105090002000FFF78DFC2000FCF7FDFD00280DD05F +:1050A000FFF774FF0AE02000FFF782FC002805D01C +:1050B000A16868693143A16001210170002F02D00D +:1050C0002000FFF78AFE200014F0C9FBFFF74FFF16 +:1050D00072E5FFB581B000240E00086900280ED1EA +:1050E0000198E8F721FB002809D1049A01980021D2 +:1050F000FFF7A4FF21002000F6F796FE5CE501987B +:105100000121FFF755FC01990F208001081845691E +:105110002C4F3069243F002809D1E8196609710C29 +:1051200001000000B8450200000400008BA31A062D +:10513000F5F23AFE2E481A38F5F24AFE2C481A3893 +:1051400030610120F7F2C5FC040006E0019821005F +:10515000FFF700FC641C2406240E032CF6D90398E8 +:10516000002801D014F0A5FB1B48E91912380922C8 +:105170000C002818F6F260EA174809221B382100B3 +:105180002818F6F25AEA7320C000092221002818D4 +:10519000F6F252EA0720C0012818817B0091016ACB +:1051A0000098F6F74BFE326901982900FFF7A1FE3F +:1051B000049A01980121FFF74BFF07E50F218901B0 +:1051C00040184069002806D01B2149014018407F43 +:1051D000002800D001207047A103000014C700047C +:1051E000FFFF000064E4000414FA000444E4000437 +:1051F000860003C004FA000438B56B46187800072F +:10520000000F2030187058780007000F4030000958 +:1052100000010A3058700020040058802006000E5B +:105220006946FFF734FC641C072CF7D938BD002809 +:105230000AD00F21890140184069002804D01D219F +:1052400049014018C07EC6E70020C4E7F8B51D003C +:105250000600080060230F21434389017418616927 +:105260001F00AB37CA556169B233CD54F7F220FC49 +:10527000F7F22FFC01003000FFF728FC0F206169D6 +:10528000AA008001101809182800E8F71AF9F8BDDB +:1052900070B504000D00F5F29BFD207A00090001B5 +:1052A00020725E202075002060752F20207600205F +:1052B000022D60760ED1E07A0007000F6030E072B8 +:1052C000A07C00090001401CA074A07D0009000121 +:1052D000401CA07570BD10B5040088B001A8FFF790 +:1052E000D7FF03A91022891C2000F6F2A6E908B016 +:1052F00010BD3D213C48490110B5F6F23AEA3B4861 +:105300008021F6F236EA3A480221FFF7E4FF10BDA9 +:10531000002808D00129017A02D18022114301E03E +:105320004906490E017256E7FEB500251F0006002A +:105330006B460295587A022318436B465872202315 +:1053400004001C43002902D1DF21084004006B4601 +:105350005C72019518795107C008C000490F0843D5 +:105360001021084318713A06120E0092019A029910 +:1053700030003123E7F71FFC002802D030001AF07C +:105380005FFCFEBD002801D1012024E7012801D1E6 +:10539000002020E70428FBD21DE710B50400080018 +:1053A000EAF2B3FB01002000EAF2AAFB10BD70B5DF +:1053B00004000D000800EAF28BFB01002000EAF275 +:1053C00082FB2800EAF2B2FB01002000EAF285FB32 +:1053D0000848A1000918AA001018006808602900F0 +:1053E0002000FFF7DAFF70BDA4DC000464E40004D1 +:1053F000860003C080A6008070477FB503000F20A1 +:105400008001181842690D00022404291BD21800DB +:105410001BF06AFB002805D014206843801800792F +:10542000040910E01800FCF740FC00280BD0022112 +:105430006846FFF750FF2800FFF7A4FF8000694689 +:10544000085C0407240F200004B070BD03000A00AC +:1054500000B51BF049FB002807D00F208001181869 +:10546000416960205043B030085A00BD032010B598 +:10547000DDF7BCFE04000320DDF7EFFE0200210093 +:105480000320002300F03EF810BD10B5E0F704FB48 +:10549000072001F09EFB08210143072001F0AFFB2C +:1054A000E0F741FB15490868CA0D904308601448AD +:1054B0000068002804D0002211000220E0F757FD08 +:1054C00010BD0E4910B50868CA0D10430860E0F71A +:1054D000E3FA072001F07DFBF7210140072001F0EE +:1054E0008EFBE0F720FB06480068002804D000226D +:1054F00001210220E0F73BFD10BD000000210080EB +:10550000A4B701C00A2A10B511D00B2A0FD00C2A5B +:105510000DD1002B0BD100210F20E3F292FE0448A5 +:10552000426981018A43426182698A43DD90AE5AB1 +:1055300001000000B4490200000400007FCC6FB2FB +:10554000826110BD00020090F94B30B580001A58FE +:10555000547815782202F74C2A43A24203D01858F7 +:105560000170090A417030BDF14970B50024086826 +:1055700004704470081F0268C4321368DB08DB0043 +:1055800013600268403254760268EB4DD8321368DB +:105590002B40136002680F25D83213682D03AB43EC +:1055A0001360026840329483026860325475026866 +:1055B000803294630268C032146002688032D4631F +:1055C00000680466086884700868C470086804711C +:1055D00008684471D948C47404757D25AD02002162 +:1055E000280000F087FD0021280000F089FD00213F +:1055F000280000F08BFD0021280000F08DFDCF4831 +:105600003E38446370BDF8B5C94FCD496C37388812 +:1056100088422AD0CB48CC4A0168126801209047C2 +:10562000002822D07988C94E0120012906D1F468CA +:105630003988884084432043050005E0F5683988AF +:105640008840854328430400C149B888096816F09A +:105650006AE88905800A0843F46001D01DF0ECEE89 +:10566000F560BC49012009688847F8BDF8B50525F3 +:10567000070020260020FAF7D3FC0021BC00721E90 +:105680000300934304D16D1E7610002DF7D107E07F +:10569000052D05D1A648001F00594030817604E051 +:1056A000A348001F005940308576A14800250A38DC +:1056B000C1559F4920200939C855A748F901081844 +:1056C000009037E0A54800220188A54813001AF091 +:1056D00004FC009AA900002850502AD0C022028160 +:1056E0009348001F005960304575009A08205258B1 +:1056F000107300984058018940188D49091F0959B5 +:105700008B4A08670123643218001159A8400143ED +:105710001151110068390959121D48611000723881 +:10572000C05D1159834019431151401C1100723959 +:10573000C8556D1CB542C5DB012100201BF02CFBB8 +:10574000F8BD70B5C1788278090211430A2918D1D1 +:105750004278037811021943C27BFF239D335A43D9 +:105760008C1A0CE0C17BFF239D3359430D1816F0B2 +:1057700025FBE97BFF239D3359432800641A002C45 +:10578000F0DC16F01BFB70BD694910B5C06810391C +:10579000095C002908D173490A68002A02D17248BD +:1057A000086001E0FFF762FF002010BD70B5060041 +:1057B0001CF0F6F9002822D15D4DB4003835285987 +:1057C00000281CD17D21694800220901F6F2C6FC9F +:1057D0000028285113D02A000021483A9162C021A4 +:1057E000018128591100C0300C310959803188637A +:1057F000012130001CF0C8F929590820087370BD38 +:105800004B498000091F08580121593002780A438A +:105810000270574A507C084350747047F8B5040032 +:105820000027C068424D80002D1F28584761E0685E +:105830008000285801260761E068800028584666E5 +:10584000E0688000285829004766E0680C390A5C47 +:10585000002A07D1800028581723D83002689B02FD +:105860001A430260E068800028580823D830026894 +:105870001A430260E068800028589B04D830026810 +:105880009A430260E06880002858D83002683243AA +:105890000260E068800028580323D83002681B03A8 +:1058A0009A43026022481038076647668766C766D3 +:1058B0008662E068095C002910D1FFF777FFE06895 +:1058C00080002858C430016831430160E0688000DE +:1058D00028583022C4300168114301602000FFF7CE +:1058E00053FF134810384771E1682248890069580E +:1058F0000866E068FFF784FFE068800028581049D8 +:105900008766E068002804D1094A6C321180518012 +:105910009180074A0B0A7232117053709170090A14 +:10592000D1700349002827D10868C77028E000001B +:1059300030390400DCFE0000F7F2FFFF3C9042A586 +:1059400001000000B04D0200000400002C16BCDE77 +:10595000C0010080FFFF000098F70004A0F70004DA +:1059600000020090A0B701C0A4F70004346D040049 +:10597000B20600047419000438020004E14A02006F +:10598000D419000480000080070C0000052280006C +:105990000858C270E068800008588770E06880008E +:1059A00008580771E068800008584771E068810076 +:1059B0006A585269002A08D0B14803004258183B7F +:1059C0005A50E16889004750E0688C211BF0EEF9DD +:1059D0000020F8BD70B5040016F0BEF9A84EA20074 +:1059E000683EA84BB158002C4B660BD10021B5582E +:1059F0006D6EED0604D5B558491C0A296B66F6DBB9 +:105A0000002C02D0A049B35819669D4B0021543B8D +:105A1000995016F0A5F970BD70B5040014235843D1 +:105A20009A494018F6F236FC984B954EE201D03375 +:105A300000210125D3186D3E09E02A00002804D179 +:105A400088001858002800D100221000491C0028A6 +:105A500002D1325D8A42F0D870BD012008B50090B5 +:105A60008B48142100686A46E4F26DFA08BD894843 +:105A700070474021002810B508D1814A743A9378C4 +:105A8000002B00D041210023537093701BF08EF93E +:105A900010BD70B50C000121C9078A78784B8000D1 +:105AA000503B1958A14230D0002C1C500DD0002082 +:105AB000012185005D59A54204D0451C0E00AE4071 +:105AC000164222D1401C0128F3D36D4D743DE87875 +:105AD000A0421AD0280070498230002C09D0C27828 +:105AE00083781002184388420FD0DFF747FF012068 +:105AF00008E04278037810021843884205D0DFF7A7 +:105B00003DFF0020DEF7BEFEEC7070BDF0B5050075 +:105B100086005B48002421006838825987B01466EB +:105B2000835901225A668059584A4466E801503226 +:105B3000871806900AE0A00005903858002804D085 +:105B4000F6F2ECFA059900207850641C4C486E3847 +:105B5000405DA042EFD84D4F142014373900684300 +:105B6000BC314A4A0B00A83BC3188218C01902AFC7 +:105B70000DC70024E80147180AE0A000019038583A +:105B8000002804D0FFF7E7FD019900207850641C3D +:105B90003B486D38405DA042EFD8394C283C05E0C9 +:105BA0000298F6F24EFBA05116F012F90298F6F2A6 +:105BB00071FB0028F4D1354DD03506E00398F6F29C +:105BC00040FB0699685016F003F90398F6F262FB61 +:105BD0000028F3D105E00498F6F233FBA05116F04B +:105BE000F7F80498F6F256FB0028F4D12449A051A6 +:105BF000743908664866C866886607B0F0BDF8B5AF +:105C0000002425001E48A7001C3814266643C551F1 +:105C10001E4814213018F5F2C0ED1C481421143030 +:105C20003018F5F2BAED1948142128303018F5F281 +:105C3000B4ED134830226C38C1596243174810182C +:105C4000C4608160456185611549C561016115497F +:105C50000162154985624162E4F2DEF8641C012CA0 +:105C6000D0DB0A4814213C30F5F296ED0F490820AC +:105C7000DBF78FF80E49FF20401C8860F8BD00005C +:105C800094390400EFFEFFFF170C0000E46C0400E1 +:105C900000000004BB4E0200FFFF0000346E040051 +:105CA000914C0200D504040061080400410D040079 +:105CB00000300080F0B5002485B00F0026002500DC +:105CC00004A805F048FB00281CD0E9F764FA6B46ED +:105CD000597C002801D1C90600E08906002900DAB4 +:105CE00001243A0001A905F065FB01280AD16B46A1 +:105CF000187C2B000207120F00923200210001A82D +:105D000000F0E7FA05B0F0BD70B50400401E044293 +:105D100026D105F023FA204222D005F015FA2042C0 +:105D20001ED020001DF03AED0E4C616AC031C877DC +:105D300001000120FFF7BEFF606A0025E0304570DA +:105D4000F8F782FE08480560606AC030A86C11EB65 +:105D500001000000AC5102000004000093D3996DD3 +:105D6000C17F81770020FFF7AFFF606AE0300570E8 +:105D7000012070BD002070BD14C70004E4BE01C046 +:105D800070B52C20B14D2C1D29001DF016ED286892 +:105D9000411C0FD000280DD021001DF00EED206811 +:105DA000E4F2A6FB2060A888A949884202D1A8791C +:105DB000012800D0002070BDFEB5FFF7E1FFA34D24 +:105DC000002160350028297000D1FEBD9F4E376844 +:105DD0003F1D00245420604301A9C0191DF0ECECC4 +:105DE0000198F179000E81421BD154206043C01903 +:105DF000964FB06001200C3700242870B068A500D1 +:105E0000401969461DF0D8EC0098E4F271FB00904F +:105E1000E81904226946F5F22EEC641C152CEDD32A +:105E2000FEBD641C062CD5D3FEBDFEB51DF0C8EC2E +:105E3000884F0C20391D1DF0C0EC390008311020AE +:105E40001DF0BAEC39000C3130201DF0B6ECFFF734 +:105E5000B3FF4C2002A91DF0B0EC0298411C17D0F2 +:105E60000604360C300002A91DF0A6EC02980006CC +:105E7000000E0C2801D00D2851D1482002A91DF098 +:105E80009CEC02980504AF202D0CC000854203D97C +:105E90001DF09AEC0120FEBD00240BE0301902A990 +:105EA0001DF08AEC0298E4F223FB3919241D240426 +:105EB000240C4861AC42F1D33000694623E002A9CA +:105EC0001DF07AEC0298AF21000C02902818C9004E +:105ED00088421ED800240DE0009801A900191DF089 +:105EE0006CEC0198E4F204FB2919C919241D24045F +:105EF000240C486102988442EED30298694628181F +:105F0000050400982D0C001D1DF056EC0098411C56 +:105F1000D5D14E493E82012010397D8248731DF053 +:105F200054EC0020FEBD10B54A4C211D081D1DF08B +:105F300050EC23001233AF218022C900981C1DF0C1 +:105F40004CEC002805D180204049208201201039E6 +:105F5000487310BD08B51DF034EC002069461DF0F3 +:105F60002CEC1DF032EC3C490098884201D0002016 +:105F700008BD012008BD35481038407B002800D0FE +:105F80000120704731481038807B7047314900202C +:105F9000488208822D4910394873704770B5FFF761 +:105FA000F5FFFFF7D7FF294C0125103C012803D14D +:105FB000FFF73BFF257303E0FFF7B5FF02202073D7 +:105FC000244A90680004000C906051684B1C03D177 +:105FD000224988420CD103E0002909D1002807D1C9 +:105FE0001F485060FF20FF3090600020A07370BDFC +:105FF000A57370BD70B50C00AF211500C9008C42AF +:1060000001D9012070BD0100124822001430F5F2C0 +:1060100032EB10480D494482058201201039487343 +:10602000002070BD70B50B4D0B4C2868A0420BD002 +:10603000592109012800F5F2BAEB04486421F5F270 +:10604000B6EBFFF7ABFF2C6070BD0000901A00C0EC +:1060500088880000001500C058303338FFFF00006A +:106060000050430270B505000C0009D102E0012088 +:10607000DFF78EFC28001DF0BFFC0028F7D011E0F0 +:10608000641E28001DF0B8FC00280BD10120DFF7AA +:106090007FFC002CF4D11649A8000A58521C0A5063 +:1060A000002070BD012070BD124B30B501211A686F +:1060B00081400A408000002A05D10D4980310A58EC +:1060C000521C0A50FEE70A4C803C2258012A02D199 +:1060D0001D688D431D60521E2250012030BD0228D4 +:1060E00000D10120BEE7022800D10120DCE700003A +:1060F00088480004C02A008010B5E2F2FDFE10BD01 +:106100001A4910B588690122120590438861184820 +:106110000068002801D0DFF729FB10BD0122110023 +:1061200010B500F013F810BD0022012110B500F0E9 +:106130000DF810BD0122002110B500F007F810BDC8 +:106140000022110010B500F001F810BD10B50400D8 +:10615000002908D0002A03D02000DFF74310C60F23 +:1061600001000000A855020000040000C0094A0117 +:106170008DFE02E0200000F0B2FB200010BD000008 +:1061800000210080E49101C0024800888007C01708 +:10619000401C7047181B0004BD4908220028C8682D +:1061A00001D0104300E09043C8607047B949002017 +:1061B00010B54860EAF766F910BD70B50322B64B1A +:1061C000B448B64C00785D691202002901D015432D +:1061D00000E095435D6113F0EBFF0100200013F038 +:1061E000AFFF70BD38B505000024684605F0DBF848 +:1061F000002802D1002D1BD10BE0002D0BD16B46E6 +:106200005878C10714D0400612D598788007800FBF +:106210000CE001240CE0012D0AD16B46587881076F +:1062200006D5C00904D098788006800F0128F0D0E8 +:10623000200038BDF3B581B06B4605005C7A60077D +:106240001BD5944E7068002817D1944F0021380058 +:1062500013F076FF0721380013F072FF9148904940 +:1062600041619149C161C16B032212069143012230 +:1062700052061143C163012070602800FFF7B2FF8E +:106280000106090E2800FFF798FF600703D46B464C +:10629000187A000900D00120FFF77EFFFEBD33B55C +:1062A0006B460028197902D10807000F02E0012887 +:1062B00013D108097D4A7649D443803100280DD096 +:1062C0007B4B7C4D01280DD0092810D00F2804D11C +:1062D000C817C8600861C86108623CBDCA600A612D +:1062E000CC6102E0CB600A61CD610C623CBDCB6049 +:1062F00071480861CD617148EEE7F0B50028047A75 +:106300004578067947792BD001290CD105990129C7 +:1063100009D1012A06D16540D90700D06640990706 +:1063200000D567402C00664B1968914200D01A6076 +:1063300001782A0609040A4321020A4359492243E3 +:1063400040394A628279C37812041B021A433243ED +:106350008A62C279807812043B021A430243CA62FD +:10636000F0BD30B5050087B0002406A805F01BF885 +:10637000002825D121002200230002A805940EC088 +:106380006B46187D280002AA05A91C7500F026F8A6 +:1063900005992800FFF74EFF6B46997D2800019173 +:1063A000FFF77DFF6B46187D23000207120F009256 +:1063B0002200210002A8FFF7A0FF012007B030BD96 +:1063C0006B46187E0007000F01D0012804D1069902 +:1063D000280000F02EF804002000EFE710B54B78FD +:1063E00007242343CF242340402423435B065B0E32 +:1063F0004B708B78F0241B091B015B1C23438B70B3 +:106400000A2100280AD10920507010700C23107244 +:106410009371D3701071D371507108E05170117085 +:106420001A2011729071D0701171D07151719170E8 +:1064300010BDF3B585B00025070022482E00406A44 +:106440002C00C030C27F380002A904F0C7FF00282A +:106450001CD006993800FFF7EDFE6B46997E380098 +:106460000191FFF71CFF6B46587EC10601D48006E0 +:1064700000D501256B46187E23000207120F0092FB +:106480003200290002A8FFF738FF012007B0F0BD55 +:1064900000900090A00700040028008000A0008069 +:1064A000F3770000009100900C88000011DD55DDAD +:1064B0001FDF5FDFEF2FAF2FF1FDF5FDFEF2FAF2E8 +:1064C0000018000414C70004044903480860044984 +:1064D000001F007808707047AC070004ACF7000498 +:1064E000A8F7000470B505002924DFF79BFC200005 +:1064F000DFF7F5FB29002000DFF7E3FBDFF784FC83 +:1065000070BD7047704710B5DFF78CFC02212B205F +:10651000DFF7F0FBDFF778FC10BD704710B51DF01A +:106520006AE9411C02D00006000E10BD7B2010BDA0 +:1065300010B500F045F810BD10B5E0F745F9DFF7EC +:1065400071FC01210F20DFF7E0FBDFF75DFC10BDE0 +:1065500010B5DFF718FD10210420DFF7D6FB01216D +:106560000520DFF7D2FBDFF715FD10BD71625B0080 +:1065700001000000A45902000004000034663FB589 +:1065800010B5DFF70AFD10210420DFF7BDFB012164 +:106590000520DFF7B9FBDFF707FD10BD10B50400DC +:1065A000DFF74AFC002C0AD0DFF7D4FB000706D443 +:1065B0002C211920DFF78FFBDFF730FC10BDEE2117 +:1065C0001920DFF788FB60211A20DFF784FB6C219C +:1065D0002820EFE7F8B500246727DEF78DFA0028BA +:1065E0003DD1DFF729FC04211620DFF798FB1D4D74 +:1065F0000621286815F0BEE88905800A084301D005 +:106600001CF042EFFFF794FF01001F20DFF763FB50 +:1066100010212020DFF778FB7D26F6002868062170 +:1066200015F0A8E88905800A084301D01CF02CEF7A +:106630000920DFF75EFB641C000602D4B442EDD3F0 +:1066400003E00820DFF755FB070010212020DFF7CB +:1066500066FB04211620DFF757FBDFF7DFFB38006E +:10666000F8BD0000A0B701C03C490A7FD207FCD1A9 +:106670003A4920310882704710B5DFF75BFB0528E7 +:1066800006D0062806D00A2806D17D21090205E099 +:10669000334903E0334901E00121C903324A9368D9 +:1066A0001B041B0C090419439160916802231943D0 +:1066B00091609168042421439160072802D1906879 +:1066C0009843906010BD012010B5FFF767FF274881 +:1066D0000168C20B1143016001684908490001606B +:1066E000000C10BD70B51DF094E82049CA0B0028BD +:1066F000086805D01043086008680122104304E0D0 +:106700001043086008684008400008600020FFF758 +:1067100045FF154C403CA06B21050843A063A06BCE +:10672000C9100843A063A56BDFF704FB052805D05B +:10673000062805D00A2805D10D4804E00D4802E0DE +:106740000D4800E00D48290E09060143A1630C49DC +:106750000868022210430860080C70BD0008009011 +:10676000143B0000AB7A000040210080002800802C +:106770008509040020DF0300705E04006831040016 +:10678000002C008070B50500664A674E1178C80776 +:10679000000F3358AB4201D1801907E0491CC807EC +:1067A000040F11703059A84202D1A019406870BD81 +:1067B00064212800F5F2C2EC5C490200002043008D +:1067C000CB5A934202D2401C0E28F8D3A11935515E +:1067D000486070BD70B50500524A534E517810366E +:1067E000C807000F3358AB4201D1801907E0491C9C +:1067F000C807040F51703059A84202D1A01940684F +:1068000070BD64212800F5F29AEC4849020000208E +:1068100038314300CB5A934202D2401C0C28F8D3A3 +:10682000A1193551486070BD4248414A4168114341 +:106830004160414AC1681143C16070473F4870B52B +:10684000006800281ED0DFF775FA0500DFF782FA2E +:106850000400DEF7E6F9DEF7FEF9DEF730FA28008D +:10686000DEF799FC2800FFF7DFFFDEF727FD2000A9 +:10687000DEF743FF2800DEF721FE0520DEF7FAF9F8 +:10688000DEF7BCF970BD70B515F084FA0500DEF7CF +:106890007CFF264940001C31085A642444432800E8 +:1068A00015F07CFA200070BD70B5040015F072FA86 +:1068B00005002000FFF766FF1C4970310C5C2000CA +:1068C000DEF773FC194960001C31085A6424444304 +:1068D0007D21A002C900F5F232EC401E0521F5F23F +:1068E0002EEC1749401C0860280015F057FA2000CC +:1068F00070BD70B5040015F04DFA05002000FFF7DB +:1069000069FF0A4981310C5C2000DEF75BFC074916 +:1069100060005031085A64244443280015F03EFAC0 +:10692000200070BDCC070004A050000470320400A9 +:10693000103254760027008022436577E49101C02D +:10694000A0B701C010B5DFF7F5F9064AD16A064BCA +:1069500080001940054B1858034BDB431840014396 +:10696000D16210BD00210080F9FF00005C330400FB +:10697000704770479A4A99491160016032C3760C9A +:1069800001000000A05D02000004000067BCECD91B +:1069900099480078002800D001207047002804D0D2 +:1069A0000A2803D0102803D1032070470F20704716 +:1069B00001207047F0B587B00E0084461100180022 +:1069C0000D9D0C9C00220E9B009604920390059254 +:1069D000019102902A0021006046E0F247FB002866 +:1069E00001D0FFF7DBFF07B0F0BD70B50C0015005C +:1069F000049A19000A2C04D113002A00DDF218FEB3 +:106A000001E0DDF241FC002801D0FFF7C7FF70BDB7 +:106A10007CB55A43040006980D001600002801AB0F +:106A20000BD1744800220092006832000A217830AD +:106A3000FFF7DBFF002800D0FEE7019B01222900C1 +:106A400020000096DFF2FAFD002800D0FEE77CBDB2 +:106A50001FB5002202A9E0F2A7F8002801D0FFF735 +:106A60009DFF04B010BD1A0010B5DFF2CFFF002863 +:106A700001D0FFF793FF10BD604910B54968DFF200 +:106A800087F8002801D0FFF789FF10BD052A10B54F +:106A900007D0062A05D0072A01D0082A02D10022F1 +:106AA00000E00222DFF276F9002801D0FFF776FF3E +:106AB00010BD00B587B00B0003AA04A901921A000B +:106AC000009106A905ABDFF23DF9002801D0FFF7E0 +:106AD00065FF07B000BD7CB5060010001D00002357 +:106AE000069A052801930BD0062807D0072803D063 +:106AF000082806D1012004E0002002E0032000E085 +:106B0000022000920200300001ABDFF2B3F8040073 +:106B100001981A2C286001D0072C08D129003000D8 +:106B2000FFF7C7FF02201A2C00D021207CBD002CCB +:106B300001D100207CBD2000FFF730FF7CBD0A00A2 +:106B40002FA110B5E0F212F9002801D0FFF726FFBF +:106B500010BD10B5E0F27EF9002801D0FFF71EFF4E +:106B600010BD10B5E0F23AFA002801D0FFF716FF89 +:106B700010BD012225A110B5DFF278FA002801D05E +:106B8000FFF70CFF10BD10B5DFF2FEFA002801D0B0 +:106B9000FFF704FF10BD10B5DFF222FC002801D082 +:106BA000FFF7FCFE10BD38B51400049D1A000A2939 +:106BB00005D1130011492200DDF2CCFD05E0009261 +:106BC0000E4923002A00DDF2E3FB002801D0FFF785 +:106BD000E5FE38BD0A2910B502D1DDF2FFFD01E066 +:106BE000DDF222FC002801D0FFF7D8FE10BD000026 +:106BF000A02E0004400200043C020004D007000460 +:106C00004F53415F53656D61000000004F53415F7A +:106C10004D7574657800000007E003788B4207D05B +:106C20004378801CD21A921E1818022AF5DA002026 +:106C3000704700007E4A7D487E49906008680623C0 +:106C40001843086001205060704710B50400784870 +:106C50000168002901D1002010BD4168002904D03D +:106C60008068A1000818007810BDE3F2D4F87248DB +:106C70000481007910BD70B504006D480D000168F5 +:106C800000290AD0416800290DD0112C06D1A9068F +:106C9000664A890F89028918816070BD8068A100E9 +:106CA0000818057070BDE3F2B6F8634804810571F9 +:106CB00070BD70B504000BD0604D03E0A178FFF704 +:106CC000DAFF241D2088A842F8D1A178FF29F5D148 +:106CD00070BD70B504000D00FFF7B7FF2843010039 +:106CE0002000FFF7C8FF70BD70B504000D00FFF76E +:106CF000ACFFA84301002000FFF7BDFF70BDF7B552 +:106D00000F004F4A0021904200D80121491C09017F +:106D100041430A264E430298F517002801D1B619BF +:106D20006D4100243A00230029003000F4F260EAAB +:106D300023000322F4F25CEA0100C017000F4018A0 +:106D400000090001091A4900102900DB1030C117A1 +:106D5000090F0818041120007843302358432B00F2 +:106D6000C117301A8B41C20A590511437A00D21952 +:106D70004005D317F4F23CEA050000260F00801B03 +:106D8000B14102DB3300082202E0002390BBC027A0 +:106D9000010000009C610200000400004F2D6964A6 +:106DA000DB43DA00A8183900594133001022F4F20D +:106DB0002AEA0F0005007140084302D039006D1C1B +:106DC00071410298002800D064002106090E292094 +:106DD000FFF75BFF20002038402801D203200CE0A1 +:106DE00020006038602801D2022006E02000FF2148 +:106DF000C0384131884221D20120610880221140EF +:106E0000000101430906090E2A20FFF73EFF3F213A +:106E1000280009040840010C2B20FFF736FFFF2152 +:106E2000280009020840010A2C20FFF72EFF29063E +:106E3000090E2D20FFF729FF0020FEBD0120FEBD19 +:106E400000600090E0070004002B00802008009004 +:106E5000FFFF0000B80B00000748002110B50068D4 +:106E6000C94316F0C2F8002010BD034810B50068F1 +:106E700016F0C2F810BD0000BCBE01C0F7B582B06C +:106E80000E0014F09BFF00243700203701901820DB +:106E9000604353490A5C002A46D0451879786878DF +:106EA0000909884240D1281D0622B11D14F0B1FB0A +:106EB000002839D11821614349482E0008180021C3 +:106EC0000173FA78BB780A36120230881A43012718 +:106ED0000D3512093F0390421AD104980069002829 +:106EE00002D02878042813D337802970029840797B +:106EF00002281CD10298F1F7C3F9002808D00298A3 +:106F0000112149014018418A02980022EEF7CDFF75 +:106F10003088B8420BD02878022808D2210602987F +:106F2000090EE7F75EF902E0641C042CAFD3019868 +:106F300014F048FF05B0F0BDF8B504000D008878E6 +:106F4000012600092035052839D02EDC012801D082 +:106F5000032832D1200019F01EFD07001037200051 +:106F6000E1F7DAFF002812D0A068C0040FD5B87F7F +:106F7000010701D480060AD5E878A9780002084301 +:106F80001E2804D0002201212000E1F77AFC0F2006 +:106F900080012018006A00280FD1A06840070CD497 +:106FA00000212000FDF7D3FB07E00B280FD00C28B1 +:106FB00003D1110020000CF04BF93000F8BD20790E +:106FC0000228FAD12000F0F7C0F80026F5E768792A +:106FD000297900020843F0D020000CF074F9ECE7A6 +:106FE00014CB0004814800787047332180480901A0 +:106FF00010B5F4F204EC7D490020087010BDF0B526 +:10700000002085B0009014F0D9FE002502900120E8 +:1070100001900C20684376494218085854680028AB +:107020006DD0002C6BD0208967690619002F0FD016 +:107030000F20800138180069002120300172387952 +:10704000032805D13800F9F7C4FC00218030016322 +:10705000300060300390C27F002A04D074213800D1 +:107060000123EBF7ABFD306F80780007800F02281B +:1070700002D12000FEF706FA0398407F302802D1A3 +:10708000200011F07FFA0398407F212802D10120CF +:10709000009015E0382813D1306F80780107890FF0 +:1070A00002290DD100090C2801D0042808D151492A +:1070B000C869401EC86150490869022290430861AE +:1070C000316F88780007800F07D160694279022A02 +:1070D00003D13200FFF730FF0190606900223100D8 +:1070E00018F0FDFD422D04DD20000EF00BFE0028FF +:1070F00005D00198002802D02000F5F241F86D1C5F +:10710000442D84D3FFF771FFFBF7C3FE00980028DE +:1071100001D001F0DBFF029814F054FE05B0F0BD81 +:10712000FEB514F04BFE0090DDF7FAFC2F4C002862 +:1071300011D132480169406981420CD0009814F0A5 +:1071400041FEA0680722401CA0602D480121006874 +:1071500015F047FFFEBD01A814F03DFE019DE0685B +:107160002178281A002925D00A2823D300221000CC +:10717000FF271F4E4B37E56015E00C234343F458BF +:10718000002C0DD09B195C68002C09D09B68491E0F +:10719000EB1ABB4204D9154C63885B1C38CC4409FC +:1071A0000100000098650200000400001CF7BA0806 +:1071B000521C6380401C442801D20029E7DC002ACD +:1071C00002D01020E4F7E2FF009814F005FEFEBDA7 +:1071D00030B504000B4D002001000C224A43AB588F +:1071E000002B07D052195268002A03D05269A242DC +:1071F00000D10120491C442901D20028EDD030BD26 +:1072000010080004E4E4000418420004C0A2008056 +:1072100000A000800C080004F3B583B0452254237D +:1072200001A902A8EBF74BFB754D00283FD002994E +:107230000398486101980400103421000020F4F202 +:107240009EEB08222900201DF4F246EAE8F2D3FC66 +:107250002A686B6807000E00121A8B4104D20CCD0D +:107260003100B81A994104E003CDC043C943C019A5 +:10727000714121000C31F4F282EBFF2010345C30BC +:107280002070000A60700120A0700020E070207162 +:107290000498002801D008202071019915208872D7 +:1072A0000020C87202990398EBF7D4FA012005B0C8 +:1072B000F0BDF3B581B00D0014F08AFD504E04000E +:1072C000B168080003D1200014F086FD17E0002DFE +:1072D00001D0E3F286FA00272000B76014F07CFDAD +:1072E000484C002D03D121680198FFF795FF2760D6 +:1072F00000F0F4FD1CF0AEEA0198F6F785FA0020E4 +:10730000FEBD0A003E498968814202D10021100079 +:10731000CFE770477CB50C000600CD784878097837 +:10732000000208432900EDF756F901006B46187971 +:1073300089078006800E80088000890F084301902D +:10734000A178F323022906D0CF22032908D01840C0 +:10735000104001900DE0184008303021084302E051 +:107360000C210843104001902A00300001A906F0CA +:107370005BFB01980122290006F077FB21490020E0 +:10738000086000F0B9FDE8F236FC1D4A03C2F6F7CA +:1073900002FA201DF4F2E2EA7D23DB0058430022CA +:1073A000174B00920200184808333100DFF782F9CA +:1073B00000207CBD001D10B5F4F2D0EA002800D0FA +:1073C000012010BD70B505000E000124081DF4F267 +:1073D000C6EA002804D101212800FFF76AFF70BD2A +:1073E00007488068002804D10420FAF768FC0028C8 +:1073F00001D0200070BD31002800FFF78BFF70BD69 +:107400002052000438BB01C0EB6602008068800493 +:10741000C00F70470100896800208A0402D5490422 +:1074200000D5012070470179012905D10F2189017B +:107430004018806A513070477930704770B5040049 +:107440000D00002808D00E212000F4F20CEA0020E4 +:10745000C043A071000AE071002D03D0072128006D +:10746000F4F200EA70BD10B50400806803214903FE +:107470008843A060C4480021FFF7E0FF207901287D +:1074800007D10F2080012018806A00215130FFF7BA +:10749000D5FF200000217930FFF7D0FF20790028A8 +:1074A0000AD12000F9F7D3FB403001798F228908F7 +:1074B0008900891C1140017110BD70B504000D00D8 +:1074C000332908D2292D01D20E2100E016212000F7 +:1074D000E6F70DF970BD6079022807D1200019F098 +:1074E0003DFA112149014018417F0CE0ECF71AFCEC +:1074F0000F21890161180128086902D160300179E2 +:1075000001E0603001782A0088064906C00FC90FE3 +:107510007934333A092A06D8A17889060AD5002891 +:1075200008D0012070BDFF2D04D3A078400601D5FE +:107530000029F6D1002070BD70B50500002419F0B7 +:107540000DFA06002800F9F782FB02000F208001E7 +:107550002B792918F4F2DCEA07050F050516161237 +:1075600016006879022802D18848341808E00028FB +:1075700006D0146C04E08C6A5F3401E08C6A5034ED +:10758000200070BD14F024FCFEE7F8B505000E00E5 +:1075900017000024FFF7D0FF03002800FFF743FF88 +:1075A000A9688904C90F09D0BF2E09D06A1A1EC65E +:1075B000010000009469020000040000E898CFBCBC +:1075C000C02E05D1072219003800F4F290E80724F4 +:1075D0002000F8BD01000E223800F4F288E80E24E5 +:1075E000F6E770B5060088780C00C1070F2080010F +:1075F0003518002905D0286904226030211DF4F2D5 +:1076000076E8A078800711D5286904226430211D0E +:10761000F4F26CE8E078C10708D0296940076031CE +:10762000CA7B52085200C00F0243CA733000F6F7FB +:1076300031FF0920800130180400F0F2B1F9010097 +:10764000220030000FF097FE70BD70B50C008978F5 +:10765000FB268A070F21890145182969002A10DABB +:1076600064310422201DF4F242E8E078C10707D01B +:10767000296930406031C97BC907490F0843E07070 +:1076800070BD60310422201DF4F230E8E078304013 +:10769000F5E710B504007B21095D0020C90609D576 +:1076A0006079022807D1200019F062F94030807813 +:1076B000C007C00F10BDECF73FFB0F218901611817 +:1076C0000128086902D16030007901E0603000785B +:1076D000C006C00F10BDF8B505000024FFF736FF47 +:1076E00006002800F9F7BDFA0700280019F040F954 +:1076F000280019F064F96979103002290BD1803023 +:1077000040798107B078890F421C914200D3411C17 +:1077100002291BD119E0ECF70FFB012816D12879BB +:10772000062812D00F208001281800696030C07B25 +:10773000C0070BD040373879B1788007800F4A1CDA +:10774000904200D3481C022800D101242000F8BD3B +:1077500010B50021016604004166603407216830DD +:10776000F4F260E82079202108432071E07B0121B8 +:1077700008430840E07310BD01007931CA79897966 +:10778000120200200A4301001300CB40DB439B0799 +:1077900000D0401C891C1029F6D370473E520004CB +:1077A0004902000030B50022C74CE378002B0AD014 +:1077B00007E0A5182D79854202D101200A7030BD5D +:1077C000521C9342F5D8002030BD10B5BE4C0020AD +:1077D000E3780B2109E0221812798A4200DB1100BC +:1077E0000906401C0916000600168342F3DC0B381C +:1077F000042800D30B210806000E10BD8068C005C8 +:1078000005D5B148C078002801D00120704700207C +:107810007047AD48032110B5F4F22EE8AA480021C4 +:10782000C1704021001DF4F228E8A748142240212D +:10783000443013F02EEF002010BDF3B587B00500E3 +:1078400000200490A0484E1CC078002877D0072064 +:10785000087000208C1C30709B4903222000F3F23A +:1078600046EF3078E41CC01C307008946879022818 +:1078700004D1280019F0A3F8007A0AE02879012839 +:1078800001D0002808D10021684606F0C7F96B46F0 +:1078900018788007800F00E0012001900020012768 +:1078A00005000290059033E0002F05D148194030C3 +:1078B0000079029A904214D00598002743001818C6 +:1078C0000419481902792270403000790122A07011 +:1078D0006270029004980592401C0006000E04900D +:1078E00002E06078401C60704819069001790391AD +:1078F0000199039812F0C0FB0399401801060698FD +:10790000090E4079884200D001276D1C2D062D0EEE +:107910006D49C878A842C7D8049832784100091840 +:1079200050183070089A8918C00704D000200870D9 +:107930003078401C30703078801C0006000E09B092 +:10794000F0BD10B507220A7000220C004A70891C95 +:10795000FFF773FF002806D0811EA170090A801C62 +:107960000006000EE17010BDF8B5050007260024E2 +:1079700007E013F051FE2855641C2406240E032C46 +:1079800002D2285D0028F4D1504F00240EE0A00060 +:10799000C1190322280013F050FE002803D1A000D3 +:1079A000C019C078F8BD641C2406240EB442EED37E +:1079B000F878F8BD70B50400007800255CD6EA4A76 +:1079C00001000000906D020000040000BB421CD0CA +:1079D000072805D1FFF727FF641C2678002E01D168 +:1079E000002070BD641C3D4803222100F3F288EEA4 +:1079F000E41CF61E3206394E120E23E02078C92808 +:107A00001CD200281AD0002011E0402D02D3FFF72D +:107A10000AFFE5E721780B1871190B716D1C4031D5 +:107A20002D06401CA3782D0E0006000E0B71617808 +:107A30008142EAD8F17860780818F070D21E1206F8 +:107A4000120EE41C012AD9D8012070BDF8B50C0033 +:107A50000700022A08D1FAF72EF8002801D00020EA +:107A6000F8BDFFF7E0FE36E0951E32E06078217841 +:107A70000002084307281DD1E278A37811021943B8 +:107A80000E06360E0721E670A01CA170FFF79CFFC2 +:107A900000280BD0ECF7B6FA010001223800ECF711 +:107AA000C6F90E48FFF76AFF00F0C2FA310AA67065 +:107AB000E17006E00100FF39AC3902D1207900F015 +:107AC000B7FAE178A278080210432D1A2D1F241D61 +:107AD0000419002DCADC0120F8BD00004F5200043B +:107AE00020080004FF487047FFB583B00C00150064 +:107AF0001E000C9FC822502301A902A8EAF7F3FE3A +:107B000000280CD001980421047445748674C7744D +:107B100081720021C17202990398EAF7AFFE07B0A3 +:107B2000F0BD38B50C0011001A0063780125F4F29D +:107B300004E805222404080D2200200012F0E1FAD6 +:107B400002E0200012F0DFFA050014E0A1782529F8 +:107B500011D1A2790092637921790022FFF7C4FF45 +:107B60002079012807D1DF4C2C3CE06A002802D1A3 +:107B7000E4F749FCE062280038BD13000A00210048 +:107B800000F073F9E0E7D74910B52C398A688242D2 +:107B900004D1002088608020E4F70CFB10BDD1499F +:107BA00010B52C39CA68824205D10020C860FF2078 +:107BB000401CE4F7FFFA10BDCA4810B52C388069A4 +:107BC000002803D0C7481438E4F783FC10BDFEB585 +:107BD000C44D2C3DA86800286CD1E88B00260028F5 +:107BE00068D08402E8F21BF802902A696B69029857 +:107BF000A21873410F00801A99412ED2BA4A2869FF +:107C0000731E69698018029A59413B00121A8B4110 +:107C100023D3E868002820D1A86900281DD1E4F703 +:107C2000F2FBA861E7F2FBFF00902A696B690F0085 +:107C3000A0183100009A5941841AB941002233003A +:107C4000121B8B4100DB3400A64B00220092A74898 +:107C5000203B22000021DEF741FD687F002829D06B +:107C6000012801D901202877F7F741FB697F2A69AC +:107C700048436B6931008018594169612861E7F216 +:107C8000CEFF2A696B69101A8B41974A19000023AD +:107C90008418DB43594100223300121B8B4100DA68 +:107CA0002600904B002200929148243B3200002194 +:107CB000DEF714FDFEBDF8B504008A4D2C3DA86822 +:107CC000002814D061792379EA8B090219438A428A +:107CD0000DD1697FE278914209D1E279A379298CAB +:107CE00012021A43914202D1297F002942D0A17881 +:107CF00000293FD000260A293CD8E2F286FD2E77E3 +:107D00006079217900020843E883E0786877E079B8 +:107D1000A17900020843288472481C38F7F7EEFA6C +:107D2000F7F7E5FAA1782A69491E48436B69298C5F +:107D3000821873418C02E117A018594169612861CA +:107D4000E7F26DFF2A696B69101A8B41664A1900C8 +:107D5000731E8418594100223300121B8B4100DA34 +:107D60002600604B002200926148243B3200002133 +:107D7000DEF7B4FCF8BD70B50600049DFF200024BA +:107D8000002B02D0300012F08BF9002D00D0AC781F +:107D9000844201DA001B70BD002070BD38B50400BC +:107DA00008001100059A1D000092049B2A00FFF7AD +:107DB000E2FF0100EF20800001222018ECF725F8F7 +:107DC00038BDFFB581B00C001700464D2FD7BEE778 +:107DD000010000008C710200000400000487396378 +:107DE0002C3D002921D028002030017A01260029CD +:107DF00008D1067222790092E378A17801980022D6 +:107E0000FFF77CFEA078012807D1E86A002804D19A +:107E10003D480660E4F701FBE8622079012804D1BF +:107E2000019807220021ECF7E3F9002F04D0380075 +:107E3000FFF74BFF05B0F0BDA868E2F2F0FCE86880 +:107E4000E2F2EDFCFFF7C2FE2B4820212438F3F2CA +:107E5000FEECEFE710B5284C2C3CA068E2F2DFFC0A +:107E6000E068E2F2DCFCFFF7B1FE200020210830E0 +:107E7000F3F2ECEC002120002030017210BDF8B5C7 +:107E80000400012000905078CE1C117800020843B5 +:107E900040010121801889024018871B6079002564 +:107EA000022807D1A068800504D500F0B8F80028A2 +:107EB00000D001252079002804D020001BF0BCEC64 +:107EC000002806D0A068800503D500F095F80028AA +:107ED00001D1002D1ED03A0027213000FEF7CEFE42 +:107EE000040017D02079002814D1ECF795F86179B7 +:107EF00088420FD1207C09E00453000478ECFFFF96 +:107F00005F6F0200476F02003C080004000701D5C4 +:107F100000F09BF80098F8BD10B51BF0BEEC10BD4A +:107F2000012810B505D101034D480722006815F05E +:107F300080F810BD4D4810B54A4A4B4900781BF0F7 +:107F4000B0EC10BD7CB50024694601A805F07AFEAE +:107F50000120F9F7D4FD05000020F9F7D0FD6B46AC +:107F600019798907890F01290CD14049491C002D35 +:107F700002D00A78920704D4002803D0087840077A +:107F800000D5012420007CBD10B5FFF7DBFF0028E1 +:107F900002D0FFF7CFFF10BD1BF07EEC10BD30B458 +:107FA000324CFD25641C2278FB2300280DD1940758 +:107FB0000878E40F6400284052072043D20F18408D +:107FC00092001043087030BC70470128FBD108783C +:107FD0002A408107C90F490040070A43C00F1A40D1 +:107FE00080000243900751070843C00F5108490021 +:107FF0000843207030BCC7E71CB5694601A805F0EE +:1080000021FE6B46197900208907890F012905D1C6 +:108010001649491C0978490700D501201CBD1CB52B +:10802000694601A805F00EFE6B4619790020890704 +:10803000890F012905D10D49491C0978890700D507 +:1080400001201CBD0949087070475321002010B55C +:10805000EAF7A2FC10BD10B51BF01EEC10BD00002D +:108060007C050004CD720200803801004008000445 +:10807000F8B50D0004001100EBF7D4FF00282860CC +:1080800012D0018922004618F849AC3200926218D9 +:10809000F121890061180D23ECF718F8082020362B +:1080A00030702968C0200881F8BD38B515000C0073 +:1080B000FF222D326946FFF7DBFF0098002801D12F +:1080C000401E38BD01892A0A0818010020314C7071 +:1080D0008D70CA7004210170002141700098ECF786 +:1080E00033F838BD020008000D218901411810B590 +:1080F000CB6A934205D10022CA6207220021ECF725 +:1081000077F810BD020008000D218901411810B553 +:10811000CB6A934206D10022CA62D4490222411896 +:108120000BF038F810BD70B501254A78002A0BD045 +:10813000012A07D10D2189014418E06AE2F26FFBA0 +:108140000020E062280070BDCA78897812020A43D4 +:108150000121FFF7AAFFF5E7F0B589B000270C6F02 +:108160004069069018F018FC21002288203155182B +:10817000089106994979022904D1FF30FF30801C0B +:10818000466904E006980D2189014018866A002E90 +:1081900073D0002D71D04C202870102068705820AA +:1081A000805D68803000338F38302A1D011F5B1CD2 +:1081B0001B041B0C338702D10B685B1C0B6000880F +:1081C0001080901C096801600022FF21A848D2435A +:1081D000F531F4F227F8059001890F187EAB288954 +:1081E000010000008875020000040000575DEA0FDE +:1081F00028000A3008210790F3F25CEBA078387071 +:10820000E078C721084078700622A11DB81CF3F25F +:108210008CEA2100380006220C310830F3F284EA9F +:1082200021003800062212310E30F3F27EEA1437B4 +:10823000228808993800F3F278EA20881222C019BF +:108240002900F3F272EA208812302080069814F098 +:10825000BDFE002808D00698DAF719FE0599228895 +:108260000B891432591806E00598228801891432C6 +:1082700009183000143001ABE2F28DFC0798082297 +:1082800001A9F3F252EA05980127F3F2ABFF380097 +:1082900009B0F0BDF0B5002291B005920492012220 +:1082A000050003920022080060300E92F3F27EEB8C +:1082B000040068690D902100228820314C20109123 +:1082C000F1F20DFA07000D98002873D00D990D20DA +:1082D000800108180F90856A002DF6D0002FF4D089 +:1082E0000D98083514F072FE002820D10D98F9F78A +:1082F000D1FF002803901AD028002C3004AA05A929 +:108300006B4607C32B00E87930330207120F391D83 +:108310000020D9F731FA002809D00F98806B002887 +:1083200002D0C16D491CC165002011B0F0BD002212 +:10833000FF215448D243F531F3F27EFF0189060054 +:10834000081839000A310C9008220F000AA8F3F22D +:10835000ECE908213800F3F2AEEA0C9FA1783970FD +:10836000E178C720014079700622A11DB81CF3F204 +:10837000DCE92100380006220C310830F3F2D4E9A0 +:1083800021003800062212310E30F3F2CEE90C98AB +:10839000228810991430F3F2C8E90D9814F016FEF3 +:1083A000002808D00D98DAF772FD2288318914323E +:1083B000891907E032E03089228881190F98143238 +:1083C000806A143006ABE2F2E6FB082206A90AA88E +:1083D00013F051F900280D9812D114F0F7FD002880 +:1083E0000BD10398002808D0049C29006B469A8A78 +:1083F0002C31081D2300E6F246F901200E900AE018 +:1084000014F0E4FD002806D10F98806B002802D0FC +:10841000816D491C81653000F3F2E4FE0E9884E71B +:10842000F8B5060000890027801900907569046F6F +:10843000002D4AD0A079C00726D00F20800128182F +:1084400000696030007CC0071ED0A0780107890F4A +:108450001AD100090C2809D00A2807D00D2813D1F9 +:108460002000203000F030F900280DD000993000B5 +:10847000FFF77CFE002800D1B080002725E0000037 +:1084800029020000341A000497480622A11D28186A +:1084900013F0F1F8002818D1A86821002031000459 +:1084A00013D5A0780207920F0FD100090C2808D02D +:1084B0000A2806D00D2808D1080000F005F9002888 +:1084C00003D0300000F0BBF807003800F8BDF3B56A +:1084D000040081B0002502986030F3F268EA616917 +:1084E0000600002971D08A68300012046DD58078AA +:1084F0000207920F69D100090C2803D00A2801D085 +:108500000D2862D1B2790027D207002A08D002993B +:108510002000FFF7BFFE002800D1A780002554E00F +:10852000F278520617D50D2080010818426A0025FE +:10853000002A0BD0083209D0D0790007000F02289A +:1085400004D102990125200014F04CFF002D3CD1EC +:108550000125A78039E00D2805D13000203000F03A +:10856000B3F8002801D00125A780B07800090C28B5 +:1085700001D00A2829D120367078317800020843CA +:10858000062801D0072820D161690D208001081834 +:10859000C06A002819D1DB20002280000B1800924D +:1085A000524A5348DEF7AEF860690F26B6018119CA +:1085B000096960314A8A0021FFF781FD60698019ED +:1085C00000696030418A491C41822800FEBD10B517 +:1085D00082680123DB03C9079A43090C0A430D2172 +:1085E000890144188260E06AE2F223F9ECBEA1112D +:1085F000010000008479020000040000A3329FBB48 +:108600000020E06210BD80680004C00F70470F2199 +:1086100010B5427989014418022A0BD118F0D0F91B +:1086200021696031097CC90711D0FF30FF30801CFF +:10863000406908E021696031097CC90707D00D2134 +:1086400089014018806A002801D1012010BD002056 +:1086500010BDF8B50700002000903889C519786969 +:108660002C6F002838D00D2189014018466A002E51 +:1086700032D0083630D0F0790007000F02282BD115 +:1086800001200090E07840210843E070A0780009C4 +:108690000D280ED12000203001000078032808D1D9 +:1086A00060782378020220001A4330301018F3F269 +:1086B00046E86078217802020A4321002000203138 +:1086C000283013F016E82878C008C00028708035DC +:1086D00038002E6014F01DFE0098F8BD0A4A00789C +:1086E0000021535C834201D101207047491C0906D7 +:1086F000090E0929F5D30020704700002902000067 +:1087000040420F009174020042080004FA4901201F +:108710004978022900D000207047F74B02001B78EF +:108720000020FF2B15D08808012801D1F34806E06E +:108730004808012802D13320400100E06020F049C0 +:108740000840002A02D11121890188430121C90270 +:10875000884370471CB504000006000E01AA6B4652 +:10876000EBF7ACFB6B46197818792200FFF7D5FFC1 +:10877000040002F0D7F8002803D0844301D101207F +:108780001CBD00201CBD00798108012901D11220E7 +:1087900070474008012801D10D207047062070471E +:1087A0002039012A01D1401800E0401AFF2801DDDC +:1087B000FF207047002801DA002070470006000EF5 +:1087C0007047F8B505000E001400E6F789FE400674 +:1087D000471631002800E6F794FE00070017E1195C +:1087E00008187F2801DD7F2002E0002800DA002041 +:1087F0000006000EF8BD70B50500C24E0024200131 +:10880000001B400180194378002B07D0934205D10B +:10881000C378AB4202D183788B4205D0641C240616 +:10882000240E062CEBD3002070BDF0B50400080028 +:1088300011001A000023B34E85B01D0001932B01D7 +:108840005B1B5B019F197F78002F02D0F75C7F1CB8 +:10885000F7546D1C2D062D0E062DF0D3FFF7CBFF20 +:10886000070051D03878012801D9801E38707878F7 +:108870006080B8782071F87800266071002578193A +:10888000801903900079002833D000F07DFF00901C +:108890002900300001F083F800990122FFF780FFE2 +:1088A000020029003000FFF78CFF010003980079D7 +:1088B000411A0906091649001BD161198919087561 +:1088C0001820684318217143C21952181832001930 +:1088D00040180292029928301822F2F29AEF8A4840 +:1088E000029A290002F074F901200199A840084376 +:1088F00001906D1C2D062D0E132DC0D3761C36064F +:10890000360E012EBAD3019805B0F0BDF8B50700B8 +:1089100000F03FFF798841703979817079790600DC +:108920000025C170002438194019007D00280FD09F +:108930003119491918220871624318206843D11966 +:10894000091892191018283118301822F2F260EF25 +:10895000641C2406240E132CE5D36D1C2D062D0E4D +:10896000012DDFD3F8BD10B5634C002812D0E2F71B +:108970000AFD00280DD0DAF790FE002809D1DAF7B9 +:10898000B8FE002805D10220DDF70FF82089401C31 +:10899000208110BD0220DDF72EF86089401C608127 +:1089A00010BD5A4870B500680321534C09024518A0 +:1089B000A069012810D10820E3F7D0FCFF22544918 +:1089C000521C2800F2F2BAEE5048616A4030C16190 +:1089D000A16A81610020A06170BDF8B50700464C16 +:1089E000E06800283BD013F025FA0500206AE1F288 +:1089F0002AFF00262662002FE66001D076E01CE008 +:108A000001000000807D020000040000F0E84CD767 +:108A1000A66101E0FFF7CFFF0120E0603B48143082 +:108A2000E3F7A9FD39481030E3F77BFDE660E7F294 +:108A300050FAE088C0430004000CE3F775FC3A48A4 +:108A4000E680008800280BD0F4F750F9002801D008 +:108A5000022100E00021080018F00CF8F4F74AFEAB +:108A6000280013F0F5F90120E3F7CCFB0220E3F72F +:108A7000C9FBF8BD254810B5406B14F003FB10BDD1 +:108A8000F3B50C0000221C21284883B0F3F2E8FB68 +:108A9000050001D1012041E7022028730020686110 +:108AA000C0202F182881224802210268009213005A +:108AB000019204223800E5F283FD1C202E18288143 +:108AC00084213000F2F2E0EE30000321603037679D +:108AD000017722214177C90176664C38B666002CB1 +:108AE000316300D0C4720126067047600399074ABB +:108AF000064BC9003C32525C3C33C918012A1BD1D9 +:108B00004B78012B16D11E272CE0000040380400C2 +:108B100060060300F9CFFFFF44610400D85E040043 +:108B200000A00080D85D04005C3C0004AC1A000486 +:108B3000BC000004152715E0022A0DD14F78002F44 +:108B400001D1082400E009240A237B430A34E318F6 +:108B50001F331F063F0E05E04B88032B01D8032768 +:108B600000E00C272030037A92079B089B00920FAD +:108B7000134304000E2F037202D34020034301E08D +:108B8000BF200340CF202372034048788007800E27 +:108B9000034338002372E6F22BFE617A4006C909CE +:108BA000400EC90101436172E672607A052F02D25C +:108BB0008021084301E04006400E6072A07A0399CC +:108BC000800989068001890E0843A072280016F0EA +:108BD00063FB0020A2E6FB48E821002210B5F3F277 +:108BE0003FFB10BDF7B5002088B0012A029001D2EA +:108BF000009201E000220092100001AB0CE0089C02 +:108C000083001C19A56801AEF550E468401C65405E +:108C10000D400006000EF550009B9842EFD917005A +:108C200085E00124B80001A907900858099079E06F +:108C3000641C00E0012630000999A0400842F7D0EA +:108C4000E149E00006904018059040680390FFF766 +:108C5000C2FF05006FD00120B84001062006090EB2 +:108C6000000EFFF70DFF012803D12800F3F2CEFA22 +:108C700061E002202873002068612900C0311C20B7 +:108C800004912E18288184213000F2F2FEED04991F +:108C90003000316703216030017721214177B666CA +:108CA0000499B1613100C84B069E34310A7A9B5D4C +:108CB00092089B0792009B0F1A43CF230A721A4017 +:108CC000059B4C385B789B079B0E1A430A72059BE9 +:108CD0004A7A5B88D2095B06D2015B0E1A434A725C +:108CE0008A7AA306920992019B0E1A438A72089A05 +:108CF0003B005278CA72B5490A68039902F06DF8D0 +:108D00000298401C0290280016F0C6FA08990798AD +:108D100040180121C268A1400A43C26009988843F3 +:108D2000641C0990002885D17F1C3F063F0E0098E7 +:108D3000874200D875E702980BB0F0BDF0B504008B +:108D4000080A401EC7070E060802FF0F010E360E66 +:108D50003A02012032434002032985B000D00020AE +:108D60001043132E019069D20121B140B8000019BF +:108D7000039085680D4061D0300001F00BFE0028A3 +:108D800003D19349885D401C8855182070431821F1 +:108D90007943001942188F480199283201F04CFE9E +:108DA00000F0FCFC00903100380000F002FE009959 +:108DB0000122FFF7FFFCA119C919029108750200F1 +:108DC00031003800FFF707FD029901230875039869 +:108DD00003990069284308610020810009198A6805 +:108DE0002A4202D0096929420FD0401C0006000E19 +:108DF0000128F2D3012B08D101F09EFD0100754836 +:108E000040692840084301F0ADFD012362305FDE78 +:108E1000010000007C81020000040000A6C12F9721 +:108E20000020810009198A68002A02D0096991424C +:108E300006D1401C0006000E0128F2D3002B08D1F9 +:108E400003988168002903D0FF222000FFF7D4FE99 +:108E50006EE561790020FFF79AFD002001F0CDFD5D +:108E600000201AF0A6EC5D483C38806B002801D049 +:108E7000804702E00020FFF7C4FD2078032804D1DA +:108E80002000FFF757FDFFF7FFFD012020704FE5A1 +:108E9000524810B53C38006B14F0FEF810BDF7B521 +:108EA00082B004000E00E6F7FBF90190E6F7F5F951 +:108EB0000090E6F7EFF9020001990098FFF741FCF6 +:108EC0003040050052D001201AF072EC01F0A7FDED +:108ED0002000FFF76CFC002107000E0001200BE0D2 +:108EE00001208840284206D0002062181318401C38 +:108EF00001281E75FADB491CB942F1DBE8F79EFA3E +:108F0000607000200122810009198E60CE6013007C +:108F10000E61677883401F4200D08D60401C01289D +:108F2000F1DBE6F7B7F96080009860710198207175 +:108F3000022020700498002803D028492B483C398F +:108F40008863294801F0D9FC01F000FD2649A843B7 +:108F500009692940084301F00FFD61790120FFF7FD +:108F600016FDFF2229002000FFF746FEE0E4FEB5D3 +:108F70000D0041011C4A091A09017C328C181A4B58 +:108F80004101091A09017C336A78C9180978022A53 +:108F900001D10800FEBD4301181A134B00017C33B8 +:108FA0000E4FC0181430203F01260B00F2F2F6EDF0 +:108FB00004030E4FA1C62878032803D1002001F036 +:108FC000DBFCBBE00128FCD12670B7E02878042840 +:108FD0000ED1696832E00000AC1A00047C3804004D +:108FE000BC000004004E03C0D85E0400ED81020006 +:108FF000022803D12000FFF79DFC9FE00328E0D169 +:10900000E6F748F907043F0CE6F74AF90190E6F75E +:1090100044F90090019A00993B002000FFF719FCE9 +:1090200006000FD0300001F0A7FC019900983A002B +:10903000FFF787FBB043010003D06A782000FFF7F9 +:109040002EFF7BE0002001F097FC6A78C1E72978C9 +:10905000052951D0022902D1032020706EE0042995 +:1090600019D1002130006278884002420DD088007A +:10907000001982686B681A438260C2686B689A4301 +:10908000C26002696B689A430261491C0906090EB5 +:109090000129E7D352E0062916D1002081000919E1 +:1090A000896800290AD0F949896B002901D0012279 +:1090B00000E00022800000198168BFE7401C000624 +:1090C000000E0128EAD339E0072937D11321F2F243 +:1090D000E6EB0020020081000919401C00068A60AE +:1090E000000ECA6001280A61F5D33888401C388018 +:1090F0001BE02978052904D169682000FFF728FEC4 +:109100001CE007291AD11321F2F2C8EB002002005B +:1091100081000919401C00068A60000ECA600128FF +:109120000A61F5D37888401C788001202670FFF70B +:1091300068FC61790020FFF72AFC3FE72078FEBD3C +:109140007CB501206B4600241870D04D5C70811EE8 +:109150000194E86A13F099FF200069462C70FFF72C +:1091600006FFE86A13F098FF7CBDE9E710B5C74C2D +:109170002078FF2816D00021E06AC94313F085FF4C +:109180002078C3494301181A0001085C032806D05F +:10919000C048012100680722C90213F072FFE06A8B +:1091A00013F07AFF10BDB94810B5406B0A2113F0D7 +:1091B0006CFF002800D0012010BD10B5B34C0A216F +:1091C000206B13F062FF00210028A16300D0012072 +:1091D00010BD70B5050012F041FEAC494C784D70E1 +:1091E00012F040FE200070BD10B5040012F036FEF3 +:1091F000A6494C7012F036FE10BD1CB5A34C207869 +:10920000FF2810D007206B46187000205870411EB0 +:109210000190E06A13F039FF207869460379399D9F +:10922000010000007885020000040000F51BFCFB33 +:10923000FFF7A7FEE06A13F039FF1CBD10B5F7F782 +:10924000A7F8FFF7E4FF10BD9548C068704797483E +:1092500010B50068032109024118FF229448521CEE +:10926000F2F28AEA91484030C2698D494A628269C5 +:109270008A6201228A618169C1610820E3F768F886 +:1092800010BD38B5864C2069002800D0FEE789481B +:109290008069E080E3F7F3F82169084320612FD06B +:1092A0006069002800D0FEE7E3F723F9616908430D +:1092B000606121D012F0DCFD05007F4800880028A5 +:1092C00001D01AF090EAFFF7C2FF0120E060607859 +:1092D00000280CD1206AE1F2D4FA0020704B206201 +:1092E00001000090754A76482033DDF733FA2800F4 +:1092F00012F0C2FD012038BD69481030E3F725F9AE +:10930000002038BD70B5664D2878FF2814D0430181 +:109310006449181A000144180021E86AC94313F08F +:10932000BEFE002001F032FB200013211430F2F2C7 +:10933000C0EAE86A13F0BAFE70BD7CB50024584D4F +:109340002878FF281DD0E86A611E13F0A8FE0220CD +:109350006B46187000205870019028786946FFF716 +:1093600010FE032800D10124E86A13F09FFE002CB0 +:1093700007D0FFF722FF002803D0F7F709F8FFF71F +:1093800046FF7CBD43014749181A0001401810B53B +:1093900000780024012807D04148806B00280ED0B7 +:1093A000FFF715FF040003D10020FFF734FB06E0B0 +:1093B0000020FFF730FBF6F7EBFFFFF728FF200058 +:1093C00010BD1CB5364C2078FF2827D060780228C5 +:1093D00024D00021E06AC94313F061FE03206B46EC +:1093E000187020782F494301181A0001085C0428DE +:1093F00008D0FFF746FF002801D0607800E0012088 +:109400006B4658702F48019020786946FFF7B9FDE8 +:10941000E06A13F04BFE2078FFF7B4FF1CBD016833 +:10942000827D1431C87A2031C97A000209040843C8 +:10943000104370477CB51A4C2178FF2901D10120D7 +:109440007CBD05216B461970002159700190E06ABE +:10945000491E13F024FE20786946FFF792FD0500AF +:10946000E06A13F023FE28007CBD7CB50C000600EA +:109470000B4D2878FF2810D0012C02D1A96B0029B0 +:109480000BD104216B4619704101091A05480901E5 +:10949000405C042822D0022816D101207CBD0000A7 +:1094A00040380400545F04007C05000400A00080E4 +:1094B000D85D040040A200805C3C0004A08601004E +:1094C00085850200FFFF0700FFF7DBFE002803D0C1 +:1094D00068786B46587001E06B465C70002101961D +:1094E000E86AC94313F0DBFD28786946FFF749FDB8 +:1094F000E86A13F0DBFD2878FFF744FFCEE71CB5E0 +:10950000CB4C2078FF282AD06178022927D004216B +:109510006B461970002159704101091AC5480901AB +:10952000405C04280AD0022819D0FFF7AAFE0028C0 +:1095300001D0607800E001206B465870BE480021E1 +:109540000190E06AC94313F0AAFD20786946FFF74D +:1095500018FDE06A13F0AAFD2078FFF713FF1CBD89 +:10956000F7B500208AB017001060B14A1078FF28C4 +:1095700007D00A9B8B4207D15079002801D00020E8 +:1095800050710A980DB0F0BD4301AA49181A0001A4 +:1095900040180190FFF715F9002403900A980294EF +:1095A000250007906AE00020089001984019099072 +:1095B00008994018067D002E54D00898290000F024 +:1095C0000CFA0A990122FFF709F9B04206900698B1 +:1095D00001D9801B00E0301A0004000C04900C211B +:1095E0003000F2F21AEE059006980C21F2F214EE19 +:1095F000059A8242049828D08D4AD37898421DD883 +:1096000050791279904219D201221000029BA84091 +:1096100018430004000C0290E00723D1069814437D +:10962000B04203D90A98401A401E03E02B6CBDDEFD +:109630000100000074890200000400000174894FD9 +:109640000C20401A0A9908180006000E079013E033 +:1096500001203968A8400143082039600BE07949AE +:109660008978884206D301213868A94008433860C8 +:10967000042000E0022004430898401C0006000E6D +:109680000128089001D209989CE76D1C2D062D0E2B +:109690000398854291D3042C04D338680299084377 +:1096A000386001E0022C03D166490020487172E75E +:1096B00064494879401C487107986DE77CB50500FE +:1096C000604C2078FF281DD0607802281AD01AF04C +:1096D00028E9012816D00021E06AC94313F0E9FC0B +:1096E00004206B4618700020587020784101091A38 +:1096F00055480901405C04280ED0022803D1E06AD5 +:1097000013F0DEFCD4E6FFF7C6FD002801D0607838 +:1097100000E001206B465870019520786946FFF7FC +:109720003AFCE06A13F0CCFC2078FFF735FEBFE688 +:109730001CB5444C2078FF2810D007206B461870C9 +:1097400000205870411E0190E06A13F0B2FC2078AE +:109750006946FFF720FCE06A13F0B2FC1CBD70B54F +:10976000384C2078FF2801D1002070BD0021E06A2C +:10977000C94313F09EFC207833494301181A0001B5 +:109780000D5C04220A54E06A13F09AFC280070BDB4 +:1097900070B505002B4C2078FF280DD00021E06A21 +:1097A000C94313F086FC207827494301181A0001A9 +:1097B0000D54E06A13F084FC70BD224A1278FF2A2F +:1097C00001D10020704753019A1A1F4B1201D21881 +:1097D00010184018007D7047002010B5E5F70FFE07 +:1097E00010BD70B5428801794079FFF72CF8002848 +:1097F0000BD1174A0101091A490189184978002932 +:1098000004D10301181A4001801870BD401C0006E5 +:10981000000E0628EED30E4C01200101091A490161 +:10982000535C2578AB4200D98C18401C0006000E12 +:109830000628F2D3FF21E1312000F2F244E82000B3 +:1098400070BD000040380400545F0400FFFF0700B3 +:1098500044610400002010B50400FF4A4421414344 +:10986000545089184860401C0006000E0528F5D3A6 +:1098700010BD70B5E5F725FD0400E5F725FD0500F1 +:10988000E5F71CFD02042102120C294308021043D3 +:1098900070BD70B50025F04EFF24290044224A43D4 +:1098A000B258824207D144204843002232508019E6 +:1098B00045680C0004E0491C0906090E0529EDD392 +:1098C000FF2C18D00020442141438A195168A94235 +:1098D00001D8516801E0491E5160052901D30120DA +:1098E00070BD401C0006000E0528ECD344216143E6 +:1098F000042089194860002070BD30B5052810D2B9 +:1099000044235843D44D00214419442048436368FC +:10991000401942689A4201D2521C426040680528B0 +:1099200001D3012030BD491C0906090E0529ECD3DD +:109930000020606030BD70B505000E0014000320EB +:10994000E5F728FBB000FF30801C2902081800044E +:10995000000C2100FDF7FDF90120E5F71BFB70BDB0 +:1099600070B505000E0014000320E5F713FBB000EE +:10997000FF30C01C290208180004000C2100FDF76C +:10998000E8F90120E5F706FB70BDB449085C7047B3 +:109990000C2801D9FF207047B0493D31085C704761 +:1099A0000C2801D9FF207047AC494A31085C704748 +:1099B0000A23AA49584357314018401C10B5F2F207 +:1099C00028E810BD10B50C0000D10C240A23A349CF +:1099D000584357314118491C2000F2F22AE8200070 +:1099E00010BD0A239D4958435731085C70470A232C +:1099F0009A4A5943573289180818C07970470100AC +:109A00000E39042901D802207047C01F062801D84A +:109A10000120704700207047F0B5002085B001900C +:109A2000E5F74FFC00240006000E0390601E01289D +:109A300003D90C2C01D00D2C02D103999D3E258118 +:109A400001000000708D02000004000052AE5A2395 +:109A5000012001E00399002000F0E4F907000A2149 +:109A6000834861435730081802908579401CF1F211 +:109A7000DAEF060101F07FFC00280DD001F019FC9F +:109A80000D2809D1EAF70EFB0090E5F724FC0099B8 +:109A900001F027FCC0008619BE4203DB002D01D077 +:109AA000002504E0BE4202DA002D00D10125029813 +:109AB0008571A5400198641C0543132C0195BFD303 +:109AC000002420060199000EE5F7E8FC641C012C37 +:109AD000F7D305B0F0BD0A23654958435731401804 +:109AE0008079704770B504000D00DCF789F8032019 +:109AF000E5F75AFAA800FF30401C210208180004BC +:109B0000000CFDF71AF904000120E5F74DFADCF727 +:109B1000BEF8200070BDF3B587B0060000206B468C +:109B200018705870132E987077D20A2050497043DD +:109B300057314518E5F7CFFB6B4618720690E5F7ED +:109B4000C7FB0006000E6B4658720590681CF1F2C8 +:109B50006AEF07063F0E30000E3801246B460428DA +:109B60001F7107D8E5F7BAFB6B469871800801288A +:109B700053D116E03000FFF74CFF01280FD1E5F775 +:109B8000ADFB41086B460129987102D0810801297B +:109B900043D1C007C00F801C6B46987101E06B4633 +:109BA0009C712878082801D0092801D1022005E0FD +:109BB000072802D16B465C7102E000206B465871A9 +:109BC0000024019902986A4601F07DFD002807D023 +:109BD0006B4699782819C17119780172FF2118E034 +:109BE000701E012803D90C2E01D00D2E02D1780051 +:109BF00022300AE0069801281CD106990598E5F75D +:109C000070FB04280AD1780037302919C871FF2168 +:109C100028190172002141720FE03EE00699059873 +:109C2000E5F75FFB032802D178003D30EDE77800CF +:109C30003F30EAE778003130E7E7281904900390D5 +:109C4000C2793100200000F0D8F803983100027A80 +:109C50002000FFF77AFE03983100427A2000FFF7D8 +:109C600089FE0898052815D2049803E008530004DB +:109C70004C080004C1790898442358436E4A801860 +:109C80008019001901720499097AC176049920306B +:109C9000497A8173641C012C93DB09B0F0BDFEB5D9 +:109CA000E5F71CFB0600DBF7ABFFFFF7ECFD04005C +:109CB000614AFF20002144234B435F4AD358A3420B +:109CC00001D1080004E0491C0906090E0529F2D358 +:109CD000FF2800902FD1584E0025280044214143F1 +:109CE00089194968042901D1050004E0401C0006D7 +:109CF000000E0528F2D32800FFF709FE01280CD139 +:109D00000024FF212000FFF706FF641C2406240E18 +:109D1000132CF6D3FFF7A8FD53E0442068433450DA +:109D2000002429002000FFF7F6FE641C2406240E00 +:109D3000132CF6D33FE00098FFF7E9FD01280AD184 +:109D40000024FF212000FFF7E6FE641C2406240EF9 +:109D5000132CF6D3DEE7002528000E38042807D997 +:109D60002800FFF756FE012805D17008012802D00F +:109D7000B00801281AD10A206843304A44238718C2 +:109D800000982D49584300244018401901900019AB +:109D9000027A3819C2712900200000F02EF8641CE4 +:109DA0002406240E012C01D20198F0E76D1C2D062B +:109DB0002D0E132DD0D322480088002801D0FFF7A4 +:109DC00035FEDBF764FFFEBD1C4910B5FF24583992 +:109DD000B034012807D10870DBF783FE0F21200083 +:109DE000FCF7FAFF10BD0028FCD10870DBF772FE0B +:109DF0000F212000FCF7E5FF10BD70B505000E0037 +:109E000014000320E5F7D0F8B000FF30401C290211 +:109E100008180004000C2100FCF7A5FF0120E5F75D +:109E2000C3F870BD002804D1002902D1FF20401CD6 +:109E30007047E0207047000008530004A3080004A6 +:109E400044160004F8B50E00446D25003FCB9F7208 +:109E5000010000006C91020000040000ED6B7F9097 +:109E60001C3D6F69002C0FD0280019F073FA0028F0 +:109E70000AD07C200655D9F794FD002805D0220091 +:109E80002900380013F0B9FDF8BD280015F036FAA6 +:109E9000F8BD10B5446D1C3C08D0200019F05AFAEA +:109EA000002803D00021200011F0EEFF10BDF3B513 +:109EB000002085B0039011F0F9FF01900698F8F7A3 +:109EC00070FF022811D0F949097981420DD015237C +:109ED0005B01F64958432039411805982C31C000E0 +:109EE000401807000837001D06E00598F04980007B +:109EF0000F58F0490858F049029139680068CC05BC +:109F0000C005C00D0490ED48E40D0021016054E04F +:109F1000059821060002090E0843029909680843C2 +:109F20000568241DE405E40D3C606E6DE1F7D4FA8C +:109F300000281AD0D9F735FD002816D06868807837 +:109F40000107890F02290AD10009042807D16036C8 +:109F5000707F162809D16888D9F72CFF05E0603694 +:109F6000307F072801D8D9F736FD039800280DD097 +:109F70006868D34B0699801D0622C91811F0C1FBF1 +:109F8000002803D12800FFF784FF16E0D9F709FD68 +:109F900000280CD0E1F7A0FA002808D00599280085 +:109FA000E7F769FFC5490868401C086003E00599A8 +:109FB0002800FFF751FF0120039004988442A7D1A5 +:109FC000019811F077FF07B0F0BDF7B5100082B02F +:109FD0000026F8F7E6FE022811D0B449097981423B +:109FE0000DD015235B01B149584320394718029819 +:109FF0002C37C000C01905000835001D06E0029886 +:10A00000AB4980000D58AB49AB4F08582968006830 +:10A01000CC05C005C00D00900298E40D0002A949CE +:10A02000019016E001982106090E0843396808439B +:10A030000068241DE405E40D2C60002E04D0A14A24 +:10A0400003991268904704E09E4A0299126890476B +:10A05000012600988442E5D105B0F0BDFFB583B07C +:10A0600000270698F8F79DFE022811D08F4909793C +:10A0700081420DD015235B018C495843203941188A +:10A0800004982C31C000401806000836001D06E078 +:10A090000498874980000E588649085886490291DD +:10A0A00031680068CC05C005C00DE40D019029E0C1 +:10A0B000049821060002090E084302990968084322 +:10A0C0000568241DE405E40D34602020405D0599F9 +:10A0D0004007400F884210D16868794B0699801D6F +:10A0E0000622C91811F00DFB002806D1002F04D05C +:10A0F00003992800FFF7B0FE04E004992800FFF759 +:10A10000ABFE012701988442D2D15CE7F3B581B060 +:10A11000060011F0CBFE00906B48B40001596B4D66 +:10A120006B4F002920D0360210E063490006096811 +:10A13000000E3043084300680299E7F79CFE285957 +:10A14000001D285160480159491E015128593959AB +:10A150008842EAD15C480059002800D0FEE7554803 +:10A160000059006838512851009811F0A3FEFEBD37 +:10A17000F3B583B00D0011F099FE0290D9F711FCF0 +:10A180000399039B0E029C0000284F484E49504AF9 +:10A190004E4F00593BD0002869D0484910590968F2 +:10A1A0008900401A01901FE0434900060968000E2B +:10A1B000304308430768424978680622801D6918C1 +:10A1C00011F09FFA002803D13800FFF762FE03E088 +:10A1D00003993800E7F74FFE3C480159091D01512A +:10A1E00039480159491E01513849019A085990428C +:10A1F000DAD1080001592E4AC9051259C90D11605A +:10A200000059C1052B48C90D005901602FE00028F5 +:10A210002DD01AE0284900060968000E3043084393 +:10A220000068416D1C39002D02D04969A94202D154 +:10A23000FFF72FFE02E00399E7F71DFE3859224988 +:10A24000001D38510859401E0851214938590959F3 +:10A250008842DFD1002D04D11B480059B5F268CFE8 +:10A26000010000006895020000040000BEB1ACFCD3 +:10A27000002800D0FEE71448005900681949085129 +:10A280003851029811F020FEF0E6FFB583B011F0CE +:10A2900017FE01900498114B80001958002947D0EF +:10A2A000104A0F4F16583C581D580749095809685D +:10A2B000115039500021195004980002029032E0E8 +:10A2C00038420004181800045018000400A0008050 +:10A2D000640900042902000008F90004F4FF02C028 +:10A2E0001C0003C0440003C002982106090E084365 +:10A2F0003D490968084307682020C05D059940076B +:10A30000400F884209D178680699801D062211F015 +:10A3100002FA002801D1039900E004993800E7F718 +:10A32000B4FD241D6D1EB442DED1002D00D0FEE729 +:10A33000019811F0C9FD50E6052010B5FFF743FB69 +:10A340000404852000020443032000068443E7F749 +:10A35000A7F880078009204310BDFEB50600012044 +:10A360000003012E00D8002031024718E7F7AAFCAD +:10A3700005000020002D009001D0E7F798FCFFF7C2 +:10A38000DBFF01900520FFF71EFB040204430104DC +:10A390000C43000604430520FFF718FBFF2808D0F4 +:10A3A000124A21001140040202041443000604432F +:10A3B0000C430520FFF712FBFF2805D00C490C4089 +:10A3C0000104000601430C430A49B00040188461AF +:10A3D0000949019879188860002D03D0002069464A +:10A3E000E7F75AFCFEBD000000A00080FFC0C0C01F +:10A3F000FFFFC0C000B0008040AA00800C4810B52C +:10A40000007802280AD10B4801681022114301602C +:10A410000122094904201300DFF226F910BD044887 +:10A4200010B50078022802D10420DFF2DBF910BD5C +:10A430000C0500044023008003F7010070B5C82418 +:10A44000514D2B69DB03FCD46961AA6101218902AA +:10A450000843286102E01420DBF744FB641E02D0AD +:10A460002869C003F7D4200070BDF8B50D001600B0 +:10A47000464FC824B8627A62396202E01420DBF7E2 +:10A4800031FB641E05D0386AA842F7D1786AB04221 +:10A49000F4D12000F8BD3F493D4808603F493E489F +:10A4A000086070473849022240390028486901D1C4 +:10A4B000904300E01043486170473949886B01229E +:10A4C00010430E2290438863704770B5344CE06BA4 +:10A4D0003449800880008843C911884388430902B1 +:10A4E000884305022D0AE6F7DBFF00062843E063F8 +:10A4F0000320E7F737FC70BD10B5FFF7DEFFFFF76D +:10A50000E4FF10BD70B500252C002000E8F28EF8A5 +:10A5100001002000E5F200FE2000E5F2A4FD0100AC +:10A520002000E5F203FEE6F7BBFF0106090E00225C +:10A530002000E5F2DFFD29002000E5F203FE200007 +:10A54000FFF741FA01002000E5F2C8FE2000FFF706 +:10A550003DFAFF2803D001002000E7F7C7FB2000E9 +:10A56000FFF73CFAFF2803D001002000E7F7CFFBFC +:10A57000641C2406240E0C2CC7D90B49486A0A0C0B +:10A580009043486270BD000000A30080C0AA008014 +:10A590003597020068FB0004639702006CFB00041F +:10A5A00000A100807000400000A8008070B5040089 +:10A5B00011F086FC714D06002800E5F7C7FAC108C6 +:10A5C000C900A008012802D1A007800F03E060089D +:10A5D000012801D1204001432800E5F7A9FB300004 +:10A5E00011F072FC70BDF8B50D00110006002A00D4 +:10A5F000E5F750FD01003000E4F75DFE040011F0C6 +:10A600005FFC0700002E07D1012D2DD15C482018DA +:10A610000F2829D87B2124E0012E25D1012D0DD131 +:10A6200058482018A52801D8BE211AE05648FF2115 +:10A6300020183231884217D8C72112E052486908E1 +:10A640000A30012906D1FF2120181E3188420BD87B +:10A650008C2106E0A908012906D12018A02807D8D6 +:10A66000C521FB20E5F764FB380011F0E7AEA2EB53 +:10A670000100000064990200000400004ADED9488D +:10A680002DFCF8BD4548EB3820182828F6D8DDE722 +:10A69000F7B50D0011F01EFC06000098002800D050 +:10A6A000012000216A08AC08012A05D0012C01D143 +:10A6B000012101E00021C943394B82009A584B1C0B +:10A6C00001D1002705E0364BC0000833C0188900CF +:10A6D00047581000E5F75BFA3800E5F758FA28000C +:10A6E000FFF76EFF029A00982900FFF786FF2C48BB +:10A6F000001F0068002809D025480821C630E5F76A +:10A7000039FD234804213C30E5F734FDDBF7E5FC57 +:10A710001C210C20DBF77FFB012C01D1A82100E0DC +:10A7200088210520DBF777FBDBF7DEFC300011F03A +:10A73000D5FBFEBD10B511F0CDFB040000F0AAF86A +:10A74000012803D117488121E5F7FDFC200011F015 +:10A75000C5FB10BD70B50D00002817D1124C002D9F +:10A7600000D1124C11F0B6FB06002000E5F70FFAFD +:10A77000E4F7D2FD002D06D04008012803D10C21BA +:10A780000820E5F7DFFA300011F0A8FB70BD0000EB +:10A790008105000067F6FFFFCDECFFFF70EAFFFFC9 +:10A7A0006C090004B1020000003B0400803B04007F +:10A7B000024910B5E7F28AFD10BD000084090004CB +:10A7C0007FB5002945D02948274A0378137043787C +:10A7D00053700A780C000270497841702449A078BF +:10A7E0000978884235D1234E234D207923000C333C +:10A7F0004007400F06D0012817D002282CD003288C +:10A800002AD026E02089A84226D13078012280066D +:10A81000C00F02920392194A019018000092184A40 +:10A82000184B2100E7F250FC11E02089A84213D117 +:10A83000307801228006C00F02920392124A0190E2 +:10A8400018000092114A124B2100E7F2B9FC0028CF +:10A8500002D0012004B070BDE088A84202D0E178A7 +:10A860000C19C2D10020F5E7080500049604000485 +:10A870003F030004C4E80004FFFF0000248001C07F +:10A880004C7901C0B47B01C0003C0400AC39040029 +:10A89000B8390400284800687047F3B5002881B033 +:10A8A000264D40D0254C1121490180346069244A4D +:10A8B000104060616069084360616B461878BF2191 +:10A8C00080088000401C0840CF2210401870587843 +:10A8D0009F780120D870060058700F400E20FFF7B7 +:10A8E0007CF88006B909800E890101434806400EB4 +:10A8F0006B4614499870009888600E20FFF76DF839 +:10A900008006800E01020143020411430006014348 +:10A910000D48016102982061A86B04210843A863D7 +:10A9200005480660FEBDA86B04218843A863024861 +:10A9300000210160FEBD0000240E000440AD008037 +:10A940001FC0FFFF80A0008000B0008010B511F094 +:10A95000C1FA040000210120FBF738FC200010BDE3 +:10A9600010B504000120FBF753FC200011F0B6FAEB +:10A9700010BD70B50400FFF7E9FF2168FE4A002909 +:10A9800003D0012901D0022907D113681D78AD0633 +:10A99000AD0E89010D431D7005E011680B789B0613 +:10A9A0009B0E80330B70E16800291168097C02D08E +:10A9B0000223194301E0FD23194012681174FFF7C7 +:10A9C000CFFF70BD10B5FFF7C1FFEB4909680C7AE6 +:10A9D0000A79120214434122520189180A7F097E22 +:10A9E000120409060A431443FFF7BAFF200010BD02 +:10A9F00010B50400FFF7AAFF21040A0EDE4909681A +:10AA00004A602206120E8A600123220EDB02C91858 +:10AA10008A632202120ECA63FFF7A2FF012010BD53 +:10AA200070B504000025FFF791FFD34A0123082CDD +:10AA300004D2116880310D7CA34015E06107490FF5 +:10AA4000102C03D212688032157B0CE02126B6014F +:10AA5000182C03D212689219157904E0202C04D224 +:10AA60001268921915788B401D40FFF779FF280076 +:10AA700070BD10B50400FFF769FFBF492145662B83 +:10AA800001000000609D02000004000019040A2477 +:10AA90000968FF3161310A78E30752085200DB0F81 +:10AAA0001A430A70FFF766FF10BD10B5FFF758FF95 +:10AAB000B6490968FF3161310A78D407E40F03D140 +:10AAC0000A7801231A430A70FFF754FF002C01D0C3 +:10AAD000012010BD002010BDF8B50D0007001400C6 +:10AAE000FFF73EFF0090B869A849002600280868D3 +:10AAF00005D0FF304130007A2022104304E0FF30BF +:10AB00004130007ADF221040A04F3968FF314131D7 +:10AB10000872FFF7CAFF3968412252018A18137D73 +:10AB20009F273B40AF05BF0F7F013B431375FF31AC +:10AB300041310A7AEB0652095201DB0E1A430A72BE +:10AB40000A7A80231A430A726322521EFDD28F4D65 +:10AB500010E0761C142E0DD30A7A5206520E0A7299 +:10AB60006322521EFDD20A7A1A430A726322521ECF +:10AB7000561CFCD10A7BD209EBD0FFF784FF286872 +:10AB80008030806B20702868A030007F0F22000783 +:10AB9000010C206812039043084320602968A0310B +:10ABA000097F1311090909029843084320602868A6 +:10ABB000C0300068A07029680D000800C0304168EE +:10ABC0002171017A09070E0C61689143314361607C +:10ABD000067A99433609360231436160C168A17132 +:10ABE00001692172017D09070E0CA168914331436F +:10ABF000A160067D9943360936023143A16081691F +:10AC0000A172C16921732900E0310E783607370C33 +:10AC1000E66896433E43E6600F789E433F093F0255 +:10AC20003E43E660466AA673866A26740E7B360744 +:10AC3000370C266996433E4326610F7B9E433F09AE +:10AC40003F023E432661066BA674466B26750E7E58 +:10AC50003607370C666996433E436661097E9E431C +:10AC6000090909020E436661C06B2900FF314131B9 +:10AC7000A075087A4006400E08720098FFF77AFE29 +:10AC80000120F8BDF7B582B014000E00FFF768FE92 +:10AC900001902068002501063C48090E0268D01D7D +:10ACA000F930016001792368090909011B041B0FB0 +:10ACB000194301710179236809071B05090F1B0F4F +:10ACC0001B011943017121680902090E8160616845 +:10ACD0000906090EC160017C6368090909011B04AA +:10ACE0001B0F19430174017C636809071B05090FD9 +:10ACF0001B0F1B011943017461680902090E4161B0 +:10AD0000A1680906090E8161017FA368090909018B +:10AD10001B041B0F19430177017FA36809071B055B +:10AD2000090F1B0F1B0119430177A1680902090EC6 +:10AD30000162E1680906090E4162010020310B7AC7 +:10AD4000E7681B091B013F043F0F3B430B720B7A63 +:10AD5000E7681B073F051B0F3F0F3F013B430B728B +:10AD6000E3681B021B0EC36223691B061B0E0363F1 +:10AD70000B7D27691B091B013F043F0F3B430B75EC +:10AD80000B7D27691B071B0F3F0501E0280E000400 +:10AD90003F0F3F013B430B7521690902090E816397 +:10ADA00061690906090EC163FF3241321078616999 +:10ADB000000900010904090F084310701078616947 +:10ADC00000070905000F090F0901084310706069A9 +:10ADD0000002000E5060029880690028107A02D0AC +:10ADE0002021084301E0DF2108404D4C1072FFF79D +:10ADF0005CFE070020684121490141180A7D9F231C +:10AE00001A40B3059B0F5B011A430A75FF304130AE +:10AE1000017AF20649094901D20E11430172017A01 +:10AE20004026314301726320401EFDD20220DAF732 +:10AE30006DFE2068BF22FF3041300FE06D1C142DE5 +:10AE40000CD3017A114001726321491EFDD2017AAF +:10AE5000314301726321491EFDD20025017BC909DE +:10AE6000ECD0017A114001723800FFF70CFE019816 +:10AE7000FFF780FD012005B0F0BDF8B50500160014 +:10AE800044681F0000224823E270A3703FF0E06195 +:10AE9000010000005CA102000004000031958F99C0 +:10AEA0002180A28006223100A01DF0F2ACEC20002F +:10AEB000062231000C30F0F2A6EC20000622310010 +:10AEC0001230F0F2A0EC207E042201090901217663 +:10AED000208B0107090F012021832870B840E872F8 +:10AEE0001548E861283529002800F0F28CEC287814 +:10AEF000BF210840287068784006400E6870A87826 +:10AF00004006400EA8702878800703D06878C009F2 +:10AF1000C0010BE068784106490E032903D9C00936 +:10AF2000C001401D02E0C009C001401C6870002043 +:10AF3000F8BD0000280E0004001100207047704783 +:10AF4000064A0021122310B5545C844200D15354A8 +:10AF5000491C0906090E0329F6D310BD5605000445 +:10AF6000092189014118496B032341181B02C918A3 +:10AF70000A7B1121490141188A75CA7513225201B1 +:10AF8000821812788218D218127BC0180A75007BBA +:10AF900048750120704710B504004720C0002018F4 +:10AFA0000021E03001762000F3F737F82000FFF7AA +:10AFB000D7FF10BD70B505004720C0002C18200039 +:10AFC000C0300600C068C3490A308842F06005D22C +:10AFD000200070300CF042F902280DD32800F3F75E +:10AFE0001BF82879002801D1F3F700FE0020E03497 +:10AFF000F0602076012070BD002070BD70B50500A6 +:10B000004720C0002E18192040012818047C300069 +:10B0100050300CF035F92879002802D12800F3F7D8 +:10B02000FEFD2800FFF7C6FF00281DD1002C05D02B +:10B03000022C03D0F3F7D7FD00280DD02879002883 +:10B0400003D12800F3F765FF0400002C04D134205D +:10B05000405DFE2806D101E0012C03D12800F3F762 +:10B0600094F90400E036347670BD4721C9004018D9 +:10B0700000220260C0300169002901D00A6002612B +:10B0800070474722D20083180279002A09D0032A88 +:10B0900003D14079002809D003E0062A01D0022A12 +:10B0A00004D101201A68884002431A607047472281 +:10B0B000D20083180279002A09D0032A03D14079EB +:10B0C000002809D003E0062A01D0022A04D1012079 +:10B0D0001A68884082431A600C2048437E49401811 +:10B0E00000210A000B000EC07047F1B588B047215F +:10B0F0000898C90040180390083002900398002572 +:10B1000050302E002F000495019010F0F7FE00241F +:10B110000590039801210068A140084218D00C2135 +:10B1200061436D4809182006000E07910690E2F76A +:10B13000A1FA079986190698091DE2F7B6FA079948 +:10B14000C71906980831E2F7A2FA451901200490C0 +:10B15000641C042CDDD30498002821D00898A91B76 +:10B16000D7F773F908982900F4F78BFD0198406927 +:10B170004119019841610198806981190198102F46 +:10B18000816100D910270198C76102984068811930 +:10B190000298002D416003D002980021C030416028 +:10B1A000059810F0AFFE09B0F0BD0D22002192010C +:10B1B0008018017470470D220121920180180174DA +:10B1C00070470D2110B5040089014018007C01284A +:10B1D00008D02000FFF789FF2000FFF70FFF2000B5 +:10B1E000FFF7BEFE10BD10B5F3F788FDF3F7D7FBF0 +:10B1F0000AF0EEFA0020F2F72EFF10BD38B5050078 +:10B200006720C00028180400EEF270F901220092B5 +:10B21000324A2B0001212000EEF250F938BD4722BE +:10B22000D2000D2382189B01C01810B5007C0128A4 +:10B2300003D010000830F3F738F910BDFEB50D004B +:10B2400034210C5C1600FE2C05D021000BF0FBFF16 +:10B2500007063F0E0EE0112149014118CC7D09225D +:10B260009201210080180CF0F9F9002801D0012783 +:10B2700000E000271F2C18D320000A211F38F0F20D +:10B2800024EC02900C0008000A21F0F21EEC0100F0 +:10B290000298019048072107400E090FACDD177D89 +:10B2A0000100000058A5020000040000624F5CF598 +:10B2B00008436B46287018798000801C0CE0200041 +:10B2C0006A4601A90BF098FF002808D06B46187851 +:10B2D000287018798000401C3901084301E00020E3 +:10B2E0002C703070FEBD60E610270000E8570004A7 +:10B2F0007FA40200FF4908707047FE48007870473D +:10B30000FD480078002803D0FC48807C0009704785 +:10B3100001207047F8480078002804D0F748807C66 +:10B320000007000F704701207047F448007870470D +:10B33000F14800B50078002100280CD0EF4A1078C1 +:10B340000D2808D1FFF7E6FF032804D1FFF7D8FF47 +:10B35000032800D1D17A080000BDE74A08B5127869 +:10B36000002A12D0E8F2F6F869460EF0FAFD00065F +:10B37000000E03D06B461888002803D1DF490E2049 +:10B38000085608BD0006001608BD002008BDDA48B2 +:10B390000078002802D0D948007C70471020704700 +:10B3A0000200080000B5110087B0E8F2D3F801A947 +:10B3B000E7F2FEFE002803D06B46D87A07B000BD46 +:10B3C0001420FBE70200080000B5110087B0E8F286 +:10B3D000C1F801A9E7F2ECFE0028EFD06B46987A9D +:10B3E000ECE7C6480178407C8006800F7047C24871 +:10B3F00000787047C2480078704700B5FFF78AFFB1 +:10B400000100FFF77DFF0022814206D14B1E194249 +:10B4100003D1411E084200D10122100000BD30B509 +:10B42000FFF778FFB749441E496A05000A00002368 +:10B43000C03125400124002DCB7705D0E03206280D +:10B44000547000D1CC7730BDE03202285370F9D06F +:10B450000428F8D10220C87730BD30B5FFF750FF7F +:10B46000A849441E496A05000A000023C03125404E +:10B470000124002D8B7705D0E0320628147000D10E +:10B480008C7730BDE03202281370F9D00428F8D14F +:10B490000220887730BD00B5FFF7C1FFFFF7DDFF61 +:10B4A00000BD38B50C009549C97B002901D0217039 +:10B4B00007E06946E7F20AFE002803D06B461878D9 +:10B4C0002070012038BD38B50400002000908A4863 +:10B4D000007800281AD018F05AEA002816D18749B7 +:10B4E00008780D2812D1487CC0070FD1200069468A +:10B4F000FFF7D7FF002803D06B461878002801D14A +:10B50000B52000906B46187818F054EA38BD002832 +:10B510000FD07949097800290BD078490A780D2A8B +:10B5200007D14A7B02700A7D4270497D81700120FB +:10B5300070470020704770B5050015D06E48007840 +:10B54000002811D06D4C20780D280DD10321280042 +:10B55000F0F228EA607B0007000F01D0012803D138 +:10B560002800FFF7D4FF70BD002070BDF8B50500BE +:10B570000C001700002941D05F48007800283DD01A +:10B580005E4E30780D2839D1002D03D109223100CB +:10B59000163104E0012D31D1584909221F31200014 +:10B5A000F0F23AE9FFF7C4FE57490978002923D0A1 +:10B5B000002D21D1002F1FD000281DD0E17841405F +:10B5C000E170617841406170217A41402172317DA2 +:10B5D000490711D5A1784140A170217841402170DF +:10B5E000217941402171617941406171A1794140E6 +:10B5F000A171E1794140E1710120F8BD0020F8BD61 +:10B60000002010B50AF0DBF9E0F7A2F9002010BD28 +:10B6100010B518F0D4E93D488168406818F0D2E9C7 +:10B6200018F0D4E9002801D1FFF7EAFF10BD10B5EA +:10B6300018F0D0E910BD10B518F0D0E9002803D1FA +:10B64000FFF7DEFF002010BD012010BDFFB583B065 +:10B650000100FF2504000295427900262F000831E1 +:10B660006846F0F2DAE804982178027860780002FF +:10B6700008432749884217D2E078A378000218438C +:10B68000884211D9B42A01D2C8322A4000206B4620 +:10B6900007E0195CB42901D2C8311954401C0006D6 +:10B6A000000E61798142F4D8637900208025E6C0DC +:10B6B0000100000054A90200000400009620294166 +:10B6C0001FE06946095C91420CD104990A70059A01 +:10B6D0006946095C1170069A11700C9908700D99F1 +:10B6E000087031E0914203D2B14201D90E000290BC +:10B6F000914203D9A94201D20D000700401C000667 +:10B70000000E8342DDD80FE0300E0004163904002D +:10B71000A46C04001739040014C70004CCBE01C097 +:10B72000001500C088130000FF2F10D00298FF28DA +:10B730000DD00498027005980670069805700C9953 +:10B74000029808700D980770012007B0F0BD002026 +:10B75000FBE7F7B592B010AB1600187A5C7B0128B6 +:10B7600001D1002C7ED010AB597AE7F2FDFE0AA978 +:10B770001090E7F227FD0028F4D010AB187B08AB3F +:10B78000D97B884202D8997B884201D210AB1973C9 +:10B79000AB480078002805D010AB187B0E2801D9E3 +:10B7A0000E201873022C099401D10120099010ABCE +:10B7B0001A7B09991098150008ABE7F29DFD002847 +:10B7C000D0D010AB987B11908708022C0DD1119826 +:10B7D0004008012801D0012F07D110AB597A187AFF +:10B7E000119AE4F789FC10AB587204AA05A90192DA +:10B7F0000091353107AA0AA806ABFFF731FF0028F0 +:10B8000072D008AB1A7B00200AA960E00AA90918C7 +:10B810008B7CAB4258D8897BA94255D302AA0092AF +:10B82000039002006B461B7D09991098E7F2DDFD3D +:10B83000002859D06B46187D1D7CA84229D001AA4A +:10B8400000921A7B099910982B00E7F2CEFD002890 +:10B850004AD010AB5A7A04216B4600920820595600 +:10B86000185600E040E01D7E1A7F2B00E7F22FFE05 +:10B870006B46187210AB5A7A6B4600921D7E0521FA +:10B880000920595618561A7F2B00E7F220FE6B4606 +:10B89000587208AB59786B46587A08AB091859703A +:10B8A000997808189870D8786B46197A08AB4118BF +:10B8B0004906C009490EC0010143022CD9702BD1A1 +:10B8C000012F07D1012008E0401C0006000E824233 +:10B8D0009CD809E01198E7F264FE0100109801AAD3 +:10B8E000E7F2A7FC002802D1002015B0F0BD08AB9C +:10B8F00059786B46187908AB091859709978081867 +:10B900009870D8786B46597908AB41184906490EAA +:10B91000C009C0010143D97008AB587830709878DD +:10B920007070D8784006400EB0700120DDE713B586 +:10B9300082B06B460C00597A187AE7F215FE694618 +:10B94000E7F220FC002805D0082220006946EFF22B +:10B950006EEF012004B010BD13B582B06B460C0031 +:10B96000597A187AE7F200FE01A90EF039FD002895 +:10B97000F0D00422200001A9EFF258EF0120E9E7FE +:10B9800038B50C006946E7F29CFB00280DD06B46E9 +:10B990001878C007C00F207018788007C00F60703B +:10B9A00018784007C00FA070012038BD33B581B0B2 +:10B9B0006B461D790C0059792800E7F2D5FDFF2868 +:10B9C00002D1002D00D100206946E7F2CAFB002811 +:10B9D00019D06B460320022118565956884201D1CE +:10B9E000597819706B46207058786070D878A070BC +:10B9F000D878E07098782071187860719878E07144 +:10BA00009878A07101203EBD10B5E3F7AAFC0D495E +:10BA1000002807D1087D40060FD4487DC0430007A9 +:10BA20000BD108E0012808D1087DC00905D1487D67 +:10BA300000090F2801D1012010BD002010BD000019 +:10BA4000300E0004A46C0400FEB50D2204005C302E +:10BA5000009039482700903707603848384904601B +:10BA60002000C0300860FF20207000262000668083 +:10BA70002030267101210290017025007835801C4C +:10BA800030A1EFF2D4EE02980221467002980D2206 +:10BA9000C17302982FA1067420003130EFF2C6EE78 +:10BAA00002980321817702980D22C677200040304A +:10BAB0002CA10190EFF224EF0199042095459E9965 +:10BAC0000100000050AD020000040000C5FAFA2D8C +:10BAD000487301980D22867320004F302AA1EFF29F +:10BAE000B0EE0098062106600098001DEFF244EFCA +:10BAF00000980C21867200980B30EFF268EF0098E6 +:10BB0000012106762E700A206E7068602E72EE603B +:10BB100020002E61A0302E75418360213961012102 +:10BB20004902F9601C498180C180018141811B4823 +:10BB3000F88009203872042078721848401E7881F5 +:10BB400020000EF0CCFB0120FEBD0000BC00000474 +:10BB5000C0000004C4000004414243444546474835 +:10BB6000494A4B4C4D0000004E4F505152535455D2 +:10BB7000565758595A0000006162636465666768E9 +:10BB8000696A6B6C6D0000006E6F70717273747512 +:10BB9000767778797A000000FFFF00002B0900001B +:10BBA0001FB5190014006B469A8842871122520172 +:10BBB000821854820622FF4BC018EFF242EE20009A +:10BBC000E8F25EFB1FBDFFB583B0002306004569A8 +:10BBD000C020341830816078227807021743059A14 +:10BBE0002000EAF2D4F9F44A0092002205980E21CE +:10BBF0001300E9F269F9F14AD16011009060F04850 +:10BC0000083102F0A1F92800F9F7DCFB00280DD07B +:10BC10000F208001281841691B20EA4A40010818BA +:10BC20008A18837F417F2000E9F200F8E2481C383F +:10BC3000017F002905D00200437F1E322000E8F278 +:10BC4000F5FFDF480178002905D002005378921CE7 +:10BC50002000E8F2EBFFDA48017F00291AD0807F4C +:10BC60008007800F022815D22800F5F7A4F802906B +:10BC7000D3480200437F017F1E322000E8F2D6FF46 +:10BC80000298CF494030897F0171CD4803211C3093 +:10BC9000EFF29CEE0C98002809D00698002806D0F8 +:10BCA00039060C9B069A090E2000E8F2F6FF002DDB +:10BCB0002DD0287903280CD1687901235B03032850 +:10BCC00000D00023C0480022034321002800009236 +:10BCD00013E000281BD1032014F004FF0028029079 +:10BCE00015D00298F4F733FF2030407800280ED0AA +:10BCF0000022029821000423009217F088EE617858 +:10BD000022780902114340182070000A607017F071 +:10BD100082EE002812D060782178000208432100CA +:10BD2000203141180122280017F078EE617822783E +:10BD30000902114340182070000A6070A34A0121D3 +:10BD400020000423EEF218FD002801D0012100E0BC +:10BD500000210F2080012818016260782278B188C4 +:10BD600000021043081AE0380204120C00923B0053 +:10BD700022000121280003F076FB3000E8F77AFA70 +:10BD8000401C07D10021012000F040FA0020C043F0 +:10BD900007B0F0BD0020FBE7FEB50C00FF21070057 +:10BDA000F531E8F7D5F9050005D10021012000F0B3 +:10BDB0002DFA681EFEBD288922004619F120800058 +:10BDC0003918280000230094E8F716FA7B49E08828 +:10BDD000088001902289019930000023EAF25DF881 +:10BDE000A18F00220192009122002100A36B2A3230 +:10BDF0000A312800FFF7E7FEFEBDFFB583B00C0057 +:10BE0000FF2117000398F531E8F7A2F9050005D1E5 +:10BE10000021012000F0FAF9681EB9E72889F12114 +:10BE20004619039889004118220028000223009433 +:10BE3000E8F7E2F96149E0880880029022890299D6 +:10BE40003B003000EAF229F8A18F069A0192009196 +:10BE500022002100A36B2A320A312800FFF7B3FE2B +:10BE600096E770B506000D00B16C100000240029A3 +:10BE700002D00722EFF2E4EC716C002904D00E220C +:10BE80002800EFF2DEEC0124200070BD4006400ED9 +:10BE9000022805D0042803D00B2801D0162801D190 +:10BEA0000120704700207047F0B50021A7B00B912A +:10BEB000018944690E1837002037002C02D1062171 +:10BEC000012067E12000E1F721FC0890981311E7B9 +:10BED000010000004CB10200000400007A3FDF9E28 +:10BEE0002000E1F746FC07902000E1F765FC069092 +:10BEF00020007930250005905D352000FBF7DAFB46 +:10BF000004902000F4F761FF0390F878BA780102FA +:10BF1000114301D0032047E17178327809021143BF +:10BF2000891F0904B81D091412AA0CF0D9FAE8F700 +:10BF30000FF9A068C0218843A06024481C38007F06 +:10BF400000281ED021491C228818EFF284EC069AA2 +:10BF50000092079B089A290012A8E9F2C9FF00285D +:10BF60000FD0A068402108435F21A060095D8907C8 +:10BF700007D51649091D897E890702D58021084306 +:10BF8000A060A068032149038843A060114800789D +:10BF9000002818D00F490E228818EFF25CEC049AA2 +:10BFA000059912A8FFF767FF002804D0A0680321B5 +:10BFB00049030843A0602598002804D003982599D8 +:10BFC0004030897801710DE02902000008FF02C0AD +:10BFD000F08D01C0305200047F0300000400010016 +:10BFE000D4F531002B000BAA0CA912A8E9F2A5FF89 +:10BFF00011911090E3F7C9F9012819D108AB1D7B05 +:10C0000010E00CA9485DFFF74BFF00280AD008ABF1 +:10C01000187B421B4819411CEFF21CEC08AB187B43 +:10C02000401E0B906D1EECD5109800090001109079 +:10C03000239810A901F092FF119B109A200001F0A3 +:10C04000CFFE10907C4811918368119AC0681099B6 +:10C0500002401940200011921091E1F7DBFB020031 +:10C06000002120000BF0EFFAF2F7CAFC2000E9F7FC +:10C070009CFF2000E1F770FC002833D02000FBF784 +:10C0800083FA00282BD008980F21C078F3254007A9 +:10C09000CF228901002808DB601801694B7B2B4007 +:10C0A0004B7300691340437319E0049880780028AB +:10C0B00005D0601800690C25437B2B4304E0601811 +:10C0C0000069437B2B400833437360180069417B50 +:10C0D0001140089AD2789207920E114341732000C2 +:10C0E000F6F70AFD01F039FEE3F2D0FE01900021DF +:10C0F000119B109A3800009102F0E7F82000F3F746 +:10C10000E5FC2000F3F716FD2000403008AB197B5A +:10C11000017505001A7B801D0CA92690EFF29AEBA1 +:10C1200010981199019100902A7D2699200001F024 +:10C1300083FE2000FFF7F5F83F4801680291787907 +:10C140003B7902021A4333000C332000FFF732FD23 +:10C15000A06880040BD500212000F6F75BFC0121CC +:10C160002000E8F7A4FB112149016118088202F0C0 +:10C17000D6FC2000E7F7D3F909A90AA801F002FECE +:10C1800008AB187A800704D109990A9800F0FDFFDE +:10C1900000E00020D7F70AFCFBF7FCFE310020008E +:10C1A00017F04AEC0021080000F03AF827B0F0BD83 +:10C1B0007CB5018945690C181121490120006918D5 +:10C1C000097A20300600032906D141780078090257 +:10C1D0000143032000F024F860782178000208432E +:10C1E000022802D20020C0437CBD70783178000262 +:10C1F00008436B462100D8800C3106226846EFF2D6 +:10C200002AEB092228006946E8F792F800207CBD55 +:10C210000948002110B50180FF20E7F78DFE10BD11 +:10C22000002810B502D0032803D10220E9F7D8FD79 +:10C2300010BD0120FAE70000F08D01C008001900D0 +:10C24000002810B509D0042805D0052807D10720FB +:10C25000E9F7A9FD10BD0920FAE70520F8E7062057 +:10C26000F6E7FEB50C000700087AC979012600023E +:10C27000084300D00600FF215D313800E7F772FF68 +:10C28000050007D1A079220001210023FFF7D6FF86 +:10C29000681EFEBD2889220040190190F12080000F +:10C2A000391828000B230094E7F7B0FFA079A037D6 +:10C2B000B883701CF88300220092A17901983200A3 +:10C2C0000023E9F2A0FD2800E7F7DEFF401C05D1BE +:10C2D000A079220001210023FFF7B0FF00200B67A7 +:10C2E0000100000048B502000004000029E50CF23E +:10C2F0000020FEBD38B5150000928A7B4C7B1302EE +:10C3000023430A00E8F706F80400401C04D1002D7E +:10C3100002D0032000F006F9200038BDF8B50189ED +:10C3200045690C1820002030417900790B02034345 +:10C3300004D022000C32052101200BE0FF215D31E9 +:10C340002800E7F719FF060007D1220001210C326F +:10C3500008000023FFF77CFF34E0308922008719B2 +:10C36000F12080000C32291830000B230092E7F7EF +:10C3700057FF0421BE20415322002832009203229D +:10C38000012138000023E9F248FDB879C10764486B +:10C3900002D02818C26901E02818426A002A01D098 +:10C3A000083203D13000EFF2BDFF0BE078783B7824 +:10C3B000010219433800E1F2BDFF3000E7F76EFFDC +:10C3C000401C02D10020C043F8BD0120F8BDF8B5E3 +:10C3D0000300002442690089E443C01805002035A9 +:10C3E00069782E7809023143002A07D10B061B0E0B +:10C3F00002000C320121180006233EE0002903D080 +:10C40000012901D080292DD1EE78AF7836023E4344 +:10C41000A032D78BBE4201D0012430E0928B9142F2 +:10C4200020D101291BD1022E0BD0042E27D16979EE +:10C430002A790B02134309D002000C320521012096 +:10C440001BE01800FFF76AFF040018E0020000215B +:10C450000C3201200B00FFF7FBFE00240FE000F080 +:10C4600039F8F1E76A792D7913022B4309D00D06CB +:10C4700002002D0E0C3205212800FFF7E9FE2000F6 +:10C48000F8BD0B061B0E02000C32042118000D2310 +:10C49000F3E71CB501894469091848780A78000255 +:10C4A0001043022802D20020C0431CBD08002030E7 +:10C4B00042780378100218436B46D88006220C316C +:10C4C0006846EFF2D2E9082220006946E7F73AFF12 +:10C4D00000201CBD0100203110B5CA788C781302F1 +:10C4E0000200487823430C780002204300060C32F7 +:10C4F000000E022B06D004210E23FFF7A9FE002018 +:10C50000C04310BD4B7909791B020B4302D10021B6 +:10C510000B0000E00521FFF79BFE002010BD00008E +:10C520004003000010B5A64C2081A6480079800782 +:10C5300003D506212000EFF234EAA149A069F5F7FE +:10C540009DFC0028606901D0082100E00621E2F787 +:10C550004AFA608901F09EFB10BD38B5984C6269BB +:10C56000824206D0002A02D00320FFF7DBFF04201E +:10C5700038BD00250B00EFF294EB0C474747074707 +:10C58000474247423B473F47A0698168C9040CD5F1 +:10C590002169002909D18A49F5F770FC002804D0E7 +:10C5A00060690621E2F71FFA2EE086480079C0078D +:10C5B00008D013220092824AE388A0691100E7F7AD +:10C5C000B5FE21E0207B002808D0132200927C4A8F +:10C5D000E388A0691100E7F7A9FE07E013220092A3 +:10C5E000774AE388A0691100E7F794FE00280BD092 +:10C5F0000320FFF797FF07E07149022001E070492F +:10C60000002000F0D7F86561032038BD0020002924 +:10C6100010B515D00A68136F9B781C07A40F0FD1B3 +:10C620001B090C2B01D00A2B0AD16032527F132A2E +:10C6300006D10869002800D00320FFF773FF01200E +:10C6400010BDFFB58FB01C0005000F005C4E706977 +:10C65000002804D0002C43D0390002203FE03821CC +:10C660006846EFF29EE91998307357480090574892 +:10C6700001902800AC300C95B561002F0E9006D0CB +:10C680005349062238000FF096F8002805D14C488F +:10C690000E990622EFF252E916E04D490622891D55 +:10C6A00038000FF088F8002809D10722002128005F +:10C6B000E7F748FE002C13D00E9900200FE0404809 +:10C6C00006223900EFF2D0E841493D4806220FF03A +:10C6D00072F8002806D1002C02D039490120A04769 +:10C6E00013B0F0BD0F20800128180169E086BAEE72 +:10C6F0000100000044B9020000040000DD8A794610 +:10C7000008AB097B197201690125497B8907890FEB +:10C7100059720169497B0907890F99720069407B49 +:10C720008006800FD8721198242801D1758101E00C +:10C7300000207081F5F7E1FD002809D108ABDF7A10 +:10C740009A7A597A187A3B0001F03AFB002804D013 +:10C7500008AB187B4008400002E008AB187B284378 +:10C7600008AB18732048079018980690187B24216E +:10C77000084318731198F08068463461E1F781FF2F +:10C7800000287061B6D11349022000F01DF8B1E70E +:10C790001CB56B46987106226846EFF270E80D48AA +:10C7A0006946027B806900F0ABFD1CBD1CB50C0026 +:10C7B000002101930091E179A3790A021A430B4BFE +:10C7C0002100FFF748FF1CBD024A1269002A00D071 +:10C7D00010477047CC720400F0170004B3B7020092 +:10C7E00065B80200EC330400204E0000D5B9020009 +:10C7F000F3B5040089B0218940690E190121049123 +:10C8000000210A9A0791089106960592B2781309B9 +:10C810001B1FEFF250EA0A231E797930771279064E +:10C820003879002870D08168490302D50079002842 +:10C830006AD02000FFF737FE66E0002864D08168E8 +:10C84000490302D5007900285ED02000FFF7C4FC20 +:10C850005AE0002858D0062105AA10E0002853D03D +:10C860000179032950D14169026948318A424BD08C +:10C87000252105AA03E0002846D0032105AA10308F +:10C88000DDF2D2FD40E000210D000028039132D1FD +:10C89000032014F045F9070002D07879002801D16F +:10C8A000002710E03800F4F770F9002801D00500E7 +:10C8B000C535F12080003A182B00200003A9EEF2C4 +:10C8C00010FA0028ECD067613879032811D1787903 +:10C8D00001280ED100200290012211204001009277 +:10C8E0003A183100200002AB10F05DF9A088002852 +:10C8F0000AD0002F08D0039A0A9920000DF0C0FD3D +:10C90000049001E009F087FB04980BB0F0BDFF48EC +:10C910007047F8B50500FF21FD4800229131EFF284 +:10C9200035FD040001D10020F8BDFA49280147185F +:10C93000F81C14F063F90600606198202518208126 +:10C9400028212800EFF260E8042028700020687099 +:10C95000A878F3210840001D0007000F8030F12166 +:10C960008900A87006227118A81DEEF288EFEA4926 +:10C970002800062271180C30EEF280EF28002030DB +:10C980000090017804221143017041787A780907F8 +:10C99000090F120111434170C178827809021143D5 +:10C9A0007A890907090F120111438170090AC170C0 +:10C9B000002120000FF03DFB207B202803D1200028 +:10C9C0000FF014FBAFE7D5490C220868401C086043 +:10C9D000012000037881607B012108436073D04807 +:10C9E000A0612220A080342027182081A91D3800B2 +:10C9F000EEF244EF002139737973E722142120000D +:10CA00000E23D4F76BFC00994978090981720099CB +:10CA1000CA788B781102194309090172090A417217 +:10CA200031790629817C02D10122114301E04908B4 +:10CA30004900817413F0B5FA002802D00520F0F700 +:10CA4000CFFAE6F702F90FF095FAB74B0500B548B3 +:10CA500021001C68002200680523A04728000FF071 +:10CA60008DFA0120F8BDF8B501250FF083FA00908A +:10CA7000AA48016802291FD2AC4EA64F3468002094 +:10CA8000092C00D0601C04000001395C002909D089 +:10CA9000C019408901210903884203D02000FFF713 +:10CAA00038FF0500012D06D19C480068022802D2FB +:10CAB00030688442E3D1346000980FF05FFAF8BD2B +:10CAC00096490868401E0860CDE770B5050008006B +:10CAD0006030EFF216E881780909082915D1203075 +:10CAE000040040788B4A01098B482818EFF22EFE8B +:10CAF0000A280AD0E178A27809021143FFCCE002AB +:10CB00000100000040BD0200000400008E50AA2A6F +:10CB1000854A0001090980184181FFF7AEFF70BD09 +:10CB200070B505000C0013F046FA002804D002206E +:10CB300014F040F8ECF78FFC20006030EEF2EAEFE2 +:10CB4000817809090A2903D101002800ECF763FA6A +:10CB500021002800FFF7C3FF70BDF3B504000126D4 +:10CB600081B04769008905193800E7F7E2FC002821 +:10CB700031D0A8780309EFF2A8E80E082E082E2974 +:10CB80002E2E2E1D2E101419242E3800EBF732FCF9 +:10CB90002900380007F0BAF91DE0200007F085FFF2 +:10CBA00019E00299200006F0E5FD14E0200006F0EF +:10CBB00006FD10E02000E9F7E7FA2000EAF76EFB37 +:10CBC00009E002992000EAF7CBF904E0029A21007B +:10CBD0003800EAF7C4FB3000FEBD70B504005348CE +:10CBE0000E00201805000CF021F800280FD00622B6 +:10CBF00031002800EEF24CEE2000FEF77CFA4722CE +:10CC0000FF21D200491CA018EEF2DEEE04E0210064 +:10CC10003000F4F768FE0400200070BDF7B5050091 +:10CC200016004769100013F085FF11E0E06A002844 +:10CC30000AD0022E01D0032E06D1A74204D06C6187 +:10CC4000E26A01992800904731002000F3F746FD81 +:10CC50000400EBD16F61FEBDF3B583B00600012780 +:10CC600000898519A8780107890F36D100090428A1 +:10CC700068D0082870D00B2866D129001231022014 +:10CC8000029113F0E7FF040004D02000E7F751FC05 +:10CC9000002809D10299032013F0DCFF040003D01F +:10CCA0006079022800D000242000E7F742FC002829 +:10CCB00013D028000C30019013F0AAFF002801D0F7 +:10CCC000002206E0019920000EF034FD012805D174 +:10CCD00006220199200006F02FF96BE0200013F0E6 +:10CCE00019FF00906079F5F75EFB05002000F4F76E +:10CCF000DCF900992031097881422BD90A2D29D2FB +:10CD000001992000FFF769FF050053D0019A29001F +:10CD100020000CF03BFAE86A00284BD0756114E063 +:10CD200005BD02008819000474CB0004290200002C +:10CD3000340E000453BB020004000004340300045A +:10CD40009C3E040026E007E02FE0EA6A04993000E8 +:10CD500090472FE00722BCE729001231012013F091 +:10CD600079FF002804D1280003F0B3FE002821D069 +:10CD700029000C31FFF731FF04001BD0E06A0028C6 +:10CD800004D07461E26A049930009047200013F0E7 +:10CD90001DFF0FE0049903223000FFF73FFF0499C5 +:10CDA00002223000FFF73AFF04E004993000FFF759 +:10CDB00029FD0700380005B0F0BD7FB505000C0067 +:10CDC00002D1481E04B070BD002000900190029076 +:10CDD0002800039413F09EFE03006879022805D111 +:10CDE0004B20C000216818186A4608E029790329F9 +:10CDF00001D1032805D12800216810306A46DDF2F0 +:10CE00001DFB0020DEE7F0B5002885B001D1012030 +:10CE1000D1E7018945690C180020270009370090E7 +:10CE2000019003902800029713F074FE060028007A +:10CE300013F097FE2178222929D013DC1D2926D052 +:10CE400009DC0B2903D00D2901D00E293CD1280083 +:10CE500010306A461FE01F2919D0202917D0212938 +:10CE600032D114E02B2912D009DC232916D0242931 +:10CE70001DD0272928D12800DCF706FA28E02E2922 +:10CE80001ED02F2920D1280016F0F8ED20E04B20ED +:10CE9000C00030186A46DDF2D1FA19E0207CE17B4F +:10CEA00002020A433900280006F076FA10E06030EA +:10CEB000007A01280CD10021280006F0F7FA07E0DB +:10CEC000280016F0E0ED03E021002800FFF775FFD1 +:10CED000002070E770B504000D00C4480E21EEF28A +:10CEE0009EED0E220E2D00D22A00C049002006E041 +:10CEF000235C5B065B0E0B54401C0006000E904248 +:10CF0000F6D370BDFFB5A1B00600002027003503A1 +:10CF1000010000003CC10200000400008CA9723C2A +:10CF200020901E903000F3F744FE0700E6F7E0FF84 +:10CF3000002804D1E7F738F9209020A81E90772127 +:10CF4000C9003000E7F736F905007ED0288944197A +:10CF5000307903280CD1380016F0A2ED002807D054 +:10CF60007079032801D0022802D13800C53002E0D0 +:10CF7000F12080003018229A002A00D1A14A010035 +:10CF8000280004230092E7F769F900202070607000 +:10CF9000E078EF210840E070994A1E9B2399200019 +:10CFA000E9F227F81FA80CF0C7FF18AB1B7F002B76 +:10CFB00004D00200DD212000E7F26AFE3079032868 +:10CFC0007ED11F2040013018007A012806D00328A6 +:10CFD00004D07079032801D0022872D100201D905E +:10CFE000582107A8EEF2FAEC07A8069070790128FC +:10CFF00001D0022803D12100300016F056EDB87C94 +:10D00000800706D4BA20C05B002814D03800B9309D +:10D010000EE003206B4618730620587300209873A7 +:10D0200079480622391803A8C01CEEF23CEC03A88C +:10D03000159008201D90707901235B04022800D010 +:10D040000023FF2145310B4300E0B2E04D210901EF +:10D0500079180A7BC97A12020A4302D001214905D4 +:10D060000B43012813D138008030806B0290A03729 +:10D07000002038761D9A0092069A2100300016F0A2 +:10D08000F8EC6B46197A0004000C397608E01D9A1A +:10D090000092069A2100300016F0EAEC0004000C21 +:10D0A000617822780902114308182070000A607024 +:10D0B00016F0E2EC00282BD060782278010201E023 +:10D0C00009E025E01143200020300918002230003B +:10D0D00016F0D6EC14E000281AD1032013F034FD2A +:10D0E000070015D03800F3F764FD203040780028A1 +:10D0F0000ED00022210038000423009216F0B8EC74 +:10D10000617822780902114340182070000A60708B +:10D110002A98002808D02498002805D02A9B249A11 +:10D1200000212000E7F2EBFD2C980122002804D01A +:10D13000687B104368732C98A861288928812B99F3 +:10D14000992041552B982F001C37202808D1229870 +:10D15000002800D00022042130000AF08AF812E0F2 +:10D160003079032805D0E6F7C3FE01280AD105204F +:10D1700009E02000EDF27AFD002805D0E6F7B8FEC0 +:10D18000012801D00020B87060782278A9880002B8 +:10D190001043081AE0380204120C00922200012108 +:10D1A0003000002302F091F92800E7F795F8401CC1 +:10D1B00003D10020C04325B0F0BD0020FBE70EB531 +:10D1C0000022202100920292019102000100883287 +:10D1D000AC310023FFF7A0FE0EBD13B56B461A78E5 +:10D1E0000124200088409206920F012A01D1091DD6 +:10D1F00002E0032A02D1091F8C4020431CBD00001D +:10D200001858000420CC3100D408000070B5050087 +:10D210004B26F60002E00120D9F744F9F14800223C +:10D220003100EFF2C7F80400F5D0C020656120811D +:10D2300020186921EEF2FCEB200070BD70B50500EE +:10D240000D2080012818406A0024002801D0040025 +:10D2500008342E002036002902D1B07EC00611D439 +:10D26000012211002800D9F740FEB07EC00609D483 +:10D27000A86803210843002CA86003D0A07AFD21F0 +:10D280000840A072F4F758FD280016F0DEEA70BDE1 +:10D2900038B5040011214901002061180872A16805 +:10D2A000012212039143A1600F21890165182969A8 +:10D2B0000873207901280DD10022110010001300FD +:10D2C000009202F039FA2079012803D100210800E8 +:10D2D00002F037FAE1F78BFC28690521E5F7B0FD8C +:10D2E0003520005D000704D4012211002000D9F789 +:10D2F000FCFD2000D5F788FE38BD10B50400BA4803 +:10D3000022008068042100680023D9F714F900285E +:10D3100005D16069802116F0D8EA0020A9D8CBB5E4 +:10D320000100000038C5020000040000DF73A150B6 +:10D3300010BD2000EFF21EF8012010BDF8B5050069 +:10D340000F001600FFF76CFF04002ED02089001993 +:10D35000002E01D0AA4901E0A949891E0170090ADD +:10D36000417000218171C1710F2181700021C17054 +:10D37000072239000830EEF2A0EA2800AC300BF0AA +:10D3800069FC002805D139002800F4F79FFD00282A +:10D3900008D02800FFF786FF13F035FC002801D1E4 +:10D3A000D6F736FB2000FFF7B2FFF8BDF8B5040052 +:10D3B0000D0016001F00F7F7BAFA9248002F04D0AC +:10D3C00006223900EEF278EA02E00621EEF210EBD6 +:10D3D0008C480838C680046005712000FFF762FFA2 +:10D3E0001220EFF71BFEF8BD10B504007120C0003D +:10D3F000201800F021FD844821000622AC312018BD +:10D40000EEF25AEA10BDFEB505000E001121300003 +:10D41000EEF218EB7C483400291810340622B01DB7 +:10D42000EEF24AEAA868C0047ED529000622AC3193 +:10D430003000EEF242EA28002030817E3173C07E57 +:10D4400070732800D5F716FD6B4600901878B073FE +:10D450005878F07300272800A0302770010067700B +:10D46000007AA070000AE0700A7A29008831201D35 +:10D47000EEF222EAE078A17800020843241D0419A4 +:10D48000FF202B302070000A60700220A070002066 +:10D49000E07002A901A800F0A7FC6B461879207182 +:10D4A00002986071E078A17800020843241D0419F5 +:10D4B00001202070002060700E20A0700020290044 +:10D4C000E0700E224631201DEEF2F6E9E078A178F8 +:10D4D00000020843241D04190F2080012818426906 +:10D4E0000721C90152189279002A13D02270641CB6 +:10D4F00027704269641C5118C9792170641C277017 +:10D5000040697121C900641C411807222000EEF215 +:10D51000D4E9E41D3D48017E002911D02170641C2E +:10D520002770407E641C00E01DE02070641C3749B9 +:10D530002770641C1A2218312000EEF2BEE91A345A +:10D540003349887B00280ED02070641C2770C87B6C +:10D55000641C2070641C2770641C0C220E31200097 +:10D56000EEF2AAE90C34A01BFEBDF0B5050087B0B1 +:10D570000F0014001E0001A800F05EFC0622390016 +:10D5800003A8EEF29AE96B46200A5C76987604A826 +:10D590000722801C01A9EEF290E93200280003A9BD +:10D5A000FEF7D0FE07B0F0BDFFB581B00600150054 +:10D5B0001F00FFF735FE040009D0029A2B0031004E +:10D5C00020000097E1F2E4FC2000FFF7A0FE05B088 +:10D5D000F0BDF8B5150006000F00FFF721FE0400AE +:10D5E00008D02B003A0031002000E1F232FE20008A +:10D5F000FFF78DFEF8BD0000A41900049C3B000459 +:10D600002680000030580004820300000CFF02C096 +:10D610003052000410B50968491C03D14168183123 +:10D62000DCF23FFF002010BD0200080010B50968C1 +:10D63000491C05D1516810001831DCF232FF00207E +:10D6400010BDF8B504000E004B68856930689F680E +:10D65000D96800220D2879D017DC0A2874D00CDC98 +:10D66000801C72D001282DD0042805D1002D03D0B4 +:10D670005968280016F026EA96E00B2878D00C2886 +:10D68000FAD1280002F068FB80E0172869D006DC98 +:10D690001528F1D0162875D1012020747AE01828B9 +:10D6A00070D025286ED1002D7ED0287903287BD11B +:10D6B0006879012878D11A685968280016F046E977 +:10D6C0000020F8BD2800627401F0B1F8607DC00749 +:10D6D00006D0280001F0E1F9607D40084000607547 +:10D6E00000210120F4F702FD287903281ED128002B +:10D6F000F3F769FA0400280016F0E8E9002815D0CD +:10D70000206C002812D04320400124186078FF28A4 +:10D7100007D06846E6F7FAFB61780098002200F02F +:10D7200094FA00221100280016F008E90F3775A5B9 +:10D730000100000034C90200000400002B1CD4E4E6 +:10D7400004F05EFE002804D004F05AFE007903289D +:10D75000C0D0002004F0FEF8BCE701E01DE026E0A8 +:10D760003900280002F0AFFE0104090C280002F085 +:10D77000AAFBAFE706E016E0616824312000DCF286 +:10D780009AFEA7E73900280002F0DDFD0104090C2C +:10D79000280002F091FB9DE710E0280002F008FB52 +:10D7A0000028E9D096E7227461683C31E6E7012160 +:10D7B0000800F4F7A5FC2068A0608BE73000F8BDF6 +:10D7C000F8B5040008004D680368E968A6690127F8 +:10D7D000092B77D009DC9B1CEEF294EA0BAE22B148 +:10D7E000B1B177B1B1866B8CB100172B6BD005DC72 +:10D7F000152B69D0162B67D127749AE0182B63D0AC +:10D80000252B61D1002E5FD0317903295CD171794C +:10D81000012959D12A686968300016F0A2E88DE024 +:10D8200003208002E2F223FC3000FDF74BFD3000C4 +:10D83000FDF71FFD0120E6F2E5FE607D38436075CF +:10D840003079032823D13000F3F7C7F90500300001 +:10D8500016F046E900281AD0286C002817D043207B +:10D8600040012D186878FF2807D06846E6F758FB76 +:10D8700069780098002200F0F2F91F214901042084 +:10D880007118087200221100300016F062E80120C1 +:10D8900004F060F8617C002950D03300628AAC3318 +:10D8A00043E0FFF78DFD616818312000DCF203FED4 +:10D8B00044E00C31C879897902020A43032130001F +:10D8C0000023EEE724E032E039E0E7F7E3F900284F +:10D8D00004D0B0480168491C01602FE02A686968DB +:10D8E000300000F066FE29E02A686968300000F028 +:10D8F00042FD23E00C310D003000F4F7F1FA00286E +:10D900001CD0E879A97902020A432B0008210CE017 +:10D910000C310D003000F4F7E3FA00280ED0E8795E +:10D92000A97902020A432B0009213000B9E700203F +:10D93000207461683C31B8E72068A0600020F8BD21 +:10D94000F8B5040008000B684D68A66900270E2B87 +:10D9500021D008DC9B1CEEF2D6E90A610F60606002 +:10D960004860604E3760152B56D0162B49D0172BC8 +:10D970004ED0182B51D14FE0022003F0EBFF0120D5 +:10D98000E6F240FEE4F74BFCE4F750FC08213000DF +:10D99000F5F77CF840E03000F6F7D3FF0120F4F70C +:10D9A00089FC616820001831DCF285FD3000F2F757 +:10D9B000D6FF3000F2F75AFF7748076077480760D4 +:10D9C000300002F038FA27E001210800F4F76BFB81 +:10D9D00000210120F4F794FB002203213000130002 +:10D9E000FFF7EEFC616818310EE02A6869683000C4 +:10D9F00000F0DFFD10E02A686968300000F0BBFC31 +:10DA00000AE00120207404E02000DCF254FD03E071 +:10DA1000277461683C31F7E70020F8BD2068A060FA +:10DA2000FAE770B5040048680A68C568A069092A61 +:10DA30002CD00FDC921C33D0012A15D0092A22D019 +:10DA40000A2A2FD129000C31F4F74AFA002827D0EE +:10DA5000082022E0152A10D0162A23D0172A21D018 +:10DA6000182A1FD1A1680AE0FDF709FC0020E6F2A0 +:10DA7000C9FD0020E6F229FD12E06168483120006E +:10DA8000DCF219FD0CE00320607409E029000C3180 +:10DA9000F4F726FA002803D009206074688A6082AF +:10DAA000002070BD080070BD70B504000800496812 +:10DAB0000368CD68A269142B17D018DC072B2CD073 +:10DAC00004DC9B1C35D0012B10D10EE0082B27D095 +:10DAD000092B0BD129000C311000F4F701FA0028B2 +:10DAE00003D009206074688A6082002070BD153BF5 +:10DAF0000021EEF208E90604040405070E04F5E728 +:10DB0000A16802E06174616830312000DCF2D3FC6E +:10DB1000EBE7617461681831F7E703206074E4E7AC +:10DB200029000C311000F4F7DBF90028DDD00820C3 +:10DB3000D8E72068A060D8E7194910B5DAD657D3DE +:10DB40000100000030CD02000004000078C6078804 +:10DB50004160194A17480021DCF2ABFC1549174A0D +:10DB600008000C300400DCF2A4FC1248144A210026 +:10DB70001830DCF29EFC0F48124A21003030DCF2F3 +:10DB800098FC0C48104A21002430DCF292FC094831 +:10DB90000E4A21003C30DCF28CFC06480C4A210085 +:10DBA0004830DCF286FC10BD380E0004C4BE01C053 +:10DBB000C8BE01C0385800041DC8020031C80200A8 +:10DBC0004BC80200B5C9020035CB020017CC0200D9 +:10DBD0009DCC0200F8B504000D0017001E000028BF +:10DBE00025D04920005DC00700D00120E6F73EFEA9 +:10DBF0002000E6F299FBE6F7E3F806222100280070 +:10DC0000EDF26EEE2021A01DDCF2CDFC050002003D +:10DC1000A11D3800EDF24AEF2900A01D3570E6F293 +:10DC2000A3FB2000E6F222FC0120E6F258FCF8BD3E +:10DC3000F8B50D001600DFF7B9FD297804000807D4 +:10DC4000800F032806D18806800F03D1CF20014022 +:10DC5000103129700C206946F9F79EFE030022005E +:10DC600031002800E7F2B9FAF8BDFF490020C8608A +:10DC7000704777B583B00D001400FB4EF068814209 +:10DC80002DD10122F11C03A80DF0D1FD002826D1D1 +:10DC9000002C10D1280003A9FAF72EFE002832D15B +:10DCA000FAF706FE00282ED1E6F70BFAEF4801211D +:10DCB000FBF78FFC27E0012C25D1280002AA03A93D +:10DCC00001ABE6F7CDF96B461A79197A2800FBF714 +:10DCD000E8FBFBF7CBFB0120E6F7F3F913E0FAF7DB +:10DCE00001FA23000122280003A9E6F7EDF96B46AB +:10DCF000187BF070F560B168002904D13070B56010 +:10DD0000E6F7DCF9B070002006B070BDD64938B532 +:10DD10000200CC780094C96800980906090EFFF744 +:10DD2000A8FF38BD10B5F4F7B7F8002805D00120DA +:10DD3000E6F7C7F9CC490120887010BDFFB581B066 +:10DD40000C0005000021CA4EE37830785F0706D446 +:10DD50009A089200E270F322104030700AE0927844 +:10DD6000002A07D00207920F032A03D00C21084390 +:10DD7000012130703078E27880069207BA4E800F29 +:10DD8000920F90420CD00C206946F9F705FEF1681D +:10DD900003000906090E2200F01CE7F21EFA01E05A +:10DDA000002914D0F068B2490006049B000E01223D +:10DDB000E6F78AF92879062805D00F20800128186F +:10DDC0000069F1784173AA492800F6F745FE05B0CD +:10DDD000F0BDA54A002801D0D3780370002901D0F6 +:10DDE000D0680860704710B59F4CE0782070E068FC +:10DDF000A060E6F7F5F86070E6F760F9A070FAF752 +:10DE0000A9F910BD10B5E6F7EBF89749487010BDB9 +:10DE1000954A002801D013780370002901D090683A +:10DE200008607047904A926882420FD18E4800780D +:10DE30008207920F8A4209D18006810F994203D04E +:10DE4000800F01D0002B01D10120704700207047C6 +:10DE500087480078800701D1012070470220704771 +:10DE600081490A78027089684170704770B5060070 +:10DE700015001C00F9F7CEFB002804D16D006D08D9 +:10DE8000640F64070DE03000DFF7B0FD002801D11A +:10DE9000784805E03000F9F7C1FB002801D1764849 +:10DEA00004403000DFF79EFD002801D1734805E0F3 +:10DEB0003000DFF79BFD002801D1714805402800A4 +:10DEC000210070BDFFB583B00C000025200005992E +:10DED000FFF728F805992000E6F2D0FF0E000700B2 +:10DEE0006940084349D105992000E7F217F80191EC +:10DEF0000400002100070A00000F49405040084379 +:10DF00001ED00398007903281AD02A00002101208E +:10DF1000EDF2B0EA019A00232040114059405840E8 +:10DF2000084307D02A0000210120EDF2A4EA0743AC +:10DF30000E4322E06D1C2D062D0E032DE5D91CE0AD +:10DF4000FF2220005201002110400A00D34B4475EB +:10DF5000010000002CD1020000040000C703223B96 +:10DF600049405040084312D005252A0000210120D5 +:10DF7000EDF28AEA019A00232040114059405840AE +:10DF80000843D9D16D1C2D062D0E0C2DEDD903980B +:10DF900033003A00E3F7EEFE0398E4F72CF9039818 +:10DFA00011F0BBF9E3F774FF0D9B0C9A039809F08D +:10DFB0001EF907B0F0BD70B504000D000800F3F7BE +:10DFC000F0FC002804D02900AC310720F4F702F857 +:10DFD000002C06D00020E6F753FC2F48006880474D +:10DFE00002E00120E6F74CFC0120E6F282FA012073 +:10DFF0000006E2F23CF8E2F2CFF870BDF3B583B070 +:10E000000F000398002837D0002500240398C17919 +:10E010008279080210436100C8408607B60FF10FED +:10E02000032230005040084301911FD0002D09D138 +:10E030000199022230005040084303D10199421E49 +:10E04000B61851410120B04000022A190A23401E8F +:10E050005A43C117EDF218EA4208C90711433A685A +:10E060007B68C0071043194379603860641C012C39 +:10E07000CCD36D1C022DC8D9B3E600003C0E0004C1 +:10E08000FFFF07003F0E0004FF0100E0FFFF07E075 +:10E09000FF3F0080FFFF3F8080F90004F0B50400DF +:10E0A0000021FE4D85B06878E5F796FF20790328BA +:10E0B00004D1200015F028ED002807D12868019030 +:10E0C000A968AA780906090EFFF7DDFD2079002668 +:10E0D000012803D1A068C00400D50126E5F7A8FEF9 +:10E0E00021003000FFF767FF22005D322000009220 +:10E0F0004030017D07000022801D13000490E6F2ED +:10E100003DFF029020000391793002A9FFF776FFCE +:10E11000002E06D1039B029A2000FFF7B1FE039167 +:10E12000029003990298019100903A7D0499200091 +:10E13000FFF7D2FEFAF718F8E2F2DEFC0020686082 +:10E140004FE6FF30F8B5FF30801C856B0F00002DC7 +:10E150000DD0002401263000A040284204D0200623 +:10E16000000E3900FCF78FF9641C042CF3D3F8BDC2 +:10E17000F3B583B00E00002703980297DFF720FB6A +:10E180000500B46B0398F2F770FE0398F9F7E2FA12 +:10E190000190C3A0B66E006800900398DFF72CFCD6 +:10E1A00000286DD0002C6BD00398F9F73DFA0121BF +:10E1B000002815D001988278B078824207D1EA7899 +:10E1C000E37892079B07920F9B0F9A4258D0002842 +:10E1D00002D00220029010E0E07880070CD109E024 +:10E1E000E8788207E078920F83079B0F9A4247D026 +:10E1F000800701D1029700E00291E878E178800879 +:10E2000089078000890F0843FB21E8700840E17806 +:10E21000F3234907C90F89000843E8700198B178D2 +:10E22000817003980F218901401801696D464A7B6E +:10E230001A406B461B7AEB5C9B071B0F1A434A7311 +:10E24000CF210A40E17800698907890E0A434273A9 +:10E250000398F4F7A1FC0398F0F720FA6B46187ABC +:10E26000002801D0012100E000210398FFF769FF99 +:10E27000FFF7C3FD03984821012302AAE4F7B4FC89 +:10E28000AFE570B50500874C0E00207900218006AF +:10E29000C20F280009F007FA2079C00604D5310022 +:10E2A0002800E3F799FF70BD280011F036F8E3F776 +:10E2B000B5FF70BD70B57B4C2079C006C50F201D21 +:10E2C000E7F273F82079C006C00FA84201D010F021 +:10E2D0008AFD01F033FE70BD70B50400714E0D0073 +:10E2E000301DE7F220F92079012803D12900301DE3 +:10E2F000E7F289F870BD0021012010B5F2F777FA36 +:10E3000004000ED0E1F212FE01002000FFF7E4FF4E +:10E31000FFF7D0FF112040012018817D2000FFF77A +:10E32000B0FF10BDF8B51500070008004978027865 +:10E3300009021143002634000C392A002C300AF05F +:10E34000CFF8E869002801D04478861C6A6B0092F7 +:10E35000A86923004178801C3200E6F2B6440065CB +:10E360000100000028D502000004000094D9F157F4 +:10E370000FFE020038000B00FFF78CFDF8BD7FB5E3 +:10E3800014004B4A089E127809994B4D920705D00C +:10E39000281DE7F262F901F0DBFD7FBD474A0291DB +:10E3A000010003923200281D00940193E7F279F9ED +:10E3B0007FBDF7B5BAB00E003A981231F3F7AEFD53 +:10E3C000002864D03A9831001DAAFFF7B5FF1C90D1 +:10E3D0003A980F00007903283AD100200590049064 +:10E3E0003A98F2F718FC0400807C400730D506AA62 +:10E3F00000920021300005AA04AB15F094EB050053 +:10E400000498800406D52B00286A2033092201A92C +:10E41000ECF2D5FA002D1BD0286A002818D0284924 +:10E42000C01C062261180DF016FA002810D1E5F77D +:10E43000EDFE4321490161184870A0680821084396 +:10E44000A060049A3A9823002900009615F06EEB1C +:10E45000E1F276FD040001003A98FFF747FF2599A5 +:10E4600030001C9A3B002A3001940091FFF787FF8F +:10E47000FFF72AFF3A98112149014018817D3A9807 +:10E48000FFF709FF219A20993A98F6F731FE3DB03F +:10E49000F0BD10B5C87A0124C00707D00C3A0C3182 +:10E4A0002520EBF20CFA002800D00024200010BD3B +:10E4B0003C0E000400020300C4E80004404B4C0082 +:10E4C000C8080000F7B582B00C001600E1F2ABFC02 +:10E4D0000F0005002100082220316846EDF214EA01 +:10E4E000F07EEEF223FB01006078227800021043F8 +:10E4F000001D0001EDF258EF009A019B80180021E9 +:10E5000059410090300050300191EDF240EB009AFB +:10E51000281A8018019B002159410191009002990D +:10E520000F20800108180169019B009ACB618A6164 +:10E530000069210047620562029815F0FCEA5AE47E +:10E54000F3B583B00C000398F2F799FC050003982B +:10E55000DFF740F90600FFA0006802900DF050FDC3 +:10E5600001902178C8093ED1403528798907800774 +:10E57000800F890F88422ED02078039980070F22C0 +:10E58000800F92018A1800901369F327597B394054 +:10E5900002AF385C8007000F014359731069CF2226 +:10E5A0001140F2789207920E114341730398F4F7E9 +:10E5B000FDFA6B461878002801D0012100E0002107 +:10E5C0000398FFF7C8FDFFF722FC039848210123B9 +:10E5D0006A46E4F713FB20782871039808F0E7FDFA +:10E5E0000398FCF7F8FE01980DF00EFD03E4F7B573 +:10E5F000A8B004000F0000790D001237032801D0E5 +:10E60000002805D139002000F3F788FC00287ED0CF +:10E61000290020000AAAFFF78FFE09910890E1F275 +:10E620008FFC060001002000FFF760FE1299280011 +:10E63000099B089A2A3001960091FFF7A0FE260058 +:10E640002036F07E4007C20F280020302790C07A85 +:10E650004007C10F8A420CD02000E5F799FBF07EFD +:10E66000FB2108402799C97A4907C90F8900084347 +:10E67000F076FFF729FE3A0020000AA9DFF753FCE5 +:10E680000B992000A030002902D00B99C978417263 +:10E6900027994A7A0B7A110219434181AE480B9BA4 +:10E6A00000788207920F00926878297802020A4364 +:10E6B00027992000F0F746FE0790E1F2B4FB07002F +:10E6C00005912799082202A8EDF21EE92A98C07E3A +:10E6D000EEF22CFA69782A7809021143091D0A0121 +:10E6E00001001000EDF260EE029A039B80180021F9 +:10E6F00002902A98594150300391EDF248EA029A6B +:10E70000039B381A002180185941039100E065E00D +:10E7100002900F208001201826900069039A029928 +:10E72000C261816126980599026917625162207958 +:10E7300001280AD109990898019100902A9A290084 +:10E7400020000AAB02F0B6F85FE02000F6F79CF874 +:10E750002079002802D1280015F0F0E920000AA94C +:10E76000FFF710FD2000F8F769FF0028061D694D2E +:10E770000100000024D902000004000060B684E318 +:10E7800012D0259800280FD02000F2F782FB25999F +:10E790000122891C44300DF068F8002804D0259926 +:10E7A0002000891CFFF7D6FE079A0B992000EEF790 +:10E7B00083FA0E9A0D992000F6F7A4FC0F99002019 +:10E7C000002906D0269A89781269127B914200D0DE +:10E7D0000120664F00280DD07868401C032878601F +:10E7E00006D3072200212000E5F706FE002078600E +:10E7F0002BB0F0BD00237B60089809990F22121AF4 +:10E800008B415B49087905D2F7221040C008C0004F +:10E81000801C03E008221043C008C0000871F07E8D +:10E82000C10601D4C00707D01F9A0092149B1E9AFC +:10E830001C992000F9F7D3FB112040012018817D9D +:10E840002000FFF732FD20790128D1D029002000D7 +:10E8500015F07AE9CCE770B5040010300500FFF739 +:10E8600093F9616928001831DBF23DFE002070BD8C +:10E8700010B53F4C21798906CA0F002108F027FF07 +:10E880002079800601D5012000E00020E1F2FFFFA1 +:10E8900017E6F0B5040085B0FFF762FADDF78CFBF0 +:10E8A000002801D1DEF7E6FB20003A30E6F2F9FA63 +:10E8B000207926000027A036032812D11F2040010E +:10E8C0002018007A03280CD120000621AC30EDF28C +:10E8D000C2E8200020218830EDF2BCE83772777260 +:10E8E00077810DF097FB0290207903280FD1607992 +:10E8F00003280CD14D200001251801E0E9F77BFD2C +:10E9000068680028FAD10021200015F066E8029816 +:10E910000DF084FBF9F7F4F90068002803D0F9F74B +:10E92000EFF9DDF7E4FEDDF747FB002802D1200018 +:10E93000DEF78FF80F480021D2F7DEFD2000DFF769 +:10E94000FBFB2000F8F7B1FE01212000F4F7C6F828 +:10E95000094806212018EDF2A8E811256D0160197B +:10E96000049047820AE00000000203003C0E00040D +:10E97000C4E80004BCC400042902000012F075F9C8 +:10E98000002800D120004019408AE5F2E7FC67200A +:10E99000C0002018EAF236FE2000FCF798FC2000A8 +:10E9A000FCF7EFFB2079002801D1F0F7ABF920004C +:10E9B000F1F7F0F8FF4D0E21686A401DDBF211FE01 +:10E9C0000390F0F76EF800220092686A0399401DE8 +:10E9D0001300E6F2E7FA01910090696A039A491D73 +:10E9E0002000FFF78DFA2000FCF7FFFC0022110049 +:10E9F0002000F6F79FFC01212000E5F7D3F912F083 +:10EA000034F9002801D1D5F735F80F2080012018FE +:10EA10000069603047820D2080012518E86ADCF229 +:10EA200002F8EF62A86A002802D0D8F73FFAAF6276 +:10EA3000A068410701D4C0060BD5686A002802D03F +:10EA4000D8F734FA6F62E869002802D0D8F72EFAB6 +:10EA5000EF61207903280BD1686A002802D0D8F72B +:10EA600025FA6F62E869002802D0D8F71FFAEF6133 +:10EA7000A06810218843642177727181CE49CF4EFE +:10EA80008843A06004986121C7712000C943E03029 +:10EA9000018241825221301DEDF206E830792021B9 +:10EAA000084330712000FFF7E3FEF9F7D7FAEF20B3 +:10EAB00080000122FF212018E5F7B5FAF9F768FB7D +:10EAC0006079032805D1286A002802D0D8F7EEF92A +:10EAD0002F622000F2F7D1FF00210120F3F78EFA18 +:10EAE0002079F3F7E5FA01210800F3F704FB002190 +:10EAF0000120F3F72DFB2000F5F76FFF29E5F8B5AE +:10EB0000AF48006A00286DD1AE4E3088002869D029 +:10EB1000022012F055F80500F2F757FF002861D0E7 +:10EB2000280012F064F8040070880F218901012880 +:10EB300019D169180869062202730B69F327587BFB +:10EB40008008800058730B69384058730B69CF27D1 +:10EB5000384058730B698006800E587362720869DA +:10EB6000407B207215E0022808D168180169E27A1A +:10EB70000A730069A17A4173608909E03F9831EA1C +:10EB80000100000020DD020000040000336C578FFC +:10EB9000032808D16818016972790A73006931790C +:10EBA0004173B08820818D49607A8968884207D195 +:10EBB00020008A49012208300CF061FE00281BD099 +:10EBC000207A81078548890F00788007800F81426D +:10EBD00002D02800E7F7D9FD01212800F3F79EFEB7 +:10EBE0003088022803D101212800F3F7A4FE2A224D +:10EBF00000212800E5F70AFCF8BD784900204860AC +:10EC0000704710B54179022903D18068C0040DD442 +:10EC10000AE0016940694830814207D1E5F70AFB03 +:10EC20006E498968884201D0002054E4012052E4F2 +:10EC300010B54179022905D111F0BCFF4B21C90063 +:10EC4000401800E010300168406802003032914204 +:10EC500005D00C3A914202D03C30814201D10120D2 +:10EC600039E4002037E410B54179022905D111F0CB +:10EC7000A1FF4B21C900401800E010300168406836 +:10EC80001830814201D1012025E4002023E45349BA +:10EC9000002010B5486001F02FFF1CE401000120A6 +:10ECA00010B5F3F783FA16E410B54A78022A02D1B8 +:10ECB000891CFFF759FC01200DE4F7B582B0040070 +:10ECC0001500002825D02000F2F7EDF840300600AE +:10ECD000007903998207920F8A4203D14006400FC0 +:10ECE000A84216D00399A0688F076907490EC2048D +:10ECF000BF0F002A01911EDA410601D480041AD503 +:10ED00002100039A2B00AC312000E9F7BDF8002860 +:10ED100001D1002027E430798F218008800038431A +:10ED20000840019908433071200008F054FA20008F +:10ED3000FCF765FB0DE02A48C721017701214177E7 +:10ED4000817F8F228908890039431140019A11433C +:10ED50008177012007E4F0B5040087B06846ECF243 +:10ED6000B3F920681A226946ECF2E2ED206800252A +:10ED70001A3001262060A90068460C18A07A4006C7 +:10ED8000800FEEF222F80700E07A0107090F300049 +:10ED90008840411E3800E1F212F8E07A31000009A3 +:10EDA0008140491E3800E1F214F8A07A0107090FEA +:10EDB0003800E3F7B1FBA1893800E1F21DF86D1CC2 +:10EDC000042DD8DB07B0F0BD14C700040400020016 +:10EDD000C4E8000418420004A40500043C0E00042A +:10EDE00030520004FEB5FF21F931FF48ECF23CEE51 +:10EDF000FE49FF48ECF238EE6921FE48C900ECF20A +:10EE000034EEFD483821ECF230EEFB4E0024483E53 +:10EE1000370024370C256543A819DBF2FAFBE81903 +:10EE2000DBF2F7FB641C032CF4DBEF4E002425001F +:10EE30005420604381193550EF484D6048384D7477 +:10EE4000DBF218FC641C062CF2DBEB4800240127E3 +:10EE5000E74E3C380190D4206043811935504D6015 +:10EE60004F740198DBF206FC641C052CF3DBE248CE +:10EE700000240227DF4E30380090FF201930604315 +:10EE8000811935504D604F740098DBF2F3FB641C20 +:10EE9000032CF2DBD94805800020FEBD70B50600CA +:10EEA0000D000024402909D8D3484838DBF2B8FBCC +:10EEB000040003D0D048210024380AE0C02D0BD82C +:10EEC000CD483C38DBF2ACFB040005D0CA48210039 +:10EED0001838DBF2CFFB0DE0FF20801C854209D8FB +:10EEE000C5483038DBF29CFB040003D0C248210047 +:10EEF0000C38EEE7C049B0000C50200070BD0C2368 +:10EF000010B5BD4C4343243CE05800221B199B68BC +:10EF100004E0C4898C4204D90068521C9342F8D89A +:10EF2000002010BD70B504000025002846D0607C8C +:10EF3000032843D2E18940290AD2002808D1402180 +:10EF40000220FFF7DCFF05000BD14021012005E086 +:10EF5000C02906D2012804D1C0210220FFF7CFFF2B +:10EF60000500217CA44E00208900002D705012D095 +:10EF7000A868A060A889A081E889E081287C207425 +:10EF800029002000EA8914311430ECF2156164B5CF +:10EF9000010000001CE10200000400001BFDD23251 +:10EFA0003CED207C800034502C00607C0C23974981 +:10EFB0005843243940182100DBF2A4FB617C0C2368 +:10EFC000924A5943483A8A1801001000DBF25CFB70 +:10EFD00070BDF0B5002002008D4D8C4F2880243F7D +:10EFE0000C205043C1198E68002E0AD039580020D9 +:10EFF00005E08B892C8823432B800968401C8642BE +:10F00000F7D8521C032AEBDBF0BD70B50500487938 +:10F010000C00097900020843402801D8002104E0CF +:10F02000C02801D8012100E002212868427C8A42E0 +:10F030000ED0FFF781FF60792279010260781143D9 +:10F040002278000210430006000EFFF731FF28600F +:10F0500070BDF7B590B006000C0074D1A7E06078E1 +:10F060002278010211430E29F8D262792379100225 +:10F07000FF221843921C9042F0D888006349085838 +:10F080000E90002804D1617922790802104359D0EA +:10F09000F179307900F09AFB05000E98002853D0E2 +:10F0A00062792379110219434ED18168A9438160A5 +:10F0B000C28925211430F7F7F9FE002803D00E99F4 +:10F0C0000020886003E00E98806800283AD1300064 +:10F0D000F1F7BFFD050014F054ED411C10D062782B +:10F0E0002378110200061943000E814208D1002046 +:10F0F000C04314F04AEDA868FF21491C0843A860EA +:10F1000047204001281817228256511C09D06378E5 +:10F110002578190229430906090E8A4201D1FF21E7 +:10F12000C17518228256511C09D0637825781902BE +:10F1300029430906090E8A4201D1FF2101760E9862 +:10F14000FFF7FAFE06E111E1002821D08168A9420B +:10F1500005D121000EA8FFF758FF0E9825E0E378AF +:10F16000A17882891B020B439A4220D162792379CC +:10F17000C18912021A43914219D1A11D14300CF019 +:10F1800088FB002813D10E98816829438160E1E053 +:10F1900061792079627809022378014310021843CB +:10F1A0000006000EFFF784FE0E90002802D1012019 +:10F1B00013B0F0BD8560E278A37811021943818114 +:10F1C000627823781102194301746279237911025C +:10F1D0001943C1816279217912020A43A11D1430B9 +:10F1E000ECF2B0EB0E982521C2891430F7F75EFEE1 +:10F1F00000281DD0012011F0F7FC0BE0980003C09F +:10F2000024040000900203C0B40603C0440A03C0F3 +:10F21000A0BE01C0F94D022014F092EB2F0403E0D0 +:10F220003D43022114F024EC0028F9D10E988560AA +:10F230003079022836D13000D9F7AEFF002831D11D +:10F240000E983021C2891430F7F730FE050029D01E +:10F25000300011F0B9FC0022052005A901AB07C35D +:10F2600006AA009228000DAA0BA90CABE9F24EF9F0 +:10F270000F208001301801696B4660310A7C1B7DCC +:10F2800052085200DB091A430A74FD210A406B46FA +:10F29000197D006949066030C917491CC907890FE3 +:10F2A0000A4302740E9FD649B889884252D1300071 +:10F2B000F1F7CFFC050038001430D24904220F903A +:10F2C0000CF0E7FA00280ED10E993000CA891431EB +:10F2D00014F05EEC6178227808024721104349015E +:10F2E0006918C87536E0C8490F9804220CF0D1FAA5 +:10F2F00000281ED10E98C089001F0104C348090CC4 +:10F300002A183800183014F048EC09200002281898 +:10F31000006B002804D0A868FF21491C0843A8609E +:10F32000617822780802472110434901691808765C +:10F3300010E03800B649042216300CF0AAFA002872 +:10F3400008D10E98007C14F020ECA868FF21491C1D +:10F350000843A86061792279080212991043091ABA +:10F36000891F09040914A41D041912911298062872 +:10F3700000D374E6FFF72DFE002019E7F7B584B03F +:10F380000027002910D0101D002A04D0D3789478CB +:10F390001A02224302D100260E200DE0735F4911AC +:10F3A0000100000018E50200000400004827015E8B +:10F3B00042780378100218430E2802D3002007B0C9 +:10F3C000F0BD0606401C360E0006000E03900498A1 +:10F3D0000C1D0191C179007900F002FA02904AE017 +:10F3E000300A267090496070B0000D58002D30D062 +:10F3F000A868029908423BD00498F1F734FCAA8926 +:10F40000A270120AE270A989824A914213D147225E +:10F410005201821817201056B0420CD100200090E3 +:10F42000049821006A4614F0C6EB6B4619882171D6 +:10F43000090A617112E0A170090AE170E98921717C +:10F44000090A61712900EA891431A01DECF284EAED +:10F4500004E00020A070E070207160716179227971 +:10F4600008021043BF1DC1190F043F0CA41D04194D +:10F47000761C3606360E03988642B1D30198FF21DA +:10F480006A310170090A41700198390A87703F1D7D +:10F49000C1703804000C92E7002910B501D100209A +:10F4A00010BD032300220B714A7140248C7100248B +:10F4B000CC7106240C720024C0224C728A72052280 +:10F4C000CC720A73FF22921C4C738A73120ACA739D +:10F4D0001A0A0B744A74FF22AB320A70120A0E2009 +:10F4E0004A7088700020C870122010BDFFB581B02E +:10F4F000C17900790A9F00F073F9060000254A4996 +:10F50000A8000C58002C16D0A068B04213D1A089D6 +:10F51000B84210D12000049A039916300CF0C3F9B8 +:10F52000002808D12100E28902981431ECF214EA93 +:10F53000E08905B0F0BD6D1C2D062D0E0E2DDED31D +:10F540000020F6E770B501258D40C0008540364E9D +:10F550000024A0003058002805D08168A9438160AC +:10F5600001D1FFF7F3FC641C2406240E0E2CF0D30B +:10F57000FFF739FD70BD10B5FFF748FC10BDFFB5B2 +:10F5800083B01C0017000C9E002A01D1012016E751 +:10F59000C179007900F024F90190B87801090120BF +:10F5A000884022490988084230D000252006000EF4 +:10F5B00002901D48A9004458002C24D0A06801994D +:10F5C000084220D0A089134988421CD0B9780A0982 +:10F5D00001219140084216D00498E38900280CD0FC +:10F5E000B34210D82200029914323800E5F2E1FB50 +:10F5F000E089301A0604360C05E022000299143224 +:10F600003800E5F23DFC6D1C0E2DD2D30020D6E66D +:10F610000001FF00FFFF00008CF73100D4F531003E +:10F620006C080000267901C0440A03C0A0BE01C0D6 +:10F63000F7B586B005000400C035A868002601892A +:10F640003700401803902869C030029020790128C3 +:10F6500003D0022801D0032832D1112149016118B9 +:10F66000097A00292CD00126022819D1200011F096 +:10F67000B5FA07000CF0ECFC0521C90179180591D9 +:10F68000CA7902231A43CA710CF0E6FC02E0012099 +:10F69000D6F762FF0598C079C007F8D1002E0FD0C9 +:10F6A00000220092039A002120000C23FFF767FF3D +:10F6B00000220092029A002120000C23FFF75FFF36 +:10F6C000089A07992000FFF7CEFC002E04902DD059 +:10F6D000A868818803984278037810021843081AB2 +:10F6E000E0380204120C0092039A012120000C233E +:10F6F000FFF745FF28698188029842780378100255 +:10F700001843081AE0380204120C0092029A0121F0 +:10F7100020000C23FFF733FF2079022806D10520B3 +:10F72000C0013818C179FD221140C171049809B097 +:10F73000F0BDFFB581B0002015001F000A9C0090AD +:10F74000268802980A3E00283CD10A20002E2080FC +:10F7500038D1019800223900FFF71AFE21880918D4 +:10F76000218039180198FFF797FE218840182080E2 +:10F770000020DEE66878297800020843FF386A38FE +:10F7800018D1029801280CD1E978A87809060A1442 +:10F7900002430198291DFFF74BFF00990843009091 +:10F7A00008E001982A003900FFF7F2FDEA0B896BA7 +:10F7B0000100000014E9020000040000BC4874EAE3 +:10F7C00021883F1808182080E978AA780802104399 +:10F7D000361A361F2D1D4519002ED5DC029800283B +:10F7E00006D101983900FFF761FE218808182080B2 +:10F7F0000098A8E601228A40C100100088407047A6 +:10F8000030B5F84C039D2FC430BDF74A03C2704792 +:10F8100070B50D0051781400127809021143BF2908 +:10F8200011D0C02917D142681170416805224A7071 +:10F830004068211D801CECF29AE821002800E6F2C5 +:10F8400096FC012070BD0268BF21117001680C2276 +:10F850004A700068EDE7002070BD70B516000D001D +:10F860000A00E1490400E0480831FFF7D1FF002811 +:10F8700011D06878297800020843BF2806D1DA48F9 +:10F880000E22016820007930ECF270E8A0680121B6 +:10F8900049030843A060D449D2482A000831E6F25F +:10F8A000DBFD00281CD068782978000208432D2849 +:10F8B00006D1CC481C22016820005D30ECF256E8ED +:10F8C000A068402108430F2189016118A060896A5E +:10F8D0002031C97D890702D580210843A06070BD11 +:10F8E000C148320029000830E6F20EFE70BDF8B5BE +:10F8F00004000E00BC4815000830E6F277FC002238 +:10F900001100100013000092FFF77AFFB6490020A3 +:10F91000086048602000FDF7DDFC040008D0337962 +:10F92000012229002000E6F2A5FC2000FDF749FD98 +:10F93000F8BDAE4810B544690820044001D1E0F29A +:10F94000F6F9F0F71FFE002C02D10820E0F2F5F9DD +:10F9500010BDFFB58DB00F00179E140021D0E078C8 +:10F96000A17805020D43E5700020020006900520F5 +:10F970000392A31C06A907AA019018000291009205 +:10F9800005AA0CA904ABE8F2D5FD280AA5706B46C0 +:10F99000E070187E410601D4C00902D0002011B0E9 +:10F9A000F0BD2000384335D016990120002C087096 +:10F9B00003D010982100E6F2DAFB002F03D0109854 +:10F9C0003900E6F2D4FB0D980DF022FC002816D089 +:10F9D000012208A907A86D4607C53300189A390007 +:10F9E0002000E6F263FC002208A802920192009037 +:10F9F000189B07990D983200D3F7BBFA0AE0002153 +:10FA00000122009102920191189A330039002000DE +:10FA1000E6F24CFC0120C2E7F3B58BB005000020F4 +:10FA200009900600079006900590049011F045F9A2 +:10FA3000002801D1FFF77DFF112040012818007A2E +:10FA4000002806D10C9820210830DAF2F2FD0028B7 +:10FA500001D1012009900F20002280012C18009272 +:10FA6000A16A0B000A000800253318323530FFF771 +:10FA7000C7FEA06A01005F315130FFF7C6FE09984A +:10FA800000287ED158480830E6F2BBFB1D2040011B +:10FA9000554928180676FF20091F08602800E4F75A +:10FAA000FEF800280A906CD00A9805AB01890E1860 +:10FAB000AA20425B4E480092026830000C99521D09 +:10FAC0000930E6F26DFC6B46988A0D2108380590E6 +:10FAD00031700C990822701CEBF248EF0C984D30F5 +:10FAE00048E0001F01040898090C0591C27883784A +:10FAF000170204001F438F4241D86178227809021F +:10FB000011437F2911D007DC202914D021292AD0C4 +:10FB1000302922D1069426E0DD2912D0FF39503950 +:10FB20001BD17F202070002060702F4821000830FA +:10FB3000E6F21DFB17E07721C900691808F0EDFE19 +:10FB400011E0201DE9F21DFE032801D1079404E015 +:10FB5000254821000830E6F20AFB32004E3221002F +:10FB60002800FFF77AFE6B46988AC01B059008981C +:10FB7000C019001D6B460890988A0428B1D21D4810 +:10FB800000E03CE02A18401E291804A86B4607C371 +:10FB90002800154B069A07990833FFF7DAFE00286C +:10FBA0001BD0A868042188436B46197CC907490FFC +:10FBB0000843A8600C4808A90830E6F235E8063882 +:10FBC0000100000010ED020000040000EF92A78683 +:10FBD0000EFB310050314872000A88720898491DA6 +:10FBE000ECF220E80A98E4F7A0F801280ED10A9870 +:10FBF000ECF224FC0DE000008C580004500E0004D0 +:10FC0000C0A20080C0000004FF0300000998002883 +:10FC100004D0CE4A0C992800FFF773FE0DB0F0BD5A +:10FC2000F3B58BB005000020099004000790059003 +:10FC30000490039011F04BF8002801D1FFF783FEE8 +:10FC40001120400128180A90007A002801D00120D4 +:10FC500009900F20002280012E180092B16A0B003B +:10FC60000A000800253318323530FFF7D3FDB06A9B +:10FC700001005F315130FFF7D2FD099800287ED195 +:10FC8000B348E6F2C8FA2800E4F713F80028089011 +:10FC900075D0089807AA01890E1830000C99093010 +:10FCA000E6F2BBFB6B46988BA949083807901D20EC +:10FCB000400128180476FF200C3908600B213170B0 +:10FCC0000C98653043E0001F01040698090C079169 +:10FCD000C2788378170204001F438F423CD86178B2 +:10FCE0002278090211437F291FD007DC20290FD079 +:10FCF000212925D030291DD1049421E0DD290DD002 +:10FD0000FF39503916D17F202070002060700CE040 +:10FD10007721C900691808F00AFE11E0201DE9F2F8 +:10FD20003AFD032801D105940AE089482100E6F252 +:10FD300028FA05E03200623221002800FFF797FD23 +:10FD40006B46988BC01B07900698C019001D6B4628 +:10FD50000690988B0428B6D27E486B462A18401E1F +:10FD6000291803A807C32800794B049A0599FFF7BF +:10FD7000FAFD00281CD0A8680421884300E021E097 +:10FD80006B46197BC907490F0843A860704806A94C +:10FD9000E6F22DFA310060314873000A8873069844 +:10FDA0000931EBF240EF0898E3F7BFFF012803D1D8 +:10FDB0000898ECF243FB05E00A98022101720998C9 +:10FDC000002805D0614A0C99521C2800FFF799FDC4 +:10FDD00024E710B50400EDF732FEA068400706D511 +:10FDE00020000DF01FFA002801D1012100E00021C0 +:10FDF0002000FDF791FA2000D3F704F9A068012153 +:10FE00000903084311214901A06006206118087206 +:10FE100051480088002802D02000EDF783FD10BD76 +:10FE200070B505004A480C00E6F2EAF9207B00288C +:10FE300004D12800FFF7CDFF002601E00026F6439D +:10FE4000F8F7D8F92800FDF74FFA050008D0237A13 +:10FE5000227B3E492800E6F217FA2800FDF7BBFA9C +:10FE6000300070BD70B50500002639480C00F6431F +:10FE7000E6F2C6F9207B002804D12800FFF7A9FF8D +:10FE8000002602E02800FDF771FAF8F7B3F9280020 +:10FE9000FDF72AFA050009D02C49237A227B491C58 +:10FEA0002800E6F2F1F92800FDF795FA300070BD60 +:10FEB0002B492A4808602C492A4808607047244882 +:10FEC0000C380068704770B5140005000122E4F793 +:10FED000EEF81F480C38002C04D00721C90169181E +:10FEE000C96B00E0FF21016070BD10B50400FDF793 +:10FEF0003DFA2000FDF7F8F9040006D000212000AB +:10FF0000E6F2A5FA2000FDF766FA10BD70B50025EF +:10FF10000600ED43E3F7CDFE04000DD020890E214D +:10FF2000001901702000E3F700FF012803D1200031 +:10FF3000ECF284FA00E000256D1C05D13000FEF7DC +:10FF4000BCFC3000FFF7D1FF70BD00002B8000002B +:10FF5000580E0004FF0300005C3C000465C303006E +:10FF600090F90004C720000094F9000408B500913E +:10FF70000A226946E4F772FA08BD08B500910C221E +:10FF80006946E4F76BFA08BD70B504000D00012066 +:10FF90009CB010F047FE0600DDF758FC6078227830 +:10FFA0000102114320000C392C306A4608F0DEFAB9 +:10FFB0000F21890170180269FC4944322B00684600 +:10FFC000E5F223FA1CB070BD012010B5AE3402A3D7 +:10FFD000010000000CF102000004000050578235BF +:10FFE000F1F7CBFF002817D0F548001F0079400635 +:10FFF00012D4F3482230EBF210EE002801DD012488 +:020000023000CC +:1000000000E00024EF4821000068FFF7C7FFEE483A +:1000100021000068FFF7C2FF10BDFFB58FB00E00D2 +:100020000700002001000790199D04A8FDF74AFF72 +:100030003800E1F795FF06901898129B1C30099044 +:100040001898189A01890C18E04800680179F12085 +:100050008000009139180192119A3000E5F229F8D8 +:10006000011B0904090C08911299D94A08290B901F +:1000700001D1106000E050603100E5F24FF831002E +:10008000042224310B900A90EBF284EC0B986B461F +:10009000001D0B9030002030417D1975807D587512 +:1000A000880601D5012100E000213800E3F7B6FE03 +:1000B0003800F7F7F7FC012806D10B993800F7F75D +:1000C00010FD0B9940180B906B46587DC0070FD060 +:1000D0001D2040013818017E0B980AF060F90B9939 +:1000E00040180B9006990AF061F90B9940180B9093 +:1000F0006B46187C800730D1B148001F007940065C +:100100002BD40B9803900020029001900090AC48F3 +:100110002230EBF282ED002802D001200290019003 +:100120003620C05D800605D4A5480A30EBF274ED98 +:10013000002801D001200190A1482A30EBF26CED9B +:10014000002801D001200090009B019A0299039899 +:10015000E4F2D2FC0B9940180B900B9A2D21380039 +:10016000DDF7A7FC0B994218BF2138000B92F7F777 +:100170006AFB0B9940180B900E90B868410730004D +:100180004C300D90001D00290C9015DA0D98EBF203 +:1001900044ED01000C9823004278007812020243DB +:1001A0000898029201910090129A0E993020E4F280 +:1001B00090FD0B9940180B9030000B9901223730BD +:1001C000E4F2BDFC0B9942183D2138000B92DDF79B +:1001D00070FC0B994218482138000B92DDF769FC3E +:1001E0000B9942184A2138000B92DDF762FC0B99FB +:1001F00040180B903800DDF74FFC002805D00BA805 +:10020000FEF7DBFD3800F4F7CDFD0D98EBF204EDC1 +:1002100001000C986E46427800781202024308985A +:10022000230007C6DD20129A0B99E4F252FD0B99C8 +:1002300040180B902800E5F223FB0798E861099825 +:1002400006998170E869012109038843E8610698ED +:10025000E7F2C3F96C60E8620B980121001B2038BB +:100260000604360C300A2670607018980C238088BB +:10027000801BE0380204120C009222003800FFF7C5 +:100280009CF960782178000208430B99801B401884 +:100290000A990B90091B08392973011B08396973E6 +:1002A00061782278090211431C31E98112990829E9 +:1002B00002D14849086004E0474908602800E2F795 +:1002C00050F946490622A01DEBF264EB13B0F0BDD5 +:1002D000F3B50100020083B00400463104985432A3 +:1002E0000291E4F22EFFEEF72BFC0F208001201884 +:1002F000826A2000353200924030017D07000022E2 +:1003000002981300E4F28AFE0191009005000E00AD +:100310003A7D02992000FDF72FFE31002800E5F21A +:1003200054FA274AC007121F1179BF23400E194003 +:10033000014320001171FBF794F80499200040312B +:100340004A7A20308276897A2300C176A833220047 +:100350008832191D049816000D00FDF795FC200049 +:100360000CF06AFF00280DD0A06840070AD5F120E4 +:1003700080002218A8200092025D2B00310020008E +:10038000D2F7A8FD16490020087001202071E3F77C +:100390007FFF05B0F0BDF8B505000E00114817004D +:1003A0001021EBF2BEEB3620405D0E4C800602229F +:1003B0000028E07BA17B17DA00020843104316E017 +:1003C000C8E80004C8BE01C0C4BE01C0C00000042B +:1003D000600E000470F9000474F900043B5CA65937 +:1003E0000100000008F5020000040000038D5159CF +:1003F000F833040068050004A05800040002084314 +:100400009043A073000A2900E0730622AC31201D3E +:10041000EBF2CAEA300AA672E072380A27736073F8 +:10042000F8BDF3B50221060007209DB0F1F767FB88 +:10043000002804D13000F0F74DFA002802D0032044 +:100440001FB0F0BD04A903A8FDF746FD1E9D1E9F29 +:100450004035A87E2037002803D0687E0590A87E0E +:1004600002E003980590387F6B4604060F20800158 +:1004700030180169240E0C7301691A7D4A730069F2 +:100480000200017B0D323000F4F729F9002801D079 +:100490000120D5E73000E3F715FD01210920F1F730 +:1004A00070FE00210920F1F799FE0320EEF765FFA9 +:1004B000059800222100FDF740FCFDF7F8FC1E998D +:1004C0003000FFF70FFF1E9906A8E4F273FE08AB99 +:1004D000987E5A7E01021143AA2010AB8153987B6B +:1004E000C00704D0002221003000FFF700FD3000DB +:1004F000F0F793FA002800D0FEE7C0203418A16876 +:100500000881A1680818FF4A08231060FE48626845 +:100510000260009101921E9A300006A9FFF787FD44 +:100520002169C02008812169F84A08181060F8483C +:10053000E2680260009101921E9A3000052306A92C +:10054000FFF775FD08AB987E597E00020843EEF771 +:1005500042FF02210920F1F714FEEE480168202233 +:100560001143016001210920F1F738FE2879E9786B +:100570000202387A0A43FB79010219433000FFF77F +:1005800014FF6B46187B800705D104990398FCF78C +:10059000A6FED3F7B5FA01213000F4F70AFA0020DD +:1005A0004EE7F0B504000F00022107208BB0F1F7F1 +:1005B000A6FA002804D12000F0F78CF9002802D018 +:1005C00003200BB0F0BD03A902A8FDF785FC38009D +:1005D000403081793D002035002904D041796B46B7 +:1005E0001976807903E06B46187A1876A87B6B46FB +:1005F00058762878022817D1A8786978000208432D +:10060000012811D30F20800126183069597E01730B +:100610003069197E417330690200017B0D32200080 +:10062000F4F75DF8002801D00120CAE70320EEF7B7 +:10063000A4FEA8786A7801022000A03011430A9035 +:1006400041816B465A7E200006A9FDF755FB6B469B +:10065000597E06980022FDF770FBFDF728FC230069 +:10066000A83322008832191D380009920891E4F25B +:1006700090FD380037300E210790D9F2F8FF542151 +:10068000059008552000059A07994630EBF28CE951 +:10069000B26A079835320092002205991300E4F2FD +:1006A000C7FC00900E0004900191059A0799200064 +:1006B000FDF76CFC2000FAF7DEFE01202071390006 +:1006C0002000E3F7E8FB20000CF0C0FD00280DD06F +:1006D000A06840070AD5F1208000221800920A98ED +:1006E000089B027A09992000D2F7FEFBA87DC0077B +:1006F00005D06B46597E01222000FFF7F8FB0498D5 +:100700003100E5F26CF8844AC0071179BF23400E2E +:100710001940014320001171F0F77FF9002800D043 +:10072000FEE7C0202618B168764A0881B168082320 +:100730000818106074487268026001920091089A6B +:1007400039002000FFF773FC3169C020088131694E +:100750006E4A081810606E48F268026001920091BB +:10076000089A390020000523FFF761FCA878697812 +:1007700000020843EEF72FFE2000697D20308176CD +:10078000A97DC1762000E3F79DFB02210820F1F747 +:10079000F8FC604908682022104308600121082005 +:1007A000F1F71CFDE879A9790202A8780A436B7871 +:1007B000010219432000FFF7F8FD6B46187A800705 +:1007C00005D103990298FCF78AFDD3F799F9012125 +:1007D0002000F4F7EEF80020F3E6FFB585B0040042 +:1007E0000E0017004748102105684C480CA0E5632F +:1007F0000100000004F9020000040000F7E224ED0B +:10080000EBF2A2E9310020001231AC300622049153 +:100810000390EBF2D4E80BF04DFC029003990A2010 +:10082000F1F73CFC2800049906221230EBF2C6E8EE +:100830003B480499006806221230EBF2C0E83C4DB8 +:1008400004990622281DEBF2BAE82036307AA87205 +:10085000707AE872E87AA97A00020843EEF7C5FDDB +:10086000002F09D0F878B97800020843010A2873EC +:10087000697305F03CFE04E005F043FE2873000AAE +:10088000687326002036B07D800619D408980028A9 +:1008900016D008988078800712D500221E48009252 +:1008A000006808222A210023E4F28AF8002807D0F1 +:1008B000B17D20221143B1758178022211438170EC +:1008C0000E98002808D00E980079400704D51749E3 +:1008D00018483631EBF2C4E91749086808239843F1 +:1008E00008601648002202604260EE7AAF7A360253 +:1008F0003E43F7028760C2608661104A104840326A +:10090000106008681843086002980BF0D7FB0F20AE +:1009100080012018022215E0C8BE01C0B0BE01C08F +:10092000C4BE01C0B4BE01C000A70080C4E800047A +:10093000A0580004404B4C0000A3008000A600809B +:10094000FF010000C16A1143C162687B297B00027C +:10095000084305D00021200005F084FF09B0F0BD58 +:10096000200005F0B6FFF9E7FFB587B004000F20BF +:100970008001271808981D00123006902000F0F71B +:1009800032F90600E01DFF30FA30416D006D0023A2 +:100990005940584008437ED1A0680121090308430B +:1009A000A060696B002904D020001C225D30EBF2AE +:1009B00006E83268542035320092015D00222000A2 +:1009C00046301300E4F23EFB05910490696E002965 +:1009D00004D020000E227930EAF2F0EF306804A94A +:1009E0005130FDF76FFB109A0498059B1199024056 +:1009F0000B40200005930492F1F790FC2000FAF7D9 +:100A0000D9FC2000FAF7ADFC2869002801D00121AB +:100A100000E000212000F1F78CFCA06803210843CE +:100A2000A06008982030C07AC0071ED00721C901F5 +:100A3000FF206118C863A86A002816D0686D0028D6 +:100A400013D002A903A8FDF751FA6A6DA96A6B4693 +:100A500001920091187B0107820702988B0F010613 +:100A6000920F090E2000F7F7F7FA012070759D48E4 +:100A7000202122182000E2F7FDF8F86AC00730D0E4 +:100A800006992000F1F7A4FA00282AD1200080302E +:100A9000016BC06A00E01BE003910290AA6B009218 +:100AA0002B6A6A6A08992000FFF7A1FE04E0069904 +:100AB0000622AC30EAF282EF012002A910F060F9C0 +:100AC0000028F4D10121C907200012F08AEF08E0C4 +:100AD000F86AC00705D006992000F1F779FA0028D6 +:100AE00002D0200010F008F90FF0F3FA002802D02D +:100AF000200005F01DFF109811990F220023121AF3 +:100B00008B410AD37849082208791043C008C000F5 +:100B1000087176481E31EBF2A4E85CE50169406992 +:100B200002002432914202D03C30814201D10120A6 +:100B30007047002070476E48704710B50179012951 +:100B400010D10F2189014418E06A800706D5694851 +:100B500000F0B6F86748001D00F0B2F8E06A022124 +:100B60008843E06210BD0221072010B5F1F713FBA6 +:100B70006148016820221143016001210720F1F73B +:100B800037FB10BD5D49002010B50860486058482B +:100B90001021EAF2DAEF10BD70B505000800897A7D +:100BA00089071DD50C30060010F011F9040017D08C +:100BB0000F2080012018C06AC00711D068782978FA +:100BC00002020A430C3A31000320E8F2D2FE05008B +:100BD00006D0E3F775FBA978884201D1200070BDEB +:100BE000002070BD10B5FFF7D7FF040006D0DFF27C +:100BF00074F90722D201A2185167106741FBB3DADA +:100C00000100000000FD020000040000A438F7818C +:100C100010BDF0B50100203107000E0089B0FFF7CC +:100C2000C5FF040054D07D20C000251808223100E3 +:100C300006A8EAF2CEEE374A0698079980180023F4 +:100C4000AA685941EB68801A99413FD3B07AC0062F +:100C5000C10F3A20005DC206D20F914236D1C006C4 +:100C600036D578783978000208430C38070431000B +:100C70003F0C0C313A000E003020E8F284FE039065 +:100C80003A003100DD20E8F27EFE0600001DE8F2A9 +:100C9000AAFD032800D000260022009201920292B1 +:100CA0000398310004AA05ABE5F232FB29000122CA +:100CB000163105A80AF033FE002807D129000122C9 +:100CC000173104A80AF02BFE002801D000204FE6BF +:100CD00020004DE670B505000A4C607B227B0102C6 +:100CE00011432800E4F2E0FAE07AA27A010211430B +:100CF0002800E4F2D2FA70BD29020000C4E8000422 +:100D0000404B4C00A058000404A0008000A70080C5 +:100D1000600E000488130000F8B5FF4E3069EFF74D +:100D2000DEFF3069032501792D02032910D14179B5 +:100D3000012901D002290BD11F2149014118097A4B +:100D4000032905D112F04EEF002801D0706812E09F +:100D500070681921490141180A7E497E8A420AD2E7 +:100D60000D2189014118CB8A002B0AD00B8B012B56 +:100D700007D30122CA614019C06B0621DDF7E7FEE7 +:100D8000F8BD0B8B5B1C0B83002131727172F17209 +:100D9000B17231737173B173D100891AC91D4418CE +:100DA00020780090A0786178C2070098D20FDDF714 +:100DB000B7FF0700DFF21EFFDFF280FB002FC5D078 +:100DC000A0796179000208437D21C9004143706820 +:100DD0000F004019C06BDDF7ADFD0328B6D17D20B3 +:100DE000C000381A01220021DFF7F4FCA078C00708 +:100DF00002D00120B072F8BD00F038F80006000EF5 +:100E0000B072F8D1707A0028A0D0F8BD70B500F0AB +:100E100092FDC14D697A002923D0287A884220D2D8 +:100E2000401C2872A87A00280ED108E000F01EF8B5 +:100E30000006000EA87207D1687AA04204D06C7A2E +:100E4000287A201A0328F1DB00F085FD002808D05D +:100E50006968192040010818017E491C0176FFF7D6 +:100E60005BFF00F071FD70BDAC487047F0B500202D +:100E700085B0A94C03906168FF2312335F5C19238E +:100E8000A27B5B01CE18BA4207D2637B358AAB42A4 +:100E900003D1521CA273002262730D2292018D189D +:100EA0000AE053019B18FF331333CB5C002B14D0A3 +:100EB000FE2B12D0521CA273A27BBA42F1D39649E8 +:100EC000627B338A097B9A4223D1B07C00283BD0D5 +:100ED000002939D10120207336E0A27B53019A18F2 +:100EE000FF3214328E182968002903D0280003A984 +:100EF000E5F2A5F98A4A13216B4607C3320020693F +:100F0000039B19E0607B401C6073607A401C607238 +:100F100017E0B27C002A17D0002915D129680029D2 +:100F200003D0280003A9E5F28AF97D4A13216B4614 +:100F300007C300222069039B0021FCF783F80028E7 +:100F4000E0D0002005B0F0BD0120FBE7FEB51500A4 +:100F500000245669002A52D0288900224119887835 +:100F6000000902282BD005281DD008281BD00D28E9 +:100F700044D1002730000292EFF7B1FE002801D0E3 +:100F80000700C537F120800032183B00280002A975 +:100F9000E9F251FF002832D0029A0899280009F09E +:100FA00019FB01242BE05C48436819204001181804 +:100FB000027E0092089A30000AF0E0F8F1E700267D +:100FC000032002920FF056FE040002D1607900283F +:100FD00014D02000EFF783FE002800D06E46F120E9 +:100FE000800022183300280002A9E9F224FF00281B +:100FF00004D0029A0899280009F0ECFA0024200095 +:10100000FEBDF8B50D208001464E434F430A1894AB +:1010100001000000FC00030000040000A66EF1A81F +:10102000140015180B00EAF2FAEE0C600707132102 +:10103000604660600E60466028697C60210038610F +:1010400012F002EE51E000F080FC00F0D2FC27E04C +:1010500000F07BFC28697C6038610220F8F7F9F920 +:101060003070E2F753FFE2F783FF17E000F06DFC0A +:101070000120F872200000F087FC00F076FC0028C8 +:1010800011D0192040012018017E491C0176E86822 +:10109000FF30FF30801CC178491CC170FFF746FE4D +:1010A00000F05CFC21E0787A387200F057FC1020E8 +:1010B000DBF7F2F919E00321090200206118C86387 +:1010C000E88A002802D0E869002802D12800E5F269 +:1010D000C9F83078F8F7C8F9EC682000FF303F30E5 +:1010E000EAF2C2ED0100200088470320F8BDF0B508 +:1010F00005000F000D4891B00469382102A8EAF2FA +:101100000EED0D2080012E1830690E900B480290D4 +:101110000B48089703900B48049508AB0990187D7D +:101120000821084318756920C0000DE07C0A03C03F +:10113000FDFE020059FF0200A4BE01C0F30003003F +:101140003D000300A086010028180B90207900289C +:1011500038D1A068C00435D501A96846FCF7DAFE8D +:101160001921F08A490101276E1800280FD0307E1E +:10117000019AC300181A4019017A914222D1C01D68 +:10118000012269460AF0D5FB00281BD115E0002496 +:101190000EE0E000001B4019017A019A914211D142 +:1011A000C01D012269460AF0C4FB00280AD1641C54 +:1011B000707EA042EDDC002F04D008AB187D400803 +:1011C000400003E008AB187D0121084308AB187507 +:1011D00002A8DDF70AFB11B0F0BD7CB50C000028B9 +:1011E000009017D1F94D002C03D001206860002039 +:1011F0007CBDFF229132582301A96846E1F7E5FC46 +:10120000002803D10220686001207CBD0320002259 +:1012100013006860EE4900980D694561058928183A +:101220000190C57A867A2D023543ED1885722D0A14 +:10123000C5721030047082711A0A03714271086914 +:101240000099E1F78DFC7CBDF1B50D25AD01E04EB7 +:1012500071684819C28A002A16D0C269002A13D0C0 +:1012600000220283C261DB4808180E21FBF7DCFE76 +:1012700070684119C98A8902FFF739FF7168032232 +:1012800012028918C863F8BD3069FCF75FF80700DF +:10129000F9D03889C41970684019017D01290ED12F +:1012A000C568281DEAF2E0EC06002800EAF2DCEC52 +:1012B0002A7B33000021FFF790FFC74800E0C748B2 +:1012C0002070000A607003208002DEF25CFF2100C3 +:1012D00000980931EAF2D8EC0020A071E0713800E2 +:1012E000FCF7ABF8F8BDF8B504000D0003260029A3 +:1012F00070D02800EAF2B8EC00286BD0281DEAF282 +:10130000B4EC002866D0297B002963D02070000A45 +:101310006070287BA070281DEAF2A6EC0600280069 +:10132000EAF2A2EC01003200E01CEAF25CEB281DBC +:10133000EAF29AECC11CFF20671814303870000ADA +:101340007870A078091DC000020AB8704018FA70C1 +:10135000002600900AE01320704308224119F00093 +:10136000C0191231001DEAF23EEB761CA078B042A3 +:10137000F1DC00982718FF202B303870000A7870B5 +:10138000A0784000010AB870F9700099091D46184C +:10139000002009E01322424341005219C919D37EAB +:1013A0000B71127F401C4A71A1788142F2DCA019B6 +:1013B000FF21C7310170090A41708C22002182701F +:1013C000C170E91DFF319036FE31001DEAF20AEBD3 +:1013D00004E0FFE7002020706070A0703000F8BDCE +:1013E000FFB587B01C000E001B2117004901180033 +:1013F000EAF294EB00210A0001A806C00800734934 +:1014000048600D20800120180500E4F236FF192104 +:10141000490101206118088207980128BBF913B718 +:1014200001000000F804030000040000F5B422C429 +:1014300007D13F1F3804000C361D06900320207092 +:1014400009E0072231002000EAF2D6EAFF1F380443 +:10145000000CF61D0690079828750020E882288366 +:10146000E8619EE0F078B37802021A43101D000490 +:10147000000C0590707833780002FF271843FF1C9A +:101480003100C31BB8426AD01BDC7F2874D006DC55 +:1014900000284BD001285AD02D287AD16CE0BF28E3 +:1014A0006AD0DD2868D0FF38801E72D10490E11D1B +:1014B000300004AAE8F2F3FA002003A9FCF734FD97 +:1014C00067E0482B52D00BDC082B5ED0102B2DD0C0 +:1014D000212B5ED10622091D601CEAF28EEA58E03B +:1014E0004D2B4DD0C32B09D0CC2B52D130790128B4 +:1014F00002D0022800D0032020704AE00879A875A5 +:101500004879E875E88A3B49884242D10020F1F7E2 +:10151000E6FD07000120F1F7E2FD874201D9002036 +:1015200000E00120F1F7DBFDE88232E01022FF212C +:1015300012310092095D4B0159180A192300FF323C +:10154000FF33133212333100E4F207FB21E0264867 +:101550003100221801200E23E8F27EFA19E0332030 +:10156000000121183000E8F2D1FA12E01A20887048 +:101570000020C8702D2004E02800E4F23EFE08E0C0 +:101580007F200870000A4870F6E7091D2800E4F281 +:1015900013FE05990698401A0004000C0690059861 +:1015A00036180698002800D05CE70622601C01A9C6 +:1015B0000AF0C9F9002804D1FF220621601C0AF0B4 +:1015C000EEE901200BB0F0BDF7B500200C001921A9 +:1015D0004901611848760D208001251821E000009E +:1015E000A4BE01C07C0A03C02203000007810000E2 +:1015F00006800000FFFF00000A235843EF68FF3019 +:10160000FF30801D38180270F2794270002282701B +:1016100002714271487E401C0006000E2628487662 +:1016200006D2487EC200121A1619327A002AE3D175 +:10163000487E002824D02600FF361336FF201230C3 +:10164000075D002007E042011218B25C002A01D0B9 +:10165000FE2A04D1401CB842F5DB002F01D1012045 +:101660008874F9480E212018FBF7E8FC00982861DF +:1016700002992000FFF745FD032109026118C863A4 +:10168000FEBD70B506000FF009FB0500002415E053 +:10169000687902280DD12800E2F7FFFF002808D062 +:1016A00028000FF0EBFAFF30E130008AA04200D3AF +:1016B000040031002800EFF7C5F80500002DE7D140 +:1016C000200070BD0189081817307047F3B57D21DF +:1016D00009010700DD480E00002281B0EAF214FF84 +:1016E000040009D10022DA48110003230EF0CBFDDB +:1016F00004002ED007263602022020732020251851 +:101700002081200030300821EAF23CEA01202872D2 +:101710000020687258202873002068730720A87280 +:101720000020E8720D2080013F18F9680020091D93 +:10173000EAF2B4EAF96800200873F868FF210E3075 +:101740003131EAF220EA2000FFF7BCFF401B301ADB +:101750002438029908602000FEBDF7B582B00D0064 +:101760000721BC48C901EAF2E4E90D20B94E800125 +:101770002C18E660207D3700083701280FD128009B +:101780006946FFF7A3FF3100EAF288EA019000986A +:101790003900EAF284EA0198002843D00CE07D2168 +:1017A000AD480901EAF2C4E9AA49AB48EAF276EA8F +:1017B000AA483900EAF272EA10207073A849049826 +:1017C000EAF26CEAA74E306A00280AD07069002855 +:1017D00007D0F3F798F9002803D0706964214143DA +:1017E00012E00220FFF74DFF06000320FFF749FF3C +:1017F000B04201D2300002E00320FFF742FF962101 +:101800004000962800D80100E08A002802D08842D3 +:1018100000D301008A0202982900FFF7D5FE0028B4 +:1018200000D0012005B0F0BDFFB581B0CEDF28E2C9 +:1018300001000000F40803000004000001DB577001 +:1018400005000F008D4C00263220DEF2B0FC032094 +:1018500000022018C06B00282ED1049A039923009F +:101860003800FFF7D1FD002826D08548406AE030D7 +:10187000417800291AD00078002817D0287900284C +:1018800001D0012812D1A868C0040FD40020C100E3 +:10189000091A09190A7A002A08D0497A890602D554 +:1018A000EDF770FA02E0401C0E28F0DB754A2100CB +:1018B0002800FFF75CFF06003000BDE7017903292F +:1018C0000ED1016940694830814209D16B49143910 +:1018D0000A7A487A824200D2087201208872C8725D +:1018E00070470100654810B514380069E5F7C9FF75 +:1018F00010BDF7B584B00E0063A10968039163A120 +:1019000006C9070001915D4C5449029265180321F4 +:1019100009026118C96B0020002928D11B21490147 +:101920002000EAF210E91921490102206118088219 +:10193000032020703078800705D10422280003A9F5 +:10194000EAF264E82D1D0822280001A9EAF25EE807 +:1019500007223100E01DEAF25AE8FF220621601C4E +:101960000AF026E8069A21003800FFF700FF07B0CA +:10197000F0BD42480021143810B50068C943D4F7BF +:10198000A8FE10BD3D4810B514380068D4F7A5FE78 +:1019900010BD3A49002014398A7A002A07D04A7AC1 +:1019A0000B7A9A4203D1C97A002900D001207047EE +:1019B00030B5040087B0DFF23BF9050005A906A8A1 +:1019C000DEF2A3FD28020599401BEAF270ED0D211D +:1019D00089016118CA680A23FF32413290701920C8 +:1019E00040012018007EC9685843FF30FF30801D39 +:1019F0000C1801A902A8DEF750FF6B469888E0702A +:101A000005988001000CA071000AE071A801000C8B +:101A10002072000A607207B030BD70B50125174C06 +:101A2000143C607A2072A5726168032000020818D5 +:101A3000C06B002802D0DCF7BEFFE572FFF7A9FFFC +:101A400000280AD06168192040010818017E491C4D +:101A50000176E2F7A1FAFFF77DF970BD22030000DD +:101A6000481A000474190004F00D03C0701103C07B +:101A7000BE0500002E0F03C018420004900A03C0E8 +:101A800014C700042503030002040B160C121824CB +:101A90003048606CF8B50600FF4CA069EFF73DF9DF +:101AA000330005001F26FD49FD48FE4F0222760146 +:101AB000EAF2C8E90B0776919EA1A5A8B243475662 +:101AC0004600A06900280ED0017903290BD18019A6 +:101AD000017A032907D1397800291BD142720120EC +:101AE00000F0A1FA16E0EEF7FEFE002812D10FF08A +:101AF00034F900280ED1387802280BD0002000F0ED +:101B000092FAA069002805D00179032902D10021A9 +:101B100080194172A06911F0E8EF002810D0A06987 +:101B200000280DD0017903290AD18019007A0228F2 +:101B300006D1A86804210843A860002000F073FAC9 +:101B4000F8BDA0690028FBD001790329F8D18019DC +:101B5000017A0329F4D139780029F1D1427259E090 +:101B6000A0690028ECD000790328E9D1EEF7BBFE8C +:101B700000280ED10FF0F1F800280AD13878022899 +:101B800007D0002000F04FFAA1690020891948729F +:101B9000F8BDA06911F0A8EF0028F9D0A069C4E74A +:101BA000A069002809D00179032906D141790029CB +:101BB00003D08019007A0328EAD1EEF794FE0128B9 +:101BC00003D10FF0CAF8002803D0EEF78CFE0028EE +:101BD000DED1387809E038780028D9D1A06900280A +:101BE00018D00179032915D140790028D0D111E00E +:101BF00001600320A2E7AC49016004209EE7016078 +:101C000005209BE701603878042803D0032801D021 +:101C10000528BDD1012091E702208FE7A148027A73 +:101C20009F480168C87810181922520189188979CB +:101C3000884203D0884201D2012070478AEBC5D385 +:101C400001000000F00C0300000400005201841C9D +:101C5000002070479A4810B50088C00710D09948F6 +:101C6000007800280CD007280AD0EBF738FFEBF7F4 +:101C7000A5F9002800D002200FF064F8EBF768FF08 +:101C8000002010BDFEB5002407008B4D89496C6013 +:101C900008680278002A7DD02A7AC178192651185E +:101CA0000906090E7601801929728079814209D3CB +:101CB0002C72E868B1060843E860A88A401EA88232 +:101CC00081484476E8687C49C008C0002031E8605B +:101CD0008978002932D001210843E86000213800CA +:101CE00009F09CFB132358430021C0190E3008F063 +:101CF00092FF7049002209688919097BE3F290FF7D +:101D0000002803D0E86804210843E8600121380076 +:101D100009F084FB132358430121C0190E3008F049 +:101D20007AFF6449012209688919497BE3F278FF47 +:101D3000002803D0E86802210843E8605D48006895 +:101D40008168002903D0EA68914300D12A6129699A +:101D5000564F00290FD0B8690179032902D1417982 +:101D6000012921D052490C7054490C7001214906B7 +:101D700011F080EE11E08019408900280DD0A88A6A +:101D800000280AD14A48514A04704C486521047021 +:101D9000B86900E027E0E0F778FFB8690179032926 +:101DA00022D1407901281FD1B86911F0A8EE00288E +:101DB00003D0FFF73DFF002816D10120D4F730FCF7 +:101DC000B86911F064EF01280DD1B8696A4601A91C +:101DD00011F060EFB869019A0121322311F05EEF32 +:101DE000B86911F060EFFEBD2B78EAF236E8060420 +:101DF000050805050504F6E700F023F8FEBD2D48AB +:101E000000680078002806D0EEF716FC00F019F8FC +:101E1000EBF7A5FCFEBD2B48007800280BD0EBF7B4 +:101E2000D5FCEBF7CBF8002800D002200EF08AFF9B +:101E3000EBF78EFEFEBD0820FFF736FEEBF7C6FC83 +:101E4000FEBDFEB500251B4E1B49376848683A7831 +:101E5000002A04D00A78002A01D0002802D00020ED +:101E6000C043FEBD114C0D211C3489016018029045 +:101E700080681B21009049012000E9F26EEEB978DC +:101E80002170FF220621601C09F09CEDF8782626BF +:101E9000262800D206000848007802281ED0192003 +:101EA0000549400138188079097A11E098D201C0BB +:101EB000B8C801C0008E01C018CF01C0E8CB01C076 +:101EC0005C3C00048C06000418D101C0F50C030032 +:101ED000401AB04200DC06003606360EFE480E22DE +:101EE0000168FE48491D2018E9F29AEDFC4FB869D7 +:101EF0000179032912D111F0DAEE002804D0F94952 +:101F000001200968C87009E0F648192100684901F4 +:101F100041188A79F449097A511AC170F248F200DD +:101F2000921B007AEF4EC3003168181A40188721BF +:101F300089004118E01DE9F274ED3168200021228A +:101F40000E00FF3012010C311330E9F26AED192353 +:101F50005B01F018FF22C17912321155E44AE349BE +:101F60005161E149029A16310191D160B168890746 +:101F700004D5032201211202A21851630089E1183D +:101F80000882B8690179032918D14179012915D14D +:101F9000EEF7CDFE0600B86911F0B0ED042100287F +:101FA00008D0D0487D250068ED0040684543B06802 +:101FB000084301E0B0688843B06009E0CA48407A4D +:101FC000002804D070687D25ED00454300E0C94D30 +:101FD0000098002804DA00984042A84200D22D1848 +:101FE000B8692A002100FFF703FBBF4901224860BE +:101FF00000284A7203D10198FFF744FE2FE7002022 +:10200000FEBDB94970B51A310020E9F25CEEB64C5C +:10201000B74820340025C030A57021004576B64869 +:102020000A39E9F250EEB548A11EE9F24CEE102053 +:10203000E070AD480561C56070BD70B50400AA4D83 +:1020400028782C7003D16868DCF75CFEE9A8C7C764 +:1020500001000000EC10030000040000EDC4A1AF7B +:1020600070BD042803D0042C01D00028F8D12869C1 +:10207000002801D1FFF7CFFF68680026002803D0B1 +:102080002E70DCF749FE2C70A2488660FFF7E3FE55 +:1020900070BD10B504000120D4F7CCFA200011F077 +:1020A00000EE012801D1FFF7D6FE10BDF0B50E00FD +:1020B0000021170089B00128039101D1964D00E05D +:1020C000964D332109012800E9F250ED192149010B +:1020D0006C1801200021208161818849A073487219 +:1020E0003078002873D028707078A870B078E870C5 +:1020F000B01DE9F2E2ED686030000E30E9F2DCED8F +:10210000A860300014300690F019059079480790C7 +:10211000069813E10699FF2348780A7800021043D5 +:102120009B1DC21A98427ED015DC002825D0FF38AE +:10213000801E30D0012877D0032876D100200200FD +:1021400001A905C1091F0698E7F26BFD06006B4661 +:10215000187A2073EDE00D2A0FD0192A66D0AB2A29 +:10216000EBD1FF200699B130022304AAE7F292FCDA +:1021700006006B46188A6081DBE010220092E1794C +:102180004B0159184A195A490C32491D6B180699C6 +:10219000E3F201FD8EE0C878897800020843FF2150 +:1021A0000B31884272D887208000291806980022B7 +:1021B000E7F293FC060069D0301F0004000C03D046 +:1021C0000721EAF288E9A071A17900200DE0C8E0BA +:1021D000C200121A5219FF32FF32921C527F002A9B +:1021E00002D00120039005E0401C8142F0DC0398FE +:1021F0000028E0D007988069017903293AD1EEF7E9 +:10220000A0FD8168890535D5252149014018018A3D +:10221000C0890027081A0004000C029001202081C8 +:10222000A179029803E032E03EE07BE044E0EAF28C +:1022300052E904281FD91AE00298EAF24CE9F900A1 +:10224000C91B4919212212010891001F8918C8735E +:10225000000A0874A1790298EAF23CE9089911226F +:102260005201001F89184870000A7F1C8870A179EC +:10227000B942E1DC5DE00027380001A90197FBF7D6 +:1022800071FE2748A7710199415552E05DE0002099 +:10229000020001A905C1091F0698E7F2C2FC060069 +:1022A0006B46187A607344E06520C00029180698D0 +:1022B000E7F24AFC06003CE0FF2006991F300223AB +:1022C00004AAE7F2E7FB06006B46188A002800D054 +:1022D00001200028A0732CD1079880698068C00471 +:1022E00027D506490020487223E00000C000000402 +:1022F0002203000098D201C0008E01C018CF01C097 +:10230000250D030058D001C0A0860100ECC201C019 +:10231000CC050000F4D501C0E8CB01C0B8C801C0AD +:102320001D020000C878897800020843001D0604D9 +:10233000360C002E09D0069880190690059988421F +:1023400000D2E7E60398002808D1332109012800CC +:10235000E9F20CEC0020C04309B0F0BD844960896B +:1023600088820020F8E7F8B51400060008008149CB +:102370001D00FF288E610CD12A0021000020FFF7EC +:1023800095FE06002A0021000120FFF78FFE304352 +:1023900003E02A002100FFF789FE05000CD1744CF0 +:1023A0000026277826706068DCF7B6FC7248277034 +:1023B00086602672FFF74FFD2800F8BD70B5050056 +:1023C0006B4C0E0020692900E9F286EC21001631E1 +:1023D000281DFEF7B0FF051D0020002E206104D04F +:1023E0006068002801D1FFF716FE280070BD10B507 +:1023F000634962483324240108602100E9F2B6EB06 +:1024000060482100E9F2B2EBE72159488900E9F27E +:10241000AEEB002010BD564810B54068DCF77CFCE0 +:1024200010BD574800680078704755490968002971 +:1024300000D00870704710B54D4C05216068DCF77E +:10244000B8FB4C484B49806900221C31FFF7DAF891 +:10245000606010BDF3B50400012881B0CAB2E3BFCB +:1024600001000000E814030000040000BE1E72C357 +:1024700054D0062C52D00B2C50D009F061FE4549A7 +:102480000D688721890069180022D3009B1A5B1808 +:102490005B78002B3DD1D3009B1A5A1854700C79ED +:1024A000CE782402344300D13224D470240A14712B +:1024B0008C794E792402344300D164245471240A67 +:1024C00094718C78A60708D59678A407FD27E40FA9 +:1024D0003E4064002643967003E09478022634431D +:1024E0009470029CF326CF27012CCC5C03D1A40866 +:1024F000A400641C01E0A408A40034403C40CC5477 +:10250000897891701921490169188A79521C8A7158 +:1025100002E0521C0E2AB8DB09F016FEFEBDF8B52B +:1025200009F00EFE1B490E688721890074180022ED +:10253000D500AD1A29194B78012B19D0062B17D0CD +:102540000B2B15D0002B13D000234B70CB700B71CD +:102550004B718B718B78FD273B408B70615D8908D7 +:10256000890061551921490171188B795B1E8B71A6 +:10257000521C0E2ADCDB09F0E7FDF8BD0248806939 +:102580007047000018CF01C098D201C0F4D501C037 +:10259000B8C801C0008E01C0E8CB01C0F8B58C46B8 +:1025A000864600200400010076E060464578067803 +:1025B0001F682D0235437E007F1CB6181F603580D2 +:1025C000457806782D0235432E00FF3E333E17D066 +:1025D000092E28D00F2E0DD05F2E51D1C6788778C6 +:1025E00036023E434CD11F687E00B6187F1C1F6028 +:1025F000358045E0C57886782D023543099EF7E79A +:10260000C678877836023E43EDD0069D01262D68B8 +:10261000A640B543069E35600679A6403543069E22 +:10262000641C35602CE0C678877836023E4302D0C1 +:102630000679042E14D31F687E007F1CB6181F6015 +:102640003580457806781F682D0235437E00B61820 +:102650007F1C1F603580457806782D023543C2E720 +:10266000079D03272E684D00AF400095079DBE4390 +:102670002E60009D0779AF40079D3743491C2F60AE +:10268000C678857836022E437546AD1B2D1FAE46A3 +:1026900065462D1D7519AC467546042D85D2F8BDCD +:1026A000F7B582B00126002900D00026049D012E36 +:1026B00002D008000EF088FB04002FD0FF209830D5 +:1026C0006B4698800820D880A068C00419D52000E7 +:1026D0000EF023FB070010370422280001A9E9F2BD +:1026E000B4E9F86F6B46009018782D1D2870587863 +:1026F0006870F648AD1C211806222800E9F2A4E90A +:10270000AD1DE279A1792000EEF703FB040001D0B2 +:10271000012ED9D00498281A0004000C05B0F0BD91 +:10272000F8B50C0016001F000EF0D0FA2100FF399A +:102730003A3904D1040001001F22520103E0041DB4 +:102740000100F92292008D18002E00D02760FF3082 +:10275000E130008A7D21C001E9F2C6EE22686423DF +:102760005A4301008018401EE9F2BEEE2860F8BD11 +:10277000F0B5A7B0070000200C001790D449242220 +:102780000DA8E9F2CCE911200C9038000EF0C5FA42 +:10279000089038000EF09AFA4B210500C900079006 +:1027A00040180B90E078A27801022800FF30CF306B +:1027B000114326900A900798D7220A349200801875 +:1027C00018940990380020302590F1200A398000B3 +:1027D00038182490CDE2189E0020091F19911A90F4 +:1027E000F078B1780002084323901999341D88428B +:1027F0007ED807980D218901401822900079002881 +:10280000864615D0002084460DAB08E071783278FA +:102810000902114342009A5A914209D0401C0C9976 +:102820008842F3DB6046002802D10120179096E22F +:102830007078327801021143FF224732881A9142A0 +:1028400072D062DCA34A881A91426ED02BDCA24A75 +:10285000881A91426AD019DC3D2968D0FF39891E57 +:102860007DD123980721E9F240EE0100537E4946CD +:1028700001000000E4180300000400004A7107771B +:102880002800803021900171F078B1780202280090 +:102890000A43FF3021006D30E9F2E0E80020ECE06F +:1028A000032867D00428E5D120780021E1F73AFC1D +:1028B0002178380003F0D7F951E203287ED00DDCEF +:1028C00001287CD00228D5D1E81DFF30FA30417FA5 +:1028D000FB2211402278D207520F27E1072835D07A +:1028E0000F28C7D160782178000201432800E0302A +:1028F0001D901C90C1810800D7F2D7FF01001C98E1 +:10290000018200E042E2F078B17800020843022838 +:10291000D2D91D98A1788174E178C1741FE24D2845 +:10292000BFD02CDC23287BD00CDC172864D01828DF +:10293000A0D12100280007F0D7FCB4E1F9E0D7E0EE +:102940008FE18DE12A286CD0352893D10422210013 +:1029500005A8E9F284E809F0FDFB0690707832786A +:1029600001021143059B01223800FFF7E3FE380006 +:1029700001E0DEE122E1E1F7A3FF069830E0522812 +:102980007ED030DC50287CD051288CD1A01C0EF099 +:1029900025FA002806908FD006980EF0C8F9002876 +:1029A0008AD01030059009F0D5FB04902178059865 +:1029B0000029C16713D10598603001E078E066E036 +:1029C00001830698E5F728FE002808D00698112113 +:1029D00049014018418A06980022E3F732FC049826 +:1029E00009F0BCFBBBE17B2879D08A28A0D100206C +:1029F000210008311B9183E10A98217820308173EE +:102A00002178C173380001002278A0318A752278BC +:102A1000CA75C2798179EEF786F90028F3D19EE173 +:102A20009CE045E11698F322C300181A4019209043 +:102A3000FF3061301F90017B11400173817B0322C5 +:102A400011438173219801797D200001E9F256ED4F +:102A50006E2800D96E201F99C873000A0874219847 +:102A600001797D200001E9F24AED2099FF317131B1 +:102A70004870000A88701698401C1690219801E052 +:102A80001EE19DE0007916998842CBDC67E10A9847 +:102A90002A301A90380001002278A0318A746278B6 +:102AA000CA74C2798179EEF73EF90028F3D156E174 +:102AB0002078002802D0DDF2B5FC00E0FE20259948 +:102AC0000875A877380003E025990A7D34210A5457 +:102AD000C2798179EEF727F90028F5D13FE10AE1C3 +:102AE0002902000000340400320100002B01000024 +:102AF0002078002811D1212000012818817B427BF9 +:102B000009021143FF22C132914362785207D20D6C +:102B100011434173090A817321E1E81DFF30FA3046 +:102B2000417FC722114062785207920E11434177CC +:102B300015E10A982C301A90380001002278A03153 +:102B40000A7562784A75C2798179EEF7ECF8002847 +:102B5000F3D1A020808A11F0CCE800E1F178B078C0 +:102B600009060A14024321003800FCF7E3FD00289F +:102B700076D13879032889D1E078A178000208431A +:102B8000FF49884293D10020DDF202FB0521380085 +:102B900002F082F80821380002F07EF83800C030D8 +:102BA000010040688023C2781A43C270C868C178A7 +:102BB0001943C1700120DDF2EBFAD0E0022075E08C +:102BC0001120400128181E9040880006000E069033 +:102BD00009F0C0FA0590208800280BD0012802D007 +:102BE000022809D105E0E748062221002818E8F26A +:102BF00036EF01201E994880069801282ED11E9894 +:102C0000112140884901002828D11E98C088C0079A +:102C100024D0049704980EF08AF81030C16F01296F +:102C200014D104998968C90410D50021603001834A +:102C30000498E5F7F1FC002808D004981121490117 +:102C40004018418A04980022E3F7FBFA0498C279FD +:102C50008179EEF768F800280490DBD10598BFE68B +:102C600047E0249806222100E8F2F8EE0A980622AE +:102C700021002430E8F2F2EEF3F778FB6D9C2C9CF7 +:102C800001000000E01C03000004000019ABD41B8D +:102C9000002805D1C148062200682100E8F2E8EECC +:102CA00038790123022800D100230F208001381831 +:102CB000827A24990220DFF797FB002859D022E07E +:102CC000179056E04320C000042221002818E8F2A3 +:102CD000D0EE4EE0872120788900002848550B98D7 +:102CE00008D0FF308130017EFB2211408908890025 +:102CF000491C06E0FF308130017E0422114389081F +:102D00008900017635E00120DAE7A3483130281840 +:102D10001A902EE00A5C002A03D1401C1028F9D337 +:102D200001E0102803D31B980221F2F7F0FC9C4825 +:102D30001B991022E8F29CEE22980079002818D006 +:102D4000F2F74AFB15E017A9049109991AAA7046EF +:102D50006B460597039407C32900089B269A0833FE +:102D60003000E3F2C7FC0898417AC1720898017AF2 +:102D700081721A98002806D0F178B3780A021A43B3 +:102D80002100E8F276EEF078B17800020843199954 +:102D9000189A091A121D80181890042900D32EE5DC +:102DA0002800D4F735FD10AB988B27B0F0BDF3B5F4 +:102DB0000020D1B06C224F907A4934A8E8F2C2EEDC +:102DC0000020309014212BA8E8F2EEEE00210A003A +:102DD00029A806C001201E9018A806C016A806C083 +:102DE00051980DF0AEFF159051980DF083FF04211E +:102DF00013914B210400C9004018279035203390CF +:102E000002203290E4203190002018AB1A90187AFA +:102E1000202108438106C90FF722C900104008434A +:102E200018725298529DC17880780B0203430A3B76 +:102E30000A35002B10D0002033901E9013AA18A939 +:102E400031A801AE07C632AA18000092290034AAA0 +:102E500033ABFFF7B7FB4F9052990A2088700020E0 +:102E60000600C87051E1770034A838182B90022072 +:102E700028AB12A918712C91587100212BAB82003C +:102E80002BAB995029AA1154401C0528F7D30020D8 +:102E9000129034A8C75BFF219731781A8F4277D000 +:102EA00027DC4149781A8F4273D012DC3D2F7DD048 +:102EB0003800FF38303845D0122878D110AB9889C7 +:102EC000EE211290095B1982F221095B598214A943 +:102ED000C0E00B2840D012286AD03528EDD102205E +:102EE00028AB129098715198E1F713FC1C901CA824 +:102EF00016E014283DD015DC012872D002286FD0CE +:102F00001228DAD15198EDF73AFF01005198007973 +:102F1000032806D1202028AB12909871486C2030ED +:102F20002D90C9E02B2876D03A28C6D118201290CF +:102F30001FA82D90082028AB987119482E901020BA +:102F4000D871B9E00120129002F086FE1D901DA8F4 +:102F500010AB2D90188966E01E982A00012802D136 +:102F600000209070D07051982900FCF79DFA2D1820 +:102F7000129051982900FCF71BFB10AB19892D18F2 +:102F80000818001F1290002028AB2C902B9010E006 +:102F90001FE011E0FFFF000022020000BC0000045F +:102FA000860003C0243404005E01000046E053E0C4 +:102FB00032E0587118717FE0182220000CA907F048 +:102FC00005F928AB0028987101D00CA92D91129019 +:102FD00072E0062028AB12909871FA482CE000E0CD +:102FE00024E0062216A918A808F0E9FC002802D15E +:102FF0002A00002101E02A0018A95198FFF764FB7C +:103000000006000E58D0002128AB2C912B9118718E +:10301000001F5971DBE718E0042028AB129098716B +:103020004320C00008E028AB987145E0012028ABA0 +:103030001290987187208000201871E7162028AB25 +:1030400012909871200066306AE7DE490220313123 +:10305000611812902D91E6E727981AAA30301FA91F +:103060000EAB07C323AA1BA91CA80BAB07C31DAA41 +:103070004F9828A9C37880781B02184308AB07C370 +:1030800031AA279832A9E030007B05ABB53AD88247 +:1030900001000000DC20030000040000313A51A6CA +:1030A00007C321002798FF31007FCF318006C20F70 +:1030B0000492159A12A808320290019200912300FE +:1030C000380029AA2BA90395E3F268FD0027B80070 +:1030D0002BA950900858002809D0010029AAD25DD8 +:1030E0002800E8F2D0EC509900202BAA505029A9D2 +:1030F000C85D002802D045190020C8557F1C052F47 +:10310000E5D3529810ABC178827808021989104330 +:10311000091D401852998870000A761CC8703398AF +:10312000864200D2A9E6309853B0F0BD10B5140025 +:103130005204520CE40B03D10B002C21DFF750FE9C +:1031400010BDF8B50400080008300D0000260090FE +:103150000DF058FE002807D08179A279914203D161 +:10316000C179E279914201D00120F8BDE0F723FE58 +:10317000070020D038892321C4192000217000992C +:1031800006220930E8F27EECE878A97800020843CC +:103190000E2801D1022003E0E87BA97B000208434E +:1031A000E073000A20743800E0F741FE012803D1E3 +:1031B0003800E9F2C5F901263000F8BD70B50D0000 +:1031C0000126E0F7F8FD04000BD0208900190570F6 +:1031D0002000E0F72CFE0600012802D12000E9F2D1 +:1031E000AFF9300070BD10B501242121FFF7E6FFD3 +:1031F000002800D10024200010BD70B50500012476 +:103200000DF082FD0D21890140180079002801D1BF +:10321000022070BD1F212800FFF7D0FF002800D139 +:103220000024200070BDF8B5050000263400771E8C +:10323000202904D0222904D02B2904D03EE0674C59 +:1032400001E0664CE41EF5F757F8654900208860F8 +:10325000D1F796FC2800EEF74EFF002801D1F2F7D7 +:10326000F1F9E9F7DDFE00280AD02800EEF7B9FCF5 +:10327000002805D05B490988002901D0EAF7D4FB72 +:103280002800EAF797FC002C19D02800FAF7AEF8CE +:10329000050014D02889210A4019047041700021CA +:1032A0008171C171082181700021C1702800FAF775 +:1032B00014F9012803D12800E9F242F93E00300058 +:1032C000F8BDF7B50D00002700980DF01DFD002D8D +:1032D00002D0297B002920D1009911235B0107220C +:1032E000C9180A720D2189010124401800260471B1 +:1032F000EAF727FC3B480088002809D0EDF72FFBB0 +:10330000012802D10098EDF783FD0098EAF78CFBC5 +:1033100033488460D1F718FC02E00027FF43012600 +:10332000F4F7EAFF029801281CD10098FAF75EF83A +:10333000040017D0208929490019491E0170090A83 +:103340004170310A8671C171082181700021C170FC +:10335000297B01722000FAF7C0F8012802D1200071 +:10336000E9F2EEF83800FEBDFEB5050000270DF0CD +:10337000CBFC4B21C900441817490600491F4018CF +:10338000019028000DF0E7FC009011204001281862 +:10339000007A002801D00220FEBD2879032804D13C +:1033A0006879022801D00420FEBD00221100280007 +:1033B00005F0E6FF20367078C007207F02D0EF21AD +:1033C000084001E0102108432077A8688005607F4D +:1033D0000AD50121084309E022020000B280000062 +:1033E000C04204005C3C0004400840006077019843 +:1033F0008178C1702800E3F7BDFA01280AD12800BE +:10340000E4F723F9002804D10098007A8009012804 +:1034100000D105271D212800FFF7D0FE012800D18B +:1034200003273800FEBDFEB5050001200E00002D6B +:1034300001903CD00020019030727072F078B17829 +:1034400000020843801CB0703700000A08373400BF +:103450000A34F07028000DF07EFC10300090A8684F +:10346000C0041DD57878397800020843401C3870B4 +:10347000000A78700F48211D2A182000E3F2A9FDE8 +:103480000098007EA0722800ECF7CAFBE072F0788A +:10349000B178000208430C30B070000A6104EBFC04 +:1034A00001000000D82403000004000062E082CA8A +:1034B0000C34F070EA79A9792800EDF752FC050088 +:1034C000D2D10198FEBD00002902000070B50400B1 +:1034D0000D000DF023FC20000DF047FC01216030B1 +:1034E00004220172FF4821182000FFF729FE002D59 +:1034F00003D124212000FFF76BFE70BD10B50C0036 +:1035000008000DF00BFC0522D20100218018816219 +:103510002000FFF7DBFF10BDF7B582B0170002985F +:1035200000260DF022FC0500EE4B029803991035A1 +:103530000622C01808F057FA00280DD128004030A4 +:10354000017E0126012902D1002005B0F0BD448B87 +:10355000032C05D0022C03D03800E3F2CAF8040093 +:1035600000220092029A039902983B00AC32E0F7E5 +:10357000E9FF070003980078C0070FD1002F03D0A0 +:103580000120C003044307E0012E05D1012158208A +:10359000415502980CF02BFC40356C833800D4E781 +:1035A000F7B5062205000024CE48E4432818019907 +:1035B0002600070008F017FA00280BD128000DF0AC +:1035C000D4FB032160304181029A39002800FFF7C3 +:1035D000A3FF06002800F9F713FF05001FD0288974 +:1035E0004419C1482070000A002E607001D10020EB +:1035F00000E00120A071000AE0711020A0700020FE +:10360000E0702000019906220830E8F246EA0298AC +:10361000A073000AE0732800F9F769FF00E02600B4 +:103620003000FEBDF8B505000F000DF09EFB3E6FAB +:103630000400AE49AE48B61D10F004EA3078C00769 +:103640000DD06037787F332801D120241DE0342845 +:1036500001D1222419E036281DD12B2415E0603435 +:10366000628931002800FFF76BFD9E480622310079 +:10367000281808F0B8F900280DD1207A01280AD1BD +:10368000242402E00120D3F707F821002800FFF7E7 +:103690009FFD0128F6D00020F8BD10B504000DF004 +:1036A00064FB6030007A012803D124212000FFF759 +:1036B0008FFD10BDF3B583B006000DF056FB05007D +:1036C00008F066FD01908B49894810F0BCE9300094 +:1036D00000F01DFA30000DF021FB192149014418BA +:1036E0000290207B3700A03700280BD0F88B0328EE +:1036F00008D102980521C9014018806AD7F251FA11 +:10370000002020730120F883300010F000EA002828 +:103710002AD03000EDF747FBE96E0400002905D000 +:10372000300010F008EB0020E86604E0207F01285C +:1037300001D3401E20770298217F203000788142FB +:1037400012D22000A0300100007E42070CD5FB22DF +:1037500010400876092000022018006B002803D0D2 +:10376000A068511D0843A060280088211030E8F2AD +:1037700030EA0021682041553000F7F7C0FD049879 +:1037800000280DD10F2080013418206A002807D0AE +:1037900079895948E8F2D0EE2861002020620EE0D5 +:1037A00000213000F1F7BDF94E4806213018E8F24B +:1037B0003AEAB068400502D43000EEF78FFA01987B +:1037C00008F0EAFCC1E670B50400008965690019DB +:1037D00020304178027808021043E2F28AFF0200AA +:1037E0004048636929181800FFF7AAFC0021280047 +:1037F000FFF760FF002070BDFFB581B0FF2116000C +:103800005D310A9D2800E0F7CFFD040001D1401E84 +:103810009BE620892A0007193248AC3200922A1808 +:10382000F1208000291820000B23E0F711FE049AF4 +:103830000092029A019933003800E2F206FC20005F +:10384000E0F744FE81E6F8B5050016002035EA7879 +:10385000AF78120200243A438A4201D00E241FE0BE +:10386000032A04D1C078400601D4012418E01800CE +:10387000E1F21DF8002804D0687829780002084396 +:103880000ED068782978FF2E05D10002084307D0B2 +:10389000012805D003E000020843B04200D00D2407 +:1038A0002000F8BD0289416910180A00D3386592DA +:1038B00001000000D428030000040000968FF77E6A +:1038C000C032D368A0318A8BC98BC6E7F8B50E0029 +:1038D000018947690D1838000DF051FA38000DF0D4 +:1038E00027FA04000120A0370521C901F8836018D8 +:1038F000806AD7F260F90BE029020000B580000071 +:1039000022222222CCCCCCCC11111111B80B0000F8 +:10391000192252010021A018002E01730AD1AB20F8 +:103920002900800080222831201808F066F800283D +:1039300000D00F263000F8BDF8B50D0006000DF0E0 +:103940001EFA30000DF0F4F91921490141180A7BE3 +:10395000002A02D00020C043F8BD0323BE229353A7 +:103960005522D2008418121D801828600120087387 +:103970002068D7F220F900220092504A50482300D4 +:103980003100D3F781F82868E2F251FA0020F8BD3F +:10399000F3B5002487B026000294079803940189A8 +:1039A00045690F1828000DF0EAF960300690007A9A +:1039B00003280CD12800F4F7DEFF002807D00D20E3 +:1039C00080012818406A002801D0012602E0280062 +:1039D00000F0A7F8F87840061ED50D2080012818C1 +:1039E0000590C069002861D0010008315ED0807C5C +:1039F000C0075BD008986030E8F29AE9018800239C +:103A00008031018005980899C26907A80832CDF76E +:103A100082FF002800D10F242037787839780002FF +:103A200008430490F878B97807020F43002C03D1BB +:103A30000798FFF741FF0400BE20405B03280FD129 +:103A400007982100FFF742FF040001200327002C04 +:103A5000049015D1002E13D10699022008720FE0B0 +:103A6000002C0DD10498002805D1002E08D106980D +:103A70000221017204E0280003A9FFF75DFF029014 +:103A80000298401C0AD07F1C3904039B0498090C3F +:103A900022000095FFF7BAFE401C01D1002102E090 +:103AA000002C05D001212800FFF71AFD09B0F0BD58 +:103AB0007D21C9002800F0F76FFFF7E720A107007C +:103AC0002525030070B504000DF032F909218901A4 +:103AD00045182021095CAA6B8A4201D3002070BDE1 +:103AE0003322120120218018E3F29AFA11214901B0 +:103AF000000600226618000EFF2872820FD0401CBC +:103B00007082A068012109030843A060A86B401CD3 +:103B10000128A86303D144212000DFF709F9708A46 +:103B200070BDF0B5040085B008F03CFB0190A068C2 +:103B3000C00404D4019808F039FB05B0F0BD2000A2 +:103B40000DF01DF905002000E4F7EAF800279020A9 +:103B50004751A0680121C9038843A0600D2080015E +:103B60002618F06AD7F227F801212000F762E4F75F +:103B7000B2FDA068012109038843A0601120400123 +:103B800020180390418A00290DD000222000E2F77E +:103B900080FB03983321428A286809014018521E8D +:103BA0002021E3F257FA0398002141822968092075 +:103BB00080010818816B1327491E816328000221A8 +:103BC00060300172407A7F0100280AD12868C0194C +:103BD000417F491E0906090E417702D12000E0F716 +:103BE00011FE200020300290807E80060AD42868D2 +:103BF000C019817F491E0906090E817702D1200074 +:103C0000E0F73DFE0298C07E40070AD42868C0193C +:103C1000C17F491E0906090EC17702D12000E0F7D5 +:103C20008BFE286820304078010701D4800606D535 +:103C3000706A002803D0D3F701FA00207062286868 +:103C400020304078C0090DD0706A00280AD0D920F1 +:103C500080002018D3F77AFAA06810218843A0606A +:103C60000020F061A0680221400840008843A06065 +:103C70006720C0002018E5F28DFD2000F7F7EFFB6C +:103C80002000D4F789FD28002C303C21E7F2AAEF70 +:103C90002968092080010818806B002803D143217E +:103CA0002000DFF745F8A068FF49800605D42868A2 +:103CB00040184178491E41704DE0200055CB652CDD +:103CC00001000000D02C030000040000C5552412A0 +:103CD00040300200C07F800704D428684018C378B1 +:103CE0005B1EC370D07FC00604D428684018827859 +:103CF000521E82706020005D40060BD52868401877 +:103D00000179491E0906090E017103D10121200024 +:103D1000E3F796FAE948002757382618E84B3100B0 +:103D200038006A46DAF203FB012808D13900300076 +:103D3000D9F7A1FC002239003000DBF2A8F8E14AF3 +:103D400031003800DAF222FB012809D13A003100B3 +:103D50002000D9F72EFC012239003000DBF297F861 +:103D60007F1C3F063F0E082FD8D32000E0F734FD1C +:103D7000A06881040AD5012149038843A06029680D +:103D80002000E0F79AFE039900200882A068202115 +:103D90008843A06020001C215D30E7F258EF20002E +:103DA000D8F729FFD0E6F8B504004669008905195F +:103DB0003000FFF7C0FEC1480522573831183000E7 +:103DC000FFF7D2F968782A78A18800021043081A10 +:103DD000E0380204120C00922A0001213000062370 +:103DE000FBF781FC2000E0F785FBF8BDFFB581B053 +:103DF00004001E000A9F0CF0CCFF050020000CF010 +:103E0000A1FF2000D4F7D2FC2C353C212800E7F29A +:103E1000F4EE039A0299330028000097E3F28CF93C +:103E200001202035287692E67FB502221C00991CDD +:103E3000089D684607F0EBFD002810D101220AA971 +:103E400002A807F0E4FD002809D10122211D01A8E4 +:103E500007F0DDFD002802D16079A84202D00120E0 +:103E600004B070BD0020FBE770B50D009649060058 +:103E70000024032207F0CBFD002806D0934903223B +:103E8000300007F0C4FD00280AD1F078012809D0DD +:103E900002280AD0062803D12C00FF20401C044031 +:103EA000200070BDEC07E40FFAE72C000220F6E7D3 +:103EB000FFB58FB000249C4628231B9E1D9D1A9998 +:103EC000834F1C980B9405970E94002E2B802CD0BA +:103ED0000B789B0629D57078122802D2012013B0E6 +:103EE000F0BDF078B17800020843012801D02C2001 +:103EF00070E0707A317A00020843012831D1F07BFA +:103F0000B17B0002084301282BD160460E900022AD +:103F1000052005A901AB07C306AA009230000CAA30 +:103F20000BA90DABE4F2B0FB1CE0002819D0097816 +:103F3000090716D5417B037B09021943012910D1DA +:103F4000C17C837C0902194301290AD10E92052202 +:103F500006A9019200910CAA0BA90DABE4F2A2FAFA +:103F600000E0012408AB187D010704D4400702D407 +:103F70002A200124288008AB187C010704D44007BC +:103F800002D4292028804CE0002C5DD100206B4613 +:103F90002880988AB84222D00F980CF0FAFE0F9E23 +:103FA00002000F216B46187D890171180969C30948 +:103FB000002B06D16031097CCB070DD0890708D5CD +:103FC00003E06031097CC90706D0410604D5C10968 +:103FD00002D12D20288081E7C009803210611E980F +:103FE0002E2600281FD10E990D98E3F249F80128DA +:103FF00016D118990C98E3F243F8012810D11999B9 +:1040000006A8FFF731FF00280AD06B46DA7E00923F +:10401000304D9B8A2D680F980DAA0BA9A84713E075 +:104020002E80012410E018986B4602909A8AD97E5F +:1040300001920091109B0C9A0D990B98FFF7F4FEDA +:104040000400012800D12E80200048E7FFB58BB086 +:104050002D2000260F00159DF64328800B980CF0AC +:1040600098FE0A900B980CF06DFE04000B98C0307F +:10407000C068E0F230FC002802D1002F5CD108E0DB +:10408000002F03D10E990D98084302D100200FB0E4 +:10409000F0BD132149016018007D0027C0060028EB +:1040A00035DA2120005D010701D4810632D50A9856 +:1040B0002C3086462000E03084460DE0800200006F +:1040C00074CB000414CB000444F7310038B45D9C79 +:1040D00001000000CC300300000400007A9001A130 +:1040E00047F73100FFFF000098F90004807A2300B1 +:1040F00080330990D86E08900E98002206920490A2 +:10410000210060460595C0890D9A213101AC07C494 +:104110007146986E0090089B099A0B98FFF7D2FEA3 +:1041200008E000262F8011E0810706D50D980028B1 +:10413000F7D00E980028F4D008E0C00906D01499F2 +:104140002A00200006F058F90028EAD13000A8E73C +:10415000F3B504000020C5B006000E9020000CF05E +:1041600022FE0A9020000CF0F7FD05004B20C00055 +:104170002F180A98FF2110300B9091312000E0F7A2 +:1041800031F9FB49339061180028449108D14499D2 +:1041900005222000FEF7F2FF0020C04347B0F0BD2B +:1041A000339833990089220040183490F120AC32C2 +:1041B000800021180092449A33980123E0F766F9B1 +:1041C00034980021203043908170C170397F017094 +:1041D000797F41703399C02008814699349831AA7B +:1041E00032ABE1F2F5FE0B980D214030890142908F +:1041F000007E611841910F218901611803284091C7 +:1042000053D12000F4F7CBFB00284ED04198406AF0 +:1042100000284AD043991E2088700020C870382694 +:104220006B4605271E7503205F7598757D2005ADCB +:10423000E91CC000E7F2A0ED34983B00AA1C310055 +:10424000E0F23EFE33988188349842780378100279 +:104250001843081AE0380204120C0092349A012123 +:1042600020000623FBF749FA3398E0F74DF941980F +:10427000C06A002817D1DB2000228000231800929A +:10428000BC4ABD482100D2F713FC409800210069C8 +:104290006030428A2000F4F7E8F840980069603006 +:1042A000418A491C4182002078E73299319815AA49 +:1042B00004F006FA0EA914AA009101922A00329085 +:1042C00034980E3215A90FABE1F212FE00287ED110 +:1042D00010AB1B7C002B04D03498322111AAE0F2E1 +:1042E000EFFD0920800128183F90C07C002852D0A3 +:1042F0002E98002803D03F98007DC0062EE015A818 +:10430000E1F24EFE002807D00A98007A800703D118 +:104310003F98007D400721E015A8E1F241FE00280A +:104320001FD01B98002806D01B984178801CE0F213 +:104330001BFB002815D11C98002806D01C9841783A +:10434000801CE0F211FB00280BD10A98007A80074C +:10435000800F012805D13F98007D800700281ADBD7 +:1043600017E01B98002806D01B984178801CE0F2CB +:10437000FBFA002809D11C9800280CD01C98417821 +:10438000801CE0F2F1FA002805D03F98007DC007BC +:1043900001D112201DE0A820025D23000092329A74 +:1043A0003498883315A9E1F28EFD00283CD1A0682D +:1043B00081054698203000293E900FDAF4F70FF877 +:1043C00000280BD03E984078C00707D100E02BE0D2 +:1043D000162043998870000AC87025E0469A2C98E8 +:1043E00013A96B4607C32000179B219A2B99FFF74F +:1043F00037FE401C02D110AB9889EAE7FF2011304C +:10440000C05900287ED10B9820300990686C002894 +:104410000ED03A0030320092099B4699349815AA82 +:10442000E1F233FD002803D03398FFF7C6FCB5E670 +:104430002198002847D00A9880300069002842D08F +:104440000020409A069012696B466032187E127CFA +:104450004006D207400E120E10434399C209187647 +:104460000CD0BF221040409A12696032127C920731 +:10447000D217521CD207520E104318763498427845 +:104480000378100218434018844606A800220390BF +:104490002B00E033049205921A8AD9892800E8306B +:1044A000029201910090021D5B7B01216046D4F7CE +:1044B0002EFE34994A780B7811021943401834992A +:1044C0000870000A4870686C012809D122980028F9 +:1044D00006D02A00349866323D21162354F7CD9831 +:1044E00001000000C834030000040000294AD2CDB6 +:1044F000E0F2F0FC280020303D903C904078C0096C +:1045000007D02C982C9A43783498921C4421E0F2DE +:10451000E1FC686C012800E0ECE01AD12298002848 +:1045200017D038002030017902290AD0807C80071A +:1045300007D5EA1DFF323498FE324A210E23E0F2FD +:10454000C9FC232000012A1834987F210823E0F2B7 +:10455000C1FC1120400128183B90407E002831D03A +:104560002E9800282ED01798002802D121980028D4 +:104570000ED0099800280BD009980078400707D57D +:104580002A2030E72902000040420F00B1740200E7 +:104590003B98BF21037FFF482A183498E0F29AFC29 +:1045A0003F98C021837AFB480E302A183498E0F2F5 +:1045B00091FC3F98C721437CF64815302A1834985F +:1045C000E0F288FC686A012809D11898002806D012 +:1045D0002A0034982A32DD211823E0F27BFC2D9842 +:1045E00000284BD020000FF0BAEA002846D0200067 +:1045F000ECF701FC3D9A017F137813229201994256 +:1046000001D2002100E00321821851764D221201CF +:1046100082180121D17100211172A030007E0A00A0 +:104620008007C00F0302009134995B1C20000FF03B +:1046300042EB01063498090E4278037810021843C1 +:10464000401834990870000A48700FF038EB0028C1 +:1046500014D03498417802780802439910434118E5 +:10466000012220000FF02EEB34994A780B781102CA +:104670001943401834990870000A4870112040010D +:1046800020183A90408A002807D12000FFF738FA16 +:104690003A980126408A00282CD04398C178827825 +:1046A0000802104341D120000FF058EA00283CD006 +:1046B0002000ECF7A0FB06902D9800280698007FBC +:1046C0000AD03D990978884214D2469920000FF00B +:1046D0005EEB0B99C8650FE0401C06990006000EC2 +:1046E00008773D990978884206D9012802D30699AE +:1046F000401E08770C2076E606983D99007F0978E1 +:10470000884212D306980422A030017E114301761C +:104710000698092109024018006B002805D0069868 +:10472000910180680843069988603398818834989D +:104730004278037810021843081AE0380204120C79 +:104740000092349A012120000623FAF7E0FFA068C6 +:104750000221400840008843A0603C994978CA077C +:1047600008D189070AD5E96F0A00083218D0897C78 +:10477000C90715D003210843A06011E02000D4F739 +:10478000DDFD00280CD04198406A002804D1D2F702 +:104790005BFC4199486203E008305421E7F240EAAB +:1047A000686A012829D11898002805D1686C012869 +:1047B00023D12298002820D001212000EDF74FFEC0 +:1047C000189800281DD00B9818996030097AC17488 +:1047D0001899097A01751899097A4175FF2069308D +:1047E0004059012805D11898007A000701D001210D +:1047F00000E000214098016003E000212000EDF777 +:104800002EFE3A980321408A890308434399087190 +:10481000000A48714299032008760B990020087617 +:1048200020000BF00CFB439900208870C870210019 +:10483000686C403139911D31012838917ED1229820 +:1048400000280ED1012E04D0002E43D1A06880068E +:1048500014D538002030417A491C41722298002832 +:104860000AD0002E21D1A068800607D4380020305D +:10487000417A491E417201E0002E13D13998C07F60 +:10488000C0060FD4A06880060CD52298002804D05A +:1048900015A8E1F2CCFB002804D038002030817A42 +:1048A000491E81722298002814D015A8E1F2BFFB9E +:1048B00000280FD1012E08D0002E0BD13998C07FCF +:1048C000C00602D4A068800604D438002030817A63 +:1048D000491C81723998C07F800711D4A068800676 +:1048E0000ED5002E0CD12298002804D04BA33704FB +:1048F00001000000C438030000040000DD25A77992 +:1049000015A8E1F2A6FB002804D038002030C17AB7 +:10491000491EC1722000229960300029379039D099 +:1049200015A8E1F296FB00280FD1012E08D0002E29 +:104930000BD1A068800603D53998C07F800704D5C5 +:1049400038002030C17A491CC1722298002800E04A +:104950005DE01FD02298C07840061BD5012E08D0FC +:10496000002E3ED1A06880063BD5379800784006DF +:1049700037D438002030017B491C01730A98052187 +:104980000068C90140180079012803D100212000E6 +:10499000E2F774FC002E21D1A06880061ED537985E +:1049A000007840061AD501E03D0200002298002858 +:1049B0002DD02298C078400613D438002030017BD7 +:1049C000491E01730A9805210068C9014018007941 +:1049D000002803D101212000E2F750FC2298002892 +:1049E00015D03900303115A8E1F2D7FA15A8E1F257 +:1049F00030FBC007010EA06880229043084360216D +:104A00000843A060229938981C22E7F278E83B9886 +:104A1000407E002849D02E98002846D0A068012169 +:104A200049030843A0603B99897E002903D10121F5 +:104A300089030843A06020002E990E227930E7F206 +:104A40005EE83F9881794079090201432E98C27946 +:104A5000837910021843E0F72FF82E998F2288717E +:104A6000000AC871309800280B9811D0309B803014 +:104A700041799B7889089B0789009B0F19434171F5 +:104A80001140309A92785206520F1201114305E0FC +:104A90008030417989088900891C114041710121C8 +:104AA0002000E0F758F83A990882A06800228006B2 +:104AB00000D5389A009208AB197E002213000FA887 +:104AC000E0F260FB0D910C90A068800403D52E9855 +:104AD000E3F761FA01E0002001004208CB0713432D +:104AE0000C9A0D99C00710430B430D930C90399904 +:104AF00008AB187E087520000E2246300FA9E6F29A +:104B0000FEEF0D9B0C9A200002F075FC2000F6F7DA +:104B10005CFD2000F6F7EEFC2000F6F7C2FC380042 +:104B2000203036900179200020300229359003D1C1 +:104B30004299022048767EE015A8E1F245FA002865 +:104B400012D0002E0ED14298407E00280AD136980D +:104B500036994079401E0006000E487102D12000AF +:104B6000DFF778FE012014E0012E05D0002E0FD1D2 +:104B70004298407E00280BD0369836994079401CE8 +:104B80000006000E0128487102D12000DFF762FE06 +:104B90000020429948764698E1F2EFF900280ED0BD +:104BA000002E20D13598807E80061CD43698369908 +:104BB0008079401E0006000E887114D110E0012E8D +:104BC00005D0002E0FD13598807E80060BD5369803 +:104BD00036998079401C0006000E0128887102D1A8 +:104BE0002000DFF774FE4698E1F2CFF900280ED0DE +:104BF000002E20D13598C07E40071CD436983699B7 +:104C0000C079401E0006000EC87114D110E0012EBC +:104C100005D0002E0FD13598C07E40070BD53698B1 +:104C20003699C079401C0006000E0128C87102D1D7 +:104C30002000DFF7A9FE2000D8F740FF0200012185 +:104C4000200002F054FE2000DFF7E4FDA06880049D +:104C500003D529002000DFF74EFF3E9935980A78EA +:104C600082764978C1764398397F0170797FFF2732 +:104C7000417091373A002D2307A908A8DEF731F8D3 +:104C800000282CD0079E08981836301A3F1A310099 +:104C9000280005F098FB0004000C391A0B043718A3 +:104CA00046981D14417800780A02024346992B0069 +:104CB0003800DFF282FE291A0B043D1834991B14C8 +:104CC00006222800DFF279FE07994019801B8872BE +:104CD000000AC872089A44992000DEF7DCF833987D +:104CE000DFF726FC05062D0E12D12B98002804D0E4 +:104CF0004098012101620E4907E04099F3E31BBF90 +:104D000001000000C03C0300000400008EFF741589 +:104D100000200862A068400704D57D21C90020005A +:104D2000EFF76CFE280047B0F0BD10B544692000D5 +:104D3000FEF729FF0448022221182000FEF728FC74 +:104D400010BD0000B80B000029020000F0B595B0BE +:104D5000070000200A900E0038000CF01BF80890A5 +:104D600038000CF03EF808984B21C90040180F900D +:104D7000DC300E90089C38000EF004EF002801D0C3 +:104D8000052002E03800DDF7A9F909903800C030AD +:104D9000082E03D141680B91806804E0052E7ED176 +:104DA000C1680B9100690C90002878D00B980028FE +:104DB00075D00C98C0300D900C981C30082E0790C0 +:104DC00002D10C98C02101813A008832FF4833009B +:104DD000005D01928007C10F243200910C981100F0 +:104DE000E0F2AAFF03003800A030149041890D982A +:104DF00020300172090A41720F990A7F8272497F3D +:104E0000C1720F2080013818139000690F99057B3B +:104E10002031129109790120022900D100200200DD +:104E200021000E3118002B001191E0F2A9FF0500BE +:104E3000082E0BD10F98C030856214980E9B427AD1 +:104E40002020015D2800E0F2AEFF05003800F2F7F7 +:104E5000E7FE002804D029003800F2F700FF4519CA +:104E6000B86880050ED51D2040013818017E280045 +:104E700005F053FB4519082E04D10999280005F0C7 +:104E800053FB45190898132149014018007F012858 +:104E900010D1CE49089860314018C07800E02FE169 +:104EA000C106CB0F0107CA0F4007C10F2800DFF270 +:104EB000E1FE4519606C012805D10F9928003031B9 +:104EC000E1F2D9F845192000203010904078800692 +:104ED00036D53800D4F746FA002831D0002013998F +:104EE000069009696B466031187E097C4006C90747 +:104EF000400E090E0843C10918760CD0BF210840A6 +:104F0000139909696031097C8907C917491CC907C8 +:104F1000490E0843187606A8002203902300E033C8 +:104F2000049205921A8AD9892000E83002920191F0 +:104F30000090021D5B7B01212800D4F706F945197A +:104F4000119801222900DFF2B8FE4519606C012892 +:104F500005D1210064312800E1F293F84519109839 +:104F60004078C00904D02900200005F02CFA45192A +:104F7000606C012817D11298807C800713D5129895 +:104F80000079022807D0E11DFF31FC3110222800F2 +:104F9000E6F2BEED10358D480A22113021182800A6 +:104FA000E6F2B6ED0A35112040012018407E0028B7 +:104FB00017D086480E221E3021182800E6F2A8EDF0 +:104FC00082480E352C30211807222800E6F2A0ED89 +:104FD00025200001ED1D211803222800E6F298ED9E +:104FE000ED1C10984078000718D53800D4F7BAF9AE +:104FF000002813D000222300E0330392049205928C +:105000001A8AD9892000E830029201910090821C0E +:10501000DB7A00212800D4F798F84519606A012846 +:1050200005D1210028312800E1F231F84519082E78 +:1050300004D16748056070010A9001E06548056089 +:105040003800ECF7BCFD002802D10B98E0F2D6FC4A +:105050000B990A98C8610799099888700B980121E3 +:10506000C069090388430B99C8610998E2F273FB90 +:105070000B99C8620D980D99281A20380870000AFB +:1050800048703879032821D1787900281ED0022869 +:105090000FD0052E04D10D9938000EF090EE05E0EA +:1050A000082E13D10D9938000EF08CEE7879022875 +:1050B0000CD13800EBF7B3FE082E07D10EF026EE28 +:1050C000002803D00D9938000EF080EE0C988188EE +:1050D0000D984278037810021843081AE038020449 +:1050E000120C00920D9A012138000C23FAF723FBD1 +:1050F0000F980D9AC030836A0B983100E0F272FE6F +:1051000015B0F0BD10B50C000BF044FEF740E68E74 +:1051100001000000BC400300000400008C06AC034A +:105120002F4960314018C078C106CB0F0107CA0F64 +:105130004007C10F2000E0F274FE10BD70B50500FD +:105140000BF032FE2C00C03461682800FFF7E4FF4A +:10515000E1682800FFF7E0FF70BD10B504000BF018 +:1051600023FE2000FFF7EAFF10BDF8B50C00150084 +:10517000476807F053F8060078783A780002104341 +:105180000C38020439002C31120C3D20E4F2A5FC4D +:1051900000282FD02179CA4392070DD08907890FA3 +:1051A000012909D0002D07D0E17808221143E170D0 +:1051B000C1781143C17006E0E278F7210A40E2703D +:1051C000C2780A40C270C178FB221140E2785207CF +:1051D000D20F92001143C1708908E278890005E07E +:1051E0001D02000070F9000474F900049207920F88 +:1051F0001143C170300007F015F8F8BD70B50D000F +:105200000BF0D2FD112149014118497E01240029EA +:1052100000D000240600643631002800E0F219FEB8 +:10522000220031002800FFF7A0FF70BD70B5050017 +:105230000BF0BAFD2C00C03461682800FFF7DEFFD8 +:10524000E1682800FFF7DAFF70BD10B504000BF02D +:10525000ABFD2000FFF7EAFF10BD70B54C680BF006 +:10526000A3FD050060782278000210430C38020488 +:1052700021002C31120CC020E4F22FFC002805D0B4 +:10528000534905226918801CE6F24CEC70BD70B5DC +:1052900005000BF089FD2C00C03461682800FFF781 +:1052A000DCFFE1682800FFF7D8FF70BD10B50400EF +:1052B0000BF07AFD2000FFF7EAFF10BD70B54C68D7 +:1052C0000BF072FD050060782278000210430C3864 +:1052D000020421002C31120CC720E4F2FEFB00284E +:1052E00004D0092189016918897C817070BD70B56D +:1052F00005000BF059FD2C00C03461682800FFF751 +:10530000DDFFE1682800FFF7D9FF70BD10B504008C +:105310000BF04AFD2000FFF7EAFF10BD07B56B4612 +:10532000496818884885516848850EBD10B5040045 +:105330000BF03AFDFF30C034FF30801CE26861683A +:10534000406FFFF7EBFF10BD10B504000BF02CFD14 +:105350002000FFF7EBFF10BD70B50400080015003A +:105360000200496823000820E0F200FB696823007E +:105370002A000520E0F2FAFA70BD10B50BF014FD1A +:105380004B21C90040180100DC314A78C030806AE6 +:10539000921CE6F2C8EB10BD10B504000BF004FD42 +:1053A0002000FFF7EAFF10BD10B504000BF0FCFC75 +:1053B000C034E26861682830FFF7CEFF10BD10B539 +:1053C00004000BF0F1FC2000FFF7EEFF10BD000021 +:1053D0004B020000F94A010000201C2343439B18A4 +:1053E0009B688B4202D0401C0328F6D37047F349D8 +:1053F00000201C2242438A5C002A04D11C2358430B +:105400004018C0787047401C0328F2D30020704732 +:1054100070B50E00FFF7DEFFE84D0400032809D049 +:105420001C206043295C002904D1401980683100A8 +:10543000D9F72AFB1C206043285C70BDF8B51C24FA +:105440005443DE4E0027A5190B000092E6F286EDCC +:105450000C7907790A43794A79627979627901206E +:1054600068706EE06A69002A02D0E86800219047FF +:10547000E8680179032922D1EBF7DBFC0EF050EC50 +:1054800000281CD0E8684179012922D10EF0ACEC4B +:10549000CB48416A042211434162DCF724F9012020 +:1054A000DBF2DBFCC7480168820C11430160C6498E +:1054B0000868202210430860DEF7FAFD09E0C348BF +:1054C0000068002805D0A968814202D1009800F048 +:1054D000CBF9375535E002203055A8680621D9F7B9 +:1054E000E0FB2EE0B94A1068002813D0A968814279 +:1054F00010D1305D01280DD0E868EBF79AFC0EF072 +:1055000010EC002806D1E86801225F21DDF74EFC8F +:10551000AE4807600120AF603055287E1981ABA3EB +:1055200001000000B844030000040000DFDC7F6FCE +:1055300000280AD0E868EBF786FC0EF0FCEB0028A8 +:1055400003D1009800F09AF92F762A69002A02D038 +:10555000E868002190470320F8BDF8B51500002643 +:105560005469002A23D02889411988780009042821 +:105570001FD008281BD00D2819D10020070000904B +:105580002000EBF760FC002801D00700C537F120B0 +:10559000800022183B0028006946E5F200FD002843 +:1055A00005D0009A0699280005F0C8F801263000B9 +:1055B000F8BD002CFBD020790328F8D160790128B0 +:1055C000F5D1069A20000EF002EBEFE7FFB58FB0A1 +:1055D0000020199DFFF708FF06000027032807D1C8 +:1055E000002D02D00F980121A8471B98076075E095 +:1055F00038216846E6F23CEB1C20704374490E905B +:1056000044181C212000E6F234EB764800900F98F5 +:10561000EBF719FC0EF08EEB002801D1019701E0A9 +:10562000714801900F9802960C9010ABE0601878CA +:10563000A0701199E170129961602776119908ABF9 +:1056400019728107890F59720107890F8006800F2F +:105650009972D872187B400840001873ECF7ABFFC2 +:10566000002809D108ABDE7A9A7A597A187A330081 +:10567000F8F704FD002804D008AB187B4008400070 +:1056800003E008AB187B0121084308AB187312989C +:105690007D23DB005843554908904018079018981F +:1056A000FB21584308AB0690187B494E0840202147 +:1056B0000843187325611A9860616846D9F73FF965 +:1056C000A0601B9908600E9803213154A06800283F +:1056D00007D1002D02D00F980121A847002013B058 +:1056E000F0BD0120FBE770B504000068002600282B +:1056F00001D1300070BDFFF777FE0500032814D0FC +:105700002068D9F78BFB04280ED120680621D9F731 +:10571000D2FA334920680968884205D11C216943BF +:105720002B4A012089180876012600202060E0E736 +:10573000F7B586B000250C0008982F000560487862 +:10574000097800020843224E25497ED0012818D04E +:10575000042815D10868002812D0FFF745FE07007D +:105760001F48FFF7C0FF0500032F03D01C2078431C +:10577000305CA0701C2078438019017E089801607D +:1057800079E017480068002832D0FFF72DFE032883 +:105790002ED01C23584361798719F878884227D185 +:1057A000B81C0122211D06F06EF9002820D1A01D91 +:1057B000E6F204EB7D21C900414309480068FFF788 +:1057C00031FE002857D1A01DE6F2F8EA78603AE0F1 +:1057D0001859000400A8008000A3008000A70080E2 +:1057E000680E0004D9430300E344030010270000BF +:1057F000A01DE6F2E4EA00281BD003002079002176 +:10580000009101910590264A0291039262790599CF +:105810000698FFF7DBFE050021480068002805D048 +:10582000FFF7E2FD1C235843305CA0700121A5E77F +:105830000BE0ECF75DFC002805D02079059061793C +:105840000022F8F742FB012515E00868002812D075 +:10585000FFF7CAFD03280ED01C254543E770A819A1 +:1058600081782171C17861714068A11DE6F2B6EAC4 +:10587000705DA070E7E7280009B0F0BD1C23584315 +:10588000084910B54018C068F7F70AFE0189064AB2 +:1058900009180A70120A4A70F7F779FE10BD000065 +:1058A000680E0004185900040D81000000290BD176 +:1058B0000B2A20D2401E0006000E0E281BD2190013 +:1058C0000B235843FF4B12E0012901D0022912D1CA +:1058D000112A10D2902801D1262003E0FA49085C51 +:1058E000272808D2190003011818F64B9A33C0185C +:1058F00081540120704700207047F0B50022012735 +:1059000087B0060005924DE0091F0491F078B17848 +:105910000002084304993500884245DC69782A78FA +:1059200009021143FF398A3934D10428384A84578F +:1059300001000000B4480300000400002BB30ADBA0 +:1059400032DDE879019069792A79080201991043DA +:10595000DFF77BF80290E978AA7808021043001F6D +:105960004008002403901CE0610048190690007A6A +:10597000102815D2401C0006000E002F009004D005 +:10598000F4F757F9F4F765F900270698009A437A77 +:1059900002990198FFF794FF002801D0012005909B +:1059A000641C03988442DFDBE878A978000208438E +:1059B0000499361D091A86190429AFD2059807B033 +:1059C000F0BDFFB581B00A9E0B9D002E02D10020D4 +:1059D00005B0F0BD04210400009148E0132C00D173 +:1059E0002624012D01D0022D04D1BB49200100192C +:1059F0009A3102E00B206043B7490A5CB72A00D312 +:105A00000225FF218A313170090A71702900301D89 +:105A10000023DFF748F8B04B220112199A33D71848 +:105A20000B236343AC4A00209A180399944610E074 +:105A300042009219012D117201D0022D01D17B1863 +:105A400001E063465B18491C09065B78090E401C9F +:105A50005372049A9142EBD300994000401800041D +:105A6000000C020AB070F270361D8619641C029890 +:105A70008442B3DB3000ABE7FEB50D00060000202A +:105A8000002E08802FD0002D2DD0002A07D0102AFC +:105A900005D0112A03D0122A01D0132A23D1D0060F +:105AA00014D5012710233900102A02D10020082420 +:105AB00011E0112A02D1082014240CE0122A02D18C +:105AC0001320182407E01820262404E000270A23C6 +:105AD000390038000E2401913A0021000096FFF7AA +:105AE00070FF002801D10020FEBD801B288001200E +:105AF000FEBD30B40D001400029A19000120012DE2 +:105B000003D10988200030BC01E7002D02D120001C +:105B100030BCB1E730BC704770B50024704D0C202C +:105B200060434019E6F254E901002000F4F72AF935 +:105B3000641C2406240E132CF1D3F4F786FA70BDEE +:105B4000FFB5012085B00024019013200090624829 +:105B50008538012B0BD00178059A914207D1417805 +:105B6000079A914203D18178069A914203D00E9A06 +:105B70000121116002E00E9900220A6006998170ED +:105B80000599017007994170D9F77BFD012806D16D +:105B9000601E012878D90C2C76D00D2C74D0079873 +:105BA000012802D1072C77D207E00798022802D0FB +:105BB0000798032801D10E2C6ED20698002807D131 +:105BC000072C05D1079A05990698DAF725FC059068 +:105BD000069905982200DEF79CFA060006990598BA +:105BE000DEF793FA0500864200DA2E000C203C49CD +:105BF0006043E431049040180390E6F2EAE80700BD +:105C0000A84201DA2F0002E0B74200DD3700344835 +:105C1000049908180290E6F2DCE8B84206D002992E +:105C20003800E6F2E6E80E98012101600398001DB5 +:105C3000E6F2CEE80700A84201DA2F0002E0B74200 +:105C400000DD37000298001DE6F2C2E8B84207D036 +:105C500002993800091DE6F2CCE80E980121016096 +:105C60000298E6F2B6E805000298001DE6F2B0E8F8 +:105C70002D1A03980830E6F2ACE8854200DA2800D5 +:105C800002990831E6F2B4E8641C00982406240E58 +:105C9000844201D278E7FFE7019809B0F0BDFEB574 +:105CA0000F00D9F7EBFC0406240ED9F7EAFC050037 +:105CB000D9F7EAFC060006F0C5FA02AA00920190A4 +:105CC0003B00320029002000FFF73AFF0400029851 +:105CD000002809D006E00000898E01C0903D040034 +:105CE00014D601C0FFF718FF019806F0AFFA2000A4 +:105CF000FEBDF8B50700FD490020FD4E0400087008 +:105D00000C206043851929001420E6F272E8291D51 +:105D10001420E6F26EE8290008310020E6F268E877 +:105D2000641C2406240E132CEAD300213800FFF74C +:105D3000B6FFF8BD70B50024250028001F60DEAA5C +:105D400001000000B04C0300000400007869D9B7DE +:105D5000F4F718F8844200DB20006D1C2D060400C7 +:105D60002D0E132DF3D3200070BDF3B581B00700C5 +:105D7000D9F78EFCE34E00240C206043851902986D +:105D8000291DE6F240E82900E6F23CE82900083146 +:105D90000020E6F238E8641C2406240E132CEBD312 +:105DA00000213800FFF785FFFEBD012181E7F3B533 +:105DB00083B0D9F76DFC0498002808D00498C17A04 +:105DC000827A08021043C0081328019001D90020EC +:105DD00008E60498001DE6F206E8C94A00210128F9 +:105DE000117074D100206CE002980499C00044182E +:105DF0000C34667860E0A079022804D12078310064 +:105E0000E1F218FC09E00128207803D13100E1F229 +:105E100021FC02E03100E1F239FC0500FF2848D006 +:105E20002800F3F79CFF0C214143B6480F180520CA +:105E300020563900E5F2E6EF04202056391DE5F240 +:105E4000E2EF3900032020560831E5F2DCEF2800AC +:105E5000F3F788FFFF2813D00C214143A9480F18FE +:105E6000052020563900E5F2CEEF04202056391DDA +:105E7000E5F2C8EF3900032020560831E5F2C2EF01 +:105E80002800F3F777FFFF2813D00C2141439D48EA +:105E90000D18052020562900E5F2B4EF0420205605 +:105EA000291DE5F2B0EF2900032020560831E5F264 +:105EB000AAEF761C3606360EA078B0429BD2029826 +:105EC000401C0199029088428ED317E0FFE78D4E67 +:105ED00000240C206043851929001420E5F292EF7C +:105EE000291D1420E5F28EEF290008310020E5F28B +:105EF0008AEF641C2406240E132CEAD3F3F794FED5 +:105F000003980021FFF7D5FE6CE5F1B582B0D9F713 +:105F1000C5FB0600D9F7BFFB02990090091D0120BF +:105F2000E5F270EF002001907548029C00780C3477 +:105F3000002801D0002500E001250098002805D1A7 +:105F40007149A800085C092850D007E00098012892 +:105F500004D16D49A800085C032844D0012E06D165 +:105F60006949A8004018C07800283CD109E0022EF9 +:105F700001D0032E05D16449A8004018C07802283A +:105F800031D0614AA900505C8A1820705178617044 +:105F90009378A370D378A371D278022A02D1E1F268 +:105FA00049FB06E0012A02D1E1F254FB01E0E1F2F3 +:105FB0006DFBF3F7D4FE0C2141435248E4380F182F +:105FC0003800E5F210EF6071381DE5F20CEF20713A +:105FD00038000830E5F206EFE07001980834401C04 +:105FE0000006000E01906D1C172DA6D30299FF200C +:105FF00055300872000A487201980299C000020ADE +:106000008872001DCA72FEBDF8B505000E001400AE +:10601000F5F791FB00280ED0F5F72BFB0D280AD1E0 +:10602000002E01D0012000E000202900F5F739FB07 +:10603000401C421000E00222132C00D305243348F8 +:10604000314F005D5C37401C01063048090E1330AB +:10605000005D401C0006000E012E01D0022E18D15A +:10606000902D01D1262505E0294B5D5D272D01D31B +:1060700020331D792B015D19264BEB18595C002844 +:1060800003D0185C814200DB01008D183819C07CF8 +:1060900019E06D1E2D062D0E0E2D00D306250A29A2 +:1060A00000D904210A2800D900200B235D43164B98 +:1060B0008233EB18595C002803D0185C814200DB66 +:1060C0000100385D8D18854200DB0500F5F7B9FA4F +:1060D000002802D00E2D00DD0E252800F8BD70B579 +:1060E00005000E00140000294BD1601E012803D9C1 +:1060F0000C2C01D00D2C11D10E2D0DD10C2070BD0A +:10610000F5170004F8D601C0078E01C0BA9101C08E +:10611000903D0400238F01C01020F0E7052C0BD820 +:10612000012D3BD0022D05D00B2D37D00E2DE5D003 +:10613000052CF1D10F20E2E72000F3F74AFE0028FA +:106140000CD1012D08D00B2D02D1062CD5624A2F7F +:1061500001000000AC50030000040000C7ACFC04C8 +:1061600026D103E00E2DD3D0062CEDD10D20D0E7A3 +:10617000092C09D00B2C07D00A2C05D0102C03D0E9 +:10618000112C01D0122C01D10B20C2E7082CBFD05A +:106190000F2CEBD1BCE7220031002800FFF73EFFB7 +:1061A0000E2805DA220031002800FFF737FFB0E79C +:1061B0000E20AEE7FE49884201D100207047012041 +:1061C000704770B505000C0006F050F869680600CD +:1061D000002907D12068286060686860207A2872EA +:1061E000607A0EE0207A627A80180BD02068C8604E +:1061F00060686860287A217A40182872687A617A23 +:106200004018687206F032F80100002020726072B7 +:1062100020606060080006F02DF8300006F02AF8D3 +:1062200070BD70B5040017D006F020F800230221DD +:10623000A360E04A21706360157811002039002DB9 +:1062400002D14C62E36002E04B6AE3604C62117879 +:10625000491C117006F00EF870BDF7B50D0017005F +:10626000D44E3078002824D006F000F831002039D0 +:106270004C6AE2684A623178491E317005F0FAFFD3 +:10628000A56027702889CC494019006F0122C38876 +:106290008B4205D103898B4202D143898B4202D0C4 +:1062A0008079C00700D062600098210000F02EFCC9 +:1062B0000120FEBDC14810B50168BF48814224D00D +:1062C00009F0E3FF00281ED0BD48016D00291AD156 +:1062D0000168002917D14168002914D1816800297B +:1062E0000ED001004031487B401C0006000E487370 +:1062F000897BFF2909D0E6F28EE9002905D102E069 +:10630000C068002801D1012010BD002010BDAC499B +:10631000012048607047AA490120C860704770B5E5 +:106320000600A74D00240CE0062060430622411918 +:106330001431300005F0C5FB002801D1012070BDEB +:10634000641CA86BA042EFD8002070BD9D497D2041 +:106350000001486370479A489B4970B55430086003 +:1063600099480C220121D0F752FA05F07FFF91499C +:1063700000250D7005F07EFF944E00242001801949 +:10638000FFF74FFF641C222CF8DB05F06FFF8C49F0 +:1063900080310D724D720D604D6005F06BFF05F0A0 +:1063A00065FF874974310D724D720D604D6005F0C7 +:1063B00061FF83484030057170BD10B505F056FF90 +:1063C0007F49002240310A7105F054FF10BDFEB52F +:1063D0000189466909180D6FAD1D2800FFF79FFF61 +:1063E000002859D17648724C012140300171666114 +:1063F000A173A02160182181754FF12178603200CE +:106400008900AC327118019200912B000922002101 +:10641000D8F2E8FA7968FF20C01C0871000A00224F +:1064200048710A704A70C878EF231840694B1B689E +:106430001B79DB07DB0E18431C23C870E01823818F +:1064400038600167217F5C48C908C900491C217771 +:106450002988814206D16988814203D1A988814275 +:1064600000D101220921300001F06BF839688870F1 +:106470002000DBF794FC00280FD0514CA06B0628BD +:106480000AD2062358430622001914302900E5F2E7 +:1064900072EBA06B401CA0630120FEBD70B5484E9E +:1064A00080363468002533E0A068018940184449EB +:1064B000006F4968801D002903D1FFF730FF0028D5 +:1064C00028D02078002803D1A068DBF768FC04E01E +:1064D000012802D1A06809F0F1F805F0C7FE346880 +:1064E000002C0FD0E1683160002900D17560E560B3 +:1064F0006168002903D0317A491E317202E0717A55 +:10650000491E717205F0B6FE2000FFF78AFE34685E +:10651000002CC9D170BD10B5E6F7FFFD10BDF3B575 +:10652000040081B000890719386F807800090428B9 +:1065300003D12948D6F70AF953E0D6F701FC002821 +:106540004CD001285CD11E4E00200090F06B00283A +:106550000BD01D4D0021286806F09FFF63FFE0C3AC +:1065600001000000A85403000004000094762F6886 +:10657000002804D1FFF79CFF286806F09FFF386FC2 +:106580001249C28801258A4205D102898A4202D174 +:1065900042898A4203D08079C00700D100250D4F7F +:1065A0004037387B002837D001284ED0022806D14A +:1065B0003800029A21003430FFF759FE009000980D +:1065C000FEBD000000E102C0FCD901C0FFFF0000D9 +:1065D00064060004401903C000A60080ACBE01C0E0 +:1065E000DCD701C090B301C0C0000004010200006C +:1065F0000298002803D12000DBF7DBFBE0E70298DC +:10660000012803D1200009F063F8D9E7FA480068AF +:1066100006F054FF0020D3E7F848029A2100FFF764 +:1066200026FE0090F06B00280BD0F54C002120686E +:1066300006F03DFF002804D1FFF73AFF206806F07E +:106640003DFF002DBBD1012009E0029A002D08D0AA +:10665000EA4821000C38FFF70AFE00900220387348 +:10666000ADE7E6482100FFF702FE0090F06B00283E +:10667000A5D0E34C0021206806F019FF00289ED128 +:10668000FFF716FF206806F019FF98E710B5E6F748 +:106690004EFD00280CD1DB484068EF214068C278ED +:1066A0000A40D64940390978C907C90E0A43C27061 +:1066B00010BDD24940390870704710B50400E6F7A4 +:1066C0003BFD002802D0CD484038448010BD10B5B5 +:1066D000E6F732FD002802D0C8484038408810BD97 +:1066E000C94870B50078002807D1C8480022006862 +:1066F0000821D3F2BCFE002805D00120D5F79EFF6B +:106700000120D0F741F8BC4C00212068C94306F0B5 +:10671000CEFEBA48017A407A081805D1B7480C383D +:10672000017A407A081806D0B449B4480C39FFF70A +:1067300052FDFFF7BDFE206806F0C0FE042404E011 +:10674000641E4FD30120D0F71FF8B148D2F28BFB63 +:106750000500AF480821D2F215FB0600AC48102115 +:10676000D2F210FB30188542EAD1AA48D2F27BFB64 +:106770000500A8480821D2F205FB0600A548102113 +:10678000D2F200FB30188542DAD1A348D2F26BFB7B +:106790000500A1480821D2F2F5FA06009E48102112 +:1067A000D2F2F0FA30188542CAD19C48D2F25BFB93 +:1067B00005009A480821D2F2E5FA06009748102110 +:1067C000D2F2E0FA30188542BAD1D6F7D2FD0028CD +:1067D00008D0934E3069934D4001800E0A2410E09A +:1067E000641E01D2002070BD2868642105F038EADB +:1067F0008905800A084301D00DF0BCE830694001EA +:10680000800E002801D00128EAD1012070BD10B50A +:1068100004000868801C08D0012806D1FFF7A5FDF8 +:10682000210010312000D3F2A4FF002010BD10B5CC +:106830000A68921C0BD0012A06D0022A09D1010055 +:106840002831D3F296FF02E00020D6F786FA002026 +:1068500010BD080010BD10B50A6804000800921CA5 +:1068600019D066498039012A0BD0032A15D0082A8D +:1068700012D101200861210028312000D3F279FFD4 +:1068800009E0002401200C61D6F767FA5B48403824 +:10689000042144738173002010BD6348D5F760FF65 +:1068A00003F02DFFFFF71CFF21001031E5E770B565 +:1068B0000A68921C25D0012A04D0042A1DD0072A78 +:1068C00021D11EE04D4C0025803C2069002802D0DB +:1068D0002561FFF74AFD4A4E00213068C94306F0A2 +:1068E000E6FDE563306806F0E9FD4F48D5F75CFF4B +:1068F00025606560A560E56003E001003431D3F2F6 +:1069000038FF002070BD080070BDF8B50400080015 +:106910000A68921C43D0012A0BD0052A41D0072ACD +:106920003ED1E6F791FD210028312000D3F221FF6E +:1069300035E0324D0026803D3400AE6306206043D2 +:10694000062140191430E5F2E6E9641C062CF5DB5B +:106950002B4C00212068C94306F0A9FD2749274890 +:106960000C39FFF738FC254901274A7A23581F6B59 +:1069700001000000A45803000004000060195ADC64 +:1069800008004038002A01D0077300E006732C4E3F +:106990000868306008E08068FFF72DFD002800D00F +:1069A0002F603068C06830600028F4D1206806F09D +:1069B0008FFD0020F8BD2148D5F7DCFE21004031D5 +:1069C000BDE710B50A6804000800921C1CD0012A1B +:1069D0000BD0062A01D0072A17D1E6F73FFD210088 +:1069E00028312000D3F2CFFE0EE00A4C00212068AF +:1069F000C94306F066FDFFF765FD054901208039B2 +:106A0000C863206806F064FD002010BDAC020004DD +:106A1000C01903C0ACBE01C000A00080041800046F +:106A20000000000474190004B8190004AC1A000432 +:106A3000481A000480A80080A0B701C0010200002D +:106A4000E09101C010B50C00E6F77BFB0028DCD11B +:106A5000534800222100D3F277FED6E7514900289F +:106A600010B50CD00120886008004030807BFF28E2 +:106A7000CBD10121490500200DF0A2E8C5E7002097 +:106A80008860C2E7464810B5016840308142BCD1F9 +:106A9000FFF724FC0028B8D1E6F7E0FC1320E6F766 +:106AA00013FCB2E70121C903002010B50DF088E8FE +:106AB000ABE70121C6E7F8B505F0ECFB0090D9F291 +:106AC000FCFA06000C00D9F20CFB07000D00E8F7F9 +:106AD0005CFE002180196141C01BA94103D329003C +:106AE000B81BA14106D2E8F750FE02002100300099 +:106AF000D9F202FBE8F74CFE2B498969884203D0A2 +:106B0000E8F746FED9F230FC009805F0C7FBF8BD67 +:106B100010B50400FFF7CFFF22484030408800281E +:106B200003D000212000FFF78DFF6EE71D494031A3 +:106B30008873704770B504000D0005F0ABFB626808 +:106B40000021002A0FD1E96025606560696800298D +:106B500003D0217A491C217202E0617A491C6172DA +:106B600005F09CFB70BD6A68002A04D1E960616889 +:106B7000CD606560F1E70023267A21681A0002E003 +:106B80000B00C968521C9642FADC002BE96001D167 +:106B90002560DEE70029DD60DBD16560D9E7000014 +:106BA00004DA01C0401903C000A6008070B5D9F214 +:106BB00084FA04000D00E8F7E8FD02000023290034 +:106BC0002000E4F2CAEDF8487D21C069C9005118DF +:106BD000884201D9012070BD002070BDF0B587B09A +:106BE000E8F7D3FD050005F055FB0600D9F265FA7C +:106BF00000232A0005910490E4F2AEEDAF1A0122C1 +:106C0000022102A8D4F2DDF80400300005F046FBB2 +:106C1000E54880380668FF365A36002C0CD0BC4256 +:106C20000AD2A019D4F213F9002803D00420E6F701 +:106C300012FE1AE0200000E03800049A059B80183C +:106C4000D94A00215941516110610120E6F703FE44 +:106C50000122D548009231047D22090C2B00D2007C +:106C60001030DAF791FA002800D0012007B0F0BD0B +:106C700010B50A68921C05D0012A03D10100103119 +:106C8000D3F281FD002010BDF8B5040008002500F6 +:106C90000968803526002F6A1036362937D012DC75 +:106CA000891C26D0012915D0032924D0372921D1C8 +:106CB00005213800FFF7C6FE210058316E62200022 +:106CC000D3F261FD15E0372913D0382911D03929C5 +:106CD00010D10EE00120E6F78DFE0020D6F70AFB6A +:106CE0000020FFF7F0FC0020E6F7B5FD0620FAF7DC +:106CF00099FF0020F8BD0120D6F7FCFA0120FFF72C +:106D0000E2FC38000CF0ACEF21004031D7E7052160 +:106D10003800FFF797FE210064316E62CFE770B54F +:106D2000040008000268A0210D59362A25D008DC8D +:106D3000921C22D0012A0BD0042A12D0372A1DD14E +:106D40001BE0372A19D0382A17D0392A16D114E077 +:106D50000020E6F74FFE0520FAF764FF03F0BEFCC3 +:106D60000BE0DAF783F8DAF7D3FB28000CF078EFC2 +:106D7000210010312000D3F206FD00209BAD6025DC +:106D800001000000A05C03000004000033C389B0D0 +:106D900070BDFEB50400250008008035296A220078 +:106DA000009101682600703240360A29019248D0CD +:106DB00026DC891C62D0012934D00B295FD10198CF +:106DC000D0F28AFF7E4D28680827B8432860FFF775 +:106DD0009BFC002810D0FFF7F3FE00280CD0009891 +:106DE000DCF7E6FA002807D1764800220068462141 +:106DF000D3F251FB002843D028683843286020E0B4 +:106E0000352944D036293AD10198D0F265FF00984F +:106E10000521FFF721FE210064316E622000D3F2CC +:106E2000BCFC2BE00027D6F7B8FA002800D10127D8 +:106E300006F0DCFA002802D1E869002801D0002F12 +:106E400004D00120E6F711FD3100E7E706F0CEFAA5 +:106E5000002803D00920E6F75DFA0FE00121009831 +:106E600049030CF0B8EE0198D0F236FF01980022E9 +:106E70000421D0F2E3FE0198D0F2D0FE0020FEBD46 +:106E800000980421FFF7E8FD21003431C6E701989E +:106E9000D0F222FF00980521FFF7DEFD21005831D6 +:106EA0006E62BBE770B504000A6825000800403533 +:106EB000032A0AD00BDC921C14D0012A13D1D9F773 +:106EC000DFFFFFF795FE00280CD1290007E0210025 +:106ED0008031352A08D0362A05D14D621C39200070 +:106EE000D3F25BFC002070BD4D6221005831F6E703 +:106EF000F8B50400250008008035296A0091016872 +:106F00002600314F2836142945D00ADC891C3FD091 +:106F100001291AD0152917D1387A002813D1310048 +:106F20000EE015293BD026004036352952D03629AF +:106F30000AD100980521FFF78FFD210064316E62B0 +:106F40002000D3F22AFC0020F8BD0220D9F746FF2A +:106F50000020E861E6F785FC022808D00098DCF7FD +:106F600027FA002803D106F041FA002805D10120B4 +:106F70000103E86100980CF02EEE0098DCF718FA97 +:106F80000028E0D001210098C9060CF024EEDAE7D1 +:106F9000E6F76EFAD7E70120D5F764FBD3E705F0F3 +:106FA00083F90500387A002802D1386900280DD00D +:106FB000E6F766FA280005F07BF9C4E7E03700043D +:106FC00000A3008000000004D42C0004280005F079 +:106FD0006FF9A4E700980521FFF73EFD2100583125 +:106FE0006E62ADE710B504000A688034236A921C13 +:106FF0000FD0012A05D0032A05D0042A0ED1103063 +:1070000002E0012006E04030606218000CF032EE31 +:1070100002E00020E6F7FEFC002010BD080010BDD5 +:1070200070B5060004002F480A68006A0025803405 +:107030000A2A26D006DC921C1DD0012A16D00B2A63 +:107040001FD020E0372A01D0392A1CD1002803D1D3 +:107050003000A830D5F795FC0120E6F706FCE6F7EE +:1070600015FA616A3000D3F298FB0AE0002802D1D9 +:10707000D5F721FCA0621C4807220068402106F0D9 +:1070800026FA280070BD0D00FBE710B50A68030062 +:10709000002480330A2A17D006DC921C0ED0012A65 +:1070A0000CD00B2A10D007E0372A01D0392A03D19F +:1070B000596AD3F272FB07E00C0005E00A48072288 +:1070C0000068402106F003FA200010BD10B503F05F +:1070D0001CFB10BD054910B508001038D3F24DFB5C +:1070E00010BD0000184200047C0500047C59000417 +:1070F00010B50C00E8F7A3FD2000E7F7CAFB10BDB0 +:1071000070B505000C000800E0F202FDA07DF2F76A +:1071100061FE06002068006F8079C00703D121005E +:107120002800F4F752FA300070BDFEB5FF30FF3092 +:107130000027801C0197C56D846DFD480E0020401E +:1071400000906000390040087940784008432BD116 +:107150006900E00F0843810A020D114301438F05C6 +:107160000022BF0DD243B8180021002351413840FE +:1071700019005940584008433CD101203C27019058 +:107180003A0000210120E4F2DEEA00235274FD26D9 +:10719000010000009C600300000400001B520C0D65 +:1071A0002040294059405840084301D037702BE017 +:1071B0007F1E3F063F0E1F2FECD225E000982900CE +:1071C0007940084320D000980022D243801829003B +:1071D000009B5141294018407940084314D10120B7 +:1071E0000190380037701E273A0000210120E4F298 +:1071F000B4EA002320402940594058400843D5D1E3 +:107200007F1E3F063F0EEFD10198FEBD10B5040072 +:10721000F6F790FF022801D0002000E00520207042 +:10722000012010BDF7B584B00500012002900020B8 +:107230000E00040006980F218901401803902200D7 +:1072400000210120E4F288EA070000230191284090 +:10725000314059405840084300D002942000E5F2E4 +:10726000E7FE410803980069FF302130808B81429E +:1072700002D20199BD438E43641C2406240E3C2C8B +:10728000DDD90023310028005940584008430AD175 +:10729000029A00210120E4F260EA054306980E43B9 +:1072A0000299203001752800310007B0F0BD0200BE +:1072B000002001000C2A10B50ED8A349D0004118B7 +:1072C0000CC9A1497031401812C84808E4070443AA +:1072D000C80710432100194310BDF8B50700D6F7C1 +:1072E000A6FC04003800F0F707FB002835D07879B9 +:1072F0000025022816D1380009F0CDFD02000068F3 +:1073000025210901411810322800002C24D0803298 +:107310008978527989079207890F920F914218D381 +:10732000110016E03879062817D03800E9F705FF74 +:1073300006003800F0F776FB02002800002C0BD086 +:107340004036317992788907890F531C994200D3CE +:10735000511C002900D00120F8BD2000F8BDF8B56F +:107360000600FF30FF30801C056D446D7079774F4B +:1073700002283CD1300009F067FD00903000FFF793 +:10738000ACFF002802D172483D400AE03000F0F71F +:10739000B3FA002804D03000F0F709FC002801D12E +:1073A0006C480440300009F076FD070010373000CB +:1073B000F0F7A2FA00280AD080377879092240062F +:1073C000410F009892018018807C4006400FCCF756 +:1073D000F0FC002805D060480078FFF768FF054002 +:1073E0000C40320021002800FFF71CFFF8BD5B486D +:1073F000016840680D4004403000FFF76EFF002830 +:1074000002D153483D400AE03000F0F775FA0028F9 +:1074100004D03000F0F7CBFB002801D14D480440E8 +:107420003000F0F769FA002813D03079062810D020 +:107430003000E9F782FE07003000F0F709FC403722 +:107440003979401E4906490F884202D83000F0F7CA +:10745000FFFB4348E4F2F8EC0028BCD04148640F3D +:1074600005406D006D086407B5E7F8B50400092014 +:107470008001251801272000FFF771FF627926009F +:107480003436022A02D1E961A86116E0364A0023A7 +:1074900003C2E961A86159405840084304D1300053 +:1074A000FFF7B4FE0020F8BD31002000FFF747FED3 +:1074B000002802D1FE20203420753800F8BDC11DFF +:1074C000FF31FA314B650A65CFE78261C3614362E0 +:1074D000026270471C492039085C704709229201FA +:1074E00082180323526B1B02002901D180180BE084 +:1074F000511813225201821812788A4200DA1100C0 +:10750000002900DA00214018C018007B704710B530 +:10751000FFF725FF002359405840084301D10120BF +:1075200010BD002010BD020010B5407902282AD0FD +:107530000E480088002826D00348E030405CFE2832 +:1075400024D115E0FFFF7F80B0340400FFFF3F80AF +:10755000FF0100E0FFFF07E00019000440190004EC +:10756000E2E800041F2000804819000412190004FA +:107570000B00E4F244ED0E0808080808080C0C0C97 +:1075800008080808080C1000DAF702FE10BD0020F9 +:1075900010BD002A10B502D0DAF7FAFDC9A613C64D +:1075A0000100000098640300000400004888DF61C7 +:1075B00010BDFFF7C2FF10BD01230E2810B511D377 +:1075C000152803D800240E380C7009E00124162871 +:1075D00002D120200C7003E01E2803D817380C704D +:1075E000107000E00023180010BD70B50500080001 +:1075F0000C000E38102804D82800D7F70DF9002801 +:1076000007D11F3C1D2C06D82800F0F7B8FA002837 +:1076100001D0012070BD002070BD0A001F3A1D2A54 +:1076200010B502D8F0F7C9F910BDD6F7E0FA10BDD1 +:107630008078052801D302207047032801D3012058 +:10764000704700207047010049780078032900D274 +:10765000FF20704701697D22D200914201D20A3198 +:107660000161704701004A69C96980688A4201D98D +:10767000511A0818704710B503785B065B0E0E2B85 +:107680000AD3C4694369A34206D91B1B0B608069F6 +:10769000834201D9181A106010BDFEB50D00060016 +:1076A000007814004006400E0290002001900090E7 +:1076B00004F00EFE070030006A4601A9FFF7DBFF69 +:1076C000B068019940180190F06800994018009046 +:1076D000380004F001FE0199002958D00098642375 +:1076E0005843E4F2CAEF28603220002C04D10298FB +:1076F0000022FF21DBF2F8FD019988420BD81E2001 +:10770000002C04D102980022FF21DBF2D9FD296868 +:1077100088423AD815E02020002C04D1029800229B +:10772000FF21DBF2E8FD019988420CD84B20002CA8 +:1077300004D102980022FF21DBF2C8FD29688842AB +:1077400025D80020FEBD1021002C05D10298002272 +:10775000FF21DBF2D7FD0100019A6420914207D896 +:10776000002CEBD102980022FF21DBF2B6FDE5E709 +:1077700031697D22D200914209D3002CC7D10298F1 +:107780000022FF21DBF2A9FDC1E70120FEBD02209E +:10779000FEBD70B5040015001A002030FFF748FF49 +:1077A0000028287003D064200860002070BD2000ED +:1077B000FFF773FF70BD0000F8B50400D7F72CF891 +:1077C000002800D0012000902000F0F7D8F9002810 +:1077D00001D0012600E00026032000022018806866 +:1077E0000023826841680125AD05D8000C58A70721 +:1077F000BF0F022F02D1AC43B70504E0012F06D121 +:10780000009FAC43BF057F027F0A3C4300E0AC43CE +:107810000C501458A707BF0F022F02D1AC43B70575 +:1078200004E0012F06D1009FAC43BF057F027F0A11 +:107830003C4300E0AC435B1C082B1450D5D3F8BD8F +:10784000042803D2C3490870002070470120704704 +:10785000C1490E28096801D2C04A105C800008584E +:107860007047F7B584B004F033FD029006981321F9 +:10787000C0300390806849018568446804984018C6 +:10788000467E0598FFF7E4FF416800270A03120FC0 +:107890000F2A1DD0002E0AD0026840231A4322600E +:1078A0000F22120491439A028918012761600699F8 +:1078B000CA69896900910821C91B01920A06F90069 +:1078C0000B190100120E1800DFF266FE381810E0E6 +:1078D00000686160002E206002D0402108432060D3 +:1078E0000120C10009190A00803AD36F926F401C31 +:1078F0000CC10828F5DB0598994980000958002734 +:1079000048680203120F0F2A29D0002E0AD00A68F5 +:1079100040231A432A600F22120490439A028018CF +:10792000012768600698C269806900900320C01B27 +:1079300001920206F800120E4019DFF22DFE3918EE +:107940000398C900007B4919820085488058026865 +:1079500040680A600F2212041043486008E009687A +:107960002960002E686003D0206840210843206011 +:107970000498FFF721FF7B494869012210434861C1 +:10798000029804F0A9FC07B0F0BD70B50500714E77 +:1079900014007078824201D1002915D0704821006E +:1079A00028387470DFF2F2FE32786F48185B83A9D2 +:1079B000010000009468030000040000BCE7AAD5A1 +:1079C0002100DFF2C9FE0920800128180400E0F23E +:1079D00067FA010022002800FFF74DFF70BD70B567 +:1079E0000500614E1400B078824201D1002916D002 +:1079F0006349220008008830B470DFF2E3FE327879 +:107A00005E482100DFF2F5FE0920800128180400FD +:107A1000E0F246FA010022002800FFF72CFF70BDBB +:107A200010B50400D6F7C2F8020001212000FFF7CC +:107A3000D6FF5448012100798006C20F2000FFF7CD +:107A4000AEFF10BD02002032537E002B06D012780C +:107A5000CC30105C884201D1012070470020704773 +:107A6000464A444B10B5DFF2ECFE10BD4279002AC5 +:107A700000D1FEE70322120280188068002901D09D +:107A800040687047806870473A4B3A4900200322AB +:107A900030B5283B141AE4008500E418401C032884 +:107AA0004C51F7D9334A0B6105200C23703A1C1A4C +:107AB000E4008500A418401C0C284C51F7D9304B29 +:107AC0004A630E2016228833141AE4008500E41855 +:107AD000401C15284C51F7D9294B17201F22141A86 +:107AE000E4008500E418401C1E284C51F7D92448B6 +:107AF000254B483088651F202822141AE400850091 +:107B0000E418401C27284C51F7D91F4B292032225A +:107B10008833141AE4008500E418401C32284C51C4 +:107B2000F7D9174B33203C22883B141AE400850018 +:107B3000E418401C3C284C51F7D90F2400202404A1 +:107B400001256D0482008A58401C53680006A34337 +:107B50005B19000E3C285360F4D930BD0B4907482F +:107B600010B5E4F2E0E810BD1A1B0004A8F9000407 +:107B70009E350400ACB601C080A1008084E902C03B +:107B800034B501C0C4E800049CB301C0B8080000CB +:107B9000FFB583B052230D001700642201A902A88B +:107BA000DBF717F900282AD00198290A04001034BD +:107BB000257041740C99002606221230E4F216E872 +:107BC0000D980825002806D002263200601906A963 +:107BD000E4F20CE80A25002F09D0A019069A083013 +:107BE0003900E4F204E80698281805042D0C0198E1 +:107BF000290A8572C17202990398DBF7B5F807B0BC +:107C0000F0BD1FB582B0002200930192022304AAA6 +:107C1000FFF7BEFF06B010BD2349002058224243A3 +:107C20005218926B002A05D158235843012240185C +:107C300082637047401C0006000E0228EED300202D +:107C400070470100100010B5E9F7B1FF040018D02B +:107C5000FFF7E2FF01000F2080012018816200225F +:107C600040310A80816A0A2340318A80816A40312A +:107C70004B80816A8A64816ACA64806A3C21C187B8 +:107C8000200010BD3EB509A104002CC968462CC0D7 +:107C900006D00A222000694603F04FFF002801D0D9 +:107CA000FF203EBDA07A3EBD14E80004AAAA03004E +:107CB0000000890D020C0000F7B588B00500170020 +:107CC00009F0ECF909990F26B6018C19002801D0AA +:107CD000A8190FE02069FF302130807F012813D9D7 +:107CE000E9790620E8F7FFFE0CE0811949690029CF +:107CF00004D08019406960610BB0F0BDEA790621BB +:107D0000EAF7E8F90028F0D109980121EDF734F9F4 +:107D10001C2101A8E4F206E801A8E3F233FB38785D +:107D20006B46002501AE1873A8008019807A4006C2 +:107D3000800FE5F2A8F901000998EDF7E5F86D1C50 +:107D40002D062D0E042DEFD362690998521C01A94E +:107D5000EDF71BFA002806D0FB4960691A2240188B +:107D600001A9E3F244EF012209981100EDF74AFC62 +:107D7000C2E7FFB58FB0040000200D001E000829E7 +:107D80000590039024D304F0ADFA2100083102904D +:107D900009913100A27920318A76E279CA763D31A3 +:107DA0000D9117390C910F21083D89012804741891 +:107DB000000C310040310B9141E0099D92FD434B95 +:107DC00001000000906C030000040000EF3D79B951 +:107DD000001FE978AA7800040F02000C17438742BD +:107DE0000A9002D9002013B0F0BD6878297800020B +:107DF0000843BF2871D00CDC2E286FD004DC01288A +:107E00007AD02D281DD197E0302869D03D2818D18F +:107E1000B6E0FF224B32811A90427AD061DCC02852 +:107E200078D0C5280DD11121A8884901751868821C +:107E300001213000DCF711FF288211213000EAF720 +:107E4000BFFF0A980999C01B0004000CC919091D3D +:107E500009910428BBD2A06A0F27017EBF012D29FA +:107E600010D12030017D00290CD12E210175A06A8E +:107E700001212030417500200890A06A08AB1978D4 +:107E8000203081753000EFF755FD002873D003983E +:107E9000002821D03000D5F719FE07003000EFF799 +:107EA000DFFD05008078002806D0002F04D0B068E0 +:107EB000012189030843B0601198EFF73BFD0028CA +:107EC00004D01198EFF73AFD002805D12A003900B7 +:107ED00030000023F6F7C2F8D3E069E01BE00BE0C6 +:107EE0005CE0012948D07829ABD1A06A29792030FB +:107EF00081776979C177A4E70E200E2F00D2380070 +:107F000002060B98120E02750C98291DE3F278EE0A +:107F100097E70DE068E0A06A2E2120300175A06A85 +:107F2000012120304175A06A29792030817588E7C8 +:107F30001A20A8700020E870A16A2D200876E87841 +:107F4000A97800020843A16A3A004876A06A291D70 +:107F50001A30E3F256EEB06880218843A16A8A7E27 +:107F60009207D20FD2011043602210431831B06043 +:107F70000D981C22CAE744E03D202870002068705C +:107F8000A16A3D200870E878A97800020843A16A38 +:107F90003A004870A06A801C291DB7E7B068042128 +:107FA0000843B060297EC909A5D00121C90318E0A2 +:107FB00030007930BF210590017005980C22427085 +:107FC0000598291D801CE3F21CEE04A8DCF742F999 +:107FD0006B46187C8007800F01288CD1B068012186 +:107FE00049030843B0602CE73000EFF739FDC021AA +:107FF000039001700398052242700398291D801C8C +:1080000084E71198D5F77EFE0425ED43002815D0AE +:108010001198D5F75BFDC078FB234007C00F8200A5 +:10802000A06AC17819401143C170A06A827E92078C +:10803000D20F92002A431140C17022E0A16A8A7EC9 +:10804000C8789207D20F92002A431040C8704107A7 +:1080500017D5800715D01198CF22C1190869407B28 +:1080600001901040A26AD2789207920E1043F32238 +:1080700010400830019008690022017B0198F5F753 +:1080800088FF0B98017D002930D0B068002280065F +:1080900000D50D9A009200220C981300DDF2F4F83E +:1080A000069030000791EFF745FC002806D00598B0 +:1080B000002803D0059806A9F6F726F9079B069A2B +:1080C0003000F6F763F80690019100900B98079145 +:1080D000027D0C993000F6F785F83000F3F7F7FAD7 +:1080E0003000F3F789FA3000F3F75DFAA06A203028 +:1080F000007D00280AD001213000EAF73CFAA26A8C +:10810000119836323100FFF7E1FD03E00021300025 +:10811000EAF731FAA06A403041888180029804F081 +:10812000EFF801205FE6582110B5E3F206EE10BD2E +:10813000F7B582B000250C002F000126022A07D3D4 +:10814000921E1004000C049002980079002807D0B9 +:10815000300AA670E070012005B0F0BDA103000058 +:10816000201D08F00DFF61782278090211430422D6 +:10817000002940D0012906D0022942D100282DD162 +:10818000100AA27034E002990F2292018E18316910 +:10819000FF312131897F022903D10220A070000A1A +:1081A00026E0002801D00320F8E7002200210192F8 +:1081B0000298221D0B000097FFF74DFD002801D10A +:1081C0000520EBE73169FF3121318A7F4CAE85CC48 +:1081D000010000008C7003000004000050F85C0AED +:1081E000521C8A778168012212031143816010E0DA +:1081F0000300029A0499201DFFF7CFFD002808D143 +:10820000300AA6700125E07003E00028C2D0E9F72B +:1082100023FE2800AAE70620CAE770B500260498C6 +:10822000189DC1070F2080012C18A06A199A4030B0 +:10823000002905D10680A06A40304188818070BD48 +:10824000002A01D001218180A06A40300188491CA8 +:108250000904090C0A290180F1D3E9790020E8F723 +:1082600056FCA16A192240318E8003496B18032104 +:10827000FFF7DBFC70BD00002902000070B54288EA +:108280008A4202DD0021415E26E0C2898A4209DA83 +:108290000C240823045FC35E4589E01A891A484309 +:1082A000511B16E0002293001B185C888C4202DCF4 +:1082B000DB888B4202DA521C032AF4DB940022187A +:1082C0000423D35ED588045F5288181B891A48435B +:1082D000A91AE3F202EE21180804001470BDFFB5DC +:1082E000002081B00024250000900198FC49800006 +:1082F000411802988700CE195042002A00DB100076 +:10830000F8498968884201D9012000900198F1F765 +:1083100093FD0E283BDB32780498711C5054307862 +:10832000401C0006000E0328307001D10020307080 +:108330007119012008566D1C001904042D04241421 +:108340002D0C032DF4D3019814214143E448142348 +:10835000583008180299624259434018002C447260 +:1083600000DB2200DF49019DCC68DE4B0121A940E2 +:108370001033A242DA590DD814000C4201D1012465 +:1083800000940A43DA51417B102211434173009853 +:1083900005B0F0BD8A43DA51417BEF221140F5E789 +:1083A000FFB5002085B01400019006990598D7F715 +:1083B00010FB039006990598D7F7FEFA4006411680 +:1083C000039814234718069814214143C448583091 +:1083D0000818059959434518AF710398381AE87180 +:1083E0000F980128687B02D10821084301E0F7219A +:1083F000084068730C213800E3F26EED0600069920 +:108400000598D7F7EAFA00070017287338180419F7 +:108410000898844201DD089C03E00E98844200DA4B +:108420000E9C0C212000E3F258ED0100864202D19F +:10843000260000201EE0B14204DD0C207043201A0B +:108440000B3802E00C207043201AA54A4C32925D92 +:108450001218921C042AEBD80722D2439042E7DB81 +:108460000728E5DCB14202DA0C235E4302E00C236C +:108470005E430B360290AE730398301A3F2801DD3D +:108480003F2004E03F21C943884200DA0800020689 +:10849000E87306990598120ED7F723F80298069903 +:1084A0000207120F05980492D6F7F0FF049828747B +:1084B0000F9800280FD005990698F1F7C2FB021B10 +:1084C000EA7405990698F31BFFF709FF002802D00C +:1084D00001200190AC74019809B0F0BDF0B599B0DD +:1084E00080484088002803D07E480078002801D0CA +:1084F00000297ED003F00AFF069000200790D7F7EE +:1085000021F90400D7F724F90500D7F71EF9220056 +:108510002900F0F76EFB08900BA8D7F71EFA01258B +:10852000D7F713F9012806D1681E012872D90C2D3E +:1085300070D00D2DFCD0D7F70BF9012801D1072DF4 +:1085400069DAD7F705F9022803D0D7F701F903282C +:1085500001D10E2DF4DA01200899A84008401890A6 +:1085600068000BA947182906090E179114215C48C9 +:108570006943002658300818169014207043169A44 +:1085800017991418617016990E541898002800D085 +:108590000120099070001590385A179A3100D7F7CA +:1085A00083FA0028607B01D001210EE040084000E2 +:1085B00060731598385A6080099A17993000D7F778 +:1085C00059FA0028607B03D102210843607380E0E0 +:1085D000FD2108406073607C401C607417866365F1 +:1085E00001000000887403000004000003228F666D +:1085F0001798F1F7B4FC0590D7F7B1F801900598FA +:108600000006000E00E086E002901798F1F745FCA6 +:1086100003901798F1F733FC0490F3F776F80028ED +:1086200004D03548F43003E068E06BE032481430A1 +:108630000499032902D1029909010EE00199002948 +:1086400000D00121039A4B0059188918029A490059 +:108650008918891C8906090E890008181599795A04 +:10866000FFF716FE0A903000D7F727F90100608166 +:108670000A984018010409140A91A1801798F1F78B +:10868000E5FB0001C117090F0918091121720A99A8 +:10869000401A0321002800DC891F0818C117490F60 +:1086A0000818154940038988001400291BD0099A2D +:1086B0000021019202000091179930007F23FFF7FB +:1086C00079FE0100079AA94011430791617BFB22C3 +:1086D0001140C207520F1143020661731799120E1F +:1086E0003000D7F7B5F9761C3606360E012E05D2C6 +:1086F0004DE70000305A0004701400046D1C132D67 +:1087000000DA17E70798002802D00798F1F724FA53 +:10871000069803F009FE19B0F0BD70B50025164C9F +:108720000028618807D0002904D114480BF0E2EB3F +:108730000120608070BD0029FCD010480BF0DEEBFA +:10874000002060800024002221002800D6F7D3FEFC +:10875000002221002800D6F7A3FE641C2406240E64 +:10876000142CF0D32800D7F75EF96D1C2D062D0EC2 +:10877000012DE7D370BD000070140004897303005D +:10878000704700207047000038B58AA10968009141 +:1087900000240422694603F0EEF9002800D10724E2 +:1087A000200038BD7CB50024050083A0006801903E +:1087B00082A00068009004222800694603F0DBF9DB +:1087C000002801D1092407E00422280001A903F0B0 +:1087D000D2F9002800D1082420007CBD38B578A14A +:1087E0000968009100240422694603F0C4F90028B6 +:1087F00000D10424200038BD38B572A10968009169 +:1088000000240422694603F0B6F9002800D10124AF +:10881000200038BD70B504000E0015007021100056 +:10882000E3F29EEA42E06078801CB04240DC2078AF +:10883000442818D009DC202819D0252811D0282850 +:1088400013D0292815D1EC642BE0BF2805D0C0280F +:1088500005D0C7280DD1EC6623E06C6621E0AC663C +:108860001FE0AC641DE0EC651BE02C6519E06C6555 +:1088700017E029002000E1F2F1F8002811D120785A +:10888000DD280ED1A01CFFF7A9FF002800D0AC65A1 +:108890002078DD2805D1A01CFFF776FF002800D046 +:1088A0002C666078A41C361AB61E0419002EBAD1A4 +:1088B000300070BDF8B5040001200E0000901500D6 +:1088C00050211000E3F24CEA3FE067782078B91CB1 +:1088D0008E4202DA002000903AE0BF2811D006DC78 +:1088E00020280CD0332808D036282AD00DE0C02804 +:1088F00009D0C72809D1EC6423E0EC6021E02C61A9 +:108900001FE06C641DE0AC641BE029002000E1F274 +:1089100017F9002815D1686B002802D0286B0028B1 +:108920000FD1A01CFFF73EFF082812D0092808D15C +:10893000286B002805D13D20207118206071201D72 +:108940002863F61BB61EE419A41C002EBDD10098A6 +:10895000F8BD686B0028F4D12D2020711C206071B7 +:10896000201D6863EDE77CB5060000200D000400C3 +:1089700000290190009000D17CBD2800E6F760FE40 +:10898000112040013018418A280001AA6B46E1F20B +:108990003AF900280BD00198002800D00A48009925 +:1089A000002902D0084CE41F00E00024044320000A +:1089B0007CBD0000506F9A0900904C3300904C34FD +:1089C0000050F204506F9A1209800000704710B5F1 +:1089D00004007121474800220901E3F2ADFE00289E +:1089E00002D01C214461018110BD0189EC8E243626 +:1089F000010000008478030000040000F74DFAD263 +:108A0000A43008187047FFB581B00F0001980189A4 +:108A100046690D182C00843484212800E3F2AAE969 +:108A20002C67049820802800603030210090417726 +:108A30001E21A01CE3F2C8E9A078F3210840083009 +:108A400001070398090F000101430F208001A17065 +:108A5000301839780279914213D17978427991426C +:108A60000FD1B978827991420BD1F978C2799142CC +:108A700007D13979027A914203D17979407A8142DA +:108A80000CD0E078012108433100E0700622AC31BF +:108A9000A01DE3F2D4E80622390007E006223900DF +:108AA000A01DE3F2CCE806223100AC3120001230E8 +:108AB000E3F2C4E8F12080003118200006220C30D7 +:108AC000E3F2BCE80098002101773000D9F79CFB65 +:108AD000A870A968012212031143A960E8681F2346 +:108AE0001B029843A036E860B37D1B021343184372 +:108AF000E8600198D9F7AAFA05B0F0BD002810B5D2 +:108B000001D0E3F2F9FD10BD481A0004F7B50020CA +:108B10000C0084B0050003906078217800020843BF +:108B2000C11FF93944D104984079022835D1E17840 +:108B3000A07809020143201D0F18FDA003C80026DC +:108B400001900698029187421BD279783878090201 +:108B500001430800FF38213813D1F978BA780802A8 +:108B6000104306280ED13F1D049E0622380001A99D +:108B700003F00BF8002805D0380008F01FFA0600B3 +:108B800000E0049E002E0FD0211D3000CEF7BAFD6C +:108B900000213000ECF797F806E00498211DCEF78D +:108BA000B1FD04980021F5E76D1C2D042D0C0DE09E +:108BB0000100FF399D3904D104982100CFF765FAEF +:108BC000F2E7DD49884201D101200390E178A278E3 +:108BD00008021043241D04190698844202D2039807 +:108BE000002899D0280007B0F0BD4278037812021F +:108BF0001A43202A01D000207047C27883781202DD +:108C00001A4303D1002008700420704742790A708B +:108C1000C178827808021043001D0004000C7047E0 +:108C2000CA788B7812021A43042A11D10A79062ACB +:108C30000ED252001218FF328B79521C5372CA792D +:108C4000002A05D00B795B001818FF30401C827297 +:108C5000C878897800020843001D0004000C7047A2 +:108C600010B50C00C978A3780902194301D104207A +:108C700010BD2179FF30491E0906090E401CAF4B7B +:108C800001726079585460799047E078A1780002C9 +:108C90000843001D0004000C10BDF8B5FF22093286 +:108CA0000A70120A4A7006228A700022CA70A34E05 +:108CB000091D04252C00531C1B061B0E0B70B25CF7 +:108CC000491CA41C0A702404491C240C1A00032B00 +:108CD000F1D30023C71DF9370022FF250A350D7097 +:108CE0002D0A4D7004258D700025CD700A713D7AD6 +:108CF00008346D1C4D7155002D18FF356D1C6E7AB2 +:108D00008E71AD7A521C24041206CD710831240CE8 +:108D1000120E062AE1D35B1C1B061B0E032BDBD3B2 +:108D20000800E1F24BF800190004000CF8BD10B582 +:108D3000040008001100E1F241FA002804D12000EB +:108D4000CAF762FAE7F726FC10BDFFB583B000242E +:108D500000252E001C5F2F008646944617E01888D9 +:108D60006044011B48780A7800020243FF3A413A06 +:108D700004D0022A03D10F1D4E1D00E00D1DCA783C +:108D8000897812020A43A01A001F04042414002C3C +:108D9000E5DC0498012814D1002D11D0002E0FD04D +:108DA000002F0DD0387802903078019028786B46EB +:108DB00018706878587069460EC97046CAF79EFAEE +:108DC00011E71988604608186246121D89180225A5 +:108DD00000228570C270FF2241320270120A427076 +:108DE000801D85700025C570FF25433505702D0A4F +:108DF000457018888C1D0C3018800498B161BA3207 +:108E000001000000807C030000040000A49729BE3C +:108E1000CA1D002804D123007046CAF78EFAECE67A +:108E200023007046CAF79FFAE7E6130470B50025E1 +:108E30001B148A1810E0D41A61782678090231438D +:108E4000FF39613900D12500E178A4780902214376 +:108E5000591A091F0B041B14002BECDC012805D147 +:108E6000002D08D02879D2F78EFD04E0002D02D025 +:108E7000D2F786FD2871002070BDFFB5002081B0BB +:108E800004000D00009001981600E0F7F5FA0700C5 +:108E900052E06878297800020843FF386B3825D003 +:108EA000012836D007280ED0082838D1FF20294ABB +:108EB000290073300E23E0F2FBFE040004990198B0 +:108EC000E4F7E0F832E0234AFF200E322900723046 +:108ED0000223E0F2EDFE1F490400891E098A0A20E0 +:108EE0000A2900D308001C4908801FE01B491C4ABE +:108EF0000968A8688918884208D33A1D2900FF200C +:108F00006B300C23E0F2D4FE04000FE0012000904F +:108F10000CE03A0010322900FF206C30F1E7E978CC +:108F2000AA7808021043001D0404240C002C05D06C +:108F3000301B0604360C2D19002EAAD1009805B05E +:108F4000F0BD0000FFFFFFFFFFFF0000FFFF00007C +:108F5000560500045E3C00048E06000460370004E1 +:108F60002F08000070B50C00E0F786FA0500FF201E +:108F700072302070000A60700220A0701A49002030 +:108F8000E070087C2071487C6071FF20A41D733064 +:108F90002070000A60700E20A0700020E0700E2289 +:108FA000891C201DE2F254EEFF2012346B30207039 +:108FB000000A0C2660700020A670E0703200291DA7 +:108FC000201DE2F246EEFF2010346C302070000AC3 +:108FD0006070300AA6702900E0700C221031201D4C +:108FE000E2F236EE382070BD5C3C00041CB5002275 +:108FF000130069460CC10622694602F0D0FD002824 +:1090000001D101201CBD00201CBD1CB506A106C954 +:10901000019200910622694602F0C1FD002801D1AB +:1090200001201CBD00201CBDFFFFFFFFFFFF000053 +:10903000192170B589012448E2F2A6EE224D2800DC +:109040001838D1F276FC28000C38D1F272FC0024DA +:109050001D4829001838D1F29DFCFF354135641CAC +:10906000052CF5DB002070BD70B5050003F06CF930 +:10907000060015481838D1F263FC040004D01248E9 +:1090800021000C38D1F286FC300003F061F9200099 +:1090900000D0856070BD70B5040003F055F905007F +:1090A000002C09D0084821000C38D1F2B1FC010095 +:1090B00005481838D1F26EFC280003F049F970BD5C +:1090C00001480C380068704740E9000438B50400D6 +:1090D000FF4800900E212000E2F280EEBF202070B9 +:1090E0000C2060700098FF21113108430090042289 +:1090F000A01C6946E2F2ACEDF648A071010AE171EC +:10910000A072000AE07238BD10B504000A21E2F234 +:1091100066EE7F20207008206070A078012108434F +:10912000A070607A40210843607210BD4A2101702E +:109130000E214170142100228170C2700A22027136 +:1091400000224271FF222D328271120AC271C8229E +:109150000272002242720A0A8172C27205220273EE +:10916000002242738173090AC173704710B504006D +:109170001C21E2F234EE2D2020701A206070A178BC +:109180000D221143A170E178102289088900491C41 +:109190001143E1702079032108432071FF206071A1 +:1091A00010BDF0B5050089B007F094FE040028005A +:1091B00007F0B7FE0700002C7ED0002F7CD00920DE +:1091C000800120180021C17426000175FF3610208F +:1091D000E136B073300020221238BFA1D1F27CFBFF +:1091E000642030820120F073C0483083401E7083B9 +:1091F000072030777077BE4E2000FF30316806229E +:10920000F330E2F226EDF12080003168A9A8E27186 +:10921000010000007C80030000040000F2BE4AFE52 +:10922000281806220600E2F288ED28790123022898 +:1092300000D100230F20800128180890827A310085 +:109240000220D9F7CBF9E01DFF30FA300790417FBB +:1092500011224B085B00062152010B43A218012189 +:1092600006921170C177C7210B404377212000017E +:109270002018817B427B09021143FF22C1329143B6 +:109280004173090A8173200080300B210590017120 +:109290006221EC30E2F282ED0026F320CF212EE0B5 +:1092A000F000801B00190490711CFF3061300390A6 +:1092B0004173017BC3228908890011400173817BBE +:1092C0000322114381730598017900E037E17D2085 +:1092D0000001E3F218EA6E2800D96E200399C873E2 +:1092E000000A0874059801797D200001E3F20AEA7A +:1092F0000499FF3171314870000A761C8870059816 +:109300000079B042CCD820000E30E1F2FFFA002103 +:10931000FE202177A077E1772879032801D1082260 +:1093200000E00A22202002552018002102908170BE +:10933000012141702879032803D16E2060602060EC +:1093400005E0E120C0002060FF2091306060200037 +:1093500002F0BAFB9D2080002018E1F2F0FA132001 +:1093600040012018027DDF210A400799497FC90783 +:10937000C917491CC907890E0A430275E97928797A +:10938000DDF71FF9E66F002E11D0083654213000AA +:10939000E2F204ED0320B071F0790421000900012C +:1093A000F07148208155B07A40084000B07220002A +:1093B00001F045F802984078C00906D00598006889 +:1093C000002802D00598CDF79DFF01206064079921 +:1093D000FB2208771F2040012018017C11408908DA +:1093E0008900491C0174200048300190FFF7C8FE35 +:1093F000E01DFF30FC30FFF7A3FE43482018FFF7C5 +:109400008DFE012060622000283000210090ECF7E2 +:1094100055FA26000120FF3641360100B06200985F +:10942000ECF78CFA20008021E830E2F2B8EC200062 +:109430000222E0300121C2810182418A49084900AB +:109440009143418203207076B0762879032802D1B7 +:109450007D20000100E06420F06130622B49F4209F +:109460000151FF20002665300655022007F08CFDD3 +:10947000A84205D12800E0F707F82900E1F71EF916 +:1094800006217972387AC322800880001040800655 +:10949000800E3872F972B8723968112040010918CB +:1094A0004E803A681421121891803A6803211018EE +:1094B000C18007983B00866108332100019A1F0094 +:1094C00064312000DDF702F9A17F34204155A868FE +:1094D000032109028843A8600B480D3020180500BD +:1094E00016E0000020008033FEFF00004D61727620 +:1094F000656C6C204D6963726F2041500000000064 +:109500002B090000BC0000042E0200008051010065 +:10951000FFF7E6FD06983300867697483A00290063 +:109520002018DDF7ABF80698403446766680079839 +:109530000121468208980069FF302130818309B0FB +:10954000F0BD70B5050007F0CFFC04002800FFF760 +:1095500032FE200002F0AAFA2000DEF74FFF70BDB5 +:10956000F8B505001D200C00400111002E18002C3C +:109570007BD08148062220382018E2F274EB2900C3 +:109580008031CA6D2000896D8030C26581652800F8 +:10959000E03021000278E0310A7082788A704278E7 +:1095A0004A70C078C870112040012918097A201823 +:1095B0000172200020300100407DF722104035224A +:1095C000525D1207D20FD200104348750D21890158 +:1095D0006A188646D0696318D861906A9862A16853 +:1095E00004208143A8684007C00F80000143102079 +:1095F000A1608143A868C006C00F00010143280094 +:10960000A160C0308C4621008768C0318F60076937 +:109610000F6147684F60C068C860FF2094A632DBC6 +:10962000010000007884030000040000A164999206 +:10963000401C61468143A868C005C00F0002014379 +:1096400001204002A1608143A8688005C00F40024C +:1096500001431D204001A160317E20180176704633 +:10966000000701D5506A5862200007F06EFC070021 +:10967000280007F06AFC0089388114E0FFE72C001D +:10968000280007F062FC417A07000F2080012018B3 +:10969000026911730269397A517300698906890E6A +:1096A000417300203076200007F028FC060038497E +:1096B000A0680E228843A06020001037B118463001 +:1096C000E2F2DAEA2500307FA035A8830120E883A2 +:1096D000200020300090417D102001430098062298 +:1096E0004175112040012B49201801804180002143 +:1096F00081800F218171002141823100FF312000E2 +:10970000F331AC30E2F2B8EA3100FF312000202220 +:10971000CF318830D1F2F4F83000FF30E130817B76 +:109720002972018A6981C17B6972018B6982418BCF +:10973000A982017FA975407FE875A068012109030E +:1097400088430F218901A0607018006A38600021E9 +:109750005820C15579607820F967C1538037397135 +:109760000098B17F0175F8BD8C2101701221417004 +:10977000982181702421C170B0210171482141716B +:10978000602181716C21C1717047000049020000A5 +:10979000C0600000FFFF0000FC4930B50020096CEC +:1097A000002917D00F22920189184C69002C11D082 +:1097B000002160224A4312198032D37A042B04D14B +:1097C000937A557A1A022A431018491C0906090E81 +:1097D0000829EED330BDED4870B5006C00281CD0D0 +:1097E0000F21890140184469002C16D00020142153 +:1097F0004143401C09198A68000630329379527936 +:109800001B021343CA68000E3032957956792A023A +:1098100032439A1804280A82E9D370BDDB4A70B536 +:109820000020126C0300002A22D00F24A401121978 +:109830005569002D1CD000220D26B6019400641934 +:10984000A4196469002C0BD02034E47D002C07D0CF +:10985000401C0006000E012C02D15B1C1B061B0ED7 +:10986000521C1206120E082AE8D3002900D00B70F1 +:1098700070BD1CB503000800C449096C00291CD048 +:109880000F22920189184C69002C16D0C0491A0089 +:1098900000936318BE4954320939019262181D21A0 +:1098A00049016118E1F284FC0720C0012018817B86 +:1098B0000191016A0198E2F7E1FD1CBDB34910B5C1 +:1098C000096C00291ED00F229201891849690029CC +:1098D00018D0800041180D2080010C1860693721D4 +:1098E000E2F290EA60691B213930E2F28CEA6169A8 +:1098F00000202031087661694031087561692031A6 +:10990000C875606110BDF8B50F2189019F48002717 +:10991000026C51184E693C00142060438519288A56 +:1099200000280AD0287D0127002806D000202875AD +:1099300096482100006CEBF7E9FB641C002024062C +:10994000240E042C6882E7D3002F0AD0792000224D +:10995000C000331800928F4A8F480021CDF77AF962 +:10996000F8BD0F210020890171188860F8BDF3B59A +:1099700089B08649086C00287CD00F22920180189B +:109980004469002CF8D00D00FFF706FF05900998F8 +:1099900000210078C006070F099840788006400F24 +:1099A0000790286CFFF73AFF0026082F009061D23D +:1099B0000720C0012018817B0491006A03900A9857 +:1099C000012802D00A9802285AD1099806A9E1F282 +:1099D000CDFB0798E3F28CFBE3F29BFB1423584387 +:1099E000002500190890A9004018806854216B4692 +:1099F000095C1A7E11420FD000780D21C006060FB7 +:109A0000B00000198901401840690021FFF731FFBB +:109A10003000FFF753FF01266D1C2D062D0E022D81 +:109A200001D20898DFE7B80001190D2094D7B38957 +:109A3000010000007488030000040000550BEC26B0 +:109A400080010D186869002806D00021FFF71BFF70 +:109A50003800FFF73DFF012607986023584337225F +:109A60000019543068610999E2F210E968696B469F +:109A7000197E4030017568690A99FFF704FF0A985A +:109A8000022802D1052101E05BE004216869203051 +:109A9000C1750DE0B80001190D208001081840695A +:109AA000002805D00A99FFF7EEFE3800FFF710FFF7 +:109AB000FFF77CFE0599884201D0012500E00025D2 +:109AC000384801220938211804A802F086F8000657 +:109AD000000E02901D2040012118012203A802F06F +:109AE0007CF80006000E002D019019D0FFF77DFED6 +:109AF0002B4F0024386C2100EBF712FB641C24066A +:109B0000240E042CF6D3396C0F2080010918496902 +:109B100008188068002803D100210800FFF7FDFE27 +:109B20001F480021006CFFF783FE0099884205D191 +:109B300002982E4306430198064302D001200BB041 +:109B4000F0BD0020FBE7F8B50400FF21144D2D31D6 +:109B5000286CDAF723FD0028206013D00189F12357 +:109B60004618296C9B000A00AC320092104A8A18F1 +:109B7000C9180D23DAF766FD1120203630702168F0 +:109B8000C0200881F8BDFFB581B004001E00684602 +:109B9000FFF7D9FF009800280CD1401E05B0F0BD9A +:109BA000E86E00049703000040420F004F87030057 +:109BB0002902000001890D18FF4A01271179491C6B +:109BC0000906090E0029117100D11771FA49029A8C +:109BD0000B792100E1F23FFB0400002E0ED0029829 +:109BE000039920180C303200E2F250E868782978A6 +:109BF0000002084380192870000A6870EF48007856 +:109C0000800718D4607B8006400FE1F2CAFAEA4967 +:109C10000F22096C9201891849690722D20189181B +:109C20008740897B607B394202D00421084301E0F0 +:109C3000FB21084060730098DAF742FDAEE770B58B +:109C4000050000242100280000F03AFB002801D084 +:109C5000012070BD641C2406240E032CF2D90020C0 +:109C600070BDF1B5002582B0D349086C002805D03D +:109C70000F22920180184069002801D10020FEBD0A +:109C8000072401906020604301994618543637003C +:109C90002037F87D012818D1C8480078800707D4FC +:109CA000C5482106006C090E00F01FFB00280CD0EF +:109CB00032003B7E393237213000FFF764FF02204B +:109CC000F87502986D1C854201DA641EDAD5280603 +:109CD000000EFEBD012010B5FFF7C3FF002801D123 +:109CE000012010BD002010BDF3B581B006007D2518 +:109CF0002D01B34800222900E2F250FD04000120AA +:109D0000CCF7C4FD002CF4D0AB4F6921386C6061F6 +:109D1000C020251820812800E2F27EE8029A310056 +:109D20002800E1F2B4FAA748220080680421006804 +:109D30000023CCF7F4FD002804D1386C802109F011 +:109D4000B8EF02E02000E2F2FFFC0120FEBDFFB50B +:109D500083B002A816000D001F00FF2291321723C6 +:109D600001A9D9F786F8002839D001990398103154 +:109D7000EBF7E7FA019CA072000AE0724834002D6C +:109D800004D006222900201DE1F280EF002E05D02C +:109D90002000062231000A30E1F278EF002F1AD0BD +:109DA000FF208D302070000A6070FF205030A070BE +:109DB000000AE070FF222000443239001030E1F246 +:109DC00066EF0198C17A827A09021143FF3154315A +:109DD0008172090AC17202990398D9F715F807B080 +:109DE000DDE6F8B50400002529000B30FFF7C9FDBA +:109DF000714E04202070306C07F0A0F900281DD0AF +:109E0000306C8068C00419D5A778E51C6846FFF758 +:109E10009AFE0098002801D1401E06E03A00290071 +:109E2000E1F256FA0098DAF74BFC050000D12070F9 +:109E30000022306C11001300FFF789FF8FE7B82B69 +:109E400001000000708C03000004000006D13F4AAE +:109E50002800F8BDF8B50C002000497817005B4ECB +:109E600015000C300C37012903D0022910D1002134 +:109E700004E0E17800290BD131710121FFF78BFD5E +:109E8000002805D0306C2300AA1D3900FFF769FFB8 +:109E90000120F8BD4D4910B5096C002919D00F22D9 +:109EA000920189184969002913D00278D5235207F5 +:109EB000D20E9B00D218895800290AD03722525C52 +:109EC0000123042A00D000230A005432E1F242FAAE +:109ED00010BD002211001300F8E70F21F0B5890131 +:109EE00040184469002C17D000200D25AD01030057 +:109EF00001268100091949194969002909D00A0078 +:109F00002032D77D042F04D13031D6751A0A4B7117 +:109F10008A71401C0828ECD34BE62C4830B5006C05 +:109F2000002817D00F21890140184269002A11D05A +:109F30000D2300209B01052481008918C918496957 +:109F4000002904D02031CD7D042D00D1CC75401CDA +:109F50000828F1D330BDF8B500261C48006C002855 +:109F600001D13000F8BD0F21890140184769002454 +:109F7000A0000D21C01989014018406900280AD0AD +:109F800005002035E97D052905D101263100FFF7BF +:109F900084FC0420E875641C082CE9D3FFF72FFC2F +:109FA000DFE738B50020094C0090206C002819D05C +:109FB0008168C90416D507F0CBF8002803D0206CBF +:109FC0006946FFF73FFC6B46187807E0E86E00042F +:109FD000F0170004481A00049C3B0004002801D03C +:109FE000012038BD002038BD70B5891EC94D06005E +:109FF00000240B00E2F270E8053A04273A323A00F6 +:10A000002879401C28710020D3F7F6F92879002818 +:10A0100001D1012028716879002809D0BD48372175 +:10A0200040300379421DA81DFFF7B7FD6C711DE09C +:10A030000120FFF720FE002818D106213000D4F7B8 +:10A04000EEFE2C6012E02868B04201D0042070BD02 +:10A05000002AF2D0002108009047EEE7FFF77BFFCF +:10A060000022286C11001300FFF77BFE032070BD57 +:10A07000F8B500200F00079E002A2FD011898C18F8 +:10A08000A17809090D2929D1250020352978112920 +:10A0900024D16978012921D1E87800280CD1280041 +:10A0A0000C30FFF778FC002817D09A48A21D006CEE +:10A0B0002B00911DFFF755FE002E0ED06078227800 +:10A0C000010211432800B047002806D0914C062118 +:10A0D0002068D4F7A4FE002020600120002F09D0C2 +:10A0E0003968096F89780A07920F03D109090D2988 +:10A0F00000D10120F8BDF7B592B005000C008548ED +:10A100000F2189016E18056471690191E17B006876 +:10A11000C9060F0F002801D0012002E0082F05D347 +:10A12000032020700020C04315B042E5A868C10498 +:10A1300020000F300029109057DA280007F008F8A7 +:10A14000002852D074480078800707D4207C80060D +:10A15000410F280000F0D3F8002846D0382102A88B +:10A16000E1F23AEE6D4802906D4803906D4804901C +:10A17000601CE1F2D8EE7D23DB00584308AB0A9067 +:10A18000187D0621084318750E9530693722007B2B +:10A1900018743069407B8007800F58743069407BA9 +:10A1A0000007800F987430695A4E407B8006800FFC +:10A1B000D87435641099B01DE1F272ED14984638E8 +:10A1C00002065948120E027104D021004631401D8A +:10A1D000E1F266ED012502A87571D4F764FC002850 +:10A1E000306000D1451E280016E010980121FFF7CD +:10A1F000D2FB00280DD00198BA0010180D22920150 +:10A200008018406901212030C17504202070002091 +:10A2100002E003202070001F411C85D10121217024 +:10A2200082E730B50400002091B00190A068C0041E +:10A2300043D5200006F08CFF00283ED02000FFF719 +:10A2400008FD002803D13448007880074462A1A2A9 +:10A25000010000006C90030000040000B9141AF91A +:10A2600035D5200001A9FFF7F7FA6B461D79002DBF +:10A270002FD0382102A8E1F2BAED2B486021E1F29B +:10A28000B6ED2B4802902B4803902D4804902D48A2 +:10A290000E9468430A900F2080012018016908ABD2 +:10A2A000097B19740169497B8907890F5974016910 +:10A2B000497B0907890F99740069407B8006800FEC +:10A2C000D87402A8D4F7F9FB17490C64086011B0E0 +:10A2D00030BDFFF74AFE0028F9D00022110020000F +:10A2E0001300FFF748FDF2E70F220300920110B5BB +:10A2F0009C1862690800002A09D0E2F228FF1423A2 +:10A3000058436169001D085C0007C00F10BD0020A4 +:10A3100010BD10B504000800E2F208FF01002000A3 +:10A32000FFF7E2FF10BD0000E86E0004F017000424 +:10A33000098E0300918E03001D8B0300286F00041B +:10A34000098B030090D0030021490978017021484E +:10A350007047F7B50A3A15040C002D0CDD2727E0ED +:10A36000E078A27801021143081D06046078227883 +:10A3700000021043360CFF381D380CD0012813D1D1 +:10A380001548E170A77002681448A31C01680520F5 +:10A39000DBF2B4FB08E01248E170A77002681148D4 +:10A3A000A31C01680820F3E7A81B05042D0CA419C1 +:10A3B000002DD5D100990C480C4A002903D1016A1F +:10A3C0001160012100E0116801620120FEBD000062 +:10A3D00048700004486F0004B4BE01C0C4BE01C090 +:10A3E000B0BE01C0C8BE01C0C0A00080B01600044D +:10A3F0000A000100054810B5D9F223F810BD0A0083 +:10A400000100024810B5D9F22EF810BDE872040020 +:10A41000F8B50C00110089A2126803002000009218 +:10A4200031D0112252019D182A7A002A2BD01829E6 +:10A4300029D3E1F206ED4421217000216170687A90 +:10A44000A0700127A61D0322300069462771E1F2A2 +:10A4500032ECA87AF61C3070761C3770B61C0322DA +:10A4600030006946E1F226ECE87AF61C3070761C82 +:10A47000032230006946E1F21EEC297BB01DF17029 +:10A48000011B891E6170001B0006000EF8BD4522ED +:10A49000D2000621801810B5E1F2A8EC10BDF0B58D +:10A4A0000A78442A44D100244E788A1C27002500CB +:10A4B00021002B00E1F21AEE0705071B101B202CD0 +:10A4C000330002212BE011784170012900D90124C9 +:10A4D000921CF6E7921C19E0D21C1178012903D0D6 +:10A4E000022901D0012400E08170521CE9E71178B3 +:10A4F0000129EFD90124EDE7D21C1178012903D0FD +:10A50000022901D0012400E0C170521C042106E0A0 +:10A51000D178012901D0022910D101710EE0002F5C +:10A520000CD1731A1E043614002C01D1002E01DC4C +:10A530000120F0BD6D1C2D062D0EBAE70020F0BDE8 +:10A5400070B505004520C0002818FFF7A8FF0400DB +:10A55000012803D12800FFF79AFF04E01121012010 +:10A56000490169180872200070BD03002122D25CE5 +:10A570000020D20902D0FF22180049E770477FB5BA +:10A580000C000D1D2121095CC90923D0FF21683170 +:10A590002170090A61701021A17000218030E170E2 +:10A5A0000068002804D110212800E1F24AEC0AE0FA +:10A5B0000100363110226846D3F22EFE1022280008 +:10A5C0006946E1F278EBE078A17800020843001DCB +:10A5D00004B070BD0020FBE77CB514000600282500 +:10A5E000002904D06846FFF75AFF012801D12580D1 +:10A5F0001EE01120400130186B465978427A914292 +:10A6000001D9312013E06B46817A9A78914201D0CA +:10A610002B200CE06B46D978C27A914201D03020D1 +:10A6200005E06B461979007B814203D02F20208002 +:10A6300000207CBD0020208001207CBD0014720021 +:10A64000222801D304207047082801D30029F9D11A +:10A6500001207047FFB581B084461E00760DE922C7 +:10A66000010000006894030000040000EACEC995D0 +:10A6700002D1002005B0F0BD70780025C01E00900A +:10A6800028002C001DE06000001987197A79C82A7B +:10A6900012D87F1D7B780DE0624501D1B8780CE0BF +:10A6A0005B1E1B06387802991B0EFFF7D3FF80183C +:10A6B0000206120E002BEFD10020ED1C641C0028B6 +:10A6C000D8D100998D42DEDBD4E70120704701200C +:10A6D000704720220270012242708170032070476F +:10A6E00010B5232202700222040042700800EFF726 +:10A6F000EAFBEFF7FBFB0021A070E1706078801CA3 +:10A700000006000E10BD000010B5002002F07AFF18 +:10A710000028FAD102F076FF0028F6D1411E0C483D +:10A72000006802F064FF002010BD094810B5006801 +:10A7300002F064FF10BD0749012010B50861142024 +:10A74000CBF750FC10BD142010B5CBF74BFC10BD5F +:10A75000BCBE01C040B90090002810B502D0C03086 +:10A76000D8F210FA10BD10B5040007D021009031C6 +:10A77000601DD8F218FA2000FFF7EEFF012010BD8F +:10A78000F0B50022002907D001290AD002290ED1F4 +:10A790001A4C2600603608E0184C9C3C26001836FF +:10A7A00003E0164C783C26006036154909E000208D +:10A7B000F0BD45589B195F689B68BD432B434350D0 +:10A7C000521C0C2353430E4DF15AA942F1D10D4AAC +:10A7D000002007E056581B195F689B68BE4333434F +:10A7E0005350401C0C234343E15AA942F2D1F0BD1F +:10A7F000012901D10120704702207047741700041D +:10A80000FFFF00000090009010B5E5F754F80F49E5 +:10A810008A6B0968801A401A0C491E388031C86159 +:10A8200010BD08B5FBF7F3FF800207D008220092A5 +:10A8300002000748074B0021CCF734FA08BD054851 +:10A8400010B50068D0F2C5FA10BD000060370004F2 +:10A85000C9590300EC1700041A4801704270012026 +:10A8600070471848002101704170012070470A00AC +:10A870000100154810B5D8F218FE10BD0A000100FD +:10A88000114810B5D8F222FE10BD10B5D8F26BFEFB +:10A89000D8F279FED8F286FED8F294FED8F2A3FE62 +:10A8A000D8F2B2FED8F2C1FE0748D8F221FED8F2A3 +:10A8B000EEFED8F226FFD8F2A1FFD9F21BF8FFF77F +:10A8C000D0FF10BD14390400846C0400F8B50D00ED +:10A8D0000026018947690C18002A15D1A0780009C3 +:10A8E0000D280FD1F12080000622A11D381801F09B +:10A8F00092F9002808D031480622A11D01F08BF9F9 +:10A90000002801D00020F8BD210020310878092856 +:10A9100033D00DDC00281DD0032828D004282CD0EB +:10A92000082811D12B0022003800EDF7D6FE16E0E2 +:10A93000112816D0152809D07F2805D17F222100A3 +:10A94000380009F004EA01263000F8BD3800F4F7B9 +:10A9500077FB04E02B0022003800EDF7C6FB060071 +:10A96000F2E72B0022003800FFF788FAF7E72B0008 +:10A9700022003800D3F7D7FEF1E74B7801261B1FE2 +:10A98000E1F2BEEB0A0706060606101616161606B4 +:10A99000DAE74A7900920B79CA7889783800EDF7BE +:10A9A00087FBD1E709222100380009F0D0E9CBE785 +:10A9B0002100380009F0CEE9C6E70000AC350400FC +:10A9C000FFB593B00D2292010027159808978018C3 +:10A9D00002971290C4681900C800401A15994018CF +:10A9E0001190C07904901198067A139841780278F2 +:10A9F000080210437ED02000E1F2A8EA00280ED120 +:10AA000015980CA9F6F7CAFF2100E1F2B0EA05009B +:10AA100021000C980831E1F2AAEA002D6AD0002248 +:10AA200000921398082203210023DAF24FF9002242 +:10AA300000920690139808223D210023DAF246F98D +:10AA40000022009200210590139808220B00DAF2F0 +:10AA50003DF90028039004D003991398081A203870 +:10AA600002901398192112301090159879B2D87568 +:10AA70000100000064980300000400001EA1BC2136 +:10AA80000025490140180F9077E013206843001912 +:10AA90000E900E30E1F264EA002806D007000E980E +:10AAA0001D30E1F25EEA3F1809370C2068430019B7 +:10AAB000FF304430E1F254EA1099062201F0B5F873 +:10AAC000002859D103983900D0F21DF8002853D13D +:10AAD0000C20684300190400FF344434201DE1F2C7 +:10AAE00040EA017808AB1972407858721598032132 +:10AAF00009024018406B00280AD0607A217A0006CB +:10AB0000001408431C9900E034E088420ADA07E0A8 +:10AB1000342010AB185E28216B46595E884201DD57 +:10AB2000012000E000200699002903D006998978C9 +:10AB3000B14201D000280BD0201DE1F212EA18AB7F +:10AB4000197D0170597D41701C982072000A607255 +:10AB500012980A22C1680F98007E42434120C0002B +:10AB6000101808184178027809021143491E017033 +:10AB7000090A417017B0F0BD6D1C207BA84284D833 +:10AB8000139841780278080210430D901E3000049B +:10AB9000000C0B900698002823D10598002819D0A6 +:10ABA00005988078B04215D012980A22C1680F9893 +:10ABB000007E42434120C0001018081841780278F6 +:10ABC00009021143491E0170090A41701198407A27 +:10ABD0008007CFD50B980896C01C0004000C0B9082 +:10ABE00019E006988078B04215D00F990A23097EA3 +:10ABF000129859434122C068D20089184018417800 +:10AC0000027809021143491E0170090A4170119826 +:10AC1000407A8007AED5207B617B070088420AD24C +:10AC2000201DE1F29EE90B99451820000830E1F261 +:10AC300098E985421AD9201DE1F292E90500200029 +:10AC4000E1F28EE92B003A000121F6F742FC15985B +:10AC50000CA9F6F7ADFE2100E1F292E90500210012 +:10AC60000C980831E1F28CE9002D83D0207B132170 +:10AC700041430C2358430F190119FF3144310E375A +:10AC800020000791E1F26CE9F6F78EFE0500201D29 +:10AC9000E1F266E92D18FF2057302870000A68702D +:10ACA0000D98801DA870000AE8700799281DE1F230 +:10ACB00068E9079903000B988872000AC872109916 +:10ACC00006221800E1F20AE839002800E1F258E90A +:10ACD00028000A30099013990D9A2031E0F2FEEF16 +:10ACE0000D9909984018089900290ED00321017088 +:10ACF0000121417008998170E978AA78090211430D +:10AD0000C91CA970090AC01CE970FF2158310170E3 +:10AD1000090A4170102181700021C1700799050056 +:10AD2000091D001DE1F22CE918AB197D0170597D58 +:10AD300041700021A971E9716B4629721A7C6A720F +:10AD4000AE722800E97208220C301EA9E0F2C6EFAC +:10AD500007991C980872000A6B464872187C787331 +:10AD6000BE7313988078000900F0BCFC797B8001E9 +:10AD70008906890E01437973390002980F31E1F297 +:10AD800000E9207B401C2073201DE1F2EAE80B99CA +:10AD90004018211DE1F2F4E8ECE6F7B584B00400B8 +:10ADA0007ED00598132358430699061903960E364C +:10ADB00000290AD005980C2358430019FF30413070 +:10ADC000817B407B0D02054307E03000E1F2C8E8DB +:10ADD000417800780D020543AD1C201DE1F2C0E86A +:10ADE00007003000E1F2BCE8060020000E30E1F27E +:10ADF000B8E8301A381A471B0598217B401C81425D +:10AE000048D003982130E1F2ACE801003A0030006C +:10AE100000F03EEF059E39E0132070431322001925 +:10AE200001000E3021310290E0F258EF0C20704307 +:10AE30000C2207193900FF31503108000C380190FD +:10AE4000E0F24CEF06980028029814D0E1F288E86E +:10AE50000299401BE1F294E80198E1F282E801993D +:10AE6000401BE1F28EE8FF3748373800E1F278E81E +:10AE7000401B390007E0E1F274E80299BFB12524D4 +:10AE800001000000609C0300000400004D7B6F4D3A +:10AE9000401BE1F280E80199801CE1F27CE8761C1D +:10AEA000207B401EB042C1DC207B13235843001995 +:10AEB000401F00E015E01321E0F2E0EF207B0C23BF +:10AEC00058430C210019FF303830E0F2D8EF207BD6 +:10AED000401E2073201DE1F24EE8401B211DE1F2CF +:10AEE0005AE807B0F0BD002910B501D0007B10BDB5 +:10AEF000E1F240E8007A10BDF7B582B0070000200B +:10AF00000190380004990E30FFF7EDFF0600012490 +:10AF10001BE0132060430499C0190E30FFF7E3FFD4 +:10AF200005000398002804D03106090E2806000EFB +:10AF300003E02906090E3006000E049ADAF2D8FF63 +:10AF4000002801D02E000194641C387BA042E0DC74 +:10AF5000019805B0F0BD0A000021CDE7FFB5002043 +:10AF600091B019001700049008900D20800110186E +:10AF70001090C468C800401A80180F90C0790290E1 +:10AF80000F98007A019011984278017810020843D6 +:10AF90007ED0002200210092119805220B00D9F2E8 +:10AFA000A9FE0028059078D005991198081A203834 +:10AFB0000390032000023E18706B002801D01A98FD +:10AFC00000E01B98002200920990119808220321AA +:10AFD0000023D9F28FFE00220092079011980822D8 +:10AFE0003D210023D9F286FE0690119819211230D6 +:10AFF000002549010E9078180D9051E01320684308 +:10B0000000190C900E30E0F2B6EF070006D00C9855 +:10B010001D30E0F2B0EF3818093004900E99B81CDA +:10B02000062200F00CFE002839D104990598CFF2D1 +:10B0300074FD002833D113206843041907980E3497 +:10B04000002804D007988178019881420AD0716B5A +:10B050002000FFF748FF0100726B0998DAF248FF01 +:10B06000002806D02000E0F286EF1B9901721A98A2 +:10B0700020730D990A22097E10984A434121C06825 +:10B08000C90051184018417802780902114300E0C4 +:10B0900003E0491E0170090A417015B0F0BD6D1C36 +:10B0A000207BA842AAD81198417802780802104360 +:10B0B0000A900930070407983F0C002823D106980E +:10B0C00000281AD0069881780198814215D01098EE +:10B0D0000A22C1680D98007E42434120C00010182A +:10B0E00008184178027809021143491E0170090AC3 +:10B0F00041700F98407A8007CFD5FF1C01983F041C +:10B100003F0C089036E0079881780198814231D051 +:10B1100010980A22C1680D98007E42434120C00069 +:10B12000101808184178027809021143491E01706D +:10B13000090A41700F98407A8007AED51AE00B9843 +:10B140000028AAD0716B2000FFF705FF05062D0E21 +:10B1500013206843716B00190E30FFF7C4FE726B49 +:10B160000999DAF2C5FE002897D1002229002000B3 +:10B17000FFF71DFE207B0B90617B8842DFD2201DF4 +:10B18000E0F2F8EEC51920000830E0F2F4EE854256 +:10B19000D5D82000E0F2EEEE0500201DE0F2EAEE48 +:10B1A0002E18B81E3070000A707035000E990935DF +:10B1B0000622B01CE0F29CED1B98307211990A9A9D +:10B1C00020312800E0F294ED0A9808992818002907 +:10B1D00005D0032101700121417008998170207B05 +:10B1E000132141430C2358430D190119FF310E352A +:10B1F0004431B01CE0F2CEEE29003000E0F2CAEE9D +:10B200000822281D1CA9E0F274ED1A982900287361 +:10B2100003980F31E0F2BEEE6B46187A687301981E +:10B22000A87311988078000900F066FA697B8001A4 +:10B230008906890E01436973207B401C2073201D01 +:10B24000E0F298EEC019211DE0F2A4EE25E7FFB56B +:10B250008BB00C00050000200690079068782978D4 +:10B260000002084356D00D98002853D0D4F2CFFFE7 +:10B2700006000F00A878290020310009082809914C +:10B2800001D0052830D1E07EE1F244FE6C9A8514AD +:10B29000010000005CA003000004000065EAEAF081 +:10B2A000010068782A7800021043001D0001E1F2D5 +:10B2B0007AEA05900999082206A8E0F224ED079998 +:10B2C0000698002359405840084317D005A80DC8D8 +:10B2D0000021801859410690200050300791E0F27B +:10B2E00054EE069A301A8018079B002159410791A5 +:10B2F00006900998082206A9E0F204ED0D990D20A8 +:10B3000080010818017D012910D1039702960B22B4 +:10B310000720A25620560192111A00910E9B0D9AF9 +:10B3200021002800FFF76AFB0FB0F0BDC068E0F213 +:10B330002CEE0028F8D00B20072120566156401A29 +:10B3400004F0C3F80006000E08900B202056D4F736 +:10B350007EFF020603970899120E019200910E9B40 +:10B360000D9A210028000296FFF702FEDCE7012972 +:10B3700009D002290AD0032903D1800708D1012A64 +:10B3800006D000207047C007FBD001E08007F8D549 +:10B3900001207047F7B58EB005000026E04B109AEB +:10B3A0001B680F99984700287ED1002D7ED00F98FA +:10B3B00000287BD01098002878D00F98FF30401CD0 +:10B3C0000D90407C002801D101266BE02C35002730 +:10B3D00062E00F987901C91908180100FF31143192 +:10B3E000FF300B91401C807C0C900B982021CFF2F9 +:10B3F000ECFA040008AB187C05D1002849D0697824 +:10B40000814246D836E0002806D16878A04240D173 +:10B41000202C3ED822000AE020280DD8202C0BD862 +:10B420002200A04200D202006978814231D80B99F3 +:10B43000A81C00F00EFC2AE0FF2807D16A780192D0 +:10B440000B98A91CB7A3B8A200941EE0FE2813D144 +:10B45000202C11D20B99220003A8E0F254EC2A20F0 +:10B4600003A908556A780192A91CAEA3AEA203A84D +:10B4700000940AE001260CE06A78A24209D1019208 +:10B480000B98A91C00230CAA0094DAF2C5FB002833 +:10B49000F0D07F1C3F063F0E0D98407CB84201D98A +:10B4A000002E96D0109800E000E0066011B0F0BDCC +:10B4B000FFB500208BB00D00070004900E980D2101 +:10B4C000890140180A90C1680E9A1920400110188D +:10B4D0000990007E0A2358430022FF30FF30801D70 +:10B4E0000E1800210092052228000B00D9F20CFC56 +:10B4F000002803907ED014980E99C300181A4018A3 +:10B500000890407AC1072800123007900E300029B9 +:10B51000069059D100200290A8780107890F53D1D5 +:10B520000009052850D10A98C06801900A98007D4A +:10B53000012800D102900698807AC00705D0290022 +:10B54000079806220C31E0F2DEEB002438E01320ED +:10B5500060430199401805900E30E0F216ED002886 +:10B5600006D0070005981D30E0F20EED3F180937B0 +:10B570000598C07E8009012821D10C2060430199E3 +:10B580004018FF304430E0F200ED0799062200F049 +:10B5900060FB002813D103983900CFF2C8FA0028C5 +:10B5A0000DD1029A01982100FFF70BFC70793179D7 +:10B5B00000020843401E3071000A707104E0641CF0 +:10B5C0000198007BA042C2DC0B9808F00AEDAA1C8F +:10B5D0000E99936A020009781800FFF7C8FE002848 +:10B5E00008D00E990798491CDAF21DFC002801D0FA +:10B5F000707900E083E0317900020843401C30712B +:10B60000000A002270710092A8782D2102092800FA +:10B610000023D9F279FB002802D0C078400603D578 +:10B62000B07801210843B07000220092A8783D2133 +:10B63000020928000023D9F267FB00282BD0C1782B +:10B64000890728D0B17802221143B170C1788907E7 +:10B65000890F0129817801D1091D00E0091F099A8C +:10B660000020527E15E00A9BDC680A234343FF3327 +:10B67000FF339B1DE35C8B420AD10A230A9958438E +:10B680002A4AC96880180A5C04231A430A5402E053 +:10B69000401C8242E7D80E99280004AAC978E3DA50 +:10B6A0000100000058A40300000400003630399C5B +:10B6B000FFF77AFE0898407AC10716D0C00614D565 +:10B6C000069A0121527B002007E02B1820339B7B38 +:10B6D000002B01D0002102E0401C8242F5DC002951 +:10B6E00001D0012000E00498049008982900037A12 +:10B6F000C0798207920F00920D9A0B9808F07EECA9 +:10B700000498002805D0149B0E9A0D992800FFF785 +:10B71000B2FD13E60A00012110B5FFF701FC10BDD0 +:10B72000082801D101207047052801D10220704767 +:10B730000020704740FC00042A0000003F00000089 +:10B740000602000010B50968491C0CD0202908D158 +:10B75000806905F04AFC00681F2149014018012159 +:10B760000175002010BD41681831CFF2CAF8F8E722 +:10B77000F8B504000D0048680127C0680090A6696C +:10B78000300005F00BFC002C5AD0002D58D0002EB4 +:10B7900056D02B68212B43D010DC172B06D008DCA9 +:10B7A0009B1C4BD0012B13D0182B4BD161683C3123 +:10B7B00032E01D2B19D01E2B44D124E0223BE0F2B5 +:10B7C000C8EC0C3541414141413F3F3F413F2141A0 +:10B7D000F7F73CF8002804D0F7F738F80079032889 +:10B7E0002ED00020F6F7DCFA2AE001005123DB001E +:10B7F0001C224831C018E0F2FAEA1E213000DCF7C2 +:10B8000018FD1DE0002700993A003000F7F7A3FE6D +:10B81000002815D1616830312000CFF272F80FE0B6 +:10B82000222200213000DAF720FF09E03000DBF7A8 +:10B83000C9F822213000F7F740FE01E02068A0603F +:10B840000020F8BD2800F8BDF8B504000E00856999 +:10B8500000286AD0002EFCD030680F27BF012128B5 +:10B8600064D00EDC172806D006DC801C79D00128B5 +:10B8700012D0182876D179E01F2857D02028F9D186 +:10B8800077E00300223BE0F264EC0B74AEAEAEAEA8 +:10B89000AE6EAC5174ACAE00287903281ED12800DE +:10B8A000E5F7C1FB0600280008F040EB002810D0A7 +:10B8B000306C00280DD04320400130184078FF281C +:10B8C00002D06846D8F752FD00221100280008F087 +:10B8D00066EA1F2002214001281801720120F6F7B4 +:10B8E0005FFA227D002A05D0002001002075280083 +:10B8F000D8F780FFA06905F078FB00681F26760165 +:10B900008019007D00280BD0A06905F06EFB00684F +:10B9100081190020087502001F212000CEF2D2FFFD +:10B92000E81900690421D7F7C5FC5AE01F2802D1A5 +:10B93000332120240AE02A2806D136212B24012095 +:10B94000EA191269907301E0342122242800DAF701 +:10B9500096FE032845D0010022002800DAF785FE74 +:10B960003FE037E03FE02800DCF752FB61683C3104 +:10B9700028E02800DAF733FF3068202802D1676812 +:10B98000183718E02B2821D1676828003C37E7F7E3 +:10B99000DFF9002804D001212800E7F7CCF90AE0FC +:10B9A0002800E7F7CEF9002805D06768002118378E +:10B9B0002800E7F7A7F930680106090E2800F7F715 +:10B9C0007CFD39002000CEF29CFF0AE02800DAF767 +:10B9D000F9FFD4E7E81900690521D7F76BFC206867 +:10B9E000A0600020F8BD3000F8BD70B504000D0067 +:10B9F00000285AD0002D58D02868A669212845D0A3 +:10BA000016DC18284AD00EDC801C4CD001284ED100 +:10BA10003000E7F7A3F9002847D02C22002130009E +:10BA2000D8F7E8FE41E01F2830D020283FD12DE094 +:10BA300029282DD004DC222828D0282837D134E02A +:10BA40002A281DD02C2832D1616820001831CEF26E +:10BA500058FF2D213000DCF7ECFB0F218901711814 +:10BA600009690020887301003000E7F764F90021BC +:10BA70003000E7F754F900213000E7F743F914E00C +:10BA80003000E7F75EF900280FD0286820750CE039 +:10BA90003000DCF716FB6168303100E0A16820005F +:10BAA000CEF22FFF01E02068A060002093FDEB653F +:10BAB0000100000054A8030000040000C25F4C28ED +:10BAC00070BD280070BD10B50A6884691F2A0FD0A8 +:10BAD00008DC921C0DD0012A0DD0172A16D0182A86 +:10BAE00019D106E0202A03D0212A01D0222A12D11E +:10BAF0000275002010BD2000E7F73AF90028F8D0C1 +:10BB0000152200212000D8F77FFEF2E74168483176 +:10BB1000CEF201FFEDE7080010BD174A17480021DB +:10BB200010B5CEF2ECFE1549154A08001830CEF2D9 +:10BB3000E6FE1249134A08003030CEF2E0FE0F490B +:10BB4000114A08004830CEF2DAFE0C490F4A0800CC +:10BB50003C30CEF2D4FE10BD09218901074A4118BC +:10BB600010B5CA6111004B22D20018318018CEF2F4 +:10BB7000C2FE10BDF0E70000EDA403004C7000040D +:10BB800019A50300F1A5030093A703005BA8030018 +:10BB90000021803041718171704770B51500062217 +:10BBA00018704A431C0059702900A01CE0F2BEE83E +:10BBB00070BD70B5050010001A782A705A780A70A6 +:10BBC000597806224A431C00A11CE0F2B0E870BD7F +:10BBD000F3B581B0002605F0EBF9050080300700D1 +:10BBE000407900281BD000240CE006206043029915 +:10BBF00040198730062200F040F8002801D10126C4 +:10BC000003E0641CB879A042EFD87879012802D10A +:10BC1000012E06D103E0022803D1002E01D100201D +:10BC2000FEBD0120FEBD10B5D8F795FA10BD00008D +:10BC3000203052E20400005A203062E23002A0E1DB +:10BC4000110380E13112A0E11EFF2FE13103A0E1D9 +:10BC50000010A0E31EFF2FE110B5040000F012E970 +:10BC60000068005D000706D5DF2C04D020002038D6 +:10BC700010BC08BC18472000FAE710B4042A0ED301 +:10BC800003000B439B070AD108C810C9A34202D185 +:10BC9000121F042AF8D2A34201D0001F091F002A54 +:10BCA00002D1002010BC7047D30701D0521C05E020 +:10BCB00003780C78401C491CA34207D103780C7808 +:10BCC000401C491CA34201D1921EF1D1181BE9E787 +:10BCD000FF3002E2032483E1022882E176800BEA4E +:10BCE000013050E0030052210F800B9A030052E311 +:10BCF000020080E0021081E02500009A030010E3BA +:10BD0000013071150120421201306015030010E36B +:10BD1000FAFFFF1A033011E26A00000A042052E21F +:10BD20001B00003A03C031E7020053E30800003A69 +:10BD30000F00008A0C38A0E104C031E5042052E273 +:10BD40002C3883E1043020E5F9FFFF2A021081E25C +:10BD50000F0000EA0C3CA0E104C031E5042052E2EF +:10BD60002C3483E1043020E5F9FFFF2A011081E241 +:10BD7000070000EA0C34A0E104C031E5042052E2DF +:10BD80002C3C83E1043020E5F9FFFF2A031081E217 +:10BD90000000A0E1822FB0E10130712501C07125C2 +:10BDA000012051450130602501C06025012040453A +:10BDB0001EFF2FE103000B43020070B49B0710D15C +:10BDC0000F4CE50100E008C208C91E1B9E432E422D +:10BDD000F9D01906090E1170521C00290DD01B0A4A +:10BDE000F7E70C78491C531C002C147005D00C7814 +:10BDF000491C5A1C002C1C70F3D170BC7047000009 +:10BE0000010101010120A0E1920081E01EFF2FE16C +:10BE10009203A1E01EFF2FE10000A0E15A0000EB19 +:10BE200003002DE9BA0000EB0300BDE8820000FA30 +:10BE30000F002DE9B90000EB0F00BDE81CC09FE525 +:10BE40000FC08CE001001CE30DE08F120FE0A00199 +:10BE50001CFF2FE101C08FE21CFF2FE100F08AF8E8 +:10BE60004955FCFF01402DE90000A0E1A10000FAC6 +:10BE70000140BDE8000000EA0000E0E3260000EA1F +:10BE80001EFF2FE110402DE9290000EB1040BDE816 +:10BE9000040080E21EFF2FE1AD000000013050E001 +:10BEA00003005221D57F0B9A020080E0030010E3CB +:10BEB000021081E0012042120130711525AF3C8A49 +:10BEC0000100000050AC03000004000091859F4475 +:10BED00001306015030010E3FAFFFF1A102052E250 +:10BEE0000500003A10402DE9185031E9102052E2C7 +:10BEF000185020E9FBFFFF2A1040BDE8823EB0E168 +:10BF0000081031290810202904303145043020451B +:10BF1000030012E31EFF2F01822FB0E1B230712126 +:10BF200001205145B2306021012040451EFF2FE124 +:10BF30000C109FE51800A0E3563412EF1EFF2FE10E +:10BF400054FFFFFF2600020004009FE51EFF2FE1C3 +:10BF50001EFF2FE19471000410B5C046C0460800D2 +:10BF600007D00178002904D005A100F024E90028B9 +:10BF700004D10448784410BC08BC18470020FAE7F4 +:10BF800043000000C888000010B5C046C046040049 +:10BF9000C046C0462000FFF770EF10BC08BC184731 +:10BFA0000E40A0E1660000EB04E0A0E101402DE9B5 +:10BFB0007B0000EB0040A0E10140BDE813402DE90B +:10BFC0000100A0E3121DA0E3081084E5000084E551 +:10BFD0001340BDE80010A0E1040084E50EF0A0E1EC +:10BFE00010402DE903002DE96D0000EB0040A0E1B9 +:10BFF0000300BDE8042094E50D30A0E100E082E0FC +:10C0000003005EE1002081E50B00008A0E3093E022 +:10C01000011A8EE26330A0E1071081E20730C3E32A +:10C020000710C1E3030051E10310A081041084E56F +:10C030001040BDE8020041E01EFF2FE10020A0E11A +:10C040000000A0E30000A0E11040BDE81EFF2FE1CA +:10C05000F0B585B0C046C04605000C0008F0CEE83B +:10C06000002001950294C046C046039001A8C5F780 +:10C0700060E9040001A80D00009303C81600C04643 +:10C08000C046C046C046DFF208FE00210800C04698 +:10C09000C0460700FFF758EF049000210760080032 +:10C0A000FFF75AFF411C0498416000210800C04678 +:10C0B000C04601000498816000210800C046C046C7 +:10C0C00001000498C16000210800C046C04601007C +:10C0D00004980161C046C046C046C046C046C0463E +:10C0E000C046C046C046C046C046C046C046C04620 +:10C0F000C046C046C046C046009B05B02000049C18 +:10C1000029003200A646F0BC01B0704710B5C04609 +:10C11000C0460020C046C046C046C046C046C046D5 +:10C1200010BC08BC184700000000E0E30210E0E388 +:10C130001EFF2FE110402DE90000A0E11040BDE8F6 +:10C140001EFF2FE10E50A0E14C0000EB05E0A0E146 +:10C150000050A0E10700C0E30D10A0E10A30A0E10B +:10C1600000D0A0E160D08DE220402DE93A0000FA35 +:10C170002040BDE80060A0E30070A0E30080A0E3E1 +:10C1800000B0A0E30710C1E305C0A0E1C009ACE81E +:10C19000C009ACE8C009ACE8C009ACE801D0A0E136 +:10C1A0001EFF2FE104009FE51EFF2FE11EFF2FE180 +:10C1B00084710004030010E3030011031700001A48 +:10C1C00000402DE984E09FE5042090E4043091E4F0 +:10C1D0000EC042E002C0CCE18EC31CE0030052015D +:10C1E000F8FFFF0A0040BDE8030CA0E1020C50E09C +:10C1F000FF0E1C030700001A0308A0E1020850E02C +:10C20000FF0C1C030300001A0304A0E1020450E029 +:10C21000FF081C03020053006000A0111EFF2FE165 +:10C220000120D0E40130D1E4010052E303005221A7 +:10C230000400001A0120D0E40130D1E4010052E3EF +:10C2400003005221F5FFFF0A030042E01EFF2FE129 +:10C250000101010110B410BC704700001FB500219E +:10C260000A000B000C0068461EC00448009007F04E +:10C27000DEEE019068460FC804B010BD00B10400A6 +:10C2800000009FE51EFF2FE17471000404009FE58C +:10C290001EFF2FE11EFF2FE17871000470B505002D +:10C2A0000C00C6F717FA002814D0686901F09AF953 +:10C2B00000280FD06079217900060014084320344B +:10C2C0000019C17982790802264910431E6491D56C +:10C2D000010000004CB00300000400002E40BAF73B +:10C2E000884201D1012070BD002070BDF8B5040066 +:10C2F0000189081842790379120612141A43151895 +:10C300000E3150180606360E200001F069F900289B +:10C3100007D1697D2A7D0802083610433606360E9D +:10C3200003E0687B297B0002084301F018F900272D +:10C33000FF4300281DD06069C6F75AFB200001F0BA +:10C3400054F9002808D1C6F7CFF9002804D1606954 +:10C3500001F052F900280CD02A00A91D20002681E6 +:10C36000C7F7BBF8002804D0200000F0ABF800208D +:10C37000F8BD3800F8BD0000888E000070B50C00D4 +:10C38000304E15003168042B08D130004068002C75 +:10C3900000D061612A002100042309E0012B09D1AA +:10C3A00029486161C4F7D8FF70682A002100012381 +:10C3B000E0F2A6FA002070BDF8B50D001700214E7E +:10C3C0001C00052B01D0162C14D128894019C178E6 +:10C3D00082780802104304D1280000F073F802208C +:10C3E000F8BD2800FFF782FF002801D10120F8BD29 +:10C3F000052C01D0172C04D13A0029003068052300 +:10C400000EE0032C06D1280001F0E7F83A002900DD +:10C41000032305E0022C05D1B0683A00290002236D +:10C42000E0F26EFA0020F8BD70B5040000F00EF8DE +:10C430000500012020732000E0F2EAF9280000F056 +:10C4400009F870BD000000040100070010B5C8F233 +:10C45000E8E910BD802810B502D1C8F2E2E910BDAC +:10C46000C8F2E8E910BD10B50400CBF29BFC2060D7 +:10C4700010BD124870B50468114EA10706D5002101 +:10C480000161326D01209047022084432006000F95 +:10C4900003D0E02084431020044300250AE0E00795 +:10C4A00006D0A8003258002A02D021002800904768 +:10C4B00064086D1C002CF2D1002070BD003000809B +:10C4C0003CC40004002810B507D00169002905D13B +:10C4D0004189C0880322E0F2C3FD10BDE0F298F963 +:10C4E00010BD10B50189C1220818C18C0024D200EA +:10C4F000914208D10100062212310C30FFF7D1FB26 +:10C50000002800D10124200010BDF3B50400002054 +:10C5100085B00600049003900290019020890127C5 +:10C520000519A8780007800F022800D0002760694D +:10C53000407902280BD12000FFF7D3FF012806D154 +:10C540002020A6802073FF490868401C0860A0884E +:10C5500000287ED003F089FF00282BD0DEF7F9FDFC +:10C56000002827D1DEF7DFFD002823D1002F41D09E +:10C5700020890519E978C80701D1A81D01E0280024 +:10C580001230F14A537E002B0DD0128A092A0AD1AB +:10C590000078C00707D0880602D5E1F76AF80BE0FB +:10C5A0000120049008E002F037FE012804D0E1F7F2 +:10C5B00039F801E0002F1DD0A878010902D0000948 +:10C5C000082817D122892000263010180288DF4B56 +:10C5D00061699A420ED1C07803280BD1002909D095 +:10C5E0000D2080010818806B002803D0803001885E +:10C5F000491C018000F0D7FF002868D02800E0F235 +:10C6000045FC00285BD1002F13D001222000694691 +:10C6100007F01AED00280CD0684607F01AED002844 +:10C620004DD00720019000214F20D6F7ACFC03909D +:10C6300007E00699200002AA01ABC5F730FF0028E9 +:10C640003DD000F0A5FF002848D0C14D01242C6149 +:10C6500000E032E0E0F7DEFF03F004FF00280BD13A +:10C66000E1F7E0F9002807D1BA480660BA48068029 +:10C670000320AC70E0F720FF6B469A880399FF20F7 +:10C68000C5F7ECFDB54C2088002804D0B44904203F +:10C690000856401C09D002240120CAF75BF9641E29 +:10C6A00007D0287A0028F7D103E0C5F7B1FD26802E +:10C6B0002E721D20E0F700FFEE6007B0F0BD2020D5 +:10C6C0006B462073187A002808D1A68006E0002F58 +:10C6D00004D002222000694607F0B6EC76649E285A +:10C6E0000100000048B40300000400007D9A699B2B +:10C6F00004980028EBD01B20E0F7E8FEE7E77CB5C4 +:10C700000C001500497923790906091419430B19FE +:10C71000818842692033802914D980392032818070 +:10C72000517DC906CA0F00922A0001A9D2F20FFB5F +:10C73000A071000AE0710198001B2071000A60716D +:10C7400001207CBD00207CBD1A00D8E78288802AA9 +:10C7500010D9803A828048790A7900060014104383 +:10C7600020300871000A4871E62088710020C871E5 +:10C7700001207047002070471FB501AA04000092F5 +:10C7800002AA03ABE3F70EFB01980204029812140D +:10C79000010409142000E3F746FD20000399E0306E +:10C7A0004181019981810299C181200003F03EFA03 +:10C7B0001FBDFFB581B000201C0001260A9D0B9F04 +:10C7C000286038608A7CD207002A07D0E1072E60F3 +:10C7D00002D0A1071EE03E6005B0F0BD0800123097 +:10C7E00004F082FC00281DD0417902291AD1816809 +:10C7F000C90417D50199C279C97991420DD103991C +:10C800000A290FD3610702D4E107E4D10AE0E10766 +:10C81000E2D061070029DEDADEE7210702D50399BD +:10C820000A29D9D22E60D7E7F3B59BB005000A20BC +:10C830000E9000200C900B904F480990012008901A +:10C8400000200790059004901C98002802D1002039 +:10C850001DB0F0BD2889202241190A916E6910A8E7 +:10C86000DFF282EA10A810AB0F90D878C0070F98BB +:10C8700001D1801D00E012301C9F06904037387DAA +:10C880008006400F012809D9032805D81C981830C4 +:10C89000DFF2ACEB000701D5012400E0002410AB6F +:10C8A000997800200A07920F022A03D10909090783 +:10C8B00000D5012020432ED00F98E0F2F1FA002895 +:10C8C00029D1FFF7CDFD0190387E2C4A41070F9802 +:10C8D000490F0C30E0F2B0F90A280E9018D2002C63 +:10C8E00006D00E98010125480818C168491CC1608E +:10C8F000287B20280CD106980078C00708D10E9814 +:10C900001F490001411810AB188B0009C5F70CF93D +:10C910000198FFF7A9FD29890D91D2F7C0FF2021C9 +:10C920006C1829810D9910AB20392171090A6171A8 +:10C93000198B09092172090A6172B1792170F179A3 +:10C940006170FF21E1740F490978002923D0002884 +:10C950001FD10D48406A19E08C000004C037000464 +:10C96000888E0000D42C000414070004A0060004E4 +:10C9700090060004A0000004BCC4000474CB0004B2 +:10C9800060CF0004CCBE01C014C70004C030807F5B +:10C9900000E00220E074307906280FD110ABD8787F +:10C9A00080070BD4A07C01210843A0740F208001D4 +:10C9B0003018806A816C491C816403E0A07C4008C7 +:10C9C0004000A074A888002802D1287B20283DD1EF +:10C9D00010ABD878800601D50120049010AB987870 +:10C9E0000107890F022931D1397EC90620D50009F6 +:10C9F00000071DD5FF480078002819D0DEF76DFE2E +:10CA0000002815D0FC480068002811D0FB480068B9 +:10CA100000280DD0DFF7EAFD002809D0D6F728F965 +:10CA2000012805D0F6480068002801D101200590B2 +:10CA300003F02DFD002809D00F98E0F231FA00280C +:10CA400004D1022004F022FBDCF771FF1C993000B6 +:10CA5000FFF792FE3100E0310E201A91085E02F0DD +:10CA600066FD20731A990A20085E02F053FD10AB90 +:10CA7000607398780009000703D5387E4007400F9F +:10CA800000E0FF20A072A07A0390A888002804D0BC +:10CA90000F98E0F205FA002858D00020A070E0704E +:10CAA000A888002802D1287B20284BD10398DFF7E3 +:10CAB00049FD00280BD00498002805D00022110061 +:10CAC0003000D0F745FA02E0CE4900200870069801 +:10CAD0000078C00719D1CDF797FA00280CD010AB19 +:10CAE000188B049902090092387E059A09D7908123 +:10CAF0000100000044B803000004000089F51C2F69 +:10CB0000C006C30F3000CEF71FFD07E0387E059A40 +:10CB1000C006C30F04993000CFF732FB059010AB6D +:10CB20009878049902093000DFF711FE0598012872 +:10CB300012D1BA48008800280BD0B94800220068FA +:10CB40004621CDF28EFD002803D0B64901200870A1 +:10CB500002E01620E0F7C4FC2800FFF7C7FC80E6DF +:10CB60000998FF30401C1990416AAF480529189078 +:10CB700008D21898807A002804D00A990998C4F736 +:10CB800059FF0B90387EC00905D01C9A210028005F +:10CB9000FFF7E6FD05E00F9B1C9A21002800FFF738 +:10CBA000DDFD00287ED0A888A070000A22000B328C +:10CBB000E0701C98D11CE0F28BF9387D8006400FA4 +:10CBC00004280DD11C981430DFF21AEAC108C907F5 +:10CBD00006D0800A400703D0E07A0007000FE07219 +:10CBE0007079022810D1300004F00AFA08A90091E7 +:10CBF000112149010CAA07904018019203780E9A5E +:10CC0000300010A9FFF7DFFD0C9800284ED08748B0 +:10CC1000002201888648032303F0F7FC00280090D7 +:10CC200044D00098A98881800099C020088100998B +:10CC30000820087300981221C0300190DFF264E9E7 +:10CC400001981421017100214171E079A27901025A +:10CC5000019811438171090AC1710798406A01283E +:10CC600005D1B068000502D50199A07A08736079F2 +:10CC7000217900060014084301190198AA8814308C +:10CC8000DFF27CE80099F06848610199F07948701A +:10CC90000198B17901700199A8888870000AC8705C +:10CCA000042100E074E0009800F0A0FC287B20281C +:10CCB0003DD0FFF7DFFB02900B9801282FD15A4897 +:10CCC00029000C30DFF2A3FE1998406A002828D111 +:10CCD000189B0022009218897D22D20042431C003A +:10CCE000544809992300CAF737F8002819D1199830 +:10CCF000406A002803D009980021C4F72DFE03F0F4 +:10CD0000D0FB002802D00520E0F7EAFB4B4B4A4855 +:10CD10001C680022290000680523A04727E00B9823 +:10CD2000E3E719981999406A401C48621FE0A888F7 +:10CD300000282DD0FFF79EFB0290404B3E481C6818 +:10CD40000022290000681623A04701280FD10E9861 +:10CD50000A280CD206980078C00708D10E983849E6 +:10CD60000001411810AB188B0009C4F7E7FE0298C8 +:10CD7000FFF784FB0398DFF7EFFB002811D004983E +:10CD8000012809D1002211003000D0F7EBF808E0AB +:10CD90000020A070E070DFE60498002801D11E4951 +:10CDA000087006980078C00719D1CDF737F9002828 +:10CDB0000CD010AB188B049902090092387E059AAA +:10CDC000C006C30F3000CEF7BFFB07E0387E059AE0 +:10CDD000C006C30F04993000CFF7D2F9059010AB0D +:10CDE0009878049902093000DFF7B1FC0598012812 +:10CDF00031D10A48008800282AD00948002200685A +:10CE00004621CDF22EFC1DE0B6050004C805000445 +:10CE1000C405000418060004B50500045C3C0004C9 +:10CE200000000004B1050004DCC50004B2060004E3 +:10CE300074190004310800000400000434030004E5 +:10CE400060CF0004002803D0FF480121017002E0F8 +:10CE50001620E0F745FB012004E57FB504000E0035 +:10CE60001D001421DFF226E825606B46A6721889A2 +:10CE700020817FBDF0B5C36802691900114301D15B +:10CE80000020F0BD0125002B0DD0002A21D11F214B +:10CE90002A008A40134203D1491E0906090EF7D120 +:10CEA000CB40C3600CE0002A13D01F212B008B4025 +:10CEB0001A4203D1491E0906090EF7D1CA40026180 +:10CEC0000289130712091B0F511809010B43038133 +:10CED000D6E700210C000F008C468E4601E0002CA6 +:10CEE0000ED101258D402A4222D0002920D04D1E8E +:10CEF0000126AE401D0035421AD001244833E7F325 +:10CF00000100000040BC030000040000DA2FCF4302 +:10CF10000F0017E001258D4016002E4212D11F2967 +:10CF200010D21E002E420DD00124BC406D1E641E86 +:10CF3000A543644625434C1E2406240E0027A6461E +:10CF40003C00AC46491C0906090E2029D1D3714684 +:10CF500000290CD0CB40CA40C360026101890A0796 +:10CF60000B097146120F591809010A4302816046E4 +:10CF7000F0BD70B50400008988B006092000FFF7F5 +:10CF800083FF0028019023D0182102A8DEF29CEF35 +:10CF9000B34920680622411802AD03A8DEF2F8EE7C +:10CFA000A07A6B46987428000422103001A99E8252 +:10CFB000DEF2EEEE04206B46D882FF209A30188114 +:10CFC0001020588120681423592102AAD6F75AF854 +:10CFD00008B070BD080000214160CAE7F7B582B013 +:10CFE0000C00FF27049800266030DFF214E80500EB +:10CFF0002168029881425ED1A8780007800F02283C +:10D0000059D10298F1239B000622A91DC018FEF7F2 +:10D0100066FE00284FD1A87800090DD004280AD058 +:10D02000082802D00C2808D1012604984030007E40 +:10D0300047077F0F01E001260027A07AB8423AD1C6 +:10D04000288B218900090909401A01D420281BD303 +:10D0500060680027002802D0CDF21FFF6760200023 +:10D06000FFF787FF288B218900090A09801A01D45C +:10D07000202809D3E76008072761298B000F0909D9 +:10D0800009010843208100200121002E04D02269DB +:10D0900081400A43226103E0E26881400A43E26082 +:10D0A0006068002807D1002200926E4A6E48231D56 +:10D0B0002100C9F75BFE05B0F0BDF0B500260C8B72 +:10D0C000178825090C7E2407240FAF420FD1C97899 +:10D0D0000907C90F214303D01988491CA14202D175 +:10D0E00005998C4201D38680F0BD1C80F0BD002CD8 +:10D0F000F9D11580F9E7F0B50025A1B02C00039512 +:10D10000029503F0E5F9002806D000F05FFA002848 +:10D11000FAD056490120C86019E202998A06491CD2 +:10D12000002A029104D1524A516BD30D1943516325 +:10D13000002118AB05911A7C9206520F012A05D9DD +:10D140000121032A02D80D990907C90F0491018909 +:10D15000081807A902F029F91F98002805D1069898 +:10D1600000218180FFF7CCF9F1E11F980C3003F02A +:10D17000CFFF040005D11F990120123103F0EAFF0F +:10D1800004001F99200002F0FDFE002801D00024B9 +:10D19000E5E7002CE3D006994C61607902280CD1B8 +:10D1A000200003F05EFF10300390A0681F9AC004B7 +:10D1B0000699C00FDFF20BFE17E02079012801D09D +:10D1C00006280CD123001F9AAC330120DFF209FEA0 +:10D1D0002079012809D1200003F078FF05E0230021 +:10D1E0001F9AAC330120DFF21FFE069801890E184A +:10D1F000F178C90701D1B71D01E0370012370D21C1 +:10D20000890161182091896B002902D00A6B521C98 +:10D210000A633978C90706D02099896B002902D0A2 +:10D220004A6B521C4A630499002976D180880028F1 +:10D2300074D0B0780007800F02284DD1CEF7EAFBFA +:10D24000002804D00B49200007AAFFF7C7FEB078DA +:10D2500000090C282DD004282BD00DE0B1050004C6 +:10D2600029020000400D030005BD0300D42C00047A +:10D2700000340080C02C0004082804D118AB187DAD +:10D280004007400F00E000201121490161188A7910 +:10D29000824203D00022D2434A80887189208000D4 +:10D2A00010222318801E009222181F990698FFF75B +:10D2B00004FF0698808800280ED1200007A9FFF7F8 +:10D2C0006FFA0698FFF71CF92098806B002802D0AF +:10D2D000016A491C01623AE1A068C0031FD5F078D9 +:10D2E000C10712D1800710D5F1208000211830002D +:10D2F00006221230FEF7F3FC002806D1069988803A +:10D300003878C207D20F012104E03878E0D41CEF4E +:10D31000010000003CC0030000040000D8D61755EF +:10D32000C00710D100221100200006F0BEEE0AE076 +:10D3300049E03878C0070AD0F1208000221806980A +:10D340003100D1F211FD0698808800283BD0607929 +:10D3500002283DD1200007A903F063F81F99039824 +:10D36000C978007EC906C90F884218D02000DBF7B3 +:10D37000C4FF2079032812D12000E3F79AFE002889 +:10D380000DD0617902290AD1807FC00707D0200023 +:10D3900006F022ED002802D0200006F022ED200049 +:10D3A00002F0ABFE200002F0F7FE012803D11F9926 +:10D3B0002000DAF73FFE03984030007E032803D0B8 +:10D3C000069900208880A9E0069880880028FAD075 +:10D3D00007A8C6F7E1FD2000D1F7D8FA3878C007D2 +:10D3E00011D1C6F7D6FD00280DD1CCF72BFE0028B1 +:10D3F000069808ABDA7D818807A802D0CEF7A4F999 +:10D4000001E0CEF7C0FF1F98DFF246FD00281ED0D6 +:10D4100006988188603981801F99097E090707D1A4 +:10D420001F99C978490703D41F990988818075E03D +:10D43000624A00920189624A624B0918DFF23CFBA2 +:10D4400000287BD00690018908181F9066E01F987D +:10D450008079C007209823D0C069002825D0617941 +:10D46000032920D11F99083005002031C9784030A8 +:10D47000007C8909884204D153498868401C88602F +:10D4800013E02098006A0028F6D008305022125C81 +:10D490008A42F1D14C4905004868401C486004E0CC +:10D4A000406A002801D005000835002D4DD0E979EB +:10D4B0000807000F022801D0032810D111225201C1 +:10D4C000A21892881F990120002A00D00020DFF2C4 +:10D4D000F2FC06982A0007A900F0C2FA17E001281A +:10D4E00001D008072BD1002000F0FAF80028FAD16B +:10D4F0002A0007A906A8C4F7E6FD002804D106986B +:10D5000000282ED0002181800598002806D0E879D7 +:10D510000007000F022809D0032807D0069807A9A2 +:10D52000FFF71BF8069807A9FFF79CF9CFF786F9D4 +:10D53000002816D00120CFF78FF91EE011E0234814 +:10D54000C3F732FFC9F7D2FAE8E72098806B816809 +:10D55000491C81601F98BF21C07808401F99C8707E +:10D560002EE71B480068002807D1012107AA01F017 +:10D5700048FF0028069000D0D9E516498020C04316 +:10D580000861DFF2E4FD002802D00420CFF764F93F +:10D5900011490020C860002C086106D00F208001CE +:10D5A000201800690321D5F7CBFE21B0F0BD0B4A4E +:10D5B00001000120914200D000207047E0B701C077 +:10D5C000E8B701C060FC02C08C000004020001004A +:10D5D0007405000400A50080D42C0004888E00008F +:10D5E0000A4900204968002904D00949097800291E +:10D5F00000D001207047054900204968002904D067 +:10D6000003494978002900D00120704798000004A0 +:10D61000D42C000402220B0010B50100027309484B +:10D620001C220068DFF294F910BD4069C0687047A1 +:10D6300010B5406903F04FFD10BD10B54069CBF740 +:10D64000DBFF10BD040000040F2189014018C068F1 +:10D65000002803D02030407EC007C00F7047030071 +:10D660000A0000B5FFF7F0FFFD21002814D00F20BD +:10D6700080011818C368C0339A61C0680300C033C2 +:10D68000002A08D02030407EC00701D0586909E048 +:10D69000907A0840907200BD002AFCD09868430739 +:10D6A000F6D5C0070028F3D100BD38B51400049AA0 +:10D6B00000922200E9F789FD38BD10B5E9F74DFD6C +:10D6C00010BD10B5E9F75CFD10BD10B5E9F7BBFD65 +:10D6D000112800D1122010BD10B5E9F7BCFD10BD16 +:10D6E00010B5C8F7AEFFF9484068002800D0012007 +:10D6F00010BDFFB587B00C0005001700109E1C215F +:10D700006846DEF2ECEB0098012109048843F17BC6 +:10D710006B468907C90F090408430121A1F3E46A94 +:10D720000100000038C40300000400008B0CC43961 +:10D73000C9040843490200908843F17B4907C90F97 +:10D74000090708430090B07BD873B0680490E07973 +:10D7500003210007000F0906022802D10098884320 +:10D7600008E00328009804D18843012109064018E5 +:10D7700000E008430090DC4A8001810FD948A21ADA +:10D78000002901D10C3202E0012902D10D3210042E +:10D79000000C03998004890B800C890301430391D9 +:10D7A0000098012149078843F17B01958907C90F3A +:10D7B000C943C9078908084300908001810F1ED121 +:10D7C0000098C00015D5208F288428002030817053 +:10D7D000B9012031C170606B6862208F401C000469 +:10D7E000000C208702D1606B401C606328881030D9 +:10D7F00028800A9A2900684604F042FE18E0800F4B +:10D80000012807D123000A9A0C332900684604F046 +:10D81000E3FE0DE000987F21C009C00108300090B0 +:10D8200003980904884300994906490A084303906C +:10D830000098C00007D4A8780007800F022802D102 +:10D8400028888038288070681C226946DEF2B4EA95 +:10D850000BB0F0BD10B5CC79030000202409022CD8 +:10D8600002D14031087C10BD002AFCD05979022930 +:10D87000F9D1180003F0E2FB0721C9014018C08A62 +:10D880000006000E10BDF0B58C4696461A00072122 +:10D89000090203004B43954C07011E197518944962 +:10D8A0007C18002A39D0E17B01237246002A00D07F +:10D8B00000235A00FD231A431140E1736146A1730E +:10D8C000617B8B4A491E0906090E617311D18100E3 +:10D8D00088480818006A030C5B1E63732073854830 +:10D8E000C0300818006AD05183480818006860608A +:10D8F00003E06068A84200D16660A068001DA060D7 +:10D90000E17B490702D5C005C00D04E0C11FFF3906 +:10D91000FA3901D10020A060F0BD207B4022401CDC +:10D920000006000E4028207300D22273607B401C4A +:10D930000006000E4028607300D26273C8591C3084 +:10D94000A842C851E8D1CE51F0BDF8B504000D0091 +:10D9500016001F0000F0F3FA002811D03A00210051 +:10D9600020000123FFF78FFF32002900200000F084 +:10D97000EBFA604AA1004032604889180862F8BD9D +:10D9800058484730C3F71AFDC9F7BAF8F8BD70B563 +:10D990000500FEF78DFD040028894019016F8A7883 +:10D9A0001209092A01D1012006E06030007F544AA3 +:10D9B000800010580006000ECA785207D30F2A00C4 +:10D9C000FFF7C3FF2000FEF777FD70BDFFB583B002 +:10D9D00000240600170006980294C0790007000F83 +:10D9E000022805D1069A0498390004F098FD06E053 +:10D9F000032807D1069A0498390004F036FE040083 +:10DA0000012834D03A4930014518E87BC0070DD1D0 +:10DA100038006030DEF212EB3B00029A0699583370 +:10DA20000095FFF770FE68681C306860142030496C +:10DA300070435831401804992838DFF206F819204D +:10DA400000022F4970432F4D30314018296864235C +:10DA5000594364224018D901401A3900DEF2ACE97A +:10DA60002868401C4028286001D100202860200040 +:10DA700007B0F0BDFEB50C0007001500FEF718FD5D +:10DA800002260090300000F05AFA00283CD0200016 +:10DA900060300190DEF2D2EAC07802214007C20F66 +:10DAA00030000123FFF7EFFE2B0022003900300089 +:10DAB000FFF78CFF01280ED10198DEF2C0EAC07892 +:10DAC00002214007C20F30000023FFF7DCFE3800C0 +:10DAD00000F06CFA1DE0074908484831086218E078 +:10DAE00000A00090FFFF000058DA01C0C0E701C0AD +:10DAF000285C040000A1009000A2009001000080BA +:10DB0000F8420400309201C0FC48C3F757FCC8F744 +:10DB1000F7FF0098FEF7D0FCFEBDF0B5002591B0F0 +:10DB2000F748069505950395046A2E00A336DA2674 +:10DB30000100000034C80300000400007F63B18DC1 +:10DB4000016AA1430162200E05D0F148401CC3F7D1 +:10DB50003FFCC8F7DFFF2002000E78D02002000E45 +:10DB600008902006000E002407900898C0076FD088 +:10DB7000022C6ED2E849A0004018006AE200E74992 +:10DB8000121B12025118E64A8A18824201D10291F0 +:10DB900001E01C30029020010E9082E001200190F3 +:10DBA0000020142161430490DE48081810901CE006 +:10DBB0003889DC49C01906900E9830390E580698FD +:10DBC0007568006FA84202D0C078400704D5786914 +:10DBD0000490688809900CE0D3490868401C0860EC +:10DBE00000213800FEF75CFC1098DEF2E0FE070032 +:10DBF000DED10498002802D1002F2ED022E008ABFD +:10DC00005879400734D40499380000236A4602F05A +:10DC100001FB002821D108AB18790007800F0228EA +:10DC200018D130688001800F012804D10698006F58 +:10DC30000188891E0180069A0498390000F0E9F9EC +:10DC400000280AD100213800FEF72AFC05E07EE119 +:10DC500076E12FE03800CFF70DF80198002820D0AA +:10DC600000222006000E11001300FFF716FE18E038 +:10DC70002988280020300818C01C800880000090E7 +:10DC800001880022103901802006000E11001300C7 +:10DC90000F90FFF702FE00990F983A000123FFF75B +:10DCA0005EFEA0490E98303908580299884200D08B +:10DCB00074E745E1A01E0128FBD29749A000401857 +:10DCC000006AE2009549121B12025118944A8A1800 +:10DCD000824201D1029101E01C30029020010A90A1 +:10DCE0000FE1002104910799E140C90739D0456847 +:10DCF0000600A8780007800F022802D12F00603F9D +:10DD000001E02F00A03F14208649604328314018CD +:10DD10002838390004F08EFB83480169491C0161F1 +:10DD20008168491C8160786900280ED00D21890125 +:10DD30004018806B002808D04268521C4260786905 +:10DD40004018806B0169491C0161380000F038F906 +:10DD500076494868401C4028486001D1002048604E +:10DD6000C7E07148C168491CC16014216D48614316 +:10DD70002830081828380D90DEF219FE07004BE015 +:10DD80001920000260436A496423401867494968C2 +:10DD900059434018D901401A624905900A98303910 +:10DDA0000E5830688001810F06D15A484169F068E9 +:10DDB0008004800C0C3808E0800F012807D15548FA +:10DDC0004169F0688004800C0D38081803900598AC +:10DDD00075686030DEF23CE9A8420AD1786953499F +:10DDE00004904868401C4028486017D100204860D3 +:10DDF00014E0380000F0E4F80D98DEF2D8FD4A494E +:10DE000007004868401C486048494868401C402852 +:10DE1000486001D100204860002FB1D1049800284B +:10DE200005D1002F65D0380000F0CAF861E00598F0 +:10DE300060300C900B90DEF20CE90188803101809B +:10DE40000B98DEF206E98079C0070BD10398807940 +:10DE5000800707D504984079022803D003990498D5 +:10DE6000FFF711FC0398C0790007000F022805D1C5 +:10DE70000C98DEF2EEE80188103906E0032805D19F +:10DE80000C98DEF2E6E8018822390180B888603813 +:10DE9000B8800C98DEF2DCE880780007810F022958 +:10DEA0001ED1244A00923889234AC119234B3800D5 +:10DEB000DEF216FE00281CD0070004980D2189010F +:10DEC0004018806B002802D0416E491C41660599BC +:10DED0003800FEF756FB05993800FEF7D7FC08E03E +:10DEE000800F03D13800D6F79BF902E03800FEF727 +:10DEF00025FB00222006000E11001300FFF7CDFCC9 +:10DF00000A980849303908580299884218D0E8E63A +:10DF10004700010000A0009000A20090C0E701C0EF +:10DF2000E4060000585C040060370400309201C031 +:10DF300028430400E0B701C0E8B701C0DE3C63D568 +:10DF40000100000030CC0300000400002CB962E1A5 +:10DF500060FC02C00898641C4008032C089000D2A2 +:10DF60000DE611B0F0BD224900014018407B70471A +:10DF7000F7B582B00700118916008C188021095965 +:10DF80000191C979536909070020090F022907D1B6 +:10DF9000206F01998079C207D20F1800FFF76EFC3D +:10DFA000134A39018D18E97BC90709D1020001998B +:10DFB000039823000095FFF7BAFB68681C3068607F +:10DFC00014200B497843303140183100DEF251FD06 +:10DFD00005B0F0BD10B50169002902D1FEF7B8FA0D +:10DFE00010BD044A9142F9D1D6F72EF910BD0000B8 +:10DFF000285C0400201A000410B50C008968CA00CF +:10E0000010D5012212079143A1602178012249070E +:10E01000490FE4F7A9FB0101206F028B1207120FD1 +:10E020000A43028310BD70B50C00060015001100F4 +:10E03000FFF7E2FF3079012804D101212000F8F731 +:10E04000A4FB70BDCDF75EFD00282AD06035687F47 +:10E05000162826D0212824D0222822D0208905194C +:10E060001435200005F065FCE9692000D4F787FA33 +:10E07000002811D0C5F7ABFF002802D0C6F742FA3E +:10E0800008E0DDF766FB002802D00020CEF704F898 +:10E09000CBF7C9FF012070BD200005F071FC002006 +:10E0A00070BD200001F040FC70BDF8B5040000898F +:10E0B0006669051980204059002815D0C1790907E3 +:10E0C000090F022907D1827AD20704D0286F01886C +:10E0D0001039018004E0032906D1807AC00703D0FB +:10E0E0002000FFF768FCF8BD3100200000236A46DD +:10E0F00002F09AF80128F6D02A0021003000FFF73C +:10E1000092FF0028EFD12000E7F74AFD0021200010 +:10E11000FEF7D0F9F8BDFFB587B001241600171F30 +:10E12000119D04E0FF48C3F75DF9C8F7FDFC042F1B +:10E13000F8D22800361F603031060690090EA8205C +:10E140004843F94B8646C718FF20401C8840844648 +:10E15000109E10203B00089A8840A4331C3E012AE0 +:10E16000059374D10391F1496346896A62460B4273 +:10E1700034D1084204905FD1EB4B7046185C002804 +:10E1800020D12878002241070798490FE4F7ECFADC +:10E190006B46998800010907090F0143019118791D +:10E1A00000090001187101990A98D3F275FF0698C9 +:10E1B000017F0A98D4F2D3F9DC4904988A6A1043A3 +:10E1C000886239E00A430499D848114381625EE0CD +:10E1D0000A9878700598FEF78CF90EE0D34B07008B +:10E1E0000F420CD0109A03990798CEF7D0FD012862 +:10E1F00003D130000021FEF75DF9002479E091435E +:10E20000084398620398A8264643C74F0EE0029938 +:10E21000A8780A0088700798143201F04EFBB85DA8 +:10E22000401CB85502981C38FFF73FFF039802A91D +:10E23000CEF785FD0028EAD0002C5AD00398A823F9 +:10E240005843B94A115C491C115452E0FFE7089A3F +:10E25000022A4ED10391B5496346896A62460B4250 +:10E260001DD1050008423BD0AF4B7046185C00281A +:10E2700009D10698017F0A98D4F287F9AB49886AD8 +:10E28000A84388622CE0A9480A43AA438262109AF4 +:10E2900003990798CEF77BFD0028AAD198E7A34BF6 +:10E2A00007000F429ED09143814399620398A826AC +:10E2B00046439D4F0EE00299A8780A00887007989F +:10E2C000143201F0FAFAB85D401CB85502981C38B7 +:10E2D000FFF7EBFE039802A9CEF731FD0028EAD044 +:10E2E000002C06D00398A82358438F490A5C521C7F +:10E2F0000A5420000BB0F0BDFFB581B00C00060041 +:10E300002030007D0D0000272034FE2807D0617AE0 +:10E310004006C909C901400E014361720DE0307920 +:10E3200001280CD13000E2F770FE407D002806D1B4 +:10E33000607AC009C001401C607201270FE009200B +:10E3400080013018D9F2A6FE617A400630B157C27A +:10E35000010000002CD0030000040000937C475211 +:10E36000C909400EC9010143617204980078C007D1 +:10E3700004D0E869012109030843E861A86C02217F +:10E380000843A86404980078C0071FD0E869C90151 +:10E39000084320218843E861707902280AD1039854 +:10E3A000002803D00398D2F209FA08E0300001F007 +:10E3B00034FA04E0002F09D13000D4F701F8617A73 +:10E3C0004006400EC909C90101436172607A4106E5 +:10E3D000490E032907D85B490978890603D5C00986 +:10E3E000C001401D607205B0F0BD42689279D2074D +:10E3F00001D03F2103E0112252018918098A818747 +:10E400007047F3B50024050081B04F4E30783100DD +:10E41000497800283ED102F066FE04000079012808 +:10E4200006D1029802F0A6FE00285BD0040059E055 +:10E43000002801D0062855D12889471938002030F6 +:10E44000F9F724FD0500029802F094FE002819D087 +:10E450008168CA0416D5727BD2060BD4042D11D064 +:10E46000002D0FD0012D0DD0022D0BD00A2D09D07B +:10E47000FF2D07D00400032D34D101200003814378 +:10E48000A1602FE0207900282CD079780020E2F7D5 +:10E490002EFCCBE7012801D0022823D102F023FE75 +:10E4A00004001FD0607902281CD102980078C007B0 +:10E4B0000BD0200002F0E0FD002813D009218901D3 +:10E4C0004018806B00280DD10BE0029802F052FE3C +:10E4D000040002F0F8FD002C04D06030007A03281C +:10E4E00000D000242000FEBDF8B505002F000089F3 +:10E4F0005419401900901C202E187C3700292881BF +:10E500003ED060782178000208431E2801D91E38C9 +:10E5100000E000202070000A607084213000DDF2ED +:10E5200006ED0098407CF8776869007903280ED0E2 +:10E53000D5F786FF012809E05000010060C80004FB +:10E5400088020004C4E8000400CB000401D10520C7 +:10E5500000E00020B070A0780007800F022820D1D2 +:10E5600002F0EFFD00281CD165217977FD49C868CC +:10E57000CA0D1043C860FC480178491C017010E0C6 +:10E58000607E217E000208430007000F2076000A0B +:10E590006076E078FB210840E070207E00090001F1 +:10E5A00020763078072108433070092034673877A7 +:10E5B0002800EAF79BFA002802D12800CEF76EFB6C +:10E5C000F8BD70B5E948DEF206FA04001FD02089D4 +:10E5D00005196978287802F086FD002810D060615E +:10E5E00068792A7921890002104308180204120C64 +:10E5F00001212000FFF778FF0120CEF755F902E056 +:10E600002000DEF255F9DA490868401C086070BD48 +:10E61000FEB5D548816A0905090F6CD0D54F002495 +:10E62000FF20D14A401CA040916A03000B425FD0FA +:10E63000A82565437B5D002B5AD181431020A04063 +:10E640000842916236D0CC49CC4805F0AAEBCC4ABE +:10E650000020EE1918214143535C002B20D089186B +:10E660008978737899421BD1182358438118081D63 +:10E67000029102F07FFD029900224978E4F77EF8CA +:10E680006B46198800010907090F014300911878AA +:10E6900000090001187070780099D3F207FD02E0BC +:10E6A000401C0428D6D3201D01067078090ED3F231 +:10E6B00060FF0AE0B349B14805F072EB201D010686 +:10E6C000E8194078090ED3F26AFFAC4E0AE0AE4971 +:10E6D000300005F066EB01981C38FFF7F0FC785D20 +:10E6E000401C7855200001A9CEF733FB0028EED05E +:10E6F000641C042C94D3FEBD30B5A3B068462290B0 +:10E70000FDF7F4FE04000AA8D4F7DCFA002804D1CF +:10E710002000FDF7EFFE23B030BD0620D4F21AF939 +:10E720000004000C0621D2F297F82000FDF7E2FE6B +:10E73000229C20000C3002F01DFD0500210001F09C +:10E7400053FC0128DCD0002DDAD0A0780007800F20 +:10E750000128D5D12A6B0AA9002A02D0CD981EB96A +:10E760000100000028D4030000040000C0A6943E6D +:10E7700028009047CEE72800EEF76DFCCAE7F0B519 +:10E78000CBB000277D4C864811970D976062200022 +:10E790000C2201212430C8F784F9CEF741FB8148CF +:10E7A0004A90C1208002C2F731FE0022D243734D4D +:10E7B00000927D49E869082244ABFEF7A8FF7B4838 +:10E7C000416BC20D114341637948C2F71FFE449863 +:10E7D0000028E6D0400607D50020E2F701F9754988 +:10E7E00048684A06104348604498C0060AD5E2F7D4 +:10E7F00017F97148072200681021FEF794FF3B20AB +:10E80000DEF7B4FE4498000601D5E9F764FD4498AC +:10E81000C00501D5E9F754FD4498810602D5674A41 +:10E8200000211170400501D500F070FD4498C0042E +:10E8300001D5FFF76BFF624C20680028B1D14498E6 +:10E84000400701D5FEF793FC4498800710D5286B4C +:10E850000028A6D104E01398C0220021FFF74EFE45 +:10E86000286A0422002313A9FEF759FF0F28F2D1CA +:10E870004498092108427DD0524801684148006807 +:10E88000814201D0FFF7A7FE02F0EFFC002888D0FC +:10E890003A48C06A002884D1CEF72CF9002880D1EC +:10E8A000FFF7C0FE0026D7E30020099008900690ED +:10E8B0000D988106401C00290D9004D13B49486BFE +:10E8C000CA0D104348633F482E49006809688842D2 +:10E8D00001D0FFF780FE38891222C11931484591D5 +:10E8E0000838DDF292EA2F48459908388288511895 +:10E8F0000C9141887D229201914200D3FEE7294884 +:10E900000838007B082803D32649002008390873FB +:10E9100024480C99083810AA00F014FD012807902B +:10E9200013D110AB187800F008FD08908030466ACB +:10E93000300002F0ABFB08980899050014358431CB +:10E94000159081610120129023E10C993800FFF7A6 +:10E9500062FD06007ED0300002F098FB0400707962 +:10E960000C990125032802D13100AC310025062283 +:10E970000AA829E095E3000000A8008088020004AE +:10E980003CD000043803000460C8000411111111C8 +:10E99000BBBBBBBB14CB0004222222223333333354 +:10E9A000EC30000408CB0004FF1F0000003400809E +:10E9B0000404030040A500807C0500048D060004CB +:10E9C000740500042C030004DDF21EEAFF4810AABF +:10E9D000007B0AA9FE4BDEF2AFF9002805901CD09F +:10E9E000FC480068002818D0FB480068007900281F +:10E9F00013D110AB1878F54932002B0000F0D4FC8D +:10EA0000842108901590DDF29CEA1598089905007C +:10EA1000143584318161012048E00120099016A855 +:10EA200084211590DDF28CEA3CA81C90E748159DE6 +:10EA3000407B1435C00729D0CEF7AAFADCF7E3FBF8 +:10EA400000281CD0E5480078002818D1CDF760F8E0 +:10EA5000002800E019E010D03000E6F7D0FF0121D7 +:10EA600000220091D9490192497B02000907CB0F8E +:10EA700001213000CEF72CFB01E0CCF75AFDDCF78A +:10EA8000ACFB002801D0DDF79DFEE0E130790128E4 +:10EA900004D07179022901D0062804D10C993000E4 +:10EAA00002F0FCFB02E0300002F006FC1290E37F73 +:10EAB00031002800FFF7A3FC1A00290030000AAB40 +:10EAC000FFF72EFCC64901200979C90609D47179DE +:10EAD000022905D10521C90161180978090700D467 +:10EAE00000200E903079002817D130002030499056 +:10EAF000807D000711D42920405D4006400EDEF2E3 +:10EB000095FA04001220DEF291FA844205D8499861 +:10EB1000807D8007C20F012104E03620805D0E99C0 +:10EB20008007C20F2800DEF273F9AE484069002862 +:10EB300007D00C980078C00703D1E869202108436A +:10EB4000E861E869810615D5A7490968002911D04F +:10EB50002921495D4906490E29290BD301210904C0 +:10EB60000843A249E8610968002903D09892F49407 +:10EB70000100000024D803000004000034C9E18A29 +:10EB8000012149040843E8610598002818D029208C +:10EB9000405D4006400E04F051FF002806D0994920 +:10EBA000C84305F012E901200F9010E095489649FE +:10EBB000C04305F00AE902200F900120099006E009 +:10EBC00090489249C04305F000E90020F4E79049DD +:10EBD0000120087001F093F9079A0092129A459863 +:10EBE0002B00310000F0B9FA1C2139817918159CED +:10EBF00046910021A18069807E61159C78493794F7 +:10EC00004A880006000E121A30AB9A84459A898809 +:10EC1000101808183890002038ABD8717079032884 +:10EC200001D001280CD1300002F050FB002807D0A1 +:10EC30006B48017B300002F055FB6949087315E011 +:10EC40003079012804D1300002F040FB002805D1C2 +:10EC50007079022802D03079062809D10C99300049 +:10EC600002F026FB002803D05D48007B38ABD8714A +:10EC70000F98002807D037980121806809070843BA +:10EC8000379988600FE0129800280CD038ABD979FA +:10EC900001223000E3F786FD30AB998D00010907B2 +:10ECA000090F014399850798089A00280DD04C4810 +:10ECB00006A9C0886B460006000E07C33900119BE9 +:10ECC00014AA37A804F06FF811E006A80290129970 +:10ECD000434804920391C0880F9A0106090E0192DD +:10ECE0000091119B390014AA37A803F07FFD698CAD +:10ECF0000028E18003D047490968002909D0002194 +:10ED00003800FDF7F5FB434900274868401C486080 +:10ED1000ACE11499002917D0A1680122D206114351 +:10ED2000002EA16009D00D2189017118896B00297D +:10ED300003D060310A8B521C0A8329494A7B920610 +:10ED400002D54A7C7F210A5520674A98DDF2A8E95E +:10ED500000094A990001DDF2B4E929002031489107 +:10ED6000497A10224906490E114308434A99DDF2B7 +:10ED7000A8E9E0601A48407B000706D5CEF712F9F3 +:10ED8000A0680121C907084302E0A06840004008CC +:10ED9000A0603079062803D1206F2030F9F78AF877 +:10EDA0007079032801D0012808D10D48817B027BAE +:10EDB0004B002100300002F0C4FA50E01298002805 +:10EDC00003D00748007BDEF265FADEF274FA0490A5 +:10EDD000079800282AD10F98002824D0014A1BE068 +:10EDE00000CB000414CB000414180004C00000047D +:10EDF000B4050004C4E800048802000418BB01C084 +:10EE00001CBB01C04444444455555555666666666E +:10EE100004180004F0B701C0210010AB18787C3151 +:10EE2000DDF2C3FF02E004997C200155E248416A0B +:10EE300004984000A430085AE049884203D0E048D2 +:10EE4000807B002802D1A08800280FD0DC480499DC +:10EE5000807B43007C20025D200002F053FA0028F2 +:10EE600004D100213800FDF743FBFEE03079002893 +:10EE700002D0707903281DD101F0D0FB002819D0F1 +:10EE8000CF48C088DF2802D137217D200155CD48E9 +:10EE9000A0800898002805D010AB187800F026FA5A +:10EEA00000F03EFA0F98012804D0E0680E21DDF250 +:10EEB000B0FFE060A088002803D02900200000F007 +:10EEC0000AFEC148816800290AD069880122D2035C +:10EED00011436980002129616961C168491CC160D1 +:10EEE0004598286546986865E889608207980128F2 +:10EEF00020D1B348C088E628207802D18021084379 +:10EF000001E04006400E10AB2070B0491878DDF2E9 +:10EF100016FF7C20005DA823001F5843AC490A5C03 +:10EF2000521C0A5420882884469884222100DCF24E +:10EF3000E0EF97E0149800281FD00F9801281CD00C +:10EF40003000D3F751FA41064898490E407AC0097B +:10EF5000C0010843489948723179032904D1C00996 +:10EF60004899C001401D4872E869A02188430121E9 +:10EF700009030843E86101200990A88910191B0CB6 +:10EF80000100000020DC030000040000671332E6EB +:10EF900020820698002801D0802108514898407AA4 +:10EFA0004006400EA070206F80780009082810D11C +:10EFB0004A98DDF280E887490122C988E62900D015 +:10EFC00000220092020038ABDB7921002800DDF23C +:10EFD0000BFF0F98012810D18349844804F0FEEEFE +:10EFE00010AB7F491878DDF2B4FEA0680121490713 +:10EFF0000843A0600A20287009E07B497B48C94388 +:10F0000004F0ECEE2A0021003000D2F73CFF2A0089 +:10F010002100300000F079FC7549744804F0DEEE00 +:10F020007248A16804F0DAEE200060304790017F5A +:10F030006E4804F0D4EE208828844698842221006B +:10F04000DCF260EF0F9800280CD0469901940091F3 +:10F05000479810AB027F1B780F993000FFF783F8B9 +:10F0600000280CD00998002806D10898844203D1C2 +:10F0700008980121A03001733800FFF73EF80027FF +:10F080005C480068002817D1002F00D020E4449885 +:10F090000821084202D005F052E80BE05648DDF2A4 +:10F0A000B8FC002804D15548DDF2B3FC002801D09B +:10F0B000042101730700E9D1002E06D00F20800142 +:10F0C000301800690321D4F781F94D4900200870F8 +:10F0D000FFF77BFBF8B504000D001600001F0328A6 +:10F0E00040D8484A201F0121926A8140114239D0FC +:10F0F000A82343433B4FF95C002904D0491E09066D +:10F10000090EF95407D1FF21491C8140114202D058 +:10F110000120CDF7E7FB002D24D02869002821D05D +:10F120002F4A002018214143535C002B1BD0891823 +:10F13000C978A14217D11821414389180C002968C8 +:10F140000A34096FE31C098B5A1E0909491C2180E6 +:10F15000002119701178002904D10106090E300030 +:10F16000CFF7F5FBF8BD401C0428DBDBF8BDF8B594 +:10F1700004000800174D0699AF8800263C195F6807 +:10F18000012916D1EB8802002100AC32E62B09D010 +:10F190000379012B06D04079022801D1891D02E0B4 +:10F1A000062B00D11100380012300622DCF240EEAE +:10F1B00005E00092074923003A0000F025F8E888AE +:10F1C000E62800D00C263000F8BD000014C700046B +:10F1D000FFFF000000CB0004FF7F0000F0B701C07C +:10F1E00014CB000460C8000477777777BBBBBBBB48 +:10F1F000999999997405000414D0000400D0000472 +:10F200000418000488020004FFB583B0040016004F +:10F210000F00911C0C9800220291130069460CC14A +:10F220000122F979BB7909021943E92900D00022AA +:10F23000797BC907C90FCFF24DFD0500F879B9797F +:10F2400000020843EA2803D1797B0822114379732D +:10F25000F121890062182379012721003F03AC3195 +:10F26000012B19D0062B1DD10B0006993000CFF2CF +:10F2700002FD0F2080012018806A808F002800D1B5 +:10F2800000273D4302980622058030001A30694667 +:10F29000DCF2CEED07B0F0BD0B0006993000CFF2E6 +:10F2A000EAFC23E06379022B15D1069B0A0006993C +:10F2B0009B1D3000CFF2DFFC012040020543B079F6 +:10F2C000C007DFD102212000D8F799FE0128D9D14B +:10F2D00040030543D6E7E62801D10B0000E0069B7A +:10F2E0003000CFF2C8FCFF20401C054303480068F3 +:10F2F0000079C3E70148006800797047C000000446 +:10F3000010B50400FDF710F93A4A01211368A14035 +:10F3100019431160FDF70CF901208002CDF7E2FAE4 +:10F3200010BD34490F2010B5086001208002CDF7D0 +:10F33000D9FA10BD70B5FDF7F7F82F4D2D4E00210D +:10F340000C003268D30704D0B8234B435B19A033B9 +:10F350001C735208491C04293260F2D3FDF7E8F807 +:10F3600070BDB8235843244940187047F7B50500CD +:10F370000026214F3400B8206043C1190800A03096 +:10F38000027B012A1FD16A78037A9A42ED225884BF +:10F39000010000001CE00300000400004F82B75B86 +:10F3A0001BD12A78837A9A4217D12A7B437A9A42D0 +:10F3B00013D1C07A002802D1687BC00609D58031FC +:10F3C000486A1349062241180198FCF7E2FC00281C +:10F3D00003D102980126047002E0641C042CD4D3EB +:10F3E0003000FEBD30B51C00B8235843074B4D78A4 +:10F3F000C0180300A0331D720D789D72A4252A50F9 +:10F40000097B5972DC7230BD081800047CCC000402 +:10F4100029020000FFB581B0050000201E4C2860C5 +:10F42000206A0E001700002817D0FDF787F8216A20 +:10F43000002910D00A79032A0DD1096A00290AD0BF +:10F440002960216A09683160216A496A3960216A44 +:10F450000A6B04990A60FDF775F805B0F0BDF0B5C8 +:10F4600087B006000F00002504AA05A906A803AB73 +:10F47000FFF7D0FF069C002C0AD0049A01923300BB +:10F480000022009705981100A047002800D0012510 +:10F49000280007B0F0BD0000703600046021018133 +:10F4A0007047F7B582B000242500002801944AD1A6 +:10F4B000049801A900F0DEFB040033D06B469A8863 +:10F4C000802A04D3E1880320DDF2B1FE02E00320AC +:10F4D000D3F2A7FA00044249000C608109780029A0 +:10F4E00020D001050BD0E18800050905000D090DAC +:10F4F000401AC117490F0818C010E07312E0FF2727 +:10F500009D376B4698883900DDF2ECE90606360E29 +:10F510006B46E67398883900DDF2E4E9002901D0F2 +:10F52000761CE6736B469888002804D06020208102 +:10F530009888A08007E0002C05D0A58004992000C1 +:10F54000FDF7E0F90024200005B0F0BD70B50C0017 +:10F550000026012B2DD0234D042B04D00F2B31D1AD +:10F56000214821001DE001F000F8002804D002200D +:10F5700001F0FAFDDAF749FA002C14D0E521200059 +:10F5800000F022F8002809D0174821002830DDF2C9 +:10F59000A2FA16490868401C086004E012482100DD +:10F5A0001438DDF298FA286807220121FEF7D9F80D +:10F5B00008E00D4821001430DDF28DFA6069022167 +:10F5C00004F052EC300070BD10B502891218D379E6 +:10F5D00094791A02012022438A4200D0002010BDF3 +:10F5E00025390400A402000414D000042C030004F4 +:10F5F000002801DD002004E06521C943884200DACB +:10F6000008004042000600167047662801DD6620AB +:10F6100002E0002800DA0020000600167047000013 +:10F62000F0B594465A681D6814062E06240E360E50 +:10F63000B44203D22700F837B74205D9B44205D9FE +:10F6400032000832944201D80020F0BD059A090228 +:10F6500012683143114308602D1DE805C00D614655 +:10F660000903084318600120F0BD31B5FF48006868 +:10F670000106090EFE4C20680006000E814203D2EE +:10F680000A00F832824205D9814205D902000832C7 +:10F69000914201D8002038BDF6490968002900D1FF +:10F6A000FEE7F549042208186946DCF2CCEB206835 +:10F6B000001DC005C00D2060012038BD18B5140024 +:10F6C000039A00922200FFF7ABFF18BDF0B50500CA +:10F6D0000F0085B0FCF732FF3E00603603960290C3 +:10F6E000347F1437002D5ED06120405DE349C006B1 +:10F6F000400F4000085A38816879022817D00398D3 +:10F70000407F382813D0172811D0786880780107F7 +:10F71000890F02D10009042809D0FFF7F5FD010087 +:10F720003800D1F2DDFBD6490A6880180860D54858 +:10F73000006A002837D0D44E3068D449884203D0BC +:10F74000E5F7F2FC002809D13068D04988422AD177 +:10F75000CFF71BFFA84201D1092C24D02800E3F7E2 +:10F7600068FE02280FD0C7492031097981420AD0AA +:10F77000152149014143C34808182C30E1000D18F8 +:10F780002D1D019003E0C248A10045580196092CA7 +:10F7900020D8C048A600815900291BD0DA2D30E9B5 +:10F7A0000100000018E40300000400001C58643746 +:10F7B000BE49895901290DD107E0BA48A100455831 +:10F7C000B648E8E72000D2F7EAFAB748805900289F +:10F7D000F8D109E000218151B2488559B248503032 +:10F7E0008059C005C00D2860B048A10040580128CC +:10F7F00010D1788C0421091A8907890F0818F96932 +:10F80000001D012292039143F961019A2B0000929D +:10F8100002002BE0C4F717FC002809D0CCF75EF9F2 +:10F82000002805D0082C03D121003800C4F777FC4C +:10F830000026032C16D1EAF777F8002812D0039897 +:10F84000407F21280ED09549019888420AD138007E +:10F85000FFF715FF002802980DD1FCF77DFE002070 +:10F8600005B0F0BD019A2B00009232002100380053 +:10F87000FFF72EFFEEE7FCF76FFE0120F0E7E03028 +:10F8800010B5027801004078824201D3100010BD0B +:10F890008878C9788842FAD2EEF796FD002801D11F +:10F8A000032010BD092010BD70B5040010780D00B4 +:10F8B0001100C00719D12079012802D060790228EF +:10F8C00003D1200001F012FD02E0200001F01CFD38 +:10F8D0000006000E01D01E2000E01C20A034618A2A +:10F8E0002818884201D9012070BD002070BD6849E8 +:10F8F0000207120F4839CA610206120F0A62020596 +:10F90000120F4A620204120F0003000F8A62C862DB +:10F9100070475F494839086ACA69000110434A6A5A +:10F92000120210438A6AC96A120310430904084389 +:10F930007047F8B514000600D0698F78C00407D46A +:10F9400088688000C10F3000F8F7C6F9E062F8BDA2 +:10F9500039003000F7F7A1FF05062D0E0020002D1D +:10F9600002D13000CEF758FA03005148390000792F +:10F970008006C20F00922A002000D1F294FC3900C8 +:10F980003000F7F772FFC007410E20002030827A66 +:10F99000BF231A400A438272200000F0D1F8F8BD5C +:10F9A00070B50400008905193948483841680029B4 +:10F9B00004D08168491C8160002070BD200003F0E4 +:10F9C000F4FF60692900FFF78BFE002806D12000B4 +:10F9D00004F012F80120C7F73FF8EFE7012070BDEF +:10F9E000FEB5012104000020216106002060FCF723 +:10F9F000AFFD01902948016802694769D005FA0501 +:10FA0000C00DD20D90427FD03806000E08430D2164 +:10FA1000090208430568002D71D060212000DCF246 +:10FA2000B8EA686D2060016F060089781C3E0907FE +:10FA3000890F71690091E96961606A88D207D20F04 +:10FA400022616A881207520FA2738068800056D420 +:10FA50002878207368786073C80431D52800203076 +:10FA60000290407A42060298520E007A8106800780 +:10FA7000890F800FD0F218FC20756075029819E08C +:10FA8000643804006838040058380400D85D040065 +:10FA900060B801C0CC0500041842000400A000803A +:10FAA000000000C050180004F4FF02C014CC000491 +:10FAB000C4E80004807A8006800EA075002000E073 +:10FAC000E86AA0606888C00715D12061216801201C +:10FAD000F6F793FE0098002811D02068006F807818 +:10FAE0000007800F02280AD16B692A69009800F08C +:10FAF00029FA04E008E021680020F6F77EFE3F1DA9 +:10FB00002649F805C00D48610198FCF725FD300035 +:10FB1000FEBD38B504000D00D0F22DFC0422606754 +:10FB2000A25E0092020028000B00D0F24DFFA088D8 +:10FB3000002804D068880121C9030843688038BDC3 +:10FB400030B5174CE169002926D0216A4022BF2335 +:10FB500020300029017A01D0114300E019400172E0 +:10FB6000656A002D02D00425294301E0FB252940C8 +:10FB70000172A56A002D857A01D0154300E01D4071 +:10FB8000CF2211408572E26A0223012A00D81300B5 +:10FB90009A07920E1143017230BD000000A0008050 +:10FBA00018B801C0F8B5040048D020004B21D18915 +:10FBB0000100000014E8030000040000E83711838E +:10FBC00040300600007D8006470FE07E0090200058 +:10FBD0001430DCF28EEA050220002D0A1830DCF227 +:10FBE00088EA8103890B3B00DCF25CEB051B1F14E8 +:10FBF00014042300E8040A23AA07400F920F584375 +:10FC000009065A43090F4018110040181F3000061A +:10FC1000000E0FE028066906C00F490ED3F248F81F +:10FC200008E00098D3F225F804E00098D3F20AF82F +:10FC300000E0FF20E076307D8006410F0B2020564B +:10FC4000D0F74EFBE07207202056D0F76BFBE07137 +:10FC5000F8BD334810B5C16944690A05120DD308CF +:10FC6000006ADB00E3180405240DA24205D101223D +:10FC700012031140104081420ED158682949006892 +:10FC8000000C884208D028490868401C0860002001 +:10FC9000E0F7D8FE002010BD012010BDF3B581B003 +:10FCA0000D00002721480F80006B1D4C000C143400 +:10FCB000E060FFF7CEFF00282FD0A0686946060459 +:10FCC000360C03200096DDF200FA040025D06B46C6 +:10FCD00019888E4207D0144A5068401C5060032295 +:10FCE0003000DDF249FA019860222100DCF2BEE822 +:10FCF00027600198FFF760FF6B461988E1800221B9 +:10FD00002761217301992000603060310600DCF228 +:10FD100000EA308828802000FEBD0020FEBD0000E3 +:10FD2000ECD00004EFBE000020BB01C0C0A30080E7 +:10FD3000F1B56120C04384B000270390029004997C +:10FD4000B80040180D2189014018C46B002C7ED0EA +:10FD50006078217806020F200E4380010640F6D01D +:10FD60000520C001064208D00398623005D10498EE +:10FD7000E0F76BF9000400140390FF2041300642C5 +:10FD800008D00298623005D10498E0F73DF90004EC +:10FD9000001402900025300614D53021095D039A25 +:10FDA0000120914200DD00208021009123002200EB +:10FDB000010004985E3330320197D3F77DFD0028AF +:10FDC00000D08025B00517D53C210A5D039901209C +:10FDD0008A4200DA0020012149020091230022001A +:10FDE000010004985F333C320197D3F765FD00288A +:10FDF00002D0012040020543700616D52A21095D74 +:10FE0000029A01204942914200DD002040210091E8 +:10FE100023002200010004985C332A320197D3F7B3 +:10FE20004BFD002801D040200543F00518D53621B0 +:10FE3000095D029A01204942914200DA0020FF2622 +:10FE40002300761C5D3322003632010000E017E00B +:10FE5000049801970096D3F72FFD002800D0354372 +:10FE6000002D0DD0002F0BD104980721C901401897 +:10FE700001882943018001210498C90604F008E89B +:10FE80007F1C3F063F0E012F00D258E705B0F0BDA2 +:10FE9000F3B500240500260081B0A0000D21401913 +:10FEA00089014018C06B00284BD0417802780902C4 +:10FEB0001143490745D50299096900290CD1010070 +:10FEC0006031330A4E708B70C07C0A00012100281B +:10FED00000D00100117034E0010060318A784B7865 +:10FEE00012021A43521C1204120C130A4A708B702D +:10FEF0000B78002B25D0877CBA4222D35B1E1A06D2 +:10FF0000120E0A701DD1320A4E708A70C27C002A0D +:10FF100001D00A7008E041780278090211430422F6 +:10FF200091430170090A4170002C0AD10720C001D9 +:10FF3000281801880422114301805106280003F08B +:10FF4000A8EF641C2406240E012CA6D3FEBD434951 +:10FF5000C868401CC8607047F0B51D001FB4002081 +:10FF6000C04384B00090019004980D21890140188D +:10FF7000C46B002C42D06078217800020843400511 +:10FF8000002700283ADAD0F200FA069A0E002B0079 +:10FF9000121A8B41029005D2069A02983100801AFB +:10FFA000A94107E0069A00980199801A029AA9418E +:10FFB00080187141060020000D004A300526E7F444 +:10FFC0000100000010EC030000040000BBEDC2EFD4 +:10FFD000DCF298E82B00321ABB411BD3244EF08888 +:10FFE000401C05042D0C20004E30F580DCF28AE820 +:10FFF000A8420DD8F78004980721C901401801884C +:020000024000BC +:1000000001229202114301800498510403F04AEF47 +:1000100009B0F0BD1648C780FAE70D22920180189A +:1000200010B5C46B002C1FD06078227800021043FA +:10003000400519D5487DCFF288FF4034E179A27997 +:100040000B0213430A49002298420ED88888401CAC +:100050000004000C8880637A247A1B0223438342C5 +:1000600002D8012008818A8010BD0A81FBE70000C8 +:1000700088180004FEB5050000200700019001204B +:1000800000900C00280001F03DF8A079C0077DD158 +:10009000002D09D0A868C00478D42800D4F72AFD20 +:1000A00000285FD002205EE0A0780107890F2CD1E4 +:1000B0000009042829D1022001F034F80600F120BB +:1000C00080000DE0F120800031180622A01DFBF712 +:1000D0007EFE00285AD002213000E0F7F7FD06002E +:1000E000002EEFD1032001F01DF80CE0F12080007C +:1000F00031180622A01DFBF76AFE002846D0032116 +:100100003000E0F7E3FD0600F0D12000D4F7CEFC8C +:100110000028019015D00198E2F7D2FC050003D128 +:10012000032000F0FFFF05002879002801D00628F1 +:1001300007D1A0780007800F022802D1E07880075D +:1001400015D5002D13D02879022804D12800D4F722 +:10015000E8FC00280BD02879032805D1687900280D +:1001600005D001E001200090207BC00702D00127CC +:100170002FE00BE0A0780107890F09D100090D28B5 +:1001800006D1E078C10703D1800701D40020FEBD6D +:1001900028792100D4F755FC0099884219D9012704 +:1001A0000726032800D0062668790C34022805D1DA +:1001B000320021002800F3F7A3FB0AE00198D6F7EC +:1001C000E5F9002805D13200210028000023EDF7D1 +:1001D000B0FC3800FEBDFEB5070000F093FF0190B3 +:1001E000380000F0B6FF040038793D001034A03527 +:1001F00003281CD17D20C00000906068002806D034 +:1002000069890098DCF28CEB21680E1A00E0266800 +:100210005820005D012810D900206060217E0F2049 +:1002200080010129019905D10818406A0AE01048A7 +:100230000090ECE70818006A04E0012803D1687A0E +:100240004000401C206069890098DCF26AEBB042F3 +:100250000CD33800D8F7F2FB002807D0112040015A +:100260003818418A00223800D6F7FDF9FEBD00009B +:100270008813000070B5050000F06BFF0400280033 +:1002800000F040FF11220100520189184988103402 +:100290000020012903D1E16F012900D1012070BDA7 +:1002A00010B589780A07930F022B04D10B09042B90 +:1002B00008D00C2B06D0920F02D10909052901D0D4 +:1002C000D7F796FE10BD0000FFB583B00D00FCF718 +:1002D00053F90190039801890E180599346F002095 +:1002E00008600290687937001437022830D128005E +:1002F000D8F7ECF9A179C9070BD0280000F002FF6C +:100300006921C90040180068002821D0E078C009A0 +:100310001AE0A1780A07930F02D10B09052B17D019 +:10032000920F022A07D10909042901D00C2902D110 +:10033000069900290CD0007E012809D19248062296 +:10034000A11D2818FBF743FD002801D101200290D0 +:10035000002000900298002810D1287903287DD130 +:100360006879022801D003287ED10021280003F0FB +:10037000DEED002875D1012002900090A0790027C1 +:10038000C0070CD16879022809D1A0780107890F2C +:1003900017D100090C2806D12800D8F786FBA078D1 +:1003A0000007800F0DD1A0780009052800D1012792 +:1003B0000B2801D00C2802D10098002821D1002F51 +:1003C0001FD103987149006988420DD0E69F378993 +:1003D000010000000CF00300000400000428E75CAA +:1003E00003992800D8F7E3FD070014D003980021F3 +:1003F000FCF7BAF803973889C619346F0099039847 +:10040000D8F7A2FD002806D1069A03992800D8F74C +:10041000C3FC00283CD0059901270F6068790228A9 +:1004200009D1A0780007800F05D1320021002800F3 +:10043000E7F76AF907006036307F2A000021FEF7EF +:100440007BFEF27F002A04D0742128000123D2F71A +:100450009DFF002F03D003980021FCF785F800F0E2 +:10046000ACF8002814D0022000F0A6FED9F7F5FA67 +:100470000EE003E0FFE72879032809D17C20805DA6 +:10048000001F042804D33A003100280003F054ED83 +:100490000198FCF77FF8029807B0F0BD10B5D8F7C7 +:1004A0001FF90021603001744174817410BDF8B5EA +:1004B0000D0006001700FCF769F80400002E24D098 +:1004C0003000D8F70DF97D21495D312916D0322948 +:1004D0001BD16030017C012917D1417C002904D057 +:1004E000491E0906090E41740FD1012F0AD128783F +:1004F0004107490F3000D8F7ECFF06E03000FFF766 +:10050000CDFF02E00021017481742000FCF742F865 +:10051000F8BDF3B581B00E000198D8F7E1F80400FA +:100520005820805D45076D0F2800DCF2EFFE0100CA +:100530000198002831D001980F229201801800689C +:1005400000282AD0200060300700007C012824D039 +:10055000606FD8F703FC00281FD0207E01281CD133 +:1005600030006030DBF2D8EDC178C90615D580784F +:100570000107890F022910D1000900070DD50120BC +:1005800020343874A178C80703D001980022C8F736 +:1005900060FD01982900D8F79CFFFEBD29020000EC +:1005A000741900041E48006870471D480068002840 +:1005B00001D1012070470020704710B5DCF738FFEB +:1005C000002805D0FFF7F1FF002801D0012010BD61 +:1005D000002010BD10B5DCF735FF002805D0FFF76F +:1005E000E4FF002801D0012010BD002010BD10B58F +:1005F0000400FDF76DF8002805D1052C05D100F0A9 +:1006000009F9002801D0002010BDDDF71EFA0028EE +:1006100003D10448806B0028F6D0012010BD0000F3 +:100620005806000458D50004154810B50068002885 +:1006300016D11448002200684621CAF29EF800280C +:100640000ED111490A78002A02D00870162005E060 +:100650000E490A78002A03D008701B20DCF7CCFF73 +:1006600010BD10B50A4CA088002807D0FDF730F85F +:10067000002803D0C1F76CFE0020A08010BD000050 +:100680001806000400000004B1050004B2050004CF +:100690008C0600040748807C002808D10548002308 +:1006A0004038C16E806E59405840084300D0012048 +:1006B00070470000B03D00044F49504A800009587F +:1006C0001258914201D2012070474C4A121F126801 +:1006D000002A06D0494A10321058884201D9022017 +:1006E00070470020704770B5454A0169914201D0BA +:1006F000002070BD4049C07B10310C5CFBF746FF09 +:10070000A1003D4B3D4C5A586458A24204D93B4D80 +:100710002D1F2C68641C2C60521E5A50FBF73AFFA8 +:10072000E6E7FFB581B0002406001F00344886428A +:1007300006D0039A02993000DCF234F905B0F0BD1E +:10074000FBF724FF00903800FFF7B6FF05001CD030 +:10075000039A02993000DCF225F9040015D02649ED +:10076000E07B10310F54B80010390A58521C0A505F +:10077000607B0121084360732248022DA06104D1EF +:100780001E49091F0868401E08600098FBF702FF19 +:100790002000D3E70422072110B5E1F7FFFB002872 +:1007A00000D0012010BDF8B500241848164D8679F8 +:1007B000878809E016496001401820222900DBF2F1 +:1007C0006AEBED192D1D641CB442F3D3F8BDF8B5E6 +:1007D00000240E480C4D8679878809E0700997350A +:1007E0000100000008F403000004000057F2343058 +:1007F0000C496001411820222800DBF256EBED196C +:100800002D1D641CB442F3D3F8BD000050DC00047D +:10081000E41A00047419000413F30300803C04C0BC +:1008200080190004CC1903C001488089704700007A +:10083000B0060004F0B5002591B00C95C5F75CFF3B +:10084000FE4E3469FD4840300768380706D503F08E +:10085000B6ECFA480821C94340300160381EF84F11 +:1008600017DA1420C5F7AEFCF648C06B00280CD090 +:10087000B868401CB8604020CCF770F8EF484030B2 +:10088000416849004908416003E0EC49EE484031C5 +:100890000860EE4920000840ED4909780843796A6C +:1008A00008437862FFF78BFE002817D0786A00288B +:1008B00014D1E848002200681B21C9F268FF796A58 +:1008C00008437862786A002808D1E248002200686C +:1008D0000821C9F25CFF796A08437862CFF236FFDB +:1008E000E00101D5DC48306120060CD5DB49086801 +:1008F000401C0860DDF7B3F8002802D00420CCF7D4 +:100900002DF8DBF79FFFA00301D5D5483061A00487 +:100910000ED5CA48403840680C90000602D5012028 +:10092000C00704430C98C00602D50120800604438A +:10093000002C12DA0C98000609D5FDF737FFBF49E5 +:100940008020C04340394860C648306103E0012040 +:100950000003CCF703F8BC483061200502D5C2483B +:1009600001253061C148610110907ED500200290C0 +:10097000019006AA07A90BA805ABD2F785F90028B4 +:10098000039011D00220054300068443C043306128 +:1009900007980C3000F048FC0028019004D1039027 +:1009A00006990798F0F794FBDCF756FD002806D06F +:1009B000AF490020C861AE4920204031086003984B +:1009C00000287ED0FFF710FE00280AD0A948806CCE +:1009D000002804D101210198890303F078EAF5F792 +:1009E00034FE0198EEF7E0FB00286BD00198007907 +:1009F000012829D1079900294ED001981231E1F739 +:100A00005DFD002848D010990020DBF2A0EB8D4856 +:100A1000C038806B974800210165B86A00283BD137 +:100A200095480068401C37D001210198890203F0E5 +:100A30004EEA0120B86201990F2080010818006970 +:100A40000421D2F7FFFC27E00020DEF716FF02901A +:100A5000DCF7F8FC00281DD00198D8F737FE00908D +:100A6000CFF2B1FC009AFF3200E02BE1521C0F9252 +:100A7000D161906106990F9A4B68086853626B4682 +:100A800010629A8A0C310C3A0520D9F2E8F90F9AD3 +:100A900080789062D2F7FBFFDBF7D5FD0006000EF1 +:100AA00004900B98C17E0A91C17A0991C17908918D +:100AB000FFF7A0F80B990198F6F796FC0A990B98A6 +:100AC00001E0F4E0B8E0C1760999C1720899C171FA +:100AD00001980079032815D10198E0F76CFB0028F4 +:100AE00010D00199497903290CD1807FC00709D022 +:100AF00062490020029008800520DDF732F80320CB +:100B0000DCF784FDDCF7A3FC002872D0FFF757FD6B +:100B100000286ED0029800286BD00498002868D175 +:100B2000DCF790FC002864D1FCF7DCFD002803D141 +:100B3000DCF797FC00285CD0F869012807D0504802 +:100B40000088002851D04D48008800284DD06B46C1 +:100B50009A8A06990C3A0C310520D9F280F90100E5 +:100B60000198F8F740F8009046480068002806D041 +:100B7000DBF2DCEA022108430099084233D1354810 +:100B8000002200681B21C9F202FE00282BD1019827 +:100B9000D2F78AFD002826D13B48DBF2C8EA00994B +:100BA000084220D13548008800281CD037490098D9 +:100BB000084218D16B469A8A06990198EDF739FFD9 +:100BC000002810D002208543DEF781FE0520D1F2F7 +:100BD0001BFF0004000C0521CFF298FE01980121B3 +:100BE00003F074E901E0012038620020D55B68F968 +:100BF0000100000004F8030000040000A39D4184EC +:100C000078620DE0FFE7F869012807D021480088E5 +:100C1000002805D01E480088002801D00120386235 +:100C2000019803F0DAEA00283FD0049800283CD06D +:100C3000FFF7CFFC002835D0DAF73FFB002831D191 +:100C4000DAF725FB00282DD1012038622DE00000C5 +:100C500000A50080F8060004C0A80080FFFFFF7F09 +:100C6000808800000418000400000004FFFFFFFE5D +:100C7000C4050004FFFFFDFFFFDFFFFFFFF7FFFFDD +:100C800020E9000400A60080401903C0F406000417 +:100C9000A00600045C3C00049C0000045005000415 +:100CA0000B8000000820CBF763FE386A012808D1CA +:100CB0000020F861FF490880022085430320DCF70B +:100CC000AFFCFD4830610C98C00605D5FB491020EB +:100CD000C0434860FA48306120017ED500200A9068 +:100CE0003068800705D500210120E0F764F80B90FB +:100CF0000BE03068C00771D03878E1F724FF0B9023 +:100D0000D3F72DFF0028F6D00B980028F3D00B98CE +:100D1000C0304068002846D0406820300A900B98C8 +:100D2000D3F7CBFACFF259FB0B9A0F239B01D218C2 +:100D30001269516210620A98002834D00A98807AA9 +:100D4000C00730D00B98407902282CD10B98D3F7EC +:100D500006FF012827D10B9800F0F2F94B21C900BA +:100D60000990401808902030007900281BD0089A7C +:100D7000089925320B982D310E92D6F29FFC0998D6 +:100D8000406C00280FD008990E9A0B982E31D6F798 +:100D900045FC09980521C9014018807A800702D5D1 +:100DA0000B98D6F7B6FD0A98807A80074BD5DCF70A +:100DB0005DFB002806D0C3490020C861C14920203E +:100DC00040310860F5F7FCFDBF48806B0D90F5F7EA +:100DD000D5FF0B98F0F731F901E070E033E00B98A4 +:100DE000F0F71CF900282ED0B8480068401C2AD023 +:100DF0001098DBF2A6E90D9940181099DBF2B0E9E2 +:100E00000B99A03149894843B149884205D3B96A51 +:100E1000002902D0AF4A01211165AF49884212D39F +:100E2000B86A00280FD010990020DBF29AE901215E +:100E30000B98490203F054E80020B862EDF73FFD3B +:100E4000A44900200865FFF7CCFB002835D002201C +:100E500000F0C6F90990D8F743FC0890099800F013 +:100E60006FF907900998D8F73DFC06900720DCF74A +:100E7000D7FB94480169026A0698008802281CD1B1 +:100E8000002901D0012A18D10898C030007E00281E +:100E900013D106984068C00707D007980921890137 +:100EA0004018806B002808D104E0FF20CCF7C9FB74 +:100EB000002802D01320DCF7B3FB88483061A00182 +:100EC00001D587483061002D05D08648072200688B +:100ED0002900FCF782FCE0007ED501200B90DCF7B6 +:100EE000C5FA002807D001214904002002F0F8EFDC +:100EF000784800218164C3F7D8F8002801D0C3F7EF +:100F00002EFF3068C00768D07748806A0006000E60 +:100F10003870E1F718FE05006BD0FFF762FB002880 +:100F200010D02800D8F7DEFB6F49496B3A780123CF +:100F30009340194201D0002100E001218170062078 +:100F4000DCF76EFB2800A030417E491C0906090E23 +:100F50004176027E914209D1002141760F20800125 +:100F600028180069C07B002800D10B90F4F70BFC17 +:100F7000002806D00F21890169180969097B81427F +:100F800002D10B98002809D0574A506B39780123B9 +:100F90008B409843D10D084350632AE05248416B7F +:100FA0002800C030027801239340FF22521C1343D3 +:100FB0004D4A19435163697902291AD14149007890 +:100FC000403188603F480169006A012901D0012849 +:100FD0000FD12879022801E021E01EE005D001218F +:100FE000280002F0C2EF002803D001212800D8F722 +:100FF000EBF82879032810D12800E0F74B45AD73B2 +:101000000100000000FC030000040000F04792E82B +:10101000E6F80A908068C00509D5280003F0EAE8E0 +:101020000A988168FF20401C81430A9881603448F7 +:101030003061E0020DD50120E1F73DFA002806D02D +:101040002949012088648103002002F054EF2D48D3 +:101050003061E00702D00120C0433061A0070DD508 +:101060007868401C78601020CBF78CFC0220C043CD +:1010700030610120C0038443C0433061200405D5A2 +:101080002148072200680121FCF7B1FB600705D564 +:10109000F868401CF8600420C0433061200705D583 +:1010A0003869401C38610820C0433061E00605D52E +:1010B0007869401C78611020C0433061A00628D5B3 +:1010C000B869401CB86121E0A0060004FFFFFFFBE7 +:1010D000C0A40080FFDFFFFF00A6008000A8008002 +:1010E000F406000450140000401903C0581B00000F +:1010F000FFFFFFF7FFFFFFFD7C050004C0A200809B +:10110000FFFFFFEFFFFFEFFF0C0800042020C043AC +:101110003061F869002801D1C5F70CFB0C488168E3 +:10112000820D1143816011B0F0BD70B504000D0057 +:101130004020C2F7F8FB002807D1054901204002F2 +:10114000C86029002000FFF789FB012070BD000066 +:101150000030008001000020002906D00F230A790A +:101160009B01C918022A01D1886A7047032AFCD161 +:10117000086B704770B50500FBF726FA7E494C688E +:1011800009E0072D02D02179A94203D1FBF720FA0B +:10119000200070BD2468002CF3D1FBF719FA002061 +:1011A00070BD002100280AD00279022A02D17D21D7 +:1011B000C90003E0032A02D13F21090141180800B8 +:1011C000704770B505000E00FBF7FEF96A494C68E0 +:1011D0000AE0A179A94206D1E179B14203D1FBF736 +:1011E000F7F9200070BD2468002CF2D1FBF7F0F96C +:1011F000002070BD6049022801D108697047C868A5 +:1012000070472030407DC006C00F704710B5040005 +:10121000CFF27AF90F2189016118886310BD70B58A +:10122000FBF7D2F90500544844680AE02000E0F7D3 +:10123000A6FE002804D02800FBF7CAF9200070BDE4 +:101240002468002CF2D12800FBF7C2F9002070BD01 +:10125000F8B50700F8F70AF8002801D00020F8BD1B +:10126000FBF7B2F906004448444D44680CE00622FE +:1012700039006019FAF7D3FD002804D13000FBF7DC +:10128000A7F92000F8BD2468002CF0D13000FBF74E +:101290009FF9E3E7F8B505000F000800F7F7E6FF50 +:1012A000002801D00020F8BDFBF78EF90600324877 +:1012B000446810E02079A8420CD1200006223900B1 +:1012C000AC30FAF7ACFD002804D13000FBF780F910 +:1012D0002000F8BD2468002CECD13000FBF778F931 +:1012E000E0E770B505004078002801D1002070BD0E +:1012F000FBF76AF906002048446814E020790128C9 +:1013000010D1A8206A78005D82420BD12000A91C70 +:101310008830FAF784FD002804D13000FBF758F933 +:10132000200070BD2468002CE8D13000FBF750F994 +:10133000DCE770B5FBF748F905000F48446800E0AA +:101340002468002C09D02000EDF72BFF0128F7D1ED +:101350002800FBF73DF9012070BD2800FBF738F9A4 +:10136000002070BD0978C90701D00020704780684F +:101370000005C00F70470000041B00042902000094 +:10138000002805D00F21890140184069002801D1AB +:10139000002070470078704703000A0000B5FFF78F +:1013A000EFFF002807D00F20800118184169602046 +:1013B0005043AC30085C00BDF8B504000F009549FF +:1013C00010004E6A1D00D0F74AFB0421615E00291F +:1013D00008D179008919A03189888D4204D2491B2E +:1013E000A18003E0002901DA0020F8BDA188081AD5 +:1013F000A0800120F8BDFFB5012081B00C001F00C6 +:10140000009001980026FFF7BBFF2500106B6FF6D8 +:1014100001000000FCFF030000040000AA3C9DE165 +:101420006035002803D001980079012802D10020FE +:1014300028772CE0FF2A27D001990F206023800114 +:101440005A43081811004069A931AB32415C865CEF +:1014500075484A00406AA432805A744A904201D0CA +:10146000002F02D1A088002811D03B0032002000BC +:10147000FFF7ACFF00280AD1A17801980122C1F73B +:1014800060FB002005B0F0BD00200090FAE72E7749 +:101490000098F7E7F3B591B00C0000260D684021E5 +:1014A000286F109014356846DAF2B8ED20006946CE +:1014B000DDF7D2FD00246F4617E01198FFF76AFFB1 +:1014C000109903000A88E96920000904090CCEF28A +:1014D00081FD8619E869210002041198120CD0F7E9 +:1014E00061FA8619385D401E3855385D0028E4D110 +:1014F000641C2406240E3D2CF7D3300013B0F0BD3D +:10150000F8B504000F2208686023056F0600007814 +:1015100092014007400F5843A1184969B230085C56 +:10152000143683009A188918CCF721FC070009208B +:1015300080012018416BCC300B5CF0692A880104D3 +:101540001800090C0123CEF245FD01003800484384 +:10155000F8BDF8B506000A680F00146FFFF71AFF10 +:1015600000283DD00F208001301841693868602381 +:1015700000784007400F5843238B4018A030457A2D +:101580001B090382A07800092AD0082801D00C2862 +:1015900026D11420684344182079000720D590688C +:1015A000800004D539003000FFF7AAFF03E03900BE +:1015B0003000FFF76FFF218AC002000C00290FD016 +:1015C000227D002A0CD1628A10180004000C884287 +:1015D000608205D90120207529003000E3F7CCFE98 +:1015E000F8BD03000A0000B5FFF7D4FE002807D0BD +:1015F0000F2080011818416960205043AE30085A0E +:1016000000BD03000A0000B5FFF7C4FE002809D0A2 +:101610000F208001181860235A434169AE32885A5E +:10162000431C8B5200BD000014C70004FFFF0000E4 +:10163000002810B502D1FB4B0122DA61F94A800083 +:101640000C32105840308183E4F729FC10BD70B58E +:101650000022F44B0C000221DA6200281A6305D143 +:101660009D78002D00D003215A709A70ED4B8200B6 +:101670000C339A581461FFF7DBFF002070BDF3B5FF +:1016800085B000240F00059802940028019440D1F1 +:101690000598E54EC0018019049005988500032F38 +:1016A00001D0832F21D1E048BC38DBF20CFADD49B0 +:1016B0004C3108608069DD49884212D1D94A0C3228 +:1016C0001068006880070AD5D94900205359596627 +:1016D00053591B689B0702D5401C0A28F6DB0120E2 +:1016E0000190D448BFF700FF8DE0052F76D1CD499A +:1016F000486E0006000E02904879002870D08A6B70 +:10170000C86A904203D2CB6B0A6B9A4203D3002083 +:10171000486307B0F0BDC349401CC862C2480024FA +:10172000D038DBF2D0F902993200890070500600FF +:101730000460BC485458006BBA49401C08630598C3 +:101740001423B9495843D0394018039036E0C28871 +:101750008A4258D10169002955D1E178A27809025D +:1017600011430AD10A21A1700021E170F17BFF230E +:101770009D3359432170090A6170C07BFF23617852 +:101780009D3322785843090211430818AA49884218 +:1017900039D8A448016B491C01630398DBF293F923 +:1017A00006006078FF230102F07B9D3322785843C6 +:1017B000114308182070000A60700398DBF2ACF93E +:1017C000002820D071890A051DD03269002A1AD15B +:1017D000944B1A6BDB6B9A42B9D314E008E0FFE735 +:1017E0009148D038DBF26FF9029A9200B0500AE0CB +:1017F000022F01D0822F06D18B48A838DBF263F983 +:1018000088494C310860F843810701D0B90703D5F6 +:1018100084494C3149590CE0824949797D00C961BC +:1018200001000000F8030400000400005C09056CDE +:10183000002904D0E178A2780902114305D1029968 +:10184000049A890051580A898C18800746D0B80735 +:1018500044D46178227808021043774A0C325359F5 +:10186000029949001831585253590298603318753B +:101870006378267818025359304358525059012141 +:10188000C466029B14004834605999400843605173 +:1018900069490598085C002811D1C81D0599405C6C +:1018A000012807D9644B596E491C8842596601D1F9 +:1018B0000020586650590069002800D033E7059889 +:1018C000002804D10520FEF7C4FE0028F6D0615997 +:1018D0000598FFF7C6FE0020605124E76178207864 +:1018E0000A02554902430C314859C0300260485938 +:1018F0008030C4630598E4F708FD01980028ECD017 +:10190000D9F719F94C48012141700CE7F8B50400EA +:101910000D007ED0E06800287BD1474E4C36022B6C +:1019200078D020271C22E819A918032B0CD0052BEE +:101930007FD12F81C37886781B0233432ED12800B4 +:10194000FAF792FE0120F8BD2A81C278837810024E +:101950001843001D0870000A48700120887000209C +:10196000C870FAF745FE0700E0681423334958436E +:10197000BC3940182900DBF208F93548BFF7BEFD35 +:10198000E06881007158002903D03800FAF734FE6E +:10199000D8E70321FFF77DFE380048E02A81C278AE +:1019A0008378120246791A430379300600141843EB +:1019B0001018001D0870000A487000208870C87058 +:1019C000FAF716FE0090E06814231C4E5843D03EF0 +:1019D00080192900DBF2D9F8E0681849164FC001D8 +:1019E0004018796E8900405800281FD10520FEF765 +:1019F00030FE00281AD0E0683A0081005032515879 +:101A0000002913D17979002924D01423584380194F +:101A100001E00EE021E08068396C88421AD2D1F7EB +:101A2000AFF8002816D02869002813D10098FAF7DB +:101A3000E3FD0020F8BD000020390400B46D04006F +:101A40007BCC0100EFFEFFFF2020040048FE0000D9 +:101A500010100400E068052143E028894719083088 +:101A60000004000C2881F97ABA7A0902114340195E +:101A7000032282700022C270083101700422090A18 +:101A800000224170FAF7B4FD0090787B397B0002A8 +:101A900008430A28FB49E06806D11423584340183C +:101AA0002900DBF294F805E014235843401829007C +:101AB000DBF26BF8E068800030580028B6D1787B04 +:101AC000397B00020843DCF75BF80028AED0DCF776 +:101AD00078F90028AAD1E0680021E4F726FCE06844 +:101AE0000221FFF7D6FDA1E710B50400E3F776FB6E +:101AF000002802D02000E3F70CFB2000FEF725FEB3 +:101B0000E14810BD10B50400E3F768FB002802D0DF +:101B10002000E3F7FEFADB4821001430DBF235F851 +:101B20000820207300F09EFC10BDF8B500242600AC +:101B3000D64D20002968002911D02A00483A1268A1 +:101B40001269002A0BD1FFF78CFDB10003E0421EA1 +:101B50001040641C685068580028F8D133E0CB4826 +:101B600054384179002901D001214163C54A14212B +:101B7000283A71431300F001D033C5188818B70014 +:101B8000009004E005213000FFF783FD641C0098FD +:101B9000DAF2CCFF002816D0BC485438417900292D +:101BA00002D0416B00290ED0406E800028580028DA +:101BB00009D10520FEF74DFD002804D0B348001FD1 +:101BC000C0590028DED0200034E7F1B582B0029879 +:101BD000002860D1AD48002148380068AB4A406910 +:101BE0001C321060121D401C116054D0100074385B +:101BF000806E02990704A348C90128300C18029886 +:101C00003F0C850043E0A14A01201C32B8405159E5 +:101C1000019001439B4851511430DAF25EFF0028D5 +:101C200001D0A05109E09A4800220188EBBF3AC8D0 +:101C300001000000F407040000040000DB5F0B3E1D +:101C400099481300FEF7A9FD0028A0512DD0A059F6 +:101C500000224261A159C020088191494839485960 +:101C600060304775A35908201873A0590389C0181C +:101C70004B591867080068304359019E334343515C +:101C800049590198486186495439886E8B1D401C1A +:101C90008866029E9B5D834200D18A66886E070437 +:101CA0003F0CBE00A0590028B7D0FEBDF8B5040017 +:101CB00017007B4D0026543D1D2971D012DC784859 +:101CC0000839283002880B00DAF23CEB15F8F75897 +:101CD0005858F6F658585858F5A2F458F3F2F158F7 +:101CE000F0E5580049297ED011DC42297CD009DC7E +:101CF0001E297AD0202979D041293FD1664F00256D +:101D00002837D1E1462972D04829F6D1F0E1662979 +:101D10006ED00EDC4A296CD04C296BD06229ECD1F4 +:101D2000E0680028E9D1FAF76DFC5B4F0090283F8E +:101D300027E068290FD06929DFD1E0680028DCD1CD +:101D4000FAF760FC0400FFF7FAFE05002000FAF73E +:101D50005DFC280078E6E0680028CED13803000F4B +:101D600008280BD239040A0E6B693906090E1B5C70 +:101D7000002A01D0934319436A691154F9E1FAF733 +:101D80007DFCE06814235843C019DAF2B0FE002845 +:101D9000F5D133E0696E491E696602D0696E05E0CF +:101DA000D0E03F494D39095C491E696601273B0077 +:101DB0008B401A4211D0384AC001A83280188900DD +:101DC0004058002809D0E4F71CF9E0683249C00106 +:101DD000A8314018696E89004650E068304A80009A +:101DE00011586B6E07E0ADE144E1BCE03CE170E10D +:101DF00069E1ACE1B0E19F40B9431150E068284B84 +:101E000081005A58002AC5D10098FAF7FFFBB0E1CB +:101E1000FAF7F8FB22490090E0685439095C002980 +:101E200054D11F4A8100483A525857691C4A2432FB +:101E300051580F4011007239095C012909D900F08D +:101E40000FFB002805D0002F03D00098FAF7DEFB27 +:101E50004CE1E068002100F0F7FAE06800F000FBD8 +:101E6000002806D1E068E4F701F9E0688021FFF777 +:101E7000F3FB002FC8D1E068FFF7B1FEE068084A25 +:101E80008000203211580029DFD06B78002B16D04B +:101E90000120A870B8E73BE00C6D04002D10040091 +:101EA00074390400B206000474190004C7E097E016 +:101EB0008AE05DE023E0A1E0A4E095E0C7E0FD4B0F +:101EC0001950E06880001650E06814E0FA4EC10135 +:101ED0007158002998D1FFF782FEE068C101891985 +:101EE000B3D0002804D16978002901D00121A9705C +:101EF0006978014388D10121FFF7AEFB84E7E068F0 +:101F00008100EC4850384058C221806808409BE569 +:101F1000FAF778FBF979BB790A02E6491A432631C8 +:101F20008A71120ACA717A783B7812021A430A70CF +:101F3000120A4A70FA78BB7812021A438A70120A9F +:101F4000CA7062E7DB482630417802780902114303 +:101F50003970090A7970C178827808021043B87024 +:101F6000000AF87005E1E0680121E4F7E8F900E112 +:101F7000D24B0F2A01D99A4275D1F978BA78090261 +:101F800011430400018078793A790002104360809F +:101F9000F879BA79000210439942A080E2D008068D +:101FA000000EE9F751FB61882088C7F209FEC44B97 +:101FB0001968208801228240114319600006000E32 +:101FC0000121C7F2A8FDD4E0110ABA70F970418866 +:101FD0003971090A79718088B871000AF871C8E00E +:101FE000E0680028BED106E0E0680028BAD1B54913 +:101FF00009780129B6D1E4F743F9BAE0E068E4F7DB +:10200000DBF9B6E0E06800280AD12879002807D07B +:10201000A849AD484C3909680870000A48702E710B +:10202000E068A44A8100503A5258A24B52691C33CE +:1020300059580A4296D08121FFF70EFB90968C5694 +:1020400001000000F00B040000040000FBBCA3B47E +:1020500099E0E06800288FD1A1480221C7F25EF81C +:10206000FCE4E068002887D19E480421C7F256F8B6 +:10207000002845D19B4802213EE041E0E0689249BA +:102080008000091F0F507EE0E16801208A008E4920 +:102090001C3188502E662000AE66E3F7DFFF72E049 +:1020A000C001C019AE008059002806D0DAF296FCB3 +:1020B000E1680020C901C91988516D1C8249E06896 +:1020C0005639095CA942EBDC80481438DAF219FD74 +:1020D000002858D0DAF282FCF6E7E068002852D1F6 +:1020E000E4F7FAF8BAE4E06800280BD1E4F7F4F872 +:1020F0000028B5D17A480221C7F210F80028AFD0E5 +:102100000120ABE4002F01D0012000E00020E168B5 +:102110006D4E89000C3E7050FAF77EFA0700E068B9 +:1021200081007158002915D16849C20180315118C8 +:102130006A6E9200895800290CD1142141436348EA +:1021400050380818DAF206FD002803D0E0680521AF +:10215000FFF7B3FA380062E6E068002813D1EE61B9 +:1021600011E0E06800280ED1E86977E4E068002813 +:1021700009D15D48017A407AC007C00D0843B1D14A +:10218000012040026AE4002068E4091DCA798B79C5 +:1021900011021943814201D101207047002070478C +:1021A000F0B5002489B04848A60050388159102263 +:1021B0004D6EE94311438259516680594030007E8B +:1021C000002C05907ED100200490680519D50020D0 +:1021D00000F066F93D4800273C38DAF2BBFC0028E5 +:1021E00001D083210AE039482838DAF2B3FC00280C +:1021F00007D0DBF7FAFD002803D182213800FFF772 +:102200005CFA280505D50598400702D4002000F0A7 +:102210006DF9A8074FD5FFF79CFC00273EE02A4840 +:1022200029495C38C06E0006000E503989590A6988 +:10223000012181400A4230D1234A083A92590A4288 +:102240002BD12249E201803151188000089107907A +:102250000858002821D001894018C17882780802E6 +:102260001043012802D18004BFF75CF9FEF73FFA62 +:1022700001200490079908984058E3F7CCFE079A8C +:102280000898114B00215C3B8150D86EDA1D401C30 +:10229000D866125D824200D1D9667F1C0A48553843 +:1022A000005DB842BBDC0498002802D00420CAF7C5 +:1022B00091FBFEF7FFF9E80705987AD0400779D43B +:1022C000014813E0C3E000007C390400346D0400D1 +:1022D000FFFF0000402300800C050004DCFE00002E +:1022E000FC19000474190004200000805038805943 +:1022F0009F4D4069A959084003900190FEF7F7F9F6 +:10230000A959039881427ED000206CE098480125AD +:102310007838006E29000006000E039A81401142B1 +:1023200068D1944BE2018000D718069038580028F5 +:1023300060D0039A1143039101894518FEF797FF76 +:10234000002805D12900E520FFF71FFF002832D023 +:1023500006990220795800220873069801213D58F9 +:10236000687B084368738448A8612889001D0004BD +:10237000000C28816A61069B4019FA50407B0007D7 +:1023800004D57B4878384170DBF79CFFE2F73AFFD1 +:10239000002802D02800E2F708FF30206043774988 +:1023A00000224018724920398F5929000423B84768 +:1023B0000AE043E044E006983858002804D0DAF2F6 +:1023C0000DFB06990020785069497839086E8A1DFE +:1023D000401C0866125D824201D100200866029806 +:1023E000401C0006000E029061487238015D0298A0 +:1023F00081428BD85E487238005D012802D0019876 +:10240000002822D100E00EE02000FFF7F2FB58493F +:10241000091F8859002818D00A00743A5378002BF5 +:1024200002D00120907010E0514A1C3A90510020D7 +:10243000885101212000FFF719F906E0400704D573 +:102440004B4978398869401C8861DBF778A7020E10 +:1024500001000000EC0F040000040000D1320A2D3E +:1024600030FF641C012C00DAA7E6012009B0F0BDA2 +:1024700070B505000C00FAF7D9F8424AA900343AC1 +:102480005450FAF7D7F870BD10B50400FAF7CEF83B +:102490003C4AA100343A5458FAF7CCF8200010BD59 +:1024A000042008B500903B48142100686A46C8F231 +:1024B000B4F908BD70B58400324E2C3E3059002866 +:1024C0001DD001894518E878A97800020843012841 +:1024D00002D18004BFF730F8E878A97800020843F9 +:1024E000032801D1FEF70DF9315920200881305918 +:1024F000DBF7B4FE3059FAF7D5F80020305170BD43 +:10250000F8B5850007001F4C303C605900280ED0FC +:1025100001894618FEF7F5F8F078B1780002084313 +:10252000012805D020003C3840598030866325E4DE +:102530002100645910222273627B012002436273DE +:10254000154AA261C4222281002262614A51361DCD +:1025500011003800FFF78CFF300001F082EE0028F8 +:1025600003D03000083001F080EE30207843084975 +:1025700000224018034920394D5921000123A84762 +:10258000D9E4000098390400346D0400B106040059 +:10259000346E040000000004CF4E020070B5050048 +:1025A0000C0000280DD0002C0BD0C2F22AEA060045 +:1025B0002800DAF2D9FA002804D1802E19D1C2F20B +:1025C00020EA70BDA04210D12800DAF2A4FAF4E7A4 +:1025D000A14209D121680160A968491EA960696802 +:1025E000A142EAD16860E8E7080001680029EFD15C +:1025F000E3E73000C2F20EEA70BD0000F8B5002437 +:102600007F2703683F04DB09DB0108330360C568EB +:10261000DE00BD43002E02DA5E06760A3543C56051 +:10262000494DAB430125AD065B190360C368032523 +:10263000AD03AB43C3608B781D07AD0F022D0ED1E8 +:102640001B09082B00D10F24404B838213882340A1 +:10265000C38213883E4CA34204D1FF2117E03B4BB9 +:102660007033F2E76B461B7812781C09520724017D +:10267000520F144300948978102222430907890FCE +:1026800002D02200EF210A40D106C90E0091017646 +:10269000592141760F214183F8BDF7B58AB0150065 +:1026A0000700406909900B986030D9F286ED04006C +:1026B000408808AB089018780007800F022808D1DE +:1026C000B888260010380004000C2036B880803806 +:1026D00003E02088260020361038F178890601D5DD +:1026E000002802DC01200DB0F0BD0998E0F7D8F910 +:1026F000002826D028002C3006AA07A903AB07C360 +:10270000021DE8796B4601070B98090F4030007EE7 +:102710004007400F07C33200A07801210309099840 +:10272000BFF772FC00280CD00998002809D009983E +:102730000D2189014018806B002802D0416D491C91 +:1027400041650020CFE70000007F000C8FC700002C +:10275000FFFF0000FFB581B004000D00891C1A784E +:102760008A770022CA7722684B4E4C4F1800D3005C +:1027700010D52A882031921C2A80CBF257FE20687F +:10278000E168C009C0011430821E5206B143520AEA +:10279000114304E0D009E168C0011230B143E160A7 +:1027A0000321B843890608432060E0680913884381 +:1027B000E060E87840210843E8703948A082A878B2 +:1027C0000107890F02290AD10009082807D10399B6 +:1027D00060690978000C4907490F0843E0820F201F +:1027E000608305B0F0BDFEB514000E004069019095 +:1027F00008006030D9F2E0ECC1780C34490646D5C7 +:102800000188A22943D9851CA97F2278254F606CB5 +:1028100091420ED0002802D0027D8A4203D0B868CF +:10282000401CB86033E0040078681434401C7860C1 +:1028300005E0002803D0C4F745FE0020606401983D +:102840004079022801D1002000E0012000905420AE +:10285000805D8006400F01280ED903285D2062D4D8 +:1028600001000000E81304000004000017A3556BEA +:1028700005D830001830D9F2AAEC000706D52A0096 +:10288000009820322100CBF21EFE05E02A000098BD +:1028900020322100CBF2EBFD002804D13868401C27 +:1028A00038600120FEBD0020FEBD000000007F005A +:1028B000007F00008FC7FFFFEC07000410B5CBF2CC +:1028C000ADFC10BD30B50079039D002820D1FF4834 +:1028D000047E022C1CD2052D06D0E62D01D1143128 +:1028E00002E0D21A5118891D0A78082A11D14A78B3 +:1028F000002A0ED1891C0A781209042A01D1497ACA +:1029000002E0062A05D18979062902D1641C0476E1 +:1029100030BD0021017630BDFFB5E3B005000026D3 +:1029200040685C9006205B965A90E9A0389605C8EE +:102930000D960C9636923590088940180A90486991 +:102940000B90FEF743FC09902C686C981434E62831 +:1029500000D15A96002010900F900E9060688079F8 +:10296000C107DD480B9904D00818C06900280FD0B2 +:1029700003E00818406A002806D06E990830086005 +:1029800060688079C00703D10B988068C0070CD0BD +:102990006E980068002808D10B98806840077ED4A4 +:1029A0000B982030407D0007F9D4280008305AAA3F +:1029B00035A96B46629007C30DAA5C996C9808AB69 +:1029C000CCF28EF8659908606C99E62903D101284C +:1029D00001D1659806606C9A00925A9808AB070678 +:1029E0001A7D3F0E5C990B983B00FFF76BFF6E98CA +:1029F00000210068002803D0827AD20700D001218C +:102A0000626801279279D307002B03D10B9B9B6847 +:102A10009B0730D5669B032B2DD00B9B20335B7D12 +:102A20001B07DB0F109326D10B9B9B685E070ED50F +:102A3000C3791E07360F012E01D1012300E00023C8 +:102A40000F933B00022E00D000230E9313E0DB0611 +:102A500004D5002902D001230C930CE00B9B1B79B9 +:102A6000012B08D1002906D0C3791B071B0F022BAD +:102A700001D10123E9E70B9E01232036777D3F0733 +:102A800007D4002904D0002802D0807A800700D41F +:102A900000236698032814D06598006800E043E09E +:102AA000002806D10B98806880070AD4D0073BD055 +:102AB00007E0002B05D000200F906E9910900E902B +:102AC00008600C98002807D065980068002803D09B +:102AD0006E9900200C90086037AA38A901920091E5 +:102AE0000C9B0E9A0F991098CBF2CEFF0C980028F1 +:102AF00006D030AB587F801C5877187F801C187721 +:102B00000E990F9808430C990843109908430ED06A +:102B100060684022C1781143C1706E980068002837 +:102B200002D0807AC00702D1002067B0F0BD6C9857 +:102B3000E62802D06D98002801D001200DE00B9806 +:102B40005A9AA030808A5B9000922F8930AB1A7F0E +:102B50006F993B005BA8CCF21EF8A872E069C00533 +:102B600002D50120A8722CE0A87A012826D9606835 +:102B70000422C1781143C17058480079C0060AD4B4 +:102B80000B984079022819D109980521C9014018EC +:102B90000078000712D527002037787A4006400ECB +:102BA00003280BD9317DFE2908D1CDF77FFC797A36 +:102BB0004006400EC909C90101437972A87A01286B +:102BC00012D108AB197D5C9830AB40185A99401A65 +:102BD000597F401A20380A99800880008431884241 +:102BE0005D9006D25D9104E00A98843080088000F0 +:102BF0005D905D985E9011A850ABE860998D08AB30 +:102C0000187D5CAA04AE07C637A9629A5A9801AE2D +:102C100007C65DAA0092A87A4AAA11A93AABCBF2DC +:102C2000E1FF0C9800280AD000203AAA04E08100B5 +:102C300053589B1E401C5350A97A8142F7D8A97A59 +:102C4000E868491ECCF232F85A9A002A05D0E868A2 +:102C500035A98068801AD9F278E967684A98606077 +:102C60006C98E6280FD06D9801280CD037A4F47822 +:102C700001000000E41704000004000090F55B3937 +:102C80003A98BA1D01040B98090CFCF78FFE002836 +:102C900003D0E069CCF209F8E061E0690121890222 +:102CA00088430026E06108E10F99002907D0401E03 +:102CB000B04204D1B0003AA90A5808320A50B00014 +:102CC0003AA9619008580204120C3A80A87A401E72 +:102CD000B04254D1F878FB210840F870E06909E06F +:102CE000C0370004AAAA030000000000400300004F +:102CF000C4E80004810701D01E2100E01821091D4D +:102D000051180904090C61846F9A002A01D0891CAA +:102D10006184410509D502042920005D120C410699 +:102D20000B98490ECEF77AFEB880E069810610D57F +:102D30006F9A619900923AAA5158BB880A0401041B +:102D40002920005D120C4006090C400ECEF77CFED7 +:102D500013E0010610D56F9A619900923AAA515872 +:102D6000BB880A0401042920005D120C4006090CEE +:102D7000400ECDF2B7F900E00020E08153E0E069B9 +:102D8000410511D56F9A619900923AAA891849684C +:102D900002042920005D0B0441060B981B0C120C49 +:102DA000490ECEF744FEB880002E3CD1E069810682 +:102DB0001AD50204200020306090407A120C41069F +:102DC0000B98490ECEF72AFE03006F9A3A980092AC +:102DD0000204E069120C01046098090C407A400674 +:102DE000400ECEF731FE1DE001061AD50204200088 +:102DF00020305F90407A120C41060B98490ECEF7B6 +:102E00000DFE03006F9A3A9800920204E069120CDA +:102E100001045F98090C407A4006400ECDF262F939 +:102E200000E00020A081288A4AA90009000130435F +:102E300038836198202208583900D9F290E838ABDD +:102E40001878012809D16E983AA9026861984AABAE +:102E500009581858CBF2E8FD2EE002282CD16198D1 +:102E60004AA9095839913AA9085830AB197F401A34 +:102E700039990004000C0880A97A491EB14202D198 +:102E800039990838088039988079C2076E98D20F2E +:102E900001680B98FAF7B0FD03006E98E97A0268B2 +:102EA0003998FFF715FDA87A401EB04204D1399831 +:102EB0003999008808300880761CA87AB04200D979 +:102EC000F2E6709800280CD0709830AB597FA03093 +:102ED0004173997F817370980E99803001630C99CA +:102EE00041635E982BE6FFB58DB00400169F4068E5 +:102EF0000C9006200B90634805C8099000200890AC +:102F000018980A928030026B0792406B06900889ED +:102F1000401805904D690120A07226681436E62FEE +:102F200001D100200B900D2080012818406A002854 +:102F300002D0179908300860200008300BAA09A9B0 +:102F40006B4607C338000C9908AA04ABCBF2D2FD3C +:102F50000F99E62F086004D1012802D10F980021B3 +:102F600001600B980097070608AB1A783F0E0C9982 +:102F700028003B00FFF7B0FC1798002300681900F9 +:102F8000002803D0827AD20700D0012135277F5D47 +:102F900001223F0707D4002904D0002802D0807AFC +:102FA000800700D40022109803280DD00F980068E5 +:102FB000002805D1A868800706D4002011B0F0BD14 +:102FC000002A01D0179803600698002807D00F98B0 +:102FD0000068002803D00020069017980360069927 +:102FE0000798084304D070684022C1781143C1702B +:102FF000189F08AB19780C980B9AA0377B7B411867 +:10300000881AC01A203885080598AD00843085429A +:1030100000D20500E06820324160787BE168401909 +:1030200080188860E16820890860A17AE068491EFC +:10303000CBF246FE0B9A002A06D0797B280020307E +:10304000081809A9D8F28AEF71687560787B22891F +:103050000B9B8018BA7BD2188018069A002A00D0E1 +:10306000801E08801E30F2690004000C920702D016 +:10307000801D0004000C7084202228000BA17F7B9F +:1030800001000000E01B040000040000B016F3B3D0 +:10309000D8F26EEF28009BE74818040010B5040032 +:1030A0000069FF4988420BD1A07B002808D120008D +:1030B000DDF74DFC002803D12000FEF75FFD10BDB9 +:1030C00000212000F9F7BEFA10BDF0B5B7B0002717 +:1030D0001897179716976120C002BEF74BFA002287 +:1030E000D243F048009240690822012134ABFAF73C +:1030F000C2FBED48BEF73EFA34980028EBD0C0077B +:10310000E9D0CCE116988106401C0029169004D124 +:10311000E648416BC20D1143416319981B9E4469F7 +:10312000F9F7A2FA0500002C0DD0207902280AD167 +:103130001B986030407FCB2805D12000FEF781F836 +:10314000002180300175002E06D0199800F0E0FCB7 +:10315000002801D0012000E000201A902800F9F793 +:1031600087FA012020AB339058791F990002084359 +:103170001999356F48811A98002879D0002C23D0EE +:10318000300060303690407F652812D1A878000763 +:10319000800F02280DD1C6490878002804D0401EAF +:1031A0000006000E087004D1C24AD068D10D8843D1 +:1031B000D0601B9920001BAAC9F7BDFA012828D1AD +:1031C000199800F07EFC9CE7A8780107890F022976 +:1031D00019D10009042816D11B986030407F21289E +:1031E0000BD11BA8E6F717FD04001998D9F21EFCB5 +:1031F0001F992000E6F71AFDF4E3222803D119985D +:10320000D9F214FCEEE3AC48BEF7B4F9C3F754FDB1 +:10321000CFE0012014902000DEF731F831001431A6 +:1032200015911F99002924D1217903297ED1816824 +:1032300002238A079943EB78D20FDB06DB0F5B0092 +:103240001943012A816012D1890710D461790329B9 +:10325000F9D1817FC9070AD00F2189016118096955 +:103260002031097A0029F6D00121803001638EE0F7 +:1032700006E13699497F382909D1A9780A07920FC2 +:10328000022A04D109090C29F1D004297FD021791F +:10329000032912D1807F80070FD018AB987E0028B9 +:1032A0000BD1A8780107890F23D10009052871D017 +:1032B0000B286FD00C286DD01BE06079022866D1F6 +:1032C000B068800063D418AB987E04285FD1A878DA +:1032D0000007800F02285AD12000FDF7B2FF1030FE +:1032E000007E012853D1159841780170159800216E +:1032F0004170A8780007800F17D1199868490069B4 +:10330000884212D019992000D5F7BFFE00281390EB +:103310007ED019980021F9F795F913981990018931 +:103320000E18300014301590356F00E044E0300086 +:1033300060303590407F312801D0322816D1A878EE +:1033400000090C2823D02000FDF77BFF00217030FE +:103350000174417481743598EF22417730781040C0 +:1033600030701598203001781140017015990020B7 +:10337000488015990122086115994861E87808216B +:103380000843E87019992000D5F774FD149020794E +:1033900003280BD10F208001201800692030007A0B +:1033A000002803D101212000D6F70EF81498002838 +:1033B00075D01F98002807D1A8780007800F022831 +:1033C00002D12000CBF7C8FB002C3DD0207901288A +:1033D00006D1306F8079C00702D12000FDF766FF6B +:1033E000A879C00730D1607902282DD11B986030B0 +:1033F000407F382828D0CB280DD12000FDF721FFB1 +:103400001590F9F731F91599002280310A7500E01D +:1034100059E0F9F72DF91B9901222000FDF7B5F8C5 +:10342000A8780007800F022805D11F98002802D134 +:103430002000FCF748FF2000FCF794FF002803D091 +:1034400029002000FCF7A4FFFDF725F9002817D07C +:103450001B986030407F142812D0152810D03528D2 +:103460000ED01F9800280BD1A8780107890F02D130 +:103470000009052804D00220FDF70CFFD6F75BFBFE +:10348000B068000130D51F98002821D1582A774F05 +:1034900001000000DC1F040000040000C5E8080B68 +:1034A000002C2BD00D2080012018806B002825D007 +:1034B0000EE023E174190004F80700040808030073 +:1034C000003400808802000400A800800100010090 +:1034D0006030818B491C818310E0FE49C868401C24 +:1034E000C8605EE7002C09D00D2080012018806B99 +:1034F000002803D06030C18B491CC1831B98603009 +:10350000C27F002A06D01F98742103061B0E2000DC +:10351000CFF7B4FFB06880001A986DD500286AD044 +:10352000C0F727FE002801D0C0F73DFE1B982200FF +:103530006030007F1BA9FBF777FE2079002802D0BE +:103540006079032803D120001BA9FEF752F8FDF78C +:10355000A4F8002826D0E878C006C00F401E2043FB +:103560000AD12079012807D0D8F7C5F9002803D15E +:10357000D8F75BF9002815D0C8F744F8002803D025 +:103580007C20805D072803D8D3490868401C086068 +:103590002079062801D0DAF75DF9B068002801DA51 +:1035A000D9F7CEF96036307F072801D8C8F7B4F8CC +:1035B000CA48007800280FD0C948006803280BD2F9 +:1035C000D8F733F9002807D0D7F7C5FE002803D174 +:1035D00000212000D8F75CF9E1F746FE002803D06F +:1035E00020001BA9E1F7A4FD1998FFF761FD200059 +:1035F0001BA9BFF7A9FAF9E100287ED01BA8CBF7D9 +:1036000033FF02287AD0002C00D02079B06800283F +:1036100001DAD9F795F9C0F7ACFD002805D07C2078 +:10362000805D072801D8C0F7BEFDA87801078A0F82 +:10363000022A7ED1E1F718FE002803D020001BA942 +:10364000E1F776FD20001BA9FCF7AEFC1B982200D9 +:103650006030007F1BA9FBF7E7FD20001BA9F3F7F3 +:1036600039FFA0498872000AC87220001BA9BFF761 +:103670006BFA20001BA9FCF752FD6079032801D0EA +:10368000012803D120001BA9FDF7B3FFFDF705F8C2 +:10369000002823D0E878C0060AD52079012807D071 +:1036A000D8F729F9002803D1D8F7BFF8002815D09A +:1036B000C7F7A8FF002808D07C20805D072808D81D +:1036C00085480168491C016003E083490868401C83 +:1036D00008602079062801D0DAF7BCF86036307F20 +:1036E000072801D8C8F718F8D8F79FF8002812D093 +:1036F000D7F731FE00280ED101E073E17CE1774875 +:103700000078002807D076480068032803D20021FB +:103710002000D8F7BDF8FCF7C8FF00281FD01B9881 +:103720006030407F14281AD12000D6F73FF81F9947 +:1037300000E0AEE0008800290ED1022801D1132755 +:103740000DE02000D6F730F80700CCF2AAFE803753 +:10375000F964B8641E2702E0022800D01F27A87869 +:103760000009042801D00C286ED1707F152822D0C2 +:103770000CDC10281FD0112866D012283BD013284B +:1037800062D11F98002834D133275DE0162842D03B +:10379000352844D038284ED0412855D101221592E1 +:1037A00050221FA968461494D8F256EC1BA80FC8E3 +:1037B000F4F7EBFE48E01F980028E87805D1C00632 +:1037C00001D50E2706E00D2704E0C00601D511271C +:1037D00000E01027C7F716FF002835D0E878C006AC +:1037E00032D518AB587E401E0006000EC8F748F9C7 +:1037F0002AE0342728E01F98002825D1C8F7E7F9E8 +:10380000002821D0E878C0061ED5CCF24AFE364A00 +:10381000D165906518E01F98C0F7B4FE14E01F98BA +:10382000002811D0112040012018418A01222000D7 +:10383000D2F79BFF08E02D49C869401EC8612C499A +:1038400008690222904308611B986030407F30284D +:1038500003D11998F5F7F6FAC8E0372805D1199978 +:103860002000C5F78BFF0028F6D1A87800090428AE +:1038700006D00C2804D01B986030407F5A2803D112 +:103880001998D9F2DDF8B1E017991998F8F7E4FE24 +:10389000ACE0890F5AD1617902292DD1566355D4F4 +:1038A00001000000D823040000040000CB5DA562E5 +:1038B0001B9A29002000E3F7A9FF3390A87800099C +:1038C0000D2847D11F9801263100002800D0002183 +:1038D0001998CAF7B8FFA87800090D283AD12079BD +:1038E000032837D131002EE0F8070004C805000492 +:1038F000B3050004D005000414E9000418D5000441 +:1039000018420004C0A2008000211FE00309D8F281 +:1039100060ED0E21212121212121212108212121B8 +:103920000D2100203390F2F75AFF13E01F98012574 +:103930002900002800D000211998CAF784FF2079B7 +:10394000032807D129001F980028DDD1199800F01D +:10395000C2EC339000203490339800289AD14FE085 +:10396000012A4DD10009082840D00A280AD00E2883 +:1039700046D11998D9F26EF81F98002840D0C0F7A8 +:1039800067FE3DE0F8F784FE0500C9F739F8384ACC +:103990001078002809D037488168491C81600020D0 +:1039A000010010702000D7F77DFF1998D9F252F866 +:1039B0001F98002814D018980A2811D2C9F7A6FE1B +:1039C00000280FD1C8F700F900280BD11898012161 +:1039D000401C0006000E18902000D7F763FF01E09E +:1039E000002018902800F8F757FE09E02900200071 +:1039F0001BAAE3F7ADFE4DE71E490868401C0860AE +:103A0000002F03D03800D9F779FE00271BA8FCF758 +:103A100087F80028199001D0FFF788FBC0F7B3FBA7 +:103A2000002811D0C8F7FAF8002807D0C0F7C1FB6A +:103A3000114AD3699269121A8B4103D3C6F7FCFB72 +:103A4000002801D0C0F73AFE0D490C4808610D4826 +:103A500001694069814201D1FFF751FB0548072206 +:103A60004168491C416040690121F9F724FFF3E7EF +:103A700052020004F807000400420400FF7FFFFF29 +:103A800000A5008000A0008010B50400F2F7A4FD9E +:103A9000002801D1012200E00022002A1BD13F4B67 +:103AA0002069E17B984201D1002012E03C4B984212 +:103AB00001D122200DE03B4B984201D1292008E0A2 +:103AC000394B984201D13B2003E0384B984202D158 +:103AD0003E20FF2905D14220002A01D0012100E02B +:103AE000002140180006000E10BDF8B50500FFF7D4 +:103AF000CBFF0C2358432E492E4E44182068002833 +:103B000003D0B088401CB080F8BD01206560206003 +:103B10006846F8F7CAFD0098A0603078401C307005 +:103B200068690028F0D00F21890140180069203011 +:103B3000017A491C0172F8BD70B50500FFF7A4FFBA +:103B40000C2358431A49401802681A49002A02D027 +:103B50004268AA4204D0C888401CC880002070BDBA +:103B6000002404600878401E08706869002813D09B +:103B70000F2189014118096920310A7A002A0BD0E6 +:103B8000521E1206120E0A7206D10179032903D1C0 +:103B9000DDF789FB80300463012070BD74190004D7 +:103BA000B8190004AC1A0004481A0004981A00045A +:103BB000E4E400041008000402000021012010B514 +:103BC000D7F2B4EF054A1368526818400023114039 +:103BD00059405840084300D0012010BD700E000429 +:103BE000913082E00300A0E10210A0E11EFF2FE16E +:103BF00000A00047FC119FE5001091E5D100A0E373 +:103C000000F021E101D0A0E120129FE5E0219FE535 +:103C1000DB00A0E300F021E1021081E00310C1E32A +:103C2000041041E201D0A0E100A0A0E300B0A0E3B5 +:103C3000C4219FE5D200A0E300F021E1021081E061 +:103C40000310C1E3041041E201D0A0E1D300A0E3DE +:103C500000F021E194319FE5001083E58C119FE590 +:103C6000000091E5040080E294219FE5000082E5D8 +:103C7000BC219FE5BC019FE52C0082E50700A0E385 +:103C8000300082E50900A0E3000082E50B10A0E30C +:103C9000101082E50130A0E3243082E5283082E56F +:103CA00094219FE51030A0E3083082E52785C7D135 +:103CB00001000000D4270400000400004C0BAB30CE +:103CC0001EFF2FE10100A0E30E10A0E16D0000EB4C +:103CD000FEFFFFEA0EF0B0E10200A0E30E10A0E14B +:103CE000680000EBFEFFFFEA0300A0E30E10A0E176 +:103CF000640000EBFEFFFFEA0400A0E30E10A0E169 +:103D0000600000EBFEFFFFEA3D030BEAF8F7DDFC85 +:103D100050480047FF402DE90E00A0E15BF6FEFB96 +:103D2000FF40BDE804F05EE228019FE50010E0E3FB +:103D3000001080E5001090E51C019FE5100F01EEDA +:103D400018F19FE5900F07EE1EFF2FE1FC009FE5A5 +:103D50000010E0E30C1080E5F0009FE500119FE506 +:103D6000081080E5FC009FE5001090E5081081E355 +:103D7000001080E5001090E5081011E2FCFFFF0A3A +:103D8000900F07EE1EFF2FE1100F11EE1EFF2FE127 +:103D9000100F01EE1EFF2FE1010050E2FDFFFF1AA0 +:103DA0001EFF2FE1C0109FE5A520A0E30000A0E3C7 +:103DB000040081E4012052E2FCFFFF1AAC009FE501 +:103DC000AC109FE5001080E5A8009FE5A8109FE5D6 +:103DD000001080E5A4009FE5A4109FE5001080E599 +:103DE0001EFF2FE100000FE11F0000E2120050E370 +:103DF0000100A0030000A0131EFF2FE1100F6FE1D0 +:103E00001EFF2FE1ACFD000410000000880000043C +:103E100000040000E00300009CFD000401C05EE51A +:103E20000C0053E10330DE370C30DE2783C08EE018 +:103E30001CFF2FE13F96A0E319FF2FE10396A0E3BB +:103E400019FF2FE1AC870400003400803F1F000001 +:103E50000030008000343000002100807C1700001A +:103E60004400000002004000C42000806CFD0004FB +:103E7000F4FD000419270400F8FD0004E701000028 +:103E8000FCFD00042128040000204FE100300FE178 +:103E9000D170A0E307F021E1150CFFFBFEFFFFEA64 +:103EA0000E002DE900200FE1D33083E303F021E180 +:103EB0000D00A0E102F021E10E00BDE81EFF2FE1A0 +:103EC0000E002DE900200FE1D33083E303F021E160 +:103ED0000E00A0E102F021E10E00BDE81EFF2FE17F +:103EE0000E002DE900200FE1D23083E303F021E141 +:103EF0000D00A0E102F021E10E00BDE81EFF2FE160 +:103F00000E002DE900200FE1D23083E303F021E120 +:103F10000E00A0E102F021E10E00BDE81EFF2FE13E +:103F200004F01FE5598E00C004F01FE5418E00C06B +:103F300004F01FE5D93700C004F01FE5E39A00C084 +:103F400004F01FE5894700C004F01FE50B2800C0FE +:103F500004F01FE5095C00C004F01FE5155500C022 +:103F600004F01FE5F35400C004F01FE5BB5E00C081 +:103F700004F01FE5635500C004F01FE541DC00C0FC +:103F800004F01FE591DC00C004F01FE5F5DB00C084 +:103F900004F01FE5BDAD00C004F01FE509A500C099 +:103FA00004F01FE52DA500C004F01FE58D0601C03B +:103FB00004F01FE5CFE700C004F01FE50FE800C0E4 +:103FC00004F01FE5BDE800C004F01FE58DE800C067 +:103FD00004F01FE5175500C004F01FE53D9100C037 +:103FE00004F01FE5459200C004F01FE5759200C083 +:103FF00004F01FE509E800C004F01FE523E800C055 +:1040000004F01FE5978E00C004F01FE5914900C041 +:1040100004F01FE5D50301C004F01FE5155C00C0E6 +:1040200004F01FE5550601C004F01FE51FF100C0B4 +:1040300004F01FE5292E01C004F01FE5773101C00F +:1040400004F01FE5CB1E01C004F01FE5D59800C0A9 +:1040500004F01FE5599900C004F01FE57D9800C0E9 +:1040600004F01FE5A79A00C004F01FE5CF9100C03F +:1040700004F01FE56D8F00C004F01FE5FD9900C03E +:1040800004F01FE5BB9300C004F01FE56BEE00C019 +:1040900004F01FE5AB8F00C004F01FE5699A00C073 +:1040A00004F01FE5BB9A00C004F01FE5E93701C02A +:1040B00004F01FE59D4D00C004F01FE5B6F662C395 +:1040C00001000000D02B0400000400006CE803BADB +:1040D000E54900C004F01FE53D5200C004F01FE5B3 +:1040E000518F00C004F01FE5710601C004F01FE508 +:1040F000AB0601C004F01FE5DBED00C004F01FE5D6 +:104100002D8E00C004F01FE5599C00C004F01FE58F +:10411000239C00C004F01FE5519C00C004F01FE583 +:10412000F79E00C004F01FE531A000C004F01FE5B9 +:10413000BF9C00C004F01FE5092900C004F01FE582 +:104140006F5500C004F01FE5D1DF00C004F01FE58B +:10415000BDDF00C004F01FE5CD8F00C004F01FE5F7 +:104160002F2900C004F01FE5DD5001C004F01FE559 +:10417000C95401C004F01FE5355501C004F01FE526 +:10418000055501C004F01FE5855501C004F01FE589 +:1041900057FA00C004F01FE5A36301C004F01FE557 +:1041A000C16401C004F01FE5233701C004F01FE51E +:1041B000894C01C004F01FE5494C01C004F01FE523 +:1041C000130801C004F01FE5BBF900C004F01FE5AF +:1041D000053201C004F01FE54B0D01C004F01FE5DE +:1041E000C1FF00C004F01FE5331C01C004F01FE54F +:1041F0000B9700C004F01FE5B10E01C004F01FE5ED +:10420000B16301C004F01FE59D6301C004F01FE528 +:104210005D3801C004F01FE52F3B01C004F01FE52D +:10422000A73901C004F01FE56D0D01C004F01FE5C2 +:10423000B50701C004F01FE56F4B01C004F01FE596 +:104240002D4B01C004F01FE53F4B01C004F01FE5FA +:10425000CF2201C004F01FE5C55400C004F01FE5E3 +:104260006D0501C004F01FE5470401C004F01FE51F +:10427000BFF900C004F01FE5B7F900C004F01FE566 +:10428000BBFC00C004F01FE5394D01C004F01FE580 +:1042900077E600C004F01FE5CBE600C004F01FE5A0 +:1042A000973701C004F01FE5373701C004F01FE560 +:1042B00055ED00C004F01FE5A55000C004F01FE557 +:1042C0004F5200C004F01FE5BD4D00C004F01FE5D3 +:1042D000334D00C004F01FE5D3E400C004F01FE537 +:1042E000A34D00C004F01FE5C10601C004F01FE5A6 +:1042F000318F00C004F01FE5515900C004F01FE5E4 +:104300004B3601C0F0B5060000200525ED01152350 +:104310005B0143430A4C00221F19D300FB185B19B1 +:104320005B69002B05D09C79B44202D1DB798B42CA +:1043300005D0521C042AF0D3401C0228E7D3F0BD5C +:10434000184200040A49020001200B689040034310 +:104350000B600968014201D0012000E00020002824 +:1043600004D09100034A53585B1C5350704700001F +:10437000C02A008008480004FFB581B007240E0061 +:104380001F000C570025DBF7BAF800280ED0019D5E +:104390002100FF35B1352800DBF7C5FD287C00285A +:1043A00001D0EC6801E06124E44301253C600A99F6 +:1043B0000B20305608603968411A039801602800C4 +:1043C00005B0F0BD023110E2001060120010A00133 +:1043D000013183E311CF6FE11F3683E2111CB0E19D +:1043E0000C3A43E0810AA0E11EFF2F01C11583E0D2 +:1043F0001EFF2FE14224A0E3040000EA022111E2A3 +:104400000100005A000070E20010E1E2422482E361 +:104410000130B0E1032642E22030A0130010B001C9 +:104420001EFF2F0111CF6FE10C3043E0111CA0E102 +:1044300030C381E1032A82E0203063E21033A0E13F +:10444000830AB0E10101A01301402DE9030BB0E1A3 +:10445000A3000300A005B001A305A0E18C0AB0E011 +:10446000AC15A2E00050BDE8033BB0E11EFF2FE118 +:104470000131A0E30010A0E1D5FFFFEA10402DE9D3 +:1044800021E0FFEB0010A0E3001080E51040BDE844 +:104490001EFF2FE1FFC0A0E307CC8CE3213A1CE014 +:1044A00003C03C1002005C11030072C1021A81C0FB +:1044B0001EFF2FC1000053E30700000A00005CE369 +:1044C0000800000A0000A0E3000052E3CEE646AF79 +:1044D00001000000CC2F0400000400004666AA235F +:1044E000021101E2071281A3FF1681A31EFF2FE133 +:1044F000021101E20000A0E31EFF2FE1013690E16E +:104500009BC0A0E301C38C1355640B1A0000A0E10B +:104510001EFF2FE178008200C000C800F0000401F7 +:1045200080019001B80108027601A00FA00FAC0D28 +:10453000100EAC0DAC0DB80BB80BB80BB80BB80B1C +:104540001844140C14310C0C1818140F28140F0FE5 +:104550002D0C0F0F0F0F14281914142819141414EC +:104560001400000000C0040000000000F000000083 +:104570000000010000000004F100000000800500C0 +:10458000000000C0F200000050030000003C00806A +:10459000F30000000010000000200080F400000084 +:1045A0001001000000300080F5000000C01D000078 +:1045B00000A00080F600000000000000FFFFFFFFE9 +:1045C000FE000000370F0000371F0000BE2C000067 +:1045D000370F0000A4A7ACB1B6BBC0C5C7A4A6A93D +:1045E000ACAFB3B8BDC2C6C9FFFFFFFFFFFF0000FD +:1045F0008E030000D606000054100000261B0000A9 +:10460000BA440000821400009C1D00000C2600002B +:104610002A3500005442000034580000186A000097 +:1046200070710000707100009C180000D430000010 +:1046300044480000885E000080890000A4B50000A6 +:10464000F4C90000D4DF000082140000C83200006A +:10465000A86100008890000080BB0000880D010068 +:10466000A85B0100B8820100E0A50100A0140000D1 +:104670004A290000EA3D000085520000CA7B000084 +:104680000AA500008CB9000040CE00008FF70000A2 +:104690008FF70000DA2A0000AA550000848000008D +:1046A00063AB000008010100C6560100FC7F010059 +:1046B00084AC0100290202004A3B0200C05D0000F8 +:1046C00080BB00005815010018730100082D02007E +:1046D00030E60200F043030020A003004859040024 +:1046E000E4D50400C60400008C090000520E00004E +:1046F00018130000A41C000030260000F62A000059 +:10470000BC2F00004839000048390000EA090000C9 +:10471000D4130000BE1D0000A82700007C3B000051 +:10472000504F00003A59000024630000F876000062 +:104730003084000084150000F62A00007A40000052 +:10474000EC550000E2800000D8AB00005CC1000026 +:10475000CED60000C4010100681E01000306070A4E +:104760000D0B0C0E1013171B1C1E0B0C0D13171B1F +:104770001C1D0B0B0E1013171B1C1D010200030444 +:104780000506070028005000A000C8004001900165 +:10479000800220032A040005400625075508000A68 +:1047A00028005000A000C8004001900180022003B2 +:1047B0002A040005400625075508000A2800500075 +:1047C000A000C80040019001800220032B040005D6 +:1047D0004006250728005000A000C80040019001B5 +:1047E0008002200320032B04000500054006250756 +:1047F00025072507000102030405060708090A0B1F +:104800000C0D0D0D0D0001020304050607090A0C2D +:104810000D0E0F0F0F0F0000565555053EC3AE0489 +:10482000B0133B05C451A1045555D504063A6D0497 +:10483000CCCCCC048CDB6804AAAAAA049E615704E1 +:10484000D8899D04E2A850045555D50C049D360422 +:10485000CCCCCC0CC66D340400000000000000007D +:10486000D8899D0C725428049509DB0CD6123804A3 +:1048700006005555060076620400AB6A04006666C1 +:10488000040055550400C54E04005535040033336B +:1048900004008C2E040062270400C236FD7911004A +:1048A000DD791100D7211000B721100044EC0A0077 +:1048B00024EC0A006B7C0A004B7C0A0006BD080051 +:1048C000E6BC0800F3100800D31008002A760500A3 +:1048D000097605003D3E05001D3E05007AC890BAE8 +:1048E00001000000C83304000004000080F7F565F3 +:1048F00039C4040019C404008208040062080400DA +:10490000849B0500749B050000000000010000006E +:1049100000000000000000000000FFFFFFFFFFFF9D +:10492000FFFFFFFFFFFF00002F015D013301620168 +:104930003501320134014601960197016401DD0021 +:10494000D0016901700139017B0100000000010004 +:104950002B012C012D012F013001310132013201D7 +:104960003401360133014601350139017B013B0138 +:104970003B013B013B011F01380140015E01550134 +:104980005D012A0101016201410191019101920140 +:1049900047013C0175017601770178019601970185 +:1049A000A80164012D00DD00D001AA01930170016E +:1049B00098013D00C1010000010205060916070F1C +:1049C0000910110C121203170A18191A151B0E08D8 +:1049D0000B13141C1D1E1E00EFDFFF7F00000000E4 +:1049E000EEDFFF7F00000000ECDFFF7F0000000033 +:1049F000889FBF7F00000000001C3F7F0000000078 +:104A0000E8DFFF7F00000000C09FBF7F00000000C4 +:104A1000809FBF7F00000000001F3F7F000000005C +:104A2000001E3F7F00000000001C3E7F00000000D1 +:104A300000183C7E0000000000103C7E00000000DA +:104A40000000007800000000FFFFFF3F00000000B2 +:104A5000FFFFFF3F00000000FFFFFF3F00000000DE +:104A6000FEFFFF3F00000000FEFFFF3F00000000D0 +:104A7000FFFFFF3F00000000FFFFFF3F00000000BE +:104A8000FEFFFF3F00000000FCFBFF3F00000000B6 +:104A9000FCFBFF3F0000000000C0FF7F00000000A3 +:104AA000F0FBEF3F00000000F0FBEF3F00000000D4 +:104AB0000000000000000000FEFEFEFEFEFEFEFE06 +:104AC00000FEFEFEFEFE0E0E0E0E0E0E0E0F10115E +:104AD00012131415FFFFFFFFFFFF0000100100007D +:104AE00043000000F8FFFFFF0040404040404040CE +:104AF00040404141414141404040404040404040B1 +:104B00004040404040404040400502020202020254 +:104B100002020202020202020220202020202020A3 +:104B200020202002020202020202909090909090B7 +:104B30001010101010101010101010101010101075 +:104B400010101010020202020202888888888888E9 +:104B500008080808080808080808080808080808D5 +:104B600008080808020202024000000000000000DD +:104B70000000000000000000000000000000000035 +:104B80000000000000000000000000000000000025 +:104B90000000000000000000000000000000000015 +:104BA0000000000000000000000000000000000005 +:104BB00000000000000000000000000000000000F5 +:104BC00000000000000000000000000000000000E5 +:104BD00000000000000000000000000000000000D5 +:104BE000000000000000000000776C616E0073643C +:104BF000696F004F53410000A03E0400A03E040036 +:104C00000C49000084000000201B0004201B00044D +:104C100060D4000084000000000000C0000000C05C +:104C200000110000840000005CBF01C05CBF01C037 +:104C3000B88E010084000000006003C0006003C063 +:104C400088E4010084000000000000000000000073 +:104C5000C800D007000000000000000000000000B5 +:104C60000000000000000000000000000000000044 +:104C70000000000000000000000000000000000034 +:104C80000000000000000000000000000000000024 +:104C90000000000000000000000000000000000014 +:104CA0000000FF00000000000000030003000300FC +:104CB0000300000001000000B80B00008813000092 +:104CC00014000000000000000000000000000000D0 +:104CD0000000000000000000102700000600000097 +:104CE000C8AF0000A8610000A86100002A4DA1A67D +:104CF00001000000C43704000004000007A1FB37D6 +:104D0000B888000000000000000000000000000063 +:104D1000B80B0000B80B000000000000000000000D +:104D20000000000000000000000000000000000083 +:104D300000000000000000000000000040420F00E2 +:104D40000000000000000000000000000000000063 +:104D50000000000000000000000000000000000053 +:104D600000000000A08601000000000050C3000009 +:104D7000000000000000000000000000FF01020130 +:104D8000040000000000000000000000000000001F +:104D90000000000000000000000000000000000013 +:104DA0000000000000000000000000000000000003 +:104DB000000000000000000000000500DC0500000D +:104DC00000000100F401000000000100F4010000F7 +:104DD0000100000059060000010000005906000013 +:104DE0000100000059060000010000005906000003 +:104DF000010100002F0D0000010100002F0D000037 +:104E0000010100002F0D0000010100002F0D000026 +:104E100000010500DC05000000010100F4010000B4 +:104E200000010100F4010000020200009D1C0000CE +:104E3000020200009D1C0000020200009D1C0000F8 +:104E4000020200009D1C000000020500DC050000BD +:104E50000000000000000000000000000000000052 +:104E600001000000C63604000001008090010080AF +:104E7000920100800000000000000000000000001F +:104E80000000000001000000000000000000000021 +:104E900001000000100000002700000027000000B3 +:104EA0000000000000000000000000000000000002 +:104EB00000000000000000000000000000000000F2 +:104EC00000000000000000000000000000000000E2 +:104ED00000000000000000000000000000000000D2 +:104EE0000000000000000A0070006000CB026F00AC +:104EF000FFFFFF00080004003D0004004A004500D9 +:104F000050002400FA000000FB00790012010600A6 +:104F10004B018A004D01330053014D006801000030 +:104F200072013A007901EE0098014600F401AC00EC +:104F3000F5012C000802060009024C000D022000B9 +:104F40003002000052023000530236005B0236008D +:104F5000680200006E0218008B0224008D026300BC +:104F6000AE022900AF022900C3024300D9029A0011 +:104F7000DD020C00FE02B500FF02C40001030F00B9 +:104F80002603F10043033E0092033E0093032E00EC +:104F90009803CA00FE038400FF038400010480001C +:104FA0002C04200030041B003104000032040000F7 +:104FB00047044F004A0424004B040F004D04000036 +:104FC0004E04710052041A0085043000A30432001C +:104FD000A40432007005C8007105FF0078050100C7 +:104FE0007E0503007F05860080050000BD050000EA +:104FF000CE050800390608003E06180047060000E6 +:10500000610610007E0607009F060500A006180036 +:10501000A3060700A50609001D0720001E070300C0 +:10502000FFFFFF00F8006400FB00F3004E04700077 +:105030004D04500080050100FFFFFF000800040040 +:105040004A004A00120101004D013300F401A6009C +:10505000F50126000802C60009024C000D0260009E +:1050600030020F008D02A500C3028300D9021A008E +:10507000DD020000FC02B400FE02AB00FF02AB0048 +:10508000010303002603C100430366002004C0009F +:1050900021043E002304030024043F0025040000F3 +:1050A00026043F00270408002804B800290438001B +:1050B0002A0439002B040100FFFFFF000800040050 +:1050C0004A004500120106004D013300F401AC0016 +:1050D000F5012C000802060009024C000D02200018 +:1050E000300200008D026300C3024300D9029A001F +:1050F000DD020C00FC02A400FE02B5007DB098EEBB +:1051000001000000C03B0400E4020000C2781F134D +:10511000FF02C40001030F002603F10043033E0019 +:105120002004F700210436002304000024040000BA +:105130002504380026043B002704000028048000D2 +:1051400029043F002A0405002B040000FFFFFF0094 +:10515000080024003D0004004A004500500064009F +:105160006900E6006C005800F8006600FA003100A3 +:10517000FB00C2001201060023010A004B018A0055 +:105180004D01330053014D006801000072013A00E7 +:105190007901CE0098014600F401AC00F5012C0025 +:1051A0000802060009024C000D0220003002000037 +:1051B00052023000530236005B02360068020000E3 +:1051C0006E0218008B0234008D027300AE023E00A6 +:1051D000AF022900C3024300D9029A00FE02B500C3 +:1051E000FF02C40001030F002603F10043033E0049 +:1051F00092033E0093032E009803CA00FE0384002E +:10520000FF0384000104C0002C04200030041B00B4 +:10521000310400003204000047044F00480410002D +:105220004A0424004B040F004D0400004E0471009A +:1052300052041A0085043000A3043200A404320092 +:10524000D50490007005C8007105FF007105FF00CE +:10525000780501007E0503007F05860080050000BB +:10526000BD050000CE050800390608003E061800FE +:1052700047060000610610007E0607009F06050035 +:10528000A0061800A3060700A50609001D072000B8 +:105290001E070300FFFFFF00FB0083004D045000CA +:1052A0004E04700080050100FFFFFF00FA000000BF +:1052B000FB00C10068011000680210006E021C00B3 +:1052C000AF021E003104FF003204FF004D04300025 +:1052D0004E0470008005020061060000FFFFFF0021 +:1052E000FFFFFFFFFFFFFF2021FFFF2223FFFFFF44 +:1052F00024FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF99 +:10530000FFFF25FF00FF26FF01FF27FF02FF28FF09 +:1053100003FF32FF04FF29FF05FF33FF06FF2AFFCB +:1053200007FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF85 +:10533000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7D +:10534000FFFFFFFF08FF2BFF09FF34FF0AFF2CFFC1 +:105350000BFF35FF0CFF2DFF0DFF36FF0EFF2EFF5D +:105360000FFFFFFF10FF2FFF11FF38FF12FF40FF5D +:1053700041FFFFFFFF13FF30FF14FF39FF15FF311F +:10538000FF16FFFFFF17FFFFFFFFFFFFFFFFFFFFFE +:10539000FFFFFFFFFFFFFF18191AFF1B1C1DFFFF78 +:1053A0001EFFFFFF1FFFFFFFFFFFFFFFFFFFFFFFCE +:1053B000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD +:1053C000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFED +:1053D000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDD +:1053E000FFFFFF00FFFFFF00FFFFFF0000000000C6 +:1053F00079B8982B010000000000000400040000B0 +:105400002060D299000000000000000000000000B1 +:10541000322E332E312E300000000000000000003C +:1054200000000000AF02000004000000AF02000016 +:1054300006000000AF02000007000000CB8830002B +:105440000B0000003D0300000D0000003D030000C4 +:105450000E0000002303000011000000E304000020 +:10546000140000006F0300001D0000000000000099 +:1054700000000000330100001E0000005301000086 +:105480001F0000000000000000000000BCE701C099 +:10549000000000000000000000000000000000000C +:1054A00000000000FFFFFFFFFF0A000000000000F7 +:1054B00000000000000000000000000000000000EC +:1054C00000000000000000000000000000000000DC +:1054D000FFFFFF0000FFFFFF0000FFFFFF0000FFD6 +:1054E000FFFF0000FFFFFF00000000000C000000B5 +:1054F000000000000B000000000000000A00000097 +:105500000000000000050A06003C008006000800BC +:10551000090006000300050008000300030009005D +:10552000050003000300050006000300030005005A +:10553000050003000300060005000300BB08770C0C +:10554000F40EBB0800057D07770C0005C103F40EBF +:105550007D07C103C1037D07FA09C10300057D076B +:105560007D070005C103FA097D07C103900CEE1108 +:105570008315900C3107C60AEE11310767058315B4 +:10558000C60A67056705C60A5A0E67053107C60AC7 +:10559000C60A310767055A0EC60A6705E60C691286 +:1055A0001616E60C6307100B691263078C051616B6 +:1055B000100B8C058C05100BBC0E8C056307100BB3 +:1055C000100B63078C05BC0E100B8C05F05500000A +:1055D000A00F00000100000000000000000000001B +:1055E00000000000000000000000000000000000BB +:1055F000000000000000000000000000FF000000AC +:10560000000000000000000000800000000000001A +:10561000000000000000000000000000000000008A +:105620000600030904060405070A08010602080724 +:105630000F007F00010000000000000000000000DB +:105640000000000000000000000004000100000055 +:10565000000000000000000000000000000000004A +:105660006009000000000000000000008813000036 +:1056700000000000E803000000000000000000003F +:10568000000000000000000000000000000000001A +:10569000000000000000000000000000000000000A +:1056A00000000000000000000000000000000000FA +:1056B00000000000000000000000000000000000EA +:1056C00000000000000000000000000000000000DA +:1056D00000000000000000000000000000000000CA +:1056E00000000000000000000000000000000000BA +:1056F00000000000000000000000000000000000AA +:105700000000000000000000000000000000000099 +:10571000E093040020A10700E093040020A107000B +:10572000E093040020A1070030750000C0D4010000 +:1057300000000000C136040000000000000000006E +:10574000000100000E000000010000000000000049 +:1057500000000000000000000A000000307C01C0D2 +:10576000A08001C0D88601C0E48901C0B47B01C01B +:10577000248001C070007000A1017400A201250006 +:10578000FFFFFF000000000000000000700060004C +:10579000A1017400A2012500FFFFFF00000000002E +:1057A0000000000070004000A1017300A2011C0075 +:1057B000FFFFFF000000000000000000700040003C +:1057C000A1017300A2011C00FFFFFF000000000008 +:1057D0000000000070002000A1017100A201120071 +:1057E000FFFFFF000000000000000000700010003C +:1057F000A1017000A2010800FFFFFF0000000000EF +:1058000004EF055E01000000FC030004000400003A +:105810007A1BDD9000000000C47D01C0007F01C044 +:1058200000000000B88101C0808301C04C8501C028 +:10583000C87D01C0047F01C000000000448201C097 +:105840000C8401C0D88501C0487E01C0847F01C09E +:1058500000000000C48201C08C8401C0588601C0D1 +:10586000E48701C0E48801C000000000F08A01C0A4 +:10587000F08B01C0F08C01C0648801C0648901C054 +:1058800000000000708B01C0708C01C0708D01C0E1 +:105890008C7D01C0C87E01C0000000007C8101C079 +:1058A000448301C00C8501C0FF000000000000001F +:1058B000FBFBFF88BE03BF03C403C5030000000059 +:1058C00000000000000000000000000000001200C6 +:1058D00002000000000012000200000000000000B2 +:1058E0000000000000000000FFFF0000FBFBFF9233 +:1058F000FBFBFF92FBFBFF9285068D0684068C0660 +:1059000083068B0682068A0684068C0683068B062F +:1059100082068A0681068906800688067F06870633 +:105920000000000001000000000000000000000076 +:105930000000000000000000000000000000000067 +:105940000000000000000000000000000000000057 +:105950000000000000000000000000000000000047 +:105960000000000000000000000000000000021223 +:1059700012020300000305040401000000000000FF +:105980000000000000000000000000000000000017 +:105990000000000000000000000000000000000007 +:1059A00000000000FF000000FF00000000000000F9 +:1059B00000000000000000000000000000000000E7 +:1059C00000000000000000000000000000000000D7 +:1059D000000000001E0000000000000000000000A9 +:1059E00000000000000000000000000000000000B7 +:1059F00000000000000000000000000000000000A7 +:105A00000000000000000000000000000000000096 +:105A10000000000000000000000000000000000086 +:105A20000000000000000000000000000000000076 +:105A30000000000000000000000000000000000066 +:105A40000000000000000000000000000000000056 +:105A50000000000000000000000000000000000046 +:105A60000000000000000000000000000000000036 +:105A70000100000001000000000000000100000023 +:105A80000100000001000000000000000000000014 +:105A90000000000000000000000000000000000006 +:105AA0000A000000000000000000000000000000EC +:105AB00000000000000000000000000000000000E6 +:105AC00000000000000000000000000700000000CF +:105AD00000000000000000000000000000000000C6 +:105AE00000000000010000000000000003000102AF +:105AF00000010002000000000000000000000000A3 +:105B00000000000000000000000000003C00000059 +:105B10000000000000000000000000000000000085 +:105B20000000000000000000000000000000000075 +:105B30000000000000000000000000000000000065 +:105B4000AF020000050000001BFD0300090000007B +:105B50000000000000000000000000000000000045 +:105B6000010000000028000000000000000000000C +:105B70000000000000000000000000000000000025 +:105B8000F5560000E847000402010100020201008E +:105B900001020100010302000103010000FFFF00F8 +:105BA0007F0000000000FFFFFFFFFFFFFFFFFFFF80 +:105BB0000000000063A100C0010000000000000020 +:105BC0000400000000000000FFFFFF0F00000000C5 +:105BD000FFFFFFFF00000000FFFFFFFF00000000CD +:105BE000FFFFFFFF0000000000000000CB360400B4 +:105BF00000000000000000000000000000000000A5 +:105C00000000000000000000000000000000000094 +:105C10009AFE36E401000000F807000400040000CA +:105C200029C10EFC00000000000000000000000080 +:105C30000000000000000000000000000000000064 +:105C4000000000000000000000000000555320018B +:105C50005347200145552002415520024B52200256 +:105C60004A5020034A3120030000000000000001D8 +:105C70000203050608097EFF010102020203030375 +:105C800003040405050503030304040505050707CC +:105C900007070808090909030303040405050506A5 +:105CA0000607070708080909090A0A0E0E0E0F0F52 +:105CB00010101011110C0C0D0D0D0B0B0B0B0B0B11 +:105CC0000B0BFFFFFFFFFF1212121212121212072C +:105CD0000C00000000003D0000030C00000000006C +:105CE0003D0000030C00000000003D0000080C0017 +:105CF000000000003D0000080C00000000003D0016 +:105D000000080C00000000003D0000090C0000002D +:105D100000003D0000080C00000000003D000008ED +:105D20000C00000000003D0000080C000000000016 +:105D30003D0000080C00000000003D0000070C00C2 +:105D4000000000003D0000030C00000000003D00CA +:105D500000030C00000000003D0000090C000000E2 +:105D600000003D0000090C00000000003D0000099B +:105D70000C00000000003D0000090C0000000000C5 +:105D80003D0000070C00000000003D000000000086 +:105D90000000000000000000B8390400003C0400CE +:105DA000E83A040000000000483D04005C3D0400A7 +:105DB00040020000FFFFFFFF140C780048020000C3 +:105DC000FFFFFFFF00304400D4020000000000107D +:105DD00000000010E4030000FFFFFFFFFFFF40E0B2 +:105DE00078060000FF00000024000000B00600005C +:105DF000FFFFFFFF6C01D802B4060000FFFFFFFFAA +:105E0000D4006802B8060000FFFFFFFFB1002002C7 +:105E1000BC060000FFFFFFFFA7000C02C006000049 +:105E2000FFFFFFFFA200D802C4060000FFFFFFFF34 +:105E30005E00D802C8060000FFFFFFFF5600D80230 +:105E4000CC060000FFFFFFFF52000C02D00600004E +:105E5000FFFFFFFF4E000C02D4060000FFFFFFFF14 +:105E60004E000C02D8060000FFFFFFFF4A000C02A4 +:105E7000DC060000FFFFFFFF4A000C02E006000006 +:105E8000FFFFFFFF4A000C02E4060000FFFFFFFFD8 +:105E90004A000C021407000040000000400000000F +:105EA00048070000FFFFFFFF2800280078070000D8 +:105EB000FFFFFFFF414141407C070000FFFFFFFF64 +:105EC000467317600C08000000800001000000000D +:105ED000240800000280080600000806C008000030 +:105EE000FFFFFFFFFFFFEFF82409000001000100A2 +:105EF00001000100280900000C0200000C00000055 +:105F00002C0900000008000400000000CC0900007B +:105F1000FFFF000060D00000F0090000FFFF00005C +:105F2000B8010000F8090000FFFF00009001000028 +:105F3000C00A00000080003300800033D80A00004F +:105F4000C0010000C0010000F00A000000000100D4 +:105F5000000001001C0D0000FFFF000032000000E7 +:105F6000200D0000FFFF000028000000240D0000AD +:105F7000FFFFFFFF22222222280D0000FFFFFFFF6C +:105F800000000000D40D0000000600000002000028 +:105F9000540E0000FFFF0000900000005C0E0000A7 +:105FA0000013000000130000C00E00000000FFFFFF +:105FB00000000002C40E00000000FFFF000000020D +:105FC000C80E00000000FFFF00000002CC0E000021 +:105FD0000000FFFF00000002D00E00000000FFFFE5 +:105FE00000000002D40E00000000FFFF00000002CD +:105FF000D80E00000000FFFF00000002DC0E0000D1 +:106000000000FFFF00000002E00E000000010000A1 +:106010000001000038100000080000000800000027 +:106020003AD13A3E01000000F40B000400040000E5 +:10603000DDAE7B48FFFF0000FFFFFFFFFFFFFFFF1C +:106040000000000000000000000000000000000050 +:106050000000000000000000000000000000000040 +:106060000000000090039103000000000000000009 +:106070000000000006006C09B409000000000000E8 +:106080000000000000000000000000000000000010 +:10609000F900000000000000F6000000040000000D +:1060A0000700000048000000020000002D00000072 +:1060B0005500000056000000570000005800000086 +:1060C000A2000000A7000000AB000000AC00000030 +:1060D000AF000000B0000000B1000000B4000000FC +:1060E000C8000000080000002C0000002D00000087 +:1060F0002E000000310000003200000033000000DC +:106100003600000037000000380000004F0000009B +:106110005A00000080000000DD0000003501000092 +:10612000790100007B01000004020000540300001C +:10613000880200008B0200008C020000B603000001 +:10614000B8030000B9030000CB030000CE03000039 +:10615000CF030000D0030000080400005104000039 +:106160009404000095040000440000004700000073 +:106170005000000051000000790100007A01000089 +:106180007B010000D90200000400000007000000AD +:1061900048000000020000002D0000004700000041 +:1061A000500000005500000056000000570000009D +:1061B00058000000A2000000A7000000AB00000093 +:1061C000AC000000AF000000B0000000B100000013 +:1061D000B2000000B4000000C5000000E2000000B2 +:1061E000080000002C0000002D0000002E00000020 +:1061F00031000000320000003300000036000000D3 +:1062000037000000380000004F0000005A00000076 +:1062100080000000DD000000350100007901000071 +:106220007B01000004020000880200008B020000D5 +:106230008C02000054030000B6030000B803000005 +:10624000B9030000CB030000CE030000CF03000021 +:10625000D003000008040000510400009404000072 +:106260009504000000000000B03000900100000024 +:10627000000000000000000000000000000000001E +:10628000000000000000000000000000FF0000000F +:1062900000000000000000000000000000000000FE +:1062A00000000000000000000000000000000000EE +:1062B00000003F7FFEFDFF1F0F00000055000000A3 +:1062C00064000000220000000E0000000400000036 +:1062D0001D000000470000006400000012000000E4 +:1062E000070000000400000021000000430000003F +:1062F000640000001000000007000000040000001F +:106300000E000000560000006400000024000000A1 +:106310000F000000040000000E0000005600000006 +:1063200064000000240000000F00000004000000D2 +:106330001E0000004B00000064000000140000007C +:1063400008000000040000001E0000004B000000D8 +:1063500064000000140000000800000004000000B9 +:106360001E0000004B00000064000000140000004C +:1063700008000000040000001E0000004B000000A8 +:106380006400000014000000080000000400000089 +:106390001E0000004B00000064000000140000001C +:1063A00008000000040000001E0000004B00000078 +:1063B0006400000014000000080000000400000059 +:1063C0001E0000004B0000006400000014000000EC +:1063D00008000000040000001E0000004B00000048 +:1063E0006400000014000000080000000400000029 +:1063F0001E0000004B0000006400000014000000BC +:106400000800000004000000230000004B00000012 +:1064100064000000140000000800000004000000F8 +:10642000230000004B000000640000001400000086 +:10643000535521BD01000000F00F000400040000CE +:106440008E74A82408000000040000001E00000054 +:106450004B00000064000000140000000800000071 +:1064600004000000170000004B0000006400000062 +:106470001400000008000000040000001E000000DE +:106480004B00000064000000140000000800000041 +:10649000040000001E0000004B000000640000002B +:1064A0001400000008000000040000001E000000AE +:1064B0004B00000064000000140000000800000011 +:1064C000040000001E0000004B00000064000000FB +:1064D0001400000008000000040000002300000079 +:1064E0004B000000640000001400000008000000E1 +:1064F00004000000230000004B00000064000000C6 +:106500001400000008000000040000002300000048 +:106510004B000000640000001400000008000000B0 +:10652000040000001E0000004B000000640000009A +:106530001400000008000000040000001600000025 +:106540004B00000064000000140000000800000080 +:10655000040000001E0000004B000000640000006A +:106560001400000008000000040000001E000000ED +:106570004B00000064000000140000000800000050 +:10658000040000001E0000004B000000640000003A +:106590001400000008000000040000001E000000BD +:1065A0004B00000064000000140000000800000020 +:1065B00004000000230000004B0000006400000005 +:1065C0003200000020000000100000002300000046 +:1065D0004B000000640000003200000020000000BA +:1065E000100000001E0000004B00000064000000CE +:1065F0003200000020000000100000001E0000001B +:106600004B00000064000000320000002000000089 +:10661000100000001E0000004B000000640000009D +:106620003200000020000000100000001E000000EA +:106630004B00000064000000320000002000000059 +:10664000100000001E0000004B000000640000006D +:106650003200000020000000100000001E000000BA +:106660004B00000064000000320000002000000029 +:10667000100000001E0000004B000000640000003D +:106680003200000020000000100000001E0000008A +:106690004B000000640000003200000020000000F9 +:1066A00010000000230000004B0000006400000008 +:1066B0003200000020000000100000002300000055 +:1066C0004B000000640000003200000020000000C9 +:1066D00010000000230000004B00000064000000D8 +:1066E0003200000020000000100000001E0000002A +:1066F0004B00000064000000320000002000000099 +:10670000100000001E0000004B00000064000000AC +:106710003200000020000000100000001E000000F9 +:106720004B00000064000000320000002000000068 +:10673000100000001E0000004B000000640000007C +:106740003200000020000000100000001E000000C9 +:106750004B00000064000000320000002000000038 +:10676000100000001E0000004B000000640000004C +:106770003200000020000000100000001E00000099 +:106780004B00000064000000320000002000000008 +:1067900010000000230000004B0000006400000017 +:1067A0003200000020000000100000002300000064 +:1067B0004B000000640000003200000020000000D8 +:1067C00010000000230000004B00000064000000E7 +:1067D0003200000020000000100000001E00000039 +:1067E0004B000000640000003200000020000000A8 +:1067F000100000001E0000004B00000064000000BC +:106800003200000020000000100000001E00000008 +:106810004B00000064000000320000002000000077 +:10682000100000001E0000004B000000640000008B +:106830003200000020000000100000001E000000D8 +:1068400098E791D701000000EC1300040004000059 +:1068500031B18D974B000000640000003200000051 +:1068600020000000100000001E0000004B0000008F +:106870006400000032000000200000001000000052 +:106880001E0000004B000000640000003200000009 +:10689000200000001000000002000000F4010000D1 +:1068A00000000000000000000000000000000000E8 +:1068B0000000000000000000FF00000000000000D9 +:1068C00000000000000000000000000000000000C8 +:1068D00000000000000000000000000001000000B7 +:1068E0000300000002000000000000008000000023 +:1068F000F70073003901FA006201910136000000CF +:1069000090008900C8003E01D7009001A40000005B +:106910002301D0006D01BC01880158023A0000003B +:1069200091009B00C90054011D012003A400000038 +:106930002301D0006D01BC01880158023A0000001B +:1069400091009B00C90054011D01200300000000BC +:106950000000000000000000000000000000000037 +:106960000000000000000000000000009E00000089 +:106970000401BE0034014C015D01F4013800000047 +:106980009600BE00D800DE0106011F039E00000035 +:106990000401BE0034014C015D01F4013800000027 +:1069A0009600BE00D800DE0106011F039E00000015 +:1069B0000401BE0034014C015D01F4013800000007 +:1069C0009600BE00D800DE0106011F038200000011 +:1069D000F100EB004C0118026901EF02F6FF000024 +:1069E0005700A20083004A01B50070024800000071 +:1069F00090005400C500A800EA00F400ECFF00007D +:106A0000500083008D004301C70081024800000050 +:106A100090005400C500A800EA00F400ECFF00005C +:106A2000500083008D004301C70081020000000078 +:106A30000000000000000000000000000000000056 +:106A4000000000000000000000000000180000002E +:106A500052001800B20070000A011401F4FF000097 +:106A6000430080008E005401DE000C03180000007B +:106A700052001800B20070000A011401F4FF000077 +:106A8000430080008E005401DE000C03180000005B +:106A900052001800B20070000A011401F4FF000057 +:106AA000430080008E005401DE000C030100000052 +:106AB00000000000000000000000000000000000D6 +:106AC0000000000019E900C031E900C065EA00C01B +:106AD0000F2E01007B140300A1220000250401C039 +:106AE000CFB900008360000053C101007717000098 +:106AF0002A7901C0FFFFFFFFFFFF00000000000038 +:106B00000000000000000000000000000000000085 +:106B10000000000000000000000000000000000075 +:106B20000000000000000000000000000000000065 +:106B30000000000000000000000000000000000055 +:106B400008000000FF1EFFFF4102FE10FFFF0000D3 +:106B5000FFFFFFFFFFFFFFFFFFFF0000FFFFFFFF43 +:106B6000FFFFFFFF0C000000FEFFFFFFFEDDE00A5D +:106B700044000000FF01FF010F000F00740000003F +:106B8000FF00FFFF6100026178000000FFFFFF00CF +:106B9000428481007C000000FFFFFF0002028200AF +:106BA000E0000000FFFF0F00002508000C010000BE +:106BB0000E0000000E000000FFFF0000FFFFFFFFBF +:106BC000FFFFFFFF00070000012630C0002000800B +:106BD000FFFF0000FFFFFFFFFFFFFFFF0C000000B3 +:106BE000FEFFFFFFFEDDE00A44000000FF01FF01A1 +:106BF0000000000074000000FF00FFFF0100020120 +:106C000078000000FFFFFF00028582007C0000008A +:106C1000FFFFFF0002038200E0000000FFFF0F0003 +:106C2000002500000C0100000E0000000E00000016 +:106C3000FFFF0000FFFFFFFFFFFFFFFF0007000057 +:106C4000012630C000000080FFFF0000FFFFFFFFB3 +:106C5000DC5E119B01000000E81700043C0300000B +:106C6000FF82A633FFFFFFFF0000000000000000CE +:106C700000000000FFFF0000000000000000000016 +:106C80000000000000000000000000000000000004 +:106C90000100000044A000804CA0008054A00080AF +:106CA0005CA0008064A000806CA0008074A00080C4 +:106CB0007CA0008034A000803CA000801CA000804C +:106CC00024A000802CA0008014A0008040A00080A0 +:106CD00048A0008050A0008058A0008060A00080E4 +:106CE00068A0008070A0008078A0008030A00080A4 +:106CF00038A0008018A0008020A0008028A000807C +:106D000010A0008000000000000000000000000053 +:106D1000000000000800040102000000050102005C +:106D20000000060102000000070102003C001601FD +:106D3000020000001701020000002601020000000E +:106D400027010200000028010200000029010200C2 +:106D500000002401100000000000000000000000FE +:106D600000000000000049010200320000000000A5 +:106D7000000000000000000000000000003D3D0099 +:106D8000280019000A00FFFF0007000700000000AC +:106D9000E0050000010000000000000028230000C2 +:106DA0002823000094110000282300007017000021 +:106DB000B80B0000B80B0000B80B0000000000008A +:106DC0000000000000000000000000001F20212241 +:106DD0002B2C2D35363738393A3B3C1F2021222BBE +:106DE0002C2D2E2F3031321F20212223242526271F +:106DF00001000000000000000000000000D60004B8 +:106E0000C007220002000000000000000000000097 +:106E100038D60004EC07030070D600047C0901009A +:106E2000010000000000000000000000A8D60004DF +:106E30003C0304000200000000000000000000000D +:106E4000E0D60004E001030018D70004D4030400D6 +:106E500001000000000000000000000050D7000406 +:106E6000EC0701000100000000000000000000002D +:106E700088D700041C080100030000000000000087 +:106E800000000000C0D700045C000800F8D7000430 +:106E9000DC01060030D800042407020001000000D5 +:106EA000000000000000000068D800047C09010018 +:106EB000010000000000000000000000A0D8000455 +:106EC00010020400010000000000000000000000AB +:106ED000D8D80004EC070300010000000000000007 +:106EE0000000000010D90004FC040D0001000000A7 +:106EF000000000000000000048D900043C000A0027 +:106F000001000000000000000000000080D9000423 +:106F10001C0403000100000000000000000000004D +:106F2000B8D900041C0404000100000000000000A7 +:106F300000000000F0D90004FC0012000100000075 +:106F4000000000000000000028DA0004140404001F +:106F50000000000000000000000000000000000031 +:106F60000400000000000000000000000400000019 +:106F70001E0000001A0000001A0000001E000000A1 +:106F80000000000000000000000000000000000001 +:106F90000000000003000001000000007F15D7C7BB +:106FA00001000000001300C00C000000BE3C7D1476 +:106FB00000000000000000000000000001000000D0 +:106FC000801300C00C000000C73C28270000000010 +:106FD000000000000000000001000000002400C0CC +:106FE00000040000FA721B24002109A010B514F05F +:106FF0007EE8094C606014F07EE814F080E82068B8 +:10700000002803D000220D2114F07CE8002010BDE0 +:10701000776C616E000000000000000410B500F005 +:10702000F1FB1D48802114F072E81C48DC2114F0AB +:107030006EE81A481421DC3014F068E81748502133 +:10704000F03014F064E8002010BDF0B500240126F3 +:10705000134F09E0C519686814F05CE869683000EE +:10706000884010498860641CE00039580029F1D13B +:107070000B4F0024503709E0C519686814F04AE83E +:1070800069683000884008498860641CE00039580D +:107090000029F1D10020F0BD3CC40004802B000485 +:1070A00020000004003000800031008004490348C3 +:1070B000086005490348086070470000F10A0000B5 +:1070C000B0F8000488190004B4F800040449034827 +:1070D000086005490348086070470000D3190000A4 +:1070E000B8FC00042D190000BCFC000410B514F01D +:1070F00016E810BD54480221C17304210174C17CFB +:10710000FD22490849001140C1747047F8B514F0D8 +:107110000AE8002803D014F00AE8002877D14A488A +:107120000024001F046000F030F914F004E847491F +:107130000D5C14F004E8290014F004E8444E230028 +:10714000320014F004E8401C614105042D0C13F0DA +:10715000F2EF404940000F5A13F0FCEF390013F0F2 +:10716000F2EF2300320013F0F2EF401C6141000403 +:10717000000C290000F018F913F0DCEF36490D5C23 +:1071800013F0DCEF290013F0DEEF2300320013F0E0 +:10719000DEEF401C614105042D0C13F0CCEF2F49AC +:1071A0000F5C13F0CCEF390013F0CCEF230032006A +:1071B00013F0CCEF401C61410004000C290000F0EA +:1071C0000AF9082000F0F6F813F0B8EF310013F0D8 +:1071D000C6EF401C0004000C00F0F5F813F0AEEF11 +:1071E000052113F0B0EF1E4A230013F0B0EF19226F +:1071F000801861410006000E00F0F3F8601E13F0E5 +:10720000B2EF082013F0B2EF082013F0B4EF032020 +:1072100013F0B4EF0C2013F0B2EF00F0F2F813F01B +:10722000B2EF13F0B4EF040013F0B4EF210000F05C +:10723000F0F800F0DEF80320000213F0A0EFFFF7F3 +:1072400059FF01F0D1F8F8BDCC0000042C30040047 +:1072500040420F0016300400423004003730040072 +:10726000C0C62D00084810B5006808490200103259 +:10727000001D0A60486000210A000B000EC00220B9 +:10728000034913F08CEF10BDD0B701C020370400C4 +:10729000E1290000FEB5002101272848C7600160F0 +:1072A00002214174C80126490979890600D425487C +:1072B000224C06040925C03C360C0022310028006F +:1072C0000123A58113F06EEF60811420E081192065 +:1072D0004001E080E120C0002081200024302062B5 +:1072E00048347D20400127606081E0802081A080BB +:1072F0000022310028000123A58113F054EFE08122 +:1073000020001C21943013F002EF00220520009091 +:107310002000019202920C4A103000230BA113F0BE +:1073200046EF00220C2000902000019202920D4AAC +:107330003C3000230CA113F03AEFFEBDC042040024 +:10734000C4E80004000100405731000070726F74FF +:10735000656374696F6E46726D446F6E65546D72CD +:107360000000000065310000627473796E6344654B +:10737000617373657274546D720000003448406824 +:10738000C168344A1143C160704700B5FFF7F6FF8A +:107390002F48406841680122520211434160416810 +:1073A000D2001143416000BD0904014328484068F0 +:1073B0008161704726494968CA681204120C0004AA +:1073C0000243CA607047224949684A69120C120494 +:1073D00002434A617047090401431D484068C16384 +:1073E00070471B4948F3A0CA01000000FC2700C0F9 +:1073F00000040000A009142D49684A68120A12020C +:1074000002434A607047174840680169012212042C +:10741000114301617047134840688030416806227B +:107420009143416070470F4A52688032536A0901A4 +:107430001B0F1B0709090B435362116A4003C90C58 +:10744000C904400B0143116210681F2109048843DD +:1074500001210905401810601068490008431060B8 +:1074600070470000000100048F03000083C08FE21A +:107470001CFF2FE10121092000070160002141606C +:1074800070476148016B8022114301637047704768 +:107490005E4810B50068002801D0FFF7F2FF13F036 +:1074A00094EE10BD10B55A4C07F004FAA04221D05A +:1074B00058490840040013F08CEE262013F08CEE9F +:1074C000010920070901000F08430106090E2620C3 +:1074D00013F086EE13F088EE200A41074E4A490F5A +:1074E0000429117001DD04211170000702D5107804 +:1074F0004042107010BDFF20C130202100B513F0B4 +:1075000078EE00BD10B5454C207900280BD1012044 +:10751000207113F072EE062013F05EEEC006C00F6D +:10752000607113F06EEE607910BD70B50600FFF764 +:10753000E9FF3B4D2C0D002811D013F05EEE8021A9 +:10754000262013F062EE13F05CEEA8682043A860DA +:1075500034488168220211438160002003E0A8685A +:10756000A043A860300013F054EE70BD70B513F066 +:1075700054EE13F056EE2C4C0021200013F054EE84 +:107580000021200013F054EE0021200013F054EEEF +:107590000021200013F054EE244C60682449084078 +:1075A00060602068612149050843206013F04CEEBB +:1075B000204DC00602D42068A843206013F044EE9A +:1075C0002168C00601D5294300E0A94360686060D6 +:1075D00021600E480068002802D0B520FFF7A5FF03 +:1075E00070BD7047704710B513F032EE0B4C002899 +:1075F00002D013F032EE01E013F032EEE06010BD85 +:107600000E490D4808607047400C0090E49101C09D +:10761000FFFF00003F0F000000010004F80100041C +:1076200080280080402300808038010000210080F5 +:10763000FF7FFF7F00000020DD4D0000F8F7000411 +:1076400010402DE90F1D00FB78409FE5000094E5F8 +:10765000000050E30300000A91FFFFFA000094E5E8 +:10766000000050E3FF4E001BD70300FA0000A0E328 +:10767000FE4E00EBBCFFFFFA0000A0E382FFFFFB21 +:1076800082FFFFFA000094E5000050E376FFFF1B45 +:10769000D2FFFFFB9E0300FB000094E5000050E3D7 +:1076A0000100000ACEFFFFFBF24E00EBCCFFFFFA19 +:1076B00000000FE1BF0000E200F021E1EF4E00EB1F +:1076C0000000A0E31080BDE8E49101C010B501F016 +:1076D000E2F800F013F913F0D8ED13F0DAED00F052 +:1076E000D3F8002801D0012010BD13F0D6ED002002 +:1076F00010BD3B49394810B54863FFF711FD3A48C2 +:107700003849016039494160394981603948416BE4 +:1077100008229143416338480168384A11400160AA +:1077200013F0BEED03220621002013F0BEED00226F +:107730000621100013F0B8ED13F0BAED13F0BCED14 +:107740000400012013F0BCED200013F0BEED13F097 +:10775000F4EC002805D013F0F4EC002801D013F06D +:10776000B8ED002010BD10B513F0B6ED10BD30B56A +:107770009408002203E09300CD58521CC550A24249 +:10778000F9D330BD9308002210B502E09400521CDA +:1077900001519A42FAD310BD10B5032424021848AF +:1077A00022000021FFF7EEFF0722164812020021F7 +:1077B000FFF7E8FF144915482200FFF7D8FF1449E6 +:1077C00014482200FFF7D3FF00F084F800F06CFEAD +:1077D000FFF716FF00F032FE002010BDF20101009D +:1077E0000034008002200000802900800A80800A86 +:1077F00080808080D2B7153B01000000F82B00C0CC +:107800000004000080EABCA740A800800028008097 +:10781000FFCFFFCF6CF4000400B9040000EC32008D +:107820006CF7000400EF32006CFA00043EB5002053 +:1078300001220290AC2102A813F05CED00281CD1BB +:10784000144901200870029801F02AF8124CFF2513 +:107850002D35A5222900200013F050ED02980C22AE +:1078600004210192009122000A2178302B0013F0AC +:107870004AED002801D001203EBD00203EBD002879 +:1078800010B500D1FEE70068002800D1FEE713F034 +:107890003EED10BD3C020004742D000400B50D49FE +:1078A000002087B00860020001001E2003AB07C360 +:1078B00002000948FF21CD316B4607C3A838074AAB +:1078C000002307A113F026ED0006000E00D00120D2 +:1078D00007B000BDFC17000420BA0004C159000025 +:1078E00049646C6500000000164915480860174996 +:1078F0001548086016491E20086016490020C0433C +:107900000860164914480860164915480860704711 +:1079100070B520210C4813F00EEC2D210848090108 +:1079200013F008EC084A064C0020182141439568E2 +:107930000919401C4D611E289160F6D370BD0000EE +:10794000686E04001CF800043871040008F8000494 +:1079500020F800040CF800041027000010F80004C0 +:10796000915A000014F8000470B5194813F0D6ECD1 +:1079700017480C3013F0D2EC164E002425005C2082 +:10798000604381194D603550114813F0CCEC641CF4 +:107990001A2CF4DB002070BD10490F4810B50860A8 +:1079A00010490F48086011490F48086011491048F4 +:1079B00008601249104808601249114808601349CC +:1079C00011480860134912480860FFF793FB10BD87 +:1079D000A8E301C050DA01C08D60000048F800043F +:1079E0008F60000060F800049160000050F800040F +:1079F0009F6000004CF80004B560000054F80004DB +:107A0000CB60000058F80004DF6000005CF8000460 +:107A1000F360000064F8000412491148086013493B +:107A20001148086013491248086014491248086058 +:107A3000144913480860154913480860154914484B +:107A400008601548154940680860164914480860E0 +:107A50001549002008601649144808607047000066 +:107A6000175500C084F80004B51D010088F8000413 +:107A7000CDBD31008CF800044555020068F80004C3 +:107A800019E103006CF800045577000070F8000459 +:107A90008B77000074F80004E0B701C07CF80004A4 +:107AA0008819000480F8000478F8000431B203005B +:107AB000E8FA000410B513F03AEC10BD1B4810B5FD +:107AC000806913F038EC10BDFEB50025184805702C +:107AD000164C1848206200F039F800281FD11548CC +:107AE0002838E06120001C30FFF7C9FE124E134811 +:107AF000C122310013F002EC0E481149D038A061C8 +:107B0000002210A06B4607C320000C493200183039 +:107B10000B2313F014EC002801D00120FEBDE56218 +:107B20000120256320610020FEBD000088020004C2 +:107B300004180004B03000046C070000F772040061 +:107B400037D403004D4143205478000008B50C227F +:107B5000009209480422062303A113F0F4EB002845 +:107B600000D0012008BD000054784D676D74383096 +:107B70003231314D73675100A80200040B490420D3 +:107B80000B4A08600A2111600A4908600B490A483B +:107B900008600C490A4808600C490B4808600D4908 +:107BA0000B4808600D490C480860704790F80004C5 +:107BB00098F8000494F80004550F02009CF80004A3 +:107BC0009FCB0000A0F8000455C40000A4F80004F6 +:107BD00075BB0000A8F800047DCB0000ACF80004E1 +:107BE00007490E20087008490648086008490748F8 +:107BF0000860094907480860094908480860704753 +:107C0000C0F80004E14E732001000000F42F00C012 +:107C10000004000007BCB2F584FC02C0C4F80004F4 +:107C2000B3C40000C8F8000477C60000CCF8000414 +:107C3000BDC60000D0F8000407210848C90110B5EE +:107C400013F082EA054806492038086304480C22EC +:107C50000121303013F084EB10BD000030330004FC +:107C60007036000470B50024114D12481421AC6028 +:107C700013F06AEA0F4814213C3813F066EA0D4805 +:107C80001421283813F060EA0A481421143813F03C +:107C90005CEA084869681430046144618461C46125 +:107CA0008160054901620549416213F05EEB70BDD8 +:107CB0002C0300043CD00004C9E1030085E200006D +:107CC0000149012008607047E007000402490120D3 +:107CD000086002490860704728F9000424F900048C +:107CE00004490348086005490348086070470000DC +:107CF00029050100D8F8000403140100DCF8000491 +:107D00000349642008800349072008807047000069 +:107D10003CF900043EF900043EB50C221323274C25 +:107D20002548E061264D0092E868042225A113F061 +:107D300014EB21480C223C38A061009268680422B0 +:107D4000062323A113F008EB28001822F0380300C3 +:107D50000092012200213C3313F00AEB2800182284 +:107D6000783803000092012200213C3313F000EB2D +:107D70001148643860612868FFF78BFD184D194879 +:107D8000A122290013F0C4EA1748184920610022F3 +:107D900017A06B4607C3200012492A0010300C239D +:107DA00013F0D6EA002800D001203EBD034810B5EC +:107DB000006913F0CAEA10BD703A000468050004B7 +:107DC0009C3B000454696D657243624D73675100BA +:107DD0004D61634D676D74534D454D7367510000A0 +:107DE000A4060000637A040064390004DD28010061 +:107DF0004D4143204D676D74000000000549044863 +:107E0000086006490448086006490548086070474C +:107E1000193801009CF90004813701005CF9000465 +:107E2000D9370100A4F90004FF210D48213110B514 +:107E300013F08AE90A48FF214B3101617D21C90015 +:107E40004161962181617D210901C161054901627C +:107E500013F092EA024A8032D164906410BD0000AF +:107E600058710400307500000EB513F08AEA10480E +:107E7000002113F08AEA7D200001002200900C48C6 +:107E8000019202920B4A743000230BA113F0ACE96B +:107E90006420002200900648019202920A4AE830CB +:107EA00000230AA113F0A0E9FFF712FA0EBD0000AB +:107EB000B0D200046DC60100536C656570436F6EEF +:107EC0006669726D546D720071C2010041505F4E5F +:107ED000756C6C506B74446F6E65546D720000006D +:107EE0000EB53C4800F01DF83A493A48343113F0D9 +:107EF00050EA394800220090364801920292374AEF +:107F0000FC30002336A113F070E9002264200192B6 +:107F100002920090364A3B48002336A113F064E9F0 +:107F20000EBD70B50400384A0021001D13F034EA7C +:107F30002000364A211D343013F02EEA2000403054 +:107F4000334A211D050013F028EA20001030314A81 +:107F5000211D060013F020EA20002F4A31001C30BA +:107F600013F01AEA20002D4A3100283013F014EAE9 +:107F700020002B4A29004C3013F00EEA2000294A39 +:107F80002900583013F008EA2000274A29006430FD +:107F900013F002EA2000254A3100943013F0FCE986 +:107FA0002000234A3100A03013F0F6E92000214AD6 +:107FB0002900703013F0F0E920001F4A29007C30BE +:107FC00013F0EAE920001D4A2900883013F0E4E9A3 +:107FD00070BD000018D40004B80B00006DC601008D +:107FE000536C656570436F6E6669726D546D720097 +:107FF00071C201004E756C6C506B74446F6E6554A9 +:108000006D72000040D5000475990100EF9E0100DB +:10801000FFA00100B9616EE201000000F03300C072 +:1080200000040000C12DEDB36B9A01005B9C0100C0 +:10803000199B010007A2010083A40100B1AC01005B +:1080400041B6010083B5010061B7010027BA010004 +:10805000D1BD01000B490A4810B5C86109480C227E +:1080600001211C3013F086E9FFF744FF00F074FE95 +:10807000FFF704FF00F036FE13F09CE910BD00008E +:108080003C3C0004580600040449034808600549C4 +:108090000348086070470000DC30040020FA000448 +:1080A000A0D5000424FA000407490A200860084902 +:1080B00006480860084907480860094907480860F9 +:1080C0000949084808607047B4F90004E03D00041D +:1080D000B8F9000474400004C4F900043B530000E4 +:1080E000BCF90004550F0200C0F900043EB5FFF7CB +:1080F0004FFC002832D1314C2F4820630C22200045 +:1081000000920422303006232DA113F030E92A48D2 +:108110000C223C30606320000092042234300A2399 +:108120002BA113F024E92D4D2D48B122290013F085 +:10813000FAE821482B49C838E06200222AA06B46A1 +:1081400007C3200026492A002C300C2313F00AE92B +:10815000002803D1FFF77EFF00203EBD01203EBD79 +:1081600010B5164CE06A13F0FAE813480C222038D8 +:10817000A06320000121383013F0FCE810BD1D4938 +:108180001B4808601D491C4808601E491C480860BF +:108190001E491D4808601F491D4808601F491E48A8 +:1081A00008601F490F2008601F491E4808602049C9 +:1081B0001E480860704700009C410004B00600049F +:1081C000434250726F63534D454D73675100000039 +:1081D000434250726F634D7367510000A406000064 +:1081E000D4710004B78700C043422050726F63000F +:1081F000239C00C0DCF90004599C00C0E0F9000495 +:10820000519C00C0E4F90004451D0100E8F9000498 +:10821000F1CF0200ECF90004B37B0300F0F9000495 +:10822000FCF90004A5180000F4F90004031900008B +:10823000F8F900040249014808607047FFFF000098 +:1082400004FA0004F8B513F01EE805007B48016845 +:108250000222114301600168082319430160774934 +:108260004031CB681343CB60436813434360CA6813 +:1082700040263243CA60CB6880221343CB6001683A +:10828000314301600168114301604168314341603D +:108290004168114341606A4C20681E218843206078 +:1082A000684FF96A20208143F96212F0B0EF022092 +:1082B00012F0B0EF000604D54021272012F0C2EFE3 +:1082C00003E00321092013F07AE8A80703D4B86873 +:1082D00001210843B8605C48C16B0122D20591437B +:1082E000C163C16B0322D2041143C163072108207B +:1082F00013F064E80321072013F060E812F092EF16 +:108300002068E0218843206060691521884360610E +:108310006069B043606160690121890688436061DA +:1083200060690521090788436061E06947490840A1 +:10833000E061E06940084000E061E0691027B8436F +:10834000E06113F040E8424A1068202108431060C1 +:10835000404A10680421884310603F480D2100689E +:10836000890140180168520611430160A069B043B9 +:10837000A061606839490840606061683848014020 +:108380006160A168374A1140A160A1680140A16005 +:10839000E168354A1140E160E1687A039143E160A8 +:1083A000E1680140E1602B4A1820C043C03A1168DF +:1083B0000140394311602D4AA906116803D50140D7 +:1083C0000820014301E00140394311602848016958 +:1083D0000904090C016141690904090C41618169C1 +:1083E0000904090C8161E069012189038843E06186 +:1083F000E06989008843E061E06909118843E06130 +:10840000E069052109060843E06112F0E0EFF8BDDC +:1084100010B512F0E0EF10480068816801221143A6 +:10842000816081688A6B598E01000000EC3700C0C2 +:1084300000040000EBA3442A022291438160124809 +:108440000068002801D0FFF707FF10BD704700004B +:108450000023008000280080002900800091009007 +:10846000FBFBFFFF00270080403D0080040100046B +:10847000DFFFD5FD7FFF7FFFD5FDD5FDD5FDD7FD06 +:10848000C03C008000220080E49101C00F490E48EA +:1084900010B508600F490E48086010490E48086082 +:1084A00010490F48086011490F48086010488021A2 +:1084B00012F05EEE0E488021803012F05AEE0D4828 +:1084C000802112F056EE10BD452E04009CF70004EA +:1084D0002B550200A0F7000433550200A4F7000456 +:1084E0004054890094F70004A086010098F7000426 +:1084F0000848000408490004014901200870704739 +:108500008CF70004F8B5424800680002000F082804 +:1085100028D1404C6069E5042843606160694000EF +:108520004008606120680826304320602068EF1210 +:10853000B84320604821452012F07AEE04214820FB +:1085400012F076EE206830432060206838432060C7 +:10855000322012F04EEF60692843606160692105A6 +:1085600008436061F8BD10B500F0D6FA2A480068EB +:10857000002832D012F068EEFFF7C4FF2021192046 +:1085800012F06AEE0221162012F066EE2F2133203F +:1085900012F04EEE0321572012F04AEE92212420D1 +:1085A00012F046EE6221252012F042EE262012F053 +:1085B0003CEE80088000022108430106090E2620B7 +:1085C00012F036EE6621412012F032EE12F040EE4B +:1085D00012F012EF642012F00CEF12F012EF12F012 +:1085E00014EF8821052012F024EE0121082012F05A +:1085F00020EE58210A2012F01CEE4221092012F030 +:1086000018EE1C210C2012F014EE12F002EF10BD37 +:108610000020008000280080E49101C0F8B5A24D40 +:108620002868002804D0A1490020C04308604860A1 +:108630009E4C8034206801263607B04320602068B5 +:10864000270CB843206020683111884320600A203D +:1086500012F0CEEE964801680322920511430160A4 +:108660000A2012F0C6EE20683043206020683843AC +:10867000206021683011014321600A2012F0B8EE19 +:108680002868002806D012F0C8EE8A48016A49001E +:1086900049080162884800218160884980050122DB +:1086A0001204036880188842FBD300201321890339 +:1086B000036880188842FBD301208006006812F00E +:1086C00018EE002012F0ACEEC72012F0AEEE01263C +:1086D00030430106090EC72012F0AAEEC72012F09F +:1086E000A4EE4027384301060400090EC72012F00B +:1086F000A0EE2000022420430106090EC72012F03C +:1087000098EEC82012F090EEC007FAD0C72012F001 +:108710008CEEA04301060400090EC72012F088EE7B +:108720002000B84301060400090EC72012F080EEB5 +:108730002000202108430106090EC72012F078EE20 +:10874000C72012F072EE042420430106090EC72050 +:1087500012F06EEEC82012F068EE8007FAD5C7203E +:1087600012F062EEA0432021884301060400090EA6 +:10877000C72012F05EEE600840000106090EC72017 +:1087800012F056EE002012F04CEE122012F04CEED9 +:10879000802420430106090E122012F04AEE122016 +:1087A00012F042EE002012F03CEE122012F03CEEED +:1087B000A0430106090E122012F03AEE122012F028 +:1087C00034EE12F09EED3A494031C86B3043C86335 +:1087D00037490868B8430860394908683043086079 +:1087E000384800783849087B08733849087D374A8B +:1087F0002043203A5063087D4006FCD5087DA04305 +:108800005063286800284CD012F01EED0F21622022 +:1088100012F00EED1021332012F0DAED12F018ED07 +:10882000224C606B210D08436063206863218843FC +:108830002060E068FCE1B98101000000E83B00C075 +:1088400000040000CB40ECA026490840E06012F094 +:10885000F2EC07210D2012F0C6ED07211B2012F0CB +:10886000C2ED04211B2012F002ED4021252012F060 +:10887000FEEC4021172012F0FAEC022012F0DEECA0 +:10888000400603D540210B2012F0F0EC12F0DEEC94 +:1088900012F00CED800604D4E068012189038843BE +:1088A000E06008488030C1680F4A1140C160C1686B +:1088B0000E4A1143C1600020F8BD0000E49101C0E0 +:1088C0000021008000280080C090009000230080DC +:1088D000008005C0002D008000200090E02A00905C +:1088E00020240090C0FFFF7FF0F0FFFF0A0A000085 +:1088F000AC2110B512F0AAED10BD10B512F0AAED22 +:1089000010BD00002A4A70B5140050340023100036 +:10891000946010305360D0600120010189180D006F +:10892000103D8D6048602035401C0428CD60F4D394 +:10893000042050641E48303090643030D064A3600E +:10894000E26001002039C36081601A49103008607C +:1089500018480C22012112F022ED002070BDF8B55C +:108960000F00144D060000212868C94312F076ED6F +:108970000F495031CC680800103084420FD0E068B5 +:10898000C86081600020A060E060286812F06AED95 +:1089900060683A00310012F06AED2000F8BD2868E6 +:1089A00012F060ED0020F8BD10B512F064ED10BDBE +:1089B000C0500004DC070004074906480860084965 +:1089C0000648086008490748086008498020086090 +:1089D00070470000556202003CF800046762020024 +:1089E00040F80004481A000434F8000438F8000481 +:1089F0003EB5144C1248606120001430FEF767FF4A +:108A0000114D1248D122290012F0A0EC0C48104957 +:108A1000A838206100220FA06B4607C320000B4935 +:108A20002A0010300B2312F0B2EC002800D00120F5 +:108A30003EBD044810B5006912F0A4EC10BD000062 +:108A4000F8510004F8070004A406000007810400A0 +:108A50001B1C04004D4143205478204E6F746966FE +:108A6000790000003EB50C221C481B49C162203130 +:108A700001632031416301212C3012F090EC174842 +:108A80000C220021303012F08AEC14480C22002114 +:108A9000343012F084EC1048FF21F131603012F0D4 +:108AA00072EB2D210E48890112F06CEB0A4800216F +:108AB0001C3802220160426001228160C2600161B3 +:108AC0000849416108496C462CC92CC40099816150 +:108AD00012F0D4EC3EBD0000F45E04004038040007 +:108AE0004461040060060300E033040008490748BD +:108AF00008600849122008600749202008600849DA +:108B00000648086008490748086070473CF202C000 +:108B1000FCF8000400F9000404F900046591020067 +:108B200008F900049F9102000CF90004FEB512F050 +:108B300076EC04210B2012F09AEB4021032012F076 +:108B400096EB0321022012F092EB12F06CEC31490B +:108B5000086801221043086012F0E0EB0090022147 +:108B6000DD2012F090EC012012F04CEC00252A4898 +:108B70006E00811E37180A00A8001E3280180024DB +:108B8000029070180190A5200121800012F07EEC67 +:108B90003019401C0106FF20090E413012F076EC1E +:108BA0001E4812F078EC01001F39C329385500D255 +:108BB000002001996200085502998A5A01001000AC +:108BC00012F064EC641C022CDDDBFF20002141303C +:108BD00012F05CECA5200021800012F058EC6D1C16 +:108BE000012DC4DB0221DD2012F058EC009812F0B8 +:108BF0009EEB12F014EC04210B2012F0F4EB402158 +:108C0000032012F0F0EB0321022012F0ECEB12F043 +:108C10000AECFEBD002D0080080C0004920200004A +:108C200009490120800210B50880084908800949D7 +:108C3000074808600949084808600A490848086068 +:108C400000F012F851414FF301000000E43F00C072 +:108C5000000400004C16E2F210BD000064F90004AC +:108C600066F900044583300068F90004A7833000EA +:108C70006CF900042DDE020058F900040249014895 +:108C8000086070476BFC020080F90004064814215C +:108C900010B512F082EA04490448086002480C2129 +:108CA00012F00AEC10BD00007C0A03C0A4C201C08F +:108CB00010B512F006EC10BD0449034808600549E0 +:108CC0000348086070470000ED2D030098F9000488 +:108CD000B12E03005CFC0004054904480860064905 +:108CE0000448086006490548086070475B43030074 +:108CF00014FA0004E741030060F90004354303005F +:108D0000A0F900040448542110B512F046EA0349C2 +:108D10000020086010BD000018590004680E00040F +:108D200070B50021154C144A201D12F05EEB200096 +:108D3000134A211D103012F058EB20001C30114A4C +:108D4000211D050012F050EB20000F4A29002830A9 +:108D500012F04AEB20000D4A2900343012F044EBA7 +:108D600020000B4A2900403012F03EEB211D20006C +:108D700012F036EB70BD00004757030004DA01C063 +:108D8000675703008F570300E7570300435803005A +:108D9000E75803000EB5274800F012F8254925488A +:108DA000103112F01EEB04200022009021480192A5 +:108DB0000292214A7030002320A112F03EEA0EBD3B +:108DC00070B50400214A0021001D12F00EEB2000B6 +:108DD0001F4A211D103012F008EB20004C301D4AB4 +:108DE000211D050012F000EB20001B4A290058301D +:108DF00012F0FAEA2000194A2900643012F0F4EA6D +:108E000020001C30164A211D050012F0EEEA200059 +:108E1000144A2900283012F0E8EA2000124A2900FA +:108E2000343012F0E2EA2000104A2900403012F0FB +:108E3000DCEA70BD6C5900046DC60100536C6565B9 +:108E400070436F6E6669726D546D7200955B0300BE +:108E5000AD5B0300F55E0300315F03009B5F030021 +:108E6000435C0300A35C0300B55D0300015E0300E7 +:108E70000249014808607047780E000440F9000478 +:108E8000F0B5002140201D4A10601D48826B00682B +:108E9000944686461B4B8A01D6181B4B0020D718D8 +:108EA000C300654630CDF218401C30C2FA18744633 +:108EB00018CC0006000E18C20828F1D3491C090678 +:108EC000090E0D29E6D30F4C0F4D104E0020070060 +:108ED0000C22424381010B19B7509219401C4919C9 +:108EE0000006000E53600D289160F1D3F0BD0849D3 +:108EF00003480860084907480860704798B301C0F4 +:108F0000ACB601C068E202C0A8E502C0E8E802C051 +:108F1000A8F90004BF8C0200ACF900040249014822 +:108F200008607047AD760300D0F900040449034897 +:108F3000086005490348086070470000B32000003E +:108F4000D4F90004B9F30100D8F9000410B5AE4C0F +:108F5000AC48206120001030FEF7C3FC0AF0BCFBD7 +:108F6000FEF792FEFFF7CEFEFFF790FEFEF784FFBE +:108F7000FFF79EFEA5480021FFF7FBFCA44900284F +:108F8000886004D0012240681100FFF717FD9D485A +:108F90000C222038E0609C4801210C3012F008EAD5 +:108FA000FEF768F8FEF7E8F89A4812F08EEAFFF745 +:108FB00067FFFFF761FD964997480C31486008004C +:108FC00012F086EA0CF068F8002010BD10B5FEF72C +:108FD000ADFD00280BD1FFF715FD002807D1FEF7E6 +:108FE000C3FE002803D1FFF79FF8002800D001201E +:108FF00010BD10B5FEF702FFFFF7D0F8FEF790FDA9 +:10900000FFF721FD002010BDF8B50026834806F0CB +:109010006AFC834C844922680092824A83487F4BD1 +:1090200012F05AEA22680092814A82498248834BB0 +:1090300012F052EA22680092814A82498248834BA8 +:1090400012F04AEA22680092814A82498248834BA0 +:1090500012F042EAABFE804301000000E04300C092 +:1090600000040000D62BB67222680092814A824921 +:109070008248834B12F03AEA22680092814A824980 +:109080008248834B12F032EA22680092814A824978 +:109090008248834B12F02AEA22680092814A824970 +:1090A0008248834B12F022EA22680092814A824968 +:1090B0008248834B12F01AEA22680092814A824960 +:1090C0008248834B12F012EA8249002012F012EA21 +:1090D00080490020491C12F00EEA226800927E4A64 +:1090E0007E497F487F4B12F002EA002804D07E4878 +:1090F00012F004EA12F006EA76490020891C12F008 +:10910000FAE912F004EA002805D07748401C12F072 +:10911000F6E912F0F8E96F490020C91C12F0EAE9FB +:10912000FEF7D2FD00243F27BF0225042D0C2900A5 +:109130003943002012F0DEE96C49A000085880474E +:10914000002807D0FB20290000020143002012F074 +:10915000D2E90126641C052CE7D35E490020091DD5 +:1091600012F0C8E96248016804221143016001213C +:10917000022012F0D0E90021022012F0D0E9554976 +:109180000020491D12F0B6E93000F8BD59493F48AA +:1091900010B5086000F034F900F0F2F8FEF7C6FCF4 +:1091A000FEF776FCFEF726FDFFF71AFCFEF7A4FF9C +:1091B000FFF7C6FE00F0E2F8FEF72AFCFFF744FDD9 +:1091C00000F000F9FEF7CEFDFFF7A4FCFFF75AF818 +:1091D000FEF742FDFEF7FBFFFFF793FEFFF752FE9F +:1091E000FEF7B0FDFEF778FFFFF770FDFFF77EFD9D +:1091F00000F0F6F8FEF734FEFDF7A8FFFFF798FE43 +:10920000FEF790FDFEF794FD12F08CE912F08EE966 +:1092100012F090E9002010BD385C0004B0BE01C01F +:1092200013883100481600040C180004DDE800C063 +:10923000409201C068070004E8DA000494190004B1 +:109240008819000474DB0004541A0004481A00044E +:10925000409502C0DC1A00042C1A0004201A0004F5 +:10926000B08B02C0F8DA0004B0190004A41900049D +:10927000003D02C008DB0004C4190004B819000452 +:10928000004A02C064DB0004401A0004341A0004DF +:10929000ECBB0004D41A0004E0190004D419000443 +:1092A0000C5F02C0D81A0004F4190004E819000485 +:1092B000FC6602C024DB0004081A0004FC19000448 +:1092C000206F02C0F8DB0004B81A0004AC1A0004D6 +:1092D00080CC02C001FA0000B4DB00047C1A000458 +:1092E000701A000410AD02C0230001001C9201C0DE +:1092F0004023008044F8000410B512F024E81B4C11 +:109300006060A168002904D0491CA16012F022E825 +:1093100010BD0021012012F012E9A068401CA060DD +:109320000020C04320610020E06011480168820BEA +:109330001143016010490F480880091F088010F090 +:10934000EDFB10BD10B5094CA068012802D9401EE4 +:10935000A06010BD10F0F8FB0020A060012011F00B +:10936000F6EF606811F0F6EF10BD0000B8160004CB +:1093700000210080FFFF00005006009070470000B1 +:10938000084907480860094907480860094908482A +:1093900008600A490848086009491E2008607047AB +:1093A00001950300E8F8000423950300ECF800049D +:1093B0002F950300F0F800043F950300F4F8000433 +:1093C000F8F8000404490348086004497D200001BE +:1093D000086070478819000484F9000488F90004C3 +:1093E00004490348086005490348086070470000C5 +:1093F0002FA9030018FA000447A903001CFA00046F +:109400000249014808607047BBA90300CCF9000479 +:10941000194810B5007C062816D0022012F092E8F8 +:1094200007E0200012F092E8E279A179200012F022 +:1094300092E80400F5D112F086E8002804D0816893 +:10944000C90401D512F082E80D490C4808600D49A5 +:109450000020C8630C48C168012292059143C16095 +:10946000C16852004B20451601000000DC4700C0D7 +:1094700000040000A3D54DCA9143C160012012F041 +:1094800078E8012012F078E810BD0000A84204003E +:1094900001000300C0A90080C0A2008000900090DD +:1094A000F8B503242600032801D1002439E003285D +:1094B00037DA0400461C34E0FC4861010A188220B7 +:1094C0006043FB4B95680021C0188173C173417CD8 +:1094D000F84B4906490E417401211888A140884380 +:1094E00018802021100011F06CEE002D18D00F20F4 +:1094F00080012F1838690021FF30C943401CC18208 +:10950000280000F0E1FA002804D0A868012109042D +:109510008843A8603869FF30401CC18AE5488160F3 +:10952000641CB442C8DBF8BDF0B50C000700012094 +:10953000002985B003D10320FFF7B2FF73E0E17883 +:10954000A278090211430A00FF3A193A6CD1617AF4 +:109550004D066D0E032D67DAD4496A015118039147 +:109560008968002901D0B9425ED1E07AA17A00026F +:1095700008430F21890179180028029103D128009E +:10958000FFF78EFF48E082216943C9480E186079D1 +:10959000217902020A433000921D2100083011F0A7 +:1095A000F0EFF17BB27B080210437D23DB005843D0 +:1095B0000090C117019108223000694611F0E0EFD8 +:1095C0000398202111F0FCED0398BA49876001202F +:1095D0000A88A84010430880607AC0091CD0F07B3C +:1095E000B17B0002084317D0B86801210904084381 +:1095F000B860F07BB27B0102029811430469FF342A +:10960000641CA06A11F004EEE18AAB4A0004000C6D +:10961000914200D00818E08202980069FF30401C97 +:10962000C18AA4488160002005B0F0BDF8B50600ED +:109630009E4F0024822161439D480818C17B827B94 +:109640000802104307D06001C519A868B04202D1D2 +:1096500011F0CEEE03C5641C032CEBDBF8BD032038 +:1096600010B5FFF71DFF9148002160300A000B0084 +:109670000EC00EC008008F4948608860C86010BDE9 +:10968000F0B5002089B00400079011F0B2EE0E0092 +:10969000069082216143864808180890C27B817B2E +:1096A0001002084345D0814861010D182A680698C8 +:1096B0006B683100801A994106D32A6806986B6856 +:1096C0003100801A994106E028686968069AC0430B +:1096D000C943801871417D220023D20011F090ED22 +:1096E000049006980F0041C50822089902A811F0BD +:1096F00048EF02A807C83B00121A8B4110D2089904 +:10970000082202A811F03CEF02A807C8801AB9414C +:109710000191009008980822694611F032EF08E0A4 +:109720000898082265A111F02CEF07980121084341 +:109730000790641C032CACD3079809B0F0BDF3B5B7 +:1097400081B08E1C0A2700245848610108188168DE +:109750000198814217D18221614355480D18687BD9 +:10976000297B02020A432900121D0A31300011F040 +:1097700008EF687B297B00020843361D86193F1DD0 +:10978000C01907043F0C641C032CDDDB3800FEBD50 +:10979000F8B5420182234549584354184449A66804 +:1097A0004018407CC0094042304255D00F20800113 +:1097B000351828694049FF30401C028B8A424BD043 +:1097C0002269A169914234D8E1686069884239D937 +:1097D00011F00EEE2B69374FFF335B1C1A8B521CB6 +:1097E0001204120C1A832B697A609C46FF335B1CAF +:1097F000002A27D0334F9A6A57436246FF322132FC +:109800000CCA801A994100233A1A8B411AD229486E +:109810000122C1680223491CC16028690021FF3070 +:10982000C943401C018328483118300011F0ACEEC8 +:1098300008E00021018311F0DCED2A69FF32521C9F +:10984000516210626069E060A06920612869FF30A0 +:10985000401C018B17484160F8BDF7B582B00D0080 +:1098600014000298410111480F18BE68002D7ED0E7 +:10987000002C7CD05CE51FA801000000D84B00C084 +:10988000000400008336E540002E7AD00298FFF7EE +:1098900089FFFF21124800222D3111F084EE0028AB +:1098A000206008D1FF210F4800222D3111F07AEEFF +:1098B0000028206065D0687AC009786914D115E065 +:1098C0009832000410310004F0020004FFFF000091 +:1098D000000000000000000040420F0029020000CC +:1098E000B8190004481A0004401C78610299934A90 +:1098F0008900505020684661216802200873216861 +:109900001C20088120685A217C3041772168C020C2 +:10991000088124681221C034200011F0C0ED142009 +:1099200027180190B0792070F0792100607008311B +:10993000002011F03CEE0020A073A071E0710198AE +:109940002071000A6071E87AA97A00020843010ACE +:10995000A0700E28E1700CD2E87AA97A00020843C0 +:109960000E21091AC01911F09AED0E20A0700020E6 +:10997000E070300011F01EEE002800D0287A20732D +:1099800000E02DE0607BF12140084000084060735A +:10999000E87AA97A02020A4329000C310C00380047 +:1099A00011F0F8ED200011F00AEEF124A4000028D7 +:1099B0000BD0687AC00902D00622311902E00622D3 +:1099C0003100AC31380011F0E6ED2800123011F012 +:1099D000F6ED002804D006223119B81D11F0DAED99 +:1099E0002CE6FEB50027564E3C00029782206043CD +:1099F0008519E87BA97B0002084322D008222900B0 +:109A0000684611F0C8ED019900987940084318D1D3 +:109A10008220604302AA811908312000FFF727FF46 +:109A2000E87BA97B00027D230843DB0058430090BC +:109A3000C117019108222800694611F0ACED029887 +:109A4000FEBD641C032CD1D30020FEBD3D48008820 +:109A500070473C4A010012880020002A05D00029E6 +:109A600003D08968C90400D50120704770B500286B +:109A70001BD0324C0C34002918D121680022491C1B +:109A800021600F21890144182069FF30401C0283A6 +:109A900011F0B8EC2269FF32521C51621062206949 +:109AA0002849FF30401C008B486070BD234D0021C9 +:109AB000603D4B015B199E6886420BD19E69761C06 +:109AC000002A9E6103D063685B1C636002E0A368A8 +:109AD0005B1CA360491C0329EBDB70BDF8B50024B7 +:109AE00006000F2001278001301800901348610103 +:109AF000603808188068B0421BD18220604310494A +:109B00004018417CC90914D0C17B807B0027090221 +:109B100001430ED000980569FF356D1CA86A11F04D +:109B200082EBE98A084A0004000C914200D0081830 +:109B3000E882641C032CD9DB3800F8BDF83200043D +:109B400010310004F0020004FFFF0000FF49002074 +:109B50008880083948607047FFB583B006000598D3 +:109B60005F68007902900498F94C456805982A04CA +:109B70000179586848433188A2421AD04019884276 +:109B80001CD800240EE0029871686043029A0818FD +:109B900041190598401D11F016ED002801D0002054 +:109BA00003E0641CBC42EED301200499486007B076 +:109BB000F0BD0004000C8142019003D20498002102 +:109BC0004160F4E7002517E000240CE0029871687A +:109BD0006043029A081841190598401D11F0F2ECF3 +:109BE000002802D1641CBC42F0D3BC4203D10499CA +:109BF0000120486005E06D1C30880199401AA84298 +:109C0000E2DA31880198081AA842C8DBCFE770B5BC +:109C10000E008AB0050007A911F0D8EC002872D018 +:109C200007A800F024FA002806D1280007A911F09F +:109C3000D2EC002867D188E06B461C7F280007A97A +:109C400011F0C4EC0028F6D007A800F010FA0028A4 +:109C500018D0280007A911F0BEEC31002800FFF74A +:109C6000D6FF002871D0B94908390878401C000691 +:109C7000000E0870B7490988884266D8280007A9ED +:109C800011F0A4EC764239E701000000D44F00C087 +:109C9000000400000460EB12280004A911F0A0ECFD +:109CA00000285CD004A800F0ECF900280DD02800B2 +:109CB00004A911F09AEC31002800FFF7B2FF002848 +:109CC0004DD0280004A911F08CEC412C03D0422C7B +:109CD00001D0432C34D1280001A911F082EC0028D6 +:109CE0003DD001A800F0CDF900280DD0280001A931 +:109CF00011F07AEC31002800FFF793FF00282ED0F6 +:109D0000280001A911F06CEC412C07D1300004AA05 +:109D100007A901ABFFF72AFF91E723E0422C06D108 +:109D2000300004AA07A901AB11F062EC87E7432CCD +:109D300085D1300004AA07A901AB11F05EEC7EE7E3 +:109D4000442C04D104A907A811F05AEC77E7452C5C +:109D500008D104A907A811F058EC70E7FFE700202C +:109D60000AB070BD0120FBE7F7B584B006007C495E +:109D700017008888002878D0080008384068002E2E +:109D800000D07069002403906BE011F0FAEA6821BA +:109D90006143764B05005A5C3800904303D028009D +:109DA00011F0F6EA5CE07148C918D03002704A78C8 +:109DB0004270891C801C00F05BF9280011F0E8EA71 +:109DC000780703D5039800F0ADF849E0300000F0C3 +:109DD0005FF9002844D0654D0024D035687801270C +:109DE0000009012803D1300000F0ECF825E002283A +:109DF00023D1318970698919019111F00AEC0400AD +:109E000001D13C0017E0200011F006EC0100584B96 +:109E1000300002AA11F004EC002803D1200011F058 +:109E200004ECEEE701996B461B89002212312000F9 +:109E300011F0FEEB0024002C02D16878C00704D09A +:109E40000598002C076008D102E005980021016008 +:109E50006878800701D40020B0800120B1E604E0DA +:109E6000641C3F488088A0428FDC0020A9E6FEB534 +:109E700005000C0011F084EA0190200011F0DCEBE9 +:109E8000374911F09EEB607921790002344F084385 +:109E90000228B88004D9019811F07AEA0020FEBDAA +:109EA000A41D207804280ED1607810280BD10198C9 +:109EB00011F06EEA2A4804220838456000206946FD +:109EC000FFF752FF1AE0294E002511E06820684391 +:109ED00021783154617880194170801CA11C00F0F8 +:109EE000C7F8E078A17800020843241D04196D1C0E +:109EF000B888A842EADC019811F04AEA0120FEBDC8 +:109F000010B50400164811F098EB204000D0012055 +:109F100010BD01000020002903D00968002900D0ED +:109F200001207047F0B5040091B0104D05A9D0355F +:109F3000A81C11F056EBA81C08A911F052EBA81CA4 +:109F40000BA911F04EEBA81C0EA911F04AEB0FA8BB +:109F5000401C04900C9808AB06041F79360C09E0ED +:109F6000500500040000FFFF3EF90004143800040F +:109F70004C060000581D02903000069D78430E3DAF +:109F800040190004000C0190200011F042EB002861 +:109F9000039015D0039811F040EB0024451906E01A +:109FA00002993A00280011F000EBED19641CB4424C +:109FB000F6DB7148019B42780499039811F038EB65 +:109FC00011B0F0BDFEB5FF210022F53101904669C8 +:109FD0006A4811F0F2EA040023D0C020251820813D +:109FE0001221280011F064EA1420287100202F00AB +:109FF00014376871009700980E2111F05AEA022375 +:10A000000020AB71E871F12080003218390001980E +:10A010000E31029200F06BF8070003D1200011F01E +:10A0200010EBFEBD009802990622801D11F0BCEADB +:10A03000390000980622123111F0B6EA0099C120C9 +:10A04000C0000873000A4873019804218088A0802A +:10A0500008202073F0686061F0796870B07928702A +:10A060002A20A8700020E870200011F0EEEAFEBD62 +:10A0700010B54A780B7812021A43921C11F094EA38 +:10A0800010BD0078402801D901207047002070479A +:10A0900010B501892462E3EF01000000D05300C035 +:10A0A00000040000C2F1B4540400203009188AB042 +:10A0B0000E390E2206A811F082EA364811F0C6EADF +:10A0C0000100200004AA11F0CEEA002817D031497F +:10A0D000012008392D4C0870A01C04A9FFF7ABFD26 +:10A0E000002805D0A01C01A911F084EA029C00E020 +:10A0F000002405980E2206A911F060EA20000AB09B +:10A1000010BD70B50C00160000290DD000280BD032 +:10A110000189C12209182048D2000068203009189E +:10A12000C8888D1D904201D0002070BD012B05D143 +:10A130001022200011F042EA083404E0082208311D +:10A14000200011F03CEA01204002A071000AE071F9 +:10A150002000AD1C06223100083011F030EA290041 +:10A160002000042218310E3011F028EA29002000C6 +:10A1700006220831123011F022EA290020000422C0 +:10A180000E31183011F01AEA200070BDE4380004D6 +:10A19000481A00045005000478F80004032149021D +:10A1A00070B5884210D2F94901200862F84CF94D87 +:10A1B0000020030081000A19166A6E501362401CC9 +:10A1C0000006000E0728F5D970BDF24AF04B0020BA +:10A1D00010B581005458C9180C62401C0006000ECE +:10A1E0000728F6D9E9490020086210BD7047F8B584 +:10A1F000002206000F00E848110011F0E8E9040011 +:10A2000016D0208908210519280011F05CE92900E1 +:10A21000300011F0E0E9291D380011F0DCE9DB48DD +:10A220002200406B0421002311F020EA002803D013 +:10A23000200011F010EA0120F8BDD44810B5806B61 +:10A2400011F04CE910BDD1484178002902D000211D +:10A250004170F2E7704710B54278037812021A4352 +:10A260005204520CB12A22D010DC6F2A1FD006DC17 +:10A270002B2A1CD02C2A1AD0402A30D117E0A92A28 +:10A2800015D0AA2A13D0AF2A29D110E0CF2A14D092 +:10A2900006DCB22A0BD0B52A09D0CE2A1FD106E09F +:10A2A000D02A04D0DD2A04D0FF3A213A17D1012068 +:10A2B00010BD080011F0DEE910BDB449497800294D +:10A2C000F5D140790107090F000911F0D8E90028FC +:10A2D000EDD00F2189014018C0690028E7D0002087 +:10A2E00010BD10B5406911F0CEE9002010BDF8B5E1 +:10A2F00007000D0000D1A94DA44E3078002840D0B1 +:10A300003469202020812034207903214904401819 +:10A3100011F01CE9A24811F01AE9210008312000CF +:10A32000FFF799FF002808D06078217800020843E1 +:10A330009C49884201D0FFF786FF11F0A8E9002868 +:10A3400011D060782178000208439749401805D061 +:10A35000012803D0022801D01B2804D1022011F0CB +:10A360001AE911F098E931690122487B8F4B1043BB +:10A3700048738D611C680022F8680323A047002001 +:10A380003070F8BDF8B504004078217805020D431F +:10A39000201D11F05CE9060020000830009011F04B +:10A3A00056E9012109040400002773180F2B1BD85C +:10A3B000012711F074E90906252F4E676C758D8908 +:10A3C0008D007B497B487C4B7C4A012D0DD125407B +:10A3D0000D60A107C90F01606007C00F186020075A +:10A3E000C00F106011F05EE972E00068096840007B +:10A3F00008431968890008431168C900084361E0EF +:10A400006F48012D66D1E107C90F016060E011F0CE +:10A41000E2E85DE0012D5BD120062607050F360F2F +:10A420002005000F0AD10021080011F040E90028A2 +:10A430004ED02A00310011F03EE949E0002102200F +:10A4400011F034E9002843D02A00310011F036E938 +:10A450003EE05C48012D3DD1E107C90F01605A483B +:10A460005A4C07D0082111F04AE80421200011F0CD +:10A4700046E82DE0082111F04EE80421200011F0FB +:10A480004AE825E0012D23D111F01CE920E0012D3F +:10A4900003D1200011F01AE91AE011F01CE911E0D3 +:10A4A000012D07D1F3B477E101000000CC5700C0C3 +:10A4B00000040000E87F1DCD2004000C11F018E915 +:10A4C000200C11F01AE90DE011F01AE90404240C33 +:10A4D00011F01AE9000420430099A2E74148012D38 +:10A4E00002D104603800F8BD0099006899E770B5A2 +:10A4F00004000125001D11F0B4E8032149074018AC +:10A5000011D16078227801022000374C11430830C5 +:10A51000012903D111F0A4E8206005E001002068C2 +:10A5200011F062E800E00025280070BDFEB50F00C4 +:10A530002E490B00FF33213301939A7A242353438E +:10A540005C18D11900911FE041780278090211438B +:10A550000A00FF3A9B3A20D1051D40682060207810 +:10A56000C600272E19D8002E04D03200291D201D28 +:10A5700011F0CEE8019A61881289A819001D914254 +:10A5800001D2019A1181243439007F1E0029DBDCBD +:10A590000199009888720020FEBD0120FEBD0000D8 +:10A5A000B006000440A20080B4400004701A000409 +:10A5B0000B5600C008080400DD800000327FFFFF5A +:10A5C0003403000418BB01C01CBB01C09C02000482 +:10A5D0002CB801C0A005000468090004470600006B +:10A5E000BD050000181900044C070004BCC4000499 +:10A5F00010B50400407821780002FE4A0843012883 +:10A6000018D1E078A37801210002184300D000217E +:10A61000FF322132927A801808280BD8002011F0DE +:10A620007CE8E178A2780902201D1143FFF77EFF44 +:10A63000012801D1012010BD002010BD4278017811 +:10A6400012020A43EC49012A04D1C278837810022D +:10A650001843888188897047E84810B5006811F070 +:10A6600060E8E748006811F05CE8E648006811F02F +:10A6700058E810BD70B5FFF7EFFF10F0D6ED0028D9 +:10A6800001D011F052E811F054E8DB4A002090614B +:10A69000DD48C16804239943C1600120D0610020D6 +:10A6A00011F04AE8D94811F04CE80400D7480821D5 +:10A6B00011F04AE80500D548102111F046E82818A5 +:10A6C000844201D009F095F870BD70B511F040E8F2 +:10A6D000032011F042E804001F256D0114E06079A9 +:10A6E00000280CD06019007A002808D020000FF054 +:10A6F00074F9012011F034E820000BF00AF803216E +:10A70000200011F032E80400002CE8D1002011F004 +:10A7100030E811F032E8012011F022E870BDF8B500 +:10A7200004000F0011F02CE87D21C90010F098ED15 +:10A730000100B748B64EC08BA070000A1025E0702B +:10A7400000204200B25A8A4205D34000305AA0701D +:10A75000000AE07002E0401CA842F2D3607921793F +:10A760000002084370D10820A0710020E071680049 +:10A7700080192038C18B2172090A6172C18BA172C4 +:10A78000090AE172C18B2173090A6173C08BA0733E +:10A79000000AE0739F487D214068C90010F060ED19 +:10A7A000010000200AE04200B25A8A4205D340006C +:10A7B000305A2072000A607202E0401CA842F2D3B4 +:10A7C00094487D218068C90010F04AED0100002006 +:10A7D0000AE04200B25A8A4205D34000305AA072C1 +:10A7E000000AE07202E0401CA842F2D389487D21B1 +:10A7F000C068C90010F034ED010000200AE04200FA +:10A80000B25A8A4205D34000305A2073000A60735E +:10A8100002E0401CA842F2D37E487D210069C900B5 +:10A8200010F01EED010000200AE04200B25A8A42F8 +:10A8300005D34000305AA073000AE07302E0401CC8 +:10A84000A842F2D3182038806079217900020843A9 +:10A8500001280BD12020A0710020E07120006C495C +:10A860000830202210F0B4EE30203880F8BD70B5EA +:10A870000022674D674C417A067A0B025100695AF3 +:10A8800033438B4203D17D23DB004B436360C37AA8 +:10A89000867A1B0233438B4203D17D23DB004B437B +:10A8A000A360437B067B1B0233438B4203D17D2392 +:10A8B000DB004B4340661AE701000000C85B00C0A4 +:10A8C00000040000C89CB547E360C37B867B1B0285 +:10A8D00033438B4203D17D23DB0059432161521C5A +:10A8E000102AD2D36168A068814200D80100226991 +:10A8F000E068904200D81000814200D80100216237 +:10A9000010F04CEF012070BD10B510F04CEF10F0BE +:10A910004EEF10BD10B5012410F04CEF4348017804 +:10A92000012905D100210170022010F048EF002418 +:10A93000200010BDFEB505000120009010F042EF90 +:10A94000002800D0022010F03AEE040002200AF0A5 +:10A950001DFD060004D10221080010F038EF0600AA +:10A9600010F038EF324F00280ED03888C00602D4DD +:10A97000A068C00408D56879297900020843052831 +:10A9800015D92C49884212D210F028EF002806D0A1 +:10A9900010F028EF00280AD1A068C00407D510F0F5 +:10A9A00012EF002879D038888005800F75D010F01C +:10A9B00006ED0190687929790002084301D01E490B +:10A9C0000860E879A9790002084301D01B49088092 +:10A9D000E878A9780002084301D019490880134893 +:10A9E000007800284DD110F0F6EE00282CD0A06899 +:10A9F000C00429D53888C00626D5002E39D01120AC +:10AA000040013018007A1DE0BCC40004B006000408 +:10AA1000A0020004780500040808000400900090DB +:10AA200074190004A8B701C014C700046805000425 +:10AA30005C3C0004FDFF000064060004880600047E +:10AA4000BC050004072814D110F0BCEE002809D082 +:10AA500038888005800F05D0112040012018007A29 +:10AA6000072806D010F0BAEE00280AD0A068C0046B +:10AA700007D50121FF480170080010F0A0EE00206A +:10AA80000090019810F0A2ECE87AA97A000208433D +:10AA900003D00006000E10F0AAEE0098FEBDF8B537 +:10AAA00004000120009048780E0009780002084355 +:10AAB000F12189000025671800280FD001280BD14B +:10AAC0002079002837D0012835D01121490161189B +:10AAD000022809D0032816D0012548E006223900B3 +:10AAE000B01C10F080ED42E0087A0028F4D120007C +:10AAF00010F080EEFF300622B11CF33010F072ED42 +:10AB0000002000901AE06079022801D0012812D1BB +:10AB1000087A0028E0D1200010F06CEEFF30062209 +:10AB2000B11CF33010F05EED20000622B11CAC30F9 +:10AB300010F058ED02E0A068C004CDD40622B11C8C +:10AB4000380010F050ED10F05AEE002805D1CA4838 +:10AB500006220068B11C10F046ED0F20800120187D +:10AB6000827A009B3900022010F04CEE050028008C +:10AB7000F8BD002801D1012002E0032800D90020FF +:10AB8000BE49085C70470121062814D00200FF3A34 +:10AB9000083A10D0E6280ED06B280CD02B280AD00B +:10ABA0002C2808D0502806D0E72804D0242802D02A +:10ABB000B12800D0002108007047B04810B52438F3 +:10ABC000806B002110F09AEC002801D1012010BD0B +:10ABD000002010BDF0B501209FB00F90002008901C +:10ABE000A64D27204001243D68812878002801D007 +:10ABF00002F04BFCA24810F00AEE0028F8D0A04862 +:10AC000010F004EE01890C186078217800020843E6 +:10AC10004004400C0C90E078A178070228000078EE +:10AC200026000F430836083F00280BD12079052164 +:10AC30000904401810F09EEC924810F09CEC9248E9 +:10AC400010F098EC31002000FFF719FB002810D01D +:10AC5000FFF7B3FF002806D1884901202439086492 +:10AC600000201FB0F0BD8548002124380164012177 +:10AC70004170864810F07EEC01200B9000200A9075 +:10AC80007F4810F0C8ED129001890C1811944069AA +:10AC90000990119810F0C2ED002826D0002010F085 +:10ACA000C2ED002821D110F08EED002800D0022046 +:10ACB00010F084EC05000079062806D160790107C0 +:10ACC000090F002007D295DE01000000C45F00C01C +:10ACD000000400004FCABB1510F006ED0500002D62 +:10ACE00030D10C98F72811D135780021099A0091BC +:10ACF0000292019160790207120F01091DE060794B +:10AD00000107090F000910F0D8ECDDE760798446EF +:10AD1000000901281E9001D1022505E01E98022895 +:10AD200001D1032500E000250021099A6046009129 +:10AD3000029201911E990207120F2800002310F0C1 +:10AD400080ED0500129845610120C00202E001205B +:10AD500010F01AED012153480022C90210F054EC02 +:10AD60004B49243900280861F1D04948484A243821 +:10AD70000069202101814118243AD1634561109175 +:10AD8000E078A17802020A431199109810F05CED66 +:10AD90003F490120243908700800806900280DD13E +:10ADA0000C98AA280AD010F054ED39490120243912 +:10ADB00088613D48C16804221143C16000200D90A4 +:10ADC0003A480078C00719D10C98FFF7E6FE002832 +:10ADD00014D00C980121C90308432070000A607048 +:10ADE0000220A0710020E071E078A17802020A43FD +:10ADF0001199109810F028ED01F05EFD10F02CED87 +:10AE00002B4810F0C2EB0C987D222A49D200AA28C8 +:10AE10001D9101D101F02DFF7EDC5E2801D101F0F2 +:10AE2000FBFC7ADC242879D0204959DC50311628E3 +:10AE30001C9174D044DC102872D011DC032870D02F +:10AE400006286FD00B2801D002F0FBFA5420A07026 +:10AE50000020E0703100280010F002ED02F0FAFA54 +:10AE60001128FBD0122872D01428EDD137004C37AE +:10AE70003100280010F0F4EC3900280010F0F4EC58 +:10AE800000281AD1012017E068050004BC00000466 +:10AE9000D406000428D000040200070001000400CA +:10AEA00002020400E819000400900090C4E80004C5 +:10AEB00004040400E03700040D90902002F025F90E +:10AEC00019380828C0D243007B449B885B009F440C +:10AED000D50504063106F107B812CC08660A950AB2 +:10AEE0005C3140281B9174D046DCFB492C281A9118 +:10AEF00070D02DDC26286ED028286DD02B28A3D129 +:10AF00000F20800128180069032110F0B2EC1B9972 +:10AF1000002010F07EEB06E0EBE05EE0FEE3FEE3F7 +:10AF2000FEE342E393E1ED48806B1A98EC49056239 +:10AF30000020086020002030C17B827B0802E949A4 +:10AF4000104308812100280010F096EC9FE287E072 +:10AF50002E2801D101F0D0FB362801D101F0CFFB22 +:10AF60003728CCD10D2080012818C2690832012170 +:10AF7000300010F086EC71E7502871D01EDC4528B7 +:10AF800001D101F024FC4D286BD04E28B7D1707848 +:10AF9000317800020843012801D001F033FDE07848 +:10AFA000A17800020843083802040F208001281805 +:10AFB0000069120C310010F068EC4FE75B2801D1FA +:10AFC00001F088FC5D289AD1300010F062EC01F0AD +:10AFD000B0FCE0E3EEE3EEE3CDE3812801D101F044 +:10AFE000A4FC22DC66381A2800D32DE743007B44FA +:10AFF0009B885B009F4497060507210725122512B1 +:10B00000A00CAB0C9307860C900C950C810C2512B0 +:10B010002512EE0BF30C25122512110D2512251207 +:10B0200025122512251225123A098F2872D013DC19 +:10B0300082380C28D9D243007B449B885B009F4414 +:10B04000B80D410D670D001276110012CE0D0012E1 +:10B05000F20600120012C80C9A2803D101F0AEFCCF +:10B060004CE3F1E316DC932801D101F0C7FD9428ED +:10B0700001D101F0ECFD9728B7D13078642804DACB +:10B080000006000E711C03F094FF701C10F004EC1D +:10B090000A3013E7A42801D101F0F7F8A928A4D1B8 +:10B0A00090480026C6612079069060793200010739 +:10B0B000090F04098C48079100680B2110F0B8E8CB +:10B0C000129810F0E6EA8748006910F0E2EA08F00A +:10B0D00050FC0028CDD6A59201000000C06300C03E +:10B0E00000040000417F167C01D001200D908448AF +:10B0F00006808448068084480660012010F03AEB00 +:10B100007D4E01F0F4FD8149ED2819917ED077DC68 +:10B11000D1287CD052DCC42801D102F056F811DCD1 +:10B12000AE38082890D200E0FDE343007B449B88C2 +:10B130005B009F449501D5019E01B901C901DD0164 +:10B140009011B001CE2801D101F082FF2ADCC52880 +:10B1500001D101F0FEFDC7286FD0CD2896D1082F70 +:10B1600002D20020B071F0716879022801D001F09C +:10B170005EFF280010F052EB71783278090211431B +:10B18000012901D001F042FF01004031B2788A70FC +:10B19000F278FF30FF30CA703179801C8174717988 +:10B1A000C17465E6CF2801D101F05BFFD028D5D16D +:10B1B0003900300010F07EEB01F07EFFD3381A2802 +:10B1C000B0D243007B449B885B009F44DC0D44115C +:10B1D0004411F60D44114411CF0E4D114411441188 +:10B1E000EA0D44114F0FD10D44114411F00D8409A3 +:10B1F000AA0A441144114411700FAC0FAC0FAC0FEC +:10B20000FF211E31431A88426ED001E0EFE3EFE3E5 +:10B210006BDC3F4A811A904201D101F0DBFF46DC32 +:10B22000FB2801D101F09DFF12DCF22801D101F0D1 +:10B2300089FCF42802D101F07BFF98E2F7288DD138 +:10B24000002231782800130010F038EB01F087FF5E +:10B25000FF38801E01D101F073FF022872D006284A +:10B26000A5D12C4901200860287903280AD16879E2 +:10B27000002807D01F2040012818017A042901D096 +:10B28000012101720C9800210200FF3A083A00D116 +:10B2900001213B041B0C3200280010F014EB0028A5 +:10B2A0006FD000200F90FEF7F6FF02F0F7F80A29A2 +:10B2B00068D03ADC022901D101F06BFC032901D1ED +:10B2C00001F062FB0829BAD1707831780002084396 +:10B2D00001D001F087FFB178CA078907D20FC90FE3 +:10B2E0008A4219D102F01EF8F3E327E0EC5900047A +:10B2F00000A8008020070004B0060004000000043D +:10B300005C3C0004A006000494060004142D000414 +:10B310000A01000040070004F1788A07C907D20F2C +:10B32000C90F8A42DED001F069FF0C297ED00F29B7 +:10B3300085D13100280010F0CAEAF0E3112B02D1C8 +:10B3400002F04DF8D9E015DC0E2B00D386E55B004A +:10B350007B449B885B009F447E1055077E107E10C7 +:10B36000C60E310F7E1017103A107E107E1033106B +:10B370007E105404FF21C91D581A8B4203D101F0DD +:10B380009EFEC1E13FE010DC132B01D102F011F869 +:10B39000142B79D0E22BD9D10820A0700020E070C6 +:10B3A000300010F098EA01F0F6FC04286DD0102867 +:10B3B000CCD17078317800020843012870D110F0A8 +:10B3C0008EEA00288ED1F078B17800020843F74960 +:10B3D000BF1F08807079327900021043488038041A +:10B3E000000C042800D243E5B61D707831780002C5 +:10B3F00008430100FF392B39F5D1EC48317901714F +:10B400007179417134E57078317800020843012880 +:10B410000ED17079317902020A43B11D002003F088 +:10B4200079FD00280D9002D101F07DFFD5E359E7A9 +:10B43000717932790F0217430006000E321DB11DDB +:10B440003B0003F032FC0004000C0D9000D0012002 +:10B4500000280D90C7D17079317900020843F0E3DC +:10B460003100002003F0AFFD300010F020EA01F0C1 +:10B47000A2FC607A217A00020843012806D121004B +:10B48000280010F030EACFE73EE0F7E32100280083 +:10B4900010F02CEAC8E72100280010F02CEA23E085 +:10B4A00070E000200F9000E72100280010F026EA4D +:10B4B000002812D001287ED0022800D1C6E6052837 +:10B4C000B5D1FEF7E8FE08E02100280010F01AEAE6 +:10B4D000002802D00228AAD1B8E600200F90B5E6D5 +:10B4E00021002800B752323101000000BC6700C0C3 +:10B4F000000400008A61498610F012EA00280D90CD +:10B50000D9D0BFE42100280010F00EEA96E7310000 +:10B51000280010F00EEA0D9001F00AFE70783178E4 +:10B5200000020843FD2701281DD1280010F004EA7D +:10B53000002886D10F20800128180169B378603176 +:10B540000A7CDB0752085200DB0F1A430A74B178F9 +:10B55000006989076030C917491CC9073A40890F3B +:10B560000A4302748EE40F21890169180A69B078D0 +:10B570006032127C4008D2074000D20F1043B070F6 +:10B58000096938406031097C8907C917491CC90716 +:10B59000890F0843B07075E40028B2D18849B01D06 +:10B5A0000A88B270120AF2704A883271120A7271F5 +:10B5B000FF222B32B271120AF27102223272002281 +:10B5C000C2700A790271497900E0BFE34171142029 +:10B5D00088E410F0B6E9010030000622083010F0CF +:10B5E00020E810F0B2E9002801D0012006E010F0B8 +:10B5F000B0E9072801D1032000E002203074000ADE +:10B6000070744020B0710020F07110F0A6E9B073A2 +:10B61000000AF07303F0C9FD3100123110F00CE89C +:10B6200000200E9010F09CE9002801D001200E901F +:10B6300010F09AE9FFF7BBFA070010F08AE9FFF76C +:10B64000B6FA079010F0F8E80E9A01000092079AF7 +:10B6500030003B0010F08CE930002630189010F0DC +:10B6600028E8000A189900020FF0E6EF070010F032 +:10B6700070E9189938430FF0E0EF070010F074E913 +:10B6800000010121384389050843090188434D49D8 +:10B69000084318990FF0D0EF1C98417A027A0802FB +:10B6A0001043B070000AF0700220307000207070FB +:10B6B0004548017830002030C172090A01730E211B +:10B6C000417300218173801C07000FF0F2EF03210A +:10B6D0000903084339000FF0B0EF0E99002905D196 +:10B6E00001214903884339000FF0A6EF31003748A4 +:10B6F00037310FF0A2EF310035483B310FF09CEFAE +:10B7000038000FF0D6EF07218903084339000FF006 +:10B7100094EF30003F3002F00FFB4EE62D49002041 +:10B720000860E9E52879032802D168790328F8D16F +:10B73000280010F022E9002803D0203000780028EB +:10B74000EFD102E0ADE24BE024E0A868C0040AD4E7 +:10B750000021280010F014E93200002128003300F5 +:10B7600010F0B6E803E00121280010F00AE93A04DD +:10B77000120C3100280010F008E9002800D09AE5EA +:10B78000BAE50820A0700020E0703100280010F019 +:10B7900000E912E61049300010F0FEE821E428002C +:10B7A0000422310035300FF03CEF280010F0F8E8AB +:10B7B00010F012E810F014E810F016E811E498E226 +:10B7C000A405000400001040263904003070C03386 +:10B7D000FEFFFEFF40070004B406000469E25EE2DB +:10B7E000707831780002084301287ED1F078B17872 +:10B7F00000020843242821D010DC092839D00A2867 +:10B8000048D0112862D1FA49B0790968C861B07985 +:10B8100000285BD0280010F0C8E857E0252818D091 +:10B8200027284AD0282851D1A868012189048843B3 +:10B83000B179C907490B0843A86047E0002D45D0FE +:10B840000F2080012818006900283FD0FF302930E0 +:10B8500009E0002D3AD00F20800128180069002847 +:10B8600034D0FF3039300422B11D0FF0DAEE2DE074 +:10B870000FE2A868FF21491C8843B179C907C90DA7 +:10B880000843A86010F094E801000122280010F09D +:10B8900094E81BE0A868012252029043B279B11DDE +:10B8A000D207920D1043A8607078327800021043DE +:10B8B0000006000E10F084E808E0B17900200429A9 +:10B8C00000D808001F214901691808712F00F0787D +:10B8D000B1780002084307283AD009DC052830D0A7 +:10B8E000062812D1B179B62000E035E0C1550CE050 +:10B8F000082812D0DD816D2A01000000B86B00C05D +:10B9000000040000AA82E10C272808D1B1790020A8 +:10B91000042900D808001F21490179180871FA7913 +:10B92000B97938000FF07AEE0700DAD14DE4B64865 +:10B93000C088002803D0F088B4498842EFD238008C +:10B94000B179A0300175F1794175808A00E01AE380 +:10B95000FEF760FCE3E73800B179A0308174F1793B +:10B96000C174DCE7B179B720C155D8E70028DDD133 +:10B97000BF1E0697B71C079799E007984178027891 +:10B98000080210430A2848D007DCC31E0FF0C2EE9D +:10B9900007245C2734382D3F5C00252814D00ADCAE +:10B9A000112830D024284FD10F2080012818016998 +:10B9B000FF3129310EE0272841D0282844D1A8683A +:10B9C0004003C00FB07165E00F20800128180169A5 +:10B9D000FF31393104225AE0A920405D0EE02800F1 +:10B9E000A030817C3971C07C04E02800A030017D4A +:10B9F0003971407D78714DE0B620405D387149E085 +:10BA0000B720405DFAE77F480068C069F6E7A8689C +:10BA1000C005C00FF2E7E9E0FEE33879AA68400804 +:10BA200092054000D20F10433871707832780002CE +:10BA300010430006391D000E0FF0CCEF2AE01F2046 +:10BA4000400128180079D9E701000B39042906D9EB +:10BA500000210200C943123A0D2A00D8511D059158 +:10BA6000491C17D028000FF0BAEF002812D000218F +:10BA700028000FF014EF0D20800105992818806B25 +:10BA8000890041180798C278807812020243381D55 +:10BA90000FF0D0ED0798C17882780802069910431C +:10BAA000091A091F06910799091D47180797069853 +:10BAB000002800DD61E7AAE47078317800020322F3 +:10BAC0000843920357040128514970881AD19042C3 +:10BAD00014D17068002807D0042008804D48886180 +:10BAE0004D48C8600020F0E1022008804B484861C2 +:10BAF000401088600020488089E42AE37168C019FA +:10BB0000016084E4904202D10888400801E0C01935 +:10BB1000006870607BE47788380B082814D10FF038 +:10BB2000F6EC7178327838050902000D11430129CD +:10BB300003D131790FF0FEEB02E00FF0F8EB30713A +:10BB40000FF0E8EC63E4FDE20FF060EC0790707832 +:10BB5000317800020843012804D1317938000FF010 +:10BB60000EED03E038000FF00EED307107985FE244 +:10BB70000FF040EC708807900005000F079821D067 +:10BB8000000B022800D90020401C07063F0E012FA1 +:10BB900002D938000FF026EF0798717832788005C7 +:10BBA0000902800D1143012903D131790FF0C2EC54 +:10BBB00002E00FF0BCEC3071012F14D901200FF01E +:10BBC00012EF10E007997278337809061202000B21 +:10BBD000090E1A43012A03D132790FF010EC02E06A +:10BBE0000FF004EF30710FF00EEC10E40FF0AEEB3D +:10BBF0007078317800020843012811D131797088BA +:10BC000026E06CE1C0000004B0060004EE02000073 +:10BC1000985C040050C3000030750000204E000006 +:10BC200070880FF084EB30711CE0F078B17800027E +:10BC3000084301281AD10FF08AEB7078317800029E +:10BC40000843012807D1707932790002B179104395 +:10BC50000FF070EB06E070793179000208430FF0C5 +:10BC600066EBB0710FF076EB55E419E2022877D15C +:10BC70000FF058EB7078317800020843012807D1A3 +:10BC8000707932790002B17910430FF054EB06E07D +:10BC900070793179000208430FF048EBB0710FF072 +:10BCA0004EEB38E450E231002800FEF720FF00F0B0 +:10BCB000DCFF012008903A04089B120C3100280098 +:10BCC0000FF098EE65E50F20800128180069042127 +:10BCD0000FF0ECED1B9900200FF0B8ECFF48806BE3 +:10BCE0001A9800210562FE48016020004030017B67 +:10BCF000C27A0802FB4910430881210028000FF096 +:10BD00007EEEFFF7276D9ACB01000000B46F00C0F4 +:10BD1000000400002DD4EF5EE2FB28000FF07CEE63 +:10BD20000028ABD000200FF07CEE28000FF07CEE56 +:10BD30000FF072EDF14800240480F1480460FEF732 +:10BD40001BFEF048017949084900017128000FF0F5 +:10BD500070EE1B9900200FF084ECE648DF220460AF +:10BD600028002030817D11408175A8680421884316 +:10BD7000A860D0E719E10796707831780002E24EAA +:10BD8000084301283BD10798C17880780F02074308 +:10BD90000ED0F068B8420BD0DC483900F7600FF0E5 +:10BDA0009CEA39003061D94864310FF096EA70613D +:10BDB0000798417902790802104300D0B0630798D0 +:10BDC000007A002801D0401E70710798407A002840 +:10BDD00004D03179401E814200D030710798C1797A +:10BDE00082790802104300D030600798C17A827AC5 +:10BDF0000802104300D0F0800FF01EEEF2E3079926 +:10BE0000F0688870000AC8700799B06B0871000A62 +:10BE1000487170790799401C087230790799401C65 +:10BE20004872079930688871000AC871F0881790C5 +:10BE3000F16AB06A0FF004EE736B326B0FF044EAF4 +:10BE4000179A00230FF040EA07998872000AC87217 +:10BE5000B8E4707832780102AB48114360300129B0 +:10BE600006D1F178B27809021143418100210181A4 +:10BE7000408901F04EF9A44A30007232931F0092BB +:10BE8000083A911E0FF0E0ED9CE4707831780002E2 +:10BE900008439F49012824D1F078B278000210436A +:10BEA000FF2804D000220A701D99C88004E00120F8 +:10BEB00008701D980A21C1801D980122C0881100B8 +:10BEC000002800D000211D9B9B88002B00D0002261 +:10BED000914203D03A200FF0A4EC73E41D998880BE +:10BEE00070E40878002801D0FF20C2E71D98808800 +:10BEF000BFE71998808B3070000A70701999002084 +:10BF000088835FE47078317800020843012829D1E2 +:10BF1000F078B1780002084305D07E490122087804 +:10BF20001043087004E07B4801784908490001701B +:10BF3000784E3078C00702D00FF0B2EC42E40FF038 +:10BF400088ED002808D00FF088ED002804D10FF00C +:10BF500088ED0FF02AEC35E431780120014331708F +:10BF600001F0FFF96B4800884007400F81E70FF0B0 +:10BF700058EA0700707831780002084307D07079DA +:10BF8000327901021143B01D0FF06EED03E0311D57 +:10BF9000B01D0FF06EED380054E000200D90F078E9 +:10BFA000B17800020843042801D10220D8E706280E +:10BFB00011D170783178000208430128F5D17079E9 +:10BFC0003179000208430022B61D0092320001219F +:10BFD000079001F0F6F807281FD170783178000239 +:10BFE00008430128E1D1142103A80FF04EE9F079AC +:10BFF000B179000208436B469881707A317A000665 +:10C0000000140843D88101269E8203A81E820FF0E7 +:10C0100034ED002892D00D9692E4012815D1707865 +:10C020003178000208430128BFD1707931790002CC +:10C030000843B11D0FF024ED012801D101F090F962 +:10C040000FF0EEE90FF0F4E97AE402281ED17078DF +:10C0500031780002084315D1311DB01D0FF008EDF5 +:10C060000D9060782178000208430121C90308433C +:10C070002070000A6B466070988EA071000AE07113 +:10C08000FFF707FA0FF0CCE9070078E70528C3D1DE +:10C090007078317800020843012804D130000FF095 +:10C0A000F4EC01F092F8002888D130000FF0ECECAD +:10C0B0000028C3D00E3001F050F8707831780002BB +:10C0C0000843012806D1F078B17800020843012125 +:10C0D0000FF0DEECA868C00431D506A80FF0DCEC48 +:10C0E0001C98C27A817A100600140843B07013E0DD +:10C0F00000A8008020070004B0060004A006000489 +:10C100009406000440A600806037000440420F00FF +:10C11000B4050004F11C92F301000000B07300C0EC +:10C1200000040000EB45B018C4E80004000A6B46A8 +:10C13000F070187E8107587E890F0FF0BCEC6B46BB +:10C140007071187E01228107587E890F0FF0B6ECBE +:10C150000BE00020B0700100F07001200FF0B2EC95 +:10C160007071002101200FF0B2EC30710E20ACE7AD +:10C1700001F0F5FD310001F02CF900270FF0AAECD9 +:10C18000FF4A3B000FF0AAE8069008200592A07035 +:10C190000020E070119E083601F0E1FDF9491822F7 +:10C1A000086030000FF05AEA18360796E078A17858 +:10C1B000000208431830A070000A0026E070182022 +:10C1C0007043F049401818300490EF484069012846 +:10C1D0001FD90C207043ED49069B40188268390036 +:10C1E0009A420FD1E64A059989181691016840686C +:10C1F000081811000FF06EE8169A3B000FF06EE879 +:10C20000010004E0069B521C9A4200D14168049848 +:10C210000161152040017043DB4940180B21890161 +:10C2200040184078002811D00499079818220FF080 +:10C2300016EA079818300790E078A178000200E02D +:10C2400033E008431830A070000AE070761C022E1C +:10C25000B5D344E4119E0836707831780002084363 +:10C26000012811D1B079002805D00F218901691862 +:10C27000096920314872B01C0FF038EA0F2189019A +:10C280006918096908610BE00F208001281801690D +:10C290002031497AB1710069B11C00690FF0EAE9F7 +:10C2A000F01D0FF01CEC0F300FE7707831780002B2 +:10C2B0000843012807D1310028000FF014EC0028B2 +:10C2C00001D101200D9030000FF010EC1030FCE691 +:10C2D000280006AA07A90FF00EEC0A20A070002083 +:10C2E0006B46E070187F3070187E707018E43088EC +:10C2F00001282DD1E81DFF30FA301590878BC08BB7 +:10C30000B61C0790707831780002084303D00FF014 +:10C31000F6EB15998883F078B1780002084303D0D2 +:10C320000FF0ECEB1599C8832620A0700020E07078 +:10C330001598808BB84202D028000FF0E4EB1598D6 +:10C340000799C08B884284D028000FF0E0EB0DE401 +:10C35000EA1DFF32FA32938B012739009940B17000 +:10C36000090AF170D18B26208F40390A377171711B +:10C37000A0700020E0700F20800128180169B61D10 +:10C3800030001831082210300FF068E92F00E03734 +:10C390007889B070000AF070B8893070000A707047 +:10C3A00028000FF0B8EB00040014010A307162306D +:10C3B000717103D1388A3071000A7071B888B07217 +:10C3C000000AF072F8883072000A707228000FF0CC +:10C3D000A6EB3073000A707328000FF0A4EB000482 +:10C3E0000014010AB071F171010AB0736230F17387 +:10C3F000ADD1788AB071010AF171B073000AF0739F +:10C4000007E41020A0700020E0702800E030042134 +:10C41000415E070008000FF08AEBB070000AF07070 +:10C420000820385E0FF086EB3070000A707028002C +:10C430000FF078EB0FF07AEBB071000AF071280082 +:10C440000FF07CEB0FF076EB3071000A70716879B9 +:10C45000032801D00128D3D1A868C004D0D4F7E5BF +:10C460004B483278476A70783B0001021143DE3353 +:10C4700030000DAA0FF066EB00281BD0F078B178E1 +:10C48000000208434349884206D0401E01218140F2 +:10C49000080AB170F07004E03F4800883071000A6B +:10C4A00070713B48406AC030C07F401CB071000AC8 +:10C4B000F0710AE47078317800020843032800D054 +:10C4C0007DE5F078B178000208433249884218D1FE +:10C4D000E078A178000201270843102800D0002747 +:10C4E00001200FF034EB0028B9D0002F06D070796E +:10C4F00031790002084301D0274908800FF02AEB68 +:10C50000B0E40606360E30000FF028EB0028A6D067 +:10C5100022480078002802D030000FF024EB0020E1 +:10C520000FF014EB89DF878901000000AC7700C0B1 +:10C5300000040000C1CB19819EE4707831780002BC +:10C54000084373D0052862D0FE2870D0FF28BAD1E6 +:10C55000F078184FB27801023888114341400791B2 +:10C56000F278B37812021A430A400792F178B2784F +:10C57000090211438A05920F08D08205920F05D057 +:10C58000032212021140104081427ED1E078A1784E +:10C59000000211E040420F008847000418420004E6 +:10C5A000D047000414C70004FFFF0000D0BE01C044 +:10C5B000CCBE01C05C3C000408430C380204120CE1 +:10C5C000311D280007AB0FF0DCEA012896D0F17886 +:10C5D000B27838880902114308436B463880988B3B +:10C5E0008005800F08D028000FF0CEEAF178B278ED +:10C5F00009021143090A01806B46988BC0071AD0C3 +:10C600000FF0C6EA002813D0022012E019E2FF481A +:10C610000A90FF48407800288ED01D988088002816 +:10C620008AD10FF0BAEA00221E211EE396E05BE0F9 +:10C630000720F84908706B46988B312109010842A0 +:10C64000EAD060782178000208430121C903084339 +:10C650002070000A6070988EA071000AE071E07886 +:10C66000A17802020A4311991098BF1C0FF028E923 +:10C67000022008F0D1FE002805D1022108000FF0A9 +:10C68000ECE8002809D0112100E06CE149014118D3 +:10C69000097A072901D10FF084EA78783978000205 +:10C6A00008436B465882F878B978000208439882AC +:10C6B0007879397900020843D882F879B97900028B +:10C6C00008431883787A397A000208435883002097 +:10C6D0000B9012980FF018E80FF0B2E810990DAA1D +:10C6E00004A8FEF76DF937E0F078B178CA4F06027A +:10C6F00038880E430640F00705D00FF07AE83888F6 +:10C7000040084000388031200001064284D0607823 +:10C710002178000208430121C90308432070000A60 +:10C720006B466070988EA071000AE071E078A17885 +:10C7300002020A43119910980FF0C2E83100280054 +:10C740000FF032EA060000200B9012980EF0DCEF9A +:10C75000002EDBD0FEF724F90F9010E4AE48311D17 +:10C760000088B070000AF07028000FF022EA7BE128 +:10C770003100002009E50D2080012818426A0021BF +:10C780000832FEF731FC7078317800020843012846 +:10C7900023D00228E1D11D9880880028DDD10FF038 +:10C7A000FCE971783278080210430128D5D1B01C19 +:10C7B00007900EF0A6EF401C38D01999002088830E +:10C7C0009648079906220EF054EF954800880028F5 +:10C7D0000BD031000831083F09E00FF0EEE90028E6 +:10C7E000DFD18F4901200880DBE7B11DBF1F3A046C +:10C7F000121428000FF0E4E90FF0E6E9874E042058 +:10C800003056411C0FD0811C0DD001210EF008EFD5 +:10C81000844A1168337901209840014311603079CE +:10C8200001210EF0FAEE0FF0D4E909E400207B4973 +:10C83000C0430EF02AEF0FF0D0E9794900200880BC +:10C840000FF0CEE914E40FF0A8E911E47078317824 +:10C85000000208437449012818D1F078B278000228 +:10C86000104300D136E6012801D002287BD10870A0 +:10C870000FF0BAE90FF0BCE96C480022006809210A +:10C880000EF012ED624900200872ECE40878EEE345 +:10C890000D20800128181490707831780002084328 +:10C8A000012826D1E078A1780002084311994218A6 +:10C8B000B11C28000FF0A0E90EF0B6EF1498406A02 +:10C8C0000100083106D0807CC00703D00EF0B0EF25 +:10C8D0000EF0B2EF504800880028A6D00EF0C0EF4E +:10C8E0000028A2D0A868C0079FD028000FF088E9D0 +:10C8F000B9E4002820D1109CBF1E230039040A335C +:10C90000090CB21C280007940FF07EE90C99012253 +:10C91000079CD20311432170090A6170079C0A30F9 +:10C92000A070000AE070079C0020A071000AE0716E +:10C9300012980EF07ED0B5CA01000000A87B00C09E +:10C9400000040000E128B10BEAEE39E2042893D19B +:10C95000BF1E3904090CB21C28000FF064E97AE00C +:10C96000707831780002084308D0012888D13A0055 +:10C97000B11C28000FF05AE9F0E393E0B11C280045 +:10C980000FF058E943E2310028000FF058E916E0B3 +:10C990003A00310028000FF056E9012801D1FEF7D6 +:10C9A000BCFD6AE4390030000FF050E965E4300066 +:10C9B0000FF050E903E0310028000FF050E90028A3 +:10C9C00070D034E230780128C1D17178BB1EB21C1E +:10C9D00028000FF048E9401CCEE7109C3178200079 +:10C9E00008300FF044E90830A070000AE0700C989D +:10C9F0000121C90308432070000A607000209EE7EF +:10CA0000002007903100280007AA0FF034E9002821 +:10CA1000D6D01220A0700020E0700798002811E006 +:10CA20007BCC0100D42C00048C0600045C3C000488 +:10CA3000A000000490060004402300800C050004C0 +:10CA400000000004ABD118E431002800FDF77DFAA6 +:10CA50000028A6D10120A071000AE0710DE4300089 +:10CA60000FF00CE9FF20213095E370783178000257 +:10CA7000084305D1310028000FF004E90C308AE3A7 +:10CA80003A040300120C310028000FF000E941E4E1 +:10CA9000002899D10F2080012818006931000FF07B +:10CAA000FAE8EBE789E0002706970196019902AAC8 +:10CAB00006A807AB079704970FF0F0E80698002840 +:10CAC0007BD1FA480668FA48064001D10EF0F6EC30 +:10CAD00001986B46C1788278080210430590187A55 +:10CAE00030214143F34809180598C00008184268EE +:10CAF000002A03D004A902A8904701E00120049075 +:10CB0000002E01D10FF0CEE804980028D8D11C20C7 +:10CB10006B460D971856002808D0E178A2780902D4 +:10CB200011430818A070000AE070079705980428C0 +:10CB300089D101984178027808021043E078A17801 +:10CB400003D100020843083825E3000208436EE1E0 +:10CB50007078317800020843012828790AD1012829 +:10CB600095D1F078B17802020A43E979A8790FF0FB +:10CB70009EE859E40128A3D10FF09CE8010010229F +:10CB800030000EF080ED1820A0700020E0700F2023 +:10CB900080012818C06AC007C00FD8E22879012890 +:10CBA000E7D1E078A178020270780A433178000278 +:10CBB0000843B11C0FF082E836E4BBE2A21C0092ED +:10CBC0007078109F327801023B0011430A33B21C87 +:10CBD00028000FF078E8002898D1707831780002AA +:10CBE0000843C6D10C9901221098D2031143017059 +:10CBF000090A4170E178A278090211438170090A9B +:10CC0000C17000218171C1719CE670783178000299 +:10CC10000843012807D1B01C0EF07CED010028006C +:10CC20000FF054E859E40F20800128180069B11C66 +:10CC3000FF30401C00680EF032EDFFF7ABFA707861 +:10CC4000317800020843012808D1022F01D10021C8 +:10CC500000E031002800FCF7E9FCA0E300288AD1BD +:10CC600031002800FCF7EDFD95E270783178000284 +:10CC700032000843012801D117211AE018218E48FB +:10CC800000680EF01CEB28E470783178000208434D +:10CC9000012815D100206B46D883F078B1780002C6 +:10CCA0000843188370793179000208431C2106AAD1 +:10CCB0005883814800680EF002EB0028B2D06DE383 +:10CCC0007D481D21006806AA0EF0F8EA6B46188B15 +:10CCD000B070000AF070588B21E270783178000251 +:10CCE0000843012806D13000FDF71BFE002800D1C3 +:10CCF000C2E5F5E3A11C3000FDF76BFDF0E3FDF7A5 +:10CD00003EFD60782178000208430121C9030843F1 +:10CD10002070000A6B466070988EA071000AE07166 +:10CD2000E078A17802020A43119910980EF0D2ED32 +:10CD300012980EF0F4EC00212800FDF73CFB0020D7 +:10CD40000F900B90F243CD4201000000A47F00C081 +:10CD500000040000667EBF595D480EF056ED0028C5 +:10CD6000FAD128000EF0C0EF28000EF0C2EFFDF758 +:10CD7000E5FCBFE301200EF058ED012154480022EC +:10CD8000C9020EF092EC00283061F3D03069202106 +:10CD9000018145612030F0630C990122D2031143D7 +:10CDA0000170090A08374170390A87706B46C170F3 +:10CDB000998E8171090AC171069901714179220127 +:10CDC0000907090F1143079A090909011207120FF0 +:10CDD0001143417100212800FDF7F7FAAFE33F1F2F +:10CDE000280007970EF088EF70783278010211431F +:10CDF000321D280007AB0EF084EF22E27078317804 +:10CE00003F1F00023A040843120C311D0EF07CEF64 +:10CE1000CFE20820A0700020E070310028000EF062 +:10CE200078EFE178A278090211434018BDE13100A2 +:10CE30003A0028000EF070EFBBE2300039000EF02F +:10CE400070EF0830B1E1E078A17800020843F17892 +:10CE5000B2780C38090200041143000C06910790C7 +:10CE6000707831780002371D084301287ED10C20EC +:10CE7000A0700020E0705AE078783978000208430A +:10CE8000FF38523826D002280AD0682830D129002D +:10CE900038000EF04AEF6B46998E40180D9027E04F +:10CEA00006982A0039000EF044EF6B46998E2A004E +:10CEB00040180D90069839000EF03EEF18E0000083 +:10CEC0000021008000040010FCBE01C0000000042E +:10CED000E819000406982A0039000EF032EF6B467C +:10CEE000998E2A0040180D90069839000EF02CEF0C +:10CEF000F878B9780002079A0843011D914201D9D8 +:10CF0000002104E00799091A091F0904090C079177 +:10CF1000E178A278090211430818001DA070000AE8 +:10CF2000E070F878B978000208433F1DC7190798E8 +:10CF30000428A1D86B46988E00281BD1FF4F0026ED +:10CF4000FF482818139018207043395C00290AD034 +:10CF5000C1191398091D06220EF0B6EB002802D164 +:10CF600030000EF0F6EE761C360400E003E0360CDE +:10CF7000042EE8D3BEE20C20A0700020E07037E061 +:10CF8000F878B978000208430799081A001F0004CE +:10CF9000000C07907878397800020843FF3852383F +:10CFA0000ED0022806D068280FD1290038000EF0D4 +:10CFB000D4EE0AE006982A0039000EF0BEEE04E036 +:10CFC00006982A0039000EF0C0EEE078A27801023F +:10CFD000F8781143BA78000210430818001DA070B9 +:10CFE000000AE070F878B978000208433F1DC719BD +:10CFF00007980428C4D87DE270783178000208438D +:10D00000012821D1B01C06F07AFCF078B17800023A +:10D010000843CC4988422CD00EF0A2EE09208001B2 +:10D0200028180EF0A2EE010028000EF0A2EE00205B +:10D030000EF0A2EEC14928000EF0A2EEC248007820 +:10D040003071000A707114E0002812D1BF48C04945 +:10D050004088884201D3BF4808E0BF49884201D3D5 +:10D06000BE4803E0904204D307200002B070000ADB +:10D07000F070F078B178000208430790B8480022B9 +:10D0800000684C210EF024E907043F0C0798390092 +:10D090000EF04AE9784364E0010040318A78FF30BD +:10D0A000B270C978FF30801CF170817C3171C07C16 +:10D0B00070710020B071F0710EE07078317800026C +:10D0C0000843012804D1310028000EF05EEE11E281 +:10D0D000310028000EF05CEE102066E039003000D0 +:10D0E0000EF05AEE012800D163E418205DE039000B +:10D0F00030000EF056EEFDE1707831780002994F65 +:10D10000084301280FD1F078B17800020843386055 +:10D110000EF026EE0920800128180EF026EE010000 +:10D1200028000EF026EE3868B070000AF0708E48C5 +:10D1300000883071000A7071DCE13A00310028008B +:10D140000EF032EE0128CFD032E13078874F01283F +:10D150000BD10EF0B5E76C8601000000A08300C083 +:10D1600000040000D19305BC0AEC0028F6D17078C9 +:10D170003870FF209D30B070000AF070C4E138783C +:10D180007070F6E753E07078317800027D4F084305 +:10D1900001280FD10EF0F2EB0028DFD1F078B17842 +:10D1A0000002084301D00128D8D17649203908620D +:10D1B0003872A9E1387AB070000AF0700C20A070C3 +:10D1C000000AE070A0E1210028000CF070F8FAE0FD +:10D1D000E07C092885D1210028000BF035FD93E182 +:10D1E000707831780002084305D13000FDF794FAD9 +:10D1F000B070000AF0700C20A0700020E0700020D9 +:10D20000E1E07078317800020843012812D13F1F15 +:10D210000797F078B17802020A430092707832786A +:10D2200001021143321D280007AB0EF0CCED00289F +:10D230008CD1C7E0002891D1F178B3780A021A4363 +:10D2400001000092321D280007AB0EF0BCED002853 +:10D2500001D101200D906B46988B23E43A04120C07 +:10D26000310028000EF0B2EDADE0310028000EF0E4 +:10D27000B2ED49E1E178A278090230001143FDF7EF +:10D2800025FAA0E0012809D1B178CA0701D18907A0 +:10D290007AD5F1788A0701D4C90775D0697902294E +:10D2A00073D128000EF00AEB079028000EF096EDDF +:10D2B0000830069070783178000208431ED1079834 +:10D2C000112149014718B87E0028F07802D10421C5 +:10D2D000084301E0FB2108401E49F0700798143113 +:10D2E00041180C22301D0EF0E2E9787E002800D0B3 +:10D2F00005E7401E3072000A707200E728000EF049 +:10D3000062EB00285ED1707A317A0002084312493C +:10D31000884207D1079811220021520180184176D6 +:10D320008176F1E0F078079A112140074901C01792 +:10D330005718401C074BB876079814330C22311D40 +:10D34000C0180EF0B4E901207876069800781DE048 +:10D3500014CB000429020000FFFF0000263904005E +:10D36000B0060004581B0000101D0000B80B0000A0 +:10D37000880E0000000000041C1900040A190004B3 +:10D3800025390400384200041CE016E08107C8D0AB +:10D390000C210843069908708006800FC1D10798B8 +:10D3A00003226030C17900231143C1710698079AA6 +:10D3B000417864320EF016EDA6E0F1788A0701D4C8 +:10D3C000C90702D101200D909EE0012804D131004F +:10D3D00028000EF00CED97E0310028000EF00AED69 +:10D3E0008DE63000FDF7F1F800289AD13000FDF706 +:10D3F00041F8002895D1707831780002084301285F +:10D4000009D1300008300EF09AE90700301D0EF007 +:10D4100096E9076078E0301D0EF090E90068310071 +:10D4200008310EF050E96FE0142103A80DF05EEF13 +:10D4300070783178000208436B469881F078B178B3 +:10D44000000600140843D88101209882188203A89E +:10D4500000E030000EF042EB012800D15CE453E024 +:10D4600030780EF0CCEC0020FF4908604CE00EF064 +:10D470000AE8FE480EF07AE80EF0C4ECFEE71198D8 +:10D48000109E08300188012701293DD1801C417878 +:10D490000278080210430100FF39D03934D10DF071 +:10D4A000F2EF0400129812990089129A0E300006C9 +:10D4B000000E41180E300006000E10810A0012986E +:10D4C000891D0EF0A4EC002800D000270C98012143 +:10D4D000C90308433070000A7070380AB771F071E0 +:10D4E00012980EF030E900212800FCF778FF2000A8 +:10D4F0000DF0D0EF2DE02A0031000DA80EF08AECDF +:10D500006B46998E084305E40F98002816D0607882 +:10D510002178000208430121C90308432070000A52 +:10D520006B466070988EA071000AE071E078A17877 +:10D5300002020A43119910980EF0E0E90B980028B6 +:10D5400002D012980EF0FEE80F98002801D00A9938 +:10D550004BE401201FB0F0BDC54910B50A78002A80 +:10D5600005D0022236B92162010000009C8700C06C +:10D5700000040000A46DFE040A70C34A0A210EF0E4 +:10D5800058EC08200EF058ECC048C149006808600B +:10D5900010BDF0B587B0002705970EF052EC0EF0E5 +:10D5A00054EC012004900EF03CE9BA4BBA4A9F615A +:10D5B000D06804218843D0601CE3B848416BC20D99 +:10D5C00011434163B6480EF044E8039801890D18F1 +:10D5D00028000EF0BEE80600281D0EF0BAE8012370 +:10D5E0009B030100C21A98427ED02EDC80287CD09A +:10D5F00008DC01287AD0022879D0082878D105F0F3 +:10D60000EFFEF1E2FF38FF38801E72D0072252028F +:10D61000801A6FD001221203801AEFD1994D287819 +:10D62000002868D00728FCD00DF036EF029028784B +:10D63000032879D12078002804D19A480EF054E9C3 +:10D64000002872D00220287091E2FF208003141A73 +:10D65000824236D00CDCD01A68D00322D203801A62 +:10D6600077D00F225204801AC8D10EF0F2EBBBE241 +:10D6700007208005201A6DD07F225206801877D0AF +:10D6800052008018BAD130000EF0E6EB0028B8D076 +:10D690000EF0E6EB0028B4D030000EF0E6EB04000C +:10D6A000010030000EF0E4EB200501D50EF0E4EBB4 +:10D6B000002CA6DA7C4A4221300002230EF0E0EB77 +:10D6C00092E20EF0E2EB00282AD1714A7749106805 +:10D6D000884202D06D4B186011600EF086EA7448E3 +:10D6E000407800280ED007E067E015E25DE21EE218 +:10D6F00077E278E01BE03EE26E48002200681E21DF +:10D700000DF0FAEDFCF721FE0EF0C2EB07200EF053 +:10D7100094EB01200EF0C0EB0EF0C2EB0028A6D176 +:10D720003000FFF723FF1FE01EE215E24CE000226D +:10D730006148009200680822012102AB0EF0B4EBB0 +:10D74000534801685948814206D13000FFF70EFF67 +:10D7500007E030E0FBE10BE04B4A0A2130000EF01D +:10D7600068EB01200EF0A4EB30000EF00EE83BE277 +:10D770000DF092EE51494E6E0D6E0F664F660DF034 +:10D7800094EE002411E03900E807C00F7940084307 +:10D7900002D020000EF080E8F007641C6D0824061B +:10D7A00005437608240E3C2C8AD2310028007940AB +:10D7B0000843E8D118E2052102E00EF07EEB0221D9 +:10D7C00030000EF07EEB0FE2032130000EF078EB1C +:10D7D0000EF07AEB002803D113200EF05EE803E28E +:10D7E0000EF076EB00E2364C206800281BD0417921 +:10D7F000032901D0012916D12179032909D008294B +:10D8000001D0092909D12E4BE28808330EF064EBD0 +:10D8100006E0E2880EF064EB02E000220321F9E763 +:10D82000276027710DE0307901280AD10F2080018F +:10D830003018006903210EF080E8112130000EF04D +:10D8400054EB30000EF054EBCEE112480069018930 +:10D850000D180598018946690C182879207160799E +:10D86000B1790007000F090108436071F1790009DF +:10D8700000010907090F0843607123E0181900042B +:10D88000A08601008C060004ADCD010068060004EE +:10D8900064060004B006000400900090003400808C +:10D8A0000101030028D000040A190004FFFF000052 +:10D8B000D42C000400000004C0BE01C06037000486 +:10D8C000285800046078227801021143FC4A881A23 +:10D8D000914252D021DCFB4A881A91427ED00FDC63 +:10D8E000F94A881A914248D005DCF84808185BD0FC +:10D8F0000C2858D1C6E00128FCD00228F9D13CE020 +:10D9000035283AD004DC0128E8D01528F1D134E0DC +:10D91000362832D03728ECD12FE060282DD00CDC0F +:10D9200044282AD004DC41281CD04328E1D124E03B +:10D93000472829D05528DCD11FE090281DD004DCD1 +:10D9400062287CD07B28D4D117E099282CD09F283E +:10D95000CFD1DB489F302870000A6870380AAF7159 +:10D96000E871C7E00EF0C8EA002806D00021FF20C9 +:10D970000EF0CAE86A48D99001000000988B00C0F8 +:10D9800000040000848E568E30000EF0C4EAE07869 +:10D99000A17802020A4321002800C1E0CD484730A7 +:10D9A0002870000A6870E079A17900020843A87124 +:10D9B000000ADFE73000FCF726FDB4E02000093064 +:10D9C00006900DF0D0EE02900822210028000DF004 +:10D9D000AAEF0820A8700020E87060782178000283 +:10D9E0000843BC499931884234D10C20A87000E02A +:10D9F00069E00020E8702800042108300DF0EEED09 +:10DA0000E878A97800020843FF214019C731017066 +:10DA1000090A417002990A23FF31FF31891CC97834 +:10DA2000594381700A0AC270EA78AB7812021A432D +:10DA30005118091DA970090AE970C17883780A0292 +:10DA400002991A43FF31FF31891D001D0DF042EE8E +:10DA500011E05BE02C00069808340DF084EE010024 +:10DA600020000EF05CEAE978AA7809021143401818 +:10DA7000A870000AE870307903280AD1707900286C +:10DA800007D01F2040013018017A042901D002215B +:10DA900001729448076037E00822210028000DF049 +:10DAA00042EF0820A8700020E870280008300EF02F +:10DAB0003AEAE978AA78090211434018A870000AE6 +:10DAC0008949E87076E70DF0E6EE0DF0E8EEE078D3 +:10DAD000A17802020A43210028000DF024EF210062 +:10DAE00028000EF024EAE07C002802D0207A0028EA +:10DAF0000AD17E4C20890DF0DAEF2089002803D06E +:10DB0000002130000EF0E6E9002153E7280008224A +:10DB100021000DF008EF2800210008300C22083108 +:10DB20000DF000EFF0E705980DF020EE6F4C0422A9 +:10DB3000206B002305A90EF0FEE90F2800D08EE629 +:10DB400089E60498FDF7BEF8002857D16069401CAB +:10DB5000606101200DF086EE02213000FCF7D3FB5E +:10DB60004CE0182130000EF0CAE947E0042028708C +:10DB70005F4A0B2130000EF066E902E0012800D177 +:10DB80002F7002980DF09AEC38E05A48008800286F +:10DB900034D02078002808D157480DF0B0EE002886 +:10DBA00003D10EF0CCE9002803D001200EF0CAE921 +:10DBB00024E0524A0B2130000EF044E91EE05048A8 +:10DBC0000168002907D14B490988002916D04D4921 +:10DBD0000988002912D007604A4807800EF06AE9D8 +:10DBE00000280BD101200EF0B2E90EF0B4E90320B9 +:10DBF0000EF0B4E902E030000EF0B4E903980DF045 +:10DC0000B6ED41480DF02EED384C0422606B531FE9 +:10DC100003A90EF090E90F28F6D0D8E4401E0006C4 +:10DC2000000E032800D9002030492831085C7047D5 +:10DC300010B50EF09CE9FCF7CAFD0EF09CE9FCF76C +:10DC40009BFD00F0F3F810BD70B5040040790D00A5 +:10DC5000022803D120000EF092E970BD002D01D002 +:10DC60000D2100E00E2120000EF048E920000EF00A +:10DC70008AE90028F1D00121002D00D000212000E8 +:10DC80000EF084E970BD70B50500204C0E002049EF +:10DC90002068884218D117481E4A0188107801432D +:10DCA0000ED0002803D0072801D0022010701A4A95 +:10DCB0000A2128000EF0C6E818480068206003E03A +:10DCC000102128000EF01AE931002800FCF71BFB98 +:10DCD00070BD00006E8000002B80000024800000DA +:10DCE000FA7FFFFF4007000463500100B006000404 +:10DCF0006FC901005C3C000428D000045DC901002C +:10DD000014070004A00600040001030064060004D8 +:10DD1000FFFF00008C060004ADCD01006806000482 +:10DD20004178027809021143CA1FFA3A06D1083035 +:10DD30004178027808021043012800D00020704783 +:10DD40005249C86B0978002906D041780278080248 +:10DD500010434004400C70470020704710B5040089 +:10DD60004A48C36BFFF7ECFFE42809D158781978CB +:10DD700000020843052803D000212000FCF743FBE4 +:10DD800010BD4248FCF14A8601000000948F00C09B +:10DD90000004000003D858DC10B50078002804D136 +:10DDA00040480DF0B6ED002800D0012010BD10B5A0 +:10DDB000FFF7F1FF002809D13A480DF0AAED00283D +:10DDC00004D139480DF048ED002800D0012010BDE5 +:10DDD0003648334900788969C007C00F404208427D +:10DDE00001D1012070470020704710B50EF0DCE82B +:10DDF0004000A538192358432A210DF0BEEA10BD72 +:10DE0000FF2230B5C832130A027043700123002587 +:10DE10000371022445718471C57104250021857048 +:10DE2000C1700830011D0270120A42700022857014 +:10DE3000C270047142710F2088701020CB7030BD09 +:10DE40001C4970B51A48C8600EF0B2E81A4800259F +:10DE500005600EF0B2E80EF0B4E8184C20681849DE +:10DE60000840206001200DF0A0EB20681449C94350 +:10DE700008432060144813490160091D416014489B +:10DE80001249C16013490161012141620EF09CE811 +:10DE90000EF09EE81048016805600EF09EE821E74C +:10DEA000B006000428D00004E8190004C4E8000407 +:10DEB000FFFF0F0000300080802200808021008062 +:10DEC000FF5CFFCC88110FC000380080D0F8C0463E +:10DED000C03B0080C0465820C02A0080FEB5040028 +:10DEE0000600C0342078FF498860FE484038056944 +:10DEF000006A002D00D105000DF02EEB62680B00CA +:10DF000014690021001B8B41A036029070891F000C +:10DF100084020B000298220039000DF026EA0092DC +:10DF2000029A0021A018009A7941821A9941200092 +:10DF30006D1E68430B0000218018594103B0F0BDED +:10DF4000F8B50320002637000DF092EC09E0280018 +:10DF50000DF076ED817F890706D1032128000DF0B1 +:10DF600090EC0500F3D1F8BD002DFCD0817F8A072D +:10DF700002D58030076903E0C90701D08030476AC5 +:10DF8000002418206043D8490A5C002A12D04018A7 +:10DF90000090001D0EF024E80F218901401800694F +:10DFA0008068A84206D10098C1780120884030439B +:10DFB0000604360C641C042CE3D3002ED3D0002FAF +:10DFC00003D030000EF010E8F8BD30000EF010E87D +:10DFD000F8BDF3B581B00F0001980DF032ED0600E9 +:10DFE00080300400C0680EF008E80025E560256177 +:10DFF000A561E561206A0EF000E825626562A56210 +:10E00000E5622563FFF79CFFB77701984079032805 +:10E010000FD130001F216A300DF0EAEA0DF0F0EF69 +:10E02000002806D00DF0F0EF002802D1AF49012002 +:10E030000880FEBD10B50C00080000F01DF801219D +:10E0400020000DF0E6EF10BD0F218901401810B53A +:10E050000069846820000DF0E0EFA168C90402D5D2 +:10E06000007E002807D0E279A17920000DF030EB86 +:10E070000400EFD1012010BDF0B5060087B00DF00F +:10E08000E0EC040005008034206A0DF0B6EF0020BB +:10E090002062A87FC0077ED0606A01900DF05CEA24 +:10E0A000039102907079069002280DD13000C030A3 +:10E0B00040682F000069029AFF37039B3837002120 +:10E0C000101A8B41190011E00F20800130180269ED +:10E0D000059220320CCA2F0002986A370399801AE1 +:10E0E000059A994118320CCA801859413A7952065A +:10E0F000D30BAA220493925B002397023A000DF0FF +:10E1000034E9049BC83B9A4207D20020606204991C +:10E110008F1A7649C83F088020E0069802280BD164 +:10E12000BF1A3000FFF790FF002817D0012060626F +:10E1300013200DF01EEF11E001204B216062B81A90 +:10E14000090147180DF05CEF002807D00DF05CEFD7 +:10E15000002803D101213000FCF7DFF8029A039B6D +:10E160000021B8185941E162A062707902280FD1EC +:10E17000616A019881420BD05D4902220868104310 +:10E1800008605C4801210068072249040DF048EF4F +:10E1900002222B0000C7B09E01000000909300C037 +:10E1A00000040000C549079A00E006E000925748C5 +:10E1B000A0333A0031000DF042EF07B0F0BD10B5CA +:10E1C0000C00080000F005F8012120000DF02AEFF6 +:10E1D00010BDF1B5002092B00D90099001901298F9 +:10E1E0000DF038EC040006008034E0680DF00EEF0E +:10E1F0000020E060B07F80077DD5206908900DF099 +:10E20000B6E9049012980F22059141799201801885 +:10E21000022911900DD112983500C0304068049A3F +:10E220000069FF35059B38350021101A8B41190014 +:10E230000DE011983500076904983A6A7B6A0599E0 +:10E240006A35801A994118370CCF801859410290CD +:10E2500028000E30039110900DF098EA00220299E8 +:10E26000170081420E920BD3081A0121C907884278 +:10E2700002D2012107910FE00021474207910CE0F3 +:10E28000401A0121C907884203D2002107000791E3 +:10E2900003E00121404207910E9028000A300DF062 +:10E2A00076EA0C90A81D0DF072EA0B9068790A903E +:10E2B0000798002807D00C990E980DF068E809908F +:10E2C0000C980D91471A00200690079800284AD014 +:10E2D0000A98FF283DD00A990998884208D20999DE +:10E2E0000A98401A012834D10B990D98884230D3EE +:10E2F000002727610CE012E140A6008014CB000447 +:10E30000A0060004740500047C050004319200C0DE +:10E31000B07FFD210840B077022068700D21681D94 +:10E32000AF700DF070E91298407902280BD10DF012 +:10E33000CEEAFCF77BFB12980DF084EEB068FF216B +:10E34000491C0843B06001200690FF480DF05AEECA +:10E350001EE00B990D98884205D2012020610D998D +:10E360000B98471A14E0C82F04D8012020610B989D +:10E37000C7190DE02069002807D0119800692030E6 +:10E38000007A002801D0012020630020C83F2061CE +:10E39000049A059B0021B8185941E161002FA06142 +:10E3A00008D0022233000092E84812998C333A00D8 +:10E3B0000DF044EE0DF02EEE002805D00DF02EEEFF +:10E3C000002801D1012001900698002842D112981E +:10E3D00012994079A031DE4F02280F913FD10F985A +:10E3E00040898002810009180120C007401A0E9957 +:10E3F000814217D9E878401CE8706879FF2802D07C +:10E400000999401A687110980DF0C0E90C9A0999A1 +:10E410005143401810990DF07EE9B068FF21491C66 +:10E420000843B0600798002815D02069002812D052 +:10E43000C848006A00280ED13868002246210CF036 +:10E440007AEF002807D10DF002EE002803D0132048 +:10E450000DF098ED4FE012980DF0BCE94BE0032869 +:10E4600049D10198002846D02069002819D0FFF72B +:10E47000A8FC002812D13868002246210CF05AEF7F +:10E4800000280BD10DF0E2ED002807D0B2490120A1 +:10E49000088001001298FBF74AFF2CE02069002851 +:10E4A00029D10F98002740890399850202982A00F4 +:10E4B0003B000CF064EF16001000029A1900039B59 +:10E4C000101A8B4145191900794107200DF052EDC2 +:10E4D00003200DF058ED0C990B98091AB1420AD29D +:10E4E000A269E369521BBB4105D2002112980122A7 +:10E4F0000B000DF0B0ED2169089881420FD0129801 +:10E5000001220DF0ACED9549022208681043086025 +:10E51000934801210068072249040DF08CED13B0E7 +:10E52000F0BDF0B5A3B0070000201A90199038791B +:10E530000C0003286AD17879032867D138000DF0E0 +:10E540008AEA060003AA050000926A36002120002C +:10E550001AAA19AB06F040FC04001998C00407D5AC +:10E5600023000022A0691833D2431BA90DF07AEDD5 +:10E570000CF0B0EF002C02903AD0A169002937D0FE +:10E58000B07872780002104303D0F078CA789042D5 +:10E5900039D088784B7802021A43D21C30000DF033 +:10E5A000AEE80020FE67845F010000008C9700C089 +:10E5B00000040000EFC7AE03A877A0690079C10985 +:10E5C00003D0400601D00120A877A0698178427865 +:10E5D0000802104302280ED930000A300DF0E0E89E +:10E5E000002808D0B01D0DF0DCE8002803D0A87F7B +:10E5F00002210843A8773800FFF7F5FD3800FFF740 +:10E600004FFD06E0A87F002807D000213800FFF763 +:10E61000F4FC012138000DF010ED02980CF06CEFC5 +:10E6200023B0F0BDF8B50C00060015000E300DF05B +:10E63000B8E8070030000A300DF0B2E8012106000A +:10E64000C907BC4208D3E21B8A4202D2012410004F +:10E650000BE00024504203E0381B884203D2002420 +:10E6600028602000F8BD0124404231000CF098EEF3 +:10E67000701AF5E7F8B504000D000A300DF090E8C7 +:10E680000600A01D0DF08CE80700290020006A4656 +:10E69000FFF7C8FF002805D00099F01B884201D27F +:10E6A0000020F8BD0120F8BDF8B506000F000DF000 +:10E6B000DCE9040080300500006B00281CD1002F2D +:10E6C0000ED0A07F80070BD53000FFF71BFC0100A8 +:10E6D0002000FF303830FFF7CDFF00280CD002E0DB +:10E6E0002869002808D17079032807D1A06880071D +:10E6F00004D5686A002801D00020F8BD0120F8BDCB +:10E7000010B504000DF0B0E9010080310A69002A5B +:10E7100008D16279032A07D18068800704D5486A46 +:10E72000002801D0012010BD002010BDF8B5050063 +:10E730000DF09AE906000400FF3638362800FFF78E +:10E74000E1FB0D000700010030006A46FFF76AFF99 +:10E75000002813D000980021C0190DE0FF0300002D +:10E76000A79300C00000000418420004A0060004A3 +:10E77000740500047C0500046941F8BD8034E1693A +:10E78000A069F8BDF7B582B0170002980DF06CE9EA +:10E790000400807F002581070398ED4360302E0040 +:10E7A000002901900DDA0198007F0C2805D102980C +:10E7B000FFF7BCFF06000D0003E0200080308669F3 +:10E7C000C569A07FC0070FD00298407903280BD1FC +:10E7D000A068800708D58034A26AE36A2900B01ACD +:10E7E000994101D3A66AE56A0022D243290030008C +:10E7F00051405040084315D001985849007F0728E0 +:10E8000003D880004018006B00E0086B00218002F4 +:10E810002B00301A8B417B61386178880121C90354 +:10E820000843788005B0F0BDFEB505000DF01CE989 +:10E830000400FF343D340CF0A4EE0B002900C0317D +:10E8400049680E690021801B8B41A03502906889C0 +:10E850001F0085020B0002982A0039000CF098ED89 +:10E860001600029A0021A8180193019B7941851B8B +:10E8700099410E00601D0CF094EF0700601C0CF035 +:10E8800090EF381A002140197141210009310CF034 +:10E890004CEFFEBD30B5847F8030A507002D02DA35 +:10E8A0000569002D0ED1E40711D0446A002C0ED06A +:10E8B0000D24A4010C190925AD014919A468896B1F +:10E8C0008C4204D1C1698069801A994130BD002011 +:10E8D00030BD10B50DF0C8E8807FC00702D013200E +:10E8E0000DF05AEB10BDF8B51D000700069C160090 +:10E8F0000DF0C6EB3979032901D00020F8BD803036 +:10E90000C06B00218019694103C40120F8BD70B5B6 +:10E9100003200CF0C2EF04001325AD011AE060796A +:10E92000032812D120000DF0C8E800280DD02000E7 +:10E930000DF09AE8002808D0807F002805D06019E3 +:10E940000069002801D0012070BD032120000CF0D7 +:10E95000ACEF0400002CE2D1002070BD80A200804A +:10E9600031B56B461A78587899780024012A0ED070 +:10E97000022A0AD1484A1070484801700DF084EB11 +:10E980000BF014F904000DF084EB200038BD444A6C +:10E990001070444801700DF080EB0BF04BF904004F +:10E9A0000DF07EEBF1E7F8B500263F4F34003D1D3A +:10E9B000A00040197C2EDABA01000000889B00C03C +:10E9C00000040000CF2406890068FFF7D3FF002869 +:10E9D00006D0A00039684019006888600120F8BDA1 +:10E9E000641C052CEEDB002E05D1386801210222C3 +:10E9F0008172027241720020F8BD30480022006826 +:10EA0000017A01290CD0022929D1284B417A1970A9 +:10EA10002B49C1602B4901612B4941612B4916E00B +:10EA2000244B417A1970817A234B02291970284BA3 +:10EA3000C360284B0361284B436107D127490978FC +:10EA4000BF2901D01F2901D1254900E02549C26114 +:10EA5000426081610121427001700800704700200E +:10EA6000704721497D20000110B5086020491F48EA +:10EA700008602049114C086020680078002803D104 +:10EA8000FFF79BFFFFF7B9FF2068C068804710BD04 +:10EA90000A4800680069004710B50C00074909687A +:10EAA000496988472060012010BD0000B0F70004CC +:10EAB000B1F70004B4F70004C4F700046C070004C5 +:10EAC0006F500000D5500000F18B3000858B300076 +:10EAD000F14F000049500000EB8C3000C5F70004F6 +:10EAE000478E3000E78D3000B8F700041027000093 +:10EAF000BCF70004C0F70004FA4840897047F948A1 +:10EB000000697047F7497F2088807047F8B5040096 +:10EB1000F44DF54F13E0A00106000BF0A0F900281A +:10EB20000AD030000BF076F92A89D300DB1903C331 +:10EB3000601C521CE8802A81641C2404240CA888D0 +:10EB40008442E8D3F8BDF3B581B000240F00E54E50 +:10EB5000F08800904018B18888422AD9FF20FEBD75 +:10EB6000F088B188884203D30098FFF7CFFFF5E71C +:10EB7000019AE1008D186B682A6880010BF04CF94E +:10EB8000F08880010BF046F90CCD50405940084305 +:10EB90001BD1F08880010BF076F9F08880010BF032 +:10EBA0005EF9002811D0F088401C641C2404240C59 +:10EBB000F080BC42D4D30098FFF7A8FFF1880098FA +:10EBC000081AC01B0004000CFEBDF088401CF08039 +:10EBD000C6E7F8B501240025C24FB888009072E05E +:10EBE000C149E000411808784E78420660D503001C +:10EBF0003F3B0CF008EE0A6B1E1E06130A0D1C1894 +:10EC00001C1F641C2404240C5DE088783861F8E73C +:10EC10008878C978090201437981F2E7B348202254 +:10EC20000CF080ED03E088787870C878B8703019FF +:10EC300047E0891C49281CD07F281AD04888000B3F +:10EC400001D0088815E008780200AF3A072A01D9F8 +:10EC5000BF280ED10A7AD303034310091B04000115 +:10EC60001B0C00021843B22803D1497A0907090D89 +:10EC700008439E4A002120320BE006234B43D35A1F +:10EC8000834203D16D1E2D062D0E04E0491C09069A +:10EC9000090EA942F1D306235943505288184480E3 +:10ECA0004671301904046D1C240C2D062D0E0AE04B +:10ECB000022801D1897839700121002800D0310063 +:10ECC00008190404240C0098844289D3F8BD8749AC +:10ECD000002010B508708348416900290FD1012137 +:10ECE000416100200BF0BBF8002801D10BF0CBF8FC +:10ECF000FFF708FF0020FFF709FFFFF76AFF10BDCD +:10ED00007A4A002020320DE07F2908D1062358439B +:10ED1000754980184088C000411803C97047401CDD +:10ED2000202804DA06214143515C0029ECD100205F +:10ED3000C0430100704770B506000D00FFF7E0FF0B +:10ED40000C000DF0BCE90004000C306020000DF058 +:10ED5000B6E92860012070BD7CB504000020634A3C +:10ED60002032002C2BD025E00D2920D1062358433A +:10ED70005D4980184088C00040188288110B01D17D +:10ED8000811C0FE01106574B120B92001833D2185A +:10ED9000090E801C403AD56B6A4601ABA8476B460A +:10EDA0001A79009920000CF0BEEC01207CBD401CBB +:10EDB000202804DA06214143515C0029D4D10020E7 +:10EDC0007CBDF8B58B0D8CAD01000000849F00C0A8 +:10EDD00000040000487208DB0D0016001A00002134 +:10EDE000002D3DD0464C454F2034002833D000063E +:10EDF0000016401C40424401FF200B3082422FD3BA +:10EE0000802C2DDA010028000CF01AECE000C1196A +:10EE1000FF222800521C0A300CF08EECFF200B3031 +:10EE2000308013E0492813D1062048430019408858 +:10EE3000C000C1194888001F0404240C94420FD854 +:10EE4000091D220028000CF078EC34800020F8BD69 +:10EE5000491C202904DA06204843205C0028E1D11F +:10EE60000120F8BD002310B51A00837004E0845C13 +:10EE7000E3181B061B0E521C8A42F8D30121C91A43 +:10EE8000817010BDFFB5C3B06846FFF76FFF002863 +:10EE90002FD06B465C88449884422AD800256E4661 +:10EEA00005E070590DF014E9439948512D1DA54214 +:10EEB000F7D3459820180DF00CE943994860439822 +:10EEC0002100FFF7CFFF0E480027203069E0090638 +:10EED00064D50B49449B203140184088C100074845 +:10EEE000081881880A0B0E05360DA1199942419226 +:10EEF00008D9012047B0F0BD84070004C04B0004CE +:10EF0000C04F0004002A02D1801C42900EE06D4BDD +:10EF100092003106D218090E801C403AD56B40AAE7 +:10EF200041ABA847409840AB42901E7900688021D1 +:10EF300088430DF0CEE843990425085109E0429931 +:10EF4000A808800008580DF0C4E8439A61192D1DE7 +:10EF50005050B542F3D35C497D1C02E0000607D453 +:10EF60006D1C202D04D206206843085C0028F5D1D2 +:10EF70000020C043202D07D006226A43895C002967 +:10EF800002D04598A11908180DF0A2E80100439895 +:10EF9000001941603100FFF765FFA4197F1C202F85 +:10EFA00005D206207843484A115C00298FD1469843 +:10EFB000048000209EE7FFB5FF2100240500491CC6 +:10EFC000424881B00CF0D8E9404A28680821106016 +:10EFD000042029E02B5CE340A41C9B0724069B0F24 +:10EFE000240E082C03D1401C00240006000E032B25 +:10EFF00012D12B5C002C04D1401C0006000E53548F +:10F000000FE0401CE3400006000E082753542E5C1E +:10F010003F1BBE401E4303E0FF26022B00D01E0014 +:10F020005654491C0906090E029B9842D2D30498F3 +:10F0300001700398026004980078508005B05AE788 +:10F04000F7B50024160022481F4F151DFC2A36D89C +:10F0500017E0492910D1C0194088C1001C4809187F +:10F060004888A84212D10198091D32000CF07CEBAF +:10F07000002801D10020FEBD641C2406240E202C93 +:10F0800004D206206043395C0029E2D1114C4920AA +:10F09000207030000B30C008607001993200201DD4 +:10F0A0000CF04AEB2904090C6180C91DC908200035 +:10F0B000FFF753FDFF2802D0FFF795FDDAE70120A7 +:10F0C000FEBD00009C070004E04F0004C04900049E +:10F0D000C04B0004C04A000470B505000C000009D4 +:10F0E00000F0F1F820702807000F00F0ECF86070D5 +:10F0F00070BDF3B581B00C0000250198764E0A284A +:10F100007ED03DDC00284BD0012855D0022844D1C8 +:10F11000200072A10CF0E0EF20000CF05EEC714FCB +:10F1200001197878FFF7D8FF20000CF056EC001991 +:10F130002E210170457020000CF04EEC011938783A +:10F14000FFF7CAFF20000CF048EC001966A10CF094 +:10F15000C4EF20000CF040EC664F01197878FFF7FF +:10F16000BBFF20000CF038EC00192E210170457017 +:10F1700020000CF032EC01193878FFF7ADFF0CE0FD +:10F1800014287DD015287CD0632806D130785828E3 +:10F1900003D1594920000CF0A0EF01983070FEBD5A +:10F1A0005549200028390CF098EF20000CF014ECA1 +:10F1B000001920388577F0E720000CF00EEC0019DC +:10F1C0004EA10CF08AEF20000CF006EC07190CF0B1 +:10F1D00088EF0006E6B1F9B40100000080A300C08A +:10F1E0000004000046C7A5B2000E3900FFF77EFFFD +:10F1F00020000CF0FCEB001948A10CF078EF200087 +:10F200000CF0F4EB001946A10CF070EF20000CF0AC +:10F21000EEEB00E050E007190CF070EF3900FFF75B +:10F2200065FF20000CF0E2EB001928210170457009 +:10F2300020000CF0DCEB07190CF064EF3900FFF74D +:10F2400055FF20000CF0D2EB00192E210170457003 +:10F2500020000CF0CCEB07190CF058EF3900FFF749 +:10F2600045FF20000CF0C2EB00192EA10CF03EEF80 +:10F2700020000CF0BCEB07190CF04CEF3900FFF745 +:10F2800035FF20000CF0B2EB001928210170457009 +:10F29000200001E012E01BE00CF0A8EB07190CF0D5 +:10F2A0003EEF3900FFF722FF20000CF0A0EB001921 +:10F2B0002921017045707AE71C4975E701207080AB +:10F2C0000CF030EF0CF032EF0CF034EF18A16BE7DC +:10F2D0001BA1758068E71E4870470A2801D23030AC +:10F2E00000E057300006000E70470000D807000409 +:10F2F0004F2E522E3A000000960400042020436155 +:10F300006C204F2E522E3A00183904006D7801C03F +:10F31000436869705265763A000000002C200000B6 +:10F3200042423A00292C2052463A00000C000004C8 +:10F33000456E61626C6564204A54414700000000DC +:10F3400044697361626C6564204A5441470000005F +:10F3500007440FEA70B505000C0002E00A200CF02B +:10F3600056E928000CF09AE92042F7D0002070BD41 +:10F37000FD490869FF22920290435D22D2021043A8 +:10F380000861F949C031086A0E22000900011043E2 +:10F3900008627047F4490869FF22920290430861AD +:10F3A000F149C031086A000A00020862704710B5CE +:10F3B0000CF0B8E804000B200121C0010CF06AE950 +:10F3C0008120802180000CF06EE90221DD200CF00C +:10F3D0006AE90221DD200CF05AE980215A200CF064 +:10F3E00056E9FF217F200CF056E9E04800210CF09F +:10F3F00052E9F320002180000CF04CE9C0212D20BF +:10F400000CF048E910212E200CF044E920000CF00B +:10F4100092E810BDF8B514000E001F000CF082E851 +:10F420000090FF2080210C300CF030E9CF481A21E9 +:10F43000401C0CF030E97725ED00382128000CF055 +:10F440002AE93000CA4E04D1042130000CF02AE928 +:10F4500003E0042130000CF01AE9012C08D18021CE +:10F4600030000CF014E9402130000CF01CE905E0FC +:10F47000022C03D1C02130000CF008E97D204001AE +:10F480000CF0C4E8B9488021801C0CF004E97D2010 +:10F49000000100E064200CF0BAE828000CF0FEE85F +:10F4A0000006F7D57920C0000CF0F8E80500B04858 +:10F4B00010300CF0F4E80400AD4811300CF0EEE828 +:10F4C000010020070906090E000D40183860069853 +:10F4D000AA06920E0260A5480021801C0CF0DAE812 +:10F4E000802130000CF0DEE8FF2080210C300CF091 +:10F4F000DAE800980CF01EE80020F8BDF3B59FB0E4 +:10F50000002506951F98059504022000FF3056300F +:10F510000004000C0E95039507950F95049508952A +:10F5200011951E900CF08EE80D902000FF305730A2 +:10F530000004000C1D900CF086E80C902000FF30B9 +:10F5400059300004000C1C900CF07CE80B9020005B +:10F55000FF30B2300004000C1B900CF074E80A90ED +:10F560002000FF30D5300004000C1A900CF06AE83F +:10F57000099080480CF04AE8FFF719FF0BF0D2EF32 +:10F58000029093202021C0000CF084E87A4880216A +:10F590000CF080E87648642112300CF07CE81E986C +:10F5A000FF210CF054E81D9838210CF050E81C980D +:10F5B00008210CF04CE8FF34B3342004000C402147 +:10F5C0000CF044E81E9800210CF040E821214F2067 +:10F5D0000CF060E81A9801210CF0B0ED1A980421A3 +:10F5E0000CF0B0ED556679AD010000007CA700C0BD +:10F5F00000040000F4D9AF7B624E042130000CF00F +:10F600005CE800247F26002C02D17F224A2101E001 +:10F610007F22A2211F980BF088EF594800210CF09F +:10F6200044E857481A21401C0CF03EE87727FF00B9 +:10F63000382138000CF038E8002C4FD10821380070 +:10F640000CF02EE8514870212C300CF02AE80821EB +:10F6500047200CF032E8FF201F217A300CF02CE814 +:10F66000FF201F217B300CF028E8FF201F217C3079 +:10F670000CF022E85B20F421C0000CF016E85120C9 +:10F680000CF016E8C106C90E2020014351200CF0F1 +:10F690000CE850200CF00CE8E32108400421014361 +:10F6A00050200CF002E8102138000BF0FAEF374838 +:10F6B00002212C300BF0F4EF082138000BF0FCEFA6 +:10F6C000324880212C300BF0ECEF382138000BF061 +:10F6D000ECEF2E4880212B30FFF746FE7D20000105 +:10F6E0000BF09EEFFF2080210C300BF0DAEF012CA5 +:10F6F00003DB244804210BF0D4EF17AA00921F98D3 +:10F700000122210018ABFFF78FFE189814901C48B7 +:10F710008021801C0BF0C8EF72E00A200BF080EF14 +:10F7200038000BF0C6EF000604D416480BF0C0EF0B +:10F73000C006F2D51348DE300BF0BAEF10907920F6 +:10F74000C0000BF0B6EF07000E4810300BF0B0EF22 +:10F7500019900C4811300BF0ACEF199AB90612074A +:10F760000006000E120D17181798890E8142169781 +:10F7700015910DDB091A380088400FE000900090C9 +:10F78000B5030000B9030000102700005206000076 +:10F79000401A0121814038000CF0E2EC14991390DA +:10F7A000401A7F2E129003D1129835000F970E90B9 +:10F7B000129803F0D1F907000E9803F0CDF98742B3 +:10F7C00004D812980E90139835000F90109E109840 +:10F7D000002C03D10206120E4A2102E00206120E8C +:10F7E000A2211F980BF0A0EEFF4F082138000BF06C +:10F7F00058EF0A200BF014EF082138000BF05CEFF3 +:10F800007727FF0038000BF054EF000688D51498D6 +:10F81000002C05D10490179811900F98069002E0E3 +:10F8200003900F980590F0480BF042EF400707D483 +:10F830002A061F98120E4A210BF076EE089506E074 +:10F840002A061F98120EA2210BF06EEE0795E648CD +:10F850000021801E0BF028EFFF2080210C300BF0E0 +:10F860002CEF641C022C00DACCE6DF4804210BF0FC +:10F8700024EF02980BF068EE089C1F98641E220685 +:10F88000120E4A210BF050EE7D26760130000BF06F +:10F89000C8EE15AA00921F980222002116ABFFF7AE +:10F8A000C3FD119915988842119903DB169D401AE2 +:10F8B000854006E0401A0121814016980CF050EC7A +:10F8C000050008984A21401C02061F98120E0BF0F2 +:10F8D0002CEE30000BF0A4EE15AA00921F98022225 +:10F8E000002116ABFFF7A0FD1199159888421199D8 +:10F8F00003DB169E401A864006E0401A0121814033 +:10F9000016980CF02EEC06000398049900040CF0F5 +:10F9100028EC069A01234543DB0342434643E9189A +:10F92000D218F018CB171B0C59180B14D117090C4F +:10F930008918C217120C10180514059809141A1A00 +:10F94000081A0599691A002A04DA002817DC002928 +:10F950000FDD05E0002A0ADD00280ADB002906DAAF +:10F96000091A40010CF0FCEB0899490110E000284D +:10F9700005DC002901DA002A05DC00280ADB002961 +:10F9800008DD002A06DA811A50010CF0EAEB610169 +:10F99000081A01E00898400107994901401A0A181D +:10F9A0001032D317DB0E9A18904B52115843C317DD +:10F9B0001B0C1818001408181030C117C90E0818AD +:10F9C00044111F9818235843894B00211950C0181F +:10F9D000A31A4160F9338160C36001612098120667 +:10F9E000120E02701F984A210BF09EED0D991E9881 +:10F9F0000BF036EE371B94660100000078AB00C0B8 +:10FA000000040000D43A07F10C991D980BF032EE77 +:10FA10000B991C980BF02EEE0A991B980BF02AEE0E +:10FA200009991A980BF026EE21B0F0BDF8B50BF04D +:10FA30008EED002500907349A80020394618002457 +:10FA400068001E3947186000305A395D0BF036EEF9 +:10FA5000641C022CF7DB6D1C012DECDB00980BF015 +:10FA60007EEDF8BD684A137FDB07FCD1664A203281 +:10FA700010819180704770B500248007050E072122 +:10FA800020000CF054E88006800E2A000243072173 +:10FA900020000BF054ED641C2406240E012CEED340 +:10FAA00070BDF8B5002406000F007D256D010EE045 +:10FAB000641CAC4208D953484438476106618169E7 +:10FAC000491C81610120F8BD0A200BF0B4ED39001A +:10FAD00030000CF054EB0128EAD10020F8BD70B5DD +:10FAE00005000100B220FFF7DCFF040007D1290068 +:10FAF000B2200CF048EB2900B2200CF040EB2000C3 +:10FB000070BDF8B50500002000900BF014ED68788A +:10FB10000602287806433D48AD1C01683C4A114363 +:10FB200001600123092000070380002282803648FB +:10FB300081889C0221406B24E400091981800380A4 +:10FB4000314F20373A821400B02120000BF0EEEF45 +:10FB50001F2108430200B02120000BF0F0EC641CD0 +:10FB60002406240E012CEFD3002140200CF00AEBD8 +:10FB7000002141200CF006EB0220FFF77CFF002162 +:10FB8000B3200CF000EB1021B1200CF000EB1E486C +:10FB9000017FC907FCD11C498888012292031043C8 +:10FBA0008880032038823104090C5000FFF75AFF87 +:10FBB00000240CE0281940780102285D014301204F +:10FBC000C00320180004000CFFF74CFFA41CB44233 +:10FBD000F0DB281940780102285D01430120C003B1 +:10FBE000FFF740FF0848017FC907FCD18188012247 +:10FBF000920391438180002038820EE0B903000017 +:10FC0000D3E20000440C00040008009000210080B2 +:10FC10000008080002200BF00EED2021B2200CF0AD +:10FC2000AEEA0128F6D1022119200CF0A8EA00283A +:10FC300000D0FEE71F2140200CF0A4EAF82141206B +:10FC40000CF0A0EA0BF07EEC0098F8BDEEE6F8B5FB +:10FC500000250024FF486F003E18FF492002C95BC1 +:10FC600040180004000C0BF002ED3055641C012C10 +:10FC7000F3DB6D1C032DECDB0BF068ECF64DF54E61 +:10FC800007000024AD1D223E6000285A0BF01AED3B +:10FC90003055641C032CF7DBF04C606AED492C39BD +:10FCA0008862EF4838210BF006EDC02180200BF070 +:10FCB00002ED0221DD200BF0FEEC38000BF04EECE3 +:10FCC000E8486062F8BDE348F8B52C38E349806A3B +:10FCD00048620BF03CECDF4DDF4E07000024223D74 +:10FCE000B61D6000295D305A0BF0E8EC641C032C53 +:10FCF000F7DB38000BF032EC0025D64800246F000B +:10FD00003E18D5492002C95B40180004315D000C43 +:10FD10000BF0B0EC641C012CF3DB6D1C032DECDB51 +:10FD2000F8BD70B500240121C420FFF7BAFE2506F6 +:10FD30002D0E1022472128000CF02CEA102247211A +:10FD400028000CF02CEA641C012CF0DB0221C420FA +:10FD5000FFF7A7FE002425062D0E082247212800C4 +:10FD60000CF018EA0822472128000CF018EA641C5D +:10FD7000012CF0DB8021B220FFF793FE0024250642 +:10FD80002D0E0122472128000CF004EA4022052113 +:10FD900028000CF000EA0122472128000CF0FEE9BF +:10FDA000641C012CEBDB0221B220FFF77AFE002459 +:10FDB00025062D0E0822472128000CF0ECE904222C +:10FDC000472128000CF0E6E90822472128000CF022 +:10FDD000E6E9641C012CEBDB002425062D0E022233 +:10FDE000472128000CF0D6E90422472128000CF016 +:10FDF000D6E9641C012CF0DB002425062D0E02221E +:10FE0000472128008B302AD40100000074AF00C0C5 +:10FE100000040000536C09A30CF0CAE9402205213C +:10FE200028000CF0C6E9641C012CF0DB70BD70B535 +:10FE3000924D28000BF008EC462100200BF080EEDC +:10FE40000E2801D1012000E00020874C2C3C1EE050 +:10FE5000E069401CE061FFF76EFF0A200BF0F4EB55 +:10FE6000462100200BF06CEE2062462100200BF0B2 +:10FE700068EE18280DD028000BF0E6EB4621002094 +:10FE80000BF05EEE0E2801D1012000E000200028DA +:10FE9000DED170BD70B50E000500082130000BF0FA +:10FEA000F8EB2800FFF7DDFE0121C420FFF703FE79 +:10FEB00000241022472120000CF076E92878002841 +:10FEC00010D1012002F060FE0A200BF0BEEB0020F2 +:10FED00002F05AFE0A200BF0B8EBE0008119200076 +:10FEE000FFF72AFB1022472120000CF062E9641C76 +:10FEF0002406240E012CDCD30221C420FFF7DBFDF5 +:10FF000000240822472120000CF04EE90822472156 +:10FF100020000CF04EE9641C2406240E012CF0D3C2 +:10FF20008021B220FFF7C7FD0024012247212000D5 +:10FF30000CF03AE94022052120000CF036E90122BC +:10FF4000472120000CF034E9641C2406240E012C07 +:10FF5000EBD30221B220FFF7AEFD00240822472197 +:10FF600020000CF022E90422472120000CF01CE9BB +:10FF70000822472120000CF01CE9641C2406240EF2 +:10FF8000012CEBD300240222472120000CF00CE9C5 +:10FF90000422472120000CF00CE9641C2406240EE6 +:10FFA000012CF0D300240222472120000CF000E9AC +:10FFB0004022052120000CF0FCE8641C2406240EDD +:10FFC000012CF0D3FFF733FF0120FFF792FDFFF77D +:10FFD00084FE002070BD70B50BF0C2EA224C050013 +:10FFE000A41D6088012102062078120E0CF0E4E8BE +:10FFF00028000BF0BEEA0BF0A8EA0CF0E2E8FC21C6 +:020000025000AC +:1000000041200CF0CAE81E480CF0DEE86288207837 +:1000100001210CF0DEE80BF0A0EA20780CF0DCE81F +:100020000BF092EA122107200CF0BAE86088010672 +:100030002078090E0CF0D4E8FFF7B8F90320FFF799 +:1000400024FDDF2104200CF0A8E85124E400200066 +:100050000BF042EB0500002120000BF03AEB0948C1 +:100060000168032212070FE02C0C0004907801C0F5 +:1000700000A900805104000031003100DC050000BF +:100080004C7901C000280080114301600322062141 +:1000900000200BF05EEA3822062100200BF058EA1F +:1000A000802112200CF06CE8102102200CF068E88E +:1000B0004020FFF71EFD022108000CF062E83B2201 +:1000C000062100200BF044EAFF4908000838FFF73A +:1000D000E1FE290020000BF0FCEA802102200BF059 +:1000E000F4EA01200BF0B0EA802102200BF0F8EADC +:1000F00001200BF0AAEA0120FFF7C7FCFFF768F91F +:100100000BF02AEA70BDF8B50025F04802F050FD6A +:100110000BF01AEAED4811E0690000240E18AF0058 +:10012000EB48C05901042006090C000E0BF008ED45 +:100130003119641C012C4871F2DB6D1CE348016825 +:10014000A942E9DC002514E0680000248619AF000C +:10015000DF480C30C1592002FF30401C0818000451 +:10016000000C0BF08EEA3119641C012C4876EFDB91 +:100170006D1CD64E7069A842E6DCD54F0024583776 +:1001800009E0A50078590004000C0BF0A6EAA919B3 +:100190006031641CC883B06FA042F2DC0BF0DCE974 +:1001A0000BF07EE90024F71DF9370AE0E1008D1914 +:1001B000FF35413528680004000C0BF062E9641C2F +:1001C0006860F86BA042F1DC0BF06EE932000020B1 +:1001D000FF32C04B413208E0C400A119FF31413168 +:1001E0008C6AE4182468401CCC62116A8142F3DCFA +:1001F0000020F8BDF8B50BF0A8E9B44E00250DE0DD +:100200000024680087193819427920063979000ED0 +:100210000BF09EE9BC5FD7570100000070B300C02F +:100220000004000095FD56E5641C012CF5DB6D1CF7 +:100230003068A842EEDC002511E000246800871930 +:100240002002397EFF30401C081800043919497E0D +:10025000000C0BF024EA641C012CF1DB6D1C7069AE +:10026000A842EADC002409E0A00080196030C18BBC +:10027000808B0906090E0BF036EA641CB06FA042B1 +:10028000F2DC0BF074E90BF016E9984D00240CE059 +:10029000E0008019FF304130416800680906000421 +:1002A000090E000C0BF0FAE8641CE86BA042EFDCCE +:1002B0000BF004E9E86B8E49C0008019FF30413033 +:1002C0004068087032000020FF32874B413208E05E +:1002D000C400A119FF314131CC6A896AC9180C6088 +:1002E000401C116A8142F3DC0BF038E90421402004 +:1002F0000BF084EF0BF03AE90020F8BDFFB5ADB08C +:100300002022060009A87B49379F369D0BF0E6EABC +:1003100078492022203101A80BF0E0EA3402E01DE8 +:10032000FC300004000C10210BF034EF03200BF024 +:100330000EEC2000FF30ED300004000CFF210BF02C +:10034000AEE92000FF30EE300004000CFF210BF07E +:10035000A6E92000FF30EF300004000CFF210BF075 +:100360009EE92000FF30F0300004000CFF210BF06C +:1003700096E901200BF0EAEB2000FF30A5300004E5 +:10038000000C012F02D07908012908D144210BF07B +:1003900086E90BF0ECE80BF06EE918210AE0B908E9 +:1003A00001290ED188210BF07AE90BF0E0E80BF07F +:1003B00062E91C210C200BF072E80BF060E90BF0F5 +:1003C000CEE830020700FF3757372C97309B4B376A +:1003D0002B977F1C2A97403739003B390A00503A47 +:1003E000289258322792521C2692921C29972592C5 +:1003F000133294461E320F1D24924A1E2397563FF5 +:1004000096465F3AF81C219008042297299F000C19 +:10041000209038042A9F000C1F9038042B9F000C5A +:100420001E903804000C1D902C9F3804000C1C906A +:100430001004000C72461B901004000C1A90249AB1 +:100440001004000C1990239F62463804000C189089 +:100450001004259A000C17901004269A000C169090 +:100460001004279A000C15901004000C1490219889 +:10047000289A0004000C13901004229F000C129084 +:100480003804000C002B11907AD01198FF210BF04A +:1004900006E91298D9210BF002E9139810210BF00C +:1004A000FEE814981F210BF0FAE815980B210BF0C9 +:1004B000F6E8169810210BF0F2E81798C9210BF016 +:1004C000EEE81898EA210BF0EAE8199800210BF001 +:1004D000E6E81A980A210BF0E2E80DE03A0C000475 +:1004E00068550004480D000400A000806856000410 +:1004F000202000909C7801C01B9840210BF0CEE892 +:10050000280024381C2809D81C982C210BF0C6E898 +:100510001D9843210BF0C2E81C210CE02800643830 +:10052000282812D81C982C210BF0B8E81D984121DE +:100530000BF0B4E812211E980BF0B0E81F980021D0 +:100540000BF0ACE8209836212CE0280095381028D4 +:1005500017D81C9821210BF0A2E81D9840210BF020 +:100560009EE81E9808210BF09AE81F9800210BF0D6 +:1005700096E820983A210BF092E81898DA2111E0D9 +:10058000CAE02800B7380D2802D9ED1F1B2D0BD863 +:100590001C9821210BF082E81D9844210BF07EE885 +:1005A0002521C8E70BF07AE8A1214F200BF09AE84B +:1005B000FF2000217C300BF096E8FF20E0217A300C +:1005C0000BF090E8119800210BF068E821214F20F2 +:1005D0000BF088E8FF4850210BF084E840212D20E3 +:1005E0000BF080E8FC4800210BF07CE8FA4825215C +:1005F000401C0BF078E8F84D01212D1D28000BF070 +:100600006EE8022128000BF076E8F3488021DC3800 +:100610000BF064E86D1E082128000BF060E8ED4F38 +:1006200070212C37510B63F5010000006CB700C03E +:1006300000040000BF73FF7C38000BF05AE808216B +:1006400047200BF062E8FF201F217A300BF05CE8B6 +:10065000FF201F217B300BF058E8FF201F217C304A +:100660000BF052E85B20D821C0000BF046E8512087 +:100670000BF046E8C106C90E2020014351200BF0C3 +:100680003CE850200BF03CE8E32108400421014302 +:1006900050200BF032E8102128000BF02AE802214C +:1006A00038000BF026E8082128000BF02EE8802106 +:1006B00038000BF01EE8182128000BF01EE88021FE +:1006C000781EFEF779FE13980AF0EEEF8106490FC7 +:1006D0008A0001A98B584107490F0620072900D03D +:1006E000080009A98958FF341D180F185534200433 +:1006F000000C0AF0DAEF8106490F8A0001A98A5836 +:100700004007400F0621072800D001005018401B69 +:1007100038180C210C2800DC01000520C043814260 +:1007200000DB0800002848DA00244BE02000FF30FE +:1007300051300004000C38210AF0BAEF1198FF2163 +:100740000AF0B6EF1C983C210AF0B2EF1298D921BA +:100750000AF0AEEF139810210AF0AAEF14981F21A7 +:100760000AF0A6EF15980F210AF0A2EF16981021B3 +:100770000AF09EEF1798C9210AF09AEF1898FA210B +:100780000AF096EF1F9800210AF092EF19980021C5 +:100790000AF08EEF1D9803210AF08AEF1E981221AD +:1007A0000AF086EF1A980A210AF082EF20983A217F +:1007B0000AF07EEF1B984021FEE6062801DA0124AC +:1007C00000E00524A20009A98958451A1198FF21C3 +:1007D0000AF06EEF13980AF068EF8009E1008001DB +:1007E0004919014309061398090E0AF062EF022025 +:1007F0000AF03EEF7D4C8021A41C20000AF07CEF23 +:100800007D25ED00671C02E028000AF032EF380079 +:100810000AF076EF0006F7D5002E0BD173480D30A5 +:100820000AF06EEF2E99087070480E300AF068EFEB +:100830002F9908706D4800210AF05EEF6B48002187 +:10084000401C0AF05AEF002120000AF056EF002069 +:1008500031B0F0BDF8B50C0015000AF092EE0AF0C8 +:1008600094EE00900B200221C0010AF046EF4021D7 +:100870002D200AF042EF7726F600102130000AF012 +:1008800044EFB02130200AF038EF0121F01E0AF0C9 +:1008900034EFA021701C0AF030EF0F21B01E0AF0D7 +:1008A0002CEF52488021DC380AF022EF4E4802211A +:1008B0002C300AF01EEF02200AF0DAEE8021701EC2 +:1008C0000AF01AEF30000AF01CEF7D27FF0005E068 +:1008D00038000AF0CEEE30000AF012EF0006F7D52D +:1008E0007920C0000AF00CEF0600404814300AF0EE +:1008F00008EF07003D4815300AF002EF3A070006FE +:10090000000E120D1018B1062060890E29603748BC +:1009100000210AF0F2EE35480021401C0AF0ECEE0E +:1009200032480021801C0AF0E8EEF320002180000C +:100930000AF0E2EE00980AF030EE0AF01AEE00201B +:10094000F8BDFFB58FB000252E00099508950AF077 +:1009500018EE0AF01AEE04002448001D0AF0D0EE4A +:1009600003907720C0000AF0CCEE029030200AF00D +:10097000C8EE019020000AF010EE0AF0FAED0F9890 +:1009800010210702F81DFC300004000C0BF00CECE9 +:1009900003200BF0E6E83800FF30ED300004000CD7 +:1009A000FF210AF086EE3800FF30EE300004000C24 +:1009B000FF210AF07EEE3800FF30EF300004000C1B +:1009C000FF210AF076EE3800FF30F0300004000C12 +:1009D000FF210AF06EEE01200BF0C2E83800FF3074 +:1009E000A5300004000C03E052060000B50300002F +:1009F00088210AF05EEE0AF0C4ED0AF046EE1C21F2 +:100A00000C200AF056ED0AF044EE0AF0B2ED380080 +:100A1000FF3056300004000CFF210AF04AEE380087 +:100A2000FF3058300004000CD9210AF042EE3800A3 +:100A3000FF305930545A58230100000068BB00C0F1 +:100A4000000400009F9057F60004000C25210AF0D6 +:100A50003AEE3800FF30B0300004000C1F210AF0DD +:100A600032EE3800FF30B1300004000C0B210AF0E8 +:100A70002AEE3800FF30B3300004000C10210AF0D9 +:100A800022EE3800FF30C6300004000CC9210AF005 +:100A90001AEE3800FF30AC300004000CEA210AF0F6 +:100AA00012EE3800FF30E4300004000C00210AF0A0 +:100AB0000AEE3800FF30A7300004000C0A210AF0CB +:100AC00002EE3800FF3048300004000C40210AF0EC +:100AD000FAED3800FF3057300004000C2C210AF0EA +:100AE000F2ED3800FF30A2300004000C43210AF080 +:100AF000EAED3800FF30A3300004000C1C210AF09E +:100B0000E2ED3800FF30E3300004000C00210AF071 +:100B1000DAED3800FF30A8300004000C36210AF06E +:100B2000D2ED0AF038ED0AF03AED0400A1214F2091 +:100B30000AF0ECEDFF2000217C300AF0E8EDFF2008 +:100B4000E0217A300AF0E2EDFF4880210AF0DEED84 +:100B500040212D200AF0DAED20000AF028ED0AF0FD +:100B600012ED0F9800240006000E0E9001E0002CFC +:100B700016D10E984A210BF002E80D900E98A22192 +:100B80000AF0FCEF0C900E9806AA07A9FFF76CFE7E +:100B90000D980B900C980A900798059006984FE0D6 +:100BA000012C02D10D98801E03E0022C05D10D9876 +:100BB000401E05060C9E2D0E21E0032C02D10D9D3A +:100BC0000C9819E0042C03D10C980D9D801E14E0A4 +:100BD000052C0AD10B9809900A9808900B98401C94 +:100BE00005060A982D0E401C07E0062C07D109982F +:100BF000401E050608982D0E401E0606360E0E985D +:100C00002A004A210AF0C2EC0E983200A2210AF012 +:100C1000BEEC0E9806AA07A9FFF726FE04990698CF +:100C2000884203DA07990A960B9508E004998842EE +:100C300007D1059A0799914203DA0A960B95059117 +:100C40000490641C072C92DB3800FF303130000424 +:100C5000000C0AF034EDFF37040033373804000C81 +:100C60000AF02CED0D9A0B990C9B891A0A9A091916 +:100C7000D21A101802060F98B44B0906090E00018B +:100C80001950120EC01842600D9A0E984A210AF0AF +:100C90007EEC0C9A0E98A2210AF078EC0AF07AEC1D +:100CA0000AF07CEC0400AA4803990AF030ED7720A2 +:100CB0000299C0000AF02AED019930200AF026EDD1 +:100CC00020000AF074EC0AF05EEC002013B0F0BDD6 +:100CD000FFB5AFB020220AA89E49389D0AF012EE57 +:100CE0009C492022203102A80AF00CEE02200AF0D2 +:100CF000CAEC012013902F98002600020400210066 +:100D0000FF31B0312D91491C2C91891C2B91FF3062 +:100D1000133158302A911A392E902991383128915F +:100D20003D3927915F3926910F318E464B310B00AB +:100D300041330F009C468B1D4D3F781C1B044A1C01 +:100D40001B0C3F0423933F0C63461B04120409044D +:100D500024971B0C120C090C20AF25900EC771466E +:100D60000904090C1F912699C01C0904090C1E9145 +:100D700027990904090C1D9128990904090C1C9153 +:100D800029990904090C1B912A9900040904090CEA +:100D90001A912B99000C0904090C19912C991690A1 +:100DA0002E980904090C000418912D99000C159037 +:100DB00025980904090C0004000C1791149032982E +:100DC00000287CD01498FF210AF07CEC1598D921DA +:100DD0000AF078EC169810210AF074EC17981F218D +:100DE0000AF070EC18980B210AF06CEC199810219D +:100DF0000AF068EC1A98C9210AF064EC1B98EA2101 +:100E00000AF060EC1C9800210AF05CEC1D980A21A5 +:100E10000AF058EC1E9840210AF054EC28002438BF +:100E20001C2809D81F982C210AF04CEC209843214B +:100E30000AF048EC1C210CE028006438282812D85D +:100E40001F982C21AF9ED77F0100000064BF00C017 +:100E50000004000018C659A40AF03EEC2098412175 +:100E60000AF03AEC122121980AF036EC229800217F +:100E70000AF032EC239836212CE02800953810280F +:100E800016D81F9821210AF028EC209840210AF05A +:100E900024EC219808210AF020EC229800210AF085 +:100EA0001CEC23983A210AF018EC1B98DA2111E087 +:100EB0002800B7380D2802D9E81F1B280CD81F9826 +:100EC00021210AF00AEC209844210AF006EC2521A1 +:100ED000C9E7C1E00AF000ECA1214F200AF020ECA4 +:100EE000FF2000217C300AF01CECFF20E0217A304A +:100EF0000AF016EC149800210AF0EEEB21214F20A5 +:100F00000AF00EEC154850210AF00AEC40212D2081 +:100F10000AF006EC13480821001F0AF002EC114801 +:100F20000521C01E0AF0FCEB0E4F012138000AF02B +:100F3000F4EB022138000AF0FCEB0A488021E0388B +:100F40000AF0EAEB7F1E082138000AF0E6EB0348BE +:100F500070212C300AF0E0EB082107E05206000077 +:100F60005C540004B9030000DC7801C047200AF09B +:100F7000E0EBFF201F217A300AF0DAEBFF201F217F +:100F80007B300AF0D6EBFF201F217C300AF0D0EB3B +:100F90005B20D821C0000AF0C4EB51200AF0C4EB5A +:100FA000C106C90E2020014351200AF0BAEB50209F +:100FB0000AF0BAEBE32108400421014350200AF073 +:100FC000B0EB102138000AF0A8EB0221FF480AF02C +:100FD000A4EB082138000AF0ACEBFC4880210AF0B1 +:100FE0009CEB182138000AF09CEBF8488021401E49 +:100FF000FEF7F6F916980AF06CEB8106490F4307E5 +:10100000890002AA52585B0F0620072B00D0180057 +:1010100017180AAA51580818019024980AF058EB9A +:101020008106490F890002AA51584007400F062245 +:10103000072800D0020088180199C01B08180C214D +:101040000C2800DC01000520C043814200DB0800C1 +:10105000002848DA00274BE02000FF305130000420 +:10106000000C38210AF038EB1498FF210AF034EB19 +:101070001F983C210AF030EB1598D9210AF02CEB8F +:10108000169810210AF028EB17981F210AF024EB7C +:1010900018980F210AF020EB199810210AF01CEB88 +:1010A0001A98C9210AF018EB1B98FA210AF014EBE0 +:1010B000229800210AF010EB1C9800210AF00CEB9A +:1010C000209803210AF008EB219812210AF004EB82 +:1010D0001D980A210AF000EB23983A210AF0FCEA55 +:1010E0001E984021F6E6062801DA012700E00527D0 +:1010F000B9000AAA5158401A12901498FF210AF018 +:10110000ECEA16980AF0E4EA81091298FA008901DB +:101110001018084301061698090E0AF0DEEA0220AC +:101120000AF0BAEAAA4880210AF0FAEA7727FF0013 +:1011300003E07D20C0000AF0B0EA38000AF0F4EACB +:101140000006F6D52F9800280BD1A148C01C0AF044 +:10115000ECEA309908709E48001D0AF0E6EA3199E1 +:1011600008701398761C864200DA32E6984800210F +:10117000801E0AF0D6EA96480021401E0AF0D0EA06 +:10118000934800210AF0CCEA002033B0F0BDF7B557 +:1011900084B015000027060002970197FEF74DF96D +:1011A000012D09D06808012801D1012704E0022798 +:1011B000A808012800D0FF1E781C02D1012007B02A +:1011C000F0BD3021714383480024081839014718C5 +:1011D0002006000E0822472103900BF00EE8059A26 +:1011E00000923300200001AA02A9FFF77BFD784896 +:1011F0006B46197AC01D0AF094EA75486B46197956 +:1012000008300AF08EEA0598302805D1059A2B009F +:1012100031002000FFF7A9FB20016B46197A38182E +:1012200081711979C1710398042247210AF0E4EF12 +:101230000398082247210AF0E4EF641C012CC7DB65 +:101240000020BCE7F8B50C0015000AF0AEE90AF082 +:10125000B0E900907489044A0100000060C300C036 +:101260000004000082FB0D240B200121C0010AF0C4 +:1012700062EAFF2080210C300AF058EA40212D203C +:101280000AF058EA7726F600102130000AF05AEAF0 +:10129000E02130200AF04EEA0021F01E0AF04AEA6E +:1012A0002F21B01E0AF046EA8021701C0AF042EAA3 +:1012B0004C488021DE380AF03AEA494802210AF017 +:1012C00036EA02200AF0F2E98021701E0AF032EAC2 +:1012D00030000AF034EA7D27FF0005E038000AF00C +:1012E000E6E930000AF02AEA0006F7D57920C000C6 +:1012F0000AF024EA06003B4812300AF020EA070010 +:10130000384813300AF01AEA3A070006000E120DA8 +:1013100010182060B1063348890E29600021801E14 +:101320000AF008EA2F480021401E0AF004EA2D487E +:1013300000210AF000EA00980AF04CE90AF036E9C8 +:101340000020F8BDFFB593B0140000252E000A95CB +:1013500009950AF034E90AF036E907002148801CB3 +:101360000AF0ECE904907720C0000AF0E8E9039065 +:101370001C48801E0AF0E2E9029030200AF0DEE903 +:10138000019038000AF026E90AF010E91398FF21CD +:1013900000021290FF3056300004000C0AF0A6E95B +:1013A0001298D921FF3058300004000C0AF09EE951 +:1013B00012980821FF3059300004000C0AF096E919 +:1013C0001298C921FF30C6300004000C0AF08EE9E3 +:1013D0001298FF30E4300004000C002106E0000009 +:1013E0007E060000B7030000785400040AF07EE98E +:1013F00012980A21FF30A7300004000C0AF076E9A9 +:10140000129822000100FF31A231881D00040F0054 +:10141000000C413711903804000C4B1C109018043C +:10142000000C0F900804243A000C1C2A04D8432115 +:101430000AF05CE91C2107E02100643928290DD855 +:1014400041210AF054E912210F980AF050E910984E +:1014500000210AF04CE9119836212BE01399220063 +:101460000902FF31AC310F04953A3F0C102A0DD818 +:1014700040210AF03CE90F9808210AF038E9109859 +:1014800000210AF034E911983A210FE02100B73920 +:101490000D2902D9E41F1B2C0ED844210AF026E99D +:1014A0000F9825210AF022E9109800210AF01EE980 +:1014B000DA2138000AF01AE90AF080E80AF082E836 +:1014C0000400A1214F200AF036E9FF2000217C30E2 +:1014D0000AF030E9FF20E0217A300AF02CE95021AF +:1014E000FF480AF028E940212D200AF024E92000D5 +:1014F0000AF070E80AF05AE8139800240006000E7B +:101500000E9001E0002C15D10E984A210AF04AEB0A +:1015100007000E98A2210AF046EB0D900E9807AA3C +:1015200008A9FFF799FE0D980B9008980C97069064 +:1015300007984DE0012C01D1B81E02E0022C04D125 +:10154000781E05060D9E2D0E21E0032C02D10D986C +:101550003D0019E0042C03D10D983D00801E14E0DD +:10156000052C0AD10C980A900B9809900C98401CF5 +:1015700005060B982D0E401C07E0062C07D10A9893 +:10158000401E050609982D0E401E0606360E0E98C2 +:101590002A004A210AF00EE80E983200A2210AF031 +:1015A0000AE80E9807AA08A9FFF756FE05990798BA +:1015B000884203DA08990B960C9508E00599884251 +:1015C00007D1069A0899914203DA0B960C95069179 +:1015D0000590641C072C95DB1298FF303030000416 +:1015E000000C0AF080E804001298FF30323000044A +:1015F000000C0AF078E801000C980D9BC21B101932 +:1016000002060B98120EC01A401801061398090E14 +:101610000301B44818188260C1600E983A004A214C +:1016200009F0C8EF0D9A0E98A22109F0C4EF09F055 +:10163000C6EF09F0C8EF0400AB4804990AF07AE855 +:1016400077200399C0000AF076E8A7480299001FA6 +:101650000AF070E8019930200AF06CE8200009F0E7 +:10166000BAEF09F08E4BB3B1010000005CC700C0B7 +:1016700000040000F705F69CA4EF002017B0F0BDB1 +:10168000FFB599B01021060000020400FF30001DD4 +:101690000004229D000C0AF0ACED97481030871929 +:1016A0002000FF30A53000043979000C0AF028E84A +:1016B00009F08EEF0AF010E8914841790C2009F00A +:1016C00020EF0AF00EE809F07CEF03200AF070EA40 +:1016D0002000FF30ED3000047979000C0AF010E8AA +:1016E0002000FF30EE300004B979000C0AF008E861 +:1016F0002000FF30EF300004F979000C0AF000E818 +:101700002000FF30F0300004397A000C09F0F8EFC7 +:1017100001200AF04EEA2000FF30583018901C9F3C +:10172000401C179057301690401C1590153014909F +:101730001A38139038300200010012908D38119041 +:101740008C30109041388446401C8646401D030072 +:101750000004000C3D390E900804000C0D907046FA +:101760000004000C0C9060460004000C0B901298D2 +:101770009C3A1204120C0004000C0F920A9010986C +:10178000523B0004000C099013980004000C0890D0 +:1017900014980004000C079015980004000C0690A3 +:1017A00016980004000C059017980004000C049093 +:1017B00018980004000C039011980004000C02908B +:1017C0001804000C002F019076D00198FF2109F039 +:1017D00098EF0298292109F094EF0398D92109F094 +:1017E00090EF0498082109F08CEF05981F2109F06B +:1017F00088EF06980F2109F084EF0798C92109F0B6 +:1018000080EF0898DA2109F07CEF0998002109F0AF +:1018100078EF0A98002109F074EF0B98432109F042 +:1018200070EF0C981C2109F06CEF0D980A2109F05B +:1018300068EF0E98362109F064EF0F98402109F007 +:1018400060EF280024381C2809D80298292109F0C3 +:1018500058EF0B98432109F054EF1C210CE02800AD +:101860006438282812D80298212109F04AEF0B98F1 +:10187000412109F046EF12210C9809F042EF099836 +:10188000002109F03EEF36210E982BE02800953814 +:10189000102812D80298292109F032EF0B98402124 +:1018A00009F02EEF0C98082109F02AEF0998002181 +:1018B00009F026EF3A21E7E7AFE02800B7380D2816 +:1018C00002D9ED1F1B2D0FD80298292109F018EF1E +:1018D0000B98442109F014EF0C98252109F010EF22 +:1018E0000998002109F00CEFA1214F2009F02CEFFD +:1018F000002107E0520600005C540004B903000018 +:10190000000C0004FF207C3009F01EEFFF20E021D6 +:101910007A3009F01AEF0198002109F0F2EE212146 +:101920004F2009F012EF5021FF4809F00EEF40213F +:101930002D2009F00AEFFD48002109F006EFFB48D1 +:101940002521401C09F000EFF84C0121241D200046 +:1019500009F0F6EE0221200009F0FEEEF3488021A6 +:10196000DC3809F0EEEE671E0821380009F0E8EED9 +:10197000ED4C70212C34200009F0E2EE08214720C4 +:1019800009F0EAEEFF201F217A3009F0E6EEFF2091 +:101990001F217B3009F0E0EEFF201F217C3009F091 +:1019A000DCEE5B20D821C00009F0CEEE512009F01A +:1019B000D0EEC106C90E20200143512009F0C4EE2B +:1019C000502009F0C6EEE3210840042101435020D5 +:1019D00009F0BAEE1021380009F0B2EE0221200021 +:1019E00009F0AEEE0821380009F0B6EE80212000A3 +:1019F00009F0A6EE1821380009F0A6EE8021601E3D +:101A0000FDF702FD022009F05CEE7C1E8021200023 +:101A100009F09AEE7D25ED004CE02000FF305130BA +:101A20000004000C382109F06CEE0198FF2109F048 +:101A300068EE0298392109F064EE0398D92109F083 +:101A400060EE04980A2109F05CEE05981F2109F068 +:101A500058EE06980F2109F054EEFF34B3342004F9 +:101A6000000C102109F04CEE0798C92109F048EE4E +:101A70000898FA216383EE8C0100000058CB00C067 +:101A800000040000D7E65E1609F044EE0998002134 +:101A900009F040EE0A98002109F03CEE0B98032172 +:101AA00009F038EE0C98122109F034EE0D980A2155 +:101AB00009F030EE0E983A2109F02CEE0F984021F3 +:101AC0001AE7280009F006EE380009F04CEE00068F +:101AD000F7D5002E17D19A480D3009F044EE1A9927 +:101AE000087097480E3009F03EEE1B9908701A985E +:101AF0000178F120800009F032EE1B9801789048BF +:101B0000103009F02CEE8E48002109F028EE8C48A8 +:101B10000021401C09F022EE0021200009F01EEEF9 +:101B200000201DB0F0BDFFB595B015981E9D0702B1 +:101B30003A00FF32573214924B321392521C1292D7 +:101B4000403210008B383C0011902600FF36E436FE +:101B5000401C37003D3F109057300F90401C12043E +:101B6000120C0E900D970C92129AB6461204120C9B +:101B70000B92139A3E001204120C0A92149A15301A +:101B800012048446781D120C0992071F5F3E32042E +:101B9000120C08923A040D9F120C010007923A04AD +:101BA000120C0004000C7646069232040490120CCB +:101BB000604656390004000C059203900E9800040C +:101BC000000C02900F9806041098360C0004000CCC +:101BD0000190119807040804000C3F0C002B0090A2 +:101BE0007DD00098FF2109F096EDD921380009F049 +:101BF00092ED0198082109F08EED1F21300009F0C7 +:101C00008AED02980F2109F086ED0398C92109F0A9 +:101C100082ED0498DA2109F07EED0598002109F0A3 +:101C20007AED06980A2109F076ED0798362109F039 +:101C300072ED0898402109F06EED280024381C2828 +:101C400009D80998292109F066ED0A98432109F07D +:101C500062ED1C210CE028006438282812D809986D +:101C6000292109F058ED0A98412109F054ED12217B +:101C70000B9809F050ED0C98002109F04CED0798F5 +:101C8000362131E028009538102816D809982921E6 +:101C900009F040ED0A98402109F03CED0B9808212D +:101CA00009F038ED0C98002109F034ED07983A213D +:101CB00009F030ED0498DA2116E02800B7380D2835 +:101CC00002D9ED1F1B2D71D80998292109F022EDA9 +:101CD0000A98442109F01EED0B98252100E006E04A +:101CE00009F018ED0C98002109F014ED5EE02000D9 +:101CF000FF3051300004000C382109F00CED009841 +:101D0000FF2109F008ED0998392109F004EDD921E6 +:101D1000380009F000ED01980A2109F0FCEC1F21C0 +:101D2000300009F0F8EC02980F2109F0F4ECFF34D0 +:101D3000B3342004000C102104E00000520600001F +:101D4000B503000009F0E6EC0398C92109F0E2ECC4 +:101D50000498FA2109F0DEEC0C98002109F0DAEC85 +:101D60000598002109F0D6EC0A98032109F0D2EC7D +:101D70000B98122109F0CEEC06980A2109F0CAEC62 +:101D800007983A2109F0C6EC0898402109F0C2EC06 +:101D9000A1214F2009F0E2ECFF2000217C3009F066 +:101DA000DEECFF20E0217A3009F0D8EC0098002129 +:101DB00009F0B0EC21214F2009F0D0ECFF48502170 +:101DC00009F0CCEC40212D2009F0C8ECFC4C082196 +:101DD000200009F0C4EC0521601C09F0C0EC251DB1 +:101DE0000121280009F0B6EC0221280009F0BEEC20 +:101DF000F3488021DC3809F0AEECE71C08213800FC +:101E000009F0A8ECED4D70212C35280009F0A2EC6A +:101E10000821472009F0AAECFF201F217A3009F0A1 +:101E2000A6ECFF201F217B3009F0A0ECFF201F2132 +:101E30007C3009F09CEC5B20D821C00009F08EECCE +:101E4000512009F090ECC106C90E20200143512019 +:101E500009F084EC502009F086ECE32108400421CD +:101E60000143502009F07AEC1021380009F072EC9F +:101E70000221280009F06EEC0821380009F076EC08 +:101E8000802128004ABFE0F00100000054CF00C0CC +:101E90000004000050B0504409F066EC18213800EE +:101EA00009F066EC8021681EFDF7C2FA022009F0F5 +:101EB0001CECA51C8021280009F05AEC7D26F600B8 +:101EC00002E0300009F010EC380009F056EC000692 +:101ED000F7D5159800280BD1BE48401D09F04CECF1 +:101EE00016990870BB48801D09F046EC17990870D8 +:101EF0000021200009F03CECB6480021401C09F00C +:101F000038EC0021280009F034EC002019B0F0BDB5 +:101F1000F3B587B00600002006900590049003906A +:101F2000FDF7B3FA09F06CEB00240290089A0092D6 +:101F30003300200005AA06A9FFF7B6FB002C1FD12D +:101F4000F1206B46197E800009F012ECA1486B4627 +:101F5000197D103009F00CEC089A00923300200033 +:101F600003AA04A9FFF7E9FD9A486B46197C0930DA +:101F700009F0FEEB97486B46197B0A3009F0F8EB45 +:101F800025022800FF30843007043F0CFF21380071 +:101F900009F0CAEBFF3588352D042D0CFF212800F0 +:101FA00009F0C2EB0A2009F0A0EB7F21380009F00C +:101FB000BCEB7F21280009F0B8EB0A2009F094EB74 +:101FC00025062D0E0222472128000AF03EE90422B0 +:101FD000472128000AF03CE90A2009F086EB641C3E +:101FE000012CA3DB029809F014EB002009B0F0BD2E +:101FF000FFB589B004022100FF31129DA231089182 +:10200000491C079140318C463B3908000A1D4F1E80 +:102010000904090C059161460904090C049107990A +:1020200052380904090C0391089906000904090CA7 +:10203000864602918E30390400047036000C12047A +:1020400037040090120C7046090C06043F0C360C45 +:102050000692002B01917ED0FF21300009F064EB45 +:10206000FF3458342004000CD92109F05EEBC9215B +:10207000380009F05AEB0098002109F056EB01985E +:102080000A2109F052EB280024381C2805D80298B0 +:10209000432109F04AEB1C2108E028006438282875 +:1020A0000ED80298412109F040EB1221039809F063 +:1020B0003CEB0498002109F038EB0598362127E025 +:1020C0002800953810280ED80298402109F02CEBF2 +:1020D0000398082109F028EB0498002109F024EB6B +:1020E00005983A2110E02800B7380D2802D9ED1FD5 +:1020F0001B2D0FD80298442109F016EB03982521D7 +:1021000009F012EB0498002109F00EEB0698DA2191 +:1021100009F00AEBA1214F2009F02AEBFF20002152 +:102120007C3009F026EBFF20E0217A3009F020EB2B +:102130002748502109F01CEB40212D2009F018EB15 +:10214000244C0121200009F014EB8121601C09F0CE +:1021500010EB012100E021E0251D280009F004EB2F +:102160000221280009F00CEB1A488021DC3809F024 +:10217000FCEAE71C1021380009F0F6EA14480221B5 +:102180002C3009F0F2EA022009F0AEEAA51C802109 +:10219000280009F0EEEA7D26F60059E02000FF3025 +:1021A00051300004000C382109F0BEEAFF21300054 +:1021B00009F0BAEA2000FF3057300004000C392142 +:1021C00009F0B2EA2000FF30B0300004000C03E058 +:1021D00052060000B50300001F2109F0A6EA200006 +:1021E000FF30B1300004000C0F2109F09EEA2000FE +:1021F000FF30B3300004000C102109F096EAC92129 +:10220000380009F092EA0698FA2109F08EEA04985B +:10221000002109F08AEA0098002109F086EA029874 +:10222000032109F082EA0398122109F07EEA01985D +:102230000A2109F07AEA05983A2109F076EAFF3492 +:1022400048342004000C402162E7300009F04CEAD9 +:10225000380009F092EA0006F7D5EF20800009F077 +:102260008CEA0A990870F84809F086EA0B99087018 +:102270000021200009F07CEAF3480021C01F09F08A +:1022800078EA0021280009F074EA00200DB0F0BDC2 +:10229000F7B588B05C6F0F930100000050D300C009 +:1022A0000004000096210F02002403940294FDF71D +:1022B000F6F80A9801280BD00A984008012801D1A5 +:1022C000012405E00A9802248008012800D0E41EB9 +:1022D000601C02D101200BB0F0BD08983023584398 +:1022E000DF49002540182101401807902E023000D8 +:1022F000FF3056300004000CFF2109F020EA089856 +:1023000000284CD1042001903000FF3059300004E7 +:102310000327000C0A2109F012EA07982901401846 +:1023200006903000FF3058300004FF36000C57365E +:1023300000243604360C0590300009F0FCE9C10891 +:102340000198C9000143300009F0F8E9059809F047 +:10235000F2E9E3210840B900014309060598090E96 +:1023600009F0ECE9099A0092089B280002AA03A947 +:10237000FFF748FE069A0320001B6B46197B1018D6 +:102380000172197A017301987F1C401E00063F06F6 +:10239000000E3F0E641C042C0190CDDB52E0300097 +:1023A000FF30593004270004000C0821019709F080 +:1023B000C6E9079829014018FF365736002436042D +:1023C000360C0490300009F0B6E980098001F9006C +:1023D000014301980906090E0143300009F0AEE9F6 +:1023E000099A0092089B280002AA03A9FFF70AFE97 +:1023F0000F206B46197B800109F0C4E997486B46B2 +:10240000197A001D09F0BEE90998302806D1002C80 +:1024100004D108A90EC92800FEF7BCFF049A0120C8 +:10242000001B6B46197B10180172197A0173019811 +:102430007F1C401E00063F06000E3F0E641C022C4F +:102440000190BFDB2C06240E02224721200009F058 +:102450000AEF40220521200009F004EF6D1C012D38 +:1024600000DA43E7002036E7F7B500207D4909F0A0 +:10247000AAE93B21062009F0EAEE7A490020491C2E +:1024800009F0A0E975483821943009F078E9C021B5 +:10249000802009F074E90221DD2009F070E9734918 +:1024A000714848626F490020891C09F08CE9704F1F +:1024B0000024802625022800FF30395DCD3000043D +:1024C0003143000C09F03AE96948401C015D2800DD +:1024D000FF30CE3000043143000C09F030E964488D +:1024E000801C015D2800FF30CF3000043143000C18 +:1024F00009F024E95E48FF35C01C015DD035280491 +:102500003143000C09F01AE959484121001D025DD0 +:102510002006000E09F076E8641C012CCADB514944 +:102520000020C91C09F04EE90121C420FDF71DFB64 +:102530000126F64301287DD04A490020091D09F0F3 +:1025400042E9002425062D0E10224721280009F01B +:1025500086EE10224721280009F084EE641C012C2D +:10256000F0DB7D20400109F0CAE83E490020491D0A +:1025700009F028E90221C420FDF7F7FA012861D00B +:1025800038490020891D09F01EE9684607C800F097 +:10259000ACFB34490020C91D09F014E98021B220A8 +:1025A000FDF7E3FA01284DD02E490020083109F04B +:1025B0000AE9002425062D0E01224721280009F0F2 +:1025C0004EEE40220521280009F048EE0122472165 +:1025D000280009F048EE641C012CEBDB21490020A7 +:1025E000093109F0F0E80221B220FDF7BEFA012816 +:1025F00028D01C4900200A3109F0E4E8684607C8E1 +:10260000FEF7F7FD174900200B3109F0DCE80199CE +:102610000098FFF787FC134900200C3109F0D2E83D +:10262000684607C8FFF73EFE0E4900200D3109F04D +:10263000CAE800E006E0FDF754FC0120FDF7B3FA1C +:10264000012801D13000FEBD0020FEBDFF22002880 +:1026500010D1491E0D2922D8002220E0BD03000020 +:102660007854000401F500003100310000A9008019 +:10267000000C00040800012224381C280FD9022273 +:10268000403828280BD903223138102807D90422D2 +:1026900022380D2803D9C91F1B2900D9FF22100693 +:1026A000000E70475FBE5373010000004CD700C09E +:1026B00000040000BCAFA69BF7B50906090E82B066 +:1026C000030000240391FFF7CBFF0600651EFF28DF +:1026D00002D1280005B0F0BD0398049A0106090E46 +:1026E000180009F0EAED7B214902002009F074E8A6 +:1026F00004990020012909D004984008012805D038 +:10270000049902208908012900D02800019008F0CE +:1027100080EF08212A2009F03CE80A2008F0F8EFB1 +:1027200008212A2009F040E80A2008F0F2EF1022E0 +:102730000221002009F0A0ED1221072009F094EDFC +:1027400008F06EEFF949002009F046E8FDF73FFD7B +:1027500008F05EEFFF20CD3008F0F6EFF44BF54DBA +:10276000F54FF649F64A00062DD425022800FF3021 +:10277000C9300004000C08F0E8EFED4908552800C6 +:10278000FF30CA300004000C08F0DEEFE9490855BC +:102790002800FF30CB300004000C08F0D6EFFF35E6 +:1027A000CC3538552804000C08F0CEEFE349085525 +:1027B0002006000E412109F028EAE1490855641C71 +:1027C000012CD2DB2CE025022800FF30CD300004A4 +:1027D000000C08F0BAEFD64908552800FF30CE307B +:1027E0000004000C08F0B0EFD24908552800FF3073 +:1027F000CF300004000C08F0A8EFFF35D035385575 +:102800002804000C08F0A0EFCC4908552006000E63 +:10281000412109F0FAE9CA490855641C012CD2DBB0 +:10282000C2490020491C08F0D8EF00273C022000D4 +:10283000FF308A300004000C08F086EFC14DE855E7 +:10284000E01DFC300004000C08F07EEFED1968700C +:102850002000FF3031300004000C08F076EFA87043 +:102860002000FF3033300004000C08F06EEFE870F9 +:102870002000FF30A5300004000C08F066EF28713E +:1028800008F0CEEE08F050EF0C2008F05EEEA849FC +:10289000487108F04EEF08F0BCEE032009F0B0E9F3 +:1028A0002000FF30ED300004000C08F04EEF68719E +:1028B0002000FF30EE300004000C08F046EFA87155 +:1028C0002000FF30EF300004000C08F03EEFE8710C +:1028D0002000FF30F0300004000C08F036EFFF3429 +:1028E000C13428722004000C08F02EEF6872012019 +:1028F00009F086E97F1C012F98DB8C490020891C98 +:1029000008F06AEF049A0399300000F04DFA874905 +:102910000020C91C08F060EFFCF7ACFD83490020E3 +:10292000091D08F05AEF0320FDF713F97D20C000C0 +:1029300008F0EEEE7D490020491D08F04EEF049AA4 +:1029400003993000FFF79AFD08247F4D801C67062D +:10295000002818D13B21062009F082EC0321062033 +:1029600009F07EEC0021062009F07AEC08F058EE20 +:10297000686AB84368627549086820430860FDF7D3 +:102980009DFCA817A6E6694900200B3108F024EF4A +:1029900030216C4871430C300918019800010E1861 +:1029A000B1796B4808F0F8EE6948F179401C08F0FD +:1029B000F4EE5E4900200C3108F00EEF5B49002078 +:1029C000891D08F00AEF0120FDF7C3F857490020E0 +:1029D000C91D08F002EFFCF75FFD3B21062009F05E +:1029E00040EC0321062009F03CEC0021062009F010 +:1029F00038EC08F016EE4D490020083108F0ECEEF6 +:102A0000686AB843686251490868204308604749CA +:102A10000020093108F0E0EEFDF750FC43490020AA +:102A20000A3108F0DAEE002054E6F7B581B0002450 +:102A300020000225012A07D05008012804D02800D0 +:102A40009208012A00D0601E090600900198090E24 +:102A5000FFF706FE30233B4A584300990C3280189A +:102A6000090186464018844610E0009884420CD044 +:102A700000202101724657180101624655187E1840 +:102A80002ECD401C01282EC6F6DB641C01990220C5 +:102A9000012900D00120A042E7DA002004B0F0BDF7 +:102AA000FEB56E462B480EC800200EC61F210C3EF8 +:102AB000C90208F003F1EDF10100000048DB00C09D +:102AC000000400009C4C0E1192EE09F004EC00286A +:102AD00002D00020C043FEBD6B46198801220020B1 +:102AE000FFF7F4FD214F801C1ED06B461988012290 +:102AF0000020FFF7A4FF01246500715B0422012080 +:102B0000FFF7E4FD801C0FD0715B04220120FFF76A +:102B100096FF641C042CEFDB64000122315B100083 +:102B2000FFF7D4FD801C01D13800FEBD0122315BCE +:102B30001000FFF784FF0E49012008600020FEBD51 +:102B400002F60000000C0004010C0004020C00045A +:102B5000030C0004040C00046C54000400A9008061 +:102B600000A30080BE0300001C7901C0FEFFFFFF30 +:102B70004803000470B51E00049D0024012A09D0FA +:102B80005308012B01D1012404E002249208012AF8 +:102B900000D0E41EFFF76EFD611C01D0FF2801D1BB +:102BA000002070BD30214143A04808182101401881 +:102BB000310140180179697040792870012070BD99 +:102BC000F0B500241F00059E069D012A09D0530878 +:102BD000012B01D1012404E002249208012A00D033 +:102BE000E41EFFF747FD611C01D0FF2801D1002042 +:102BF000F0BD302141438D480818210140183901AA +:102C000040188019017A6970007B28700120F0BD9E +:102C100070B51E00049D0024012A09D05308012B21 +:102C200001D1012404E002249208012A00D0E41E0C +:102C3000FFF720FD611C01D0FF2801D1002070BDED +:102C400030214143794808182101401831014018CA +:102C500081796970C0792870012070BD002800DA80 +:102C60004042704770B5040008F0E8EC0500002C05 +:102C700004D008212A2008F096ED03E008212A203C +:102C800008F09CED280008F0E2EC70BDFF2110B5C3 +:102C900001223D310A500100FF313A2341310B60DE +:102CA000FF23634C49331C500A62624A8A62022243 +:102CB0004A62712212010A633F2252018A63032190 +:102CC0005D4B016000218A004C009A582418227143 +:102CD0000268491C8A42F6DC1321574B41610021EE +:102CE0000C338A004C009A58241822764269491CF9 +:102CF0008A42F6DC2121504B8167002158338A003B +:102D00009C58121860329483826F491C8A42F6DC08 +:102D100010BDF7B586B0050000271600049703978D +:102D2000FCF7D1FB012E09D07008012801D1012741 +:102D300004E00227B008012800D0FF1E781C02D151 +:102D4000012009B0F0BD08F07AEC3021694302900F +:102D5000364800240818390147182006000E0822BA +:102D60004721059009F08EEA079900912B00200079 +:102D700003AA04A90196FDF725FB002C0AD1F12036 +:102D80006B46197C800008F012ED6B46197B2B48CE +:102D900008F00CED20016B46197C38180171197B85 +:102DA000417105980822472109F070EA641C012C42 +:102DB000D3DB029808F04AEC0020C2E7204810B5A7 +:102DC00001680822914301601E48416A520611437E +:102DD0004162416AC20C914341623821062009F0E8 +:102DE0004AEADF21042009F046EAB821412009F02F +:102DF00042EA51200021C00008F0D8EC124800211E +:102E000008F0D4ECA320C021800008F0D0EC0B2007 +:102E10000121C00108F0CAEC1021022009F052EA99 +:102E20000221080009F04EEA002010BD7854000489 +:102E30002020009024090000480D0004C503000074 +:102E400000A3008000A900808B02000070B501255E +:102E5000FF4802240078022803D02500032800D070 +:102E6000002509F03CEA4108012901D1012403E0D1 +:102E70008008012800D0002408F0E0EB0600F548A7 +:102E800009F030EA0C23F3485D43BE302818A40053 +:102E9000005909F028EA300008F0D8EB08F0C2EB3E +:102EA000EC480C3809F0FEE9EA48E23028180059ED +:102EB00009F0F8E908F0BEEB70BD10B508F0B2EB10 +:102EC000E3482430828C1BF40100000044DF00C082 +:102ED000000400001B1A004309F0EEE908F0B4EB0F +:102EE00008F0B6EB0400DF48283009F006EA2000BD +:102EF00008F0B6EB10BDDD4800210160DC4A8260BD +:102F00000A22C260416105218161D6490A78022AFC +:102F100003D140224A70D74902E020224A70D649A4 +:102F20000160D64948681822104348607047CF486E +:102F300010B50168490849000160D048416818226D +:102F4000914341600521CA48C90108F01AEC10BD3F +:102F5000C44B10B518701A631962FFF7CCFFFFF766 +:102F60007FFF10BD10B5FFF7B2FFFFF7E0FF10BD08 +:102F7000F8B50A230F005843C14946180D5C707814 +:102F8000012428E0411B0A004A43042A1AD94100BF +:102F9000491B0A004A43042A14D941000918491B55 +:102FA0000A004A43042A0DD94108491B0A004A4332 +:102FB000042A07D9032108F0A8EA401B0100414375 +:102FC00004290BD8641C2404240C30192038C57F34 +:102FD000305D0A2C02D2315D0029D3D1BC4201D22E +:102FE0000020F8BD0120F8BDF7B5012284B0FF260E +:102FF000039202220292FF22019200221700009205 +:10300000A04C4218550800D10125401A02285BDC6B +:103010009448007801280FD002281BD003283AD109 +:1030200009F06EE9010034390C2921D806980028EE +:103030004AD10126370018E00698002828D004203D +:10304000039005200290322001906420FF24A41DEB +:10305000009023E00698002805D0142001901E203F +:10306000894C00901AE001261E27FF24240223E049 +:10307000643828280FD80698002809D00420039027 +:1030800005200290322001906420804C009005E0E1 +:1030900001261427E9E7069800280DD00399019826 +:1030A0004843029908F030EA001FA8420CDC00985F +:1030B000001D854208D804E0B54205D33F1DBD423E +:1030C00002D8200007B0F0BD6E48FBE7F8B500223B +:1030D000150003784678102401219C46B646075D0A +:1030E000002F0AD1641EFAD107E0B34200D9521C66 +:1030F000491C4318203BDB7F465CA142F5D90121E6 +:103100006346764607E0B34200D26D1C491C431863 +:10311000203BDB7F465CA142F5D9002C13D0642014 +:10312000504366088019210008F0EEE9070064208A +:1031300068432100801908F0E8E9142F01D9142808 +:1031400001D80120F8BD0020F8BDFFB585B00024EE +:1031500025001F00059801944008049041484078DC +:1031600003904FE00A266E430398B95B081A05994D +:103170000290884206D8F0194088039941180598B2 +:10318000814217D204990298814206D3F0194288ED +:1031900003980499101881420CD90598032108F06E +:1031A000B4E9029988422AD3F1194988039A891807 +:1031B000884224D8F0190179069A491E91421ED8F6 +:1031C00040790699401C884219D32D48361802E0F0 +:1031D000641C2404240C305D002802D00A2CF7D390 +:1031E00006E00A2C04D20399059808F08EE93055C0 +:1031F0000E980E99405D401C4855012001906D1CB1 +:103200002D042D0C07988542ACD30198012802D1DA +:10321000002009B0F0BD1B48FBE7F0B500208DB0E1 +:103220000B90FF200A9000200990069005900490D2 +:103230000F48039000200E4F0290019038000024A8 +:1032400000902100220007A806C050210C4808F079 +:1032500034E90B483821503008F02EE9014E30781F +:10326000012815E030BB01C056BC01C080AF008012 +:1032700080DE02C0011000000118000040A500809F +:1032800010570004FFFF00000502000017030000B4 +:1032900019D002280BD003280DD109F032E8010023 +:1032A00034390C290CD80B200590022002E00320B1 +:1032B000059004200490AA4800690025F06104E00C +:1032C00064382828F7D80120F2E7A6480121C06910 +:1032D00089028843F31616230100000040E300C072 +:1032E0000004000015AFAD2AA84208D1002D06D079 +:1032F000A0480069A04AD0618843A8423BD0039906 +:10330000A8010C90085CC00732D003990C984618AD +:10331000B078022801D20220B070B1780B988142B7 +:1033200000D30B910A98814200D80A91F079FF28C6 +:1033300005D0914A5278504307AA00F0C0F803998B +:103340000C98085C810713D5400711D5B07801228D +:103350000100FFF753FE8949884209D0307942289D +:1033600006D2012009900698401C0006000E069027 +:103370006D1C0A2DB3D3824E00200099820009688B +:10338000B1500099401C49688200B1500099401C1E +:10339000403114280091F0D30998002833D00599C2 +:1033A000069888425AD300253868A90070508007D3 +:1033B0001CD57348383805E03919097A0155641C61 +:1033C0002406240E382CF7D36D483838FFF788FED2 +:1033D000002805D168490878022801D0012802D1C7 +:1033E0000120019002E08869401C886140376D1C13 +:1033F0000A2DD9D30198002830D05F490698CA68B1 +:103400001018C86024E00A990B980022FFF7F6FD17 +:103410005A49884222D0584D002407AE305D0499A5 +:10342000884218D320040499000CFFF7ABFD002854 +:103430000BD1052C01D0062C02D12878022804D00B +:10344000072C08D12878032805D12869401C286159 +:103450000120029005E0641C082CDFD302980128AB +:1034600004D145488168491C816003E042494869AC +:10347000401C486102980DB0F0BD70B500253E4C6F +:10348000404E6068401C60603068E16A401A216A02 +:10349000884202D9FFF7CBFE05003649086840088C +:1034A0004000086008680122104308603068E0624C +:1034B000216B002901D028008847280070BDF7B58E +:1034C00082B006002C482D4D00780F002C000128FA +:1034D00019D0022827D003284AD108F01CEF010098 +:1034E00034390C292FD8049A234B00920222390038 +:1034F0003000B633FFF733FE0400A84238D0200076 +:103500000321090231E0049A1B4B00920622390084 +:1035100030003433FFF723FE0400A84228D02000F7 +:10352000FF21491C21E0049A134B00920722390025 +:1035300030007033FFF713FE0400A84218D02000BB +:103540000121490211E06438282811D8049A0A4B55 +:103550000092082239003000CA33FFF700FE040051 +:10356000A84205D0200031210901084305B0F0BD73 +:103570002000FBE780AF008030BB01C0FFFF0000F0 +:103580009857000400A6008010B508F0E0ED494C03 +:1035900002E0607008F0DAED617822788B1A8342DD +:1035A000F7DC89188142F4D3607010BDF8B5FFF7DD +:1035B000EBFF404E3F4D070000241836A000325864 +:1035C000002A02D0A96838009047641C2406240E03 +:1035D000022CF3D308F092E8696128610020A8600A +:1035E000F8BDE3E738B508F08AE8324C6161206144 +:1035F000314808F094EE60680A2107F090EF020469 +:10360000120C00922D4A2C480121002308F08AEE6A +:1036100038BD28480021417001218160704770B594 +:10362000002825D0234B022100241833A2009A58E9 +:10363000824207D0002A02D1022900D12100641C55 +:10364000022CF3DB022C0DD1022911D00C00194DF4 +:1036500089005850A878002801D1FFF7C3FFA87847 +:10366000401CA870022C03DAFFF7D3FFFFF79EFF80 +:1036700070BD70B5002815D00E4CA378002B11D06A +:103680000021220018328D00555985420BD10020AF +:1036900089005B1E50501806000EA07002D106482B +:1036A00008F044EE70BD491C0906090E0229EAD350 +:1036B00070BD000030140004185A00043BE600C03E +:1036C000F8B50500EA788078891A801A002806DBA8 +:1036D00000220C00814208DD221A040005E00024CB +:1036E0000A008142152DDCE3010000003CE700C028 +:1036F00000040000DEB1F2D001DA141A0200AE7943 +:1037000029793000504308F0CCED66430700697911 +:10371000300008F0C6EDE979C019081801D500207D +:1037200002E03F2800DD3F200006000EF8BD70B526 +:1037300000242C4D28702978200008F006EE641C27 +:10374000012CF8DB70BD38B50029264C01D0FF21D3 +:103750002170A168002909D1010022480C30FFF72F +:10376000B9FF2178FF2902D1FFF7E1FF38BD6A4692 +:1037700008F0EEED21788142F8D0FFF7D8FF0098ED +:103780000028F3D008F0E8ED38BD10B5154C00283E +:10379000616807D0002904D11348FFF74AFF0120D0 +:1037A000606010BD0029FCD00F48FFF76CFF0020BF +:1037B000606004002021200008F0C6ED641C012C8C +:1037C000F8DB10BD074840687047002810B505D0E9 +:1037D0000100044808220C3008F062E810BD0149DD +:1037E00088607047501400048BE700C0284B274ABC +:1037F00010B51B6803215156002B01D102215156EF +:103800005278801A48437D21C90008F04AED00062D +:10381000001610BD70B500221C4D083DAA5682420C +:1038200001D1002905D000060016040008F098ED2B +:103830002C7070BD10B50C00FFF7D8FF0006000E0D +:103840002100FFF7E7FF10BD10B5104C083C616880 +:10385000002807D0002904D10E48FFF7EAFE012016 +:10386000606010BD0029FCD00A48FFF70CFF002063 +:10387000606008F076ED10BD002810B504D001009E +:103880000248042208F00CE810BD00006C1400048B +:103890000018000479E800C010B508F066ED08F0E3 +:1038A00068ED10BD0300FB49002000B508F068E892 +:1038B000070507090B0D060F0600F74800BD08684D +:1038C00000BDF64800BDF64800BDF64800BD48689A +:1038D00000BD704710B500F01FFA08F04EED012052 +:1038E00008F04EEDEB498860002010BDF92170B55D +:1038F0000902002007F098EF08F046ED08F048EDC7 +:10390000E949002007F090EFE2488068C26BC16A85 +:10391000E648006808F040EDE3490020491C07F044 +:1039200084EF08F03EEDE0490020891C07F07CEFB1 +:10393000DF4C6068002803D101206060FCF7D7FBF2 +:10394000D9490020C91C07F070EFDA4DFFF7D0F815 +:10395000801C10D1280007F06CEF1021022008F025 +:1039600098ECFCF7C4FB2068401C05282060EDD9CA +:1039700007F062EFEAE7CC490020091D07F054EF99 +:1039800008F012EDC8490020491D07F04EEF08F07D +:1039900010EDC5490020891D07F046EF08F00CED39 +:1039A00008F03AEA08F03CEABF490020C91D07F0D8 +:1039B0003CEFC249C0484861C0484030426880235B +:1039C0001A434260426843061A4342600A69002271 +:1039D0000A61826001680260B3491000083107F093 +:1039E00024EF07F04AEE040008F0EAEC08F0ECECF3 +:1039F00008F0EEEC200007F048EE08F036E8002072 +:103A000008F0EAECA8490020093107F00EEF08F0B1 +:103A1000E8ECA54900200A3107F006EF002070BD50 +:103A200010B5002486B008F0E0EC08F0E2EC08F0F5 +:103A3000E4EC00220E21200008F0E2EC08F0E4ECB7 +:103A400008F0E6EC08F0E8EC08F0EAEC08F0ECEC42 +:103A50009B4801909B4802909B4803909B48049090 +:103A600001A808F0E6EC08F0E8ECF5F788FF08F0AC +:103A7000E8EC08F0EAEC002008F032EB08F0E8ECA3 +:103A8000F6F7EAF908F0E8EC08F0EAEC08F0ECECFC +:103A900008F0EEEC08F0F0EC08F052EB0400012125 +:103AA000080007F0A2EF08F0ECEC00227948009241 +:103AB00000690822012105AB08F0E6EA200006B003 +:103AC00010BD70B50025824E7468002C1AD007F026 +:103AD000D4ED738800210DE08A00A258002A06D098 +:103AE000127B082A03D0102A01D0012504E0491CCA +:103AF0000906090EC362BA270100000038EB00C0B6 +:103B000000040000FE525A5A8B42EFD807F0C6ED6F +:103B1000002D01D008F0B6EA70BDFEB500216A4B59 +:103B200002885D3B9A427ED001231B039A4202D158 +:103B30006D4A11210DE001235B039A4202D16B4AC9 +:103B4000082106E00123DB029A4203D12221072249 +:103B5000120202803E253E2900D80D000188644AE9 +:103B6000C031118001880839018005E0200007F08C +:103B700096ED012007F066EF07F088ED0400594844 +:103B800007F050EF06005748082107F050EF0700F4 +:103B90005448102107F04AEF38188642E6D1554EB6 +:103BA00000223068412107F0A2EC53494D4808F04B +:103BB00076EC4F480188514881808571281F07069F +:103BC0003F0E3A000421002008F06CEC083D2D0661 +:103BD0002D0E2A000021012008F064EC2A000021AB +:103BE000022008F060EC3A000421032008F05AECAF +:103BF0004348424902680092424A3A48424B07F021 +:103C00001AEE012008F052EC0100002008F052ECFE +:103C100008F054EC200007F042ED042001903068D9 +:103C2000422101AA00E001E007F060ECFEBDF8B51A +:103C30000025364F3E683648064008F044EC0090B8 +:103C400038680121090788433860386831490843DA +:103C5000386008F03CEC08F03EEC00241949A00064 +:103C6000143108588047002800D00125641C0B2C13 +:103C7000F4D307F034EC08F032EC2748006807F082 +:103C80003AED2648006807F036ED2548006807F051 +:103C900032ED38681E49C943084030433860009807 +:103CA00008F020EC2800F8BDB0BE01C0000000C044 +:103CB000000202C0002A02C0006003C001F9000037 +:103CC00014C70004481600045C000100BFA8129E3F +:103CD00000A500807C05000480050004E0060004C7 +:103CE0008405000474190004880E0000101D0000F3 +:103CF000B2060004000000042357000080190004ED +:103D00006807000460DA0004803C04C000280080DA +:103D10000030003000300020A002000478050004CC +:103D20000808000412480009000170471148612189 +:103D300010B507F044ED0F4C0C205034A072002059 +:103D4000E0720C48012201781143017001792022B0 +:103D500011430171012008F0CAEB07480088207266 +:103D6000000A6072FF2120001030017010BD0000B9 +:103D70002C1403C0C4E800048020008070B5050046 +:103D800007F044EF04000121102008F0B4EB0021FB +:103D90001F20400128186971017221776177FF485F +:103DA0000160FF480160080070BD70B5040007F0B5 +:103DB0002EEF06000121102008F09CEBF94930009D +:103DC00007F098EBF74A5021CC3AB01807F092EB85 +:103DD00020002021883007F08EEB0025A820055513 +:103DE00020000621AC3007F086EB300007F00DFA1A +:103DF0001F20400120186571057235772000757706 +:103E000008F07CEB002070BD70B504000D000622A8 +:103E1000AC3007F050EDF120800029002018062278 +:103E2000050007F048ED0F2080012018827A290054 +:103E30000220012307F04EEE70BD70B5050002D1DF +:103E4000032007F0FCED002007F0F8ED002802D079 +:103E50008068C00421D4022007F0F0ED07F0B6EE30 +:103E600001281AD0042007F0EAED002815D103201C +:103E700007F0E4ED17E0AC4211D06079032805D1DA +:103E8000002C0CD0A068C00409D506E0022806D199 +:103E9000200007F09CEE012801D1012070BD032114 +:103EA000200007F0D4ED0400E5D170BDFEB506009A +:103EB00007F008EE0500300008F094E801903000AB +:103EC00007F0A4EE0100C031019B0A00897C597201 +:103ED0000F239B01F4182369F327197323696035B5 +:103EE000597B8908890059732369394059732369BB +:103EF000CF2739405973917C4322520180180172B7 +:103F0000019B587A25F5615A0100000034EF00C08A +:103F10000004000079045408A871300008F0FCEA9D +:103F200020690022407B00902069017B009808F006 +:103F30007CEA20690122017B300007F092EE052126 +:103F4000300008F0EEEA1F210220490171180872C2 +:103F5000FEBDF3B589B0070007F0BEED05003800DF +:103F600008F04AE803904B20C00028180E21069064 +:103F70006818079008F0D8EA0590039808AB197AFA +:103F80003A005D3201720092059800220406240E68 +:103F900007982100130008F0CCEA04905420C4557F +:103FA0000E003800059A0799463007F08EEC049809 +:103FB0000090079922003800019608F0BEEA0398A5 +:103FC0002A00030048322900083314006431280015 +:103FD00008F0B6EA5120C0001C222100281807F082 +:103FE00014ED112040012818407E002826D06720BB +:103FF000405D8107714802D100222918CA7200244D +:104000002E18F089C143890703D08008641C012C55 +:10401000F8D3252000010321281807F076EAB07CA8 +:104020008F210840641E6107490E08438008800004 +:10403000801CB074C7203074012070743800C03008 +:104040000269012191730069C021018105213800B5 +:1040500008F066EA069800212030C1730BB0F0BD6D +:10406000F0B5050091B007F0DCED0400280007F082 +:1040700034ED0600202101A807F046EAA0680006FA +:104080001AD407224EA101A807F0BEEC02A8C01C5A +:1040900008F05AEA1120C0012718F9690925C878E3 +:1040A000172814DC020003A8091D401C07F00CECC3 +:1040B000F869C57809350AE0232040012018C58A2F +:1040C0004148AD1F21182A0001A807F0FEEB2D067C +:1040D0002D0E3200F832290001A809AB08F038EAA9 +:1040E000290009AA01A808F038EA290001A808F067 +:1040F00038EA0D216064002089017118C86111B08F +:10410000F0BD8C2101701221417018218170242191 +:10411000C1703021017148214171602181716C2190 +:10412000C171704770B50C000E216018050007F0D2 +:1041300050EB2800FFF7E5FF24480E220068290015 +:10414000401D07F0C2EB0D2060771B492000FF30B7 +:104150000D39E1300183491E4183FE20A0770C20F8 +:10416000E07770BDF1B582B0029807F046EF050028 +:10417000029807F0B2EC0700029807F052ED3C00FD +:10418000FF34CF34019001F036FB002806D00199AE +:1041900020000622C531243007F096EB0298390042 +:1041A000FFF7C0FF132201215201B81801770FE079 +:1041B000C4BE01C0C8BE01C03809000040020000F2 +:1041C0004449524543542D007E040000C0000004C1 +:1041D0002021200007F0FCEAFF4E306807F0C4EC15 +:1041E00002003168200007F070EB2600072020361F +:1041F0003070019801F0FFFA002803D00198C03018 +:10420000807C6872029832782100883007F05CEB7D +:1042100002983178A0300172FF21F031C95D4172FE +:104220000198432252018018697A0172687A6037D6 +:10423000B871FEBDFEB505000026009607F0DCEE65 +:10424000280007F04AEC280007F0EAECE3490400F4 +:104250004118E34A006801278243002A34D10868E4 +:10426000002836D04868002833D08868002830D02D +:10427000C86800282DD0086900282AD0486900287D +:1042800027D0C869002824D0086A002821D0486AAD +:1042900000281ED0886A00281BD0C86A002818D0C1 +:1042A000086B002815D0486B002812D0886B0028B6 +:1042B0000FD0C86B00280CD0086C002809D009204A +:1042C00000022018076306E0200001F094FA00289D +:1042D00001D00120FEBD08F048E908F04AE908F0E5 +:1042E0004CE9C007C00FE074E089002801D1072025 +:1042F000E081A089002800D1A78126776677A06891 +:104300006021432208435201FF21A218517010225C +:1043100090432122AB9D65EC0100000030F300C00A +:1043200000040000BF950B4E9201A218516181213B +:10433000C9008843A06047210120490156626118E5 +:1043400002020872232080012018C2620522026343 +:1043500028008E82FFF785FD0427002802D0A06880 +:104360003843A0602000A030C17D3943C175687911 +:10437000022801D0032801D16E71C9E001206871C3 +:104380001F204001281806722000FF300C21213028 +:10439000C1750F2101838676C17E8022C909C901BA +:1043A00014311143C176FF210177010019201D311D +:1043B000C00207F0A0EA2100FF31192042310003BA +:1043C00007F098EA200001F020FA002811D0280018 +:1043D000FFF747FD002809D1684608F0DCE8D22045 +:1043E000015D0098002208F02AE802E0A068384346 +:1043F000A060200001F009FA00280FD00F218901E8 +:1044000069180969D220005D08732000C530029048 +:1044100008F0C4E802992800FFF70AFD2800883058 +:104420002021019007F07AE828003100A0300172C5 +:10443000060071490198072207F0F0EA23200721BE +:10444000400120183172C08A801F09280BDB6B489D +:1044500069490722201807F05AEA002803D1A0680A +:1044600080210843A0602800FFF7FBFC002803D14F +:10447000280007F0CCEC02E0A0683843A0602800D8 +:10448000FFF77AFE08F08EE800992800FFF76BFD31 +:104490002800FFF7E6FC5A4E002811D13068594930 +:1044A0000843306030685849084030605749086810 +:1044B0002022104308605649486AB843486202E027 +:1044C000A0683843A0600321002008F070E80421B0 +:1044D000012008F06CE82800FFF7C3FC002807D192 +:1044E00008F068E83068012149030843306002E0C1 +:1044F000A0683843A06008F062E808F064E808F0BB +:1045000066E808F068E807F016EB2800FFF7B2FD50 +:104510000020FEBDF8B50C00002507F08CEBE02173 +:10452000095A0200C91E0B041B14E53213E0467839 +:10453000002108E04718BF78A74201D1012504E017 +:10454000491C0904090CB142F4D3981B801E0304D2 +:104550001B14921CB2181000002BE8DC002D01D0B7 +:104560000120F8BD0020F8BDF0B506008FB007F0BF +:104570004EED0500300007F0BAEA0700300007F002 +:104580005AEB0400287A8108890029727079002882 +:104590007DD02048006A002856D13000FFF761FC2A +:1045A000002851D0200001F030F900284CD0A0683C +:1045B00004210843A0600321002007F084EA0028BA +:1045C0000AD10221080007F07EEA002804D1042065 +:1045D00007F048EA002837D00F21890140180E90D3 +:1045E0000069017B3000FFF795FF15E08816000495 +:1045F0006C080000FCAB0300DCF100C07E0400008E +:1046000000A30080465E00004E7EFFFF00A70080F2 +:1046100000A80080184200040028B9D0200001F052 +:10462000F4F8002810D00E98432100694901007B5E +:10463000611808722000C030827E01000E98006967 +:10464000007B824200D088762000C0300D90807EB2 +:10465000002801D10D98807C43214901611808721E +:10466000432040010D992218107A88760F21890184 +:10467000711868720C9109690873107A0E2804D9B0 +:10468000287A80088000401C2872200000E074E036 +:1046900001F0BBF8002804D0697AA868002207F06E +:1046A000CEEE1F2040013018017A00910221717175 +:1046B00001724D200021000130180A000B000EC0CD +:1046C0000160080007F0C6EC2000A0300B90017ECE +:1046D00001221143FB2211400176606C002805D0B5 +:1046E000A068400502D4300001F0B4FA0B98007EB7 +:1046F00080073DD52320400120180A90C08A801FE2 +:104700000306FE481B0E2218801F21183000099254 +:10471000089106F088FA0099042929D0002814D1BC +:10472000F64802231D2D53D3010000002CF700C0D2 +:1047300000040000951BA2D720302218F448093845 +:104740002118300006F020FA0A98099AC08A0899C0 +:10475000801F03061B0E300006F0ABFA12E00100CA +:104760002031380007918A7CFF3013313A3007F04E +:10477000C0E80799887C202804D00D2101208901F8 +:104780007918C8613800FF30CF30029002D1012083 +:104790000FB0F0BD232040012018C08A801F000602 +:1047A000000E0190200001F03AF8002854D04D206E +:1047B000000121183800FF300622F33006910591E0 +:1047C00007F096E82000C53005990622049007F00E +:1047D000A8E8002806D0049807F00AEF06993000F0 +:1047E000FFF730FB0298202107F006E8C848019A3D +:1047F0002118029807F07CE8029C019A20343000CE +:1048000022700299883007F074E82078A036307260 +:10481000002007F032E900280CD0016940693030EF +:10482000814207D107F0A8ED0D998876280008305D +:1048300007F0BAEE07F0D4EE0C98697A0069FF37FA +:1048400001730C98297A006941737D20000141377A +:10485000F861386200209BE7F120800031183800B1 +:10486000FF30F3300622039007F042E80399B6E7E1 +:10487000F8B5040007F044E90700200007F0E4E978 +:1048800005006079002801D10120F8BDA148416AE6 +:10489000042211434162280000F0C1FF002814D017 +:1048A000684607F082EE432040012E18317A0098C6 +:1048B000002207F0CEED0F20800120180269317A26 +:1048C000117300696B46197841731F214901022059 +:1048D0006118087203204D26002136016071A0196D +:1048E0000A000B000EC00160200001F0A2F82800B1 +:1048F00000F095FF002806D03800FF300622A919E5 +:10490000F33006F0F6EFA9192800C53006220E0094 +:10491000050007F006E8002806D0280007F068EE3A +:1049200031002000FFF78EFA04212000F9F755FC32 +:1049300079480460200007F074EA07F052EE002086 +:10494000F8BDFEB50E00170007F07EE97349401868 +:1049500000907178327809023000114320300D1830 +:10496000DD202870681C01906D490422A81C06F007 +:10497000C0EFAD1D00240120A040B84210D838423D +:1049800009D00099A0000958002904D0280007F098 +:1049900034EE45192D1D641C2406240E142CEAD374 +:1049A00001980199281A401E0006000E08707178BF +:1049B0003278090211430818801C3070000A7070A8 +:1049C000FEBD584ABDE7584ABBE7584AB9E7FFB5AC +:1049D00081B0844600249E46029800283FD070464D +:1049E00000283CD0604600781178884237D10A9878 +:1049F0008178437808020A991843C91C4318981C07 +:104A00000025009018E00021604640190FE057187B +:104A1000BE788778BE4207D1501800998078085533 +:104A2000641C2404240C04E0491C0904090C71458D +:104A3000EDDB6D1C2D042D0C02988542E3DB002C70 +:104A40000DD0107818705C700A98A41C8178427898 +:104A500008020A99104300194870000A887005B0CE +:104A6000F0BDFFB583B0160000273C000028029778 +:104A70001DD007F0EAE8050000F0D1FE002818D0AC +:104A8000049807F0BEED019001210698B9408142DB +:104A900002D90C98814270D80C9A069810430842AB +:104AA0001CD00698084006D00C9A0A4203D0002079 +:104AB000C04307B0F0BD01239B02CA1A99420AD035 +:104AC00036DC20297ED013DC04297CD007DC0129C8 +:104AD0007AD0022965D100206070A0706EE00829AC +:104AE00073D010295DD1002870D02C00DB3458E041 +:104AF00040296CD080296BD0FF39491E69D0FF391D +:104B0000491E4ED100286FD001484F30D9E0000037 +:104B10007E04000000A80080AC1600046C080000B1 +:104B2000D4F5310083100000F51F0800BBF90D001B +:104B30003F2189028462911E0100000028FB00C011 +:104B400000040000B5F80A5D531A8A4270D01FDCD9 +:104B5000F849531A8A426CD00CDCF749511A69D0D3 +:104B60000122D202891A26D1002870D02C00FF34ED +:104B7000383420E001214903591A69D001229203F7 +:104B8000891A18D100286FD0EB487530A3E02EE0C9 +:104B900001210904591A68D001225204891A73D0DC +:104BA00007229204891A70D00F225205891A02D165 +:104BB000002800D1346DA07861780002084307D046 +:104BC0000198FB22210007F02AED0299401802907B +:104BD0007F1C3F063F0E07E023E012E009E017E0EC +:104BE0001DE028E02EE036E01B2F00D256E70298A9 +:104BF00069E7002803D0D048D6306CE032E0B468D2 +:104C0000D9E7002802D02C00B434D4E73468D2E7C6 +:104C1000002802D02C00C234CDE7B46BCBE7746817 +:104C2000C9E7002802D09920C00054E0346CC2E7E4 +:104C300038E024E01AE0002802D02C00CB34BAE798 +:104C4000F468B8E7002804D0BB489E3043E014E085 +:104C50001EE0B46AAFE7002802D0B748AB303AE0B4 +:104C6000746BA8E7746CA6E71AE022E0002802D073 +:104C70002C00DF349FE774699DE7B4699BE7002847 +:104C800004D0AD48213026E01AE020E0346A92E7F3 +:104C9000002803D02C00FF3457348CE7F4698AE7EE +:104CA000746A88E7002802D0A348B23013E0F46B9E +:104CB00081E7002802D02C00D3347CE734697AE7FE +:104CC000002802D08520000105E0B46C73E70028BD +:104CD00096D09948DA302C186DE7F8B50C0006002C +:104CE000002506F0BCEF807F9449C20700D00D007C +:104CF000800700D50D432B000C2003430022210028 +:104D000030000092FFF7B7FE0504607821780002BA +:104D10002D0C084340192070000A607006F051FB0A +:104D2000002812D060782178000208432100203149 +:104D300041180022300006F0D3FB61782278090286 +:104D4000114340182070000A60702800F8BDF7B5C4 +:104D500082B000240D000298260006F080EF04992E +:104D6000096D002901D00126760602994A79022AA6 +:104D70000FD1B821095C890700D5D401817F6F4B21 +:104D8000CF0700D01C43890700D51C4301218903AC +:104D90000C436B4923000B43012A13D101008031DE +:104DA000896BA0300191002101760700049A0298D6 +:104DB00029000096FFF75FFE6B461A790104090C83 +:104DC0003A7607E0049A029829000096FFF753FE0E +:104DD0000104090C68782A780002104340182870F2 +:104DE000000A6870080044E670B504000E00150063 +:104DF00007F018ECA01D2A00310006F084ED1A3CE3 +:104E0000E07E4019E076A81D70BD01005120012907 +:104E100000D173207047FFB583B00C0000211F0044 +:104E20000C9E059A029111600028216071D0050046 +:104E300044490422A81C06F07EED0028687805D1BC +:104E4000811C001FAD1D00910290BAE0801C391A30 +:104E50000F043F142D18002F6BDDBCE001952B785B +:104E6000216806F0C0ED1A18400E4912521C384451 +:104E7000573C20252E29334D5C617F7F717F7F7BDE +:104E8000767F35602068042202E075602068102279 +:104E90001043206066E0B56020680122F8E7F56005 +:104EA00020684022F4E7012275612068D202EFE712 +:104EB000B561224A2068EBE70122F5612068920380 +:104EC000E6E70122356220685203E1E701227562BC +:104ED0002068D203DCE7B56220688022D8E7F5625B +:104EE000154A2068D4E7356320680222D0E7FF2204 +:104EF00075632068521CCBE7B56320680822C7E7BA +:104F00000122F56320681204C2E73564206820227C +:104F1000BEE740E00122756420685202B8E7012232 +:104F2000356120685204B3E70122B5642068920419 +:104F3000AEE753E0001C0000000400000010000079 +:104F40000420000061249B430100000024FF00C0F6 +:104F50000004000032AE040F8CF731000122F5642A +:104F6000206852059EE7012235652068520699E7C0 +:104F700075652068182295E70198827843781002B9 +:104F80001843C01C6B461A890004000C90421DD9BE +:104F900005980268206848400243059802A902600B +:104FA000019807F04EEB050001D1002095E501982E +:104FB0006B46281A381A070418893F14002802D0B3 +:104FC000002F00D054E70020009009E06B461989BB +:104FD0002D18081A02906B4618890028F2D1009803 +:104FE000381A07043F14002F02DD002D00D029E7F6 +:104FF000300072E5FEB50500002016001F000029F4 +:105000000290019002D02C00283406E0FB4A0121D6 +:105010002800042307F018EB0400002C01D1002025 +:10502000FEBD68782978000600140843611B401A09 +:105030002030030408981D14582106F08EEA089ABF +:1050400000922B00200001AA02A9FFF7EEFE002E1D +:1050500001D002993160002FE2D001993960FEBD84 +:10506000F0B5AFB00D00349E14001F0006F000EE46 +:105070002A900220207000202900607006220C3146 +:10508000A01D06F04AEC6078217800020843801DDC +:105090002070000A6070380AA770E070300A26712C +:1050A00060716078217800020843001D2070000ABA +:1050B00026000C36032F607001D0042F0DD12A98E2 +:1050C000212189014018406901C6607821780002D9 +:1050D0000843001D2070000A60706878297800027B +:1050E000084303D0A8780009082802D100202FB077 +:1050F000F0BD68782978000600140843082F2B902B +:105100004AD82B98E1220838000401142B916078CA +:1051100023780002184392006B4607C32835B7492D +:10512000042230002B0007F094EA07006078217811 +:1051300000020843C0190004000C010A20706170CD +:105140002B99E12292006B4607C3F019AC49042267 +:105150002B0007F07EEA39180B04617822780902E7 +:10516000114308180104090C080A217060702B9A79 +:105170001B0CF01801920091A24904222B0006F0AA +:1051800073F9617822780902114308180004000CB1 +:10519000010A20706170AAE7984A012128000423BF +:1051A00007F052EA0700964A01212800042307F07D +:1051B0004CEA2E90934A01212800042307F044EA88 +:1051C0002D902B98791B401A2030010460782378A9 +:1051D0000002E1221843920009140292019100900A +:1051E00086493B000422300007F032EA2C906178B7 +:1051F00022780902114308182070000A002F6070FD +:105200007ED0A878000905287AD1002014AA00923F +:10521000020001000890280008ABFFF7EBFE070032 +:105220000898800406D53B00386A2033092205A976 +:1052300007F026E80898400705D538683B000522A6 +:1052400003A907F01EE838680079C00701D01120D3 +:1052500000E006206B4618713598D8720520587109 +:10526000002098713698FFF7DAFD6B469872582047 +:10527000D8711872042058722C980822301801A98D +:10528000FFF7BCFD617822780902114309182170EB +:10529000090A61702C9908180004000C002F2C904A +:1052A0003FD0386800283CD00079C00739D00F20A3 +:1052B00008AB1871386A002804D0C11C0622D81D1A +:1052C00006F02AEB28002030427B070029000BA8BB +:1052D0002E31401C06F020EB787B08AB801D010AC4 +:1052E000587199716178227809021143E122920084 +:1052F000914216D8C01C02062C98120E301800E0FD +:105300000FE009A9FFF77AFD6178227809021143BD +:1053100009182170090A61702C9908180004000C02 +:105320002C902E982378411B2B98E122401A203094 +:105330000104607892000002184309146B4607C309 +:1053400004222C982E492E9B301807F082E92C99C4 +:10535000227809184FC1164101000000200301C046 +:10536000000400009E6BB3920B0461781B0C0902D1 +:10537000114308180004000C010A207061702D9977 +:10538000002916D02D9900904A1B2B99F018891AE4 +:1053900020310A04121401921F492D9B042206F0A9 +:1053A0006DF8617822780902114308182070000A0C +:1053B00060706078217800020843A2E610B506F01C +:1053C00062EC040007F002E907F004E907F006E9DF +:1053D000E189A489091B491C06F0A8EF0819642378 +:1053E000584310BD10B506F04EECC17CC907C90F7B +:1053F000491CC17410BD10B50C0006F044EC002C23 +:1054000004D0052C02D201212030017010BD000013 +:105410008CF73100D4F53100267901C030B5040095 +:1054200000209BB01A901990032006F044EB03AAC9 +:1054300005000092002120001AAA19ABFFF7E4FD35 +:10544000040011D01A98800709D51998800706D54D +:105450002300206B3033042202A906F01CEF206BDE +:10546000C1782800FFF7C7FF1BB030BDE849E94805 +:1054700010B506F07CE8E84909200860E748D22129 +:1054800006F0D8E9E34805F0FCFE0020BEE7F3B5DE +:105490000020B3B0070032901B901A90339806F0AA +:1054A000F2EB1CAA06000092349800211BAA1AAB4A +:1054B000FFF7AAFD040005D02068002802D0206A6A +:1054C000002802D1002035B0F0BD1A99D44D8904CE +:1054D00005D5230020332A0004A906F0DCEE1A9833 +:1054E000400705D5206823002A0002A906F0D2EE65 +:1054F0003500FF355A350FE0216A0622C91C681CA9 +:1055000006F02CEA002801D12800DCE728786D1C81 +:1055100045197F1C3F063F0E707FB842ECD806F05D +:10552000F2E819905921280006F084E92068062243 +:10553000C0786873329F216A7F1CC91C681C06F002 +:10554000F6E93499BF1D06220C31E81D06F0EEE99C +:10555000216ABF1D88784B7802021A432800921FE7 +:1055600009310E3006F0E2E9206ABF1F81784278E7 +:1055700008021043C119FF2029700E2257308255AE +:105580003000FF305130027AC37912021A43491CAD +:105590005118C171090A0172707F401C7077307F09 +:1055A000401C3077199806F0B6E83398052106F0CC +:1055B000EAEFA9E7F3B585B000250F00002946D032 +:1055C000059806F060EB0600FF3051300490017A38 +:1055D000C079090201433878401C814237D3000664 +:1055E000000E3400FF345A3403900CE00622791C7C +:1055F000601C06F0B4E9002808D02078641C041967 +:105600006D1C2D062D0E707FA842EFD806F07AE8AB +:105610000290707F401EA84226DD2178601C0F1882 +:105620001EE03878401C0006000EBC42019004D0F9 +:10563000019A3900200006F07AE9601C06F0F2EDCC +:10564000002807D006F00AEDC16E002901D1002024 +:10565000B6E4C466019824183F186D1C2D062D0E63 +:10566000707F401EA842DCDC0498017AC2790802EF +:1056700003991043401A0499C871000A0872707F98 +:10568000401E7077307F401E3077029806F042E867 +:105690000598052106F076EF012091E4002809D055 +:1056A0000179032906D140790121022800D0002187 +:1056B0000800704700207047002809D001790329AD +:1056C00006D140790121032800D00021080070474D +:1056D0000020704710B50400032006F0ECE905E057 +:1056E0004179A14204D0032106F0ECE90028F7D16A +:1056F0008CE610B50C00032106F0E4E9002802D086 +:105700004179A142F7D181E6F8B506000079032876 +:1057100068D13500C0356868424A476801213800C1 +:10572000042306F09CEF00285CD07A783B781102C5 +:105730001943C21B8C1A203416E0437802000C2156 +:10574000380006F094EF241A364A01213800042369 +:1057500006F084EF002807D1334A012138000423E2 +:1057600006F07CEF0111BCA1010000001C0701C084 +:1057700000040000EB95482A002801D0002CE6D157 +:10578000300006F08AEA0921040009024018006B83 +:10579000002832D1A86800220189009247183A00F7 +:1057A000002130000C2306F070EFA8683A78818859 +:1057B00078780C2300021043081AE0380204120C17 +:1057C00000923A000121300006F05EEFA07F8007D2 +:1057D00012D068684568280006F03AEF2100FF31D2 +:1057E000FB22383106F038EF69782A780902114334 +:1057F00040182870000A6870F8BD39003000FFF7C3 +:105800008AFAF8BD01000020702900D301207047FA +:105810001F2149014018407A022801D10120704718 +:105820000020704770120000605C000400FA000461 +:10583000A0700004FFFFFFFF8CF73100267901C044 +:1058400070B5050006F028EA0400012006F048E9DA +:10585000A168082081431F204001A160032128186E +:10586000017202214172002006F026EC70BD002872 +:1058700003D0092109024018006B7047FFB51000E2 +:1058800085B0FF220D000F9F0E9E1C0091320E2B43 +:1058900001D1E1229200030003A904A806F0F8EE6A +:1058A00000281BD0109A0292039A009605982300B4 +:1058B000103229000197FFF7E7FB0399020A88726B +:1058C0000028CA7204D00499059806F0E6EE02E0BA +:1058D000049806F082E8002009B0F0BD0120FBE743 +:1058E000FEB5160000220192009302923300492275 +:1058F000FFF7C4FFFEBD70B58AB00D0009A806F021 +:105900007CEE280006F0C8E90400687901283BD144 +:105910001F214901022069180872E07F0121002837 +:1059200004D0401E0006000EE07718D1A07C6B4624 +:1059300040084000A074202006229880FF482118CB +:105940000E0004A806F09CE802222800002301A90A +:10595000FFF7C6FF0621300005F012EE02E0A07C42 +:105960000843A0742000FFF782FF002805D0D22052 +:10597000015D0998002206F094ED2800FFF760FF12 +:10598000A06808218843A0600AB070BD1F235B0196 +:10599000C01804220B0000B506F042E80F0E090CF7 +:1059A0000F1215181A1C2126282A2C2E0E0003214E +:1059B000027222E00272427200BD052102721CE0F6 +:1059C0000621027219E00721027216E0082114E094 +:1059D000092112E0417A0129EED00A210DE0417A35 +:1059E0000129E9D00B2108E00C2106E00D2104E09B +:1059F0000E2102E00F2100E01021417200BDF8B538 +:105A00000600684606F0F8ED300006F046E91F2172 +:105A100004004901022071180872002006F04CEBC6 +:105A2000012006F056E84321490160184178FF291A +:105A300003D00098002206F034ED212080012518C3 +:105A4000686A00281BD006F02CEE002700286F6241 +:105A50000FD1A06808218843A06007213000FFF71C +:105A600095FFA06B002802D006F0F2EBA7630020A0 +:105A7000F8BDA06B002802D006F0EAEBA763012076 +:105A8000F8BD10B5040006F008E9002006F028E88B +:105A90001F214901022061180872002006F00CEB5A +:105AA00010BD70B5050006F0F8E804001F21403075 +:105AB0004901027A69180A72427A43236A71827A2A +:105AC0005B01E01802726879022809D12800FFF70B +:105AD000D8FFA068400602D4280006F0E6ED70BDAD +:105AE0000328FCD0A06808229043A06001206871C0 +:105AF00003200872002006F0E0EA70BDF0B50D004A +:105B0000080089B006F0C8E80400C07F0826002815 +:105B100004D0401E0006000EE07723D120206B4603 +:105B200098808648062221180F0004A805F0A8EFE7 +:105B300008222800002301A9FFF7D2FE0621380021 +:105B400005F01EEDA07CF7210840A0742120800103 +:105B500020188089002808D078487438201806F06A +:105B6000A8ED02E0A07C3043A0746879022806D139 +:105B7000E07F0028DEEC844A01000000180B01C021 +:105B800000040000CB76E0A003D12800FFF793FFCC +:105B9000ACE6A068B043A0602800FFF75BFEA5E676 +:105BA00070B50D00080088B006F080E80400684970 +:105BB00020206B466118188006220E0003A805F00D +:105BC0006AEF1922280000236946FFF793FE062199 +:105BD000300005F0E0EC6879022804D12800FFF7D6 +:105BE0006AFF08B070BDA06808218843A060280043 +:105BF000FFF730FEF5E710B50C00080006F056E898 +:105C00002000FFF727FE10BDF0B58BB001A80A9168 +:105C100006F0FCEC0A9806F04AE8817C0400EF20CC +:105C20000140A1744A4920206B4661181881062260 +:105C30000D0005A805F02EEF0A981722322302A9BD +:105C4000FFF758FE0621280005F0A4EC0A98FFF79C +:105C500022FF4321490160184178FF2903D00198B0 +:105C6000002206F028EC3B4E0027B068401CB060D4 +:105C7000212080012518686A002805D006F01AED59 +:105C80006F62F068401CF060A889002804D030489A +:105C90007438201806F016EDE06B002802D006F0EC +:105CA000E2EAE7630022009223002B4A2B480A997C +:105CB0003C3306F0F0EA0BB0F0BD080010B505F07B +:105CC000F6EF816810229143816010BD70B5040029 +:105CD00005F048EF0500200005F0E8EF416C0400F6 +:105CE0001F4B4020425CE01805F034EE616C280048 +:105CF000FF30203120223A3005F02CEE0D229201A7 +:105D00000021A818C161606C232240300178520143 +:105D1000891DA018C18270BD70B5040005F022EF86 +:105D20000600200005F0C2EF416C040023250C485A +:105D30006D0100291FD1072220180AA105F00AEEE3 +:105D40000748C01D201806F046EC01200D210DE08B +:105D5000BC08000094160004A0860100870B01C057 +:105D60007E0400004449524543542D0089017118B6 +:105D7000C8610F2008E04022525C201805F0EAEDCF +:105D8000606C40300078801D6119C88270BD0100D0 +:105D900010B504008F20C0000622C531201805F080 +:105DA000DAEDFF490722FF48201805F0D4ED232142 +:105DB0000D2049016118C88210BD10B505F076EFBD +:105DC00080680007C00F10BD002806D04279012A64 +:105DD00003D11F22520180180172704701790329F3 +:105DE00001D10121F0E7704790420BD3904207D8D0 +:105DF0000F2803D10F2A01D101207047002901D0BB +:105E00000320704702207047FFB591B006001D00C7 +:105E100005F0A8EE0490300005F048EF472104009B +:105E200049014018DF4F1090807D203702281BD198 +:105E300070712000A030017E012211430176C27DE5 +:105E400010231A43C275880768D52879800765D55D +:105E5000D4480622093825184D2000012118F81CC5 +:105E6000201805F078ED3AE0032857D170711398A7 +:105E7000002802D0139909220CE007206B46187104 +:105E800006205871002098710621D81D05F0E6EC17 +:105E9000092201A9E01905F05EEDB820005D800738 +:105EA0003CD52879800739D50F206B4618751A988C +:105EB00005F0A0EE801D6B465875000A987505A880 +:105EC00012990622C01C05F046ED1A9805F092EED4 +:105ED000020007A81A99401C05F03CED05AD737946 +:105EE000E2192900300004F081FE1098807D02281C +:105EF00014D10498616CFF30203120223A3005F033 +:105F00002AEDA878697800020843801F03062A005A +:105F10001B0E0932E91C300004F0FDFE15B0F0BD87 +:105F2000F0B599B0070000201890032005F0D6EDD9 +:105F300004002BD0200005F0BAEE06000500A036C4 +:105F4000F07D400722D5607900281FD002AA009278 +:105F500000221100380018ABFFF76AF8040015D0D2 +:105F6000E06A002812D01899490505D523002C3382 +:105F7000042201A906F0A2E9E06A0821C078C0075E +:105F8000C00F2035B22E201001000000140F01C0F8 +:105F9000000400004C20EEF26870F07D0843F075BC +:105FA00019B0F0BDF3B5002083B00290039805F05E +:105FB00088EE1121C9014618B56947277F4A0400B8 +:105FC0007F01002D15D0E019007A002811D0287922 +:105FD0006B46187168795871232080012018006B76 +:105FE00001020004000E01430291187A2871587AC8 +:105FF000687104990398FEF7E0FCB069002808D0A6 +:10600000E019007A002804D06B4618792871587975 +:10601000687105B0F0BD70B50C0005F052EEE021DE +:10602000095A0300C91E0D042D0CE53313E0427814 +:10603000002108E04618B678A64201D1007870BD6C +:10604000491C0904090C8A42F4D8A81A801E0504C8 +:106050002D0C9B1CD3181800002DE8D1512070BDC9 +:10606000FFB583B01600170002900804000C0190E1 +:106070000698002825D0002923D01FE00198029C13 +:1060800005042D140FE00C9A00927B7861783E0095 +:106090003A002000FEF7D7FC6078A41C291A891E5C +:1060A0000D042D140419002DEDDC70780699BF1C29 +:1060B000091A891E09040914C719069106980028AF +:1060C000DCDC07B0F0BDF7B582B005F0FAED0400F6 +:1060D000039800289DD0039841691320800100296E +:1060E00003D104212018417693E72518687E002803 +:1060F0008FD120000499DF3006F0F2EA049AE02004 +:106100000092005BC01E030403981B144069817851 +:106110004278090609141143C91E09042200091412 +:10612000801DE532FFF79CFF0498817842780802D1 +:106130001043052802D8072068766AE7049AC01E33 +:1061400000210004000C921D13002500C0358E466E +:106150008446019122E05878002114E0039E3769BB +:10616000002F06D05E18B678FF79BE4201D1012615 +:1061700001965E18B678AF7EBE4201D10126B646C2 +:10618000491C0904090C8842E8D86146091A891E8D +:106190000904090C921C821813008C4660460028E2 +:1061A000D9D1019843214901012809D103980069F7 +:1061B000C0790EE0F40C01C07E040000010800006C +:1061C0007046012803D1A87E6118087221E704985F +:1061D000007A61180872A8761BE7F8B50D00FF2158 +:1061E000009105F06EED69782A7804000906280010 +:1061F00009142830114308390B041B140422FF49E9 +:1062000006F072EA232189016118096B1325AD019B +:10621000012907D0052905D0042903D0082901D078 +:10622000022006E047225201A218928A002A03D1D6 +:10623000012061194876F8BD0028F1D04278F04F6E +:10624000801D1EE0437806781B0233431E021B0AA2 +:106250001E433304BB4205D102796B461A70407964 +:10626000587010E0C678837836021E433302360A2F +:106270003343D21A121F1B0412041B0C12141818D9 +:10628000001D002ADED10098009A0002120A104375 +:106290000004000C0528009002D10129C0D1F8BDEE +:1062A0000098012802D10529BAD1F8BD0098042828 +:1062B000FBD10429B4D1F8BDFFB5E9B00024260014 +:1062C0001E9469984D941D941C9405F0FAEC472295 +:1062D0005201042187180500B975787FFD21084017 +:1062E00078776A98002808D050AA00926A9801210D +:1062F0001EAA1DABFEF7A6FE04006C98022807D16B +:106300001E98C107BF487ED0A168C97800297AD1FC +:106310001D98C00605D56068231D04221BA905F041 +:10632000D8EF1D98800306D523002069103308227A +:1063300019A905F0CEEF1D98000506D52300606968 +:106340001433582203A905F0C4EF1D98C00706D0E6 +:106350002300A0680833042202A905F0BAEF132035 +:10636000800128180021689041764D210901012003 +:106370006918C8710020087205F0BAEB209002205D +:1063800005F0B6EB1F90A048006A002826D120989F +:10639000002823D0FAAC004201000000101301C015 +:1063A000000400008AB1B1B420988068C0041FD5F1 +:1063B00001A9684606F0A6E92800DF3037A906F0F3 +:1063C0009AE9019801066998090EFFF72EFE38AB8D +:1063D0009870019818710120D87030AB987F597F60 +:1063E00000020843C01C5877000A987701201C90CF +:1063F0006C98002800D150AC8848006A002827D14A +:106400001F9805F048EC012802D01C9800281FD0E6 +:10641000699805F04CEE060000E0FDE12900D3315B +:1064200011204EAA06F072E9717A6998FFF7FDFD16 +:1064300048AB9877707AD877987E597E00020843E7 +:10644000801C5876000A987601264EA876042061B2 +:10645000582121A805F0B2E86B986C9920300029EA +:10646000679015D16998FEF7E5FF2800C030817F5D +:10647000EA7C4908D2074900D20F114381771C9862 +:10648000002804D037A860610120C002064382E1E1 +:106490006A996998FFF7ABFE6C98012819D1002C16 +:1064A00032D0206C00282BD06069002828D02068CA +:1064B000002825D0E068002822D0606C00281FD07A +:1064C000206A00281CD0206918E0606800281BD1D1 +:1064D00016E06C98022817D1002C15D0206C0028EB +:1064E0000ED0606900280BD0A068002808D0206872 +:1064F000002805D0606C002802D0206A0028E4D172 +:106500006899042048766FE06898407E00286BD137 +:106510002800DF3021A906F0EEE81C9821AA002807 +:10652000009215D030AB987F597F000600140843C5 +:10653000C01E030460691B1481784278090609149F +:106540001143C91E09040914801D38AA921C10E0C9 +:10655000E020405BC01E030460691B148178427810 +:10656000090609141143C91E09042A000914801DD3 +:10657000E532FFF77FFD20AB987959790002084397 +:10658000052801D807211EE06898407E00282BD1FD +:10659000002C12D0606800280FD0DE21495DC07841 +:1065A0004A08C107C90F4008FFF732FC0006000E79 +:1065B0000128B87504D1092105E00420B87501E06F +:1065C000042803D10421689841760DE003280BD1FB +:1065D000616A002908D088784B78020210481A4373 +:1065E000D21C281805F0CAE9787FFD2108402168EF +:1065F000062209798907C90F4900084378770948B5 +:10660000216A2818C91C669005F0B8E9B87D0BE02E +:10661000D4F5310000001210FFFFFFFF1842000404 +:106620007504000007090000032827D107208F21E7 +:106630000901B87706206918C87300200874616CD6 +:10664000FA48C91C0622281805F098E96C98022817 +:1066500014D1606A817843780A020100F3481A4332 +:106660000C30921F0931281805F088E9606A002172 +:10667000827843781002669A18438154002C0FD018 +:10668000616800290CD06C98012809D12800C0301D +:10669000827FC9785208012352008B431A438277C4 +:1066A0006A9867992030C079C8716898407E002840 +:1066B00013D11C98002810D020ABD87A002806D01F +:1066C00043214901187B69180872DA21485521A82D +:1066D00060610120C002064307E0B87D022804D1B2 +:1066E0006998210021AAFFF7F8FC6898407E0028ED +:1066F00002D00120B87525E0B87D022822D12900FA +:10670000D33111204EAA06F002E8432040012D1893 +:10671000297A6998FFF789FC48AB9877287AD87767 +:10672000987E597E00020843801C5876000A9876AD +:106730004EA8206121A860614120C00206436998EB +:10674000FFF7FEFA6C990120C00302290CD1B97D34 +:10675000032901D121A96161B97D4126F6020229EF +:1067600000D00020052121E06C98012810D1B0480C +:106770004D90B87D022809D0B00301D4AD484D90AA +:10678000300515D401214D98C9020FE0AA480EE04A +:106790006C9800280CD1A9484D90300501D4A84828 +:1067A0004D90B003B68EE4F7010000000C1701C055 +:1067B00000040000A03F182D04D44D980121490485 +:1067C00008434D9000964D9B6B9969982200FEF707 +:1067D00098F901046B98090C427803781002184369 +:1067E00040186B990870000A48706C98022803D012 +:1067F0006B996998FFF7EAFB04F029FE002814D092 +:106800006B9841780278080267991043411869989B +:10681000012204F0ABFE6B994A780B781102194300 +:1068200040186B990870000A487000206DB0F0BDE8 +:10683000FFB589B0060088A003C80690129F00200B +:1068400003903000079105F050EAFF21029091314A +:10685000300005F06AEF050003D10020C0430DB001 +:10686000F0BD707902280DD10B9805F00EED0400F3 +:1068700008D0200005F094E9200005F022EC6030FB +:10688000007A03906E612889441904D1744908681C +:10689000401C0860E1E70720C0013018032F089072 +:1068A00006D102990622C53104A805F072E804E079 +:1068B0000898816C406C059104907079012814D17E +:1068C0003B0005F0D6E809060C06060C060C060C83 +:1068D00025000B99062206A805F05AE818E008984A +:1068E000816C406C0791069012E08036022809D135 +:1068F0000398032808D002990622C53104A805F0A0 +:1069000048E801E0032803D1316BF06A0791069053 +:1069100006AA00920B9A28000D2304A905F008EF9F +:10692000C02028810C98092811D126000420203687 +:106930003070092070704B490422B01C05F028E823 +:10694000B7716078217800020843083012E00C9893 +:106950007F2812D126002036307042490322701C55 +:1069600005F016E80920307177716078217800020F +:106970000843C01D2070000A60700A98056000205E +:106980006DE7FEB5070001A805F05EEE380005F0E2 +:10699000ACE904001F2040013D18042638002E7287 +:1069A00005F0CAEE4321490160184178FF2903D060 +:1069B0000198002205F09CEDA06808210843A06022 +:1069C00002202872002005F0A0EB1D4800222E7244 +:1069D0004538009222183800092302A9FFF728FF42 +:1069E0000025ED43002813D1029801890E180021DB +:1069F000320038000B00FFF773FC472040012018DD +:106A0000C0792036F071029805F072EE002801D0AE +:106A10002800FEBDE06A002803D005F042EC00200B +:106A2000E0620022230000920F4A10482C33390004 +:106A300005F04EEC01213800FEF7D0FF0020FEBD2E +:106A400001090000352200003522020035A20000B5 +:106A500074230000742B0000FFFFFFFFFFFF000006 +:106A6000941600048CF73100000E27079B0801C024 +:106A7000F8B5150006000F0005F036E9212189015F +:106A80004018C46B002C12D020796B4618706079C6 +:106A900058702878207168786071102239003000B1 +:106AA000FDF79FFF6B461878207158786071F8BD2C +:106AB000F0B50C000700160099B005F016E9292181 +:106AC000050049014018017BC27AFD4B08021043C2 +:106AD00007D14D2000012818017BC27A080210431B +:106AE00000D0F84B002E06D00122D20302A800925B +:106AF00002000B9601E00022009221003800FEF710 +:106B000000F86178227800040902000C114308188B +:106B10002070000A60702100380004F071FC002829 +:106B200007D0617822780902114308182070000A02 +:106B30006070232080012818C06A18AA010200048E +:106B4000000E0143189121003800FFF791FF04F077 +:106B50007EFC002812D060782178000208432100D2 +:106B6000203141180122380004F000FD61782278BC +:106B70000902114340182070000A607019B0F0BD7E +:106B8000F7B584B005000E0005F0AEE8040002A8D9 +:106B900005F05AED6879022802D00A2005F0B4EA1F +:106BA0004320400120184178FF2903D00298002299 +:106BB00005F09EECC587E7A501000000081B01C099 +:106BC0000004000080DCB0A70722009232002800F9 +:106BD000092303A9FFF736FE0026F643002812D149 +:106BE0000398069A01890F1839002800FFF76AFFF9 +:106BF000472040012018C0792037F871039805F02C +:106C000082ED002805D02800FEF74CFE300007B0CA +:106C1000F0BDA06A002803D005F04CEB0020A06274 +:106C2000002223000092AD4AAD482833290005F028 +:106C30005AEB0020EBE7FFB59BB003201E0018AB1A +:106C40001870062058700C00002011009870062261 +:106C5000D81C02AD18AF04F0A6EEA24A109700921D +:106C60001B982A00210000230B96FDF754FF617842 +:106C700022780902114340182070000A60701FB08A +:106C8000F0BDF7B582B00D001600029805F036E8A9 +:106C900005220400009202982A00092301A9FFF7A7 +:106CA000D1FD0025ED43002814D10198330001895E +:106CB0000F188D48390022180298FFF7BCFF4720B3 +:106CC00040012018C0792037F871019805F01AEDBD +:106CD000002802D0280005B0F0BD00220092230059 +:106CE0007D22824802993433120105F0FCEA00202B +:106CF000F1E7FFB5FFB0C2B00C001E00CA990F202B +:106D00000D00B0AB2C35187568781700801D5875CC +:106D1000000A9875216AB5A8C91C0622C01C04F097 +:106D200042EEB7A86A78A91C401C04F03CEEB5A856 +:106D3000B490B068C00609D5216AB49AC198C91C3C +:106D4000FFF79FFFB07CFB210840B074002C32D0CD +:106D5000E06900282FD0216A00292CD00025790471 +:106D600005D523001C336A1E01A905F0D0EAE769A6 +:106D70005D48FF1C3018C09025E07819C099401C70 +:106D8000062204F028EE002818D1216AB49AC1988E +:106D9000C91CFFF776FFB07CFB210840B074524855 +:106DA000216A801DC91C0622301804F0FCEDB06871 +:106DB00010210843B0607FB046B0F0BD785D6D1C17 +:106DC000401905042D0CE0698178427808021043CF +:106DD000A842D2D2EFE7F7B50020C043A8B00C908C +:106DE0002898160004F08AEF0400002E71D0F007F6 +:106DF00009D03D480622801F211829980C3004F044 +:106E0000EAED002865D112AA00920022299811000B +:106E100011ABFEF735F905001198800406D52B005B +:106E2000286A203309220EA905F070EA700707D5F9 +:106E3000299A0092119A289823002900FFF759FFF8 +:106E4000B00704D528980CA903F072FC05E0FB20DC +:106E500006423ED02448801F2018002D0D9038D0C7 +:106E6000286A002835D00D99C01C062204F0B2ED26 +:106E700000282ED104F05EEF4321490161184870CB +:106E8000A06808210843A060300753D50020009077 +:106E90002898299F40792C37022803D114482018BC +:106EA00000903DE028680079C00739D0286A0028A2 +:106EB00036D00F206B46187178780622801D5871E5 +:106EC000000A9871296AD81DC91C04F06CED7A7803 +:106ED00010E058E004200000642A020040420F0045 +:106EE000A10A01C008800000C20800004B0C01C0CC +:106EF0007504000003A8B91C401C04F054ED01A85F +:106F000000907A7801A90932FF48201804F04AED70 +:106F1000FD4829992C3006221231201804F042ED48 +:106F2000FA48009A21182898FFF734FEA07CF72130 +:106F30000840A074F00706D02898FFF72CFDA07C2D +:106F400040084000A074F00608D52898FEF789FD97 +:106F5000002803D1A07CEF210840A074B00710D511 +:106F60000D9800280DD0212080010C992018416136 +:106F70000D9A28982B0003F0C8FDA07CFD21084045 +:106F8000A07405F0E8EB2BB0F0BDF7B5FFB0DBB0B7 +:106F900006000020BA90B990AF208000002EB89073 +:106FA0007ED0300004F0AAEE04001F20400130180B +:106FB000D990007A022873D1DB98DB9F4178007862 +:106FC0000A02203762BC33CA01000000041F01C05E +:106FD00000040000078ABEF502430121380005F0D5 +:106FE000C8EBBF90DB98417800780A020243322157 +:106FF000380005F0BEEB0500BF98002806D0BF980A +:107000004178801C05F0B8EB002807D1002D51D045 +:107010006978A81C05F0B0EB00284BD0C1AA0092FB +:10702000DB980021BAAAB9ABFEF734F805000BD003 +:10703000E86C002808D02900300003AA04F086F983 +:10704000002837D003A82865DB9970790C31012816 +:10705000D8917FD1002D2DD005F092EBD221095D82 +:10706000884227D1B998000706D52B00A86B383382 +:107070000922BBA905F054E9A86B002807D021001C +:10708000C01C0622C53104F0B0EC002812D1DB98F8 +:10709000A4490622123004F0A8EC00280AD1DB989B +:1070A000A0490622801D04F0A0EC00280AD0062288 +:1070B000210000E084E0DB98C531801D04F094ECF1 +:1070C00000287DD1002004F03CEDB790022004F0B0 +:1070D00038EDB799002903D0B7998968C90403D45A +:1070E00004F0F6ED002808D08F490722B81C04F000 +:1070F0007CEC00280BD0787807E0787800285FD007 +:1071000089490722B81C04F070EC002858D1A07CF3 +:10711000C00711D0824806222118D89804F064ECE8 +:10712000002806D1A07C40084000A0743000FFF782 +:107130003CFCA07CC00707D1A07C800704D5DB996C +:1071400002223000FFF751FED998007A042837D088 +:1071500027E0FFE7022824D1300004F036ED02904A +:1071600005F00EEB432149016118097A884227D1C5 +:107170007878002812D06C490722B81C04F034EC4F +:1071800000280BD002980299FF30E130827BFF315A +:10719000CF31B81C04F028EC002811D14B2000019D +:1071A000B890B899300005F0D4EA60490028C09042 +:1071B00003D0C0980289171805D10868401C0860E0 +:1071C0007FB05EB0F0BDC09832004661F120AC32B5 +:1071D000800031180092D89AC098052305F0BCEAC7 +:1071E000C098C0210181C0985149C1803000C03091 +:1071F0000069C030BE90417800780A020243BE9810 +:107200000100380020302031D79004F0D6EBBE9832 +:1072100041780278080210433870000A002D787017 +:1072200011D144A00068029005E0437802000C21CF +:10723000380005F062EA01213800042302AA05F0B3 +:1072400054EA0028F1D1D998007A022801D0032805 +:107250000AD17079012807D1D798FD21807A40089A +:1072600040000840D7998872002D1FD02000FEF7FB +:107270003AFB002804D02A0039003000FDF7C1FD98 +:1072800004F0F9F8002811D0787839780002084322 +:10729000D79900224118300004F07CF979783A78C7 +:1072A0000902114340183870000A7870C099300004 +:1072B00005F06AEAC09805F030EA002880D1A0689D +:1072C000800600D47CE770790128FBD1002200926F +:1072D00001920292DB99492230000E23FEF70AFB4D +:1072E0006EE7F7B584B000250F00134C04980094A6 +:1072F00004F00EED22004A2301A902A805F004EAD9 +:10730000002836D00198390004001830103403905A +:1073100006220C31A01C04F050EB0FE075040000B5 +:10732000BC0800008C160004F40C01C09416000484 +:10733000EEEE0000506F9A09DC0500000621217076 +:10734000002161707978387809060E140643069991 +:10735000380020300A2905D00B2903D00C2901D090 +:107360000D2900D105000098864203DD029804F043 +:1073700070EB56E403983200290004F01EEB6078AD +:1073800021780002084380192070000A607001987B +:1073900001698172090AC1720299049805F0B8E97D +:1073A0003FE410B504F0B4EC80684007C00F10BD96 +:1073B00070B50C0004F0ACEC050043204001281827 +:1073C000017827200155200005F07EE9FF49FB22C6 +:1073D000691805F029FEBD1401000000002301C05A +:1073E00000040000093F139C7EE9617822780902BD +:1073F000114340182070000A607070BDF3B5002082 +:10740000FFB0D6B00400CF90CE90D5980F0004F016 +:107410008AEC0500D598407902287ED138002030CA +:10742000D4900078042873D1B8AA009201213800C2 +:10743000CFAACEABFDF738FE0600CF9800077FD568 +:10744000CE98000706D53300B06B3833092202A965 +:1074500004F070EFCE98400407D533000022F069A5 +:107460001C33D24305A904F066EFDE48390006223A +:107470000C31281804F0AAEAD49843214901C079B4 +:10748000691808701320800128182F000821FF3781 +:10749000D3905A37417638000938D29031E0B16B39 +:1074A0003819C91C401C062204F0A8EA002822D181 +:1074B0003819417B89071AD5D39900244C760322C9 +:1074C000C01D00920200D5987F23D0A9FFF7CEF906 +:1074D000002835D1D0980189091820318C7105F028 +:1074E00026E900283BD0D3980621417628E0D3999D +:1074F000082048760CE0385D641C00190404D2981A +:10750000240C017AC27908021043A11D8842C6D812 +:10751000B448062200922A1800E016E0D598092304 +:10752000D1A9FFF7A3F900280AD1D1980189091838 +:10753000D598FFF747FFD19805F0F8E800280ED05E +:107540000020C0437FB058B0F0BD032807D1A64843 +:107550000088002803D004F022EBF3F7CFFB0020D3 +:10756000F0E770B505000E0098B004F0DCEB02AA5D +:10757000009204000022012130001300FDF794FD69 +:107580000021C943002805D08068002802D0C078B7 +:10759000002802D0080018B070BD924800220C38B4 +:1075A00021182800FFF70AFB0020F4E7F3B5B3B079 +:1075B000002731971A97339819971897179704F05F +:1075C000B2EB349E050034980C36002801D1319876 +:1075D00008E01BAA0092349801211AAA19ABFDF702 +:1075E00063FD3190349C406D2034002817D108226F +:1075F000009233983200092332A9FFF737F90028A7 +:1076000007D033984079022802D03398FEF75EF90C +:107610009FE0329801890F18E1792720C155432155 +:107620004901E079691808703498349C41780278EF +:1076300008021043083815902834502101A803F09F +:10764000E6EF60786949801C0606360E0422A01C0D +:1076500004F0D4E9002806D1B01F0104090CA01DD4 +:1076600001AA01F0D8FA1598A419801B00281590DA +:1076700001DD002CE5D10598002843D0059818AB12 +:107680000179197040795870212080012818C06B49 +:10769000002804D0017910AB19774079587710ABE6 +:1076A000188C998B08422DD001021690000A0143D4 +:1076B00008042321000C890108280FD0802813D04A +:1076C000FF38401E0822002814D00F231B02C01AC6 +:1076D00014D153026818C362026315E0FF22521CE2 +:1076E00068180521C26203E0802268180421C26282 +:1076F000016309E068180121C262F9E700206918F6 +:10770000086301E0002016903198406D00282BD1CD +:107710003398390016AAFFF7C9F903F0B6FE00281E +:1077200012D07878397800020843390020314118A6 +:107730003398012203F038FF79783A78090211432F +:1077400040183870000A7870329804F0F0EF002882 +:1077500003D00020C04335B0F0BD339840790228F3 +:1077600002D03398FEF7B2F810AB188B0722010253 +:10777000000A01430B04349933981B0CFEF7F6F80A +:107780000020E8E7F7B584B00C000027049804F067 +:10779000CAEA08220500009204982200092303A9DE +:1077A000FFF764F800287ED1039801890C18432064 +:1077B00040012818260000782036F0712920400169 +:1077C0002818017BC27A0802104307D14D2000011E +:1077D0002818017BC27A0802104300D0044F09E048 +:1077E000D60400001468AC2D01000000FC2601C086 +:1077F00000040000F4767144CE0800005C3C0004F4 +:10780000D4F53100042A0200002204983B00210034 +:107810000092FDF79EF96178227809021143401821 +:107820002070000A60700498210003F011FE002807 +:1078300007D0617822780902114308182070000AE5 +:107840006070232080012818C06A00270004000C03 +:1078500008280BD080280BD0FF38401E0AD00F21FB +:107860000902401A08D10120000301E0FF20401C5A +:10787000029002E00820FBE702976B46188902AAF3 +:107880000102000A0143029104982100FFF718F950 +:1078900003F005FE002812D060782178000208432A +:1078A00081190498012203F089FE61782278090287 +:1078B000114340182070000A00E005E06070039852 +:1078C00004F03EEF002802D00020C04365E5049894 +:1078D0001F2149014018007A022804D1FF4840695D +:1078E000FF4904F06AEFA86A002802D004F000ED16 +:1078F000AF62002051E5F3B50020AFB02E90199093 +:1079000018902F9804F018EA02AA0092019030987B +:10791000012119AA18ABFDF7D1FB07003098309C64 +:10792000417800780E0206432834083E50211AA8F8 +:1079300003F076EE6078EB49801C05062D0E0422DC +:10794000A01C04F066E8002806D1A81F0104090C59 +:10795000A01D1AAA01F069F9761B6419002E01DD39 +:10796000002CE7D11E98002805D01E9828AB01797D +:107970001976407958760198806A002804D004F07E +:10798000B8EC01980021816220AB188F0822010217 +:10799000000A01430B0430992F981B0CFDF7F0FFF0 +:1079A000002F08D0B868002805D0C078012802D17F +:1079B000022031B0F0BD0020FBE7F3B58DB006002A +:1079C00004F0BAE904007079012802D000200FB059 +:1079D000F0BD0E980C300C901F2040013518287A0D +:1079E000022804D1C04930006A4602F018FA432048 +:1079F000400127187878FF2808D002A901A804F0D0 +:107A0000B4EE79780198002204F09AED0E990022E4 +:107A100030000323FDF7B4FF012200920C9A3000DE +:107A200009230BA9FEF72CFF00281CD10B98018914 +:107A30000F1802202872002004F08EEB0E993A00F5 +:107A400030000123FEF774FC00280CD113208001C4 +:107A50002718787E002801D1042028720B9804F0A2 +:107A600070EE002802D00020C043B0E7287A042836 +:107A70000ED020206B4698810C99062206A803F0B0 +:107A8000B0EF7B7E0922300003A9FDF779FFEAE71A +:107A9000E06A002803D004F02CEC0020E062002211 +:107AA00023000092914A92482C33310004F038ECC4 +:107AB0008CE7F3B59BB0060000270397029704F00C +:107AC0003CE905AA040000921C98012103AA02AB1C +:107AD000FDF7F4FA05007079012816D11F20400146 +:107AE0003018007A022801D004280ED10A21300073 +:107AF00001AA02F094F9002807D06B4618790328F0 +:107B000003D17648143004F05CEEE06A002802D01D +:107B100004F0EEEBE7620398C00711D00298C007AB +:107B200006D02B00A8680833042204A904F00CEC4A +:107B3000A868C078002803D00020C0431DB0F0BD65 +:107B40000398800307D5286943214901C07961184A +:107B50000872DA210855472040012018807D03284B +:107B600016D1696A88784B7802021A43901F202840 +:107B70000ED86048921F0931201803F032EF686A6E +:107B80008178427808025B491043891F6118475485 +:107B9000132080012018407E00280DD1554822185E +:107BA0005448009214382318401D22185148801F51 +:107BB00021183000FEF76EF9707903280BD1696A3D +:107BC000002908D088784B7802024B481A43D21C0F +:107BD000201803F006EF0124022570792300022803 +:107BE00003D02B00032800D000231C990222300070 +:107BF000FDF7C6FEE11BB0D701000000F82A01C066 +:107C000000040000D495D9CE0128F0D0012003F063 +:107C1000BAEF00209CE710B5040004F098E81F219B +:107C2000490161180A7A010040310A7262794A7288 +:107C30006279022A01D0032A04D14322520180181A +:107C4000007A01E0C030807C887210BDF3B59BB033 +:107C5000002607000396029604F078E805AA0400BF +:107C600000921C98012102AA03ABFDF731FA05002E +:107C7000E06A002802D004F046EBE66204213800F6 +:107C8000FDF7DEFE0026F643002D5BD0A868002835 +:107C900058D0C078012807D11C9901223800002350 +:107CA000FDF778FE022053E7002801D0012244E0CE +:107CB0001C9802220C30009202003800092304A90B +:107CC000FEF7E8FD00283DD10498022301890A1837 +:107CD0001C993800FEF736FB0028E7D1049804F021 +:107CE0003AED13218901002814D0062061180FE015 +:107CF000D06E000420A10700D4F53100C0C62D00CD +:107D0000000E27079B0801C00D0900007504000044 +:107D1000487617E06418607E002804D11F210420F3 +:107D20004901791808721C99012238000323FDF7D4 +:107D300031FE607E002807D002221C993800002303 +:107D4000FDF728FE300003E705213800FDF778FE37 +:107D50000020FDE6F8B504000E000025072A12D128 +:107D6000607901280AD11F2040012018007A0228DA +:107D700004D1FC4920006A4602F05BF83100200083 +:107D8000FFF728FC04E031002000FFF7BEFD0500EE +:107D90002800F8BDF0B50D0089B003F0D8EF04005D +:107DA000280004F0B0EC1321070089016018EE49A7 +:107DB00000264676FB226118380004F0A8EC050482 +:107DC000A07F2D0C80070BD40C206B46187102206D +:107DD000587100209871DE71187A0020187209E03D +:107DE000FF203930025B2100FF31D21C383101A85D +:107DF00003F000EEFB22380001A904F088EC4019E2 +:107E00000004000C09B0F0BDFFB583B00C000026E3 +:107E100017000D9D039803F09AEF2A06120E3B06F9 +:107E20000092019003981B0E220002A9FEF732FD7A +:107E3000771E00281DD1029801890C18002D08D04A +:107E4000012D18D0022D04D103982100FFF7A2FFC5 +:107E5000060006982621085560782178000208431C +:107E600080192070000A6070029804F074EC0028F9 +:107E700000D0380034E5200004F044EC0199FB22E6 +:107E80004B3104F044EC0604360CE2E7F3B585B060 +:107E90000D00059803F05AEF040028000C30039001 +:107EA000143086794079012844D127356878022832 +:107EB0003CD9A07FC10702D040084000A077A07F36 +:107EC000800723D52000FF30012121308176018BEE +:107ED000AD1D0D310183FF20FF214A3001552800DF +:107EE0000A30049003F0CEED0700A81D03F0CAEDA0 +:107EF0002100FF31381A4B3103F088ED049803F06C +:107F0000C2ED2100FF314F3103F080ED0921022243 +:107F1000009101920399059833007F22FFF774FFC7 +:107F2000A068FF21491C0843A06003E00020FF3443 +:107F30002134A0760020D3E4F7B586B005000E000A +:107F4000002805D1032003F01AEE050033D002E02B +:107F5000287903282FD1280003F0F8EE0400FDF75C +:107F6000E0FC00286AD06879022827D13000002779 +:107F70000C3004F0BCE90028029009D0029803F00C +:107F800042EE029804F0CEE86030077A032F09D061 +:107F900020000622B11DC53003F044ED00280AD1AF +:107FA000032F0BD14D2000010622B11D201803F034 +:107FB0003AED002802D00020C04323E703A804F0D4 +:107FC00076EB68692969483008278142A06836D174 +:107FD00008210843A060280004F0E0EB1F214901BC +:107FE00002206F183872A868C00401D5012000E093 +:107FF000002004F0BCE803F0C6EE432149016518F7 +:1080000000227D214C764E4101000000F42E01C07B +:108010000004000053C3D79C68705948D24309013B +:10802000032304F0E6EB0028206408D1A0680821AF +:108030008843A060FF206870032038727CE00189CB +:108040007D224018D200310003F0DEEC04F0D4EBC6 +:1080500021E100070CD5206C002809D001894618C1 +:10806000002020642020805D042804D07F287DD05B +:10807000089809287BD12620835D03F036ED090698 +:1080800014618B92F19FA7AD600031002800FFF7CB +:10809000A8FCA168B943401CA160D9D11F210320CD +:1080A0004901691847E01F20400128180590007A0F +:1080B0000428CDD131002800FFF7D2FD0600A068CA +:1080C000B843022EA06032D143214901FF2061183C +:1080D0004870059902200872002004F052E8E06A16 +:1080E000002803D004F018E90020E0620021254AAE +:1080F00028000B0001F0ACFD234F2800390002AA34 +:1081000001F0A1FE002806D06B46187A032805D19D +:108110001E4804F06AEB280001F0A3FD00222300B2 +:1081200000921B482C333A00290004F00EE9761C1B +:108130008ED1059903200872002004F022E8AAE0FD +:108140001F20400128180490007A0428F7D131003C +:108150002800FFF7C2FC0500A068B843A060681CB7 +:1081600008D1049903200872002001E080E078E043 +:1081700004F006E828004FE6C0C62D00D604000033 +:1081800074190004C0D40100000E2707E46E000437 +:108190009B0801C0002231002800032303F0C2F82D +:1081A00010E02120800120184269310028000423BA +:1081B00003F0B8F8A068B843A0606CE03100280074 +:1081C000FFF7EDF9A168B943A16025E60722310068 +:1081D0002800FFF7C9FD1FE6082231002800FFF73D +:1081E000C3FD0600022830D143204001FF212018A2 +:1081F00041701F204001022128180172002003F065 +:10820000C0EFA06A002803D004F086E80020A06236 +:10821000280001F0BEFD012003F0BEEC0022230087 +:1082200028330092FF4A2900FF4804F08EE868795D +:108230000121022800D10021FC4A2800002301F07E +:1082400007FD280001F00DFD08E06879022805D03F +:10825000A068B843A0602800FDF756FB3000DBE5BE +:1082600010E008987F2816D12020805D7F2812D149 +:108270002520805D00280ED0012808D0022806D0D5 +:10828000032808D131002800FFF7D6F8C4E53100F3 +:108290002800FFF705FE0020BEE5F8B507000E0038 +:1082A00003F05EED0500B07800090D2837D11F20DE +:1082B00040013818017A042931D003292FD0340025 +:1082C00020342178042903D07F292BD17F2220E07C +:1082D0006378093B03F008EC051C040F160F260019 +:1082E0007979012907D1417A012904D0022101724B +:1082F000002003F046EFE86B002803D004F00CE800 +:108300000020E863627831003800FFF712F809E0D6 +:10831000092231003800FFF719FE401C02D100206D +:10832000C043F8BD0020F8BD70B50E000500203632 +:1083300030780C0004280AD0092808D07F2804D1FE +:108340007F2221002800FFF701FE012070BD0922D5 +:1083500021002800FFF7FAFD70780A2805D00B28C5 +:1083600003D00C2801D00D28EFD121002800FFF701 +:1083700094FFEAE7F7B5080020300F0085794078D0 +:10838000012609288AB06CD1202102A803F05CE9FB +:108390000A9803F0E6EC040020206B4618810622C0 +:1083A000B91D05A803F030EB2B00002703F09CEB70 +:1083B000090606064A4A2D5934345900002D01D1C8 +:1083C000122204E0012D01D1092200E00A220A98BC +:1083D000322302A9FDF7E8FAE06A002802D003F090 +:1083E0009CEFE7620022009223008E4A90480A998F +:1083F0002C3303F0AAEF472040012018807D03288A +:108400002FD12000FDF71DFD2BE00A9801214171BD +:108410000A98FDF7613555EF01000000F03201C008 +:1084200000040000955288DA79FA24E01522072D1D +:1084300000D016220A98322302A9FDF7BFFA082DB0 +:1084400019D12120800120188089002813D07E486E +:10845000201804F09CE90EE0206B002802D003F005 +:1084600066EF2763002200922300754A77480A9935 +:10847000303303F074EF30000DB0F0BD70B505007F +:108480000C0003F078EC002C0ED0012C0CD0022C48 +:108490000AD0032C08D113229201062180184176BC +:1084A00000212800FEF7D2FF70BDF0B50D000700D7 +:1084B000203568780E00092889B065D1202101A8EF +:1084C00003F0CCE8380003F056EC040020206B46A3 +:1084D00098800622B11D04A803F0A0EAAD792B0014 +:1084E00003F00CEB09060606525252525353520047 +:1084F000002D01D1122202E0012D05D10922380000 +:10850000002301A9FDF75AFA28001F21132549016C +:10851000AD017E1802282ED1E06A002803D003F0B6 +:1085200006EF0020E0626019407E00280ED1464828 +:10853000C530221844480092B1302318401D22183B +:108540004148BF3021183800FDF7C2FC787901237B +:10855000022803D00223032800D00023022238007F +:1085600001A9FDF72BFA307A022801D0042802D1A4 +:10857000380001F018FC6019407E002804D0032068 +:108580003072002003F006EE50E4072D01D11522D1 +:1085900000E01622310038000023FDF70FFA2120F9 +:1085A00080012618B089284F002802D0E01904F075 +:1085B000EEE8082DE8D1B0890028E5D0E01904F0F4 +:1085C000E6E833E4F7B588B0060021480F0003C899 +:1085D00005900020039002903000069103F0CAEB52 +:1085E0000400F879B97905020D4302D00020B87172 +:1085F000F8710A98083708380A90134807977430BA +:1086000007990622201803F00AEABF1D002D0997DA +:1086100003D043204001201845700998FF210490A1 +:108620009131300004F0C6E8070003D07E6138893C +:10863000C51911D101200DE0000E2707310B01C033 +:10864000C0D401009B0801C048080000915601C039 +:10865000AC1901C00BB0F0BD7079022808D1300010 +:108660008030016BC06A059001200691039018E0EC +:10867000032802D10799062210E0012811D104989D +:1086800040780A28F6D00B2803D00C2801D00D28FA +:1086900007D1012006222100C531039005A803F06F +:1086A000BEE9F120800005AA31180092079A38002F +:1086B0000D2304F084E8049840780A2805D00B289C +:1086C00006D00C2801D00D2859D12800203003E015 +:1086D00028002030092102910A9A0999921F03F07B +:1086E0009EE968782978000208430A99891F401892 +:1086F0002870000A68700398002823D0380004F01E +:108700003EE800283BD102993000FDF7ADF97079C1 +:10871000012815D11F2040013018407A01280FD0C0 +:10872000E06B002803D003F002EE0020E06300229B +:1087300023000092744A75483C33310003F00EEE7A +:10874000002078E72120800120184762A07C1021BA +:108750000843A074A06B002803D003F0E8ED0020CC +:10876000A063002223000092694A6A48383331002E +:1087700003F0F4ED68494868401C4860E0E70220D7 +:1087800059E7F8B506000120009030897569801915 +:10879000046F0F00002D5ED0287903285BD12800DC +:1087A00003F0E8EA0200FDF7D0F8002853D0002FCC +:1087B0003FD02600203630787F280CD170790328EE +:1087C00049D1132189010020511848762100280041 +:1087D000FEF73CFE3FE004283DD1687900283AD0FE +:1087E00071780B2915D1012813D1707931790002E4 +:1087F00008430ED11F2040012818407A012802D0DA +:108800002800FDF78BF81822210028000023FDF72F +:10881000D5F8200041490322223003F018E900284E +:1088200019D170799ABB094001000000EC3601C0F3 +:1088300000040000BFDC2143092816D121002800D4 +:10884000FFF73DFE11E0270020373878042805D1D6 +:10885000320021002800FFF7A1FD009038787F2822 +:1088600003D179792800FFF713FE0098F8BD00289E +:1088700010B505D00079002802D10800FDF7BEFB35 +:1088800010BDFFB583B004001D0000280C9E20D051 +:10889000207903281FD1607900281AD0200003F026 +:1088A00074EA0700FDF75BF8002812D0049803F083 +:1088B000BCEF00280DD00020694661C1492204990F +:1088C00020000E23FDF752F8BA7C04992000FEF731 +:1088D000C8FA07B0F0BD0028FBD10498FDF78EFB65 +:1088E000F7E710B5040016D02079032813D1200033 +:1088F00003F04AEA1F2149016118097A012908D0C9 +:10890000032906D06179032903D0FDF728F8002850 +:1089100001D1012010BD002010BD0000A086010083 +:10892000870B01C0400D0300990B01C09416000491 +:108930008CF7310070B500240220FCF74DFF0320B6 +:10894000FCF74AFF032003F038E9002827D0002075 +:1089500003F05AE805000221032003F05EE9002835 +:1089600005D10321080003F058E9002800D00124B4 +:108970002879002802D1002C13D00CE0032810D154 +:10898000002003F01AE9002807D0112149014018FE +:10899000007A042801D1012070BD002C01D00020F4 +:1089A00070BDF948006870BDF7B50D00160000985D +:1089B00003F0EAE92D1D361F04003604360C8EE064 +:1089C000A8786978000208432B78C01C07043F0C84 +:1089D0009B1E03F09EE8101C0942612357665C80D1 +:1089E00038880E80526B71803A0029002000C23016 +:1089F00011E0E6483A002900201803F01AE8009830 +:108A00004079012861D10098FBF7DEFB5DE0200092 +:108A10003A002900B43003F00CE856E020003A0098 +:108A20002900CB3003F004E820003A002900D330BD +:108A300002F0FEEF20680121490408430421206070 +:108A4000D020015541E020003A002900DF3002F03B +:108A5000F0EF0421E420015537E020003A0029001E +:108A6000DB3002F0E6EF2000C030827FE978D207E9 +:108A7000D20F49000A43827727E0C4483A00290010 +:108A8000543017E0C1483A0029007D3012E0BF4859 +:108A90003A002900AC300DE03A0029009920C000CE +:108AA00008E0BA483A0029008A3003E0B7483A00A3 +:108AB000290091302018AEE720003A002900D33079 +:108AC00002F0B6EF0420D82108552A780120216849 +:108AD000904001432160ED19F01B0604360C002E76 +:108AE00000D06DE7FEBD20003A002900FF3038308D +:108AF00091E7F7B588B00D0003F046E90600AD1D1B +:108B0000A3490422280002F094EF2D1D042400271D +:108B100001203168B840014277D0BB1E02F0F8EF67 +:108B20001012093DA31B60A3A3A32D911FA351768F +:108B300086A331000922C231280002F07AEF0935FC +:108B400009347BE031000522B431280002F070EFD7 +:108B50006D1D641D72E008223100CB3169E02120D7 +:108B600040013018079042888848D21C31182800EC +:108B700002F05EEF0798408856E03000E030069043 +:108B80000288411ED21C280002F052EF069800888D +:108B90004AE04519E41C001963E03000C03005903C +:108BA000807F3100400801900598DB31828B2800DE +:108BB000D21C02F03EEF0198ED1C28700598808BC6 +:108BC000E7E72320400130180490C28A6F48D21C86 +:108BD00054303118280002F02CEF0498C08A23E0AA +:108BE0004920000130180390017CC07B0A02024337 +:108BF0006648D21C7D303118280002F01AEF039825 +:108C0000017CC27B080210430EE02CE0132080019F +:108C100030180290C2895D48D21CAC30311828004F +:108C200002F006EF0298C089ED1CB2E7082231007D +:108C3000D3312800D97AB02901000000E83A01C0F8 +:108C4000000400009F3F89C902F0FCEE083508349B +:108C50002404240C11E0FF203930805B3100C01C5B +:108C60000204120CFF3138312800019202F0EAEEC2 +:108C700001982D1820180404240C7F1C3F063F0E79 +:108C80001B2F00D24EE70A9804800BB0F0BDF8B558 +:108C900004000F00150000265021100002F0F2EC35 +:108CA00066E041780278090211430A02090A0A4380 +:108CB0003D4B1204120CD11A9A4231D019DC3B4BB5 +:108CC000D11A9A4238D00ADC3949511830D00629D5 +:108CD00028D007292ED00F293BD12C6339E00F294A +:108CE0002CD011292ED012292AD0282931D1AC60BC +:108CF0002FE00C2918D009DC012917D0062925D02E +:108D0000072921D0092924D16C6022E00E291FD027 +:108D10000F2903D019291CD1EC611AE02C6018E04E +:108D2000EC6016E02C6114E06C6112E02C6210E043 +:108D30006C620EE0AC620CE0EC620AE06C6308E08E +:108D4000AC6306E0EC6304E02C6402E0AC6400E099 +:108D5000EC64C1788278080210430102000A0143E2 +:108D60000804000C3118091D0E04360C2418241DAB +:108D70002000BE4295D3F8BD1CB50C000A7D083416 +:108D8000002A09D0012A07D1E17A00910192637B80 +:108D9000A2792100FFF760F800201CBDA81600048E +:108DA000210400008CF731003B100000121000007D +:108DB000FEEFFFFFF7B5002084B016000C000E3464 +:108DC000029001903EE0607821780002084327007D +:108DD000FF380B380AD07C2801D07D2828D1207A92 +:108DE0000290E079FCF790FD019021E0049802F0F8 +:108DF000D6EF2121050089014018039080890028C1 +:108E000003D0FE48281803F0D6ECFC48281803F0DD +:108E10001AEDE178A0780A0202430398211D8068C8 +:108E200002F010EEE178A2780802039910438881DD +:108E3000F878B97800020843241D0419301A001F7D +:108E400006043614002EBEDC0298002803D00199D7 +:108E5000029803F0FCEC07B0F0BDFEB50D00060073 +:108E6000C87889780002084308380190300002F081 +:108E700096EF290008310B7B0293472304005B0126 +:108E80004A7BC0180127C271E77701980D000E38A0 +:108E9000020412143000FFF78DFFD848029B032113 +:108EA000743002F040EE09069B9B359B4B9B578D1F +:108EB0009B007279012A40D1A27C20183A43A27407 +:108EC000E1770622290002F0BEEDE06A002803D017 +:108ED00003F040EA0020E062002223000092C84A2A +:108EE000C8482C33310003F04EEAC74C30002760ED +:108EF00000F0ADFF012002F06EEE0820276003F0C5 +:108F00005EE9012002F066EE012002F06CEE11E055 +:108F1000BA4806228C302900201802F094EDA07C7B +:108F200002210843A0743000FEF79DFE70790228EC +:108F300000D077713000FCF705FD4FE0AF48062206 +:108F40007A302900201802F07EEDA07C042108432D +:108F5000A07443E0A27C08231A43A274E17706229E +:108F60002900201802F06EED3000FEF77CFEA64DC1 +:108F700030002F6000F06BFF012002F02CEE082083 +:108F80002F6003F01CE9012002F024EEA06A002803 +:108F900003D003F0E0E90020A06200222300009249 +:108FA0009A4A9B482833310003F0ECE902F036EC92 +:108FB00004003000FCF7C6FC200002F038EC0DE0A5 +:108FC00006222900201802F03EED6A7B29003000BD +:108FD000FEF714FC8F490868401C08600020FEBDA5 +:108FE00010B58A7B042A02D1FFF737FF03E07F2AFE +:108FF00001D1FFF7C1FE002010BDFFB508008FB002 +:109000000D002321140089014D2347221B016918FB +:10901000FF305201EB180B913830A9180D93212322 +:109020000E900A919B0129001320EB18A0312F000C +:1090300000268001C0372818089012980C930991D7 +:10904000B9E2049436A90C7901000000E43E01C0A5 +:10905000000400001869879B6078217803020B43A5 +:10906000FF218F31581A8B427AD00BDCFF3B7D3BBE +:1090700002F062ED0D9CA7BFEBF2F8E7E6E5E4E352 +:10908000E2E19200162870D042DC13286AD02FDC6F +:10909000012868D0022867D012287DD16348292191 +:1090A000281802F05EEC232040010F21281841759A +:1090B000E178A27809021143C1828F20C000062204 +:1090C000211D281802F0C8EC584820210930281822 +:1090D000059002F046ECE078A17802020A432100F4 +:1090E0000598921F0A3102F0B8EC0120C0035BE042 +:1090F000142872D01528D0D10899002088750899B5 +:10910000207948760D9901200022C8710A724BE03F +:1091100019287BD013DC17283FD01828BDD10C9913 +:10912000122008740C992079C87485210901012046 +:1091300069184870002088700120800434E03528C8 +:1091400065D03628A9D13948E378A2783849B630B5 +:109150001B02281813438B426CD90170090A74E270 +:10916000DBE102E03AE0EAE11EE23048E278A3788F +:109170005438120228181A434270120A82700D22C3 +:109180000270E278A37812021A43211DC01C02F07B +:1091900064EC0120400307E0BEE108992079C87221 +:1091A000089960790873E5E0064303E26079217964 +:1091B00000020843A881E079A17900020843E88110 +:1091C000F8E1A8682279410860794900000210435B +:1091D000C007C00F0143A960ECE1FCE10320B870B7 +:1091E0000620F870002038710622211D2800C530A5 +:1091F0002FE028000622211DBC3002F02EEC099938 +:1092000003204876099906204883D3E1EEE101E284 +:1092100048080000000E27079B0801C0A81600049C +:1092200040420F00A10A01C0A4160004750400000A +:109230001903000007E2E0E0C5E09DE07EE058E0B1 +:1092400026E01AE00EE007E0FFE728000822211DD3 +:10925000143002F002ECADE160792179000208439C +:109260002882A7E10420F876B87F2179C007C00FD3 +:1092700049000843B877102096E70999022008753D +:1092800009982179C17509986179017604208BE7E5 +:109290000E981F21039002F064EB2079002884D0FF +:1092A00003990C20087003990F20487000208870E3 +:1092B000A1796279080203991043C8700398039951 +:1092C0000079002008710399E07948712000083086 +:1092D00002F00AEC03998002891D02F0CAEB20001B +:1092E0000C3002F002EC039980020A3102F0C0EB6C +:1092F00060E10E981F21039002F032EB20794106C5 +:10930000A9D0C009A7D003990C20087003990220A6 +:109310004870002088700398217900794906C009B7 +:10932000C001490E08430399087121794006400E97 +:10933000C909C9010843039908713BE10A98211D35 +:10934000807903900F9801F01EFC401C89D103988E +:109350000623C007C00F5843FB4940194018062296 +:10936000211D02F07AEB0A988079022802D20A992C +:10937000401C8871202017E70620F872207AB87404 +:10938000E079787428000322211DCE3002F064EBCE +:1093900004203874E078A17800020843B8810F985F +:1093A00002F062EC0F9802F0F0EEB97C41720F9877 +:1093B0000F2292018018006901730F98052103F0B4 +:1093C00078E94020F0E61120F874207AB876E07948 +:1093D000787628000322211DD63002F03EEB0420CF +:1093E0003876E078A17800020843B8820F9805210A +:1093F00003F05EE901204004D6E6129805282079A2 +:1094000005D1022800D3FF200C994861D2E0022840 +:1094100093D2800021214019890140188069692177 +:10942000039002F09EEA61790220012900D0032016 +:1094300003990622603107910872039907202031B1 +:10944000069148720699062088720020C872039817 +:10945000A11D2C301E67A8B901000000E04201C028 +:10946000000400008254D31B02F000EB03980F218C +:109470000170A07C0399801D4870000A88700398D1 +:10948000210006220C31C01C02F0F0EA03982100F2 +:10949000A27C1331093002F0EAEAA07C1330000606 +:1094A000000E225C01920699401C0006000E8A7490 +:1094B000211802900398019A333002F0D8EA019AF9 +:1094C0000298129980180006000E81427CD9401C37 +:1094D00001061298090E401A0291062102F00EE9C7 +:1094E000002971D11EE00298215C039801F038FB3D +:1094F000401C12D10798C07902280ED20623584387 +:10950000039A0299801861185B30062202F0AEEAD5 +:1095100007980799C079401CC8710298801D000601 +:10952000000E0290029912988842DCD14CE025206E +:10953000400108212818C17261792279090211437A +:10954000C181E179A279090211430182FF20401C07 +:1095500034E6E079A17900020843814988420DD1BF +:10956000627A207A120202438A4207D10A9A0020C4 +:1095700010720B98C1620B98016325E06179227922 +:1095800008020A9910430872E179A27908020B993E +:1095900010430828C86206D0802806D0FF38401E35 +:1095A00007D1052002E0012000E004200B990863A8 +:1095B0000AE0617A227A08021043F7E7607921799C +:1095C000000208430A9988820498241DC178827891 +:1095D0000802129910430419081A001F129000285B +:1095E00000D042E5300013B0F0BD089A0920507356 +:1095F0000D980622211D02F03AEA01204002DDE525 +:109600000922D2010720AA18907756480622211D68 +:10961000281802F02CEA4921090106206918C873AC +:10962000002008748020C9E54E48152139302818DB +:109630000170E178A27809024E2311434E2902D924 +:10964000190A437001E04170090A817082784178FB +:1096500012020A43211DC01C05E6190A037041705D +:109660004278017812020A43211D801CFBE5F3B504 +:109670000400002089B00690200002F0A4EB050051 +:109680000A980A9EC17880780A02024310000838BE +:109690000304707831780002084301061F277F0118 +:1096A0001B0C090E08360220E719EA2908D0EB291D +:1096B00075D0EC2974D10A992000FEF7ABFFF4E2D3 +:1096C000717832789B1E09021B0411431B0C01297F +:1096D00011D1B21C29002000FFF7A3FC0028EED016 +:1096E000092000022818006B0028E8D0A868FF2194 +:1096F000491C0843CCE20029E1D1B41C05962600A0 +:10970000002B73D0717832780B021343FF27853713 +:10971000D91B0C22BB426AD008DCFF3B7D3B02F028 +:1097200016EA08404F586774808C963D0A2974D019 +:109730001ADC012972D00A9F133702296FD003293E +:109740006ED004292AD100200490F078B178241D2D +:109750000002084370D020786FE10000DA080000B2 +:10976000FFFF0000A1040000472252010B297ED018 +:109770000C297DD03F29E5D14D2000012818017B1F +:10978000C27A08021043B070000AF070FA48241D33 +:1097900029184E22200002F06AE94E34B5E1BCE1FE +:1097A00086E20420B0700020F070287B241D207019 +:1097B000687B6070A87BA070E87BE070241DA4E14A +:1097C0000120B0700020F070A868241DC007C00FF1 +:1097D0002FE00620B0700020241D2900F070062222 +:1097E000BC31200002F042E9A41D8EE157E166E0A1 +:1097F0000820B0700020241D2900F07008221431C8 +:10980000200002F034E908347FE1B070000AF07003 +:10981000287C241D2070687C17E019E166E071E067 +:109820007BE00120B0700020241DC035F070A87FBF +:1098300040082070641C68E182E0B070000A241DBA +:10984000A035F070E87D2070287E607025E1100A58 +:10985000B270F0700A9FFF353835A8780A376978FA +:109860003E000002BB56C21901000000DC4601C0E8 +:1098700000040000F7AA28A3084308360C37022882 +:1098800001E0FCE00CE115D901212171E978617159 +:10989000090AA1716979A81DE17102F03AE9800A0B +:1098A000310002F0FAE828000A3002F032E9800ABA +:1098B00039000AE0002121716171A171E17131006B +:1098C000002002F0EAE83900002002F0E6E8103457 +:1098D00025E10120B0700020F070FF353835207987 +:1098E0002979C0094906C001490E08432071297928 +:1098F0004006C909400EC90108432071641D0EE1EC +:10990000100AB270F070A248241D29180C22200001 +:1099100002F0B6E80C3402E12900C0318A7C2272E0 +:10992000497CE171200003222900CE3109E02900A1 +:10993000C0318A7E2272497EE17120000322290013 +:10994000D631001D02F09CE80520B07000203C00DC +:10995000F070E4E000210A0002A806C00622049884 +:1099600080004119212080010818876902A9F81C8C +:1099700002F09EE8002866D004982070380060301D +:109980000890007A641C0121022800D00221217075 +:10999000641C390006222C31200002F072E8A41D5C +:1099A0000622F91C200002F06CE8B87879780002F1 +:1099B000A41D084306280CD9801F2070B878797838 +:1099C00002020A43641C3900921F0931200002F090 +:1099D00058E8B878797800020843A41F04193800C1 +:1099E00020300790807C20700798641C827C3900AE +:1099F0003331200002F044E80798807C041908986D +:109A0000007A02281AD1002001900898C0792070AD +:109A1000641C0EE00198062358430622C1195B31ED +:109A2000200002F02EE80198A41D401C0006000E44 +:109A3000019008980199C0798842EBD8F078B17804 +:109A40000002084307D10498401C0006000E0228BB +:109A5000049000D27EE70598201A801FB070000A9B +:109A6000F0705CE00420B0700020F0702520400110 +:109A70002818C189241D2180008AA41C16E0062014 +:109A8000B0700020F070A818007A241D20802320D8 +:109A900080012818C16AA41C2180006BA41C05E069 +:109AA000B070000A241DF070A818808A2080A41CC1 +:109AB00035E0FF217E313170090A71700121B170EA +:109AC0000021F170A968241DC907C90F2170FF2169 +:109AD000641C7D312170090A61700421A17000218C +:109AE000E170297B241D2170697B6170A97BA170C5 +:109AF000E97BE170FF21241D81312170090A617029 +:109B0000A070000AE070397A2982297C2171697C71 +:109B10006171E178A2780902201D11430C180598A3 +:109B20000A99201A08308870000AC870C7E0717856 +:109B3000327809021143012972D1F178B278090211 +:109B400011430906090E012909D160790128EDD0D8 +:109B50002000FAF74BFC16E001200690AFE00D4E16 +:109B6000002903D12000FAF706FA04E00C2905D1F8 +:109B70002000FAF7E9F90128EED075E002290BD1AF +:109B80002000FAF7C3FD0128E6D098E0DD040000CC +:109B9000DA080000A8160004032903D12000FAF710 +:109BA0002FFFF0E7042915D160790028D4D00128CF +:109BB00002D12000FAF760FA01203060082002F09C +:109BC0001CEB03203872012002F02AE8002002F08A +:109BD00014EB74E0052924D160790028BCD0387AD0 +:109BE000022805D1200000F050F9012002F010E811 +:109BF0000A2002F00EE82000FBF7E3FF012002F04C +:109C000008E86079012804D12000FAF735FA01202C +:109C100002E0022801D100207872012030604EE07D +:109C200047E00D2910D13872002001F0FAEF002032 +:109C300002F0E2EA012001F0ECEF200000F049F828 +:109C4000200000F04AF8E8E701225202062902D17A +:109C5000A868904326E00E2908D1200000F015F9ED +:109C6000401C01D1012006900020D7E7072908D128 +:109C70000120A8777B71C69D01000000D84A01C071 +:109C800000040000D7498029FF352135E87E802176 +:109C90000843E8761DE0082910D1A8772800FF3096 +:109CA0002130C17E4906490EC1762000F4F77EFFBF +:109CB0002000F4F75AFC2DE5A8600AE0092908D134 +:109CC000A8681043F8E7002903D16079B070000A52 +:109CD000F07006980BB0F0BD0120FBE78F48817251 +:109CE0000361C26070478D4801214172704770B5B1 +:109CF00001258A49486002F0D6ED04000DD0208984 +:109D00002E2100190170200002F0D0ED012803D1AE +:109D1000200001F00CEF00E00025280070BD70B5B8 +:109D200006000C00150002F062E88168890506D57E +:109D3000252149014018018AC089081A02E0300033 +:109D4000FBF7F0FB20600020286070BD70B50600B6 +:109D5000724C0D0002F04AE80020012D606105D030 +:109D6000A07A002803D0300002F0A4ED70BD607A24 +:109D70000028FBD0012001F056EF300000F001F880 +:109D800070BDF0B50400002085B00490200002F002 +:109D90002EE806001F2040012518604B0F200221ED +:109DA00080015C60201829720269F327517B8908C1 +:109DB000890051730269394051730069CF22114003 +:109DC0004173587A002801D00120687254481A0063 +:109DD0001432002101AF07C7C0361A690092DB6850 +:109DE000B27C0499200002F06AED002802D12872AA +:109DF00005B0F0BD0120FBE7484910B54A7A002ABA +:109E000008D01F2252018018407A022805D0887A93 +:109E1000012802D04868FFF7B4FF002010BD08B544 +:109E20001F235B010022C01842723C48009214308C +:109E300002F020ED012008BD3848002110B58172E4 +:109E40004068FFF7ECFF002010BDF8B5040001F0FA +:109E50002AEF0500200002F0B6E907002F4E20008F +:109E600001F0C4EF0200C0321F23917C5B0102208D +:109E7000E318746018720F2080012018797203694A +:109E800060351973A9710169907C0D31012200239D +:109E900002F018ED0521200002F028ECF8BD70B5A5 +:109EA00000211E4801254172406802F0FCEC0400CC +:109EB0000DD020892F2100190170200002F0F6EC4E +:109EC000012803D1200001F032EE00E00025280037 +:109ED00070BD124810B540691400002803D002F08C +:109EE000C6EC2070012010BD10B5FFF7AEFF0D4984 +:109EF000486A04221043486202F044EC012002F058 +:109F0000E6EC094908688A0C1043086007490868AC +:109F100020221043086002F0DEEC10BDD06E000479 +:109F20009D4B01C000A8008000A3008000A7008016 +:109F3000F0B501201C490978012901D00020F0BDAD +:109F40001A491B4E097802233374194AA02420327F +:109F500014710124012901D1147104E0022902D1F4 +:109F600000211171F8E73374A1211171002301213F +:109F7000182703E0032901D101233374726ACC004E +:109F80003D1B0C4CEC4012062406120E240EA2427D +:109F900001D0002002E0491C0329EBDD002BCED1CB +:109FA00001213174716AF0BDB1F70004B0F700040B +:109FB000000800905830333870B500241C4D2878C4 +:109FC000012803D0022801D0002070BD002002F03B +:109FD00086EC1849884200D101242878022824D12F +:109FE000012C22D11548144981609F214162416AA8 +:109FF0000D06416A2D0E406A02F074ECFF2D01D16E +:10A00000002412E00E4E357002F070EC31781F29FA +:10A0100001D10C2100E01C21084206D002F06AECBC +:10A02000002002F06CEC02F06EEC200070BD00002D +:10A03000C4F7000458303338820400000008009050 +:10A04000C5F70004754810B5006B7549086002F04B +:10A050005EEC7549734808807448091D0880091D25 +:10A060000888072252031040714A1043088010BD2F +:10A070006B486A49006808637047F8B56A4D083D47 +:10A08000288870217EDD95F401000000D44E01C0C7 +:10A0900000040000501F8E7B084328806A4F002474 +:10A0A00026003B20021B6949380002F03EECC00745 +:10A0B000C00F3100001871418100014328880F2230 +:10A0C000D24310400843288028880521084328806F +:10A0D000641C3C2CE5DB28882F21C94308402880DC +:10A0E000F8BD564910B50839088870221043088019 +:10A0F000574B002005240A881A400A800A88224308 +:10A100000A80401C3C28F6DB08882F22D2431040EE +:10A11000088010BD474A136998420AD01061474B26 +:10A120000204920D103B1A80444A8006800E1032C1 +:10A13000108008014149401C091F08803F490C3923 +:10A1400008880004FCD57047F8B5002406000F000D +:10A150002500EFF76FFB39003000FFF7DBFF3548D4 +:10A16000C068002813D1354824380488E217001D40 +:10A170000388DD17001D0188001D00881E0C2D04BA +:10A18000354315431B040D4300041C430543EFF7FF +:10A1900077FB20002900F8BD0021D5E7F0B51500B8 +:10A1A000160C1FB41C001F0CEFF744FB0098FFF7C0 +:10A1B000F3FF20488561C461204824380580001DD4 +:10A1C0000680001D0480001D0780FFF760FF0098D7 +:10A1D0000121FFF79FFFFFF784FFEFF751FB05B069 +:10A1E000F0BD10B50400EFF725FB00212000FFF7BC +:10A1F00091FF124814380088800701D5012400E03F +:10A200000024EFF73DFB200010BD10B50400EFF770 +:10A2100011FB2000FFF7E5FFFFF739FF02212000C7 +:10A22000FFF778FFFFF75DFFEFF72AFB10BD000097 +:10A2300000210080B8160004809800002C060090D1 +:10A240003F4900003F090000C61A6BACB1C61A0BAB +:10A25000F0FF000038B50021FF4A00911178FD257C +:10A26000FB240C296B4616D1527C19785206D20F6A +:10A27000294052001143F84A0091127B002803D173 +:10A280002140D007C00F02E02140D006C00F80005F +:10A290000843009003E0187828402040009038BD23 +:10A2A000EF49EE480860EF49001F0860EF49EE48AB +:10A2B0000860704730B504000D0093B0442102A837 +:10A2C00001F012EA002001902A002000442302A994 +:10A2D00002F02EEB6B4658894424442800D2040037 +:10A2E000210002A802F028EB002839D0083C250400 +:10A2F0002D0C00240C2D32D30C20604302A94018F1 +:10A30000083001786B461971C2785A7142789A7197 +:10A310000079D8710807000F0909002802D100212F +:10A32000080001E0012805D102F00AEB01A902F0C2 +:10A330000CEB0CE002280AD10024200001A902F055 +:10A3400004EB641C2406240E072CF6D307E00C3D16 +:10A35000641C2D0424062D0C240E052CCAD30120C8 +:10A3600013B030BD30B504000D0097B0582101A8DE +:10A3700001F0BAE92A002000582301A902F0D8EA26 +:10A380006B46D8885821582800D2010001A802F055 +:10A39000D4EA00280AD00021080002F0D2EA6B4675 +:10A3A000D97C0091694602F0D4EA012017B030BD93 +:10A3B00030B504000D0093B0482101A801F094E9E4 +:10A3C0002A002000482301A902F0B2EA6B46D8888F +:10A3D0004821482800D2010001A802F0AEEA002876 +:10A3E000BED06B46597B012002F0AAEA6B46D97CAD +:10A3F0000091694602F0ACEA0120B1E73EB50D00DC +:10A4000000210A000B006C460EC42A000C2369468A +:10A4100002F08EEA6B4658880C210C2800D201000D +:10A42000684602F08AEA002806D06B465A7A197A02 +:10A43000002002F092EA01203EBD8748007D80079F +:10A44000C10F8B4842781143417000207047824809 +:10A4500010B52030C07D86490209891C0007000F15 +:10A460004A70087002F07CEA824C606AC030817FDA +:10A47000002002F07AEA606AC030C17F012002F059 +:10A4800074EA7D480078002804D0606AC030C07F3C +:10A4900001F08EED1290D6E701000000D05201C00D +:10A4A00000040000968ED13D002010BDFEB50D00C9 +:10A4B0000700744E0124A5E02A00380008236946ED +:10A4C00002F040EA0098401C73D06B46588801990E +:10A4D000401981426DD3002F03D0AF21C9008842BB +:10A4E00067D86B4618782A2864D01ADC142851D013 +:10A4F0000CDC0E2810D00F283ED0102845D0122892 +:10A500007DD12900380002F03EEA28E01F2846D01D +:10A51000202849D0252872D12900380002F036EAD7 +:10A520001DE034285CD01CDC2F2838D030283BD0EC +:10A5300031284AD0322862D14C48007D80075ED550 +:10A540002900380002F026EA71780400014300284F +:10A55000717054D029003800FFF734FF2043040005 +:10A560004DE0352841D0362844D0402847D1290035 +:10A570003800FFF74DFFF2E72900380002F00EEA3D +:10A58000717804000143717039E02900380002F04D +:10A590000AEAE4E72900380002F008EADFE72900C8 +:10A5A000380002F008EADAE72900380002F006EA8B +:10A5B000D5E72AE02900380002F004EA0400290067 +:10A5C0003800FFF781FE044319E02900380002F04B +:10A5D000FEE9040013D029003800FFF7CDFEBDE7E7 +:10A5E0002900380002F0F6E9B9E72900380002F046 +:10A5F000F6E9B4E72900380002F0F4E9AFE7019D7D +:10A60000002C02D0681C00D056E70120002C00D09E +:10A610000020FEBD1548402110B501F070E810BDC6 +:10A6200070B516000A0011490024402302F08AE99F +:10A630000E48402102F08AE900282FD00B4DE87A1D +:10A64000002809D0A87C3320A87401F00CEF022860 +:10A6500002D10E490120087028780C2804D00D285A +:10A660001CD1FFF7F4FE040012E00000A46C04000B +:10A67000141500C04CF9000450F90004915001C0B9 +:10A6800054F900041639040014C70004CCBE01C0FC +:10A69000FFF7E7FE69682043316070BD012070BD9F +:10A6A000644A9062D162644A126810609180704777 +:10A6B000624810B50024047044708470C470047142 +:10A6C000447102F094E9FFF7A5FF02F094E95B48BA +:10A6D0005B49001F04700C70447010BD70B50E0013 +:10A6E00056490500062201F0EAE9544C60792179C7 +:10A6F00002020A435349A81D01F0E0E9607921797B +:10A7000000020843801D3080002070BD08B5FFF7AF +:10A71000CFFF02F074E900281CD04848494A0021C4 +:10A720000170143A4170118A81700B0AC370528A09 +:10A730000271120A427100206A46FFF771FF002879 +:10A7400008D10099FFF7B2FE3C490120091F0870AB +:10A75000002008BDFFF7ACFF012008BDFEB50D00CD +:10A760000021040002915FD02078002801D0012848 +:10A7700006D16078002803D1A41DAD1F2D042D0C37 +:10A78000002D51D0A8074FD1E0780C2801D00D281A +:10A790004AD10422211D01A801F090E9019801F09D +:10A7A0005AEE0190401C01D100950EE004222100D8 +:10A7B000684601F084E9009801F04CEE0199000C24 +:10A7C0000090081A0004000C0290009EAE422BD8A4 +:10A7D000270019E00422391D01A801F070E9019851 +:10A7E00001F038EE0190401C17D0009804223F1869 +:10A7F0003900684601F062E9009801F02CEE000C87 +:10A800003618AE4200900FD800980104090C3800A9 +:10A8100002F09CE80028DDD106E0029A2900200021 +:10A8200002F0F0E8002801D00120FEBDFFF76EFF26 +:10A83000FEBD000000A50080BC0000041A39040021 +:10A84000CCBE01C0141500C010B50C0001F0E2EA46 +:10A850002121890141184969FF2901D10021C943FA +:10A860002160FF49401810BD38B50D00684601F061 +:10A8700082EF280001F0CEEA04002800FBF7CFF9B0 +:10A88000A17C022001432000A174FBF7AEF8002850 +:10A8900005D04034A17A0098002201F0C0EE38BD06 +:10A8A000F8B501F07C5E280301000000CC5601C021 +:10A8B00000040000BC0078A4B8EA21239B01C21860 +:10A8C0005169FF292DD0022911DA89000918C91808 +:10A8D0008D69E84B2E006036317A03290AD10622B1 +:10A8E000E91CC01801F00CE900281AD111E0FF2082 +:10A8F000506116E0022914D10024C7180EE006208A +:10A900006043062240195B30390001F0FAE8002864 +:10A9100001D10120F8BD641C2406240EF079A04268 +:10A92000EDD80020F8BDFFB587B0002426000F0049 +:10A93000079801F07AEA2121890141181222069133 +:10A9400005000A740798FFF7B5FF06998522C874B9 +:10A9500012010121A818417000218170099801217C +:10A96000C90300280ED00E00109909984862099872 +:10A970006030007A022806D1099810992930BE4E1D +:10A98000886200E00C002900D331112003AA01F0F5 +:10A9900068EF11206B4618730520587300209873D8 +:10A9A0002800C0300590407C9874290003A8032239 +:10A9B000D631C01C01F08CE80A982021032806D16A +:10A9C000432040012818007A6B46D87406E00598A9 +:10A9D0006B46807ED8740A98022802D180200443F6 +:10A9E00002E00A9803280DD105206B461871022059 +:10A9F000587100209871D8711872109801AA0E43EE +:10AA0000026400E00C43109903A8086101203200A1 +:10AA10004004024385202300C00203430092109AA1 +:10AA200007983900FAF70DF979783A780902114355 +:10AA300008183870000A787000F0A9FD002812D0BC +:10AA40007878397800020843390020314118079896 +:10AA5000012200F02BFE79783A7809021143401860 +:10AA60003870000A78700BB0F0BDFFB5B1B018A80F +:10AA70000D000027019031983E0001F0D6E94D22EB +:10AA80000400120101218018C171002101725821B6 +:10AA900002A800F03EEE33980100603100283091AA +:10AAA00054D02000DF3002A901F0CEEE02AAE0204F +:10AAB0000092005BC01E030434981B144069817827 +:10AAC000427809021143C91E090422000914801D9D +:10AAD000E532FBF779FB6B46987A597A0002084316 +:10AAE000052805D81321072089016118487603E05D +:10AAF000012602A8F6021D903098007A022802D0A2 +:10AB00003A98022825D13499319802AAFBF78FFB95 +:10AB1000112028AB187605205876002098766B46D1 +:10AB2000987B28AB987721002EA80322D631C01C31 +:10AB300000F0CEEF432040012018007A28ABD877F0 +:10AB40002EA81C9001204004064305E00127FF02C7 +:10AB5000D6E70120400407433398002808D03098F6 +:10AB6000007A022804D180200643339829302290AD +:10AB70003B0021200343019A319829000096FAF7FF +:10AB800060F869782A780902114308182870000AC9 +:10AB9000687000F0FCFC002812D06978287809025F +:10ABA00001432800203009183198012200F07EFD71 +:10ABB00069782A780902114340182870000A6870E1 +:10ABC00035B0F0BDF3B581B005002C4F15D0002491 +:10ABD0002E0060360EE006206043029940195B307B +:10ABE000062200F08EEF002801D12000FEBD641C7B +:10ABF0002406240EF079A042EDD83800FEBDF8B549 +:10AC00000F0001F012E91B4E05000024B61D0620BE +:10AC10006043062240198019390000F072EF0028C5 +:10AC200001D12000F8BD641C2406240E022CEED3B2 +:10AC30000020C043F8BDFFB583B006000F0001F04F +:10AC4000F4E804007079022807D01F21490102208E +:10AC500071180872002001F0F8EA03220092059AA8 +:10AC60003000092302A9FBF783FE00282ED10298A9 +:10AC7000018905E0D408000080800000FFFFFFFF8D +:10AC8000069A0D18781C009203D14920035D00221A +:10AC900007E04920035DB80021210019890140180F +:10ACA000826929003000FFF73EFE4720400120184E +:10ACB000C179272097CF42F601000000C85A01C091 +:10ACC000000400009CE3D02E41552800059906227F +:10ACD000123000F008EF029801F0B4ED002803D024 +:10ACE0000020C04307B0F0BD002223000092FB4AC1 +:10ACF000FB483033310001F096EB0020F2E7F8B565 +:10AD00000F0001F09CE8050000242126B601A000F8 +:10AD1000401980198069817843780A021A43D21C4D +:10AD2000390000F0F8EE002801D12000F8BD641CC5 +:10AD30002406240E022CEAD30020C043F8BD7CB5C3 +:10AD40000022130069460CC101F078E805000024D8 +:10AD50002126B601A0004019801980690622C01C76 +:10AD6000694600F0D8EE002801D120007CBD641CAB +:10AD70002406240E022CEDD302207CBDFFB581B049 +:10AD8000050001F05CE8060002992800FFF7B7FF14 +:10AD90000406D44F2416601C22D12800FFF7CFFFF1 +:10ADA00004062416022C21D00298817840780A02E9 +:10ADB0000243A0008019C519A8690299D21C00F0AD +:10ADC00092EE0398817840780A020243A8690399B9 +:10ADD000D21C293000F086EEA86904996030017217 +:10ADE000A0008019C019806905B0F0BD0020FBE704 +:10ADF000F8B504000E00002804D025006035EF7976 +:10AE0000022F01D10120F8BD31002000FFF7E4FE40 +:10AE1000401C0AD106207843062200195B3031001D +:10AE200000F060EEE879401CE8710020F8BDFFB545 +:10AE300081B0002401F002E8060001D10020D3E730 +:10AE400000F03CEDA74F0090A0008019C019856963 +:10AE500002990622E81C00F05EEE00281AD1039841 +:10AE600000280FD02800049A0399093000F052EE10 +:10AE700000280FD1A8786978000208430499801F40 +:10AE8000884207D1009800F022EDA0008019C01977 +:10AE90008069A9E7641C2406240E022CD4D30098F0 +:10AEA00000F014EDCAE770B505000079032804D15D +:10AEB0002800FFF7BCFF040001D1002070BD28006E +:10AEC00000F018EF0500FF353A3500F0F8EC060009 +:10AED000200020222900333000F004EE202020340E +:10AEE000A074300000F0F2EC012070BDF3B500203A +:10AEF000BDB0002720900400029001903D98FF43D0 +:10AF0000FCF701FF3D991F225201022089180872A7 +:10AF1000002001F0A4E93D9800F090EF05003E9874 +:10AF200004220C30082100921F9102003C903D98B1 +:10AF3000092321A9FBF726FD002876D1219822AA12 +:10AF4000018901AB081838903E982030C1793898B3 +:10AF500020303B90C171132080012E18747600922E +:10AF60003E98012102AAFAF72BF904000198800308 +:10AF700006D523002069103308221DA901F066EAD6 +:10AF80000198000506D5230060691433582207A9EB +:10AF900001F05CEA0198000606D52300A06A283378 +:10AFA000092204A901F052EA0198400306D52300C2 +:10AFB000A06C4833042203A901F048EA0420002CC5 +:10AFC0003FD0216C00290BD06169002908D0616A4B +:10AFD000002905D0216A002902D0A16C002903D1E3 +:10AFE0007076A06C002806D0A16C0820C978C9072B +:10AFF000890E08431F90616A002923D03D98FFF70E +:10B000007EFE0700401C1DD0364810AB29184F614A +:10B01000B9004919081880696030007A0228988FB1 +:10B0200004D180088000401C03E09BE08008800081 +:10B03000801C10AB1F90988F1C218843001D1F900F +:10B0400000E0707610AB988F3A9002E0012000F09B +:10B0500012EE3A9B3E993D980322FAF713FD012820 +:10B06000F4D03A981C2180088000884310301F904B +:10B070003990781C15D1707E00284CD1A06CC07816 +:10B08000002806D1216A3D98C91CFFF7C2FD401C6B +:10B0900001D1012020E039981C2188430C301F90F9 +:10B0A0000FE01049B80040194018806920906030C6 +:10B0B000007A022805D13C992098FFF78DFD401CAD +:10B0C00009D0707E29C2507001000000C45E01C02A +:10B0D000000400001BB5DE7C002826D1A06CC078DF +:10B0E00000280BD1A06A002808D1082070761CE047 +:10B0F00040420F00915601C040080000781C14D057 +:10B1000020986030017A3D9841712098817840788C +:10B110000A020243D7482099D21C281800F0ECEC10 +:10B12000A868012189020843A8604920425D009275 +:10B13000209A38993D982300FFF7ABFC00F03BFACA +:10B14000002814D0389842780178100208433B99BF +:10B15000012241183D9800F0BDFA38994A780B78E1 +:10B1600011021943401838990870000A4870219854 +:10B1700001F072EB002803D00020C0433FB0F0BDC7 +:10B18000707E002801D17F1C03D13D98FAF765FD40 +:10B190002FE010AB9C8F1C20844320980C3460302F +:10B1A0001F94007A02281BD13D98022141713C99DD +:10B1B0002098FFF727FE2098817840780A02024302 +:10B1C000AC482099D21C281800F096ECA8684006DC +:10B1D00002D43D9801F044EBA0088000401C07E039 +:10B1E000032806D13D98F9F747FCA0088000801C91 +:10B1F0001F9010AB9C8F02E0012000F046ED3E99BD +:10B200003D9823000322FAF747FC0128F4D00020E0 +:10B21000B4E7F7B5B4B006000020039005900490A1 +:10B220001C90300000F014EE0400582106A800F035 +:10B2300084EA36981C2581000819212189014018CB +:10B2400080691D9036982021401C002801D10820DB +:10B250000DE01D981C916030007A022801D1212058 +:10B2600000E0222010AB1C90188EA843001D10ABEC +:10B270001C901F8E02E0012000F006ED35993B0086 +:10B2800004223000FAF708FC0128F4D0BF08BF0000 +:10B290001C20874310371C97206B002803D001F037 +:10B2A000B4E8002020631EAA00923598012104AA68 +:10B2B00003ABF9F78FFF0500A07CFD2108401322A6 +:10B2C00004219201002DA0747ED0286C002805D0A6 +:10B2D0006869002802D0A868002804D1A018417627 +:10B2E000A868002871D00398C00706D02B00A86872 +:10B2F0000833042202A901F0B4E8A8680221C0784A +:10B3000001282AD17079022870D04920005D0328D5 +:10B310006CD0012070711F2040013018017201A80B +:10B3200001F046EAD220005D0122002301A901F0CC +:10B33000FCEA43214901FF206118487000222300E4 +:10B3400000924D4A4D483033310001F076E8B8089C +:10B3500080001C218843083014E0002846D136982C +:10B36000401C43D01D986030007A03280CD17071C6 +:10B37000002000F07EEF3000F9F77EFBB808800077 +:10B38000801C29E01C902EE002282CD13C487171D1 +:10B3900021181D98FFF736FD2900300006AAFAF79C +:10B3A0005AFF1D98817840780A02024331481D995E +:10B3B000D21C201800F0A0EBA068012189020843EC +:10B3C000A060400605D401E00AE00FE0300001F083 +:10B3D00048EAB8088000401C1C2188430C30D1E7A3 +:10B3E000A018417602E00598012802D13000FAF752 +:10B3F00034FC10AB1C8E02E0012000F046EC3599C5 +:10B40000230004223000FAF747FB0128F4D0002083 +:10B4100037B0F0BD38B504000D00032B12D16079B0 +:10B4200001280AD11F2040012018007A022804D1E7 +:10B43000144920006A46FEF77EFD29002000FFF730 +:10B440005FFD38BD29002000FFF7E3FE38BD30B5B1 +:10B4500000210D4A2124A40169234B438D002D189E +:10B46000491C9B182D190906090E0229AB61F3D35B +:10B4700030BD000075040000000E2707915601C082 +:10B48000D4080000C0C62D00A0700004F7B586B037 +:10B490000C0000F0DEECE16C0591444900274018F7 +:10B4A00005990397049088784978000208433E0084 +:10B4B000062100F06AE90006000E02900498417827 +:10B4C0000278080210433D2100F05EE90006000EFC +:10B4D000019004983B6D96A701000000C06201C076 +:10B4E0000004000015007315002845D035E0002445 +:10B4F0002DE03D2060430499062245180620704344 +:10B500000599AD1C4118C91C280000F018EB002853 +:10B510001AD1089F6B469889AD1DFF1CC0190722E0 +:10B52000290000F0F4EA6B469889E91DC01D00046B +:10B53000000C0390AA79C01900F0E8EA6B469889DC +:10B54000A979401801270390641C2406240E019851 +:10B550008442CED3761C3606360E02988642C6D377 +:10B56000002F08D008981921017008996B46988916 +:10B570004870000A8870380009B0F0BD70B50E0040 +:10B5800000F070EC212189014418A089002815D011 +:10B590007178327830000902203011430D183000E4 +:10B5A00001F03CE96978A81C0818A289A16800F09C +:10B5B000AEEA6878A18940186870A08970BD000063 +:10B5C0002B05000056494880704755490220085E07 +:10B5D000401C00D00120704751490220085E70478E +:10B5E0003CB50022002926D04178091F0C06240E04 +:10B5F000801D30E0815C00291ED18118CD786B461A +:10B600001D71097959719B8819021B0A194301910F +:10B61000C943890710D14249032409886B468C43EA +:10B620009988A1430C02090A0C43019419798018E6 +:10B63000C170597901713CBD81184D786B461D7000 +:10B64000897859701B8819021B0A194300915118F7 +:10B65000C91C0A06120EA242CCD33CBDFFB5DD21A7 +:10B6600081B01C0017000170401C451C009002991D +:10B67000280000F04CEAE81901900B983E0026E003 +:10B68000029925003A00A01C00F058EA002829D1B0 +:10B6900069780A98CA1B8019E121801889008842BC +:10B6A00019DAE1190198891C00F030EA6878C11BA9 +:10B6B0008A191604019A360C89180191A41C0419E0 +:10B6C00068780B99081A801E000400140B9000285B +:10B6D00001DD002CD4D100980670B61C3004000C9B +:10B6E00005B0F0BD6878E9E7F8B503000E00150075 +:10B6F0000024FFF76AFF00280FD00A4A18000092C2 +:10B70000094A3100042301F0AAE9040005D0002D04 +:10B7100003D021003000FFF763FF2000F8BD0000D8 +:10B72000F6170004FFFF0000267901C004F01FE5B2 +:10B730000F93300004F01FE5D500000004F01FE572 +:10B74000C100000004F01FE5A793300004F01FE5DE +:10B75000F8AB310004F01FE5F301000004F01FE531 +:10B76000FDF3010004F01FE5F351000004F01FE5B4 +:10B77000BD3D000004F01FE55951000004F01FE535 +:10B780002D24000004F01FE598AB030004F01FE532 +:10B790007CA6310004F01FE5ED53000004F01FE526 +:10B7A00060B5310004F01FE57D3E000004F01FE5A8 +:10B7B000713E000004F01FE5893E000004F01FE523 +:10B7C000C723000004F01FE5CD3E000004F01FE594 +:10B7D0001B24000004F01FE56324000004F01FE5B3 +:10B7E0006F5E000004F01FE5B1EB300004F01FE5D0 +:10B7F000716B300004F01FE5114E000004F01FE5EE +:10B80000934E000004F01FE51751000004F01FE5FF +:10B81000FB50000004F01FE5F94E000004F01FE5A6 +:10B820003152000004F01FE55D52000004F01FE5F6 +:10B830004152000004F01FE52D51000004F01FE507 +:10B840001D59020004F01FE5615C020004F01FE5D1 +:10B850004D55020004F01FE56955020004F01FE594 +:10B860007555020004F01FE58155020004F01FE544 +:10B870008D55020004F01FE57951000004F01FE52A +:10B88000DB53000004F01FE5EB5A020004F01FE553 +:10B89000095B020004F01FE57154020004F01FE58B +:10B8A0005359020004F01FE5695D020004F01FE532 +:10B8B000A553000004F01FE5017C300004F01FE5F3 +:10B8C0000159020004F01FE5015A000004F01FE5D1 +:10B8D000214F000004F01FE59FE3000004F01FE586 +:10B8E000AF4F00009647885B01000000BC6601C0B6 +:10B8F00000040000DE1E2CEF04F01FE5B9B10300C8 +:10B9000004F01FE5F554020004F01FE5C1B1030087 +:10B9100004F01FE5913D000004F01FE59F5D00006D +:10B9200004F01FE5995D020004F01FE564AA03001E +:10B9300004F01FE5B75F020004F01FE5895E020016 +:10B9400004F01FE57D64300004F01FE5A39730008C +:10B9500004F01FE50598300004F01FE55F53000078 +:10B9600004F01FE5B556000004F01FE57D56000009 +:10B9700004F01FE52D57000004F01FE55B570000A1 +:10B9800004F01FE57992300004F01FE54D5A3000B5 +:10B9900004F01FE5DFEF300004F01FE5C395010060 +:10B9A00004F01FE51995010004F01FE58B963000A7 +:10B9B00004F01FE59396300004F01FE553C1010029 +:10B9C00004F01FE54351000004F01FE5FD3F0000B7 +:10B9D00004F01FE56D40000004F01FE50F4000007B +:10B9E00004F01FE5DD4D000004F01FE5A55902003D +:10B9F00004F01FE58959020004F01FE5BF53000061 +:10BA000004F01FE5CD53000004F01FE59D5A02002D +:10BA100004F01FE58D5A020004F01FE55B60020090 +:10BA200004F01FE58760020004F01FE54CAC310014 +:10BA300004F01FE55F50020004F01FE5E7C30300B8 +:10BA400004F01FE5F5C3030004F01FE52102000028 +:10BA500004F01FE55D02000004F01FE5579C0200A2 +:10BA600004F01FE559F4000004F01FE529F0000080 +:10BA700004F01FE545EE000004F01FE52BF4000084 +:10BA800004F01FE57157000004F01FE57B1403006C +:10BA900004F01FE53FD4300004F01FE5415A0000D8 +:10BAA00004F01FE5017D300004F01FE5BD490200F0 +:10BAB00004F01FE5C500000004F01FE50958000070 +:10BAC00004F01FE53302020004F01FE5CB863000CE +:10BAD00004F01FE57587300004F01FE50917010029 +:10BAE00004F01FE58F97020004F01FE5F1EF02005C +:10BAF00004F01FE5B154020004F01FE5E5FD03006A +:10BB000004F01FE5A7DC010004F01FE58BFD010038 +:10BB100004F01FE5F9F5000004F01FE5EBA70000B5 +:10BB200004F01FE5C0AA310004F01FE595F3010001 +:10BB300004F01FE5D1B5310004F01FE564AD31001C +:10BB400004F01FE571FF030004F01FE55D7E0300B4 +:10BB500004F01FE50FAA030004F01FE5DD1A310011 +:10BB600004F01FE5811A310004F01FE5271B3100A6 +:10BB700004F01FE56D1B310004F01FE5AB1B310025 +:10BB800004F01FE5CD1B310004F01FE567780300CA +:10BB900004F01FE58378030004F01FE5AB1E3100BD +:10BBA00004F01FE58179030004F01FE58B780300A2 +:10BBB00004F01FE544AD310004F01FE57DB5310010 +:10BBC00004F01FE531C3030004F01FE5DB1F310063 +:10BBD00004F01FE55357000004F01FE59D670200C5 +:10BBE00004F01FE5B3FD030004F01FE5A3CB010043 +:10BBF00004F01FE5E7F1030004F01FE5878601006C +:10BC000004F01FE5F8AE310004F01FE573070100F2 +:10BC100004F01FE5BBF9010004F01FE54BDE020054 +:10BC200004F01FE57D70010004F01FE5F7730200CA +:10BC300004F01FE557E5030004F01FE57BE5030072 +:10BC400004F01FE547B5000004F01FE535B500001E +:10BC500004F01FE553B5000004F01FE541B50000F6 +:10BC600004F01FE594AB310004F01FE52507000048 +:10BC700004F01FE5A956000004F01FE5A35B0000D7 +:10BC800004F01FE54D04010004F01FE5DF2B000068 +:10BC900004F01FE59F7D300004F01FE5BD7C3000FF +:10BCA00004F01FE51DCC010004F01FE565FD030055 +:10BCB00004F01FE5C156000004F01FE50DF9010076 +:10BCC00004F01FE5B714030004F01FE5A3140300FC +:10BCD00004F01FE5AB5C020004F01FE5550F020005 +:10BCE00004F01FE5FD0D020004F01FE52FEE30000B +:10BCF00004F01FE5796115BB01000000B86A01C0BE +:10BD000000040000FEFD846551CA010004F01FE537 +:10BD1000EDC1010004F01FE55DC0010004F01FE566 +:10BD2000170C020004F01FE567C0010004F01FE5D6 +:10BD300071C0010004F01FE50756030004F01FE581 +:10BD4000515A030004F01FE545FD030004F01FE510 +:10BD5000D153020004F01FE53914010004F01FE57F +:10BD6000F5B6310004F01FE5A3B6310004F01FE57D +:10BD7000F190310004F01FE51114020004F01FE5FA +:10BD80000503020004F01FE54555020004F01FE51D +:10BD90006F00010004F01FE56BCB010004F01FE50C +:10BDA0007915000004F01FE5A918020004F01FE552 +:10BDB0005D20010004F01FE56DEB020004F01FE5BB +:10BDC0006D94310004F01FE50321010004F01FE52C +:10BDD000B58C030004F01FE5FDAC310004F01FE555 +:10BDE000EFCF000004F01FE56F06020004F01FE52E +:10BDF000F108030004F01FE5A1D0000004F01FE5E6 +:10BE00001B76030004F01FE50FFE030004F01FE59E +:10BE1000E917030004F01FE5FF1D030004F01FE510 +:10BE20007F21030004F01FE5A523030004F01FE5B4 +:10BE30003722030004F01FE52322030004F01FE56E +:10BE40006324030004F01FE5F771010004F01FE50F +:10BE50006337010004F01FE59B11020004F01FE5A9 +:10BE6000A3A6020004F01FE5BDA5020004F01FE533 +:10BE700037A6020004F01FE59DA6020004F01FE5AE +:10BE8000A9A5020004F01FE5E396310004F01FE5C8 +:10BE9000CFFD010004F01FE53351010004F01FE560 +:10BEA000194F010004F01FE50FC6020004F01FE562 +:10BEB000AD92310004F01FE5EB10020004F01FE525 +:10BEC0000B4D030004F01FE5C533010004F01FE52E +:10BED000EF31010004F01FE54B73020004F01FE591 +:10BEE0006F0B020004F01FE5C9E2000004F01FE53B +:10BEF000ABE3000004F01FE5F1B9020004F01FE518 +:10BF000061ED020004F01FE521FC020004F01FE5D2 +:10BF1000F355030004F01FE5D759030004F01FE5B3 +:10BF20004DF0020004F01FE59DC0010004F01FE584 +:10BF3000F0AE310004F01FE59D95310004F01FE5DF +:10BF40007910020004F01FE5AF14030004F01FE5B0 +:10BF500055C3000004F01FE5DFA8020004F01FE550 +:10BF6000D7A8020004F01FE5A1F3000004F01FE5CC +:10BF7000A59A020004F01FE5F353000004F01FE54A +:10BF80008931010004F01FE541D0020004F01FE5F3 +:10BF90007F30010004F01FE58730010004F01FE549 +:10BFA0006DA6020004F01FE549A6020004F01FE59B +:10BFB0000994300004F01FE5C73B010004F01FE5C1 +:10BFC0000F4D030004F01FE56B4E030004F01FE566 +:10BFD000F9A4020004F01FE593EA010004F01FE554 +:10BFE000D5EC010004F01FE5F3EC010004F01FE5BF +:10BFF0005DEC010004F01FE56BEC010004F01FE5AF +:10C000004DEC010004F01FE56DE2030004F01FE5B4 +:10C0100087E2030004F01FE577EC010004F01FE560 +:10C02000FF95310004F01FE595E2010004F01FE5E3 +:10C03000C9E2010004F01FE56951020004F01FE5A8 +:10C040004929000004F01FE5EB7C030004F01FE524 +:10C05000E982010004F01FE5B9CA010004F01FE500 +:10C06000D10E000004F01FE54DFE010004F01FE5B5 +:10C0700075C8010004F01FE5D57D030004F01FE53D +:10C08000BF9E010004F01FE57311000004F01FE5DE +:10C09000AD0E000004F01FE53F08000004F01FE5AE +:10C0A000C10E000004F01FE56908000004F01FE560 +:10C0B000F596020004F01FE51797020004F01FE553 +:10C0C0009179030004F01FE565CA010004F01FE543 +:10C0D000FD73000004F01FE56976000004F01FE521 +:10C0E0000D6E020004F01FE5176D020004F01FE55D +:10C0F0005542020004F01FE5178F030004F01FE50E +:10C10000178C03001089CE4201000000B46E01C0FC +:10C110000004000079AB8A3704F01FE50F430200EA +:10C1200004F01FE55F43020004F01FE5F313030072 +:10C1300004F01FE54914030004F01FE5B9460300AD +:10C1400004F01FE56115000004F01FE5ED24010077 +:10C1500004F01FE5D122010004F01FE56121010078 +:10C1600004F01FE597A3300004F01FE56D530000B5 +:10C1700004F01FE5631B020004F01FE53BFC020016 +:10C1800004F01FE55F91030004F01FE59BE8020047 +:10C1900004F01FE57536010004F01FE58D20000056 +:10C1A00004F01FE50319000004F01FE5A5180000C6 +:10C1B00004F01FE5CF7B030004F01FE59B7C030028 +:10C1C00004F01FE5F9EE010004F01FE5AD67020081 +:10C1D00004F01FE521E1000004F01FE513DA01007F +:10C1E00004F01FE5AFD8010004F01FE5DDDA01001F +:10C1F00004F01FE5DDD9010004F01FE555DB010067 +:10C2000004F01FE591DF030004F01FE50BDC0100E3 +:10C2100004F01FE56DDC010004F01FE5756D3100D1 +:10C2200004F01FE533CF010004F01FE513D3010034 +:10C2300004F01FE5E3D3300004F01FE59BD10000BC +:10C2400004F01FE543D2000004F01FE563CE0000B8 +:10C2500004F01FE569CF000004F01FE5D1D0000015 +:10C2600004F01FE5674A030004F01FE5F16F0300C7 +:10C2700004F01FE5F593310004F01FE593FD030082 +:10C2800004F01FE5BB43310004F01FE5B76902006D +:10C2900004F01FE51F6A020004F01FE59DA50200DF +:10C2A00004F01FE57159020004F01FE54722000069 +:10C2B00004F01FE5A594310004F01FE52B1D0100DB +:10C2C00004F01FE5490B030004F01FE577FC0000B4 +:10C2D00004F01FE5C784020004F01FE5A95903001C +:10C2E00004F01FE5C122010004F01FE577C601003C +:10C2F00004F01FE54F27010004F01FE555963100BB +:10C3000004F01FE5CD27010004F01FE5B51D010075 +:10C3100004F01FE59185020004F01FE5D9F6010045 +:10C3200004F01FE5EF2B000004F01FE5FFC701003C +:10C3300004F01FE5C7C3030004F01FE575B5000056 +:10C3400004F01FE5DD5F030004F01FE569590300F9 +:10C3500004F01FE50152030004F01FE591C3010042 +:10C3600004F01FE51D1E010004F01FE5491D01003A +:10C3700004F01FE5451D010004F01FE5F1CB0100AD +:10C3800004F01FE53F15020004F01FE5674C0300B1 +:10C3900004F01FE5C303030004F01FE5B7500100DC +:10C3A00004F01FE5A153310004F01FE5D7C30300DB +:10C3B00004F01FE5D1F1030004F01FE549CC0100B2 +:10C3C00004F01FE57BC7010004F01FE59DC30100D9 +:10C3D00004F01FE525C2010004F01FE59B91310028 +:10C3E00004F01FE57B3D000004F01FE57F1902000B +:10C3F00004F01FE5AD83000004F01FE565C30300F2 +:10C4000004F01FE54D1F000004F01FE5695902000C +:10C4100004F01FE51B53000004F01FE5F54D00007C +:10C4200004F01FE5D14D000004F01FE5DFED000032 +:10C4300004F01FE5DD49020004F01FE55029040067 +:10C4400004F01FE541FE030004F01FE5E1B6000023 +:10C4500004F01FE599B6000004F01FE5CB9B300007 +:10C4600004F01FE5D7F1030004F01FE5A53D02002D +:10C4700004F01FE5197F010004F01FE50D730100B2 +:10C4800004F01FE5DFC3030004F01FE59D5A000020 +:10C4900004F01FE5F175010004F01FE50B17010022 +:10C4A00004F01FE5F3C3010004F01FE5237301004E +:10C4B00004F01FE5779B310004F01FE5E5820100E1 +:10C4C00004F01FE56F50000004F01FE5D550000098 +:10C4D00004F01FE5F14F000004F01FE54950000093 +:10C4E00004F01FE53D99300004F01FE549AB03005F +:10C4F00004F01FE5E951000004F01FE5EDEE000037 +:10C5000004F01FE50BEF000004F01FE529EF000029 +:10C5100004F01FE55FE21B6401000000B07201C07F +:10C5200000040000BF3AD5710BE7000004F01FE5DE +:10C5300005E7000004F01FE53B3F000004F01FE5A5 +:10C54000AD3E000004F01FE5D13D000004F01FE502 +:10C55000F960020004F01FE5E360020004F01FE54B +:10C5600084AD310004F01FE51BE5000004F01FE579 +:10C5700047E5000004F01FE593E5000004F01FE527 +:10C580005FE5000004F01FE5B5E3000004F01FE5DF +:10C590007599020004F01FE567E6000004F01FE54E +:10C5A000C360020004F01FE593EC000004F01FE5F7 +:10C5B0003F59020004F01FE5C1ED000004F01FE543 +:10C5C00077E5000004F01FE5C7E5000004F01FE573 +:10C5D000BDE2000004F01FE5FDE5000004F01FE5EA +:10C5E00073EE000004F01FE5F1E5000004F01FE524 +:10C5F000C986310004F01FE57987310004F01FE59A +:10C60000A987310004F01FE513E7000004F01FE5DF +:10C61000A988020004F01FE5F189020004F01FE57B +:10C620002DEF000004F01FE51D65020004F01FE57A +:10C63000FBA1020004F01FE5AD52000004F01FE56D +:10C640004F16010004F01FE5B9A8020004F01FE531 +:10C650002553000004F01FE53508010004F01FE534 +:10C660004560020004F01FE5ADEE000004F01FE598 +:10C67000F5E6000004F01FE5F9A1020004F01FE553 +:10C68000B1F5010004F01FE581F5010004F01FE59C +:10C690009DF5010004F01FE5DFFC300004F01FE50C +:10C6A000EBFC300004F01FE5311C010004F01FE535 +:10C6B000E76B020004F01FE54BCE020004F01FE51B +:10C6C00053CE020004F01FE5C7CF020004F01FE5BF +:10C6D000B9DF010004F01FE50374020004F01FE558 +:10C6E0007B47020004F01FE59952030004F01FE5A8 +:10C6F0007528010004F01FE56711000004F01FE534 +:10C70000A127010004F01FE5A3A4020004F01FE527 +:10C710006578030004F01FE59F86000004F01FE524 +:10C72000DFE6020004F01FE5AFA8030004F01FE5F8 +:10C730003F76010004F01FE58152010004F01FE57F +:10C740005120020004F01FE58F7D300004F01FE54A +:10C7500067F4010004F01FE595F4010004F01FE503 +:10C76000DF71010004F01FE539F4010004F01FE55A +:10C77000938A020004F01FE5FB00000004F01FE5AF +:10C78000399C300004F01FE58B9C300004F01FE55D +:10C79000C58A020004F01FE533FA300004F01FE5FB +:10C7A0009B12020004F01FE55700020004F01FE591 +:10C7B0002F5A010004F01FE5FD3C030004F01FE5C3 +:10C7C0008797300004F01FE54941310004F01FE570 +:10C7D000A5D0020004F01FE52955010004F01FE573 +:10C7E000979E310004F01FE59173310004F01FE5BE +:10C7F0000573310004F01FE55772310004F01FE5A6 +:10C80000116B300004F01FE5F1A9310004F01FE5C1 +:10C810001FAA310004F01FE51531010004F01FE5E7 +:10C82000A516020004F01FE523EE300004F01FE51A +:10C830009BF1300004F01FE51F07010004F01FE525 +:10C840005FEE300004F01FE523F3300004F01FE535 +:10C850008306010004F01FE517EE300004F01FE529 +:10C860008716020004F01FE52798310004F01FE549 +:10C87000F997310004F01FE5AF98310004F01FE58F +:10C88000DD97310004F01FE56B9A310004F01FE5DD +:10C89000F999310004F01FE54D9C310004F01FE5CB +:10C8A000E93F310004F01FE5E7E6020004F01FE570 +:10C8B000A71C010004F01FE53D1C010004F01FE56A +:10C8C000F534010004F01FE5E95B010004F01FE509 +:10C8D0004153310004F01FE56D98310004F01FE56D +:10C8E000E99E310004F01FE5F1CF020004F01FE5DE +:10C8F0008F98310004F01FE5D133010004F01FE5EB +:10C900007934010004F01FE57109030004F01FE50C +:10C910009715030004F01FE52960020004F01FE5ED +:10C920001B393100A1A9B46D01000000AC7601C033 +:10C930000004000095B47CE804F01FE5013101001B +:10C9400004F01FE55F65010004F01FE5AD4303003F +:10C9500004F01FE56F46030004F01FE54FF30300EA +:10C9600004F01FE5C314030004F01FE5759E3100B9 +:10C9700004F01FE55753310004F01FE5E1140300F4 +:10C9800004F01FE5F32D010004F01FE56B2E0100FC +:10C9900004F01FE51F11030004F01FE555450300D7 +:10C9A00004F01FE5A932010004F01FE5F7FD300097 +:10C9B00004F01FE54D30010004F01FE5EB8C300062 +:10C9C00004F01FE5598C300004F01FE57F8C300027 +:10C9D00004F01FE56D8C300004F01FE59B8C3000E7 +:10C9E00004F01FE5D98C300004F01FE5133D000072 +:10C9F00004F01FE5C4A9030004F01FE5352731004A +:10CA000004F01FE51527310004F01FE5ED27310084 +:10CA100004F01FE56796030004F01FE5FD91030095 +:10CA200004F01FE55196030004F01FE53FA7020044 +:10CA300004F01FE51551020004F01FE5D12C310070 +:10CA400004F01FE54F28310004F01FE57B31310071 +:10CA500004F01FE5372A310004F01FE5BD2B31003B +:10CA600004F01FE5232D310004F01FE57B2D31007C +:10CA700004F01FE5D72D310004F01FE5372E3100FB +:10CA800004F01FE5F72E310004F01FE59F3331005D +:10CA900004F01FE51534310004F01FE58B3431003C +:10CAA00004F01FE58396030004F01FE5E55502003E +:10CAB00004F01FE5C353020004F01FE541540200D7 +:10CAC00004F01FE555E60200000000002449643A26 +:10CAD0002077383838376F2D41322C20524638585D +:10CAE00058582C20465036382C2031352E36382ECA +:10CAF000372E7032333420240052433A202C2079D0 +:10CB0000686F752C20323031352F30382F31342C6E +:10CB10002031383A35353A3239000000B401A701E6 +:10CB2000070151048000DD00FAFFFFFF0000000054 +:10CB300000000000000000000000000006000000EF +:10CB40000600000006000000FAFFFFFF00000000E2 +:10CB5000060000000C00000012000000120000009F +:10CB60001200000012000000FAFFFFFF00000000AA +:10CB700000000000000000000000000006000000AF +:10CB80000600000006000000FAFFFFFF00000000A2 +:10CB9000060000000C00000012000000120000005F +:10CBA00012000000120000000600300078009D0016 +:10CBB000C400506F9A0A4449524543542D00000066 +:10CBC000011A00000000000000000000000000004A +:10CBD000000000000000000004003F0008005100B9 +:10CBE000420001004F002C005000280051001200AC +:10CBF00052003F0065001C0069001F00700020000B +:10CC0000D2000600D4001100D6001100D9000400A3 +:10CC1000DD002900020102000301E00015014E00C1 +:10CC2000470170004801E30049010C004E01040077 +:10CC30005B0160005C0163005D0124006001C000D5 +:10CC400061010300620124006401C000650163000A +:10CC5000660124006801C00069012F006A016C00B0 +:10CC60006C01C0006D0103006E019000890103009A +:10CC700096010200A1013300A2011300A401880063 +:10CC8000A6010E00A7013A00AA010500AC014C0064 +:10CC9000B2011000B5016A00C2016900C60191002D +:10CCA000C701D700DC01460011001300000100009D +:10CCB000030102001100230080010500810105002D +:10CCC000820105008301050084010500850105003E +:10CCD000860105008701050088010500890105001E +:10CCE0008A0105008B0105008C0105008D010500FE +:10CCF0008E0105008F0105009001050091010500DE +:10CD000092010500930105009401050095010500BD +:10CD1000960105009701050098010500990105009D +:10CD20009A0105009B0105009C0105009D0105007D +:10CD30009E010500C56EC86201000000A87A01C00E +:10CD400000040000B557D4629F010500A001B300A4 +:10CD5000A101B300A201B300A301B300A401B30079 +:10CD6000A501B300A601B300A701B300A801B30059 +:10CD7000A901B300AA01B300AB01B300AC01B30039 +:10CD8000AD01B300AE01B300AF01B300B001B30019 +:10CD9000B101B300B201B300B301B300B401B300F9 +:10CDA000B501B300B601B300B701B300B801B300D9 +:10CDB000B901B300BA01B300BB01B300BC01B300B9 +:10CDC000BD01B300BE01B300BF01B300C001AE009E +:10CDD000C101AE00C201AE00C301AE00C401AE008D +:10CDE000C501AE00C601AE00C701AE00C801AE006D +:10CDF000C901AE00CA01AE00CB01AE00CC01AE004D +:10CE0000CD01AE00CE01AE00CF01AE00D001AE002C +:10CE1000D101AE00D201AE00D301AE00D401AE000C +:10CE2000D501AE00D601AE00D701AE00D801AE00EC +:10CE3000D901AE00DA01AE00DB01AE00DC01AE00CC +:10CE4000DD01AE00DE01AE00DF01AE001100030027 +:10CE5000FFFFFF0008005100500028007000200074 +:10CE6000D90004004801E3004E01040056013C00D3 +:10CE70005701D9005B0160005C0163006001C000E4 +:10CE8000610103006401C000650163006801C00026 +:10CE900069012F006C01C0006D010300AA010500AB +:10CEA000A1013300A2011300A4018800A6010E0015 +:10CEB000A7013A00AA010500AC014C00B401000032 +:10CEC000B5016A00C2016900DC014600FFFFFF00F6 +:10CED0001100230000013900040139000801390064 +:10CEE0000C01390010013900140139001801390012 +:10CEF0001C013900200139002401390028013900C2 +:10CF00002C01390030013900340139003801390071 +:10CF10003C01390040013900440139004801390021 +:10CF20004C013900800105008101050082010500E6 +:10CF300083010500840105008501050086010500C7 +:10CF40008701050088010500890105008A010500A7 +:10CF50008B0105008C0105008D0105008E01050087 +:10CF60008F01050090010500910105009201050067 +:10CF70009301050094010500950105009601050047 +:10CF80009701050098010500990105009A01050027 +:10CF90009B0105009C0105009D0105009E01050007 +:10CFA0009F010500A001B300A101B700A201B700D5 +:10CFB000A301B300A401B300A501B300A601B3000F +:10CFC000A701B300A801B300A901B300AA01B300EF +:10CFD000AB01B300AC01B700AD01B700AE01B300C7 +:10CFE000AF01B300B001B300B101B300B201B300AF +:10CFF000B301B300B401B300B501B300B601B3008F +:10D00000B701B300B801B300B901B300BA01B3006E +:10D01000BB01B300BC01B300BD01B300BE01B3004E +:10D02000BF01B30011000300FFFFFF000201020077 +:10D030002F0100003101000049010C005D012400B6 +:10D0400062012400660124006A016C006E019000F8 +:10D050008901030011001300030102001100030005 +:10D06000FFFFFF00FFFFFF00C001AE00C101AE00E7 +:10D07000C201AE00C301AE00C401AE00C501AE00E6 +:10D08000C601AE00C701AE00C801AE00C901AE00C6 +:10D09000CA01AE00CB01AE00CC01AE00CD01AE00A6 +:10D0A000CE01AE00CF01AE00D001AE00D101AE0086 +:10D0B000D201AE00D301AE00D401AE00D501AE0066 +:10D0C000D601AE00D701AE00D801AE00D901AE0046 +:10D0D000DA01AE00DB01AE00DC01AE00DD01AE0026 +:10D0E000DE01AE00DF01AE00C001AE00C101AE0046 +:10D0F000C201AE00C301AE00C401AE00C501AE0066 +:10D10000C601AE00C701AE00C801AE00C901AE0045 +:10D11000CA01AE00CB01AE00CC01AE00CD01AE0025 +:10D12000CE01AE00CF01AE00D001AE00D101AE0005 +:10D13000D201AE00D301AE00D401AE00D501AE00E5 +:10D14000D601AE00BFD0CD6001000000A47E01C0BA +:10D15000000400003201DA30D701AE00D801AE0081 +:10D16000D901AE00DA01AE00DB01AE00DC01AE0099 +:10D17000DD01AE00DE01AE00DF01AE000201030002 +:10D180002F01F9003101F900490106005D016D0030 +:10D1900062016D0066016D006A016D006E01910013 +:10D1A00089010400110013000301030011000300B2 +:10D1B000FFFFFF00FFFFFF00C001CE00C101CE0056 +:10D1C000C201CE00C301CE00C401CE00C501CE0015 +:10D1D000C601CE00C701CE00C801CE00C901CE00F5 +:10D1E000CA01CE00CB01CE00CC01CE00CD01CE00D5 +:10D1F000CE01CE00CF01CE00D001CE00D101CE00B5 +:10D20000D201CE00D301CE00D401CE00D501CE0094 +:10D21000D601CE00D701CE00D801CE00D901CE0074 +:10D22000DA01CE00DB01CE00DC01CE00DD01CE0054 +:10D23000DE01CE00DF01CE00C001CE00C101CE0074 +:10D24000C201CE00C301CE00C401CE00C501CE0094 +:10D25000C601CE00C701CE00C801CE00C901CE0074 +:10D26000CA01CE00CB01CE00CC01CE00CD01CE0054 +:10D27000CE01CE00CF01CE00D001CE00D101CE0034 +:10D28000D201CE00D301CE00D401CE00D501CE0014 +:10D29000D601CE00D701CE00D801CE00D901CE00F4 +:10D2A000DA01CE00DB01CE00DC01CE00DD01CE00D4 +:10D2B000DE01CE00DF01CE0011001300BB018000B3 +:10D2C00011000300FFFFFF0011001300BB0100006D +:10D2D00011000300FFFFFF000800D10050002400F0 +:10D2E00070004000D9001300480100004E01060004 +:10D2F00056012C005701DA005B0130005C0112007E +:10D30000600160006101020064016000650162006B +:10D310006801600069012E006C0160006D0102006F +:10D32000A1017300A2011C00A6010D00A701360097 +:10D33000AA010500AC013800B4010000C201590087 +:10D34000DC01460011001300BB01000011000300C6 +:10D35000FFFFFF00110023000001500004015000F6 +:10D36000080150000C015000100150001401500041 +:10D37000180150001C0150002001500024015000F1 +:10D38000280150002C0150003001500034015000A1 +:10D39000380150003C015000400150004401500051 +:10D3A000480150004C015000800107008101070036 +:10D3B000820107008301070084010700850107003F +:10D3C000860107008701070088010700890107001F +:10D3D0008A0107008B0107008C0107008D010700FF +:10D3E0008E0107008F0107009001070091010700DF +:10D3F00092010700930107009401070095010700BF +:10D40000960107009701070098010700990107009E +:10D410009A0107009B0107009C0107009D0107007E +:10D420009E0107009F01070011000300FFFFFF009E +:10D43000020102002F0100003101000049014C00EF +:10D440005D01240062012400660124006A016C0071 +:10D450006E01900089010300A401880011001300EF +:10D460000301020011000300FFFFFF001100230071 +:10D47000A001AE00A101AE00A201AE00A301AE006A +:10D48000A401AE00A501AE00A601AE00A701AE004A +:10D49000A801AE00A901AE00AA01AE00AB01AE002A +:10D4A000AC01AE00AD01AE00AE01AE00AF01AE000A +:10D4B000B001AE00B101AE00B201AE00B301AE00EA +:10D4C000B401AE00B501AE00B601AE00B701AE00CA +:10D4D000B801AE00B901AE00BA01AE00BB01AE00AA +:10D4E000BC01AE00BD01AE00BE01AE00BF01AE008A +:10D4F00011000300FFFFFF00C001AD00C101AD003E +:10D50000C201AD00C301AD00C401AD00C501AD0055 +:10D51000C601AD00C701AD00C801AD00C901AD0035 +:10D52000CA01AD00CB01AD00CC01AD00CD01AD0015 +:10D53000CE01AD00CF01AD00D001AD00D101AD00F5 +:10D54000D201AD00D301AD00D401AD00D501AD00D5 +:10D55000D601AD00FDB7D5D601000000A08201C004 +:10D560000004000085EC60D5D701AD00D801AD0006 +:10D57000D901AD00DA01AD00DB01AD00DC01AD0089 +:10D58000DD01AD00DE01AD00DF01AD00C001AD0089 +:10D59000C101AD00C201AD00C301AD00C401AD00C9 +:10D5A000C501AD00C601AD00C701AD00C801AD00A9 +:10D5B000C901AD00CA01AD00CB01AD00CC01AD0089 +:10D5C000CD01AD00CE01AD00CF01AD00D001AD0069 +:10D5D000D101AD00D201AD00D301AD00D401AD0049 +:10D5E000D501AD00D601AD00D701AD00D801AD0029 +:10D5F000D901AD00DA01AD00DB01AD00DC01AD0009 +:10D60000DD01AD00DE01AD00DF01AD000201030070 +:10D610002F01F9003101F900490146005D016D005B +:10D6200062016D0066016D006A016D006E0191007E +:10D6300089010400A4018800110013000301030004 +:10D6400011000300FFFFFF0011002300A001AE0046 +:10D65000A101AE00A201AE00A301AE00A401AE0084 +:10D66000A501AE00A601AE00A701AE00A801AE0064 +:10D67000A901AE00AA01AE00AB01AE00AC01AE0044 +:10D68000AD01AE00AE01AE00AF01AE00B001AE0024 +:10D69000B101AE00B201AE00B301AE00B401AE0004 +:10D6A000B501AE00B601AE00B701AE00B801AE00E4 +:10D6B000B901AE00BA01AE00BB01AE00BC01AE00C4 +:10D6C000BD01AE00BE01AE00BF01AE0011000300FF +:10D6D000FFFFFF00C001CD00C101CD00C201CD00A0 +:10D6E000C301CD00C401CD00C501CD00C601CD00F0 +:10D6F000C701CD00C801CD00C901CD00CA01CD00D0 +:10D70000CB01CD00CC01CD00CD01CD00CE01CD00AF +:10D71000CF01CD00D001CD00D101CD00D201CD008F +:10D72000D301CD00D401CD00D501CD00D601CD006F +:10D73000D701CD00D801CD00D901CD00DA01CD004F +:10D74000DB01CD00DC01CD00DD01CD00DE01CD002F +:10D75000DF01CD00C001CD00C101CD00C201CD006F +:10D76000C301CD00C401CD00C501CD00C601CD006F +:10D77000C701CD00C801CD00C901CD00CA01CD004F +:10D78000CB01CD00CC01CD00CD01CD00CE01CD002F +:10D79000CF01CD00D001CD00D101CD00D201CD000F +:10D7A000D301CD00D401CD00D501CD00D601CD00EF +:10D7B000D701CD00D801CD00D901CD00DA01CD00CF +:10D7C000DB01CD00DC01CD00DD01CD00DE01CD00AF +:10D7D000DF01CD00020104002F01F6003101F60047 +:10D7E000490106005D01920062019200660192000B +:10D7F0006A0192006E01920089010400A401880070 +:10D80000AA01070011001300030104001100030026 +:10D81000FFFFFF0011002300A001BD00A101BD001A +:10D82000A201BD00A301BD00A401BD00A501BD0072 +:10D83000A601BD00A701BD00A801BD00A901BD0052 +:10D84000AA01BD00AB01BD00AC01BD00AD01BD0032 +:10D85000AE01BD00AF01BD00B001BD00B101BD0012 +:10D86000B201BD00B301BD00B401BD00B501BD00F2 +:10D87000B601BD00B701BD00B801BD00B901BD00D2 +:10D88000BA01BD00BB01BD00BC01BD00BD01BD00B2 +:10D89000BE01BD00BF01BD0011000300FFFFFF007E +:10D8A000C001CD00C101CD00C201CD00C301CD003A +:10D8B000C401CD00C501CD00C601CD00C701CD001A +:10D8C000C801CD00C901CD00CA01CD00CB01CD00FA +:10D8D000CC01CD00CD01CD00CE01CD00CF01CD00DA +:10D8E000D001CD00D101CD00D201CD00D301CD00BA +:10D8F000D401CD00D501CD00D601CD00D701CD009A +:10D90000D801CD00D901CD00DA01CD00DB01CD0079 +:10D91000DC01CD00DD01CD00DE01CD00DF01CD0059 +:10D92000C001CD00C101CD00C201CD00C301CD00B9 +:10D93000C401CD00C501CD00C601CD00C701CD0099 +:10D94000C801CD00C901CD00CA01CD00CB01CD0079 +:10D95000CC01CD00CD01CD00CE01CD00CF01CD0059 +:10D96000D001CD00E5AECD04010000009C8601C0D1 +:10D9700000040000F0129B6DD101CD00D201CD005A +:10D98000D301CD00D401CD00D501CD00D601CD000D +:10D99000D701CD00D801CD00D901CD00DA01CD00ED +:10D9A000DB01CD00DC01CD00DD01CD00DE01CD00CD +:10D9B000DF01CD0011002300800125008101250039 +:10D9C00082012500830125008401250085012500B1 +:10D9D0008601250087012500880125008901250091 +:10D9E0008A0125008B0125008C0125008D01250071 +:10D9F0008E0125008F012500900125009101250051 +:10DA00009201250093012500940125009501250030 +:10DA10009601250097012500980125009901250010 +:10DA20009A0125009B0125009C0125009D012500F0 +:10DA30009E0125009F012500A001B200A101B200B6 +:10DA4000A201B200A301B200A401B200A501B2007C +:10DA5000A601B200A701B200A801B200A901B2005C +:10DA6000AA01B200AB01B200AC01B200AD01B2003C +:10DA7000AE01B200AF01B200B001B200B101B2001C +:10DA8000B201B200B301B200B401B200B501B200FC +:10DA9000B601B200B701B200B801B200B901B200DC +:10DAA000BA01B200BB01B200BC01B200BD01B200BC +:10DAB000BE01B200BF01B20011000300FFFFFF0072 +:10DAC000C001AA00C101AC00C201AC00C301AA00A0 +:10DAD000C401AA00C501AA00C601AA00C701CA0064 +:10DAE000C801CA00C901CA00CA01CA00CB01CA00E4 +:10DAF000CC01CC00CD01CC00CE01AA00CF01AA0000 +:10DB0000D001AA00D101AA00D201AA00D301AA0023 +:10DB1000D401AA00D501AA00D601AA00D701AA0003 +:10DB2000D801AA00D901AA00DA01AA00DB01AA00E3 +:10DB3000DC01AA00DD01AA00DE01AA00DF01AA00C3 +:10DB4000C001AA00C101AC00C201AC00C301AA001F +:10DB5000C401AA00C501AA00C601AA00C701CA00E3 +:10DB6000C801CA00C901CA00CA01CA00CB01CA0063 +:10DB7000CC01CC00CD01CC00CE01AA00CF01AA007F +:10DB8000D001AA00D101AA00D201AA00D301AA00A3 +:10DB9000D401AA00D501AA00D601AA00D701AA0083 +:10DBA000D801AA00D901AA00DA01AA00DB01AA0063 +:10DBB000DC01AA00DD01AA00DE01AA00DF01AA0043 +:10DBC000C001AA00C101AC00C201AC00C301AA009F +:10DBD000C401AA00C501AA00C601AA00C701CA0063 +:10DBE000C801CA00C901CA00CA01CA00CB01CA00E3 +:10DBF000CC01CC00CD01CC00CE01AA00CF01AA00FF +:10DC0000D001AA00D101AA00D201AA00D301AA0022 +:10DC1000D401AA00D501AA00D601AA00D701AA0002 +:10DC2000D801AA00D901AA00DA01AA00DB01AA00E2 +:10DC3000DC01AA00DD01AA00DE01AA00DF01AA00C2 +:10DC4000C001AA00C101AC00C201AC00C301AA001E +:10DC5000C401AA00C501AA00C601AA00C701CA00E2 +:10DC6000C801CA00C901CA00CA01CA00CB01CA0062 +:10DC7000CC01CC00CD01CC00CE01AA00CF01AA007E +:10DC8000D001AA00D101AA00D201AA00D301AA00A2 +:10DC9000D401AA00D501AA00D601AA00D701AA0082 +:10DCA000D801AA00D901AA00DA01AA00DB01AA0062 +:10DCB000DC01AA00DD01AA00DE01AA00DF01AA0042 +:10DCC0001100230080012700810127008201270025 +:10DCD0008301270084012700850127008601270092 +:10DCE0008701270088012700890127008A01270072 +:10DCF0008B0127008C0127008D0127008E01270052 +:10DD00008F01270090012700910127009201270031 +:10DD10009301270094012700950127009601270011 +:10DD20009701270098012700990127009A012700F1 +:10DD30009B0127009C0127009D0127009E012700D1 +:10DD40009F012700A001AC00A101AC00A201AC0022 +:10DD5000A301AC00A401AC00A501AC00A601AC007D +:10DD6000A701AC00A801AC00A901AC00AA01AC005D +:10DD7000AB01AC0002D7F27301000000988A01C029 +:10DD800000040000D0F133E7AC01AC00AD01AC0001 +:10DD9000AE01BB00AF01BB00B001BB00B101BB00D5 +:10DDA000B201BB00B301BB00B401BB00B501BB00B5 +:10DDB000B601BB00B701BB00B801BB00B901BB0095 +:10DDC000BA01BB00BB01BB00BC01BB00BD01BB0075 +:10DDD000BE01BB00BF01BB0011000300FFFFFF003D +:10DDE000C001AB00C101AB00C201AB00C301AB007D +:10DDF000C401AB00C501AB00C601AB00C701CB003D +:10DE0000C801CB00C901CB00CA01CB00CB01CB00BC +:10DE1000CC01CB00CD01CB00CE01CD00CF01CD0098 +:10DE2000D001CD00D101CD00D201CD00D301CD0074 +:10DE3000D401CD00D501CD00D601CD00D701CD0054 +:10DE4000D801CD00D901CD00DA01CD00DB01CD0034 +:10DE5000DC01CD00DD01CD00DE01CD00DF01CD0014 +:10DE6000C001AB00C101AB00C201AB00C301AB00FC +:10DE7000C401AB00C501AB00C601AB00C701CB00BC +:10DE8000C801CB00C901CB00CA01CB00CB01CB003C +:10DE9000CC01CB00CD01CB00CE01CD00CF01CD0018 +:10DEA000D001CD00D101CD00D201CD00D301CD00F4 +:10DEB000D401CD00D501CD00D601CD00D701CD00D4 +:10DEC000D801CD00D901CD00DA01CD00DB01CD00B4 +:10DED000DC01CD00DD01CD00DE01CD00DF01CD0094 +:10DEE000C001AB00C101AB00C201AB00C301AB007C +:10DEF000C401AB00C501AB00C601AB00C701CB003C +:10DF0000C801CB00C901CB00CA01CB00CB01CB00BB +:10DF1000CC01CB00CD01CB00CE01CD00CF01CD0097 +:10DF2000D001CD00D101CD00D201CD00D301CD0073 +:10DF3000D401CD00D501CD00D601CD00D701CD0053 +:10DF4000D801CD00D901CD00DA01CD00DB01CD0033 +:10DF5000DC01CD00DD01CD00DE01CD00DF01CD0013 +:10DF6000C001AB00C101AB00C201AB00C301AB00FB +:10DF7000C401AB00C501AB00C601AB00C701CB00BB +:10DF8000C801CB00C901CB00CA01CB00CB01CB003B +:10DF9000CC01CB00CD01CB00CE01CD00CF01CD0017 +:10DFA000D001CD00D101CD00D201CD00D301CD00F3 +:10DFB000D401CD00D501CD00D601CD00D701CD00D3 +:10DFC000D801CD00D901CD00DA01CD00DB01CD00B3 +:10DFD000DC01CD00DD01CD00DE01CD00DF01CD0093 +:10DFE000C001AB00C101AB00C201AB00C301AB007B +:10DFF000C401AB00C501AB00C601AB00C701CB003B +:10E00000C801CB00C901CB00CA01CB00CB01CB00BA +:10E01000CC01CB00CD01CB00CE01CD00CF01CD0096 +:10E02000D001CD00D101CD00D201CD00D301CD0072 +:10E03000D401CD00D501CD00D601CD00D701CD0052 +:10E04000D801CD00D901CD00DA01CD00DB01CD0032 +:10E05000DC01CD00DD01CD00DE01CD00DF01CD0012 +:10E06000C001AB00C101AB00C201AB00C301AB00FA +:10E07000C401AB00C501AB00C601AB00C701CB00BA +:10E08000C801CB00C901CB00CA01CB00CB01CB003A +:10E09000CC01CB00CD01CB00CE01CD00CF01CD0016 +:10E0A000D001CD00D101CD00D201CD00D301CD00F2 +:10E0B000D401CD00D501CD00D601CD00D701CD00D2 +:10E0C000D801CD00D901CD00DA01CD00DB01CD00B2 +:10E0D000DC01CD00DD01CD00DE01CD00DF01CD0092 +:10E0E0000000000000000000000000000000000030 +:10E0F000B8C801C0FF0100070707000300030007BD +:10E1000000030007040500070607000800020008D6 +:10E1100003040008050700080002010803040108C1 +:10E1200005070109000200090304000905070009A9 +:10E130000809000900020109030401090507010992 +:10E14000080901090002020903040209050702097E +:10E150000809020A141414141414141414141414B2 +:10E160001414141414140A14141414141414141479 +:10E17000141414141414141414011211110F111185 +:10E180000F0F0F0D82F23A7A01000000948E01C049 +:10E190000004000057A73DB5021211110F11110F15 +:10E1A0000F0F0D031211110F11110F0F0F0D04128C +:10E1B00011110F11110F0F0F0D051211110F111168 +:10E1C0000F0F0F0D061211110F11110F0F0F0D0769 +:10E1D0001211110F11110F0F0F0D081211110F1144 +:10E1E000110F0F0F0D091211110F11110F0F0F0D3C +:10E1F0000A1211110F11110F0F0F0D0B1211110F28 +:10E2000011110F0F0F0D0C1211110F11110F0F0F14 +:10E210000D0D1211110F11110F0F0F0D0E12111103 +:10E220000F11110F0F0F0D240F0F0F0D0F0F0D0DED +:10E230000D0B0B0A0B0B0B08280F0F0F0D0F0F0DFB +:10E240000D0D0B0B0A0B0B0B082C0F0F0F0D0F0FE7 +:10E250000D0D0D0B0B0A0B0B0B08300F0F0F0D0FD5 +:10E260000F0D0D0D0B0B0A0B0B0B08340F0F0F0DC1 +:10E270000F0F0D0D0D0B0B0A0B0B0B08380F0F0FAB +:10E280000D0F0F0D0D0D0B0B0A0B0B0B083C0F0F99 +:10E290000F0D0F0F0D0D0D0B0B0A0B0B0B08400F85 +:10E2A0000F0F0D0F0F0D0D0D0B0B0A0B0B0B086451 +:10E2B0000F0F0F0D0F0F0D0D0D0B0B0A0B0B0B0896 +:10E2C000680F0F0F0D0F0F0D0D0D0B0B0A0B0B0B26 +:10E2D000086C0F0F0F0D0F0F0D0D0D0B0B0A0B0B15 +:10E2E0000B08700F0F0F0D0F0F0D0D0D0B0B0A0B01 +:10E2F0000B0B08740F0F0F0D0F0F0D0D0D0B0B0AED +:10E300000B0B0B08780F0F0F0D0F0F0D0D0D0B0BD7 +:10E310000A0B0B0B087C0F0F0F0D0F0F0D0D0D0BC4 +:10E320000B0A0B0B0B08800F0F0F0D0F0F0D0D0DB0 +:10E330000B0B0A0B0B0B08840F0F0F0D0F0F0D0D9E +:10E340000D0B0B0A0B0B0B08880F0F0F0D0F0F0D8A +:10E350000D0D0B0B0A0B0B0B088C0F0F0F0D0F0F76 +:10E360000D0D0D0B0B0A0B0B0B08950F0F0F0D0F5F +:10E370000F0D0D0D0B0B0A0B0B0B08990F0F0F0D4B +:10E380000F0F0D0D0D0B0B0A0B0B0B089D0F0F0F35 +:10E390000D0F0F0D0D0D0B0B0A0B0B0B08A10F0F23 +:10E3A0000F0D0F0F0D0D0D0B0B0A0B0B0B08A50F0F +:10E3B0000F0F0D0F0F0D0D0D0B0B0A0B0B0B08B7ED +:10E3C0000F0F0F0D0F0F0D0D0D0B0B0A0B0B0B0885 +:10E3D000B80F0F0F0D0F0F0D0D0D0B0B0A0B0B0BC5 +:10E3E00008B90F0F0F0D0F0F0D0D0D0B0B0A0B0BB7 +:10E3F0000B08BB0F0F0F0D0F0F0D0D0D0B0B0A0BA5 +:10E400000B0B08BC0F0F0F0D0F0F0D0D0D0B0B0A93 +:10E410000B0B0B08BD0F0F0F0D0F0F0D0D0D0B0B81 +:10E420000A0B0B0B08C00F0F0F0D0F0F0D0D0D0B6F +:10E430000B0A0B0B0B08C40F0F0F0D0F0F0D0D0D5B +:10E440000B0B0A0B0B0B08070F0F0F0D0F0F0D0D0A +:10E450000D0B0B0A0B0B0B08080F0F0F0D0F0F0DF9 +:10E460000D0D0B0B0A0B0B0B080B0F0F0F0D0F0FE6 +:10E470000D0D0D0B0B0A0B0B0B080C0F0F0F0D0FD7 +:10E480000F0D0D0D0B0B0A0B0B0B08100F0F0F0DC3 +:10E490000F0F0D0D0D0B0B0A0B0B0B08220F0F0F9F +:10E4A0000D0F0F0D0D0D0B0B0A0B0B0B08900F0F23 +:10E4B0000F0D0F0F0D0D0D0B0B0A0B0B0B080300AF +:10E4C000000102030A0708090B0707070C0D0E0FCE +:10E4D0000CFFFFFF040506FFFFFFFFFF080808FF12 +:10E4E000FFFFFF0D00000000000000009D2B00C09A +:10E4F000BD550000352400C0054500C0A53C00C046 +:10E50000442A00C0D12A00C0632400C06B2B00C085 +:10E510007D2600C0954300C0F72A00C0000000001F +:10E5200019E900C031E900C0D94200C0594300C018 +:10E530007F4300C000000000000000000000000059 +:10E5400000000000BA1A02001E021432000000008F +:10E550000032000000000000003200000000000057 +:10E560000002142075813F12141CE5826003020032 +:10E5700038E4787FF6D8FDC203C2040200381200E6 +:10E580003D80FE753400C208E4F535F536C209C297 +:10E590000A75370E8746FA2201000000909201C0EA +:10E5A00000040000913662F375380C75390A753A2B +:10E5B00008753B06753C04753D02753E01752CFFE0 +:10E5C000752DFF7530C97531FF752E59752FFF7583 +:10E5D0002A1F752B00753280C206C207C200C20115 +:10E5E000C20275260190F0B2E0FC4420F0758E0066 +:10E5F00075860075880075890090F0B2E0FC444093 +:10E60000F0E5B05430700790F0B1E4F080F3E5F13C +:10E61000FC24D740F9EC240983C0E0EC242C83C00F +:10E62000E0221AA9CC448C3E34197A327F19D25692 +:10E63000769CB9D94D70A4B897010101010101017F +:10E64000014D01D246B4BF92B3F919010101020292 +:10E650000503140506071407030A0A0A0A0B0B0B25 +:10E660000B0F14141414141414140D140B080402B6 +:10E6700009050A0B75DE0075E40075DB0075E30023 +:10E6800075E60075DC0075DA0075DD0090F005E0D8 +:10E69000FC530420BC2002800575D900800375D985 +:10E6A0000330082890F07BE0FC530401BC01089083 +:10E6B000F0B2E0FC54DFF090F0B2E0FC4440F0E552 +:10E6C000B05430700790F0B1E4F080F3D20890F0CD +:10E6D0004BE0FC530420BC200575F2FF800375F26B +:10E6E000FB75F403D2AF90F007E0FC5304C0BC40CC +:10E6F00002800D90F055E0FC75F10390F055ECF0C0 +:10E7000075F10175D907D2A790FF9C12169CC2A77C +:10E7100090F005E0FC530420BC2002800690FD66CA +:10E7200012169C75F102C20490F005E0FC53040837 +:10E73000BC080575D917800375D90790F005E0FC72 +:10E74000530480BC800343D92030CE0575DAB780EE +:10E750000375DAB375DD0390F003E0FC30E00343AA +:10E76000DD1090F003E0FC30E40343DD2090FF9CDB +:10E7700012169C75E70190F007E0FC5304C0BC4002 +:10E780000675F1240200B490F007E0FC5304C0BC0D +:10E79000800675F1040200B475F1030200B4C203EF +:10E7A000C202752601E5C820E43690F040E0FC5333 +:10E7B0000404BC042B90FC18121AA8D2A0752301E3 +:10E7C00075240F7525007510B77511F090F055126E +:10E7D00017BC92B7C2A0C28EC28FC200C201C202D1 +:10E7E00043E70275F10490F007E0FC5304C0BC401D +:10E7F0000330041B90F05BE0FC530480BC8010D21B +:10E80000C275DC0775DE0F75E40ED2C375E301C275 +:10E8100003C20275260175F12453DDFB43DD045369 +:10E82000DDFB43DD04753F0075821312166290F024 +:10E8300007E0FC5304C0BC400E20040B753F087574 +:10E8400082001216628015753F00758200121662F2 +:10E8500090F0EBE0F5ED90F0EAE0F5EE7582001255 +:10E860001688E5824402F53F75820012166290FF19 +:10E87000F312169C90F007E0FC5304C0BC40092042 +:10E88000040675F11F0200B475F1060200B4E5C874 +:10E890005430701490F0D2E0FC530480BC8004909B +:10E8A000F040E075E2018005E5D130E0FB75F10D47 +:10E8B00090F041E0FC530440BC400280030203EEB0 +:10E8C00090F003E0FC20E4030203EE75DE0875DC43 +:10E8D00002D2C175247F752500752706752620751F +:10E8E00023027516417517F190F1CA12194E75C0C1 +:10E8F000017527067526207523017516417517F1D8 +:10E9000090F1C812194E75E40C75C02075247F75FE +:10E910002500752706752620752302751641751783 +:10E92000F190F1CB12194E75C0107527067526208F +:10E930007523017516417517F190F1C912194E75BD +:10E94000C00075DE0075E404C28EC28FC20243E7C8 +:10E950004090F041E0FC530480BC8002800302043C +:10E96000A590F007E0FC53041090F008E0FD7480DF +:10E970005D4C700B90F007E0FC530402BC00F59076 +:10E98000F003E0FC30E07843DC7E43E60675E40407 +:10E9900075E80275247F7525007527067526207594 +:10E9A0002308751698471CE3010000008C9601C0EF +:10E9B00000040000BBB8CB6A417517F190F19212C8 +:10E9C000194E75E8017527067526207523047516FE +:10E9D000417517F190F18E12194E75E80875247F74 +:10E9E000752500752706752620752308751641754F +:10E9F00017F190F19312194E75E8047527067526E4 +:10EA0000207523047516417517F190F18F12194E78 +:10EA100075E80043E72075E40075DC0075E60075D5 +:10EA2000F123E5C85430705BC20290F04BE0FC5318 +:10EA30000410BC103990FD66121AA87582011216D6 +:10EA400088AC828CF9530401E4A20233FD4C60EBE4 +:10EA500030020675F1240200B490FF5A12169C751C +:10EA600082011216888582F975F1050200B490FFC3 +:10EA70005A12169C7582011216888582F975F10565 +:10EA80000200B430FAFDC2C375DE0075E40075E320 +:10EA90000075DC00C2C2E5C820E40675F10C020076 +:10EAA000B430FB030200B475F10C80F575260190BB +:10EAB000F040E0FC530402BC022B90FACA121AA8E0 +:10EAC000D2A275230875243F7525007510B77511FE +:10EAD000F090F0561217BC92B7C2A2C28EC28FC27B +:10EAE00000C201C20275F10890F040E0FC5304102E +:10EAF000BC102B90FACA121AA8D2A4752320752430 +:10EB00001F7525007510B77511F090F0541217BCE1 +:10EB100092B7C2A4C28EC28FC200C201C20275F1F6 +:10EB20002690F041E0FC530402BC027190FD651296 +:10EB30001AA890F0A6740AF0D2A175240F752500CA +:10EB40007526017523027510B77511F090F0A612A5 +:10EB500017BC92B7C2A1C28EC28FC200C201C2024C +:10EB600090F06AE0FCC4540FFC90F0A6E0FDEC309D +:10EB7000E318740FC39C04FE53060FC3ED9E5004AC +:10EB80007D008014EDC39EFD800E74075CFE2DFF9A +:10EB90008F0524F050027D0F90F0A6EDF075F1097D +:10EBA00090F041E0FD530510BD100280030207798B +:10EBB0003009030206CDD2A5D2B2D2B0753F11758D +:10EBC0008202121662758226121688E582541FF59B +:10EBD000EE753F01758202121662E5EE0303543FA3 +:10EBE000FD2437F890F072E6F090FFF912169C12AF +:10EBF000165485823585833690F072E0FDBD0F0096 +:10EC0000503290F072E0FD90F07274012DF0121607 +:10EC100054AD82AF83C3E5359DE5369F50088D35F1 +:10EC20008F36D20A801090F072E0FA1490F072F0F1 +:10EC3000C20A8002C20AD2090200B4300A5690F019 +:10EC400072E0FABA0F00503E90F072E0FA90F07263 +:10EC500074012AF0121654AD82AF83C3E5359DE5E9 +:10EC6000369F500A8D358F3675F1090200B490F049 +:10EC700072E0FA1490F072F075F10AC2B0C2B2C23A +:10EC800009C2A50200B475F10AC2B0C2B2C209C27B +:10EC9000A50200B490F072E0FA603E90F072E0FAE3 +:10ECA0001490F072F0121654AD82AF83C3E5359D17 +:10ECB000E5369F500A8D358F3675F1090200B49004 +:10ECC000F072E0FA90F07274012AF075F10AC2B0A5 +:10ECD000C2B2C209C2A50200B475F10AC2B0C2B282 +:10ECE000C209C2A50200B475F10A0200B4C203C28F +:10ECF0000275260190F041E0FA530208BA082B9001 +:10ED0000FD65121AA8D2B375238075240F752500EE +:10ED10007510B77511F090F0711217BC92B7C2B3AD +:10ED2000C28EC28FC200C201C20243E704C2C375D1 +:10ED3000DE0075E40075E30075DC00C2C275F10CFD +:10ED4000C203C20275260190F041E0FA530220BAD4 +:10ED5000204C30CE4990FD65121AA8D2A675240F1A +:10ED600075250090F008E0FA530280BA80137523ED +:10ED7000047510B87511F090F06D1217BC92B78041 +:10ED8000117523027510B87511F090F06D1217BC53 +:10ED900092B7C2A6C28EC28FC200C201C202E5C82B +:10EDA00020E40343E708741055C8FABA100343E798 +:10EDB0001075F1226188F37701000000889A01C084 +:10EDC000000400009B5B63E090F041E0FA53020412 +:10EDD000BA0402800302098C75DC2075DE0D75E42F +:10EDE0000FD2C3ADD2AFD3D2B2D2B0C2CFD2C675DA +:10EDF0002707752640E5276047C005C0071216544F +:10EE0000858235858336D007D005C3E5359DE53647 +:10EE10009F500E90F19CE0FA90F19CE5262AF0803C +:10EE200015C3ED9535EF9536500C90F19CE0FA90B6 +:10EE3000F19CC39526F0E526C313F526152780B56A +:10EE4000C005C007121654858235858336D007D099 +:10EE500005C3E5359DE5369F500C90F19CE0FA9096 +:10EE6000F19CE5262AF0C005C0071216548582D40D +:10EE70008583D5D007D005D2CF752707752640E505 +:10EE8000276047C005C00712165485823585833632 +:10EE9000D007D005C3E5359DE5369F500E90F19C17 +:10EEA000E0FA90F19CE5262AF08015C3ED9535EF48 +:10EEB0009536500C90F19CE0FA90F19CC39526F0A9 +:10EEC000E526C313F526152780B5C005C007121621 +:10EED00054858235858336D007D005C3E5359DE559 +:10EEE000369F500C90F19CE0FA90F19CE5262AF0B8 +:10EEF0001216548582D68583D7C2C6C2CFC2B0C28D +:10EF0000B2C2C375DC0075DE0075E400C2CF75E2E5 +:10EF10000275F125C283C281C28275F10D90F1782C +:10EF2000E0FA30E00675DC0175E60175E40490F066 +:10EF300041E0FA530280BA80028003020A5A90F03C +:10EF400007E0FA53021090F008E0FB74805B4A700F +:10EF50000B90F007E0FA530202BA00F590F003E0DC +:10EF6000FA30E07843DC7E43E60675E40475E82079 +:10EF700075247F752500752706752620752308756D +:10EF800016417517F190F19412194E75E810752716 +:10EF9000067526207523047516417517F190F190BA +:10EFA00012194E75E88075247F7525007527067542 +:10EFB00026207523087516417517F190F1951219E1 +:10EFC0004E75E84075270675262075230475164191 +:10EFD0007517F190F19112194E75E80043E7809092 +:10EFE000F007E0FA5302C0BAC00575F10E80037550 +:10EFF000F11675E7000200B475E72075F80075E7B3 +:10F000000075E60075DE0075DC3075E40C75E30311 +:10F0100090F047E0FA530210BA10F575F10F75E65B +:10F020000075DE0075DC3075E40C75E30390F04785 +:10F03000E0FA530210BA00F575F11075DC6F75E651 +:10F040000675DE0E75E40E75DB0175E30390F0477F +:10F05000E0FA530208BA08F575F11175DC6F75E630 +:10F060000675DE0E75E40E75DB0175E30390F0475F +:10F07000E0FA530208BA00F575F12775DC0075E671 +:10F080000675DE0F75E40E75DB0075E30090F04742 +:10F09000E0FA530201BA01F575F12875DC0075E656 +:10F0A0000675DE0F75E40E75DB0075E30090F04722 +:10F0B000E0FA530201BA00F590F005E0FA5302407D +:10F0C000BA400675F1120200B475F1160200B4756B +:10F0D000E60675DC6F75DE0E75E40E75DB0175E313 +:10F0E0000390F047E0FA530208BA08F575F11302ED +:10F0F00000B475E60675DC6F75DE0E75E40E75DB23 +:10F100000175E30390F047E0FA530208BA00F59066 +:10F11000F047E0FA530204BA040675F1140200B491 +:10F1200075F1160200B475DB0175E40A90F047E052 +:10F13000FA530204BA00F575F11575DB0175DC7F31 +:10F1400075E40E90F047E0FA530202BA00F575F14B +:10F15000160200B4C20375DE0090F178E0FA30E0E8 +:10F160000643DC0143E60190F041E0FA530280BA25 +:10F1700080028003020C9390F007E0FA5302109093 +:10F18000F008E0FB74805B4A700B90F007E0FA53E4 +:10F190000202BA00F590F003E0FA30E07843DC7E3A +:10F1A00043E60675E40475E80275247F752500754D +:10F1B00027067526207523087516417517F190F1FD +:10F1C0009212194EC8B31AAC01000000849E01C00F +:10F1D000000400001C0D6DB275E801752706752648 +:10F1E000207523047516417517F190F18E12194E92 +:10F1F00075E80875247F7525007527067526207526 +:10F2000023087516417517F190F19312194E75E8A0 +:10F21000047527067526207523047516417517F1A8 +:10F2200090F18F12194E75E80043E72090F041E00D +:10F23000FA530280BA80028003020D4490F007E086 +:10F24000FA53021090F008E0FB74805B4A700B9058 +:10F25000F007E0FA530202BA00F590F003E0FA304A +:10F26000E07843DC7E43E60675E40475E820752407 +:10F270007F752500752706752620752308751641AC +:10F280007517F190F19412194E75E81075270675EF +:10F2900026207523047516417517F190F190121907 +:10F2A0004E75E88075247F75250075270675262024 +:10F2B0007523087516417517F190F19512194E7561 +:10F2C000E8407527067526207523047516417517C5 +:10F2D000F190F19112194E75E80043E78075F1162F +:10F2E0000200B490F005E0FA30E403020F88C20394 +:10F2F00090F042E0FA530202BA0257D2A2D2A2D24E +:10F30000B2C2B290F0B7E0FA74185AFC90F056E02E +:10F31000FE90FFFFC004C00612169CD006D004BCAD +:10F32000180ABE3F04D2B780220E801FBC100AEE1E +:10F330007004D2B780151E8012C2A2C2A2C2A2C29D +:10F34000A290FFFFC00612169CD00690F056EEF079 +:10F35000C2A275DC0175E40490F043E0FA53028028 +:10F36000BA80028003020E6E90F103E0FA30E205EB +:10F3700075DC35800375DC3190F003E0FA5302014F +:10F38000BA017B75E80C90FFF612169CD2B2C2B29D +:10F3900090FFFF12169C90F141E0FA74045AFC9021 +:10F3A000F18FE0FEBC040ABE7F04D2B7800E0E804F +:10F3B0000BEC7008EE7004D2B780011E90F18FEE56 +:10F3C000F075E808D2B2C2B290FFFF12169C90F11D +:10F3D00041E0FA74085AFC90F193E0FEBC080ABEC2 +:10F3E0007F04D2B7800E0E800BEC7008EE7004D252 +:10F3F000B780011E90F193EEF075E800800690FF53 +:10F40000D712169C75DC0190F043E0FA530240BA23 +:10F4100040028003020F2075DE0890F103E0FA300D +:10F42000E30575E40E800375E40C90F003E0FA53F5 +:10F430000210BA107B75C03090FFF612169CD2B243 +:10F44000C2B290FFFF12169C90F141E0FA74015A8B +:10F45000FC90F1C9E0FEBC010ABE7F04D2B7800E69 +:10F460000E800BEC7008EE7004D2B780011E90F194 +:10F47000C9EEF075C020D2B2C2B290FFFF12169C46 +:10F4800090F141E0FA74025AFC90F1CBE0FEBC022C +:10F490000ABE7F04D2B7800E0E800BEC7008EE70AF +:10F4A00004D2B780011E90F1CBEEF075C00080064B +:10F4B00090FFD812169C75DC0075E40090F0DBE03C +:10F4C000FA20E75AD2A385308285318312169CD266 +:10F4D000B2C2B290FFFF12169C74075590FEBE0692 +:10F4E00013E5ED600415ED8033E5EE602F15EE7544 +:10F4F000ED078028BE051774E125ED400405ED8079 +:10F500001B74E125EE401505EE75ED10800EC2A3CB +:10F51000C2A3C2A3C2A390FFFF12169CC2A353E4CE +:10F5200006C283C281209602C28275F11675E2047A +:10F53000C20290F04BE0FA530210BA1062E5C854D0 +:10F5400030701D90FCE1121AA8758201121688AA6B +:10F55000828AF9530204E4A20233FB4A701580E95F +:10F5600090FCD4121AA8740855D1FAE4A20233FB15 +:10F570004A60F330021EC28EC28FC20275F8007557 +:10F58000E70075D10075E20075DC0075E60075F1E5 +:10F59000040200B4C28EC28FC20275E208800690D7 +:10F5A000FFDF12169C753F40758204121662753F8C +:10F5B0006075820412166290FF8812169C753F4097 +:10F5C00075820412166275822D121688AA828A0329 +:10F5D0007A0075821E72E45A0100000080A201C008 +:10F5E0000004000012B8C0DB2EC002C0031216884F +:10F5F000AC82D003D0027D00EC2AFAED3BFB758291 +:10F600002FC002C003121688AC82D003D0028C0532 +:10F610007C00758230C002C003C004C00512168889 +:10F62000AE82D005D004D003D0027F00EE2CFCEFD8 +:10F630003DFDEAC39CFAEB9DFBC374409AE49B50EA +:10F640001875F80075E70075D10075E20075DC00EB +:10F6500075E60075F1040200B4E5C85430703975E0 +:10F6600082011216888582F9753F11758202121681 +:10F67000627582271216888582ED75822612168899 +:10F68000E582541FF5EE7582281216888582FF7573 +:10F690003F21758202121662C203C20475F800751A +:10F6A000E70075D10075E20090F101E0FA530278AD +:10F6B00090F102E0FB530380BB80027A8090F1025C +:10F6C000E0FB530310BB10027A0490F102E0FB53FD +:10F6D0000308BB08027A02BA000302138C74045AAE +:10F6E000FBBB041875DB0175DC7F75E60675E5026A +:10F6F00075DE0E75E40E75E30302134E74025AFBB9 +:10F70000BB021575DB0175DC7F75E60775DE0F75CD +:10F71000E40E75E30302134E74F85AFBBB000302B8 +:10F72000134E74F85AFBBB0802803DBB1002805C8C +:10F73000BB1802807BBB200302122ABB28030212E3 +:10F740004EBB3003021272BB3803021296BB400359 +:10F750000212BABB48030212EABB500302130DBBEC +:10F76000800302132D02134E75D90775DA0075DD7B +:10F770000075DB0075DC0075E60075DE0075E400E1 +:10F7800075E50075E30875C00002134E75D907755D +:10F79000DA0075DD0075DB0475DC0075E60075DEEA +:10F7A0000075E40875E50075E30075C00002134EAE +:10F7B00075D90775DA0075DD0075DB0875DC007535 +:10F7C000E60075DE0075E40C75E50075E30075C0B4 +:10F7D0000002134E75D90775DA0075DD0075DB1070 +:10F7E00075DC0075E60075DE0875E40C75E50075DE +:10F7F000E30075C00002134E75D90775DA0075DD98 +:10F800000075DB8075DC2075E60075DE0075E400B0 +:10F8100075E50075E30075C00002134E75D90775D4 +:10F82000DA0075DD0075DB4075DC3075E60075DEED +:10F830000075E40475E50075E30075C00002134E21 +:10F8400075D90775DAB775DD3775DB0075DC667558 +:10F85000E60275DE0E75E40A75E50075E38075C095 +:10F860000002134E75DAB775DD2775DB0075E6000B +:10F8700075DE0F90F19EE0FB30E10875DC2075E449 +:10F880000F800675DC0075E40E75E50075E32075E4 +:10F89000C088806475D90775DAB775DD3775DB0008 +:10F8A00075DC7F75E60775DE0075E40475E50075A7 +:10F8B000E34075C000804175DAB775DD2775DB0060 +:10F8C00075DC2075E60075DE0F75E40F75E50075D3 +:10F8D000E31075C088802175D90775DAB775DD37F3 +:10F8E00075DB0075DC6775E60275DE0F75E40F7574 +:10F8F000E50775E30375C08890FD4412169C90F1EE +:10F9000001E0FB74785BFA90F102E0FB530380BBEB +:10F9100080027A8090F102E0FB530310BB10027A60 +:10F920000490F102E0FB530308BB080280030211BC +:10F930002D7A0202112D90F005E0FA530208BA0860 +:10F940000343D90790F005E0FA530280BA800343DD +:10F95000D92030CE0575DAB7800375DAB375DD07C7 +:10F9600090F003E0FA30E00343DD1090F003E0FA9A +:10F9700030E40343DD2075C00075E50075DE0075D9 +:10F98000DB0075E30075DC7F75E60790F103E0FAB4 +:10F9900030E30575E406800375E404D2A875F11719 +:10F9A000200303758701C2A80200B4C20390F04C83 +:10F9B000E0FA20E00690FEAC12169C75F104D20429 +:10F9C0000200B40200B490000122C0D075D008C279 +:10F9D000AFC28EC28FD202D2AFD0D032C0E0C082CE +:10F9E000C083C0D0900098D4010000007CA601C064 +:10F9F00000040000A0A6CA1275D008C20BC2AFC294 +:10FA00008EC28FD202D20375DE0075E40075E3006A +:10FA100075E60075DC0075DB0030870B75F100536F +:10FA20008048D20B021622A280728340030214F394 +:10FA300075F12090F056740CF090F0547414F0901E +:10FA4000F0A6740AF090F06D7408F090F0717408EC +:10FA5000F090F1C8743FF090F1C9743FF090F1CA92 +:10FA6000743FF090F1CB743FF090F18E743FF090C2 +:10FA7000F18F743FF090F190743FF090F191743FEA +:10FA8000F090F192743FF090F193743FF090F19404 +:10FA9000743FF090F195743FF0C2CF90F19C747F69 +:10FAA000F0D2CF90F19C747FF0C2CF5380C0021689 +:10FAB00022A2827281400302158590F0B2E0FA44DE +:10FAC00010F075F12090F056740CF090F05474140E +:10FAD000F090F0A6740AF090F06D7408F090F07158 +:10FAE0007408F090F1C8743FF090F1C9743FF09041 +:10FAF000F1CA743FF090F1CB743FF090F18E740F27 +:10FB0000F090F18F743FF090F190743FF090F1918C +:10FB1000743FF090F192740FF090F193743FF09075 +:10FB2000F194743FF090F195743FF0C2CF90F19C46 +:10FB3000747FF0D2CF90F19C747FF0C2CF5380C01D +:10FB400002162230C80975F10F53C802021622307E +:10FB5000C90975F11153C80102162230860975F1E1 +:10FB6000135380BF02162230844090F0B2E0FA4472 +:10FB700010F075F12190F18E740FF090F18F743FB9 +:10FB8000F090F190743FF090F191743FF090F19209 +:10FB9000740FF090F193743FF090F194743FF090F3 +:10FBA000F195743FF05380CF803675F12190F18E3E +:10FBB000740FF090F18F743FF090F190743FF090DB +:10FBC000F191743FF090F192740FF090F193743FC3 +:10FBD000F090F194743FF090F195743FF05380CF22 +:10FBE00090F007E0FA530A1090F008E0FB74805B95 +:10FBF000420AE4A20B33FB4A700B90F007E0FA5381 +:10FC00000A02BA00F5C2A8D2AFD0D0D083D082D039 +:10FC1000E032D2B13095FD85F68285F783C2B122FC +:10FC2000AA8275FE028AFA853FFB90FFFF12169C9E +:10FC300075FE0390FFFF12169C75FE0290FFFF12E7 +:10FC4000169C75FE0022AA8275FE028AFC90FFFFB8 +:10FC500012169C85FD8275FE0022AA82AB83438921 +:10FC6000018A8A8B8CD28C308DFDC28CC28D22850C +:10FC70002E82852F8312169CD2B2C2B2C2B290FFDE +:10FC8000FF12169C309111AA327B00E5E9C39AF568 +:10FC9000E9E5EA9BF5EA8018309010AA327B00EA89 +:10FCA00025E9F5E9EB35EAF5EA8005740124FF2240 +:10FCB00085EBED85ECEEE532C313F532E424FF224B +:10FCC000AAE9E5EAC4CAC4540F6ACA540FCA6ACA88 +:10FCD000FB852E82852F83C002C00312169CD003A1 +:10FCE000D002D2B2C2B2C2B290FFFFC002C00312B1 +:10FCF000169CD003D00230901BEAB52A0BEBB52B33 +:10FD000007D297740124FF22AC267D00EC2AFAED7D +:10FD10003BFB801AEAB52B0BEBB52C07D29774018D +:10FD200024FF22AC267D00EAC39CFAEB9DFB200554 +:10FD300003753300E5332533FCE4A29033FD2CF545 +:10FD4000335333038AE9EBC454F0C5E9C4C5E9650C +:10FD5000E9C5E954F0C5E965E9F5EA85EBED85EC1F +:10FD6000EEE533B4020474018001E424FF920CA296 +:10FD70000C7202E433F58224FF22AA82AB837C005A +:10FD8000751200E0FD90FFF6C002C003C004C0057C +:10FD900012169CD005D004D003D002AE10AF1130A3 +:10FDA0000103021872D2B2C2B290FFFFC002C003B8 +:10FDB000C004C005C006C00712169CD007D006D0EC +:10FDC00005D004D003D0028E828F83E0F8E5235261 +:10FDD00000E8B5230474018001E424FF920D300D86 +:10FDE0000FEDB52405740124FF22E5262DFD800EBC +:10FDF000EDB5250531AAB4D40100000078AA01C0F0 +:10FE00000004000080456298740124FF22EDC39530 +:10FE100026FDEC2CF8E4A20D3328540FFCB40100AD +:10FE2000E433F88A828B83EDF0E4B8F50104F8E45A +:10FE3000BC0A0104D3487001C3920EA20E72029252 +:10FE4000010217E1E424FF22AA82AB837C0075152E +:10FE500000E0FD90FFD8C002C003C004C005121628 +:10FE60009CD005D004D003D002AE13AF14300103F0 +:10FE700002194A90FFF6C002C003C004C005C006C4 +:10FE8000C00712169CD007D006D005D004D003D0EE +:10FE900002D2B2C2B290FFFFC002C003C004C005CC +:10FEA000C006C00712169CD007D006D005D004D0DB +:10FEB00003D0028E828F83E0F8E5235200E8B52359 +:10FEC0000474018001E424FF920F300F0FEDB5247C +:10FED00005740124FF22E5262DFD800EEDB52505D4 +:10FEE000740124FF22EDC39526FDEC2CF8E4A20F4B +:10FEF0003328540FFCB40100E433F88A828B83ED7D +:10FF0000F0E4B8F50104F8E4BC0A0104D348700138 +:10FF1000C39210A2107202920102189BE424FF22E5 +:10FF2000AA82AB8390FFF6C002C00312169CD003D6 +:10FF3000D002AC16AD17E5276052D2B2C2B290FF24 +:10FF4000FFC002C003C004C00512169CD005D00437 +:10FF5000D003D0028C828D83E0FEE5235206EEB5FD +:10FF600023118A828B83E0FEE5262EFE8A828B8314 +:10FF7000F0800F8A828B83E0FEC39526FE8A828BF7 +:10FF800083F0E526C313F526152780AAD2B2C2B2A4 +:10FF900090FFFFC002C003C004C00512169CD0052C +:10FFA000D004D003D0028C828D83E0FCE523520480 +:10FFB000ECB5230D8A828B83E004FC8A828B83EC70 +:10FFC000F022AA82AB8390FFD8C002C00312169C15 +:10FFD000D003D002AC18AD19E527606890FFF6C0D9 +:10FFE00002C003C004C00512169CD005D004D00383 +:10FFF000D002D2B2C2B290FFFFC002C003C004C0A0 +:0200000260009C +:100000000512169CD005D004D003D0028C828D83BB +:10001000E0FEE5235206EEB523118A828B83E0FED3 +:10002000E5262EFE8A828B83F0800F8A828B83E006 +:10003000FEC39526FE8A828B83F0E526C313F52640 +:1000400015278094D2B2C2B290FFFFC002C003C095 +:1000500004C00512169CD005D004D003D0028C82B7 +:100060008D83E0FCE5235204ECB5230D8A828B835B +:10007000E004FC8A828B83ECF022AA82AB83438962 +:10008000108A8B8B8DD2AFD2ABD28E22D468000077 +:100090000000000000000000000000000000000060 +:1000A0000000000000000000000000000000000050 +:1000B0000000000000000000000000000000000040 +:1000C0000000000000000000000000000000000030 +:1000D0000000000000000000000000000000000020 +:1000E0000000000000000000000000000000000010 +:1000F0000000000000000000000000000000000000 +:1001000000000000000000000000000000000000EF +:1001100000000000000000000000000000000000DF +:1001200000000000000000000000000000000000CF +:1001300000000000000000000000000000000000BF +:1001400000000000000000000000000000000000AF +:10015000000000000000000000000000000000009F +:10016000000000000000000000000000000000008F +:10017000000000000000000000000000000000007F +:10018000000000000000000000000000000000006F +:10019000000000000000000000000000000000005F +:1001A000000000000000000000000000000000004F +:1001B000000000000000000000000000000000003F +:1001C000000000000000000000000000000000002F +:1001D000000000000000000000000000000000001F +:1001E000000000000000000000000000000000000F +:1001F00000000000000000000000000000000000FF +:10020000000000005E2CF36F0100000074AE01C01E +:100210000004000007136CCA00000000000000008A +:1002200000000000000000000000000000000000CE +:1002300000000000000000000000000000000000BE +:1002400000000000000000000000000000000000AE +:10025000000000000000000000000000000000009E +:10026000000000000000000000000000000000008E +:10027000000000000000000000000000000000007E +:10028000000000000000000000000000000000006E +:10029000000000000000000000000000000000005E +:1002A000000000000000000000000000000000004E +:1002B000000000000000000000000000000000003E +:1002C000000000000000000000000000000000002E +:1002D000000000000000000000000000000000001E +:1002E000000000000000000000000000000000000E +:1002F00000000000000000000000000000000000FE +:1003000000000000000000000000000000000000ED +:1003100000000000000000000000000000000000DD +:1003200000000000000000000000000000000000CD +:1003300000000000000000000000000000000000BD +:1003400000000000000000000000000000000000AD +:10035000000000000000000000000000000000009D +:10036000000000000000000000000000000000008D +:10037000000000000000000000000000000000007D +:10038000000000000000000000000000000000006D +:10039000000000000000000000000000000000005D +:1003A000000000000000000000000000000000004D +:1003B000000000000000000000000000000000003D +:1003C000000000000000000000000000000000002D +:1003D000000000000000000000000000000000001D +:1003E000000000000000000000000000000000000D +:1003F00000000000000000000000000000000000FD +:1004000000000000000000000000000000000000EC +:1004100000000000000000000000000000000000DC +:1004200000000000000000000000000000000000CC +:1004300000000000000000000000000000000000BC +:1004400000000000000000000000000000000000AC +:10045000000000000000000000000000000000009C +:10046000000000000000000000000000000000008C +:10047000000000000000000000000000000000007C +:10048000000000000000000000000000000000006C +:10049000000000000000000000000000000000005C +:1004A000000000000000000000000000000000004C +:1004B000000000000000000000000000000000003C +:1004C000000000000000000000000000000000002C +:1004D000000000000000000000000000000000001C +:1004E000000000000000000000000000000000000C +:1004F00000000000000000000000000000000000FC +:1005000000000000000000000000000000000000EB +:1005100000000000000000000000000000000000DB +:1005200000000000000000000000000000000000CB +:1005300000000000000000000000000000000000BB +:1005400000000000000000000000000000000000AB +:10055000000000000000000000000000000000009B +:10056000000000000000000000000000000000008B +:10057000000000000000000000000000000000007B +:10058000000000000000000000000000000000006B +:10059000000000000000000000000000000000005B +:1005A000000000000000000000000000000000004B +:1005B000000000000000000000000000000000003B +:1005C000000000000000000000000000000000002B +:1005D000000000000000000000000000000000001B +:1005E000000000000000000000000000000000000B +:1005F00000000000000000000000000000000000FB +:1006000000000000000000000000000000000000EA +:1006100000000000000000000100000070B201C0F6 +:1006200000040000C182338C0000000000000000C4 +:1006300000000000000000000000000000000000BA +:1006400000000000000000000000000000000000AA +:10065000000000000000000000000000000000009A +:10066000000000000000000000000000000000008A +:10067000000000000000000000000000000000007A +:10068000000000000000000000000000000000006A +:10069000000000000000000000000000000000005A +:1006A000000000000000000000000000000000004A +:1006B000000000000000000000000000000000003A +:1006C000000000000000000000000000000000002A +:1006D000000000000000000000000000000000001A +:1006E000000000000000000000000000000000000A +:1006F00000000000000000000000000000000000FA +:1007000000000000000000000000000000000000E9 +:1007100000000000000000000000000000000000D9 +:1007200000000000000000000000000000000000C9 +:1007300000000000000000000000000000000000B9 +:1007400000000000000000000000000000000000A9 +:100750000000000002090601000002000208060174 +:100760000000020002070501000002000206050168 +:10077000000002000205050100000200020404015D +:100780000000020002030401000002000202030153 +:100790000000020002010301000002000200030148 +:1007A000000002000200030100000F00020003012C +:1007B00000000F000200030100000F00020003010F +:1007C00000000F000200030100000F0002000301FF +:1007D00000000F000200030100000F0012090A01CF +:1007E0000000020012080A010000020012070901BD +:1007F00000000200120609010000020012050901B2 +:1008000000000200120408010000020012030801A7 +:10081000000002001202070100000200120107019D +:100820000000020012000701000002001200070190 +:1008300000000F001200070100000F001200070166 +:1008400000000F001200070100000F001200070156 +:1008500000000F001200070100000F001200070146 +:1008600000000F00220911010000020022081101FE +:100870000000020022071001000002002206100101 +:1008800000000200220510010000020022040F01F6 +:100890000000020022030F010000020022020E01EC +:1008A0000000020022010E010000020022000E01E1 +:1008B0000000020022000E0100000F0022000E01C5 +:1008C00000000F0022000E0100000F0022000E01A8 +:1008D00000000F0022000E0100000F0022000E0198 +:1008E00000000F0022000E0100000F005107090157 +:1008F00000000100110709010000020011060901B2 +:1009000000000200110509010000020011040801A5 +:10091000000002001103080100000200110207019B +:100920000000020011010701000002001100070190 +:100930000000020011200701000002001120070141 +:1009400000000F001120070100000F001120070117 +:1009500000000F001120070100000F001120070107 +:1009600000000F001120070100000F0011200701F7 +:1009700000000F004107050100000100010705010B +:10098000000002000106050100000200010505014A +:100990000000020001040401000002000103040140 +:1009A0000000020001020301000002000101030136 +:1009B0000000020001000301000002000100030129 +:1009C00000000F000100030100000F0001000301FF +:1009D00000000F000100030100000F0001000301EF +:1009E00000000F000100030100000F0001000301DF +:1009F00000000F00000C050100000200000B0501C3 +:100A000000000200000A04010000020000090401C5 +:100A100000000200000803010000020000070301BB +:100A20000000020035376011010000006CB601C003 +:100A300000040000EB0C9A15000603010000020000 +:100A400000050301000002000005030100000F0083 +:100A50000003020100000200000202010000020087 +:100A6000000101010000020000000101000002007D +:100A70000000010100000F009CB601C094B601C047 +:100A80008CB601C084B601C084B601C074B601C082 +:100A90006CB601C064B601C05CB601C054B601C0FA +:100AA0004CB601C044B601C03CB601C03CB601C062 +:100AB000FCB501C0F4B501C0ECB501C0E4B501C09E +:100AC000DCB501C0D4B501C0CCB501C0C4B501C00E +:100AD0007CB501C074B501C06CB501C064B501C07E +:100AE0005CB501C054B501C04CB501C044B501C0EE +:100AF0003CB501C0E4B301C0DCB301C0D4B301C054 +:100B0000CCB301C0C4B301C0BCB301C0B4B301C015 +:100B1000ACB301C0A4B301C09CB301C06CB401C0AC +:100B200064B401C05CB401C054B401C04CB401C091 +:100B300044B401C03CB401C034B401C02CB401C001 +:100B400024B401C0F4B401C0ECB401C0E4B401C0E9 +:100B5000DCB401C0D4B401C0CCB401C0C4B401C081 +:100B6000BCB401C0B4B401C0ACB401C000200000EA +:100B700000000000040008001000140020002800FD +:100B8000400050006A008000A000B700D5000001BE +:100B9000000000000000000000000000001400C081 +:100BA0000000000000000000000000000100000044 +:100BB000204E0000000000000000000000000000C7 +:100BC0000000000000000000000000000000000025 +:100BD0000000000000000000000000000000000015 +:100BE000000000000000FFFF000000000000000007 +:100BF00001000000000000000000000000000000F4 +:100C000000000000000000000000000000000000E4 +:100C100002000000010000000307000000000000C7 +:100C200000000000000000000000000000001400B0 +:100C300028005000A00040018002000509080405BA +:100C4000060703020100FFFF0A0A01010101010179 +:100C5000FFFF0A0A01010101010100000307070764 +:100C6000030707070307070704080808040808081C +:100C700005090909050909090509090905090909F4 +:100C8000050909091A005136005175005134005107 +:100C90006C0051EA00514E0051A200515F015168B1 +:100CA0000051D80051D401519C0051440151BE0261 +:100CB00051D00051B00151A80351EA0051E6015151 +:100CC0001D04510401511C025192045138015188F4 +:100CD00002517C05515A0151D002511806510000B1 +:100CE0000005000055000000100500005500000040 +:100CF0002005000055000000000500005500000020 +:100D000010050000550000002005000055000000FF +:100D1000000500005500000010050000550000000F +:100D200020050000550000000005000055000000EF +:100D300010050000550000002005000055000000CF +:100D400000050000550000001005000055000000DF +:100D500020050000550000000005000055000000BF +:100D6000100500005500000020050000550000009F +:100D700000050000550000001005000055000000AF +:100D8000200500005500000000050000550000008F +:100D9000100500005500000020050000550000006F +:100DA000000500005500000010050000550000007F +:100DB000200500005500000000050000550000005F +:100DC000100500005500000020050000550000003F +:100DD00003070000030700000307000004080000E9 +:100DE00004080000050900000509000005090000CD +:100DF0000100511800510100511A005136005101F3 +:100E000000513400716C00710100714E0071A2003C +:100E100071010071680091D800910100919C0091CE +:100E2000440191010091D00091B00191010091EA3B +:100E30000091E60169C3EE5F0100000068BA01C0DD +:100E400000040000CBEF329F910100910401911C3E +:100E50000291010091000000000500005500000013 +:100E600010050000550000000005000055000000BE +:100E7000100500005500000000070000770000008A +:100E80001009000099000000000700007700000032 +:100E900010090000990000000009000099000000FE +:100EA00010090000990000000009000099000000EE +:100EB00010090000990000000009000099000000DE +:100EC00010090000990000000009000099000000CE +:100ED00010090000990000000009000099000000BE +:100EE0001009000099000000000102030305050736 +:100EF00007090909090900000100000000000000BD +:100F000000000000000000000000000000000000E1 +:100F100001200000000000000000000000000000B0 +:100F200000000000000000000000000000000000C1 +:100F300080380100FFFFFF00FFFFFF0000000000FE +:100F4000000000000602FA0B010112660000960084 +:100F5000E6000105171D0000C800F401050A101283 +:100F60000000C800F4010A140C100000E803D007C8 +:100F70003264010305144D014D010101090900000E +:100F800095059505010112120000E803881301057B +:100F90000A0A000071028813010F0F0F0000FA0007 +:100FA000B201010F19190000FA00F401141E141403 +:100FB0000005C409050D01020A0A00004103C40925 +:100FC00001020F0F000094059405010112120000A8 +:100FD000060F060F0203121200006C056C050101DA +:100FE0001212000094059405010112120000A00FD6 +:100FF000A00F0202121200009500E6000105171D65 +:101000000000C800F401060A10120000C800F40134 +:101010000B140C100000E803D00732640103000039 +:101020004D014D0101010909000056012B00580135 +:101030001A00FFFFFF0045001400480000004900AF +:1010400066004B004D005000260053000000540085 +:10105000BF0055003F00700060007F003F0080002F +:10106000440083009B008600A50087006100890082 +:1010700052004D01320072013A007901C800FF01AF +:1010800010000002240001021C00020219000302E9 +:101090009E0040028E0043027700460277008802DD +:1010A0007700BF023700C402CD00C7020600D60297 +:1010B0003800F702C2003C0305003E0350003F0326 +:1010C000D00041030F0043034400440328004503BC +:1010D000340046031C0047034100FB0380008604E4 +:1010E00040008A0477008B04F000C004D400FFFFA6 +:1010F000FF0000000000000090BD01C0B0BD01C0B5 +:10110000E0BD01C0F0BD01C014BE01C03CBE01C0C5 +:1011100050BE01C074BE01C0000000005CBD01C033 +:1011200060BD01C00000000064BD01C068BD01C019 +:101130006CBD01C078BD01C084BD01C0FFFFFF00D0 +:10114000FFFFFF00FFFFFF00FFFFFF0058011B0034 +:1011500058021B00FFFFFF0058011B0058021B0034 +:10116000FFFFFF0058011B0058021B00FFFFFF009C +:10117000870060008900510072017A000302BE00FE +:101180003F03F000FB032D0086040000FFFFFF007B +:1011900045001300870060008900520072017A0048 +:1011A0000302BE003F03F000410310004403260089 +:1011B000FB032F00860400008A048700FFFFFF0066 +:1011C000870060008900480047031100FFFFFF000F +:1011D000870060008900480072017A000302BE00A7 +:1011E0003F03F00047031100FB032D0086040000BD +:1011F000FFFFFF00870060008900480072017A004D +:101200000302BE003F03F000440326004703110021 +:10121000FB032F0086040000FFFFFF008700600033 +:101220008900510047031100C0045400FFFFFF0074 +:10123000870060008900490072017A000302BE0045 +:101240003F03F000E51F79CB0100000064BE01C040 +:10125000FC000000A4CC9CC447031100FB032D003C +:1012600086040000FFFFFF0087006000890049003E +:1012700072017A000302BE003F03F000440326001F +:1012800047031100FB032F00860400008A04A80016 +:10129000FFFFFF0000000000010000000000000050 +:1012A000000000003CF602C02CF702C00000000065 +:1012B000000000000000000000000000000000002E +:1012C0000000000070170000000000000000000097 +:1012D000010000000000000000000000000000000D +:1012E00000000000000000000000000000000000FE +:1012F0000000000000000000000000003BA73000DC +:1013000000000000CBA5300000000000BFA63000A8 +:1013100000000000000000000000000000000000CD +:101320000100000000000000010000003BA73000A9 +:10133000010000007FA53000010000003FA6300042 +:10134000010000000000000001000000000000009B +:101350004C9570FB0400000000000000000000003D +:041360001FDB8C18EB +:00000001FF diff --git a/fs/Kconfig b/fs/Kconfig index 0d669339..f8a7e1f8 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -67,6 +67,7 @@ source "fs/quota/Kconfig" source "fs/autofs4/Kconfig" source "fs/fuse/Kconfig" +source "fs/overlayfs/Kconfig" config GENERIC_ACL bool diff --git a/fs/Makefile b/fs/Makefile index 5f1a6861..64b9b12d 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -107,6 +107,7 @@ obj-$(CONFIG_QNX6FS_FS) += qnx6/ obj-$(CONFIG_AUTOFS4_FS) += autofs4/ obj-$(CONFIG_ADFS_FS) += adfs/ obj-$(CONFIG_FUSE_FS) += fuse/ +obj-$(CONFIG_OVERLAYFS_FS) += overlayfs/ obj-$(CONFIG_UDF_FS) += udf/ obj-$(CONFIG_SUN_OPENPROMFS) += openpromfs/ obj-$(CONFIG_OMFS_FS) += omfs/ diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index 4e0886c9..1faa1151 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c @@ -567,6 +567,13 @@ static struct dentry *ecryptfs_mount(struct file_system_type *fs_type, int flags s->s_maxbytes = path.dentry->d_sb->s_maxbytes; s->s_blocksize = path.dentry->d_sb->s_blocksize; s->s_magic = ECRYPTFS_SUPER_MAGIC; + s->s_stack_depth = path.dentry->d_sb->s_stack_depth + 1; + + rc = -EINVAL; + if (s->s_stack_depth > FILESYSTEM_MAX_STACK_DEPTH) { + pr_err("eCryptfs: maximum fs stacking depth exceeded\n"); + goto out_free; + } inode = ecryptfs_get_inode(path.dentry->d_inode, s); rc = PTR_ERR(inode); diff --git a/fs/internal.h b/fs/internal.h index 2f6af7f6..0beb5c93 100644 --- a/fs/internal.h +++ b/fs/internal.h @@ -41,11 +41,6 @@ static inline int __sync_blockdev(struct block_device *bdev, int wait) */ extern void __init chrdev_init(void); -/* - * namei.c - */ -extern int __inode_permission(struct inode *, int); - /* * namespace.c */ diff --git a/fs/namei.c b/fs/namei.c index ec97aef5..dc574f81 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -402,6 +402,7 @@ int __inode_permission(struct inode *inode, int mask) return security_inode_permission(inode, mask); } +EXPORT_SYMBOL(__inode_permission); /** * sb_permission - Check superblock-level permissions @@ -2876,9 +2877,12 @@ static int do_last(struct nameidata *nd, struct path *path, error = may_open(&nd->path, acc_mode, open_flag); if (error) goto out; - file->f_path.mnt = nd->path.mnt; - error = finish_open(file, nd->path.dentry, NULL, opened); - if (error) { + + BUG_ON(*opened & FILE_OPENED); /* once it's opened, it's opened */ + error = vfs_open(&nd->path, file, current_cred()); + if (!error) { + *opened |= FILE_OPENED; + } else { if (error == -EOPENSTALE) goto stale_open; goto out; diff --git a/fs/namespace.c b/fs/namespace.c index 5dd7709f..70f107e7 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -1421,6 +1421,24 @@ void drop_collected_mounts(struct vfsmount *mnt) release_mounts(&umount_list); } +struct vfsmount *clone_private_mount(struct path *path) +{ + struct mount *old_mnt = real_mount(path->mnt); + struct mount *new_mnt; + + if (IS_MNT_UNBINDABLE(old_mnt)) + return ERR_PTR(-EINVAL); + + down_read(&namespace_sem); + new_mnt = clone_mnt(old_mnt, path->dentry, CL_PRIVATE); + up_read(&namespace_sem); + if (!new_mnt) + return ERR_PTR(-ENOMEM); + + return &new_mnt->mnt; +} +EXPORT_SYMBOL_GPL(clone_private_mount); + int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg, struct vfsmount *root) { diff --git a/fs/open.c b/fs/open.c index 9b33c0cb..33111133 100644 --- a/fs/open.c +++ b/fs/open.c @@ -816,8 +816,7 @@ struct file *dentry_open(const struct path *path, int flags, return ERR_PTR(error); f->f_flags = flags; - f->f_path = *path; - error = do_dentry_open(f, NULL, cred); + error = vfs_open(path, f, cred); if (!error) { error = open_check_o_direct(f); if (error) { @@ -832,6 +831,26 @@ struct file *dentry_open(const struct path *path, int flags, } EXPORT_SYMBOL(dentry_open); +/** + * vfs_open - open the file at the given path + * @path: path to open + * @filp: newly allocated file with f_flag initialized + * @cred: credentials to use + */ +int vfs_open(const struct path *path, struct file *filp, + const struct cred *cred) +{ + struct inode *inode = path->dentry->d_inode; + + if (inode->i_op->dentry_open) + return inode->i_op->dentry_open(path->dentry, filp, cred); + else { + filp->f_path = *path; + return do_dentry_open(filp, NULL, cred); + } +} +EXPORT_SYMBOL(vfs_open); + static inline int build_open_flags(int flags, umode_t mode, struct open_flags *op) { int lookup_flags = 0; diff --git a/fs/overlayfs/Kconfig b/fs/overlayfs/Kconfig new file mode 100644 index 00000000..e6012597 --- /dev/null +++ b/fs/overlayfs/Kconfig @@ -0,0 +1,10 @@ +config OVERLAYFS_FS + tristate "Overlay filesystem support" + help + An overlay filesystem combines two filesystems - an 'upper' filesystem + and a 'lower' filesystem. When a name exists in both filesystems, the + object in the 'upper' filesystem is visible while the object in the + 'lower' filesystem is either hidden or, in the case of directories, + merged with the 'upper' object. + + For more information see Documentation/filesystems/overlayfs.txt diff --git a/fs/overlayfs/Makefile b/fs/overlayfs/Makefile new file mode 100644 index 00000000..8f918894 --- /dev/null +++ b/fs/overlayfs/Makefile @@ -0,0 +1,7 @@ +# +# Makefile for the overlay filesystem. +# + +obj-$(CONFIG_OVERLAYFS_FS) += overlayfs.o + +overlayfs-objs := super.o inode.o dir.o readdir.o copy_up.o diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c new file mode 100644 index 00000000..87dbeee0 --- /dev/null +++ b/fs/overlayfs/copy_up.c @@ -0,0 +1,385 @@ +/* + * + * Copyright (C) 2011 Novell Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "overlayfs.h" + +#define OVL_COPY_UP_CHUNK_SIZE (1 << 20) + +static int ovl_copy_up_xattr(struct dentry *old, struct dentry *new) +{ + ssize_t list_size, size; + char *buf, *name, *value; + int error; + + if (!old->d_inode->i_op->getxattr || + !new->d_inode->i_op->getxattr) + return 0; + + list_size = vfs_listxattr(old, NULL, 0); + if (list_size <= 0) { + if (list_size == -EOPNOTSUPP) + return 0; + return list_size; + } + + buf = kzalloc(list_size, GFP_KERNEL); + if (!buf) + return -ENOMEM; + + error = -ENOMEM; + value = kmalloc(XATTR_SIZE_MAX, GFP_KERNEL); + if (!value) + goto out; + + list_size = vfs_listxattr(old, buf, list_size); + if (list_size <= 0) { + error = list_size; + goto out_free_value; + } + + for (name = buf; name < (buf + list_size); name += strlen(name) + 1) { + size = vfs_getxattr(old, name, value, XATTR_SIZE_MAX); + if (size <= 0) { + error = size; + goto out_free_value; + } + error = vfs_setxattr(new, name, value, size, 0); + if (error) + goto out_free_value; + } + +out_free_value: + kfree(value); +out: + kfree(buf); + return error; +} + +static int ovl_copy_up_data(struct path *old, struct path *new, loff_t len) +{ + struct file *old_file; + struct file *new_file; + int error = 0; + + if (len == 0) + return 0; + + old_file = ovl_path_open(old, O_RDONLY); + if (IS_ERR(old_file)) + return PTR_ERR(old_file); + + new_file = ovl_path_open(new, O_WRONLY); + if (IS_ERR(new_file)) { + error = PTR_ERR(new_file); + goto out_fput; + } + + /* FIXME: copy up sparse files efficiently */ + while (len) { + loff_t offset = new_file->f_pos; + size_t this_len = OVL_COPY_UP_CHUNK_SIZE; + long bytes; + + if (len < this_len) + this_len = len; + + if (signal_pending_state(TASK_KILLABLE, current)) { + error = -EINTR; + break; + } + + bytes = do_splice_direct(old_file, &offset, new_file, this_len, + SPLICE_F_MOVE); + if (bytes <= 0) { + error = bytes; + break; + } + + len -= bytes; + } + + fput(new_file); +out_fput: + fput(old_file); + return error; +} + +static char *ovl_read_symlink(struct dentry *realdentry) +{ + int res; + char *buf; + struct inode *inode = realdentry->d_inode; + mm_segment_t old_fs; + + res = -EINVAL; + if (!inode->i_op->readlink) + goto err; + + res = -ENOMEM; + buf = (char *) __get_free_page(GFP_KERNEL); + if (!buf) + goto err; + + old_fs = get_fs(); + set_fs(get_ds()); + /* The cast to a user pointer is valid due to the set_fs() */ + res = inode->i_op->readlink(realdentry, + (char __user *)buf, PAGE_SIZE - 1); + set_fs(old_fs); + if (res < 0) { + free_page((unsigned long) buf); + goto err; + } + buf[res] = '\0'; + + return buf; + +err: + return ERR_PTR(res); +} + +static int ovl_set_timestamps(struct dentry *upperdentry, struct kstat *stat) +{ + struct iattr attr = { + .ia_valid = + ATTR_ATIME | ATTR_MTIME | ATTR_ATIME_SET | ATTR_MTIME_SET, + .ia_atime = stat->atime, + .ia_mtime = stat->mtime, + }; + + return notify_change(upperdentry, &attr); +} + +static int ovl_set_mode(struct dentry *upperdentry, umode_t mode) +{ + struct iattr attr = { + .ia_valid = ATTR_MODE, + .ia_mode = mode, + }; + + return notify_change(upperdentry, &attr); +} + +static int ovl_copy_up_locked(struct dentry *upperdir, struct dentry *dentry, + struct path *lowerpath, struct kstat *stat, + const char *link) +{ + int err; + struct path newpath; + umode_t mode = stat->mode; + + /* Can't properly set mode on creation because of the umask */ + stat->mode &= S_IFMT; + + ovl_path_upper(dentry, &newpath); + WARN_ON(newpath.dentry); + newpath.dentry = ovl_upper_create(upperdir, dentry, stat, link); + if (IS_ERR(newpath.dentry)) + return PTR_ERR(newpath.dentry); + + if (S_ISREG(stat->mode)) { + err = ovl_copy_up_data(lowerpath, &newpath, stat->size); + if (err) + goto err_remove; + } + + err = ovl_copy_up_xattr(lowerpath->dentry, newpath.dentry); + if (err) + goto err_remove; + + mutex_lock(&newpath.dentry->d_inode->i_mutex); + if (!S_ISLNK(stat->mode)) + err = ovl_set_mode(newpath.dentry, mode); + if (!err) + err = ovl_set_timestamps(newpath.dentry, stat); + mutex_unlock(&newpath.dentry->d_inode->i_mutex); + if (err) + goto err_remove; + + ovl_dentry_update(dentry, newpath.dentry); + + /* + * Easiest way to get rid of the lower dentry reference is to + * drop this dentry. This is neither needed nor possible for + * directories. + */ + if (!S_ISDIR(stat->mode)) + d_drop(dentry); + + return 0; + +err_remove: + if (S_ISDIR(stat->mode)) + vfs_rmdir(upperdir->d_inode, newpath.dentry); + else + vfs_unlink(upperdir->d_inode, newpath.dentry); + + dput(newpath.dentry); + + return err; +} + +/* + * Copy up a single dentry + * + * Directory renames only allowed on "pure upper" (already created on + * upper filesystem, never copied up). Directories which are on lower or + * are merged may not be renamed. For these -EXDEV is returned and + * userspace has to deal with it. This means, when copying up a + * directory we can rely on it and ancestors being stable. + * + * Non-directory renames start with copy up of source if necessary. The + * actual rename will only proceed once the copy up was successful. Copy + * up uses upper parent i_mutex for exclusion. Since rename can change + * d_parent it is possible that the copy up will lock the old parent. At + * that point the file will have already been copied up anyway. + */ +static int ovl_copy_up_one(struct dentry *parent, struct dentry *dentry, + struct path *lowerpath, struct kstat *stat) +{ + int err; + struct kstat pstat; + struct path parentpath; + struct dentry *upperdir; + const struct cred *old_cred; + struct cred *override_cred; + char *link = NULL; + + ovl_path_upper(parent, &parentpath); + upperdir = parentpath.dentry; + + err = vfs_getattr(parentpath.mnt, parentpath.dentry, &pstat); + if (err) + return err; + + if (S_ISLNK(stat->mode)) { + link = ovl_read_symlink(lowerpath->dentry); + if (IS_ERR(link)) + return PTR_ERR(link); + } + + err = -ENOMEM; + override_cred = prepare_creds(); + if (!override_cred) + goto out_free_link; + + override_cred->fsuid = stat->uid; + override_cred->fsgid = stat->gid; + /* + * CAP_SYS_ADMIN for copying up extended attributes + * CAP_DAC_OVERRIDE for create + * CAP_FOWNER for chmod, timestamp update + * CAP_FSETID for chmod + * CAP_MKNOD for mknod + */ + cap_raise(override_cred->cap_effective, CAP_SYS_ADMIN); + cap_raise(override_cred->cap_effective, CAP_DAC_OVERRIDE); + cap_raise(override_cred->cap_effective, CAP_FOWNER); + cap_raise(override_cred->cap_effective, CAP_FSETID); + cap_raise(override_cred->cap_effective, CAP_MKNOD); + old_cred = override_creds(override_cred); + + mutex_lock_nested(&upperdir->d_inode->i_mutex, I_MUTEX_PARENT); + if (ovl_path_type(dentry) != OVL_PATH_LOWER) { + err = 0; + } else { + err = ovl_copy_up_locked(upperdir, dentry, lowerpath, + stat, link); + if (!err) { + /* Restore timestamps on parent (best effort) */ + ovl_set_timestamps(upperdir, &pstat); + } + } + + mutex_unlock(&upperdir->d_inode->i_mutex); + + revert_creds(old_cred); + put_cred(override_cred); + +out_free_link: + if (link) + free_page((unsigned long) link); + + return err; +} + +int ovl_copy_up(struct dentry *dentry) +{ + int err; + + err = 0; + while (!err) { + struct dentry *next; + struct dentry *parent; + struct path lowerpath; + struct kstat stat; + enum ovl_path_type type = ovl_path_type(dentry); + + if (type != OVL_PATH_LOWER) + break; + + next = dget(dentry); + /* find the topmost dentry not yet copied up */ + for (;;) { + parent = dget_parent(next); + + type = ovl_path_type(parent); + if (type != OVL_PATH_LOWER) + break; + + dput(next); + next = parent; + } + + ovl_path_lower(next, &lowerpath); + err = vfs_getattr(lowerpath.mnt, lowerpath.dentry, &stat); + if (!err) + err = ovl_copy_up_one(parent, next, &lowerpath, &stat); + + dput(parent); + dput(next); + } + + return err; +} + +/* Optimize by not copying up the file first and truncating later */ +int ovl_copy_up_truncate(struct dentry *dentry, loff_t size) +{ + int err; + struct kstat stat; + struct path lowerpath; + struct dentry *parent = dget_parent(dentry); + + err = ovl_copy_up(parent); + if (err) + goto out_dput_parent; + + ovl_path_lower(dentry, &lowerpath); + err = vfs_getattr(lowerpath.mnt, lowerpath.dentry, &stat); + if (err) + goto out_dput_parent; + + if (size < stat.size) + stat.size = size; + + err = ovl_copy_up_one(parent, dentry, &lowerpath, &stat); + +out_dput_parent: + dput(parent); + return err; +} diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c new file mode 100644 index 00000000..1a5d89d1 --- /dev/null +++ b/fs/overlayfs/dir.c @@ -0,0 +1,605 @@ +/* + * + * Copyright (C) 2011 Novell Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include "overlayfs.h" + +static const char *ovl_whiteout_symlink = "(overlay-whiteout)"; + +static int ovl_whiteout(struct dentry *upperdir, struct dentry *dentry) +{ + int err; + struct dentry *newdentry; + const struct cred *old_cred; + struct cred *override_cred; + + /* FIXME: recheck lower dentry to see if whiteout is really needed */ + + err = -ENOMEM; + override_cred = prepare_creds(); + if (!override_cred) + goto out; + + /* + * CAP_SYS_ADMIN for setxattr + * CAP_DAC_OVERRIDE for symlink creation + * CAP_FOWNER for unlink in sticky directory + */ + cap_raise(override_cred->cap_effective, CAP_SYS_ADMIN); + cap_raise(override_cred->cap_effective, CAP_DAC_OVERRIDE); + cap_raise(override_cred->cap_effective, CAP_FOWNER); + override_cred->fsuid = GLOBAL_ROOT_UID; + override_cred->fsgid = GLOBAL_ROOT_GID; + old_cred = override_creds(override_cred); + + newdentry = lookup_one_len(dentry->d_name.name, upperdir, + dentry->d_name.len); + err = PTR_ERR(newdentry); + if (IS_ERR(newdentry)) + goto out_put_cred; + + /* Just been removed within the same locked region */ + WARN_ON(newdentry->d_inode); + + err = vfs_symlink(upperdir->d_inode, newdentry, ovl_whiteout_symlink); + if (err) + goto out_dput; + + ovl_dentry_version_inc(dentry->d_parent); + + err = vfs_setxattr(newdentry, ovl_whiteout_xattr, "y", 1, 0); + if (err) + vfs_unlink(upperdir->d_inode, newdentry); + +out_dput: + dput(newdentry); +out_put_cred: + revert_creds(old_cred); + put_cred(override_cred); +out: + if (err) { + /* + * There's no way to recover from failure to whiteout. + * What should we do? Log a big fat error and... ? + */ + pr_err("overlayfs: ERROR - failed to whiteout '%s'\n", + dentry->d_name.name); + } + + return err; +} + +static struct dentry *ovl_lookup_create(struct dentry *upperdir, + struct dentry *template) +{ + int err; + struct dentry *newdentry; + struct qstr *name = &template->d_name; + + newdentry = lookup_one_len(name->name, upperdir, name->len); + if (IS_ERR(newdentry)) + return newdentry; + + if (newdentry->d_inode) { + const struct cred *old_cred; + struct cred *override_cred; + + /* No need to check whiteout if lower parent is non-existent */ + err = -EEXIST; + if (!ovl_dentry_lower(template->d_parent)) + goto out_dput; + + if (!S_ISLNK(newdentry->d_inode->i_mode)) + goto out_dput; + + err = -ENOMEM; + override_cred = prepare_creds(); + if (!override_cred) + goto out_dput; + + /* + * CAP_SYS_ADMIN for getxattr + * CAP_FOWNER for unlink in sticky directory + */ + cap_raise(override_cred->cap_effective, CAP_SYS_ADMIN); + cap_raise(override_cred->cap_effective, CAP_FOWNER); + old_cred = override_creds(override_cred); + + err = -EEXIST; + if (ovl_is_whiteout(newdentry)) + err = vfs_unlink(upperdir->d_inode, newdentry); + + revert_creds(old_cred); + put_cred(override_cred); + if (err) + goto out_dput; + + dput(newdentry); + newdentry = lookup_one_len(name->name, upperdir, name->len); + if (IS_ERR(newdentry)) { + ovl_whiteout(upperdir, template); + return newdentry; + } + + /* + * Whiteout just been successfully removed, parent + * i_mutex is still held, there's no way the lookup + * could return positive. + */ + WARN_ON(newdentry->d_inode); + } + + return newdentry; + +out_dput: + dput(newdentry); + return ERR_PTR(err); +} + +struct dentry *ovl_upper_create(struct dentry *upperdir, struct dentry *dentry, + struct kstat *stat, const char *link) +{ + int err; + struct dentry *newdentry; + struct inode *dir = upperdir->d_inode; + + newdentry = ovl_lookup_create(upperdir, dentry); + if (IS_ERR(newdentry)) + goto out; + + switch (stat->mode & S_IFMT) { + case S_IFREG: + err = vfs_create(dir, newdentry, stat->mode, NULL); + break; + + case S_IFDIR: + err = vfs_mkdir(dir, newdentry, stat->mode); + break; + + case S_IFCHR: + case S_IFBLK: + case S_IFIFO: + case S_IFSOCK: + err = vfs_mknod(dir, newdentry, stat->mode, stat->rdev); + break; + + case S_IFLNK: + err = vfs_symlink(dir, newdentry, link); + break; + + default: + err = -EPERM; + } + if (err) { + if (ovl_dentry_is_opaque(dentry)) + ovl_whiteout(upperdir, dentry); + dput(newdentry); + newdentry = ERR_PTR(err); + } else if (WARN_ON(!newdentry->d_inode)) { + /* + * Not quite sure if non-instantiated dentry is legal or not. + * VFS doesn't seem to care so check and warn here. + */ + dput(newdentry); + newdentry = ERR_PTR(-ENOENT); + } + +out: + return newdentry; + +} + +static int ovl_set_opaque(struct dentry *upperdentry) +{ + int err; + const struct cred *old_cred; + struct cred *override_cred; + + override_cred = prepare_creds(); + if (!override_cred) + return -ENOMEM; + + /* CAP_SYS_ADMIN for setxattr of "trusted" namespace */ + cap_raise(override_cred->cap_effective, CAP_SYS_ADMIN); + old_cred = override_creds(override_cred); + err = vfs_setxattr(upperdentry, ovl_opaque_xattr, "y", 1, 0); + revert_creds(old_cred); + put_cred(override_cred); + + return err; +} + +static int ovl_remove_opaque(struct dentry *upperdentry) +{ + int err; + const struct cred *old_cred; + struct cred *override_cred; + + override_cred = prepare_creds(); + if (!override_cred) + return -ENOMEM; + + /* CAP_SYS_ADMIN for removexattr of "trusted" namespace */ + cap_raise(override_cred->cap_effective, CAP_SYS_ADMIN); + old_cred = override_creds(override_cred); + err = vfs_removexattr(upperdentry, ovl_opaque_xattr); + revert_creds(old_cred); + put_cred(override_cred); + + return err; +} + +static int ovl_dir_getattr(struct vfsmount *mnt, struct dentry *dentry, + struct kstat *stat) +{ + int err; + enum ovl_path_type type; + struct path realpath; + + type = ovl_path_real(dentry, &realpath); + err = vfs_getattr(realpath.mnt, realpath.dentry, stat); + if (err) + return err; + + stat->dev = dentry->d_sb->s_dev; + stat->ino = dentry->d_inode->i_ino; + + /* + * It's probably not worth it to count subdirs to get the + * correct link count. nlink=1 seems to pacify 'find' and + * other utilities. + */ + if (type == OVL_PATH_MERGE) + stat->nlink = 1; + + return 0; +} + +static int ovl_create_object(struct dentry *dentry, int mode, dev_t rdev, + const char *link) +{ + int err; + struct dentry *newdentry; + struct dentry *upperdir; + struct inode *inode; + struct kstat stat = { + .mode = mode, + .rdev = rdev, + }; + + err = -ENOMEM; + inode = ovl_new_inode(dentry->d_sb, mode, dentry->d_fsdata); + if (!inode) + goto out; + + err = ovl_copy_up(dentry->d_parent); + if (err) + goto out_iput; + + upperdir = ovl_dentry_upper(dentry->d_parent); + mutex_lock_nested(&upperdir->d_inode->i_mutex, I_MUTEX_PARENT); + + newdentry = ovl_upper_create(upperdir, dentry, &stat, link); + err = PTR_ERR(newdentry); + if (IS_ERR(newdentry)) + goto out_unlock; + + ovl_dentry_version_inc(dentry->d_parent); + if (ovl_dentry_is_opaque(dentry) && S_ISDIR(mode)) { + err = ovl_set_opaque(newdentry); + if (err) { + vfs_rmdir(upperdir->d_inode, newdentry); + ovl_whiteout(upperdir, dentry); + goto out_dput; + } + } + ovl_dentry_update(dentry, newdentry); + ovl_copyattr(newdentry->d_inode, inode); + d_instantiate(dentry, inode); + inode = NULL; + newdentry = NULL; + err = 0; + +out_dput: + dput(newdentry); +out_unlock: + mutex_unlock(&upperdir->d_inode->i_mutex); +out_iput: + iput(inode); +out: + return err; +} + +static int ovl_create(struct inode *dir, struct dentry *dentry, umode_t mode, + bool excl) +{ + return ovl_create_object(dentry, (mode & 07777) | S_IFREG, 0, NULL); +} + +static int ovl_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) +{ + return ovl_create_object(dentry, (mode & 07777) | S_IFDIR, 0, NULL); +} + +static int ovl_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, + dev_t rdev) +{ + return ovl_create_object(dentry, mode, rdev, NULL); +} + +static int ovl_symlink(struct inode *dir, struct dentry *dentry, + const char *link) +{ + return ovl_create_object(dentry, S_IFLNK, 0, link); +} + +static int ovl_do_remove(struct dentry *dentry, bool is_dir) +{ + int err; + enum ovl_path_type type; + struct path realpath; + struct dentry *upperdir; + + err = ovl_copy_up(dentry->d_parent); + if (err) + return err; + + upperdir = ovl_dentry_upper(dentry->d_parent); + mutex_lock_nested(&upperdir->d_inode->i_mutex, I_MUTEX_PARENT); + type = ovl_path_real(dentry, &realpath); + if (type != OVL_PATH_LOWER) { + err = -ESTALE; + if (realpath.dentry->d_parent != upperdir) + goto out_d_drop; + + /* FIXME: create whiteout up front and rename to target */ + + if (is_dir) + err = vfs_rmdir(upperdir->d_inode, realpath.dentry); + else + err = vfs_unlink(upperdir->d_inode, realpath.dentry); + if (err) + goto out_d_drop; + + ovl_dentry_version_inc(dentry->d_parent); + } + + if (type != OVL_PATH_UPPER || ovl_dentry_is_opaque(dentry)) + err = ovl_whiteout(upperdir, dentry); + + /* + * Keeping this dentry hashed would mean having to release + * upperpath/lowerpath, which could only be done if we are the + * sole user of this dentry. Too tricky... Just unhash for + * now. + */ +out_d_drop: + d_drop(dentry); + mutex_unlock(&upperdir->d_inode->i_mutex); + + return err; +} + +static int ovl_unlink(struct inode *dir, struct dentry *dentry) +{ + return ovl_do_remove(dentry, false); +} + + +static int ovl_rmdir(struct inode *dir, struct dentry *dentry) +{ + int err; + enum ovl_path_type type; + + type = ovl_path_type(dentry); + if (type != OVL_PATH_UPPER) { + err = ovl_check_empty_and_clear(dentry, type); + if (err) + return err; + } + + return ovl_do_remove(dentry, true); +} + +static int ovl_link(struct dentry *old, struct inode *newdir, + struct dentry *new) +{ + int err; + struct dentry *olddentry; + struct dentry *newdentry; + struct dentry *upperdir; + struct inode *newinode; + + err = ovl_copy_up(old); + if (err) + goto out; + + err = ovl_copy_up(new->d_parent); + if (err) + goto out; + + upperdir = ovl_dentry_upper(new->d_parent); + mutex_lock_nested(&upperdir->d_inode->i_mutex, I_MUTEX_PARENT); + newdentry = ovl_lookup_create(upperdir, new); + err = PTR_ERR(newdentry); + if (IS_ERR(newdentry)) + goto out_unlock; + + olddentry = ovl_dentry_upper(old); + err = vfs_link(olddentry, upperdir->d_inode, newdentry); + if (!err) { + if (WARN_ON(!newdentry->d_inode)) { + dput(newdentry); + err = -ENOENT; + goto out_unlock; + } + newinode = ovl_new_inode(old->d_sb, newdentry->d_inode->i_mode, + new->d_fsdata); + if (!newinode) { + err = -ENOMEM; + goto link_fail; + } + ovl_copyattr(upperdir->d_inode, newinode); + + ovl_dentry_version_inc(new->d_parent); + ovl_dentry_update(new, newdentry); + + d_instantiate(new, newinode); + } else { +link_fail: + if (ovl_dentry_is_opaque(new)) + ovl_whiteout(upperdir, new); + dput(newdentry); + } +out_unlock: + mutex_unlock(&upperdir->d_inode->i_mutex); +out: + return err; +} + +static int ovl_rename(struct inode *olddir, struct dentry *old, + struct inode *newdir, struct dentry *new) +{ + int err; + enum ovl_path_type old_type; + enum ovl_path_type new_type; + struct dentry *old_upperdir; + struct dentry *new_upperdir; + struct dentry *olddentry; + struct dentry *newdentry; + struct dentry *trap; + bool old_opaque; + bool new_opaque; + bool new_create = false; + bool is_dir = S_ISDIR(old->d_inode->i_mode); + + /* Don't copy up directory trees */ + old_type = ovl_path_type(old); + if (old_type != OVL_PATH_UPPER && is_dir) + return -EXDEV; + + if (new->d_inode) { + new_type = ovl_path_type(new); + + if (new_type == OVL_PATH_LOWER && old_type == OVL_PATH_LOWER) { + if (ovl_dentry_lower(old)->d_inode == + ovl_dentry_lower(new)->d_inode) + return 0; + } + if (new_type != OVL_PATH_LOWER && old_type != OVL_PATH_LOWER) { + if (ovl_dentry_upper(old)->d_inode == + ovl_dentry_upper(new)->d_inode) + return 0; + } + + if (new_type != OVL_PATH_UPPER && + S_ISDIR(new->d_inode->i_mode)) { + err = ovl_check_empty_and_clear(new, new_type); + if (err) + return err; + } + } else { + new_type = OVL_PATH_UPPER; + } + + err = ovl_copy_up(old); + if (err) + return err; + + err = ovl_copy_up(new->d_parent); + if (err) + return err; + + old_upperdir = ovl_dentry_upper(old->d_parent); + new_upperdir = ovl_dentry_upper(new->d_parent); + + trap = lock_rename(new_upperdir, old_upperdir); + + olddentry = ovl_dentry_upper(old); + newdentry = ovl_dentry_upper(new); + if (newdentry) { + dget(newdentry); + } else { + new_create = true; + newdentry = ovl_lookup_create(new_upperdir, new); + err = PTR_ERR(newdentry); + if (IS_ERR(newdentry)) + goto out_unlock; + } + + err = -ESTALE; + if (olddentry->d_parent != old_upperdir) + goto out_dput; + if (newdentry->d_parent != new_upperdir) + goto out_dput; + if (olddentry == trap) + goto out_dput; + if (newdentry == trap) + goto out_dput; + + old_opaque = ovl_dentry_is_opaque(old); + new_opaque = ovl_dentry_is_opaque(new) || new_type != OVL_PATH_UPPER; + + if (is_dir && !old_opaque && new_opaque) { + err = ovl_set_opaque(olddentry); + if (err) + goto out_dput; + } + + err = vfs_rename(old_upperdir->d_inode, olddentry, + new_upperdir->d_inode, newdentry); + + if (err) { + if (new_create && ovl_dentry_is_opaque(new)) + ovl_whiteout(new_upperdir, new); + if (is_dir && !old_opaque && new_opaque) + ovl_remove_opaque(olddentry); + goto out_dput; + } + + if (old_type != OVL_PATH_UPPER || old_opaque) + err = ovl_whiteout(old_upperdir, old); + if (is_dir && old_opaque && !new_opaque) + ovl_remove_opaque(olddentry); + + if (old_opaque != new_opaque) + ovl_dentry_set_opaque(old, new_opaque); + + ovl_dentry_version_inc(old->d_parent); + ovl_dentry_version_inc(new->d_parent); + +out_dput: + dput(newdentry); +out_unlock: + unlock_rename(new_upperdir, old_upperdir); + return err; +} + +const struct inode_operations ovl_dir_inode_operations = { + .lookup = ovl_lookup, + .mkdir = ovl_mkdir, + .symlink = ovl_symlink, + .unlink = ovl_unlink, + .rmdir = ovl_rmdir, + .rename = ovl_rename, + .link = ovl_link, + .setattr = ovl_setattr, + .create = ovl_create, + .mknod = ovl_mknod, + .permission = ovl_permission, + .getattr = ovl_dir_getattr, + .setxattr = ovl_setxattr, + .getxattr = ovl_getxattr, + .listxattr = ovl_listxattr, + .removexattr = ovl_removexattr, +}; diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c new file mode 100644 index 00000000..e7ab09bd --- /dev/null +++ b/fs/overlayfs/inode.c @@ -0,0 +1,372 @@ +/* + * + * Copyright (C) 2011 Novell Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + */ + +#include +#include +#include +#include "overlayfs.h" + +int ovl_setattr(struct dentry *dentry, struct iattr *attr) +{ + struct dentry *upperdentry; + int err; + + if ((attr->ia_valid & ATTR_SIZE) && !ovl_dentry_upper(dentry)) + err = ovl_copy_up_truncate(dentry, attr->ia_size); + else + err = ovl_copy_up(dentry); + if (err) + return err; + + upperdentry = ovl_dentry_upper(dentry); + + if (attr->ia_valid & (ATTR_KILL_SUID|ATTR_KILL_SGID)) + attr->ia_valid &= ~ATTR_MODE; + + mutex_lock(&upperdentry->d_inode->i_mutex); + err = notify_change(upperdentry, attr); + if (!err) + ovl_copyattr(upperdentry->d_inode, dentry->d_inode); + mutex_unlock(&upperdentry->d_inode->i_mutex); + + return err; +} + +static int ovl_getattr(struct vfsmount *mnt, struct dentry *dentry, + struct kstat *stat) +{ + struct path realpath; + + ovl_path_real(dentry, &realpath); + return vfs_getattr(realpath.mnt, realpath.dentry, stat); +} + +int ovl_permission(struct inode *inode, int mask) +{ + struct ovl_entry *oe; + struct dentry *alias = NULL; + struct inode *realinode; + struct dentry *realdentry; + bool is_upper; + int err; + + if (S_ISDIR(inode->i_mode)) { + oe = inode->i_private; + } else if (mask & MAY_NOT_BLOCK) { + return -ECHILD; + } else { + /* + * For non-directories find an alias and get the info + * from there. + */ + alias = d_find_any_alias(inode); + if (WARN_ON(!alias)) + return -ENOENT; + + oe = alias->d_fsdata; + } + + realdentry = ovl_entry_real(oe, &is_upper); + + /* Careful in RCU walk mode */ + realinode = ACCESS_ONCE(realdentry->d_inode); + if (!realinode) { + WARN_ON(!(mask & MAY_NOT_BLOCK)); + err = -ENOENT; + goto out_dput; + } + + if (mask & MAY_WRITE) { + umode_t mode = realinode->i_mode; + + /* + * Writes will always be redirected to upper layer, so + * ignore lower layer being read-only. + * + * If the overlay itself is read-only then proceed + * with the permission check, don't return EROFS. + * This will only happen if this is the lower layer of + * another overlayfs. + * + * If upper fs becomes read-only after the overlay was + * constructed return EROFS to prevent modification of + * upper layer. + */ + err = -EROFS; + if (is_upper && !IS_RDONLY(inode) && IS_RDONLY(realinode) && + (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode))) + goto out_dput; + } + + err = __inode_permission(realinode, mask); +out_dput: + dput(alias); + return err; +} + + +struct ovl_link_data { + struct dentry *realdentry; + void *cookie; +}; + +static void *ovl_follow_link(struct dentry *dentry, struct nameidata *nd) +{ + void *ret; + struct dentry *realdentry; + struct inode *realinode; + + realdentry = ovl_dentry_real(dentry); + realinode = realdentry->d_inode; + + if (WARN_ON(!realinode->i_op->follow_link)) + return ERR_PTR(-EPERM); + + ret = realinode->i_op->follow_link(realdentry, nd); + if (IS_ERR(ret)) + return ret; + + if (realinode->i_op->put_link) { + struct ovl_link_data *data; + + data = kmalloc(sizeof(struct ovl_link_data), GFP_KERNEL); + if (!data) { + realinode->i_op->put_link(realdentry, nd, ret); + return ERR_PTR(-ENOMEM); + } + data->realdentry = realdentry; + data->cookie = ret; + + return data; + } else { + return NULL; + } +} + +static void ovl_put_link(struct dentry *dentry, struct nameidata *nd, void *c) +{ + struct inode *realinode; + struct ovl_link_data *data = c; + + if (!data) + return; + + realinode = data->realdentry->d_inode; + realinode->i_op->put_link(data->realdentry, nd, data->cookie); + kfree(data); +} + +static int ovl_readlink(struct dentry *dentry, char __user *buf, int bufsiz) +{ + struct path realpath; + struct inode *realinode; + + ovl_path_real(dentry, &realpath); + realinode = realpath.dentry->d_inode; + + if (!realinode->i_op->readlink) + return -EINVAL; + + touch_atime(&realpath); + + return realinode->i_op->readlink(realpath.dentry, buf, bufsiz); +} + + +static bool ovl_is_private_xattr(const char *name) +{ + return strncmp(name, "trusted.overlay.", 14) == 0; +} + +int ovl_setxattr(struct dentry *dentry, const char *name, + const void *value, size_t size, int flags) +{ + int err; + struct dentry *upperdentry; + + if (ovl_is_private_xattr(name)) + return -EPERM; + + err = ovl_copy_up(dentry); + if (err) + return err; + + upperdentry = ovl_dentry_upper(dentry); + return vfs_setxattr(upperdentry, name, value, size, flags); +} + +ssize_t ovl_getxattr(struct dentry *dentry, const char *name, + void *value, size_t size) +{ + if (ovl_path_type(dentry->d_parent) == OVL_PATH_MERGE && + ovl_is_private_xattr(name)) + return -ENODATA; + + return vfs_getxattr(ovl_dentry_real(dentry), name, value, size); +} + +ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size) +{ + ssize_t res; + int off; + + res = vfs_listxattr(ovl_dentry_real(dentry), list, size); + if (res <= 0 || size == 0) + return res; + + if (ovl_path_type(dentry->d_parent) != OVL_PATH_MERGE) + return res; + + /* filter out private xattrs */ + for (off = 0; off < res;) { + char *s = list + off; + size_t slen = strlen(s) + 1; + + BUG_ON(off + slen > res); + + if (ovl_is_private_xattr(s)) { + res -= slen; + memmove(s, s + slen, res - off); + } else { + off += slen; + } + } + + return res; +} + +int ovl_removexattr(struct dentry *dentry, const char *name) +{ + int err; + struct path realpath; + enum ovl_path_type type; + + if (ovl_path_type(dentry->d_parent) == OVL_PATH_MERGE && + ovl_is_private_xattr(name)) + return -ENODATA; + + type = ovl_path_real(dentry, &realpath); + if (type == OVL_PATH_LOWER) { + err = vfs_getxattr(realpath.dentry, name, NULL, 0); + if (err < 0) + return err; + + err = ovl_copy_up(dentry); + if (err) + return err; + + ovl_path_upper(dentry, &realpath); + } + + return vfs_removexattr(realpath.dentry, name); +} + +static bool ovl_open_need_copy_up(int flags, enum ovl_path_type type, + struct dentry *realdentry) +{ + if (type != OVL_PATH_LOWER) + return false; + + if (special_file(realdentry->d_inode->i_mode)) + return false; + + if (!(OPEN_FMODE(flags) & FMODE_WRITE) && !(flags & O_TRUNC)) + return false; + + return true; +} + +static int ovl_dentry_open(struct dentry *dentry, struct file *file, + const struct cred *cred) +{ + int err; + struct path realpath; + enum ovl_path_type type; + + type = ovl_path_real(dentry, &realpath); + if (ovl_open_need_copy_up(file->f_flags, type, realpath.dentry)) { + if (file->f_flags & O_TRUNC) + err = ovl_copy_up_truncate(dentry, 0); + else + err = ovl_copy_up(dentry); + if (err) + return err; + + ovl_path_upper(dentry, &realpath); + } + + return vfs_open(&realpath, file, cred); +} + +static const struct inode_operations ovl_file_inode_operations = { + .setattr = ovl_setattr, + .permission = ovl_permission, + .getattr = ovl_getattr, + .setxattr = ovl_setxattr, + .getxattr = ovl_getxattr, + .listxattr = ovl_listxattr, + .removexattr = ovl_removexattr, + .dentry_open = ovl_dentry_open, +}; + +static const struct inode_operations ovl_symlink_inode_operations = { + .setattr = ovl_setattr, + .follow_link = ovl_follow_link, + .put_link = ovl_put_link, + .readlink = ovl_readlink, + .getattr = ovl_getattr, + .setxattr = ovl_setxattr, + .getxattr = ovl_getxattr, + .listxattr = ovl_listxattr, + .removexattr = ovl_removexattr, +}; + +struct inode *ovl_new_inode(struct super_block *sb, umode_t mode, + struct ovl_entry *oe) +{ + struct inode *inode; + + inode = new_inode(sb); + if (!inode) + return NULL; + + mode &= S_IFMT; + + inode->i_ino = get_next_ino(); + inode->i_mode = mode; + inode->i_flags |= S_NOATIME | S_NOCMTIME; + + switch (mode) { + case S_IFDIR: + inode->i_private = oe; + inode->i_op = &ovl_dir_inode_operations; + inode->i_fop = &ovl_dir_operations; + break; + + case S_IFLNK: + inode->i_op = &ovl_symlink_inode_operations; + break; + + case S_IFREG: + case S_IFSOCK: + case S_IFBLK: + case S_IFCHR: + case S_IFIFO: + inode->i_op = &ovl_file_inode_operations; + break; + + default: + WARN(1, "illegal file type: %i\n", mode); + iput(inode); + inode = NULL; + } + + return inode; + +} diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h new file mode 100644 index 00000000..1cba38ff --- /dev/null +++ b/fs/overlayfs/overlayfs.h @@ -0,0 +1,70 @@ +/* + * + * Copyright (C) 2011 Novell Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + */ + +struct ovl_entry; + +enum ovl_path_type { + OVL_PATH_UPPER, + OVL_PATH_MERGE, + OVL_PATH_LOWER, +}; + +extern const char *ovl_opaque_xattr; +extern const char *ovl_whiteout_xattr; +extern const struct dentry_operations ovl_dentry_operations; + +enum ovl_path_type ovl_path_type(struct dentry *dentry); +u64 ovl_dentry_version_get(struct dentry *dentry); +void ovl_dentry_version_inc(struct dentry *dentry); +void ovl_path_upper(struct dentry *dentry, struct path *path); +void ovl_path_lower(struct dentry *dentry, struct path *path); +enum ovl_path_type ovl_path_real(struct dentry *dentry, struct path *path); +struct dentry *ovl_dentry_upper(struct dentry *dentry); +struct dentry *ovl_dentry_lower(struct dentry *dentry); +struct dentry *ovl_dentry_real(struct dentry *dentry); +struct dentry *ovl_entry_real(struct ovl_entry *oe, bool *is_upper); +bool ovl_dentry_is_opaque(struct dentry *dentry); +void ovl_dentry_set_opaque(struct dentry *dentry, bool opaque); +bool ovl_is_whiteout(struct dentry *dentry); +void ovl_dentry_update(struct dentry *dentry, struct dentry *upperdentry); +struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry, + unsigned int flags); +struct file *ovl_path_open(struct path *path, int flags); + +struct dentry *ovl_upper_create(struct dentry *upperdir, struct dentry *dentry, + struct kstat *stat, const char *link); + +/* readdir.c */ +extern const struct file_operations ovl_dir_operations; +int ovl_check_empty_and_clear(struct dentry *dentry, enum ovl_path_type type); + +/* inode.c */ +int ovl_setattr(struct dentry *dentry, struct iattr *attr); +int ovl_permission(struct inode *inode, int mask); +int ovl_setxattr(struct dentry *dentry, const char *name, + const void *value, size_t size, int flags); +ssize_t ovl_getxattr(struct dentry *dentry, const char *name, + void *value, size_t size); +ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size); +int ovl_removexattr(struct dentry *dentry, const char *name); + +struct inode *ovl_new_inode(struct super_block *sb, umode_t mode, + struct ovl_entry *oe); +static inline void ovl_copyattr(struct inode *from, struct inode *to) +{ + to->i_uid = from->i_uid; + to->i_gid = from->i_gid; +} + +/* dir.c */ +extern const struct inode_operations ovl_dir_inode_operations; + +/* copy_up.c */ +int ovl_copy_up(struct dentry *dentry); +int ovl_copy_up_truncate(struct dentry *dentry, loff_t size); diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c new file mode 100644 index 00000000..9e4e24ba --- /dev/null +++ b/fs/overlayfs/readdir.c @@ -0,0 +1,566 @@ +/* + * + * Copyright (C) 2011 Novell Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "overlayfs.h" + +struct ovl_cache_entry { + const char *name; + unsigned int len; + unsigned int type; + u64 ino; + bool is_whiteout; + struct list_head l_node; + struct rb_node node; +}; + +struct ovl_readdir_data { + struct rb_root *root; + struct list_head *list; + struct list_head *middle; + struct dentry *dir; + int count; + int err; +}; + +struct ovl_dir_file { + bool is_real; + bool is_cached; + struct list_head cursor; + u64 cache_version; + struct list_head cache; + struct file *realfile; +}; + +static struct ovl_cache_entry *ovl_cache_entry_from_node(struct rb_node *n) +{ + return container_of(n, struct ovl_cache_entry, node); +} + +static struct ovl_cache_entry *ovl_cache_entry_find(struct rb_root *root, + const char *name, int len) +{ + struct rb_node *node = root->rb_node; + int cmp; + + while (node) { + struct ovl_cache_entry *p = ovl_cache_entry_from_node(node); + + cmp = strncmp(name, p->name, len); + if (cmp > 0) + node = p->node.rb_right; + else if (cmp < 0 || len < p->len) + node = p->node.rb_left; + else + return p; + } + + return NULL; +} + +static struct ovl_cache_entry *ovl_cache_entry_new(const char *name, int len, + u64 ino, unsigned int d_type) +{ + struct ovl_cache_entry *p; + + p = kmalloc(sizeof(*p) + len + 1, GFP_KERNEL); + if (p) { + char *name_copy = (char *) (p + 1); + memcpy(name_copy, name, len); + name_copy[len] = '\0'; + p->name = name_copy; + p->len = len; + p->type = d_type; + p->ino = ino; + p->is_whiteout = false; + } + + return p; +} + +static int ovl_cache_entry_add_rb(struct ovl_readdir_data *rdd, + const char *name, int len, u64 ino, + unsigned int d_type) +{ + struct rb_node **newp = &rdd->root->rb_node; + struct rb_node *parent = NULL; + struct ovl_cache_entry *p; + + while (*newp) { + int cmp; + struct ovl_cache_entry *tmp; + + parent = *newp; + tmp = ovl_cache_entry_from_node(*newp); + cmp = strncmp(name, tmp->name, len); + if (cmp > 0) + newp = &tmp->node.rb_right; + else if (cmp < 0 || len < tmp->len) + newp = &tmp->node.rb_left; + else + return 0; + } + + p = ovl_cache_entry_new(name, len, ino, d_type); + if (p == NULL) + return -ENOMEM; + + list_add_tail(&p->l_node, rdd->list); + rb_link_node(&p->node, parent, newp); + rb_insert_color(&p->node, rdd->root); + + return 0; +} + +static int ovl_fill_lower(void *buf, const char *name, int namelen, + loff_t offset, u64 ino, unsigned int d_type) +{ + struct ovl_readdir_data *rdd = buf; + struct ovl_cache_entry *p; + + rdd->count++; + p = ovl_cache_entry_find(rdd->root, name, namelen); + if (p) { + list_move_tail(&p->l_node, rdd->middle); + } else { + p = ovl_cache_entry_new(name, namelen, ino, d_type); + if (p == NULL) + rdd->err = -ENOMEM; + else + list_add_tail(&p->l_node, rdd->middle); + } + + return rdd->err; +} + +static void ovl_cache_free(struct list_head *list) +{ + struct ovl_cache_entry *p; + struct ovl_cache_entry *n; + + list_for_each_entry_safe(p, n, list, l_node) + kfree(p); + + INIT_LIST_HEAD(list); +} + +static int ovl_fill_upper(void *buf, const char *name, int namelen, + loff_t offset, u64 ino, unsigned int d_type) +{ + struct ovl_readdir_data *rdd = buf; + + rdd->count++; + return ovl_cache_entry_add_rb(rdd, name, namelen, ino, d_type); +} + +static inline int ovl_dir_read(struct path *realpath, + struct ovl_readdir_data *rdd, filldir_t filler) +{ + struct file *realfile; + int err; + + realfile = ovl_path_open(realpath, O_RDONLY | O_DIRECTORY); + if (IS_ERR(realfile)) + return PTR_ERR(realfile); + + do { + rdd->count = 0; + rdd->err = 0; + err = vfs_readdir(realfile, filler, rdd); + if (err >= 0) + err = rdd->err; + } while (!err && rdd->count); + fput(realfile); + + return 0; +} + +static void ovl_dir_reset(struct file *file) +{ + struct ovl_dir_file *od = file->private_data; + enum ovl_path_type type = ovl_path_type(file->f_path.dentry); + + if (ovl_dentry_version_get(file->f_path.dentry) != od->cache_version) { + list_del_init(&od->cursor); + ovl_cache_free(&od->cache); + od->is_cached = false; + } + WARN_ON(!od->is_real && type != OVL_PATH_MERGE); + if (od->is_real && type == OVL_PATH_MERGE) { + fput(od->realfile); + od->realfile = NULL; + od->is_real = false; + } +} + +static int ovl_dir_mark_whiteouts(struct ovl_readdir_data *rdd) +{ + struct ovl_cache_entry *p; + struct dentry *dentry; + const struct cred *old_cred; + struct cred *override_cred; + + override_cred = prepare_creds(); + if (!override_cred) { + ovl_cache_free(rdd->list); + return -ENOMEM; + } + + /* + * CAP_SYS_ADMIN for getxattr + * CAP_DAC_OVERRIDE for lookup + */ + cap_raise(override_cred->cap_effective, CAP_SYS_ADMIN); + cap_raise(override_cred->cap_effective, CAP_DAC_OVERRIDE); + old_cred = override_creds(override_cred); + + mutex_lock(&rdd->dir->d_inode->i_mutex); + list_for_each_entry(p, rdd->list, l_node) { + if (p->type != DT_LNK) + continue; + + dentry = lookup_one_len(p->name, rdd->dir, p->len); + if (IS_ERR(dentry)) + continue; + + p->is_whiteout = ovl_is_whiteout(dentry); + dput(dentry); + } + mutex_unlock(&rdd->dir->d_inode->i_mutex); + + revert_creds(old_cred); + put_cred(override_cred); + + return 0; +} + +static inline int ovl_dir_read_merged(struct path *upperpath, + struct path *lowerpath, + struct ovl_readdir_data *rdd) +{ + int err; + struct rb_root root = RB_ROOT; + struct list_head middle; + + rdd->root = &root; + if (upperpath->dentry) { + rdd->dir = upperpath->dentry; + err = ovl_dir_read(upperpath, rdd, ovl_fill_upper); + if (err) + goto out; + + err = ovl_dir_mark_whiteouts(rdd); + if (err) + goto out; + } + /* + * Insert lowerpath entries before upperpath ones, this allows + * offsets to be reasonably constant + */ + list_add(&middle, rdd->list); + rdd->middle = &middle; + err = ovl_dir_read(lowerpath, rdd, ovl_fill_lower); + list_del(&middle); +out: + rdd->root = NULL; + + return err; +} + +static void ovl_seek_cursor(struct ovl_dir_file *od, loff_t pos) +{ + struct list_head *l; + loff_t off; + + l = od->cache.next; + for (off = 0; off < pos; off++) { + if (l == &od->cache) + break; + l = l->next; + } + list_move_tail(&od->cursor, l); +} + +static int ovl_readdir(struct file *file, void *buf, filldir_t filler) +{ + struct ovl_dir_file *od = file->private_data; + int res; + + if (!file->f_pos) + ovl_dir_reset(file); + + if (od->is_real) { + res = vfs_readdir(od->realfile, filler, buf); + file->f_pos = od->realfile->f_pos; + + return res; + } + + if (!od->is_cached) { + struct path lowerpath; + struct path upperpath; + struct ovl_readdir_data rdd = { .list = &od->cache }; + + ovl_path_lower(file->f_path.dentry, &lowerpath); + ovl_path_upper(file->f_path.dentry, &upperpath); + + res = ovl_dir_read_merged(&upperpath, &lowerpath, &rdd); + if (res) { + ovl_cache_free(rdd.list); + return res; + } + + od->cache_version = ovl_dentry_version_get(file->f_path.dentry); + od->is_cached = true; + + ovl_seek_cursor(od, file->f_pos); + } + + while (od->cursor.next != &od->cache) { + int over; + loff_t off; + struct ovl_cache_entry *p; + + p = list_entry(od->cursor.next, struct ovl_cache_entry, l_node); + off = file->f_pos; + if (!p->is_whiteout) { + over = filler(buf, p->name, p->len, off, p->ino, + p->type); + if (over) + break; + } + file->f_pos++; + list_move(&od->cursor, &p->l_node); + } + + return 0; +} + +static loff_t ovl_dir_llseek(struct file *file, loff_t offset, int origin) +{ + loff_t res; + struct ovl_dir_file *od = file->private_data; + + mutex_lock(&file->f_path.dentry->d_inode->i_mutex); + if (!file->f_pos) + ovl_dir_reset(file); + + if (od->is_real) { + res = vfs_llseek(od->realfile, offset, origin); + file->f_pos = od->realfile->f_pos; + } else { + res = -EINVAL; + + switch (origin) { + case SEEK_CUR: + offset += file->f_pos; + break; + case SEEK_SET: + break; + default: + goto out_unlock; + } + if (offset < 0) + goto out_unlock; + + if (offset != file->f_pos) { + file->f_pos = offset; + if (od->is_cached) + ovl_seek_cursor(od, offset); + } + res = offset; + } +out_unlock: + mutex_unlock(&file->f_path.dentry->d_inode->i_mutex); + + return res; +} + +static int ovl_dir_fsync(struct file *file, loff_t start, loff_t end, + int datasync) +{ + struct ovl_dir_file *od = file->private_data; + + /* May need to reopen directory if it got copied up */ + if (!od->realfile) { + struct path upperpath; + + ovl_path_upper(file->f_path.dentry, &upperpath); + od->realfile = ovl_path_open(&upperpath, O_RDONLY); + if (IS_ERR(od->realfile)) + return PTR_ERR(od->realfile); + } + + return vfs_fsync_range(od->realfile, start, end, datasync); +} + +static int ovl_dir_release(struct inode *inode, struct file *file) +{ + struct ovl_dir_file *od = file->private_data; + + list_del(&od->cursor); + ovl_cache_free(&od->cache); + if (od->realfile) + fput(od->realfile); + kfree(od); + + return 0; +} + +static int ovl_dir_open(struct inode *inode, struct file *file) +{ + struct path realpath; + struct file *realfile; + struct ovl_dir_file *od; + enum ovl_path_type type; + + od = kzalloc(sizeof(struct ovl_dir_file), GFP_KERNEL); + if (!od) + return -ENOMEM; + + type = ovl_path_real(file->f_path.dentry, &realpath); + realfile = ovl_path_open(&realpath, file->f_flags); + if (IS_ERR(realfile)) { + kfree(od); + return PTR_ERR(realfile); + } + INIT_LIST_HEAD(&od->cache); + INIT_LIST_HEAD(&od->cursor); + od->is_cached = false; + od->realfile = realfile; + od->is_real = (type != OVL_PATH_MERGE); + file->private_data = od; + + return 0; +} + +const struct file_operations ovl_dir_operations = { + .read = generic_read_dir, + .open = ovl_dir_open, + .readdir = ovl_readdir, + .llseek = ovl_dir_llseek, + .fsync = ovl_dir_fsync, + .release = ovl_dir_release, +}; + +static int ovl_check_empty_dir(struct dentry *dentry, struct list_head *list) +{ + int err; + struct path lowerpath; + struct path upperpath; + struct ovl_cache_entry *p; + struct ovl_readdir_data rdd = { .list = list }; + + ovl_path_upper(dentry, &upperpath); + ovl_path_lower(dentry, &lowerpath); + + err = ovl_dir_read_merged(&upperpath, &lowerpath, &rdd); + if (err) + return err; + + err = 0; + + list_for_each_entry(p, list, l_node) { + if (p->is_whiteout) + continue; + + if (p->name[0] == '.') { + if (p->len == 1) + continue; + if (p->len == 2 && p->name[1] == '.') + continue; + } + err = -ENOTEMPTY; + break; + } + + return err; +} + +static int ovl_remove_whiteouts(struct dentry *dir, struct list_head *list) +{ + struct path upperpath; + struct dentry *upperdir; + struct ovl_cache_entry *p; + const struct cred *old_cred; + struct cred *override_cred; + int err; + + ovl_path_upper(dir, &upperpath); + upperdir = upperpath.dentry; + + override_cred = prepare_creds(); + if (!override_cred) + return -ENOMEM; + + /* + * CAP_DAC_OVERRIDE for lookup and unlink + * CAP_SYS_ADMIN for setxattr of "trusted" namespace + * CAP_FOWNER for unlink in sticky directory + */ + cap_raise(override_cred->cap_effective, CAP_DAC_OVERRIDE); + cap_raise(override_cred->cap_effective, CAP_SYS_ADMIN); + cap_raise(override_cred->cap_effective, CAP_FOWNER); + old_cred = override_creds(override_cred); + + err = vfs_setxattr(upperdir, ovl_opaque_xattr, "y", 1, 0); + if (err) + goto out_revert_creds; + + mutex_lock_nested(&upperdir->d_inode->i_mutex, I_MUTEX_PARENT); + list_for_each_entry(p, list, l_node) { + struct dentry *dentry; + int ret; + + if (!p->is_whiteout) + continue; + + dentry = lookup_one_len(p->name, upperdir, p->len); + if (IS_ERR(dentry)) { + pr_warn( + "overlayfs: failed to lookup whiteout %.*s: %li\n", + p->len, p->name, PTR_ERR(dentry)); + continue; + } + ret = vfs_unlink(upperdir->d_inode, dentry); + dput(dentry); + if (ret) + pr_warn( + "overlayfs: failed to unlink whiteout %.*s: %i\n", + p->len, p->name, ret); + } + mutex_unlock(&upperdir->d_inode->i_mutex); + +out_revert_creds: + revert_creds(old_cred); + put_cred(override_cred); + + return err; +} + +int ovl_check_empty_and_clear(struct dentry *dentry, enum ovl_path_type type) +{ + int err; + LIST_HEAD(list); + + err = ovl_check_empty_dir(dentry, &list); + if (!err && type == OVL_PATH_MERGE) + err = ovl_remove_whiteouts(dentry, &list); + + ovl_cache_free(&list); + + return err; +} diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c new file mode 100644 index 00000000..3598d777 --- /dev/null +++ b/fs/overlayfs/super.c @@ -0,0 +1,703 @@ +/* + * + * Copyright (C) 2011 Novell Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "overlayfs.h" + +MODULE_AUTHOR("Miklos Szeredi "); +MODULE_DESCRIPTION("Overlay filesystem"); +MODULE_LICENSE("GPL"); + +static bool nooverlayfs; /* Disable overlayfs */ + +#define OVERLAYFS_SUPER_MAGIC 0x794c764f + +struct ovl_config { + char *lowerdir; + char *upperdir; +}; + +/* private information held for overlayfs's superblock */ +struct ovl_fs { + struct vfsmount *upper_mnt; + struct vfsmount *lower_mnt; + long lower_namelen; + /* pathnames of lower and upper dirs, for show_options */ + struct ovl_config config; +}; + +/* private information held for every overlayfs dentry */ +struct ovl_entry { + /* + * Keep "double reference" on upper dentries, so that + * d_delete() doesn't think it's OK to reset d_inode to NULL. + */ + struct dentry *__upperdentry; + struct dentry *lowerdentry; + union { + struct { + u64 version; + bool opaque; + }; + struct rcu_head rcu; + }; +}; + +const char *ovl_whiteout_xattr = "trusted.overlay.whiteout"; +const char *ovl_opaque_xattr = "trusted.overlay.opaque"; + + +enum ovl_path_type ovl_path_type(struct dentry *dentry) +{ + struct ovl_entry *oe = dentry->d_fsdata; + + if (oe->__upperdentry) { + if (oe->lowerdentry && S_ISDIR(dentry->d_inode->i_mode)) + return OVL_PATH_MERGE; + else + return OVL_PATH_UPPER; + } else { + return OVL_PATH_LOWER; + } +} + +static struct dentry *ovl_upperdentry_dereference(struct ovl_entry *oe) +{ + struct dentry *upperdentry = ACCESS_ONCE(oe->__upperdentry); + smp_read_barrier_depends(); + return upperdentry; +} + +void ovl_path_upper(struct dentry *dentry, struct path *path) +{ + struct ovl_fs *ofs = dentry->d_sb->s_fs_info; + struct ovl_entry *oe = dentry->d_fsdata; + + path->mnt = ofs->upper_mnt; + path->dentry = ovl_upperdentry_dereference(oe); +} + +void ovl_path_lower(struct dentry *dentry, struct path *path) +{ + struct ovl_fs *ofs = dentry->d_sb->s_fs_info; + struct ovl_entry *oe = dentry->d_fsdata; + + path->mnt = ofs->lower_mnt; + path->dentry = oe->lowerdentry; +} + +enum ovl_path_type ovl_path_real(struct dentry *dentry, struct path *path) +{ + + enum ovl_path_type type = ovl_path_type(dentry); + + if (type == OVL_PATH_LOWER) + ovl_path_lower(dentry, path); + else + ovl_path_upper(dentry, path); + + return type; +} + +struct dentry *ovl_dentry_upper(struct dentry *dentry) +{ + struct ovl_entry *oe = dentry->d_fsdata; + + return ovl_upperdentry_dereference(oe); +} + +struct dentry *ovl_dentry_lower(struct dentry *dentry) +{ + struct ovl_entry *oe = dentry->d_fsdata; + + return oe->lowerdentry; +} + +struct dentry *ovl_dentry_real(struct dentry *dentry) +{ + struct ovl_entry *oe = dentry->d_fsdata; + struct dentry *realdentry; + + realdentry = ovl_upperdentry_dereference(oe); + if (!realdentry) + realdentry = oe->lowerdentry; + + return realdentry; +} + +struct dentry *ovl_entry_real(struct ovl_entry *oe, bool *is_upper) +{ + struct dentry *realdentry; + + realdentry = ovl_upperdentry_dereference(oe); + if (realdentry) { + *is_upper = true; + } else { + realdentry = oe->lowerdentry; + *is_upper = false; + } + return realdentry; +} + +bool ovl_dentry_is_opaque(struct dentry *dentry) +{ + struct ovl_entry *oe = dentry->d_fsdata; + return oe->opaque; +} + +void ovl_dentry_set_opaque(struct dentry *dentry, bool opaque) +{ + struct ovl_entry *oe = dentry->d_fsdata; + oe->opaque = opaque; +} + +void ovl_dentry_update(struct dentry *dentry, struct dentry *upperdentry) +{ + struct ovl_entry *oe = dentry->d_fsdata; + + WARN_ON(!mutex_is_locked(&upperdentry->d_parent->d_inode->i_mutex)); + WARN_ON(oe->__upperdentry); + BUG_ON(!upperdentry->d_inode); + smp_wmb(); + oe->__upperdentry = dget(upperdentry); +} + +void ovl_dentry_version_inc(struct dentry *dentry) +{ + struct ovl_entry *oe = dentry->d_fsdata; + + WARN_ON(!mutex_is_locked(&dentry->d_inode->i_mutex)); + oe->version++; +} + +u64 ovl_dentry_version_get(struct dentry *dentry) +{ + struct ovl_entry *oe = dentry->d_fsdata; + + WARN_ON(!mutex_is_locked(&dentry->d_inode->i_mutex)); + return oe->version; +} + +bool ovl_is_whiteout(struct dentry *dentry) +{ + int res; + char val; + + if (!dentry) + return false; + if (!dentry->d_inode) + return false; + if (!S_ISLNK(dentry->d_inode->i_mode)) + return false; + + res = vfs_getxattr(dentry, ovl_whiteout_xattr, &val, 1); + if (res == 1 && val == 'y') + return true; + + return false; +} + +static bool ovl_is_opaquedir(struct dentry *dentry) +{ + int res; + char val; + + if (!S_ISDIR(dentry->d_inode->i_mode)) + return false; + + res = vfs_getxattr(dentry, ovl_opaque_xattr, &val, 1); + if (res == 1 && val == 'y') + return true; + + return false; +} + +static void ovl_entry_free(struct rcu_head *head) +{ + struct ovl_entry *oe = container_of(head, struct ovl_entry, rcu); + kfree(oe); +} + +static void ovl_dentry_release(struct dentry *dentry) +{ + struct ovl_entry *oe = dentry->d_fsdata; + + if (oe) { + dput(oe->__upperdentry); + dput(oe->__upperdentry); + dput(oe->lowerdentry); + call_rcu(&oe->rcu, ovl_entry_free); + } +} + +const struct dentry_operations ovl_dentry_operations = { + .d_release = ovl_dentry_release, +}; + +static struct ovl_entry *ovl_alloc_entry(void) +{ + return kzalloc(sizeof(struct ovl_entry), GFP_KERNEL); +} + +static inline struct dentry *ovl_lookup_real(struct dentry *dir, + struct qstr *name) +{ + struct dentry *dentry; + + mutex_lock(&dir->d_inode->i_mutex); + dentry = lookup_one_len(name->name, dir, name->len); + mutex_unlock(&dir->d_inode->i_mutex); + + if (IS_ERR(dentry)) { + if (PTR_ERR(dentry) == -ENOENT) + dentry = NULL; + } else if (!dentry->d_inode) { + dput(dentry); + dentry = NULL; + } + return dentry; +} + +static int ovl_do_lookup(struct dentry *dentry) +{ + struct ovl_entry *oe; + struct dentry *upperdir; + struct dentry *lowerdir; + struct dentry *upperdentry = NULL; + struct dentry *lowerdentry = NULL; + struct inode *inode = NULL; + int err; + + err = -ENOMEM; + oe = ovl_alloc_entry(); + if (!oe) + goto out; + + upperdir = ovl_dentry_upper(dentry->d_parent); + lowerdir = ovl_dentry_lower(dentry->d_parent); + + if (upperdir) { + upperdentry = ovl_lookup_real(upperdir, &dentry->d_name); + err = PTR_ERR(upperdentry); + if (IS_ERR(upperdentry)) + goto out_put_dir; + + if (lowerdir && upperdentry && + (S_ISLNK(upperdentry->d_inode->i_mode) || + S_ISDIR(upperdentry->d_inode->i_mode))) { + const struct cred *old_cred; + struct cred *override_cred; + + err = -ENOMEM; + override_cred = prepare_creds(); + if (!override_cred) + goto out_dput_upper; + + /* CAP_SYS_ADMIN needed for getxattr */ + cap_raise(override_cred->cap_effective, CAP_SYS_ADMIN); + old_cred = override_creds(override_cred); + + if (ovl_is_opaquedir(upperdentry)) { + oe->opaque = true; + } else if (ovl_is_whiteout(upperdentry)) { + dput(upperdentry); + upperdentry = NULL; + oe->opaque = true; + } + revert_creds(old_cred); + put_cred(override_cred); + } + } + if (lowerdir && !oe->opaque) { + lowerdentry = ovl_lookup_real(lowerdir, &dentry->d_name); + err = PTR_ERR(lowerdentry); + if (IS_ERR(lowerdentry)) + goto out_dput_upper; + } + + if (lowerdentry && upperdentry && + (!S_ISDIR(upperdentry->d_inode->i_mode) || + !S_ISDIR(lowerdentry->d_inode->i_mode))) { + dput(lowerdentry); + lowerdentry = NULL; + oe->opaque = true; + } + + if (lowerdentry || upperdentry) { + struct dentry *realdentry; + + realdentry = upperdentry ? upperdentry : lowerdentry; + err = -ENOMEM; + inode = ovl_new_inode(dentry->d_sb, realdentry->d_inode->i_mode, + oe); + if (!inode) + goto out_dput; + ovl_copyattr(realdentry->d_inode, inode); + } + + if (upperdentry) + oe->__upperdentry = dget(upperdentry); + + if (lowerdentry) + oe->lowerdentry = lowerdentry; + + dentry->d_fsdata = oe; + dentry->d_op = &ovl_dentry_operations; + d_add(dentry, inode); + + return 0; + +out_dput: + dput(lowerdentry); +out_dput_upper: + dput(upperdentry); +out_put_dir: + kfree(oe); +out: + return err; +} + +struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry, + unsigned int flags) +{ + int err = ovl_do_lookup(dentry); + + if (err) + return ERR_PTR(err); + + return NULL; +} + +struct file *ovl_path_open(struct path *path, int flags) +{ + return dentry_open(path, flags, current_cred()); +} + +static void ovl_put_super(struct super_block *sb) +{ + struct ovl_fs *ufs = sb->s_fs_info; + + if (!(sb->s_flags & MS_RDONLY)) + mnt_drop_write(ufs->upper_mnt); + + mntput(ufs->upper_mnt); + mntput(ufs->lower_mnt); + + kfree(ufs->config.lowerdir); + kfree(ufs->config.upperdir); + kfree(ufs); +} + +static int ovl_remount_fs(struct super_block *sb, int *flagsp, char *data) +{ + int flags = *flagsp; + struct ovl_fs *ufs = sb->s_fs_info; + + /* When remounting rw or ro, we need to adjust the write access to the + * upper fs. + */ + if (((flags ^ sb->s_flags) & MS_RDONLY) == 0) + /* No change to readonly status */ + return 0; + + if (flags & MS_RDONLY) { + mnt_drop_write(ufs->upper_mnt); + return 0; + } else + return mnt_want_write(ufs->upper_mnt); +} + +/** + * ovl_statfs + * @sb: The overlayfs super block + * @buf: The struct kstatfs to fill in with stats + * + * Get the filesystem statistics. As writes always target the upper layer + * filesystem pass the statfs to the same filesystem. + */ +static int ovl_statfs(struct dentry *dentry, struct kstatfs *buf) +{ + struct ovl_fs *ofs = dentry->d_sb->s_fs_info; + struct dentry *root_dentry = dentry->d_sb->s_root; + struct path path; + int err; + + ovl_path_upper(root_dentry, &path); + + err = vfs_statfs(&path, buf); + if (!err) { + buf->f_namelen = max(buf->f_namelen, ofs->lower_namelen); + buf->f_type = OVERLAYFS_SUPER_MAGIC; + } + + return err; +} + +/** + * ovl_show_options + * + * Prints the mount options for a given superblock. + * Returns zero; does not fail. + */ +static int ovl_show_options(struct seq_file *m, struct dentry *dentry) +{ + struct super_block *sb = dentry->d_sb; + struct ovl_fs *ufs = sb->s_fs_info; + + seq_printf(m, ",lowerdir=%s", ufs->config.lowerdir); + seq_printf(m, ",upperdir=%s", ufs->config.upperdir); + return 0; +} + +static const struct super_operations ovl_super_operations = { + .put_super = ovl_put_super, + .remount_fs = ovl_remount_fs, + .statfs = ovl_statfs, + .show_options = ovl_show_options, +}; + +enum { + OPT_LOWERDIR, + OPT_UPPERDIR, + OPT_ERR, +}; + +static const match_table_t ovl_tokens = { + {OPT_LOWERDIR, "lowerdir=%s"}, + {OPT_UPPERDIR, "upperdir=%s"}, + {OPT_ERR, NULL} +}; + +static int ovl_parse_opt(char *opt, struct ovl_config *config) +{ + char *p; + + config->upperdir = NULL; + config->lowerdir = NULL; + + while ((p = strsep(&opt, ",")) != NULL) { + int token; + substring_t args[MAX_OPT_ARGS]; + + if (!*p) + continue; + + token = match_token(p, ovl_tokens, args); + switch (token) { + case OPT_UPPERDIR: + kfree(config->upperdir); + config->upperdir = match_strdup(&args[0]); + if (!config->upperdir) + return -ENOMEM; + break; + + case OPT_LOWERDIR: + kfree(config->lowerdir); + config->lowerdir = match_strdup(&args[0]); + if (!config->lowerdir) + return -ENOMEM; + break; + + default: + return -EINVAL; + } + } + return 0; +} + +static int ovl_fill_super(struct super_block *sb, void *data, int silent) +{ + struct path lowerpath; + struct path upperpath; + struct inode *root_inode; + struct dentry *root_dentry; + struct ovl_entry *oe; + struct ovl_fs *ufs; + struct kstatfs statfs; + int err; + + err = -ENOMEM; + ufs = kmalloc(sizeof(struct ovl_fs), GFP_KERNEL); + if (!ufs) + goto out; + + err = ovl_parse_opt((char *) data, &ufs->config); + if (err) + goto out_free_ufs; + + err = -EINVAL; + if (!ufs->config.upperdir || !ufs->config.lowerdir) { + pr_err("overlayfs: missing upperdir or lowerdir\n"); + goto out_free_config; + } + + oe = ovl_alloc_entry(); + if (oe == NULL) + goto out_free_config; + + err = kern_path(ufs->config.upperdir, LOOKUP_FOLLOW, &upperpath); + if (err) + goto out_free_oe; + + err = kern_path(ufs->config.lowerdir, LOOKUP_FOLLOW, &lowerpath); + if (err) + goto out_put_upperpath; + + err = -ENOTDIR; + if (!S_ISDIR(upperpath.dentry->d_inode->i_mode) || + !S_ISDIR(lowerpath.dentry->d_inode->i_mode)) + goto out_put_lowerpath; + + err = vfs_statfs(&lowerpath, &statfs); + if (err) { + pr_err("overlayfs: statfs failed on lowerpath\n"); + goto out_put_lowerpath; + } + ufs->lower_namelen = statfs.f_namelen; + + sb->s_stack_depth = max(upperpath.mnt->mnt_sb->s_stack_depth, + lowerpath.mnt->mnt_sb->s_stack_depth) + 1; + + err = -EINVAL; + if (sb->s_stack_depth > FILESYSTEM_MAX_STACK_DEPTH) { + pr_err("overlayfs: maximum fs stacking depth exceeded\n"); + goto out_put_lowerpath; + } + + + ufs->upper_mnt = clone_private_mount(&upperpath); + err = PTR_ERR(ufs->upper_mnt); + if (IS_ERR(ufs->upper_mnt)) { + pr_err("overlayfs: failed to clone upperpath\n"); + goto out_put_lowerpath; + } + + ufs->lower_mnt = clone_private_mount(&lowerpath); + err = PTR_ERR(ufs->lower_mnt); + if (IS_ERR(ufs->lower_mnt)) { + pr_err("overlayfs: failed to clone lowerpath\n"); + goto out_put_upper_mnt; + } + + /* + * Make lower_mnt R/O. That way fchmod/fchown on lower file + * will fail instead of modifying lower fs. + */ + ufs->lower_mnt->mnt_flags |= MNT_READONLY; + + /* If the upper fs is r/o, we mark overlayfs r/o too */ + if (ufs->upper_mnt->mnt_sb->s_flags & MS_RDONLY) + sb->s_flags |= MS_RDONLY; + + if (!(sb->s_flags & MS_RDONLY)) { + err = mnt_want_write(ufs->upper_mnt); + if (err) + goto out_put_lower_mnt; + } + + err = -ENOMEM; + root_inode = ovl_new_inode(sb, S_IFDIR, oe); + if (!root_inode) + goto out_drop_write; + + root_dentry = d_make_root(root_inode); + if (!root_dentry) + goto out_drop_write; + + mntput(upperpath.mnt); + mntput(lowerpath.mnt); + + oe->__upperdentry = dget(upperpath.dentry); + oe->lowerdentry = lowerpath.dentry; + + root_dentry->d_fsdata = oe; + root_dentry->d_op = &ovl_dentry_operations; + + sb->s_magic = OVERLAYFS_SUPER_MAGIC; + sb->s_op = &ovl_super_operations; + sb->s_root = root_dentry; + sb->s_fs_info = ufs; + + return 0; + +out_drop_write: + if (!(sb->s_flags & MS_RDONLY)) + mnt_drop_write(ufs->upper_mnt); +out_put_lower_mnt: + mntput(ufs->lower_mnt); +out_put_upper_mnt: + mntput(ufs->upper_mnt); +out_put_lowerpath: + path_put(&lowerpath); +out_put_upperpath: + path_put(&upperpath); +out_free_oe: + kfree(oe); +out_free_config: + kfree(ufs->config.lowerdir); + kfree(ufs->config.upperdir); +out_free_ufs: + kfree(ufs); +out: + return err; +} + +static struct dentry *ovl_mount(struct file_system_type *fs_type, int flags, + const char *dev_name, void *raw_data) +{ + return mount_nodev(fs_type, flags, raw_data, ovl_fill_super); +} + +static struct file_system_type ovl_fs_type = { + .owner = THIS_MODULE, + .name = "overlayfs", + .mount = ovl_mount, + .kill_sb = kill_anon_super, +}; +MODULE_ALIAS("overlayfs"); + +static int __init ovl_init(void) +{ + if (nooverlayfs) { + pr_info("overlayfs is disabled\n"); + return 0; + } + + return register_filesystem(&ovl_fs_type); +} + +static void __exit ovl_exit(void) +{ + if (nooverlayfs) { + return; + } + + unregister_filesystem(&ovl_fs_type); +} + +#ifdef MODULE +module_param(nooverlayfs, bool, 0444); +#else +core_param(nooverlayfs, nooverlayfs, bool, 0444); +#endif + +module_init(ovl_init); +module_exit(ovl_exit); diff --git a/fs/splice.c b/fs/splice.c index 6909d89d..ddc93162 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1307,6 +1307,7 @@ long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, return ret; } +EXPORT_SYMBOL(do_splice_direct); static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, diff --git a/fs/yaffs2/yaffs_vfs.c b/fs/yaffs2/yaffs_vfs.c index 77c50287..5be8e918 100644 --- a/fs/yaffs2/yaffs_vfs.c +++ b/fs/yaffs2/yaffs_vfs.c @@ -2778,7 +2778,6 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version, /* Set up the memory size parameters.... */ - param->n_reserved_blocks = 5; param->n_caches = (options.no_cache) ? 0 : 10; param->inband_tags = options.inband_tags; @@ -2826,6 +2825,9 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version, param->total_bytes_per_chunk = YAFFS_BYTES_PER_CHUNK; } + /* Tweak reserved blocks count for very small partitions */ + if (n_blocks < 32) + param->n_reserved_blocks = 2; param->start_block = 0; param->end_block = n_blocks - 1; diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 4989b8a7..7d690eed 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -185,6 +185,8 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name, void of_fixed_clk_setup(struct device_node *np); +void of_fixed_factor_clk_setup(struct device_node *node); + /** * struct clk_gate - gating clock * diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index a55b88ea..51b146a1 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -198,7 +198,13 @@ extern int __cpufreq_driver_target(struct cpufreq_policy *policy, extern int __cpufreq_driver_getavg(struct cpufreq_policy *policy, - unsigned int cpu); + unsigned int cpu); +extern int __cpu_get_mv(struct cpufreq_policy *policy, + unsigned int *mv); +extern int __cpu_get_boost(struct cpufreq_policy *policy, + unsigned int *boost); +extern int __cpu_set_boost(struct cpufreq_policy *policy, + unsigned int boost); int cpufreq_register_governor(struct cpufreq_governor *governor); void cpufreq_unregister_governor(struct cpufreq_governor *governor); diff --git a/include/linux/device.h b/include/linux/device.h index 43dcda93..251f33b2 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -573,6 +573,7 @@ extern int devres_release_group(struct device *dev, void *id); extern void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp); extern void devm_kfree(struct device *dev, void *p); +void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res); void __iomem *devm_request_and_ioremap(struct device *dev, struct resource *res); diff --git a/include/linux/fs.h b/include/linux/fs.h index 7617ee04..87e28ec4 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -244,6 +244,12 @@ struct iattr { */ #include +/* + * Maximum number of layers of fs stack. Needs to be limited to + * prevent kernel stack overflow + */ +#define FILESYSTEM_MAX_STACK_DEPTH 2 + /** * enum positive_aop_returns - aop return codes with specific semantics * @@ -1320,6 +1326,11 @@ struct super_block { /* Being remounted read-only */ int s_readonly_remount; + + /* + * Indicates how deep in a filesystem stack this SB is + */ + int s_stack_depth; }; /* superblock cache pruning functions */ @@ -1573,6 +1584,7 @@ struct inode_operations { int (*atomic_open)(struct inode *, struct dentry *, struct file *, unsigned open_flag, umode_t create_mode, int *opened); + int (*dentry_open)(struct dentry *, struct file *, const struct cred *); } ____cacheline_aligned; ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, @@ -2005,6 +2017,7 @@ extern struct file *file_open_name(struct filename *, int, umode_t); extern struct file *filp_open(const char *, int, umode_t); extern struct file *file_open_root(struct dentry *, struct vfsmount *, const char *, int); +extern int vfs_open(const struct path *, struct file *, const struct cred *); extern struct file * dentry_open(const struct path *, int, const struct cred *); extern int filp_close(struct file *, fl_owner_t id); @@ -2210,6 +2223,7 @@ extern sector_t bmap(struct inode *, sector_t); #endif extern int notify_change(struct dentry *, struct iattr *); extern int inode_permission(struct inode *, int); +extern int __inode_permission(struct inode *, int); extern int generic_permission(struct inode *, int); static inline bool execute_ok(struct inode *inode) diff --git a/include/linux/mount.h b/include/linux/mount.h index 73005f99..435f281e 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h @@ -68,6 +68,9 @@ extern void mnt_pin(struct vfsmount *mnt); extern void mnt_unpin(struct vfsmount *mnt); extern int __mnt_is_readonly(struct vfsmount *mnt); +struct path; +extern struct vfsmount *clone_private_mount(struct path *path); + struct file_system_type; extern struct vfsmount *vfs_kern_mount(struct file_system_type *type, int flags, const char *name, diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 769541b3..194b6798 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -59,9 +59,10 @@ extern int nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len); #define NAND_MAX_OOBSIZE 640 #define NAND_MAX_PAGESIZE 16384 -#define SINGLE_PLANE 1 -#define DUAL_PLANE 2 - +#define MTD_SINGLE_PLANE 1 +#define MTD_DUAL_PLANE 2 +#define MTD_ESLC 3 +#define MTD_SLC 4 /* * Constants for hardware specific CLE/ALE/NCE function * @@ -536,7 +537,7 @@ struct nand_chip { int feature_addr, uint8_t *subfeature_para); int (*onfi_get_features)(struct mtd_info *mtd, struct nand_chip *chip, int feature_addr, uint8_t *subfeature_para); - int (*get_planes)(struct mtd_info *mtd); + int (*get_mtd_info)(struct mtd_info *mtd, loff_t off, loff_t *dst); int chip_delay; unsigned int options; diff --git a/include/sound/pcm-indirect.h b/include/sound/pcm-indirect.h index 1df7acaa..716ff816 100644 --- a/include/sound/pcm-indirect.h +++ b/include/sound/pcm-indirect.h @@ -60,6 +60,15 @@ snd_pcm_indirect_playback_transfer(struct snd_pcm_substream *substream, rec->appl_ptr = appl_ptr; } qsize = rec->hw_queue_size ? rec->hw_queue_size : rec->hw_buffer_size; + + // Freewheeling mode: xrun check is disabled, typically done by dmix plugin. + // In this case, rec->sw_ready has to be assigned a non-zero value somehow as + // diff variable is always 0 because appl_ptr is not being updated. Period size + // seems like a good fit. + // TODO(ysoni) revisit this patch once alsa-devel-mailing-list gives a more generic advice + if (runtime->stop_threshold == runtime->boundary) + rec->sw_ready = snd_pcm_lib_period_bytes(substream); + while (rec->hw_ready < qsize && rec->sw_ready > 0) { unsigned int hw_to_end = rec->hw_buffer_size - rec->hw_data; unsigned int sw_to_end = rec->sw_buffer_size - rec->sw_data; diff --git a/lib/devres.c b/lib/devres.c index 80b9c76d..9c76b3a9 100644 --- a/lib/devres.c +++ b/lib/devres.c @@ -86,22 +86,24 @@ void devm_iounmap(struct device *dev, void __iomem *addr) EXPORT_SYMBOL(devm_iounmap); /** - * devm_request_and_ioremap() - Check, request region, and ioremap resource - * @dev: Generic device to handle the resource for + * devm_ioremap_resource() - check, request region, and ioremap resource + * @dev: generic device to handle the resource for * @res: resource to be handled * - * Takes all necessary steps to ioremap a mem resource. Uses managed device, so - * everything is undone on driver detach. Checks arguments, so you can feed - * it the result from e.g. platform_get_resource() directly. Returns the - * remapped pointer or NULL on error. Usage example: + * Checks that a resource is a valid memory region, requests the memory region + * and ioremaps it either as cacheable or as non-cacheable memory depending on + * the resource's flags. All operations are managed and will be undone on + * driver detach. + * + * Returns a pointer to the remapped memory or an ERR_PTR() encoded error code + * on failure. Usage example: * * res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - * base = devm_request_and_ioremap(&pdev->dev, res); - * if (!base) - * return -EADDRNOTAVAIL; + * base = devm_ioremap_resource(&pdev->dev, res); + * if (IS_ERR(base)) + * return PTR_ERR(base); */ -void __iomem *devm_request_and_ioremap(struct device *dev, - struct resource *res) +void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res) { resource_size_t size; const char *name; @@ -111,7 +113,7 @@ void __iomem *devm_request_and_ioremap(struct device *dev, if (!res || resource_type(res) != IORESOURCE_MEM) { dev_err(dev, "invalid resource\n"); - return NULL; + return ERR_PTR(-EINVAL); } size = resource_size(res); @@ -119,7 +121,7 @@ void __iomem *devm_request_and_ioremap(struct device *dev, if (!devm_request_mem_region(dev, res->start, size, name)) { dev_err(dev, "can't request region for resource %pR\n", res); - return NULL; + return ERR_PTR(-EBUSY); } if (res->flags & IORESOURCE_CACHEABLE) @@ -130,10 +132,39 @@ void __iomem *devm_request_and_ioremap(struct device *dev, if (!dest_ptr) { dev_err(dev, "ioremap failed for resource %pR\n", res); devm_release_mem_region(dev, res->start, size); + dest_ptr = ERR_PTR(-ENOMEM); } return dest_ptr; } +EXPORT_SYMBOL(devm_ioremap_resource); + +/** + * devm_request_and_ioremap() - Check, request region, and ioremap resource + * @dev: Generic device to handle the resource for + * @res: resource to be handled + * + * Takes all necessary steps to ioremap a mem resource. Uses managed device, so + * everything is undone on driver detach. Checks arguments, so you can feed + * it the result from e.g. platform_get_resource() directly. Returns the + * remapped pointer or NULL on error. Usage example: + * + * res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + * base = devm_request_and_ioremap(&pdev->dev, res); + * if (!base) + * return -EADDRNOTAVAIL; + */ +void __iomem *devm_request_and_ioremap(struct device *device, + struct resource *res) +{ + void __iomem *dest_ptr; + + dest_ptr = devm_ioremap_resource(device, res); + if (IS_ERR(dest_ptr)) + return NULL; + + return dest_ptr; +} EXPORT_SYMBOL(devm_request_and_ioremap); #ifdef CONFIG_HAS_IOPORT diff --git a/net/wireless/db.txt b/net/wireless/db.txt index d0d1a3f0..da0cfada 100644 --- a/net/wireless/db.txt +++ b/net/wireless/db.txt @@ -1,211 +1,306 @@ # This is the world regulatory domain country 00: - (2402 - 2472 @ 40), (3, 20) + (2402 - 2472 @ 40), (20) # Channel 12 - 13. - (2457 - 2482 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS + (2457 - 2482 @ 40), (20), NO-IR # Channel 14. Only JP enables this and for 802.11b only - (2474 - 2494 @ 20), (3, 20), PASSIVE-SCAN, NO-IBSS, NO-OFDM + (2474 - 2494 @ 20), (20), NO-IR, NO-OFDM # Channel 36 - 48 - (5170 - 5250 @ 80), (3, 20), PASSIVE-SCAN, NO-IBSS - # NB: 5260 MHz - 5700 MHz requies DFS + (5170 - 5250 @ 80), (20), NO-IR, AUTO-BW + # Channel 52 - 64 + (5250 - 5330 @ 80), (20), NO-IR, DFS, AUTO-BW + # Channel 100 - 144 + (5490 - 5730 @ 160), (20), NO-IR, DFS # Channel 149 - 165 - (5735 - 5835 @ 80), (3, 20), PASSIVE-SCAN, NO-IBSS + (5735 - 5835 @ 80), (20), NO-IR # IEEE 802.11ad (60GHz), channels 1..3 - (57240 - 63720 @ 2160), (N/A, 0) + (57240 - 63720 @ 2160), (0) country AD: + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20) + (5250 - 5330 @ 80), (20), DFS + (5490 - 5710 @ 80), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) -country AE: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) +country AE: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) -country AL: - (2402 - 2482 @ 20), (N/A, 20) +country AF: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS -country AM: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 20), (N/A, 18) - (5250 - 5330 @ 20), (N/A, 18), DFS - -country AN: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5490 - 5710 @ 40), (N/A, 27), DFS - -country AR: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) +# Source: +# http://pucanguilla.org/Downloads/January2005-Anguilla%20Table%20of%20Allocations.pdf +country AI: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +country AL: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20.00), AUTO-BW + (5250 - 5330 @ 80), (20.00), DFS, AUTO-BW + (5490 - 5710 @ 160), (27.00), DFS + +country AM: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 20), (18) + (5250 - 5330 @ 20), (18), DFS + +country AN: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +country AR: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country AS: DFS-FCC + (2402 - 2472 @ 40), (30) + (5170 - 5250 @ 80), (24), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) country AT: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 20) - (5250 - 5330 @ 80), (N/A, 20), DFS - (5490 - 5710 @ 80), (N/A, 27), DFS - # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR - -country AU: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) - -country AW: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5490 - 5710 @ 40), (N/A, 27), DFS - -country AZ: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 18) - (5250 - 5330 @ 40), (N/A, 18), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + +country AU: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5710 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country AW: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +country AZ: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (18), AUTO-BW + (5250 - 5330 @ 80), (18), DFS, AUTO-BW country BA: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5490 - 5710 @ 40), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) -country BB: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (3, 23) - (5250 - 5330 @ 40), (3, 23), DFS - (5735 - 5835 @ 40), (3, 30) +country BB: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (23), AUTO-BW + (5250 - 5330 @ 80), (23), DFS, AUTO-BW + (5735 - 5835 @ 80), (30) -country BD: - (2402 - 2482 @ 40), (N/A, 20) +country BD: DFS-JP + (2402 - 2482 @ 40), (20) + (5735 - 5835 @ 80), (30) country BE: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 20) - (5250 - 5330 @ 80), (N/A, 20), DFS - (5490 - 5710 @ 80), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) + +country BF: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) country BG: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 23) - (5250 - 5290 @ 40), (N/A, 23), DFS - (5490 - 5710 @ 40), (N/A, 30), DFS - # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR - -country BH: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 20), (N/A, 20) - (5250 - 5330 @ 20), (N/A, 20), DFS - (5735 - 5835 @ 20), (N/A, 20) - -country BL: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 18) - (5250 - 5330 @ 40), (N/A, 18), DFS - -country BN: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5735 - 5835 @ 40), (N/A, 30) - -country BO: - (2402 - 2482 @ 40), (N/A, 30) - (5735 - 5835 @ 40), (N/A, 30) - -country BR: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) - -country BY: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5490 - 5710 @ 40), (N/A, 27), DFS - -country BZ: - (2402 - 2482 @ 40), (N/A, 30) - (5735 - 5835 @ 40), (N/A, 30) - -country CA: - (2402 - 2472 @ 40), (3, 27) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + # 5 gHz Short Range Devices, ref: + # Etsi EN 300 440-1 + # Etsi EN 300 440-2 + # http://crc.bg/files/_bg/Spisak_2015.pdf + # http://crc.bg/files/_bg/Pravila_2015_resh24.pdf + (5725 - 5875 @ 80), (14) + # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + +country BH: DFS-JP + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 20), (20) + (5250 - 5330 @ 20), (20), DFS + (5735 - 5835 @ 20), (20) + +country BL: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +country BM: DFS-FCC + (2402 - 2472 @ 40), (30) + (5170 - 5250 @ 80), (24), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country BN: DFS-JP + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5735 - 5835 @ 80), (20) + +country BO: DFS-JP + (2402 - 2482 @ 40), (20) + (5250 - 5330 @ 80), (30), DFS + (5735 - 5835 @ 80), (30) + +country BR: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country BS: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (24), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +# Source: +# http://www.bicma.gov.bt/paper/publication/nrrpart4.pdf +country BT: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +country BY: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +country BZ: DFS-JP + (2402 - 2482 @ 40), (30) + (5735 - 5835 @ 80), (30) + +country CA: DFS-FCC + (2402 - 2472 @ 40), (30) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5600 @ 80), (24), DFS + (5650 - 5730 @ 40), (24), DFS + (5735 - 5835 @ 80), (30) + +# Source: +# http://www.art-rca.org +country CF: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 40), (17) + (5250 - 5330 @ 40), (24), DFS + (5490 - 5730 @ 40), (24), DFS + (5735 - 5835 @ 40), (30) country CH: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 20) - (5250 - 5330 @ 80), (N/A, 20), DFS - (5490 - 5710 @ 80), (N/A, 27), DFS - # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR - -country CL: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5735 - 5835 @ 40), (N/A, 20) - -country CN: - (2402 - 2482 @ 40), (N/A, 20) - (5735 - 5835 @ 80), (N/A, 30) + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + +country CI: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country CL: DFS-JP + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5735 - 5835 @ 80), (20) + +country CN: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (23), AUTO-BW + (5250 - 5330 @ 80), (23), DFS, AUTO-BW + (5735 - 5835 @ 80), (30) # 60 gHz band channels 1,4: 28dBm, channels 2,3: 44dBm # ref: http://www.miit.gov.cn/n11293472/n11505629/n11506593/n11960250/n11960606/n11960700/n12330791.files/n12330790.pdf - (57240 - 59400 @ 2160), (N/A, 28) - (59400 - 63720 @ 2160), (N/A, 44) - (63720 - 65880 @ 2160), (N/A, 28) - -country CO: - (2402 - 2472 @ 40), (3, 27) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) - -country CR: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) + (57240 - 59400 @ 2160), (28) + (59400 - 63720 @ 2160), (44) + (63720 - 65880 @ 2160), (28) + +country CO: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country CR: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 20), (17) + (5250 - 5330 @ 20), (24), DFS + (5490 - 5730 @ 20), (24), DFS + (5735 - 5835 @ 20), (30) + +country CX: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (24), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) country CY: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5490 - 5710 @ 40), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) # Data from http://www.ctu.eu/164/download/VOR/VOR-12-08-2005-34.pdf # and http://www.ctu.eu/164/download/VOR/VOR-12-05-2007-6-AN.pdf # Power at 5250 - 5350 MHz and 5470 - 5725 MHz can be doubled if TPC is # implemented. country CZ: DFS-ETSI - (2400 - 2483.5 @ 40), (N/A, 100 mW) - (5150 - 5250 @ 80), (N/A, 200 mW), NO-OUTDOOR - (5250 - 5350 @ 80), (N/A, 100 mW), NO-OUTDOOR, DFS - (5470 - 5725 @ 80), (N/A, 500 mW), DFS + (2400 - 2483.5 @ 40), (100 mW) + (5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW + (5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW + (5470 - 5725 @ 160), (500 mW), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) # Data from "Frequenznutzungsplan" (as published in April 2008), downloaded from # http://www.bundesnetzagentur.de/cae/servlet/contentblob/38448/publicationFile/2659/Frequenznutzungsplan2008_Id17448pdf.pdf @@ -221,543 +316,819 @@ country CZ: DFS-ETSI country DE: DFS-ETSI # entries 279004 and 280006 - (2400 - 2483.5 @ 40), (N/A, 100 mW) + (2400 - 2483.5 @ 40), (100 mW) # entry 303005 - (5150 - 5250 @ 80), (N/A, 100 mW), NO-OUTDOOR + (5150 - 5250 @ 80), (100 mW), NO-OUTDOOR, AUTO-BW # entries 304002 and 305002 - (5250 - 5350 @ 80), (N/A, 100 mW), NO-OUTDOOR, DFS + (5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW # entries 308002, 309001 and 310003 - (5470 - 5725 @ 80), (N/A, 500 mW), DFS + (5470 - 5725 @ 160), (500 mW), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) country DK: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 20) - (5250 - 5330 @ 80), (N/A, 20), DFS - (5490 - 5710 @ 80), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR - -country DO: - (2402 - 2472 @ 40), (3, 27) - (5170 - 5250 @ 40), (3, 17) - (5250 - 5330 @ 40), (3, 23), DFS - (5735 - 5835 @ 40), (3, 30) + (57000 - 66000 @ 2160), (40) -country DZ: - (2402 - 2482 @ 40), (N/A, 20) - -country EC: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) +# Source: +# http://www.ntrcdom.org/index.php?option=com_content&view=category&layout=blog&id=10&Itemid=55 +country DM: DFS-FCC + (2402 - 2472 @ 40), (30) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (23), DFS, AUTO-BW + (5735 - 5835 @ 80), (30) + +country DO: DFS-FCC + (2402 - 2472 @ 40), (30) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (23), DFS, AUTO-BW + (5735 - 5835 @ 80), (30) + +country DZ: DFS-JP + (2402 - 2482 @ 40), (20) + (5170.000 - 5250.000 @ 80.000), (23.00), AUTO-BW + (5250.000 - 5330.000 @ 80.000), (23.00), DFS, AUTO-BW + (5490.000 - 5670.000 @ 160.000), (23.00), DFS + +country EC: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 20), (17) + (5250 - 5330 @ 20), (24), DFS + (5490 - 5730 @ 20), (24), DFS + (5735 - 5835 @ 20), (30) country EE: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5490 - 5710 @ 40), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) -country EG: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 20), (N/A, 20) - (5250 - 5330 @ 20), (N/A, 20), DFS +country EG: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 40), (20) + (5250 - 5330 @ 40), (20), DFS + +# Orden IET/787/2013, de 25 de abril, por la que se aprueba +# el cuadro nacional de atribución de frecuencias. +# http://www.boe.es/diario_boe/txt.php?id=BOE-A-2013-4845 +# +# more info at "Cuadro nacional de atribución de frecuencias (CNAF)": +# http://www.minetur.gob.es/telecomunicaciones/espectro/paginas/cnaf.aspx country ES: DFS-ETSI - (2400 - 2483.5 @ 40), (N/A, 100 mW) - (5150 - 5250 @ 80), (N/A, 100 mW), NO-OUTDOOR - (5250 - 5350 @ 80), (N/A, 100 mW), NO-OUTDOOR, DFS - (5470 - 5725 @ 80), (N/A, 500 mW), DFS + (2400 - 2483.5 @ 40), (100 mW) + (5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW + (5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW + (5470 - 5725 @ 160), (500 mW), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) + +country ET: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS country FI: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 20) - (5250 - 5330 @ 80), (N/A, 20), DFS - (5490 - 5710 @ 80), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) -country FR: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 20) - (5250 - 5330 @ 80), (N/A, 20), DFS - (5490 - 5710 @ 80), (N/A, 27), DFS - # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR +country FM: DFS-FCC + (2402 - 2472 @ 40), (30) + (5170 - 5250 @ 80), (24), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) -country GE: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 18) - (5250 - 5330 @ 40), (N/A, 18), DFS +country FR: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) country GB: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 20) - (5250 - 5330 @ 80), (N/A, 20), DFS - (5490 - 5710 @ 80), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + +country GD: DFS-FCC + (2402 - 2472 @ 40), (30) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country GE: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (18), AUTO-BW + (5250 - 5330 @ 80), (18), DFS, AUTO-BW # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) + +country GF: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +country GH: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country GL: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20) + (5250 - 5330 @ 80), (20), DFS + (5490 - 5710 @ 80), (27), DFS -country GD: - (2402 - 2472 @ 40), (3, 27) - (5170 - 5250 @ 40), (3, 17) - (5250 - 5330 @ 40), (3, 20), DFS - (5490 - 5710 @ 40), (3, 20), DFS - (5735 - 5835 @ 40), (3, 30) +country GP: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS country GR: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 20) - (5250 - 5330 @ 80), (N/A, 20), DFS - (5490 - 5710 @ 80), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) -country GL: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 20), (N/A, 20) - (5250 - 5330 @ 20), (N/A, 20), DFS - (5490 - 5710 @ 20), (N/A, 27), DFS - -country GT: - (2402 - 2472 @ 40), (3, 27) - (5170 - 5250 @ 40), (3, 17) - (5250 - 5330 @ 40), (3, 23), DFS - (5735 - 5835 @ 40), (3, 30) - -country GU: - (2402 - 2472 @ 40), (3, 27) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) - -country HN: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (3, 17) - (5250 - 5330 @ 40), (3, 20), DFS - (5490 - 5710 @ 40), (3, 20), DFS - (5735 - 5835 @ 40), (3, 30) +country GT: DFS-FCC + (2402 - 2472 @ 40), (30) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (23), DFS, AUTO-BW + (5735 - 5835 @ 80), (30) + +country GU: DFS-FCC + (2402 - 2472 @ 40), (30) + (5170 - 5250 @ 20), (17) + (5250 - 5330 @ 20), (24), DFS + (5490 - 5730 @ 20), (24), DFS + (5735 - 5835 @ 20), (30) + +country GY: + (2402 - 2482 @ 40), (30) + (5735 - 5835 @ 80), (30) country HK: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5710 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country HN: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) country HR: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5490 - 5710 @ 40), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) -country HT: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5490 - 5710 @ 40), (N/A, 27), DFS +country HT: DFS-FCC + (2402 - 2472 @ 40), (30) + (5170 - 5250 @ 80), (24), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) country HU: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5490 - 5710 @ 40), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) -country ID: +country ID: DFS-JP # ref: http://www.postel.go.id/content/ID/regulasi/standardisasi/kepdir/bwa%205,8%20ghz.pdf - (2402 - 2482 @ 40), (N/A, 20) - (5735 - 5815 @ 80), (N/A, 20) + (2402 - 2482 @ 20), (20) + (5735 - 5815 @ 20), (23) country IE: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 20) - (5250 - 5330 @ 80), (N/A, 20), DFS - (5490 - 5710 @ 80), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) + +country IL: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW + (5250 - 5350 @ 80), (200 mW), NO-OUTDOOR, DFS, AUTO-BW -country IL: - (2402 - 2482 @ 40), (N/A, 20) - (5150 - 5250 @ 80), (N/A, 200 mW), NO-OUTDOOR - (5250 - 5350 @ 80), (N/A, 200 mW), NO-OUTDOOR, DFS +country IN: DFS-JP + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5735 - 5835 @ 80), (20) -country IN: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5735 - 5835 @ 40), (N/A, 20) +country IR: DFS-JP + (2402 - 2482 @ 40), (20) + (5735 - 5835 @ 80), (30) country IS: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5490 - 5710 @ 40), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR - -country IR: - (2402 - 2482 @ 40), (N/A, 20) - (5735 - 5835 @ 40), (N/A, 30) + (57000 - 66000 @ 2160), (40) country IT: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 20) - (5250 - 5330 @ 80), (N/A, 20), DFS - (5490 - 5710 @ 80), (N/A, 27), DFS - # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR - -country JM: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (3, 17) - (5250 - 5330 @ 40), (3, 20), DFS - (5490 - 5710 @ 40), (3, 20), DFS - (5735 - 5835 @ 40), (3, 30) - -country JP: - (2402 - 2482 @ 40), (N/A, 20) - (2474 - 2494 @ 20), (N/A, 20), NO-OFDM - (4910 - 4990 @ 40), (N/A, 23) - (5030 - 5090 @ 40), (N/A, 23) - (5170 - 5250 @ 80), (N/A, 20) - (5250 - 5330 @ 80), (N/A, 20), DFS - (5490 - 5710 @ 160), (N/A, 23), DFS - -country JO: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 18) - -country KE: - (2402 - 2482 @ 40), (N/A, 20) - (5735 - 5835 @ 40), (N/A, 30) - -country KH: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5490 - 5710 @ 40), (N/A, 27), DFS - -country KP: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5330 @ 40), (3, 20) - (5160 - 5250 @ 40), (3, 20), DFS - (5490 - 5630 @ 40), (3, 30), DFS - (5735 - 5815 @ 40), (3, 30) - -country KR: - (2402 - 2482 @ 20), (N/A, 20) - (5170 - 5250 @ 80), (3, 20) - (5250 - 5330 @ 80), (3, 20), DFS - (5490 - 5630 @ 80), (3, 30), DFS - (5735 - 5815 @ 80), (3, 30) - -country KW: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 20) - (5250 - 5330 @ 80), (N/A, 20), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + +country JM: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country JO: DFS-JP + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (23) + (5735 - 5835 @ 80), (23) + +country JP: DFS-JP + (2402 - 2482 @ 40), (20) + (2474 - 2494 @ 20), (20), NO-OFDM + (4910 - 4990 @ 40), (23) + (5030 - 5090 @ 40), (23) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (23), DFS + # 60 GHz band channels 2-4 at 10mW, + # ref: http://www.arib.or.jp/english/html/overview/doc/1-STD-T74v1_1.pdf + (59000 - 66000 @ 2160), (10 mW) + +country KE: DFS-JP + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (23) + (5490 - 5570 @ 80), (30), DFS + (5735 - 5775 @ 40), (23) + +country KH: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +# Source +# http://ntrc.kn/?page_id=7 +country KN: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (30), DFS + (5735 - 5815 @ 80), (30) + +country KP: DFS-JP + (2402 - 2482 @ 20), (20) + (5170 - 5250 @ 20), (20) + (5250 - 5330 @ 20), (20), DFS + (5490 - 5630 @ 20), (30), DFS + (5735 - 5815 @ 20), (30) + +country KR: DFS-JP + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (30), DFS + (5735 - 5835 @ 80), (30) + +country KW: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + +country KY: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (24), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) country KZ: - (2402 - 2482 @ 40), (N/A, 20) + (2402 - 2482 @ 40), (20) -country LB: - (2402 - 2482 @ 40), (N/A, 20) - (5735 - 5835 @ 40), (N/A, 30) +country LB: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +# Source: +# http://www.ntrc.org.lc/operational_structures.htm +country LC: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (30), DFS + (5735 - 5815 @ 80), (30) country LI: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5490 - 5710 @ 40), (N/A, 27), DFS - -country LK: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 20), (3, 17) - (5250 - 5330 @ 20), (3, 20), DFS - (5490 - 5710 @ 20), (3, 20), DFS - (5735 - 5835 @ 20), (3, 30) + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +country LK: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 20), (17) + (5250 - 5330 @ 20), (24), DFS + (5490 - 5730 @ 20), (24), DFS + (5735 - 5835 @ 20), (30) + +# Source: +# http://lca.org.ls/images/documents/lesotho_national_frequency_allocation_plan.pdf +country LS: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS country LT: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5490 - 5710 @ 40), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) country LU: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 20) - (5250 - 5330 @ 80), (N/A, 20), DFS - (5490 - 5710 @ 80), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) country LV: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5490 - 5710 @ 40), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) + +country MA: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW country MC: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 18) - (5250 - 5330 @ 40), (N/A, 18), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS -country MA: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 23) - (5735 - 5835 @ 80), (N/A, 23) +# Source: +# http://www.cnfr.md/index.php?pag=sec&id=117&l=en +country MD: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS -country MO: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (3, 23) - (5250 - 5330 @ 40), (3, 23), DFS - (5735 - 5835 @ 40), (3, 30) +# Source: +# http://www.cept.org/files/1050/Tools%20and%20Services/EFIS%20-%20ECO%20Frequency%20Information%20System/National%20frequency%20tables/Montenegro%20NAFT%20-%202010.pdf +country ME: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +country MF: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +country MH: DFS-FCC + (2402 - 2472 @ 40), (30) + (5170 - 5250 @ 80), (24), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) country MK: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5490 - 5710 @ 40), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) + +country MN: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (24), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country MO: DFS-FCC + (2402 - 2482 @ 40), (23) + (5170 - 5250 @ 80), (23), AUTO-BW + (5250 - 5330 @ 80), (23), DFS, AUTO-BW + (5490 - 5730 @ 160), (30), DFS + (5735 - 5835 @ 80), (30) + +country MP: DFS-FCC + (2402 - 2472 @ 40), (30) + (5170 - 5250 @ 80), (24), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country MQ: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +# Source: +# http://www.are.mr/pdfs/telec_freq_TNAbf_2010.pdf +country MR: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS country MT: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5490 - 5710 @ 40), (N/A, 27), DFS - # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR - -country MY: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 17) - (5250 - 5330 @ 80), (N/A, 23), DFS - (5735 - 5835 @ 80), (N/A, 30) - -country MX: - (2402 - 2472 @ 40), (3, 27) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + +country MU: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (24), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +# Source: +# http://www.cam.gov.mv/docs/tech_standards/TAM-TS-100-2004-WLAN.pdf +country MV: DFS-ETSI + (2400 - 2483.5 @ 40), (100 mW) + (5150 - 5250 @ 80), (200 mW), AUTO-BW + (5250 - 5350 @ 80), (100 mW), DFS, AUTO-BW + (5725 - 5850 @ 80), (100 mW) + +country MW: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +country MX: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country MY: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (23), DFS, AUTO-BW + (5735 - 5835 @ 80), (30) + +country NG: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5250 - 5330 @ 80), (30), DFS + (5735 - 5835 @ 80), (30) + +country NI: DFS-FCC + (2402 - 2472 @ 40), (30) + (5170 - 5250 @ 80), (24), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) country NL: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 20), NO-OUTDOOR - (5250 - 5330 @ 80), (N/A, 20), NO-OUTDOOR, DFS - (5490 - 5710 @ 80), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), NO-OUTDOOR, AUTO-BW + (5250 - 5330 @ 80), (20), NO-OUTDOOR, DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) +# Data from http://www.lovdata.no/dokument/SF/forskrift/2012-01-19-77 +# Power at 5250 - 5350 MHz, 5470 - 5725 MHz and 5815 – 5850 MHz can +# be doubled if TPC is implemented. +# Up to 2W (or 4W with TPC) is allowed in the 5725 – 5795 MHz band +# which has been merged with 5470 - 5725 MHz to allow wide channels country NO: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5490 - 5710 @ 40), (N/A, 27), DFS - # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR - -country NP: - (2402 - 2482 @ 40), (N/A, 20) - (5735 - 5835 @ 40), (N/A, 30) - -country NZ: - (2402 - 2482 @ 40), (N/A, 30) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) - -country OM: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (3, 17) - (5250 - 5330 @ 40), (3, 20), DFS - (5490 - 5710 @ 40), (3, 20), DFS - (5735 - 5835 @ 40), (3, 30) - -country PA: - (2402 - 2472 @ 40), (3, 27) - (5170 - 5250 @ 40), (3, 17) - (5250 - 5330 @ 40), (3, 23), DFS - (5735 - 5835 @ 40), (3, 30) - -country PE: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) - -country PG: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (3, 17) - (5250 - 5330 @ 40), (3, 23), DFS - (5735 - 5835 @ 40), (3, 30) - -country PH: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) - -country PK: - (2402 - 2482 @ 40), (N/A, 20) - (5735 - 5835 @ 40), (N/A, 30) + (2400 - 2483.5 @ 40), (100 mW) + (5150 - 5250 @ 80), (200 mW), AUTO-BW + (5250 - 5350 @ 80), (100 mW), DFS, AUTO-BW + (5470 - 5795 @ 160), (500 mW), DFS + (5815 - 5850 @ 35), (2000 mW), DFS + (17100 - 17300 @ 200), (100 mW) + # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + +country NP: DFS-JP + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5735 - 5835 @ 80), (20) + +country NZ: DFS-ETSI + (2402 - 2482 @ 40), (30) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country OM: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +country PA: DFS-FCC + (2402 - 2472 @ 40), (30) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (23), DFS, AUTO-BW + (5735 - 5835 @ 80), (30) + +country PE: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country PF: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +country PG: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country PH: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country PK: DFS-JP + (2402 - 2482 @ 40), (20) + (5735 - 5835 @ 80), (30) country PL: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 20) - (5250 - 5330 @ 80), (N/A, 20), DFS - (5490 - 5710 @ 80), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) -country PT: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 20) - (5250 - 5330 @ 80), (N/A, 20), DFS - (5490 - 5710 @ 80), (N/A, 27), DFS - # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR +country PM: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS -country PR: - (2402 - 2472 @ 40), (3, 27) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) +country PR: DFS-FCC + (2402 - 2472 @ 40), (30) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) -country QA: - (2402 - 2482 @ 40), (N/A, 20) - (5735 - 5835 @ 40), (N/A, 30) +country PT: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + +country PW: DFS-FCC + (2402 - 2472 @ 40), (30) + (5170 - 5250 @ 80), (24), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country PY: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (24), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country QA: DFS-JP + (2402 - 2482 @ 40), (20) + (5735 - 5835 @ 80), (30) + +country RE: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS country RO: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5490 - 5710 @ 40), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) # Source: # http://www.ratel.rs/upload/documents/Plan_namene/Plan_namene-sl_glasnik.pdf -country RS: - (2400 - 2483.5 @ 40), (N/A, 100 mW) - (5150 - 5350 @ 40), (N/A, 200 mW), NO-OUTDOOR - (5470 - 5725 @ 20), (3, 1000 mW), DFS - # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR - -country RU: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5330 @ 40), (N/A, 20) - (5650 - 5710 @ 40), (N/A, 30) - (5735 - 5835 @ 40), (N/A, 30) - -country RW: - (2402 - 2482 @ 40), (N/A, 20) - (5735 - 5835 @ 40), (N/A, 30) - -country SA: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) +country RS: DFS-ETSI + (2400 - 2483.5 @ 40), (100 mW) + (5150 - 5350 @ 40), (200 mW), NO-OUTDOOR + (5470 - 5725 @ 20), (1000 mW), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 + (57000 - 66000 @ 2160), (40) + +country RU: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 40), (20) + (5250 - 5330 @ 40), (20), DFS + (5650 - 5730 @ 40), (30), DFS + (5735 - 5835 @ 40), (30) + # 60 GHz band channels 1-4, ref: Changes to NLA 124_Order â„–129_22042015.pdf + (57000 - 66000 @ 2160), (40) + +country RW: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country SA: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS country SE: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 20) - (5250 - 5330 @ 80), (N/A, 20), DFS - (5490 - 5710 @ 80), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) -country SG: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) +country SG: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) country SI: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (N/A, 20) - (5250 - 5330 @ 40), (N/A, 20), DFS - (5490 - 5710 @ 40), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) country SK: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 20) - (5250 - 5330 @ 80), (N/A, 20), DFS - (5490 - 5710 @ 80), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) -country SV: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 20), (3, 17) - (5250 - 5330 @ 20), (3, 23), DFS - (5735 - 5835 @ 20), (3, 30) +# Source: +# Regulation N° 2004-005 ART/DG/DRC/D.Rég +country SN: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country SR: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +country SV: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 20), (17) + (5250 - 5330 @ 20), (23), DFS + (5735 - 5835 @ 20), (30) country SY: - (2402 - 2482 @ 40), (N/A, 20) - -country TW: - (2402 - 2472 @ 40), (3, 27) - (5270 - 5330 @ 40), (3, 17), DFS - (5490 - 5710 @ 80), (3, 30), DFS - (5735 - 5815 @ 80), (3, 30) - -country TH: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) - -country TT: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (3, 17) - (5250 - 5330 @ 40), (3, 20), DFS - (5490 - 5710 @ 40), (3, 20), DFS - (5735 - 5835 @ 40), (3, 30) - -country TN: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 20), (N/A, 20) - (5250 - 5330 @ 20), (N/A, 20), DFS + (2402 - 2482 @ 40), (20) + +# Source: +# http://www.telecommission.tc/Spectrum-plan20110324-101210.html +country TC: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (24), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country TD: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +country TG: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 40), (20) + (5250 - 5330 @ 40), (20), DFS + (5490 - 5710 @ 40), (27), DFS + +country TH: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country TN: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW country TR: DFS-ETSI - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (N/A, 20) - (5250 - 5330 @ 80), (N/A, 20), DFS - (5490 - 5710 @ 80), (N/A, 27), DFS + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) + +country TT: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country TW: DFS-JP + (2402 - 2472 @ 40), (30) + (5270 - 5330 @ 40), (17), DFS + (5490 - 5590 @ 80), (30), DFS + (5650 - 5710 @ 40), (30), DFS + (5735 - 5835 @ 80), (30) +country TZ: + (2402 - 2482 @ 40), (20) + (5735 - 5835 @ 80), (30) + # Source: # #914 / 06 Sep 2007: http://www.ucrf.gov.ua/uk/doc/nkrz/1196068874 # #1174 / 23 Oct 2008: http://www.nkrz.gov.ua/uk/activities/ruling/1225269361 @@ -765,59 +1136,117 @@ country TR: DFS-ETSI # Listed 5GHz range is a lowest common denominator for all related # rules in the referenced laws. Such a range is used because of # disputable definitions there. -country UA: - (2400 - 2483.5 @ 40), (N/A, 20), NO-OUTDOOR - (5150 - 5350 @ 40), (N/A, 20), NO-OUTDOOR +country UA: DFS-ETSI + (2400 - 2483.5 @ 40), (20), NO-OUTDOOR + (5150 - 5350 @ 40), (20), NO-OUTDOOR + (5490 - 5670 @ 80), (20), DFS + (5735 - 5835 @ 80), (20) # 60 gHz band channels 1-4, ref: Etsi En 302 567 - (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR + (57000 - 66000 @ 2160), (40) + +country UG: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (24), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) country US: DFS-FCC - (2402 - 2472 @ 40), (3, 27) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5600 @ 80), (3, 24), DFS - (5650 - 5710 @ 40), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) + (2402 - 2472 @ 40), (30) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (23), DFS, AUTO-BW + (5490 - 5730 @ 160), (23), DFS + (5735 - 5835 @ 80), (30) # 60g band # reference: http://cfr.regstoday.com/47cfr15.aspx#47_CFR_15p255 # channels 1,2,3, EIRP=40dBm(43dBm peak) - (57240 - 63720 @ 2160), (N/A, 40) - -country UY: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 40), (3, 17) - (5250 - 5330 @ 40), (3, 20), DFS - (5490 - 5710 @ 40), (3, 20), DFS - (5735 - 5835 @ 40), (3, 30) - -country UZ: - (2402 - 2472 @ 40), (3, 27) - (5170 - 5250 @ 40), (3, 17) - (5250 - 5330 @ 40), (3, 20), DFS - (5490 - 5710 @ 40), (3, 20), DFS - (5735 - 5835 @ 40), (3, 30) - -country VE: - (2402 - 2482 @ 40), (N/A, 20) - (5735 - 5815 @ 40), (N/A, 23) - -country VN: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) + (57240 - 63720 @ 2160), (40) -country YE: - (2402 - 2482 @ 40), (N/A, 20) +country UY: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) -country ZA: - (2402 - 2482 @ 40), (N/A, 20) - (5170 - 5250 @ 80), (3, 17) - (5250 - 5330 @ 80), (3, 24), DFS - (5490 - 5710 @ 80), (3, 24), DFS - (5735 - 5835 @ 80), (3, 30) +# Source: +# http://cemc.uz/article/1976/ +country UZ: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW -country ZW: - (2402 - 2482 @ 40), (N/A, 20) +# Source: +# http://www.ntrc.vc/regulations/Jun_2006_Spectrum_Managment_Regulations.pdf +country VC: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +# Source: +# Official Gazette (Gaceta Oficial) concerning Unlicensed transmitter use +# (10 June 2013) +# http://www.conatel.gob.ve/ +country VE: DFS-FCC + (2402 - 2482 @ 40), (30) + (5170 - 5250 @ 80), (23), AUTO-BW + (5250 - 5330 @ 80), (23), DFS, AUTO-BW + (5735 - 5835 @ 80), (30) + +country VI: DFS-FCC + (2402 - 2472 @ 40), (30) + (5170 - 5250 @ 80), (24), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country VN: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17) + (5250 - 5330 @ 80), (24), DFS + (5490 - 5730 @ 80), (24), DFS + (5735 - 5835 @ 80), (30) + +# Source: +# http://www.trr.vu/attachments/category/130/GURL_for_Short-range_Radiocommunication_Devices2.pdf +country VU: DFS-FCC + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (17), AUTO-BW + (5250 - 5330 @ 80), (24), DFS, AUTO-BW + (5490 - 5730 @ 160), (24), DFS + (5735 - 5835 @ 80), (30) + +country WF: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +country WS: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 40), (20) + (5250 - 5330 @ 40), (20), DFS + (5490 - 5710 @ 40), (27), DFS + +country YE: + (2402 - 2482 @ 40), (20) + +country YT: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +country ZA: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + +country ZW: DFS-ETSI + (2402 - 2482 @ 40), (20) + (5170 - 5250 @ 80), (20), AUTO-BW + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS diff --git a/net/wireless/genregdb.awk b/net/wireless/genregdb.awk index 9392f8cb..a4dc83bf 100644 --- a/net/wireless/genregdb.awk +++ b/net/wireless/genregdb.awk @@ -33,55 +33,59 @@ BEGIN { regdb = "const struct ieee80211_regdomain *reg_regdb[] = {\n" } -/^[ \t]*#/ { - # Ignore -} - -!active && /^[ \t]*$/ { - # Ignore -} - -!active && /country/ { +function parse_country_head() { country=$2 sub(/:/, "", country) printf "static const struct ieee80211_regdomain regdom_%s = {\n", country printf "\t.alpha2 = \"%s\",\n", country + if ($NF ~ /DFS-ETSI/) + printf "\t.dfs_region = NL80211_DFS_ETSI,\n" + else if ($NF ~ /DFS-FCC/) + printf "\t.dfs_region = NL80211_DFS_FCC,\n" + else if ($NF ~ /DFS-JP/) + printf "\t.dfs_region = NL80211_DFS_JP,\n" printf "\t.reg_rules = {\n" active = 1 regdb = regdb "\t®dom_" country ",\n" } -active && /^[ \t]*\(/ { +function parse_reg_rule() +{ + flag_starts_at = 7 + start = $1 sub(/\(/, "", start) end = $3 bw = $5 sub(/\),/, "", bw) - gain = $6 - sub(/\(/, "", gain) - sub(/,/, "", gain) - power = $7 - sub(/\)/, "", power) - sub(/,/, "", power) + gain = 0 + power = $6 # power might be in mW... - units = $8 + units = $7 + dfs_cac = 0 + + sub(/\(/, "", power) + sub(/\),/, "", power) + sub(/\),/, "", units) sub(/\)/, "", units) - sub(/,/, "", units) + if (units == "mW") { - if (power == 100) { - power = 20 - } else if (power == 200) { - power = 23 - } else if (power == 500) { - power = 27 - } else if (power == 1000) { - power = 30 - } else { - print "Unknown power value in database!" + flag_starts_at = 8 + power = 10 * log(power)/log(10) + if ($8 ~ /[[:digit:]]/) { + flag_starts_at = 9 + dfs_cac = $8 + } + } else { + if ($7 ~ /[[:digit:]]/) { + flag_starts_at = 8 + dfs_cac = $7 } } + sub(/\(/, "", dfs_cac) + sub(/\),/, "", dfs_cac) flagstr = "" - for (i=8; i<=NF; i++) + for (i=flag_starts_at; i<=NF; i++) flagstr = flagstr $i split(flagstr, flagarray, ",") flags = "" @@ -103,15 +107,20 @@ active && /^[ \t]*\(/ { } else if (flagarray[arg] == "PASSIVE-SCAN") { flags = flags "\n\t\t\tNL80211_RRF_PASSIVE_SCAN | " } else if (flagarray[arg] == "NO-IBSS") { - flags = flags "\n\t\t\tNL80211_RRF_NO_IBSS | " + flags = flags "\n\t\t\tNL80211_RRF_PASSIVE_SCAN | " + } else if (flagarray[arg] == "NO-IR") { + flags = flags "\n\t\t\tNL80211_RRF_PASSIVE_SCAN | " + } else if (flagarray[arg] == "AUTO-BW") { } + } flags = flags "0" printf "\t\tREG_RULE(%d, %d, %d, %d, %d, %s),\n", start, end, bw, gain, power, flags rules++ } -active && /^[ \t]*$/ { +function print_tail_country() +{ active = 0 printf "\t},\n" printf "\t.n_reg_rules = %d\n", rules @@ -119,7 +128,29 @@ active && /^[ \t]*$/ { rules = 0; } +/^[ \t]*#/ { + # Ignore +} + +!active && /^[ \t]*$/ { + # Ignore +} + +!active && /country/ { + parse_country_head() +} + +active && /^[ \t]*\(/ { + parse_reg_rule() +} + +active && /^[ \t]*$/ { + print_tail_country() +} + END { + if (active) + print_tail_country() print regdb "};" print "" print "int reg_regdb_size = ARRAY_SIZE(reg_regdb);" diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index f45706ad..d5ea1f4d 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -2716,14 +2716,6 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info) if (!cfg80211_reg_can_beacon(&rdev->wiphy, ¶ms.chandef)) return -EINVAL; - mutex_lock(&rdev->devlist_mtx); - err = cfg80211_can_use_chan(rdev, wdev, params.chandef.chan, - CHAN_MODE_SHARED); - mutex_unlock(&rdev->devlist_mtx); - - if (err) - return err; - err = rdev_start_ap(rdev, dev, ¶ms); if (!err) { wdev->preset_chandef = params.chandef; diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 91ef82b4..90196177 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1534,6 +1534,11 @@ static int __regulatory_hint(struct wiphy *wiphy, } intersect = true; } else if (r) { + /* Save alpha2 if initiated from user in case the request is dropped. */ + if (pending_request->initiator == NL80211_REGDOM_SET_BY_USER) { + user_alpha2[0] = pending_request->alpha2[0]; + user_alpha2[1] = pending_request->alpha2[1]; + } /* * If the regulatory domain being requested by the * driver has already been set just copy it to the diff --git a/scripts/coccinelle/api/devm_ioremap_resource.cocci b/scripts/coccinelle/api/devm_ioremap_resource.cocci new file mode 100644 index 00000000..495daa3d --- /dev/null +++ b/scripts/coccinelle/api/devm_ioremap_resource.cocci @@ -0,0 +1,90 @@ +virtual patch +virtual report + +@depends on patch@ +expression base, dev, res; +@@ + +-base = devm_request_and_ioremap(dev, res); ++base = devm_ioremap_resource(dev, res); + ... + if ( +-base == NULL ++IS_ERR(base) + || ...) { +<... +- return ...; ++ return PTR_ERR(base); +...> + } + +@depends on patch@ +expression e, E, ret; +identifier l; +@@ + + e = devm_ioremap_resource(...); + ... + if (IS_ERR(e) || ...) { + ... when any +- ret = E; ++ ret = PTR_ERR(e); + ... +( + return ret; +| + goto l; +) + } + +@depends on patch@ +expression e; +@@ + + e = devm_ioremap_resource(...); + ... + if (IS_ERR(e) || ...) { + ... +- \(dev_dbg\|dev_err\|pr_debug\|pr_err\|DRM_ERROR\)(...); + ... + } + +@depends on patch@ +expression e; +identifier l; +@@ + + e = devm_ioremap_resource(...); + ... + if (IS_ERR(e) || ...) +-{ +( + return ...; +| + goto l; +) +-} + +@r depends on report@ +expression e; +identifier l; +position p1; +@@ + +*e = devm_request_and_ioremap@p1(...); + ... + if (e == NULL || ...) { + ... +( + return ...; +| + goto l; +) + } + +@script:python depends on r@ +p1 << r.p1; +@@ + +msg = "ERROR: deprecated devm_request_and_ioremap() API used on line %s" % (p1[0].line) +coccilib.report.print_report(p1[0], msg) diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig index 5da8ca7a..f2a96f28 100644 --- a/sound/soc/Kconfig +++ b/sound/soc/Kconfig @@ -50,6 +50,7 @@ source "sound/soc/sh/Kconfig" source "sound/soc/tegra/Kconfig" source "sound/soc/txx9/Kconfig" source "sound/soc/ux500/Kconfig" +source "sound/soc/berlin/Kconfig" # Supported codecs source "sound/soc/codecs/Kconfig" diff --git a/sound/soc/Makefile b/sound/soc/Makefile index 99f32f7c..fd28df44 100644 --- a/sound/soc/Makefile +++ b/sound/soc/Makefile @@ -28,3 +28,4 @@ obj-$(CONFIG_SND_SOC) += sh/ obj-$(CONFIG_SND_SOC) += tegra/ obj-$(CONFIG_SND_SOC) += txx9/ obj-$(CONFIG_SND_SOC) += ux500/ +obj-$(CONFIG_SND_SOC) += berlin/ diff --git a/sound/soc/berlin/Kconfig b/sound/soc/berlin/Kconfig new file mode 100644 index 00000000..03d6326f --- /dev/null +++ b/sound/soc/berlin/Kconfig @@ -0,0 +1,5 @@ +config SND_SOC_BERLIN + tristate "SoC Audio for the BERLIN chip" + select SND_ARM + select SND_BERLIN_LIB + select SND_HWDEP diff --git a/sound/soc/berlin/Makefile b/sound/soc/berlin/Makefile new file mode 100644 index 00000000..b55c10aa --- /dev/null +++ b/sound/soc/berlin/Makefile @@ -0,0 +1,12 @@ +# Berlin Platform Support +snd-soc-berlin-pcm-objs := pcm.o +snd-soc-berlin-dhub-objs := avio_dhub_drv.o +snd-soc-berlin-aio-objs := aio.o +snd-soc-berlin-spdif-objs := spdif.o +snd-soc-berlin-avpll-objs := avpll.o + +obj-$(CONFIG_SND_SOC_BERLIN) += snd-soc-berlin-pcm.o +obj-$(CONFIG_SND_SOC_BERLIN) += snd-soc-berlin-dhub.o +obj-$(CONFIG_SND_SOC_BERLIN) += snd-soc-berlin-aio.o +obj-$(CONFIG_SND_SOC_BERLIN) += snd-soc-berlin-spdif.o +obj-$(CONFIG_SND_SOC_BERLIN) += snd-soc-berlin-avpll.o diff --git a/sound/soc/berlin/aio.c b/sound/soc/berlin/aio.c new file mode 100644 index 00000000..ec347174 --- /dev/null +++ b/sound/soc/berlin/aio.c @@ -0,0 +1,135 @@ +/*********************************************************************************** +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +*************************************************************************************/ +#include "ctypes.h" +#include "berlin_memmap.h" +#include "api_aio.h" + +#define GA_REG_WORD32_READ(addr, holder) (*(holder) = (*((volatile unsigned int *)(addr)))) +#define GA_REG_WORD32_WRITE(addr, data) ((*((volatile unsigned int *)(addr))) = ((unsigned int)(data))) +#define bSETMASK(b) ((b) < 32 ? (1 << (b)) : 0) +#define CutTo(x, b) ((x) & (bSETMASK(b) - 1)) + +void AIO_SetAudChEn(UNSG32 id, UNSG32 tsd, UNSG32 enable) +{ + UNSG32 base, offset, address; + T32AUDCH_CTRL reg; + + base = MEMMAP_I2S_REG_BASE; + switch (id) { + case AIO_SEC: + offset = RA_AIO_SEC + RA_SEC_TSD; + break; + default: + offset = RA_AIO_SEC + RA_SEC_TSD; + break; + } + + address = base + offset + RA_AUDCH_CTRL; + GA_REG_WORD32_READ(address, &(reg.u32)); + reg.uCTRL_ENABLE = CutTo( enable, bAUDCH_CTRL_ENABLE); + GA_REG_WORD32_WRITE(address, (reg.u32)); +} + +void AIO_SetAudChMute(UNSG32 id, UNSG32 tsd, UNSG32 mute) +{ + UNSG32 base, offset, address; + T32AUDCH_CTRL reg; + + base = MEMMAP_I2S_REG_BASE; + switch (id) { + case AIO_SEC: + offset = RA_AIO_SEC + RA_SEC_TSD; + break; + default: + offset = RA_AIO_SEC + RA_SEC_TSD; + break; + } + + address = base + offset + RA_AUDCH_CTRL; + GA_REG_WORD32_READ(address, &(reg.u32)); + reg.uCTRL_MUTE = CutTo( mute, bAUDCH_CTRL_MUTE); + GA_REG_WORD32_WRITE(address, (reg.u32)); +} + +void AIO_SetClkDiv(UNSG32 id, UNSG32 div) +{ + UNSG32 base, offset, address; + T32PRIAUD_CLKDIV reg; + + base = MEMMAP_I2S_REG_BASE; + switch (id) { + case AIO_SEC: + offset = RA_AIO_SEC + RA_SEC_SECAUD; + break; + default: + offset = RA_AIO_SEC + RA_SEC_SECAUD; + break; + } + + address = base + offset + RA_PRIAUD_CLKDIV; + GA_REG_WORD32_READ(address, &(reg.u32)); + reg.uCLKDIV_SETTING = CutTo(div, bSPDIF_CLKDIV_SETTING); + GA_REG_WORD32_WRITE(address, (reg.u32)); +} + +void AIO_SetCtl(UNSG32 id, UNSG32 data_fmt, UNSG32 width_word, UNSG32 width_sample) +{ + UNSG32 base, offset, address; + T32PRIAUD_CTRL reg; + + base = MEMMAP_I2S_REG_BASE; + switch (id) { + case AIO_SEC: + offset = RA_AIO_SEC + RA_SEC_SECAUD; + break; + default: + offset = RA_AIO_SEC + RA_SEC_SECAUD; + break; + } + + address = base + offset + RA_PRIAUD_CTRL; + GA_REG_WORD32_READ(address, &(reg.u32)); + + // Set LEFTJFY + reg.uCTRL_LEFTJFY = CutTo((data_fmt>>4), bPRIAUD_CTRL_LEFTJFY); + + // Set INVCLK + reg.uCTRL_INVCLK = PRIAUD_CTRL_INVCLK_INVERTED; + + // set INVFS, I2S use Inverted mode(Low level means Left channel) + if (data_fmt == AIO_I2S_MODE) + reg.uCTRL_INVFS = PRIAUD_CTRL_INVFS_INVERTED; + else + reg.uCTRL_INVFS = PRIAUD_CTRL_INVFS_NORMAL; + + // TLSB, use default + + // set TDM, using width_sample + reg.uCTRL_TDM= CutTo(width_sample, bPRIAUD_CTRL_TDM); + + // set TCF using width_word; + reg.uCTRL_TCF= CutTo(width_word, bPRIAUD_CTRL_TCF); + + // set TFM, using data_fmt + reg.uCTRL_TFM = CutTo(data_fmt, bPRIAUD_CTRL_TFM); + + GA_REG_WORD32_WRITE(address, (reg.u32)); +} + diff --git a/sound/soc/berlin/aio.h b/sound/soc/berlin/aio.h new file mode 100644 index 00000000..1b04cb07 --- /dev/null +++ b/sound/soc/berlin/aio.h @@ -0,0 +1,2809 @@ +/*********************************************************************************** +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +*************************************************************************************/ + +////// +/// don't edit! auto-generated by docc: aio.h +//////////////////////////////////////////////////////////// +#ifndef aio_h +#define aio_h (){} + + +#include "ctypes.h" + +#pragma pack(1) +#ifdef __cplusplus + extern "C" { +#endif + +#ifndef _DOCC_H_BITOPS_ +#define _DOCC_H_BITOPS_ (){} + + #define _bSETMASK_(b) ((b)<32 ? (1<<((b)&31)) : 0) + #define _NSETMASK_(msb,lsb) (_bSETMASK_((msb)+1)-_bSETMASK_(lsb)) + #define _bCLRMASK_(b) (~_bSETMASK_(b)) + #define _NCLRMASK_(msb,lsb) (~_NSETMASK_(msb,lsb)) + #define _BFGET_(r,msb,lsb) (_NSETMASK_((msb)-(lsb),0)&((r)>>(lsb))) + #define _BFSET_(r,msb,lsb,v) do{ (r)&=_NCLRMASK_(msb,lsb); (r)|=_NSETMASK_(msb,lsb)&((v)<<(lsb)); }while(0) + +#endif + + + +////// +/// +/// $INTERFACE PRIAUD biu (4,4) +/// ### +/// * Audio Port configuration registers +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 CLKDIV (RW) +/// ### +/// * Audio Master Clock (MCLK) Divider register decides the ratio between MCLK and Audio Bit Clock (BCLK). +/// ### +/// %unsigned 3 SETTING 0x2 +/// ### +/// * MCLK Divider setting: +/// * 0 : Divide by 1 +/// * 1: Divide by 2 (default) +/// * 2: Divide by 4 +/// * 3 : Divide by 8 +/// * 4: Divide by 16 +/// * 5: Divide by 32 +/// * 6: Divide by 64 +/// * 7: Divide by 128 +/// ### +/// : DIV1 0x0 +/// : DIV2 0x1 +/// : DIV4 0x2 +/// : DIV8 0x3 +/// : DIV16 0x4 +/// : DIV32 0x5 +/// : DIV64 0x6 +/// : DIV128 0x7 +/// %% 29 # Stuffing bits... +/// @ 0x00004 CTRL (RW) +/// ### +/// * Register to Control the Output data format for a audio Port +/// ### +/// %unsigned 1 LEFTJFY 0x0 +/// ### +/// * Decides the Audio Justify mode: +/// * 0 : Left Justify (default). +/// * 1 : Right Justify. +/// ### +/// : LEFT 0x0 +/// : RIGHT 0x1 +/// %unsigned 1 INVCLK 0x0 +/// ### +/// * Invert Bit clock (BCLK): +/// * 0 - Normal, data is send/received with Rising edge of bit-Clock (default). +/// * Note: For TX: Use this setting if DAC is sampling data at negative edge of bit clock. +/// * Note: For RX: Use this setting if ADC is sending data at negative edge of bit clock. +/// * 1 - Inverted, data is send/received with Falling edge of bit-Clock. +/// * Note: For TX: Use this setting if DAC is sampling data at positive edge of bit clock. +/// * Note: For RX: Use this setting if ADC is sending data at positive edge of bit clock. +/// ### +/// : NORMAL 0x0 +/// : INVERTED 0x1 +/// %unsigned 1 INVFS 0x1 +/// ### +/// * Invert Frame Sync (LR Clock): +/// * 0: Normal, FSYNC is Low during reset and goes High when first channel (Left) data is transmitted and keeps toggling after that. +/// * 1: Inverted, FSYNC is High during reset and goes Low when first channel (Left) data is transmitted and keeps toggling after that. (default) +/// * Note: Not used for RX port (MIC). +/// ### +/// : NORMAL 0x0 +/// : INVERTED 0x1 +/// %unsigned 1 TLSB 0x0 +/// ### +/// * Decides which bit is transmitted/received first(left): +/// * 0: MSB first +/// * 1: LSB first +/// ### +/// : MSB_FIRST 0x0 +/// : LSB_FIRST 0x1 +/// %unsigned 3 TDM 0x0 +/// ### +/// * Decides the channel resolution (number of valid bits in a half period of FSYNC): +/// * 0: 16-bits per channel +/// * 1: 18-bits per channel +/// * 2: 20-bits per channel +/// * 3: 24-bits per channel +/// * 4: 32-bits per channel +/// * 5-7: Reserved +/// * Note: HD port only support 16-bits per channel +/// ### +/// : 16DFM 0x0 +/// : 18DFM 0x1 +/// : 20DFM 0x2 +/// : 24DFM 0x3 +/// : 32DFM 0x4 +/// %unsigned 2 TCF 0x2 +/// ### +/// * Decides the half period of FSYNC (sampling rate) in terms of number of bit-clocks: +/// * 0: FSYNC half period equals to 16 bit-clocks +/// * 1: FSYNC half period equals to 24 bit-clocks +/// * 2: FSYNC half period equals to 32 bit-clocks +/// * 3: Reserved +/// ### +/// : 16CFM 0x0 +/// : 24CFM 0x1 +/// : 32CFM 0x2 +/// %unsigned 2 TFM 0x2 +/// ### +/// * Decides the TX/RX data format: +/// * 1: Justified +/// * 2: I2S (default) +/// * 0 and 3: Reserved +/// ### +/// : JUSTIFIED 0x1 +/// : I2S 0x2 +/// %% 21 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 8B, bits: 14b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_PRIAUD +#define h_PRIAUD (){} + + #define RA_PRIAUD_CLKDIV 0x0000 + + #define BA_PRIAUD_CLKDIV_SETTING 0x0000 + #define B16PRIAUD_CLKDIV_SETTING 0x0000 + #define LSb32PRIAUD_CLKDIV_SETTING 0 + #define LSb16PRIAUD_CLKDIV_SETTING 0 + #define bPRIAUD_CLKDIV_SETTING 3 + #define MSK32PRIAUD_CLKDIV_SETTING 0x00000007 + #define PRIAUD_CLKDIV_SETTING_DIV1 0x0 + #define PRIAUD_CLKDIV_SETTING_DIV2 0x1 + #define PRIAUD_CLKDIV_SETTING_DIV4 0x2 + #define PRIAUD_CLKDIV_SETTING_DIV8 0x3 + #define PRIAUD_CLKDIV_SETTING_DIV16 0x4 + #define PRIAUD_CLKDIV_SETTING_DIV32 0x5 + #define PRIAUD_CLKDIV_SETTING_DIV64 0x6 + #define PRIAUD_CLKDIV_SETTING_DIV128 0x7 + /////////////////////////////////////////////////////////// + #define RA_PRIAUD_CTRL 0x0004 + + #define BA_PRIAUD_CTRL_LEFTJFY 0x0004 + #define B16PRIAUD_CTRL_LEFTJFY 0x0004 + #define LSb32PRIAUD_CTRL_LEFTJFY 0 + #define LSb16PRIAUD_CTRL_LEFTJFY 0 + #define bPRIAUD_CTRL_LEFTJFY 1 + #define MSK32PRIAUD_CTRL_LEFTJFY 0x00000001 + #define PRIAUD_CTRL_LEFTJFY_LEFT 0x0 + #define PRIAUD_CTRL_LEFTJFY_RIGHT 0x1 + + #define BA_PRIAUD_CTRL_INVCLK 0x0004 + #define B16PRIAUD_CTRL_INVCLK 0x0004 + #define LSb32PRIAUD_CTRL_INVCLK 1 + #define LSb16PRIAUD_CTRL_INVCLK 1 + #define bPRIAUD_CTRL_INVCLK 1 + #define MSK32PRIAUD_CTRL_INVCLK 0x00000002 + #define PRIAUD_CTRL_INVCLK_NORMAL 0x0 + #define PRIAUD_CTRL_INVCLK_INVERTED 0x1 + + #define BA_PRIAUD_CTRL_INVFS 0x0004 + #define B16PRIAUD_CTRL_INVFS 0x0004 + #define LSb32PRIAUD_CTRL_INVFS 2 + #define LSb16PRIAUD_CTRL_INVFS 2 + #define bPRIAUD_CTRL_INVFS 1 + #define MSK32PRIAUD_CTRL_INVFS 0x00000004 + #define PRIAUD_CTRL_INVFS_NORMAL 0x0 + #define PRIAUD_CTRL_INVFS_INVERTED 0x1 + + #define BA_PRIAUD_CTRL_TLSB 0x0004 + #define B16PRIAUD_CTRL_TLSB 0x0004 + #define LSb32PRIAUD_CTRL_TLSB 3 + #define LSb16PRIAUD_CTRL_TLSB 3 + #define bPRIAUD_CTRL_TLSB 1 + #define MSK32PRIAUD_CTRL_TLSB 0x00000008 + #define PRIAUD_CTRL_TLSB_MSB_FIRST 0x0 + #define PRIAUD_CTRL_TLSB_LSB_FIRST 0x1 + + #define BA_PRIAUD_CTRL_TDM 0x0004 + #define B16PRIAUD_CTRL_TDM 0x0004 + #define LSb32PRIAUD_CTRL_TDM 4 + #define LSb16PRIAUD_CTRL_TDM 4 + #define bPRIAUD_CTRL_TDM 3 + #define MSK32PRIAUD_CTRL_TDM 0x00000070 + #define PRIAUD_CTRL_TDM_16DFM 0x0 + #define PRIAUD_CTRL_TDM_18DFM 0x1 + #define PRIAUD_CTRL_TDM_20DFM 0x2 + #define PRIAUD_CTRL_TDM_24DFM 0x3 + #define PRIAUD_CTRL_TDM_32DFM 0x4 + + #define BA_PRIAUD_CTRL_TCF 0x0004 + #define B16PRIAUD_CTRL_TCF 0x0004 + #define LSb32PRIAUD_CTRL_TCF 7 + #define LSb16PRIAUD_CTRL_TCF 7 + #define bPRIAUD_CTRL_TCF 2 + #define MSK32PRIAUD_CTRL_TCF 0x00000180 + #define PRIAUD_CTRL_TCF_16CFM 0x0 + #define PRIAUD_CTRL_TCF_24CFM 0x1 + #define PRIAUD_CTRL_TCF_32CFM 0x2 + + #define BA_PRIAUD_CTRL_TFM 0x0005 + #define B16PRIAUD_CTRL_TFM 0x0004 + #define LSb32PRIAUD_CTRL_TFM 9 + #define LSb16PRIAUD_CTRL_TFM 9 + #define bPRIAUD_CTRL_TFM 2 + #define MSK32PRIAUD_CTRL_TFM 0x00000600 + #define PRIAUD_CTRL_TFM_JUSTIFIED 0x1 + #define PRIAUD_CTRL_TFM_I2S 0x2 + /////////////////////////////////////////////////////////// + + typedef struct SIE_PRIAUD { + /////////////////////////////////////////////////////////// + #define GET32PRIAUD_CLKDIV_SETTING(r32) _BFGET_(r32, 2, 0) + #define SET32PRIAUD_CLKDIV_SETTING(r32,v) _BFSET_(r32, 2, 0,v) + #define GET16PRIAUD_CLKDIV_SETTING(r16) _BFGET_(r16, 2, 0) + #define SET16PRIAUD_CLKDIV_SETTING(r16,v) _BFSET_(r16, 2, 0,v) + + #define w32PRIAUD_CLKDIV {\ + UNSG32 uCLKDIV_SETTING : 3;\ + UNSG32 RSVDx0_b3 : 29;\ + } + union { UNSG32 u32PRIAUD_CLKDIV; + struct w32PRIAUD_CLKDIV; + }; + /////////////////////////////////////////////////////////// + #define GET32PRIAUD_CTRL_LEFTJFY(r32) _BFGET_(r32, 0, 0) + #define SET32PRIAUD_CTRL_LEFTJFY(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16PRIAUD_CTRL_LEFTJFY(r16) _BFGET_(r16, 0, 0) + #define SET16PRIAUD_CTRL_LEFTJFY(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32PRIAUD_CTRL_INVCLK(r32) _BFGET_(r32, 1, 1) + #define SET32PRIAUD_CTRL_INVCLK(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16PRIAUD_CTRL_INVCLK(r16) _BFGET_(r16, 1, 1) + #define SET16PRIAUD_CTRL_INVCLK(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32PRIAUD_CTRL_INVFS(r32) _BFGET_(r32, 2, 2) + #define SET32PRIAUD_CTRL_INVFS(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16PRIAUD_CTRL_INVFS(r16) _BFGET_(r16, 2, 2) + #define SET16PRIAUD_CTRL_INVFS(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32PRIAUD_CTRL_TLSB(r32) _BFGET_(r32, 3, 3) + #define SET32PRIAUD_CTRL_TLSB(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16PRIAUD_CTRL_TLSB(r16) _BFGET_(r16, 3, 3) + #define SET16PRIAUD_CTRL_TLSB(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32PRIAUD_CTRL_TDM(r32) _BFGET_(r32, 6, 4) + #define SET32PRIAUD_CTRL_TDM(r32,v) _BFSET_(r32, 6, 4,v) + #define GET16PRIAUD_CTRL_TDM(r16) _BFGET_(r16, 6, 4) + #define SET16PRIAUD_CTRL_TDM(r16,v) _BFSET_(r16, 6, 4,v) + + #define GET32PRIAUD_CTRL_TCF(r32) _BFGET_(r32, 8, 7) + #define SET32PRIAUD_CTRL_TCF(r32,v) _BFSET_(r32, 8, 7,v) + #define GET16PRIAUD_CTRL_TCF(r16) _BFGET_(r16, 8, 7) + #define SET16PRIAUD_CTRL_TCF(r16,v) _BFSET_(r16, 8, 7,v) + + #define GET32PRIAUD_CTRL_TFM(r32) _BFGET_(r32,10, 9) + #define SET32PRIAUD_CTRL_TFM(r32,v) _BFSET_(r32,10, 9,v) + #define GET16PRIAUD_CTRL_TFM(r16) _BFGET_(r16,10, 9) + #define SET16PRIAUD_CTRL_TFM(r16,v) _BFSET_(r16,10, 9,v) + + #define w32PRIAUD_CTRL {\ + UNSG32 uCTRL_LEFTJFY : 1;\ + UNSG32 uCTRL_INVCLK : 1;\ + UNSG32 uCTRL_INVFS : 1;\ + UNSG32 uCTRL_TLSB : 1;\ + UNSG32 uCTRL_TDM : 3;\ + UNSG32 uCTRL_TCF : 2;\ + UNSG32 uCTRL_TFM : 2;\ + UNSG32 RSVDx4_b11 : 21;\ + } + union { UNSG32 u32PRIAUD_CTRL; + struct w32PRIAUD_CTRL; + }; + /////////////////////////////////////////////////////////// + } SIE_PRIAUD; + + typedef union T32PRIAUD_CLKDIV + { UNSG32 u32; + struct w32PRIAUD_CLKDIV; + } T32PRIAUD_CLKDIV; + typedef union T32PRIAUD_CTRL + { UNSG32 u32; + struct w32PRIAUD_CTRL; + } T32PRIAUD_CTRL; + /////////////////////////////////////////////////////////// + + typedef union TPRIAUD_CLKDIV + { UNSG32 u32[1]; + struct { + struct w32PRIAUD_CLKDIV; + }; + } TPRIAUD_CLKDIV; + typedef union TPRIAUD_CTRL + { UNSG32 u32[1]; + struct { + struct w32PRIAUD_CTRL; + }; + } TPRIAUD_CTRL; + + /////////////////////////////////////////////////////////// + SIGN32 PRIAUD_drvrd(SIE_PRIAUD *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 PRIAUD_drvwr(SIE_PRIAUD *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void PRIAUD_reset(SIE_PRIAUD *p); + SIGN32 PRIAUD_cmp (SIE_PRIAUD *p, SIE_PRIAUD *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define PRIAUD_check(p,pie,pfx,hLOG) PRIAUD_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define PRIAUD_print(p, pfx,hLOG) PRIAUD_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: PRIAUD +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE AUDCH biu (4,4) +/// ### +/// * Audio Port Control registers +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 CTRL (RW) +/// ### +/// * Audio Port Control register +/// ### +/// %unsigned 1 ENABLE 0x0 +/// ### +/// * Control bit to enable/disable an audio channel: +/// * 0: Disable a audio Channel (default) +/// * 1: Enable a audio Channel +/// * Note: Bit-clock (BCLK) is not controlled using this bit. For switching off the Bit Clock the output enable register should be used(IOSEL). +/// ### +/// : DISABLE 0x0 +/// : ENABLE 0x1 +/// %unsigned 1 MUTE 0x0 +/// ### +/// * Control bit to turn mute function ON or OFF +/// * 0: Mute turned OFF (default) +/// * 1: Mute turned ON +/// ### +/// : MUTE_OFF 0x0 +/// : MUTE_ON 0x1 +/// %unsigned 1 LRSWITCH 0x0 +/// ### +/// * Control bit for switching the left channel data with right channel data: +/// * 0: Do not switch data (default) +/// * 1: Switch Data +/// * Note: Not supported for S/PDIF. +/// ### +/// : SWITCH_OFF 0x0 +/// : SWITCH_ON 0x1 +/// %unsigned 1 DEBUGEN 0x0 +/// ### +/// * Control bit to enable/disable Debug mode: +/// * 0: Disable (default) +/// * 1: Enable +/// * Note: In debug mode transmit data is from debug registers. +/// * *INTERNAL_ONLY** +/// ### +/// : DISABLE 0x0 +/// : ENABLE 0x1 +/// %unsigned 1 FLUSH 0x0 +/// ### +/// * Control bit to clear the Data FIFO pointers related to a port: +/// * 0: Do not flush (default) +/// * 1: Flush +/// ### +/// : ON 0x1 +/// : OFF 0x0 +/// %% 27 # Stuffing bits... +/// @ 0x00004 DEBUGHI (RW) +/// ### +/// * Upper 32-bit Debug data +/// ### +/// %unsigned 32 DATAHI 0x4884103F +/// ### +/// * Upper 32-bit Debug data +/// * *INTERNAL_ONLY** +/// ### +/// @ 0x00008 DEBUGLO (RW) +/// ### +/// * Lower 32-bit Debug data +/// ### +/// %unsigned 32 DATALO 0xB77BEFC0 +/// ### +/// * Lower 32-bit Debug data +/// * *INTERNAL_ONLY** +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 12B, bits: 69b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_AUDCH +#define h_AUDCH (){} + + #define RA_AUDCH_CTRL 0x0000 + + #define BA_AUDCH_CTRL_ENABLE 0x0000 + #define B16AUDCH_CTRL_ENABLE 0x0000 + #define LSb32AUDCH_CTRL_ENABLE 0 + #define LSb16AUDCH_CTRL_ENABLE 0 + #define bAUDCH_CTRL_ENABLE 1 + #define MSK32AUDCH_CTRL_ENABLE 0x00000001 + #define AUDCH_CTRL_ENABLE_DISABLE 0x0 + #define AUDCH_CTRL_ENABLE_ENABLE 0x1 + + #define BA_AUDCH_CTRL_MUTE 0x0000 + #define B16AUDCH_CTRL_MUTE 0x0000 + #define LSb32AUDCH_CTRL_MUTE 1 + #define LSb16AUDCH_CTRL_MUTE 1 + #define bAUDCH_CTRL_MUTE 1 + #define MSK32AUDCH_CTRL_MUTE 0x00000002 + #define AUDCH_CTRL_MUTE_MUTE_OFF 0x0 + #define AUDCH_CTRL_MUTE_MUTE_ON 0x1 + + #define BA_AUDCH_CTRL_LRSWITCH 0x0000 + #define B16AUDCH_CTRL_LRSWITCH 0x0000 + #define LSb32AUDCH_CTRL_LRSWITCH 2 + #define LSb16AUDCH_CTRL_LRSWITCH 2 + #define bAUDCH_CTRL_LRSWITCH 1 + #define MSK32AUDCH_CTRL_LRSWITCH 0x00000004 + #define AUDCH_CTRL_LRSWITCH_SWITCH_OFF 0x0 + #define AUDCH_CTRL_LRSWITCH_SWITCH_ON 0x1 + + #define BA_AUDCH_CTRL_DEBUGEN 0x0000 + #define B16AUDCH_CTRL_DEBUGEN 0x0000 + #define LSb32AUDCH_CTRL_DEBUGEN 3 + #define LSb16AUDCH_CTRL_DEBUGEN 3 + #define bAUDCH_CTRL_DEBUGEN 1 + #define MSK32AUDCH_CTRL_DEBUGEN 0x00000008 + #define AUDCH_CTRL_DEBUGEN_DISABLE 0x0 + #define AUDCH_CTRL_DEBUGEN_ENABLE 0x1 + + #define BA_AUDCH_CTRL_FLUSH 0x0000 + #define B16AUDCH_CTRL_FLUSH 0x0000 + #define LSb32AUDCH_CTRL_FLUSH 4 + #define LSb16AUDCH_CTRL_FLUSH 4 + #define bAUDCH_CTRL_FLUSH 1 + #define MSK32AUDCH_CTRL_FLUSH 0x00000010 + #define AUDCH_CTRL_FLUSH_ON 0x1 + #define AUDCH_CTRL_FLUSH_OFF 0x0 + /////////////////////////////////////////////////////////// + #define RA_AUDCH_DEBUGHI 0x0004 + + #define BA_AUDCH_DEBUGHI_DATAHI 0x0004 + #define B16AUDCH_DEBUGHI_DATAHI 0x0004 + #define LSb32AUDCH_DEBUGHI_DATAHI 0 + #define LSb16AUDCH_DEBUGHI_DATAHI 0 + #define bAUDCH_DEBUGHI_DATAHI 32 + #define MSK32AUDCH_DEBUGHI_DATAHI 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_AUDCH_DEBUGLO 0x0008 + + #define BA_AUDCH_DEBUGLO_DATALO 0x0008 + #define B16AUDCH_DEBUGLO_DATALO 0x0008 + #define LSb32AUDCH_DEBUGLO_DATALO 0 + #define LSb16AUDCH_DEBUGLO_DATALO 0 + #define bAUDCH_DEBUGLO_DATALO 32 + #define MSK32AUDCH_DEBUGLO_DATALO 0xFFFFFFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_AUDCH { + /////////////////////////////////////////////////////////// + #define GET32AUDCH_CTRL_ENABLE(r32) _BFGET_(r32, 0, 0) + #define SET32AUDCH_CTRL_ENABLE(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16AUDCH_CTRL_ENABLE(r16) _BFGET_(r16, 0, 0) + #define SET16AUDCH_CTRL_ENABLE(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AUDCH_CTRL_MUTE(r32) _BFGET_(r32, 1, 1) + #define SET32AUDCH_CTRL_MUTE(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16AUDCH_CTRL_MUTE(r16) _BFGET_(r16, 1, 1) + #define SET16AUDCH_CTRL_MUTE(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AUDCH_CTRL_LRSWITCH(r32) _BFGET_(r32, 2, 2) + #define SET32AUDCH_CTRL_LRSWITCH(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16AUDCH_CTRL_LRSWITCH(r16) _BFGET_(r16, 2, 2) + #define SET16AUDCH_CTRL_LRSWITCH(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32AUDCH_CTRL_DEBUGEN(r32) _BFGET_(r32, 3, 3) + #define SET32AUDCH_CTRL_DEBUGEN(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16AUDCH_CTRL_DEBUGEN(r16) _BFGET_(r16, 3, 3) + #define SET16AUDCH_CTRL_DEBUGEN(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32AUDCH_CTRL_FLUSH(r32) _BFGET_(r32, 4, 4) + #define SET32AUDCH_CTRL_FLUSH(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16AUDCH_CTRL_FLUSH(r16) _BFGET_(r16, 4, 4) + #define SET16AUDCH_CTRL_FLUSH(r16,v) _BFSET_(r16, 4, 4,v) + + #define w32AUDCH_CTRL {\ + UNSG32 uCTRL_ENABLE : 1;\ + UNSG32 uCTRL_MUTE : 1;\ + UNSG32 uCTRL_LRSWITCH : 1;\ + UNSG32 uCTRL_DEBUGEN : 1;\ + UNSG32 uCTRL_FLUSH : 1;\ + UNSG32 RSVDx0_b5 : 27;\ + } + union { UNSG32 u32AUDCH_CTRL; + struct w32AUDCH_CTRL; + }; + /////////////////////////////////////////////////////////// + #define GET32AUDCH_DEBUGHI_DATAHI(r32) _BFGET_(r32,31, 0) + #define SET32AUDCH_DEBUGHI_DATAHI(r32,v) _BFSET_(r32,31, 0,v) + + #define w32AUDCH_DEBUGHI {\ + UNSG32 uDEBUGHI_DATAHI : 32;\ + } + union { UNSG32 u32AUDCH_DEBUGHI; + struct w32AUDCH_DEBUGHI; + }; + /////////////////////////////////////////////////////////// + #define GET32AUDCH_DEBUGLO_DATALO(r32) _BFGET_(r32,31, 0) + #define SET32AUDCH_DEBUGLO_DATALO(r32,v) _BFSET_(r32,31, 0,v) + + #define w32AUDCH_DEBUGLO {\ + UNSG32 uDEBUGLO_DATALO : 32;\ + } + union { UNSG32 u32AUDCH_DEBUGLO; + struct w32AUDCH_DEBUGLO; + }; + /////////////////////////////////////////////////////////// + } SIE_AUDCH; + + typedef union T32AUDCH_CTRL + { UNSG32 u32; + struct w32AUDCH_CTRL; + } T32AUDCH_CTRL; + typedef union T32AUDCH_DEBUGHI + { UNSG32 u32; + struct w32AUDCH_DEBUGHI; + } T32AUDCH_DEBUGHI; + typedef union T32AUDCH_DEBUGLO + { UNSG32 u32; + struct w32AUDCH_DEBUGLO; + } T32AUDCH_DEBUGLO; + /////////////////////////////////////////////////////////// + + typedef union TAUDCH_CTRL + { UNSG32 u32[1]; + struct { + struct w32AUDCH_CTRL; + }; + } TAUDCH_CTRL; + typedef union TAUDCH_DEBUGHI + { UNSG32 u32[1]; + struct { + struct w32AUDCH_DEBUGHI; + }; + } TAUDCH_DEBUGHI; + typedef union TAUDCH_DEBUGLO + { UNSG32 u32[1]; + struct { + struct w32AUDCH_DEBUGLO; + }; + } TAUDCH_DEBUGLO; + + /////////////////////////////////////////////////////////// + SIGN32 AUDCH_drvrd(SIE_AUDCH *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 AUDCH_drvwr(SIE_AUDCH *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void AUDCH_reset(SIE_AUDCH *p); + SIGN32 AUDCH_cmp (SIE_AUDCH *p, SIE_AUDCH *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define AUDCH_check(p,pie,pfx,hLOG) AUDCH_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define AUDCH_print(p, pfx,hLOG) AUDCH_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: AUDCH +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SPDIF biu (4,4) +/// ### +/// * S/PDIF Control registers +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 CLKDIV (RW) +/// ### +/// * S/PDIF transmitter bit clock selection register to decide the output sampling rate +/// ### +/// %unsigned 3 SETTING 0x2 +/// ### +/// * MCLK Divider setting: +/// * 0 : Divide by 1 +/// * 1: Divide by 2 +/// * 2: Divide by 4 ( default) +/// * 3 : Divide by 8 +/// * 4: Divide by 16 +/// * 5: Divide by 32 +/// * 6: Divide by 64 +/// * 7: Divide by 128 +/// ### +/// : DIV1 0x0 +/// : DIV2 0x1 +/// : DIV4 0x2 +/// : DIV8 0x3 +/// : DIV16 0x4 +/// : DIV32 0x5 +/// : DIV64 0x6 +/// : DIV128 0x7 +/// %% 29 # Stuffing bits... +/// @ 0x00004 (P) +/// # 0x00004 SPDIF +/// $AUDCH SPDIF REG +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 72b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SPDIF +#define h_SPDIF (){} + + #define RA_SPDIF_CLKDIV 0x0000 + + #define BA_SPDIF_CLKDIV_SETTING 0x0000 + #define B16SPDIF_CLKDIV_SETTING 0x0000 + #define LSb32SPDIF_CLKDIV_SETTING 0 + #define LSb16SPDIF_CLKDIV_SETTING 0 + #define bSPDIF_CLKDIV_SETTING 3 + #define MSK32SPDIF_CLKDIV_SETTING 0x00000007 + #define SPDIF_CLKDIV_SETTING_DIV1 0x0 + #define SPDIF_CLKDIV_SETTING_DIV2 0x1 + #define SPDIF_CLKDIV_SETTING_DIV4 0x2 + #define SPDIF_CLKDIV_SETTING_DIV8 0x3 + #define SPDIF_CLKDIV_SETTING_DIV16 0x4 + #define SPDIF_CLKDIV_SETTING_DIV32 0x5 + #define SPDIF_CLKDIV_SETTING_DIV64 0x6 + #define SPDIF_CLKDIV_SETTING_DIV128 0x7 + /////////////////////////////////////////////////////////// + #define RA_SPDIF_SPDIF 0x0004 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SPDIF { + /////////////////////////////////////////////////////////// + #define GET32SPDIF_CLKDIV_SETTING(r32) _BFGET_(r32, 2, 0) + #define SET32SPDIF_CLKDIV_SETTING(r32,v) _BFSET_(r32, 2, 0,v) + #define GET16SPDIF_CLKDIV_SETTING(r16) _BFGET_(r16, 2, 0) + #define SET16SPDIF_CLKDIV_SETTING(r16,v) _BFSET_(r16, 2, 0,v) + + #define w32SPDIF_CLKDIV {\ + UNSG32 uCLKDIV_SETTING : 3;\ + UNSG32 RSVDx0_b3 : 29;\ + } + union { UNSG32 u32SPDIF_CLKDIV; + struct w32SPDIF_CLKDIV; + }; + /////////////////////////////////////////////////////////// + SIE_AUDCH ie_SPDIF; + /////////////////////////////////////////////////////////// + } SIE_SPDIF; + + typedef union T32SPDIF_CLKDIV + { UNSG32 u32; + struct w32SPDIF_CLKDIV; + } T32SPDIF_CLKDIV; + /////////////////////////////////////////////////////////// + + typedef union TSPDIF_CLKDIV + { UNSG32 u32[1]; + struct { + struct w32SPDIF_CLKDIV; + }; + } TSPDIF_CLKDIV; + + /////////////////////////////////////////////////////////// + SIGN32 SPDIF_drvrd(SIE_SPDIF *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SPDIF_drvwr(SIE_SPDIF *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SPDIF_reset(SIE_SPDIF *p); + SIGN32 SPDIF_cmp (SIE_SPDIF *p, SIE_SPDIF *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SPDIF_check(p,pie,pfx,hLOG) SPDIF_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SPDIF_print(p, pfx,hLOG) SPDIF_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SPDIF +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE P71 (4,4) +/// ### +/// * Audio 7.1 Primary port Control registers +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 PRIAUD +/// $PRIAUD PRIAUD REG +/// ### +/// * Primary Port Channel 0 control register +/// ### +/// @ 0x00008 (P) +/// # 0x00008 TSD0 +/// $AUDCH TSD0 REG +/// ### +/// * Primary Port Channel 1 control register +/// ### +/// @ 0x00014 (P) +/// # 0x00014 TSD1 +/// $AUDCH TSD1 REG +/// ### +/// * Primary Port Channel 2 control register +/// ### +/// @ 0x00020 (P) +/// # 0x00020 TSD2 +/// $AUDCH TSD2 REG +/// ### +/// * Primary Port Channel 3 control register +/// ### +/// @ 0x0002C (P) +/// # 0x0002C TSD3 +/// $AUDCH TSD3 REG +/// @ 0x00038 PRIPORT (RW) +/// %unsigned 1 ENABLE 0x0 +/// ### +/// * Register bit to enable or disable the whole Primary Audio port: +/// * 0: Disabled (default) +/// * 1: Enabled +/// * Note: User can selects the desired number of audio channels within the primary port by setting the corresponding enable bits for Channel 0/1/2/3 +/// ### +/// : DISABLE 0x0 +/// : ENABLE 0x1 +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 60B, bits: 291b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_P71 +#define h_P71 (){} + + #define RA_P71_PRIAUD 0x0000 + /////////////////////////////////////////////////////////// + #define RA_P71_TSD0 0x0008 + /////////////////////////////////////////////////////////// + #define RA_P71_TSD1 0x0014 + /////////////////////////////////////////////////////////// + #define RA_P71_TSD2 0x0020 + /////////////////////////////////////////////////////////// + #define RA_P71_TSD3 0x002C + /////////////////////////////////////////////////////////// + #define RA_P71_PRIPORT 0x0038 + + #define BA_P71_PRIPORT_ENABLE 0x0038 + #define B16P71_PRIPORT_ENABLE 0x0038 + #define LSb32P71_PRIPORT_ENABLE 0 + #define LSb16P71_PRIPORT_ENABLE 0 + #define bP71_PRIPORT_ENABLE 1 + #define MSK32P71_PRIPORT_ENABLE 0x00000001 + #define P71_PRIPORT_ENABLE_DISABLE 0x0 + #define P71_PRIPORT_ENABLE_ENABLE 0x1 + /////////////////////////////////////////////////////////// + + typedef struct SIE_P71 { + /////////////////////////////////////////////////////////// + SIE_PRIAUD ie_PRIAUD; + /////////////////////////////////////////////////////////// + SIE_AUDCH ie_TSD0; + /////////////////////////////////////////////////////////// + SIE_AUDCH ie_TSD1; + /////////////////////////////////////////////////////////// + SIE_AUDCH ie_TSD2; + /////////////////////////////////////////////////////////// + SIE_AUDCH ie_TSD3; + /////////////////////////////////////////////////////////// + #define GET32P71_PRIPORT_ENABLE(r32) _BFGET_(r32, 0, 0) + #define SET32P71_PRIPORT_ENABLE(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16P71_PRIPORT_ENABLE(r16) _BFGET_(r16, 0, 0) + #define SET16P71_PRIPORT_ENABLE(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32P71_PRIPORT {\ + UNSG32 uPRIPORT_ENABLE : 1;\ + UNSG32 RSVDx38_b1 : 31;\ + } + union { UNSG32 u32P71_PRIPORT; + struct w32P71_PRIPORT; + }; + /////////////////////////////////////////////////////////// + } SIE_P71; + + typedef union T32P71_PRIPORT + { UNSG32 u32; + struct w32P71_PRIPORT; + } T32P71_PRIPORT; + /////////////////////////////////////////////////////////// + + typedef union TP71_PRIPORT + { UNSG32 u32[1]; + struct { + struct w32P71_PRIPORT; + }; + } TP71_PRIPORT; + + /////////////////////////////////////////////////////////// + SIGN32 P71_drvrd(SIE_P71 *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 P71_drvwr(SIE_P71 *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void P71_reset(SIE_P71 *p); + SIGN32 P71_cmp (SIE_P71 *p, SIE_P71 *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define P71_check(p,pie,pfx,hLOG) P71_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define P71_print(p, pfx,hLOG) P71_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: P71 +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SEC (4,4) +/// ### +/// * Audio Secondary port Control registers +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 SECAUD +/// $PRIAUD SECAUD REG +/// @ 0x00008 (P) +/// # 0x00008 TSD +/// $AUDCH TSD REG +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 20B, bits: 83b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SEC +#define h_SEC (){} + + #define RA_SEC_SECAUD 0x0000 + /////////////////////////////////////////////////////////// + #define RA_SEC_TSD 0x0008 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SEC { + /////////////////////////////////////////////////////////// + SIE_PRIAUD ie_SECAUD; + /////////////////////////////////////////////////////////// + SIE_AUDCH ie_TSD; + /////////////////////////////////////////////////////////// + } SIE_SEC; + + /////////////////////////////////////////////////////////// + SIGN32 SEC_drvrd(SIE_SEC *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SEC_drvwr(SIE_SEC *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SEC_reset(SIE_SEC *p); + SIGN32 SEC_cmp (SIE_SEC *p, SIE_SEC *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SEC_check(p,pie,pfx,hLOG) SEC_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SEC_print(p, pfx,hLOG) SEC_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SEC +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE HDMI (4,4) +/// ### +/// * HDMI port control register +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 HDAUD +/// $PRIAUD HDAUD REG +/// @ 0x00008 (P) +/// # 0x00008 HDTSD +/// $AUDCH HDTSD REG +/// @ 0x00014 HDPORT (RW) +/// ### +/// * High Bit Rate (HD) audio port Control register +/// ### +/// %unsigned 1 TXSEL 0x0 +/// ### +/// * Register used to select the transmitter for HDMI audio. +/// * 0 : HD channel +/// * 1: p71 channel (primary audio) +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 24B, bits: 84b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_HDMI +#define h_HDMI (){} + + #define RA_HDMI_HDAUD 0x0000 + /////////////////////////////////////////////////////////// + #define RA_HDMI_HDTSD 0x0008 + /////////////////////////////////////////////////////////// + #define RA_HDMI_HDPORT 0x0014 + + #define BA_HDMI_HDPORT_TXSEL 0x0014 + #define B16HDMI_HDPORT_TXSEL 0x0014 + #define LSb32HDMI_HDPORT_TXSEL 0 + #define LSb16HDMI_HDPORT_TXSEL 0 + #define bHDMI_HDPORT_TXSEL 1 + #define MSK32HDMI_HDPORT_TXSEL 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_HDMI { + /////////////////////////////////////////////////////////// + SIE_PRIAUD ie_HDAUD; + /////////////////////////////////////////////////////////// + SIE_AUDCH ie_HDTSD; + /////////////////////////////////////////////////////////// + #define GET32HDMI_HDPORT_TXSEL(r32) _BFGET_(r32, 0, 0) + #define SET32HDMI_HDPORT_TXSEL(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16HDMI_HDPORT_TXSEL(r16) _BFGET_(r16, 0, 0) + #define SET16HDMI_HDPORT_TXSEL(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32HDMI_HDPORT {\ + UNSG32 uHDPORT_TXSEL : 1;\ + UNSG32 RSVDx14_b1 : 31;\ + } + union { UNSG32 u32HDMI_HDPORT; + struct w32HDMI_HDPORT; + }; + /////////////////////////////////////////////////////////// + } SIE_HDMI; + + typedef union T32HDMI_HDPORT + { UNSG32 u32; + struct w32HDMI_HDPORT; + } T32HDMI_HDPORT; + /////////////////////////////////////////////////////////// + + typedef union THDMI_HDPORT + { UNSG32 u32[1]; + struct { + struct w32HDMI_HDPORT; + }; + } THDMI_HDPORT; + + /////////////////////////////////////////////////////////// + SIGN32 HDMI_drvrd(SIE_HDMI *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 HDMI_drvwr(SIE_HDMI *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void HDMI_reset(SIE_HDMI *p); + SIGN32 HDMI_cmp (SIE_HDMI *p, SIE_HDMI *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define HDMI_check(p,pie,pfx,hLOG) HDMI_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define HDMI_print(p, pfx,hLOG) HDMI_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: HDMI +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE MIC (4,4) +/// ### +/// * RX Port registers +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 MICCTRL +/// $PRIAUD MICCTRL REG +/// ### +/// * RX Port Channel 0 control register +/// ### +/// @ 0x00008 (P) +/// # 0x00008 RSD0 +/// $AUDCH RSD0 REG +/// ### +/// * RX Port Channel 1 control register +/// ### +/// @ 0x00014 (P) +/// # 0x00014 RSD1 +/// $AUDCH RSD1 REG +/// ### +/// * RX Port Channel 2 control register +/// ### +/// @ 0x00020 (P) +/// # 0x00020 RSD2 +/// $AUDCH RSD2 REG +/// ### +/// * RX Port Channel 3 control register +/// ### +/// @ 0x0002C (P) +/// # 0x0002C RSD3 +/// $AUDCH RSD3 REG +/// @ 0x00038 RXPORT (RW) +/// %unsigned 1 ENABLE 0x0 +/// ### +/// * Register bit to enable or disable the whole RX Audio port: +/// * 0: Disabled (default) +/// * 1: Enabled +/// * Note: User can selects the desired number of audio channels within the RX port by setting the +/// * corresponding enable bits for channel 0/1/2/3 +/// ### +/// : DISABLE 0x0 +/// : ENABLE 0x1 +/// %% 31 # Stuffing bits... +/// @ 0x0003C RXDATA (RW) +/// %unsigned 1 HBR 0x0 +/// ### +/// * Register bit to indicate whether incoming data is 8-channel HBR or LPCM (or 2-channel HBR) +/// * 1 : HBR data (8-channel HBR) +/// * 0 : LPCM data +/// * Note: This bit should not be set to “1†in case of 2-channel HBR. As there is no difference in behavior of this module between 2-channel HBR or 2-channel LPCM data. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00040 HBRDMAP (RW) +/// ### +/// * HBR DATA MAP Register. +/// * In 8-channel HBR data mode. 128-bits of data is received by SoC. These registers bits allows the users to map the 32 bits received on each port to the desired place in 128-bits. +/// ### +/// %unsigned 2 PORT0 0x0 +/// ### +/// * Data select for [31:0]: +/// * 00 : Port 0 data +/// * 01 : Port 1 data +/// * 10 : Port 2 data +/// * 11 : Port 3 data +/// ### +/// %unsigned 2 PORT1 0x1 +/// ### +/// * Data select for [63:32]: +/// * 00 : Port 0 data +/// * 01 : Port 1 data +/// * 10 : Port 2 data +/// * 11 : Port 3 data +/// ### +/// %unsigned 2 PORT2 0x2 +/// ### +/// * Data select for [95:64]: +/// * 00 : Port 0 data +/// * 01 : Port 1 data +/// * 10 : Port 2 data +/// * 11 : Port 3 data +/// ### +/// %unsigned 2 PORT3 0x3 +/// ### +/// * Data select for [127:96]: +/// * 00 : Port 0 data +/// * 01 : Port 1 data +/// * 10 : Port 2 data +/// * 11 : Port 3 data +/// ### +/// %% 24 # Stuffing bits... +/// @ 0x00044 PDM_CTRL1 (RW) +/// %unsigned 4 MCLKSEL 0x1 +/// ### +/// * PDM MCLK Selection register: +/// * 3'b000 : Select MCLK PRIMARY +/// * 3'b001 : Select MCLK SECONDARY (default) +/// * 3'b010 : Select MCLK HD TX +/// * 3'b011 : Select MCLK SPDIF +/// * 3'b100 : Select MCLK HD RX +/// * 3'b101 to 3'b111 reserved +/// * Bit 4: is used to select MCLK of 4-channel MIC +/// * 1: Select MCLK of 4-channel MIC +/// ### +/// %unsigned 4 CLKDIV 0x4 +/// ### +/// * PDM CLKOUT Divider. +/// * 0: Divide by 1 +/// * 1: Divide by 2 +/// * 2: Divide by 4 +/// * 3: Divide by 8 +/// * 4: Divide by 16 (default) +/// * 5: Divide by 32 +/// * 6: Divide by 64 +/// * ........................ +/// * ........................ +/// * 14: Divide by 16384 +/// * 15: Divide by 32768 +/// ### +/// %unsigned 1 CLKEN 0x0 +/// ### +/// * PDM CLKOUT ENABLE +/// * 0 : PDM CLK disabled (default) +/// * 1 : PDM CLK enabled +/// ### +/// %unsigned 1 ENABLE 0x0 +/// ### +/// * PDM interface enable +/// * 0: Disabled (default) +/// * 1: Enabled +/// ### +/// %unsigned 1 MUTE 0x0 +/// ### +/// * Control bit to turn mute function ON or OFF +/// * 0: Mute turned OFF (default) +/// * 1: Mute turned ON +/// ### +/// %unsigned 1 LRSWITCH 0x0 +/// ### +/// * Control bit for switching the left channel data with right channel data: +/// * 0: Do not switch data (default) +/// * 1: Switch Data +/// ### +/// %unsigned 1 INVCLK_OUT 0x0 +/// ### +/// * Invert PDM CLK OUT +/// * 0: Not inverted (default) +/// * 1: Inverted +/// ### +/// %unsigned 1 INVCLK_INT 0x0 +/// ### +/// * Invert PDM CLK Internal +/// * 0: Not inverted (default) +/// * 1: Inverted +/// ### +/// %unsigned 1 RLSB 0x0 +/// ### +/// * Decides which bit is eceived first(left): +/// * 0: MSB first (default) +/// * 1: LSB first +/// ### +/// %unsigned 3 RDM 0x4 +/// ### +/// * L/R Channel resolution +/// * 0: 16-bits per channel +/// * 1: 18-bits per channel +/// * 2: 20-bits per channel +/// * 3: 24-bits per channel +/// * 4: 32-bits per channel (default) +/// * 5-7: Reserved +/// ### +/// %unsigned 1 MODE 0x0 +/// ### +/// * 0 : Half cycle PDM (DDR) (default) +/// * 1 : Classic PDM (SDR) +/// ### +/// %unsigned 1 SDR_CLKSEL 0x0 +/// ### +/// * SDR Data latch clock edge select +/// * 0: Latch data on falling clock edge of CLKOUT (default) +/// * 1: Latch data on rising clock edge of CLKOUT +/// ### +/// %unsigned 1 LATCH_MODE 0x0 +/// ### +/// * PDM Data input latch mode +/// * 0: Counter, Use oversampling clock (400Mhz, sysClk) to lath the input data (default) +/// * 1: Edge, Use PDM CLKOUT Edge to latch the the input data +/// ### +/// %% 11 # Stuffing bits... +/// @ 0x00048 PDM_CTRL2 (RW) +/// %unsigned 16 RDLT 0x1E +/// ### +/// * Rise Data Latch Time +/// * This registers decides PDM input data latch time after the Rising edge of PDMCLK in-terms of sysClk cycles + 1, when Data Latch mode is counter +/// ### +/// %unsigned 16 FDLT 0x1E +/// ### +/// * Fall Data Latch Time +/// * This registers decides PDM input data latch time after the falling edge of PDMCLK in-terms of sysClk cycles + 1, when Data Latch mode is counter +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 76B, bits: 353b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_MIC +#define h_MIC (){} + + #define RA_MIC_MICCTRL 0x0000 + /////////////////////////////////////////////////////////// + #define RA_MIC_RSD0 0x0008 + /////////////////////////////////////////////////////////// + #define RA_MIC_RSD1 0x0014 + /////////////////////////////////////////////////////////// + #define RA_MIC_RSD2 0x0020 + /////////////////////////////////////////////////////////// + #define RA_MIC_RSD3 0x002C + /////////////////////////////////////////////////////////// + #define RA_MIC_RXPORT 0x0038 + + #define BA_MIC_RXPORT_ENABLE 0x0038 + #define B16MIC_RXPORT_ENABLE 0x0038 + #define LSb32MIC_RXPORT_ENABLE 0 + #define LSb16MIC_RXPORT_ENABLE 0 + #define bMIC_RXPORT_ENABLE 1 + #define MSK32MIC_RXPORT_ENABLE 0x00000001 + #define MIC_RXPORT_ENABLE_DISABLE 0x0 + #define MIC_RXPORT_ENABLE_ENABLE 0x1 + /////////////////////////////////////////////////////////// + #define RA_MIC_RXDATA 0x003C + + #define BA_MIC_RXDATA_HBR 0x003C + #define B16MIC_RXDATA_HBR 0x003C + #define LSb32MIC_RXDATA_HBR 0 + #define LSb16MIC_RXDATA_HBR 0 + #define bMIC_RXDATA_HBR 1 + #define MSK32MIC_RXDATA_HBR 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_MIC_HBRDMAP 0x0040 + + #define BA_MIC_HBRDMAP_PORT0 0x0040 + #define B16MIC_HBRDMAP_PORT0 0x0040 + #define LSb32MIC_HBRDMAP_PORT0 0 + #define LSb16MIC_HBRDMAP_PORT0 0 + #define bMIC_HBRDMAP_PORT0 2 + #define MSK32MIC_HBRDMAP_PORT0 0x00000003 + + #define BA_MIC_HBRDMAP_PORT1 0x0040 + #define B16MIC_HBRDMAP_PORT1 0x0040 + #define LSb32MIC_HBRDMAP_PORT1 2 + #define LSb16MIC_HBRDMAP_PORT1 2 + #define bMIC_HBRDMAP_PORT1 2 + #define MSK32MIC_HBRDMAP_PORT1 0x0000000C + + #define BA_MIC_HBRDMAP_PORT2 0x0040 + #define B16MIC_HBRDMAP_PORT2 0x0040 + #define LSb32MIC_HBRDMAP_PORT2 4 + #define LSb16MIC_HBRDMAP_PORT2 4 + #define bMIC_HBRDMAP_PORT2 2 + #define MSK32MIC_HBRDMAP_PORT2 0x00000030 + + #define BA_MIC_HBRDMAP_PORT3 0x0040 + #define B16MIC_HBRDMAP_PORT3 0x0040 + #define LSb32MIC_HBRDMAP_PORT3 6 + #define LSb16MIC_HBRDMAP_PORT3 6 + #define bMIC_HBRDMAP_PORT3 2 + #define MSK32MIC_HBRDMAP_PORT3 0x000000C0 + /////////////////////////////////////////////////////////// + #define RA_MIC_PDM_CTRL1 0x0044 + + #define BA_MIC_PDM_CTRL1_MCLKSEL 0x0044 + #define B16MIC_PDM_CTRL1_MCLKSEL 0x0044 + #define LSb32MIC_PDM_CTRL1_MCLKSEL 0 + #define LSb16MIC_PDM_CTRL1_MCLKSEL 0 + #define bMIC_PDM_CTRL1_MCLKSEL 4 + #define MSK32MIC_PDM_CTRL1_MCLKSEL 0x0000000F + + #define BA_MIC_PDM_CTRL1_CLKDIV 0x0044 + #define B16MIC_PDM_CTRL1_CLKDIV 0x0044 + #define LSb32MIC_PDM_CTRL1_CLKDIV 4 + #define LSb16MIC_PDM_CTRL1_CLKDIV 4 + #define bMIC_PDM_CTRL1_CLKDIV 4 + #define MSK32MIC_PDM_CTRL1_CLKDIV 0x000000F0 + + #define BA_MIC_PDM_CTRL1_CLKEN 0x0045 + #define B16MIC_PDM_CTRL1_CLKEN 0x0044 + #define LSb32MIC_PDM_CTRL1_CLKEN 8 + #define LSb16MIC_PDM_CTRL1_CLKEN 8 + #define bMIC_PDM_CTRL1_CLKEN 1 + #define MSK32MIC_PDM_CTRL1_CLKEN 0x00000100 + + #define BA_MIC_PDM_CTRL1_ENABLE 0x0045 + #define B16MIC_PDM_CTRL1_ENABLE 0x0044 + #define LSb32MIC_PDM_CTRL1_ENABLE 9 + #define LSb16MIC_PDM_CTRL1_ENABLE 9 + #define bMIC_PDM_CTRL1_ENABLE 1 + #define MSK32MIC_PDM_CTRL1_ENABLE 0x00000200 + + #define BA_MIC_PDM_CTRL1_MUTE 0x0045 + #define B16MIC_PDM_CTRL1_MUTE 0x0044 + #define LSb32MIC_PDM_CTRL1_MUTE 10 + #define LSb16MIC_PDM_CTRL1_MUTE 10 + #define bMIC_PDM_CTRL1_MUTE 1 + #define MSK32MIC_PDM_CTRL1_MUTE 0x00000400 + + #define BA_MIC_PDM_CTRL1_LRSWITCH 0x0045 + #define B16MIC_PDM_CTRL1_LRSWITCH 0x0044 + #define LSb32MIC_PDM_CTRL1_LRSWITCH 11 + #define LSb16MIC_PDM_CTRL1_LRSWITCH 11 + #define bMIC_PDM_CTRL1_LRSWITCH 1 + #define MSK32MIC_PDM_CTRL1_LRSWITCH 0x00000800 + + #define BA_MIC_PDM_CTRL1_INVCLK_OUT 0x0045 + #define B16MIC_PDM_CTRL1_INVCLK_OUT 0x0044 + #define LSb32MIC_PDM_CTRL1_INVCLK_OUT 12 + #define LSb16MIC_PDM_CTRL1_INVCLK_OUT 12 + #define bMIC_PDM_CTRL1_INVCLK_OUT 1 + #define MSK32MIC_PDM_CTRL1_INVCLK_OUT 0x00001000 + + #define BA_MIC_PDM_CTRL1_INVCLK_INT 0x0045 + #define B16MIC_PDM_CTRL1_INVCLK_INT 0x0044 + #define LSb32MIC_PDM_CTRL1_INVCLK_INT 13 + #define LSb16MIC_PDM_CTRL1_INVCLK_INT 13 + #define bMIC_PDM_CTRL1_INVCLK_INT 1 + #define MSK32MIC_PDM_CTRL1_INVCLK_INT 0x00002000 + + #define BA_MIC_PDM_CTRL1_RLSB 0x0045 + #define B16MIC_PDM_CTRL1_RLSB 0x0044 + #define LSb32MIC_PDM_CTRL1_RLSB 14 + #define LSb16MIC_PDM_CTRL1_RLSB 14 + #define bMIC_PDM_CTRL1_RLSB 1 + #define MSK32MIC_PDM_CTRL1_RLSB 0x00004000 + + #define BA_MIC_PDM_CTRL1_RDM 0x0045 + #define B16MIC_PDM_CTRL1_RDM 0x0044 + #define LSb32MIC_PDM_CTRL1_RDM 15 + #define LSb16MIC_PDM_CTRL1_RDM 15 + #define bMIC_PDM_CTRL1_RDM 3 + #define MSK32MIC_PDM_CTRL1_RDM 0x00038000 + + #define BA_MIC_PDM_CTRL1_MODE 0x0046 + #define B16MIC_PDM_CTRL1_MODE 0x0046 + #define LSb32MIC_PDM_CTRL1_MODE 18 + #define LSb16MIC_PDM_CTRL1_MODE 2 + #define bMIC_PDM_CTRL1_MODE 1 + #define MSK32MIC_PDM_CTRL1_MODE 0x00040000 + + #define BA_MIC_PDM_CTRL1_SDR_CLKSEL 0x0046 + #define B16MIC_PDM_CTRL1_SDR_CLKSEL 0x0046 + #define LSb32MIC_PDM_CTRL1_SDR_CLKSEL 19 + #define LSb16MIC_PDM_CTRL1_SDR_CLKSEL 3 + #define bMIC_PDM_CTRL1_SDR_CLKSEL 1 + #define MSK32MIC_PDM_CTRL1_SDR_CLKSEL 0x00080000 + + #define BA_MIC_PDM_CTRL1_LATCH_MODE 0x0046 + #define B16MIC_PDM_CTRL1_LATCH_MODE 0x0046 + #define LSb32MIC_PDM_CTRL1_LATCH_MODE 20 + #define LSb16MIC_PDM_CTRL1_LATCH_MODE 4 + #define bMIC_PDM_CTRL1_LATCH_MODE 1 + #define MSK32MIC_PDM_CTRL1_LATCH_MODE 0x00100000 + /////////////////////////////////////////////////////////// + #define RA_MIC_PDM_CTRL2 0x0048 + + #define BA_MIC_PDM_CTRL2_RDLT 0x0048 + #define B16MIC_PDM_CTRL2_RDLT 0x0048 + #define LSb32MIC_PDM_CTRL2_RDLT 0 + #define LSb16MIC_PDM_CTRL2_RDLT 0 + #define bMIC_PDM_CTRL2_RDLT 16 + #define MSK32MIC_PDM_CTRL2_RDLT 0x0000FFFF + + #define BA_MIC_PDM_CTRL2_FDLT 0x004A + #define B16MIC_PDM_CTRL2_FDLT 0x004A + #define LSb32MIC_PDM_CTRL2_FDLT 16 + #define LSb16MIC_PDM_CTRL2_FDLT 0 + #define bMIC_PDM_CTRL2_FDLT 16 + #define MSK32MIC_PDM_CTRL2_FDLT 0xFFFF0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_MIC { + /////////////////////////////////////////////////////////// + SIE_PRIAUD ie_MICCTRL; + /////////////////////////////////////////////////////////// + SIE_AUDCH ie_RSD0; + /////////////////////////////////////////////////////////// + SIE_AUDCH ie_RSD1; + /////////////////////////////////////////////////////////// + SIE_AUDCH ie_RSD2; + /////////////////////////////////////////////////////////// + SIE_AUDCH ie_RSD3; + /////////////////////////////////////////////////////////// + #define GET32MIC_RXPORT_ENABLE(r32) _BFGET_(r32, 0, 0) + #define SET32MIC_RXPORT_ENABLE(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16MIC_RXPORT_ENABLE(r16) _BFGET_(r16, 0, 0) + #define SET16MIC_RXPORT_ENABLE(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32MIC_RXPORT {\ + UNSG32 uRXPORT_ENABLE : 1;\ + UNSG32 RSVDx38_b1 : 31;\ + } + union { UNSG32 u32MIC_RXPORT; + struct w32MIC_RXPORT; + }; + /////////////////////////////////////////////////////////// + #define GET32MIC_RXDATA_HBR(r32) _BFGET_(r32, 0, 0) + #define SET32MIC_RXDATA_HBR(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16MIC_RXDATA_HBR(r16) _BFGET_(r16, 0, 0) + #define SET16MIC_RXDATA_HBR(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32MIC_RXDATA {\ + UNSG32 uRXDATA_HBR : 1;\ + UNSG32 RSVDx3C_b1 : 31;\ + } + union { UNSG32 u32MIC_RXDATA; + struct w32MIC_RXDATA; + }; + /////////////////////////////////////////////////////////// + #define GET32MIC_HBRDMAP_PORT0(r32) _BFGET_(r32, 1, 0) + #define SET32MIC_HBRDMAP_PORT0(r32,v) _BFSET_(r32, 1, 0,v) + #define GET16MIC_HBRDMAP_PORT0(r16) _BFGET_(r16, 1, 0) + #define SET16MIC_HBRDMAP_PORT0(r16,v) _BFSET_(r16, 1, 0,v) + + #define GET32MIC_HBRDMAP_PORT1(r32) _BFGET_(r32, 3, 2) + #define SET32MIC_HBRDMAP_PORT1(r32,v) _BFSET_(r32, 3, 2,v) + #define GET16MIC_HBRDMAP_PORT1(r16) _BFGET_(r16, 3, 2) + #define SET16MIC_HBRDMAP_PORT1(r16,v) _BFSET_(r16, 3, 2,v) + + #define GET32MIC_HBRDMAP_PORT2(r32) _BFGET_(r32, 5, 4) + #define SET32MIC_HBRDMAP_PORT2(r32,v) _BFSET_(r32, 5, 4,v) + #define GET16MIC_HBRDMAP_PORT2(r16) _BFGET_(r16, 5, 4) + #define SET16MIC_HBRDMAP_PORT2(r16,v) _BFSET_(r16, 5, 4,v) + + #define GET32MIC_HBRDMAP_PORT3(r32) _BFGET_(r32, 7, 6) + #define SET32MIC_HBRDMAP_PORT3(r32,v) _BFSET_(r32, 7, 6,v) + #define GET16MIC_HBRDMAP_PORT3(r16) _BFGET_(r16, 7, 6) + #define SET16MIC_HBRDMAP_PORT3(r16,v) _BFSET_(r16, 7, 6,v) + + #define w32MIC_HBRDMAP {\ + UNSG32 uHBRDMAP_PORT0 : 2;\ + UNSG32 uHBRDMAP_PORT1 : 2;\ + UNSG32 uHBRDMAP_PORT2 : 2;\ + UNSG32 uHBRDMAP_PORT3 : 2;\ + UNSG32 RSVDx40_b8 : 24;\ + } + union { UNSG32 u32MIC_HBRDMAP; + struct w32MIC_HBRDMAP; + }; + /////////////////////////////////////////////////////////// + #define GET32MIC_PDM_CTRL1_MCLKSEL(r32) _BFGET_(r32, 3, 0) + #define SET32MIC_PDM_CTRL1_MCLKSEL(r32,v) _BFSET_(r32, 3, 0,v) + #define GET16MIC_PDM_CTRL1_MCLKSEL(r16) _BFGET_(r16, 3, 0) + #define SET16MIC_PDM_CTRL1_MCLKSEL(r16,v) _BFSET_(r16, 3, 0,v) + + #define GET32MIC_PDM_CTRL1_CLKDIV(r32) _BFGET_(r32, 7, 4) + #define SET32MIC_PDM_CTRL1_CLKDIV(r32,v) _BFSET_(r32, 7, 4,v) + #define GET16MIC_PDM_CTRL1_CLKDIV(r16) _BFGET_(r16, 7, 4) + #define SET16MIC_PDM_CTRL1_CLKDIV(r16,v) _BFSET_(r16, 7, 4,v) + + #define GET32MIC_PDM_CTRL1_CLKEN(r32) _BFGET_(r32, 8, 8) + #define SET32MIC_PDM_CTRL1_CLKEN(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16MIC_PDM_CTRL1_CLKEN(r16) _BFGET_(r16, 8, 8) + #define SET16MIC_PDM_CTRL1_CLKEN(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32MIC_PDM_CTRL1_ENABLE(r32) _BFGET_(r32, 9, 9) + #define SET32MIC_PDM_CTRL1_ENABLE(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16MIC_PDM_CTRL1_ENABLE(r16) _BFGET_(r16, 9, 9) + #define SET16MIC_PDM_CTRL1_ENABLE(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32MIC_PDM_CTRL1_MUTE(r32) _BFGET_(r32,10,10) + #define SET32MIC_PDM_CTRL1_MUTE(r32,v) _BFSET_(r32,10,10,v) + #define GET16MIC_PDM_CTRL1_MUTE(r16) _BFGET_(r16,10,10) + #define SET16MIC_PDM_CTRL1_MUTE(r16,v) _BFSET_(r16,10,10,v) + + #define GET32MIC_PDM_CTRL1_LRSWITCH(r32) _BFGET_(r32,11,11) + #define SET32MIC_PDM_CTRL1_LRSWITCH(r32,v) _BFSET_(r32,11,11,v) + #define GET16MIC_PDM_CTRL1_LRSWITCH(r16) _BFGET_(r16,11,11) + #define SET16MIC_PDM_CTRL1_LRSWITCH(r16,v) _BFSET_(r16,11,11,v) + + #define GET32MIC_PDM_CTRL1_INVCLK_OUT(r32) _BFGET_(r32,12,12) + #define SET32MIC_PDM_CTRL1_INVCLK_OUT(r32,v) _BFSET_(r32,12,12,v) + #define GET16MIC_PDM_CTRL1_INVCLK_OUT(r16) _BFGET_(r16,12,12) + #define SET16MIC_PDM_CTRL1_INVCLK_OUT(r16,v) _BFSET_(r16,12,12,v) + + #define GET32MIC_PDM_CTRL1_INVCLK_INT(r32) _BFGET_(r32,13,13) + #define SET32MIC_PDM_CTRL1_INVCLK_INT(r32,v) _BFSET_(r32,13,13,v) + #define GET16MIC_PDM_CTRL1_INVCLK_INT(r16) _BFGET_(r16,13,13) + #define SET16MIC_PDM_CTRL1_INVCLK_INT(r16,v) _BFSET_(r16,13,13,v) + + #define GET32MIC_PDM_CTRL1_RLSB(r32) _BFGET_(r32,14,14) + #define SET32MIC_PDM_CTRL1_RLSB(r32,v) _BFSET_(r32,14,14,v) + #define GET16MIC_PDM_CTRL1_RLSB(r16) _BFGET_(r16,14,14) + #define SET16MIC_PDM_CTRL1_RLSB(r16,v) _BFSET_(r16,14,14,v) + + #define GET32MIC_PDM_CTRL1_RDM(r32) _BFGET_(r32,17,15) + #define SET32MIC_PDM_CTRL1_RDM(r32,v) _BFSET_(r32,17,15,v) + + #define GET32MIC_PDM_CTRL1_MODE(r32) _BFGET_(r32,18,18) + #define SET32MIC_PDM_CTRL1_MODE(r32,v) _BFSET_(r32,18,18,v) + #define GET16MIC_PDM_CTRL1_MODE(r16) _BFGET_(r16, 2, 2) + #define SET16MIC_PDM_CTRL1_MODE(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32MIC_PDM_CTRL1_SDR_CLKSEL(r32) _BFGET_(r32,19,19) + #define SET32MIC_PDM_CTRL1_SDR_CLKSEL(r32,v) _BFSET_(r32,19,19,v) + #define GET16MIC_PDM_CTRL1_SDR_CLKSEL(r16) _BFGET_(r16, 3, 3) + #define SET16MIC_PDM_CTRL1_SDR_CLKSEL(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32MIC_PDM_CTRL1_LATCH_MODE(r32) _BFGET_(r32,20,20) + #define SET32MIC_PDM_CTRL1_LATCH_MODE(r32,v) _BFSET_(r32,20,20,v) + #define GET16MIC_PDM_CTRL1_LATCH_MODE(r16) _BFGET_(r16, 4, 4) + #define SET16MIC_PDM_CTRL1_LATCH_MODE(r16,v) _BFSET_(r16, 4, 4,v) + + #define w32MIC_PDM_CTRL1 {\ + UNSG32 uPDM_CTRL1_MCLKSEL : 4;\ + UNSG32 uPDM_CTRL1_CLKDIV : 4;\ + UNSG32 uPDM_CTRL1_CLKEN : 1;\ + UNSG32 uPDM_CTRL1_ENABLE : 1;\ + UNSG32 uPDM_CTRL1_MUTE : 1;\ + UNSG32 uPDM_CTRL1_LRSWITCH : 1;\ + UNSG32 uPDM_CTRL1_INVCLK_OUT : 1;\ + UNSG32 uPDM_CTRL1_INVCLK_INT : 1;\ + UNSG32 uPDM_CTRL1_RLSB : 1;\ + UNSG32 uPDM_CTRL1_RDM : 3;\ + UNSG32 uPDM_CTRL1_MODE : 1;\ + UNSG32 uPDM_CTRL1_SDR_CLKSEL : 1;\ + UNSG32 uPDM_CTRL1_LATCH_MODE : 1;\ + UNSG32 RSVDx44_b21 : 11;\ + } + union { UNSG32 u32MIC_PDM_CTRL1; + struct w32MIC_PDM_CTRL1; + }; + /////////////////////////////////////////////////////////// + #define GET32MIC_PDM_CTRL2_RDLT(r32) _BFGET_(r32,15, 0) + #define SET32MIC_PDM_CTRL2_RDLT(r32,v) _BFSET_(r32,15, 0,v) + #define GET16MIC_PDM_CTRL2_RDLT(r16) _BFGET_(r16,15, 0) + #define SET16MIC_PDM_CTRL2_RDLT(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32MIC_PDM_CTRL2_FDLT(r32) _BFGET_(r32,31,16) + #define SET32MIC_PDM_CTRL2_FDLT(r32,v) _BFSET_(r32,31,16,v) + #define GET16MIC_PDM_CTRL2_FDLT(r16) _BFGET_(r16,15, 0) + #define SET16MIC_PDM_CTRL2_FDLT(r16,v) _BFSET_(r16,15, 0,v) + + #define w32MIC_PDM_CTRL2 {\ + UNSG32 uPDM_CTRL2_RDLT : 16;\ + UNSG32 uPDM_CTRL2_FDLT : 16;\ + } + union { UNSG32 u32MIC_PDM_CTRL2; + struct w32MIC_PDM_CTRL2; + }; + /////////////////////////////////////////////////////////// + } SIE_MIC; + + typedef union T32MIC_RXPORT + { UNSG32 u32; + struct w32MIC_RXPORT; + } T32MIC_RXPORT; + typedef union T32MIC_RXDATA + { UNSG32 u32; + struct w32MIC_RXDATA; + } T32MIC_RXDATA; + typedef union T32MIC_HBRDMAP + { UNSG32 u32; + struct w32MIC_HBRDMAP; + } T32MIC_HBRDMAP; + typedef union T32MIC_PDM_CTRL1 + { UNSG32 u32; + struct w32MIC_PDM_CTRL1; + } T32MIC_PDM_CTRL1; + typedef union T32MIC_PDM_CTRL2 + { UNSG32 u32; + struct w32MIC_PDM_CTRL2; + } T32MIC_PDM_CTRL2; + /////////////////////////////////////////////////////////// + + typedef union TMIC_RXPORT + { UNSG32 u32[1]; + struct { + struct w32MIC_RXPORT; + }; + } TMIC_RXPORT; + typedef union TMIC_RXDATA + { UNSG32 u32[1]; + struct { + struct w32MIC_RXDATA; + }; + } TMIC_RXDATA; + typedef union TMIC_HBRDMAP + { UNSG32 u32[1]; + struct { + struct w32MIC_HBRDMAP; + }; + } TMIC_HBRDMAP; + typedef union TMIC_PDM_CTRL1 + { UNSG32 u32[1]; + struct { + struct w32MIC_PDM_CTRL1; + }; + } TMIC_PDM_CTRL1; + typedef union TMIC_PDM_CTRL2 + { UNSG32 u32[1]; + struct { + struct w32MIC_PDM_CTRL2; + }; + } TMIC_PDM_CTRL2; + + /////////////////////////////////////////////////////////// + SIGN32 MIC_drvrd(SIE_MIC *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 MIC_drvwr(SIE_MIC *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void MIC_reset(SIE_MIC *p); + SIGN32 MIC_cmp (SIE_MIC *p, SIE_MIC *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define MIC_check(p,pie,pfx,hLOG) MIC_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define MIC_print(p, pfx,hLOG) MIC_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: MIC +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE IOSEL biu (4,4) +/// ### +/// * PAD Output Enable selection register +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 PRIMCLK (RW) +/// ### +/// * Primary Port MCLK output enable register. +/// ### +/// %unsigned 1 SEL 0x0 +/// ### +/// * Note: Not used. MCLK source is selected using register defined in 88DE3010 Global Unit. +/// * *INTERNAL_ONLY** +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00004 SECMCLK (RW) +/// ### +/// * Secondary Port MCLK output enable register. +/// ### +/// %unsigned 1 SEL 0x0 +/// ### +/// * Note: Not used. MCLK source is selected using register defined in 88DE3010 Global Unit. +/// * *INTERNAL_ONLY** +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 MIC1MCLK (RW) +/// ### +/// * MIC Port MCLK output enable register. +/// ### +/// %unsigned 1 SEL 0x0 +/// ### +/// * Note: Not used. MCLK source is selected using register defined in 88DE3010 Global Unit. +/// * *INTERNAL_ONLY** +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C PRIBCLK (RW) +/// ### +/// * Primary port Bit-clock output enable register. +/// ### +/// %unsigned 1 SEL 0x1 +/// ### +/// * Bit clock output enable: +/// * 0: Bit clock is from external +/// * 1: Bit clock generated internally using Master Clock (MCLK) (default) +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00010 SECBCLK (RW) +/// ### +/// * Secondary port Bit-clock output enable register. +/// ### +/// %unsigned 1 SEL 0x1 +/// ### +/// * Bit clock output enable: +/// * 0: Bit clock is from external +/// * 1: Bit clock generated internally using Master Clock (MCLK) (default) +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00014 MIC1BCLK (RW) +/// ### +/// * MIC port Bit-clock output enable register. +/// ### +/// %unsigned 1 SEL 0x0 +/// ### +/// * Bit clock output enable: +/// * 0: Bit clock is from external (default) +/// * 1: Bit clock generated internally using MCLK +/// * Note: MIC Port is slave only so above bit should be set to 0. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00018 MIC2BCLK (RW) +/// ### +/// * MIC(4-Channel) port Bit-clock output enable register. +/// ### +/// %unsigned 1 SEL 0x0 +/// %% 31 # Stuffing bits... +/// @ 0x0001C PRIFS (RW) +/// ### +/// * Primary port FSYNC output enable register. +/// ### +/// %unsigned 1 SEL 0x1 +/// ### +/// * In 88DE3010 Primary port FSYNC is generated internally so this bit should be set to 1. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00020 SECFS (RW) +/// ### +/// * Secondary port FSYNC output enable register. +/// ### +/// %unsigned 1 SEL 0x1 +/// ### +/// * In 88DE3010 Secondary port FSYNC is generated internally so this bit should be set to 1. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00024 MIC1FS (RW) +/// ### +/// * MIC port FSYNC output enable register. +/// ### +/// %unsigned 1 SEL 0x0 +/// %% 31 # Stuffing bits... +/// @ 0x00028 MIC2FS (RW) +/// ### +/// * MIC-4 port FSYNC output enable register. +/// ### +/// %unsigned 1 SEL 0x0 +/// ### +/// * In 88DE3010 MIC port FSYNC is from external so this bit should be set to 0. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0002C PDMCLK (RW) +/// ### +/// * PDM CLK Output Enable +/// * 0: No clock out +/// * 1: Clock out +/// ### +/// %unsigned 1 SEL 0x0 +/// %% 31 # Stuffing bits... +/// @ 0x00030 PDM (RW) +/// %unsigned 1 GENABLE 0x0 +/// ### +/// * PDM GLOBAL Enable +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 52B, bits: 13b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_IOSEL +#define h_IOSEL (){} + + #define RA_IOSEL_PRIMCLK 0x0000 + + #define BA_IOSEL_PRIMCLK_SEL 0x0000 + #define B16IOSEL_PRIMCLK_SEL 0x0000 + #define LSb32IOSEL_PRIMCLK_SEL 0 + #define LSb16IOSEL_PRIMCLK_SEL 0 + #define bIOSEL_PRIMCLK_SEL 1 + #define MSK32IOSEL_PRIMCLK_SEL 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_IOSEL_SECMCLK 0x0004 + + #define BA_IOSEL_SECMCLK_SEL 0x0004 + #define B16IOSEL_SECMCLK_SEL 0x0004 + #define LSb32IOSEL_SECMCLK_SEL 0 + #define LSb16IOSEL_SECMCLK_SEL 0 + #define bIOSEL_SECMCLK_SEL 1 + #define MSK32IOSEL_SECMCLK_SEL 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_IOSEL_MIC1MCLK 0x0008 + + #define BA_IOSEL_MIC1MCLK_SEL 0x0008 + #define B16IOSEL_MIC1MCLK_SEL 0x0008 + #define LSb32IOSEL_MIC1MCLK_SEL 0 + #define LSb16IOSEL_MIC1MCLK_SEL 0 + #define bIOSEL_MIC1MCLK_SEL 1 + #define MSK32IOSEL_MIC1MCLK_SEL 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_IOSEL_PRIBCLK 0x000C + + #define BA_IOSEL_PRIBCLK_SEL 0x000C + #define B16IOSEL_PRIBCLK_SEL 0x000C + #define LSb32IOSEL_PRIBCLK_SEL 0 + #define LSb16IOSEL_PRIBCLK_SEL 0 + #define bIOSEL_PRIBCLK_SEL 1 + #define MSK32IOSEL_PRIBCLK_SEL 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_IOSEL_SECBCLK 0x0010 + + #define BA_IOSEL_SECBCLK_SEL 0x0010 + #define B16IOSEL_SECBCLK_SEL 0x0010 + #define LSb32IOSEL_SECBCLK_SEL 0 + #define LSb16IOSEL_SECBCLK_SEL 0 + #define bIOSEL_SECBCLK_SEL 1 + #define MSK32IOSEL_SECBCLK_SEL 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_IOSEL_MIC1BCLK 0x0014 + + #define BA_IOSEL_MIC1BCLK_SEL 0x0014 + #define B16IOSEL_MIC1BCLK_SEL 0x0014 + #define LSb32IOSEL_MIC1BCLK_SEL 0 + #define LSb16IOSEL_MIC1BCLK_SEL 0 + #define bIOSEL_MIC1BCLK_SEL 1 + #define MSK32IOSEL_MIC1BCLK_SEL 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_IOSEL_MIC2BCLK 0x0018 + + #define BA_IOSEL_MIC2BCLK_SEL 0x0018 + #define B16IOSEL_MIC2BCLK_SEL 0x0018 + #define LSb32IOSEL_MIC2BCLK_SEL 0 + #define LSb16IOSEL_MIC2BCLK_SEL 0 + #define bIOSEL_MIC2BCLK_SEL 1 + #define MSK32IOSEL_MIC2BCLK_SEL 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_IOSEL_PRIFS 0x001C + + #define BA_IOSEL_PRIFS_SEL 0x001C + #define B16IOSEL_PRIFS_SEL 0x001C + #define LSb32IOSEL_PRIFS_SEL 0 + #define LSb16IOSEL_PRIFS_SEL 0 + #define bIOSEL_PRIFS_SEL 1 + #define MSK32IOSEL_PRIFS_SEL 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_IOSEL_SECFS 0x0020 + + #define BA_IOSEL_SECFS_SEL 0x0020 + #define B16IOSEL_SECFS_SEL 0x0020 + #define LSb32IOSEL_SECFS_SEL 0 + #define LSb16IOSEL_SECFS_SEL 0 + #define bIOSEL_SECFS_SEL 1 + #define MSK32IOSEL_SECFS_SEL 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_IOSEL_MIC1FS 0x0024 + + #define BA_IOSEL_MIC1FS_SEL 0x0024 + #define B16IOSEL_MIC1FS_SEL 0x0024 + #define LSb32IOSEL_MIC1FS_SEL 0 + #define LSb16IOSEL_MIC1FS_SEL 0 + #define bIOSEL_MIC1FS_SEL 1 + #define MSK32IOSEL_MIC1FS_SEL 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_IOSEL_MIC2FS 0x0028 + + #define BA_IOSEL_MIC2FS_SEL 0x0028 + #define B16IOSEL_MIC2FS_SEL 0x0028 + #define LSb32IOSEL_MIC2FS_SEL 0 + #define LSb16IOSEL_MIC2FS_SEL 0 + #define bIOSEL_MIC2FS_SEL 1 + #define MSK32IOSEL_MIC2FS_SEL 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_IOSEL_PDMCLK 0x002C + + #define BA_IOSEL_PDMCLK_SEL 0x002C + #define B16IOSEL_PDMCLK_SEL 0x002C + #define LSb32IOSEL_PDMCLK_SEL 0 + #define LSb16IOSEL_PDMCLK_SEL 0 + #define bIOSEL_PDMCLK_SEL 1 + #define MSK32IOSEL_PDMCLK_SEL 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_IOSEL_PDM 0x0030 + + #define BA_IOSEL_PDM_GENABLE 0x0030 + #define B16IOSEL_PDM_GENABLE 0x0030 + #define LSb32IOSEL_PDM_GENABLE 0 + #define LSb16IOSEL_PDM_GENABLE 0 + #define bIOSEL_PDM_GENABLE 1 + #define MSK32IOSEL_PDM_GENABLE 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_IOSEL { + /////////////////////////////////////////////////////////// + #define GET32IOSEL_PRIMCLK_SEL(r32) _BFGET_(r32, 0, 0) + #define SET32IOSEL_PRIMCLK_SEL(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16IOSEL_PRIMCLK_SEL(r16) _BFGET_(r16, 0, 0) + #define SET16IOSEL_PRIMCLK_SEL(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32IOSEL_PRIMCLK {\ + UNSG32 uPRIMCLK_SEL : 1;\ + UNSG32 RSVDx0_b1 : 31;\ + } + union { UNSG32 u32IOSEL_PRIMCLK; + struct w32IOSEL_PRIMCLK; + }; + /////////////////////////////////////////////////////////// + #define GET32IOSEL_SECMCLK_SEL(r32) _BFGET_(r32, 0, 0) + #define SET32IOSEL_SECMCLK_SEL(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16IOSEL_SECMCLK_SEL(r16) _BFGET_(r16, 0, 0) + #define SET16IOSEL_SECMCLK_SEL(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32IOSEL_SECMCLK {\ + UNSG32 uSECMCLK_SEL : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } + union { UNSG32 u32IOSEL_SECMCLK; + struct w32IOSEL_SECMCLK; + }; + /////////////////////////////////////////////////////////// + #define GET32IOSEL_MIC1MCLK_SEL(r32) _BFGET_(r32, 0, 0) + #define SET32IOSEL_MIC1MCLK_SEL(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16IOSEL_MIC1MCLK_SEL(r16) _BFGET_(r16, 0, 0) + #define SET16IOSEL_MIC1MCLK_SEL(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32IOSEL_MIC1MCLK {\ + UNSG32 uMIC1MCLK_SEL : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32IOSEL_MIC1MCLK; + struct w32IOSEL_MIC1MCLK; + }; + /////////////////////////////////////////////////////////// + #define GET32IOSEL_PRIBCLK_SEL(r32) _BFGET_(r32, 0, 0) + #define SET32IOSEL_PRIBCLK_SEL(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16IOSEL_PRIBCLK_SEL(r16) _BFGET_(r16, 0, 0) + #define SET16IOSEL_PRIBCLK_SEL(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32IOSEL_PRIBCLK {\ + UNSG32 uPRIBCLK_SEL : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32IOSEL_PRIBCLK; + struct w32IOSEL_PRIBCLK; + }; + /////////////////////////////////////////////////////////// + #define GET32IOSEL_SECBCLK_SEL(r32) _BFGET_(r32, 0, 0) + #define SET32IOSEL_SECBCLK_SEL(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16IOSEL_SECBCLK_SEL(r16) _BFGET_(r16, 0, 0) + #define SET16IOSEL_SECBCLK_SEL(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32IOSEL_SECBCLK {\ + UNSG32 uSECBCLK_SEL : 1;\ + UNSG32 RSVDx10_b1 : 31;\ + } + union { UNSG32 u32IOSEL_SECBCLK; + struct w32IOSEL_SECBCLK; + }; + /////////////////////////////////////////////////////////// + #define GET32IOSEL_MIC1BCLK_SEL(r32) _BFGET_(r32, 0, 0) + #define SET32IOSEL_MIC1BCLK_SEL(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16IOSEL_MIC1BCLK_SEL(r16) _BFGET_(r16, 0, 0) + #define SET16IOSEL_MIC1BCLK_SEL(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32IOSEL_MIC1BCLK {\ + UNSG32 uMIC1BCLK_SEL : 1;\ + UNSG32 RSVDx14_b1 : 31;\ + } + union { UNSG32 u32IOSEL_MIC1BCLK; + struct w32IOSEL_MIC1BCLK; + }; + /////////////////////////////////////////////////////////// + #define GET32IOSEL_MIC2BCLK_SEL(r32) _BFGET_(r32, 0, 0) + #define SET32IOSEL_MIC2BCLK_SEL(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16IOSEL_MIC2BCLK_SEL(r16) _BFGET_(r16, 0, 0) + #define SET16IOSEL_MIC2BCLK_SEL(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32IOSEL_MIC2BCLK {\ + UNSG32 uMIC2BCLK_SEL : 1;\ + UNSG32 RSVDx18_b1 : 31;\ + } + union { UNSG32 u32IOSEL_MIC2BCLK; + struct w32IOSEL_MIC2BCLK; + }; + /////////////////////////////////////////////////////////// + #define GET32IOSEL_PRIFS_SEL(r32) _BFGET_(r32, 0, 0) + #define SET32IOSEL_PRIFS_SEL(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16IOSEL_PRIFS_SEL(r16) _BFGET_(r16, 0, 0) + #define SET16IOSEL_PRIFS_SEL(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32IOSEL_PRIFS {\ + UNSG32 uPRIFS_SEL : 1;\ + UNSG32 RSVDx1C_b1 : 31;\ + } + union { UNSG32 u32IOSEL_PRIFS; + struct w32IOSEL_PRIFS; + }; + /////////////////////////////////////////////////////////// + #define GET32IOSEL_SECFS_SEL(r32) _BFGET_(r32, 0, 0) + #define SET32IOSEL_SECFS_SEL(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16IOSEL_SECFS_SEL(r16) _BFGET_(r16, 0, 0) + #define SET16IOSEL_SECFS_SEL(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32IOSEL_SECFS {\ + UNSG32 uSECFS_SEL : 1;\ + UNSG32 RSVDx20_b1 : 31;\ + } + union { UNSG32 u32IOSEL_SECFS; + struct w32IOSEL_SECFS; + }; + /////////////////////////////////////////////////////////// + #define GET32IOSEL_MIC1FS_SEL(r32) _BFGET_(r32, 0, 0) + #define SET32IOSEL_MIC1FS_SEL(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16IOSEL_MIC1FS_SEL(r16) _BFGET_(r16, 0, 0) + #define SET16IOSEL_MIC1FS_SEL(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32IOSEL_MIC1FS {\ + UNSG32 uMIC1FS_SEL : 1;\ + UNSG32 RSVDx24_b1 : 31;\ + } + union { UNSG32 u32IOSEL_MIC1FS; + struct w32IOSEL_MIC1FS; + }; + /////////////////////////////////////////////////////////// + #define GET32IOSEL_MIC2FS_SEL(r32) _BFGET_(r32, 0, 0) + #define SET32IOSEL_MIC2FS_SEL(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16IOSEL_MIC2FS_SEL(r16) _BFGET_(r16, 0, 0) + #define SET16IOSEL_MIC2FS_SEL(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32IOSEL_MIC2FS {\ + UNSG32 uMIC2FS_SEL : 1;\ + UNSG32 RSVDx28_b1 : 31;\ + } + union { UNSG32 u32IOSEL_MIC2FS; + struct w32IOSEL_MIC2FS; + }; + /////////////////////////////////////////////////////////// + #define GET32IOSEL_PDMCLK_SEL(r32) _BFGET_(r32, 0, 0) + #define SET32IOSEL_PDMCLK_SEL(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16IOSEL_PDMCLK_SEL(r16) _BFGET_(r16, 0, 0) + #define SET16IOSEL_PDMCLK_SEL(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32IOSEL_PDMCLK {\ + UNSG32 uPDMCLK_SEL : 1;\ + UNSG32 RSVDx2C_b1 : 31;\ + } + union { UNSG32 u32IOSEL_PDMCLK; + struct w32IOSEL_PDMCLK; + }; + /////////////////////////////////////////////////////////// + #define GET32IOSEL_PDM_GENABLE(r32) _BFGET_(r32, 0, 0) + #define SET32IOSEL_PDM_GENABLE(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16IOSEL_PDM_GENABLE(r16) _BFGET_(r16, 0, 0) + #define SET16IOSEL_PDM_GENABLE(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32IOSEL_PDM {\ + UNSG32 uPDM_GENABLE : 1;\ + UNSG32 RSVDx30_b1 : 31;\ + } + union { UNSG32 u32IOSEL_PDM; + struct w32IOSEL_PDM; + }; + /////////////////////////////////////////////////////////// + } SIE_IOSEL; + + typedef union T32IOSEL_PRIMCLK + { UNSG32 u32; + struct w32IOSEL_PRIMCLK; + } T32IOSEL_PRIMCLK; + typedef union T32IOSEL_SECMCLK + { UNSG32 u32; + struct w32IOSEL_SECMCLK; + } T32IOSEL_SECMCLK; + typedef union T32IOSEL_MIC1MCLK + { UNSG32 u32; + struct w32IOSEL_MIC1MCLK; + } T32IOSEL_MIC1MCLK; + typedef union T32IOSEL_PRIBCLK + { UNSG32 u32; + struct w32IOSEL_PRIBCLK; + } T32IOSEL_PRIBCLK; + typedef union T32IOSEL_SECBCLK + { UNSG32 u32; + struct w32IOSEL_SECBCLK; + } T32IOSEL_SECBCLK; + typedef union T32IOSEL_MIC1BCLK + { UNSG32 u32; + struct w32IOSEL_MIC1BCLK; + } T32IOSEL_MIC1BCLK; + typedef union T32IOSEL_MIC2BCLK + { UNSG32 u32; + struct w32IOSEL_MIC2BCLK; + } T32IOSEL_MIC2BCLK; + typedef union T32IOSEL_PRIFS + { UNSG32 u32; + struct w32IOSEL_PRIFS; + } T32IOSEL_PRIFS; + typedef union T32IOSEL_SECFS + { UNSG32 u32; + struct w32IOSEL_SECFS; + } T32IOSEL_SECFS; + typedef union T32IOSEL_MIC1FS + { UNSG32 u32; + struct w32IOSEL_MIC1FS; + } T32IOSEL_MIC1FS; + typedef union T32IOSEL_MIC2FS + { UNSG32 u32; + struct w32IOSEL_MIC2FS; + } T32IOSEL_MIC2FS; + typedef union T32IOSEL_PDMCLK + { UNSG32 u32; + struct w32IOSEL_PDMCLK; + } T32IOSEL_PDMCLK; + typedef union T32IOSEL_PDM + { UNSG32 u32; + struct w32IOSEL_PDM; + } T32IOSEL_PDM; + /////////////////////////////////////////////////////////// + + typedef union TIOSEL_PRIMCLK + { UNSG32 u32[1]; + struct { + struct w32IOSEL_PRIMCLK; + }; + } TIOSEL_PRIMCLK; + typedef union TIOSEL_SECMCLK + { UNSG32 u32[1]; + struct { + struct w32IOSEL_SECMCLK; + }; + } TIOSEL_SECMCLK; + typedef union TIOSEL_MIC1MCLK + { UNSG32 u32[1]; + struct { + struct w32IOSEL_MIC1MCLK; + }; + } TIOSEL_MIC1MCLK; + typedef union TIOSEL_PRIBCLK + { UNSG32 u32[1]; + struct { + struct w32IOSEL_PRIBCLK; + }; + } TIOSEL_PRIBCLK; + typedef union TIOSEL_SECBCLK + { UNSG32 u32[1]; + struct { + struct w32IOSEL_SECBCLK; + }; + } TIOSEL_SECBCLK; + typedef union TIOSEL_MIC1BCLK + { UNSG32 u32[1]; + struct { + struct w32IOSEL_MIC1BCLK; + }; + } TIOSEL_MIC1BCLK; + typedef union TIOSEL_MIC2BCLK + { UNSG32 u32[1]; + struct { + struct w32IOSEL_MIC2BCLK; + }; + } TIOSEL_MIC2BCLK; + typedef union TIOSEL_PRIFS + { UNSG32 u32[1]; + struct { + struct w32IOSEL_PRIFS; + }; + } TIOSEL_PRIFS; + typedef union TIOSEL_SECFS + { UNSG32 u32[1]; + struct { + struct w32IOSEL_SECFS; + }; + } TIOSEL_SECFS; + typedef union TIOSEL_MIC1FS + { UNSG32 u32[1]; + struct { + struct w32IOSEL_MIC1FS; + }; + } TIOSEL_MIC1FS; + typedef union TIOSEL_MIC2FS + { UNSG32 u32[1]; + struct { + struct w32IOSEL_MIC2FS; + }; + } TIOSEL_MIC2FS; + typedef union TIOSEL_PDMCLK + { UNSG32 u32[1]; + struct { + struct w32IOSEL_PDMCLK; + }; + } TIOSEL_PDMCLK; + typedef union TIOSEL_PDM + { UNSG32 u32[1]; + struct { + struct w32IOSEL_PDM; + }; + } TIOSEL_PDM; + + /////////////////////////////////////////////////////////// + SIGN32 IOSEL_drvrd(SIE_IOSEL *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 IOSEL_drvwr(SIE_IOSEL *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void IOSEL_reset(SIE_IOSEL *p); + SIGN32 IOSEL_cmp (SIE_IOSEL *p, SIE_IOSEL *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define IOSEL_check(p,pie,pfx,hLOG) IOSEL_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define IOSEL_print(p, pfx,hLOG) IOSEL_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: IOSEL +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE AIO biu (4,4) +/// ### +/// * Audio Input Output Unit Registers +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 P71 +/// $P71 P71 REG +/// ### +/// * Primary Port Registers +/// ### +/// @ 0x0003C (P) +/// # 0x0003C SEC +/// $SEC SEC REG +/// ### +/// * Secondary Port Registers +/// ### +/// @ 0x00050 (P) +/// # 0x00050 HDMI +/// $HDMI HDMI REG +/// ### +/// * HDMI port Registers +/// ### +/// @ 0x00068 (P) +/// # 0x00068 SPDIF +/// $SPDIF SPDIF REG +/// ### +/// * S/PDIF Port Registers +/// ### +/// @ 0x00078 (P) +/// # 0x00078 MIC1 +/// $MIC MIC1 REG +/// @ 0x000C4 (P) +/// # 0x000C4 MIC2 +/// $MIC MIC2 REG +/// ### +/// * Audio input Registers +/// ### +/// @ 0x00110 (P) +/// # 0x00110 IOSEL +/// $IOSEL IOSEL REG +/// ### +/// * Pad output enable control register +/// ### +/// @ 0x00144 IRQENABLE (RW) +/// ### +/// * Interrupt Enable register +/// ### +/// %unsigned 1 PRIIRQ 0x0 +/// ### +/// * Primary Port Interrupt enable: +/// * 0: Not enabled +/// * 1: Enabled +/// ### +/// %unsigned 1 SECIRQ 0x0 +/// ### +/// * Secondary Port Interrupt enable: +/// * 0: Not enabled +/// * 1: Enabled +/// ### +/// %unsigned 1 MIC1IRQ 0x0 +/// %unsigned 1 MIC2IRQ 0x0 +/// ### +/// * MIC Port Interrupt enable: +/// * 0: Not enabled +/// * 1: Enabled +/// ### +/// %unsigned 1 SPDIFIRQ 0x0 +/// ### +/// * S/PDIF Port Interrupt enable: +/// * 0: Not enabled +/// * 1: Enabled +/// ### +/// %unsigned 1 HDMIIRQ 0x0 +/// ### +/// * HD port Interrupt enable: +/// * 0: Not enabled +/// * 1: Enabled +/// ### +/// %unsigned 1 PDMIRQ 0x0 +/// ### +/// * PDM port Interrupt enable: +/// * 0: Not enabled +/// * 1: Enabled +/// ### +/// %% 25 # Stuffing bits... +/// @ 0x00148 IRQSTS (WOC-) +/// ### +/// * Interrupt status register, write 1 to clear. +/// * Interrupt is generated when corresponding data FIFO underflow. For MIC when FIFO overflow. +/// ### +/// %unsigned 1 PRISTS 0x0 +/// ### +/// * Primary port interrupt status: +/// * 0: No interrupt (default) +/// * 1: Interrupt Pending +/// ### +/// %unsigned 1 SECSTS 0x0 +/// ### +/// * Secondary port interrupt status: +/// * 0: No interrupt (default) +/// * 1: Interrupt Pending +/// ### +/// %unsigned 1 MIC1STS 0x0 +/// %unsigned 1 MIC2STS 0x0 +/// ### +/// * MIC port interrupt status: +/// * 0: No interrupt (default) +/// * 1: Interrupt Pending +/// ### +/// %unsigned 1 SPDIFSTS 0x0 +/// ### +/// * S/PDIF port interrupt status: +/// * 0: No interrupt (default) +/// * 1: Interrupt Pending +/// ### +/// %unsigned 1 HDMISTS 0x0 +/// ### +/// * HD port interrupt status: +/// * 0: No interrupt (default) +/// * 1: Interrupt Pending +/// ### +/// %unsigned 1 PDMSTS 0x0 +/// ### +/// * PDM port interrupt status: +/// * 0: No interrupt (default) +/// * 1: Interrupt Pending +/// ### +/// %% 25 # Stuffing bits... +/// @ 0x0014C HDSRC (RW) +/// ### +/// * HBR Audio source selection register +/// ### +/// %unsigned 2 SEL 0x0 +/// ### +/// * Register to indicate number of samples per 64-bit data from DDR. +/// * 00 : HD data (2 samples {2pair of Left & Right} per 64-bit data from DDR) transmitted in 2 LRCK (over 2 channel) +/// * 01: L-PCM data (1 Sample {one pair of Left &Right} per 64-bit data from DDR) transmitted in 1 LRCK (over 2 channel) +/// * 10: HD data (4 samples {4pair of Left & Right } per 128-bit data from DDR) transmitter in 1 LRCK (over 8 channels) +/// ### +/// %% 30 # Stuffing bits... +/// @ 0x00150 ADAC_CLK_CTRL (RW) +/// %unsigned 3 mclkDiv 0x2 +/// : DIV1 0x0 +/// : DIV2 0x1 +/// : DIV4 0x2 +/// : DIV8 0x3 +/// : DIV16 0x4 +/// : DIV32 0x5 +/// : DIV64 0x6 +/// : DIV128 0x7 +/// ### +/// * ADAC MClk divider setting defines the divide ratio between secondary audio MCLK and ADAC MCLK. +/// ### +/// %unsigned 3 pwmclkDiv 0x2 +/// : DIV1 0x0 +/// : DIV2 0x1 +/// : DIV4 0x2 +/// : DIV8 0x3 +/// : DIV16 0x4 +/// : DIV32 0x5 +/// : DIV64 0x6 +/// : DIV128 0x7 +/// ### +/// * ADAC PWMClk divider setting defines the divide ratio between secondary audio MCLK and ADAC PWMCLK. +/// ### +/// %unsigned 1 mclkInv 0x0 +/// : NORMAL 0x0 +/// : INVERTED 0x1 +/// ### +/// * Invert the ADAC MCLK polarity. By default, rising edge is aligned with data, if it is 1, falling edge is aligned with data. +/// ### +/// %unsigned 1 pwmclkInv 0x0 +/// : NORMAL 0x0 +/// : INVERTED 0x1 +/// ### +/// * Invert the ADAC PWMCLK polarity. By default, rising edge is aligned with data, if it is 1, falling edge is aligned with data. +/// ### +/// %unsigned 1 inputSel 0x0 +/// ### +/// * ADAC Input Select Bit +/// * 0: Select Secondary outputs +/// * 1: Select Primary outputs +/// ### +/// %unsigned 2 PWMCLK_SRC_SEL 0x0 +/// ### +/// * ADAC PWMCLK source select bit +/// * This bit selects the ADAC PWM Clock source it can be either Primary MCLK or Secondary MCLK based on these bits. +/// * Bit [1]: Valid Bit +/// * 1 : Bit[0] decides the PWM Clock Source +/// * 0 : Bit[0] does not decide the clock source instead “inputSel†bit just above these bits decides the PWM Clock Source (default) +/// * Bit [0]: PWM Clock Source +/// * 0 : MCLK Secondary (default) +/// * 1 : MCLK Primary +/// ### +/// %unsigned 1 PRIMCLK_OUT_SRC_SEL 0x0 +/// ### +/// * This bits selects the source of the MCLK out on the DV0_FID pin +/// * 0: Primary MCLK (Default) +/// * 1: Secondary MCLK +/// ### +/// %% 20 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 340B, bits: 1277b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_AIO +#define h_AIO (){} + + #define RA_AIO_P71 0x0000 + /////////////////////////////////////////////////////////// + #define RA_AIO_SEC 0x003C + /////////////////////////////////////////////////////////// + #define RA_AIO_HDMI 0x0050 + /////////////////////////////////////////////////////////// + #define RA_AIO_SPDIF 0x0068 + /////////////////////////////////////////////////////////// + #define RA_AIO_MIC1 0x0078 + /////////////////////////////////////////////////////////// + #define RA_AIO_MIC2 0x00C4 + /////////////////////////////////////////////////////////// + #define RA_AIO_IOSEL 0x0110 + /////////////////////////////////////////////////////////// + #define RA_AIO_IRQENABLE 0x0144 + + #define BA_AIO_IRQENABLE_PRIIRQ 0x0144 + #define B16AIO_IRQENABLE_PRIIRQ 0x0144 + #define LSb32AIO_IRQENABLE_PRIIRQ 0 + #define LSb16AIO_IRQENABLE_PRIIRQ 0 + #define bAIO_IRQENABLE_PRIIRQ 1 + #define MSK32AIO_IRQENABLE_PRIIRQ 0x00000001 + + #define BA_AIO_IRQENABLE_SECIRQ 0x0144 + #define B16AIO_IRQENABLE_SECIRQ 0x0144 + #define LSb32AIO_IRQENABLE_SECIRQ 1 + #define LSb16AIO_IRQENABLE_SECIRQ 1 + #define bAIO_IRQENABLE_SECIRQ 1 + #define MSK32AIO_IRQENABLE_SECIRQ 0x00000002 + + #define BA_AIO_IRQENABLE_MIC1IRQ 0x0144 + #define B16AIO_IRQENABLE_MIC1IRQ 0x0144 + #define LSb32AIO_IRQENABLE_MIC1IRQ 2 + #define LSb16AIO_IRQENABLE_MIC1IRQ 2 + #define bAIO_IRQENABLE_MIC1IRQ 1 + #define MSK32AIO_IRQENABLE_MIC1IRQ 0x00000004 + + #define BA_AIO_IRQENABLE_MIC2IRQ 0x0144 + #define B16AIO_IRQENABLE_MIC2IRQ 0x0144 + #define LSb32AIO_IRQENABLE_MIC2IRQ 3 + #define LSb16AIO_IRQENABLE_MIC2IRQ 3 + #define bAIO_IRQENABLE_MIC2IRQ 1 + #define MSK32AIO_IRQENABLE_MIC2IRQ 0x00000008 + + #define BA_AIO_IRQENABLE_SPDIFIRQ 0x0144 + #define B16AIO_IRQENABLE_SPDIFIRQ 0x0144 + #define LSb32AIO_IRQENABLE_SPDIFIRQ 4 + #define LSb16AIO_IRQENABLE_SPDIFIRQ 4 + #define bAIO_IRQENABLE_SPDIFIRQ 1 + #define MSK32AIO_IRQENABLE_SPDIFIRQ 0x00000010 + + #define BA_AIO_IRQENABLE_HDMIIRQ 0x0144 + #define B16AIO_IRQENABLE_HDMIIRQ 0x0144 + #define LSb32AIO_IRQENABLE_HDMIIRQ 5 + #define LSb16AIO_IRQENABLE_HDMIIRQ 5 + #define bAIO_IRQENABLE_HDMIIRQ 1 + #define MSK32AIO_IRQENABLE_HDMIIRQ 0x00000020 + + #define BA_AIO_IRQENABLE_PDMIRQ 0x0144 + #define B16AIO_IRQENABLE_PDMIRQ 0x0144 + #define LSb32AIO_IRQENABLE_PDMIRQ 6 + #define LSb16AIO_IRQENABLE_PDMIRQ 6 + #define bAIO_IRQENABLE_PDMIRQ 1 + #define MSK32AIO_IRQENABLE_PDMIRQ 0x00000040 + /////////////////////////////////////////////////////////// + #define RA_AIO_IRQSTS 0x0148 + + #define BA_AIO_IRQSTS_PRISTS 0x0148 + #define B16AIO_IRQSTS_PRISTS 0x0148 + #define LSb32AIO_IRQSTS_PRISTS 0 + #define LSb16AIO_IRQSTS_PRISTS 0 + #define bAIO_IRQSTS_PRISTS 1 + #define MSK32AIO_IRQSTS_PRISTS 0x00000001 + + #define BA_AIO_IRQSTS_SECSTS 0x0148 + #define B16AIO_IRQSTS_SECSTS 0x0148 + #define LSb32AIO_IRQSTS_SECSTS 1 + #define LSb16AIO_IRQSTS_SECSTS 1 + #define bAIO_IRQSTS_SECSTS 1 + #define MSK32AIO_IRQSTS_SECSTS 0x00000002 + + #define BA_AIO_IRQSTS_MIC1STS 0x0148 + #define B16AIO_IRQSTS_MIC1STS 0x0148 + #define LSb32AIO_IRQSTS_MIC1STS 2 + #define LSb16AIO_IRQSTS_MIC1STS 2 + #define bAIO_IRQSTS_MIC1STS 1 + #define MSK32AIO_IRQSTS_MIC1STS 0x00000004 + + #define BA_AIO_IRQSTS_MIC2STS 0x0148 + #define B16AIO_IRQSTS_MIC2STS 0x0148 + #define LSb32AIO_IRQSTS_MIC2STS 3 + #define LSb16AIO_IRQSTS_MIC2STS 3 + #define bAIO_IRQSTS_MIC2STS 1 + #define MSK32AIO_IRQSTS_MIC2STS 0x00000008 + + #define BA_AIO_IRQSTS_SPDIFSTS 0x0148 + #define B16AIO_IRQSTS_SPDIFSTS 0x0148 + #define LSb32AIO_IRQSTS_SPDIFSTS 4 + #define LSb16AIO_IRQSTS_SPDIFSTS 4 + #define bAIO_IRQSTS_SPDIFSTS 1 + #define MSK32AIO_IRQSTS_SPDIFSTS 0x00000010 + + #define BA_AIO_IRQSTS_HDMISTS 0x0148 + #define B16AIO_IRQSTS_HDMISTS 0x0148 + #define LSb32AIO_IRQSTS_HDMISTS 5 + #define LSb16AIO_IRQSTS_HDMISTS 5 + #define bAIO_IRQSTS_HDMISTS 1 + #define MSK32AIO_IRQSTS_HDMISTS 0x00000020 + + #define BA_AIO_IRQSTS_PDMSTS 0x0148 + #define B16AIO_IRQSTS_PDMSTS 0x0148 + #define LSb32AIO_IRQSTS_PDMSTS 6 + #define LSb16AIO_IRQSTS_PDMSTS 6 + #define bAIO_IRQSTS_PDMSTS 1 + #define MSK32AIO_IRQSTS_PDMSTS 0x00000040 + /////////////////////////////////////////////////////////// + #define RA_AIO_HDSRC 0x014C + + #define BA_AIO_HDSRC_SEL 0x014C + #define B16AIO_HDSRC_SEL 0x014C + #define LSb32AIO_HDSRC_SEL 0 + #define LSb16AIO_HDSRC_SEL 0 + #define bAIO_HDSRC_SEL 2 + #define MSK32AIO_HDSRC_SEL 0x00000003 + /////////////////////////////////////////////////////////// + #define RA_AIO_ADAC_CLK_CTRL 0x0150 + + #define BA_AIO_ADAC_CLK_CTRL_mclkDiv 0x0150 + #define B16AIO_ADAC_CLK_CTRL_mclkDiv 0x0150 + #define LSb32AIO_ADAC_CLK_CTRL_mclkDiv 0 + #define LSb16AIO_ADAC_CLK_CTRL_mclkDiv 0 + #define bAIO_ADAC_CLK_CTRL_mclkDiv 3 + #define MSK32AIO_ADAC_CLK_CTRL_mclkDiv 0x00000007 + #define AIO_ADAC_CLK_CTRL_mclkDiv_DIV1 0x0 + #define AIO_ADAC_CLK_CTRL_mclkDiv_DIV2 0x1 + #define AIO_ADAC_CLK_CTRL_mclkDiv_DIV4 0x2 + #define AIO_ADAC_CLK_CTRL_mclkDiv_DIV8 0x3 + #define AIO_ADAC_CLK_CTRL_mclkDiv_DIV16 0x4 + #define AIO_ADAC_CLK_CTRL_mclkDiv_DIV32 0x5 + #define AIO_ADAC_CLK_CTRL_mclkDiv_DIV64 0x6 + #define AIO_ADAC_CLK_CTRL_mclkDiv_DIV128 0x7 + + #define BA_AIO_ADAC_CLK_CTRL_pwmclkDiv 0x0150 + #define B16AIO_ADAC_CLK_CTRL_pwmclkDiv 0x0150 + #define LSb32AIO_ADAC_CLK_CTRL_pwmclkDiv 3 + #define LSb16AIO_ADAC_CLK_CTRL_pwmclkDiv 3 + #define bAIO_ADAC_CLK_CTRL_pwmclkDiv 3 + #define MSK32AIO_ADAC_CLK_CTRL_pwmclkDiv 0x00000038 + #define AIO_ADAC_CLK_CTRL_pwmclkDiv_DIV1 0x0 + #define AIO_ADAC_CLK_CTRL_pwmclkDiv_DIV2 0x1 + #define AIO_ADAC_CLK_CTRL_pwmclkDiv_DIV4 0x2 + #define AIO_ADAC_CLK_CTRL_pwmclkDiv_DIV8 0x3 + #define AIO_ADAC_CLK_CTRL_pwmclkDiv_DIV16 0x4 + #define AIO_ADAC_CLK_CTRL_pwmclkDiv_DIV32 0x5 + #define AIO_ADAC_CLK_CTRL_pwmclkDiv_DIV64 0x6 + #define AIO_ADAC_CLK_CTRL_pwmclkDiv_DIV128 0x7 + + #define BA_AIO_ADAC_CLK_CTRL_mclkInv 0x0150 + #define B16AIO_ADAC_CLK_CTRL_mclkInv 0x0150 + #define LSb32AIO_ADAC_CLK_CTRL_mclkInv 6 + #define LSb16AIO_ADAC_CLK_CTRL_mclkInv 6 + #define bAIO_ADAC_CLK_CTRL_mclkInv 1 + #define MSK32AIO_ADAC_CLK_CTRL_mclkInv 0x00000040 + #define AIO_ADAC_CLK_CTRL_mclkInv_NORMAL 0x0 + #define AIO_ADAC_CLK_CTRL_mclkInv_INVERTED 0x1 + + #define BA_AIO_ADAC_CLK_CTRL_pwmclkInv 0x0150 + #define B16AIO_ADAC_CLK_CTRL_pwmclkInv 0x0150 + #define LSb32AIO_ADAC_CLK_CTRL_pwmclkInv 7 + #define LSb16AIO_ADAC_CLK_CTRL_pwmclkInv 7 + #define bAIO_ADAC_CLK_CTRL_pwmclkInv 1 + #define MSK32AIO_ADAC_CLK_CTRL_pwmclkInv 0x00000080 + #define AIO_ADAC_CLK_CTRL_pwmclkInv_NORMAL 0x0 + #define AIO_ADAC_CLK_CTRL_pwmclkInv_INVERTED 0x1 + + #define BA_AIO_ADAC_CLK_CTRL_inputSel 0x0151 + #define B16AIO_ADAC_CLK_CTRL_inputSel 0x0150 + #define LSb32AIO_ADAC_CLK_CTRL_inputSel 8 + #define LSb16AIO_ADAC_CLK_CTRL_inputSel 8 + #define bAIO_ADAC_CLK_CTRL_inputSel 1 + #define MSK32AIO_ADAC_CLK_CTRL_inputSel 0x00000100 + + #define BA_AIO_ADAC_CLK_CTRL_PWMCLK_SRC_SEL 0x0151 + #define B16AIO_ADAC_CLK_CTRL_PWMCLK_SRC_SEL 0x0150 + #define LSb32AIO_ADAC_CLK_CTRL_PWMCLK_SRC_SEL 9 + #define LSb16AIO_ADAC_CLK_CTRL_PWMCLK_SRC_SEL 9 + #define bAIO_ADAC_CLK_CTRL_PWMCLK_SRC_SEL 2 + #define MSK32AIO_ADAC_CLK_CTRL_PWMCLK_SRC_SEL 0x00000600 + + #define BA_AIO_ADAC_CLK_CTRL_PRIMCLK_OUT_SRC_SEL 0x0151 + #define B16AIO_ADAC_CLK_CTRL_PRIMCLK_OUT_SRC_SEL 0x0150 + #define LSb32AIO_ADAC_CLK_CTRL_PRIMCLK_OUT_SRC_SEL 11 + #define LSb16AIO_ADAC_CLK_CTRL_PRIMCLK_OUT_SRC_SEL 11 + #define bAIO_ADAC_CLK_CTRL_PRIMCLK_OUT_SRC_SEL 1 + #define MSK32AIO_ADAC_CLK_CTRL_PRIMCLK_OUT_SRC_SEL 0x00000800 + /////////////////////////////////////////////////////////// + + typedef struct SIE_AIO { + /////////////////////////////////////////////////////////// + SIE_P71 ie_P71; + /////////////////////////////////////////////////////////// + SIE_SEC ie_SEC; + /////////////////////////////////////////////////////////// + SIE_HDMI ie_HDMI; + /////////////////////////////////////////////////////////// + SIE_SPDIF ie_SPDIF; + /////////////////////////////////////////////////////////// + SIE_MIC ie_MIC1; + /////////////////////////////////////////////////////////// + SIE_MIC ie_MIC2; + /////////////////////////////////////////////////////////// + SIE_IOSEL ie_IOSEL; + /////////////////////////////////////////////////////////// + #define GET32AIO_IRQENABLE_PRIIRQ(r32) _BFGET_(r32, 0, 0) + #define SET32AIO_IRQENABLE_PRIIRQ(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16AIO_IRQENABLE_PRIIRQ(r16) _BFGET_(r16, 0, 0) + #define SET16AIO_IRQENABLE_PRIIRQ(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AIO_IRQENABLE_SECIRQ(r32) _BFGET_(r32, 1, 1) + #define SET32AIO_IRQENABLE_SECIRQ(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16AIO_IRQENABLE_SECIRQ(r16) _BFGET_(r16, 1, 1) + #define SET16AIO_IRQENABLE_SECIRQ(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AIO_IRQENABLE_MIC1IRQ(r32) _BFGET_(r32, 2, 2) + #define SET32AIO_IRQENABLE_MIC1IRQ(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16AIO_IRQENABLE_MIC1IRQ(r16) _BFGET_(r16, 2, 2) + #define SET16AIO_IRQENABLE_MIC1IRQ(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32AIO_IRQENABLE_MIC2IRQ(r32) _BFGET_(r32, 3, 3) + #define SET32AIO_IRQENABLE_MIC2IRQ(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16AIO_IRQENABLE_MIC2IRQ(r16) _BFGET_(r16, 3, 3) + #define SET16AIO_IRQENABLE_MIC2IRQ(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32AIO_IRQENABLE_SPDIFIRQ(r32) _BFGET_(r32, 4, 4) + #define SET32AIO_IRQENABLE_SPDIFIRQ(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16AIO_IRQENABLE_SPDIFIRQ(r16) _BFGET_(r16, 4, 4) + #define SET16AIO_IRQENABLE_SPDIFIRQ(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32AIO_IRQENABLE_HDMIIRQ(r32) _BFGET_(r32, 5, 5) + #define SET32AIO_IRQENABLE_HDMIIRQ(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16AIO_IRQENABLE_HDMIIRQ(r16) _BFGET_(r16, 5, 5) + #define SET16AIO_IRQENABLE_HDMIIRQ(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32AIO_IRQENABLE_PDMIRQ(r32) _BFGET_(r32, 6, 6) + #define SET32AIO_IRQENABLE_PDMIRQ(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16AIO_IRQENABLE_PDMIRQ(r16) _BFGET_(r16, 6, 6) + #define SET16AIO_IRQENABLE_PDMIRQ(r16,v) _BFSET_(r16, 6, 6,v) + + #define w32AIO_IRQENABLE {\ + UNSG32 uIRQENABLE_PRIIRQ : 1;\ + UNSG32 uIRQENABLE_SECIRQ : 1;\ + UNSG32 uIRQENABLE_MIC1IRQ : 1;\ + UNSG32 uIRQENABLE_MIC2IRQ : 1;\ + UNSG32 uIRQENABLE_SPDIFIRQ : 1;\ + UNSG32 uIRQENABLE_HDMIIRQ : 1;\ + UNSG32 uIRQENABLE_PDMIRQ : 1;\ + UNSG32 RSVDx144_b7 : 25;\ + } + union { UNSG32 u32AIO_IRQENABLE; + struct w32AIO_IRQENABLE; + }; + /////////////////////////////////////////////////////////// + #define GET32AIO_IRQSTS_PRISTS(r32) _BFGET_(r32, 0, 0) + #define SET32AIO_IRQSTS_PRISTS(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16AIO_IRQSTS_PRISTS(r16) _BFGET_(r16, 0, 0) + #define SET16AIO_IRQSTS_PRISTS(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32AIO_IRQSTS_SECSTS(r32) _BFGET_(r32, 1, 1) + #define SET32AIO_IRQSTS_SECSTS(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16AIO_IRQSTS_SECSTS(r16) _BFGET_(r16, 1, 1) + #define SET16AIO_IRQSTS_SECSTS(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32AIO_IRQSTS_MIC1STS(r32) _BFGET_(r32, 2, 2) + #define SET32AIO_IRQSTS_MIC1STS(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16AIO_IRQSTS_MIC1STS(r16) _BFGET_(r16, 2, 2) + #define SET16AIO_IRQSTS_MIC1STS(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32AIO_IRQSTS_MIC2STS(r32) _BFGET_(r32, 3, 3) + #define SET32AIO_IRQSTS_MIC2STS(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16AIO_IRQSTS_MIC2STS(r16) _BFGET_(r16, 3, 3) + #define SET16AIO_IRQSTS_MIC2STS(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32AIO_IRQSTS_SPDIFSTS(r32) _BFGET_(r32, 4, 4) + #define SET32AIO_IRQSTS_SPDIFSTS(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16AIO_IRQSTS_SPDIFSTS(r16) _BFGET_(r16, 4, 4) + #define SET16AIO_IRQSTS_SPDIFSTS(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32AIO_IRQSTS_HDMISTS(r32) _BFGET_(r32, 5, 5) + #define SET32AIO_IRQSTS_HDMISTS(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16AIO_IRQSTS_HDMISTS(r16) _BFGET_(r16, 5, 5) + #define SET16AIO_IRQSTS_HDMISTS(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32AIO_IRQSTS_PDMSTS(r32) _BFGET_(r32, 6, 6) + #define SET32AIO_IRQSTS_PDMSTS(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16AIO_IRQSTS_PDMSTS(r16) _BFGET_(r16, 6, 6) + #define SET16AIO_IRQSTS_PDMSTS(r16,v) _BFSET_(r16, 6, 6,v) + + #define w32AIO_IRQSTS {\ + UNSG32 uIRQSTS_PRISTS : 1;\ + UNSG32 uIRQSTS_SECSTS : 1;\ + UNSG32 uIRQSTS_MIC1STS : 1;\ + UNSG32 uIRQSTS_MIC2STS : 1;\ + UNSG32 uIRQSTS_SPDIFSTS : 1;\ + UNSG32 uIRQSTS_HDMISTS : 1;\ + UNSG32 uIRQSTS_PDMSTS : 1;\ + UNSG32 RSVDx148_b7 : 25;\ + } + union { UNSG32 u32AIO_IRQSTS; + struct w32AIO_IRQSTS; + }; + /////////////////////////////////////////////////////////// + #define GET32AIO_HDSRC_SEL(r32) _BFGET_(r32, 1, 0) + #define SET32AIO_HDSRC_SEL(r32,v) _BFSET_(r32, 1, 0,v) + #define GET16AIO_HDSRC_SEL(r16) _BFGET_(r16, 1, 0) + #define SET16AIO_HDSRC_SEL(r16,v) _BFSET_(r16, 1, 0,v) + + #define w32AIO_HDSRC {\ + UNSG32 uHDSRC_SEL : 2;\ + UNSG32 RSVDx14C_b2 : 30;\ + } + union { UNSG32 u32AIO_HDSRC; + struct w32AIO_HDSRC; + }; + /////////////////////////////////////////////////////////// + #define GET32AIO_ADAC_CLK_CTRL_mclkDiv(r32) _BFGET_(r32, 2, 0) + #define SET32AIO_ADAC_CLK_CTRL_mclkDiv(r32,v) _BFSET_(r32, 2, 0,v) + #define GET16AIO_ADAC_CLK_CTRL_mclkDiv(r16) _BFGET_(r16, 2, 0) + #define SET16AIO_ADAC_CLK_CTRL_mclkDiv(r16,v) _BFSET_(r16, 2, 0,v) + + #define GET32AIO_ADAC_CLK_CTRL_pwmclkDiv(r32) _BFGET_(r32, 5, 3) + #define SET32AIO_ADAC_CLK_CTRL_pwmclkDiv(r32,v) _BFSET_(r32, 5, 3,v) + #define GET16AIO_ADAC_CLK_CTRL_pwmclkDiv(r16) _BFGET_(r16, 5, 3) + #define SET16AIO_ADAC_CLK_CTRL_pwmclkDiv(r16,v) _BFSET_(r16, 5, 3,v) + + #define GET32AIO_ADAC_CLK_CTRL_mclkInv(r32) _BFGET_(r32, 6, 6) + #define SET32AIO_ADAC_CLK_CTRL_mclkInv(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16AIO_ADAC_CLK_CTRL_mclkInv(r16) _BFGET_(r16, 6, 6) + #define SET16AIO_ADAC_CLK_CTRL_mclkInv(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32AIO_ADAC_CLK_CTRL_pwmclkInv(r32) _BFGET_(r32, 7, 7) + #define SET32AIO_ADAC_CLK_CTRL_pwmclkInv(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16AIO_ADAC_CLK_CTRL_pwmclkInv(r16) _BFGET_(r16, 7, 7) + #define SET16AIO_ADAC_CLK_CTRL_pwmclkInv(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32AIO_ADAC_CLK_CTRL_inputSel(r32) _BFGET_(r32, 8, 8) + #define SET32AIO_ADAC_CLK_CTRL_inputSel(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16AIO_ADAC_CLK_CTRL_inputSel(r16) _BFGET_(r16, 8, 8) + #define SET16AIO_ADAC_CLK_CTRL_inputSel(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32AIO_ADAC_CLK_CTRL_PWMCLK_SRC_SEL(r32) _BFGET_(r32,10, 9) + #define SET32AIO_ADAC_CLK_CTRL_PWMCLK_SRC_SEL(r32,v) _BFSET_(r32,10, 9,v) + #define GET16AIO_ADAC_CLK_CTRL_PWMCLK_SRC_SEL(r16) _BFGET_(r16,10, 9) + #define SET16AIO_ADAC_CLK_CTRL_PWMCLK_SRC_SEL(r16,v) _BFSET_(r16,10, 9,v) + + #define GET32AIO_ADAC_CLK_CTRL_PRIMCLK_OUT_SRC_SEL(r32) _BFGET_(r32,11,11) + #define SET32AIO_ADAC_CLK_CTRL_PRIMCLK_OUT_SRC_SEL(r32,v) _BFSET_(r32,11,11,v) + #define GET16AIO_ADAC_CLK_CTRL_PRIMCLK_OUT_SRC_SEL(r16) _BFGET_(r16,11,11) + #define SET16AIO_ADAC_CLK_CTRL_PRIMCLK_OUT_SRC_SEL(r16,v) _BFSET_(r16,11,11,v) + + #define w32AIO_ADAC_CLK_CTRL {\ + UNSG32 uADAC_CLK_CTRL_mclkDiv : 3;\ + UNSG32 uADAC_CLK_CTRL_pwmclkDiv : 3;\ + UNSG32 uADAC_CLK_CTRL_mclkInv : 1;\ + UNSG32 uADAC_CLK_CTRL_pwmclkInv : 1;\ + UNSG32 uADAC_CLK_CTRL_inputSel : 1;\ + UNSG32 uADAC_CLK_CTRL_PWMCLK_SRC_SEL : 2;\ + UNSG32 uADAC_CLK_CTRL_PRIMCLK_OUT_SRC_SEL : 1;\ + UNSG32 RSVDx150_b12 : 20;\ + } + union { UNSG32 u32AIO_ADAC_CLK_CTRL; + struct w32AIO_ADAC_CLK_CTRL; + }; + /////////////////////////////////////////////////////////// + } SIE_AIO; + + typedef union T32AIO_IRQENABLE + { UNSG32 u32; + struct w32AIO_IRQENABLE; + } T32AIO_IRQENABLE; + typedef union T32AIO_IRQSTS + { UNSG32 u32; + struct w32AIO_IRQSTS; + } T32AIO_IRQSTS; + typedef union T32AIO_HDSRC + { UNSG32 u32; + struct w32AIO_HDSRC; + } T32AIO_HDSRC; + typedef union T32AIO_ADAC_CLK_CTRL + { UNSG32 u32; + struct w32AIO_ADAC_CLK_CTRL; + } T32AIO_ADAC_CLK_CTRL; + /////////////////////////////////////////////////////////// + + typedef union TAIO_IRQENABLE + { UNSG32 u32[1]; + struct { + struct w32AIO_IRQENABLE; + }; + } TAIO_IRQENABLE; + typedef union TAIO_IRQSTS + { UNSG32 u32[1]; + struct { + struct w32AIO_IRQSTS; + }; + } TAIO_IRQSTS; + typedef union TAIO_HDSRC + { UNSG32 u32[1]; + struct { + struct w32AIO_HDSRC; + }; + } TAIO_HDSRC; + typedef union TAIO_ADAC_CLK_CTRL + { UNSG32 u32[1]; + struct { + struct w32AIO_ADAC_CLK_CTRL; + }; + } TAIO_ADAC_CLK_CTRL; + + /////////////////////////////////////////////////////////// + SIGN32 AIO_drvrd(SIE_AIO *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 AIO_drvwr(SIE_AIO *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void AIO_reset(SIE_AIO *p); + SIGN32 AIO_cmp (SIE_AIO *p, SIE_AIO *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define AIO_check(p,pie,pfx,hLOG) AIO_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define AIO_print(p, pfx,hLOG) AIO_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: AIO +//////////////////////////////////////////////////////////// + + + +#ifdef __cplusplus + } +#endif +#pragma pack() + +#endif +////// +/// ENDOFFILE: aio.h +//////////////////////////////////////////////////////////// diff --git a/sound/soc/berlin/api_aio.h b/sound/soc/berlin/api_aio.h new file mode 100644 index 00000000..31c5327c --- /dev/null +++ b/sound/soc/berlin/api_aio.h @@ -0,0 +1,102 @@ +/************************************************************************************ +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +*************************************************************************************/ +#ifndef __AIO_API_H__ +#define __AIO_API_H__ + +#include "aio.h" + +#define AIO_P71 0 // primary audio +#define AIO_SEC 1 // secondary audio +#define AIO_MIC 2 // mic input +#define AIO_SPDIF 3 +#define AIO_HDMI 4 // HDMI audio + +#define AIO_TSD0 0 +#define AIO_TSD1 1 +#define AIO_TSD2 2 +#define AIO_TSD3 3 + +#define AIO_DIV1 PRIAUD_CLKDIV_SETTING_DIV1 +#define AIO_DIV2 PRIAUD_CLKDIV_SETTING_DIV2 +#define AIO_DIV4 PRIAUD_CLKDIV_SETTING_DIV4 +#define AIO_DIV8 PRIAUD_CLKDIV_SETTING_DIV8 +#define AIO_DIV16 PRIAUD_CLKDIV_SETTING_DIV16 +#define AIO_DIV32 PRIAUD_CLKDIV_SETTING_DIV32 +#define AIO_DIV64 PRIAUD_CLKDIV_SETTING_DIV64 +#define AIO_DIV128 PRIAUD_CLKDIV_SETTING_DIV128 + +#define AIO_JISTIFIED_MODE PRIAUD_CTRL_TFM_JUSTIFIED +#define AIO_I2S_MODE PRIAUD_CTRL_TFM_I2S + +#define AIO_16DFM PRIAUD_CTRL_TDM_16DFM +#define AIO_18DFM PRIAUD_CTRL_TDM_18DFM +#define AIO_20DFM PRIAUD_CTRL_TDM_20DFM +#define AIO_24DFM PRIAUD_CTRL_TDM_24DFM +#define AIO_32DFM PRIAUD_CTRL_TDM_32DFM + +#define AIO_16CFM PRIAUD_CTRL_TCF_16CFM +#define AIO_24CFM PRIAUD_CTRL_TCF_24CFM +#define AIO_32CFM PRIAUD_CTRL_TCF_32CFM + +/******************************************************************************* +* Function: AIO_SetCtl(UNSG32 id, UNSG32 data_fmt, UNSG32 width_word, UNSG32 width_sample) +* Description: Configure Audio output format +* Inputs: id -- audio port +* data_fmt -- output data format +* width_word -- clock cycles +* width_sample -- data cycles +* Outputs: none +* Return: none +*******************************************************************************/ +void AIO_SetCtl(UNSG32 id, UNSG32 data_fmt, UNSG32 width_word, UNSG32 width_sample); + +/******************************************************************************* +* Function: AIO_SetClkDiv(UNSG32 id, UNSG32 div) +* Description: Config Audio output clock +* Inputs: id -- audio port +* div -- audio clock divider +* Outputs: none +* Return: none +*******************************************************************************/ +void AIO_SetClkDiv(UNSG32 id, UNSG32 div); + +/******************************************************************************* +* Function: AIO_SetAudChEn(UNSG32 id, UNSG32 tsd, UNSG32 enable) +* Description: Enable/Disable Audio Output Channels +* Inputs: id -- audio port +* tsd -- audio channel pair +* enable -- enable/disable TSD group +* Outputs: none +* Return: none +*******************************************************************************/ +void AIO_SetAudChEn(UNSG32 id, UNSG32 tsd, UNSG32 enable); + +/******************************************************************************* +* Function: AIO_SetAudChMute(UNSG32 id, UNSG32 tsd, UNSG32 mute) +* Description: Mute/Unmute Audio Output Channels +* Inputs: id -- audio port +* tsd -- audio channel pair +* mute -- mute/unmute TSD group. +* Outputs: none +* Return: none +*******************************************************************************/ +void AIO_SetAudChMute(UNSG32 id, UNSG32 tsd, UNSG32 mute); + +#endif diff --git a/sound/soc/berlin/api_avio_dhub.h b/sound/soc/berlin/api_avio_dhub.h new file mode 100644 index 00000000..d479fd36 --- /dev/null +++ b/sound/soc/berlin/api_avio_dhub.h @@ -0,0 +1,79 @@ +/******************************************************************************* +* Copyright (C) Marvell International Ltd. and its affiliates +* +* Marvell GPL License Option +* +* If you received this File from Marvell, you may opt to use, redistribute and/or +* modify this File in accordance with the terms and conditions of the General +* Public License Version 2, June 1991 (the GPL License), a copy of which is +* available along with the File in the license.txt file or by writing to the Free +* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or +* on the worldwide web at http://www.gnu.org/licenses/gpl.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED +* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY +* DISCLAIMED. The GPL License provides additional details about this warranty +* disclaimer. +* +********************************************************************************/ +#ifndef __API_AVIO_DHUB_H__ +#define __API_AVIO_DHUB_H__ + +#include "dHub.h" +#include "avioDhub.h" +#include "api_dhub.h" + +#define AG_DHUB_BASE (MEMMAP_AG_DHUB_REG_BASE + RA_agDhub_dHub0) +#define AG_HBO_SRAM_BASE (MEMMAP_AG_DHUB_REG_BASE + RA_agDhub_tcm0) +#define AG_NUM_OF_CHANNELS_A0 (avioDhubChMap_ag_GFX_R_A0+1) +//#define AG_NUM_OF_CHANNELS_A0 (1) + + +#define AG_DHUB_BANK0_START_ADDR (0) +#define AG_DHUB_BANK1_START_ADDR (4096*1) +#define AG_DHUB_BANK2_START_ADDR (4096*3) + +typedef struct DHUB_channel_config { + SIGN32 chanId; + UNSG32 chanCmdBase; + UNSG32 chanDataBase; + SIGN32 chanCmdSize; + SIGN32 chanDataSize; + SIGN32 chanMtuSize; + SIGN32 chanQos; + SIGN32 chanSelfLoop; + SIGN32 chanEnable; +} DHUB_channel_config; + +extern HDL_dhub2d AG_dhubHandle; + +extern DHUB_channel_config AG_config[]; + +/****************************************************************************************************************** + * Function: DhubInitialization + * Description: Initialize DHUB . + * Parameter : cpuId ------------- cpu ID + * dHubBaseAddr ------------- dHub Base address. + * hboSramAddr ----- Sram Address for HBO. + * pdhubHandle ----- pointer to 2D dhubHandle + * dhub_config ----- configuration of AG + * numOfChans ----- number of channels + * Return: void +******************************************************************************************************************/ +void DhubInitialization(SIGN32 cpuId, UNSG32 dHubBaseAddr, UNSG32 hboSramAddr, + HDL_dhub2d *pdhubHandle, DHUB_channel_config *dhub_config, + SIGN32 numOfChans); + +/****************************************************************************************************************** + * Function: DhubEnableIntr + * Description: Initialize interrupt for DHUB channel. + * Parameter : + * cpuId ----- cpu ID + * pdhubHandle ----- pointer to 2D dhubHandle + * chanId ----- channel ID + * enable ----- 1=enable;0=disable + * Return: void +******************************************************************************************************************/ +void DhubEnableIntr(SIGN32 cpuId, HDL_dhub2d *pdhubHandle, + SIGN32 chanId, SIGN32 enable); +#endif //__API_AVIO_DHUB_H__ diff --git a/sound/soc/berlin/api_avpll.h b/sound/soc/berlin/api_avpll.h new file mode 100644 index 00000000..e96f3904 --- /dev/null +++ b/sound/soc/berlin/api_avpll.h @@ -0,0 +1,26 @@ +/************************************************************************************* +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +***************************************************************************************/ + +#ifndef __API_AVPLL__ +#define __API_AVPLL__ + +int AVPLL_Set(int grpId, int chanId, unsigned int avFreq); + +#endif diff --git a/sound/soc/berlin/api_dhub.h b/sound/soc/berlin/api_dhub.h new file mode 100644 index 00000000..c9695a16 --- /dev/null +++ b/sound/soc/berlin/api_dhub.h @@ -0,0 +1,789 @@ +/*********************************************************************************** +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +*************************************************************************************/ + +#ifndef DHUB_API +#define DHUB_API " DHUB_API >>> " +/** DHUB_API + */ + +#include "ctypes.h" + +typedef struct HDL_semaphore { +UNSG32 ra; /*! Base address of $SemaHub !*/ +SIGN32 depth[32]; /*! Array of semaphore (virtual FIFO) depth !*/ +} HDL_semaphore; + +typedef struct HDL_hbo { +UNSG32 mem; /*! Base address of HBO SRAM !*/ +UNSG32 ra; /*! Base address of $HBO !*/ +HDL_semaphore fifoCtl; /*! Handle of HBO.FiFoCtl !*/ +UNSG32 base[32]; /*! Array of HBO queue base address !*/ +} HDL_hbo; + +typedef struct HDL_dhub { +UNSG32 ra; /*! Base address of $dHub !*/ +HDL_semaphore semaHub; /*! Handle of dHub.SemaHub !*/ +HDL_hbo hbo; /*! Handle of dHub.HBO !*/ +SIGN32 MTUb[16]; /*! Array of dHub channel MTU size bits !*/ +} HDL_dhub; + +typedef struct HDL_dhub2d { +UNSG32 ra; /*! Base address of $dHub2D !*/ +HDL_dhub dhub; /*! Handle of dHub2D.dHub !*/ +} HDL_dhub2d; + + +#ifdef __cplusplus + extern "C" + { +#endif + +/** SECTION - handle of local contexts + */ +extern UNSG32 sizeof_hdl_semaphore; /*! sizeof(HDL_semaphore) !*/ +extern UNSG32 sizeof_hdl_hbo; /*! sizeof(HDL_hbo) !*/ +extern UNSG32 sizeof_hdl_dhub; /*! sizeof(HDL_dhub) !*/ +extern UNSG32 sizeof_hdl_dhub2d; /*! sizeof(HDL_dhub2d) !*/ + +/** ENDOFSECTION + */ + + + +/** SECTION - API definitions for $SemaHub + */ +/******************************************************************************************** +* Function: semaphore_hdl +* Description: Initialize HDL_semaphore with a $SemaHub BIU instance. +*********************************************************************************************/ +void semaphore_hdl( + UNSG32 ra, /*! Base address of a BIU instance of $SemaHub !*/ + void *hdl /*! Handle to HDL_semaphore !*/ + ); + +/******************************************************************************************** +* Function: semaphore_cfg +* Description: Configurate a semaphore's depth & reset pointers. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 semaphore_cfg( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 depth, /*! Semaphore (virtual FIFO) depth !*/ + T64b cfgQ[] /*! Pass NULL to directly init SemaHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_intr_enable +* Description: Configurate interrupt enable bits of a semaphore. +*********************************************************************************************/ +void semaphore_intr_enable( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 empty, /*! Interrupt enable for CPU at condition 'empty' !*/ + SIGN32 full, /*! Interrupt enable for CPU at condition 'full' !*/ + SIGN32 almostEmpty, /*! Interrupt enable for CPU at condition 'almostEmpty' !*/ + SIGN32 almostFull, /*! Interrupt enable for CPU at condition 'almostFull' !*/ + SIGN32 cpu /*! CPU ID (0/1/2) !*/ + ); + +/******************************************************************************************** +* Function: semaphore_query +* Description: Query current status (counter & pointer) of a semaphore. +* Return: UNSG32 Current available unit level +*********************************************************************************************/ +UNSG32 semaphore_query( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 master, /*! 0/1 as procuder/consumer query !*/ + UNSG32 *ptr /*! Non-zero to receive semaphore r/w pointer !*/ + ); + +/******************************************************************************************** +* Function: semaphore_push +* Description: Producer semaphore push. +*********************************************************************************************/ +void semaphore_push( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 delta /*! Delta to push as a producer !*/ + ); + +/******************************************************************************************** +* Function: semaphore_push +* Description: Consumer semaphore pop. +*********************************************************************************************/ +void semaphore_pop( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id, /*! Semaphore ID in $SemaHub !*/ + SIGN32 delta /*! Delta to pop as a consumer !*/ + ); + +/******************************************************************************************** +* Function: semaphore_chk_empty +* Description: Check 'empty' status of a semaphore (or all semaphores). +* Return: UNSG32 status bit of given semaphore, or +* status bits of all semaphores if id==-1 +*********************************************************************************************/ +UNSG32 semaphore_chk_empty( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub + -1 to return all 32b of the interrupt status + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_chk_full +* Description: Check 'full' status of a semaphore (or all semaphores). +* Return: UNSG32 status bit of given semaphore, or +* status bits of all semaphores if id==-1 +*********************************************************************************************/ +UNSG32 semaphore_chk_full( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub + -1 to return all 32b of the interrupt status + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_chk_almostEmpty +* Description: Check 'almostEmpty' status of a semaphore (or all semaphores). +* Return: UNSG32 status bit of given semaphore, or +* status bits of all semaphores if id==-1 +*********************************************************************************************/ +UNSG32 semaphore_chk_almostEmpty( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub + -1 to return all 32b of the interrupt status + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_chk_almostFull +* Description: Check 'almostFull' status of a semaphore (or all semaphores). +* Return: UNSG32 status bit of given semaphore, or +* status bits of all semaphores if id==-1 +*********************************************************************************************/ +UNSG32 semaphore_chk_almostFull( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub + -1 to return all 32b of the interrupt status + !*/ + ); + +/******************************************************************************************** +* Function: semaphore_clr_empty +* Description: Clear 'empty' status of a semaphore. +*********************************************************************************************/ +void semaphore_clr_empty( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub !*/ + ); + +/******************************************************************************************** +* Function: semaphore_clr_full +* Description: Clear 'full' status of a semaphore. +*********************************************************************************************/ +void semaphore_clr_full( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub !*/ + ); + +/******************************************************************************************** +* Function: semaphore_clr_almostEmpty +* Description: Clear 'almostEmpty' status of a semaphore. +*********************************************************************************************/ +void semaphore_clr_almostEmpty( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub !*/ + ); + +/******************************************************************************************** +* Function: semaphore_clr_almostFull +* Description: Clear 'almostFull' status of a semaphore. +*********************************************************************************************/ +void semaphore_clr_almostFull( + void *hdl, /*! Handle to HDL_semaphore !*/ + SIGN32 id /*! Semaphore ID in $SemaHub !*/ + ); +/** ENDOFSECTION + */ + + + +/** SECTION - API definitions for $HBO + */ +/******************************************************************************************** +* Function: hbo_hdl +* Description: Initialize HDL_hbo with a $HBO BIU instance. +*********************************************************************************************/ +void hbo_hdl( + UNSG32 mem, /*! Base address of HBO SRAM !*/ + UNSG32 ra, /*! Base address of a BIU instance of $HBO !*/ + void *hdl /*! Handle to HDL_hbo !*/ + ); + +/******************************************************************************************** +* Function: hbo_fifoCtl +* Description: Get HDL_semaphore pointer from a HBO instance. +* Return: void* Handle for HBO.FiFoCtl +*********************************************************************************************/ +void* hbo_fifoCtl(void *hdl /*! Handle to HDL_hbo !*/ + ); + +/******************************************************************************************** +* DEFINITION - convert HBO FIFO control to semaphore control +*********************************************************************************************/ +#define hbo_queue_intr_enable (hdl,id,empty,full,almostEmpty,almostFull,cpu) \ + semaphore_intr_enable (hbo_fifoCtl(hdl),id,empty,full,almostEmpty,almostFull,cpu) + +#define hbo_queue_query(hdl,id,master,ptr) \ + semaphore_query(hbo_fifoCtl(hdl),id,master,ptr) + +#define hbo_queue_push(hdl,id,delta) \ + semaphore_push(hbo_fifoCtl(hdl),id,delta) + +#define hbo_queue_pop(hdl,id,delta) \ + semaphore_pop(hbo_fifoCtl(hdl),id,delta) + +#define hbo_queue_chk_empty(hdl,id) \ + semaphore_chk_empty(hbo_fifoCtl(hdl),id) + +#define hbo_queue_chk_full(hdl,id) \ + semaphore_chk_full(hbo_fifoCtl(hdl),id) + +#define hbo_queue_chk_almostEmpty(hdl,id) \ + semaphore_chk_almostEmpty(hbo_fifoCtl(hdl),id) + +#define hbo_queue_chk_almostFull(hdl,id) \ + semaphore_chk_almostFull(hbo_fifoCtl(hdl),id) + +#define hbo_queue_clr_empty(hdl,id) \ + semaphore_clr_empty(hbo_fifoCtl(hdl),id) + +#define hbo_queue_clr_full(hdl,id) \ + semaphore_clr_full(hbo_fifoCtl(hdl),id) + +#define hbo_queue_clr_almostEmpty (hdl,id) \ + semaphore_clr_almostEmpty(hbo_fifoCtl(hdl),id) + +#define hbo_queue_clr_almostFull(hdl,id) \ + semaphore_clr_almostFull(hbo_fifoCtl(hdl),id) + +/******************************************************************************************** +* Function: hbo_queue_cfg +* Description: Configurate a FIFO's base, depth & reset pointers. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 hbo_queue_cfg( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id, /*! Queue ID in $HBO !*/ + UNSG32 base, /*! Channel FIFO base address (byte address) !*/ + SIGN32 depth, /*! Channel FIFO depth, in 64b word !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init HBO, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_enable +* Description: HBO FIFO enable/disable. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 hbo_queue_enable( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id, /*! Queue ID in $HBO !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init HBO, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_clear +* Description: Issue HBO FIFO clear (will NOT wait for finish). +*********************************************************************************************/ +void hbo_queue_clear( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id /*! Queue ID in $HBO !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_busy +* Description: Read HBO 'BUSY' status for all channel FIFOs. +* Return: UNSG32 'BUSY' status bits of all channels +*********************************************************************************************/ +UNSG32 hbo_queue_busy( + void *hdl /*! Handle to HDL_hbo !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_clear_done +* Description: Wait for a given channel or all channels to be cleared. +*********************************************************************************************/ +void hbo_queue_clear_done( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id /*! Queue ID in $HBO + -1 to wait for all channel clear done + !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_read +* Description: Read a number of 64b data & pop FIFO from HBO SRAM. +* Return: UNSG32 Number of 64b data being read (=n), or (when cfgQ==NULL) +* 0 if there're not sufficient data in FIFO +*********************************************************************************************/ +UNSG32 hbo_queue_read( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id, /*! Queue ID in $HBO !*/ + SIGN32 n, /*! Number 64b entries to read !*/ + T64b data[], /*! To receive read data !*/ + UNSG32 *ptr /*! Pass in current FIFO pointer (in 64b word), + & receive updated new pointer, + Pass NULL to read from HW + !*/ + ); + +/******************************************************************************************** +* Function: hbo_queue_write +* Description: Write a number of 64b data & push FIFO to HBO SRAM. +* Return: UNSG32 Number of (adr,pair) added to cfgQ, or (when cfgQ==NULL) +* 0 if there're not sufficient space in FIFO +*********************************************************************************************/ +UNSG32 hbo_queue_write( + void *hdl, /*! Handle to HDL_hbo !*/ + SIGN32 id, /*! Queue ID in $HBO !*/ + SIGN32 n, /*! Number 64b entries to write !*/ + T64b data[], /*! Write data !*/ + T64b cfgQ[], /*! Pass NULL to directly update HBO, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + UNSG32 *ptr /*! Pass in current FIFO pointer (in 64b word), + & receive updated new pointer, + Pass NULL to read from HW + !*/ + ); +/** ENDOFSECTION +*/ + + + +/** SECTION - API definitions for $dHubReg +*/ +/******************************************************************************************** +* Function: dhub_hdl +* Description: Initialize HDL_dhub with a $dHub BIU instance. +*********************************************************************************************/ +void dhub_hdl( + UNSG32 mem, /*! Base address of dHub.HBO SRAM !*/ + UNSG32 ra, /*! Base address of a BIU instance of $dHub !*/ + void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_semaphore +* Description: Get HDL_semaphore pointer from a dHub instance. +* Return: void* Handle for dHub.SemaHub +*********************************************************************************************/ +void* dhub_semaphore( + void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_hbo +* Description: Get HDL_hbo pointer from a dHub instance. +* Return: void* Handle for dHub.HBO +*********************************************************************************************/ +void* dhub_hbo( void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_hbo_fifoCtl +* Description: Get HDL_semaphore pointer from the HBO of a dHub instance. +* Return: void* Handle for dHub.HBO.FiFoCtl +*********************************************************************************************/ +#define dhub_hbo_fifoCtl(hdl) (hbo_fifoCtl(dhub_hbo(hdl))) + +/******************************************************************************************** +* DEFINITION - convert from dHub channel ID to HBO FIFO ID & semaphore (interrupt) ID +*********************************************************************************************/ +// removed connection from HBO interrupt to semaphore +//#define dhub_id2intr(id) ((id)+1) +#define dhub_id2intr(id) ((id)) +#define dhub_id2hbo_cmdQ(id) ((id)*2) +#define dhub_id2hbo_data(id) ((id)*2+1) + +/******************************************************************************************** +* DEFINITION - convert dHub cmdQ/dataQ/channel-done interrupt control to HBO/semaphore control +*********************************************************************************************/ +//removed connection from HBO interrupt to semaphore +//#define dhub_hbo_intr_enable (hdl,id,empty,full,almostEmpty,almostFull,cpu) +// semaphore_intr_enable (dhub_semaphore(hdl),0,empty,full,almostEmpty,almostFull,cpu) + +#define dhub_channel_intr_enable (hdl,id,full,cpu) \ + semaphore_intr_enable (dhub_semaphore(hdl),dhub_id2intr(id),0,full,0,0,cpu) + +#define dhub_hbo_cmdQ_intr_enable (hdl,id,empty,almostEmpty,cpu) \ + hbo_queue_intr_enable (dhub_hbo(hdl),dhub_id2hbo_cmdQ(id),empty,0,almostEmpty,0,cpu) + +#define dhub_hbo_data_intr_enable (hdl,id,empty,full,almostEmpty,almostFull,cpu) \ + hbo_queue_intr_enable (dhub_hbo(hdl),dhub_id2hbo_data(id),empty,full,almostEmpty,almostFull,cpu) + +/******************************************************************************************** +* DEFINITION - convert dHub cmdQ opehdltions to HBO FIFO opehdltions +*********************************************************************************************/ +#define dhub_cmdQ_query (hdl,id,ptr) \ + hbo_queue_query (dhub_hbo(hdl),dhub_id2hbo_cmdQ(id),0,ptr) + +#define dhub_cmdQ_push (hdl,id,delta) \ + hbo_queue_push (dhub_hbo(hdl),dhub_id2hbo_cmdQ(id),delta) + +/******************************************************************************************** +* DEFINITION - convert dHub dataQ opehdltions to HBO FIFO opehdltions +*********************************************************************************************/ +#define dhub_data_query(hdl,id,master,ptr)\ + hbo_queue_query(dhub_hbo(hdl),dhub_id2hbo_data(id),master,ptr) + +#define dhub_data_push (hdl,id,delta) \ + hbo_queue_push (dhub_hbo(hdl),dhub_id2hbo_data(id),delta) + +#define dhub_data_pop (hdl,id,delta) \ + hbo_queue_pop (dhub_hbo(hdl),dhub_id2hbo_data(id),delta) + +/******************************************************************************************** +* Function: dhub_channel_cfg +* Description: Configurate a dHub channel. +* Return: UNSG32 Number of (adr,pair) added to cfgQ, or (when cfgQ==NULL) +* 0 if either cmdQ or dataQ in HBO is still busy +*********************************************************************************************/ +UNSG32 dhub_channel_cfg( + void *hdl, /*!Handle to HDL_dhub !*/ + SIGN32 id, /*!Channel ID in $dHubReg !*/ + UNSG32 baseCmd, /*!Channel FIFO base address (byte address) for cmdQ !*/ + UNSG32 baseData, /*!Channel FIFO base address (byte address) for dataQ !*/ + SIGN32 depthCmd, /*!Channel FIFO depth for cmdQ, in 64b word !*/ + SIGN32 depthData, /*!Channel FIFO depth for dataQ, in 64b word !*/ + SIGN32 mtu, /*!See 'dHubChannel.CFG.MTU', 0/1/2 for 8/32/128 bytes !*/ + SIGN32 QoS, /*!See 'dHubChannel.CFG.QoS' !*/ + SIGN32 selfLoop, /*!See 'dHubChannel.CFG.selfLoop' !*/ + SIGN32 enable, /*!0 to disable, 1 to enable !*/ + T64b cfgQ[] /*!Pass NULL to directly init dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_enable +* Description: dHub channel enable/disable. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 dhub_channel_enable( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id, /*! Channel ID in $dHubReg !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_clear +* Description: Issue dHub channel clear (will NOT wait for finish). +*********************************************************************************************/ +void dhub_channel_clear( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id /*! Channel ID in $dHubReg !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_flush +* Description: Issue dHub channel (H2M only) flush (will NOT wait for finish). +*********************************************************************************************/ +void dhub_channel_flush( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id /*! Channel ID in $dHubReg !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_busy +* Description: Read dHub 'BUSY' status for all channel FIFOs. +* Return: UNSG32 'BUSY' status bits of all channels +*********************************************************************************************/ +UNSG32 dhub_channel_busy( + void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_pending +* Description: Read dHub 'PENDING' status for all channel FIFOs. +* Return: UNSG32 'PENDING' status bits of all channels +*********************************************************************************************/ +UNSG32 dhub_channel_pending( + void *hdl /*! Handle to HDL_dhub !*/ + ); + +/******************************************************************************************** +* Function: dhub_channel_clear_done +* Description: Wait for a given channel or all channels to be cleared or flushed. +*********************************************************************************************/ +void dhub_channel_clear_done( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id /*! Channel ID in $dHubReg + -1 to wait for all channel clear done + !*/ + ); + +/****************************************************************************************************************** +* Function: dhub_channel_set_cfg +* Description: dHub channel configration set. +* Return: UNSG32 - Number of (adr,pair) added to cfgQ +*****************************************************************************************************************/ +UNSG32 dhub_channel_set_cfg( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id, /*! Channel ID in $dHubReg !*/ + UNSG32 data, /*! configure data !*/ + T64b cfgQ[] /*! Pass NULL to directly init dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + + + +/******************************************************************************************** +* Function: dhub_channel_write_cmd +* Description: Write a 64b command for a dHub channel. +* Return: UNSG32 Number of (adr,pair) added to cfgQ if success, or +* 0 if there're not sufficient space in FIFO +*********************************************************************************************/ +UNSG32 dhub_channel_write_cmd( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id, /*! Channel ID in $dHubReg !*/ + UNSG32 addr, /*! CMD: buffer address !*/ + SIGN32 size, /*! CMD: number of bytes to transfer !*/ + SIGN32 semOnMTU, /*! CMD: semaphore operation at CMD/MTU (0/1) !*/ + SIGN32 chkSemId, /*! CMD: non-zero to check semaphore !*/ + SIGN32 updSemId, /*! CMD: non-zero to update semaphore !*/ + SIGN32 interrupt, /*! CMD: raise interrupt at CMD finish !*/ + T64b cfgQ[], /*! Pass NULL to directly update dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + UNSG32 *ptr /*! Pass in current cmdQ pointer (in 64b word), + & receive updated new pointer, + Pass NULL to read from HW + !*/ + ); +/** ENDOFSECTION +*/ + +void dhub_channel_generate_cmd( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id, /*! Channel ID in $dHubReg !*/ + UNSG32 addr, /*! CMD: buffer address !*/ + SIGN32 size, /*! CMD: number of bytes to transfer !*/ + SIGN32 semOnMTU, /*! CMD: semaphore operation at CMD/MTU (0/1) !*/ + SIGN32 chkSemId, /*! CMD: non-zero to check semaphore !*/ + SIGN32 updSemId, /*! CMD: non-zero to update semaphore !*/ + SIGN32 interrupt, /*! CMD: raise interrupt at CMD finish !*/ + SIGN32 *pData + ); + +/******************************************************************************************** +* Function: dhub_channel_big_write_cmd +* Description: Write a sequence of 64b command for a dHub channel. +* Return: UNSG32 Number of (adr,pair) added to cfgQ if success, or +* 0 if there're not sufficient space in FIFO +*********************************************************************************************/ +UNSG32 dhub_channel_big_write_cmd( + void *hdl, /*! Handle to HDL_dhub !*/ + SIGN32 id, /*! Channel ID in $dHubReg !*/ + UNSG32 addr, /*! CMD: buffer address !*/ + SIGN32 size, /*! CMD: number of bytes to transfer !*/ + SIGN32 semOnMTU, /*! CMD: semaphore operation at CMD/MTU (0/1) !*/ + SIGN32 chkSemId, /*! CMD: non-zero to check semaphore !*/ + SIGN32 updSemId, /*! CMD: non-zero to update semaphore !*/ + SIGN32 interrupt, /*! CMD: raise interrupt at CMD finish !*/ + T64b cfgQ[], /*! Pass NULL to directly update dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + UNSG32 *ptr /*! Pass in current cmdQ pointer (in 64b word), + & receive updated new pointer, + Pass NULL to read from HW + !*/ + ); + +/** SECTION - API definitions for $dHubReg2D +*/ +/******************************************************************************************** +* Function: dhub2d_hdl +* Description: Initialize HDL_dhub2d with a $dHub2D BIU instance. +*********************************************************************************************/ +void dhub2d_hdl( + UNSG32 mem, /*! Base address of dHub2D.dHub.HBO SRAM !*/ + UNSG32 ra, /*! Base address of a BIU instance of $dHub2D !*/ + void *hdl /*! Handle to HDL_dhub2d !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_cfg +* Description: Configurate a dHub2D channel. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 dhub2d_channel_cfg( + void *hdl, /*! Handle to HDL_dhub2d !*/ + SIGN32 id, /*! Channel ID in $dHubReg2D !*/ + UNSG32 addr, /*! CMD: 2D-buffer address !*/ + SIGN32 stride, /*! CMD: line stride size in bytes !*/ + SIGN32 width, /*! CMD: buffer width in bytes !*/ + SIGN32 height, /*! CMD: buffer height in lines !*/ + SIGN32 semLoop, /*! CMD: loop size (1~4) of semaphore operations !*/ + SIGN32 semOnMTU, /*! CMD: semaphore operation at CMD/MTU (0/1) !*/ + SIGN32 chkSemId[], /*! CMD: semaphore loop pattern - non-zero to check !*/ + SIGN32 updSemId[], /*! CMD: semaphore loop pattern - non-zero to update !*/ + SIGN32 interrupt, /*! CMD: raise interrupt at CMD finish !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init dHub2D, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_enable +* Description: dHub2D channel enable/disable. +* Return: UNSG32 Number of (adr,pair) added to cfgQ +*********************************************************************************************/ +UNSG32 dhub2d_channel_enable( + void *hdl, /*! Handle to HDL_dhub2d !*/ + SIGN32 id, /*! Channel ID in $dHubReg2D !*/ + SIGN32 enable, /*! 0 to disable, 1 to enable !*/ + T64b cfgQ[] /*! Pass NULL to directly init dHub2D, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_clear +* Description: Issue dHub2D channel clear (will NOT wait for finish). +*********************************************************************************************/ +void dhub2d_channel_clear( + void *hdl, /*! Handle to HDL_dhub2d !*/ + SIGN32 id /*! Channel ID in $dHubReg2D !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_busy +* Description: Read dHub2D 'BUSY' status for all channel FIFOs. +* Return: UNSG32 'BUSY' status bits of all channels +*********************************************************************************************/ +UNSG32 dhub2d_channel_busy( + void *hdl /*! Handle to HDL_dhub2d !*/ + ); + +/******************************************************************************************** +* Function: dhub2d_channel_clear_done +* Description: Wait for a given channel or all channels to be cleared. +*********************************************************************************************/ +void dhub2d_channel_clear_done( + void *hdl, /*! Handle to HDL_dhub2d !*/ + SIGN32 id /*! Channel ID in $dHubReg2D + -1 to wait for all channel clear done + !*/ + ); +/** ENDOFSECTION + */ + +typedef enum { + BCM_SCHED_Q0 = 0, + BCM_SCHED_Q1, + BCM_SCHED_Q2, + BCM_SCHED_Q3, + BCM_SCHED_Q4, + BCM_SCHED_Q5, + BCM_SCHED_Q6, + BCM_SCHED_Q7, + BCM_SCHED_Q8, + BCM_SCHED_Q9, + BCM_SCHED_Q10, + BCM_SCHED_Q11, + BCM_SCHED_Q12, + BCM_SCHED_Q13, + BCM_SCHED_Q14, + BCM_SCHED_Q15, + BCM_SCHED_Q16, + BCM_SCHED_Q17, + BCM_SCHED_Q18, +} ENUM_BCM_SCHED_QID; + +typedef enum { + BCM_SCHED_TRIG_CPCB0_VBI = 0, + BCM_SCHED_TRIG_CPCB1_VBI, + BCM_SCHED_TRIG_CPCB2_VBI, + BCM_SCHED_TRIG_CPCB0_VDE, + BCM_SCHED_TRIG_CPCB1_VDE, + BCM_SCHED_TRIG_CPCB2_VDE, + BCM_SCHED_TRIG_AUD_PRIM, + BCM_SCHED_TRIG_AUD_SEC, + BCM_SCHED_TRIG_AUD_HDMI, + BCM_SCHED_TRIG_AUD_SPDIF, + BCM_SCHED_TRIG_AUD_MIC, //0xA + BCM_SCHED_TRIG_VBI_VDE, + BCM_SCHED_TRIG_DVI_VDE, + BCM_SCHED_TRIG_SD_WRE, + BCM_SCHED_TRIG_SD_RDE, + BCM_SCHED_TRIG_SD_ERR, //0xF + BCM_SCHED_TRIG_NONE = 0x1f, + +} ENUM_BCM_SCHED_TRIG_EVENT; + +void BCM_SCHED_Open(void); +void BCM_SCHED_Close(void); +void BCM_SCHED_SetMux(UNSG32 QID, UNSG32 TrigEvent); +int BCM_SCHED_PushCmd(UNSG32 QID, UNSG32 *pCmd, UNSG32 *cfgQ); +void BCM_SCHED_GetEmptySts(UNSG32 QID, UNSG32 *EmptySts); + +void dhub2d_channel_clear_seq(void *hdl, SIGN32 id); +void dhub2d_channel_start_seq(void *hdl, SIGN32 id); + +#ifdef __cplusplus + } +#endif + + + +/** DHUB_API + */ +#endif + +/** ENDOFFILE: api_dhub.h + */ diff --git a/sound/soc/berlin/api_spdif.h b/sound/soc/berlin/api_spdif.h new file mode 100644 index 00000000..b00051ea --- /dev/null +++ b/sound/soc/berlin/api_spdif.h @@ -0,0 +1,48 @@ +/************************************************************************************ +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +*************************************************************************************/ +#ifndef __API_SPDIF_H__ +#define __API_SPDIF_H__ + +struct spdif_channel_status { + unsigned int consumer : 1; + unsigned int digital_data : 1; + unsigned int copyright : 1; + unsigned int nonlinear : 3; + unsigned int mode : 2; + unsigned int category : 7; + unsigned int lbit : 1; + unsigned int source_num : 4; + unsigned int channel_num : 4; + unsigned int sample_rate : 4; + unsigned int accuray : 4; + unsigned int word_length : 4; + unsigned int orig_sample_rate : 4; + unsigned int CGMSA : 2; + unsigned int reseverd_bits: 22; + unsigned int reseverd[4]; +}; + +#define SPDIF_BLOCK_SIZE 192 + +unsigned int spdif_init_channel_status(struct spdif_channel_status *chnsts, unsigned int sample_rate); + +unsigned char spdif_get_channel_status(unsigned char *chnsts, unsigned int spdif_frames); + +#endif diff --git a/sound/soc/berlin/avioDhub.h b/sound/soc/berlin/avioDhub.h new file mode 100644 index 00000000..196f6651 --- /dev/null +++ b/sound/soc/berlin/avioDhub.h @@ -0,0 +1,4780 @@ +/*********************************************************************************** +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +************************************************************************************/ + +////// +/// don't edit! auto-generated by docc: avioDhub.h +//////////////////////////////////////////////////////////// +#ifndef avioDhub_h +#define avioDhub_h (){} + + +#include "ctypes.h" + +#pragma pack(1) +#ifdef __cplusplus + extern "C" { +#endif + +#ifndef _DOCC_H_BITOPS_ +#define _DOCC_H_BITOPS_ (){} + + #define _bSETMASK_(b) ((b)<32 ? (1<<((b)&31)) : 0) + #define _NSETMASK_(msb,lsb) (_bSETMASK_((msb)+1)-_bSETMASK_(lsb)) + #define _bCLRMASK_(b) (~_bSETMASK_(b)) + #define _NCLRMASK_(msb,lsb) (~_NSETMASK_(msb,lsb)) + #define _BFGET_(r,msb,lsb) (_NSETMASK_((msb)-(lsb),0)&((r)>>(lsb))) + #define _BFSET_(r,msb,lsb,v) do{ (r)&=_NCLRMASK_(msb,lsb); (r)|=_NSETMASK_(msb,lsb)&((v)<<(lsb)); }while(0) + +#endif + +////// +/// +/// $INTERFACE SemaINTR (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 mask (W-) +/// %unsigned 1 empty 0x0 +/// ### +/// * Enable interrupt on 'empty' condition +/// ### +/// %unsigned 1 full 0x0 +/// ### +/// * Enable interrupt on 'full' condition +/// ### +/// %unsigned 1 almostEmpty 0x0 +/// ### +/// * Enable interrupt on 'almostEmpty' condition +/// ### +/// %unsigned 1 almostFull 0x0 +/// ### +/// * Enable interrupt on 'almostFull' condition +/// ### +/// %% 28 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 4b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaINTR +#define h_SemaINTR (){} + + #define RA_SemaINTR_mask 0x0000 + + #define BA_SemaINTR_mask_empty 0x0000 + #define B16SemaINTR_mask_empty 0x0000 + #define LSb32SemaINTR_mask_empty 0 + #define LSb16SemaINTR_mask_empty 0 + #define bSemaINTR_mask_empty 1 + #define MSK32SemaINTR_mask_empty 0x00000001 + + #define BA_SemaINTR_mask_full 0x0000 + #define B16SemaINTR_mask_full 0x0000 + #define LSb32SemaINTR_mask_full 1 + #define LSb16SemaINTR_mask_full 1 + #define bSemaINTR_mask_full 1 + #define MSK32SemaINTR_mask_full 0x00000002 + + #define BA_SemaINTR_mask_almostEmpty 0x0000 + #define B16SemaINTR_mask_almostEmpty 0x0000 + #define LSb32SemaINTR_mask_almostEmpty 2 + #define LSb16SemaINTR_mask_almostEmpty 2 + #define bSemaINTR_mask_almostEmpty 1 + #define MSK32SemaINTR_mask_almostEmpty 0x00000004 + + #define BA_SemaINTR_mask_almostFull 0x0000 + #define B16SemaINTR_mask_almostFull 0x0000 + #define LSb32SemaINTR_mask_almostFull 3 + #define LSb16SemaINTR_mask_almostFull 3 + #define bSemaINTR_mask_almostFull 1 + #define MSK32SemaINTR_mask_almostFull 0x00000008 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaINTR { + /////////////////////////////////////////////////////////// + #define GET32SemaINTR_mask_empty(r32) _BFGET_(r32, 0, 0) + #define SET32SemaINTR_mask_empty(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaINTR_mask_empty(r16) _BFGET_(r16, 0, 0) + #define SET16SemaINTR_mask_empty(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaINTR_mask_full(r32) _BFGET_(r32, 1, 1) + #define SET32SemaINTR_mask_full(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaINTR_mask_full(r16) _BFGET_(r16, 1, 1) + #define SET16SemaINTR_mask_full(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaINTR_mask_almostEmpty(r32) _BFGET_(r32, 2, 2) + #define SET32SemaINTR_mask_almostEmpty(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaINTR_mask_almostEmpty(r16) _BFGET_(r16, 2, 2) + #define SET16SemaINTR_mask_almostEmpty(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaINTR_mask_almostFull(r32) _BFGET_(r32, 3, 3) + #define SET32SemaINTR_mask_almostFull(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaINTR_mask_almostFull(r16) _BFGET_(r16, 3, 3) + #define SET16SemaINTR_mask_almostFull(r16,v) _BFSET_(r16, 3, 3,v) + + #define w32SemaINTR_mask {\ + UNSG32 umask_empty : 1;\ + UNSG32 umask_full : 1;\ + UNSG32 umask_almostEmpty : 1;\ + UNSG32 umask_almostFull : 1;\ + UNSG32 RSVDx0_b4 : 28;\ + } + union { UNSG32 u32SemaINTR_mask; + struct w32SemaINTR_mask; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaINTR; + + typedef union T32SemaINTR_mask + { UNSG32 u32; + struct w32SemaINTR_mask; + } T32SemaINTR_mask; + /////////////////////////////////////////////////////////// + + typedef union TSemaINTR_mask + { UNSG32 u32[1]; + struct { + struct w32SemaINTR_mask; + }; + } TSemaINTR_mask; + + /////////////////////////////////////////////////////////// + SIGN32 SemaINTR_drvrd(SIE_SemaINTR *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaINTR_drvwr(SIE_SemaINTR *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaINTR_reset(SIE_SemaINTR *p); + SIGN32 SemaINTR_cmp (SIE_SemaINTR *p, SIE_SemaINTR *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaINTR_check(p,pie,pfx,hLOG) SemaINTR_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaINTR_print(p, pfx,hLOG) SemaINTR_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaINTR +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE Semaphore biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 16 DEPTH 0xF +/// ### +/// * Max level of semaphore +/// * Note: write this register will trigger counter reset +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00004 (P) +/// # 0x00004 INTR +/// $SemaINTR INTR REG [3] +/// ### +/// * Interrupt mask for 3 CPUs +/// ### +/// @ 0x00010 mask (W-) +/// %unsigned 1 full 0x0 +/// %unsigned 1 emp 0x0 +/// ### +/// * When full bit is set to one, to the producer, the semaphore will never be full, so that the producer will never be blocked. +/// * When emp bit is set to one, to the consumer, the semaphore will never be empty, so that the consumer will never be blocked. +/// * When the emp/full bit is set, the semaphore/FIFO pointer will be maintained, but the counter will be not correct anymore. +/// ### +/// %% 30 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 20B, bits: 30b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_Semaphore +#define h_Semaphore (){} + + #define RA_Semaphore_CFG 0x0000 + + #define BA_Semaphore_CFG_DEPTH 0x0000 + #define B16Semaphore_CFG_DEPTH 0x0000 + #define LSb32Semaphore_CFG_DEPTH 0 + #define LSb16Semaphore_CFG_DEPTH 0 + #define bSemaphore_CFG_DEPTH 16 + #define MSK32Semaphore_CFG_DEPTH 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_Semaphore_INTR 0x0004 + /////////////////////////////////////////////////////////// + #define RA_Semaphore_mask 0x0010 + + #define BA_Semaphore_mask_full 0x0010 + #define B16Semaphore_mask_full 0x0010 + #define LSb32Semaphore_mask_full 0 + #define LSb16Semaphore_mask_full 0 + #define bSemaphore_mask_full 1 + #define MSK32Semaphore_mask_full 0x00000001 + + #define BA_Semaphore_mask_emp 0x0010 + #define B16Semaphore_mask_emp 0x0010 + #define LSb32Semaphore_mask_emp 1 + #define LSb16Semaphore_mask_emp 1 + #define bSemaphore_mask_emp 1 + #define MSK32Semaphore_mask_emp 0x00000002 + /////////////////////////////////////////////////////////// + + typedef struct SIE_Semaphore { + /////////////////////////////////////////////////////////// + #define GET32Semaphore_CFG_DEPTH(r32) _BFGET_(r32,15, 0) + #define SET32Semaphore_CFG_DEPTH(r32,v) _BFSET_(r32,15, 0,v) + #define GET16Semaphore_CFG_DEPTH(r16) _BFGET_(r16,15, 0) + #define SET16Semaphore_CFG_DEPTH(r16,v) _BFSET_(r16,15, 0,v) + + #define w32Semaphore_CFG {\ + UNSG32 uCFG_DEPTH : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32Semaphore_CFG; + struct w32Semaphore_CFG; + }; + /////////////////////////////////////////////////////////// + SIE_SemaINTR ie_INTR[3]; + /////////////////////////////////////////////////////////// + #define GET32Semaphore_mask_full(r32) _BFGET_(r32, 0, 0) + #define SET32Semaphore_mask_full(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16Semaphore_mask_full(r16) _BFGET_(r16, 0, 0) + #define SET16Semaphore_mask_full(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32Semaphore_mask_emp(r32) _BFGET_(r32, 1, 1) + #define SET32Semaphore_mask_emp(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16Semaphore_mask_emp(r16) _BFGET_(r16, 1, 1) + #define SET16Semaphore_mask_emp(r16,v) _BFSET_(r16, 1, 1,v) + + #define w32Semaphore_mask {\ + UNSG32 umask_full : 1;\ + UNSG32 umask_emp : 1;\ + UNSG32 RSVDx10_b2 : 30;\ + } + union { UNSG32 u32Semaphore_mask; + struct w32Semaphore_mask; + }; + /////////////////////////////////////////////////////////// + } SIE_Semaphore; + + typedef union T32Semaphore_CFG + { UNSG32 u32; + struct w32Semaphore_CFG; + } T32Semaphore_CFG; + typedef union T32Semaphore_mask + { UNSG32 u32; + struct w32Semaphore_mask; + } T32Semaphore_mask; + /////////////////////////////////////////////////////////// + + typedef union TSemaphore_CFG + { UNSG32 u32[1]; + struct { + struct w32Semaphore_CFG; + }; + } TSemaphore_CFG; + typedef union TSemaphore_mask + { UNSG32 u32[1]; + struct { + struct w32Semaphore_mask; + }; + } TSemaphore_mask; + + /////////////////////////////////////////////////////////// + SIGN32 Semaphore_drvrd(SIE_Semaphore *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 Semaphore_drvwr(SIE_Semaphore *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void Semaphore_reset(SIE_Semaphore *p); + SIGN32 Semaphore_cmp (SIE_Semaphore *p, SIE_Semaphore *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define Semaphore_check(p,pie,pfx,hLOG) Semaphore_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define Semaphore_print(p, pfx,hLOG) Semaphore_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: Semaphore +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaQuery (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 RESP (R-) +/// %unsigned 16 CNT +/// ### +/// * Semaphore counter level +/// ### +/// %unsigned 16 PTR +/// ### +/// * Semaphore pointer: +/// * producer-wptr or consumer-rptr +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 32b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaQuery +#define h_SemaQuery (){} + + #define RA_SemaQuery_RESP 0x0000 + + #define BA_SemaQuery_RESP_CNT 0x0000 + #define B16SemaQuery_RESP_CNT 0x0000 + #define LSb32SemaQuery_RESP_CNT 0 + #define LSb16SemaQuery_RESP_CNT 0 + #define bSemaQuery_RESP_CNT 16 + #define MSK32SemaQuery_RESP_CNT 0x0000FFFF + + #define BA_SemaQuery_RESP_PTR 0x0002 + #define B16SemaQuery_RESP_PTR 0x0002 + #define LSb32SemaQuery_RESP_PTR 16 + #define LSb16SemaQuery_RESP_PTR 0 + #define bSemaQuery_RESP_PTR 16 + #define MSK32SemaQuery_RESP_PTR 0xFFFF0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaQuery { + /////////////////////////////////////////////////////////// + #define GET32SemaQuery_RESP_CNT(r32) _BFGET_(r32,15, 0) + #define SET32SemaQuery_RESP_CNT(r32,v) _BFSET_(r32,15, 0,v) + #define GET16SemaQuery_RESP_CNT(r16) _BFGET_(r16,15, 0) + #define SET16SemaQuery_RESP_CNT(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32SemaQuery_RESP_PTR(r32) _BFGET_(r32,31,16) + #define SET32SemaQuery_RESP_PTR(r32,v) _BFSET_(r32,31,16,v) + #define GET16SemaQuery_RESP_PTR(r16) _BFGET_(r16,15, 0) + #define SET16SemaQuery_RESP_PTR(r16,v) _BFSET_(r16,15, 0,v) + + #define w32SemaQuery_RESP {\ + UNSG32 uRESP_CNT : 16;\ + UNSG32 uRESP_PTR : 16;\ + } + union { UNSG32 u32SemaQuery_RESP; + struct w32SemaQuery_RESP; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaQuery; + + typedef union T32SemaQuery_RESP + { UNSG32 u32; + struct w32SemaQuery_RESP; + } T32SemaQuery_RESP; + /////////////////////////////////////////////////////////// + + typedef union TSemaQuery_RESP + { UNSG32 u32[1]; + struct { + struct w32SemaQuery_RESP; + }; + } TSemaQuery_RESP; + + /////////////////////////////////////////////////////////// + SIGN32 SemaQuery_drvrd(SIE_SemaQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaQuery_drvwr(SIE_SemaQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaQuery_reset(SIE_SemaQuery *p); + SIGN32 SemaQuery_cmp (SIE_SemaQuery *p, SIE_SemaQuery *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaQuery_check(p,pie,pfx,hLOG) SemaQuery_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaQuery_print(p, pfx,hLOG) SemaQuery_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaQuery +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaQueryMap (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 ADDR (P) +/// %unsigned 2 byte +/// %unsigned 5 ID +/// ### +/// * Semaphore cell index +/// ### +/// %unsigned 1 master +/// : producer 0x0 +/// : consumer 0x1 +/// ### +/// * Select which counter to read +/// ### +/// %% 24 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 8b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaQueryMap +#define h_SemaQueryMap (){} + + #define RA_SemaQueryMap_ADDR 0x0000 + + #define BA_SemaQueryMap_ADDR_byte 0x0000 + #define B16SemaQueryMap_ADDR_byte 0x0000 + #define LSb32SemaQueryMap_ADDR_byte 0 + #define LSb16SemaQueryMap_ADDR_byte 0 + #define bSemaQueryMap_ADDR_byte 2 + #define MSK32SemaQueryMap_ADDR_byte 0x00000003 + + #define BA_SemaQueryMap_ADDR_ID 0x0000 + #define B16SemaQueryMap_ADDR_ID 0x0000 + #define LSb32SemaQueryMap_ADDR_ID 2 + #define LSb16SemaQueryMap_ADDR_ID 2 + #define bSemaQueryMap_ADDR_ID 5 + #define MSK32SemaQueryMap_ADDR_ID 0x0000007C + + #define BA_SemaQueryMap_ADDR_master 0x0000 + #define B16SemaQueryMap_ADDR_master 0x0000 + #define LSb32SemaQueryMap_ADDR_master 7 + #define LSb16SemaQueryMap_ADDR_master 7 + #define bSemaQueryMap_ADDR_master 1 + #define MSK32SemaQueryMap_ADDR_master 0x00000080 + #define SemaQueryMap_ADDR_master_producer 0x0 + #define SemaQueryMap_ADDR_master_consumer 0x1 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaQueryMap { + /////////////////////////////////////////////////////////// + #define GET32SemaQueryMap_ADDR_byte(r32) _BFGET_(r32, 1, 0) + #define SET32SemaQueryMap_ADDR_byte(r32,v) _BFSET_(r32, 1, 0,v) + #define GET16SemaQueryMap_ADDR_byte(r16) _BFGET_(r16, 1, 0) + #define SET16SemaQueryMap_ADDR_byte(r16,v) _BFSET_(r16, 1, 0,v) + + #define GET32SemaQueryMap_ADDR_ID(r32) _BFGET_(r32, 6, 2) + #define SET32SemaQueryMap_ADDR_ID(r32,v) _BFSET_(r32, 6, 2,v) + #define GET16SemaQueryMap_ADDR_ID(r16) _BFGET_(r16, 6, 2) + #define SET16SemaQueryMap_ADDR_ID(r16,v) _BFSET_(r16, 6, 2,v) + + #define GET32SemaQueryMap_ADDR_master(r32) _BFGET_(r32, 7, 7) + #define SET32SemaQueryMap_ADDR_master(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaQueryMap_ADDR_master(r16) _BFGET_(r16, 7, 7) + #define SET16SemaQueryMap_ADDR_master(r16,v) _BFSET_(r16, 7, 7,v) + + #define w32SemaQueryMap_ADDR {\ + UNSG32 uADDR_byte : 2;\ + UNSG32 uADDR_ID : 5;\ + UNSG32 uADDR_master : 1;\ + UNSG32 RSVDx0_b8 : 24;\ + } + union { UNSG32 u32SemaQueryMap_ADDR; + struct w32SemaQueryMap_ADDR; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaQueryMap; + + typedef union T32SemaQueryMap_ADDR + { UNSG32 u32; + struct w32SemaQueryMap_ADDR; + } T32SemaQueryMap_ADDR; + /////////////////////////////////////////////////////////// + + typedef union TSemaQueryMap_ADDR + { UNSG32 u32[1]; + struct { + struct w32SemaQueryMap_ADDR; + }; + } TSemaQueryMap_ADDR; + + /////////////////////////////////////////////////////////// + SIGN32 SemaQueryMap_drvrd(SIE_SemaQueryMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaQueryMap_drvwr(SIE_SemaQueryMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaQueryMap_reset(SIE_SemaQueryMap *p); + SIGN32 SemaQueryMap_cmp (SIE_SemaQueryMap *p, SIE_SemaQueryMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaQueryMap_check(p,pie,pfx,hLOG) SemaQueryMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaQueryMap_print(p, pfx,hLOG) SemaQueryMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaQueryMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaHub biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 Query (R-) +/// # 0x00000 counter +/// $SemaQuery counter MEM [64] +/// ### +/// * Access address as defined above +/// ### +/// @ 0x00100 ARR (P) +/// # 0x00100 cell +/// $Semaphore cell REG [32] +/// ### +/// * Up-to 32 semaphore cells +/// ### +/// @ 0x00380 PUSH (W-) +/// %unsigned 8 ID +/// %unsigned 8 delta +/// ### +/// * CPU increases PCounter by delta (0 as push 256) +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00384 POP (W-) +/// %unsigned 8 ID +/// %unsigned 8 delta +/// ### +/// * CPU decreases CCounter by delta (0 as pop 256) +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00388 empty (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'empty' status +/// ### +/// @ 0x0038C full (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'full' status +/// ### +/// @ 0x00390 almostEmpty (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'almostEmpty' status +/// ### +/// @ 0x00394 almostFull (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'almostFull' status +/// ### +/// @ 0x00398 (W-) +/// # # Stuffing bytes... +/// %% 832 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 1024B, bits: 1152b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaHub +#define h_SemaHub (){} + + #define RA_SemaHub_Query 0x0000 + #define RA_SemaHub_counter 0x0000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_ARR 0x0100 + #define RA_SemaHub_cell 0x0100 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_PUSH 0x0380 + + #define BA_SemaHub_PUSH_ID 0x0380 + #define B16SemaHub_PUSH_ID 0x0380 + #define LSb32SemaHub_PUSH_ID 0 + #define LSb16SemaHub_PUSH_ID 0 + #define bSemaHub_PUSH_ID 8 + #define MSK32SemaHub_PUSH_ID 0x000000FF + + #define BA_SemaHub_PUSH_delta 0x0381 + #define B16SemaHub_PUSH_delta 0x0380 + #define LSb32SemaHub_PUSH_delta 8 + #define LSb16SemaHub_PUSH_delta 8 + #define bSemaHub_PUSH_delta 8 + #define MSK32SemaHub_PUSH_delta 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_POP 0x0384 + + #define BA_SemaHub_POP_ID 0x0384 + #define B16SemaHub_POP_ID 0x0384 + #define LSb32SemaHub_POP_ID 0 + #define LSb16SemaHub_POP_ID 0 + #define bSemaHub_POP_ID 8 + #define MSK32SemaHub_POP_ID 0x000000FF + + #define BA_SemaHub_POP_delta 0x0385 + #define B16SemaHub_POP_delta 0x0384 + #define LSb32SemaHub_POP_delta 8 + #define LSb16SemaHub_POP_delta 8 + #define bSemaHub_POP_delta 8 + #define MSK32SemaHub_POP_delta 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_empty 0x0388 + + #define BA_SemaHub_empty_ST_0i 0x0388 + #define B16SemaHub_empty_ST_0i 0x0388 + #define LSb32SemaHub_empty_ST_0i 0 + #define LSb16SemaHub_empty_ST_0i 0 + #define bSemaHub_empty_ST_0i 1 + #define MSK32SemaHub_empty_ST_0i 0x00000001 + + #define BA_SemaHub_empty_ST_1i 0x0388 + #define B16SemaHub_empty_ST_1i 0x0388 + #define LSb32SemaHub_empty_ST_1i 1 + #define LSb16SemaHub_empty_ST_1i 1 + #define bSemaHub_empty_ST_1i 1 + #define MSK32SemaHub_empty_ST_1i 0x00000002 + + #define BA_SemaHub_empty_ST_2i 0x0388 + #define B16SemaHub_empty_ST_2i 0x0388 + #define LSb32SemaHub_empty_ST_2i 2 + #define LSb16SemaHub_empty_ST_2i 2 + #define bSemaHub_empty_ST_2i 1 + #define MSK32SemaHub_empty_ST_2i 0x00000004 + + #define BA_SemaHub_empty_ST_3i 0x0388 + #define B16SemaHub_empty_ST_3i 0x0388 + #define LSb32SemaHub_empty_ST_3i 3 + #define LSb16SemaHub_empty_ST_3i 3 + #define bSemaHub_empty_ST_3i 1 + #define MSK32SemaHub_empty_ST_3i 0x00000008 + + #define BA_SemaHub_empty_ST_4i 0x0388 + #define B16SemaHub_empty_ST_4i 0x0388 + #define LSb32SemaHub_empty_ST_4i 4 + #define LSb16SemaHub_empty_ST_4i 4 + #define bSemaHub_empty_ST_4i 1 + #define MSK32SemaHub_empty_ST_4i 0x00000010 + + #define BA_SemaHub_empty_ST_5i 0x0388 + #define B16SemaHub_empty_ST_5i 0x0388 + #define LSb32SemaHub_empty_ST_5i 5 + #define LSb16SemaHub_empty_ST_5i 5 + #define bSemaHub_empty_ST_5i 1 + #define MSK32SemaHub_empty_ST_5i 0x00000020 + + #define BA_SemaHub_empty_ST_6i 0x0388 + #define B16SemaHub_empty_ST_6i 0x0388 + #define LSb32SemaHub_empty_ST_6i 6 + #define LSb16SemaHub_empty_ST_6i 6 + #define bSemaHub_empty_ST_6i 1 + #define MSK32SemaHub_empty_ST_6i 0x00000040 + + #define BA_SemaHub_empty_ST_7i 0x0388 + #define B16SemaHub_empty_ST_7i 0x0388 + #define LSb32SemaHub_empty_ST_7i 7 + #define LSb16SemaHub_empty_ST_7i 7 + #define bSemaHub_empty_ST_7i 1 + #define MSK32SemaHub_empty_ST_7i 0x00000080 + + #define BA_SemaHub_empty_ST_8i 0x0389 + #define B16SemaHub_empty_ST_8i 0x0388 + #define LSb32SemaHub_empty_ST_8i 8 + #define LSb16SemaHub_empty_ST_8i 8 + #define bSemaHub_empty_ST_8i 1 + #define MSK32SemaHub_empty_ST_8i 0x00000100 + + #define BA_SemaHub_empty_ST_9i 0x0389 + #define B16SemaHub_empty_ST_9i 0x0388 + #define LSb32SemaHub_empty_ST_9i 9 + #define LSb16SemaHub_empty_ST_9i 9 + #define bSemaHub_empty_ST_9i 1 + #define MSK32SemaHub_empty_ST_9i 0x00000200 + + #define BA_SemaHub_empty_ST_10i 0x0389 + #define B16SemaHub_empty_ST_10i 0x0388 + #define LSb32SemaHub_empty_ST_10i 10 + #define LSb16SemaHub_empty_ST_10i 10 + #define bSemaHub_empty_ST_10i 1 + #define MSK32SemaHub_empty_ST_10i 0x00000400 + + #define BA_SemaHub_empty_ST_11i 0x0389 + #define B16SemaHub_empty_ST_11i 0x0388 + #define LSb32SemaHub_empty_ST_11i 11 + #define LSb16SemaHub_empty_ST_11i 11 + #define bSemaHub_empty_ST_11i 1 + #define MSK32SemaHub_empty_ST_11i 0x00000800 + + #define BA_SemaHub_empty_ST_12i 0x0389 + #define B16SemaHub_empty_ST_12i 0x0388 + #define LSb32SemaHub_empty_ST_12i 12 + #define LSb16SemaHub_empty_ST_12i 12 + #define bSemaHub_empty_ST_12i 1 + #define MSK32SemaHub_empty_ST_12i 0x00001000 + + #define BA_SemaHub_empty_ST_13i 0x0389 + #define B16SemaHub_empty_ST_13i 0x0388 + #define LSb32SemaHub_empty_ST_13i 13 + #define LSb16SemaHub_empty_ST_13i 13 + #define bSemaHub_empty_ST_13i 1 + #define MSK32SemaHub_empty_ST_13i 0x00002000 + + #define BA_SemaHub_empty_ST_14i 0x0389 + #define B16SemaHub_empty_ST_14i 0x0388 + #define LSb32SemaHub_empty_ST_14i 14 + #define LSb16SemaHub_empty_ST_14i 14 + #define bSemaHub_empty_ST_14i 1 + #define MSK32SemaHub_empty_ST_14i 0x00004000 + + #define BA_SemaHub_empty_ST_15i 0x0389 + #define B16SemaHub_empty_ST_15i 0x0388 + #define LSb32SemaHub_empty_ST_15i 15 + #define LSb16SemaHub_empty_ST_15i 15 + #define bSemaHub_empty_ST_15i 1 + #define MSK32SemaHub_empty_ST_15i 0x00008000 + + #define BA_SemaHub_empty_ST_16i 0x038A + #define B16SemaHub_empty_ST_16i 0x038A + #define LSb32SemaHub_empty_ST_16i 16 + #define LSb16SemaHub_empty_ST_16i 0 + #define bSemaHub_empty_ST_16i 1 + #define MSK32SemaHub_empty_ST_16i 0x00010000 + + #define BA_SemaHub_empty_ST_17i 0x038A + #define B16SemaHub_empty_ST_17i 0x038A + #define LSb32SemaHub_empty_ST_17i 17 + #define LSb16SemaHub_empty_ST_17i 1 + #define bSemaHub_empty_ST_17i 1 + #define MSK32SemaHub_empty_ST_17i 0x00020000 + + #define BA_SemaHub_empty_ST_18i 0x038A + #define B16SemaHub_empty_ST_18i 0x038A + #define LSb32SemaHub_empty_ST_18i 18 + #define LSb16SemaHub_empty_ST_18i 2 + #define bSemaHub_empty_ST_18i 1 + #define MSK32SemaHub_empty_ST_18i 0x00040000 + + #define BA_SemaHub_empty_ST_19i 0x038A + #define B16SemaHub_empty_ST_19i 0x038A + #define LSb32SemaHub_empty_ST_19i 19 + #define LSb16SemaHub_empty_ST_19i 3 + #define bSemaHub_empty_ST_19i 1 + #define MSK32SemaHub_empty_ST_19i 0x00080000 + + #define BA_SemaHub_empty_ST_20i 0x038A + #define B16SemaHub_empty_ST_20i 0x038A + #define LSb32SemaHub_empty_ST_20i 20 + #define LSb16SemaHub_empty_ST_20i 4 + #define bSemaHub_empty_ST_20i 1 + #define MSK32SemaHub_empty_ST_20i 0x00100000 + + #define BA_SemaHub_empty_ST_21i 0x038A + #define B16SemaHub_empty_ST_21i 0x038A + #define LSb32SemaHub_empty_ST_21i 21 + #define LSb16SemaHub_empty_ST_21i 5 + #define bSemaHub_empty_ST_21i 1 + #define MSK32SemaHub_empty_ST_21i 0x00200000 + + #define BA_SemaHub_empty_ST_22i 0x038A + #define B16SemaHub_empty_ST_22i 0x038A + #define LSb32SemaHub_empty_ST_22i 22 + #define LSb16SemaHub_empty_ST_22i 6 + #define bSemaHub_empty_ST_22i 1 + #define MSK32SemaHub_empty_ST_22i 0x00400000 + + #define BA_SemaHub_empty_ST_23i 0x038A + #define B16SemaHub_empty_ST_23i 0x038A + #define LSb32SemaHub_empty_ST_23i 23 + #define LSb16SemaHub_empty_ST_23i 7 + #define bSemaHub_empty_ST_23i 1 + #define MSK32SemaHub_empty_ST_23i 0x00800000 + + #define BA_SemaHub_empty_ST_24i 0x038B + #define B16SemaHub_empty_ST_24i 0x038A + #define LSb32SemaHub_empty_ST_24i 24 + #define LSb16SemaHub_empty_ST_24i 8 + #define bSemaHub_empty_ST_24i 1 + #define MSK32SemaHub_empty_ST_24i 0x01000000 + + #define BA_SemaHub_empty_ST_25i 0x038B + #define B16SemaHub_empty_ST_25i 0x038A + #define LSb32SemaHub_empty_ST_25i 25 + #define LSb16SemaHub_empty_ST_25i 9 + #define bSemaHub_empty_ST_25i 1 + #define MSK32SemaHub_empty_ST_25i 0x02000000 + + #define BA_SemaHub_empty_ST_26i 0x038B + #define B16SemaHub_empty_ST_26i 0x038A + #define LSb32SemaHub_empty_ST_26i 26 + #define LSb16SemaHub_empty_ST_26i 10 + #define bSemaHub_empty_ST_26i 1 + #define MSK32SemaHub_empty_ST_26i 0x04000000 + + #define BA_SemaHub_empty_ST_27i 0x038B + #define B16SemaHub_empty_ST_27i 0x038A + #define LSb32SemaHub_empty_ST_27i 27 + #define LSb16SemaHub_empty_ST_27i 11 + #define bSemaHub_empty_ST_27i 1 + #define MSK32SemaHub_empty_ST_27i 0x08000000 + + #define BA_SemaHub_empty_ST_28i 0x038B + #define B16SemaHub_empty_ST_28i 0x038A + #define LSb32SemaHub_empty_ST_28i 28 + #define LSb16SemaHub_empty_ST_28i 12 + #define bSemaHub_empty_ST_28i 1 + #define MSK32SemaHub_empty_ST_28i 0x10000000 + + #define BA_SemaHub_empty_ST_29i 0x038B + #define B16SemaHub_empty_ST_29i 0x038A + #define LSb32SemaHub_empty_ST_29i 29 + #define LSb16SemaHub_empty_ST_29i 13 + #define bSemaHub_empty_ST_29i 1 + #define MSK32SemaHub_empty_ST_29i 0x20000000 + + #define BA_SemaHub_empty_ST_30i 0x038B + #define B16SemaHub_empty_ST_30i 0x038A + #define LSb32SemaHub_empty_ST_30i 30 + #define LSb16SemaHub_empty_ST_30i 14 + #define bSemaHub_empty_ST_30i 1 + #define MSK32SemaHub_empty_ST_30i 0x40000000 + + #define BA_SemaHub_empty_ST_31i 0x038B + #define B16SemaHub_empty_ST_31i 0x038A + #define LSb32SemaHub_empty_ST_31i 31 + #define LSb16SemaHub_empty_ST_31i 15 + #define bSemaHub_empty_ST_31i 1 + #define MSK32SemaHub_empty_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_full 0x038C + + #define BA_SemaHub_full_ST_0i 0x038C + #define B16SemaHub_full_ST_0i 0x038C + #define LSb32SemaHub_full_ST_0i 0 + #define LSb16SemaHub_full_ST_0i 0 + #define bSemaHub_full_ST_0i 1 + #define MSK32SemaHub_full_ST_0i 0x00000001 + + #define BA_SemaHub_full_ST_1i 0x038C + #define B16SemaHub_full_ST_1i 0x038C + #define LSb32SemaHub_full_ST_1i 1 + #define LSb16SemaHub_full_ST_1i 1 + #define bSemaHub_full_ST_1i 1 + #define MSK32SemaHub_full_ST_1i 0x00000002 + + #define BA_SemaHub_full_ST_2i 0x038C + #define B16SemaHub_full_ST_2i 0x038C + #define LSb32SemaHub_full_ST_2i 2 + #define LSb16SemaHub_full_ST_2i 2 + #define bSemaHub_full_ST_2i 1 + #define MSK32SemaHub_full_ST_2i 0x00000004 + + #define BA_SemaHub_full_ST_3i 0x038C + #define B16SemaHub_full_ST_3i 0x038C + #define LSb32SemaHub_full_ST_3i 3 + #define LSb16SemaHub_full_ST_3i 3 + #define bSemaHub_full_ST_3i 1 + #define MSK32SemaHub_full_ST_3i 0x00000008 + + #define BA_SemaHub_full_ST_4i 0x038C + #define B16SemaHub_full_ST_4i 0x038C + #define LSb32SemaHub_full_ST_4i 4 + #define LSb16SemaHub_full_ST_4i 4 + #define bSemaHub_full_ST_4i 1 + #define MSK32SemaHub_full_ST_4i 0x00000010 + + #define BA_SemaHub_full_ST_5i 0x038C + #define B16SemaHub_full_ST_5i 0x038C + #define LSb32SemaHub_full_ST_5i 5 + #define LSb16SemaHub_full_ST_5i 5 + #define bSemaHub_full_ST_5i 1 + #define MSK32SemaHub_full_ST_5i 0x00000020 + + #define BA_SemaHub_full_ST_6i 0x038C + #define B16SemaHub_full_ST_6i 0x038C + #define LSb32SemaHub_full_ST_6i 6 + #define LSb16SemaHub_full_ST_6i 6 + #define bSemaHub_full_ST_6i 1 + #define MSK32SemaHub_full_ST_6i 0x00000040 + + #define BA_SemaHub_full_ST_7i 0x038C + #define B16SemaHub_full_ST_7i 0x038C + #define LSb32SemaHub_full_ST_7i 7 + #define LSb16SemaHub_full_ST_7i 7 + #define bSemaHub_full_ST_7i 1 + #define MSK32SemaHub_full_ST_7i 0x00000080 + + #define BA_SemaHub_full_ST_8i 0x038D + #define B16SemaHub_full_ST_8i 0x038C + #define LSb32SemaHub_full_ST_8i 8 + #define LSb16SemaHub_full_ST_8i 8 + #define bSemaHub_full_ST_8i 1 + #define MSK32SemaHub_full_ST_8i 0x00000100 + + #define BA_SemaHub_full_ST_9i 0x038D + #define B16SemaHub_full_ST_9i 0x038C + #define LSb32SemaHub_full_ST_9i 9 + #define LSb16SemaHub_full_ST_9i 9 + #define bSemaHub_full_ST_9i 1 + #define MSK32SemaHub_full_ST_9i 0x00000200 + + #define BA_SemaHub_full_ST_10i 0x038D + #define B16SemaHub_full_ST_10i 0x038C + #define LSb32SemaHub_full_ST_10i 10 + #define LSb16SemaHub_full_ST_10i 10 + #define bSemaHub_full_ST_10i 1 + #define MSK32SemaHub_full_ST_10i 0x00000400 + + #define BA_SemaHub_full_ST_11i 0x038D + #define B16SemaHub_full_ST_11i 0x038C + #define LSb32SemaHub_full_ST_11i 11 + #define LSb16SemaHub_full_ST_11i 11 + #define bSemaHub_full_ST_11i 1 + #define MSK32SemaHub_full_ST_11i 0x00000800 + + #define BA_SemaHub_full_ST_12i 0x038D + #define B16SemaHub_full_ST_12i 0x038C + #define LSb32SemaHub_full_ST_12i 12 + #define LSb16SemaHub_full_ST_12i 12 + #define bSemaHub_full_ST_12i 1 + #define MSK32SemaHub_full_ST_12i 0x00001000 + + #define BA_SemaHub_full_ST_13i 0x038D + #define B16SemaHub_full_ST_13i 0x038C + #define LSb32SemaHub_full_ST_13i 13 + #define LSb16SemaHub_full_ST_13i 13 + #define bSemaHub_full_ST_13i 1 + #define MSK32SemaHub_full_ST_13i 0x00002000 + + #define BA_SemaHub_full_ST_14i 0x038D + #define B16SemaHub_full_ST_14i 0x038C + #define LSb32SemaHub_full_ST_14i 14 + #define LSb16SemaHub_full_ST_14i 14 + #define bSemaHub_full_ST_14i 1 + #define MSK32SemaHub_full_ST_14i 0x00004000 + + #define BA_SemaHub_full_ST_15i 0x038D + #define B16SemaHub_full_ST_15i 0x038C + #define LSb32SemaHub_full_ST_15i 15 + #define LSb16SemaHub_full_ST_15i 15 + #define bSemaHub_full_ST_15i 1 + #define MSK32SemaHub_full_ST_15i 0x00008000 + + #define BA_SemaHub_full_ST_16i 0x038E + #define B16SemaHub_full_ST_16i 0x038E + #define LSb32SemaHub_full_ST_16i 16 + #define LSb16SemaHub_full_ST_16i 0 + #define bSemaHub_full_ST_16i 1 + #define MSK32SemaHub_full_ST_16i 0x00010000 + + #define BA_SemaHub_full_ST_17i 0x038E + #define B16SemaHub_full_ST_17i 0x038E + #define LSb32SemaHub_full_ST_17i 17 + #define LSb16SemaHub_full_ST_17i 1 + #define bSemaHub_full_ST_17i 1 + #define MSK32SemaHub_full_ST_17i 0x00020000 + + #define BA_SemaHub_full_ST_18i 0x038E + #define B16SemaHub_full_ST_18i 0x038E + #define LSb32SemaHub_full_ST_18i 18 + #define LSb16SemaHub_full_ST_18i 2 + #define bSemaHub_full_ST_18i 1 + #define MSK32SemaHub_full_ST_18i 0x00040000 + + #define BA_SemaHub_full_ST_19i 0x038E + #define B16SemaHub_full_ST_19i 0x038E + #define LSb32SemaHub_full_ST_19i 19 + #define LSb16SemaHub_full_ST_19i 3 + #define bSemaHub_full_ST_19i 1 + #define MSK32SemaHub_full_ST_19i 0x00080000 + + #define BA_SemaHub_full_ST_20i 0x038E + #define B16SemaHub_full_ST_20i 0x038E + #define LSb32SemaHub_full_ST_20i 20 + #define LSb16SemaHub_full_ST_20i 4 + #define bSemaHub_full_ST_20i 1 + #define MSK32SemaHub_full_ST_20i 0x00100000 + + #define BA_SemaHub_full_ST_21i 0x038E + #define B16SemaHub_full_ST_21i 0x038E + #define LSb32SemaHub_full_ST_21i 21 + #define LSb16SemaHub_full_ST_21i 5 + #define bSemaHub_full_ST_21i 1 + #define MSK32SemaHub_full_ST_21i 0x00200000 + + #define BA_SemaHub_full_ST_22i 0x038E + #define B16SemaHub_full_ST_22i 0x038E + #define LSb32SemaHub_full_ST_22i 22 + #define LSb16SemaHub_full_ST_22i 6 + #define bSemaHub_full_ST_22i 1 + #define MSK32SemaHub_full_ST_22i 0x00400000 + + #define BA_SemaHub_full_ST_23i 0x038E + #define B16SemaHub_full_ST_23i 0x038E + #define LSb32SemaHub_full_ST_23i 23 + #define LSb16SemaHub_full_ST_23i 7 + #define bSemaHub_full_ST_23i 1 + #define MSK32SemaHub_full_ST_23i 0x00800000 + + #define BA_SemaHub_full_ST_24i 0x038F + #define B16SemaHub_full_ST_24i 0x038E + #define LSb32SemaHub_full_ST_24i 24 + #define LSb16SemaHub_full_ST_24i 8 + #define bSemaHub_full_ST_24i 1 + #define MSK32SemaHub_full_ST_24i 0x01000000 + + #define BA_SemaHub_full_ST_25i 0x038F + #define B16SemaHub_full_ST_25i 0x038E + #define LSb32SemaHub_full_ST_25i 25 + #define LSb16SemaHub_full_ST_25i 9 + #define bSemaHub_full_ST_25i 1 + #define MSK32SemaHub_full_ST_25i 0x02000000 + + #define BA_SemaHub_full_ST_26i 0x038F + #define B16SemaHub_full_ST_26i 0x038E + #define LSb32SemaHub_full_ST_26i 26 + #define LSb16SemaHub_full_ST_26i 10 + #define bSemaHub_full_ST_26i 1 + #define MSK32SemaHub_full_ST_26i 0x04000000 + + #define BA_SemaHub_full_ST_27i 0x038F + #define B16SemaHub_full_ST_27i 0x038E + #define LSb32SemaHub_full_ST_27i 27 + #define LSb16SemaHub_full_ST_27i 11 + #define bSemaHub_full_ST_27i 1 + #define MSK32SemaHub_full_ST_27i 0x08000000 + + #define BA_SemaHub_full_ST_28i 0x038F + #define B16SemaHub_full_ST_28i 0x038E + #define LSb32SemaHub_full_ST_28i 28 + #define LSb16SemaHub_full_ST_28i 12 + #define bSemaHub_full_ST_28i 1 + #define MSK32SemaHub_full_ST_28i 0x10000000 + + #define BA_SemaHub_full_ST_29i 0x038F + #define B16SemaHub_full_ST_29i 0x038E + #define LSb32SemaHub_full_ST_29i 29 + #define LSb16SemaHub_full_ST_29i 13 + #define bSemaHub_full_ST_29i 1 + #define MSK32SemaHub_full_ST_29i 0x20000000 + + #define BA_SemaHub_full_ST_30i 0x038F + #define B16SemaHub_full_ST_30i 0x038E + #define LSb32SemaHub_full_ST_30i 30 + #define LSb16SemaHub_full_ST_30i 14 + #define bSemaHub_full_ST_30i 1 + #define MSK32SemaHub_full_ST_30i 0x40000000 + + #define BA_SemaHub_full_ST_31i 0x038F + #define B16SemaHub_full_ST_31i 0x038E + #define LSb32SemaHub_full_ST_31i 31 + #define LSb16SemaHub_full_ST_31i 15 + #define bSemaHub_full_ST_31i 1 + #define MSK32SemaHub_full_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_almostEmpty 0x0390 + + #define BA_SemaHub_almostEmpty_ST_0i 0x0390 + #define B16SemaHub_almostEmpty_ST_0i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_0i 0 + #define LSb16SemaHub_almostEmpty_ST_0i 0 + #define bSemaHub_almostEmpty_ST_0i 1 + #define MSK32SemaHub_almostEmpty_ST_0i 0x00000001 + + #define BA_SemaHub_almostEmpty_ST_1i 0x0390 + #define B16SemaHub_almostEmpty_ST_1i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_1i 1 + #define LSb16SemaHub_almostEmpty_ST_1i 1 + #define bSemaHub_almostEmpty_ST_1i 1 + #define MSK32SemaHub_almostEmpty_ST_1i 0x00000002 + + #define BA_SemaHub_almostEmpty_ST_2i 0x0390 + #define B16SemaHub_almostEmpty_ST_2i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_2i 2 + #define LSb16SemaHub_almostEmpty_ST_2i 2 + #define bSemaHub_almostEmpty_ST_2i 1 + #define MSK32SemaHub_almostEmpty_ST_2i 0x00000004 + + #define BA_SemaHub_almostEmpty_ST_3i 0x0390 + #define B16SemaHub_almostEmpty_ST_3i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_3i 3 + #define LSb16SemaHub_almostEmpty_ST_3i 3 + #define bSemaHub_almostEmpty_ST_3i 1 + #define MSK32SemaHub_almostEmpty_ST_3i 0x00000008 + + #define BA_SemaHub_almostEmpty_ST_4i 0x0390 + #define B16SemaHub_almostEmpty_ST_4i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_4i 4 + #define LSb16SemaHub_almostEmpty_ST_4i 4 + #define bSemaHub_almostEmpty_ST_4i 1 + #define MSK32SemaHub_almostEmpty_ST_4i 0x00000010 + + #define BA_SemaHub_almostEmpty_ST_5i 0x0390 + #define B16SemaHub_almostEmpty_ST_5i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_5i 5 + #define LSb16SemaHub_almostEmpty_ST_5i 5 + #define bSemaHub_almostEmpty_ST_5i 1 + #define MSK32SemaHub_almostEmpty_ST_5i 0x00000020 + + #define BA_SemaHub_almostEmpty_ST_6i 0x0390 + #define B16SemaHub_almostEmpty_ST_6i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_6i 6 + #define LSb16SemaHub_almostEmpty_ST_6i 6 + #define bSemaHub_almostEmpty_ST_6i 1 + #define MSK32SemaHub_almostEmpty_ST_6i 0x00000040 + + #define BA_SemaHub_almostEmpty_ST_7i 0x0390 + #define B16SemaHub_almostEmpty_ST_7i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_7i 7 + #define LSb16SemaHub_almostEmpty_ST_7i 7 + #define bSemaHub_almostEmpty_ST_7i 1 + #define MSK32SemaHub_almostEmpty_ST_7i 0x00000080 + + #define BA_SemaHub_almostEmpty_ST_8i 0x0391 + #define B16SemaHub_almostEmpty_ST_8i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_8i 8 + #define LSb16SemaHub_almostEmpty_ST_8i 8 + #define bSemaHub_almostEmpty_ST_8i 1 + #define MSK32SemaHub_almostEmpty_ST_8i 0x00000100 + + #define BA_SemaHub_almostEmpty_ST_9i 0x0391 + #define B16SemaHub_almostEmpty_ST_9i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_9i 9 + #define LSb16SemaHub_almostEmpty_ST_9i 9 + #define bSemaHub_almostEmpty_ST_9i 1 + #define MSK32SemaHub_almostEmpty_ST_9i 0x00000200 + + #define BA_SemaHub_almostEmpty_ST_10i 0x0391 + #define B16SemaHub_almostEmpty_ST_10i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_10i 10 + #define LSb16SemaHub_almostEmpty_ST_10i 10 + #define bSemaHub_almostEmpty_ST_10i 1 + #define MSK32SemaHub_almostEmpty_ST_10i 0x00000400 + + #define BA_SemaHub_almostEmpty_ST_11i 0x0391 + #define B16SemaHub_almostEmpty_ST_11i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_11i 11 + #define LSb16SemaHub_almostEmpty_ST_11i 11 + #define bSemaHub_almostEmpty_ST_11i 1 + #define MSK32SemaHub_almostEmpty_ST_11i 0x00000800 + + #define BA_SemaHub_almostEmpty_ST_12i 0x0391 + #define B16SemaHub_almostEmpty_ST_12i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_12i 12 + #define LSb16SemaHub_almostEmpty_ST_12i 12 + #define bSemaHub_almostEmpty_ST_12i 1 + #define MSK32SemaHub_almostEmpty_ST_12i 0x00001000 + + #define BA_SemaHub_almostEmpty_ST_13i 0x0391 + #define B16SemaHub_almostEmpty_ST_13i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_13i 13 + #define LSb16SemaHub_almostEmpty_ST_13i 13 + #define bSemaHub_almostEmpty_ST_13i 1 + #define MSK32SemaHub_almostEmpty_ST_13i 0x00002000 + + #define BA_SemaHub_almostEmpty_ST_14i 0x0391 + #define B16SemaHub_almostEmpty_ST_14i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_14i 14 + #define LSb16SemaHub_almostEmpty_ST_14i 14 + #define bSemaHub_almostEmpty_ST_14i 1 + #define MSK32SemaHub_almostEmpty_ST_14i 0x00004000 + + #define BA_SemaHub_almostEmpty_ST_15i 0x0391 + #define B16SemaHub_almostEmpty_ST_15i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_15i 15 + #define LSb16SemaHub_almostEmpty_ST_15i 15 + #define bSemaHub_almostEmpty_ST_15i 1 + #define MSK32SemaHub_almostEmpty_ST_15i 0x00008000 + + #define BA_SemaHub_almostEmpty_ST_16i 0x0392 + #define B16SemaHub_almostEmpty_ST_16i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_16i 16 + #define LSb16SemaHub_almostEmpty_ST_16i 0 + #define bSemaHub_almostEmpty_ST_16i 1 + #define MSK32SemaHub_almostEmpty_ST_16i 0x00010000 + + #define BA_SemaHub_almostEmpty_ST_17i 0x0392 + #define B16SemaHub_almostEmpty_ST_17i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_17i 17 + #define LSb16SemaHub_almostEmpty_ST_17i 1 + #define bSemaHub_almostEmpty_ST_17i 1 + #define MSK32SemaHub_almostEmpty_ST_17i 0x00020000 + + #define BA_SemaHub_almostEmpty_ST_18i 0x0392 + #define B16SemaHub_almostEmpty_ST_18i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_18i 18 + #define LSb16SemaHub_almostEmpty_ST_18i 2 + #define bSemaHub_almostEmpty_ST_18i 1 + #define MSK32SemaHub_almostEmpty_ST_18i 0x00040000 + + #define BA_SemaHub_almostEmpty_ST_19i 0x0392 + #define B16SemaHub_almostEmpty_ST_19i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_19i 19 + #define LSb16SemaHub_almostEmpty_ST_19i 3 + #define bSemaHub_almostEmpty_ST_19i 1 + #define MSK32SemaHub_almostEmpty_ST_19i 0x00080000 + + #define BA_SemaHub_almostEmpty_ST_20i 0x0392 + #define B16SemaHub_almostEmpty_ST_20i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_20i 20 + #define LSb16SemaHub_almostEmpty_ST_20i 4 + #define bSemaHub_almostEmpty_ST_20i 1 + #define MSK32SemaHub_almostEmpty_ST_20i 0x00100000 + + #define BA_SemaHub_almostEmpty_ST_21i 0x0392 + #define B16SemaHub_almostEmpty_ST_21i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_21i 21 + #define LSb16SemaHub_almostEmpty_ST_21i 5 + #define bSemaHub_almostEmpty_ST_21i 1 + #define MSK32SemaHub_almostEmpty_ST_21i 0x00200000 + + #define BA_SemaHub_almostEmpty_ST_22i 0x0392 + #define B16SemaHub_almostEmpty_ST_22i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_22i 22 + #define LSb16SemaHub_almostEmpty_ST_22i 6 + #define bSemaHub_almostEmpty_ST_22i 1 + #define MSK32SemaHub_almostEmpty_ST_22i 0x00400000 + + #define BA_SemaHub_almostEmpty_ST_23i 0x0392 + #define B16SemaHub_almostEmpty_ST_23i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_23i 23 + #define LSb16SemaHub_almostEmpty_ST_23i 7 + #define bSemaHub_almostEmpty_ST_23i 1 + #define MSK32SemaHub_almostEmpty_ST_23i 0x00800000 + + #define BA_SemaHub_almostEmpty_ST_24i 0x0393 + #define B16SemaHub_almostEmpty_ST_24i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_24i 24 + #define LSb16SemaHub_almostEmpty_ST_24i 8 + #define bSemaHub_almostEmpty_ST_24i 1 + #define MSK32SemaHub_almostEmpty_ST_24i 0x01000000 + + #define BA_SemaHub_almostEmpty_ST_25i 0x0393 + #define B16SemaHub_almostEmpty_ST_25i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_25i 25 + #define LSb16SemaHub_almostEmpty_ST_25i 9 + #define bSemaHub_almostEmpty_ST_25i 1 + #define MSK32SemaHub_almostEmpty_ST_25i 0x02000000 + + #define BA_SemaHub_almostEmpty_ST_26i 0x0393 + #define B16SemaHub_almostEmpty_ST_26i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_26i 26 + #define LSb16SemaHub_almostEmpty_ST_26i 10 + #define bSemaHub_almostEmpty_ST_26i 1 + #define MSK32SemaHub_almostEmpty_ST_26i 0x04000000 + + #define BA_SemaHub_almostEmpty_ST_27i 0x0393 + #define B16SemaHub_almostEmpty_ST_27i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_27i 27 + #define LSb16SemaHub_almostEmpty_ST_27i 11 + #define bSemaHub_almostEmpty_ST_27i 1 + #define MSK32SemaHub_almostEmpty_ST_27i 0x08000000 + + #define BA_SemaHub_almostEmpty_ST_28i 0x0393 + #define B16SemaHub_almostEmpty_ST_28i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_28i 28 + #define LSb16SemaHub_almostEmpty_ST_28i 12 + #define bSemaHub_almostEmpty_ST_28i 1 + #define MSK32SemaHub_almostEmpty_ST_28i 0x10000000 + + #define BA_SemaHub_almostEmpty_ST_29i 0x0393 + #define B16SemaHub_almostEmpty_ST_29i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_29i 29 + #define LSb16SemaHub_almostEmpty_ST_29i 13 + #define bSemaHub_almostEmpty_ST_29i 1 + #define MSK32SemaHub_almostEmpty_ST_29i 0x20000000 + + #define BA_SemaHub_almostEmpty_ST_30i 0x0393 + #define B16SemaHub_almostEmpty_ST_30i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_30i 30 + #define LSb16SemaHub_almostEmpty_ST_30i 14 + #define bSemaHub_almostEmpty_ST_30i 1 + #define MSK32SemaHub_almostEmpty_ST_30i 0x40000000 + + #define BA_SemaHub_almostEmpty_ST_31i 0x0393 + #define B16SemaHub_almostEmpty_ST_31i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_31i 31 + #define LSb16SemaHub_almostEmpty_ST_31i 15 + #define bSemaHub_almostEmpty_ST_31i 1 + #define MSK32SemaHub_almostEmpty_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_almostFull 0x0394 + + #define BA_SemaHub_almostFull_ST_0i 0x0394 + #define B16SemaHub_almostFull_ST_0i 0x0394 + #define LSb32SemaHub_almostFull_ST_0i 0 + #define LSb16SemaHub_almostFull_ST_0i 0 + #define bSemaHub_almostFull_ST_0i 1 + #define MSK32SemaHub_almostFull_ST_0i 0x00000001 + + #define BA_SemaHub_almostFull_ST_1i 0x0394 + #define B16SemaHub_almostFull_ST_1i 0x0394 + #define LSb32SemaHub_almostFull_ST_1i 1 + #define LSb16SemaHub_almostFull_ST_1i 1 + #define bSemaHub_almostFull_ST_1i 1 + #define MSK32SemaHub_almostFull_ST_1i 0x00000002 + + #define BA_SemaHub_almostFull_ST_2i 0x0394 + #define B16SemaHub_almostFull_ST_2i 0x0394 + #define LSb32SemaHub_almostFull_ST_2i 2 + #define LSb16SemaHub_almostFull_ST_2i 2 + #define bSemaHub_almostFull_ST_2i 1 + #define MSK32SemaHub_almostFull_ST_2i 0x00000004 + + #define BA_SemaHub_almostFull_ST_3i 0x0394 + #define B16SemaHub_almostFull_ST_3i 0x0394 + #define LSb32SemaHub_almostFull_ST_3i 3 + #define LSb16SemaHub_almostFull_ST_3i 3 + #define bSemaHub_almostFull_ST_3i 1 + #define MSK32SemaHub_almostFull_ST_3i 0x00000008 + + #define BA_SemaHub_almostFull_ST_4i 0x0394 + #define B16SemaHub_almostFull_ST_4i 0x0394 + #define LSb32SemaHub_almostFull_ST_4i 4 + #define LSb16SemaHub_almostFull_ST_4i 4 + #define bSemaHub_almostFull_ST_4i 1 + #define MSK32SemaHub_almostFull_ST_4i 0x00000010 + + #define BA_SemaHub_almostFull_ST_5i 0x0394 + #define B16SemaHub_almostFull_ST_5i 0x0394 + #define LSb32SemaHub_almostFull_ST_5i 5 + #define LSb16SemaHub_almostFull_ST_5i 5 + #define bSemaHub_almostFull_ST_5i 1 + #define MSK32SemaHub_almostFull_ST_5i 0x00000020 + + #define BA_SemaHub_almostFull_ST_6i 0x0394 + #define B16SemaHub_almostFull_ST_6i 0x0394 + #define LSb32SemaHub_almostFull_ST_6i 6 + #define LSb16SemaHub_almostFull_ST_6i 6 + #define bSemaHub_almostFull_ST_6i 1 + #define MSK32SemaHub_almostFull_ST_6i 0x00000040 + + #define BA_SemaHub_almostFull_ST_7i 0x0394 + #define B16SemaHub_almostFull_ST_7i 0x0394 + #define LSb32SemaHub_almostFull_ST_7i 7 + #define LSb16SemaHub_almostFull_ST_7i 7 + #define bSemaHub_almostFull_ST_7i 1 + #define MSK32SemaHub_almostFull_ST_7i 0x00000080 + + #define BA_SemaHub_almostFull_ST_8i 0x0395 + #define B16SemaHub_almostFull_ST_8i 0x0394 + #define LSb32SemaHub_almostFull_ST_8i 8 + #define LSb16SemaHub_almostFull_ST_8i 8 + #define bSemaHub_almostFull_ST_8i 1 + #define MSK32SemaHub_almostFull_ST_8i 0x00000100 + + #define BA_SemaHub_almostFull_ST_9i 0x0395 + #define B16SemaHub_almostFull_ST_9i 0x0394 + #define LSb32SemaHub_almostFull_ST_9i 9 + #define LSb16SemaHub_almostFull_ST_9i 9 + #define bSemaHub_almostFull_ST_9i 1 + #define MSK32SemaHub_almostFull_ST_9i 0x00000200 + + #define BA_SemaHub_almostFull_ST_10i 0x0395 + #define B16SemaHub_almostFull_ST_10i 0x0394 + #define LSb32SemaHub_almostFull_ST_10i 10 + #define LSb16SemaHub_almostFull_ST_10i 10 + #define bSemaHub_almostFull_ST_10i 1 + #define MSK32SemaHub_almostFull_ST_10i 0x00000400 + + #define BA_SemaHub_almostFull_ST_11i 0x0395 + #define B16SemaHub_almostFull_ST_11i 0x0394 + #define LSb32SemaHub_almostFull_ST_11i 11 + #define LSb16SemaHub_almostFull_ST_11i 11 + #define bSemaHub_almostFull_ST_11i 1 + #define MSK32SemaHub_almostFull_ST_11i 0x00000800 + + #define BA_SemaHub_almostFull_ST_12i 0x0395 + #define B16SemaHub_almostFull_ST_12i 0x0394 + #define LSb32SemaHub_almostFull_ST_12i 12 + #define LSb16SemaHub_almostFull_ST_12i 12 + #define bSemaHub_almostFull_ST_12i 1 + #define MSK32SemaHub_almostFull_ST_12i 0x00001000 + + #define BA_SemaHub_almostFull_ST_13i 0x0395 + #define B16SemaHub_almostFull_ST_13i 0x0394 + #define LSb32SemaHub_almostFull_ST_13i 13 + #define LSb16SemaHub_almostFull_ST_13i 13 + #define bSemaHub_almostFull_ST_13i 1 + #define MSK32SemaHub_almostFull_ST_13i 0x00002000 + + #define BA_SemaHub_almostFull_ST_14i 0x0395 + #define B16SemaHub_almostFull_ST_14i 0x0394 + #define LSb32SemaHub_almostFull_ST_14i 14 + #define LSb16SemaHub_almostFull_ST_14i 14 + #define bSemaHub_almostFull_ST_14i 1 + #define MSK32SemaHub_almostFull_ST_14i 0x00004000 + + #define BA_SemaHub_almostFull_ST_15i 0x0395 + #define B16SemaHub_almostFull_ST_15i 0x0394 + #define LSb32SemaHub_almostFull_ST_15i 15 + #define LSb16SemaHub_almostFull_ST_15i 15 + #define bSemaHub_almostFull_ST_15i 1 + #define MSK32SemaHub_almostFull_ST_15i 0x00008000 + + #define BA_SemaHub_almostFull_ST_16i 0x0396 + #define B16SemaHub_almostFull_ST_16i 0x0396 + #define LSb32SemaHub_almostFull_ST_16i 16 + #define LSb16SemaHub_almostFull_ST_16i 0 + #define bSemaHub_almostFull_ST_16i 1 + #define MSK32SemaHub_almostFull_ST_16i 0x00010000 + + #define BA_SemaHub_almostFull_ST_17i 0x0396 + #define B16SemaHub_almostFull_ST_17i 0x0396 + #define LSb32SemaHub_almostFull_ST_17i 17 + #define LSb16SemaHub_almostFull_ST_17i 1 + #define bSemaHub_almostFull_ST_17i 1 + #define MSK32SemaHub_almostFull_ST_17i 0x00020000 + + #define BA_SemaHub_almostFull_ST_18i 0x0396 + #define B16SemaHub_almostFull_ST_18i 0x0396 + #define LSb32SemaHub_almostFull_ST_18i 18 + #define LSb16SemaHub_almostFull_ST_18i 2 + #define bSemaHub_almostFull_ST_18i 1 + #define MSK32SemaHub_almostFull_ST_18i 0x00040000 + + #define BA_SemaHub_almostFull_ST_19i 0x0396 + #define B16SemaHub_almostFull_ST_19i 0x0396 + #define LSb32SemaHub_almostFull_ST_19i 19 + #define LSb16SemaHub_almostFull_ST_19i 3 + #define bSemaHub_almostFull_ST_19i 1 + #define MSK32SemaHub_almostFull_ST_19i 0x00080000 + + #define BA_SemaHub_almostFull_ST_20i 0x0396 + #define B16SemaHub_almostFull_ST_20i 0x0396 + #define LSb32SemaHub_almostFull_ST_20i 20 + #define LSb16SemaHub_almostFull_ST_20i 4 + #define bSemaHub_almostFull_ST_20i 1 + #define MSK32SemaHub_almostFull_ST_20i 0x00100000 + + #define BA_SemaHub_almostFull_ST_21i 0x0396 + #define B16SemaHub_almostFull_ST_21i 0x0396 + #define LSb32SemaHub_almostFull_ST_21i 21 + #define LSb16SemaHub_almostFull_ST_21i 5 + #define bSemaHub_almostFull_ST_21i 1 + #define MSK32SemaHub_almostFull_ST_21i 0x00200000 + + #define BA_SemaHub_almostFull_ST_22i 0x0396 + #define B16SemaHub_almostFull_ST_22i 0x0396 + #define LSb32SemaHub_almostFull_ST_22i 22 + #define LSb16SemaHub_almostFull_ST_22i 6 + #define bSemaHub_almostFull_ST_22i 1 + #define MSK32SemaHub_almostFull_ST_22i 0x00400000 + + #define BA_SemaHub_almostFull_ST_23i 0x0396 + #define B16SemaHub_almostFull_ST_23i 0x0396 + #define LSb32SemaHub_almostFull_ST_23i 23 + #define LSb16SemaHub_almostFull_ST_23i 7 + #define bSemaHub_almostFull_ST_23i 1 + #define MSK32SemaHub_almostFull_ST_23i 0x00800000 + + #define BA_SemaHub_almostFull_ST_24i 0x0397 + #define B16SemaHub_almostFull_ST_24i 0x0396 + #define LSb32SemaHub_almostFull_ST_24i 24 + #define LSb16SemaHub_almostFull_ST_24i 8 + #define bSemaHub_almostFull_ST_24i 1 + #define MSK32SemaHub_almostFull_ST_24i 0x01000000 + + #define BA_SemaHub_almostFull_ST_25i 0x0397 + #define B16SemaHub_almostFull_ST_25i 0x0396 + #define LSb32SemaHub_almostFull_ST_25i 25 + #define LSb16SemaHub_almostFull_ST_25i 9 + #define bSemaHub_almostFull_ST_25i 1 + #define MSK32SemaHub_almostFull_ST_25i 0x02000000 + + #define BA_SemaHub_almostFull_ST_26i 0x0397 + #define B16SemaHub_almostFull_ST_26i 0x0396 + #define LSb32SemaHub_almostFull_ST_26i 26 + #define LSb16SemaHub_almostFull_ST_26i 10 + #define bSemaHub_almostFull_ST_26i 1 + #define MSK32SemaHub_almostFull_ST_26i 0x04000000 + + #define BA_SemaHub_almostFull_ST_27i 0x0397 + #define B16SemaHub_almostFull_ST_27i 0x0396 + #define LSb32SemaHub_almostFull_ST_27i 27 + #define LSb16SemaHub_almostFull_ST_27i 11 + #define bSemaHub_almostFull_ST_27i 1 + #define MSK32SemaHub_almostFull_ST_27i 0x08000000 + + #define BA_SemaHub_almostFull_ST_28i 0x0397 + #define B16SemaHub_almostFull_ST_28i 0x0396 + #define LSb32SemaHub_almostFull_ST_28i 28 + #define LSb16SemaHub_almostFull_ST_28i 12 + #define bSemaHub_almostFull_ST_28i 1 + #define MSK32SemaHub_almostFull_ST_28i 0x10000000 + + #define BA_SemaHub_almostFull_ST_29i 0x0397 + #define B16SemaHub_almostFull_ST_29i 0x0396 + #define LSb32SemaHub_almostFull_ST_29i 29 + #define LSb16SemaHub_almostFull_ST_29i 13 + #define bSemaHub_almostFull_ST_29i 1 + #define MSK32SemaHub_almostFull_ST_29i 0x20000000 + + #define BA_SemaHub_almostFull_ST_30i 0x0397 + #define B16SemaHub_almostFull_ST_30i 0x0396 + #define LSb32SemaHub_almostFull_ST_30i 30 + #define LSb16SemaHub_almostFull_ST_30i 14 + #define bSemaHub_almostFull_ST_30i 1 + #define MSK32SemaHub_almostFull_ST_30i 0x40000000 + + #define BA_SemaHub_almostFull_ST_31i 0x0397 + #define B16SemaHub_almostFull_ST_31i 0x0396 + #define LSb32SemaHub_almostFull_ST_31i 31 + #define LSb16SemaHub_almostFull_ST_31i 15 + #define bSemaHub_almostFull_ST_31i 1 + #define MSK32SemaHub_almostFull_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaHub { + /////////////////////////////////////////////////////////// + SIE_SemaQuery ie_counter[64]; + /////////////////////////////////////////////////////////// + SIE_Semaphore ie_cell[32]; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_PUSH_ID(r32) _BFGET_(r32, 7, 0) + #define SET32SemaHub_PUSH_ID(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16SemaHub_PUSH_ID(r16) _BFGET_(r16, 7, 0) + #define SET16SemaHub_PUSH_ID(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32SemaHub_PUSH_delta(r32) _BFGET_(r32,15, 8) + #define SET32SemaHub_PUSH_delta(r32,v) _BFSET_(r32,15, 8,v) + #define GET16SemaHub_PUSH_delta(r16) _BFGET_(r16,15, 8) + #define SET16SemaHub_PUSH_delta(r16,v) _BFSET_(r16,15, 8,v) + + #define w32SemaHub_PUSH {\ + UNSG32 uPUSH_ID : 8;\ + UNSG32 uPUSH_delta : 8;\ + UNSG32 RSVDx380_b16 : 16;\ + } + union { UNSG32 u32SemaHub_PUSH; + struct w32SemaHub_PUSH; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_POP_ID(r32) _BFGET_(r32, 7, 0) + #define SET32SemaHub_POP_ID(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16SemaHub_POP_ID(r16) _BFGET_(r16, 7, 0) + #define SET16SemaHub_POP_ID(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32SemaHub_POP_delta(r32) _BFGET_(r32,15, 8) + #define SET32SemaHub_POP_delta(r32,v) _BFSET_(r32,15, 8,v) + #define GET16SemaHub_POP_delta(r16) _BFGET_(r16,15, 8) + #define SET16SemaHub_POP_delta(r16,v) _BFSET_(r16,15, 8,v) + + #define w32SemaHub_POP {\ + UNSG32 uPOP_ID : 8;\ + UNSG32 uPOP_delta : 8;\ + UNSG32 RSVDx384_b16 : 16;\ + } + union { UNSG32 u32SemaHub_POP; + struct w32SemaHub_POP; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_empty_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_empty_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_empty_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_empty_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_empty_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_empty_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_empty_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_empty_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_empty_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_empty_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_empty_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_empty_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_empty_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_empty_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_empty_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_empty_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_empty_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_empty_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_empty_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_empty_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_empty_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_empty_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_empty_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_empty_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_empty_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_empty_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_empty_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_empty_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_empty_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_empty_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_empty_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_empty_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_empty_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_empty_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_empty_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_empty_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_empty_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_empty_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_empty_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_empty_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_empty_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_empty_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_empty_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_empty_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_empty_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_empty_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_empty_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_empty_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_empty_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_empty_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_empty_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_empty_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_empty_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_empty_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_empty_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_empty_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_empty_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_empty_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_empty_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_empty_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_empty_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_empty_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_empty_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_empty_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_empty_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_empty_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_empty_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_empty_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_empty_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_empty_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_empty_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_empty_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_empty_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_empty_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_empty_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_empty_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_empty_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_empty_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_empty_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_empty_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_empty_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_empty_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_empty_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_empty_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_empty_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_empty_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_empty_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_empty_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_empty_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_empty_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_empty_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_empty_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_empty_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_empty_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_empty_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_empty_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_empty_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_empty_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_empty_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_empty_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_empty_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_empty_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_empty_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_empty_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_empty_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_empty_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_empty_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_empty_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_empty_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_empty_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_empty_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_empty_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_empty_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_empty_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_empty_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_empty_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_empty_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_empty_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_empty_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_empty_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_empty_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_empty_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_empty_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_empty_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_empty_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_empty_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_empty_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_empty_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_empty {\ + UNSG32 uempty_ST_0i : 1;\ + UNSG32 uempty_ST_1i : 1;\ + UNSG32 uempty_ST_2i : 1;\ + UNSG32 uempty_ST_3i : 1;\ + UNSG32 uempty_ST_4i : 1;\ + UNSG32 uempty_ST_5i : 1;\ + UNSG32 uempty_ST_6i : 1;\ + UNSG32 uempty_ST_7i : 1;\ + UNSG32 uempty_ST_8i : 1;\ + UNSG32 uempty_ST_9i : 1;\ + UNSG32 uempty_ST_10i : 1;\ + UNSG32 uempty_ST_11i : 1;\ + UNSG32 uempty_ST_12i : 1;\ + UNSG32 uempty_ST_13i : 1;\ + UNSG32 uempty_ST_14i : 1;\ + UNSG32 uempty_ST_15i : 1;\ + UNSG32 uempty_ST_16i : 1;\ + UNSG32 uempty_ST_17i : 1;\ + UNSG32 uempty_ST_18i : 1;\ + UNSG32 uempty_ST_19i : 1;\ + UNSG32 uempty_ST_20i : 1;\ + UNSG32 uempty_ST_21i : 1;\ + UNSG32 uempty_ST_22i : 1;\ + UNSG32 uempty_ST_23i : 1;\ + UNSG32 uempty_ST_24i : 1;\ + UNSG32 uempty_ST_25i : 1;\ + UNSG32 uempty_ST_26i : 1;\ + UNSG32 uempty_ST_27i : 1;\ + UNSG32 uempty_ST_28i : 1;\ + UNSG32 uempty_ST_29i : 1;\ + UNSG32 uempty_ST_30i : 1;\ + UNSG32 uempty_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_empty; + struct w32SemaHub_empty; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_full_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_full_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_full_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_full_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_full_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_full_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_full_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_full_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_full_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_full_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_full_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_full_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_full_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_full_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_full_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_full_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_full_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_full_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_full_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_full_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_full_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_full_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_full_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_full_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_full_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_full_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_full_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_full_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_full_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_full_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_full_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_full_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_full_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_full_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_full_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_full_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_full_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_full_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_full_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_full_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_full_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_full_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_full_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_full_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_full_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_full_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_full_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_full_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_full_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_full_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_full_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_full_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_full_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_full_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_full_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_full_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_full_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_full_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_full_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_full_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_full_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_full_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_full_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_full_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_full_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_full_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_full_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_full_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_full_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_full_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_full_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_full_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_full_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_full_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_full_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_full_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_full_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_full_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_full_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_full_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_full_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_full_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_full_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_full_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_full_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_full_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_full_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_full_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_full_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_full_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_full_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_full_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_full_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_full_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_full_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_full_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_full_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_full_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_full_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_full_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_full_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_full_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_full_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_full_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_full_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_full_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_full_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_full_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_full_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_full_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_full_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_full_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_full_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_full_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_full_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_full_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_full_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_full_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_full_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_full_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_full_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_full_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_full_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_full_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_full_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_full_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_full_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_full_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_full {\ + UNSG32 ufull_ST_0i : 1;\ + UNSG32 ufull_ST_1i : 1;\ + UNSG32 ufull_ST_2i : 1;\ + UNSG32 ufull_ST_3i : 1;\ + UNSG32 ufull_ST_4i : 1;\ + UNSG32 ufull_ST_5i : 1;\ + UNSG32 ufull_ST_6i : 1;\ + UNSG32 ufull_ST_7i : 1;\ + UNSG32 ufull_ST_8i : 1;\ + UNSG32 ufull_ST_9i : 1;\ + UNSG32 ufull_ST_10i : 1;\ + UNSG32 ufull_ST_11i : 1;\ + UNSG32 ufull_ST_12i : 1;\ + UNSG32 ufull_ST_13i : 1;\ + UNSG32 ufull_ST_14i : 1;\ + UNSG32 ufull_ST_15i : 1;\ + UNSG32 ufull_ST_16i : 1;\ + UNSG32 ufull_ST_17i : 1;\ + UNSG32 ufull_ST_18i : 1;\ + UNSG32 ufull_ST_19i : 1;\ + UNSG32 ufull_ST_20i : 1;\ + UNSG32 ufull_ST_21i : 1;\ + UNSG32 ufull_ST_22i : 1;\ + UNSG32 ufull_ST_23i : 1;\ + UNSG32 ufull_ST_24i : 1;\ + UNSG32 ufull_ST_25i : 1;\ + UNSG32 ufull_ST_26i : 1;\ + UNSG32 ufull_ST_27i : 1;\ + UNSG32 ufull_ST_28i : 1;\ + UNSG32 ufull_ST_29i : 1;\ + UNSG32 ufull_ST_30i : 1;\ + UNSG32 ufull_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_full; + struct w32SemaHub_full; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_almostEmpty_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_almostEmpty_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_almostEmpty_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostEmpty_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostEmpty_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_almostEmpty_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_almostEmpty_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostEmpty_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostEmpty_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_almostEmpty_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_almostEmpty_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostEmpty_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostEmpty_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_almostEmpty_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_almostEmpty_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostEmpty_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostEmpty_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_almostEmpty_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_almostEmpty_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostEmpty_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostEmpty_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_almostEmpty_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_almostEmpty_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostEmpty_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostEmpty_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_almostEmpty_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_almostEmpty_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostEmpty_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostEmpty_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_almostEmpty_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_almostEmpty_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostEmpty_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostEmpty_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_almostEmpty_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_almostEmpty_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostEmpty_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostEmpty_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_almostEmpty_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_almostEmpty_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostEmpty_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostEmpty_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_almostEmpty_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_almostEmpty_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostEmpty_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostEmpty_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_almostEmpty_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_almostEmpty_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostEmpty_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostEmpty_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_almostEmpty_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_almostEmpty_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostEmpty_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostEmpty_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_almostEmpty_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_almostEmpty_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostEmpty_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostEmpty_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_almostEmpty_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_almostEmpty_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostEmpty_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostEmpty_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_almostEmpty_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_almostEmpty_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostEmpty_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_almostEmpty_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_almostEmpty_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_almostEmpty_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostEmpty_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostEmpty_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_almostEmpty_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_almostEmpty_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostEmpty_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostEmpty_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_almostEmpty_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_almostEmpty_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostEmpty_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostEmpty_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_almostEmpty_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_almostEmpty_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostEmpty_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostEmpty_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_almostEmpty_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_almostEmpty_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostEmpty_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostEmpty_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_almostEmpty_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_almostEmpty_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostEmpty_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostEmpty_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_almostEmpty_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_almostEmpty_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostEmpty_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostEmpty_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_almostEmpty_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_almostEmpty_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostEmpty_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostEmpty_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_almostEmpty_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_almostEmpty_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostEmpty_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostEmpty_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_almostEmpty_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_almostEmpty_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostEmpty_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostEmpty_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_almostEmpty_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_almostEmpty_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostEmpty_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostEmpty_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_almostEmpty_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_almostEmpty_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostEmpty_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostEmpty_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_almostEmpty_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_almostEmpty_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostEmpty_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostEmpty_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_almostEmpty_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_almostEmpty_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostEmpty_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostEmpty_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_almostEmpty_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_almostEmpty_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostEmpty_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostEmpty_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_almostEmpty_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_almostEmpty_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostEmpty_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_almostEmpty {\ + UNSG32 ualmostEmpty_ST_0i : 1;\ + UNSG32 ualmostEmpty_ST_1i : 1;\ + UNSG32 ualmostEmpty_ST_2i : 1;\ + UNSG32 ualmostEmpty_ST_3i : 1;\ + UNSG32 ualmostEmpty_ST_4i : 1;\ + UNSG32 ualmostEmpty_ST_5i : 1;\ + UNSG32 ualmostEmpty_ST_6i : 1;\ + UNSG32 ualmostEmpty_ST_7i : 1;\ + UNSG32 ualmostEmpty_ST_8i : 1;\ + UNSG32 ualmostEmpty_ST_9i : 1;\ + UNSG32 ualmostEmpty_ST_10i : 1;\ + UNSG32 ualmostEmpty_ST_11i : 1;\ + UNSG32 ualmostEmpty_ST_12i : 1;\ + UNSG32 ualmostEmpty_ST_13i : 1;\ + UNSG32 ualmostEmpty_ST_14i : 1;\ + UNSG32 ualmostEmpty_ST_15i : 1;\ + UNSG32 ualmostEmpty_ST_16i : 1;\ + UNSG32 ualmostEmpty_ST_17i : 1;\ + UNSG32 ualmostEmpty_ST_18i : 1;\ + UNSG32 ualmostEmpty_ST_19i : 1;\ + UNSG32 ualmostEmpty_ST_20i : 1;\ + UNSG32 ualmostEmpty_ST_21i : 1;\ + UNSG32 ualmostEmpty_ST_22i : 1;\ + UNSG32 ualmostEmpty_ST_23i : 1;\ + UNSG32 ualmostEmpty_ST_24i : 1;\ + UNSG32 ualmostEmpty_ST_25i : 1;\ + UNSG32 ualmostEmpty_ST_26i : 1;\ + UNSG32 ualmostEmpty_ST_27i : 1;\ + UNSG32 ualmostEmpty_ST_28i : 1;\ + UNSG32 ualmostEmpty_ST_29i : 1;\ + UNSG32 ualmostEmpty_ST_30i : 1;\ + UNSG32 ualmostEmpty_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_almostEmpty; + struct w32SemaHub_almostEmpty; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_almostFull_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_almostFull_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_almostFull_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostFull_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostFull_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_almostFull_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_almostFull_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostFull_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostFull_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_almostFull_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_almostFull_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostFull_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostFull_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_almostFull_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_almostFull_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostFull_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostFull_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_almostFull_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_almostFull_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostFull_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostFull_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_almostFull_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_almostFull_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostFull_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostFull_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_almostFull_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_almostFull_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostFull_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostFull_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_almostFull_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_almostFull_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostFull_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostFull_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_almostFull_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_almostFull_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostFull_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostFull_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_almostFull_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_almostFull_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostFull_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostFull_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_almostFull_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_almostFull_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostFull_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostFull_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_almostFull_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_almostFull_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostFull_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostFull_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_almostFull_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_almostFull_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostFull_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostFull_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_almostFull_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_almostFull_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostFull_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostFull_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_almostFull_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_almostFull_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostFull_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostFull_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_almostFull_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_almostFull_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostFull_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_almostFull_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_almostFull_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_almostFull_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostFull_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostFull_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_almostFull_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_almostFull_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostFull_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostFull_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_almostFull_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_almostFull_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostFull_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostFull_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_almostFull_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_almostFull_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostFull_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostFull_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_almostFull_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_almostFull_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostFull_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostFull_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_almostFull_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_almostFull_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostFull_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostFull_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_almostFull_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_almostFull_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostFull_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostFull_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_almostFull_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_almostFull_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostFull_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostFull_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_almostFull_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_almostFull_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostFull_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostFull_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_almostFull_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_almostFull_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostFull_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostFull_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_almostFull_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_almostFull_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostFull_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostFull_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_almostFull_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_almostFull_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostFull_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostFull_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_almostFull_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_almostFull_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostFull_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostFull_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_almostFull_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_almostFull_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostFull_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostFull_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_almostFull_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_almostFull_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostFull_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostFull_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_almostFull_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_almostFull_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostFull_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_almostFull {\ + UNSG32 ualmostFull_ST_0i : 1;\ + UNSG32 ualmostFull_ST_1i : 1;\ + UNSG32 ualmostFull_ST_2i : 1;\ + UNSG32 ualmostFull_ST_3i : 1;\ + UNSG32 ualmostFull_ST_4i : 1;\ + UNSG32 ualmostFull_ST_5i : 1;\ + UNSG32 ualmostFull_ST_6i : 1;\ + UNSG32 ualmostFull_ST_7i : 1;\ + UNSG32 ualmostFull_ST_8i : 1;\ + UNSG32 ualmostFull_ST_9i : 1;\ + UNSG32 ualmostFull_ST_10i : 1;\ + UNSG32 ualmostFull_ST_11i : 1;\ + UNSG32 ualmostFull_ST_12i : 1;\ + UNSG32 ualmostFull_ST_13i : 1;\ + UNSG32 ualmostFull_ST_14i : 1;\ + UNSG32 ualmostFull_ST_15i : 1;\ + UNSG32 ualmostFull_ST_16i : 1;\ + UNSG32 ualmostFull_ST_17i : 1;\ + UNSG32 ualmostFull_ST_18i : 1;\ + UNSG32 ualmostFull_ST_19i : 1;\ + UNSG32 ualmostFull_ST_20i : 1;\ + UNSG32 ualmostFull_ST_21i : 1;\ + UNSG32 ualmostFull_ST_22i : 1;\ + UNSG32 ualmostFull_ST_23i : 1;\ + UNSG32 ualmostFull_ST_24i : 1;\ + UNSG32 ualmostFull_ST_25i : 1;\ + UNSG32 ualmostFull_ST_26i : 1;\ + UNSG32 ualmostFull_ST_27i : 1;\ + UNSG32 ualmostFull_ST_28i : 1;\ + UNSG32 ualmostFull_ST_29i : 1;\ + UNSG32 ualmostFull_ST_30i : 1;\ + UNSG32 ualmostFull_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_almostFull; + struct w32SemaHub_almostFull; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx398 [104]; + /////////////////////////////////////////////////////////// + } SIE_SemaHub; + + typedef union T32SemaHub_PUSH + { UNSG32 u32; + struct w32SemaHub_PUSH; + } T32SemaHub_PUSH; + typedef union T32SemaHub_POP + { UNSG32 u32; + struct w32SemaHub_POP; + } T32SemaHub_POP; + typedef union T32SemaHub_empty + { UNSG32 u32; + struct w32SemaHub_empty; + } T32SemaHub_empty; + typedef union T32SemaHub_full + { UNSG32 u32; + struct w32SemaHub_full; + } T32SemaHub_full; + typedef union T32SemaHub_almostEmpty + { UNSG32 u32; + struct w32SemaHub_almostEmpty; + } T32SemaHub_almostEmpty; + typedef union T32SemaHub_almostFull + { UNSG32 u32; + struct w32SemaHub_almostFull; + } T32SemaHub_almostFull; + /////////////////////////////////////////////////////////// + + typedef union TSemaHub_PUSH + { UNSG32 u32[1]; + struct { + struct w32SemaHub_PUSH; + }; + } TSemaHub_PUSH; + typedef union TSemaHub_POP + { UNSG32 u32[1]; + struct { + struct w32SemaHub_POP; + }; + } TSemaHub_POP; + typedef union TSemaHub_empty + { UNSG32 u32[1]; + struct { + struct w32SemaHub_empty; + }; + } TSemaHub_empty; + typedef union TSemaHub_full + { UNSG32 u32[1]; + struct { + struct w32SemaHub_full; + }; + } TSemaHub_full; + typedef union TSemaHub_almostEmpty + { UNSG32 u32[1]; + struct { + struct w32SemaHub_almostEmpty; + }; + } TSemaHub_almostEmpty; + typedef union TSemaHub_almostFull + { UNSG32 u32[1]; + struct { + struct w32SemaHub_almostFull; + }; + } TSemaHub_almostFull; + + /////////////////////////////////////////////////////////// + SIGN32 SemaHub_drvrd(SIE_SemaHub *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaHub_drvwr(SIE_SemaHub *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaHub_reset(SIE_SemaHub *p); + SIGN32 SemaHub_cmp (SIE_SemaHub *p, SIE_SemaHub *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaHub_check(p,pie,pfx,hLOG) SemaHub_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaHub_print(p, pfx,hLOG) SemaHub_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaHub +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE FiFo biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 20 BASE +/// ### +/// * Base address (byte-address) of a FIFO in the shared SRAM. A channel's read/write pointers will be added to this “BASE†to get exact location of shared SRAM. +/// * Note: aligned with base SRAM data bus. +/// * For example, if SRAM data is 64-bit, then base[2:0] should be 3'b0; +/// ### +/// %% 12 # Stuffing bits... +/// @ 0x00004 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to this register will enable this channel, or 0 to this register will disable this channel. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to clear FIFO pointers to 0. +/// * Note : +/// * CPU should make sure to disabled the channel (write 0 to START_EN register) before issue clear command, otherwise the clear request will be ignored. +/// * Do not restart the channel when clear operation is in process. +/// * HW will make sure there is no pending transactions before execute the clear operation. +/// * Associated semaphore cell needs reset separately by re-write “CFG_DEPTH†+/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C FLUSH (W-) +/// %unsigned 1 EN +/// ### +/// * No support for now +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 23b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_FiFo +#define h_FiFo (){} + + #define RA_FiFo_CFG 0x0000 + + #define BA_FiFo_CFG_BASE 0x0000 + #define B16FiFo_CFG_BASE 0x0000 + #define LSb32FiFo_CFG_BASE 0 + #define LSb16FiFo_CFG_BASE 0 + #define bFiFo_CFG_BASE 20 + #define MSK32FiFo_CFG_BASE 0x000FFFFF + /////////////////////////////////////////////////////////// + #define RA_FiFo_START 0x0004 + + #define BA_FiFo_START_EN 0x0004 + #define B16FiFo_START_EN 0x0004 + #define LSb32FiFo_START_EN 0 + #define LSb16FiFo_START_EN 0 + #define bFiFo_START_EN 1 + #define MSK32FiFo_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_FiFo_CLEAR 0x0008 + + #define BA_FiFo_CLEAR_EN 0x0008 + #define B16FiFo_CLEAR_EN 0x0008 + #define LSb32FiFo_CLEAR_EN 0 + #define LSb16FiFo_CLEAR_EN 0 + #define bFiFo_CLEAR_EN 1 + #define MSK32FiFo_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_FiFo_FLUSH 0x000C + + #define BA_FiFo_FLUSH_EN 0x000C + #define B16FiFo_FLUSH_EN 0x000C + #define LSb32FiFo_FLUSH_EN 0 + #define LSb16FiFo_FLUSH_EN 0 + #define bFiFo_FLUSH_EN 1 + #define MSK32FiFo_FLUSH_EN 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_FiFo { + /////////////////////////////////////////////////////////// + #define GET32FiFo_CFG_BASE(r32) _BFGET_(r32,19, 0) + #define SET32FiFo_CFG_BASE(r32,v) _BFSET_(r32,19, 0,v) + + #define w32FiFo_CFG {\ + UNSG32 uCFG_BASE : 20;\ + UNSG32 RSVDx0_b20 : 12;\ + } + union { UNSG32 u32FiFo_CFG; + struct w32FiFo_CFG; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } + union { UNSG32 u32FiFo_START; + struct w32FiFo_START; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32FiFo_CLEAR; + struct w32FiFo_CLEAR; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_FLUSH_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_FLUSH_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_FLUSH_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_FLUSH_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_FLUSH {\ + UNSG32 uFLUSH_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32FiFo_FLUSH; + struct w32FiFo_FLUSH; + }; + /////////////////////////////////////////////////////////// + } SIE_FiFo; + + typedef union T32FiFo_CFG + { UNSG32 u32; + struct w32FiFo_CFG; + } T32FiFo_CFG; + typedef union T32FiFo_START + { UNSG32 u32; + struct w32FiFo_START; + } T32FiFo_START; + typedef union T32FiFo_CLEAR + { UNSG32 u32; + struct w32FiFo_CLEAR; + } T32FiFo_CLEAR; + typedef union T32FiFo_FLUSH + { UNSG32 u32; + struct w32FiFo_FLUSH; + } T32FiFo_FLUSH; + /////////////////////////////////////////////////////////// + + typedef union TFiFo_CFG + { UNSG32 u32[1]; + struct { + struct w32FiFo_CFG; + }; + } TFiFo_CFG; + typedef union TFiFo_START + { UNSG32 u32[1]; + struct { + struct w32FiFo_START; + }; + } TFiFo_START; + typedef union TFiFo_CLEAR + { UNSG32 u32[1]; + struct { + struct w32FiFo_CLEAR; + }; + } TFiFo_CLEAR; + typedef union TFiFo_FLUSH + { UNSG32 u32[1]; + struct { + struct w32FiFo_FLUSH; + }; + } TFiFo_FLUSH; + + /////////////////////////////////////////////////////////// + SIGN32 FiFo_drvrd(SIE_FiFo *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 FiFo_drvwr(SIE_FiFo *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void FiFo_reset(SIE_FiFo *p); + SIGN32 FiFo_cmp (SIE_FiFo *p, SIE_FiFo *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define FiFo_check(p,pie,pfx,hLOG) FiFo_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define FiFo_print(p, pfx,hLOG) FiFo_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: FiFo +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE HBO biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 FiFoCtl +/// $SemaHub FiFoCtl REG +/// @ 0x00400 ARR (P) +/// # 0x00400 FiFo +/// $FiFo FiFo REG [32] +/// ### +/// * Up-to 32 FIFO channels +/// * FiFo[N] is controlled by HBO.FiFoCtl.Channel[N] +/// ### +/// @ 0x00600 BUSY (R-) +/// %unsigned 32 ST +/// ### +/// * Per channel status +/// * Indicate the clear operation status. +/// * 1: clear is in process. +/// * 0 : clear is done. +/// ### +/// @ 0x00604 (W-) +/// # # Stuffing bytes... +/// %% 2016 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 1792B, bits: 1920b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_HBO +#define h_HBO (){} + + #define RA_HBO_FiFoCtl 0x0000 + /////////////////////////////////////////////////////////// + #define RA_HBO_ARR 0x0400 + #define RA_HBO_FiFo 0x0400 + /////////////////////////////////////////////////////////// + #define RA_HBO_BUSY 0x0600 + + #define BA_HBO_BUSY_ST 0x0600 + #define B16HBO_BUSY_ST 0x0600 + #define LSb32HBO_BUSY_ST 0 + #define LSb16HBO_BUSY_ST 0 + #define bHBO_BUSY_ST 32 + #define MSK32HBO_BUSY_ST 0xFFFFFFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_HBO { + /////////////////////////////////////////////////////////// + SIE_SemaHub ie_FiFoCtl; + /////////////////////////////////////////////////////////// + SIE_FiFo ie_FiFo[32]; + /////////////////////////////////////////////////////////// + #define GET32HBO_BUSY_ST(r32) _BFGET_(r32,31, 0) + #define SET32HBO_BUSY_ST(r32,v) _BFSET_(r32,31, 0,v) + + #define w32HBO_BUSY {\ + UNSG32 uBUSY_ST : 32;\ + } + union { UNSG32 u32HBO_BUSY; + struct w32HBO_BUSY; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx604 [252]; + /////////////////////////////////////////////////////////// + } SIE_HBO; + + typedef union T32HBO_BUSY + { UNSG32 u32; + struct w32HBO_BUSY; + } T32HBO_BUSY; + /////////////////////////////////////////////////////////// + + typedef union THBO_BUSY + { UNSG32 u32[1]; + struct { + struct w32HBO_BUSY; + }; + } THBO_BUSY; + + /////////////////////////////////////////////////////////// + SIGN32 HBO_drvrd(SIE_HBO *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 HBO_drvwr(SIE_HBO *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void HBO_reset(SIE_HBO *p); + SIGN32 HBO_cmp (SIE_HBO *p, SIE_HBO *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define HBO_check(p,pie,pfx,hLOG) HBO_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define HBO_print(p, pfx,hLOG) HBO_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: HBO +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE LLDesFmt biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 mem (P) +/// %unsigned 16 size +/// ### +/// * The size of one piece of scattered memory. +/// ### +/// %% 16 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 16b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_LLDesFmt +#define h_LLDesFmt (){} + + #define RA_LLDesFmt_mem 0x0000 + + #define BA_LLDesFmt_mem_size 0x0000 + #define B16LLDesFmt_mem_size 0x0000 + #define LSb32LLDesFmt_mem_size 0 + #define LSb16LLDesFmt_mem_size 0 + #define bLLDesFmt_mem_size 16 + #define MSK32LLDesFmt_mem_size 0x0000FFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_LLDesFmt { + /////////////////////////////////////////////////////////// + #define GET32LLDesFmt_mem_size(r32) _BFGET_(r32,15, 0) + #define SET32LLDesFmt_mem_size(r32,v) _BFSET_(r32,15, 0,v) + #define GET16LLDesFmt_mem_size(r16) _BFGET_(r16,15, 0) + #define SET16LLDesFmt_mem_size(r16,v) _BFSET_(r16,15, 0,v) + + #define w32LLDesFmt_mem {\ + UNSG32 umem_size : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32LLDesFmt_mem; + struct w32LLDesFmt_mem; + }; + /////////////////////////////////////////////////////////// + } SIE_LLDesFmt; + + typedef union T32LLDesFmt_mem + { UNSG32 u32; + struct w32LLDesFmt_mem; + } T32LLDesFmt_mem; + /////////////////////////////////////////////////////////// + + typedef union TLLDesFmt_mem + { UNSG32 u32[1]; + struct { + struct w32LLDesFmt_mem; + }; + } TLLDesFmt_mem; + + /////////////////////////////////////////////////////////// + SIGN32 LLDesFmt_drvrd(SIE_LLDesFmt *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 LLDesFmt_drvwr(SIE_LLDesFmt *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void LLDesFmt_reset(SIE_LLDesFmt *p); + SIGN32 LLDesFmt_cmp (SIE_LLDesFmt *p, SIE_LLDesFmt *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define LLDesFmt_check(p,pie,pfx,hLOG) LLDesFmt_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define LLDesFmt_print(p, pfx,hLOG) LLDesFmt_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: LLDesFmt +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmdHDR (4,4) +/// ### +/// * 32-bit dHub command header +/// * [0:31] +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 DESC (W-) +/// %unsigned 16 size +/// ### +/// * amount of data to be transferred, in bytes or MTU. +/// * Size of 0 is forbidden. +/// ### +/// %unsigned 1 sizeMTU +/// ### +/// * 0: size given in bytes; +/// * 1: size given in MTU (see dHubChCtl.CFG.MTU for MTU size definition) +/// ### +/// %unsigned 1 semOpMTU +/// ### +/// * 0: semaphore operations applied on dHubCmd level +/// * 1: semaphore operations applied on MTU level +/// ### +/// %unsigned 5 chkSemId +/// ### +/// * ID of semaphore to check before cmd / MTU; +/// * 0 indicates semaphore check is disabled +/// ### +/// %unsigned 5 updSemId +/// ### +/// * ID of semaphore to update after cmd / MTU; +/// * 0 indicates semaphore update is disabled +/// ### +/// %unsigned 1 interrupt +/// ### +/// * 1: raise interrupt upon command finish +/// * end dHubCmdHDR +/// ### +/// %% 3 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 29b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmdHDR +#define h_dHubCmdHDR (){} + + #define RA_dHubCmdHDR_DESC 0x0000 + + #define BA_dHubCmdHDR_DESC_size 0x0000 + #define B16dHubCmdHDR_DESC_size 0x0000 + #define LSb32dHubCmdHDR_DESC_size 0 + #define LSb16dHubCmdHDR_DESC_size 0 + #define bdHubCmdHDR_DESC_size 16 + #define MSK32dHubCmdHDR_DESC_size 0x0000FFFF + + #define BA_dHubCmdHDR_DESC_sizeMTU 0x0002 + #define B16dHubCmdHDR_DESC_sizeMTU 0x0002 + #define LSb32dHubCmdHDR_DESC_sizeMTU 16 + #define LSb16dHubCmdHDR_DESC_sizeMTU 0 + #define bdHubCmdHDR_DESC_sizeMTU 1 + #define MSK32dHubCmdHDR_DESC_sizeMTU 0x00010000 + + #define BA_dHubCmdHDR_DESC_semOpMTU 0x0002 + #define B16dHubCmdHDR_DESC_semOpMTU 0x0002 + #define LSb32dHubCmdHDR_DESC_semOpMTU 17 + #define LSb16dHubCmdHDR_DESC_semOpMTU 1 + #define bdHubCmdHDR_DESC_semOpMTU 1 + #define MSK32dHubCmdHDR_DESC_semOpMTU 0x00020000 + + #define BA_dHubCmdHDR_DESC_chkSemId 0x0002 + #define B16dHubCmdHDR_DESC_chkSemId 0x0002 + #define LSb32dHubCmdHDR_DESC_chkSemId 18 + #define LSb16dHubCmdHDR_DESC_chkSemId 2 + #define bdHubCmdHDR_DESC_chkSemId 5 + #define MSK32dHubCmdHDR_DESC_chkSemId 0x007C0000 + + #define BA_dHubCmdHDR_DESC_updSemId 0x0002 + #define B16dHubCmdHDR_DESC_updSemId 0x0002 + #define LSb32dHubCmdHDR_DESC_updSemId 23 + #define LSb16dHubCmdHDR_DESC_updSemId 7 + #define bdHubCmdHDR_DESC_updSemId 5 + #define MSK32dHubCmdHDR_DESC_updSemId 0x0F800000 + + #define BA_dHubCmdHDR_DESC_interrupt 0x0003 + #define B16dHubCmdHDR_DESC_interrupt 0x0002 + #define LSb32dHubCmdHDR_DESC_interrupt 28 + #define LSb16dHubCmdHDR_DESC_interrupt 12 + #define bdHubCmdHDR_DESC_interrupt 1 + #define MSK32dHubCmdHDR_DESC_interrupt 0x10000000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmdHDR { + /////////////////////////////////////////////////////////// + #define GET32dHubCmdHDR_DESC_size(r32) _BFGET_(r32,15, 0) + #define SET32dHubCmdHDR_DESC_size(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubCmdHDR_DESC_size(r16) _BFGET_(r16,15, 0) + #define SET16dHubCmdHDR_DESC_size(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubCmdHDR_DESC_sizeMTU(r32) _BFGET_(r32,16,16) + #define SET32dHubCmdHDR_DESC_sizeMTU(r32,v) _BFSET_(r32,16,16,v) + #define GET16dHubCmdHDR_DESC_sizeMTU(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmdHDR_DESC_sizeMTU(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32dHubCmdHDR_DESC_semOpMTU(r32) _BFGET_(r32,17,17) + #define SET32dHubCmdHDR_DESC_semOpMTU(r32,v) _BFSET_(r32,17,17,v) + #define GET16dHubCmdHDR_DESC_semOpMTU(r16) _BFGET_(r16, 1, 1) + #define SET16dHubCmdHDR_DESC_semOpMTU(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32dHubCmdHDR_DESC_chkSemId(r32) _BFGET_(r32,22,18) + #define SET32dHubCmdHDR_DESC_chkSemId(r32,v) _BFSET_(r32,22,18,v) + #define GET16dHubCmdHDR_DESC_chkSemId(r16) _BFGET_(r16, 6, 2) + #define SET16dHubCmdHDR_DESC_chkSemId(r16,v) _BFSET_(r16, 6, 2,v) + + #define GET32dHubCmdHDR_DESC_updSemId(r32) _BFGET_(r32,27,23) + #define SET32dHubCmdHDR_DESC_updSemId(r32,v) _BFSET_(r32,27,23,v) + #define GET16dHubCmdHDR_DESC_updSemId(r16) _BFGET_(r16,11, 7) + #define SET16dHubCmdHDR_DESC_updSemId(r16,v) _BFSET_(r16,11, 7,v) + + #define GET32dHubCmdHDR_DESC_interrupt(r32) _BFGET_(r32,28,28) + #define SET32dHubCmdHDR_DESC_interrupt(r32,v) _BFSET_(r32,28,28,v) + #define GET16dHubCmdHDR_DESC_interrupt(r16) _BFGET_(r16,12,12) + #define SET16dHubCmdHDR_DESC_interrupt(r16,v) _BFSET_(r16,12,12,v) + + #define w32dHubCmdHDR_DESC {\ + UNSG32 uDESC_size : 16;\ + UNSG32 uDESC_sizeMTU : 1;\ + UNSG32 uDESC_semOpMTU : 1;\ + UNSG32 uDESC_chkSemId : 5;\ + UNSG32 uDESC_updSemId : 5;\ + UNSG32 uDESC_interrupt : 1;\ + UNSG32 RSVDx0_b29 : 3;\ + } + union { UNSG32 u32dHubCmdHDR_DESC; + struct w32dHubCmdHDR_DESC; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubCmdHDR; + + typedef union T32dHubCmdHDR_DESC + { UNSG32 u32; + struct w32dHubCmdHDR_DESC; + } T32dHubCmdHDR_DESC; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmdHDR_DESC + { UNSG32 u32[1]; + struct { + struct w32dHubCmdHDR_DESC; + }; + } TdHubCmdHDR_DESC; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmdHDR_drvrd(SIE_dHubCmdHDR *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmdHDR_drvwr(SIE_dHubCmdHDR *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmdHDR_reset(SIE_dHubCmdHDR *p); + SIGN32 dHubCmdHDR_cmp (SIE_dHubCmdHDR *p, SIE_dHubCmdHDR *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmdHDR_check(p,pie,pfx,hLOG) dHubCmdHDR_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmdHDR_print(p, pfx,hLOG) dHubCmdHDR_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmdHDR +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmd biu (4,4) +/// ### +/// * 64-bit dHub command issued by read/write masters +/// * [0:31] +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 MEM (W-) +/// %unsigned 32 addr +/// ### +/// * DRAM data address, in bytes; not necessarily MTU aligned. +/// * [32:63] +/// ### +/// @ 0x00004 (P) +/// # 0x00004 HDR +/// $dHubCmdHDR HDR REG +/// ### +/// * end dHubCmd +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 8B, bits: 61b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmd +#define h_dHubCmd (){} + + #define RA_dHubCmd_MEM 0x0000 + + #define BA_dHubCmd_MEM_addr 0x0000 + #define B16dHubCmd_MEM_addr 0x0000 + #define LSb32dHubCmd_MEM_addr 0 + #define LSb16dHubCmd_MEM_addr 0 + #define bdHubCmd_MEM_addr 32 + #define MSK32dHubCmd_MEM_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_dHubCmd_HDR 0x0004 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmd { + /////////////////////////////////////////////////////////// + #define GET32dHubCmd_MEM_addr(r32) _BFGET_(r32,31, 0) + #define SET32dHubCmd_MEM_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32dHubCmd_MEM {\ + UNSG32 uMEM_addr : 32;\ + } + union { UNSG32 u32dHubCmd_MEM; + struct w32dHubCmd_MEM; + }; + /////////////////////////////////////////////////////////// + SIE_dHubCmdHDR ie_HDR; + /////////////////////////////////////////////////////////// + } SIE_dHubCmd; + + typedef union T32dHubCmd_MEM + { UNSG32 u32; + struct w32dHubCmd_MEM; + } T32dHubCmd_MEM; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmd_MEM + { UNSG32 u32[1]; + struct { + struct w32dHubCmd_MEM; + }; + } TdHubCmd_MEM; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmd_drvrd(SIE_dHubCmd *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmd_drvwr(SIE_dHubCmd *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmd_reset(SIE_dHubCmd *p); + SIGN32 dHubCmd_cmp (SIE_dHubCmd *p, SIE_dHubCmd *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmd_check(p,pie,pfx,hLOG) dHubCmd_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmd_print(p, pfx,hLOG) dHubCmd_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmd +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubChannel biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 2 MTU +/// : 8byte 0x0 +/// : 32byte 0x1 +/// : 128byte 0x2 +/// : 1024byte 0x3 +/// ### +/// * Minimum transfer unit of the channel +/// ### +/// %unsigned 1 QoS +/// ### +/// * Write 1 to turn on QoS detection +/// ### +/// %unsigned 1 selfLoop +/// ### +/// * Write 1 to enable cmd looping support; 0 to turn off +/// ### +/// %unsigned 1 intrCtl 0x0 +/// : cmdDone 0x0 +/// : chIdle 0x1 +/// ### +/// * 0 : default vlaue, the interrupt is triggered by the finish of the dHub command if the interrupt bit is defined in the dHub command. +/// * 1 : The interrupt is triggered if the dHub channel is idle ( no busy and no pending and the corresponding dHub command Q is empty). +/// ### +/// %unsigned 1 hScan 0x0 +/// : rastScan 0x0 +/// : invScan 0x1 +/// ### +/// * This parameter will only apply to read channels. +/// * It will affect 1D dHub command for the channel. +/// * When scan is set to 1 (invScan), the data (beat) inside the dHub command will be fetched in the inverse order. ie. The data from the last address will come first and the data (beat) from the first address will come lastly. +/// ### +/// %unsigned 1 vScan 0x0 +/// : rastScan 0x0 +/// : invScan 0x1 +/// ### +/// * This parameter will only apply to read channels. +/// * It will affect 2D channels. +/// * When scan is set to 1 (invScan), +/// * The last address line (1D command) will be fetched first, and the first address line will be fetched lastly. +/// ### +/// %% 25 # Stuffing bits... +/// @ 0x00004 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to enable the channel; 0 to pause the channel +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to reset the channel controller state +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C FLUSH (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to start the data flushing process. Invalid for read (M2H) channels +/// * end dHubChannel +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 10b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubChannel +#define h_dHubChannel (){} + + #define RA_dHubChannel_CFG 0x0000 + + #define BA_dHubChannel_CFG_MTU 0x0000 + #define B16dHubChannel_CFG_MTU 0x0000 + #define LSb32dHubChannel_CFG_MTU 0 + #define LSb16dHubChannel_CFG_MTU 0 + #define bdHubChannel_CFG_MTU 2 + #define MSK32dHubChannel_CFG_MTU 0x00000003 + #define dHubChannel_CFG_MTU_8byte 0x0 + #define dHubChannel_CFG_MTU_32byte 0x1 + #define dHubChannel_CFG_MTU_128byte 0x2 + #define dHubChannel_CFG_MTU_1024byte 0x3 + + #define BA_dHubChannel_CFG_QoS 0x0000 + #define B16dHubChannel_CFG_QoS 0x0000 + #define LSb32dHubChannel_CFG_QoS 2 + #define LSb16dHubChannel_CFG_QoS 2 + #define bdHubChannel_CFG_QoS 1 + #define MSK32dHubChannel_CFG_QoS 0x00000004 + + #define BA_dHubChannel_CFG_selfLoop 0x0000 + #define B16dHubChannel_CFG_selfLoop 0x0000 + #define LSb32dHubChannel_CFG_selfLoop 3 + #define LSb16dHubChannel_CFG_selfLoop 3 + #define bdHubChannel_CFG_selfLoop 1 + #define MSK32dHubChannel_CFG_selfLoop 0x00000008 + + #define BA_dHubChannel_CFG_intrCtl 0x0000 + #define B16dHubChannel_CFG_intrCtl 0x0000 + #define LSb32dHubChannel_CFG_intrCtl 4 + #define LSb16dHubChannel_CFG_intrCtl 4 + #define bdHubChannel_CFG_intrCtl 1 + #define MSK32dHubChannel_CFG_intrCtl 0x00000010 + #define dHubChannel_CFG_intrCtl_cmdDone 0x0 + #define dHubChannel_CFG_intrCtl_chIdle 0x1 + + #define BA_dHubChannel_CFG_hScan 0x0000 + #define B16dHubChannel_CFG_hScan 0x0000 + #define LSb32dHubChannel_CFG_hScan 5 + #define LSb16dHubChannel_CFG_hScan 5 + #define bdHubChannel_CFG_hScan 1 + #define MSK32dHubChannel_CFG_hScan 0x00000020 + #define dHubChannel_CFG_hScan_rastScan 0x0 + #define dHubChannel_CFG_hScan_invScan 0x1 + + #define BA_dHubChannel_CFG_vScan 0x0000 + #define B16dHubChannel_CFG_vScan 0x0000 + #define LSb32dHubChannel_CFG_vScan 6 + #define LSb16dHubChannel_CFG_vScan 6 + #define bdHubChannel_CFG_vScan 1 + #define MSK32dHubChannel_CFG_vScan 0x00000040 + #define dHubChannel_CFG_vScan_rastScan 0x0 + #define dHubChannel_CFG_vScan_invScan 0x1 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_START 0x0004 + + #define BA_dHubChannel_START_EN 0x0004 + #define B16dHubChannel_START_EN 0x0004 + #define LSb32dHubChannel_START_EN 0 + #define LSb16dHubChannel_START_EN 0 + #define bdHubChannel_START_EN 1 + #define MSK32dHubChannel_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_CLEAR 0x0008 + + #define BA_dHubChannel_CLEAR_EN 0x0008 + #define B16dHubChannel_CLEAR_EN 0x0008 + #define LSb32dHubChannel_CLEAR_EN 0 + #define LSb16dHubChannel_CLEAR_EN 0 + #define bdHubChannel_CLEAR_EN 1 + #define MSK32dHubChannel_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_FLUSH 0x000C + + #define BA_dHubChannel_FLUSH_EN 0x000C + #define B16dHubChannel_FLUSH_EN 0x000C + #define LSb32dHubChannel_FLUSH_EN 0 + #define LSb16dHubChannel_FLUSH_EN 0 + #define bdHubChannel_FLUSH_EN 1 + #define MSK32dHubChannel_FLUSH_EN 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubChannel { + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_CFG_MTU(r32) _BFGET_(r32, 1, 0) + #define SET32dHubChannel_CFG_MTU(r32,v) _BFSET_(r32, 1, 0,v) + #define GET16dHubChannel_CFG_MTU(r16) _BFGET_(r16, 1, 0) + #define SET16dHubChannel_CFG_MTU(r16,v) _BFSET_(r16, 1, 0,v) + + #define GET32dHubChannel_CFG_QoS(r32) _BFGET_(r32, 2, 2) + #define SET32dHubChannel_CFG_QoS(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16dHubChannel_CFG_QoS(r16) _BFGET_(r16, 2, 2) + #define SET16dHubChannel_CFG_QoS(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32dHubChannel_CFG_selfLoop(r32) _BFGET_(r32, 3, 3) + #define SET32dHubChannel_CFG_selfLoop(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16dHubChannel_CFG_selfLoop(r16) _BFGET_(r16, 3, 3) + #define SET16dHubChannel_CFG_selfLoop(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32dHubChannel_CFG_intrCtl(r32) _BFGET_(r32, 4, 4) + #define SET32dHubChannel_CFG_intrCtl(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16dHubChannel_CFG_intrCtl(r16) _BFGET_(r16, 4, 4) + #define SET16dHubChannel_CFG_intrCtl(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32dHubChannel_CFG_hScan(r32) _BFGET_(r32, 5, 5) + #define SET32dHubChannel_CFG_hScan(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16dHubChannel_CFG_hScan(r16) _BFGET_(r16, 5, 5) + #define SET16dHubChannel_CFG_hScan(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32dHubChannel_CFG_vScan(r32) _BFGET_(r32, 6, 6) + #define SET32dHubChannel_CFG_vScan(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16dHubChannel_CFG_vScan(r16) _BFGET_(r16, 6, 6) + #define SET16dHubChannel_CFG_vScan(r16,v) _BFSET_(r16, 6, 6,v) + + #define w32dHubChannel_CFG {\ + UNSG32 uCFG_MTU : 2;\ + UNSG32 uCFG_QoS : 1;\ + UNSG32 uCFG_selfLoop : 1;\ + UNSG32 uCFG_intrCtl : 1;\ + UNSG32 uCFG_hScan : 1;\ + UNSG32 uCFG_vScan : 1;\ + UNSG32 RSVDx0_b7 : 25;\ + } + union { UNSG32 u32dHubChannel_CFG; + struct w32dHubChannel_CFG; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_START; + struct w32dHubChannel_START; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_CLEAR; + struct w32dHubChannel_CLEAR; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_FLUSH_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_FLUSH_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_FLUSH_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_FLUSH_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_FLUSH {\ + UNSG32 uFLUSH_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_FLUSH; + struct w32dHubChannel_FLUSH; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubChannel; + + typedef union T32dHubChannel_CFG + { UNSG32 u32; + struct w32dHubChannel_CFG; + } T32dHubChannel_CFG; + typedef union T32dHubChannel_START + { UNSG32 u32; + struct w32dHubChannel_START; + } T32dHubChannel_START; + typedef union T32dHubChannel_CLEAR + { UNSG32 u32; + struct w32dHubChannel_CLEAR; + } T32dHubChannel_CLEAR; + typedef union T32dHubChannel_FLUSH + { UNSG32 u32; + struct w32dHubChannel_FLUSH; + } T32dHubChannel_FLUSH; + /////////////////////////////////////////////////////////// + + typedef union TdHubChannel_CFG + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_CFG; + }; + } TdHubChannel_CFG; + typedef union TdHubChannel_START + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_START; + }; + } TdHubChannel_START; + typedef union TdHubChannel_CLEAR + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_CLEAR; + }; + } TdHubChannel_CLEAR; + typedef union TdHubChannel_FLUSH + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_FLUSH; + }; + } TdHubChannel_FLUSH; + + /////////////////////////////////////////////////////////// + SIGN32 dHubChannel_drvrd(SIE_dHubChannel *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubChannel_drvwr(SIE_dHubChannel *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubChannel_reset(SIE_dHubChannel *p); + SIGN32 dHubChannel_cmp (SIE_dHubChannel *p, SIE_dHubChannel *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubChannel_check(p,pie,pfx,hLOG) dHubChannel_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubChannel_print(p, pfx,hLOG) dHubChannel_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubChannel +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubReg biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 SemaHub +/// $SemaHub SemaHub REG +/// ### +/// * For dHub internal interrupts, also provide semaphore service for external (all channels will be opened to external to access). +/// * Channel 0 is used for dHub.HBO interrupt. +/// * Channel N+1 is used for dHub.Channel[N] interrupt. +/// ### +/// @ 0x00400 (P) +/// # 0x00400 HBO +/// $HBO HBO REG +/// ### +/// * For dHub channels (command/data queues), also provide (unused) FIFO service for external. +/// * Channel 2N is used for dHub.Channel[N] command. +/// * Channel 2N+1 is used for dHub.Channel[N] data. +/// ### +/// @ 0x00B00 ARR (P) +/// # 0x00B00 channelCtl +/// $dHubChannel channelCtl REG [16] +/// ### +/// * Up-to 16 channels +/// ### +/// @ 0x00C00 BUSY (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: no ongoing command is being processed, and no flushing is taking place +/// * 1: channel controller is busy +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C04 PENDING (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: Response queue is empty, meaning no outstanding AXI transactions +/// * 1: there exist some outstanding AXI transactions +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C08 busRstEn (RW-) +/// %unsigned 1 reg 0x0 +/// ### +/// * Write one to this register will trigger gate-keeper to take over the AXI bus. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00C0C busRstDone (R-) +/// %unsigned 1 reg 0x1 +/// ### +/// * After gate-keeper take over the AXI bus, it will assert this bit once there is no outstanding transactions on AXI bus. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00C10 flowCtl (P) +/// %unsigned 8 rAlpha 0x0 +/// %unsigned 8 wAlpha 0x0 +/// ### +/// * Flow control parameter for read and write axi master. +/// * clkCnt=(alpha*bstLen)>>4. +/// * This # of clock cycles will be blocked for the axi master after an axi command with the burst length of “bstLenâ€. +/// * When set alpha to be 0, the master will never be blocked. +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C14 axiCmdCol (P) +/// %unsigned 16 rCnt 0x0 +/// %unsigned 16 wCnt 0x0 +/// ### +/// * Axi command collection. The counter value indicate read/write do the command collection for # of clock cycles, start from the first command pushed to an empty command Q. Here are the conditions that will trigger the Axi master to send out command. +/// * Cmd Q full or the counter count down to “0†from the programmed value. +/// * Set the counter to 0 will disable the command collection. +/// * end dHubReg +/// ### +/// @ 0x00C18 (W-) +/// # # Stuffing bytes... +/// %% 1856 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 3328B, bits: 3314b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubReg +#define h_dHubReg (){} + + #define RA_dHubReg_SemaHub 0x0000 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_HBO 0x0400 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_ARR 0x0B00 + #define RA_dHubReg_channelCtl 0x0B00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_BUSY 0x0C00 + + #define BA_dHubReg_BUSY_ST 0x0C00 + #define B16dHubReg_BUSY_ST 0x0C00 + #define LSb32dHubReg_BUSY_ST 0 + #define LSb16dHubReg_BUSY_ST 0 + #define bdHubReg_BUSY_ST 16 + #define MSK32dHubReg_BUSY_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg_PENDING 0x0C04 + + #define BA_dHubReg_PENDING_ST 0x0C04 + #define B16dHubReg_PENDING_ST 0x0C04 + #define LSb32dHubReg_PENDING_ST 0 + #define LSb16dHubReg_PENDING_ST 0 + #define bdHubReg_PENDING_ST 16 + #define MSK32dHubReg_PENDING_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg_busRstEn 0x0C08 + + #define BA_dHubReg_busRstEn_reg 0x0C08 + #define B16dHubReg_busRstEn_reg 0x0C08 + #define LSb32dHubReg_busRstEn_reg 0 + #define LSb16dHubReg_busRstEn_reg 0 + #define bdHubReg_busRstEn_reg 1 + #define MSK32dHubReg_busRstEn_reg 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_busRstDone 0x0C0C + + #define BA_dHubReg_busRstDone_reg 0x0C0C + #define B16dHubReg_busRstDone_reg 0x0C0C + #define LSb32dHubReg_busRstDone_reg 0 + #define LSb16dHubReg_busRstDone_reg 0 + #define bdHubReg_busRstDone_reg 1 + #define MSK32dHubReg_busRstDone_reg 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_flowCtl 0x0C10 + + #define BA_dHubReg_flowCtl_rAlpha 0x0C10 + #define B16dHubReg_flowCtl_rAlpha 0x0C10 + #define LSb32dHubReg_flowCtl_rAlpha 0 + #define LSb16dHubReg_flowCtl_rAlpha 0 + #define bdHubReg_flowCtl_rAlpha 8 + #define MSK32dHubReg_flowCtl_rAlpha 0x000000FF + + #define BA_dHubReg_flowCtl_wAlpha 0x0C11 + #define B16dHubReg_flowCtl_wAlpha 0x0C10 + #define LSb32dHubReg_flowCtl_wAlpha 8 + #define LSb16dHubReg_flowCtl_wAlpha 8 + #define bdHubReg_flowCtl_wAlpha 8 + #define MSK32dHubReg_flowCtl_wAlpha 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_axiCmdCol 0x0C14 + + #define BA_dHubReg_axiCmdCol_rCnt 0x0C14 + #define B16dHubReg_axiCmdCol_rCnt 0x0C14 + #define LSb32dHubReg_axiCmdCol_rCnt 0 + #define LSb16dHubReg_axiCmdCol_rCnt 0 + #define bdHubReg_axiCmdCol_rCnt 16 + #define MSK32dHubReg_axiCmdCol_rCnt 0x0000FFFF + + #define BA_dHubReg_axiCmdCol_wCnt 0x0C16 + #define B16dHubReg_axiCmdCol_wCnt 0x0C16 + #define LSb32dHubReg_axiCmdCol_wCnt 16 + #define LSb16dHubReg_axiCmdCol_wCnt 0 + #define bdHubReg_axiCmdCol_wCnt 16 + #define MSK32dHubReg_axiCmdCol_wCnt 0xFFFF0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubReg { + /////////////////////////////////////////////////////////// + SIE_SemaHub ie_SemaHub; + /////////////////////////////////////////////////////////// + SIE_HBO ie_HBO; + /////////////////////////////////////////////////////////// + SIE_dHubChannel ie_channelCtl[16]; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_BUSY_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_BUSY_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_BUSY_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_BUSY_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_BUSY {\ + UNSG32 uBUSY_ST : 16;\ + UNSG32 RSVDxC00_b16 : 16;\ + } + union { UNSG32 u32dHubReg_BUSY; + struct w32dHubReg_BUSY; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_PENDING_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_PENDING_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_PENDING_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_PENDING_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_PENDING {\ + UNSG32 uPENDING_ST : 16;\ + UNSG32 RSVDxC04_b16 : 16;\ + } + union { UNSG32 u32dHubReg_PENDING; + struct w32dHubReg_PENDING; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_busRstEn_reg(r32) _BFGET_(r32, 0, 0) + #define SET32dHubReg_busRstEn_reg(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubReg_busRstEn_reg(r16) _BFGET_(r16, 0, 0) + #define SET16dHubReg_busRstEn_reg(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubReg_busRstEn {\ + UNSG32 ubusRstEn_reg : 1;\ + UNSG32 RSVDxC08_b1 : 31;\ + } + union { UNSG32 u32dHubReg_busRstEn; + struct w32dHubReg_busRstEn; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_busRstDone_reg(r32) _BFGET_(r32, 0, 0) + #define SET32dHubReg_busRstDone_reg(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubReg_busRstDone_reg(r16) _BFGET_(r16, 0, 0) + #define SET16dHubReg_busRstDone_reg(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubReg_busRstDone {\ + UNSG32 ubusRstDone_reg : 1;\ + UNSG32 RSVDxC0C_b1 : 31;\ + } + union { UNSG32 u32dHubReg_busRstDone; + struct w32dHubReg_busRstDone; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_flowCtl_rAlpha(r32) _BFGET_(r32, 7, 0) + #define SET32dHubReg_flowCtl_rAlpha(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16dHubReg_flowCtl_rAlpha(r16) _BFGET_(r16, 7, 0) + #define SET16dHubReg_flowCtl_rAlpha(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32dHubReg_flowCtl_wAlpha(r32) _BFGET_(r32,15, 8) + #define SET32dHubReg_flowCtl_wAlpha(r32,v) _BFSET_(r32,15, 8,v) + #define GET16dHubReg_flowCtl_wAlpha(r16) _BFGET_(r16,15, 8) + #define SET16dHubReg_flowCtl_wAlpha(r16,v) _BFSET_(r16,15, 8,v) + + #define w32dHubReg_flowCtl {\ + UNSG32 uflowCtl_rAlpha : 8;\ + UNSG32 uflowCtl_wAlpha : 8;\ + UNSG32 RSVDxC10_b16 : 16;\ + } + union { UNSG32 u32dHubReg_flowCtl; + struct w32dHubReg_flowCtl; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_axiCmdCol_rCnt(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_axiCmdCol_rCnt(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_axiCmdCol_rCnt(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_axiCmdCol_rCnt(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubReg_axiCmdCol_wCnt(r32) _BFGET_(r32,31,16) + #define SET32dHubReg_axiCmdCol_wCnt(r32,v) _BFSET_(r32,31,16,v) + #define GET16dHubReg_axiCmdCol_wCnt(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_axiCmdCol_wCnt(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_axiCmdCol {\ + UNSG32 uaxiCmdCol_rCnt : 16;\ + UNSG32 uaxiCmdCol_wCnt : 16;\ + } + union { UNSG32 u32dHubReg_axiCmdCol; + struct w32dHubReg_axiCmdCol; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxC18 [232]; + /////////////////////////////////////////////////////////// + } SIE_dHubReg; + + typedef union T32dHubReg_BUSY + { UNSG32 u32; + struct w32dHubReg_BUSY; + } T32dHubReg_BUSY; + typedef union T32dHubReg_PENDING + { UNSG32 u32; + struct w32dHubReg_PENDING; + } T32dHubReg_PENDING; + typedef union T32dHubReg_busRstEn + { UNSG32 u32; + struct w32dHubReg_busRstEn; + } T32dHubReg_busRstEn; + typedef union T32dHubReg_busRstDone + { UNSG32 u32; + struct w32dHubReg_busRstDone; + } T32dHubReg_busRstDone; + typedef union T32dHubReg_flowCtl + { UNSG32 u32; + struct w32dHubReg_flowCtl; + } T32dHubReg_flowCtl; + typedef union T32dHubReg_axiCmdCol + { UNSG32 u32; + struct w32dHubReg_axiCmdCol; + } T32dHubReg_axiCmdCol; + /////////////////////////////////////////////////////////// + + typedef union TdHubReg_BUSY + { UNSG32 u32[1]; + struct { + struct w32dHubReg_BUSY; + }; + } TdHubReg_BUSY; + typedef union TdHubReg_PENDING + { UNSG32 u32[1]; + struct { + struct w32dHubReg_PENDING; + }; + } TdHubReg_PENDING; + typedef union TdHubReg_busRstEn + { UNSG32 u32[1]; + struct { + struct w32dHubReg_busRstEn; + }; + } TdHubReg_busRstEn; + typedef union TdHubReg_busRstDone + { UNSG32 u32[1]; + struct { + struct w32dHubReg_busRstDone; + }; + } TdHubReg_busRstDone; + typedef union TdHubReg_flowCtl + { UNSG32 u32[1]; + struct { + struct w32dHubReg_flowCtl; + }; + } TdHubReg_flowCtl; + typedef union TdHubReg_axiCmdCol + { UNSG32 u32[1]; + struct { + struct w32dHubReg_axiCmdCol; + }; + } TdHubReg_axiCmdCol; + + /////////////////////////////////////////////////////////// + SIGN32 dHubReg_drvrd(SIE_dHubReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubReg_drvwr(SIE_dHubReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubReg_reset(SIE_dHubReg *p); + SIGN32 dHubReg_cmp (SIE_dHubReg *p, SIE_dHubReg *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubReg_check(p,pie,pfx,hLOG) dHubReg_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubReg_print(p, pfx,hLOG) dHubReg_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubReg +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmd2D biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 MEM (W-) +/// %unsigned 32 addr +/// ### +/// * DRAM data address of the 2D buffer, in bytes. +/// ### +/// @ 0x00004 DESC (W-) +/// %unsigned 16 stride +/// ### +/// * Line stride size in bytes +/// ### +/// %unsigned 13 numLine +/// ### +/// * Number of lines in buffer. Size of 0 is forbidden. +/// ### +/// %unsigned 2 hdrLoop +/// ### +/// * Size of line-loop for choosing dHubCmdHDR +/// * 0 is treated as 4 +/// ### +/// %unsigned 1 interrupt +/// ### +/// * 1: raise interrupt upon whole 2D command finish. +/// * 1: set the last 1D command interrupt bit. +/// * 0 : use the default 1D command interrupt bit. +/// ### +/// @ 0x00008 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to enable the channel; 0 to pause the channel +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to reset the 2D engine. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00010 (P) +/// # 0x00010 HDR +/// $dHubCmdHDR HDR REG [4] +/// ### +/// * Headers used in generating dHubCmd for each line in looping order, loop size (1,2,3,4) specified by DESC_hdrLoop +/// * end dHubCmd2D +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 32B, bits: 182b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmd2D +#define h_dHubCmd2D (){} + + #define RA_dHubCmd2D_MEM 0x0000 + + #define BA_dHubCmd2D_MEM_addr 0x0000 + #define B16dHubCmd2D_MEM_addr 0x0000 + #define LSb32dHubCmd2D_MEM_addr 0 + #define LSb16dHubCmd2D_MEM_addr 0 + #define bdHubCmd2D_MEM_addr 32 + #define MSK32dHubCmd2D_MEM_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_DESC 0x0004 + + #define BA_dHubCmd2D_DESC_stride 0x0004 + #define B16dHubCmd2D_DESC_stride 0x0004 + #define LSb32dHubCmd2D_DESC_stride 0 + #define LSb16dHubCmd2D_DESC_stride 0 + #define bdHubCmd2D_DESC_stride 16 + #define MSK32dHubCmd2D_DESC_stride 0x0000FFFF + + #define BA_dHubCmd2D_DESC_numLine 0x0006 + #define B16dHubCmd2D_DESC_numLine 0x0006 + #define LSb32dHubCmd2D_DESC_numLine 16 + #define LSb16dHubCmd2D_DESC_numLine 0 + #define bdHubCmd2D_DESC_numLine 13 + #define MSK32dHubCmd2D_DESC_numLine 0x1FFF0000 + + #define BA_dHubCmd2D_DESC_hdrLoop 0x0007 + #define B16dHubCmd2D_DESC_hdrLoop 0x0006 + #define LSb32dHubCmd2D_DESC_hdrLoop 29 + #define LSb16dHubCmd2D_DESC_hdrLoop 13 + #define bdHubCmd2D_DESC_hdrLoop 2 + #define MSK32dHubCmd2D_DESC_hdrLoop 0x60000000 + + #define BA_dHubCmd2D_DESC_interrupt 0x0007 + #define B16dHubCmd2D_DESC_interrupt 0x0006 + #define LSb32dHubCmd2D_DESC_interrupt 31 + #define LSb16dHubCmd2D_DESC_interrupt 15 + #define bdHubCmd2D_DESC_interrupt 1 + #define MSK32dHubCmd2D_DESC_interrupt 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_START 0x0008 + + #define BA_dHubCmd2D_START_EN 0x0008 + #define B16dHubCmd2D_START_EN 0x0008 + #define LSb32dHubCmd2D_START_EN 0 + #define LSb16dHubCmd2D_START_EN 0 + #define bdHubCmd2D_START_EN 1 + #define MSK32dHubCmd2D_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_CLEAR 0x000C + + #define BA_dHubCmd2D_CLEAR_EN 0x000C + #define B16dHubCmd2D_CLEAR_EN 0x000C + #define LSb32dHubCmd2D_CLEAR_EN 0 + #define LSb16dHubCmd2D_CLEAR_EN 0 + #define bdHubCmd2D_CLEAR_EN 1 + #define MSK32dHubCmd2D_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_HDR 0x0010 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmd2D { + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_MEM_addr(r32) _BFGET_(r32,31, 0) + #define SET32dHubCmd2D_MEM_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32dHubCmd2D_MEM {\ + UNSG32 uMEM_addr : 32;\ + } + union { UNSG32 u32dHubCmd2D_MEM; + struct w32dHubCmd2D_MEM; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_DESC_stride(r32) _BFGET_(r32,15, 0) + #define SET32dHubCmd2D_DESC_stride(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubCmd2D_DESC_stride(r16) _BFGET_(r16,15, 0) + #define SET16dHubCmd2D_DESC_stride(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubCmd2D_DESC_numLine(r32) _BFGET_(r32,28,16) + #define SET32dHubCmd2D_DESC_numLine(r32,v) _BFSET_(r32,28,16,v) + #define GET16dHubCmd2D_DESC_numLine(r16) _BFGET_(r16,12, 0) + #define SET16dHubCmd2D_DESC_numLine(r16,v) _BFSET_(r16,12, 0,v) + + #define GET32dHubCmd2D_DESC_hdrLoop(r32) _BFGET_(r32,30,29) + #define SET32dHubCmd2D_DESC_hdrLoop(r32,v) _BFSET_(r32,30,29,v) + #define GET16dHubCmd2D_DESC_hdrLoop(r16) _BFGET_(r16,14,13) + #define SET16dHubCmd2D_DESC_hdrLoop(r16,v) _BFSET_(r16,14,13,v) + + #define GET32dHubCmd2D_DESC_interrupt(r32) _BFGET_(r32,31,31) + #define SET32dHubCmd2D_DESC_interrupt(r32,v) _BFSET_(r32,31,31,v) + #define GET16dHubCmd2D_DESC_interrupt(r16) _BFGET_(r16,15,15) + #define SET16dHubCmd2D_DESC_interrupt(r16,v) _BFSET_(r16,15,15,v) + + #define w32dHubCmd2D_DESC {\ + UNSG32 uDESC_stride : 16;\ + UNSG32 uDESC_numLine : 13;\ + UNSG32 uDESC_hdrLoop : 2;\ + UNSG32 uDESC_interrupt : 1;\ + } + union { UNSG32 u32dHubCmd2D_DESC; + struct w32dHubCmd2D_DESC; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubCmd2D_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubCmd2D_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmd2D_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubCmd2D_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32dHubCmd2D_START; + struct w32dHubCmd2D_START; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubCmd2D_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubCmd2D_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmd2D_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubCmd2D_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32dHubCmd2D_CLEAR; + struct w32dHubCmd2D_CLEAR; + }; + /////////////////////////////////////////////////////////// + SIE_dHubCmdHDR ie_HDR[4]; + /////////////////////////////////////////////////////////// + } SIE_dHubCmd2D; + + typedef union T32dHubCmd2D_MEM + { UNSG32 u32; + struct w32dHubCmd2D_MEM; + } T32dHubCmd2D_MEM; + typedef union T32dHubCmd2D_DESC + { UNSG32 u32; + struct w32dHubCmd2D_DESC; + } T32dHubCmd2D_DESC; + typedef union T32dHubCmd2D_START + { UNSG32 u32; + struct w32dHubCmd2D_START; + } T32dHubCmd2D_START; + typedef union T32dHubCmd2D_CLEAR + { UNSG32 u32; + struct w32dHubCmd2D_CLEAR; + } T32dHubCmd2D_CLEAR; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmd2D_MEM + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_MEM; + }; + } TdHubCmd2D_MEM; + typedef union TdHubCmd2D_DESC + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_DESC; + }; + } TdHubCmd2D_DESC; + typedef union TdHubCmd2D_START + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_START; + }; + } TdHubCmd2D_START; + typedef union TdHubCmd2D_CLEAR + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_CLEAR; + }; + } TdHubCmd2D_CLEAR; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmd2D_drvrd(SIE_dHubCmd2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmd2D_drvwr(SIE_dHubCmd2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmd2D_reset(SIE_dHubCmd2D *p); + SIGN32 dHubCmd2D_cmp (SIE_dHubCmd2D *p, SIE_dHubCmd2D *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmd2D_check(p,pie,pfx,hLOG) dHubCmd2D_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmd2D_print(p, pfx,hLOG) dHubCmd2D_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmd2D +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubQuery (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 RESP (R-) +/// %unsigned 16 ST +/// ### +/// * Dhub channel state machine status. +/// ### +/// %% 16 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 16b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubQuery +#define h_dHubQuery (){} + + #define RA_dHubQuery_RESP 0x0000 + + #define BA_dHubQuery_RESP_ST 0x0000 + #define B16dHubQuery_RESP_ST 0x0000 + #define LSb32dHubQuery_RESP_ST 0 + #define LSb16dHubQuery_RESP_ST 0 + #define bdHubQuery_RESP_ST 16 + #define MSK32dHubQuery_RESP_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubQuery { + /////////////////////////////////////////////////////////// + #define GET32dHubQuery_RESP_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubQuery_RESP_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubQuery_RESP_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubQuery_RESP_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubQuery_RESP {\ + UNSG32 uRESP_ST : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32dHubQuery_RESP; + struct w32dHubQuery_RESP; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubQuery; + + typedef union T32dHubQuery_RESP + { UNSG32 u32; + struct w32dHubQuery_RESP; + } T32dHubQuery_RESP; + /////////////////////////////////////////////////////////// + + typedef union TdHubQuery_RESP + { UNSG32 u32[1]; + struct { + struct w32dHubQuery_RESP; + }; + } TdHubQuery_RESP; + + /////////////////////////////////////////////////////////// + SIGN32 dHubQuery_drvrd(SIE_dHubQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubQuery_drvwr(SIE_dHubQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubQuery_reset(SIE_dHubQuery *p); + SIGN32 dHubQuery_cmp (SIE_dHubQuery *p, SIE_dHubQuery *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubQuery_check(p,pie,pfx,hLOG) dHubQuery_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubQuery_print(p, pfx,hLOG) dHubQuery_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubQuery +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubReg2D biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 dHub +/// $dHubReg dHub REG +/// @ 0x00D00 ARR (P) +/// # 0x00D00 Cmd2D +/// $dHubCmd2D Cmd2D REG [16] +/// ### +/// * Up-to 16 2D channels. +/// * 2D Channel[N] is connected to dHub.Channel[N] command queue, that is, dHub.HBO.Channel[2N] +/// * Note: Number of 2D channels could be less than dHub channels (rest of are 1D only) +/// ### +/// @ 0x00F00 BUSY (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: no ongoing command is being processed +/// * 1: channel controller is busy +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00F04 (W-) +/// # # Stuffing bytes... +/// %% 480 +/// @ 0x00F40 (P) +/// # 0x00F40 CH_ST +/// $dHubQuery CH_ST MEM [16] +/// ### +/// * end dHubReg2D +/// ### +/// @ 0x00F80 (W-) +/// # # Stuffing bytes... +/// %% 1024 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4096B, bits: 6274b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubReg2D +#define h_dHubReg2D (){} + + #define RA_dHubReg2D_dHub 0x0000 + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_ARR 0x0D00 + #define RA_dHubReg2D_Cmd2D 0x0D00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_BUSY 0x0F00 + + #define BA_dHubReg2D_BUSY_ST 0x0F00 + #define B16dHubReg2D_BUSY_ST 0x0F00 + #define LSb32dHubReg2D_BUSY_ST 0 + #define LSb16dHubReg2D_BUSY_ST 0 + #define bdHubReg2D_BUSY_ST 16 + #define MSK32dHubReg2D_BUSY_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_CH_ST 0x0F40 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubReg2D { + /////////////////////////////////////////////////////////// + SIE_dHubReg ie_dHub; + /////////////////////////////////////////////////////////// + SIE_dHubCmd2D ie_Cmd2D[16]; + /////////////////////////////////////////////////////////// + #define GET32dHubReg2D_BUSY_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg2D_BUSY_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg2D_BUSY_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg2D_BUSY_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg2D_BUSY {\ + UNSG32 uBUSY_ST : 16;\ + UNSG32 RSVDxF00_b16 : 16;\ + } + union { UNSG32 u32dHubReg2D_BUSY; + struct w32dHubReg2D_BUSY; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxF04 [60]; + /////////////////////////////////////////////////////////// + SIE_dHubQuery ie_CH_ST[16]; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxF80 [128]; + /////////////////////////////////////////////////////////// + } SIE_dHubReg2D; + + typedef union T32dHubReg2D_BUSY + { UNSG32 u32; + struct w32dHubReg2D_BUSY; + } T32dHubReg2D_BUSY; + /////////////////////////////////////////////////////////// + + typedef union TdHubReg2D_BUSY + { UNSG32 u32[1]; + struct { + struct w32dHubReg2D_BUSY; + }; + } TdHubReg2D_BUSY; + + /////////////////////////////////////////////////////////// + SIGN32 dHubReg2D_drvrd(SIE_dHubReg2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubReg2D_drvwr(SIE_dHubReg2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubReg2D_reset(SIE_dHubReg2D *p); + SIGN32 dHubReg2D_cmp (SIE_dHubReg2D *p, SIE_dHubReg2D *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubReg2D_check(p,pie,pfx,hLOG) dHubReg2D_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubReg2D_print(p, pfx,hLOG) dHubReg2D_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubReg2D +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avioDhubChMap (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// %unsigned 4 vpp +/// ### +/// * BANK #0 +/// ### +/// : MV_R 0x0 +/// : MV_FRC_R 0x1 +/// : MV_FRC_W 0x2 +/// ### +/// * BANK #1 +/// ### +/// : BCM_R 0x3 +/// : HDMI_R 0x4 +/// %% 28 # Stuffing bits... +/// @ 0x00004 (P) +/// %unsigned 4 ag +/// ### +/// * BANK #0 +/// ### +/// : MA0_R 0x0 +/// : MA1_R 0x1 +/// : MA2_R 0x2 +/// : MA3_R 0x3 +/// : SA0_R 0x4 +/// : MIC0_W 0x5 +/// : MIC1_W 0x6 +/// ### +/// * BANK #1 +/// ### +/// : CSR_R 0x7 +/// ### +/// * BANK #2 +/// ### +/// : GFX_R 0x8 +/// %% 28 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 8B, bits: 8b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avioDhubChMap +#define h_avioDhubChMap (){} + + #define BA_avioDhubChMap_vpp 0x0000 + #define B16avioDhubChMap_vpp 0x0000 + #define LSb32avioDhubChMap_vpp 0 + #define LSb16avioDhubChMap_vpp 0 + #define bavioDhubChMap_vpp 4 + #define MSK32avioDhubChMap_vpp 0x0000000F + #define avioDhubChMap_vpp_MV_R 0x0 + #define avioDhubChMap_vpp_MV_FRC_R 0x1 + #define avioDhubChMap_vpp_MV_FRC_W 0x2 + + #define avioDhubChMap_vpp_DINT0_R_Z1 0x3 + #define avioDhubChMap_vpp_DINT1_R_Z1 0x4 + #define avioDhubChMap_vpp_DINT_W_Z1 0x5 + #define avioDhubChMap_vpp_BCM_R_Z1 0x6 + #define avioDhubChMap_vpp_HDMI_R_Z1 0x7 + #define avioDhubChMap_vpp_AUX_FRC_R_Z1 0x8 + #define avioDhubChMap_vpp_AUX_FRC_W_Z1 0x9 + #define avioDhubChMap_vpp_TT_R_Z1 0xA + + #define avioDhubChMap_vpp_BCM_R_A0 0x3 + #define avioDhubChMap_vpp_HDMI_R_A0 0x4 + + #define avioDhubChMap_vpp_BCM_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x6 : 0x3) + #define avioDhubChMap_vpp_HDMI_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x7 : 0x4) + + /////////////////////////////////////////////////////////// + + #define BA_avioDhubChMap_ag 0x0004 + #define B16avioDhubChMap_ag 0x0004 + #define LSb32avioDhubChMap_ag 0 + #define LSb16avioDhubChMap_ag 0 + #define bavioDhubChMap_ag 4 + #define MSK32avioDhubChMap_ag 0x0000000F + #define avioDhubChMap_ag_APPCMD_R_Z1 0x0 + #define avioDhubChMap_ag_MA0_R_Z1 0x1 + #define avioDhubChMap_ag_MA1_R_Z1 0x2 + #define avioDhubChMap_ag_MA2_R_Z1 0x3 + #define avioDhubChMap_ag_MA3_R_Z1 0x4 + #define avioDhubChMap_ag_SA_R_Z1 0x5 + #define avioDhubChMap_ag_SPDIF_R_Z1 0x6 + #define avioDhubChMap_ag_APPDAT_R_Z1 0x7 + #define avioDhubChMap_ag_APPDAT_W_Z1 0x8 + #define avioDhubChMap_ag_CSR_R_Z1 0x9 + #define avioDhubChMap_ag_GFX_R_Z1 0xA + + #define avioDhubChMap_ag_MA0_R_A0 0x0 + #define avioDhubChMap_ag_MA1_R_A0 0x1 + #define avioDhubChMap_ag_MA2_R_A0 0x2 + #define avioDhubChMap_ag_MA3_R_A0 0x3 + #define avioDhubChMap_ag_SA0_R_A0 0x4 + #define avioDhubChMap_ag_MIC0_W_A0 0x5 + #define avioDhubChMap_ag_MIC1_W_A0 0x6 + #define avioDhubChMap_ag_CSR_R_A0 0x7 + #define avioDhubChMap_ag_GFX_R_A0 0x8 + + #define avioDhubChMap_ag_MA0_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x1 : 0x0) + #define avioDhubChMap_ag_MA1_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x2 : 0x1) + #define avioDhubChMap_ag_MA2_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x3 : 0x2) + #define avioDhubChMap_ag_MA3_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x4 : 0x3) + + #define avioDhubChMap_ag_CSR_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0x9 : 0x7) + #define avioDhubChMap_ag_GFX_R_auto ((berlin_chip_revision < BERLIN_BG2CDP_A0_EXT) ? 0xA : 0x8) + /////////////////////////////////////////////////////////// + + typedef struct SIE_avioDhubChMap { + /////////////////////////////////////////////////////////// + #define GET32avioDhubChMap_vpp(r32) _BFGET_(r32, 3, 0) + #define SET32avioDhubChMap_vpp(r32,v) _BFSET_(r32, 3, 0,v) + #define GET16avioDhubChMap_vpp(r16) _BFGET_(r16, 3, 0) + #define SET16avioDhubChMap_vpp(r16,v) _BFSET_(r16, 3, 0,v) + + UNSG32 u_vpp : 4; + UNSG32 RSVDx0_b4 : 28; + /////////////////////////////////////////////////////////// + #define GET32avioDhubChMap_ag(r32) _BFGET_(r32, 3, 0) + #define SET32avioDhubChMap_ag(r32,v) _BFSET_(r32, 3, 0,v) + #define GET16avioDhubChMap_ag(r16) _BFGET_(r16, 3, 0) + #define SET16avioDhubChMap_ag(r16,v) _BFSET_(r16, 3, 0,v) + + UNSG32 u_ag : 4; + UNSG32 RSVDx4_b4 : 28; + /////////////////////////////////////////////////////////// + } SIE_avioDhubChMap; + + /////////////////////////////////////////////////////////// + SIGN32 avioDhubChMap_drvrd(SIE_avioDhubChMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avioDhubChMap_drvwr(SIE_avioDhubChMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avioDhubChMap_reset(SIE_avioDhubChMap *p); + SIGN32 avioDhubChMap_cmp (SIE_avioDhubChMap *p, SIE_avioDhubChMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avioDhubChMap_check(p,pie,pfx,hLOG) avioDhubChMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avioDhubChMap_print(p, pfx,hLOG) avioDhubChMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avioDhubChMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avioDhubTcmMap (4,4) +/// # # ---------------------------------------------------------- +/// : vppDhub_BANK0_START_ADDR 0x0 +/// : vppDhub_BANK0_SIZE 0x2000 +/// : vppDhub_BANK1_START_ADDR 0x2000 +/// : vppDhub_BANK1_SIZE 0x1000 +/// : agDhub_BANK0_START_ADDR 0x0 +/// : agDhub_BANK0_SIZE 0x1000 +/// : agDhub_BANK1_START_ADDR 0x2000 +/// : agDhub_BANK1_SIZE 0x2000 +/// : agDhub_BANK2_START_ADDR 0x4000 +/// : agDhub_BANK2_SIZE 0x2000 +/// @ 0x00000 dummy (P) +/// %unsigned 1 xxx +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 1b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avioDhubTcmMap +#define h_avioDhubTcmMap (){} + + #define avioDhubTcmMap_vppDhub_BANK0_START_ADDR 0x0 + #define avioDhubTcmMap_vppDhub_BANK0_SIZE 0x2000 + #define avioDhubTcmMap_vppDhub_BANK1_START_ADDR 0x2000 + #define avioDhubTcmMap_vppDhub_BANK1_SIZE_A0 0x1000 + #define avioDhubTcmMap_agDhub_BANK0_START_ADDR 0x0 + #define avioDhubTcmMap_agDhub_BANK0_SIZE_A0 0x1000 + #define avioDhubTcmMap_agDhub_BANK1_START_ADDR 0x2000 + #define avioDhubTcmMap_agDhub_BANK1_SIZE 0x2000 + #define avioDhubTcmMap_agDhub_BANK2_START_ADDR 0x4000 + #define avioDhubTcmMap_agDhub_BANK2_SIZE 0x2000 + /////////////////////////////////////////////////////////// + #define RA_avioDhubTcmMap_dummy 0x0000 + + #define BA_avioDhubTcmMap_dummy_xxx 0x0000 + #define B16avioDhubTcmMap_dummy_xxx 0x0000 + #define LSb32avioDhubTcmMap_dummy_xxx 0 + #define LSb16avioDhubTcmMap_dummy_xxx 0 + #define bavioDhubTcmMap_dummy_xxx 1 + #define MSK32avioDhubTcmMap_dummy_xxx 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_avioDhubTcmMap { + /////////////////////////////////////////////////////////// + #define GET32avioDhubTcmMap_dummy_xxx(r32) _BFGET_(r32, 0, 0) + #define SET32avioDhubTcmMap_dummy_xxx(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16avioDhubTcmMap_dummy_xxx(r16) _BFGET_(r16, 0, 0) + #define SET16avioDhubTcmMap_dummy_xxx(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32avioDhubTcmMap_dummy {\ + UNSG32 udummy_xxx : 1;\ + UNSG32 RSVDx0_b1 : 31;\ + } + union { UNSG32 u32avioDhubTcmMap_dummy; + struct w32avioDhubTcmMap_dummy; + }; + /////////////////////////////////////////////////////////// + } SIE_avioDhubTcmMap; + + typedef union T32avioDhubTcmMap_dummy + { UNSG32 u32; + struct w32avioDhubTcmMap_dummy; + } T32avioDhubTcmMap_dummy; + /////////////////////////////////////////////////////////// + + typedef union TavioDhubTcmMap_dummy + { UNSG32 u32[1]; + struct { + struct w32avioDhubTcmMap_dummy; + }; + } TavioDhubTcmMap_dummy; + + /////////////////////////////////////////////////////////// + SIGN32 avioDhubTcmMap_drvrd(SIE_avioDhubTcmMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avioDhubTcmMap_drvwr(SIE_avioDhubTcmMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avioDhubTcmMap_reset(SIE_avioDhubTcmMap *p); + SIGN32 avioDhubTcmMap_cmp (SIE_avioDhubTcmMap *p, SIE_avioDhubTcmMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avioDhubTcmMap_check(p,pie,pfx,hLOG) avioDhubTcmMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avioDhubTcmMap_print(p, pfx,hLOG) avioDhubTcmMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avioDhubTcmMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avioDhubSemMap (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// %unsigned 5 vpp +/// : CH0_intr 0x0 +/// : CH1_intr 0x1 +/// : CH2_intr 0x2 +/// : CH3_intr 0x3 +/// : CH4_intr 0x4 +/// : CH5_intr 0x5 +/// : CH6_intr 0x6 +/// : CH7_intr 0x7 +/// : CH8_intr 0x8 +/// : CH9_intr 0x9 +/// : CH10_intr 0xA +/// : CH11_intr 0xB +/// : CH12_intr 0xC +/// : CH13_intr 0xD +/// : CH14_intr 0xE +/// : CH15_intr 0xF +/// : MV_R_SEM 0x10 +/// : PIP_R_SEM 0x11 +/// : BCM_R_SEM 0x12 +/// : vppCPCB0_intr 0x13 +/// ### +/// * VBI start interrupt for CPCB0 +/// ### +/// : vppCPCB1_intr 0x14 +/// ### +/// * VBI start interrupt for CPCB1 +/// ### +/// : vppCPCB2_intr 0x15 +/// ### +/// * VBI start interrupt for CPCB2 +/// ### +/// : vppOUT0_intr 0x16 +/// ### +/// * HDCP interrupt from HDMI-TX core +/// ### +/// : vppOUT1_intr 0x17 +/// ### +/// * HDMI CEC interrupt +/// ### +/// : vppOUT2_intr 0x18 +/// ### +/// * HDMI CEC interrupt +/// ### +/// : vppOUT3_intr 0x19 +/// ### +/// * HDMI_HPD interrpt +/// ### +/// : vppOUT4_intr 0x1A +/// ### +/// * active video start (VDE) interrupt for CPCB0 +/// ### +/// : vppOUT5_intr 0x1B +/// ### +/// * active video start (VDE) interrupt for CPCB1 +/// ### +/// : vppOUT6_intr 0x1C +/// ### +/// * active video start (VDE) interrupt for CPCB2 +/// ### +/// : bcmInvalidReqIntr 0x1D +/// ### +/// * Interrupt indicating invalid address access is made using BCM +/// ### +/// %% 27 # Stuffing bits... +/// @ 0x00004 (P) +/// %unsigned 5 ag +/// : CH0_intr 0x0 +/// : CH1_intr 0x1 +/// : CH2_intr 0x2 +/// : CH3_intr 0x3 +/// : CH4_intr 0x4 +/// : CH5_intr 0x5 +/// : CH6_intr 0x6 +/// : CH7_intr 0x7 +/// : CH8_intr 0x8 +/// : CH9_intr 0x9 +/// : CH10_intr 0xA +/// : CH11_intr 0xB +/// : CH12_intr 0xC +/// : CH13_intr 0xD +/// : CH14_intr 0xE +/// : CH15_intr 0xF +/// : app_intr0 0x11 +/// : app_intr1 0x12 +/// : app_intr2 0x13 +/// : app_intr3 0x14 +/// : MA0_R_SEM 0x15 +/// : MA1_R_SEM 0x16 +/// : MA2_R_SEM 0x17 +/// : MA3_R_SEM 0x18 +/// : SA_R_SEM 0x19 +/// : SPDIF_R_SEM 0x1A +/// : MIC_W_SEM 0x1B +/// : audio_intr 0x1C +/// %% 27 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 8B, bits: 10b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avioDhubSemMap +#define h_avioDhubSemMap (){} + + #define BA_avioDhubSemMap_vpp 0x0000 + #define B16avioDhubSemMap_vpp 0x0000 + #define LSb32avioDhubSemMap_vpp 0 + #define LSb16avioDhubSemMap_vpp 0 + #define bavioDhubSemMap_vpp 5 + #define MSK32avioDhubSemMap_vpp 0x0000001F + #define avioDhubSemMap_vpp_CH0_intr 0x0 + #define avioDhubSemMap_vpp_CH1_intr 0x1 + #define avioDhubSemMap_vpp_CH2_intr 0x2 + #define avioDhubSemMap_vpp_CH3_intr 0x3 + #define avioDhubSemMap_vpp_CH4_intr 0x4 + #define avioDhubSemMap_vpp_CH5_intr 0x5 + #define avioDhubSemMap_vpp_CH6_intr 0x6 + #define avioDhubSemMap_vpp_CH7_intr 0x7 + #define avioDhubSemMap_vpp_CH8_intr 0x8 + #define avioDhubSemMap_vpp_CH9_intr 0x9 + #define avioDhubSemMap_vpp_CH10_intr 0xA + #define avioDhubSemMap_vpp_CH11_intr 0xB + #define avioDhubSemMap_vpp_CH12_intr 0xC + #define avioDhubSemMap_vpp_CH13_intr 0xD + #define avioDhubSemMap_vpp_CH14_intr 0xE + #define avioDhubSemMap_vpp_CH15_intr 0xF + #define avioDhubSemMap_vpp_MV_R_SEM 0x10 + #define avioDhubSemMap_vpp_PIP_R_SEM 0x11 + #define avioDhubSemMap_vpp_BCM_R_SEM 0x12 + #define avioDhubSemMap_vpp_vppCPCB0_intr 0x13 + #define avioDhubSemMap_vpp_vppCPCB1_intr 0x14 + #define avioDhubSemMap_vpp_vppCPCB2_intr 0x15 + #define avioDhubSemMap_vpp_vppOUT0_intr 0x16 + #define avioDhubSemMap_vpp_vppOUT1_intr 0x17 + #define avioDhubSemMap_vpp_vppOUT2_intr 0x18 + #define avioDhubSemMap_vpp_vppOUT3_intr 0x19 + #define avioDhubSemMap_vpp_vppOUT4_intr 0x1A + #define avioDhubSemMap_vpp_vppOUT5_intr 0x1B + #define avioDhubSemMap_vpp_vppOUT6_intr 0x1C + #define avioDhubSemMap_vpp_bcmInvalidReqIntr 0x1D + /////////////////////////////////////////////////////////// + + #define BA_avioDhubSemMap_ag 0x0004 + #define B16avioDhubSemMap_ag 0x0004 + #define LSb32avioDhubSemMap_ag 0 + #define LSb16avioDhubSemMap_ag 0 + #define bavioDhubSemMap_ag 5 + #define MSK32avioDhubSemMap_ag 0x0000001F + #define avioDhubSemMap_ag_CH0_intr 0x0 + #define avioDhubSemMap_ag_CH1_intr 0x1 + #define avioDhubSemMap_ag_CH2_intr 0x2 + #define avioDhubSemMap_ag_CH3_intr 0x3 + #define avioDhubSemMap_ag_CH4_intr 0x4 + #define avioDhubSemMap_ag_CH5_intr 0x5 + #define avioDhubSemMap_ag_CH6_intr 0x6 + #define avioDhubSemMap_ag_CH7_intr 0x7 + #define avioDhubSemMap_ag_CH8_intr 0x8 + #define avioDhubSemMap_ag_CH9_intr 0x9 + #define avioDhubSemMap_ag_CH10_intr 0xA + #define avioDhubSemMap_ag_CH11_intr 0xB + #define avioDhubSemMap_ag_CH12_intr 0xC + #define avioDhubSemMap_ag_CH13_intr 0xD + #define avioDhubSemMap_ag_CH14_intr 0xE + #define avioDhubSemMap_ag_CH15_intr 0xF + #define avioDhubSemMap_ag_app_intr0 0x11 + #define avioDhubSemMap_ag_app_intr1 0x12 + #define avioDhubSemMap_ag_app_intr2 0x13 + #define avioDhubSemMap_ag_app_intr3 0x14 + #define avioDhubSemMap_ag_MA0_R_SEM 0x15 + #define avioDhubSemMap_ag_MA1_R_SEM 0x16 + #define avioDhubSemMap_ag_MA2_R_SEM 0x17 + #define avioDhubSemMap_ag_MA3_R_SEM 0x18 + #define avioDhubSemMap_ag_SA_R_SEM 0x19 + #define avioDhubSemMap_ag_SPDIF_R_SEM 0x1A + #define avioDhubSemMap_ag_MIC_W_SEM 0x1B + #define avioDhubSemMap_ag_audio_intr_A0 0x1C + /////////////////////////////////////////////////////////// + + typedef struct SIE_avioDhubSemMap { + /////////////////////////////////////////////////////////// + #define GET32avioDhubSemMap_vpp(r32) _BFGET_(r32, 4, 0) + #define SET32avioDhubSemMap_vpp(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16avioDhubSemMap_vpp(r16) _BFGET_(r16, 4, 0) + #define SET16avioDhubSemMap_vpp(r16,v) _BFSET_(r16, 4, 0,v) + + UNSG32 u_vpp : 5; + UNSG32 RSVDx0_b5 : 27; + /////////////////////////////////////////////////////////// + #define GET32avioDhubSemMap_ag(r32) _BFGET_(r32, 4, 0) + #define SET32avioDhubSemMap_ag(r32,v) _BFSET_(r32, 4, 0,v) + #define GET16avioDhubSemMap_ag(r16) _BFGET_(r16, 4, 0) + #define SET16avioDhubSemMap_ag(r16,v) _BFSET_(r16, 4, 0,v) + + UNSG32 u_ag : 5; + UNSG32 RSVDx4_b5 : 27; + /////////////////////////////////////////////////////////// + } SIE_avioDhubSemMap; + + /////////////////////////////////////////////////////////// + SIGN32 avioDhubSemMap_drvrd(SIE_avioDhubSemMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avioDhubSemMap_drvwr(SIE_avioDhubSemMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avioDhubSemMap_reset(SIE_avioDhubSemMap *p); + SIGN32 avioDhubSemMap_cmp (SIE_avioDhubSemMap *p, SIE_avioDhubSemMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avioDhubSemMap_check(p,pie,pfx,hLOG) avioDhubSemMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avioDhubSemMap_print(p, pfx,hLOG) avioDhubSemMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avioDhubSemMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE vppTcmEntry (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (R-) +/// %unsigned 32 dat +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 32b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_vppTcmEntry +#define h_vppTcmEntry (){} + + #define BA_vppTcmEntry_dat 0x0000 + #define B16vppTcmEntry_dat 0x0000 + #define LSb32vppTcmEntry_dat 0 + #define LSb16vppTcmEntry_dat 0 + #define bvppTcmEntry_dat 32 + #define MSK32vppTcmEntry_dat 0xFFFFFFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_vppTcmEntry { + /////////////////////////////////////////////////////////// + #define GET32vppTcmEntry_dat(r32) _BFGET_(r32,31, 0) + #define SET32vppTcmEntry_dat(r32,v) _BFSET_(r32,31, 0,v) + + UNSG32 u_dat : 32; + /////////////////////////////////////////////////////////// + } SIE_vppTcmEntry; + + /////////////////////////////////////////////////////////// + SIGN32 vppTcmEntry_drvrd(SIE_vppTcmEntry *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 vppTcmEntry_drvwr(SIE_vppTcmEntry *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void vppTcmEntry_reset(SIE_vppTcmEntry *p); + SIGN32 vppTcmEntry_cmp (SIE_vppTcmEntry *p, SIE_vppTcmEntry *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define vppTcmEntry_check(p,pie,pfx,hLOG) vppTcmEntry_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define vppTcmEntry_print(p, pfx,hLOG) vppTcmEntry_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: vppTcmEntry +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE vppDhub biu (4,4) +/// ### +/// * vppDhub register specification +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 tcm0 +/// $vppTcmEntry tcm0 MEM [10240] +/// ### +/// * Real tcm size is 8K+4K = 12KB +/// ### +/// @ 0x10000 (P) +/// # 0x10000 dHub0 +/// $dHubReg2D dHub0 REG +/// @ 0x11000 (W-) +/// # # Stuffing bytes... +/// %% 491520 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 131072B, bits: 6306b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_vppDhub +#define h_vppDhub (){} + + #define RA_vppDhub_tcm0 0x0000 + /////////////////////////////////////////////////////////// + #define RA_vppDhub_dHub0 0x10000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_vppDhub { + /////////////////////////////////////////////////////////// + SIE_vppTcmEntry ie_tcm0[10240]; + UNSG8 RSVD_tcm0 [24576]; + /////////////////////////////////////////////////////////// + SIE_dHubReg2D ie_dHub0; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx11000 [61440]; + /////////////////////////////////////////////////////////// + } SIE_vppDhub; + + /////////////////////////////////////////////////////////// + SIGN32 vppDhub_drvrd(SIE_vppDhub *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 vppDhub_drvwr(SIE_vppDhub *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void vppDhub_reset(SIE_vppDhub *p); + SIGN32 vppDhub_cmp (SIE_vppDhub *p, SIE_vppDhub *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define vppDhub_check(p,pie,pfx,hLOG) vppDhub_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define vppDhub_print(p, pfx,hLOG) vppDhub_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: vppDhub +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE agDhub (4,4) +/// ### +/// * agDhub register specification +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 tcm0 +/// $vppTcmEntry tcm0 MEM [10240] +/// ### +/// * Real tcm size is 4K+8K+8K= 20KB +/// ### +/// @ 0x10000 (P) +/// # 0x10000 dHub0 +/// $dHubReg2D dHub0 REG +/// @ 0x11000 (W-) +/// # # Stuffing bytes... +/// %% 491520 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 131072B, bits: 6306b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_agDhub +#define h_agDhub (){} + + #define RA_agDhub_tcm0 0x0000 + /////////////////////////////////////////////////////////// + #define RA_agDhub_dHub0 0x10000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_agDhub { + /////////////////////////////////////////////////////////// + SIE_vppTcmEntry ie_tcm0[10240]; + UNSG8 RSVD_tcm0 [24576]; + /////////////////////////////////////////////////////////// + SIE_dHubReg2D ie_dHub0; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx11000 [61440]; + /////////////////////////////////////////////////////////// + } SIE_agDhub; + + /////////////////////////////////////////////////////////// + SIGN32 agDhub_drvrd(SIE_agDhub *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 agDhub_drvwr(SIE_agDhub *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void agDhub_reset(SIE_agDhub *p); + SIGN32 agDhub_cmp (SIE_agDhub *p, SIE_agDhub *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define agDhub_check(p,pie,pfx,hLOG) agDhub_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define agDhub_print(p, pfx,hLOG) agDhub_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: agDhub +//////////////////////////////////////////////////////////// + + + +#ifdef __cplusplus + } +#endif +#pragma pack() + +#endif +////// +/// ENDOFFILE: avioDhub.h +//////////////////////////////////////////////////////////// diff --git a/sound/soc/berlin/avioGbl.h b/sound/soc/berlin/avioGbl.h new file mode 100644 index 00000000..3a00d97d --- /dev/null +++ b/sound/soc/berlin/avioGbl.h @@ -0,0 +1,3045 @@ +/************************************************************************************* +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +***************************************************************************************/ +////// +/// don't edit! auto-generated by docc: avioGbl.h +//////////////////////////////////////////////////////////// +#ifndef avioGbl_h +#define avioGbl_h (){} + + +#include "ctypes.h" + +#pragma pack(1) +#ifdef __cplusplus + extern "C" { +#endif + +#ifndef _DOCC_H_BITOPS_ +#define _DOCC_H_BITOPS_ (){} + + #define _bSETMASK_(b) ((b)<32 ? (1<<((b)&31)) : 0) + #define _NSETMASK_(msb,lsb) (_bSETMASK_((msb)+1)-_bSETMASK_(lsb)) + #define _bCLRMASK_(b) (~_bSETMASK_(b)) + #define _NCLRMASK_(msb,lsb) (~_NSETMASK_(msb,lsb)) + #define _BFGET_(r,msb,lsb) (_NSETMASK_((msb)-(lsb),0)&((r)>>(lsb))) + #define _BFSET_(r,msb,lsb,v) do{ (r)&=_NCLRMASK_(msb,lsb); (r)|=_NSETMASK_(msb,lsb)&((v)<<(lsb)); }while(0) + +#endif + + + +////// +/// +/// $INTERFACE avpllCh biu (4,4) +/// ### +/// * AVPLL control signals for one channel +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 ctrl (P-) +/// %unsigned 13 POSTDIV 0x0 +/// %unsigned 1 POSTDIV_0P5 0x0 +/// ### +/// * Audio clock divider program +/// * 1, When POSTDIV_CX[12:0]= +/// * 0 0000 0000 0000, then disable post divider +/// * 2, When POSTDIV_CX[12:0]>0: +/// * if POSTDIV_0P5_CX=0: +/// * Divider=POSTDIV_CX[12:0], +/// * if POSTDIV_0P5_CX=1: +/// * Divider=POSTDIV_CX[12:0]+0.5 +/// * For C1-C7 only +/// ### +/// %unsigned 1 EN_DPLL 0x0 +/// ### +/// * 0: disable channel CX's DPLL +/// * 1: enable channel CX's DPLL +/// ### +/// %unsigned 2 EN_LP 0x0 +/// ### +/// * EN_LP_CX[1:0] FREQ_OFFSET CK_INTG +/// * 00 X CK_SSC +/// * 01 X*2 CK_SSC/2 +/// * 10 X CK_SSC +/// * 11 X*4 CK_SSC/4 +/// ### +/// %% 15 # Stuffing bits... +/// # 0x00004 ctrl1 +/// %unsigned 19 FREQ_OFFSET 0x0 +/// ### +/// * [18] is sign bit +/// * 0: PI's Frequency down +/// * 1: PI's Frequency up +/// * [17:0]: 1 LSB -> 0.25ppm, +/// * up to 5% +/// ### +/// %unsigned 1 FREQ_OFFSET_READY 0x0 +/// ### +/// * Frequency offset value readiness +/// * indicator for FREQ_OFFSET_CX [18:0], +/// * the pulse need to be longer +/// * than 320/Fvco. For Fvco=3GHz, +/// * the pulse with should > 172ns; +/// * For Fvco=1.5GHz, pulse width >344ns +/// ### +/// %unsigned 1 PU 0x0 +/// ### +/// * 0: power down channel CX +/// * 1: power up channel CX +/// ### +/// %unsigned 1 PU_OFST_CTRL 0x1 +/// ### +/// * 0: power down FREQ_OFFS +/// * 1: power up FREQ_OFFSET +/// ### +/// %% 10 # Stuffing bits... +/// # 0x00008 ctrl2 +/// %unsigned 20 P_SYNC1 0x10 +/// ### +/// * Set DPLL's reference divider +/// * Divider= P_SYNC1_CX[19:0] +/// * It is forbidden when N<16 +/// ### +/// %% 12 # Stuffing bits... +/// # 0x0000C ctrl3 +/// %unsigned 20 P_SYNC2 0x10 +/// ### +/// * Set DPLL's feedback divider +/// * Divider= P_SYNC2_CX[19:0] +/// * It is forbidden when N<16 +/// ### +/// %unsigned 1 RESET 0x1 +/// ### +/// * Reset channel CX logic: +/// * 0: not reset +/// * 1: active reset +/// ### +/// %unsigned 2 RESERVE_IN 0x0 +/// %% 9 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 82b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avpllCh +#define h_avpllCh (){} + + #define RA_avpllCh_ctrl 0x0000 + + #define BA_avpllCh_ctrl_POSTDIV 0x0000 + #define B16avpllCh_ctrl_POSTDIV 0x0000 + #define LSb32avpllCh_ctrl_POSTDIV 0 + #define LSb16avpllCh_ctrl_POSTDIV 0 + #define bavpllCh_ctrl_POSTDIV 13 + #define MSK32avpllCh_ctrl_POSTDIV 0x00001FFF + + #define BA_avpllCh_ctrl_POSTDIV_0P5 0x0001 + #define B16avpllCh_ctrl_POSTDIV_0P5 0x0000 + #define LSb32avpllCh_ctrl_POSTDIV_0P5 13 + #define LSb16avpllCh_ctrl_POSTDIV_0P5 13 + #define bavpllCh_ctrl_POSTDIV_0P5 1 + #define MSK32avpllCh_ctrl_POSTDIV_0P5 0x00002000 + + #define BA_avpllCh_ctrl_EN_DPLL 0x0001 + #define B16avpllCh_ctrl_EN_DPLL 0x0000 + #define LSb32avpllCh_ctrl_EN_DPLL 14 + #define LSb16avpllCh_ctrl_EN_DPLL 14 + #define bavpllCh_ctrl_EN_DPLL 1 + #define MSK32avpllCh_ctrl_EN_DPLL 0x00004000 + + #define BA_avpllCh_ctrl_EN_LP 0x0001 + #define B16avpllCh_ctrl_EN_LP 0x0000 + #define LSb32avpllCh_ctrl_EN_LP 15 + #define LSb16avpllCh_ctrl_EN_LP 15 + #define bavpllCh_ctrl_EN_LP 2 + #define MSK32avpllCh_ctrl_EN_LP 0x00018000 + + #define RA_avpllCh_ctrl1 0x0004 + + #define BA_avpllCh_ctrl_FREQ_OFFSET 0x0004 + #define B16avpllCh_ctrl_FREQ_OFFSET 0x0004 + #define LSb32avpllCh_ctrl_FREQ_OFFSET 0 + #define LSb16avpllCh_ctrl_FREQ_OFFSET 0 + #define bavpllCh_ctrl_FREQ_OFFSET 19 + #define MSK32avpllCh_ctrl_FREQ_OFFSET 0x0007FFFF + + #define BA_avpllCh_ctrl_FREQ_OFFSET_READY 0x0006 + #define B16avpllCh_ctrl_FREQ_OFFSET_READY 0x0006 + #define LSb32avpllCh_ctrl_FREQ_OFFSET_READY 19 + #define LSb16avpllCh_ctrl_FREQ_OFFSET_READY 3 + #define bavpllCh_ctrl_FREQ_OFFSET_READY 1 + #define MSK32avpllCh_ctrl_FREQ_OFFSET_READY 0x00080000 + + #define BA_avpllCh_ctrl_PU 0x0006 + #define B16avpllCh_ctrl_PU 0x0006 + #define LSb32avpllCh_ctrl_PU 20 + #define LSb16avpllCh_ctrl_PU 4 + #define bavpllCh_ctrl_PU 1 + #define MSK32avpllCh_ctrl_PU 0x00100000 + + #define BA_avpllCh_ctrl_PU_OFST_CTRL 0x0006 + #define B16avpllCh_ctrl_PU_OFST_CTRL 0x0006 + #define LSb32avpllCh_ctrl_PU_OFST_CTRL 21 + #define LSb16avpllCh_ctrl_PU_OFST_CTRL 5 + #define bavpllCh_ctrl_PU_OFST_CTRL 1 + #define MSK32avpllCh_ctrl_PU_OFST_CTRL 0x00200000 + + #define RA_avpllCh_ctrl2 0x0008 + + #define BA_avpllCh_ctrl_P_SYNC1 0x0008 + #define B16avpllCh_ctrl_P_SYNC1 0x0008 + #define LSb32avpllCh_ctrl_P_SYNC1 0 + #define LSb16avpllCh_ctrl_P_SYNC1 0 + #define bavpllCh_ctrl_P_SYNC1 20 + #define MSK32avpllCh_ctrl_P_SYNC1 0x000FFFFF + + #define RA_avpllCh_ctrl3 0x000C + + #define BA_avpllCh_ctrl_P_SYNC2 0x000C + #define B16avpllCh_ctrl_P_SYNC2 0x000C + #define LSb32avpllCh_ctrl_P_SYNC2 0 + #define LSb16avpllCh_ctrl_P_SYNC2 0 + #define bavpllCh_ctrl_P_SYNC2 20 + #define MSK32avpllCh_ctrl_P_SYNC2 0x000FFFFF + + #define BA_avpllCh_ctrl_RESET 0x000E + #define B16avpllCh_ctrl_RESET 0x000E + #define LSb32avpllCh_ctrl_RESET 20 + #define LSb16avpllCh_ctrl_RESET 4 + #define bavpllCh_ctrl_RESET 1 + #define MSK32avpllCh_ctrl_RESET 0x00100000 + + #define BA_avpllCh_ctrl_RESERVE_IN 0x000E + #define B16avpllCh_ctrl_RESERVE_IN 0x000E + #define LSb32avpllCh_ctrl_RESERVE_IN 21 + #define LSb16avpllCh_ctrl_RESERVE_IN 5 + #define bavpllCh_ctrl_RESERVE_IN 2 + #define MSK32avpllCh_ctrl_RESERVE_IN 0x00600000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_avpllCh { + /////////////////////////////////////////////////////////// + #define GET32avpllCh_ctrl_POSTDIV(r32) _BFGET_(r32,12, 0) + #define SET32avpllCh_ctrl_POSTDIV(r32,v) _BFSET_(r32,12, 0,v) + #define GET16avpllCh_ctrl_POSTDIV(r16) _BFGET_(r16,12, 0) + #define SET16avpllCh_ctrl_POSTDIV(r16,v) _BFSET_(r16,12, 0,v) + + #define GET32avpllCh_ctrl_POSTDIV_0P5(r32) _BFGET_(r32,13,13) + #define SET32avpllCh_ctrl_POSTDIV_0P5(r32,v) _BFSET_(r32,13,13,v) + #define GET16avpllCh_ctrl_POSTDIV_0P5(r16) _BFGET_(r16,13,13) + #define SET16avpllCh_ctrl_POSTDIV_0P5(r16,v) _BFSET_(r16,13,13,v) + + #define GET32avpllCh_ctrl_EN_DPLL(r32) _BFGET_(r32,14,14) + #define SET32avpllCh_ctrl_EN_DPLL(r32,v) _BFSET_(r32,14,14,v) + #define GET16avpllCh_ctrl_EN_DPLL(r16) _BFGET_(r16,14,14) + #define SET16avpllCh_ctrl_EN_DPLL(r16,v) _BFSET_(r16,14,14,v) + + #define GET32avpllCh_ctrl_EN_LP(r32) _BFGET_(r32,16,15) + #define SET32avpllCh_ctrl_EN_LP(r32,v) _BFSET_(r32,16,15,v) + + #define w32avpllCh_ctrl {\ + UNSG32 uctrl_POSTDIV : 13;\ + UNSG32 uctrl_POSTDIV_0P5 : 1;\ + UNSG32 uctrl_EN_DPLL : 1;\ + UNSG32 uctrl_EN_LP : 2;\ + UNSG32 RSVDx0_b17 : 15;\ + } + union { UNSG32 u32avpllCh_ctrl; + struct w32avpllCh_ctrl; + }; + #define GET32avpllCh_ctrl_FREQ_OFFSET(r32) _BFGET_(r32,18, 0) + #define SET32avpllCh_ctrl_FREQ_OFFSET(r32,v) _BFSET_(r32,18, 0,v) + + #define GET32avpllCh_ctrl_FREQ_OFFSET_READY(r32) _BFGET_(r32,19,19) + #define SET32avpllCh_ctrl_FREQ_OFFSET_READY(r32,v) _BFSET_(r32,19,19,v) + #define GET16avpllCh_ctrl_FREQ_OFFSET_READY(r16) _BFGET_(r16, 3, 3) + #define SET16avpllCh_ctrl_FREQ_OFFSET_READY(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32avpllCh_ctrl_PU(r32) _BFGET_(r32,20,20) + #define SET32avpllCh_ctrl_PU(r32,v) _BFSET_(r32,20,20,v) + #define GET16avpllCh_ctrl_PU(r16) _BFGET_(r16, 4, 4) + #define SET16avpllCh_ctrl_PU(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32avpllCh_ctrl_PU_OFST_CTRL(r32) _BFGET_(r32,21,21) + #define SET32avpllCh_ctrl_PU_OFST_CTRL(r32,v) _BFSET_(r32,21,21,v) + #define GET16avpllCh_ctrl_PU_OFST_CTRL(r16) _BFGET_(r16, 5, 5) + #define SET16avpllCh_ctrl_PU_OFST_CTRL(r16,v) _BFSET_(r16, 5, 5,v) + + #define w32avpllCh_ctrl1 {\ + UNSG32 uctrl_FREQ_OFFSET : 19;\ + UNSG32 uctrl_FREQ_OFFSET_READY : 1;\ + UNSG32 uctrl_PU : 1;\ + UNSG32 uctrl_PU_OFST_CTRL : 1;\ + UNSG32 RSVDx4_b22 : 10;\ + } + union { UNSG32 u32avpllCh_ctrl1; + struct w32avpllCh_ctrl1; + }; + #define GET32avpllCh_ctrl_P_SYNC1(r32) _BFGET_(r32,19, 0) + #define SET32avpllCh_ctrl_P_SYNC1(r32,v) _BFSET_(r32,19, 0,v) + + #define w32avpllCh_ctrl2 {\ + UNSG32 uctrl_P_SYNC1 : 20;\ + UNSG32 RSVDx8_b20 : 12;\ + } + union { UNSG32 u32avpllCh_ctrl2; + struct w32avpllCh_ctrl2; + }; + #define GET32avpllCh_ctrl_P_SYNC2(r32) _BFGET_(r32,19, 0) + #define SET32avpllCh_ctrl_P_SYNC2(r32,v) _BFSET_(r32,19, 0,v) + + #define GET32avpllCh_ctrl_RESET(r32) _BFGET_(r32,20,20) + #define SET32avpllCh_ctrl_RESET(r32,v) _BFSET_(r32,20,20,v) + #define GET16avpllCh_ctrl_RESET(r16) _BFGET_(r16, 4, 4) + #define SET16avpllCh_ctrl_RESET(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32avpllCh_ctrl_RESERVE_IN(r32) _BFGET_(r32,22,21) + #define SET32avpllCh_ctrl_RESERVE_IN(r32,v) _BFSET_(r32,22,21,v) + #define GET16avpllCh_ctrl_RESERVE_IN(r16) _BFGET_(r16, 6, 5) + #define SET16avpllCh_ctrl_RESERVE_IN(r16,v) _BFSET_(r16, 6, 5,v) + + #define w32avpllCh_ctrl3 {\ + UNSG32 uctrl_P_SYNC2 : 20;\ + UNSG32 uctrl_RESET : 1;\ + UNSG32 uctrl_RESERVE_IN : 2;\ + UNSG32 RSVDxC_b23 : 9;\ + } + union { UNSG32 u32avpllCh_ctrl3; + struct w32avpllCh_ctrl3; + }; + /////////////////////////////////////////////////////////// + } SIE_avpllCh; + + typedef union T32avpllCh_ctrl + { UNSG32 u32; + struct w32avpllCh_ctrl; + } T32avpllCh_ctrl; + typedef union T32avpllCh_ctrl1 + { UNSG32 u32; + struct w32avpllCh_ctrl1; + } T32avpllCh_ctrl1; + typedef union T32avpllCh_ctrl2 + { UNSG32 u32; + struct w32avpllCh_ctrl2; + } T32avpllCh_ctrl2; + typedef union T32avpllCh_ctrl3 + { UNSG32 u32; + struct w32avpllCh_ctrl3; + } T32avpllCh_ctrl3; + /////////////////////////////////////////////////////////// + + typedef union TavpllCh_ctrl + { UNSG32 u32[4]; + struct { + struct w32avpllCh_ctrl; + struct w32avpllCh_ctrl1; + struct w32avpllCh_ctrl2; + struct w32avpllCh_ctrl3; + }; + } TavpllCh_ctrl; + + /////////////////////////////////////////////////////////// + SIGN32 avpllCh_drvrd(SIE_avpllCh *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avpllCh_drvwr(SIE_avpllCh *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avpllCh_reset(SIE_avpllCh *p); + SIGN32 avpllCh_cmp (SIE_avpllCh *p, SIE_avpllCh *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avpllCh_check(p,pie,pfx,hLOG) avpllCh_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avpllCh_print(p, pfx,hLOG) avpllCh_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avpllCh +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avpllCh8 biu (4,4) +/// ### +/// * AVPLL control signals for channel 8 (Channel inside PLL) +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 ctrl (P-) +/// %unsigned 13 POSTDIV 0x0 +/// %unsigned 1 POSTDIV_0P5 0x0 +/// ### +/// * Audio clock divider program +/// * 1, When POSTDIV_CX[12:0]= +/// * 0 0000 0000 0000, then disable post divider +/// * 2, When POSTDIV_CX[12:0]>0: +/// * if POSTDIV_0P5_CX=0: +/// * Divider=POSTDIV_CX[12:0], +/// * if POSTDIV_0P5_CX=1: +/// * Divider=POSTDIV_CX[12:0]+0.5 +/// * For C1-C7 only +/// ### +/// %unsigned 1 EN_DPLL 0x0 +/// ### +/// * 0: disable channel CX's DPLL +/// * 1: enable channel CX's DPLL +/// ### +/// %unsigned 2 EN_LP 0x0 +/// ### +/// * EN_LP_CX[1:0] FREQ_OFFSET CK_INTG +/// * 00 X CK_SSC +/// * 01 X*2 CK_SSC/2 +/// * 10 X CK_SSC +/// * 11 X*4 CK_SSC/4 +/// ### +/// %% 15 # Stuffing bits... +/// # 0x00004 ctrl1 +/// %unsigned 19 FREQ_OFFSET 0x0 +/// ### +/// * [18] is sign bit +/// * 0: PI's Frequency down +/// * 1: PI's Frequency up +/// * [17:0]: 1 LSB -> 0.25ppm, +/// * up to 5% +/// ### +/// %unsigned 1 FREQ_OFFSET_READY 0x0 +/// ### +/// * Frequency offset value readiness +/// * indicator for FREQ_OFFSET_CX [18:0], +/// * the pulse need to be longer +/// * than 320/Fvco. For Fvco=3GHz, +/// * the pulse with should > 172ns; +/// * For Fvco=1.5GHz, pulse width >344ns +/// ### +/// %unsigned 1 PU 0x0 +/// ### +/// * 0: power down channel CX +/// * 1: power up channel CX +/// ### +/// %unsigned 1 PU_OFST_CTRL 0x1 +/// ### +/// * 0: power down FREQ_OFFS +/// * 1: power up FREQ_OFFSET +/// ### +/// %% 10 # Stuffing bits... +/// # 0x00008 ctrl2 +/// %unsigned 20 P_SYNC1 0x10 +/// ### +/// * Set DPLL's reference divider +/// * Divider= P_SYNC1_CX[19:0] +/// * It is forbidden when N<16 +/// ### +/// %% 12 # Stuffing bits... +/// # 0x0000C ctrl3 +/// %unsigned 20 P_SYNC2 0x10 +/// ### +/// * Set DPLL's feedback divider +/// * Divider= P_SYNC2_CX[19:0] +/// * It is forbidden when N<16 +/// ### +/// %unsigned 1 RESET 0x0 +/// ### +/// * Reset channel CX logic: +/// * 0: not reset +/// * 1: active reset +/// ### +/// %unsigned 2 RESERVE_IN 0x1 +/// %% 9 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 82b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avpllCh8 +#define h_avpllCh8 (){} + + #define RA_avpllCh8_ctrl 0x0000 + + #define BA_avpllCh8_ctrl_POSTDIV 0x0000 + #define B16avpllCh8_ctrl_POSTDIV 0x0000 + #define LSb32avpllCh8_ctrl_POSTDIV 0 + #define LSb16avpllCh8_ctrl_POSTDIV 0 + #define bavpllCh8_ctrl_POSTDIV 13 + #define MSK32avpllCh8_ctrl_POSTDIV 0x00001FFF + + #define BA_avpllCh8_ctrl_POSTDIV_0P5 0x0001 + #define B16avpllCh8_ctrl_POSTDIV_0P5 0x0000 + #define LSb32avpllCh8_ctrl_POSTDIV_0P5 13 + #define LSb16avpllCh8_ctrl_POSTDIV_0P5 13 + #define bavpllCh8_ctrl_POSTDIV_0P5 1 + #define MSK32avpllCh8_ctrl_POSTDIV_0P5 0x00002000 + + #define BA_avpllCh8_ctrl_EN_DPLL 0x0001 + #define B16avpllCh8_ctrl_EN_DPLL 0x0000 + #define LSb32avpllCh8_ctrl_EN_DPLL 14 + #define LSb16avpllCh8_ctrl_EN_DPLL 14 + #define bavpllCh8_ctrl_EN_DPLL 1 + #define MSK32avpllCh8_ctrl_EN_DPLL 0x00004000 + + #define BA_avpllCh8_ctrl_EN_LP 0x0001 + #define B16avpllCh8_ctrl_EN_LP 0x0000 + #define LSb32avpllCh8_ctrl_EN_LP 15 + #define LSb16avpllCh8_ctrl_EN_LP 15 + #define bavpllCh8_ctrl_EN_LP 2 + #define MSK32avpllCh8_ctrl_EN_LP 0x00018000 + + #define RA_avpllCh8_ctrl1 0x0004 + + #define BA_avpllCh8_ctrl_FREQ_OFFSET 0x0004 + #define B16avpllCh8_ctrl_FREQ_OFFSET 0x0004 + #define LSb32avpllCh8_ctrl_FREQ_OFFSET 0 + #define LSb16avpllCh8_ctrl_FREQ_OFFSET 0 + #define bavpllCh8_ctrl_FREQ_OFFSET 19 + #define MSK32avpllCh8_ctrl_FREQ_OFFSET 0x0007FFFF + + #define BA_avpllCh8_ctrl_FREQ_OFFSET_READY 0x0006 + #define B16avpllCh8_ctrl_FREQ_OFFSET_READY 0x0006 + #define LSb32avpllCh8_ctrl_FREQ_OFFSET_READY 19 + #define LSb16avpllCh8_ctrl_FREQ_OFFSET_READY 3 + #define bavpllCh8_ctrl_FREQ_OFFSET_READY 1 + #define MSK32avpllCh8_ctrl_FREQ_OFFSET_READY 0x00080000 + + #define BA_avpllCh8_ctrl_PU 0x0006 + #define B16avpllCh8_ctrl_PU 0x0006 + #define LSb32avpllCh8_ctrl_PU 20 + #define LSb16avpllCh8_ctrl_PU 4 + #define bavpllCh8_ctrl_PU 1 + #define MSK32avpllCh8_ctrl_PU 0x00100000 + + #define BA_avpllCh8_ctrl_PU_OFST_CTRL 0x0006 + #define B16avpllCh8_ctrl_PU_OFST_CTRL 0x0006 + #define LSb32avpllCh8_ctrl_PU_OFST_CTRL 21 + #define LSb16avpllCh8_ctrl_PU_OFST_CTRL 5 + #define bavpllCh8_ctrl_PU_OFST_CTRL 1 + #define MSK32avpllCh8_ctrl_PU_OFST_CTRL 0x00200000 + + #define RA_avpllCh8_ctrl2 0x0008 + + #define BA_avpllCh8_ctrl_P_SYNC1 0x0008 + #define B16avpllCh8_ctrl_P_SYNC1 0x0008 + #define LSb32avpllCh8_ctrl_P_SYNC1 0 + #define LSb16avpllCh8_ctrl_P_SYNC1 0 + #define bavpllCh8_ctrl_P_SYNC1 20 + #define MSK32avpllCh8_ctrl_P_SYNC1 0x000FFFFF + + #define RA_avpllCh8_ctrl3 0x000C + + #define BA_avpllCh8_ctrl_P_SYNC2 0x000C + #define B16avpllCh8_ctrl_P_SYNC2 0x000C + #define LSb32avpllCh8_ctrl_P_SYNC2 0 + #define LSb16avpllCh8_ctrl_P_SYNC2 0 + #define bavpllCh8_ctrl_P_SYNC2 20 + #define MSK32avpllCh8_ctrl_P_SYNC2 0x000FFFFF + + #define BA_avpllCh8_ctrl_RESET 0x000E + #define B16avpllCh8_ctrl_RESET 0x000E + #define LSb32avpllCh8_ctrl_RESET 20 + #define LSb16avpllCh8_ctrl_RESET 4 + #define bavpllCh8_ctrl_RESET 1 + #define MSK32avpllCh8_ctrl_RESET 0x00100000 + + #define BA_avpllCh8_ctrl_RESERVE_IN 0x000E + #define B16avpllCh8_ctrl_RESERVE_IN 0x000E + #define LSb32avpllCh8_ctrl_RESERVE_IN 21 + #define LSb16avpllCh8_ctrl_RESERVE_IN 5 + #define bavpllCh8_ctrl_RESERVE_IN 2 + #define MSK32avpllCh8_ctrl_RESERVE_IN 0x00600000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_avpllCh8 { + /////////////////////////////////////////////////////////// + #define GET32avpllCh8_ctrl_POSTDIV(r32) _BFGET_(r32,12, 0) + #define SET32avpllCh8_ctrl_POSTDIV(r32,v) _BFSET_(r32,12, 0,v) + #define GET16avpllCh8_ctrl_POSTDIV(r16) _BFGET_(r16,12, 0) + #define SET16avpllCh8_ctrl_POSTDIV(r16,v) _BFSET_(r16,12, 0,v) + + #define GET32avpllCh8_ctrl_POSTDIV_0P5(r32) _BFGET_(r32,13,13) + #define SET32avpllCh8_ctrl_POSTDIV_0P5(r32,v) _BFSET_(r32,13,13,v) + #define GET16avpllCh8_ctrl_POSTDIV_0P5(r16) _BFGET_(r16,13,13) + #define SET16avpllCh8_ctrl_POSTDIV_0P5(r16,v) _BFSET_(r16,13,13,v) + + #define GET32avpllCh8_ctrl_EN_DPLL(r32) _BFGET_(r32,14,14) + #define SET32avpllCh8_ctrl_EN_DPLL(r32,v) _BFSET_(r32,14,14,v) + #define GET16avpllCh8_ctrl_EN_DPLL(r16) _BFGET_(r16,14,14) + #define SET16avpllCh8_ctrl_EN_DPLL(r16,v) _BFSET_(r16,14,14,v) + + #define GET32avpllCh8_ctrl_EN_LP(r32) _BFGET_(r32,16,15) + #define SET32avpllCh8_ctrl_EN_LP(r32,v) _BFSET_(r32,16,15,v) + + #define w32avpllCh8_ctrl {\ + UNSG32 uctrl_POSTDIV : 13;\ + UNSG32 uctrl_POSTDIV_0P5 : 1;\ + UNSG32 uctrl_EN_DPLL : 1;\ + UNSG32 uctrl_EN_LP : 2;\ + UNSG32 RSVDx0_b17 : 15;\ + } + union { UNSG32 u32avpllCh8_ctrl; + struct w32avpllCh8_ctrl; + }; + #define GET32avpllCh8_ctrl_FREQ_OFFSET(r32) _BFGET_(r32,18, 0) + #define SET32avpllCh8_ctrl_FREQ_OFFSET(r32,v) _BFSET_(r32,18, 0,v) + + #define GET32avpllCh8_ctrl_FREQ_OFFSET_READY(r32) _BFGET_(r32,19,19) + #define SET32avpllCh8_ctrl_FREQ_OFFSET_READY(r32,v) _BFSET_(r32,19,19,v) + #define GET16avpllCh8_ctrl_FREQ_OFFSET_READY(r16) _BFGET_(r16, 3, 3) + #define SET16avpllCh8_ctrl_FREQ_OFFSET_READY(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32avpllCh8_ctrl_PU(r32) _BFGET_(r32,20,20) + #define SET32avpllCh8_ctrl_PU(r32,v) _BFSET_(r32,20,20,v) + #define GET16avpllCh8_ctrl_PU(r16) _BFGET_(r16, 4, 4) + #define SET16avpllCh8_ctrl_PU(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32avpllCh8_ctrl_PU_OFST_CTRL(r32) _BFGET_(r32,21,21) + #define SET32avpllCh8_ctrl_PU_OFST_CTRL(r32,v) _BFSET_(r32,21,21,v) + #define GET16avpllCh8_ctrl_PU_OFST_CTRL(r16) _BFGET_(r16, 5, 5) + #define SET16avpllCh8_ctrl_PU_OFST_CTRL(r16,v) _BFSET_(r16, 5, 5,v) + + #define w32avpllCh8_ctrl1 {\ + UNSG32 uctrl_FREQ_OFFSET : 19;\ + UNSG32 uctrl_FREQ_OFFSET_READY : 1;\ + UNSG32 uctrl_PU : 1;\ + UNSG32 uctrl_PU_OFST_CTRL : 1;\ + UNSG32 RSVDx4_b22 : 10;\ + } + union { UNSG32 u32avpllCh8_ctrl1; + struct w32avpllCh8_ctrl1; + }; + #define GET32avpllCh8_ctrl_P_SYNC1(r32) _BFGET_(r32,19, 0) + #define SET32avpllCh8_ctrl_P_SYNC1(r32,v) _BFSET_(r32,19, 0,v) + + #define w32avpllCh8_ctrl2 {\ + UNSG32 uctrl_P_SYNC1 : 20;\ + UNSG32 RSVDx8_b20 : 12;\ + } + union { UNSG32 u32avpllCh8_ctrl2; + struct w32avpllCh8_ctrl2; + }; + #define GET32avpllCh8_ctrl_P_SYNC2(r32) _BFGET_(r32,19, 0) + #define SET32avpllCh8_ctrl_P_SYNC2(r32,v) _BFSET_(r32,19, 0,v) + + #define GET32avpllCh8_ctrl_RESET(r32) _BFGET_(r32,20,20) + #define SET32avpllCh8_ctrl_RESET(r32,v) _BFSET_(r32,20,20,v) + #define GET16avpllCh8_ctrl_RESET(r16) _BFGET_(r16, 4, 4) + #define SET16avpllCh8_ctrl_RESET(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32avpllCh8_ctrl_RESERVE_IN(r32) _BFGET_(r32,22,21) + #define SET32avpllCh8_ctrl_RESERVE_IN(r32,v) _BFSET_(r32,22,21,v) + #define GET16avpllCh8_ctrl_RESERVE_IN(r16) _BFGET_(r16, 6, 5) + #define SET16avpllCh8_ctrl_RESERVE_IN(r16,v) _BFSET_(r16, 6, 5,v) + + #define w32avpllCh8_ctrl3 {\ + UNSG32 uctrl_P_SYNC2 : 20;\ + UNSG32 uctrl_RESET : 1;\ + UNSG32 uctrl_RESERVE_IN : 2;\ + UNSG32 RSVDxC_b23 : 9;\ + } + union { UNSG32 u32avpllCh8_ctrl3; + struct w32avpllCh8_ctrl3; + }; + /////////////////////////////////////////////////////////// + } SIE_avpllCh8; + + typedef union T32avpllCh8_ctrl + { UNSG32 u32; + struct w32avpllCh8_ctrl; + } T32avpllCh8_ctrl; + typedef union T32avpllCh8_ctrl1 + { UNSG32 u32; + struct w32avpllCh8_ctrl1; + } T32avpllCh8_ctrl1; + typedef union T32avpllCh8_ctrl2 + { UNSG32 u32; + struct w32avpllCh8_ctrl2; + } T32avpllCh8_ctrl2; + typedef union T32avpllCh8_ctrl3 + { UNSG32 u32; + struct w32avpllCh8_ctrl3; + } T32avpllCh8_ctrl3; + /////////////////////////////////////////////////////////// + + typedef union TavpllCh8_ctrl + { UNSG32 u32[4]; + struct { + struct w32avpllCh8_ctrl; + struct w32avpllCh8_ctrl1; + struct w32avpllCh8_ctrl2; + struct w32avpllCh8_ctrl3; + }; + } TavpllCh8_ctrl; + + /////////////////////////////////////////////////////////// + SIGN32 avpllCh8_drvrd(SIE_avpllCh8 *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avpllCh8_drvwr(SIE_avpllCh8 *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avpllCh8_reset(SIE_avpllCh8 *p); + SIGN32 avpllCh8_cmp (SIE_avpllCh8 *p, SIE_avpllCh8 *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avpllCh8_check(p,pie,pfx,hLOG) avpllCh8_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avpllCh8_print(p, pfx,hLOG) avpllCh8_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avpllCh8 +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avPll biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 ctrlPLL (P-) +/// ### +/// * AVPLL Control Registers +/// * The AVPLL is designed to generate clocks for digital Audio and Video applications. It consists of only one core PLL which generates clock outputs covering the frequency range from 1.5GHz to 2.97GHz. There are totally 8 PIs, with 1 PI used inside PLL, 7 PIs used in output clock channels. The PI used inside PLL is referred to C8. +/// * Other PIs in each channel provides 7 channels output clock signal: +/// * a), The other five channels (C1..C5) can be programmed as audio/video clock. They are single end output clock. +/// * b), In contrast with C1..C5, CHANNEL6 provide clock of lower jitter. They are proposed to be programmed as video DAC or other higher performance clock (Of course, they also can be programmed as audio clock). C6 are differential output clock. +/// * c), CHANNEL7 (C7) is dedicated HDMI clock. C7 is differential output clock. +/// ### +/// %unsigned 1 RESET 0x1 +/// ### +/// * 0 +/// * De-asserted +/// * 1 +/// * Asserted +/// * Reset PLL +/// * Must be de-asserted after 10us from the time when PU is set to 1. +/// * Note: Firmware should first set PU then de-assert PLL reset after 10us and then enable the video and audio clocks using the clk enable register. +/// ### +/// %unsigned 1 PU 0x0 +/// ### +/// * Power up signal for AVPLL +/// * 0=power down +/// * 1=active +/// * When PU=0, all circuits including IVREF, INTP, REGULATOR and PLL are POWERED OFF +/// ### +/// %unsigned 3 PLL_VDDRA_SEL 0x3 +/// ### +/// * Select gate voltage for +/// * VDDBUF +/// * 000 1,16v +/// * 001 1.18v +/// * 010 1.20v +/// * 011 1.22v +/// * 100 1.24v +/// * 101 1.26v +/// * 110 1.28v +/// * 111 1.30v +/// * VGATE=1.22V, +/// * range from 1.16-1.3, +/// * 20mv/step +/// ### +/// %unsigned 1 REG_RING_EXTRA_I_EN 0x0 +/// ### +/// * "1" : turn on extra current for +/// * the oscillator of vdda23 charge pump +/// ### +/// %unsigned 2 VCO_REF1P45_SEL 0x1 +/// ### +/// * Select VREF1P0V_VCO1P45 +/// * 00 0.975v +/// * 01 1.0v +/// * 10 1.025v +/// * 11 1.05v +/// ### +/// %unsigned 2 VDDA23_PUMP_SEL 0x1 +/// ### +/// * Select VREF0P96_VDDA23PUMP +/// * 00 0.925v +/// * 01 0.95v +/// * 10 1.0v +/// * 11 1.05v +/// ### +/// %unsigned 3 VDDBUF_ADJ 0x0 +/// ### +/// * Adjust for VDDVDOFBUF +/// * VDDBUF_ADJ[2:1] are reserved +/// * VDDBUF[0]: +/// * 0: vddvcofbuf=vddvco +/// * 1: vddvcofbuf=1.08*vddvco +/// ### +/// %unsigned 4 VDDL 0xC +/// ### +/// * Internal regulated VDD supply +/// * 0001: 0.88v +/// * 0010: 0.90v +/// * 0011: 0.92v +/// * 0100: 0.94 v +/// * 0101: 0.96 v +/// * 0110: 0.98 v +/// * 0111: 1.00 v +/// * 1000: 1.02 v +/// * 1001: 1.04 v +/// * 1010: 1.06 v +/// * 1011: 1.08 v +/// * 1100: 1.10v +/// * 1101: 1.12v +/// * 1110: 1.14v +/// * 1111: 1.16v +/// ### +/// %unsigned 9 FBDIV 0x10 +/// ### +/// * Feedback clock divider select +/// * Divider= FBDIV [8:0], start from 16. +/// ### +/// %unsigned 4 ICP 0x5 +/// ### +/// * Charge-pump current con +/// * 0000 30uA +/// * 0001 37.5uA +/// * 0010 45uA +/// * 0011 52.5uA +/// * 0100 60uA +/// * 0101 75uA +/// * 0110 90uA +/// * 0111 105uA +/// * 1000 120uA +/// * 1001 150uA +/// * 1010 180uA +/// * 1011 210uA +/// * 1100 240uA +/// * 1101 300uA +/// * 1110 360uA +/// * 1111 420uA +/// ### +/// %unsigned 1 PLL_LPFC2_LESS 0x0 +/// ### +/// * PLL_LPFC1=1, C2=1.2pf +/// * PLL_LPFC1=0, C2=1.4pf +/// ### +/// %% 1 # Stuffing bits... +/// # 0x00004 ctrlPLL1 +/// %unsigned 7 REFDIV 0x1 +/// ### +/// * Reference clock divider select +/// * [5:0] +/// * 0000000: not used. +/// * 0000001: div1. +/// * 0000010: div2 +/// * 0000011: div3 +/// * 0000100: div4 +/// * . +/// * . +/// * Divider=REFDIV[5:0], for N>=2 +/// ### +/// %unsigned 6 RESERVE_PLL_IN 0x0 +/// %unsigned 4 EXT_SPEED 0x0 +/// ### +/// * External VCO speed control for +/// * different VCO frequencies. The following table is for simulation purpose, it matches the verilog model. The actual VCO speed setting is coming from the calibration result. +/// * SPEED[3:0]: typical freq range +/// * 0000 reserved +/// * 0001 reserved +/// * 0010 1.5G~1.7GHz +/// * 0011 1.7G~1.9GHz +/// * 0100 1.9G~2.1GHz +/// * 0101 2.1G~2.3GHz +/// * 0110 2.3G~2.45GHz +/// * 0111 2.45G~2.6GHz +/// * 1000 2.6G~2.75GHz +/// * 1001 2.75G~2.9GHz +/// * 1010 2.9G~3.0GHz +/// * 1011 reserved +/// * 1100 reserved +/// * 1101 reserved +/// * 1110 reserved +/// ### +/// %unsigned 4 SPEED_FBRES 0x0 +/// ### +/// * External feedback resistor (VCO ring) set up bits +/// ### +/// %unsigned 1 UPDATE_SEL 0x0 +/// ### +/// * Select the PLL update_rate: +/// * 0: 19M~26MHz +/// * for refclk 19.2M, 38.4M 2 +/// * 1: 13MHz for refclk 13MHz +/// ### +/// %% 10 # Stuffing bits... +/// @ 0x00008 ctrlCAL (P-) +/// %unsigned 9 CAL_FBDIV 0x64 +/// ### +/// * During calibration, count Fvco/CAL_FBDIV cycles in 1us, and compare it with SPEED_THRESH[5:0] to decide fvco is higher or lower than the expected frequency, set to dec100. +/// ### +/// %unsigned 1 EXT_SLLP_DAC_EN 0x0 +/// ### +/// * 0: use the calibrated code SLLP_DAC_RD[6:0] +/// * 1: use the external input EXT_SLLP_DAC[6:0] +/// ### +/// %unsigned 1 EXT_SPEED_EN 0x0 +/// ### +/// * 0: use the calibrated code SPEED_RD[3:0] +/// * 1: use the external input SPEED[3:0] +/// ### +/// %unsigned 1 EXT_SP_FBRES_EN 0x0 +/// ### +/// * External speed enable pin +/// * 0: take SPEED_RD[3:0] for feedback resistor +/// * 1: take SPEED_FBRES[3:0] +/// ### +/// %unsigned 5 PLL_CALCLK_DIV 0x19 +/// ### +/// * Divider to generate around 1MHz calibration clock from the internal update clock: +/// * 00000: not used. +/// * 00001: div1. +/// * 00010: div2 +/// * 00011: div3 +/// * 00100: div4 +/// * .. . +/// * Divider=PLL_CALCLK_DIV[4:0], for N>=2 +/// * D13 for refclk 13MHz +/// * D19 for refclk 19.2MHz/38.4MHz +/// * D25 for refclk 25MHz +/// * D26 for refclk 26MHz +/// ### +/// %unsigned 1 PLL_CAL_START 0x0 +/// ### +/// * Rising edge to start PLL calibration +/// ### +/// %unsigned 4 REG_SETTLE_LIMIT 0x8 +/// ### +/// * Select waiting time before calibration logic start to take action after PLL_CAL_START is issued, default is 8us +/// ### +/// %unsigned 1 SEL_VTHVCOCONT 0x1 +/// ### +/// * Select the source of threshold +/// * 0: select IPP+IPTAT generated threshold voltage +/// * 1: select IPP generated threshold voltage +/// ### +/// %unsigned 6 SPEED_THRESH 0x1E +/// ### +/// * Digital counter threshold for VCO speed setting calibration loop, threshold value varies with the target VCO frequency. +/// * if CAL_FBDIV=dec100, +/// * speed_thresh[5:0] VCO_frequency +/// * dec15 1.5GHz +/// * dec20 2.0GHz +/// * dec30 3.0GHz +/// ### +/// %unsigned 2 VCON_SEL 0x2 +/// ### +/// * Used to set VCON value during PLL Open loop calibration +/// * 00: 0.6 +/// * 01: 0.65 +/// * 10: 0.7 +/// * 11: 0.75 +/// ### +/// %% 1 # Stuffing bits... +/// # 0x0000C ctrlCAL1 +/// %unsigned 7 EXT_SLLP_DAC 0x32 +/// ### +/// * External input used to set VDDVCO value. Used to set Vcon reference value during PLL normal calibration. +/// * Vcon: 0.35 + 0.01125*VSET_SLLP_DAC[6:0] default: 01,1011 -------- Vcon=0.697V +/// ### +/// %unsigned 2 VTH_VCO_CAL 0x2 +/// ### +/// * 2 bits to select the threshold for calibrated VDDVCO voltage +/// * When SEL_VTHVCOCON=1, select IPP generated threshold: +/// * 00 1.05v +/// * 01 1.075v +/// * 10 1.1v +/// * 11 1.125v +/// * When SEL_VTHVCOCON=0, select IPP portion for IPP+IPTAT generated threshold: +/// * 00: 31uA +/// * 01: 33uA +/// * 10: 35uA +/// * 11: 37uA +/// ### +/// %unsigned 2 VTH_VCO_PTAT 0x1 +/// ### +/// * 2 bits to select IPTAT curren +/// * IPTAT current +/// * 00 0uA +/// * 01 2uA +/// * 10 4uA +/// * 11 6uA +/// ### +/// %% 21 # Stuffing bits... +/// @ 0x00010 ctrlSlowLoop (P-) +/// %unsigned 3 PW_SLLP 0x3 +/// ### +/// * This set of signals define PLL +/// * 000: 2T_vco +/// * 001: 4T_vco +/// * 010: 8T_vco +/// * 011: 16T_vco +/// * 100: 32T_vco +/// * 101: 64T_vco +/// * 110:128T_vco +/// * 111:256T_vco +/// ### +/// %unsigned 1 SLLP_CLK_DIV5EN 0x0 +/// ### +/// * Enable slow loop +/// * clock=200KHz, default is 100KHz +/// * SLLP_CLK_DIV5EN=0, +/// * slow loop clock is 100KHz; +/// * SLLP_CLK_DIV5EN=1, +/// * slow loop clock is 200KHz +/// ### +/// %unsigned 1 SLLP_EN_DIS 0x0 +/// ### +/// * 0: Enable slow loop +/// * 1: Disable slow loop +/// ### +/// %unsigned 3 SLLP_PSF_LEVEL 0x1 +/// ### +/// * IPP current control to genera +/// * SLLP_PSF_LEVEL[2] is re +/// * [1:0] IPP current +/// * 00 2uA +/// * 01 4uA +/// * 10 6uA +/// * 11 8uA +/// ### +/// %% 24 # Stuffing bits... +/// @ 0x00014 ctrlINTP (P-) +/// %unsigned 1 CLK_DET_EN 0x1 +/// ### +/// * Enables PI output clock for internal reset circuit. +/// * 0: disable +/// * 1: enable +/// ### +/// %unsigned 2 DPHER_DLY_SEL 0x2 +/// ### +/// * Tuning DPHERCK delay +/// * 00: smallest +/// * 01 +/// * 10 +/// * 11: largest +/// ### +/// %unsigned 4 INTPI 0xB +/// ### +/// * Select PI bias current: +/// * INTPI[3:0] CURRENT VCO's Freq +/// * 0000 20uA +/// * 0001 22.5uA +/// * 0010 25uA 1.5GHz +/// * 0011 27.5uA +/// * 0100 30uA +/// * 0101 32.5uA 2.0GHz +/// * 0110 35uA +/// * 0111 37.5uA 2.3Ghz +/// * 1000 40uA +/// * 1001 42.5uA 2.65GHz +/// * 1010 45uA +/// * 1011 47.5uA 3GHz +/// * 1100 50uA +/// * 1101 52.5uA 3.3GHz +/// * 1110 55uA +/// * 1111 57.5uA 3.6GHz +/// * Use high frequency band on boarder +/// * Default setting is for 3.0GHz +/// ### +/// %unsigned 3 INTPR 0x2 +/// ### +/// * Used for PI Rload resistor se +/// * INTPR[2:0] RES VCO's Freq +/// * 000 650 +/// * 001 750 3.3~4GHz +/// * 010 900 2.65~3.3GHz +/// * 011 1150 2.0~2.65GHz +/// * 100 1500 1.5~2GHz +/// * 101 2300 1~1.5GHz +/// * 110 4600 +/// * 111 RESERVED +/// * Use high frequency band on boarder +/// * Default setting is for 3.0GHz +/// ### +/// %% 22 # Stuffing bits... +/// @ 0x00018 ctrlC8AddOn (P-) +/// %unsigned 1 MASTER_SLAVEB 0x1 +/// ### +/// * Used to sync frequencies +/// * if using 2 PLLs. +/// * 1 ' Master PLL +/// * 0 ' Slave PLL +/// ### +/// %unsigned 2 MODE 0x0 +/// ### +/// * Mode[1:0] cali_done fbclk +/// * 0x 0 fb_vco +/// * 0x 1 fb_pi +/// * 10 x fb_vco +/// * 11 x fb_pi +/// ### +/// %% 29 # Stuffing bits... +/// @ 0x0001C (P) +/// # 0x0001C C1 +/// $avpllCh C1 REG +/// @ 0x0002C (P) +/// # 0x0002C C2 +/// $avpllCh C2 REG +/// @ 0x0003C (P) +/// # 0x0003C C3 +/// $avpllCh C3 REG +/// @ 0x0004C (P) +/// # 0x0004C C4 +/// $avpllCh C4 REG +/// @ 0x0005C (P) +/// # 0x0005C C5 +/// $avpllCh C5 REG +/// @ 0x0006C (P) +/// # 0x0006C C6 +/// $avpllCh C6 REG +/// @ 0x0007C (P) +/// # 0x0007C C7 +/// $avpllCh C7 REG +/// @ 0x0008C (P) +/// # 0x0008C C8 +/// $avpllCh8 C8 REG +/// @ 0x0009C ctrlTest (P-) +/// %unsigned 1 CLKOUT_TST_EN 0x0 +/// ### +/// * 0: CLKOUT_TST=0 +/// * 1: Enable CLKOUT_TST output +/// ### +/// %unsigned 6 TEST_MON 0x0 +/// ### +/// * TEST_MON[5]: +/// * 0: TP = high Z +/// * 1: enable test point +/// * If TEST_MON[5]=1 : +/// * TEST_MON[4:0] TP +/// * 0 0000 DVSS +/// * 0 0001 AVDD +/// * 0 0010 AVSS +/// * 0 0011~0 1001 AVSS +/// * 0 1010 TP_V0P7 +/// * 0 1011 TP_VCOVTH +/// * 0 1100 VDDR_VCOFBUF +/// * 0 1101 TP_CHGPMP_ +/// * 0 1110 TP_CHGPMP_ +/// * 0 1111 VDDR_REFDIV +/// * 1 0000 VDDR_FBDIV +/// * 1 0001 VDDR_INTP_LA +/// * 1 0010 VDDR_INTP_LA +/// * 1 0011 TP_NBIAS_INTP +/// * 1 0100 DVDD +/// * 1 0101 PLL_LOCK +/// * 1 0110 PLL_CAL_EN +/// * 1 0111 PLL_CAL_DONE +/// * 1 1000 TP_VCTL_SLOW +/// * 1 1001 TP_VDAC_OUT +/// * 1 1010 TP_VDDVCO +/// * 1 1011 TP_VCON +/// * 1 1100~1 1111 AVSS +/// ### +/// %% 25 # Stuffing bits... +/// @ 0x000A0 status (R-) +/// ### +/// * PLL status register +/// ### +/// %unsigned 1 PLL_LOCK +/// ### +/// * PLL Lock +/// * 1: PLL locked. +/// * 0: PLL not locked. +/// ### +/// %unsigned 6 RESERVE_PLL_OUT +/// %unsigned 9 FBDIV_RD +/// ### +/// * Output register bits for calibrated FBDIV[8:0] +/// ### +/// %unsigned 1 PLL_CAL_DONE +/// ### +/// * Rising edge indicate the end of PLL calibration +/// ### +/// %unsigned 6 SPEED_CNT +/// ### +/// * Output register bits for speed counter in calibration +/// ### +/// %unsigned 4 SPEED_RD +/// ### +/// * Output register bits for calibrated SPEED[3:0] +/// ### +/// %% 5 # Stuffing bits... +/// # 0x000A4 status1 +/// %unsigned 7 SLLP_DAC_RD +/// ### +/// * Output register bits for calibrated SLLP_DAC[6:0] +/// ### +/// %% 25 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 168B, bits: 813b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avPll +#define h_avPll (){} + + #define RA_avPll_ctrlPLL 0x0000 + + #define BA_avPll_ctrlPLL_RESET 0x0000 + #define B16avPll_ctrlPLL_RESET 0x0000 + #define LSb32avPll_ctrlPLL_RESET 0 + #define LSb16avPll_ctrlPLL_RESET 0 + #define bavPll_ctrlPLL_RESET 1 + #define MSK32avPll_ctrlPLL_RESET 0x00000001 + + #define BA_avPll_ctrlPLL_PU 0x0000 + #define B16avPll_ctrlPLL_PU 0x0000 + #define LSb32avPll_ctrlPLL_PU 1 + #define LSb16avPll_ctrlPLL_PU 1 + #define bavPll_ctrlPLL_PU 1 + #define MSK32avPll_ctrlPLL_PU 0x00000002 + + #define BA_avPll_ctrlPLL_PLL_VDDRA_SEL 0x0000 + #define B16avPll_ctrlPLL_PLL_VDDRA_SEL 0x0000 + #define LSb32avPll_ctrlPLL_PLL_VDDRA_SEL 2 + #define LSb16avPll_ctrlPLL_PLL_VDDRA_SEL 2 + #define bavPll_ctrlPLL_PLL_VDDRA_SEL 3 + #define MSK32avPll_ctrlPLL_PLL_VDDRA_SEL 0x0000001C + + #define BA_avPll_ctrlPLL_REG_RING_EXTRA_I_EN 0x0000 + #define B16avPll_ctrlPLL_REG_RING_EXTRA_I_EN 0x0000 + #define LSb32avPll_ctrlPLL_REG_RING_EXTRA_I_EN 5 + #define LSb16avPll_ctrlPLL_REG_RING_EXTRA_I_EN 5 + #define bavPll_ctrlPLL_REG_RING_EXTRA_I_EN 1 + #define MSK32avPll_ctrlPLL_REG_RING_EXTRA_I_EN 0x00000020 + + #define BA_avPll_ctrlPLL_VCO_REF1P45_SEL 0x0000 + #define B16avPll_ctrlPLL_VCO_REF1P45_SEL 0x0000 + #define LSb32avPll_ctrlPLL_VCO_REF1P45_SEL 6 + #define LSb16avPll_ctrlPLL_VCO_REF1P45_SEL 6 + #define bavPll_ctrlPLL_VCO_REF1P45_SEL 2 + #define MSK32avPll_ctrlPLL_VCO_REF1P45_SEL 0x000000C0 + + #define BA_avPll_ctrlPLL_VDDA23_PUMP_SEL 0x0001 + #define B16avPll_ctrlPLL_VDDA23_PUMP_SEL 0x0000 + #define LSb32avPll_ctrlPLL_VDDA23_PUMP_SEL 8 + #define LSb16avPll_ctrlPLL_VDDA23_PUMP_SEL 8 + #define bavPll_ctrlPLL_VDDA23_PUMP_SEL 2 + #define MSK32avPll_ctrlPLL_VDDA23_PUMP_SEL 0x00000300 + + #define BA_avPll_ctrlPLL_VDDBUF_ADJ 0x0001 + #define B16avPll_ctrlPLL_VDDBUF_ADJ 0x0000 + #define LSb32avPll_ctrlPLL_VDDBUF_ADJ 10 + #define LSb16avPll_ctrlPLL_VDDBUF_ADJ 10 + #define bavPll_ctrlPLL_VDDBUF_ADJ 3 + #define MSK32avPll_ctrlPLL_VDDBUF_ADJ 0x00001C00 + + #define BA_avPll_ctrlPLL_VDDL 0x0001 + #define B16avPll_ctrlPLL_VDDL 0x0000 + #define LSb32avPll_ctrlPLL_VDDL 13 + #define LSb16avPll_ctrlPLL_VDDL 13 + #define bavPll_ctrlPLL_VDDL 4 + #define MSK32avPll_ctrlPLL_VDDL 0x0001E000 + + #define BA_avPll_ctrlPLL_FBDIV 0x0002 + #define B16avPll_ctrlPLL_FBDIV 0x0002 + #define LSb32avPll_ctrlPLL_FBDIV 17 + #define LSb16avPll_ctrlPLL_FBDIV 1 + #define bavPll_ctrlPLL_FBDIV 9 + #define MSK32avPll_ctrlPLL_FBDIV 0x03FE0000 + + #define BA_avPll_ctrlPLL_ICP 0x0003 + #define B16avPll_ctrlPLL_ICP 0x0002 + #define LSb32avPll_ctrlPLL_ICP 26 + #define LSb16avPll_ctrlPLL_ICP 10 + #define bavPll_ctrlPLL_ICP 4 + #define MSK32avPll_ctrlPLL_ICP 0x3C000000 + + #define BA_avPll_ctrlPLL_PLL_LPFC2_LESS 0x0003 + #define B16avPll_ctrlPLL_PLL_LPFC2_LESS 0x0002 + #define LSb32avPll_ctrlPLL_PLL_LPFC2_LESS 30 + #define LSb16avPll_ctrlPLL_PLL_LPFC2_LESS 14 + #define bavPll_ctrlPLL_PLL_LPFC2_LESS 1 + #define MSK32avPll_ctrlPLL_PLL_LPFC2_LESS 0x40000000 + + #define RA_avPll_ctrlPLL1 0x0004 + + #define BA_avPll_ctrlPLL_REFDIV 0x0004 + #define B16avPll_ctrlPLL_REFDIV 0x0004 + #define LSb32avPll_ctrlPLL_REFDIV 0 + #define LSb16avPll_ctrlPLL_REFDIV 0 + #define bavPll_ctrlPLL_REFDIV 7 + #define MSK32avPll_ctrlPLL_REFDIV 0x0000007F + + #define BA_avPll_ctrlPLL_RESERVE_PLL_IN 0x0004 + #define B16avPll_ctrlPLL_RESERVE_PLL_IN 0x0004 + #define LSb32avPll_ctrlPLL_RESERVE_PLL_IN 7 + #define LSb16avPll_ctrlPLL_RESERVE_PLL_IN 7 + #define bavPll_ctrlPLL_RESERVE_PLL_IN 6 + #define MSK32avPll_ctrlPLL_RESERVE_PLL_IN 0x00001F80 + + #define BA_avPll_ctrlPLL_EXT_SPEED 0x0005 + #define B16avPll_ctrlPLL_EXT_SPEED 0x0004 + #define LSb32avPll_ctrlPLL_EXT_SPEED 13 + #define LSb16avPll_ctrlPLL_EXT_SPEED 13 + #define bavPll_ctrlPLL_EXT_SPEED 4 + #define MSK32avPll_ctrlPLL_EXT_SPEED 0x0001E000 + + #define BA_avPll_ctrlPLL_SPEED_FBRES 0x0006 + #define B16avPll_ctrlPLL_SPEED_FBRES 0x0006 + #define LSb32avPll_ctrlPLL_SPEED_FBRES 17 + #define LSb16avPll_ctrlPLL_SPEED_FBRES 1 + #define bavPll_ctrlPLL_SPEED_FBRES 4 + #define MSK32avPll_ctrlPLL_SPEED_FBRES 0x001E0000 + + #define BA_avPll_ctrlPLL_UPDATE_SEL 0x0006 + #define B16avPll_ctrlPLL_UPDATE_SEL 0x0006 + #define LSb32avPll_ctrlPLL_UPDATE_SEL 21 + #define LSb16avPll_ctrlPLL_UPDATE_SEL 5 + #define bavPll_ctrlPLL_UPDATE_SEL 1 + #define MSK32avPll_ctrlPLL_UPDATE_SEL 0x00200000 + /////////////////////////////////////////////////////////// + #define RA_avPll_ctrlCAL 0x0008 + + #define BA_avPll_ctrlCAL_CAL_FBDIV 0x0008 + #define B16avPll_ctrlCAL_CAL_FBDIV 0x0008 + #define LSb32avPll_ctrlCAL_CAL_FBDIV 0 + #define LSb16avPll_ctrlCAL_CAL_FBDIV 0 + #define bavPll_ctrlCAL_CAL_FBDIV 9 + #define MSK32avPll_ctrlCAL_CAL_FBDIV 0x000001FF + + #define BA_avPll_ctrlCAL_EXT_SLLP_DAC_EN 0x0009 + #define B16avPll_ctrlCAL_EXT_SLLP_DAC_EN 0x0008 + #define LSb32avPll_ctrlCAL_EXT_SLLP_DAC_EN 9 + #define LSb16avPll_ctrlCAL_EXT_SLLP_DAC_EN 9 + #define bavPll_ctrlCAL_EXT_SLLP_DAC_EN 1 + #define MSK32avPll_ctrlCAL_EXT_SLLP_DAC_EN 0x00000200 + + #define BA_avPll_ctrlCAL_EXT_SPEED_EN 0x0009 + #define B16avPll_ctrlCAL_EXT_SPEED_EN 0x0008 + #define LSb32avPll_ctrlCAL_EXT_SPEED_EN 10 + #define LSb16avPll_ctrlCAL_EXT_SPEED_EN 10 + #define bavPll_ctrlCAL_EXT_SPEED_EN 1 + #define MSK32avPll_ctrlCAL_EXT_SPEED_EN 0x00000400 + + #define BA_avPll_ctrlCAL_EXT_SP_FBRES_EN 0x0009 + #define B16avPll_ctrlCAL_EXT_SP_FBRES_EN 0x0008 + #define LSb32avPll_ctrlCAL_EXT_SP_FBRES_EN 11 + #define LSb16avPll_ctrlCAL_EXT_SP_FBRES_EN 11 + #define bavPll_ctrlCAL_EXT_SP_FBRES_EN 1 + #define MSK32avPll_ctrlCAL_EXT_SP_FBRES_EN 0x00000800 + + #define BA_avPll_ctrlCAL_PLL_CALCLK_DIV 0x0009 + #define B16avPll_ctrlCAL_PLL_CALCLK_DIV 0x0008 + #define LSb32avPll_ctrlCAL_PLL_CALCLK_DIV 12 + #define LSb16avPll_ctrlCAL_PLL_CALCLK_DIV 12 + #define bavPll_ctrlCAL_PLL_CALCLK_DIV 5 + #define MSK32avPll_ctrlCAL_PLL_CALCLK_DIV 0x0001F000 + + #define BA_avPll_ctrlCAL_PLL_CAL_START 0x000A + #define B16avPll_ctrlCAL_PLL_CAL_START 0x000A + #define LSb32avPll_ctrlCAL_PLL_CAL_START 17 + #define LSb16avPll_ctrlCAL_PLL_CAL_START 1 + #define bavPll_ctrlCAL_PLL_CAL_START 1 + #define MSK32avPll_ctrlCAL_PLL_CAL_START 0x00020000 + + #define BA_avPll_ctrlCAL_REG_SETTLE_LIMIT 0x000A + #define B16avPll_ctrlCAL_REG_SETTLE_LIMIT 0x000A + #define LSb32avPll_ctrlCAL_REG_SETTLE_LIMIT 18 + #define LSb16avPll_ctrlCAL_REG_SETTLE_LIMIT 2 + #define bavPll_ctrlCAL_REG_SETTLE_LIMIT 4 + #define MSK32avPll_ctrlCAL_REG_SETTLE_LIMIT 0x003C0000 + + #define BA_avPll_ctrlCAL_SEL_VTHVCOCONT 0x000A + #define B16avPll_ctrlCAL_SEL_VTHVCOCONT 0x000A + #define LSb32avPll_ctrlCAL_SEL_VTHVCOCONT 22 + #define LSb16avPll_ctrlCAL_SEL_VTHVCOCONT 6 + #define bavPll_ctrlCAL_SEL_VTHVCOCONT 1 + #define MSK32avPll_ctrlCAL_SEL_VTHVCOCONT 0x00400000 + + #define BA_avPll_ctrlCAL_SPEED_THRESH 0x000A + #define B16avPll_ctrlCAL_SPEED_THRESH 0x000A + #define LSb32avPll_ctrlCAL_SPEED_THRESH 23 + #define LSb16avPll_ctrlCAL_SPEED_THRESH 7 + #define bavPll_ctrlCAL_SPEED_THRESH 6 + #define MSK32avPll_ctrlCAL_SPEED_THRESH 0x1F800000 + + #define BA_avPll_ctrlCAL_VCON_SEL 0x000B + #define B16avPll_ctrlCAL_VCON_SEL 0x000A + #define LSb32avPll_ctrlCAL_VCON_SEL 29 + #define LSb16avPll_ctrlCAL_VCON_SEL 13 + #define bavPll_ctrlCAL_VCON_SEL 2 + #define MSK32avPll_ctrlCAL_VCON_SEL 0x60000000 + + #define RA_avPll_ctrlCAL1 0x000C + + #define BA_avPll_ctrlCAL_EXT_SLLP_DAC 0x000C + #define B16avPll_ctrlCAL_EXT_SLLP_DAC 0x000C + #define LSb32avPll_ctrlCAL_EXT_SLLP_DAC 0 + #define LSb16avPll_ctrlCAL_EXT_SLLP_DAC 0 + #define bavPll_ctrlCAL_EXT_SLLP_DAC 7 + #define MSK32avPll_ctrlCAL_EXT_SLLP_DAC 0x0000007F + + #define BA_avPll_ctrlCAL_VTH_VCO_CAL 0x000C + #define B16avPll_ctrlCAL_VTH_VCO_CAL 0x000C + #define LSb32avPll_ctrlCAL_VTH_VCO_CAL 7 + #define LSb16avPll_ctrlCAL_VTH_VCO_CAL 7 + #define bavPll_ctrlCAL_VTH_VCO_CAL 2 + #define MSK32avPll_ctrlCAL_VTH_VCO_CAL 0x00000180 + + #define BA_avPll_ctrlCAL_VTH_VCO_PTAT 0x000D + #define B16avPll_ctrlCAL_VTH_VCO_PTAT 0x000C + #define LSb32avPll_ctrlCAL_VTH_VCO_PTAT 9 + #define LSb16avPll_ctrlCAL_VTH_VCO_PTAT 9 + #define bavPll_ctrlCAL_VTH_VCO_PTAT 2 + #define MSK32avPll_ctrlCAL_VTH_VCO_PTAT 0x00000600 + /////////////////////////////////////////////////////////// + #define RA_avPll_ctrlSlowLoop 0x0010 + + #define BA_avPll_ctrlSlowLoop_PW_SLLP 0x0010 + #define B16avPll_ctrlSlowLoop_PW_SLLP 0x0010 + #define LSb32avPll_ctrlSlowLoop_PW_SLLP 0 + #define LSb16avPll_ctrlSlowLoop_PW_SLLP 0 + #define bavPll_ctrlSlowLoop_PW_SLLP 3 + #define MSK32avPll_ctrlSlowLoop_PW_SLLP 0x00000007 + + #define BA_avPll_ctrlSlowLoop_SLLP_CLK_DIV5EN 0x0010 + #define B16avPll_ctrlSlowLoop_SLLP_CLK_DIV5EN 0x0010 + #define LSb32avPll_ctrlSlowLoop_SLLP_CLK_DIV5EN 3 + #define LSb16avPll_ctrlSlowLoop_SLLP_CLK_DIV5EN 3 + #define bavPll_ctrlSlowLoop_SLLP_CLK_DIV5EN 1 + #define MSK32avPll_ctrlSlowLoop_SLLP_CLK_DIV5EN 0x00000008 + + #define BA_avPll_ctrlSlowLoop_SLLP_EN_DIS 0x0010 + #define B16avPll_ctrlSlowLoop_SLLP_EN_DIS 0x0010 + #define LSb32avPll_ctrlSlowLoop_SLLP_EN_DIS 4 + #define LSb16avPll_ctrlSlowLoop_SLLP_EN_DIS 4 + #define bavPll_ctrlSlowLoop_SLLP_EN_DIS 1 + #define MSK32avPll_ctrlSlowLoop_SLLP_EN_DIS 0x00000010 + + #define BA_avPll_ctrlSlowLoop_SLLP_PSF_LEVEL 0x0010 + #define B16avPll_ctrlSlowLoop_SLLP_PSF_LEVEL 0x0010 + #define LSb32avPll_ctrlSlowLoop_SLLP_PSF_LEVEL 5 + #define LSb16avPll_ctrlSlowLoop_SLLP_PSF_LEVEL 5 + #define bavPll_ctrlSlowLoop_SLLP_PSF_LEVEL 3 + #define MSK32avPll_ctrlSlowLoop_SLLP_PSF_LEVEL 0x000000E0 + /////////////////////////////////////////////////////////// + #define RA_avPll_ctrlINTP 0x0014 + + #define BA_avPll_ctrlINTP_CLK_DET_EN 0x0014 + #define B16avPll_ctrlINTP_CLK_DET_EN 0x0014 + #define LSb32avPll_ctrlINTP_CLK_DET_EN 0 + #define LSb16avPll_ctrlINTP_CLK_DET_EN 0 + #define bavPll_ctrlINTP_CLK_DET_EN 1 + #define MSK32avPll_ctrlINTP_CLK_DET_EN 0x00000001 + + #define BA_avPll_ctrlINTP_DPHER_DLY_SEL 0x0014 + #define B16avPll_ctrlINTP_DPHER_DLY_SEL 0x0014 + #define LSb32avPll_ctrlINTP_DPHER_DLY_SEL 1 + #define LSb16avPll_ctrlINTP_DPHER_DLY_SEL 1 + #define bavPll_ctrlINTP_DPHER_DLY_SEL 2 + #define MSK32avPll_ctrlINTP_DPHER_DLY_SEL 0x00000006 + + #define BA_avPll_ctrlINTP_INTPI 0x0014 + #define B16avPll_ctrlINTP_INTPI 0x0014 + #define LSb32avPll_ctrlINTP_INTPI 3 + #define LSb16avPll_ctrlINTP_INTPI 3 + #define bavPll_ctrlINTP_INTPI 4 + #define MSK32avPll_ctrlINTP_INTPI 0x00000078 + + #define BA_avPll_ctrlINTP_INTPR 0x0014 + #define B16avPll_ctrlINTP_INTPR 0x0014 + #define LSb32avPll_ctrlINTP_INTPR 7 + #define LSb16avPll_ctrlINTP_INTPR 7 + #define bavPll_ctrlINTP_INTPR 3 + #define MSK32avPll_ctrlINTP_INTPR 0x00000380 + /////////////////////////////////////////////////////////// + #define RA_avPll_ctrlC8AddOn 0x0018 + + #define BA_avPll_ctrlC8AddOn_MASTER_SLAVEB 0x0018 + #define B16avPll_ctrlC8AddOn_MASTER_SLAVEB 0x0018 + #define LSb32avPll_ctrlC8AddOn_MASTER_SLAVEB 0 + #define LSb16avPll_ctrlC8AddOn_MASTER_SLAVEB 0 + #define bavPll_ctrlC8AddOn_MASTER_SLAVEB 1 + #define MSK32avPll_ctrlC8AddOn_MASTER_SLAVEB 0x00000001 + + #define BA_avPll_ctrlC8AddOn_MODE 0x0018 + #define B16avPll_ctrlC8AddOn_MODE 0x0018 + #define LSb32avPll_ctrlC8AddOn_MODE 1 + #define LSb16avPll_ctrlC8AddOn_MODE 1 + #define bavPll_ctrlC8AddOn_MODE 2 + #define MSK32avPll_ctrlC8AddOn_MODE 0x00000006 + /////////////////////////////////////////////////////////// + #define RA_avPll_C1 0x001C + /////////////////////////////////////////////////////////// + #define RA_avPll_C2 0x002C + /////////////////////////////////////////////////////////// + #define RA_avPll_C3 0x003C + /////////////////////////////////////////////////////////// + #define RA_avPll_C4 0x004C + /////////////////////////////////////////////////////////// + #define RA_avPll_C5 0x005C + /////////////////////////////////////////////////////////// + #define RA_avPll_C6 0x006C + /////////////////////////////////////////////////////////// + #define RA_avPll_C7 0x007C + /////////////////////////////////////////////////////////// + #define RA_avPll_C8 0x008C + /////////////////////////////////////////////////////////// + #define RA_avPll_ctrlTest 0x009C + + #define BA_avPll_ctrlTest_CLKOUT_TST_EN 0x009C + #define B16avPll_ctrlTest_CLKOUT_TST_EN 0x009C + #define LSb32avPll_ctrlTest_CLKOUT_TST_EN 0 + #define LSb16avPll_ctrlTest_CLKOUT_TST_EN 0 + #define bavPll_ctrlTest_CLKOUT_TST_EN 1 + #define MSK32avPll_ctrlTest_CLKOUT_TST_EN 0x00000001 + + #define BA_avPll_ctrlTest_TEST_MON 0x009C + #define B16avPll_ctrlTest_TEST_MON 0x009C + #define LSb32avPll_ctrlTest_TEST_MON 1 + #define LSb16avPll_ctrlTest_TEST_MON 1 + #define bavPll_ctrlTest_TEST_MON 6 + #define MSK32avPll_ctrlTest_TEST_MON 0x0000007E + /////////////////////////////////////////////////////////// + #define RA_avPll_status 0x00A0 + + #define BA_avPll_status_PLL_LOCK 0x00A0 + #define B16avPll_status_PLL_LOCK 0x00A0 + #define LSb32avPll_status_PLL_LOCK 0 + #define LSb16avPll_status_PLL_LOCK 0 + #define bavPll_status_PLL_LOCK 1 + #define MSK32avPll_status_PLL_LOCK 0x00000001 + + #define BA_avPll_status_RESERVE_PLL_OUT 0x00A0 + #define B16avPll_status_RESERVE_PLL_OUT 0x00A0 + #define LSb32avPll_status_RESERVE_PLL_OUT 1 + #define LSb16avPll_status_RESERVE_PLL_OUT 1 + #define bavPll_status_RESERVE_PLL_OUT 6 + #define MSK32avPll_status_RESERVE_PLL_OUT 0x0000007E + + #define BA_avPll_status_FBDIV_RD 0x00A0 + #define B16avPll_status_FBDIV_RD 0x00A0 + #define LSb32avPll_status_FBDIV_RD 7 + #define LSb16avPll_status_FBDIV_RD 7 + #define bavPll_status_FBDIV_RD 9 + #define MSK32avPll_status_FBDIV_RD 0x0000FF80 + + #define BA_avPll_status_PLL_CAL_DONE 0x00A2 + #define B16avPll_status_PLL_CAL_DONE 0x00A2 + #define LSb32avPll_status_PLL_CAL_DONE 16 + #define LSb16avPll_status_PLL_CAL_DONE 0 + #define bavPll_status_PLL_CAL_DONE 1 + #define MSK32avPll_status_PLL_CAL_DONE 0x00010000 + + #define BA_avPll_status_SPEED_CNT 0x00A2 + #define B16avPll_status_SPEED_CNT 0x00A2 + #define LSb32avPll_status_SPEED_CNT 17 + #define LSb16avPll_status_SPEED_CNT 1 + #define bavPll_status_SPEED_CNT 6 + #define MSK32avPll_status_SPEED_CNT 0x007E0000 + + #define BA_avPll_status_SPEED_RD 0x00A2 + #define B16avPll_status_SPEED_RD 0x00A2 + #define LSb32avPll_status_SPEED_RD 23 + #define LSb16avPll_status_SPEED_RD 7 + #define bavPll_status_SPEED_RD 4 + #define MSK32avPll_status_SPEED_RD 0x07800000 + + #define RA_avPll_status1 0x00A4 + + #define BA_avPll_status_SLLP_DAC_RD 0x00A4 + #define B16avPll_status_SLLP_DAC_RD 0x00A4 + #define LSb32avPll_status_SLLP_DAC_RD 0 + #define LSb16avPll_status_SLLP_DAC_RD 0 + #define bavPll_status_SLLP_DAC_RD 7 + #define MSK32avPll_status_SLLP_DAC_RD 0x0000007F + /////////////////////////////////////////////////////////// + + typedef struct SIE_avPll { + /////////////////////////////////////////////////////////// + #define GET32avPll_ctrlPLL_RESET(r32) _BFGET_(r32, 0, 0) + #define SET32avPll_ctrlPLL_RESET(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16avPll_ctrlPLL_RESET(r16) _BFGET_(r16, 0, 0) + #define SET16avPll_ctrlPLL_RESET(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32avPll_ctrlPLL_PU(r32) _BFGET_(r32, 1, 1) + #define SET32avPll_ctrlPLL_PU(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16avPll_ctrlPLL_PU(r16) _BFGET_(r16, 1, 1) + #define SET16avPll_ctrlPLL_PU(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32avPll_ctrlPLL_PLL_VDDRA_SEL(r32) _BFGET_(r32, 4, 2) + #define SET32avPll_ctrlPLL_PLL_VDDRA_SEL(r32,v) _BFSET_(r32, 4, 2,v) + #define GET16avPll_ctrlPLL_PLL_VDDRA_SEL(r16) _BFGET_(r16, 4, 2) + #define SET16avPll_ctrlPLL_PLL_VDDRA_SEL(r16,v) _BFSET_(r16, 4, 2,v) + + #define GET32avPll_ctrlPLL_REG_RING_EXTRA_I_EN(r32) _BFGET_(r32, 5, 5) + #define SET32avPll_ctrlPLL_REG_RING_EXTRA_I_EN(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16avPll_ctrlPLL_REG_RING_EXTRA_I_EN(r16) _BFGET_(r16, 5, 5) + #define SET16avPll_ctrlPLL_REG_RING_EXTRA_I_EN(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32avPll_ctrlPLL_VCO_REF1P45_SEL(r32) _BFGET_(r32, 7, 6) + #define SET32avPll_ctrlPLL_VCO_REF1P45_SEL(r32,v) _BFSET_(r32, 7, 6,v) + #define GET16avPll_ctrlPLL_VCO_REF1P45_SEL(r16) _BFGET_(r16, 7, 6) + #define SET16avPll_ctrlPLL_VCO_REF1P45_SEL(r16,v) _BFSET_(r16, 7, 6,v) + + #define GET32avPll_ctrlPLL_VDDA23_PUMP_SEL(r32) _BFGET_(r32, 9, 8) + #define SET32avPll_ctrlPLL_VDDA23_PUMP_SEL(r32,v) _BFSET_(r32, 9, 8,v) + #define GET16avPll_ctrlPLL_VDDA23_PUMP_SEL(r16) _BFGET_(r16, 9, 8) + #define SET16avPll_ctrlPLL_VDDA23_PUMP_SEL(r16,v) _BFSET_(r16, 9, 8,v) + + #define GET32avPll_ctrlPLL_VDDBUF_ADJ(r32) _BFGET_(r32,12,10) + #define SET32avPll_ctrlPLL_VDDBUF_ADJ(r32,v) _BFSET_(r32,12,10,v) + #define GET16avPll_ctrlPLL_VDDBUF_ADJ(r16) _BFGET_(r16,12,10) + #define SET16avPll_ctrlPLL_VDDBUF_ADJ(r16,v) _BFSET_(r16,12,10,v) + + #define GET32avPll_ctrlPLL_VDDL(r32) _BFGET_(r32,16,13) + #define SET32avPll_ctrlPLL_VDDL(r32,v) _BFSET_(r32,16,13,v) + + #define GET32avPll_ctrlPLL_FBDIV(r32) _BFGET_(r32,25,17) + #define SET32avPll_ctrlPLL_FBDIV(r32,v) _BFSET_(r32,25,17,v) + #define GET16avPll_ctrlPLL_FBDIV(r16) _BFGET_(r16, 9, 1) + #define SET16avPll_ctrlPLL_FBDIV(r16,v) _BFSET_(r16, 9, 1,v) + + #define GET32avPll_ctrlPLL_ICP(r32) _BFGET_(r32,29,26) + #define SET32avPll_ctrlPLL_ICP(r32,v) _BFSET_(r32,29,26,v) + #define GET16avPll_ctrlPLL_ICP(r16) _BFGET_(r16,13,10) + #define SET16avPll_ctrlPLL_ICP(r16,v) _BFSET_(r16,13,10,v) + + #define GET32avPll_ctrlPLL_PLL_LPFC2_LESS(r32) _BFGET_(r32,30,30) + #define SET32avPll_ctrlPLL_PLL_LPFC2_LESS(r32,v) _BFSET_(r32,30,30,v) + #define GET16avPll_ctrlPLL_PLL_LPFC2_LESS(r16) _BFGET_(r16,14,14) + #define SET16avPll_ctrlPLL_PLL_LPFC2_LESS(r16,v) _BFSET_(r16,14,14,v) + + #define w32avPll_ctrlPLL {\ + UNSG32 uctrlPLL_RESET : 1;\ + UNSG32 uctrlPLL_PU : 1;\ + UNSG32 uctrlPLL_PLL_VDDRA_SEL : 3;\ + UNSG32 uctrlPLL_REG_RING_EXTRA_I_EN : 1;\ + UNSG32 uctrlPLL_VCO_REF1P45_SEL : 2;\ + UNSG32 uctrlPLL_VDDA23_PUMP_SEL : 2;\ + UNSG32 uctrlPLL_VDDBUF_ADJ : 3;\ + UNSG32 uctrlPLL_VDDL : 4;\ + UNSG32 uctrlPLL_FBDIV : 9;\ + UNSG32 uctrlPLL_ICP : 4;\ + UNSG32 uctrlPLL_PLL_LPFC2_LESS : 1;\ + UNSG32 RSVDx0_b31 : 1;\ + } + union { UNSG32 u32avPll_ctrlPLL; + struct w32avPll_ctrlPLL; + }; + #define GET32avPll_ctrlPLL_REFDIV(r32) _BFGET_(r32, 6, 0) + #define SET32avPll_ctrlPLL_REFDIV(r32,v) _BFSET_(r32, 6, 0,v) + #define GET16avPll_ctrlPLL_REFDIV(r16) _BFGET_(r16, 6, 0) + #define SET16avPll_ctrlPLL_REFDIV(r16,v) _BFSET_(r16, 6, 0,v) + + #define GET32avPll_ctrlPLL_RESERVE_PLL_IN(r32) _BFGET_(r32,12, 7) + #define SET32avPll_ctrlPLL_RESERVE_PLL_IN(r32,v) _BFSET_(r32,12, 7,v) + #define GET16avPll_ctrlPLL_RESERVE_PLL_IN(r16) _BFGET_(r16,12, 7) + #define SET16avPll_ctrlPLL_RESERVE_PLL_IN(r16,v) _BFSET_(r16,12, 7,v) + + #define GET32avPll_ctrlPLL_EXT_SPEED(r32) _BFGET_(r32,16,13) + #define SET32avPll_ctrlPLL_EXT_SPEED(r32,v) _BFSET_(r32,16,13,v) + + #define GET32avPll_ctrlPLL_SPEED_FBRES(r32) _BFGET_(r32,20,17) + #define SET32avPll_ctrlPLL_SPEED_FBRES(r32,v) _BFSET_(r32,20,17,v) + #define GET16avPll_ctrlPLL_SPEED_FBRES(r16) _BFGET_(r16, 4, 1) + #define SET16avPll_ctrlPLL_SPEED_FBRES(r16,v) _BFSET_(r16, 4, 1,v) + + #define GET32avPll_ctrlPLL_UPDATE_SEL(r32) _BFGET_(r32,21,21) + #define SET32avPll_ctrlPLL_UPDATE_SEL(r32,v) _BFSET_(r32,21,21,v) + #define GET16avPll_ctrlPLL_UPDATE_SEL(r16) _BFGET_(r16, 5, 5) + #define SET16avPll_ctrlPLL_UPDATE_SEL(r16,v) _BFSET_(r16, 5, 5,v) + + #define w32avPll_ctrlPLL1 {\ + UNSG32 uctrlPLL_REFDIV : 7;\ + UNSG32 uctrlPLL_RESERVE_PLL_IN : 6;\ + UNSG32 uctrlPLL_EXT_SPEED : 4;\ + UNSG32 uctrlPLL_SPEED_FBRES : 4;\ + UNSG32 uctrlPLL_UPDATE_SEL : 1;\ + UNSG32 RSVDx4_b22 : 10;\ + } + union { UNSG32 u32avPll_ctrlPLL1; + struct w32avPll_ctrlPLL1; + }; + /////////////////////////////////////////////////////////// + #define GET32avPll_ctrlCAL_CAL_FBDIV(r32) _BFGET_(r32, 8, 0) + #define SET32avPll_ctrlCAL_CAL_FBDIV(r32,v) _BFSET_(r32, 8, 0,v) + #define GET16avPll_ctrlCAL_CAL_FBDIV(r16) _BFGET_(r16, 8, 0) + #define SET16avPll_ctrlCAL_CAL_FBDIV(r16,v) _BFSET_(r16, 8, 0,v) + + #define GET32avPll_ctrlCAL_EXT_SLLP_DAC_EN(r32) _BFGET_(r32, 9, 9) + #define SET32avPll_ctrlCAL_EXT_SLLP_DAC_EN(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16avPll_ctrlCAL_EXT_SLLP_DAC_EN(r16) _BFGET_(r16, 9, 9) + #define SET16avPll_ctrlCAL_EXT_SLLP_DAC_EN(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32avPll_ctrlCAL_EXT_SPEED_EN(r32) _BFGET_(r32,10,10) + #define SET32avPll_ctrlCAL_EXT_SPEED_EN(r32,v) _BFSET_(r32,10,10,v) + #define GET16avPll_ctrlCAL_EXT_SPEED_EN(r16) _BFGET_(r16,10,10) + #define SET16avPll_ctrlCAL_EXT_SPEED_EN(r16,v) _BFSET_(r16,10,10,v) + + #define GET32avPll_ctrlCAL_EXT_SP_FBRES_EN(r32) _BFGET_(r32,11,11) + #define SET32avPll_ctrlCAL_EXT_SP_FBRES_EN(r32,v) _BFSET_(r32,11,11,v) + #define GET16avPll_ctrlCAL_EXT_SP_FBRES_EN(r16) _BFGET_(r16,11,11) + #define SET16avPll_ctrlCAL_EXT_SP_FBRES_EN(r16,v) _BFSET_(r16,11,11,v) + + #define GET32avPll_ctrlCAL_PLL_CALCLK_DIV(r32) _BFGET_(r32,16,12) + #define SET32avPll_ctrlCAL_PLL_CALCLK_DIV(r32,v) _BFSET_(r32,16,12,v) + + #define GET32avPll_ctrlCAL_PLL_CAL_START(r32) _BFGET_(r32,17,17) + #define SET32avPll_ctrlCAL_PLL_CAL_START(r32,v) _BFSET_(r32,17,17,v) + #define GET16avPll_ctrlCAL_PLL_CAL_START(r16) _BFGET_(r16, 1, 1) + #define SET16avPll_ctrlCAL_PLL_CAL_START(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32avPll_ctrlCAL_REG_SETTLE_LIMIT(r32) _BFGET_(r32,21,18) + #define SET32avPll_ctrlCAL_REG_SETTLE_LIMIT(r32,v) _BFSET_(r32,21,18,v) + #define GET16avPll_ctrlCAL_REG_SETTLE_LIMIT(r16) _BFGET_(r16, 5, 2) + #define SET16avPll_ctrlCAL_REG_SETTLE_LIMIT(r16,v) _BFSET_(r16, 5, 2,v) + + #define GET32avPll_ctrlCAL_SEL_VTHVCOCONT(r32) _BFGET_(r32,22,22) + #define SET32avPll_ctrlCAL_SEL_VTHVCOCONT(r32,v) _BFSET_(r32,22,22,v) + #define GET16avPll_ctrlCAL_SEL_VTHVCOCONT(r16) _BFGET_(r16, 6, 6) + #define SET16avPll_ctrlCAL_SEL_VTHVCOCONT(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32avPll_ctrlCAL_SPEED_THRESH(r32) _BFGET_(r32,28,23) + #define SET32avPll_ctrlCAL_SPEED_THRESH(r32,v) _BFSET_(r32,28,23,v) + #define GET16avPll_ctrlCAL_SPEED_THRESH(r16) _BFGET_(r16,12, 7) + #define SET16avPll_ctrlCAL_SPEED_THRESH(r16,v) _BFSET_(r16,12, 7,v) + + #define GET32avPll_ctrlCAL_VCON_SEL(r32) _BFGET_(r32,30,29) + #define SET32avPll_ctrlCAL_VCON_SEL(r32,v) _BFSET_(r32,30,29,v) + #define GET16avPll_ctrlCAL_VCON_SEL(r16) _BFGET_(r16,14,13) + #define SET16avPll_ctrlCAL_VCON_SEL(r16,v) _BFSET_(r16,14,13,v) + + #define w32avPll_ctrlCAL {\ + UNSG32 uctrlCAL_CAL_FBDIV : 9;\ + UNSG32 uctrlCAL_EXT_SLLP_DAC_EN : 1;\ + UNSG32 uctrlCAL_EXT_SPEED_EN : 1;\ + UNSG32 uctrlCAL_EXT_SP_FBRES_EN : 1;\ + UNSG32 uctrlCAL_PLL_CALCLK_DIV : 5;\ + UNSG32 uctrlCAL_PLL_CAL_START : 1;\ + UNSG32 uctrlCAL_REG_SETTLE_LIMIT : 4;\ + UNSG32 uctrlCAL_SEL_VTHVCOCONT : 1;\ + UNSG32 uctrlCAL_SPEED_THRESH : 6;\ + UNSG32 uctrlCAL_VCON_SEL : 2;\ + UNSG32 RSVDx8_b31 : 1;\ + } + union { UNSG32 u32avPll_ctrlCAL; + struct w32avPll_ctrlCAL; + }; + #define GET32avPll_ctrlCAL_EXT_SLLP_DAC(r32) _BFGET_(r32, 6, 0) + #define SET32avPll_ctrlCAL_EXT_SLLP_DAC(r32,v) _BFSET_(r32, 6, 0,v) + #define GET16avPll_ctrlCAL_EXT_SLLP_DAC(r16) _BFGET_(r16, 6, 0) + #define SET16avPll_ctrlCAL_EXT_SLLP_DAC(r16,v) _BFSET_(r16, 6, 0,v) + + #define GET32avPll_ctrlCAL_VTH_VCO_CAL(r32) _BFGET_(r32, 8, 7) + #define SET32avPll_ctrlCAL_VTH_VCO_CAL(r32,v) _BFSET_(r32, 8, 7,v) + #define GET16avPll_ctrlCAL_VTH_VCO_CAL(r16) _BFGET_(r16, 8, 7) + #define SET16avPll_ctrlCAL_VTH_VCO_CAL(r16,v) _BFSET_(r16, 8, 7,v) + + #define GET32avPll_ctrlCAL_VTH_VCO_PTAT(r32) _BFGET_(r32,10, 9) + #define SET32avPll_ctrlCAL_VTH_VCO_PTAT(r32,v) _BFSET_(r32,10, 9,v) + #define GET16avPll_ctrlCAL_VTH_VCO_PTAT(r16) _BFGET_(r16,10, 9) + #define SET16avPll_ctrlCAL_VTH_VCO_PTAT(r16,v) _BFSET_(r16,10, 9,v) + + #define w32avPll_ctrlCAL1 {\ + UNSG32 uctrlCAL_EXT_SLLP_DAC : 7;\ + UNSG32 uctrlCAL_VTH_VCO_CAL : 2;\ + UNSG32 uctrlCAL_VTH_VCO_PTAT : 2;\ + UNSG32 RSVDxC_b11 : 21;\ + } + union { UNSG32 u32avPll_ctrlCAL1; + struct w32avPll_ctrlCAL1; + }; + /////////////////////////////////////////////////////////// + #define GET32avPll_ctrlSlowLoop_PW_SLLP(r32) _BFGET_(r32, 2, 0) + #define SET32avPll_ctrlSlowLoop_PW_SLLP(r32,v) _BFSET_(r32, 2, 0,v) + #define GET16avPll_ctrlSlowLoop_PW_SLLP(r16) _BFGET_(r16, 2, 0) + #define SET16avPll_ctrlSlowLoop_PW_SLLP(r16,v) _BFSET_(r16, 2, 0,v) + + #define GET32avPll_ctrlSlowLoop_SLLP_CLK_DIV5EN(r32) _BFGET_(r32, 3, 3) + #define SET32avPll_ctrlSlowLoop_SLLP_CLK_DIV5EN(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16avPll_ctrlSlowLoop_SLLP_CLK_DIV5EN(r16) _BFGET_(r16, 3, 3) + #define SET16avPll_ctrlSlowLoop_SLLP_CLK_DIV5EN(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32avPll_ctrlSlowLoop_SLLP_EN_DIS(r32) _BFGET_(r32, 4, 4) + #define SET32avPll_ctrlSlowLoop_SLLP_EN_DIS(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16avPll_ctrlSlowLoop_SLLP_EN_DIS(r16) _BFGET_(r16, 4, 4) + #define SET16avPll_ctrlSlowLoop_SLLP_EN_DIS(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32avPll_ctrlSlowLoop_SLLP_PSF_LEVEL(r32) _BFGET_(r32, 7, 5) + #define SET32avPll_ctrlSlowLoop_SLLP_PSF_LEVEL(r32,v) _BFSET_(r32, 7, 5,v) + #define GET16avPll_ctrlSlowLoop_SLLP_PSF_LEVEL(r16) _BFGET_(r16, 7, 5) + #define SET16avPll_ctrlSlowLoop_SLLP_PSF_LEVEL(r16,v) _BFSET_(r16, 7, 5,v) + + #define w32avPll_ctrlSlowLoop {\ + UNSG32 uctrlSlowLoop_PW_SLLP : 3;\ + UNSG32 uctrlSlowLoop_SLLP_CLK_DIV5EN : 1;\ + UNSG32 uctrlSlowLoop_SLLP_EN_DIS : 1;\ + UNSG32 uctrlSlowLoop_SLLP_PSF_LEVEL : 3;\ + UNSG32 RSVDx10_b8 : 24;\ + } + union { UNSG32 u32avPll_ctrlSlowLoop; + struct w32avPll_ctrlSlowLoop; + }; + /////////////////////////////////////////////////////////// + #define GET32avPll_ctrlINTP_CLK_DET_EN(r32) _BFGET_(r32, 0, 0) + #define SET32avPll_ctrlINTP_CLK_DET_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16avPll_ctrlINTP_CLK_DET_EN(r16) _BFGET_(r16, 0, 0) + #define SET16avPll_ctrlINTP_CLK_DET_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32avPll_ctrlINTP_DPHER_DLY_SEL(r32) _BFGET_(r32, 2, 1) + #define SET32avPll_ctrlINTP_DPHER_DLY_SEL(r32,v) _BFSET_(r32, 2, 1,v) + #define GET16avPll_ctrlINTP_DPHER_DLY_SEL(r16) _BFGET_(r16, 2, 1) + #define SET16avPll_ctrlINTP_DPHER_DLY_SEL(r16,v) _BFSET_(r16, 2, 1,v) + + #define GET32avPll_ctrlINTP_INTPI(r32) _BFGET_(r32, 6, 3) + #define SET32avPll_ctrlINTP_INTPI(r32,v) _BFSET_(r32, 6, 3,v) + #define GET16avPll_ctrlINTP_INTPI(r16) _BFGET_(r16, 6, 3) + #define SET16avPll_ctrlINTP_INTPI(r16,v) _BFSET_(r16, 6, 3,v) + + #define GET32avPll_ctrlINTP_INTPR(r32) _BFGET_(r32, 9, 7) + #define SET32avPll_ctrlINTP_INTPR(r32,v) _BFSET_(r32, 9, 7,v) + #define GET16avPll_ctrlINTP_INTPR(r16) _BFGET_(r16, 9, 7) + #define SET16avPll_ctrlINTP_INTPR(r16,v) _BFSET_(r16, 9, 7,v) + + #define w32avPll_ctrlINTP {\ + UNSG32 uctrlINTP_CLK_DET_EN : 1;\ + UNSG32 uctrlINTP_DPHER_DLY_SEL : 2;\ + UNSG32 uctrlINTP_INTPI : 4;\ + UNSG32 uctrlINTP_INTPR : 3;\ + UNSG32 RSVDx14_b10 : 22;\ + } + union { UNSG32 u32avPll_ctrlINTP; + struct w32avPll_ctrlINTP; + }; + /////////////////////////////////////////////////////////// + #define GET32avPll_ctrlC8AddOn_MASTER_SLAVEB(r32) _BFGET_(r32, 0, 0) + #define SET32avPll_ctrlC8AddOn_MASTER_SLAVEB(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16avPll_ctrlC8AddOn_MASTER_SLAVEB(r16) _BFGET_(r16, 0, 0) + #define SET16avPll_ctrlC8AddOn_MASTER_SLAVEB(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32avPll_ctrlC8AddOn_MODE(r32) _BFGET_(r32, 2, 1) + #define SET32avPll_ctrlC8AddOn_MODE(r32,v) _BFSET_(r32, 2, 1,v) + #define GET16avPll_ctrlC8AddOn_MODE(r16) _BFGET_(r16, 2, 1) + #define SET16avPll_ctrlC8AddOn_MODE(r16,v) _BFSET_(r16, 2, 1,v) + + #define w32avPll_ctrlC8AddOn {\ + UNSG32 uctrlC8AddOn_MASTER_SLAVEB : 1;\ + UNSG32 uctrlC8AddOn_MODE : 2;\ + UNSG32 RSVDx18_b3 : 29;\ + } + union { UNSG32 u32avPll_ctrlC8AddOn; + struct w32avPll_ctrlC8AddOn; + }; + /////////////////////////////////////////////////////////// + SIE_avpllCh ie_C1; + /////////////////////////////////////////////////////////// + SIE_avpllCh ie_C2; + /////////////////////////////////////////////////////////// + SIE_avpllCh ie_C3; + /////////////////////////////////////////////////////////// + SIE_avpllCh ie_C4; + /////////////////////////////////////////////////////////// + SIE_avpllCh ie_C5; + /////////////////////////////////////////////////////////// + SIE_avpllCh ie_C6; + /////////////////////////////////////////////////////////// + SIE_avpllCh ie_C7; + /////////////////////////////////////////////////////////// + SIE_avpllCh8 ie_C8; + /////////////////////////////////////////////////////////// + #define GET32avPll_ctrlTest_CLKOUT_TST_EN(r32) _BFGET_(r32, 0, 0) + #define SET32avPll_ctrlTest_CLKOUT_TST_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16avPll_ctrlTest_CLKOUT_TST_EN(r16) _BFGET_(r16, 0, 0) + #define SET16avPll_ctrlTest_CLKOUT_TST_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32avPll_ctrlTest_TEST_MON(r32) _BFGET_(r32, 6, 1) + #define SET32avPll_ctrlTest_TEST_MON(r32,v) _BFSET_(r32, 6, 1,v) + #define GET16avPll_ctrlTest_TEST_MON(r16) _BFGET_(r16, 6, 1) + #define SET16avPll_ctrlTest_TEST_MON(r16,v) _BFSET_(r16, 6, 1,v) + + #define w32avPll_ctrlTest {\ + UNSG32 uctrlTest_CLKOUT_TST_EN : 1;\ + UNSG32 uctrlTest_TEST_MON : 6;\ + UNSG32 RSVDx9C_b7 : 25;\ + } + union { UNSG32 u32avPll_ctrlTest; + struct w32avPll_ctrlTest; + }; + /////////////////////////////////////////////////////////// + #define GET32avPll_status_PLL_LOCK(r32) _BFGET_(r32, 0, 0) + #define SET32avPll_status_PLL_LOCK(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16avPll_status_PLL_LOCK(r16) _BFGET_(r16, 0, 0) + #define SET16avPll_status_PLL_LOCK(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32avPll_status_RESERVE_PLL_OUT(r32) _BFGET_(r32, 6, 1) + #define SET32avPll_status_RESERVE_PLL_OUT(r32,v) _BFSET_(r32, 6, 1,v) + #define GET16avPll_status_RESERVE_PLL_OUT(r16) _BFGET_(r16, 6, 1) + #define SET16avPll_status_RESERVE_PLL_OUT(r16,v) _BFSET_(r16, 6, 1,v) + + #define GET32avPll_status_FBDIV_RD(r32) _BFGET_(r32,15, 7) + #define SET32avPll_status_FBDIV_RD(r32,v) _BFSET_(r32,15, 7,v) + #define GET16avPll_status_FBDIV_RD(r16) _BFGET_(r16,15, 7) + #define SET16avPll_status_FBDIV_RD(r16,v) _BFSET_(r16,15, 7,v) + + #define GET32avPll_status_PLL_CAL_DONE(r32) _BFGET_(r32,16,16) + #define SET32avPll_status_PLL_CAL_DONE(r32,v) _BFSET_(r32,16,16,v) + #define GET16avPll_status_PLL_CAL_DONE(r16) _BFGET_(r16, 0, 0) + #define SET16avPll_status_PLL_CAL_DONE(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32avPll_status_SPEED_CNT(r32) _BFGET_(r32,22,17) + #define SET32avPll_status_SPEED_CNT(r32,v) _BFSET_(r32,22,17,v) + #define GET16avPll_status_SPEED_CNT(r16) _BFGET_(r16, 6, 1) + #define SET16avPll_status_SPEED_CNT(r16,v) _BFSET_(r16, 6, 1,v) + + #define GET32avPll_status_SPEED_RD(r32) _BFGET_(r32,26,23) + #define SET32avPll_status_SPEED_RD(r32,v) _BFSET_(r32,26,23,v) + #define GET16avPll_status_SPEED_RD(r16) _BFGET_(r16,10, 7) + #define SET16avPll_status_SPEED_RD(r16,v) _BFSET_(r16,10, 7,v) + + #define w32avPll_status {\ + UNSG32 ustatus_PLL_LOCK : 1;\ + UNSG32 ustatus_RESERVE_PLL_OUT : 6;\ + UNSG32 ustatus_FBDIV_RD : 9;\ + UNSG32 ustatus_PLL_CAL_DONE : 1;\ + UNSG32 ustatus_SPEED_CNT : 6;\ + UNSG32 ustatus_SPEED_RD : 4;\ + UNSG32 RSVDxA0_b27 : 5;\ + } + union { UNSG32 u32avPll_status; + struct w32avPll_status; + }; + #define GET32avPll_status_SLLP_DAC_RD(r32) _BFGET_(r32, 6, 0) + #define SET32avPll_status_SLLP_DAC_RD(r32,v) _BFSET_(r32, 6, 0,v) + #define GET16avPll_status_SLLP_DAC_RD(r16) _BFGET_(r16, 6, 0) + #define SET16avPll_status_SLLP_DAC_RD(r16,v) _BFSET_(r16, 6, 0,v) + + #define w32avPll_status1 {\ + UNSG32 ustatus_SLLP_DAC_RD : 7;\ + UNSG32 RSVDxA4_b7 : 25;\ + } + union { UNSG32 u32avPll_status1; + struct w32avPll_status1; + }; + /////////////////////////////////////////////////////////// + } SIE_avPll; + + typedef union T32avPll_ctrlPLL + { UNSG32 u32; + struct w32avPll_ctrlPLL; + } T32avPll_ctrlPLL; + typedef union T32avPll_ctrlPLL1 + { UNSG32 u32; + struct w32avPll_ctrlPLL1; + } T32avPll_ctrlPLL1; + typedef union T32avPll_ctrlCAL + { UNSG32 u32; + struct w32avPll_ctrlCAL; + } T32avPll_ctrlCAL; + typedef union T32avPll_ctrlCAL1 + { UNSG32 u32; + struct w32avPll_ctrlCAL1; + } T32avPll_ctrlCAL1; + typedef union T32avPll_ctrlSlowLoop + { UNSG32 u32; + struct w32avPll_ctrlSlowLoop; + } T32avPll_ctrlSlowLoop; + typedef union T32avPll_ctrlINTP + { UNSG32 u32; + struct w32avPll_ctrlINTP; + } T32avPll_ctrlINTP; + typedef union T32avPll_ctrlC8AddOn + { UNSG32 u32; + struct w32avPll_ctrlC8AddOn; + } T32avPll_ctrlC8AddOn; + typedef union T32avPll_ctrlTest + { UNSG32 u32; + struct w32avPll_ctrlTest; + } T32avPll_ctrlTest; + typedef union T32avPll_status + { UNSG32 u32; + struct w32avPll_status; + } T32avPll_status; + typedef union T32avPll_status1 + { UNSG32 u32; + struct w32avPll_status1; + } T32avPll_status1; + /////////////////////////////////////////////////////////// + + typedef union TavPll_ctrlPLL + { UNSG32 u32[2]; + struct { + struct w32avPll_ctrlPLL; + struct w32avPll_ctrlPLL1; + }; + } TavPll_ctrlPLL; + typedef union TavPll_ctrlCAL + { UNSG32 u32[2]; + struct { + struct w32avPll_ctrlCAL; + struct w32avPll_ctrlCAL1; + }; + } TavPll_ctrlCAL; + typedef union TavPll_ctrlSlowLoop + { UNSG32 u32[1]; + struct { + struct w32avPll_ctrlSlowLoop; + }; + } TavPll_ctrlSlowLoop; + typedef union TavPll_ctrlINTP + { UNSG32 u32[1]; + struct { + struct w32avPll_ctrlINTP; + }; + } TavPll_ctrlINTP; + typedef union TavPll_ctrlC8AddOn + { UNSG32 u32[1]; + struct { + struct w32avPll_ctrlC8AddOn; + }; + } TavPll_ctrlC8AddOn; + typedef union TavPll_ctrlTest + { UNSG32 u32[1]; + struct { + struct w32avPll_ctrlTest; + }; + } TavPll_ctrlTest; + typedef union TavPll_status + { UNSG32 u32[2]; + struct { + struct w32avPll_status; + struct w32avPll_status1; + }; + } TavPll_status; + + /////////////////////////////////////////////////////////// + SIGN32 avPll_drvrd(SIE_avPll *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avPll_drvwr(SIE_avPll *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avPll_reset(SIE_avPll *p); + SIGN32 avPll_cmp (SIE_avPll *p, SIE_avPll *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avPll_check(p,pie,pfx,hLOG) avPll_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avPll_print(p, pfx,hLOG) avPll_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avPll +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE avioGbl biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 AVPLLA +/// $avPll AVPLLA REG +/// ### +/// * All the registers for AVPLL-A. +/// ### +/// @ 0x000A8 AVPLLA_CLK_EN (P) +/// %unsigned 6 ctrl 0x0 +/// ### +/// * Gates the output of AVPLL-A before it is passed to any logic. One bit for each channel. Bit#0 is for Channel1, Bit#1 is for Channel2, ... Bit#5 is for Channel6. Channel7 is for HDMI PHY and there is no gating on that clock. +/// * 0: Disable channel output +/// * 1: Enable channel output +/// * SW should program this bit as 1 after programming the respective AVPLL-A channel to make sure that clean clock is passed to the logic. +/// ### +/// %unsigned 1 dbg_mux_sel 0x0 +/// ### +/// * 0: CLKOUT_TSTfrom AVPLL is connected to Clock Debug pin. +/// * 1:CLKOUT_C1 from AVPLL is connected to Clock Debug pin. +/// ### +/// %% 25 # Stuffing bits... +/// @ 0x000AC VCLK0_CTRL (P) +/// %unsigned 1 extClkSel 0x0 +/// ### +/// * Select External clock source or PLL output for vClk0. +/// * 0: Select AVPLL output +/// * 1: Select external clock source (please refer to pinlist to know which pin is used for bypass clock) +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x000B0 VCLK1_CTRL (P) +/// %unsigned 1 extClkSel 0x0 +/// ### +/// * Select External clock source or PLL output for vClk1. +/// * 0: Select AVPLL output +/// * 1: Select external clock source (please refer to pinlist to know which pin is used for bypass clock) +/// ### +/// %unsigned 1 pllSel 0x0 +/// ### +/// * Select Video Source for vClk1 (CPCB1 clock) +/// * 0: Select AVPLL-A[2] as source +/// * 1: Select AVPLL-B[2] as source +/// ### +/// %% 30 # Stuffing bits... +/// @ 0x000B4 VCLK2_CTRL (P) +/// %unsigned 1 extClkSel 0x0 +/// ### +/// * Select External clock source or PLL output for vClk2. +/// * 0: Select AVPLL output +/// * 1: Select external clock source (please refer to pinlist to know which pin is used for bypass clock) +/// ### +/// %unsigned 1 pllSel 0x0 +/// ### +/// * Select Video source for vClk1 (CPCB2 clock) +/// * 0: Select AVPLL-B[1] as source +/// * 1: Select AVPLL-A[5] as source +/// ### +/// %% 30 # Stuffing bits... +/// @ 0x000B8 ACLK0_CTRL (P) +/// ### +/// * Clock controls for Audio0 clock (Primary Audio Output – I2S0), +/// ### +/// %unsigned 1 clkSwitch 0x0 +/// ### +/// * 0: use source clock +/// * 1: use divided clock (decided by clkD3Switch and clkSel) +/// ### +/// %unsigned 1 clkD3Switch 0x0 +/// ### +/// * 0 : divide factor is decided by clkSwitch and clkSel +/// * 1: use divide by 3 clock when clkSwitch = 1 +/// ### +/// %unsigned 3 clkSel 0x0 +/// ### +/// * Use the following divide factor if clkD3Switch=0. +/// ### +/// : d2 0x1 +/// : d4 0x2 +/// : d6 0x3 +/// : d8 0x4 +/// : d12 0x5 +/// %unsigned 1 srcSel 0x0 +/// ### +/// * 0: AVPLL-A[3] is used as clock source +/// * 1: AVPLL-A[4] is used as clock source +/// ### +/// %% 26 # Stuffing bits... +/// @ 0x000BC ACLK1_CTRL (P) +/// ### +/// * Clock controls for Audio1 clock (Secondary Audio Output – I2S1). +/// ### +/// %unsigned 1 clkSwitch 0x0 +/// ### +/// * 0: use source clock +/// * 1: use divided clock (decided by clkD3Switch and clkSel) +/// ### +/// %unsigned 1 clkD3Switch 0x0 +/// ### +/// * 0 : divide factor is decided by clkSwitch and clkSel +/// * 1: use divide by 3 clock when clkSwitch = 1 +/// ### +/// %unsigned 3 clkSel 0x0 +/// ### +/// * Use the following divide factor if clkD3Switch=0. +/// ### +/// : d2 0x1 +/// : d4 0x2 +/// : d6 0x3 +/// : d8 0x4 +/// : d12 0x5 +/// %unsigned 1 pllSel 0x0 +/// ### +/// * 0: Select AVPLL-B[3] as source +/// * 1: Select AVPLL-A[3] as source +/// ### +/// %% 26 # Stuffing bits... +/// @ 0x000C0 ACLK2_CTRL (P) +/// ### +/// * Clock Controls for Audio2 clock (Audio input – I2S2). +/// ### +/// %unsigned 1 clkSwitch 0x0 +/// ### +/// * 0: use source clock +/// * 1: use divided clock (decided by clkD3Switch and clkSel) +/// ### +/// %unsigned 1 clkD3Switch 0x0 +/// ### +/// * 0 : divide factor is decided by clkSwitch and clkSel +/// * 1: use divide by 3 clock when clkSwitch = 1 +/// ### +/// %unsigned 3 clkSel 0x0 +/// ### +/// * Use the following divide factor if clkD3Switch=0. +/// ### +/// : d2 0x1 +/// : d4 0x2 +/// : d6 0x3 +/// : d8 0x4 +/// : d12 0x5 +/// %% 27 # Stuffing bits... +/// @ 0x000C4 ACLK3_CTRL (P) +/// ### +/// * Clock controls for Audio3 clock (SPDIF output) +/// ### +/// %unsigned 1 clkSwitch 0x0 +/// ### +/// * 0: use source clock +/// * 1: use divided clock (decided by clkD3Switch and clkSel) +/// ### +/// %unsigned 1 clkD3Switch 0x0 +/// ### +/// * 0 : divide factor is decided by clkSwitch and clkSel +/// * 1: use divide by 3 clock when clkSwitch = 1 +/// ### +/// %unsigned 3 clkSel 0x0 +/// ### +/// * Use the following divide factor if clkD3Switch=0. +/// ### +/// : d2 0x1 +/// : d4 0x2 +/// : d6 0x3 +/// : d8 0x4 +/// : d12 0x5 +/// %% 27 # Stuffing bits... +/// @ 0x000C8 ACLK4_CTRL (P) +/// ### +/// * Clock controls for Audio4clock (4-ch MIC output) +/// ### +/// %unsigned 1 clkSwitch 0x0 +/// ### +/// * 0: use source clock +/// * 1: use divided clock (decided by clkD3Switch and clkSel) +/// ### +/// %unsigned 1 clkD3Switch 0x0 +/// ### +/// * 0 : divide factor is decided by clkSwitch and clkSel +/// * 1: use divide by 3 clock when clkSwitch = 1 +/// ### +/// %unsigned 3 clkSel 0x0 +/// ### +/// * Use the following divide factor if clkD3Switch=0. +/// ### +/// : d2 0x1 +/// : d4 0x2 +/// : d6 0x3 +/// : d8 0x4 +/// : d12 0x5 +/// %% 27 # Stuffing bits... +/// @ 0x000CC SWRST_CTRL (P-) +/// ### +/// * Soft resets for various blocks inside AVIO. +/// ### +/// %unsigned 1 audio0SyncRstn 0x1 +/// ### +/// * Reset control for Primary Audio Output (I2S0). +/// * 1: de-assert reset +/// * 0: Assert reset +/// ### +/// %unsigned 1 audio1SyncRstn 0x1 +/// ### +/// * Reset for Secondary Audio Output (I2S1). +/// * 1: de-assert reset +/// * 0: Assert reset +/// ### +/// %unsigned 1 audio2SyncRstn 0x1 +/// ### +/// * Reset for SPDIF Output. +/// * 1: de-assert reset +/// * 0: Assert reset +/// ### +/// %unsigned 1 audio3SyncRstn 0x1 +/// ### +/// * Reset for 7.1 Audio Input (I2S2). +/// * 1: de-assert reset +/// * 0: Assert reset +/// ### +/// %unsigned 1 audio4SyncRstn 0x1 +/// ### +/// * Reset for 4-channel Audio Input (I2S3). +/// * 1: de-assert reset +/// * 0: Assert reset +/// ### +/// %unsigned 1 audioHdSyncRstn 0x1 +/// ### +/// * Reset for HDMI Audio Output. +/// * 1: de-assert reset +/// * 0: Assert reset +/// ### +/// %unsigned 1 spdifRxSyncRstn 0x1 +/// ### +/// * Reset for SPDIF Input. +/// * 1: de-assert reset +/// * 0: Assert reset +/// ### +/// %unsigned 1 vppSyncRstn 0x1 +/// ### +/// * Reset for all the logic that works on vppSysClk (FE and SCL) +/// * 1: de-assert reset +/// * 0: Assert reset +/// ### +/// %unsigned 1 vipSyncRstn 0x1 +/// ### +/// * Reset for VIP module. +/// * 1: de-assert reset +/// * 0: Assert reset +/// ### +/// %unsigned 1 appSyncRstn 0x1 +/// ### +/// * Reset for APP module. +/// * 1: de-assert reset +/// * 0: Assert reset +/// ### +/// %% 22 # Stuffing bits... +/// @ 0x000D0 RWTC_31to0 (P) +/// ### +/// * rwtcBus[31:0] +/// * *INTERNAL_ONLY** +/// ### +/// %unsigned 32 value 0xAAAA99AA +/// ### +/// * RTWC [31:0] value for AVIO internal memories. +/// ### +/// @ 0x000D4 RWTC_57to32 (P) +/// ### +/// * rwtcBus[57:32] +/// * *INTERNAL_ONLY** +/// ### +/// %unsigned 26 value 0x2A95B5A +/// ### +/// * RTWC [57:32] value for AVIO internal memories. +/// ### +/// %% 6 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 216B, bits: 920b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_avioGbl +#define h_avioGbl (){} + + #define RA_avioGbl_AVPLLA 0x0000 + /////////////////////////////////////////////////////////// + #define RA_avioGbl_AVPLLA_CLK_EN 0x00A8 + + #define BA_avioGbl_AVPLLA_CLK_EN_ctrl 0x00A8 + #define B16avioGbl_AVPLLA_CLK_EN_ctrl 0x00A8 + #define LSb32avioGbl_AVPLLA_CLK_EN_ctrl 0 + #define LSb16avioGbl_AVPLLA_CLK_EN_ctrl 0 + #define bavioGbl_AVPLLA_CLK_EN_ctrl 6 + #define MSK32avioGbl_AVPLLA_CLK_EN_ctrl 0x0000003F + + #define BA_avioGbl_AVPLLA_CLK_EN_dbg_mux_sel 0x00A8 + #define B16avioGbl_AVPLLA_CLK_EN_dbg_mux_sel 0x00A8 + #define LSb32avioGbl_AVPLLA_CLK_EN_dbg_mux_sel 6 + #define LSb16avioGbl_AVPLLA_CLK_EN_dbg_mux_sel 6 + #define bavioGbl_AVPLLA_CLK_EN_dbg_mux_sel 1 + #define MSK32avioGbl_AVPLLA_CLK_EN_dbg_mux_sel 0x00000040 + /////////////////////////////////////////////////////////// + #define RA_avioGbl_VCLK0_CTRL 0x00AC + + #define BA_avioGbl_VCLK0_CTRL_extClkSel 0x00AC + #define B16avioGbl_VCLK0_CTRL_extClkSel 0x00AC + #define LSb32avioGbl_VCLK0_CTRL_extClkSel 0 + #define LSb16avioGbl_VCLK0_CTRL_extClkSel 0 + #define bavioGbl_VCLK0_CTRL_extClkSel 1 + #define MSK32avioGbl_VCLK0_CTRL_extClkSel 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_avioGbl_VCLK1_CTRL 0x00B0 + + #define BA_avioGbl_VCLK1_CTRL_extClkSel 0x00B0 + #define B16avioGbl_VCLK1_CTRL_extClkSel 0x00B0 + #define LSb32avioGbl_VCLK1_CTRL_extClkSel 0 + #define LSb16avioGbl_VCLK1_CTRL_extClkSel 0 + #define bavioGbl_VCLK1_CTRL_extClkSel 1 + #define MSK32avioGbl_VCLK1_CTRL_extClkSel 0x00000001 + + #define BA_avioGbl_VCLK1_CTRL_pllSel 0x00B0 + #define B16avioGbl_VCLK1_CTRL_pllSel 0x00B0 + #define LSb32avioGbl_VCLK1_CTRL_pllSel 1 + #define LSb16avioGbl_VCLK1_CTRL_pllSel 1 + #define bavioGbl_VCLK1_CTRL_pllSel 1 + #define MSK32avioGbl_VCLK1_CTRL_pllSel 0x00000002 + /////////////////////////////////////////////////////////// + #define RA_avioGbl_VCLK2_CTRL 0x00B4 + + #define BA_avioGbl_VCLK2_CTRL_extClkSel 0x00B4 + #define B16avioGbl_VCLK2_CTRL_extClkSel 0x00B4 + #define LSb32avioGbl_VCLK2_CTRL_extClkSel 0 + #define LSb16avioGbl_VCLK2_CTRL_extClkSel 0 + #define bavioGbl_VCLK2_CTRL_extClkSel 1 + #define MSK32avioGbl_VCLK2_CTRL_extClkSel 0x00000001 + + #define BA_avioGbl_VCLK2_CTRL_pllSel 0x00B4 + #define B16avioGbl_VCLK2_CTRL_pllSel 0x00B4 + #define LSb32avioGbl_VCLK2_CTRL_pllSel 1 + #define LSb16avioGbl_VCLK2_CTRL_pllSel 1 + #define bavioGbl_VCLK2_CTRL_pllSel 1 + #define MSK32avioGbl_VCLK2_CTRL_pllSel 0x00000002 + /////////////////////////////////////////////////////////// + #define RA_avioGbl_ACLK0_CTRL 0x00B8 + + #define BA_avioGbl_ACLK0_CTRL_clkSwitch 0x00B8 + #define B16avioGbl_ACLK0_CTRL_clkSwitch 0x00B8 + #define LSb32avioGbl_ACLK0_CTRL_clkSwitch 0 + #define LSb16avioGbl_ACLK0_CTRL_clkSwitch 0 + #define bavioGbl_ACLK0_CTRL_clkSwitch 1 + #define MSK32avioGbl_ACLK0_CTRL_clkSwitch 0x00000001 + + #define BA_avioGbl_ACLK0_CTRL_clkD3Switch 0x00B8 + #define B16avioGbl_ACLK0_CTRL_clkD3Switch 0x00B8 + #define LSb32avioGbl_ACLK0_CTRL_clkD3Switch 1 + #define LSb16avioGbl_ACLK0_CTRL_clkD3Switch 1 + #define bavioGbl_ACLK0_CTRL_clkD3Switch 1 + #define MSK32avioGbl_ACLK0_CTRL_clkD3Switch 0x00000002 + + #define BA_avioGbl_ACLK0_CTRL_clkSel 0x00B8 + #define B16avioGbl_ACLK0_CTRL_clkSel 0x00B8 + #define LSb32avioGbl_ACLK0_CTRL_clkSel 2 + #define LSb16avioGbl_ACLK0_CTRL_clkSel 2 + #define bavioGbl_ACLK0_CTRL_clkSel 3 + #define MSK32avioGbl_ACLK0_CTRL_clkSel 0x0000001C + #define avioGbl_ACLK0_CTRL_clkSel_d2 0x1 + #define avioGbl_ACLK0_CTRL_clkSel_d4 0x2 + #define avioGbl_ACLK0_CTRL_clkSel_d6 0x3 + #define avioGbl_ACLK0_CTRL_clkSel_d8 0x4 + #define avioGbl_ACLK0_CTRL_clkSel_d12 0x5 + + #define BA_avioGbl_ACLK0_CTRL_srcSel 0x00B8 + #define B16avioGbl_ACLK0_CTRL_srcSel 0x00B8 + #define LSb32avioGbl_ACLK0_CTRL_srcSel 5 + #define LSb16avioGbl_ACLK0_CTRL_srcSel 5 + #define bavioGbl_ACLK0_CTRL_srcSel 1 + #define MSK32avioGbl_ACLK0_CTRL_srcSel 0x00000020 + /////////////////////////////////////////////////////////// + #define RA_avioGbl_ACLK1_CTRL 0x00BC + + #define BA_avioGbl_ACLK1_CTRL_clkSwitch 0x00BC + #define B16avioGbl_ACLK1_CTRL_clkSwitch 0x00BC + #define LSb32avioGbl_ACLK1_CTRL_clkSwitch 0 + #define LSb16avioGbl_ACLK1_CTRL_clkSwitch 0 + #define bavioGbl_ACLK1_CTRL_clkSwitch 1 + #define MSK32avioGbl_ACLK1_CTRL_clkSwitch 0x00000001 + + #define BA_avioGbl_ACLK1_CTRL_clkD3Switch 0x00BC + #define B16avioGbl_ACLK1_CTRL_clkD3Switch 0x00BC + #define LSb32avioGbl_ACLK1_CTRL_clkD3Switch 1 + #define LSb16avioGbl_ACLK1_CTRL_clkD3Switch 1 + #define bavioGbl_ACLK1_CTRL_clkD3Switch 1 + #define MSK32avioGbl_ACLK1_CTRL_clkD3Switch 0x00000002 + + #define BA_avioGbl_ACLK1_CTRL_clkSel 0x00BC + #define B16avioGbl_ACLK1_CTRL_clkSel 0x00BC + #define LSb32avioGbl_ACLK1_CTRL_clkSel 2 + #define LSb16avioGbl_ACLK1_CTRL_clkSel 2 + #define bavioGbl_ACLK1_CTRL_clkSel 3 + #define MSK32avioGbl_ACLK1_CTRL_clkSel 0x0000001C + #define avioGbl_ACLK1_CTRL_clkSel_d2 0x1 + #define avioGbl_ACLK1_CTRL_clkSel_d4 0x2 + #define avioGbl_ACLK1_CTRL_clkSel_d6 0x3 + #define avioGbl_ACLK1_CTRL_clkSel_d8 0x4 + #define avioGbl_ACLK1_CTRL_clkSel_d12 0x5 + + #define BA_avioGbl_ACLK1_CTRL_pllSel 0x00BC + #define B16avioGbl_ACLK1_CTRL_pllSel 0x00BC + #define LSb32avioGbl_ACLK1_CTRL_pllSel 5 + #define LSb16avioGbl_ACLK1_CTRL_pllSel 5 + #define bavioGbl_ACLK1_CTRL_pllSel 1 + #define MSK32avioGbl_ACLK1_CTRL_pllSel 0x00000020 + /////////////////////////////////////////////////////////// + #define RA_avioGbl_ACLK2_CTRL 0x00C0 + + #define BA_avioGbl_ACLK2_CTRL_clkSwitch 0x00C0 + #define B16avioGbl_ACLK2_CTRL_clkSwitch 0x00C0 + #define LSb32avioGbl_ACLK2_CTRL_clkSwitch 0 + #define LSb16avioGbl_ACLK2_CTRL_clkSwitch 0 + #define bavioGbl_ACLK2_CTRL_clkSwitch 1 + #define MSK32avioGbl_ACLK2_CTRL_clkSwitch 0x00000001 + + #define BA_avioGbl_ACLK2_CTRL_clkD3Switch 0x00C0 + #define B16avioGbl_ACLK2_CTRL_clkD3Switch 0x00C0 + #define LSb32avioGbl_ACLK2_CTRL_clkD3Switch 1 + #define LSb16avioGbl_ACLK2_CTRL_clkD3Switch 1 + #define bavioGbl_ACLK2_CTRL_clkD3Switch 1 + #define MSK32avioGbl_ACLK2_CTRL_clkD3Switch 0x00000002 + + #define BA_avioGbl_ACLK2_CTRL_clkSel 0x00C0 + #define B16avioGbl_ACLK2_CTRL_clkSel 0x00C0 + #define LSb32avioGbl_ACLK2_CTRL_clkSel 2 + #define LSb16avioGbl_ACLK2_CTRL_clkSel 2 + #define bavioGbl_ACLK2_CTRL_clkSel 3 + #define MSK32avioGbl_ACLK2_CTRL_clkSel 0x0000001C + #define avioGbl_ACLK2_CTRL_clkSel_d2 0x1 + #define avioGbl_ACLK2_CTRL_clkSel_d4 0x2 + #define avioGbl_ACLK2_CTRL_clkSel_d6 0x3 + #define avioGbl_ACLK2_CTRL_clkSel_d8 0x4 + #define avioGbl_ACLK2_CTRL_clkSel_d12 0x5 + /////////////////////////////////////////////////////////// + #define RA_avioGbl_ACLK3_CTRL 0x00C4 + + #define BA_avioGbl_ACLK3_CTRL_clkSwitch 0x00C4 + #define B16avioGbl_ACLK3_CTRL_clkSwitch 0x00C4 + #define LSb32avioGbl_ACLK3_CTRL_clkSwitch 0 + #define LSb16avioGbl_ACLK3_CTRL_clkSwitch 0 + #define bavioGbl_ACLK3_CTRL_clkSwitch 1 + #define MSK32avioGbl_ACLK3_CTRL_clkSwitch 0x00000001 + + #define BA_avioGbl_ACLK3_CTRL_clkD3Switch 0x00C4 + #define B16avioGbl_ACLK3_CTRL_clkD3Switch 0x00C4 + #define LSb32avioGbl_ACLK3_CTRL_clkD3Switch 1 + #define LSb16avioGbl_ACLK3_CTRL_clkD3Switch 1 + #define bavioGbl_ACLK3_CTRL_clkD3Switch 1 + #define MSK32avioGbl_ACLK3_CTRL_clkD3Switch 0x00000002 + + #define BA_avioGbl_ACLK3_CTRL_clkSel 0x00C4 + #define B16avioGbl_ACLK3_CTRL_clkSel 0x00C4 + #define LSb32avioGbl_ACLK3_CTRL_clkSel 2 + #define LSb16avioGbl_ACLK3_CTRL_clkSel 2 + #define bavioGbl_ACLK3_CTRL_clkSel 3 + #define MSK32avioGbl_ACLK3_CTRL_clkSel 0x0000001C + #define avioGbl_ACLK3_CTRL_clkSel_d2 0x1 + #define avioGbl_ACLK3_CTRL_clkSel_d4 0x2 + #define avioGbl_ACLK3_CTRL_clkSel_d6 0x3 + #define avioGbl_ACLK3_CTRL_clkSel_d8 0x4 + #define avioGbl_ACLK3_CTRL_clkSel_d12 0x5 + /////////////////////////////////////////////////////////// + #define RA_avioGbl_ACLK4_CTRL 0x00C8 + + #define BA_avioGbl_ACLK4_CTRL_clkSwitch 0x00C8 + #define B16avioGbl_ACLK4_CTRL_clkSwitch 0x00C8 + #define LSb32avioGbl_ACLK4_CTRL_clkSwitch 0 + #define LSb16avioGbl_ACLK4_CTRL_clkSwitch 0 + #define bavioGbl_ACLK4_CTRL_clkSwitch 1 + #define MSK32avioGbl_ACLK4_CTRL_clkSwitch 0x00000001 + + #define BA_avioGbl_ACLK4_CTRL_clkD3Switch 0x00C8 + #define B16avioGbl_ACLK4_CTRL_clkD3Switch 0x00C8 + #define LSb32avioGbl_ACLK4_CTRL_clkD3Switch 1 + #define LSb16avioGbl_ACLK4_CTRL_clkD3Switch 1 + #define bavioGbl_ACLK4_CTRL_clkD3Switch 1 + #define MSK32avioGbl_ACLK4_CTRL_clkD3Switch 0x00000002 + + #define BA_avioGbl_ACLK4_CTRL_clkSel 0x00C8 + #define B16avioGbl_ACLK4_CTRL_clkSel 0x00C8 + #define LSb32avioGbl_ACLK4_CTRL_clkSel 2 + #define LSb16avioGbl_ACLK4_CTRL_clkSel 2 + #define bavioGbl_ACLK4_CTRL_clkSel 3 + #define MSK32avioGbl_ACLK4_CTRL_clkSel 0x0000001C + #define avioGbl_ACLK4_CTRL_clkSel_d2 0x1 + #define avioGbl_ACLK4_CTRL_clkSel_d4 0x2 + #define avioGbl_ACLK4_CTRL_clkSel_d6 0x3 + #define avioGbl_ACLK4_CTRL_clkSel_d8 0x4 + #define avioGbl_ACLK4_CTRL_clkSel_d12 0x5 + /////////////////////////////////////////////////////////// + #define RA_avioGbl_SWRST_CTRL 0x00CC + + #define BA_avioGbl_SWRST_CTRL_audio0SyncRstn 0x00CC + #define B16avioGbl_SWRST_CTRL_audio0SyncRstn 0x00CC + #define LSb32avioGbl_SWRST_CTRL_audio0SyncRstn 0 + #define LSb16avioGbl_SWRST_CTRL_audio0SyncRstn 0 + #define bavioGbl_SWRST_CTRL_audio0SyncRstn 1 + #define MSK32avioGbl_SWRST_CTRL_audio0SyncRstn 0x00000001 + + #define BA_avioGbl_SWRST_CTRL_audio1SyncRstn 0x00CC + #define B16avioGbl_SWRST_CTRL_audio1SyncRstn 0x00CC + #define LSb32avioGbl_SWRST_CTRL_audio1SyncRstn 1 + #define LSb16avioGbl_SWRST_CTRL_audio1SyncRstn 1 + #define bavioGbl_SWRST_CTRL_audio1SyncRstn 1 + #define MSK32avioGbl_SWRST_CTRL_audio1SyncRstn 0x00000002 + + #define BA_avioGbl_SWRST_CTRL_audio2SyncRstn 0x00CC + #define B16avioGbl_SWRST_CTRL_audio2SyncRstn 0x00CC + #define LSb32avioGbl_SWRST_CTRL_audio2SyncRstn 2 + #define LSb16avioGbl_SWRST_CTRL_audio2SyncRstn 2 + #define bavioGbl_SWRST_CTRL_audio2SyncRstn 1 + #define MSK32avioGbl_SWRST_CTRL_audio2SyncRstn 0x00000004 + + #define BA_avioGbl_SWRST_CTRL_audio3SyncRstn 0x00CC + #define B16avioGbl_SWRST_CTRL_audio3SyncRstn 0x00CC + #define LSb32avioGbl_SWRST_CTRL_audio3SyncRstn 3 + #define LSb16avioGbl_SWRST_CTRL_audio3SyncRstn 3 + #define bavioGbl_SWRST_CTRL_audio3SyncRstn 1 + #define MSK32avioGbl_SWRST_CTRL_audio3SyncRstn 0x00000008 + + #define BA_avioGbl_SWRST_CTRL_audio4SyncRstn 0x00CC + #define B16avioGbl_SWRST_CTRL_audio4SyncRstn 0x00CC + #define LSb32avioGbl_SWRST_CTRL_audio4SyncRstn 4 + #define LSb16avioGbl_SWRST_CTRL_audio4SyncRstn 4 + #define bavioGbl_SWRST_CTRL_audio4SyncRstn 1 + #define MSK32avioGbl_SWRST_CTRL_audio4SyncRstn 0x00000010 + + #define BA_avioGbl_SWRST_CTRL_audioHdSyncRstn 0x00CC + #define B16avioGbl_SWRST_CTRL_audioHdSyncRstn 0x00CC + #define LSb32avioGbl_SWRST_CTRL_audioHdSyncRstn 5 + #define LSb16avioGbl_SWRST_CTRL_audioHdSyncRstn 5 + #define bavioGbl_SWRST_CTRL_audioHdSyncRstn 1 + #define MSK32avioGbl_SWRST_CTRL_audioHdSyncRstn 0x00000020 + + #define BA_avioGbl_SWRST_CTRL_spdifRxSyncRstn 0x00CC + #define B16avioGbl_SWRST_CTRL_spdifRxSyncRstn 0x00CC + #define LSb32avioGbl_SWRST_CTRL_spdifRxSyncRstn 6 + #define LSb16avioGbl_SWRST_CTRL_spdifRxSyncRstn 6 + #define bavioGbl_SWRST_CTRL_spdifRxSyncRstn 1 + #define MSK32avioGbl_SWRST_CTRL_spdifRxSyncRstn 0x00000040 + + #define BA_avioGbl_SWRST_CTRL_vppSyncRstn 0x00CC + #define B16avioGbl_SWRST_CTRL_vppSyncRstn 0x00CC + #define LSb32avioGbl_SWRST_CTRL_vppSyncRstn 7 + #define LSb16avioGbl_SWRST_CTRL_vppSyncRstn 7 + #define bavioGbl_SWRST_CTRL_vppSyncRstn 1 + #define MSK32avioGbl_SWRST_CTRL_vppSyncRstn 0x00000080 + + #define BA_avioGbl_SWRST_CTRL_vipSyncRstn 0x00CD + #define B16avioGbl_SWRST_CTRL_vipSyncRstn 0x00CC + #define LSb32avioGbl_SWRST_CTRL_vipSyncRstn 8 + #define LSb16avioGbl_SWRST_CTRL_vipSyncRstn 8 + #define bavioGbl_SWRST_CTRL_vipSyncRstn 1 + #define MSK32avioGbl_SWRST_CTRL_vipSyncRstn 0x00000100 + + #define BA_avioGbl_SWRST_CTRL_appSyncRstn 0x00CD + #define B16avioGbl_SWRST_CTRL_appSyncRstn 0x00CC + #define LSb32avioGbl_SWRST_CTRL_appSyncRstn 9 + #define LSb16avioGbl_SWRST_CTRL_appSyncRstn 9 + #define bavioGbl_SWRST_CTRL_appSyncRstn 1 + #define MSK32avioGbl_SWRST_CTRL_appSyncRstn 0x00000200 + /////////////////////////////////////////////////////////// + #define RA_avioGbl_RWTC_31to0 0x00D0 + + #define BA_avioGbl_RWTC_31to0_value 0x00D0 + #define B16avioGbl_RWTC_31to0_value 0x00D0 + #define LSb32avioGbl_RWTC_31to0_value 0 + #define LSb16avioGbl_RWTC_31to0_value 0 + #define bavioGbl_RWTC_31to0_value 32 + #define MSK32avioGbl_RWTC_31to0_value 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_avioGbl_RWTC_57to32 0x00D4 + + #define BA_avioGbl_RWTC_57to32_value 0x00D4 + #define B16avioGbl_RWTC_57to32_value 0x00D4 + #define LSb32avioGbl_RWTC_57to32_value 0 + #define LSb16avioGbl_RWTC_57to32_value 0 + #define bavioGbl_RWTC_57to32_value 26 + #define MSK32avioGbl_RWTC_57to32_value 0x03FFFFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_avioGbl { + /////////////////////////////////////////////////////////// + SIE_avPll ie_AVPLLA; + /////////////////////////////////////////////////////////// + #define GET32avioGbl_AVPLLA_CLK_EN_ctrl(r32) _BFGET_(r32, 5, 0) + #define SET32avioGbl_AVPLLA_CLK_EN_ctrl(r32,v) _BFSET_(r32, 5, 0,v) + #define GET16avioGbl_AVPLLA_CLK_EN_ctrl(r16) _BFGET_(r16, 5, 0) + #define SET16avioGbl_AVPLLA_CLK_EN_ctrl(r16,v) _BFSET_(r16, 5, 0,v) + + #define GET32avioGbl_AVPLLA_CLK_EN_dbg_mux_sel(r32) _BFGET_(r32, 6, 6) + #define SET32avioGbl_AVPLLA_CLK_EN_dbg_mux_sel(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16avioGbl_AVPLLA_CLK_EN_dbg_mux_sel(r16) _BFGET_(r16, 6, 6) + #define SET16avioGbl_AVPLLA_CLK_EN_dbg_mux_sel(r16,v) _BFSET_(r16, 6, 6,v) + + #define w32avioGbl_AVPLLA_CLK_EN {\ + UNSG32 uAVPLLA_CLK_EN_ctrl : 6;\ + UNSG32 uAVPLLA_CLK_EN_dbg_mux_sel : 1;\ + UNSG32 RSVDxA8_b7 : 25;\ + } + union { UNSG32 u32avioGbl_AVPLLA_CLK_EN; + struct w32avioGbl_AVPLLA_CLK_EN; + }; + /////////////////////////////////////////////////////////// + #define GET32avioGbl_VCLK0_CTRL_extClkSel(r32) _BFGET_(r32, 0, 0) + #define SET32avioGbl_VCLK0_CTRL_extClkSel(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16avioGbl_VCLK0_CTRL_extClkSel(r16) _BFGET_(r16, 0, 0) + #define SET16avioGbl_VCLK0_CTRL_extClkSel(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32avioGbl_VCLK0_CTRL {\ + UNSG32 uVCLK0_CTRL_extClkSel : 1;\ + UNSG32 RSVDxAC_b1 : 31;\ + } + union { UNSG32 u32avioGbl_VCLK0_CTRL; + struct w32avioGbl_VCLK0_CTRL; + }; + /////////////////////////////////////////////////////////// + #define GET32avioGbl_VCLK1_CTRL_extClkSel(r32) _BFGET_(r32, 0, 0) + #define SET32avioGbl_VCLK1_CTRL_extClkSel(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16avioGbl_VCLK1_CTRL_extClkSel(r16) _BFGET_(r16, 0, 0) + #define SET16avioGbl_VCLK1_CTRL_extClkSel(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32avioGbl_VCLK1_CTRL_pllSel(r32) _BFGET_(r32, 1, 1) + #define SET32avioGbl_VCLK1_CTRL_pllSel(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16avioGbl_VCLK1_CTRL_pllSel(r16) _BFGET_(r16, 1, 1) + #define SET16avioGbl_VCLK1_CTRL_pllSel(r16,v) _BFSET_(r16, 1, 1,v) + + #define w32avioGbl_VCLK1_CTRL {\ + UNSG32 uVCLK1_CTRL_extClkSel : 1;\ + UNSG32 uVCLK1_CTRL_pllSel : 1;\ + UNSG32 RSVDxB0_b2 : 30;\ + } + union { UNSG32 u32avioGbl_VCLK1_CTRL; + struct w32avioGbl_VCLK1_CTRL; + }; + /////////////////////////////////////////////////////////// + #define GET32avioGbl_VCLK2_CTRL_extClkSel(r32) _BFGET_(r32, 0, 0) + #define SET32avioGbl_VCLK2_CTRL_extClkSel(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16avioGbl_VCLK2_CTRL_extClkSel(r16) _BFGET_(r16, 0, 0) + #define SET16avioGbl_VCLK2_CTRL_extClkSel(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32avioGbl_VCLK2_CTRL_pllSel(r32) _BFGET_(r32, 1, 1) + #define SET32avioGbl_VCLK2_CTRL_pllSel(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16avioGbl_VCLK2_CTRL_pllSel(r16) _BFGET_(r16, 1, 1) + #define SET16avioGbl_VCLK2_CTRL_pllSel(r16,v) _BFSET_(r16, 1, 1,v) + + #define w32avioGbl_VCLK2_CTRL {\ + UNSG32 uVCLK2_CTRL_extClkSel : 1;\ + UNSG32 uVCLK2_CTRL_pllSel : 1;\ + UNSG32 RSVDxB4_b2 : 30;\ + } + union { UNSG32 u32avioGbl_VCLK2_CTRL; + struct w32avioGbl_VCLK2_CTRL; + }; + /////////////////////////////////////////////////////////// + #define GET32avioGbl_ACLK0_CTRL_clkSwitch(r32) _BFGET_(r32, 0, 0) + #define SET32avioGbl_ACLK0_CTRL_clkSwitch(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16avioGbl_ACLK0_CTRL_clkSwitch(r16) _BFGET_(r16, 0, 0) + #define SET16avioGbl_ACLK0_CTRL_clkSwitch(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32avioGbl_ACLK0_CTRL_clkD3Switch(r32) _BFGET_(r32, 1, 1) + #define SET32avioGbl_ACLK0_CTRL_clkD3Switch(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16avioGbl_ACLK0_CTRL_clkD3Switch(r16) _BFGET_(r16, 1, 1) + #define SET16avioGbl_ACLK0_CTRL_clkD3Switch(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32avioGbl_ACLK0_CTRL_clkSel(r32) _BFGET_(r32, 4, 2) + #define SET32avioGbl_ACLK0_CTRL_clkSel(r32,v) _BFSET_(r32, 4, 2,v) + #define GET16avioGbl_ACLK0_CTRL_clkSel(r16) _BFGET_(r16, 4, 2) + #define SET16avioGbl_ACLK0_CTRL_clkSel(r16,v) _BFSET_(r16, 4, 2,v) + + #define GET32avioGbl_ACLK0_CTRL_srcSel(r32) _BFGET_(r32, 5, 5) + #define SET32avioGbl_ACLK0_CTRL_srcSel(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16avioGbl_ACLK0_CTRL_srcSel(r16) _BFGET_(r16, 5, 5) + #define SET16avioGbl_ACLK0_CTRL_srcSel(r16,v) _BFSET_(r16, 5, 5,v) + + #define w32avioGbl_ACLK0_CTRL {\ + UNSG32 uACLK0_CTRL_clkSwitch : 1;\ + UNSG32 uACLK0_CTRL_clkD3Switch : 1;\ + UNSG32 uACLK0_CTRL_clkSel : 3;\ + UNSG32 uACLK0_CTRL_srcSel : 1;\ + UNSG32 RSVDxB8_b6 : 26;\ + } + union { UNSG32 u32avioGbl_ACLK0_CTRL; + struct w32avioGbl_ACLK0_CTRL; + }; + /////////////////////////////////////////////////////////// + #define GET32avioGbl_ACLK1_CTRL_clkSwitch(r32) _BFGET_(r32, 0, 0) + #define SET32avioGbl_ACLK1_CTRL_clkSwitch(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16avioGbl_ACLK1_CTRL_clkSwitch(r16) _BFGET_(r16, 0, 0) + #define SET16avioGbl_ACLK1_CTRL_clkSwitch(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32avioGbl_ACLK1_CTRL_clkD3Switch(r32) _BFGET_(r32, 1, 1) + #define SET32avioGbl_ACLK1_CTRL_clkD3Switch(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16avioGbl_ACLK1_CTRL_clkD3Switch(r16) _BFGET_(r16, 1, 1) + #define SET16avioGbl_ACLK1_CTRL_clkD3Switch(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32avioGbl_ACLK1_CTRL_clkSel(r32) _BFGET_(r32, 4, 2) + #define SET32avioGbl_ACLK1_CTRL_clkSel(r32,v) _BFSET_(r32, 4, 2,v) + #define GET16avioGbl_ACLK1_CTRL_clkSel(r16) _BFGET_(r16, 4, 2) + #define SET16avioGbl_ACLK1_CTRL_clkSel(r16,v) _BFSET_(r16, 4, 2,v) + + #define GET32avioGbl_ACLK1_CTRL_pllSel(r32) _BFGET_(r32, 5, 5) + #define SET32avioGbl_ACLK1_CTRL_pllSel(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16avioGbl_ACLK1_CTRL_pllSel(r16) _BFGET_(r16, 5, 5) + #define SET16avioGbl_ACLK1_CTRL_pllSel(r16,v) _BFSET_(r16, 5, 5,v) + + #define w32avioGbl_ACLK1_CTRL {\ + UNSG32 uACLK1_CTRL_clkSwitch : 1;\ + UNSG32 uACLK1_CTRL_clkD3Switch : 1;\ + UNSG32 uACLK1_CTRL_clkSel : 3;\ + UNSG32 uACLK1_CTRL_pllSel : 1;\ + UNSG32 RSVDxBC_b6 : 26;\ + } + union { UNSG32 u32avioGbl_ACLK1_CTRL; + struct w32avioGbl_ACLK1_CTRL; + }; + /////////////////////////////////////////////////////////// + #define GET32avioGbl_ACLK2_CTRL_clkSwitch(r32) _BFGET_(r32, 0, 0) + #define SET32avioGbl_ACLK2_CTRL_clkSwitch(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16avioGbl_ACLK2_CTRL_clkSwitch(r16) _BFGET_(r16, 0, 0) + #define SET16avioGbl_ACLK2_CTRL_clkSwitch(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32avioGbl_ACLK2_CTRL_clkD3Switch(r32) _BFGET_(r32, 1, 1) + #define SET32avioGbl_ACLK2_CTRL_clkD3Switch(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16avioGbl_ACLK2_CTRL_clkD3Switch(r16) _BFGET_(r16, 1, 1) + #define SET16avioGbl_ACLK2_CTRL_clkD3Switch(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32avioGbl_ACLK2_CTRL_clkSel(r32) _BFGET_(r32, 4, 2) + #define SET32avioGbl_ACLK2_CTRL_clkSel(r32,v) _BFSET_(r32, 4, 2,v) + #define GET16avioGbl_ACLK2_CTRL_clkSel(r16) _BFGET_(r16, 4, 2) + #define SET16avioGbl_ACLK2_CTRL_clkSel(r16,v) _BFSET_(r16, 4, 2,v) + + #define w32avioGbl_ACLK2_CTRL {\ + UNSG32 uACLK2_CTRL_clkSwitch : 1;\ + UNSG32 uACLK2_CTRL_clkD3Switch : 1;\ + UNSG32 uACLK2_CTRL_clkSel : 3;\ + UNSG32 RSVDxC0_b5 : 27;\ + } + union { UNSG32 u32avioGbl_ACLK2_CTRL; + struct w32avioGbl_ACLK2_CTRL; + }; + /////////////////////////////////////////////////////////// + #define GET32avioGbl_ACLK3_CTRL_clkSwitch(r32) _BFGET_(r32, 0, 0) + #define SET32avioGbl_ACLK3_CTRL_clkSwitch(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16avioGbl_ACLK3_CTRL_clkSwitch(r16) _BFGET_(r16, 0, 0) + #define SET16avioGbl_ACLK3_CTRL_clkSwitch(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32avioGbl_ACLK3_CTRL_clkD3Switch(r32) _BFGET_(r32, 1, 1) + #define SET32avioGbl_ACLK3_CTRL_clkD3Switch(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16avioGbl_ACLK3_CTRL_clkD3Switch(r16) _BFGET_(r16, 1, 1) + #define SET16avioGbl_ACLK3_CTRL_clkD3Switch(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32avioGbl_ACLK3_CTRL_clkSel(r32) _BFGET_(r32, 4, 2) + #define SET32avioGbl_ACLK3_CTRL_clkSel(r32,v) _BFSET_(r32, 4, 2,v) + #define GET16avioGbl_ACLK3_CTRL_clkSel(r16) _BFGET_(r16, 4, 2) + #define SET16avioGbl_ACLK3_CTRL_clkSel(r16,v) _BFSET_(r16, 4, 2,v) + + #define w32avioGbl_ACLK3_CTRL {\ + UNSG32 uACLK3_CTRL_clkSwitch : 1;\ + UNSG32 uACLK3_CTRL_clkD3Switch : 1;\ + UNSG32 uACLK3_CTRL_clkSel : 3;\ + UNSG32 RSVDxC4_b5 : 27;\ + } + union { UNSG32 u32avioGbl_ACLK3_CTRL; + struct w32avioGbl_ACLK3_CTRL; + }; + /////////////////////////////////////////////////////////// + #define GET32avioGbl_ACLK4_CTRL_clkSwitch(r32) _BFGET_(r32, 0, 0) + #define SET32avioGbl_ACLK4_CTRL_clkSwitch(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16avioGbl_ACLK4_CTRL_clkSwitch(r16) _BFGET_(r16, 0, 0) + #define SET16avioGbl_ACLK4_CTRL_clkSwitch(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32avioGbl_ACLK4_CTRL_clkD3Switch(r32) _BFGET_(r32, 1, 1) + #define SET32avioGbl_ACLK4_CTRL_clkD3Switch(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16avioGbl_ACLK4_CTRL_clkD3Switch(r16) _BFGET_(r16, 1, 1) + #define SET16avioGbl_ACLK4_CTRL_clkD3Switch(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32avioGbl_ACLK4_CTRL_clkSel(r32) _BFGET_(r32, 4, 2) + #define SET32avioGbl_ACLK4_CTRL_clkSel(r32,v) _BFSET_(r32, 4, 2,v) + #define GET16avioGbl_ACLK4_CTRL_clkSel(r16) _BFGET_(r16, 4, 2) + #define SET16avioGbl_ACLK4_CTRL_clkSel(r16,v) _BFSET_(r16, 4, 2,v) + + #define w32avioGbl_ACLK4_CTRL {\ + UNSG32 uACLK4_CTRL_clkSwitch : 1;\ + UNSG32 uACLK4_CTRL_clkD3Switch : 1;\ + UNSG32 uACLK4_CTRL_clkSel : 3;\ + UNSG32 RSVDxC8_b5 : 27;\ + } + union { UNSG32 u32avioGbl_ACLK4_CTRL; + struct w32avioGbl_ACLK4_CTRL; + }; + /////////////////////////////////////////////////////////// + #define GET32avioGbl_SWRST_CTRL_audio0SyncRstn(r32) _BFGET_(r32, 0, 0) + #define SET32avioGbl_SWRST_CTRL_audio0SyncRstn(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16avioGbl_SWRST_CTRL_audio0SyncRstn(r16) _BFGET_(r16, 0, 0) + #define SET16avioGbl_SWRST_CTRL_audio0SyncRstn(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32avioGbl_SWRST_CTRL_audio1SyncRstn(r32) _BFGET_(r32, 1, 1) + #define SET32avioGbl_SWRST_CTRL_audio1SyncRstn(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16avioGbl_SWRST_CTRL_audio1SyncRstn(r16) _BFGET_(r16, 1, 1) + #define SET16avioGbl_SWRST_CTRL_audio1SyncRstn(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32avioGbl_SWRST_CTRL_audio2SyncRstn(r32) _BFGET_(r32, 2, 2) + #define SET32avioGbl_SWRST_CTRL_audio2SyncRstn(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16avioGbl_SWRST_CTRL_audio2SyncRstn(r16) _BFGET_(r16, 2, 2) + #define SET16avioGbl_SWRST_CTRL_audio2SyncRstn(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32avioGbl_SWRST_CTRL_audio3SyncRstn(r32) _BFGET_(r32, 3, 3) + #define SET32avioGbl_SWRST_CTRL_audio3SyncRstn(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16avioGbl_SWRST_CTRL_audio3SyncRstn(r16) _BFGET_(r16, 3, 3) + #define SET16avioGbl_SWRST_CTRL_audio3SyncRstn(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32avioGbl_SWRST_CTRL_audio4SyncRstn(r32) _BFGET_(r32, 4, 4) + #define SET32avioGbl_SWRST_CTRL_audio4SyncRstn(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16avioGbl_SWRST_CTRL_audio4SyncRstn(r16) _BFGET_(r16, 4, 4) + #define SET16avioGbl_SWRST_CTRL_audio4SyncRstn(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32avioGbl_SWRST_CTRL_audioHdSyncRstn(r32) _BFGET_(r32, 5, 5) + #define SET32avioGbl_SWRST_CTRL_audioHdSyncRstn(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16avioGbl_SWRST_CTRL_audioHdSyncRstn(r16) _BFGET_(r16, 5, 5) + #define SET16avioGbl_SWRST_CTRL_audioHdSyncRstn(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32avioGbl_SWRST_CTRL_spdifRxSyncRstn(r32) _BFGET_(r32, 6, 6) + #define SET32avioGbl_SWRST_CTRL_spdifRxSyncRstn(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16avioGbl_SWRST_CTRL_spdifRxSyncRstn(r16) _BFGET_(r16, 6, 6) + #define SET16avioGbl_SWRST_CTRL_spdifRxSyncRstn(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32avioGbl_SWRST_CTRL_vppSyncRstn(r32) _BFGET_(r32, 7, 7) + #define SET32avioGbl_SWRST_CTRL_vppSyncRstn(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16avioGbl_SWRST_CTRL_vppSyncRstn(r16) _BFGET_(r16, 7, 7) + #define SET16avioGbl_SWRST_CTRL_vppSyncRstn(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32avioGbl_SWRST_CTRL_vipSyncRstn(r32) _BFGET_(r32, 8, 8) + #define SET32avioGbl_SWRST_CTRL_vipSyncRstn(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16avioGbl_SWRST_CTRL_vipSyncRstn(r16) _BFGET_(r16, 8, 8) + #define SET16avioGbl_SWRST_CTRL_vipSyncRstn(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32avioGbl_SWRST_CTRL_appSyncRstn(r32) _BFGET_(r32, 9, 9) + #define SET32avioGbl_SWRST_CTRL_appSyncRstn(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16avioGbl_SWRST_CTRL_appSyncRstn(r16) _BFGET_(r16, 9, 9) + #define SET16avioGbl_SWRST_CTRL_appSyncRstn(r16,v) _BFSET_(r16, 9, 9,v) + + #define w32avioGbl_SWRST_CTRL {\ + UNSG32 uSWRST_CTRL_audio0SyncRstn : 1;\ + UNSG32 uSWRST_CTRL_audio1SyncRstn : 1;\ + UNSG32 uSWRST_CTRL_audio2SyncRstn : 1;\ + UNSG32 uSWRST_CTRL_audio3SyncRstn : 1;\ + UNSG32 uSWRST_CTRL_audio4SyncRstn : 1;\ + UNSG32 uSWRST_CTRL_audioHdSyncRstn : 1;\ + UNSG32 uSWRST_CTRL_spdifRxSyncRstn : 1;\ + UNSG32 uSWRST_CTRL_vppSyncRstn : 1;\ + UNSG32 uSWRST_CTRL_vipSyncRstn : 1;\ + UNSG32 uSWRST_CTRL_appSyncRstn : 1;\ + UNSG32 RSVDxCC_b10 : 22;\ + } + union { UNSG32 u32avioGbl_SWRST_CTRL; + struct w32avioGbl_SWRST_CTRL; + }; + /////////////////////////////////////////////////////////// + #define GET32avioGbl_RWTC_31to0_value(r32) _BFGET_(r32,31, 0) + #define SET32avioGbl_RWTC_31to0_value(r32,v) _BFSET_(r32,31, 0,v) + + #define w32avioGbl_RWTC_31to0 {\ + UNSG32 uRWTC_31to0_value : 32;\ + } + union { UNSG32 u32avioGbl_RWTC_31to0; + struct w32avioGbl_RWTC_31to0; + }; + /////////////////////////////////////////////////////////// + #define GET32avioGbl_RWTC_57to32_value(r32) _BFGET_(r32,25, 0) + #define SET32avioGbl_RWTC_57to32_value(r32,v) _BFSET_(r32,25, 0,v) + + #define w32avioGbl_RWTC_57to32 {\ + UNSG32 uRWTC_57to32_value : 26;\ + UNSG32 RSVDxD4_b26 : 6;\ + } + union { UNSG32 u32avioGbl_RWTC_57to32; + struct w32avioGbl_RWTC_57to32; + }; + /////////////////////////////////////////////////////////// + } SIE_avioGbl; + + typedef union T32avioGbl_AVPLLA_CLK_EN + { UNSG32 u32; + struct w32avioGbl_AVPLLA_CLK_EN; + } T32avioGbl_AVPLLA_CLK_EN; + typedef union T32avioGbl_VCLK0_CTRL + { UNSG32 u32; + struct w32avioGbl_VCLK0_CTRL; + } T32avioGbl_VCLK0_CTRL; + typedef union T32avioGbl_VCLK1_CTRL + { UNSG32 u32; + struct w32avioGbl_VCLK1_CTRL; + } T32avioGbl_VCLK1_CTRL; + typedef union T32avioGbl_VCLK2_CTRL + { UNSG32 u32; + struct w32avioGbl_VCLK2_CTRL; + } T32avioGbl_VCLK2_CTRL; + typedef union T32avioGbl_ACLK0_CTRL + { UNSG32 u32; + struct w32avioGbl_ACLK0_CTRL; + } T32avioGbl_ACLK0_CTRL; + typedef union T32avioGbl_ACLK1_CTRL + { UNSG32 u32; + struct w32avioGbl_ACLK1_CTRL; + } T32avioGbl_ACLK1_CTRL; + typedef union T32avioGbl_ACLK2_CTRL + { UNSG32 u32; + struct w32avioGbl_ACLK2_CTRL; + } T32avioGbl_ACLK2_CTRL; + typedef union T32avioGbl_ACLK3_CTRL + { UNSG32 u32; + struct w32avioGbl_ACLK3_CTRL; + } T32avioGbl_ACLK3_CTRL; + typedef union T32avioGbl_ACLK4_CTRL + { UNSG32 u32; + struct w32avioGbl_ACLK4_CTRL; + } T32avioGbl_ACLK4_CTRL; + typedef union T32avioGbl_SWRST_CTRL + { UNSG32 u32; + struct w32avioGbl_SWRST_CTRL; + } T32avioGbl_SWRST_CTRL; + typedef union T32avioGbl_RWTC_31to0 + { UNSG32 u32; + struct w32avioGbl_RWTC_31to0; + } T32avioGbl_RWTC_31to0; + typedef union T32avioGbl_RWTC_57to32 + { UNSG32 u32; + struct w32avioGbl_RWTC_57to32; + } T32avioGbl_RWTC_57to32; + /////////////////////////////////////////////////////////// + + typedef union TavioGbl_AVPLLA_CLK_EN + { UNSG32 u32[1]; + struct { + struct w32avioGbl_AVPLLA_CLK_EN; + }; + } TavioGbl_AVPLLA_CLK_EN; + typedef union TavioGbl_VCLK0_CTRL + { UNSG32 u32[1]; + struct { + struct w32avioGbl_VCLK0_CTRL; + }; + } TavioGbl_VCLK0_CTRL; + typedef union TavioGbl_VCLK1_CTRL + { UNSG32 u32[1]; + struct { + struct w32avioGbl_VCLK1_CTRL; + }; + } TavioGbl_VCLK1_CTRL; + typedef union TavioGbl_VCLK2_CTRL + { UNSG32 u32[1]; + struct { + struct w32avioGbl_VCLK2_CTRL; + }; + } TavioGbl_VCLK2_CTRL; + typedef union TavioGbl_ACLK0_CTRL + { UNSG32 u32[1]; + struct { + struct w32avioGbl_ACLK0_CTRL; + }; + } TavioGbl_ACLK0_CTRL; + typedef union TavioGbl_ACLK1_CTRL + { UNSG32 u32[1]; + struct { + struct w32avioGbl_ACLK1_CTRL; + }; + } TavioGbl_ACLK1_CTRL; + typedef union TavioGbl_ACLK2_CTRL + { UNSG32 u32[1]; + struct { + struct w32avioGbl_ACLK2_CTRL; + }; + } TavioGbl_ACLK2_CTRL; + typedef union TavioGbl_ACLK3_CTRL + { UNSG32 u32[1]; + struct { + struct w32avioGbl_ACLK3_CTRL; + }; + } TavioGbl_ACLK3_CTRL; + typedef union TavioGbl_ACLK4_CTRL + { UNSG32 u32[1]; + struct { + struct w32avioGbl_ACLK4_CTRL; + }; + } TavioGbl_ACLK4_CTRL; + typedef union TavioGbl_SWRST_CTRL + { UNSG32 u32[1]; + struct { + struct w32avioGbl_SWRST_CTRL; + }; + } TavioGbl_SWRST_CTRL; + typedef union TavioGbl_RWTC_31to0 + { UNSG32 u32[1]; + struct { + struct w32avioGbl_RWTC_31to0; + }; + } TavioGbl_RWTC_31to0; + typedef union TavioGbl_RWTC_57to32 + { UNSG32 u32[1]; + struct { + struct w32avioGbl_RWTC_57to32; + }; + } TavioGbl_RWTC_57to32; + + /////////////////////////////////////////////////////////// + SIGN32 avioGbl_drvrd(SIE_avioGbl *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 avioGbl_drvwr(SIE_avioGbl *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void avioGbl_reset(SIE_avioGbl *p); + SIGN32 avioGbl_cmp (SIE_avioGbl *p, SIE_avioGbl *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define avioGbl_check(p,pie,pfx,hLOG) avioGbl_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define avioGbl_print(p, pfx,hLOG) avioGbl_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: avioGbl +//////////////////////////////////////////////////////////// + + + +#ifdef __cplusplus + } +#endif +#pragma pack() + +#endif +////// +/// ENDOFFILE: avioGbl.h +//////////////////////////////////////////////////////////// + diff --git a/sound/soc/berlin/avio_dhub_drv.c b/sound/soc/berlin/avio_dhub_drv.c new file mode 100644 index 00000000..96b729c9 --- /dev/null +++ b/sound/soc/berlin/avio_dhub_drv.c @@ -0,0 +1,147 @@ +/************************************************************************************ +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +*************************************************************************************/ +#include "api_avio_dhub.h" + +HDL_dhub2d AG_dhubHandle; + +DHUB_channel_config AG_config[AG_NUM_OF_CHANNELS_A0] = { +#if 1 + // Bank0 + { avioDhubChMap_ag_MA0_R_A0, AG_DHUB_BANK0_START_ADDR, AG_DHUB_BANK0_START_ADDR+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA1_R_A0, AG_DHUB_BANK0_START_ADDR+512,AG_DHUB_BANK0_START_ADDR+512+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA2_R_A0, AG_DHUB_BANK0_START_ADDR+512*2,AG_DHUB_BANK0_START_ADDR+512*2+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MA3_R_A0, AG_DHUB_BANK0_START_ADDR+512*3,AG_DHUB_BANK0_START_ADDR+512*3+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_SA0_R_A0, AG_DHUB_BANK0_START_ADDR+512*4,AG_DHUB_BANK0_START_ADDR+512*4+32, 32, (1024-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MIC0_W_A0, AG_DHUB_BANK0_START_ADDR+1024*3, AG_DHUB_BANK0_START_ADDR+1024*3+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + { avioDhubChMap_ag_MIC1_W_A0, AG_DHUB_BANK0_START_ADDR+512+1024*3, AG_DHUB_BANK0_START_ADDR+512+1024*3+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, + // Bank1 + { avioDhubChMap_ag_CSR_R_A0, AG_DHUB_BANK1_START_ADDR, AG_DHUB_BANK1_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, + // Bank2 + { avioDhubChMap_ag_GFX_R_A0, AG_DHUB_BANK2_START_ADDR, AG_DHUB_BANK2_START_ADDR+32, 32, (8192-32), dHubChannel_CFG_MTU_128byte, 1, 0, 1}, +#else + // Bank0 + { avioDhubChMap_ag_SA0_R_A0, AG_DHUB_BANK0_START_ADDR, AG_DHUB_BANK0_START_ADDR+32, 32, (512-32), dHubChannel_CFG_MTU_128byte, 0, 0, 1}, +#endif +}; + + +/************************************************************** + * Function: DhubInitialization + * Description: Initialize DHUB . + * Parameter : cpuId ----- cpu ID + * dHubBaseAddr ----- dHub Base address. + * hboSramAddr ----- Sram Address for HBO. + * pdhubHandle ----- pointer to 2D dhubHandle + * dhub_config ----- configuration of AG + * numOfChans ----- number of channels + * Return: void +**************************************************************/ +void DhubInitialization(SIGN32 cpuId, UNSG32 dHubBaseAddr, + UNSG32 hboSramAddr, HDL_dhub2d *pdhubHandle, + DHUB_channel_config *dhub_config, + SIGN32 numOfChans) +{ + HDL_semaphore *pSemHandle; + SIGN32 i; + SIGN32 chanId; + + //Initialize HDL_dhub with a $dHub BIU instance. + dhub2d_hdl(hboSramAddr, /*! Base address of dHub.HBO SRAM !*/ + dHubBaseAddr, /*! Base address of a BIU instance of $dHub !*/ + pdhubHandle /*! Handle to HDL_dhub2d !*/ + ); + //set up semaphore to trigger cmd done interrupt + //note that this set of semaphores are different from the HBO semaphores + //the ID must match the dhub ID because they are hardwired. + pSemHandle = dhub_semaphore(&pdhubHandle->dhub); + + for (i = 0; i< numOfChans; i++) { + //Configurate a dHub channel + //note that in this function, it also configured right HBO channels(cmdQ and dataQ) and semaphores + chanId = dhub_config[i].chanId; + { + dhub_channel_cfg( + &pdhubHandle->dhub, /*! Handle to HDL_dhub !*/ + chanId, /*! Channel ID in $dHubReg !*/ + dhub_config[chanId].chanCmdBase, //UNSG32 baseCmd, /*! Channel FIFO base address (byte address) for cmdQ !*/ + dhub_config[chanId].chanDataBase, //UNSG32 baseData, /*! Channel FIFO base address (byte address) for dataQ !*/ + dhub_config[chanId].chanCmdSize/8, //SIGN32 depthCmd, /*! Channel FIFO depth for cmdQ, in 64b word !*/ + dhub_config[chanId].chanDataSize/8, //SIGN32 depthData, /*! Channel FIFO depth for dataQ, in 64b word !*/ + dhub_config[chanId].chanMtuSize, /*! See 'dHubChannel.CFG.MTU', 0/1/2 for 8/32/128 bytes !*/ + dhub_config[chanId].chanQos, /*! See 'dHubChannel.CFG.QoS' !*/ + dhub_config[chanId].chanSelfLoop, /*! See 'dHubChannel.CFG.selfLoop' !*/ + dhub_config[chanId].chanEnable, /*! 0 to disable, 1 to enable !*/ + 0 /*! Pass NULL to directly init dHub, or + Pass non-zero to receive programming sequence + in (adr,data) pairs + !*/ + ); +#if 0 + // setup interrupt for channel chanId + // configure the semaphore depth to be 1 + semaphore_cfg(pSemHandle, chanId, 1, 0); + + // enable interrupt from this semaphore + semaphore_intr_enable ( + pSemHandle, // semaphore handler + chanId, + 0, // empty + 1, // full + 0, // almost_empty + 0, // almost_full + cpuId // 0~2, depending on which CPU the interrupt is enabled for. + ); +#endif + } + } +} + +/************************************************************ + * Function: DhubEnableIntr + * Description: Initialize interrupt for DHUB channel. + * Parameter : + * cpuId ----- cpu ID + * pdhubHandle ----- pointer to 2D dhubHandle + * chanId ----- channel ID + * enable ----- 1=enable;0=disable + * Return: void +************************************************************/ +void DhubEnableIntr(SIGN32 cpuId, HDL_dhub2d *pdhubHandle, + SIGN32 chanId, SIGN32 enable) +{ + HDL_semaphore *pSemHandle; + + pSemHandle = dhub_semaphore(&pdhubHandle->dhub); + + // setup interrupt for channel chanId + // configure the semaphore depth to be 1 + semaphore_cfg(pSemHandle, chanId, 1, 0); + + // enable interrupt from this semaphore + semaphore_intr_enable ( + pSemHandle, // semaphore handler + chanId, + 0, // empty + enable ? 1:0, // full + 0, // almost_empty + 0, // almost_full + cpuId // 0~2, depending on which CPU the interrupt is enabled for. + ); +} diff --git a/sound/soc/berlin/avpll.c b/sound/soc/berlin/avpll.c new file mode 100644 index 00000000..dea11a98 --- /dev/null +++ b/sound/soc/berlin/avpll.c @@ -0,0 +1,613 @@ +/************************************************************************************* +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +***************************************************************************************/ + +#include +#include + +#include "berlin_memmap.h" +#include "api_avpll.h" +#include "avioGbl.h" + +#define AVPLL_A (MEMMAP_AVIO_GBL_BASE + RA_avioGbl_AVPLLA) +#define PHY_HOST_Bus_Read32(addr_var, u32) *((volatile unsigned*)&(u32)) = *((volatile unsigned*)&(addr_var)) +#define PHY_HOST_Bus_Write32(addr_var, u32) *((volatile unsigned*)&(addr_var)) = (u32) +#define GA_REG_WORD32_READ(addr, holder) (*(holder) = (*((volatile unsigned int *)(addr)))) +#define GA_REG_WORD32_WRITE(addr, data) ((*((volatile unsigned int *)(addr))) = ((unsigned int)(data))) + +enum +{ + VCO_FREQ_1_512G=0, + VCO_FREQ_1_620G, + VCO_FREQ_1_856G, + VCO_FREQ_2_160G, + VCO_FREQ_2_227G, + VCO_FREQ_2_520G, + VCO_FREQ_2_700G, + VCO_FREQ_2_970G, +}; + +typedef struct +{ + int vco_freq_index; + float clkout_freq; //in MHz + int freq_offset; //signed number + unsigned int p_sync2; + unsigned int p_sync1; + unsigned int post_div; + unsigned int post_div_0p5; + unsigned int invalid; //this indicate it is a valid setting or not: 0 is valid, 1 is not +} CLK_FREQ; + +//all the VCO freq reqired for video and audio in MHz +double berlin_vcoFreqs[]= +{ + 1512, //8 bit HDMI and 12 bit HMDI + 1620, //12 bit HDMI + 1856.25,//10 bit HDMI + 2160, //8 bit HDMI + 2227.5, //12 bit HDMI + 2520, //10 bit HDMI + 2700, //10 bit HDMI + 2970, //8 bit HDMI +}; + +//from Section 7 table +unsigned char berlin_avpllRegFBDIV[]= +{ + 60, //VCO_FREQ_1_512G, + 65, //VCO_FREQ_1_620G, + 74, //VCO_FREQ_1_856G, + 86, //VCO_FREQ_2_160G, + 89, //VCO_FREQ_2_227G, + 101, //VCO_FREQ_2_520G, + 108, //VCO_FREQ_2_700G, + 119, //VCO_FREQ_2_970G, +}; + +//from Section 7 table, bit18 is sign bit +//Note that sign bit=0 for negative +//sign bit=1 for positive +unsigned int berlin_avpllRegFREQ_OFFSET_C8[]= +{ + (33554), //VCO_FREQ_1_512G, + ((1<<18)|(12905)),//VCO_FREQ_1_620G, + (14169), //VCO_FREQ_1_856G, + (19508), //VCO_FREQ_2_160G, + (4712), //VCO_FREQ_2_227G + ((1<<18)|(8305)),//VCO_FREQ_2_520G, + (00000), //VCO_FREQ_2_700G, + ((1<<18)|(7049)),//VCO_FREQ_2_970G, +}; + +unsigned int berlin_avpllRegSPEED[]= +{ + 0x2, //1.5G= end) + diff = start - end; + else + diff = 1000*1000 + start - end; + } while(diff < ns/10); +} + +int berlin_gcd(unsigned int m, unsigned int n) +{ + int rem; + while(n!=0) { + rem=m%n; + m=n; + n=rem; + } + + return(m); +} + +int berlin_compute_freq_setting(unsigned int vco_freq_index, unsigned int target_freq) +{ + double offset, offset_percent; + double divider; + double ratio; + int int_divider; + + memset(&(clk_freqs_computed[vco_freq_index]), 0, sizeof(CLK_FREQ)); + + clk_freqs_computed[vco_freq_index].vco_freq_index=vco_freq_index; + clk_freqs_computed[vco_freq_index].clkout_freq=(float)target_freq/1000000; + + //.5 divider is only used when divider is less than 24 + //This matches the settings in audio freq table in the IP doc + ratio = berlin_vcoFreqs[vco_freq_index]*1000000/target_freq; + + if(ratio < 24) { + //allow 0.5 divider, round to closest 0.5 + int_divider = (int)(ratio*2+0.5); + } else { + //round to closest int + int_divider = ((int)(ratio+0.5))*2; + } + + divider = ((double)int_divider)/2; + + clk_freqs_computed[vco_freq_index].post_div_0p5= (int_divider&1); + clk_freqs_computed[vco_freq_index].post_div=((int)(divider)); + + //now figure out the offset + offset_percent = (target_freq*divider/1000000 - berlin_vcoFreqs[vco_freq_index])/berlin_vcoFreqs[vco_freq_index]; + + offset = 4194304*offset_percent/(1+offset_percent); + + if(offset<=-262144 || offset>= 262144) { + //offset cannot be achieved + clk_freqs_computed[vco_freq_index].invalid = 1; + return 1; + } else { + unsigned int vco_ratio, freq_ratio, gcd_val; + + //for rounding + if(offset>0) offset+=0.5; + else offset-=0.5; + + clk_freqs_computed[vco_freq_index].freq_offset = (int)(offset); + gcd_val= berlin_gcd(berlin_vcoFreqs[vco_freq_index]*1000000, target_freq*divider); + vco_ratio = (int)(berlin_vcoFreqs[vco_freq_index]*1000000/gcd_val); + freq_ratio = (int)(target_freq*divider/gcd_val); + + if((gcd_val/1000)<1000) { + clk_freqs_computed[vco_freq_index].p_sync2=freq_ratio; + clk_freqs_computed[vco_freq_index].p_sync1=vco_ratio; + } else { + clk_freqs_computed[vco_freq_index].p_sync2=freq_ratio*((int)(gcd_val/1000000+0.5)); + clk_freqs_computed[vco_freq_index].p_sync1=vco_ratio*((int)(gcd_val/1000000+0.5)); + } + } + + return 0; +} + +static void berlin_powerDownChannel(SIE_avPll *avPllBase, int chId) +{ + PHY_HOST_Bus_Read32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl1, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl1); + ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].uctrl_PU = 0; + PHY_HOST_Bus_Write32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl1, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl1); +} + +static void berlin_powerUpChannel(SIE_avPll *avPllBase, int chId) +{ + PHY_HOST_Bus_Read32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl1, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl1); + ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].uctrl_PU = 1; + PHY_HOST_Bus_Write32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl1, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl1); +} + +void berlin_powerDown(SIE_avPll *avPllBase) +{ + int chId; + + //avPllBase->uctrlPLL_PU = 0; + PHY_HOST_Bus_Read32(avPllBase->u32avPll_ctrlPLL, regSIE_avPll.u32avPll_ctrlPLL); + regSIE_avPll.uctrlPLL_PU = 0; + PHY_HOST_Bus_Write32(avPllBase->u32avPll_ctrlPLL, regSIE_avPll.u32avPll_ctrlPLL); + + for(chId=1; chId<=7; chId++) { + berlin_powerDownChannel(avPllBase, chId); + } + + //avPllBase->ie_C8.uctrl_PU = 0; + PHY_HOST_Bus_Read32((avPllBase->ie_C8).u32avpllCh8_ctrl1, (regSIE_avPll.ie_C8).u32avpllCh8_ctrl1); + (regSIE_avPll.ie_C8).uctrl_PU = 0; + PHY_HOST_Bus_Write32((avPllBase->ie_C8).u32avpllCh8_ctrl1, (regSIE_avPll.ie_C8).u32avpllCh8_ctrl1); +} + +void berlin_powerUp(SIE_avPll *avPllBase) +{ + int chId; + + for(chId=1; chId<=7; chId++) { + berlin_powerUpChannel(avPllBase, chId); + } + + //avPllBase->ie_C8.uctrl_PU = 1; + PHY_HOST_Bus_Read32((avPllBase->ie_C8).u32avpllCh8_ctrl1, (regSIE_avPll.ie_C8).u32avpllCh8_ctrl1); + (regSIE_avPll.ie_C8).uctrl_PU = 1; + PHY_HOST_Bus_Write32((avPllBase->ie_C8).u32avpllCh8_ctrl1, (regSIE_avPll.ie_C8).u32avpllCh8_ctrl1); + + //avPllBase->uctrlPLL_PU = 1; + PHY_HOST_Bus_Read32(avPllBase->u32avPll_ctrlPLL, regSIE_avPll.u32avPll_ctrlPLL); + regSIE_avPll.uctrlPLL_PU = 1; + PHY_HOST_Bus_Write32(avPllBase->u32avPll_ctrlPLL, regSIE_avPll.u32avPll_ctrlPLL); +} + +void berlin_assertPllReset(SIE_avPll *avPllBase) +{ + //assert reset + //avPllBase->uctrlPLL_RESET=1; + PHY_HOST_Bus_Read32(avPllBase->u32avPll_ctrlPLL, regSIE_avPll.u32avPll_ctrlPLL); + regSIE_avPll.uctrlPLL_RESET = 1; + PHY_HOST_Bus_Write32(avPllBase->u32avPll_ctrlPLL, regSIE_avPll.u32avPll_ctrlPLL); +} + +//assert reset for channel1 to 7 +void berlin_assertCxReset(SIE_avPll *avPllBase) +{ + int chId; + + for(chId=1; chId<=7; chId++) { + //((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].uctrl_RESET = 1; + PHY_HOST_Bus_Read32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl3, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl3); + ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].uctrl_RESET = 1; + PHY_HOST_Bus_Write32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl3, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl3); + } +} + +void berlin_setVDDL_VCOref(SIE_avPll *avPllBase) +{ + //T32avPll_ctrlPLL ctrlPLL; + //ctrlPLL.u32 = avPllBase->u32avPll_ctrlPLL; + PHY_HOST_Bus_Read32(avPllBase->u32avPll_ctrlPLL, regSIE_avPll.u32avPll_ctrlPLL); + + //ctrlPLL.uctrlPLL_VCO_REF1P45_SEL = 0x3; + //ctrlPLL.uctrlPLL_VDDL = 0xF;// set VDDL to 1.16v + regSIE_avPll.uctrlPLL_VCO_REF1P45_SEL = 0x3; + regSIE_avPll.uctrlPLL_VDDL = 0xF;// set VDDL to 1.16v + + //* (volatile unsigned int *)(&(avPllBase->u32avPll_ctrlPLL)) = ctrlPLL.u32; + PHY_HOST_Bus_Write32(avPllBase->u32avPll_ctrlPLL, regSIE_avPll.u32avPll_ctrlPLL); +} + +void berlin_deassertPllReset(SIE_avPll *avPllBase) +{ + volatile int i; + + for(i=0; i<10000*10; i++); + + //deassert reset + //avPllBase->uctrlPLL_RESET=0; + PHY_HOST_Bus_Read32(avPllBase->u32avPll_ctrlPLL, regSIE_avPll.u32avPll_ctrlPLL); + regSIE_avPll.uctrlPLL_RESET = 0; + PHY_HOST_Bus_Write32(avPllBase->u32avPll_ctrlPLL, regSIE_avPll.u32avPll_ctrlPLL); +} + +//assert reset for channel1 to 7 +void berlin_deassertCxReset(SIE_avPll *avPllBase) +{ + int chId; + + for(chId=1; chId<=7; chId++) { + //((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].uctrl_RESET = 0; + PHY_HOST_Bus_Read32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl3, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl3); + ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].uctrl_RESET = 0; + PHY_HOST_Bus_Write32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl3, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl3); + } +} + +void berlin_calibrate(SIE_avPll *avPllBase, double fvco) +{ + volatile int i=100000; + //MV_TimeSpec_t Time_Start, Time_End; + + //set the speed_thresh for current Fvco + //avPllBase->uctrlCAL_SPEED_THRESH = (int)(fvco/100+0.5); + PHY_HOST_Bus_Read32(avPllBase->u32avPll_ctrlCAL, regSIE_avPll.u32avPll_ctrlCAL); + regSIE_avPll.uctrlCAL_SPEED_THRESH = (int)(fvco/100+0.5); + PHY_HOST_Bus_Write32(avPllBase->u32avPll_ctrlCAL, regSIE_avPll.u32avPll_ctrlCAL); + + //assert PLL resebratet + //avPllBase->uctrlPLL_RESET=1; + PHY_HOST_Bus_Read32(avPllBase->u32avPll_ctrlPLL, regSIE_avPll.u32avPll_ctrlPLL); + regSIE_avPll.uctrlPLL_RESET = 1; + PHY_HOST_Bus_Write32(avPllBase->u32avPll_ctrlPLL, regSIE_avPll.u32avPll_ctrlPLL); + + cpu_cycle_count_delay(20000); + + //MV_Time_GetSysTime(&Time_Start); + //avPllBase->uctrlPLL_RESET=0; + PHY_HOST_Bus_Read32(avPllBase->u32avPll_ctrlPLL, regSIE_avPll.u32avPll_ctrlPLL); + regSIE_avPll.uctrlPLL_RESET = 0; + PHY_HOST_Bus_Write32(avPllBase->u32avPll_ctrlPLL, regSIE_avPll.u32avPll_ctrlPLL); + + //>20us and <50us must start calibration + cpu_cycle_count_delay(35000); + + //avPllBase->uctrlCAL_PLL_CAL_START = 1; + PHY_HOST_Bus_Read32(avPllBase->u32avPll_ctrlCAL, regSIE_avPll.u32avPll_ctrlCAL); + regSIE_avPll.uctrlCAL_PLL_CAL_START = 1; + PHY_HOST_Bus_Write32(avPllBase->u32avPll_ctrlCAL, regSIE_avPll.u32avPll_ctrlCAL); + + //poll PLL CAL done bit + //while(!avPllBase->ustatus_PLL_CAL_DONE) + while(1) { + PHY_HOST_Bus_Read32(avPllBase->u32avPll_status, regSIE_avPll.u32avPll_status); + if(regSIE_avPll.ustatus_PLL_CAL_DONE) + break; + + if(--i<0) { + break; + } + } + + cpu_cycle_count_delay(20000); + + //avPllBase->uctrlCAL_PLL_CAL_START = 0; + PHY_HOST_Bus_Read32(avPllBase->u32avPll_ctrlCAL, regSIE_avPll.u32avPll_ctrlCAL); + regSIE_avPll.uctrlCAL_PLL_CAL_START = 0; + PHY_HOST_Bus_Write32(avPllBase->u32avPll_ctrlCAL, regSIE_avPll.u32avPll_ctrlCAL); +} + +void berlin_setVCO(SIE_avPll *avPllBase, int vco_freq_index) +{ + //first power done PLL and Channels + berlin_powerDown(avPllBase); + + //assert resets + berlin_assertPllReset(avPllBase); + berlin_assertCxReset(avPllBase); + + //change VDDL and VCO_ref to meet duty cycle + berlin_setVDDL_VCOref(avPllBase); + + //power up PLL and channels + berlin_powerUp(avPllBase); + + // @yeliu: power down these channels by hardcoded, only for bg2cdp + berlin_powerDownChannel(avPllBase, 5); + berlin_powerDownChannel(avPllBase, 6); + + //following settings are done under reset to improve long term reliability + //avPllBase->uctrlPLL_FBDIV = berlin_avpllRegFBDIV[vco_freq_index]; + PHY_HOST_Bus_Read32(avPllBase->u32avPll_ctrlPLL, regSIE_avPll.u32avPll_ctrlPLL); + regSIE_avPll.uctrlPLL_FBDIV = berlin_avpllRegFBDIV[vco_freq_index]; + PHY_HOST_Bus_Write32(avPllBase->u32avPll_ctrlPLL, regSIE_avPll.u32avPll_ctrlPLL); + + //avPllBase->uctrlINTP_INTPI = berlin_avpllRegINTPI[vco_freq_index]; + PHY_HOST_Bus_Read32(avPllBase->u32avPll_ctrlINTP, regSIE_avPll.u32avPll_ctrlINTP); + regSIE_avPll.uctrlINTP_INTPI = berlin_avpllRegINTPI[vco_freq_index]; + PHY_HOST_Bus_Write32(avPllBase->u32avPll_ctrlINTP, regSIE_avPll.u32avPll_ctrlINTP); + + //avPllBase->uctrlINTP_INTPR = berlin_avpllRegINTPR[vco_freq_index]; + PHY_HOST_Bus_Read32(avPllBase->u32avPll_ctrlINTP, regSIE_avPll.u32avPll_ctrlINTP); + regSIE_avPll.uctrlINTP_INTPR = berlin_avpllRegINTPR[vco_freq_index]; + PHY_HOST_Bus_Write32(avPllBase->u32avPll_ctrlINTP, regSIE_avPll.u32avPll_ctrlINTP); + + //avPllBase->uctrlPLL_EXT_SPEED = berlin_avpllRegSPEED[vco_freq_index]; + PHY_HOST_Bus_Read32(avPllBase->u32avPll_ctrlPLL1, regSIE_avPll.u32avPll_ctrlPLL1); + regSIE_avPll.uctrlPLL_EXT_SPEED = berlin_avpllRegSPEED[vco_freq_index]; + PHY_HOST_Bus_Write32(avPllBase->u32avPll_ctrlPLL1, regSIE_avPll.u32avPll_ctrlPLL1); + + //(avPllBase->ie_C8).uctrl_FREQ_OFFSET = berlin_avpllRegFREQ_OFFSET_C8[vco_freq_index]; + PHY_HOST_Bus_Read32((avPllBase->ie_C8).u32avpllCh8_ctrl1, (regSIE_avPll.ie_C8).u32avpllCh8_ctrl1); + (regSIE_avPll.ie_C8).uctrl_FREQ_OFFSET = berlin_avpllRegFREQ_OFFSET_C8[vco_freq_index]; + PHY_HOST_Bus_Write32((avPllBase->ie_C8).u32avpllCh8_ctrl1, (regSIE_avPll.ie_C8).u32avpllCh8_ctrl1); + + if(avPllBase == AVPLL_A) + berlin_pll_A_VCO_Setting = vco_freq_index; + else + berlin_pll_B_VCO_Setting = vco_freq_index; + + //deassert resets + berlin_deassertCxReset(avPllBase); + + berlin_deassertPllReset(avPllBase); + + //toggle the offset_rdy bit + //(avPllBase->ie_C8).uctrl_FREQ_OFFSET_READY = 1; + PHY_HOST_Bus_Read32((avPllBase->ie_C8).u32avpllCh8_ctrl1, (regSIE_avPll.ie_C8).u32avpllCh8_ctrl1); + (regSIE_avPll.ie_C8).uctrl_FREQ_OFFSET_READY = 1; + PHY_HOST_Bus_Write32((avPllBase->ie_C8).u32avpllCh8_ctrl1, (regSIE_avPll.ie_C8).u32avpllCh8_ctrl1); + + //add some delay for Fvco=3GHz pulse>172ns, For Fvco=1.5GHz pulse>344ns + cpu_cycle_count_delay(550); + + //(avPllBase->ie_C8).uctrl_FREQ_OFFSET_READY = 0; + PHY_HOST_Bus_Read32((avPllBase->ie_C8).u32avpllCh8_ctrl1, (regSIE_avPll.ie_C8).u32avpllCh8_ctrl1); + (regSIE_avPll.ie_C8).uctrl_FREQ_OFFSET_READY = 0; + PHY_HOST_Bus_Write32((avPllBase->ie_C8).u32avpllCh8_ctrl1, (regSIE_avPll.ie_C8).u32avpllCh8_ctrl1); + + //do calibration + berlin_calibrate(avPllBase, berlin_vcoFreqs[vco_freq_index]); +} + +void berlin_setChanOffset(SIE_avPll *avPllBase, int offset, int chId) +{ + unsigned int reg_offset = 0; + double ppm_from_offset; + + if(offset>0) { + reg_offset = (1<<18) | (offset) ; + } else { + reg_offset = -offset; + } + + //set offset register + //((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].uctrl_FREQ_OFFSET = reg_offset; + PHY_HOST_Bus_Read32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl1, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl1); + ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].uctrl_FREQ_OFFSET = reg_offset; + PHY_HOST_Bus_Write32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl1, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl1); + + //toggle the offset_rdy bit + //((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].uctrl_FREQ_OFFSET_READY = 1; + PHY_HOST_Bus_Read32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl1, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl1); + ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].uctrl_FREQ_OFFSET_READY = 1; + PHY_HOST_Bus_Write32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl1, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl1); + + //add some delay because need to be asserted by 30ns + cpu_cycle_count_delay(200); + + //((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].uctrl_FREQ_OFFSET_READY = 0; + PHY_HOST_Bus_Read32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl1, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl1); + ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].uctrl_FREQ_OFFSET_READY = 0; + PHY_HOST_Bus_Write32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl1, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl1); +} + +void berlin_setDPll(SIE_avPll *avPllBase, int enable, int p_sync1, int p_sync2, int chId) +{ + T32avpllCh_ctrl1 avpll_ch_ctrl1_data; + T32avpllCh_ctrl2 avpll_ch_ctrl2_data; + + double ppm_from_dpll; + + //disable DPll first + //((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].uctrl_EN_DPLL = 0; + PHY_HOST_Bus_Read32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl); + ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].uctrl_EN_DPLL = 0; + PHY_HOST_Bus_Write32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl); + + //((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].uctrl_P_SYNC1 = p_sync1; + PHY_HOST_Bus_Read32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl2, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl2); + ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].uctrl_P_SYNC1 = p_sync1; + PHY_HOST_Bus_Write32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl2, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl2); + + //((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].uctrl_P_SYNC2 = p_sync2; + PHY_HOST_Bus_Read32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl3, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl3); + ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].uctrl_P_SYNC2 = p_sync2; + PHY_HOST_Bus_Write32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl3, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl3); + + if(enable) { + //enable DPLL + //((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].uctrl_EN_DPLL = 1; + PHY_HOST_Bus_Read32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl); + ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].uctrl_EN_DPLL = 1; + PHY_HOST_Bus_Write32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl); + } +} + +void berlin_set_Post_Div(SIE_avPll *avPllBase, int div, int chId) +{ + //((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].uctrl_POSTDIV = div; + PHY_HOST_Bus_Read32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl); + ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].uctrl_POSTDIV = div; + PHY_HOST_Bus_Write32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl); +} + +void berlin_set_Post_0P5_Div(SIE_avPll *avPllBase, int enable, int chId) +{ + //((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].uctrl_POSTDIV_0P5 = enable; + PHY_HOST_Bus_Read32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl); + ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].uctrl_POSTDIV_0P5 = enable; + PHY_HOST_Bus_Write32(((SIE_avpllCh *)(&(avPllBase->ie_C1)))[chId-1].u32avpllCh_ctrl, ((SIE_avpllCh *)&(regSIE_avPll.ie_C1))[chId-1].u32avpllCh_ctrl); +} + +int berlin_clockFreq_computed(SIE_avPll *avPllBase, int freqIndex, int chId) +{ + int berlin_pll_VCO_Setting; + + if(avPllBase == AVPLL_A) { + berlin_pll_VCO_Setting=berlin_pll_A_VCO_Setting; + } else { + berlin_pll_VCO_Setting=berlin_pll_B_VCO_Setting; + } + + if(freqIndex > (sizeof(clk_freqs_computed) / sizeof(CLK_FREQ))) { + return 1; + } + + if(clk_freqs_computed[freqIndex].invalid) { + return 1; + } + + if(berlin_pll_VCO_Setting != clk_freqs_computed[freqIndex].vco_freq_index) { + berlin_setVCO(avPllBase, clk_freqs_computed[freqIndex].vco_freq_index); + } + + //change offset + berlin_setChanOffset(avPllBase, clk_freqs_computed[freqIndex].freq_offset, chId); + + //change p_sync + berlin_setDPll(avPllBase, (clk_freqs_computed[freqIndex].p_sync1!=0), + clk_freqs_computed[freqIndex].p_sync1, + clk_freqs_computed[freqIndex].p_sync2, chId); + + //update now div + berlin_set_Post_Div(avPllBase, clk_freqs_computed[freqIndex].post_div, chId); + berlin_set_Post_0P5_Div(avPllBase, clk_freqs_computed[freqIndex].post_div_0p5, chId); + + return 0; +} + +int berlin_clockFreq(SIE_avPll *avPllBase, int vco_freq_index, unsigned int target_freq, int chId) +{ + if(berlin_compute_freq_setting(vco_freq_index, target_freq)) { + return 1; + } else { + //frequency ok, set it + berlin_clockFreq_computed(avPllBase, vco_freq_index, chId); + } + + return 0; +} + +int AVPLL_Set(int grpId, int chanId, unsigned int avFreq) +{ + if(grpId == 0) + berlin_clockFreq(AVPLL_A, vcoFreqIndex, avFreq, chanId); + + return 0; +} + diff --git a/sound/soc/berlin/berlin_memmap.h b/sound/soc/berlin/berlin_memmap.h new file mode 100644 index 00000000..9ed6f9dc --- /dev/null +++ b/sound/soc/berlin/berlin_memmap.h @@ -0,0 +1,51 @@ +/********************************************************************************* +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +***********************************************************************************/ + +#ifndef _BERLIN_MEMMAP_H_ +#define _BERLIN_MEMMAP_H_ + +#define MEMMAP_VIP_DHUB_REG_BASE 0xF7AE0000 +#define MEMMAP_VIP_DHUB_REG_SIZE 0x20000 +#define MEMMAP_VIP_DHUB_REG_DEC_BIT 0x11 + +#define MEMMAP_AVIF_REG_BASE 0xF7980000 +#define MEMMAP_AVIF_REG_SIZE 0x80000 +#define MEMMAP_AVIF_REG_DEC_BIT 0x13 + +#define MEMMAP_ZSP_REG_BASE 0xF7C00000 +#define MEMMAP_ZSP_REG_SIZE 0x80000 +#define MEMMAP_ZSP_REG_DEC_BIT 0x13 + +#define MEMMAP_AG_DHUB_REG_BASE 0xF7D00000 +#define MEMMAP_AG_DHUB_REG_SIZE 0x20000 +#define MEMMAP_AG_DHUB_REG_DEC_BIT 0x11 + +#define MEMMAP_VPP_DHUB_REG_BASE 0xF7F40000 +#define MEMMAP_VPP_DHUB_REG_SIZE 0x20000 +#define MEMMAP_VPP_DHUB_REG_DEC_BIT 0x11 + +#define MEMMAP_I2S_REG_BASE 0xF7E70000 +#define MEMMAP_I2S_REG_SIZE 0x10000 +#define MEMMAP_I2S_REG_DEC_BIT 0x10 + +#define MEMMAP_AVIO_GBL_BASE 0xF7E20000 +#define MEMMAP_AVIO_GBL_SIZE 0x10000 +#define MEMMAP_AVIO_GBL_DEC_BIT 0x10 + +#endif //_BERLIN_MEMMAP_H_ diff --git a/sound/soc/berlin/bmc_enc_tbl.h b/sound/soc/berlin/bmc_enc_tbl.h new file mode 100644 index 00000000..df1f0904 --- /dev/null +++ b/sound/soc/berlin/bmc_enc_tbl.h @@ -0,0 +1,284 @@ +/************************************************************************************* +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +***************************************************************************************/ + +#ifndef __BMC_ENC_TBL_H__ +#define __BMC_ENC_TBL_H__ + +static uint16_t __bmc_enc_tbl_8bit[] = +{ + 0x0000cccc, /* 0: 00000000 -> 1100110011001100 */ + 0x0000b333, /* 1: 00000001 -> 1011001100110011 */ + 0x0000d333, /* 2: 00000010 -> 1101001100110011 */ + 0x0000accc, /* 3: 00000011 -> 1010110011001100 */ + 0x0000cb33, /* 4: 00000100 -> 1100101100110011 */ + 0x0000b4cc, /* 5: 00000101 -> 1011010011001100 */ + 0x0000d4cc, /* 6: 00000110 -> 1101010011001100 */ + 0x0000ab33, /* 7: 00000111 -> 1010101100110011 */ + 0x0000cd33, /* 8: 00001000 -> 1100110100110011 */ + 0x0000b2cc, /* 9: 00001001 -> 1011001011001100 */ + 0x0000d2cc, /* 10: 00001010 -> 1101001011001100 */ + 0x0000ad33, /* 11: 00001011 -> 1010110100110011 */ + 0x0000cacc, /* 12: 00001100 -> 1100101011001100 */ + 0x0000b533, /* 13: 00001101 -> 1011010100110011 */ + 0x0000d533, /* 14: 00001110 -> 1101010100110011 */ + 0x0000aacc, /* 15: 00001111 -> 1010101011001100 */ + 0x0000ccb3, /* 16: 00010000 -> 1100110010110011 */ + 0x0000b34c, /* 17: 00010001 -> 1011001101001100 */ + 0x0000d34c, /* 18: 00010010 -> 1101001101001100 */ + 0x0000acb3, /* 19: 00010011 -> 1010110010110011 */ + 0x0000cb4c, /* 20: 00010100 -> 1100101101001100 */ + 0x0000b4b3, /* 21: 00010101 -> 1011010010110011 */ + 0x0000d4b3, /* 22: 00010110 -> 1101010010110011 */ + 0x0000ab4c, /* 23: 00010111 -> 1010101101001100 */ + 0x0000cd4c, /* 24: 00011000 -> 1100110101001100 */ + 0x0000b2b3, /* 25: 00011001 -> 1011001010110011 */ + 0x0000d2b3, /* 26: 00011010 -> 1101001010110011 */ + 0x0000ad4c, /* 27: 00011011 -> 1010110101001100 */ + 0x0000cab3, /* 28: 00011100 -> 1100101010110011 */ + 0x0000b54c, /* 29: 00011101 -> 1011010101001100 */ + 0x0000d54c, /* 30: 00011110 -> 1101010101001100 */ + 0x0000aab3, /* 31: 00011111 -> 1010101010110011 */ + 0x0000ccd3, /* 32: 00100000 -> 1100110011010011 */ + 0x0000b32c, /* 33: 00100001 -> 1011001100101100 */ + 0x0000d32c, /* 34: 00100010 -> 1101001100101100 */ + 0x0000acd3, /* 35: 00100011 -> 1010110011010011 */ + 0x0000cb2c, /* 36: 00100100 -> 1100101100101100 */ + 0x0000b4d3, /* 37: 00100101 -> 1011010011010011 */ + 0x0000d4d3, /* 38: 00100110 -> 1101010011010011 */ + 0x0000ab2c, /* 39: 00100111 -> 1010101100101100 */ + 0x0000cd2c, /* 40: 00101000 -> 1100110100101100 */ + 0x0000b2d3, /* 41: 00101001 -> 1011001011010011 */ + 0x0000d2d3, /* 42: 00101010 -> 1101001011010011 */ + 0x0000ad2c, /* 43: 00101011 -> 1010110100101100 */ + 0x0000cad3, /* 44: 00101100 -> 1100101011010011 */ + 0x0000b52c, /* 45: 00101101 -> 1011010100101100 */ + 0x0000d52c, /* 46: 00101110 -> 1101010100101100 */ + 0x0000aad3, /* 47: 00101111 -> 1010101011010011 */ + 0x0000ccac, /* 48: 00110000 -> 1100110010101100 */ + 0x0000b353, /* 49: 00110001 -> 1011001101010011 */ + 0x0000d353, /* 50: 00110010 -> 1101001101010011 */ + 0x0000acac, /* 51: 00110011 -> 1010110010101100 */ + 0x0000cb53, /* 52: 00110100 -> 1100101101010011 */ + 0x0000b4ac, /* 53: 00110101 -> 1011010010101100 */ + 0x0000d4ac, /* 54: 00110110 -> 1101010010101100 */ + 0x0000ab53, /* 55: 00110111 -> 1010101101010011 */ + 0x0000cd53, /* 56: 00111000 -> 1100110101010011 */ + 0x0000b2ac, /* 57: 00111001 -> 1011001010101100 */ + 0x0000d2ac, /* 58: 00111010 -> 1101001010101100 */ + 0x0000ad53, /* 59: 00111011 -> 1010110101010011 */ + 0x0000caac, /* 60: 00111100 -> 1100101010101100 */ + 0x0000b553, /* 61: 00111101 -> 1011010101010011 */ + 0x0000d553, /* 62: 00111110 -> 1101010101010011 */ + 0x0000aaac, /* 63: 00111111 -> 1010101010101100 */ + 0x0000cccb, /* 64: 01000000 -> 1100110011001011 */ + 0x0000b334, /* 65: 01000001 -> 1011001100110100 */ + 0x0000d334, /* 66: 01000010 -> 1101001100110100 */ + 0x0000accb, /* 67: 01000011 -> 1010110011001011 */ + 0x0000cb34, /* 68: 01000100 -> 1100101100110100 */ + 0x0000b4cb, /* 69: 01000101 -> 1011010011001011 */ + 0x0000d4cb, /* 70: 01000110 -> 1101010011001011 */ + 0x0000ab34, /* 71: 01000111 -> 1010101100110100 */ + 0x0000cd34, /* 72: 01001000 -> 1100110100110100 */ + 0x0000b2cb, /* 73: 01001001 -> 1011001011001011 */ + 0x0000d2cb, /* 74: 01001010 -> 1101001011001011 */ + 0x0000ad34, /* 75: 01001011 -> 1010110100110100 */ + 0x0000cacb, /* 76: 01001100 -> 1100101011001011 */ + 0x0000b534, /* 77: 01001101 -> 1011010100110100 */ + 0x0000d534, /* 78: 01001110 -> 1101010100110100 */ + 0x0000aacb, /* 79: 01001111 -> 1010101011001011 */ + 0x0000ccb4, /* 80: 01010000 -> 1100110010110100 */ + 0x0000b34b, /* 81: 01010001 -> 1011001101001011 */ + 0x0000d34b, /* 82: 01010010 -> 1101001101001011 */ + 0x0000acb4, /* 83: 01010011 -> 1010110010110100 */ + 0x0000cb4b, /* 84: 01010100 -> 1100101101001011 */ + 0x0000b4b4, /* 85: 01010101 -> 1011010010110100 */ + 0x0000d4b4, /* 86: 01010110 -> 1101010010110100 */ + 0x0000ab4b, /* 87: 01010111 -> 1010101101001011 */ + 0x0000cd4b, /* 88: 01011000 -> 1100110101001011 */ + 0x0000b2b4, /* 89: 01011001 -> 1011001010110100 */ + 0x0000d2b4, /* 90: 01011010 -> 1101001010110100 */ + 0x0000ad4b, /* 91: 01011011 -> 1010110101001011 */ + 0x0000cab4, /* 92: 01011100 -> 1100101010110100 */ + 0x0000b54b, /* 93: 01011101 -> 1011010101001011 */ + 0x0000d54b, /* 94: 01011110 -> 1101010101001011 */ + 0x0000aab4, /* 95: 01011111 -> 1010101010110100 */ + 0x0000ccd4, /* 96: 01100000 -> 1100110011010100 */ + 0x0000b32b, /* 97: 01100001 -> 1011001100101011 */ + 0x0000d32b, /* 98: 01100010 -> 1101001100101011 */ + 0x0000acd4, /* 99: 01100011 -> 1010110011010100 */ + 0x0000cb2b, /* 100: 01100100 -> 1100101100101011 */ + 0x0000b4d4, /* 101: 01100101 -> 1011010011010100 */ + 0x0000d4d4, /* 102: 01100110 -> 1101010011010100 */ + 0x0000ab2b, /* 103: 01100111 -> 1010101100101011 */ + 0x0000cd2b, /* 104: 01101000 -> 1100110100101011 */ + 0x0000b2d4, /* 105: 01101001 -> 1011001011010100 */ + 0x0000d2d4, /* 106: 01101010 -> 1101001011010100 */ + 0x0000ad2b, /* 107: 01101011 -> 1010110100101011 */ + 0x0000cad4, /* 108: 01101100 -> 1100101011010100 */ + 0x0000b52b, /* 109: 01101101 -> 1011010100101011 */ + 0x0000d52b, /* 110: 01101110 -> 1101010100101011 */ + 0x0000aad4, /* 111: 01101111 -> 1010101011010100 */ + 0x0000ccab, /* 112: 01110000 -> 1100110010101011 */ + 0x0000b354, /* 113: 01110001 -> 1011001101010100 */ + 0x0000d354, /* 114: 01110010 -> 1101001101010100 */ + 0x0000acab, /* 115: 01110011 -> 1010110010101011 */ + 0x0000cb54, /* 116: 01110100 -> 1100101101010100 */ + 0x0000b4ab, /* 117: 01110101 -> 1011010010101011 */ + 0x0000d4ab, /* 118: 01110110 -> 1101010010101011 */ + 0x0000ab54, /* 119: 01110111 -> 1010101101010100 */ + 0x0000cd54, /* 120: 01111000 -> 1100110101010100 */ + 0x0000b2ab, /* 121: 01111001 -> 1011001010101011 */ + 0x0000d2ab, /* 122: 01111010 -> 1101001010101011 */ + 0x0000ad54, /* 123: 01111011 -> 1010110101010100 */ + 0x0000caab, /* 124: 01111100 -> 1100101010101011 */ + 0x0000b554, /* 125: 01111101 -> 1011010101010100 */ + 0x0000d554, /* 126: 01111110 -> 1101010101010100 */ + 0x0000aaab, /* 127: 01111111 -> 1010101010101011 */ + 0x0000cccd, /* 128: 10000000 -> 1100110011001101 */ + 0x0000b332, /* 129: 10000001 -> 1011001100110010 */ + 0x0000d332, /* 130: 10000010 -> 1101001100110010 */ + 0x0000accd, /* 131: 10000011 -> 1010110011001101 */ + 0x0000cb32, /* 132: 10000100 -> 1100101100110010 */ + 0x0000b4cd, /* 133: 10000101 -> 1011010011001101 */ + 0x0000d4cd, /* 134: 10000110 -> 1101010011001101 */ + 0x0000ab32, /* 135: 10000111 -> 1010101100110010 */ + 0x0000cd32, /* 136: 10001000 -> 1100110100110010 */ + 0x0000b2cd, /* 137: 10001001 -> 1011001011001101 */ + 0x0000d2cd, /* 138: 10001010 -> 1101001011001101 */ + 0x0000ad32, /* 139: 10001011 -> 1010110100110010 */ + 0x0000cacd, /* 140: 10001100 -> 1100101011001101 */ + 0x0000b532, /* 141: 10001101 -> 1011010100110010 */ + 0x0000d532, /* 142: 10001110 -> 1101010100110010 */ + 0x0000aacd, /* 143: 10001111 -> 1010101011001101 */ + 0x0000ccb2, /* 144: 10010000 -> 1100110010110010 */ + 0x0000b34d, /* 145: 10010001 -> 1011001101001101 */ + 0x0000d34d, /* 146: 10010010 -> 1101001101001101 */ + 0x0000acb2, /* 147: 10010011 -> 1010110010110010 */ + 0x0000cb4d, /* 148: 10010100 -> 1100101101001101 */ + 0x0000b4b2, /* 149: 10010101 -> 1011010010110010 */ + 0x0000d4b2, /* 150: 10010110 -> 1101010010110010 */ + 0x0000ab4d, /* 151: 10010111 -> 1010101101001101 */ + 0x0000cd4d, /* 152: 10011000 -> 1100110101001101 */ + 0x0000b2b2, /* 153: 10011001 -> 1011001010110010 */ + 0x0000d2b2, /* 154: 10011010 -> 1101001010110010 */ + 0x0000ad4d, /* 155: 10011011 -> 1010110101001101 */ + 0x0000cab2, /* 156: 10011100 -> 1100101010110010 */ + 0x0000b54d, /* 157: 10011101 -> 1011010101001101 */ + 0x0000d54d, /* 158: 10011110 -> 1101010101001101 */ + 0x0000aab2, /* 159: 10011111 -> 1010101010110010 */ + 0x0000ccd2, /* 160: 10100000 -> 1100110011010010 */ + 0x0000b32d, /* 161: 10100001 -> 1011001100101101 */ + 0x0000d32d, /* 162: 10100010 -> 1101001100101101 */ + 0x0000acd2, /* 163: 10100011 -> 1010110011010010 */ + 0x0000cb2d, /* 164: 10100100 -> 1100101100101101 */ + 0x0000b4d2, /* 165: 10100101 -> 1011010011010010 */ + 0x0000d4d2, /* 166: 10100110 -> 1101010011010010 */ + 0x0000ab2d, /* 167: 10100111 -> 1010101100101101 */ + 0x0000cd2d, /* 168: 10101000 -> 1100110100101101 */ + 0x0000b2d2, /* 169: 10101001 -> 1011001011010010 */ + 0x0000d2d2, /* 170: 10101010 -> 1101001011010010 */ + 0x0000ad2d, /* 171: 10101011 -> 1010110100101101 */ + 0x0000cad2, /* 172: 10101100 -> 1100101011010010 */ + 0x0000b52d, /* 173: 10101101 -> 1011010100101101 */ + 0x0000d52d, /* 174: 10101110 -> 1101010100101101 */ + 0x0000aad2, /* 175: 10101111 -> 1010101011010010 */ + 0x0000ccad, /* 176: 10110000 -> 1100110010101101 */ + 0x0000b352, /* 177: 10110001 -> 1011001101010010 */ + 0x0000d352, /* 178: 10110010 -> 1101001101010010 */ + 0x0000acad, /* 179: 10110011 -> 1010110010101101 */ + 0x0000cb52, /* 180: 10110100 -> 1100101101010010 */ + 0x0000b4ad, /* 181: 10110101 -> 1011010010101101 */ + 0x0000d4ad, /* 182: 10110110 -> 1101010010101101 */ + 0x0000ab52, /* 183: 10110111 -> 1010101101010010 */ + 0x0000cd52, /* 184: 10111000 -> 1100110101010010 */ + 0x0000b2ad, /* 185: 10111001 -> 1011001010101101 */ + 0x0000d2ad, /* 186: 10111010 -> 1101001010101101 */ + 0x0000ad52, /* 187: 10111011 -> 1010110101010010 */ + 0x0000caad, /* 188: 10111100 -> 1100101010101101 */ + 0x0000b552, /* 189: 10111101 -> 1011010101010010 */ + 0x0000d552, /* 190: 10111110 -> 1101010101010010 */ + 0x0000aaad, /* 191: 10111111 -> 1010101010101101 */ + 0x0000ccca, /* 192: 11000000 -> 1100110011001010 */ + 0x0000b335, /* 193: 11000001 -> 1011001100110101 */ + 0x0000d335, /* 194: 11000010 -> 1101001100110101 */ + 0x0000acca, /* 195: 11000011 -> 1010110011001010 */ + 0x0000cb35, /* 196: 11000100 -> 1100101100110101 */ + 0x0000b4ca, /* 197: 11000101 -> 1011010011001010 */ + 0x0000d4ca, /* 198: 11000110 -> 1101010011001010 */ + 0x0000ab35, /* 199: 11000111 -> 1010101100110101 */ + 0x0000cd35, /* 200: 11001000 -> 1100110100110101 */ + 0x0000b2ca, /* 201: 11001001 -> 1011001011001010 */ + 0x0000d2ca, /* 202: 11001010 -> 1101001011001010 */ + 0x0000ad35, /* 203: 11001011 -> 1010110100110101 */ + 0x0000caca, /* 204: 11001100 -> 1100101011001010 */ + 0x0000b535, /* 205: 11001101 -> 1011010100110101 */ + 0x0000d535, /* 206: 11001110 -> 1101010100110101 */ + 0x0000aaca, /* 207: 11001111 -> 1010101011001010 */ + 0x0000ccb5, /* 208: 11010000 -> 1100110010110101 */ + 0x0000b34a, /* 209: 11010001 -> 1011001101001010 */ + 0x0000d34a, /* 210: 11010010 -> 1101001101001010 */ + 0x0000acb5, /* 211: 11010011 -> 1010110010110101 */ + 0x0000cb4a, /* 212: 11010100 -> 1100101101001010 */ + 0x0000b4b5, /* 213: 11010101 -> 1011010010110101 */ + 0x0000d4b5, /* 214: 11010110 -> 1101010010110101 */ + 0x0000ab4a, /* 215: 11010111 -> 1010101101001010 */ + 0x0000cd4a, /* 216: 11011000 -> 1100110101001010 */ + 0x0000b2b5, /* 217: 11011001 -> 1011001010110101 */ + 0x0000d2b5, /* 218: 11011010 -> 1101001010110101 */ + 0x0000ad4a, /* 219: 11011011 -> 1010110101001010 */ + 0x0000cab5, /* 220: 11011100 -> 1100101010110101 */ + 0x0000b54a, /* 221: 11011101 -> 1011010101001010 */ + 0x0000d54a, /* 222: 11011110 -> 1101010101001010 */ + 0x0000aab5, /* 223: 11011111 -> 1010101010110101 */ + 0x0000ccd5, /* 224: 11100000 -> 1100110011010101 */ + 0x0000b32a, /* 225: 11100001 -> 1011001100101010 */ + 0x0000d32a, /* 226: 11100010 -> 1101001100101010 */ + 0x0000acd5, /* 227: 11100011 -> 1010110011010101 */ + 0x0000cb2a, /* 228: 11100100 -> 1100101100101010 */ + 0x0000b4d5, /* 229: 11100101 -> 1011010011010101 */ + 0x0000d4d5, /* 230: 11100110 -> 1101010011010101 */ + 0x0000ab2a, /* 231: 11100111 -> 1010101100101010 */ + 0x0000cd2a, /* 232: 11101000 -> 1100110100101010 */ + 0x0000b2d5, /* 233: 11101001 -> 1011001011010101 */ + 0x0000d2d5, /* 234: 11101010 -> 1101001011010101 */ + 0x0000ad2a, /* 235: 11101011 -> 1010110100101010 */ + 0x0000cad5, /* 236: 11101100 -> 1100101011010101 */ + 0x0000b52a, /* 237: 11101101 -> 1011010100101010 */ + 0x0000d52a, /* 238: 11101110 -> 1101010100101010 */ + 0x0000aad5, /* 239: 11101111 -> 1010101011010101 */ + 0x0000ccaa, /* 240: 11110000 -> 1100110010101010 */ + 0x0000b355, /* 241: 11110001 -> 1011001101010101 */ + 0x0000d355, /* 242: 11110010 -> 1101001101010101 */ + 0x0000acaa, /* 243: 11110011 -> 1010110010101010 */ + 0x0000cb55, /* 244: 11110100 -> 1100101101010101 */ + 0x0000b4aa, /* 245: 11110101 -> 1011010010101010 */ + 0x0000d4aa, /* 246: 11110110 -> 1101010010101010 */ + 0x0000ab55, /* 247: 11110111 -> 1010101101010101 */ + 0x0000cd55, /* 248: 11111000 -> 1100110101010101 */ + 0x0000b2aa, /* 249: 11111001 -> 1011001010101010 */ + 0x0000d2aa, /* 250: 11111010 -> 1101001010101010 */ + 0x0000ad55, /* 251: 11111011 -> 1010110101010101 */ + 0x0000caaa, /* 252: 11111100 -> 1100101010101010 */ + 0x0000b555, /* 253: 11111101 -> 1011010101010101 */ + 0x0000d555, /* 254: 11111110 -> 1101010101010101 */ + 0x0000aaaa, /* 255: 11111111 -> 1010101010101010 */ +}; + +#endif /* __BMC_ENC_TBL_H__ */ diff --git a/sound/soc/berlin/ctypes.h b/sound/soc/berlin/ctypes.h new file mode 100644 index 00000000..d416c69b --- /dev/null +++ b/sound/soc/berlin/ctypes.h @@ -0,0 +1,69 @@ +/*********************************************************************************** +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +************************************************************************************/ + +#ifndef CTYPES_H_ +#define CTYPES_H_ + +typedef unsigned char UNSG8; +typedef signed char SIGN8; +typedef unsigned short UNSG16; +typedef signed short SIGN16; +typedef unsigned int UNSG32; +typedef signed int SIGN32; +typedef unsigned long long UNSG64; +typedef signed long long SIGN64; +typedef float REAL32; +typedef double REAL64; + +#ifndef INLINE +#define INLINE static inline +#endif + +/*--------------------------------------------------------------------------- + NULL + ---------------------------------------------------------------------------*/ + +#ifndef NULL + #ifdef __cplusplus + #define NULL 0 + #else + #define NULL ((void *)0) + #endif +#endif + + +/*--------------------------------------------------------------------------- + Multiple-word types + ---------------------------------------------------------------------------*/ +#ifndef Txxb + #define Txxb + typedef UNSG8 T8b; + typedef UNSG16 T16b; + typedef UNSG32 T32b; + typedef UNSG32 T64b [2]; + typedef UNSG32 T96b [3]; + typedef UNSG32 T128b[4]; + typedef UNSG32 T160b[5]; + typedef UNSG32 T192b[6]; + typedef UNSG32 T224b[7]; + typedef UNSG32 T256b[8]; +#endif + +#endif diff --git a/sound/soc/berlin/dHub.h b/sound/soc/berlin/dHub.h new file mode 100644 index 00000000..55026101 --- /dev/null +++ b/sound/soc/berlin/dHub.h @@ -0,0 +1,4188 @@ +/*********************************************************************************** +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +************************************************************************************/ +////// +/// don't edit! auto-generated by docc: dHub.h +//////////////////////////////////////////////////////////// +#ifndef dHub_h +#define dHub_h (){} + + +#include "ctypes.h" + +#pragma pack(1) +#ifdef __cplusplus + extern "C" { +#endif + +#ifndef _DOCC_H_BITOPS_ +#define _DOCC_H_BITOPS_ (){} + + #define _bSETMASK_(b) ((b)<32 ? (1<<((b)&31)) : 0) + #define _NSETMASK_(msb,lsb) (_bSETMASK_((msb)+1)-_bSETMASK_(lsb)) + #define _bCLRMASK_(b) (~_bSETMASK_(b)) + #define _NCLRMASK_(msb,lsb) (~_NSETMASK_(msb,lsb)) + #define _BFGET_(r,msb,lsb) (_NSETMASK_((msb)-(lsb),0)&((r)>>(lsb))) + #define _BFSET_(r,msb,lsb,v) do{ (r)&=_NCLRMASK_(msb,lsb); (r)|=_NSETMASK_(msb,lsb)&((v)<<(lsb)); }while(0) + +#endif + + + +////// +/// +/// $INTERFACE SemaINTR (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 mask (W-) +/// %unsigned 1 empty 0x0 +/// ### +/// * Enable interrupt on 'empty' condition +/// ### +/// %unsigned 1 full 0x0 +/// ### +/// * Enable interrupt on 'full' condition +/// ### +/// %unsigned 1 almostEmpty 0x0 +/// ### +/// * Enable interrupt on 'almostEmpty' condition +/// ### +/// %unsigned 1 almostFull 0x0 +/// ### +/// * Enable interrupt on 'almostFull' condition +/// ### +/// %% 28 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 4b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaINTR +#define h_SemaINTR (){} + + #define RA_SemaINTR_mask 0x0000 + + #define BA_SemaINTR_mask_empty 0x0000 + #define B16SemaINTR_mask_empty 0x0000 + #define LSb32SemaINTR_mask_empty 0 + #define LSb16SemaINTR_mask_empty 0 + #define bSemaINTR_mask_empty 1 + #define MSK32SemaINTR_mask_empty 0x00000001 + + #define BA_SemaINTR_mask_full 0x0000 + #define B16SemaINTR_mask_full 0x0000 + #define LSb32SemaINTR_mask_full 1 + #define LSb16SemaINTR_mask_full 1 + #define bSemaINTR_mask_full 1 + #define MSK32SemaINTR_mask_full 0x00000002 + + #define BA_SemaINTR_mask_almostEmpty 0x0000 + #define B16SemaINTR_mask_almostEmpty 0x0000 + #define LSb32SemaINTR_mask_almostEmpty 2 + #define LSb16SemaINTR_mask_almostEmpty 2 + #define bSemaINTR_mask_almostEmpty 1 + #define MSK32SemaINTR_mask_almostEmpty 0x00000004 + + #define BA_SemaINTR_mask_almostFull 0x0000 + #define B16SemaINTR_mask_almostFull 0x0000 + #define LSb32SemaINTR_mask_almostFull 3 + #define LSb16SemaINTR_mask_almostFull 3 + #define bSemaINTR_mask_almostFull 1 + #define MSK32SemaINTR_mask_almostFull 0x00000008 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaINTR { + /////////////////////////////////////////////////////////// + #define GET32SemaINTR_mask_empty(r32) _BFGET_(r32, 0, 0) + #define SET32SemaINTR_mask_empty(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaINTR_mask_empty(r16) _BFGET_(r16, 0, 0) + #define SET16SemaINTR_mask_empty(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaINTR_mask_full(r32) _BFGET_(r32, 1, 1) + #define SET32SemaINTR_mask_full(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaINTR_mask_full(r16) _BFGET_(r16, 1, 1) + #define SET16SemaINTR_mask_full(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaINTR_mask_almostEmpty(r32) _BFGET_(r32, 2, 2) + #define SET32SemaINTR_mask_almostEmpty(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaINTR_mask_almostEmpty(r16) _BFGET_(r16, 2, 2) + #define SET16SemaINTR_mask_almostEmpty(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaINTR_mask_almostFull(r32) _BFGET_(r32, 3, 3) + #define SET32SemaINTR_mask_almostFull(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaINTR_mask_almostFull(r16) _BFGET_(r16, 3, 3) + #define SET16SemaINTR_mask_almostFull(r16,v) _BFSET_(r16, 3, 3,v) + + #define w32SemaINTR_mask {\ + UNSG32 umask_empty : 1;\ + UNSG32 umask_full : 1;\ + UNSG32 umask_almostEmpty : 1;\ + UNSG32 umask_almostFull : 1;\ + UNSG32 RSVDx0_b4 : 28;\ + } + union { UNSG32 u32SemaINTR_mask; + struct w32SemaINTR_mask; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaINTR; + + typedef union T32SemaINTR_mask + { UNSG32 u32; + struct w32SemaINTR_mask; + } T32SemaINTR_mask; + /////////////////////////////////////////////////////////// + + typedef union TSemaINTR_mask + { UNSG32 u32[1]; + struct { + struct w32SemaINTR_mask; + }; + } TSemaINTR_mask; + + /////////////////////////////////////////////////////////// + SIGN32 SemaINTR_drvrd(SIE_SemaINTR *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaINTR_drvwr(SIE_SemaINTR *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaINTR_reset(SIE_SemaINTR *p); + SIGN32 SemaINTR_cmp (SIE_SemaINTR *p, SIE_SemaINTR *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaINTR_check(p,pie,pfx,hLOG) SemaINTR_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaINTR_print(p, pfx,hLOG) SemaINTR_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaINTR +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE Semaphore biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 16 DEPTH 0xF +/// ### +/// * Max level of semaphore +/// * Note: write this register will trigger counter reset +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00004 (P) +/// # 0x00004 INTR +/// $SemaINTR INTR REG [3] +/// ### +/// * Interrupt mask for 3 CPUs +/// ### +/// @ 0x00010 mask (W-) +/// %unsigned 1 full 0x0 +/// %unsigned 1 emp 0x0 +/// ### +/// * When full bit is set to one, to the producer, the semaphore will never be full, so that the producer will never be blocked. +/// * When emp bit is set to one, to the consumer, the semaphore will never be empty, so that the consumer will never be blocked. +/// * When the emp/full bit is set, the semaphore/FIFO pointer will be maintained, but the counter will be not correct anymore. +/// ### +/// %% 30 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 20B, bits: 30b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_Semaphore +#define h_Semaphore (){} + + #define RA_Semaphore_CFG 0x0000 + + #define BA_Semaphore_CFG_DEPTH 0x0000 + #define B16Semaphore_CFG_DEPTH 0x0000 + #define LSb32Semaphore_CFG_DEPTH 0 + #define LSb16Semaphore_CFG_DEPTH 0 + #define bSemaphore_CFG_DEPTH 16 + #define MSK32Semaphore_CFG_DEPTH 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_Semaphore_INTR 0x0004 + /////////////////////////////////////////////////////////// + #define RA_Semaphore_mask 0x0010 + + #define BA_Semaphore_mask_full 0x0010 + #define B16Semaphore_mask_full 0x0010 + #define LSb32Semaphore_mask_full 0 + #define LSb16Semaphore_mask_full 0 + #define bSemaphore_mask_full 1 + #define MSK32Semaphore_mask_full 0x00000001 + + #define BA_Semaphore_mask_emp 0x0010 + #define B16Semaphore_mask_emp 0x0010 + #define LSb32Semaphore_mask_emp 1 + #define LSb16Semaphore_mask_emp 1 + #define bSemaphore_mask_emp 1 + #define MSK32Semaphore_mask_emp 0x00000002 + /////////////////////////////////////////////////////////// + + typedef struct SIE_Semaphore { + /////////////////////////////////////////////////////////// + #define GET32Semaphore_CFG_DEPTH(r32) _BFGET_(r32,15, 0) + #define SET32Semaphore_CFG_DEPTH(r32,v) _BFSET_(r32,15, 0,v) + #define GET16Semaphore_CFG_DEPTH(r16) _BFGET_(r16,15, 0) + #define SET16Semaphore_CFG_DEPTH(r16,v) _BFSET_(r16,15, 0,v) + + #define w32Semaphore_CFG {\ + UNSG32 uCFG_DEPTH : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32Semaphore_CFG; + struct w32Semaphore_CFG; + }; + /////////////////////////////////////////////////////////// + SIE_SemaINTR ie_INTR[3]; + /////////////////////////////////////////////////////////// + #define GET32Semaphore_mask_full(r32) _BFGET_(r32, 0, 0) + #define SET32Semaphore_mask_full(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16Semaphore_mask_full(r16) _BFGET_(r16, 0, 0) + #define SET16Semaphore_mask_full(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32Semaphore_mask_emp(r32) _BFGET_(r32, 1, 1) + #define SET32Semaphore_mask_emp(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16Semaphore_mask_emp(r16) _BFGET_(r16, 1, 1) + #define SET16Semaphore_mask_emp(r16,v) _BFSET_(r16, 1, 1,v) + + #define w32Semaphore_mask {\ + UNSG32 umask_full : 1;\ + UNSG32 umask_emp : 1;\ + UNSG32 RSVDx10_b2 : 30;\ + } + union { UNSG32 u32Semaphore_mask; + struct w32Semaphore_mask; + }; + /////////////////////////////////////////////////////////// + } SIE_Semaphore; + + typedef union T32Semaphore_CFG + { UNSG32 u32; + struct w32Semaphore_CFG; + } T32Semaphore_CFG; + typedef union T32Semaphore_mask + { UNSG32 u32; + struct w32Semaphore_mask; + } T32Semaphore_mask; + /////////////////////////////////////////////////////////// + + typedef union TSemaphore_CFG + { UNSG32 u32[1]; + struct { + struct w32Semaphore_CFG; + }; + } TSemaphore_CFG; + typedef union TSemaphore_mask + { UNSG32 u32[1]; + struct { + struct w32Semaphore_mask; + }; + } TSemaphore_mask; + + /////////////////////////////////////////////////////////// + SIGN32 Semaphore_drvrd(SIE_Semaphore *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 Semaphore_drvwr(SIE_Semaphore *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void Semaphore_reset(SIE_Semaphore *p); + SIGN32 Semaphore_cmp (SIE_Semaphore *p, SIE_Semaphore *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define Semaphore_check(p,pie,pfx,hLOG) Semaphore_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define Semaphore_print(p, pfx,hLOG) Semaphore_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: Semaphore +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaQuery (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 RESP (R-) +/// %unsigned 16 CNT +/// ### +/// * Semaphore counter level +/// ### +/// %unsigned 16 PTR +/// ### +/// * Semaphore pointer: +/// * producer-wptr or consumer-rptr +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 32b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaQuery +#define h_SemaQuery (){} + + #define RA_SemaQuery_RESP 0x0000 + + #define BA_SemaQuery_RESP_CNT 0x0000 + #define B16SemaQuery_RESP_CNT 0x0000 + #define LSb32SemaQuery_RESP_CNT 0 + #define LSb16SemaQuery_RESP_CNT 0 + #define bSemaQuery_RESP_CNT 16 + #define MSK32SemaQuery_RESP_CNT 0x0000FFFF + + #define BA_SemaQuery_RESP_PTR 0x0002 + #define B16SemaQuery_RESP_PTR 0x0002 + #define LSb32SemaQuery_RESP_PTR 16 + #define LSb16SemaQuery_RESP_PTR 0 + #define bSemaQuery_RESP_PTR 16 + #define MSK32SemaQuery_RESP_PTR 0xFFFF0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaQuery { + /////////////////////////////////////////////////////////// + #define GET32SemaQuery_RESP_CNT(r32) _BFGET_(r32,15, 0) + #define SET32SemaQuery_RESP_CNT(r32,v) _BFSET_(r32,15, 0,v) + #define GET16SemaQuery_RESP_CNT(r16) _BFGET_(r16,15, 0) + #define SET16SemaQuery_RESP_CNT(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32SemaQuery_RESP_PTR(r32) _BFGET_(r32,31,16) + #define SET32SemaQuery_RESP_PTR(r32,v) _BFSET_(r32,31,16,v) + #define GET16SemaQuery_RESP_PTR(r16) _BFGET_(r16,15, 0) + #define SET16SemaQuery_RESP_PTR(r16,v) _BFSET_(r16,15, 0,v) + + #define w32SemaQuery_RESP {\ + UNSG32 uRESP_CNT : 16;\ + UNSG32 uRESP_PTR : 16;\ + } + union { UNSG32 u32SemaQuery_RESP; + struct w32SemaQuery_RESP; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaQuery; + + typedef union T32SemaQuery_RESP + { UNSG32 u32; + struct w32SemaQuery_RESP; + } T32SemaQuery_RESP; + /////////////////////////////////////////////////////////// + + typedef union TSemaQuery_RESP + { UNSG32 u32[1]; + struct { + struct w32SemaQuery_RESP; + }; + } TSemaQuery_RESP; + + /////////////////////////////////////////////////////////// + SIGN32 SemaQuery_drvrd(SIE_SemaQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaQuery_drvwr(SIE_SemaQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaQuery_reset(SIE_SemaQuery *p); + SIGN32 SemaQuery_cmp (SIE_SemaQuery *p, SIE_SemaQuery *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaQuery_check(p,pie,pfx,hLOG) SemaQuery_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaQuery_print(p, pfx,hLOG) SemaQuery_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaQuery +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaQueryMap (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 ADDR (P) +/// %unsigned 2 byte +/// %unsigned 5 ID +/// ### +/// * Semaphore cell index +/// ### +/// %unsigned 1 master +/// : producer 0x0 +/// : consumer 0x1 +/// ### +/// * Select which counter to read +/// ### +/// %% 24 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 8b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaQueryMap +#define h_SemaQueryMap (){} + + #define RA_SemaQueryMap_ADDR 0x0000 + + #define BA_SemaQueryMap_ADDR_byte 0x0000 + #define B16SemaQueryMap_ADDR_byte 0x0000 + #define LSb32SemaQueryMap_ADDR_byte 0 + #define LSb16SemaQueryMap_ADDR_byte 0 + #define bSemaQueryMap_ADDR_byte 2 + #define MSK32SemaQueryMap_ADDR_byte 0x00000003 + + #define BA_SemaQueryMap_ADDR_ID 0x0000 + #define B16SemaQueryMap_ADDR_ID 0x0000 + #define LSb32SemaQueryMap_ADDR_ID 2 + #define LSb16SemaQueryMap_ADDR_ID 2 + #define bSemaQueryMap_ADDR_ID 5 + #define MSK32SemaQueryMap_ADDR_ID 0x0000007C + + #define BA_SemaQueryMap_ADDR_master 0x0000 + #define B16SemaQueryMap_ADDR_master 0x0000 + #define LSb32SemaQueryMap_ADDR_master 7 + #define LSb16SemaQueryMap_ADDR_master 7 + #define bSemaQueryMap_ADDR_master 1 + #define MSK32SemaQueryMap_ADDR_master 0x00000080 + #define SemaQueryMap_ADDR_master_producer 0x0 + #define SemaQueryMap_ADDR_master_consumer 0x1 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaQueryMap { + /////////////////////////////////////////////////////////// + #define GET32SemaQueryMap_ADDR_byte(r32) _BFGET_(r32, 1, 0) + #define SET32SemaQueryMap_ADDR_byte(r32,v) _BFSET_(r32, 1, 0,v) + #define GET16SemaQueryMap_ADDR_byte(r16) _BFGET_(r16, 1, 0) + #define SET16SemaQueryMap_ADDR_byte(r16,v) _BFSET_(r16, 1, 0,v) + + #define GET32SemaQueryMap_ADDR_ID(r32) _BFGET_(r32, 6, 2) + #define SET32SemaQueryMap_ADDR_ID(r32,v) _BFSET_(r32, 6, 2,v) + #define GET16SemaQueryMap_ADDR_ID(r16) _BFGET_(r16, 6, 2) + #define SET16SemaQueryMap_ADDR_ID(r16,v) _BFSET_(r16, 6, 2,v) + + #define GET32SemaQueryMap_ADDR_master(r32) _BFGET_(r32, 7, 7) + #define SET32SemaQueryMap_ADDR_master(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaQueryMap_ADDR_master(r16) _BFGET_(r16, 7, 7) + #define SET16SemaQueryMap_ADDR_master(r16,v) _BFSET_(r16, 7, 7,v) + + #define w32SemaQueryMap_ADDR {\ + UNSG32 uADDR_byte : 2;\ + UNSG32 uADDR_ID : 5;\ + UNSG32 uADDR_master : 1;\ + UNSG32 RSVDx0_b8 : 24;\ + } + union { UNSG32 u32SemaQueryMap_ADDR; + struct w32SemaQueryMap_ADDR; + }; + /////////////////////////////////////////////////////////// + } SIE_SemaQueryMap; + + typedef union T32SemaQueryMap_ADDR + { UNSG32 u32; + struct w32SemaQueryMap_ADDR; + } T32SemaQueryMap_ADDR; + /////////////////////////////////////////////////////////// + + typedef union TSemaQueryMap_ADDR + { UNSG32 u32[1]; + struct { + struct w32SemaQueryMap_ADDR; + }; + } TSemaQueryMap_ADDR; + + /////////////////////////////////////////////////////////// + SIGN32 SemaQueryMap_drvrd(SIE_SemaQueryMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaQueryMap_drvwr(SIE_SemaQueryMap *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaQueryMap_reset(SIE_SemaQueryMap *p); + SIGN32 SemaQueryMap_cmp (SIE_SemaQueryMap *p, SIE_SemaQueryMap *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaQueryMap_check(p,pie,pfx,hLOG) SemaQueryMap_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaQueryMap_print(p, pfx,hLOG) SemaQueryMap_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaQueryMap +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE SemaHub biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 Query (R-) +/// # 0x00000 counter +/// $SemaQuery counter MEM [64] +/// ### +/// * Access address as defined above +/// ### +/// @ 0x00100 ARR (P) +/// # 0x00100 cell +/// $Semaphore cell REG [32] +/// ### +/// * Up-to 32 semaphore cells +/// ### +/// @ 0x00380 PUSH (W-) +/// %unsigned 8 ID +/// %unsigned 8 delta +/// ### +/// * CPU increases PCounter by delta (0 as push 256) +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00384 POP (W-) +/// %unsigned 8 ID +/// %unsigned 8 delta +/// ### +/// * CPU decreases CCounter by delta (0 as pop 256) +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00388 empty (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'empty' status +/// ### +/// @ 0x0038C full (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'full' status +/// ### +/// @ 0x00390 almostEmpty (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'almostEmpty' status +/// ### +/// @ 0x00394 almostFull (WOC-) +/// %unsigned 1 ST_0i 0x0 +/// %unsigned 1 ST_1i 0x0 +/// %unsigned 1 ST_2i 0x0 +/// %unsigned 1 ST_3i 0x0 +/// %unsigned 1 ST_4i 0x0 +/// %unsigned 1 ST_5i 0x0 +/// %unsigned 1 ST_6i 0x0 +/// %unsigned 1 ST_7i 0x0 +/// %unsigned 1 ST_8i 0x0 +/// %unsigned 1 ST_9i 0x0 +/// %unsigned 1 ST_10i 0x0 +/// %unsigned 1 ST_11i 0x0 +/// %unsigned 1 ST_12i 0x0 +/// %unsigned 1 ST_13i 0x0 +/// %unsigned 1 ST_14i 0x0 +/// %unsigned 1 ST_15i 0x0 +/// %unsigned 1 ST_16i 0x0 +/// %unsigned 1 ST_17i 0x0 +/// %unsigned 1 ST_18i 0x0 +/// %unsigned 1 ST_19i 0x0 +/// %unsigned 1 ST_20i 0x0 +/// %unsigned 1 ST_21i 0x0 +/// %unsigned 1 ST_22i 0x0 +/// %unsigned 1 ST_23i 0x0 +/// %unsigned 1 ST_24i 0x0 +/// %unsigned 1 ST_25i 0x0 +/// %unsigned 1 ST_26i 0x0 +/// %unsigned 1 ST_27i 0x0 +/// %unsigned 1 ST_28i 0x0 +/// %unsigned 1 ST_29i 0x0 +/// %unsigned 1 ST_30i 0x0 +/// %unsigned 1 ST_31i 0x0 +/// ### +/// * All cell 'almostFull' status +/// ### +/// @ 0x00398 (W-) +/// # # Stuffing bytes... +/// %% 832 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 1024B, bits: 1152b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_SemaHub +#define h_SemaHub (){} + + #define RA_SemaHub_Query 0x0000 + #define RA_SemaHub_counter 0x0000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_ARR 0x0100 + #define RA_SemaHub_cell 0x0100 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_PUSH 0x0380 + + #define BA_SemaHub_PUSH_ID 0x0380 + #define B16SemaHub_PUSH_ID 0x0380 + #define LSb32SemaHub_PUSH_ID 0 + #define LSb16SemaHub_PUSH_ID 0 + #define bSemaHub_PUSH_ID 8 + #define MSK32SemaHub_PUSH_ID 0x000000FF + + #define BA_SemaHub_PUSH_delta 0x0381 + #define B16SemaHub_PUSH_delta 0x0380 + #define LSb32SemaHub_PUSH_delta 8 + #define LSb16SemaHub_PUSH_delta 8 + #define bSemaHub_PUSH_delta 8 + #define MSK32SemaHub_PUSH_delta 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_POP 0x0384 + + #define BA_SemaHub_POP_ID 0x0384 + #define B16SemaHub_POP_ID 0x0384 + #define LSb32SemaHub_POP_ID 0 + #define LSb16SemaHub_POP_ID 0 + #define bSemaHub_POP_ID 8 + #define MSK32SemaHub_POP_ID 0x000000FF + + #define BA_SemaHub_POP_delta 0x0385 + #define B16SemaHub_POP_delta 0x0384 + #define LSb32SemaHub_POP_delta 8 + #define LSb16SemaHub_POP_delta 8 + #define bSemaHub_POP_delta 8 + #define MSK32SemaHub_POP_delta 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_empty 0x0388 + + #define BA_SemaHub_empty_ST_0i 0x0388 + #define B16SemaHub_empty_ST_0i 0x0388 + #define LSb32SemaHub_empty_ST_0i 0 + #define LSb16SemaHub_empty_ST_0i 0 + #define bSemaHub_empty_ST_0i 1 + #define MSK32SemaHub_empty_ST_0i 0x00000001 + + #define BA_SemaHub_empty_ST_1i 0x0388 + #define B16SemaHub_empty_ST_1i 0x0388 + #define LSb32SemaHub_empty_ST_1i 1 + #define LSb16SemaHub_empty_ST_1i 1 + #define bSemaHub_empty_ST_1i 1 + #define MSK32SemaHub_empty_ST_1i 0x00000002 + + #define BA_SemaHub_empty_ST_2i 0x0388 + #define B16SemaHub_empty_ST_2i 0x0388 + #define LSb32SemaHub_empty_ST_2i 2 + #define LSb16SemaHub_empty_ST_2i 2 + #define bSemaHub_empty_ST_2i 1 + #define MSK32SemaHub_empty_ST_2i 0x00000004 + + #define BA_SemaHub_empty_ST_3i 0x0388 + #define B16SemaHub_empty_ST_3i 0x0388 + #define LSb32SemaHub_empty_ST_3i 3 + #define LSb16SemaHub_empty_ST_3i 3 + #define bSemaHub_empty_ST_3i 1 + #define MSK32SemaHub_empty_ST_3i 0x00000008 + + #define BA_SemaHub_empty_ST_4i 0x0388 + #define B16SemaHub_empty_ST_4i 0x0388 + #define LSb32SemaHub_empty_ST_4i 4 + #define LSb16SemaHub_empty_ST_4i 4 + #define bSemaHub_empty_ST_4i 1 + #define MSK32SemaHub_empty_ST_4i 0x00000010 + + #define BA_SemaHub_empty_ST_5i 0x0388 + #define B16SemaHub_empty_ST_5i 0x0388 + #define LSb32SemaHub_empty_ST_5i 5 + #define LSb16SemaHub_empty_ST_5i 5 + #define bSemaHub_empty_ST_5i 1 + #define MSK32SemaHub_empty_ST_5i 0x00000020 + + #define BA_SemaHub_empty_ST_6i 0x0388 + #define B16SemaHub_empty_ST_6i 0x0388 + #define LSb32SemaHub_empty_ST_6i 6 + #define LSb16SemaHub_empty_ST_6i 6 + #define bSemaHub_empty_ST_6i 1 + #define MSK32SemaHub_empty_ST_6i 0x00000040 + + #define BA_SemaHub_empty_ST_7i 0x0388 + #define B16SemaHub_empty_ST_7i 0x0388 + #define LSb32SemaHub_empty_ST_7i 7 + #define LSb16SemaHub_empty_ST_7i 7 + #define bSemaHub_empty_ST_7i 1 + #define MSK32SemaHub_empty_ST_7i 0x00000080 + + #define BA_SemaHub_empty_ST_8i 0x0389 + #define B16SemaHub_empty_ST_8i 0x0388 + #define LSb32SemaHub_empty_ST_8i 8 + #define LSb16SemaHub_empty_ST_8i 8 + #define bSemaHub_empty_ST_8i 1 + #define MSK32SemaHub_empty_ST_8i 0x00000100 + + #define BA_SemaHub_empty_ST_9i 0x0389 + #define B16SemaHub_empty_ST_9i 0x0388 + #define LSb32SemaHub_empty_ST_9i 9 + #define LSb16SemaHub_empty_ST_9i 9 + #define bSemaHub_empty_ST_9i 1 + #define MSK32SemaHub_empty_ST_9i 0x00000200 + + #define BA_SemaHub_empty_ST_10i 0x0389 + #define B16SemaHub_empty_ST_10i 0x0388 + #define LSb32SemaHub_empty_ST_10i 10 + #define LSb16SemaHub_empty_ST_10i 10 + #define bSemaHub_empty_ST_10i 1 + #define MSK32SemaHub_empty_ST_10i 0x00000400 + + #define BA_SemaHub_empty_ST_11i 0x0389 + #define B16SemaHub_empty_ST_11i 0x0388 + #define LSb32SemaHub_empty_ST_11i 11 + #define LSb16SemaHub_empty_ST_11i 11 + #define bSemaHub_empty_ST_11i 1 + #define MSK32SemaHub_empty_ST_11i 0x00000800 + + #define BA_SemaHub_empty_ST_12i 0x0389 + #define B16SemaHub_empty_ST_12i 0x0388 + #define LSb32SemaHub_empty_ST_12i 12 + #define LSb16SemaHub_empty_ST_12i 12 + #define bSemaHub_empty_ST_12i 1 + #define MSK32SemaHub_empty_ST_12i 0x00001000 + + #define BA_SemaHub_empty_ST_13i 0x0389 + #define B16SemaHub_empty_ST_13i 0x0388 + #define LSb32SemaHub_empty_ST_13i 13 + #define LSb16SemaHub_empty_ST_13i 13 + #define bSemaHub_empty_ST_13i 1 + #define MSK32SemaHub_empty_ST_13i 0x00002000 + + #define BA_SemaHub_empty_ST_14i 0x0389 + #define B16SemaHub_empty_ST_14i 0x0388 + #define LSb32SemaHub_empty_ST_14i 14 + #define LSb16SemaHub_empty_ST_14i 14 + #define bSemaHub_empty_ST_14i 1 + #define MSK32SemaHub_empty_ST_14i 0x00004000 + + #define BA_SemaHub_empty_ST_15i 0x0389 + #define B16SemaHub_empty_ST_15i 0x0388 + #define LSb32SemaHub_empty_ST_15i 15 + #define LSb16SemaHub_empty_ST_15i 15 + #define bSemaHub_empty_ST_15i 1 + #define MSK32SemaHub_empty_ST_15i 0x00008000 + + #define BA_SemaHub_empty_ST_16i 0x038A + #define B16SemaHub_empty_ST_16i 0x038A + #define LSb32SemaHub_empty_ST_16i 16 + #define LSb16SemaHub_empty_ST_16i 0 + #define bSemaHub_empty_ST_16i 1 + #define MSK32SemaHub_empty_ST_16i 0x00010000 + + #define BA_SemaHub_empty_ST_17i 0x038A + #define B16SemaHub_empty_ST_17i 0x038A + #define LSb32SemaHub_empty_ST_17i 17 + #define LSb16SemaHub_empty_ST_17i 1 + #define bSemaHub_empty_ST_17i 1 + #define MSK32SemaHub_empty_ST_17i 0x00020000 + + #define BA_SemaHub_empty_ST_18i 0x038A + #define B16SemaHub_empty_ST_18i 0x038A + #define LSb32SemaHub_empty_ST_18i 18 + #define LSb16SemaHub_empty_ST_18i 2 + #define bSemaHub_empty_ST_18i 1 + #define MSK32SemaHub_empty_ST_18i 0x00040000 + + #define BA_SemaHub_empty_ST_19i 0x038A + #define B16SemaHub_empty_ST_19i 0x038A + #define LSb32SemaHub_empty_ST_19i 19 + #define LSb16SemaHub_empty_ST_19i 3 + #define bSemaHub_empty_ST_19i 1 + #define MSK32SemaHub_empty_ST_19i 0x00080000 + + #define BA_SemaHub_empty_ST_20i 0x038A + #define B16SemaHub_empty_ST_20i 0x038A + #define LSb32SemaHub_empty_ST_20i 20 + #define LSb16SemaHub_empty_ST_20i 4 + #define bSemaHub_empty_ST_20i 1 + #define MSK32SemaHub_empty_ST_20i 0x00100000 + + #define BA_SemaHub_empty_ST_21i 0x038A + #define B16SemaHub_empty_ST_21i 0x038A + #define LSb32SemaHub_empty_ST_21i 21 + #define LSb16SemaHub_empty_ST_21i 5 + #define bSemaHub_empty_ST_21i 1 + #define MSK32SemaHub_empty_ST_21i 0x00200000 + + #define BA_SemaHub_empty_ST_22i 0x038A + #define B16SemaHub_empty_ST_22i 0x038A + #define LSb32SemaHub_empty_ST_22i 22 + #define LSb16SemaHub_empty_ST_22i 6 + #define bSemaHub_empty_ST_22i 1 + #define MSK32SemaHub_empty_ST_22i 0x00400000 + + #define BA_SemaHub_empty_ST_23i 0x038A + #define B16SemaHub_empty_ST_23i 0x038A + #define LSb32SemaHub_empty_ST_23i 23 + #define LSb16SemaHub_empty_ST_23i 7 + #define bSemaHub_empty_ST_23i 1 + #define MSK32SemaHub_empty_ST_23i 0x00800000 + + #define BA_SemaHub_empty_ST_24i 0x038B + #define B16SemaHub_empty_ST_24i 0x038A + #define LSb32SemaHub_empty_ST_24i 24 + #define LSb16SemaHub_empty_ST_24i 8 + #define bSemaHub_empty_ST_24i 1 + #define MSK32SemaHub_empty_ST_24i 0x01000000 + + #define BA_SemaHub_empty_ST_25i 0x038B + #define B16SemaHub_empty_ST_25i 0x038A + #define LSb32SemaHub_empty_ST_25i 25 + #define LSb16SemaHub_empty_ST_25i 9 + #define bSemaHub_empty_ST_25i 1 + #define MSK32SemaHub_empty_ST_25i 0x02000000 + + #define BA_SemaHub_empty_ST_26i 0x038B + #define B16SemaHub_empty_ST_26i 0x038A + #define LSb32SemaHub_empty_ST_26i 26 + #define LSb16SemaHub_empty_ST_26i 10 + #define bSemaHub_empty_ST_26i 1 + #define MSK32SemaHub_empty_ST_26i 0x04000000 + + #define BA_SemaHub_empty_ST_27i 0x038B + #define B16SemaHub_empty_ST_27i 0x038A + #define LSb32SemaHub_empty_ST_27i 27 + #define LSb16SemaHub_empty_ST_27i 11 + #define bSemaHub_empty_ST_27i 1 + #define MSK32SemaHub_empty_ST_27i 0x08000000 + + #define BA_SemaHub_empty_ST_28i 0x038B + #define B16SemaHub_empty_ST_28i 0x038A + #define LSb32SemaHub_empty_ST_28i 28 + #define LSb16SemaHub_empty_ST_28i 12 + #define bSemaHub_empty_ST_28i 1 + #define MSK32SemaHub_empty_ST_28i 0x10000000 + + #define BA_SemaHub_empty_ST_29i 0x038B + #define B16SemaHub_empty_ST_29i 0x038A + #define LSb32SemaHub_empty_ST_29i 29 + #define LSb16SemaHub_empty_ST_29i 13 + #define bSemaHub_empty_ST_29i 1 + #define MSK32SemaHub_empty_ST_29i 0x20000000 + + #define BA_SemaHub_empty_ST_30i 0x038B + #define B16SemaHub_empty_ST_30i 0x038A + #define LSb32SemaHub_empty_ST_30i 30 + #define LSb16SemaHub_empty_ST_30i 14 + #define bSemaHub_empty_ST_30i 1 + #define MSK32SemaHub_empty_ST_30i 0x40000000 + + #define BA_SemaHub_empty_ST_31i 0x038B + #define B16SemaHub_empty_ST_31i 0x038A + #define LSb32SemaHub_empty_ST_31i 31 + #define LSb16SemaHub_empty_ST_31i 15 + #define bSemaHub_empty_ST_31i 1 + #define MSK32SemaHub_empty_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_full 0x038C + + #define BA_SemaHub_full_ST_0i 0x038C + #define B16SemaHub_full_ST_0i 0x038C + #define LSb32SemaHub_full_ST_0i 0 + #define LSb16SemaHub_full_ST_0i 0 + #define bSemaHub_full_ST_0i 1 + #define MSK32SemaHub_full_ST_0i 0x00000001 + + #define BA_SemaHub_full_ST_1i 0x038C + #define B16SemaHub_full_ST_1i 0x038C + #define LSb32SemaHub_full_ST_1i 1 + #define LSb16SemaHub_full_ST_1i 1 + #define bSemaHub_full_ST_1i 1 + #define MSK32SemaHub_full_ST_1i 0x00000002 + + #define BA_SemaHub_full_ST_2i 0x038C + #define B16SemaHub_full_ST_2i 0x038C + #define LSb32SemaHub_full_ST_2i 2 + #define LSb16SemaHub_full_ST_2i 2 + #define bSemaHub_full_ST_2i 1 + #define MSK32SemaHub_full_ST_2i 0x00000004 + + #define BA_SemaHub_full_ST_3i 0x038C + #define B16SemaHub_full_ST_3i 0x038C + #define LSb32SemaHub_full_ST_3i 3 + #define LSb16SemaHub_full_ST_3i 3 + #define bSemaHub_full_ST_3i 1 + #define MSK32SemaHub_full_ST_3i 0x00000008 + + #define BA_SemaHub_full_ST_4i 0x038C + #define B16SemaHub_full_ST_4i 0x038C + #define LSb32SemaHub_full_ST_4i 4 + #define LSb16SemaHub_full_ST_4i 4 + #define bSemaHub_full_ST_4i 1 + #define MSK32SemaHub_full_ST_4i 0x00000010 + + #define BA_SemaHub_full_ST_5i 0x038C + #define B16SemaHub_full_ST_5i 0x038C + #define LSb32SemaHub_full_ST_5i 5 + #define LSb16SemaHub_full_ST_5i 5 + #define bSemaHub_full_ST_5i 1 + #define MSK32SemaHub_full_ST_5i 0x00000020 + + #define BA_SemaHub_full_ST_6i 0x038C + #define B16SemaHub_full_ST_6i 0x038C + #define LSb32SemaHub_full_ST_6i 6 + #define LSb16SemaHub_full_ST_6i 6 + #define bSemaHub_full_ST_6i 1 + #define MSK32SemaHub_full_ST_6i 0x00000040 + + #define BA_SemaHub_full_ST_7i 0x038C + #define B16SemaHub_full_ST_7i 0x038C + #define LSb32SemaHub_full_ST_7i 7 + #define LSb16SemaHub_full_ST_7i 7 + #define bSemaHub_full_ST_7i 1 + #define MSK32SemaHub_full_ST_7i 0x00000080 + + #define BA_SemaHub_full_ST_8i 0x038D + #define B16SemaHub_full_ST_8i 0x038C + #define LSb32SemaHub_full_ST_8i 8 + #define LSb16SemaHub_full_ST_8i 8 + #define bSemaHub_full_ST_8i 1 + #define MSK32SemaHub_full_ST_8i 0x00000100 + + #define BA_SemaHub_full_ST_9i 0x038D + #define B16SemaHub_full_ST_9i 0x038C + #define LSb32SemaHub_full_ST_9i 9 + #define LSb16SemaHub_full_ST_9i 9 + #define bSemaHub_full_ST_9i 1 + #define MSK32SemaHub_full_ST_9i 0x00000200 + + #define BA_SemaHub_full_ST_10i 0x038D + #define B16SemaHub_full_ST_10i 0x038C + #define LSb32SemaHub_full_ST_10i 10 + #define LSb16SemaHub_full_ST_10i 10 + #define bSemaHub_full_ST_10i 1 + #define MSK32SemaHub_full_ST_10i 0x00000400 + + #define BA_SemaHub_full_ST_11i 0x038D + #define B16SemaHub_full_ST_11i 0x038C + #define LSb32SemaHub_full_ST_11i 11 + #define LSb16SemaHub_full_ST_11i 11 + #define bSemaHub_full_ST_11i 1 + #define MSK32SemaHub_full_ST_11i 0x00000800 + + #define BA_SemaHub_full_ST_12i 0x038D + #define B16SemaHub_full_ST_12i 0x038C + #define LSb32SemaHub_full_ST_12i 12 + #define LSb16SemaHub_full_ST_12i 12 + #define bSemaHub_full_ST_12i 1 + #define MSK32SemaHub_full_ST_12i 0x00001000 + + #define BA_SemaHub_full_ST_13i 0x038D + #define B16SemaHub_full_ST_13i 0x038C + #define LSb32SemaHub_full_ST_13i 13 + #define LSb16SemaHub_full_ST_13i 13 + #define bSemaHub_full_ST_13i 1 + #define MSK32SemaHub_full_ST_13i 0x00002000 + + #define BA_SemaHub_full_ST_14i 0x038D + #define B16SemaHub_full_ST_14i 0x038C + #define LSb32SemaHub_full_ST_14i 14 + #define LSb16SemaHub_full_ST_14i 14 + #define bSemaHub_full_ST_14i 1 + #define MSK32SemaHub_full_ST_14i 0x00004000 + + #define BA_SemaHub_full_ST_15i 0x038D + #define B16SemaHub_full_ST_15i 0x038C + #define LSb32SemaHub_full_ST_15i 15 + #define LSb16SemaHub_full_ST_15i 15 + #define bSemaHub_full_ST_15i 1 + #define MSK32SemaHub_full_ST_15i 0x00008000 + + #define BA_SemaHub_full_ST_16i 0x038E + #define B16SemaHub_full_ST_16i 0x038E + #define LSb32SemaHub_full_ST_16i 16 + #define LSb16SemaHub_full_ST_16i 0 + #define bSemaHub_full_ST_16i 1 + #define MSK32SemaHub_full_ST_16i 0x00010000 + + #define BA_SemaHub_full_ST_17i 0x038E + #define B16SemaHub_full_ST_17i 0x038E + #define LSb32SemaHub_full_ST_17i 17 + #define LSb16SemaHub_full_ST_17i 1 + #define bSemaHub_full_ST_17i 1 + #define MSK32SemaHub_full_ST_17i 0x00020000 + + #define BA_SemaHub_full_ST_18i 0x038E + #define B16SemaHub_full_ST_18i 0x038E + #define LSb32SemaHub_full_ST_18i 18 + #define LSb16SemaHub_full_ST_18i 2 + #define bSemaHub_full_ST_18i 1 + #define MSK32SemaHub_full_ST_18i 0x00040000 + + #define BA_SemaHub_full_ST_19i 0x038E + #define B16SemaHub_full_ST_19i 0x038E + #define LSb32SemaHub_full_ST_19i 19 + #define LSb16SemaHub_full_ST_19i 3 + #define bSemaHub_full_ST_19i 1 + #define MSK32SemaHub_full_ST_19i 0x00080000 + + #define BA_SemaHub_full_ST_20i 0x038E + #define B16SemaHub_full_ST_20i 0x038E + #define LSb32SemaHub_full_ST_20i 20 + #define LSb16SemaHub_full_ST_20i 4 + #define bSemaHub_full_ST_20i 1 + #define MSK32SemaHub_full_ST_20i 0x00100000 + + #define BA_SemaHub_full_ST_21i 0x038E + #define B16SemaHub_full_ST_21i 0x038E + #define LSb32SemaHub_full_ST_21i 21 + #define LSb16SemaHub_full_ST_21i 5 + #define bSemaHub_full_ST_21i 1 + #define MSK32SemaHub_full_ST_21i 0x00200000 + + #define BA_SemaHub_full_ST_22i 0x038E + #define B16SemaHub_full_ST_22i 0x038E + #define LSb32SemaHub_full_ST_22i 22 + #define LSb16SemaHub_full_ST_22i 6 + #define bSemaHub_full_ST_22i 1 + #define MSK32SemaHub_full_ST_22i 0x00400000 + + #define BA_SemaHub_full_ST_23i 0x038E + #define B16SemaHub_full_ST_23i 0x038E + #define LSb32SemaHub_full_ST_23i 23 + #define LSb16SemaHub_full_ST_23i 7 + #define bSemaHub_full_ST_23i 1 + #define MSK32SemaHub_full_ST_23i 0x00800000 + + #define BA_SemaHub_full_ST_24i 0x038F + #define B16SemaHub_full_ST_24i 0x038E + #define LSb32SemaHub_full_ST_24i 24 + #define LSb16SemaHub_full_ST_24i 8 + #define bSemaHub_full_ST_24i 1 + #define MSK32SemaHub_full_ST_24i 0x01000000 + + #define BA_SemaHub_full_ST_25i 0x038F + #define B16SemaHub_full_ST_25i 0x038E + #define LSb32SemaHub_full_ST_25i 25 + #define LSb16SemaHub_full_ST_25i 9 + #define bSemaHub_full_ST_25i 1 + #define MSK32SemaHub_full_ST_25i 0x02000000 + + #define BA_SemaHub_full_ST_26i 0x038F + #define B16SemaHub_full_ST_26i 0x038E + #define LSb32SemaHub_full_ST_26i 26 + #define LSb16SemaHub_full_ST_26i 10 + #define bSemaHub_full_ST_26i 1 + #define MSK32SemaHub_full_ST_26i 0x04000000 + + #define BA_SemaHub_full_ST_27i 0x038F + #define B16SemaHub_full_ST_27i 0x038E + #define LSb32SemaHub_full_ST_27i 27 + #define LSb16SemaHub_full_ST_27i 11 + #define bSemaHub_full_ST_27i 1 + #define MSK32SemaHub_full_ST_27i 0x08000000 + + #define BA_SemaHub_full_ST_28i 0x038F + #define B16SemaHub_full_ST_28i 0x038E + #define LSb32SemaHub_full_ST_28i 28 + #define LSb16SemaHub_full_ST_28i 12 + #define bSemaHub_full_ST_28i 1 + #define MSK32SemaHub_full_ST_28i 0x10000000 + + #define BA_SemaHub_full_ST_29i 0x038F + #define B16SemaHub_full_ST_29i 0x038E + #define LSb32SemaHub_full_ST_29i 29 + #define LSb16SemaHub_full_ST_29i 13 + #define bSemaHub_full_ST_29i 1 + #define MSK32SemaHub_full_ST_29i 0x20000000 + + #define BA_SemaHub_full_ST_30i 0x038F + #define B16SemaHub_full_ST_30i 0x038E + #define LSb32SemaHub_full_ST_30i 30 + #define LSb16SemaHub_full_ST_30i 14 + #define bSemaHub_full_ST_30i 1 + #define MSK32SemaHub_full_ST_30i 0x40000000 + + #define BA_SemaHub_full_ST_31i 0x038F + #define B16SemaHub_full_ST_31i 0x038E + #define LSb32SemaHub_full_ST_31i 31 + #define LSb16SemaHub_full_ST_31i 15 + #define bSemaHub_full_ST_31i 1 + #define MSK32SemaHub_full_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_almostEmpty 0x0390 + + #define BA_SemaHub_almostEmpty_ST_0i 0x0390 + #define B16SemaHub_almostEmpty_ST_0i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_0i 0 + #define LSb16SemaHub_almostEmpty_ST_0i 0 + #define bSemaHub_almostEmpty_ST_0i 1 + #define MSK32SemaHub_almostEmpty_ST_0i 0x00000001 + + #define BA_SemaHub_almostEmpty_ST_1i 0x0390 + #define B16SemaHub_almostEmpty_ST_1i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_1i 1 + #define LSb16SemaHub_almostEmpty_ST_1i 1 + #define bSemaHub_almostEmpty_ST_1i 1 + #define MSK32SemaHub_almostEmpty_ST_1i 0x00000002 + + #define BA_SemaHub_almostEmpty_ST_2i 0x0390 + #define B16SemaHub_almostEmpty_ST_2i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_2i 2 + #define LSb16SemaHub_almostEmpty_ST_2i 2 + #define bSemaHub_almostEmpty_ST_2i 1 + #define MSK32SemaHub_almostEmpty_ST_2i 0x00000004 + + #define BA_SemaHub_almostEmpty_ST_3i 0x0390 + #define B16SemaHub_almostEmpty_ST_3i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_3i 3 + #define LSb16SemaHub_almostEmpty_ST_3i 3 + #define bSemaHub_almostEmpty_ST_3i 1 + #define MSK32SemaHub_almostEmpty_ST_3i 0x00000008 + + #define BA_SemaHub_almostEmpty_ST_4i 0x0390 + #define B16SemaHub_almostEmpty_ST_4i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_4i 4 + #define LSb16SemaHub_almostEmpty_ST_4i 4 + #define bSemaHub_almostEmpty_ST_4i 1 + #define MSK32SemaHub_almostEmpty_ST_4i 0x00000010 + + #define BA_SemaHub_almostEmpty_ST_5i 0x0390 + #define B16SemaHub_almostEmpty_ST_5i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_5i 5 + #define LSb16SemaHub_almostEmpty_ST_5i 5 + #define bSemaHub_almostEmpty_ST_5i 1 + #define MSK32SemaHub_almostEmpty_ST_5i 0x00000020 + + #define BA_SemaHub_almostEmpty_ST_6i 0x0390 + #define B16SemaHub_almostEmpty_ST_6i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_6i 6 + #define LSb16SemaHub_almostEmpty_ST_6i 6 + #define bSemaHub_almostEmpty_ST_6i 1 + #define MSK32SemaHub_almostEmpty_ST_6i 0x00000040 + + #define BA_SemaHub_almostEmpty_ST_7i 0x0390 + #define B16SemaHub_almostEmpty_ST_7i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_7i 7 + #define LSb16SemaHub_almostEmpty_ST_7i 7 + #define bSemaHub_almostEmpty_ST_7i 1 + #define MSK32SemaHub_almostEmpty_ST_7i 0x00000080 + + #define BA_SemaHub_almostEmpty_ST_8i 0x0391 + #define B16SemaHub_almostEmpty_ST_8i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_8i 8 + #define LSb16SemaHub_almostEmpty_ST_8i 8 + #define bSemaHub_almostEmpty_ST_8i 1 + #define MSK32SemaHub_almostEmpty_ST_8i 0x00000100 + + #define BA_SemaHub_almostEmpty_ST_9i 0x0391 + #define B16SemaHub_almostEmpty_ST_9i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_9i 9 + #define LSb16SemaHub_almostEmpty_ST_9i 9 + #define bSemaHub_almostEmpty_ST_9i 1 + #define MSK32SemaHub_almostEmpty_ST_9i 0x00000200 + + #define BA_SemaHub_almostEmpty_ST_10i 0x0391 + #define B16SemaHub_almostEmpty_ST_10i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_10i 10 + #define LSb16SemaHub_almostEmpty_ST_10i 10 + #define bSemaHub_almostEmpty_ST_10i 1 + #define MSK32SemaHub_almostEmpty_ST_10i 0x00000400 + + #define BA_SemaHub_almostEmpty_ST_11i 0x0391 + #define B16SemaHub_almostEmpty_ST_11i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_11i 11 + #define LSb16SemaHub_almostEmpty_ST_11i 11 + #define bSemaHub_almostEmpty_ST_11i 1 + #define MSK32SemaHub_almostEmpty_ST_11i 0x00000800 + + #define BA_SemaHub_almostEmpty_ST_12i 0x0391 + #define B16SemaHub_almostEmpty_ST_12i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_12i 12 + #define LSb16SemaHub_almostEmpty_ST_12i 12 + #define bSemaHub_almostEmpty_ST_12i 1 + #define MSK32SemaHub_almostEmpty_ST_12i 0x00001000 + + #define BA_SemaHub_almostEmpty_ST_13i 0x0391 + #define B16SemaHub_almostEmpty_ST_13i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_13i 13 + #define LSb16SemaHub_almostEmpty_ST_13i 13 + #define bSemaHub_almostEmpty_ST_13i 1 + #define MSK32SemaHub_almostEmpty_ST_13i 0x00002000 + + #define BA_SemaHub_almostEmpty_ST_14i 0x0391 + #define B16SemaHub_almostEmpty_ST_14i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_14i 14 + #define LSb16SemaHub_almostEmpty_ST_14i 14 + #define bSemaHub_almostEmpty_ST_14i 1 + #define MSK32SemaHub_almostEmpty_ST_14i 0x00004000 + + #define BA_SemaHub_almostEmpty_ST_15i 0x0391 + #define B16SemaHub_almostEmpty_ST_15i 0x0390 + #define LSb32SemaHub_almostEmpty_ST_15i 15 + #define LSb16SemaHub_almostEmpty_ST_15i 15 + #define bSemaHub_almostEmpty_ST_15i 1 + #define MSK32SemaHub_almostEmpty_ST_15i 0x00008000 + + #define BA_SemaHub_almostEmpty_ST_16i 0x0392 + #define B16SemaHub_almostEmpty_ST_16i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_16i 16 + #define LSb16SemaHub_almostEmpty_ST_16i 0 + #define bSemaHub_almostEmpty_ST_16i 1 + #define MSK32SemaHub_almostEmpty_ST_16i 0x00010000 + + #define BA_SemaHub_almostEmpty_ST_17i 0x0392 + #define B16SemaHub_almostEmpty_ST_17i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_17i 17 + #define LSb16SemaHub_almostEmpty_ST_17i 1 + #define bSemaHub_almostEmpty_ST_17i 1 + #define MSK32SemaHub_almostEmpty_ST_17i 0x00020000 + + #define BA_SemaHub_almostEmpty_ST_18i 0x0392 + #define B16SemaHub_almostEmpty_ST_18i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_18i 18 + #define LSb16SemaHub_almostEmpty_ST_18i 2 + #define bSemaHub_almostEmpty_ST_18i 1 + #define MSK32SemaHub_almostEmpty_ST_18i 0x00040000 + + #define BA_SemaHub_almostEmpty_ST_19i 0x0392 + #define B16SemaHub_almostEmpty_ST_19i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_19i 19 + #define LSb16SemaHub_almostEmpty_ST_19i 3 + #define bSemaHub_almostEmpty_ST_19i 1 + #define MSK32SemaHub_almostEmpty_ST_19i 0x00080000 + + #define BA_SemaHub_almostEmpty_ST_20i 0x0392 + #define B16SemaHub_almostEmpty_ST_20i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_20i 20 + #define LSb16SemaHub_almostEmpty_ST_20i 4 + #define bSemaHub_almostEmpty_ST_20i 1 + #define MSK32SemaHub_almostEmpty_ST_20i 0x00100000 + + #define BA_SemaHub_almostEmpty_ST_21i 0x0392 + #define B16SemaHub_almostEmpty_ST_21i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_21i 21 + #define LSb16SemaHub_almostEmpty_ST_21i 5 + #define bSemaHub_almostEmpty_ST_21i 1 + #define MSK32SemaHub_almostEmpty_ST_21i 0x00200000 + + #define BA_SemaHub_almostEmpty_ST_22i 0x0392 + #define B16SemaHub_almostEmpty_ST_22i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_22i 22 + #define LSb16SemaHub_almostEmpty_ST_22i 6 + #define bSemaHub_almostEmpty_ST_22i 1 + #define MSK32SemaHub_almostEmpty_ST_22i 0x00400000 + + #define BA_SemaHub_almostEmpty_ST_23i 0x0392 + #define B16SemaHub_almostEmpty_ST_23i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_23i 23 + #define LSb16SemaHub_almostEmpty_ST_23i 7 + #define bSemaHub_almostEmpty_ST_23i 1 + #define MSK32SemaHub_almostEmpty_ST_23i 0x00800000 + + #define BA_SemaHub_almostEmpty_ST_24i 0x0393 + #define B16SemaHub_almostEmpty_ST_24i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_24i 24 + #define LSb16SemaHub_almostEmpty_ST_24i 8 + #define bSemaHub_almostEmpty_ST_24i 1 + #define MSK32SemaHub_almostEmpty_ST_24i 0x01000000 + + #define BA_SemaHub_almostEmpty_ST_25i 0x0393 + #define B16SemaHub_almostEmpty_ST_25i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_25i 25 + #define LSb16SemaHub_almostEmpty_ST_25i 9 + #define bSemaHub_almostEmpty_ST_25i 1 + #define MSK32SemaHub_almostEmpty_ST_25i 0x02000000 + + #define BA_SemaHub_almostEmpty_ST_26i 0x0393 + #define B16SemaHub_almostEmpty_ST_26i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_26i 26 + #define LSb16SemaHub_almostEmpty_ST_26i 10 + #define bSemaHub_almostEmpty_ST_26i 1 + #define MSK32SemaHub_almostEmpty_ST_26i 0x04000000 + + #define BA_SemaHub_almostEmpty_ST_27i 0x0393 + #define B16SemaHub_almostEmpty_ST_27i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_27i 27 + #define LSb16SemaHub_almostEmpty_ST_27i 11 + #define bSemaHub_almostEmpty_ST_27i 1 + #define MSK32SemaHub_almostEmpty_ST_27i 0x08000000 + + #define BA_SemaHub_almostEmpty_ST_28i 0x0393 + #define B16SemaHub_almostEmpty_ST_28i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_28i 28 + #define LSb16SemaHub_almostEmpty_ST_28i 12 + #define bSemaHub_almostEmpty_ST_28i 1 + #define MSK32SemaHub_almostEmpty_ST_28i 0x10000000 + + #define BA_SemaHub_almostEmpty_ST_29i 0x0393 + #define B16SemaHub_almostEmpty_ST_29i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_29i 29 + #define LSb16SemaHub_almostEmpty_ST_29i 13 + #define bSemaHub_almostEmpty_ST_29i 1 + #define MSK32SemaHub_almostEmpty_ST_29i 0x20000000 + + #define BA_SemaHub_almostEmpty_ST_30i 0x0393 + #define B16SemaHub_almostEmpty_ST_30i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_30i 30 + #define LSb16SemaHub_almostEmpty_ST_30i 14 + #define bSemaHub_almostEmpty_ST_30i 1 + #define MSK32SemaHub_almostEmpty_ST_30i 0x40000000 + + #define BA_SemaHub_almostEmpty_ST_31i 0x0393 + #define B16SemaHub_almostEmpty_ST_31i 0x0392 + #define LSb32SemaHub_almostEmpty_ST_31i 31 + #define LSb16SemaHub_almostEmpty_ST_31i 15 + #define bSemaHub_almostEmpty_ST_31i 1 + #define MSK32SemaHub_almostEmpty_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_SemaHub_almostFull 0x0394 + + #define BA_SemaHub_almostFull_ST_0i 0x0394 + #define B16SemaHub_almostFull_ST_0i 0x0394 + #define LSb32SemaHub_almostFull_ST_0i 0 + #define LSb16SemaHub_almostFull_ST_0i 0 + #define bSemaHub_almostFull_ST_0i 1 + #define MSK32SemaHub_almostFull_ST_0i 0x00000001 + + #define BA_SemaHub_almostFull_ST_1i 0x0394 + #define B16SemaHub_almostFull_ST_1i 0x0394 + #define LSb32SemaHub_almostFull_ST_1i 1 + #define LSb16SemaHub_almostFull_ST_1i 1 + #define bSemaHub_almostFull_ST_1i 1 + #define MSK32SemaHub_almostFull_ST_1i 0x00000002 + + #define BA_SemaHub_almostFull_ST_2i 0x0394 + #define B16SemaHub_almostFull_ST_2i 0x0394 + #define LSb32SemaHub_almostFull_ST_2i 2 + #define LSb16SemaHub_almostFull_ST_2i 2 + #define bSemaHub_almostFull_ST_2i 1 + #define MSK32SemaHub_almostFull_ST_2i 0x00000004 + + #define BA_SemaHub_almostFull_ST_3i 0x0394 + #define B16SemaHub_almostFull_ST_3i 0x0394 + #define LSb32SemaHub_almostFull_ST_3i 3 + #define LSb16SemaHub_almostFull_ST_3i 3 + #define bSemaHub_almostFull_ST_3i 1 + #define MSK32SemaHub_almostFull_ST_3i 0x00000008 + + #define BA_SemaHub_almostFull_ST_4i 0x0394 + #define B16SemaHub_almostFull_ST_4i 0x0394 + #define LSb32SemaHub_almostFull_ST_4i 4 + #define LSb16SemaHub_almostFull_ST_4i 4 + #define bSemaHub_almostFull_ST_4i 1 + #define MSK32SemaHub_almostFull_ST_4i 0x00000010 + + #define BA_SemaHub_almostFull_ST_5i 0x0394 + #define B16SemaHub_almostFull_ST_5i 0x0394 + #define LSb32SemaHub_almostFull_ST_5i 5 + #define LSb16SemaHub_almostFull_ST_5i 5 + #define bSemaHub_almostFull_ST_5i 1 + #define MSK32SemaHub_almostFull_ST_5i 0x00000020 + + #define BA_SemaHub_almostFull_ST_6i 0x0394 + #define B16SemaHub_almostFull_ST_6i 0x0394 + #define LSb32SemaHub_almostFull_ST_6i 6 + #define LSb16SemaHub_almostFull_ST_6i 6 + #define bSemaHub_almostFull_ST_6i 1 + #define MSK32SemaHub_almostFull_ST_6i 0x00000040 + + #define BA_SemaHub_almostFull_ST_7i 0x0394 + #define B16SemaHub_almostFull_ST_7i 0x0394 + #define LSb32SemaHub_almostFull_ST_7i 7 + #define LSb16SemaHub_almostFull_ST_7i 7 + #define bSemaHub_almostFull_ST_7i 1 + #define MSK32SemaHub_almostFull_ST_7i 0x00000080 + + #define BA_SemaHub_almostFull_ST_8i 0x0395 + #define B16SemaHub_almostFull_ST_8i 0x0394 + #define LSb32SemaHub_almostFull_ST_8i 8 + #define LSb16SemaHub_almostFull_ST_8i 8 + #define bSemaHub_almostFull_ST_8i 1 + #define MSK32SemaHub_almostFull_ST_8i 0x00000100 + + #define BA_SemaHub_almostFull_ST_9i 0x0395 + #define B16SemaHub_almostFull_ST_9i 0x0394 + #define LSb32SemaHub_almostFull_ST_9i 9 + #define LSb16SemaHub_almostFull_ST_9i 9 + #define bSemaHub_almostFull_ST_9i 1 + #define MSK32SemaHub_almostFull_ST_9i 0x00000200 + + #define BA_SemaHub_almostFull_ST_10i 0x0395 + #define B16SemaHub_almostFull_ST_10i 0x0394 + #define LSb32SemaHub_almostFull_ST_10i 10 + #define LSb16SemaHub_almostFull_ST_10i 10 + #define bSemaHub_almostFull_ST_10i 1 + #define MSK32SemaHub_almostFull_ST_10i 0x00000400 + + #define BA_SemaHub_almostFull_ST_11i 0x0395 + #define B16SemaHub_almostFull_ST_11i 0x0394 + #define LSb32SemaHub_almostFull_ST_11i 11 + #define LSb16SemaHub_almostFull_ST_11i 11 + #define bSemaHub_almostFull_ST_11i 1 + #define MSK32SemaHub_almostFull_ST_11i 0x00000800 + + #define BA_SemaHub_almostFull_ST_12i 0x0395 + #define B16SemaHub_almostFull_ST_12i 0x0394 + #define LSb32SemaHub_almostFull_ST_12i 12 + #define LSb16SemaHub_almostFull_ST_12i 12 + #define bSemaHub_almostFull_ST_12i 1 + #define MSK32SemaHub_almostFull_ST_12i 0x00001000 + + #define BA_SemaHub_almostFull_ST_13i 0x0395 + #define B16SemaHub_almostFull_ST_13i 0x0394 + #define LSb32SemaHub_almostFull_ST_13i 13 + #define LSb16SemaHub_almostFull_ST_13i 13 + #define bSemaHub_almostFull_ST_13i 1 + #define MSK32SemaHub_almostFull_ST_13i 0x00002000 + + #define BA_SemaHub_almostFull_ST_14i 0x0395 + #define B16SemaHub_almostFull_ST_14i 0x0394 + #define LSb32SemaHub_almostFull_ST_14i 14 + #define LSb16SemaHub_almostFull_ST_14i 14 + #define bSemaHub_almostFull_ST_14i 1 + #define MSK32SemaHub_almostFull_ST_14i 0x00004000 + + #define BA_SemaHub_almostFull_ST_15i 0x0395 + #define B16SemaHub_almostFull_ST_15i 0x0394 + #define LSb32SemaHub_almostFull_ST_15i 15 + #define LSb16SemaHub_almostFull_ST_15i 15 + #define bSemaHub_almostFull_ST_15i 1 + #define MSK32SemaHub_almostFull_ST_15i 0x00008000 + + #define BA_SemaHub_almostFull_ST_16i 0x0396 + #define B16SemaHub_almostFull_ST_16i 0x0396 + #define LSb32SemaHub_almostFull_ST_16i 16 + #define LSb16SemaHub_almostFull_ST_16i 0 + #define bSemaHub_almostFull_ST_16i 1 + #define MSK32SemaHub_almostFull_ST_16i 0x00010000 + + #define BA_SemaHub_almostFull_ST_17i 0x0396 + #define B16SemaHub_almostFull_ST_17i 0x0396 + #define LSb32SemaHub_almostFull_ST_17i 17 + #define LSb16SemaHub_almostFull_ST_17i 1 + #define bSemaHub_almostFull_ST_17i 1 + #define MSK32SemaHub_almostFull_ST_17i 0x00020000 + + #define BA_SemaHub_almostFull_ST_18i 0x0396 + #define B16SemaHub_almostFull_ST_18i 0x0396 + #define LSb32SemaHub_almostFull_ST_18i 18 + #define LSb16SemaHub_almostFull_ST_18i 2 + #define bSemaHub_almostFull_ST_18i 1 + #define MSK32SemaHub_almostFull_ST_18i 0x00040000 + + #define BA_SemaHub_almostFull_ST_19i 0x0396 + #define B16SemaHub_almostFull_ST_19i 0x0396 + #define LSb32SemaHub_almostFull_ST_19i 19 + #define LSb16SemaHub_almostFull_ST_19i 3 + #define bSemaHub_almostFull_ST_19i 1 + #define MSK32SemaHub_almostFull_ST_19i 0x00080000 + + #define BA_SemaHub_almostFull_ST_20i 0x0396 + #define B16SemaHub_almostFull_ST_20i 0x0396 + #define LSb32SemaHub_almostFull_ST_20i 20 + #define LSb16SemaHub_almostFull_ST_20i 4 + #define bSemaHub_almostFull_ST_20i 1 + #define MSK32SemaHub_almostFull_ST_20i 0x00100000 + + #define BA_SemaHub_almostFull_ST_21i 0x0396 + #define B16SemaHub_almostFull_ST_21i 0x0396 + #define LSb32SemaHub_almostFull_ST_21i 21 + #define LSb16SemaHub_almostFull_ST_21i 5 + #define bSemaHub_almostFull_ST_21i 1 + #define MSK32SemaHub_almostFull_ST_21i 0x00200000 + + #define BA_SemaHub_almostFull_ST_22i 0x0396 + #define B16SemaHub_almostFull_ST_22i 0x0396 + #define LSb32SemaHub_almostFull_ST_22i 22 + #define LSb16SemaHub_almostFull_ST_22i 6 + #define bSemaHub_almostFull_ST_22i 1 + #define MSK32SemaHub_almostFull_ST_22i 0x00400000 + + #define BA_SemaHub_almostFull_ST_23i 0x0396 + #define B16SemaHub_almostFull_ST_23i 0x0396 + #define LSb32SemaHub_almostFull_ST_23i 23 + #define LSb16SemaHub_almostFull_ST_23i 7 + #define bSemaHub_almostFull_ST_23i 1 + #define MSK32SemaHub_almostFull_ST_23i 0x00800000 + + #define BA_SemaHub_almostFull_ST_24i 0x0397 + #define B16SemaHub_almostFull_ST_24i 0x0396 + #define LSb32SemaHub_almostFull_ST_24i 24 + #define LSb16SemaHub_almostFull_ST_24i 8 + #define bSemaHub_almostFull_ST_24i 1 + #define MSK32SemaHub_almostFull_ST_24i 0x01000000 + + #define BA_SemaHub_almostFull_ST_25i 0x0397 + #define B16SemaHub_almostFull_ST_25i 0x0396 + #define LSb32SemaHub_almostFull_ST_25i 25 + #define LSb16SemaHub_almostFull_ST_25i 9 + #define bSemaHub_almostFull_ST_25i 1 + #define MSK32SemaHub_almostFull_ST_25i 0x02000000 + + #define BA_SemaHub_almostFull_ST_26i 0x0397 + #define B16SemaHub_almostFull_ST_26i 0x0396 + #define LSb32SemaHub_almostFull_ST_26i 26 + #define LSb16SemaHub_almostFull_ST_26i 10 + #define bSemaHub_almostFull_ST_26i 1 + #define MSK32SemaHub_almostFull_ST_26i 0x04000000 + + #define BA_SemaHub_almostFull_ST_27i 0x0397 + #define B16SemaHub_almostFull_ST_27i 0x0396 + #define LSb32SemaHub_almostFull_ST_27i 27 + #define LSb16SemaHub_almostFull_ST_27i 11 + #define bSemaHub_almostFull_ST_27i 1 + #define MSK32SemaHub_almostFull_ST_27i 0x08000000 + + #define BA_SemaHub_almostFull_ST_28i 0x0397 + #define B16SemaHub_almostFull_ST_28i 0x0396 + #define LSb32SemaHub_almostFull_ST_28i 28 + #define LSb16SemaHub_almostFull_ST_28i 12 + #define bSemaHub_almostFull_ST_28i 1 + #define MSK32SemaHub_almostFull_ST_28i 0x10000000 + + #define BA_SemaHub_almostFull_ST_29i 0x0397 + #define B16SemaHub_almostFull_ST_29i 0x0396 + #define LSb32SemaHub_almostFull_ST_29i 29 + #define LSb16SemaHub_almostFull_ST_29i 13 + #define bSemaHub_almostFull_ST_29i 1 + #define MSK32SemaHub_almostFull_ST_29i 0x20000000 + + #define BA_SemaHub_almostFull_ST_30i 0x0397 + #define B16SemaHub_almostFull_ST_30i 0x0396 + #define LSb32SemaHub_almostFull_ST_30i 30 + #define LSb16SemaHub_almostFull_ST_30i 14 + #define bSemaHub_almostFull_ST_30i 1 + #define MSK32SemaHub_almostFull_ST_30i 0x40000000 + + #define BA_SemaHub_almostFull_ST_31i 0x0397 + #define B16SemaHub_almostFull_ST_31i 0x0396 + #define LSb32SemaHub_almostFull_ST_31i 31 + #define LSb16SemaHub_almostFull_ST_31i 15 + #define bSemaHub_almostFull_ST_31i 1 + #define MSK32SemaHub_almostFull_ST_31i 0x80000000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_SemaHub { + /////////////////////////////////////////////////////////// + SIE_SemaQuery ie_counter[64]; + /////////////////////////////////////////////////////////// + SIE_Semaphore ie_cell[32]; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_PUSH_ID(r32) _BFGET_(r32, 7, 0) + #define SET32SemaHub_PUSH_ID(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16SemaHub_PUSH_ID(r16) _BFGET_(r16, 7, 0) + #define SET16SemaHub_PUSH_ID(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32SemaHub_PUSH_delta(r32) _BFGET_(r32,15, 8) + #define SET32SemaHub_PUSH_delta(r32,v) _BFSET_(r32,15, 8,v) + #define GET16SemaHub_PUSH_delta(r16) _BFGET_(r16,15, 8) + #define SET16SemaHub_PUSH_delta(r16,v) _BFSET_(r16,15, 8,v) + + #define w32SemaHub_PUSH {\ + UNSG32 uPUSH_ID : 8;\ + UNSG32 uPUSH_delta : 8;\ + UNSG32 RSVDx380_b16 : 16;\ + } + union { UNSG32 u32SemaHub_PUSH; + struct w32SemaHub_PUSH; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_POP_ID(r32) _BFGET_(r32, 7, 0) + #define SET32SemaHub_POP_ID(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16SemaHub_POP_ID(r16) _BFGET_(r16, 7, 0) + #define SET16SemaHub_POP_ID(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32SemaHub_POP_delta(r32) _BFGET_(r32,15, 8) + #define SET32SemaHub_POP_delta(r32,v) _BFSET_(r32,15, 8,v) + #define GET16SemaHub_POP_delta(r16) _BFGET_(r16,15, 8) + #define SET16SemaHub_POP_delta(r16,v) _BFSET_(r16,15, 8,v) + + #define w32SemaHub_POP {\ + UNSG32 uPOP_ID : 8;\ + UNSG32 uPOP_delta : 8;\ + UNSG32 RSVDx384_b16 : 16;\ + } + union { UNSG32 u32SemaHub_POP; + struct w32SemaHub_POP; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_empty_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_empty_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_empty_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_empty_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_empty_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_empty_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_empty_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_empty_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_empty_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_empty_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_empty_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_empty_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_empty_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_empty_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_empty_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_empty_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_empty_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_empty_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_empty_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_empty_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_empty_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_empty_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_empty_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_empty_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_empty_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_empty_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_empty_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_empty_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_empty_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_empty_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_empty_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_empty_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_empty_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_empty_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_empty_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_empty_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_empty_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_empty_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_empty_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_empty_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_empty_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_empty_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_empty_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_empty_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_empty_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_empty_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_empty_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_empty_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_empty_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_empty_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_empty_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_empty_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_empty_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_empty_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_empty_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_empty_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_empty_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_empty_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_empty_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_empty_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_empty_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_empty_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_empty_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_empty_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_empty_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_empty_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_empty_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_empty_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_empty_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_empty_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_empty_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_empty_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_empty_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_empty_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_empty_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_empty_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_empty_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_empty_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_empty_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_empty_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_empty_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_empty_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_empty_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_empty_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_empty_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_empty_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_empty_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_empty_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_empty_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_empty_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_empty_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_empty_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_empty_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_empty_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_empty_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_empty_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_empty_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_empty_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_empty_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_empty_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_empty_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_empty_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_empty_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_empty_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_empty_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_empty_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_empty_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_empty_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_empty_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_empty_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_empty_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_empty_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_empty_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_empty_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_empty_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_empty_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_empty_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_empty_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_empty_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_empty_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_empty_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_empty_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_empty_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_empty_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_empty_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_empty_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_empty_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_empty_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_empty {\ + UNSG32 uempty_ST_0i : 1;\ + UNSG32 uempty_ST_1i : 1;\ + UNSG32 uempty_ST_2i : 1;\ + UNSG32 uempty_ST_3i : 1;\ + UNSG32 uempty_ST_4i : 1;\ + UNSG32 uempty_ST_5i : 1;\ + UNSG32 uempty_ST_6i : 1;\ + UNSG32 uempty_ST_7i : 1;\ + UNSG32 uempty_ST_8i : 1;\ + UNSG32 uempty_ST_9i : 1;\ + UNSG32 uempty_ST_10i : 1;\ + UNSG32 uempty_ST_11i : 1;\ + UNSG32 uempty_ST_12i : 1;\ + UNSG32 uempty_ST_13i : 1;\ + UNSG32 uempty_ST_14i : 1;\ + UNSG32 uempty_ST_15i : 1;\ + UNSG32 uempty_ST_16i : 1;\ + UNSG32 uempty_ST_17i : 1;\ + UNSG32 uempty_ST_18i : 1;\ + UNSG32 uempty_ST_19i : 1;\ + UNSG32 uempty_ST_20i : 1;\ + UNSG32 uempty_ST_21i : 1;\ + UNSG32 uempty_ST_22i : 1;\ + UNSG32 uempty_ST_23i : 1;\ + UNSG32 uempty_ST_24i : 1;\ + UNSG32 uempty_ST_25i : 1;\ + UNSG32 uempty_ST_26i : 1;\ + UNSG32 uempty_ST_27i : 1;\ + UNSG32 uempty_ST_28i : 1;\ + UNSG32 uempty_ST_29i : 1;\ + UNSG32 uempty_ST_30i : 1;\ + UNSG32 uempty_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_empty; + struct w32SemaHub_empty; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_full_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_full_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_full_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_full_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_full_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_full_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_full_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_full_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_full_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_full_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_full_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_full_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_full_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_full_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_full_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_full_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_full_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_full_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_full_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_full_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_full_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_full_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_full_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_full_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_full_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_full_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_full_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_full_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_full_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_full_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_full_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_full_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_full_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_full_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_full_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_full_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_full_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_full_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_full_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_full_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_full_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_full_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_full_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_full_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_full_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_full_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_full_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_full_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_full_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_full_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_full_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_full_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_full_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_full_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_full_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_full_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_full_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_full_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_full_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_full_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_full_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_full_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_full_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_full_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_full_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_full_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_full_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_full_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_full_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_full_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_full_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_full_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_full_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_full_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_full_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_full_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_full_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_full_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_full_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_full_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_full_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_full_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_full_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_full_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_full_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_full_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_full_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_full_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_full_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_full_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_full_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_full_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_full_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_full_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_full_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_full_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_full_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_full_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_full_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_full_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_full_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_full_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_full_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_full_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_full_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_full_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_full_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_full_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_full_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_full_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_full_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_full_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_full_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_full_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_full_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_full_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_full_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_full_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_full_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_full_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_full_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_full_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_full_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_full_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_full_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_full_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_full_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_full_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_full {\ + UNSG32 ufull_ST_0i : 1;\ + UNSG32 ufull_ST_1i : 1;\ + UNSG32 ufull_ST_2i : 1;\ + UNSG32 ufull_ST_3i : 1;\ + UNSG32 ufull_ST_4i : 1;\ + UNSG32 ufull_ST_5i : 1;\ + UNSG32 ufull_ST_6i : 1;\ + UNSG32 ufull_ST_7i : 1;\ + UNSG32 ufull_ST_8i : 1;\ + UNSG32 ufull_ST_9i : 1;\ + UNSG32 ufull_ST_10i : 1;\ + UNSG32 ufull_ST_11i : 1;\ + UNSG32 ufull_ST_12i : 1;\ + UNSG32 ufull_ST_13i : 1;\ + UNSG32 ufull_ST_14i : 1;\ + UNSG32 ufull_ST_15i : 1;\ + UNSG32 ufull_ST_16i : 1;\ + UNSG32 ufull_ST_17i : 1;\ + UNSG32 ufull_ST_18i : 1;\ + UNSG32 ufull_ST_19i : 1;\ + UNSG32 ufull_ST_20i : 1;\ + UNSG32 ufull_ST_21i : 1;\ + UNSG32 ufull_ST_22i : 1;\ + UNSG32 ufull_ST_23i : 1;\ + UNSG32 ufull_ST_24i : 1;\ + UNSG32 ufull_ST_25i : 1;\ + UNSG32 ufull_ST_26i : 1;\ + UNSG32 ufull_ST_27i : 1;\ + UNSG32 ufull_ST_28i : 1;\ + UNSG32 ufull_ST_29i : 1;\ + UNSG32 ufull_ST_30i : 1;\ + UNSG32 ufull_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_full; + struct w32SemaHub_full; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_almostEmpty_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_almostEmpty_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_almostEmpty_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostEmpty_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostEmpty_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_almostEmpty_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_almostEmpty_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostEmpty_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostEmpty_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_almostEmpty_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_almostEmpty_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostEmpty_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostEmpty_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_almostEmpty_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_almostEmpty_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostEmpty_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostEmpty_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_almostEmpty_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_almostEmpty_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostEmpty_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostEmpty_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_almostEmpty_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_almostEmpty_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostEmpty_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostEmpty_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_almostEmpty_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_almostEmpty_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostEmpty_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostEmpty_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_almostEmpty_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_almostEmpty_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostEmpty_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostEmpty_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_almostEmpty_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_almostEmpty_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostEmpty_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostEmpty_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_almostEmpty_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_almostEmpty_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostEmpty_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostEmpty_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_almostEmpty_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_almostEmpty_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostEmpty_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostEmpty_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_almostEmpty_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_almostEmpty_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostEmpty_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostEmpty_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_almostEmpty_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_almostEmpty_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostEmpty_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostEmpty_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_almostEmpty_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_almostEmpty_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostEmpty_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostEmpty_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_almostEmpty_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_almostEmpty_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostEmpty_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostEmpty_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_almostEmpty_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_almostEmpty_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostEmpty_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_almostEmpty_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_almostEmpty_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_almostEmpty_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostEmpty_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostEmpty_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_almostEmpty_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_almostEmpty_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostEmpty_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostEmpty_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_almostEmpty_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_almostEmpty_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostEmpty_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostEmpty_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_almostEmpty_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_almostEmpty_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostEmpty_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostEmpty_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_almostEmpty_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_almostEmpty_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostEmpty_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostEmpty_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_almostEmpty_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_almostEmpty_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostEmpty_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostEmpty_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_almostEmpty_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_almostEmpty_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostEmpty_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostEmpty_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_almostEmpty_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_almostEmpty_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostEmpty_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostEmpty_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_almostEmpty_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_almostEmpty_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostEmpty_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostEmpty_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_almostEmpty_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_almostEmpty_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostEmpty_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostEmpty_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_almostEmpty_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_almostEmpty_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostEmpty_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostEmpty_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_almostEmpty_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_almostEmpty_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostEmpty_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostEmpty_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_almostEmpty_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_almostEmpty_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostEmpty_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostEmpty_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_almostEmpty_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_almostEmpty_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostEmpty_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostEmpty_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_almostEmpty_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_almostEmpty_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostEmpty_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostEmpty_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_almostEmpty_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_almostEmpty_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostEmpty_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_almostEmpty {\ + UNSG32 ualmostEmpty_ST_0i : 1;\ + UNSG32 ualmostEmpty_ST_1i : 1;\ + UNSG32 ualmostEmpty_ST_2i : 1;\ + UNSG32 ualmostEmpty_ST_3i : 1;\ + UNSG32 ualmostEmpty_ST_4i : 1;\ + UNSG32 ualmostEmpty_ST_5i : 1;\ + UNSG32 ualmostEmpty_ST_6i : 1;\ + UNSG32 ualmostEmpty_ST_7i : 1;\ + UNSG32 ualmostEmpty_ST_8i : 1;\ + UNSG32 ualmostEmpty_ST_9i : 1;\ + UNSG32 ualmostEmpty_ST_10i : 1;\ + UNSG32 ualmostEmpty_ST_11i : 1;\ + UNSG32 ualmostEmpty_ST_12i : 1;\ + UNSG32 ualmostEmpty_ST_13i : 1;\ + UNSG32 ualmostEmpty_ST_14i : 1;\ + UNSG32 ualmostEmpty_ST_15i : 1;\ + UNSG32 ualmostEmpty_ST_16i : 1;\ + UNSG32 ualmostEmpty_ST_17i : 1;\ + UNSG32 ualmostEmpty_ST_18i : 1;\ + UNSG32 ualmostEmpty_ST_19i : 1;\ + UNSG32 ualmostEmpty_ST_20i : 1;\ + UNSG32 ualmostEmpty_ST_21i : 1;\ + UNSG32 ualmostEmpty_ST_22i : 1;\ + UNSG32 ualmostEmpty_ST_23i : 1;\ + UNSG32 ualmostEmpty_ST_24i : 1;\ + UNSG32 ualmostEmpty_ST_25i : 1;\ + UNSG32 ualmostEmpty_ST_26i : 1;\ + UNSG32 ualmostEmpty_ST_27i : 1;\ + UNSG32 ualmostEmpty_ST_28i : 1;\ + UNSG32 ualmostEmpty_ST_29i : 1;\ + UNSG32 ualmostEmpty_ST_30i : 1;\ + UNSG32 ualmostEmpty_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_almostEmpty; + struct w32SemaHub_almostEmpty; + }; + /////////////////////////////////////////////////////////// + #define GET32SemaHub_almostFull_ST_0i(r32) _BFGET_(r32, 0, 0) + #define SET32SemaHub_almostFull_ST_0i(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16SemaHub_almostFull_ST_0i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostFull_ST_0i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostFull_ST_1i(r32) _BFGET_(r32, 1, 1) + #define SET32SemaHub_almostFull_ST_1i(r32,v) _BFSET_(r32, 1, 1,v) + #define GET16SemaHub_almostFull_ST_1i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostFull_ST_1i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostFull_ST_2i(r32) _BFGET_(r32, 2, 2) + #define SET32SemaHub_almostFull_ST_2i(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16SemaHub_almostFull_ST_2i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostFull_ST_2i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostFull_ST_3i(r32) _BFGET_(r32, 3, 3) + #define SET32SemaHub_almostFull_ST_3i(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16SemaHub_almostFull_ST_3i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostFull_ST_3i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostFull_ST_4i(r32) _BFGET_(r32, 4, 4) + #define SET32SemaHub_almostFull_ST_4i(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16SemaHub_almostFull_ST_4i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostFull_ST_4i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostFull_ST_5i(r32) _BFGET_(r32, 5, 5) + #define SET32SemaHub_almostFull_ST_5i(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16SemaHub_almostFull_ST_5i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostFull_ST_5i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostFull_ST_6i(r32) _BFGET_(r32, 6, 6) + #define SET32SemaHub_almostFull_ST_6i(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16SemaHub_almostFull_ST_6i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostFull_ST_6i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostFull_ST_7i(r32) _BFGET_(r32, 7, 7) + #define SET32SemaHub_almostFull_ST_7i(r32,v) _BFSET_(r32, 7, 7,v) + #define GET16SemaHub_almostFull_ST_7i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostFull_ST_7i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostFull_ST_8i(r32) _BFGET_(r32, 8, 8) + #define SET32SemaHub_almostFull_ST_8i(r32,v) _BFSET_(r32, 8, 8,v) + #define GET16SemaHub_almostFull_ST_8i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostFull_ST_8i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostFull_ST_9i(r32) _BFGET_(r32, 9, 9) + #define SET32SemaHub_almostFull_ST_9i(r32,v) _BFSET_(r32, 9, 9,v) + #define GET16SemaHub_almostFull_ST_9i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostFull_ST_9i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostFull_ST_10i(r32) _BFGET_(r32,10,10) + #define SET32SemaHub_almostFull_ST_10i(r32,v) _BFSET_(r32,10,10,v) + #define GET16SemaHub_almostFull_ST_10i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostFull_ST_10i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostFull_ST_11i(r32) _BFGET_(r32,11,11) + #define SET32SemaHub_almostFull_ST_11i(r32,v) _BFSET_(r32,11,11,v) + #define GET16SemaHub_almostFull_ST_11i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostFull_ST_11i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostFull_ST_12i(r32) _BFGET_(r32,12,12) + #define SET32SemaHub_almostFull_ST_12i(r32,v) _BFSET_(r32,12,12,v) + #define GET16SemaHub_almostFull_ST_12i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostFull_ST_12i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostFull_ST_13i(r32) _BFGET_(r32,13,13) + #define SET32SemaHub_almostFull_ST_13i(r32,v) _BFSET_(r32,13,13,v) + #define GET16SemaHub_almostFull_ST_13i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostFull_ST_13i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostFull_ST_14i(r32) _BFGET_(r32,14,14) + #define SET32SemaHub_almostFull_ST_14i(r32,v) _BFSET_(r32,14,14,v) + #define GET16SemaHub_almostFull_ST_14i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostFull_ST_14i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostFull_ST_15i(r32) _BFGET_(r32,15,15) + #define SET32SemaHub_almostFull_ST_15i(r32,v) _BFSET_(r32,15,15,v) + #define GET16SemaHub_almostFull_ST_15i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostFull_ST_15i(r16,v) _BFSET_(r16,15,15,v) + + #define GET32SemaHub_almostFull_ST_16i(r32) _BFGET_(r32,16,16) + #define SET32SemaHub_almostFull_ST_16i(r32,v) _BFSET_(r32,16,16,v) + #define GET16SemaHub_almostFull_ST_16i(r16) _BFGET_(r16, 0, 0) + #define SET16SemaHub_almostFull_ST_16i(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32SemaHub_almostFull_ST_17i(r32) _BFGET_(r32,17,17) + #define SET32SemaHub_almostFull_ST_17i(r32,v) _BFSET_(r32,17,17,v) + #define GET16SemaHub_almostFull_ST_17i(r16) _BFGET_(r16, 1, 1) + #define SET16SemaHub_almostFull_ST_17i(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32SemaHub_almostFull_ST_18i(r32) _BFGET_(r32,18,18) + #define SET32SemaHub_almostFull_ST_18i(r32,v) _BFSET_(r32,18,18,v) + #define GET16SemaHub_almostFull_ST_18i(r16) _BFGET_(r16, 2, 2) + #define SET16SemaHub_almostFull_ST_18i(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32SemaHub_almostFull_ST_19i(r32) _BFGET_(r32,19,19) + #define SET32SemaHub_almostFull_ST_19i(r32,v) _BFSET_(r32,19,19,v) + #define GET16SemaHub_almostFull_ST_19i(r16) _BFGET_(r16, 3, 3) + #define SET16SemaHub_almostFull_ST_19i(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32SemaHub_almostFull_ST_20i(r32) _BFGET_(r32,20,20) + #define SET32SemaHub_almostFull_ST_20i(r32,v) _BFSET_(r32,20,20,v) + #define GET16SemaHub_almostFull_ST_20i(r16) _BFGET_(r16, 4, 4) + #define SET16SemaHub_almostFull_ST_20i(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32SemaHub_almostFull_ST_21i(r32) _BFGET_(r32,21,21) + #define SET32SemaHub_almostFull_ST_21i(r32,v) _BFSET_(r32,21,21,v) + #define GET16SemaHub_almostFull_ST_21i(r16) _BFGET_(r16, 5, 5) + #define SET16SemaHub_almostFull_ST_21i(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32SemaHub_almostFull_ST_22i(r32) _BFGET_(r32,22,22) + #define SET32SemaHub_almostFull_ST_22i(r32,v) _BFSET_(r32,22,22,v) + #define GET16SemaHub_almostFull_ST_22i(r16) _BFGET_(r16, 6, 6) + #define SET16SemaHub_almostFull_ST_22i(r16,v) _BFSET_(r16, 6, 6,v) + + #define GET32SemaHub_almostFull_ST_23i(r32) _BFGET_(r32,23,23) + #define SET32SemaHub_almostFull_ST_23i(r32,v) _BFSET_(r32,23,23,v) + #define GET16SemaHub_almostFull_ST_23i(r16) _BFGET_(r16, 7, 7) + #define SET16SemaHub_almostFull_ST_23i(r16,v) _BFSET_(r16, 7, 7,v) + + #define GET32SemaHub_almostFull_ST_24i(r32) _BFGET_(r32,24,24) + #define SET32SemaHub_almostFull_ST_24i(r32,v) _BFSET_(r32,24,24,v) + #define GET16SemaHub_almostFull_ST_24i(r16) _BFGET_(r16, 8, 8) + #define SET16SemaHub_almostFull_ST_24i(r16,v) _BFSET_(r16, 8, 8,v) + + #define GET32SemaHub_almostFull_ST_25i(r32) _BFGET_(r32,25,25) + #define SET32SemaHub_almostFull_ST_25i(r32,v) _BFSET_(r32,25,25,v) + #define GET16SemaHub_almostFull_ST_25i(r16) _BFGET_(r16, 9, 9) + #define SET16SemaHub_almostFull_ST_25i(r16,v) _BFSET_(r16, 9, 9,v) + + #define GET32SemaHub_almostFull_ST_26i(r32) _BFGET_(r32,26,26) + #define SET32SemaHub_almostFull_ST_26i(r32,v) _BFSET_(r32,26,26,v) + #define GET16SemaHub_almostFull_ST_26i(r16) _BFGET_(r16,10,10) + #define SET16SemaHub_almostFull_ST_26i(r16,v) _BFSET_(r16,10,10,v) + + #define GET32SemaHub_almostFull_ST_27i(r32) _BFGET_(r32,27,27) + #define SET32SemaHub_almostFull_ST_27i(r32,v) _BFSET_(r32,27,27,v) + #define GET16SemaHub_almostFull_ST_27i(r16) _BFGET_(r16,11,11) + #define SET16SemaHub_almostFull_ST_27i(r16,v) _BFSET_(r16,11,11,v) + + #define GET32SemaHub_almostFull_ST_28i(r32) _BFGET_(r32,28,28) + #define SET32SemaHub_almostFull_ST_28i(r32,v) _BFSET_(r32,28,28,v) + #define GET16SemaHub_almostFull_ST_28i(r16) _BFGET_(r16,12,12) + #define SET16SemaHub_almostFull_ST_28i(r16,v) _BFSET_(r16,12,12,v) + + #define GET32SemaHub_almostFull_ST_29i(r32) _BFGET_(r32,29,29) + #define SET32SemaHub_almostFull_ST_29i(r32,v) _BFSET_(r32,29,29,v) + #define GET16SemaHub_almostFull_ST_29i(r16) _BFGET_(r16,13,13) + #define SET16SemaHub_almostFull_ST_29i(r16,v) _BFSET_(r16,13,13,v) + + #define GET32SemaHub_almostFull_ST_30i(r32) _BFGET_(r32,30,30) + #define SET32SemaHub_almostFull_ST_30i(r32,v) _BFSET_(r32,30,30,v) + #define GET16SemaHub_almostFull_ST_30i(r16) _BFGET_(r16,14,14) + #define SET16SemaHub_almostFull_ST_30i(r16,v) _BFSET_(r16,14,14,v) + + #define GET32SemaHub_almostFull_ST_31i(r32) _BFGET_(r32,31,31) + #define SET32SemaHub_almostFull_ST_31i(r32,v) _BFSET_(r32,31,31,v) + #define GET16SemaHub_almostFull_ST_31i(r16) _BFGET_(r16,15,15) + #define SET16SemaHub_almostFull_ST_31i(r16,v) _BFSET_(r16,15,15,v) + + #define w32SemaHub_almostFull {\ + UNSG32 ualmostFull_ST_0i : 1;\ + UNSG32 ualmostFull_ST_1i : 1;\ + UNSG32 ualmostFull_ST_2i : 1;\ + UNSG32 ualmostFull_ST_3i : 1;\ + UNSG32 ualmostFull_ST_4i : 1;\ + UNSG32 ualmostFull_ST_5i : 1;\ + UNSG32 ualmostFull_ST_6i : 1;\ + UNSG32 ualmostFull_ST_7i : 1;\ + UNSG32 ualmostFull_ST_8i : 1;\ + UNSG32 ualmostFull_ST_9i : 1;\ + UNSG32 ualmostFull_ST_10i : 1;\ + UNSG32 ualmostFull_ST_11i : 1;\ + UNSG32 ualmostFull_ST_12i : 1;\ + UNSG32 ualmostFull_ST_13i : 1;\ + UNSG32 ualmostFull_ST_14i : 1;\ + UNSG32 ualmostFull_ST_15i : 1;\ + UNSG32 ualmostFull_ST_16i : 1;\ + UNSG32 ualmostFull_ST_17i : 1;\ + UNSG32 ualmostFull_ST_18i : 1;\ + UNSG32 ualmostFull_ST_19i : 1;\ + UNSG32 ualmostFull_ST_20i : 1;\ + UNSG32 ualmostFull_ST_21i : 1;\ + UNSG32 ualmostFull_ST_22i : 1;\ + UNSG32 ualmostFull_ST_23i : 1;\ + UNSG32 ualmostFull_ST_24i : 1;\ + UNSG32 ualmostFull_ST_25i : 1;\ + UNSG32 ualmostFull_ST_26i : 1;\ + UNSG32 ualmostFull_ST_27i : 1;\ + UNSG32 ualmostFull_ST_28i : 1;\ + UNSG32 ualmostFull_ST_29i : 1;\ + UNSG32 ualmostFull_ST_30i : 1;\ + UNSG32 ualmostFull_ST_31i : 1;\ + } + union { UNSG32 u32SemaHub_almostFull; + struct w32SemaHub_almostFull; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx398 [104]; + /////////////////////////////////////////////////////////// + } SIE_SemaHub; + + typedef union T32SemaHub_PUSH + { UNSG32 u32; + struct w32SemaHub_PUSH; + } T32SemaHub_PUSH; + typedef union T32SemaHub_POP + { UNSG32 u32; + struct w32SemaHub_POP; + } T32SemaHub_POP; + typedef union T32SemaHub_empty + { UNSG32 u32; + struct w32SemaHub_empty; + } T32SemaHub_empty; + typedef union T32SemaHub_full + { UNSG32 u32; + struct w32SemaHub_full; + } T32SemaHub_full; + typedef union T32SemaHub_almostEmpty + { UNSG32 u32; + struct w32SemaHub_almostEmpty; + } T32SemaHub_almostEmpty; + typedef union T32SemaHub_almostFull + { UNSG32 u32; + struct w32SemaHub_almostFull; + } T32SemaHub_almostFull; + /////////////////////////////////////////////////////////// + + typedef union TSemaHub_PUSH + { UNSG32 u32[1]; + struct { + struct w32SemaHub_PUSH; + }; + } TSemaHub_PUSH; + typedef union TSemaHub_POP + { UNSG32 u32[1]; + struct { + struct w32SemaHub_POP; + }; + } TSemaHub_POP; + typedef union TSemaHub_empty + { UNSG32 u32[1]; + struct { + struct w32SemaHub_empty; + }; + } TSemaHub_empty; + typedef union TSemaHub_full + { UNSG32 u32[1]; + struct { + struct w32SemaHub_full; + }; + } TSemaHub_full; + typedef union TSemaHub_almostEmpty + { UNSG32 u32[1]; + struct { + struct w32SemaHub_almostEmpty; + }; + } TSemaHub_almostEmpty; + typedef union TSemaHub_almostFull + { UNSG32 u32[1]; + struct { + struct w32SemaHub_almostFull; + }; + } TSemaHub_almostFull; + + /////////////////////////////////////////////////////////// + SIGN32 SemaHub_drvrd(SIE_SemaHub *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 SemaHub_drvwr(SIE_SemaHub *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void SemaHub_reset(SIE_SemaHub *p); + SIGN32 SemaHub_cmp (SIE_SemaHub *p, SIE_SemaHub *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define SemaHub_check(p,pie,pfx,hLOG) SemaHub_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define SemaHub_print(p, pfx,hLOG) SemaHub_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: SemaHub +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE FiFo biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 20 BASE +/// ### +/// * Base address (byte-address) of a FIFO in the shared SRAM. A channel's read/write pointers will be added to this “BASE†to get exact location of shared SRAM. +/// * Note: aligned with base SRAM data bus. +/// * For example, if SRAM data is 64-bit, then base[2:0] should be 3'b0; +/// ### +/// %% 12 # Stuffing bits... +/// @ 0x00004 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to this register will enable this channel, or 0 to this register will disable this channel. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to clear FIFO pointers to 0. +/// * Note : +/// * CPU should make sure to disabled the channel (write 0 to START_EN register) before issue clear command, otherwise the clear request will be ignored. +/// * Do not restart the channel when clear operation is in process. +/// * HW will make sure there is no pending transactions before execute the clear operation. +/// * Associated semaphore cell needs reset separately by re-write “CFG_DEPTH†+/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C FLUSH (W-) +/// %unsigned 1 EN +/// ### +/// * No support for now +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 23b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_FiFo +#define h_FiFo (){} + + #define RA_FiFo_CFG 0x0000 + + #define BA_FiFo_CFG_BASE 0x0000 + #define B16FiFo_CFG_BASE 0x0000 + #define LSb32FiFo_CFG_BASE 0 + #define LSb16FiFo_CFG_BASE 0 + #define bFiFo_CFG_BASE 20 + #define MSK32FiFo_CFG_BASE 0x000FFFFF + /////////////////////////////////////////////////////////// + #define RA_FiFo_START 0x0004 + + #define BA_FiFo_START_EN 0x0004 + #define B16FiFo_START_EN 0x0004 + #define LSb32FiFo_START_EN 0 + #define LSb16FiFo_START_EN 0 + #define bFiFo_START_EN 1 + #define MSK32FiFo_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_FiFo_CLEAR 0x0008 + + #define BA_FiFo_CLEAR_EN 0x0008 + #define B16FiFo_CLEAR_EN 0x0008 + #define LSb32FiFo_CLEAR_EN 0 + #define LSb16FiFo_CLEAR_EN 0 + #define bFiFo_CLEAR_EN 1 + #define MSK32FiFo_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_FiFo_FLUSH 0x000C + + #define BA_FiFo_FLUSH_EN 0x000C + #define B16FiFo_FLUSH_EN 0x000C + #define LSb32FiFo_FLUSH_EN 0 + #define LSb16FiFo_FLUSH_EN 0 + #define bFiFo_FLUSH_EN 1 + #define MSK32FiFo_FLUSH_EN 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_FiFo { + /////////////////////////////////////////////////////////// + #define GET32FiFo_CFG_BASE(r32) _BFGET_(r32,19, 0) + #define SET32FiFo_CFG_BASE(r32,v) _BFSET_(r32,19, 0,v) + + #define w32FiFo_CFG {\ + UNSG32 uCFG_BASE : 20;\ + UNSG32 RSVDx0_b20 : 12;\ + } + union { UNSG32 u32FiFo_CFG; + struct w32FiFo_CFG; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } + union { UNSG32 u32FiFo_START; + struct w32FiFo_START; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32FiFo_CLEAR; + struct w32FiFo_CLEAR; + }; + /////////////////////////////////////////////////////////// + #define GET32FiFo_FLUSH_EN(r32) _BFGET_(r32, 0, 0) + #define SET32FiFo_FLUSH_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16FiFo_FLUSH_EN(r16) _BFGET_(r16, 0, 0) + #define SET16FiFo_FLUSH_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32FiFo_FLUSH {\ + UNSG32 uFLUSH_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32FiFo_FLUSH; + struct w32FiFo_FLUSH; + }; + /////////////////////////////////////////////////////////// + } SIE_FiFo; + + typedef union T32FiFo_CFG + { UNSG32 u32; + struct w32FiFo_CFG; + } T32FiFo_CFG; + typedef union T32FiFo_START + { UNSG32 u32; + struct w32FiFo_START; + } T32FiFo_START; + typedef union T32FiFo_CLEAR + { UNSG32 u32; + struct w32FiFo_CLEAR; + } T32FiFo_CLEAR; + typedef union T32FiFo_FLUSH + { UNSG32 u32; + struct w32FiFo_FLUSH; + } T32FiFo_FLUSH; + /////////////////////////////////////////////////////////// + + typedef union TFiFo_CFG + { UNSG32 u32[1]; + struct { + struct w32FiFo_CFG; + }; + } TFiFo_CFG; + typedef union TFiFo_START + { UNSG32 u32[1]; + struct { + struct w32FiFo_START; + }; + } TFiFo_START; + typedef union TFiFo_CLEAR + { UNSG32 u32[1]; + struct { + struct w32FiFo_CLEAR; + }; + } TFiFo_CLEAR; + typedef union TFiFo_FLUSH + { UNSG32 u32[1]; + struct { + struct w32FiFo_FLUSH; + }; + } TFiFo_FLUSH; + + /////////////////////////////////////////////////////////// + SIGN32 FiFo_drvrd(SIE_FiFo *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 FiFo_drvwr(SIE_FiFo *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void FiFo_reset(SIE_FiFo *p); + SIGN32 FiFo_cmp (SIE_FiFo *p, SIE_FiFo *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define FiFo_check(p,pie,pfx,hLOG) FiFo_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define FiFo_print(p, pfx,hLOG) FiFo_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: FiFo +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE HBO biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 FiFoCtl +/// $SemaHub FiFoCtl REG +/// @ 0x00400 ARR (P) +/// # 0x00400 FiFo +/// $FiFo FiFo REG [32] +/// ### +/// * Up-to 32 FIFO channels +/// * FiFo[N] is controlled by HBO.FiFoCtl.Channel[N] +/// ### +/// @ 0x00600 BUSY (R-) +/// %unsigned 32 ST +/// ### +/// * Per channel status +/// * Indicate the clear operation status. +/// * 1: clear is in process. +/// * 0 : clear is done. +/// ### +/// @ 0x00604 (W-) +/// # # Stuffing bytes... +/// %% 2016 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 1792B, bits: 1920b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_HBO +#define h_HBO (){} + + #define RA_HBO_FiFoCtl 0x0000 + /////////////////////////////////////////////////////////// + #define RA_HBO_ARR 0x0400 + #define RA_HBO_FiFo 0x0400 + /////////////////////////////////////////////////////////// + #define RA_HBO_BUSY 0x0600 + + #define BA_HBO_BUSY_ST 0x0600 + #define B16HBO_BUSY_ST 0x0600 + #define LSb32HBO_BUSY_ST 0 + #define LSb16HBO_BUSY_ST 0 + #define bHBO_BUSY_ST 32 + #define MSK32HBO_BUSY_ST 0xFFFFFFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_HBO { + /////////////////////////////////////////////////////////// + SIE_SemaHub ie_FiFoCtl; + /////////////////////////////////////////////////////////// + SIE_FiFo ie_FiFo[32]; + /////////////////////////////////////////////////////////// + #define GET32HBO_BUSY_ST(r32) _BFGET_(r32,31, 0) + #define SET32HBO_BUSY_ST(r32,v) _BFSET_(r32,31, 0,v) + + #define w32HBO_BUSY {\ + UNSG32 uBUSY_ST : 32;\ + } + union { UNSG32 u32HBO_BUSY; + struct w32HBO_BUSY; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDx604 [252]; + /////////////////////////////////////////////////////////// + } SIE_HBO; + + typedef union T32HBO_BUSY + { UNSG32 u32; + struct w32HBO_BUSY; + } T32HBO_BUSY; + /////////////////////////////////////////////////////////// + + typedef union THBO_BUSY + { UNSG32 u32[1]; + struct { + struct w32HBO_BUSY; + }; + } THBO_BUSY; + + /////////////////////////////////////////////////////////// + SIGN32 HBO_drvrd(SIE_HBO *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 HBO_drvwr(SIE_HBO *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void HBO_reset(SIE_HBO *p); + SIGN32 HBO_cmp (SIE_HBO *p, SIE_HBO *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define HBO_check(p,pie,pfx,hLOG) HBO_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define HBO_print(p, pfx,hLOG) HBO_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: HBO +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE LLDesFmt biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 mem (P) +/// %unsigned 16 size +/// ### +/// * The size of one piece of scattered memory. +/// ### +/// %% 16 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 16b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_LLDesFmt +#define h_LLDesFmt (){} + + #define RA_LLDesFmt_mem 0x0000 + + #define BA_LLDesFmt_mem_size 0x0000 + #define B16LLDesFmt_mem_size 0x0000 + #define LSb32LLDesFmt_mem_size 0 + #define LSb16LLDesFmt_mem_size 0 + #define bLLDesFmt_mem_size 16 + #define MSK32LLDesFmt_mem_size 0x0000FFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_LLDesFmt { + /////////////////////////////////////////////////////////// + #define GET32LLDesFmt_mem_size(r32) _BFGET_(r32,15, 0) + #define SET32LLDesFmt_mem_size(r32,v) _BFSET_(r32,15, 0,v) + #define GET16LLDesFmt_mem_size(r16) _BFGET_(r16,15, 0) + #define SET16LLDesFmt_mem_size(r16,v) _BFSET_(r16,15, 0,v) + + #define w32LLDesFmt_mem {\ + UNSG32 umem_size : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32LLDesFmt_mem; + struct w32LLDesFmt_mem; + }; + /////////////////////////////////////////////////////////// + } SIE_LLDesFmt; + + typedef union T32LLDesFmt_mem + { UNSG32 u32; + struct w32LLDesFmt_mem; + } T32LLDesFmt_mem; + /////////////////////////////////////////////////////////// + + typedef union TLLDesFmt_mem + { UNSG32 u32[1]; + struct { + struct w32LLDesFmt_mem; + }; + } TLLDesFmt_mem; + + /////////////////////////////////////////////////////////// + SIGN32 LLDesFmt_drvrd(SIE_LLDesFmt *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 LLDesFmt_drvwr(SIE_LLDesFmt *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void LLDesFmt_reset(SIE_LLDesFmt *p); + SIGN32 LLDesFmt_cmp (SIE_LLDesFmt *p, SIE_LLDesFmt *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define LLDesFmt_check(p,pie,pfx,hLOG) LLDesFmt_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define LLDesFmt_print(p, pfx,hLOG) LLDesFmt_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: LLDesFmt +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmdHDR (4,4) +/// ### +/// * 32-bit dHub command header +/// * [0:31] +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 DESC (W-) +/// %unsigned 16 size +/// ### +/// * amount of data to be transferred, in bytes or MTU. +/// * Size of 0 is forbidden. +/// ### +/// %unsigned 1 sizeMTU +/// ### +/// * 0: size given in bytes; +/// * 1: size given in MTU (see dHubChCtl.CFG.MTU for MTU size definition) +/// ### +/// %unsigned 1 semOpMTU +/// ### +/// * 0: semaphore operations applied on dHubCmd level +/// * 1: semaphore operations applied on MTU level +/// ### +/// %unsigned 5 chkSemId +/// ### +/// * ID of semaphore to check before cmd / MTU; +/// * 0 indicates semaphore check is disabled +/// ### +/// %unsigned 5 updSemId +/// ### +/// * ID of semaphore to update after cmd / MTU; +/// * 0 indicates semaphore update is disabled +/// ### +/// %unsigned 1 interrupt +/// ### +/// * 1: raise interrupt upon command finish +/// * end dHubCmdHDR +/// ### +/// %% 3 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 29b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmdHDR +#define h_dHubCmdHDR (){} + + #define RA_dHubCmdHDR_DESC 0x0000 + + #define BA_dHubCmdHDR_DESC_size 0x0000 + #define B16dHubCmdHDR_DESC_size 0x0000 + #define LSb32dHubCmdHDR_DESC_size 0 + #define LSb16dHubCmdHDR_DESC_size 0 + #define bdHubCmdHDR_DESC_size 16 + #define MSK32dHubCmdHDR_DESC_size 0x0000FFFF + + #define BA_dHubCmdHDR_DESC_sizeMTU 0x0002 + #define B16dHubCmdHDR_DESC_sizeMTU 0x0002 + #define LSb32dHubCmdHDR_DESC_sizeMTU 16 + #define LSb16dHubCmdHDR_DESC_sizeMTU 0 + #define bdHubCmdHDR_DESC_sizeMTU 1 + #define MSK32dHubCmdHDR_DESC_sizeMTU 0x00010000 + + #define BA_dHubCmdHDR_DESC_semOpMTU 0x0002 + #define B16dHubCmdHDR_DESC_semOpMTU 0x0002 + #define LSb32dHubCmdHDR_DESC_semOpMTU 17 + #define LSb16dHubCmdHDR_DESC_semOpMTU 1 + #define bdHubCmdHDR_DESC_semOpMTU 1 + #define MSK32dHubCmdHDR_DESC_semOpMTU 0x00020000 + + #define BA_dHubCmdHDR_DESC_chkSemId 0x0002 + #define B16dHubCmdHDR_DESC_chkSemId 0x0002 + #define LSb32dHubCmdHDR_DESC_chkSemId 18 + #define LSb16dHubCmdHDR_DESC_chkSemId 2 + #define bdHubCmdHDR_DESC_chkSemId 5 + #define MSK32dHubCmdHDR_DESC_chkSemId 0x007C0000 + + #define BA_dHubCmdHDR_DESC_updSemId 0x0002 + #define B16dHubCmdHDR_DESC_updSemId 0x0002 + #define LSb32dHubCmdHDR_DESC_updSemId 23 + #define LSb16dHubCmdHDR_DESC_updSemId 7 + #define bdHubCmdHDR_DESC_updSemId 5 + #define MSK32dHubCmdHDR_DESC_updSemId 0x0F800000 + + #define BA_dHubCmdHDR_DESC_interrupt 0x0003 + #define B16dHubCmdHDR_DESC_interrupt 0x0002 + #define LSb32dHubCmdHDR_DESC_interrupt 28 + #define LSb16dHubCmdHDR_DESC_interrupt 12 + #define bdHubCmdHDR_DESC_interrupt 1 + #define MSK32dHubCmdHDR_DESC_interrupt 0x10000000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmdHDR { + /////////////////////////////////////////////////////////// + #define GET32dHubCmdHDR_DESC_size(r32) _BFGET_(r32,15, 0) + #define SET32dHubCmdHDR_DESC_size(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubCmdHDR_DESC_size(r16) _BFGET_(r16,15, 0) + #define SET16dHubCmdHDR_DESC_size(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubCmdHDR_DESC_sizeMTU(r32) _BFGET_(r32,16,16) + #define SET32dHubCmdHDR_DESC_sizeMTU(r32,v) _BFSET_(r32,16,16,v) + #define GET16dHubCmdHDR_DESC_sizeMTU(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmdHDR_DESC_sizeMTU(r16,v) _BFSET_(r16, 0, 0,v) + + #define GET32dHubCmdHDR_DESC_semOpMTU(r32) _BFGET_(r32,17,17) + #define SET32dHubCmdHDR_DESC_semOpMTU(r32,v) _BFSET_(r32,17,17,v) + #define GET16dHubCmdHDR_DESC_semOpMTU(r16) _BFGET_(r16, 1, 1) + #define SET16dHubCmdHDR_DESC_semOpMTU(r16,v) _BFSET_(r16, 1, 1,v) + + #define GET32dHubCmdHDR_DESC_chkSemId(r32) _BFGET_(r32,22,18) + #define SET32dHubCmdHDR_DESC_chkSemId(r32,v) _BFSET_(r32,22,18,v) + #define GET16dHubCmdHDR_DESC_chkSemId(r16) _BFGET_(r16, 6, 2) + #define SET16dHubCmdHDR_DESC_chkSemId(r16,v) _BFSET_(r16, 6, 2,v) + + #define GET32dHubCmdHDR_DESC_updSemId(r32) _BFGET_(r32,27,23) + #define SET32dHubCmdHDR_DESC_updSemId(r32,v) _BFSET_(r32,27,23,v) + #define GET16dHubCmdHDR_DESC_updSemId(r16) _BFGET_(r16,11, 7) + #define SET16dHubCmdHDR_DESC_updSemId(r16,v) _BFSET_(r16,11, 7,v) + + #define GET32dHubCmdHDR_DESC_interrupt(r32) _BFGET_(r32,28,28) + #define SET32dHubCmdHDR_DESC_interrupt(r32,v) _BFSET_(r32,28,28,v) + #define GET16dHubCmdHDR_DESC_interrupt(r16) _BFGET_(r16,12,12) + #define SET16dHubCmdHDR_DESC_interrupt(r16,v) _BFSET_(r16,12,12,v) + + #define w32dHubCmdHDR_DESC {\ + UNSG32 uDESC_size : 16;\ + UNSG32 uDESC_sizeMTU : 1;\ + UNSG32 uDESC_semOpMTU : 1;\ + UNSG32 uDESC_chkSemId : 5;\ + UNSG32 uDESC_updSemId : 5;\ + UNSG32 uDESC_interrupt : 1;\ + UNSG32 RSVDx0_b29 : 3;\ + } + union { UNSG32 u32dHubCmdHDR_DESC; + struct w32dHubCmdHDR_DESC; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubCmdHDR; + + typedef union T32dHubCmdHDR_DESC + { UNSG32 u32; + struct w32dHubCmdHDR_DESC; + } T32dHubCmdHDR_DESC; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmdHDR_DESC + { UNSG32 u32[1]; + struct { + struct w32dHubCmdHDR_DESC; + }; + } TdHubCmdHDR_DESC; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmdHDR_drvrd(SIE_dHubCmdHDR *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmdHDR_drvwr(SIE_dHubCmdHDR *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmdHDR_reset(SIE_dHubCmdHDR *p); + SIGN32 dHubCmdHDR_cmp (SIE_dHubCmdHDR *p, SIE_dHubCmdHDR *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmdHDR_check(p,pie,pfx,hLOG) dHubCmdHDR_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmdHDR_print(p, pfx,hLOG) dHubCmdHDR_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmdHDR +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmd biu (4,4) +/// ### +/// * 64-bit dHub command issued by read/write masters +/// * [0:31] +/// ### +/// # # ---------------------------------------------------------- +/// @ 0x00000 MEM (W-) +/// %unsigned 32 addr +/// ### +/// * DRAM data address, in bytes; not necessarily MTU aligned. +/// * [32:63] +/// ### +/// @ 0x00004 (P) +/// # 0x00004 HDR +/// $dHubCmdHDR HDR REG +/// ### +/// * end dHubCmd +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 8B, bits: 61b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmd +#define h_dHubCmd (){} + + #define RA_dHubCmd_MEM 0x0000 + + #define BA_dHubCmd_MEM_addr 0x0000 + #define B16dHubCmd_MEM_addr 0x0000 + #define LSb32dHubCmd_MEM_addr 0 + #define LSb16dHubCmd_MEM_addr 0 + #define bdHubCmd_MEM_addr 32 + #define MSK32dHubCmd_MEM_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_dHubCmd_HDR 0x0004 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmd { + /////////////////////////////////////////////////////////// + #define GET32dHubCmd_MEM_addr(r32) _BFGET_(r32,31, 0) + #define SET32dHubCmd_MEM_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32dHubCmd_MEM {\ + UNSG32 uMEM_addr : 32;\ + } + union { UNSG32 u32dHubCmd_MEM; + struct w32dHubCmd_MEM; + }; + /////////////////////////////////////////////////////////// + SIE_dHubCmdHDR ie_HDR; + /////////////////////////////////////////////////////////// + } SIE_dHubCmd; + + typedef union T32dHubCmd_MEM + { UNSG32 u32; + struct w32dHubCmd_MEM; + } T32dHubCmd_MEM; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmd_MEM + { UNSG32 u32[1]; + struct { + struct w32dHubCmd_MEM; + }; + } TdHubCmd_MEM; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmd_drvrd(SIE_dHubCmd *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmd_drvwr(SIE_dHubCmd *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmd_reset(SIE_dHubCmd *p); + SIGN32 dHubCmd_cmp (SIE_dHubCmd *p, SIE_dHubCmd *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmd_check(p,pie,pfx,hLOG) dHubCmd_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmd_print(p, pfx,hLOG) dHubCmd_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmd +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubChannel biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 CFG (W-) +/// %unsigned 2 MTU +/// : 8byte 0x0 +/// : 32byte 0x1 +/// : 128byte 0x2 +/// : 1024byte 0x3 +/// ### +/// * Minimum transfer unit of the channel +/// ### +/// %unsigned 1 QoS +/// ### +/// * Write 1 to turn on QoS detection +/// ### +/// %unsigned 1 selfLoop +/// ### +/// * Write 1 to enable cmd looping support; 0 to turn off +/// ### +/// %unsigned 1 intrCtl 0x0 +/// : cmdDone 0x0 +/// : chIdle 0x1 +/// ### +/// * 0 : default vlaue, the interrupt is triggered by the finish of the dHub command if the interrupt bit is defined in the dHub command. +/// * 1 : The interrupt is triggered if the dHub channel is idle ( no busy and no pending and the corresponding dHub command Q is empty). +/// ### +/// %unsigned 1 hScan 0x0 +/// : rastScan 0x0 +/// : invScan 0x1 +/// ### +/// * This parameter will only apply to read channels. +/// * It will affect 1D dHub command for the channel. +/// * When scan is set to 1 (invScan), the data (beat) inside the dHub command will be fetched in the inverse order. ie. The data from the last address will come first and the data (beat) from the first address will come lastly. +/// ### +/// %unsigned 1 vScan 0x0 +/// : rastScan 0x0 +/// : invScan 0x1 +/// ### +/// * This parameter will only apply to read channels. +/// * It will affect 2D channels. +/// * When scan is set to 1 (invScan), +/// * The last address line (1D command) will be fetched first, and the first address line will be fetched lastly. +/// ### +/// %% 25 # Stuffing bits... +/// @ 0x00004 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to enable the channel; 0 to pause the channel +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00008 CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to reset the channel controller state +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C FLUSH (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to start the data flushing process. Invalid for read (M2H) channels +/// * end dHubChannel +/// ### +/// %% 31 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 16B, bits: 10b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubChannel +#define h_dHubChannel (){} + + #define RA_dHubChannel_CFG 0x0000 + + #define BA_dHubChannel_CFG_MTU 0x0000 + #define B16dHubChannel_CFG_MTU 0x0000 + #define LSb32dHubChannel_CFG_MTU 0 + #define LSb16dHubChannel_CFG_MTU 0 + #define bdHubChannel_CFG_MTU 2 + #define MSK32dHubChannel_CFG_MTU 0x00000003 + #define dHubChannel_CFG_MTU_8byte 0x0 + #define dHubChannel_CFG_MTU_32byte 0x1 + #define dHubChannel_CFG_MTU_128byte 0x2 + #define dHubChannel_CFG_MTU_1024byte 0x3 + + #define BA_dHubChannel_CFG_QoS 0x0000 + #define B16dHubChannel_CFG_QoS 0x0000 + #define LSb32dHubChannel_CFG_QoS 2 + #define LSb16dHubChannel_CFG_QoS 2 + #define bdHubChannel_CFG_QoS 1 + #define MSK32dHubChannel_CFG_QoS 0x00000004 + + #define BA_dHubChannel_CFG_selfLoop 0x0000 + #define B16dHubChannel_CFG_selfLoop 0x0000 + #define LSb32dHubChannel_CFG_selfLoop 3 + #define LSb16dHubChannel_CFG_selfLoop 3 + #define bdHubChannel_CFG_selfLoop 1 + #define MSK32dHubChannel_CFG_selfLoop 0x00000008 + + #define BA_dHubChannel_CFG_intrCtl 0x0000 + #define B16dHubChannel_CFG_intrCtl 0x0000 + #define LSb32dHubChannel_CFG_intrCtl 4 + #define LSb16dHubChannel_CFG_intrCtl 4 + #define bdHubChannel_CFG_intrCtl 1 + #define MSK32dHubChannel_CFG_intrCtl 0x00000010 + #define dHubChannel_CFG_intrCtl_cmdDone 0x0 + #define dHubChannel_CFG_intrCtl_chIdle 0x1 + + #define BA_dHubChannel_CFG_hScan 0x0000 + #define B16dHubChannel_CFG_hScan 0x0000 + #define LSb32dHubChannel_CFG_hScan 5 + #define LSb16dHubChannel_CFG_hScan 5 + #define bdHubChannel_CFG_hScan 1 + #define MSK32dHubChannel_CFG_hScan 0x00000020 + #define dHubChannel_CFG_hScan_rastScan 0x0 + #define dHubChannel_CFG_hScan_invScan 0x1 + + #define BA_dHubChannel_CFG_vScan 0x0000 + #define B16dHubChannel_CFG_vScan 0x0000 + #define LSb32dHubChannel_CFG_vScan 6 + #define LSb16dHubChannel_CFG_vScan 6 + #define bdHubChannel_CFG_vScan 1 + #define MSK32dHubChannel_CFG_vScan 0x00000040 + #define dHubChannel_CFG_vScan_rastScan 0x0 + #define dHubChannel_CFG_vScan_invScan 0x1 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_START 0x0004 + + #define BA_dHubChannel_START_EN 0x0004 + #define B16dHubChannel_START_EN 0x0004 + #define LSb32dHubChannel_START_EN 0 + #define LSb16dHubChannel_START_EN 0 + #define bdHubChannel_START_EN 1 + #define MSK32dHubChannel_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_CLEAR 0x0008 + + #define BA_dHubChannel_CLEAR_EN 0x0008 + #define B16dHubChannel_CLEAR_EN 0x0008 + #define LSb32dHubChannel_CLEAR_EN 0 + #define LSb16dHubChannel_CLEAR_EN 0 + #define bdHubChannel_CLEAR_EN 1 + #define MSK32dHubChannel_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubChannel_FLUSH 0x000C + + #define BA_dHubChannel_FLUSH_EN 0x000C + #define B16dHubChannel_FLUSH_EN 0x000C + #define LSb32dHubChannel_FLUSH_EN 0 + #define LSb16dHubChannel_FLUSH_EN 0 + #define bdHubChannel_FLUSH_EN 1 + #define MSK32dHubChannel_FLUSH_EN 0x00000001 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubChannel { + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_CFG_MTU(r32) _BFGET_(r32, 1, 0) + #define SET32dHubChannel_CFG_MTU(r32,v) _BFSET_(r32, 1, 0,v) + #define GET16dHubChannel_CFG_MTU(r16) _BFGET_(r16, 1, 0) + #define SET16dHubChannel_CFG_MTU(r16,v) _BFSET_(r16, 1, 0,v) + + #define GET32dHubChannel_CFG_QoS(r32) _BFGET_(r32, 2, 2) + #define SET32dHubChannel_CFG_QoS(r32,v) _BFSET_(r32, 2, 2,v) + #define GET16dHubChannel_CFG_QoS(r16) _BFGET_(r16, 2, 2) + #define SET16dHubChannel_CFG_QoS(r16,v) _BFSET_(r16, 2, 2,v) + + #define GET32dHubChannel_CFG_selfLoop(r32) _BFGET_(r32, 3, 3) + #define SET32dHubChannel_CFG_selfLoop(r32,v) _BFSET_(r32, 3, 3,v) + #define GET16dHubChannel_CFG_selfLoop(r16) _BFGET_(r16, 3, 3) + #define SET16dHubChannel_CFG_selfLoop(r16,v) _BFSET_(r16, 3, 3,v) + + #define GET32dHubChannel_CFG_intrCtl(r32) _BFGET_(r32, 4, 4) + #define SET32dHubChannel_CFG_intrCtl(r32,v) _BFSET_(r32, 4, 4,v) + #define GET16dHubChannel_CFG_intrCtl(r16) _BFGET_(r16, 4, 4) + #define SET16dHubChannel_CFG_intrCtl(r16,v) _BFSET_(r16, 4, 4,v) + + #define GET32dHubChannel_CFG_hScan(r32) _BFGET_(r32, 5, 5) + #define SET32dHubChannel_CFG_hScan(r32,v) _BFSET_(r32, 5, 5,v) + #define GET16dHubChannel_CFG_hScan(r16) _BFGET_(r16, 5, 5) + #define SET16dHubChannel_CFG_hScan(r16,v) _BFSET_(r16, 5, 5,v) + + #define GET32dHubChannel_CFG_vScan(r32) _BFGET_(r32, 6, 6) + #define SET32dHubChannel_CFG_vScan(r32,v) _BFSET_(r32, 6, 6,v) + #define GET16dHubChannel_CFG_vScan(r16) _BFGET_(r16, 6, 6) + #define SET16dHubChannel_CFG_vScan(r16,v) _BFSET_(r16, 6, 6,v) + + #define w32dHubChannel_CFG {\ + UNSG32 uCFG_MTU : 2;\ + UNSG32 uCFG_QoS : 1;\ + UNSG32 uCFG_selfLoop : 1;\ + UNSG32 uCFG_intrCtl : 1;\ + UNSG32 uCFG_hScan : 1;\ + UNSG32 uCFG_vScan : 1;\ + UNSG32 RSVDx0_b7 : 25;\ + } + union { UNSG32 u32dHubChannel_CFG; + struct w32dHubChannel_CFG; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx4_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_START; + struct w32dHubChannel_START; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_CLEAR; + struct w32dHubChannel_CLEAR; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubChannel_FLUSH_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubChannel_FLUSH_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubChannel_FLUSH_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubChannel_FLUSH_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubChannel_FLUSH {\ + UNSG32 uFLUSH_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32dHubChannel_FLUSH; + struct w32dHubChannel_FLUSH; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubChannel; + + typedef union T32dHubChannel_CFG + { UNSG32 u32; + struct w32dHubChannel_CFG; + } T32dHubChannel_CFG; + typedef union T32dHubChannel_START + { UNSG32 u32; + struct w32dHubChannel_START; + } T32dHubChannel_START; + typedef union T32dHubChannel_CLEAR + { UNSG32 u32; + struct w32dHubChannel_CLEAR; + } T32dHubChannel_CLEAR; + typedef union T32dHubChannel_FLUSH + { UNSG32 u32; + struct w32dHubChannel_FLUSH; + } T32dHubChannel_FLUSH; + /////////////////////////////////////////////////////////// + + typedef union TdHubChannel_CFG + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_CFG; + }; + } TdHubChannel_CFG; + typedef union TdHubChannel_START + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_START; + }; + } TdHubChannel_START; + typedef union TdHubChannel_CLEAR + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_CLEAR; + }; + } TdHubChannel_CLEAR; + typedef union TdHubChannel_FLUSH + { UNSG32 u32[1]; + struct { + struct w32dHubChannel_FLUSH; + }; + } TdHubChannel_FLUSH; + + /////////////////////////////////////////////////////////// + SIGN32 dHubChannel_drvrd(SIE_dHubChannel *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubChannel_drvwr(SIE_dHubChannel *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubChannel_reset(SIE_dHubChannel *p); + SIGN32 dHubChannel_cmp (SIE_dHubChannel *p, SIE_dHubChannel *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubChannel_check(p,pie,pfx,hLOG) dHubChannel_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubChannel_print(p, pfx,hLOG) dHubChannel_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubChannel +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubReg biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 SemaHub +/// $SemaHub SemaHub REG +/// ### +/// * For dHub internal interrupts, also provide semaphore service for external (all channels will be opened to external to access). +/// * Channel 0 is used for dHub.HBO interrupt. +/// * Channel N+1 is used for dHub.Channel[N] interrupt. +/// ### +/// @ 0x00400 (P) +/// # 0x00400 HBO +/// $HBO HBO REG +/// ### +/// * For dHub channels (command/data queues), also provide (unused) FIFO service for external. +/// * Channel 2N is used for dHub.Channel[N] command. +/// * Channel 2N+1 is used for dHub.Channel[N] data. +/// ### +/// @ 0x00B00 ARR (P) +/// # 0x00B00 channelCtl +/// $dHubChannel channelCtl REG [16] +/// ### +/// * Up-to 16 channels +/// ### +/// @ 0x00C00 BUSY (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: no ongoing command is being processed, and no flushing is taking place +/// * 1: channel controller is busy +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C04 PENDING (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: Response queue is empty, meaning no outstanding AXI transactions +/// * 1: there exist some outstanding AXI transactions +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C08 busRstEn (RW-) +/// %unsigned 1 reg 0x0 +/// ### +/// * Write one to this register will trigger gate-keeper to take over the AXI bus. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00C0C busRstDone (R-) +/// %unsigned 1 reg 0x1 +/// ### +/// * After gate-keeper take over the AXI bus, it will assert this bit once there is no outstanding transactions on AXI bus. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00C10 flowCtl (P) +/// %unsigned 8 rAlpha 0x0 +/// %unsigned 8 wAlpha 0x0 +/// ### +/// * Flow control parameter for read and write axi master. +/// * clkCnt=(alpha*bstLen)>>4. +/// * This # of clock cycles will be blocked for the axi master after an axi command with the burst length of “bstLenâ€. +/// * When set alpha to be 0, the master will never be blocked. +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00C14 axiCmdCol (P) +/// %unsigned 16 rCnt 0x0 +/// %unsigned 16 wCnt 0x0 +/// ### +/// * Axi command collection. The counter value indicate read/write do the command collection for # of clock cycles, start from the first command pushed to an empty command Q. Here are the conditions that will trigger the Axi master to send out command. +/// * Cmd Q full or the counter count down to “0†from the programmed value. +/// * Set the counter to 0 will disable the command collection. +/// * end dHubReg +/// ### +/// @ 0x00C18 (W-) +/// # # Stuffing bytes... +/// %% 1856 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 3328B, bits: 3314b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubReg +#define h_dHubReg (){} + + #define RA_dHubReg_SemaHub 0x0000 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_HBO 0x0400 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_ARR 0x0B00 + #define RA_dHubReg_channelCtl 0x0B00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_BUSY 0x0C00 + + #define BA_dHubReg_BUSY_ST 0x0C00 + #define B16dHubReg_BUSY_ST 0x0C00 + #define LSb32dHubReg_BUSY_ST 0 + #define LSb16dHubReg_BUSY_ST 0 + #define bdHubReg_BUSY_ST 16 + #define MSK32dHubReg_BUSY_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg_PENDING 0x0C04 + + #define BA_dHubReg_PENDING_ST 0x0C04 + #define B16dHubReg_PENDING_ST 0x0C04 + #define LSb32dHubReg_PENDING_ST 0 + #define LSb16dHubReg_PENDING_ST 0 + #define bdHubReg_PENDING_ST 16 + #define MSK32dHubReg_PENDING_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg_busRstEn 0x0C08 + + #define BA_dHubReg_busRstEn_reg 0x0C08 + #define B16dHubReg_busRstEn_reg 0x0C08 + #define LSb32dHubReg_busRstEn_reg 0 + #define LSb16dHubReg_busRstEn_reg 0 + #define bdHubReg_busRstEn_reg 1 + #define MSK32dHubReg_busRstEn_reg 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_busRstDone 0x0C0C + + #define BA_dHubReg_busRstDone_reg 0x0C0C + #define B16dHubReg_busRstDone_reg 0x0C0C + #define LSb32dHubReg_busRstDone_reg 0 + #define LSb16dHubReg_busRstDone_reg 0 + #define bdHubReg_busRstDone_reg 1 + #define MSK32dHubReg_busRstDone_reg 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_flowCtl 0x0C10 + + #define BA_dHubReg_flowCtl_rAlpha 0x0C10 + #define B16dHubReg_flowCtl_rAlpha 0x0C10 + #define LSb32dHubReg_flowCtl_rAlpha 0 + #define LSb16dHubReg_flowCtl_rAlpha 0 + #define bdHubReg_flowCtl_rAlpha 8 + #define MSK32dHubReg_flowCtl_rAlpha 0x000000FF + + #define BA_dHubReg_flowCtl_wAlpha 0x0C11 + #define B16dHubReg_flowCtl_wAlpha 0x0C10 + #define LSb32dHubReg_flowCtl_wAlpha 8 + #define LSb16dHubReg_flowCtl_wAlpha 8 + #define bdHubReg_flowCtl_wAlpha 8 + #define MSK32dHubReg_flowCtl_wAlpha 0x0000FF00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg_axiCmdCol 0x0C14 + + #define BA_dHubReg_axiCmdCol_rCnt 0x0C14 + #define B16dHubReg_axiCmdCol_rCnt 0x0C14 + #define LSb32dHubReg_axiCmdCol_rCnt 0 + #define LSb16dHubReg_axiCmdCol_rCnt 0 + #define bdHubReg_axiCmdCol_rCnt 16 + #define MSK32dHubReg_axiCmdCol_rCnt 0x0000FFFF + + #define BA_dHubReg_axiCmdCol_wCnt 0x0C16 + #define B16dHubReg_axiCmdCol_wCnt 0x0C16 + #define LSb32dHubReg_axiCmdCol_wCnt 16 + #define LSb16dHubReg_axiCmdCol_wCnt 0 + #define bdHubReg_axiCmdCol_wCnt 16 + #define MSK32dHubReg_axiCmdCol_wCnt 0xFFFF0000 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubReg { + /////////////////////////////////////////////////////////// + SIE_SemaHub ie_SemaHub; + /////////////////////////////////////////////////////////// + SIE_HBO ie_HBO; + /////////////////////////////////////////////////////////// + SIE_dHubChannel ie_channelCtl[16]; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_BUSY_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_BUSY_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_BUSY_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_BUSY_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_BUSY {\ + UNSG32 uBUSY_ST : 16;\ + UNSG32 RSVDxC00_b16 : 16;\ + } + union { UNSG32 u32dHubReg_BUSY; + struct w32dHubReg_BUSY; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_PENDING_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_PENDING_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_PENDING_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_PENDING_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_PENDING {\ + UNSG32 uPENDING_ST : 16;\ + UNSG32 RSVDxC04_b16 : 16;\ + } + union { UNSG32 u32dHubReg_PENDING; + struct w32dHubReg_PENDING; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_busRstEn_reg(r32) _BFGET_(r32, 0, 0) + #define SET32dHubReg_busRstEn_reg(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubReg_busRstEn_reg(r16) _BFGET_(r16, 0, 0) + #define SET16dHubReg_busRstEn_reg(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubReg_busRstEn {\ + UNSG32 ubusRstEn_reg : 1;\ + UNSG32 RSVDxC08_b1 : 31;\ + } + union { UNSG32 u32dHubReg_busRstEn; + struct w32dHubReg_busRstEn; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_busRstDone_reg(r32) _BFGET_(r32, 0, 0) + #define SET32dHubReg_busRstDone_reg(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubReg_busRstDone_reg(r16) _BFGET_(r16, 0, 0) + #define SET16dHubReg_busRstDone_reg(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubReg_busRstDone {\ + UNSG32 ubusRstDone_reg : 1;\ + UNSG32 RSVDxC0C_b1 : 31;\ + } + union { UNSG32 u32dHubReg_busRstDone; + struct w32dHubReg_busRstDone; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_flowCtl_rAlpha(r32) _BFGET_(r32, 7, 0) + #define SET32dHubReg_flowCtl_rAlpha(r32,v) _BFSET_(r32, 7, 0,v) + #define GET16dHubReg_flowCtl_rAlpha(r16) _BFGET_(r16, 7, 0) + #define SET16dHubReg_flowCtl_rAlpha(r16,v) _BFSET_(r16, 7, 0,v) + + #define GET32dHubReg_flowCtl_wAlpha(r32) _BFGET_(r32,15, 8) + #define SET32dHubReg_flowCtl_wAlpha(r32,v) _BFSET_(r32,15, 8,v) + #define GET16dHubReg_flowCtl_wAlpha(r16) _BFGET_(r16,15, 8) + #define SET16dHubReg_flowCtl_wAlpha(r16,v) _BFSET_(r16,15, 8,v) + + #define w32dHubReg_flowCtl {\ + UNSG32 uflowCtl_rAlpha : 8;\ + UNSG32 uflowCtl_wAlpha : 8;\ + UNSG32 RSVDxC10_b16 : 16;\ + } + union { UNSG32 u32dHubReg_flowCtl; + struct w32dHubReg_flowCtl; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubReg_axiCmdCol_rCnt(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg_axiCmdCol_rCnt(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg_axiCmdCol_rCnt(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_axiCmdCol_rCnt(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubReg_axiCmdCol_wCnt(r32) _BFGET_(r32,31,16) + #define SET32dHubReg_axiCmdCol_wCnt(r32,v) _BFSET_(r32,31,16,v) + #define GET16dHubReg_axiCmdCol_wCnt(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg_axiCmdCol_wCnt(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg_axiCmdCol {\ + UNSG32 uaxiCmdCol_rCnt : 16;\ + UNSG32 uaxiCmdCol_wCnt : 16;\ + } + union { UNSG32 u32dHubReg_axiCmdCol; + struct w32dHubReg_axiCmdCol; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxC18 [232]; + /////////////////////////////////////////////////////////// + } SIE_dHubReg; + + typedef union T32dHubReg_BUSY + { UNSG32 u32; + struct w32dHubReg_BUSY; + } T32dHubReg_BUSY; + typedef union T32dHubReg_PENDING + { UNSG32 u32; + struct w32dHubReg_PENDING; + } T32dHubReg_PENDING; + typedef union T32dHubReg_busRstEn + { UNSG32 u32; + struct w32dHubReg_busRstEn; + } T32dHubReg_busRstEn; + typedef union T32dHubReg_busRstDone + { UNSG32 u32; + struct w32dHubReg_busRstDone; + } T32dHubReg_busRstDone; + typedef union T32dHubReg_flowCtl + { UNSG32 u32; + struct w32dHubReg_flowCtl; + } T32dHubReg_flowCtl; + typedef union T32dHubReg_axiCmdCol + { UNSG32 u32; + struct w32dHubReg_axiCmdCol; + } T32dHubReg_axiCmdCol; + /////////////////////////////////////////////////////////// + + typedef union TdHubReg_BUSY + { UNSG32 u32[1]; + struct { + struct w32dHubReg_BUSY; + }; + } TdHubReg_BUSY; + typedef union TdHubReg_PENDING + { UNSG32 u32[1]; + struct { + struct w32dHubReg_PENDING; + }; + } TdHubReg_PENDING; + typedef union TdHubReg_busRstEn + { UNSG32 u32[1]; + struct { + struct w32dHubReg_busRstEn; + }; + } TdHubReg_busRstEn; + typedef union TdHubReg_busRstDone + { UNSG32 u32[1]; + struct { + struct w32dHubReg_busRstDone; + }; + } TdHubReg_busRstDone; + typedef union TdHubReg_flowCtl + { UNSG32 u32[1]; + struct { + struct w32dHubReg_flowCtl; + }; + } TdHubReg_flowCtl; + typedef union TdHubReg_axiCmdCol + { UNSG32 u32[1]; + struct { + struct w32dHubReg_axiCmdCol; + }; + } TdHubReg_axiCmdCol; + + /////////////////////////////////////////////////////////// + SIGN32 dHubReg_drvrd(SIE_dHubReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubReg_drvwr(SIE_dHubReg *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubReg_reset(SIE_dHubReg *p); + SIGN32 dHubReg_cmp (SIE_dHubReg *p, SIE_dHubReg *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubReg_check(p,pie,pfx,hLOG) dHubReg_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubReg_print(p, pfx,hLOG) dHubReg_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubReg +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubCmd2D biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 MEM (W-) +/// %unsigned 32 addr +/// ### +/// * DRAM data address of the 2D buffer, in bytes. +/// ### +/// @ 0x00004 DESC (W-) +/// %unsigned 16 stride +/// ### +/// * Line stride size in bytes +/// ### +/// %unsigned 13 numLine +/// ### +/// * Number of lines in buffer. Size of 0 is forbidden. +/// ### +/// %unsigned 2 hdrLoop +/// ### +/// * Size of line-loop for choosing dHubCmdHDR +/// * 0 is treated as 4 +/// ### +/// %unsigned 1 interrupt +/// ### +/// * 1: raise interrupt upon whole 2D command finish. +/// * 1: set the last 1D command interrupt bit. +/// * 0 : use the default 1D command interrupt bit. +/// ### +/// @ 0x00008 START (W-) +/// %unsigned 1 EN 0x0 +/// ### +/// * Write 1 to enable the channel; 0 to pause the channel +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x0000C CLEAR (W-) +/// %unsigned 1 EN +/// ### +/// * Write anything to reset the 2D engine. +/// ### +/// %% 31 # Stuffing bits... +/// @ 0x00010 (P) +/// # 0x00010 HDR +/// $dHubCmdHDR HDR REG [4] +/// ### +/// * Headers used in generating dHubCmd for each line in looping order, loop size (1,2,3,4) specified by DESC_hdrLoop +/// * end dHubCmd2D +/// ### +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 32B, bits: 182b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubCmd2D +#define h_dHubCmd2D (){} + + #define RA_dHubCmd2D_MEM 0x0000 + + #define BA_dHubCmd2D_MEM_addr 0x0000 + #define B16dHubCmd2D_MEM_addr 0x0000 + #define LSb32dHubCmd2D_MEM_addr 0 + #define LSb16dHubCmd2D_MEM_addr 0 + #define bdHubCmd2D_MEM_addr 32 + #define MSK32dHubCmd2D_MEM_addr 0xFFFFFFFF + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_DESC 0x0004 + + #define BA_dHubCmd2D_DESC_stride 0x0004 + #define B16dHubCmd2D_DESC_stride 0x0004 + #define LSb32dHubCmd2D_DESC_stride 0 + #define LSb16dHubCmd2D_DESC_stride 0 + #define bdHubCmd2D_DESC_stride 16 + #define MSK32dHubCmd2D_DESC_stride 0x0000FFFF + + #define BA_dHubCmd2D_DESC_numLine 0x0006 + #define B16dHubCmd2D_DESC_numLine 0x0006 + #define LSb32dHubCmd2D_DESC_numLine 16 + #define LSb16dHubCmd2D_DESC_numLine 0 + #define bdHubCmd2D_DESC_numLine 13 + #define MSK32dHubCmd2D_DESC_numLine 0x1FFF0000 + + #define BA_dHubCmd2D_DESC_hdrLoop 0x0007 + #define B16dHubCmd2D_DESC_hdrLoop 0x0006 + #define LSb32dHubCmd2D_DESC_hdrLoop 29 + #define LSb16dHubCmd2D_DESC_hdrLoop 13 + #define bdHubCmd2D_DESC_hdrLoop 2 + #define MSK32dHubCmd2D_DESC_hdrLoop 0x60000000 + + #define BA_dHubCmd2D_DESC_interrupt 0x0007 + #define B16dHubCmd2D_DESC_interrupt 0x0006 + #define LSb32dHubCmd2D_DESC_interrupt 31 + #define LSb16dHubCmd2D_DESC_interrupt 15 + #define bdHubCmd2D_DESC_interrupt 1 + #define MSK32dHubCmd2D_DESC_interrupt 0x80000000 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_START 0x0008 + + #define BA_dHubCmd2D_START_EN 0x0008 + #define B16dHubCmd2D_START_EN 0x0008 + #define LSb32dHubCmd2D_START_EN 0 + #define LSb16dHubCmd2D_START_EN 0 + #define bdHubCmd2D_START_EN 1 + #define MSK32dHubCmd2D_START_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_CLEAR 0x000C + + #define BA_dHubCmd2D_CLEAR_EN 0x000C + #define B16dHubCmd2D_CLEAR_EN 0x000C + #define LSb32dHubCmd2D_CLEAR_EN 0 + #define LSb16dHubCmd2D_CLEAR_EN 0 + #define bdHubCmd2D_CLEAR_EN 1 + #define MSK32dHubCmd2D_CLEAR_EN 0x00000001 + /////////////////////////////////////////////////////////// + #define RA_dHubCmd2D_HDR 0x0010 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubCmd2D { + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_MEM_addr(r32) _BFGET_(r32,31, 0) + #define SET32dHubCmd2D_MEM_addr(r32,v) _BFSET_(r32,31, 0,v) + + #define w32dHubCmd2D_MEM {\ + UNSG32 uMEM_addr : 32;\ + } + union { UNSG32 u32dHubCmd2D_MEM; + struct w32dHubCmd2D_MEM; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_DESC_stride(r32) _BFGET_(r32,15, 0) + #define SET32dHubCmd2D_DESC_stride(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubCmd2D_DESC_stride(r16) _BFGET_(r16,15, 0) + #define SET16dHubCmd2D_DESC_stride(r16,v) _BFSET_(r16,15, 0,v) + + #define GET32dHubCmd2D_DESC_numLine(r32) _BFGET_(r32,28,16) + #define SET32dHubCmd2D_DESC_numLine(r32,v) _BFSET_(r32,28,16,v) + #define GET16dHubCmd2D_DESC_numLine(r16) _BFGET_(r16,12, 0) + #define SET16dHubCmd2D_DESC_numLine(r16,v) _BFSET_(r16,12, 0,v) + + #define GET32dHubCmd2D_DESC_hdrLoop(r32) _BFGET_(r32,30,29) + #define SET32dHubCmd2D_DESC_hdrLoop(r32,v) _BFSET_(r32,30,29,v) + #define GET16dHubCmd2D_DESC_hdrLoop(r16) _BFGET_(r16,14,13) + #define SET16dHubCmd2D_DESC_hdrLoop(r16,v) _BFSET_(r16,14,13,v) + + #define GET32dHubCmd2D_DESC_interrupt(r32) _BFGET_(r32,31,31) + #define SET32dHubCmd2D_DESC_interrupt(r32,v) _BFSET_(r32,31,31,v) + #define GET16dHubCmd2D_DESC_interrupt(r16) _BFGET_(r16,15,15) + #define SET16dHubCmd2D_DESC_interrupt(r16,v) _BFSET_(r16,15,15,v) + + #define w32dHubCmd2D_DESC {\ + UNSG32 uDESC_stride : 16;\ + UNSG32 uDESC_numLine : 13;\ + UNSG32 uDESC_hdrLoop : 2;\ + UNSG32 uDESC_interrupt : 1;\ + } + union { UNSG32 u32dHubCmd2D_DESC; + struct w32dHubCmd2D_DESC; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_START_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubCmd2D_START_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubCmd2D_START_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmd2D_START_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubCmd2D_START {\ + UNSG32 uSTART_EN : 1;\ + UNSG32 RSVDx8_b1 : 31;\ + } + union { UNSG32 u32dHubCmd2D_START; + struct w32dHubCmd2D_START; + }; + /////////////////////////////////////////////////////////// + #define GET32dHubCmd2D_CLEAR_EN(r32) _BFGET_(r32, 0, 0) + #define SET32dHubCmd2D_CLEAR_EN(r32,v) _BFSET_(r32, 0, 0,v) + #define GET16dHubCmd2D_CLEAR_EN(r16) _BFGET_(r16, 0, 0) + #define SET16dHubCmd2D_CLEAR_EN(r16,v) _BFSET_(r16, 0, 0,v) + + #define w32dHubCmd2D_CLEAR {\ + UNSG32 uCLEAR_EN : 1;\ + UNSG32 RSVDxC_b1 : 31;\ + } + union { UNSG32 u32dHubCmd2D_CLEAR; + struct w32dHubCmd2D_CLEAR; + }; + /////////////////////////////////////////////////////////// + SIE_dHubCmdHDR ie_HDR[4]; + /////////////////////////////////////////////////////////// + } SIE_dHubCmd2D; + + typedef union T32dHubCmd2D_MEM + { UNSG32 u32; + struct w32dHubCmd2D_MEM; + } T32dHubCmd2D_MEM; + typedef union T32dHubCmd2D_DESC + { UNSG32 u32; + struct w32dHubCmd2D_DESC; + } T32dHubCmd2D_DESC; + typedef union T32dHubCmd2D_START + { UNSG32 u32; + struct w32dHubCmd2D_START; + } T32dHubCmd2D_START; + typedef union T32dHubCmd2D_CLEAR + { UNSG32 u32; + struct w32dHubCmd2D_CLEAR; + } T32dHubCmd2D_CLEAR; + /////////////////////////////////////////////////////////// + + typedef union TdHubCmd2D_MEM + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_MEM; + }; + } TdHubCmd2D_MEM; + typedef union TdHubCmd2D_DESC + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_DESC; + }; + } TdHubCmd2D_DESC; + typedef union TdHubCmd2D_START + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_START; + }; + } TdHubCmd2D_START; + typedef union TdHubCmd2D_CLEAR + { UNSG32 u32[1]; + struct { + struct w32dHubCmd2D_CLEAR; + }; + } TdHubCmd2D_CLEAR; + + /////////////////////////////////////////////////////////// + SIGN32 dHubCmd2D_drvrd(SIE_dHubCmd2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubCmd2D_drvwr(SIE_dHubCmd2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubCmd2D_reset(SIE_dHubCmd2D *p); + SIGN32 dHubCmd2D_cmp (SIE_dHubCmd2D *p, SIE_dHubCmd2D *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubCmd2D_check(p,pie,pfx,hLOG) dHubCmd2D_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubCmd2D_print(p, pfx,hLOG) dHubCmd2D_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubCmd2D +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubQuery (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 RESP (R-) +/// %unsigned 16 ST +/// ### +/// * Dhub channel state machine status. +/// ### +/// %% 16 # Stuffing bits... +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4B, bits: 16b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubQuery +#define h_dHubQuery (){} + + #define RA_dHubQuery_RESP 0x0000 + + #define BA_dHubQuery_RESP_ST 0x0000 + #define B16dHubQuery_RESP_ST 0x0000 + #define LSb32dHubQuery_RESP_ST 0 + #define LSb16dHubQuery_RESP_ST 0 + #define bdHubQuery_RESP_ST 16 + #define MSK32dHubQuery_RESP_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubQuery { + /////////////////////////////////////////////////////////// + #define GET32dHubQuery_RESP_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubQuery_RESP_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubQuery_RESP_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubQuery_RESP_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubQuery_RESP {\ + UNSG32 uRESP_ST : 16;\ + UNSG32 RSVDx0_b16 : 16;\ + } + union { UNSG32 u32dHubQuery_RESP; + struct w32dHubQuery_RESP; + }; + /////////////////////////////////////////////////////////// + } SIE_dHubQuery; + + typedef union T32dHubQuery_RESP + { UNSG32 u32; + struct w32dHubQuery_RESP; + } T32dHubQuery_RESP; + /////////////////////////////////////////////////////////// + + typedef union TdHubQuery_RESP + { UNSG32 u32[1]; + struct { + struct w32dHubQuery_RESP; + }; + } TdHubQuery_RESP; + + /////////////////////////////////////////////////////////// + SIGN32 dHubQuery_drvrd(SIE_dHubQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubQuery_drvwr(SIE_dHubQuery *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubQuery_reset(SIE_dHubQuery *p); + SIGN32 dHubQuery_cmp (SIE_dHubQuery *p, SIE_dHubQuery *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubQuery_check(p,pie,pfx,hLOG) dHubQuery_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubQuery_print(p, pfx,hLOG) dHubQuery_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubQuery +//////////////////////////////////////////////////////////// + +////// +/// +/// $INTERFACE dHubReg2D biu (4,4) +/// # # ---------------------------------------------------------- +/// @ 0x00000 (P) +/// # 0x00000 dHub +/// $dHubReg dHub REG +/// @ 0x00D00 ARR (P) +/// # 0x00D00 Cmd2D +/// $dHubCmd2D Cmd2D REG [16] +/// ### +/// * Up-to 16 2D channels. +/// * 2D Channel[N] is connected to dHub.Channel[N] command queue, that is, dHub.HBO.Channel[2N] +/// * Note: Number of 2D channels could be less than dHub channels (rest of are 1D only) +/// ### +/// @ 0x00F00 BUSY (R-) +/// %unsigned 16 ST +/// ### +/// * Per channel status +/// * 0: no ongoing command is being processed +/// * 1: channel controller is busy +/// ### +/// %% 16 # Stuffing bits... +/// @ 0x00F04 (W-) +/// # # Stuffing bytes... +/// %% 480 +/// @ 0x00F40 (P) +/// # 0x00F40 CH_ST +/// $dHubQuery CH_ST MEM [16] +/// ### +/// * end dHubReg2D +/// ### +/// @ 0x00F80 (W-) +/// # # Stuffing bytes... +/// %% 1024 +/// # # ---------------------------------------------------------- +/// $ENDOFINTERFACE # size: 4096B, bits: 6274b, padding: 0B +//////////////////////////////////////////////////////////// +#ifndef h_dHubReg2D +#define h_dHubReg2D (){} + + #define RA_dHubReg2D_dHub 0x0000 + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_ARR 0x0D00 + #define RA_dHubReg2D_Cmd2D 0x0D00 + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_BUSY 0x0F00 + + #define BA_dHubReg2D_BUSY_ST 0x0F00 + #define B16dHubReg2D_BUSY_ST 0x0F00 + #define LSb32dHubReg2D_BUSY_ST 0 + #define LSb16dHubReg2D_BUSY_ST 0 + #define bdHubReg2D_BUSY_ST 16 + #define MSK32dHubReg2D_BUSY_ST 0x0000FFFF + /////////////////////////////////////////////////////////// + #define RA_dHubReg2D_CH_ST 0x0F40 + /////////////////////////////////////////////////////////// + + typedef struct SIE_dHubReg2D { + /////////////////////////////////////////////////////////// + SIE_dHubReg ie_dHub; + /////////////////////////////////////////////////////////// + SIE_dHubCmd2D ie_Cmd2D[16]; + /////////////////////////////////////////////////////////// + #define GET32dHubReg2D_BUSY_ST(r32) _BFGET_(r32,15, 0) + #define SET32dHubReg2D_BUSY_ST(r32,v) _BFSET_(r32,15, 0,v) + #define GET16dHubReg2D_BUSY_ST(r16) _BFGET_(r16,15, 0) + #define SET16dHubReg2D_BUSY_ST(r16,v) _BFSET_(r16,15, 0,v) + + #define w32dHubReg2D_BUSY {\ + UNSG32 uBUSY_ST : 16;\ + UNSG32 RSVDxF00_b16 : 16;\ + } + union { UNSG32 u32dHubReg2D_BUSY; + struct w32dHubReg2D_BUSY; + }; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxF04 [60]; + /////////////////////////////////////////////////////////// + SIE_dHubQuery ie_CH_ST[16]; + /////////////////////////////////////////////////////////// + UNSG8 RSVDxF80 [128]; + /////////////////////////////////////////////////////////// + } SIE_dHubReg2D; + + typedef union T32dHubReg2D_BUSY + { UNSG32 u32; + struct w32dHubReg2D_BUSY; + } T32dHubReg2D_BUSY; + /////////////////////////////////////////////////////////// + + typedef union TdHubReg2D_BUSY + { UNSG32 u32[1]; + struct { + struct w32dHubReg2D_BUSY; + }; + } TdHubReg2D_BUSY; + + /////////////////////////////////////////////////////////// + SIGN32 dHubReg2D_drvrd(SIE_dHubReg2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst); + SIGN32 dHubReg2D_drvwr(SIE_dHubReg2D *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); + void dHubReg2D_reset(SIE_dHubReg2D *p); + SIGN32 dHubReg2D_cmp (SIE_dHubReg2D *p, SIE_dHubReg2D *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); + #define dHubReg2D_check(p,pie,pfx,hLOG) dHubReg2D_cmp(p,pie,pfx,(void*)(hLOG),0,0) + #define dHubReg2D_print(p, pfx,hLOG) dHubReg2D_cmp(p,0, pfx,(void*)(hLOG),0,0) + +#endif +////// +/// ENDOFINTERFACE: dHubReg2D +//////////////////////////////////////////////////////////// + + + +#ifdef __cplusplus + } +#endif +#pragma pack() + +#endif +////// +/// ENDOFFILE: dHub.h +//////////////////////////////////////////////////////////// diff --git a/sound/soc/berlin/pcm.c b/sound/soc/berlin/pcm.c new file mode 100644 index 00000000..326ef518 --- /dev/null +++ b/sound/soc/berlin/pcm.c @@ -0,0 +1,897 @@ +/************************************************************************************* +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +***************************************************************************************/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "berlin_memmap.h" +#include "api_avio_dhub.h" +#include "api_dhub.h" +#include "api_aio.h" +#include "api_spdif.h" +#include "spdif_enc.h" +#include "api_avpll.h" + +#define MAX_BUFFER_SIZE (32 * 1024) +#define IRQ_GIC_START (32) +#define IRQ_dHubIntrAvio1 (0x22) +#define IRQ_DHUBINTRAVIO1 (IRQ_GIC_START + IRQ_dHubIntrAvio1) +#define bTST(x, b) (((x) >> (b)) & 1) + +enum { + SNDRV_BERLIN_GET_OUTPUT_MODE = 0x1001, + SNDRV_BERLIN_SET_OUTPUT_MODE, +}; + +enum { + SND_BERLIN_STATUS_STOP = 0, + SND_BERLIN_STATUS_PLAY, +}; + +enum { + SND_BERLIN_OUTPUT_ANALOG = 0x200, + SND_BERLIN_OUTPUT_SPDIF, +}; + +struct snd_berlin_chip { + struct snd_card *card; + struct snd_hwdep *hwdep; + struct snd_pcm *pcm; +}; + +static volatile unsigned int berlin_output_mode = SND_BERLIN_OUTPUT_ANALOG; + +struct snd_berlin_card_pcm { + unsigned int pcm_size; + unsigned int pcm_count; + unsigned int pcm_bps; /* bytes per second */ + unsigned int pcm_buf_pos; /* position in buffer */ + unsigned int dma_size; /* dma trunk size in byte */ + + /* spdif DMA buffer */ + unsigned char *spdif_dma_area; /* dma buffer for spdif output */ + unsigned int spdif_dma_addr; /* physical address of spdif buffer */ + unsigned int spdif_dma_bytes; /* size of spdif dma area */ + + /* PCM DMA buffer */ + unsigned char *pcm_dma_area; + unsigned int pcm_dma_addr; + unsigned int pcm_dma_bytes; + unsigned int pcm_virt_bytes; + + /* hw parameter */ + unsigned int sample_rate; + unsigned int sample_format; + unsigned int channel_num; + unsigned int pcm_ratio; + unsigned int spdif_ratio; + + /* for spdif encoding */ + unsigned int spdif_frames; + unsigned char channel_status[24]; + + /* playback status */ + volatile unsigned int playback_state; + volatile unsigned int output_mode; + + struct snd_pcm_substream *substream; + struct snd_pcm_indirect pcm_indirect; +}; + +static struct snd_card *snd_berlin_card; + +static DEFINE_MUTEX(berlin_mutex); + +static void berlin_set_aio(unsigned int sample_rate, unsigned int output_mode) +{ + unsigned int analog_div, spdif_div; + + AIO_SetAudChMute(AIO_SEC, AIO_TSD0, AUDCH_CTRL_MUTE_MUTE_ON); + AIO_SetAudChEn(AIO_SEC, AIO_TSD0, AUDCH_CTRL_ENABLE_DISABLE); + + switch(sample_rate) { + case 48000 : + case 44100 : + case 32000 : + analog_div = AIO_DIV8; + spdif_div = AIO_DIV4; + break; + case 96000 : + case 88200 : + analog_div = AIO_DIV4; + spdif_div = AIO_DIV2; + break; + default: + break; + } + + if(output_mode == SND_BERLIN_OUTPUT_ANALOG) { + AIO_SetClkDiv(AIO_SEC, analog_div); + AIO_SetCtl(AIO_SEC, AIO_I2S_MODE, AIO_32CFM, AIO_24DFM); + } else if(output_mode == SND_BERLIN_OUTPUT_SPDIF) { + AIO_SetClkDiv(AIO_SEC, spdif_div); + AIO_SetCtl(AIO_SEC, AIO_I2S_MODE, AIO_32CFM, AIO_32DFM); + } + + AIO_SetAudChEn(AIO_SEC, AIO_TSD0, AUDCH_CTRL_ENABLE_ENABLE); + AIO_SetAudChMute(AIO_SEC, AIO_TSD0, AUDCH_CTRL_MUTE_MUTE_OFF); +} + +static void berlin_set_pll(unsigned int sample_rate) +{ + int apll; + + switch (sample_rate) { + case 44100 : + case 88200 : + apll = 22579200; + break; + case 32000 : + apll = 16384000; + break; + case 48000 : + case 96000 : + apll = 24576000; + break; + default : + apll = 24576000; + break; + } + + AVPLL_Set(0, 3, apll); + AVPLL_Set(0, 4, apll); +} + +static void push_dhub_cmd(struct snd_pcm_substream *substream, unsigned int update) +{ + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_berlin_card_pcm *berlin_pcm = runtime->private_data; + unsigned int chanId; + + if(berlin_pcm->playback_state != SND_BERLIN_STATUS_PLAY) + return; + + if(berlin_pcm->output_mode != berlin_output_mode) { + berlin_set_aio(berlin_pcm->sample_rate, berlin_output_mode); + berlin_pcm->output_mode = berlin_output_mode; + } + + if(update) { + berlin_pcm->pcm_buf_pos += berlin_pcm->dma_size; + berlin_pcm->pcm_buf_pos = berlin_pcm->pcm_buf_pos%berlin_pcm->pcm_virt_bytes; + } + + chanId = avioDhubChMap_ag_SA0_R_A0; + if(berlin_pcm->output_mode == SND_BERLIN_OUTPUT_ANALOG) { + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, + berlin_pcm->pcm_dma_addr+berlin_pcm->pcm_buf_pos*berlin_pcm->pcm_ratio, + berlin_pcm->dma_size*berlin_pcm->pcm_ratio, 0, 0, 0, 1, 0, 0); + } else { + dhub_channel_write_cmd(&AG_dhubHandle.dhub, chanId, + berlin_pcm->spdif_dma_addr+berlin_pcm->pcm_buf_pos*berlin_pcm->spdif_ratio, + berlin_pcm->dma_size*berlin_pcm->spdif_ratio, 0, 0, 0, 1, 0, 0); + } +} + +static irqreturn_t berlin_devices_aout_isr(int irq, void *dev_id) +{ + struct snd_pcm_substream *substream = (struct snd_pcm_substream *)dev_id; + HDL_semaphore *pSemHandle; + unsigned int chanId, instat; + + pSemHandle = dhub_semaphore(&AG_dhubHandle.dhub); + instat = semaphore_chk_full(pSemHandle, -1); + + chanId = avioDhubChMap_ag_SA0_R_A0; + if (bTST(instat, chanId)) { + semaphore_pop(pSemHandle, chanId, 1); + semaphore_clr_full(pSemHandle, chanId); + push_dhub_cmd(substream, 1); + snd_pcm_period_elapsed(substream); + } + + return IRQ_HANDLED; +} + +static void snd_berlin_playback_trigger_start(struct snd_pcm_substream *substream) +{ + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_berlin_card_pcm *berlin_pcm = runtime->private_data; + + if(berlin_pcm->playback_state == SND_BERLIN_STATUS_PLAY) + return; + + berlin_pcm->playback_state = SND_BERLIN_STATUS_PLAY; + berlin_pcm->pcm_indirect.hw_io = bytes_to_frames(runtime, berlin_pcm->pcm_buf_pos); + berlin_pcm->pcm_indirect.hw_data = berlin_pcm->pcm_indirect.hw_io; + substream->ops->ack(substream); + push_dhub_cmd(substream, 0); +} + +static void snd_berlin_playback_trigger_stop(struct snd_pcm_substream *substream) +{ + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_berlin_card_pcm *berlin_pcm = runtime->private_data; + + berlin_pcm->playback_state = SND_BERLIN_STATUS_STOP; +} + +static const struct snd_pcm_hardware snd_berlin_playback_hw = { + .info = (SNDRV_PCM_INFO_MMAP + | SNDRV_PCM_INFO_INTERLEAVED + | SNDRV_PCM_INFO_MMAP_VALID), + .formats = (SNDRV_PCM_FMTBIT_S32_LE + | SNDRV_PCM_FMTBIT_S16_LE), + .rates = (SNDRV_PCM_RATE_48000 + | SNDRV_PCM_RATE_96000 + | SNDRV_PCM_RATE_44100 + | SNDRV_PCM_RATE_88200 + | SNDRV_PCM_RATE_32000), + .rate_min = 32000, + .rate_max = 96000, + .channels_min = 1, + .channels_max = 2, + .buffer_bytes_max = MAX_BUFFER_SIZE, + .period_bytes_min = (256 << 3), + .period_bytes_max = (256 << 3), + .periods_min = 16, + .periods_max = 16, + .fifo_size = 0 +}; + +static void snd_berlin_runtime_free(struct snd_pcm_runtime *runtime) +{ + struct snd_berlin_card_pcm *berlin_pcm = runtime->private_data; + if(berlin_pcm) { + dma_free_coherent(NULL, berlin_pcm->spdif_dma_bytes, + berlin_pcm->spdif_dma_area, berlin_pcm->spdif_dma_addr); + dma_free_coherent(NULL, berlin_pcm->pcm_dma_bytes, + berlin_pcm->pcm_dma_area, berlin_pcm->pcm_dma_addr); + kfree(berlin_pcm); + } +} + +static int snd_berlin_playback_open(struct snd_pcm_substream *substream) +{ + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_berlin_card_pcm *berlin_pcm; + unsigned int vec_num; + int err; + + berlin_pcm = kzalloc(sizeof(struct snd_berlin_card_pcm), GFP_KERNEL); + if (berlin_pcm == NULL) + return -ENOMEM; + + berlin_pcm->playback_state = SND_BERLIN_STATUS_STOP; + berlin_pcm->output_mode = berlin_output_mode; + berlin_pcm->pcm_ratio = 1; + berlin_pcm->spdif_ratio = 2; + berlin_pcm->substream = substream; + runtime->private_data = berlin_pcm; + runtime->private_free = snd_berlin_runtime_free; + runtime->hw = snd_berlin_playback_hw; + + /* Dhub configuration */ + DhubInitialization(0, AG_DHUB_BASE, AG_HBO_SRAM_BASE, + &AG_dhubHandle, AG_config, AG_NUM_OF_CHANNELS_A0); + + /* register and enable audio out ISR */ + vec_num = IRQ_DHUBINTRAVIO1; + err = request_irq(vec_num, berlin_devices_aout_isr, IRQF_DISABLED, + "berlin_module_aout", substream); + if (unlikely(err < 0)) { + snd_printk("irq register error: vec_num:%5d, err:%8x\n", vec_num, err); + } + + DhubEnableIntr(0, &AG_dhubHandle, avioDhubChMap_ag_SA0_R_A0, 1); + + snd_printk("playback_open succeeds.\n"); + + return 0; +} + +static int snd_berlin_playback_close(struct snd_pcm_substream *substream) +{ + struct snd_pcm_runtime *runtime = substream->runtime; + unsigned int vec_num = IRQ_DHUBINTRAVIO1; + + DhubEnableIntr(0, &AG_dhubHandle, avioDhubChMap_ag_SA0_R_A0, 0); + + free_irq(vec_num, substream); + + snd_printk("playback_close succeeds.\n"); + + return 0; +} + +static int snd_berlin_playback_hw_free(struct snd_pcm_substream *substream) +{ + return snd_pcm_lib_free_pages(substream); +} + +static int snd_berlin_playback_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *params) +{ + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_berlin_card_pcm *berlin_pcm = runtime->private_data; + struct spdif_channel_status *chnsts; + int err; + + mutex_lock(&berlin_mutex); + + err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); + if (err < 0) { + snd_printk("pcm_lib_malloc failed to allocated pages for buffers\n"); + return err; + } + + berlin_pcm->sample_rate = params_rate(params); + berlin_pcm->sample_format = params_format(params); + berlin_pcm->channel_num = params_channels(params); + + if(berlin_pcm->sample_format == SNDRV_PCM_FORMAT_S16_LE) { + berlin_pcm->pcm_ratio *= 2; + berlin_pcm->spdif_ratio *= 2; + } + + if(berlin_pcm->channel_num == 1) { + berlin_pcm->pcm_ratio *= 2; + berlin_pcm->spdif_ratio *= 2; + } + + if ((berlin_pcm->pcm_dma_area = + dma_alloc_coherent(NULL, MAX_BUFFER_SIZE*berlin_pcm->pcm_ratio, + &berlin_pcm->pcm_dma_addr, GFP_KERNEL)) == NULL) { + return -ENOMEM; + } + berlin_pcm->pcm_virt_bytes = MAX_BUFFER_SIZE; + berlin_pcm->pcm_dma_bytes = MAX_BUFFER_SIZE*berlin_pcm->pcm_ratio; + memset(berlin_pcm->pcm_dma_area, 0, berlin_pcm->pcm_dma_bytes); + + if ((berlin_pcm->spdif_dma_area = + dma_alloc_coherent(NULL, MAX_BUFFER_SIZE*berlin_pcm->spdif_ratio, + &berlin_pcm->spdif_dma_addr, GFP_KERNEL)) == NULL) { + dma_free_coherent(NULL, berlin_pcm->pcm_dma_bytes, + berlin_pcm->pcm_dma_area, berlin_pcm->pcm_dma_addr); + return -ENOMEM; + } + berlin_pcm->spdif_dma_bytes = MAX_BUFFER_SIZE*berlin_pcm->spdif_ratio; + memset(berlin_pcm->spdif_dma_area, 0, berlin_pcm->spdif_dma_bytes); + + /* initialize spdif channel status */ + chnsts = (struct spdif_channel_status *)&(berlin_pcm->channel_status[0]); + spdif_init_channel_status(chnsts, berlin_pcm->sample_rate); + + /* AVPLL configuration */ + berlin_set_pll(berlin_pcm->sample_rate); + + /* AIO configuration */ + berlin_set_aio(berlin_pcm->sample_rate, berlin_pcm->output_mode); + + mutex_unlock(&berlin_mutex); + + return 0; +} + +static int snd_berlin_playback_prepare(struct snd_pcm_substream *substream) +{ + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_berlin_card_pcm *berlin_pcm = runtime->private_data; + unsigned int bps; + + bps = runtime->rate * runtime->channels; + bps *= snd_pcm_format_width(runtime->format); + bps /= 8; + if (bps <= 0) + return -EINVAL; + berlin_pcm->pcm_bps = bps; + berlin_pcm->pcm_size = snd_pcm_lib_buffer_bytes(substream); + berlin_pcm->pcm_count = snd_pcm_lib_period_bytes(substream); + berlin_pcm->pcm_buf_pos = 0; + berlin_pcm->dma_size = 256 * 4 * 2; + + memset(&berlin_pcm->pcm_indirect, 0, sizeof(berlin_pcm->pcm_indirect)); + berlin_pcm->pcm_indirect.hw_buffer_size = MAX_BUFFER_SIZE; + berlin_pcm->pcm_indirect.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream); + snd_printk("prepare ok bps: %d size: %d count: %d\n", + berlin_pcm->pcm_bps, berlin_pcm->pcm_size, berlin_pcm->pcm_count); + + return 0; +} + +static int snd_berlin_playback_trigger(struct snd_pcm_substream *substream, int cmd) +{ + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_berlin_card_pcm *berlin_pcm = runtime->private_data; + struct snd_berlin_chip *chip = snd_pcm_substream_chip(substream); + unsigned int result = 0; + + if (cmd == SNDRV_PCM_TRIGGER_START) { + snd_berlin_playback_trigger_start(substream); + snd_printk("playback starts.\n"); + } else if (cmd == SNDRV_PCM_TRIGGER_STOP) { + snd_berlin_playback_trigger_stop(substream); + snd_printk("playback ends.\n"); + } else { + result = -EINVAL; + } + + return result; +} + +static snd_pcm_uframes_t +snd_berlin_playback_pointer(struct snd_pcm_substream *substream) +{ + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_berlin_card_pcm *berlin_pcm = runtime->private_data; + + return snd_pcm_indirect_playback_pointer(substream, &berlin_pcm->pcm_indirect, + berlin_pcm->pcm_buf_pos); +} + +static int snd_berlin_playback_copy(struct snd_pcm_substream *substream, + int channel, snd_pcm_uframes_t pos, + void *buf, size_t bytes) +{ + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_berlin_card_pcm *berlin_pcm = runtime->private_data; + unsigned char *pcm_buf, *spdif_buf; + unsigned int i, sync_word; + unsigned int *pcm, *spdif; + unsigned short *s16_pcm; + unsigned char c; + if(berlin_pcm->sample_format == SNDRV_PCM_FORMAT_S16_LE) { + if(berlin_pcm->channel_num == 1) { + pcm_buf = berlin_pcm->pcm_dma_area + + pos*berlin_pcm->pcm_ratio; + s16_pcm = (unsigned short *)buf; + for(i=0; i<(bytes>>1); i++) + { + *((unsigned int *)pcm_buf) = (*s16_pcm)<<16; + pcm_buf += 4; + *((unsigned int *)pcm_buf) = (*s16_pcm)<<16; + pcm_buf += 4; + s16_pcm += 1; + } + + spdif_buf = berlin_pcm->spdif_dma_area + + pos*berlin_pcm->spdif_ratio; + s16_pcm = (unsigned short *)buf; + spdif = (unsigned int *)spdif_buf; + for(i=0; i<(bytes>>1); i++) + { + c = spdif_get_channel_status(berlin_pcm->channel_status, + berlin_pcm->spdif_frames); + + sync_word = berlin_pcm->spdif_frames ? TYPE_M : TYPE_B; + spdif_enc_subframe(spdif, (*s16_pcm)<<16, sync_word, 0, 0, c); + + sync_word = TYPE_W; + spdif_enc_subframe((spdif+2), (*s16_pcm)<<16, sync_word, 0, 0, c); + + s16_pcm += 1; + spdif += 4; + berlin_pcm->spdif_frames += 1; + berlin_pcm->spdif_frames = (berlin_pcm->spdif_frames)%SPDIF_BLOCK_SIZE; + } + } else { + pcm_buf = berlin_pcm->pcm_dma_area + + pos*berlin_pcm->pcm_ratio; + s16_pcm = (unsigned short *)buf; + for(i=0; i<(bytes>>1); i++) + { + *((unsigned int *)pcm_buf) = (*s16_pcm)<<16; + pcm_buf += 4; + s16_pcm += 1; + } + + spdif_buf = berlin_pcm->spdif_dma_area + + pos*berlin_pcm->spdif_ratio; + s16_pcm = (unsigned short *)buf; + spdif = (unsigned int *)spdif_buf; + for(i=0; i<(bytes>>2); i++) + { + c = spdif_get_channel_status(berlin_pcm->channel_status, + berlin_pcm->spdif_frames); + + sync_word = berlin_pcm->spdif_frames ? TYPE_M : TYPE_B; + spdif_enc_subframe(spdif, (*s16_pcm)<<16, sync_word, 0, 0, c); + + sync_word = TYPE_W; + spdif_enc_subframe((spdif+2), (*(s16_pcm+1))<<16, sync_word, 0, 0, c); + + s16_pcm += 2; + spdif += 4; + berlin_pcm->spdif_frames += 1; + berlin_pcm->spdif_frames = (berlin_pcm->spdif_frames)%SPDIF_BLOCK_SIZE; + } + } + } else { // SNDRV_PCM_FORMAT_S32_LE + if(berlin_pcm->channel_num == 1) { + pcm_buf = berlin_pcm->pcm_dma_area + + pos*berlin_pcm->pcm_ratio; + pcm = (unsigned int *)buf; + for(i=0; i<(bytes>>2); i++) + { + *((unsigned int *)pcm_buf) = *pcm; + pcm_buf += 4; + *((unsigned int *)pcm_buf) = *pcm; + pcm_buf += 4; + pcm += 1; + } + + spdif_buf = berlin_pcm->spdif_dma_area + + pos*berlin_pcm->spdif_ratio; + pcm = (unsigned int *)buf; + spdif = (unsigned int *)spdif_buf; + for(i=0; i<(bytes>>2); i++) + { + c = spdif_get_channel_status(berlin_pcm->channel_status, + berlin_pcm->spdif_frames); + + sync_word = berlin_pcm->spdif_frames ? TYPE_M : TYPE_B; + spdif_enc_subframe(spdif, *pcm, sync_word, 0, 0, c); + + sync_word = TYPE_W; + spdif_enc_subframe((spdif+2), *pcm, sync_word, 0, 0, c); + + pcm += 1; + spdif += 4; + berlin_pcm->spdif_frames += 1; + berlin_pcm->spdif_frames = (berlin_pcm->spdif_frames)%SPDIF_BLOCK_SIZE; + } + } else { + pcm_buf = berlin_pcm->pcm_dma_area + + pos*berlin_pcm->pcm_ratio; + pcm = (unsigned int *)buf; + for(i=0; i<(bytes>>2); i++) + { + *((unsigned int *)pcm_buf) = *pcm; + pcm_buf += 4; + pcm += 1; + } + + spdif_buf = berlin_pcm->spdif_dma_area + + pos*berlin_pcm->spdif_ratio; + pcm = (unsigned int *)buf; + spdif = (unsigned int *)spdif_buf; + for(i=0; i<(bytes>>3); i++) + { + c = spdif_get_channel_status(berlin_pcm->channel_status, + berlin_pcm->spdif_frames); + + sync_word = berlin_pcm->spdif_frames ? TYPE_M : TYPE_B; + spdif_enc_subframe(spdif, *pcm, sync_word, 0, 0, c); + + sync_word = TYPE_W; + spdif_enc_subframe((spdif+2), *(pcm+1), sync_word, 0, 0, c); + + pcm += 2; + spdif += 4; + berlin_pcm->spdif_frames += 1; + berlin_pcm->spdif_frames = (berlin_pcm->spdif_frames)%SPDIF_BLOCK_SIZE; + } + } + } + + return 0; +} + +static void berlin_playback_transfer(struct snd_pcm_substream *substream, + struct snd_pcm_indirect *rec, size_t bytes) +{ + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_berlin_card_pcm *berlin_pcm = runtime->private_data; + void *src = (void *)(runtime->dma_area + rec->sw_data); + + if (src == NULL) + snd_printk("!!!!! src is NULL !!!!\n"); + else + snd_berlin_playback_copy(substream, berlin_pcm->channel_num, rec->sw_data, src, bytes); +} + +static int snd_berlin_playback_ack(struct snd_pcm_substream *substream) +{ + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_berlin_card_pcm *berlin_pcm = runtime->private_data; + struct snd_pcm_indirect *pcm_indirect = &berlin_pcm->pcm_indirect; + pcm_indirect->hw_queue_size = runtime->hw.buffer_bytes_max; + snd_pcm_indirect_playback_transfer(substream, pcm_indirect, + berlin_playback_transfer); + return 0; +} + +static int snd_berlin_playback_silence(struct snd_pcm_substream *substream, + int channel, snd_pcm_uframes_t pos, + snd_pcm_uframes_t count) +{ + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_berlin_card_pcm *berlin_pcm = runtime->private_data; + unsigned char *pcm_buf, *spdif_buf; + unsigned int i, sync_word; + unsigned int *spdif; + unsigned char c; + + pcm_buf = berlin_pcm->pcm_dma_area + + frames_to_bytes(runtime, pos)*berlin_pcm->pcm_ratio; + memset(pcm_buf, 0, frames_to_bytes(runtime, count)*berlin_pcm->pcm_ratio); + + if(berlin_pcm->sample_format == SNDRV_PCM_FORMAT_S16_LE) { + if(berlin_pcm->channel_num == 1) { + spdif_buf = berlin_pcm->spdif_dma_area + + frames_to_bytes(runtime, pos)*berlin_pcm->spdif_ratio; + spdif = (unsigned int *)spdif_buf; + for(i=0; i<(frames_to_bytes(runtime, count)>>1); i++) + { + c = spdif_get_channel_status(berlin_pcm->channel_status, + berlin_pcm->spdif_frames); + + sync_word = berlin_pcm->spdif_frames ? TYPE_M : TYPE_B; + spdif_enc_subframe(spdif, 0, sync_word, 0, 0, c); + + sync_word = TYPE_W; + spdif_enc_subframe((spdif+2), 0, sync_word, 0, 0, c); + + spdif += 4; + berlin_pcm->spdif_frames += 1; + berlin_pcm->spdif_frames = (berlin_pcm->spdif_frames)%SPDIF_BLOCK_SIZE; + } + } else { + spdif_buf = berlin_pcm->spdif_dma_area + + frames_to_bytes(runtime, pos)*berlin_pcm->spdif_ratio; + spdif = (unsigned int *)spdif_buf; + for(i=0; i<(frames_to_bytes(runtime, count)>>2); i++) + { + c = spdif_get_channel_status(berlin_pcm->channel_status, + berlin_pcm->spdif_frames); + + sync_word = berlin_pcm->spdif_frames ? TYPE_M : TYPE_B; + spdif_enc_subframe(spdif, 0, sync_word, 0, 0, c); + + sync_word = TYPE_W; + spdif_enc_subframe((spdif+2), 0, sync_word, 0, 0, c); + + spdif += 4; + berlin_pcm->spdif_frames += 1; + berlin_pcm->spdif_frames = (berlin_pcm->spdif_frames)%SPDIF_BLOCK_SIZE; + } + } + } else { + if(berlin_pcm->channel_num == 1) { + spdif_buf = berlin_pcm->spdif_dma_area + + frames_to_bytes(runtime, pos)*berlin_pcm->spdif_ratio; + spdif = (unsigned int *)spdif_buf; + for(i=0; i<(frames_to_bytes(runtime, count)>>2); i++) + { + c = spdif_get_channel_status(berlin_pcm->channel_status, + berlin_pcm->spdif_frames); + + sync_word = berlin_pcm->spdif_frames ? TYPE_M : TYPE_B; + spdif_enc_subframe(spdif, 0, sync_word, 0, 0, c); + + sync_word = TYPE_W; + spdif_enc_subframe((spdif+2), 0, sync_word, 0, 0, c); + + spdif += 4; + berlin_pcm->spdif_frames += 1; + berlin_pcm->spdif_frames = (berlin_pcm->spdif_frames)%SPDIF_BLOCK_SIZE; + } + } else { + spdif_buf = berlin_pcm->spdif_dma_area + + frames_to_bytes(runtime, pos)*berlin_pcm->spdif_ratio; + spdif = (unsigned int *)spdif_buf; + for(i=0; i<(frames_to_bytes(runtime, count)>>3); i++) + { + c = spdif_get_channel_status(berlin_pcm->channel_status, + berlin_pcm->spdif_frames); + + sync_word = berlin_pcm->spdif_frames ? TYPE_M : TYPE_B; + spdif_enc_subframe(spdif, 0, sync_word, 0, 0, c); + + sync_word = TYPE_W; + spdif_enc_subframe((spdif+2), 0, sync_word, 0, 0, c); + + spdif += 4; + berlin_pcm->spdif_frames += 1; + berlin_pcm->spdif_frames = (berlin_pcm->spdif_frames)%SPDIF_BLOCK_SIZE; + } + } + } + + return 0; +} + +static struct snd_pcm_ops snd_berlin_playback_ops = { + .open = snd_berlin_playback_open, + .close = snd_berlin_playback_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_berlin_playback_hw_params, + .hw_free = snd_berlin_playback_hw_free, + .prepare = snd_berlin_playback_prepare, + .trigger = snd_berlin_playback_trigger, + .pointer = snd_berlin_playback_pointer, +// .copy = snd_berlin_playback_copy, + .ack = snd_berlin_playback_ack, +// .silence = snd_berlin_playback_silence, +}; + +static int snd_berlin_card_new_pcm(struct snd_berlin_chip *chip) +{ + struct snd_pcm *pcm; + int err; + + if ((err = + snd_pcm_new(chip->card, "Berlin ALSA PCM", 0, 1, 0, &pcm)) < 0) + return err; + + chip->pcm = pcm; + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, + &snd_berlin_playback_ops); + pcm->private_data = chip; + pcm->info_flags = 0; + strcpy(pcm->name, "Berlin ALSA PCM"); + snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, + snd_dma_continuous_data(GFP_KERNEL), 32*1024, 64*1024); + return 0; +} + +static int snd_berlin_hwdep_dummy_op(struct snd_hwdep *hw, struct file *file) +{ + return 0; +} + +static int snd_berlin_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, + unsigned int cmd, unsigned long arg) +{ + unsigned int *mode = (unsigned int *)arg; + unsigned int s = 0; + + + mutex_lock(&berlin_mutex); + switch (cmd) { + case SNDRV_BERLIN_GET_OUTPUT_MODE : + s = copy_to_user(mode, &berlin_output_mode, sizeof(int)); + break; + case SNDRV_BERLIN_SET_OUTPUT_MODE : + berlin_output_mode = *mode; + break; + } + mutex_unlock(&berlin_mutex); + + return s; +} + +static int snd_berlin_card_new_hwdep(struct snd_berlin_chip *chip) +{ + struct snd_hwdep *hw; + unsigned int err; + + err = snd_hwdep_new(chip->card, "Berlin hwdep", 0, &hw); + if (err < 0) + return err; + + chip->hwdep = hw; + hw->private_data = chip; + strcpy(hw->name, "Berlin hwdep interface"); + + hw->ops.open = snd_berlin_hwdep_dummy_op; + hw->ops.ioctl = snd_berlin_hwdep_ioctl; + hw->ops.ioctl_compat = snd_berlin_hwdep_ioctl; + hw->ops.release = snd_berlin_hwdep_dummy_op; + + return 0; +} + +static void snd_berlin_private_free(struct snd_card *card) +{ + struct snd_berlin_chip *chip = card->private_data; + + kfree(chip); +} + +static int snd_berlin_card_init(int dev) +{ + int ret; + char id[16]; + struct snd_berlin_chip *chip; + int err; + + snd_printk("berlin snd card is probed\n"); + sprintf(id, "MRVLBERLIN"); + ret = snd_card_create(-1, id, THIS_MODULE, 0, &snd_berlin_card); + if (snd_berlin_card == NULL) + return -ENOMEM; + + chip = kzalloc(sizeof(struct snd_berlin_chip), GFP_KERNEL); + if(chip == NULL) + { + err = -ENOMEM; + goto __nodev; + } + + snd_berlin_card->private_data = chip; + snd_berlin_card->private_free = snd_berlin_private_free; + + chip->card = snd_berlin_card; + + if ((err = snd_berlin_card_new_pcm(chip)) < 0) + goto __nodev; + + strcpy(snd_berlin_card->driver, "Berlin SoC Alsa"); + strcpy(snd_berlin_card->shortname, "Berlin Alsa"); + sprintf(snd_berlin_card->longname, "Berlin Alsa %i", dev + 1); + + if ((err = snd_berlin_card_new_hwdep(chip)) < 0) + goto __nodev; + + if ((err = snd_card_register(snd_berlin_card)) != 0) + goto __nodev; + else { + snd_printk("berlin snd card device driver registered\n"); + return 0; + } + +__nodev: + if(chip) + kfree(chip); + + snd_card_free(snd_berlin_card); + + return err; +} + +static void snd_berlin_card_exit(void) +{ + snd_card_free(snd_berlin_card); +} + +static int __init snd_berlin_init(void) +{ + printk("snd_berlin_init\n"); + return snd_berlin_card_init(0); +} + +static void __exit snd_berlin_exit(void) +{ + printk("snd_berlin_exit\n"); + snd_berlin_card_exit(); +} + +MODULE_LICENSE("GPL"); +module_init(snd_berlin_init); +module_exit(snd_berlin_exit); diff --git a/sound/soc/berlin/spdif.c b/sound/soc/berlin/spdif.c new file mode 100644 index 00000000..3a51f6da --- /dev/null +++ b/sound/soc/berlin/spdif.c @@ -0,0 +1,86 @@ +/************************************************************************************* +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +**************************************************************************************/ +#include +#include "api_spdif.h" + +enum { + SPDIF_FREQ_11K = 0x1, + SPDIF_FREQ_12K = 0x1, + SPDIF_FREQ_22K = 0x4, + SPDIF_FREQ_24K = 0x6, + SPDIF_FREQ_32K = 0x3, + SPDIF_FREQ_44K = 0x0, + SPDIF_FREQ_48K = 0x2, + SPDIF_FREQ_88K = 0x8, + SPDIF_FREQ_96K = 0xA, + SPDIF_FREQ_176K = 0xC, + SPDIF_FREQ_192K = 0xE, +}; + +unsigned int spdif_init_channel_status(struct spdif_channel_status *chnsts, unsigned int sample_rate) +{ + if(chnsts == NULL) + return -1; + + memset(chnsts, 0, sizeof(struct spdif_channel_status)); + chnsts->consumer = 0; + chnsts->digital_data = 0; + chnsts->copyright = 0; + chnsts->nonlinear = 0; + chnsts->mode = 0; + chnsts->category = 0b0001001; + chnsts->lbit = 0; + chnsts->source_num = 0; + chnsts->channel_num = 0; + + switch(sample_rate) { + case 32000 : + chnsts->sample_rate = SPDIF_FREQ_32K; + break; + case 44100 : + chnsts->sample_rate = SPDIF_FREQ_44K; + break; + case 48000 : + chnsts->sample_rate = SPDIF_FREQ_48K; + break; + case 88200 : + chnsts->sample_rate = SPDIF_FREQ_88K; + break; + case 96000 : + chnsts->sample_rate = SPDIF_FREQ_96K; + break; + default : + break; + } + + chnsts->word_length = (chnsts->digital_data == 1 ? 0x2 : 0xb); + chnsts->CGMSA = 0b11; + + return 0; +} + +unsigned char spdif_get_channel_status(unsigned char *chnsts, unsigned int spdif_frames) +{ + unsigned int bytes, bits; + + bytes = spdif_frames >> 3; + bits = spdif_frames - (bytes << 3); + return ((chnsts[bytes] >> bits) & 0x01); +} diff --git a/sound/soc/berlin/spdif_enc.h b/sound/soc/berlin/spdif_enc.h new file mode 100644 index 00000000..50dadcf6 --- /dev/null +++ b/sound/soc/berlin/spdif_enc.h @@ -0,0 +1,106 @@ +/************************************************************************************* +* Copyright (C) 2007-2011 +* Copyright ? 2007 Marvell International Ltd. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +***************************************************************************************/ + +#ifndef __SPDIF_ENC_H__ +#define __SPDIF_ENC_H__ + +#ifndef __KERNEL__ +#include +#endif + +#include "bmc_enc_tbl.h" + +enum subframe_type +{ + TYPE_B = 0, + TYPE_M = 1, + TYPE_W = 2, +}; + +static uint8_t __sync_preamble[3] = +{ + 0xE8, /* TYPE_B: 11101000 */ + 0xE2, /* TYPE_M: 11100010 */ + 0xE4, /* TYPE_W: 11100100 */ +}; + +static inline void spdif_enc_subframe(uint32_t *subframe, + uint32_t data, uint32_t sync_type, uint8_t v, uint8_t u, uint8_t c) +{ + uint32_t val, pattern, parity; + uint32_t last_phase; + + parity = 0; + last_phase = 0; + + /* Only data[31:8] are effective */ + data >>= 8; + + /* Fill preamble*/ + val = __sync_preamble[sync_type % 3] << 16; + + /* Generate pattern for data[8:15] */ + pattern = __bmc_enc_tbl_8bit[data & 0xFF]; data >>= 8; + + /* Fill data */ + val |= pattern; parity += pattern; + last_phase = pattern & 1; + + /* Generate pattern for data[16:23] */ + pattern = __bmc_enc_tbl_8bit[data & 0xFF]; data >>= 8; + parity += pattern; + + /* Handle bi-phase */ + pattern = last_phase ? (pattern ^ 0xFFFF) : pattern; + last_phase = pattern & 1; + + /* Fill data - data[16:19] in the first 32-bit */ + subframe[0] = (val << 8) | (pattern >> 8); + + /* Fill data - data[20:23] in the second 32-bit */ + val = pattern & 0xFF; + + /* Generate pattern for data[24:31] */ + pattern = __bmc_enc_tbl_8bit[data & 0xFF]; + parity += pattern; + + /* Handle bi-phase */ + pattern = last_phase ? (pattern ^ 0xFFFF) : pattern; + last_phase = pattern & 1; + + /* Fill data */ + val = (val << 16) | pattern; + + /* Calculate VUCP */ + v &= 1; u &= 1; c &= 1; + parity += v + u + c; + parity &= 1; + + /* Generate pattern */ + pattern = __bmc_enc_tbl_8bit[(parity<<3)+(c<<2)+(u<<1)+v] >> 8; + + /* Handle bi-phase */ + pattern = last_phase ? (pattern ^ 0xFF) : pattern; + + /* Fill data */ + subframe[1] = (val<<8) | pattern; +} + +#endif /* __SPDIF_ENC_H__ */ diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile index a20e3203..0b0a9078 100644 --- a/tools/lib/traceevent/Makefile +++ b/tools/lib/traceevent/Makefile @@ -122,7 +122,7 @@ export Q VERBOSE EVENT_PARSE_VERSION = $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION) -INCLUDES = -I. -I/usr/local/include $(CONFIG_INCLUDES) +INCLUDES = -I. $(CONFIG_INCLUDES) # Set compile option CFLAGS if not set elsewhere CFLAGS ?= -g -Wall